starmath/sdi/smslots.sdi | 5 +++++ starmath/source/view.cxx | 25 +++++++++++++++++++++++++ starmath/uiconfig/smath/menubar/menubar.xml | 1 + 3 files changed, 31 insertions(+)
New commits: commit 6ae1c47fa1033619bf191a0f4228394ff90f5df6 Author: Khaled Hosny <[email protected]> AuthorDate: Wed Sep 20 11:28:38 2023 +0300 Commit: خالد حسني <[email protected]> CommitDate: Wed Sep 20 12:21:43 2023 +0200 tdf#32418: Add Tools -> Special Character... to Math Change-Id: I0f4e12f82a3b8e7be2459f4ccfa91f7d30d67f78 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157095 Tested-by: Jenkins Reviewed-by: خالد حسني <[email protected]> diff --git a/starmath/sdi/smslots.sdi b/starmath/sdi/smslots.sdi index 64586466cea1..2cf17fa342f4 100644 --- a/starmath/sdi/smslots.sdi +++ b/starmath/sdi/smslots.sdi @@ -282,6 +282,11 @@ interface FormulaView ExecMethod = Execute ; StateMethod = GetState ; ] + SID_CHARMAP //idlpp ole : no , status : no + [ + ExecMethod = Execute ; + StateMethod = GetState ; + ] SID_ATTR_PARA_LEFT_TO_RIGHT [ ExecMethod = Execute ; diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx index eb7074c2d811..a2f1b53c19b4 100644 --- a/starmath/source/view.cxx +++ b/starmath/source/view.cxx @@ -2107,6 +2107,31 @@ void SmViewShell::Execute(SfxRequest& rReq) } break; + case SID_CHARMAP: + { + const SfxItemSet* pArgs = rReq.GetArgs(); + const SfxStringItem* pItem = nullptr; + if (pArgs && SfxItemState::SET == pArgs->GetItemState(SID_CHARMAP, true, &pItem)) + { + if (IsInlineEditEnabled()) + GetDoc()->GetCursor().InsertText(pItem->GetValue()); + else if (pWin) + pWin->InsertText(pItem->GetValue()); + break; + } + + SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); + SfxAllItemSet aSet(GetViewFrame().GetObjectShell()->GetPool()); + aSet.Put(SfxBoolItem(FN_PARAM_1, false)); + aSet.Put(SfxStringItem(SID_FONT_NAME, + GetDoc()->GetFormat().GetFont(FNT_VARIABLE).GetFamilyName())); + ScopedVclPtr<SfxAbstractDialog> pDialog( + pFact->CreateCharMapDialog(pWin ? pWin->GetFrameWeld() : nullptr, aSet, + GetViewFrame().GetFrame().GetFrameInterface())); + pDialog->Execute(); + } + break; + case SID_ATTR_PARA_LEFT_TO_RIGHT: case SID_ATTR_PARA_RIGHT_TO_LEFT: { diff --git a/starmath/uiconfig/smath/menubar/menubar.xml b/starmath/uiconfig/smath/menubar/menubar.xml index c3b7865f6449..903ba7189664 100644 --- a/starmath/uiconfig/smath/menubar/menubar.xml +++ b/starmath/uiconfig/smath/menubar/menubar.xml @@ -122,6 +122,7 @@ <menu:menu menu:id=".uno:ToolsMenu"> <menu:menupopup> <menu:menuitem menu:id=".uno:SymbolCatalogue"/> + <menu:menuitem menu:id=".uno:InsertSymbol"/> <menu:menuitem menu:id=".uno:ImportFormula"/> <menu:menuitem menu:id=".uno:ImportMathMLClipboard"/> <menu:menuseparator/>
