sw/source/uibase/shells/basesh.cxx | 5 ++++- sw/source/uibase/uiview/viewmdi.cxx | 16 +++++++++++----- 2 files changed, 15 insertions(+), 6 deletions(-)
New commits: commit 42af2f3b2ebd6c559e92e487b9e19ab1e9cd6e33 Author: Nickson Thanda <[email protected]> Date: Sun Mar 25 22:17:42 2018 +0100 tdf#113925 doubleclick in ruler opens relevant dialog Change-Id: Ic56ea52e2b2d840a5ddba7d4204caf86b96411b5 Reviewed-on: https://gerrit.libreoffice.org/51470 Tested-by: Jenkins <[email protected]> Reviewed-by: Mike Kaganski <[email protected]> diff --git a/sw/source/uibase/shells/basesh.cxx b/sw/source/uibase/shells/basesh.cxx index 0e90ed956a1c..6d25e2a52039 100644 --- a/sw/source/uibase/shells/basesh.cxx +++ b/sw/source/uibase/shells/basesh.cxx @@ -2445,8 +2445,11 @@ void SwBaseShell::ExecDlg(SfxRequest &rReq) case FN_FORMAT_PAGE_SETTING_DLG: sPageId = "page"; break; + case FN_FORMAT_PAGE_DLG: + if (pItem) + sPageId = OUStringToOString(static_cast<const SfxStringItem*>(pItem)->GetValue(), RTL_TEXTENCODING_UTF8); + break; } - rTempView.GetDocShell()->FormatPage(rPageDesc.GetName(), sPageId, rSh, &rReq); rTempView.InvalidateRulerPos(); diff --git a/sw/source/uibase/uiview/viewmdi.cxx b/sw/source/uibase/uiview/viewmdi.cxx index f56ac21dda99..4f2890a4dd3e 100644 --- a/sw/source/uibase/uiview/viewmdi.cxx +++ b/sw/source/uibase/uiview/viewmdi.cxx @@ -540,22 +540,28 @@ int SwView::KillVRuler() IMPL_LINK( SwView, ExecRulerClick, Ruler *, pRuler, void ) { OUString sDefPage; + sal_uInt16 nDefDlg = SID_PARA_DLG; switch( pRuler->GetClickType() ) { case RulerType::DontKnow: case RulerType::Outside: + sDefPage="labelTP_BORDER"; + break; case RulerType::Indent: + sDefPage="labelTP_PARA_STD"; + break; case RulerType::Margin1: case RulerType::Margin2: - sDefPage = "indents"; - break; + nDefDlg= FN_FORMAT_PAGE_DLG; + sDefPage = "page"; + break; default: - sDefPage = "tabs"; + sDefPage = "labelTP_TABULATOR"; } - SfxStringItem aDefPage(SID_PARA_DLG, sDefPage); - GetViewFrame()->GetDispatcher()->ExecuteList(SID_PARA_DLG, + SfxStringItem aDefPage(nDefDlg, sDefPage); + GetViewFrame()->GetDispatcher()->ExecuteList(nDefDlg, SfxCallMode::SYNCHRON|SfxCallMode::RECORD, { &aDefPage }); } _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
