summaryrefslogtreecommitdiff
path: root/cui/source/factory
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-04-03 16:27:56 +0100
committerCaolán McNamara <caolanm@redhat.com>2018-04-03 21:02:02 +0200
commitc5dac92053f053f302ac404afe0816b4d0654158 (patch)
treea4933f10a3e528618a551e81ba91fe77e0f37f64 /cui/source/factory
parent4329d9d8cf83f3642c068a1493c979a894328e26 (diff)
weld SvPasteObjectDialog
Change-Id: I5248950fd3650df309015fbaf4302d2541a6374a Reviewed-on: https://gerrit.libreoffice.org/52337 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'cui/source/factory')
-rw-r--r--cui/source/factory/dlgfact.cxx22
-rw-r--r--cui/source/factory/dlgfact.hxx11
2 files changed, 22 insertions, 11 deletions
diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index a3b1ced56c74..bf07b49fc5d5 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -147,7 +147,12 @@ IMPL_ABSTDLG_BASE(AbstractSvxHpLinkDlg_Impl);
IMPL_ABSTDLG_BASE(AbstractFmSearchDialog_Impl);
IMPL_ABSTDLG_BASE(AbstractGraphicFilterDialog_Impl);
IMPL_ABSTDLG_BASE(AbstractSvxAreaTabDialog_Impl);
-IMPL_ABSTDLG_BASE(AbstractPasteDialog_Impl);
+
+short AbstractPasteDialog_Impl::Execute()
+{
+ return m_xDlg->run();
+}
+
IMPL_ABSTDLG_BASE(AbstractInsertObjectDialog_Impl);
IMPL_ABSTDLG_BASE(AbstractLinksDialog_Impl);
IMPL_ABSTDLG_BASE(AbstractSpellDialog_Impl);
@@ -393,19 +398,19 @@ bool AbstractInsertObjectDialog_Impl::IsCreateNew()
return pDlg->GetIconIfIconified( pGraphicMediaType );
}
-void AbstractPasteDialog_Impl::Insert( SotClipboardFormatId nFormat, const OUString & rFormatName )
+void AbstractPasteDialog_Impl::Insert(SotClipboardFormatId nFormat, const OUString& rFormatName)
{
- pDlg->Insert( nFormat, rFormatName );
+ m_xDlg->Insert(nFormat, rFormatName);
}
-void AbstractPasteDialog_Impl::SetObjName( const SvGlobalName & rClass, const OUString & rObjName )
+void AbstractPasteDialog_Impl::SetObjName(const SvGlobalName & rClass, const OUString& rObjName)
{
- pDlg->SetObjName( rClass, rObjName );
+ m_xDlg->SetObjName(rClass, rObjName);
}
SotClipboardFormatId AbstractPasteDialog_Impl::GetFormat( const TransferableDataHelper& aHelper )
{
- return pDlg->GetFormat( aHelper );
+ return m_xDlg->GetFormat(aHelper);
}
void AbstractFmShowColsDialog_Impl::SetColumns(const ::Reference< css::container::XIndexContainer>& xCols)
@@ -1499,10 +1504,9 @@ VclPtr<VclAbstractDialog> AbstractDialogFactory_Impl::CreateEditObjectDialog( co
return nullptr;
}
-
-VclPtr<SfxAbstractPasteDialog> AbstractDialogFactory_Impl::CreatePasteDialog( vcl::Window* pParent )
+VclPtr<SfxAbstractPasteDialog> AbstractDialogFactory_Impl::CreatePasteDialog(weld::Window* pParent)
{
- return VclPtr<AbstractPasteDialog_Impl>::Create( VclPtr<SvPasteObjectDialog>::Create( pParent ) );
+ return VclPtr<AbstractPasteDialog_Impl>::Create(new SvPasteObjectDialog(pParent));
}
VclPtr<SfxAbstractLinksDialog> AbstractDialogFactory_Impl::CreateLinksDialog( vcl::Window* pParent, sfx2::LinkManager* pMgr, bool bHTML, sfx2::SvBaseLink* p)
diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx
index 2b36adee6204..ddea72e2c206 100644
--- a/cui/source/factory/dlgfact.hxx
+++ b/cui/source/factory/dlgfact.hxx
@@ -433,8 +433,15 @@ class AbstractInsertObjectDialog_Impl : public SfxAbstractInsertObjectDialog
class AbstractPasteDialog_Impl : public SfxAbstractPasteDialog
{
+protected:
+ std::unique_ptr<SvPasteObjectDialog> m_xDlg;
+public:
+ explicit AbstractPasteDialog_Impl(SvPasteObjectDialog* p)
+ : m_xDlg(p)
+ {
+ }
+ virtual short Execute() override;
public:
- DECL_ABSTDLG_BASE(AbstractPasteDialog_Impl, SvPasteObjectDialog )
virtual void Insert( SotClipboardFormatId nFormat, const OUString & rFormatName ) override;
virtual void SetObjName( const SvGlobalName & rClass, const OUString & rObjName ) override;
virtual SotClipboardFormatId GetFormat( const TransferableDataHelper& aHelper ) override;
@@ -546,7 +553,7 @@ public:
const SvObjectServerList* pList ) override;
virtual VclPtr<VclAbstractDialog> CreateEditObjectDialog( const OUString& rCommmand,
const css::uno::Reference < css::embed::XEmbeddedObject >& xObj ) override;
- virtual VclPtr<SfxAbstractPasteDialog> CreatePasteDialog( vcl::Window* pParent ) override;
+ virtual VclPtr<SfxAbstractPasteDialog> CreatePasteDialog(weld::Window* pParent) override;
virtual VclPtr<SfxAbstractLinksDialog> CreateLinksDialog( vcl::Window* pParent, sfx2::LinkManager* pMgr, bool bHTML = false, sfx2::SvBaseLink* p=nullptr ) override;
virtual VclPtr<AbstractHangulHanjaConversionDialog> CreateHangulHanjaConversionDialog( vcl::Window* _pParent,