[Libreoffice-commits] core.git: Branch 'libreoffice-7-5' - sw/qa writerfilter/source
sw/qa/extras/ooxmlexport/data/tdf155690.docx |binary sw/qa/extras/ooxmlexport/ooxmlexport13.cxx| 47 ++ writerfilter/source/dmapper/DomainMapper_Impl.cxx |6 ++ 3 files changed, 53 insertions(+) New commits: commit 7f9f6fdd6f74d0b9c824a8a0c0384addb5c2ffe6 Author: Michael Stahl AuthorDate: Wed Jun 14 15:35:24 2023 +0200 Commit: Xisco Fauli CommitDate: Thu Jun 15 08:59:19 2023 +0200 tdf#155690 writerfilter: fix import of bookmark in table... ... at start of section. (regression from commit 2e8aad6d45c53d554ccaf26de998ede708cfc289) Change-Id: I1e0e720758b607b69645b29c46f4092264289f9e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153053 Tested-by: Jenkins Reviewed-by: Michael Stahl (cherry picked from commit 142aa77265361492e74707b08c5bcd366e7205ad) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153072 Reviewed-by: Xisco Fauli diff --git a/sw/qa/extras/ooxmlexport/data/tdf155690.docx b/sw/qa/extras/ooxmlexport/data/tdf155690.docx new file mode 100644 index ..1839862688ee Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf155690.docx differ diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx index f42b5e7f9a28..a5176b5d32e6 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx @@ -58,6 +58,53 @@ DECLARE_OOXMLEXPORT_TEST(testTdf126994_lostPageBreak, "tdf126994_lostPageBreak.d CPPUNIT_ASSERT_EQUAL_MESSAGE( "Number of Pages", 3, getPages() ); } +DECLARE_OOXMLEXPORT_TEST(testTdf155690, "tdf155690.docx") +{ +uno::Reference xBookmarksSupplier(mxComponent, uno::UNO_QUERY); +uno::Reference xBookmarks = xBookmarksSupplier->getBookmarks(); +{ +uno::Reference xMark(xBookmarks->getByName("row1_1"), uno::UNO_QUERY); +CPPUNIT_ASSERT(xMark.is()); +// the problem was that the start was after the H +CPPUNIT_ASSERT_EQUAL(OUString("Hello world"), xMark->getAnchor()->getString()); +} +{ +uno::Reference xMark(xBookmarks->getByName("row1_2"), uno::UNO_QUERY); +CPPUNIT_ASSERT(xMark.is()); +CPPUNIT_ASSERT_EQUAL(OUString("Hello world"), xMark->getAnchor()->getString()); +} +{ +uno::Reference xMark(xBookmarks->getByName("row1_3"), uno::UNO_QUERY); +CPPUNIT_ASSERT(xMark.is()); +CPPUNIT_ASSERT_EQUAL(OUString("ello world"), xMark->getAnchor()->getString()); +} +{ +uno::Reference xMark(xBookmarks->getByName("row1_4"), uno::UNO_QUERY); +CPPUNIT_ASSERT(xMark.is()); +CPPUNIT_ASSERT_EQUAL(OUString("Hello world"), xMark->getAnchor()->getString()); +} +{ +uno::Reference xMark(xBookmarks->getByName("row2_1"), uno::UNO_QUERY); +CPPUNIT_ASSERT(xMark.is()); +CPPUNIT_ASSERT_EQUAL(OUString("Hello world"), xMark->getAnchor()->getString()); +} +{ +uno::Reference xMark(xBookmarks->getByName("row2_1"), uno::UNO_QUERY); +CPPUNIT_ASSERT(xMark.is()); +CPPUNIT_ASSERT_EQUAL(OUString("Hello world"), xMark->getAnchor()->getString()); +} +{ +uno::Reference xMark(xBookmarks->getByName("row2_3"), uno::UNO_QUERY); +CPPUNIT_ASSERT(xMark.is()); +CPPUNIT_ASSERT_EQUAL(OUString("ello world"), xMark->getAnchor()->getString()); +} +{ +uno::Reference xMark(xBookmarks->getByName("row2_4"), uno::UNO_QUERY); +CPPUNIT_ASSERT(xMark.is()); +CPPUNIT_ASSERT_EQUAL(OUString("Hello world"), xMark->getAnchor()->getString()); +} +} + CPPUNIT_TEST_FIXTURE(Test, testTdf121374_sectionHF) { loadAndReload("tdf121374_sectionHF.odt"); diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index 6616407836de..7fb017154135 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -8102,6 +8102,9 @@ void DomainMapper_Impl::StartOrEndBookmark( const OUString& rId ) else { xCursor = xText->createTextCursorByRange( aBookmarkIter->second.m_xTextRange ); +} +if (!aBookmarkIter->second.m_bIsStartOfText) +{ xCursor->goRight( 1, false ); } @@ -8243,6 +8246,9 @@ void DomainMapper_Impl::startOrEndPermissionRange(sal_Int32 permissinId) else { xCursor = xText->createTextCursorByRange(aPermIter->second.m_xTextRange); +} +if (!aPermIter->second.m_bIsStartOfText) +{ xCursor->goRight(1, false); }
[Libreoffice-commits] core.git: Branch 'libreoffice-7-6' - sw/qa writerfilter/source
sw/qa/extras/ooxmlexport/data/tdf155690.docx |binary sw/qa/extras/ooxmlexport/ooxmlexport13.cxx| 47 ++ writerfilter/source/dmapper/DomainMapper_Impl.cxx |6 ++ 3 files changed, 53 insertions(+) New commits: commit b5a50e5bd31303da8c102122b2e0adf3674eee9d Author: Michael Stahl AuthorDate: Wed Jun 14 15:35:24 2023 +0200 Commit: Xisco Fauli CommitDate: Thu Jun 15 08:59:15 2023 +0200 tdf#155690 writerfilter: fix import of bookmark in table... ... at start of section. (regression from commit 2e8aad6d45c53d554ccaf26de998ede708cfc289) Change-Id: I1e0e720758b607b69645b29c46f4092264289f9e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153053 Tested-by: Jenkins Reviewed-by: Michael Stahl (cherry picked from commit 142aa77265361492e74707b08c5bcd366e7205ad) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153071 Reviewed-by: Xisco Fauli diff --git a/sw/qa/extras/ooxmlexport/data/tdf155690.docx b/sw/qa/extras/ooxmlexport/data/tdf155690.docx new file mode 100644 index ..1839862688ee Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf155690.docx differ diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx index f6c1b84fcec9..80243ba64a2d 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx @@ -58,6 +58,53 @@ DECLARE_OOXMLEXPORT_TEST(testTdf126994_lostPageBreak, "tdf126994_lostPageBreak.d CPPUNIT_ASSERT_EQUAL_MESSAGE( "Number of Pages", 3, getPages() ); } +DECLARE_OOXMLEXPORT_TEST(testTdf155690, "tdf155690.docx") +{ +uno::Reference xBookmarksSupplier(mxComponent, uno::UNO_QUERY); +uno::Reference xBookmarks = xBookmarksSupplier->getBookmarks(); +{ +uno::Reference xMark(xBookmarks->getByName("row1_1"), uno::UNO_QUERY); +CPPUNIT_ASSERT(xMark.is()); +// the problem was that the start was after the H +CPPUNIT_ASSERT_EQUAL(OUString("Hello world"), xMark->getAnchor()->getString()); +} +{ +uno::Reference xMark(xBookmarks->getByName("row1_2"), uno::UNO_QUERY); +CPPUNIT_ASSERT(xMark.is()); +CPPUNIT_ASSERT_EQUAL(OUString("Hello world"), xMark->getAnchor()->getString()); +} +{ +uno::Reference xMark(xBookmarks->getByName("row1_3"), uno::UNO_QUERY); +CPPUNIT_ASSERT(xMark.is()); +CPPUNIT_ASSERT_EQUAL(OUString("ello world"), xMark->getAnchor()->getString()); +} +{ +uno::Reference xMark(xBookmarks->getByName("row1_4"), uno::UNO_QUERY); +CPPUNIT_ASSERT(xMark.is()); +CPPUNIT_ASSERT_EQUAL(OUString("Hello world"), xMark->getAnchor()->getString()); +} +{ +uno::Reference xMark(xBookmarks->getByName("row2_1"), uno::UNO_QUERY); +CPPUNIT_ASSERT(xMark.is()); +CPPUNIT_ASSERT_EQUAL(OUString("Hello world"), xMark->getAnchor()->getString()); +} +{ +uno::Reference xMark(xBookmarks->getByName("row2_1"), uno::UNO_QUERY); +CPPUNIT_ASSERT(xMark.is()); +CPPUNIT_ASSERT_EQUAL(OUString("Hello world"), xMark->getAnchor()->getString()); +} +{ +uno::Reference xMark(xBookmarks->getByName("row2_3"), uno::UNO_QUERY); +CPPUNIT_ASSERT(xMark.is()); +CPPUNIT_ASSERT_EQUAL(OUString("ello world"), xMark->getAnchor()->getString()); +} +{ +uno::Reference xMark(xBookmarks->getByName("row2_4"), uno::UNO_QUERY); +CPPUNIT_ASSERT(xMark.is()); +CPPUNIT_ASSERT_EQUAL(OUString("Hello world"), xMark->getAnchor()->getString()); +} +} + CPPUNIT_TEST_FIXTURE(Test, testTdf121374_sectionHF) { loadAndReload("tdf121374_sectionHF.odt"); diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index 41ca8bf8d45e..f75fbf529c96 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -8344,6 +8344,9 @@ void DomainMapper_Impl::StartOrEndBookmark( const OUString& rId ) else { xCursor = xText->createTextCursorByRange( aBookmarkIter->second.m_xTextRange ); +} +if (!aBookmarkIter->second.m_bIsStartOfText) +{ xCursor->goRight( 1, false ); } @@ -8485,6 +8488,9 @@ void DomainMapper_Impl::startOrEndPermissionRange(sal_Int32 permissinId) else { xCursor = xText->createTextCursorByRange(aPermIter->second.m_xTextRange); +} +if (!aPermIter->second.m_bIsStartOfText) +{ xCursor->goRight(1, false); }
[Libreoffice-commits] core.git: Branch 'libreoffice-7-6' - sd/source
sd/source/ui/dlg/sdtreelb.cxx | 22 ++ 1 file changed, 2 insertions(+), 20 deletions(-) New commits: commit 2ce4de98f4d0226e8f7e43f8cd1b5f4b4901c230 Author: Jim Raykowski AuthorDate: Sat Jun 10 17:16:29 2023 -0800 Commit: Xisco Fauli CommitDate: Thu Jun 15 08:56:16 2023 +0200 SdNavigator: Improve unique name detection Commit ace75043781b5fe36546ec75574a14617f4feb30 added the ability to rename page and object names from the Navigator. An approach that searches entry names in the tree was used to check for unique naming. This does not guarantee uniquess as the name may already be used for an object in another view, for example, Notes view. This patch guarantees name uniqueness by checking the document model to see if an object with the name already exists. Change-Id: Iad419420d6010b94380c55b7dc71a8d4abbec784 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152843 Tested-by: Jenkins Reviewed-by: Jim Raykowski (cherry picked from commit ec60d354359067f8c5c686ef2239ee705916de43) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153018 Reviewed-by: Xisco Fauli diff --git a/sd/source/ui/dlg/sdtreelb.cxx b/sd/source/ui/dlg/sdtreelb.cxx index 45b078df0cb0..56e93bd7dfe0 100644 --- a/sd/source/ui/dlg/sdtreelb.cxx +++ b/sd/source/ui/dlg/sdtreelb.cxx @@ -783,27 +783,9 @@ IMPL_LINK(SdPageObjsTLV, EditedEntryHdl, const IterString&, rIterString, bool) return true; // If the new name is empty or not unique, start editing again. -bool bUniqueName = true; -std::unique_ptr xEntry(m_xTreeView->make_iterator()); -if (!rIterString.second.isEmpty()) -{ -if (m_xTreeView->get_iter_first(*xEntry)) -{ -do -{ -// skip self! -if (m_xTreeView->iter_compare(*xEntry, rIterString.first) != 0 && -m_xTreeView->get_text(*xEntry) == rIterString.second) -{ -bUniqueName = false; -break; -} -} while(m_xTreeView->iter_next(*xEntry)); -} -} -if (rIterString.second.isEmpty() || !bUniqueName) +if (rIterString.second.isEmpty() || m_pDoc->GetObj(rIterString.second)) { -m_xTreeView->copy_iterator(rIterString.first, *xEntry); +std::unique_ptr xEntry(m_xTreeView->make_iterator(&rIterString.first)); Application::PostUserEvent(LINK(this, SdPageObjsTLV, EditEntryAgain), xEntry.release()); return false; }
[Libreoffice-commits] core.git: Branch 'libreoffice-7-6' - oox/CppunitTest_oox_mcgr.mk oox/Module_oox.mk oox/qa oox/source
oox/CppunitTest_oox_mcgr.mk | 53 + oox/Module_oox.mk|1 oox/qa/unit/data/MCGR_FontworkColorGradient.fodp | 662 +++ oox/qa/unit/data/MCGR_FontworkColorGradient.fodt | 331 +++ oox/qa/unit/export.cxx | 80 +- oox/qa/unit/mcgr.cxx | 73 ++ oox/source/drawingml/fontworkhelpers.cxx | 314 ++ 7 files changed, 1236 insertions(+), 278 deletions(-) New commits: commit 4b1f2e3b7fb106091873dc59dd756473a78363da Author: Regina Henschel AuthorDate: Sat Jun 10 19:09:34 2023 +0200 Commit: Xisco Fauli CommitDate: Thu Jun 15 08:55:47 2023 +0200 MCGR: Use BGradient in export of Fontwork to docx too Transparency values are not exactly like in UI because converting through rgb-color adds rounding inaccuracy. The unit tests are adjusted accordingly. With only start and end values it was possible to use the UI values directly. It would be possible to make special cases for front and back value, but I think it is not worth the effort. The previous solution had the error, that the stops were not mirrored in case of non linear gradient. That is corrected now. The unit tests are adjusted. The previous solution had assumed that our 'intensity' at start or end colors is the same as the 'lumMod' attribute in OOXML. However, this is not the case. So now the 'intensity' is incorporated into the color. Again, the unit tests are adjusted. Change-Id: Id02e455dc09d12c5b453637fcb2bdc4f8f1529d1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152839 Tested-by: Jenkins Reviewed-by: Regina Henschel (cherry picked from commit 0028c2311ca14669ca530cd4db422cd3cf9438ca) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153019 Reviewed-by: Xisco Fauli diff --git a/oox/CppunitTest_oox_mcgr.mk b/oox/CppunitTest_oox_mcgr.mk new file mode 100644 index ..ea7692e161fc --- /dev/null +++ b/oox/CppunitTest_oox_mcgr.mk @@ -0,0 +1,53 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +#* +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# +#* + +$(eval $(call gb_CppunitTest_CppunitTest,oox_mcgr)) + +$(eval $(call gb_CppunitTest_use_externals,oox_mcgr,\ + boost_headers \ + libxml2 \ +)) + +$(eval $(call gb_CppunitTest_add_exception_objects,oox_mcgr, \ +oox/qa/unit/mcgr \ +)) + +$(eval $(call gb_CppunitTest_use_libraries,oox_mcgr, \ +comphelper \ +cppu \ +cppuhelper \ +oox \ +sal \ +subsequenttest \ +test \ +unotest \ +utl \ +tl \ +)) + +$(eval $(call gb_CppunitTest_use_sdk_api,oox_mcgr)) + +$(eval $(call gb_CppunitTest_use_ure,oox_mcgr)) +$(eval $(call gb_CppunitTest_use_vcl,oox_mcgr)) + +$(eval $(call gb_CppunitTest_use_rdb,oox_mcgr,services)) + +$(eval $(call gb_CppunitTest_use_custom_headers,oox_mcgr,\ + officecfg/registry \ +)) + +$(eval $(call gb_CppunitTest_use_configuration,oox_mcgr)) + +$(eval $(call gb_CppunitTest_add_arguments,oox_mcgr, \ + -env:arg-env=$(gb_Helper_LIBRARY_PATH_VAR)"{$(gb_Helper_LIBRARY_PATH_VAR)+=$(gb_Helper_LIBRARY_PATH_VAR)}" \ +)) + +# vim: set noet sw=4 ts=4: diff --git a/oox/Module_oox.mk b/oox/Module_oox.mk index f868a126a61c..dc07ab913c56 100644 --- a/oox/Module_oox.mk +++ b/oox/Module_oox.mk @@ -34,6 +34,7 @@ $(eval $(call gb_Module_add_check_targets,oox,\ CppunitTest_oox_vml \ CppunitTest_oox_shape \ CppunitTest_oox_export \ +CppunitTest_oox_mcgr \ )) endif diff --git a/oox/qa/unit/data/MCGR_FontworkColorGradient.fodp b/oox/qa/unit/data/MCGR_FontworkColorGradient.fodp new file mode 100644 index ..e82401442c05 --- /dev/null +++ b/oox/qa/unit/data/MCGR_FontworkColorGradient.fodp @@ -0,0 +1,662 @@ + + +http://openoffice.org/2004/office"; xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:xlink="http://www.w3.org/1999/xlink"; xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:dc="http://purl.org/dc/elements/1.1/"; xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:rpt="http://openoffice.org/2005/report"; xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:t
[Libreoffice-commits] core.git: Branch 'libreoffice-7-6' - basegfx/source drawinglayer/source include/basegfx svgio/inc svgio/qa svgio/source
basegfx/source/color/bcolormodifier.cxx | 74 +++ drawinglayer/source/tools/primitive2dxmldump.cxx | 12 ++- include/basegfx/color/bcolormodifier.hxx | 40 svgio/inc/svgfecolormatrixnode.hxx |6 + svgio/inc/svgtoken.hxx |1 svgio/qa/cppunit/SvgImportTest.cxx | 21 +- svgio/qa/cppunit/data/filterSaturate.svg | 11 +++ svgio/source/svgreader/svgfecolormatrixnode.cxx | 29 - svgio/source/svgreader/svgtoken.cxx |2 9 files changed, 183 insertions(+), 13 deletions(-) New commits: commit 593a428b901dd1473b850e56d1e3d898ca229d00 Author: Xisco Fauli AuthorDate: Wed Jun 14 12:39:06 2023 +0200 Commit: Xisco Fauli CommitDate: Thu Jun 15 08:53:23 2023 +0200 tdf#155735: Add support for saturate type Add getModifierName to BColorModifier class so when can assert which modifier is being used Change-Id: I2bc2a36470a449df4dc84a8440f232149c1f8278 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153048 Tested-by: Jenkins Reviewed-by: Xisco Fauli (cherry picked from commit 41bf4139cab36984cff514bfdd6b1b13576746a3) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153076 diff --git a/basegfx/source/color/bcolormodifier.cxx b/basegfx/source/color/bcolormodifier.cxx index f27ffcc9aaf0..2067257015b4 100644 --- a/basegfx/source/color/bcolormodifier.cxx +++ b/basegfx/source/color/bcolormodifier.cxx @@ -45,6 +45,11 @@ namespace basegfx return ::basegfx::BColor(fLuminance, fLuminance, fLuminance); } +OUString BColorModifier_gray::getModifierName() const +{ +return "gray"; +} + BColorModifier_invert::~BColorModifier_invert() { } @@ -59,6 +64,11 @@ namespace basegfx return ::basegfx::BColor(1.0 - aSourceColor.getRed(), 1.0 - aSourceColor.getGreen(), 1.0 - aSourceColor.getBlue()); } +OUString BColorModifier_invert::getModifierName() const +{ +return "invert"; +} + BColorModifier_luminance_to_alpha::~BColorModifier_luminance_to_alpha() { } @@ -75,6 +85,11 @@ namespace basegfx return ::basegfx::BColor(fAlpha, fAlpha, fAlpha); } +OUString BColorModifier_luminance_to_alpha::getModifierName() const +{ +return "luminance_to_alpha"; +} + BColorModifier_replace::~BColorModifier_replace() { } @@ -96,6 +111,11 @@ namespace basegfx return maBColor; } +OUString BColorModifier_replace::getModifierName() const +{ +return "replace"; +} + BColorModifier_interpolate::~BColorModifier_interpolate() { } @@ -117,6 +137,40 @@ namespace basegfx return interpolate(maBColor, aSourceColor, mfValue); } +OUString BColorModifier_interpolate::getModifierName() const +{ +return "interpolate"; +} + +BColorModifier_saturate::~BColorModifier_saturate() +{ +} + +bool BColorModifier_saturate::operator==(const BColorModifier& rCompare) const +{ +const BColorModifier_saturate* pCompare = dynamic_cast< const BColorModifier_saturate* >(&rCompare); + +if(!pCompare) +{ +return false; +} + +return mfValue == pCompare->mfValue; +} + +::basegfx::BColor BColorModifier_saturate::getModifiedColor(const ::basegfx::BColor& aSourceColor) const +{ +return basegfx::BColor( +(0.213 + 0.787 * mfValue) * aSourceColor.getRed() + (0.715 - 0.715 * mfValue) * aSourceColor.getGreen() + (0.072 - 0.072 * mfValue) * aSourceColor.getBlue(), +(0.213 - 0.213 * mfValue) * aSourceColor.getRed() + (0.715 + 0.285 * mfValue) * aSourceColor.getGreen() + (0.072 - 0.072 * mfValue) * aSourceColor.getBlue(), +(0.213 - 0.213 * mfValue) * aSourceColor.getRed() + (0.715 - 0.715 * mfValue) * aSourceColor.getGreen() + (0.072 + 0.928 * mfValue) * aSourceColor.getBlue()); +} + +OUString BColorModifier_saturate::getModifierName() const +{ +return "saturate"; +} + BColorModifier_black_and_white::~BColorModifier_black_and_white() { } @@ -147,6 +201,11 @@ namespace basegfx } } +OUString BColorModifier_black_and_white::getModifierName() const +{ +return "black_and_white"; +} + BColorModifier_gamma::BColorModifier_gamma(double fValue) : mfValue(fValue), mfInvValue(fValue), @@ -193,6 +252,11 @@ namespace basegfx } } +OUString BColorModifier_gamma::getModifierName() const +{ +return "gamma"; +} + BColorModifier_RGBLuminanceContrast::BColorModifier_RGBLuminanceContrast(double fRed, double fGreen, double fBlue, double fLuminance, double fContrast) : mfRed(std::clamp(fRed, -1.0, 1.0)), mfGreen(std::clamp(fGreen, -1.0, 1.0)), @@ -270,6 +334,11 @@ namespace basegfx }
[Libreoffice-commits] core.git: sd/source
sd/source/ui/unoidl/unomodel.cxx | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) New commits: commit c183934835a6ab5e74643a671b65e9468592d216 Author: Luigi Iucci AuthorDate: Fri May 26 11:49:59 2023 +0200 Commit: Miklos Vajna CommitDate: Thu Jun 15 08:38:45 2023 +0200 sd: fix crash deleting 2 slides during paintTile pPageView was null in SdXImpressDocument::paintTile while trying to paint form controls, which is a corner case in most cases then we skip painting in order to avoid a crash Change-Id: I6c166035220c058fac276f2b7746a8ebc9651f81 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152379 Tested-by: Jenkins Reviewed-by: Miklos Vajna diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx index dd2c897b4930..e05aee0f91c0 100644 --- a/sd/source/ui/unoidl/unomodel.cxx +++ b/sd/source/ui/unoidl/unomodel.cxx @@ -2306,11 +2306,14 @@ void SdXImpressDocument::paintTile( VirtualDevice& rDevice, // Draw Form controls SdrView* pDrawView = pViewSh->GetDrawView(); SdrPageView* pPageView = pDrawView->GetSdrPageView(); -SdrPage* pPage = pPageView->GetPage(); -::sd::Window* pActiveWin = pViewSh->GetActiveWindow(); -::tools::Rectangle aTileRect(Point(nTilePosX, nTilePosY), Size(nTileWidth, nTileHeight)); -Size aOutputSize(nOutputWidth, nOutputHeight); -LokControlHandler::paintControlTile(pPage, pDrawView, *pActiveWin, rDevice, aOutputSize, aTileRect); +if (pPageView != nullptr) +{ +SdrPage* pPage = pPageView->GetPage(); +::sd::Window* pActiveWin = pViewSh->GetActiveWindow(); +::tools::Rectangle aTileRect(Point(nTilePosX, nTilePosY), Size(nTileWidth, nTileHeight)); +Size aOutputSize(nOutputWidth, nOutputHeight); +LokControlHandler::paintControlTile(pPage, pDrawView, *pActiveWin, rDevice, aOutputSize, aTileRect); +} comphelper::LibreOfficeKit::setTiledPainting(false); }
[Libreoffice-commits] core.git: Branch 'libreoffice-7-5' - include/xmloff sw/inc sw/qa sw/source xmloff/qa xmloff/source
include/xmloff/txtparae.hxx |6 sw/inc/numrule.hxx|3 sw/qa/core/unocore/unocore.cxx| 41 - sw/source/core/doc/number.cxx | 23 -- sw/source/core/unocore/unoparagraph.cxx | 18 -- sw/source/uibase/uno/unotxdoc.cxx | 28 +++ xmloff/qa/unit/data/differentListStylesInOneList.fodt | 47 + xmloff/qa/unit/text.cxx | 105 xmloff/source/text/XMLTextNumRuleInfo.cxx | 12 - xmloff/source/text/XMLTextNumRuleInfo.hxx |5 xmloff/source/text/txtparae.cxx | 146 +++--- 11 files changed, 329 insertions(+), 105 deletions(-) New commits: commit de8c8cea231a42a8e4fa9048606de1c41aae0821 Author: Mike Kaganski AuthorDate: Tue Jun 13 23:15:08 2023 +0300 Commit: Miklos Vajna CommitDate: Thu Jun 15 08:37:43 2023 +0200 tdf#155823: Improve the check if the list id is not required The implementation introduced in commit 8f48f91009caa86d896f247059874242ed18bf39 (SwNumRule::HasContinueList) was a bit naive: it assumed that maTextNodeList is sorted (it is not, and so, valid cases to avoid the id were missed); it assumed that a given list can only consist of items of a single numbering style, and so only tested the list of nodes referenced from maTextNodeList of given SwNumRule. I.e., this implementation targeted a special case of a list style fully covering a single continuous list. This skipped ids for list items with list styles, in which maTextNodeList passed the check in HasContinueList, but which were followed by items with a different list style, continuing the same list. This constellation outputs continue-list attribute in the following items (see XMLTextParagraphExport::exportListChange), which references the skipped id. The resulting ODF is an invalid XML (an xml:id is missing that is referenced), and also does not allow to continue such a list. The change tries to fix this, using a list of nodes in XMLTextParagraphExport, and analyzing if the list of the current paragraph has a continuation that needs to reference this list id. Two new hidden properties introduced in SwXParagraph and SwXTextDocument: "ODFExport_NodeIndex" and "ODFExport_ListNodes", resp. They allow to pipe the data to the export. The previous special casing of property state for "ListId", used in SwNumRule::HasContinueList, is removed together with the mentioned function. The intention is to have a logic allowing to detect 100% cases where the list id is required, and where it's not required. A related unit test for tdf#149668 was fixed to not rely on the mentioned ListId property state workaround, and moved from sw/qa/core/unocore to xmloff/qa/unit. Change-Id: If6a6ac7a3dfe0b2ea143229678a603875153eedb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153044 Tested-by: Jenkins Reviewed-by: Mike Kaganski Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153065 Reviewed-by: Miklos Vajna diff --git a/include/xmloff/txtparae.hxx b/include/xmloff/txtparae.hxx index e474a9c5b763..dd78b2bb1141 100644 --- a/include/xmloff/txtparae.hxx +++ b/include/xmloff/txtparae.hxx @@ -110,6 +110,9 @@ class XMLOFF_DLLPUBLIC XMLTextParagraphExport : public XMLStyleExport XMLTextListsHelper* mpTextListsHelper; ::std::vector< std::unique_ptr > maTextListsHelperStack; +struct DocumentListNodes; +std::unique_ptr mpDocumentListNodes; + bool mbCollected; enum class FrameType { Text, Graphic, Embedded, Shape }; @@ -532,6 +535,9 @@ public: void PopTextListsHelper(); private: +bool ShouldSkipListId(const css::uno::Reference& xTextContent); +bool ExportListId() const; + XMLTextParagraphExport(XMLTextParagraphExport const &) = delete; }; diff --git a/sw/inc/numrule.hxx b/sw/inc/numrule.hxx index fde2c8de0fb8..f642e21e746c 100644 --- a/sw/inc/numrule.hxx +++ b/sw/inc/numrule.hxx @@ -272,9 +272,6 @@ public: void dumpAsXml(xmlTextWriterPtr w) const; void GetGrabBagItem(css::uno::Any& rVal) const; void SetGrabBagItem(const css::uno::Any& rVal); - -/// Is it possible that this numbering has multiple lists? -bool HasContinueList() const; }; /// namespace for static functions and methods for numbering and bullets diff --git a/sw/qa/core/unocore/unocore.cxx b/sw/qa/core/unocore/unocore.cxx index 9acecd03b431..04744c7e5f94 100644 --- a/sw/qa/core/unocore/unocore.cxx +++ b/sw/qa/core/unocore/unocore.cxx @@ -660,47 +660,6 @@ CPPUNIT_TEST_FIXTURE(SwCoreUnocoreTest, testContentControlDate) CPPUNIT_ASSERT_EQUAL(OUString("mytag"), pContentControl->GetTag()); } -CPPUNIT_TEST_FIXTURE(SwCoreUnocoreTest, testListIdState) -{ -// Given a docu
[Libreoffice-commits] core.git: sw/source
sw/source/core/access/AccessibilityCheck.cxx| 22 sw/source/core/inc/AccessibilityCheck.hxx |2 - sw/source/core/txtnode/OnlineAccessibilityCheck.cxx |2 - 3 files changed, 11 insertions(+), 15 deletions(-) New commits: commit 8b9d524008955f6f681d0bde8ef32d3cb3a83214 Author: Balazs Varga AuthorDate: Tue Jun 13 11:25:36 2023 +0200 Commit: Samuel Mehrbrodt CommitDate: Thu Jun 15 08:13:22 2023 +0200 tdf#155728 - A11y sidebar: fix Update issue list after fixing an issue in case of SdrObjects. Change-Id: I45608d423c0da0f1a983dcfad43562c3d7c9ee67 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152953 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt diff --git a/sw/source/core/access/AccessibilityCheck.cxx b/sw/source/core/access/AccessibilityCheck.cxx index 05d2634db863..802ad2c8dea3 100644 --- a/sw/source/core/access/AccessibilityCheck.cxx +++ b/sw/source/core/access/AccessibilityCheck.cxx @@ -1337,7 +1337,7 @@ public: } // end anonymous namespace // Check Shapes, TextBox -void AccessibilityCheck::checkObject(SdrObject* pObject) +void AccessibilityCheck::checkObject(SwNode* pCurrent, SdrObject* pObject) { if (!pObject) return; @@ -1381,6 +1381,8 @@ void AccessibilityCheck::checkObject(SdrObject* pObject) pIssue->setObjectID(pObject->GetName()); pIssue->setDoc(*m_pDoc); +if (pCurrent) +pIssue->setNode(pCurrent); } } } @@ -1469,19 +1471,13 @@ void AccessibilityCheck::check() if (pNodeCheck) pNodeCheck->check(pNode); } -} -} -IDocumentDrawModelAccess& rDrawModelAccess = m_pDoc->getIDocumentDrawModelAccess(); -auto* pModel = rDrawModelAccess.GetDrawModel(); -for (sal_uInt16 nPage = 0; nPage < pModel->GetPageCount(); ++nPage) -{ -SdrPage* pPage = pModel->GetPage(nPage); -for (size_t nObject = 0; nObject < pPage->GetObjCount(); ++nObject) -{ -SdrObject* pObject = pPage->GetObj(nObject); -if (pObject) -checkObject(pObject); +for (SwFrameFormat* const& pFrameFormat : pNode->GetAnchoredFlys()) +{ +SdrObject* pObject = pFrameFormat->FindSdrObject(); +if (pObject) +checkObject(pNode, pObject); +} } } } diff --git a/sw/source/core/inc/AccessibilityCheck.hxx b/sw/source/core/inc/AccessibilityCheck.hxx index c7613e8829a4..caaff1944842 100644 --- a/sw/source/core/inc/AccessibilityCheck.hxx +++ b/sw/source/core/inc/AccessibilityCheck.hxx @@ -49,7 +49,7 @@ public: } void check() override; -void checkObject(SdrObject* pObject); +void checkObject(SwNode* pNode, SdrObject* pObject); void checkNode(SwNode* pNode); void checkDocumentProperties(); }; diff --git a/sw/source/core/txtnode/OnlineAccessibilityCheck.cxx b/sw/source/core/txtnode/OnlineAccessibilityCheck.cxx index 20d0ac39c10e..629497c50bac 100644 --- a/sw/source/core/txtnode/OnlineAccessibilityCheck.cxx +++ b/sw/source/core/txtnode/OnlineAccessibilityCheck.cxx @@ -134,7 +134,7 @@ void OnlineAccessibilityCheck::runAccessibilityCheck(SwNode* pNode) { SdrObject* pObject = pFrameFormat->FindSdrObject(); if (pObject) -m_aAccessibilityCheck.checkObject(pObject); +m_aAccessibilityCheck.checkObject(pNode, pObject); } auto aCollection = m_aAccessibilityCheck.getIssueCollection();
[Libreoffice-commits] core.git: sc/UITest_manual_tests.mk sc/UITest_pageFormat.mk sc/UITest_pasteSpecial.mk sc/UITest_protect.mk
sc/UITest_manual_tests.mk |2 ++ sc/UITest_pageFormat.mk |2 ++ sc/UITest_pasteSpecial.mk |2 ++ sc/UITest_protect.mk |2 ++ 4 files changed, 8 insertions(+) New commits: commit af95fedde797ccfa85f4b876867b57015aa8b382 Author: Miklos Vajna AuthorDate: Wed Jun 14 20:09:45 2023 +0200 Commit: Miklos Vajna CommitDate: Thu Jun 15 08:11:31 2023 +0200 UITest_manual_tests: use oneprocess mode Execution time goes from: real0m42,203s to real0m31,854s Also the same for UITest_pasteSpecial: 2m4,180s -> 1m39,375s Also the same for UITest_protect: 0m13,758s -> 0m12,817s Change-Id: I5fb00ca0c854e4078f7cae12dee507aa61da3770 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153090 Tested-by: Jenkins Reviewed-by: Miklos Vajna diff --git a/sc/UITest_manual_tests.mk b/sc/UITest_manual_tests.mk index 94089544d98e..759c41554e3f 100644 --- a/sc/UITest_manual_tests.mk +++ b/sc/UITest_manual_tests.mk @@ -17,4 +17,6 @@ $(eval $(call gb_UITest_set_defs,manual_tests, \ TDOC="$(SRCDIR)/sc/qa/uitest/data" \ )) +$(eval $(call gb_UITest_use_oneprocess,manual_tests)) + # vim: set noet sw=4 ts=4: diff --git a/sc/UITest_pageFormat.mk b/sc/UITest_pageFormat.mk index ef260f831427..0530d8732c08 100644 --- a/sc/UITest_pageFormat.mk +++ b/sc/UITest_pageFormat.mk @@ -17,4 +17,6 @@ $(eval $(call gb_UITest_set_defs,pageFormat, \ TDOC="$(SRCDIR)/sc/qa/uitest/data" \ )) +$(eval $(call gb_UITest_use_oneprocess,pageFormat)) + # vim: set noet sw=4 ts=4: diff --git a/sc/UITest_pasteSpecial.mk b/sc/UITest_pasteSpecial.mk index 6da1278138c7..0e21d6351db1 100644 --- a/sc/UITest_pasteSpecial.mk +++ b/sc/UITest_pasteSpecial.mk @@ -17,4 +17,6 @@ $(eval $(call gb_UITest_set_defs,pasteSpecial, \ TDOC="$(SRCDIR)/sc/qa/uitest/data" \ )) +$(eval $(call gb_UITest_use_oneprocess,pasteSpecial)) + # vim: set noet sw=4 ts=4: diff --git a/sc/UITest_protect.mk b/sc/UITest_protect.mk index b5567c3b9651..e691546c18a4 100644 --- a/sc/UITest_protect.mk +++ b/sc/UITest_protect.mk @@ -17,4 +17,6 @@ $(eval $(call gb_UITest_set_defs,protect, \ TDOC="$(SRCDIR)/sc/qa/uitest/data" \ )) +$(eval $(call gb_UITest_use_oneprocess,protect)) + # vim: set noet sw=4 ts=4:
[Libreoffice-commits] core.git: sw/qa
sw/qa/core/text/text.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit db75a6ecdd39f012fd1237da8169ece21f333b21 Author: Andrea Gelmini AuthorDate: Wed Jun 14 17:48:32 2023 +0200 Commit: Julien Nabet CommitDate: Thu Jun 15 07:11:44 2023 +0200 Fix typo Change-Id: Ieadd5121185e9c3a5258336e3bfece23c1efdc73 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153067 Tested-by: Jenkins Reviewed-by: Julien Nabet diff --git a/sw/qa/core/text/text.cxx b/sw/qa/core/text/text.cxx index c961562b3c9e..6d71cadcf9ea 100644 --- a/sw/qa/core/text/text.cxx +++ b/sw/qa/core/text/text.cxx @@ -1312,7 +1312,7 @@ CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testFloattableOverlap) CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testTdf89288) { // Given a document with 2 paragraphs of mixed Complex and Western text, -// and 2 other paragrpahs of mixed Western and Asian text: +// and 2 other paragraphs of mixed Western and Asian text: createSwDoc("tdf89288.fodt"); // When laying out that document:
[Libreoffice-commits] core.git: Branch 'libreoffice-7-6' - external/libwebp
external/libwebp/CVE-2023-1999.patch.1 | 52 external/libwebp/UnpackedTarball_libwebp.mk |1 2 files changed, 53 insertions(+) New commits: commit 42cdd2c08e083a39eb3c8048ef20c7d31e750497 Author: Caolán McNamara AuthorDate: Wed Jun 14 10:08:13 2023 +0100 Commit: Taichi Haradaguchi <20001...@ymail.ne.jp> CommitDate: Thu Jun 15 05:07:32 2023 +0200 backport CVE-2023-1999 libwebp fix Change-Id: Idce341a78e44af9940d287d2a08b02d2ee9a6dae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153020 Tested-by: Jenkins Reviewed-by: Taichi Haradaguchi <20001...@ymail.ne.jp> diff --git a/external/libwebp/CVE-2023-1999.patch.1 b/external/libwebp/CVE-2023-1999.patch.1 new file mode 100644 index ..65c2cf75fb79 --- /dev/null +++ b/external/libwebp/CVE-2023-1999.patch.1 @@ -0,0 +1,52 @@ +From a486d800b60d0af4cc0836bf7ed8f21e12974129 Mon Sep 17 00:00:00 2001 +From: James Zern +Date: Wed, 22 Feb 2023 22:15:47 -0800 +Subject: [PATCH] EncodeAlphaInternal: clear result->bw on error + +This avoids a double free should the function fail prior to +VP8BitWriterInit() and a previous trial result's buffer carried over. +Previously in ApplyFiltersAndEncode() trial.bw (with a previous +iteration's buffer) would be freed, followed by best.bw pointing to the +same buffer. + +Since: +187d379d add a fallback to ALPHA_NO_COMPRESSION + +In addition, check the return value of VP8BitWriterInit() in this +function. + +Bug: webp:603 +Change-Id: Ic258381ee26c8c16bc211d157c8153831c8c6910 +--- + src/enc/alpha_enc.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/src/enc/alpha_enc.c b/src/enc/alpha_enc.c +index f7c02690e3..7d205586fe 100644 +--- a/src/enc/alpha_enc.c b/src/enc/alpha_enc.c +@@ -13,6 +13,7 @@ + + #include + #include ++#include + + #include "src/enc/vp8i_enc.h" + #include "src/dsp/dsp.h" +@@ -148,6 +149,7 @@ static int EncodeAlphaInternal(const uint8_t* const data, int width, int height, + } + } else { + VP8LBitWriterWipeOut(&tmp_bw); ++ memset(&result->bw, 0, sizeof(result->bw)); + return 0; + } + } +@@ -162,7 +164,7 @@ static int EncodeAlphaInternal(const uint8_t* const data, int width, int height, + header = method | (filter << 2); + if (reduce_levels) header |= ALPHA_PREPROCESSED_LEVELS << 4; + +- VP8BitWriterInit(&result->bw, ALPHA_HEADER_LEN + output_size); ++ if (!VP8BitWriterInit(&result->bw, ALPHA_HEADER_LEN + output_size)) ok = 0; + ok = ok && VP8BitWriterAppend(&result->bw, &header, ALPHA_HEADER_LEN); + ok = ok && VP8BitWriterAppend(&result->bw, output, output_size); + diff --git a/external/libwebp/UnpackedTarball_libwebp.mk b/external/libwebp/UnpackedTarball_libwebp.mk index 67f797157717..78761793174e 100644 --- a/external/libwebp/UnpackedTarball_libwebp.mk +++ b/external/libwebp/UnpackedTarball_libwebp.mk @@ -15,6 +15,7 @@ $(eval $(call gb_UnpackedTarball_set_patchlevel,libwebp,0)) $(eval $(call gb_UnpackedTarball_add_patches,libwebp,\ external/libwebp/Makefile.vc.patch \ + external/libwebp/CVE-2023-1999.patch.1 \ )) # vim: set noet sw=4 ts=4:
[Libreoffice-commits] core.git: sc/source
sc/source/filter/oox/extlstcontext.cxx | 18 +++--- 1 file changed, 15 insertions(+), 3 deletions(-) New commits: commit 242de60455e0fc554bb9fb592f8f00d7e5edb918 Author: Henry Castro AuthorDate: Fri Mar 17 11:07:14 2023 -0400 Commit: Henry Castro CommitDate: Thu Jun 15 03:55:02 2023 +0200 sc: filter: oox: insert a new entry ScDataBarFormat if Id attribute... does not exist: 0 1 Signed-off-by: Henry Castro Change-Id: Ie2c1ba2c85d9eead963f4d9b1684d72b64fe815d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149069 Tested-by: Jenkins CollaboraOffice Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153092 Tested-by: Jenkins diff --git a/sc/source/filter/oox/extlstcontext.cxx b/sc/source/filter/oox/extlstcontext.cxx index 5328accac5c8..3209c846f9ce 100644 --- a/sc/source/filter/oox/extlstcontext.cxx +++ b/sc/source/filter/oox/extlstcontext.cxx @@ -165,11 +165,23 @@ ContextHandlerRef ExtConditionalFormattingContext::onCreateContext(sal_Int32 nEl if (aType == "dataBar") { // an ext entry does not need to have an existing corresponding entry +ScDataBarFormatData* pInfo; ExtLst::const_iterator aExt = getExtLst().find( aId ); -if(aExt == getExtLst().end()) -return nullptr; +if (aExt == getExtLst().end()) +{ +pInfo = new ScDataBarFormatData(); +if (pInfo) +{ +auto pFormat = std::make_unique(&getScDocument()); +pFormat->SetDataBarData(pInfo); +maEntries.push_back(std::move(pFormat)); +} +} +else +{ +pInfo = aExt->second; +} -ScDataBarFormatData* pInfo = aExt->second; if (!pInfo) { return nullptr;
[Libreoffice-commits] core.git: Changes to 'refs/tags/cib-6.4-19'
Tag 'cib-6.4-19' created by Thorsten Behrens at 2023-06-15 01:04 + Release CIB Office cib-6.4-19 -BEGIN PGP SIGNATURE- iNUEABYKAH0WIQRV78SO268/dhkw1IIeB5amgXyR5gUCZIpjnl8UgAAuAChp c3N1ZXItZnByQG5vdGF0aW9ucy5vcGVucGdwLmZpZnRoaG9yc2VtYW4ubmV0NTVF RkM0OEVEQkFGM0Y3NjE5MzBENDgyMUUwNzk2QTY4MTdDOTFFNgAKCRAeB5amgXyR 5rYtAQDfWp0ef57kjBCTR0Pu49CHviGuC5J/QQPUcrrKhVNYtAD/V6MVend90tCt NK70sx4+HE/y3nGwbliPzWdIQF6sHgQ= =p7Tj -END PGP SIGNATURE- Changes since cib-6.4-18-5: --- 0 files changed ---
[Libreoffice-commits] core.git: Branch 'feature/cib_contract891c' - 10 commits - download.lst external/curl external/libtommath external/libxml2 external/libxmlsec external/libxslt external/openssl ex
Rebased ref, commits from common ancestor: commit 4fbe08e56bdbb60289dd18c718b80168b640110f Author: Thorsten Behrens AuthorDate: Wed Jun 14 16:42:21 2023 +0200 Commit: Thorsten Behrens CommitDate: Thu Jun 15 01:32:19 2023 +0200 Build python3 against own openssl This is a bit from https://gerrit.libreoffice.org/c/core/+/98435 which we were missing, due to sticking to Python 3.5.x Change-Id: I3b18d1f540d56cf06fccc4abcb6e45eda8a4ba4b diff --git a/external/python3/python-3.5.4-ssl.patch.1 b/external/python3/python-3.5.4-ssl.patch.1 index beb6fe38882f..837d0053cf5a 100644 --- a/external/python3/python-3.5.4-ssl.patch.1 +++ b/external/python3/python-3.5.4-ssl.patch.1 @@ -34,7 +34,7 @@ diff -ru python3.orig/PCbuild/_ssl.vcxproj python3/PCbuild/_ssl.vcxproj - ws2_32.lib;crypt32.lib;$(OutDir)libeay$(PyDebugExt).lib;$(OutDir)ssleay$(PyDebugExt).lib;%(AdditionalDependencies) -+ ws2_32.lib;crypt32.lib;$(WORKDIR)\UnpackedTarball\openssl\out32dll\libeay32.lib;$(WORKDIR)\UnpackedTarball\openssl\out32dll\ssleay32.lib;%(AdditionalDependencies) ++ ws2_32.lib;crypt32.lib;$(WORKDIR)\UnpackedTarball\openssl\libssl.lib;$(WORKDIR)\UnpackedTarball\openssl\libcrypto.lib;%(AdditionalDependencies) commit a30e264accbec3f6269e89887e4acd2a0538e515 Author: Thorsten Behrens AuthorDate: Wed Jun 14 13:34:52 2023 +0200 Commit: Thorsten Behrens CommitDate: Thu Jun 15 01:32:19 2023 +0200 openssl: upgrade to release 1.1.1t Fixes CVE-2023-0286 CVE-2023-0215 CVE-2022-4450 CVE-2022-4304 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146653 Tested-by: Jenkins Reviewed-by: Thorsten Behrens (cherry picked from commit f9229fdadbd205a8953577efc72a6e43717c764e) (cherry picked from commit ba359c09226756865d3813fee08514384257ae58) Change-Id: I93ce0362b17bd07b0644564a0676daaa56bc8b50 diff --git a/download.lst b/download.lst index 2e8f5b2aea0a..89860176ad77 100644 --- a/download.lst +++ b/download.lst @@ -177,8 +177,8 @@ export OPENCOLLADA_SHA256SUM := 8f25d429237cde289a448c82a0a830791354ccce5ee40d77 export OPENCOLLADA_TARBALL := OpenCOLLADA-master-6509aa13af.tar.bz2 export OPENLDAP_SHA256SUM := 99f37d6747d88206c470067eda624d5e48c1011e943ec0ab217bae8712e22f34 export OPENLDAP_TARBALL := openldap-2.4.59.tgz -export OPENSSL_SHA256SUM := c5ac01e760ee6ff0dab61d6b2bbd30146724d063eb322180c6f18a6f74e4b6aa -export OPENSSL_TARBALL := openssl-1.1.1s.tar.gz +export OPENSSL_SHA256SUM := 8dee9b24bdb1dcbf0c3d1e9b02fb8f6bf22165e807f45adeb7c9677536859d3b +export OPENSSL_TARBALL := openssl-1.1.1t.tar.gz export ORCUS_SHA256SUM := 676b1fedd721f64489650f5e76d7f98b750439914d87cae505b8163d08447908 export ORCUS_TARBALL := liborcus-0.12.1.tar.gz export OWNCLOUD_ANDROID_LIB_SHA256SUM := b18b3e3ef7fae6a79b62f2bb43cc47a5346b6330f6a383dc4be34439aca5e9fb commit 61017fc6146a6162678e7d9218ee0fe4de6527a5 Author: Xisco Fauli AuthorDate: Wed Nov 2 20:29:51 2022 +0100 Commit: Thorsten Behrens CommitDate: Thu Jun 15 01:32:19 2023 +0200 upgrade to openssl-1.1.1s Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142184 Tested-by: Jenkins Reviewed-by: Caolán McNamara (cherry picked from commit 23e6227ab347a00b235fb00892b379ef4e3a0d35) (cherry picked from commit 2c06d55c8e43368920780e55c62e1e65fdefba04) Change-Id: Ic0f1fca7ef73b3a443c24d2bcc7f234be331a05b diff --git a/download.lst b/download.lst index 2c413cd593f8..2e8f5b2aea0a 100644 --- a/download.lst +++ b/download.lst @@ -177,8 +177,8 @@ export OPENCOLLADA_SHA256SUM := 8f25d429237cde289a448c82a0a830791354ccce5ee40d77 export OPENCOLLADA_TARBALL := OpenCOLLADA-master-6509aa13af.tar.bz2 export OPENLDAP_SHA256SUM := 99f37d6747d88206c470067eda624d5e48c1011e943ec0ab217bae8712e22f34 export OPENLDAP_TARBALL := openldap-2.4.59.tgz -export OPENSSL_SHA256SUM := d7939ce614029cdff0b6c20f0e2e5703158a489a72b2507b8bd51bf8c8fd10ca -export OPENSSL_TARBALL := openssl-1.1.1q.tar.gz +export OPENSSL_SHA256SUM := c5ac01e760ee6ff0dab61d6b2bbd30146724d063eb322180c6f18a6f74e4b6aa +export OPENSSL_TARBALL := openssl-1.1.1s.tar.gz export ORCUS_SHA256SUM := 676b1fedd721f64489650f5e76d7f98b750439914d87cae505b8163d08447908 export ORCUS_TARBALL := liborcus-0.12.1.tar.gz export OWNCLOUD_ANDROID_LIB_SHA256SUM := b18b3e3ef7fae6a79b62f2bb43cc47a5346b6330f6a383dc4be34439aca5e9fb commit 858d475f9bc07ad648b4a0d91b5fdedeac6cf307 Author: Taichi Haradaguchi <20001...@ymail.ne.jp> AuthorDate: Tue Sep 6 14:42:20 2022 +0900 Commit: Thorsten Behrens CommitDate: Thu Jun 15 01:32:19 2023 +0200 upgrade openssl-1.1.1q Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139463 Tested-by: Jenkins Reviewed-by: Caolán McNamara (cherry picked from commit 96db5e3d610ede2ed82f1ab7673ac6d1c69fd588) (cherry picked from commit 9da5e4107e74d7590fbf44f5f4f24ed620852f91) Change-Id: I2317e734f074cf7301a6081cf3d2221beea
[Libreoffice-commits] core.git: Branch 'libreoffice-7-6' - cui/inc cui/source
cui/inc/strings.hrc|1 + cui/source/options/optlanguagetool.cxx |1 + 2 files changed, 2 insertions(+) New commits: commit a32c563fdddf7aa7211df830c037fbb4daf41ae0 Author: Mike Kaganski AuthorDate: Wed Jun 14 17:01:32 2023 +0300 Commit: Mike Kaganski CommitDate: Wed Jun 14 22:20:49 2023 +0200 Related: tdf#150494 add placeholder text to the REST protocol field Change-Id: I8aab941d9dd03e54a3a39ccb643a5a628d6c5be7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153061 Tested-by: Jenkins Reviewed-by: Mike Kaganski (cherry picked from commit 7c6c58197a84cf22789ca3dc97e863390c31a2f9) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153074 diff --git a/cui/inc/strings.hrc b/cui/inc/strings.hrc index 98c6cc50b2d3..84a2c9f859a1 100644 --- a/cui/inc/strings.hrc +++ b/cui/inc/strings.hrc @@ -407,6 +407,7 @@ #define RID_CUISTR_OPT_READONLY NC_("RID_CUISTR_OPT_READONLY", "This property is locked for editing.") #define RID_LANGUAGETOOL_LEAVE_EMPTY NC_("RID_LANGUAGETOOL_LEAVE_EMPTY", "Leave this field empty to use the free version") +#define RID_LANGUAGETOOL_REST_LEAVE_EMPTY NC_("RID_LANGUAGETOOL_REST_LEAVE_EMPTY", "Leave this field empty to use LanguageTool protocol") // Translatable names of color schemes #define RID_COLOR_SCHEME_LIBREOFFICE_AUTOMATIC NC_("RID_COLOR_SCHEME_LIBREOFFICE_AUTOMATIC", "Automatic") diff --git a/cui/source/options/optlanguagetool.cxx b/cui/source/options/optlanguagetool.cxx index 485e8ecb1be6..e1f4806f47f3 100644 --- a/cui/source/options/optlanguagetool.cxx +++ b/cui/source/options/optlanguagetool.cxx @@ -45,6 +45,7 @@ OptLanguageToolTabPage::OptLanguageToolTabPage(weld::Container* pPage, m_xBaseURLED->set_placeholder_text(CuiResId(RID_LANGUAGETOOL_LEAVE_EMPTY)); m_xUsernameED->set_placeholder_text(CuiResId(RID_LANGUAGETOOL_LEAVE_EMPTY)); m_xApiKeyED->set_placeholder_text(CuiResId(RID_LANGUAGETOOL_LEAVE_EMPTY)); + m_xRestProtocol->set_placeholder_text(CuiResId(RID_LANGUAGETOOL_REST_LEAVE_EMPTY)); } OptLanguageToolTabPage::~OptLanguageToolTabPage() {}
[Libreoffice-commits] core.git: editeng/source include/sfx2 include/svtools sc/source sd/source sfx2/source sw/inc sw/source
editeng/source/editeng/impedit3.cxx | 24 include/sfx2/viewsh.hxx |3 +++ include/svtools/colorcfg.hxx|2 +- sc/source/ui/inc/tabvwsh.hxx|2 ++ sc/source/ui/view/tabvwshc.cxx | 20 sd/source/ui/inc/ViewShellBase.hxx |2 ++ sd/source/ui/view/ViewShellBase.cxx | 27 +++ sfx2/source/view/viewsh.cxx |6 ++ sw/inc/view.hxx |2 ++ sw/source/uibase/uiview/viewprt.cxx | 27 +++ 10 files changed, 110 insertions(+), 5 deletions(-) New commits: commit 069c7dc4e9706b40ca12d83d83f90f41cec948f8 Author: Paris Oplopoios AuthorDate: Tue Jun 13 20:36:48 2023 +0300 Commit: Paris Oplopoios CommitDate: Wed Jun 14 22:12:21 2023 +0200 Add editengine view separation in tiled rendering Editengine now gets the background color from the current view instead from a global variable Change-Id: I98a0fccf4d0c83f4dabf8e534a9228b8a5e271d7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152996 Tested-by: Jenkins CollaboraOffice Reviewed-by: Paris Oplopoios (cherry picked from commit 7baa475342b67c10537e11da37b8862648679b02) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153073 Tested-by: Jenkins diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx index bcf0c044872f..e18562d3113f 100644 --- a/editeng/source/editeng/impedit3.cxx +++ b/editeng/source/editeng/impedit3.cxx @@ -52,6 +52,7 @@ #include #include +#include #include #include @@ -67,6 +68,7 @@ #include #include +#include #include #include #include @@ -4686,15 +4688,29 @@ Reference < i18n::XExtendedInputSequenceChecker > const & ImpEditEngine::ImplGet Color ImpEditEngine::GetAutoColor() const { -Color aColor = GetColorConfig().GetColorValue(svtools::FONTCOLOR).nColor; +Color aColor; -if ( GetBackgroundColor() != COL_AUTO ) +if (comphelper::LibreOfficeKit::isActive() && SfxViewShell::Current()) { -if ( GetBackgroundColor().IsDark() && aColor.IsDark() ) +// Get document background color from current view instead +aColor = SfxViewShell::Current()->GetColorConfigColor(svtools::DOCCOLOR); +if (aColor.IsDark()) aColor = COL_WHITE; -else if ( GetBackgroundColor().IsBright() && aColor.IsBright() ) +else aColor = COL_BLACK; } +else +{ +aColor = GetColorConfig().GetColorValue(svtools::FONTCOLOR).nColor; + +if ( GetBackgroundColor() != COL_AUTO ) +{ +if ( GetBackgroundColor().IsDark() && aColor.IsDark() ) +aColor = COL_WHITE; +else if ( GetBackgroundColor().IsBright() && aColor.IsBright() ) +aColor = COL_BLACK; +} +} return aColor; } diff --git a/include/sfx2/viewsh.hxx b/include/sfx2/viewsh.hxx index b805f1cf99d4..08bc6cecc8cb 100644 --- a/include/sfx2/viewsh.hxx +++ b/include/sfx2/viewsh.hxx @@ -74,6 +74,7 @@ namespace com::sun::star::ui { class XContextMenuInterceptor; } namespace com::sun::star::ui { struct ContextMenuExecuteEvent; } namespace com::sun::star::view { class XRenderable; } namespace tools { class Rectangle; } +namespace svtools { enum ColorConfigEntry : int; } enum class SfxPrinterChangeFlags { @@ -428,6 +429,8 @@ public: virtual void afterCallbackRegistered(); /// See OutlinerViewShell::GetEditWindowForActiveOLEObj(). virtual vcl::Window* GetEditWindowForActiveOLEObj() const override; +/// Get a color config color from this view +virtual ::Color GetColorConfigColor(svtools::ColorConfigEntry nColorType) const; /// Set the LibreOfficeKit language of this view. void SetLOKLanguageTag(const OUString& rBcp47LanguageTag); diff --git a/include/svtools/colorcfg.hxx b/include/svtools/colorcfg.hxx index de16f18eab13..9810aac0393d 100644 --- a/include/svtools/colorcfg.hxx +++ b/include/svtools/colorcfg.hxx @@ -27,7 +27,7 @@ namespace svtools{ -enum ColorConfigEntry +enum ColorConfigEntry : int { DOCCOLOR, DOCBOUNDARIES , diff --git a/sc/source/ui/inc/tabvwsh.hxx b/sc/source/ui/inc/tabvwsh.hxx index a670c4429d53..d8434af53bc6 100644 --- a/sc/source/ui/inc/tabvwsh.hxx +++ b/sc/source/ui/inc/tabvwsh.hxx @@ -395,6 +395,8 @@ public: void afterCallbackRegistered() override; /// See SfxViewShell::NotifyCursor(). void NotifyCursor(SfxViewShell* pViewShell) const override; +/// See SfxViewShell::GetColorConfigColor(). +::Color GetColorConfigColor(svtools::ColorConfigEntry nColorType) const override; /// Emits a LOK_CALLBACK_INVALIDATE_HEADER for all views whose current tab is equal to nCurrentTabIndex static void notifyAllViewsHeaderInvalidation(const SfxViewShell* pForViewShell, HeaderType eHeaderType, SCTAB nCurrentTabIndex); static bool isAny
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - sfx2/source
sfx2/source/view/viewsh.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 80a8c48e3114f269a15cb6c65df8534e29ecfd6b Author: Marco Cecchetti AuthorDate: Wed Jun 14 21:41:19 2023 +0200 Commit: Marco Cecchetti CommitDate: Wed Jun 14 21:43:51 2023 +0200 fix: unused parameter nColorType Change-Id: I3caf608f9f89668bed5bcbfa5e445c4a2e89d65c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153095 Tested-by: Marco Cecchetti Reviewed-by: Marco Cecchetti diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx index 5b4f1e44b152..ca6e1d30cf3b 100644 --- a/sfx2/source/view/viewsh.cxx +++ b/sfx2/source/view/viewsh.cxx @@ -2553,7 +2553,7 @@ vcl::Window* SfxViewShell::GetEditWindowForActiveOLEObj() const return pEditWin; } -::Color SfxViewShell::GetColorConfigColor(svtools::ColorConfigEntry nColorType) const +::Color SfxViewShell::GetColorConfigColor(svtools::ColorConfigEntry /*nColorType*/) const { SAL_WARN("sfx.view", "SfxViewShell::GetColorConfigColor not overriden!"); return {};
[Libreoffice-commits] core.git: basegfx/source oox/qa
basegfx/source/tools/gradienttools.cxx |2 oox/qa/unit/data/tdf155825_MCGR_SourceOffsetRangeDifferent.fodp | 642 ++ oox/qa/unit/mcgr.cxx| 10 3 files changed, 654 insertions(+) New commits: commit f3f64c77585d0c3c01c0d960f4959e18e9668c30 Author: Regina Henschel AuthorDate: Wed Jun 14 15:53:19 2023 +0200 Commit: Caolán McNamara CommitDate: Wed Jun 14 21:29:50 2023 +0200 tdf155825 result same size in synchronize gradients While synchronizing color and transparency gradients two new sequences are generated. In case the last offsets where different, the remaining stops where not copied to the new sequence and thus they had different sizes which triggered an assert in oox/source/export/drawingml.cxx. Change-Id: I446f8cfafb23735f06ad4e05eee8c922141b864d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153063 Tested-by: Jenkins Tested-by: Caolán McNamara Reviewed-by: Caolán McNamara diff --git a/basegfx/source/tools/gradienttools.cxx b/basegfx/source/tools/gradienttools.cxx index f79895bc8b8b..8f3e8ae83c06 100644 --- a/basegfx/source/tools/gradienttools.cxx +++ b/basegfx/source/tools/gradienttools.cxx @@ -441,6 +441,7 @@ namespace basegfx { const double fColorOff(aCurrColor->getStopOffset()); aNewAlpha.emplace_back(fColorOff, rAlphaStops.getInterpolatedBColor(fColorOff, 0, aAlphaStopRange)); +aNewColor.emplace_back(fColorOff, aCurrColor->getStopColor()); bRealChange = true; aCurrColor++; } @@ -448,6 +449,7 @@ namespace basegfx { const double fAlphaOff(aCurrAlpha->getStopOffset()); aNewColor.emplace_back(fAlphaOff, rColorStops.getInterpolatedBColor(fAlphaOff, 0, aColorStopRange)); +aNewAlpha.emplace_back(fAlphaOff, aCurrAlpha->getStopColor()); bRealChange = true; aCurrAlpha++; } diff --git a/oox/qa/unit/data/tdf155825_MCGR_SourceOffsetRangeDifferent.fodp b/oox/qa/unit/data/tdf155825_MCGR_SourceOffsetRangeDifferent.fodp new file mode 100644 index ..97b39689d51d --- /dev/null +++ b/oox/qa/unit/data/tdf155825_MCGR_SourceOffsetRangeDifferent.fodp @@ -0,0 +1,642 @@ + + +http://openoffice.org/2004/office"; xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:xlink="http://www.w3.org/1999/xlink"; xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:dc="http://purl.org/dc/elements/1.1/"; xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:rpt="http://openoffice.org/2005/report"; xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:ooow="http://openoffice.org/200 4/writer" xmlns:oooc="http://openoffice.org/2004/calc"; xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:xforms="http://www.w3.org/2002/xforms"; xmlns:tableooo="http://openoffice.org/2009/table"; xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:drawooo="http://openoffice.org/2010/draw"; xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML"; xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" xmlns:dom="http://www.w3.org/2001/xml-events"; xmlns:xsd="http://www.w3.org/2001/XMLSchema"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xmlns:xhtml="http://www.w3.org/1999/xhtml"; xmlns:grddl="http://www.w3.org/2003/g/data-view#"; xmlns :css3t="http://www.w3.org/TR/css3-text/"; xmlns:presentation="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0" xmlns:smil="urn:oasis:names:tc:opendocument:xmlns:smil-compatible:1.0" xmlns:anim="urn:oasis:names:tc:opendocument:xmlns:animation:1.0" xmlns:officeooo="http://openoffice.org/2009/office"; office:version="1.3" office:mimetype="application/vnd.oasis.opendocument.presentation"> + 2023-06-14T00:44:04.1630024x16impressPT3M3S3B2020/24.2.0.0.alpha0$Windows_X86_64 LibreOffice_project/0028c2311ca14669ca530cd4db422cd3cf9438
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - filter/source
filter/source/svg/svgfilter.cxx | 28 1 file changed, 20 insertions(+), 8 deletions(-) New commits: commit ce6f43c490f1004e4e9ee274a621679683e49881 Author: Marco Cecchetti AuthorDate: Wed Jun 14 14:13:09 2023 +0200 Commit: Marco Cecchetti CommitDate: Wed Jun 14 21:18:43 2023 +0200 fixup for: 7523efa svg export filter: not export hidden slides It seems that the Visible property does not always exist That was causing a failure in Online Impress: - swicth to master view - select any object in the master slide - result: the object is not selected or getting focus and the server report an error Change-Id: I77b0211c6e13da1804457ba48098bbee821b7d4a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153049 Reviewed-by: Gökay ŞATIR Tested-by: Jenkins CollaboraOffice diff --git a/filter/source/svg/svgfilter.cxx b/filter/source/svg/svgfilter.cxx index 3a08bda76078..71483c209949 100644 --- a/filter/source/svg/svgfilter.cxx +++ b/filter/source/svg/svgfilter.cxx @@ -441,10 +441,16 @@ bool SVGFilter::filterImpressOrDraw( const Sequence< PropertyValue >& rDescripto Reference< XPropertySet > xPropSet( xDrawPage, UNO_QUERY ); bool bIsSlideVisible = true; // default: true -xPropSet->getPropertyValue( "Visible" ) >>= bIsSlideVisible; -if (!bIsSlideVisible) -continue; - +if (xPropSet.is()) +{ +Reference< XPropertySetInfo > xPropSetInfo = xPropSet->getPropertySetInfo(); +if (xPropSetInfo.is() && xPropSetInfo->hasPropertyByName("Visible")) +{ +xPropSet->getPropertyValue( "Visible" ) >>= bIsSlideVisible; +if (!bIsSlideVisible) +continue; +} +} mSelectedPages.push_back(xDrawPage); } } @@ -494,10 +500,16 @@ bool SVGFilter::filterImpressOrDraw( const Sequence< PropertyValue >& rDescripto uno::Reference< drawing::XDrawPage > xDrawPage( xDrawPages->getByIndex( i ), uno::UNO_QUERY ); Reference< XPropertySet > xPropSet( xDrawPage, UNO_QUERY ); bool bIsSlideVisible = true; // default: true -xPropSet->getPropertyValue( "Visible" ) >>= bIsSlideVisible; -if (!bIsSlideVisible) -continue; - +if (xPropSet.is()) +{ +Reference< XPropertySetInfo > xPropSetInfo = xPropSet->getPropertySetInfo(); +if (xPropSetInfo.is() && xPropSetInfo->hasPropertyByName("Visible")) +{ +xPropSet->getPropertyValue( "Visible" ) >>= bIsSlideVisible; +if (!bIsSlideVisible) +continue; +} +} mSelectedPages.push_back(xDrawPage); } }
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - 2 commits - desktop/source sd/source
desktop/source/lib/init.cxx |2 ++ sd/source/ui/unoidl/unomodel.cxx |3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) New commits: commit 93a28b3bc8a50226a111464b08ac51d1feb05988 Author: Marco Cecchetti AuthorDate: Wed Jun 14 12:42:22 2023 +0200 Commit: Marco Cecchetti CommitDate: Wed Jun 14 21:18:36 2023 +0200 fixup for: fe79008f70e7 sd: send correct slide visibility status Check pointer to be vaild Change-Id: Id7be4756496f034c4a6a4407cb625e68a66573c6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153051 Reviewed-by: Gökay ŞATIR Tested-by: Jenkins CollaboraOffice diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx index 92879fcd770a..438d2a81faa0 100644 --- a/sd/source/ui/unoidl/unomodel.cxx +++ b/sd/source/ui/unoidl/unomodel.cxx @@ -2362,7 +2362,8 @@ OUString SdXImpressDocument::getPartInfo(int nPart) if (!pViewSh) return OUString(); -const bool bIsVisible = !pViewSh->GetDoc()->GetSdPage(nPart, pViewSh->GetPageKind())->IsExcluded(); +const SdPage* pSdPage = mpDoc->GetSdPage(nPart, pViewSh->GetPageKind()); +const bool bIsVisible = pSdPage && !pSdPage->IsExcluded(); const bool bIsSelected = pViewSh->IsSelected(nPart); const sal_Int16 nMasterPageCount= pViewSh->GetDoc()->GetMasterSdPageCount(pViewSh->GetPageKind()); commit cd4ad81ca334a3d2bc90bab81502ae5350bac84d Author: Marco Cecchetti AuthorDate: Tue Jun 13 19:30:05 2023 +0200 Commit: Marco Cecchetti CommitDate: Wed Jun 14 21:18:25 2023 +0200 lok: on switching from tabbed to compact ui 2 buttons were disabled Number Format Increase Decimals, Number Format Decrease Decimals were not enabled on switching ui. Change-Id: Ia81a43ef40168dcbf071d071231b795f9bf8659e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153050 Reviewed-by: Gökay ŞATIR Tested-by: Jenkins CollaboraOffice diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 743881175763..874e3ac1ffb2 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -3466,6 +3466,8 @@ static void doc_iniUnoCommands () OUString(".uno:NumberFormatCurrency"), OUString(".uno:NumberFormatPercent"), OUString(".uno:NumberFormatDecimal"), +OUString(".uno:NumberFormatIncDecimals"), +OUString(".uno:NumberFormatDecDecimals"), OUString(".uno:NumberFormatDate"), OUString(".uno:EditHeaderAndFooter"), OUString(".uno:FrameLineColor"),
[Libreoffice-commits] core.git: sc/source
sc/source/filter/inc/condformatbuffer.hxx |2 ++ sc/source/filter/oox/condformatbuffer.cxx | 12 2 files changed, 14 insertions(+) New commits: commit f16b722d7386b47fdc7afa5dfb21a948cb1a4969 Author: Henry Castro AuthorDate: Fri Mar 17 15:07:42 2023 -0400 Commit: Henry Castro CommitDate: Wed Jun 14 21:15:33 2023 +0200 sc: filter: oox: update databar format before clone The ScDataBarFormatData should update from import (finalizeImport) before cloning, otherwise it loose data. Signed-off-by: Henry Castro Change-Id: I4af8b79e93eed8091bf01244bacac1d12e591c45 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149068 Tested-by: Jenkins CollaboraOffice Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153068 Tested-by: Jenkins diff --git a/sc/source/filter/inc/condformatbuffer.hxx b/sc/source/filter/inc/condformatbuffer.hxx index cdc8d4727baf..d5d5ebac2ab5 100644 --- a/sc/source/filter/inc/condformatbuffer.hxx +++ b/sc/source/filter/inc/condformatbuffer.hxx @@ -271,6 +271,7 @@ public: void importAxisColor( const AttributeList& rAttribs ); void importCfvo( const AttributeList& rAttribs ); ExCfRuleModel& getModel() { return maModel; } +const ScDataBarFormatData* GetDataBarData() { return mpTarget; } }; class ExtCfCondFormat @@ -311,6 +312,7 @@ public: voidfinalizeImport(); private: CondFormatRef createCondFormat(); +voidupdateImport(const ScDataBarFormatData* pTarget); private: typedef RefVector< CondFormat > CondFormatVec; diff --git a/sc/source/filter/oox/condformatbuffer.cxx b/sc/source/filter/oox/condformatbuffer.cxx index 2662b5213a34..4c55792779af 100644 --- a/sc/source/filter/oox/condformatbuffer.cxx +++ b/sc/source/filter/oox/condformatbuffer.cxx @@ -1197,6 +1197,16 @@ public: } +void CondFormatBuffer::updateImport(const ScDataBarFormatData* pTarget) +{ +for ( const auto& rRule : maCfRules ) +{ +if ( rRule && rRule->GetDataBarData() == pTarget ) +rRule->finalizeImport(); +} +} + + void CondFormatBuffer::finalizeImport() { std::unordered_set aDoneExtCFs; @@ -1224,6 +1234,8 @@ void CondFormatBuffer::finalizeImport() for (const auto& rxEntry : rEntries) { CondFormatRuleRef xRule = rCondFormat.createRule(); +if (ScDataBarFormat *pData = dynamic_cast(rxEntry.get())) +updateImport(pData->GetDataBarData()); ScFormatEntry* pNewEntry = rxEntry->Clone(pDoc); sal_Int32 nPriority = rPriorities[nEntryIdx]; if (nPriority == -1)
[Libreoffice-commits] core.git: Branch 'libreoffice-7-6' - sc/source
sc/source/filter/oox/condformatbuffer.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 002adae14e287afcb3748509b05c843045aa588f Author: Caolán McNamara AuthorDate: Wed Jun 14 15:37:08 2023 +0100 Commit: Xisco Fauli CommitDate: Wed Jun 14 21:09:09 2023 +0200 cid#1532384 Out-of-bounds read sizeof returns num of bytes, not num of elements Change-Id: I9dea109e5f322d93ee10680f120b15554efa92e1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153028 Tested-by: Jenkins Reviewed-by: Xisco Fauli diff --git a/sc/source/filter/oox/condformatbuffer.cxx b/sc/source/filter/oox/condformatbuffer.cxx index 649046e8b3b7..2662b5213a34 100644 --- a/sc/source/filter/oox/condformatbuffer.cxx +++ b/sc/source/filter/oox/condformatbuffer.cxx @@ -264,7 +264,7 @@ namespace { else if (rAttribs.hasAttribute(XML_indexed)) { sal_uInt32 nIndexed = rAttribs.getUnsigned(XML_indexed, 0); -if (nIndexed < sizeof(IndexedColors)) +if (nIndexed < std::size(IndexedColors)) nColor = IndexedColors[nIndexed]; }
[Libreoffice-commits] core.git: basegfx/source drawinglayer/source include/basegfx svgio/inc svgio/qa svgio/source
basegfx/source/color/bcolormodifier.cxx | 74 +++ drawinglayer/source/tools/primitive2dxmldump.cxx | 12 ++- include/basegfx/color/bcolormodifier.hxx | 40 svgio/inc/svgfecolormatrixnode.hxx |6 + svgio/inc/svgtoken.hxx |1 svgio/qa/cppunit/SvgImportTest.cxx | 21 +- svgio/qa/cppunit/data/filterSaturate.svg | 11 +++ svgio/source/svgreader/svgfecolormatrixnode.cxx | 29 - svgio/source/svgreader/svgtoken.cxx |2 9 files changed, 183 insertions(+), 13 deletions(-) New commits: commit 41bf4139cab36984cff514bfdd6b1b13576746a3 Author: Xisco Fauli AuthorDate: Wed Jun 14 12:39:06 2023 +0200 Commit: Xisco Fauli CommitDate: Wed Jun 14 21:08:17 2023 +0200 tdf#155735: Add support for saturate type Add getModifierName to BColorModifier class so when can assert which modifier is being used Change-Id: I2bc2a36470a449df4dc84a8440f232149c1f8278 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153048 Tested-by: Jenkins Reviewed-by: Xisco Fauli diff --git a/basegfx/source/color/bcolormodifier.cxx b/basegfx/source/color/bcolormodifier.cxx index f27ffcc9aaf0..2067257015b4 100644 --- a/basegfx/source/color/bcolormodifier.cxx +++ b/basegfx/source/color/bcolormodifier.cxx @@ -45,6 +45,11 @@ namespace basegfx return ::basegfx::BColor(fLuminance, fLuminance, fLuminance); } +OUString BColorModifier_gray::getModifierName() const +{ +return "gray"; +} + BColorModifier_invert::~BColorModifier_invert() { } @@ -59,6 +64,11 @@ namespace basegfx return ::basegfx::BColor(1.0 - aSourceColor.getRed(), 1.0 - aSourceColor.getGreen(), 1.0 - aSourceColor.getBlue()); } +OUString BColorModifier_invert::getModifierName() const +{ +return "invert"; +} + BColorModifier_luminance_to_alpha::~BColorModifier_luminance_to_alpha() { } @@ -75,6 +85,11 @@ namespace basegfx return ::basegfx::BColor(fAlpha, fAlpha, fAlpha); } +OUString BColorModifier_luminance_to_alpha::getModifierName() const +{ +return "luminance_to_alpha"; +} + BColorModifier_replace::~BColorModifier_replace() { } @@ -96,6 +111,11 @@ namespace basegfx return maBColor; } +OUString BColorModifier_replace::getModifierName() const +{ +return "replace"; +} + BColorModifier_interpolate::~BColorModifier_interpolate() { } @@ -117,6 +137,40 @@ namespace basegfx return interpolate(maBColor, aSourceColor, mfValue); } +OUString BColorModifier_interpolate::getModifierName() const +{ +return "interpolate"; +} + +BColorModifier_saturate::~BColorModifier_saturate() +{ +} + +bool BColorModifier_saturate::operator==(const BColorModifier& rCompare) const +{ +const BColorModifier_saturate* pCompare = dynamic_cast< const BColorModifier_saturate* >(&rCompare); + +if(!pCompare) +{ +return false; +} + +return mfValue == pCompare->mfValue; +} + +::basegfx::BColor BColorModifier_saturate::getModifiedColor(const ::basegfx::BColor& aSourceColor) const +{ +return basegfx::BColor( +(0.213 + 0.787 * mfValue) * aSourceColor.getRed() + (0.715 - 0.715 * mfValue) * aSourceColor.getGreen() + (0.072 - 0.072 * mfValue) * aSourceColor.getBlue(), +(0.213 - 0.213 * mfValue) * aSourceColor.getRed() + (0.715 + 0.285 * mfValue) * aSourceColor.getGreen() + (0.072 - 0.072 * mfValue) * aSourceColor.getBlue(), +(0.213 - 0.213 * mfValue) * aSourceColor.getRed() + (0.715 - 0.715 * mfValue) * aSourceColor.getGreen() + (0.072 + 0.928 * mfValue) * aSourceColor.getBlue()); +} + +OUString BColorModifier_saturate::getModifierName() const +{ +return "saturate"; +} + BColorModifier_black_and_white::~BColorModifier_black_and_white() { } @@ -147,6 +201,11 @@ namespace basegfx } } +OUString BColorModifier_black_and_white::getModifierName() const +{ +return "black_and_white"; +} + BColorModifier_gamma::BColorModifier_gamma(double fValue) : mfValue(fValue), mfInvValue(fValue), @@ -193,6 +252,11 @@ namespace basegfx } } +OUString BColorModifier_gamma::getModifierName() const +{ +return "gamma"; +} + BColorModifier_RGBLuminanceContrast::BColorModifier_RGBLuminanceContrast(double fRed, double fGreen, double fBlue, double fLuminance, double fContrast) : mfRed(std::clamp(fRed, -1.0, 1.0)), mfGreen(std::clamp(fGreen, -1.0, 1.0)), @@ -270,6 +334,11 @@ namespace basegfx } } +OUString BColorModifier_RGBLuminanceContrast::getModifierName() const +{ +return "RGBLuminanceContrast"; +} +
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - sc/inc sc/source
sc/inc/docuno.hxx |5 - sc/source/ui/inc/gridwin.hxx |3 ++- sc/source/ui/unoobj/docuno.cxx | 33 - sc/source/ui/view/gridwin4.cxx |8 4 files changed, 34 insertions(+), 15 deletions(-) New commits: commit 189db43ee59cc6dea56800fdea50a5a4f9df10b1 Author: Noel Grandin AuthorDate: Wed Jun 14 13:01:20 2023 +0200 Commit: Caolán McNamara CommitDate: Wed Jun 14 21:03:39 2023 +0200 online: speed up scrolling large excel document the expensive part is the GetTiledRenderingArea(), so lets only do that once, instead of twice Change-Id: I2d18bce1ff116d6d711f0908502963c9743dea8a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153046 Tested-by: Jenkins CollaboraOffice Reviewed-by: Caolán McNamara diff --git a/sc/inc/docuno.hxx b/sc/inc/docuno.hxx index 23de1dad63ce..a75afa2834df 100644 --- a/sc/inc/docuno.hxx +++ b/sc/inc/docuno.hxx @@ -308,7 +308,7 @@ public: tools::Long nTileHeight ) override; /// @see vcl::ITiledRenderable::getDocumentSize(). -virtual Size getDocumentSize() override; +virtual Size getDocumentSize() final override; /// @see vcl::ITiledRenderable::getDataArea(). virtual Size getDataArea(long nPart) override; @@ -397,6 +397,9 @@ public: /// @see vcl::ITiledRenderable::getViewRenderState(). OString getViewRenderState() override; + +private: +Size getDocumentSize(SCCOL& rnTiledRenderingAreaEndCol, SCROW& rnTiledRenderingAreaEndRow ); }; class ScDrawPagesObj final : public cppu::WeakImplHelper< diff --git a/sc/source/ui/inc/gridwin.hxx b/sc/source/ui/inc/gridwin.hxx index 635dd91dc393..ddc9815c2052 100644 --- a/sc/source/ui/inc/gridwin.hxx +++ b/sc/source/ui/inc/gridwin.hxx @@ -373,7 +373,8 @@ public: voidPaintTile( VirtualDevice& rDevice, int nOutputWidth, int nOutputHeight, int nTilePosX, int nTilePosY, - tools::Long nTileWidth, tools::Long nTileHeight ); + tools::Long nTileWidth, tools::Long nTileHeight, + SCCOL nTiledRenderingAreaEndCol, SCROW nTiledRenderingAreaEndRow ); /// @see Window::LogicInvalidate(). void LogicInvalidate(const tools::Rectangle* pRectangle) override; diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx index 4433c6306515..ca5f80eee2c0 100644 --- a/sc/source/ui/unoobj/docuno.cxx +++ b/sc/source/ui/unoobj/docuno.cxx @@ -550,11 +550,19 @@ void ScModelObj::paintTile( VirtualDevice& rDevice, //if (pGridWindow->GetOutputSizePixel() != aTileSize) //pGridWindow->SetOutputSizePixel(Size(nOutputWidth, nOutputHeight)); // so instead for now, set the viewport size to document size -Size aDocSize = getDocumentSize(); + +// Fetch the document size and the tiled rendering area together, +// because the tiled rendering area is not cheap to compute, and we want +// to pass it down to ScGridWindow::PaintFile to avoid computing twice. +SCCOL nTiledRenderingAreaEndCol = 0; +SCROW nTiledRenderingAreaEndRow = 0; +Size aDocSize = getDocumentSize(nTiledRenderingAreaEndCol, nTiledRenderingAreaEndRow); + pGridWindow->SetOutputSizePixel(Size(aDocSize.Width() * pViewData->GetPPTX(), aDocSize.Height() * pViewData->GetPPTY())); pGridWindow->PaintTile( rDevice, nOutputWidth, nOutputHeight, -nTilePosX, nTilePosY, nTileWidth, nTileHeight ); +nTilePosX, nTilePosY, nTileWidth, nTileHeight, +nTiledRenderingAreaEndCol, nTiledRenderingAreaEndRow ); // Draw Form controls ScDrawLayer* pDrawLayer = pDocShell->GetDocument().GetDrawLayer(); @@ -653,6 +661,13 @@ VclPtr ScModelObj::getDocWindow() } Size ScModelObj::getDocumentSize() +{ +SCCOL nTiledRenderingAreaEndCol = 0; +SCROW nTiledRenderingAreaEndRow = 0; +return getDocumentSize(nTiledRenderingAreaEndCol, nTiledRenderingAreaEndRow); +} + +Size ScModelObj::getDocumentSize(SCCOL& rnTiledRenderingAreaEndCol, SCROW& rnTiledRenderingAreaEndRow) { Size aSize(10, 10); // minimum size @@ -661,11 +676,11 @@ Size ScModelObj::getDocumentSize() return aSize; SCTAB nTab = pViewData->GetTabNo(); -SCCOL nEndCol = 0; -SCROW nEndRow = 0; +rnTiledRenderingAreaEndCol = 0; +rnTiledRenderingAreaEndRow = 0; const ScDocument& rDoc = pDocShell->GetDocument(); -rDoc.GetTiledRenderingArea(nTab, nEndCol, nEndRow); +rDoc.GetTiledRenderingArea(nTab, rnTiledRenderingAreaEndCol, rnTiledRenderingAreaEndRow); const ScDocument* pThisDoc = &rDoc; const double fPPTX = pViewData->GetPPTX(); @@ -676,8 +691,8 @@ Size ScModelObj::getDocumentSize() return ScViewData::ToPixel(nSize, fPPTX); }; -tools::Long nDocWidthPixel = pViewData->GetL
[Libreoffice-commits] core.git: sc/source
sc/source/filter/oox/condformatbuffer.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit b6474249caa697513affdbcb02c7a69fda8203be Author: Caolán McNamara AuthorDate: Wed Jun 14 15:37:08 2023 +0100 Commit: Caolán McNamara CommitDate: Wed Jun 14 21:03:49 2023 +0200 cid#1532384 Out-of-bounds read sizeof returns num of bytes, not num of elements Change-Id: I9dea109e5f322d93ee10680f120b15554efa92e1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153064 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/sc/source/filter/oox/condformatbuffer.cxx b/sc/source/filter/oox/condformatbuffer.cxx index 649046e8b3b7..2662b5213a34 100644 --- a/sc/source/filter/oox/condformatbuffer.cxx +++ b/sc/source/filter/oox/condformatbuffer.cxx @@ -264,7 +264,7 @@ namespace { else if (rAttribs.hasAttribute(XML_indexed)) { sal_uInt32 nIndexed = rAttribs.getUnsigned(XML_indexed, 0); -if (nIndexed < sizeof(IndexedColors)) +if (nIndexed < std::size(IndexedColors)) nColor = IndexedColors[nIndexed]; }
[Libreoffice-commits] core.git: cui/inc cui/source
cui/inc/strings.hrc|1 + cui/source/options/optlanguagetool.cxx |1 + 2 files changed, 2 insertions(+) New commits: commit 7c6c58197a84cf22789ca3dc97e863390c31a2f9 Author: Mike Kaganski AuthorDate: Wed Jun 14 17:01:32 2023 +0300 Commit: Mike Kaganski CommitDate: Wed Jun 14 20:59:03 2023 +0200 Related: tdf#150494 add placeholder text to the REST protocol field Change-Id: I8aab941d9dd03e54a3a39ccb643a5a628d6c5be7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153061 Tested-by: Jenkins Reviewed-by: Mike Kaganski diff --git a/cui/inc/strings.hrc b/cui/inc/strings.hrc index 98c6cc50b2d3..84a2c9f859a1 100644 --- a/cui/inc/strings.hrc +++ b/cui/inc/strings.hrc @@ -407,6 +407,7 @@ #define RID_CUISTR_OPT_READONLY NC_("RID_CUISTR_OPT_READONLY", "This property is locked for editing.") #define RID_LANGUAGETOOL_LEAVE_EMPTY NC_("RID_LANGUAGETOOL_LEAVE_EMPTY", "Leave this field empty to use the free version") +#define RID_LANGUAGETOOL_REST_LEAVE_EMPTY NC_("RID_LANGUAGETOOL_REST_LEAVE_EMPTY", "Leave this field empty to use LanguageTool protocol") // Translatable names of color schemes #define RID_COLOR_SCHEME_LIBREOFFICE_AUTOMATIC NC_("RID_COLOR_SCHEME_LIBREOFFICE_AUTOMATIC", "Automatic") diff --git a/cui/source/options/optlanguagetool.cxx b/cui/source/options/optlanguagetool.cxx index 485e8ecb1be6..e1f4806f47f3 100644 --- a/cui/source/options/optlanguagetool.cxx +++ b/cui/source/options/optlanguagetool.cxx @@ -45,6 +45,7 @@ OptLanguageToolTabPage::OptLanguageToolTabPage(weld::Container* pPage, m_xBaseURLED->set_placeholder_text(CuiResId(RID_LANGUAGETOOL_LEAVE_EMPTY)); m_xUsernameED->set_placeholder_text(CuiResId(RID_LANGUAGETOOL_LEAVE_EMPTY)); m_xApiKeyED->set_placeholder_text(CuiResId(RID_LANGUAGETOOL_LEAVE_EMPTY)); + m_xRestProtocol->set_placeholder_text(CuiResId(RID_LANGUAGETOOL_REST_LEAVE_EMPTY)); } OptLanguageToolTabPage::~OptLanguageToolTabPage() {}
[Libreoffice-commits] core.git: sc/inc sc/source
sc/inc/docuno.hxx |5 - sc/source/ui/inc/gridwin.hxx |3 ++- sc/source/ui/unoobj/docuno.cxx | 33 - sc/source/ui/view/gridwin4.cxx |8 4 files changed, 34 insertions(+), 15 deletions(-) New commits: commit 51819767d341950dfd67448a6cbbf8c1add45f6c Author: Noel Grandin AuthorDate: Wed Jun 14 13:01:20 2023 +0200 Commit: Noel Grandin CommitDate: Wed Jun 14 20:53:11 2023 +0200 online: speed up scrolling large excel document the expensive part is the GetTiledRenderingArea(), so lets only do that once, instead of twice Change-Id: I2d18bce1ff116d6d711f0908502963c9743dea8a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153026 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/sc/inc/docuno.hxx b/sc/inc/docuno.hxx index 23de1dad63ce..a75afa2834df 100644 --- a/sc/inc/docuno.hxx +++ b/sc/inc/docuno.hxx @@ -308,7 +308,7 @@ public: tools::Long nTileHeight ) override; /// @see vcl::ITiledRenderable::getDocumentSize(). -virtual Size getDocumentSize() override; +virtual Size getDocumentSize() final override; /// @see vcl::ITiledRenderable::getDataArea(). virtual Size getDataArea(long nPart) override; @@ -397,6 +397,9 @@ public: /// @see vcl::ITiledRenderable::getViewRenderState(). OString getViewRenderState() override; + +private: +Size getDocumentSize(SCCOL& rnTiledRenderingAreaEndCol, SCROW& rnTiledRenderingAreaEndRow ); }; class ScDrawPagesObj final : public cppu::WeakImplHelper< diff --git a/sc/source/ui/inc/gridwin.hxx b/sc/source/ui/inc/gridwin.hxx index 635dd91dc393..ddc9815c2052 100644 --- a/sc/source/ui/inc/gridwin.hxx +++ b/sc/source/ui/inc/gridwin.hxx @@ -373,7 +373,8 @@ public: voidPaintTile( VirtualDevice& rDevice, int nOutputWidth, int nOutputHeight, int nTilePosX, int nTilePosY, - tools::Long nTileWidth, tools::Long nTileHeight ); + tools::Long nTileWidth, tools::Long nTileHeight, + SCCOL nTiledRenderingAreaEndCol, SCROW nTiledRenderingAreaEndRow ); /// @see Window::LogicInvalidate(). void LogicInvalidate(const tools::Rectangle* pRectangle) override; diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx index 1358fb8ec56d..cf744dd97bec 100644 --- a/sc/source/ui/unoobj/docuno.cxx +++ b/sc/source/ui/unoobj/docuno.cxx @@ -550,11 +550,19 @@ void ScModelObj::paintTile( VirtualDevice& rDevice, //if (pGridWindow->GetOutputSizePixel() != aTileSize) //pGridWindow->SetOutputSizePixel(Size(nOutputWidth, nOutputHeight)); // so instead for now, set the viewport size to document size -Size aDocSize = getDocumentSize(); + +// Fetch the document size and the tiled rendering area together, +// because the tiled rendering area is not cheap to compute, and we want +// to pass it down to ScGridWindow::PaintFile to avoid computing twice. +SCCOL nTiledRenderingAreaEndCol = 0; +SCROW nTiledRenderingAreaEndRow = 0; +Size aDocSize = getDocumentSize(nTiledRenderingAreaEndCol, nTiledRenderingAreaEndRow); + pGridWindow->SetOutputSizePixel(Size(aDocSize.Width() * pViewData->GetPPTX(), aDocSize.Height() * pViewData->GetPPTY())); pGridWindow->PaintTile( rDevice, nOutputWidth, nOutputHeight, -nTilePosX, nTilePosY, nTileWidth, nTileHeight ); +nTilePosX, nTilePosY, nTileWidth, nTileHeight, +nTiledRenderingAreaEndCol, nTiledRenderingAreaEndRow ); // Draw Form controls ScDrawLayer* pDrawLayer = pDocShell->GetDocument().GetDrawLayer(); @@ -653,6 +661,13 @@ VclPtr ScModelObj::getDocWindow() } Size ScModelObj::getDocumentSize() +{ +SCCOL nTiledRenderingAreaEndCol = 0; +SCROW nTiledRenderingAreaEndRow = 0; +return getDocumentSize(nTiledRenderingAreaEndCol, nTiledRenderingAreaEndRow); +} + +Size ScModelObj::getDocumentSize(SCCOL& rnTiledRenderingAreaEndCol, SCROW& rnTiledRenderingAreaEndRow) { Size aSize(10, 10); // minimum size @@ -661,11 +676,11 @@ Size ScModelObj::getDocumentSize() return aSize; SCTAB nTab = pViewData->GetTabNo(); -SCCOL nEndCol = 0; -SCROW nEndRow = 0; +rnTiledRenderingAreaEndCol = 0; +rnTiledRenderingAreaEndRow = 0; const ScDocument& rDoc = pDocShell->GetDocument(); -rDoc.GetTiledRenderingArea(nTab, nEndCol, nEndRow); +rDoc.GetTiledRenderingArea(nTab, rnTiledRenderingAreaEndCol, rnTiledRenderingAreaEndRow); const ScDocument* pThisDoc = &rDoc; const double fPPTX = pViewData->GetPPTX(); @@ -676,8 +691,8 @@ Size ScModelObj::getDocumentSize() return ScViewData::ToPixel(nSize, fPPTX); }; -tools::Long nDocWidthPixel = pViewData->GetLOKWidthHelper().compute
[Libreoffice-commits] core.git: 2 commits - i18npool/source
i18npool/source/localedata/LocaleNode.cxx | 46 +++--- i18npool/source/localedata/localedata.cxx | 38 ++-- 2 files changed, 40 insertions(+), 44 deletions(-) New commits: commit 3b53aa7cb6284182c58056b376c1b57dd1414062 Author: Noel Grandin AuthorDate: Wed Jun 14 13:03:58 2023 +0200 Commit: Noel Grandin CommitDate: Wed Jun 14 19:16:59 2023 +0200 speed up startup time by avoid conversion of static locale data from sal_Unicode to OUString data - we can declare the data as OUStringConstExpr arrays and then no conversion is necessary. Change-Id: I95214d09938036935a45e8b8e9752596246dd2e1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153058 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/i18npool/source/localedata/LocaleNode.cxx b/i18npool/source/localedata/LocaleNode.cxx index e0cac2020d4c..b70cae2c713f 100644 --- a/i18npool/source/localedata/LocaleNode.cxx +++ b/i18npool/source/localedata/LocaleNode.cxx @@ -1316,8 +1316,8 @@ void LCCollationNode::generateCode (const OFileWriter &of) const OUString useLocale = getAttr().getValueByName("ref"); if (!useLocale.isEmpty()) { useLocale = useLocale.replace( '-', '_'); -of.writeRefFunction("getCollatorImplementation_", useLocale); -of.writeRefFunction("getCollationOptions_", useLocale); +of.writeOUStringRefFunction("getCollatorImplementation_", useLocale); +of.writeOUStringRefFunction("getCollationOptions_", useLocale); return; } sal_Int16 nbOfCollations = 0; @@ -1329,11 +1329,11 @@ void LCCollationNode::generateCode (const OFileWriter &of) const { OUString str; str = currNode->getAttr().getValueByName("unoid"); -of.writeParameter("CollatorID", str, j); +of.writeOUStringLiteralParameter("CollatorID", str, j); str = currNode->getValue(); -of.writeParameter("CollatorRule", str, j); +of.writeOUStringLiteralParameter("CollatorRule", str, j); str = currNode -> getAttr().getValueByName("default"); -of.writeDefaultParameter("Collator", str, j); +of.writeOUStringLiteralDefaultParameter("Collator", str, j); of.writeAsciiString("\n"); nbOfCollations++; @@ -1344,7 +1344,7 @@ void LCCollationNode::generateCode (const OFileWriter &of) const nbOfCollationOptions = sal::static_int_cast( pCollationOptions->getNumberOfChildren() ); for( sal_Int16 i=0; igetChildAt( i )->getValue(), i ); +of.writeOUStringLiteralParameter("collationOption", pCollationOptions->getChildAt( i )->getValue(), i ); } of.writeAsciiString("static const sal_Int16 nbOfCollationOptions = "); @@ -1356,7 +1356,7 @@ void LCCollationNode::generateCode (const OFileWriter &of) const of.writeInt(nbOfCollations); of.writeAsciiString(";\n\n"); -of.writeAsciiString("\nstatic const sal_Unicode* LCCollatorArray[] = {\n"); +of.writeAsciiString("\nstatic constexpr rtl::OUStringConstExpr LCCollatorArray[] = {\n"); for(sal_Int16 j = 0; j < nbOfCollations; j++) { of.writeAsciiString("\tCollatorID"); of.writeInt(j); @@ -1372,16 +1372,17 @@ void LCCollationNode::generateCode (const OFileWriter &of) const } of.writeAsciiString("};\n\n"); -of.writeAsciiString("static const sal_Unicode* collationOptions[] = {"); +of.writeAsciiString("static constexpr rtl::OUStringConstExpr collationOptions[] = {"); for( sal_Int16 j=0; jgetNumberOfChildren(); for( i=0; igetChildAt( i )->getValue(), sal::static_int_cast(i) ); +of.writeOUStringLiteralParameter("searchOption", pSearchOptions->getChildAt( i )->getValue(), sal::static_int_cast(i) ); } of.writeAsciiString("static const sal_Int16 nbOfSearchOptions = "); of.writeInt( sal::static_int_cast( nSearchOptions ) ); of.writeAsciiString(";\n\n"); -of.writeAsciiString("static const sal_Unicode* searchOptions[] = {"); +of.writeAsciiString("static constexpr rtl::OUStringConstExpr searchOptions[] = {"); for( i=0; i(i) ); -of.writeAsciiString( ", " ); } -of.writeAsciiString("NULL };\n"); -of.writeFunction("getSearchOptions_", "nbOfSearchOptions", "searchOptions"); +of.writeAsciiString(" };\n"); +of.writeOUStringFunction("getSearchOptions_", "nbOfSearchOptions", "searchOptions"); } void LCIndexNode::generateCode (const OFileWriter &of) const diff --git a/i18npool/source/localedata/localedata.cxx b/i18npool/source/localedata/localedata.cxx index 12149ca14ff7..3f45df6cdd1a 100644 --- a/i18npool/source/localedata/localedata.cxx +++ b/i18npool/source/localedata/localedata.cxx @@ -904,13 +904,13 @@ LocaleDataImpl::getDateAcceptancePatterns( const Locale& rLocale ) OUString LocaleDataImpl::getCollatorRuleByAlgorithm( const Locale&
[Libreoffice-commits] core.git: 2 commits - i18npool/source
i18npool/source/localedata/LocaleNode.cxx | 121 +- i18npool/source/localedata/LocaleNode.hxx |3 i18npool/source/localedata/filewriter.cxx |9 +- i18npool/source/localedata/localedata.cxx | 97 +++- 4 files changed, 147 insertions(+), 83 deletions(-) New commits: commit d900f60fa9f0a1772069cbe6e2536311393bff6d Author: Noel Grandin AuthorDate: Wed Jun 14 11:38:42 2023 +0200 Commit: Noel Grandin CommitDate: Wed Jun 14 19:16:38 2023 +0200 speed up startup time by avoid conversion of static locale data from sal_Unicode to OUString data - we can declare the data as OUStringConstExpr arrays and then no conversion is necessary. Change-Id: I4aac81c9224971683cfc7c9085edc7dcd3ee5f10 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153056 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/i18npool/source/localedata/LocaleNode.cxx b/i18npool/source/localedata/LocaleNode.cxx index cab4f1f08ba5..a6e22bf8cedc 100644 --- a/i18npool/source/localedata/LocaleNode.cxx +++ b/i18npool/source/localedata/LocaleNode.cxx @@ -1957,7 +1957,7 @@ void LCCurrencyNode::generateCode (const OFileWriter &of) const OUString useLocale = getAttr().getValueByName("ref"); if (!useLocale.isEmpty()) { useLocale = useLocale.replace( '-', '_'); -of.writeRefFunction("getAllCurrencies_", useLocale); +of.writeOUStringRefFunction("getAllCurrencies_", useLocale); return; } sal_Int16 nbOfCurrencies = 0; @@ -1968,11 +1968,11 @@ void LCCurrencyNode::generateCode (const OFileWriter &of) const for ( sal_Int32 i = 0; i < getNumberOfChildren(); i++,nbOfCurrencies++) { LocaleNode * currencyNode = getChildAt (i); str = currencyNode->getAttr().getValueByName("default"); -bool bDefault = of.writeDefaultParameter("Currency", str, nbOfCurrencies); +bool bDefault = of.writeOUStringLiteralDefaultParameter("Currency", str, nbOfCurrencies); str = currencyNode->getAttr().getValueByName("usedInCompatibleFormatCodes"); -bool bCompatible = of.writeDefaultParameter("CurrencyUsedInCompatibleFormatCodes", str, nbOfCurrencies); +bool bCompatible = of.writeOUStringLiteralDefaultParameter("CurrencyUsedInCompatibleFormatCodes", str, nbOfCurrencies); str = currencyNode->getAttr().getValueByName("legacyOnly"); -bool bLegacy = of.writeDefaultParameter("CurrencyLegacyOnly", str, nbOfCurrencies); +bool bLegacy = of.writeOUStringLiteralDefaultParameter("CurrencyLegacyOnly", str, nbOfCurrencies); if (bLegacy && (bDefault || bCompatible)) incError( "Currency: if legacyOnly==true, both 'default' and 'usedInCompatibleFormatCodes' must be false."); if (bDefault) @@ -1988,12 +1988,12 @@ void LCCurrencyNode::generateCode (const OFileWriter &of) const bTheCompatible = true; } str = currencyNode -> findNode ("CurrencyID") -> getValue(); -of.writeParameter("currencyID", str, nbOfCurrencies); +of.writeOUStringLiteralParameter("currencyID", str, nbOfCurrencies); // CurrencyID MUST be ISO 4217. if (!bLegacy && !isIso4217(str)) incError( "CurrencyID is not ISO 4217"); str = currencyNode -> findNode ("CurrencySymbol") -> getValue(); -of.writeParameter("currencySymbol", str, nbOfCurrencies); +of.writeOUStringLiteralParameter("currencySymbol", str, nbOfCurrencies); // Check if this currency really is the one used in number format // codes. In case of ref=... mechanisms it may be that TheCurrency // couldn't had been determined from the current locale (i.e. is @@ -2001,16 +2001,16 @@ void LCCurrencyNode::generateCode (const OFileWriter &of) const if (bCompatible && !sTheCompatibleCurrency.isEmpty() && sTheCompatibleCurrency != str) incErrorStrStr( "Error: CurrencySymbol \"%s\" flagged as usedInCompatibleFormatCodes doesn't match \"%s\" determined from format codes.\n", str, sTheCompatibleCurrency); str = currencyNode -> findNode ("BankSymbol") -> getValue(); -of.writeParameter("bankSymbol", str, nbOfCurrencies); +of.writeOUStringLiteralParameter("bankSymbol", str, nbOfCurrencies); // BankSymbol currently must be ISO 4217. May change later if // application always uses CurrencyID instead of BankSymbol. if (!bLegacy && !isIso4217(str)) incError( "BankSymbol is not ISO 4217"); str = currencyNode -> findNode ("CurrencyName") -> getValue(); -of.writeParameter("currencyName", str, nbOfCurrencies); +of.writeOUStringLiteralParameter("currencyName", str, nbOfCurrencies); str = currencyNode -> findNode ("DecimalPlaces") -> getValue(); sal_Int16 nDecimalPlaces = static_cast(str.toInt32()); -of.writeIntParameter("currencyDecimalPlaces"
[Libreoffice-commits] core.git: sc/source
sc/source/filter/oox/extlstcontext.cxx |6 ++ 1 file changed, 6 insertions(+) New commits: commit 7c2cfc26381dd31ab43e357eea7a3f5e63d3d6f4 Author: Henry Castro AuthorDate: Fri Mar 17 11:03:36 2023 -0400 Commit: Henry Castro CommitDate: Wed Jun 14 18:17:40 2023 +0200 sc: filter: oox: add missing formula if it is a text ... conditional format: NOT(ISERROR(SEARCH("Done",C1))) Signed-off-by: Henry Castro Change-Id: I4da117a1a122b3895788645dcd5de3e36cdcad0f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149067 Tested-by: Jenkins CollaboraOffice Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153008 Tested-by: Jenkins diff --git a/sc/source/filter/oox/extlstcontext.cxx b/sc/source/filter/oox/extlstcontext.cxx index 2646f0969958..5328accac5c8 100644 --- a/sc/source/filter/oox/extlstcontext.cxx +++ b/sc/source/filter/oox/extlstcontext.cxx @@ -274,6 +274,12 @@ void ExtConditionalFormattingContext::onEndElement() break; case XLS14_TOKEN( cfRule ): { +if (IsSpecificTextCondMode(maModel.eOperator) && nFormulaCount == 1) +{ +maModel.aFormula = aChars; +maModel.eOperator = ScConditionMode::Direct; +} + getStyles().getExtDxfs().forEachMem( &Dxf::finalizeImport ); maModel.aStyle = getStyles().createExtDxfStyle(rStyleIdx); rStyleIdx++;
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - editeng/source include/sfx2 include/svtools sc/source sd/source sfx2/source sw/inc sw/source
editeng/source/editeng/impedit3.cxx | 24 include/sfx2/viewsh.hxx |3 +++ include/svtools/colorcfg.hxx|2 +- sc/source/ui/inc/tabvwsh.hxx|2 ++ sc/source/ui/view/tabvwshc.cxx | 22 ++ sd/source/ui/inc/ViewShellBase.hxx |2 ++ sd/source/ui/view/ViewShellBase.cxx | 27 +++ sfx2/source/view/viewsh.cxx |6 ++ sw/inc/view.hxx |2 ++ sw/source/uibase/uiview/viewprt.cxx | 27 +++ 10 files changed, 112 insertions(+), 5 deletions(-) New commits: commit 0ed32277dc5c0f1989ae59fa05217ae793ae81d9 Author: Paris Oplopoios AuthorDate: Tue Jun 13 20:36:48 2023 +0300 Commit: Paris Oplopoios CommitDate: Wed Jun 14 17:57:16 2023 +0200 Add editengine view separation in tiled rendering Editengine now gets the background color from the current view instead from a global variable Change-Id: I98a0fccf4d0c83f4dabf8e534a9228b8a5e271d7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152996 Tested-by: Jenkins CollaboraOffice Reviewed-by: Paris Oplopoios diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx index 11e12c66e7e8..8a6ff9d63e6e 100644 --- a/editeng/source/editeng/impedit3.cxx +++ b/editeng/source/editeng/impedit3.cxx @@ -52,6 +52,7 @@ #include #include +#include #include #include @@ -67,6 +68,7 @@ #include #include +#include #include #include #include @@ -4696,15 +4698,29 @@ Reference < i18n::XExtendedInputSequenceChecker > const & ImpEditEngine::ImplGet Color ImpEditEngine::GetAutoColor() const { -Color aColor = GetColorConfig().GetColorValue(svtools::FONTCOLOR).nColor; +Color aColor; -if ( GetBackgroundColor() != COL_AUTO ) +if (comphelper::LibreOfficeKit::isActive() && SfxViewShell::Current()) { -if ( GetBackgroundColor().IsDark() && aColor.IsDark() ) +// Get document background color from current view instead +aColor = SfxViewShell::Current()->GetColorConfigColor(svtools::DOCCOLOR); +if (aColor.IsDark()) aColor = COL_WHITE; -else if ( GetBackgroundColor().IsBright() && aColor.IsBright() ) +else aColor = COL_BLACK; } +else +{ +aColor = GetColorConfig().GetColorValue(svtools::FONTCOLOR).nColor; + +if ( GetBackgroundColor() != COL_AUTO ) +{ +if ( GetBackgroundColor().IsDark() && aColor.IsDark() ) +aColor = COL_WHITE; +else if ( GetBackgroundColor().IsBright() && aColor.IsBright() ) +aColor = COL_BLACK; +} +} return aColor; } diff --git a/include/sfx2/viewsh.hxx b/include/sfx2/viewsh.hxx index 0cbbfc64032d..2435caa52a47 100644 --- a/include/sfx2/viewsh.hxx +++ b/include/sfx2/viewsh.hxx @@ -72,6 +72,7 @@ namespace com::sun::star::ui { class XContextMenuInterceptor; } namespace com::sun::star::ui { struct ContextMenuExecuteEvent; } namespace com::sun::star::view { class XRenderable; } namespace tools { class Rectangle; } +namespace svtools { enum ColorConfigEntry : int; } enum class SfxPrinterChangeFlags { @@ -406,6 +407,8 @@ public: virtual void afterCallbackRegistered(); /// See OutlinerViewShell::GetEditWindowForActiveOLEObj(). virtual vcl::Window* GetEditWindowForActiveOLEObj() const override; +/// Get a color config color from this view +virtual ::Color GetColorConfigColor(svtools::ColorConfigEntry nColorType) const; /// Set the LibreOfficeKit language of this view. void SetLOKLanguageTag(const OUString& rBcp47LanguageTag); diff --git a/include/svtools/colorcfg.hxx b/include/svtools/colorcfg.hxx index 08f5d3000bed..5836ab1ea6f9 100644 --- a/include/svtools/colorcfg.hxx +++ b/include/svtools/colorcfg.hxx @@ -27,7 +27,7 @@ namespace svtools{ -enum ColorConfigEntry +enum ColorConfigEntry : int { DOCCOLOR, DOCBOUNDARIES , diff --git a/sc/source/ui/inc/tabvwsh.hxx b/sc/source/ui/inc/tabvwsh.hxx index a1688fb11f83..ee3edd020def 100644 --- a/sc/source/ui/inc/tabvwsh.hxx +++ b/sc/source/ui/inc/tabvwsh.hxx @@ -393,6 +393,8 @@ public: void afterCallbackRegistered() override; /// See SfxViewShell::NotifyCursor(). void NotifyCursor(SfxViewShell* pViewShell) const override; +/// See SfxViewShell::GetColorConfigColor(). +::Color GetColorConfigColor(svtools::ColorConfigEntry nColorType) const override; /// Emits a LOK_CALLBACK_INVALIDATE_HEADER for all views whose current tab is equal to nCurrentTabIndex static void notifyAllViewsHeaderInvalidation(const SfxViewShell* pForViewShell, HeaderType eHeaderType, SCTAB nCurrentTabIndex); static bool isAnyEditViewInRange(const SfxViewShell* pForViewShell, bool bColumns, SCCOLROW nStart, SCCOLROW nEnd); diff --git a/sc/source/ui/view/tabvwshc.cxx b/sc/source/ui
[Libreoffice-commits] core.git: Branch 'distro/cib/libreoffice-6-4' - sw/qa writerfilter/source
sw/qa/extras/ooxmlexport/data/tdf155690.docx |binary sw/qa/extras/ooxmlexport/ooxmlexport13.cxx| 47 ++ writerfilter/source/dmapper/DomainMapper_Impl.cxx |6 ++ 3 files changed, 53 insertions(+) New commits: commit fb3948cc559528013e77549f3502c8c1c954b7f6 Author: Michael Stahl AuthorDate: Wed Jun 14 15:35:24 2023 +0200 Commit: Michael Stahl CommitDate: Wed Jun 14 17:02:26 2023 +0200 tdf#155690 writerfilter: fix import of bookmark in table... ... at start of section. (regression from commit 2e8aad6d45c53d554ccaf26de998ede708cfc289) Change-Id: I1e0e720758b607b69645b29c46f4092264289f9e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153053 Tested-by: Jenkins Reviewed-by: Michael Stahl (cherry picked from commit 142aa77265361492e74707b08c5bcd366e7205ad) diff --git a/sw/qa/extras/ooxmlexport/data/tdf155690.docx b/sw/qa/extras/ooxmlexport/data/tdf155690.docx new file mode 100644 index ..1839862688ee Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf155690.docx differ diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx index 62ad331a8c64..aa6d6e557e79 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx @@ -61,6 +61,53 @@ DECLARE_OOXMLEXPORT_TEST(testTdf126994_lostPageBreak, "tdf126994_lostPageBreak.d CPPUNIT_ASSERT_EQUAL_MESSAGE( "Number of Pages", 3, getPages() ); } +DECLARE_OOXMLEXPORT_TEST(testTdf155690, "tdf155690.docx") +{ +uno::Reference xBookmarksSupplier(mxComponent, uno::UNO_QUERY); +uno::Reference xBookmarks = xBookmarksSupplier->getBookmarks(); +{ +uno::Reference xMark(xBookmarks->getByName("row1_1"), uno::UNO_QUERY); +CPPUNIT_ASSERT(xMark.is()); +// the problem was that the start was after the H +CPPUNIT_ASSERT_EQUAL(OUString("Hello world"), xMark->getAnchor()->getString()); +} +{ +uno::Reference xMark(xBookmarks->getByName("row1_2"), uno::UNO_QUERY); +CPPUNIT_ASSERT(xMark.is()); +CPPUNIT_ASSERT_EQUAL(OUString("Hello world"), xMark->getAnchor()->getString()); +} +{ +uno::Reference xMark(xBookmarks->getByName("row1_3"), uno::UNO_QUERY); +CPPUNIT_ASSERT(xMark.is()); +CPPUNIT_ASSERT_EQUAL(OUString("ello world"), xMark->getAnchor()->getString()); +} +{ +uno::Reference xMark(xBookmarks->getByName("row1_4"), uno::UNO_QUERY); +CPPUNIT_ASSERT(xMark.is()); +CPPUNIT_ASSERT_EQUAL(OUString("Hello world"), xMark->getAnchor()->getString()); +} +{ +uno::Reference xMark(xBookmarks->getByName("row2_1"), uno::UNO_QUERY); +CPPUNIT_ASSERT(xMark.is()); +CPPUNIT_ASSERT_EQUAL(OUString("Hello world"), xMark->getAnchor()->getString()); +} +{ +uno::Reference xMark(xBookmarks->getByName("row2_1"), uno::UNO_QUERY); +CPPUNIT_ASSERT(xMark.is()); +CPPUNIT_ASSERT_EQUAL(OUString("Hello world"), xMark->getAnchor()->getString()); +} +{ +uno::Reference xMark(xBookmarks->getByName("row2_3"), uno::UNO_QUERY); +CPPUNIT_ASSERT(xMark.is()); +CPPUNIT_ASSERT_EQUAL(OUString("ello world"), xMark->getAnchor()->getString()); +} +{ +uno::Reference xMark(xBookmarks->getByName("row2_4"), uno::UNO_QUERY); +CPPUNIT_ASSERT(xMark.is()); +CPPUNIT_ASSERT_EQUAL(OUString("Hello world"), xMark->getAnchor()->getString()); +} +} + DECLARE_OOXMLEXPORT_TEST(testTdf121374_sectionHF, "tdf121374_sectionHF.odt") { uno::Reference xPageStyle(getStyles("PageStyles")->getByName("Standard"), uno::UNO_QUERY); diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index 049a644cbef8..22626bc8bf34 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -6003,6 +6003,9 @@ void DomainMapper_Impl::StartOrEndBookmark( const OUString& rId ) else { xCursor = xText->createTextCursorByRange( aBookmarkIter->second.m_xTextRange ); +} +if (!aBookmarkIter->second.m_bIsStartOfText) +{ xCursor->goRight( 1, false ); } @@ -6131,6 +6134,9 @@ void DomainMapper_Impl::startOrEndPermissionRange(sal_Int32 permissinId) else { xCursor = xText->createTextCursorByRange(aPermIter->second.m_xTextRange); +} +if (!aPermIter->second.m_bIsStartOfText) +{ xCursor->goRight(1, false); }
[Libreoffice-commits] core.git: Branch 'libreoffice-7-6' - include/xmloff sw/inc sw/qa sw/source xmloff/qa xmloff/source
include/xmloff/txtparae.hxx |6 sw/inc/numrule.hxx|3 sw/qa/core/unocore/unocore.cxx| 41 - sw/source/core/doc/number.cxx | 23 -- sw/source/core/unocore/unoparagraph.cxx | 18 -- sw/source/uibase/uno/unotxdoc.cxx | 28 +++ xmloff/qa/unit/data/differentListStylesInOneList.fodt | 47 + xmloff/qa/unit/text.cxx | 104 xmloff/source/text/XMLTextNumRuleInfo.cxx | 12 - xmloff/source/text/XMLTextNumRuleInfo.hxx |5 xmloff/source/text/txtparae.cxx | 146 +++--- 11 files changed, 328 insertions(+), 105 deletions(-) New commits: commit 32981c8c7a166eb7309a40bdd4799ad77fcd1615 Author: Mike Kaganski AuthorDate: Tue Jun 13 23:15:08 2023 +0300 Commit: Mike Kaganski CommitDate: Wed Jun 14 17:39:36 2023 +0200 tdf#155823: Improve the check if the list id is not required The implementation introduced in commit 8f48f91009caa86d896f247059874242ed18bf39 (SwNumRule::HasContinueList) was a bit naive: it assumed that maTextNodeList is sorted (it is not, and so, valid cases to avoid the id were missed); it assumed that a given list can only consist of items of a single numbering style, and so only tested the list of nodes referenced from maTextNodeList of given SwNumRule. I.e., this implementation targeted a special case of a list style fully covering a single continuous list. This skipped ids for list items with list styles, in which maTextNodeList passed the check in HasContinueList, but which were followed by items with a different list style, continuing the same list. This constellation outputs continue-list attribute in the following items (see XMLTextParagraphExport::exportListChange), which references the skipped id. The resulting ODF is an invalid XML (an xml:id is missing that is referenced), and also does not allow to continue such a list. The change tries to fix this, using a list of nodes in XMLTextParagraphExport, and analyzing if the list of the current paragraph has a continuation that needs to reference this list id. Two new hidden properties introduced in SwXParagraph and SwXTextDocument: "ODFExport_NodeIndex" and "ODFExport_ListNodes", resp. They allow to pipe the data to the export. The previous special casing of property state for "ListId", used in SwNumRule::HasContinueList, is removed together with the mentioned function. The intention is to have a logic allowing to detect 100% cases where the list id is required, and where it's not required. A related unit test for tdf#149668 was fixed to not rely on the mentioned ListId property state workaround, and moved from sw/qa/core/unocore to xmloff/qa/unit. Change-Id: If6a6ac7a3dfe0b2ea143229678a603875153eedb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153044 Tested-by: Jenkins Reviewed-by: Mike Kaganski (cherry picked from commit 82bbf63582bdf28e7918e58ebf6657a9144bc9f3) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153027 Reviewed-by: Miklos Vajna diff --git a/include/xmloff/txtparae.hxx b/include/xmloff/txtparae.hxx index 1ba8b0b1a0c8..af23376d1160 100644 --- a/include/xmloff/txtparae.hxx +++ b/include/xmloff/txtparae.hxx @@ -112,6 +112,9 @@ class XMLOFF_DLLPUBLIC XMLTextParagraphExport : public XMLStyleExport XMLTextListsHelper* mpTextListsHelper; ::std::vector< std::unique_ptr > maTextListsHelperStack; +struct DocumentListNodes; +std::unique_ptr mpDocumentListNodes; + o3tl::sorted_vector> maFrameRecurseGuard; o3tl::sorted_vector> maShapeRecurseGuard; @@ -537,6 +540,9 @@ public: void PopTextListsHelper(); private: +bool ShouldSkipListId(const css::uno::Reference& xTextContent); +bool ExportListId() const; + XMLTextParagraphExport(XMLTextParagraphExport const &) = delete; }; diff --git a/sw/inc/numrule.hxx b/sw/inc/numrule.hxx index fde2c8de0fb8..f642e21e746c 100644 --- a/sw/inc/numrule.hxx +++ b/sw/inc/numrule.hxx @@ -272,9 +272,6 @@ public: void dumpAsXml(xmlTextWriterPtr w) const; void GetGrabBagItem(css::uno::Any& rVal) const; void SetGrabBagItem(const css::uno::Any& rVal); - -/// Is it possible that this numbering has multiple lists? -bool HasContinueList() const; }; /// namespace for static functions and methods for numbering and bullets diff --git a/sw/qa/core/unocore/unocore.cxx b/sw/qa/core/unocore/unocore.cxx index 605813a719b3..a1e931e75fb4 100644 --- a/sw/qa/core/unocore/unocore.cxx +++ b/sw/qa/core/unocore/unocore.cxx @@ -668,47 +668,6 @@ CPPUNIT_TEST_FIXTURE(SwCoreUnocoreTest, testContentControlDate) CPPUNIT_ASSERT_EQUAL(OUString("sdtContentLocked"), pContentControl->
ESC meeting agenda: 2023-06-15 16:00 CEST
Hi, The prototype agenda is below. Extra items are appreciated either in this document or as a reply to this mail: https://pad.documentfoundation.org/p/esc You can join using Jitsi here: https://jitsi.documentfoundation.org/esc Regards, Miklos --- * Present: + * Completed Action Items: * Pending Action Items: + ESC tendering: prepare the sheet with the ideas + estimates (Ilmari, Xisco) + update Caolan's affiliation on the TDF / ESC page (Ilmari) + give the commit bit to Taichi (Cloph) + send the welcome mail to Taichi (Miklos) * Release Engineering update (Cloph/Xisco) + 7.6 status: rc 1 will be in 3 weeks? / string / UI freeze + 7.5 status: 7.5.5 rc1 in 2 weeks? * Documentation (Olivier) + Bugzilla Documentation statistics 260(260) bugs open + Updates: BZ changes 1 week 1 month 3 months 12 months created 2(-1)17(-14)82(-8) 303(0) commented 7(-2)46(-21) 247(-24) 1034(4) resolved 1(0) 9(-4) 39(-4) 176(1) + top 10 contributors: Seth Chaiklin made 12 changes in 1 month, and 329 changes in 1 year Olivier Hallot made 11 changes in 1 month, and 500 changes in 1 year Stéphane Guillou made 7 changes in 1 month, and 219 changes in 1 year Heiko Tietze made 6 changes in 1 month, and 108 changes in 1 year Robert Großkopf made 5 changes in 1 month, and 14 changes in 1 year Roman Kuznetsov made 4 changes in 1 month, and 72 changes in 1 year Ilmari Lauhakangas made 4 changes in 1 month, and 107 changes in 1 year Vernon, Stuart Foote made 4 changes in 1 month, and 44 changes in 1 year Kaganski, Mike made 3 changes in 1 month, and 101 changes in 1 year Cip made 2 changes in 1 month, and 2 changes in 1 year * UX Update (Heiko) + Bugzilla (topicUI) statistics 275(275) (topicUI) bugs open, 62(62) (needsUXEval) needs to be evaluated by the UXteam + Updates: BZ changes 1 week1 month3 months 12 months added 8(4) 14(4) 32(1) 55(5) commented 33(-33) 203(-58) 834(-44) 2366(-1) removed 1(0) 4(-1) 14(0) 30(1) resolved 2(-6) 30(-15) 103(-6) 312(-8) + top 10 contributors: Heiko Tietze made 144 changes in 1 month, and 1462 changes in 1 year Stéphane Guillou made 42 changes in 1 month, and 332 changes in 1 year Dieter made 37 changes in 1 month, and 251 changes in 1 year Eyal Rozenberg made 23 changes in 1 month, and 270 changes in 1 year Vernon, Stuart Foote made 19 changes in 1 month, and 368 changes in 1 year Bogdan B made 16 changes in 1 month, and 83 changes in 1 year Telesto made 15 changes in 1 month, and 74 changes in 1 year Ilmari Lauhakangas made 14 changes in 1 month, and 207 changes in 1 year Seth Chaiklin made 13 changes in 1 month, and 76 changes in 1 year Attila Szűcs made 12 changes in 1 month, and 12 changes in 1 year * ESC tender project proposal process (Thorsten & Florian) + propose a separate call, for those who want to rank (Thorsten) + suggest to re-use the ESC call timeslot for this if it works for everyone (Miklos) + no objections, let's decide next week (Thorsten) * Crash Testing (Caolan) + 31(+4) import failure, 5(+5) export failures + ??? coverity issues + Google / ossfuzz: ?? fuzzers active now * Crash Reporting (Xisco) + 7.5.1.220937(+765) + 7.5.2.214107(+884) + 7.5.3.29654(+2033) + 7.5.4.2382(+0) * Mentoring (Hossein) committer... 1 week 1 month 3 months12 months open 72(21) 139(37) 189(36) 199(37) reviews 380(140) 1088(124) 2922(0) 10814(136) merged 265(3) 1086(35)3103(-33) 12416(122) abandoned 19(5) 56(9) 173(11) 658(11) own commits 148(-22)712(-51) 2365(-69) 10304(8) review commits 54(8) 238(0) 731(-74)3042(1) contributor... 1 week1 month 3 months12 months open 14(-2) 30(-15)217(-14) 221(-13) reviews 752(70) 2606(68)7938(-82) 31894(116) merged 16(1) 61(-27)445(-49)2791(-100) abandoned 2(1) 6(-4) 60(-6) 499(-14) own commits 20(-1) 74(-4) 258(-42)1007(-33) review commits 0(0) 0(0)0(0) 0(0) + easyHack statistics: needsDevEval 8(8) needsUXEval 1(1) cleanup_comments 329(329) total 396(396) assigned 27(27) open 343(343) + top 10 contributors: Dr. David Alan Gilbert made 10 patches in 1 month, and 15 patch
[Libreoffice-commits] core.git: sw/qa writerfilter/source
sw/qa/extras/ooxmlexport/data/tdf155690.docx |binary sw/qa/extras/ooxmlexport/ooxmlexport13.cxx| 47 ++ writerfilter/source/dmapper/DomainMapper_Impl.cxx |6 ++ 3 files changed, 53 insertions(+) New commits: commit 142aa77265361492e74707b08c5bcd366e7205ad Author: Michael Stahl AuthorDate: Wed Jun 14 15:35:24 2023 +0200 Commit: Michael Stahl CommitDate: Wed Jun 14 16:54:26 2023 +0200 tdf#155690 writerfilter: fix import of bookmark in table... ... at start of section. (regression from commit 2e8aad6d45c53d554ccaf26de998ede708cfc289) Change-Id: I1e0e720758b607b69645b29c46f4092264289f9e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153053 Tested-by: Jenkins Reviewed-by: Michael Stahl diff --git a/sw/qa/extras/ooxmlexport/data/tdf155690.docx b/sw/qa/extras/ooxmlexport/data/tdf155690.docx new file mode 100644 index ..1839862688ee Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf155690.docx differ diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx index f6c1b84fcec9..80243ba64a2d 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx @@ -58,6 +58,53 @@ DECLARE_OOXMLEXPORT_TEST(testTdf126994_lostPageBreak, "tdf126994_lostPageBreak.d CPPUNIT_ASSERT_EQUAL_MESSAGE( "Number of Pages", 3, getPages() ); } +DECLARE_OOXMLEXPORT_TEST(testTdf155690, "tdf155690.docx") +{ +uno::Reference xBookmarksSupplier(mxComponent, uno::UNO_QUERY); +uno::Reference xBookmarks = xBookmarksSupplier->getBookmarks(); +{ +uno::Reference xMark(xBookmarks->getByName("row1_1"), uno::UNO_QUERY); +CPPUNIT_ASSERT(xMark.is()); +// the problem was that the start was after the H +CPPUNIT_ASSERT_EQUAL(OUString("Hello world"), xMark->getAnchor()->getString()); +} +{ +uno::Reference xMark(xBookmarks->getByName("row1_2"), uno::UNO_QUERY); +CPPUNIT_ASSERT(xMark.is()); +CPPUNIT_ASSERT_EQUAL(OUString("Hello world"), xMark->getAnchor()->getString()); +} +{ +uno::Reference xMark(xBookmarks->getByName("row1_3"), uno::UNO_QUERY); +CPPUNIT_ASSERT(xMark.is()); +CPPUNIT_ASSERT_EQUAL(OUString("ello world"), xMark->getAnchor()->getString()); +} +{ +uno::Reference xMark(xBookmarks->getByName("row1_4"), uno::UNO_QUERY); +CPPUNIT_ASSERT(xMark.is()); +CPPUNIT_ASSERT_EQUAL(OUString("Hello world"), xMark->getAnchor()->getString()); +} +{ +uno::Reference xMark(xBookmarks->getByName("row2_1"), uno::UNO_QUERY); +CPPUNIT_ASSERT(xMark.is()); +CPPUNIT_ASSERT_EQUAL(OUString("Hello world"), xMark->getAnchor()->getString()); +} +{ +uno::Reference xMark(xBookmarks->getByName("row2_1"), uno::UNO_QUERY); +CPPUNIT_ASSERT(xMark.is()); +CPPUNIT_ASSERT_EQUAL(OUString("Hello world"), xMark->getAnchor()->getString()); +} +{ +uno::Reference xMark(xBookmarks->getByName("row2_3"), uno::UNO_QUERY); +CPPUNIT_ASSERT(xMark.is()); +CPPUNIT_ASSERT_EQUAL(OUString("ello world"), xMark->getAnchor()->getString()); +} +{ +uno::Reference xMark(xBookmarks->getByName("row2_4"), uno::UNO_QUERY); +CPPUNIT_ASSERT(xMark.is()); +CPPUNIT_ASSERT_EQUAL(OUString("Hello world"), xMark->getAnchor()->getString()); +} +} + CPPUNIT_TEST_FIXTURE(Test, testTdf121374_sectionHF) { loadAndReload("tdf121374_sectionHF.odt"); diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index 41ca8bf8d45e..f75fbf529c96 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -8344,6 +8344,9 @@ void DomainMapper_Impl::StartOrEndBookmark( const OUString& rId ) else { xCursor = xText->createTextCursorByRange( aBookmarkIter->second.m_xTextRange ); +} +if (!aBookmarkIter->second.m_bIsStartOfText) +{ xCursor->goRight( 1, false ); } @@ -8485,6 +8488,9 @@ void DomainMapper_Impl::startOrEndPermissionRange(sal_Int32 permissinId) else { xCursor = xText->createTextCursorByRange(aPermIter->second.m_xTextRange); +} +if (!aPermIter->second.m_bIsStartOfText) +{ xCursor->goRight(1, false); }
[Libreoffice-commits] core.git: configure.ac
configure.ac |6 +- 1 file changed, 5 insertions(+), 1 deletion(-) New commits: commit 7b31137fee6b9c81bd88944f9dd08c9ad4620103 Author: Christian Lohmaier AuthorDate: Wed Aug 17 13:55:04 2022 +0200 Commit: Taichi Haradaguchi <20001...@ymail.ne.jp> CommitDate: Wed Jun 14 16:46:59 2023 +0200 fix ant related test for paths with non-ascii characters autoconf forces LC_ALL=C and that in turn sets java's I/O encoding without a way to override separately (https://bugs.java.com/bugdatabase/view_bug.do?bug_id=4163515) and that breaks if the build/source path contains non-ascii characters: java.lang.ExceptionInInitializerError […] Caused by: java.nio.file.InvalidPathException: Malformed input or input contains unmappable characters […] so set LC_ALL to $LANG for the ant/java tests to unbreak that part of the tests. Change-Id: I5bf197acd48610f1861904be027aa027e1d46024 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138441 Tested-by: Jenkins Reviewed-by: Taichi Haradaguchi <20001...@ymail.ne.jp> diff --git a/configure.ac b/configure.ac index ed6475647a28..4c1efff0799e 100644 --- a/configure.ac +++ b/configure.ac @@ -13649,6 +13649,9 @@ dnl === dnl Test for the presence of Ant and that it works dnl === +# java takes the encoding from LC_ALL, and since autoconf forces it to C it +# breaks filename decoding, so for the ant section, set it to LANG +LC_ALL=$LANG if test "$ENABLE_JAVA" != "" -a "$NEED_ANT" = "TRUE" -a "$cross_compiling" != "yes"; then ANT_HOME=; export ANT_HOME WITH_ANT_HOME=; export WITH_ANT_HOME @@ -13867,7 +13870,8 @@ if test "$ENABLE_JAVA" != "" -a "$with_junit" != "no" -a "$cross_compiling" != " fi AC_SUBST(OOO_JUNIT_JAR) AC_SUBST(HAMCREST_JAR) - +# set back LC_ALL to C after the java related tests... +LC_ALL=C AC_SUBST(SCPDEFS)
New Defects reported by Coverity Scan for LibreOffice
Hi, Please find the latest report on new defect(s) introduced to LibreOffice found with Coverity Scan. 1 new defect(s) introduced to LibreOffice found with Coverity Scan. 4 defect(s), reported by Coverity Scan earlier, were marked fixed in the recent build analyzed by Coverity Scan. New defect(s) Reported-by: Coverity Scan Showing 1 of 1 defect(s) ** CID 1532384: Memory - illegal accesses (OVERRUN) /sc/source/filter/oox/condformatbuffer.cxx: 268 in oox::xlsimportOOXColor(const oox::AttributeList &, const oox::xls::ThemeBuffer &, const oox::GraphicHelper &)() *** CID 1532384: Memory - illegal accesses (OVERRUN) /sc/source/filter/oox/condformatbuffer.cxx: 268 in oox::xlsimportOOXColor(const oox::AttributeList &, const oox::xls::ThemeBuffer &, const oox::GraphicHelper &)() 262 nColor = rThemeBuffer.getColorByIndex( nThemeIndex ); 263 } 264 else if (rAttribs.hasAttribute(XML_indexed)) 265 { 266 sal_uInt32 nIndexed = rAttribs.getUnsigned(XML_indexed, 0); 267 if (nIndexed < sizeof(IndexedColors)) >>> CID 1532384: Memory - illegal accesses (OVERRUN) >>> Overrunning array "oox::xls::IndexedColors" of 66 4-byte elements at >>> element index 263 (byte offset 1055) using index "nIndexed" (which >>> evaluates to 263). 268 nColor = IndexedColors[nIndexed]; 269 } 270 271 ::Color aColor; 272 double nTint = rAttribs.getDouble(XML_tint, 0.0); 273 if (nTint != 0.0) To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50ypSs1kiFPuCn2xFdlMIFBirii0zZ9j2-2F9F2XPBcBm2BNgi9duPy3v-2FzgFDd2LJ-2BDKI-3D4i9j_OTq2XUZbbipYjyLSo6GRo-2FpVxQ9OzkDINu9UTS-2FQhSdO0F0jQniitrGlNxDIzPJiCse12Q9RqDBKvTdXFqnSYqIPnp-2FfdbD1Ifp-2FuOwwQ8Qo2bM9oOSeI7wqogUQk6-2BOjb6gfCJL05OKBjXPrkXPHEq5NSv3wLCTAo1Ro3V4ldE4H3qDVn2ndNLSUG1yfrHun5MGgR6RlUyBgsQtvliWqfAVSm-2BVgIq69E6PnbrBmLE-3D
[Libreoffice-commits] core.git: 2 commits - sw/qa
sw/qa/core/text/data/tdf139863.fodt | 302 +++ sw/qa/core/text/data/tdf89288.fodt | 307 sw/qa/core/text/text.cxx| 62 +++ 3 files changed, 671 insertions(+) New commits: commit adc69b98197637b738f18d9a51d248e305247126 Author: Khaled Hosny AuthorDate: Wed Jun 14 13:38:20 2023 +0300 Commit: خالد حسني CommitDate: Wed Jun 14 16:05:51 2023 +0200 tdf#139863: Add test Change-Id: Ia3cb97203b71204688e8911668a274ac491af2bb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153045 Tested-by: Jenkins Reviewed-by: خالد حسني diff --git a/sw/qa/core/text/data/tdf139863.fodt b/sw/qa/core/text/data/tdf139863.fodt new file mode 100644 index ..f930a5dafc08 --- /dev/null +++ b/sw/qa/core/text/data/tdf139863.fodt @@ -0,0 +1,302 @@ + + +http://www.w3.org/TR/css3-text/"; xmlns:grddl="http://www.w3.org/2003/g/data-view#"; xmlns:xhtml="http://www.w3.org/1999/xhtml"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xmlns:xsd="http://www.w3.org/2001/XMLSchema"; xmlns:xforms="http://www.w3.org/2002/xforms"; xmlns:dom="http://www.w3.org/2001/xml-events"; xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML"; xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:officeooo="http://openoffice.org/2009/office"; xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:formx="u rn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:rpt="http://openoffice.org/2005/report"; xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:tableooo="http://openoffice.org/2009/table"; xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:dc="http://purl.org/dc/elements/1.1/"; xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:oooc="http://openoffice.org/2004/calc"; xmlns:xlink="http://www.w3.org/1999/xlink"; xmlns:drawooo="http://openoffice.org/2010/draw"; xmlns:ooow="http://openoffice.org/2004/writer"; xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:ooo="http:/ /openoffice.org/2004/office" xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" office:version="1.3" office:mimetype="application/vnd.oasis.opendocument.text"> + 2021-01-23T17:39:50.6850737642023-06-14T13:26:20.254164867PT16M5S8LibreOfficeDev/24.2.0.0.alpha0$MacOSX_X86_64 LibreOffice_project/bb582ae40e03e1729635b0f02331fe61f9cafea8 + + + 0 + 0 + 9694 + 5487 + true + false + + + view2 + 3614 + 3286 + 0 + 0 + 9693 + 5486 + 0 + 1 + false + 334 + false + false + false + true + false + false + + + + + true + true + true + false + + false + false + true + true + true + false + false + false + false + true + false + false + false + false + 0 + 0 + false + false + false + false + false + true + false + false + true + false + false + + false + false + + true + false + false + false + false + false + false + true + true + false + false + false + false + true + false + false + + false + false + false + false + false + false + 0 + false + false + false + false + false + true + false + false + false + false + false + false + false + + true + false + true + true + false + true + true + false + 1789074 + true + true + false + + false + true + false + high-resolution + 1 + 0 + true + false + false + true + true + true + true + true + false + true + + false + true + 2307350 + false + + + + + http://openoffice.org/2004/office"; xmlns:xlink="http://www.w3.org/1999/xlink"/> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
[Libreoffice-commits] core.git: Branch 'libreoffice-7-6' - sc/source vcl/osx
sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx | 14 +- sc/source/ui/inc/AccessibleSpreadsheet.hxx |3 +++ vcl/osx/a11ytablewrapper.mm |3 ++- 3 files changed, 18 insertions(+), 2 deletions(-) New commits: commit c8a8b8e3a03a02c7ee0b616eb728103fb7cefad0 Author: Noel Grandin AuthorDate: Mon Jun 12 20:02:19 2023 +0200 Commit: Patrick Luby CommitDate: Wed Jun 14 16:04:51 2023 +0200 tdf#155376 weakly cache ScAccessibleCell the macOS accessibility framework repeatedly queries and enumerates all of the visible cells. Every time this happens we create a new set of ScAccessibleCell, which then live until the application shuts down, which then causes a very slow shutdown. So I fix the problem by caching the ScAccessibleCell so we return the same one for a given cell position. Of course, this begs the question of why the ScAccessibleCell objects are not dying when we create new ones, which means we have some kind of leak or lifecycle problem somewhere, but anyhow, this is a fairly simple and comprehensive fix. Change-Id: Id2765236ac4524f490a51b56268fb8038612fd43 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152932 Tested-by: Jenkins Reviewed-by: Patrick Luby Reviewed-by: Noel Grandin (cherry picked from commit f22cb3dfab413a2917cd810b8e1b8f644a016327) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153025 diff --git a/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx b/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx index 38e9fb7b7fde..03b92c39b996 100644 --- a/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx +++ b/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx @@ -913,7 +913,9 @@ rtl::Reference ScAccessibleSpreadsheet::GetAccessibleCellAt(sa return m_pAccFormulaCell; } else +{ return ScAccessibleCell::create(this, mpViewShell, aCellAddress, GetAccessibleIndexFormula(nRow, nColumn), meSplitPos, mpAccDoc); +} } else { @@ -924,7 +926,17 @@ rtl::Reference ScAccessibleSpreadsheet::GetAccessibleCellAt(sa return mpAccCell; } else -return ScAccessibleCell::create(this, mpViewShell, aCellAddress, getAccessibleIndex(nRow, nColumn), meSplitPos, mpAccDoc); +{ +rtl::Reference xCell; +auto it = m_mapCells.find(aCellAddress); +if (it != m_mapCells.end()) +xCell = it->second.get(); +if (xCell) +return xCell; +xCell = ScAccessibleCell::create(this, mpViewShell, aCellAddress, getAccessibleIndex(nRow, nColumn), meSplitPos, mpAccDoc); +m_mapCells.insert(std::make_pair(aCellAddress, xCell)); +return xCell; +} } } diff --git a/sc/source/ui/inc/AccessibleSpreadsheet.hxx b/sc/source/ui/inc/AccessibleSpreadsheet.hxx index 78e735942270..cfe604c7d4d6 100644 --- a/sc/source/ui/inc/AccessibleSpreadsheet.hxx +++ b/sc/source/ui/inc/AccessibleSpreadsheet.hxx @@ -22,6 +22,7 @@ #include #include +#include #include "AccessibleTableBase.hxx" #include "viewdata.hxx" @@ -267,6 +268,8 @@ private: OUString m_strCurCellValue; ScRangeList m_LastMarkedRanges; OUString m_strOldTabName; +std::map > + m_mapCells; }; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/osx/a11ytablewrapper.mm b/vcl/osx/a11ytablewrapper.mm index 6f8775f0a4b5..1c155313c97f 100644 --- a/vcl/osx/a11ytablewrapper.mm +++ b/vcl/osx/a11ytablewrapper.mm @@ -19,7 +19,7 @@ #include - +#include #include "a11ytablewrapper.h" using namespace ::com::sun::star::accessibility; @@ -79,6 +79,7 @@ using namespace ::com::sun::star::uno; sal_Int32 columnTopLeft = accessibleTable -> getAccessibleColumn ( idxTopLeft ); sal_Int32 rowBottomRight = accessibleTable -> getAccessibleRow ( idxBottomRight ); sal_Int32 columnBottomRight = accessibleTable -> getAccessibleColumn ( idxBottomRight ); +SAL_WARN("vcl", "creating " << ((rowBottomRight - rowTopLeft) * (columnBottomRight - columnTopLeft)) << " cells"); // create an array containing the visible cells for ( sal_Int32 rowCount = rowTopLeft; rowCount <= rowBottomRight; rowCount++ ) {
[Libreoffice-commits] core.git: Branch 'distro/mimo/mimo-7-4' - 3 commits - sc/inc sc/source
sc/inc/colorscale.hxx |3 +++ sc/inc/conditio.hxx|5 + sc/source/core/data/colorscale.cxx | 21 + sc/source/core/data/conditio.cxx | 20 sc/source/core/data/table2.cxx |3 +++ sc/source/filter/html/htmlexp.cxx | 23 ++- 6 files changed, 74 insertions(+), 1 deletion(-) New commits: commit 11be07a66dee9f324850cfbdf7d92a4c6774902d Author: Henry Castro AuthorDate: Thu May 11 16:29:55 2023 -0400 Commit: Andras Timar CommitDate: Wed Jun 14 14:31:25 2023 +0200 tdf#154477: sc: filter: html: fix missing color scale conditional format When copying a range cell to an external application that request html data, the color scale conditional format does not have an associate a set attribute. Signed-off-by: Henry Castro Change-Id: I82b466a2100abc5070e92f844dc706d9b015c2e1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151837 Tested-by: Jenkins (cherry picked from commit 604c27f7c382bdd6baea73e60eed6525b9bfbd3d) diff --git a/sc/source/filter/html/htmlexp.cxx b/sc/source/filter/html/htmlexp.cxx index 9c9f8745fac0..1f9edb6b5a3d 100644 --- a/sc/source/filter/html/htmlexp.cxx +++ b/sc/source/filter/html/htmlexp.cxx @@ -64,6 +64,8 @@ #include #include #include +#include +#include #include #include @@ -880,10 +882,27 @@ void ScHTMLExport::WriteTables() void ScHTMLExport::WriteCell( sc::ColumnBlockPosition& rBlockPos, SCCOL nCol, SCROW nRow, SCTAB nTab ) { +std::optional aColorScale; ScAddress aPos( nCol, nRow, nTab ); ScRefCellValue aCell(*pDoc, aPos, rBlockPos); const ScPatternAttr* pAttr = pDoc->GetPattern( nCol, nRow, nTab ); const SfxItemSet* pCondItemSet = pDoc->GetCondResult( nCol, nRow, nTab, &aCell ); +if (!pCondItemSet) +{ +ScConditionalFormatList* pCondList = pDoc->GetCondFormList(nTab); +const ScCondFormatItem& rCondItem = pAttr->GetItem(ATTR_CONDITIONAL); +const ScCondFormatIndexes& rCondIndex = rCondItem.GetCondFormatData(); +if (rCondIndex.size() > 0) +{ +ScConditionalFormat* pCondFmt = pCondList->GetFormat(rCondIndex[0]); +if (pCondFmt) +{ +const ScColorScaleFormat* pEntry = dynamic_cast(pCondFmt->GetEntry(0)); +if (pEntry) +aColorScale = pEntry->GetColor(aPos); +} +} +} const ScMergeFlagAttr& rMergeFlagAttr = pAttr->GetItem( ATTR_MERGE_FLAG, pCondItemSet ); if ( rMergeFlagAttr.IsOverlapped() ) @@ -1022,7 +1041,9 @@ void ScHTMLExport::WriteCell( sc::ColumnBlockPosition& rBlockPos, SCCOL nCol, SC ATTR_BACKGROUND, pCondItemSet ); Color aBgColor; -if ( rBrushItem.GetColor().GetAlpha() == 0 ) +if ( aColorScale ) +aBgColor = *aColorScale; +else if ( rBrushItem.GetColor().GetAlpha() == 0 ) aBgColor = aHTMLStyle.aBackgroundColor; // No unwanted background color else aBgColor = rBrushItem.GetColor(); commit bea5434e280f20568de50c9c90c946259c7d3db3 Author: Henry Castro AuthorDate: Thu May 11 16:23:03 2023 -0400 Commit: Andras Timar CommitDate: Wed Jun 14 14:31:09 2023 +0200 tdf#154477: sc: copy cache values when clone color conditional format When clone a conditional format list, also copy the cache values that hold the min and max values, otherwise if clone occurs when copying to the clipboard the values have wrong data due to limiting range cells copied. Signed-off-by: Henry Castro Change-Id: Id9085a1488a3bde24842e0d2e062c9b425074157 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151836 Tested-by: Jenkins (cherry picked from commit c85255fd7a62bec9342fa6f2a79d1395979d54be) diff --git a/sc/inc/colorscale.hxx b/sc/inc/colorscale.hxx index 9923eac4c572..fc5c34dda287 100644 --- a/sc/inc/colorscale.hxx +++ b/sc/inc/colorscale.hxx @@ -224,6 +224,8 @@ public: virtual ~ScColorFormat() override; const ScRangeList& GetRange() const; +void SetCache(const std::vector& aValues); +std::vector GetCache() const; virtual void SetParent(ScConditionalFormat* pParent) override; diff --git a/sc/source/core/data/colorscale.cxx b/sc/source/core/data/colorscale.cxx index 33880848d5fc..246541b78a68 100644 --- a/sc/source/core/data/colorscale.cxx +++ b/sc/source/core/data/colorscale.cxx @@ -378,6 +378,9 @@ ScColorScaleFormat::ScColorScaleFormat(ScDocument* pDoc, const ScColorScaleForma { maColorScales.emplace_back(new ScColorScaleEntry(pDoc, *rxEntry)); } + +auto aCache = rFormat.GetCache(); +SetCache(aCache); } ScColorFormat* ScColorScaleFormat::Clone(ScDocument* pDoc) const @@ -439,6 +442,18 @@ const ScRangeList& ScColorFormat::GetRange() const return mpParent->GetRange(); } +std::vector ScColorFormat::GetCache() const +{ +std::vector empty; +
[Libreoffice-commits] core.git: include/xmloff sw/inc sw/qa sw/source xmloff/qa xmloff/source
include/xmloff/txtparae.hxx |6 sw/inc/numrule.hxx|3 sw/qa/core/unocore/unocore.cxx| 41 - sw/source/core/doc/number.cxx | 23 -- sw/source/core/unocore/unoparagraph.cxx | 18 -- sw/source/uibase/uno/unotxdoc.cxx | 28 +++ xmloff/qa/unit/data/differentListStylesInOneList.fodt | 47 + xmloff/qa/unit/text.cxx | 104 xmloff/source/text/XMLTextNumRuleInfo.cxx | 12 - xmloff/source/text/XMLTextNumRuleInfo.hxx |5 xmloff/source/text/txtparae.cxx | 146 +++--- 11 files changed, 328 insertions(+), 105 deletions(-) New commits: commit 82bbf63582bdf28e7918e58ebf6657a9144bc9f3 Author: Mike Kaganski AuthorDate: Tue Jun 13 23:15:08 2023 +0300 Commit: Mike Kaganski CommitDate: Wed Jun 14 15:46:53 2023 +0200 tdf#155823: Improve the check if the list id is not required The implementation introduced in commit 8f48f91009caa86d896f247059874242ed18bf39 (SwNumRule::HasContinueList) was a bit naive: it assumed that maTextNodeList is sorted (it is not, and so, valid cases to avoid the id were missed); it assumed that a given list can only consist of items of a single numbering style, and so only tested the list of nodes referenced from maTextNodeList of given SwNumRule. I.e., this implementation targeted a special case of a list style fully covering a single continuous list. This skipped ids for list items with list styles, in which maTextNodeList passed the check in HasContinueList, but which were followed by items with a different list style, continuing the same list. This constellation outputs continue-list attribute in the following items (see XMLTextParagraphExport::exportListChange), which references the skipped id. The resulting ODF is an invalid XML (an xml:id is missing that is referenced), and also does not allow to continue such a list. The change tries to fix this, using a list of nodes in XMLTextParagraphExport, and analyzing if the list of the current paragraph has a continuation that needs to reference this list id. Two new hidden properties introduced in SwXParagraph and SwXTextDocument: "ODFExport_NodeIndex" and "ODFExport_ListNodes", resp. They allow to pipe the data to the export. The previous special casing of property state for "ListId", used in SwNumRule::HasContinueList, is removed together with the mentioned function. The intention is to have a logic allowing to detect 100% cases where the list id is required, and where it's not required. A related unit test for tdf#149668 was fixed to not rely on the mentioned ListId property state workaround, and moved from sw/qa/core/unocore to xmloff/qa/unit. Change-Id: If6a6ac7a3dfe0b2ea143229678a603875153eedb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153044 Tested-by: Jenkins Reviewed-by: Mike Kaganski diff --git a/include/xmloff/txtparae.hxx b/include/xmloff/txtparae.hxx index 1ba8b0b1a0c8..af23376d1160 100644 --- a/include/xmloff/txtparae.hxx +++ b/include/xmloff/txtparae.hxx @@ -112,6 +112,9 @@ class XMLOFF_DLLPUBLIC XMLTextParagraphExport : public XMLStyleExport XMLTextListsHelper* mpTextListsHelper; ::std::vector< std::unique_ptr > maTextListsHelperStack; +struct DocumentListNodes; +std::unique_ptr mpDocumentListNodes; + o3tl::sorted_vector> maFrameRecurseGuard; o3tl::sorted_vector> maShapeRecurseGuard; @@ -537,6 +540,9 @@ public: void PopTextListsHelper(); private: +bool ShouldSkipListId(const css::uno::Reference& xTextContent); +bool ExportListId() const; + XMLTextParagraphExport(XMLTextParagraphExport const &) = delete; }; diff --git a/sw/inc/numrule.hxx b/sw/inc/numrule.hxx index fde2c8de0fb8..f642e21e746c 100644 --- a/sw/inc/numrule.hxx +++ b/sw/inc/numrule.hxx @@ -272,9 +272,6 @@ public: void dumpAsXml(xmlTextWriterPtr w) const; void GetGrabBagItem(css::uno::Any& rVal) const; void SetGrabBagItem(const css::uno::Any& rVal); - -/// Is it possible that this numbering has multiple lists? -bool HasContinueList() const; }; /// namespace for static functions and methods for numbering and bullets diff --git a/sw/qa/core/unocore/unocore.cxx b/sw/qa/core/unocore/unocore.cxx index 605813a719b3..a1e931e75fb4 100644 --- a/sw/qa/core/unocore/unocore.cxx +++ b/sw/qa/core/unocore/unocore.cxx @@ -668,47 +668,6 @@ CPPUNIT_TEST_FIXTURE(SwCoreUnocoreTest, testContentControlDate) CPPUNIT_ASSERT_EQUAL(OUString("sdtContentLocked"), pContentControl->GetLock()); } -CPPUNIT_TEST_FIXTURE(SwCoreUnocoreTest, testListIdState) -{ -// Given a document with 3 paragraphs: an outer numbering on para 1 & 3, an inner nu
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - external/libwebp
external/libwebp/CVE-2023-1999.patch.1 | 52 external/libwebp/UnpackedTarball_libwebp.mk |1 2 files changed, 53 insertions(+) New commits: commit 1ec102a04b776146598fb43c6718df5a41874251 Author: Caolán McNamara AuthorDate: Wed Jun 14 10:08:13 2023 +0100 Commit: Andras Timar CommitDate: Wed Jun 14 15:42:57 2023 +0200 backport CVE-2023-1999 libwebp fix Change-Id: Idce341a78e44af9940d287d2a08b02d2ee9a6dae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153021 Tested-by: Jenkins CollaboraOffice Reviewed-by: Andras Timar diff --git a/external/libwebp/CVE-2023-1999.patch.1 b/external/libwebp/CVE-2023-1999.patch.1 new file mode 100644 index ..65c2cf75fb79 --- /dev/null +++ b/external/libwebp/CVE-2023-1999.patch.1 @@ -0,0 +1,52 @@ +From a486d800b60d0af4cc0836bf7ed8f21e12974129 Mon Sep 17 00:00:00 2001 +From: James Zern +Date: Wed, 22 Feb 2023 22:15:47 -0800 +Subject: [PATCH] EncodeAlphaInternal: clear result->bw on error + +This avoids a double free should the function fail prior to +VP8BitWriterInit() and a previous trial result's buffer carried over. +Previously in ApplyFiltersAndEncode() trial.bw (with a previous +iteration's buffer) would be freed, followed by best.bw pointing to the +same buffer. + +Since: +187d379d add a fallback to ALPHA_NO_COMPRESSION + +In addition, check the return value of VP8BitWriterInit() in this +function. + +Bug: webp:603 +Change-Id: Ic258381ee26c8c16bc211d157c8153831c8c6910 +--- + src/enc/alpha_enc.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/src/enc/alpha_enc.c b/src/enc/alpha_enc.c +index f7c02690e3..7d205586fe 100644 +--- a/src/enc/alpha_enc.c b/src/enc/alpha_enc.c +@@ -13,6 +13,7 @@ + + #include + #include ++#include + + #include "src/enc/vp8i_enc.h" + #include "src/dsp/dsp.h" +@@ -148,6 +149,7 @@ static int EncodeAlphaInternal(const uint8_t* const data, int width, int height, + } + } else { + VP8LBitWriterWipeOut(&tmp_bw); ++ memset(&result->bw, 0, sizeof(result->bw)); + return 0; + } + } +@@ -162,7 +164,7 @@ static int EncodeAlphaInternal(const uint8_t* const data, int width, int height, + header = method | (filter << 2); + if (reduce_levels) header |= ALPHA_PREPROCESSED_LEVELS << 4; + +- VP8BitWriterInit(&result->bw, ALPHA_HEADER_LEN + output_size); ++ if (!VP8BitWriterInit(&result->bw, ALPHA_HEADER_LEN + output_size)) ok = 0; + ok = ok && VP8BitWriterAppend(&result->bw, &header, ALPHA_HEADER_LEN); + ok = ok && VP8BitWriterAppend(&result->bw, output, output_size); + diff --git a/external/libwebp/UnpackedTarball_libwebp.mk b/external/libwebp/UnpackedTarball_libwebp.mk index 67f797157717..78761793174e 100644 --- a/external/libwebp/UnpackedTarball_libwebp.mk +++ b/external/libwebp/UnpackedTarball_libwebp.mk @@ -15,6 +15,7 @@ $(eval $(call gb_UnpackedTarball_set_patchlevel,libwebp,0)) $(eval $(call gb_UnpackedTarball_add_patches,libwebp,\ external/libwebp/Makefile.vc.patch \ + external/libwebp/CVE-2023-1999.patch.1 \ )) # vim: set noet sw=4 ts=4:
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-22.05' - external/libwebp
external/libwebp/CVE-2023-1999.patch.1 | 52 external/libwebp/UnpackedTarball_libwebp.mk |1 2 files changed, 53 insertions(+) New commits: commit d042b7b0e1ec174a62306c63f67d963493900ea7 Author: Caolán McNamara AuthorDate: Wed Jun 14 10:08:13 2023 +0100 Commit: Andras Timar CommitDate: Wed Jun 14 15:43:09 2023 +0200 backport CVE-2023-1999 libwebp fix Change-Id: Idce341a78e44af9940d287d2a08b02d2ee9a6dae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153024 Tested-by: Jenkins CollaboraOffice Reviewed-by: Andras Timar diff --git a/external/libwebp/CVE-2023-1999.patch.1 b/external/libwebp/CVE-2023-1999.patch.1 new file mode 100644 index ..65c2cf75fb79 --- /dev/null +++ b/external/libwebp/CVE-2023-1999.patch.1 @@ -0,0 +1,52 @@ +From a486d800b60d0af4cc0836bf7ed8f21e12974129 Mon Sep 17 00:00:00 2001 +From: James Zern +Date: Wed, 22 Feb 2023 22:15:47 -0800 +Subject: [PATCH] EncodeAlphaInternal: clear result->bw on error + +This avoids a double free should the function fail prior to +VP8BitWriterInit() and a previous trial result's buffer carried over. +Previously in ApplyFiltersAndEncode() trial.bw (with a previous +iteration's buffer) would be freed, followed by best.bw pointing to the +same buffer. + +Since: +187d379d add a fallback to ALPHA_NO_COMPRESSION + +In addition, check the return value of VP8BitWriterInit() in this +function. + +Bug: webp:603 +Change-Id: Ic258381ee26c8c16bc211d157c8153831c8c6910 +--- + src/enc/alpha_enc.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/src/enc/alpha_enc.c b/src/enc/alpha_enc.c +index f7c02690e3..7d205586fe 100644 +--- a/src/enc/alpha_enc.c b/src/enc/alpha_enc.c +@@ -13,6 +13,7 @@ + + #include + #include ++#include + + #include "src/enc/vp8i_enc.h" + #include "src/dsp/dsp.h" +@@ -148,6 +149,7 @@ static int EncodeAlphaInternal(const uint8_t* const data, int width, int height, + } + } else { + VP8LBitWriterWipeOut(&tmp_bw); ++ memset(&result->bw, 0, sizeof(result->bw)); + return 0; + } + } +@@ -162,7 +164,7 @@ static int EncodeAlphaInternal(const uint8_t* const data, int width, int height, + header = method | (filter << 2); + if (reduce_levels) header |= ALPHA_PREPROCESSED_LEVELS << 4; + +- VP8BitWriterInit(&result->bw, ALPHA_HEADER_LEN + output_size); ++ if (!VP8BitWriterInit(&result->bw, ALPHA_HEADER_LEN + output_size)) ok = 0; + ok = ok && VP8BitWriterAppend(&result->bw, &header, ALPHA_HEADER_LEN); + ok = ok && VP8BitWriterAppend(&result->bw, output, output_size); + diff --git a/external/libwebp/UnpackedTarball_libwebp.mk b/external/libwebp/UnpackedTarball_libwebp.mk index 67f797157717..78761793174e 100644 --- a/external/libwebp/UnpackedTarball_libwebp.mk +++ b/external/libwebp/UnpackedTarball_libwebp.mk @@ -15,6 +15,7 @@ $(eval $(call gb_UnpackedTarball_set_patchlevel,libwebp,0)) $(eval $(call gb_UnpackedTarball_add_patches,libwebp,\ external/libwebp/Makefile.vc.patch \ + external/libwebp/CVE-2023-1999.patch.1 \ )) # vim: set noet sw=4 ts=4:
[Libreoffice-commits] core.git: Branch 'libreoffice-7-6' - drawinglayer/source emfio/qa
dev/null |binary drawinglayer/source/tools/emfppath.cxx | 42 +- emfio/qa/cppunit/emf/EmfImportTest.cxx | 263 +++ emfio/qa/cppunit/emf/data/TestEmfPlusDrawCurve.emf |binary emfio/qa/cppunit/emf/data/TestEmfPlusFillClosedCurve.emf |binary 5 files changed, 143 insertions(+), 162 deletions(-) New commits: commit 0e4e10f54dc4218b1a2c8f740173aa3a5d13ad0a Author: Bartosz Kosiorek AuthorDate: Sat Jun 10 18:13:50 2023 +0200 Commit: Bartosz Kosiorek CommitDate: Wed Jun 14 15:14:46 2023 +0200 tdf#143877 Fix failing tests caused by floating point precision Due to different imlementation of floating-point unit (FPU), on different CPU platforms, the floating point numbers could could be different. https://stackoverflow.com/questions/64036879/differing-floating-point-calculation-results-between-x86-64-and-armv8-2-a https://mcuoneclipse.com/2019/03/29/be-aware-floating-point-operations-on-arm-cortex-m4f/ With this path I have changed the tested images, to use floating point numbers which are easily represented by floating numbers (multiplied/divided by 2), like: - change tension to values: 0.125, 0.25, 0.5, 1.0, 1.5 ... - change position of curve to of control points to 256.0, 384.0 512.0 Previous values was hard to represent by floating numbers, for example tension: - 0.4 has been written as 0.39976158142 - 0.1 has been written as 0.09994039535 More information: https://observablehq.com/@benaubin/floating-point Additionally the precision of numbers were increased to double. Change-Id: I5725c1f2f474d0c00821edaa9bb2102cb172093f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152838 Reviewed-by: Stephan Bergmann Tested-by: Bartosz Kosiorek (cherry picked from commit 731ab48c4e7b2fb2ad012d60c44b373bb07a9f4e) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152984 Tested-by: Jenkins Tested-by: René Engelhard Reviewed-by: Bartosz Kosiorek diff --git a/drawinglayer/source/tools/emfppath.cxx b/drawinglayer/source/tools/emfppath.cxx index bd5b2d357b0f..e7c4a5512c76 100644 --- a/drawinglayer/source/tools/emfppath.cxx +++ b/drawinglayer/source/tools/emfppath.cxx @@ -34,7 +34,12 @@ namespace namespace emfplushelper { -typedef float matrix [4][4]; +typedef double matrix [4][4]; + +constexpr sal_uInt32 nDetails = 8; +constexpr double alpha[nDetails] += { 1. / nDetails, 2. / nDetails, 3. / nDetails, 4. / nDetails, +5. / nDetails, 6. / nDetails, 7. / nDetails, 8. / nDetails }; // see 2.2.2.21 EmfPlusInteger7 // 2.2.2.22 EmfPlusInteger15 @@ -232,21 +237,20 @@ namespace emfplushelper m[0][2] = tension - 2.; m[1][0] = 2. * tension; m[1][1] = tension - 3.; -m[1][2] = 3. - 2 * tension; +m[1][2] = 3. - 2. * tension; m[3][1] = 1.; m[0][3] = m[2][2] = tension; m[0][0] = m[1][3] = m[2][0] = -tension; m[2][1] = m[2][3] = m[3][0] = m[3][2] = m[3][3] = 0.; } -static float calculateSplineCoefficients(float p0, float p1, float p2, float p3, float alpha, matrix m) +static double calculateSplineCoefficients(float p0, float p1, float p2, float p3, sal_uInt32 step, matrix m) { -float a, b, c, d; -a = m[0][0] * p0 + m[0][1] * p1 + m[0][2] * p2 + m[0][3] * p3; -b = m[1][0] * p0 + m[1][1] * p1 + m[1][2] * p2 + m[1][3] * p3; -c = m[2][0] * p0 + m[2][2] * p2; -d = p1; -return (d + alpha * (c + alpha * (b + alpha * a))); +double a = m[0][0] * p0 + m[0][1] * p1 + m[0][2] * p2 + m[0][3] * p3; +double b = m[1][0] * p0 + m[1][1] * p1 + m[1][2] * p2 + m[1][3] * p3; +double c = m[2][0] * p0 + m[2][2] * p2; +double d = p1; +return (d + alpha[step] * (c + alpha[step] * (b + alpha[step] * a))); } ::basegfx::B2DPolyPolygon& EMFPPath::GetCardinalSpline(EmfPlusHelperData const& rR, float fTension, @@ -254,11 +258,7 @@ namespace emfplushelper { ::basegfx::B2DPolygon polygon; matrix mat; -float x, y; -constexpr sal_uInt32 nDetails = 8; -constexpr float alpha[nDetails] -= { 1. / nDetails, 2. / nDetails, 3. / nDetails, 4. / nDetails, -5. / nDetails, 6. / nDetails, 7. / nDetails, 8. / nDetails }; +double x, y; if (aNumSegments >= nPoints) aNumSegments = nPoints - 1; GetCardinalMatrix(fTension, mat); @@ -274,9 +274,9 @@ namespace emfplushelper for (sal_uInt32 s = 0; s < nDetails; s++) { x = calculateSplineCoefficients(xPoints[i - 3], xPoints[i - 2], xPoints[i - 1], -xPoints[i], alpha[s], mat); +
[Libreoffice-commits] core.git: Branch 'distro/mimo/mimo-7-4' - 7 commits - instsetoo_native/CustomTarget_install.mk officecfg/registry postprocess/CustomTarget_signing.mk postprocess/signing setup_na
instsetoo_native/CustomTarget_install.mk |2 +- officecfg/registry/schema/org/openoffice/Office/UI/Infobar.xcs |4 ++-- officecfg/registry/schema/org/openoffice/Office/UI/Sidebar.xcs |2 +- postprocess/CustomTarget_signing.mk|2 +- postprocess/signing/signing.pl |3 ++- setup_native/source/packinfo/spellchecker_selection.txt|2 +- solenv/bin/modules/installer/epmfile.pm|2 +- solenv/bin/modules/installer/windows/msp.pm|2 +- 8 files changed, 10 insertions(+), 9 deletions(-) New commits: commit 705f89a66b736f2680a8e40268aab8a898669d4b Author: Andras Timar AuthorDate: Tue Aug 23 21:57:10 2022 +0200 Commit: Andras Timar CommitDate: Wed Jun 14 14:28:49 2023 +0200 Debian package names must not contain uppercase letters MIMO packageversion string contains capital M. Change-Id: Iefa3d8102e1c7ebb779e84a246abb7262bbad384 diff --git a/solenv/bin/modules/installer/epmfile.pm b/solenv/bin/modules/installer/epmfile.pm index 495366823604..e6a2042f4fbb 100644 --- a/solenv/bin/modules/installer/epmfile.pm +++ b/solenv/bin/modules/installer/epmfile.pm @@ -289,7 +289,7 @@ sub create_epm_header installer::packagelist::resolve_packagevariables(\$installer::globals::packageversion, $variableshashref, 0); if ( $variableshashref->{'PACKAGEREVISION'} ) { $installer::globals::packagerevision = $variableshashref->{'PACKAGEREVISION'}; } -$line = "%version" . " " . $installer::globals::packageversion . "\n"; +$line = "%version" . " " . lc $installer::globals::packageversion . "\n"; push(@epmheader, $line); $line = "%release" . " " . $installer::globals::packagerevision . "\n"; commit d069265dfa1cee8bfc8c52d6c5502094e81b83e8 Author: Andras Timar AuthorDate: Tue Aug 23 21:14:10 2022 +0200 Commit: Andras Timar CommitDate: Wed Jun 14 14:28:41 2023 +0200 Linux languagepacks take the first from the language list Change-Id: Id470e88f16b502aeb576a8512f55cd34c56f3500 diff --git a/setup_native/source/packinfo/spellchecker_selection.txt b/setup_native/source/packinfo/spellchecker_selection.txt index 2b97ab69c594..a77ef1aaafe4 100644 --- a/setup_native/source/packinfo/spellchecker_selection.txt +++ b/setup_native/source/packinfo/spellchecker_selection.txt @@ -47,7 +47,7 @@ en-ZA = "en,es,fr" eo = "eo" es = "es,an,ca,fr,gl,oc,pt-PT" et = "et" -fr = "de,en,eo,es,fr,it,pt-PT" +fr = "fr,de,en,eo,es,it,pt-PT" gd = "gd" gl = "gl,pt-PT,es" gu = "gu" commit 9f515ed0953ebfad72b9af626585ff7e0f0194a0 Author: Andras Timar AuthorDate: Wed Mar 30 11:08:43 2022 +0200 Commit: Andras Timar CommitDate: Wed Jun 14 14:28:34 2023 +0200 [MIMO] disable Donate and GetInvolved infobars Change-Id: I991cf07a89b417fde332fb665a5d2df9930015a4 diff --git a/officecfg/registry/schema/org/openoffice/Office/UI/Infobar.xcs b/officecfg/registry/schema/org/openoffice/Office/UI/Infobar.xcs index 6b29f0b47e6a..d919f7440571 100644 --- a/officecfg/registry/schema/org/openoffice/Office/UI/Infobar.xcs +++ b/officecfg/registry/schema/org/openoffice/Office/UI/Infobar.xcs @@ -34,13 +34,13 @@ Whether the Infobar showing the call for donations is enabled -true +false Whether the Infobar showing the call to 'Get Involved' is enabled -true +false commit a036ed92172af99ee202a6c97c317441c99d7ea2 Author: Andras Timar AuthorDate: Mon Jun 7 09:00:47 2021 +0200 Commit: Andras Timar CommitDate: Wed Jun 14 14:28:28 2023 +0200 no MinimumWidth of Sidebar for MIMO Change-Id: I66fc17b1d791e06debe95248a8952986171a4596 diff --git a/officecfg/registry/schema/org/openoffice/Office/UI/Sidebar.xcs b/officecfg/registry/schema/org/openoffice/Office/UI/Sidebar.xcs index 4b5d13b63c5f..29ad0e7a69cc 100644 --- a/officecfg/registry/schema/org/openoffice/Office/UI/Sidebar.xcs +++ b/officecfg/registry/schema/org/openoffice/Office/UI/Sidebar.xcs @@ -259,7 +259,7 @@ Enables the calculation of the sidebar's minimum width based on the size of all decks. If false, the user has full control over the sidebar width. -true +false commit 41411bce0f1f66d9d946a9ba5046bbc75b7a7fe7 Author: Andras Timar AuthorDate: Tue May 25 10:16:03 2021 +0200 Commit: Andras Timar CommitDate: Wed Jun 14 14:28:20 2023 +0200 Dictionary list required by MIMO Change-Id: Idefb9480460ae4ba946d7171811fde432c3c0927 diff --git a/setup_native/source/packinfo/spellchecker_selection.txt b/setup_native/source/packinfo/spellchecker_selection.txt index 7d4f8b25a83d..2b97ab69c594 100644 --- a/setup_native/source/packinfo/spellchecker_selection.txt +++ b/setup_native/source/packinfo/spellchecker_selection.txt @@ -47,7 +47,7
[Libreoffice-commits] core.git: Branch 'distro/mimo/mimo-7-4' - configure.ac
Rebased ref, commits from common ancestor: commit d939d562d1e6c6fae3a285d5db58b1e89f18d875 Author: Andras Timar AuthorDate: Wed Jun 14 14:21:35 2023 +0200 Commit: Andras Timar CommitDate: Wed Jun 14 14:27:28 2023 +0200 Bump version to 7.4.7.2.M1 diff --git a/configure.ac b/configure.ac index f04cb3c8af88..428f8bb33df6 100644 --- a/configure.ac +++ b/configure.ac @@ -9,7 +9,7 @@ dnl in order to create a configure script. # several non-alphanumeric characters, those are split off and used only for the # ABOUTBOXPRODUCTVERSIONSUFFIX in openoffice.lst. Why that is necessary, no idea. -AC_INIT([LibreOffice],[7.4.7.2],[],[],[http://documentfoundation.org/]) +AC_INIT([LibreOffice],[7.4.7.2-M1],[],[],[http://documentfoundation.org/]) dnl libnumbertext needs autoconf 2.68, but that can pick up autoconf268 just fine if it is installed dnl whereas aclocal (as run by autogen.sh) insists on using autoconf and fails hard
[Libreoffice-commits] core.git: Branch 'libreoffice-7-6' - sw/qa sw/source
sw/qa/extras/layout/data/table_in_text_change.fodt | 66 + sw/qa/extras/layout/layout2.cxx| 18 + sw/source/core/table/swtable.cxx |5 + 3 files changed, 89 insertions(+) New commits: commit 49c4eec4f7974b21cd3c802892ff00b9e834cdd1 Author: László Németh AuthorDate: Tue Jun 13 13:04:28 2023 +0200 Commit: László Németh CommitDate: Wed Jun 14 14:22:36 2023 +0200 tdf#155187 sw track changes: color tables in single changes In Show Changes mode, whole tables within a single redline, i.e. in a single text change get similar coloring, as in separately tracked table rows or columns. Follow-up to commit 48898a72066ff9982feafebb26708c4e779fd460 "tdf#60382 sw xmloff: import/export tracked table/row deletion" and commit f348440e17debacbcba9153e238e010e8c020bdc "tdf#146120 sw: show tracked table changes with different color". Change-Id: I0154a20146cd6689750fa33edfe960eb22d7610a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152959 Tested-by: Jenkins Reviewed-by: László Németh (cherry picked from commit 1f558103ce7730319a1804b9ca66132e8f48101e) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152987 diff --git a/sw/qa/extras/layout/data/table_in_text_change.fodt b/sw/qa/extras/layout/data/table_in_text_change.fodt new file mode 100644 index ..6d1ccaf2c2cd --- /dev/null +++ b/sw/qa/extras/layout/data/table_in_text_change.fodt @@ -0,0 +1,66 @@ + +http://www.w3.org/TR/css3-text/"; xmlns:grddl="http://www.w3.org/2003/g/data-view#"; xmlns:xhtml="http://www.w3.org/1999/xhtml"; xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xmlns:xsd="http://www.w3.org/2001/XMLSchema"; xmlns:dom="http://www.w3.org/2001/xml-events"; xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:xforms="http://www.w3.org/2002/xforms"; xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:drawooo="http://openoffice.org/2010/draw"; xmlns:math="http://www.w3.org/1998/Math/MathML"; xmlns:tableooo="http://openoffice.org/2009/table"; xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:oooc="http://openoffice.org/2004/calc"; xmlns:ooow="http://openoffice.org/200 4/writer" xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:xlink="http://www.w3.org/1999/xlink"; xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:dc="http://purl.org/dc/elements/1.1/"; xmlns:ooo="http://openoffice.org/2004/office"; xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:rpt="http://openoffice.org/2005/report"; xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:officeooo="http://openoffice.org/2009/office"; xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:table="urn:oasis:names:tc:open document:xmlns:table:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" office:version="1.3" office:mimetype="application/vnd.oasis.opendocument.text"> + + + + + + + x + 2023-06-13T12:47:02 + + + + + + + x + 2023-06-13T12:43:39 + + + + + Whole tables in tracked text deletion + + + + + 1 + + + 2 + + + + + 3 + + + 4 + + + + Whole tables in tracked text insertion + + + + + I + + + II + + + + + III + + + IV + + + + + + + diff --git a/sw/qa/extras/layout/layout2.cxx b/sw/qa/extras/layout/layout2.cxx index 9daa260c21c4..e9654dc7c9b6 100644 --- a/sw/qa/extras/layout/layout2.cxx +++ b/sw/qa/extras/layout/layout2.cxx @@ -973,6 +973,24 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter2, testChangedTableRows) assertXPath(pXmlDoc, "/metafile/push/push/push/push/push/fillcolor[@color='#3faf46']", 1); } +CPPUNIT_TEST_FIXTURE(SwLayoutWriter2, testTdf155187_TableInTextChange) +{ +createSwDoc("table_in_text_change.fodt"); +SwDoc* pDoc = getSwDoc(); +SwDocShell* pShell = pDoc->GetDocShell(); + +// Dump the rendering of the first page as an XML file. +std::shared_ptr xMetaFile = pShell->GetPreviewMetaFile(); +MetafileXmlDump dump
[Libreoffice-commits] core.git: Changes to 'distro/mimo/mimo-7-4'
New branch 'distro/mimo/mimo-7-4' available with the following commits: commit de78319184a462be8812f3c53ba6d939ebe4d9b7 Author: Andras Timar Date: Wed Jun 14 14:21:35 2023 +0200 Bump version to 7.4.7.2-M1
[Libreoffice-commits] core.git: i18npool/source
i18npool/source/localedata/LocaleNode.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit ed2ca47393d06786bc055c3c6fa7f84c0f952f14 Author: Noel Grandin AuthorDate: Wed Jun 14 11:17:29 2023 +0200 Commit: Stephan Bergmann CommitDate: Wed Jun 14 14:02:12 2023 +0200 fix ubscan build after commit ee76ed70e97448082f4c00c5c4207a44e1a91617 Author: Noel Grandin Date: Tue Jun 13 21:39:31 2023 +0200 speed up startup time Change-Id: I577e29f17f417e7ae5ef0b8eaa5f90aed48c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153041 Reviewed-by: Stephan Bergmann Tested-by: Jenkins diff --git a/i18npool/source/localedata/LocaleNode.cxx b/i18npool/source/localedata/LocaleNode.cxx index 08bf772321ad..b17203b3a59b 100644 --- a/i18npool/source/localedata/LocaleNode.cxx +++ b/i18npool/source/localedata/LocaleNode.cxx @@ -967,7 +967,7 @@ void LCFormatNode::generateCode (const OFileWriter &of) const of.writeOUStringFunction("getAllFormats0_", "FormatElementsCount0", "FormatElementsArray0", "replaceFrom0", "replaceTo0"); break; case 1: -of.writeFunction("getAllFormats1_", "FormatElementsCount1", "FormatElementsArray1", "replaceFrom1", "replaceTo1"); +of.writeOUStringFunction("getAllFormats1_", "FormatElementsCount1", "FormatElementsArray1", "replaceFrom1", "replaceTo1"); break; }
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-22.05' - include/vcl
include/vcl/pdfwriter.hxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit dae199410fa70d01723862baedfa690a28056ccc Author: Caolán McNamara AuthorDate: Sun Jun 11 21:28:49 2023 +0100 Commit: Caolán McNamara CommitDate: Wed Jun 14 13:42:50 2023 +0200 cid#1532366 Uninitialized scalar variable Change-Id: Iea2b38149815c7025f1df0739731142f892ba016 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152876 Tested-by: Jenkins CollaboraOffice Reviewed-by: Jaume Pujantell Reviewed-by: Caolán McNamara (cherry picked from commit 86b8e5563cb2d2c054befb89f7a90d6676a8ae64) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153023 Reviewed-by: Andras Timar diff --git a/include/vcl/pdfwriter.hxx b/include/vcl/pdfwriter.hxx index a03cee4dc362..8bbf263a50cd 100644 --- a/include/vcl/pdfwriter.hxx +++ b/include/vcl/pdfwriter.hxx @@ -66,7 +66,7 @@ struct PDFNote OUString Title; // optional title for the popup containing the note OUString Contents; // contents of the note css::util::DateTime maModificationDate; -bool isFreeText; +bool isFreeText = false; std::vector maPolygons; Color annotColor; Color interiorColor;
[Libreoffice-commits] core.git: Branch 'feature/cib_contract891c' - 9 commits - download.lst external/curl external/libtommath external/libxml2 external/libxmlsec external/libxslt external/openssl ext
download.lst |4 ++-- external/curl/ExternalProject_curl.mk |5 +++-- external/libtommath/ExternalProject_libtommath.mk |4 +--- external/libxml2/ExternalProject_xml2.mk |6 +++--- external/libxmlsec/ExternalProject_xmlsec.mk |5 +++-- external/libxslt/ExternalProject_xslt.mk |5 +++-- external/openssl/ExternalProject_openssl.mk |2 ++ external/postgresql/ExternalProject_postgresql.mk |8 solenv/gbuild/ExternalProject.mk |2 +- solenv/gbuild/platform/com_MSC_class.mk | 11 +-- 10 files changed, 31 insertions(+), 21 deletions(-) New commits: commit 5dec00f8fd25b176fa25f088c54cb15b166617eb Author: Thorsten Behrens AuthorDate: Wed Jun 14 13:34:52 2023 +0200 Commit: Thorsten Behrens CommitDate: Wed Jun 14 13:34:52 2023 +0200 openssl: upgrade to release 1.1.1t Fixes CVE-2023-0286 CVE-2023-0215 CVE-2022-4450 CVE-2022-4304 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146653 Tested-by: Jenkins Reviewed-by: Thorsten Behrens (cherry picked from commit f9229fdadbd205a8953577efc72a6e43717c764e) (cherry picked from commit ba359c09226756865d3813fee08514384257ae58) Change-Id: I93ce0362b17bd07b0644564a0676daaa56bc8b50 diff --git a/download.lst b/download.lst index 2e8f5b2aea0a..89860176ad77 100644 --- a/download.lst +++ b/download.lst @@ -177,8 +177,8 @@ export OPENCOLLADA_SHA256SUM := 8f25d429237cde289a448c82a0a830791354ccce5ee40d77 export OPENCOLLADA_TARBALL := OpenCOLLADA-master-6509aa13af.tar.bz2 export OPENLDAP_SHA256SUM := 99f37d6747d88206c470067eda624d5e48c1011e943ec0ab217bae8712e22f34 export OPENLDAP_TARBALL := openldap-2.4.59.tgz -export OPENSSL_SHA256SUM := c5ac01e760ee6ff0dab61d6b2bbd30146724d063eb322180c6f18a6f74e4b6aa -export OPENSSL_TARBALL := openssl-1.1.1s.tar.gz +export OPENSSL_SHA256SUM := 8dee9b24bdb1dcbf0c3d1e9b02fb8f6bf22165e807f45adeb7c9677536859d3b +export OPENSSL_TARBALL := openssl-1.1.1t.tar.gz export ORCUS_SHA256SUM := 676b1fedd721f64489650f5e76d7f98b750439914d87cae505b8163d08447908 export ORCUS_TARBALL := liborcus-0.12.1.tar.gz export OWNCLOUD_ANDROID_LIB_SHA256SUM := b18b3e3ef7fae6a79b62f2bb43cc47a5346b6330f6a383dc4be34439aca5e9fb commit 0134b9d3f447cf43d0f537323d7dafc355dabd51 Author: Xisco Fauli AuthorDate: Wed Nov 2 20:29:51 2022 +0100 Commit: Thorsten Behrens CommitDate: Wed Jun 14 13:33:22 2023 +0200 upgrade to openssl-1.1.1s Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142184 Tested-by: Jenkins Reviewed-by: Caolán McNamara (cherry picked from commit 23e6227ab347a00b235fb00892b379ef4e3a0d35) (cherry picked from commit 2c06d55c8e43368920780e55c62e1e65fdefba04) Change-Id: Ic0f1fca7ef73b3a443c24d2bcc7f234be331a05b diff --git a/download.lst b/download.lst index 2c413cd593f8..2e8f5b2aea0a 100644 --- a/download.lst +++ b/download.lst @@ -177,8 +177,8 @@ export OPENCOLLADA_SHA256SUM := 8f25d429237cde289a448c82a0a830791354ccce5ee40d77 export OPENCOLLADA_TARBALL := OpenCOLLADA-master-6509aa13af.tar.bz2 export OPENLDAP_SHA256SUM := 99f37d6747d88206c470067eda624d5e48c1011e943ec0ab217bae8712e22f34 export OPENLDAP_TARBALL := openldap-2.4.59.tgz -export OPENSSL_SHA256SUM := d7939ce614029cdff0b6c20f0e2e5703158a489a72b2507b8bd51bf8c8fd10ca -export OPENSSL_TARBALL := openssl-1.1.1q.tar.gz +export OPENSSL_SHA256SUM := c5ac01e760ee6ff0dab61d6b2bbd30146724d063eb322180c6f18a6f74e4b6aa +export OPENSSL_TARBALL := openssl-1.1.1s.tar.gz export ORCUS_SHA256SUM := 676b1fedd721f64489650f5e76d7f98b750439914d87cae505b8163d08447908 export ORCUS_TARBALL := liborcus-0.12.1.tar.gz export OWNCLOUD_ANDROID_LIB_SHA256SUM := b18b3e3ef7fae6a79b62f2bb43cc47a5346b6330f6a383dc4be34439aca5e9fb commit d0b0ee8f459f2d99a2ed88094c1528ce9e5b1bee Author: Taichi Haradaguchi <20001...@ymail.ne.jp> AuthorDate: Tue Sep 6 14:42:20 2022 +0900 Commit: Thorsten Behrens CommitDate: Wed Jun 14 13:32:48 2023 +0200 upgrade openssl-1.1.1q Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139463 Tested-by: Jenkins Reviewed-by: Caolán McNamara (cherry picked from commit 96db5e3d610ede2ed82f1ab7673ac6d1c69fd588) (cherry picked from commit 9da5e4107e74d7590fbf44f5f4f24ed620852f91) Change-Id: I2317e734f074cf7301a6081cf3d2221beeaf5ad1 diff --git a/download.lst b/download.lst index 7281ab02a696..2c413cd593f8 100644 --- a/download.lst +++ b/download.lst @@ -177,8 +177,8 @@ export OPENCOLLADA_SHA256SUM := 8f25d429237cde289a448c82a0a830791354ccce5ee40d77 export OPENCOLLADA_TARBALL := OpenCOLLADA-master-6509aa13af.tar.bz2 export OPENLDAP_SHA256SUM := 99f37d6747d88206c470067eda624d5e48c1011e943ec0ab217bae8712e22f34 export OPENLDAP_TARBALL := openldap-2.4.59.tgz -export OPENSSL_SHA256SUM := f89199be8b23ca45fc7cb9f1d8d3ee67312318286ad030f5316aca6462db6c96 -export OPENSSL_TARBALL := openssl
[Libreoffice-commits] core.git: desktop/source include/comphelper include/vcl sd/source sw/source vcl/source
desktop/source/deployment/registry/configuration/dp_configuration.cxx | 36 - include/comphelper/xmlencode.hxx | 62 ++ include/vcl/pdfwriter.hxx |2 sd/source/filter/html/htmlex.cxx |5 sw/source/filter/html/css1atr.cxx |3 sw/source/filter/html/htmlfldw.cxx|3 vcl/source/gdi/pdfwriter_impl.cxx | 39 -- 7 files changed, 75 insertions(+), 75 deletions(-) New commits: commit 71075740aee2e15f574d19d452f0a586e25a6bd0 Author: Szymon Kłos AuthorDate: Fri Apr 7 09:48:41 2023 +0200 Commit: Caolán McNamara CommitDate: Wed Jun 14 13:27:04 2023 +0200 Make encodeForXml accessible for other modules and share similar code Change-Id: I7729a46d40845893f577c273c1ab340f69ebb51b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151230 Tested-by: Jenkins CollaboraOffice Reviewed-by: Szymon Kłos Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151754 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/desktop/source/deployment/registry/configuration/dp_configuration.cxx b/desktop/source/deployment/registry/configuration/dp_configuration.cxx index 1f4ba053ec55..622814248670 100644 --- a/desktop/source/deployment/registry/configuration/dp_configuration.cxx +++ b/desktop/source/deployment/registry/configuration/dp_configuration.cxx @@ -37,6 +37,7 @@ #include #include #include +#include #include #include #include @@ -566,39 +567,6 @@ BackendImpl::PackageImpl::isRegistered_( } -OUString encodeForXml( std::u16string_view text ) -{ -// encode conforming xml: -size_t len = text.size(); -OUStringBuffer buf; -for ( size_t pos = 0; pos < len; ++pos ) -{ -sal_Unicode c = text[ pos ]; -switch (c) { -case '<': -buf.append( "<" ); -break; -case '>': -buf.append( ">" ); -break; -case '&': -buf.append( "&" ); -break; -case '\'': -buf.append( "'" ); -break; -case '\"': -buf.append( """ ); -break; -default: -buf.append( c ); -break; -} -} -return buf.makeStringAndClear(); -} - - OUString replaceOrigin( OUString const & url, std::u16string_view destFolder, Reference< XCommandEnvironment > const & xCmdEnv, Reference< XComponentContext > const & xContext, bool & out_replaced) { @@ -651,7 +619,7 @@ OUString replaceOrigin( if (origin.isEmpty()) { // encode only once origin = OUStringToOString( -encodeForXml( url.subView( 0, url.lastIndexOf( '/' ) ) ), +comphelper::string::encodeForXml( url.subView( 0, url.lastIndexOf( '/' ) ) ), // xxx todo: encode always for UTF-8? => lookup doc-header? RTL_TEXTENCODING_UTF8 ); } diff --git a/include/comphelper/xmlencode.hxx b/include/comphelper/xmlencode.hxx new file mode 100644 index ..160de5c9cf42 --- /dev/null +++ b/include/comphelper/xmlencode.hxx @@ -0,0 +1,62 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#pragma once + +#include + +namespace comphelper::string +{ +inline OUString encodeForXml(std::u16string_view rStr) +{ +// encode conforming xml: +sal_Int32 len = rStr.length(); +OUStringBuffer buf(len + 16); // it's going to be at least len +for (sal_Int32 pos = 0; pos < len; ++pos) +{ +sal_Unicode c = rStr[pos]; +switch (c) +{ +case '<': +buf.append("<"); +break; +case '>': +buf.append(">"); +break; +case '&': +buf.append("&"); +break; +case '\'': +buf.append("'");
[Libreoffice-commits] core.git: Branch 'libreoffice-7-5' - external/libwebp
external/libwebp/CVE-2023-1999.patch.1 | 52 external/libwebp/UnpackedTarball_libwebp.mk |1 2 files changed, 53 insertions(+) New commits: commit 961a0f280a09d0702af516fd258ef9917911b7af Author: Caolán McNamara AuthorDate: Wed Jun 14 10:08:13 2023 +0100 Commit: Michael Stahl CommitDate: Wed Jun 14 13:26:23 2023 +0200 backport CVE-2023-1999 libwebp fix Change-Id: Idce341a78e44af9940d287d2a08b02d2ee9a6dae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153022 Tested-by: Jenkins Reviewed-by: Michael Stahl diff --git a/external/libwebp/CVE-2023-1999.patch.1 b/external/libwebp/CVE-2023-1999.patch.1 new file mode 100644 index ..65c2cf75fb79 --- /dev/null +++ b/external/libwebp/CVE-2023-1999.patch.1 @@ -0,0 +1,52 @@ +From a486d800b60d0af4cc0836bf7ed8f21e12974129 Mon Sep 17 00:00:00 2001 +From: James Zern +Date: Wed, 22 Feb 2023 22:15:47 -0800 +Subject: [PATCH] EncodeAlphaInternal: clear result->bw on error + +This avoids a double free should the function fail prior to +VP8BitWriterInit() and a previous trial result's buffer carried over. +Previously in ApplyFiltersAndEncode() trial.bw (with a previous +iteration's buffer) would be freed, followed by best.bw pointing to the +same buffer. + +Since: +187d379d add a fallback to ALPHA_NO_COMPRESSION + +In addition, check the return value of VP8BitWriterInit() in this +function. + +Bug: webp:603 +Change-Id: Ic258381ee26c8c16bc211d157c8153831c8c6910 +--- + src/enc/alpha_enc.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/src/enc/alpha_enc.c b/src/enc/alpha_enc.c +index f7c02690e3..7d205586fe 100644 +--- a/src/enc/alpha_enc.c b/src/enc/alpha_enc.c +@@ -13,6 +13,7 @@ + + #include + #include ++#include + + #include "src/enc/vp8i_enc.h" + #include "src/dsp/dsp.h" +@@ -148,6 +149,7 @@ static int EncodeAlphaInternal(const uint8_t* const data, int width, int height, + } + } else { + VP8LBitWriterWipeOut(&tmp_bw); ++ memset(&result->bw, 0, sizeof(result->bw)); + return 0; + } + } +@@ -162,7 +164,7 @@ static int EncodeAlphaInternal(const uint8_t* const data, int width, int height, + header = method | (filter << 2); + if (reduce_levels) header |= ALPHA_PREPROCESSED_LEVELS << 4; + +- VP8BitWriterInit(&result->bw, ALPHA_HEADER_LEN + output_size); ++ if (!VP8BitWriterInit(&result->bw, ALPHA_HEADER_LEN + output_size)) ok = 0; + ok = ok && VP8BitWriterAppend(&result->bw, &header, ALPHA_HEADER_LEN); + ok = ok && VP8BitWriterAppend(&result->bw, output, output_size); + diff --git a/external/libwebp/UnpackedTarball_libwebp.mk b/external/libwebp/UnpackedTarball_libwebp.mk index 67f797157717..78761793174e 100644 --- a/external/libwebp/UnpackedTarball_libwebp.mk +++ b/external/libwebp/UnpackedTarball_libwebp.mk @@ -15,6 +15,7 @@ $(eval $(call gb_UnpackedTarball_set_patchlevel,libwebp,0)) $(eval $(call gb_UnpackedTarball_add_patches,libwebp,\ external/libwebp/Makefile.vc.patch \ + external/libwebp/CVE-2023-1999.patch.1 \ )) # vim: set noet sw=4 ts=4:
[Libreoffice-commits] core.git: include/vcl vcl/source
include/vcl/filter/PngImageReader.hxx | 17 + vcl/source/filter/GraphicFormatDetector.cxx | 11 ++- vcl/source/filter/png/PngImageReader.cxx| 15 --- 3 files changed, 23 insertions(+), 20 deletions(-) New commits: commit 427769a751d3f45e41e5a0f4aed385bb2727998c Author: Paris Oplopoios AuthorDate: Wed Jun 14 02:45:43 2023 +0300 Commit: Paris Oplopoios CommitDate: Wed Jun 14 13:23:11 2023 +0200 Remove duplicate constants relating to PNGs The PNG signature constant was defined in multiple places Change-Id: Ia90636819341295129a37a91199857a612d62177 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153032 Tested-by: Jenkins Reviewed-by: Paris Oplopoios diff --git a/include/vcl/filter/PngImageReader.hxx b/include/vcl/filter/PngImageReader.hxx index 01fdc2915e54..201e3a08b8c0 100644 --- a/include/vcl/filter/PngImageReader.hxx +++ b/include/vcl/filter/PngImageReader.hxx @@ -21,6 +21,23 @@ #include +constexpr sal_uInt64 PNG_SIGNATURE = 0x89504E470D0A1A0A; +constexpr sal_uInt32 PNG_IHDR_SIGNATURE = 0x49484452; +constexpr sal_uInt32 PNG_IDAT_SIGNATURE = 0x49444154; +constexpr sal_uInt32 PNG_PHYS_SIGNATURE = 0x70485973; +constexpr sal_uInt32 PNG_TRNS_SIGNATURE = 0x74524E53; +constexpr sal_uInt32 PNG_ACTL_SIGNATURE = 0x6163544C; +constexpr sal_uInt32 PNG_FCTL_SIGNATURE = 0x6663544C; +constexpr sal_uInt32 PNG_FDAT_SIGNATURE = 0x66644154; +constexpr sal_uInt32 PNG_IEND_SIGNATURE = 0x49454E44; +constexpr sal_uInt32 PNG_IEND_CRC = 0xAE426082; +constexpr int PNG_SIGNATURE_SIZE = 8; +constexpr int PNG_IHDR_SIZE = 13; +constexpr int PNG_TYPE_SIZE = 4; +constexpr int PNG_SIZE_SIZE = 4; +constexpr int PNG_CRC_SIZE = 4; +constexpr int PNG_IEND_SIZE = 0; + namespace com::sun::star::task { class XStatusIndicator; diff --git a/vcl/source/filter/GraphicFormatDetector.cxx b/vcl/source/filter/GraphicFormatDetector.cxx index fc5a0fdc79c3..4fc2c85c2a4e 100644 --- a/vcl/source/filter/GraphicFormatDetector.cxx +++ b/vcl/source/filter/GraphicFormatDetector.cxx @@ -849,13 +849,14 @@ bool GraphicFormatDetector::checkGIF() bool GraphicFormatDetector::checkPNG() { SeekGuard aGuard(mrStream, mnStreamPosition); -if (mnFirstLong == 0x89504e47 && mnSecondLong == 0x0d0a1a0a) +uint64_t nSignature = (static_cast(mnFirstLong) << 32) | mnSecondLong; +if (nSignature == PNG_SIGNATURE) { maMetadata.mnFormat = GraphicFileFormat::PNG; if (mbExtendedInfo) { sal_uInt32 nTemp32; -mrStream.Seek(mnStreamPosition + 8); +mrStream.Seek(mnStreamPosition + PNG_SIGNATURE_SIZE); do { sal_uInt8 cByte = 0; @@ -901,9 +902,9 @@ bool GraphicFormatDetector::checkPNG() // read up to the start of the image mrStream.ReadUInt32(nLen32); mrStream.ReadUInt32(nTemp32); -while (mrStream.good() && nTemp32 != 0x49444154) +while (mrStream.good() && nTemp32 != PNG_IDAT_SIGNATURE) { -if (nTemp32 == 0x70485973) // physical pixel dimensions +if (nTemp32 == PNG_PHYS_SIGNATURE) // physical pixel dimensions { sal_uLong nXRes; sal_uLong nYRes; @@ -935,7 +936,7 @@ bool GraphicFormatDetector::checkPNG() nLen32 -= 9; } -else if (nTemp32 == 0x74524e53) // transparency +else if (nTemp32 == PNG_TRNS_SIGNATURE) // transparency { maMetadata.mbIsTransparent = true; maMetadata.mbIsAlpha = (cColType != 0 && cColType != 2); diff --git a/vcl/source/filter/png/PngImageReader.cxx b/vcl/source/filter/png/PngImageReader.cxx index 1cb72bdbe6b5..7e3fdbe44d71 100644 --- a/vcl/source/filter/png/PngImageReader.cxx +++ b/vcl/source/filter/png/PngImageReader.cxx @@ -51,21 +51,6 @@ void lclReadStream(png_structp pPng, png_bytep pOutBytes, png_size_t nBytesToRea } } -constexpr int PNG_SIGNATURE_SIZE = 8; -constexpr int PNG_IHDR_SIZE = 13; -constexpr int PNG_TYPE_SIZE = 4; -constexpr int PNG_SIZE_SIZE = 4; -constexpr int PNG_CRC_SIZE = 4; -constexpr int PNG_IEND_SIZE = 0; -constexpr sal_uInt64 PNG_SIGNATURE = 0x89504E470D0A1A0A; -constexpr sal_uInt32 PNG_IHDR_SIGNATURE = 0x49484452; -constexpr sal_uInt32 PNG_IDAT_SIGNATURE = 0x49444154; -constexpr sal_uInt32 PNG_ACTL_SIGNATURE = 0x6163544C; -constexpr sal_uInt32 PNG_FCTL_SIGNATURE = 0x6663544C; -constexpr sal_uInt32 PNG_FDAT_SIGNATURE = 0x66644154; -constexpr sal_uInt32 PNG_IEND_SIGNATURE = 0x49454E44; -constexpr sal_uInt32 PNG_IEND_CRC = 0xAE426082; - bool isPng(SvStream& rStream) { // Check signature bytes
[Libreoffice-commits] core.git: oox/source
oox/source/drawingml/shapecontext.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit de9107b2b875aa485f2375300cc1ce2c16ffdf89 Author: Noel Grandin AuthorDate: Wed Jun 14 11:52:23 2023 +0200 Commit: Noel Grandin CommitDate: Wed Jun 14 13:00:11 2023 +0200 SAL_WARN->SAL_INFO in oox::ShapeContext Change-Id: Ifd5e1493a8bbe9954ca9420d03b7a2b1db3307f2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153043 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/oox/source/drawingml/shapecontext.cxx b/oox/source/drawingml/shapecontext.cxx index 3ac32abd11aa..d14864ede331 100644 --- a/oox/source/drawingml/shapecontext.cxx +++ b/oox/source/drawingml/shapecontext.cxx @@ -124,7 +124,7 @@ ContextHandlerRef ShapeContext::onCreateContext( sal_Int32 aElementToken, const case XML_nvSpPr: break; default: -SAL_WARN("oox", "ShapeContext::onCreateContext: unhandled element: " << getBaseToken(aElementToken)); +SAL_INFO("oox", "ShapeContext::onCreateContext: unhandled element: " << getBaseToken(aElementToken)); break; }
[Libreoffice-commits] core.git: external/libwebp
external/libwebp/CVE-2023-1999.patch.1 | 52 external/libwebp/UnpackedTarball_libwebp.mk |1 2 files changed, 53 insertions(+) New commits: commit 8f020443fda691878ac05c47503169b390f34188 Author: Caolán McNamara AuthorDate: Wed Jun 14 10:08:13 2023 +0100 Commit: Caolán McNamara CommitDate: Wed Jun 14 12:21:23 2023 +0200 backport CVE-2023-1999 libwebp fix Change-Id: Idce341a78e44af9940d287d2a08b02d2ee9a6dae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153040 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/external/libwebp/CVE-2023-1999.patch.1 b/external/libwebp/CVE-2023-1999.patch.1 new file mode 100644 index ..65c2cf75fb79 --- /dev/null +++ b/external/libwebp/CVE-2023-1999.patch.1 @@ -0,0 +1,52 @@ +From a486d800b60d0af4cc0836bf7ed8f21e12974129 Mon Sep 17 00:00:00 2001 +From: James Zern +Date: Wed, 22 Feb 2023 22:15:47 -0800 +Subject: [PATCH] EncodeAlphaInternal: clear result->bw on error + +This avoids a double free should the function fail prior to +VP8BitWriterInit() and a previous trial result's buffer carried over. +Previously in ApplyFiltersAndEncode() trial.bw (with a previous +iteration's buffer) would be freed, followed by best.bw pointing to the +same buffer. + +Since: +187d379d add a fallback to ALPHA_NO_COMPRESSION + +In addition, check the return value of VP8BitWriterInit() in this +function. + +Bug: webp:603 +Change-Id: Ic258381ee26c8c16bc211d157c8153831c8c6910 +--- + src/enc/alpha_enc.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/src/enc/alpha_enc.c b/src/enc/alpha_enc.c +index f7c02690e3..7d205586fe 100644 +--- a/src/enc/alpha_enc.c b/src/enc/alpha_enc.c +@@ -13,6 +13,7 @@ + + #include + #include ++#include + + #include "src/enc/vp8i_enc.h" + #include "src/dsp/dsp.h" +@@ -148,6 +149,7 @@ static int EncodeAlphaInternal(const uint8_t* const data, int width, int height, + } + } else { + VP8LBitWriterWipeOut(&tmp_bw); ++ memset(&result->bw, 0, sizeof(result->bw)); + return 0; + } + } +@@ -162,7 +164,7 @@ static int EncodeAlphaInternal(const uint8_t* const data, int width, int height, + header = method | (filter << 2); + if (reduce_levels) header |= ALPHA_PREPROCESSED_LEVELS << 4; + +- VP8BitWriterInit(&result->bw, ALPHA_HEADER_LEN + output_size); ++ if (!VP8BitWriterInit(&result->bw, ALPHA_HEADER_LEN + output_size)) ok = 0; + ok = ok && VP8BitWriterAppend(&result->bw, &header, ALPHA_HEADER_LEN); + ok = ok && VP8BitWriterAppend(&result->bw, output, output_size); + diff --git a/external/libwebp/UnpackedTarball_libwebp.mk b/external/libwebp/UnpackedTarball_libwebp.mk index 67f797157717..78761793174e 100644 --- a/external/libwebp/UnpackedTarball_libwebp.mk +++ b/external/libwebp/UnpackedTarball_libwebp.mk @@ -15,6 +15,7 @@ $(eval $(call gb_UnpackedTarball_set_patchlevel,libwebp,0)) $(eval $(call gb_UnpackedTarball_add_patches,libwebp,\ external/libwebp/Makefile.vc.patch \ + external/libwebp/CVE-2023-1999.patch.1 \ )) # vim: set noet sw=4 ts=4:
[Libreoffice-commits] core.git: vcl/source
vcl/source/filter/png/PngImageReader.cxx |2 ++ 1 file changed, 2 insertions(+) New commits: commit 4d4920899c10cf5d52dd62bd5b84d8e863fde2ea Author: Caolán McNamara AuthorDate: Wed Jun 14 09:01:01 2023 +0100 Commit: Caolán McNamara CommitDate: Wed Jun 14 11:12:40 2023 +0200 ofz#59817 Heap-buffer-overflow READ 8 Change-Id: I442d103c7103c0bd88dd7fdefd44c3274a9c80fb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153038 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/vcl/source/filter/png/PngImageReader.cxx b/vcl/source/filter/png/PngImageReader.cxx index ec4e2d421e3c..1cb72bdbe6b5 100644 --- a/vcl/source/filter/png/PngImageReader.cxx +++ b/vcl/source/filter/png/PngImageReader.cxx @@ -129,6 +129,8 @@ int handle_unknown_chunk(png_structp png, png_unknown_chunkp chunk) APNGInfo* aAPNGInfo = static_cast(png_get_user_chunk_ptr(png)); if (sName == "acTL") { +if (chunk->size < sizeof(acTLChunk)) +return -1; aAPNGInfo->maACTLChunk = *reinterpret_cast(chunk->data); aAPNGInfo->maACTLChunk.num_frames = OSL_SWAPDWORD(aAPNGInfo->maACTLChunk.num_frames); aAPNGInfo->maACTLChunk.num_plays = OSL_SWAPDWORD(aAPNGInfo->maACTLChunk.num_plays);
[Libreoffice-commits] core.git: sc/source
sc/source/core/tool/numformat.cxx | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) New commits: commit e0ef3fed69864530da49cecb09fcc2fcc9acfeaa Author: Noel Grandin AuthorDate: Tue Jun 13 22:04:09 2023 +0200 Commit: Noel Grandin CommitDate: Wed Jun 14 11:07:49 2023 +0200 tdf#151946 cache LocaleDataWrapper because it is a little more expensive these days to create it, since I made it an immutable type (which is also why we can safely cache it) Reduces load time from 7s to 1.5s for me Change-Id: I583381f0ee5494b8edf746b2329ac5751a9e5d86 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153006 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/sc/source/core/tool/numformat.cxx b/sc/source/core/tool/numformat.cxx index 8240c1ac6e4f..8b8512339d43 100644 --- a/sc/source/core/tool/numformat.cxx +++ b/sc/source/core/tool/numformat.cxx @@ -25,6 +25,7 @@ #include #include #include +#include namespace sc { @@ -51,9 +52,13 @@ bool NumFmtUtil::isLatinScript( sal_uLong nFormat, ScDocument& rDoc ) aDecSep = ScGlobal::getLocaleData().getNumDecimalSep(); else { -LocaleDataWrapper aLocaleData( -comphelper::getProcessComponentContext(), LanguageTag(nFormatLang)); -aDecSep = aLocaleData.getNumDecimalSep(); +// LocaleDataWrapper can be expensive to construct, so cache the result for +// repeated calls +static std::optional localeCache; +if (!localeCache || localeCache->getLanguageTag().getLanguageType() != nFormatLang) +localeCache.emplace( +comphelper::getProcessComponentContext(), LanguageTag(nFormatLang)); +aDecSep = localeCache->getNumDecimalSep(); } SvtScriptType nScript = rDoc.GetStringScriptType(aDecSep);
[Libreoffice-commits] core.git: Branch 'libreoffice-7-5' - svtools/source
svtools/source/misc/unitconv.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit f7e52df2dde0b80f33123790681e94785154d566 Author: Mike Kaganski AuthorDate: Mon Jun 12 12:23:17 2023 +0300 Commit: Michael Stahl CommitDate: Wed Jun 14 10:58:08 2023 +0200 tdf#154349: round before converting to an integer Commit cfff893b9c82843a90aac4ecdb3a3936721b74a0 (Move unit conversion code to o3tl, and unify on that in more places, 2021-02-14) changed a custom conversion code in CalcToUnit doing inexact conversion from points to mm/20 (with "* 10 / 567"), with correct conversion function. A side effect was, however, that the imprecise arithmetics provided floating-point values that rounded down to correct integers (or maybe it was all the chain of calculations down to this function), while the correctly converted values could round down to a smaller value. Fix this problem using rounding. Change-Id: I42e0d56b068832ef309f6b696f661642e62ddacb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152894 Tested-by: Jenkins Reviewed-by: Mike Kaganski (cherry picked from commit cf0fe26f95b5435d65623165cf7ba381eaa0738a) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152981 Reviewed-by: Michael Stahl diff --git a/svtools/source/misc/unitconv.cxx b/svtools/source/misc/unitconv.cxx index 395c1b4ac810..cb4fdf6901dd 100644 --- a/svtools/source/misc/unitconv.cxx +++ b/svtools/source/misc/unitconv.cxx @@ -128,7 +128,7 @@ tools::Long CalcToUnit( float nIn, MapUnit eUnit ) eUnit == MapUnit::MapCM, "this unit is not implemented" ); if (const auto eTo = MapToO3tlLength(eUnit); eTo != o3tl::Length::invalid) -return o3tl::convert(nIn, o3tl::Length::pt, eTo); +return std::round(o3tl::convert(nIn, o3tl::Length::pt, eTo)); return 0; }
[Libreoffice-commits] core.git: Branch 'libreoffice-7-5' - svgio/qa svgio/source
svgio/qa/cppunit/SvgImportTest.cxx| 18 ++ svgio/qa/cppunit/data/tdf155819.svg | 15 +++ svgio/source/svgreader/svgstyleattributes.cxx |5 +++-- 3 files changed, 36 insertions(+), 2 deletions(-) New commits: commit 0586becbcf4cf71b25c827011579da46c5dc106b Author: Xisco Fauli AuthorDate: Wed Jun 14 01:10:50 2023 +0200 Commit: Michael Stahl CommitDate: Wed Jun 14 10:53:27 2023 +0200 tdf#155819: check marker property comes from a style sheet Since 242b7d0162d55be0945ca849c3de841fbf6cb475 "svgio: simplify code" where bIsInStyleSheet was replaced by getCssStyleParent() incorrectly Change-Id: I48632e9374f4615e32d18a141aeabec2936e6ec8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153016 Tested-by: Jenkins Reviewed-by: Xisco Fauli Signed-off-by: Xisco Fauli Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153036 Reviewed-by: Michael Stahl diff --git a/svgio/qa/cppunit/SvgImportTest.cxx b/svgio/qa/cppunit/SvgImportTest.cxx index 6e4ac0255677..c8305517ce00 100644 --- a/svgio/qa/cppunit/SvgImportTest.cxx +++ b/svgio/qa/cppunit/SvgImportTest.cxx @@ -135,6 +135,24 @@ CPPUNIT_TEST_FIXTURE(Test, testSymbol) assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor", "color", "#00d000"); } +CPPUNIT_TEST_FIXTURE(Test, testTdf155819) +{ +Primitive2DSequence aSequence = parseSvg(u"/svgio/qa/cppunit/data/tdf155819.svg"); +CPPUNIT_ASSERT_EQUAL(1, static_cast(aSequence.getLength())); + +drawinglayer::Primitive2dXmlDump dumper; +xmlDocUniquePtr pDocument = dumper.dumpAndParse(aSequence); + +CPPUNIT_ASSERT (pDocument); + +assertXPath(pDocument, "/primitive2D/transform/polypolygonstroke/line", 1); +assertXPath(pDocument, "/primitive2D/transform/polypolygonstroke/polypolygon", 1); +// Without the fix in place, this test would have failed with +// - Expected: 4 +// - Actual : 0 +assertXPath(pDocument, "/primitive2D/transform/transform", 4); +} + CPPUNIT_TEST_FIXTURE(Test, testTdf87309) { Primitive2DSequence aSequenceTdf87309 = parseSvg(u"/svgio/qa/cppunit/data/tdf87309.svg"); diff --git a/svgio/qa/cppunit/data/tdf155819.svg b/svgio/qa/cppunit/data/tdf155819.svg new file mode 100644 index ..30c2da4d1a5a --- /dev/null +++ b/svgio/qa/cppunit/data/tdf155819.svg @@ -0,0 +1,15 @@ + +http://www.w3.org/2000/svg"; viewBox="0 0 100 100"> + +path { + fill: none; + stroke-width: 4px; + marker: url(#diamond); +} + + + + + + diff --git a/svgio/source/svgreader/svgstyleattributes.cxx b/svgio/source/svgreader/svgstyleattributes.cxx index 8661b99d8895..6c42fbe744f9 100644 --- a/svgio/source/svgreader/svgstyleattributes.cxx +++ b/svgio/source/svgreader/svgstyleattributes.cxx @@ -1150,7 +1150,7 @@ namespace svgio::svgreader if(SVGToken::Path == mrOwner.getType() || // path SVGToken::Polygon == mrOwner.getType() || // polygon, polyline SVGToken::Line == mrOwner.getType() ||// line -getCssStyleParent()) +SVGToken::Style == mrOwner.getType())// tdf#150323 { // try to add markers add_markers(rPath, rTarget, pHelpPointIndices); @@ -1877,7 +1877,8 @@ namespace svgio::svgreader } case SVGToken::Marker: { -if(getCssStyleParent()) +// tdf#155819: Using the marker property from a style sheet is equivalent to using all three (start, mid, end). +if(mrOwner.getType() == SVGToken::Style) { readLocalUrl(aContent, maMarkerEndXLink); maMarkerStartXLink = maMarkerMidXLink = maMarkerEndXLink;
[Libreoffice-commits] core.git: Branch 'libreoffice-7-5' - svgio/source
svgio/source/svgreader/svgstyleattributes.cxx | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) New commits: commit c821fd07d45e2bf6b55922305001147af49613bf Author: Xisco Fauli AuthorDate: Thu Jun 8 13:49:11 2023 +0200 Commit: Michael Stahl CommitDate: Wed Jun 14 10:50:43 2023 +0200 tdf#155733: no need to store these values Remove the unittest in libreoffice-7-5 since the sample file uses which is not supported in this branch Change-Id: I1c22f8f344731eb5fbc5f77fc80267ebcdc81ed6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152740 Tested-by: Jenkins Reviewed-by: Xisco Fauli (cherry picked from commit 9662b23182174888045726fd57bf7d93c16cf4fb) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152757 Signed-off-by: Xisco Fauli Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153037 Reviewed-by: Michael Stahl diff --git a/svgio/source/svgreader/svgstyleattributes.cxx b/svgio/source/svgreader/svgstyleattributes.cxx index ffdebc2f36a4..8661b99d8895 100644 --- a/svgio/source/svgreader/svgstyleattributes.cxx +++ b/svgio/source/svgreader/svgstyleattributes.cxx @@ -2866,7 +2866,7 @@ namespace svgio::svgreader if(!aClipPath.isEmpty()) { -const_cast< SvgStyleAttributes* >(this)->mpClipPathXLink = dynamic_cast< const SvgClipPathNode* >(mrOwner.getDocument().findSvgNodeById(aClipPath)); +return dynamic_cast< const SvgClipPathNode* >(mrOwner.getDocument().findSvgNodeById(aClipPath)); } } @@ -2901,7 +2901,7 @@ namespace svgio::svgreader if(!aMask.isEmpty()) { -const_cast< SvgStyleAttributes* >(this)->mpMaskXLink = dynamic_cast< const SvgMaskNode* >(mrOwner.getDocument().findSvgNodeById(aMask)); +return dynamic_cast< const SvgMaskNode* >(mrOwner.getDocument().findSvgNodeById(aMask)); } } @@ -2936,7 +2936,7 @@ namespace svgio::svgreader if(!aMarker.isEmpty()) { -const_cast< SvgStyleAttributes* >(this)->mpMarkerStartXLink = dynamic_cast< const SvgMarkerNode* >(mrOwner.getDocument().findSvgNodeById(getMarkerStartXLink())); +return dynamic_cast< const SvgMarkerNode* >(mrOwner.getDocument().findSvgNodeById(getMarkerStartXLink())); } } @@ -2971,7 +2971,7 @@ namespace svgio::svgreader if(!aMarker.isEmpty()) { -const_cast< SvgStyleAttributes* >(this)->mpMarkerMidXLink = dynamic_cast< const SvgMarkerNode* >(mrOwner.getDocument().findSvgNodeById(getMarkerMidXLink())); +return dynamic_cast< const SvgMarkerNode* >(mrOwner.getDocument().findSvgNodeById(getMarkerMidXLink())); } } @@ -3006,7 +3006,7 @@ namespace svgio::svgreader if(!aMarker.isEmpty()) { -const_cast< SvgStyleAttributes* >(this)->mpMarkerEndXLink = dynamic_cast< const SvgMarkerNode* >(mrOwner.getDocument().findSvgNodeById(getMarkerEndXLink())); +return dynamic_cast< const SvgMarkerNode* >(mrOwner.getDocument().findSvgNodeById(getMarkerEndXLink())); } }
[Libreoffice-commits] core.git: Branch 'libreoffice-7-6' - sw/qa sw/source
sw/qa/extras/uiwriter/uiwriter2.cxx | 19 +++ sw/source/core/crsr/crsrsh.cxx | 10 ++ 2 files changed, 29 insertions(+) New commits: commit e2e2a9d5b1153965c93caab4b748eae5994b8a50 Author: Michael Stahl AuthorDate: Fri Jun 9 13:59:58 2023 +0200 Commit: Michael Stahl CommitDate: Wed Jun 14 10:48:00 2023 +0200 cool#6580 sw: fix infinite loop when changing document language If there's a footnote in the document, changing the document langauge goes into an infinite loop in FindParentText(), because the selection created by ExtendedSelectAll(true) is actually invalid, apparently the intention is that only very limited functions may be called while it is active. Don't handle this invalid "very" extended selection like one created by ExtendedSelectAll(false). (regression from commit d81379db730a163c5ff75d4f3a3cddbd7b5eddda) Change-Id: Icf1032715cf2e0a05bf485039c483440c08bb6bb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152797 Tested-by: Jenkins Reviewed-by: Michael Stahl (cherry picked from commit ca9341cf60f3f9350662d30b61f6eadefca24667) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152818 diff --git a/sw/qa/extras/uiwriter/uiwriter2.cxx b/sw/qa/extras/uiwriter/uiwriter2.cxx index a09d7b6fb780..6c9714367bf7 100644 --- a/sw/qa/extras/uiwriter/uiwriter2.cxx +++ b/sw/qa/extras/uiwriter/uiwriter2.cxx @@ -18,6 +18,10 @@ #include #include #include +#include +#include +#include +#include #include #include #include @@ -168,6 +172,21 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf101534) CPPUNIT_ASSERT_EQUAL(::tools::Long(0), aSet.GetItem(RES_MARGIN_TEXTLEFT)->GetTextLeft()); } +CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testExtendedSelectAllHang) +{ +createSwDoc(); +SwDoc* const pDoc = getSwDoc(); +SwWrtShell* const pWrtShell = pDoc->GetDocShell()->GetWrtShell(); + +pWrtShell->InsertFootnote(""); +pWrtShell->StartOfSection(); +SwView* pView = pDoc->GetDocShell()->GetView(); +SfxStringItem aLangString(SID_LANGUAGE_STATUS, "Default_Spanish (Bolivia)"); +// this looped +pView->GetViewFrame().GetDispatcher()->ExecuteList(SID_LANGUAGE_STATUS, SfxCallMode::SYNCHRON, + { &aLangString }); +} + CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testRedlineMoveInsertInDelete) { createSwDoc(); diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx index 325ff54d52cd..9fb43ff2d596 100644 --- a/sw/source/core/crsr/crsrsh.cxx +++ b/sw/source/core/crsr/crsrsh.cxx @@ -895,6 +895,16 @@ SwCursorShell::ExtendedSelectedAll() const typename SwCursorShell::StartsWith SwCursorShell::StartsWith_() { SwShellCursor const*const pShellCursor = getShellCursor(false); +// first, check if this is invalid; ExtendedSelectAll(true) may result in +// a) an ordinary selection that is valid +// b) a selection that is extended +// c) a selection that is invalid and will cause FindParentText to loop +SwNode const& rEndOfExtras(GetDoc()->GetNodes().GetEndOfExtras()); +if (pShellCursor->Start()->nNode.GetIndex() <= rEndOfExtras.GetIndex() +&& rEndOfExtras.GetIndex() < pShellCursor->End()->nNode.GetIndex()) +{ +return StartsWith::None; // *very* extended, no ExtendedSelectedAll handling! +} SwStartNode const*const pStartNode(FindParentText(*pShellCursor)); if (auto const ret = ::StartsWith(*pStartNode); ret != StartsWith::None) {
[Libreoffice-commits] core.git: Branch 'libreoffice-7-6' - 2 commits - vcl/win winaccessibility/inc winaccessibility/source
vcl/win/window/salframe.cxx | 52 +++- winaccessibility/inc/AccEventListener.hxx |2 winaccessibility/inc/AccObject.hxx |4 winaccessibility/inc/AccObjectWinManager.hxx|9 winaccessibility/source/service/AccEventListener.cxx|9 winaccessibility/source/service/AccObject.cxx |9 winaccessibility/source/service/AccObjectWinManager.cxx | 167 +--- winaccessibility/source/service/msaaservice_impl.cxx|2 8 files changed, 153 insertions(+), 101 deletions(-) New commits: commit 6c6ff04a82d50691aaa5d084660b606b5c137be1 Author: Michael Stahl AuthorDate: Tue Jun 13 12:30:44 2023 +0200 Commit: Michael Stahl CommitDate: Wed Jun 14 10:47:18 2023 +0200 tdf#155794 vcl: handle WM_GETOBJECT without SolarMutex SalFrameWndProc() handles WM_GETOBJECT by acquiring SolarMutex and calling ImplHandleGetObject(), which again acquires the SolarMutex inside Application::SetSettings(). This was introduced with commit db214684057e3ff2fa32d57c00507309dd6c24d6 due to thread-safety crashes but it turns out that it can be problematic. When loading a document on a non-main thread, WinSalFrame::SetTitle() calls SetWindowTextW which is equivalent to SendMessage(WM_SETTEXT), while holding SolarMutex, and if the main thread doesn't finish processing it then that's a deadlock. Typically Desktop::Main() has already created the mxAccessBridge, so ImplHandleGetObject() most likely doesn't need to do it, so just skip the Settings code there in case the SolarMutex is locked by another thread. In case the SolarMutex is locked by another thread, do an unsafe read of ImplGetSVData()->mxAccessBridge - this should work until ImplSVData is deleted, by which time no Windows should exist anymore that could be receiving messages. This fixes part of the problem, winaccessibility also needs to stop using SolarMutex. Change-Id: I62b027ad06d2c3eb06a5f64b052a4acd0908f79c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152958 Tested-by: Jenkins Reviewed-by: Michael Stahl (cherry picked from commit 889c12e98e04edb4bc25b86bf16b8cf1d9b68420) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152986 diff --git a/vcl/win/window/salframe.cxx b/vcl/win/window/salframe.cxx index e0a99d8e8779..2e60f38c1f11 100644 --- a/vcl/win/window/salframe.cxx +++ b/vcl/win/window/salframe.cxx @@ -5395,30 +5395,43 @@ static void ImplHandleIMENotify( HWND hWnd, WPARAM wParam ) static bool ImplHandleGetObject(HWND hWnd, LPARAM lParam, WPARAM wParam, LRESULT & nRet) { -if (!Application::GetSettings().GetMiscSettings().GetEnableATToolSupport()) +uno::Reference xMSAA; +if (ImplSalYieldMutexTryToAcquire()) { -// IA2 should be enabled automatically -AllSettings aSettings = Application::GetSettings(); -MiscSettings aMisc = aSettings.GetMiscSettings(); -aMisc.SetEnableATToolSupport(true); -// The above is enough, since aMisc changes the same shared ImplMiscData as used in global -// settings, so no need to call aSettings.SetMiscSettings and Application::SetSettings - if (!Application::GetSettings().GetMiscSettings().GetEnableATToolSupport()) -return false; // locked down somehow ? -} +{ +// IA2 should be enabled automatically +AllSettings aSettings = Application::GetSettings(); +MiscSettings aMisc = aSettings.GetMiscSettings(); +aMisc.SetEnableATToolSupport(true); +// The above is enough, since aMisc changes the same shared ImplMiscData as used in global +// settings, so no need to call aSettings.SetMiscSettings and Application::SetSettings + +if (!Application::GetSettings().GetMiscSettings().GetEnableATToolSupport()) +return false; // locked down somehow ? +} -ImplSVData* pSVData = ImplGetSVData(); +ImplSVData* pSVData = ImplGetSVData(); -// Make sure to launch Accessibility only the following criteria are satisfied -// to avoid RFT interrupts regular accessibility processing -if ( !pSVData->mxAccessBridge.is() ) -{ -if( !InitAccessBridge() ) -return false; +// Make sure to launch Accessibility only the following criteria are satisfied +// to avoid RFT interrupts regular accessibility processing +if ( !pSVData->mxAccessBridge.is() ) +{ +if( !InitAccessBridge() ) +return false; +} +xMSAA.set(pSVData->mxAccessBridge, uno::UNO_QUERY); +ImplSalYieldMutexRelease(); +} +else +{ // tdf#155794: access without locking: hopefully this should be fine +// as the bridge is typically inited in Desktop::Main() already and the +// WM_GETOBJE
[Libreoffice-commits] core.git: Branch 'libreoffice-7-6' - oox/source sc/source
oox/source/token/tokens.txt |1 + sc/source/filter/inc/condformatbuffer.hxx |3 +++ sc/source/filter/oox/condformatbuffer.cxx | 15 +++ sc/source/filter/oox/extlstcontext.cxx|6 ++ 4 files changed, 25 insertions(+) New commits: commit eb2de384f33875dabb98bf91d682111597d81784 Author: Henry Castro AuthorDate: Fri Mar 17 10:34:15 2023 -0400 Commit: Xisco Fauli CommitDate: Wed Jun 14 10:45:35 2023 +0200 sc: filter: oox: add missing tag "fillcolor" To fill the positive color of the conditional format data bar: Signed-off-by: Henry Castro Change-Id: I17e83a01a292ff941d92f6ae59954aa246ef Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149064 Tested-by: Jenkins CollaboraOffice Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152965 Tested-by: Jenkins (cherry picked from commit aebf004ae72e914540526269499bae27f39e04bf) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153013 Reviewed-by: Xisco Fauli diff --git a/oox/source/token/tokens.txt b/oox/source/token/tokens.txt index dee9010df789..eb5239d8a8ac 100644 --- a/oox/source/token/tokens.txt +++ b/oox/source/token/tokens.txt @@ -2228,6 +2228,7 @@ fileType fileVersion filetime fill +fillColor fillClrLst fillFormulas fillId diff --git a/sc/source/filter/inc/condformatbuffer.hxx b/sc/source/filter/inc/condformatbuffer.hxx index 08e9053684e2..cdc8d4727baf 100644 --- a/sc/source/filter/inc/condformatbuffer.hxx +++ b/sc/source/filter/inc/condformatbuffer.hxx @@ -237,6 +237,7 @@ struct ExCfRuleModel ExCfRuleModel() : mnAxisColor( ColorTransparency, UNSIGNED_RGB_TRANSPARENT ), mnNegativeColor( ColorTransparency, UNSIGNED_RGB_TRANSPARENT ), mbGradient( false ), mbIsLower( true ) {} // AxisColor ::Color mnAxisColor; +::Color mnPositiveColor; // NegativeFillColor ::Color mnNegativeColor; OUString maAxisPosition; // DataBar @@ -251,6 +252,7 @@ class ExtCfDataBarRule : public WorksheetHelper enum RuleType { DATABAR, +POSITIVEFILLCOLOR, NEGATIVEFILLCOLOR, AXISCOLOR, CFVO, @@ -264,6 +266,7 @@ public: ExtCfDataBarRule(ScDataBarFormatData* pTarget, const WorksheetHelper& rParent); void finalizeImport(); void importDataBar( const AttributeList& rAttribs ); +void importPositiveFillColor( const AttributeList& rAttribs ); void importNegativeFillColor( const AttributeList& rAttribs ); void importAxisColor( const AttributeList& rAttribs ); void importCfvo( const AttributeList& rAttribs ); diff --git a/sc/source/filter/oox/condformatbuffer.cxx b/sc/source/filter/oox/condformatbuffer.cxx index 1b397c2db316..649046e8b3b7 100644 --- a/sc/source/filter/oox/condformatbuffer.cxx +++ b/sc/source/filter/oox/condformatbuffer.cxx @@ -1398,6 +1398,12 @@ void ExtCfDataBarRule::finalizeImport() pDataBar->maAxisColor = maModel.mnAxisColor; break; } +case POSITIVEFILLCOLOR: +{ +ScDataBarFormatData* pDataBar = mpTarget; +pDataBar->maPositiveColor = maModel.mnPositiveColor; +break; +} case NEGATIVEFILLCOLOR: { ScDataBarFormatData* pDataBar = mpTarget; @@ -1456,6 +1462,15 @@ void ExtCfDataBarRule::importDataBar( const AttributeList& rAttribs ) maModel.maAxisPosition = rAttribs.getString( XML_axisPosition, "automatic" ); } +void ExtCfDataBarRule::importPositiveFillColor( const AttributeList& rAttribs ) +{ +mnRuleType = POSITIVEFILLCOLOR; +ThemeBuffer& rThemeBuffer = getTheme(); +GraphicHelper& rGraphicHelper = getBaseFilter().getGraphicHelper(); +::Color aColor = importOOXColor(rAttribs, rThemeBuffer, rGraphicHelper); +maModel.mnPositiveColor = aColor; +} + void ExtCfDataBarRule::importNegativeFillColor( const AttributeList& rAttribs ) { mnRuleType = NEGATIVEFILLCOLOR; diff --git a/sc/source/filter/oox/extlstcontext.cxx b/sc/source/filter/oox/extlstcontext.cxx index 1ea6b70d8707..2646f0969958 100644 --- a/sc/source/filter/oox/extlstcontext.cxx +++ b/sc/source/filter/oox/extlstcontext.cxx @@ -56,6 +56,12 @@ void ExtCfRuleContext::onStartElement( const AttributeList& rAttribs ) xRule->importDataBar( rAttribs ); break; } +case XLS14_TOKEN( fillColor ): +{ +ExtCfDataBarRuleRef xRule = getCondFormats().createExtCfDataBarRule(mpTarget); +xRule->importPositiveFillColor( rAttribs ); +break; +} case XLS14_TOKEN( negativeFillColor ): { ExtCfDataBarRuleRef xRule = getCondFormats().createExtCfDataBarRule(mpTarget);
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - sw/qa sw/source writerfilter/source
sw/qa/extras/ooxmlexport/data/para-style-char-position.docx |binary sw/qa/extras/ooxmlexport/ooxmlexport18.cxx | 18 ++ sw/source/filter/ww8/docxattributeoutput.cxx|8 writerfilter/source/dmapper/DomainMapper.cxx| 21 ++-- writerfilter/source/dmapper/DomainMapper.hxx|6 ++- writerfilter/source/dmapper/DomainMapper_Impl.cxx |4 +- writerfilter/source/dmapper/DomainMapper_Impl.hxx |2 - writerfilter/source/dmapper/StyleSheetTable.cxx |1 8 files changed, 53 insertions(+), 7 deletions(-) New commits: commit cf2afb85305153aff5d7faca10216c4d0610dad0 Author: Miklos Vajna AuthorDate: Tue Jun 13 15:02:20 2023 +0200 Commit: Mike Kaganski CommitDate: Wed Jun 14 10:18:19 2023 +0200 DOCX filter: improve handling of negative in paragraph styles The bugdoc has a in its Normal paragraph style, which is almost not visible in Word, but we mapped this to default subscript text in Writer, leading to very visible bad font height in practice. The root of the problem is that works with an absolute offset in half-points, while Writer works in percentages, so the import/export code can only do a correct mapping in case the font size is known. This initial mapping was added in commit e70df84352d3670508a4666c97df44f82c1ce934 (try somewhat harder to read w:position (bnc#773061), 2012-08-07), and later commit d71cf6390a89ea6a4fab724e3a7996f28ca33661 (tdf#99602 writerfilter: import subscript into character style, 2019-10-04) gave up on this for character styles. Fix the problem by working with paragraph styles similar to what the binary DOC filter already does, just assuming that the font height from the style won't be overwritten, or will be overwritten together with a matching . Do this only for negative for now, as that's good enough for our needs. Do the opposite of this at export time. It would be still possible in the future to add native handling for absolute escapements, and then this mapping would not be needed at all. (cherry picked from commit 85f0a5d7bc54dfba75e8d6dd9c905bc1ac31d927) Change-Id: I771c7bed27fa2596153aa77c472c91b819fa4cb1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153035 Tested-by: Jenkins CollaboraOffice Reviewed-by: Mike Kaganski diff --git a/sw/qa/extras/ooxmlexport/data/para-style-char-position.docx b/sw/qa/extras/ooxmlexport/data/para-style-char-position.docx new file mode 100644 index ..946ca0bf9cc2 Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/para-style-char-position.docx differ diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport18.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport18.cxx index ba2bdfed3c3f..00fbebcb3f4e 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport18.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport18.cxx @@ -406,6 +406,24 @@ CPPUNIT_TEST_FIXTURE(Test, testNumberPortionFormatFromODT) assertXPath(pXmlDoc, "//w:pPr/w:rPr/w:sz", "val", "48"); } +CPPUNIT_TEST_FIXTURE(Test, testParaStyleCharPosition) +{ +// Given a loaded document where the Normal paragraph style has : +createSwDoc("para-style-char-position.docx"); + +// When saving it back to DOCX: +save("Office Open XML Text"); + +// Then make sure that is not turned into a normal subscript text: +xmlDocUniquePtr pXmlDoc = parseExport("word/styles.xml"); +// Without the accompanying fix in place, this test would have failed with: +// - Expected: 1 +// - Actual : 0 +// - XPath '/w:styles/w:style[@w:styleId='Normal']/w:rPr/w:position' number of nodes is incorrect +// i.e. we wrote instead of . +assertXPath(pXmlDoc, "/w:styles/w:style[@w:styleId='Normal']/w:rPr/w:position", "val", "-1"); +} + CPPUNIT_TEST_FIXTURE(Test, testTdf150966_regularInset) { // Given a docx document with a rectangular shape with height cy="90" (EMU), tIns="18" diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index b954d74d1b4e..795d25ef8f82 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -7693,8 +7693,14 @@ void DocxAttributeOutput::CharEscapement( const SvxEscapementItem& rEscapement ) OString sIss; short nEsc = rEscapement.GetEsc(), nProp = rEscapement.GetProportionalHeight(); +bool bParaStyle = false; +if (m_rExport.m_bStyDef && m_rExport.m_pCurrentStyle) +{ +bParaStyle = m_rExport.m_pCurrentStyle->Which() == RES_TXTFMTCOLL; +} + // Simplify styles to avoid impossible complexity. Import and export as defaults only -if ( m_rExport.m_bStyDef && nEsc ) +if ( m_rExport.m_bStyDef && nEsc && !(bParaStyle && nEsc < 0)) { nProp = DFLT_ESC_PROP; nEsc = (nEsc > 0) ? DFLT_ESC_AUTO_S
[Libreoffice-commits] core.git: oox/CppunitTest_oox_mcgr.mk oox/Module_oox.mk oox/qa oox/source
oox/CppunitTest_oox_mcgr.mk | 53 + oox/Module_oox.mk|1 oox/qa/unit/data/MCGR_FontworkColorGradient.fodp | 662 +++ oox/qa/unit/data/MCGR_FontworkColorGradient.fodt | 331 +++ oox/qa/unit/export.cxx | 80 +- oox/qa/unit/mcgr.cxx | 73 ++ oox/source/drawingml/fontworkhelpers.cxx | 314 ++ 7 files changed, 1236 insertions(+), 278 deletions(-) New commits: commit 0028c2311ca14669ca530cd4db422cd3cf9438ca Author: Regina Henschel AuthorDate: Sat Jun 10 19:09:34 2023 +0200 Commit: Regina Henschel CommitDate: Wed Jun 14 10:09:51 2023 +0200 MCGR: Use BGradient in export of Fontwork to docx too Transparency values are not exactly like in UI because converting through rgb-color adds rounding inaccuracy. The unit tests are adjusted accordingly. With only start and end values it was possible to use the UI values directly. It would be possible to make special cases for front and back value, but I think it is not worth the effort. The previous solution had the error, that the stops were not mirrored in case of non linear gradient. That is corrected now. The unit tests are adjusted. The previous solution had assumed that our 'intensity' at start or end colors is the same as the 'lumMod' attribute in OOXML. However, this is not the case. So now the 'intensity' is incorporated into the color. Again, the unit tests are adjusted. Change-Id: Id02e455dc09d12c5b453637fcb2bdc4f8f1529d1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152839 Tested-by: Jenkins Reviewed-by: Regina Henschel diff --git a/oox/CppunitTest_oox_mcgr.mk b/oox/CppunitTest_oox_mcgr.mk new file mode 100644 index ..ea7692e161fc --- /dev/null +++ b/oox/CppunitTest_oox_mcgr.mk @@ -0,0 +1,53 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +#* +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# +#* + +$(eval $(call gb_CppunitTest_CppunitTest,oox_mcgr)) + +$(eval $(call gb_CppunitTest_use_externals,oox_mcgr,\ + boost_headers \ + libxml2 \ +)) + +$(eval $(call gb_CppunitTest_add_exception_objects,oox_mcgr, \ +oox/qa/unit/mcgr \ +)) + +$(eval $(call gb_CppunitTest_use_libraries,oox_mcgr, \ +comphelper \ +cppu \ +cppuhelper \ +oox \ +sal \ +subsequenttest \ +test \ +unotest \ +utl \ +tl \ +)) + +$(eval $(call gb_CppunitTest_use_sdk_api,oox_mcgr)) + +$(eval $(call gb_CppunitTest_use_ure,oox_mcgr)) +$(eval $(call gb_CppunitTest_use_vcl,oox_mcgr)) + +$(eval $(call gb_CppunitTest_use_rdb,oox_mcgr,services)) + +$(eval $(call gb_CppunitTest_use_custom_headers,oox_mcgr,\ + officecfg/registry \ +)) + +$(eval $(call gb_CppunitTest_use_configuration,oox_mcgr)) + +$(eval $(call gb_CppunitTest_add_arguments,oox_mcgr, \ + -env:arg-env=$(gb_Helper_LIBRARY_PATH_VAR)"{$(gb_Helper_LIBRARY_PATH_VAR)+=$(gb_Helper_LIBRARY_PATH_VAR)}" \ +)) + +# vim: set noet sw=4 ts=4: diff --git a/oox/Module_oox.mk b/oox/Module_oox.mk index f868a126a61c..dc07ab913c56 100644 --- a/oox/Module_oox.mk +++ b/oox/Module_oox.mk @@ -34,6 +34,7 @@ $(eval $(call gb_Module_add_check_targets,oox,\ CppunitTest_oox_vml \ CppunitTest_oox_shape \ CppunitTest_oox_export \ +CppunitTest_oox_mcgr \ )) endif diff --git a/oox/qa/unit/data/MCGR_FontworkColorGradient.fodp b/oox/qa/unit/data/MCGR_FontworkColorGradient.fodp new file mode 100644 index ..e82401442c05 --- /dev/null +++ b/oox/qa/unit/data/MCGR_FontworkColorGradient.fodp @@ -0,0 +1,662 @@ + + +http://openoffice.org/2004/office"; xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:xlink="http://www.w3.org/1999/xlink"; xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:dc="http://purl.org/dc/elements/1.1/"; xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:rpt="http://openoffice.org/2005/report"; xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:ooow="http://openoffice.org/200
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - sw/qa sw/source
sw/qa/core/unocore/data/floattable-outer-nonsplit-inner.docx |binary sw/qa/core/unocore/unocore.cxx | 24 sw/source/core/unocore/unotext.cxx | 32 +-- 3 files changed, 53 insertions(+), 3 deletions(-) New commits: commit 39a16c392b68bfa359f36a6d71cb43b373d019a6 Author: Miklos Vajna AuthorDate: Tue Jun 13 08:15:34 2023 +0200 Commit: Caolán McNamara CommitDate: Wed Jun 14 10:07:38 2023 +0200 sw floattable: fix anchor position of inner floating table The bugdoc has an outer, split floating table and an inner, non-split floating table. The anchor of the inner table was wrong: both were anchored in the only paragraph in the body text, while the inner floating table should be anchored inside the outer floating table. The reason for this is commit 9592f56323de27f9e1d890ee6259a5f4f328cbd3 (n#695479 fix anchor handling in SwXText::convertToTextFrame(), 2012-02-20), which was necessary to make sure that old-style frames after each other are all anchored to the body text, not inside each other. Fix the problem by leaving the behavior unchanged for empty paragraphs, but at least when the inner anchor is to-para, the last paragraph of a fly content is non-empty and the outer fly range contains the entire last paragraph, then consider such a fly as "inside" the outer fly content, rather than something that has to be moved so the anchor is still in the body text. CppunitTest_sw_rtfimport's testN695479, CppunitTest_sw_ooxmlexport10's testFloatingTablesAnchor and CppunitTest_sw_ooxmlexport13's testFlyInFly are all related tests and they continue to work after this change. (cherry picked from commit c374628126ad222be48d5d06857b7dc6b879f783) Change-Id: I30ed1d884ec465e724b4f133640b9608845a44fe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152967 Tested-by: Jenkins CollaboraOffice Reviewed-by: Caolán McNamara diff --git a/sw/qa/core/unocore/data/floattable-outer-nonsplit-inner.docx b/sw/qa/core/unocore/data/floattable-outer-nonsplit-inner.docx new file mode 100644 index ..dc213b1b0d26 Binary files /dev/null and b/sw/qa/core/unocore/data/floattable-outer-nonsplit-inner.docx differ diff --git a/sw/qa/core/unocore/unocore.cxx b/sw/qa/core/unocore/unocore.cxx index d17b1e19940a..603d56d449a1 100644 --- a/sw/qa/core/unocore/unocore.cxx +++ b/sw/qa/core/unocore/unocore.cxx @@ -29,6 +29,8 @@ #include #include #include +#include +#include using namespace ::com::sun::star; @@ -930,6 +932,28 @@ CPPUNIT_TEST_FIXTURE(SwCoreUnocoreTest, testFlySplit) CPPUNIT_ASSERT(bIsSplitAllowed); } +CPPUNIT_TEST_FIXTURE(SwCoreUnocoreTest, testConvertToTextFrame) +{ +// Given a document with 2 non-interesting frames, an inner frame and an outer frame: +createSwDoc("floattable-outer-nonsplit-inner.docx"); + +// When checking the anchor of the inner frame: +SwDoc* pDoc = getSwDoc(); +const SwFrameFormats& rFrames = *pDoc->GetSpzFrameFormats(); +SwFrameFormat* pFrame3 = rFrames.FindFormatByName("Frame3"); +SwNodeIndex aFrame3Anchor = pFrame3->GetAnchor().GetContentAnchor()->nNode; + +// Then make sure it's anchored in the outer frame's last content node: +SwFrameFormat* pFrame4 = rFrames.FindFormatByName("Frame4"); +SwPaM aPaM(*pFrame4->GetContent().GetContentIdx()->GetNode().EndOfSectionNode()); +aPaM.Move(fnMoveBackward, GoInContent); +// Without the accompanying fix in place, this test would have failed with: +// - Expected: SwNodeIndex (node 27) +// - Actual : SwNodeIndex (node 49) +// i.e. Frame3 was anchored much later, in the body text, not in Frame4. +CPPUNIT_ASSERT_EQUAL(aPaM.GetPoint()->nNode, aFrame3Anchor); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/core/unocore/unotext.cxx b/sw/source/core/unocore/unotext.cxx index c2655901f66d..98b9cecbf57c 100644 --- a/sw/source/core/unocore/unotext.cxx +++ b/sw/source/core/unocore/unotext.cxx @@ -1537,6 +1537,34 @@ static bool isGraphicNode(const SwFrameFormat* pFrameFormat) return index.GetNode().IsGrfNode(); } +/// Determines if the at-para rAnchor is anchored at the start or end of rAnchorCheckPam. +static bool IsAtParaMatch(const SwPaM& rAnchorCheckPam, const SwFormatAnchor& rAnchor) +{ +if (rAnchor.GetAnchorId() != RndStdIds::FLY_AT_PARA) +{ +return false; +} + +if (rAnchorCheckPam.Start()->GetNode() == *rAnchor.GetAnchorNode()) +{ +return true; +} + +if (rAnchorCheckPam.End()->GetNode() == *rAnchor.GetAnchorNode()) +{ +SwTextNode* pEndTextNode = rAnchorCheckPam.End()->GetNode().GetTextNode(); +if (pEndTextNode && rAnchorCheckPam.End()->GetContentIndex() == pEndTextNode->Len()) +{ +// rAnchorCheckPam covers the enti
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - writerfilter/source
writerfilter/source/dmapper/DomainMapper_Impl.cxx |4 writerfilter/source/dmapper/NumberingManager.cxx | 10 writerfilter/source/dmapper/PropertyIds.cxx | 689 ++ writerfilter/source/dmapper/PropertyIds.hxx |2 writerfilter/source/dmapper/PropertyMap.cxx | 20 5 files changed, 360 insertions(+), 365 deletions(-) New commits: commit c631abe193bebf41d36a5ad69baa79940d1b4631 Author: Noel Grandin AuthorDate: Fri May 12 11:00:47 2023 +0200 Commit: Miklos Vajna CommitDate: Wed Jun 14 10:06:28 2023 +0200 avoid some OUString construction in writerfilter/ no need to repeatedly construct these Change-Id: Ie271c8adaf1cb558d3174c9f325de524c46e399b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151698 Tested-by: Jenkins Reviewed-by: Noel Grandin (cherry picked from commit 58208b97b972d6ddca5122893b3084c67b0c5ecd) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152991 Tested-by: Jenkins CollaboraOffice Reviewed-by: Miklos Vajna diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index 745a4ca355e5..ac3cf2aa6032 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -1606,7 +1606,7 @@ static void lcl_MoveBorderPropertiesToFrame(std::vector& r for( size_t nProperty = 0; nProperty < SAL_N_ELEMENTS( aBorderProperties ); ++nProperty) { -OUString sPropertyName = getPropertyName(aBorderProperties[nProperty]); +const OUString & sPropertyName = getPropertyName(aBorderProperties[nProperty]); beans::PropertyValue aValue; aValue.Name = sPropertyName; aValue.Value = xTextRangeProperties->getPropertyValue(sPropertyName); @@ -4059,7 +4059,7 @@ void DomainMapper_Impl::PushShapeContext( const uno::Reference< drawing::XShape if ( bOnlyApplyCharHeight && eId != PROP_CHAR_HEIGHT ) continue; -const OUString sPropName = getPropertyName(eId); +const OUString & sPropName = getPropertyName(eId); if ( beans::PropertyState_DEFAULT_VALUE == xShapePropertyState->getPropertyState(sPropName) ) { const uno::Any aProp = GetPropertyFromStyleSheet(eId, pEntry, /*bDocDefaults=*/true, /*bPara=*/true); diff --git a/writerfilter/source/dmapper/NumberingManager.cxx b/writerfilter/source/dmapper/NumberingManager.cxx index ea4fb36ec4a2..047e775d726f 100644 --- a/writerfilter/source/dmapper/NumberingManager.cxx +++ b/writerfilter/source/dmapper/NumberingManager.cxx @@ -276,9 +276,9 @@ void ListLevel::AddParaProperties( uno::Sequence< beans::PropertyValue >* props { uno::Sequence< beans::PropertyValue >& aProps = *props; -OUString sFirstLineIndent = getPropertyName( +const OUString & sFirstLineIndent = getPropertyName( PROP_FIRST_LINE_INDENT ); -OUString sIndentAt = getPropertyName( +const OUString & sIndentAt = getPropertyName( PROP_INDENT_AT ); bool hasFirstLineIndent = lcl_findProperty( aProps, sFirstLineIndent ); @@ -292,9 +292,9 @@ void ListLevel::AddParaProperties( uno::Sequence< beans::PropertyValue >* props // ParaFirstLineIndent -> FirstLineIndent // ParaLeftMargin -> IndentAt -OUString sParaIndent = getPropertyName( +const OUString & sParaIndent = getPropertyName( PROP_PARA_FIRST_LINE_INDENT ); -OUString sParaLeftMargin = getPropertyName( +const OUString & sParaLeftMargin = getPropertyName( PROP_PARA_LEFT_MARGIN ); for ( const auto& rParaProp : aParaProps ) @@ -615,7 +615,7 @@ void ListDef::CreateNumberingRules( DomainMapper& rDMapper, } // Create the numbering style for these rules -OUString sNumRulesName = getPropertyName( PROP_NUMBERING_RULES ); +const OUString & sNumRulesName = getPropertyName( PROP_NUMBERING_RULES ); xStyle->setPropertyValue( sNumRulesName, uno::Any( m_xNumRules ) ); } catch( const lang::IllegalArgumentException& ) diff --git a/writerfilter/source/dmapper/PropertyIds.cxx b/writerfilter/source/dmapper/PropertyIds.cxx index 31151ac6c229..935e9dfd2075 100644 --- a/writerfilter/source/dmapper/PropertyIds.cxx +++ b/writerfilter/source/dmapper/PropertyIds.cxx @@ -18,357 +18,352 @@ */ #include #include "PropertyIds.hxx" +#include namespace writerfilter::dmapper{ -OUString getPropertyName( PropertyIds eId ) +const OUString & getPropertyName( PropertyIds eId ) { -OUString sName; -switch(eId) { -case PROP_CHAR_WEIGHT: sName = "CharWeight"; break; -case PROP_CHAR_POSTURE:sName = "CharPosture"; break; -case PROP_CHAR_STRIKEOUT: sN
[Libreoffice-commits] core.git: Branch 'libreoffice-7-6' - sc/source
sc/source/filter/inc/condformatbuffer.hxx |1 + sc/source/filter/inc/extlstcontext.hxx|4 +++- sc/source/filter/oox/condformatbuffer.cxx | 13 + sc/source/filter/oox/extlstcontext.cxx| 28 4 files changed, 45 insertions(+), 1 deletion(-) New commits: commit 2fa664476f7ef233e41f6b445aa9a980ad345961 Author: Henry Castro AuthorDate: Fri Mar 17 10:47:31 2023 -0400 Commit: Xisco Fauli CommitDate: Wed Jun 14 09:32:16 2023 +0200 sc: filter: oox: Add a missing tag child of the parent tag "cfvo" 0 1 Signed-off-by: Henry Castro Change-Id: Ie98507e11a5cdeb0d1adc77a44fd79edb2f26d6a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149066 Tested-by: Jenkins CollaboraOffice Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152998 Tested-by: Jenkins (cherry picked from commit 3d4c4a95c32ad2a96831c3db552b0c389c596aea) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153015 Reviewed-by: Xisco Fauli diff --git a/sc/source/filter/inc/condformatbuffer.hxx b/sc/source/filter/inc/condformatbuffer.hxx index 992f14e041a8..08e9053684e2 100644 --- a/sc/source/filter/inc/condformatbuffer.hxx +++ b/sc/source/filter/inc/condformatbuffer.hxx @@ -241,6 +241,7 @@ struct ExCfRuleModel ::Color mnNegativeColor; OUString maAxisPosition; // DataBar OUString maColorScaleType; // Cfvo +OUString msScaleTypeValue; // Cfvo bool mbGradient; // DataBar bool mbIsLower; // Cfvo }; diff --git a/sc/source/filter/inc/extlstcontext.hxx b/sc/source/filter/inc/extlstcontext.hxx index 8635c6029523..077ebdbebf8e 100644 --- a/sc/source/filter/inc/extlstcontext.hxx +++ b/sc/source/filter/inc/extlstcontext.hxx @@ -32,11 +32,13 @@ public: virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) override; virtual voidonStartElement( const AttributeList& rAttribs ) override; +virtual voidonCharacters( const OUString& rChars ) override; +virtual voidonEndElement() override; private: ScDataBarFormatData* mpTarget; - bool mbFirstEntry; +ExtCfDataBarRuleRef mpRule; }; struct ExtCondFormatRuleModel diff --git a/sc/source/filter/oox/condformatbuffer.cxx b/sc/source/filter/oox/condformatbuffer.cxx index 668467f7ccdf..1b397c2db316 100644 --- a/sc/source/filter/oox/condformatbuffer.cxx +++ b/sc/source/filter/oox/condformatbuffer.cxx @@ -1428,6 +1428,19 @@ void ExtCfDataBarRule::finalizeImport() pEntry->SetType(COLORSCALE_PERCENT); else if (maModel.maColorScaleType == "formula") pEntry->SetType(COLORSCALE_FORMULA); +else if (maModel.maColorScaleType == "num") +pEntry->SetType(COLORSCALE_VALUE); + +if (!maModel.msScaleTypeValue.isEmpty()) +{ +sal_Int32 nSize = 0; +rtl_math_ConversionStatus eStatus = rtl_math_ConversionStatus_Ok; +double fValue = rtl::math::stringToDouble(maModel.msScaleTypeValue, '.', '\0', &eStatus, &nSize); +if (eStatus == rtl_math_ConversionStatus_Ok && nSize == maModel.msScaleTypeValue.getLength()) +{ +pEntry->SetValue(fValue); +} +} break; } case UNKNOWN: // nothing to do diff --git a/sc/source/filter/oox/extlstcontext.cxx b/sc/source/filter/oox/extlstcontext.cxx index 45e60e7c6f5e..1ea6b70d8707 100644 --- a/sc/source/filter/oox/extlstcontext.cxx +++ b/sc/source/filter/oox/extlstcontext.cxx @@ -74,6 +74,7 @@ void ExtCfRuleContext::onStartElement( const AttributeList& rAttribs ) xRule->importCfvo( rAttribs ); xRule->getModel().mbIsLower = mbFirstEntry; mbFirstEntry = false; +mpRule = xRule; break; } default: @@ -81,6 +82,33 @@ void ExtCfRuleContext::onStartElement( const AttributeList& rAttribs ) } } +void ExtCfRuleContext::onCharacters( const OUString& rChars ) +{ +switch( getCurrentElement() ) +{ +case XM_TOKEN( f ): +{ +if (mpRule) +{ +mpRule->getModel().msScaleTypeValue = rChars; +} +} +break; +} +} + +void ExtCfRuleContext::onEndElement() +{ +switch( getCurrentElement() ) +{ +case XLS14_TOKEN( cfvo ): +{ +mpRule.reset(); +break; +} +} +} + namespace { bool IsSpecificTextCondMode(ScConditionMode eMode) {
[Libreoffice-commits] core.git: filter/source vcl/source
filter/source/svg/svgwriter.cxx |2 +- vcl/source/filter/svm/SvmReader.cxx |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) New commits: commit 667c7ea976fab4691660844560eb2dcc7ecbbd19 Author: Andrea Gelmini AuthorDate: Tue Jun 13 20:46:32 2023 +0200 Commit: Julien Nabet CommitDate: Wed Jun 14 09:09:36 2023 +0200 Fix typo Change-Id: I042c738e5d6e037a8c658a02cbfaef8f1d23799e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152999 Tested-by: Julien Nabet Reviewed-by: Julien Nabet diff --git a/filter/source/svg/svgwriter.cxx b/filter/source/svg/svgwriter.cxx index be95c89de895..1826507bead8 100644 --- a/filter/source/svg/svgwriter.cxx +++ b/filter/source/svg/svgwriter.cxx @@ -3400,7 +3400,7 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf, const size_t nMaxPossibleEntries = aMemStm.remainingSize() / 4 * sizeof(double); if (nTmp > nMaxPossibleEntries) { -SAL_WARN("filter.svg", "gradiant record claims to have: " << nTmp << " entries, but only " << nMaxPossibleEntries << " possible, clamping"); +SAL_WARN("filter.svg", "gradient record claims to have: " << nTmp << " entries, but only " << nMaxPossibleEntries << " possible, clamping"); nTmp = nMaxPossibleEntries; } diff --git a/vcl/source/filter/svm/SvmReader.cxx b/vcl/source/filter/svm/SvmReader.cxx index 20462b620da5..56f2d933bbe9 100644 --- a/vcl/source/filter/svm/SvmReader.cxx +++ b/vcl/source/filter/svm/SvmReader.cxx @@ -1347,7 +1347,7 @@ rtl::Reference SvmReader::FloatTransparentHandler(ImplMetaReadData* const size_t nMaxPossibleEntries = mrStream.remainingSize() / 4 * sizeof(double); if (nTmp > nMaxPossibleEntries) { -SAL_WARN("vcl.gdi", "gradiant record claims to have: " << nTmp << " entries, but only " +SAL_WARN("vcl.gdi", "gradient record claims to have: " << nTmp << " entries, but only " << nMaxPossibleEntries << " possible, clamping"); nTmp = nMaxPossibleEntries;