diff options
author | Tamás Zolnai <tamas.zolnai@collabora.com> | 2019-11-15 18:11:40 +0100 |
---|---|---|
committer | Tamás Zolnai <tamas.zolnai@collabora.com> | 2019-11-23 18:29:30 +0100 |
commit | 2f815d3092e8ba15c7f03f789b962569944f1d8a (patch) | |
tree | 0d9b7ec69f01d465617787610695ab84faf61d06 /sw | |
parent | c9c19fed241d678671c485247a34c399ff212228 (diff) |
SpellingPopup: Convert char dialog related items to use slot id
After this change we can make sw_CharDialog() a local function.
Change-Id: I34b15fccaed07b5d89f63a69da8c870fff0e9b14
Reviewed-on: https://gerrit.libreoffice.org/83571
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/uibase/inc/textsh.hxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/lingu/olmenu.cxx | 10 | ||||
-rw-r--r-- | sw/source/uibase/shells/textsh1.cxx | 4 |
3 files changed, 5 insertions, 11 deletions
diff --git a/sw/source/uibase/inc/textsh.hxx b/sw/source/uibase/inc/textsh.hxx index af865e56ed63..9ec521afe647 100644 --- a/sw/source/uibase/inc/textsh.hxx +++ b/sw/source/uibase/inc/textsh.hxx @@ -83,8 +83,6 @@ public: SfxItemSet CreateInsertFrameItemSet(SwFlyFrameAttrMgr& rMgr); }; -void sw_CharDialog( SwWrtShell &rWrtSh, bool bUseDialog, sal_uInt16 nSlot,const SfxItemSet *pArgs, SfxRequest *pReq ); - #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/uibase/lingu/olmenu.cxx b/sw/source/uibase/lingu/olmenu.cxx index 8cc000318df0..e4dbe6ed9b76 100644 --- a/sw/source/uibase/lingu/olmenu.cxx +++ b/sw/source/uibase/lingu/olmenu.cxx @@ -843,8 +843,8 @@ void SwSpellPopup::Execute( sal_uInt16 nId ) } else if (nId == MN_SET_SELECTION_MORE) { - //Open Format/Character Dialog - sw_CharDialog( *m_pSh, true, SID_ATTR_CHAR_FONT, nullptr, nullptr ); + SfxStringItem aDlgString(FN_PARAM_1, "font"); + m_pSh->GetView().GetViewFrame()->GetDispatcher()->ExecuteList(SID_CHAR_DLG, SfxCallMode::SYNCHRON, { &aDlgString }); } else if (MN_SET_LANGUAGE_PARAGRAPH_START <= nId && nId <= MN_SET_LANGUAGE_PARAGRAPH_END) { @@ -873,11 +873,7 @@ void SwSpellPopup::Execute( sal_uInt16 nId ) } else if (nId == MN_SET_PARA_MORE) { - m_pSh->Push(); // save cursor - SwLangHelper::SelectCurrentPara( *m_pSh ); - //Open Format/Character Dialog - sw_CharDialog( *m_pSh, true, SID_ATTR_CHAR_FONT, nullptr, nullptr ); - m_pSh->Pop(SwCursorShell::PopMode::DeleteCurrent); // restore cursor + m_pSh->GetView().GetViewFrame()->GetDispatcher()->Execute( SID_CHAR_DLG_FOR_PARAGRAPH ); } } diff --git a/sw/source/uibase/shells/textsh1.cxx b/sw/source/uibase/shells/textsh1.cxx index 9f7dee3aeb2b..41d2fbded1da 100644 --- a/sw/source/uibase/shells/textsh1.cxx +++ b/sw/source/uibase/shells/textsh1.cxx @@ -133,7 +133,7 @@ using namespace svx::sidebar; static void sw_CharDialogResult(const SfxItemSet* pSet, SwWrtShell &rWrtSh, std::shared_ptr<SfxItemSet> const & pCoreSet, bool bSel, bool bSelectionPut, SfxRequest *pReq); -void sw_CharDialog(SwWrtShell &rWrtSh, bool bUseDialog, sal_uInt16 nSlot, const SfxItemSet *pArgs, SfxRequest *pReq ) +static void sw_CharDialog(SwWrtShell &rWrtSh, bool bUseDialog, sal_uInt16 nSlot, const SfxItemSet *pArgs, SfxRequest *pReq ) { FieldUnit eMetric = ::GetDfltMetric(dynamic_cast<SwWebView*>( &rWrtSh.GetView()) != nullptr ); SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric))); @@ -187,7 +187,7 @@ void sw_CharDialog(SwWrtShell &rWrtSh, bool bUseDialog, sal_uInt16 nSlot, const pDlg->SetCurPageId("hyperlink"); else if (nSlot == SID_CHAR_DLG_EFFECT) pDlg->SetCurPageId("fonteffects"); - else if (nSlot == SID_ATTR_CHAR_FONT || nSlot == SID_CHAR_DLG_FOR_PARAGRAPH) + else if (nSlot == SID_CHAR_DLG_FOR_PARAGRAPH) pDlg->SetCurPageId("font"); else if (pReq) { |