core.git: sal/rtl
sal/rtl/cipher.cxx |4 1 file changed, 4 insertions(+) New commits: commit 4bc05eb49c064dcc019c70e564d0d5edbef67124 Author: Heiko Becker AuthorDate: Sun Feb 4 01:31:55 2024 +0100 Commit: Miklos Vajna CommitDate: Mon Feb 5 09:01:40 2024 +0100 sal: Re-add missing includes They were removed as unused in [1], but it turn out that's not entirely accurate, at least if LIBO_CIPHER_OPENSSL_BACKEND is defined. assert(), o3tl::..., std::numeric_limits and std::memcpy are all used inside that block. [1] 2e71c439057c8d31b6af191ef38607600cb996f0 Change-Id: I2805dc4edf1d05bec5ec203772af73dd93da12bd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162967 Tested-by: Jenkins Reviewed-by: Miklos Vajna diff --git a/sal/rtl/cipher.cxx b/sal/rtl/cipher.cxx index a58c6eef7adc..98b566da61a8 100644 --- a/sal/rtl/cipher.cxx +++ b/sal/rtl/cipher.cxx @@ -25,6 +25,10 @@ #include #if defined LIBO_CIPHER_OPENSSL_BACKEND +#include +#include +#include +#include #include #endif
core.git: xmlsecurity/source
xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx |2 ++ 1 file changed, 2 insertions(+) New commits: commit 538f7b45c0c2c08124e9ea51a0947504f142a4f1 Author: Patrick Luby AuthorDate: Fri Feb 2 16:06:21 2024 -0500 Commit: Stephan Bergmann CommitDate: Mon Feb 5 09:03:56 2024 +0100 tdf#147291 add more default certificate manager application for macOS Add the following applications to the macOS GUI servers list: - Trusted Key Manager - CertEurope - SCInterface Manager and SmartCard tools Change-Id: Iec78171c6e82f0a072f5f06b79606560a8cc03cc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162942 Tested-by: Jenkins Reviewed-by: Patrick Luby Reviewed-by: Stephan Bergmann diff --git a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx index d717ec9feaad..b1a2cd57c95e 100644 --- a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx +++ b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx @@ -128,6 +128,8 @@ namespace #elif defined MACOSX constexpr std::u16string_view aGUIServers[] = { u"/Applications/GPG Keychain.app", +u"/Applications/Trusted Key Manager.app", // tdf#147291 +u"/Applications/SCinterface/scManager.app", // tdf#147291 u"/System/Applications/Utilities/Keychain Access.app"}; #else constexpr std::u16string_view aGUIServers[]
core.git: scaddins/CppunitTest_scaddins_analysis.mk scaddins/Module_scaddins.mk scaddins/qa
scaddins/CppunitTest_scaddins_analysis.mk | 38 ++ scaddins/Module_scaddins.mk |4 + scaddins/qa/analysis.cxx | 63 ++ 3 files changed, 105 insertions(+) New commits: commit bc5e5cb08a91a5daf0e9a5e78cf304b52e1ad369 Author: Mike Kaganski AuthorDate: Mon Feb 5 13:32:40 2024 +0600 Commit: Mike Kaganski CommitDate: Mon Feb 5 09:55:45 2024 +0100 tdf#148645: add unit test This introduces CppunitTest_scaddins_analysis. Change-Id: I4e6d4215f05bc68852ecac12082e8398cca5be5f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162982 Tested-by: Jenkins Reviewed-by: Mike Kaganski diff --git a/scaddins/CppunitTest_scaddins_analysis.mk b/scaddins/CppunitTest_scaddins_analysis.mk new file mode 100644 index ..fa40c03fd8f5 --- /dev/null +++ b/scaddins/CppunitTest_scaddins_analysis.mk @@ -0,0 +1,38 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t; 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/. +# + +$(eval $(call gb_CppunitTest_CppunitTest,scaddins_analysis)) + +$(eval $(call gb_CppunitTest_add_exception_objects,scaddins_analysis, \ +scaddins/qa/analysis \ +)) + +$(eval $(call gb_CppunitTest_use_libraries,scaddins_analysis, \ +comphelper \ +cppu \ +sal \ +test \ +unotest \ +)) + + +$(eval $(call gb_CppunitTest_use_ure,scaddins_analysis)) +$(eval $(call gb_CppunitTest_use_vcl,scaddins_analysis)) + +$(eval $(call gb_CppunitTest_use_rdb,scaddins_analysis,services)) + +$(eval $(call gb_CppunitTest_use_configuration,scaddins_analysis)) + +$(eval $(call gb_CppunitTest_use_sdk_api,scaddins_analysis)) + +$(eval $(call gb_CppunitTest_use_internal_comprehensive_api,scaddins_analysis,\ +scaddins \ +)) + +# vim: set noet sw=4 ts=4: diff --git a/scaddins/Module_scaddins.mk b/scaddins/Module_scaddins.mk index a927385b276c..edc385faf798 100644 --- a/scaddins/Module_scaddins.mk +++ b/scaddins/Module_scaddins.mk @@ -30,4 +30,8 @@ $(eval $(call gb_Module_add_l10n_targets,scaddins,\ AllLangMoTarget_sca \ )) +$(eval $(call gb_Module_add_check_targets,scaddins,\ +CppunitTest_scaddins_analysis \ +)) + # vim: set noet sw=4 ts=4: diff --git a/scaddins/qa/analysis.cxx b/scaddins/qa/analysis.cxx new file mode 100644 index ..5a8cec506e91 --- /dev/null +++ b/scaddins/qa/analysis.cxx @@ -0,0 +1,63 @@ +/* -*- 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/. + */ + +#include + +#include +#include +#include + +#include + +#include + +namespace +{ +class Test : public test::BootstrapFixture +{ +public: +virtual void setUp() override; + +protected: +css::uno::Reference mxAnalysis; +}; + +void Test::setUp() +{ +test::BootstrapFixture::setUp(); +auto xFactory(comphelper::getProcessServiceFactory()); + mxAnalysis.set(xFactory->createInstance(u"com.sun.star.sheet.addin.Analysis"_ustr), + css::uno::UNO_QUERY_THROW); +} + +CPPUNIT_TEST_FIXTURE(Test, test_getDec2Hex) +{ +// Test that 'Places' argument accepts different numeric types +CPPUNIT_ASSERT_EQUAL(u"6E"_ustr, + mxAnalysis->getDec2Hex({}, 110, css::uno::Any(sal_Int8(10; +CPPUNIT_ASSERT_EQUAL(u"6E"_ustr, + mxAnalysis->getDec2Hex({}, 110, css::uno::Any(sal_Int16(10; +CPPUNIT_ASSERT_EQUAL(u"6E"_ustr, + mxAnalysis->getDec2Hex({}, 110, css::uno::Any(sal_uInt16(10; +CPPUNIT_ASSERT_EQUAL(u"6E"_ustr, + mxAnalysis->getDec2Hex({}, 110, css::uno::Any(sal_Int32(10; +CPPUNIT_ASSERT_EQUAL(u"6E"_ustr, + mxAnalysis->getDec2Hex({}, 110, css::uno::Any(sal_uInt32(10; +CPPUNIT_ASSERT_EQUAL(u"6E"_ustr, + mxAnalysis->getDec2Hex({}, 110, css::uno::Any(sal_Int64(10; +CPPUNIT_ASSERT_EQUAL(u"6E"_ustr, + mxAnalysis->getDec2Hex({}, 110, css::uno::Any(double(10; +CPPUNIT_ASSERT_EQUAL(u"6E"_ustr, + mxAnalysis->getDec2Hex({}, 110, css::uno::Any(float(10; +} +} + +CPPUNIT_PLUGIN_IMPLEMENT(); + +/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
Re: Error building on MacOS
On 4.2.2024 15.15, Stanisław Jeśmanowicz wrote: Hello Adlair, I had also problems to install LibreOffice on MacOS. But after many tries and errors, I made it. Here's how it was: - My Mac is: MacBook Pro - chip: Apple M2 Max chip - macOS: Sonoma 14.2.1 I use MacPorts base version 2.9.1 for open source software tools. - run: xcode-select -s /Applications/Xcode.app/Contents/Developer In addition to the packages I use, I also had to install: - port install gperf - install java: https://download.oracle.com/java/21/latest/jdk-21_macos-aarch64_bin.dmg (sha256) - port install apache-ant - ~/.zprofile contains: export DYLD_LIBRARY_PATH="/opt/local/lib:$DYLD_LIBRARY_PATH" export DYLD_FALLBACK_LIBRARY_PATH="/opt/local/lib:$DYLD_FALLBACK_LIBRARY_PATH" export PATH="/opt/local/bin:$PATH" export PATH="/opt/local/sbin:$PATH" export PATH="/opt/local/libexec/gnubin:$PATH" export PATH="./:$PATH" - download LibreOffice sources: git clone https://github.com/LibreOffice/core.git - since the sed program is here /opt/local/libexec/gnubin/sed, I had to correct two files: 1. ./core/editeng/CustomTarget_generated.mk : # sed -i $(if $(filter MACOSX,$(OS_FOR_BUILD)),'') -e "s/(char\*)0/(char\*)0, XML_TOKEN_INVALID/g" $(editeng_INC)/tokens.cxx sed -i -e "s/(char\*)0/(char\*)0, XML_TOKEN_INVALID/g" $(editeng_INC)/tokens.cxx # sed -i $(if $(filter MACOSX,$(OS_FOR_BUILD)),'') -e "/^#line/d" $(editeng_INC)/tokens.cxx sed -i -e "/^#line/d" $(editeng_INC)/tokens.cxx 2. ./core/workdir/UnpackedTarball/firebird/gen/make.rules sed -i -e "1,2s/:/: \$$(wildcard/" -e "\$$s/\(.*\)/\\1)/" $(patsubst %.o,%.d,$@) # @sed $(INLINE_EDIT_SED) -e "1,2s/:/: \$$(wildcard/" -e "\$$s/\(.*\)/\\1)/" $(patsubst %.o,%.d,$@) ( don't forget before sed, because these are makefiles ) - in directory core I did: ./autogen.sh \ --prefix=/opt/local \ --with-macosx-version-min-required=14.0 \ --enable-bogus-pkg-config \ --without-fonts \ --without-junit \ --disable-sdremote \ --disable-firebird-sdbc \ --disable-postgresql-sdbc \ ./configure \ --prefix=/opt/local \ --with-macosx-version-min-required=14.0 \ --enable-bogus-pkg-config \ --without-fonts \ --without-junit \ --disable-sdremote \ --disable-firebird-sdbc \ --disable-postgresql-sdbc \ ( correct your macos's version in --with-macosx-version-min-required ) - and then in core directory do: make It took 25 minutes on my box. The normal instructions are at https://wiki.documentfoundation.org/Development/BuildingOnMac Note that GitHub is just a mirror and not used for development. Ilmari
core.git: configure.ac
configure.ac |4 1 file changed, 4 deletions(-) New commits: commit e49f4e17b162c72875a73e5ec85babb1fd5a1ef7 Author: Stephan Bergmann AuthorDate: Mon Feb 5 09:42:15 2024 +0100 Commit: Stephan Bergmann CommitDate: Mon Feb 5 11:50:16 2024 +0100 Allow qmake, moc to be explicitly set in autogen.input (I need that for a wasm cross-build with Qt6, where MOC6 needs to explicitly be set to the build-time moc tool, not a non-existing anyway host moc tool.) Change-Id: I4a779ccc1b12b80a2e67bbaa5cd7ec04861a5d43 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162984 Tested-by: Jenkins Reviewed-by: Stephan Bergmann diff --git a/configure.ac b/configure.ac index 3387786c2f89..44f626618d6e 100644 --- a/configure.ac +++ b/configure.ac @@ -13080,8 +13080,6 @@ dnl === QT5_CFLAGS="" QT5_LIBS="" -QMAKE5="qmake" -MOC5="moc" QT5_GOBJECT_CFLAGS="" QT5_GOBJECT_LIBS="" QT5_HAVE_GOBJECT="" @@ -13235,8 +13233,6 @@ dnl === QT6_CFLAGS="" QT6_LIBS="" -QMAKE6="qmake" -MOC6="moc" QT6_PLATFORMS_SRCDIR="" if test \( "$test_kf6" = "yes" -a "$ENABLE_KF6" = "TRUE" \) -o \ \( "$test_qt6" = "yes" -a "$ENABLE_QT6" = "TRUE" \)
core.git: include/svx svx/source
include/svx/xtable.hxx|4 ++-- svx/source/xoutdev/xtable.cxx |4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) New commits: commit 4259b451c26eec782eb15c7603f6fbb06fc3787e Author: Miklos Vajna AuthorDate: Mon Feb 5 08:09:53 2024 +0100 Commit: Miklos Vajna CommitDate: Mon Feb 5 11:50:50 2024 +0100 svx: prefix members of XDashEntry See tdf#94879 for motivation. Change-Id: I9506823a9d9f3b11496ff6211943b72a81a77165 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162981 Reviewed-by: Miklos Vajna Tested-by: Jenkins diff --git a/include/svx/xtable.hxx b/include/svx/xtable.hxx index eb015497a9e4..273cc918210e 100644 --- a/include/svx/xtable.hxx +++ b/include/svx/xtable.hxx @@ -71,7 +71,7 @@ public: class SVXCORE_DLLPUBLIC XDashEntry final : public XPropertyEntry { private: -XDash aDash; +XDash m_aDash; public: XDashEntry(const XDash& rDash, const OUString& rName); @@ -79,7 +79,7 @@ public: const XDash& GetDash() const { -return aDash; +return m_aDash; } }; diff --git a/svx/source/xoutdev/xtable.cxx b/svx/source/xoutdev/xtable.cxx index 87850e6f25b8..26316acf9ad8 100644 --- a/svx/source/xoutdev/xtable.cxx +++ b/svx/source/xoutdev/xtable.cxx @@ -50,13 +50,13 @@ XLineEndEntry::XLineEndEntry(const XLineEndEntry& rOther) XDashEntry::XDashEntry(const XDash& rDash, const OUString& rName) : XPropertyEntry(rName), -aDash(rDash) +m_aDash(rDash) { } XDashEntry::XDashEntry(const XDashEntry& rOther) : XPropertyEntry(rOther), -aDash(rOther.aDash) +m_aDash(rOther.m_aDash) { }
core.git: Branch 'distro/vector/vector-7.5.9' - 11 commits - filter/Library_filterconfig.mk filter/source include/oox oox/source package/source sc/qa sfx2/source sw/qa
filter/Library_filterconfig.mk |1 filter/source/config/cache/typedetection.cxx| 109 filter/source/storagefilterdetect/filterdetect.cxx | 50 - include/oox/helper/zipstorage.hxx |3 oox/source/core/filterdetect.cxx| 14 +- oox/source/core/xmlfilterbase.cxx |8 + oox/source/dump/pptxdumper.cxx |2 oox/source/helper/zipstorage.cxx|4 package/source/xstor/xstorage.cxx |6 + package/source/xstor/xstorage.hxx |1 package/source/zipapi/ZipFile.cxx | 45 +++- package/source/zippackage/ZipPackage.cxx|4 sc/qa/unit/data/xlsx/tdf131575.xlsx |binary sc/qa/unit/data/xlsx/tdf76115.xlsx |binary sc/qa/unit/subsequent_filters_test2.cxx | 33 ++ sfx2/source/doc/docfile.cxx | 46 sw/qa/extras/odfimport/data/unreferenced_stream.odt |binary sw/qa/extras/odfimport/odfimport.cxx| 16 ++ 18 files changed, 282 insertions(+), 60 deletions(-) New commits: commit c63fd0899374515738b1afb330f541f35b8948de Author: Xisco Fauli AuthorDate: Thu Feb 1 10:59:09 2024 +0100 Commit: Mike Kaganski CommitDate: Fri Feb 2 17:49:57 2024 +0600 tdf#76115: sc_subsequent_filters: Add unittest Change-Id: I355eef6b0f145da8aacdd3b395ce3dcbecfb3e42 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162870 Tested-by: Jenkins Reviewed-by: Xisco Fauli diff --git a/sc/qa/unit/data/xlsx/tdf76115.xlsx b/sc/qa/unit/data/xlsx/tdf76115.xlsx new file mode 100644 index ..ebc6126dcbde Binary files /dev/null and b/sc/qa/unit/data/xlsx/tdf76115.xlsx differ diff --git a/sc/qa/unit/subsequent_filters_test2.cxx b/sc/qa/unit/subsequent_filters_test2.cxx index 29eebbececdd..892f5c64446c 100644 --- a/sc/qa/unit/subsequent_filters_test2.cxx +++ b/sc/qa/unit/subsequent_filters_test2.cxx @@ -193,6 +193,7 @@ public: void testTdf151818_SmartArtFontColor(); void testNamedTableRef(); void testTdf131575(); +void testTdf76115(); CPPUNIT_TEST_SUITE(ScFiltersTest2); @@ -315,6 +316,7 @@ public: CPPUNIT_TEST(testTdf151818_SmartArtFontColor); CPPUNIT_TEST(testNamedTableRef); CPPUNIT_TEST(testTdf131575); +CPPUNIT_TEST(testTdf76115); CPPUNIT_TEST_SUITE_END(); }; @@ -3069,6 +3071,20 @@ void ScFiltersTest2::testTdf131575() CPPUNIT_ASSERT_EQUAL(OUString("ETAT DES SORTIES"), pDoc->GetString(1, 0, 0)); } +void ScFiltersTest2::testTdf76115() +{ +// It expectedly fails to load normally +CPPUNIT_ASSERT_ASSERTION_FAIL(createScDoc("xlsx/tdf76115.xlsx")); + +// importing it must succeed with RepairPackage set to true. +uno::Sequence aParams += { comphelper::makePropertyValue("RepairPackage", true) }; +mxComponent = loadFromDesktop(createFileURL(u"xlsx/tdf76115.xlsx"), {}, aParams); +ScDocument* pDoc = getScDoc(); + +CPPUNIT_ASSERT_EQUAL(OUString("Filial"), pDoc->GetString(0, 0, 0)); +} + CPPUNIT_TEST_SUITE_REGISTRATION(ScFiltersTest2); CPPUNIT_PLUGIN_IMPLEMENT(); commit 68da1c50a89cb2f3d8087273725b756a2c575566 Author: Xisco Fauli AuthorDate: Thu Feb 1 11:22:32 2024 +0100 Commit: Mike Kaganski CommitDate: Fri Feb 2 17:40:32 2024 +0600 tdf#131575: sc_subsequent_filters: Add unittest Change-Id: I6f4bcc3da028dc9b2cd86ed06e309bed8d808ca9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162872 Tested-by: Jenkins Reviewed-by: Xisco Fauli diff --git a/sc/qa/unit/data/xlsx/tdf131575.xlsx b/sc/qa/unit/data/xlsx/tdf131575.xlsx new file mode 100644 index ..307d7dea5cf8 Binary files /dev/null and b/sc/qa/unit/data/xlsx/tdf131575.xlsx differ diff --git a/sc/qa/unit/subsequent_filters_test2.cxx b/sc/qa/unit/subsequent_filters_test2.cxx index 177fcc773ed7..29eebbececdd 100644 --- a/sc/qa/unit/subsequent_filters_test2.cxx +++ b/sc/qa/unit/subsequent_filters_test2.cxx @@ -56,6 +56,7 @@ #include #include +#include #include #include #include @@ -191,6 +192,7 @@ public: void testTdf83671_SmartArt_import2(); void testTdf151818_SmartArtFontColor(); void testNamedTableRef(); +void testTdf131575(); CPPUNIT_TEST_SUITE(ScFiltersTest2); @@ -312,6 +314,7 @@ public: CPPUNIT_TEST(testTdf83671_SmartArt_import2); CPPUNIT_TEST(testTdf151818_SmartArtFontColor); CPPUNIT_TEST(testNamedTableRef); +CPPUNIT_TEST(testTdf131575); CPPUNIT_TEST_SUITE_END(); }; @@ -3052,6 +3055,20 @@ void ScFiltersTest2::testNamedTableRef() } } +void ScFiltersTest2::testTdf131575() +{ +// It expectedly fails to load normally +CPPUNIT_ASSERT_ASSERTION_FAIL(createScDoc("xlsx/tdf131575.xlsx")); + +// importing it must succeed with RepairPackage set to true. +uno::Sequence aParams +=
core.git: drawinglayer/source include/drawinglayer svgio/qa
drawinglayer/source/primitive2d/fillgraphicprimitive2d.cxx |3 +- drawinglayer/source/primitive2d/transformprimitive2d.cxx | 18 ++--- include/drawinglayer/primitive2d/transformprimitive2d.hxx |7 - svgio/qa/cppunit/SvgImportTest.cxx | 18 - 4 files changed, 39 insertions(+), 7 deletions(-) New commits: commit 1ae7a81e542c9b072e519d0ea0d4773ed26ca251 Author: Noel Grandin AuthorDate: Sat Feb 3 14:54:12 2024 +0200 Commit: Noel Grandin CommitDate: Mon Feb 5 12:10:58 2024 +0100 tdf#108037 Reduce time and memory consumed exporting to PDF by avoiding making multiple copies of the Primitive2D container that we pass to TransformPrimitive2D. Instead, make TransformPrimitive2D store its children using a GroupPrimitive2D, which means we can share the GroupPrimitive2D among all the TransformPrimitive2D instances we create. Change-Id: I8a4398f9db6a6ab013ee24ad53836975fba6f3df Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162951 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/drawinglayer/source/primitive2d/fillgraphicprimitive2d.cxx b/drawinglayer/source/primitive2d/fillgraphicprimitive2d.cxx index 8c50993e6033..bc9158687481 100644 --- a/drawinglayer/source/primitive2d/fillgraphicprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/fillgraphicprimitive2d.cxx @@ -70,11 +70,12 @@ namespace drawinglayer::primitive2d rGraphic, basegfx::B2DHomMatrix()); +rtl::Reference xGroup = new GroupPrimitive2D(std::move(xSeq)); for(const auto &a : aMatrices) { rContainer.push_back(new TransformPrimitive2D( getTransformation() * a, -Primitive2DContainer(xSeq))); +*xGroup)); } } else diff --git a/drawinglayer/source/primitive2d/transformprimitive2d.cxx b/drawinglayer/source/primitive2d/transformprimitive2d.cxx index 0442cd68aa62..8c36fa9a73b9 100644 --- a/drawinglayer/source/primitive2d/transformprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/transformprimitive2d.cxx @@ -19,6 +19,7 @@ #include #include +#include #include @@ -30,18 +31,27 @@ namespace drawinglayer::primitive2d TransformPrimitive2D::TransformPrimitive2D( basegfx::B2DHomMatrix aTransformation, Primitive2DContainer&& aChildren) -: GroupPrimitive2D(std::move(aChildren)), -maTransformation(std::move(aTransformation)) +: maTransformation(std::move(aTransformation)), +mxChildren(new GroupPrimitive2D(std::move(aChildren))) +{ +} + +TransformPrimitive2D::TransformPrimitive2D( +basegfx::B2DHomMatrix aTransformation, +GroupPrimitive2D& rChildren) +: maTransformation(std::move(aTransformation)), +mxChildren(&rChildren) { } bool TransformPrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const { -if(GroupPrimitive2D::operator==(rPrimitive)) +if(BasePrimitive2D::operator==(rPrimitive)) { const TransformPrimitive2D& rCompare = static_cast< const TransformPrimitive2D& >(rPrimitive); -return (getTransformation() == rCompare.getTransformation()); +return maTransformation == rCompare.maTransformation +&& arePrimitive2DReferencesEqual(mxChildren, rCompare.mxChildren); } return false; diff --git a/include/drawinglayer/primitive2d/transformprimitive2d.hxx b/include/drawinglayer/primitive2d/transformprimitive2d.hxx index 73e589b8c2e8..8c3c22cc5b90 100644 --- a/include/drawinglayer/primitive2d/transformprimitive2d.hxx +++ b/include/drawinglayer/primitive2d/transformprimitive2d.hxx @@ -46,19 +46,24 @@ namespace drawinglayer::primitive2d different, transformed states without the need to create those thousand primitive contents. */ -class DRAWINGLAYER_DLLPUBLIC TransformPrimitive2D final : public GroupPrimitive2D +class DRAWINGLAYER_DLLPUBLIC TransformPrimitive2D final : public BasePrimitive2D { private: // the transformation to apply to the child geometry basegfx::B2DHomMatrix maTransformation; +rtl::ReferencemxChildren; public: /// constructor TransformPrimitive2D( basegfx::B2DHomMatrix aTransformation, Primitive2DContainer&& rChildren); +TransformPrimitive2D( +basegfx::B2DHomMatrix aTransformation, +GroupPrimitive2D& rChildren); /// data read access +const Primitive2DContainer& getChildren() const { ret
Tuukka Orava license statement
All of my past & future contributions to LibreOffice may be licensed under the MPLv2/LGPLv3+ dual license.
core.git: sw/qa writerfilter/source
sw/qa/core/header_footer/HeaderFooterTest.cxx |6 ++ writerfilter/source/dmapper/DomainMapper_Impl.cxx |9 + writerfilter/source/dmapper/PropertyMap.cxx |6 ++ writerfilter/source/dmapper/PropertyMap.hxx |3 +++ 4 files changed, 20 insertions(+), 4 deletions(-) New commits: commit d918beda2ab42668014b0dd42996b6ccc97e8c3a Author: Miklos Vajna AuthorDate: Mon Feb 5 10:38:06 2024 +0100 Commit: Miklos Vajna CommitDate: Mon Feb 5 12:36:44 2024 +0100 tdf#158814 DOCX import: fix unwanted header with type="first" & no titlePg The bugdoc had no header in Word, but had one in Writer, since commit 17e51f427b3f0cec74ac8e0a1b3f51189006ae6f (DOCX import: first page header should always set default headers as well, 2014-11-21). The code has changed a log in the meantime, today we import first page headers and left/right page headers as a single page style, but still code was missing to detect the case when was not followed by , which is an indicator that the first page header/footer should be used. Fix the problem by new flags to SectionPropertyMap to track if we ever seen a first/left/right header. This allows making an informed decision in SectionPropertyMap::setHeaderFooterProperties(): if the header is on, but we effectively don't have none of a first, left or right header, then it's time to turn it off, similar to what the DOC import does. Note that this only changes behavior for headers, but if there is a practical need, then the same could be also done for footers as well. Instead of adding a new test, notice that testTdf112694 in CppunitTest_sw_core_header_footer explicitly tests this case: a first header which is not a title page. So change that testcase to assert the behavior now matches Word and drop the FIXME. Change-Id: Ib604e786d7a5a197d4b562533326206697de882a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162992 Reviewed-by: Miklos Vajna Tested-by: Jenkins diff --git a/sw/qa/core/header_footer/HeaderFooterTest.cxx b/sw/qa/core/header_footer/HeaderFooterTest.cxx index 6bb5fd616710..4d2938ef28dc 100644 --- a/sw/qa/core/header_footer/HeaderFooterTest.cxx +++ b/sw/qa/core/header_footer/HeaderFooterTest.cxx @@ -467,10 +467,8 @@ CPPUNIT_TEST_FIXTURE(HeaderFooterTest, testTdf112694) auto verify = [this]() { uno::Any aPageStyle = getStyles("PageStyles")->getByName("Standard"); // Header was on when header for file was for explicit first pages only -// (marked via ). -//CPPUNIT_ASSERT(!getProperty(aPageStyle, "HeaderIsOn")); -// TODO - can't disable headers/footers selectively (only fo first page) -CPPUNIT_ASSERT(getProperty(aPageStyle, "HeaderIsOn")); +// but was missing. +CPPUNIT_ASSERT(!getProperty(aPageStyle, "HeaderIsOn")); }; createSwDoc("tdf112694.docx"); diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index c5f0b4ddcf16..af14dffa8cc5 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -3814,7 +3814,10 @@ void DomainMapper_Impl::PushPageHeaderFooter(PagePartType ePagePartType, PageTyp if (eType == PageType::LEFT) { if (bHeader) +{ pSectionContext->m_bLeftHeader = true; +pSectionContext->m_bHadLeftHeader = true; +} else pSectionContext->m_bLeftFooter = true; @@ -3823,7 +3826,10 @@ void DomainMapper_Impl::PushPageHeaderFooter(PagePartType ePagePartType, PageTyp else if (eType == PageType::FIRST) { if (bHeader) +{ pSectionContext->m_bFirstHeader = true; +pSectionContext->m_bHadFirstHeader = true; +} else pSectionContext->m_bFirstFooter = true; @@ -3832,7 +3838,10 @@ void DomainMapper_Impl::PushPageHeaderFooter(PagePartType ePagePartType, PageTyp else { if (bHeader) +{ pSectionContext->m_bRightHeader = true; +pSectionContext->m_bHadRightHeader = true; +} else pSectionContext->m_bRightFooter = true; diff --git a/writerfilter/source/dmapper/PropertyMap.cxx b/writerfilter/source/dmapper/PropertyMap.cxx index c2f60054b065..114de3b6198e 100644 --- a/writerfilter/source/dmapper/PropertyMap.cxx +++ b/writerfilter/source/dmapper/PropertyMap.cxx @@ -571,6 +571,12 @@ void SectionPropertyMap::setHeaderFooterProperties(DomainMapper_Impl& rDM_Impl) m_aPageStyle->setPropertyValue(getPropertyName(PROP_HEADER_IS_SHARED), uno::Any(!bEvenAndOdd)); m_aPageStyle->setPropertyValue(getPropertyName(PROP_FOOTER_IS_SHARED), uno::Any(!bEvenAndOdd)); m_aPageSty
core.git: Branch 'distro/collabora/co-24.04' - sw/qa
sw/qa/uitest/writer_tests8/tdf159102.py | 47 1 file changed, 24 insertions(+), 23 deletions(-) New commits: commit a8a95509babae8ecb460c09bec3df4757af5c4de Author: Noel Grandin AuthorDate: Thu Jan 25 13:53:26 2024 +0200 Commit: Noel Grandin CommitDate: Mon Feb 5 12:40:39 2024 +0100 disabling UITest tdf159102 because it still fails on my machine reliably Change-Id: I482b8235cd910ff16b1b15bb0427c5d6a8140751 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162567 Tested-by: Jenkins Reviewed-by: Noel Grandin Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162985 Tested-by: Jenkins CollaboraOffice diff --git a/sw/qa/uitest/writer_tests8/tdf159102.py b/sw/qa/uitest/writer_tests8/tdf159102.py index b1daffabfe63..2c3553f6f2c8 100644 --- a/sw/qa/uitest/writer_tests8/tdf159102.py +++ b/sw/qa/uitest/writer_tests8/tdf159102.py @@ -72,26 +72,27 @@ class tdf159102(UITestCase): if not supported_locale: self.skipTest("no hyphenation patterns for en_US available") -xToolkit = self.xContext.ServiceManager.createInstance('com.sun.star.awt.Toolkit') -with self.ui_test.load_file(get_url_for_data_file("tdf159102.fodt")) as writer_doc: -# we must not depend on the installed hyphenation patterns, -# so extend user dictionary temporarily with the hyphenation cur=sus and ege=stas -self.set_custom_hyphenation() -xToolkit.processEventsToIdle() -# delete the text of the first line -self.xUITest.executeCommand(".uno:GoToEndOfLine") -self.xUITest.executeCommand('.uno:StartOfDocumentSel') -self.xUITest.executeCommand('.uno:Delete') -paragraphs = writer_doc.Text.createEnumeration() -para1 = paragraphs.nextElement() -# This was "stas.", i.e. too much shrinking -self.assertEqual("sus egestas.", para1.String) - -# check next paragraph (containing different text portions) -self.xUITest.executeCommand(".uno:GoDown") -self.xUITest.executeCommand(".uno:GoToEndOfLine") -self.xUITest.executeCommand('.uno:StartOfDocumentSel') -self.xUITest.executeCommand('.uno:Delete') -paragraphs = writer_doc.Text.createEnumeration() -para1 = paragraphs.nextElement() -self.assertEqual("sus egestas.", para1.String) +# disabling this because it fails on some machines +#xToolkit = self.xContext.ServiceManager.createInstance('com.sun.star.awt.Toolkit') +#with self.ui_test.load_file(get_url_for_data_file("tdf159102.fodt")) as writer_doc: +## we must not depend on the installed hyphenation patterns, +## so extend user dictionary temporarily with the hyphenation cur=sus and ege=stas +#self.set_custom_hyphenation() +#xToolkit.processEventsToIdle() +## delete the text of the first line +#self.xUITest.executeCommand(".uno:GoToEndOfLine") +#self.xUITest.executeCommand('.uno:StartOfDocumentSel') +#self.xUITest.executeCommand('.uno:Delete') +#paragraphs = writer_doc.Text.createEnumeration() +#para1 = paragraphs.nextElement() +## This was "stas.", i.e. too much shrinking +#self.assertEqual("sus egestas.", para1.String) +# +## check next paragraph (containing different text portions) +#self.xUITest.executeCommand(".uno:GoDown") +#self.xUITest.executeCommand(".uno:GoToEndOfLine") +#self.xUITest.executeCommand('.uno:StartOfDocumentSel') +#self.xUITest.executeCommand('.uno:Delete') +#paragraphs = writer_doc.Text.createEnumeration() +#para1 = paragraphs.nextElement() +#self.assertEqual("sus egestas.", para1.String)
core.git: Branch 'libreoffice-24-2' - slideshow/source
slideshow/source/engine/slideoverlaybutton.cxx | 10 +- slideshow/source/engine/slideoverlaybutton.hxx |1 + 2 files changed, 10 insertions(+), 1 deletion(-) New commits: commit f0164f2755be1e759894601d6097ef70e0411f3d Author: Vladislav Tarakanov AuthorDate: Thu Jan 4 20:09:38 2024 +0400 Commit: Samuel Mehrbrodt CommitDate: Mon Feb 5 12:58:07 2024 +0100 tdf#158924 Handle multi-clicks for navigation bar Added handling for navigation bar buttons when many quick clicks have been made. To do this, after processing the first click, the number of clicks in the series is stored in a new variable. Until the entire series of clicks has been processed, the slide switch will not occur. Change-Id: I8f4416a0c7928bb78609be8ff52252782c37f5a0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161625 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt (cherry picked from commit ab320f4e11c70b50e5beddf12ad925f192941d9a) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162904 diff --git a/slideshow/source/engine/slideoverlaybutton.cxx b/slideshow/source/engine/slideoverlaybutton.cxx index 40ade676b383..987cd11dfb8c 100644 --- a/slideshow/source/engine/slideoverlaybutton.cxx +++ b/slideshow/source/engine/slideoverlaybutton.cxx @@ -170,7 +170,15 @@ bool SlideOverlayButton::handleMouseReleased(const css::awt::MouseEvent& e) && clickPnt.getY() > btnPnt.getY() && clickPnt.getY() < btnPnt.getY() + mxIconBitmap->getSize().Height) { -mClickHandler(clickPnt); +if (mnIgnoreClicksCnt == 0) +{ +mnIgnoreClicksCnt = e.ClickCount - 1; +mClickHandler(clickPnt); +} +else +{ +mnIgnoreClicksCnt--; +} return true; } return false; diff --git a/slideshow/source/engine/slideoverlaybutton.hxx b/slideshow/source/engine/slideoverlaybutton.hxx index db733a2b2cd4..7358743ee3e9 100644 --- a/slideshow/source/engine/slideoverlaybutton.hxx +++ b/slideshow/source/engine/slideoverlaybutton.hxx @@ -96,6 +96,7 @@ private: ViewsVecT maViews; ScreenUpdater& mrScreenUpdater; bool mbVisible = false; +sal_Int32 mnIgnoreClicksCnt = 0; }; }
core.git: xmlsecurity/source
xmlsecurity/source/dialogs/certificatechooser.cxx |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) New commits: commit cf4514d4e7400480174f28dcf502f5b59fe7b085 Author: Caolán McNamara AuthorDate: Mon Feb 5 10:32:48 2024 + Commit: Caolán McNamara CommitDate: Mon Feb 5 13:41:00 2024 +0100 Resolves: tdf#156352 disable sorting while adding rows looks like the new row gets sorted immediately when added as an empty row into the first row, so accessing it by index later to set it text/id get an unexpected result. pause sorting while inserting the entries and enable it again when finished for the easiest fix. Change-Id: Ib028b193afbf2b9026841b19419e012b70448e39 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162993 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/xmlsecurity/source/dialogs/certificatechooser.cxx b/xmlsecurity/source/dialogs/certificatechooser.cxx index a54575972c26..faea635f1be9 100644 --- a/xmlsecurity/source/dialogs/certificatechooser.cxx +++ b/xmlsecurity/source/dialogs/certificatechooser.cxx @@ -56,7 +56,6 @@ CertificateChooser::CertificateChooser(weld::Window* _pParent, { auto nControlWidth = m_xCertLB->get_approximate_digit_width() * 105; m_xCertLB->set_size_request(nControlWidth, m_xCertLB->get_height_rows(12)); -m_xCertLB->make_sorted(); m_xCertLB->connect_changed( LINK( this, CertificateChooser, CertificateHighlightHdl ) ); m_xCertLB->connect_row_activated( LINK( this, CertificateChooser, CertificateSelectHdl ) ); @@ -136,6 +135,7 @@ void CertificateChooser::ImplInitialize(bool mbSearch) return; m_xCertLB->clear(); +m_xCertLB->make_unsorted(); m_xCertLB->freeze(); SvtUserOptions aUserOpts; @@ -257,6 +257,7 @@ void CertificateChooser::ImplInitialize(bool mbSearch) m_xCertLB->thaw(); m_xCertLB->unselect_all(); +m_xCertLB->make_sorted(); if (oSelectRow) {
help.git: source/text
source/text/scalc/00/0412.xhp |6 +++--- source/text/shared/00/00040502.xhp |2 +- 2 files changed, 4 insertions(+), 4 deletions(-) New commits: commit a4f8a947b7b84ee6b957e1f20b80adae2bf1026d Author: Stanislav Horacek AuthorDate: Sun Feb 4 18:43:09 2024 +0100 Commit: Olivier Hallot CommitDate: Mon Feb 5 13:56:57 2024 +0100 fix some command paths and names Change-Id: Idb0b5c7db4f948257f50f48f28ebc0d67199fb35 Reviewed-on: https://gerrit.libreoffice.org/c/help/+/162977 Tested-by: Jenkins Reviewed-by: Olivier Hallot diff --git a/source/text/scalc/00/0412.xhp b/source/text/scalc/00/0412.xhp index 8b691c9dc0..b6e82bce21 100644 --- a/source/text/scalc/00/0412.xhp +++ b/source/text/scalc/00/0412.xhp @@ -69,8 +69,8 @@ Choose Data - Select Range. -Choose Data - Define Range. -On the Data menu of the Data tab, choose Define Range. +Choose Data - Select Range. +On the Data menu of the Data tab, choose Select Range. @@ -325,7 +325,7 @@ Choose Data - Validity - Error Alert tab. -On the Data menu of the Data tab, choose Validity - Error - Alert tab. +On the Data menu of the Data tab, choose Validity - Error Alert tab. diff --git a/source/text/shared/00/00040502.xhp b/source/text/shared/00/00040502.xhp index 803b11c7f6..04352a5302 100644 --- a/source/text/shared/00/00040502.xhp +++ b/source/text/shared/00/00040502.xhp @@ -635,7 +635,7 @@ Icon Decrease Size -Increase Size +Decrease Size
core.git: helpcontent2
helpcontent2 |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 566d05ead1659e2e28f69273fd4969556b805ab3 Author: Stanislav Horacek AuthorDate: Mon Feb 5 13:56:57 2024 +0100 Commit: Gerrit Code Review CommitDate: Mon Feb 5 13:56:57 2024 +0100 Update git submodules * Update helpcontent2 from branch 'master' to a4f8a947b7b84ee6b957e1f20b80adae2bf1026d - fix some command paths and names Change-Id: Idb0b5c7db4f948257f50f48f28ebc0d67199fb35 Reviewed-on: https://gerrit.libreoffice.org/c/help/+/162977 Tested-by: Jenkins Reviewed-by: Olivier Hallot diff --git a/helpcontent2 b/helpcontent2 index a9733f825b5a..a4f8a947b7b8 16 --- a/helpcontent2 +++ b/helpcontent2 @@ -1 +1 @@ -Subproject commit a9733f825b5a4d316227d1a275c59e1ab5327375 +Subproject commit a4f8a947b7b84ee6b957e1f20b80adae2bf1026d
core.git: configure.ac
configure.ac |8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) New commits: commit c37b0a694a32537ed4c216106b5c98a79222f3c9 Author: Stephan Bergmann AuthorDate: Mon Feb 5 11:42:32 2024 +0100 Commit: Stephan Bergmann CommitDate: Mon Feb 5 14:31:41 2024 +0100 Allow to build against a non-EMSDK Emscripten installation built from source The EMSDK variable was only used to find the Emscripten version.h file, but for a build from source there would be no value it could be set to in order to find the installation's cache/sysroot/include/emscripten/version.h at the $EMSDK/upstream/emscripten/cache/sysroot/include/emscripten/version.h location where configure.ac wants to look for it. (And using the configure.ac code that does not use version.h at all wouldn't work either, as the only EMSCRIPTEN_DEFINES found with at least a contemporary emcc would be just an unhelpful __EMSCRIPTEN__=1, but no version information.) So allow to explicitly set EMSCRIPTEN_VERSION_H in autogen.input to use that for the version check. Change-Id: Ic64ecfaefb3b5830f82e577b100a6e7becc73953 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162994 Tested-by: Jenkins Reviewed-by: Stephan Bergmann diff --git a/configure.ac b/configure.ac index 44f626618d6e..1f31be2e512b 100644 --- a/configure.ac +++ b/configure.ac @@ -1382,9 +1382,11 @@ EMSCRIPTEN_MIN_VERSION="${EMSCRIPTEN_MIN_MAJOR}.${EMSCRIPTEN_MIN_MINOR}.${EMSCRI if test "$_os" = "Emscripten"; then AC_MSG_CHECKING([if Emscripten is at least $EMSCRIPTEN_MIN_VERSION]) -AS_IF([test -z "$EMSDK"], - [AC_MSG_ERROR([No \$EMSDK environment variable.])]) - EMSCRIPTEN_VERSION_H=$EMSDK/upstream/emscripten/cache/sysroot/include/emscripten/version.h +if test -z "$EMSCRIPTEN_VERSION_H"; then +AS_IF([test -z "$EMSDK"], + [AC_MSG_ERROR([No \$EMSDK environment variable.])]) + EMSCRIPTEN_VERSION_H=$EMSDK/upstream/emscripten/cache/sysroot/include/emscripten/version.h +fi if test -f "$EMSCRIPTEN_VERSION_H"; then EMSCRIPTEN_MAJOR=$($GREP __EMSCRIPTEN_major__ "$EMSCRIPTEN_VERSION_H" | $SED -ne 's/.*__EMSCRIPTEN_major__ //p') EMSCRIPTEN_MINOR=$($GREP __EMSCRIPTEN_minor__ "$EMSCRIPTEN_VERSION_H" | $SED -ne 's/.*__EMSCRIPTEN_minor__ //p')
core.git: Branch 'libreoffice-24-2' - xmlsecurity/source
xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx | 58 ++--- 1 file changed, 51 insertions(+), 7 deletions(-) New commits: commit ad8033e3beb9eeb44ecfb008f0caa2c5312fc951 Author: Patrick Luby AuthorDate: Thu Feb 1 11:07:30 2024 -0500 Commit: Stephan Bergmann CommitDate: Mon Feb 5 14:32:21 2024 +0100 tdf#159307 add default macOS certificate manager applications Most, if not all, of the Linux certificate manager applications are not available on macOS so create a separate list for macOS. Also, fix uncloseable windows due to uncaught exceptions thrown by XSystemShellExecute::execute(). Failure to catch such exceptions would cause the document window to be uncloseable and the application to be unquittable. Change-Id: I9bc6dc9c6c9d054252b634874045cb066023214a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162887 Tested-by: Jenkins Reviewed-by: Stephan Bergmann (cherry picked from commit 29bf86f7cb367705b13049e5f0b3faa8bb93638a) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162900 Reviewed-by: Patrick Luby diff --git a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx index f2bb37241b7c..d717ec9feaad 100644 --- a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx +++ b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx @@ -74,6 +74,10 @@ #include #endif +#if defined MACOSX +#include +#endif + using namespace comphelper; using namespace css::security; using namespace css::uno; @@ -121,6 +125,10 @@ namespace u"GNU\GnuPG\bin\kleopatra.exe", u"GNU\GnuPG\bin\launch-gpa.exe", u"GNU\GnuPG\bin\gpa.exe"}; +#elif defined MACOSX +constexpr std::u16string_view aGUIServers[] += { u"/Applications/GPG Keychain.app", +u"/System/Applications/Utilities/Keychain Access.app"}; #else constexpr std::u16string_view aGUIServers[] = { u"kleopatra", u"seahorse", u"gpa", u"kgpg"}; @@ -175,12 +183,34 @@ void GetCertificateManager(OUString& sExecutable) for (const auto& rServer: aGUIServers) { -osl::FileBase::RC searchError = osl::File::searchFileURL( -OUString(rServer), aPath, -aFoundGUIServer); -if (searchError == osl::FileBase::E_None) +bool bSetCertMgrPath = false; + +#ifdef MACOSX +// On macOS, the list of default certificate manager applications +// includes absolute paths so check if the path exists and is a +// directory +if (rServer.starts_with('/')) +{ +OString aSysPath = OUString(rServer).toUtf8(); +if (struct stat st; stat(aSysPath.getStr(), &st) == 0 && S_ISDIR(st.st_mode)) +{ +bSetCertMgrPath = true; +sExecutable = rServer; +} +} +#endif + +if (!bSetCertMgrPath) +{ +osl::FileBase::RC searchError = osl::File::searchFileURL( +OUString(rServer), aPath, +aFoundGUIServer); +if (searchError == osl::FileBase::E_None && osl::File::getSystemPathFromFileURL(aFoundGUIServer, sExecutable) == osl::FileBase::E_None) +bSetCertMgrPath = true; +} + +if (bSetCertMgrPath) { -osl::File::getSystemPathFromFileURL(aFoundGUIServer, sExecutable); std::shared_ptr pBatch( comphelper::ConfigurationChanges::create()); officecfg::Office::Common::Security::Scripting::CertMgrPath::set(sExecutable, @@ -558,8 +588,22 @@ IMPL_LINK_NOARG(DigitalSignaturesDialog, CertMgrButtonHdl, weld::Button&, void) uno::Reference xSystemShell( css::system::SystemShellExecute::create(xContext)); -xSystemShell->execute(sExecutable, OUString(), - css::system::SystemShellExecuteFlags::DEFAULTS); +try +{ +xSystemShell->execute(sExecutable, OUString(), + css::system::SystemShellExecuteFlags::DEFAULTS); +} +catch (...) +{ +// Related tdf#159307 fix uncloseable windows due to uncaught exception +// XSystemShellExecute::execute() throws an exception for a variety +// of common error conditions such as files or directories that +// are non-existent or non-executable. Failure to catch such +// exceptions would cause the document window to be uncloseable +// and the application to be unquittable. +TOOLS_WARN_EXCEPTION( "xmlsecurity.dialogs", "executable failed!" ); +sExecutable = OUString(); +} } OUString sDialogText = (sExecutable.isEmpty() ?
core.git: sd/source
sd/source/ui/view/DocumentRenderer.cxx |9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) New commits: commit 5f9ce732300d3301b574b569fe331e8a93057e73 Author: Samuel Mehrbrodt AuthorDate: Mon Feb 5 12:23:26 2024 +0100 Commit: Samuel Mehrbrodt CommitDate: Mon Feb 5 14:33:20 2024 +0100 Fix typo in comment Also relayout the text Change-Id: Id774c5a5089e1c031ae705e6b23281e882b6739f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162995 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt diff --git a/sd/source/ui/view/DocumentRenderer.cxx b/sd/source/ui/view/DocumentRenderer.cxx index c7587a1d2d40..a8d5a6f1de25 100644 --- a/sd/source/ui/view/DocumentRenderer.cxx +++ b/sd/source/ui/view/DocumentRenderer.cxx @@ -2123,13 +2123,10 @@ private: else nPaperBin = rInfo.mpPrinter->GetPaperBin(); -// For pages larger then the printable area there -// are three options: +// For pages larger than the printable area there are three options: // 1. Scale down to the page to the printable area. -// 2. Print only the upper left part of the page -//(without the unprintable borders). -// 3. Split the page into parts of the size of the -// printable area. +// 2. Print only the upper left part of the page (without the unprintable borders). +// 3. Split the page into parts of the size of the printable area. const bool bScalePage (mpOptions->IsPageSize()); const bool bCutPage (mpOptions->IsCutPage()); MapMode aMap (rInfo.maMap);
core.git: Branch 'libreoffice-24-2' - sw/qa writerfilter/source
sw/qa/core/header_footer/HeaderFooterTest.cxx |6 ++ writerfilter/source/dmapper/DomainMapper_Impl.cxx |9 + writerfilter/source/dmapper/PropertyMap.cxx |6 ++ writerfilter/source/dmapper/PropertyMap.hxx |3 +++ 4 files changed, 20 insertions(+), 4 deletions(-) New commits: commit af302ee34f74b4d71b1721d23f62225b7e66ff2e Author: Miklos Vajna AuthorDate: Mon Feb 5 10:38:06 2024 +0100 Commit: Xisco Fauli CommitDate: Mon Feb 5 14:44:36 2024 +0100 tdf#158814 DOCX import: fix unwanted header with type="first" & no titlePg The bugdoc had no header in Word, but had one in Writer, since commit 17e51f427b3f0cec74ac8e0a1b3f51189006ae6f (DOCX import: first page header should always set default headers as well, 2014-11-21). The code has changed a log in the meantime, today we import first page headers and left/right page headers as a single page style, but still code was missing to detect the case when was not followed by , which is an indicator that the first page header/footer should be used. Fix the problem by new flags to SectionPropertyMap to track if we ever seen a first/left/right header. This allows making an informed decision in SectionPropertyMap::setHeaderFooterProperties(): if the header is on, but we effectively don't have none of a first, left or right header, then it's time to turn it off, similar to what the DOC import does. Note that this only changes behavior for headers, but if there is a practical need, then the same could be also done for footers as well. Instead of adding a new test, notice that testTdf112694 in CppunitTest_sw_core_header_footer explicitly tests this case: a first header which is not a title page. So change that testcase to assert the behavior now matches Word and drop the FIXME. Change-Id: Ib604e786d7a5a197d4b562533326206697de882a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162992 Reviewed-by: Miklos Vajna Tested-by: Jenkins (cherry picked from commit d918beda2ab42668014b0dd42996b6ccc97e8c3a) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162907 Reviewed-by: Xisco Fauli diff --git a/sw/qa/core/header_footer/HeaderFooterTest.cxx b/sw/qa/core/header_footer/HeaderFooterTest.cxx index 6bb5fd616710..4d2938ef28dc 100644 --- a/sw/qa/core/header_footer/HeaderFooterTest.cxx +++ b/sw/qa/core/header_footer/HeaderFooterTest.cxx @@ -467,10 +467,8 @@ CPPUNIT_TEST_FIXTURE(HeaderFooterTest, testTdf112694) auto verify = [this]() { uno::Any aPageStyle = getStyles("PageStyles")->getByName("Standard"); // Header was on when header for file was for explicit first pages only -// (marked via ). -//CPPUNIT_ASSERT(!getProperty(aPageStyle, "HeaderIsOn")); -// TODO - can't disable headers/footers selectively (only fo first page) -CPPUNIT_ASSERT(getProperty(aPageStyle, "HeaderIsOn")); +// but was missing. +CPPUNIT_ASSERT(!getProperty(aPageStyle, "HeaderIsOn")); }; createSwDoc("tdf112694.docx"); diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index cea1585e42fe..5342e7a21b83 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -3826,7 +3826,10 @@ void DomainMapper_Impl::PushPageHeaderFooter(PagePartType ePagePartType, PageTyp if (eType == PageType::LEFT) { if (bHeader) +{ pSectionContext->m_bLeftHeader = true; +pSectionContext->m_bHadLeftHeader = true; +} else pSectionContext->m_bLeftFooter = true; @@ -3835,7 +3838,10 @@ void DomainMapper_Impl::PushPageHeaderFooter(PagePartType ePagePartType, PageTyp else if (eType == PageType::FIRST) { if (bHeader) +{ pSectionContext->m_bFirstHeader = true; +pSectionContext->m_bHadFirstHeader = true; +} else pSectionContext->m_bFirstFooter = true; @@ -3844,7 +3850,10 @@ void DomainMapper_Impl::PushPageHeaderFooter(PagePartType ePagePartType, PageTyp else { if (bHeader) +{ pSectionContext->m_bRightHeader = true; +pSectionContext->m_bHadRightHeader = true; +} else pSectionContext->m_bRightFooter = true; diff --git a/writerfilter/source/dmapper/PropertyMap.cxx b/writerfilter/source/dmapper/PropertyMap.cxx index 9f9269b73471..ec055c532c4d 100644 --- a/writerfilter/source/dmapper/PropertyMap.cxx +++ b/writerfilter/source/dmapper/PropertyMap.cxx @@ -566,6 +566,12 @@ void SectionPropertyMap::setHeaderFooterProperties(DomainMapper_Impl& rDM_Impl) m_aPageStyle->setPropertyValue(getPropertyName(P
core.git: officecfg/registry
officecfg/registry/schema/org/openoffice/Office/Common.xcs |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit c58f42c1bd2ec1b24f02a27c952e88d43ee07beb Author: Samuel Mehrbrodt AuthorDate: Mon Feb 5 12:24:58 2024 +0100 Commit: Samuel Mehrbrodt CommitDate: Mon Feb 5 14:47:11 2024 +0100 Tabs to spaces Change-Id: I794548f4a5c18c3cbf100940adf3ec5095293ce6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162996 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt diff --git a/officecfg/registry/schema/org/openoffice/Office/Common.xcs b/officecfg/registry/schema/org/openoffice/Office/Common.xcs index f1f947324c12..3b66f6a8394b 100644 --- a/officecfg/registry/schema/org/openoffice/Office/Common.xcs +++ b/officecfg/registry/schema/org/openoffice/Office/Common.xcs @@ -5167,8 +5167,8 @@ DIN Light,1509,-503,1509,-483,1997,483 - B Nazanin,1343,-705,1990,-1045,1990,1045 - B Nazanin,1341,-707,2126,-1120,2126,1120 + B Nazanin,1343,-705,1990,-1045,1990,1045 + B Nazanin,1341,-707,2126,-1120,2126,1120
core.git: configmgr/source
configmgr/source/valueparser.cxx | 25 - 1 file changed, 16 insertions(+), 9 deletions(-) New commits: commit 7ee4ea5c098d4e97bd5b3aa5998f6885da0d74fe Author: Noel Grandin AuthorDate: Mon Feb 5 14:32:01 2024 +0200 Commit: Noel Grandin CommitDate: Mon Feb 5 15:10:52 2024 +0100 reduce unnecessary OString temporaries spotted while profiling tdf#108037 Change-Id: I66afa79d7da94c1d3c7d1695ce9c5cf902e1429e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163002 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/configmgr/source/valueparser.cxx b/configmgr/source/valueparser.cxx index 249c1c1dbdcb..6b9faf6edbe0 100644 --- a/configmgr/source/valueparser.cxx +++ b/configmgr/source/valueparser.cxx @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include @@ -99,16 +100,22 @@ bool parseValue(xmlreader::Span const & text, sal_Int16 * value) { bool parseValue(xmlreader::Span const & text, sal_Int32 * value) { assert(text.is() && value != nullptr); // For backwards compatibility, support hexadecimal values: -*value = -rtl_str_shortenedCompareIgnoreAsciiCase_WithLength( +bool bStartWithHexPrefix = rtl_str_shortenedCompareIgnoreAsciiCase_WithLength( text.begin, text.length, RTL_CONSTASCII_STRINGPARAM("0X"), -RTL_CONSTASCII_LENGTH("0X")) == 0 ? -static_cast< sal_Int32 >( -OString( -text.begin + RTL_CONSTASCII_LENGTH("0X"), -text.length - RTL_CONSTASCII_LENGTH("0X")).toUInt32(16)) : -OString(text.begin, text.length).toInt32(); -//TODO: check valid lexical representation +RTL_CONSTASCII_LENGTH("0X")) == 0; + +if (bStartWithHexPrefix) +{ +std::string_view sView(text.begin + RTL_CONSTASCII_LENGTH("0X"), +text.length - RTL_CONSTASCII_LENGTH("0X")); +*value = static_cast< sal_Int32 >(o3tl::toUInt32(sView, 16)); +} +else +{ +std::string_view sView(text.begin, text.length); +*value = o3tl::toInt32(sView); +} +//TODO: check valid lexical representation return true; }
core.git: sw/qa
sw/qa/extras/tiledrendering/data/large-chart-labels.odt |binary sw/qa/extras/tiledrendering/tiledrendering.cxx | 76 ++-- 2 files changed, 68 insertions(+), 8 deletions(-) New commits: commit 2bacabc61f0b9b21523d7e77371cf29228a9a394 Author: Caolán McNamara AuthorDate: Wed Jan 31 21:21:04 2024 + Commit: Caolán McNamara CommitDate: Mon Feb 5 15:29:24 2024 +0100 add a test to detect incorrect text color in dark mode chart rendering Change-Id: I89e238dab58ffe36021520ad0fdce38e31a616e0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162868 Tested-by: Jenkins CollaboraOffice Reviewed-by: Miklos Vajna (cherry picked from commit a9044a4b1de467519bec798500f3bf3d0d154f85) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162979 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/sw/qa/extras/tiledrendering/data/large-chart-labels.odt b/sw/qa/extras/tiledrendering/data/large-chart-labels.odt new file mode 100644 index ..35b26e866a33 Binary files /dev/null and b/sw/qa/extras/tiledrendering/data/large-chart-labels.odt differ diff --git a/sw/qa/extras/tiledrendering/tiledrendering.cxx b/sw/qa/extras/tiledrendering/tiledrendering.cxx index 8f52f59211cc..8dccfeb9271a 100644 --- a/sw/qa/extras/tiledrendering/tiledrendering.cxx +++ b/sw/qa/extras/tiledrendering/tiledrendering.cxx @@ -32,6 +32,7 @@ #include #include #include +#include #include #include #include @@ -1746,8 +1747,8 @@ CPPUNIT_TEST_FIXTURE(SwTiledRenderingTest, testGetViewRenderState) CPPUNIT_ASSERT_EQUAL("PS;Default"_ostr, pXTextDocument->getViewRenderState()); } -// Helper function to get a tile to a bitmap and check the pixel color -static void assertTilePixelColor(SwXTextDocument* pXTextDocument, int nPixelX, int nPixelY, Color aColor) +// Helper function to get a tile to a bitmap +static Bitmap getTile(SwXTextDocument* pXTextDocument) { size_t nCanvasSize = 1024; size_t nTileSize = 256; @@ -1758,22 +1759,26 @@ static void assertTilePixelColor(SwXTextDocument* pXTextDocument, int nPixelX, i Fraction(1.0), Point(), aPixmap.data()); pXTextDocument->paintTile(*pDevice, nCanvasSize, nCanvasSize, 0, 0, 15360, 7680); pDevice->EnableMapMode(false); -Bitmap aBitmap = pDevice->GetBitmap(Point(0, 0), Size(nTileSize, nTileSize)); +return pDevice->GetBitmap(Point(0, 0), Size(nTileSize, nTileSize)); +} + +// Helper function to get a tile to a bitmap and check the pixel color +static void assertTilePixelColor(SwXTextDocument* pXTextDocument, int nPixelX, int nPixelY, Color aColor) +{ +Bitmap aBitmap = getTile(pXTextDocument); BitmapScopedReadAccess pAccess(aBitmap); Color aActualColor(pAccess->GetPixel(nPixelX, nPixelY)); CPPUNIT_ASSERT_EQUAL(aColor, aActualColor); } -// Test that changing the theme in one view doesn't change it in the other view -CPPUNIT_TEST_FIXTURE(SwTiledRenderingTest, testThemeViewSeparation) +static void addDarkLightThemes(const Color& rDarkColor, const Color& rLightColor) { -Color aDarkColor(0x1c, 0x1c, 0x1c); // Add a minimal dark scheme { svtools::EditableColorConfig aColorConfig; svtools::ColorConfigValue aValue; aValue.bIsVisible = true; -aValue.nColor = aDarkColor; +aValue.nColor = rDarkColor; aColorConfig.SetColorValue(svtools::DOCCOLOR, aValue); aColorConfig.AddScheme(u"Dark"_ustr); } @@ -1782,10 +1787,17 @@ CPPUNIT_TEST_FIXTURE(SwTiledRenderingTest, testThemeViewSeparation) svtools::EditableColorConfig aColorConfig; svtools::ColorConfigValue aValue; aValue.bIsVisible = true; -aValue.nColor = COL_WHITE; +aValue.nColor = rLightColor; aColorConfig.SetColorValue(svtools::DOCCOLOR, aValue); aColorConfig.AddScheme(u"Light"_ustr); } +} + +// Test that changing the theme in one view doesn't change it in the other view +CPPUNIT_TEST_FIXTURE(SwTiledRenderingTest, testThemeViewSeparation) +{ +Color aDarkColor(0x1c, 0x1c, 0x1c); +addDarkLightThemes(aDarkColor, COL_WHITE); SwXTextDocument* pXTextDocument = createDoc(); int nFirstViewId = SfxLokHelper::getView(); ViewCallback aView1; @@ -4105,6 +4117,54 @@ CPPUNIT_TEST_FIXTURE(SwTiledRenderingTest, testToggleFormattingMarks) CPPUNIT_ASSERT_EQUAL(OString("P" + sOrigView2RenderState), aView2.m_aViewRenderState); } +// toggling chart into dark mode should switch not leave text as black +CPPUNIT_TEST_FIXTURE(SwTiledRenderingTest, testSwitchingChartToDarkMode) +{ +addDarkLightThemes(COL_BLACK, COL_WHITE); +SwXTextDocument* pXTextDocument = createDoc("large-chart-labels.odt"); +CPPUNIT_ASSERT(pXTextDocument); + +SwDoc* pDoc = pXTextDocument->GetDocShell()->GetDoc(); +SwView* pView = pDoc->GetDocShell()->GetView(); +uno::Reference xFrame = pView->GetViewFrame().GetFrame().GetFrameInterface(); +uno
core.git: Branch 'distro/collabora/co-24.04' - sw/qa writerfilter/source
sw/qa/core/header_footer/HeaderFooterTest.cxx |6 ++ writerfilter/source/dmapper/DomainMapper_Impl.cxx |9 + writerfilter/source/dmapper/PropertyMap.cxx |6 ++ writerfilter/source/dmapper/PropertyMap.hxx |3 +++ 4 files changed, 20 insertions(+), 4 deletions(-) New commits: commit ecd1e8a4a8485435a0d898c0863fe2ae4fc58b26 Author: Miklos Vajna AuthorDate: Mon Feb 5 10:38:06 2024 +0100 Commit: Miklos Vajna CommitDate: Mon Feb 5 15:38:01 2024 +0100 tdf#158814 DOCX import: fix unwanted header with type="first" & no titlePg The bugdoc had no header in Word, but had one in Writer, since commit 17e51f427b3f0cec74ac8e0a1b3f51189006ae6f (DOCX import: first page header should always set default headers as well, 2014-11-21). The code has changed a log in the meantime, today we import first page headers and left/right page headers as a single page style, but still code was missing to detect the case when was not followed by , which is an indicator that the first page header/footer should be used. Fix the problem by new flags to SectionPropertyMap to track if we ever seen a first/left/right header. This allows making an informed decision in SectionPropertyMap::setHeaderFooterProperties(): if the header is on, but we effectively don't have none of a first, left or right header, then it's time to turn it off, similar to what the DOC import does. Note that this only changes behavior for headers, but if there is a practical need, then the same could be also done for footers as well. Instead of adding a new test, notice that testTdf112694 in CppunitTest_sw_core_header_footer explicitly tests this case: a first header which is not a title page. So change that testcase to assert the behavior now matches Word and drop the FIXME. Change-Id: Ib604e786d7a5a197d4b562533326206697de882a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162992 Reviewed-by: Miklos Vajna Tested-by: Jenkins (cherry picked from commit d918beda2ab42668014b0dd42996b6ccc97e8c3a) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162907 Reviewed-by: Xisco Fauli (cherry picked from commit af302ee34f74b4d71b1721d23f62225b7e66ff2e) diff --git a/sw/qa/core/header_footer/HeaderFooterTest.cxx b/sw/qa/core/header_footer/HeaderFooterTest.cxx index 6bb5fd616710..4d2938ef28dc 100644 --- a/sw/qa/core/header_footer/HeaderFooterTest.cxx +++ b/sw/qa/core/header_footer/HeaderFooterTest.cxx @@ -467,10 +467,8 @@ CPPUNIT_TEST_FIXTURE(HeaderFooterTest, testTdf112694) auto verify = [this]() { uno::Any aPageStyle = getStyles("PageStyles")->getByName("Standard"); // Header was on when header for file was for explicit first pages only -// (marked via ). -//CPPUNIT_ASSERT(!getProperty(aPageStyle, "HeaderIsOn")); -// TODO - can't disable headers/footers selectively (only fo first page) -CPPUNIT_ASSERT(getProperty(aPageStyle, "HeaderIsOn")); +// but was missing. +CPPUNIT_ASSERT(!getProperty(aPageStyle, "HeaderIsOn")); }; createSwDoc("tdf112694.docx"); diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index cea1585e42fe..5342e7a21b83 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -3826,7 +3826,10 @@ void DomainMapper_Impl::PushPageHeaderFooter(PagePartType ePagePartType, PageTyp if (eType == PageType::LEFT) { if (bHeader) +{ pSectionContext->m_bLeftHeader = true; +pSectionContext->m_bHadLeftHeader = true; +} else pSectionContext->m_bLeftFooter = true; @@ -3835,7 +3838,10 @@ void DomainMapper_Impl::PushPageHeaderFooter(PagePartType ePagePartType, PageTyp else if (eType == PageType::FIRST) { if (bHeader) +{ pSectionContext->m_bFirstHeader = true; +pSectionContext->m_bHadFirstHeader = true; +} else pSectionContext->m_bFirstFooter = true; @@ -3844,7 +3850,10 @@ void DomainMapper_Impl::PushPageHeaderFooter(PagePartType ePagePartType, PageTyp else { if (bHeader) +{ pSectionContext->m_bRightHeader = true; +pSectionContext->m_bHadRightHeader = true; +} else pSectionContext->m_bRightFooter = true; diff --git a/writerfilter/source/dmapper/PropertyMap.cxx b/writerfilter/source/dmapper/PropertyMap.cxx index 9f9269b73471..ec055c532c4d 100644 --- a/writerfilter/source/dmapper/PropertyMap.cxx +++ b/writerfilter/source/dmapper/PropertyMap.cxx @@ -566,6 +566,12 @@ void SectionPropertyMap::setHeaderFooterProperties(DomainMa
core.git: vcl/inc vcl/source
vcl/inc/pdf/pdfwriter_impl.hxx|4 ++ vcl/source/gdi/pdfwriter_impl.cxx | 62 +++--- 2 files changed, 36 insertions(+), 30 deletions(-) New commits: commit ffb6133176d5bc1824b15893b2cf1a80aea6aa02 Author: Noel Grandin AuthorDate: Thu Feb 1 15:47:33 2024 +0200 Commit: Noel Grandin CommitDate: Mon Feb 5 15:41:27 2024 +0100 tdf#108037 speed up exporting large pdf (2) reduce the number of allocations we need to do for OStringBuffer Shaves 2% off the convert time. Change-Id: I0852c870b3c9e1941213f80f359d00cb8ee391df Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162879 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/vcl/inc/pdf/pdfwriter_impl.hxx b/vcl/inc/pdf/pdfwriter_impl.hxx index 090f3e090c35..483201f624fd 100644 --- a/vcl/inc/pdf/pdfwriter_impl.hxx +++ b/vcl/inc/pdf/pdfwriter_impl.hxx @@ -824,6 +824,10 @@ private: ::comphelper::Hash m_DocDigest; +// reduce repeated allocations +OStringBuffer updateGraphicsStateLine{256}; +OStringBuffer drawBitmapLine{80}; + sal_uInt64 getCurrentFilePosition() { sal_uInt64 nPosition{}; diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index 3a86641ae9fb..11a62a156bb0 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -9795,35 +9795,36 @@ void PDFWriterImpl::drawJPGBitmap( SvStream& rDCTData, bool bIsTrueColor, const void PDFWriterImpl::drawBitmap( const Point& rDestPoint, const Size& rDestSize, const BitmapEmit& rBitmap, const Color& rFillColor ) { -OStringBuffer aLine( 80 ); +OStringBuffer& rLine = drawBitmapLine; +rLine.setLength(0); updateGraphicsState(); -aLine.append( "q " ); +rLine.append( "q " ); if( rFillColor != COL_TRANSPARENT ) { -appendNonStrokingColor( rFillColor, aLine ); -aLine.append( ' ' ); +appendNonStrokingColor( rFillColor, rLine ); +rLine.append( ' ' ); } sal_Int32 nCheckWidth = 0; -m_aPages.back().appendMappedLength( static_cast(rDestSize.Width()), aLine, false, &nCheckWidth ); -aLine.append( " 0 0 " ); +m_aPages.back().appendMappedLength( static_cast(rDestSize.Width()), rLine, false, &nCheckWidth ); +rLine.append( " 0 0 " ); sal_Int32 nCheckHeight = 0; -m_aPages.back().appendMappedLength( static_cast(rDestSize.Height()), aLine, true, &nCheckHeight ); -aLine.append( ' ' ); -m_aPages.back().appendPoint( rDestPoint + Point( 0, rDestSize.Height()-1 ), aLine ); -aLine.append( " cm /Im" ); +m_aPages.back().appendMappedLength( static_cast(rDestSize.Height()), rLine, true, &nCheckHeight ); +rLine.append( ' ' ); +m_aPages.back().appendPoint( rDestPoint + Point( 0, rDestSize.Height()-1 ), rLine ); +rLine.append( " cm /Im" ); sal_Int32 nObject = rBitmap.m_aReferenceXObject.getObject(); -aLine.append(nObject); -aLine.append( " Do Q " ); +rLine.append(nObject); +rLine.append( " Do Q " ); if( nCheckWidth == 0 || nCheckHeight == 0 ) { // #i97512# avoid invalid current matrix -aLine.setLength( 0 ); -aLine.append( " %bitmap image /Im" ); -aLine.append( rBitmap.m_nObject ); -aLine.append( " scaled to zero size, omitted " ); +rLine.setLength( 0 ); +rLine.append( " %bitmap image /Im" ); +rLine.append( rBitmap.m_nObject ); +rLine.append( " scaled to zero size, omitted " ); } -writeBuffer( aLine ); +writeBuffer( rLine ); } const BitmapEmit& PDFWriterImpl::createBitmapEmit(const BitmapEx& i_rBitmap, const Graphic& rGraphic, std::list& rBitmaps, ResourceDict& rResourceDict, std::list& rOutputStreams) @@ -10145,9 +10146,10 @@ void PDFWriterImpl::drawWallpaper( const tools::Rectangle& rRect, const Wallpape } } -void PDFWriterImpl::updateGraphicsState(Mode const mode) + void PDFWriterImpl::updateGraphicsState(Mode const mode) { -OStringBuffer aLine( 256 ); +OStringBuffer& rLine = updateGraphicsStateLine; +rLine.setLength(0); GraphicsState& rNewState = m_aGraphicsStack.front(); // first set clip region since it might invalidate everything else @@ -10160,7 +10162,7 @@ void PDFWriterImpl::updateGraphicsState(Mode const mode) { if( m_aCurrentPDFState.m_bClipRegion ) { -aLine.append( "Q " ); +rLine.append( "Q " ); // invalidate everything but the clip region m_aCurrentPDFState = GraphicsState(); rNewState.m_nUpdateFlags = ~GraphicsStateUpdateFlags::ClipRegion; @@ -10173,19 +10175,19 @@ void PDFWriterImpl::updateGraphicsState(Mode const mode) SetMapMode( rNewState.m_aMapMode ); m_aCurrentPDFState.m_aMapMode = rNewState.m_aMapMode; -
core.git: sw/qa sw/source
sw/qa/extras/odfimport/data/tdf123968.odt |binary sw/qa/extras/odfimport/odfimport.cxx | 12 sw/source/core/fields/expfld.cxx | 20 +++- sw/source/core/inc/unofield.hxx |2 +- sw/source/core/unocore/unofield.cxx | 30 +++--- 5 files changed, 51 insertions(+), 13 deletions(-) New commits: commit 99055ae98ef1fe67b8db4a8c3167a8acaeaac02f Author: Michael Stahl AuthorDate: Fri Feb 2 20:10:24 2024 +0100 Commit: Michael Stahl CommitDate: Mon Feb 5 16:28:26 2024 +0100 tdf#123968 sw: fix assert on importing ooo62823-1.sxw svl/source/items/itemset.cxx:662: const SfxPoolItem* implCreateItemEntry(SfxItemPool&, const SfxPoolItem*, bool): Assertion `pSource->Which() == nWhich && "ITEM: Clone of Item did NOT copy/set WhichID (!)"' failed. XMLVariableInputFieldImportContext::PrepareField() first sets "Input" and then "SubType" property. Apparently i missed that *both* of these are mutable in the API, and both together determine whether the field is a RES_TXTATR_INPUTFIELD or RES_TXTATR_FIELD. So call SwXTextField::TransmuteLeadToInputField() also when the "SubType" is set, and adapt it to toggling 2 different things. Hmm... actually this will change these fields to be inline editable after ODF import, which was the intention all along. It turns out that there is even a unit test testTdf123968 for this; it works in the usual case, but in this case the input field is in a header, so in styles.xml, and the styles.xml is imported before content.xml and does not contain the variable-decls element, so the variable field type has the GSE_EXPR subtype (default?), and setting the "Input" property doesn't transmute it. (regression from commit 742baabbe4d077e1ba913a7989300908f4637ac7) Change-Id: Ib5757cda32287e51651f05f5b19e82d7be0431e3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162941 Tested-by: Jenkins Reviewed-by: Michael Stahl diff --git a/sw/qa/extras/odfimport/data/tdf123968.odt b/sw/qa/extras/odfimport/data/tdf123968.odt index 1c081619ea30..cd1ec8a3859a 100644 Binary files a/sw/qa/extras/odfimport/data/tdf123968.odt and b/sw/qa/extras/odfimport/data/tdf123968.odt differ diff --git a/sw/qa/extras/odfimport/odfimport.cxx b/sw/qa/extras/odfimport/odfimport.cxx index aa158b43b132..115e30b61368 100644 --- a/sw/qa/extras/odfimport/odfimport.cxx +++ b/sw/qa/extras/odfimport/odfimport.cxx @@ -1169,9 +1169,21 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf123968) SwTextNode& rStart = dynamic_cast(pShellCursor->Start()->GetNode()); // The field is now editable like any text, thus the field content "New value" shows up for the cursor. +// This field's variable is declared as string and used as string - typical. CPPUNIT_ASSERT_EQUAL(OUString("inputfield: " + OUStringChar(CH_TXT_ATR_INPUTFIELDSTART) + "New value" + OUStringChar(CH_TXT_ATR_INPUTFIELDEND)), rStart.GetText()); + +// This field's variable is declared as float and used as string - not +// typical; this can easily happen if the input field is in a header/footer, +// because only content.xml contains the variable-decls, styles.xml is +// imported before content.xml, and apparently the default variable type is +// numeric. +SwTextNode& rEnd = dynamic_cast(pShellCursor->End()->GetNode()); +CPPUNIT_ASSERT_EQUAL(OUString("inputfield: " + OUStringChar(CH_TXT_ATR_INPUTFIELDSTART) + + "String input for num variable" + OUStringChar(CH_TXT_ATR_INPUTFIELDEND)), + rEnd.GetText()); + } CPPUNIT_TEST_FIXTURE(Test, testTdf133459) diff --git a/sw/source/core/fields/expfld.cxx b/sw/source/core/fields/expfld.cxx index 434f67672903..6ed4cdb7c125 100644 --- a/sw/source/core/fields/expfld.cxx +++ b/sw/source/core/fields/expfld.cxx @@ -881,10 +881,9 @@ std::unique_ptr SwSetExpField::Copy() const void SwSetExpField::SetSubType(sal_uInt16 nSub) { +assert((nSub & 0xff) != (nsSwGetSetExpType::GSE_STRING|nsSwGetSetExpType::GSE_EXPR) && "SubType is illegal!"); static_cast(GetTyp())->SetType(nSub & 0xff); mnSubType = nSub & 0xff00; - -OSL_ENSURE( (nSub & 0xff) != 3, "SubType is illegal!" ); } sal_uInt16 SwSetExpField::GetSubType() const @@ -1100,8 +1099,19 @@ bool SwSetExpField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId ) break; case FIELD_PROP_SUBTYPE: nTmp32 = lcl_APIToSubType(rAny); -if(nTmp32 >= 0) -SetSubType(o3tl::narrowing((GetSubType() & 0xff00) | nTmp32)); +if (0 <= nTmp32 && nTmp32 != (GetSubType() & 0xff)) +{ +auto const subType(o3tl::narrowing((GetSubType() & 0xff00) | nTmp32)); +if (((nTmp32 & nsSwGetSetExpType::GSE_STRING) != (GetSubType() & nsSwGetSetExpT
core.git: Branch 'libreoffice-24-2' - xmlsecurity/source
xmlsecurity/source/dialogs/certificatechooser.cxx |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) New commits: commit 326246599fa9488caf1ffb33daa75042ab782cb8 Author: Caolán McNamara AuthorDate: Mon Feb 5 10:32:48 2024 + Commit: Caolán McNamara CommitDate: Mon Feb 5 16:43:07 2024 +0100 Resolves: tdf#156352 disable sorting while adding rows looks like the new row gets sorted immediately when added as an empty row into the first row, so accessing it by index later to set it text/id get an unexpected result. pause sorting while inserting the entries and enable it again when finished for the easiest fix. Change-Id: Ib028b193afbf2b9026841b19419e012b70448e39 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162906 Reviewed-by: Patrick Luby Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/xmlsecurity/source/dialogs/certificatechooser.cxx b/xmlsecurity/source/dialogs/certificatechooser.cxx index 9dba3e9e9066..730549093390 100644 --- a/xmlsecurity/source/dialogs/certificatechooser.cxx +++ b/xmlsecurity/source/dialogs/certificatechooser.cxx @@ -56,7 +56,6 @@ CertificateChooser::CertificateChooser(weld::Window* _pParent, { auto nControlWidth = m_xCertLB->get_approximate_digit_width() * 105; m_xCertLB->set_size_request(nControlWidth, m_xCertLB->get_height_rows(12)); -m_xCertLB->make_sorted(); m_xCertLB->connect_changed( LINK( this, CertificateChooser, CertificateHighlightHdl ) ); m_xCertLB->connect_row_activated( LINK( this, CertificateChooser, CertificateSelectHdl ) ); @@ -136,6 +135,7 @@ void CertificateChooser::ImplInitialize(bool mbSearch) return; m_xCertLB->clear(); +m_xCertLB->make_unsorted(); m_xCertLB->freeze(); SvtUserOptions aUserOpts; @@ -257,6 +257,7 @@ void CertificateChooser::ImplInitialize(bool mbSearch) m_xCertLB->thaw(); m_xCertLB->unselect_all(); +m_xCertLB->make_sorted(); if (oSelectRow) {
core.git: svgio/inc svgio/qa svgio/source
svgio/inc/svgstyleattributes.hxx |3 ++- svgio/qa/cppunit/SvgImportTest.cxx|6 +- svgio/qa/cppunit/data/tdf156834.svg |3 ++- svgio/source/svgreader/svgcharacternode.cxx |1 + svgio/source/svgreader/svgstyleattributes.cxx |4 5 files changed, 14 insertions(+), 3 deletions(-) New commits: commit f0d6b3e727448abb4428587bdf9b9c839b28e6f4 Author: Xisco Fauli AuthorDate: Mon Feb 5 14:54:04 2024 +0100 Commit: Xisco Fauli CommitDate: Mon Feb 5 16:44:05 2024 +0100 tdf#159566: match 'central' dominant-baseline to 'middle' Inkscape also does it the same way Change-Id: I3e1cea091e7314886bbc9135c55698892239bec7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163006 Tested-by: Jenkins Reviewed-by: Xisco Fauli diff --git a/svgio/inc/svgstyleattributes.hxx b/svgio/inc/svgstyleattributes.hxx index 60781942667b..4516773e83a6 100644 --- a/svgio/inc/svgstyleattributes.hxx +++ b/svgio/inc/svgstyleattributes.hxx @@ -166,7 +166,8 @@ namespace svgio::svgreader { Auto, Middle, -Hanging +Hanging, +Central }; enum class Visibility diff --git a/svgio/qa/cppunit/SvgImportTest.cxx b/svgio/qa/cppunit/SvgImportTest.cxx index 13dff82187f3..51c66e52452a 100644 --- a/svgio/qa/cppunit/SvgImportTest.cxx +++ b/svgio/qa/cppunit/SvgImportTest.cxx @@ -780,7 +780,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf156834) CPPUNIT_ASSERT (pDocument); -assertXPath(pDocument, "/primitive2D/transform/textsimpleportion"_ostr, 3); +assertXPath(pDocument, "/primitive2D/transform/textsimpleportion"_ostr, 4); assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "text"_ostr, "Auto"); assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "x"_ostr, "30"); assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "y"_ostr, "20"); @@ -792,6 +792,10 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf156834) assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[3]"_ostr, "text"_ostr, "Hanging"); assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[3]"_ostr, "x"_ostr, "30"); assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[3]"_ostr, "y"_ostr, "94"); + +assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[4]"_ostr, "text"_ostr, "Central"); +assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[4]"_ostr, "x"_ostr, "30"); +assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[4]"_ostr, "y"_ostr, "116"); } CPPUNIT_TEST_FIXTURE(Test, testTdf104339) diff --git a/svgio/qa/cppunit/data/tdf156834.svg b/svgio/qa/cppunit/data/tdf156834.svg index 74dc1548186e..0ef81f9a6acf 100644 --- a/svgio/qa/cppunit/data/tdf156834.svg +++ b/svgio/qa/cppunit/data/tdf156834.svg @@ -1,7 +1,8 @@ http://www.w3.org/2000/svg";> - + Auto Middle Hanging + Central diff --git a/svgio/source/svgreader/svgcharacternode.cxx b/svgio/source/svgreader/svgcharacternode.cxx index 7d5a2fcb9feb..02bc3911a3b8 100644 --- a/svgio/source/svgreader/svgcharacternode.cxx +++ b/svgio/source/svgreader/svgcharacternode.cxx @@ -287,6 +287,7 @@ namespace svgio::svgreader switch(aDominantBaseline) { case DominantBaseline::Middle: +case DominantBaseline::Central: { aPosition.setY(aPosition.getY() - aRange.getCenterY()); break; diff --git a/svgio/source/svgreader/svgstyleattributes.cxx b/svgio/source/svgreader/svgstyleattributes.cxx index 869b071dade7..731df59aeebf 100644 --- a/svgio/source/svgreader/svgstyleattributes.cxx +++ b/svgio/source/svgreader/svgstyleattributes.cxx @@ -1969,6 +1969,10 @@ namespace svgio::svgreader { setDominantBaseline(DominantBaseline::Hanging); } +else if(o3tl::equalsIgnoreAsciiCase(o3tl::trim(aContent), u"central")) +{ +setDominantBaseline(DominantBaseline::Central); +} else { // no DominantBaseline
core.git: Branch 'distro/collabora/co-24.04' - configmgr/source
configmgr/source/valueparser.cxx | 25 - 1 file changed, 16 insertions(+), 9 deletions(-) New commits: commit dc6262ed969ed8a8d0ab2ff2f72ef50e43d68a75 Author: Noel Grandin AuthorDate: Mon Feb 5 14:32:01 2024 +0200 Commit: Caolán McNamara CommitDate: Mon Feb 5 16:45:56 2024 +0100 reduce unnecessary OString temporaries spotted while profiling tdf#108037 Change-Id: I66afa79d7da94c1d3c7d1695ce9c5cf902e1429e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163002 Tested-by: Jenkins Reviewed-by: Noel Grandin (cherry picked from commit f2632d4766308fc015bf2cc9576835a160a2d1d6) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163011 Tested-by: Jenkins CollaboraOffice Reviewed-by: Caolán McNamara diff --git a/configmgr/source/valueparser.cxx b/configmgr/source/valueparser.cxx index 249c1c1dbdcb..6b9faf6edbe0 100644 --- a/configmgr/source/valueparser.cxx +++ b/configmgr/source/valueparser.cxx @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include @@ -99,16 +100,22 @@ bool parseValue(xmlreader::Span const & text, sal_Int16 * value) { bool parseValue(xmlreader::Span const & text, sal_Int32 * value) { assert(text.is() && value != nullptr); // For backwards compatibility, support hexadecimal values: -*value = -rtl_str_shortenedCompareIgnoreAsciiCase_WithLength( +bool bStartWithHexPrefix = rtl_str_shortenedCompareIgnoreAsciiCase_WithLength( text.begin, text.length, RTL_CONSTASCII_STRINGPARAM("0X"), -RTL_CONSTASCII_LENGTH("0X")) == 0 ? -static_cast< sal_Int32 >( -OString( -text.begin + RTL_CONSTASCII_LENGTH("0X"), -text.length - RTL_CONSTASCII_LENGTH("0X")).toUInt32(16)) : -OString(text.begin, text.length).toInt32(); -//TODO: check valid lexical representation +RTL_CONSTASCII_LENGTH("0X")) == 0; + +if (bStartWithHexPrefix) +{ +std::string_view sView(text.begin + RTL_CONSTASCII_LENGTH("0X"), +text.length - RTL_CONSTASCII_LENGTH("0X")); +*value = static_cast< sal_Int32 >(o3tl::toUInt32(sView, 16)); +} +else +{ +std::string_view sView(text.begin, text.length); +*value = o3tl::toInt32(sView); +} +//TODO: check valid lexical representation return true; }
core.git: Branch 'libreoffice-24-2' - xmlsecurity/source
xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx |2 ++ 1 file changed, 2 insertions(+) New commits: commit aebea827555c29b30eded9a4e158b58c063613dc Author: Patrick Luby AuthorDate: Fri Feb 2 16:06:21 2024 -0500 Commit: Stephan Bergmann CommitDate: Mon Feb 5 16:55:50 2024 +0100 tdf#147291 add more default certificate manager application for macOS Add the following applications to the macOS GUI servers list: - Trusted Key Manager - CertEurope - SCInterface Manager and SmartCard tools Change-Id: Iec78171c6e82f0a072f5f06b79606560a8cc03cc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162942 Tested-by: Jenkins Reviewed-by: Patrick Luby Reviewed-by: Stephan Bergmann (cherry picked from commit 538f7b45c0c2c08124e9ea51a0947504f142a4f1) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162909 diff --git a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx index d717ec9feaad..b1a2cd57c95e 100644 --- a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx +++ b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx @@ -128,6 +128,8 @@ namespace #elif defined MACOSX constexpr std::u16string_view aGUIServers[] = { u"/Applications/GPG Keychain.app", +u"/Applications/Trusted Key Manager.app", // tdf#147291 +u"/Applications/SCinterface/scManager.app", // tdf#147291 u"/System/Applications/Utilities/Keychain Access.app"}; #else constexpr std::u16string_view aGUIServers[]
core.git: Branch 'distro/collabora/co-24.04' - 2 commits - editeng/source include/sfx2 sc/qa sc/source sfx2/source
editeng/source/editeng/editview.cxx |4 include/sfx2/lokhelper.hxx | 18 + sc/qa/unit/tiledrendering/tiledrendering.cxx |3 sc/source/ui/unoobj/docuno.cxx |7 sc/source/ui/view/gridwin4.cxx | 476 ++- sc/source/ui/view/tabview.cxx| 10 sc/source/ui/view/tabview3.cxx | 13 sc/source/ui/view/viewdata.cxx |2 sfx2/source/view/lokhelper.cxx | 78 9 files changed, 321 insertions(+), 290 deletions(-) New commits: commit 4dca2db5abc17beb50c7e1de9796e7a7ef38698b Author: Marco Cecchetti AuthorDate: Mon Jan 22 16:43:11 2024 +0100 Commit: Marco Cecchetti CommitDate: Mon Feb 5 18:21:13 2024 +0100 lok: calc: GridWindow size not updated for some view The grid window size was updated for the view used for painting and not for other views with the same zoom level. In fact the grid window size was updated in ScModelObj::paintTile only. Now the required updating is performed in lcl_ExtendTiledDimension and ScTabView::SetCursor, too. In order to get this working it has been neede to revert changes in `ScModelObj::setClientVisibleArea` introduced by https://gerrit.libreoffice.org/c/core/+/161907 Change-Id: Ie8f585b861b0c916624d8e2f9d828cf23b799672 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162406 Tested-by: Jenkins CollaboraOffice Reviewed-by: Szymon Kłos Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162987 Reviewed-by: Marco Cecchetti diff --git a/sc/qa/unit/tiledrendering/tiledrendering.cxx b/sc/qa/unit/tiledrendering/tiledrendering.cxx index b7676f70761e..2a723ea0c4b8 100644 --- a/sc/qa/unit/tiledrendering/tiledrendering.cxx +++ b/sc/qa/unit/tiledrendering/tiledrendering.cxx @@ -3603,6 +3603,9 @@ CPPUNIT_TEST_FIXTURE(ScTiledRenderingTest, testLongFirstColumnMouseClick) // very long (longer than ~800px default size of GridWindow) triggers a code-path where the cell // selected is the neighbouring cell even when we clicked on the area of the first cell. +comphelper::LibreOfficeKit::setCompatFlag( +comphelper::LibreOfficeKit::Compat::scPrintTwipsMsgs); + ScModelObj* pModelObj = createDoc("DocumentWithLongFirstColumn.ods"); CPPUNIT_ASSERT(pModelObj); pModelObj->initializeForTiledRendering(uno::Sequence()); diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx index f1599ed413d5..fbc33cff551d 100644 --- a/sc/source/ui/unoobj/docuno.cxx +++ b/sc/source/ui/unoobj/docuno.cxx @@ -1158,13 +1158,6 @@ void ScModelObj::setClientVisibleArea(const tools::Rectangle& rRectangle) if (pTabView) pTabView->extendTiledAreaIfNeeded(); } - -// Set the GridWindow size to the client area size, so that the logic in GridWindow works correctly -// for the current view and doesn't cause any unexpected behaviour related to window size and checks if we are -// outside of the window. - -ScGridWindow* pGridWindow = pViewData->GetActiveWin(); -pGridWindow->SetOutputSizePixel(Size(rRectangle.GetWidth() * pViewData->GetPPTX(), rRectangle.GetHeight() * pViewData->GetPPTY())); } void ScModelObj::setOutlineState(bool bColumn, int nLevel, int nIndex, bool bHidden) diff --git a/sc/source/ui/view/tabview.cxx b/sc/source/ui/view/tabview.cxx index a865acb71505..5d0699f26e6b 100644 --- a/sc/source/ui/view/tabview.cxx +++ b/sc/source/ui/view/tabview.cxx @@ -2734,6 +2734,16 @@ void lcl_ExtendTiledDimension(bool bColumn, const SCCOLROW nEnd, const SCCOLROW if (!pDocSh) return; +if (pModelObj) +{ +ScGridWindow* pGridWindow = rViewData.GetActiveWin(); +if (pGridWindow) +{ +Size aNewSizePx(aNewSize.Width() * rViewData.GetPPTX(), aNewSize.Height() * rViewData.GetPPTY()); +pGridWindow->SetOutputSizePixel(aNewSizePx); +} +} + // New area extended to the right/bottom of the sheet after last col/row tools::Rectangle aNewArea(Point(0, 0), aNewSize); // excluding overlapping area with aNewArea diff --git a/sc/source/ui/view/tabview3.cxx b/sc/source/ui/view/tabview3.cxx index 0d4086bfb4a2..f83d9f7c6acd 100644 --- a/sc/source/ui/view/tabview3.cxx +++ b/sc/source/ui/view/tabview3.cxx @@ -424,9 +424,22 @@ void ScTabView::SetCursor( SCCOL nPosX, SCROW nPosY, bool bNew ) if (pModelObj) aNewSize = pModelObj->getDocumentSize(); +if (aOldSize == aNewSize) +return; + if (!pDocSh) return; +if (pModelObj) +{ +ScGridWindow* pGridWindow = aViewData.GetActiveWin(); +if (pGridWindow) +{ +Size aNewSizePx(aNewSize.Width() * aViewData.GetPPTX(), aNewSize.Height() * aViewData.GetPPTY()); +pGridWindow->SetOutputSizePixel(aNewSizePx); +} +} + // New area extended to the right of the sheet after
core.git: Branch 'distro/collabora/co-24.04' - 2 commits - sc/source
sc/source/ui/view/cliputil.cxx |3 +++ sc/source/ui/view/gridwin4.cxx |4 +++- sc/source/ui/view/viewfun3.cxx |7 +-- 3 files changed, 11 insertions(+), 3 deletions(-) New commits: commit c675537f59b7c7e7a63f84e266cc0c2b146b2e7b Author: Marco Cecchetti AuthorDate: Tue Jan 30 14:51:56 2024 +0100 Commit: Marco Cecchetti CommitDate: Mon Feb 5 18:21:37 2024 +0100 lok: calc: missing invalidation of cached positions When executing an external paste position cached by ScPositionHelper where not invalidated causing misplaced tile rendering Change-Id: Ia707e8de5a870f42a6dd303d87694f7ec8f0a105 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162775 Tested-by: Jenkins CollaboraOffice Reviewed-by: Tomaž Vajngerl Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162989 Reviewed-by: Marco Cecchetti diff --git a/sc/source/ui/view/cliputil.cxx b/sc/source/ui/view/cliputil.cxx index 9c7d25db1055..e4d75d3b34b5 100644 --- a/sc/source/ui/view/cliputil.cxx +++ b/sc/source/ui/view/cliputil.cxx @@ -126,6 +126,9 @@ void ScClipUtil::PasteFromClipboard( ScViewData& rViewData, ScTabViewShell* pTab const SfxBoolItem* pItem = rThisDoc.GetAttr(nThisCol, nThisRow, nThisTab, ATTR_LINEBREAK); if (pItem->GetValue() || entireColumnOrRowSelected) { +pTabViewShell->OnLOKSetWidthOrHeight(nThisCol, true); +pTabViewShell->OnLOKSetWidthOrHeight(nThisRow, false); + ScTabViewShell::notifyAllViewsSheetGeomInvalidation( pTabViewShell, true /* bColumns */, true /* bRows */, true /* bSizes*/, true /* bHidden */, true /* bFiltered */, true /* bGroups */, nThisTab); diff --git a/sc/source/ui/view/viewfun3.cxx b/sc/source/ui/view/viewfun3.cxx index fb0e469d5205..289776006284 100644 --- a/sc/source/ui/view/viewfun3.cxx +++ b/sc/source/ui/view/viewfun3.cxx @@ -755,8 +755,11 @@ bool ScViewFunc::PasteFromSystem( SotClipboardFormatId nFormatId, bool bApi ) } else if (comphelper::LibreOfficeKit::isActive()) { -SfxViewShell* pViewShell = rViewData.GetViewShell(); -ScTabViewShell::notifyAllViewsSheetGeomInvalidation(pViewShell, true /* bColumns */, true /* bRows */, +ScTabViewShell* pTabViewShell = rViewData.GetViewShell(); +pTabViewShell->OnLOKSetWidthOrHeight(rViewData.GetCurX(), true); +pTabViewShell->OnLOKSetWidthOrHeight(rViewData.GetCurY(), false); + +ScTabViewShell::notifyAllViewsSheetGeomInvalidation(pTabViewShell, true /* bColumns */, true /* bRows */, true /* bSizes */, false /* bHidden */, false /* bFiltered */, false /* bGroups */, rViewData.GetTabNo()); } } commit 2c4a79c645cc39fb56ff1d5e2b146b718d59088f Author: Marco Cecchetti AuthorDate: Tue Jan 23 17:34:20 2024 +0100 Commit: Marco Cecchetti CommitDate: Mon Feb 5 18:21:26 2024 +0100 lok: calc: rtl - misplaced caret This is a workaround since text cursor is horizontally a few pixels misplaced wrt text in the RTL case. This issue is a regression from https://gerrit.libreoffice.org/c/core/+/162196 Change-Id: Ia06ee223d01a7df8841bfaca3cad32af896871d0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162563 Reviewed-by: Henry Castro Tested-by: Jenkins CollaboraOffice Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162988 diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx index 4f4df882ce83..50d03d010416 100644 --- a/sc/source/ui/view/gridwin4.cxx +++ b/sc/source/ui/view/gridwin4.cxx @@ -1197,12 +1197,14 @@ void ScGridWindow::DrawContent(OutputDevice &rDevice, const ScTableInfo& rTableI // same zoom level as view used for painting aNewOutputArea = rDevice.LogicToPixel(aOrigOutputAreaTw); } +// a small workaround for getting text position matching cursor position horizontally. +const tools::Long nCursorGapPx = 2; // Transform the cell range X coordinates such that the edit cell area is // horizontally mirrored w.r.t the (combined-)tile. aNewOutputArea = tools::Rectangle( pLokRTLCtxt->docToTilePos(aNewOutputArea.Left() - aOriginAbsPx.X()) + aOriginAbsPx.X(), aNewOutputArea.Top(), -pLokRTLCtxt->docToTilePos(aNewOutputArea.Right() - aOriginAbsPx.X()) + aOriginAbsPx.X(), +pLokRTLCtxt->docToTilePos(aNewOutputArea.Right() - aOriginAbsPx.X()) + aOriginAbsPx.X() + nCursorGapPx, aNewOutputArea.Bottom()); aNewOutputArea.Normalize(); }
core.git: Branch 'distro/collabora/co-24.04' - 2 commits - sc/source
sc/source/ui/undo/undoblk.cxx | 43 ++ 1 file changed, 43 insertions(+) New commits: commit 71d29f8143430b0e01c4f4c97e3fdd091e59bcf1 Author: Marco Cecchetti AuthorDate: Thu Feb 1 22:45:42 2024 +0100 Commit: Marco Cecchetti CommitDate: Mon Feb 5 18:22:00 2024 +0100 lok: calc: missing invalidation of position on undo a drag and drop When undo/redo a drag and drop of a block of cells cached position was not invalidated. Change-Id: I538815bba46f6759db3b09a583eca9481148cdbd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162915 Tested-by: Jenkins CollaboraOffice Reviewed-by: Tomaž Vajngerl Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162991 Reviewed-by: Marco Cecchetti diff --git a/sc/source/ui/undo/undoblk.cxx b/sc/source/ui/undo/undoblk.cxx index 987e89f58442..2b9ad48d92ab 100644 --- a/sc/source/ui/undo/undoblk.cxx +++ b/sc/source/ui/undo/undoblk.cxx @@ -1352,6 +1352,13 @@ void ScUndoDragDrop::DoUndo( ScRange aRange ) pDocShell->UpdatePaintExt(mnPaintExtFlags, aPaintRange); maPaintRanges.Join(aPaintRange); +if (comphelper::LibreOfficeKit::isActive()) +{ +ScTabViewShell* pTabViewShell = ScTabViewShell::GetActiveViewShell(); +pTabViewShell->OnLOKSetWidthOrHeight(aPaintRange.aStart.Col(), true); +pTabViewShell->OnLOKSetWidthOrHeight(aPaintRange.aStart.Row(), false); +} + ScTabViewShell::notifyAllViewsSheetGeomInvalidation( ScTabViewShell::GetActiveViewShell(), true /* bColumns */, true /* bRows */, @@ -1507,6 +1514,18 @@ void ScUndoDragDrop::Redo() if (comphelper::LibreOfficeKit::isActive()) { +SCCOL nStartCol = aDestRange.aStart.Col(); +SCROW nStartRow = aDestRange.aStart.Row(); +if (bCut) +{ +nStartCol = std::min(nStartCol, aSrcRange.aStart.Col()); +nStartRow = std::min(nStartRow, aSrcRange.aStart.Row()); +} + +ScTabViewShell* pTabViewShell = ScTabViewShell::GetActiveViewShell(); +pTabViewShell->OnLOKSetWidthOrHeight(nStartCol, true); +pTabViewShell->OnLOKSetWidthOrHeight(nStartRow, false); + SCTAB nStartTab = aDestRange.aStart.Tab(); SCTAB nEndTab = aDestRange.aEnd.Tab(); if (bCut) commit 7607cb20e88b7fd647f96d3daa0bfb8ffad533de Author: Marco Cecchetti AuthorDate: Tue Jan 30 14:54:18 2024 +0100 Commit: Marco Cecchetti CommitDate: Mon Feb 5 18:21:50 2024 +0100 lok: calc: missing update of sheet geometry data on undo a drag and drop When undo/redo a drag and drop of a block of cells sheet geometry data was not invalidated. Change-Id: I0579de814ed61357c70a64d0e4ebf862525d3c79 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162776 Tested-by: Jenkins CollaboraOffice Reviewed-by: Tomaž Vajngerl Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162990 Reviewed-by: Marco Cecchetti diff --git a/sc/source/ui/undo/undoblk.cxx b/sc/source/ui/undo/undoblk.cxx index d352ba143ba8..987e89f58442 100644 --- a/sc/source/ui/undo/undoblk.cxx +++ b/sc/source/ui/undo/undoblk.cxx @@ -1351,6 +1351,12 @@ void ScUndoDragDrop::DoUndo( ScRange aRange ) pDocShell->UpdatePaintExt(mnPaintExtFlags, aPaintRange); maPaintRanges.Join(aPaintRange); + +ScTabViewShell::notifyAllViewsSheetGeomInvalidation( +ScTabViewShell::GetActiveViewShell(), +true /* bColumns */, true /* bRows */, +true /* bSizes */, true /* bHidden */, true /* bFiltered */, +true /* bGroups */, aPaintRange.aStart.Tab()); } void ScUndoDragDrop::Undo() @@ -1498,6 +1504,24 @@ void ScUndoDragDrop::Redo() EndRedo(); SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScAreaLinksChanged ) ); + +if (comphelper::LibreOfficeKit::isActive()) +{ +SCTAB nStartTab = aDestRange.aStart.Tab(); +SCTAB nEndTab = aDestRange.aEnd.Tab(); +if (bCut) +{ +nStartTab = std::min(nStartTab, aSrcRange.aStart.Tab()); +nEndTab = std::max(nEndTab, aSrcRange.aEnd.Tab()); +} +for (nTab = nStartTab; nTab <= nEndTab; ++nTab) +{ +ScTabViewShell::notifyAllViewsSheetGeomInvalidation( +ScTabViewShell::GetActiveViewShell(), true /* bColumns */, true /* bRows */, +true /* bSizes */, true /* bHidden */, true /* bFiltered */, true /* bGroups */, +nTab); +} +} } void ScUndoDragDrop::Repeat(SfxRepeatTarget& /* rTarget */)
core.git: vcl/inc
vcl/inc/graphic/GraphicFormatDetector.hxx |5 + vcl/inc/graphic/Manager.hxx |5 + vcl/inc/graphic/UnoGraphic.hxx|5 + vcl/inc/graphic/UnoGraphicDescriptor.hxx |5 + 4 files changed, 4 insertions(+), 16 deletions(-) New commits: commit ef6212158d8308d60d3edb6c87117958758436e2 Author: Tuukka Orava AuthorDate: Mon Feb 5 13:13:56 2024 +0200 Commit: Ilmari Lauhakangas CommitDate: Mon Feb 5 18:28:26 2024 +0100 tdf#143148 Use pragma once in vcl/inc/graphic Change-Id: Id88d0c64f02d9a0ca111de3d08e3d542dfba2a1c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162997 Tested-by: Jenkins Tested-by: Ilmari Lauhakangas Reviewed-by: Ilmari Lauhakangas diff --git a/vcl/inc/graphic/GraphicFormatDetector.hxx b/vcl/inc/graphic/GraphicFormatDetector.hxx index d6791e377fc1..24ffcab18b7a 100644 --- a/vcl/inc/graphic/GraphicFormatDetector.hxx +++ b/vcl/inc/graphic/GraphicFormatDetector.hxx @@ -17,8 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#ifndef INCLUDED_VCL_INC_GRAPHICFORMATDETECTOR_HXX -#define INCLUDED_VCL_INC_GRAPHICFORMATDETECTOR_HXX +#pragma once #include #include @@ -203,6 +202,4 @@ private: }; } -#endif // INCLUDED_VCL_INC_GRAPHICFORMATDETECTOR_HXX - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/inc/graphic/Manager.hxx b/vcl/inc/graphic/Manager.hxx index 65e92146491c..d239f6a8b01d 100644 --- a/vcl/inc/graphic/Manager.hxx +++ b/vcl/inc/graphic/Manager.hxx @@ -7,8 +7,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#ifndef INCLUDED_VCL_INC_GRAPHIC_MANAGER_HXX -#define INCLUDED_VCL_INC_GRAPHIC_MANAGER_HXX +#pragma once #include #include @@ -76,6 +75,4 @@ public: } // end namespace vcl::graphic -#endif // INCLUDED_VCL_INC_GRAPHIC_MANAGER_HXX - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/inc/graphic/UnoGraphic.hxx b/vcl/inc/graphic/UnoGraphic.hxx index ce060c98f40c..94fcb361dcd1 100644 --- a/vcl/inc/graphic/UnoGraphic.hxx +++ b/vcl/inc/graphic/UnoGraphic.hxx @@ -17,8 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#ifndef INCLUDED_VCL_SOURCE_GRAPHIC_GRAPHIC_HXX -#define INCLUDED_VCL_SOURCE_GRAPHIC_GRAPHIC_HXX +#pragma once #include #include @@ -84,6 +83,4 @@ private: } -#endif - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/inc/graphic/UnoGraphicDescriptor.hxx b/vcl/inc/graphic/UnoGraphicDescriptor.hxx index 2adc19dac059..3631c504fa92 100644 --- a/vcl/inc/graphic/UnoGraphicDescriptor.hxx +++ b/vcl/inc/graphic/UnoGraphicDescriptor.hxx @@ -17,8 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#ifndef INCLUDED_VCL_SOURCE_GRAPHIC_DESCRIPTOR_HXX -#define INCLUDED_VCL_SOURCE_GRAPHIC_DESCRIPTOR_HXX +#pragma once #include #include @@ -114,6 +113,4 @@ private: } -#endif - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
core.git: sw/qa
sw/qa/core/text/text.cxx|2 +- sw/qa/extras/uiwriter/uiwriter8.cxx |2 +- sw/qa/uitest/navigator/tdf159428.py |2 +- 3 files changed, 3 insertions(+), 3 deletions(-) New commits: commit a9802e255a8d56b1ef9f5c071ac8cf9598db5409 Author: Andrea Gelmini AuthorDate: Mon Feb 5 13:14:54 2024 +0100 Commit: Julien Nabet CommitDate: Mon Feb 5 18:32:50 2024 +0100 Fix typos Change-Id: Ia2a3100f07b45dba214a7f534d6adb54b2ceaa89 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163000 Tested-by: Julien Nabet Reviewed-by: Julien Nabet diff --git a/sw/qa/core/text/text.cxx b/sw/qa/core/text/text.cxx index 690fc333afb5..74e2bcdbb433 100644 --- a/sw/qa/core/text/text.cxx +++ b/sw/qa/core/text/text.cxx @@ -1532,7 +1532,7 @@ CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testTdf129810) std::shared_ptr xMetaFile = pShell->GetPreviewMetaFile(); CPPUNIT_ASSERT(xMetaFile); -// Find the fist text array action +// Find the first text array action for (size_t nAction = 0; nAction < xMetaFile->GetActionSize(); nAction++) { auto pAction = xMetaFile->GetAction(nAction); diff --git a/sw/qa/extras/uiwriter/uiwriter8.cxx b/sw/qa/extras/uiwriter/uiwriter8.cxx index ecf8e2f9bf80..269937141682 100644 --- a/sw/qa/extras/uiwriter/uiwriter8.cxx +++ b/sw/qa/extras/uiwriter/uiwriter8.cxx @@ -503,7 +503,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest8, testTdf141391) "/root/page[1]/body/tab/row[2]/cell[1]/txt[1]/SwParaPortion/SwLineLayout"_ostr, "portion"_ostr, "Some text..."); -// copy the 2-row table into the fist paragraph of cell "A2", +// copy the 2-row table into the first paragraph of cell "A2", // but not at paragraph start (changed behaviour) pWrtShell->Left(SwCursorSkipMode::Chars, /*bSelect=*/false, 1, /*bBasicCall=*/false); diff --git a/sw/qa/uitest/navigator/tdf159428.py b/sw/qa/uitest/navigator/tdf159428.py index 3a8634a57629..0ad3cd0354d5 100644 --- a/sw/qa/uitest/navigator/tdf159428.py +++ b/sw/qa/uitest/navigator/tdf159428.py @@ -25,7 +25,7 @@ class tdf159428(UITestCase): xNavigatorPanel = self.ui_test.wait_until_child_is_available('NavigatorPanel') xContentTree = xNavigatorPanel.getChild("contenttree") -# select fist bookmark - Heading "H1" should be tracked +# select first bookmark - Heading "H1" should be tracked self.xUITest.executeCommand(".uno:GoToNextPara") self.xUITest.executeCommand(".uno:GoToNextPara") xWriterEdit.executeAction("SELECT", mkPropertyValues({"START_POS": "111", "END_POS": "119"}))
core.git: cui/source
cui/source/options/treeopt.cxx |7 --- 1 file changed, 7 deletions(-) New commits: commit 263e431f76447c6933343a4a07c9ed6d193af867 Author: Rafael Lima AuthorDate: Thu Feb 1 13:04:20 2024 +0100 Commit: Julien Nabet CommitDate: Mon Feb 5 18:50:58 2024 +0100 tdf#159476 Remove experimental status from Basic IDE entry in Options dialog Change-Id: Icbc9d131d90e639490f6dfd896565c994a17b172 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162829 Tested-by: Jenkins Reviewed-by: Julien Nabet diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx index 7d0ae590b49b..2c8abb9cfa5e 100644 --- a/cui/source/options/treeopt.cxx +++ b/cui/source/options/treeopt.cxx @@ -1757,13 +1757,6 @@ void OfaTreeOptionsDialog::generalOptions(const std::vector& vPageId continue; } -// Disable Basic IDE options, if experimental features are not enabled -if( RID_SVXPAGE_BASICIDE_OPTIONS == nPageId ) -{ -if( ! officecfg::Office::Common::Misc::ExperimentalMode::get() ) -continue; -} - if (!vPageId.empty()) { if (std::find(vPageId.begin(), vPageId.end(), nPageId) != vPageId.end())
core.git: sd/qa sd/source
sd/qa/unit/misc-tests.cxx | 42 + sd/source/ui/view/drviews1.cxx |3 ++ 2 files changed, 45 insertions(+) New commits: commit 6b6849107562b258aa8858e94ff3c07160f07062 Author: Jim Raykowski AuthorDate: Sat Nov 25 15:14:04 2023 -0900 Commit: Jim Raykowski CommitDate: Mon Feb 5 20:38:18 2024 +0100 tdf#157117 sd: fix page switched to after last page is deleted Makes the new last page in the document be the page switched to after a page delete of the last page in the document. Before the patch, when the draw view has focus (not the slide sorter), deleting the last page in the document results in a switch to the first page. Change-Id: I8d3904e85254228e01d423f15312981d11fc9755 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159963 Tested-by: Jenkins Reviewed-by: Jim Raykowski diff --git a/sd/qa/unit/misc-tests.cxx b/sd/qa/unit/misc-tests.cxx index 1bbf8364fd3e..342f720a6e6e 100644 --- a/sd/qa/unit/misc-tests.cxx +++ b/sd/qa/unit/misc-tests.cxx @@ -84,6 +84,7 @@ public: void testTdf136956(); void testTdf39519(); void testEncodedTableStyles(); +void testTdf157117(); CPPUNIT_TEST_SUITE(SdMiscTest); CPPUNIT_TEST(testTdf99396); @@ -107,6 +108,7 @@ public: CPPUNIT_TEST(testTdf136956); CPPUNIT_TEST(testTdf39519); CPPUNIT_TEST(testEncodedTableStyles); +CPPUNIT_TEST(testTdf157117); CPPUNIT_TEST_SUITE_END(); }; @@ -955,6 +957,46 @@ void SdMiscTest::testEncodedTableStyles() } } +void SdMiscTest::testTdf157117() +{ +createSdImpressDoc(); +SdXImpressDocument* pXImpressDocument = dynamic_cast(mxComponent.get()); +CPPUNIT_ASSERT(pXImpressDocument); +sd::ViewShell* pViewShell = pXImpressDocument->GetDocShell()->GetViewShell(); + +// insert two pages to make a total of 3 pages +dispatchCommand(mxComponent, ".uno:InsertPage", {}); +dispatchCommand(mxComponent, ".uno:InsertPage", {}); + +// assert the document has 3 standard pages +SdDrawDocument* pDocument = pXImpressDocument->GetDoc(); +CPPUNIT_ASSERT_EQUAL(sal_uInt16(3), pDocument->GetSdPageCount(PageKind::Standard)); + +// alternate page insert method +//uno::Reference xDrawPagesSupplier(mxComponent, uno::UNO_QUERY); +//uno::Reference xDrawPages = xDrawPagesSupplier->getDrawPages(); +//xDrawPages->insertNewByIndex(0); +//xDrawPages->insertNewByIndex(0); +//CPPUNIT_ASSERT_EQUAL(xDrawPages->getCount(), 3); + +// move to the last page +dispatchCommand(mxComponent, ".uno:LastPage", {}); + +SdPage* pPage = pViewShell->GetActualPage(); +auto nPageNum = pPage->GetPageNum(); +// assert move to last page +CPPUNIT_ASSERT_EQUAL(2, (nPageNum - 1) / 2); + +// delete the last page +dispatchCommand(mxComponent, ".uno:DeletePage", {}); +pPage = pViewShell->GetActualPage(); +nPageNum = pPage->GetPageNum(); + +// Check that the new last page is moved to. Before, the first page was always moved to when +// the last page was deleted. +CPPUNIT_ASSERT_EQUAL(1, (nPageNum - 1) / 2); +} + CPPUNIT_TEST_SUITE_REGISTRATION(SdMiscTest); CPPUNIT_PLUGIN_IMPLEMENT(); diff --git a/sd/source/ui/view/drviews1.cxx b/sd/source/ui/view/drviews1.cxx index a48ab7a11546..a481e944e7c6 100644 --- a/sd/source/ui/view/drviews1.cxx +++ b/sd/source/ui/view/drviews1.cxx @@ -689,6 +689,9 @@ void DrawViewShell::ResetActualPage() sal_uInt16 nCurrentPageNum = maTabControl->GetPagePos(nCurrentPageId); sal_uInt16 nPageCount = (meEditMode == EditMode::Page)?GetDoc()->GetSdPageCount(mePageKind):GetDoc()->GetMasterSdPageCount(mePageKind); +if (nCurrentPageNum >= nPageCount) +nCurrentPageNum = nPageCount - 1; + if (meEditMode == EditMode::Page) {
core.git: Branch 'private/tvajngerl/staging' - 2807 commits - accessibility/inc accessibility/source android/Bootstrap android/Makefile android/source animations/source avmedia/source basctl/inc basct
Rebased ref, commits from common ancestor: commit 2ceedfe4f55109619d9fee699791b951fc451c36 Author: Tomaž Vajngerl AuthorDate: Sun Mar 5 18:48:23 2023 +0900 Commit: Tomaž Vajngerl CommitDate: Mon Feb 5 16:18:17 2024 +0900 svx: use gfx::Length based types directly in SdrTextObj::NbcResize Change-Id: I839430b30685994e1767998b353c63b97f461284 diff --git a/svx/source/svdraw/svdotxtr.cxx b/svx/source/svdraw/svdotxtr.cxx index 7ed97774119d..f1abaf11e1b3 100644 --- a/svx/source/svdraw/svdotxtr.cxx +++ b/svx/source/svdraw/svdotxtr.cxx @@ -122,81 +122,102 @@ void SdrTextObj::NbcMove(const Size& rSize) void SdrTextObj::NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact) { -bool bNotSheared=maGeo.m_nShearAngle==0_deg100; -bool bRotate90=bNotSheared && maGeo.m_nRotationAngle.get() % 9000 ==0; -bool bXMirr=(xFact.GetNumerator()<0) != (xFact.GetDenominator()<0); -bool bYMirr=(yFact.GetNumerator()<0) != (yFact.GetDenominator()<0); -if (bXMirr || bYMirr) { +bool bNotSheared = maGeo.m_nShearAngle == 0_deg100; +bool bRotate90 = bNotSheared && maGeo.m_nRotationAngle.get() % 9000 == 0; + +bool bXMirrored = (xFact.GetNumerator() < 0) != (xFact.GetDenominator() < 0); +bool bYMirrored = (yFact.GetNumerator() < 0) != (yFact.GetDenominator() < 0); + +double fFactorX = xFact.IsValid() ? double(xFact) : 1.0; +double fFactorY = yFact.IsValid() ? double(yFact) : 1.0; + +if (bXMirrored || bYMirrored) +{ Point aRef1(GetSnapRect().Center()); -if (bXMirr) { +if (bXMirrored) +{ Point aRef2(aRef1); aRef2.AdjustY( 1 ); NbcMirrorGluePoints(aRef1,aRef2); } -if (bYMirr) { +if (bYMirrored) +{ Point aRef2(aRef1); aRef2.AdjustX( 1 ); NbcMirrorGluePoints(aRef1,aRef2); } } -if (maGeo.m_nRotationAngle==0_deg100 && maGeo.m_nShearAngle==0_deg100) { -auto aRectangle = getRectangle(); -ResizeRect(aRectangle, rRef, xFact, yFact); -setRectangle(aRectangle); -if (bYMirr) +if (maGeo.m_nRotationAngle == 0_deg100 && maGeo.m_nShearAngle == 0_deg100) +{ +auto eUnit = getSdrModelFromSdrObject().getUnit(); +gfx::Tuple2DL aReference = createTupleFromPoint(rRef, eUnit); +svx::resizeRange(maRectangleRange, aReference, fFactorX, fFactorY); + +if (bYMirrored) { -//maRectangle.Normalize(); -moveRectangle(aRectangle.Right() - aRectangle.Left(), aRectangle.Bottom() - aRectangle.Top()); -maGeo.m_nRotationAngle=18000_deg100; +maRectangleRange.shift(maRectangleRange.getWidth(), maRectangleRange.getHeight()); +maGeo.m_nRotationAngle = 18000_deg100; maGeo.RecalcSinCos(); } } else { -tools::Polygon aPol(Rect2Poly(getRectangle(), maGeo)); +tools::Polygon aPolygon(Rect2Poly(getRectangle(), maGeo)); -for(sal_uInt16 a(0); a < aPol.GetSize(); a++) +for (sal_uInt16 a(0); a < aPolygon.GetSize(); a++) { - ResizePoint(aPol[a], rRef, xFact, yFact); + ResizePoint(aPolygon[a], rRef, xFact, yFact); } -if(bXMirr != bYMirr) +if (bXMirrored != bYMirrored) { // turn polygon and move it a little -tools::Polygon aPol0(aPol); +tools::Polygon aPol0(aPolygon); -aPol[0] = aPol0[1]; -aPol[1] = aPol0[0]; -aPol[2] = aPol0[3]; -aPol[3] = aPol0[2]; -aPol[4] = aPol0[1]; +aPolygon[0] = aPol0[1]; +aPolygon[1] = aPol0[0]; +aPolygon[2] = aPol0[3]; +aPolygon[3] = aPol0[2]; +aPolygon[4] = aPol0[1]; } -tools::Rectangle aRectangle = svx::polygonToRectangle(aPol, maGeo); +tools::Rectangle aRectangle = svx::polygonToRectangle(aPolygon, maGeo); setRectangle(aRectangle); } -if (bRotate90) { -bool bRota90=maGeo.m_nRotationAngle.get() % 9000 ==0; -if (!bRota90) { // there's seems to be a rounding error occurring: correct it -Degree100 a=NormAngle36000(maGeo.m_nRotationAngle); -if (a<4500_deg100) a=0_deg100; -else if (a<13500_deg100) a=9000_deg100; -else if (a<22500_deg100) a=18000_deg100; -else if (a<31500_deg100) a=27000_deg100; -else a=0_deg100; -maGeo.m_nRotationAngle=a; +if (bRotate90) +{ +bool bRota90 = maGeo.m_nRotationAngle.get() % 9000 == 0; +if (!bRota90) +{ +// there's seems to be a rounding error occurring: correct it + +Degree100 angle = NormAngle36000(maGeo.m_nRotationAngle); +if (angle < 4500_deg100) +angle = 0_deg100; +else if (angle < 13500_deg100) +ang
Zeph Chai license statement
All of my past & future contributions to LibreOffice may be licensed under the MPLv2/LGPLv3+ dual license.
core.git: Branch 'private/tvajngerl/staging' - 16 commits - basctl/source basegfx/CppunitTest_basegfx.mk basegfx/test chart2/source cui/source drawinglayer/source editeng/source filter/CppunitTest_fil
Rebased ref, commits from common ancestor: commit 36167ff3d9bfca7095b340e33d3c5d7074945f66 Author: Tomaž Vajngerl AuthorDate: Sun Mar 5 18:48:23 2023 +0900 Commit: Tomaž Vajngerl CommitDate: Tue Feb 6 13:29:23 2024 +0900 svx: use gfx::Length based types directly in SdrTextObj::NbcResize Change-Id: I839430b30685994e1767998b353c63b97f461284 diff --git a/svx/source/svdraw/svdotxtr.cxx b/svx/source/svdraw/svdotxtr.cxx index 7ed97774119d..f1abaf11e1b3 100644 --- a/svx/source/svdraw/svdotxtr.cxx +++ b/svx/source/svdraw/svdotxtr.cxx @@ -122,81 +122,102 @@ void SdrTextObj::NbcMove(const Size& rSize) void SdrTextObj::NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact) { -bool bNotSheared=maGeo.m_nShearAngle==0_deg100; -bool bRotate90=bNotSheared && maGeo.m_nRotationAngle.get() % 9000 ==0; -bool bXMirr=(xFact.GetNumerator()<0) != (xFact.GetDenominator()<0); -bool bYMirr=(yFact.GetNumerator()<0) != (yFact.GetDenominator()<0); -if (bXMirr || bYMirr) { +bool bNotSheared = maGeo.m_nShearAngle == 0_deg100; +bool bRotate90 = bNotSheared && maGeo.m_nRotationAngle.get() % 9000 == 0; + +bool bXMirrored = (xFact.GetNumerator() < 0) != (xFact.GetDenominator() < 0); +bool bYMirrored = (yFact.GetNumerator() < 0) != (yFact.GetDenominator() < 0); + +double fFactorX = xFact.IsValid() ? double(xFact) : 1.0; +double fFactorY = yFact.IsValid() ? double(yFact) : 1.0; + +if (bXMirrored || bYMirrored) +{ Point aRef1(GetSnapRect().Center()); -if (bXMirr) { +if (bXMirrored) +{ Point aRef2(aRef1); aRef2.AdjustY( 1 ); NbcMirrorGluePoints(aRef1,aRef2); } -if (bYMirr) { +if (bYMirrored) +{ Point aRef2(aRef1); aRef2.AdjustX( 1 ); NbcMirrorGluePoints(aRef1,aRef2); } } -if (maGeo.m_nRotationAngle==0_deg100 && maGeo.m_nShearAngle==0_deg100) { -auto aRectangle = getRectangle(); -ResizeRect(aRectangle, rRef, xFact, yFact); -setRectangle(aRectangle); -if (bYMirr) +if (maGeo.m_nRotationAngle == 0_deg100 && maGeo.m_nShearAngle == 0_deg100) +{ +auto eUnit = getSdrModelFromSdrObject().getUnit(); +gfx::Tuple2DL aReference = createTupleFromPoint(rRef, eUnit); +svx::resizeRange(maRectangleRange, aReference, fFactorX, fFactorY); + +if (bYMirrored) { -//maRectangle.Normalize(); -moveRectangle(aRectangle.Right() - aRectangle.Left(), aRectangle.Bottom() - aRectangle.Top()); -maGeo.m_nRotationAngle=18000_deg100; +maRectangleRange.shift(maRectangleRange.getWidth(), maRectangleRange.getHeight()); +maGeo.m_nRotationAngle = 18000_deg100; maGeo.RecalcSinCos(); } } else { -tools::Polygon aPol(Rect2Poly(getRectangle(), maGeo)); +tools::Polygon aPolygon(Rect2Poly(getRectangle(), maGeo)); -for(sal_uInt16 a(0); a < aPol.GetSize(); a++) +for (sal_uInt16 a(0); a < aPolygon.GetSize(); a++) { - ResizePoint(aPol[a], rRef, xFact, yFact); + ResizePoint(aPolygon[a], rRef, xFact, yFact); } -if(bXMirr != bYMirr) +if (bXMirrored != bYMirrored) { // turn polygon and move it a little -tools::Polygon aPol0(aPol); +tools::Polygon aPol0(aPolygon); -aPol[0] = aPol0[1]; -aPol[1] = aPol0[0]; -aPol[2] = aPol0[3]; -aPol[3] = aPol0[2]; -aPol[4] = aPol0[1]; +aPolygon[0] = aPol0[1]; +aPolygon[1] = aPol0[0]; +aPolygon[2] = aPol0[3]; +aPolygon[3] = aPol0[2]; +aPolygon[4] = aPol0[1]; } -tools::Rectangle aRectangle = svx::polygonToRectangle(aPol, maGeo); +tools::Rectangle aRectangle = svx::polygonToRectangle(aPolygon, maGeo); setRectangle(aRectangle); } -if (bRotate90) { -bool bRota90=maGeo.m_nRotationAngle.get() % 9000 ==0; -if (!bRota90) { // there's seems to be a rounding error occurring: correct it -Degree100 a=NormAngle36000(maGeo.m_nRotationAngle); -if (a<4500_deg100) a=0_deg100; -else if (a<13500_deg100) a=9000_deg100; -else if (a<22500_deg100) a=18000_deg100; -else if (a<31500_deg100) a=27000_deg100; -else a=0_deg100; -maGeo.m_nRotationAngle=a; +if (bRotate90) +{ +bool bRota90 = maGeo.m_nRotationAngle.get() % 9000 == 0; +if (!bRota90) +{ +// there's seems to be a rounding error occurring: correct it + +Degree100 angle = NormAngle36000(maGeo.m_nRotationAngle); +if (angle < 4500_deg100) +angle = 0_deg100; +else if (angle < 13500_deg100) +ang
core.git: include/static
include/static/unoembindhelpers/PrimaryBindings.hxx | 18 +- 1 file changed, 13 insertions(+), 5 deletions(-) New commits: commit f289fe3dca487c45417f7b40d51a4830f3369fb1 Author: Stephan Bergmann AuthorDate: Mon Feb 5 12:54:38 2024 +0100 Commit: Stephan Bergmann CommitDate: Tue Feb 6 08:07:09 2024 +0100 Prevent JS from creating css::uno::Sequence of negative size Change-Id: I2449723162744e9ce3cb3e3172ce8acae0adf4db Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162998 Tested-by: Jenkins Reviewed-by: Stephan Bergmann diff --git a/include/static/unoembindhelpers/PrimaryBindings.hxx b/include/static/unoembindhelpers/PrimaryBindings.hxx index 6f8005b1656c..61efaf01153b 100644 --- a/include/static/unoembindhelpers/PrimaryBindings.hxx +++ b/include/static/unoembindhelpers/PrimaryBindings.hxx @@ -52,6 +52,14 @@ template struct UnoInOutParam T value; }; +inline void checkSequenceSize(sal_Int32 size) +{ +if (size < 0) +{ +throw std::invalid_argument("negative size"); +} +} + template void checkSequenceAccess(css::uno::Sequence const& sequence, sal_Int32 index) { @@ -64,13 +72,13 @@ void checkSequenceAccess(css::uno::Sequence const& sequence, sal_Int32 index) template void registerSequence(char const* name) { emscripten::class_>(name) -.template constructor() +.constructor(+[](sal_Int32 size) { +checkSequenceSize(size); +return css::uno::Sequence(size); +}) .function("resize", +[](css::uno::Sequence& self, sal_Int32 size) { - if (size < 0) - { - throw std::invalid_argument("negative size"); - } + checkSequenceSize(size); self.realloc(size); }) .function("size", &css::uno::Sequence::getLength)
core.git: Branch 'libreoffice-24-2' - svgio/inc svgio/qa svgio/source
svgio/inc/svgstyleattributes.hxx |3 ++- svgio/qa/cppunit/SvgImportTest.cxx|6 +- svgio/qa/cppunit/data/tdf156834.svg |3 ++- svgio/source/svgreader/svgcharacternode.cxx |1 + svgio/source/svgreader/svgstyleattributes.cxx |4 5 files changed, 14 insertions(+), 3 deletions(-) New commits: commit 96cc4fa5c4ba0794ea8febb19c3a6b5b010a8528 Author: Xisco Fauli AuthorDate: Mon Feb 5 14:54:04 2024 +0100 Commit: Miklos Vajna CommitDate: Tue Feb 6 08:17:40 2024 +0100 tdf#159566: match 'central' dominant-baseline to 'middle' Inkscape also does it the same way Change-Id: I3e1cea091e7314886bbc9135c55698892239bec7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163006 Tested-by: Jenkins Reviewed-by: Xisco Fauli (cherry picked from commit 358061b4a480ea763ea541094cef2112f917eb93) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163013 Reviewed-by: Miklos Vajna diff --git a/svgio/inc/svgstyleattributes.hxx b/svgio/inc/svgstyleattributes.hxx index 60781942667b..4516773e83a6 100644 --- a/svgio/inc/svgstyleattributes.hxx +++ b/svgio/inc/svgstyleattributes.hxx @@ -166,7 +166,8 @@ namespace svgio::svgreader { Auto, Middle, -Hanging +Hanging, +Central }; enum class Visibility diff --git a/svgio/qa/cppunit/SvgImportTest.cxx b/svgio/qa/cppunit/SvgImportTest.cxx index d99e56bfef35..9324ad1b1849 100644 --- a/svgio/qa/cppunit/SvgImportTest.cxx +++ b/svgio/qa/cppunit/SvgImportTest.cxx @@ -764,7 +764,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf156834) CPPUNIT_ASSERT (pDocument); -assertXPath(pDocument, "/primitive2D/transform/textsimpleportion"_ostr, 3); +assertXPath(pDocument, "/primitive2D/transform/textsimpleportion"_ostr, 4); assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "text"_ostr, "Auto"); assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "x"_ostr, "30"); assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "y"_ostr, "20"); @@ -776,6 +776,10 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf156834) assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[3]"_ostr, "text"_ostr, "Hanging"); assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[3]"_ostr, "x"_ostr, "30"); assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[3]"_ostr, "y"_ostr, "94"); + +assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[4]"_ostr, "text"_ostr, "Central"); +assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[4]"_ostr, "x"_ostr, "30"); +assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[4]"_ostr, "y"_ostr, "116"); } CPPUNIT_TEST_FIXTURE(Test, testTdf104339) diff --git a/svgio/qa/cppunit/data/tdf156834.svg b/svgio/qa/cppunit/data/tdf156834.svg index 74dc1548186e..0ef81f9a6acf 100644 --- a/svgio/qa/cppunit/data/tdf156834.svg +++ b/svgio/qa/cppunit/data/tdf156834.svg @@ -1,7 +1,8 @@ http://www.w3.org/2000/svg";> - + Auto Middle Hanging + Central diff --git a/svgio/source/svgreader/svgcharacternode.cxx b/svgio/source/svgreader/svgcharacternode.cxx index 7d5a2fcb9feb..02bc3911a3b8 100644 --- a/svgio/source/svgreader/svgcharacternode.cxx +++ b/svgio/source/svgreader/svgcharacternode.cxx @@ -287,6 +287,7 @@ namespace svgio::svgreader switch(aDominantBaseline) { case DominantBaseline::Middle: +case DominantBaseline::Central: { aPosition.setY(aPosition.getY() - aRange.getCenterY()); break; diff --git a/svgio/source/svgreader/svgstyleattributes.cxx b/svgio/source/svgreader/svgstyleattributes.cxx index 869b071dade7..731df59aeebf 100644 --- a/svgio/source/svgreader/svgstyleattributes.cxx +++ b/svgio/source/svgreader/svgstyleattributes.cxx @@ -1969,6 +1969,10 @@ namespace svgio::svgreader { setDominantBaseline(DominantBaseline::Hanging); } +else if(o3tl::equalsIgnoreAsciiCase(o3tl::trim(aContent), u"central")) +{ +setDominantBaseline(DominantBaseline::Central); +} else { // no DominantBaseline