summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2018-03-20 11:36:00 +0100
committerSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2018-03-22 16:06:41 +0100
commit5b348b1a8ca3c5ba1049aacba1ac2e3c43ed26b7 (patch)
tree2e9b28dd1d7c803fe30684d8138603281bae53a0
parent178715e7ca365de98bcd3656b9ce0bfce5aa95e7 (diff)
tdf#83877 Move SignatureLineDialog to svx
To prepare using from Calc Change-Id: I102ecf2c956922dd1458c99bd7cd7be30f6f5ec4 Reviewed-on: https://gerrit.libreoffice.org/51726 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
-rw-r--r--include/svx/SignatureLineDialog.hxx (renamed from sw/source/uibase/inc/SignatureLineDialog.hxx)11
-rw-r--r--include/svx/svxids.hrc6
-rw-r--r--officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu16
-rw-r--r--officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu16
-rw-r--r--svx/Library_svx.mk1
-rw-r--r--svx/UIConfig_svx.mk1
-rw-r--r--svx/sdi/svx.sdi36
-rw-r--r--svx/source/dialog/SignatureLineDialog.cxx (renamed from sw/source/uibase/dialog/SignatureLineDialog.cxx)25
-rw-r--r--svx/uiconfig/ui/signatureline.ui (renamed from sw/uiconfig/swriter/ui/signatureline.ui)0
-rw-r--r--sw/Library_sw.mk1
-rw-r--r--sw/UIConfig_swriter.mk1
-rw-r--r--sw/inc/cmdid.h2
-rw-r--r--sw/inc/swabstdlg.hxx5
-rw-r--r--sw/sdi/swriter.sdi34
-rw-r--r--sw/sdi/viewsh.sdi4
-rw-r--r--sw/source/ui/dialog/swdlgfact.cxx11
-rw-r--r--sw/source/ui/dialog/swdlgfact.hxx4
-rw-r--r--sw/source/ui/dialog/swuiexp.cxx2
-rw-r--r--sw/source/uibase/uiview/viewdlg2.cxx12
-rw-r--r--sw/source/uibase/uiview/viewstat.cxx4
20 files changed, 104 insertions, 88 deletions
diff --git a/sw/source/uibase/inc/SignatureLineDialog.hxx b/include/svx/SignatureLineDialog.hxx
index 80d7cf87289d..fce677ea3368 100644
--- a/sw/source/uibase/inc/SignatureLineDialog.hxx
+++ b/include/svx/SignatureLineDialog.hxx
@@ -10,18 +10,16 @@
#define INCLUDED_SW_INC_SIGNATURELINEDIALOG_HXX
#include <svx/stddlg.hxx>
-#include <swdllapi.h>
#include <vcl/weld.hxx>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/uno/Reference.hxx>
-class SwView;
-
-class SW_DLLPUBLIC SignatureLineDialog : public weld::GenericDialogController
+class SVX_DLLPUBLIC SignatureLineDialog : public weld::GenericDialogController
{
public:
- SignatureLineDialog(SwView& rView);
+ SignatureLineDialog(weld::Widget* pParent, css::uno::Reference<css::frame::XModel> xModel,
+ bool bEditExisting);
short execute();
@@ -32,7 +30,8 @@ private:
std::unique_ptr<weld::TextView> m_xEditInstructions;
std::unique_ptr<weld::CheckButton> m_xCheckboxCanAddComments;
std::unique_ptr<weld::CheckButton> m_xCheckboxShowSignDate;
- SwView& mrView;
+
+ css::uno::Reference<css::frame::XModel> m_xModel;
css::uno::Reference<css::beans::XPropertySet> m_xExistingShapeProperties;
OUString m_aSignatureLineId;
diff --git a/include/svx/svxids.hrc b/include/svx/svxids.hrc
index e568f24e535b..bd3e28f3b1b4 100644
--- a/include/svx/svxids.hrc
+++ b/include/svx/svxids.hrc
@@ -964,8 +964,12 @@ class SfxStringItem;
#define SID_CLASSIFICATION_DIALOG ( SID_SVX_START + 1171 )
#define SID_ANCHOR_MENU ( SID_SVX_START + 1172 )
+#define SID_INSERT_SIGNATURELINE ( SID_SVX_START + 1173 )
+#define SID_EDIT_SIGNATURELINE ( SID_SVX_START + 1174 )
+
+
// IMPORTANT NOTE: adjust SID_SVX_FIRSTFREE, when adding new slot id
-#define SID_SVX_FIRSTFREE ( SID_ANCHOR_MENU + 1 )
+#define SID_SVX_FIRSTFREE ( SID_EDIT_SIGNATURELINE + 1 )
// Overflow check for slot IDs
#if SID_SVX_FIRSTFREE > SID_SVX_END
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu
index 2120254bedcf..706007ea8d1e 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu
@@ -6513,6 +6513,22 @@
<value xml:lang="en-US">More Breaks</value>
</prop>
</node>
+ <node oor:name=".uno:InsertSignatureLine" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+ <value xml:lang="en-US">Signatu~re Line</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:EditSignatureLine" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+ <value xml:lang="en-US">Edit Signature ~Line...</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
</node>
</node>
</oor:component-data>
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu
index c2b5999576a3..aec4ef1ed90b 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu
@@ -834,22 +834,6 @@
<value>1</value>
</prop>
</node>
- <node oor:name=".uno:InsertSignatureLine" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Signatu~re Line</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
- <node oor:name=".uno:EditSignatureLine" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Edit Signature ~Line...</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
<node oor:name=".uno:AutoFormatApply" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
<value xml:lang="en-US">Appl~y</value>
diff --git a/svx/Library_svx.mk b/svx/Library_svx.mk
index 3c374744b314..00406f2e4605 100644
--- a/svx/Library_svx.mk
+++ b/svx/Library_svx.mk
@@ -149,6 +149,7 @@ $(eval $(call gb_Library_add_exception_objects,svx,\
svx/source/dialog/rulritem \
svx/source/dialog/SafeModeDialog \
svx/source/dialog/SafeModeUI \
+ svx/source/dialog/SignatureLineDialog \
svx/source/dialog/SpellDialogChildWindow \
svx/source/dialog/srchctrl \
svx/source/dialog/srchdlg \
diff --git a/svx/UIConfig_svx.mk b/svx/UIConfig_svx.mk
index 831e1d20a27c..449dae71bca3 100644
--- a/svx/UIConfig_svx.mk
+++ b/svx/UIConfig_svx.mk
@@ -90,6 +90,7 @@ $(eval $(call gb_UIConfig_add_uifiles,svx,\
svx/uiconfig/ui/sidebarpossize \
svx/uiconfig/ui/sidebarstylespanel \
svx/uiconfig/ui/sidebartextpanel \
+ svx/uiconfig/ui/signatureline \
svx/uiconfig/ui/stylemenu \
svx/uiconfig/ui/textcharacterspacingcontrol \
svx/uiconfig/ui/textcontrolchardialog \
diff --git a/svx/sdi/svx.sdi b/svx/sdi/svx.sdi
index e0eb906b5e8e..02b7f4c9d3fe 100644
--- a/svx/sdi/svx.sdi
+++ b/svx/sdi/svx.sdi
@@ -11943,4 +11943,38 @@ SfxVoidItem AnchorMenu SID_ANCHOR_MENU
MenuConfig = TRUE,
ToolBoxConfig = TRUE,
GroupId = SfxGroupId::Format;
-] \ No newline at end of file
+]
+
+SfxVoidItem InsertSignatureLine SID_INSERT_SIGNATURELINE
+()
+[
+ AutoUpdate = FALSE,
+ FastCall = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ ToolBoxConfig = TRUE,
+ GroupId = SfxGroupId::Insert;
+]
+
+SfxVoidItem EditSignatureLine SID_EDIT_SIGNATURELINE
+()
+[
+ AutoUpdate = FALSE,
+ FastCall = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ ToolBoxConfig = TRUE,
+ GroupId = SfxGroupId::Edit;
+]
diff --git a/sw/source/uibase/dialog/SignatureLineDialog.cxx b/svx/source/dialog/SignatureLineDialog.cxx
index bc2db9a9dab1..41fe582714a9 100644
--- a/sw/source/uibase/dialog/SignatureLineDialog.cxx
+++ b/svx/source/dialog/SignatureLineDialog.cxx
@@ -7,13 +7,13 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-#include <SignatureLineDialog.hxx>
+#include <svx/SignatureLineDialog.hxx>
#include <comphelper/processfactory.hxx>
#include <comphelper/xmltools.hxx>
#include <tools/stream.hxx>
#include <unotools/streamwrap.hxx>
-#include <view.hxx>
+#include <vcl/weld.hxx>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/drawing/XShape.hpp>
@@ -29,34 +29,34 @@
using namespace css;
using namespace css::uno;
using namespace css::beans;
+using namespace css::frame;
using namespace css::io;
using namespace css::lang;
using namespace css::frame;
using namespace css::text;
-using namespace css::view;
using namespace css::drawing;
using namespace css::graphic;
-SignatureLineDialog::SignatureLineDialog(SwView& rView)
- : GenericDialogController(rView.GetFrameWeld(), "modules/swriter/ui/signatureline.ui",
- "SignatureLineDialog")
+SignatureLineDialog::SignatureLineDialog(weld::Widget* pParent, Reference<XModel> xModel,
+ bool bEditExisting)
+ : GenericDialogController(pParent, "svx/ui/signatureline.ui", "SignatureLineDialog")
, m_xEditName(m_xBuilder->weld_entry("edit_name"))
, m_xEditTitle(m_xBuilder->weld_entry("edit_title"))
, m_xEditEmail(m_xBuilder->weld_entry("edit_email"))
, m_xEditInstructions(m_xBuilder->weld_text_view("edit_instructions"))
, m_xCheckboxCanAddComments(m_xBuilder->weld_check_button("checkbox_can_add_comments"))
, m_xCheckboxShowSignDate(m_xBuilder->weld_check_button("checkbox_show_sign_date"))
- , mrView(rView)
+ , m_xModel(xModel)
{
m_xEditInstructions->set_size_request(m_xEditInstructions->get_approximate_digit_width() * 48,
m_xEditInstructions->get_text_height() * 5);
// No signature line selected - start with empty dialog and generate a new one
- if (!rView.isSignatureLineSelected())
+ if (!bEditExisting)
return;
- Reference<XModel> const xModel(rView.GetCurrentDocument());
- Reference<container::XIndexAccess> xIndexAccess(xModel->getCurrentSelection(), UNO_QUERY_THROW);
+ Reference<container::XIndexAccess> xIndexAccess(m_xModel->getCurrentSelection(),
+ UNO_QUERY_THROW);
Reference<XPropertySet> xProps(xIndexAccess->getByIndex(0), UNO_QUERY_THROW);
// Read properties from selected signature line
@@ -127,13 +127,12 @@ void SignatureLineDialog::Apply()
aMediaProperties[0].Value <<= xInputStream;
Reference<XGraphic> xGraphic(xProvider->queryGraphic(aMediaProperties));
- Reference<XModel> const xModel(mrView.GetCurrentDocument());
bool bIsExistingSignatureLine = m_xExistingShapeProperties.is();
Reference<XPropertySet> xShapeProps;
if (bIsExistingSignatureLine)
xShapeProps = m_xExistingShapeProperties;
else
- xShapeProps.set(Reference<lang::XMultiServiceFactory>(xModel, UNO_QUERY)
+ xShapeProps.set(Reference<lang::XMultiServiceFactory>(m_xModel, UNO_QUERY)
->createInstance("com.sun.star.drawing.GraphicObjectShape"),
UNO_QUERY);
@@ -168,7 +167,7 @@ void SignatureLineDialog::Apply()
// Insert into document
Reference<XTextRange> const xEnd
- = Reference<XTextDocument>(xModel, UNO_QUERY)->getText()->getEnd();
+ = Reference<XTextDocument>(m_xModel, UNO_QUERY)->getText()->getEnd();
Reference<XTextContent> const xShapeContent(xShapeProps, UNO_QUERY);
xShapeContent->attach(xEnd);
}
diff --git a/sw/uiconfig/swriter/ui/signatureline.ui b/svx/uiconfig/ui/signatureline.ui
index 95293de73979..95293de73979 100644
--- a/sw/uiconfig/swriter/ui/signatureline.ui
+++ b/svx/uiconfig/ui/signatureline.ui
diff --git a/sw/Library_sw.mk b/sw/Library_sw.mk
index 4056c57deb27..7ca75085cc74 100644
--- a/sw/Library_sw.mk
+++ b/sw/Library_sw.mk
@@ -588,7 +588,6 @@ $(eval $(call gb_Library_add_exception_objects,sw,\
sw/source/uibase/config/uinums \
sw/source/uibase/config/usrpref \
sw/source/uibase/config/viewopt \
- sw/source/uibase/dialog/SignatureLineDialog \
sw/source/uibase/dialog/SwSpellDialogChildWindow \
sw/source/uibase/dialog/regionsw \
sw/source/uibase/dialog/swabstdlg \
diff --git a/sw/UIConfig_swriter.mk b/sw/UIConfig_swriter.mk
index c518b76d8234..0ef338bb2792 100644
--- a/sw/UIConfig_swriter.mk
+++ b/sw/UIConfig_swriter.mk
@@ -246,7 +246,6 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/swriter,\
sw/uiconfig/swriter/ui/selectindexdialog \
sw/uiconfig/swriter/ui/selecttabledialog \
sw/uiconfig/swriter/ui/sidebarpage \
- sw/uiconfig/swriter/ui/signatureline \
sw/uiconfig/swriter/ui/pageformatpanel \
sw/uiconfig/swriter/ui/pagestylespanel \
sw/uiconfig/swriter/ui/pageheaderpanel \
diff --git a/sw/inc/cmdid.h b/sw/inc/cmdid.h
index c561ec7f4837..4604eee0c4e1 100644
--- a/sw/inc/cmdid.h
+++ b/sw/inc/cmdid.h
@@ -142,7 +142,6 @@
#define FN_REDLINE_PREV_CHANGE (FN_EDIT2 + 42) /* Go to the previous change */
#define FN_REDLINE_ACCEPT_ALL (FN_EDIT2 + 43) /* Redlining Accept All*/
#define FN_REDLINE_REJECT_ALL (FN_EDIT2 + 44) /* Redlining Reject All*/
-#define FN_EDIT_SIGNATURELINE (FN_EDIT2 + 45) /* Edit signature line */
// Region: Edit
#define FN_REFRESH_VIEW (FN_VIEW + 1) /* Refresh/Redraw */
@@ -210,7 +209,6 @@
#define FN_INSERT_IDX_ENTRY_DLG (FN_INSERT + 35) /* insert index entry */
#define FN_INSERT_FRAME_INTERACT_NOCOL (FN_INSERT + 36) /*insert interactive non column frame*/
-#define FN_INSERT_SIGNATURELINE (FN_INSERT + 37) /*insert signature line*/
#define FN_TOOL_ANCHOR_PAGE (FN_INSERT + 50) /* anchor Draw object to page */
#define FN_TOOL_ANCHOR_PARAGRAPH (FN_INSERT + 51) /* anchor Draw object to paragraph */
diff --git a/sw/inc/swabstdlg.hxx b/sw/inc/swabstdlg.hxx
index c0c1c232c20c..9e604f66ce68 100644
--- a/sw/inc/swabstdlg.hxx
+++ b/sw/inc/swabstdlg.hxx
@@ -394,7 +394,10 @@ public:
SwCharDlgMode nDialogMode, const OUString* pFormatStr = nullptr) = 0;
virtual VclPtr<AbstractSwConvertTableDlg> CreateSwConvertTableDlg(SwView& rView, bool bToTable) = 0;
virtual VclPtr<VclAbstractDialog> CreateSwCaptionDialog ( vcl::Window *pParent, SwView &rV) = 0;
- virtual VclPtr<VclAbstractDialog> CreateSignatureLineDialog(SwView& rView) = 0;
+ virtual VclPtr<VclAbstractDialog>
+ CreateSignatureLineDialog(SwView& rView, css::uno::Reference<css::frame::XModel> xModel,
+ bool bEditExisting)
+ = 0;
virtual VclPtr<AbstractSwInsertDBColAutoPilot> CreateSwInsertDBColAutoPilot(SwView& rView,
css::uno::Reference< css::sdbc::XDataSource> rxSource,
diff --git a/sw/sdi/swriter.sdi b/sw/sdi/swriter.sdi
index 85047fbf39fc..cc560ff1b0ac 100644
--- a/sw/sdi/swriter.sdi
+++ b/sw/sdi/swriter.sdi
@@ -3314,40 +3314,6 @@ SfxVoidItem InsertTopicField FN_INSERT_FLD_TOPIC
GroupId = SfxGroupId::Insert;
]
-SfxVoidItem InsertSignatureLine FN_INSERT_SIGNATURELINE
-()
-[
- AutoUpdate = FALSE,
- FastCall = FALSE,
- ReadOnlyDoc = FALSE,
- Toggle = FALSE,
- Container = FALSE,
- RecordAbsolute = FALSE,
- RecordPerSet;
-
- AccelConfig = TRUE,
- MenuConfig = TRUE,
- ToolBoxConfig = TRUE,
- GroupId = SfxGroupId::Insert;
-]
-
-SfxVoidItem EditSignatureLine FN_EDIT_SIGNATURELINE
-()
-[
- AutoUpdate = FALSE,
- FastCall = FALSE,
- ReadOnlyDoc = FALSE,
- Toggle = FALSE,
- Container = FALSE,
- RecordAbsolute = FALSE,
- RecordPerSet;
-
- AccelConfig = TRUE,
- MenuConfig = TRUE,
- ToolBoxConfig = TRUE,
- GroupId = SfxGroupId::Edit;
-]
-
SfxVoidItem JumpDownThisLevel FN_NUM_BULLET_NEXT
()
[
diff --git a/sw/sdi/viewsh.sdi b/sw/sdi/viewsh.sdi
index c6d718457daa..f0c2a5b2ce3a 100644
--- a/sw/sdi/viewsh.sdi
+++ b/sw/sdi/viewsh.sdi
@@ -36,13 +36,13 @@ interface TextEditView : BaseTextEditView
StateMethod = GetState ;
DisableFlags="SfxDisableFlags::SwOnProtectedCursor";
]
- FN_INSERT_SIGNATURELINE // status()
+ SID_INSERT_SIGNATURELINE // status()
[
ExecMethod = ExecDlgExt ;
StateMethod = GetState ;
DisableFlags="SfxDisableFlags::SwOnProtectedCursor";
]
- FN_EDIT_SIGNATURELINE // status()
+ SID_EDIT_SIGNATURELINE // status()
[
ExecMethod = ExecDlgExt ;
StateMethod = GetState ;
diff --git a/sw/source/ui/dialog/swdlgfact.cxx b/sw/source/ui/dialog/swdlgfact.cxx
index 9000ad0380e1..2d1da118cd18 100644
--- a/sw/source/ui/dialog/swdlgfact.cxx
+++ b/sw/source/ui/dialog/swdlgfact.cxx
@@ -83,9 +83,11 @@
#include <mailconfigpage.hxx>
#include <uiborder.hxx>
#include <mmresultdialogs.hxx>
-#include <SignatureLineDialog.hxx>
+#include <svx/SignatureLineDialog.hxx>
using namespace ::com::sun::star;
+using namespace css::frame;
+using namespace css::uno;
IMPL_ABSTDLG_BASE(AbstractSwWordCountFloatDlg_Impl);
IMPL_ABSTDLG_BASE(AbstractSwInsertAbstractDlg_Impl);
@@ -728,9 +730,12 @@ VclPtr<VclAbstractDialog> SwAbstractDialogFactory_Impl::CreateSwCaptionDialog (
return VclPtr<VclAbstractDialog_Impl>::Create( pDlg );
}
-VclPtr<VclAbstractDialog> SwAbstractDialogFactory_Impl::CreateSignatureLineDialog(SwView& rV)
+VclPtr<VclAbstractDialog>
+SwAbstractDialogFactory_Impl::CreateSignatureLineDialog(SwView& rV, Reference<XModel> xModel,
+ bool bEditExisting)
{
- return VclPtr<AbstractSignatureLineDialog_Impl>::Create(new SignatureLineDialog(rV));
+ return VclPtr<AbstractSignatureLineDialog_Impl>::Create(
+ new SignatureLineDialog(rV.GetFrameWeld(), xModel, bEditExisting));
}
VclPtr<AbstractSwInsertDBColAutoPilot> SwAbstractDialogFactory_Impl::CreateSwInsertDBColAutoPilot( SwView& rView,
diff --git a/sw/source/ui/dialog/swdlgfact.hxx b/sw/source/ui/dialog/swdlgfact.hxx
index 018a2710f36d..cf2343bb9e66 100644
--- a/sw/source/ui/dialog/swdlgfact.hxx
+++ b/sw/source/ui/dialog/swdlgfact.hxx
@@ -451,7 +451,9 @@ public:
SwCharDlgMode nDialogMode, const OUString* pFormatStr = nullptr) override;
virtual VclPtr<AbstractSwConvertTableDlg> CreateSwConvertTableDlg(SwView& rView, bool bToTable) override;
virtual VclPtr<VclAbstractDialog> CreateSwCaptionDialog ( vcl::Window *pParent, SwView &rV) override;
- virtual VclPtr<VclAbstractDialog> CreateSignatureLineDialog(SwView& rView) override;
+ virtual VclPtr<VclAbstractDialog>
+ CreateSignatureLineDialog(SwView& rView, css::uno::Reference<css::frame::XModel> xModel,
+ bool bEditExisting) override;
virtual VclPtr<AbstractSwInsertDBColAutoPilot> CreateSwInsertDBColAutoPilot(SwView& rView,
css::uno::Reference< css::sdbc::XDataSource> rxSource,
diff --git a/sw/source/ui/dialog/swuiexp.cxx b/sw/source/ui/dialog/swuiexp.cxx
index f938df0b3ff0..336a779100b8 100644
--- a/sw/source/ui/dialog/swuiexp.cxx
+++ b/sw/source/ui/dialog/swuiexp.cxx
@@ -39,7 +39,7 @@
#include <selglos.hxx>
#include <splittbl.hxx>
#include <tautofmt.hxx>
-#include <SignatureLineDialog.hxx>
+#include <svx/SignatureLineDialog.hxx>
#include <swmodalredlineacceptdlg.hxx>
#include <swrenamexnameddlg.hxx>
#include <swuiidxmrk.hxx>
diff --git a/sw/source/uibase/uiview/viewdlg2.cxx b/sw/source/uibase/uiview/viewdlg2.cxx
index 35a1409dd78b..554555c5b0fb 100644
--- a/sw/source/uibase/uiview/viewdlg2.cxx
+++ b/sw/source/uibase/uiview/viewdlg2.cxx
@@ -21,6 +21,7 @@
#include <sfx2/viewfrm.hxx>
#include <sfx2/objface.hxx>
#include <svx/svdograf.hxx>
+#include <svx/SignatureLineDialog.hxx>
#include <fldmgr.hxx>
#include <expfld.hxx>
#include <modcfg.hxx>
@@ -42,6 +43,8 @@
#include <memory>
+using namespace css;
+
void SwView::ExecDlgExt(SfxRequest const &rReq)
{
vcl::Window& rMDI = GetViewFrame()->GetWindow();
@@ -61,14 +64,17 @@ void SwView::ExecDlgExt(SfxRequest const &rReq)
}
break;
}
- case FN_INSERT_SIGNATURELINE:
- case FN_EDIT_SIGNATURELINE:
+ case SID_INSERT_SIGNATURELINE:
+ case SID_EDIT_SIGNATURELINE:
{
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
assert(pFact && "SwAbstractDialogFactory fail!");
- ScopedVclPtr<VclAbstractDialog> pDialog(pFact->CreateSignatureLineDialog(*this));
+ const uno::Reference<frame::XModel> xModel(GetCurrentDocument());
+ ScopedVclPtr<VclAbstractDialog> pDialog(
+ pFact->CreateSignatureLineDialog(*this, xModel, rReq.GetSlot() == SID_EDIT_SIGNATURELINE));
assert(pDialog && "Dialog creation failed!");
+
if (pDialog)
pDialog->Execute();
break;
diff --git a/sw/source/uibase/uiview/viewstat.cxx b/sw/source/uibase/uiview/viewstat.cxx
index 9d9dd105be6d..d194793aa089 100644
--- a/sw/source/uibase/uiview/viewstat.cxx
+++ b/sw/source/uibase/uiview/viewstat.cxx
@@ -97,13 +97,13 @@ void SwView::GetState(SfxItemSet &rSet)
break;
case SID_INSERT_GRAPHIC:
- case FN_INSERT_SIGNATURELINE:
+ case SID_INSERT_SIGNATURELINE:
if( m_pWrtShell->CursorInsideInputField() )
{
rSet.DisableItem(nWhich);
}
break;
- case FN_EDIT_SIGNATURELINE:
+ case SID_EDIT_SIGNATURELINE:
if (!isSignatureLineSelected())
rSet.DisableItem(nWhich);
break;