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>
This commit is contained in:
@@ -128,6 +128,11 @@
|
||||
<value>1</value>
|
||||
</prop>
|
||||
</node>
|
||||
<node oor:name=".uno:CommandWindow" oor:op="replace">
|
||||
<prop oor:name="Label" oor:type="xs:string">
|
||||
<value xml:lang="en-US">Command Window</value>
|
||||
</prop>
|
||||
</node>
|
||||
<node oor:name=".uno:ElementsDockingWindow" oor:op="replace">
|
||||
<prop oor:name="Label" oor:type="xs:string">
|
||||
<value xml:lang="en-US">Elements</value>
|
||||
|
||||
@@ -45,6 +45,12 @@
|
||||
<value>true</value>
|
||||
</prop>
|
||||
</node>
|
||||
<!-- SID_CMDBOXWINDOW -->
|
||||
<node oor:name="smath/30378" oor:op="replace">
|
||||
<prop oor:name="Visible" oor:type="xs:boolean">
|
||||
<value>false</value>
|
||||
</prop>
|
||||
</node>
|
||||
<node oor:name="swriter/10336" oor:op="replace">
|
||||
<prop oor:name="Visible" oor:type="xs:boolean">
|
||||
<value>true</value>
|
||||
|
||||
@@ -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
|
||||
[
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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/>
|
||||
|
||||
@@ -19,6 +19,7 @@ class SimpleMathTest(UITestCase):
|
||||
def test_math_unoCommand(self):
|
||||
with self.ui_test.create_doc_in_start_center("math"):
|
||||
|
||||
self.xUITest.executeCommand(".uno:CommandWindow")
|
||||
xMathDoc = self.xUITest.getTopFocusWindow()
|
||||
|
||||
# tdf#140386
|
||||
@@ -27,10 +28,12 @@ class SimpleMathTest(UITestCase):
|
||||
xEditView = xMathDoc.getChild("editview")
|
||||
|
||||
self.assertEqual("backepsilon", get_state_as_dict(xEditView)["Text"])
|
||||
self.xUITest.executeCommand(".uno:CommandWindow")
|
||||
|
||||
def test_math_edit(self):
|
||||
with self.ui_test.create_doc_in_start_center("math"):
|
||||
|
||||
self.xUITest.executeCommand(".uno:CommandWindow")
|
||||
xMathDoc = self.xUITest.getTopFocusWindow()
|
||||
|
||||
xEditView = xMathDoc.getChild("editview")
|
||||
@@ -38,10 +41,12 @@ class SimpleMathTest(UITestCase):
|
||||
type_text(xEditView, "E=mc^2")
|
||||
|
||||
self.assertEqual("E=mc^2", get_state_as_dict(xEditView)["Text"])
|
||||
self.xUITest.executeCommand(".uno:CommandWindow")
|
||||
|
||||
def test_complete_math(self):
|
||||
with self.ui_test.create_doc_in_start_center("math"):
|
||||
|
||||
self.xUITest.executeCommand(".uno:CommandWindow")
|
||||
xMathDoc = self.xUITest.getTopFocusWindow()
|
||||
|
||||
xList = xMathDoc.getChild("categorylist")
|
||||
@@ -63,5 +68,6 @@ class SimpleMathTest(UITestCase):
|
||||
type_text(xEditView, "2")
|
||||
|
||||
self.assertEqual("{ 1 <> 2 }", get_state_as_dict(xEditView)["Text"])
|
||||
self.xUITest.executeCommand(".uno:CommandWindow")
|
||||
|
||||
# vim: set shiftwidth=4 softtabstop=4 expandtab:
|
||||
|
||||
@@ -20,6 +20,7 @@ class Tdf128610(UITestCase):
|
||||
|
||||
with self.ui_test.load_empty_file("math"):
|
||||
|
||||
self.xUITest.executeCommand(".uno:CommandWindow")
|
||||
self.xUITest.executeCommand('.uno:ImportMathMLClipboard')
|
||||
|
||||
xMathDoc = self.xUITest.getTopFocusWindow()
|
||||
@@ -28,5 +29,6 @@ class Tdf128610(UITestCase):
|
||||
# Without the fix in place, this test would have failed with
|
||||
# AssertionError: '{ f _ c = frac { 1 } { K _ m } }' != ''
|
||||
self.assertEqual("{ f _ c = { frac { 1 } { K _ m } } }", get_state_as_dict(xEditView)["Text"])
|
||||
self.xUITest.executeCommand(".uno:CommandWindow")
|
||||
|
||||
# vim: set shiftwidth=4 softtabstop=4 expandtab:
|
||||
|
||||
@@ -22,11 +22,13 @@ class Tdf147755(UITestCase):
|
||||
xOk = xDialog.getChild("ok")
|
||||
xOk.executeAction("CLICK", tuple())
|
||||
|
||||
self.xUITest.executeCommand(".uno:CommandWindow")
|
||||
xMathDoc = self.xUITest.getTopFocusWindow()
|
||||
xEditView = xMathDoc.getChild("editview")
|
||||
|
||||
# Without the fix in place, this test would have failed with
|
||||
# AssertionError: '%ALPHA' != ''
|
||||
self.assertEqual("%ALPHA", get_state_as_dict(xEditView)["Text"])
|
||||
self.xUITest.executeCommand(".uno:CommandWindow")
|
||||
|
||||
# vim: set shiftwidth=4 softtabstop=4 expandtab:
|
||||
|
||||
Reference in New Issue
Block a user