[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - vcl/source
vcl/source/app/salvtables.cxx | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) New commits: commit 8606b25c7529a5e8d65b3c422edb8d74af0151c8 Author: Caolán McNamara AuthorDate: Thu Sep 30 16:08:25 2021 +0100 Commit: Michael Stahl CommitDate: Fri Oct 1 15:08:19 2021 +0200 Resolves: tdf#140992 Paste/Cut should mark Edit as modified Change-Id: Id56b5bf2e922394da7e730f4bab652808253c54e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122858 Reviewed-by: Michael Stahl Tested-by: Jenkins diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx index b50ebb6a46b6..28bfec378e92 100644 --- a/vcl/source/app/salvtables.cxx +++ b/vcl/source/app/salvtables.cxx @@ -3203,11 +3203,19 @@ Edit& SalInstanceEntry::getEntry() { return *m_xEntry; } void SalInstanceEntry::fire_signal_changed() { signal_changed(); } -void SalInstanceEntry::cut_clipboard() { m_xEntry->Cut(); } +void SalInstanceEntry::cut_clipboard() +{ +m_xEntry->Cut(); +m_xEntry->Modify(); +} void SalInstanceEntry::copy_clipboard() { m_xEntry->Copy(); } -void SalInstanceEntry::paste_clipboard() { m_xEntry->Paste(); } +void SalInstanceEntry::paste_clipboard() +{ +m_xEntry->Paste(); +m_xEntry->Modify(); +} namespace {
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - vcl/source
vcl/source/treelist/svimpbox.cxx |9 + 1 file changed, 9 insertions(+) New commits: commit bfc49fc16c1cc9b9a5dee406fe7348c079c45ba6 Author: Caolán McNamara AuthorDate: Tue Jul 13 16:56:23 2021 +0100 Commit: Xisco Fauli CommitDate: Wed Jul 14 09:58:32 2021 +0200 tdf#143245 activate-on-single-click only if 'up' is at active entry which is typically selected by the 'down' Change-Id: I23382fb97146820da49e570280778729a3156f03 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118807 Tested-by: Jenkins Reviewed-by: Xisco Fauli diff --git a/vcl/source/treelist/svimpbox.cxx b/vcl/source/treelist/svimpbox.cxx index d72de8763981..bab21eb7c1c7 100644 --- a/vcl/source/treelist/svimpbox.cxx +++ b/vcl/source/treelist/svimpbox.cxx @@ -2011,7 +2011,16 @@ void SvImpLBox::MouseButtonUp( const MouseEvent& rMEvt) } if (m_pView->mbActivateOnSingleClick) +{ +Point aPos(rMEvt.GetPosPixel()); +SvTreeListEntry* pEntry = GetEntry(aPos); +// tdf#143245 ActivateOnSingleClick only +// if the 'up' is at the active entry +// typically selected by the 'down' +if (!pEntry || pEntry != m_pCursor) +return; m_pView->DoubleClickHdl(); +} } void SvImpLBox::MouseMove( const MouseEvent& rMEvt) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - vcl/source
vcl/source/gdi/print.cxx |1 + 1 file changed, 1 insertion(+) New commits: commit 071e5a422b6a795fd396b378bebc9cd8cc02819c Author: Caolán McNamara AuthorDate: Tue Dec 1 10:17:18 2020 + Commit: Michael Stahl CommitDate: Thu Jul 8 10:37:51 2021 +0200 cid#1202935 Uninitialized scalar field Change-Id: Ie95426e6188253dd5f2bd77782f62647d9ddba50 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106956 Tested-by: Jenkins Reviewed-by: Caolán McNamara (cherry picked from commit ad53629186343f8a111b4bee21721e8b446bd8a2) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118582 Reviewed-by: Michael Stahl diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx index 48338a879ea5..fb3e5de9a95b 100644 --- a/vcl/source/gdi/print.cxx +++ b/vcl/source/gdi/print.cxx @@ -459,6 +459,7 @@ void Printer::ImplInitData() mbPrintFile = false; mbInPrintPage = false; mbNewJobSetup = false; +mbSinglePrintJobs = false; mpInfoPrinter = nullptr; mpPrinter = nullptr; mpDisplayDev= nullptr; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - vcl/source
vcl/source/gdi/CommonSalLayout.cxx |6 ++ 1 file changed, 6 insertions(+) New commits: commit 82ec493928ae35d224ffdc735fd8e427c390610c Author: Caolán McNamara AuthorDate: Tue Jun 22 17:13:39 2021 +0100 Commit: Michael Stahl CommitDate: Thu Jun 24 11:00:04 2021 +0200 disable ligatures for monospace fonts we don't want e.g. a ffi ligature for Courier/Nimbus Mono PS Change-Id: I292c6e2ea217b511b4affcd8dab4a4bda85ab5da Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117644 Tested-by: Jenkins Reviewed-by: Caolán McNamara (cherry picked from commit 744e964619b5c49870ceab7f59daf1272f24cf75) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117713 Reviewed-by: Michael Stahl diff --git a/vcl/source/gdi/CommonSalLayout.cxx b/vcl/source/gdi/CommonSalLayout.cxx index 998e07169c51..3ff45ef722b7 100644 --- a/vcl/source/gdi/CommonSalLayout.cxx +++ b/vcl/source/gdi/CommonSalLayout.cxx @@ -333,6 +333,12 @@ bool GenericSalLayout::LayoutText(ImplLayoutArgs& rArgs, const SalLayoutGlyphs* maFeatures.push_back({ HB_TAG('k','e','r','n'), 0, 0, static_cast(-1) }); } +if (rFontSelData.GetPitch() == PITCH_FIXED) +{ +SAL_INFO("vcl.harfbuzz", "Disabling ligatures for font: " << rFontSelData.maTargetName); +maFeatures.push_back({ HB_TAG('l','i','g','a'), 0, 0, static_cast(-1) }); +} + ParseFeatures(rFontSelData.maTargetName); double nXScale = 0; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - vcl/source
vcl/source/window/printdlg.cxx | 88 - 1 file changed, 70 insertions(+), 18 deletions(-) New commits: commit 34ed5f0b28942948210a39bd92e57a30aa6385f2 Author: Armin Le Grand (Allotropia) AuthorDate: Tue Apr 27 11:09:32 2021 +0200 Commit: Thorsten Behrens CommitDate: Sun May 2 00:57:32 2021 +0200 tdf#141761 Enhance PrintDialog Preview for FormControls The display quality of the Preview is pretty ugly when FormControls are used. I made a deep-dive why this happens, and in principle the reason is the Mteafile::Scale used below. Since Metafile actions are integer, that floating point scale leads to rounduing errors that make the lines painting the FormControls disappear in the surrounding ClipRegions. That Scale cannot be avoided since the Metafile contains it's own SetMapMode commands which *will* be executed on ::Play, so the ::Scale is the only possibility fr Metafile currently: Giving a Size as parameter in ::Play will *not* work due to the relativeMapMode that gets created will fail on ::SetMapMode actions in the Metafile - and FormControls DO use ::SetMapMode(MapPixel). This can only be solved better in the future using Primitives which would allow any scale by embedding to a Transformation, but that would be a bigger rework. Until then, use this little 'trick' to improve qulatity. It uses the fact to empirically having tested that the quality gets really bad for FormControls starting by a scale factor smaller than 0.2 - that makes the ClipRegion overlap start. So - for now - try not to go below that. Change-Id: I540de602634c6afa697b5659d69c34159c22075c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114704 Reviewed-by: Armin Le Grand Tested-by: Armin Le Grand (cherry picked from commit 4722ad2cf3f2b91c217e3548f811f2972f2aa60c) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114715 Tested-by: Jenkins Reviewed-by: Thorsten Behrens diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx index d37c0ec068bc..8866abe43733 100644 --- a/vcl/source/window/printdlg.cxx +++ b/vcl/source/window/printdlg.cxx @@ -351,17 +351,14 @@ void PrintDialog::PrintPreviewWindow::preparePreviewBitmap() return; } -// create temporary VDev and render to it +// create temporary VDev with requested Size and DPI. +// CAUTION: DPI *is* important here - it DIFFRERS from 75x75, usually 600x600 is used ScopedVclPtrInstance pPrerenderVDev(*Application::GetDefaultDevice()); pPrerenderVDev->SetOutputSizePixel(aScaledSize, false); pPrerenderVDev->SetReferenceDevice( mnDPIX, mnDPIY ); -pPrerenderVDev->EnableOutput(); -pPrerenderVDev->SetBackground( Wallpaper(COL_WHITE) ); -GDIMetaFile aMtf( maMtf ); - -Size aVDevSize( pPrerenderVDev->GetOutputSizePixel() ); -const Size aLogicSize( pPrerenderVDev->PixelToLogic( aVDevSize, MapMode( MapUnit::Map100thMM ) ) ); +// calculate needed Scale for Metafile (using Size and DPI from VDev) +Size aLogicSize( pPrerenderVDev->PixelToLogic( pPrerenderVDev->GetOutputSizePixel(), MapMode( MapUnit::Map100thMM ) ) ); Size aOrigSize( maOrigSize ); if( aOrigSize.Width() < 1 ) aOrigSize.setWidth( aLogicSize.Width() ); @@ -369,30 +366,85 @@ void PrintDialog::PrintPreviewWindow::preparePreviewBitmap() aOrigSize.setHeight( aLogicSize.Height() ); double fScale = double(aLogicSize.Width())/double(aOrigSize.Width()); +// tdf#141761 +// The display quality of the Preview is pretty ugly when +// FormControls are used. I made a deep-dive why this happens, +// and in principle the reason is the Mteafile::Scale used +// below. Since Metafile actions are integer, that floating point +// scale leads to rounduing errors that make the lines painting +// the FormControls disappear in the surrounding ClipRegions. +// That Scale cannot be avoided since the Metafile contains it's +// own SetMapMode commands which *will* be executed on ::Play, +// so the ::Scale is the only possibility fr Metafile currently: +// Giving a Size as parameter in ::Play will *not* work due to +// the relativeMapMode that gets created will fail on +// ::SetMapMode actions in the Metafile - and FormControls DO +// use ::SetMapMode(MapPixel). +// This can only be solved better in the future using Primitives +// which would allow any scale by embedding to a Transformation, +// but that would be a bigger rework. +// Until then, use this little 'trick' to improve qulatity. +// It uses the fact to empirically having tested that the quality +// gets really bad for FormControls starting by a scale factor +// smaller than 0.2 - that makes the ClipRegion overlap start. +// So - for now - try not to go below that. +static double fMinimumScale(0.2); +
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - vcl/source
vcl/source/window/window2.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit d38c5abbb0a34159fc13ef86269fbff3a93c3109 Author: Caolán McNamara AuthorDate: Tue Apr 27 11:16:33 2021 +0100 Commit: Michael Stahl CommitDate: Fri Apr 30 11:03:41 2021 +0200 tdf#141854 Resize called during dispose Change-Id: Ie5eaafa95704f9567b8bb9881865571a39bb2f6b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114708 Tested-by: Jenkins Tested-by: Caolán McNamara Reviewed-by: Caolán McNamara (cherry picked from commit aea139c440d7c7a3683fcbbc48799bc79ba590e7) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114860 Reviewed-by: Michael Stahl diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx index a729f655a93d..75885cb43d98 100644 --- a/vcl/source/window/window2.cxx +++ b/vcl/source/window/window2.cxx @@ -1348,7 +1348,7 @@ void Window::queue_resize(StateChangedType eReason) } } -if (bSomeoneCares && !mpWindowImpl->mbInDispose) +if (bSomeoneCares && !isDisposed()) { //fdo#57090 force a resync of the borders of the borderwindow onto this //window in case they have changed ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - vcl/source
vcl/source/control/button.cxx | 22 +++- vcl/source/outdev/map.cxx | 217 +++--- 2 files changed, 160 insertions(+), 79 deletions(-) New commits: commit 55a18fcee6ba152e9db154cc925d2f578f31a9ae Author: Armin Le Grand (Allotropia) AuthorDate: Mon Apr 19 19:51:27 2021 +0200 Commit: Armin Le Grand CommitDate: Mon Apr 26 19:32:11 2021 +0200 tdf#141761 Avoid vanishing FormControls For details see task documentaion, but BG is that a Rectangle gets not transformed in OutputDevice::LogicToPixel and corresponding methods of OutputDevice due to the given Rectangle.IsEmpty() == true. This ignores that the Rectangle has a valid position and that we have cases where a Rectangle is used to hold a Position without having a Size != 0 in X and Y. Thus I added transforming the Position in these methods in all cases - a Rectangle always has a valid position - and take care of Sizes that exist. This *may* need to be done different due to old hiccups of Rectangle itself, see explanation at OutputDevice::ImplLogicToDevicePixel Had to do it different now, see comment in map.cxx for expalantions. Also needed to adapt the ancient optical geometric paint position correctionsfor Buttons - these can get zero or negative due to using Zoom and MapMode settings. A Width shoul not get zero or negative. Adapted to LibreOffice-7-1 as needed. Change-Id: Ide085fbe74f9c0387de3c1bf6320b7e873238029 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114304 Tested-by: Jenkins Reviewed-by: Armin Le Grand (cherry picked from commit 35e4a45260f128f353d25e2a2f2b800e6bd11d61) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114596 diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx index 91a4aa4543a3..d0614c4ab96c 100644 --- a/vcl/source/control/button.cxx +++ b/vcl/source/control/button.cxx @@ -825,7 +825,11 @@ void PushButton::ImplDrawPushButtonContent(OutputDevice *pDev, DrawFlags nDrawFl nSymbolSize = aSize.Width() / 2; nSeparatorX = aInRect.Right() - 2*nSymbolSize; -aSize.AdjustWidth( -(2*nSymbolSize) ); + +// tdf#141761 Minimum width should be (1) Pixel, see comment +// with same task number above for more info +const tools::Long nWidthAdjust(2*nSymbolSize); +aSize.setWidth(std::max(static_cast(1), aSize.getWidth() - nWidthAdjust)); // center symbol rectangle in the separated area aSymbolRect.AdjustRight( -(nSymbolSize/2) ); @@ -1982,7 +1986,16 @@ void RadioButton::ImplDraw( OutputDevice* pDev, DrawFlags nDrawFlags, Size aSize( rSize ); Point aPos( rPos ); aPos.AdjustX(rImageSize.Width() + nImageSep ); -aSize.AdjustWidth( -(rImageSize.Width() + nImageSep) ); + +// tdf#141761 Old (convenience?) adjustment of width may lead to empty +// or negative(!) Size, that needs to be avoided. The coordinate context +// is pixel-oriented (all Paints of Controls are, historically), so +// the minimum width should be '1' Pixel. +// Hint: nImageSep is based on Zoom (using Window::CalcZoom) and +// MapModes (using Window::GetDrawPixel) - so potenially a wide range +// of unpredictable values is possible +const tools::Long nWidthAdjust(rImageSize.Width() + nImageSep); +aSize.setWidth(std::max(static_cast(1), aSize.getWidth() - nWidthAdjust)); // if the text rect height is smaller than the height of the image // then for single lines the default should be centered text @@ -2996,7 +3009,10 @@ void CheckBox::ImplDraw( OutputDevice* pDev, DrawFlags nDrawFlags, Size aSize( rSize ); Point aPos( rPos ); aPos.AdjustX(rImageSize.Width() + nImageSep ); -aSize.AdjustWidth( -(rImageSize.Width() + nImageSep) ); + +// tdf#141761 See comment with same ID above +const tools::Long nWidthAdjust(rImageSize.Width() + nImageSep); +aSize.setWidth(std::max(static_cast(1), aSize.getWidth() - nWidthAdjust)); // if the text rect height is smaller than the height of the image // then for single lines the default should be centered text diff --git a/vcl/source/outdev/map.cxx b/vcl/source/outdev/map.cxx index efd8e587ce0e..3f478f2fdf88 100644 --- a/vcl/source/outdev/map.cxx +++ b/vcl/source/outdev/map.cxx @@ -405,23 +405,48 @@ Size OutputDevice::ImplLogicToDevicePixel( const Size& rLogicSize ) const tools::Rectangle OutputDevice::ImplLogicToDevicePixel( const tools::Rectangle& rLogicRect ) const { -if ( rLogicRect.IsEmpty() ) -return rLogicRect; +// tdf#141761 IsEmpty() removed +// Even if rLogicRect.IsEmpty(), transform of the Position contained +// in the Rectangle is necessary. Due to
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - vcl/source
vcl/source/uitest/uno/uiobject_uno.cxx |8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) New commits: commit e2566fe6ca4bb4507bff2d20c9752294c3fd5771 Author: Michael Stahl AuthorDate: Fri Apr 23 12:49:52 2021 +0200 Commit: Xisco Fauli CommitDate: Mon Apr 26 17:04:56 2021 +0200 vcl: use SolarMutexGuard when accessing UIObjectUnoObj::mpObj This recently crashed in jenkins, in UITest_sw_navigator: Thread 1 (Thread 0x2b46be801700 (LWP 8577)): 0 rtl::Reference::get() const (this=0x9a21) 1 VclPtr::operator vcl::Window*() const (this=0x9a19) 2 vcl::Window::GetChildCount() const (this=0x2636360) [...] 13 WindowUIObject::get_children() const (this=0x1899cd0) 14 UIObjectUnoObj::getChildren() (this=0x18986f0) 15 non-virtual thunk to UIObjectUnoObj::getChildren() 16 gcc3::callVirtualMethod(void*, unsigned int, void*, _typelib_TypeDescriptionReference*, bool, unsigned long*, unsigned int, unsigned long*, double*) Change-Id: I190738a436e4cd957362f5bb2cd8993c8424512a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114541 Tested-by: Jenkins Reviewed-by: Michael Stahl (cherry picked from commit e7d302a9a540394264bfe813d4eb74d76b94802c) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114599 Reviewed-by: Xisco Fauli diff --git a/vcl/source/uitest/uno/uiobject_uno.cxx b/vcl/source/uitest/uno/uiobject_uno.cxx index 593f4a4c11fe..75899c9bc12c 100644 --- a/vcl/source/uitest/uno/uiobject_uno.cxx +++ b/vcl/source/uitest/uno/uiobject_uno.cxx @@ -162,7 +162,12 @@ css::uno::Sequence UIObjectUnoObj::getChildren() if (!mpObj) throw css::uno::RuntimeException(); -std::set aChildren = mpObj->get_children(); +std::set aChildren; + +{ +SolarMutexGuard aGuard; +aChildren = mpObj->get_children(); +} css::uno::Sequence aRet(aChildren.size()); sal_Int32 i = 0; @@ -180,6 +185,7 @@ OUString SAL_CALL UIObjectUnoObj::getType() if (!mpObj) throw css::uno::RuntimeException(); +SolarMutexGuard aGuard; return mpObj->get_type(); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - vcl/source
vcl/source/font/PhysicalFontCollection.cxx |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) New commits: commit 0ac6f13717fae73b8c6393e4ca5f2f5a9f1179c4 Author: Luboš Luňák AuthorDate: Thu Feb 25 20:59:45 2021 + Commit: Luboš Luňák CommitDate: Thu Apr 15 20:13:18 2021 +0200 do not repeatedly call getenv("SAL_NO_FONT_LOOKUP") In the profiling data I see it actually takes 1% of the CPU time. Change-Id: I55de0191ac9fb17095e7d137f4efc1735936e233 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111571 Tested-by: Jenkins Reviewed-by: Luboš Luňák (cherry picked from commit 6457ade879b90a6d84871cefe46e17e30e68920e) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114173 diff --git a/vcl/source/font/PhysicalFontCollection.cxx b/vcl/source/font/PhysicalFontCollection.cxx index 6741f79faae2..5606b321af15 100644 --- a/vcl/source/font/PhysicalFontCollection.cxx +++ b/vcl/source/font/PhysicalFontCollection.cxx @@ -948,7 +948,8 @@ PhysicalFontFamily* PhysicalFontCollection::FindFontFamily( FontSelectPattern& r if( !Count() ) return nullptr; -if (getenv("SAL_NO_FONT_LOOKUP") != nullptr) +static bool noFontLookup = getenv("SAL_NO_FONT_LOOKUP") != nullptr; +if (noFontLookup) { // Hard code the use of Liberation Sans and skip font search. sal_Int32 nIndex = 0; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - vcl/source
vcl/source/gdi/print2.cxx | 12 1 file changed, 12 insertions(+) New commits: commit 2af290ddd365406ed03d144559288d4effd1323e Author: Caolán McNamara AuthorDate: Mon Apr 12 12:11:42 2021 +0100 Commit: Miklos Vajna CommitDate: Tue Apr 13 14:53:24 2021 +0200 tdf#134736 move nLastBgAction to also include any trailing pops RemoveTransparenciesFromMetaFile is a very fragile thing Change-Id: I8feeb436426d16087ab5fbaddf6b39ac32574e5c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113992 Tested-by: Jenkins Reviewed-by: Miklos Vajna diff --git a/vcl/source/gdi/print2.cxx b/vcl/source/gdi/print2.cxx index 6094417d940d..4479ea39383d 100644 --- a/vcl/source/gdi/print2.cxx +++ b/vcl/source/gdi/print2.cxx @@ -790,6 +790,18 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf, ++nActionNum; } +if (nLastBgAction != -1) +{ +size_t nActionSize = rInMtf.GetActionSize(); +// tdf#134736 move nLastBgAction to also include any trailing pops +for (size_t nPostLastBgAction = nLastBgAction + 1; nPostLastBgAction < nActionSize; ++nPostLastBgAction) +{ +if (rInMtf.GetAction(nPostLastBgAction)->GetType() != MetaActionType::POP) +break; +nLastBgAction = nPostLastBgAction; +} +} + aMapModeVDev->ClearStack(); // clean up aMapModeVDev // fast-forward until one after the last background action ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - vcl/source
vcl/source/bitmap/BitmapSepiaFilter.cxx|2 +- vcl/source/bitmap/BitmapSolarizeFilter.cxx |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) New commits: commit d41693f2eb48fce3d808f1719bbd60f2d2041203 Author: Julien Nabet AuthorDate: Sat Apr 10 19:09:41 2021 +0200 Commit: Caolán McNamara CommitDate: Sun Apr 11 12:14:15 2021 +0200 Related tdf#117750: fix "Solarization" and "Aging" For solarization, regression from: https://cgit.freedesktop.org/libreoffice/core/commit/?id=c38485279cd36da96ac81107d567ea4e779b2b96 author Chris Sherlock 2018-04-20 20:27:41 +1000 committer Tomaž Vajngerl2018-04-22 05:33:11 +0200 commit c38485279cd36da96ac81107d567ea4e779b2b96 (patch) treead9843a17f87271f9e0cf89643e2e6c3ee8a8de1 parent bcbf767bcfc024e2be839e0c0886f942dd068e4f (diff) vcl: ImplSolarize() to BitmapSolarizeFilter For aging, regression from: https://cgit.freedesktop.org/libreoffice/core/commit/?id=1ab12471f3a69c4d502e6271e84ddf8a981f507f author Chris Sherlock 2018-04-20 20:32:23 +1000 committer Tomaž Vajngerl2018-04-22 05:33:39 +0200 commit 1ab12471f3a69c4d502e6271e84ddf8a981f507f (patch) tree6652276229ad1c3ffca48f7a31e1b77d2ea04b07 parent c38485279cd36da96ac81107d567ea4e779b2b96 (diff) vcl: ImplSepia -> BitmapSepiaFilter Change-Id: I4f350aa8b494caf55c9c810ac7fa9ed8db349725 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113926 (cherry picked from commit f3151e62bcc7cb66313df70a2ec8eed8ca8f2c88) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113858 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/vcl/source/bitmap/BitmapSepiaFilter.cxx b/vcl/source/bitmap/BitmapSepiaFilter.cxx index cfac984b8fa3..9c1ff76672d3 100644 --- a/vcl/source/bitmap/BitmapSepiaFilter.cxx +++ b/vcl/source/bitmap/BitmapSepiaFilter.cxx @@ -103,7 +103,7 @@ BitmapEx BitmapSepiaFilter::execute(BitmapEx const& rBitmapEx) const } if (bRet) -return rBitmapEx; +return BitmapEx(aBitmap); return BitmapEx(); } diff --git a/vcl/source/bitmap/BitmapSolarizeFilter.cxx b/vcl/source/bitmap/BitmapSolarizeFilter.cxx index c4df366a65cb..0fc4ab6136cc 100644 --- a/vcl/source/bitmap/BitmapSolarizeFilter.cxx +++ b/vcl/source/bitmap/BitmapSolarizeFilter.cxx @@ -63,7 +63,7 @@ BitmapEx BitmapSolarizeFilter::execute(BitmapEx const& rBitmapEx) const } if (bRet) -return rBitmapEx; +return BitmapEx(aBitmap); return BitmapEx(); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - vcl/source
vcl/source/bitmap/BitmapSmoothenFilter.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 8a75c591ef0cb017c58a7f068d1ae6571f87bd90 Author: Julien Nabet AuthorDate: Sat Apr 10 19:30:23 2021 +0200 Commit: Caolán McNamara CommitDate: Sun Apr 11 12:13:41 2021 +0200 Related tdf#117750: fix UnsharpenFilter Change-Id: I372bb6baae747adb3b2d2a2b8fd39d1631b074ec Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113927 (cherry picked from commit 3d32e6a6ccfae56f379cb1dec6dcadf9aa8fa85f) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113859 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/vcl/source/bitmap/BitmapSmoothenFilter.cxx b/vcl/source/bitmap/BitmapSmoothenFilter.cxx index 67cea0cb3dfa..e9c135f8ec59 100644 --- a/vcl/source/bitmap/BitmapSmoothenFilter.cxx +++ b/vcl/source/bitmap/BitmapSmoothenFilter.cxx @@ -24,7 +24,7 @@ BitmapEx BitmapSmoothenFilter::execute(BitmapEx const& rBitmapEx) const bRet = BitmapFilter::Filter(aBitmapEx, BitmapSeparableUnsharpenFilter(mfRadius)); if (bRet) -return rBitmapEx; +return aBitmapEx; return BitmapEx(); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - vcl/source
vcl/source/filter/ipdf/pdfread.cxx |2 ++ 1 file changed, 2 insertions(+) New commits: commit 3607b1a5c229b87174a7ea2fb80af0e783cbff54 Author: Caolán McNamara AuthorDate: Thu Apr 1 21:25:10 2021 +0100 Commit: Xisco Fauli CommitDate: Tue Apr 6 12:15:08 2021 +0200 ofz#32796: no pdfium during wmf fuzzing Change-Id: I418615dd68618bb8623a052cf52a85b917d4382d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113492 Tested-by: Caolán McNamara Reviewed-by: Caolán McNamara Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113527 Tested-by: Jenkins Reviewed-by: Xisco Fauli diff --git a/vcl/source/filter/ipdf/pdfread.cxx b/vcl/source/filter/ipdf/pdfread.cxx index a36eacbfd41a..80f207a68196 100644 --- a/vcl/source/filter/ipdf/pdfread.cxx +++ b/vcl/source/filter/ipdf/pdfread.cxx @@ -74,6 +74,8 @@ bool getCompatibleStream(SvStream& rInStream, SvStream& rOutStream) { // Downconvert to PDF-1.6. auto pPdfium = vcl::pdf::PDFiumLibrary::get(); +if (!pPdfium) +return false; // Read input into a buffer. SvMemoryStream aInBuffer; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - vcl/source
vcl/source/window/syswin.cxx |5 - 1 file changed, 4 insertions(+), 1 deletion(-) New commits: commit ba8b0906d8cfa2151363c718fd2e22091b7fd053 Author: Caolán McNamara AuthorDate: Fri Apr 2 15:05:48 2021 +0100 Commit: Adolfo Jayme Barrientos CommitDate: Mon Apr 5 07:18:48 2021 +0200 tdf#141318 Dialog::GetOptimalSize not including border if called before Show Change-Id: I96ed67d84660106af2ef5de488da8abc7d556d1b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113483 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos diff --git a/vcl/source/window/syswin.cxx b/vcl/source/window/syswin.cxx index 8e396207df92..04139f454881 100644 --- a/vcl/source/window/syswin.cxx +++ b/vcl/source/window/syswin.cxx @@ -1066,7 +1066,10 @@ Size SystemWindow::GetOptimalSize() const if (!isLayoutEnabled()) return Window::GetOptimalSize(); -Size aSize = VclContainer::getLayoutRequisition(*GetWindow(GetWindowType::FirstChild)); +Window *pBox = GetWindow(GetWindowType::FirstChild); +// tdf#141318 Do the same as SystemWindow::setOptimalLayoutSize in case we're called before initial layout +const_cast(this)->settingOptimalLayoutSize(pBox); +Size aSize = VclContainer::getLayoutRequisition(*pBox); sal_Int32 nBorderWidth = get_border_width(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - vcl/source
vcl/source/window/layout.cxx | 27 --- 1 file changed, 16 insertions(+), 11 deletions(-) New commits: commit bcfcc787168e7b9ffd577285694ef0e57dbeb8fa Author: Caolán McNamara AuthorDate: Thu Apr 1 10:31:27 2021 +0100 Commit: Adolfo Jayme Barrientos CommitDate: Thu Apr 1 16:31:09 2021 +0200 Resolves: tdf#141258 turn scrollbars on/off once per layout loop in this scenario the vertical scrollbar is turned off, then turned on back to its original state but the off/on triggers another layout loop later which does the same thing. Turn on/off just once per loop so only one state change can occur so new layout is only triggered if the state really changes. Change-Id: I5736264a74723a15034e5fb467262dca6c0f283c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113370 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx index 2cf77e81a688..9406aa4585f5 100644 --- a/vcl/source/window/layout.cxx +++ b/vcl/source/window/layout.cxx @@ -1913,31 +1913,36 @@ void VclScrolledWindow::doSetAllocation(const Size , bool bRetryOnFa tools::Long nAvailHeight = rAllocation.Height() - 2 * m_nBorderWidth; tools::Long nAvailWidth = rAllocation.Width() - 2 * m_nBorderWidth; + // vert. ScrollBar +bool bShowVScroll; if (GetStyle() & WB_AUTOVSCROLL) -{ -m_pVScroll->Show(nAvailHeight < aChildReq.Height()); -} -else if (m_pVScroll->IsVisible() != bool(GetStyle() & WB_VSCROLL)) -m_pVScroll->Show((GetStyle() & WB_VSCROLL) != 0); +bShowVScroll = nAvailHeight < aChildReq.Height(); +else +bShowVScroll = (GetStyle() & WB_VSCROLL) != 0; -if (m_pVScroll->IsVisible()) +if (bShowVScroll) nAvailWidth -= getLayoutRequisition(*m_pVScroll).Width(); // horz. ScrollBar +bool bShowHScroll; if (GetStyle() & WB_AUTOHSCROLL) { -bool bShowHScroll = nAvailWidth < aChildReq.Width(); -m_pHScroll->Show(bShowHScroll); +bShowHScroll = nAvailWidth < aChildReq.Width(); if (bShowHScroll) nAvailHeight -= getLayoutRequisition(*m_pHScroll).Height(); if (GetStyle() & WB_AUTOVSCROLL) -m_pVScroll->Show(nAvailHeight < aChildReq.Height()); +bShowVScroll = nAvailHeight < aChildReq.Height(); } -else if (m_pHScroll->IsVisible() != bool(GetStyle() & WB_HSCROLL)) -m_pHScroll->Show((GetStyle() & WB_HSCROLL) != 0); +else +bShowHScroll = (GetStyle() & WB_HSCROLL) != 0; + +if (m_pHScroll->IsVisible() != bShowHScroll) +m_pHScroll->Show(bShowHScroll); +if (m_pVScroll->IsVisible() != bShowVScroll) +m_pVScroll->Show(bShowVScroll); Size aInnerSize(rAllocation); aInnerSize.AdjustWidth(-2 * m_nBorderWidth); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - vcl/source
vcl/source/window/menu.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit b9de0b5d94a155ccd43e28841064e7c1b1f9ab1d Author: Caolán McNamara AuthorDate: Tue Mar 23 14:55:09 2021 + Commit: Michael Stahl CommitDate: Tue Mar 30 11:17:13 2021 +0200 Related: tdf#141197 critical a11y warning ** (soffice:19098): CRITICAL **: 13:44:40.365: AtkObject* atk_object_wrapper_ref(const com::sun::star::uno::Reference&, bool): assertion 'bool(rxAccessible)' failed probably since... commit cbc18cc904c652a936c4b68fba4d975bd89b5abd Date: Mon Nov 23 21:03:28 2020 +0100 tdf#138425 vcl/gtk activate main menu in UpdateFull Change-Id: Ieb181e02bb0d2a907aec8534349ec2a80fd9c7e3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112957 Tested-by: Jenkins Reviewed-by: Michael Stahl diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx index 7d4a34678ada..792f3aed5ff5 100644 --- a/vcl/source/window/menu.cxx +++ b/vcl/source/window/menu.cxx @@ -1302,7 +1302,7 @@ css::uno::Reference Menu::GetAccessible() // Since PopupMenu are sometimes shared by different instances of MenuBar, the mxAccessible member gets // overwritten and may contain a disposed object when the initial menubar gets set again. So use the // mxAccessible member only for sub menus. -if ( pStartedFrom ) +if (pStartedFrom && pStartedFrom != this) { for ( sal_uInt16 i = 0, nCount = pStartedFrom->GetItemCount(); i < nCount; ++i ) { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - vcl/source
vcl/source/app/salvtables.cxx | 18 +++--- 1 file changed, 15 insertions(+), 3 deletions(-) New commits: commit 24d11d2d0855eba28328bcefe71e923277b0aaf3 Author: Caolán McNamara AuthorDate: Mon Mar 22 15:46:53 2021 + Commit: Xisco Fauli CommitDate: Mon Mar 22 21:17:10 2021 +0100 tdf#141166 widget with id "tabcontrol" might not be a TabControl it might be a VerticalTabControl or any other type Change-Id: I9f46f7e64a9be2487d400cc4a066575c0d45c19e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112801 Tested-by: Jenkins Reviewed-by: Xisco Fauli diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx index b6e808ac9cc2..317770c367c3 100644 --- a/vcl/source/app/salvtables.cxx +++ b/vcl/source/app/salvtables.cxx @@ -6877,9 +6877,21 @@ std::unique_ptr SalInstanceBuilder::create_size_group() OString SalInstanceBuilder::get_current_page_help_id() const { -TabControl* pCtrl = m_xBuilder->get("tabcontrol"); -TabPage* pTabPage = pCtrl ? pCtrl->GetTabPage(pCtrl->GetCurPageId()) : nullptr; -vcl::Window* pTabChild = pTabPage ? pTabPage->GetWindow(GetWindowType::FirstChild) : nullptr; +vcl::Window* pCtrl = m_xBuilder->get("tabcontrol"); +if (!pCtrl) +return OString(); +VclPtr xTabPage; +if (pCtrl->GetType() == WindowType::TABCONTROL) +{ +TabControl* pTabCtrl = static_cast(pCtrl); +xTabPage = pTabCtrl->GetTabPage(pTabCtrl->GetCurPageId()); +} +else if (pCtrl->GetType() == WindowType::VERTICALTABCONTROL) +{ +VerticalTabControl* pTabCtrl = static_cast(pCtrl); +xTabPage = pTabCtrl->GetPage(pTabCtrl->GetCurPageId()); +} +vcl::Window* pTabChild = xTabPage ? xTabPage->GetWindow(GetWindowType::FirstChild) : nullptr; pTabChild = pTabChild ? pTabChild->GetWindow(GetWindowType::FirstChild) : nullptr; if (pTabChild) return pTabChild->GetHelpId(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - vcl/source
vcl/source/gdi/pdfwriter_impl.cxx |4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) New commits: commit fc337124c9bb7498fc84a1c60250d7c043e8c7a6 Author: Julien Nabet AuthorDate: Sun Feb 28 22:23:30 2021 +0100 Commit: Xisco Fauli CommitDate: Mon Mar 15 15:34:54 2021 +0100 tdf#127217: Fix buttons in forms not working in Adobe Reader Regression from 76b5dca9dc0ff60f8f62cbecdee68f8f3b287ceb: author Thorsten Behrens 2019-04-09 02:19:14 +0200 committer Katarina Behrens 2019-07-03 14:48:45 +0200 commit 76b5dca9dc0ff60f8f62cbecdee68f8f3b287ceb (patch) treee778dad33073a228eb61ab62ce5f38e2a26d07ca parent 1e8a9c19a6f7b82c9e0c481aee0c04c0780f4433 (diff) tdf#113448 don't export any font for radio buttons Don't let only color value in m_aDAString since it'll go here: if( !rWidget.m_aDAString.isEmpty() ) { if( !rWidget.m_aDRDict.isEmpty() ) { aLine.append( "/DR<<" ); aLine.append( rWidget.m_aDRDict ); aLine.append( ">>\n" ); } else { aLine.append( "/DR<>>>\n" ); } aLine.append( "/DA" ); appendLiteralStringEncrypt( rWidget.m_aDAString, rWidget.m_nObject, aLine ); aLine.append( "\n" ); if( rWidget.m_nTextStyle & DrawTextFlags::Center ) aLine.append( "/Q 1\n" ); else if( rWidget.m_nTextStyle & DrawTextFlags::Right ) aLine.append( "/Q 2\n" ); } But if we shouldn't have /DR at all since we don't want fonts for radiobutton, it also means we don't want /DA too. Indeed at the end of 12.7.3.3 https://www.adobe.com/content/dam/acom/en/devnet/pdf/pdfs/PDF32000_2008.pdf: The default appearance string (DA) contains any graphics state or text state operators needed to establish the graphics state parameters, such as text size and colour, for displaying the field’s variable text. Only operators that are allowed within text objects shall occur in this string (see Figure 9). At a minimum, the string shall include a Tf (text font) operator along with its two operands, font and size. The specified font value shall match a resource name in the Font entry of the default resource dictionary (referenced from the DR entry of the interactive form dictionary; see Table 218). Change-Id: Ib350495d7fc5a7a4fba88d710614a0f67a0b1553 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111724 (cherry picked from commit a0d63ee5df921e5f1ac915ada783fdef0dbbb057) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112305 Tested-by: Jenkins Reviewed-by: Xisco Fauli diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index eeeb4305a181..6c6fc7c8923b 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -4023,9 +4023,6 @@ void PDFWriterImpl::createDefaultRadioButtonAppearance( PDFWidget& rBox, const P pop(); -OStringBuffer aDA( 256 ); -appendNonStrokingColor( replaceColor( rWidget.TextColor, rSettings.GetRadioCheckTextColor() ), aDA ); -rBox.m_aDAString = aDA.makeStringAndClear(); //to encrypt this (el) rBox.m_aMKDict = "/CA"; //after this assignment, to m_aMKDic cannot be added anything @@ -4038,6 +4035,7 @@ void PDFWriterImpl::createDefaultRadioButtonAppearance( PDFWidget& rBox, const P SvMemoryStream* pCheckStream = new SvMemoryStream( 256, 256 ); beginRedirect( pCheckStream, aCheckRect ); +OStringBuffer aDA( 256 ); aDA.append( "/Tx BMC\nq BT\n" ); appendNonStrokingColor( replaceColor( rWidget.TextColor, rSettings.GetRadioCheckTextColor() ), aDA ); aDA.append( ' ' ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - vcl/source
vcl/source/font/font.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 907e5fa4fe13efb26fc0dc3e5ead611da734daaa Author: Stephan Bergmann AuthorDate: Thu Feb 18 08:39:45 2021 +0100 Commit: Xisco Fauli CommitDate: Wed Mar 10 15:29:03 2021 +0100 Fix an OUString construction ...introduced with 9d161857f1d4afcb772b477455797a2da0e47a9b "tdf#127471 correct EMF/WMF im/export for scaled font" Change-Id: I2b807e102ca7f71a61794f511dee302c7e509026 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111095 Tested-by: Jenkins Reviewed-by: Stephan Bergmann (cherry picked from commit e0f2256b90fb30a5a7858f93c168d9da12061e70) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112221 Reviewed-by: Xisco Fauli diff --git a/vcl/source/font/font.cxx b/vcl/source/font/font.cxx index 4017a5347e75..45ab6ff4 100644 --- a/vcl/source/font/font.cxx +++ b/vcl/source/font/font.cxx @@ -388,7 +388,7 @@ tools::Long Font::GetOrCalculateAverageFontWidth() const aUnscaledFont.SetAverageFontWidth(0); pVirDev->SetFont(aUnscaledFont); const double fAverageFontWidth( -pVirDev->GetTextWidth(OUString(aArray.data())) / static_cast(nSize)); +pVirDev->GetTextWidth(OUString(aArray.data(), nSize)) / static_cast(nSize)); const_cast(this)->mpImplFont->SetCalculatedAverageFontWidth(basegfx::fround(fAverageFontWidth)); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - vcl/source
vcl/source/window/layout.cxx |5 - 1 file changed, 4 insertions(+), 1 deletion(-) New commits: commit 411c870ed16c6a27bbd9c762e187783b3b39849e Author: Caolán McNamara AuthorDate: Mon Mar 1 11:56:17 2021 + Commit: Adolfo Jayme Barrientos CommitDate: Wed Mar 3 09:12:20 2021 +0100 tdf#140537 scroll-wheeling shouldn't affect disabled scrollbars Change-Id: I5d8659c7d431d35d628b12cebfe6a4b4f9cab9ef Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111703 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx index 9b562c340b6b..2cf77e81a688 100644 --- a/vcl/source/window/layout.cxx +++ b/vcl/source/window/layout.cxx @@ -2059,7 +2059,10 @@ bool VclScrolledWindow::EventNotify(NotifyEvent& rNEvt) const CommandWheelData* pData = rCEvt.GetWheelData(); if( !pData->GetModifier() && ( pData->GetMode() == CommandWheelMode::SCROLL ) ) { -bDone = HandleScrollCommand(rCEvt, m_pHScroll, m_pVScroll); +// tdf#140537 only handle scroll commands in the valid shown scrollbars +bDone = HandleScrollCommand(rCEvt, +m_pHScroll->IsVisible() ? m_pHScroll : nullptr, +m_pVScroll->IsVisible() ? m_pVScroll : nullptr); } } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - vcl/source
vcl/source/outdev/bitmap.cxx | 27 +++ 1 file changed, 3 insertions(+), 24 deletions(-) New commits: commit b6d67d3d18d46daaabb3532d176759c234196da7 Author: Luboš Luňák AuthorDate: Wed Feb 10 17:15:19 2021 +0100 Commit: Xisco Fauli CommitDate: Tue Feb 16 09:46:46 2021 +0100 always optimize bitmap transform to translate+scale if possible (tdf#138068) Commit 828504974d70111e make OutputDevice::DrawTransformedBitmapEx() always call DrawTransformBitmapExDirect() in preference to explicitly converting to DrawBitmapEx() if the transformation wanted was at most translate+scale, in the hopes that these days the backend implementations work well enough. But it turns out only the Skia backend handles that without loss of performance. So always do the conversion to DrawBitmapEx() if possible. It's so simple that it possibly makes sense to always do this, regardless of the backend. Change-Id: I6eba68e672334c38433f53980f49400499f5d8e7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110716 Tested-by: Jenkins Reviewed-by: Luboš Luňák (cherry picked from commit 9d89d98d3349502b56da4bdd6ea287ac4cde9ce5) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110779 Reviewed-by: Xisco Fauli diff --git a/vcl/source/outdev/bitmap.cxx b/vcl/source/outdev/bitmap.cxx index 519f975a0f12..796b3b82f555 100644 --- a/vcl/source/outdev/bitmap.cxx +++ b/vcl/source/outdev/bitmap.cxx @@ -1261,28 +1261,6 @@ void OutputDevice::DrawTransformedBitmapEx( : nullptr); #endif -// MM02 reorganize order: Prefer DrawTransformBitmapExDirect due -// to this having evolved and is improved on quite some systems. -// Check for exclusion parameters that may prevent using it -static bool bAllowPreferDirectPaint(true); -const bool bInvert(RasterOp::Invert == meRasterOp); -const bool bBitmapChangedColor(mnDrawMode & (DrawModeFlags::BlackBitmap | DrawModeFlags::WhiteBitmap | DrawModeFlags::GrayBitmap )); -const bool bTryDirectPaint(!bInvert && !bBitmapChangedColor && !bMetafile); - -if(bAllowPreferDirectPaint && bTryDirectPaint) -{ -// tdf#130768 CAUTION(!) using GetViewTransformation() is *not* enough here, it may -// be that mnOutOffX/mnOutOffY is used - see AOO bug 75163, mentioned at -// ImplGetDeviceTransformation declaration -const basegfx::B2DHomMatrix aFullTransform(ImplGetDeviceTransformation() * rTransformation); - -if(DrawTransformBitmapExDirect(aFullTransform, rBitmapEx)) -{ -// we are done -return; -} -} - // decompose matrix to check rotation and shear basegfx::B2DVector aScale, aTranslate; double fRotate, fShearX; @@ -1317,8 +1295,9 @@ void OutputDevice::DrawTransformedBitmapEx( return; } -// MM02 bAllowPreferDirectPaint may have been false to allow -// to specify order of executions, so give bTryDirectPaint a call +const bool bInvert(RasterOp::Invert == meRasterOp); +const bool bBitmapChangedColor(mnDrawMode & (DrawModeFlags::BlackBitmap | DrawModeFlags::WhiteBitmap | DrawModeFlags::GrayBitmap )); +const bool bTryDirectPaint(!bInvert && !bBitmapChangedColor && !bMetafile); if(bTryDirectPaint) { // tdf#130768 CAUTION(!) using GetViewTransformation() is *not* enough here, it may ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - vcl/source
vcl/source/control/tabctrl.cxx |5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) New commits: commit 0c5adc7926c771fbed932e02df9d8aefebd02694 Author: Caolán McNamara AuthorDate: Wed Feb 10 20:37:41 2021 + Commit: Michael Stahl CommitDate: Mon Feb 15 11:15:52 2021 +0100 ImplGetTabRect(ImplTabItem*) variant always returns 0 with default args so TabControl::GetPageId(const Point& rPos) doesn't work since... commit 6540912ae1a570fd8c2318f77b757e07b87c0707 Date: Sun Jun 16 21:41:31 2019 + VCL merge most of NotebookbarTabControlBase Change-Id: Ia99911e753dbe2bb22dc892c6bddc0392fab97a1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110684 Tested-by: Jenkins Reviewed-by: Michael Stahl diff --git a/vcl/source/control/tabctrl.cxx b/vcl/source/control/tabctrl.cxx index 8f75270c237b..bab7684c2f31 100644 --- a/vcl/source/control/tabctrl.cxx +++ b/vcl/source/control/tabctrl.cxx @@ -1787,9 +1787,10 @@ sal_uInt16 TabControl::GetPagePos( sal_uInt16 nPageId ) const sal_uInt16 TabControl::GetPageId( const Point& rPos ) const { +Size winSize = Control::GetOutputSizePixel(); const auto = mpTabCtrlData->maItemList; -const auto it = std::find_if(rList.begin(), rList.end(), [, this](const auto ) { -return const_cast(this)->ImplGetTabRect().IsInside(rPos); }); +const auto it = std::find_if(rList.begin(), rList.end(), [, , this](const auto ) { +return const_cast(this)->ImplGetTabRect(, winSize.Width(), winSize.Height()).IsInside(rPos); }); return (it != rList.end()) ? it->id() : 0; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - vcl/source vcl/unx
vcl/source/window/menu.cxx | 13 - vcl/unx/gtk3/gtk3gtksalmenu.cxx | 28 2 files changed, 36 insertions(+), 5 deletions(-) New commits: commit 4abe4e9c92641896b4a0949e8a64a231d2f41c86 Author: Caolán McNamara AuthorDate: Mon Feb 8 13:49:53 2021 + Commit: Adolfo Jayme Barrientos CommitDate: Sat Feb 13 16:16:21 2021 +0100 tdf#140225 call cancel before destroying menubar a) in case there are some menus open cancel them before removing their parent menubar b) before a GtkSalMenu is deleted clear the action-group of its members squash of... Related: tdf#140225 ignore activate/deactivate of a disposed VclMenu prep work for improved solution for tdf#140225 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110699 Tested-by: Caolán McNamara Reviewed-by: Caolán McNamara Related: tdf#140225 when clearing pItemList, keep SalMenu in sync with their removal during menu teardown Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110703 Tested-by: Jenkins Reviewed-by: Caolán McNamara Resolves: tdf#140225 remove action when item is removed from GtkSalMenu and we have previously ensured that all items are removed by Menu::dispose before GtkSalMenu dtor is called Change-Id: I9ec59c52c72b8b58976a8ee41727ca7612ebf6b1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110564 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx index eacfb865ffcd..7d4a34678ada 100644 --- a/vcl/source/window/menu.cxx +++ b/vcl/source/window/menu.cxx @@ -213,7 +213,18 @@ void Menu::dispose() bKilled = true; -pItemList->Clear(); +// tdf#140225 when clearing pItemList, keep SalMenu in sync with +// their removal during menu teardown +for (size_t n = pItemList->size(); n;) +{ +--n; +if (mpSalMenu) +mpSalMenu->RemoveItem(n); +pItemList->Remove(n); +} + +assert(!pItemList->size()); + mpLayoutData.reset(); // Native-support: destroy SalMenu diff --git a/vcl/unx/gtk3/gtk3gtksalmenu.cxx b/vcl/unx/gtk3/gtk3gtksalmenu.cxx index f78bbab0081f..3ed2487ff4f3 100644 --- a/vcl/unx/gtk3/gtk3gtksalmenu.cxx +++ b/vcl/unx/gtk3/gtk3gtksalmenu.cxx @@ -596,13 +596,15 @@ GtkSalMenu::~GtkSalMenu() { SolarMutexGuard aGuard; +// tdf#140225 we expect all items to be removed by Menu::dispose +// before this dtor is called +assert(maItems.empty()); + DestroyMenuBarWidget(); if (mpMenuModel) g_object_unref(mpMenuModel); -maItems.clear(); - if (mpFrame) mpFrame->SetMenu(nullptr); } @@ -630,6 +632,16 @@ void GtkSalMenu::InsertItem( SalMenuItem* pSalMenuItem, unsigned nPos ) void GtkSalMenu::RemoveItem( unsigned nPos ) { SolarMutexGuard aGuard; + +// tdf#140225 clear associated action when the item is removed +if (mpActionGroup) +{ +GLOActionGroup* pActionGroup = G_LO_ACTION_GROUP(mpActionGroup); +gchar* pCommand = GetCommandForItem(maItems[nPos]); +g_lo_action_group_remove(pActionGroup, pCommand); +g_free(pCommand); +} + maItems.erase( maItems.begin() + nPos ); SetNeedsUpdate(); } @@ -998,6 +1010,10 @@ void GtkSalMenu::DestroyMenuBarWidget() { if (mpMenuBarContainerWidget) { +// tdf#140225 call cancel before destroying it in case there are some +// active menus popped open +gtk_menu_shell_cancel(GTK_MENU_SHELL(mpMenuBarWidget)); + gtk_widget_destroy(mpMenuBarContainerWidget); mpMenuBarContainerWidget = nullptr; mpCloseButton = nullptr; @@ -1345,8 +1361,10 @@ void GtkSalMenu::Activate(const gchar* pCommand) { MenuAndId aMenuAndId = decode_command(pCommand); GtkSalMenu* pSalMenu = aMenuAndId.first; -GtkSalMenu* pTopLevel = pSalMenu->GetTopLevel(); Menu* pVclMenu = pSalMenu->GetMenu(); +if (pVclMenu->isDisposed()) +return; +GtkSalMenu* pTopLevel = pSalMenu->GetTopLevel(); Menu* pVclSubMenu = pVclMenu->GetPopupMenu(aMenuAndId.second); GtkSalMenu* pSubMenu = pSalMenu->GetItemAtPos(pVclMenu->GetItemPos(aMenuAndId.second))->mpSubMenu; @@ -1360,8 +1378,10 @@ void GtkSalMenu::Deactivate(const gchar* pCommand) { MenuAndId aMenuAndId = decode_command(pCommand); GtkSalMenu* pSalMenu = aMenuAndId.first; -GtkSalMenu* pTopLevel = pSalMenu->GetTopLevel(); Menu* pVclMenu = pSalMenu->GetMenu(); +if (pVclMenu->isDisposed()) +return; +GtkSalMenu* pTopLevel = pSalMenu->GetTopLevel(); Menu* pVclSubMenu = pVclMenu->GetPopupMenu(aMenuAndId.second); pTopLevel->GetMenu()->HandleMenuDeActivateEvent(pVclSubMenu); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - vcl/source
vcl/source/window/printdlg.cxx |7 --- 1 file changed, 4 insertions(+), 3 deletions(-) New commits: commit fdb2b760d9fd3b65ad54bad14a62f3c47374731e Author: Gabor Kelemen AuthorDate: Tue Jan 19 19:24:53 2021 +0100 Commit: Caolán McNamara CommitDate: Wed Jan 27 15:12:39 2021 +0100 tdf#129180 Fix default paper size in the dropdown Seems like a few calls to getJobPageSize() are necessary before the Page size list can get a correct value. This is why the problem appeared only on opening the dialog but opening/closing the printers Properties dialog fixed it. Thanks to Justin Luth for the idea! Note: for testing, change among paper sizes supported by the printer, e.g. A4, Legal and Letter. See also tdf#134646 Change-Id: I792139e274886c1b232ef97a4f1e800e6b32cf71 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109655 Tested-by: László Németh Reviewed-by: László Németh (cherry picked from commit 3c85bf2af5ae2f7b180db8f8abf2d4e997491bb9) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109979 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx index a2956b748dc1..2d5ebf2a49a8 100644 --- a/vcl/source/window/printdlg.cxx +++ b/vcl/source/window/printdlg.cxx @@ -595,9 +595,6 @@ PrintDialog::PrintDialog(weld::Window* i_pWindow, const std::shared_ptrset_size_request( mxScrolledWindow->get_preferred_size().Width() + mxScrolledWindow->get_vscroll_width(), ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - vcl/source
vcl/source/app/svapp.cxx |6 -- 1 file changed, 4 insertions(+), 2 deletions(-) New commits: commit 9e9abb0263851e691dfe5b245e1dc6df790cb467 Author: Jan-Marek Glogowski AuthorDate: Tue Jan 26 22:18:16 2021 +0100 Commit: Michael Stahl CommitDate: Wed Jan 27 11:28:31 2021 +0100 Fix crash in ProcessEventsToIdle debug code ... and that code formatting is from clang-format. Change-Id: Ia73780f5f756a8c3493d27263347190289e4c953 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/10 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski (cherry picked from commit 0c7e8ef07fe9ba7ebc95fdeb5f58275decb4f0fc) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109976 Reviewed-by: Michael Stahl diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx index f91375e77edd..676fa26e1038 100644 --- a/vcl/source/app/svapp.cxx +++ b/vcl/source/app/svapp.cxx @@ -487,8 +487,10 @@ void Scheduler::ProcessEventsToIdle() Idle *pIdle = dynamic_cast(pSchedulerData->mpTask); if (pIdle && pIdle->IsActive()) { -SAL_WARN("vcl.schedule", "Unprocessed Idle: " - << pIdle << " " << pIdle->GetDebugName()); +SAL_WARN("vcl.schedule", + "Unprocessed Idle: " + << pIdle << " " + << (pIdle->GetDebugName() ? pIdle->GetDebugName() : "(nullptr)")); } } pSchedulerData = pSchedulerData->mpNext; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - vcl/source
vcl/source/control/button.cxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit fd636aa9ba27b65947c41610debc5bc8d210d66f Author: Caolán McNamara AuthorDate: Wed Jan 20 14:26:25 2021 + Commit: Adolfo Jayme Barrientos CommitDate: Fri Jan 22 14:51:43 2021 +0100 RadioButton tick in a different place than CheckBox tick since... commit 302a00a3190743f5e6d2b61e5b40e493c4744b7e Date: Thu Jun 6 17:14:53 2019 +0900 tdf#124947 fix hit area of the radio buttons, size in ios theme so under gen in tools, options, load/save, microsoft office the radio in export as: shading is much higher than the create mso lock file checkmark Change-Id: Ib057c0725352f6a178df006e92024fedf9b82b79 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109683 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx index 66a399c15bbc..37586dae6bd5 100644 --- a/vcl/source/control/button.cxx +++ b/vcl/source/control/button.cxx @@ -1996,7 +1996,6 @@ void RadioButton::ImplDraw( OutputDevice* pDev, DrawFlags nDrawFlags, rMouseRect = tools::Rectangle(aPos, aSize); rMouseRect.SetLeft(rPos.X()); -rMouseRect.SetTop(rPos.Y()); rStateRect.SetLeft( rPos.X() ); rStateRect.SetTop( rMouseRect.Top() ); @@ -3009,8 +3008,9 @@ void CheckBox::ImplDraw( OutputDevice* pDev, DrawFlags nDrawFlags, ImplDrawAlignedImage( pDev, aPos, aSize, 1, nTextStyle ); -rMouseRect = tools::Rectangle( aPos, aSize ); +rMouseRect = tools::Rectangle( aPos, aSize ); rMouseRect.SetLeft( rPos.X() ); + rStateRect.SetLeft( rPos.X() ); rStateRect.SetTop( rMouseRect.Top() ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - vcl/source
vcl/source/gdi/pdfwriter_impl.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit f1d7be7863e7d2d5aa3c3008bb9ec04780d5eb95 Author: Julien Nabet AuthorDate: Sat Jan 16 14:32:42 2021 +0100 Commit: Adolfo Jayme Barrientos CommitDate: Sun Jan 17 14:07:18 2021 +0100 tdf#139643: fix missing PDF/UA flag Regression from: https://cgit.freedesktop.org/libreoffice/core/commit/vcl/source/gdi/pdfwriter_impl.cxx?id=a795886762a6a4aabd601183598c4e6c819bcb1f author Arnaud Versini 2019-09-20 19:01:34 +0200 committer Arnaud Versini 2020-02-08 15:03:07 +0100 commit a795886762a6a4aabd601183598c4e6c819bcb1f (patch) tree93a58d738bf27a0c5f75f80dc7e651763916ee5f /vcl/source/gdi/pdfwriter_impl.cxx parent a2f62a861ba7036e689070c47f72214b1bdd49d4 (diff) Add minimum support for PDF/A3 here: sal_Int32 PDFWriterImpl::emitDocumentMetadata() { -if (!m_bIsPDF_A1 && !m_bIsPDF_A2 && !m_bIsPDF_UA) +if( !m_bIsPDF_A1 && !m_bIsPDF_A2 && !m_bIsPDF_A3 ) Change-Id: Id4b3b9a74ccf5a5abd9e7149cb09b3475dd4ffee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109399 Reviewed-by: Tomaž Vajngerl Reviewed-by: Adolfo Jayme Barrientos Tested-by: Jenkins diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index 11de3436e531..951cda0f29da 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -5237,7 +5237,7 @@ static void lcl_assignMeta(const OUString& aValue, OString& aMeta) // emits the document metadata sal_Int32 PDFWriterImpl::emitDocumentMetadata() { -if( !m_bIsPDF_A1 && !m_bIsPDF_A2 && !m_bIsPDF_A3 ) +if( !m_bIsPDF_A1 && !m_bIsPDF_A2 && !m_bIsPDF_A3 && !m_bIsPDF_UA) return 0; //get the object number for all the destinations ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - vcl/source
vcl/source/outdev/gradient.cxx |5 + 1 file changed, 5 insertions(+) New commits: commit 1ad7e5a6c67fddb39a79f62b4b5e93304f6e04b2 Author: Luboš Luňák AuthorDate: Tue Jan 5 14:09:26 2021 +0100 Commit: Adolfo Jayme Barrientos CommitDate: Mon Jan 11 01:44:59 2021 +0100 set fill color when filling alphavdev area for gradients (tdf#138959) When drawing a gradient to an alpha-enabled output device, make the area also opaque (=black in the alphavdev). Change-Id: I2ba1a598e0bf6291e5422253352a201e224af2b8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108806 Tested-by: Jenkins Reviewed-by: Luboš Luňák (cherry picked from commit 41cabebf9c95459c2c1912528446c45e70c3f203) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108906 Reviewed-by: Adolfo Jayme Barrientos diff --git a/vcl/source/outdev/gradient.cxx b/vcl/source/outdev/gradient.cxx index 0312369c959a..510502e6f5f7 100644 --- a/vcl/source/outdev/gradient.cxx +++ b/vcl/source/outdev/gradient.cxx @@ -148,7 +148,12 @@ void OutputDevice::DrawGradient( const tools::PolyPolygon& rPolyPoly, } if( mpAlphaVDev ) +{ +const Color aFillCol( mpAlphaVDev->GetFillColor() ); +mpAlphaVDev->SetFillColor( COL_BLACK ); mpAlphaVDev->DrawPolyPolygon( rPolyPoly ); +mpAlphaVDev->SetFillColor( aFillCol ); +} } void OutputDevice::ClipAndDrawGradientMetafile ( const Gradient , const tools::PolyPolygon ) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - vcl/source
vcl/source/gdi/jobset.cxx |7 +++ 1 file changed, 7 insertions(+) New commits: commit e9c9e71211de4528ca0bb000c17202ede7c6d5c6 Author: Caolán McNamara AuthorDate: Wed Dec 30 21:19:15 2020 + Commit: Noel Grandin CommitDate: Sat Jan 2 09:30:02 2021 +0100 ofz#29113 short read Change-Id: I107d8abeac419ba4e70a5880054c9195c60464ad Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108350 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/vcl/source/gdi/jobset.cxx b/vcl/source/gdi/jobset.cxx index a382dc6a062d..5777e1faa044 100644 --- a/vcl/source/gdi/jobset.cxx +++ b/vcl/source/gdi/jobset.cxx @@ -266,6 +266,13 @@ SvStream& ReadJobSetup( SvStream& rIStream, JobSetup& rJobSetup ) if ( nSystem == JOBSET_FILE364_SYSTEM || nSystem == JOBSET_FILE605_SYSTEM ) { +if (nRead < sizeof(ImplOldJobSetupData) + sizeof(Impl364JobSetupData)) +{ +SAL_WARN("vcl", "Parsing error: " << sizeof(ImplOldJobSetupData) + sizeof(Impl364JobSetupData) << + " required, but " << nRead << " available"); +return rIStream; +} + Impl364JobSetupData* pOldJobData= reinterpret_cast(pTempBuf.get() + sizeof( ImplOldJobSetupData )); sal_uInt16 nOldJobDataSize = SVBT16ToUInt16( pOldJobData->nSize ); rJobData.SetSystem( SVBT16ToUInt16( pOldJobData->nSystem ) ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - vcl/source
vcl/source/filter/jpeg/JpegReader.cxx |4 ++-- vcl/source/filter/jpeg/jpeg.h |2 +- vcl/source/filter/jpeg/jpegc.cxx |3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) New commits: commit 7fac9232088969823ebb2dbc1cde6bb9162b5475 Author: Caolán McNamara AuthorDate: Tue Dec 15 17:35:32 2020 + Commit: Caolán McNamara CommitDate: Wed Dec 16 09:41:27 2020 +0100 tdf#138950 allow up to one short read to not trigger cancelling import Change-Id: Iedbfc344c311c40244ba2f58c56c62ac47584028 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107713 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/vcl/source/filter/jpeg/JpegReader.cxx b/vcl/source/filter/jpeg/JpegReader.cxx index b0681709eb2a..80e956925c2b 100644 --- a/vcl/source/filter/jpeg/JpegReader.cxx +++ b/vcl/source/filter/jpeg/JpegReader.cxx @@ -47,7 +47,7 @@ static void init_source (j_decompress_ptr cinfo) * This is correct behavior for reading a series of images from one source. */ source->start_of_file = TRUE; -source->no_data_available = FALSE; +source->no_data_available_failures = 0; } } @@ -86,7 +86,7 @@ static boolean fill_input_buffer (j_decompress_ptr cinfo) if (!nbytes) { -source->no_data_available = TRUE; +source->no_data_available_failures++; if (source->start_of_file) /* Treat empty input file as fatal error */ { ERREXIT(cinfo, JERR_INPUT_EMPTY); diff --git a/vcl/source/filter/jpeg/jpeg.h b/vcl/source/filter/jpeg/jpeg.h index 8a8e757a9719..fb28e78ee7e2 100644 --- a/vcl/source/filter/jpeg/jpeg.h +++ b/vcl/source/filter/jpeg/jpeg.h @@ -59,7 +59,7 @@ struct SourceManagerStruct { SvStream* stream; /* source stream */ JOCTET* buffer; /* start of buffer */ boolean start_of_file; /* have we gotten any data yet? */ -boolean no_data_available; +int no_data_available_failures; }; #endif diff --git a/vcl/source/filter/jpeg/jpegc.cxx b/vcl/source/filter/jpeg/jpegc.cxx index 4718ec94560c..8807927a8ebc 100644 --- a/vcl/source/filter/jpeg/jpegc.cxx +++ b/vcl/source/filter/jpeg/jpegc.cxx @@ -273,7 +273,8 @@ static void ReadJPEG(JpegStuff& rContext, JPEGReader* pJPEGReader, void* pInputS rContext.pCYMKBuffer.resize(nWidth * 4); } -for (*pLines = 0; *pLines < nHeight && !source->no_data_available; (*pLines)++) +// tdf#138950 allow up to one short read (no_data_available_failures <= 1) to not trigger cancelling import +for (*pLines = 0; *pLines < nHeight && source->no_data_available_failures <= 1; (*pLines)++) { size_t yIndex = *pLines; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - vcl/source
vcl/source/window/menu.cxx |7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) New commits: commit 3d00e399f0ad00b9e3b7084d5b907f25ae8698c1 Author: Caolán McNamara AuthorDate: Fri Dec 11 11:26:19 2020 + Commit: Caolán McNamara CommitDate: Fri Dec 11 14:53:45 2020 +0100 tdf#76644 extended tips not shown for 'gen' menu items since... commit d7fe5ab30ca9df722eec33d428baedd258075eac Date: Thu Aug 1 11:23:58 2013 +0200 convert vcl/menu.hxx from XubString to OUString (second attempt) probably currently only useful with HELP_DEBUG=1 Change-Id: I66e94e57e117d4e1d83f132a82377b28d3674d86 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107547 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx index 1f13715a5e7f..eacfb865ffcd 100644 --- a/vcl/source/window/menu.cxx +++ b/vcl/source/window/menu.cxx @@ -1086,7 +1086,10 @@ OUString Menu::ImplGetHelpText( sal_uInt16 nItemId ) const { MenuItemData* pData = pItemList->GetData( nItemId ); -if ( pData && pData->aHelpText.isEmpty() && +if (!pData) +return OUString(); + +if ( pData->aHelpText.isEmpty() && (( !pData->aHelpId.isEmpty() ) || ( !pData->aCommandStr.isEmpty() ))) { Help* pHelp = Application::GetHelp(); @@ -1099,7 +1102,7 @@ OUString Menu::ImplGetHelpText( sal_uInt16 nItemId ) const } } -return OUString(); +return pData->aHelpText; } OUString Menu::GetHelpText( sal_uInt16 nItemId ) const ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - vcl/source
vcl/source/bitmap/bitmappaint.cxx | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) New commits: commit da71f806ad09ace88c509a9af7346f0e3f29b744 Author: Caolán McNamara AuthorDate: Wed Dec 9 19:50:02 2020 + Commit: Caolán McNamara CommitDate: Thu Dec 10 10:36:24 2020 +0100 tdf#138450 BitmapEx.Replace() is not working since... commit abd42bdc86904d1b310e8298393c887e0c195499 Date: Thu Nov 12 14:50:16 2020 +0200 tools::Long->sal_Int32 in vcl filters Change-Id: I4a74416547f35a9b5b3fe606de6938245d3ec6c8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107482 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/vcl/source/bitmap/bitmappaint.cxx b/vcl/source/bitmap/bitmappaint.cxx index 49713869069b..95a6b0af6a3e 100644 --- a/vcl/source/bitmap/bitmappaint.cxx +++ b/vcl/source/bitmap/bitmappaint.cxx @@ -926,12 +926,12 @@ bool Bitmap::Replace(const Color* pSearchColors, const Color* pReplaceColors, sa if (pAcc) { -std::unique_ptr pMinR(new sal_Int8[nColorCount]); -std::unique_ptr pMaxR(new sal_Int8[nColorCount]); -std::unique_ptr pMinG(new sal_Int8[nColorCount]); -std::unique_ptr pMaxG(new sal_Int8[nColorCount]); -std::unique_ptr pMinB(new sal_Int8[nColorCount]); -std::unique_ptr pMaxB(new sal_Int8[nColorCount]); +std::unique_ptr pMinR(new int[nColorCount]); +std::unique_ptr pMaxR(new int[nColorCount]); +std::unique_ptr pMinG(new int[nColorCount]); +std::unique_ptr pMaxG(new int[nColorCount]); +std::unique_ptr pMinB(new int[nColorCount]); +std::unique_ptr pMaxB(new int[nColorCount]); if (pTols) { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - vcl/source
vcl/source/gdi/salgdilayout.cxx | 12 ++-- 1 file changed, 2 insertions(+), 10 deletions(-) New commits: commit e53a3828e5fc5d71c90f66ae46db7090c6dea368 Author: Caolán McNamara AuthorDate: Thu Nov 26 14:47:34 2020 + Commit: Caolán McNamara CommitDate: Thu Nov 26 21:03:35 2020 +0100 with SAL_RTL_ENABLED=1 calc tabbar arrows are rendered reversed in... commit 6a54960f6b38a7d549ed33419cf55f4e718cf7b9 Date: Fri Jul 17 17:04:27 2020 +0100 tdf#134085 DrawTransformedBitmap in wrong place for RTL The return of mirror wasn't used, so no effort at a rtl mirror was made anyway. I confidently claimed that "we don't want to mirror polygons", and we definitely don't want to mirror images which was the immediately obvious problem there. It was also the case that the highlight polygons drawn there were missing entirely and the changes improved matters and put those polygons at the correct position. But it does seem that we *do* want to mirror polygons. Since... commit 4deadc3c78949c18bb886eb1f66caa8f3cd7a2df Date: Fri Sep 25 13:30:11 2020 +0200 disentangle AA and B2D use in VCL drawing this path has become more used and makes it obvious that the triangles in the tabbar buttons are reversed since the second commit. Change-Id: Id709b2abff04c609a3c644530bcdb60c83a82942 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106682 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/vcl/source/gdi/salgdilayout.cxx b/vcl/source/gdi/salgdilayout.cxx index 5878ebdd8e73..89089d9755a2 100644 --- a/vcl/source/gdi/salgdilayout.cxx +++ b/vcl/source/gdi/salgdilayout.cxx @@ -469,12 +469,8 @@ bool SalGraphics::DrawPolyPolygon( const basegfx::B2DHomMatrix& rMirror(getMirror(i_pOutDev)); if(!rMirror.isIdentity()) { -basegfx::B2DRange aBoundingBox(i_rPolyPolygon.getB2DRange()); -aBoundingBox *= rObjectToDevice; -auto aTranslateToMirroredBounds = createTranslateToMirroredBounds(aBoundingBox, rMirror); - return drawPolyPolygon( -aTranslateToMirroredBounds * rObjectToDevice, +rMirror * rObjectToDevice, i_rPolyPolygon, i_fTransparency); } @@ -558,12 +554,8 @@ bool SalGraphics::DrawPolyLine( const basegfx::B2DHomMatrix& rMirror(getMirror(i_pOutDev)); if(!rMirror.isIdentity()) { -basegfx::B2DRange aBoundingBox(i_rPolygon.getB2DRange()); -aBoundingBox *= rObjectToDevice; -auto aTranslateToMirroredBounds = createTranslateToMirroredBounds(aBoundingBox, rMirror); - return drawPolyLine( -aTranslateToMirroredBounds * rObjectToDevice, +rMirror * rObjectToDevice, i_rPolygon, i_fTransparency, i_rLineWidth, ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits