bump product version to 6.4.0.3
[LibreOffice.git] / cui / source / factory / dlgfact.cxx
blob80e28b271b63dc7f1083a0cec34cd4394d174d31
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 <align.hxx>
21 #include "dlgfact.hxx"
23 #include <sfx2/app.hxx>
24 #include <sfx2/basedlgs.hxx>
25 #include <sfx2/pageids.hxx>
26 #include <svx/dialogs.hrc>
27 #include <svx/svxids.hrc>
28 #include <numfmt.hxx>
29 #include <splitcelldlg.hxx>
30 #include <dstribut.hxx>
31 #include <cuiimapwnd.hxx>
32 #include <cui/cuicharmap.hxx>
33 #include <srchxtra.hxx>
34 #include <textanim.hxx>
35 #include <autocdlg.hxx>
36 #include <treeopt.hxx>
37 #include <labdlg.hxx>
38 #include <hangulhanjadlg.hxx>
39 #include <showcols.hxx>
40 #include <zoom.hxx>
41 #include <cuigaldlg.hxx>
42 #include <transfrm.hxx>
43 #include <bbdlg.hxx>
44 #include <cuisrchdlg.hxx>
45 #include <cuitbxform.hxx>
46 #include <optdict.hxx>
47 #include <dlgname.hxx>
48 #include <multipat.hxx>
49 #include <cuihyperdlg.hxx>
50 #include <cuifmsearch.hxx>
51 #include <cuigrfflt.hxx>
52 #include <cuitabarea.hxx>
53 #include <cuitabline.hxx>
54 #include <measure.hxx>
55 #include <connect.hxx>
56 #include <dbregister.hxx>
57 #include <cuioptgenrl.hxx>
58 #include <optasian.hxx>
59 #include <insdlg.hxx>
60 #include <pastedlg.hxx>
61 #include <linkdlg.hxx>
62 #include <SignatureLineDialog.hxx>
63 #include <SignSignatureLineDialog.hxx>
64 #include <QrCodeGenDialog.hxx>
65 #include <SpellDialog.hxx>
66 #include <cfg.hxx>
67 #include <numpages.hxx>
68 #include <paragrph.hxx>
69 #include <tabstpge.hxx>
70 #include <textattr.hxx>
71 #include <backgrnd.hxx>
72 #include <border.hxx>
73 #include <chardlg.hxx>
74 #include <page.hxx>
75 #include <postdlg.hxx>
76 #include <grfpage.hxx>
77 #include <scriptdlg.hxx>
78 #include <cfgutil.hxx>
79 #include <macropg.hxx>
80 #include <sdrcelldlg.hxx>
81 #include <newtabledlg.hxx>
82 #include <macroass.hxx>
83 #include <insrc.hxx>
84 #include <passwdomdlg.hxx>
85 #include <screenshotannotationdlg.hxx>
86 #include <hyphen.hxx>
87 #include <thesdlg.hxx>
88 #include <about.hxx>
89 #include <tipofthedaydlg.hxx>
90 #include <DiagramDialog.hxx>
92 using namespace ::com::sun::star;
93 using namespace ::com::sun::star::frame;
94 using namespace ::com::sun::star::container;
96 using ::com::sun::star::uno::Reference;
98 using namespace svx;
99 // AbstractTabDialog implementations just forwards everything to the dialog
101 short CuiAbstractController_Impl::Execute()
103 return m_xDlg->run();
106 short CuiAbstractSingleTabController_Impl::Execute()
108 return m_xDlg->run();
111 short AbstractSvxDistributeDialog_Impl::Execute()
113 return m_xDlg->run();
116 short AbstractHangulHanjaConversionDialog_Impl::Execute()
118 return m_xDlg->run();
121 short AbstractFmShowColsDialog_Impl::Execute()
123 return m_xDlg->run();
126 short AbstractHyphenWordDialog_Impl::Execute()
128 return m_xDlg->run();
131 short AbstractThesaurusDialog_Impl::Execute()
133 return m_xDlg->run();
136 bool AbstractThesaurusDialog_Impl::StartExecuteAsync(AsyncContext &rCtx)
138 return SfxDialogController::runAsync(m_xDlg, rCtx.maEndDialogFn);
141 short AbstractSvxZoomDialog_Impl::Execute()
143 return m_xDlg->run();
146 short AbstractTitleDialog_Impl::Execute()
148 return m_xDlg->run();
151 short AbstractScriptSelectorDialog_Impl::Execute()
153 return m_xDlg->run();
156 short AbstractGalleryIdDialog_Impl::Execute()
158 return m_xDlg->run();
161 short AbstractURLDlg_Impl::Execute()
163 return m_xDlg->run();
166 short AbstractSvxSearchSimilarityDialog_Impl::Execute()
168 return m_xDlg->run();
171 short AbstractSvxTransformTabDialog_Impl::Execute()
173 return m_xDlg->run();
176 bool AbstractSvxTransformTabDialog_Impl::StartExecuteAsync(AsyncContext &rCtx)
178 return SfxTabDialogController::runAsync(m_xDlg, rCtx.maEndDialogFn);
181 short AbstractSvxCaptionDialog_Impl::Execute()
183 return m_xDlg->run();
186 bool AbstractSvxCaptionDialog_Impl::StartExecuteAsync(AsyncContext &rCtx)
188 return SfxTabDialogController::runAsync(m_xDlg, rCtx.maEndDialogFn);
191 short AbstractSvxJSearchOptionsDialog_Impl::Execute()
193 return m_xDlg->run();
196 short AbstractFmInputRecordNoDialog_Impl::Execute()
198 return m_xDlg->run();
201 short AbstractSvxNewDictionaryDialog_Impl::Execute()
203 return m_xDlg->run();
206 short AbstractSvxNameDialog_Impl::Execute()
208 return m_xDlg->run();
211 // #i68101#
212 short AbstractSvxObjectNameDialog_Impl::Execute()
214 return m_xDlg->run();
217 short AbstractSvxObjectTitleDescDialog_Impl::Execute()
219 return m_xDlg->run();
222 short AbstractSvxMultiPathDialog_Impl::Execute()
224 return m_xDlg->run();
227 short AbstractSvxPathSelectDialog_Impl::Execute()
229 return m_xDlg->run();
232 short AbstractSvxHpLinkDlg_Impl::Execute()
234 return m_xDlg->run();
237 short AbstractFmSearchDialog_Impl::Execute()
239 return m_xDlg->run();
242 short AbstractGraphicFilterDialog_Impl::Execute()
244 return m_xDlg->run();
247 short AbstractSvxAreaTabDialog_Impl::Execute()
249 return m_xDlg->run();
252 bool AbstractSvxAreaTabDialog_Impl::StartExecuteAsync(AsyncContext &rCtx)
254 return SfxTabDialogController::runAsync(m_xDlg, rCtx.maEndDialogFn);
257 short AbstractPasteDialog_Impl::Execute()
259 return m_xDlg->run();
262 bool AbstractPasteDialog_Impl::StartExecuteAsync(AsyncContext &rCtx)
264 return SfxDialogController::runAsync(m_xDlg, rCtx.maEndDialogFn);
267 short AbstractInsertObjectDialog_Impl::Execute()
269 return m_xDlg->run();
272 short AbstractLinksDialog_Impl::Execute()
274 return m_xDlg->run();
277 short AbstractSpellDialog_Impl::Execute()
279 return m_xDlg->run();
282 bool AbstractSpellDialog_Impl::StartExecuteAsync(AsyncContext &rCtx)
284 return SfxDialogController::runAsync(m_xDlg, rCtx.maEndDialogFn);
287 short AbstractSvxPostItDialog_Impl::Execute()
289 return m_xDlg->run();
292 short AbstractPasswordToOpenModifyDialog_Impl::Execute()
294 return m_xDlg->run();
297 short AbstractSvxCharacterMapDialog_Impl::Execute()
299 return m_xDlg->run();
302 const SfxItemSet* AbstractSvxCharacterMapDialog_Impl::GetOutputItemSet() const
304 return m_xDlg->GetOutputItemSet();
307 void AbstractSvxCharacterMapDialog_Impl::SetText(const OUString& rStr)
309 m_xDlg->set_title(rStr);
312 short AbstractSignatureLineDialog_Impl::Execute()
314 return m_xDlg->run();
317 short AbstractSignSignatureLineDialog_Impl::Execute()
319 return m_xDlg->run();
322 short AbstractQrCodeGenDialog_Impl::Execute()
324 return m_xDlg->run();
327 short AbstractScreenshotAnnotationDlg_Impl::Execute()
329 return m_xDlg->run();
332 short CuiAbstractTabController_Impl::Execute()
334 return m_xDlg->run();
337 bool CuiAbstractTabController_Impl::StartExecuteAsync(AsyncContext &rCtx)
339 return SfxTabDialogController::runAsync(m_xDlg, rCtx.maEndDialogFn);
342 void CuiAbstractTabController_Impl::SetCurPageId( const OString &rName )
344 m_xDlg->SetCurPageId( rName );
347 const SfxItemSet* CuiAbstractTabController_Impl::GetOutputItemSet() const
349 return m_xDlg->GetOutputItemSet();
352 const sal_uInt16* CuiAbstractTabController_Impl::GetInputRanges(const SfxItemPool& pItem )
354 return m_xDlg->GetInputRanges( pItem );
357 void CuiAbstractTabController_Impl::SetInputSet( const SfxItemSet* pInSet )
359 m_xDlg->SetInputSet( pInSet );
362 //From class Window.
363 void CuiAbstractTabController_Impl::SetText( const OUString& rStr )
365 m_xDlg->set_title(rStr);
368 std::vector<OString> CuiAbstractTabController_Impl::getAllPageUIXMLDescriptions() const
370 return m_xDlg->getAllPageUIXMLDescriptions();
373 bool CuiAbstractTabController_Impl::selectPageByUIXMLDescription(const OString& rUIXMLDescription)
375 return m_xDlg->selectPageByUIXMLDescription(rUIXMLDescription);
378 BitmapEx CuiAbstractTabController_Impl::createScreenshot() const
380 return m_xDlg->createScreenshot();
383 OString CuiAbstractTabController_Impl::GetScreenshotId() const
385 return m_xDlg->GetScreenshotId();
388 const SfxItemSet* CuiAbstractSingleTabController_Impl::GetOutputItemSet() const
390 return m_xDlg->GetOutputItemSet();
393 void CuiAbstractSingleTabController_Impl::SetText(const OUString& rStr)
395 m_xDlg->set_title(rStr);
398 SvxDistributeHorizontal AbstractSvxDistributeDialog_Impl::GetDistributeHor()const
400 return m_xDlg->GetDistributeHor();
402 SvxDistributeVertical AbstractSvxDistributeDialog_Impl::GetDistributeVer()const
404 return m_xDlg->GetDistributeVer();
407 void AbstractHangulHanjaConversionDialog_Impl::EndDialog(sal_Int32 nResult)
409 m_xDlg->response(nResult);
412 void AbstractHangulHanjaConversionDialog_Impl::EnableRubySupport( bool _bVal )
414 m_xDlg->EnableRubySupport(_bVal);
417 void AbstractHangulHanjaConversionDialog_Impl::SetByCharacter( bool _bByCharacter )
419 m_xDlg->SetByCharacter(_bByCharacter);
422 void AbstractHangulHanjaConversionDialog_Impl::SetConversionDirectionState( bool _bTryBothDirections, editeng::HangulHanjaConversion::ConversionDirection _ePrimaryConversionDirection )
424 m_xDlg->SetConversionDirectionState(_bTryBothDirections, _ePrimaryConversionDirection);
427 void AbstractHangulHanjaConversionDialog_Impl::SetConversionFormat( editeng::HangulHanjaConversion::ConversionFormat _eType )
429 m_xDlg->SetConversionFormat(_eType);
432 void AbstractHangulHanjaConversionDialog_Impl::SetOptionsChangedHdl( const Link<LinkParamNone*,void>& _rHdl )
434 m_xDlg->SetOptionsChangedHdl(_rHdl );
437 void AbstractHangulHanjaConversionDialog_Impl::SetIgnoreHdl( const Link<weld::Button&,void>& _rHdl )
439 m_xDlg->SetIgnoreHdl(_rHdl );
442 void AbstractHangulHanjaConversionDialog_Impl::SetIgnoreAllHdl(const Link<weld::Button&,void>& rHdl)
444 m_xDlg->SetIgnoreAllHdl(rHdl);
447 void AbstractHangulHanjaConversionDialog_Impl::SetChangeHdl(const Link<weld::Button&,void>& rHdl)
449 m_xDlg->SetChangeHdl(rHdl);
452 void AbstractHangulHanjaConversionDialog_Impl::SetChangeAllHdl( const Link<weld::Button&,void>& rHdl )
454 m_xDlg->SetChangeAllHdl(rHdl);
457 void AbstractHangulHanjaConversionDialog_Impl::SetClickByCharacterHdl( const Link<weld::ToggleButton&,void>& _rHdl )
459 m_xDlg->SetClickByCharacterHdl(_rHdl );
462 void AbstractHangulHanjaConversionDialog_Impl::SetConversionFormatChangedHdl(const Link<weld::Button&,void>& rHdl)
464 m_xDlg->SetConversionFormatChangedHdl(rHdl);
467 void AbstractHangulHanjaConversionDialog_Impl::SetFindHdl( const Link<weld::Button&,void>& rHdl )
469 m_xDlg->SetFindHdl(rHdl);
472 bool AbstractHangulHanjaConversionDialog_Impl::GetUseBothDirections( ) const
474 return m_xDlg->GetUseBothDirections();
477 editeng::HangulHanjaConversion::ConversionDirection AbstractHangulHanjaConversionDialog_Impl::GetDirection( editeng::HangulHanjaConversion::ConversionDirection _eDefaultDirection ) const
479 return m_xDlg->GetDirection( _eDefaultDirection );
482 void AbstractHangulHanjaConversionDialog_Impl::SetCurrentString(
483 const OUString& _rNewString,
484 const css::uno::Sequence< OUString >& _rSuggestions,
485 bool _bOriginatesFromDocument
488 m_xDlg->SetCurrentString(_rNewString,_rSuggestions,_bOriginatesFromDocument);
491 OUString AbstractHangulHanjaConversionDialog_Impl::GetCurrentString( ) const
493 return m_xDlg->GetCurrentString();
496 editeng::HangulHanjaConversion::ConversionFormat AbstractHangulHanjaConversionDialog_Impl::GetConversionFormat( ) const
498 return m_xDlg->GetConversionFormat();
501 void AbstractHangulHanjaConversionDialog_Impl::FocusSuggestion( )
503 m_xDlg->FocusSuggestion();
506 OUString AbstractHangulHanjaConversionDialog_Impl::GetCurrentSuggestion( ) const
508 return m_xDlg->GetCurrentSuggestion();
511 OUString AbstractThesaurusDialog_Impl::GetWord()
513 return m_xDlg->GetWord();
516 Reference < css::embed::XEmbeddedObject > AbstractInsertObjectDialog_Impl::GetObject()
518 return m_xDlg->GetObject();
521 bool AbstractInsertObjectDialog_Impl::IsCreateNew()
523 return m_xDlg->IsCreateNew();
526 ::Reference< css::io::XInputStream > AbstractInsertObjectDialog_Impl::GetIconIfIconified( OUString* pGraphicMediaType )
528 return m_xDlg->GetIconIfIconified( pGraphicMediaType );
531 void AbstractPasteDialog_Impl::Insert(SotClipboardFormatId nFormat, const OUString& rFormatName)
533 m_xDlg->Insert(nFormat, rFormatName);
536 void AbstractPasteDialog_Impl::SetObjName(const SvGlobalName & rClass, const OUString& rObjName)
538 m_xDlg->SetObjName(rClass, rObjName);
541 void AbstractPasteDialog_Impl::PreGetFormat( const TransferableDataHelper& aHelper )
543 m_xDlg->PreGetFormat(aHelper);
546 SotClipboardFormatId AbstractPasteDialog_Impl::GetFormatOnly()
548 return m_xDlg->GetFormatOnly();
551 SotClipboardFormatId AbstractPasteDialog_Impl::GetFormat( const TransferableDataHelper& aHelper )
553 return m_xDlg->GetFormat(aHelper);
556 void AbstractFmShowColsDialog_Impl::SetColumns(const ::Reference< css::container::XIndexContainer>& xCols)
558 m_xDlg->SetColumns(xCols);
561 void AbstractSvxZoomDialog_Impl::SetLimits( sal_uInt16 nMin, sal_uInt16 nMax )
563 m_xDlg->SetLimits( nMin, nMax );
566 void AbstractSvxZoomDialog_Impl::HideButton( ZoomButtonId nBtnId )
568 m_xDlg->HideButton( nBtnId );
571 const SfxItemSet* AbstractSvxZoomDialog_Impl::GetOutputItemSet() const
573 return m_xDlg->GetOutputItemSet();
576 void AbstractSpellDialog_Impl::InvalidateDialog()
578 m_xDlg->InvalidateDialog();
581 std::shared_ptr<SfxDialogController> AbstractSpellDialog_Impl::GetController()
583 return m_xDlg;
586 SfxBindings& AbstractSpellDialog_Impl::GetBindings()
588 return m_xDlg->GetBindings();
591 OUString AbstractTitleDialog_Impl::GetTitle() const
593 return m_xDlg->GetTitle();
596 sal_uInt32 AbstractGalleryIdDialog_Impl::GetId() const
598 return m_xDlg->GetId();
601 OUString AbstractURLDlg_Impl::GetURL() const
603 return m_xDlg->GetURL();
606 OUString AbstractURLDlg_Impl::GetAltText() const
608 return m_xDlg->GetAltText();
611 OUString AbstractURLDlg_Impl::GetDesc() const
613 return m_xDlg->GetDesc();
616 OUString AbstractURLDlg_Impl::GetTarget() const
618 return m_xDlg->GetTarget();
621 OUString AbstractURLDlg_Impl::GetName() const
623 return m_xDlg->GetName();
626 sal_uInt16 AbstractSvxSearchSimilarityDialog_Impl::GetOther()
628 return m_xDlg->GetOther();
631 sal_uInt16 AbstractSvxSearchSimilarityDialog_Impl::GetShorter()
633 return m_xDlg->GetShorter();
636 sal_uInt16 AbstractSvxSearchSimilarityDialog_Impl::GetLonger()
638 return m_xDlg->GetLonger();
641 bool AbstractSvxSearchSimilarityDialog_Impl::IsRelaxed()
643 return m_xDlg->IsRelaxed();
646 // AbstractSvxTransformTabDialog implementations just forwards everything to the dialog
647 void AbstractSvxTransformTabDialog_Impl::SetCurPageId( const OString& rName )
649 m_xDlg->SetCurPageId( rName );
652 const SfxItemSet* AbstractSvxTransformTabDialog_Impl::GetOutputItemSet() const
654 return m_xDlg->GetOutputItemSet();
657 const sal_uInt16* AbstractSvxTransformTabDialog_Impl::GetInputRanges(const SfxItemPool& pItem )
659 return m_xDlg->GetInputRanges( pItem );
662 void AbstractSvxTransformTabDialog_Impl::SetInputSet( const SfxItemSet* pInSet )
664 m_xDlg->SetInputSet( pInSet );
667 //From class Window.
668 void AbstractSvxTransformTabDialog_Impl::SetText( const OUString& rStr )
670 m_xDlg->set_title(rStr);
673 void AbstractSvxTransformTabDialog_Impl::SetValidateFramePosLink( const Link<SvxSwFrameValidation&,void>& rLink )
675 m_xDlg->SetValidateFramePosLink( rLink );
678 // AbstractSvxCaptionDialog implementations just forwards everything to the dialog
679 void AbstractSvxCaptionDialog_Impl::SetCurPageId( const OString& rName )
681 m_xDlg->SetCurPageId(rName);
684 const SfxItemSet* AbstractSvxCaptionDialog_Impl::GetOutputItemSet() const
686 return m_xDlg->GetOutputItemSet();
689 const sal_uInt16* AbstractSvxCaptionDialog_Impl::GetInputRanges(const SfxItemPool& pItem )
691 return m_xDlg->GetInputRanges( pItem );
694 void AbstractSvxCaptionDialog_Impl::SetInputSet( const SfxItemSet* pInSet )
696 m_xDlg->SetInputSet( pInSet );
699 void AbstractSvxCaptionDialog_Impl::SetText( const OUString& rStr )
701 m_xDlg->set_title(rStr);
704 void AbstractSvxCaptionDialog_Impl::SetValidateFramePosLink( const Link<SvxSwFrameValidation&,void>& rLink )
706 m_xDlg->SetValidateFramePosLink( rLink );
709 TransliterationFlags AbstractSvxJSearchOptionsDialog_Impl::GetTransliterationFlags() const
711 return m_xDlg->GetTransliterationFlags();
714 void AbstractFmInputRecordNoDialog_Impl::SetValue(long nNew)
716 m_xDlg->SetValue(nNew);
719 long AbstractFmInputRecordNoDialog_Impl::GetValue() const
721 return m_xDlg->GetValue();
724 ::Reference< css::linguistic2::XDictionary > AbstractSvxNewDictionaryDialog_Impl::GetNewDictionary()
726 return m_xDlg->GetNewDictionary();
729 void AbstractSvxNameDialog_Impl::GetName(OUString& rName)
731 rName = m_xDlg->GetName();
734 void AbstractSvxNameDialog_Impl::SetCheckNameHdl( const Link<AbstractSvxNameDialog&,bool>& rLink, bool bCheckImmediately )
736 aCheckNameHdl = rLink;
737 if( rLink.IsSet() )
738 m_xDlg->SetCheckNameHdl( LINK(this, AbstractSvxNameDialog_Impl, CheckNameHdl), bCheckImmediately );
739 else
740 m_xDlg->SetCheckNameHdl( Link<SvxNameDialog&,bool>(), bCheckImmediately );
743 void AbstractSvxNameDialog_Impl::SetEditHelpId(const OString& rHelpId)
745 m_xDlg->SetEditHelpId(rHelpId);
748 void AbstractSvxNameDialog_Impl::SetHelpId(const OString& rHelpId)
750 m_xDlg->set_help_id(rHelpId);
753 void AbstractSvxNameDialog_Impl::SetText( const OUString& rStr )
755 m_xDlg->set_title(rStr);
758 IMPL_LINK_NOARG(AbstractSvxNameDialog_Impl, CheckNameHdl, SvxNameDialog&, bool)
760 return aCheckNameHdl.Call(*this);
763 void AbstractSvxObjectNameDialog_Impl::GetName(OUString& rName)
765 rName = m_xDlg->GetName();
768 void AbstractSvxObjectNameDialog_Impl::SetCheckNameHdl(const Link<AbstractSvxObjectNameDialog&,bool>& rLink)
770 aCheckNameHdl = rLink;
772 if(rLink.IsSet())
774 m_xDlg->SetCheckNameHdl(LINK(this, AbstractSvxObjectNameDialog_Impl, CheckNameHdl));
776 else
778 m_xDlg->SetCheckNameHdl(Link<SvxObjectNameDialog&,bool>());
782 IMPL_LINK_NOARG(AbstractSvxObjectNameDialog_Impl, CheckNameHdl, SvxObjectNameDialog&, bool)
784 return aCheckNameHdl.Call(*this);
787 void AbstractSvxObjectTitleDescDialog_Impl::GetTitle(OUString& rTitle)
789 rTitle = m_xDlg->GetTitle();
792 void AbstractSvxObjectTitleDescDialog_Impl::GetDescription(OUString& rDescription)
794 rDescription = m_xDlg->GetDescription();
797 OUString AbstractSvxMultiPathDialog_Impl::GetPath() const
799 return m_xDlg->GetPath();
802 void AbstractSvxMultiPathDialog_Impl::SetPath( const OUString& rPath )
804 m_xDlg->SetPath( rPath );
807 void AbstractSvxMultiPathDialog_Impl::SetTitle( const OUString& rNewTitle )
809 m_xDlg->SetTitle(rNewTitle);
812 OUString AbstractSvxPathSelectDialog_Impl::GetPath() const
814 return m_xDlg->GetPath();
817 void AbstractSvxPathSelectDialog_Impl::SetPath( const OUString& rPath )
819 m_xDlg->SetPath( rPath );
822 void AbstractSvxPathSelectDialog_Impl::SetTitle( const OUString& rNewTitle )
824 m_xDlg->SetTitle(rNewTitle);
827 std::shared_ptr<SfxDialogController> AbstractSvxHpLinkDlg_Impl::GetController()
829 return m_xDlg;
832 bool AbstractSvxHpLinkDlg_Impl::QueryClose()
834 return m_xDlg->QueryClose();
837 void AbstractFmSearchDialog_Impl::SetFoundHandler(const Link<FmFoundRecordInformation&,void>& lnk)
839 m_xDlg->SetFoundHandler(lnk);
842 void AbstractFmSearchDialog_Impl::SetCanceledNotFoundHdl(const Link<FmFoundRecordInformation&,void>& lnk)
844 m_xDlg->SetCanceledNotFoundHdl(lnk);
847 void AbstractFmSearchDialog_Impl::SetActiveField(const OUString& strField)
849 m_xDlg->SetActiveField(strField);
852 Graphic AbstractGraphicFilterDialog_Impl::GetFilteredGraphic(const Graphic& rGraphic, double fScaleX, double fScaleY)
854 return m_xDlg->GetFilteredGraphic(rGraphic, fScaleX, fScaleY);
857 // AbstractSvxAreaTabDialog implementations just forwards everything to the dialog
858 void AbstractSvxAreaTabDialog_Impl::SetCurPageId( const OString& rName )
860 m_xDlg->SetCurPageId( rName );
863 const SfxItemSet* AbstractSvxAreaTabDialog_Impl::GetOutputItemSet() const
865 return m_xDlg->GetOutputItemSet();
868 const sal_uInt16* AbstractSvxAreaTabDialog_Impl::GetInputRanges(const SfxItemPool& pItem )
870 return m_xDlg->GetInputRanges( pItem );
873 void AbstractSvxAreaTabDialog_Impl::SetInputSet( const SfxItemSet* pInSet )
875 m_xDlg->SetInputSet( pInSet );
878 void AbstractSvxAreaTabDialog_Impl::SetText( const OUString& rStr )
880 m_xDlg->set_title(rStr);
883 void AbstractSvxPostItDialog_Impl::SetText( const OUString& rStr )
885 m_xDlg->set_title(rStr);
888 const SfxItemSet* AbstractSvxPostItDialog_Impl::GetOutputItemSet() const
890 return m_xDlg->GetOutputItemSet();
893 void AbstractSvxPostItDialog_Impl::EnableTravel(bool bNext, bool bPrev)
895 m_xDlg->EnableTravel( bNext, bPrev );
898 OUString AbstractSvxPostItDialog_Impl::GetNote()
900 return m_xDlg->GetNote();
903 void AbstractSvxPostItDialog_Impl::SetNote(const OUString& rTxt)
905 m_xDlg->SetNote( rTxt );
908 void AbstractSvxPostItDialog_Impl::ShowLastAuthor(const OUString& rAuthor, const OUString& rDate)
910 m_xDlg->ShowLastAuthor( rAuthor, rDate );
913 void AbstractSvxPostItDialog_Impl::DontChangeAuthor()
915 m_xDlg->DontChangeAuthor();
918 void AbstractSvxPostItDialog_Impl::HideAuthor()
920 m_xDlg->HideAuthor();
923 void AbstractSvxPostItDialog_Impl::SetNextHdl( const Link<AbstractSvxPostItDialog&,void>& rLink )
925 aNextHdl = rLink;
926 if( rLink.IsSet() )
927 m_xDlg->SetNextHdl( LINK(this, AbstractSvxPostItDialog_Impl, NextHdl ) );
928 else
929 m_xDlg->SetNextHdl( Link<SvxPostItDialog&,void>() );
932 void AbstractSvxPostItDialog_Impl::SetPrevHdl( const Link<AbstractSvxPostItDialog&,void>& rLink )
934 aPrevHdl = rLink;
935 if( rLink.IsSet() )
936 m_xDlg->SetPrevHdl( LINK(this, AbstractSvxPostItDialog_Impl, PrevHdl ) );
937 else
938 m_xDlg->SetPrevHdl( Link<SvxPostItDialog&,void>() );
941 IMPL_LINK_NOARG(AbstractSvxPostItDialog_Impl, NextHdl, SvxPostItDialog&, void)
943 aNextHdl.Call(*this);
946 IMPL_LINK_NOARG(AbstractSvxPostItDialog_Impl, PrevHdl, SvxPostItDialog&, void)
948 aPrevHdl.Call(*this);
951 std::shared_ptr<weld::Dialog> AbstractSvxPostItDialog_Impl::GetDialog()
953 return m_xDlg->GetDialog();
956 OUString AbstractPasswordToOpenModifyDialog_Impl::GetPasswordToOpen() const
958 return m_xDlg->GetPasswordToOpen();
961 OUString AbstractPasswordToOpenModifyDialog_Impl::GetPasswordToModify() const
963 return m_xDlg->GetPasswordToModify();
966 bool AbstractPasswordToOpenModifyDialog_Impl::IsRecommendToOpenReadonly() const
968 return m_xDlg->IsRecommendToOpenReadonly();
971 // Create dialogs with simplest interface
972 VclPtr<VclAbstractDialog> AbstractDialogFactory_Impl::CreateVclDialog(weld::Window* pParent, sal_uInt32 nResId)
974 std::unique_ptr<OfaTreeOptionsDialog> xDlg;
975 switch ( nResId )
977 case SID_OPTIONS_TREEDIALOG :
978 case SID_OPTIONS_DATABASES :
979 case SID_LANGUAGE_OPTIONS :
981 bool bActivateLastSelection = false;
982 if (nResId == SID_OPTIONS_TREEDIALOG)
983 bActivateLastSelection = true;
984 Reference< frame::XFrame > xFrame;
985 xDlg = std::make_unique<OfaTreeOptionsDialog>(pParent, xFrame, bActivateLastSelection);
986 if (nResId == SID_OPTIONS_DATABASES)
988 xDlg->ActivatePage(SID_SB_DBREGISTEROPTIONS);
990 else if (nResId == SID_LANGUAGE_OPTIONS)
992 //open the tab page "tools/options/languages"
993 xDlg->ActivatePage(OFA_TP_LANGUAGES_FOR_SET_DOCUMENT_LANGUAGE);
996 break;
997 default:
998 break;
1001 if (xDlg)
1002 return VclPtr<CuiAbstractController_Impl>::Create(std::move(xDlg));
1003 return nullptr;
1006 VclPtr<VclAbstractDialog> AbstractDialogFactory_Impl::CreateAboutDialog(weld::Window* pParent)
1008 return VclPtr<CuiAbstractController_Impl>::Create(std::make_unique<AboutDialog>(pParent));
1011 VclPtr<VclAbstractDialog> AbstractDialogFactory_Impl::CreateFrameDialog(weld::Window* pParent, const Reference< frame::XFrame >& rxFrame,
1012 sal_uInt32 nResId, const OUString& rParameter )
1014 std::unique_ptr<OfaTreeOptionsDialog> xDlg;
1015 if (SID_OPTIONS_TREEDIALOG == nResId || SID_OPTIONS_DATABASES == nResId)
1017 // only activate last page if we don't want to activate a special page
1018 bool bActivateLastSelection = ( nResId != SID_OPTIONS_DATABASES && rParameter.isEmpty() );
1019 xDlg = std::make_unique<OfaTreeOptionsDialog>(pParent, rxFrame, bActivateLastSelection);
1020 if ( nResId == SID_OPTIONS_DATABASES )
1021 xDlg->ActivatePage(SID_SB_DBREGISTEROPTIONS);
1022 else if ( !rParameter.isEmpty() )
1023 xDlg->ActivatePage( rParameter );
1026 if (xDlg)
1027 return VclPtr<CuiAbstractController_Impl>::Create(std::move(xDlg));
1028 return nullptr;
1031 // TabDialog outside the drawing layer
1032 VclPtr<SfxAbstractTabDialog> AbstractDialogFactory_Impl::CreateAutoCorrTabDialog(weld::Window* pParent, const SfxItemSet* pAttrSet)
1034 return VclPtr<CuiAbstractTabController_Impl>::Create(std::make_unique<OfaAutoCorrDlg>(pParent, pAttrSet));
1037 VclPtr<SfxAbstractTabDialog> AbstractDialogFactory_Impl::CreateCustomizeTabDialog(weld::Window* pParent,
1038 const SfxItemSet* pAttrSet,
1039 const Reference< frame::XFrame >& xViewFrame )
1041 std::unique_ptr<SvxConfigDialog> xDlg1(new SvxConfigDialog(pParent, pAttrSet));
1042 xDlg1->SetFrame(xViewFrame);
1043 return VclPtr<CuiAbstractTabController_Impl>::Create(std::move(xDlg1));
1046 // TabDialog that use functionality of the drawing layer
1047 VclPtr<SfxAbstractTabDialog> AbstractDialogFactory_Impl::CreateTextTabDialog(weld::Window* pParent,
1048 const SfxItemSet* pAttrSet,
1049 SdrView* pView)
1051 return VclPtr<CuiAbstractTabController_Impl>::Create(std::make_unique<SvxTextTabDialog>(pParent, pAttrSet, pView));
1054 // TabDialog that use functionality of the drawing layer and add AnchorTypes -- for SvxCaptionTabDialog
1055 VclPtr<AbstractSvxCaptionDialog> AbstractDialogFactory_Impl::CreateCaptionDialog(weld::Window* pParent,
1056 const SdrView* pView,
1057 SvxAnchorIds nAnchorTypes)
1059 return VclPtr<AbstractSvxCaptionDialog_Impl>::Create(std::make_unique<SvxCaptionTabDialog>(pParent, pView, nAnchorTypes));
1062 VclPtr<AbstractSvxDistributeDialog> AbstractDialogFactory_Impl::CreateSvxDistributeDialog(weld::Window* pParent,
1063 const SfxItemSet& rAttr)
1065 return VclPtr<AbstractSvxDistributeDialog_Impl>::Create(std::make_unique<SvxDistributeDialog>(pParent, rAttr, SvxDistributeHorizontal::NONE, SvxDistributeVertical::NONE));
1068 VclPtr<AbstractHangulHanjaConversionDialog> AbstractDialogFactory_Impl::CreateHangulHanjaConversionDialog(weld::Window* pParent)
1070 return VclPtr<AbstractHangulHanjaConversionDialog_Impl>::Create(std::make_unique<HangulHanjaConversionDialog>(pParent));
1073 VclPtr<AbstractThesaurusDialog> AbstractDialogFactory_Impl::CreateThesaurusDialog(weld::Window* pParent,
1074 css::uno::Reference<css::linguistic2::XThesaurus> xThesaurus,
1075 const OUString &rWord, LanguageType nLanguage)
1077 return VclPtr<AbstractThesaurusDialog_Impl>::Create(std::make_unique<SvxThesaurusDialog>(pParent, xThesaurus, rWord, nLanguage));
1080 VclPtr<AbstractHyphenWordDialog> AbstractDialogFactory_Impl::CreateHyphenWordDialog(weld::Window* pParent,
1081 const OUString &rWord, LanguageType nLang,
1082 css::uno::Reference< css::linguistic2::XHyphenator > &xHyphen,
1083 SvxSpellWrapper* pWrapper)
1085 return VclPtr<AbstractHyphenWordDialog_Impl>::Create(std::make_unique<SvxHyphenWordDialog>(rWord, nLang, pParent, xHyphen, pWrapper));
1088 VclPtr<AbstractFmShowColsDialog> AbstractDialogFactory_Impl::CreateFmShowColsDialog(weld::Window* pParent)
1090 return VclPtr<AbstractFmShowColsDialog_Impl>::Create(std::make_unique<FmShowColsDialog>(pParent));
1093 VclPtr<AbstractSvxZoomDialog> AbstractDialogFactory_Impl::CreateSvxZoomDialog(weld::Window* pParent, const SfxItemSet& rCoreSet)
1095 return VclPtr<AbstractSvxZoomDialog_Impl>::Create(std::make_unique<SvxZoomDialog>(pParent, rCoreSet));
1098 VclPtr<AbstractSpellDialog> AbstractDialogFactory_Impl::CreateSvxSpellDialog(
1099 weld::Window* pParent,
1100 SfxBindings* pBindings,
1101 svx::SpellDialogChildWindow* pSpellChildWindow)
1103 return VclPtr<AbstractSpellDialog_Impl>::Create(std::make_unique<svx::SpellDialog>(pSpellChildWindow, pParent, pBindings));
1106 VclPtr<VclAbstractDialog> AbstractDialogFactory_Impl::CreateActualizeProgressDialog(weld::Window* pParent,
1107 GalleryTheme* pThm)
1109 return VclPtr<CuiAbstractController_Impl>::Create(std::make_unique<ActualizeProgress>(pParent, pThm));
1112 VclPtr<VclAbstractDialog> AbstractDialogFactory_Impl::CreateScriptErrorDialog(const css::uno::Any& rException)
1114 return VclPtr<SvxScriptErrorDialog>::Create(rException);
1117 VclPtr<AbstractScriptSelectorDialog> AbstractDialogFactory_Impl::CreateScriptSelectorDialog(weld::Window* pParent,
1118 const Reference<frame::XFrame>& rxFrame)
1120 return VclPtr<AbstractScriptSelectorDialog_Impl>::Create(std::make_unique<SvxScriptSelectorDialog>(pParent, false/*bShowSlots*/, rxFrame));
1123 OUString AbstractScriptSelectorDialog_Impl::GetScriptURL() const
1125 return m_xDlg->GetScriptURL();
1128 void AbstractScriptSelectorDialog_Impl::SetRunLabel()
1130 m_xDlg->SetRunLabel();
1133 VclPtr<VclAbstractDialog> AbstractDialogFactory_Impl::CreateSvxScriptOrgDialog(weld::Window* pParent,
1134 const OUString& rLanguage)
1136 return VclPtr<CuiAbstractController_Impl>::Create(std::make_unique<SvxScriptOrgDialog>(pParent, rLanguage));
1139 VclPtr<AbstractTitleDialog> AbstractDialogFactory_Impl::CreateTitleDialog(weld::Window* pParent,
1140 const OUString& rOldText)
1142 return VclPtr<AbstractTitleDialog_Impl>::Create(std::make_unique<TitleDialog>(pParent, rOldText));
1145 VclPtr<AbstractGalleryIdDialog> AbstractDialogFactory_Impl::CreateGalleryIdDialog(weld::Window* pParent,
1146 GalleryTheme* pThm)
1148 return VclPtr<AbstractGalleryIdDialog_Impl>::Create(std::make_unique<GalleryIdDialog>(pParent, pThm));
1151 VclPtr<VclAbstractDialog> AbstractDialogFactory_Impl::CreateGalleryThemePropertiesDialog(weld::Window* pParent,
1152 ExchangeData* pData,
1153 SfxItemSet* pItemSet)
1155 return VclPtr<CuiAbstractTabController_Impl>::Create(std::make_unique<GalleryThemeProperties>(
1156 pParent, pData, pItemSet));
1159 VclPtr<AbstractURLDlg> AbstractDialogFactory_Impl::CreateURLDialog(weld::Widget* pParent,
1160 const OUString& rURL, const OUString& rAltText, const OUString& rDescription,
1161 const OUString& rTarget, const OUString& rName,
1162 TargetList& rTargetList )
1164 return VclPtr<AbstractURLDlg_Impl>::Create(std::make_unique<URLDlg>(pParent, rURL, rAltText, rDescription,
1165 rTarget, rName, rTargetList));
1169 VclPtr<SfxAbstractTabDialog> AbstractDialogFactory_Impl::CreateTabItemDialog(weld::Window* pParent,
1170 const SfxItemSet& rSet)
1172 return VclPtr<CuiAbstractTabController_Impl>::Create(std::make_unique<SvxSearchFormatDialog>(
1173 pParent, rSet));
1176 VclPtr<VclAbstractDialog> AbstractDialogFactory_Impl::CreateSvxSearchAttributeDialog(weld::Window* pParent,
1177 SearchAttrItemList& rLst,
1178 const sal_uInt16* pWhRanges )
1180 return VclPtr<CuiAbstractController_Impl>::Create(std::make_unique<SvxSearchAttributeDialog>(pParent, rLst, pWhRanges));
1183 VclPtr<AbstractSvxSearchSimilarityDialog> AbstractDialogFactory_Impl::CreateSvxSearchSimilarityDialog(weld::Window* pParent,
1184 bool bRelax,
1185 sal_uInt16 nOther,
1186 sal_uInt16 nShorter,
1187 sal_uInt16 nLonger)
1189 return VclPtr<AbstractSvxSearchSimilarityDialog_Impl>::Create(std::make_unique<SvxSearchSimilarityDialog>(pParent, bRelax, nOther, nShorter, nLonger));
1192 VclPtr<SfxAbstractTabDialog> AbstractDialogFactory_Impl::CreateSvxBorderBackgroundDlg(
1193 weld::Window* pParent,
1194 const SfxItemSet& rCoreSet,
1195 bool bEnableDrawingLayerFillStyles)
1197 return VclPtr<CuiAbstractTabController_Impl>::Create(std::make_unique<SvxBorderBackgroundDlg>(
1198 pParent,
1199 rCoreSet,
1200 /*bEnableSelector*/true,
1201 bEnableDrawingLayerFillStyles));
1204 VclPtr<AbstractSvxTransformTabDialog> AbstractDialogFactory_Impl::CreateSvxTransformTabDialog(weld::Window* pParent,
1205 const SfxItemSet* pAttr,
1206 const SdrView* pView,
1207 SvxAnchorIds nAnchorTypes)
1209 return VclPtr<AbstractSvxTransformTabDialog_Impl>::Create(new SvxTransformTabDialog(pParent, pAttr,pView, nAnchorTypes));
1212 VclPtr<SfxAbstractTabDialog> AbstractDialogFactory_Impl::CreateSchTransformTabDialog(weld::Window* pParent,
1213 const SfxItemSet* pAttr,
1214 const SdrView* pSdrView,
1215 bool bSizeTabPage)
1217 auto pDlg = std::make_unique<SvxTransformTabDialog>(pParent, pAttr, pSdrView,
1218 bSizeTabPage ? SvxAnchorIds::NoProtect : SvxAnchorIds::NoProtect|SvxAnchorIds::NoResize);
1219 pDlg->RemoveTabPage( "RID_SVXPAGE_ANGLE" );
1220 pDlg->RemoveTabPage( "RID_SVXPAGE_SLANT" );
1221 return VclPtr<CuiAbstractTabController_Impl>::Create(std::move(pDlg));
1224 VclPtr<AbstractSvxJSearchOptionsDialog> AbstractDialogFactory_Impl::CreateSvxJSearchOptionsDialog(weld::Window* pParent,
1225 const SfxItemSet& rOptionsSet,
1226 TransliterationFlags nInitialFlags)
1228 return VclPtr<AbstractSvxJSearchOptionsDialog_Impl>::Create(std::make_unique<SvxJSearchOptionsDialog>(pParent, rOptionsSet, nInitialFlags));
1231 VclPtr<AbstractFmInputRecordNoDialog> AbstractDialogFactory_Impl::CreateFmInputRecordNoDialog(weld::Window* pParent)
1233 return VclPtr<AbstractFmInputRecordNoDialog_Impl>::Create(std::make_unique<FmInputRecordNoDialog>(pParent));
1236 VclPtr<AbstractSvxNewDictionaryDialog> AbstractDialogFactory_Impl::CreateSvxNewDictionaryDialog(weld::Window* pParent)
1238 return VclPtr<AbstractSvxNewDictionaryDialog_Impl>::Create(std::make_unique<SvxNewDictionaryDialog>(pParent));
1241 VclPtr<VclAbstractDialog> AbstractDialogFactory_Impl::CreateSvxEditDictionaryDialog(weld::Window* pParent, const OUString& rName)
1243 return VclPtr<CuiAbstractController_Impl>::Create(std::make_unique<SvxEditDictionaryDialog>(pParent, rName));
1246 VclPtr<AbstractSvxNameDialog> AbstractDialogFactory_Impl::CreateSvxNameDialog(weld::Window* pParent,
1247 const OUString& rName, const OUString& rDesc)
1249 return VclPtr<AbstractSvxNameDialog_Impl>::Create(std::make_unique<SvxNameDialog>(pParent, rName, rDesc));
1252 VclPtr<AbstractSvxObjectNameDialog> AbstractDialogFactory_Impl::CreateSvxObjectNameDialog(weld::Window* pParent, const OUString& rName)
1254 return VclPtr<AbstractSvxObjectNameDialog_Impl>::Create(std::make_unique<SvxObjectNameDialog>(pParent, rName));
1257 VclPtr<AbstractSvxObjectTitleDescDialog> AbstractDialogFactory_Impl::CreateSvxObjectTitleDescDialog(weld::Window* pParent, const OUString& rTitle, const OUString& rDescription)
1259 return VclPtr<AbstractSvxObjectTitleDescDialog_Impl>::Create(std::make_unique<SvxObjectTitleDescDialog>(pParent, rTitle, rDescription));
1262 VclPtr<AbstractSvxMultiPathDialog> AbstractDialogFactory_Impl::CreateSvxMultiPathDialog(weld::Window* pParent)
1264 return VclPtr<AbstractSvxMultiPathDialog_Impl>::Create(std::make_unique<SvxMultiPathDialog>(pParent));
1267 VclPtr<AbstractSvxMultiPathDialog> AbstractDialogFactory_Impl::CreateSvxPathSelectDialog(weld::Window* pParent)
1269 return VclPtr<AbstractSvxPathSelectDialog_Impl>::Create(std::make_unique<SvxPathSelectDialog>(pParent));
1272 VclPtr<AbstractSvxHpLinkDlg> AbstractDialogFactory_Impl::CreateSvxHpLinkDlg(SfxChildWindow* pChild, SfxBindings* pBindings, weld::Window* pParent)
1274 return VclPtr<AbstractSvxHpLinkDlg_Impl>::Create(std::make_unique<SvxHpLinkDlg>(pBindings, pChild, pParent));
1277 VclPtr<AbstractFmSearchDialog> AbstractDialogFactory_Impl::CreateFmSearchDialog(weld::Window* pParent,
1278 const OUString& strInitialText,
1279 const std::vector< OUString >& _rContexts,
1280 sal_Int16 nInitialContext,
1281 const Link<FmSearchContext&,sal_uInt32>& lnkContextSupplier)
1283 return VclPtr<AbstractFmSearchDialog_Impl>::Create(std::make_unique<FmSearchDialog>(pParent,
1284 strInitialText, _rContexts, nInitialContext, lnkContextSupplier));
1288 VclPtr<AbstractGraphicFilterDialog> AbstractDialogFactory_Impl::CreateGraphicFilterEmboss(weld::Window* pParent,
1289 const Graphic& rGraphic)
1291 return VclPtr<AbstractGraphicFilterDialog_Impl>::Create(std::make_unique<GraphicFilterEmboss>(pParent, rGraphic, RectPoint::MM));
1294 VclPtr<AbstractGraphicFilterDialog> AbstractDialogFactory_Impl::CreateGraphicFilterPoster(weld::Window* pParent,
1295 const Graphic& rGraphic)
1297 return VclPtr<AbstractGraphicFilterDialog_Impl>::Create(std::make_unique<GraphicFilterPoster>(pParent, rGraphic, 16));
1300 VclPtr<AbstractGraphicFilterDialog> AbstractDialogFactory_Impl::CreateGraphicFilterSepia(weld::Window* pParent,
1301 const Graphic& rGraphic)
1303 return VclPtr<AbstractGraphicFilterDialog_Impl>::Create(std::make_unique<GraphicFilterSepia>(pParent, rGraphic, 10));
1306 VclPtr<AbstractGraphicFilterDialog> AbstractDialogFactory_Impl::CreateGraphicFilterSmooth(weld::Window* pParent,
1307 const Graphic& rGraphic, double nRadius)
1309 return VclPtr<AbstractGraphicFilterDialog_Impl>::Create(std::make_unique<GraphicFilterSmooth>(pParent, rGraphic, nRadius));
1312 VclPtr<AbstractGraphicFilterDialog> AbstractDialogFactory_Impl::CreateGraphicFilterSolarize(weld::Window* pParent,
1313 const Graphic& rGraphic)
1315 return VclPtr<AbstractGraphicFilterDialog_Impl>::Create(std::make_unique<GraphicFilterSolarize>(pParent, rGraphic, 128, false /*bInvert*/));
1318 VclPtr<AbstractGraphicFilterDialog> AbstractDialogFactory_Impl::CreateGraphicFilterMosaic(weld::Window* pParent,
1319 const Graphic& rGraphic)
1321 return VclPtr<AbstractGraphicFilterDialog_Impl>::Create(std::make_unique<GraphicFilterMosaic>(pParent, rGraphic, 4, 4, false /*bEnhanceEdges*/));
1324 VclPtr<AbstractSvxAreaTabDialog> AbstractDialogFactory_Impl::CreateSvxAreaTabDialog(weld::Window* pParent,
1325 const SfxItemSet* pAttr,
1326 SdrModel* pModel,
1327 bool bShadow)
1329 return VclPtr<AbstractSvxAreaTabDialog_Impl>::Create(std::make_unique<SvxAreaTabDialog>(pParent, pAttr, pModel, bShadow));
1332 VclPtr<SfxAbstractTabDialog> AbstractDialogFactory_Impl::CreateSvxLineTabDialog(weld::Window* pParent, const SfxItemSet* pAttr, //add forSvxLineTabDialog
1333 SdrModel* pModel,
1334 const SdrObject* pObj ,
1335 bool bHasObj)
1337 return VclPtr<CuiAbstractTabController_Impl>::Create(std::make_unique<SvxLineTabDialog>(pParent, pAttr, pModel, pObj,bHasObj));
1340 VclPtr<SfxAbstractDialog> AbstractDialogFactory_Impl::CreateCharMapDialog(weld::Window* pParent, const SfxItemSet& rAttr,
1341 const Reference< XFrame >& rDocumentFrame)
1343 return VclPtr<AbstractSvxCharacterMapDialog_Impl>::Create(std::make_unique<SvxCharacterMap>(pParent, &rAttr, rDocumentFrame));
1346 VclPtr<SfxAbstractDialog> AbstractDialogFactory_Impl::CreateEventConfigDialog(weld::Widget* pParent,
1347 const SfxItemSet& rAttr,
1348 const Reference< XFrame >& rDocumentFrame)
1350 return VclPtr<CuiAbstractSingleTabController_Impl>::Create(std::make_unique<SfxMacroAssignDlg>(pParent, rDocumentFrame, rAttr));
1353 VclPtr<SfxAbstractDialog> AbstractDialogFactory_Impl::CreateSfxDialog(weld::Window* pParent,
1354 const SfxItemSet& rAttr,
1355 const SdrView* pView,
1356 sal_uInt32 nResId)
1358 switch ( nResId )
1360 case RID_SVXPAGE_MEASURE:
1361 return VclPtr<CuiAbstractSingleTabController_Impl>::Create(std::make_unique<SvxMeasureDialog>(pParent, rAttr, pView));
1362 case RID_SVXPAGE_CONNECTION:
1363 return VclPtr<CuiAbstractSingleTabController_Impl>::Create(std::make_unique<SvxConnectionDialog>(pParent, rAttr, pView));
1364 case RID_SFXPAGE_DBREGISTER:
1365 return VclPtr<CuiAbstractSingleTabController_Impl>::Create(std::make_unique<DatabaseRegistrationDialog>(pParent, rAttr));
1368 return nullptr;
1371 VclPtr<AbstractSvxPostItDialog> AbstractDialogFactory_Impl::CreateSvxPostItDialog(weld::Widget* pParent,
1372 const SfxItemSet& rCoreSet,
1373 bool bPrevNext)
1375 return VclPtr<AbstractSvxPostItDialog_Impl>::Create(std::make_unique<SvxPostItDialog>(pParent, rCoreSet, bPrevNext));
1378 class SvxMacroAssignDialog : public VclAbstractDialog
1380 public:
1381 SvxMacroAssignDialog( weld::Window* _pParent, const Reference< XFrame >& _rxDocumentFrame, const bool _bUnoDialogMode,
1382 const Reference< XNameReplace >& _rxEvents, const sal_uInt16 _nInitiallySelectedEvent )
1383 :m_aItems( SfxGetpApp()->GetPool(), svl::Items<SID_ATTR_MACROITEM, SID_ATTR_MACROITEM>{} )
1385 m_aItems.Put( SfxBoolItem( SID_ATTR_MACROITEM, _bUnoDialogMode ) );
1386 m_xDialog.reset(new SvxMacroAssignDlg(_pParent, _rxDocumentFrame, m_aItems, _rxEvents, _nInitiallySelectedEvent));
1389 virtual short Execute() override;
1391 private:
1392 SfxItemSet m_aItems;
1393 std::unique_ptr<SvxMacroAssignDlg> m_xDialog;
1396 short SvxMacroAssignDialog::Execute()
1398 return m_xDialog->run();
1401 short AbstractTipOfTheDayDialog_Impl::Execute()
1403 return m_xDlg->run();
1406 short AbstractDiagramDialog_Impl::Execute()
1408 return m_xDlg->run();
1411 VclPtr<VclAbstractDialog> AbstractDialogFactory_Impl::CreateSvxMacroAssignDlg(
1412 weld::Window* _pParent, const Reference< XFrame >& _rxDocumentFrame, const bool _bUnoDialogMode,
1413 const Reference< XNameReplace >& _rxEvents, const sal_uInt16 _nInitiallySelectedEvent )
1415 return VclPtr<SvxMacroAssignDialog>::Create( _pParent, _rxDocumentFrame, _bUnoDialogMode, _rxEvents, _nInitiallySelectedEvent );
1418 // Factories for TabPages
1419 CreateTabPage AbstractDialogFactory_Impl::GetTabPageCreatorFunc( sal_uInt16 nId )
1421 switch ( nId )
1423 case RID_SVXPAGE_BKG :
1424 return SvxBkgTabPage::Create;
1425 case RID_SVXPAGE_TEXTANIMATION :
1426 return SvxTextAnimationPage::Create;
1427 case RID_SVXPAGE_TRANSPARENCE :
1428 return SvxTransparenceTabPage::Create;
1429 case RID_SVXPAGE_AREA :
1430 return SvxAreaTabPage::Create;
1431 case RID_SVXPAGE_SHADOW :
1432 return SvxShadowTabPage::Create;
1433 case RID_SVXPAGE_LINE :
1434 return SvxLineTabPage::Create;
1435 case RID_SVXPAGE_CONNECTION :
1436 return SvxConnectionPage::Create;
1437 case RID_SVXPAGE_MEASURE :
1438 return SvxMeasurePage::Create;
1439 case RID_SFXPAGE_GENERAL :
1440 return SvxGeneralTabPage::Create;
1441 case RID_SVXPAGE_PICK_SINGLE_NUM :
1442 return SvxSingleNumPickTabPage::Create;
1443 case RID_SVXPAGE_PICK_BMP :
1444 return SvxBitmapPickTabPage::Create;
1445 case RID_SVXPAGE_PICK_BULLET :
1446 return SvxBulletPickTabPage::Create;
1447 case RID_SVXPAGE_NUM_OPTIONS :
1448 return SvxNumOptionsTabPage::Create;
1449 case RID_SVXPAGE_PICK_NUM :
1450 return SvxNumPickTabPage::Create;
1451 case RID_SVXPAGE_NUM_POSITION :
1452 return SvxNumPositionTabPage::Create;
1453 case RID_SVXPAGE_PARA_ASIAN :
1454 return SvxAsianTabPage::Create;
1455 case RID_SVXPAGE_EXT_PARAGRAPH :
1456 return SvxExtParagraphTabPage::Create;
1457 case RID_SVXPAGE_ALIGN_PARAGRAPH :
1458 return SvxParaAlignTabPage::Create;
1459 case RID_SVXPAGE_STD_PARAGRAPH :
1460 return SvxStdParagraphTabPage::Create;
1461 case RID_SVXPAGE_TABULATOR :
1462 return SvxTabulatorTabPage::Create;
1463 case RID_SVXPAGE_TEXTATTR :
1464 return SvxTextAttrPage::Create;
1465 case RID_SVXPAGE_ALIGNMENT :
1466 return svx::AlignmentTabPage::Create;
1467 case RID_SW_TP_BACKGROUND :
1468 case RID_SVXPAGE_BACKGROUND :
1469 return SvxBackgroundTabPage::Create;
1470 case RID_SVXPAGE_BORDER :
1471 return SvxBorderTabPage::Create;
1472 case RID_SVXPAGE_CHAR_NAME :
1473 return SvxCharNamePage::Create;
1474 case RID_SVXPAGE_CHAR_EFFECTS :
1475 return SvxCharEffectsPage::Create;
1476 case RID_SVXPAGE_CHAR_POSITION :
1477 return SvxCharPositionPage::Create;
1478 case RID_SVXPAGE_CHAR_TWOLINES :
1479 return SvxCharTwoLinesPage::Create;
1480 case RID_SVXPAGE_NUMBERFORMAT :
1481 return SvxNumberFormatTabPage::Create;
1482 case RID_SVXPAGE_PAGE :
1483 return SvxPageDescPage::Create;
1484 case RID_SVXPAGE_GRFCROP :
1485 return SvxGrfCropPage::Create;
1486 case RID_SVXPAGE_MACROASSIGN :
1487 return SfxMacroTabPage::Create;
1488 default:
1489 break;
1492 return nullptr;
1495 DialogGetRanges AbstractDialogFactory_Impl::GetDialogGetRangesFunc()
1497 return SvxPostItDialog::GetRanges;
1500 GetTabPageRanges AbstractDialogFactory_Impl::GetTabPageRangesFunc( sal_uInt16 nId )
1502 switch ( nId )
1504 case RID_SVXPAGE_TEXTANIMATION :
1505 return SvxTextAnimationPage::GetRanges;
1506 case RID_SVXPAGE_TRANSPARENCE :
1507 return SvxTransparenceTabPage::GetRanges;
1508 case RID_SVXPAGE_AREA :
1509 return SvxAreaTabPage::GetRanges;
1510 case RID_SVXPAGE_SHADOW :
1511 return SvxShadowTabPage::GetRanges;
1512 case RID_SVXPAGE_LINE :
1513 return SvxLineTabPage::GetRanges;
1514 case RID_SVXPAGE_CONNECTION :
1515 return SvxConnectionPage::GetRanges;
1516 case RID_SVXPAGE_MEASURE :
1517 return SvxMeasurePage::GetRanges;
1518 case RID_SVXPAGE_PARA_ASIAN :
1519 return SvxAsianTabPage::GetRanges;
1520 case RID_SVXPAGE_EXT_PARAGRAPH :
1521 return SvxExtParagraphTabPage::GetRanges;
1522 case RID_SVXPAGE_ALIGN_PARAGRAPH :
1523 return SvxParaAlignTabPage::GetRanges;
1524 case RID_SVXPAGE_STD_PARAGRAPH :
1525 return SvxStdParagraphTabPage::GetRanges;
1526 case RID_SVXPAGE_TABULATOR :
1527 return SvxTabulatorTabPage::GetRanges;
1528 case RID_SVXPAGE_TEXTATTR :
1529 return SvxTextAttrPage::GetRanges;
1530 case RID_SVXPAGE_ALIGNMENT :
1531 return svx::AlignmentTabPage::GetRanges;
1532 case RID_SW_TP_BACKGROUND :
1533 case RID_SVXPAGE_BACKGROUND :
1534 return SvxBackgroundTabPage::GetRanges;
1535 case RID_SVXPAGE_BORDER :
1536 return SvxBorderTabPage::GetRanges;
1537 case RID_SVXPAGE_CHAR_NAME :
1538 return SvxCharNamePage::GetRanges;
1539 case RID_SVXPAGE_CHAR_EFFECTS :
1540 return SvxCharEffectsPage::GetRanges;
1541 case RID_SVXPAGE_CHAR_POSITION :
1542 return SvxCharPositionPage::GetRanges;
1543 case RID_SVXPAGE_CHAR_TWOLINES :
1544 return SvxCharTwoLinesPage::GetRanges;
1545 case RID_SVXPAGE_NUMBERFORMAT :
1546 return SvxNumberFormatTabPage::GetRanges;
1547 case RID_SVXPAGE_PAGE :
1548 return SvxPageDescPage::GetRanges;
1549 case RID_SVXPAGE_ASIAN_LAYOUT:
1550 return SvxAsianLayoutPage::GetRanges;
1551 default:
1552 break;
1555 return nullptr;
1558 VclPtr<SfxAbstractInsertObjectDialog> AbstractDialogFactory_Impl::CreateInsertObjectDialog(weld::Window* pParent, const OUString& rCommand,
1559 const Reference <css::embed::XStorage>& xStor, const SvObjectServerList* pList)
1561 std::unique_ptr<InsertObjectDialog_Impl> pDlg;
1562 if ( rCommand == ".uno:InsertObject" )
1563 pDlg.reset(new SvInsertOleDlg(pParent, xStor, pList));
1564 else if ( rCommand == ".uno:InsertObjectFloatingFrame" )
1565 pDlg.reset(new SfxInsertFloatingFrameDialog(pParent, xStor));
1567 if ( pDlg )
1569 pDlg->SetHelpId( OUStringToOString( rCommand, RTL_TEXTENCODING_UTF8 ) );
1570 return VclPtr<AbstractInsertObjectDialog_Impl>::Create( std::move(pDlg) );
1572 return nullptr;
1575 VclPtr<VclAbstractDialog> AbstractDialogFactory_Impl::CreateEditObjectDialog(weld::Window* pParent, const OUString& rCommand,
1576 const Reference<css::embed::XEmbeddedObject>& xObj)
1578 if ( rCommand == ".uno:InsertObjectFloatingFrame" )
1580 auto pDlg = std::make_unique<SfxInsertFloatingFrameDialog>(pParent, xObj);
1581 pDlg->SetHelpId( OUStringToOString( rCommand, RTL_TEXTENCODING_UTF8 ) );
1582 return VclPtr<AbstractInsertObjectDialog_Impl>::Create( std::move(pDlg) );
1584 return nullptr;
1587 VclPtr<SfxAbstractPasteDialog> AbstractDialogFactory_Impl::CreatePasteDialog(weld::Window* pParent)
1589 return VclPtr<AbstractPasteDialog_Impl>::Create(std::make_unique<SvPasteObjectDialog>(pParent));
1592 VclPtr<SfxAbstractLinksDialog> AbstractDialogFactory_Impl::CreateLinksDialog(weld::Window* pParent, sfx2::LinkManager* pMgr, bool bHTML, sfx2::SvBaseLink* p)
1594 auto xLinkDlg(std::make_unique<SvBaseLinksDlg>(pParent, pMgr, bHTML));
1595 if (p)
1596 xLinkDlg->SetActLink(p);
1597 return VclPtr<AbstractLinksDialog_Impl>::Create(std::move(xLinkDlg));
1600 VclPtr<SfxAbstractTabDialog> AbstractDialogFactory_Impl::CreateSvxFormatCellsDialog(weld::Window* pParent, const SfxItemSet* pAttr, const SdrModel& rModel)
1602 return VclPtr<CuiAbstractTabController_Impl>::Create(std::make_unique<SvxFormatCellsDialog>(pParent, pAttr, rModel));
1605 VclPtr<SvxAbstractSplitTableDialog> AbstractDialogFactory_Impl::CreateSvxSplitTableDialog(weld::Window* pParent, bool bIsTableVertical, long nMaxVertical)
1607 return VclPtr<SvxSplitTableDlg>::Create( pParent, bIsTableVertical, nMaxVertical, 99 );
1610 VclPtr<SvxAbstractNewTableDialog> AbstractDialogFactory_Impl::CreateSvxNewTableDialog(weld::Window* pParent)
1612 return VclPtr<SvxNewTableDialog>::Create(pParent);
1615 VclPtr<VclAbstractDialog> AbstractDialogFactory_Impl::CreateOptionsDialog(weld::Window* pParent, const OUString& rExtensionId)
1617 return VclPtr<CuiAbstractController_Impl>::Create(std::make_unique<OfaTreeOptionsDialog>(pParent, rExtensionId));
1620 VclPtr<SvxAbstractInsRowColDlg> AbstractDialogFactory_Impl::CreateSvxInsRowColDlg(weld::Window* pParent, bool bCol, const OString& rHelpId)
1622 return VclPtr<SvxInsRowColDlg>::Create(pParent, bCol, rHelpId);
1625 VclPtr<AbstractPasswordToOpenModifyDialog> AbstractDialogFactory_Impl::CreatePasswordToOpenModifyDialog(
1626 weld::Window * pParent, sal_uInt16 nMaxPasswdLen, bool bIsPasswordToModify)
1628 return VclPtr<AbstractPasswordToOpenModifyDialog_Impl>::Create(std::make_unique<PasswordToOpenModifyDialog>(pParent, nMaxPasswdLen, bIsPasswordToModify));
1631 VclPtr<AbstractScreenshotAnnotationDlg> AbstractDialogFactory_Impl::CreateScreenshotAnnotationDlg(weld::Dialog& rParentDialog)
1633 return VclPtr<AbstractScreenshotAnnotationDlg_Impl>::Create(std::make_unique<ScreenshotAnnotationDlg>(rParentDialog));
1636 VclPtr<AbstractSignatureLineDialog> AbstractDialogFactory_Impl::CreateSignatureLineDialog(
1637 weld::Window* pParent, const Reference<XModel> xModel, bool bEditExisting)
1639 return VclPtr<AbstractSignatureLineDialog_Impl>::Create(
1640 std::make_unique<SignatureLineDialog>(pParent, xModel, bEditExisting));
1643 VclPtr<AbstractSignSignatureLineDialog>
1644 AbstractDialogFactory_Impl::CreateSignSignatureLineDialog(weld::Window* pParent,
1645 const Reference<XModel> xModel)
1647 return VclPtr<AbstractSignSignatureLineDialog_Impl>::Create(
1648 std::make_unique<SignSignatureLineDialog>(pParent, xModel));
1651 VclPtr<AbstractQrCodeGenDialog> AbstractDialogFactory_Impl::CreateQrCodeGenDialog(
1652 weld::Window* pParent, const Reference<XModel> xModel, bool bEditExisting)
1654 return VclPtr<AbstractQrCodeGenDialog_Impl>::Create(
1655 std::make_unique<QrCodeGenDialog>(pParent, xModel, bEditExisting));
1658 VclPtr<AbstractTipOfTheDayDialog>
1659 AbstractDialogFactory_Impl::CreateTipOfTheDayDialog(weld::Window* pParent)
1661 return VclPtr<AbstractTipOfTheDayDialog_Impl>::Create(std::make_unique<TipOfTheDayDialog>(pParent));
1664 VclPtr<AbstractDiagramDialog>
1665 AbstractDialogFactory_Impl::CreateDiagramDialog(weld::Window* pParent, std::shared_ptr<DiagramDataInterface> pDiagramData)
1667 return VclPtr<AbstractDiagramDialog_Impl>::Create(
1668 std::make_unique<DiagramDialog>(pParent, pDiagramData));
1671 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */