[Libreoffice-commits] core.git: sw/source
Nickson Thanda
nicksonthanda10 at msn.com
Mon Mar 26 07:05:35 UTC 2018
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 <nicksonthanda10 at msn.com>
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 <ci at libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>
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 });
}
More information about the Libreoffice-commits
mailing list