summaryrefslogtreecommitdiff
path: root/starmath
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2020-10-31 22:04:03 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-11-01 15:14:33 +0100
commit7a896f183dca54aa9d8529f5797920cf629f9210 (patch)
treec4475c2352c5dcab2521709db12199fa7084c2fb /starmath
parent9aa8552bf9168836662b45798e06de4b972550ed (diff)
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 <noel.grandin@collabora.co.uk>
Diffstat (limited to 'starmath')
-rw-r--r--starmath/inc/edit.hxx2
-rw-r--r--starmath/inc/view.hxx6
-rw-r--r--starmath/source/edit.cxx3
-rw-r--r--starmath/source/view.cxx9
4 files changed, 9 insertions, 11 deletions
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 <sfx2/ctrlitem.hxx>
#include <sfx2/shell.hxx>
#include <sfx2/viewfrm.hxx>
-#include <svtools/miscopt.hxx>
#include <vcl/timer.hxx>
#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<sfx2::DocumentInserter> mpDocInserter;
std::unique_ptr<SfxRequest> mpRequest;
- SvtMiscOptions maOpts;
VclPtr<SmGraphicWindow> 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 <comphelper/storagehelper.hxx>
#include <comphelper/string.hxx>
#include <i18nutil/unicode.hxx>
+#include <officecfg/Office/Common.hxx>
#include <sfx2/dispatch.hxx>
#include <sfx2/docfile.hxx>
#include <sfx2/docfilt.hxx>
@@ -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)