core.git: Branch 'distro/collabora/co-23.05' - include/svx sd/qa sd/source
include/svx/sdrmasterpagedescriptor.hxx |3 + include/svx/sdrpageuser.hxx |3 + include/svx/svdpage.hxx |1 sd/qa/unit/export-tests-ooxml3.cxx | 49 +++ sd/source/filter/eppt/pptx-epptooxml.cxx | 38 5 files changed, 86 insertions(+), 8 deletions(-) New commits: commit 2f73ddc64cbc429813a9b88a5f42c38420e20019 Author: Sarper Akdemir AuthorDate: Wed Mar 6 13:48:14 2024 +0300 Commit: Aron Budea CommitDate: Mon Mar 11 04:21:46 2024 +0100 tdf#159931: pptx export: export each used slide layout for a master attempts to fix the slideLayout reference related regression from Idb6b88ebe87a83818d8eb27a1fa087652a002c0c. To correctly export the all used slideLayout instances for a given master, iterate through sdr::PageUsers of that master and figure out all used layouts. Change-Id: I0f58befac1ba4d5ec01aeedbb5f611c83683dcf8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164468 Tested-by: Jenkins Reviewed-by: Balazs Varga Reviewed-by: Sarper Akdemir (cherry picked from commit a35831becee3781daf8628c48944660d31d84d8b) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164542 (cherry picked from commit a8f058e8ab02643ac2c8d6b6d8fcb3ab45fcf79f) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164640 Tested-by: Jenkins CollaboraOffice Reviewed-by: Aron Budea diff --git a/include/svx/sdrmasterpagedescriptor.hxx b/include/svx/sdrmasterpagedescriptor.hxx index d7eac22a1b5c..9be1e663bcff 100644 --- a/include/svx/sdrmasterpagedescriptor.hxx +++ b/include/svx/sdrmasterpagedescriptor.hxx @@ -22,6 +22,7 @@ #include #include +#include #include class SdrPageProperties; @@ -30,7 +31,7 @@ namespace sdr::contact { class ViewContact; } namespace sdr { -class MasterPageDescriptor final : public sdr::PageUser +class SVXCORE_DLLPUBLIC MasterPageDescriptor final : public sdr::PageUser { private: SdrPage&maOwnerPage; diff --git a/include/svx/sdrpageuser.hxx b/include/svx/sdrpageuser.hxx index 8c31a2936c7e..5557b2729777 100644 --- a/include/svx/sdrpageuser.hxx +++ b/include/svx/sdrpageuser.hxx @@ -21,6 +21,7 @@ #define INCLUDED_SVX_SDRPAGEUSER_HXX #include +#include class SdrPage; @@ -30,7 +31,7 @@ class SdrPage; namespace sdr { -class PageUser +class SVXCORE_DLLPUBLIC PageUser { public: // this method is called from the destructor of the referenced page. diff --git a/include/svx/svdpage.hxx b/include/svx/svdpage.hxx index 5b9ccd9e8f7a..58f8797393b7 100644 --- a/include/svx/svdpage.hxx +++ b/include/svx/svdpage.hxx @@ -397,6 +397,7 @@ private: public: void AddPageUser(sdr::PageUser& rNewUser); void RemovePageUser(sdr::PageUser& rOldUser); +const sdr::PageUserVector& GetPageUsers() const { return maPageUsers; }; // SdrModel access on SdrPage level SdrModel& getSdrModelFromSdrPage() const { return mrSdrModelFromSdrPage; } diff --git a/sd/qa/unit/export-tests-ooxml3.cxx b/sd/qa/unit/export-tests-ooxml3.cxx index dd0945bd4c40..a573ce27af33 100644 --- a/sd/qa/unit/export-tests-ooxml3.cxx +++ b/sd/qa/unit/export-tests-ooxml3.cxx @@ -135,6 +135,7 @@ public: void testLinkedOLE(); void testTdf102261_testParaTabStopDefaultDistance(); void testTableCellVerticalPropertyRoundtrip(); +void testTdf159931_slideLayouts(); CPPUNIT_TEST_SUITE(SdOOXMLExportTest3); @@ -231,6 +232,7 @@ public: CPPUNIT_TEST(testLinkedOLE); CPPUNIT_TEST(testTdf102261_testParaTabStopDefaultDistance); CPPUNIT_TEST(testTableCellVerticalPropertyRoundtrip); +CPPUNIT_TEST(testTdf159931_slideLayouts); CPPUNIT_TEST_SUITE_END(); virtual void registerNamespaces(xmlXPathContextPtr& pXmlXPathCtx) override @@ -2204,6 +2206,53 @@ void SdOOXMLExportTest3::testTableCellVerticalPropertyRoundtrip() assertXPath(pXml, "(//a:tcPr)[3]", "vert", "wordArtVert"); } +void SdOOXMLExportTest3::testTdf159931_slideLayouts() +{ +createSdImpressDoc("odp/repeatBitmapMode.odp"); +save("Impress Office Open XML"); + +xmlDocUniquePtr pXmlDocRels1 = parseExport("ppt/slides/_rels/slide1.xml.rels"); +xmlDocUniquePtr pXmlDocRels2 = parseExport("ppt/slides/_rels/slide2.xml.rels"); + +assertXPath(pXmlDocRels1, "(/rels:Relationships/rels:Relationship[@Type='http://; + "schemas.openxmlformats.org/officeDocument/2006/relationships/" + "slideLayout'])"); + +// the relative target e.g. "../slideLayouts/slideLayout2.xml" +OUString sRelativeLayoutPath1 += getXPathContent(pXmlDocRels1, "(/rels:Relationships/rels:Relationship[@Type='http://; + "schemas.openxmlformats.org/officeDocument/2006/" +
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - include/svx sd/qa sd/source svx/sdi
include/svx/svxids.hrc |6 ++-- sd/qa/unit/uiimpress.cxx | 54 - sd/source/ui/view/drtxtob1.cxx | 24 -- sd/source/ui/view/drviews2.cxx | 29 -- svx/sdi/svx.sdi|4 +-- 5 files changed, 42 insertions(+), 75 deletions(-) New commits: commit 43fe1db03512bccd0c36b7037172378c8965fda0 Author: Tomaž Vajngerl AuthorDate: Fri Aug 18 22:31:51 2023 +0200 Commit: Tomaž Vajngerl CommitDate: Mon Aug 28 18:09:50 2023 +0200 svx: remove theme related parameters for Color and FillColor For SvxColorItem, XFillColorItem, XLineColorItem,... we set the ComplexColor via the JSON additional UNO Command argument, so we don't need the parameters to set the theme color and LumOff and LumMod color modifiers for the UNO Command. Actually this has broken the setting the colors in certain situations, so we must remove this. Change-Id: Ic28aa1e43559d3627703d93c7c1bd9310a149986 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155864 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl (cherry picked from commit 6471181b66ebe634e9ffbdc2b55dbf1da17a3acf) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156172 Tested-by: Jenkins CollaboraOffice Reviewed-by: Ashod Nakashian diff --git a/include/svx/svxids.hrc b/include/svx/svxids.hrc index 90aae09d2c69..2f18af269fd1 100644 --- a/include/svx/svxids.hrc +++ b/include/svx/svxids.hrc @@ -450,9 +450,9 @@ class XFillGradientItem; #define SID_ATTR_TEXTCOLUMNS_SPACING( SID_SVX_START + 341 ) // FREE ( SID_SVX_START + 342 ) -#define SID_ATTR_COLOR_THEME_INDEX TypedWhichId( SID_SVX_START + 343 ) -#define SID_ATTR_COLOR_LUM_MOD TypedWhichId( SID_SVX_START + 344 ) -#define SID_ATTR_COLOR_LUM_OFF TypedWhichId( SID_SVX_START + 345 ) +// FREE ( SID_SVX_START + 343 ) +// FREE ( SID_SVX_START + 344 ) +// FREE ( SID_SVX_START + 345 ) #define SID_SB_CONNECTIONPOOLING( SID_SVX_START + 348 ) #define SID_SB_DBREGISTEROPTIONS( SID_SVX_START + 349 ) diff --git a/sd/qa/unit/uiimpress.cxx b/sd/qa/unit/uiimpress.cxx index fc75ec4727eb..7baaf08490e7 100644 --- a/sd/qa/unit/uiimpress.cxx +++ b/sd/qa/unit/uiimpress.cxx @@ -47,6 +47,7 @@ #include #include #include +#include #include #include @@ -1012,14 +1013,23 @@ CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testCharColorTheme) Scheduler::ProcessEventsToIdle(); // When picking a theme color on the sidebar: -uno::Sequence aColorArgs = { -comphelper::makePropertyValue("Color", static_cast(0xdae3f3)), // 80% light blue -comphelper::makePropertyValue("ColorThemeIndex", static_cast(4)), // accent 1 -comphelper::makePropertyValue("ColorLumMod", static_cast(2000)), -comphelper::makePropertyValue("ColorLumOff", static_cast(8000)), -}; -dispatchCommand(mxComponent, ".uno:Color", aColorArgs); -Scheduler::ProcessEventsToIdle(); +{ +model::ComplexColor aComplexColor; +aComplexColor.setThemeColor(model::ThemeColorType::Accent1); +aComplexColor.addTransformation({ model::TransformationType::LumMod, 2000 }); +aComplexColor.addTransformation({ model::TransformationType::LumOff, 8000 }); + +OUString aJSON += OStringToOUString(model::color::convertToJSON(aComplexColor), RTL_TEXTENCODING_UTF8); + +// When setting the fill color of that shape, with theme metadata & effects: +uno::Sequence aColorArgs = { +comphelper::makePropertyValue("Color.Color", sal_Int32(0xdae3f3)), // 80% light blue +comphelper::makePropertyValue("Color.ComplexColorJSON", uno::Any(aJSON)), +}; +dispatchCommand(mxComponent, ".uno:Color", aColorArgs); +Scheduler::ProcessEventsToIdle(); +} // Then make sure the theme "metadata" is set in the document model: pView->EndTextEditCurrentView(); @@ -1057,15 +1067,25 @@ CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testFillColorTheme) uno::UNO_QUERY); xController->select(uno::Any(xShape)); -// When setting the fill color of that shape, with theme metadata & effects: -uno::Sequence aColorArgs = { -comphelper::makePropertyValue("FillColor", static_cast(0xed7d31)), // orange -comphelper::makePropertyValue("ColorThemeIndex", static_cast(4)), // accent 1 -comphelper::makePropertyValue("ColorLumMod", static_cast(4000)), -comphelper::makePropertyValue("ColorLumOff", static_cast(6000)), -}; -dispatchCommand(mxComponent,