summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2024-12-19 12:41:31 +0500
committerMike Kaganski <mike.kaganski@collabora.com>2024-12-21 22:18:22 +0100
commite04d5aef350a2cee7bdc7d661be1d10a90d75086 (patch)
tree6341bfbe5e7f2b4e4d1c61df261079b5ae38ae30
parent99df3eb3702b00268774287c242ccd16a272c899 (diff)
Simplify abstract dialog impls using vcl::AbstractDialogImpl* in sw
Change-Id: Ie2816ab4f4ad5f4d703d4f6669ae16a9fa60933e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178984 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
-rw-r--r--sw/source/ui/dialog/swdlgfact.cxx1598
-rw-r--r--sw/source/ui/dialog/swdlgfact.hxx706
2 files changed, 692 insertions, 1612 deletions
diff --git a/sw/source/ui/dialog/swdlgfact.cxx b/sw/source/ui/dialog/swdlgfact.cxx
index 086c7f4fd451..343dd34850dc 100644
--- a/sw/source/ui/dialog/swdlgfact.cxx
+++ b/sw/source/ui/dialog/swdlgfact.cxx
@@ -23,6 +23,7 @@
#include "swdlgfact.hxx"
#include <svl/style.hxx>
+#include <vcl/abstdlgimpl.hxx>
#include <globals.hrc>
#include <wordcountdialog.hxx>
@@ -93,441 +94,69 @@
#include <formatlinebreak.hxx>
#include <translatelangselect.hxx>
-using namespace ::com::sun::star;
using namespace css::frame;
using namespace css::uno;
-short AbstractSwWordCountFloatDlg_Impl::Execute()
+namespace
{
- return m_xDlg->run();
-}
-
-short AbstractSwInsertAbstractDlg_Impl::Execute()
-{
- assert(false);
- return -1;
-}
-
-bool AbstractSwInsertAbstractDlg_Impl::StartExecuteAsync(AsyncContext &rCtx)
-{
- return weld::GenericDialogController::runAsync(m_xDlg, rCtx.maEndDialogFn);
-}
-
-short SwAbstractSfxController_Impl::Execute()
-{
- return m_xDlg->run();
-}
-
-bool SwAbstractSfxController_Impl::StartExecuteAsync(AsyncContext &rCtx)
-{
- return weld::GenericDialogController::runAsync(m_xDlg, rCtx.maEndDialogFn);
-}
-
-short AbstractNumFormatDlg_Impl::Execute()
-{
- return m_xDlg->run();
-}
-
-bool AbstractNumFormatDlg_Impl::StartExecuteAsync(AsyncContext &rCtx)
-{
- return SfxSingleTabDialogController::runAsync(m_xDlg, rCtx.maEndDialogFn);
-}
-
-short AbstractSwAsciiFilterDlg_Impl::Execute()
-{
- return m_xDlg->run();
-}
-
-short AbstractSplitTableDialog_Impl::Execute()
-{
- return m_xDlg->run();
-}
-
-bool AbstractSplitTableDialog_Impl::StartExecuteAsync(AsyncContext &rCtx)
-{
- return weld::GenericDialogController::runAsync(m_xDlg, rCtx.maEndDialogFn);
-}
-
-short AbstractSwTableWidthDlg_Impl::Execute()
-{
- assert(false);
- return -1;
-}
-
-bool AbstractSwTableWidthDlg_Impl::StartExecuteAsync(AsyncContext &rCtx)
-{
- return weld::GenericDialogController::runAsync(m_xDlg, rCtx.maEndDialogFn);
-}
-
-short AbstractSwTableHeightDlg_Impl::Execute()
-{
- assert(false);
- return -1;
-}
-
-bool AbstractSwTableHeightDlg_Impl::StartExecuteAsync(AsyncContext &rCtx)
-{
- return weld::GenericDialogController::runAsync(m_xDlg, rCtx.maEndDialogFn);
-}
-
-short AbstractSwMergeTableDlg_Impl::Execute()
-{
- return m_xDlg->run();
-}
-
-short AbstractSwPageNumberDlg_Impl::Execute()
-{
- return m_xDlg->run();
-}
-
-bool AbstractSwPageNumberDlg_Impl::StartExecuteAsync(AsyncContext &rCtx)
-{
- return weld::GenericDialogController::runAsync(m_xDlg, rCtx.maEndDialogFn);
-}
-
-short AbstractGenericDialog_Impl::Execute()
-{
- return m_xDlg->run();
-}
-
-bool AbstractGenericDialog_Impl::StartExecuteAsync(AsyncContext &rCtx)
-{
- return weld::GenericDialogController::runAsync(m_xDlg, rCtx.maEndDialogFn);
-}
-
-short AbstractSwSortDlg_Impl::Execute()
-{
- assert(false);
- return -1;
-}
-
-bool AbstractSwSortDlg_Impl::StartExecuteAsync(AsyncContext &rCtx)
-{
- return weld::GenericDialogController::runAsync(m_xDlg, rCtx.maEndDialogFn);
-}
-
-short AbstractMultiTOXMarkDlg_Impl::Execute()
-{
- return m_xDlg->run();
-}
-
-short AbstractTabController_Impl::Execute()
-{
- return m_xDlg->run();
-}
-
-short AbstractNumBulletDialog_Impl::Execute()
-{
- return m_xDlg->run();
-}
-
-short AbstractSwConvertTableDlg_Impl::Execute()
-{
- return m_xDlg->run();
-}
-
-short AbstractSwInsertDBColAutoPilot_Impl::Execute()
-{
- assert(false);
- return -1;
-}
-
-bool AbstractSwInsertDBColAutoPilot_Impl::StartExecuteAsync(AsyncContext &rCtx)
-{
- return weld::GenericDialogController::runAsync(m_xDlg, rCtx.maEndDialogFn);
-}
-
-short AbstractDropDownFieldDialog_Impl::Execute()
-{
- return m_xDlg->run();
-}
-
-short AbstractDropDownFormFieldDialog_Impl::Execute()
-{
- assert(false);
- return -1;
-}
-
-bool AbstractDropDownFormFieldDialog_Impl::StartExecuteAsync(AsyncContext &rCtx)
-{
- return weld::GenericDialogController::runAsync(m_xDlg, rCtx.maEndDialogFn);
-}
-
-short AbstractDateFormFieldDialog_Impl::Execute()
-{
- assert(false);
- return -1;
-}
-
-bool AbstractDateFormFieldDialog_Impl::StartExecuteAsync(AsyncContext &rCtx)
-{
- return weld::GenericDialogController::runAsync(m_xDlg, rCtx.maEndDialogFn);
-}
-
-short AbstractSwLabDlg_Impl::Execute()
-{
- return m_xDlg->run();
-}
-
-short AbstractSwSelGlossaryDlg_Impl::Execute()
-{
- return m_xDlg->run();
-}
-
-short AbstractSwAutoFormatDlg_Impl::Execute()
-{
- assert(false);
- return -1;
-}
-
-bool AbstractSwAutoFormatDlg_Impl::StartExecuteAsync(AsyncContext &rCtx)
-{
- return weld::GenericDialogController::runAsync(m_xDlg, rCtx.maEndDialogFn);
-}
-
-short AbstractSwFieldDlg_Impl::Execute()
-{
- return m_xDlg->run();
-}
-
-short AbstractSwRenameXNamedDlg_Impl::Execute()
-{
- return m_xDlg->run();
-}
-
-bool AbstractSwRenameXNamedDlg_Impl::StartExecuteAsync(VclAbstractDialog::AsyncContext& rCtx)
-{
- return weld::DialogController::runAsync(m_xDlg, rCtx.maEndDialogFn);
-}
-
-bool AbstractSwContentControlListItemDlg_Impl::StartExecuteAsync(VclAbstractDialog::AsyncContext& rCtx)
-{
- return weld::DialogController::runAsync(m_xDlg, rCtx.maEndDialogFn);
-}
-
-short AbstractSwContentControlListItemDlg_Impl::Execute()
-{
- return m_xDlg->run();
-}
-
-short AbstractSwModalRedlineAcceptDlg_Impl::Execute()
-{
- assert(false);
- return -1;
-}
-
-bool AbstractSwModalRedlineAcceptDlg_Impl::StartExecuteAsync(VclAbstractDialog::AsyncContext& rCtx)
-{
- return weld::DialogController::runAsync(m_xDlg, rCtx.maEndDialogFn);
-}
-
-short AbstractGlossaryDlg_Impl::Execute()
-{
- assert(false);
- return -1;
-}
-
-bool AbstractGlossaryDlg_Impl::StartExecuteAsync(AsyncContext &rCtx)
-{
- return weld::GenericDialogController::runAsync(m_xDlg, rCtx.maEndDialogFn);
-}
-
-short AbstractFieldInputDlg_Impl::Execute()
-{
- return m_xDlg->run();
-}
-
-short AbstractInsFootNoteDlg_Impl::Execute()
-{
- assert(false);
- return -1;
-}
-
-bool AbstractInsFootNoteDlg_Impl::StartExecuteAsync(AsyncContext &rCtx)
-{
- return weld::GenericDialogController::runAsync(m_xDlg, rCtx.maEndDialogFn);
-}
-
-short AbstractJavaEditDialog_Impl::Execute()
-{
- return m_xDlg->run();
-}
-
-short AbstractMailMergeDlg_Impl::Execute()
-{
- return m_xDlg->run();
-}
-
-short AbstractMailMergeCreateFromDlg_Impl::Execute()
-{
- return m_xDlg->run();
-}
-
-short AbstractMailMergeFieldConnectionsDlg_Impl::Execute()
-{
- return m_xDlg->run();
-}
-
-short AbstractMultiTOXTabDialog_Impl::Execute()
-{
- return m_xDlg->run();
-}
-
-bool AbstractMultiTOXTabDialog_Impl::StartExecuteAsync(AsyncContext &rCtx)
-{
- return SfxTabDialogController::runAsync(m_xDlg, rCtx.maEndDialogFn);
-}
-
-short AbstractEditRegionDlg_Impl::Execute()
-{
- return m_xDlg->run();
-}
-
-bool AbstractEditRegionDlg_Impl::StartExecuteAsync(AsyncContext &rCtx)
-{
- return weld::DialogController::runAsync(m_xDlg, rCtx.maEndDialogFn);
-}
-
-short AbstractInsertSectionTabDialog_Impl::Execute()
-{
- return m_xDlg->run();
-}
-
-bool AbstractInsertSectionTabDialog_Impl::StartExecuteAsync(AsyncContext &rCtx)
-{
- return SfxTabDialogController::runAsync(m_xDlg, rCtx.maEndDialogFn);
-}
-
-short AbstractIndexMarkFloatDlg_Impl::Execute()
+// This base disallows synchronous execution
+template <class Base, class Dialog>
+class AbstractDialogImpl_NoSync : public vcl::AbstractDialogImpl_Async<Base, Dialog>
{
- return m_xDlg->run();
-}
-
-short AbstractAuthMarkFloatDlg_Impl::Execute()
-{
- return m_xDlg->run();
-}
-
-void AbstractTabController_Impl::SetCurPageId( const OUString &rName )
-{
- m_xDlg->SetCurPageId( rName );
-}
-
-const SfxItemSet* AbstractTabController_Impl::GetOutputItemSet() const
-{
- return m_xDlg->GetOutputItemSet();
-}
-
-WhichRangesContainer AbstractTabController_Impl::GetInputRanges(const SfxItemPool& pItem )
-{
- return m_xDlg->GetInputRanges( pItem );
-}
-
-void AbstractTabController_Impl::SetInputSet( const SfxItemSet* pInSet )
-{
- m_xDlg->SetInputSet( pInSet );
-}
-
-bool AbstractTabController_Impl::StartExecuteAsync(AsyncContext &rCtx)
-{
- return SfxTabDialogController::runAsync(m_xDlg, rCtx.maEndDialogFn);
-}
-
-//From class Window.
-void AbstractTabController_Impl::SetText( const OUString& rStr )
-{
- m_xDlg->set_title(rStr);
-}
-
-void AbstractNumBulletDialog_Impl::SetCurPageId( const OUString &rName )
-{
- m_xDlg->SetCurPageId( rName );
-}
-
-const SfxItemSet* AbstractNumBulletDialog_Impl::GetOutputItemSet() const
-{
- return m_xDlg->GetOutputItemSet();
-}
-
-const SfxItemSet* AbstractNumBulletDialog_Impl::GetInputItemSet() const
-{
- return m_xDlg->GetInputItemSet();
-}
-
-WhichRangesContainer AbstractNumBulletDialog_Impl::GetInputRanges(const SfxItemPool& pItem )
-{
- return m_xDlg->GetInputRanges( pItem );
-}
-
-void AbstractNumBulletDialog_Impl::SetInputSet( const SfxItemSet* pInSet )
-{
- m_xDlg->SetInputSet( pInSet );
-}
-
-bool AbstractNumBulletDialog_Impl::StartExecuteAsync(AsyncContext &rCtx)
-{
- return SfxTabDialogController::runAsync(m_xDlg, rCtx.maEndDialogFn);
-}
-
-//From class Window.
-void AbstractNumBulletDialog_Impl::SetText( const OUString& rStr )
-{
- m_xDlg->set_title(rStr);
-}
-
-IMPL_LINK_NOARG(AbstractApplyTabController_Impl, ApplyHdl, weld::Button&, void)
-{
- if (m_xDlg->Apply())
+public:
+ using vcl::AbstractDialogImpl_Async<Base, Dialog>::AbstractDialogImpl_Async;
+ short Execute() override
{
- m_aHandler.Call(nullptr);
- m_xDlg->Applied();
+ assert(false);
+ return -1;
}
-}
+};
-void AbstractApplyTabController_Impl::SetApplyHdl( const Link<LinkParamNone*,void>& rLink )
+class AbstractSwBreakDlg_Impl : public AbstractSwBreakDlg
{
- m_aHandler = rLink;
- m_xDlg->SetApplyHandler(LINK(this, AbstractApplyTabController_Impl, ApplyHdl));
-}
+ std::shared_ptr<weld::DialogController> m_xDlg;
-sal_uInt8 AbstractSwInsertAbstractDlg_Impl::GetLevel() const
-{
- return m_xDlg->GetLevel();
-}
+public:
+ explicit AbstractSwBreakDlg_Impl(std::shared_ptr<weld::DialogController> p)
+ : m_xDlg(std::move(p))
+ {
+ }
+ OUString GetTemplateName() override;
+ sal_uInt16 GetKind() override;
+ std::optional<sal_uInt16> GetPageNumber() override;
+ std::optional<SwLineBreakClear> GetClear() override;
-sal_uInt8 AbstractSwInsertAbstractDlg_Impl::GetPara() const
-{
- return m_xDlg->GetPara();
-}
+ std::shared_ptr<weld::DialogController> getDialogController() override { return m_xDlg; }
+};
-const SfxItemSet* SwAbstractSfxController_Impl::GetOutputItemSet() const
+class AbstractSwTranslateLangSelectDlg_Impl : public AbstractSwTranslateLangSelectDlg
{
- return m_xDlg->GetOutputItemSet();
-}
+ std::shared_ptr<weld::DialogController> m_xDlg;
-const SfxItemSet* AbstractNumFormatDlg_Impl::GetOutputItemSet() const
-{
- return m_xDlg->GetOutputItemSet();
-}
+public:
+ explicit AbstractSwTranslateLangSelectDlg_Impl(std::shared_ptr<weld::DialogController> p)
+ : m_xDlg(std::move(p))
+ {
+ }
-void SwAbstractSfxController_Impl::SetText(const OUString& rStr)
-{
- m_xDlg->set_title(rStr);
-}
+ std::shared_ptr<weld::DialogController> getDialogController() override { return m_xDlg; }
+ std::optional<SwLanguageListItem> GetSelectedLanguage() override;
+};
-void AbstractNumFormatDlg_Impl::SetText(const OUString& rStr)
+class AbstractInsTableDlg_Impl : public AbstractInsTableDlg
{
- m_xDlg->set_title(rStr);
-}
+ std::shared_ptr<weld::DialogController> m_xDlg;
-void AbstractSwAsciiFilterDlg_Impl::FillOptions( SwAsciiOptions& rOptions )
-{
- m_xDlg->FillOptions(rOptions);
-}
-
-SplitTable_HeadlineOption AbstractSplitTableDialog_Impl::GetSplitMode()
-{
- return m_xDlg->GetSplitMode();
+public:
+ explicit AbstractInsTableDlg_Impl(std::shared_ptr<weld::DialogController> p)
+ : m_xDlg(std::move(p))
+ {
+ }
+ void GetValues(OUString& rName, sal_uInt16& rRow, sal_uInt16& rCol,
+ SwInsertTableOptions& rInsTableFlags, OUString& rTableAutoFormatName,
+ std::unique_ptr<SwTableAutoFormat>& prTAFormat) override;
+ std::shared_ptr<weld::DialogController> getDialogController() override { return m_xDlg; }
+};
}
OUString AbstractSwBreakDlg_Impl::GetTemplateName()
@@ -566,823 +195,929 @@ std::optional<SwLineBreakClear> AbstractSwBreakDlg_Impl::GetClear()
return SwLineBreakClear::NONE;
}
-void AbstractSwConvertTableDlg_Impl::GetValues( sal_Unicode& rDelim,SwInsertTableOptions& rInsTableFlags,
- SwTableAutoFormat const*& prTAFormat)
+void AbstractInsTableDlg_Impl::GetValues( OUString& rName, sal_uInt16& rRow, sal_uInt16& rCol,
+ SwInsertTableOptions& rInsTableFlags, OUString& rTableAutoFormatName,
+ std::unique_ptr<SwTableAutoFormat>& prTAFormat )
{
- m_xDlg->GetValues(rDelim,rInsTableFlags, prTAFormat);
+ SwInsTableDlg* pDlg = dynamic_cast<SwInsTableDlg*>(m_xDlg.get());
+ if (pDlg)
+ pDlg->GetValues(rName, rRow, rCol, rInsTableFlags, rTableAutoFormatName, prTAFormat);
}
-void AbstractSwInsertDBColAutoPilot_Impl::DataToDoc( const uno::Sequence< uno::Any >& rSelection,
- uno::Reference< sdbc::XDataSource> rxSource,
- uno::Reference< sdbc::XConnection> xConnection,
- uno::Reference< sdbc::XResultSet > xResultSet)
+std::optional<SwLanguageListItem> AbstractSwTranslateLangSelectDlg_Impl::GetSelectedLanguage()
{
-#if HAVE_FEATURE_DBCONNECTIVITY && !ENABLE_FUZZERS
- m_xDlg->DataToDoc(rSelection, rxSource, xConnection, xResultSet);
+#if HAVE_FEATURE_CURL && !ENABLE_WASM_STRIP_EXTRA
+ return SwTranslateLangSelectDlg::GetSelectedLanguage();
#else
- (void) rSelection;
- (void) rxSource;
- (void) xConnection;
- (void) xResultSet;
+ return {};
#endif
}
-bool AbstractDropDownFieldDialog_Impl::PrevButtonPressed() const
+namespace
{
- return m_xDlg->PrevButtonPressed();
-}
-
-bool AbstractDropDownFieldDialog_Impl::NextButtonPressed() const
+class AbstractSwInsertAbstractDlg_Impl
+ : public AbstractDialogImpl_NoSync<AbstractSwInsertAbstractDlg, SwInsertAbstractDlg>
{
- return m_xDlg->NextButtonPressed();
+public:
+ using AbstractDialogImpl_NoSync::AbstractDialogImpl_NoSync;
+ sal_uInt8 GetLevel() const override { return m_pDlg->GetLevel(); }
+ sal_uInt8 GetPara() const override { return m_pDlg->GetPara(); }
+};
}
-void AbstractSwLabDlg_Impl::SetCurPageId( const OUString &rName )
-{
- m_xDlg->SetCurPageId( rName );
-}
-
-const SfxItemSet* AbstractSwLabDlg_Impl::GetOutputItemSet() const
-{
- return m_xDlg->GetOutputItemSet();
-}
-
-WhichRangesContainer AbstractSwLabDlg_Impl::GetInputRanges(const SfxItemPool& pItem )
-{
- return m_xDlg->GetInputRanges( pItem );
-}
-
-void AbstractSwLabDlg_Impl::SetInputSet( const SfxItemSet* pInSet )
-{
- m_xDlg->SetInputSet( pInSet );
-}
-
-void AbstractSwLabDlg_Impl::SetText( const OUString& rStr )
-{
- m_xDlg->set_title(rStr);
-}
-
-const OUString& AbstractSwLabDlg_Impl::GetBusinessCardStr() const
+VclPtr<AbstractSwInsertAbstractDlg> SwAbstractDialogFactory_Impl::CreateSwInsertAbstractDlg(weld::Window* pParent)
{
- return m_xDlg->GetBusinessCardStr();
+ return VclPtr<AbstractSwInsertAbstractDlg_Impl>::Create(pParent);
}
-Printer * AbstractSwLabDlg_Impl::GetPrt()
+namespace
{
- return m_xDlg->GetPrt();
-}
-
-void AbstractSwSelGlossaryDlg_Impl::InsertGlos(const OUString &rRegion, const OUString &rGlosName)
+template <class Dialog>
+class SwAbstractSfxController_Impl : public vcl::AbstractDialogImpl_Async<SfxAbstractDialog, Dialog>
{
- m_xDlg->InsertGlos( rRegion, rGlosName );
+public:
+ using vcl::AbstractDialogImpl_Async<SfxAbstractDialog, Dialog>::AbstractDialogImpl_Async;
+ const SfxItemSet* GetOutputItemSet() const override { return this->m_pDlg->GetOutputItemSet(); }
+ void SetText(const OUString& rStr) override { this->m_pDlg->set_title(rStr); }
+};
}
-sal_Int32 AbstractSwSelGlossaryDlg_Impl::GetSelectedIdx() const
-{
- return m_xDlg->GetSelectedIdx();
-}
-
-void AbstractSwSelGlossaryDlg_Impl::SelectEntryPos(sal_Int32 nIdx)
+VclPtr<SfxAbstractDialog> SwAbstractDialogFactory_Impl::CreateSwAddressAbstractDlg(weld::Window* pParent,
+ const SfxItemSet& rSet)
{
- m_xDlg->SelectEntryPos( nIdx );
+ return VclPtr<SwAbstractSfxController_Impl<SwAddrDlg>>::Create(pParent, rSet);
}
-std::unique_ptr<SwTableAutoFormat> AbstractSwAutoFormatDlg_Impl::FillAutoFormatOfIndex() const
+VclPtr<SfxAbstractDialog> SwAbstractDialogFactory_Impl::CreateSwDropCapsDialog(weld::Window* pParent,
+ const SfxItemSet& rSet)
{
- return m_xDlg->FillAutoFormatOfIndex();
+ return VclPtr<SwAbstractSfxController_Impl<SwDropCapsDlg>>::Create(pParent, rSet);
}
-void AbstractSwFieldDlg_Impl::SetCurPageId( const OUString &rName )
+VclPtr<SfxAbstractDialog> SwAbstractDialogFactory_Impl::CreateSwBackgroundDialog(weld::Window* pParent,
+ const SfxItemSet& rSet)
{
- m_xDlg->SetCurPageId( rName );
+ return VclPtr<SwAbstractSfxController_Impl<SwBackgroundDlg>>::Create(pParent, rSet);
}
-const SfxItemSet* AbstractSwFieldDlg_Impl::GetOutputItemSet() const
+namespace
{
- return m_xDlg->GetOutputItemSet();
-}
-
-WhichRangesContainer AbstractSwFieldDlg_Impl::GetInputRanges(const SfxItemPool& pItem )
+class AbstractNumFormatDlg_Impl
+ : public vcl::AbstractDialogImpl_Async<SfxAbstractDialog, SwNumFormatDlg>
{
- return m_xDlg->GetInputRanges( pItem );
+public:
+ using AbstractDialogImpl_BASE::AbstractDialogImpl_BASE;
+ const SfxItemSet* GetOutputItemSet() const override { return m_pDlg->GetOutputItemSet(); }
+ void SetText(const OUString& rStr) override { m_pDlg->set_title(rStr); }
+};
}
-void AbstractSwFieldDlg_Impl::SetInputSet( const SfxItemSet* pInSet )
+VclPtr<SfxAbstractDialog> SwAbstractDialogFactory_Impl::CreateNumFormatDialog(weld::Widget* pParent, const SfxItemSet& rSet)
{
- m_xDlg->SetInputSet( pInSet );
+ return VclPtr<AbstractNumFormatDlg_Impl>::Create(pParent, rSet);
}
-void AbstractSwFieldDlg_Impl::SetText( const OUString& rStr )
+namespace
{
- m_xDlg->set_title(rStr);
-}
-
-bool AbstractSwFieldDlg_Impl::StartExecuteAsync(AsyncContext &rCtx)
+class AbstractSwAsciiFilterDlg_Impl
+ : public vcl::AbstractDialogImpl_Sync<AbstractSwAsciiFilterDlg, SwAsciiFilterDlg>
{
- auto xDlg = m_xDlg;
- return SfxTabDialogController::runAsync(m_xDlg, [rCtx, xDlg=std::move(xDlg)](sal_Int32 nResult){
- xDlg->Close();
- if (rCtx.isSet())
- rCtx.maEndDialogFn(nResult);
- });
+public:
+ using AbstractDialogImpl_BASE::AbstractDialogImpl_BASE;
+ void FillOptions(SwAsciiOptions& rOptions) override { m_pDlg->FillOptions(rOptions); }
+};
}
-void AbstractSwFieldDlg_Impl::Initialize(SfxChildWinInfo *pInfo)
+VclPtr<AbstractSwAsciiFilterDlg> SwAbstractDialogFactory_Impl::CreateSwAsciiFilterDlg(weld::Window* pParent,
+ SwDocShell& rDocSh, SvStream* pStream)
{
- m_xDlg->Initialize( pInfo );
+ return VclPtr<AbstractSwAsciiFilterDlg_Impl>::Create(pParent, rDocSh, pStream);
}
-void AbstractSwFieldDlg_Impl::ReInitDlg()
+namespace
{
- m_xDlg->ReInitDlg();
+template <class Dialog>
+using AbstractGenericDialog_Impl = vcl::AbstractDialogImpl_Async<VclAbstractDialog, Dialog>;
}
-void AbstractSwFieldDlg_Impl::ActivateDatabasePage()
+VclPtr<VclAbstractDialog> SwAbstractDialogFactory_Impl::CreateSwInsertBookmarkDlg(weld::Window *pParent,
+ SwWrtShell &rSh, OUString const*const pSelected)
{
- m_xDlg->ActivateDatabasePage();
+ return VclPtr<AbstractGenericDialog_Impl<SwInsertBookmarkDlg>>::Create(pParent, rSh, pSelected);
}
-void AbstractSwFieldDlg_Impl::ShowReferencePage()
+VclPtr<VclAbstractDialog> SwAbstractDialogFactory_Impl::CreateSwContentControlDlg(weld::Window* pParent,
+ SwWrtShell &rSh)
{
- m_xDlg->ShowReferencePage();
+ return VclPtr<AbstractGenericDialog_Impl<SwContentControlDlg>>::Create(pParent, rSh);
}
-std::shared_ptr<SfxDialogController> AbstractSwFieldDlg_Impl::GetController()
+VclPtr<AbstractSwContentControlListItemDlg>
+SwAbstractDialogFactory_Impl::CreateSwContentControlListItemDlg(weld::Window* pParent,
+ SwContentControlListItem& rItem)
{
- return m_xDlg;
+ using AbstractSwContentControlListItemDlg_Impl
+ = vcl::AbstractDialogImpl_Async<AbstractSwContentControlListItemDlg,
+ SwContentControlListItemDlg>;
+ return VclPtr<AbstractSwContentControlListItemDlg_Impl>::Create(pParent, rItem);
}
-void AbstractSwRenameXNamedDlg_Impl::SetForbiddenChars( const OUString& rSet )
+std::shared_ptr<AbstractSwBreakDlg> SwAbstractDialogFactory_Impl::CreateSwBreakDlg(weld::Window* pParent, SwWrtShell &rSh)
{
- m_xDlg->SetForbiddenChars( rSet );
+ return std::make_shared<AbstractSwBreakDlg_Impl>(std::make_unique<SwBreakDlg>(pParent, rSh));
}
-void AbstractSwRenameXNamedDlg_Impl::SetAlternativeAccess(
- css::uno::Reference< css::container::XNameAccess > & xSecond,
- css::uno::Reference< css::container::XNameAccess > & xThird )
+std::shared_ptr<AbstractSwTranslateLangSelectDlg> SwAbstractDialogFactory_Impl::CreateSwTranslateLangSelectDlg(weld::Window* pParent, SwWrtShell &rSh)
{
- m_xDlg->SetAlternativeAccess( xSecond, xThird);
+#if HAVE_FEATURE_CURL && !ENABLE_WASM_STRIP_EXTRA
+ return std::make_shared<AbstractSwTranslateLangSelectDlg_Impl>(std::make_unique<SwTranslateLangSelectDlg>(pParent, rSh));
+#else
+ (void) pParent;
+ (void) rSh;
+ return nullptr;
+#endif
}
-OUString AbstractGlossaryDlg_Impl::GetCurrGrpName() const
+namespace
{
- return m_xDlg->GetCurrGrpName();
-}
-
-OUString AbstractGlossaryDlg_Impl::GetCurrShortName() const
+class AbstractChangeDbDialog_Impl
+ : public AbstractDialogImpl_NoSync<AbstractChangeDbDialog, SwChangeDBDlg>
{
- return m_xDlg->GetCurrShortName();
+public:
+ using AbstractDialogImpl_NoSync::AbstractDialogImpl_NoSync;
+ virtual void UpdateFields() override { m_pDlg->UpdateFields(); }
+};
}
-void AbstractFieldInputDlg_Impl::EndDialog(sal_Int32 n)
+VclPtr<AbstractChangeDbDialog> SwAbstractDialogFactory_Impl::CreateSwChangeDBDlg(SwView& rVw)
{
- m_xDlg->response(n);
+#if HAVE_FEATURE_DBCONNECTIVITY && !ENABLE_FUZZERS
+ return VclPtr<AbstractChangeDbDialog_Impl>::Create(rVw);
+#else
+ (void) rVw;
+ return nullptr;
+#endif
}
-bool AbstractFieldInputDlg_Impl::PrevButtonPressed() const
+namespace
{
- return m_xDlg->PrevButtonPressed();
-}
-
-bool AbstractFieldInputDlg_Impl::NextButtonPressed() const
+template<class AbstractTabDialog_t, class Dialog>
+class AbstractTabController_Impl_BASE
+ : public vcl::AbstractDialogImpl_Async<AbstractTabDialog_t, Dialog>
{
- return m_xDlg->NextButtonPressed();
-}
+public:
+ using vcl::AbstractDialogImpl_Async<AbstractTabDialog_t, 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); }
+};
-OUString AbstractInsFootNoteDlg_Impl::GetFontName()
-{
- return m_xDlg->GetFontName();
+template <class Dialog>
+using AbstractTabController_Impl = AbstractTabController_Impl_BASE<SfxAbstractTabDialog, Dialog>;
}
-int AbstractSwPageNumberDlg_Impl::GetPageNumberPosition() const
+VclPtr<SfxAbstractTabDialog> SwAbstractDialogFactory_Impl::CreateSwCharDlg(weld::Window* pParent, SwView& pVw,
+ const SfxItemSet& rCoreSet, SwCharDlgMode nDialogMode, const OUString* pFormatStr)
{
- return m_xDlg->GetPageNumberPosition();
+ return VclPtr<AbstractTabController_Impl<SwCharDlg>>::Create(pParent, pVw, rCoreSet, nDialogMode, pFormatStr);
}
-int AbstractSwPageNumberDlg_Impl::GetPageNumberAlignment() const
+namespace
{
- return m_xDlg->GetPageNumberAlignment();
-}
-
-bool AbstractSwPageNumberDlg_Impl::GetMirrorOnEvenPages() const
+class AbstractSwConvertTableDlg_Impl
+ : public vcl::AbstractDialogImpl_Sync<AbstractSwConvertTableDlg, SwConvertTableDlg>
{
- return m_xDlg->GetMirrorOnEvenPages();
+public:
+ using AbstractDialogImpl_BASE::AbstractDialogImpl_BASE;
+ void GetValues(sal_Unicode& rDelim, SwInsertTableOptions& rInsTableFlags,
+ SwTableAutoFormat const*& prTAFormat) override
+ {
+ m_pDlg->GetValues(rDelim, rInsTableFlags, prTAFormat);
+ }
+};
}
-bool AbstractSwPageNumberDlg_Impl::GetIncludePageTotal() const
+VclPtr<AbstractSwConvertTableDlg> SwAbstractDialogFactory_Impl::CreateSwConvertTableDlg(SwView& rView, bool bToTable)
{
- return m_xDlg->GetIncludePageTotal();
+ return VclPtr<AbstractSwConvertTableDlg_Impl>::Create(rView, bToTable);
}
-bool AbstractSwPageNumberDlg_Impl::GetFitIntoExistingMargins() const
+VclPtr<VclAbstractDialog> SwAbstractDialogFactory_Impl::CreateSwCaptionDialog(weld::Window *pParent, SwView &rV)
{
- return m_xDlg->GetFitIntoExistingMargins();
+ return VclPtr<AbstractGenericDialog_Impl<SwCaptionDialog>>::Create(pParent, rV);
}
-SvxNumType AbstractSwPageNumberDlg_Impl::GetPageNumberType() const
+#if HAVE_FEATURE_DBCONNECTIVITY && !ENABLE_FUZZERS
+namespace
{
- return m_xDlg->GetPageNumberType();
-}
-
-void AbstractSwPageNumberDlg_Impl::SetPageNumberType(SvxNumType nSet)
+class AbstractSwInsertDBColAutoPilot_Impl
+ : public AbstractDialogImpl_NoSync<AbstractSwInsertDBColAutoPilot, SwInsertDBColAutoPilot>
{
- m_xDlg->SetPageNumberType(nSet);
+public:
+ using AbstractDialogImpl_NoSync::AbstractDialogImpl_NoSync;
+ void DataToDoc(const css::uno::Sequence<css::uno::Any>& rSelection,
+ css::uno::Reference<css::sdbc::XDataSource> rxSource,
+ css::uno::Reference<css::sdbc::XConnection> xConnection,
+ css::uno::Reference<css::sdbc::XResultSet> xResultSet) override
+ {
+ m_pDlg->DataToDoc(rSelection, rxSource, xConnection, xResultSet);
+ }
+};
}
+#endif
-bool AbstractInsFootNoteDlg_Impl::IsEndNote()
+VclPtr<AbstractSwInsertDBColAutoPilot> SwAbstractDialogFactory_Impl::CreateSwInsertDBColAutoPilot( SwView& rView,
+ uno::Reference< sdbc::XDataSource> rxSource,
+ uno::Reference<sdbcx::XColumnsSupplier> xColSupp,
+ const SwDBData& rData)
{
- return m_xDlg->IsEndNote();
+#if HAVE_FEATURE_DBCONNECTIVITY && !ENABLE_FUZZERS
+ return VclPtr<AbstractSwInsertDBColAutoPilot_Impl>::Create(rView, rxSource, xColSupp, rData);
+#else
+ (void) rView;
+ (void) rxSource;
+ (void) xColSupp;
+ (void) rData;
+ return nullptr;
+#endif
}
-OUString AbstractInsFootNoteDlg_Impl::GetStr()
+VclPtr<SfxAbstractTabDialog> SwAbstractDialogFactory_Impl::CreateSwFootNoteOptionDlg(weld::Window *pParent, SwWrtShell &rSh)
{
- return m_xDlg->GetStr();
+ return VclPtr<AbstractTabController_Impl<SwFootNoteOptionDlg>>::Create(pParent, rSh);
}
-void AbstractInsFootNoteDlg_Impl::SetHelpId(const OUString& rHelpId)
+namespace
{
- m_xDlg->set_help_id(rHelpId);
-}
-
-void AbstractInsFootNoteDlg_Impl::SetText( const OUString& rStr )
+class AbstractDropDownFieldDialog_Impl
+ : public vcl::AbstractDialogImpl_Sync<AbstractDropDownFieldDialog, sw::DropDownFieldDialog>
{
- m_xDlg->set_title(rStr);
+public:
+ using AbstractDialogImpl_BASE::AbstractDialogImpl_BASE;
+ bool PrevButtonPressed() const override { return m_pDlg->PrevButtonPressed(); }
+ bool NextButtonPressed() const override { return m_pDlg->NextButtonPressed(); }
+};
}
-void AbstractInsTableDlg_Impl::GetValues( OUString& rName, sal_uInt16& rRow, sal_uInt16& rCol,
- SwInsertTableOptions& rInsTableFlags, OUString& rTableAutoFormatName,
- std::unique_ptr<SwTableAutoFormat>& prTAFormat )
+VclPtr<AbstractDropDownFieldDialog> SwAbstractDialogFactory_Impl::CreateDropDownFieldDialog(weld::Widget *pParent,
+ SwWrtShell &rSh, SwField* pField, bool bPrevButton, bool bNextButton)
{
- SwInsTableDlg* pDlg = dynamic_cast<SwInsTableDlg*>(m_xDlg.get());
- if (pDlg)
- pDlg->GetValues(rName, rRow, rCol, rInsTableFlags, rTableAutoFormatName, prTAFormat);
+ return VclPtr<AbstractDropDownFieldDialog_Impl>::Create(pParent, rSh, pField, bPrevButton, bNextButton);
}
-OUString AbstractJavaEditDialog_Impl::GetScriptText() const
+namespace
{
- return m_xDlg->GetScriptText();
-}
-
-OUString AbstractJavaEditDialog_Impl::GetScriptType() const
+class AbstractDropDownFormFieldDialog_Impl
+ : public AbstractDialogImpl_NoSync<AbstractDropDownFormFieldDialog, sw::DropDownFormFieldDialog>
{
- return m_xDlg->GetScriptType();
+public:
+ using AbstractDialogImpl_NoSync::AbstractDialogImpl_NoSync;
+ void Apply() override { m_pDlg->Apply(); }
+};
}
-bool AbstractJavaEditDialog_Impl::IsUrl() const
+VclPtr<AbstractDropDownFormFieldDialog> SwAbstractDialogFactory_Impl::CreateDropDownFormFieldDialog(weld::Widget *pParent, sw::mark::Fieldmark* pDropDownField)
{
- return m_xDlg->IsUrl();
+ return VclPtr<AbstractDropDownFormFieldDialog_Impl>::Create(pParent, pDropDownField);
}
-bool AbstractJavaEditDialog_Impl::IsNew() const
+namespace
{
- return m_xDlg->IsNew();
-}
-
-bool AbstractJavaEditDialog_Impl::IsUpdate() const
+class AbstractDateFormFieldDialog_Impl
+ : public AbstractDialogImpl_NoSync<AbstractDateFormFieldDialog, sw::DateFormFieldDialog>
{
- return m_xDlg->IsUpdate();
+public:
+ using AbstractDialogImpl_NoSync::AbstractDialogImpl_NoSync;
+ void Apply() override { m_pDlg->Apply(); }
+};
}
-DBManagerOptions AbstractMailMergeDlg_Impl::GetMergeType()
+VclPtr<AbstractDateFormFieldDialog> SwAbstractDialogFactory_Impl::CreateDateFormFieldDialog(weld::Widget *pParent, sw::mark::DateFieldmark* pDateField, SwDoc& rDoc)
{
- return m_xDlg->GetMergeType();
+ return VclPtr<AbstractDateFormFieldDialog_Impl>::Create(pParent, pDateField, rDoc);
}
-const OUString& AbstractMailMergeDlg_Impl::GetSaveFilter() const
+VclPtr<SfxAbstractTabDialog> SwAbstractDialogFactory_Impl::CreateSwEnvDlg(weld::Window* pParent, const SfxItemSet& rSet,
+ SwWrtShell* pWrtSh, Printer* pPrt,
+ bool bInsert)
{
- return m_xDlg->GetSaveFilter();
+ return VclPtr<AbstractTabController_Impl<SwEnvDlg>>::Create(pParent, rSet, pWrtSh,pPrt, bInsert);
}
-css::uno::Sequence< css::uno::Any > AbstractMailMergeDlg_Impl::GetSelection() const
+namespace
{
- return m_xDlg->GetSelection();
-}
-
-uno::Reference< sdbc::XResultSet> AbstractMailMergeDlg_Impl::GetResultSet() const
+class AbstractSwLabDlg_Impl : public vcl::AbstractDialogImpl_Sync<AbstractSwLabDlg, SwLabDlg>
{
- return m_xDlg->GetResultSet();
+public:
+ using AbstractDialogImpl_BASE::AbstractDialogImpl_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); }
+ // From class Window.
+ void SetText(const OUString& rStr) override { m_pDlg->set_title(rStr); }
+ const OUString& GetBusinessCardStr() const override { return m_pDlg->GetBusinessCardStr(); }
+ Printer* GetPrt() override { return m_pDlg->GetPrt(); }
+};
}
-bool AbstractMailMergeDlg_Impl::IsSaveSingleDoc() const
+VclPtr<AbstractSwLabDlg> SwAbstractDialogFactory_Impl::CreateSwLabDlg(weld::Window* pParent, const SfxItemSet& rSet,
+ SwDBManager* pDBManager, bool bLabel)
{
- return m_xDlg->IsSaveSingleDoc();
+ return VclPtr<AbstractSwLabDlg_Impl>::Create(pParent, rSet, pDBManager, bLabel);
}
-bool AbstractMailMergeDlg_Impl::IsGenerateFromDataBase() const
+SwLabDlgMethod SwAbstractDialogFactory_Impl::GetSwLabDlgStaticMethod ()
{
- return m_xDlg->IsGenerateFromDataBase();
+ return SwLabDlg::UpdateFieldInformation;
}
-bool AbstractMailMergeDlg_Impl::IsFileEncryptedFromDataBase() const
+VclPtr<SfxAbstractTabDialog> SwAbstractDialogFactory_Impl::CreateSwParaDlg(weld::Window *pParent, SwView& rVw,
+ const SfxItemSet& rCoreSet,
+ bool bDraw ,
+ const OUString& sDefPage)
{
- return m_xDlg->IsFileEncryptedFromDataBase();
+ return VclPtr<AbstractTabController_Impl<SwParaDlg>>::Create(pParent, rVw, rCoreSet, DLG_STD, nullptr, bDraw, sDefPage);
}
-OUString AbstractMailMergeDlg_Impl::GetColumnName() const
+VclPtr<VclAbstractDialog> SwAbstractDialogFactory_Impl::CreateSwAutoMarkDialog(weld::Window *pParent, SwWrtShell &rSh)
{
- return m_xDlg->GetColumnName();
+ return VclPtr<AbstractGenericDialog_Impl<SwAuthMarkModalDlg>>::Create(pParent, rSh);
}
-OUString AbstractMailMergeDlg_Impl::GetPasswordColumnName() const
+VclPtr<VclAbstractDialog> SwAbstractDialogFactory_Impl::CreateSwColumnDialog(weld::Window *pParent, SwWrtShell &rSh)
{
- return m_xDlg->GetPasswordColumnName();
+ return VclPtr<AbstractGenericDialog_Impl<SwColumnDlg>>::Create(pParent, rSh);
}
-OUString AbstractMailMergeDlg_Impl::GetTargetURL() const
+namespace
{
- return m_xDlg->GetTargetURL();
-}
-
-bool AbstractMailMergeCreateFromDlg_Impl::IsThisDocument() const
+class AbstractSwTableHeightDlg_Impl
+ : public AbstractDialogImpl_NoSync<AbstractSwTableHeightDlg, SwTableHeightDlg>
{
- return m_xDlg->IsThisDocument();
+public:
+ using AbstractDialogImpl_NoSync::AbstractDialogImpl_NoSync;
+ void Apply() override { m_pDlg->Apply(); }
+};
}
-bool AbstractMailMergeFieldConnectionsDlg_Impl::IsUseExistingConnections() const
+VclPtr<AbstractSwTableHeightDlg> SwAbstractDialogFactory_Impl::CreateSwTableHeightDialog(weld::Window *pParent, SwWrtShell &rSh)
{
- return m_xDlg->IsUseExistingConnections();
+ return VclPtr<AbstractSwTableHeightDlg_Impl>::Create(pParent, rSh);
}
-CurTOXType AbstractMultiTOXTabDialog_Impl::GetCurrentTOXType() const
+namespace
{
- return m_xDlg->GetCurrentTOXType();
-}
-
-SwTOXDescription& AbstractMultiTOXTabDialog_Impl::GetTOXDescription(CurTOXType eTOXTypes)
+class AbstractSwSortDlg_Impl : public AbstractDialogImpl_NoSync<AbstractSwSortDlg, SwSortDlg>
{
- return m_xDlg->GetTOXDescription(eTOXTypes);
+public:
+ using AbstractDialogImpl_NoSync::AbstractDialogImpl_NoSync;
+ void Apply() override { m_pDlg->Apply(); }
+};
}
-const SfxItemSet* AbstractMultiTOXTabDialog_Impl::GetOutputItemSet() const
+VclPtr<AbstractSwSortDlg> SwAbstractDialogFactory_Impl::CreateSwSortingDialog(weld::Window *pParent, SwWrtShell &rSh)
{
- return m_xDlg->GetOutputItemSet();
+ return VclPtr<AbstractSwSortDlg_Impl>::Create(pParent, rSh);
}
-void AbstractEditRegionDlg_Impl::SelectSection(const OUString& rSectionName)
+namespace
{
- m_xDlg->SelectSection(rSectionName);
-}
-
-void
-AbstractInsertSectionTabDialog_Impl::SetSectionData(SwSectionData const& rSect)
+class AbstractSplitTableDialog_Impl
+ : public vcl::AbstractDialogImpl_Async<AbstractSplitTableDialog, SwSplitTableDlg> // add for
{
- m_xDlg->SetSectionData(rSect);
+public:
+ using AbstractDialogImpl_BASE::AbstractDialogImpl_BASE;
+ SplitTable_HeadlineOption GetSplitMode() override { return m_pDlg->GetSplitMode(); }
+};
}
-void AbstractIndexMarkFloatDlg_Impl::ReInitDlg(SwWrtShell& rWrtShell)
+VclPtr<AbstractSplitTableDialog> SwAbstractDialogFactory_Impl::CreateSplitTableDialog(weld::Window *pParent, SwWrtShell &rSh)
{
- m_xDlg->ReInitDlg( rWrtShell);
+ return VclPtr<AbstractSplitTableDialog_Impl>::Create(pParent, rSh);
}
-std::shared_ptr<SfxDialogController> AbstractIndexMarkFloatDlg_Impl::GetController()
+namespace
{
- return m_xDlg;
-}
-
-void AbstractAuthMarkFloatDlg_Impl::ReInitDlg(SwWrtShell& rWrtShell)
+class AbstractSwSelGlossaryDlg_Impl
+ : public vcl::AbstractDialogImpl_Sync<AbstractSwSelGlossaryDlg, SwSelGlossaryDlg>
{
- m_xDlg->ReInitDlg(rWrtShell);
+public:
+ using AbstractDialogImpl_BASE::AbstractDialogImpl_BASE;
+ void InsertGlos(const OUString& rRegion, const OUString& rGlosName) override
+ {
+ m_pDlg->InsertGlos(rRegion, rGlosName);
+ }
+ sal_Int32 GetSelectedIdx() const override { return m_pDlg->GetSelectedIdx(); }
+ void SelectEntryPos(sal_Int32 nIdx) override { m_pDlg->SelectEntryPos(nIdx); }
+};
}
-std::shared_ptr<SfxDialogController> AbstractAuthMarkFloatDlg_Impl::GetController()
+VclPtr<AbstractSwSelGlossaryDlg> SwAbstractDialogFactory_Impl::CreateSwSelGlossaryDlg(weld::Window *pParent, const OUString &rShortName)
{
- return m_xDlg;
+ return VclPtr<AbstractSwSelGlossaryDlg_Impl>::Create(pParent, rShortName);
}
-std::shared_ptr<SfxDialogController> AbstractSwWordCountFloatDlg_Impl::GetController()
+namespace
{
- return m_xDlg;
-}
-
-void AbstractSwWordCountFloatDlg_Impl::UpdateCounts()
+class AbstractSwAutoFormatDlg_Impl
+ : public AbstractDialogImpl_NoSync<AbstractSwAutoFormatDlg, SwAutoFormatDlg>
{
- m_xDlg->UpdateCounts();
+public:
+ using AbstractDialogImpl_NoSync::AbstractDialogImpl_NoSync;
+ std::unique_ptr<SwTableAutoFormat> FillAutoFormatOfIndex() const override
+ {
+ return m_pDlg->FillAutoFormatOfIndex();
+ }
+ void Apply() override { m_pDlg->Apply(); }
+};
}
-void AbstractSwWordCountFloatDlg_Impl::SetCounts(const SwDocStat &rCurrCnt, const SwDocStat &rDocStat)
+VclPtr<AbstractSwAutoFormatDlg> SwAbstractDialogFactory_Impl::CreateSwAutoFormatDlg(weld::Window* pParent,
+ SwWrtShell* pShell, bool bSetAutoFormat, const SwTableAutoFormat* pSelFormat)
{
- m_xDlg->SetCounts(rCurrCnt, rDocStat);
+ return VclPtr<AbstractSwAutoFormatDlg_Impl>::Create(pParent, pShell, bSetAutoFormat, pSelFormat);
}
-AbstractMailMergeWizard_Impl::~AbstractMailMergeWizard_Impl()
+VclPtr<SfxAbstractDialog> SwAbstractDialogFactory_Impl::CreateSwBorderDlg(weld::Window* pParent, SfxItemSet& rSet, SwBorderModes nType )
{
+ return VclPtr<SwAbstractSfxController_Impl<SwBorderDlg>>::Create(pParent, rSet, nType);
}
-bool AbstractMailMergeWizard_Impl::StartExecuteAsync(AsyncContext &rCtx)
+VclPtr<SfxAbstractDialog> SwAbstractDialogFactory_Impl::CreateSwWrapDlg(weld::Window* pParent, const SfxItemSet& rSet, SwWrtShell* pSh)
{
- // SwMailMergeWizardExecutor wants to run the lifecycle of this dialog
- // so clear mxOwner here and leave it up to SwMailMergeWizardExecutor
- rCtx.mxOwner.clear();
- return weld::GenericDialogController::runAsync(m_xDlg, rCtx.maEndDialogFn);
+ return VclPtr<SwAbstractSfxController_Impl<SwWrapDlg>>::Create(pParent, rSet, pSh, true/*bDrawMode*/);
}
-short AbstractMailMergeWizard_Impl::Execute()
+namespace
{
- return m_xDlg->run();
-}
-
-OUString AbstractMailMergeWizard_Impl::GetReloadDocument() const
+class AbstractSwTableWidthDlg_Impl
+ : public AbstractDialogImpl_NoSync<AbstractSwTableWidthDlg, SwTableWidthDlg>
{
- return m_xDlg->GetReloadDocument();
+public:
+ using AbstractDialogImpl_NoSync::AbstractDialogImpl_NoSync;
+ void Apply() override { m_pDlg->Apply(); }
+};
}
-void AbstractMailMergeWizard_Impl::ShowPage( sal_uInt16 nLevel )
+VclPtr<AbstractSwTableWidthDlg> SwAbstractDialogFactory_Impl::CreateSwTableWidthDlg(weld::Window *pParent, SwWrtShell *pShell)
{
- m_xDlg->skipUntil(nLevel);
+ return VclPtr<AbstractSwTableWidthDlg_Impl>::Create(pParent, pShell);
}
-sal_uInt16 AbstractMailMergeWizard_Impl::GetRestartPage() const
+VclPtr<SfxAbstractTabDialog> SwAbstractDialogFactory_Impl::CreateSwTableTabDlg(weld::Window* pParent,
+ const SfxItemSet* pItemSet, SwWrtShell* pSh)
{
- return m_xDlg->GetRestartPage();
+ return VclPtr<AbstractTabController_Impl<SwTableTabDlg>>::Create(pParent, pItemSet, pSh);
}
-std::optional<SwLanguageListItem> AbstractSwTranslateLangSelectDlg_Impl::GetSelectedLanguage()
+namespace
{
-#if HAVE_FEATURE_CURL && !ENABLE_WASM_STRIP_EXTRA
- return SwTranslateLangSelectDlg::GetSelectedLanguage();
-#else
- return {};
-#endif
-}
-
-short AbstractChangeDbDialog_Impl::Execute()
+class AbstractSwFieldDlg_Impl : public vcl::AbstractDialogImpl_Async<AbstractSwFieldDlg, SwFieldDlg>
{
- assert(false);
- return -1;
-}
+public:
+ using AbstractDialogImpl_BASE::AbstractDialogImpl_BASE;
+ bool StartExecuteAsync(AsyncContext& rCtx) override;
+ 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); }
+ // From class Window.
+ void SetText(const OUString& rStr) override { m_pDlg->set_title(rStr); }
+ void ShowReferencePage() override { m_pDlg->ShowReferencePage(); }
+ void Initialize(SfxChildWinInfo* pInfo) override { m_pDlg->Initialize(pInfo); }
+ void ReInitDlg() override { m_pDlg->ReInitDlg(); }
+ void ActivateDatabasePage() override { m_pDlg->ActivateDatabasePage(); }
+ std::shared_ptr<SfxDialogController> GetController() override { return m_pDlg; }
+};
-bool AbstractChangeDbDialog_Impl::StartExecuteAsync(AsyncContext &rCtx)
+bool AbstractSwFieldDlg_Impl::StartExecuteAsync(AsyncContext& rCtx)
{
- return weld::GenericDialogController::runAsync(m_xDlg, rCtx.maEndDialogFn);
+ return SfxTabDialogController::runAsync(m_pDlg,
+ [rCtx, pDlg = m_pDlg](sal_Int32 nResult)
+ {
+ pDlg->Close();
+ if (rCtx.isSet())
+ rCtx.maEndDialogFn(nResult);
+ });
}
-
-VclPtr<AbstractSwInsertAbstractDlg> SwAbstractDialogFactory_Impl::CreateSwInsertAbstractDlg(weld::Window* pParent)
-{
- return VclPtr<AbstractSwInsertAbstractDlg_Impl>::Create(std::make_unique<SwInsertAbstractDlg>(pParent));
}
-VclPtr<SfxAbstractDialog> SwAbstractDialogFactory_Impl::CreateSwAddressAbstractDlg(weld::Window* pParent,
- const SfxItemSet& rSet)
+VclPtr<AbstractSwFieldDlg> SwAbstractDialogFactory_Impl::CreateSwFieldDlg(SfxBindings* pB, SwChildWinWrapper* pCW, weld::Window *pParent)
{
- return VclPtr<SwAbstractSfxController_Impl>::Create(std::make_unique<SwAddrDlg>(pParent, rSet));
+ return VclPtr<AbstractSwFieldDlg_Impl>::Create(pB, pCW, pParent);
}
-VclPtr<SfxAbstractDialog> SwAbstractDialogFactory_Impl::CreateSwDropCapsDialog(weld::Window* pParent,
- const SfxItemSet& rSet)
+VclPtr<SfxAbstractDialog> SwAbstractDialogFactory_Impl::CreateSwFieldEditDlg(SwView& rVw)
{
- return VclPtr<SwAbstractSfxController_Impl>::Create(std::make_unique<SwDropCapsDlg>(pParent, rSet));
+ auto xDlg = std::make_shared<SwFieldEditDlg>(rVw);
+ // without TabPage no dialog
+ if (!xDlg->GetTabPage())
+ return nullptr;
+ return VclPtr<SwAbstractSfxController_Impl<SwFieldEditDlg>>::Create(std::move(xDlg));
}
-VclPtr<SfxAbstractDialog> SwAbstractDialogFactory_Impl::CreateSwBackgroundDialog(weld::Window* pParent,
- const SfxItemSet& rSet)
+namespace
{
- return VclPtr<SwAbstractSfxController_Impl>::Create(std::make_unique<SwBackgroundDlg>(pParent, rSet));
-}
-
-VclPtr<SfxAbstractDialog> SwAbstractDialogFactory_Impl::CreateNumFormatDialog(weld::Widget* pParent, const SfxItemSet& rSet)
+class AbstractSwRenameXNamedDlg_Impl
+ : public vcl::AbstractDialogImpl_Async<AbstractSwRenameXNamedDlg, SwRenameXNamedDlg>
{
- return VclPtr<AbstractNumFormatDlg_Impl>::Create(std::make_shared<SwNumFormatDlg>(pParent, rSet));
+public:
+ using AbstractDialogImpl_BASE::AbstractDialogImpl_BASE;
+ void SetForbiddenChars(const OUString& rSet) override { m_pDlg->SetForbiddenChars(rSet); }
+ void SetAlternativeAccess(css::uno::Reference<css::container::XNameAccess>& xSecond,
+ css::uno::Reference<css::container::XNameAccess>& xThird) override
+ {
+ m_pDlg->SetAlternativeAccess(xSecond, xThird);
+ }
+};
}
-VclPtr<AbstractSwAsciiFilterDlg> SwAbstractDialogFactory_Impl::CreateSwAsciiFilterDlg(weld::Window* pParent,
- SwDocShell& rDocSh, SvStream* pStream)
+VclPtr<AbstractSwRenameXNamedDlg> SwAbstractDialogFactory_Impl::CreateSwRenameXNamedDlg(weld::Widget* pParent,
+ css::uno::Reference< css::container::XNamed > & xNamed,
+ css::uno::Reference< css::container::XNameAccess > & xNameAccess)
{
- return VclPtr<AbstractSwAsciiFilterDlg_Impl>::Create(std::make_unique<SwAsciiFilterDlg>(pParent, rDocSh, pStream));
+ return VclPtr<AbstractSwRenameXNamedDlg_Impl>::Create(pParent,xNamed, xNameAccess);
}
-VclPtr<VclAbstractDialog> SwAbstractDialogFactory_Impl::CreateSwInsertBookmarkDlg(weld::Window *pParent,
- SwWrtShell &rSh, OUString const*const pSelected)
+VclPtr<AbstractSwModalRedlineAcceptDlg> SwAbstractDialogFactory_Impl::CreateSwModalRedlineAcceptDlg(weld::Window *pParent)
{
- return VclPtr<AbstractGenericDialog_Impl>::Create(std::make_shared<SwInsertBookmarkDlg>(pParent, rSh, pSelected));
+ using AbstractSwModalRedlineAcceptDlg_Impl
+ = AbstractDialogImpl_NoSync<AbstractSwModalRedlineAcceptDlg, SwModalRedlineAcceptDlg>;
+ return VclPtr<AbstractSwModalRedlineAcceptDlg_Impl>::Create(pParent);
}
-VclPtr<VclAbstractDialog> SwAbstractDialogFactory_Impl::CreateSwContentControlDlg(weld::Window* pParent,
- SwWrtShell &rSh)
+namespace
{
- return VclPtr<AbstractGenericDialog_Impl>::Create(std::make_shared<SwContentControlDlg>(pParent, rSh));
-}
-
-VclPtr<AbstractSwContentControlListItemDlg>
-SwAbstractDialogFactory_Impl::CreateSwContentControlListItemDlg(weld::Window* pParent,
- SwContentControlListItem& rItem)
+/// Interface implementation for the insert -> fields -> page number wizard dialog
+class AbstractSwPageNumberDlg_Impl
+ : public vcl::AbstractDialogImpl_Async<AbstractSwPageNumberDlg, SwPageNumberDlg>
{
- return VclPtr<AbstractSwContentControlListItemDlg_Impl>::Create(
- std::make_shared<SwContentControlListItemDlg>(pParent, rItem));
+public:
+ using AbstractDialogImpl_BASE::AbstractDialogImpl_BASE;
+ int GetPageNumberPosition() const override { return m_pDlg->GetPageNumberPosition(); };
+ int GetPageNumberAlignment() const override { return m_pDlg->GetPageNumberAlignment(); }
+ bool GetMirrorOnEvenPages() const override { return m_pDlg->GetMirrorOnEvenPages(); }
+ bool GetIncludePageTotal() const override { return m_pDlg->GetIncludePageTotal(); }
+ bool GetFitIntoExistingMargins() const override { return m_pDlg->GetFitIntoExistingMargins(); }
+ SvxNumType GetPageNumberType() const override { return m_pDlg->GetPageNumberType(); }
+ void SetPageNumberType(SvxNumType nSet) override { m_pDlg->SetPageNumberType(nSet); }
+};
}
-std::shared_ptr<AbstractSwBreakDlg> SwAbstractDialogFactory_Impl::CreateSwBreakDlg(weld::Window* pParent, SwWrtShell &rSh)
+VclPtr<AbstractSwPageNumberDlg> SwAbstractDialogFactory_Impl::CreateSwPageNumberDlg(weld::Window *pParent)
{
- return std::make_shared<AbstractSwBreakDlg_Impl>(std::make_unique<SwBreakDlg>(pParent, rSh));
+ return VclPtr<AbstractSwPageNumberDlg_Impl>::Create(pParent);
}
-std::shared_ptr<AbstractSwTranslateLangSelectDlg> SwAbstractDialogFactory_Impl::CreateSwTranslateLangSelectDlg(weld::Window* pParent, SwWrtShell &rSh)
+VclPtr<VclAbstractDialog> SwAbstractDialogFactory_Impl::CreateTableMergeDialog(weld::Window* pParent, bool& rWithPrev)
{
-#if HAVE_FEATURE_CURL && !ENABLE_WASM_STRIP_EXTRA
- return std::make_shared<AbstractSwTranslateLangSelectDlg_Impl>(std::make_unique<SwTranslateLangSelectDlg>(pParent, rSh));
-#else
- (void) pParent;
- (void) rSh;
- return nullptr;
-#endif
+ using AbstractSwMergeTableDlg_Impl
+ = vcl::AbstractDialogImpl_Sync<VclAbstractDialog, SwMergeTableDlg>;
+ return VclPtr<AbstractSwMergeTableDlg_Impl>::Create(pParent, rWithPrev);
}
-VclPtr<AbstractChangeDbDialog> SwAbstractDialogFactory_Impl::CreateSwChangeDBDlg(SwView& rVw)
+VclPtr<SfxAbstractTabDialog> SwAbstractDialogFactory_Impl::CreateFrameTabDialog(const OUString &rDialogType,
+ SfxViewFrame& rFrame, weld::Window *pParent,
+ const SfxItemSet& rCoreSet,
+ bool bNewFrame,
+ const OUString& sDefPage )
{
-#if HAVE_FEATURE_DBCONNECTIVITY && !ENABLE_FUZZERS
- return VclPtr<AbstractChangeDbDialog_Impl>::Create(std::make_shared<SwChangeDBDlg>(rVw));
-#else
- (void) rVw;
- return nullptr;
-#endif
+ return VclPtr<AbstractTabController_Impl<SwFrameDlg>>::Create(rFrame, pParent, rCoreSet, bNewFrame, rDialogType, false/*bFormat*/, sDefPage, nullptr);
}
-VclPtr<SfxAbstractTabDialog> SwAbstractDialogFactory_Impl::CreateSwCharDlg(weld::Window* pParent, SwView& pVw,
- const SfxItemSet& rCoreSet, SwCharDlgMode nDialogMode, const OUString* pFormatStr)
+namespace
{
- return VclPtr<AbstractTabController_Impl>::Create(std::make_shared<SwCharDlg>(pParent, pVw, rCoreSet, nDialogMode, pFormatStr));
-}
-
-VclPtr<AbstractSwConvertTableDlg> SwAbstractDialogFactory_Impl::CreateSwConvertTableDlg(SwView& rView, bool bToTable)
+class AbstractApplyTabController_Impl
+ : public AbstractTabController_Impl_BASE<SfxAbstractApplyTabDialog, SwTemplateDlgController>
{
- return VclPtr<AbstractSwConvertTableDlg_Impl>::Create(std::make_unique<SwConvertTableDlg>(rView, bToTable));
-}
+public:
+ using AbstractTabController_Impl_BASE::AbstractTabController_Impl_BASE;
+ DECL_LINK(ApplyHdl, weld::Button&, void);
-VclPtr<VclAbstractDialog> SwAbstractDialogFactory_Impl::CreateSwCaptionDialog(weld::Window *pParent, SwView &rV)
-{
- return VclPtr<AbstractGenericDialog_Impl>::Create(std::make_shared<SwCaptionDialog>(pParent, rV));
-}
+private:
+ Link<LinkParamNone*, void> m_aHandler;
+ void SetApplyHdl(const Link<LinkParamNone*, void>& rLink) override;
+};
-VclPtr<AbstractSwInsertDBColAutoPilot> SwAbstractDialogFactory_Impl::CreateSwInsertDBColAutoPilot( SwView& rView,
- uno::Reference< sdbc::XDataSource> rxSource,
- uno::Reference<sdbcx::XColumnsSupplier> xColSupp,
- const SwDBData& rData)
+IMPL_LINK_NOARG(AbstractApplyTabController_Impl, ApplyHdl, weld::Button&, void)
{
-#if HAVE_FEATURE_DBCONNECTIVITY && !ENABLE_FUZZERS
- return VclPtr<AbstractSwInsertDBColAutoPilot_Impl>::Create(std::make_unique<SwInsertDBColAutoPilot>(rView, rxSource, xColSupp, rData));
-#else
- (void) rView;
- (void) rxSource;
- (void) xColSupp;
- (void) rData;
- return nullptr;
-#endif
+ if (m_pDlg->Apply())
+ {
+ m_aHandler.Call(nullptr);
+ m_pDlg->Applied();
+ }
}
-VclPtr<SfxAbstractTabDialog> SwAbstractDialogFactory_Impl::CreateSwFootNoteOptionDlg(weld::Window *pParent, SwWrtShell &rSh)
+void AbstractApplyTabController_Impl::SetApplyHdl(const Link<LinkParamNone*, void>& rLink)
{
- return VclPtr<AbstractTabController_Impl>::Create(std::make_shared<SwFootNoteOptionDlg>(pParent, rSh));
+ m_aHandler = rLink;
+ m_pDlg->SetApplyHandler(LINK(this, AbstractApplyTabController_Impl, ApplyHdl));
}
-
-VclPtr<AbstractDropDownFieldDialog> SwAbstractDialogFactory_Impl::CreateDropDownFieldDialog(weld::Widget *pParent,
- SwWrtShell &rSh, SwField* pField, bool bPrevButton, bool bNextButton)
-{
- return VclPtr<AbstractDropDownFieldDialog_Impl>::Create(std::make_unique<sw::DropDownFieldDialog>(pParent, rSh, pField, bPrevButton, bNextButton));
}
-VclPtr<AbstractDropDownFormFieldDialog> SwAbstractDialogFactory_Impl::CreateDropDownFormFieldDialog(weld::Widget *pParent, sw::mark::Fieldmark* pDropDownField)
+VclPtr<SfxAbstractApplyTabDialog> SwAbstractDialogFactory_Impl::CreateTemplateDialog(
+ weld::Window *pParent,
+ SfxStyleSheetBase& rBase,
+ SfxStyleFamily nRegion,
+ const OUString& sPage,
+ SwWrtShell* pActShell,
+ bool bNew )
{
- return VclPtr<AbstractDropDownFormFieldDialog_Impl>::Create(std::make_unique<sw::DropDownFormFieldDialog>(pParent, pDropDownField));
+ return VclPtr<AbstractApplyTabController_Impl>::Create(pParent, rBase, nRegion, sPage, pActShell, bNew);
}
-VclPtr<AbstractDateFormFieldDialog> SwAbstractDialogFactory_Impl::CreateDateFormFieldDialog(weld::Widget *pParent, sw::mark::DateFieldmark* pDateField, SwDoc& rDoc)
+namespace
{
- return VclPtr<AbstractDateFormFieldDialog_Impl>::Create(std::make_unique<sw::DateFormFieldDialog>(pParent, pDateField, rDoc));
-}
-
-VclPtr<SfxAbstractTabDialog> SwAbstractDialogFactory_Impl::CreateSwEnvDlg(weld::Window* pParent, const SfxItemSet& rSet,
- SwWrtShell* pWrtSh, Printer* pPrt,
- bool bInsert)
+class AbstractGlossaryDlg_Impl
+ : public AbstractDialogImpl_NoSync<AbstractGlossaryDlg, SwGlossaryDlg>
{
- return VclPtr<AbstractTabController_Impl>::Create(std::make_shared<SwEnvDlg>(pParent, rSet, pWrtSh,pPrt, bInsert));
+public:
+ using AbstractDialogImpl_NoSync::AbstractDialogImpl_NoSync;
+ void Apply() override { m_pDlg->Apply(); }
+ OUString GetCurrGrpName() const override { return m_pDlg->GetCurrGrpName(); }
+ OUString GetCurrShortName() const override { return m_pDlg->GetCurrShortName(); }
+};
}
-VclPtr<AbstractSwLabDlg> SwAbstractDialogFactory_Impl::CreateSwLabDlg(weld::Window* pParent, const SfxItemSet& rSet,
- SwDBManager* pDBManager, bool bLabel)
+VclPtr<AbstractGlossaryDlg> SwAbstractDialogFactory_Impl::CreateGlossaryDlg(SfxViewFrame& rViewFrame, SwGlossaryHdl* pGlosHdl,
+ SwWrtShell *pWrtShell)
{
- return VclPtr<AbstractSwLabDlg_Impl>::Create(std::make_unique<SwLabDlg>(pParent, rSet, pDBManager, bLabel));
+ return VclPtr<AbstractGlossaryDlg_Impl>::Create(rViewFrame, pGlosHdl, pWrtShell);
}
-SwLabDlgMethod SwAbstractDialogFactory_Impl::GetSwLabDlgStaticMethod ()
+namespace
{
- return SwLabDlg::UpdateFieldInformation;
-}
-
-VclPtr<SfxAbstractTabDialog> SwAbstractDialogFactory_Impl::CreateSwParaDlg(weld::Window *pParent, SwView& rVw,
- const SfxItemSet& rCoreSet,
- bool bDraw ,
- const OUString& sDefPage)
+class AbstractFieldInputDlg_Impl
+ : public vcl::AbstractDialogImpl_Sync<AbstractFieldInputDlg, SwFieldInputDlg>
{
- return VclPtr<AbstractTabController_Impl>::Create(std::make_shared<SwParaDlg>(pParent, rVw, rCoreSet, DLG_STD, nullptr, bDraw, sDefPage));
+public:
+ using AbstractDialogImpl_BASE::AbstractDialogImpl_BASE;
+ void EndDialog(sal_Int32 n) override { m_pDlg->response(n); }
+ bool PrevButtonPressed() const override { return m_pDlg->PrevButtonPressed(); }
+ bool NextButtonPressed() const override { return m_pDlg->NextButtonPressed(); }
+};
}
-VclPtr<VclAbstractDialog> SwAbstractDialogFactory_Impl::CreateSwAutoMarkDialog(weld::Window *pParent, SwWrtShell &rSh)
+VclPtr<AbstractFieldInputDlg> SwAbstractDialogFactory_Impl::CreateFieldInputDlg(weld::Widget *pParent,
+ SwWrtShell &rSh, SwField* pField, bool bPrevButton, bool bNextButton)
{
- return VclPtr<AbstractGenericDialog_Impl>::Create(std::make_shared<SwAuthMarkModalDlg>(pParent, rSh));
+ return VclPtr<AbstractFieldInputDlg_Impl>::Create(pParent, rSh, pField, bPrevButton, bNextButton);
}
-VclPtr<VclAbstractDialog> SwAbstractDialogFactory_Impl::CreateSwColumnDialog(weld::Window *pParent, SwWrtShell &rSh)
+namespace
{
- return VclPtr<AbstractGenericDialog_Impl>::Create(std::make_shared<SwColumnDlg>(pParent, rSh));
-}
-
-VclPtr<AbstractSwTableHeightDlg> SwAbstractDialogFactory_Impl::CreateSwTableHeightDialog(weld::Window *pParent, SwWrtShell &rSh)
+class AbstractInsFootNoteDlg_Impl
+ : public AbstractDialogImpl_NoSync<AbstractInsFootNoteDlg, SwInsFootNoteDlg>
{
- return VclPtr<AbstractSwTableHeightDlg_Impl>::Create(std::make_unique<SwTableHeightDlg>(pParent, rSh));
+public:
+ using AbstractDialogImpl_NoSync::AbstractDialogImpl_NoSync;
+ void Apply() override { m_pDlg->Apply(); }
+ OUString GetFontName() override { return m_pDlg->GetFontName(); }
+ bool IsEndNote() override { return m_pDlg->IsEndNote(); }
+ OUString GetStr() override { return m_pDlg->GetStr(); }
+ // from class Window
+ void SetHelpId(const OUString& sHelpId) override { m_pDlg->set_help_id(sHelpId); }
+ void SetText(const OUString& rStr) override { m_pDlg->set_title(rStr); }
+};
}
-VclPtr<AbstractSwSortDlg> SwAbstractDialogFactory_Impl::CreateSwSortingDialog(weld::Window *pParent, SwWrtShell &rSh)
+VclPtr<AbstractInsFootNoteDlg> SwAbstractDialogFactory_Impl::CreateInsFootNoteDlg(
+ weld::Window * pParent, SwWrtShell &rSh, bool bEd )
{
- return VclPtr<AbstractSwSortDlg_Impl>::Create(std::make_unique<SwSortDlg>(pParent, rSh));
+ return VclPtr<AbstractInsFootNoteDlg_Impl>::Create(pParent, rSh, bEd);
}
-VclPtr<AbstractSplitTableDialog> SwAbstractDialogFactory_Impl::CreateSplitTableDialog(weld::Window *pParent, SwWrtShell &rSh)
+VclPtr<VclAbstractDialog> SwAbstractDialogFactory_Impl::CreateTitlePageDlg(weld::Window *pParent)
{
- return VclPtr<AbstractSplitTableDialog_Impl>::Create(std::make_shared<SwSplitTableDlg>(pParent, rSh));
+ return VclPtr<AbstractGenericDialog_Impl<SwTitlePageDlg>>::Create(pParent);
}
-VclPtr<AbstractSwSelGlossaryDlg> SwAbstractDialogFactory_Impl::CreateSwSelGlossaryDlg(weld::Window *pParent, const OUString &rShortName)
+VclPtr<VclAbstractDialog> SwAbstractDialogFactory_Impl::CreateVclSwViewDialog(SwView& rView)
{
- return VclPtr<AbstractSwSelGlossaryDlg_Impl>::Create(std::make_unique<SwSelGlossaryDlg>(pParent, rShortName));
+ return VclPtr<AbstractGenericDialog_Impl<SwLineNumberingDlg>>::Create(rView);
}
-VclPtr<AbstractSwAutoFormatDlg> SwAbstractDialogFactory_Impl::CreateSwAutoFormatDlg(weld::Window* pParent,
- SwWrtShell* pShell, bool bSetAutoFormat, const SwTableAutoFormat* pSelFormat)
+std::shared_ptr<AbstractInsTableDlg> SwAbstractDialogFactory_Impl::CreateInsTableDlg(SwView& rView)
{
- return VclPtr<AbstractSwAutoFormatDlg_Impl>::Create(
- std::make_shared<SwAutoFormatDlg>(pParent, pShell, bSetAutoFormat, pSelFormat));
+ return std::make_shared<AbstractInsTableDlg_Impl>(std::make_shared<SwInsTableDlg>(rView));
}
-VclPtr<SfxAbstractDialog> SwAbstractDialogFactory_Impl::CreateSwBorderDlg(weld::Window* pParent, SfxItemSet& rSet, SwBorderModes nType )
+namespace
{
- return VclPtr<SwAbstractSfxController_Impl>::Create(std::make_unique<SwBorderDlg>(pParent, rSet, nType));
-}
-
-VclPtr<SfxAbstractDialog> SwAbstractDialogFactory_Impl::CreateSwWrapDlg(weld::Window* pParent, const SfxItemSet& rSet, SwWrtShell* pSh)
+class AbstractJavaEditDialog_Impl
+ : public vcl::AbstractDialogImpl_Sync<AbstractJavaEditDialog, SwJavaEditDialog>
{
- return VclPtr<SwAbstractSfxController_Impl>::Create(std::make_unique<SwWrapDlg>(pParent, rSet, pSh, true/*bDrawMode*/));
+public:
+ using AbstractDialogImpl_BASE::AbstractDialogImpl_BASE;
+ OUString GetScriptText() const override { return m_pDlg->GetScriptText(); }
+ OUString GetScriptType() const override { return m_pDlg->GetScriptType(); }
+ bool IsUrl() const override { return m_pDlg->IsUrl(); }
+ bool IsNew() const override { return m_pDlg->IsNew(); }
+ bool IsUpdate() const override { return m_pDlg->IsUpdate(); }
+};
}
-VclPtr<AbstractSwTableWidthDlg> SwAbstractDialogFactory_Impl::CreateSwTableWidthDlg(weld::Window *pParent, SwWrtShell *pShell)
+VclPtr<AbstractJavaEditDialog> SwAbstractDialogFactory_Impl::CreateJavaEditDialog(
+ weld::Window* pParent, SwWrtShell* pWrtSh)
{
- return VclPtr<AbstractSwTableWidthDlg_Impl>::Create(std::make_unique<SwTableWidthDlg>(pParent, pShell));
+ return VclPtr<AbstractJavaEditDialog_Impl>::Create(pParent, pWrtSh);
}
-VclPtr<SfxAbstractTabDialog> SwAbstractDialogFactory_Impl::CreateSwTableTabDlg(weld::Window* pParent,
- const SfxItemSet* pItemSet, SwWrtShell* pSh)
+namespace
{
- return VclPtr<AbstractTabController_Impl>::Create(std::make_shared<SwTableTabDlg>(pParent, pItemSet, pSh));
-}
-
-VclPtr<AbstractSwFieldDlg> SwAbstractDialogFactory_Impl::CreateSwFieldDlg(SfxBindings* pB, SwChildWinWrapper* pCW, weld::Window *pParent)
+class AbstractMailMergeDlg_Impl
+ : public vcl::AbstractDialogImpl_Sync<AbstractMailMergeDlg, SwMailMergeDlg>
{
- return VclPtr<AbstractSwFieldDlg_Impl>::Create(std::make_shared<SwFieldDlg>(pB, pCW, pParent));
+public:
+ using AbstractDialogImpl_BASE::AbstractDialogImpl_BASE;
+ DBManagerOptions GetMergeType() override { return m_pDlg->GetMergeType(); }
+ const OUString& GetSaveFilter() const override { return m_pDlg->GetSaveFilter(); }
+ css::uno::Sequence<css::uno::Any> GetSelection() const override
+ {
+ return m_pDlg->GetSelection();
+ }
+ css::uno::Reference<css::sdbc::XResultSet> GetResultSet() const override
+ {
+ return m_pDlg->GetResultSet();
+ }
+ bool IsSaveSingleDoc() const override { return m_pDlg->IsSaveSingleDoc(); }
+ bool IsGenerateFromDataBase() const override { return m_pDlg->IsGenerateFromDataBase(); }
+ bool IsFileEncryptedFromDataBase() const override
+ {
+ return m_pDlg->IsFileEncryptedFromDataBase();
+ }
+ OUString GetColumnName() const override { return m_pDlg->GetColumnName(); }
+ OUString GetPasswordColumnName() const override { return m_pDlg->GetPasswordColumnName(); }
+ OUString GetTargetURL() const override { return m_pDlg->GetTargetURL(); }
+};
}
-VclPtr<SfxAbstractDialog> SwAbstractDialogFactory_Impl::CreateSwFieldEditDlg(SwView& rVw)
+VclPtr<AbstractMailMergeDlg> SwAbstractDialogFactory_Impl::CreateMailMergeDlg(
+ weld::Window* pParent, SwWrtShell& rSh,
+ const OUString& rSourceName,
+ const OUString& rTableName,
+ sal_Int32 nCommandType,
+ const uno::Reference< sdbc::XConnection>& xConnection )
{
- auto xDlg = std::make_shared<SwFieldEditDlg>(rVw);
- // without TabPage no dialog
- if (!xDlg->GetTabPage())
- return nullptr;
- return VclPtr<SwAbstractSfxController_Impl>::Create(std::move(xDlg));
+ return VclPtr<AbstractMailMergeDlg_Impl>::Create(pParent, rSh, rSourceName, rTableName, nCommandType, xConnection, nullptr);
}
-VclPtr<AbstractSwRenameXNamedDlg> SwAbstractDialogFactory_Impl::CreateSwRenameXNamedDlg(weld::Widget* pParent,
- css::uno::Reference< css::container::XNamed > & xNamed,
- css::uno::Reference< css::container::XNameAccess > & xNameAccess)
+namespace
{
- return VclPtr<AbstractSwRenameXNamedDlg_Impl>::Create(std::make_unique<SwRenameXNamedDlg>(pParent,xNamed, xNameAccess));
-}
-
-VclPtr<AbstractSwModalRedlineAcceptDlg> SwAbstractDialogFactory_Impl::CreateSwModalRedlineAcceptDlg(weld::Window *pParent)
+class AbstractMailMergeCreateFromDlg_Impl
+ : public vcl::AbstractDialogImpl_Sync<AbstractMailMergeCreateFromDlg, SwMailMergeCreateFromDlg>
{
- return VclPtr<AbstractSwModalRedlineAcceptDlg_Impl>::Create(std::make_unique<SwModalRedlineAcceptDlg>(pParent));
+public:
+ using AbstractDialogImpl_BASE::AbstractDialogImpl_BASE;
+ bool IsThisDocument() const override { return m_pDlg->IsThisDocument(); }
+};
}
-VclPtr<AbstractSwPageNumberDlg> SwAbstractDialogFactory_Impl::CreateSwPageNumberDlg(weld::Window *pParent)
+VclPtr<AbstractMailMergeCreateFromDlg> SwAbstractDialogFactory_Impl::CreateMailMergeCreateFromDlg(weld::Window* pParent)
{
- return VclPtr<AbstractSwPageNumberDlg_Impl>::Create(std::make_shared<SwPageNumberDlg>(pParent));
+ return VclPtr<AbstractMailMergeCreateFromDlg_Impl>::Create(pParent);
}
-VclPtr<VclAbstractDialog> SwAbstractDialogFactory_Impl::CreateTableMergeDialog(weld::Window* pParent, bool& rWithPrev)
+namespace
{
- return VclPtr<AbstractSwMergeTableDlg_Impl>::Create(std::make_unique<SwMergeTableDlg>(pParent, rWithPrev));
-}
-
-VclPtr<SfxAbstractTabDialog> SwAbstractDialogFactory_Impl::CreateFrameTabDialog(const OUString &rDialogType,
- SfxViewFrame& rFrame, weld::Window *pParent,
- const SfxItemSet& rCoreSet,
- bool bNewFrame,
- const OUString& sDefPage )
+class AbstractMailMergeFieldConnectionsDlg_Impl
+ : public vcl::AbstractDialogImpl_Sync<AbstractMailMergeFieldConnectionsDlg,
+ SwMailMergeFieldConnectionsDlg>
{
- return VclPtr<AbstractTabController_Impl>::Create(std::make_shared<SwFrameDlg>(rFrame, pParent, rCoreSet, bNewFrame, rDialogType, false/*bFormat*/, sDefPage, nullptr));
+public:
+ using AbstractDialogImpl_BASE::AbstractDialogImpl_BASE;
+ bool IsUseExistingConnections() const override { return m_pDlg->IsUseExistingConnections(); }
+};
}
-VclPtr<SfxAbstractApplyTabDialog> SwAbstractDialogFactory_Impl::CreateTemplateDialog(
- weld::Window *pParent,
- SfxStyleSheetBase& rBase,
- SfxStyleFamily nRegion,
- const OUString& sPage,
- SwWrtShell* pActShell,
- bool bNew )
+VclPtr<AbstractMailMergeFieldConnectionsDlg> SwAbstractDialogFactory_Impl::CreateMailMergeFieldConnectionsDlg(weld::Window* pParent)
{
- return VclPtr<AbstractApplyTabController_Impl>::Create(std::make_shared<SwTemplateDlgController>(pParent, rBase, nRegion,
- sPage, pActShell, bNew));
+ return VclPtr<AbstractMailMergeFieldConnectionsDlg_Impl>::Create(pParent);
}
-VclPtr<AbstractGlossaryDlg> SwAbstractDialogFactory_Impl::CreateGlossaryDlg(SfxViewFrame& rViewFrame, SwGlossaryHdl* pGlosHdl,
- SwWrtShell *pWrtShell)
+VclPtr<VclAbstractDialog> SwAbstractDialogFactory_Impl::CreateMultiTOXMarkDlg(weld::Window* pParent, SwTOXMgr &rTOXMgr)
{
- return VclPtr<AbstractGlossaryDlg_Impl>::Create(std::make_unique<SwGlossaryDlg>(rViewFrame, pGlosHdl, pWrtShell));
+ using AbstractMultiTOXMarkDlg_Impl
+ = vcl::AbstractDialogImpl_Sync<VclAbstractDialog, SwMultiTOXMarkDlg>;
+ return VclPtr<AbstractMultiTOXMarkDlg_Impl>::Create(pParent, rTOXMgr);
}
-VclPtr<AbstractFieldInputDlg> SwAbstractDialogFactory_Impl::CreateFieldInputDlg(weld::Widget *pParent,
- SwWrtShell &rSh, SwField* pField, bool bPrevButton, bool bNextButton)
+namespace
{
- return VclPtr<AbstractFieldInputDlg_Impl>::Create(std::make_unique<SwFieldInputDlg>(pParent, rSh, pField, bPrevButton, bNextButton));
-}
-
-VclPtr<AbstractInsFootNoteDlg> SwAbstractDialogFactory_Impl::CreateInsFootNoteDlg(
- weld::Window * pParent, SwWrtShell &rSh, bool bEd )
+class AbstractNumBulletDialog_Impl
+ : public vcl::AbstractDialogImpl_Async<AbstractNumBulletDialog, SwSvxNumBulletTabDialog>
{
- return VclPtr<AbstractInsFootNoteDlg_Impl>::Create(std::make_unique<SwInsFootNoteDlg>(pParent, rSh, bEd));
+public:
+ using AbstractDialogImpl_BASE::AbstractDialogImpl_BASE;
+ void SetCurPageId(const OUString& rName) override { m_pDlg->SetCurPageId(rName); }
+ const SfxItemSet* GetOutputItemSet() const override { return m_pDlg->GetOutputItemSet(); }
+ const SfxItemSet* GetInputItemSet() const override { return m_pDlg->GetInputItemSet(); }
+ WhichRangesContainer GetInputRanges(const SfxItemPool& pItem) override
+ {
+ return m_pDlg->GetInputRanges(pItem);
+ }
+ void SetInputSet(const SfxItemSet* pInSet) override { m_pDlg->SetInputSet(pInSet); }
+ // From class Window.
+ void SetText(const OUString& rStr) override { m_pDlg->set_title(rStr); }
+};
}
-VclPtr<VclAbstractDialog> SwAbstractDialogFactory_Impl::CreateTitlePageDlg(weld::Window *pParent)
+VclPtr<AbstractNumBulletDialog> SwAbstractDialogFactory_Impl::CreateSvxNumBulletTabDialog(weld::Window* pParent,
+ const SfxItemSet& rSwItemSet,
+ SwWrtShell & rWrtSh)
{
- return VclPtr<AbstractGenericDialog_Impl>::Create(std::make_shared<SwTitlePageDlg>(pParent));
+ return VclPtr<AbstractNumBulletDialog_Impl>::Create(pParent, rSwItemSet, rWrtSh);
}
-VclPtr<VclAbstractDialog> SwAbstractDialogFactory_Impl::CreateVclSwViewDialog(SwView& rView)
+VclPtr<SfxAbstractTabDialog> SwAbstractDialogFactory_Impl::CreateOutlineTabDialog(weld::Window* pParent,
+ const SfxItemSet* pSwItemSet,
+ SwWrtShell & rWrtSh )
{
- return VclPtr<AbstractGenericDialog_Impl>::Create(std::make_shared<SwLineNumberingDlg>(rView));
+ return VclPtr<AbstractTabController_Impl<SwOutlineTabDialog>>::Create(pParent, pSwItemSet, rWrtSh);
}
-std::shared_ptr<AbstractInsTableDlg> SwAbstractDialogFactory_Impl::CreateInsTableDlg(SwView& rView)
+namespace
{
- return std::make_shared<AbstractInsTableDlg_Impl>(std::make_shared<SwInsTableDlg>(rView));
-}
-
-VclPtr<AbstractJavaEditDialog> SwAbstractDialogFactory_Impl::CreateJavaEditDialog(
- weld::Window* pParent, SwWrtShell* pWrtSh)
+class AbstractMultiTOXTabDialog_Impl
+ : public vcl::AbstractDialogImpl_Async<AbstractMultiTOXTabDialog, SwMultiTOXTabDialog>
{
- return VclPtr<AbstractJavaEditDialog_Impl>::Create(std::make_unique<SwJavaEditDialog>(pParent, pWrtSh));
+public:
+ using AbstractDialogImpl_BASE::AbstractDialogImpl_BASE;
+ CurTOXType GetCurrentTOXType() const override { return m_pDlg->GetCurrentTOXType(); }
+ SwTOXDescription& GetTOXDescription(CurTOXType eTOXTypes) override
+ {
+ return m_pDlg->GetTOXDescription(eTOXTypes);
+ }
+ // from SfxTabDialog
+ const SfxItemSet* GetOutputItemSet() const override { return m_pDlg->GetOutputItemSet(); }
+};
}
-VclPtr<AbstractMailMergeDlg> SwAbstractDialogFactory_Impl::CreateMailMergeDlg(
- weld::Window* pParent, SwWrtShell& rSh,
- const OUString& rSourceName,
- const OUString& rTableName,
- sal_Int32 nCommandType,
- const uno::Reference< sdbc::XConnection>& xConnection )
+VclPtr<AbstractMultiTOXTabDialog> SwAbstractDialogFactory_Impl::CreateMultiTOXTabDialog(weld::Widget* pParent, const SfxItemSet& rSet,
+ SwWrtShell &rShell, SwTOXBase* pCurTOX, bool bGlobal)
{
- return VclPtr<AbstractMailMergeDlg_Impl>::Create(std::make_unique<SwMailMergeDlg>(pParent, rSh, rSourceName, rTableName, nCommandType, xConnection, nullptr));
+ return VclPtr<AbstractMultiTOXTabDialog_Impl>::Create(pParent, rSet, rShell, pCurTOX, USHRT_MAX, bGlobal);
}
-VclPtr<AbstractMailMergeCreateFromDlg> SwAbstractDialogFactory_Impl::CreateMailMergeCreateFromDlg(weld::Window* pParent)
+namespace
{
- return VclPtr<AbstractMailMergeCreateFromDlg_Impl>::Create(std::make_unique<SwMailMergeCreateFromDlg>(pParent));
-}
-
-VclPtr<AbstractMailMergeFieldConnectionsDlg> SwAbstractDialogFactory_Impl::CreateMailMergeFieldConnectionsDlg(weld::Window* pParent)
+class AbstractEditRegionDlg_Impl
+ : public vcl::AbstractDialogImpl_Async<AbstractEditRegionDlg, SwEditRegionDlg>
{
- return VclPtr<AbstractMailMergeFieldConnectionsDlg_Impl>::Create(std::make_unique<SwMailMergeFieldConnectionsDlg>(pParent));
+public:
+ using AbstractDialogImpl_BASE::AbstractDialogImpl_BASE;
+ void SelectSection(const OUString& rSectionName) override
+ {
+ m_pDlg->SelectSection(rSectionName);
+ }
+};
}
-VclPtr<VclAbstractDialog> SwAbstractDialogFactory_Impl::CreateMultiTOXMarkDlg(weld::Window* pParent, SwTOXMgr &rTOXMgr)
+VclPtr<AbstractEditRegionDlg> SwAbstractDialogFactory_Impl::CreateEditRegionDlg(weld::Window* pParent, SwWrtShell& rWrtSh)
{
- return VclPtr<AbstractMultiTOXMarkDlg_Impl>::Create(std::make_unique<SwMultiTOXMarkDlg>(pParent, rTOXMgr));
+ return VclPtr<AbstractEditRegionDlg_Impl>::Create(pParent, rWrtSh);
}
-VclPtr<AbstractNumBulletDialog> SwAbstractDialogFactory_Impl::CreateSvxNumBulletTabDialog(weld::Window* pParent,
- const SfxItemSet& rSwItemSet,
- SwWrtShell & rWrtSh)
+namespace
{
- return VclPtr<AbstractNumBulletDialog_Impl>::Create(std::make_shared<SwSvxNumBulletTabDialog>(pParent, rSwItemSet, rWrtSh));
-}
-
-VclPtr<SfxAbstractTabDialog> SwAbstractDialogFactory_Impl::CreateOutlineTabDialog(weld::Window* pParent,
- const SfxItemSet* pSwItemSet,
- SwWrtShell & rWrtSh )
+class AbstractInsertSectionTabDialog_Impl
+ : public vcl::AbstractDialogImpl_Async<AbstractInsertSectionTabDialog, SwInsertSectionTabDialog>
{
- return VclPtr<AbstractTabController_Impl>::Create(std::make_shared<SwOutlineTabDialog>(pParent, pSwItemSet, rWrtSh));
+public:
+ using AbstractDialogImpl_BASE::AbstractDialogImpl_BASE;
+ void SetSectionData(SwSectionData const& rSect) override { m_pDlg->SetSectionData(rSect); }
+};
}
-VclPtr<AbstractMultiTOXTabDialog> SwAbstractDialogFactory_Impl::CreateMultiTOXTabDialog(weld::Widget* pParent, const SfxItemSet& rSet,
- SwWrtShell &rShell, SwTOXBase* pCurTOX, bool bGlobal)
+VclPtr<AbstractInsertSectionTabDialog> SwAbstractDialogFactory_Impl::CreateInsertSectionTabDialog(weld::Window* pParent,
+ const SfxItemSet& rSet, SwWrtShell& rSh)
{
- return VclPtr<AbstractMultiTOXTabDialog_Impl>::Create(std::make_shared<SwMultiTOXTabDialog>(pParent, rSet, rShell, pCurTOX, USHRT_MAX, bGlobal));
+ return VclPtr<AbstractInsertSectionTabDialog_Impl>::Create(pParent, rSet, rSh);
}
-VclPtr<AbstractEditRegionDlg> SwAbstractDialogFactory_Impl::CreateEditRegionDlg(weld::Window* pParent, SwWrtShell& rWrtSh)
+namespace
{
- return VclPtr<AbstractEditRegionDlg_Impl>::Create(std::make_shared<SwEditRegionDlg>(pParent, rWrtSh));
-}
-
-VclPtr<AbstractInsertSectionTabDialog> SwAbstractDialogFactory_Impl::CreateInsertSectionTabDialog(weld::Window* pParent,
- const SfxItemSet& rSet, SwWrtShell& rSh)
+class AbstractIndexMarkFloatDlg_Impl
+ : public vcl::AbstractDialogImpl_Sync_Shared<AbstractMarkFloatDlg, SwIndexMarkFloatDlg>
{
- return VclPtr<AbstractInsertSectionTabDialog_Impl>::Create(std::make_shared<SwInsertSectionTabDialog>(pParent, rSet, rSh));
+public:
+ using AbstractDialogImpl_BASE::AbstractDialogImpl_BASE;
+ void ReInitDlg(SwWrtShell& rWrtShell) override { m_pDlg->ReInitDlg(rWrtShell); }
+ std::shared_ptr<SfxDialogController> GetController() override { return m_pDlg; }
+};
}
VclPtr<AbstractMarkFloatDlg> SwAbstractDialogFactory_Impl::CreateIndexMarkFloatDlg(
@@ -1391,7 +1126,19 @@ VclPtr<AbstractMarkFloatDlg> SwAbstractDialogFactory_Impl::CreateIndexMarkFloatD
weld::Window *pParent,
SfxChildWinInfo* pInfo )
{
- return VclPtr<AbstractIndexMarkFloatDlg_Impl>::Create(std::make_shared<SwIndexMarkFloatDlg>(pBindings, pChild, pParent, pInfo, true/*bNew*/));
+ return VclPtr<AbstractIndexMarkFloatDlg_Impl>::Create(pBindings, pChild, pParent, pInfo, true/*bNew*/);
+}
+
+namespace
+{
+class AbstractAuthMarkFloatDlg_Impl
+ : public vcl::AbstractDialogImpl_Sync_Shared<AbstractMarkFloatDlg, SwAuthMarkFloatDlg>
+{
+public:
+ using AbstractDialogImpl_BASE::AbstractDialogImpl_BASE;
+ void ReInitDlg(SwWrtShell& rWrtShell) override { m_pDlg->ReInitDlg(rWrtShell); }
+ std::shared_ptr<SfxDialogController> GetController() override { return m_pDlg; }
+};
}
VclPtr<AbstractMarkFloatDlg> SwAbstractDialogFactory_Impl::CreateAuthMarkFloatDlg(
@@ -1400,7 +1147,23 @@ VclPtr<AbstractMarkFloatDlg> SwAbstractDialogFactory_Impl::CreateAuthMarkFloatDl
weld::Window *pParent,
SfxChildWinInfo* pInfo)
{
- return VclPtr<AbstractAuthMarkFloatDlg_Impl>::Create(std::make_shared<SwAuthMarkFloatDlg>(pBindings, pChild, pParent, pInfo, true/*bNew*/));
+ return VclPtr<AbstractAuthMarkFloatDlg_Impl>::Create(pBindings, pChild, pParent, pInfo, true/*bNew*/);
+}
+
+namespace
+{
+class AbstractSwWordCountFloatDlg_Impl
+ : public vcl::AbstractDialogImpl_Sync_Shared<AbstractSwWordCountFloatDlg, SwWordCountFloatDlg>
+{
+public:
+ using AbstractDialogImpl_BASE::AbstractDialogImpl_BASE;
+ void UpdateCounts() override { m_pDlg->UpdateCounts(); }
+ void SetCounts(const SwDocStat& rCurrCnt, const SwDocStat& rDocStat) override
+ {
+ m_pDlg->SetCounts(rCurrCnt, rDocStat);
+ }
+ std::shared_ptr<SfxDialogController> GetController() override { return m_pDlg; }
+};
}
VclPtr<AbstractSwWordCountFloatDlg> SwAbstractDialogFactory_Impl::CreateSwWordCountDialog(
@@ -1409,19 +1172,42 @@ VclPtr<AbstractSwWordCountFloatDlg> SwAbstractDialogFactory_Impl::CreateSwWordCo
weld::Window *pParent,
SfxChildWinInfo* pInfo)
{
- return VclPtr<AbstractSwWordCountFloatDlg_Impl>::Create(std::make_shared<SwWordCountFloatDlg>(pBindings, pChild, pParent, pInfo));
+ return VclPtr<AbstractSwWordCountFloatDlg_Impl>::Create(pBindings, pChild, pParent, pInfo);
}
VclPtr<VclAbstractDialog> SwAbstractDialogFactory_Impl::CreateIndexMarkModalDlg(weld::Window *pParent, SwWrtShell& rSh, SwTOXMark* pCurTOXMark )
{
- return VclPtr<AbstractGenericDialog_Impl>::Create(std::make_shared<SwIndexMarkModalDlg>(pParent, rSh, pCurTOXMark));
+ return VclPtr<AbstractGenericDialog_Impl<SwIndexMarkModalDlg>>::Create(pParent, rSh, pCurTOXMark);
+}
+
+namespace
+{
+class AbstractMailMergeWizard_Impl
+ : public vcl::AbstractDialogImpl_Async<AbstractMailMergeWizard, SwMailMergeWizard>
+{
+public:
+ using AbstractDialogImpl_BASE::AbstractDialogImpl_BASE;
+ bool StartExecuteAsync(VclAbstractDialog::AsyncContext& rCtx) override;
+
+ OUString GetReloadDocument() const override { return m_pDlg->GetReloadDocument(); }
+ void ShowPage(sal_uInt16 nLevel) override { m_pDlg->skipUntil(nLevel); }
+ sal_uInt16 GetRestartPage() const override { return m_pDlg->GetRestartPage(); }
+};
+
+bool AbstractMailMergeWizard_Impl::StartExecuteAsync(AsyncContext& rCtx)
+{
+ // SwMailMergeWizardExecutor wants to run the lifecycle of this dialog
+ // so clear mxOwner here and leave it up to SwMailMergeWizardExecutor
+ rCtx.mxOwner.clear();
+ return AbstractDialogImpl_BASE::StartExecuteAsync(rCtx);
+}
}
VclPtr<AbstractMailMergeWizard> SwAbstractDialogFactory_Impl::CreateMailMergeWizard(
SwView& rView, std::shared_ptr<SwMailMergeConfigItem>& rConfigItem)
{
#if HAVE_FEATURE_DBCONNECTIVITY && !ENABLE_FUZZERS
- return VclPtr<AbstractMailMergeWizard_Impl>::Create(std::make_shared<SwMailMergeWizard>(rView, rConfigItem));
+ return VclPtr<AbstractMailMergeWizard_Impl>::Create(rView, rConfigItem);
#else
(void) rView;
(void) rConfigItem;
diff --git a/sw/source/ui/dialog/swdlgfact.hxx b/sw/source/ui/dialog/swdlgfact.hxx
index 3875fe8d997f..f33460a21840 100644
--- a/sw/source/ui/dialog/swdlgfact.hxx
+++ b/sw/source/ui/dialog/swdlgfact.hxx
@@ -59,712 +59,6 @@
#include <pagenumberdlg.hxx>
#include <changedb.hxx>
-
-class SwInsertAbstractDlg;
-class SwAsciiFilterDlg;
-class SwBreakDlg;
-class SwMultiTOXMarkDlg;
-class SwSortDlg;
-class SwTableHeightDlg;
-class SwTableWidthDlg;
-class SwMergeTableDlg;
-class SfxTabDialog;
-class SwConvertTableDlg;
-class SwInsertDBColAutoPilot;
-class SwLabDlg;
-class SwSelGlossaryDlg;
-class SwAutoFormatDlg;
-class SwFieldDlg;
-class SwRenameXNamedDlg;
-class SwModalRedlineAcceptDlg;
-class SwTOXMark;
-class SwSplitTableDlg;
-namespace sw
-{
-class DropDownFieldDialog;
-class DropDownFormFieldDialog;
-class DateFormFieldDialog;
-}
-class SwWordCountFloatDlg;
-
-
-class AbstractSwWordCountFloatDlg_Impl : public AbstractSwWordCountFloatDlg
-{
- std::shared_ptr<SwWordCountFloatDlg> m_xDlg;
-public:
- explicit AbstractSwWordCountFloatDlg_Impl(std::shared_ptr<SwWordCountFloatDlg> p)
- : m_xDlg(std::move(p))
- {
- }
- virtual short Execute() override;
- virtual void UpdateCounts() override;
- virtual void SetCounts(const SwDocStat &rCurrCnt, const SwDocStat &rDocStat) override;
- virtual std::shared_ptr<SfxDialogController> GetController() override;
-};
-
-class AbstractSwInsertAbstractDlg_Impl : public AbstractSwInsertAbstractDlg
-{
- std::shared_ptr<SwInsertAbstractDlg> m_xDlg;
-public:
- explicit AbstractSwInsertAbstractDlg_Impl(std::shared_ptr<SwInsertAbstractDlg> p)
- : m_xDlg(std::move(p))
- {
- }
- virtual short Execute() override;
- virtual bool StartExecuteAsync(AsyncContext &rCtx) override;
- virtual sal_uInt8 GetLevel() const override ;
- virtual sal_uInt8 GetPara() const override ;
-};
-
-class SwAbstractSfxController_Impl : public SfxAbstractDialog
-{
- std::shared_ptr<SfxSingleTabDialogController> m_xDlg;
-public:
- explicit SwAbstractSfxController_Impl(std::shared_ptr<SfxSingleTabDialogController> p)
- : m_xDlg(std::move(p))
- {
- }
- virtual short Execute() override;
- virtual bool StartExecuteAsync(AsyncContext &rCtx) override;
- virtual const SfxItemSet* GetOutputItemSet() const override;
- virtual void SetText(const OUString& rStr) override;
-};
-
-class AbstractNumFormatDlg_Impl : public SfxAbstractDialog
-{
- std::shared_ptr<SfxSingleTabDialogController> m_xDlg;
-public:
- explicit AbstractNumFormatDlg_Impl(std::shared_ptr<SfxSingleTabDialogController> p)
- : m_xDlg(std::move(p))
- {
- }
- virtual short Execute() override;
- virtual bool StartExecuteAsync(AsyncContext &rCtx) override;
- virtual const SfxItemSet* GetOutputItemSet() const override;
- virtual void SetText(const OUString& rStr) override;
-};
-
-class AbstractSwAsciiFilterDlg_Impl : public AbstractSwAsciiFilterDlg
-{
- std::unique_ptr<SwAsciiFilterDlg> m_xDlg;
-public:
- explicit AbstractSwAsciiFilterDlg_Impl(std::unique_ptr<SwAsciiFilterDlg> p)
- : m_xDlg(std::move(p))
- {
- }
- virtual short Execute() override;
- virtual void FillOptions( SwAsciiOptions& rOptions ) override;
-};
-
-/// Interface implementation for the insert -> fields -> page number wizard dialog
-class AbstractSwPageNumberDlg_Impl : public AbstractSwPageNumberDlg
-{
- std::shared_ptr<SwPageNumberDlg> m_xDlg;
-public:
- explicit AbstractSwPageNumberDlg_Impl(std::shared_ptr<SwPageNumberDlg> p)
- : m_xDlg(std::move(p))
- {
- }
- virtual short Execute() override;
- virtual bool StartExecuteAsync(AsyncContext &rCtx) override;
- virtual int GetPageNumberPosition() const override;
- virtual int GetPageNumberAlignment() const override;
- bool GetMirrorOnEvenPages() const override;
- bool GetIncludePageTotal() const override;
- bool GetFitIntoExistingMargins() const override;
- SvxNumType GetPageNumberType() const override;
- void SetPageNumberType(SvxNumType nSet) override;
-};
-
-class AbstractGenericDialog_Impl : public VclAbstractDialog
-{
- std::shared_ptr<weld::GenericDialogController> m_xDlg;
-public:
- explicit AbstractGenericDialog_Impl(std::shared_ptr<weld::GenericDialogController> p)
- : m_xDlg(std::move(p))
- {
- }
- virtual short Execute() override;
- virtual bool StartExecuteAsync(AsyncContext &rCtx) override;
-};
-
-class AbstractSwSortDlg_Impl : public AbstractSwSortDlg
-{
- std::shared_ptr<SwSortDlg> m_xDlg;
-public:
- explicit AbstractSwSortDlg_Impl(std::shared_ptr<SwSortDlg> p)
- : m_xDlg(std::move(p))
- {
- }
- virtual short Execute() override;
- virtual bool StartExecuteAsync(AsyncContext &rCtx) override;
- virtual void Apply() override { m_xDlg->Apply(); }
-};
-
-class AbstractMultiTOXMarkDlg_Impl : public VclAbstractDialog
-{
- std::unique_ptr<SwMultiTOXMarkDlg> m_xDlg;
-public:
- explicit AbstractMultiTOXMarkDlg_Impl(std::unique_ptr<SwMultiTOXMarkDlg> p)
- : m_xDlg(std::move(p))
- {
- }
- virtual short Execute() override;
-};
-
-class AbstractNumBulletDialog_Impl : public AbstractNumBulletDialog
-{
-protected:
- std::shared_ptr<SfxTabDialogController> m_xDlg;
-public:
- explicit AbstractNumBulletDialog_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 const SfxItemSet* GetInputItemSet() const override;
- virtual WhichRangesContainer GetInputRanges( const SfxItemPool& pItem ) override;
- virtual void SetInputSet( const SfxItemSet* pInSet ) override;
- //From class Window.
- virtual void SetText( const OUString& rStr ) override;
-};
-
-class AbstractSwBreakDlg_Impl : public AbstractSwBreakDlg
-{
- std::shared_ptr<weld::DialogController> m_xDlg;
-public:
- explicit AbstractSwBreakDlg_Impl(std::shared_ptr<weld::DialogController> p)
- : m_xDlg(std::move(p))
- {
- }
- virtual OUString GetTemplateName() override;
- virtual sal_uInt16 GetKind() override;
- virtual ::std::optional<sal_uInt16> GetPageNumber() override;
- std::optional<SwLineBreakClear> GetClear() override;
-
- virtual std::shared_ptr<weld::DialogController> getDialogController() override { return m_xDlg; }
-};
-
-class AbstractSwTranslateLangSelectDlg_Impl : public AbstractSwTranslateLangSelectDlg
-{
- std::shared_ptr<weld::DialogController> m_xDlg;
-public:
- explicit AbstractSwTranslateLangSelectDlg_Impl(std::shared_ptr<weld::DialogController> p)
- : m_xDlg(std::move(p))
- {
- }
-
- virtual std::shared_ptr<weld::DialogController> getDialogController() override { return m_xDlg; }
- virtual std::optional<SwLanguageListItem> GetSelectedLanguage() override;
-};
-
-class AbstractSwTableWidthDlg_Impl : public AbstractSwTableWidthDlg
-{
- std::shared_ptr<SwTableWidthDlg> m_xDlg;
-public:
- explicit AbstractSwTableWidthDlg_Impl(std::shared_ptr<SwTableWidthDlg> p)
- : m_xDlg(std::move(p))
- {
- }
- virtual short Execute() override;
- virtual bool StartExecuteAsync(AsyncContext &rCtx) override;
- virtual void Apply() override { m_xDlg->Apply(); }
-};
-
-class AbstractSwTableHeightDlg_Impl : public AbstractSwTableHeightDlg
-{
- std::shared_ptr<SwTableHeightDlg> m_xDlg;
-public:
- explicit AbstractSwTableHeightDlg_Impl(std::shared_ptr<SwTableHeightDlg> p)
- : m_xDlg(std::move(p))
- {
- }
- virtual short Execute() override;
- virtual bool StartExecuteAsync(AsyncContext &rCtx) override;
- virtual void Apply() override { m_xDlg->Apply(); }
-};
-
-class AbstractSwMergeTableDlg_Impl : public VclAbstractDialog
-{
- std::unique_ptr<SwMergeTableDlg> m_xDlg;
-public:
- explicit AbstractSwMergeTableDlg_Impl(std::unique_ptr<SwMergeTableDlg> p)
- : m_xDlg(std::move(p))
- {
- }
- virtual short Execute() override;
-};
-
-class AbstractSplitTableDialog_Impl : public AbstractSplitTableDialog // add for
-{
- std::shared_ptr<SwSplitTableDlg> m_xDlg;
-public:
- explicit AbstractSplitTableDialog_Impl(std::shared_ptr<SwSplitTableDlg> p)
- : m_xDlg(std::move(p))
- {
- }
- virtual short Execute() override;
- virtual bool StartExecuteAsync(AsyncContext &rCtx) override;
- virtual SplitTable_HeadlineOption GetSplitMode() override;
-};
-
-class AbstractTabController_Impl : virtual public SfxAbstractTabDialog
-{
-protected:
- std::shared_ptr<SfxTabDialogController> m_xDlg;
-public:
- explicit AbstractTabController_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;
- //From class Window.
- virtual void SetText( const OUString& rStr ) override;
-};
-
-class AbstractApplyTabController_Impl : public AbstractTabController_Impl, virtual public SfxAbstractApplyTabDialog
-{
-public:
- explicit AbstractApplyTabController_Impl(std::shared_ptr<SfxTabDialogController> p)
- : AbstractTabController_Impl(std::move(p))
- {
- }
- DECL_LINK(ApplyHdl, weld::Button&, void);
-private:
- Link<LinkParamNone*,void> m_aHandler;
- virtual void SetApplyHdl( const Link<LinkParamNone*,void>& rLink ) override;
-};
-
-class AbstractSwConvertTableDlg_Impl : public AbstractSwConvertTableDlg
-{
- std::unique_ptr<SwConvertTableDlg> m_xDlg;
-public:
- explicit AbstractSwConvertTableDlg_Impl(std::unique_ptr<SwConvertTableDlg> p)
- : m_xDlg(std::move(p))
- {
- }
- virtual short Execute() override;
- virtual void GetValues( sal_Unicode& rDelim,SwInsertTableOptions& rInsTableFlags,
- SwTableAutoFormat const*& prTAFormat) override;
-};
-
-class AbstractSwInsertDBColAutoPilot_Impl : public AbstractSwInsertDBColAutoPilot
-{
- std::shared_ptr<SwInsertDBColAutoPilot> m_xDlg;
-public:
- explicit AbstractSwInsertDBColAutoPilot_Impl(std::shared_ptr<SwInsertDBColAutoPilot> p)
- : m_xDlg(std::move(p))
- {
- }
- virtual short Execute() override;
- virtual bool StartExecuteAsync(AsyncContext &rCtx) override;
- virtual void DataToDoc( const css::uno::Sequence< css::uno::Any >& rSelection,
- css::uno::Reference< css::sdbc::XDataSource> rxSource,
- css::uno::Reference< css::sdbc::XConnection> xConnection,
- css::uno::Reference< css::sdbc::XResultSet > xResultSet) override;
-};
-
-class AbstractDropDownFieldDialog_Impl : public AbstractDropDownFieldDialog
-{
- std::unique_ptr<sw::DropDownFieldDialog> m_xDlg;
-public:
- explicit AbstractDropDownFieldDialog_Impl(std::unique_ptr<sw::DropDownFieldDialog> p)
- : m_xDlg(std::move(p))
- {
- }
- virtual short Execute() override;
- virtual bool PrevButtonPressed() const override;
- virtual bool NextButtonPressed() const override;
-};
-
-class AbstractDropDownFormFieldDialog_Impl : public AbstractDropDownFormFieldDialog
-{
- std::shared_ptr<sw::DropDownFormFieldDialog> m_xDlg;
-public:
- explicit AbstractDropDownFormFieldDialog_Impl(std::shared_ptr<sw::DropDownFormFieldDialog> p)
- : m_xDlg(std::move(p))
- {
- }
- virtual short Execute() override;
- virtual bool StartExecuteAsync(AsyncContext &rCtx) override;
- virtual void Apply() override { m_xDlg->Apply(); }
-};
-
-class AbstractDateFormFieldDialog_Impl : public AbstractDateFormFieldDialog
-{
- std::shared_ptr<sw::DateFormFieldDialog> m_xDlg;
-public:
- explicit AbstractDateFormFieldDialog_Impl(std::shared_ptr<sw::DateFormFieldDialog> p)
- : m_xDlg(std::move(p))
- {
- }
- virtual short Execute() override;
- virtual bool StartExecuteAsync(AsyncContext &rCtx) override;
- virtual void Apply() override { m_xDlg->Apply(); }
-};
-
-class AbstractSwLabDlg_Impl : public AbstractSwLabDlg
-{
- std::unique_ptr<SwLabDlg> m_xDlg;
-public:
- explicit AbstractSwLabDlg_Impl(std::unique_ptr<SwLabDlg> p)
- : m_xDlg(std::move(p))
- {
- }
- virtual short Execute() 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;
- //From class Window.
- virtual void SetText( const OUString& rStr ) override;
- virtual const OUString& GetBusinessCardStr() const override;
- virtual Printer *GetPrt() override;
-};
-
-class AbstractSwSelGlossaryDlg_Impl : public AbstractSwSelGlossaryDlg
-{
- std::unique_ptr<SwSelGlossaryDlg> m_xDlg;
-public:
- explicit AbstractSwSelGlossaryDlg_Impl(std::unique_ptr<SwSelGlossaryDlg> p)
- : m_xDlg(std::move(p))
- {
- }
- virtual short Execute() override;
- virtual void InsertGlos(const OUString &rRegion, const OUString &rGlosName) override; // inline
- virtual sal_Int32 GetSelectedIdx() const override; // inline
- virtual void SelectEntryPos(sal_Int32 nIdx) override; // inline
-};
-
-class AbstractSwAutoFormatDlg_Impl : public AbstractSwAutoFormatDlg
-{
- std::shared_ptr<SwAutoFormatDlg> m_xDlg;
-public:
- explicit AbstractSwAutoFormatDlg_Impl(std::shared_ptr<SwAutoFormatDlg> p)
- : m_xDlg(std::move(p))
- {
- }
- virtual short Execute() override;
- virtual bool StartExecuteAsync(AsyncContext &rCtx) override;
- virtual std::unique_ptr<SwTableAutoFormat> FillAutoFormatOfIndex() const override;
- virtual void Apply() override { m_xDlg->Apply(); }
-};
-
-class AbstractSwFieldDlg_Impl : public AbstractSwFieldDlg
-{
- std::shared_ptr<SwFieldDlg> m_xDlg;
-public:
- explicit AbstractSwFieldDlg_Impl(std::shared_ptr<SwFieldDlg> 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;
- //From class Window.
- virtual void SetText( const OUString& rStr ) override;
- virtual void ShowReferencePage() override;
- virtual void Initialize(SfxChildWinInfo *pInfo) override;
- virtual void ReInitDlg() override;
- virtual void ActivateDatabasePage() override;
- virtual std::shared_ptr<SfxDialogController> GetController() override;
-};
-
-class AbstractSwRenameXNamedDlg_Impl : public AbstractSwRenameXNamedDlg
-{
- std::shared_ptr<SwRenameXNamedDlg> m_xDlg;
-public:
- explicit AbstractSwRenameXNamedDlg_Impl(std::unique_ptr<SwRenameXNamedDlg> p)
- : m_xDlg(std::move(p))
- {
- }
- virtual short Execute() override;
- virtual bool StartExecuteAsync(VclAbstractDialog::AsyncContext &rCtx) override;
- virtual void SetForbiddenChars( const OUString& rSet ) override;
- virtual void SetAlternativeAccess(
- css::uno::Reference< css::container::XNameAccess > & xSecond,
- css::uno::Reference< css::container::XNameAccess > & xThird ) override;
-};
-
-/**
- * Implementation of AbstractSwContentControlListItemDlg, that is only visible to
- * SwAbstractDialogFactory_Impl::CreateSwContentControlListItemDlg().
- */
-class AbstractSwContentControlListItemDlg_Impl : public AbstractSwContentControlListItemDlg
-{
- std::shared_ptr<SwContentControlListItemDlg> m_xDlg;
-
-public:
- explicit AbstractSwContentControlListItemDlg_Impl(
- std::shared_ptr<SwContentControlListItemDlg> xDlg)
- : m_xDlg(std::move(xDlg))
- {
- }
-
- short Execute() override;
- bool StartExecuteAsync(VclAbstractDialog::AsyncContext &) override;
-};
-
-class AbstractSwModalRedlineAcceptDlg_Impl : public AbstractSwModalRedlineAcceptDlg
-{
- std::shared_ptr<SwModalRedlineAcceptDlg> m_xDlg;
-public:
- explicit AbstractSwModalRedlineAcceptDlg_Impl(std::shared_ptr<SwModalRedlineAcceptDlg> p)
- : m_xDlg(std::move(p))
- {
- }
- virtual short Execute() override;
- virtual bool StartExecuteAsync(VclAbstractDialog::AsyncContext &) override;
-};
-
-class SwGlossaryDlg;
-class AbstractGlossaryDlg_Impl : public AbstractGlossaryDlg
-{
- std::shared_ptr<SwGlossaryDlg> m_xDlg;
-public:
- explicit AbstractGlossaryDlg_Impl(std::shared_ptr<SwGlossaryDlg> p)
- : m_xDlg(std::move(p))
- {
- }
- virtual short Execute() override;
- virtual bool StartExecuteAsync(AsyncContext &rCtx) override;
- virtual void Apply() override { m_xDlg->Apply(); }
- virtual OUString GetCurrGrpName() const override;
- virtual OUString GetCurrShortName() const override;
-};
-
-class SwFieldInputDlg;
-class AbstractFieldInputDlg_Impl : public AbstractFieldInputDlg
-{
- std::unique_ptr<SwFieldInputDlg> m_xDlg;
-public:
- explicit AbstractFieldInputDlg_Impl(std::unique_ptr<SwFieldInputDlg> p)
- : m_xDlg(std::move(p))
- {
- }
- virtual short Execute() override;
- virtual void EndDialog(sal_Int32) override;
- virtual bool PrevButtonPressed() const override;
- virtual bool NextButtonPressed() const override;
-};
-
-class SwInsFootNoteDlg;
-class AbstractInsFootNoteDlg_Impl : public AbstractInsFootNoteDlg
-{
- std::shared_ptr<SwInsFootNoteDlg> m_xDlg;
-public:
- explicit AbstractInsFootNoteDlg_Impl(std::shared_ptr<SwInsFootNoteDlg> p)
- : m_xDlg(std::move(p))
- {
- }
- virtual short Execute() override;
- virtual bool StartExecuteAsync(AsyncContext &rCtx) override;
- virtual void Apply() override { m_xDlg->Apply(); }
- virtual OUString GetFontName() override;
- virtual bool IsEndNote() override;
- virtual OUString GetStr() override;
- //from class Window
- virtual void SetHelpId( const OUString& sHelpId ) override;
- virtual void SetText( const OUString& rStr ) override;
-};
-
-class SwInsTableDlg;
-class AbstractInsTableDlg_Impl : public AbstractInsTableDlg
-{
- std::shared_ptr<weld::DialogController> m_xDlg;
-public:
- explicit AbstractInsTableDlg_Impl(std::shared_ptr<weld::DialogController> p)
- : m_xDlg(std::move(p))
- {
- }
- virtual void GetValues( OUString& rName, sal_uInt16& rRow, sal_uInt16& rCol,
- SwInsertTableOptions& rInsTableFlags, OUString& rTableAutoFormatName,
- std::unique_ptr<SwTableAutoFormat>& prTAFormat ) override;
- virtual std::shared_ptr<weld::DialogController> getDialogController() override { return m_xDlg; }
-};
-
-class SwJavaEditDialog;
-class AbstractJavaEditDialog_Impl : public AbstractJavaEditDialog
-{
- std::unique_ptr<SwJavaEditDialog> m_xDlg;
-public:
- explicit AbstractJavaEditDialog_Impl(std::unique_ptr<SwJavaEditDialog> p)
- : m_xDlg(std::move(p))
- {
- }
- virtual short Execute() override;
- virtual OUString GetScriptText() const override;
- virtual OUString GetScriptType() const override;
- virtual bool IsUrl() const override;
- virtual bool IsNew() const override;
- virtual bool IsUpdate() const override;
-};
-
-class SwMailMergeDlg;
-class AbstractMailMergeDlg_Impl : public AbstractMailMergeDlg
-{
- std::unique_ptr<SwMailMergeDlg> m_xDlg;
-public:
- explicit AbstractMailMergeDlg_Impl(std::unique_ptr<SwMailMergeDlg> p)
- : m_xDlg(std::move(p))
- {
- }
- virtual short Execute() override;
- virtual DBManagerOptions GetMergeType() override ;
- virtual const OUString& GetSaveFilter() const override;
- virtual css::uno::Sequence< css::uno::Any > GetSelection() const override ;
- virtual css::uno::Reference< css::sdbc::XResultSet> GetResultSet() const override;
- virtual bool IsSaveSingleDoc() const override;
- virtual bool IsGenerateFromDataBase() const override;
- virtual bool IsFileEncryptedFromDataBase() const override;
- virtual OUString GetColumnName() const override;
- virtual OUString GetPasswordColumnName() const override;
- virtual OUString GetTargetURL() const override;
-};
-
-class SwMailMergeCreateFromDlg;
-class AbstractMailMergeCreateFromDlg_Impl : public AbstractMailMergeCreateFromDlg
-{
- std::unique_ptr<SwMailMergeCreateFromDlg> m_xDlg;
-public:
- explicit AbstractMailMergeCreateFromDlg_Impl(std::unique_ptr<SwMailMergeCreateFromDlg> p)
- : m_xDlg(std::move(p))
- {
- }
- virtual short Execute() override;
- virtual bool IsThisDocument() const override ;
-};
-
-class SwMailMergeFieldConnectionsDlg;
-class AbstractMailMergeFieldConnectionsDlg_Impl : public AbstractMailMergeFieldConnectionsDlg
-{
- std::unique_ptr<SwMailMergeFieldConnectionsDlg> m_xDlg;
-public:
- explicit AbstractMailMergeFieldConnectionsDlg_Impl(std::unique_ptr<SwMailMergeFieldConnectionsDlg> p)
- : m_xDlg(std::move(p))
- {
- }
- virtual short Execute() override;
- virtual bool IsUseExistingConnections() const override ;
-};
-
-class SwMultiTOXTabDialog;
-class AbstractMultiTOXTabDialog_Impl : public AbstractMultiTOXTabDialog
-{
- std::shared_ptr<SwMultiTOXTabDialog> m_xDlg;
-public:
- explicit AbstractMultiTOXTabDialog_Impl(std::shared_ptr<SwMultiTOXTabDialog> p)
- : m_xDlg(std::move(p))
- {
- }
- virtual short Execute() override;
- virtual bool StartExecuteAsync(VclAbstractDialog::AsyncContext &rCtx) override;
- virtual CurTOXType GetCurrentTOXType() const override ;
- virtual SwTOXDescription& GetTOXDescription(CurTOXType eTOXTypes) override;
- //from SfxTabDialog
- virtual const SfxItemSet* GetOutputItemSet() const override;
-};
-
-class SwEditRegionDlg;
-class AbstractEditRegionDlg_Impl : public AbstractEditRegionDlg
-{
- std::shared_ptr<SwEditRegionDlg> m_xDlg;
-public:
- explicit AbstractEditRegionDlg_Impl(std::shared_ptr<SwEditRegionDlg> p)
- : m_xDlg(std::move(p))
- {
- }
- virtual short Execute() override;
- virtual bool StartExecuteAsync(AsyncContext &rCtx) override;
- virtual void SelectSection(const OUString& rSectionName) override;
-};
-
-class SwInsertSectionTabDialog;
-class AbstractInsertSectionTabDialog_Impl : public AbstractInsertSectionTabDialog
-{
- std::shared_ptr<SwInsertSectionTabDialog> m_xDlg;
-public:
- explicit AbstractInsertSectionTabDialog_Impl(std::shared_ptr<SwInsertSectionTabDialog> p)
- : m_xDlg(std::move(p))
- {
- }
- virtual short Execute() override;
- virtual bool StartExecuteAsync(AsyncContext &rCtx) override;
- virtual void SetSectionData(SwSectionData const& rSect) override;
-};
-
-class SwIndexMarkFloatDlg;
-class AbstractIndexMarkFloatDlg_Impl : public AbstractMarkFloatDlg
-{
- std::shared_ptr<SwIndexMarkFloatDlg> m_xDlg;
-public:
- explicit AbstractIndexMarkFloatDlg_Impl(std::shared_ptr<SwIndexMarkFloatDlg> p)
- : m_xDlg(std::move(p))
- {
- }
- virtual short Execute() override;
- virtual void ReInitDlg(SwWrtShell& rWrtShell) override;
- virtual std::shared_ptr<SfxDialogController> GetController() override;
-};
-
-class SwAuthMarkFloatDlg;
-class AbstractAuthMarkFloatDlg_Impl : public AbstractMarkFloatDlg
-{
- std::shared_ptr<SwAuthMarkFloatDlg> m_xDlg;
-public:
- explicit AbstractAuthMarkFloatDlg_Impl(std::shared_ptr<SwAuthMarkFloatDlg> p)
- : m_xDlg(std::move(p))
- {
- }
- virtual short Execute() override;
- virtual void ReInitDlg(SwWrtShell& rWrtShell) override;
- virtual std::shared_ptr<SfxDialogController> GetController() override;
-};
-
-class SwMailMergeWizard;
-class AbstractMailMergeWizard_Impl : public AbstractMailMergeWizard
-{
- std::shared_ptr<SwMailMergeWizard> m_xDlg;
-
-public:
- explicit AbstractMailMergeWizard_Impl(std::shared_ptr<SwMailMergeWizard> p)
- : m_xDlg(std::move(p))
- {
- }
- virtual ~AbstractMailMergeWizard_Impl() override;
- virtual bool StartExecuteAsync(VclAbstractDialog::AsyncContext &rCtx) override;
- virtual short Execute() override;
-
- virtual OUString GetReloadDocument() const override;
- virtual void ShowPage( sal_uInt16 nLevel ) override;
- virtual sal_uInt16 GetRestartPage() const override;
-};
-
-class AbstractChangeDbDialog_Impl : public AbstractChangeDbDialog
-{
- std::shared_ptr<SwChangeDBDlg> m_xDlg;
-public:
- explicit AbstractChangeDbDialog_Impl(std::shared_ptr<SwChangeDBDlg> p)
- : m_xDlg(std::move(p))
- {
- }
- virtual short Execute() override;
- virtual bool StartExecuteAsync(AsyncContext &rCtx) override;
- virtual void UpdateFields() override { m_xDlg->UpdateFields(); }
-};
-
-
//AbstractDialogFactory_Impl implementations
class SwAbstractDialogFactory_Impl : public SwAbstractDialogFactory
{