diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 16:51:28 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 16:51:28 +0000 |
commit | 940b4d1848e8c70ab7642901a68594e8016caffc (patch) | |
tree | eb72f344ee6c3d9b80a7ecc079ea79e9fba8676d /cui/source/factory | |
parent | Initial commit. (diff) | |
download | libreoffice-upstream/1%7.0.4.tar.xz libreoffice-upstream/1%7.0.4.zip |
Adding upstream version 1:7.0.4.upstream/1%7.0.4upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'cui/source/factory')
-rw-r--r-- | cui/source/factory/cuiexp.cxx | 40 | ||||
-rw-r--r-- | cui/source/factory/cuiresmgr.cxx | 28 | ||||
-rw-r--r-- | cui/source/factory/dlgfact.cxx | 1699 | ||||
-rw-r--r-- | cui/source/factory/dlgfact.hxx | 981 | ||||
-rw-r--r-- | cui/source/factory/init.cxx | 44 |
5 files changed, 2792 insertions, 0 deletions
diff --git a/cui/source/factory/cuiexp.cxx b/cui/source/factory/cuiexp.cxx new file mode 100644 index 000000000..bbe1d7431 --- /dev/null +++ b/cui/source/factory/cuiexp.cxx @@ -0,0 +1,40 @@ +/* -*- 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 "dlgfact.hxx" +#include <sal/types.h> + +namespace cui +{ + static AbstractDialogFactory_Impl* GetFactory() + { + static AbstractDialogFactory_Impl* pFactory = new AbstractDialogFactory_Impl; + return pFactory; + } +} + +extern "C" +{ + SAL_DLLPUBLIC_EXPORT VclAbstractDialogFactory* CreateDialogFactory() + { + return ::cui::GetFactory(); + } +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cui/source/factory/cuiresmgr.cxx b/cui/source/factory/cuiresmgr.cxx new file mode 100644 index 000000000..b59f73cf8 --- /dev/null +++ b/cui/source/factory/cuiresmgr.cxx @@ -0,0 +1,28 @@ +/* -*- 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 <dialmgr.hxx> +#include <unotools/resmgr.hxx> + +OUString CuiResId(const char *pKey) +{ + return Translate::get(pKey, Translate::Create("cui")); +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx new file mode 100644 index 000000000..40102bae7 --- /dev/null +++ b/cui/source/factory/dlgfact.cxx @@ -0,0 +1,1699 @@ +/* -*- 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 <align.hxx> +#include "dlgfact.hxx" + +#include <about.hxx> +#include <sfx2/app.hxx> +#include <sfx2/basedlgs.hxx> +#include <sfx2/pageids.hxx> +#include <svx/dialogs.hrc> +#include <svx/svxids.hrc> +#include <numfmt.hxx> +#include <splitcelldlg.hxx> +#include <dstribut.hxx> +#include <cuiimapwnd.hxx> +#include <cui/cuicharmap.hxx> +#include <srchxtra.hxx> +#include <textanim.hxx> +#include <autocdlg.hxx> +#include <treeopt.hxx> +#include <labdlg.hxx> +#include <hangulhanjadlg.hxx> +#include <showcols.hxx> +#include <zoom.hxx> +#include <cuigaldlg.hxx> +#include <transfrm.hxx> +#include <bbdlg.hxx> +#include <cuisrchdlg.hxx> +#include <cuitbxform.hxx> +#include <optdict.hxx> +#include <dlgname.hxx> +#include <multipat.hxx> +#include <cuihyperdlg.hxx> +#include <cuifmsearch.hxx> +#include <cuigrfflt.hxx> +#include <cuitabarea.hxx> +#include <cuitabline.hxx> +#include <measure.hxx> +#include <connect.hxx> +#include <dbregister.hxx> +#include <cuioptgenrl.hxx> +#include <optasian.hxx> +#include <insdlg.hxx> +#include <pastedlg.hxx> +#include <linkdlg.hxx> +#include <SignatureLineDialog.hxx> +#include <SignSignatureLineDialog.hxx> +#include <QrCodeGenDialog.hxx> +#include <SpellDialog.hxx> +#include <cfg.hxx> +#include <numpages.hxx> +#include <paragrph.hxx> +#include <tabstpge.hxx> +#include <textattr.hxx> +#include <backgrnd.hxx> +#include <border.hxx> +#include <chardlg.hxx> +#include <page.hxx> +#include <postdlg.hxx> +#include <grfpage.hxx> +#include <scriptdlg.hxx> +#include <cfgutil.hxx> +#include <macropg.hxx> +#include <sdrcelldlg.hxx> +#include <newtabledlg.hxx> +#include <macroass.hxx> +#include <insrc.hxx> +#include <passwdomdlg.hxx> +#include <screenshotannotationdlg.hxx> +#include <hyphen.hxx> +#include <thesdlg.hxx> +#include <tipofthedaydlg.hxx> +#include <DiagramDialog.hxx> + +using namespace ::com::sun::star; +using namespace ::com::sun::star::frame; +using namespace ::com::sun::star::container; + +using ::com::sun::star::uno::Reference; + +using namespace svx; +// AbstractTabDialog implementations just forwards everything to the dialog + +short CuiAbstractController_Impl::Execute() +{ + return m_xDlg->run(); +} + +short CuiAbstractSingleTabController_Impl::Execute() +{ + return m_xDlg->run(); +} + +short AbstractSvxDistributeDialog_Impl::Execute() +{ + return m_xDlg->run(); +} + +short AbstractHangulHanjaConversionDialog_Impl::Execute() +{ + return m_xDlg->run(); +} + +short AbstractFmShowColsDialog_Impl::Execute() +{ + return m_xDlg->run(); +} + +short AbstractHyphenWordDialog_Impl::Execute() +{ + return m_xDlg->run(); +} + +short AbstractThesaurusDialog_Impl::Execute() +{ + return m_xDlg->run(); +} + +bool AbstractThesaurusDialog_Impl::StartExecuteAsync(AsyncContext &rCtx) +{ + return SfxDialogController::runAsync(m_xDlg, rCtx.maEndDialogFn); +} + +short AbstractSvxZoomDialog_Impl::Execute() +{ + return m_xDlg->run(); +} + +short AbstractTitleDialog_Impl::Execute() +{ + return m_xDlg->run(); +} + +short AbstractScriptSelectorDialog_Impl::Execute() +{ + return m_xDlg->run(); +} + +short AbstractGalleryIdDialog_Impl::Execute() +{ + return m_xDlg->run(); +} + +short AbstractURLDlg_Impl::Execute() +{ + return m_xDlg->run(); +} + +short AbstractSvxSearchSimilarityDialog_Impl::Execute() +{ + return m_xDlg->run(); +} + +short AbstractSvxTransformTabDialog_Impl::Execute() +{ + return m_xDlg->run(); +} + +bool AbstractSvxTransformTabDialog_Impl::StartExecuteAsync(AsyncContext &rCtx) +{ + return SfxTabDialogController::runAsync(m_xDlg, rCtx.maEndDialogFn); +} + +short AbstractSvxCaptionDialog_Impl::Execute() +{ + return m_xDlg->run(); +} + +bool AbstractSvxCaptionDialog_Impl::StartExecuteAsync(AsyncContext &rCtx) +{ + return SfxTabDialogController::runAsync(m_xDlg, rCtx.maEndDialogFn); +} + +short AbstractSvxJSearchOptionsDialog_Impl::Execute() +{ + return m_xDlg->run(); +} + +short AbstractFmInputRecordNoDialog_Impl::Execute() +{ + return m_xDlg->run(); +} + +short AbstractSvxNewDictionaryDialog_Impl::Execute() +{ + return m_xDlg->run(); +} + +short AbstractSvxNameDialog_Impl::Execute() +{ + return m_xDlg->run(); +} + +// #i68101# +short AbstractSvxObjectNameDialog_Impl::Execute() +{ + return m_xDlg->run(); +} + +short AbstractSvxObjectTitleDescDialog_Impl::Execute() +{ + return m_xDlg->run(); +} + +short AbstractSvxMultiPathDialog_Impl::Execute() +{ + return m_xDlg->run(); +} + +short AbstractSvxPathSelectDialog_Impl::Execute() +{ + return m_xDlg->run(); +} + +short AbstractSvxHpLinkDlg_Impl::Execute() +{ + return m_xDlg->run(); +} + +short AbstractFmSearchDialog_Impl::Execute() +{ + return m_xDlg->run(); +} + +short AbstractGraphicFilterDialog_Impl::Execute() +{ + return m_xDlg->run(); +} + +short AbstractSvxAreaTabDialog_Impl::Execute() +{ + return m_xDlg->run(); +} + +bool AbstractSvxAreaTabDialog_Impl::StartExecuteAsync(AsyncContext &rCtx) +{ + return SfxTabDialogController::runAsync(m_xDlg, rCtx.maEndDialogFn); +} + +short AbstractPasteDialog_Impl::Execute() +{ + return m_xDlg->run(); +} + +bool AbstractPasteDialog_Impl::StartExecuteAsync(AsyncContext &rCtx) +{ + return SfxDialogController::runAsync(m_xDlg, rCtx.maEndDialogFn); +} + +short AbstractInsertObjectDialog_Impl::Execute() +{ + return m_xDlg->run(); +} + +short AbstractLinksDialog_Impl::Execute() +{ + return m_xDlg->run(); +} + +short AbstractSpellDialog_Impl::Execute() +{ + return m_xDlg->run(); +} + +bool AbstractSpellDialog_Impl::StartExecuteAsync(AsyncContext &rCtx) +{ + return SfxDialogController::runAsync(m_xDlg, rCtx.maEndDialogFn); +} + +short AbstractSvxPostItDialog_Impl::Execute() +{ + return m_xDlg->run(); +} + +short AbstractPasswordToOpenModifyDialog_Impl::Execute() +{ + return m_xDlg->run(); +} + +short AbstractSvxCharacterMapDialog_Impl::Execute() +{ + return m_xDlg->run(); +} + +const SfxItemSet* AbstractSvxCharacterMapDialog_Impl::GetOutputItemSet() const +{ + return m_xDlg->GetOutputItemSet(); +} + +void AbstractSvxCharacterMapDialog_Impl::SetText(const OUString& rStr) +{ + m_xDlg->set_title(rStr); +} + +short AbstractSignatureLineDialog_Impl::Execute() +{ + return m_xDlg->run(); +} + +short AbstractSignSignatureLineDialog_Impl::Execute() +{ + return m_xDlg->run(); +} + +short AbstractQrCodeGenDialog_Impl::Execute() +{ + return m_xDlg->run(); +} + +short AbstractScreenshotAnnotationDlg_Impl::Execute() +{ + return m_xDlg->run(); +} + +short CuiAbstractTabController_Impl::Execute() +{ + return m_xDlg->run(); +} + +bool CuiAbstractTabController_Impl::StartExecuteAsync(AsyncContext &rCtx) +{ + return SfxTabDialogController::runAsync(m_xDlg, rCtx.maEndDialogFn); +} + +void CuiAbstractTabController_Impl::SetCurPageId( const OString &rName ) +{ + m_xDlg->SetCurPageId( rName ); +} + +const SfxItemSet* CuiAbstractTabController_Impl::GetOutputItemSet() const +{ + return m_xDlg->GetOutputItemSet(); +} + +const sal_uInt16* CuiAbstractTabController_Impl::GetInputRanges(const SfxItemPool& pItem ) +{ + return m_xDlg->GetInputRanges( pItem ); +} + +void CuiAbstractTabController_Impl::SetInputSet( const SfxItemSet* pInSet ) +{ + m_xDlg->SetInputSet( pInSet ); +} + +//From class Window. +void CuiAbstractTabController_Impl::SetText( const OUString& rStr ) +{ + m_xDlg->set_title(rStr); +} + +std::vector<OString> CuiAbstractTabController_Impl::getAllPageUIXMLDescriptions() const +{ + return m_xDlg->getAllPageUIXMLDescriptions(); +} + +bool CuiAbstractTabController_Impl::selectPageByUIXMLDescription(const OString& rUIXMLDescription) +{ + return m_xDlg->selectPageByUIXMLDescription(rUIXMLDescription); +} + +BitmapEx CuiAbstractTabController_Impl::createScreenshot() const +{ + return m_xDlg->createScreenshot(); +} + +OString CuiAbstractTabController_Impl::GetScreenshotId() const +{ + return m_xDlg->GetScreenshotId(); +} + +const SfxItemSet* CuiAbstractSingleTabController_Impl::GetOutputItemSet() const +{ + return m_xDlg->GetOutputItemSet(); +} + +void CuiAbstractSingleTabController_Impl::SetText(const OUString& rStr) +{ + m_xDlg->set_title(rStr); +} + +SvxDistributeHorizontal AbstractSvxDistributeDialog_Impl::GetDistributeHor()const +{ + return m_xDlg->GetDistributeHor(); +} +SvxDistributeVertical AbstractSvxDistributeDialog_Impl::GetDistributeVer()const +{ + return m_xDlg->GetDistributeVer(); +} + +void AbstractHangulHanjaConversionDialog_Impl::EndDialog(sal_Int32 nResult) +{ + m_xDlg->response(nResult); +} + +void AbstractHangulHanjaConversionDialog_Impl::EnableRubySupport( bool _bVal ) +{ + m_xDlg->EnableRubySupport(_bVal); +} + +void AbstractHangulHanjaConversionDialog_Impl::SetByCharacter( bool _bByCharacter ) +{ + m_xDlg->SetByCharacter(_bByCharacter); +} + +void AbstractHangulHanjaConversionDialog_Impl::SetConversionDirectionState( bool _bTryBothDirections, editeng::HangulHanjaConversion::ConversionDirection _ePrimaryConversionDirection ) +{ + m_xDlg->SetConversionDirectionState(_bTryBothDirections, _ePrimaryConversionDirection); +} + +void AbstractHangulHanjaConversionDialog_Impl::SetConversionFormat( editeng::HangulHanjaConversion::ConversionFormat _eType ) +{ + m_xDlg->SetConversionFormat(_eType); +} + +void AbstractHangulHanjaConversionDialog_Impl::SetOptionsChangedHdl( const Link<LinkParamNone*,void>& _rHdl ) +{ + m_xDlg->SetOptionsChangedHdl(_rHdl ); +} + +void AbstractHangulHanjaConversionDialog_Impl::SetIgnoreHdl( const Link<weld::Button&,void>& _rHdl ) +{ + m_xDlg->SetIgnoreHdl(_rHdl ); +} + +void AbstractHangulHanjaConversionDialog_Impl::SetIgnoreAllHdl(const Link<weld::Button&,void>& rHdl) +{ + m_xDlg->SetIgnoreAllHdl(rHdl); +} + +void AbstractHangulHanjaConversionDialog_Impl::SetChangeHdl(const Link<weld::Button&,void>& rHdl) +{ + m_xDlg->SetChangeHdl(rHdl); +} + +void AbstractHangulHanjaConversionDialog_Impl::SetChangeAllHdl( const Link<weld::Button&,void>& rHdl ) +{ + m_xDlg->SetChangeAllHdl(rHdl); +} + +void AbstractHangulHanjaConversionDialog_Impl::SetClickByCharacterHdl( const Link<weld::ToggleButton&,void>& _rHdl ) +{ + m_xDlg->SetClickByCharacterHdl(_rHdl ); +} + +void AbstractHangulHanjaConversionDialog_Impl::SetConversionFormatChangedHdl(const Link<weld::Button&,void>& rHdl) +{ + m_xDlg->SetConversionFormatChangedHdl(rHdl); +} + +void AbstractHangulHanjaConversionDialog_Impl::SetFindHdl( const Link<weld::Button&,void>& rHdl ) +{ + m_xDlg->SetFindHdl(rHdl); +} + +bool AbstractHangulHanjaConversionDialog_Impl::GetUseBothDirections( ) const +{ + return m_xDlg->GetUseBothDirections(); +} + +editeng::HangulHanjaConversion::ConversionDirection AbstractHangulHanjaConversionDialog_Impl::GetDirection( editeng::HangulHanjaConversion::ConversionDirection _eDefaultDirection ) const +{ + return m_xDlg->GetDirection( _eDefaultDirection ); +} + +void AbstractHangulHanjaConversionDialog_Impl::SetCurrentString( + const OUString& _rNewString, + const css::uno::Sequence< OUString >& _rSuggestions, + bool _bOriginatesFromDocument + ) +{ + m_xDlg->SetCurrentString(_rNewString,_rSuggestions,_bOriginatesFromDocument); +} + +OUString AbstractHangulHanjaConversionDialog_Impl::GetCurrentString( ) const +{ + return m_xDlg->GetCurrentString(); +} + +editeng::HangulHanjaConversion::ConversionFormat AbstractHangulHanjaConversionDialog_Impl::GetConversionFormat( ) const +{ + return m_xDlg->GetConversionFormat(); +} + +void AbstractHangulHanjaConversionDialog_Impl::FocusSuggestion( ) +{ + m_xDlg->FocusSuggestion(); +} + +OUString AbstractHangulHanjaConversionDialog_Impl::GetCurrentSuggestion( ) const +{ + return m_xDlg->GetCurrentSuggestion(); +} + +OUString AbstractThesaurusDialog_Impl::GetWord() +{ + return m_xDlg->GetWord(); +}; + +Reference < css::embed::XEmbeddedObject > AbstractInsertObjectDialog_Impl::GetObject() +{ + return m_xDlg->GetObject(); +} + +bool AbstractInsertObjectDialog_Impl::IsCreateNew() +{ + return m_xDlg->IsCreateNew(); +} + +::Reference< css::io::XInputStream > AbstractInsertObjectDialog_Impl::GetIconIfIconified( OUString* pGraphicMediaType ) +{ + return m_xDlg->GetIconIfIconified( pGraphicMediaType ); +} + +void AbstractPasteDialog_Impl::Insert(SotClipboardFormatId nFormat, const OUString& rFormatName) +{ + m_xDlg->Insert(nFormat, rFormatName); +} + +void AbstractPasteDialog_Impl::InsertUno(const OUString& sCmd, const OUString& sLabel) +{ + m_xDlg->InsertUno(sCmd, sLabel); +} + +void AbstractPasteDialog_Impl::SetObjName(const SvGlobalName & rClass, const OUString& rObjName) +{ + m_xDlg->SetObjName(rClass, rObjName); +} + +void AbstractPasteDialog_Impl::PreGetFormat( const TransferableDataHelper& aHelper ) +{ + m_xDlg->PreGetFormat(aHelper); +} + +SotClipboardFormatId AbstractPasteDialog_Impl::GetFormatOnly() +{ + return m_xDlg->GetFormatOnly(); +} + +SotClipboardFormatId AbstractPasteDialog_Impl::GetFormat( const TransferableDataHelper& aHelper ) +{ + return m_xDlg->GetFormat(aHelper); +} + +void AbstractFmShowColsDialog_Impl::SetColumns(const ::Reference< css::container::XIndexContainer>& xCols) +{ + m_xDlg->SetColumns(xCols); +} + +void AbstractSvxZoomDialog_Impl::SetLimits( sal_uInt16 nMin, sal_uInt16 nMax ) +{ + m_xDlg->SetLimits( nMin, nMax ); +} + +void AbstractSvxZoomDialog_Impl::HideButton( ZoomButtonId nBtnId ) +{ + m_xDlg->HideButton( nBtnId ); +} + +const SfxItemSet* AbstractSvxZoomDialog_Impl::GetOutputItemSet() const +{ + return m_xDlg->GetOutputItemSet(); +} + +void AbstractSpellDialog_Impl::InvalidateDialog() +{ + m_xDlg->InvalidateDialog(); +} + +std::shared_ptr<SfxDialogController> AbstractSpellDialog_Impl::GetController() +{ + return m_xDlg; +} + +SfxBindings& AbstractSpellDialog_Impl::GetBindings() +{ + return m_xDlg->GetBindings(); +} + +OUString AbstractTitleDialog_Impl::GetTitle() const +{ + return m_xDlg->GetTitle(); +} + +sal_uInt32 AbstractGalleryIdDialog_Impl::GetId() const +{ + return m_xDlg->GetId(); +} + +OUString AbstractURLDlg_Impl::GetURL() const +{ + return m_xDlg->GetURL(); +} + +OUString AbstractURLDlg_Impl::GetAltText() const +{ + return m_xDlg->GetAltText(); +} + +OUString AbstractURLDlg_Impl::GetDesc() const +{ + return m_xDlg->GetDesc(); +} + +OUString AbstractURLDlg_Impl::GetTarget() const +{ + return m_xDlg->GetTarget(); +} + +OUString AbstractURLDlg_Impl::GetName() const +{ + return m_xDlg->GetName(); +} + +sal_uInt16 AbstractSvxSearchSimilarityDialog_Impl::GetOther() +{ + return m_xDlg->GetOther(); +} + +sal_uInt16 AbstractSvxSearchSimilarityDialog_Impl::GetShorter() +{ + return m_xDlg->GetShorter(); +} + +sal_uInt16 AbstractSvxSearchSimilarityDialog_Impl::GetLonger() +{ + return m_xDlg->GetLonger(); +} + +bool AbstractSvxSearchSimilarityDialog_Impl::IsRelaxed() +{ + return m_xDlg->IsRelaxed(); +} + +// AbstractSvxTransformTabDialog implementations just forwards everything to the dialog +void AbstractSvxTransformTabDialog_Impl::SetCurPageId( const OString& rName ) +{ + m_xDlg->SetCurPageId( rName ); +} + +const SfxItemSet* AbstractSvxTransformTabDialog_Impl::GetOutputItemSet() const +{ + return m_xDlg->GetOutputItemSet(); +} + +const sal_uInt16* AbstractSvxTransformTabDialog_Impl::GetInputRanges(const SfxItemPool& pItem ) +{ + return m_xDlg->GetInputRanges( pItem ); +} + +void AbstractSvxTransformTabDialog_Impl::SetInputSet( const SfxItemSet* pInSet ) +{ + m_xDlg->SetInputSet( pInSet ); +} + +//From class Window. +void AbstractSvxTransformTabDialog_Impl::SetText( const OUString& rStr ) +{ + m_xDlg->set_title(rStr); +} + +void AbstractSvxTransformTabDialog_Impl::SetValidateFramePosLink( const Link<SvxSwFrameValidation&,void>& rLink ) +{ + m_xDlg->SetValidateFramePosLink( rLink ); +} + +// AbstractSvxCaptionDialog implementations just forwards everything to the dialog +void AbstractSvxCaptionDialog_Impl::SetCurPageId( const OString& rName ) +{ + m_xDlg->SetCurPageId(rName); +} + +const SfxItemSet* AbstractSvxCaptionDialog_Impl::GetOutputItemSet() const +{ + return m_xDlg->GetOutputItemSet(); +} + +const sal_uInt16* AbstractSvxCaptionDialog_Impl::GetInputRanges(const SfxItemPool& pItem ) +{ + return m_xDlg->GetInputRanges( pItem ); +} + +void AbstractSvxCaptionDialog_Impl::SetInputSet( const SfxItemSet* pInSet ) +{ + m_xDlg->SetInputSet( pInSet ); +} + +void AbstractSvxCaptionDialog_Impl::SetText( const OUString& rStr ) +{ + m_xDlg->set_title(rStr); +} + +void AbstractSvxCaptionDialog_Impl::SetValidateFramePosLink( const Link<SvxSwFrameValidation&,void>& rLink ) +{ + m_xDlg->SetValidateFramePosLink( rLink ); +} + +TransliterationFlags AbstractSvxJSearchOptionsDialog_Impl::GetTransliterationFlags() const +{ + return m_xDlg->GetTransliterationFlags(); +} + +void AbstractFmInputRecordNoDialog_Impl::SetValue(long nNew) +{ + m_xDlg->SetValue(nNew); +} + +long AbstractFmInputRecordNoDialog_Impl::GetValue() const +{ + return m_xDlg->GetValue(); +} + +::Reference< css::linguistic2::XDictionary > AbstractSvxNewDictionaryDialog_Impl::GetNewDictionary() +{ + return m_xDlg->GetNewDictionary(); +} + +void AbstractSvxNameDialog_Impl::GetName(OUString& rName) +{ + rName = m_xDlg->GetName(); +} + +void AbstractSvxNameDialog_Impl::SetCheckNameHdl( const Link<AbstractSvxNameDialog&,bool>& rLink, bool bCheckImmediately ) +{ + aCheckNameHdl = rLink; + if( rLink.IsSet() ) + m_xDlg->SetCheckNameHdl( LINK(this, AbstractSvxNameDialog_Impl, CheckNameHdl), bCheckImmediately ); + else + m_xDlg->SetCheckNameHdl( Link<SvxNameDialog&,bool>(), bCheckImmediately ); +} + +void AbstractSvxNameDialog_Impl::SetCheckNameTooltipHdl( const Link<AbstractSvxNameDialog&,OUString>& rLink) +{ + aCheckNameTooltipHdl = rLink; + if( rLink.IsSet() ) + m_xDlg->SetCheckNameTooltipHdl( LINK(this, AbstractSvxNameDialog_Impl, CheckNameTooltipHdl)); + else + m_xDlg->SetCheckNameTooltipHdl( Link<SvxNameDialog&,OUString>()); +} + +void AbstractSvxNameDialog_Impl::SetEditHelpId(const OString& rHelpId) +{ + m_xDlg->SetEditHelpId(rHelpId); +} + +void AbstractSvxNameDialog_Impl::SetHelpId(const OString& rHelpId) +{ + m_xDlg->set_help_id(rHelpId); +} + +void AbstractSvxNameDialog_Impl::SetText( const OUString& rStr ) +{ + m_xDlg->set_title(rStr); +} + +IMPL_LINK_NOARG(AbstractSvxNameDialog_Impl, CheckNameHdl, SvxNameDialog&, bool) +{ + return aCheckNameHdl.Call(*this); +} + +IMPL_LINK_NOARG(AbstractSvxNameDialog_Impl, CheckNameTooltipHdl, SvxNameDialog&, OUString) +{ + return aCheckNameTooltipHdl.Call(*this); +} + +void AbstractSvxObjectNameDialog_Impl::GetName(OUString& rName) +{ + rName = m_xDlg->GetName(); +} + +void AbstractSvxObjectNameDialog_Impl::SetCheckNameHdl(const Link<AbstractSvxObjectNameDialog&,bool>& rLink) +{ + aCheckNameHdl = rLink; + + if(rLink.IsSet()) + { + m_xDlg->SetCheckNameHdl(LINK(this, AbstractSvxObjectNameDialog_Impl, CheckNameHdl)); + } + else + { + m_xDlg->SetCheckNameHdl(Link<SvxObjectNameDialog&,bool>()); + } +} + +IMPL_LINK_NOARG(AbstractSvxObjectNameDialog_Impl, CheckNameHdl, SvxObjectNameDialog&, bool) +{ + return aCheckNameHdl.Call(*this); +} + +void AbstractSvxObjectTitleDescDialog_Impl::GetTitle(OUString& rTitle) +{ + rTitle = m_xDlg->GetTitle(); +} + +void AbstractSvxObjectTitleDescDialog_Impl::GetDescription(OUString& rDescription) +{ + rDescription = m_xDlg->GetDescription(); +} + +OUString AbstractSvxMultiPathDialog_Impl::GetPath() const +{ + return m_xDlg->GetPath(); +} + +void AbstractSvxMultiPathDialog_Impl::SetPath( const OUString& rPath ) +{ + m_xDlg->SetPath( rPath ); +} + +void AbstractSvxMultiPathDialog_Impl::SetTitle( const OUString& rNewTitle ) +{ + m_xDlg->SetTitle(rNewTitle); +} + +OUString AbstractSvxPathSelectDialog_Impl::GetPath() const +{ + return m_xDlg->GetPath(); +} + +void AbstractSvxPathSelectDialog_Impl::SetPath( const OUString& rPath ) +{ + m_xDlg->SetPath( rPath ); +} + +void AbstractSvxPathSelectDialog_Impl::SetTitle( const OUString& rNewTitle ) +{ + m_xDlg->SetTitle(rNewTitle); +} + +std::shared_ptr<SfxDialogController> AbstractSvxHpLinkDlg_Impl::GetController() +{ + return m_xDlg; +} + +bool AbstractSvxHpLinkDlg_Impl::QueryClose() +{ + return m_xDlg->QueryClose(); +} + +void AbstractFmSearchDialog_Impl::SetFoundHandler(const Link<FmFoundRecordInformation&,void>& lnk) +{ + m_xDlg->SetFoundHandler(lnk); +} + +void AbstractFmSearchDialog_Impl::SetCanceledNotFoundHdl(const Link<FmFoundRecordInformation&,void>& lnk) +{ + m_xDlg->SetCanceledNotFoundHdl(lnk); +} + +void AbstractFmSearchDialog_Impl::SetActiveField(const OUString& strField) +{ + m_xDlg->SetActiveField(strField); +} + +Graphic AbstractGraphicFilterDialog_Impl::GetFilteredGraphic(const Graphic& rGraphic, double fScaleX, double fScaleY) +{ + return m_xDlg->GetFilteredGraphic(rGraphic, fScaleX, fScaleY); +} + +// AbstractSvxAreaTabDialog implementations just forwards everything to the dialog +void AbstractSvxAreaTabDialog_Impl::SetCurPageId( const OString& rName ) +{ + m_xDlg->SetCurPageId( rName ); +} + +const SfxItemSet* AbstractSvxAreaTabDialog_Impl::GetOutputItemSet() const +{ + return m_xDlg->GetOutputItemSet(); +} + +const sal_uInt16* AbstractSvxAreaTabDialog_Impl::GetInputRanges(const SfxItemPool& pItem ) +{ + return m_xDlg->GetInputRanges( pItem ); +} + +void AbstractSvxAreaTabDialog_Impl::SetInputSet( const SfxItemSet* pInSet ) +{ + m_xDlg->SetInputSet( pInSet ); +} + +void AbstractSvxAreaTabDialog_Impl::SetText( const OUString& rStr ) +{ + m_xDlg->set_title(rStr); +} + +void AbstractSvxPostItDialog_Impl::SetText( const OUString& rStr ) +{ + m_xDlg->set_title(rStr); +} + +const SfxItemSet* AbstractSvxPostItDialog_Impl::GetOutputItemSet() const +{ + return m_xDlg->GetOutputItemSet(); +} + +void AbstractSvxPostItDialog_Impl::EnableTravel(bool bNext, bool bPrev) +{ + m_xDlg->EnableTravel( bNext, bPrev ); +} + +OUString AbstractSvxPostItDialog_Impl::GetNote() +{ + return m_xDlg->GetNote(); +} + +void AbstractSvxPostItDialog_Impl::SetNote(const OUString& rTxt) +{ + m_xDlg->SetNote( rTxt ); +} + +void AbstractSvxPostItDialog_Impl::ShowLastAuthor(const OUString& rAuthor, const OUString& rDate) +{ + m_xDlg->ShowLastAuthor( rAuthor, rDate ); +} + +void AbstractSvxPostItDialog_Impl::DontChangeAuthor() +{ + m_xDlg->DontChangeAuthor(); +} + +void AbstractSvxPostItDialog_Impl::HideAuthor() +{ + m_xDlg->HideAuthor(); +} + +void AbstractSvxPostItDialog_Impl::SetNextHdl( const Link<AbstractSvxPostItDialog&,void>& rLink ) +{ + aNextHdl = rLink; + if( rLink.IsSet() ) + m_xDlg->SetNextHdl( LINK(this, AbstractSvxPostItDialog_Impl, NextHdl ) ); + else + m_xDlg->SetNextHdl( Link<SvxPostItDialog&,void>() ); +} + +void AbstractSvxPostItDialog_Impl::SetPrevHdl( const Link<AbstractSvxPostItDialog&,void>& rLink ) +{ + aPrevHdl = rLink; + if( rLink.IsSet() ) + m_xDlg->SetPrevHdl( LINK(this, AbstractSvxPostItDialog_Impl, PrevHdl ) ); + else + m_xDlg->SetPrevHdl( Link<SvxPostItDialog&,void>() ); +} + +IMPL_LINK_NOARG(AbstractSvxPostItDialog_Impl, NextHdl, SvxPostItDialog&, void) +{ + aNextHdl.Call(*this); +} + +IMPL_LINK_NOARG(AbstractSvxPostItDialog_Impl, PrevHdl, SvxPostItDialog&, void) +{ + aPrevHdl.Call(*this); +} + +std::shared_ptr<weld::Dialog> AbstractSvxPostItDialog_Impl::GetDialog() +{ + return m_xDlg->GetDialog(); +} + +OUString AbstractPasswordToOpenModifyDialog_Impl::GetPasswordToOpen() const +{ + return m_xDlg->GetPasswordToOpen(); +} + +OUString AbstractPasswordToOpenModifyDialog_Impl::GetPasswordToModify() const +{ + return m_xDlg->GetPasswordToModify(); +} + +bool AbstractPasswordToOpenModifyDialog_Impl::IsRecommendToOpenReadonly() const +{ + return m_xDlg->IsRecommendToOpenReadonly(); +} + +// Create dialogs with simplest interface +VclPtr<VclAbstractDialog> AbstractDialogFactory_Impl::CreateVclDialog(weld::Window* pParent, sal_uInt32 nResId) +{ + std::unique_ptr<OfaTreeOptionsDialog> xDlg; + switch ( nResId ) + { + case SID_OPTIONS_TREEDIALOG : + case SID_OPTIONS_DATABASES : + case SID_LANGUAGE_OPTIONS : + { + bool bActivateLastSelection = false; + if (nResId == SID_OPTIONS_TREEDIALOG) + bActivateLastSelection = true; + Reference< frame::XFrame > xFrame; + xDlg = std::make_unique<OfaTreeOptionsDialog>(pParent, xFrame, bActivateLastSelection); + if (nResId == SID_OPTIONS_DATABASES) + { + xDlg->ActivatePage(SID_SB_DBREGISTEROPTIONS); + } + else if (nResId == SID_LANGUAGE_OPTIONS) + { + //open the tab page "tools/options/languages" + xDlg->ActivatePage(OFA_TP_LANGUAGES_FOR_SET_DOCUMENT_LANGUAGE); + } + } + break; + default: + break; + } + + if (xDlg) + return VclPtr<CuiAbstractController_Impl>::Create(std::move(xDlg)); + return nullptr; +} + +VclPtr<VclAbstractDialog> AbstractDialogFactory_Impl::CreateFrameDialog(weld::Window* pParent, const Reference< frame::XFrame >& rxFrame, + sal_uInt32 nResId, const OUString& rParameter ) +{ + std::unique_ptr<OfaTreeOptionsDialog> xDlg; + if (SID_OPTIONS_TREEDIALOG == nResId || SID_OPTIONS_DATABASES == nResId) + { + // only activate last page if we don't want to activate a special page + bool bActivateLastSelection = ( nResId != SID_OPTIONS_DATABASES && rParameter.isEmpty() ); + xDlg = std::make_unique<OfaTreeOptionsDialog>(pParent, rxFrame, bActivateLastSelection); + if ( nResId == SID_OPTIONS_DATABASES ) + xDlg->ActivatePage(SID_SB_DBREGISTEROPTIONS); + else if ( !rParameter.isEmpty() ) + xDlg->ActivatePage( rParameter ); + } + + if (xDlg) + return VclPtr<CuiAbstractController_Impl>::Create(std::move(xDlg)); + return nullptr; +} + +// TabDialog outside the drawing layer +VclPtr<SfxAbstractTabDialog> AbstractDialogFactory_Impl::CreateAutoCorrTabDialog(weld::Window* pParent, const SfxItemSet* pAttrSet) +{ + return VclPtr<CuiAbstractTabController_Impl>::Create(std::make_shared<OfaAutoCorrDlg>(pParent, pAttrSet)); +} + +VclPtr<SfxAbstractTabDialog> AbstractDialogFactory_Impl::CreateCustomizeTabDialog(weld::Window* pParent, + const SfxItemSet* pAttrSet, + const Reference< frame::XFrame >& xViewFrame ) +{ + auto xDlg1 = std::make_shared<SvxConfigDialog>(pParent, pAttrSet); + xDlg1->SetFrame(xViewFrame); + return VclPtr<CuiAbstractTabController_Impl>::Create(std::move(xDlg1)); +} + +// TabDialog that use functionality of the drawing layer +VclPtr<SfxAbstractTabDialog> AbstractDialogFactory_Impl::CreateTextTabDialog(weld::Window* pParent, + const SfxItemSet* pAttrSet, + SdrView* pView) +{ + return VclPtr<CuiAbstractTabController_Impl>::Create(std::make_shared<SvxTextTabDialog>(pParent, pAttrSet, pView)); +} + +// TabDialog that use functionality of the drawing layer and add AnchorTypes -- for SvxCaptionTabDialog +VclPtr<AbstractSvxCaptionDialog> AbstractDialogFactory_Impl::CreateCaptionDialog(weld::Window* pParent, + const SdrView* pView, + SvxAnchorIds nAnchorTypes) +{ + return VclPtr<AbstractSvxCaptionDialog_Impl>::Create(std::make_shared<SvxCaptionTabDialog>(pParent, pView, nAnchorTypes)); +} + +VclPtr<AbstractSvxDistributeDialog> AbstractDialogFactory_Impl::CreateSvxDistributeDialog(weld::Window* pParent, + const SfxItemSet& rAttr) +{ + return VclPtr<AbstractSvxDistributeDialog_Impl>::Create(std::make_unique<SvxDistributeDialog>(pParent, rAttr, SvxDistributeHorizontal::NONE, SvxDistributeVertical::NONE)); +} + +VclPtr<AbstractHangulHanjaConversionDialog> AbstractDialogFactory_Impl::CreateHangulHanjaConversionDialog(weld::Window* pParent) +{ + return VclPtr<AbstractHangulHanjaConversionDialog_Impl>::Create(std::make_unique<HangulHanjaConversionDialog>(pParent)); +} + +VclPtr<AbstractThesaurusDialog> AbstractDialogFactory_Impl::CreateThesaurusDialog(weld::Window* pParent, + css::uno::Reference<css::linguistic2::XThesaurus> xThesaurus, + const OUString &rWord, LanguageType nLanguage) +{ + return VclPtr<AbstractThesaurusDialog_Impl>::Create(std::make_shared<SvxThesaurusDialog>(pParent, xThesaurus, rWord, nLanguage)); +} + +VclPtr<AbstractHyphenWordDialog> AbstractDialogFactory_Impl::CreateHyphenWordDialog(weld::Window* pParent, + const OUString &rWord, LanguageType nLang, + css::uno::Reference< css::linguistic2::XHyphenator > &xHyphen, + SvxSpellWrapper* pWrapper) +{ + return VclPtr<AbstractHyphenWordDialog_Impl>::Create(std::make_unique<SvxHyphenWordDialog>(rWord, nLang, pParent, xHyphen, pWrapper)); +} + +VclPtr<AbstractFmShowColsDialog> AbstractDialogFactory_Impl::CreateFmShowColsDialog(weld::Window* pParent) +{ + return VclPtr<AbstractFmShowColsDialog_Impl>::Create(std::make_unique<FmShowColsDialog>(pParent)); +} + +VclPtr<AbstractSvxZoomDialog> AbstractDialogFactory_Impl::CreateSvxZoomDialog(weld::Window* pParent, const SfxItemSet& rCoreSet) +{ + return VclPtr<AbstractSvxZoomDialog_Impl>::Create(std::make_unique<SvxZoomDialog>(pParent, rCoreSet)); +} + +VclPtr<AbstractSpellDialog> AbstractDialogFactory_Impl::CreateSvxSpellDialog( + weld::Window* pParent, + SfxBindings* pBindings, + svx::SpellDialogChildWindow* pSpellChildWindow) +{ + return VclPtr<AbstractSpellDialog_Impl>::Create(std::make_shared<svx::SpellDialog>(pSpellChildWindow, pParent, pBindings)); +} + +VclPtr<VclAbstractDialog> AbstractDialogFactory_Impl::CreateActualizeProgressDialog(weld::Widget* pParent, + GalleryTheme* pThm) +{ + return VclPtr<CuiAbstractController_Impl>::Create(std::make_unique<ActualizeProgress>(pParent, pThm)); +} + +VclPtr<VclAbstractDialog> AbstractDialogFactory_Impl::CreateScriptErrorDialog(const css::uno::Any& rException) +{ + return VclPtr<SvxScriptErrorDialog>::Create(rException); +} + +VclPtr<AbstractScriptSelectorDialog> AbstractDialogFactory_Impl::CreateScriptSelectorDialog(weld::Window* pParent, + const Reference<frame::XFrame>& rxFrame) +{ + return VclPtr<AbstractScriptSelectorDialog_Impl>::Create(std::make_unique<SvxScriptSelectorDialog>(pParent, rxFrame)); +} + +OUString AbstractScriptSelectorDialog_Impl::GetScriptURL() const +{ + return m_xDlg->GetScriptURL(); +} + +void AbstractScriptSelectorDialog_Impl::SetRunLabel() +{ + m_xDlg->SetRunLabel(); +} + +VclPtr<VclAbstractDialog> AbstractDialogFactory_Impl::CreateSvxScriptOrgDialog(weld::Window* pParent, + const OUString& rLanguage) +{ + return VclPtr<CuiAbstractController_Impl>::Create(std::make_unique<SvxScriptOrgDialog>(pParent, rLanguage)); +} + +VclPtr<AbstractTitleDialog> AbstractDialogFactory_Impl::CreateTitleDialog(weld::Widget* pParent, + const OUString& rOldText) +{ + return VclPtr<AbstractTitleDialog_Impl>::Create(std::make_unique<TitleDialog>(pParent, rOldText)); +} + +VclPtr<AbstractGalleryIdDialog> AbstractDialogFactory_Impl::CreateGalleryIdDialog(weld::Widget* pParent, + GalleryTheme* pThm) +{ + return VclPtr<AbstractGalleryIdDialog_Impl>::Create(std::make_unique<GalleryIdDialog>(pParent, pThm)); +} + +VclPtr<VclAbstractDialog> AbstractDialogFactory_Impl::CreateGalleryThemePropertiesDialog(weld::Widget* pParent, + ExchangeData* pData, + SfxItemSet* pItemSet) +{ + return VclPtr<CuiAbstractTabController_Impl>::Create(std::make_shared<GalleryThemeProperties>( + pParent, pData, pItemSet)); +} + +VclPtr<AbstractURLDlg> AbstractDialogFactory_Impl::CreateURLDialog(weld::Widget* pParent, + const OUString& rURL, const OUString& rAltText, const OUString& rDescription, + const OUString& rTarget, const OUString& rName, + TargetList& rTargetList ) +{ + return VclPtr<AbstractURLDlg_Impl>::Create(std::make_unique<URLDlg>(pParent, rURL, rAltText, rDescription, + rTarget, rName, rTargetList)); + +} + +VclPtr<SfxAbstractTabDialog> AbstractDialogFactory_Impl::CreateTabItemDialog(weld::Window* pParent, + const SfxItemSet& rSet) +{ + return VclPtr<CuiAbstractTabController_Impl>::Create(std::make_shared<SvxSearchFormatDialog>( + pParent, rSet)); +} + +VclPtr<VclAbstractDialog> AbstractDialogFactory_Impl::CreateSvxSearchAttributeDialog(weld::Window* pParent, + SearchAttrItemList& rLst, + const sal_uInt16* pWhRanges ) +{ + return VclPtr<CuiAbstractController_Impl>::Create(std::make_unique<SvxSearchAttributeDialog>(pParent, rLst, pWhRanges)); +} + +VclPtr<AbstractSvxSearchSimilarityDialog> AbstractDialogFactory_Impl::CreateSvxSearchSimilarityDialog(weld::Window* pParent, + bool bRelax, + sal_uInt16 nOther, + sal_uInt16 nShorter, + sal_uInt16 nLonger) +{ + return VclPtr<AbstractSvxSearchSimilarityDialog_Impl>::Create(std::make_unique<SvxSearchSimilarityDialog>(pParent, bRelax, nOther, nShorter, nLonger)); +} + +VclPtr<SfxAbstractTabDialog> AbstractDialogFactory_Impl::CreateSvxBorderBackgroundDlg( + weld::Window* pParent, + const SfxItemSet& rCoreSet, + bool bEnableDrawingLayerFillStyles) +{ + return VclPtr<CuiAbstractTabController_Impl>::Create(std::make_shared<SvxBorderBackgroundDlg>( + pParent, + rCoreSet, + /*bEnableSelector*/true, + bEnableDrawingLayerFillStyles)); +} + +VclPtr<AbstractSvxTransformTabDialog> AbstractDialogFactory_Impl::CreateSvxTransformTabDialog(weld::Window* pParent, + const SfxItemSet* pAttr, + const SdrView* pView, + SvxAnchorIds nAnchorTypes) +{ + return VclPtr<AbstractSvxTransformTabDialog_Impl>::Create(std::make_shared<SvxTransformTabDialog>(pParent, pAttr,pView, nAnchorTypes)); +} + +VclPtr<SfxAbstractTabDialog> AbstractDialogFactory_Impl::CreateSchTransformTabDialog(weld::Window* pParent, + const SfxItemSet* pAttr, + const SdrView* pSdrView, + bool bSizeTabPage) +{ + auto pDlg = std::make_shared<SvxTransformTabDialog>(pParent, pAttr, pSdrView, + bSizeTabPage ? SvxAnchorIds::NoProtect : SvxAnchorIds::NoProtect|SvxAnchorIds::NoResize); + pDlg->RemoveTabPage( "RID_SVXPAGE_ANGLE" ); + pDlg->RemoveTabPage( "RID_SVXPAGE_SLANT" ); + return VclPtr<CuiAbstractTabController_Impl>::Create(std::move(pDlg)); +} + +VclPtr<AbstractSvxJSearchOptionsDialog> AbstractDialogFactory_Impl::CreateSvxJSearchOptionsDialog(weld::Window* pParent, + const SfxItemSet& rOptionsSet, + TransliterationFlags nInitialFlags) +{ + return VclPtr<AbstractSvxJSearchOptionsDialog_Impl>::Create(std::make_unique<SvxJSearchOptionsDialog>(pParent, rOptionsSet, nInitialFlags)); +} + +VclPtr<AbstractFmInputRecordNoDialog> AbstractDialogFactory_Impl::CreateFmInputRecordNoDialog(weld::Window* pParent) +{ + return VclPtr<AbstractFmInputRecordNoDialog_Impl>::Create(std::make_unique<FmInputRecordNoDialog>(pParent)); +} + +VclPtr<AbstractSvxNewDictionaryDialog> AbstractDialogFactory_Impl::CreateSvxNewDictionaryDialog(weld::Window* pParent) +{ + return VclPtr<AbstractSvxNewDictionaryDialog_Impl>::Create(std::make_unique<SvxNewDictionaryDialog>(pParent)); +} + +VclPtr<VclAbstractDialog> AbstractDialogFactory_Impl::CreateSvxEditDictionaryDialog(weld::Window* pParent, const OUString& rName) +{ + return VclPtr<CuiAbstractController_Impl>::Create(std::make_unique<SvxEditDictionaryDialog>(pParent, rName)); +} + +VclPtr<AbstractSvxNameDialog> AbstractDialogFactory_Impl::CreateSvxNameDialog(weld::Window* pParent, + const OUString& rName, const OUString& rDesc) +{ + return VclPtr<AbstractSvxNameDialog_Impl>::Create(std::make_unique<SvxNameDialog>(pParent, rName, rDesc)); +} + +VclPtr<AbstractSvxObjectNameDialog> AbstractDialogFactory_Impl::CreateSvxObjectNameDialog(weld::Window* pParent, const OUString& rName) +{ + return VclPtr<AbstractSvxObjectNameDialog_Impl>::Create(std::make_unique<SvxObjectNameDialog>(pParent, rName)); +} + +VclPtr<AbstractSvxObjectTitleDescDialog> AbstractDialogFactory_Impl::CreateSvxObjectTitleDescDialog(weld::Window* pParent, const OUString& rTitle, const OUString& rDescription) +{ + return VclPtr<AbstractSvxObjectTitleDescDialog_Impl>::Create(std::make_unique<SvxObjectTitleDescDialog>(pParent, rTitle, rDescription)); +} + +VclPtr<AbstractSvxMultiPathDialog> AbstractDialogFactory_Impl::CreateSvxMultiPathDialog(weld::Window* pParent) +{ + return VclPtr<AbstractSvxMultiPathDialog_Impl>::Create(std::make_unique<SvxMultiPathDialog>(pParent)); +} + +VclPtr<AbstractSvxMultiPathDialog> AbstractDialogFactory_Impl::CreateSvxPathSelectDialog(weld::Window* pParent) +{ + return VclPtr<AbstractSvxPathSelectDialog_Impl>::Create(std::make_unique<SvxPathSelectDialog>(pParent)); +} + +VclPtr<AbstractSvxHpLinkDlg> AbstractDialogFactory_Impl::CreateSvxHpLinkDlg(SfxChildWindow* pChild, SfxBindings* pBindings, weld::Window* pParent) +{ + return VclPtr<AbstractSvxHpLinkDlg_Impl>::Create(std::make_shared<SvxHpLinkDlg>(pBindings, pChild, pParent)); +} + +VclPtr<AbstractFmSearchDialog> AbstractDialogFactory_Impl::CreateFmSearchDialog(weld::Window* pParent, + const OUString& strInitialText, + const std::vector< OUString >& _rContexts, + sal_Int16 nInitialContext, + const Link<FmSearchContext&,sal_uInt32>& lnkContextSupplier) +{ + return VclPtr<AbstractFmSearchDialog_Impl>::Create(std::make_unique<FmSearchDialog>(pParent, + strInitialText, _rContexts, nInitialContext, lnkContextSupplier)); + +} + +VclPtr<AbstractGraphicFilterDialog> AbstractDialogFactory_Impl::CreateGraphicFilterEmboss(weld::Window* pParent, + const Graphic& rGraphic) +{ + return VclPtr<AbstractGraphicFilterDialog_Impl>::Create(std::make_unique<GraphicFilterEmboss>(pParent, rGraphic, RectPoint::MM)); +} + +VclPtr<AbstractGraphicFilterDialog> AbstractDialogFactory_Impl::CreateGraphicFilterPoster(weld::Window* pParent, + const Graphic& rGraphic) +{ + return VclPtr<AbstractGraphicFilterDialog_Impl>::Create(std::make_unique<GraphicFilterPoster>(pParent, rGraphic, 16)); +} + +VclPtr<AbstractGraphicFilterDialog> AbstractDialogFactory_Impl::CreateGraphicFilterSepia(weld::Window* pParent, + const Graphic& rGraphic) +{ + return VclPtr<AbstractGraphicFilterDialog_Impl>::Create(std::make_unique<GraphicFilterSepia>(pParent, rGraphic, 10)); +} + +VclPtr<AbstractGraphicFilterDialog> AbstractDialogFactory_Impl::CreateGraphicFilterSmooth(weld::Window* pParent, + const Graphic& rGraphic, double nRadius) +{ + return VclPtr<AbstractGraphicFilterDialog_Impl>::Create(std::make_unique<GraphicFilterSmooth>(pParent, rGraphic, nRadius)); +} + +VclPtr<AbstractGraphicFilterDialog> AbstractDialogFactory_Impl::CreateGraphicFilterSolarize(weld::Window* pParent, + const Graphic& rGraphic) +{ + return VclPtr<AbstractGraphicFilterDialog_Impl>::Create(std::make_unique<GraphicFilterSolarize>(pParent, rGraphic, 128, false /*bInvert*/)); +} + +VclPtr<AbstractGraphicFilterDialog> AbstractDialogFactory_Impl::CreateGraphicFilterMosaic(weld::Window* pParent, + const Graphic& rGraphic) +{ + return VclPtr<AbstractGraphicFilterDialog_Impl>::Create(std::make_unique<GraphicFilterMosaic>(pParent, rGraphic, 4, 4, false /*bEnhanceEdges*/)); +} + +VclPtr<AbstractSvxAreaTabDialog> AbstractDialogFactory_Impl::CreateSvxAreaTabDialog(weld::Window* pParent, + const SfxItemSet* pAttr, + SdrModel* pModel, + bool bShadow) +{ + return VclPtr<AbstractSvxAreaTabDialog_Impl>::Create(std::make_shared<SvxAreaTabDialog>(pParent, pAttr, pModel, bShadow)); +} + +VclPtr<SfxAbstractTabDialog> AbstractDialogFactory_Impl::CreateSvxLineTabDialog(weld::Window* pParent, const SfxItemSet* pAttr, //add forSvxLineTabDialog + SdrModel* pModel, + const SdrObject* pObj , + bool bHasObj) +{ + return VclPtr<CuiAbstractTabController_Impl>::Create(std::make_shared<SvxLineTabDialog>(pParent, pAttr, pModel, pObj,bHasObj)); +} + +VclPtr<SfxAbstractDialog> AbstractDialogFactory_Impl::CreateCharMapDialog(weld::Window* pParent, const SfxItemSet& rAttr, + const Reference< XFrame >& rDocumentFrame) +{ + return VclPtr<AbstractSvxCharacterMapDialog_Impl>::Create(std::make_unique<SvxCharacterMap>(pParent, &rAttr, rDocumentFrame)); +} + +VclPtr<SfxAbstractDialog> AbstractDialogFactory_Impl::CreateEventConfigDialog(weld::Widget* pParent, + const SfxItemSet& rAttr, + const Reference< XFrame >& rDocumentFrame) +{ + return VclPtr<CuiAbstractSingleTabController_Impl>::Create(std::make_unique<SfxMacroAssignDlg>(pParent, rDocumentFrame, rAttr)); +} + +VclPtr<SfxAbstractDialog> AbstractDialogFactory_Impl::CreateSfxDialog(weld::Window* pParent, + const SfxItemSet& rAttr, + const SdrView* pView, + sal_uInt32 nResId) +{ + switch ( nResId ) + { + case RID_SVXPAGE_MEASURE: + return VclPtr<CuiAbstractSingleTabController_Impl>::Create(std::make_unique<SvxMeasureDialog>(pParent, rAttr, pView)); + case RID_SVXPAGE_CONNECTION: + return VclPtr<CuiAbstractSingleTabController_Impl>::Create(std::make_unique<SvxConnectionDialog>(pParent, rAttr, pView)); + case RID_SFXPAGE_DBREGISTER: + return VclPtr<CuiAbstractSingleTabController_Impl>::Create(std::make_unique<DatabaseRegistrationDialog>(pParent, rAttr)); + } + + return nullptr; +} + +VclPtr<AbstractSvxPostItDialog> AbstractDialogFactory_Impl::CreateSvxPostItDialog(weld::Widget* pParent, + const SfxItemSet& rCoreSet, + bool bPrevNext) +{ + return VclPtr<AbstractSvxPostItDialog_Impl>::Create(std::make_unique<SvxPostItDialog>(pParent, rCoreSet, bPrevNext)); +} + +namespace { + +class SvxMacroAssignDialog : public VclAbstractDialog +{ +public: + SvxMacroAssignDialog( weld::Window* _pParent, const Reference< XFrame >& _rxDocumentFrame, const bool _bUnoDialogMode, + const Reference< XNameReplace >& _rxEvents, const sal_uInt16 _nInitiallySelectedEvent ) + :m_aItems( SfxGetpApp()->GetPool(), svl::Items<SID_ATTR_MACROITEM, SID_ATTR_MACROITEM>{} ) + { + m_aItems.Put( SfxBoolItem( SID_ATTR_MACROITEM, _bUnoDialogMode ) ); + m_xDialog.reset(new SvxMacroAssignDlg(_pParent, _rxDocumentFrame, m_aItems, _rxEvents, _nInitiallySelectedEvent)); + } + + virtual short Execute() override; + +private: + SfxItemSet m_aItems; + std::unique_ptr<SvxMacroAssignDlg> m_xDialog; +}; + +} + +short SvxMacroAssignDialog::Execute() +{ + return m_xDialog->run(); +} + +short AbstractAboutDialog_Impl::Execute() +{ + return m_xDlg->run(); +} + +short AbstractTipOfTheDayDialog_Impl::Execute() +{ + return m_xDlg->run(); +} + +short AbstractDiagramDialog_Impl::Execute() +{ + return m_xDlg->run(); +} + +VclPtr<VclAbstractDialog> AbstractDialogFactory_Impl::CreateSvxMacroAssignDlg( + weld::Window* _pParent, const Reference< XFrame >& _rxDocumentFrame, const bool _bUnoDialogMode, + const Reference< XNameReplace >& _rxEvents, const sal_uInt16 _nInitiallySelectedEvent ) +{ + return VclPtr<SvxMacroAssignDialog>::Create( _pParent, _rxDocumentFrame, _bUnoDialogMode, _rxEvents, _nInitiallySelectedEvent ); +} + +// Factories for TabPages +CreateTabPage AbstractDialogFactory_Impl::GetTabPageCreatorFunc( sal_uInt16 nId ) +{ + switch ( nId ) + { + case RID_SW_TP_BACKGROUND : + case RID_SVXPAGE_BKG : + return SvxBkgTabPage::Create; + case RID_SVXPAGE_TEXTANIMATION : + return SvxTextAnimationPage::Create; + case RID_SVXPAGE_TRANSPARENCE : + return SvxTransparenceTabPage::Create; + case RID_SVXPAGE_AREA : + return SvxAreaTabPage::Create; + case RID_SVXPAGE_SHADOW : + return SvxShadowTabPage::Create; + case RID_SVXPAGE_LINE : + return SvxLineTabPage::Create; + case RID_SVXPAGE_CONNECTION : + return SvxConnectionPage::Create; + case RID_SVXPAGE_MEASURE : + return SvxMeasurePage::Create; + case RID_SFXPAGE_GENERAL : + return SvxGeneralTabPage::Create; + case RID_SVXPAGE_PICK_SINGLE_NUM : + return SvxSingleNumPickTabPage::Create; + case RID_SVXPAGE_PICK_BMP : + return SvxBitmapPickTabPage::Create; + case RID_SVXPAGE_PICK_BULLET : + return SvxBulletPickTabPage::Create; + case RID_SVXPAGE_NUM_OPTIONS : + return SvxNumOptionsTabPage::Create; + case RID_SVXPAGE_PICK_NUM : + return SvxNumPickTabPage::Create; + case RID_SVXPAGE_NUM_POSITION : + return SvxNumPositionTabPage::Create; + case RID_SVXPAGE_PARA_ASIAN : + return SvxAsianTabPage::Create; + case RID_SVXPAGE_EXT_PARAGRAPH : + return SvxExtParagraphTabPage::Create; + case RID_SVXPAGE_ALIGN_PARAGRAPH : + return SvxParaAlignTabPage::Create; + case RID_SVXPAGE_STD_PARAGRAPH : + return SvxStdParagraphTabPage::Create; + case RID_SVXPAGE_TABULATOR : + return SvxTabulatorTabPage::Create; + case RID_SVXPAGE_TEXTATTR : + return SvxTextAttrPage::Create; + case RID_SVXPAGE_ALIGNMENT : + return svx::AlignmentTabPage::Create; + case RID_SVXPAGE_BORDER : + return SvxBorderTabPage::Create; + case RID_SVXPAGE_CHAR_NAME : + return SvxCharNamePage::Create; + case RID_SVXPAGE_CHAR_EFFECTS : + return SvxCharEffectsPage::Create; + case RID_SVXPAGE_CHAR_POSITION : + return SvxCharPositionPage::Create; + case RID_SVXPAGE_CHAR_TWOLINES : + return SvxCharTwoLinesPage::Create; + case RID_SVXPAGE_NUMBERFORMAT : + return SvxNumberFormatTabPage::Create; + case RID_SVXPAGE_PAGE : + return SvxPageDescPage::Create; + case RID_SVXPAGE_GRFCROP : + return SvxGrfCropPage::Create; + case RID_SVXPAGE_MACROASSIGN : + return SfxMacroTabPage::Create; + default: + break; + } + + return nullptr; +} + +DialogGetRanges AbstractDialogFactory_Impl::GetDialogGetRangesFunc() +{ + return SvxPostItDialog::GetRanges; +} + +GetTabPageRanges AbstractDialogFactory_Impl::GetTabPageRangesFunc( sal_uInt16 nId ) +{ + switch ( nId ) + { + case RID_SVXPAGE_TEXTANIMATION : + return SvxTextAnimationPage::GetRanges; + case RID_SVXPAGE_TRANSPARENCE : + return SvxTransparenceTabPage::GetRanges; + case RID_SVXPAGE_AREA : + return SvxAreaTabPage::GetRanges; + case RID_SVXPAGE_SHADOW : + return SvxShadowTabPage::GetRanges; + case RID_SVXPAGE_LINE : + return SvxLineTabPage::GetRanges; + case RID_SVXPAGE_CONNECTION : + return SvxConnectionPage::GetRanges; + case RID_SVXPAGE_MEASURE : + return SvxMeasurePage::GetRanges; + case RID_SVXPAGE_PARA_ASIAN : + return SvxAsianTabPage::GetRanges; + case RID_SVXPAGE_EXT_PARAGRAPH : + return SvxExtParagraphTabPage::GetRanges; + case RID_SVXPAGE_ALIGN_PARAGRAPH : + return SvxParaAlignTabPage::GetRanges; + case RID_SVXPAGE_STD_PARAGRAPH : + return SvxStdParagraphTabPage::GetRanges; + case RID_SVXPAGE_TABULATOR : + return SvxTabulatorTabPage::GetRanges; + case RID_SVXPAGE_TEXTATTR : + return SvxTextAttrPage::GetRanges; + case RID_SVXPAGE_ALIGNMENT : + return svx::AlignmentTabPage::GetRanges; + case RID_SW_TP_BACKGROUND : + case RID_SVXPAGE_BKG: + return SvxBkgTabPage::GetRanges; + case RID_SVXPAGE_BORDER : + return SvxBorderTabPage::GetRanges; + case RID_SVXPAGE_CHAR_NAME : + return SvxCharNamePage::GetRanges; + case RID_SVXPAGE_CHAR_EFFECTS : + return SvxCharEffectsPage::GetRanges; + case RID_SVXPAGE_CHAR_POSITION : + return SvxCharPositionPage::GetRanges; + case RID_SVXPAGE_CHAR_TWOLINES : + return SvxCharTwoLinesPage::GetRanges; + case RID_SVXPAGE_NUMBERFORMAT : + return SvxNumberFormatTabPage::GetRanges; + case RID_SVXPAGE_PAGE : + return SvxPageDescPage::GetRanges; + case RID_SVXPAGE_ASIAN_LAYOUT: + return SvxAsianLayoutPage::GetRanges; + default: + break; + } + + return nullptr; +} + +VclPtr<SfxAbstractInsertObjectDialog> AbstractDialogFactory_Impl::CreateInsertObjectDialog(weld::Window* pParent, const OUString& rCommand, + const Reference <css::embed::XStorage>& xStor, const SvObjectServerList* pList) +{ + std::unique_ptr<InsertObjectDialog_Impl> pDlg; + if ( rCommand == ".uno:InsertObject" ) + pDlg.reset(new SvInsertOleDlg(pParent, xStor, pList)); + else if ( rCommand == ".uno:InsertObjectFloatingFrame" ) + pDlg.reset(new SfxInsertFloatingFrameDialog(pParent, xStor)); + + if ( pDlg ) + { + pDlg->SetHelpId( OUStringToOString( rCommand, RTL_TEXTENCODING_UTF8 ) ); + return VclPtr<AbstractInsertObjectDialog_Impl>::Create( std::move(pDlg) ); + } + return nullptr; +} + +VclPtr<VclAbstractDialog> AbstractDialogFactory_Impl::CreateEditObjectDialog(weld::Window* pParent, const OUString& rCommand, + const Reference<css::embed::XEmbeddedObject>& xObj) +{ + if ( rCommand == ".uno:InsertObjectFloatingFrame" ) + { + auto pDlg = std::make_unique<SfxInsertFloatingFrameDialog>(pParent, xObj); + pDlg->SetHelpId( OUStringToOString( rCommand, RTL_TEXTENCODING_UTF8 ) ); + return VclPtr<AbstractInsertObjectDialog_Impl>::Create( std::move(pDlg) ); + } + return nullptr; +} + +VclPtr<SfxAbstractPasteDialog> AbstractDialogFactory_Impl::CreatePasteDialog(weld::Window* pParent) +{ + return VclPtr<AbstractPasteDialog_Impl>::Create(std::make_shared<SvPasteObjectDialog>(pParent)); +} + +VclPtr<SfxAbstractLinksDialog> AbstractDialogFactory_Impl::CreateLinksDialog(weld::Window* pParent, sfx2::LinkManager* pMgr, bool bHTML, sfx2::SvBaseLink* p) +{ + auto xLinkDlg(std::make_unique<SvBaseLinksDlg>(pParent, pMgr, bHTML)); + if (p) + xLinkDlg->SetActLink(p); + return VclPtr<AbstractLinksDialog_Impl>::Create(std::move(xLinkDlg)); +} + +VclPtr<SfxAbstractTabDialog> AbstractDialogFactory_Impl::CreateSvxFormatCellsDialog(weld::Window* pParent, const SfxItemSet* pAttr, const SdrModel& rModel) +{ + return VclPtr<CuiAbstractTabController_Impl>::Create(std::make_shared<SvxFormatCellsDialog>(pParent, pAttr, rModel)); +} + +VclPtr<SvxAbstractSplitTableDialog> AbstractDialogFactory_Impl::CreateSvxSplitTableDialog(weld::Window* pParent, bool bIsTableVertical, long nMaxVertical) +{ + return VclPtr<SvxSplitTableDlg>::Create( pParent, bIsTableVertical, nMaxVertical, 99 ); +} + +std::shared_ptr<SvxAbstractNewTableDialog> AbstractDialogFactory_Impl::CreateSvxNewTableDialog(weld::Window* pParent) +{ + return std::make_shared<SvxNewTableDialogWrapper>(pParent); +} + +VclPtr<VclAbstractDialog> AbstractDialogFactory_Impl::CreateOptionsDialog(weld::Window* pParent, const OUString& rExtensionId) +{ + return VclPtr<CuiAbstractController_Impl>::Create(std::make_unique<OfaTreeOptionsDialog>(pParent, rExtensionId)); +} + +VclPtr<SvxAbstractInsRowColDlg> AbstractDialogFactory_Impl::CreateSvxInsRowColDlg(weld::Window* pParent, bool bCol, const OString& rHelpId) +{ + return VclPtr<SvxInsRowColDlg>::Create(pParent, bCol, rHelpId); +} + +VclPtr<AbstractPasswordToOpenModifyDialog> AbstractDialogFactory_Impl::CreatePasswordToOpenModifyDialog( + weld::Window * pParent, sal_uInt16 nMaxPasswdLen, bool bIsPasswordToModify) +{ + return VclPtr<AbstractPasswordToOpenModifyDialog_Impl>::Create(std::make_unique<PasswordToOpenModifyDialog>(pParent, nMaxPasswdLen, bIsPasswordToModify)); +} + +VclPtr<AbstractScreenshotAnnotationDlg> AbstractDialogFactory_Impl::CreateScreenshotAnnotationDlg(weld::Dialog& rParentDialog) +{ + return VclPtr<AbstractScreenshotAnnotationDlg_Impl>::Create(std::make_unique<ScreenshotAnnotationDlg>(rParentDialog)); +} + +VclPtr<AbstractSignatureLineDialog> AbstractDialogFactory_Impl::CreateSignatureLineDialog( + weld::Window* pParent, const Reference<XModel> xModel, bool bEditExisting) +{ + return VclPtr<AbstractSignatureLineDialog_Impl>::Create( + std::make_unique<SignatureLineDialog>(pParent, xModel, bEditExisting)); +} + +VclPtr<AbstractSignSignatureLineDialog> +AbstractDialogFactory_Impl::CreateSignSignatureLineDialog(weld::Window* pParent, + const Reference<XModel> xModel) +{ + return VclPtr<AbstractSignSignatureLineDialog_Impl>::Create( + std::make_unique<SignSignatureLineDialog>(pParent, xModel)); +} + +VclPtr<AbstractQrCodeGenDialog> AbstractDialogFactory_Impl::CreateQrCodeGenDialog( + weld::Window* pParent, const Reference<XModel> xModel, bool bEditExisting) +{ + return VclPtr<AbstractQrCodeGenDialog_Impl>::Create( + std::make_unique<QrCodeGenDialog>(pParent, xModel, bEditExisting)); +} + +VclPtr<AbstractAboutDialog> +AbstractDialogFactory_Impl::CreateAboutDialog(weld::Window* pParent) +{ + return VclPtr<AbstractAboutDialog_Impl>::Create( + std::make_unique<AboutDialog>(pParent)); +} + +VclPtr<AbstractTipOfTheDayDialog> +AbstractDialogFactory_Impl::CreateTipOfTheDayDialog(weld::Window* pParent) +{ + return VclPtr<AbstractTipOfTheDayDialog_Impl>::Create(std::make_unique<TipOfTheDayDialog>(pParent)); +} + +VclPtr<AbstractDiagramDialog> +AbstractDialogFactory_Impl::CreateDiagramDialog(weld::Window* pParent, std::shared_ptr<DiagramDataInterface> pDiagramData) +{ + return VclPtr<AbstractDiagramDialog_Impl>::Create( + std::make_unique<DiagramDialog>(pParent, pDiagramData)); +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx new file mode 100644 index 000000000..4f54b03f9 --- /dev/null +++ b/cui/source/factory/dlgfact.hxx @@ -0,0 +1,981 @@ +/* -*- 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 . + */ +#ifndef INCLUDED_CUI_SOURCE_FACTORY_DLGFACT_HXX +#define INCLUDED_CUI_SOURCE_FACTORY_DLGFACT_HXX + +#include <svx/svxdlg.hxx> +#include <svx/zoom_def.hxx> +#include <com/sun/star/container/XNameReplace.hpp> + +#include <tools/link.hxx> +#include <com/sun/star/frame/XFrame.hpp> + +#include <about.hxx> +#include <cfgutil.hxx> +#include <cui/cuicharmap.hxx> +#include <cuifmsearch.hxx> +#include <cuigaldlg.hxx> +#include <cuigrfflt.hxx> +#include <cuihyperdlg.hxx> +#include <cuiimapwnd.hxx> +#include <cuisrchdlg.hxx> +#include <cuitabarea.hxx> +#include <cuitbxform.hxx> +#include <dlgname.hxx> +#include <DiagramDialog.hxx> +#include <dstribut.hxx> +#include <hangulhanjadlg.hxx> +#include <hyphen.hxx> +#include <insdlg.hxx> +#include <labdlg.hxx> +#include <linkdlg.hxx> +#include <multipat.hxx> +#include <optdict.hxx> +#include <passwdomdlg.hxx> +#include <pastedlg.hxx> +#include <postdlg.hxx> +#include <QrCodeGenDialog.hxx> +#include <screenshotannotationdlg.hxx> +#include <showcols.hxx> +#include <SignatureLineDialog.hxx> +#include <SignSignatureLineDialog.hxx> +#include <SpellDialog.hxx> +#include <srchxtra.hxx> +#include <thesdlg.hxx> +#include <tipofthedaydlg.hxx> +#include <transfrm.hxx> +#include <zoom.hxx> + +class SfxSingleTabDialogController; +class SfxItemPool; +class FmShowColsDialog; +class SvxZoomDialog; +class FmInputRecordNoDialog; +class SvxJSearchOptionsDialog; +class SvxNewDictionaryDialog; +class SvxNameDialog; + +// #i68101# +class SvxObjectNameDialog; +class SvxObjectTitleDescDialog; + +class SvxMultiPathDialog; +class SvxHpLinkDlg; +class FmSearchDialog; +class Graphic; +class GraphicFilterDialog; +class SvxAreaTabDialog; +class InsertObjectDialog_Impl; +class SvPasteObjectDialog; +class SvBaseLinksDlg; +class SvxTransformTabDialog; +class SvxCaptionTabDialog; +class SvxThesaurusDialog; +class SvxHyphenWordDialog; + +namespace svx{ +class HangulHanjaConversionDialog; +} +using namespace svx; + +#define DECL_ABSTDLG_BASE(Class,DialogClass) \ + ScopedVclPtr<DialogClass> pDlg; \ +public: \ + explicit Class( DialogClass* p) \ + : pDlg(p) \ + {} \ + virtual short Execute() override; \ + virtual bool StartExecuteAsync(VclAbstractDialog::AsyncContext &rCtx) override; + +#define IMPL_ABSTDLG_BASE(Class) \ +short Class::Execute() \ +{ \ + return pDlg->Execute(); \ +} \ +bool Class::StartExecuteAsync(VclAbstractDialog::AsyncContext &rCtx) \ +{ \ + return pDlg->StartExecuteAsync(rCtx); \ +} + +class CuiAbstractController_Impl : public VclAbstractDialog +{ + std::unique_ptr<weld::DialogController> m_xDlg; +public: + explicit CuiAbstractController_Impl(std::unique_ptr<weld::DialogController> p) + : m_xDlg(std::move(p)) + { + } + virtual short Execute() override; +}; + +class CuiAbstractSingleTabController_Impl : public SfxAbstractDialog +{ + std::unique_ptr<SfxSingleTabDialogController> m_xDlg; +public: + explicit CuiAbstractSingleTabController_Impl(std::unique_ptr<SfxSingleTabDialogController> p) + : m_xDlg(std::move(p)) + { + } + virtual short Execute() override; + virtual const SfxItemSet* GetOutputItemSet() const override; + + //From class Window. + virtual void SetText( const OUString& rStr ) override; +}; + +class CuiAbstractTabController_Impl : public SfxAbstractTabDialog +{ + std::shared_ptr<SfxTabDialogController> m_xDlg; +public: + explicit CuiAbstractTabController_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 OString &rName ) override; + virtual const SfxItemSet* GetOutputItemSet() const override; + virtual const sal_uInt16* GetInputRanges( const SfxItemPool& pItem ) override; + virtual void SetInputSet( const SfxItemSet* pInSet ) override; + virtual void SetText( const OUString& rStr ) override; + + // screenshotting + virtual std::vector<OString> getAllPageUIXMLDescriptions() const override; + virtual bool selectPageByUIXMLDescription(const OString& rUIXMLDescription) override; + virtual BitmapEx createScreenshot() const override; + virtual OString GetScreenshotId() const override; +}; + +class SvxDistributeDialog; +class AbstractSvxDistributeDialog_Impl: public AbstractSvxDistributeDialog +{ + std::unique_ptr<SvxDistributeDialog> m_xDlg; +public: + explicit AbstractSvxDistributeDialog_Impl(std::unique_ptr<SvxDistributeDialog> p) + : m_xDlg(std::move(p)) + { + } + virtual short Execute() override; +public: + virtual SvxDistributeHorizontal GetDistributeHor() const override; + virtual SvxDistributeVertical GetDistributeVer() const override; +}; + +class AbstractHangulHanjaConversionDialog_Impl: public AbstractHangulHanjaConversionDialog +{ +private: + std::unique_ptr<HangulHanjaConversionDialog> m_xDlg; +public: + explicit AbstractHangulHanjaConversionDialog_Impl(std::unique_ptr<HangulHanjaConversionDialog> p) + : m_xDlg(std::move(p)) + { + } + virtual short Execute() override; + virtual void EndDialog(sal_Int32 nResult) override; + virtual void EnableRubySupport( bool _bVal ) override; + virtual void SetByCharacter( bool _bByCharacter ) override ; + virtual void SetConversionDirectionState( bool _bTryBothDirections, editeng::HangulHanjaConversion::ConversionDirection _ePrimaryConversionDirection ) override; + virtual void SetConversionFormat( editeng::HangulHanjaConversion::ConversionFormat _eType ) override; + virtual void SetOptionsChangedHdl( const Link<LinkParamNone*,void>& _rHdl ) override; + virtual void SetIgnoreHdl( const Link<weld::Button&,void>& _rHdl ) override; + virtual void SetIgnoreAllHdl( const Link<weld::Button&,void>& _rHdl ) override ; + virtual void SetChangeHdl( const Link<weld::Button&,void>& _rHdl ) override ; + virtual void SetChangeAllHdl( const Link<weld::Button&,void>& rHdl ) override ; + virtual void SetClickByCharacterHdl( const Link<weld::ToggleButton&,void>& rHdl ) override ; + virtual void SetConversionFormatChangedHdl( const Link<weld::Button&,void>& _rHdl ) override ; + virtual void SetFindHdl( const Link<weld::Button&,void>& _rHdl ) override; + virtual bool GetUseBothDirections( ) const override; + virtual editeng::HangulHanjaConversion::ConversionDirection + GetDirection( editeng::HangulHanjaConversion::ConversionDirection _eDefaultDirection ) const override; + virtual void SetCurrentString( + const OUString& _rNewString, + const css::uno::Sequence< OUString >& _rSuggestions, + bool _bOriginatesFromDocument = true + ) override; + virtual OUString GetCurrentString( ) const override ; + virtual editeng::HangulHanjaConversion::ConversionFormat + GetConversionFormat( ) const override ; + virtual void FocusSuggestion( ) override; + virtual OUString GetCurrentSuggestion( ) const override; +}; + +class AbstractThesaurusDialog_Impl : public AbstractThesaurusDialog +{ + std::shared_ptr<SvxThesaurusDialog> m_xDlg; +public: + explicit AbstractThesaurusDialog_Impl(std::shared_ptr<SvxThesaurusDialog> p) + : m_xDlg(std::move(p)) + { + } + virtual short Execute() override; + virtual bool StartExecuteAsync(AsyncContext &rCtx) override; + virtual OUString GetWord() override; +}; + +class AbstractHyphenWordDialog_Impl: public AbstractHyphenWordDialog +{ + std::unique_ptr<SvxHyphenWordDialog> m_xDlg; +public: + explicit AbstractHyphenWordDialog_Impl(std::unique_ptr<SvxHyphenWordDialog> p) + : m_xDlg(std::move(p)) + { + } + virtual short Execute() override; +}; + +class FmShowColsDialog; +class AbstractFmShowColsDialog_Impl : public AbstractFmShowColsDialog +{ + std::unique_ptr<FmShowColsDialog> m_xDlg; +public: + explicit AbstractFmShowColsDialog_Impl(std::unique_ptr<FmShowColsDialog> p) + : m_xDlg(std::move(p)) + { + } + virtual short Execute() override; + virtual void SetColumns(const css::uno::Reference< css::container::XIndexContainer>& xCols) override; +}; + +class SvxZoomDialog; +class AbstractSvxZoomDialog_Impl : public AbstractSvxZoomDialog +{ + std::unique_ptr<SvxZoomDialog> m_xDlg; +public: + explicit AbstractSvxZoomDialog_Impl(std::unique_ptr<SvxZoomDialog> p) + : m_xDlg(std::move(p)) + { + } + virtual short Execute() override; + virtual void SetLimits( sal_uInt16 nMin, sal_uInt16 nMax ) override; + virtual void HideButton( ZoomButtonId nBtnId ) override; + virtual const SfxItemSet* GetOutputItemSet() const override ; +}; + +namespace svx{ class SpellDialog;} +class AbstractSpellDialog_Impl : public AbstractSpellDialog +{ + std::shared_ptr<svx::SpellDialog> m_xDlg; +public: + explicit AbstractSpellDialog_Impl(std::shared_ptr<svx::SpellDialog> p) + : m_xDlg(std::move(p)) + { + } + virtual short Execute() override; + virtual bool StartExecuteAsync(AsyncContext &rCtx) override; + virtual void InvalidateDialog() override; + virtual std::shared_ptr<SfxDialogController> GetController() override; + virtual SfxBindings& GetBindings() override; +}; + +class TitleDialog; +class AbstractTitleDialog_Impl : public AbstractTitleDialog +{ +protected: + std::unique_ptr<TitleDialog> m_xDlg; +public: + explicit AbstractTitleDialog_Impl(std::unique_ptr<TitleDialog> p) + : m_xDlg(std::move(p)) + { + } + virtual short Execute() override; + virtual OUString GetTitle() const override ; + +}; + +class SvxScriptSelectorDialog; +class AbstractScriptSelectorDialog_Impl : public AbstractScriptSelectorDialog +{ + std::unique_ptr<SvxScriptSelectorDialog> m_xDlg; +public: + explicit AbstractScriptSelectorDialog_Impl(std::unique_ptr<SvxScriptSelectorDialog> p) + : m_xDlg(std::move(p)) + { + } + virtual short Execute() override; + virtual OUString GetScriptURL() const override; + virtual void SetRunLabel() override; +}; + +class GalleryIdDialog; +class AbstractGalleryIdDialog_Impl : public AbstractGalleryIdDialog +{ +protected: + std::unique_ptr<GalleryIdDialog> m_xDlg; +public: + explicit AbstractGalleryIdDialog_Impl(std::unique_ptr<GalleryIdDialog> p) + : m_xDlg(std::move(p)) + { + } + virtual short Execute() override; + virtual sal_uInt32 GetId() const override; +}; + +class URLDlg; +class AbstractURLDlg_Impl :public AbstractURLDlg +{ +protected: + std::unique_ptr<URLDlg> m_xDlg; +public: + explicit AbstractURLDlg_Impl(std::unique_ptr<URLDlg> p) + : m_xDlg(std::move(p)) + { + } + virtual short Execute() override; + virtual OUString GetURL() const override; + virtual OUString GetAltText() const override; + virtual OUString GetDesc() const override; + virtual OUString GetTarget() const override; + virtual OUString GetName() const override; +}; + +class SvxSearchSimilarityDialog; +class AbstractSvxSearchSimilarityDialog_Impl :public AbstractSvxSearchSimilarityDialog +{ + std::unique_ptr<SvxSearchSimilarityDialog> m_xDlg; +public: + explicit AbstractSvxSearchSimilarityDialog_Impl(std::unique_ptr<SvxSearchSimilarityDialog> p) + : m_xDlg(std::move(p)) + { + } + virtual short Execute() override; + virtual sal_uInt16 GetOther() override; + virtual sal_uInt16 GetShorter() override; + virtual sal_uInt16 GetLonger() override; + virtual bool IsRelaxed() override; +}; + +class SvxJSearchOptionsDialog; +class AbstractSvxJSearchOptionsDialog_Impl : public AbstractSvxJSearchOptionsDialog +{ + std::unique_ptr<SvxJSearchOptionsDialog> m_xDlg; +public: + explicit AbstractSvxJSearchOptionsDialog_Impl(std::unique_ptr<SvxJSearchOptionsDialog> p) + : m_xDlg(std::move(p)) + { + } + virtual short Execute() override; + virtual TransliterationFlags GetTransliterationFlags() const override; +}; + +class AbstractSvxTransformTabDialog_Impl : public AbstractSvxTransformTabDialog +{ + std::shared_ptr<SvxTransformTabDialog> m_xDlg; +public: + explicit AbstractSvxTransformTabDialog_Impl(std::shared_ptr<SvxTransformTabDialog> p) + : m_xDlg(std::move(p)) + { + } + virtual short Execute() override; + virtual bool StartExecuteAsync(AsyncContext &rCtx) override; + virtual void SetValidateFramePosLink( const Link<SvxSwFrameValidation&,void>& rLink ) override; + virtual void SetCurPageId( const OString& rName ) override; + virtual const SfxItemSet* GetOutputItemSet() const override; + virtual const sal_uInt16* GetInputRanges( const SfxItemPool& pItem ) override; + virtual void SetInputSet( const SfxItemSet* pInSet ) override; + virtual void SetText( const OUString& rStr ) override; +}; + +class AbstractSvxCaptionDialog_Impl : public AbstractSvxCaptionDialog +{ + std::shared_ptr<SvxCaptionTabDialog> m_xDlg; +public: + explicit AbstractSvxCaptionDialog_Impl(std::shared_ptr<SvxCaptionTabDialog> p) + : m_xDlg(std::move(p)) + { + } + virtual short Execute() override; + virtual bool StartExecuteAsync(AsyncContext &rCtx) override; + virtual void SetValidateFramePosLink( const Link<SvxSwFrameValidation&,void>& rLink ) override; + virtual void SetCurPageId( const OString& rName ) override; + virtual const SfxItemSet* GetOutputItemSet() const override; + virtual const sal_uInt16* GetInputRanges( const SfxItemPool& pItem ) override; + virtual void SetInputSet( const SfxItemSet* pInSet ) override; + virtual void SetText( const OUString& rStr ) override; +}; + +class FmInputRecordNoDialog; +class AbstractFmInputRecordNoDialog_Impl :public AbstractFmInputRecordNoDialog +{ + std::unique_ptr<FmInputRecordNoDialog> m_xDlg; +public: + explicit AbstractFmInputRecordNoDialog_Impl(std::unique_ptr<FmInputRecordNoDialog> p) + : m_xDlg(std::move(p)) + { + } + virtual short Execute() override; + virtual void SetValue(long nNew) override ; + virtual long GetValue() const override ; +}; + +class SvxNewDictionaryDialog; +class AbstractSvxNewDictionaryDialog_Impl :public AbstractSvxNewDictionaryDialog +{ + std::unique_ptr<SvxNewDictionaryDialog> m_xDlg; +public: + explicit AbstractSvxNewDictionaryDialog_Impl(std::unique_ptr<SvxNewDictionaryDialog> p) + : m_xDlg(std::move(p)) + { + } + virtual short Execute() override; + virtual css::uno::Reference< css::linguistic2::XDictionary > GetNewDictionary() override; +}; + +class SvxNameDialog; +class AbstractSvxNameDialog_Impl :public AbstractSvxNameDialog +{ +public: + explicit AbstractSvxNameDialog_Impl(std::unique_ptr<SvxNameDialog> p) + : m_xDlg(std::move(p)) + { + } + virtual short Execute() override; + virtual void GetName( OUString& rName ) override ; + virtual void SetCheckNameHdl( const Link<AbstractSvxNameDialog&,bool>& rLink, bool bCheckImmediately = false ) override ; + virtual void SetCheckNameTooltipHdl( const Link<AbstractSvxNameDialog&, OUString>& rLink ) override ; + virtual void SetEditHelpId(const OString&) override ; + //from class Window + virtual void SetHelpId( const OString& ) override ; + virtual void SetText( const OUString& rStr ) override ; +private: + std::unique_ptr<SvxNameDialog> m_xDlg; + Link<AbstractSvxNameDialog&,bool> aCheckNameHdl; + Link<AbstractSvxNameDialog&,OUString> aCheckNameTooltipHdl; + DECL_LINK(CheckNameHdl, SvxNameDialog&, bool); + DECL_LINK(CheckNameTooltipHdl, SvxNameDialog&, OUString); +}; + +class SvxObjectNameDialog; +class SvxObjectTitleDescDialog; + +class AbstractSvxObjectNameDialog_Impl : public AbstractSvxObjectNameDialog +{ +public: + explicit AbstractSvxObjectNameDialog_Impl(std::unique_ptr<SvxObjectNameDialog> p) + : m_xDlg(std::move(p)) + { + } + virtual short Execute() override; + virtual void GetName(OUString& rName) override ; + virtual void SetCheckNameHdl(const Link<AbstractSvxObjectNameDialog&,bool>& rLink) override; + +private: + std::unique_ptr<SvxObjectNameDialog> m_xDlg; + Link<AbstractSvxObjectNameDialog&,bool> aCheckNameHdl; + DECL_LINK(CheckNameHdl, SvxObjectNameDialog&, bool); +}; + +class AbstractSvxObjectTitleDescDialog_Impl :public AbstractSvxObjectTitleDescDialog +{ + std::unique_ptr<SvxObjectTitleDescDialog> m_xDlg; +public: + explicit AbstractSvxObjectTitleDescDialog_Impl(std::unique_ptr<SvxObjectTitleDescDialog> p) + : m_xDlg(std::move(p)) + { + } + virtual short Execute() override; + virtual void GetTitle(OUString& rName) override; + virtual void GetDescription(OUString& rName) override; +}; + +class AbstractSvxMultiPathDialog_Impl : public AbstractSvxMultiPathDialog +{ + std::unique_ptr<SvxMultiPathDialog> m_xDlg; +public: + explicit AbstractSvxMultiPathDialog_Impl(std::unique_ptr<SvxMultiPathDialog> p) + : m_xDlg(std::move(p)) + { + } + virtual short Execute() override; + virtual OUString GetPath() const override; + virtual void SetPath( const OUString& rPath ) override; + virtual void SetTitle( const OUString& rNewTitle ) override; +}; + +class SvxPathSelectDialog; +class AbstractSvxPathSelectDialog_Impl : public AbstractSvxMultiPathDialog +{ +protected: + std::unique_ptr<SvxPathSelectDialog> m_xDlg; +public: + explicit AbstractSvxPathSelectDialog_Impl(std::unique_ptr<SvxPathSelectDialog> p) + : m_xDlg(std::move(p)) + { + } + virtual short Execute() override; + virtual OUString GetPath() const override; + virtual void SetPath( const OUString& rPath ) override; + virtual void SetTitle( const OUString& rNewTitle ) override; +}; + +class SvxHpLinkDlg; +class AbstractSvxHpLinkDlg_Impl : public AbstractSvxHpLinkDlg +{ +protected: + std::shared_ptr<SvxHpLinkDlg> m_xDlg; +public: + explicit AbstractSvxHpLinkDlg_Impl(std::shared_ptr<SvxHpLinkDlg> p) + : m_xDlg(std::move(p)) + { + } + virtual short Execute() override; + virtual std::shared_ptr<SfxDialogController> GetController() override; + virtual bool QueryClose() override; +}; + +class FmSearchDialog; +struct FmFoundRecordInformation; +class AbstractFmSearchDialog_Impl :public AbstractFmSearchDialog +{ + std::unique_ptr<FmSearchDialog> m_xDlg; +public: + explicit AbstractFmSearchDialog_Impl(std::unique_ptr<FmSearchDialog> p) + : m_xDlg(std::move(p)) + { + } + virtual short Execute() override; + virtual void SetFoundHandler(const Link<FmFoundRecordInformation&,void>& lnk) override ; + virtual void SetCanceledNotFoundHdl(const Link<FmFoundRecordInformation&,void>& lnk) override; + virtual void SetActiveField(const OUString& strField) override; +}; + +class AbstractGraphicFilterDialog_Impl : public AbstractGraphicFilterDialog +{ + std::unique_ptr<GraphicFilterDialog> m_xDlg; +public: + explicit AbstractGraphicFilterDialog_Impl(std::unique_ptr<GraphicFilterDialog> p) + : m_xDlg(std::move(p)) + { + } + virtual short Execute() override; + virtual Graphic GetFilteredGraphic( const Graphic& rGraphic, double fScaleX, double fScaleY ) override; +}; + +class SvxAreaTabDialog; +class AbstractSvxAreaTabDialog_Impl : public AbstractSvxAreaTabDialog +{ + std::shared_ptr<SvxAreaTabDialog> m_xDlg; +public: + explicit AbstractSvxAreaTabDialog_Impl(std::shared_ptr<SvxAreaTabDialog> p) + : m_xDlg(std::move(p)) + { + } + virtual short Execute() override; + virtual bool StartExecuteAsync(AsyncContext &rCtx) override; + virtual void SetCurPageId(const OString& rName) override; + virtual const SfxItemSet* GetOutputItemSet() const override; + virtual const sal_uInt16* GetInputRanges(const SfxItemPool& pItem) override; + virtual void SetInputSet(const SfxItemSet* pInSet) override; + virtual void SetText(const OUString& rStr) override; +}; + +class AbstractInsertObjectDialog_Impl : public SfxAbstractInsertObjectDialog +{ + std::unique_ptr<InsertObjectDialog_Impl> m_xDlg; +public: + explicit AbstractInsertObjectDialog_Impl(std::unique_ptr<InsertObjectDialog_Impl> p) + : m_xDlg(std::move(p)) + { + } + virtual short Execute() override; + virtual css::uno::Reference < css::embed::XEmbeddedObject > GetObject() override; + virtual css::uno::Reference< css::io::XInputStream > GetIconIfIconified( OUString* pGraphicMediaType ) override; + virtual bool IsCreateNew() override; +}; + +class AbstractPasteDialog_Impl : public SfxAbstractPasteDialog +{ + std::shared_ptr<SvPasteObjectDialog> m_xDlg; +public: + explicit AbstractPasteDialog_Impl(std::shared_ptr<SvPasteObjectDialog> p) + : m_xDlg(std::move(p)) + { + } + virtual short Execute() override; + virtual bool StartExecuteAsync(AsyncContext &rCtx) override; +public: + virtual void Insert( SotClipboardFormatId nFormat, const OUString & rFormatName ) override; + virtual void InsertUno( const OUString & sCmd, const OUString& sLabel ) override; + virtual void SetObjName( const SvGlobalName & rClass, const OUString & rObjName ) override; + virtual void PreGetFormat( const TransferableDataHelper& aHelper ) override; + virtual SotClipboardFormatId GetFormatOnly() override; + virtual SotClipboardFormatId GetFormat( const TransferableDataHelper& aHelper ) override; +}; + +class AbstractLinksDialog_Impl : public SfxAbstractLinksDialog +{ +protected: + std::unique_ptr<SvBaseLinksDlg> m_xDlg; +public: + explicit AbstractLinksDialog_Impl(std::unique_ptr<SvBaseLinksDlg> p) + : m_xDlg(std::move(p)) + { + } + virtual short Execute() override; +}; + +class SvxPostItDialog; +class AbstractSvxPostItDialog_Impl :public AbstractSvxPostItDialog +{ +public: + AbstractSvxPostItDialog_Impl(std::unique_ptr<SvxPostItDialog> pDlg) + : m_xDlg(std::move(pDlg)) + { + } + virtual short Execute() override; + virtual void SetText( const OUString& rStr ) override; //From class Window + virtual const SfxItemSet* GetOutputItemSet() const override; + virtual void SetPrevHdl( const Link<AbstractSvxPostItDialog&,void>& rLink ) override; + virtual void SetNextHdl( const Link<AbstractSvxPostItDialog&,void>& rLink ) override; + virtual void EnableTravel(bool bNext, bool bPrev) override; + virtual OUString GetNote() override; + virtual void SetNote(const OUString& rTxt) override; + virtual void ShowLastAuthor(const OUString& rAuthor, const OUString& rDate) override; + virtual void DontChangeAuthor() override; + virtual void HideAuthor() override; + virtual std::shared_ptr<weld::Dialog> GetDialog() override; +private: + std::unique_ptr<SvxPostItDialog> m_xDlg; + Link<AbstractSvxPostItDialog&,void> aNextHdl; + Link<AbstractSvxPostItDialog&,void> aPrevHdl; + DECL_LINK(NextHdl, SvxPostItDialog&, void); + DECL_LINK(PrevHdl, SvxPostItDialog&, void); +}; + +class PasswordToOpenModifyDialog; +class AbstractPasswordToOpenModifyDialog_Impl : public AbstractPasswordToOpenModifyDialog +{ + std::unique_ptr<PasswordToOpenModifyDialog> m_xDlg; +public: + explicit AbstractPasswordToOpenModifyDialog_Impl(std::unique_ptr<PasswordToOpenModifyDialog> p) + : m_xDlg(std::move(p)) + { + } + virtual short Execute() override; + virtual OUString GetPasswordToOpen() const override; + virtual OUString GetPasswordToModify() const override; + virtual bool IsRecommendToOpenReadonly() const override; +}; + +class SvxCharacterMap; +class AbstractSvxCharacterMapDialog_Impl : public SfxAbstractDialog +{ + std::unique_ptr<SvxCharacterMap> m_xDlg; +public: + explicit AbstractSvxCharacterMapDialog_Impl(std::unique_ptr<SvxCharacterMap> p) + : m_xDlg(std::move(p)) + { + } + virtual short Execute() override; + virtual const SfxItemSet* GetOutputItemSet() const override; + virtual void SetText(const OUString& rStr) override; +}; + +class ScreenshotAnnotationDlg; +class AbstractScreenshotAnnotationDlg_Impl : public AbstractScreenshotAnnotationDlg +{ + std::unique_ptr<ScreenshotAnnotationDlg> m_xDlg; + +public: + explicit AbstractScreenshotAnnotationDlg_Impl(std::unique_ptr<ScreenshotAnnotationDlg> p) + : m_xDlg(std::move(p)) + { + } + virtual short Execute() override; +}; + +class SignatureLineDialog; +class AbstractSignatureLineDialog_Impl : public AbstractSignatureLineDialog +{ + std::unique_ptr<SignatureLineDialog> m_xDlg; + +public: + explicit AbstractSignatureLineDialog_Impl(std::unique_ptr<SignatureLineDialog> p) + : m_xDlg(std::move(p)) + { + } + virtual short Execute() override; +}; + +class QrCodeGenDialog; +class AbstractQrCodeGenDialog_Impl : public AbstractQrCodeGenDialog +{ + std::unique_ptr<QrCodeGenDialog> m_xDlg; + +public: + explicit AbstractQrCodeGenDialog_Impl(std::unique_ptr<QrCodeGenDialog> p) + : m_xDlg(std::move(p)) + { + } + virtual short Execute() override; +}; + +class SignSignatureLineDialog; +class AbstractSignSignatureLineDialog_Impl : public AbstractSignSignatureLineDialog +{ +protected: + std::unique_ptr<SignSignatureLineDialog> m_xDlg; + +public: + explicit AbstractSignSignatureLineDialog_Impl(std::unique_ptr<SignSignatureLineDialog> p) + : m_xDlg(std::move(p)) + { + } + virtual short Execute() override; +}; + +class AboutDialog; +class AbstractAboutDialog_Impl : public AbstractAboutDialog +{ +protected: + std::unique_ptr<AboutDialog> m_xDlg; + +public: + explicit AbstractAboutDialog_Impl(std::unique_ptr<AboutDialog> p) + : m_xDlg(std::move(p)) + { + } + virtual short Execute() override; +}; + +class TipOfTheDayDialog; +class AbstractTipOfTheDayDialog_Impl : public AbstractTipOfTheDayDialog +{ +protected: + std::unique_ptr<TipOfTheDayDialog> m_xDlg; + +public: + explicit AbstractTipOfTheDayDialog_Impl(std::unique_ptr<TipOfTheDayDialog> p) + : m_xDlg(std::move(p)) + { + } + virtual short Execute() override; +}; + +class DiagramDialog; + +/** Edit Diagram dialog */ +class AbstractDiagramDialog_Impl : public AbstractDiagramDialog +{ +protected: + std::unique_ptr<DiagramDialog> m_xDlg; + +public: + explicit AbstractDiagramDialog_Impl(std::unique_ptr<DiagramDialog> p) + : m_xDlg(std::move(p)) + { + } + virtual short Execute() override; +}; + +//AbstractDialogFactory_Impl implementations +class AbstractDialogFactory_Impl : public SvxAbstractDialogFactory +{ +public: + virtual VclPtr<VclAbstractDialog> CreateVclDialog(weld::Window* pParent, sal_uInt32 nResId) override; + + virtual VclPtr<SfxAbstractDialog> CreateSfxDialog( weld::Window* pParent, + const SfxItemSet& rAttr, + const SdrView* pView, + sal_uInt32 nResId ) override; + virtual VclPtr<SfxAbstractDialog> CreateCharMapDialog(weld::Window* pParent, + const SfxItemSet& rAttr, + const css::uno::Reference< css::frame::XFrame >& rFrame) override; + virtual VclPtr<SfxAbstractDialog> CreateEventConfigDialog(weld::Widget* pParent, + const SfxItemSet& rAttr, + const css::uno::Reference< css::frame::XFrame >& rFrame) override; + virtual VclPtr<VclAbstractDialog> CreateFrameDialog(weld::Window* pParent, const css::uno::Reference< css::frame::XFrame >& rxFrame, + sal_uInt32 nResId, + const OUString& rParameter ) override; + virtual VclPtr<SfxAbstractTabDialog> CreateAutoCorrTabDialog(weld::Window* pParent, const SfxItemSet* pAttrSet) override; + virtual VclPtr<SfxAbstractTabDialog> CreateCustomizeTabDialog(weld::Window* pParent, + const SfxItemSet* pAttrSet, + const css::uno::Reference< css::frame::XFrame >& xViewFrame ) override; + virtual VclPtr<SfxAbstractTabDialog> CreateTextTabDialog( weld::Window* pParent, + const SfxItemSet* pAttrSet, + SdrView* pView ) override; + virtual VclPtr<SfxAbstractTabDialog> CreateTabItemDialog(weld::Window* pParent, const SfxItemSet& rSet) override; + virtual VclPtr<AbstractSvxCaptionDialog> + CreateCaptionDialog(weld::Window* pParent, + const SdrView* pView, + SvxAnchorIds nAnchorTypes = SvxAnchorIds::NONE) override; + virtual VclPtr<AbstractSvxDistributeDialog> + CreateSvxDistributeDialog(weld::Window* pParent, const SfxItemSet& rAttr) override; + virtual VclPtr<SfxAbstractInsertObjectDialog> + CreateInsertObjectDialog(weld::Window* pParent, const OUString& rCommmand, + const css::uno::Reference < css::embed::XStorage >& xStor, + const SvObjectServerList* pList ) override; + virtual VclPtr<VclAbstractDialog> CreateEditObjectDialog(weld::Window* pParent, const OUString& rCommmand, + const css::uno::Reference < css::embed::XEmbeddedObject >& xObj ) override; + virtual VclPtr<SfxAbstractPasteDialog> CreatePasteDialog(weld::Window* pParent) override; + virtual VclPtr<SfxAbstractLinksDialog> CreateLinksDialog(weld::Window* pParent, sfx2::LinkManager* pMgr, bool bHTML = false, sfx2::SvBaseLink* p=nullptr) override; + + virtual VclPtr<AbstractHangulHanjaConversionDialog> CreateHangulHanjaConversionDialog(weld::Window* pParent) override; + virtual VclPtr<AbstractThesaurusDialog> CreateThesaurusDialog(weld::Window*, + css::uno::Reference<css::linguistic2::XThesaurus> xThesaurus, + const OUString &rWord, LanguageType nLanguage) override; + + virtual VclPtr<AbstractHyphenWordDialog> CreateHyphenWordDialog(weld::Window*, + const OUString &rWord, LanguageType nLang, + css::uno::Reference< css::linguistic2::XHyphenator > &xHyphen, + SvxSpellWrapper* pWrapper) override; + + virtual VclPtr<AbstractFmShowColsDialog> CreateFmShowColsDialog(weld::Window* pParent) override; + virtual VclPtr<AbstractSvxZoomDialog> CreateSvxZoomDialog(weld::Window* pParent, const SfxItemSet& rCoreSet) override; + // add for SvxBorderBackgroundDlg + virtual VclPtr<SfxAbstractTabDialog> CreateSvxBorderBackgroundDlg( + weld::Window* pParent, + const SfxItemSet& rCoreSet, + bool bEnableDrawingLayerFillStyles) override; + + virtual VclPtr<AbstractSvxTransformTabDialog> CreateSvxTransformTabDialog(weld::Window* pParent, + const SfxItemSet* pAttr, + const SdrView* pView, + SvxAnchorIds nAnchorTypes = SvxAnchorIds::NONE) override ; + virtual VclPtr<SfxAbstractTabDialog> CreateSchTransformTabDialog(weld::Window* pParent, + const SfxItemSet* pAttr, + const SdrView* pSdrView, + bool bSizeTabPage) override; + virtual VclPtr<AbstractSpellDialog> CreateSvxSpellDialog( + weld::Window* pParent, + SfxBindings* pBindings, + svx::SpellDialogChildWindow* pSpellChildWindow ) override; + + virtual VclPtr<VclAbstractDialog> CreateActualizeProgressDialog(weld::Widget* pParent, GalleryTheme* pThm) override; + virtual VclPtr<AbstractTitleDialog> CreateTitleDialog(weld::Widget* pParent, const OUString& rOldText) override; + virtual VclPtr<AbstractGalleryIdDialog> CreateGalleryIdDialog(weld::Widget* pParent, + GalleryTheme* pThm) override; + virtual VclPtr<VclAbstractDialog> CreateGalleryThemePropertiesDialog(weld::Widget* pParent, + ExchangeData* pData, + SfxItemSet* pItemSet) override; + + virtual VclPtr<AbstractURLDlg> CreateURLDialog(weld::Widget* pParent, + const OUString& rURL, const OUString& rAltText, const OUString& rDescription, + const OUString& rTarget, const OUString& rName, + TargetList& rTargetList ) override; + + virtual VclPtr<VclAbstractDialog> CreateSvxSearchAttributeDialog(weld::Window* pParent, + SearchAttrItemList& rLst, + const sal_uInt16* pWhRanges) override; + virtual VclPtr<AbstractSvxSearchSimilarityDialog> CreateSvxSearchSimilarityDialog( weld::Window* pParent, + bool bRelax, + sal_uInt16 nOther, + sal_uInt16 nShorter, + sal_uInt16 nLonger) override; + virtual VclPtr<AbstractSvxJSearchOptionsDialog> CreateSvxJSearchOptionsDialog(weld::Window* pParent, + const SfxItemSet& rOptionsSet, + TransliterationFlags nInitialFlags) override; + virtual VclPtr<AbstractFmInputRecordNoDialog> CreateFmInputRecordNoDialog(weld::Window* pParent) override; + virtual VclPtr<AbstractSvxNewDictionaryDialog> CreateSvxNewDictionaryDialog(weld::Window* pParent) override; + virtual VclPtr<VclAbstractDialog> CreateSvxEditDictionaryDialog(weld::Window* pParent, const OUString& rName) override; + virtual VclPtr<AbstractSvxNameDialog> CreateSvxNameDialog(weld::Window* pParent, + const OUString& rName, const OUString& rDesc) override; + // #i68101# + virtual VclPtr<AbstractSvxObjectNameDialog> CreateSvxObjectNameDialog(weld::Window* pParent, const OUString& rName) override; + virtual VclPtr<AbstractSvxObjectTitleDescDialog> CreateSvxObjectTitleDescDialog(weld::Window* pParent, const OUString& rTitle, const OUString& rDescription) override; + virtual VclPtr<AbstractSvxMultiPathDialog> CreateSvxMultiPathDialog(weld::Window* pParent) override; + virtual VclPtr<AbstractSvxMultiPathDialog> CreateSvxPathSelectDialog(weld::Window* pParent) override; + virtual VclPtr<AbstractSvxHpLinkDlg> CreateSvxHpLinkDlg(SfxChildWindow* pChild, SfxBindings* pBindings, weld::Window* pParent) override; + virtual VclPtr<AbstractFmSearchDialog> CreateFmSearchDialog(weld::Window* pParent, + const OUString& strInitialText, + const std::vector< OUString >& _rContexts, + sal_Int16 nInitialContext, + const Link<FmSearchContext&,sal_uInt32>& lnkContextSupplier) override; + virtual VclPtr<AbstractGraphicFilterDialog> CreateGraphicFilterEmboss(weld::Window* pParent, + const Graphic& rGraphic) override; + virtual VclPtr<AbstractGraphicFilterDialog> CreateGraphicFilterPoster(weld::Window* pParent, + const Graphic& rGraphic) override; + virtual VclPtr<AbstractGraphicFilterDialog> CreateGraphicFilterSepia(weld::Window* pParent, + const Graphic& rGraphic) override; + virtual VclPtr<AbstractGraphicFilterDialog> CreateGraphicFilterSmooth(weld::Window* pParent, + const Graphic& rGraphic, double nRadius) override; + virtual VclPtr<AbstractGraphicFilterDialog> CreateGraphicFilterSolarize(weld::Window* pParent, + const Graphic& rGraphic) override; + virtual VclPtr<AbstractGraphicFilterDialog> CreateGraphicFilterMosaic(weld::Window* pParent, + const Graphic& rGraphic) override; + virtual VclPtr<AbstractSvxAreaTabDialog> CreateSvxAreaTabDialog(weld::Window* pParent, + const SfxItemSet* pAttr, + SdrModel* pModel, + bool bShadow) override; + virtual VclPtr<SfxAbstractTabDialog> CreateSvxLineTabDialog(weld::Window* pParent, const SfxItemSet* pAttr, + SdrModel* pModel, + const SdrObject* pObj, + bool bHasObj ) override; + virtual VclPtr<AbstractSvxPostItDialog> CreateSvxPostItDialog(weld::Widget* pParent, + const SfxItemSet& rCoreSet, + bool bPrevNext = false) override; + + // For TabPage + virtual CreateTabPage GetTabPageCreatorFunc( sal_uInt16 nId ) override; + + virtual GetTabPageRanges GetTabPageRangesFunc( sal_uInt16 nId ) override; + virtual DialogGetRanges GetDialogGetRangesFunc() override; + virtual VclPtr<VclAbstractDialog> CreateSvxScriptOrgDialog(weld::Window* pParent, const OUString& rLanguage) override; + + virtual VclPtr<AbstractScriptSelectorDialog> CreateScriptSelectorDialog(weld::Window* pParent, + const css::uno::Reference< css::frame::XFrame >& rxFrame) override; + + virtual VclPtr<VclAbstractDialog> CreateScriptErrorDialog(const css::uno::Any& rException) override; + + virtual VclPtr<VclAbstractDialog> CreateSvxMacroAssignDlg( + weld::Window* _pParent, + const css::uno::Reference< css::frame::XFrame >& _rxDocumentFrame, + const bool _bUnoDialogMode, + const css::uno::Reference< css::container::XNameReplace >& _rxEvents, + const sal_uInt16 _nInitiallySelectedEvent + ) override; + + virtual VclPtr<SfxAbstractTabDialog> CreateSvxFormatCellsDialog(weld::Window* pParent, const SfxItemSet* pAttr, const SdrModel& rModel) override; + + virtual VclPtr<SvxAbstractSplitTableDialog> CreateSvxSplitTableDialog(weld::Window* pParent, bool bIsTableVertical, long nMaxVertical) override; + + virtual std::shared_ptr<SvxAbstractNewTableDialog> CreateSvxNewTableDialog(weld::Window* pParent) override ; + + virtual VclPtr<VclAbstractDialog> CreateOptionsDialog( + weld::Window* pParent, const OUString& rExtensionId ) override; + + virtual VclPtr<SvxAbstractInsRowColDlg> CreateSvxInsRowColDlg(weld::Window* pParent, bool bCol, const OString& rHelpId) override; + + virtual VclPtr<AbstractPasswordToOpenModifyDialog> CreatePasswordToOpenModifyDialog(weld::Window* pParent, sal_uInt16 nMaxPasswdLen, bool bIsPasswordToModify) override; + + virtual VclPtr<AbstractScreenshotAnnotationDlg> CreateScreenshotAnnotationDlg(weld::Dialog& rParentDialog) override; + + virtual VclPtr<AbstractSignatureLineDialog> + CreateSignatureLineDialog(weld::Window* pParent, + const css::uno::Reference<css::frame::XModel> xModel, bool bEditExisting) override; + + virtual VclPtr<AbstractSignSignatureLineDialog> + CreateSignSignatureLineDialog(weld::Window* pParent, + const css::uno::Reference<css::frame::XModel> xModel) override; + + virtual VclPtr<AbstractQrCodeGenDialog> + CreateQrCodeGenDialog(weld::Window* pParent, + const css::uno::Reference<css::frame::XModel> xModel, bool bEditExisting) override; + + virtual VclPtr<AbstractAboutDialog> CreateAboutDialog(weld::Window* pParent) override; + + virtual VclPtr<AbstractTipOfTheDayDialog> CreateTipOfTheDayDialog(weld::Window* pParent) override; + + virtual VclPtr<AbstractDiagramDialog> CreateDiagramDialog( + weld::Window* pParent, + std::shared_ptr<DiagramDataInterface> pDiagramData) override; +}; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cui/source/factory/init.cxx b/cui/source/factory/init.cxx new file mode 100644 index 000000000..87f3105a0 --- /dev/null +++ b/cui/source/factory/init.cxx @@ -0,0 +1,44 @@ +/* -*- 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 <cui/cuicharmap.hxx> + +// hook to call special character dialog for edits +// caution: needs C-Linkage since dynamically loaded via symbol name +extern "C" +{ +SAL_DLLPUBLIC_EXPORT bool GetSpecialCharsForEdit(weld::Widget* i_pParent, const vcl::Font& i_rFont, OUString& o_rResult) +{ + bool bRet = false; + SvxCharacterMap aDlg(i_pParent, nullptr, nullptr); + aDlg.DisableFontSelection(); + aDlg.SetCharFont(i_rFont); + if (aDlg.run() == RET_OK) + { + sal_UCS4 cChar = aDlg.GetChar(); + // using the new UCS4 constructor + OUString aOUStr( &cChar, 1 ); + o_rResult = aOUStr; + bRet = true; + } + return bRet; +} +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |