cui/Library_cui.mk | 1 + cui/UIConfig_cui.mk | 1 + cui/source/dialogs/SignatureLineDialog.cxx | 4 ++-- cui/source/factory/cuiexp.cxx | 1 + cui/source/factory/dlgfact.cxx | 13 +++++++++++++ cui/source/factory/dlgfact.hxx | 18 ++++++++++++++++++ cui/source/inc/SignatureLineDialog.hxx | 7 +++---- include/vcl/abstdlg.hxx | 13 +++++++++++++ svx/Library_svx.mk | 1 - svx/UIConfig_svx.mk | 1 - sw/inc/swabstdlg.hxx | 4 ---- sw/source/ui/dialog/swdlgfact.cxx | 13 ------------- sw/source/ui/dialog/swdlgfact.hxx | 17 ----------------- sw/source/ui/dialog/swuiexp.cxx | 1 - sw/source/uibase/uiview/viewdlg2.cxx | 9 ++++----- 15 files changed, 56 insertions(+), 48 deletions(-)
New commits: commit 6f6f37b7a48e30b976eb1806364c83b69047cab9 Author: Samuel Mehrbrodt <samuel.mehrbr...@cib.de> Date: Thu Apr 12 16:18:37 2018 +0200 tdf#83877 Move SignatureLineDialog to cui next to SignSignatureLineDialog Change-Id: I26efa96ec6dae4d9e091abc8cafd9b841118ef31 Reviewed-on: https://gerrit.libreoffice.org/52781 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <samuel.mehrbr...@cib.de> diff --git a/cui/Library_cui.mk b/cui/Library_cui.mk index afa01ef24a96..877cd1182811 100644 --- a/cui/Library_cui.mk +++ b/cui/Library_cui.mk @@ -121,6 +121,7 @@ $(eval $(call gb_Library_add_exception_objects,cui,\ cui/source/dialogs/pastedlg \ cui/source/dialogs/postdlg \ cui/source/dialogs/scriptdlg \ + cui/source/dialogs/SignatureLineDialog \ cui/source/dialogs/SignSignatureLineDialog \ cui/source/dialogs/sdrcelldlg \ cui/source/dialogs/showcols \ diff --git a/cui/UIConfig_cui.mk b/cui/UIConfig_cui.mk index 8bf3c3073d06..be4a3ac180a8 100644 --- a/cui/UIConfig_cui.mk +++ b/cui/UIConfig_cui.mk @@ -180,6 +180,7 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\ cui/uiconfig/ui/shadowtabpage \ cui/uiconfig/ui/showcoldialog \ cui/uiconfig/ui/similaritysearchdialog \ + cui/uiconfig/ui/signatureline \ cui/uiconfig/ui/signsignatureline \ cui/uiconfig/ui/slantcornertabpage \ cui/uiconfig/ui/smarttagoptionspage \ diff --git a/svx/source/dialog/SignatureLineDialog.cxx b/cui/source/dialogs/SignatureLineDialog.cxx similarity index 99% rename from svx/source/dialog/SignatureLineDialog.cxx rename to cui/source/dialogs/SignatureLineDialog.cxx index 41fe582714a9..bd2e79f9b961 100644 --- a/svx/source/dialog/SignatureLineDialog.cxx +++ b/cui/source/dialogs/SignatureLineDialog.cxx @@ -7,7 +7,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#include <svx/SignatureLineDialog.hxx> +#include <SignatureLineDialog.hxx> #include <comphelper/processfactory.hxx> #include <comphelper/xmltools.hxx> @@ -39,7 +39,7 @@ using namespace css::graphic; SignatureLineDialog::SignatureLineDialog(weld::Widget* pParent, Reference<XModel> xModel, bool bEditExisting) - : GenericDialogController(pParent, "svx/ui/signatureline.ui", "SignatureLineDialog") + : GenericDialogController(pParent, "cui/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")) diff --git a/cui/source/factory/cuiexp.cxx b/cui/source/factory/cuiexp.cxx index 104293936dec..c52f11f857be 100644 --- a/cui/source/factory/cuiexp.cxx +++ b/cui/source/factory/cuiexp.cxx @@ -41,6 +41,7 @@ #include <cuicharmap.hxx> #include <cuihyperdlg.hxx> #include <cfgutil.hxx> +#include <SignatureLineDialog.hxx> #include <SignSignatureLineDialog.hxx> #include <SpellDialog.hxx> #include <zoom.hxx> diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx index 5157aae3b303..a1cc05f2603d 100644 --- a/cui/source/factory/dlgfact.cxx +++ b/cui/source/factory/dlgfact.cxx @@ -60,6 +60,7 @@ #include <insdlg.hxx> #include <pastedlg.hxx> #include <linkdlg.hxx> +#include <SignatureLineDialog.hxx> #include <SignSignatureLineDialog.hxx> #include <SpellDialog.hxx> #include <cfg.hxx> @@ -192,6 +193,11 @@ void AbstractSvxCharacterMapDialog_Impl::SetText(const OUString& rStr) m_xDlg->set_title(rStr); } +short AbstractSignatureLineDialog_Impl::Execute() +{ + return m_xDlg->execute(); +} + short AbstractSignSignatureLineDialog_Impl::Execute() { return m_xDlg->execute(); @@ -1575,6 +1581,13 @@ VclPtr<AbstractScreenshotAnnotationDlg> AbstractDialogFactory_Impl::CreateScreen return VclPtr<AbstractScreenshotAnnotationDlg_Impl>::Create(pDlg); } +VclPtr<AbstractSignatureLineDialog> AbstractDialogFactory_Impl::CreateSignatureLineDialog( + weld::Window* pParent, const Reference<XModel> xModel, bool bEditExisting) +{ + return VclPtr<AbstractSignatureLineDialog_Impl>::Create( + new SignatureLineDialog(pParent, xModel, bEditExisting)); +} + VclPtr<AbstractSignSignatureLineDialog> AbstractDialogFactory_Impl::CreateSignSignatureLineDialog(weld::Window* pParent, const Reference<XModel> xModel) diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx index a5f26ee47a48..df1eb99129c7 100644 --- a/cui/source/factory/dlgfact.hxx +++ b/cui/source/factory/dlgfact.hxx @@ -533,6 +533,20 @@ class AbstractScreenshotAnnotationDlg_Impl : public AbstractScreenshotAnnotation DECL_ABSTDLG_BASE(AbstractScreenshotAnnotationDlg_Impl, ScreenshotAnnotationDlg) }; +class SignatureLineDialog; +class AbstractSignatureLineDialog_Impl : public AbstractSignatureLineDialog +{ +protected: + std::unique_ptr<SignatureLineDialog> m_xDlg; + +public: + explicit AbstractSignatureLineDialog_Impl(SignatureLineDialog* p) + : m_xDlg(p) + { + } + virtual short Execute() override; +}; + class SignSignatureLineDialog; class AbstractSignSignatureLineDialog_Impl : public AbstractSignSignatureLineDialog { @@ -726,6 +740,10 @@ public: virtual VclPtr<AbstractScreenshotAnnotationDlg> CreateScreenshotAnnotationDlg(vcl::Window * pParent, Dialog& rParentDialog) override; + virtual VclPtr<AbstractSignatureLineDialog> + CreateSignatureLineDialog(weld::Window* pParent, + const css::uno::Reference<css::frame::XModel> xModel, bool bEditExisting) override; + virtual VclPtr<AbstractSignSignatureLineDialog> CreateSignSignatureLineDialog(weld::Window* pParent, const css::uno::Reference<css::frame::XModel> xModel) override; diff --git a/include/svx/SignatureLineDialog.hxx b/cui/source/inc/SignatureLineDialog.hxx similarity index 86% rename from include/svx/SignatureLineDialog.hxx rename to cui/source/inc/SignatureLineDialog.hxx index fce677ea3368..3822884c2b40 100644 --- a/include/svx/SignatureLineDialog.hxx +++ b/cui/source/inc/SignatureLineDialog.hxx @@ -6,16 +6,15 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#ifndef INCLUDED_SW_INC_SIGNATURELINEDIALOG_HXX -#define INCLUDED_SW_INC_SIGNATURELINEDIALOG_HXX +#ifndef INCLUDED_CUI_INC_SIGNATURELINEDIALOG_HXX +#define INCLUDED_CUI_INC_SIGNATURELINEDIALOG_HXX -#include <svx/stddlg.hxx> #include <vcl/weld.hxx> #include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/uno/Reference.hxx> -class SVX_DLLPUBLIC SignatureLineDialog : public weld::GenericDialogController +class SignatureLineDialog : public weld::GenericDialogController { public: SignatureLineDialog(weld::Widget* pParent, css::uno::Reference<css::frame::XModel> xModel, diff --git a/svx/uiconfig/ui/signatureline.ui b/cui/uiconfig/ui/signatureline.ui similarity index 100% rename from svx/uiconfig/ui/signatureline.ui rename to cui/uiconfig/ui/signatureline.ui diff --git a/include/vcl/abstdlg.hxx b/include/vcl/abstdlg.hxx index 9ae88a3bdebd..955000e47fbd 100644 --- a/include/vcl/abstdlg.hxx +++ b/include/vcl/abstdlg.hxx @@ -119,6 +119,12 @@ protected: virtual ~AbstractScreenshotAnnotationDlg() override = default; }; +class VCL_DLLPUBLIC AbstractSignatureLineDialog : public VclAbstractDialog +{ +protected: + virtual ~AbstractSignatureLineDialog() override = default; +}; + class VCL_DLLPUBLIC AbstractSignSignatureLineDialog : public VclAbstractDialog { protected: @@ -136,6 +142,13 @@ public: // creates instance of PasswordToOpenModifyDialog from cui virtual VclPtr<AbstractPasswordToOpenModifyDialog> CreatePasswordToOpenModifyDialog(weld::Window * pParent, sal_uInt16 nMaxPasswdLen, bool bIsPasswordToModify) = 0; + // creates instance of SignatureDialog from cui + virtual VclPtr<AbstractSignatureLineDialog> + CreateSignatureLineDialog(weld::Window* pParent, + const css::uno::Reference<css::frame::XModel> xModel, + bool bEditExisting) + = 0; + // creates instance of SignSignatureDialog from cui virtual VclPtr<AbstractSignSignatureLineDialog> CreateSignSignatureLineDialog(weld::Window* pParent, diff --git a/svx/Library_svx.mk b/svx/Library_svx.mk index 00406f2e4605..3c374744b314 100644 --- a/svx/Library_svx.mk +++ b/svx/Library_svx.mk @@ -149,7 +149,6 @@ $(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 9d2f6053a631..441f2ca83208 100644 --- a/svx/UIConfig_svx.mk +++ b/svx/UIConfig_svx.mk @@ -91,7 +91,6 @@ $(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/sw/inc/swabstdlg.hxx b/sw/inc/swabstdlg.hxx index 953c5e0c8fd9..a72a8f17fde1 100644 --- a/sw/inc/swabstdlg.hxx +++ b/sw/inc/swabstdlg.hxx @@ -394,10 +394,6 @@ 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, 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/source/ui/dialog/swdlgfact.cxx b/sw/source/ui/dialog/swdlgfact.cxx index 7bf0470ac939..b105bd332808 100644 --- a/sw/source/ui/dialog/swdlgfact.cxx +++ b/sw/source/ui/dialog/swdlgfact.cxx @@ -83,7 +83,6 @@ #include <mailconfigpage.hxx> #include <uiborder.hxx> #include <mmresultdialogs.hxx> -#include <svx/SignatureLineDialog.hxx> using namespace ::com::sun::star; using namespace css::frame; @@ -125,10 +124,6 @@ short AbstractSwSortDlg_Impl::Execute() { return m_xDlg->execute(); } -short AbstractSignatureLineDialog_Impl::Execute() -{ - return m_xDlg->execute(); -} IMPL_ABSTDLG_BASE(AbstractTabDialog_Impl); short AbstractSwConvertTableDlg_Impl::Execute() { @@ -751,14 +746,6 @@ VclPtr<VclAbstractDialog> SwAbstractDialogFactory_Impl::CreateSwCaptionDialog ( return VclPtr<VclAbstractDialog_Impl>::Create( pDlg ); } -VclPtr<VclAbstractDialog> -SwAbstractDialogFactory_Impl::CreateSignatureLineDialog(SwView& rV, Reference<XModel> xModel, - bool bEditExisting) -{ - return VclPtr<AbstractSignatureLineDialog_Impl>::Create( - new SignatureLineDialog(rV.GetFrameWeld(), xModel, bEditExisting)); -} - VclPtr<AbstractSwInsertDBColAutoPilot> SwAbstractDialogFactory_Impl::CreateSwInsertDBColAutoPilot( SwView& rView, uno::Reference< sdbc::XDataSource> rxSource, uno::Reference<sdbcx::XColumnsSupplier> xColSupp, diff --git a/sw/source/ui/dialog/swdlgfact.hxx b/sw/source/ui/dialog/swdlgfact.hxx index a2ec8568c22b..363f110362d4 100644 --- a/sw/source/ui/dialog/swdlgfact.hxx +++ b/sw/source/ui/dialog/swdlgfact.hxx @@ -29,7 +29,6 @@ class SwSortDlg; class SwTableHeightDlg; class SwTableWidthDlg; class SwMergeTableDlg; -class SignatureLineDialog; class SfxTabDialog; class SwConvertTableDlg; class SwInsertDBColAutoPilot; @@ -136,18 +135,6 @@ public: virtual short Execute() override; }; -class AbstractSignatureLineDialog_Impl : public VclAbstractDialog -{ -protected: - std::unique_ptr<SignatureLineDialog> m_xDlg; -public: - explicit AbstractSignatureLineDialog_Impl(SignatureLineDialog* p) - : m_xDlg(p) - { - } - virtual short Execute() override; -}; - class AbstractSwBreakDlg_Impl : public AbstractSwBreakDlg { protected: @@ -515,10 +502,6 @@ 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, css::uno::Reference<css::frame::XModel> xModel, - bool bEditExisting) override; - virtual VclPtr<AbstractSwInsertDBColAutoPilot> CreateSwInsertDBColAutoPilot(SwView& rView, css::uno::Reference< css::sdbc::XDataSource> rxSource, css::uno::Reference<css::sdbcx::XColumnsSupplier> xColSupp, diff --git a/sw/source/ui/dialog/swuiexp.cxx b/sw/source/ui/dialog/swuiexp.cxx index c063c8c924cd..f541a4507909 100644 --- a/sw/source/ui/dialog/swuiexp.cxx +++ b/sw/source/ui/dialog/swuiexp.cxx @@ -42,7 +42,6 @@ #include <selglos.hxx> #include <splittbl.hxx> #include <tautofmt.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 f0766d4f0f58..495bad85afd8 100644 --- a/sw/source/uibase/uiview/viewdlg2.cxx +++ b/sw/source/uibase/uiview/viewdlg2.cxx @@ -21,7 +21,6 @@ #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> @@ -67,12 +66,12 @@ void SwView::ExecDlgExt(SfxRequest const &rReq) case SID_INSERT_SIGNATURELINE: case SID_EDIT_SIGNATURELINE: { - SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); - assert(pFact && "SwAbstractDialogFactory fail!"); + VclAbstractDialogFactory* pFact = VclAbstractDialogFactory::Create(); + assert(pFact && "VclAbstractDialogFactory fail!"); const uno::Reference<frame::XModel> xModel(GetCurrentDocument()); - ScopedVclPtr<VclAbstractDialog> pDialog( - pFact->CreateSignatureLineDialog(*this, xModel, rReq.GetSlot() == SID_EDIT_SIGNATURELINE)); + ScopedVclPtr<AbstractSignatureLineDialog> pDialog(pFact->CreateSignatureLineDialog( + GetFrameWeld(), xModel, rReq.GetSlot() == SID_EDIT_SIGNATURELINE)); assert(pDialog && "Dialog creation failed!"); if (pDialog) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits