summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2023-01-27 08:41:16 +0900
committerTomaž Vajngerl <quikee@gmail.com>2023-01-27 03:22:22 +0000
commitc9fb441c55d03f55877ed3bb2f5c39310d1ec44b (patch)
treefb40c02e666cabb8cb218a0b39dba8d4a3a19106 /sw/source
parent69c6f7bccec838b7288a25a29a83b7f782ba7586 (diff)
move Theme class to own file inside docmodel
Also move Theme from svx to model namespace so it is consistent with other classes in docmodel. Theme header also includes ThemeSupplementalFont, ThemeFont, FontScheme classes that are used by the Theme and were also moved to docmodel. These may be moved to its own file in the future when they are used in more places. Change-Id: Ic409bea8e5298adc2b039b529c4f7b01cf64f03e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146221 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/core/model/ThemeColorChanger.cxx4
-rw-r--r--sw/source/filter/xml/xmlfmte.cxx2
-rw-r--r--sw/source/uibase/app/docst.cxx4
-rw-r--r--sw/source/uibase/shells/basesh.cxx4
-rw-r--r--sw/source/uibase/sidebar/ThemePanel.cxx4
5 files changed, 9 insertions, 9 deletions
diff --git a/sw/source/core/model/ThemeColorChanger.cxx b/sw/source/core/model/ThemeColorChanger.cxx
index 715c02e68b63..589ca7e8cc17 100644
--- a/sw/source/core/model/ThemeColorChanger.cxx
+++ b/sw/source/core/model/ThemeColorChanger.cxx
@@ -151,14 +151,14 @@ void ThemeColorChanger::apply(model::ColorSet const& rColorSet)
pDocument->GetIDocumentUndoRedo().StartUndo(SwUndoId::EMPTY, nullptr);
SdrPage* pPage = pDocument->getIDocumentDrawModelAccess().GetDrawModel()->GetPage(0);
- svx::Theme* pTheme = pPage->getSdrPageProperties().GetTheme();
+ model::Theme* pTheme = pPage->getSdrPageProperties().GetTheme();
if (pTheme)
{
pTheme->SetColorSet(std::make_unique<model::ColorSet>(rColorSet));
}
else
{
- pPage->getSdrPageProperties().SetTheme(std::make_unique<svx::Theme>("Office"));
+ pPage->getSdrPageProperties().SetTheme(std::make_unique<model::Theme>("Office"));
pTheme = pPage->getSdrPageProperties().GetTheme();
pTheme->SetColorSet(std::make_unique<model::ColorSet>(rColorSet));
}
diff --git a/sw/source/filter/xml/xmlfmte.cxx b/sw/source/filter/xml/xmlfmte.cxx
index f3c4ca04ddfd..4392158ebccd 100644
--- a/sw/source/filter/xml/xmlfmte.cxx
+++ b/sw/source/filter/xml/xmlfmte.cxx
@@ -43,10 +43,10 @@
#include <sax/tools/converter.hxx>
#include <o3tl/enumrange.hxx>
-#include <svx/ColorSets.hxx>
#include <svx/unoapi.hxx>
#include <svx/svdpage.hxx>
#include <docmodel/theme/ThemeColor.hxx>
+#include <docmodel/theme/Theme.hxx>
using namespace ::com::sun::star::beans;
diff --git a/sw/source/uibase/app/docst.cxx b/sw/source/uibase/app/docst.cxx
index e3cc7b0f6b6e..b11599e576d5 100644
--- a/sw/source/uibase/app/docst.cxx
+++ b/sw/source/uibase/app/docst.cxx
@@ -81,7 +81,7 @@
#include <SwUndoFmt.hxx>
#include <strings.hrc>
#include <AccessibilityCheck.hxx>
-#include <svx/ColorSets.hxx>
+#include <docmodel/theme/Theme.hxx>
#include <svx/svdpage.hxx>
using namespace ::com::sun::star;
@@ -1582,7 +1582,7 @@ std::vector<Color> SwDocShell::GetThemeColors()
SdrPage* pPage = m_xDoc->getIDocumentDrawModelAccess().GetDrawModel()->GetPage(0);
if (!pPage)
return {};
- svx::Theme* pTheme = pPage->getSdrPageProperties().GetTheme();
+ model::Theme* pTheme = pPage->getSdrPageProperties().GetTheme();
if (!pTheme)
return {};
return pTheme->GetColors();
diff --git a/sw/source/uibase/shells/basesh.cxx b/sw/source/uibase/shells/basesh.cxx
index eb071c1d4bfb..3fb250b658eb 100644
--- a/sw/source/uibase/shells/basesh.cxx
+++ b/sw/source/uibase/shells/basesh.cxx
@@ -2217,7 +2217,7 @@ void SwBaseShell::GetState( SfxItemSet &rSet )
SdrPage* pPage = pDocument->getIDocumentDrawModelAccess().GetDrawModel()->GetPage(0);
if (pPage)
{
- svx::Theme* pTheme = pPage->getSdrPageProperties().GetTheme();
+ model::Theme* pTheme = pPage->getSdrPageProperties().GetTheme();
if (pTheme)
bDisable = false;
}
@@ -3058,7 +3058,7 @@ void SwBaseShell::ExecDlg(SfxRequest &rReq)
if (pDocumentShell)
{
SdrPage* pPage = pDocument->getIDocumentDrawModelAccess().GetDrawModel()->GetPage(0);
- svx::Theme* pTheme = pPage->getSdrPageProperties().GetTheme();
+ model::Theme* pTheme = pPage->getSdrPageProperties().GetTheme();
if (pTheme)
{
std::shared_ptr<svx::IThemeColorChanger> pChanger(new sw::ThemeColorChanger(pDocumentShell));
diff --git a/sw/source/uibase/sidebar/ThemePanel.cxx b/sw/source/uibase/sidebar/ThemePanel.cxx
index d2c225c171c3..6a2647ebbbee 100644
--- a/sw/source/uibase/sidebar/ThemePanel.cxx
+++ b/sw/source/uibase/sidebar/ThemePanel.cxx
@@ -18,8 +18,8 @@
#include <ThemeColorChanger.hxx>
#include <vcl/settings.hxx>
#include <vcl/svapp.hxx>
+#include <docmodel/theme/Theme.hxx>
#include <svx/svdpage.hxx>
-#include <svx/ColorSets.hxx>
#include <svx/dialog/ThemeColorValueSet.hxx>
#include <com/sun/star/lang/IllegalArgumentException.hpp>
@@ -54,7 +54,7 @@ ThemePanel::ThemePanel(weld::Widget* pParent)
if (pDocument)
{
SdrPage* pPage = pDocument->getIDocumentDrawModelAccess().GetDrawModel()->GetPage(0);
- svx::Theme* pTheme = pPage->getSdrPageProperties().GetTheme();
+ model::Theme* pTheme = pPage->getSdrPageProperties().GetTheme();
if (pTheme)
maColorSets.insert(*pTheme->GetColorSet());
}