summaryrefslogtreecommitdiff
path: root/sw/qa/core
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2023-02-07 16:13:27 +0900
committerTomaž Vajngerl <quikee@gmail.com>2023-03-01 00:29:23 +0000
commit4a7a89b97b0b6464f8375926d98044634d06b4ee (patch)
tree669bc858797ac675acebd6ee526dd5ef9213df9e /sw/qa/core
parent1309e6332d7ff2bd1f9b6bf87385b8b570e59158 (diff)
create a default theme when SdrPage and SdrModel are created
For a document it is expected that it always has a theme available so we need to create a theme with some default attributes set (a default color scheme for now) when we create a SdrModel and SdrPage (only for Writer currently). This also changes some ColorSets, SdrPage, SdrModel methods, to use better return types (cost& instead of raw pointers and vice versa depending on the use case). Change-Id: I874247784b845109e42567e3f45647dda46ccf3b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146816 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'sw/qa/core')
-rw-r--r--sw/qa/core/theme/ThemeTest.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sw/qa/core/theme/ThemeTest.cxx b/sw/qa/core/theme/ThemeTest.cxx
index e3ed5548f528..5c95de1e7c38 100644
--- a/sw/qa/core/theme/ThemeTest.cxx
+++ b/sw/qa/core/theme/ThemeTest.cxx
@@ -49,7 +49,7 @@ CPPUNIT_TEST_FIXTURE(SwCoreThemeTest, testDrawPageThemeExistsDOCX)
CPPUNIT_ASSERT(pDoc);
SdrPage* pPage = pDoc->getIDocumentDrawModelAccess().GetDrawModel()->GetPage(0);
- model::Theme* pTheme = pPage->getSdrPageProperties().GetTheme();
+ auto const& pTheme = pPage->getSdrPageProperties().GetTheme();
CPPUNIT_ASSERT(pTheme);
CPPUNIT_ASSERT_EQUAL(OUString(u"Office Theme"), pTheme->GetName());
@@ -90,7 +90,7 @@ CPPUNIT_TEST_FIXTURE(SwCoreThemeTest, testDrawPageThemeExistsODT)
CPPUNIT_ASSERT(pDoc);
SdrPage* pPage = pDoc->getIDocumentDrawModelAccess().GetDrawModel()->GetPage(0);
- model::Theme* pTheme = pPage->getSdrPageProperties().GetTheme();
+ auto const& pTheme = pPage->getSdrPageProperties().GetTheme();
CPPUNIT_ASSERT(pTheme);
CPPUNIT_ASSERT_EQUAL(OUString(u"Office Theme"), pTheme->GetName());