summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2024-12-19 19:22:10 +0500
committerMike Kaganski <mike.kaganski@collabora.com>2024-12-21 22:18:40 +0100
commit141f3fd15633803afa720837405a0bacbc2726cb (patch)
treed993a91a475844deca30b2398560ecc1fab348a2
parent729dfe5baa7dc3cfa1365cbed0ac09ff28332bed (diff)
Simplify abstract dialog impls using vcl::AbstractDialogImpl* in sc HEADmaster
Change-Id: Iff9ac377a5cfa259c5911632ad16d2b1e3269868 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178986 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
-rw-r--r--sc/source/ui/attrdlg/scdlgfact.cxx1573
-rw-r--r--sc/source/ui/attrdlg/scdlgfact.hxx635
-rw-r--r--sc/source/ui/attrdlg/scuiexp.cxx5
3 files changed, 569 insertions, 1644 deletions
diff --git a/sc/source/ui/attrdlg/scdlgfact.cxx b/sc/source/ui/attrdlg/scdlgfact.cxx
index c088322f01a2..2dc64da32d5f 100644
--- a/sc/source/ui/attrdlg/scdlgfact.cxx
+++ b/sc/source/ui/attrdlg/scdlgfact.cxx
@@ -29,6 +29,7 @@
#include <delcldlg.hxx>
#include <delcodlg.hxx>
#include <filldlg.hxx>
+#include <gototabdlg.hxx>
#include <groupdlg.hxx>
#include <inscldlg.hxx>
#include <inscodlg.hxx>
@@ -70,1212 +71,717 @@
#include <sfx2/sfxdlg.hxx>
#include <conditio.hxx>
+#include <vcl/abstdlgimpl.hxx>
#include <vcl/virdev.hxx>
-short AbstractScImportAsciiDlg_Impl::Execute()
+namespace
{
- return m_xDlg->run();
-}
-
-bool AbstractScImportAsciiDlg_Impl::StartExecuteAsync(VclAbstractDialog::AsyncContext &rCtx)
-{
- return weld::DialogController::runAsync(m_xDlg, rCtx.maEndDialogFn);
-}
-
-short AbstractScAutoFormatDlg_Impl::Execute()
-{
- return m_xDlg->run();
-}
-
-short AbstractScColRowLabelDlg_Impl::Execute()
-{
- return m_xDlg->run();
-}
-
-bool AbstractScColRowLabelDlg_Impl::StartExecuteAsync(AsyncContext &rCtx)
-{
- return weld::GenericDialogController::runAsync(m_xDlg, rCtx.maEndDialogFn);
-}
-
-short AbstractScCondFormatManagerDlg_Impl::Execute()
-{
- return m_xDlg->run();
-}
-
-bool AbstractScCondFormatManagerDlg_Impl::StartExecuteAsync(VclAbstractDialog::AsyncContext &rCtx)
-{
- return weld::DialogController::runAsync(m_xDlg, rCtx.maEndDialogFn);
-}
-
-short AbstractScDataPilotDatabaseDlg_Impl::Execute()
-{
- return m_xDlg->run();
-}
-
-bool AbstractScDataPilotDatabaseDlg_Impl::StartExecuteAsync(AsyncContext &rCtx)
-{
- return weld::DialogController::runAsync(m_xDlg, rCtx.maEndDialogFn);
-}
-
-short AbstractScDataPilotSourceTypeDlg_Impl::Execute()
-{
- return m_xDlg->run();
-}
-
-bool AbstractScDataPilotSourceTypeDlg_Impl::StartExecuteAsync(AsyncContext &rCtx)
-{
- return weld::DialogController::runAsync(m_xDlg, rCtx.maEndDialogFn);
-}
-
-short AbstractScDataPilotServiceDlg_Impl::Execute()
-{
- return m_xDlg->run();
-}
-
-bool AbstractScDataPilotServiceDlg_Impl::StartExecuteAsync(VclAbstractDialog::AsyncContext &rCtx)
-{
- return weld::DialogController::runAsync(m_xDlg, rCtx.maEndDialogFn);
-}
-
-short AbstractScDeleteCellDlg_Impl::Execute()
-{
- return m_xDlg->run();
-}
-
-bool AbstractScDeleteCellDlg_Impl::StartExecuteAsync(AsyncContext& rCtx)
-{
- return ScDeleteCellDlg::runAsync(m_xDlg, rCtx.maEndDialogFn);
-}
-
-//for dataform
-short AbstractScDataFormDlg_Impl::Execute()
-{
- return m_xDlg->run();
-}
-
-BitmapEx AbstractScDataFormDlg_Impl::createScreenshot() const
-{
- VclPtr<VirtualDevice> xDialogSurface(m_xDlg->getDialog()->screenshot());
- return xDialogSurface->GetBitmapEx(Point(), xDialogSurface->GetOutputSizePixel());
-}
-
-OUString AbstractScDataFormDlg_Impl::GetScreenshotId() const
-{
- return m_xDlg->get_help_id();
-}
-
-short AbstractScDeleteContentsDlg_Impl::Execute()
-{
- return m_xDlg->run();
-}
-
-short AbstractScFillSeriesDlg_Impl::Execute()
-{
- return m_xDlg->run();
-}
-
-short AbstractScGroupDlg_Impl::Execute()
-{
- return m_xDlg->run();
-}
-
-short AbstractScInsertCellDlg_Impl::Execute()
-{
- return m_xDlg->run();
-}
-
-bool AbstractScInsertCellDlg_Impl::StartExecuteAsync(AsyncContext& rCtx)
-{
- return ScInsertCellDlg::runAsync(m_xDlg, rCtx.maEndDialogFn);
-}
-
-short AbstractScInsertContentsDlg_Impl::Execute()
-{
- return m_xDlg->run();
-}
-
-short AbstractScInsertTableDlg_Impl::Execute()
-{
- return m_xDlg->run();
-}
-
-bool AbstractScInsertTableDlg_Impl::StartExecuteAsync(VclAbstractDialog::AsyncContext &rCtx)
-{
- return weld::DialogController::runAsync(m_xDlg, rCtx.maEndDialogFn);
-}
-
-short AbstractScSelEntryDlg_Impl::Execute()
-{
- return m_xDlg->run();
-}
-
-short AbstractScMetricInputDlg_Impl::Execute()
-{
- return m_xDlg->run();
-}
-
-bool AbstractScMetricInputDlg_Impl::StartExecuteAsync(AsyncContext& rCtx)
-{
- return ScMetricInputDlg::runAsync(m_xDlg, rCtx.maEndDialogFn);
-}
-
-short AbstractScMoveTableDlg_Impl::Execute()
-{
- return m_xDlg->run();
-}
-
-bool AbstractScMoveTableDlg_Impl::StartExecuteAsync(VclAbstractDialog::AsyncContext& rCtx)
-{
- return weld::DialogController::runAsync(m_xDlg, rCtx.maEndDialogFn);
-}
-
-BitmapEx AbstractScMoveTableDlg_Impl::createScreenshot() const
-{
- VclPtr<VirtualDevice> xDialogSurface(m_xDlg->getDialog()->screenshot());
- return xDialogSurface->GetBitmapEx(Point(), xDialogSurface->GetOutputSizePixel());
-}
-
-OUString AbstractScMoveTableDlg_Impl::GetScreenshotId() const
-{
- return m_xDlg->get_help_id();
-}
-
-short AbstractScNameCreateDlg_Impl::Execute()
-{
- return m_xDlg->run();
-}
-
-short AbstractScNamePasteDlg_Impl::Execute()
-{
- return m_xDlg->run();
-}
-
-short AbstractScPivotFilterDlg_Impl::Execute()
-{
- return m_xDlg->run();
-}
-
-short AbstractScDPFunctionDlg_Impl::Execute()
-{
- return m_xDlg->run();
-}
-
-bool AbstractScDPFunctionDlg_Impl::StartExecuteAsync(VclAbstractDialog::AsyncContext &rCtx)
-{
- return weld::DialogController::runAsync(m_xDlg, rCtx.maEndDialogFn);
-}
-
-short AbstractScDPSubtotalDlg_Impl::Execute()
-{
- return m_xDlg->run();
-}
-
-bool AbstractScDPSubtotalDlg_Impl::StartExecuteAsync(VclAbstractDialog::AsyncContext &rCtx)
-{
- return weld::DialogController::runAsync(m_xDlg, rCtx.maEndDialogFn);
-}
-
-short AbstractScDPNumGroupDlg_Impl::Execute()
-{
- return m_xDlg->run();
-}
-
-short AbstractScDPDateGroupDlg_Impl::Execute()
-{
- return m_xDlg->run();
-}
-
-short AbstractScDPShowDetailDlg_Impl::Execute()
-{
- return m_xDlg->run();
-}
-
-short AbstractScNewScenarioDlg_Impl::Execute()
-{
- return m_xDlg->run();
-}
-
-short AbstractScShowTabDlg_Impl::Execute()
-{
- return m_xDlg->run();
-}
-
-bool AbstractScShowTabDlg_Impl::StartExecuteAsync(VclAbstractDialog::AsyncContext &rCtx)
-{
- return weld::DialogController::runAsync(m_xDlg, rCtx.maEndDialogFn);
-}
-
-short AbstractScGoToTabDlg_Impl::Execute()
-{
- return m_xDlg->run();
-}
-
-bool AbstractScGoToTabDlg_Impl::StartExecuteAsync(VclAbstractDialog::AsyncContext &rCtx)
-{
- return weld::DialogController::runAsync(m_xDlg, rCtx.maEndDialogFn);
-}
-
-short AbstractScSortWarningDlg_Impl::Execute()
-{
- return m_xDlg->run();
-}
-
-short AbstractScTabBgColorDlg_Impl::Execute()
-{
- return m_xDlg->run();
-}
-
-bool AbstractScTabBgColorDlg_Impl::StartExecuteAsync(VclAbstractDialog::AsyncContext &rCtx)
-{
- return weld::DialogController::runAsync(m_xDlg, rCtx.maEndDialogFn);
-}
-
-short AbstractScImportOptionsDlg_Impl::Execute()
-{
- return m_xDlg->run();
-}
-
-short AbstractScTextImportOptionsDlg_Impl::Execute()
-{
- return m_xDlg->run();
-}
-
-AbstractScLinkedAreaDlg_Impl::~AbstractScLinkedAreaDlg_Impl()
-{
-}
-
-short AbstractScLinkedAreaDlg_Impl::Execute()
-{
- return m_xDlg->run();
-}
-
-void AbstractScImportAsciiDlg_Impl::GetOptions( ScAsciiOptions& rOpt )
-{
- m_xDlg->GetOptions( rOpt );
-}
-
-void AbstractScImportAsciiDlg_Impl::SaveParameters()
-{
- m_xDlg->SaveParameters();
-}
-
-BitmapEx AbstractScImportAsciiDlg_Impl::createScreenshot() const
-{
- VclPtr<VirtualDevice> xDialogSurface(m_xDlg->getDialog()->screenshot());
- return xDialogSurface->GetBitmapEx(Point(), xDialogSurface->GetOutputSizePixel());
-}
-
-OUString AbstractScImportAsciiDlg_Impl::GetScreenshotId() const
-{
- return m_xDlg->get_help_id();
-}
-
-sal_uInt16 AbstractScAutoFormatDlg_Impl::GetIndex() const
-{
- return m_xDlg->GetIndex();
-}
-
-OUString AbstractScAutoFormatDlg_Impl::GetCurrFormatName()
-{
- return m_xDlg->GetCurrFormatName();
-}
-
-bool AbstractScColRowLabelDlg_Impl::IsCol()
-{
- return m_xDlg->IsCol();
-}
-
-bool AbstractScColRowLabelDlg_Impl::IsRow()
-{
- return m_xDlg->IsRow();
-}
-
-BitmapEx AbstractScColRowLabelDlg_Impl::createScreenshot() const
-{
- VclPtr<VirtualDevice> xDialogSurface(m_xDlg->getDialog()->screenshot());
- return xDialogSurface->GetBitmapEx(Point(), xDialogSurface->GetOutputSizePixel());
-}
-
-OUString AbstractScColRowLabelDlg_Impl::GetScreenshotId() const
-{
- return m_xDlg->get_help_id();
-}
-
-void AbstractScDataPilotDatabaseDlg_Impl::GetValues( ScImportSourceDesc& rDesc )
-{
- m_xDlg->GetValues(rDesc);
-}
-
-BitmapEx AbstractScDataPilotDatabaseDlg_Impl::createScreenshot() const
-{
- VclPtr<VirtualDevice> xDialogSurface(m_xDlg->getDialog()->screenshot());
- return xDialogSurface->GetBitmapEx(Point(), xDialogSurface->GetOutputSizePixel());
-}
-
-OUString AbstractScDataPilotDatabaseDlg_Impl::GetScreenshotId() const
-{
- return m_xDlg->get_help_id();
-}
-
-bool AbstractScDataPilotSourceTypeDlg_Impl::IsDatabase() const
-{
- return m_xDlg->IsDatabase();
-}
-
-bool AbstractScDataPilotSourceTypeDlg_Impl::IsExternal() const
-{
- return m_xDlg->IsExternal();
-}
-
-bool AbstractScDataPilotSourceTypeDlg_Impl::IsNamedRange() const
-{
- return m_xDlg->IsNamedRange();
-}
-
-OUString AbstractScDataPilotSourceTypeDlg_Impl::GetSelectedNamedRange() const
-{
- return m_xDlg->GetSelectedNamedRange();
-}
-
-void AbstractScDataPilotSourceTypeDlg_Impl::AppendNamedRange(const OUString& rName)
-{
- m_xDlg->AppendNamedRange(rName);
-}
-
-BitmapEx AbstractScDataPilotSourceTypeDlg_Impl::createScreenshot() const
-{
- VclPtr<VirtualDevice> xDialogSurface(m_xDlg->getDialog()->screenshot());
- return xDialogSurface->GetBitmapEx(Point(), xDialogSurface->GetOutputSizePixel());
-}
-
-OUString AbstractScDataPilotSourceTypeDlg_Impl::GetScreenshotId() const
-{
- return m_xDlg->get_help_id();
-}
-
-OUString AbstractScDataPilotServiceDlg_Impl::GetServiceName() const
-{
- return m_xDlg->GetServiceName();
-}
-
-OUString AbstractScDataPilotServiceDlg_Impl::GetParSource() const
-{
- return m_xDlg->GetParSource();
-}
-
-OUString AbstractScDataPilotServiceDlg_Impl::GetParName() const
-{
- return m_xDlg->GetParName();
-}
-
-OUString AbstractScDataPilotServiceDlg_Impl::GetParUser() const
-{
- return m_xDlg->GetParUser();
-}
-
-OUString AbstractScDataPilotServiceDlg_Impl::GetParPass() const
-{
- return m_xDlg->GetParPass();
-}
-
-DelCellCmd AbstractScDeleteCellDlg_Impl::GetDelCellCmd() const
-{
- return m_xDlg->GetDelCellCmd();
-}
-
-BitmapEx AbstractScDeleteCellDlg_Impl::createScreenshot() const
-{
- VclPtr<VirtualDevice> xDialogSurface(m_xDlg->getDialog()->screenshot());
- return xDialogSurface->GetBitmapEx(Point(), xDialogSurface->GetOutputSizePixel());
-}
-
-OUString AbstractScDeleteCellDlg_Impl::GetScreenshotId() const
-{
- return m_xDlg->get_help_id();
-}
-
-void AbstractScDeleteContentsDlg_Impl::DisableObjects()
-{
- m_xDlg->DisableObjects();
-}
-
-InsertDeleteFlags AbstractScDeleteContentsDlg_Impl::GetDelContentsCmdBits() const
-{
- return m_xDlg->GetDelContentsCmdBits();
-}
-
-BitmapEx AbstractScDeleteContentsDlg_Impl::createScreenshot() const
-{
- VclPtr<VirtualDevice> xDialogSurface(m_xDlg->getDialog()->screenshot());
- return xDialogSurface->GetBitmapEx(Point(), xDialogSurface->GetOutputSizePixel());
-}
-
-OUString AbstractScDeleteContentsDlg_Impl::GetScreenshotId() const
-{
- return m_xDlg->get_help_id();
-}
-
-FillDir AbstractScFillSeriesDlg_Impl::GetFillDir() const
-{
- return m_xDlg->GetFillDir();
-}
-
-FillCmd AbstractScFillSeriesDlg_Impl::GetFillCmd() const
-{
- return m_xDlg->GetFillCmd();
-}
-
-FillDateCmd AbstractScFillSeriesDlg_Impl::GetFillDateCmd() const
-{
- return m_xDlg->GetFillDateCmd();
-}
-
-double AbstractScFillSeriesDlg_Impl::GetStart() const
-{
- return m_xDlg->GetStart();
-}
-
-double AbstractScFillSeriesDlg_Impl::GetStep() const
-{
- return m_xDlg->GetStep();
-}
-
-double AbstractScFillSeriesDlg_Impl::GetMax() const
-{
- return m_xDlg->GetMax();
-}
-
-OUString AbstractScFillSeriesDlg_Impl::GetStartStr() const
-{
- return m_xDlg->GetStartStr();
-}
-
-void AbstractScFillSeriesDlg_Impl::SetEdStartValEnabled(bool bFlag)
-{
- m_xDlg->SetEdStartValEnabled(bFlag);
-}
-
-bool AbstractScGroupDlg_Impl::StartExecuteAsync(VclAbstractDialog::AsyncContext &rCtx)
-{
- return weld::DialogController::runAsync(m_xDlg, rCtx.maEndDialogFn);
-}
-
-bool AbstractScGroupDlg_Impl::GetColsChecked() const
-{
- return m_xDlg->GetColsChecked();
-}
-
-InsCellCmd AbstractScInsertCellDlg_Impl::GetInsCellCmd() const
-{
- return m_xDlg->GetInsCellCmd();
-}
-
-size_t AbstractScInsertCellDlg_Impl::GetCount() const
-{
- return m_xDlg->GetCount();
-}
-
-InsertDeleteFlags AbstractScInsertContentsDlg_Impl::GetInsContentsCmdBits() const
-{
- return m_xDlg->GetInsContentsCmdBits();
-}
-
-ScPasteFunc AbstractScInsertContentsDlg_Impl::GetFormulaCmdBits() const
-{
- return m_xDlg->GetFormulaCmdBits();
-}
-
-bool AbstractScInsertContentsDlg_Impl::IsSkipEmptyCells() const
-{
- return m_xDlg->IsSkipEmptyCells();
-}
-
-bool AbstractScInsertContentsDlg_Impl::IsLink() const
-{
- return m_xDlg->IsLink();
-}
-
-void AbstractScInsertContentsDlg_Impl::SetFillMode( bool bSet )
-{
- m_xDlg->SetFillMode( bSet );
-}
-
-void AbstractScInsertContentsDlg_Impl::SetOtherDoc( bool bSet )
-{
- m_xDlg->SetOtherDoc( bSet );
-}
-
-bool AbstractScInsertContentsDlg_Impl::IsTranspose() const
-{
- return m_xDlg->IsTranspose();
-}
-
-void AbstractScInsertContentsDlg_Impl::SetChangeTrack( bool bSet )
-{
- m_xDlg->SetChangeTrack( bSet );
-}
-
-void AbstractScInsertContentsDlg_Impl::SetCellShiftDisabled( CellShiftDisabledFlags nDisable )
-{
- m_xDlg->SetCellShiftDisabled( nDisable );
-}
-
-InsCellCmd AbstractScInsertContentsDlg_Impl::GetMoveMode()
-{
- return m_xDlg->GetMoveMode();
-}
-
-BitmapEx AbstractScInsertContentsDlg_Impl::createScreenshot() const
-{
- VclPtr<VirtualDevice> xDialogSurface(m_xDlg->getDialog()->screenshot());
- return xDialogSurface->GetBitmapEx(Point(), xDialogSurface->GetOutputSizePixel());
-}
-
-OUString AbstractScInsertContentsDlg_Impl::GetScreenshotId() const
-{
- return m_xDlg->get_help_id();
-}
-
-bool AbstractScInsertTableDlg_Impl::GetTablesFromFile()
-{
- return m_xDlg->GetTablesFromFile();
-}
-
-bool AbstractScInsertTableDlg_Impl::GetTablesAsLink()
-{
- return m_xDlg->GetTablesAsLink();
-}
-
-const OUString* AbstractScInsertTableDlg_Impl::GetFirstTable( sal_uInt16* pN )
-{
- return m_xDlg->GetFirstTable( pN );
-}
-
-ScDocShell* AbstractScInsertTableDlg_Impl::GetDocShellTables()
-{
- return m_xDlg->GetDocShellTables();
-}
-
-bool AbstractScInsertTableDlg_Impl::IsTableBefore()
-{
- return m_xDlg->IsTableBefore();
-}
-
-sal_uInt16 AbstractScInsertTableDlg_Impl::GetTableCount()
-{
- return m_xDlg->GetTableCount();
-}
-
-const OUString* AbstractScInsertTableDlg_Impl::GetNextTable( sal_uInt16* pN )
-{
- return m_xDlg->GetNextTable( pN );
-}
-
-BitmapEx AbstractScInsertTableDlg_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 AbstractScInsertTableDlg_Impl::GetScreenshotId() const
-{
- return m_xDlg->get_help_id();
-}
-
-OUString AbstractScSelEntryDlg_Impl::GetSelectedEntry() const
-{
- return m_xDlg->GetSelectedEntry();
-}
-
-void AbstractScLinkedAreaDlg_Impl::InitFromOldLink( const OUString& rFile, const OUString& rFilter,
- const OUString& rOptions, const OUString& rSource,
- sal_Int32 nRefreshDelaySeconds )
-{
- m_xDlg->InitFromOldLink( rFile, rFilter, rOptions, rSource, nRefreshDelaySeconds);
-}
-
-OUString AbstractScLinkedAreaDlg_Impl::GetURL()
-{
- return m_xDlg->GetURL();
-}
+ // 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(); }
+};
-OUString AbstractScLinkedAreaDlg_Impl::GetFilter()
-{
- return m_xDlg->GetFilter();
-}
+template <class Base, class Dialog>
+using ScreenshottedDialog_Impl_Sync
+ = ScreenshottedDialog_Impl_BASE<Base, Dialog, vcl::AbstractDialogImpl_Sync>;
-OUString AbstractScLinkedAreaDlg_Impl::GetOptions()
-{
- return m_xDlg->GetOptions();
+template <class Base, class Dialog>
+using ScreenshottedDialog_Impl_Async
+ = ScreenshottedDialog_Impl_BASE<Base, Dialog, vcl::AbstractDialogImpl_Async>;
}
-OUString AbstractScLinkedAreaDlg_Impl::GetSource()
-{
- return m_xDlg->GetSource();
-}
-
-sal_Int32 AbstractScLinkedAreaDlg_Impl::GetRefreshDelaySeconds()
-{
- return m_xDlg->GetRefreshDelaySeconds();
-}
+// =========================Factories for createdialog ===================
-std::unique_ptr<ScConditionalFormatList> AbstractScCondFormatManagerDlg_Impl::GetConditionalFormatList()
+namespace
{
- return m_xDlg->GetConditionalFormatList();
-}
-
-bool AbstractScCondFormatManagerDlg_Impl::CondFormatsChanged() const
+class AbstractScImportAsciiDlg_Impl
+ : public ScreenshottedDialog_Impl_Async<AbstractScImportAsciiDlg, ScImportAsciiDlg>
{
- return m_xDlg->CondFormatsChanged();
+public:
+ using ScreenshottedDialog_Impl_BASE::ScreenshottedDialog_Impl_BASE;
+ void GetOptions(ScAsciiOptions& rOpt) override { m_pDlg->GetOptions(rOpt); }
+ void SaveParameters() override { m_pDlg->SaveParameters(); }
+};
}
-void AbstractScCondFormatManagerDlg_Impl::SetModified()
+VclPtr<AbstractScImportAsciiDlg> ScAbstractDialogFactory_Impl::CreateScImportAsciiDlg(weld::Window* pParent,
+ const OUString& aDatName,
+ SvStream* pInStream, ScImportAsciiCall eCall)
{
- return m_xDlg->SetModified();
+ return VclPtr<AbstractScImportAsciiDlg_Impl>::Create(pParent, aDatName, pInStream, eCall);
}
-ScConditionalFormat* AbstractScCondFormatManagerDlg_Impl::GetCondFormatSelected()
+namespace
{
- return m_xDlg->GetCondFormatSelected();
-}
-
-int AbstractScMetricInputDlg_Impl::GetInputValue() const
+class AbstractScTextImportOptionsDlg_Impl
+ : public ScreenshottedDialog_Impl_Sync<AbstractScTextImportOptionsDlg, ScTextImportOptionsDlg>
{
- return m_xDlg->GetInputValue();
+public:
+ using ScreenshottedDialog_Impl_BASE::ScreenshottedDialog_Impl_BASE;
+ LanguageType GetLanguageType() const override { return m_pDlg->getLanguageType(); }
+ bool IsDateConversionSet() const override { return m_pDlg->isDateConversionSet(); }
+ bool IsScientificConversionSet() const override { return m_pDlg->isScientificConversionSet(); }
+ bool IsKeepAskingSet() const override { return m_pDlg->isKeepAskingSet(); }
+};
}
-sal_uInt16 AbstractScMoveTableDlg_Impl::GetSelectedDocument() const
+VclPtr<AbstractScTextImportOptionsDlg> ScAbstractDialogFactory_Impl::CreateScTextImportOptionsDlg(weld::Window* pParent)
{
- return m_xDlg->GetSelectedDocument();
+ return VclPtr<AbstractScTextImportOptionsDlg_Impl>::Create(pParent);
}
-sal_uInt16 AbstractScMoveTableDlg_Impl::GetSelectedTable() const
+namespace
{
- return m_xDlg->GetSelectedTable();
-}
-
-bool AbstractScMoveTableDlg_Impl::GetCopyTable() const
+class AbstractScAutoFormatDlg_Impl
+ : public vcl::AbstractDialogImpl_Sync<AbstractScAutoFormatDlg, ScAutoFormatDlg>
{
- return m_xDlg->GetCopyTable();
+public:
+ using AbstractDialogImpl_BASE::AbstractDialogImpl_BASE;
+ sal_uInt16 GetIndex() const override { return m_pDlg->GetIndex(); }
+ OUString GetCurrFormatName() override { return m_pDlg->GetCurrFormatName(); }
+};
}
-bool AbstractScMoveTableDlg_Impl::GetRenameTable() const
+VclPtr<AbstractScAutoFormatDlg> ScAbstractDialogFactory_Impl::CreateScAutoFormatDlg(weld::Window* pParent,
+ ScAutoFormat* pAutoFormat,
+ const ScAutoFormatData* pSelFormatData,
+ ScViewData& rViewData)
{
- return m_xDlg->GetRenameTable();
+ return VclPtr<AbstractScAutoFormatDlg_Impl>::Create(pParent, pAutoFormat, pSelFormatData, rViewData);
}
-void AbstractScMoveTableDlg_Impl::GetTabNameString( OUString& rString ) const
+namespace
{
- m_xDlg->GetTabNameString( rString );
-}
-
-void AbstractScMoveTableDlg_Impl::SetForceCopyTable()
+class AbstractScColRowLabelDlg_Impl
+ : public ScreenshottedDialog_Impl_Async<AbstractScColRowLabelDlg, ScColRowLabelDlg>
{
- return m_xDlg->SetForceCopyTable();
+public:
+ using ScreenshottedDialog_Impl_BASE::ScreenshottedDialog_Impl_BASE;
+ bool IsCol() override { return m_pDlg->IsCol(); }
+ bool IsRow() override { return m_pDlg->IsRow(); }
+};
}
-void AbstractScMoveTableDlg_Impl::EnableRenameTable(bool bFlag)
+VclPtr<AbstractScColRowLabelDlg> ScAbstractDialogFactory_Impl::CreateScColRowLabelDlg(weld::Window* pParent,
+ bool bCol, bool bRow)
{
- return m_xDlg->EnableRenameTable( bFlag);
+ return VclPtr<AbstractScColRowLabelDlg_Impl>::Create(pParent, bCol, bRow);
}
-CreateNameFlags AbstractScNameCreateDlg_Impl::GetFlags() const
+VclPtr<AbstractScSortWarningDlg> ScAbstractDialogFactory_Impl::CreateScSortWarningDlg(weld::Window* pParent, const OUString& rExtendText, const OUString& rCurrentText)
{
- return m_xDlg->GetFlags();
+ using AbstractScSortWarningDlg_Impl
+ = vcl::AbstractDialogImpl_Sync<AbstractScSortWarningDlg, ScSortWarningDlg>;
+ return VclPtr<AbstractScSortWarningDlg_Impl>::Create(pParent, rExtendText, rCurrentText);
}
-BitmapEx AbstractScNameCreateDlg_Impl::createScreenshot() const
+namespace
{
- VclPtr<VirtualDevice> xDialogSurface(m_xDlg->getDialog()->screenshot());
- return xDialogSurface->GetBitmapEx(Point(), xDialogSurface->GetOutputSizePixel());
-}
-
-OUString AbstractScNameCreateDlg_Impl::GetScreenshotId() const
+class AbstractScCondFormatManagerDlg_Impl
+ : public vcl::AbstractDialogImpl_Async<AbstractScCondFormatManagerDlg, ScCondFormatManagerDlg>
{
- return m_xDlg->get_help_id();
+public:
+ using AbstractDialogImpl_BASE::AbstractDialogImpl_BASE;
+ std::unique_ptr<ScConditionalFormatList> GetConditionalFormatList() override
+ {
+ return m_pDlg->GetConditionalFormatList();
+ }
+ bool CondFormatsChanged() const override { return m_pDlg->CondFormatsChanged(); }
+ void SetModified() override { return m_pDlg->SetModified(); }
+ ScConditionalFormat* GetCondFormatSelected() override
+ {
+ return m_pDlg->GetCondFormatSelected();
+ }
+};
}
-std::vector<OUString> AbstractScNamePasteDlg_Impl::GetSelectedNames() const
+VclPtr<AbstractScCondFormatManagerDlg> ScAbstractDialogFactory_Impl::CreateScCondFormatMgrDlg(weld::Window* pParent, ScDocument& rDoc, const ScConditionalFormatList* pFormatList )
{
- return m_xDlg->GetSelectedNames();
+ return VclPtr<AbstractScCondFormatManagerDlg_Impl>::Create(pParent, rDoc, pFormatList);
}
-const ScQueryItem& AbstractScPivotFilterDlg_Impl::GetOutputItem()
+namespace
{
- return m_xDlg->GetOutputItem();
-}
-
-PivotFunc AbstractScDPFunctionDlg_Impl::GetFuncMask() const
+class AbstractScDataPilotDatabaseDlg_Impl
+ : public ScreenshottedDialog_Impl_Async<AbstractScDataPilotDatabaseDlg, ScDataPilotDatabaseDlg>
{
- return m_xDlg->GetFuncMask();
+public:
+ using ScreenshottedDialog_Impl_BASE::ScreenshottedDialog_Impl_BASE;
+ void GetValues(ScImportSourceDesc& rDesc) override { m_pDlg->GetValues(rDesc); }
+};
}
-void AbstractScDPFunctionDlg_Impl::Response(int nResponse)
+VclPtr<AbstractScDataPilotDatabaseDlg> ScAbstractDialogFactory_Impl::CreateScDataPilotDatabaseDlg(weld::Window* pParent)
{
- m_xDlg->response(nResponse);
+ return VclPtr<AbstractScDataPilotDatabaseDlg_Impl>::Create(pParent);
}
-css::sheet::DataPilotFieldReference AbstractScDPFunctionDlg_Impl::GetFieldRef() const
+namespace
{
- return m_xDlg->GetFieldRef();
-}
-
-PivotFunc AbstractScDPSubtotalDlg_Impl::GetFuncMask() const
+class AbstractScDataPilotSourceTypeDlg_Impl
+ : public ScreenshottedDialog_Impl_Async<AbstractScDataPilotSourceTypeDlg,
+ ScDataPilotSourceTypeDlg>
{
- return m_xDlg->GetFuncMask();
+public:
+ using ScreenshottedDialog_Impl_BASE::ScreenshottedDialog_Impl_BASE;
+ bool IsDatabase() const override { return m_pDlg->IsDatabase(); }
+ bool IsExternal() const override { return m_pDlg->IsExternal(); }
+ bool IsNamedRange() const override { return m_pDlg->IsNamedRange(); }
+ OUString GetSelectedNamedRange() const override { return m_pDlg->GetSelectedNamedRange(); }
+ void AppendNamedRange(const OUString& rName) override { m_pDlg->AppendNamedRange(rName); }
+};
}
-void AbstractScDPSubtotalDlg_Impl::FillLabelData( ScDPLabelData& rLabelData ) const
+VclPtr<AbstractScDataPilotSourceTypeDlg> ScAbstractDialogFactory_Impl::CreateScDataPilotSourceTypeDlg(
+ weld::Window* pParent, bool bEnableExternal)
{
- m_xDlg->FillLabelData( rLabelData );
+ return VclPtr<AbstractScDataPilotSourceTypeDlg_Impl>::Create(pParent, bEnableExternal);
}
-void AbstractScDPSubtotalDlg_Impl::Response(int nResponse)
+namespace
{
- m_xDlg->response(nResponse);
-}
-
-ScDPNumGroupInfo AbstractScDPNumGroupDlg_Impl::GetGroupInfo() const
+class AbstractScDataPilotServiceDlg_Impl
+ : public vcl::AbstractDialogImpl_Async<AbstractScDataPilotServiceDlg, ScDataPilotServiceDlg>
{
- return m_xDlg->GetGroupInfo();
+public:
+ using AbstractDialogImpl_BASE::AbstractDialogImpl_BASE;
+ OUString GetServiceName() const override { return m_pDlg->GetServiceName(); }
+ OUString GetParSource() const override { return m_pDlg->GetParSource(); }
+ OUString GetParName() const override { return m_pDlg->GetParName(); }
+ OUString GetParUser() const override { return m_pDlg->GetParUser(); }
+ OUString GetParPass() const override { return m_pDlg->GetParPass(); }
+};
}
-ScDPNumGroupInfo AbstractScDPDateGroupDlg_Impl::GetGroupInfo() const
+VclPtr<AbstractScDataPilotServiceDlg> ScAbstractDialogFactory_Impl::CreateScDataPilotServiceDlg(weld::Window* pParent,
+ const std::vector<OUString>& rServices)
{
- return m_xDlg->GetGroupInfo();
+ return VclPtr<AbstractScDataPilotServiceDlg_Impl>::Create(pParent, rServices);
}
-sal_Int32 AbstractScDPDateGroupDlg_Impl::GetDatePart() const
+namespace
{
- return m_xDlg->GetDatePart();
-}
-
-OUString AbstractScDPShowDetailDlg_Impl::GetDimensionName() const
+class AbstractScDeleteCellDlg_Impl
+ : public ScreenshottedDialog_Impl_Async<AbstractScDeleteCellDlg, ScDeleteCellDlg>
{
- return m_xDlg->GetDimensionName();
+public:
+ using ScreenshottedDialog_Impl_BASE::ScreenshottedDialog_Impl_BASE;
+ DelCellCmd GetDelCellCmd() const override { return m_pDlg->GetDelCellCmd(); }
+};
}
-void AbstractScNewScenarioDlg_Impl::SetScenarioData(
- const OUString& rName, const OUString& rComment, const Color& rColor, ScScenarioFlags nFlags )
+VclPtr<AbstractScDeleteCellDlg> ScAbstractDialogFactory_Impl::CreateScDeleteCellDlg(weld::Window* pParent,
+ bool bDisallowCellMove)
{
- m_xDlg->SetScenarioData(rName, rComment, rColor, nFlags);
+ return VclPtr<AbstractScDeleteCellDlg_Impl>::Create(pParent, bDisallowCellMove);
}
-void AbstractScNewScenarioDlg_Impl::GetScenarioData(
- OUString& rName, OUString& rComment, Color& rColor, ScScenarioFlags& rFlags ) const
+VclPtr<AbstractScDataFormDlg> ScAbstractDialogFactory_Impl::CreateScDataFormDlg(weld::Window* pParent,
+ ScTabViewShell* pTabViewShell)
{
- m_xDlg->GetScenarioData(rName, rComment, rColor, rFlags);
+ // for dataform
+ using AbstractScDataFormDlg_Impl
+ = ScreenshottedDialog_Impl_Sync<AbstractScDataFormDlg, ScDataFormDlg>;
+ return VclPtr<AbstractScDataFormDlg_Impl>::Create(pParent, pTabViewShell);
}
-void AbstractScShowTabDlg_Impl::Insert( const OUString& rString, bool bSelected )
+namespace
{
- m_xDlg->Insert(rString, bSelected);
-}
-
-void AbstractScShowTabDlg_Impl::SetDescription(
- const OUString& rTitle, const OUString& rFixedText,
- const OUString& sDlgHelpId, const OUString& sLbHelpId )
+class AbstractScDeleteContentsDlg_Impl
+ : public ScreenshottedDialog_Impl_Sync<AbstractScDeleteContentsDlg, ScDeleteContentsDlg>
{
- m_xDlg->SetDescription( rTitle, rFixedText, sDlgHelpId, sLbHelpId );
-}
-
-std::vector<sal_Int32> AbstractScShowTabDlg_Impl::GetSelectedRows() const
-{
- return m_xDlg->GetSelectedRows();
+public:
+ using ScreenshottedDialog_Impl_BASE::ScreenshottedDialog_Impl_BASE;
+ void DisableObjects() override { m_pDlg->DisableObjects(); }
+ InsertDeleteFlags GetDelContentsCmdBits() const override
+ {
+ return m_pDlg->GetDelContentsCmdBits();
+ }
+};
}
-OUString AbstractScShowTabDlg_Impl::GetEntry(sal_Int32 nPos) const
+VclPtr<AbstractScDeleteContentsDlg> ScAbstractDialogFactory_Impl::CreateScDeleteContentsDlg(weld::Window* pParent)
{
- return m_xDlg->GetEntry(nPos);
+ return VclPtr<AbstractScDeleteContentsDlg_Impl>::Create(pParent);
}
-void AbstractScGoToTabDlg_Impl::Insert( const OUString& rString, bool bSelected )
+namespace
{
- m_xDlg->Insert(rString, bSelected);
-}
-
-void AbstractScGoToTabDlg_Impl::SetDescription(
- const OUString& rTitle, const OUString& rEntryLabel, const OUString& rListLabel,
- const OUString& rDlgHelpId, const OUString& rEnHelpId, const OUString& rLbHelpId )
+class AbstractScFillSeriesDlg_Impl
+ : public vcl::AbstractDialogImpl_Sync<AbstractScFillSeriesDlg, ScFillSeriesDlg>
{
- m_xDlg->SetDescription( rTitle, rEntryLabel, rListLabel, rDlgHelpId, rEnHelpId, rLbHelpId );
+public:
+ using AbstractDialogImpl_BASE::AbstractDialogImpl_BASE;
+ FillDir GetFillDir() const override { return m_pDlg->GetFillDir(); }
+ FillCmd GetFillCmd() const override { return m_pDlg->GetFillCmd(); }
+ FillDateCmd GetFillDateCmd() const override { return m_pDlg->GetFillDateCmd(); }
+ double GetStart() const override { return m_pDlg->GetStart(); }
+ double GetStep() const override { return m_pDlg->GetStep(); }
+ double GetMax() const override { return m_pDlg->GetMax(); }
+ OUString GetStartStr() const override { return m_pDlg->GetStartStr(); }
+ void SetEdStartValEnabled(bool bFlag) override { m_pDlg->SetEdStartValEnabled(bFlag); }
+};
}
-OUString AbstractScGoToTabDlg_Impl::GetSelectedEntry() const
+VclPtr<AbstractScFillSeriesDlg> ScAbstractDialogFactory_Impl::CreateScFillSeriesDlg(weld::Window* pParent,
+ ScDocument& rDocument,
+ FillDir eFillDir,
+ FillCmd eFillCmd,
+ FillDateCmd eFillDateCmd,
+ const OUString& aStartStr,
+ double fStep,
+ double fMax,
+ const SCSIZE nSelectHeight,
+ const SCSIZE nSelectWidth,
+ sal_uInt16 nPossDir)
{
- return m_xDlg->GetSelectedEntry();
+ return VclPtr<AbstractScFillSeriesDlg_Impl>::Create(pParent, rDocument,eFillDir, eFillCmd,eFillDateCmd, aStartStr,fStep,fMax,nSelectHeight,nSelectWidth,nPossDir);
}
-short AbstractScStringInputDlg_Impl::Execute()
+namespace
{
- return m_xDlg->run();
-}
-
-bool AbstractScStringInputDlg_Impl::StartExecuteAsync(VclAbstractDialog::AsyncContext &rCtx)
+class AbstractScGroupDlg_Impl : public vcl::AbstractDialogImpl_Async<AbstractScGroupDlg, ScGroupDlg>
{
- return weld::DialogController::runAsync(m_xDlg, rCtx.maEndDialogFn);
+public:
+ using AbstractDialogImpl_BASE::AbstractDialogImpl_BASE;
+ bool GetColsChecked() const override { return m_pDlg->GetColsChecked(); }
+};
}
-OUString AbstractScStringInputDlg_Impl::GetInputString() const
+VclPtr<AbstractScGroupDlg> ScAbstractDialogFactory_Impl::CreateAbstractScGroupDlg(weld::Window* pParent, bool bUnGroup)
{
- return m_xDlg->GetInputString();
+ return VclPtr<AbstractScGroupDlg_Impl>::Create(pParent, bUnGroup, true);
}
-BitmapEx AbstractScStringInputDlg_Impl::createScreenshot() const
+namespace
{
- VclPtr<VirtualDevice> xDialogSurface(m_xDlg->getDialog()->screenshot());
- return xDialogSurface->GetBitmapEx(Point(), xDialogSurface->GetOutputSizePixel());
-}
-
-OUString AbstractScStringInputDlg_Impl::GetScreenshotId() const
+class AbstractScInsertCellDlg_Impl
+ : public vcl::AbstractDialogImpl_Async<AbstractScInsertCellDlg, ScInsertCellDlg>
{
- return m_xDlg->get_help_id();
+public:
+ using AbstractDialogImpl_BASE::AbstractDialogImpl_BASE;
+ InsCellCmd GetInsCellCmd() const override { return m_pDlg->GetInsCellCmd(); }
+ size_t GetCount() const override { return m_pDlg->GetCount(); }
+};
}
-void AbstractScTabBgColorDlg_Impl::GetSelectedColor( Color& rColor ) const
+VclPtr<AbstractScInsertCellDlg> ScAbstractDialogFactory_Impl::CreateScInsertCellDlg(weld::Window* pParent,
+ bool bDisallowCellMove)
{
- m_xDlg->GetSelectedColor( rColor );
+ return VclPtr<AbstractScInsertCellDlg_Impl>::Create(pParent, bDisallowCellMove);
}
-BitmapEx AbstractScTabBgColorDlg_Impl::createScreenshot() const
+namespace
{
- VclPtr<VirtualDevice> xDialogSurface(m_xDlg->getDialog()->screenshot());
- return xDialogSurface->GetBitmapEx(Point(), xDialogSurface->GetOutputSizePixel());
-}
-
-OUString AbstractScTabBgColorDlg_Impl::GetScreenshotId() const
+class AbstractScInsertContentsDlg_Impl
+ : public ScreenshottedDialog_Impl_Sync<AbstractScInsertContentsDlg, ScInsertContentsDlg>
{
- return m_xDlg->get_help_id();
+public:
+ using ScreenshottedDialog_Impl_BASE::ScreenshottedDialog_Impl_BASE;
+ InsertDeleteFlags GetInsContentsCmdBits() const override
+ {
+ return m_pDlg->GetInsContentsCmdBits();
+ }
+ ScPasteFunc GetFormulaCmdBits() const override { return m_pDlg->GetFormulaCmdBits(); }
+ bool IsSkipEmptyCells() const override { return m_pDlg->IsSkipEmptyCells(); }
+ bool IsLink() const override { return m_pDlg->IsLink(); }
+ void SetFillMode(bool bSet) override { m_pDlg->SetFillMode(bSet); }
+ void SetOtherDoc(bool bSet) override { m_pDlg->SetOtherDoc(bSet); }
+ bool IsTranspose() const override { return m_pDlg->IsTranspose(); }
+ void SetChangeTrack(bool bSet) override { m_pDlg->SetChangeTrack(bSet); }
+ void SetCellShiftDisabled(CellShiftDisabledFlags nDisable) override
+ {
+ m_pDlg->SetCellShiftDisabled(nDisable);
+ }
+ InsCellCmd GetMoveMode() override { return m_pDlg->GetMoveMode(); }
+};
}
-void AbstractScImportOptionsDlg_Impl::GetImportOptions( ScImportOptions& rOptions ) const
+VclPtr<AbstractScInsertContentsDlg> ScAbstractDialogFactory_Impl::CreateScInsertContentsDlg(weld::Window* pParent,
+ const OUString* pStrTitle)
{
- m_xDlg->GetImportOptions(rOptions);
+ return VclPtr<AbstractScInsertContentsDlg_Impl>::Create(pParent, pStrTitle);
}
-void AbstractScImportOptionsDlg_Impl::SaveImportOptions() const
+namespace
{
- m_xDlg->SaveImportOptions();
-}
-
-LanguageType AbstractScTextImportOptionsDlg_Impl::GetLanguageType() const
+class AbstractScInsertTableDlg_Impl
+ : public ScreenshottedDialog_Impl_Async<AbstractScInsertTableDlg, ScInsertTableDlg>
{
- return m_xDlg->getLanguageType();
+public:
+ using ScreenshottedDialog_Impl_BASE::ScreenshottedDialog_Impl_BASE;
+ bool GetTablesFromFile() override { return m_pDlg->GetTablesFromFile(); }
+ bool GetTablesAsLink() override { return m_pDlg->GetTablesAsLink(); }
+ const OUString* GetFirstTable(sal_uInt16* pN) override { return m_pDlg->GetFirstTable(pN); }
+ ScDocShell* GetDocShellTables() override { return m_pDlg->GetDocShellTables(); }
+ bool IsTableBefore() override { return m_pDlg->IsTableBefore(); }
+ sal_uInt16 GetTableCount() override { return m_pDlg->GetTableCount(); }
+ const OUString* GetNextTable(sal_uInt16* pN) override { return m_pDlg->GetNextTable(pN); }
+};
}
-bool AbstractScTextImportOptionsDlg_Impl::IsDateConversionSet() const
+VclPtr<AbstractScInsertTableDlg> ScAbstractDialogFactory_Impl::CreateScInsertTableDlg(weld::Window* pParent, ScViewData& rViewData,
+ SCTAB nTabCount, bool bFromFile)
{
- return m_xDlg->isDateConversionSet();
+ return VclPtr<AbstractScInsertTableDlg_Impl>::Create(pParent, rViewData,nTabCount, bFromFile);
}
-bool AbstractScTextImportOptionsDlg_Impl::IsScientificConversionSet() const
+namespace
{
- return m_xDlg->isScientificConversionSet();
-}
-
-bool AbstractScTextImportOptionsDlg_Impl::IsKeepAskingSet() const
+class AbstractScSelEntryDlg_Impl
+ : public vcl::AbstractDialogImpl_Async<AbstractScSelEntryDlg, ScSelEntryDlg>
{
- return m_xDlg->isKeepAskingSet();
+public:
+ using AbstractDialogImpl_BASE::AbstractDialogImpl_BASE;
+ OUString GetSelectedEntry() const override { return m_pDlg->GetSelectedEntry(); }
+};
}
-BitmapEx AbstractScTextImportOptionsDlg_Impl::createScreenshot() const
+VclPtr<AbstractScSelEntryDlg> ScAbstractDialogFactory_Impl::CreateScSelEntryDlg(weld::Window* pParent,
+ const std::vector<OUString> &rEntryList)
{
- VclPtr<VirtualDevice> xDialogSurface(m_xDlg->getDialog()->screenshot());
- return xDialogSurface->GetBitmapEx(Point(), xDialogSurface->GetOutputSizePixel());
+ return VclPtr<AbstractScSelEntryDlg_Impl>::Create(pParent, rEntryList);
}
-OUString AbstractScTextImportOptionsDlg_Impl::GetScreenshotId() const
+namespace
{
- return m_xDlg->get_help_id();
-}
-
-short ScAbstractTabController_Impl::Execute()
+class AbstractScLinkedAreaDlg_Impl
+ : public vcl::AbstractDialogImpl_Sync<AbstractScLinkedAreaDlg, ScLinkedAreaDlg>
{
- return m_xDlg->run();
+public:
+ using AbstractDialogImpl_BASE::AbstractDialogImpl_BASE;
+ void InitFromOldLink(const OUString& rFile, const OUString& rFilter, const OUString& rOptions,
+ const OUString& rSource, sal_Int32 nRefreshDelaySeconds) override
+ {
+ m_pDlg->InitFromOldLink(rFile, rFilter, rOptions, rSource, nRefreshDelaySeconds);
+ }
+ OUString GetURL() override { return m_pDlg->GetURL(); }
+ OUString GetFilter() override { return m_pDlg->GetFilter(); }
+ OUString GetOptions() override { return m_pDlg->GetOptions(); }
+ OUString GetSource() override { return m_pDlg->GetSource(); }
+ sal_Int32 GetRefreshDelaySeconds() override { return m_pDlg->GetRefreshDelaySeconds(); }
+};
}
-bool ScAbstractTabController_Impl::StartExecuteAsync(AsyncContext &rCtx)
+VclPtr<AbstractScLinkedAreaDlg> ScAbstractDialogFactory_Impl::CreateScLinkedAreaDlg(weld::Widget* pParent)
{
- return SfxTabDialogController::runAsync(m_xDlg, rCtx.maEndDialogFn);
+ return VclPtr<AbstractScLinkedAreaDlg_Impl>::Create(pParent);
}
-void ScAbstractTabController_Impl::SetCurPageId( const OUString &rName )
+namespace
{
- m_xDlg->SetCurPageId( rName );
-}
-
-const SfxItemSet* ScAbstractTabController_Impl::GetOutputItemSet() const
+class AbstractScMetricInputDlg_Impl
+ : public vcl::AbstractDialogImpl_Async<AbstractScMetricInputDlg, ScMetricInputDlg>
{
- return m_xDlg->GetOutputItemSet();
+public:
+ using AbstractDialogImpl_BASE::AbstractDialogImpl_BASE;
+ int GetInputValue() const override { return m_pDlg->GetInputValue(); }
+};
}
-WhichRangesContainer ScAbstractTabController_Impl::GetInputRanges(const SfxItemPool& pItem )
+VclPtr<AbstractScMetricInputDlg> ScAbstractDialogFactory_Impl::CreateScMetricInputDlg(weld::Window* pParent,
+ const OUString& sDialogName,
+ tools::Long nCurrent,
+ tools::Long nDefault,
+ FieldUnit eFUnit,
+ sal_uInt16 nDecimals,
+ tools::Long nMaximum ,
+ tools::Long nMinimum )
{
- return m_xDlg->GetInputRanges( pItem );
+ return VclPtr<AbstractScMetricInputDlg_Impl>::Create(pParent, sDialogName, nCurrent, nDefault,
+ eFUnit, nDecimals, nMaximum, nMinimum);
}
-void ScAbstractTabController_Impl::SetInputSet( const SfxItemSet* pInSet )
+namespace
{
- m_xDlg->SetInputSet( pInSet );
-}
-
-//From class Window.
-void ScAbstractTabController_Impl::SetText( const OUString& rStr )
+class AbstractScMoveTableDlg_Impl
+ : public ScreenshottedDialog_Impl_Async<AbstractScMoveTableDlg, ScMoveTableDlg>
{
- m_xDlg->set_title(rStr);
+public:
+ using ScreenshottedDialog_Impl_BASE::ScreenshottedDialog_Impl_BASE;
+ sal_uInt16 GetSelectedDocument() const override { return m_pDlg->GetSelectedDocument(); }
+ sal_uInt16 GetSelectedTable() const override { return m_pDlg->GetSelectedTable(); }
+ bool GetCopyTable() const override { return m_pDlg->GetCopyTable(); }
+ bool GetRenameTable() const override { return m_pDlg->GetRenameTable(); }
+ void GetTabNameString(OUString& rString) const override { m_pDlg->GetTabNameString(rString); }
+ void SetForceCopyTable() override { return m_pDlg->SetForceCopyTable(); }
+ void EnableRenameTable(bool bFlag) override { return m_pDlg->EnableRenameTable(bFlag); }
+};
}
-std::vector<OUString> ScAbstractTabController_Impl::getAllPageUIXMLDescriptions() const
+VclPtr<AbstractScMoveTableDlg> ScAbstractDialogFactory_Impl::CreateScMoveTableDlg(weld::Window* pParent,
+ const OUString& rDefault)
{
- return m_xDlg->getAllPageUIXMLDescriptions();
+ return VclPtr<AbstractScMoveTableDlg_Impl>::Create(pParent, rDefault);
}
-bool ScAbstractTabController_Impl::selectPageByUIXMLDescription(const OUString& rUIXMLDescription)
+namespace
{
- return m_xDlg->selectPageByUIXMLDescription(rUIXMLDescription);
-}
-
-BitmapEx ScAbstractTabController_Impl::createScreenshot() const
+class AbstractScNameCreateDlg_Impl
+ : public ScreenshottedDialog_Impl_Sync<AbstractScNameCreateDlg, ScNameCreateDlg>
{
- return m_xDlg->createScreenshot();
+public:
+ using ScreenshottedDialog_Impl_BASE::ScreenshottedDialog_Impl_BASE;
+ CreateNameFlags GetFlags() const override { return m_pDlg->GetFlags(); }
+};
}
-OUString ScAbstractTabController_Impl::GetScreenshotId() const
+VclPtr<AbstractScNameCreateDlg> ScAbstractDialogFactory_Impl::CreateScNameCreateDlg(weld::Window * pParent, CreateNameFlags nFlags)
{
- return m_xDlg->GetScreenshotId();
+ return VclPtr<AbstractScNameCreateDlg_Impl>::Create(pParent, nFlags);
}
-bool ScAsyncTabController_Impl::StartExecuteAsync(VclAbstractDialog::AsyncContext &rCtx)
+namespace
{
- return SfxTabDialogController::runAsync(m_xDlg, rCtx.maEndDialogFn);
-}
-
-void ScAsyncTabController_Impl::SetCurPageId( const OUString &rName )
+class AbstractScNamePasteDlg_Impl
+ : public vcl::AbstractDialogImpl_Sync<AbstractScNamePasteDlg, ScNamePasteDlg>
{
- m_xDlg->SetCurPageId( rName );
+public:
+ using AbstractDialogImpl_BASE::AbstractDialogImpl_BASE;
+ std::vector<OUString> GetSelectedNames() const override { return m_pDlg->GetSelectedNames(); }
+};
}
-const SfxItemSet* ScAsyncTabController_Impl::GetOutputItemSet() const
+VclPtr<AbstractScNamePasteDlg> ScAbstractDialogFactory_Impl::CreateScNamePasteDlg(weld::Window * pParent, ScDocShell* pShell)
{
- return m_xDlg->GetOutputItemSet();
+ return VclPtr<AbstractScNamePasteDlg_Impl>::Create(pParent, pShell);
}
-bool AbstractScSelEntryDlg_Impl::StartExecuteAsync(VclAbstractDialog::AsyncContext &rCtx)
+namespace
{
- return weld::DialogController::runAsync(m_xDlg, rCtx.maEndDialogFn);
-}
-
-// =========================Factories for createdialog ===================
-VclPtr<AbstractScImportAsciiDlg> ScAbstractDialogFactory_Impl::CreateScImportAsciiDlg(weld::Window* pParent,
- const OUString& aDatName,
- SvStream* pInStream, ScImportAsciiCall eCall)
+class AbstractScPivotFilterDlg_Impl
+ : public vcl::AbstractDialogImpl_Sync<AbstractScPivotFilterDlg, ScPivotFilterDlg>
{
- return VclPtr<AbstractScImportAsciiDlg_Impl>::Create(std::make_shared<ScImportAsciiDlg>(pParent, aDatName,pInStream, eCall));
+public:
+ using AbstractDialogImpl_BASE::AbstractDialogImpl_BASE;
+ const ScQueryItem& GetOutputItem() override { return m_pDlg->GetOutputItem(); }
+};
}
-VclPtr<AbstractScTextImportOptionsDlg> ScAbstractDialogFactory_Impl::CreateScTextImportOptionsDlg(weld::Window* pParent)
+VclPtr<AbstractScPivotFilterDlg> ScAbstractDialogFactory_Impl::CreateScPivotFilterDlg(weld::Window* pParent,
+ const SfxItemSet& rArgSet, sal_uInt16 nSourceTab)
{
- return VclPtr<AbstractScTextImportOptionsDlg_Impl>::Create(std::make_unique<ScTextImportOptionsDlg>(pParent));
+ return VclPtr<AbstractScPivotFilterDlg_Impl>::Create(pParent, rArgSet, nSourceTab);
}
-VclPtr<AbstractScAutoFormatDlg> ScAbstractDialogFactory_Impl::CreateScAutoFormatDlg(weld::Window* pParent,
- ScAutoFormat* pAutoFormat,
- const ScAutoFormatData* pSelFormatData,
- ScViewData& rViewData)
+namespace
{
- return VclPtr<AbstractScAutoFormatDlg_Impl>::Create(std::make_unique<ScAutoFormatDlg>(pParent, pAutoFormat, pSelFormatData, rViewData));
-}
-
-VclPtr<AbstractScColRowLabelDlg> ScAbstractDialogFactory_Impl::CreateScColRowLabelDlg(weld::Window* pParent,
- bool bCol, bool bRow)
+class AbstractScDPFunctionDlg_Impl
+ : public vcl::AbstractDialogImpl_Async<AbstractScDPFunctionDlg, ScDPFunctionDlg>
{
- return VclPtr<AbstractScColRowLabelDlg_Impl>::Create(std::make_unique<ScColRowLabelDlg>(pParent, bCol, bRow));
+public:
+ using AbstractDialogImpl_BASE::AbstractDialogImpl_BASE;
+ PivotFunc GetFuncMask() const override { return m_pDlg->GetFuncMask(); }
+ css::sheet::DataPilotFieldReference GetFieldRef() const override
+ {
+ return m_pDlg->GetFieldRef();
+ }
+ void Response(int nResponse) override { m_pDlg->response(nResponse); }
+};
}
-VclPtr<AbstractScSortWarningDlg> ScAbstractDialogFactory_Impl::CreateScSortWarningDlg(weld::Window* pParent, const OUString& rExtendText, const OUString& rCurrentText)
+VclPtr<AbstractScDPFunctionDlg> ScAbstractDialogFactory_Impl::CreateScDPFunctionDlg(weld::Widget* pParent,
+ const ScDPLabelDataVector& rLabelVec,
+ const ScDPLabelData& rLabelData,
+ const ScPivotFuncData& rFuncData)
{
- return VclPtr<AbstractScSortWarningDlg_Impl>::Create(std::make_unique<ScSortWarningDlg>(pParent, rExtendText, rCurrentText));
+ return VclPtr<AbstractScDPFunctionDlg_Impl>::Create(pParent, rLabelVec, rLabelData, rFuncData);
}
-VclPtr<AbstractScCondFormatManagerDlg> ScAbstractDialogFactory_Impl::CreateScCondFormatMgrDlg(weld::Window* pParent, ScDocument& rDoc, const ScConditionalFormatList* pFormatList )
+namespace
{
- return VclPtr<AbstractScCondFormatManagerDlg_Impl>::Create(std::make_shared<ScCondFormatManagerDlg>(pParent, rDoc, pFormatList));
-}
-
-VclPtr<AbstractScDataPilotDatabaseDlg> ScAbstractDialogFactory_Impl::CreateScDataPilotDatabaseDlg(weld::Window* pParent)
+class AbstractScDPSubtotalDlg_Impl
+ : public vcl::AbstractDialogImpl_Async<AbstractScDPSubtotalDlg, ScDPSubtotalDlg>
{
- return VclPtr<AbstractScDataPilotDatabaseDlg_Impl>::Create(std::make_shared<ScDataPilotDatabaseDlg>(pParent));
+public:
+ using AbstractDialogImpl_BASE::AbstractDialogImpl_BASE;
+ PivotFunc GetFuncMask() const override { return m_pDlg->GetFuncMask(); }
+ void FillLabelData(ScDPLabelData& rLabelData) const override
+ {
+ m_pDlg->FillLabelData(rLabelData);
+ }
+ void Response(int nResponse) override { m_pDlg->response(nResponse); }
+};
}
-VclPtr<AbstractScDataPilotSourceTypeDlg> ScAbstractDialogFactory_Impl::CreateScDataPilotSourceTypeDlg(
- weld::Window* pParent, bool bEnableExternal)
+VclPtr<AbstractScDPSubtotalDlg> ScAbstractDialogFactory_Impl::CreateScDPSubtotalDlg(weld::Widget* pParent,
+ ScDPObject& rDPObj,
+ const ScDPLabelData& rLabelData,
+ const ScPivotFuncData& rFuncData,
+ const ScDPNameVec& rDataFields)
{
- return VclPtr<AbstractScDataPilotSourceTypeDlg_Impl>::Create(std::make_shared<ScDataPilotSourceTypeDlg>(pParent, bEnableExternal));
+ return VclPtr<AbstractScDPSubtotalDlg_Impl>::Create(pParent, rDPObj, rLabelData, rFuncData, rDataFields, true/*bEnableLayout*/);
}
-VclPtr<AbstractScDataPilotServiceDlg> ScAbstractDialogFactory_Impl::CreateScDataPilotServiceDlg(weld::Window* pParent,
- const std::vector<OUString>& rServices)
+namespace
{
- return VclPtr<AbstractScDataPilotServiceDlg_Impl>::Create(std::make_shared<ScDataPilotServiceDlg>(pParent, rServices));
-}
-
-VclPtr<AbstractScDeleteCellDlg> ScAbstractDialogFactory_Impl::CreateScDeleteCellDlg(weld::Window* pParent,
- bool bDisallowCellMove)
+class AbstractScDPNumGroupDlg_Impl
+ : public vcl::AbstractDialogImpl_Sync<AbstractScDPNumGroupDlg, ScDPNumGroupDlg>
{
- return VclPtr<AbstractScDeleteCellDlg_Impl>::Create(std::make_unique<ScDeleteCellDlg>(pParent, bDisallowCellMove));
+public:
+ using AbstractDialogImpl_BASE::AbstractDialogImpl_BASE;
+ ScDPNumGroupInfo GetGroupInfo() const override { return m_pDlg->GetGroupInfo(); }
+};
}
-VclPtr<AbstractScDataFormDlg> ScAbstractDialogFactory_Impl::CreateScDataFormDlg(weld::Window* pParent,
- ScTabViewShell* pTabViewShell)
+VclPtr<AbstractScDPNumGroupDlg> ScAbstractDialogFactory_Impl::CreateScDPNumGroupDlg(weld::Window* pParent, const ScDPNumGroupInfo& rInfo)
{
- return VclPtr<AbstractScDataFormDlg_Impl>::Create(std::make_unique<ScDataFormDlg>(pParent, pTabViewShell));
+ return VclPtr<AbstractScDPNumGroupDlg_Impl>::Create(pParent, rInfo);
}
-VclPtr<AbstractScDeleteContentsDlg> ScAbstractDialogFactory_Impl::CreateScDeleteContentsDlg(weld::Window* pParent)
+namespace
{
- return VclPtr<AbstractScDeleteContentsDlg_Impl>::Create(std::make_unique<ScDeleteContentsDlg>(pParent));
-}
-
-VclPtr<AbstractScFillSeriesDlg> ScAbstractDialogFactory_Impl::CreateScFillSeriesDlg(weld::Window* pParent,
- ScDocument& rDocument,
- FillDir eFillDir,
- FillCmd eFillCmd,
- FillDateCmd eFillDateCmd,
- const OUString& aStartStr,
- double fStep,
- double fMax,
- const SCSIZE nSelectHeight,
- const SCSIZE nSelectWidth,
- sal_uInt16 nPossDir)
+class AbstractScDPDateGroupDlg_Impl
+ : public vcl::AbstractDialogImpl_Sync<AbstractScDPDateGroupDlg, ScDPDateGroupDlg>
{
- return VclPtr<AbstractScFillSeriesDlg_Impl>::Create(std::make_unique<ScFillSeriesDlg>(pParent, rDocument,eFillDir, eFillCmd,eFillDateCmd, aStartStr,fStep,fMax,nSelectHeight,nSelectWidth,nPossDir));
+public:
+ using AbstractDialogImpl_BASE::AbstractDialogImpl_BASE;
+ ScDPNumGroupInfo GetGroupInfo() const override { return m_pDlg->GetGroupInfo(); }
+ sal_Int32 GetDatePart() const override { return m_pDlg->GetDatePart(); }
+};
}
-VclPtr<AbstractScGroupDlg> ScAbstractDialogFactory_Impl::CreateAbstractScGroupDlg(weld::Window* pParent, bool bUnGroup)
+VclPtr<AbstractScDPDateGroupDlg> ScAbstractDialogFactory_Impl::CreateScDPDateGroupDlg(
+ weld::Window* pParent, const ScDPNumGroupInfo& rInfo, sal_Int32 nDatePart, const Date& rNullDate)
{
- return VclPtr<AbstractScGroupDlg_Impl>::Create(std::make_shared<ScGroupDlg>(pParent, bUnGroup, true/*bRows*/));
+ return VclPtr<AbstractScDPDateGroupDlg_Impl>::Create(pParent, rInfo, nDatePart, rNullDate);
}
-VclPtr<AbstractScInsertCellDlg> ScAbstractDialogFactory_Impl::CreateScInsertCellDlg(weld::Window* pParent,
- bool bDisallowCellMove)
+namespace
{
- return VclPtr<AbstractScInsertCellDlg_Impl>::Create(std::make_unique<ScInsertCellDlg>(pParent, bDisallowCellMove));
-}
-
-VclPtr<AbstractScInsertContentsDlg> ScAbstractDialogFactory_Impl::CreateScInsertContentsDlg(weld::Window* pParent,
- const OUString* pStrTitle)
+class AbstractScDPShowDetailDlg_Impl
+ : public vcl::AbstractDialogImpl_Sync<AbstractScDPShowDetailDlg, ScDPShowDetailDlg>
{
- return VclPtr<AbstractScInsertContentsDlg_Impl>::Create(std::make_unique<ScInsertContentsDlg>(pParent, pStrTitle));
+public:
+ using AbstractDialogImpl_BASE::AbstractDialogImpl_BASE;
+ OUString GetDimensionName() const override { return m_pDlg->GetDimensionName(); }
+};
}
-VclPtr<AbstractScInsertTableDlg> ScAbstractDialogFactory_Impl::CreateScInsertTableDlg(weld::Window* pParent, ScViewData& rViewData,
- SCTAB nTabCount, bool bFromFile)
+VclPtr<AbstractScDPShowDetailDlg> ScAbstractDialogFactory_Impl::CreateScDPShowDetailDlg (
+ weld::Window* pParent, ScDPObject& rDPObj, css::sheet::DataPilotFieldOrientation nOrient )
{
- return VclPtr<AbstractScInsertTableDlg_Impl>::Create(std::make_unique<ScInsertTableDlg>(pParent, rViewData,nTabCount, bFromFile));
+ return VclPtr<AbstractScDPShowDetailDlg_Impl>::Create(pParent, rDPObj, nOrient);
}
-VclPtr<AbstractScSelEntryDlg> ScAbstractDialogFactory_Impl::CreateScSelEntryDlg(weld::Window* pParent,
- const std::vector<OUString> &rEntryList)
+namespace
{
- return VclPtr<AbstractScSelEntryDlg_Impl>::Create(std::make_unique<ScSelEntryDlg>(pParent, rEntryList));
-}
-
-VclPtr<AbstractScLinkedAreaDlg> ScAbstractDialogFactory_Impl::CreateScLinkedAreaDlg(weld::Widget* pParent)
+class AbstractScNewScenarioDlg_Impl
+ : public vcl::AbstractDialogImpl_Sync<AbstractScNewScenarioDlg, ScNewScenarioDlg>
{
- return VclPtr<AbstractScLinkedAreaDlg_Impl>::Create(std::make_unique<ScLinkedAreaDlg>(pParent));
-}
+public:
+ using AbstractDialogImpl_BASE::AbstractDialogImpl_BASE;
-VclPtr<AbstractScMetricInputDlg> ScAbstractDialogFactory_Impl::CreateScMetricInputDlg(weld::Window* pParent,
- const OUString& sDialogName,
- tools::Long nCurrent,
- tools::Long nDefault,
- FieldUnit eFUnit,
- sal_uInt16 nDecimals,
- tools::Long nMaximum ,
- tools::Long nMinimum )
-{
- return VclPtr<AbstractScMetricInputDlg_Impl>::Create(std::make_shared<ScMetricInputDlg>(pParent, sDialogName, nCurrent ,nDefault, eFUnit,
- nDecimals, nMaximum , nMinimum));
-}
+ void SetScenarioData(const OUString& rName, const OUString& rComment, const Color& rColor,
+ ScScenarioFlags nFlags) override
+ {
+ m_pDlg->SetScenarioData(rName, rComment, rColor, nFlags);
+ }
-VclPtr<AbstractScMoveTableDlg> ScAbstractDialogFactory_Impl::CreateScMoveTableDlg(weld::Window* pParent,
- const OUString& rDefault)
-{
- return VclPtr<AbstractScMoveTableDlg_Impl>::Create(std::make_shared<ScMoveTableDlg>(pParent, rDefault));
+ void GetScenarioData(OUString& rName, OUString& rComment, Color& rColor,
+ ScScenarioFlags& rFlags) const override
+ {
+ m_pDlg->GetScenarioData(rName, rComment, rColor, rFlags);
+ }
+};
}
-VclPtr<AbstractScNameCreateDlg> ScAbstractDialogFactory_Impl::CreateScNameCreateDlg(weld::Window * pParent, CreateNameFlags nFlags)
+VclPtr<AbstractScNewScenarioDlg> ScAbstractDialogFactory_Impl::CreateScNewScenarioDlg(weld::Window* pParent, const OUString& rName,
+ bool bEdit, bool bSheetProtected)
{
- return VclPtr<AbstractScNameCreateDlg_Impl>::Create(std::make_unique<ScNameCreateDlg>(pParent, nFlags));
+ return VclPtr<AbstractScNewScenarioDlg_Impl>::Create(pParent, rName, bEdit, bSheetProtected);
}
-VclPtr<AbstractScNamePasteDlg> ScAbstractDialogFactory_Impl::CreateScNamePasteDlg(weld::Window * pParent, ScDocShell* pShell)
+namespace
{
- return VclPtr<AbstractScNamePasteDlg_Impl>::Create(std::make_unique<ScNamePasteDlg>(pParent, pShell));
-}
-
-VclPtr<AbstractScPivotFilterDlg> ScAbstractDialogFactory_Impl::CreateScPivotFilterDlg(weld::Window* pParent,
- const SfxItemSet& rArgSet, sal_uInt16 nSourceTab)
+class AbstractScShowTabDlg_Impl
+ : public vcl::AbstractDialogImpl_Async<AbstractScShowTabDlg, ScShowTabDlg>
{
- return VclPtr<AbstractScPivotFilterDlg_Impl>::Create(std::make_unique<ScPivotFilterDlg>(pParent, rArgSet, nSourceTab));
+public:
+ using AbstractDialogImpl_BASE::AbstractDialogImpl_BASE;
+ void Insert(const OUString& rString, bool bSelected) override
+ {
+ m_pDlg->Insert(rString, bSelected);
+ }
+ void SetDescription(const OUString& rTitle, const OUString& rFixedText,
+ const OUString& sDlgHelpId, const OUString& sLbHelpId) override
+ {
+ m_pDlg->SetDescription(rTitle, rFixedText, sDlgHelpId, sLbHelpId);
+ }
+ OUString GetEntry(sal_Int32 nPos) const override { return m_pDlg->GetEntry(nPos); }
+ std::vector<sal_Int32> GetSelectedRows() const override { return m_pDlg->GetSelectedRows(); }
+};
}
-VclPtr<AbstractScDPFunctionDlg> ScAbstractDialogFactory_Impl::CreateScDPFunctionDlg(weld::Widget* pParent,
- const ScDPLabelDataVector& rLabelVec,
- const ScDPLabelData& rLabelData,
- const ScPivotFuncData& rFuncData)
+VclPtr<AbstractScShowTabDlg> ScAbstractDialogFactory_Impl::CreateScShowTabDlg(weld::Window* pParent)
{
- return VclPtr<AbstractScDPFunctionDlg_Impl>::Create(std::make_shared<ScDPFunctionDlg>(pParent, rLabelVec, rLabelData, rFuncData));
+ return VclPtr<AbstractScShowTabDlg_Impl>::Create(pParent);
}
-VclPtr<AbstractScDPSubtotalDlg> ScAbstractDialogFactory_Impl::CreateScDPSubtotalDlg(weld::Widget* pParent,
- ScDPObject& rDPObj,
- const ScDPLabelData& rLabelData,
- const ScPivotFuncData& rFuncData,
- const ScDPNameVec& rDataFields)
+namespace
{
- return VclPtr<AbstractScDPSubtotalDlg_Impl>::Create(std::make_shared<ScDPSubtotalDlg>(pParent, rDPObj, rLabelData, rFuncData, rDataFields, true/*bEnableLayout*/));
-}
-
-VclPtr<AbstractScDPNumGroupDlg> ScAbstractDialogFactory_Impl::CreateScDPNumGroupDlg(weld::Window* pParent, const ScDPNumGroupInfo& rInfo)
+class AbstractScGoToTabDlg_Impl
+ : public vcl::AbstractDialogImpl_Async<AbstractScGoToTabDlg, ScGoToTabDlg>
{
- return VclPtr<AbstractScDPNumGroupDlg_Impl>::Create(std::make_unique<ScDPNumGroupDlg>(pParent, rInfo));
+public:
+ using AbstractDialogImpl_BASE::AbstractDialogImpl_BASE;
+ void Insert(const OUString& rString, bool bSelected) override
+ {
+ m_pDlg->Insert(rString, bSelected);
+ }
+ void SetDescription(const OUString& rTitle, const OUString& rEntryLabel,
+ const OUString& rListLabel, const OUString& rDlgHelpId,
+ const OUString& rEnHelpId, const OUString& rLbHelpId) override
+ {
+ m_pDlg->SetDescription(rTitle, rEntryLabel, rListLabel, rDlgHelpId, rEnHelpId, rLbHelpId);
+ }
+ OUString GetSelectedEntry() const override { return m_pDlg->GetSelectedEntry(); }
+};
}
-VclPtr<AbstractScDPDateGroupDlg> ScAbstractDialogFactory_Impl::CreateScDPDateGroupDlg(
- weld::Window* pParent, const ScDPNumGroupInfo& rInfo, sal_Int32 nDatePart, const Date& rNullDate)
+VclPtr<AbstractScGoToTabDlg> ScAbstractDialogFactory_Impl::CreateScGoToTabDlg(weld::Window* pParent)
{
- return VclPtr<AbstractScDPDateGroupDlg_Impl>::Create(std::make_unique<ScDPDateGroupDlg>(pParent, rInfo, nDatePart, rNullDate));
+ return VclPtr<AbstractScGoToTabDlg_Impl>::Create(pParent);
}
-VclPtr<AbstractScDPShowDetailDlg> ScAbstractDialogFactory_Impl::CreateScDPShowDetailDlg (
- weld::Window* pParent, ScDPObject& rDPObj, css::sheet::DataPilotFieldOrientation nOrient )
+namespace
{
- return VclPtr<AbstractScDPShowDetailDlg_Impl>::Create(std::make_unique<ScDPShowDetailDlg>(pParent, rDPObj, nOrient));
-}
-
-VclPtr<AbstractScNewScenarioDlg> ScAbstractDialogFactory_Impl::CreateScNewScenarioDlg(weld::Window* pParent, const OUString& rName,
- bool bEdit, bool bSheetProtected)
+class AbstractScStringInputDlg_Impl
+ : public ScreenshottedDialog_Impl_Async<AbstractScStringInputDlg, ScStringInputDlg>
{
- return VclPtr<AbstractScNewScenarioDlg_Impl>::Create(std::make_unique<ScNewScenarioDlg>(pParent, rName, bEdit, bSheetProtected));
+public:
+ using ScreenshottedDialog_Impl_BASE::ScreenshottedDialog_Impl_BASE;
+ OUString GetInputString() const override { return m_pDlg->GetInputString(); }
+};
}
-VclPtr<AbstractScShowTabDlg> ScAbstractDialogFactory_Impl::CreateScShowTabDlg(weld::Window* pParent)
+VclPtr<AbstractScStringInputDlg> ScAbstractDialogFactory_Impl::CreateScStringInputDlg(weld::Window* pParent,
+ const OUString& rTitle, const OUString& rEditTitle, const OUString& rDefault, const OUString& rHelpId,
+ const OUString& rEditHelpId)
{
- return VclPtr<AbstractScShowTabDlg_Impl>::Create(std::make_shared<ScShowTabDlg>(pParent));
+ return VclPtr<AbstractScStringInputDlg_Impl>::Create(pParent, rTitle, rEditTitle, rDefault,
+ rHelpId, rEditHelpId);
}
-VclPtr<AbstractScGoToTabDlg> ScAbstractDialogFactory_Impl::CreateScGoToTabDlg(weld::Window* pParent)
+namespace
{
- return VclPtr<AbstractScGoToTabDlg_Impl>::Create(std::make_shared<ScGoToTabDlg>(pParent));
-}
-
-VclPtr<AbstractScStringInputDlg> ScAbstractDialogFactory_Impl::CreateScStringInputDlg(weld::Window* pParent,
- const OUString& rTitle, const OUString& rEditTitle, const OUString& rDefault, const OUString& rHelpId,
- const OUString& rEditHelpId)
+class AbstractScTabBgColorDlg_Impl
+ : public ScreenshottedDialog_Impl_Async<AbstractScTabBgColorDlg, ScTabBgColorDlg>
{
- return VclPtr<AbstractScStringInputDlg_Impl>::Create(std::make_unique<ScStringInputDlg>(pParent, rTitle, rEditTitle,
- rDefault, rHelpId, rEditHelpId));
+public:
+ using ScreenshottedDialog_Impl_BASE::ScreenshottedDialog_Impl_BASE;
+ void GetSelectedColor(Color& rColor) const override { m_pDlg->GetSelectedColor(rColor); }
+};
}
VclPtr<AbstractScTabBgColorDlg> ScAbstractDialogFactory_Impl::CreateScTabBgColorDlg(
@@ -1284,7 +790,22 @@ VclPtr<AbstractScTabBgColorDlg> ScAbstractDialogFactory_Impl::CreateScTabBgColor
const OUString& rTabBgColorNoColorText,
const Color& rDefaultColor)
{
- return VclPtr<AbstractScTabBgColorDlg_Impl>::Create(std::make_unique<ScTabBgColorDlg>(pParent, rTitle, rTabBgColorNoColorText, rDefaultColor));
+ return VclPtr<AbstractScTabBgColorDlg_Impl>::Create(pParent, rTitle, rTabBgColorNoColorText, rDefaultColor);
+}
+
+namespace
+{
+class AbstractScImportOptionsDlg_Impl
+ : public vcl::AbstractDialogImpl_Sync<AbstractScImportOptionsDlg, ScImportOptionsDlg>
+{
+public:
+ using AbstractDialogImpl_BASE::AbstractDialogImpl_BASE;
+ void GetImportOptions(ScImportOptions& rOptions) const override
+ {
+ m_pDlg->GetImportOptions(rOptions);
+ }
+ void SaveImportOptions() const override { m_pDlg->SaveImportOptions(); }
+};
}
VclPtr<AbstractScImportOptionsDlg> ScAbstractDialogFactory_Impl::CreateScImportOptionsDlg(weld::Window* pParent,
@@ -1294,12 +815,44 @@ VclPtr<AbstractScImportOptionsDlg> ScAbstractDialogFactory_Impl::CreateScImportO
bool bOnlyDbtoolsEncodings,
bool bImport)
{
- return VclPtr<AbstractScImportOptionsDlg_Impl>::Create(std::make_unique<ScImportOptionsDlg>(pParent, bAscii, pOptions, pStrTitle, true/*bMultiByte*/, bOnlyDbtoolsEncodings, bImport));
+ return VclPtr<AbstractScImportOptionsDlg_Impl>::Create(pParent, bAscii, pOptions, pStrTitle, true/*bMultiByte*/, bOnlyDbtoolsEncodings, bImport);
+}
+
+namespace
+{
+template<class Dialog>
+class ScAbstractTabController_Impl
+ : public vcl::AbstractDialogImpl_Async<SfxAbstractTabDialog, Dialog>
+{
+public:
+ using vcl::AbstractDialogImpl_Async<SfxAbstractTabDialog, Dialog>::AbstractDialogImpl_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& pItem) override
+ {
+ return this->m_pDlg->GetInputRanges(pItem);
+ }
+ 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); }
+
+ // screenshotting
+ std::vector<OUString> getAllPageUIXMLDescriptions() const override
+ {
+ return this->m_pDlg->getAllPageUIXMLDescriptions();
+ }
+ bool selectPageByUIXMLDescription(const OUString& rUIXMLDescription) override
+ {
+ return this->m_pDlg->selectPageByUIXMLDescription(rUIXMLDescription);
+ }
+ BitmapEx createScreenshot() const override { return this->m_pDlg->createScreenshot(); }
+ OUString GetScreenshotId() const override { return this->m_pDlg->GetScreenshotId(); }
+};
}
VclPtr<SfxAbstractTabDialog> ScAbstractDialogFactory_Impl::CreateScAttrDlg(weld::Window* pParent, const SfxItemSet* pCellAttrs)
{
- return VclPtr<ScAbstractTabController_Impl>::Create(std::make_shared<ScAttrDlg>(pParent, pCellAttrs));
+ return VclPtr<ScAbstractTabController_Impl<ScAttrDlg>>::Create(pParent, pCellAttrs);
}
VclPtr<SfxAbstractTabDialog> ScAbstractDialogFactory_Impl::CreateScHFEditDlg( weld::Window* pParent,
@@ -1307,89 +860,91 @@ VclPtr<SfxAbstractTabDialog> ScAbstractDialogFactory_Impl::CreateScHFEditDlg( we
const OUString& rPageStyle,
sal_uInt16 nResId )
{
- std::shared_ptr<SfxTabDialogController> xDlg;
-
switch (nResId)
{
case RID_SCDLG_HFED_HEADER:
case RID_SCDLG_HFEDIT_HEADER:
- xDlg = std::make_shared<ScHFEditHeaderDlg>(pParent, rCoreSet, rPageStyle);
- break;
+ return VclPtr<ScAbstractTabController_Impl<ScHFEditHeaderDlg>>::Create(pParent, rCoreSet, rPageStyle);
case RID_SCDLG_HFED_FOOTER:
case RID_SCDLG_HFEDIT_FOOTER:
- xDlg = std::make_shared<ScHFEditFooterDlg>(pParent, rCoreSet, rPageStyle);
- break;
+ return VclPtr<ScAbstractTabController_Impl<ScHFEditFooterDlg>>::Create(pParent, rCoreSet, rPageStyle);
case RID_SCDLG_HFEDIT_SHAREDFIRSTHEADER:
- xDlg = std::make_shared<ScHFEditSharedFirstHeaderDlg>(pParent, rCoreSet, rPageStyle);
- break;
+ return VclPtr<ScAbstractTabController_Impl<ScHFEditSharedFirstHeaderDlg>>::Create(pParent, rCoreSet, rPageStyle);
case RID_SCDLG_HFEDIT_SHAREDLEFTHEADER:
- xDlg = std::make_shared<ScHFEditSharedLeftHeaderDlg>(pParent, rCoreSet, rPageStyle);
- break;
+ return VclPtr<ScAbstractTabController_Impl<ScHFEditSharedLeftHeaderDlg>>::Create(pParent, rCoreSet, rPageStyle);
case RID_SCDLG_HFEDIT_SHAREDFIRSTFOOTER:
- xDlg = std::make_shared<ScHFEditSharedFirstFooterDlg>(pParent, rCoreSet, rPageStyle);
- break;
+ return VclPtr<ScAbstractTabController_Impl<ScHFEditSharedFirstFooterDlg>>::Create(pParent, rCoreSet, rPageStyle);
case RID_SCDLG_HFEDIT_SHAREDLEFTFOOTER:
- xDlg = std::make_shared<ScHFEditSharedLeftFooterDlg>(pParent, rCoreSet, rPageStyle);
- break;
+ return VclPtr<ScAbstractTabController_Impl<ScHFEditSharedLeftFooterDlg>>::Create(pParent, rCoreSet, rPageStyle);
case RID_SCDLG_HFEDIT_LEFTHEADER:
- xDlg = std::make_shared<ScHFEditLeftHeaderDlg>(pParent, rCoreSet, rPageStyle);
- break;
+ return VclPtr<ScAbstractTabController_Impl<ScHFEditLeftHeaderDlg>>::Create(pParent, rCoreSet, rPageStyle);
case RID_SCDLG_HFEDIT_RIGHTHEADER:
- xDlg = std::make_shared<ScHFEditRightHeaderDlg>(pParent, rCoreSet, rPageStyle);
- break;
+ return VclPtr<ScAbstractTabController_Impl<ScHFEditRightHeaderDlg>>::Create(pParent, rCoreSet, rPageStyle);
case RID_SCDLG_HFEDIT_LEFTFOOTER:
- xDlg = std::make_shared<ScHFEditLeftFooterDlg>(pParent, rCoreSet, rPageStyle);
- break;
+ return VclPtr<ScAbstractTabController_Impl<ScHFEditLeftFooterDlg>>::Create(pParent, rCoreSet, rPageStyle);
case RID_SCDLG_HFEDIT_RIGHTFOOTER:
- xDlg = std::make_shared<ScHFEditRightFooterDlg>(pParent, rCoreSet, rPageStyle);
- break;
+ return VclPtr<ScAbstractTabController_Impl<ScHFEditRightFooterDlg>>::Create(pParent, rCoreSet, rPageStyle);
case RID_SCDLG_HFEDIT_SHDR:
- xDlg = std::make_shared<ScHFEditSharedHeaderDlg>(pParent, rCoreSet, rPageStyle);
- break;
+ return VclPtr<ScAbstractTabController_Impl<ScHFEditSharedHeaderDlg>>::Create(pParent, rCoreSet, rPageStyle);
case RID_SCDLG_HFEDIT_SFTR:
- xDlg = std::make_shared<ScHFEditSharedFooterDlg>(pParent, rCoreSet, rPageStyle);
- break;
+ return VclPtr<ScAbstractTabController_Impl<ScHFEditSharedFooterDlg>>::Create(pParent, rCoreSet, rPageStyle);
case RID_SCDLG_HFEDIT_ALL:
- xDlg = std::make_shared<ScHFEditAllDlg>(pParent, rCoreSet, rPageStyle);
- break;
+ return VclPtr<ScAbstractTabController_Impl<ScHFEditAllDlg>>::Create(pParent, rCoreSet, rPageStyle);
default:
case RID_SCDLG_HFEDIT:
- xDlg = std::make_shared<ScHFEditActiveDlg>(pParent, rCoreSet, rPageStyle);
- break;
+ return VclPtr<ScAbstractTabController_Impl<ScHFEditActiveDlg>>::Create(pParent, rCoreSet, rPageStyle);
}
-
- return VclPtr<ScAbstractTabController_Impl>::Create(std::move(xDlg));
}
VclPtr<SfxAbstractTabDialog> ScAbstractDialogFactory_Impl::CreateScStyleDlg(weld::Window* pParent,
SfxStyleSheetBase& rStyleBase,
bool bPage)
{
- return VclPtr<ScAbstractTabController_Impl>::Create(std::make_shared<ScStyleDlg>(pParent, rStyleBase, bPage));
+ return VclPtr<ScAbstractTabController_Impl<ScStyleDlg>>::Create(pParent, rStyleBase, bPage);
}
VclPtr<SfxAbstractTabDialog> ScAbstractDialogFactory_Impl::CreateScDrawStyleDlg(weld::Window* pParent,
SfxStyleSheetBase& rStyleBase,
SdrView* pView)
{
- return VclPtr<ScAbstractTabController_Impl>::Create(std::make_shared<ScDrawStyleDlg>(pParent, rStyleBase, pView));
+ return VclPtr<ScAbstractTabController_Impl<ScDrawStyleDlg>>::Create(pParent, rStyleBase, pView);
}
VclPtr<SfxAbstractTabDialog> ScAbstractDialogFactory_Impl::CreateScSubTotalDlg(weld::Window* pParent, const SfxItemSet& rArgSet)
{
- return VclPtr<ScAbstractTabController_Impl>::Create(std::make_shared<ScSubTotalDlg>(pParent, rArgSet));
+ return VclPtr<ScAbstractTabController_Impl<ScSubTotalDlg>>::Create(pParent, rArgSet);
}
VclPtr<SfxAbstractTabDialog> ScAbstractDialogFactory_Impl::CreateScCharDlg(
weld::Window* pParent, const SfxItemSet* pAttr, const SfxObjectShell* pDocShell, bool bDrawText)
{
- return VclPtr<ScAbstractTabController_Impl>::Create(std::make_shared<ScCharDlg>(pParent, pAttr, pDocShell, bDrawText));
+ return VclPtr<ScAbstractTabController_Impl<ScCharDlg>>::Create(pParent, pAttr, pDocShell, bDrawText);
}
VclPtr<SfxAbstractTabDialog> ScAbstractDialogFactory_Impl::CreateScParagraphDlg(
weld::Window* pParent, const SfxItemSet* pAttr)
{
- return VclPtr<ScAbstractTabController_Impl>::Create(std::make_shared<ScParagraphDlg>(pParent, pAttr));
+ return VclPtr<ScAbstractTabController_Impl<ScParagraphDlg>>::Create(pParent, pAttr);
+}
+
+namespace
+{
+class ScAsyncTabController_Impl : public ScAsyncTabController
+{
+ std::shared_ptr<SfxTabDialogController> m_pDlg;
+
+public:
+ explicit ScAsyncTabController_Impl(std::shared_ptr<SfxTabDialogController> p)
+ : m_pDlg(std::move(p))
+ {
+ }
+ bool StartExecuteAsync(VclAbstractDialog::AsyncContext& rCtx) override
+ {
+ return SfxTabDialogController::runAsync(m_pDlg, rCtx.maEndDialogFn);
+ }
+ const SfxItemSet* GetOutputItemSet() const override { return m_pDlg->GetOutputItemSet(); }
+ void SetCurPageId(const OUString& rName) override { m_pDlg->SetCurPageId(rName); }
+};
}
std::shared_ptr<ScAsyncTabController> ScAbstractDialogFactory_Impl::CreateScSortDlg(weld::Window* pParent, const SfxItemSet* pArgSet)
diff --git a/sc/source/ui/attrdlg/scdlgfact.hxx b/sc/source/ui/attrdlg/scdlgfact.hxx
index fe60d59bc8e6..adb4293df269 100644
--- a/sc/source/ui/attrdlg/scdlgfact.hxx
+++ b/sc/source/ui/attrdlg/scdlgfact.hxx
@@ -19,641 +19,6 @@
#pragma once
#include <scabstdlg.hxx>
-#include <sfx2/sfxdlg.hxx>
-
-#include <corodlg.hxx>
-#include <condformatmgr.hxx>
-#include <dapitype.hxx>
-#include <dapidata.hxx>
-#include <datafdlg.hxx>
-#include <delcodlg.hxx>
-#include <delcldlg.hxx>
-#include <dpgroupdlg.hxx>
-#include <filldlg.hxx>
-#include <gototabdlg.hxx>
-#include <groupdlg.hxx>
-#include <linkarea.hxx>
-#include <lbseldlg.hxx>
-#include <inscldlg.hxx>
-#include <instbdlg.hxx>
-#include <inscodlg.hxx>
-#include <mtrindlg.hxx>
-#include <mvtabdlg.hxx>
-#include <namecrea.hxx>
-#include <namepast.hxx>
-#include <pfiltdlg.hxx>
-#include <pvfundlg.hxx>
-#include <shtabdlg.hxx>
-#include <scendlg.hxx>
-#include <scuiasciiopt.hxx>
-#include <scuiautofmt.hxx>
-#include <scuiimoptdlg.hxx>
-#include <sortdlg.hxx>
-#include <strindlg.hxx>
-#include <tabbgcolordlg.hxx>
-#include <textimportoptions.hxx>
-
-class AbstractScImportAsciiDlg_Impl : public AbstractScImportAsciiDlg
-{
- std::shared_ptr<ScImportAsciiDlg> m_xDlg;
-public:
- explicit AbstractScImportAsciiDlg_Impl(std::shared_ptr<ScImportAsciiDlg> p)
- : m_xDlg(std::move(p))
- {
- }
- virtual short Execute() override;
- virtual bool StartExecuteAsync(VclAbstractDialog::AsyncContext &rCtx) override;
- virtual void GetOptions( ScAsciiOptions& rOpt ) override;
- virtual void SaveParameters() override;
-
- // screenshotting
- virtual BitmapEx createScreenshot() const override;
- virtual OUString GetScreenshotId() const override;
-};
-
-class AbstractScAutoFormatDlg_Impl : public AbstractScAutoFormatDlg
-{
- std::unique_ptr<ScAutoFormatDlg> m_xDlg;
-public:
- explicit AbstractScAutoFormatDlg_Impl(std::unique_ptr<ScAutoFormatDlg> p)
- : m_xDlg(std::move(p))
- {
- }
- virtual short Execute() override;
- virtual sal_uInt16 GetIndex() const override;
- virtual OUString GetCurrFormatName() override;
-};
-
-class AbstractScColRowLabelDlg_Impl : public AbstractScColRowLabelDlg
-{
- std::shared_ptr<ScColRowLabelDlg> m_xDlg;
-public:
- explicit AbstractScColRowLabelDlg_Impl(std::shared_ptr<ScColRowLabelDlg> p)
- : m_xDlg(std::move(p))
- {
- }
- virtual short Execute() override;
- virtual bool StartExecuteAsync(VclAbstractDialog::AsyncContext &rCtx) override;
- virtual bool IsCol() override;
- virtual bool IsRow() override;
-
- // screenshotting
- virtual BitmapEx createScreenshot() const override;
- virtual OUString GetScreenshotId() const override;
-};
-
-class AbstractScCondFormatManagerDlg_Impl : public AbstractScCondFormatManagerDlg
-{
- std::shared_ptr<ScCondFormatManagerDlg> m_xDlg;
-public:
- explicit AbstractScCondFormatManagerDlg_Impl(std::shared_ptr<ScCondFormatManagerDlg> p)
- : m_xDlg(std::move(p))
- {
- }
- virtual short Execute() override;
- virtual bool StartExecuteAsync(VclAbstractDialog::AsyncContext &rCtx) override;
- virtual std::unique_ptr<ScConditionalFormatList> GetConditionalFormatList() override;
- virtual bool CondFormatsChanged() const override;
- virtual void SetModified() override;
- virtual ScConditionalFormat* GetCondFormatSelected() override;
-};
-
-class AbstractScDataPilotDatabaseDlg_Impl :public AbstractScDataPilotDatabaseDlg
-{
- std::shared_ptr<ScDataPilotDatabaseDlg> m_xDlg;
-public:
- explicit AbstractScDataPilotDatabaseDlg_Impl(std::shared_ptr<ScDataPilotDatabaseDlg> p)
- : m_xDlg(std::move(p))
- {
- }
- virtual short Execute() override;
- virtual bool StartExecuteAsync(AsyncContext &) override;
- virtual void GetValues( ScImportSourceDesc& rDesc ) override;
-
- // screenshotting
- virtual BitmapEx createScreenshot() const override;
- virtual OUString GetScreenshotId() const override;
-};
-
-class AbstractScDataPilotSourceTypeDlg_Impl :public AbstractScDataPilotSourceTypeDlg
-{
- std::shared_ptr<ScDataPilotSourceTypeDlg> m_xDlg;
-public:
- explicit AbstractScDataPilotSourceTypeDlg_Impl(std::shared_ptr<ScDataPilotSourceTypeDlg> p)
- : m_xDlg(std::move(p))
- {
- }
- virtual short Execute() override;
- virtual bool StartExecuteAsync(AsyncContext &) override;
- virtual bool IsDatabase() const override;
- virtual bool IsExternal() const override;
- virtual bool IsNamedRange() const override;
- virtual OUString GetSelectedNamedRange() const override;
- virtual void AppendNamedRange(const OUString& rName) override;
-
- // screenshotting
- virtual BitmapEx createScreenshot() const override;
- virtual OUString GetScreenshotId() const override;
-};
-
-class AbstractScDataPilotServiceDlg_Impl : public AbstractScDataPilotServiceDlg
-{
- std::shared_ptr<ScDataPilotServiceDlg> m_xDlg;
-public:
- explicit AbstractScDataPilotServiceDlg_Impl(std::shared_ptr<ScDataPilotServiceDlg> p)
- : m_xDlg(std::move(p))
- {
- }
- virtual short Execute() override;
- virtual bool StartExecuteAsync(AsyncContext &) override;
- virtual OUString GetServiceName() const override;
- virtual OUString GetParSource() const override;
- virtual OUString GetParName() const override;
- virtual OUString GetParUser() const override;
- virtual OUString GetParPass() const override;
-};
-
-class AbstractScDeleteCellDlg_Impl : public AbstractScDeleteCellDlg
-{
- std::shared_ptr<ScDeleteCellDlg> m_xDlg;
-public:
- explicit AbstractScDeleteCellDlg_Impl(std::unique_ptr<ScDeleteCellDlg> p)
- : m_xDlg(std::move(p))
- {
- }
- virtual short Execute() override;
- virtual bool StartExecuteAsync(AsyncContext& rCtx) override;
- virtual DelCellCmd GetDelCellCmd() const override;
-
- // screenshotting
- virtual BitmapEx createScreenshot() const override;
- virtual OUString GetScreenshotId() const override;
-};
-
-//for dataform
-class AbstractScDataFormDlg_Impl : public AbstractScDataFormDlg
-{
- std::unique_ptr<ScDataFormDlg> m_xDlg;
-public:
- explicit AbstractScDataFormDlg_Impl(std::unique_ptr<ScDataFormDlg> p)
- : m_xDlg(std::move(p))
- {
- }
- virtual short Execute() override;
-
- // screenshotting
- virtual BitmapEx createScreenshot() const override;
- virtual OUString GetScreenshotId() const override;
-};
-
-class AbstractScDeleteContentsDlg_Impl : public AbstractScDeleteContentsDlg
-{
- std::unique_ptr<ScDeleteContentsDlg> m_xDlg;
-public:
- explicit AbstractScDeleteContentsDlg_Impl(std::unique_ptr<ScDeleteContentsDlg> p)
- : m_xDlg(std::move(p))
- {
- }
- virtual short Execute() override;
- virtual void DisableObjects() override;
- virtual InsertDeleteFlags GetDelContentsCmdBits() const override;
-
- // screenshotting
- virtual BitmapEx createScreenshot() const override;
- virtual OUString GetScreenshotId() const override;
-};
-
-class AbstractScFillSeriesDlg_Impl:public AbstractScFillSeriesDlg
-{
- std::unique_ptr<ScFillSeriesDlg> m_xDlg;
-public:
- explicit AbstractScFillSeriesDlg_Impl(std::unique_ptr<ScFillSeriesDlg> p)
- : m_xDlg(std::move(p))
- {
- }
- virtual short Execute() override;
- virtual FillDir GetFillDir() const override;
- virtual FillCmd GetFillCmd() const override;
- virtual FillDateCmd GetFillDateCmd() const override;
- virtual double GetStart() const override;
- virtual double GetStep() const override;
- virtual double GetMax() const override;
- virtual OUString GetStartStr() const override;
- virtual void SetEdStartValEnabled(bool bFlag) override;
-};
-
-class AbstractScGroupDlg_Impl : public AbstractScGroupDlg
-{
- std::shared_ptr<ScGroupDlg> m_xDlg;
-public:
- explicit AbstractScGroupDlg_Impl(std::shared_ptr<ScGroupDlg> p)
- : m_xDlg(std::move(p))
- {
- }
- virtual short Execute() override;
- virtual bool StartExecuteAsync(VclAbstractDialog::AsyncContext &rCtx) override;
- virtual bool GetColsChecked() const override;
-};
-
-class AbstractScInsertCellDlg_Impl : public AbstractScInsertCellDlg
-{
- std::shared_ptr<ScInsertCellDlg> m_xDlg;
-public:
- explicit AbstractScInsertCellDlg_Impl(std::unique_ptr<ScInsertCellDlg> p)
- : m_xDlg(std::move(p))
- {
- }
- virtual short Execute() override;
- virtual bool StartExecuteAsync(VclAbstractDialog::AsyncContext &rCtx) override;
- virtual InsCellCmd GetInsCellCmd() const override ;
- virtual size_t GetCount() const override ;
-};
-
-class AbstractScInsertContentsDlg_Impl : public AbstractScInsertContentsDlg
-{
- std::unique_ptr<ScInsertContentsDlg> m_xDlg;
-public:
- explicit AbstractScInsertContentsDlg_Impl(std::unique_ptr<ScInsertContentsDlg> p)
- : m_xDlg(std::move(p))
- {
- }
- virtual short Execute() override;
- virtual InsertDeleteFlags GetInsContentsCmdBits() const override;
- virtual ScPasteFunc GetFormulaCmdBits() const override;
- virtual bool IsSkipEmptyCells() const override;
- virtual bool IsLink() const override;
- virtual void SetFillMode( bool bSet ) override;
- virtual void SetOtherDoc( bool bSet ) override;
- virtual bool IsTranspose() const override;
- virtual void SetChangeTrack( bool bSet ) override;
- virtual void SetCellShiftDisabled( CellShiftDisabledFlags nDisable ) override;
- virtual InsCellCmd GetMoveMode() override;
-
- // screenshotting
- virtual BitmapEx createScreenshot() const override;
- virtual OUString GetScreenshotId() const override;
-};
-
-class AbstractScInsertTableDlg_Impl : public AbstractScInsertTableDlg
-{
- std::shared_ptr<ScInsertTableDlg> m_xDlg;
-public:
- explicit AbstractScInsertTableDlg_Impl(std::shared_ptr<ScInsertTableDlg> p)
- : m_xDlg(std::move(p))
- {
- }
- virtual short Execute() override;
- virtual bool StartExecuteAsync(VclAbstractDialog::AsyncContext &rCtx) override;
- virtual bool GetTablesFromFile() override;
- virtual bool GetTablesAsLink() override;
- virtual const OUString* GetFirstTable( sal_uInt16* pN = nullptr ) override;
- virtual ScDocShell* GetDocShellTables() override;
- virtual bool IsTableBefore() override;
- virtual sal_uInt16 GetTableCount() override;
- virtual const OUString* GetNextTable( sal_uInt16* pN ) override;
-
- // screenshotting
- virtual BitmapEx createScreenshot() const override;
- virtual OUString GetScreenshotId() const override;
-};
-
-class AbstractScSelEntryDlg_Impl : public AbstractScSelEntryDlg
-{
- std::shared_ptr<ScSelEntryDlg> m_xDlg;
-public:
- explicit AbstractScSelEntryDlg_Impl(std::unique_ptr<ScSelEntryDlg> p)
- : m_xDlg(std::move(p))
- {
- }
- virtual short Execute() override;
- virtual bool StartExecuteAsync(AsyncContext& rCtx) override;
- virtual OUString GetSelectedEntry() const override;
-};
-
-class AbstractScLinkedAreaDlg_Impl : public AbstractScLinkedAreaDlg
-{
- std::unique_ptr<ScLinkedAreaDlg> m_xDlg;
-public:
- explicit AbstractScLinkedAreaDlg_Impl(std::unique_ptr<ScLinkedAreaDlg> p)
- : m_xDlg(std::move(p))
- {
- }
- virtual ~AbstractScLinkedAreaDlg_Impl() override;
- virtual short Execute() override;
- virtual void InitFromOldLink( const OUString& rFile, const OUString& rFilter,
- const OUString& rOptions, const OUString& rSource,
- sal_Int32 nRefreshDelaySeconds ) override;
- virtual OUString GetURL() override;
- virtual OUString GetFilter() override; // may be empty
- virtual OUString GetOptions() override; // filter options
- virtual OUString GetSource() override; // separated by ";"
- virtual sal_Int32 GetRefreshDelaySeconds() override; // 0 if disabled
-};
-
-class AbstractScMetricInputDlg_Impl : public AbstractScMetricInputDlg
-{
- std::shared_ptr<ScMetricInputDlg> m_xDlg;
-public:
- explicit AbstractScMetricInputDlg_Impl(std::shared_ptr<ScMetricInputDlg> p)
- : m_xDlg(std::move(p))
- {
- }
- virtual short Execute() override;
- virtual bool StartExecuteAsync(AsyncContext& rCtx) override;
- virtual int GetInputValue() const override;
-};
-
-class AbstractScMoveTableDlg_Impl : public AbstractScMoveTableDlg
-{
- std::shared_ptr<ScMoveTableDlg> m_xDlg;
-public:
- explicit AbstractScMoveTableDlg_Impl(std::shared_ptr<ScMoveTableDlg> p)
- : m_xDlg(std::move(p))
- {
- }
- virtual short Execute() override;
- virtual bool StartExecuteAsync(VclAbstractDialog::AsyncContext& rCtx) override;
- virtual sal_uInt16 GetSelectedDocument () const override;
- virtual sal_uInt16 GetSelectedTable () const override;
- virtual bool GetCopyTable () const override;
- virtual bool GetRenameTable () const override;
- virtual void GetTabNameString( OUString& rString ) const override;
- virtual void SetForceCopyTable () override;
- virtual void EnableRenameTable (bool bFlag) override;
-
- // screenshotting
- virtual BitmapEx createScreenshot() const override;
- virtual OUString GetScreenshotId() const override;
-};
-
-class AbstractScNameCreateDlg_Impl : public AbstractScNameCreateDlg
-{
- std::unique_ptr<ScNameCreateDlg> m_xDlg;
-public:
- explicit AbstractScNameCreateDlg_Impl(std::unique_ptr<ScNameCreateDlg> p)
- : m_xDlg(std::move(p))
- {
- }
- virtual short Execute() override;
- virtual CreateNameFlags GetFlags() const override;
-
- // screenshotting
- virtual BitmapEx createScreenshot() const override;
- virtual OUString GetScreenshotId() const override;
-};
-
-class AbstractScNamePasteDlg_Impl : public AbstractScNamePasteDlg
-{
- std::unique_ptr<ScNamePasteDlg> m_xDlg;
-public:
- explicit AbstractScNamePasteDlg_Impl(std::unique_ptr<ScNamePasteDlg> p)
- : m_xDlg(std::move(p))
- {
- }
- virtual short Execute() override;
- virtual std::vector<OUString> GetSelectedNames() const override;
-};
-
-class AbstractScPivotFilterDlg_Impl : public AbstractScPivotFilterDlg
-{
- std::unique_ptr<ScPivotFilterDlg> m_xDlg;
-public:
- explicit AbstractScPivotFilterDlg_Impl(std::unique_ptr<ScPivotFilterDlg> p)
- : m_xDlg(std::move(p))
- {
- }
- virtual short Execute() override;
- virtual const ScQueryItem& GetOutputItem() override;
-};
-
-class AbstractScDPFunctionDlg_Impl : public AbstractScDPFunctionDlg
-{
- std::shared_ptr<ScDPFunctionDlg> m_xDlg;
-public:
- explicit AbstractScDPFunctionDlg_Impl(std::shared_ptr<ScDPFunctionDlg> p)
- : m_xDlg(std::move(p))
- {
- }
- virtual short Execute() override;
- virtual bool StartExecuteAsync(VclAbstractDialog::AsyncContext &rCtx) override;
- virtual PivotFunc GetFuncMask() const override;
- virtual css::sheet::DataPilotFieldReference GetFieldRef() const override;
- virtual void Response(int nResponse) override;
-};
-
-class AbstractScDPSubtotalDlg_Impl : public AbstractScDPSubtotalDlg
-{
- std::shared_ptr<ScDPSubtotalDlg> m_xDlg;
-public:
- explicit AbstractScDPSubtotalDlg_Impl(std::shared_ptr<ScDPSubtotalDlg> p)
- : m_xDlg(std::move(p))
- {
- }
- virtual short Execute() override;
- virtual bool StartExecuteAsync(VclAbstractDialog::AsyncContext &rCtx) override;
- virtual PivotFunc GetFuncMask() const override;
- virtual void FillLabelData( ScDPLabelData& rLabelData ) const override;
- virtual void Response(int nResponse) override;
-};
-
-class AbstractScDPNumGroupDlg_Impl : public AbstractScDPNumGroupDlg
-{
- std::unique_ptr<ScDPNumGroupDlg> m_xDlg;
-public:
- explicit AbstractScDPNumGroupDlg_Impl(std::unique_ptr<ScDPNumGroupDlg> p)
- : m_xDlg(std::move(p))
- {
- }
- virtual short Execute() override;
- virtual ScDPNumGroupInfo GetGroupInfo() const override;
-};
-
-class AbstractScDPDateGroupDlg_Impl : public AbstractScDPDateGroupDlg
-{
- std::unique_ptr<ScDPDateGroupDlg> m_xDlg;
-public:
- explicit AbstractScDPDateGroupDlg_Impl(std::unique_ptr<ScDPDateGroupDlg> p)
- : m_xDlg(std::move(p))
- {
- }
- virtual short Execute() override;
- virtual ScDPNumGroupInfo GetGroupInfo() const override;
- virtual sal_Int32 GetDatePart() const override;
-};
-
-class AbstractScDPShowDetailDlg_Impl : public AbstractScDPShowDetailDlg
-{
- std::unique_ptr<ScDPShowDetailDlg> m_xDlg;
-public:
- explicit AbstractScDPShowDetailDlg_Impl(std::unique_ptr<ScDPShowDetailDlg> p)
- : m_xDlg(std::move(p))
- {
- }
- virtual short Execute() override;
- virtual OUString GetDimensionName() const override;
-};
-
-class AbstractScNewScenarioDlg_Impl : public AbstractScNewScenarioDlg
-{
- std::unique_ptr<ScNewScenarioDlg> m_xDlg;
-public:
- explicit AbstractScNewScenarioDlg_Impl(std::unique_ptr<ScNewScenarioDlg> p)
- : m_xDlg(std::move(p))
- {
- }
- virtual short Execute() override;
-
- virtual void SetScenarioData( const OUString& rName, const OUString& rComment,
- const Color& rColor, ScScenarioFlags nFlags ) override;
-
- virtual void GetScenarioData( OUString& rName, OUString& rComment,
- Color& rColor, ScScenarioFlags& rFlags ) const override;
-};
-
-class AbstractScShowTabDlg_Impl : public AbstractScShowTabDlg
-{
- std::shared_ptr<ScShowTabDlg> m_xDlg;
-public:
- explicit AbstractScShowTabDlg_Impl(std::shared_ptr<ScShowTabDlg> p)
- : m_xDlg(std::move(p))
- {
- }
- virtual short Execute() override;
- virtual bool StartExecuteAsync(VclAbstractDialog::AsyncContext &rCtx) override;
- virtual void Insert( const OUString& rString, bool bSelected ) override;
- virtual void SetDescription(const OUString& rTitle, const OUString& rFixedText, const OUString& sDlgHelpId, const OUString& sLbHelpId) override;
- virtual OUString GetEntry(sal_Int32 nPos) const override;
- virtual std::vector<sal_Int32> GetSelectedRows() const override;
-};
-
-class AbstractScGoToTabDlg_Impl : public AbstractScGoToTabDlg
-{
- std::shared_ptr<ScGoToTabDlg> m_xDlg;
-public:
- explicit AbstractScGoToTabDlg_Impl(std::shared_ptr<ScGoToTabDlg> p)
- : m_xDlg(std::move(p))
- {
- }
- virtual short Execute() override;
- virtual bool StartExecuteAsync(VclAbstractDialog::AsyncContext &rCtx) override;
- virtual void Insert( const OUString& rString, bool bSelected ) override;
- virtual void SetDescription(const OUString& rTitle, const OUString& rEntryLabel, const OUString& rListLabel,
- const OUString& rDlgHelpId, const OUString& rEnHelpId, const OUString& rLbHelpId) override;
- virtual OUString GetSelectedEntry() const override;
-};
-
-class AbstractScSortWarningDlg_Impl : public AbstractScSortWarningDlg
-{
- std::unique_ptr<ScSortWarningDlg> m_xDlg;
-public:
- explicit AbstractScSortWarningDlg_Impl(std::unique_ptr<ScSortWarningDlg> p)
- : m_xDlg(std::move(p))
- {
- }
- virtual short Execute() override;
-};
-
-class AbstractScStringInputDlg_Impl : public AbstractScStringInputDlg
-{
- std::shared_ptr<ScStringInputDlg> m_xDlg;
-public:
- explicit AbstractScStringInputDlg_Impl(std::shared_ptr<ScStringInputDlg> p)
- : m_xDlg(std::move(p))
- {
- }
- virtual short Execute() override;
- virtual bool StartExecuteAsync(AsyncContext &rCtx) override;
- virtual OUString GetInputString() const override;
-
- // screenshotting
- virtual BitmapEx createScreenshot() const override;
- virtual OUString GetScreenshotId() const override;
-};
-
-class AbstractScTabBgColorDlg_Impl : public AbstractScTabBgColorDlg
-{
- std::shared_ptr<ScTabBgColorDlg> m_xDlg;
-public:
- explicit AbstractScTabBgColorDlg_Impl(std::shared_ptr<ScTabBgColorDlg> p)
- : m_xDlg(std::move(p))
- {
- }
- virtual short Execute() override;
- virtual bool StartExecuteAsync(VclAbstractDialog::AsyncContext &rCtx) override;
- virtual void GetSelectedColor( Color& rColor ) const override;
-
- // screenshotting
- virtual BitmapEx createScreenshot() const override;
- virtual OUString GetScreenshotId() const override;
-};
-
-class AbstractScImportOptionsDlg_Impl : public AbstractScImportOptionsDlg
-{
- std::unique_ptr<ScImportOptionsDlg> m_xDlg;
-public:
- explicit AbstractScImportOptionsDlg_Impl(std::unique_ptr<ScImportOptionsDlg> p)
- : m_xDlg(std::move(p))
- {
- }
- virtual short Execute() override;
- virtual void GetImportOptions( ScImportOptions& rOptions ) const override;
- virtual void SaveImportOptions() const override;
-};
-
-class AbstractScTextImportOptionsDlg_Impl : public AbstractScTextImportOptionsDlg
-{
- std::unique_ptr<ScTextImportOptionsDlg> m_xDlg;
-public:
- explicit AbstractScTextImportOptionsDlg_Impl(std::unique_ptr<ScTextImportOptionsDlg> p)
- : m_xDlg(std::move(p))
- {
- }
- virtual short Execute() override;
- virtual LanguageType GetLanguageType() const override;
- virtual bool IsDateConversionSet() const override;
- virtual bool IsScientificConversionSet() const override;
- virtual bool IsKeepAskingSet() const override;
-
- // screenshotting
- virtual BitmapEx createScreenshot() const override;
- virtual OUString GetScreenshotId() const override;
-};
-
-class ScAbstractTabController_Impl : public SfxAbstractTabDialog
-{
- std::shared_ptr<SfxTabDialogController> m_xDlg;
-public:
- explicit ScAbstractTabController_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 std::vector<OUString> getAllPageUIXMLDescriptions() const override;
- virtual bool selectPageByUIXMLDescription(const OUString& rUIXMLDescription) override;
- virtual BitmapEx createScreenshot() const override;
- virtual OUString GetScreenshotId() const override;
-};
-
-class ScAsyncTabController_Impl : public ScAsyncTabController
-{
- std::shared_ptr<SfxTabDialogController> m_xDlg;
-public:
- explicit ScAsyncTabController_Impl(std::shared_ptr<SfxTabDialogController> p)
- : m_xDlg(std::move(p))
- {
- }
- virtual bool StartExecuteAsync(VclAbstractDialog::AsyncContext &rCtx) override;
- virtual const SfxItemSet* GetOutputItemSet() const override;
- virtual void SetCurPageId( const OUString &rName ) override;
-};
//AbstractDialogFactory_Impl implementations
class ScAbstractDialogFactory_Impl : public ScAbstractDialogFactory
diff --git a/sc/source/ui/attrdlg/scuiexp.cxx b/sc/source/ui/attrdlg/scuiexp.cxx
index 3da9d2ed7b42..97cd5299aedc 100644
--- a/sc/source/ui/attrdlg/scuiexp.cxx
+++ b/sc/source/ui/attrdlg/scuiexp.cxx
@@ -21,8 +21,13 @@
#include "scdlgfact.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>
+#include <com/sun/star/uno/XComponentContext.hpp>
+
/// anonymous implementation namespace
namespace
{