summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNickson Thanda <nicksonthanda10@msn.com>2018-03-25 22:17:42 +0100
committerMike Kaganski <mike.kaganski@collabora.com>2018-03-26 09:05:13 +0200
commit42af2f3b2ebd6c559e92e487b9e19ab1e9cd6e33 (patch)
tree9de4a1b49a6a1f642bf362cbece008264e904568
parent54a54d9eeed48ba30fb7b1f28121a0fa827cf16e (diff)
tdf#113925 doubleclick in ruler opens relevant dialog
Change-Id: Ic56ea52e2b2d840a5ddba7d4204caf86b96411b5 Reviewed-on: https://gerrit.libreoffice.org/51470 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
-rw-r--r--sw/source/uibase/shells/basesh.cxx5
-rw-r--r--sw/source/uibase/uiview/viewmdi.cxx16
2 files changed, 15 insertions, 6 deletions
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 });
}