From 7a896f183dca54aa9d8529f5797920cf629f9210 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Sat, 31 Oct 2020 22:04:03 +0200 Subject: use officecfg for Experimental flag move IsShowOutlineContentVisibilityButton out of header to avoid having to add extra include paths to all the unit test makefiles. Change-Id: I2763390e07cd85b8f09b6f2ad7702039daecb22f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105100 Tested-by: Jenkins Reviewed-by: Noel Grandin --- starmath/inc/edit.hxx | 2 +- starmath/inc/view.hxx | 6 ++---- starmath/source/edit.cxx | 3 +-- starmath/source/view.cxx | 9 +++++---- 4 files changed, 9 insertions(+), 11 deletions(-) (limited to 'starmath') diff --git a/starmath/inc/edit.hxx b/starmath/inc/edit.hxx index 43ef648ddd95..421554834314 100644 --- a/starmath/inc/edit.hxx +++ b/starmath/inc/edit.hxx @@ -123,7 +123,7 @@ public: void DeleteEditView(); bool HandleWheelCommands(const CommandEvent& rCEvt); - bool IsInlineEditEnabled(); + static bool IsInlineEditEnabled(); void StartCursorMove(); // for Accessibility diff --git a/starmath/inc/view.hxx b/starmath/inc/view.hxx index eab940b2ed86..ee4e17b10767 100644 --- a/starmath/inc/view.hxx +++ b/starmath/inc/view.hxx @@ -30,7 +30,6 @@ #include #include #include -#include #include #include "document.hxx" #include "edit.hxx" @@ -108,7 +107,7 @@ private: using Window::SetCursor; void SetCursor(const SmNode *pNode); void SetCursor(const tools::Rectangle &rRect); - bool IsInlineEditEnabled() const; + static bool IsInlineEditEnabled(); virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&) override; virtual void KeyInput(const KeyEvent& rKEvt) override; @@ -213,7 +212,6 @@ class SmViewShell: public SfxViewShell { std::unique_ptr mpDocInserter; std::unique_ptr mpRequest; - SvtMiscOptions maOpts; VclPtr mpGraphic; SmGraphicController maGraphicController; OUString maStatusText; @@ -309,7 +307,7 @@ public: void SetInsertIntoEditWindow(bool bEditWindowHadFocusLast){ mbInsertIntoEditWindow = bEditWindowHadFocusLast; } - bool IsInlineEditEnabled() const; + static bool IsInlineEditEnabled(); private: void ZoomByItemSet(const SfxItemSet *pSet); diff --git a/starmath/source/edit.cxx b/starmath/source/edit.cxx index ef1da5bca1ab..a425e20f4b0e 100644 --- a/starmath/source/edit.cxx +++ b/starmath/source/edit.cxx @@ -68,8 +68,7 @@ void SmGetLeftSelectionPart(const ESelection &rSel, bool SmEditWindow::IsInlineEditEnabled() { - SmViewShell *pView = GetView(); - return pView && pView->IsInlineEditEnabled(); + return SmViewShell::IsInlineEditEnabled(); } diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx index b76012a6b084..638a41b2daa2 100644 --- a/starmath/source/view.cxx +++ b/starmath/source/view.cxx @@ -28,6 +28,7 @@ #include #include #include +#include #include #include #include @@ -204,9 +205,9 @@ void SmGraphicWindow::MouseMove(const MouseEvent &rMEvt) } } -bool SmGraphicWindow::IsInlineEditEnabled() const +bool SmGraphicWindow::IsInlineEditEnabled() { - return pViewShell->IsInlineEditEnabled(); + return SmViewShell::IsInlineEditEnabled(); } void SmGraphicWindow::GetFocus() @@ -1983,9 +1984,9 @@ void SmViewShell::Notify( SfxBroadcaster& , const SfxHint& rHint ) } } -bool SmViewShell::IsInlineEditEnabled() const +bool SmViewShell::IsInlineEditEnabled() { - return maOpts.IsExperimentalMode(); + return officecfg::Office::Common::Misc::ExperimentalMode::get(); } void SmViewShell::ZoomByItemSet(const SfxItemSet *pSet) -- cgit