summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2024-12-19 15:15:53 +0500
committerMike Kaganski <mike.kaganski@collabora.com>2024-12-21 22:18:31 +0100
commit729dfe5baa7dc3cfa1365cbed0ac09ff28332bed (patch)
treec3195606e3f9fd65dfa8725ef9ebdc67e1a58a48
parente04d5aef350a2cee7bdc7d661be1d10a90d75086 (diff)
Simplify abstract dialog impls using vcl::AbstractDialogImpl* in sd
Change-Id: I93f40aef003aa52b4eef173f8f481c99fe4c0489 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178985 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
-rw-r--r--sd/source/ui/dlg/sddlgfact.cxx736
-rw-r--r--sd/source/ui/dlg/sddlgfact.hxx361
-rw-r--r--sd/source/ui/dlg/sduiexp.cxx2
3 files changed, 232 insertions, 867 deletions
diff --git a/sd/source/ui/dlg/sddlgfact.cxx b/sd/source/ui/dlg/sddlgfact.cxx
index 921bcba1f88f..c7d592438897 100644
--- a/sd/source/ui/dlg/sddlgfact.cxx
+++ b/sd/source/ui/dlg/sddlgfact.cxx
@@ -19,6 +19,7 @@
#include "sddlgfact.hxx"
#include <BreakDlg.hxx>
+#include <BulletAndPositionDlg.hxx>
#include <copydlg.hxx>
#include <custsdlg.hxx>
#include <dlg_char.hxx>
@@ -42,639 +43,360 @@
#include <masterlayoutdlg.hxx>
#include <headerfooterdlg.hxx>
#include "PhotoAlbumDialog.hxx"
-#include <vcl/virdev.hxx>
-
-short AbstractSvxBulletAndPositionDlg_Impl::Execute()
-{
- return m_xDlg->run();
-}
-
-short SdAbstractGenericDialog_Impl::Execute()
-{
- return m_xDlg->run();
-}
-
-BitmapEx SdAbstractGenericDialog_Impl::createScreenshot() const
-{
- VclPtr<VirtualDevice> xDialogSurface(m_xDlg->getDialog()->screenshot());
- return xDialogSurface->GetBitmapEx(Point(), xDialogSurface->GetOutputSizePixel());
-}
-
-OUString SdAbstractGenericDialog_Impl::GetScreenshotId() const
-{
- return m_xDlg->get_help_id();
-}
-
-const SfxItemSet* AbstractSvxBulletAndPositionDlg_Impl::GetOutputItemSet( SfxItemSet* pSet ) const
-{
- return m_xDlg->GetOutputItemSet( pSet );
-}
-
-bool AbstractSvxBulletAndPositionDlg_Impl::IsApplyToMaster()
-{
- return m_xDlg->IsApplyToMaster();
-}
-
-bool AbstractSvxBulletAndPositionDlg_Impl::IsSlideScope()
-{
- return m_xDlg->IsSlideScope();
-}
-
-short AbstractCopyDlg_Impl::Execute()
-{
- return m_xDlg->run();
-}
-
-short AbstractSdCustomShowDlg_Impl::Execute()
-{
- return m_xDlg->run();
-}
-
-short SdPresLayoutTemplateDlg_Impl::Execute()
-{
- return m_xDlg->run();
-}
-
-bool SdPresLayoutTemplateDlg_Impl::StartExecuteAsync(AsyncContext &rCtx)
-{
- return SfxTabDialogController::runAsync(m_xDlg, rCtx.maEndDialogFn);
-}
-
-short AbstractSdModifyFieldDlg_Impl::Execute()
-{
- return m_xDlg->run();
-}
-
-short AbstractSdSnapLineDlg_Impl::Execute()
-{
- return m_xDlg->run();
-}
-
-short AbstractSdInsertLayerDlg_Impl::Execute()
-{
- return m_xDlg->run();
-}
-
-short AbstractSdInsertPagesObjsDlg_Impl::Execute()
-{
- return m_xDlg->run();
-}
-
-short AbstractMorphDlg_Impl::Execute()
-{
- return m_xDlg->run();
-}
-
-short AbstractSdStartPresDlg_Impl::Execute()
-{
- return m_xDlg->run();
-}
-
-short AbstractSdPresLayoutDlg_Impl::Execute()
-{
- return m_xDlg->run();
-}
-
-short SdAbstractSfxDialog_Impl::Execute()
-{
- return m_xDlg->run();
-}
-
-short AbstractSdVectorizeDlg_Impl::Execute()
-{
- return m_xDlg->run();
-}
-
-short AbstractHeaderFooterDialog_Impl::Execute()
-{
- return m_xDlg->run();
-}
-
-bool AbstractHeaderFooterDialog_Impl::StartExecuteAsync(AsyncContext &rCtx)
-{
- return weld::DialogController::runAsync(m_xDlg, rCtx.maEndDialogFn);
-}
-
-BitmapEx AbstractHeaderFooterDialog_Impl::createScreenshot() const
-{
- VclPtr<VirtualDevice> xDialogSurface(m_xDlg->getDialog()->screenshot());
- return xDialogSurface->GetBitmapEx(Point(), xDialogSurface->GetOutputSizePixel());
-}
-
-OUString AbstractHeaderFooterDialog_Impl::GetScreenshotId() const
-{
- return m_xDlg->get_help_id();
-}
-
-short AbstractBulletDialog_Impl::Execute()
-{
- return m_xDlg->run();
-}
-
-bool AbstractBulletDialog_Impl::StartExecuteAsync(AsyncContext &rCtx)
-{
- return SfxTabDialogController::runAsync(m_xDlg, rCtx.maEndDialogFn);
-}
-
-AbstractBreakDlg_Impl::AbstractBreakDlg_Impl(std::unique_ptr<::sd::BreakDlg> pDlg)
- : m_xDlg(std::move(pDlg))
-{
-}
-
-short AbstractBreakDlg_Impl::Execute()
-{
- return m_xDlg->run();
-}
-
-BitmapEx AbstractBreakDlg_Impl::createScreenshot() const
-{
- VclPtr<VirtualDevice> xDialogSurface(m_xDlg->getDialog()->screenshot());
- return xDialogSurface->GetBitmapEx(Point(), xDialogSurface->GetOutputSizePixel());
-}
-
-OUString AbstractBreakDlg_Impl::GetScreenshotId() const
-{
- return m_xDlg->get_help_id();
-}
-
-AbstractMasterLayoutDialog_Impl::AbstractMasterLayoutDialog_Impl(std::unique_ptr<::sd::MasterLayoutDialog> pDlg)
- : m_xDlg(std::move(pDlg))
-{
-}
-
-short AbstractMasterLayoutDialog_Impl::Execute()
-{
- return m_xDlg->run();
-}
-
-BitmapEx AbstractMasterLayoutDialog_Impl::createScreenshot() const
-{
- VclPtr<VirtualDevice> xDialogSurface(m_xDlg->getDialog()->screenshot());
- return xDialogSurface->GetBitmapEx(Point(), xDialogSurface->GetOutputSizePixel());
-}
-
-OUString AbstractMasterLayoutDialog_Impl::GetScreenshotId() const
-{
- return m_xDlg->get_help_id();
-}
-
-void AbstractCopyDlg_Impl::GetAttr( SfxItemSet& rOutAttrs )
-{
- m_xDlg->GetAttr( rOutAttrs );
-}
-
-BitmapEx AbstractCopyDlg_Impl::createScreenshot() const
-{
- VclPtr<VirtualDevice> xDialogSurface(m_xDlg->getDialog()->screenshot());
- return xDialogSurface->GetBitmapEx(Point(), xDialogSurface->GetOutputSizePixel());
-}
-
-OUString AbstractCopyDlg_Impl::GetScreenshotId() const
-{
- return m_xDlg->get_help_id();
-}
-
-bool AbstractSdCustomShowDlg_Impl::IsCustomShow() const
-{
- return m_xDlg->IsCustomShow();
-}
-
-BitmapEx AbstractSdCustomShowDlg_Impl::createScreenshot() const
-{
- VclPtr<VirtualDevice> xDialogSurface(m_xDlg->getDialog()->screenshot());
- return xDialogSurface->GetBitmapEx(Point(), xDialogSurface->GetOutputSizePixel());
-}
-
-OUString AbstractSdCustomShowDlg_Impl::GetScreenshotId() const
-{
- return m_xDlg->get_help_id();
-}
-
-short SdAbstractTabController_Impl::Execute()
-{
- return m_xDlg->run();
-}
-
-void SdAbstractTabController_Impl::SetCurPageId( const OUString &rName )
-{
- m_xDlg->SetCurPageId( rName );
-}
-
-const SfxItemSet* SdAbstractTabController_Impl::GetOutputItemSet() const
-{
- return m_xDlg->GetOutputItemSet();
-}
-
-WhichRangesContainer SdAbstractTabController_Impl::GetInputRanges(const SfxItemPool& pItem )
-{
- return m_xDlg->GetInputRanges( pItem );
-}
-
-void SdAbstractTabController_Impl::SetInputSet( const SfxItemSet* pInSet )
-{
- m_xDlg->SetInputSet( pInSet );
-}
-
-bool SdAbstractTabController_Impl::StartExecuteAsync(AsyncContext &rCtx)
-{
- return SfxTabDialogController::runAsync(m_xDlg, rCtx.maEndDialogFn);
-}
-
-//From class Window.
-void SdAbstractTabController_Impl::SetText( const OUString& rStr )
-{
- m_xDlg->set_title(rStr);
-}
-
-BitmapEx SdAbstractTabController_Impl::createScreenshot() const
-{
- VclPtr<VirtualDevice> xDialogSurface(m_xDlg->getDialog()->screenshot());
- return xDialogSurface->GetBitmapEx(Point(), xDialogSurface->GetOutputSizePixel());
-}
-
-OUString SdAbstractTabController_Impl::GetScreenshotId() const
-{
- return m_xDlg->get_help_id();
-}
-
-void AbstractBulletDialog_Impl::SetCurPageId( const OUString& rName )
-{
- m_xDlg->SetCurPageId( rName );
-}
-const SfxItemSet* AbstractBulletDialog_Impl::GetOutputItemSet() const
-{
- return static_cast< ::sd::OutlineBulletDlg*>(m_xDlg.get())->GetBulletOutputItemSet();
-}
-
-WhichRangesContainer AbstractBulletDialog_Impl::GetInputRanges(const SfxItemPool& pItem )
-{
- return m_xDlg->GetInputRanges(pItem);
-}
-
-void AbstractBulletDialog_Impl::SetInputSet( const SfxItemSet* pInSet )
-{
- m_xDlg->SetInputSet(pInSet);
-}
-
-void AbstractBulletDialog_Impl::SetText( const OUString& rStr )
-{
- m_xDlg->set_title(rStr);
-}
-
-BitmapEx AbstractBulletDialog_Impl::createScreenshot() const
-{
- VclPtr<VirtualDevice> xDialogSurface(m_xDlg->getDialog()->screenshot());
- return xDialogSurface->GetBitmapEx(Point(), xDialogSurface->GetOutputSizePixel());
-}
-
-OUString AbstractBulletDialog_Impl::GetScreenshotId() const
-{
- return m_xDlg->get_help_id();
-}
-
-void SdPresLayoutTemplateDlg_Impl::SetCurPageId( const OUString& rName )
-{
- m_xDlg->SetCurPageId( rName );
-}
-
-const SfxItemSet* SdPresLayoutTemplateDlg_Impl::GetOutputItemSet() const
-{
- return m_xDlg->GetOutputItemSet();
-}
-
-WhichRangesContainer SdPresLayoutTemplateDlg_Impl::GetInputRanges(const SfxItemPool& pItem )
-{
- return m_xDlg->GetInputRanges( pItem );
-}
-
-void SdPresLayoutTemplateDlg_Impl::SetInputSet( const SfxItemSet* pInSet )
-{
- m_xDlg->SetInputSet( pInSet );
-}
-
-void SdPresLayoutTemplateDlg_Impl::SetText( const OUString& rStr )
-{
- m_xDlg->set_title(rStr);
-}
-
-BitmapEx SdPresLayoutTemplateDlg_Impl::createScreenshot() const
-{
- VclPtr<VirtualDevice> xDialogSurface(m_xDlg->getDialog()->screenshot());
- return xDialogSurface->GetBitmapEx(Point(), xDialogSurface->GetOutputSizePixel());
-}
-
-OUString SdPresLayoutTemplateDlg_Impl::GetScreenshotId() const
-{
- return m_xDlg->get_help_id();
-}
-
-SvxFieldData* AbstractSdModifyFieldDlg_Impl::GetField()
-{
- return m_xDlg->GetField();
-}
+#include <vcl/abstdlgimpl.hxx>
+#include <vcl/virdev.hxx>
-SfxItemSet AbstractSdModifyFieldDlg_Impl::GetItemSet()
+namespace
{
- return m_xDlg->GetItemSet();
-}
-
-BitmapEx AbstractSdModifyFieldDlg_Impl::createScreenshot() const
+template <class Base, class Dialog, template <class...> class ImplTemplate>
+class ScreenshottedDialog_Impl_BASE : public ImplTemplate<Base, Dialog>
{
- VclPtr<VirtualDevice> xDialogSurface(m_xDlg->getDialog()->screenshot());
- return xDialogSurface->GetBitmapEx(Point(), xDialogSurface->GetOutputSizePixel());
-}
+public:
+ using ImplTemplate<Base, Dialog>::ImplTemplate;
-OUString AbstractSdModifyFieldDlg_Impl::GetScreenshotId() const
-{
- return m_xDlg->get_help_id();
-}
+ // screenshotting
+ BitmapEx createScreenshot() const override
+ {
+ VclPtr<VirtualDevice> xDialogSurface(this->m_pDlg->getDialog()->screenshot());
+ return xDialogSurface->GetBitmapEx(Point(), xDialogSurface->GetOutputSizePixel());
+ }
+ OUString GetScreenshotId() const override { return this->m_pDlg->get_help_id(); }
+};
-void AbstractSdSnapLineDlg_Impl::GetAttr(SfxItemSet& rOutAttrs)
-{
- m_xDlg->GetAttr(rOutAttrs);
-}
+template <class Base, class Dialog>
+using ScreenshottedDialog_Impl_Sync
+ = ScreenshottedDialog_Impl_BASE<Base, Dialog, vcl::AbstractDialogImpl_Sync>;
-void AbstractSdSnapLineDlg_Impl::HideRadioGroup()
-{
- m_xDlg->HideRadioGroup();
-}
+template <class Base, class Dialog>
+using ScreenshottedDialog_Impl_Async
+ = ScreenshottedDialog_Impl_BASE<Base, Dialog, vcl::AbstractDialogImpl_Async>;
-void AbstractSdSnapLineDlg_Impl::HideDeleteBtn()
-{
- m_xDlg->HideDeleteBtn();
+template <class Dialog>
+using SdAbstractGenericDialog_Impl = ScreenshottedDialog_Impl_Sync<VclAbstractDialog, Dialog>;
}
-void AbstractSdSnapLineDlg_Impl::SetInputFields(bool bEnableX, bool bEnableY)
-{
- m_xDlg->SetInputFields(bEnableX, bEnableY);
-}
+//-------------- SdAbstractDialogFactory implementation--------------
-void AbstractSdSnapLineDlg_Impl::SetText( const OUString& rStr )
+namespace
{
- m_xDlg->set_title(rStr);
-}
-
-BitmapEx AbstractSdSnapLineDlg_Impl::createScreenshot() const
+/// Provides managing and getting information from the numbering and position dialog.
+class AbstractSvxBulletAndPositionDlg_Impl
+ : public vcl::AbstractDialogImpl_Sync<AbstractSvxBulletAndPositionDlg, SvxBulletAndPositionDlg>
{
- VclPtr<VirtualDevice> xDialogSurface(m_xDlg->getDialog()->screenshot());
- return xDialogSurface->GetBitmapEx(Point(), xDialogSurface->GetOutputSizePixel());
+public:
+ using AbstractDialogImpl_BASE::AbstractDialogImpl_BASE;
+ const SfxItemSet* GetOutputItemSet(SfxItemSet* pSet) const override
+ {
+ return m_pDlg->GetOutputItemSet(pSet);
+ }
+ bool IsApplyToMaster() override { return m_pDlg->IsApplyToMaster(); }
+ bool IsSlideScope() override { return m_pDlg->IsSlideScope(); }
+};
}
-OUString AbstractSdSnapLineDlg_Impl::GetScreenshotId() const
+VclPtr<AbstractSvxBulletAndPositionDlg> SdAbstractDialogFactory_Impl::CreateSvxBulletAndPositionDlg(weld::Window* pParent, const SfxItemSet* pAttr, ::sd::View* pView)
{
- return m_xDlg->get_help_id();
+ return VclPtr<AbstractSvxBulletAndPositionDlg_Impl>::Create(pParent, *pAttr, pView);
}
-void AbstractSdInsertLayerDlg_Impl::GetAttr( SfxItemSet& rOutAttrs )
+VclPtr<VclAbstractDialog> SdAbstractDialogFactory_Impl::CreateBreakDlg(
+ weld::Window* pParent,
+ ::sd::DrawView* pDrView,
+ ::sd::DrawDocShell* pShell,
+ sal_uLong nSumActionCount,
+ sal_uLong nObjCount )
{
- m_xDlg->GetAttr(rOutAttrs);
+ return VclPtr<SdAbstractGenericDialog_Impl<sd::BreakDlg>>::Create(pParent, pDrView, pShell, nSumActionCount, nObjCount);
}
-void AbstractSdInsertLayerDlg_Impl::SetHelpId( const OUString& rHelpId )
+namespace
{
- m_xDlg->set_help_id(rHelpId);
-}
-
-BitmapEx AbstractSdInsertLayerDlg_Impl::createScreenshot() const
+class AbstractCopyDlg_Impl : public ScreenshottedDialog_Impl_Sync<AbstractCopyDlg, sd::CopyDlg>
{
- VclPtr<VirtualDevice> xDialogSurface(m_xDlg->getDialog()->screenshot());
- return xDialogSurface->GetBitmapEx(Point(), xDialogSurface->GetOutputSizePixel());
+public:
+ using ScreenshottedDialog_Impl_BASE::ScreenshottedDialog_Impl_BASE;
+ void GetAttr(SfxItemSet& rOutAttrs) override { m_pDlg->GetAttr(rOutAttrs); }
+};
}
-OUString AbstractSdInsertLayerDlg_Impl::GetScreenshotId() const
+VclPtr<AbstractCopyDlg> SdAbstractDialogFactory_Impl::CreateCopyDlg(weld::Window* pParent,
+ const SfxItemSet& rInAttrs,
+ ::sd::View* pView )
{
- return m_xDlg->get_help_id();
+ return VclPtr<AbstractCopyDlg_Impl>::Create(pParent, rInAttrs, pView);
}
-std::vector<OUString> AbstractSdInsertPagesObjsDlg_Impl::GetList(const sal_uInt16 nType)
+namespace
{
- return m_xDlg->GetList(nType);
-}
-
-bool AbstractSdInsertPagesObjsDlg_Impl::IsLink()
+class AbstractSdCustomShowDlg_Impl
+ : public ScreenshottedDialog_Impl_Sync<AbstractSdCustomShowDlg, SdCustomShowDlg>
{
- return m_xDlg->IsLink();
+public:
+ using ScreenshottedDialog_Impl_BASE::ScreenshottedDialog_Impl_BASE;
+ bool IsCustomShow() const override { return m_pDlg->IsCustomShow(); }
+};
}
-bool AbstractSdInsertPagesObjsDlg_Impl::IsRemoveUnnecessaryMasterPages() const
+VclPtr<AbstractSdCustomShowDlg> SdAbstractDialogFactory_Impl::CreateSdCustomShowDlg(weld::Window* pParent, SdDrawDocument& rDrawDoc )
{
- return m_xDlg->IsRemoveUnnecessaryMasterPages();
+ return VclPtr<AbstractSdCustomShowDlg_Impl>::Create(pParent, rDrawDoc);
}
-BitmapEx AbstractSdInsertPagesObjsDlg_Impl::createScreenshot() const
+namespace
{
- VclPtr<VirtualDevice> xDialogSurface(m_xDlg->getDialog()->screenshot());
- return xDialogSurface->GetBitmapEx(Point(), xDialogSurface->GetOutputSizePixel());
-}
-
-OUString AbstractSdInsertPagesObjsDlg_Impl::GetScreenshotId() const
+template <class Dialog>
+class SdAbstractTabController_Impl
+ : public ScreenshottedDialog_Impl_Async<SfxAbstractTabDialog, Dialog>
{
- return m_xDlg->get_help_id();
+public:
+ using ScreenshottedDialog_Impl_Async<SfxAbstractTabDialog, Dialog>::ScreenshottedDialog_Impl_Async;
+ void SetCurPageId(const OUString& rName) override { this->m_pDlg->SetCurPageId(rName); }
+ const SfxItemSet* GetOutputItemSet() const override { return this->m_pDlg->GetOutputItemSet(); }
+ WhichRangesContainer GetInputRanges(const SfxItemPool& rPool) override
+ {
+ return this->m_pDlg->GetInputRanges(rPool);
+ }
+ void SetInputSet(const SfxItemSet* pInSet) override { this->m_pDlg->SetInputSet(pInSet); }
+ // From class Window.
+ void SetText(const OUString& rStr) override { this->m_pDlg->set_title(rStr); }
+};
}
-void AbstractMorphDlg_Impl::SaveSettings() const
+VclPtr<SfxAbstractTabDialog> SdAbstractDialogFactory_Impl::CreateSdTabCharDialog(weld::Window* pParent, const SfxItemSet* pAttr, SfxObjectShell* pDocShell)
{
- m_xDlg->SaveSettings();
+ return VclPtr<SdAbstractTabController_Impl<SdCharDlg>>::Create(pParent, pAttr, pDocShell);
}
-sal_uInt16 AbstractMorphDlg_Impl::GetFadeSteps() const
+VclPtr<SfxAbstractTabDialog> SdAbstractDialogFactory_Impl::CreateSdTabPageDialog(weld::Window* pParent, const SfxItemSet* pAttr, SfxObjectShell* pDocShell, bool bAreaPage, bool bIsImpressDoc)
{
- return m_xDlg->GetFadeSteps();
+ return VclPtr<SdAbstractTabController_Impl<SdPageDlg>>::Create(pDocShell, pParent, pAttr, bAreaPage, bIsImpressDoc);
}
-bool AbstractMorphDlg_Impl::IsAttributeFade() const
+namespace
{
- return m_xDlg->IsAttributeFade();
-}
-
-bool AbstractMorphDlg_Impl::IsOrientationFade() const
+class AbstractSdModifyFieldDlg_Impl
+ : public ScreenshottedDialog_Impl_Sync<AbstractSdModifyFieldDlg, SdModifyFieldDlg>
{
- return m_xDlg->IsOrientationFade();
+public:
+ using ScreenshottedDialog_Impl_BASE::ScreenshottedDialog_Impl_BASE;
+ SvxFieldData* GetField() override { return m_pDlg->GetField(); }
+ SfxItemSet GetItemSet() override { return m_pDlg->GetItemSet(); }
+};
}
-BitmapEx AbstractMorphDlg_Impl::createScreenshot() const
+VclPtr<AbstractSdModifyFieldDlg> SdAbstractDialogFactory_Impl::CreateSdModifyFieldDlg(weld::Window* pParent, const SvxFieldData* pInField, const SfxItemSet& rSet)
{
- VclPtr<VirtualDevice> xDialogSurface(m_xDlg->getDialog()->screenshot());
- return xDialogSurface->GetBitmapEx(Point(), xDialogSurface->GetOutputSizePixel());
+ return VclPtr<AbstractSdModifyFieldDlg_Impl>::Create(pParent, pInField, rSet);
}
-OUString AbstractMorphDlg_Impl::GetScreenshotId() const
+namespace
{
- return m_xDlg->get_help_id();
-}
-
-void AbstractSdStartPresDlg_Impl::GetAttr( SfxItemSet& rOutAttrs )
+class AbstractSdSnapLineDlg_Impl
+ : public ScreenshottedDialog_Impl_Sync<AbstractSdSnapLineDlg, SdSnapLineDlg>
{
- m_xDlg->GetAttr(rOutAttrs);
+public:
+ using ScreenshottedDialog_Impl_BASE::ScreenshottedDialog_Impl_BASE;
+ void GetAttr(SfxItemSet& rOutAttrs) override { m_pDlg->GetAttr(rOutAttrs); }
+ void HideRadioGroup() override { m_pDlg->HideRadioGroup(); }
+ void HideDeleteBtn() override { m_pDlg->HideDeleteBtn(); }
+ void SetInputFields(bool bEnableX, bool bEnableY) override
+ {
+ m_pDlg->SetInputFields(bEnableX, bEnableY);
+ }
+ void SetText(const OUString& rStr) override { m_pDlg->set_title(rStr); }
+};
}
-BitmapEx AbstractSdStartPresDlg_Impl::createScreenshot() const
+VclPtr<AbstractSdSnapLineDlg> SdAbstractDialogFactory_Impl::CreateSdSnapLineDlg(weld::Window* pParent, const SfxItemSet& rInAttrs, ::sd::View* pView)
{
- VclPtr<VirtualDevice> xDialogSurface(m_xDlg->getDialog()->screenshot());
- return xDialogSurface->GetBitmapEx(Point(), xDialogSurface->GetOutputSizePixel());
+ return VclPtr<AbstractSdSnapLineDlg_Impl>::Create(pParent, rInAttrs, pView);
}
-OUString AbstractSdStartPresDlg_Impl::GetScreenshotId() const
+namespace
{
- return m_xDlg->get_help_id();
-}
-
-void AbstractSdPresLayoutDlg_Impl::GetAttr( SfxItemSet& rOutAttrs )
+class AbstractSdInsertLayerDlg_Impl
+ : public ScreenshottedDialog_Impl_Sync<AbstractSdInsertLayerDlg, SdInsertLayerDlg>
{
- m_xDlg->GetAttr(rOutAttrs);
+public:
+ using ScreenshottedDialog_Impl_BASE::ScreenshottedDialog_Impl_BASE;
+ void GetAttr(SfxItemSet& rOutAttrs) override { m_pDlg->GetAttr(rOutAttrs); }
+ void SetHelpId(const OUString& rHelpId) override { m_pDlg->set_help_id(rHelpId); }
+};
}
-BitmapEx AbstractSdPresLayoutDlg_Impl::createScreenshot() const
+VclPtr<AbstractSdInsertLayerDlg> SdAbstractDialogFactory_Impl::CreateSdInsertLayerDlg(weld::Window* pParent, const SfxItemSet& rInAttrs, bool bDeletable, const OUString& aStr)
{
- VclPtr<VirtualDevice> xDialogSurface(m_xDlg->getDialog()->screenshot());
- return xDialogSurface->GetBitmapEx(Point(), xDialogSurface->GetOutputSizePixel());
+ return VclPtr<AbstractSdInsertLayerDlg_Impl>::Create(pParent, rInAttrs, bDeletable, aStr);
}
-OUString AbstractSdPresLayoutDlg_Impl::GetScreenshotId() const
+namespace
{
- return m_xDlg->get_help_id();
-}
-
-const SfxItemSet* SdAbstractSfxDialog_Impl::GetOutputItemSet() const
+class AbstractSdInsertPagesObjsDlg_Impl
+ : public ScreenshottedDialog_Impl_Sync<AbstractSdInsertPagesObjsDlg, SdInsertPagesObjsDlg>
{
- return m_xDlg->GetOutputItemSet();
+public:
+ using ScreenshottedDialog_Impl_BASE::ScreenshottedDialog_Impl_BASE;
+ std::vector<OUString> GetList(const sal_uInt16 nType) override
+ {
+ return m_pDlg->GetList(nType);
+ }
+ bool IsLink() override { return m_pDlg->IsLink(); }
+ bool IsRemoveUnnecessaryMasterPages() const override
+ {
+ return m_pDlg->IsRemoveUnnecessaryMasterPages();
+ }
+};
}
-void SdAbstractSfxDialog_Impl::SetText( const OUString& rStr )
+VclPtr<AbstractSdInsertPagesObjsDlg> SdAbstractDialogFactory_Impl::CreateSdInsertPagesObjsDlg(weld::Window* pParent, const SdDrawDocument* pDoc, SfxMedium* pSfxMedium, const OUString& rFileName)
{
- m_xDlg->set_title(rStr);
+ return VclPtr<AbstractSdInsertPagesObjsDlg_Impl>::Create(pParent, pDoc, pSfxMedium, rFileName);
}
-bool SdAbstractSfxDialog_Impl::StartExecuteAsync(AsyncContext &rCtx)
+namespace
{
- return weld::DialogController::runAsync(m_xDlg, rCtx.maEndDialogFn);
-}
-
-const GDIMetaFile& AbstractSdVectorizeDlg_Impl::GetGDIMetaFile() const
+class AbstractMorphDlg_Impl : public ScreenshottedDialog_Impl_Sync<AbstractMorphDlg, sd::MorphDlg>
{
- return m_xDlg->GetGDIMetaFile();
+public:
+ using ScreenshottedDialog_Impl_BASE::ScreenshottedDialog_Impl_BASE;
+ void SaveSettings() const override { m_pDlg->SaveSettings(); }
+ sal_uInt16 GetFadeSteps() const override { return m_pDlg->GetFadeSteps(); }
+ bool IsAttributeFade() const override { return m_pDlg->IsAttributeFade(); }
+ bool IsOrientationFade() const override { return m_pDlg->IsOrientationFade(); }
+};
}
-BitmapEx AbstractSdVectorizeDlg_Impl::createScreenshot() const
+VclPtr<AbstractMorphDlg> SdAbstractDialogFactory_Impl::CreateMorphDlg(weld::Window* pParent, const SdrObject* pObj1, const SdrObject* pObj2)
{
- VclPtr<VirtualDevice> xDialogSurface(m_xDlg->getDialog()->screenshot());
- return xDialogSurface->GetBitmapEx(Point(), xDialogSurface->GetOutputSizePixel());
+ return VclPtr<AbstractMorphDlg_Impl>::Create(pParent, pObj1, pObj2);
}
-OUString AbstractSdVectorizeDlg_Impl::GetScreenshotId() const
+namespace
{
- return m_xDlg->get_help_id();
-}
-
-//-------------- SdAbstractDialogFactory implementation--------------
-
-VclPtr<AbstractSvxBulletAndPositionDlg> SdAbstractDialogFactory_Impl::CreateSvxBulletAndPositionDlg(weld::Window* pParent, const SfxItemSet* pAttr, ::sd::View* pView)
+class AbstractBulletDialog_Impl
+ : public ScreenshottedDialog_Impl_Async<SfxAbstractTabDialog, sd::OutlineBulletDlg>
{
- return VclPtr<AbstractSvxBulletAndPositionDlg_Impl>::Create(std::make_unique<SvxBulletAndPositionDlg>(pParent, *pAttr, pView));
+public:
+ using ScreenshottedDialog_Impl_BASE::ScreenshottedDialog_Impl_BASE;
+ void SetCurPageId(const OUString& rName) override { m_pDlg->SetCurPageId(rName); }
+ const SfxItemSet* GetOutputItemSet() const override { return m_pDlg->GetBulletOutputItemSet(); }
+ WhichRangesContainer GetInputRanges(const SfxItemPool& pItem) override
+ {
+ return m_pDlg->GetInputRanges(pItem);
+ }
+ void SetInputSet(const SfxItemSet* pInSet) override { m_pDlg->SetInputSet(pInSet); }
+ void SetText(const OUString& rStr) override { m_pDlg->set_title(rStr); }
+};
}
-VclPtr<VclAbstractDialog> SdAbstractDialogFactory_Impl::CreateBreakDlg(
- weld::Window* pParent,
- ::sd::DrawView* pDrView,
- ::sd::DrawDocShell* pShell,
- sal_uLong nSumActionCount,
- sal_uLong nObjCount )
+VclPtr<SfxAbstractTabDialog> SdAbstractDialogFactory_Impl::CreateSdOutlineBulletTabDlg(weld::Window* pParent, const SfxItemSet* pAttr, ::sd::View* pView)
{
- return VclPtr<AbstractBreakDlg_Impl>::Create(std::make_unique<::sd::BreakDlg>(pParent, pDrView, pShell, nSumActionCount, nObjCount));
+ return VclPtr<AbstractBulletDialog_Impl>::Create(pParent, pAttr, pView);
}
-VclPtr<AbstractCopyDlg> SdAbstractDialogFactory_Impl::CreateCopyDlg(weld::Window* pParent,
- const SfxItemSet& rInAttrs,
- ::sd::View* pView )
+VclPtr<SfxAbstractTabDialog> SdAbstractDialogFactory_Impl::CreateSdParagraphTabDlg(weld::Window* pParent, const SfxItemSet* pAttr )
{
- return VclPtr<AbstractCopyDlg_Impl>::Create(std::make_unique<::sd::CopyDlg>(pParent, rInAttrs, pView));
+ return VclPtr<SdAbstractTabController_Impl<SdParagraphDlg>>::Create(pParent, pAttr);
}
-VclPtr<AbstractSdCustomShowDlg> SdAbstractDialogFactory_Impl::CreateSdCustomShowDlg(weld::Window* pParent, SdDrawDocument& rDrawDoc )
+namespace
{
- return VclPtr<AbstractSdCustomShowDlg_Impl>::Create(std::make_unique<SdCustomShowDlg>(pParent, rDrawDoc));
-}
-
-VclPtr<SfxAbstractTabDialog> SdAbstractDialogFactory_Impl::CreateSdTabCharDialog(weld::Window* pParent, const SfxItemSet* pAttr, SfxObjectShell* pDocShell)
+class AbstractSdStartPresDlg_Impl
+ : public ScreenshottedDialog_Impl_Sync<AbstractSdStartPresDlg, SdStartPresentationDlg>
{
- return VclPtr<SdAbstractTabController_Impl>::Create(std::make_shared<SdCharDlg>(pParent, pAttr, pDocShell));
+public:
+ using ScreenshottedDialog_Impl_BASE::ScreenshottedDialog_Impl_BASE;
+ void GetAttr(SfxItemSet& rOutAttrs) override { m_pDlg->GetAttr(rOutAttrs); }
+};
}
-VclPtr<SfxAbstractTabDialog> SdAbstractDialogFactory_Impl::CreateSdTabPageDialog(weld::Window* pParent, const SfxItemSet* pAttr, SfxObjectShell* pDocShell, bool bAreaPage, bool bIsImpressDoc)
+VclPtr<AbstractSdStartPresDlg> SdAbstractDialogFactory_Impl::CreateSdStartPresentationDlg(weld::Window* pParent,
+ const SfxItemSet& rInAttrs, const std::vector<OUString> &rPageNames, SdCustomShowList* pCSList)
{
- return VclPtr<SdAbstractTabController_Impl>::Create(std::make_shared<SdPageDlg>(pDocShell, pParent, pAttr, bAreaPage, bIsImpressDoc));
+ return VclPtr<AbstractSdStartPresDlg_Impl>::Create(pParent, rInAttrs, rPageNames, pCSList);
}
-VclPtr<AbstractSdModifyFieldDlg> SdAbstractDialogFactory_Impl::CreateSdModifyFieldDlg(weld::Window* pParent, const SvxFieldData* pInField, const SfxItemSet& rSet)
+VclPtr<VclAbstractDialog> SdAbstractDialogFactory_Impl::CreateRemoteDialog(weld::Window* pParent)
{
- return VclPtr<AbstractSdModifyFieldDlg_Impl>::Create(std::make_unique<SdModifyFieldDlg>(pParent, pInField, rSet));
+ return VclPtr<SdAbstractGenericDialog_Impl<sd::RemoteDialog>>::Create(pParent);
}
-VclPtr<AbstractSdSnapLineDlg> SdAbstractDialogFactory_Impl::CreateSdSnapLineDlg(weld::Window* pParent, const SfxItemSet& rInAttrs, ::sd::View* pView)
+namespace
{
- return VclPtr<AbstractSdSnapLineDlg_Impl>::Create(std::make_unique<SdSnapLineDlg>(pParent, rInAttrs, pView));
-}
-
-VclPtr<AbstractSdInsertLayerDlg> SdAbstractDialogFactory_Impl::CreateSdInsertLayerDlg(weld::Window* pParent, const SfxItemSet& rInAttrs, bool bDeletable, const OUString& aStr)
+class SdPresLayoutTemplateDlg_Impl
+ : public ScreenshottedDialog_Impl_Async<SfxAbstractTabDialog, SdPresLayoutTemplateDlg>
{
- return VclPtr<AbstractSdInsertLayerDlg_Impl>::Create(std::make_unique<SdInsertLayerDlg>(pParent, rInAttrs, bDeletable, aStr));
+public:
+ using ScreenshottedDialog_Impl_BASE::ScreenshottedDialog_Impl_BASE;
+ void SetCurPageId(const OUString& rName) override { m_pDlg->SetCurPageId(rName); }
+ const SfxItemSet* GetOutputItemSet() const override { return m_pDlg->GetOutputItemSet(); }
+ WhichRangesContainer GetInputRanges(const SfxItemPool& pItem) override
+ {
+ return m_pDlg->GetInputRanges(pItem);
+ }
+ void SetInputSet(const SfxItemSet* pInSet) override { m_pDlg->SetInputSet(pInSet); }
+ void SetText(const OUString& rStr) override { m_pDlg->set_title(rStr); }
+};
}
-VclPtr<AbstractSdInsertPagesObjsDlg> SdAbstractDialogFactory_Impl::CreateSdInsertPagesObjsDlg(weld::Window* pParent, const SdDrawDocument* pDoc, SfxMedium* pSfxMedium, const OUString& rFileName)
+VclPtr<SfxAbstractTabDialog> SdAbstractDialogFactory_Impl::CreateSdPresLayoutTemplateDlg(SfxObjectShell* pDocSh, weld::Window* pParent, bool bBackgroundDlg, SfxStyleSheetBase& rStyleBase, PresentationObjects ePO, SfxStyleSheetBasePool* pSSPool)
{
- return VclPtr<AbstractSdInsertPagesObjsDlg_Impl>::Create(std::make_unique<SdInsertPagesObjsDlg>(pParent, pDoc, pSfxMedium, rFileName));
+ return VclPtr<SdPresLayoutTemplateDlg_Impl>::Create(pDocSh, pParent, bBackgroundDlg, rStyleBase, ePO, pSSPool);
}
-VclPtr<AbstractMorphDlg> SdAbstractDialogFactory_Impl::CreateMorphDlg(weld::Window* pParent, const SdrObject* pObj1, const SdrObject* pObj2)
+namespace
{
- return VclPtr<AbstractMorphDlg_Impl>::Create(std::make_unique<::sd::MorphDlg>(pParent, pObj1, pObj2));
-}
-
-VclPtr<SfxAbstractTabDialog> SdAbstractDialogFactory_Impl::CreateSdOutlineBulletTabDlg(weld::Window* pParent, const SfxItemSet* pAttr, ::sd::View* pView)
+class AbstractSdPresLayoutDlg_Impl
+ : public ScreenshottedDialog_Impl_Sync<AbstractSdPresLayoutDlg, SdPresLayoutDlg>
{
- return VclPtr<AbstractBulletDialog_Impl>::Create(std::make_shared<::sd::OutlineBulletDlg>(pParent, pAttr, pView));
+public:
+ using ScreenshottedDialog_Impl_BASE::ScreenshottedDialog_Impl_BASE;
+ void GetAttr(SfxItemSet& rOutAttrs) override { m_pDlg->GetAttr(rOutAttrs); }
+};
}
-VclPtr<SfxAbstractTabDialog> SdAbstractDialogFactory_Impl::CreateSdParagraphTabDlg(weld::Window* pParent, const SfxItemSet* pAttr )
+VclPtr<AbstractSdPresLayoutDlg> SdAbstractDialogFactory_Impl::CreateSdPresLayoutDlg(weld::Window* pParent, ::sd::DrawDocShell* pDocShell, const SfxItemSet& rInAttrs)
{
- return VclPtr<SdAbstractTabController_Impl>::Create(std::make_shared<SdParagraphDlg>(pParent, pAttr));
+ return VclPtr<AbstractSdPresLayoutDlg_Impl>::Create(pDocShell, pParent, rInAttrs);
}
-VclPtr<AbstractSdStartPresDlg> SdAbstractDialogFactory_Impl::CreateSdStartPresentationDlg(weld::Window* pParent,
- const SfxItemSet& rInAttrs, const std::vector<OUString> &rPageNames, SdCustomShowList* pCSList)
+VclPtr<SfxAbstractTabDialog> SdAbstractDialogFactory_Impl::CreateSdTabTemplateDlg(weld::Window* pParent, const SfxObjectShell* pDocShell, SfxStyleSheetBase& rStyleBase, SdrModel* pModel, SdrView* pView)
{
- return VclPtr<AbstractSdStartPresDlg_Impl>::Create(std::make_unique<SdStartPresentationDlg>(pParent, rInAttrs, rPageNames, pCSList));
+ return VclPtr<SdAbstractTabController_Impl<SdTabTemplateDlg>>::Create(pParent, pDocShell, rStyleBase, pModel, pView);
}
-VclPtr<VclAbstractDialog> SdAbstractDialogFactory_Impl::CreateRemoteDialog(weld::Window* pParent)
+namespace
{
- return VclPtr<SdAbstractGenericDialog_Impl>::Create(std::make_unique<::sd::RemoteDialog>(pParent));
-}
-
-VclPtr<SfxAbstractTabDialog> SdAbstractDialogFactory_Impl::CreateSdPresLayoutTemplateDlg(SfxObjectShell* pDocSh, weld::Window* pParent, bool bBackgroundDlg, SfxStyleSheetBase& rStyleBase, PresentationObjects ePO, SfxStyleSheetBasePool* pSSPool)
+class SdAbstractActionDialog_Impl
+ : public ScreenshottedDialog_Impl_Async<SfxAbstractDialog, SdActionDlg>
{
- return VclPtr<SdPresLayoutTemplateDlg_Impl>::Create(std::make_shared<SdPresLayoutTemplateDlg>(pDocSh, pParent, bBackgroundDlg, rStyleBase, ePO, pSSPool));
+public:
+ using ScreenshottedDialog_Impl_BASE::ScreenshottedDialog_Impl_BASE;
+ const SfxItemSet* GetOutputItemSet() const override { return m_pDlg->GetOutputItemSet(); }
+ void SetText(const OUString& rStr) override { m_pDlg->set_title(rStr); }
+};
}
-VclPtr<AbstractSdPresLayoutDlg> SdAbstractDialogFactory_Impl::CreateSdPresLayoutDlg(weld::Window* pParent, ::sd::DrawDocShell* pDocShell, const SfxItemSet& rInAttrs)
+VclPtr<SfxAbstractDialog> SdAbstractDialogFactory_Impl::CreatSdActionDialog(weld::Window* pParent, const SfxItemSet& rAttr, ::sd::View* pView )
{
- return VclPtr<AbstractSdPresLayoutDlg_Impl>::Create(std::make_unique<SdPresLayoutDlg>(pDocShell, pParent, rInAttrs));
+ return VclPtr<SdAbstractActionDialog_Impl>::Create(pParent, rAttr, pView);
}
-VclPtr<SfxAbstractTabDialog> SdAbstractDialogFactory_Impl::CreateSdTabTemplateDlg(weld::Window* pParent, const SfxObjectShell* pDocShell, SfxStyleSheetBase& rStyleBase, SdrModel* pModel, SdrView* pView)
+namespace
{
- return VclPtr<SdAbstractTabController_Impl>::Create(std::make_shared<SdTabTemplateDlg>(pParent, pDocShell, rStyleBase, pModel, pView));
-}
-
-VclPtr<SfxAbstractDialog> SdAbstractDialogFactory_Impl::CreatSdActionDialog(weld::Window* pParent, const SfxItemSet& rAttr, ::sd::View* pView )
+class AbstractSdVectorizeDlg_Impl
+ : public ScreenshottedDialog_Impl_Sync<AbstractSdVectorizeDlg, SdVectorizeDlg>
{
- return VclPtr<SdAbstractSfxDialog_Impl>::Create(std::make_unique<SdActionDlg>(pParent, rAttr, pView));
+public:
+ using ScreenshottedDialog_Impl_BASE::ScreenshottedDialog_Impl_BASE;
+ const GDIMetaFile& GetGDIMetaFile() const override { return m_pDlg->GetGDIMetaFile(); }
+};
}
VclPtr<AbstractSdVectorizeDlg> SdAbstractDialogFactory_Impl::CreateSdVectorizeDlg(weld::Window* pParent, const Bitmap& rBmp, ::sd::DrawDocShell* pDocShell)
{
- return VclPtr<AbstractSdVectorizeDlg_Impl>::Create(std::make_unique<SdVectorizeDlg>(pParent, rBmp, pDocShell));
+ return VclPtr<AbstractSdVectorizeDlg_Impl>::Create(pParent, rBmp, pDocShell);
}
// Factories for TabPages
@@ -700,18 +422,20 @@ CreateTabPage SdAbstractDialogFactory_Impl::GetSdOptionsSnapTabPageCreatorFunc()
VclPtr<VclAbstractDialog> SdAbstractDialogFactory_Impl::CreateMasterLayoutDialog(weld::Window* pParent, SdDrawDocument* pDoc, SdPage* pCurrentPage)
{
- return VclPtr<AbstractMasterLayoutDialog_Impl>::Create(std::make_unique<::sd::MasterLayoutDialog>(pParent, pDoc, pCurrentPage));
+ return VclPtr<SdAbstractGenericDialog_Impl<sd::MasterLayoutDialog>>::Create(pParent, pDoc, pCurrentPage);
}
VclPtr<AbstractHeaderFooterDialog> SdAbstractDialogFactory_Impl::CreateHeaderFooterDialog(sd::ViewShell* pViewShell,
weld::Window* pParent, SdDrawDocument* pDoc, SdPage* pCurrentPage)
{
- return VclPtr<AbstractHeaderFooterDialog_Impl>::Create(std::make_shared<::sd::HeaderFooterDialog>(pViewShell, pParent, pDoc, pCurrentPage));
+ using AbstractHeaderFooterDialog_Impl
+ = ScreenshottedDialog_Impl_Async<AbstractHeaderFooterDialog, sd::HeaderFooterDialog>;
+ return VclPtr<AbstractHeaderFooterDialog_Impl>::Create(pViewShell, pParent, pDoc, pCurrentPage);
}
VclPtr<VclAbstractDialog> SdAbstractDialogFactory_Impl::CreateSdPhotoAlbumDialog(weld::Window* pParent, SdDrawDocument* pDoc)
{
- return VclPtr<SdAbstractGenericDialog_Impl>::Create(std::make_unique<sd::SdPhotoAlbumDialog>(pParent, pDoc));
+ return VclPtr<SdAbstractGenericDialog_Impl<sd::SdPhotoAlbumDialog>>::Create(pParent, pDoc);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/dlg/sddlgfact.hxx b/sd/source/ui/dlg/sddlgfact.hxx
index af494244739d..3a2488cb6753 100644
--- a/sd/source/ui/dlg/sddlgfact.hxx
+++ b/sd/source/ui/dlg/sddlgfact.hxx
@@ -19,367 +19,6 @@
#pragma once
#include <sdabstdlg.hxx>
-#include <sfx2/basedlgs.hxx>
-#include <sfx2/sfxdlg.hxx>
-#include <svx/svxdlg.hxx>
-
-#include <morphdlg.hxx>
-#include <copydlg.hxx>
-#include <BreakDlg.hxx>
-#include <headerfooterdlg.hxx>
-#include <masterlayoutdlg.hxx>
-#include <custsdlg.hxx>
-#include <layeroptionsdlg.hxx>
-#include <inspagob.hxx>
-#include <dlgfield.hxx>
-#include <sdpreslt.hxx>
-#include <prltempl.hxx>
-#include <dlgsnap.hxx>
-#include <present.hxx>
-#include <vectdlg.hxx>
-#include <BulletAndPositionDlg.hxx>
-
-//namespace sd {
-// class MorphDlg;
-// class CopyDlg;
-// class BreakDlg;
-// class HeaderFooterDialog;
-// class MasterLayoutDialog;
-//}
-
-class SvxBulletAndPositionDlg;
-
-/// Provides managing and getting information from the numbering and position dialog.
-class AbstractSvxBulletAndPositionDlg_Impl :public AbstractSvxBulletAndPositionDlg
-{
- std::unique_ptr<SvxBulletAndPositionDlg> m_xDlg;
-public:
- explicit AbstractSvxBulletAndPositionDlg_Impl(std::unique_ptr<SvxBulletAndPositionDlg> p)
- : m_xDlg(std::move(p))
- {
- }
- virtual short Execute() override;
- virtual const SfxItemSet* GetOutputItemSet( SfxItemSet* ) const override ;
- virtual bool IsApplyToMaster() override;
- virtual bool IsSlideScope() override;
-};
-
-class SdAbstractGenericDialog_Impl : public VclAbstractDialog
-{
- std::unique_ptr<weld::GenericDialogController> m_xDlg;
-public:
- explicit SdAbstractGenericDialog_Impl(std::unique_ptr<weld::GenericDialogController> p)
- : m_xDlg(std::move(p))
- {
- }
- virtual short Execute() override;
-
- // screenshotting
- virtual BitmapEx createScreenshot() const override;
- virtual OUString GetScreenshotId() const override;
-};
-
-class AbstractMasterLayoutDialog_Impl : public VclAbstractDialog
-{
-private:
- std::unique_ptr<sd::MasterLayoutDialog> m_xDlg;
-public:
- AbstractMasterLayoutDialog_Impl(std::unique_ptr<::sd::MasterLayoutDialog> pDlg);
- virtual short Execute() override;
-
- // screenshotting
- virtual BitmapEx createScreenshot() const override;
- virtual OUString GetScreenshotId() const override;
-};
-
-class AbstractBreakDlg_Impl : public VclAbstractDialog
-{
-private:
- std::unique_ptr<sd::BreakDlg> m_xDlg;
-public:
- AbstractBreakDlg_Impl(std::unique_ptr<::sd::BreakDlg> pDlg);
- virtual short Execute() override;
-
- // screenshotting
- virtual BitmapEx createScreenshot() const override;
- virtual OUString GetScreenshotId() const override;
-};
-
-class AbstractCopyDlg_Impl : public AbstractCopyDlg
-{
-private:
- std::unique_ptr<sd::CopyDlg> m_xDlg;
-public:
- AbstractCopyDlg_Impl(std::unique_ptr<::sd::CopyDlg> pDlg)
- : m_xDlg(std::move(pDlg))
- {
- }
- virtual short Execute() override;
- virtual void GetAttr( SfxItemSet& rOutAttrs ) override;
-
- // screenshotting
- virtual BitmapEx createScreenshot() const override;
- virtual OUString GetScreenshotId() const override;
-};
-
-class AbstractSdCustomShowDlg_Impl : public AbstractSdCustomShowDlg
-{
-private:
- std::unique_ptr<SdCustomShowDlg> m_xDlg;
-public:
- AbstractSdCustomShowDlg_Impl(std::unique_ptr<SdCustomShowDlg> pDlg)
- : m_xDlg(std::move(pDlg))
- {
- }
- virtual short Execute() override;
- virtual bool IsCustomShow() const override ;
-
- // screenshotting
- virtual BitmapEx createScreenshot() const override;
- virtual OUString GetScreenshotId() const override;
-};
-
-class SdAbstractTabController_Impl : public SfxAbstractTabDialog
-{
- std::shared_ptr<SfxTabDialogController> m_xDlg;
-public:
- explicit SdAbstractTabController_Impl(std::shared_ptr<SfxTabDialogController> p)
- : m_xDlg(std::move(p))
- {
- }
- virtual short Execute() override;
- virtual bool StartExecuteAsync(AsyncContext &rCtx) override;
- virtual void SetCurPageId( const OUString &rName ) override;
- virtual const SfxItemSet* GetOutputItemSet() const override;
- virtual WhichRangesContainer GetInputRanges( const SfxItemPool& pItem ) override;
- virtual void SetInputSet( const SfxItemSet* pInSet ) override;
- virtual void SetText( const OUString& rStr ) override;
-
- // screenshotting
- virtual BitmapEx createScreenshot() const override;
- virtual OUString GetScreenshotId() const override;
-};
-
-class AbstractBulletDialog_Impl : public SfxAbstractTabDialog
-{
- std::shared_ptr<SfxTabDialogController> m_xDlg;
-public:
- explicit AbstractBulletDialog_Impl(std::shared_ptr<SfxTabDialogController> p)
- : m_xDlg(std::move(p))
- {
- }
- virtual short Execute() override;
- virtual bool StartExecuteAsync(AsyncContext &rCtx) override;
- virtual void SetCurPageId( const OUString& rName ) override;
- virtual const SfxItemSet* GetOutputItemSet() const override;
- virtual WhichRangesContainer GetInputRanges( const SfxItemPool& pItem ) override;
- virtual void SetInputSet( const SfxItemSet* pInSet ) override;
- virtual void SetText( const OUString& rStr ) override;
-
- // screenshotting
- virtual BitmapEx createScreenshot() const override;
- virtual OUString GetScreenshotId() const override;
-};
-
-class SdPresLayoutTemplateDlg_Impl : public SfxAbstractTabDialog
-{
- std::shared_ptr<SdPresLayoutTemplateDlg> m_xDlg;
-public:
- explicit SdPresLayoutTemplateDlg_Impl(std::shared_ptr<SdPresLayoutTemplateDlg> p)
- : m_xDlg(std::move(p))
- {
- }
- virtual short Execute() override;
- virtual bool StartExecuteAsync(AsyncContext &rCtx) override;
- virtual void SetCurPageId( const OUString& rName ) override;
- virtual const SfxItemSet* GetOutputItemSet() const override;
- virtual WhichRangesContainer GetInputRanges( const SfxItemPool& pItem ) override;
- virtual void SetInputSet( const SfxItemSet* pInSet ) override;
- virtual void SetText( const OUString& rStr ) override;
-
- // screenshotting
- virtual BitmapEx createScreenshot() const override;
- virtual OUString GetScreenshotId() const override;
-};
-
-class AbstractSdModifyFieldDlg_Impl : public AbstractSdModifyFieldDlg
-{
-private:
- std::unique_ptr<SdModifyFieldDlg> m_xDlg;
-public:
- AbstractSdModifyFieldDlg_Impl(std::unique_ptr<SdModifyFieldDlg> pDlg)
- : m_xDlg(std::move(pDlg))
- {
- }
- virtual short Execute() override;
- virtual SvxFieldData* GetField() override;
- virtual SfxItemSet GetItemSet() override;
-
- // screenshotting
- virtual BitmapEx createScreenshot() const override;
- virtual OUString GetScreenshotId() const override;
-};
-
-class AbstractSdSnapLineDlg_Impl : public AbstractSdSnapLineDlg
-{
-private:
- std::unique_ptr<SdSnapLineDlg> m_xDlg;
-public:
- AbstractSdSnapLineDlg_Impl(std::unique_ptr<SdSnapLineDlg> pDlg)
- : m_xDlg(std::move(pDlg))
- {
- }
- virtual short Execute() override;
- virtual void GetAttr(SfxItemSet& rOutAttrs) override;
- virtual void HideRadioGroup() override;
- virtual void HideDeleteBtn() override;
- virtual void SetInputFields(bool bEnableX, bool bEnableY) override;
- virtual void SetText( const OUString& rStr ) override;
-
- // screenshotting
- virtual BitmapEx createScreenshot() const override;
- virtual OUString GetScreenshotId() const override;
-};
-
-class AbstractSdInsertLayerDlg_Impl : public AbstractSdInsertLayerDlg
-{
-private:
- std::unique_ptr<SdInsertLayerDlg> m_xDlg;
-public:
- AbstractSdInsertLayerDlg_Impl(std::unique_ptr<SdInsertLayerDlg> pDlg)
- : m_xDlg(std::move(pDlg))
- {
- }
- virtual short Execute() override;
- virtual void GetAttr( SfxItemSet& rOutAttrs ) override ;
- virtual void SetHelpId( const OUString& rHelpId ) override ;
-
- // screenshotting
- virtual BitmapEx createScreenshot() const override;
- virtual OUString GetScreenshotId() const override;
-};
-
-class AbstractSdInsertPagesObjsDlg_Impl : public AbstractSdInsertPagesObjsDlg
-{
-private:
- std::unique_ptr<SdInsertPagesObjsDlg> m_xDlg;
-public:
- AbstractSdInsertPagesObjsDlg_Impl(std::unique_ptr<SdInsertPagesObjsDlg> pDlg)
- : m_xDlg(std::move(pDlg))
- {
- }
- virtual short Execute() override;
- virtual std::vector<OUString> GetList ( const sal_uInt16 nType ) override;
- virtual bool IsLink() override;
- virtual bool IsRemoveUnnecessaryMasterPages() const override;
-
- // screenshotting
- virtual BitmapEx createScreenshot() const override;
- virtual OUString GetScreenshotId() const override;
-};
-
-class AbstractMorphDlg_Impl : public AbstractMorphDlg
-{
-private:
- std::unique_ptr<sd::MorphDlg> m_xDlg;
-public:
- AbstractMorphDlg_Impl(std::unique_ptr<::sd::MorphDlg> pDlg)
- : m_xDlg(std::move(pDlg))
- {
- }
- virtual short Execute() override;
- virtual void SaveSettings() const override;
- virtual sal_uInt16 GetFadeSteps() const override;
- virtual bool IsAttributeFade() const override ;
- virtual bool IsOrientationFade() const override ;
-
- // screenshotting
- virtual BitmapEx createScreenshot() const override;
- virtual OUString GetScreenshotId() const override;
-};
-
-class AbstractSdStartPresDlg_Impl : public AbstractSdStartPresDlg
-{
-private:
- std::unique_ptr<SdStartPresentationDlg> m_xDlg;
-public:
- AbstractSdStartPresDlg_Impl(std::unique_ptr<SdStartPresentationDlg> pDlg)
- : m_xDlg(std::move(pDlg))
- {
- }
- virtual short Execute() override;
- virtual void GetAttr( SfxItemSet& rOutAttrs ) override;
-
- // screenshotting
- virtual BitmapEx createScreenshot() const override;
- virtual OUString GetScreenshotId() const override;
-};
-
-class AbstractSdPresLayoutDlg_Impl : public AbstractSdPresLayoutDlg
-{
-private:
- std::unique_ptr<SdPresLayoutDlg> m_xDlg;
-public:
- AbstractSdPresLayoutDlg_Impl(std::unique_ptr<SdPresLayoutDlg> pDlg)
- : m_xDlg(std::move(pDlg))
- {
- }
- virtual short Execute() override;
- virtual void GetAttr(SfxItemSet& rOutAttrs) override;
-
- // screenshotting
- virtual BitmapEx createScreenshot() const override;
- virtual OUString GetScreenshotId() const override;
-};
-
-class SdAbstractSfxDialog_Impl : public SfxAbstractDialog
-{
-private:
- std::shared_ptr<SfxSingleTabDialogController> m_xDlg;
-public:
- SdAbstractSfxDialog_Impl(std::shared_ptr<SfxSingleTabDialogController> pDlg)
- : m_xDlg(std::move(pDlg))
- {
- }
- virtual short Execute() override;
- virtual const SfxItemSet* GetOutputItemSet() const override;
- virtual void SetText( const OUString& rStr ) override;
- virtual bool StartExecuteAsync(AsyncContext &rCtx) override;
-};
-
-class AbstractSdVectorizeDlg_Impl :public AbstractSdVectorizeDlg
-{
-private:
- std::unique_ptr<SdVectorizeDlg> m_xDlg;
-public:
- AbstractSdVectorizeDlg_Impl(std::unique_ptr<SdVectorizeDlg> pDlg)
- : m_xDlg(std::move(pDlg))
- {
- }
- virtual short Execute() override;
- virtual const GDIMetaFile& GetGDIMetaFile() const override ;
-
- // screenshotting
- virtual BitmapEx createScreenshot() const override;
- virtual OUString GetScreenshotId() const override;
-};
-
-class AbstractHeaderFooterDialog_Impl :public AbstractHeaderFooterDialog
-{
-private:
- std::shared_ptr<::sd::HeaderFooterDialog> m_xDlg;
-public:
- AbstractHeaderFooterDialog_Impl(std::shared_ptr<::sd::HeaderFooterDialog> pDlg)
- : m_xDlg(std::move(pDlg))
- {
- }
- virtual short Execute() override;
- virtual bool StartExecuteAsync(AsyncContext &rCtx) override;
-
- // screenshotting
- virtual BitmapEx createScreenshot() const override;
- virtual OUString GetScreenshotId() const override;
-};
//AbstractDialogFactory_Impl implementations
class SdAbstractDialogFactory_Impl : public SdAbstractDialogFactory
diff --git a/sd/source/ui/dlg/sduiexp.cxx b/sd/source/ui/dlg/sduiexp.cxx
index 705980f5b4ee..c41609843476 100644
--- a/sd/source/ui/dlg/sduiexp.cxx
+++ b/sd/source/ui/dlg/sduiexp.cxx
@@ -19,7 +19,9 @@
#include "sddlgfact.hxx"
#include <sal/types.h>
+#include <cppuhelper/implbase.hxx>
#include <cppuhelper/supportsservice.hxx>
+#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/lang/XUnoTunnel.hpp>
class SdAbstractDialogFactory;