[Libreoffice-commits] core.git: sw/source
Tamás Zolnai (via logerrit)
logerrit at kemper.freedesktop.org
Sat Nov 23 17:30:40 UTC 2019
sw/source/uibase/inc/textsh.hxx | 2 --
sw/source/uibase/lingu/olmenu.cxx | 10 +++-------
sw/source/uibase/shells/textsh1.cxx | 4 ++--
3 files changed, 5 insertions(+), 11 deletions(-)
New commits:
commit 2f815d3092e8ba15c7f03f789b962569944f1d8a
Author: Tamás Zolnai <tamas.zolnai at collabora.com>
AuthorDate: Fri Nov 15 18:11:40 2019 +0100
Commit: Tamás Zolnai <tamas.zolnai at collabora.com>
CommitDate: Sat Nov 23 18:29:30 2019 +0100
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 at collabora.com>
Tested-by: Tamás Zolnai <tamas.zolnai at collabora.com>
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)
{
More information about the Libreoffice-commits
mailing list