tdf#130857 qt weld: Support mail merge "Server Auth" dialog
[LibreOffice.git] / cui / source / factory / dlgfact.cxx
blobbb1561f4803c769b6c804fc35497152ef72ac671
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #include <config_extensions.h>
21 #include <config_wasm_strip.h>
23 #include <align.hxx>
24 #include "dlgfact.hxx"
26 #include <about.hxx>
27 #include <sfx2/app.hxx>
28 #include <sfx2/basedlgs.hxx>
29 #include <sfx2/pageids.hxx>
30 #include <svx/dialogs.hrc>
31 #include <svx/svxids.hrc>
32 #include <numfmt.hxx>
33 #include <splitcelldlg.hxx>
34 #include <cuiimapwnd.hxx>
35 #include <svx/cuicharmap.hxx>
36 #include <srchxtra.hxx>
37 #include <textanim.hxx>
38 #include <autocdlg.hxx>
39 #include <treeopt.hxx>
40 #include <labdlg.hxx>
41 #include <hangulhanjadlg.hxx>
42 #include <showcols.hxx>
43 #include <zoom.hxx>
44 #include <cuigaldlg.hxx>
45 #include <transfrm.hxx>
46 #include <bbdlg.hxx>
47 #include <cuisrchdlg.hxx>
48 #include <cuitbxform.hxx>
49 #include <optdict.hxx>
50 #include <multipat.hxx>
51 #include <cuihyperdlg.hxx>
52 #include <cuifmsearch.hxx>
53 #include <cuigrfflt.hxx>
54 #include <cuitabarea.hxx>
55 #include <cuitabline.hxx>
56 #include <measure.hxx>
57 #include <connect.hxx>
58 #include <dbregister.hxx>
59 #include <cuioptgenrl.hxx>
60 #include <optasian.hxx>
61 #include <insdlg.hxx>
62 #include <pastedlg.hxx>
63 #include <linkdlg.hxx>
64 #include <SignatureLineDialog.hxx>
65 #include <SignSignatureLineDialog.hxx>
66 #include <QrCodeGenDialog.hxx>
67 #include <SpellDialog.hxx>
68 #include <cfg.hxx>
69 #include <numpages.hxx>
70 #include <paragrph.hxx>
71 #include <tabstpge.hxx>
72 #include <textattr.hxx>
73 #include <backgrnd.hxx>
74 #include <border.hxx>
75 #include <chardlg.hxx>
76 #include <page.hxx>
77 #include <postdlg.hxx>
78 #include <grfpage.hxx>
79 #include <scriptdlg.hxx>
80 #include <cfgutil.hxx>
81 #include <macropg.hxx>
82 #include <sdrcelldlg.hxx>
83 #include <newtabledlg.hxx>
84 #include <macroass.hxx>
85 #include <insrc.hxx>
86 #include <passwdomdlg.hxx>
87 #include <screenshotannotationdlg.hxx>
88 #include <hyphen.hxx>
89 #include <thesdlg.hxx>
90 #include <tipofthedaydlg.hxx>
91 #include <widgettestdlg.hxx>
92 #include <toolbarmodedlg.hxx>
93 #include <DiagramDialog.hxx>
94 #include <fileextcheckdlg.hxx>
95 #include <TextColumnsPage.hxx>
97 #include <MacroManagerDialog.hxx>
99 using namespace ::com::sun::star;
100 using namespace ::com::sun::star::frame;
101 using namespace ::com::sun::star::container;
103 using ::com::sun::star::uno::Reference;
105 using namespace svx;
107 IMPL_ABSTDLG_CLASS_ASYNC(AbstractAdditionsDialog, weld::GenericDialogController)
108 IMPL_ABSTDLG_CLASS_ASYNC(AbstractDiagramDialog, DiagramDialog)
109 IMPL_ABSTDLG_CLASS(AbstractFmInputRecordNoDialog)
110 IMPL_ABSTDLG_CLASS(AbstractFmSearchDialog)
111 IMPL_ABSTDLG_CLASS(AbstractFmShowColsDialog)
112 IMPL_ABSTDLG_CLASS(AbstractGalleryIdDialog)
113 IMPL_ABSTDLG_CLASS_ASYNC(AbstractGraphicFilterDialog, GraphicFilterDialog)
114 IMPL_ABSTDLG_CLASS(AbstractHangulHanjaConversionDialog)
115 IMPL_ABSTDLG_CLASS(AbstractInsertObjectDialog)
116 IMPL_ABSTDLG_CLASS_ASYNC(AbstractLinksDialog, SvBaseLinksDlg)
117 IMPL_ABSTDLG_CLASS(AbstractScreenshotAnnotationDlg)
118 IMPL_ABSTDLG_CLASS_ASYNC(AbstractSignatureLineDialog, SignatureLineDialog)
119 IMPL_ABSTDLG_CLASS_ASYNC(AbstractSignSignatureLineDialog, SignSignatureLineDialog)
120 IMPL_ABSTDLG_CLASS(AbstractSvxCharacterMapDialog)
121 IMPL_ABSTDLG_CLASS(AbstractSecurityOptionsDialog)
122 IMPL_ABSTDLG_CLASS(AbstractSvxHpLinkDlg)
123 IMPL_ABSTDLG_CLASS(AbstractSvxJSearchOptionsDialog)
124 IMPL_ABSTDLG_CLASS(AbstractSvxMultiPathDialog)
125 IMPL_ABSTDLG_CLASS(AbstractSvxNameDialog)
126 IMPL_ABSTDLG_CLASS(AbstractSvxNewDictionaryDialog)
127 IMPL_ABSTDLG_CLASS_ASYNC(AbstractSvxObjectNameDialog, SvxObjectNameDialog)
128 IMPL_ABSTDLG_CLASS_ASYNC(AbstractSvxObjectTitleDescDialog, SvxObjectTitleDescDialog)
129 IMPL_ABSTDLG_CLASS(AbstractSvxPathSelectDialog)
130 IMPL_ABSTDLG_CLASS(AbstractSvxPostItDialog)
131 IMPL_ABSTDLG_CLASS_ASYNC(AbstractSvxSearchSimilarityDialog,SvxSearchSimilarityDialog)
132 IMPL_ABSTDLG_CLASS(AbstractSvxZoomDialog)
133 IMPL_ABSTDLG_CLASS(AbstractTitleDialog)
134 IMPL_ABSTDLG_CLASS(AbstractURLDlg)
135 IMPL_ABSTDLG_CLASS_ASYNC(AbstractPasswordToOpenModifyDialog,weld::DialogController)
136 IMPL_ABSTDLG_CLASS_ASYNC(AbstractQrCodeGenDialog,QrCodeGenDialog)
137 IMPL_ABSTDLG_CLASS_ASYNC(AbstractPasteDialog,SfxDialogController)
138 IMPL_ABSTDLG_CLASS_ASYNC(AbstractScriptSelectorDialog,SfxDialogController)
139 IMPL_ABSTDLG_CLASS_ASYNC(AbstractMacroManagerDialog,SfxDialogController)
140 IMPL_ABSTDLG_CLASS_ASYNC(AbstractSpellDialog,SfxDialogController)
141 IMPL_ABSTDLG_CLASS_ASYNC(AbstractSvxAreaTabDialog,SfxTabDialogController)
142 IMPL_ABSTDLG_CLASS_ASYNC(AbstractSvxCaptionDialog,SfxTabDialogController)
143 IMPL_ABSTDLG_CLASS_ASYNC(AbstractSvxTransformTabDialog,SfxTabDialogController)
144 IMPL_ABSTDLG_CLASS_ASYNC(AbstractThesaurusDialog,SfxDialogController)
145 IMPL_ABSTDLG_CLASS_ASYNC(CuiAbstractControllerAsync,weld::DialogController)
146 IMPL_ABSTDLG_CLASS_ASYNC(CuiAbstractTabController,SfxTabDialogController)
147 IMPL_ABSTDLG_CLASS(CuiAbstractController)
148 IMPL_ABSTDLG_CLASS_ASYNC(CuiAbstractSingleTabController, SfxSingleTabDialogController)
149 IMPL_ABSTDLG_CLASS_ASYNC(CuiAbstractWidgetTestControllerAsync,weld::GenericDialogController)
151 short AbstractHyphenWordDialog_Impl::Execute()
153 #if !ENABLE_WASM_STRIP_HUNSPELL
154 return m_xDlg->run();
155 #else
156 return 0;
157 #endif
160 const SfxItemSet* AbstractSvxCharacterMapDialog_Impl::GetOutputItemSet() const
162 return m_xDlg->GetOutputItemSet();
165 void AbstractSvxCharacterMapDialog_Impl::SetText(const OUString& rStr)
167 m_xDlg->set_title(rStr);
170 bool AbstractSvxCharacterMapDialog_Impl::StartExecuteAsync(AsyncContext &rCtx)
172 m_xDlg->prepForRun();
173 return SvxCharacterMap::runAsync(m_xDlg, rCtx.maEndDialogFn);
176 void CuiAbstractTabController_Impl::SetCurPageId( const OUString &rName )
178 m_xDlg->SetCurPageId( rName );
181 const SfxItemSet* CuiAbstractTabController_Impl::GetOutputItemSet() const
183 return m_xDlg->GetOutputItemSet();
186 WhichRangesContainer CuiAbstractTabController_Impl::GetInputRanges(const SfxItemPool& pItem )
188 return m_xDlg->GetInputRanges( pItem );
191 void CuiAbstractTabController_Impl::SetInputSet( const SfxItemSet* pInSet )
193 m_xDlg->SetInputSet( pInSet );
196 //From class Window.
197 void CuiAbstractTabController_Impl::SetText( const OUString& rStr )
199 m_xDlg->set_title(rStr);
202 std::vector<OUString> CuiAbstractTabController_Impl::getAllPageUIXMLDescriptions() const
204 return m_xDlg->getAllPageUIXMLDescriptions();
207 bool CuiAbstractTabController_Impl::selectPageByUIXMLDescription(const OUString& rUIXMLDescription)
209 return m_xDlg->selectPageByUIXMLDescription(rUIXMLDescription);
212 BitmapEx CuiAbstractTabController_Impl::createScreenshot() const
214 return m_xDlg->createScreenshot();
217 OUString CuiAbstractTabController_Impl::GetScreenshotId() const
219 return m_xDlg->GetScreenshotId();
222 const SfxItemSet* CuiAbstractSingleTabController_Impl::GetOutputItemSet() const
224 return m_xDlg->GetOutputItemSet();
227 void CuiAbstractSingleTabController_Impl::SetText(const OUString& rStr)
229 m_xDlg->set_title(rStr);
232 void AbstractHangulHanjaConversionDialog_Impl::EndDialog(sal_Int32 nResult)
234 m_xDlg->response(nResult);
237 void AbstractHangulHanjaConversionDialog_Impl::EnableRubySupport( bool _bVal )
239 m_xDlg->EnableRubySupport(_bVal);
242 void AbstractHangulHanjaConversionDialog_Impl::SetByCharacter( bool _bByCharacter )
244 m_xDlg->SetByCharacter(_bByCharacter);
247 void AbstractHangulHanjaConversionDialog_Impl::SetConversionDirectionState( bool _bTryBothDirections, editeng::HangulHanjaConversion::ConversionDirection _ePrimaryConversionDirection )
249 m_xDlg->SetConversionDirectionState(_bTryBothDirections, _ePrimaryConversionDirection);
252 void AbstractHangulHanjaConversionDialog_Impl::SetConversionFormat( editeng::HangulHanjaConversion::ConversionFormat _eType )
254 m_xDlg->SetConversionFormat(_eType);
257 void AbstractHangulHanjaConversionDialog_Impl::SetOptionsChangedHdl( const Link<LinkParamNone*,void>& _rHdl )
259 m_xDlg->SetOptionsChangedHdl(_rHdl );
262 void AbstractHangulHanjaConversionDialog_Impl::SetIgnoreHdl( const Link<weld::Button&,void>& _rHdl )
264 m_xDlg->SetIgnoreHdl(_rHdl );
267 void AbstractHangulHanjaConversionDialog_Impl::SetIgnoreAllHdl(const Link<weld::Button&,void>& rHdl)
269 m_xDlg->SetIgnoreAllHdl(rHdl);
272 void AbstractHangulHanjaConversionDialog_Impl::SetChangeHdl(const Link<weld::Button&,void>& rHdl)
274 m_xDlg->SetChangeHdl(rHdl);
277 void AbstractHangulHanjaConversionDialog_Impl::SetChangeAllHdl( const Link<weld::Button&,void>& rHdl )
279 m_xDlg->SetChangeAllHdl(rHdl);
282 void AbstractHangulHanjaConversionDialog_Impl::SetClickByCharacterHdl( const Link<weld::Toggleable&,void>& _rHdl )
284 m_xDlg->SetClickByCharacterHdl(_rHdl );
287 void AbstractHangulHanjaConversionDialog_Impl::SetConversionFormatChangedHdl(const Link<weld::Toggleable&,void>& rHdl)
289 m_xDlg->SetConversionFormatChangedHdl(rHdl);
292 void AbstractHangulHanjaConversionDialog_Impl::SetFindHdl( const Link<weld::Button&,void>& rHdl )
294 m_xDlg->SetFindHdl(rHdl);
297 bool AbstractHangulHanjaConversionDialog_Impl::GetUseBothDirections( ) const
299 return m_xDlg->GetUseBothDirections();
302 editeng::HangulHanjaConversion::ConversionDirection AbstractHangulHanjaConversionDialog_Impl::GetDirection( editeng::HangulHanjaConversion::ConversionDirection _eDefaultDirection ) const
304 return m_xDlg->GetDirection( _eDefaultDirection );
307 void AbstractHangulHanjaConversionDialog_Impl::SetCurrentString(
308 const OUString& _rNewString,
309 const css::uno::Sequence< OUString >& _rSuggestions,
310 bool _bOriginatesFromDocument
313 m_xDlg->SetCurrentString(_rNewString,_rSuggestions,_bOriginatesFromDocument);
316 OUString AbstractHangulHanjaConversionDialog_Impl::GetCurrentString( ) const
318 return m_xDlg->GetCurrentString();
321 editeng::HangulHanjaConversion::ConversionFormat AbstractHangulHanjaConversionDialog_Impl::GetConversionFormat( ) const
323 return m_xDlg->GetConversionFormat();
326 void AbstractHangulHanjaConversionDialog_Impl::FocusSuggestion( )
328 m_xDlg->FocusSuggestion();
331 OUString AbstractHangulHanjaConversionDialog_Impl::GetCurrentSuggestion( ) const
333 return m_xDlg->GetCurrentSuggestion();
336 OUString AbstractThesaurusDialog_Impl::GetWord()
338 return m_xDlg->GetWord();
341 Reference < css::embed::XEmbeddedObject > AbstractInsertObjectDialog_Impl::GetObject()
343 return m_xDlg->GetObject();
346 bool AbstractInsertObjectDialog_Impl::IsCreateNew()
348 return m_xDlg->IsCreateNew();
351 ::Reference< css::io::XInputStream > AbstractInsertObjectDialog_Impl::GetIconIfIconified( OUString* pGraphicMediaType )
353 return m_xDlg->GetIconIfIconified( pGraphicMediaType );
356 void AbstractPasteDialog_Impl::Insert(SotClipboardFormatId nFormat, const OUString& rFormatName)
358 m_xDlg->Insert(nFormat, rFormatName);
361 void AbstractPasteDialog_Impl::InsertUno(const OUString& sCmd, const OUString& sLabel)
363 m_xDlg->InsertUno(sCmd, sLabel);
366 void AbstractPasteDialog_Impl::SetObjName(const SvGlobalName & rClass, const OUString& rObjName)
368 m_xDlg->SetObjName(rClass, rObjName);
371 void AbstractPasteDialog_Impl::PreGetFormat( const TransferableDataHelper& aHelper )
373 m_xDlg->PreGetFormat(aHelper);
376 SotClipboardFormatId AbstractPasteDialog_Impl::GetFormatOnly()
378 return m_xDlg->GetFormatOnly();
381 SotClipboardFormatId AbstractPasteDialog_Impl::GetFormat( const TransferableDataHelper& aHelper )
383 return m_xDlg->GetFormat(aHelper);
386 void AbstractFmShowColsDialog_Impl::SetColumns(const ::Reference< css::container::XIndexContainer>& xCols)
388 m_xDlg->SetColumns(xCols);
391 void AbstractSvxZoomDialog_Impl::SetLimits( sal_uInt16 nMin, sal_uInt16 nMax )
393 m_xDlg->SetLimits( nMin, nMax );
396 void AbstractSvxZoomDialog_Impl::HideButton( ZoomButtonId nBtnId )
398 m_xDlg->HideButton( nBtnId );
401 const SfxItemSet* AbstractSvxZoomDialog_Impl::GetOutputItemSet() const
403 return m_xDlg->GetOutputItemSet();
406 void AbstractSpellDialog_Impl::InvalidateDialog()
408 m_xDlg->InvalidateDialog();
411 std::shared_ptr<SfxDialogController> AbstractSpellDialog_Impl::GetController()
413 return m_xDlg;
416 SfxBindings& AbstractSpellDialog_Impl::GetBindings()
418 return m_xDlg->GetBindings();
421 OUString AbstractTitleDialog_Impl::GetTitle() const
423 return m_xDlg->GetTitle();
426 sal_uInt32 AbstractGalleryIdDialog_Impl::GetId() const
428 return m_xDlg->GetId();
431 OUString AbstractURLDlg_Impl::GetURL() const
433 return m_xDlg->GetURL();
436 OUString AbstractURLDlg_Impl::GetAltText() const
438 return m_xDlg->GetAltText();
441 OUString AbstractURLDlg_Impl::GetDesc() const
443 return m_xDlg->GetDesc();
446 OUString AbstractURLDlg_Impl::GetTarget() const
448 return m_xDlg->GetTarget();
451 OUString AbstractURLDlg_Impl::GetName() const
453 return m_xDlg->GetName();
456 sal_uInt16 AbstractSvxSearchSimilarityDialog_Impl::GetOther()
458 return m_xDlg->GetOther();
461 sal_uInt16 AbstractSvxSearchSimilarityDialog_Impl::GetShorter()
463 return m_xDlg->GetShorter();
466 sal_uInt16 AbstractSvxSearchSimilarityDialog_Impl::GetLonger()
468 return m_xDlg->GetLonger();
471 bool AbstractSvxSearchSimilarityDialog_Impl::IsRelaxed()
473 return m_xDlg->IsRelaxed();
476 // AbstractSvxTransformTabDialog implementations just forwards everything to the dialog
477 void AbstractSvxTransformTabDialog_Impl::SetCurPageId( const OUString& rName )
479 m_xDlg->SetCurPageId( rName );
482 const SfxItemSet* AbstractSvxTransformTabDialog_Impl::GetOutputItemSet() const
484 return m_xDlg->GetOutputItemSet();
487 WhichRangesContainer AbstractSvxTransformTabDialog_Impl::GetInputRanges(const SfxItemPool& pItem )
489 return m_xDlg->GetInputRanges( pItem );
492 void AbstractSvxTransformTabDialog_Impl::SetInputSet( const SfxItemSet* pInSet )
494 m_xDlg->SetInputSet( pInSet );
497 //From class Window.
498 void AbstractSvxTransformTabDialog_Impl::SetText( const OUString& rStr )
500 m_xDlg->set_title(rStr);
503 void AbstractSvxTransformTabDialog_Impl::SetValidateFramePosLink( const Link<SvxSwFrameValidation&,void>& rLink )
505 m_xDlg->SetValidateFramePosLink( rLink );
508 // AbstractSvxCaptionDialog implementations just forwards everything to the dialog
509 void AbstractSvxCaptionDialog_Impl::SetCurPageId( const OUString& rName )
511 m_xDlg->SetCurPageId(rName);
514 const SfxItemSet* AbstractSvxCaptionDialog_Impl::GetOutputItemSet() const
516 return m_xDlg->GetOutputItemSet();
519 WhichRangesContainer AbstractSvxCaptionDialog_Impl::GetInputRanges(const SfxItemPool& pItem )
521 return m_xDlg->GetInputRanges( pItem );
524 void AbstractSvxCaptionDialog_Impl::SetInputSet( const SfxItemSet* pInSet )
526 m_xDlg->SetInputSet( pInSet );
529 void AbstractSvxCaptionDialog_Impl::SetText( const OUString& rStr )
531 m_xDlg->set_title(rStr);
534 void AbstractSvxCaptionDialog_Impl::SetValidateFramePosLink( const Link<SvxSwFrameValidation&,void>& rLink )
536 m_xDlg->SetValidateFramePosLink( rLink );
539 TransliterationFlags AbstractSvxJSearchOptionsDialog_Impl::GetTransliterationFlags() const
541 return m_xDlg->GetTransliterationFlags();
544 void AbstractFmInputRecordNoDialog_Impl::SetValue(tools::Long nNew)
546 m_xDlg->SetValue(nNew);
549 tools::Long AbstractFmInputRecordNoDialog_Impl::GetValue() const
551 return m_xDlg->GetValue();
554 ::Reference< css::linguistic2::XDictionary > AbstractSvxNewDictionaryDialog_Impl::GetNewDictionary()
556 return m_xDlg->GetNewDictionary();
559 OUString AbstractSvxNameDialog_Impl::GetName()
561 return m_xDlg->GetName();
564 void AbstractSvxNameDialog_Impl::SetCheckNameHdl( const Link<AbstractSvxNameDialog&,bool>& rLink )
566 aCheckNameHdl = rLink;
567 if( rLink.IsSet() )
568 m_xDlg->SetCheckNameHdl( LINK(this, AbstractSvxNameDialog_Impl, CheckNameHdl) );
569 else
570 m_xDlg->SetCheckNameHdl( Link<SvxNameDialog&,bool>() );
573 void AbstractSvxNameDialog_Impl::SetCheckNameTooltipHdl( const Link<AbstractSvxNameDialog&,OUString>& rLink)
575 aCheckNameTooltipHdl = rLink;
576 if( rLink.IsSet() )
577 m_xDlg->SetCheckNameTooltipHdl( LINK(this, AbstractSvxNameDialog_Impl, CheckNameTooltipHdl));
578 else
579 m_xDlg->SetCheckNameTooltipHdl( Link<SvxNameDialog&,OUString>());
582 void AbstractSvxNameDialog_Impl::SetEditHelpId(const OUString& rHelpId)
584 m_xDlg->SetEditHelpId(rHelpId);
587 void AbstractSvxNameDialog_Impl::SetHelpId(const OUString& rHelpId)
589 m_xDlg->set_help_id(rHelpId);
592 void AbstractSvxNameDialog_Impl::SetText( const OUString& rStr )
594 m_xDlg->set_title(rStr);
597 IMPL_LINK_NOARG(AbstractSvxNameDialog_Impl, CheckNameHdl, SvxNameDialog&, bool)
599 return aCheckNameHdl.Call(*this);
602 IMPL_LINK_NOARG(AbstractSvxNameDialog_Impl, CheckNameTooltipHdl, SvxNameDialog&, OUString)
604 return aCheckNameTooltipHdl.Call(*this);
607 OUString AbstractSvxObjectNameDialog_Impl::GetName()
609 return m_xDlg->GetName();
612 void AbstractSvxObjectNameDialog_Impl::SetCheckNameHdl(const Link<AbstractSvxObjectNameDialog&,bool>& rLink)
614 aCheckNameHdl = rLink;
616 if(rLink.IsSet())
618 m_xDlg->SetCheckNameHdl(LINK(this, AbstractSvxObjectNameDialog_Impl, CheckNameHdl));
620 else
622 m_xDlg->SetCheckNameHdl(Link<SvxObjectNameDialog&,bool>());
626 IMPL_LINK_NOARG(AbstractSvxObjectNameDialog_Impl, CheckNameHdl, SvxObjectNameDialog&, bool)
628 return aCheckNameHdl.Call(*this);
631 OUString AbstractSvxObjectTitleDescDialog_Impl::GetTitle()
633 return m_xDlg->GetTitle();
636 OUString AbstractSvxObjectTitleDescDialog_Impl::GetDescription()
638 return m_xDlg->GetDescription();
641 bool AbstractSvxObjectTitleDescDialog_Impl::IsDecorative()
643 return m_xDlg->IsDecorative();
646 OUString AbstractSvxMultiPathDialog_Impl::GetPath() const
648 return m_xDlg->GetPath();
651 void AbstractSvxMultiPathDialog_Impl::SetPath( const OUString& rPath )
653 m_xDlg->SetPath( rPath );
656 void AbstractSvxMultiPathDialog_Impl::SetTitle( const OUString& rNewTitle )
658 m_xDlg->SetTitle(rNewTitle);
661 OUString AbstractSvxPathSelectDialog_Impl::GetPath() const
663 return m_xDlg->GetPath();
666 void AbstractSvxPathSelectDialog_Impl::SetPath( const OUString& rPath )
668 m_xDlg->SetPath( rPath );
671 void AbstractSvxPathSelectDialog_Impl::SetTitle( const OUString& rNewTitle )
673 m_xDlg->SetTitle(rNewTitle);
676 std::shared_ptr<SfxDialogController> AbstractSvxHpLinkDlg_Impl::GetController()
678 return m_xDlg;
681 bool AbstractSvxHpLinkDlg_Impl::QueryClose()
683 return m_xDlg->QueryClose();
686 void AbstractFmSearchDialog_Impl::SetFoundHandler(const Link<FmFoundRecordInformation&,void>& lnk)
688 m_xDlg->SetFoundHandler(lnk);
691 void AbstractFmSearchDialog_Impl::SetCanceledNotFoundHdl(const Link<FmFoundRecordInformation&,void>& lnk)
693 m_xDlg->SetCanceledNotFoundHdl(lnk);
696 void AbstractFmSearchDialog_Impl::SetActiveField(const OUString& strField)
698 m_xDlg->SetActiveField(strField);
701 Graphic AbstractGraphicFilterDialog_Impl::GetFilteredGraphic(const Graphic& rGraphic, double fScaleX, double fScaleY)
703 return m_xDlg->GetFilteredGraphic(rGraphic, fScaleX, fScaleY);
706 // AbstractSvxAreaTabDialog implementations just forwards everything to the dialog
707 void AbstractSvxAreaTabDialog_Impl::SetCurPageId( const OUString& rName )
709 m_xDlg->SetCurPageId( rName );
712 const SfxItemSet* AbstractSvxAreaTabDialog_Impl::GetOutputItemSet() const
714 return m_xDlg->GetOutputItemSet();
717 WhichRangesContainer AbstractSvxAreaTabDialog_Impl::GetInputRanges(const SfxItemPool& pItem )
719 return m_xDlg->GetInputRanges( pItem );
722 void AbstractSvxAreaTabDialog_Impl::SetInputSet( const SfxItemSet* pInSet )
724 m_xDlg->SetInputSet( pInSet );
727 void AbstractSvxAreaTabDialog_Impl::SetText( const OUString& rStr )
729 m_xDlg->set_title(rStr);
732 void AbstractSvxPostItDialog_Impl::SetText( const OUString& rStr )
734 m_xDlg->set_title(rStr);
737 const SfxItemSet* AbstractSvxPostItDialog_Impl::GetOutputItemSet() const
739 return m_xDlg->GetOutputItemSet();
742 void AbstractSvxPostItDialog_Impl::EnableTravel(bool bNext, bool bPrev)
744 m_xDlg->EnableTravel( bNext, bPrev );
747 OUString AbstractSvxPostItDialog_Impl::GetNote()
749 return m_xDlg->GetNote();
752 void AbstractSvxPostItDialog_Impl::SetNote(const OUString& rTxt)
754 m_xDlg->SetNote( rTxt );
757 void AbstractSvxPostItDialog_Impl::ShowLastAuthor(const OUString& rAuthor, const OUString& rDate)
759 m_xDlg->ShowLastAuthor( rAuthor, rDate );
762 void AbstractSvxPostItDialog_Impl::DontChangeAuthor()
764 m_xDlg->DontChangeAuthor();
767 void AbstractSvxPostItDialog_Impl::HideAuthor()
769 m_xDlg->HideAuthor();
772 void AbstractSvxPostItDialog_Impl::SetNextHdl( const Link<AbstractSvxPostItDialog&,void>& rLink )
774 aNextHdl = rLink;
775 if( rLink.IsSet() )
776 m_xDlg->SetNextHdl( LINK(this, AbstractSvxPostItDialog_Impl, NextHdl ) );
777 else
778 m_xDlg->SetNextHdl( Link<SvxPostItDialog&,void>() );
781 void AbstractSvxPostItDialog_Impl::SetPrevHdl( const Link<AbstractSvxPostItDialog&,void>& rLink )
783 aPrevHdl = rLink;
784 if( rLink.IsSet() )
785 m_xDlg->SetPrevHdl( LINK(this, AbstractSvxPostItDialog_Impl, PrevHdl ) );
786 else
787 m_xDlg->SetPrevHdl( Link<SvxPostItDialog&,void>() );
790 IMPL_LINK_NOARG(AbstractSvxPostItDialog_Impl, NextHdl, SvxPostItDialog&, void)
792 aNextHdl.Call(*this);
795 IMPL_LINK_NOARG(AbstractSvxPostItDialog_Impl, PrevHdl, SvxPostItDialog&, void)
797 aPrevHdl.Call(*this);
800 std::shared_ptr<weld::Dialog> AbstractSvxPostItDialog_Impl::GetDialog()
802 return m_xDlg->GetDialog();
805 OUString AbstractPasswordToOpenModifyDialog_Impl::GetPasswordToOpen() const
807 return m_xDlg->GetPasswordToOpen();
810 OUString AbstractPasswordToOpenModifyDialog_Impl::GetPasswordToModify() const
812 return m_xDlg->GetPasswordToModify();
815 bool AbstractPasswordToOpenModifyDialog_Impl::IsRecommendToOpenReadonly() const
817 return m_xDlg->IsRecommendToOpenReadonly();
820 void AbstractPasswordToOpenModifyDialog_Impl::Response(sal_Int32 nResult)
822 m_xDlg->response(nResult);
825 void AbstractPasswordToOpenModifyDialog_Impl::AllowEmpty()
827 m_xDlg->AllowEmpty();
830 // Create dialogs with simplest interface
831 VclPtr<VclAbstractDialog> AbstractDialogFactory_Impl::CreateVclDialog(weld::Window* pParent, sal_uInt32 nResId)
833 switch ( nResId )
835 case SID_OPTIONS_DATABASES :
837 Reference< frame::XFrame > xFrame;
838 auto xDlg = std::make_shared<OfaTreeOptionsDialog>(pParent, xFrame, /*bActivateLastSelection*/false);
839 xDlg->ActivatePage(SID_SB_DBREGISTEROPTIONS);
840 return VclPtr<CuiAbstractControllerAsync_Impl>::Create(std::move(xDlg));
842 case SID_OPTIONS_TREEDIALOG :
843 case SID_LANGUAGE_OPTIONS :
845 bool bActivateLastSelection = false;
846 if (nResId == SID_OPTIONS_TREEDIALOG)
847 bActivateLastSelection = true;
848 Reference< frame::XFrame > xFrame;
849 auto xDlg = std::make_unique<OfaTreeOptionsDialog>(pParent, xFrame, bActivateLastSelection);
850 if (nResId == SID_LANGUAGE_OPTIONS)
852 //open the tab page "tools/options/languages"
853 xDlg->ActivatePage(OFA_TP_LANGUAGES_FOR_SET_DOCUMENT_LANGUAGE);
855 return VclPtr<CuiAbstractController_Impl>::Create(std::move(xDlg));
857 break;
859 default:
860 assert(false);
861 return nullptr;
865 VclPtr<VclAbstractDialog> AbstractDialogFactory_Impl::CreateFrameDialog(weld::Window* pParent, const Reference< frame::XFrame >& rxFrame,
866 sal_uInt32 nResId, sal_uInt16 nPageId, const OUString& rParameter)
868 std::unique_ptr<OfaTreeOptionsDialog> xDlg;
869 if (SID_OPTIONS_TREEDIALOG == nResId || SID_OPTIONS_DATABASES == nResId)
871 // only activate last page if we don't want to activate a special page
872 bool bActivateLastSelection = ( nResId != SID_OPTIONS_DATABASES && rParameter.isEmpty() && !nPageId);
873 xDlg = std::make_unique<OfaTreeOptionsDialog>(pParent, rxFrame, bActivateLastSelection);
874 if ( nResId == SID_OPTIONS_DATABASES )
875 xDlg->ActivatePage(SID_SB_DBREGISTEROPTIONS);
876 else if (nPageId)
877 xDlg->ActivatePage(nPageId);
878 else if ( !rParameter.isEmpty() )
879 xDlg->ActivatePage( rParameter );
882 if (xDlg)
883 return VclPtr<CuiAbstractController_Impl>::Create(std::move(xDlg));
884 return nullptr;
887 VclPtr<AbstractSecurityOptionsDialog> AbstractDialogFactory_Impl::CreateSvxSecurityOptionsDialog(weld::Window* pParent)
889 return VclPtr<AbstractSecurityOptionsDialog_Impl>::Create(std::make_unique<svx::SecurityOptionsDialog>(pParent));
892 bool AbstractSecurityOptionsDialog_Impl::SetSecurityOptions()
894 return m_xDlg->SetSecurityOptions();
897 // TabDialog outside the drawing layer
898 VclPtr<SfxAbstractTabDialog> AbstractDialogFactory_Impl::CreateAutoCorrTabDialog(weld::Window* pParent, const SfxItemSet* pAttrSet)
900 return VclPtr<CuiAbstractTabController_Impl>::Create(std::make_shared<OfaAutoCorrDlg>(pParent, pAttrSet));
903 VclPtr<SfxAbstractTabDialog> AbstractDialogFactory_Impl::CreateCustomizeTabDialog(weld::Window* pParent,
904 const SfxItemSet* pAttrSet,
905 const Reference< frame::XFrame >& xViewFrame )
907 auto xDlg1 = std::make_shared<SvxConfigDialog>(pParent, pAttrSet);
908 xDlg1->SetFrame(xViewFrame);
909 return VclPtr<CuiAbstractTabController_Impl>::Create(std::move(xDlg1));
912 // TabDialog that use functionality of the drawing layer
913 VclPtr<SfxAbstractTabDialog> AbstractDialogFactory_Impl::CreateTextTabDialog(weld::Window* pParent,
914 const SfxItemSet* pAttrSet,
915 SdrView* pView)
917 return VclPtr<CuiAbstractTabController_Impl>::Create(std::make_shared<SvxTextTabDialog>(pParent, pAttrSet, pView));
920 // TabDialog that use functionality of the drawing layer and add AnchorTypes -- for SvxCaptionTabDialog
921 VclPtr<AbstractSvxCaptionDialog> AbstractDialogFactory_Impl::CreateCaptionDialog(weld::Window* pParent,
922 const SdrView* pView,
923 SvxAnchorIds nAnchorTypes)
925 return VclPtr<AbstractSvxCaptionDialog_Impl>::Create(std::make_shared<SvxCaptionTabDialog>(pParent, pView, nAnchorTypes));
928 VclPtr<AbstractHangulHanjaConversionDialog> AbstractDialogFactory_Impl::CreateHangulHanjaConversionDialog(weld::Widget* pParent)
930 return VclPtr<AbstractHangulHanjaConversionDialog_Impl>::Create(std::make_unique<HangulHanjaConversionDialog>(pParent));
933 VclPtr<AbstractThesaurusDialog> AbstractDialogFactory_Impl::CreateThesaurusDialog(weld::Widget* pParent,
934 css::uno::Reference<css::linguistic2::XThesaurus> xThesaurus,
935 const OUString &rWord, LanguageType nLanguage)
937 return VclPtr<AbstractThesaurusDialog_Impl>::Create(std::make_shared<SvxThesaurusDialog>(pParent, xThesaurus, rWord, nLanguage));
940 VclPtr<AbstractHyphenWordDialog> AbstractDialogFactory_Impl::CreateHyphenWordDialog(weld::Widget* pParent,
941 const OUString &rWord, LanguageType nLang,
942 css::uno::Reference< css::linguistic2::XHyphenator > &xHyphen,
943 SvxSpellWrapper* pWrapper)
945 #if !ENABLE_WASM_STRIP_EXTRA
946 return VclPtr<AbstractHyphenWordDialog_Impl>::Create(std::make_unique<SvxHyphenWordDialog>(rWord, nLang, pParent, xHyphen, pWrapper));
947 #else
948 (void) pParent;
949 (void) rWord;
950 (void) nLang;
951 (void) xHyphen;
952 (void) pWrapper;
953 return nullptr;
954 #endif
957 VclPtr<AbstractFmShowColsDialog> AbstractDialogFactory_Impl::CreateFmShowColsDialog(weld::Window* pParent)
959 return VclPtr<AbstractFmShowColsDialog_Impl>::Create(std::make_unique<FmShowColsDialog>(pParent));
962 VclPtr<AbstractSvxZoomDialog> AbstractDialogFactory_Impl::CreateSvxZoomDialog(weld::Window* pParent, const SfxItemSet& rCoreSet)
964 return VclPtr<AbstractSvxZoomDialog_Impl>::Create(std::make_unique<SvxZoomDialog>(pParent, rCoreSet));
967 VclPtr<AbstractSpellDialog> AbstractDialogFactory_Impl::CreateSvxSpellDialog(
968 weld::Window* pParent,
969 SfxBindings* pBindings,
970 svx::SpellDialogChildWindow* pSpellChildWindow)
972 return VclPtr<AbstractSpellDialog_Impl>::Create(std::make_shared<svx::SpellDialog>(pSpellChildWindow, pParent, pBindings));
975 VclPtr<VclAbstractDialog> AbstractDialogFactory_Impl::CreateActualizeProgressDialog(weld::Widget* pParent,
976 GalleryTheme* pThm)
978 return VclPtr<CuiAbstractController_Impl>::Create(std::make_unique<ActualizeProgress>(pParent, pThm));
981 void AbstractDialogFactory_Impl::ShowAsyncScriptErrorDialog(weld::Window* pParent, const css::uno::Any& rException)
983 return SvxScriptErrorDialog::ShowAsyncErrorDialog(pParent, rException);
986 VclPtr<AbstractScriptSelectorDialog> AbstractDialogFactory_Impl::CreateScriptSelectorDialog(weld::Window* pParent,
987 const Reference<frame::XFrame>& rxFrame)
989 return VclPtr<AbstractScriptSelectorDialog_Impl>::Create(std::make_shared<SvxScriptSelectorDialog>(pParent, rxFrame));
992 OUString AbstractScriptSelectorDialog_Impl::GetScriptURL() const
994 return m_xDlg->GetScriptURL();
997 void AbstractScriptSelectorDialog_Impl::SetRunLabel()
999 m_xDlg->SetRunLabel();
1002 VclPtr<AbstractMacroManagerDialog>
1003 AbstractDialogFactory_Impl::CreateMacroManagerDialog(weld::Window* pParent,
1004 const Reference<frame::XFrame>& rxFrame)
1006 #if HAVE_FEATURE_SCRIPTING
1007 return VclPtr<AbstractMacroManagerDialog_Impl>::Create(
1008 std::make_shared<MacroManagerDialog>(pParent, rxFrame));
1009 #else
1010 (void)pParent;
1011 (void)rxFrame;
1012 return nullptr;
1013 #endif
1016 OUString AbstractMacroManagerDialog_Impl::GetScriptURL() const
1018 #if HAVE_FEATURE_SCRIPTING
1019 return m_xDlg->GetScriptURL();
1020 #else
1021 return OUString();
1022 #endif
1025 void AbstractMacroManagerDialog_Impl::LoadLastUsedMacro() const
1027 #if HAVE_FEATURE_SCRIPTING
1028 m_xDlg->LoadLastUsedMacro();
1029 #endif
1032 VclPtr<VclAbstractDialog> AbstractDialogFactory_Impl::CreateSvxScriptOrgDialog(weld::Window* pParent,
1033 const OUString& rLanguage)
1035 return VclPtr<CuiAbstractController_Impl>::Create(std::make_unique<SvxScriptOrgDialog>(pParent, rLanguage));
1038 VclPtr<AbstractTitleDialog> AbstractDialogFactory_Impl::CreateTitleDialog(weld::Widget* pParent,
1039 const OUString& rOldText)
1041 return VclPtr<AbstractTitleDialog_Impl>::Create(std::make_unique<TitleDialog>(pParent, rOldText));
1044 VclPtr<AbstractGalleryIdDialog> AbstractDialogFactory_Impl::CreateGalleryIdDialog(weld::Widget* pParent,
1045 GalleryTheme* pThm)
1047 return VclPtr<AbstractGalleryIdDialog_Impl>::Create(std::make_unique<GalleryIdDialog>(pParent, pThm));
1050 VclPtr<VclAbstractDialog> AbstractDialogFactory_Impl::CreateGalleryThemePropertiesDialog(weld::Widget* pParent,
1051 ExchangeData* pData,
1052 SfxItemSet* pItemSet)
1054 return VclPtr<CuiAbstractTabController_Impl>::Create(std::make_shared<GalleryThemeProperties>(
1055 pParent, pData, pItemSet));
1058 VclPtr<AbstractURLDlg> AbstractDialogFactory_Impl::CreateURLDialog(weld::Widget* pParent,
1059 const OUString& rURL, const OUString& rAltText, const OUString& rDescription,
1060 const OUString& rTarget, const OUString& rName,
1061 TargetList& rTargetList )
1063 return VclPtr<AbstractURLDlg_Impl>::Create(std::make_unique<URLDlg>(pParent, rURL, rAltText, rDescription,
1064 rTarget, rName, rTargetList));
1068 VclPtr<SfxAbstractTabDialog> AbstractDialogFactory_Impl::CreateTabItemDialog(weld::Window* pParent,
1069 const SfxItemSet& rSet)
1071 return VclPtr<CuiAbstractTabController_Impl>::Create(std::make_shared<SvxSearchFormatDialog>(
1072 pParent, rSet));
1075 VclPtr<VclAbstractDialog> AbstractDialogFactory_Impl::CreateSvxSearchAttributeDialog(weld::Window* pParent,
1076 SearchAttrItemList& rLst,
1077 const WhichRangesContainer& pWhRanges )
1079 return VclPtr<CuiAbstractController_Impl>::Create(std::make_unique<SvxSearchAttributeDialog>(pParent, rLst, pWhRanges));
1082 VclPtr<AbstractSvxSearchSimilarityDialog> AbstractDialogFactory_Impl::CreateSvxSearchSimilarityDialog(weld::Window* pParent,
1083 bool bRelax,
1084 sal_uInt16 nOther,
1085 sal_uInt16 nShorter,
1086 sal_uInt16 nLonger)
1088 return VclPtr<AbstractSvxSearchSimilarityDialog_Impl>::Create(std::make_unique<SvxSearchSimilarityDialog>(pParent, bRelax, nOther, nShorter, nLonger));
1091 VclPtr<SfxAbstractTabDialog> AbstractDialogFactory_Impl::CreateSvxBorderBackgroundDlg(
1092 weld::Window* pParent,
1093 const SfxItemSet& rCoreSet,
1094 bool bEnableDrawingLayerFillStyles)
1096 return VclPtr<CuiAbstractTabController_Impl>::Create(std::make_shared<SvxBorderBackgroundDlg>(
1097 pParent,
1098 rCoreSet,
1099 /*bEnableSelector*/true,
1100 bEnableDrawingLayerFillStyles));
1103 VclPtr<AbstractSvxTransformTabDialog> AbstractDialogFactory_Impl::CreateSvxTransformTabDialog(weld::Window* pParent,
1104 const SfxItemSet* pAttr,
1105 const SdrView* pView,
1106 SvxAnchorIds nAnchorTypes)
1108 return VclPtr<AbstractSvxTransformTabDialog_Impl>::Create(std::make_shared<SvxTransformTabDialog>(pParent, pAttr,pView, nAnchorTypes));
1111 VclPtr<SfxAbstractTabDialog> AbstractDialogFactory_Impl::CreateSchTransformTabDialog(weld::Window* pParent,
1112 const SfxItemSet* pAttr,
1113 const SdrView* pSdrView,
1114 bool bSizeTabPage)
1116 auto pDlg = std::make_shared<SvxTransformTabDialog>(pParent, pAttr, pSdrView,
1117 bSizeTabPage ? SvxAnchorIds::NoProtect : SvxAnchorIds::NoProtect|SvxAnchorIds::NoResize);
1118 pDlg->RemoveTabPage( u"RID_SVXPAGE_ANGLE"_ustr );
1119 pDlg->RemoveTabPage( u"RID_SVXPAGE_SLANT"_ustr );
1120 return VclPtr<CuiAbstractTabController_Impl>::Create(std::move(pDlg));
1123 VclPtr<AbstractSvxJSearchOptionsDialog> AbstractDialogFactory_Impl::CreateSvxJSearchOptionsDialog(weld::Window* pParent,
1124 const SfxItemSet& rOptionsSet,
1125 TransliterationFlags nInitialFlags)
1127 return VclPtr<AbstractSvxJSearchOptionsDialog_Impl>::Create(std::make_unique<SvxJSearchOptionsDialog>(pParent, rOptionsSet, nInitialFlags));
1130 VclPtr<AbstractFmInputRecordNoDialog> AbstractDialogFactory_Impl::CreateFmInputRecordNoDialog(weld::Window* pParent)
1132 return VclPtr<AbstractFmInputRecordNoDialog_Impl>::Create(std::make_unique<FmInputRecordNoDialog>(pParent));
1135 VclPtr<AbstractSvxNewDictionaryDialog> AbstractDialogFactory_Impl::CreateSvxNewDictionaryDialog(weld::Window* pParent)
1137 return VclPtr<AbstractSvxNewDictionaryDialog_Impl>::Create(std::make_unique<SvxNewDictionaryDialog>(pParent));
1140 VclPtr<VclAbstractDialog> AbstractDialogFactory_Impl::CreateSvxEditDictionaryDialog(weld::Window* pParent, const OUString& rName)
1142 return VclPtr<CuiAbstractController_Impl>::Create(std::make_unique<SvxEditDictionaryDialog>(pParent, rName));
1145 VclPtr<AbstractSvxNameDialog> AbstractDialogFactory_Impl::CreateSvxNameDialog(weld::Window* pParent,
1146 const OUString& rName, const OUString& rDesc, const OUString& rTitle)
1148 return VclPtr<AbstractSvxNameDialog_Impl>::Create(std::make_unique<SvxNameDialog>(pParent, rName, rDesc, rTitle));
1151 VclPtr<AbstractSvxObjectNameDialog> AbstractDialogFactory_Impl::CreateSvxObjectNameDialog(weld::Window* pParent, const OUString& rName)
1153 return VclPtr<AbstractSvxObjectNameDialog_Impl>::Create(std::make_unique<SvxObjectNameDialog>(pParent, rName));
1156 VclPtr<AbstractSvxObjectTitleDescDialog> AbstractDialogFactory_Impl::CreateSvxObjectTitleDescDialog(weld::Window* pParent, const OUString& rTitle, const OUString& rDescription, bool const isDecorative)
1158 return VclPtr<AbstractSvxObjectTitleDescDialog_Impl>::Create(std::make_unique<SvxObjectTitleDescDialog>(pParent, rTitle, rDescription, isDecorative));
1161 VclPtr<AbstractSvxMultiPathDialog> AbstractDialogFactory_Impl::CreateSvxMultiPathDialog(weld::Window* pParent)
1163 return VclPtr<AbstractSvxMultiPathDialog_Impl>::Create(std::make_unique<SvxMultiPathDialog>(pParent));
1166 VclPtr<AbstractSvxMultiPathDialog> AbstractDialogFactory_Impl::CreateSvxPathSelectDialog(weld::Window* pParent)
1168 return VclPtr<AbstractSvxPathSelectDialog_Impl>::Create(std::make_unique<SvxPathSelectDialog>(pParent));
1171 VclPtr<AbstractSvxHpLinkDlg> AbstractDialogFactory_Impl::CreateSvxHpLinkDlg(SfxChildWindow* pChild, SfxBindings* pBindings, weld::Window* pParent)
1173 return VclPtr<AbstractSvxHpLinkDlg_Impl>::Create(std::make_shared<SvxHpLinkDlg>(pBindings, pChild, pParent));
1176 VclPtr<AbstractFmSearchDialog> AbstractDialogFactory_Impl::CreateFmSearchDialog(weld::Window* pParent,
1177 const OUString& strInitialText,
1178 const std::vector< OUString >& _rContexts,
1179 sal_Int16 nInitialContext,
1180 const Link<FmSearchContext&,sal_uInt32>& lnkContextSupplier)
1182 return VclPtr<AbstractFmSearchDialog_Impl>::Create(std::make_unique<FmSearchDialog>(pParent,
1183 strInitialText, _rContexts, nInitialContext, lnkContextSupplier));
1187 VclPtr<AbstractGraphicFilterDialog> AbstractDialogFactory_Impl::CreateGraphicFilterEmboss(weld::Window* pParent,
1188 const Graphic& rGraphic)
1190 return VclPtr<AbstractGraphicFilterDialog_Impl>::Create(std::make_unique<GraphicFilterEmboss>(pParent, rGraphic, RectPoint::MM));
1193 VclPtr<AbstractGraphicFilterDialog> AbstractDialogFactory_Impl::CreateGraphicFilterPoster(weld::Window* pParent,
1194 const Graphic& rGraphic)
1196 return VclPtr<AbstractGraphicFilterDialog_Impl>::Create(std::make_unique<GraphicFilterPoster>(pParent, rGraphic, 16));
1199 VclPtr<AbstractGraphicFilterDialog> AbstractDialogFactory_Impl::CreateGraphicFilterSepia(weld::Window* pParent,
1200 const Graphic& rGraphic)
1202 return VclPtr<AbstractGraphicFilterDialog_Impl>::Create(std::make_unique<GraphicFilterSepia>(pParent, rGraphic, 10));
1205 VclPtr<AbstractGraphicFilterDialog> AbstractDialogFactory_Impl::CreateGraphicFilterSmooth(weld::Window* pParent,
1206 const Graphic& rGraphic, double nRadius)
1208 return VclPtr<AbstractGraphicFilterDialog_Impl>::Create(std::make_unique<GraphicFilterSmooth>(pParent, rGraphic, nRadius));
1211 VclPtr<AbstractGraphicFilterDialog> AbstractDialogFactory_Impl::CreateGraphicFilterSolarize(weld::Window* pParent,
1212 const Graphic& rGraphic)
1214 return VclPtr<AbstractGraphicFilterDialog_Impl>::Create(std::make_unique<GraphicFilterSolarize>(pParent, rGraphic, 128, false /*bInvert*/));
1217 VclPtr<AbstractGraphicFilterDialog> AbstractDialogFactory_Impl::CreateGraphicFilterMosaic(weld::Window* pParent,
1218 const Graphic& rGraphic)
1220 return VclPtr<AbstractGraphicFilterDialog_Impl>::Create(std::make_unique<GraphicFilterMosaic>(pParent, rGraphic, 4, 4, false /*bEnhanceEdges*/));
1223 VclPtr<AbstractSvxAreaTabDialog> AbstractDialogFactory_Impl::CreateSvxAreaTabDialog(weld::Window* pParent,
1224 const SfxItemSet* pAttr,
1225 SdrModel* pModel,
1226 bool bShadow,
1227 bool bSlideBackground)
1229 return VclPtr<AbstractSvxAreaTabDialog_Impl>::Create(
1230 std::make_shared<SvxAreaTabDialog>(pParent, pAttr, pModel, bShadow, bSlideBackground));
1233 VclPtr<SfxAbstractTabDialog> AbstractDialogFactory_Impl::CreateSvxLineTabDialog(weld::Window* pParent, const SfxItemSet* pAttr, //add forSvxLineTabDialog
1234 SdrModel* pModel,
1235 const SdrObject* pObj ,
1236 bool bHasObj)
1238 return VclPtr<CuiAbstractTabController_Impl>::Create(std::make_shared<SvxLineTabDialog>(pParent, pAttr, pModel, pObj,bHasObj));
1241 VclPtr<SfxAbstractDialog> AbstractDialogFactory_Impl::CreateCharMapDialog(weld::Window* pParent, const SfxItemSet& rAttr,
1242 const Reference< XFrame >& rDocumentFrame)
1244 return VclPtr<AbstractSvxCharacterMapDialog_Impl>::Create(std::make_unique<SvxCharacterMap>(pParent, &rAttr, rDocumentFrame));
1247 VclPtr<SfxAbstractDialog> AbstractDialogFactory_Impl::CreateEventConfigDialog(weld::Widget* pParent,
1248 std::unique_ptr<const SfxItemSet> xAttr,
1249 const Reference< XFrame >& rDocumentFrame)
1251 return VclPtr<CuiAbstractSingleTabController_Impl>::Create(std::make_unique<SfxMacroAssignDlg>(pParent, rDocumentFrame, std::move(xAttr)));
1254 VclPtr<SfxAbstractDialog> AbstractDialogFactory_Impl::CreateSfxDialog(weld::Window* pParent,
1255 const SfxItemSet& rAttr,
1256 const SdrView* pView,
1257 sal_uInt32 nResId)
1259 switch ( nResId )
1261 case RID_SVXPAGE_MEASURE:
1262 return VclPtr<CuiAbstractSingleTabController_Impl>::Create(std::make_unique<SvxMeasureDialog>(pParent, rAttr, pView));
1263 case RID_SVXPAGE_CONNECTION:
1264 return VclPtr<CuiAbstractSingleTabController_Impl>::Create(std::make_unique<SvxConnectionDialog>(pParent, rAttr, pView));
1265 case RID_SFXPAGE_DBREGISTER:
1266 return VclPtr<CuiAbstractSingleTabController_Impl>::Create(std::make_unique<DatabaseRegistrationDialog>(pParent, rAttr));
1269 return nullptr;
1272 VclPtr<AbstractSvxPostItDialog> AbstractDialogFactory_Impl::CreateSvxPostItDialog(weld::Widget* pParent,
1273 const SfxItemSet& rCoreSet,
1274 bool bPrevNext)
1276 return VclPtr<AbstractSvxPostItDialog_Impl>::Create(std::make_unique<SvxPostItDialog>(pParent, rCoreSet, bPrevNext));
1279 namespace {
1281 class SvxMacroAssignDialog_Impl : public VclAbstractDialog
1283 public:
1284 SvxMacroAssignDialog_Impl( weld::Window* _pParent, const Reference< XFrame >& _rxDocumentFrame, const bool _bUnoDialogMode,
1285 const Reference< XNameReplace >& _rxEvents, const sal_uInt16 _nInitiallySelectedEvent )
1286 :m_aItems( SfxGetpApp()->GetPool(), svl::Items<SID_ATTR_MACROITEM, SID_ATTR_MACROITEM> )
1288 m_aItems.Put( SfxBoolItem( SID_ATTR_MACROITEM, _bUnoDialogMode ) );
1289 m_xDlg = std::make_shared<SvxMacroAssignDlg>(_pParent, _rxDocumentFrame, m_aItems, _rxEvents, _nInitiallySelectedEvent);
1292 virtual short Execute() override;
1293 virtual bool StartExecuteAsync(VclAbstractDialog::AsyncContext &rCtx) override;
1295 private:
1296 SfxItemSet m_aItems;
1297 std::shared_ptr<SvxMacroAssignDlg> m_xDlg;
1300 IMPL_ABSTDLG_CLASS_ASYNC(SvxMacroAssignDialog, SvxMacroAssignDlg)
1304 VclPtr<VclAbstractDialog> AbstractDialogFactory_Impl::CreateSvxMacroAssignDlg(
1305 weld::Window* _pParent, const Reference< XFrame >& _rxDocumentFrame, const bool _bUnoDialogMode,
1306 const Reference< XNameReplace >& _rxEvents, const sal_uInt16 _nInitiallySelectedEvent )
1308 return VclPtr<SvxMacroAssignDialog_Impl>::Create(_pParent, _rxDocumentFrame, _bUnoDialogMode, _rxEvents, _nInitiallySelectedEvent);
1311 // Factories for TabPages
1312 CreateTabPage AbstractDialogFactory_Impl::GetTabPageCreatorFunc( sal_uInt16 nId )
1314 switch ( nId )
1316 case RID_SW_TP_BACKGROUND :
1317 case RID_SVXPAGE_BKG :
1318 return SvxBkgTabPage::Create;
1319 case RID_SVXPAGE_TEXTANIMATION :
1320 return SvxTextAnimationPage::Create;
1321 case RID_SVXPAGE_TRANSPARENCE :
1322 return SvxTransparenceTabPage::Create;
1323 case RID_SVXPAGE_AREA :
1324 return SvxAreaTabPage::Create;
1325 case RID_SVXPAGE_SHADOW :
1326 return SvxShadowTabPage::Create;
1327 case RID_SVXPAGE_LINE :
1328 return SvxLineTabPage::Create;
1329 case RID_SVXPAGE_CONNECTION :
1330 return SvxConnectionPage::Create;
1331 case RID_SVXPAGE_MEASURE :
1332 return SvxMeasurePage::Create;
1333 case RID_SFXPAGE_GENERAL :
1334 return SvxGeneralTabPage::Create;
1335 case RID_SVXPAGE_PICK_SINGLE_NUM :
1336 return SvxSingleNumPickTabPage::Create;
1337 case RID_SVXPAGE_PICK_BMP :
1338 return SvxBitmapPickTabPage::Create;
1339 case RID_SVXPAGE_PICK_BULLET :
1340 return SvxBulletPickTabPage::Create;
1341 case RID_SVXPAGE_NUM_OPTIONS :
1342 return SvxNumOptionsTabPage::Create;
1343 case RID_SVXPAGE_PICK_NUM :
1344 return SvxNumPickTabPage::Create;
1345 case RID_SVXPAGE_NUM_POSITION :
1346 return SvxNumPositionTabPage::Create;
1347 case RID_SVXPAGE_PARA_ASIAN :
1348 return SvxAsianTabPage::Create;
1349 case RID_SVXPAGE_EXT_PARAGRAPH :
1350 return SvxExtParagraphTabPage::Create;
1351 case RID_SVXPAGE_ALIGN_PARAGRAPH :
1352 return SvxParaAlignTabPage::Create;
1353 case RID_SVXPAGE_STD_PARAGRAPH :
1354 return SvxStdParagraphTabPage::Create;
1355 case RID_SVXPAGE_TABULATOR :
1356 return SvxTabulatorTabPage::Create;
1357 case RID_SVXPAGE_TEXTATTR :
1358 return SvxTextAttrPage::Create;
1359 case RID_SVXPAGE_ALIGNMENT :
1360 return svx::AlignmentTabPage::Create;
1361 case RID_SVXPAGE_BORDER :
1362 return SvxBorderTabPage::Create;
1363 case RID_SVXPAGE_CHAR_NAME :
1364 return SvxCharNamePage::Create;
1365 case RID_SVXPAGE_CHAR_EFFECTS :
1366 return SvxCharEffectsPage::Create;
1367 case RID_SVXPAGE_CHAR_POSITION :
1368 return SvxCharPositionPage::Create;
1369 case RID_SVXPAGE_CHAR_TWOLINES :
1370 return SvxCharTwoLinesPage::Create;
1371 case RID_SVXPAGE_NUMBERFORMAT :
1372 return SvxNumberFormatTabPage::Create;
1373 case RID_SVXPAGE_PAGE :
1374 return SvxPageDescPage::Create;
1375 case RID_SVXPAGE_GRFCROP :
1376 return SvxGrfCropPage::Create;
1377 case RID_SVXPAGE_MACROASSIGN :
1378 return SfxMacroTabPage::Create;
1379 case RID_SVXPAGE_TEXTCOLUMNS:
1380 return SvxTextColumnsPage::Create;
1381 default:
1382 break;
1385 return nullptr;
1388 DialogGetRanges AbstractDialogFactory_Impl::GetDialogGetRangesFunc()
1390 return SvxPostItDialog::GetRanges;
1393 GetTabPageRanges AbstractDialogFactory_Impl::GetTabPageRangesFunc( sal_uInt16 nId )
1395 switch ( nId )
1397 case RID_SVXPAGE_TEXTANIMATION :
1398 return SvxTextAnimationPage::GetRanges;
1399 case RID_SVXPAGE_TRANSPARENCE :
1400 return SvxTransparenceTabPage::GetRanges;
1401 case RID_SVXPAGE_AREA :
1402 return SvxAreaTabPage::GetRanges;
1403 case RID_SVXPAGE_SHADOW :
1404 return SvxShadowTabPage::GetRanges;
1405 case RID_SVXPAGE_LINE :
1406 return SvxLineTabPage::GetRanges;
1407 case RID_SVXPAGE_CONNECTION :
1408 return SvxConnectionPage::GetRanges;
1409 case RID_SVXPAGE_MEASURE :
1410 return SvxMeasurePage::GetRanges;
1411 case RID_SVXPAGE_PARA_ASIAN :
1412 return SvxAsianTabPage::GetRanges;
1413 case RID_SVXPAGE_EXT_PARAGRAPH :
1414 return SvxExtParagraphTabPage::GetRanges;
1415 case RID_SVXPAGE_ALIGN_PARAGRAPH :
1416 return SvxParaAlignTabPage::GetRanges;
1417 case RID_SVXPAGE_STD_PARAGRAPH :
1418 return SvxStdParagraphTabPage::GetRanges;
1419 case RID_SVXPAGE_TABULATOR :
1420 return SvxTabulatorTabPage::GetRanges;
1421 case RID_SVXPAGE_TEXTATTR :
1422 return SvxTextAttrPage::GetRanges;
1423 case RID_SVXPAGE_ALIGNMENT :
1424 return svx::AlignmentTabPage::GetRanges;
1425 case RID_SW_TP_BACKGROUND :
1426 case RID_SVXPAGE_BKG:
1427 return SvxBkgTabPage::GetRanges;
1428 case RID_SVXPAGE_BORDER :
1429 return SvxBorderTabPage::GetRanges;
1430 case RID_SVXPAGE_CHAR_NAME :
1431 return SvxCharNamePage::GetRanges;
1432 case RID_SVXPAGE_CHAR_EFFECTS :
1433 return SvxCharEffectsPage::GetRanges;
1434 case RID_SVXPAGE_CHAR_POSITION :
1435 return SvxCharPositionPage::GetRanges;
1436 case RID_SVXPAGE_CHAR_TWOLINES :
1437 return SvxCharTwoLinesPage::GetRanges;
1438 case RID_SVXPAGE_NUMBERFORMAT :
1439 return SvxNumberFormatTabPage::GetRanges;
1440 case RID_SVXPAGE_PAGE :
1441 return SvxPageDescPage::GetRanges;
1442 case RID_SVXPAGE_ASIAN_LAYOUT:
1443 return SvxAsianLayoutPage::GetRanges;
1444 case RID_SVXPAGE_TEXTCOLUMNS:
1445 return SvxTextColumnsPage::GetRanges;
1446 default:
1447 break;
1450 return nullptr;
1453 VclPtr<SfxAbstractInsertObjectDialog> AbstractDialogFactory_Impl::CreateInsertObjectDialog(weld::Window* pParent, const OUString& rCommand,
1454 const Reference <css::embed::XStorage>& xStor, const SvObjectServerList* pList)
1456 std::unique_ptr<InsertObjectDialog_Impl> pDlg;
1457 if ( rCommand == ".uno:InsertObject" )
1458 pDlg.reset(new SvInsertOleDlg(pParent, xStor, pList));
1459 else if ( rCommand == ".uno:InsertObjectFloatingFrame" )
1460 pDlg.reset(new SfxInsertFloatingFrameDialog(pParent, xStor));
1462 if ( pDlg )
1464 pDlg->SetHelpId(rCommand);
1465 return VclPtr<AbstractInsertObjectDialog_Impl>::Create( std::move(pDlg) );
1467 return nullptr;
1470 VclPtr<VclAbstractDialog> AbstractDialogFactory_Impl::CreateEditObjectDialog(weld::Window* pParent, const OUString& rCommand,
1471 const Reference<css::embed::XEmbeddedObject>& xObj)
1473 if ( rCommand == ".uno:InsertObjectFloatingFrame" )
1475 auto pDlg = std::make_unique<SfxInsertFloatingFrameDialog>(pParent, xObj);
1476 pDlg->SetHelpId(rCommand);
1477 return VclPtr<AbstractInsertObjectDialog_Impl>::Create( std::move(pDlg) );
1479 return nullptr;
1482 VclPtr<SfxAbstractPasteDialog> AbstractDialogFactory_Impl::CreatePasteDialog(weld::Window* pParent)
1484 return VclPtr<AbstractPasteDialog_Impl>::Create(std::make_shared<SvPasteObjectDialog>(pParent));
1487 VclPtr<SfxAbstractLinksDialog> AbstractDialogFactory_Impl::CreateLinksDialog(weld::Window* pParent, sfx2::LinkManager* pMgr, bool bHTML, sfx2::SvBaseLink* p)
1489 auto xLinkDlg(std::make_unique<SvBaseLinksDlg>(pParent, pMgr, bHTML));
1490 if (p)
1491 xLinkDlg->SetActLink(p);
1492 return VclPtr<AbstractLinksDialog_Impl>::Create(std::move(xLinkDlg));
1495 VclPtr<SfxAbstractTabDialog> AbstractDialogFactory_Impl::CreateSvxFormatCellsDialog(weld::Window* pParent, const SfxItemSet& rAttr, const SdrModel& rModel, bool bStyle)
1497 return VclPtr<CuiAbstractTabController_Impl>::Create(std::make_shared<SvxFormatCellsDialog>(pParent, rAttr, rModel, bStyle));
1500 VclPtr<SvxAbstractSplitTableDialog> AbstractDialogFactory_Impl::CreateSvxSplitTableDialog(weld::Window* pParent, bool bIsTableVertical, tools::Long nMaxVertical)
1502 return VclPtr<SvxAbstractSplitTableDialog_Impl>::Create( std::make_shared<SvxSplitTableDlg>(pParent, bIsTableVertical, nMaxVertical, 99 ));
1505 std::shared_ptr<SvxAbstractNewTableDialog> AbstractDialogFactory_Impl::CreateSvxNewTableDialog(weld::Window* pParent)
1507 return std::make_shared<SvxNewTableDialogWrapper>(pParent);
1510 VclPtr<VclAbstractDialog> AbstractDialogFactory_Impl::CreateOptionsDialog(weld::Window* pParent, const OUString& rExtensionId)
1512 return VclPtr<CuiAbstractController_Impl>::Create(std::make_unique<OfaTreeOptionsDialog>(pParent, rExtensionId));
1515 VclPtr<SvxAbstractInsRowColDlg> AbstractDialogFactory_Impl::CreateSvxInsRowColDlg(weld::Window* pParent, bool bCol, const OUString& rHelpId)
1517 return VclPtr<SvxAbstractInsRowColDlg_Impl>::Create(std::make_shared<SvxInsRowColDlg>(pParent, bCol, rHelpId));
1520 VclPtr<AbstractPasswordToOpenModifyDialog> AbstractDialogFactory_Impl::CreatePasswordToOpenModifyDialog(
1521 weld::Window * pParent, sal_uInt16 nMaxPasswdLen, bool bIsPasswordToModify)
1523 return VclPtr<AbstractPasswordToOpenModifyDialog_Impl>::Create(std::make_unique<PasswordToOpenModifyDialog>(pParent, nMaxPasswdLen, bIsPasswordToModify));
1526 VclPtr<AbstractScreenshotAnnotationDlg> AbstractDialogFactory_Impl::CreateScreenshotAnnotationDlg(weld::Dialog& rParentDialog)
1528 return VclPtr<AbstractScreenshotAnnotationDlg_Impl>::Create(std::make_unique<ScreenshotAnnotationDlg>(rParentDialog));
1531 VclPtr<AbstractSignatureLineDialog> AbstractDialogFactory_Impl::CreateSignatureLineDialog(
1532 weld::Window* pParent, const Reference<XModel> xModel, bool bEditExisting)
1534 return VclPtr<AbstractSignatureLineDialog_Impl>::Create(
1535 std::make_unique<SignatureLineDialog>(pParent, xModel, bEditExisting));
1538 VclPtr<AbstractSignSignatureLineDialog>
1539 AbstractDialogFactory_Impl::CreateSignSignatureLineDialog(weld::Window* pParent,
1540 const Reference<XModel> xModel)
1542 return VclPtr<AbstractSignSignatureLineDialog_Impl>::Create(
1543 std::make_unique<SignSignatureLineDialog>(pParent, xModel));
1546 VclPtr<AbstractQrCodeGenDialog> AbstractDialogFactory_Impl::CreateQrCodeGenDialog(
1547 weld::Window* pParent, const Reference<XModel> xModel, bool bEditExisting)
1549 return VclPtr<AbstractQrCodeGenDialog_Impl>::Create(
1550 std::make_shared<QrCodeGenDialog>(pParent, xModel, bEditExisting));
1553 VclPtr<AbstractAdditionsDialog> AbstractDialogFactory_Impl::CreateAdditionsDialog(
1554 weld::Window* pParent, const OUString& sAdditionsTag)
1556 #if HAVE_FEATURE_EXTENSIONS
1557 return VclPtr<AbstractAdditionsDialog_Impl>::Create(
1558 std::make_unique<AdditionsDialog>(pParent, sAdditionsTag));
1559 #else
1560 (void) pParent;
1561 (void) sAdditionsTag;
1562 return nullptr;
1563 #endif
1566 VclPtr<VclAbstractDialog>
1567 AbstractDialogFactory_Impl::CreateAboutDialog(weld::Window* pParent)
1569 return VclPtr<CuiAbstractControllerAsync_Impl>::Create(
1570 std::make_shared<AboutDialog>(pParent));
1573 VclPtr<VclAbstractDialog>
1574 AbstractDialogFactory_Impl::CreateTipOfTheDayDialog(weld::Window* pParent)
1576 #if !ENABLE_WASM_STRIP_PINGUSER
1577 return VclPtr<CuiAbstractControllerAsync_Impl>::Create(
1578 std::make_shared<TipOfTheDayDialog>(pParent));
1579 #else
1580 (void) pParent;
1581 return nullptr;
1582 #endif
1585 VclPtr<VclAbstractDialog>
1586 AbstractDialogFactory_Impl::CreateWidgetTestDialog(weld::Window* pParent)
1588 return VclPtr<CuiAbstractWidgetTestControllerAsync_Impl>::Create(
1589 std::make_shared<WidgetTestDialog>(pParent));
1592 VclPtr<VclAbstractDialog>
1593 AbstractDialogFactory_Impl::CreateToolbarmodeDialog(weld::Window* pParent)
1595 return VclPtr<CuiAbstractController_Impl>::Create(
1596 std::make_unique<ToolbarmodeDialog>(pParent));
1599 VclPtr<AbstractDiagramDialog>
1600 AbstractDialogFactory_Impl::CreateDiagramDialog(
1601 weld::Window* pParent,
1602 SdrObjGroup& rDiagram)
1604 return VclPtr<AbstractDiagramDialog_Impl>::Create(
1605 std::make_unique<DiagramDialog>(pParent, rDiagram));
1608 #ifdef _WIN32
1609 VclPtr<VclAbstractDialog>
1610 AbstractDialogFactory_Impl::CreateFileExtCheckDialog(weld::Window* pParent, const OUString& sTitle,
1611 const OUString& sMsg)
1613 return VclPtr<CuiAbstractController_Impl>::Create(
1614 std::make_unique<FileExtCheckDialog>(pParent, sTitle, sMsg));
1616 #endif
1618 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */