diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2022-03-09 20:51:34 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2022-03-10 08:17:20 +0100 |
commit | f5089e745367e111fb02c493c8c90e96a29e199c (patch) | |
tree | f516f5c9d672f40ab8c2a7a9e6ba097efb8a7eae /svx | |
parent | 51fb84829afbc1c0957fd1a489085613ad199f1a (diff) |
sd theme: add PPTX import for shape fill color
The theme index is typically not a direct property, but comes from style
-> fillref -> theme index, so support that.
Change-Id: I00733db44bb5321019bbc7337d10feb0a34661a2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131268
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/qa/unit/styles.cxx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/svx/qa/unit/styles.cxx b/svx/qa/unit/styles.cxx index 3881fe1d1006..3bfa6d8cf09b 100644 --- a/svx/qa/unit/styles.cxx +++ b/svx/qa/unit/styles.cxx @@ -93,8 +93,11 @@ CPPUNIT_TEST_FIXTURE(Test, testThemeChange) uno::Reference<beans::XPropertySet> xShape4(xDrawPageShapes->getByIndex(4), uno::UNO_QUERY); // Blue. CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0x4472c4), GetShapeFillColor(xShape4)); - // Set theme index to accent 1 till PPTX import is missing. - xShape4->setPropertyValue("FillColorTheme", uno::makeAny(static_cast<sal_Int16>(4))); + // The theme index of this filled shape is set by the PPTX import: + sal_Int32 nColorTheme = -1; + xShape4->getPropertyValue("FillColorTheme") >>= nColorTheme; + // 4 means accent1, this was -1 without the PPTX import bit in place. + CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(4), nColorTheme); // When changing the master slide of slide 1 to use the theme of the second master slide: uno::Reference<drawing::XMasterPageTarget> xDrawPage2( |