summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorParis Oplopoios <paris.oplopoios@collabora.com>2023-10-13 15:55:51 +0300
committerParis Oplopoios <parisoplop@gmail.com>2023-10-16 10:41:57 +0200
commitcfba837abe3137b2bb20ddb414bb91078c4a1c9f (patch)
tree8832758ab0f6efa6dfdefa15ff19d4b478f67260 /sw
parent33ade4171a1a443fd24e6463a9eaa279f7d778bb (diff)
Revert "Make sure views get new themes on .uno:ChangeTheme"
Seems to cause more issues than it solves, reverting for now This reverts commit 884fd220d0025a92510d3ff4710c8c517c8f271e. Change-Id: If32a9d3bd922afe5611e5258987eec9ec685bc8e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157951 Tested-by: Jenkins Reviewed-by: Paris Oplopoios <parisoplop@gmail.com>
Diffstat (limited to 'sw')
-rw-r--r--sw/inc/view.hxx2
-rw-r--r--sw/inc/viewopt.hxx2
-rw-r--r--sw/source/core/view/vnew.cxx17
-rw-r--r--sw/source/uibase/uiview/viewprt.cxx14
4 files changed, 2 insertions, 33 deletions
diff --git a/sw/inc/view.hxx b/sw/inc/view.hxx
index c6add7e23364..c5967bb4e213 100644
--- a/sw/inc/view.hxx
+++ b/sw/inc/view.hxx
@@ -679,8 +679,6 @@ public:
void NotifyCursor(SfxViewShell* pViewShell) const override;
/// See SfxViewShell::GetColorConfigColor().
::Color GetColorConfigColor(svtools::ColorConfigEntry nColorType) const override;
- /// See SfxViewShell::GetColorConfigName().
- OUString GetColorConfigName() const override;
void ShowUIElement(const OUString& sElementURL) const;
diff --git a/sw/inc/viewopt.hxx b/sw/inc/viewopt.hxx
index b5bf16b5ca22..3c847acfd6fe 100644
--- a/sw/inc/viewopt.hxx
+++ b/sw/inc/viewopt.hxx
@@ -851,7 +851,7 @@ public:
inline bool SwViewOption::operator==( const SwViewOption &rOpt ) const
{
- return IsEqualFlags( rOpt ) && m_nZoom == rOpt.GetZoom() && m_aColorConfig == rOpt.m_aColorConfig && m_sThemeName == rOpt.m_sThemeName;
+ return IsEqualFlags( rOpt ) && m_nZoom == rOpt.GetZoom() && m_aColorConfig == rOpt.m_aColorConfig;
}
inline void SwViewOption::SetUIOptions( const SwViewOption& rVOpt )
diff --git a/sw/source/core/view/vnew.cxx b/sw/source/core/view/vnew.cxx
index e6d8675d6ce6..613a15df633b 100644
--- a/sw/source/core/view/vnew.cxx
+++ b/sw/source/core/view/vnew.cxx
@@ -42,7 +42,6 @@
#include <ndgrf.hxx>
#include <ndindex.hxx>
#include <accessibilityoptions.hxx>
-#include <comphelper/lok.hxx>
void SwViewShell::Init( const SwViewOption *pNewOpt )
{
@@ -249,21 +248,7 @@ SwViewShell::SwViewShell( SwViewShell& rShell, vcl::Window *pWindow,
bool bModified = mxDoc->getIDocumentState().IsModified();
OutputDevice* pOrigOut = mpOut;
-
- SwViewOption aNewOpt;
-
- if ( rShell.GetViewOptions() )
- {
- aNewOpt = *rShell.GetViewOptions();
- }
-
- if ( comphelper::LibreOfficeKit::isActive() )
- {
- // Do not copy the color config in tiled rendering
- aNewOpt.SetThemeName("Default");
- }
-
- Init( &aNewOpt ); // might change Outdev (InitPrt())
+ Init( rShell.GetViewOptions() ); // might change Outdev (InitPrt())
mpOut = pOrigOut;
if ( mbPreview )
diff --git a/sw/source/uibase/uiview/viewprt.cxx b/sw/source/uibase/uiview/viewprt.cxx
index 92ae55feb08a..bc9c5e19b840 100644
--- a/sw/source/uibase/uiview/viewprt.cxx
+++ b/sw/source/uibase/uiview/viewprt.cxx
@@ -316,20 +316,6 @@ void SwView::NotifyCursor(SfxViewShell* pViewShell) const
return {};
}
-OUString SwView::GetColorConfigName() const
-{
- if (const SwViewOption* pViewOptions = GetWrtShell().GetViewOptions())
- {
- return pViewOptions->GetThemeName();
- }
- else
- {
- SAL_WARN("sw", "GetViewOptions() returned nullptr");
- }
-
- return {};
-}
-
// Create page printer/additions for SwView and SwPagePreview
std::unique_ptr<SfxTabPage> CreatePrintOptionsPage(weld::Container* pPage, weld::DialogController* pController,