/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * This file is part of the LibreOffice project. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * This file incorporates work covered by the following license notice: * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed * with this work for additional information regarding copyright * ownership. The ASF licenses this file to you under the Apache * License, Version 2.0 (the "License"); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ #include #include "swdlgfact.hxx" #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace ::com::sun::star; using namespace css::frame; using namespace css::uno; short AbstractSwWordCountFloatDlg_Impl::Execute() { return m_xDlg->run(); } short AbstractSwInsertAbstractDlg_Impl::Execute() { return m_xDlg->run(); } short SwAbstractSfxController_Impl::Execute() { return m_xDlg->run(); } short AbstractSwAsciiFilterDlg_Impl::Execute() { return m_xDlg->run(); } short AbstractSplitTableDialog_Impl::Execute() { return m_xDlg->run(); } short AbstractSwTableWidthDlg_Impl::Execute() { return m_xDlg->run(); } short AbstractSwTableHeightDlg_Impl::Execute() { return m_xDlg->run(); } short AbstractSwMergeTableDlg_Impl::Execute() { return m_xDlg->run(); } 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() { return m_xDlg->run(); } short AbstractMultiTOXMarkDlg_Impl::Execute() { return m_xDlg->run(); } short AbstractTabController_Impl::Execute() { return m_xDlg->run(); } short AbstractSwConvertTableDlg_Impl::Execute() { return m_xDlg->run(); } short AbstractSwInsertDBColAutoPilot_Impl::Execute() { return m_xDlg->run(); } short AbstractDropDownFieldDialog_Impl::Execute() { return m_xDlg->run(); } short AbstractDropDownFormFieldDialog_Impl::Execute() { return m_xDlg->run(); } short AbstractDateFormFieldDialog_Impl::Execute() { return m_xDlg->run(); } short AbstractSwLabDlg_Impl::Execute() { return m_xDlg->run(); } short AbstractSwSelGlossaryDlg_Impl::Execute() { return m_xDlg->run(); } short AbstractSwAutoFormatDlg_Impl::Execute() { return m_xDlg->run(); } short AbstractSwFieldDlg_Impl::Execute() { return m_xDlg->run(); } short AbstractSwRenameXNamedDlg_Impl::Execute() { return m_xDlg->run(); } short AbstractSwModalRedlineAcceptDlg_Impl::Execute() { return m_xDlg->run(); } short AbstractGlossaryDlg_Impl::Execute() { return m_xDlg->run(); } short AbstractFieldInputDlg_Impl::Execute() { return m_xDlg->run(); } short AbstractInsFootNoteDlg_Impl::Execute() { return m_xDlg->run(); } 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(); } 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() { return m_xDlg->run(); } short AbstractAuthMarkFloatDlg_Impl::Execute() { return m_xDlg->run(); } void AbstractTabController_Impl::SetCurPageId( const OString &rName ) { m_xDlg->SetCurPageId( rName ); } const SfxItemSet* AbstractTabController_Impl::GetOutputItemSet() const { return m_xDlg->GetOutputItemSet(); } const sal_uInt16* 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); } IMPL_LINK_NOARG(AbstractApplyTabController_Impl, ApplyHdl, weld::Button&, void) { if (m_xDlg->Apply()) { m_aHandler.Call(nullptr); m_xDlg->Applied(); } } void AbstractApplyTabController_Impl::SetApplyHdl( const Link& rLink ) { m_aHandler = rLink; m_xDlg->SetApplyHandler(LINK(this, AbstractApplyTabController_Impl, ApplyHdl)); } sal_uInt8 AbstractSwInsertAbstractDlg_Impl::GetLevel() const { return m_xDlg->GetLevel(); } sal_uInt8 AbstractSwInsertAbstractDlg_Impl::GetPara() const { return m_xDlg->GetPara(); } const SfxItemSet* SwAbstractSfxController_Impl::GetOutputItemSet() const { return m_xDlg->GetOutputItemSet(); } void SwAbstractSfxController_Impl::SetText(const OUString& rStr) { m_xDlg->set_title(rStr); } void AbstractSwAsciiFilterDlg_Impl::FillOptions( SwAsciiOptions& rOptions ) { m_xDlg->FillOptions(rOptions); } SplitTable_HeadlineOption AbstractSplitTableDialog_Impl::GetSplitMode() { return m_xDlg->GetSplitMode(); } OUString AbstractSwBreakDlg_Impl::GetTemplateName() { SwBreakDlg* pDlg = dynamic_cast(m_xDlg.get()); if (pDlg) return pDlg->GetTemplateName(); return ""; } sal_uInt16 AbstractSwBreakDlg_Impl:: GetKind() { SwBreakDlg* pDlg = dynamic_cast(m_xDlg.get()); if (pDlg) return pDlg->GetKind(); return 0; } ::std::optional AbstractSwBreakDlg_Impl:: GetPageNumber() { SwBreakDlg* pDlg = dynamic_cast(m_xDlg.get()); if (pDlg) return pDlg->GetPageNumber(); return 0; } void AbstractSwConvertTableDlg_Impl::GetValues( sal_Unicode& rDelim,SwInsertTableOptions& rInsTableFlags, SwTableAutoFormat const*& prTAFormat) { m_xDlg->GetValues(rDelim,rInsTableFlags, 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) { #if HAVE_FEATURE_DBCONNECTIVITY m_xDlg->DataToDoc(rSelection, rxSource, xConnection, xResultSet); #else (void) rSelection; (void) rxSource; (void) xConnection; (void) xResultSet; #endif } bool AbstractDropDownFieldDialog_Impl::PrevButtonPressed() const { return m_xDlg->PrevButtonPressed(); } bool AbstractDropDownFieldDialog_Impl::NextButtonPressed() const { return m_xDlg->NextButtonPressed(); } void AbstractSwLabDlg_Impl::SetCurPageId( const OString &rName ) { m_xDlg->SetCurPageId( rName ); } const SfxItemSet* AbstractSwLabDlg_Impl::GetOutputItemSet() const { return m_xDlg->GetOutputItemSet(); } const sal_uInt16* 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 { return m_xDlg->GetBusinessCardStr(); } Printer * AbstractSwLabDlg_Impl::GetPrt() { return m_xDlg->GetPrt(); } void AbstractSwSelGlossaryDlg_Impl::InsertGlos(const OUString &rRegion, const OUString &rGlosName) { m_xDlg->InsertGlos( rRegion, rGlosName ); } sal_Int32 AbstractSwSelGlossaryDlg_Impl::GetSelectedIdx() const { return m_xDlg->GetSelectedIdx(); } void AbstractSwSelGlossaryDlg_Impl::SelectEntryPos(sal_Int32 nIdx) { m_xDlg->SelectEntryPos( nIdx ); } std::unique_ptr AbstractSwAutoFormatDlg_Impl::FillAutoFormatOfIndex() const { return m_xDlg->FillAutoFormatOfIndex(); } void AbstractSwFieldDlg_Impl::SetCurPageId( const OString &rName ) { m_xDlg->SetCurPageId( rName ); } const SfxItemSet* AbstractSwFieldDlg_Impl::GetOutputItemSet() const { return m_xDlg->GetOutputItemSet(); } const sal_uInt16* AbstractSwFieldDlg_Impl::GetInputRanges(const SfxItemPool& pItem ) { return m_xDlg->GetInputRanges( pItem ); } void AbstractSwFieldDlg_Impl::SetInputSet( const SfxItemSet* pInSet ) { m_xDlg->SetInputSet( pInSet ); } void AbstractSwFieldDlg_Impl::SetText( const OUString& rStr ) { m_xDlg->set_title(rStr); } bool AbstractSwFieldDlg_Impl::StartExecuteAsync(AsyncContext &rCtx) { auto xDlg = m_xDlg; return SfxTabDialogController::runAsync(m_xDlg, [=](sal_Int32 nResult){ xDlg->Close(); if (rCtx.isSet()) rCtx.maEndDialogFn(nResult); }); } void AbstractSwFieldDlg_Impl::Initialize(SfxChildWinInfo *pInfo) { m_xDlg->Initialize( pInfo ); } void AbstractSwFieldDlg_Impl::ReInitDlg() { m_xDlg->ReInitDlg(); } void AbstractSwFieldDlg_Impl::ActivateDatabasePage() { m_xDlg->ActivateDatabasePage(); } void AbstractSwFieldDlg_Impl::ShowReferencePage() { m_xDlg->ShowReferencePage(); } std::shared_ptr AbstractSwFieldDlg_Impl::GetController() { return m_xDlg; } void AbstractSwRenameXNamedDlg_Impl::SetForbiddenChars( const OUString& rSet ) { m_xDlg->SetForbiddenChars( rSet ); } void AbstractSwRenameXNamedDlg_Impl::SetAlternativeAccess( css::uno::Reference< css::container::XNameAccess > & xSecond, css::uno::Reference< css::container::XNameAccess > & xThird ) { m_xDlg->SetAlternativeAccess( xSecond, xThird); } void AbstractSwModalRedlineAcceptDlg_Impl::AcceptAll( bool bAccept ) { m_xDlg->AcceptAll( bAccept); } OUString AbstractGlossaryDlg_Impl::GetCurrGrpName() const { return m_xDlg->GetCurrGrpName(); } OUString AbstractGlossaryDlg_Impl::GetCurrShortName() const { return m_xDlg->GetCurrShortName(); } void AbstractFieldInputDlg_Impl::EndDialog(sal_Int32 n) { m_xDlg->response(n); } bool AbstractFieldInputDlg_Impl::PrevButtonPressed() const { return m_xDlg->PrevButtonPressed(); } bool AbstractFieldInputDlg_Impl::NextButtonPressed() const { return m_xDlg->NextButtonPressed(); } OUString AbstractInsFootNoteDlg_Impl::GetFontName() { return m_xDlg->GetFontName(); } bool AbstractInsFootNoteDlg_Impl::IsEndNote() { return m_xDlg->IsEndNote(); } OUString AbstractInsFootNoteDlg_Impl::GetStr() { return m_xDlg->GetStr(); } void AbstractInsFootNoteDlg_Impl::SetHelpId(const OString& rHelpId) { m_xDlg->set_help_id(rHelpId); } void AbstractInsFootNoteDlg_Impl::SetText( const OUString& rStr ) { m_xDlg->set_title(rStr); } void AbstractInsTableDlg_Impl::GetValues( OUString& rName, sal_uInt16& rRow, sal_uInt16& rCol, SwInsertTableOptions& rInsTableFlags, OUString& rTableAutoFormatName, std::unique_ptr& prTAFormat ) { SwInsTableDlg* pDlg = dynamic_cast(m_xDlg.get()); if (pDlg) pDlg->GetValues(rName, rRow, rCol, rInsTableFlags, rTableAutoFormatName, prTAFormat); } OUString AbstractJavaEditDialog_Impl::GetScriptText() const { return m_xDlg->GetScriptText(); } OUString AbstractJavaEditDialog_Impl::GetScriptType() const { return m_xDlg->GetScriptType(); } bool AbstractJavaEditDialog_Impl::IsUrl() const { return m_xDlg->IsUrl(); } bool AbstractJavaEditDialog_Impl::IsNew() const { return m_xDlg->IsNew(); } bool AbstractJavaEditDialog_Impl::IsUpdate() const { return m_xDlg->IsUpdate(); } DBManagerOptions AbstractMailMergeDlg_Impl::GetMergeType() { return m_xDlg->GetMergeType(); } const OUString& AbstractMailMergeDlg_Impl::GetSaveFilter() const { return m_xDlg->GetSaveFilter(); } css::uno::Sequence< css::uno::Any > AbstractMailMergeDlg_Impl::GetSelection() const { return m_xDlg->GetSelection(); } uno::Reference< sdbc::XResultSet> AbstractMailMergeDlg_Impl::GetResultSet() const { return m_xDlg->GetResultSet(); } bool AbstractMailMergeDlg_Impl::IsSaveSingleDoc() const { return m_xDlg->IsSaveSingleDoc(); } bool AbstractMailMergeDlg_Impl::IsGenerateFromDataBase() const { return m_xDlg->IsGenerateFromDataBase(); } bool AbstractMailMergeDlg_Impl::IsFileEncryptedFromDataBase() const { return m_xDlg->IsFileEncryptedFromDataBase(); } OUString AbstractMailMergeDlg_Impl::GetColumnName() const { return m_xDlg->GetColumnName(); } OUString AbstractMailMergeDlg_Impl::GetPasswordColumnName() const { return m_xDlg->GetPasswordColumnName(); } OUString AbstractMailMergeDlg_Impl::GetTargetURL() const { return m_xDlg->GetTargetURL(); } bool AbstractMailMergeCreateFromDlg_Impl::IsThisDocument() const { return m_xDlg->IsThisDocument(); } bool AbstractMailMergeFieldConnectionsDlg_Impl::IsUseExistingConnections() const { return m_xDlg->IsUseExistingConnections(); } CurTOXType AbstractMultiTOXTabDialog_Impl::GetCurrentTOXType() const { return m_xDlg->GetCurrentTOXType(); } SwTOXDescription& AbstractMultiTOXTabDialog_Impl::GetTOXDescription(CurTOXType eTOXTypes) { return m_xDlg->GetTOXDescription(eTOXTypes); } const SfxItemSet* AbstractMultiTOXTabDialog_Impl::GetOutputItemSet() const { return m_xDlg->GetOutputItemSet(); } void AbstractEditRegionDlg_Impl::SelectSection(const OUString& rSectionName) { m_xDlg->SelectSection(rSectionName); } void AbstractInsertSectionTabDialog_Impl::SetSectionData(SwSectionData const& rSect) { m_xDlg->SetSectionData(rSect); } void AbstractIndexMarkFloatDlg_Impl::ReInitDlg(SwWrtShell& rWrtShell) { m_xDlg->ReInitDlg( rWrtShell); } std::shared_ptr AbstractIndexMarkFloatDlg_Impl::GetController() { return m_xDlg; } void AbstractAuthMarkFloatDlg_Impl::ReInitDlg(SwWrtShell& rWrtShell) { m_xDlg->ReInitDlg(rWrtShell); } std::shared_ptr AbstractAuthMarkFloatDlg_Impl::GetController() { return m_xDlg; } std::shared_ptr AbstractSwWordCountFloatDlg_Impl::GetController() { return m_xDlg; } void AbstractSwWordCountFloatDlg_Impl::UpdateCounts() { m_xDlg->UpdateCounts(); } void AbstractSwWordCountFloatDlg_Impl::SetCounts(const SwDocStat &rCurrCnt, const SwDocStat &rDocStat) { m_xDlg->SetCounts(rCurrCnt, rDocStat); } AbstractMailMergeWizard_Impl::~AbstractMailMergeWizard_Impl() { } 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 weld::GenericDialogController::runAsync(m_xDlg, rCtx.maEndDialogFn); } short AbstractMailMergeWizard_Impl::Execute() { return m_xDlg->run(); } OUString AbstractMailMergeWizard_Impl::GetReloadDocument() const { return m_xDlg->GetReloadDocument(); } void AbstractMailMergeWizard_Impl::ShowPage( sal_uInt16 nLevel ) { m_xDlg->skipUntil(nLevel); } sal_uInt16 AbstractMailMergeWizard_Impl::GetRestartPage() const { return m_xDlg->GetRestartPage(); } VclPtr SwAbstractDialogFactory_Impl::CreateSwInsertAbstractDlg(weld::Window* pParent) { return VclPtr::Create(std::make_unique(pParent)); } VclPtr SwAbstractDialogFactory_Impl::CreateSwAddressAbstractDlg(weld::Window* pParent, const SfxItemSet& rSet) { return VclPtr::Create(std::make_unique(pParent, rSet)); } VclPtr SwAbstractDialogFactory_Impl::CreateSwDropCapsDialog(weld::Window* pParent, const SfxItemSet& rSet) { return VclPtr::Create(std::make_unique(pParent, rSet)); } VclPtr SwAbstractDialogFactory_Impl::CreateSwBackgroundDialog(weld::Window* pParent, const SfxItemSet& rSet) { return VclPtr::Create(std::make_unique(pParent, rSet)); } VclPtr SwAbstractDialogFactory_Impl::CreateNumFormatDialog(weld::Widget* pParent, const SfxItemSet& rSet) { return VclPtr::Create(std::make_unique(pParent, rSet)); } VclPtr SwAbstractDialogFactory_Impl::CreateSwAsciiFilterDlg(weld::Window* pParent, SwDocShell& rDocSh, SvStream* pStream) { return VclPtr::Create(std::make_unique(pParent, rDocSh, pStream)); } VclPtr SwAbstractDialogFactory_Impl::CreateSwInsertBookmarkDlg(weld::Window *pParent, SwWrtShell &rSh) { return VclPtr::Create(std::make_shared(pParent, rSh)); } std::shared_ptr SwAbstractDialogFactory_Impl::CreateSwBreakDlg(weld::Window* pParent, SwWrtShell &rSh) { return std::make_shared(std::make_unique(pParent, rSh)); } VclPtr SwAbstractDialogFactory_Impl::CreateSwChangeDBDlg(SwView& rVw) { #if HAVE_FEATURE_DBCONNECTIVITY return VclPtr::Create(std::make_shared(rVw)); #else (void) rVw; return nullptr; #endif } VclPtr SwAbstractDialogFactory_Impl::CreateSwCharDlg(weld::Window* pParent, SwView& pVw, const SfxItemSet& rCoreSet, SwCharDlgMode nDialogMode, const OUString* pFormatStr) { return VclPtr::Create(std::make_shared(pParent, pVw, rCoreSet, nDialogMode, pFormatStr)); } VclPtr SwAbstractDialogFactory_Impl::CreateSwConvertTableDlg(SwView& rView, bool bToTable) { return VclPtr::Create(std::make_unique(rView, bToTable)); } VclPtr SwAbstractDialogFactory_Impl::CreateSwCaptionDialog(weld::Window *pParent, SwView &rV) { return VclPtr::Create(std::make_shared(pParent, rV)); } VclPtr SwAbstractDialogFactory_Impl::CreateSwInsertDBColAutoPilot( SwView& rView, uno::Reference< sdbc::XDataSource> rxSource, uno::Reference xColSupp, const SwDBData& rData) { #if HAVE_FEATURE_DBCONNECTIVITY return VclPtr::Create(std::make_unique(rView, rxSource, xColSupp, rData)); #else (void) rView; (void) rxSource; (void) xColSupp; (void) rData; return nullptr; #endif } VclPtr SwAbstractDialogFactory_Impl::CreateSwFootNoteOptionDlg(weld::Window *pParent, SwWrtShell &rSh) { return VclPtr::Create(std::make_shared(pParent, rSh)); } VclPtr SwAbstractDialogFactory_Impl::CreateDropDownFieldDialog(weld::Widget *pParent, SwWrtShell &rSh, SwField* pField, bool bPrevButton, bool bNextButton) { return VclPtr::Create(std::make_unique(pParent, rSh, pField, bPrevButton, bNextButton)); } VclPtr SwAbstractDialogFactory_Impl::CreateDropDownFormFieldDialog(weld::Widget *pParent, sw::mark::IFieldmark* pDropDownField) { return VclPtr::Create(std::make_unique(pParent, pDropDownField)); } VclPtr SwAbstractDialogFactory_Impl::CreateDateFormFieldDialog(weld::Widget *pParent, sw::mark::IDateFieldmark* pDateField, SwDoc& rDoc) { return VclPtr::Create(std::make_unique(pParent, pDateField, rDoc)); } VclPtr SwAbstractDialogFactory_Impl::CreateSwEnvDlg(weld::Window* pParent, const SfxItemSet& rSet, SwWrtShell* pWrtSh, Printer* pPrt, bool bInsert) { return VclPtr::Create(std::make_shared(pParent, rSet, pWrtSh,pPrt, bInsert)); } VclPtr SwAbstractDialogFactory_Impl::CreateSwLabDlg(weld::Window* pParent, const SfxItemSet& rSet, SwDBManager* pDBManager, bool bLabel) { return VclPtr::Create(std::make_unique(pParent, rSet, pDBManager, bLabel)); } SwLabDlgMethod SwAbstractDialogFactory_Impl::GetSwLabDlgStaticMethod () { return SwLabDlg::UpdateFieldInformation; } VclPtr SwAbstractDialogFactory_Impl::CreateSwParaDlg(weld::Window *pParent, SwView& rVw, const SfxItemSet& rCoreSet, bool bDraw , const OString& sDefPage) { return VclPtr::Create(std::make_shared(pParent, rVw, rCoreSet, DLG_STD, nullptr, bDraw, sDefPage)); } VclPtr SwAbstractDialogFactory_Impl::CreateSwAutoMarkDialog(weld::Window *pParent, SwWrtShell &rSh) { return VclPtr::Create(std::make_shared(pParent, rSh)); } VclPtr SwAbstractDialogFactory_Impl::CreateSwColumnDialog(weld::Window *pParent, SwWrtShell &rSh) { return VclPtr::Create(std::make_shared(pParent, rSh)); } VclPtr SwAbstractDialogFactory_Impl::CreateSwTableHeightDialog(weld::Window *pParent, SwWrtShell &rSh) { return VclPtr::Create(std::make_unique(pParent, rSh)); } VclPtr SwAbstractDialogFactory_Impl::CreateSwSortingDialog(weld::Window *pParent, SwWrtShell &rSh) { return VclPtr::Create(std::make_unique(pParent, rSh)); } VclPtr SwAbstractDialogFactory_Impl::CreateSplitTableDialog(weld::Window *pParent, SwWrtShell &rSh) { return VclPtr::Create(std::make_unique(pParent, rSh)); } VclPtr SwAbstractDialogFactory_Impl::CreateSwSelGlossaryDlg(weld::Window *pParent, const OUString &rShortName) { return VclPtr::Create(std::make_unique(pParent, rShortName)); } VclPtr SwAbstractDialogFactory_Impl::CreateSwAutoFormatDlg(weld::Window* pParent, SwWrtShell* pShell, bool bSetAutoFormat, const SwTableAutoFormat* pSelFormat) { return VclPtr::Create( std::unique_ptr>( new SwAutoFormatDlg(pParent, pShell, bSetAutoFormat, pSelFormat))); } VclPtr SwAbstractDialogFactory_Impl::CreateSwBorderDlg(weld::Window* pParent, SfxItemSet& rSet, SwBorderModes nType ) { return VclPtr::Create(std::make_unique(pParent, rSet, nType)); } VclPtr SwAbstractDialogFactory_Impl::CreateSwWrapDlg(weld::Window* pParent, SfxItemSet& rSet, SwWrtShell* pSh) { return VclPtr::Create(std::make_unique(pParent, rSet, pSh, true/*bDrawMode*/)); } VclPtr SwAbstractDialogFactory_Impl::CreateSwTableWidthDlg(weld::Window *pParent, SwTableFUNC &rFnc) { return VclPtr::Create(std::make_unique(pParent, rFnc)); } VclPtr SwAbstractDialogFactory_Impl::CreateSwTableTabDlg(weld::Window* pParent, const SfxItemSet* pItemSet, SwWrtShell* pSh) { return VclPtr::Create(std::make_shared(pParent, pItemSet, pSh)); } VclPtr SwAbstractDialogFactory_Impl::CreateSwFieldDlg(SfxBindings* pB, SwChildWinWrapper* pCW, weld::Window *pParent) { return VclPtr::Create(std::make_shared(pB, pCW, pParent)); } VclPtr SwAbstractDialogFactory_Impl::CreateSwFieldEditDlg(SwView& rVw) { return VclPtr::Create(std::make_unique(rVw)); } VclPtr SwAbstractDialogFactory_Impl::CreateSwRenameXNamedDlg(weld::Window* pParent, css::uno::Reference< css::container::XNamed > & xNamed, css::uno::Reference< css::container::XNameAccess > & xNameAccess) { return VclPtr::Create(std::make_unique(pParent,xNamed, xNameAccess)); } VclPtr SwAbstractDialogFactory_Impl::CreateSwModalRedlineAcceptDlg(weld::Window *pParent) { return VclPtr::Create(std::make_unique(pParent)); } VclPtr SwAbstractDialogFactory_Impl::CreateTableMergeDialog(weld::Window* pParent, bool& rWithPrev) { return VclPtr::Create(std::make_unique(pParent, rWithPrev)); } VclPtr SwAbstractDialogFactory_Impl::CreateFrameTabDialog(const OUString &rDialogType, SfxViewFrame *pFrame, weld::Window *pParent, const SfxItemSet& rCoreSet, bool bNewFrame, const OString& sDefPage ) { return VclPtr::Create(std::make_shared(pFrame, pParent, rCoreSet, bNewFrame, rDialogType, false/*bFormat*/, sDefPage, nullptr)); } VclPtr SwAbstractDialogFactory_Impl::CreateTemplateDialog( weld::Window *pParent, SfxStyleSheetBase& rBase, SfxStyleFamily nRegion, const OString& sPage, SwWrtShell* pActShell, bool bNew ) { return VclPtr::Create(std::make_shared(pParent, rBase, nRegion, sPage, pActShell, bNew)); } VclPtr SwAbstractDialogFactory_Impl::CreateGlossaryDlg(SfxViewFrame* pViewFrame, SwGlossaryHdl* pGlosHdl, SwWrtShell *pWrtShell) { return VclPtr::Create(std::make_unique(pViewFrame, pGlosHdl, pWrtShell)); } VclPtr SwAbstractDialogFactory_Impl::CreateFieldInputDlg(weld::Widget *pParent, SwWrtShell &rSh, SwField* pField, bool bPrevButton, bool bNextButton) { return VclPtr::Create(std::make_unique(pParent, rSh, pField, bPrevButton, bNextButton)); } VclPtr SwAbstractDialogFactory_Impl::CreateInsFootNoteDlg( weld::Window * pParent, SwWrtShell &rSh, bool bEd ) { return VclPtr::Create(std::make_unique(pParent, rSh, bEd)); } VclPtr SwAbstractDialogFactory_Impl::CreateTitlePageDlg(weld::Window *pParent) { return VclPtr::Create(std::make_shared(pParent)); } VclPtr SwAbstractDialogFactory_Impl::CreateVclSwViewDialog(SwView& rView) { return VclPtr::Create(std::make_shared(rView)); } std::shared_ptr SwAbstractDialogFactory_Impl::CreateInsTableDlg(SwView& rView) { return std::make_shared(std::make_shared(rView)); } VclPtr SwAbstractDialogFactory_Impl::CreateJavaEditDialog( weld::Window* pParent, SwWrtShell* pWrtSh) { return VclPtr::Create(std::make_unique(pParent, pWrtSh)); } VclPtr SwAbstractDialogFactory_Impl::CreateMailMergeDlg( weld::Window* pParent, SwWrtShell& rSh, const OUString& rSourceName, const OUString& rTableName, sal_Int32 nCommandType, const uno::Reference< sdbc::XConnection>& xConnection ) { return VclPtr::Create(std::make_unique(pParent, rSh, rSourceName, rTableName, nCommandType, xConnection, nullptr)); } VclPtr SwAbstractDialogFactory_Impl::CreateMailMergeCreateFromDlg(weld::Window* pParent) { return VclPtr::Create(std::make_unique(pParent)); } VclPtr SwAbstractDialogFactory_Impl::CreateMailMergeFieldConnectionsDlg(weld::Window* pParent) { return VclPtr::Create(std::make_unique(pParent)); } VclPtr SwAbstractDialogFactory_Impl::CreateMultiTOXMarkDlg(weld::Window* pParent, SwTOXMgr &rTOXMgr) { return VclPtr::Create(std::make_unique(pParent, rTOXMgr)); } VclPtr SwAbstractDialogFactory_Impl::CreateSvxNumBulletTabDialog(weld::Window* pParent, const SfxItemSet* pSwItemSet, SwWrtShell & rWrtSh) { return VclPtr::Create(std::make_shared(pParent, pSwItemSet, rWrtSh)); } VclPtr SwAbstractDialogFactory_Impl::CreateOutlineTabDialog(weld::Window* pParent, const SfxItemSet* pSwItemSet, SwWrtShell & rWrtSh ) { return VclPtr::Create(std::make_shared(pParent, pSwItemSet, rWrtSh)); } VclPtr SwAbstractDialogFactory_Impl::CreateMultiTOXTabDialog(weld::Window* pParent, const SfxItemSet& rSet, SwWrtShell &rShell, SwTOXBase* pCurTOX, bool bGlobal) { return VclPtr::Create(std::make_shared(pParent, rSet, rShell, pCurTOX, USHRT_MAX, bGlobal)); } VclPtr SwAbstractDialogFactory_Impl::CreateEditRegionDlg(weld::Window* pParent, SwWrtShell& rWrtSh) { return VclPtr::Create(std::make_shared(pParent, rWrtSh)); } VclPtr SwAbstractDialogFactory_Impl::CreateInsertSectionTabDialog(weld::Window* pParent, const SfxItemSet& rSet, SwWrtShell& rSh) { return VclPtr::Create(std::make_shared(pParent, rSet, rSh)); } VclPtr SwAbstractDialogFactory_Impl::CreateIndexMarkFloatDlg( SfxBindings* pBindings, SfxChildWindow* pChild, weld::Window *pParent, SfxChildWinInfo* pInfo ) { return VclPtr::Create(std::make_shared(pBindings, pChild, pParent, pInfo, true/*bNew*/)); } VclPtr SwAbstractDialogFactory_Impl::CreateAuthMarkFloatDlg( SfxBindings* pBindings, SfxChildWindow* pChild, weld::Window *pParent, SfxChildWinInfo* pInfo) { return VclPtr::Create(std::make_shared(pBindings, pChild, pParent, pInfo, true/*bNew*/)); } VclPtr SwAbstractDialogFactory_Impl::CreateSwWordCountDialog( SfxBindings* pBindings, SfxChildWindow* pChild, weld::Window *pParent, SfxChildWinInfo* pInfo) { return VclPtr::Create(std::make_shared(pBindings, pChild, pParent, pInfo)); } VclPtr SwAbstractDialogFactory_Impl::CreateIndexMarkModalDlg(weld::Window *pParent, SwWrtShell& rSh, SwTOXMark* pCurTOXMark ) { return VclPtr::Create(std::make_shared(pParent, rSh, pCurTOXMark)); } VclPtr SwAbstractDialogFactory_Impl::CreateMailMergeWizard( SwView& rView, std::shared_ptr& rConfigItem) { #if HAVE_FEATURE_DBCONNECTIVITY return VclPtr::Create(std::make_shared(rView, rConfigItem)); #else (void) rView; (void) rConfigItem; return nullptr; #endif } GlossaryGetCurrGroup SwAbstractDialogFactory_Impl::GetGlossaryCurrGroupFunc() { return SwGlossaryDlg::GetCurrGroup; } GlossarySetActGroup SwAbstractDialogFactory_Impl::SetGlossaryActGroupFunc() { return SwGlossaryDlg::SetActGroup; } // Factories for TabPages CreateTabPage SwAbstractDialogFactory_Impl::GetTabPageCreatorFunc( sal_uInt16 nId ) { CreateTabPage pRet = nullptr; switch ( nId ) { case RID_SW_TP_OPTCOMPATIBILITY_PAGE : pRet = SwCompatibilityOptPage::Create; break; case RID_SW_TP_OPTLOAD_PAGE : pRet = SwLoadOptPage::Create; break; case RID_SW_TP_OPTCAPTION_PAGE: return SwCaptionOptPage::Create; case RID_SW_TP_CONTENT_OPT: case RID_SW_TP_HTML_CONTENT_OPT: pRet = SwContentOptPage::Create; break; case RID_SW_TP_OPTSHDWCRSR: case RID_SW_TP_HTML_OPTSHDWCRSR: pRet = SwShdwCursorOptionsTabPage::Create; break; case RID_SW_TP_REDLINE_OPT : pRet = SwRedlineOptionsTabPage::Create; break; case RID_SW_TP_OPTTEST_PAGE : #ifdef DBG_UTIL pRet = SwTestTabPage::Create; #endif break; case TP_OPTPRINT_PAGE : case RID_SW_TP_HTML_OPTPRINT_PAGE: case RID_SW_TP_OPTPRINT_PAGE: pRet = SwAddPrinterTabPage::Create; break; case RID_SW_TP_STD_FONT: case RID_SW_TP_STD_FONT_CJK: case RID_SW_TP_STD_FONT_CTL: pRet = SwStdFontTabPage::Create; break; case RID_SW_TP_HTML_OPTTABLE_PAGE: case RID_SW_TP_OPTTABLE_PAGE: pRet = SwTableOptionsTabPage::Create; break; case RID_SW_TP_DOC_STAT : pRet = SwDocStatPage::Create; break; case RID_SW_TP_MAILCONFIG: pRet = SwMailConfigPage::Create; break; case RID_SW_TP_COMPARISON_OPT : pRet = SwCompareOptionsTabPage::Create; break; } return pRet; } void SwAbstractDialogFactory_Impl::ExecuteMMResultSaveDialog(weld::Window* pParent) { #if HAVE_FEATURE_DBCONNECTIVITY SwMMResultSaveDialog aDialog(pParent); aDialog.run(); #else (void) pParent; #endif } void SwAbstractDialogFactory_Impl::ExecuteMMResultPrintDialog(weld::Window* pParent) { #if HAVE_FEATURE_DBCONNECTIVITY SwMMResultPrintDialog aDialog(pParent); aDialog.run(); #else (void) pParent; #endif } void SwAbstractDialogFactory_Impl::ExecuteMMResultEmailDialog(weld::Window* pParent) { #if HAVE_FEATURE_DBCONNECTIVITY SwMMResultEmailDialog aDialog(pParent); aDialog.run(); #else (void) pParent; #endif } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */