diff options
Diffstat (limited to 'sw/source/ui/dialog/swdlgfact.cxx')
-rw-r--r-- | sw/source/ui/dialog/swdlgfact.cxx | 74 |
1 files changed, 71 insertions, 3 deletions
diff --git a/sw/source/ui/dialog/swdlgfact.cxx b/sw/source/ui/dialog/swdlgfact.cxx index 17f0ed1d3a03..eda2be389ae8 100644 --- a/sw/source/ui/dialog/swdlgfact.cxx +++ b/sw/source/ui/dialog/swdlgfact.cxx @@ -35,6 +35,7 @@ #include <colwd.hxx> #include <contentcontroldlg.hxx> #include <contentcontrollistitemdlg.hxx> +#include <pagenumberdlg.hxx> #include <convert.hxx> #include <cption.hxx> #include <dbinsdlg.hxx> @@ -90,6 +91,7 @@ #include <uiborder.hxx> #include <mmresultdialogs.hxx> #include <formatlinebreak.hxx> +#include <translatelangselect.hxx> using namespace ::com::sun::star; using namespace css::frame; @@ -110,6 +112,16 @@ short SwAbstractSfxController_Impl::Execute() return m_xDlg->run(); } +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(); @@ -120,6 +132,11 @@ 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() { return m_xDlg->run(); @@ -135,6 +152,16 @@ 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(); @@ -210,6 +237,11 @@ short AbstractSwRenameXNamedDlg_Impl::Execute() return m_xDlg->run(); } +bool AbstractSwContentControlListItemDlg_Impl::StartExecuteAsync(VclAbstractDialog::AsyncContext& rCtx) +{ + return weld::DialogController::runAsync(m_xDlg, rCtx.maEndDialogFn); +} + short AbstractSwContentControlListItemDlg_Impl::Execute() { return m_xDlg->run(); @@ -351,11 +383,21 @@ const SfxItemSet* SwAbstractSfxController_Impl::GetOutputItemSet() const return m_xDlg->GetOutputItemSet(); } +const SfxItemSet* AbstractNumFormatDlg_Impl::GetOutputItemSet() const +{ + return m_xDlg->GetOutputItemSet(); +} + void SwAbstractSfxController_Impl::SetText(const OUString& rStr) { m_xDlg->set_title(rStr); } +void AbstractNumFormatDlg_Impl::SetText(const OUString& rStr) +{ + m_xDlg->set_title(rStr); +} + void AbstractSwAsciiFilterDlg_Impl::FillOptions( SwAsciiOptions& rOptions ) { m_xDlg->FillOptions(rOptions); @@ -595,6 +637,16 @@ OUString AbstractInsFootNoteDlg_Impl::GetFontName() return m_xDlg->GetFontName(); } +int AbstractSwPageNumberDlg_Impl::GetPageNumberPosition() const +{ + return m_xDlg->GetPageNumberPosition(); +} + +int AbstractSwPageNumberDlg_Impl::GetPageNumberAlignment() const +{ + return m_xDlg->GetPageNumberAlignment(); +} + bool AbstractInsFootNoteDlg_Impl::IsEndNote() { return m_xDlg->IsEndNote(); @@ -802,6 +854,12 @@ sal_uInt16 AbstractMailMergeWizard_Impl::GetRestartPage() const return m_xDlg->GetRestartPage(); } +std::optional<SwLanguageListItem> AbstractSwTranslateLangSelectDlg_Impl::GetSelectedLanguage() +{ + SwTranslateLangSelectDlg* pDlg = dynamic_cast<SwTranslateLangSelectDlg*>(m_xDlg.get()); + return pDlg->GetSelectedLanguage(); +} + VclPtr<AbstractSwInsertAbstractDlg> SwAbstractDialogFactory_Impl::CreateSwInsertAbstractDlg(weld::Window* pParent) { return VclPtr<AbstractSwInsertAbstractDlg_Impl>::Create(std::make_unique<SwInsertAbstractDlg>(pParent)); @@ -827,7 +885,7 @@ VclPtr<SfxAbstractDialog> SwAbstractDialogFactory_Impl::CreateSwBackgroundDialog VclPtr<SfxAbstractDialog> SwAbstractDialogFactory_Impl::CreateNumFormatDialog(weld::Widget* pParent, const SfxItemSet& rSet) { - return VclPtr<SwAbstractSfxController_Impl>::Create(std::make_unique<SwNumFormatDlg>(pParent, rSet)); + return VclPtr<AbstractNumFormatDlg_Impl>::Create(std::make_shared<SwNumFormatDlg>(pParent, rSet)); } VclPtr<AbstractSwAsciiFilterDlg> SwAbstractDialogFactory_Impl::CreateSwAsciiFilterDlg(weld::Window* pParent, @@ -853,7 +911,7 @@ SwAbstractDialogFactory_Impl::CreateSwContentControlListItemDlg(weld::Window* pP SwContentControlListItem& rItem) { return VclPtr<AbstractSwContentControlListItemDlg_Impl>::Create( - std::make_unique<SwContentControlListItemDlg>(pParent, rItem)); + std::make_shared<SwContentControlListItemDlg>(pParent, rItem)); } std::shared_ptr<AbstractSwBreakDlg> SwAbstractDialogFactory_Impl::CreateSwBreakDlg(weld::Window* pParent, SwWrtShell &rSh) @@ -861,6 +919,11 @@ std::shared_ptr<AbstractSwBreakDlg> SwAbstractDialogFactory_Impl::CreateSwBreakD return std::make_shared<AbstractSwBreakDlg_Impl>(std::make_unique<SwBreakDlg>(pParent, rSh)); } +std::shared_ptr<AbstractSwTranslateLangSelectDlg> SwAbstractDialogFactory_Impl::CreateSwTranslateLangSelectDlg(weld::Window* pParent, SwWrtShell &rSh) +{ + return std::make_shared<AbstractSwTranslateLangSelectDlg_Impl>(std::make_unique<SwTranslateLangSelectDlg>(pParent, rSh)); +} + VclPtr<VclAbstractDialog> SwAbstractDialogFactory_Impl::CreateSwChangeDBDlg(SwView& rVw) { #if HAVE_FEATURE_DBCONNECTIVITY && !ENABLE_FUZZERS @@ -972,7 +1035,7 @@ VclPtr<VclAbstractDialog> SwAbstractDialogFactory_Impl::CreateSwSortingDialog(we VclPtr<AbstractSplitTableDialog> SwAbstractDialogFactory_Impl::CreateSplitTableDialog(weld::Window *pParent, SwWrtShell &rSh) { - return VclPtr<AbstractSplitTableDialog_Impl>::Create(std::make_unique<SwSplitTableDlg>(pParent, rSh)); + return VclPtr<AbstractSplitTableDialog_Impl>::Create(std::make_shared<SwSplitTableDlg>(pParent, rSh)); } VclPtr<AbstractSwSelGlossaryDlg> SwAbstractDialogFactory_Impl::CreateSwSelGlossaryDlg(weld::Window *pParent, const OUString &rShortName) @@ -1031,6 +1094,11 @@ VclPtr<AbstractSwModalRedlineAcceptDlg> SwAbstractDialogFactory_Impl::CreateSwMo return VclPtr<AbstractSwModalRedlineAcceptDlg_Impl>::Create(std::make_unique<SwModalRedlineAcceptDlg>(pParent)); } +VclPtr<AbstractSwPageNumberDlg> SwAbstractDialogFactory_Impl::CreateSwPageNumberDlg(weld::Window *pParent) +{ + return VclPtr<AbstractSwPageNumberDlg_Impl>::Create(std::make_shared<SwPageNumberDlg>(pParent)); +} + VclPtr<VclAbstractDialog> SwAbstractDialogFactory_Impl::CreateTableMergeDialog(weld::Window* pParent, bool& rWithPrev) { return VclPtr<AbstractSwMergeTableDlg_Impl>::Create(std::make_unique<SwMergeTableDlg>(pParent, rWithPrev)); |