summaryrefslogtreecommitdiff
path: root/starmath
diff options
context:
space:
mode:
authorKhaled Hosny <khaled@libreoffice.org>2023-09-12 16:41:37 +0300
committerخالد حسني <khaled@libreoffice.org>2023-09-13 12:54:14 +0200
commite9cc014be4150a5adc9950f366c9bdfa50420dcf (patch)
tree6c1ae1583321fcc6aa7b7662111e88528a8c7546 /starmath
parent5f3031b33a16cf11045006616b01dd89d6d59a32 (diff)
starmath: Hide editing window by default and add a menu item to show
We are enabling inline editing bu default, so this window is of no interest by default. Change-Id: I66fe988790fe4f174f6cb4f691af69888b0b05b5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156852 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@libreoffice.org>
Diffstat (limited to 'starmath')
-rw-r--r--starmath/sdi/smslots.sdi4
-rw-r--r--starmath/source/view.cxx16
-rw-r--r--starmath/uiconfig/smath/menubar/menubar.xml1
3 files changed, 19 insertions, 2 deletions
diff --git a/starmath/sdi/smslots.sdi b/starmath/sdi/smslots.sdi
index 3f998e8b182b..64586466cea1 100644
--- a/starmath/sdi/smslots.sdi
+++ b/starmath/sdi/smslots.sdi
@@ -265,8 +265,8 @@ interface FormulaView
//idlpp no menu entry, so no texts
SID_CMDBOXWINDOW //idlpp ole : no , status : no
[
- ExecMethod = NoExec ;
- StateMethod = NoState ;
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
]
SID_ELEMENTSDOCKINGWINDOW
[
diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx
index c9a6303ba0e1..eb7074c2d811 100644
--- a/starmath/source/view.cxx
+++ b/starmath/source/view.cxx
@@ -2039,6 +2039,13 @@ void SmViewShell::Execute(SfxRequest& rReq)
}
break;
+ case SID_CMDBOXWINDOW:
+ {
+ GetViewFrame().ToggleChildWindow(SID_CMDBOXWINDOW);
+ GetViewFrame().GetBindings().Invalidate(SID_CMDBOXWINDOW);
+ }
+ break;
+
case SID_UNICODE_NOTATION_TOGGLE:
{
EditEngine* pEditEngine = nullptr;
@@ -2202,6 +2209,15 @@ void SmViewShell::GetState(SfxItemSet &rSet)
rSet.Put(SfxBoolItem(SID_ELEMENTSDOCKINGWINDOW, bState));
}
break;
+ case SID_CMDBOXWINDOW:
+ {
+ bool bState = false;
+ auto pCmdWin = GetViewFrame().GetChildWindow(SID_CMDBOXWINDOW);
+ if (pCmdWin)
+ bState = pCmdWin->IsVisible();
+ rSet.Put(SfxBoolItem(SID_CMDBOXWINDOW, bState));
+ }
+ break;
case SID_ATTR_PARA_LEFT_TO_RIGHT:
rSet.Put(SfxBoolItem(nWh, !GetDoc()->GetFormat().IsRightToLeft()));
break;
diff --git a/starmath/uiconfig/smath/menubar/menubar.xml b/starmath/uiconfig/smath/menubar/menubar.xml
index b9ed1026283a..c3b7865f6449 100644
--- a/starmath/uiconfig/smath/menubar/menubar.xml
+++ b/starmath/uiconfig/smath/menubar/menubar.xml
@@ -87,6 +87,7 @@
<menu:menuitem menu:id=".uno:AvailableToolbars"/>
<menu:menuitem menu:id=".uno:StatusBarVisible"/>
<menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:CommandWindow"/>
<menu:menuitem menu:id=".uno:Sidebar"/>
<menu:menuitem menu:id=".uno:ElementsDockingWindow"/>
<menu:menuseparator/>