download.lst | 4 - drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx | 10 +++ external/cairo/ExternalPackage_pixman.mk | 2 external/cairo/ExternalProject_pixman.mk | 2 external/cairo/pixman/pixman-0.24.4.patch | 2 external/cairo/pixman/pixman-ubsan.patch | 41 ++++++------- sc/qa/unit/data/ods/tdf152081_UndoHideColsWithNotes.ods |binary sc/qa/unit/scshapetest.cxx | 36 +++++++++++ sc/source/core/data/drwlayer.cxx | 2 vcl/win/window/salframe.cxx | 8 +- 10 files changed, 80 insertions(+), 27 deletions(-)
New commits: commit fa98397842f42a9741f1e6b110d7feebec994e3d Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Fri Dec 2 12:26:42 2022 +0000 Commit: Adolfo Jayme Barrientos <fit...@ubuntu.com> CommitDate: Fri Dec 2 15:35:56 2022 +0000 Resolves: tdf#152284 pull Shadow and DarkShadow from theme Change-Id: Idd5031aa2744d5b04f9f656fcab9fe6f21e2ddcb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143595 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fit...@ubuntu.com> diff --git a/vcl/win/window/salframe.cxx b/vcl/win/window/salframe.cxx index 8d0a632c8f6a..36b7fb7a9875 100644 --- a/vcl/win/window/salframe.cxx +++ b/vcl/win/window/salframe.cxx @@ -2678,6 +2678,10 @@ void WinSalFrame::UpdateSettings( AllSettings& rSettings ) GetThemeColor(hTheme, 0, 0, TMT_TEXTCOLOR, &color); aStyleSettings.SetWindowTextColor( ImplWinColorToSal( color ) ); aStyleSettings.SetToolTextColor( ImplWinColorToSal( color ) ); + GetThemeColor(hTheme, 0, 0, TMT_SHADOWCOLOR, &color); + aStyleSettings.SetShadowColor( ImplWinColorToSal( color ) ); + GetThemeColor(hTheme, 0, 0, TMT_DKSHADOW3D, &color); + aStyleSettings.SetDarkShadowColor( ImplWinColorToSal( color ) ); CloseThemeData(hTheme); hTheme = OpenThemeData(mhWnd, L"Button"); @@ -2706,6 +2710,8 @@ void WinSalFrame::UpdateSettings( AllSettings& rSettings ) aStyleSettings.SetWindowColor( ImplWinColorToSal( GetSysColor( COLOR_WINDOW ) ) ); aStyleSettings.SetWindowTextColor( ImplWinColorToSal( GetSysColor( COLOR_WINDOWTEXT ) ) ); aStyleSettings.SetToolTextColor( ImplWinColorToSal( GetSysColor( COLOR_WINDOWTEXT ) ) ); + aStyleSettings.SetShadowColor( ImplWinColorToSal( GetSysColor( COLOR_3DSHADOW ) ) ); + aStyleSettings.SetDarkShadowColor( ImplWinColorToSal( GetSysColor( COLOR_3DDKSHADOW ) ) ); aControlTextColor = ImplWinColorToSal(GetSysColor(COLOR_BTNTEXT)); aStyleSettings.SetRadioCheckTextColor( ImplWinColorToSal( GetSysColor( COLOR_WINDOWTEXT ) ) ); aStyleSettings.SetMenuTextColor( ImplWinColorToSal( GetSysColor( COLOR_MENUTEXT ) ) ); @@ -2725,8 +2731,6 @@ void WinSalFrame::UpdateSettings( AllSettings& rSettings ) aStyleSettings.SetInactiveTabColor( aStyleSettings.GetFaceColor() ); aStyleSettings.SetLightColor( ImplWinColorToSal( GetSysColor( COLOR_3DHILIGHT ) ) ); aStyleSettings.SetLightBorderColor( ImplWinColorToSal( GetSysColor( COLOR_3DLIGHT ) ) ); - aStyleSettings.SetShadowColor( ImplWinColorToSal( GetSysColor( COLOR_3DSHADOW ) ) ); - aStyleSettings.SetDarkShadowColor( ImplWinColorToSal( GetSysColor( COLOR_3DDKSHADOW ) ) ); aStyleSettings.SetHelpColor( ImplWinColorToSal( GetSysColor( COLOR_INFOBK ) ) ); aStyleSettings.SetHelpTextColor( ImplWinColorToSal( GetSysColor( COLOR_INFOTEXT ) ) ); commit 7e2457cbd835f86112e3a94f60d58de201aad20d Author: Taichi Haradaguchi <20001...@ymail.ne.jp> AuthorDate: Mon Nov 28 21:04:45 2022 +0900 Commit: Michael Stahl <michael.st...@allotropia.de> CommitDate: Fri Dec 2 10:04:51 2022 +0000 pixman: upgrade to release 0.42.2 Fixes CVE-2022-44638 Remove Wincompatible-function-pointer-types.patch.0, fixed upstream. Change-Id: If6589a701a252f71da145264ee3a6f0e333492ae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143423 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.st...@allotropia.de> (cherry picked from commit 93a69d37c1dbcc7365dc0cf2493d1ca27babef2b) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143439 diff --git a/download.lst b/download.lst index 36259689d9e8..ef51c87192e0 100644 --- a/download.lst +++ b/download.lst @@ -204,8 +204,8 @@ export PAGEMAKER_SHA256SUM := 66adacd705a7d19895e08eac46d1e851332adf2e736c566bef export PAGEMAKER_TARBALL := libpagemaker-0.0.4.tar.xz export PDFIUM_SHA256SUM := eaf4ce9fad32b5d951c524139df23119b66c67720057defb97acab2dfb2582ac export PDFIUM_TARBALL := pdfium-5058.tar.bz2 -export PIXMAN_SHA256SUM := 6d200dec3740d9ec4ec8d1180e25779c00bc749f94278c8b9021f5534db223fc -export PIXMAN_TARBALL := pixman-0.40.0.tar.gz +export PIXMAN_SHA256SUM := ea1480efada2fd948bc75366f7c349e1c96d3297d09a3fe62626e38e234a625e +export PIXMAN_TARBALL := pixman-0.42.2.tar.gz export LIBPNG_SHA256SUM := b3683e8b8111ebf6f1ac004ebb6b0c975cd310ec469d98364388e9cedbfa68be export LIBPNG_TARBALL := libpng-1.6.38.tar.xz export LIBTIFF_SHA256SUM := 49307b510048ccc7bc40f2cba6e8439182fe6e654057c1a1683139bf2ecb1dc1 diff --git a/external/cairo/ExternalPackage_pixman.mk b/external/cairo/ExternalPackage_pixman.mk index 458c2733503e..85ff062f22e2 100644 --- a/external/cairo/ExternalPackage_pixman.mk +++ b/external/cairo/ExternalPackage_pixman.mk @@ -12,7 +12,7 @@ $(eval $(call gb_ExternalPackage_ExternalPackage,pixman,pixman)) $(eval $(call gb_ExternalPackage_use_external_project,pixman,pixman)) ifneq ($(DISABLE_DYNLOADING),TRUE) -$(eval $(call gb_ExternalPackage_add_file,pixman,$(LIBO_LIB_FOLDER)/libpixman-1.so.0,pixman/.libs/libpixman-1.so.0.40.0)) +$(eval $(call gb_ExternalPackage_add_file,pixman,$(LIBO_LIB_FOLDER)/libpixman-1.so.0,pixman/.libs/libpixman-1.so.0.42.2)) endif # vim: set noet sw=4 ts=4: diff --git a/external/cairo/ExternalProject_pixman.mk b/external/cairo/ExternalProject_pixman.mk index 39d5beecf993..9293b9234013 100644 --- a/external/cairo/ExternalProject_pixman.mk +++ b/external/cairo/ExternalProject_pixman.mk @@ -25,7 +25,7 @@ $(call gb_ExternalProject_get_state_target,pixman,build) : $(call gb_ExternalProject_run,build,\ $(gb_RUN_CONFIGURE) ./configure \ $(if $(filter TRUE,$(DISABLE_DYNLOADING)),--disable-shared,--disable-static) \ - $(if $(filter ANDROID,$(OS)),--disable-arm-simd --disable-arm-neon --disable-arm-iwmmxt) \ + $(if $(filter ANDROID,$(OS)),--disable-arm-simd --disable-arm-neon --disable-arm-a64-neon --disable-arm-iwmmxt) \ $(gb_CONFIGURE_PLATFORMS) \ $(if $(CROSS_COMPILING),$(if $(filter INTEL ARM,$(CPUNAME)),ac_cv_c_bigendian=no)) \ $(if $(filter EMSCRIPTEN,$(OS)),CFLAGS="-pthread") \ diff --git a/external/cairo/pixman/pixman-0.24.4.patch b/external/cairo/pixman/pixman-0.24.4.patch index 6d871e37bfd1..a5d32f88f82f 100644 --- a/external/cairo/pixman/pixman-0.24.4.patch +++ b/external/cairo/pixman/pixman-0.24.4.patch @@ -1,6 +1,6 @@ --- misc/pixman-0.24.4/Makefile.in 2011-11-06 22:11:25.000000000 +0100 +++ misc/build/pixman-0.24.4/Makefile.in 2011-12-16 09:06:45.317211035 +0100 -@@ -272,7 +272,7 @@ +@@ -385,7 +385,7 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ diff --git a/external/cairo/pixman/pixman-ubsan.patch b/external/cairo/pixman/pixman-ubsan.patch index 3a556d19a9dd..64e5778ee4d4 100644 --- a/external/cairo/pixman/pixman-ubsan.patch +++ b/external/cairo/pixman/pixman-ubsan.patch @@ -1,6 +1,6 @@ -diff -ru pixman-0.40.0.orig/pixman/pixman-bits-image.c pixman-0.40.0/pixman/pixman-bits-image.c ---- misc/pixman-0.40.0.orig/pixman/pixman-bits-image.c 2021-08-29 20:02:33.714515016 +0100 -+++ misc/build/pixman-0.40.0/pixman/pixman-bits-image.c 2021-08-29 20:05:43.304930185 +0100 +diff -ru pixman-0.42.2.orig/pixman/pixman-bits-image.c pixman-0.42.2/pixman/pixman-bits-image.c +--- misc/pixman-0.42.2.orig/pixman/pixman-bits-image.c 2022-11-03 02:25:48.000000000 +0900 ++++ misc/build/pixman-0.42.2/pixman/pixman-bits-image.c 2022-11-28 21:35:25.896969126 +0900 @@ -351,8 +351,8 @@ * positioned relative to a particular phase (and not relative to whatever * exact fraction we happen to get here). @@ -12,9 +12,9 @@ diff -ru pixman-0.40.0.orig/pixman/pixman-bits-image.c pixman-0.40.0/pixman/pixm px = (x & 0xffff) >> x_phase_shift; py = (y & 0xffff) >> y_phase_shift; -diff -ru pixman-0.40.0.orig/pixman/pixman-combine32.c pixman-0.40.0/pixman/pixman-combine32.c ---- misc/pixman-0.40.0.orig/pixman/pixman-combine32.c 2021-08-29 20:02:33.715514970 +0100 -+++ misc/build/pixman-0.40.0/pixman/pixman-combine32.c 2021-08-29 20:05:43.304930185 +0100 +diff -ru pixman-0.42.2.orig/pixman/pixman-combine32.c pixman-0.42.2/pixman/pixman-combine32.c +--- misc/pixman-0.42.2.orig/pixman/pixman-combine32.c 2022-02-02 05:51:25.000000000 +0900 ++++ misc/build/pixman-0.42.2/pixman/pixman-combine32.c 2022-11-28 21:38:48.226968594 +0900 @@ -589,7 +589,7 @@ rg = DIV_ONE_UN8 (rg); \ rb = DIV_ONE_UN8 (rb); \ @@ -24,9 +24,9 @@ diff -ru pixman-0.40.0.orig/pixman/pixman-combine32.c pixman-0.40.0/pixman/pixma } \ } \ \ -diff -ru pixman-0.40.0.orig/pixman/pixman-fast-path.c pixman-0.40.0/pixman/pixman-fast-path.c ---- misc/pixman-0.40.0.orig/pixman/pixman-fast-path.c 2021-08-29 20:02:33.716514925 +0100 -+++ misc/build/pixman-0.40.0/pixman/pixman-fast-path.c 2021-08-29 20:05:43.303930231 +0100 +diff -ru pixman-0.42.2.orig/pixman/pixman-fast-path.c pixman-0.42.2/pixman/pixman-fast-path.c +--- misc/pixman-0.42.2.orig/pixman/pixman-fast-path.c 2022-10-18 02:47:42.000000000 +0900 ++++ misc/build/pixman-0.42.2/pixman/pixman-fast-path.c 2022-11-28 21:53:12.596963317 +0900 @@ -2758,8 +2758,8 @@ * positioned relative to a particular phase (and not relative to whatever * exact fraction we happen to get here). @@ -38,19 +38,22 @@ diff -ru pixman-0.40.0.orig/pixman/pixman-fast-path.c pixman-0.40.0/pixman/pixma px = (x & 0xffff) >> x_phase_shift; py = (y & 0xffff) >> y_phase_shift; -@@ -2836,7 +2836,7 @@ - sgtot = CLIP (sgtot, 0, 0xff); +@@ -2837,9 +2837,9 @@ sbtot = CLIP (sbtot, 0, 0xff); + #ifdef WORDS_BIGENDIAN +- buffer[k] = (satot << 0) | (srtot << 8) | (sgtot << 16) | (sbtot << 24); ++ buffer[k] = (satot << 0) | (srtot << 8) | (sgtot << 16) | ((uint32_t)sbtot << 24); + #else - buffer[k] = (satot << 24) | (srtot << 16) | (sgtot << 8) | (sbtot << 0); + buffer[k] = ((uint32_t)satot << 24) | (srtot << 16) | (sgtot << 8) | (sbtot << 0); + #endif next: - vx += ux; -diff -ru pixman-0.40.0.orig/pixman/pixman-sse2.c pixman-0.40.0/pixman/pixman-sse2.c ---- misc/pixman-0.40.0.orig/pixman/pixman-sse2.c 2021-08-29 20:02:33.716514925 +0100 -+++ misc/build/pixman-0.40.0/pixman/pixman-sse2.c 2021-08-29 20:05:43.306930095 +0100 -@@ -3344,7 +3344,7 @@ +diff -ru pixman-0.42.2.orig/pixman/pixman-sse2.c pixman-0.42.2/pixman/pixman-sse2.c +--- misc/pixman-0.42.2/pixman/pixman-sse2.c 2022-02-02 05:51:25.000000000 +0900 ++++ misc/build/pixman-0.42.2/pixman/pixman-sse2.c 2022-11-28 22:11:19.276969466 +0900 +@@ -3345,7 +3345,7 @@ b = filler & 0xff; w = (b << 8) | b; @@ -59,9 +62,9 @@ diff -ru pixman-0.40.0.orig/pixman/pixman-sse2.c pixman-0.40.0/pixman/pixman-sse } else if (bpp == 16) { -diff -ru pixman-0.40.0.orig/pixman/pixman-utils.c pixman-0.40.0/pixman/pixman-utils.c ---- misc/pixman-0.40.0.orig/pixman/pixman-utils.c 2021-08-29 20:02:33.715514970 +0100 -+++ misc/build/pixman-0.40.0/pixman/pixman-utils.c 2021-08-29 20:05:43.306930095 +0100 +diff -ru pixman-0.42.2.orig/pixman/pixman-utils.c pixman-0.42.2/pixman/pixman-utils.c +--- misc/pixman-0.42.2.orig/pixman/pixman-utils.c 2022-02-02 05:51:25.000000000 +0900 ++++ misc/build/pixman-0.42.2/pixman/pixman-utils.c 2022-11-28 21:55:44.196964912 +0900 @@ -213,7 +213,7 @@ g = float_to_unorm (src[i].g, 8); b = float_to_unorm (src[i].b, 8); commit e42b39389dd4a9cb7e98c27e032c8d663a1ac95f Author: Balazs Varga <balazs.varga.ext...@allotropia.de> AuthorDate: Fri Nov 25 14:03:45 2022 +0100 Commit: Michael Stahl <michael.st...@allotropia.de> CommitDate: Fri Dec 2 09:50:38 2022 +0000 Related: tdf#46444 tdf#152081 sc: add unit test for note hiding Add unit test for column hiding with notes and undo that. Change-Id: I880ca1565dbefea5e8776b0d137da409ce816ac1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143299 Tested-by: Jenkins Reviewed-by: Balazs Varga <balazs.varga.ext...@allotropia.de> (cherry picked from commit c9807faad6a154b57a99adfdf9b02bd9e588250f) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143266 Reviewed-by: Michael Stahl <michael.st...@allotropia.de> diff --git a/sc/qa/unit/data/ods/tdf152081_UndoHideColsWithNotes.ods b/sc/qa/unit/data/ods/tdf152081_UndoHideColsWithNotes.ods new file mode 100644 index 000000000000..6d2b480db7b6 Binary files /dev/null and b/sc/qa/unit/data/ods/tdf152081_UndoHideColsWithNotes.ods differ diff --git a/sc/qa/unit/scshapetest.cxx b/sc/qa/unit/scshapetest.cxx index 8417d0bf51b9..4abdda237a31 100644 --- a/sc/qa/unit/scshapetest.cxx +++ b/sc/qa/unit/scshapetest.cxx @@ -63,6 +63,7 @@ public: void testLoadVerticalFlip(); void testTdf117948_CollapseBeforeShape(); void testTdf137355_UndoHideRows(); + void testTdf152081_UndoHideColsWithNotes(); void testTdf115655_HideDetail(); void testFitToCellSize(); void testCustomShapeCellAnchoredRotatedShape(); @@ -90,6 +91,7 @@ public: CPPUNIT_TEST(testLoadVerticalFlip); CPPUNIT_TEST(testTdf117948_CollapseBeforeShape); CPPUNIT_TEST(testTdf137355_UndoHideRows); + CPPUNIT_TEST(testTdf152081_UndoHideColsWithNotes); CPPUNIT_TEST(testTdf115655_HideDetail); CPPUNIT_TEST(testFitToCellSize); CPPUNIT_TEST(testCustomShapeCellAnchoredRotatedShape); @@ -1108,6 +1110,40 @@ void ScShapeTest::testTdf137355_UndoHideRows() pDocSh->DoClose(); } +void ScShapeTest::testTdf152081_UndoHideColsWithNotes() +{ + OUString aFileURL; + createFileURL(u"tdf152081_UndoHideColsWithNotes.ods", aFileURL); + uno::Reference<css::lang::XComponent> xComponent = loadFromDesktop(aFileURL); + + // Get document and shape + ScDocShell* pDocSh = lcl_getScDocShellWithAssert(xComponent); + ScDocument& rDoc = pDocSh->GetDocument(); + SdrObject* pObj = lcl_getSdrObjectWithAssert(rDoc, 0); + + CPPUNIT_ASSERT_MESSAGE("Load: Note object should be visible", pObj->IsVisible()); + + // Hide column B + uno::Sequence<beans::PropertyValue> aPropertyValues = { + comphelper::makePropertyValue("ToPoint", OUString("$B$2:$B$2")), + }; + dispatchCommand(xComponent, ".uno:GoToCell", aPropertyValues); + ScTabViewShell* pViewShell = lcl_getScTabViewShellWithAssert(pDocSh); + pViewShell->GetViewData().GetDispatcher().Execute(FID_COL_HIDE); + + // Check object is invisible + CPPUNIT_ASSERT_MESSAGE("Hide: Note object should be invisible", !pObj->IsVisible()); + + // Undo + pViewShell->GetViewData().GetDispatcher().Execute(SID_UNDO); + + // Check object is visible + CPPUNIT_ASSERT_MESSAGE("Undo: Note object should exist", pObj); + CPPUNIT_ASSERT_MESSAGE("Undo: Note object should be visible", pObj->IsVisible()); + + pDocSh->DoClose(); +} + void ScShapeTest::testTdf115655_HideDetail() { // The document contains an image inside a cell anchored "To Cell (resize with cell)". The cell diff --git a/sc/source/core/data/drwlayer.cxx b/sc/source/core/data/drwlayer.cxx index 295593712c7f..3f41a017e3ec 100644 --- a/sc/source/core/data/drwlayer.cxx +++ b/sc/source/core/data/drwlayer.cxx @@ -1033,7 +1033,7 @@ void ScDrawLayer::RecalcPos( SdrObject* pObj, ScDrawObjData& rData, bool bNegati additional boolean stating if the cells are already moved. */ /* tdf #152081 Do not change hidden objects. That would produce zero height or width and loss of caption.*/ - if (pObj->IsVisible() && bUpdateNoteCaptionPos) + if (bUpdateNoteCaptionPos && pObj->IsVisible()) { /* When inside an undo action, there may be pending note captions where cell note is already deleted (thus document cannot find commit e705a0e56b4f81688e33627be45b2783b4cfd0d6 Author: Armin Le Grand (allotropia) <armin.le.grand.ext...@allotropia.de> AuthorDate: Wed Nov 30 17:12:59 2022 +0100 Commit: Armin Le Grand <armin.le.gr...@me.com> CommitDate: Fri Dec 2 09:22:42 2022 +0000 Handle PolyPolygonGraphicPrimitive2D with used DefinitionRange correctly If the range which defines the bitmap fill is defined and different from the range of the defining geometry (e.g. used for FillStyle UseSlideBackground) this cannot be expressed in a SvtGraphicFill data package. Thus, just use decomposition here directly. See also tdf#149754 in drawinglayer/source/processor2d/vclpixelprocessor2d.cxx and the comment there for more info. Change-Id: I8e1b26fb2bf523e6fd7af1040166f8197747e7ea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143503 Tested-by: Jenkins Reviewed-by: Armin Le Grand <armin.le.gr...@me.com> (cherry picked from commit 082f0b250a04e16d608ce67e08e702874f390b15) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143449 diff --git a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx index 32032a9d577c..1dcc486021c1 100644 --- a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx +++ b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx @@ -1755,6 +1755,16 @@ void VclMetafileProcessor2D::processPolyPolygonGraphicPrimitive2D( // need to handle PolyPolygonGraphicPrimitive2D here to support XPATHFILL_SEQ_BEGIN/XPATHFILL_SEQ_END basegfx::B2DPolyPolygon aLocalPolyPolygon(rBitmapCandidate.getB2DPolyPolygon()); + if (!rBitmapCandidate.getDefinitionRange().isEmpty() + && aLocalPolyPolygon.getB2DRange() != rBitmapCandidate.getDefinitionRange()) + { + // The range which defines the bitmap fill is defined and different from the + // range of the defining geometry (e.g. used for FillStyle UseSlideBackground). + // This cannot be done calling vcl, thus use decomposition here directly + process(rBitmapCandidate); + return; + } + fillPolyPolygonNeededToBeSplit(aLocalPolyPolygon); std::unique_ptr<SvtGraphicFill> pSvtGraphicFill;