summaryrefslogtreecommitdiff
path: root/sd/qa
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2023-08-14 22:32:36 +0200
committerTomaž Vajngerl <quikee@gmail.com>2023-08-23 23:17:09 +0200
commitb5aaf194866c5e416167cb54d37f9f04dabc5375 (patch)
treedbcb9f88e6e7e6e269cdaf6fef518a26fef059b2 /sd/qa
parent37203cb43758048134584f7d52efbc9b3dc59f65 (diff)
sd: change fill/line theme colors for graphic styles on theme change
Change-Id: Ieeb425519e805160bf6726a64086508290f9d521 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155684 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'sd/qa')
-rw-r--r--sd/qa/unit/ThemeTest.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/sd/qa/unit/ThemeTest.cxx b/sd/qa/unit/ThemeTest.cxx
index 65c261f23700..1b4f24249b9b 100644
--- a/sd/qa/unit/ThemeTest.cxx
+++ b/sd/qa/unit/ThemeTest.cxx
@@ -67,6 +67,10 @@ CPPUNIT_TEST_FIXTURE(ThemeTest, testThemeChange)
// Given a document, with a first slide and blue shape text from theme:
loadFromURL(u"theme.pptx");
+ SdXImpressDocument* pXImpressDocument = dynamic_cast<SdXImpressDocument*>(mxComponent.get());
+ CPPUNIT_ASSERT(pXImpressDocument);
+ auto* pDocShell = pXImpressDocument->GetDocShell();
+
uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY);
// The draw page also contains a group shape to make sure we don't crash on group shapes.
uno::Reference<drawing::XMasterPageTarget> xDrawPage(
@@ -131,7 +135,7 @@ CPPUNIT_TEST_FIXTURE(ThemeTest, testThemeChange)
auto* pMasterPage = GetSdrPageFromXDrawPage(xDrawPageMaster);
auto pTheme = pMasterPage->getSdrPageProperties().GetTheme();
- sd::ThemeColorChanger aChanger(pMasterPage);
+ sd::ThemeColorChanger aChanger(pMasterPage, pDocShell);
aChanger.apply(pTheme->getColorSet());
// Then make sure the shape text color is now green: