summaryrefslogtreecommitdiff
path: root/sc/source/filter/oox
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2023-08-26 15:35:40 +0200
committerTomaž Vajngerl <quikee@gmail.com>2023-08-27 12:15:14 +0200
commitd150b7a60d7be4b09a838ae4c038e78509f75126 (patch)
tree61aaf42cd7f8698415beed1bf51a71c0b6f5865d /sc/source/filter/oox
parent8496f805da8ea9f2585b7485b448dda52557db9a (diff)
Change theme location to SdrModel and SdrPage (master page only)
In Writer and Calc we only have one theme per document, so the theme can be stored inside the SdrModel. For Imporess/Draw the theme is defined per master page, so it needs to be stored on the master page. This changes the implementation to reflect that. In addition refactor all the usages in writer and calc to get and set the theme to SdrModel, when needed and rename the methods on the SdrPageProperties from {Get,Set}Theme to {get,set}Theme. Change-Id: I0cc3b332c029c28d15f8cda748c578c2a54a5c61 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156128 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'sc/source/filter/oox')
-rw-r--r--sc/source/filter/oox/workbookfragment.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/sc/source/filter/oox/workbookfragment.cxx b/sc/source/filter/oox/workbookfragment.cxx
index 20e595ee6e65..97cc3ca9d1f0 100644
--- a/sc/source/filter/oox/workbookfragment.cxx
+++ b/sc/source/filter/oox/workbookfragment.cxx
@@ -487,10 +487,9 @@ void WorkbookFragment::finalizeImport()
// load all worksheets
importSheetFragments(*this, aSheetFragments);
- SdrPage* pPage = pModel->GetPage(0);
- if (pPage && pTheme && !pTheme->GetName().isEmpty())
+ if (pTheme && !pTheme->GetName().isEmpty())
{
- pPage->getSdrPageProperties().SetTheme(pTheme);
+ pModel->setTheme(pTheme);
}
// assumes getTables().finalizeImport ( which creates the DatabaseRanges )