summaryrefslogtreecommitdiff
path: root/sw/source/uibase/uiview/viewdlg2.cxx
diff options
context:
space:
mode:
authorSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2017-12-12 12:39:32 +0100
committerSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2017-12-14 20:10:35 +0100
commitedc3ec2b168e58624211de3dfa14eb17eceda8ec (patch)
treed31488d8222b9dfa6267d0cf63a359d519a7ac8d /sw/source/uibase/uiview/viewdlg2.cxx
parent0c13d0fb5774327a5d99fc068803a37f7072b3cf (diff)
tdf#83877 Edit existing signature lines
Change-Id: I7a6861f599cb8794bcb8c246179cf6c7ff9966f3 Reviewed-on: https://gerrit.libreoffice.org/46289 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Diffstat (limited to 'sw/source/uibase/uiview/viewdlg2.cxx')
-rw-r--r--sw/source/uibase/uiview/viewdlg2.cxx23
1 files changed, 23 insertions, 0 deletions
diff --git a/sw/source/uibase/uiview/viewdlg2.cxx b/sw/source/uibase/uiview/viewdlg2.cxx
index 38beca593167..e3f328a3b3c3 100644
--- a/sw/source/uibase/uiview/viewdlg2.cxx
+++ b/sw/source/uibase/uiview/viewdlg2.cxx
@@ -20,6 +20,7 @@
#include <sfx2/request.hxx>
#include <sfx2/viewfrm.hxx>
#include <sfx2/objface.hxx>
+#include <svx/svdograf.hxx>
#include <fldmgr.hxx>
#include <expfld.hxx>
#include <modcfg.hxx>
@@ -61,6 +62,7 @@ void SwView::ExecDlgExt(SfxRequest const &rReq)
break;
}
case FN_INSERT_SIGNATURELINE:
+ case FN_EDIT_SIGNATURELINE:
{
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
assert(pFact && "SwAbstractDialogFactory fail!");
@@ -87,6 +89,27 @@ void SwView::ExecDlgExt(SfxRequest const &rReq)
}
}
+bool SwView::isSignatureLineSelected()
+{
+ SwWrtShell& rSh = GetWrtShell();
+ SdrView* pSdrView = rSh.GetDrawView();
+ if (!pSdrView)
+ return false;
+
+ if (pSdrView->GetMarkedObjectCount() != 1)
+ return false;
+
+ SdrObject* pPickObj = pSdrView->GetMarkedObjectByIndex(0);
+ if (!pPickObj)
+ return false;
+
+ SdrGrafObj* pGraphic = dynamic_cast<SdrGrafObj*>(pPickObj);
+ if (!pGraphic)
+ return false;
+
+ return pGraphic->isSignatureLine();
+}
+
void SwView::AutoCaption(const sal_uInt16 nType, const SvGlobalName *pOleId)
{
SwModuleOptions* pModOpt = SW_MOD()->GetModuleConfig();