1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 .
21 #include "dlgfact.hxx"
23 #include <sfx2/basedlgs.hxx>
24 #include <sfx2/app.hxx>
25 #include <sfx2/request.hxx>
27 #include <svx/dialogs.hrc>
29 #include "splitcelldlg.hxx"
30 #include "gallery.hrc"
31 #include "dstribut.hxx"
32 #include "cuiimapwnd.hxx"
33 #include "hlmarkwn.hxx"
34 #include "cuicharmap.hxx"
35 #include "srchxtra.hxx"
36 #include "textanim.hxx"
37 #include "autocdlg.hxx"
38 #include "treeopt.hxx"
40 #include "hangulhanjadlg.hxx"
41 #include "showcols.hxx"
43 #include "cuigaldlg.hxx"
44 #include "transfrm.hxx"
46 #include "cuisrchdlg.hxx"
47 #include "cuitbxform.hxx"
48 #include "optdict.hxx"
49 #include "dlgname.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"
62 #include "pastedlg.hxx"
63 #include "linkdlg.hxx"
64 #include "SpellDialog.hxx"
66 #include "numpages.hxx"
67 #include "paragrph.hxx"
68 #include "tabstpge.hxx"
69 #include "textattr.hxx"
70 #include "backgrnd.hxx"
72 #include "chardlg.hxx"
74 #include "postdlg.hxx"
75 #include "grfpage.hxx"
76 #include "scriptdlg.hxx"
77 #include "selector.hxx"
78 #include "macropg.hxx"
79 #include "sdrcelldlg.hxx"
80 #include "newtabledlg.hxx"
81 #include "macroass.hxx"
84 #include "passwdomdlg.hxx"
86 #include "thesdlg.hxx"
88 #include "dialmgr.hxx"
90 using namespace ::com::sun::star
;
91 using namespace ::com::sun::star::frame
;
92 using namespace ::com::sun::star::container
;
94 using ::com::sun::star::uno::Reference
;
97 // AbstractTabDialog implementations just forwards everything to the dialog
98 IMPL_ABSTDLG_BASE(CuiAbstractSfxDialog_Impl
)
99 IMPL_ABSTDLG_BASE(CuiVclAbstractDialog_Impl
)
100 IMPL_ABSTDLG_BASE(VclAbstractRefreshableDialog_Impl
);
101 IMPL_ABSTDLG_BASE(CuiAbstractTabDialog_Impl
);
102 IMPL_ABSTDLG_BASE(AbstractSvxDistributeDialog_Impl
);
103 IMPL_ABSTDLG_BASE(AbstractHangulHanjaConversionDialog_Impl
);
104 IMPL_ABSTDLG_BASE(AbstractFmShowColsDialog_Impl
);
105 IMPL_ABSTDLG_BASE(AbstractHyphenWordDialog_Impl
)
106 IMPL_ABSTDLG_BASE(AbstractThesaurusDialog_Impl
)
107 IMPL_ABSTDLG_BASE(AbstractSvxZoomDialog_Impl
)
108 IMPL_ABSTDLG_BASE(AbstractSearchProgress_Impl
);
109 IMPL_ABSTDLG_BASE(AbstractTakeProgress_Impl
);
110 IMPL_ABSTDLG_BASE(AbstractTitleDialog_Impl
);
111 IMPL_ABSTDLG_BASE(AbstractScriptSelectorDialog_Impl
);
112 IMPL_ABSTDLG_BASE(AbstractGalleryIdDialog_Impl
);
113 IMPL_ABSTDLG_BASE(AbstractURLDlg_Impl
);
114 IMPL_ABSTDLG_BASE(AbstractSvxHlinkDlgMarkWnd_Impl
);
115 IMPL_ABSTDLG_BASE(AbstractSvxSearchSimilarityDialog_Impl
);
116 IMPL_ABSTDLG_BASE(AbstractSvxTransformTabDialog_Impl
);
117 IMPL_ABSTDLG_BASE(AbstractSvxCaptionDialog_Impl
);
118 IMPL_ABSTDLG_BASE(AbstractSvxJSearchOptionsDialog_Impl
);
119 IMPL_ABSTDLG_BASE(AbstractFmInputRecordNoDialog_Impl
);
120 IMPL_ABSTDLG_BASE(AbstractSvxNewDictionaryDialog_Impl
);
121 IMPL_ABSTDLG_BASE(AbstractSvxNameDialog_Impl
);
124 IMPL_ABSTDLG_BASE(AbstractSvxObjectNameDialog_Impl
);
125 IMPL_ABSTDLG_BASE(AbstractSvxObjectTitleDescDialog_Impl
);
127 IMPL_ABSTDLG_BASE(AbstractSvxMessDialog_Impl
);
128 IMPL_ABSTDLG_BASE(AbstractSvxMultiPathDialog_Impl
);
129 IMPL_ABSTDLG_BASE(AbstractSvxPathSelectDialog_Impl
);
130 IMPL_ABSTDLG_BASE(AbstractSvxHpLinkDlg_Impl
);
131 IMPL_ABSTDLG_BASE(AbstractFmSearchDialog_Impl
);
132 IMPL_ABSTDLG_BASE(AbstractGraphicFilterDialog_Impl
);
133 IMPL_ABSTDLG_BASE(AbstractSvxAreaTabDialog_Impl
);
134 IMPL_ABSTDLG_BASE(AbstractPasteDialog_Impl
);
135 IMPL_ABSTDLG_BASE(AbstractInsertObjectDialog_Impl
);
136 IMPL_ABSTDLG_BASE(AbstractLinksDialog_Impl
);
137 IMPL_ABSTDLG_BASE(AbstractSpellDialog_Impl
);
138 IMPL_ABSTDLG_BASE(AbstractSvxPostItDialog_Impl
);
139 IMPL_ABSTDLG_BASE(AbstractPasswordToOpenModifyDialog_Impl
);
142 // VclAbstractDialog2_Impl
146 VclAbstractDialog2_Impl::~VclAbstractDialog2_Impl()
148 m_pDlg
.disposeAndClear();
152 void VclAbstractDialog2_Impl::StartExecuteModal( const Link
<>& rEndDialogHdl
)
154 m_aEndDlgHdl
= rEndDialogHdl
;
155 m_pDlg
->StartExecuteModal(
156 LINK( this, VclAbstractDialog2_Impl
, EndDialogHdl
) );
160 long VclAbstractDialog2_Impl::GetResult()
162 return m_pDlg
->GetResult();
165 IMPL_LINK( VclAbstractDialog2_Impl
, EndDialogHdl
, Dialog
*, pDlg
)
167 if ( pDlg
!= m_pDlg
)
169 SAL_WARN( "cui.factory", "VclAbstractDialog2_Impl::EndDialogHdl(): wrong dialog" );
172 m_aEndDlgHdl
.Call( this );
173 m_aEndDlgHdl
= Link
<>();
180 void CuiAbstractTabDialog_Impl::SetCurPageId( sal_uInt16 nId
)
182 pDlg
->SetCurPageId( nId
);
185 void CuiAbstractTabDialog_Impl::SetCurPageId( const OString
& rName
)
187 pDlg
->SetCurPageId( rName
);
190 const SfxItemSet
* CuiAbstractTabDialog_Impl::GetOutputItemSet() const
192 return pDlg
->GetOutputItemSet();
195 const sal_uInt16
* CuiAbstractTabDialog_Impl::GetInputRanges(const SfxItemPool
& pItem
)
197 return pDlg
->GetInputRanges( pItem
);
200 void CuiAbstractTabDialog_Impl::SetInputSet( const SfxItemSet
* pInSet
)
202 pDlg
->SetInputSet( pInSet
);
205 void CuiAbstractTabDialog_Impl::SetText( const OUString
& rStr
)
207 pDlg
->SetText( rStr
);
209 OUString
CuiAbstractTabDialog_Impl::GetText() const
211 return pDlg
->GetText();
215 const SfxItemSet
* CuiAbstractSfxDialog_Impl::GetOutputItemSet() const
217 return pDlg
->GetOutputItemSet();
220 void CuiAbstractSfxDialog_Impl::SetText( const OUString
& rStr
)
222 pDlg
->SetText( rStr
);
225 OUString
CuiAbstractSfxDialog_Impl::GetText() const
227 return pDlg
->GetText();
230 SvxDistributeHorizontal
AbstractSvxDistributeDialog_Impl::GetDistributeHor()const
232 return pDlg
->GetDistributeHor();
234 SvxDistributeVertical
AbstractSvxDistributeDialog_Impl::GetDistributeVer()const
236 return pDlg
->GetDistributeVer();
239 void AbstractHangulHanjaConversionDialog_Impl::EndDialog(long nResult
)
241 pDlg
->EndDialog(nResult
);
244 void AbstractHangulHanjaConversionDialog_Impl::EnableRubySupport( bool _bVal
)
246 pDlg
->EnableRubySupport(_bVal
);
249 void AbstractHangulHanjaConversionDialog_Impl::SetByCharacter( bool _bByCharacter
)
251 pDlg
->SetByCharacter(_bByCharacter
);
254 void AbstractHangulHanjaConversionDialog_Impl::SetConversionDirectionState( bool _bTryBothDirections
, editeng::HangulHanjaConversion::ConversionDirection _ePrimaryConversionDirection
)
256 pDlg
->SetConversionDirectionState(_bTryBothDirections
, _ePrimaryConversionDirection
);
259 void AbstractHangulHanjaConversionDialog_Impl::SetConversionFormat( editeng::HangulHanjaConversion::ConversionFormat _eType
)
261 pDlg
->SetConversionFormat(_eType
);
264 void AbstractHangulHanjaConversionDialog_Impl::SetOptionsChangedHdl( const Link
<>& _rHdl
)
266 pDlg
->SetOptionsChangedHdl(_rHdl
);
269 void AbstractHangulHanjaConversionDialog_Impl::SetIgnoreHdl( const Link
<>& _rHdl
)
271 pDlg
->SetIgnoreHdl(_rHdl
);
274 void AbstractHangulHanjaConversionDialog_Impl::SetIgnoreAllHdl( const Link
<>& _rHdl
)
276 pDlg
->SetIgnoreAllHdl(_rHdl
);
279 void AbstractHangulHanjaConversionDialog_Impl::SetChangeHdl( const Link
<>& _rHdl
)
281 pDlg
->SetChangeHdl(_rHdl
);
284 void AbstractHangulHanjaConversionDialog_Impl::SetChangeAllHdl( const Link
<>& _rHdl
)
286 pDlg
->SetChangeAllHdl(_rHdl
);
289 void AbstractHangulHanjaConversionDialog_Impl::SetClickByCharacterHdl( const Link
<>& _rHdl
)
291 pDlg
->SetClickByCharacterHdl(_rHdl
);
294 void AbstractHangulHanjaConversionDialog_Impl::SetConversionFormatChangedHdl( const Link
<>& _rHdl
)
296 pDlg
->SetConversionFormatChangedHdl(_rHdl
);
298 void AbstractHangulHanjaConversionDialog_Impl::SetFindHdl( const Link
<>& _rHdl
)
300 pDlg
->SetFindHdl(_rHdl
);
303 bool AbstractHangulHanjaConversionDialog_Impl::GetUseBothDirections( ) const
305 return pDlg
->GetUseBothDirections();
308 editeng::HangulHanjaConversion::ConversionDirection
AbstractHangulHanjaConversionDialog_Impl::GetDirection( editeng::HangulHanjaConversion::ConversionDirection _eDefaultDirection
) const
310 return pDlg
->GetDirection( _eDefaultDirection
);
313 void AbstractHangulHanjaConversionDialog_Impl::SetCurrentString(
314 const OUString
& _rNewString
,
315 const ::com::sun::star::uno::Sequence
< OUString
>& _rSuggestions
,
316 bool _bOriginatesFromDocument
319 pDlg
->SetCurrentString(_rNewString
,_rSuggestions
,_bOriginatesFromDocument
);
321 OUString
AbstractHangulHanjaConversionDialog_Impl::GetCurrentString( ) const
323 return pDlg
->GetCurrentString();
325 editeng::HangulHanjaConversion::ConversionFormat
AbstractHangulHanjaConversionDialog_Impl::GetConversionFormat( ) const
327 return pDlg
->GetConversionFormat();
330 void AbstractHangulHanjaConversionDialog_Impl::FocusSuggestion( )
332 pDlg
->FocusSuggestion();
335 OUString
AbstractHangulHanjaConversionDialog_Impl::GetCurrentSuggestion( ) const
337 return pDlg
->GetCurrentSuggestion();
340 OUString
AbstractThesaurusDialog_Impl::GetWord()
342 return pDlg
->GetWord();
345 sal_uInt16
AbstractThesaurusDialog_Impl::GetLanguage() const
347 return pDlg
->GetLanguage();
350 vcl::Window
* AbstractThesaurusDialog_Impl::GetWindow()
355 void AbstractHyphenWordDialog_Impl::SelLeft()
360 void AbstractHyphenWordDialog_Impl::SelRight()
365 vcl::Window
* AbstractHyphenWordDialog_Impl::GetWindow()
370 Reference
< com::sun::star::embed::XEmbeddedObject
> AbstractInsertObjectDialog_Impl::GetObject()
372 return pDlg
->GetObject();
375 bool AbstractInsertObjectDialog_Impl::IsCreateNew()
377 return pDlg
->IsCreateNew();
380 ::Reference
< ::com::sun::star::io::XInputStream
> AbstractInsertObjectDialog_Impl::GetIconIfIconified( OUString
* pGraphicMediaType
)
382 return pDlg
->GetIconIfIconified( pGraphicMediaType
);
385 void AbstractPasteDialog_Impl::Insert( SotClipboardFormatId nFormat
, const OUString
& rFormatName
)
387 pDlg
->Insert( nFormat
, rFormatName
);
390 void AbstractPasteDialog_Impl::SetObjName( const SvGlobalName
& rClass
, const OUString
& rObjName
)
392 pDlg
->SetObjName( rClass
, rObjName
);
395 SotClipboardFormatId
AbstractPasteDialog_Impl::GetFormat( const TransferableDataHelper
& aHelper
,
396 const DataFlavorExVector
* pFormats
,
397 const TransferableObjectDescriptor
* pDesc
)
399 return pDlg
->GetFormat( aHelper
, pFormats
, pDesc
);
402 void AbstractFmShowColsDialog_Impl::SetColumns(const ::Reference
< ::com::sun::star::container::XIndexContainer
>& xCols
)
404 pDlg
->SetColumns(xCols
);
407 void AbstractSvxZoomDialog_Impl::SetLimits( sal_uInt16 nMin
, sal_uInt16 nMax
)
409 pDlg
->SetLimits( nMin
, nMax
);
412 void AbstractSvxZoomDialog_Impl::HideButton( ZoomButtonId nBtnId
)
414 pDlg
->HideButton( nBtnId
);
417 const SfxItemSet
* AbstractSvxZoomDialog_Impl::GetOutputItemSet() const
419 return pDlg
->GetOutputItemSet();
422 void AbstractSpellDialog_Impl::SetLanguage( sal_uInt16 nLang
)
424 pDlg
->SetLanguage(nLang
);
427 bool AbstractSpellDialog_Impl::Close()
429 return pDlg
->Close();
432 void AbstractSpellDialog_Impl::Invalidate()
434 pDlg
->InvalidateDialog();
437 vcl::Window
* AbstractSpellDialog_Impl::GetWindow()
442 SfxBindings
& AbstractSpellDialog_Impl::GetBindings()
444 return pDlg
->GetBindings();
447 void AbstractSearchProgress_Impl::Update()
452 void AbstractSearchProgress_Impl::Sync()
457 void AbstractSearchProgress_Impl::SetFileType( const OUString
& rType
)
459 pDlg
->SetFileType( rType
);
462 void AbstractSearchProgress_Impl::SetDirectory( const INetURLObject
& rURL
)
464 pDlg
->SetDirectory( rURL
);
466 PLinkStub
AbstractSearchProgress_Impl::GetLinkStubCleanUpHdl()
468 return SearchProgress::LinkStubCleanUpHdl
;
471 void AbstractTakeProgress_Impl::Update()
476 void AbstractTakeProgress_Impl::Sync()
481 void AbstractTakeProgress_Impl::SetFile( const INetURLObject
& rURL
)
483 pDlg
->SetFile( rURL
);
486 PLinkStub
AbstractTakeProgress_Impl::GetLinkStubCleanUpHdl()
488 return TakeProgress::LinkStubCleanUpHdl
;
491 OUString
AbstractTitleDialog_Impl::GetTitle() const
493 return pDlg
->GetTitle();
496 sal_uLong
AbstractGalleryIdDialog_Impl::GetId() const
498 return pDlg
->GetId();
501 void VclAbstractRefreshableDialog_Impl::Update()
506 void VclAbstractRefreshableDialog_Impl::Sync()
511 OUString
AbstractURLDlg_Impl::GetURL() const
513 return pDlg
->GetURL();
516 OUString
AbstractURLDlg_Impl::GetAltText() const
518 return pDlg
->GetAltText();
521 OUString
AbstractURLDlg_Impl::GetDesc() const
523 return pDlg
->GetDesc();
526 OUString
AbstractURLDlg_Impl::GetTarget() const
528 return pDlg
->GetTarget();
531 OUString
AbstractURLDlg_Impl::GetName() const
533 return pDlg
->GetName();
536 void AbstractSvxHlinkDlgMarkWnd_Impl::Hide()
538 ((vcl::Window
*)pDlg
)->Hide();
541 void AbstractSvxHlinkDlgMarkWnd_Impl::SetSizePixel( const Size
& rNewSize
)
543 pDlg
->SetSizePixel( rNewSize
);
546 Size
AbstractSvxHlinkDlgMarkWnd_Impl::GetSizePixel() const
548 return pDlg
->GetSizePixel();
551 bool AbstractSvxHlinkDlgMarkWnd_Impl::IsVisible( ) const
553 return (( vcl::Window
* )pDlg
)->IsVisible();
556 void AbstractSvxHlinkDlgMarkWnd_Impl::Invalidate( sal_uInt16 nFlags
)
558 (( vcl::Window
* )pDlg
)->Invalidate(nFlags
);
561 bool AbstractSvxHlinkDlgMarkWnd_Impl::MoveTo( Point aNewPos
)const
563 return pDlg
->MoveTo(aNewPos
);
566 bool AbstractSvxHlinkDlgMarkWnd_Impl::ConnectToDialog( bool bDoit
)const
568 return pDlg
->ConnectToDialog(bDoit
);
571 void AbstractSvxHlinkDlgMarkWnd_Impl::RefreshTree ( const OUString
& aStrURL
)
573 pDlg
->RefreshTree(aStrURL
);
576 void AbstractSvxHlinkDlgMarkWnd_Impl::SelectEntry ( const OUString
& aStrMark
)
578 pDlg
->SelectEntry(aStrMark
);
581 sal_uInt16
AbstractSvxHlinkDlgMarkWnd_Impl::SetError( sal_uInt16 nError
)
583 return pDlg
->SetError(nError
);
586 sal_uInt16
AbstractSvxSearchSimilarityDialog_Impl::GetOther()
588 return pDlg
->GetOther();
591 sal_uInt16
AbstractSvxSearchSimilarityDialog_Impl::GetShorter()
593 return pDlg
->GetShorter();
596 sal_uInt16
AbstractSvxSearchSimilarityDialog_Impl::GetLonger()
598 return pDlg
->GetLonger();
601 bool AbstractSvxSearchSimilarityDialog_Impl::IsRelaxed()
603 return pDlg
->IsRelaxed();
606 // AbstractSvxTransformTabDialog implementations just forwards everything to the dialog
607 void AbstractSvxTransformTabDialog_Impl::SetCurPageId( sal_uInt16 nId
)
609 pDlg
->SetCurPageId( nId
);
612 void AbstractSvxTransformTabDialog_Impl::SetCurPageId( const OString
& rName
)
614 pDlg
->SetCurPageId( rName
);
617 const SfxItemSet
* AbstractSvxTransformTabDialog_Impl::GetOutputItemSet() const
619 return pDlg
->GetOutputItemSet();
622 const sal_uInt16
* AbstractSvxTransformTabDialog_Impl::GetInputRanges(const SfxItemPool
& pItem
)
624 return pDlg
->GetInputRanges( pItem
);
627 void AbstractSvxTransformTabDialog_Impl::SetInputSet( const SfxItemSet
* pInSet
)
629 pDlg
->SetInputSet( pInSet
);
632 void AbstractSvxTransformTabDialog_Impl::SetText( const OUString
& rStr
)
634 pDlg
->SetText( rStr
);
636 OUString
AbstractSvxTransformTabDialog_Impl::GetText() const
638 return pDlg
->GetText();
640 void AbstractSvxTransformTabDialog_Impl::SetValidateFramePosLink( const Link
<>& rLink
)
642 pDlg
->SetValidateFramePosLink( rLink
);
645 // AbstractSvxCaptionDialog implementations just forwards everything to the dialog
646 void AbstractSvxCaptionDialog_Impl::SetCurPageId( sal_uInt16 nId
)
648 pDlg
->SetCurPageId( nId
);
651 void AbstractSvxCaptionDialog_Impl::SetCurPageId( const OString
& rName
)
653 pDlg
->SetCurPageId( rName
);
656 const SfxItemSet
* AbstractSvxCaptionDialog_Impl::GetOutputItemSet() const
658 return pDlg
->GetOutputItemSet();
661 const sal_uInt16
* AbstractSvxCaptionDialog_Impl::GetInputRanges(const SfxItemPool
& pItem
)
663 return pDlg
->GetInputRanges( pItem
);
666 void AbstractSvxCaptionDialog_Impl::SetInputSet( const SfxItemSet
* pInSet
)
668 pDlg
->SetInputSet( pInSet
);
671 void AbstractSvxCaptionDialog_Impl::SetText( const OUString
& rStr
)
673 pDlg
->SetText( rStr
);
675 OUString
AbstractSvxCaptionDialog_Impl::GetText() const
677 return pDlg
->GetText();
679 void AbstractSvxCaptionDialog_Impl::SetValidateFramePosLink( const Link
<>& rLink
)
681 pDlg
->SetValidateFramePosLink( rLink
);
684 sal_Int32
AbstractSvxJSearchOptionsDialog_Impl::GetTransliterationFlags() const
686 return pDlg
->GetTransliterationFlags();
689 void AbstractFmInputRecordNoDialog_Impl::SetValue(long nNew
)
691 pDlg
->SetValue(nNew
);
694 long AbstractFmInputRecordNoDialog_Impl::GetValue() const
696 return pDlg
->GetValue();
700 ::com::sun::star::linguistic2::XDictionary
> AbstractSvxNewDictionaryDialog_Impl::GetNewDictionary()
702 return pDlg
->GetNewDictionary();
705 void AbstractSvxNameDialog_Impl::GetName(OUString
& rName
)
707 pDlg
->GetName( rName
);
710 void AbstractSvxNameDialog_Impl::SetCheckNameHdl( const Link
<>& rLink
, bool bCheckImmediately
)
712 aCheckNameHdl
= rLink
;
714 pDlg
->SetCheckNameHdl( LINK(this, AbstractSvxNameDialog_Impl
, CheckNameHdl
), bCheckImmediately
);
716 pDlg
->SetCheckNameHdl( Link
<>(), bCheckImmediately
);
718 void AbstractSvxNameDialog_Impl::SetEditHelpId(const OString
& aHelpId
)
720 pDlg
->SetEditHelpId( aHelpId
);
722 void AbstractSvxNameDialog_Impl::SetHelpId( const OString
& aHelpId
)
724 pDlg
->SetHelpId( aHelpId
);
726 void AbstractSvxNameDialog_Impl::SetText( const OUString
& rStr
)
728 pDlg
->SetText( rStr
);
730 IMPL_LINK_NOARG(AbstractSvxNameDialog_Impl
, CheckNameHdl
)
732 if( aCheckNameHdl
.IsSet() )
733 return aCheckNameHdl
.Call(this);
737 void AbstractSvxObjectNameDialog_Impl::GetName(OUString
& rName
)
739 pDlg
->GetName(rName
);
742 void AbstractSvxObjectNameDialog_Impl::SetCheckNameHdl(const Link
<>& rLink
, bool bCheckImmediately
)
744 aCheckNameHdl
= rLink
;
748 pDlg
->SetCheckNameHdl(LINK(this, AbstractSvxObjectNameDialog_Impl
, CheckNameHdl
), bCheckImmediately
);
752 pDlg
->SetCheckNameHdl(Link
<>(), bCheckImmediately
);
756 IMPL_LINK_NOARG(AbstractSvxObjectNameDialog_Impl
, CheckNameHdl
)
758 if(aCheckNameHdl
.IsSet())
760 return aCheckNameHdl
.Call(this);
766 void AbstractSvxObjectTitleDescDialog_Impl::GetTitle(OUString
& rTitle
)
768 pDlg
->GetTitle(rTitle
);
771 void AbstractSvxObjectTitleDescDialog_Impl::GetDescription(OUString
& rDescription
)
773 pDlg
->GetDescription(rDescription
);
776 void AbstractSvxMessDialog_Impl::SetButtonText( sal_uInt16 nBtnId
, const OUString
& rNewTxt
)
778 pDlg
->SetButtonText( nBtnId
, rNewTxt
);
781 OUString
AbstractSvxMultiPathDialog_Impl::GetPath() const
783 return pDlg
->GetPath();
786 void AbstractSvxMultiPathDialog_Impl::SetPath( const OUString
& rPath
)
788 pDlg
->SetPath( rPath
);
791 void AbstractSvxMultiPathDialog_Impl::SetTitle( const OUString
& rNewTitle
)
793 pDlg
->SetText( rNewTitle
);
796 OUString
AbstractSvxPathSelectDialog_Impl::GetPath() const
798 return pDlg
->GetPath();
801 void AbstractSvxPathSelectDialog_Impl::SetPath( const OUString
& rPath
)
803 pDlg
->SetPath( rPath
);
806 void AbstractSvxPathSelectDialog_Impl::SetTitle( const OUString
& rNewTitle
)
808 pDlg
->SetText( rNewTitle
);
811 vcl::Window
* AbstractSvxHpLinkDlg_Impl::GetWindow()
813 return (vcl::Window
*)pDlg
;
816 bool AbstractSvxHpLinkDlg_Impl::QueryClose()
818 return pDlg
->QueryClose();
822 void AbstractFmSearchDialog_Impl::SetFoundHandler(const Link
<>& lnk
)
824 pDlg
->SetFoundHandler(lnk
);
826 void AbstractFmSearchDialog_Impl::SetCanceledNotFoundHdl(const Link
<>& lnk
)
828 pDlg
->SetCanceledNotFoundHdl(lnk
);
830 void AbstractFmSearchDialog_Impl::SetActiveField(const OUString
& strField
)
832 pDlg
->SetActiveField(strField
);
835 Graphic
AbstractGraphicFilterDialog_Impl::GetFilteredGraphic( const Graphic
& rGraphic
, double fScaleX
, double fScaleY
)
837 return pDlg
->GetFilteredGraphic( rGraphic
, fScaleX
, fScaleY
);
840 // AbstractSvxAreaTabDialog implementations just forwards everything to the dialog
841 void AbstractSvxAreaTabDialog_Impl::SetCurPageId( sal_uInt16 nId
)
843 pDlg
->SetCurPageId( nId
);
846 void AbstractSvxAreaTabDialog_Impl::SetCurPageId( const OString
& rName
)
848 pDlg
->SetCurPageId( rName
);
851 const SfxItemSet
* AbstractSvxAreaTabDialog_Impl::GetOutputItemSet() const
853 return pDlg
->GetOutputItemSet();
856 const sal_uInt16
* AbstractSvxAreaTabDialog_Impl::GetInputRanges(const SfxItemPool
& pItem
)
858 return pDlg
->GetInputRanges( pItem
);
861 void AbstractSvxAreaTabDialog_Impl::SetInputSet( const SfxItemSet
* pInSet
)
863 pDlg
->SetInputSet( pInSet
);
866 void AbstractSvxAreaTabDialog_Impl::SetText( const OUString
& rStr
)
868 pDlg
->SetText( rStr
);
870 OUString
AbstractSvxAreaTabDialog_Impl::GetText() const
872 return pDlg
->GetText();
875 void AbstractSvxPostItDialog_Impl::SetText( const OUString
& rStr
)
877 pDlg
->SetText( rStr
);
879 const SfxItemSet
* AbstractSvxPostItDialog_Impl::GetOutputItemSet() const
881 return pDlg
->GetOutputItemSet();
883 void AbstractSvxPostItDialog_Impl::EnableTravel(bool bNext
, bool bPrev
)
885 pDlg
->EnableTravel( bNext
, bPrev
);
887 OUString
AbstractSvxPostItDialog_Impl::GetNote()
889 return pDlg
->GetNote();
891 void AbstractSvxPostItDialog_Impl::SetNote(const OUString
& rTxt
)
893 pDlg
->SetNote( rTxt
);
895 void AbstractSvxPostItDialog_Impl::ShowLastAuthor(const OUString
& rAuthor
, const OUString
& rDate
)
897 pDlg
->ShowLastAuthor( rAuthor
, rDate
);
899 void AbstractSvxPostItDialog_Impl::DontChangeAuthor()
901 pDlg
->DontChangeAuthor();
903 void AbstractSvxPostItDialog_Impl::HideAuthor()
907 void AbstractSvxPostItDialog_Impl::SetReadonlyPostIt(bool bDisable
)
909 pDlg
->SetReadonlyPostIt( bDisable
);
911 bool AbstractSvxPostItDialog_Impl::IsOkEnabled() const
913 return pDlg
->IsOkEnabled();
915 void AbstractSvxPostItDialog_Impl::SetNextHdl( const Link
<>& rLink
)
919 pDlg
->SetNextHdl( LINK(this, AbstractSvxPostItDialog_Impl
, NextHdl
) );
921 pDlg
->SetNextHdl( Link
<>() );
923 void AbstractSvxPostItDialog_Impl::SetPrevHdl( const Link
<>& rLink
)
927 pDlg
->SetPrevHdl( LINK(this, AbstractSvxPostItDialog_Impl
, PrevHdl
) );
929 pDlg
->SetPrevHdl( Link
<>() );
931 IMPL_LINK_NOARG(AbstractSvxPostItDialog_Impl
, NextHdl
)
933 if( aNextHdl
.IsSet() )
937 IMPL_LINK_NOARG(AbstractSvxPostItDialog_Impl
, PrevHdl
)
939 if( aPrevHdl
.IsSet() )
943 vcl::Window
* AbstractSvxPostItDialog_Impl::GetWindow()
945 return (vcl::Window
*)pDlg
;
948 OUString
AbstractPasswordToOpenModifyDialog_Impl::GetPasswordToOpen() const
950 return pDlg
->GetPasswordToOpen();
952 OUString
AbstractPasswordToOpenModifyDialog_Impl::GetPasswordToModify() const
954 return pDlg
->GetPasswordToModify();
956 bool AbstractPasswordToOpenModifyDialog_Impl::IsRecommendToOpenReadonly() const
958 return pDlg
->IsRecommendToOpenReadonly();
961 // Create dialogs with simplest interface
962 VclAbstractDialog
* AbstractDialogFactory_Impl::CreateVclDialog( vcl::Window
* pParent
, sal_uInt32 nResId
)
967 case RID_DEFAULTABOUT
:
969 pDlg
= VclPtr
<AboutDialog
>::Create(pParent
);
972 case SID_OPTIONS_TREEDIALOG
:
973 case SID_OPTIONS_DATABASES
:
974 case SID_LANGUAGE_OPTIONS
:
976 bool bActivateLastSelection
= false;
977 if (nResId
== SID_OPTIONS_TREEDIALOG
)
978 bActivateLastSelection
= true;
979 Reference
< frame::XFrame
> xFrame
;
980 VclPtrInstance
<OfaTreeOptionsDialog
> pOptDlg( pParent
, xFrame
, bActivateLastSelection
);
981 if (nResId
== SID_OPTIONS_DATABASES
)
983 pOptDlg
->ActivatePage(SID_SB_DBREGISTEROPTIONS
);
985 else if (nResId
== SID_LANGUAGE_OPTIONS
)
987 //open the tab page "tools/options/languages"
988 pOptDlg
->ActivatePage(OFA_TP_LANGUAGES_FOR_SET_DOCUMENT_LANGUAGE
);
998 return new CuiVclAbstractDialog_Impl( pDlg
);
1002 // dialogs that use SfxBindings
1003 VclAbstractDialog
* AbstractDialogFactory_Impl::CreateSfxDialog( vcl::Window
* /*pParent*/, const SfxBindings
&, sal_uInt32
)
1008 VclAbstractDialog
* AbstractDialogFactory_Impl::CreateFrameDialog(
1009 vcl::Window
* pParent
, const Reference
< frame::XFrame
>& rxFrame
,
1010 sal_uInt32 nResId
, const OUString
& rParameter
)
1012 VclPtr
<Dialog
> pDlg
;
1013 if ( SID_OPTIONS_TREEDIALOG
== nResId
|| SID_OPTIONS_DATABASES
== nResId
)
1015 // only activate last page if we dont want to activate a special page
1016 bool bActivateLastSelection
= ( nResId
!= SID_OPTIONS_DATABASES
&& rParameter
.isEmpty() );
1017 VclPtrInstance
<OfaTreeOptionsDialog
> pOptDlg( pParent
, rxFrame
, bActivateLastSelection
);
1018 if ( nResId
== SID_OPTIONS_DATABASES
)
1019 pOptDlg
->ActivatePage(SID_SB_DBREGISTEROPTIONS
);
1020 else if ( !rParameter
.isEmpty() )
1021 pOptDlg
->ActivatePage( rParameter
);
1022 pDlg
.reset(pOptDlg
);
1026 return new CuiVclAbstractDialog_Impl( pDlg
);
1031 // TabDialog outside the drawing layer
1032 SfxAbstractTabDialog
* AbstractDialogFactory_Impl::CreateTabDialog( sal_uInt32 nResId
,
1033 vcl::Window
* pParent
,
1034 const SfxItemSet
* pAttrSet
,
1039 SfxTabDialog
* pDlg
=NULL
;
1042 case RID_OFA_AUTOCORR_DLG
:
1043 pDlg
= VclPtr
<OfaAutoCorrDlg
>::Create( pParent
, pAttrSet
);
1045 case RID_SVXDLG_CUSTOMIZE
:
1046 pDlg
= VclPtr
<SvxConfigDialog
>::Create( pParent
, pAttrSet
);
1053 return new CuiAbstractTabDialog_Impl( pDlg
);
1057 SfxAbstractTabDialog
* AbstractDialogFactory_Impl::CreateTabDialog( sal_uInt32 nResId
,
1058 vcl::Window
* pParent
,
1059 const SfxItemSet
* pAttrSet
,
1060 const Reference
< frame::XFrame
>& xViewFrame
,
1064 VclPtr
<SfxTabDialog
> pDlg
;
1067 case RID_OFA_AUTOCORR_DLG
:
1068 pDlg
= VclPtr
<OfaAutoCorrDlg
>::Create( pParent
, pAttrSet
);
1070 case RID_SVXDLG_CUSTOMIZE
:
1072 VclPtrInstance
<SvxConfigDialog
> pDlg1( pParent
, pAttrSet
);
1073 pDlg1
->SetFrame(xViewFrame
);
1082 return new CuiAbstractTabDialog_Impl( pDlg
);
1086 // TabDialog that use functionality of the drawing layer
1087 SfxAbstractTabDialog
* AbstractDialogFactory_Impl::CreateTextTabDialog( vcl::Window
* pParent
,
1088 const SfxItemSet
* pAttrSet
,
1092 VclPtrInstance
<SvxTextTabDialog
> pDlg( pParent
, pAttrSet
, pView
);
1093 return new CuiAbstractTabDialog_Impl( pDlg
);
1096 // TabDialog that use functionality of the drawing layer and add AnchorTypes -- for SvxCaptionTabDialog
1097 AbstractSvxCaptionDialog
* AbstractDialogFactory_Impl::CreateCaptionDialog( vcl::Window
* pParent
,
1098 const SdrView
* pView
,
1099 sal_uInt16 nAnchorTypes
)
1101 VclPtrInstance
<SvxCaptionTabDialog
> pDlg( pParent
, pView
, nAnchorTypes
);
1102 return new AbstractSvxCaptionDialog_Impl( pDlg
);
1105 AbstractSvxDistributeDialog
* AbstractDialogFactory_Impl::CreateSvxDistributeDialog(vcl::Window
* pParent
,
1106 const SfxItemSet
& rAttr
,
1107 SvxDistributeHorizontal eHor
,
1108 SvxDistributeVertical eVer
)
1110 VclPtrInstance
<SvxDistributeDialog
> pDlg( pParent
, rAttr
, eHor
, eVer
);
1111 return new AbstractSvxDistributeDialog_Impl( pDlg
);
1114 AbstractHangulHanjaConversionDialog
* AbstractDialogFactory_Impl::CreateHangulHanjaConversionDialog(vcl::Window
* pParent
,
1115 editeng::HangulHanjaConversion::ConversionDirection _ePrimaryDirection
)
1117 VclPtrInstance
<HangulHanjaConversionDialog
> pDlg( pParent
, _ePrimaryDirection
);
1118 return new AbstractHangulHanjaConversionDialog_Impl( pDlg
);
1121 AbstractThesaurusDialog
* AbstractDialogFactory_Impl::CreateThesaurusDialog( vcl::Window
* pParent
,
1122 css::uno::Reference
< css::linguistic2::XThesaurus
> xThesaurus
,
1123 const OUString
&rWord
, sal_Int16 nLanguage
)
1125 VclPtrInstance
<SvxThesaurusDialog
> pDlg( pParent
, xThesaurus
, rWord
, nLanguage
);
1126 return new AbstractThesaurusDialog_Impl( pDlg
);
1129 AbstractHyphenWordDialog
* AbstractDialogFactory_Impl::CreateHyphenWordDialog( vcl::Window
* pParent
,
1130 const OUString
&rWord
, LanguageType nLang
,
1131 ::com::sun::star::uno::Reference
< ::com::sun::star::linguistic2::XHyphenator
> &xHyphen
,
1132 SvxSpellWrapper
* pWrapper
)
1134 VclPtrInstance
<SvxHyphenWordDialog
> pDlg( rWord
, nLang
, pParent
, xHyphen
, pWrapper
);
1135 return new AbstractHyphenWordDialog_Impl( pDlg
);
1138 AbstractFmShowColsDialog
* AbstractDialogFactory_Impl::CreateFmShowColsDialog( vcl::Window
* pParent
)
1140 VclPtrInstance
<FmShowColsDialog
> pDlg( pParent
);
1141 return new AbstractFmShowColsDialog_Impl( pDlg
);
1143 AbstractSvxZoomDialog
* AbstractDialogFactory_Impl::CreateSvxZoomDialog( vcl::Window
* pParent
,
1144 const SfxItemSet
& rCoreSet
)
1146 VclPtrInstance
<SvxZoomDialog
> pDlg( pParent
, rCoreSet
);
1147 return new AbstractSvxZoomDialog_Impl( pDlg
);
1150 AbstractSpellDialog
* AbstractDialogFactory_Impl::CreateSvxSpellDialog(
1151 vcl::Window
* pParent
,
1152 SfxBindings
* pBindings
,
1153 svx::SpellDialogChildWindow
* pSpellChildWindow
)
1155 VclPtrInstance
<svx::SpellDialog
> pDlg(pSpellChildWindow
, pParent
, pBindings
);
1156 return new AbstractSpellDialog_Impl(pDlg
);
1159 VclAbstractRefreshableDialog
* AbstractDialogFactory_Impl::CreateActualizeProgressDialog( vcl::Window
* pParent
, GalleryTheme
* pThm
)
1161 VclPtrInstance
<ActualizeProgress
> pDlg(pParent
, pThm
);
1162 return new VclAbstractRefreshableDialog_Impl( pDlg
);
1165 AbstractSearchProgress
* AbstractDialogFactory_Impl::CreateSearchProgressDialog( vcl::Window
* pParent
,
1166 const INetURLObject
& rStartURL
)
1168 SearchProgress
* pDlg
= VclPtr
<SearchProgress
>::Create( pParent
, rStartURL
);
1169 return new AbstractSearchProgress_Impl( pDlg
);
1172 AbstractTakeProgress
* AbstractDialogFactory_Impl::CreateTakeProgressDialog( vcl::Window
* pParent
)
1174 VclPtrInstance
<TakeProgress
> pDlg( pParent
);
1175 return new AbstractTakeProgress_Impl( pDlg
);
1179 AbstractDialogFactory_Impl::CreateScriptErrorDialog(
1180 vcl::Window
* pParent
, const ::com::sun::star::uno::Any
& rException
)
1182 return new SvxScriptErrorDialog(pParent
, rException
);
1185 AbstractScriptSelectorDialog
*
1186 AbstractDialogFactory_Impl::CreateScriptSelectorDialog(
1187 vcl::Window
* pParent
, bool bShowSlots
, const Reference
< frame::XFrame
>& _rxFrame
)
1189 VclPtrInstance
<SvxScriptSelectorDialog
> pDlg(pParent
, bShowSlots
, _rxFrame
);
1190 return new AbstractScriptSelectorDialog_Impl(pDlg
);
1193 OUString
AbstractScriptSelectorDialog_Impl::GetScriptURL() const
1196 return pDlg
->GetScriptURL();
1200 void AbstractScriptSelectorDialog_Impl::SetRunLabel()
1203 pDlg
->SetRunLabel();
1207 VclAbstractDialog
* AbstractDialogFactory_Impl::CreateSvxScriptOrgDialog( vcl::Window
* pParent
,
1208 const OUString
& rLanguage
)
1210 VclPtrInstance
<SvxScriptOrgDialog
> pDlg( pParent
, rLanguage
);
1211 return new CuiVclAbstractDialog_Impl( pDlg
);
1214 AbstractTitleDialog
* AbstractDialogFactory_Impl::CreateTitleDialog( vcl::Window
* pParent
,
1215 const OUString
& rOldText
)
1217 VclPtrInstance
<TitleDialog
> pDlg( pParent
, rOldText
);
1218 return new AbstractTitleDialog_Impl( pDlg
);
1221 AbstractGalleryIdDialog
* AbstractDialogFactory_Impl::CreateGalleryIdDialog( vcl::Window
* pParent
,
1222 GalleryTheme
* pThm
)
1224 VclPtrInstance
<GalleryIdDialog
> pDlg( pParent
, pThm
);
1225 return new AbstractGalleryIdDialog_Impl( pDlg
);
1228 VclAbstractDialog2
* AbstractDialogFactory_Impl::CreateGalleryThemePropertiesDialog( vcl::Window
* pParent
,
1229 ExchangeData
* pData
,
1230 SfxItemSet
* pItemSet
)
1232 VclPtrInstance
<GalleryThemeProperties
> pDlg( pParent
, pData
, pItemSet
);
1233 return new VclAbstractDialog2_Impl( pDlg
);
1236 AbstractURLDlg
* AbstractDialogFactory_Impl::CreateURLDialog( vcl::Window
* pParent
,
1237 const OUString
& rURL
, const OUString
& rAltText
, const OUString
& rDescription
,
1238 const OUString
& rTarget
, const OUString
& rName
,
1239 TargetList
& rTargetList
)
1241 VclPtrInstance
<URLDlg
> pDlg( pParent
, rURL
, rAltText
, rDescription
,
1242 rTarget
, rName
, rTargetList
);
1243 return new AbstractURLDlg_Impl( pDlg
);
1246 AbstractSvxHlinkDlgMarkWnd
* AbstractDialogFactory_Impl::CreateSvxHlinkDlgMarkWndDialog( SvxHyperlinkTabPageBase
* pParent
, sal_uInt32 nResId
)
1248 SvxHlinkDlgMarkWnd
* pDlg
=NULL
;
1251 case RID_SVXFLOAT_HYPERLINK_MARKWND
:
1252 pDlg
= VclPtr
<SvxHlinkDlgMarkWnd
>::Create ( pParent
);
1259 return new AbstractSvxHlinkDlgMarkWnd_Impl( pDlg
);
1263 SfxAbstractTabDialog
* AbstractDialogFactory_Impl::CreateTabItemDialog(vcl::Window
* pParent
,
1264 const SfxItemSet
& rSet
)
1266 VclPtrInstance
<SvxSearchFormatDialog
> pDlg(pParent
, rSet
);
1267 return new CuiAbstractTabDialog_Impl(pDlg
);
1270 VclAbstractDialog
* AbstractDialogFactory_Impl::CreateSvxSearchAttributeDialog( vcl::Window
* pParent
,
1271 SearchAttrItemList
& rLst
,
1272 const sal_uInt16
* pWhRanges
)
1274 VclPtrInstance
<SvxSearchAttributeDialog
> pDlg( pParent
, rLst
, pWhRanges
);
1275 return new CuiVclAbstractDialog_Impl( pDlg
);
1278 AbstractSvxSearchSimilarityDialog
* AbstractDialogFactory_Impl::CreateSvxSearchSimilarityDialog( vcl::Window
* pParent
,
1281 sal_uInt16 nShorter
,
1284 VclPtrInstance
<SvxSearchSimilarityDialog
> pDlg( pParent
, bRelax
, nOther
, nShorter
, nLonger
);
1285 return new AbstractSvxSearchSimilarityDialog_Impl( pDlg
);
1289 SfxAbstractTabDialog
* AbstractDialogFactory_Impl::CreateSvxBorderBackgroundDlg(
1290 vcl::Window
* pParent
,
1291 const SfxItemSet
& rCoreSet
,
1292 bool bEnableSelector
,
1293 bool bEnableDrawingLayerFillStyles
)
1295 VclPtrInstance
<SvxBorderBackgroundDlg
> pDlg(
1299 bEnableDrawingLayerFillStyles
);
1301 return new CuiAbstractTabDialog_Impl(pDlg
);
1304 AbstractSvxTransformTabDialog
* AbstractDialogFactory_Impl::CreateSvxTransformTabDialog( vcl::Window
* pParent
,
1305 const SfxItemSet
* pAttr
,
1306 const SdrView
* pView
,
1307 sal_uInt16 nAnchorTypes
)
1309 VclPtrInstance
<SvxTransformTabDialog
> pDlg( pParent
, pAttr
,pView
, nAnchorTypes
);
1310 return new AbstractSvxTransformTabDialog_Impl( pDlg
);
1313 SfxAbstractTabDialog
* AbstractDialogFactory_Impl::CreateSchTransformTabDialog( vcl::Window
* pParent
,
1314 const SfxItemSet
* pAttr
,
1315 const SdrView
* pSdrView
,
1320 VclPtr
<SfxTabDialog
> pDlg
;
1323 case RID_SCH_TransformTabDLG_SVXPAGE_ANGLE
:
1325 pDlg
.reset( VclPtr
<SvxTransformTabDialog
>::Create( pParent
, pAttr
,pSdrView
, bSizeTabPage
? SVX_OBJ_NOPROTECT
: SVX_OBJ_NOPROTECT
|SVX_OBJ_NORESIZE
) );
1326 pDlg
->RemoveTabPage( "RID_SVXPAGE_ANGLE" );
1327 pDlg
->RemoveTabPage( "RID_SVXPAGE_SLANT" );
1330 case RID_SCH_TransformTabDLG_SVXPAGE_SLANT
:
1332 pDlg
.reset(VclPtr
<SvxTransformTabDialog
>::Create ( pParent
, pAttr
,pSdrView
, bSizeTabPage
? SVX_OBJ_NOPROTECT
: SVX_OBJ_NOPROTECT
|SVX_OBJ_NORESIZE
) );
1333 pDlg
->RemoveTabPage( "RID_SVXPAGE_SLANT" );
1341 return new CuiAbstractTabDialog_Impl( pDlg
);
1345 AbstractSvxJSearchOptionsDialog
* AbstractDialogFactory_Impl::CreateSvxJSearchOptionsDialog( vcl::Window
* pParent
,
1346 const SfxItemSet
& rOptionsSet
,
1347 sal_Int32 nInitialFlags
)
1349 VclPtrInstance
<SvxJSearchOptionsDialog
> pDlg( pParent
, rOptionsSet
, nInitialFlags
);
1350 return new AbstractSvxJSearchOptionsDialog_Impl( pDlg
);
1353 AbstractFmInputRecordNoDialog
* AbstractDialogFactory_Impl::CreateFmInputRecordNoDialog( vcl::Window
* pParent
)
1355 VclPtrInstance
<FmInputRecordNoDialog
> pDlg( pParent
);
1356 return new AbstractFmInputRecordNoDialog_Impl( pDlg
);
1359 AbstractSvxNewDictionaryDialog
* AbstractDialogFactory_Impl::CreateSvxNewDictionaryDialog( vcl::Window
* pParent
,
1360 ::Reference
< ::com::sun::star::linguistic2::XSpellChecker1
> &xSpl
)
1362 VclPtrInstance
<SvxNewDictionaryDialog
> pDlg( pParent
, xSpl
);
1363 return new AbstractSvxNewDictionaryDialog_Impl( pDlg
);
1366 VclAbstractDialog
* AbstractDialogFactory_Impl::CreateSvxEditDictionaryDialog( vcl::Window
* pParent
,
1367 const OUString
& rName
,
1368 ::Reference
< ::com::sun::star::linguistic2::XSpellChecker1
> &xSpl
,
1374 case RID_SFXDLG_EDITDICT
:
1375 pDlg
= VclPtr
<SvxEditDictionaryDialog
>::Create( pParent
, rName
, xSpl
);
1382 return new CuiVclAbstractDialog_Impl( pDlg
);
1386 AbstractSvxNameDialog
* AbstractDialogFactory_Impl::CreateSvxNameDialog( vcl::Window
* pParent
,
1387 const OUString
& rName
, const OUString
& rDesc
)
1389 VclPtrInstance
<SvxNameDialog
> pDlg( pParent
, rName
, rDesc
);
1390 return new AbstractSvxNameDialog_Impl( pDlg
);
1393 AbstractSvxObjectNameDialog
* AbstractDialogFactory_Impl::CreateSvxObjectNameDialog(vcl::Window
* pParent
, const OUString
& rName
)
1395 return new AbstractSvxObjectNameDialog_Impl(VclPtr
<SvxObjectNameDialog
>::Create(pParent
, rName
));
1398 AbstractSvxObjectTitleDescDialog
* AbstractDialogFactory_Impl::CreateSvxObjectTitleDescDialog(vcl::Window
* pParent
, const OUString
& rTitle
, const OUString
& rDescription
)
1400 return new AbstractSvxObjectTitleDescDialog_Impl(VclPtr
<SvxObjectTitleDescDialog
>::Create(pParent
, rTitle
, rDescription
));
1403 AbstractSvxMessDialog
* AbstractDialogFactory_Impl::CreateSvxMessDialog( vcl::Window
* pParent
, sal_uInt32
,
1404 const OUString
& rText
, const OUString
& rDesc
, Image
* pImg
)
1406 VclPtrInstance
<SvxMessDialog
> pDlg( pParent
, rText
, rDesc
, pImg
);
1407 return new AbstractSvxMessDialog_Impl( pDlg
);
1410 AbstractSvxMultiPathDialog
* AbstractDialogFactory_Impl::CreateSvxMultiPathDialog(vcl::Window
* pParent
)
1412 VclPtrInstance
<SvxMultiPathDialog
> pDlg(pParent
);
1413 return new AbstractSvxMultiPathDialog_Impl( pDlg
);
1416 AbstractSvxMultiPathDialog
* AbstractDialogFactory_Impl::CreateSvxPathSelectDialog(vcl::Window
* pParent
)
1418 VclPtrInstance
<SvxPathSelectDialog
> pDlg(pParent
);
1419 return new AbstractSvxPathSelectDialog_Impl( pDlg
);
1422 AbstractSvxHpLinkDlg
* AbstractDialogFactory_Impl::CreateSvxHpLinkDlg (vcl::Window
* pParent
,
1423 SfxBindings
* pBindings
,
1426 SvxHpLinkDlg
* pDlg
=NULL
;
1429 case SID_HYPERLINK_DIALOG
:
1430 pDlg
= VclPtr
<SvxHpLinkDlg
>::Create( pParent
, pBindings
);
1437 return new AbstractSvxHpLinkDlg_Impl( pDlg
);
1441 AbstractFmSearchDialog
* AbstractDialogFactory_Impl::CreateFmSearchDialog(vcl::Window
* pParent
,
1442 const OUString
& strInitialText
,
1443 const ::std::vector
< OUString
>& _rContexts
,
1444 sal_Int16 nInitialContext
,
1445 const Link
<>& lnkContextSupplier
)
1447 VclPtrInstance
<FmSearchDialog
> pDlg( pParent
, strInitialText
, _rContexts
,
1448 nInitialContext
, lnkContextSupplier
);
1449 return new AbstractFmSearchDialog_Impl( pDlg
);
1452 AbstractGraphicFilterDialog
* AbstractDialogFactory_Impl::CreateGraphicFilterEmboss (vcl::Window
* pParent
,
1453 const Graphic
& rGraphic
,
1454 RECT_POINT eLightSource
)
1456 VclPtrInstance
<GraphicFilterEmboss
> pDlg( pParent
, rGraphic
, eLightSource
);
1457 return new AbstractGraphicFilterDialog_Impl( pDlg
);
1460 AbstractGraphicFilterDialog
* AbstractDialogFactory_Impl::CreateGraphicFilterPoster(vcl::Window
* pParent
,
1461 const Graphic
& rGraphic
,
1464 VclPtrInstance
<GraphicFilterPoster
> pDlg( pParent
, rGraphic
, nCount
);
1465 return new AbstractGraphicFilterDialog_Impl( pDlg
);
1468 AbstractGraphicFilterDialog
* AbstractDialogFactory_Impl::CreateGraphicFilterSepia (vcl::Window
* pParent
,
1469 const Graphic
& rGraphic
,
1472 VclPtrInstance
<GraphicFilterSepia
> pDlg( pParent
, rGraphic
, nCount
);
1473 return new AbstractGraphicFilterDialog_Impl( pDlg
);
1476 AbstractGraphicFilterDialog
* AbstractDialogFactory_Impl::CreateGraphicFilterSmooth(vcl::Window
* pParent
,
1477 const Graphic
& rGraphic
, double nRadius
)
1479 VclPtrInstance
<GraphicFilterSmooth
> pDlg( pParent
, rGraphic
, nRadius
);
1480 return new AbstractGraphicFilterDialog_Impl( pDlg
);
1483 AbstractGraphicFilterDialog
* AbstractDialogFactory_Impl::CreateGraphicFilterSolarize (vcl::Window
* pParent
,
1484 const Graphic
& rGraphic
, sal_uInt8 nGreyThreshold
, bool bInvert
)
1486 VclPtrInstance
<GraphicFilterSolarize
> pDlg( pParent
, rGraphic
, nGreyThreshold
, bInvert
);
1487 return new AbstractGraphicFilterDialog_Impl( pDlg
);
1490 AbstractGraphicFilterDialog
* AbstractDialogFactory_Impl::CreateGraphicFilterMosaic (vcl::Window
* pParent
,
1491 const Graphic
& rGraphic
, sal_uInt16 nTileWidth
, sal_uInt16 nTileHeight
,
1494 VclPtrInstance
<GraphicFilterMosaic
> pDlg(pParent
, rGraphic
, nTileWidth
, nTileHeight
, bEnhanceEdges
);
1495 return new AbstractGraphicFilterDialog_Impl( pDlg
);
1498 AbstractSvxAreaTabDialog
* AbstractDialogFactory_Impl::CreateSvxAreaTabDialog( vcl::Window
* pParent
,
1499 const SfxItemSet
* pAttr
,
1503 VclPtrInstance
<SvxAreaTabDialog
> pDlg( pParent
, pAttr
, pModel
, bShadow
);
1504 return new AbstractSvxAreaTabDialog_Impl( pDlg
);
1507 SfxAbstractTabDialog
* AbstractDialogFactory_Impl::CreateSvxLineTabDialog( vcl::Window
* pParent
, const SfxItemSet
* pAttr
, //add forSvxLineTabDialog
1509 const SdrObject
* pObj
,
1512 VclPtrInstance
<SvxLineTabDialog
> pDlg( pParent
, pAttr
, pModel
,pObj
,bHasObj
);
1513 return new CuiAbstractTabDialog_Impl( pDlg
);
1516 SfxAbstractDialog
* AbstractDialogFactory_Impl::CreateSfxDialog( vcl::Window
* pParent
,
1517 const SfxItemSet
& rAttr
,
1518 const Reference
< XFrame
>& _rxDocumentFrame
,
1522 SfxModalDialog
* pDlg
=NULL
;
1525 case SID_EVENTCONFIG
:
1526 pDlg
= VclPtr
<SfxMacroAssignDlg
>::Create( pParent
, _rxDocumentFrame
, rAttr
);
1528 case RID_SVXDLG_CHARMAP
:
1529 pDlg
= VclPtr
<SvxCharacterMap
>::Create( pParent
, true, &rAttr
);
1536 return new CuiAbstractSfxDialog_Impl( pDlg
);
1540 SfxAbstractDialog
* AbstractDialogFactory_Impl::CreateSfxDialog( vcl::Window
* pParent
,
1541 const SfxItemSet
& rAttr
,
1542 const SdrView
* pView
,
1547 SfxSingleTabDialog
* pDlg
=NULL
;
1550 case RID_SVXPAGE_MEASURE
:
1551 pDlg
= VclPtr
<SvxMeasureDialog
>::Create( pParent
, rAttr
, pView
);
1553 case RID_SVXPAGE_CONNECTION
:
1554 pDlg
= VclPtr
<SvxConnectionDialog
>::Create( pParent
, rAttr
, pView
);
1556 case RID_SFXPAGE_DBREGISTER
:
1557 pDlg
= VclPtr
<DatabaseRegistrationDialog
>::Create( pParent
, rAttr
);
1564 return new CuiAbstractSfxDialog_Impl( pDlg
);
1569 AbstractSvxPostItDialog
* AbstractDialogFactory_Impl::CreateSvxPostItDialog( vcl::Window
* pParent
,
1570 const SfxItemSet
& rCoreSet
,
1573 VclPtrInstance
<SvxPostItDialog
> pDlg( pParent
, rCoreSet
, bPrevNext
);
1574 return new AbstractSvxPostItDialog_Impl( pDlg
);
1577 class SvxMacroAssignDialog
: public VclAbstractDialog
1580 SvxMacroAssignDialog( vcl::Window
* _pParent
, const Reference
< XFrame
>& _rxDocumentFrame
, const bool _bUnoDialogMode
,
1581 const Reference
< XNameReplace
>& _rxEvents
, const sal_uInt16 _nInitiallySelectedEvent
)
1582 :m_aItems( SfxGetpApp()->GetPool(), SID_ATTR_MACROITEM
, SID_ATTR_MACROITEM
)
1584 m_aItems
.Put( SfxBoolItem( SID_ATTR_MACROITEM
, _bUnoDialogMode
) );
1585 m_pDialog
.reset( VclPtr
<SvxMacroAssignDlg
>::Create( _pParent
, _rxDocumentFrame
, m_aItems
, _rxEvents
, _nInitiallySelectedEvent
) );
1588 virtual short Execute() SAL_OVERRIDE
;
1589 virtual ~SvxMacroAssignDialog();
1592 SfxItemSet m_aItems
;
1593 VclPtr
< SvxMacroAssignDlg
> m_pDialog
;
1596 short SvxMacroAssignDialog::Execute()
1598 return m_pDialog
->Execute();
1601 SvxMacroAssignDialog::~SvxMacroAssignDialog()
1605 VclAbstractDialog
* AbstractDialogFactory_Impl::CreateSvxMacroAssignDlg(
1606 vcl::Window
* _pParent
, const Reference
< XFrame
>& _rxDocumentFrame
, const bool _bUnoDialogMode
,
1607 const Reference
< XNameReplace
>& _rxEvents
, const sal_uInt16 _nInitiallySelectedEvent
)
1609 return new SvxMacroAssignDialog( _pParent
, _rxDocumentFrame
, _bUnoDialogMode
, _rxEvents
, _nInitiallySelectedEvent
);
1612 // Factories for TabPages
1613 CreateTabPage
AbstractDialogFactory_Impl::GetTabPageCreatorFunc( sal_uInt16 nId
)
1617 case RID_SVXPAGE_TEXTANIMATION
:
1618 return SvxTextAnimationPage::Create
;
1619 case RID_SVXPAGE_TRANSPARENCE
:
1620 return SvxTransparenceTabPage::Create
;
1621 case RID_SVXPAGE_AREA
:
1622 return SvxAreaTabPage::Create
;
1623 case RID_SVXPAGE_SHADOW
:
1624 return SvxShadowTabPage::Create
;
1625 case RID_SVXPAGE_LINE
:
1626 return SvxLineTabPage::Create
;
1627 case RID_SVXPAGE_CONNECTION
:
1628 return SvxConnectionPage::Create
;
1629 case RID_SVXPAGE_MEASURE
:
1630 return SvxMeasurePage::Create
;
1631 case RID_SFXPAGE_GENERAL
:
1632 return SvxGeneralTabPage::Create
;
1633 case RID_SVXPAGE_PICK_SINGLE_NUM
:
1634 return SvxSingleNumPickTabPage::Create
;
1635 case RID_SVXPAGE_PICK_BMP
:
1636 return SvxBitmapPickTabPage::Create
;
1637 case RID_SVXPAGE_PICK_BULLET
:
1638 return SvxBulletPickTabPage::Create
;
1639 case RID_SVXPAGE_NUM_OPTIONS
:
1640 return SvxNumOptionsTabPage::Create
;
1641 case RID_SVXPAGE_PICK_NUM
:
1642 return SvxNumPickTabPage::Create
;
1643 case RID_SVXPAGE_NUM_POSITION
:
1644 return SvxNumPositionTabPage::Create
;
1645 case RID_SVXPAGE_PARA_ASIAN
:
1646 return SvxAsianTabPage::Create
;
1647 case RID_SVXPAGE_EXT_PARAGRAPH
:
1648 return SvxExtParagraphTabPage::Create
;
1649 case RID_SVXPAGE_ALIGN_PARAGRAPH
:
1650 return SvxParaAlignTabPage::Create
;
1651 case RID_SVXPAGE_STD_PARAGRAPH
:
1652 return SvxStdParagraphTabPage::Create
;
1653 case RID_SVXPAGE_TABULATOR
:
1654 return SvxTabulatorTabPage::Create
;
1655 case RID_SVXPAGE_TEXTATTR
:
1656 return SvxTextAttrPage::Create
;
1657 case RID_SVXPAGE_ALIGNMENT
:
1658 return svx::AlignmentTabPage::Create
;
1659 case RID_SW_TP_BACKGROUND
:
1660 case RID_SVXPAGE_BACKGROUND
:
1661 return SvxBackgroundTabPage::Create
;
1662 case RID_SVXPAGE_BORDER
:
1663 return SvxBorderTabPage::Create
;
1664 case RID_SVXPAGE_CHAR_NAME
:
1665 return SvxCharNamePage::Create
;
1666 case RID_SVXPAGE_CHAR_EFFECTS
:
1667 return SvxCharEffectsPage::Create
;
1668 case RID_SVXPAGE_CHAR_POSITION
:
1669 return SvxCharPositionPage::Create
;
1670 case RID_SVXPAGE_CHAR_TWOLINES
:
1671 return SvxCharTwoLinesPage::Create
;
1672 case RID_SVXPAGE_NUMBERFORMAT
:
1673 return SvxNumberFormatTabPage::Create
;
1674 case RID_SVXPAGE_PAGE
:
1675 return SvxPageDescPage::Create
;
1676 case RID_SVXPAGE_GRFCROP
:
1677 return SvxGrfCropPage::Create
;
1678 case RID_SVXPAGE_MACROASSIGN
:
1679 return SfxMacroTabPage::Create
;
1687 CreateSvxDistributePage
AbstractDialogFactory_Impl::GetSvxDistributePageCreatorFunc()
1689 return SvxDistributePage::Create
;
1692 DialogGetRanges
AbstractDialogFactory_Impl::GetDialogGetRangesFunc()
1694 return SvxPostItDialog::GetRanges
;
1697 GetTabPageRanges
AbstractDialogFactory_Impl::GetTabPageRangesFunc( sal_uInt16 nId
)
1701 case RID_SVXPAGE_TEXTANIMATION
:
1702 return SvxTextAnimationPage::GetRanges
;
1703 case RID_SVXPAGE_TRANSPARENCE
:
1704 return SvxTransparenceTabPage::GetRanges
;
1705 case RID_SVXPAGE_AREA
:
1706 return SvxAreaTabPage::GetRanges
;
1707 case RID_SVXPAGE_SHADOW
:
1708 return SvxShadowTabPage::GetRanges
;
1709 case RID_SVXPAGE_LINE
:
1710 return SvxLineTabPage::GetRanges
;
1711 case RID_SVXPAGE_CONNECTION
:
1712 return SvxConnectionPage::GetRanges
;
1713 case RID_SVXPAGE_MEASURE
:
1714 return SvxMeasurePage::GetRanges
;
1715 case RID_SVXPAGE_PARA_ASIAN
:
1716 return SvxAsianTabPage::GetRanges
;
1717 case RID_SVXPAGE_EXT_PARAGRAPH
:
1718 return SvxExtParagraphTabPage::GetRanges
;
1719 case RID_SVXPAGE_ALIGN_PARAGRAPH
:
1720 return SvxParaAlignTabPage::GetRanges
;
1721 case RID_SVXPAGE_STD_PARAGRAPH
:
1722 return SvxStdParagraphTabPage::GetRanges
;
1723 case RID_SVXPAGE_TABULATOR
:
1724 return SvxTabulatorTabPage::GetRanges
;
1725 case RID_SVXPAGE_TEXTATTR
:
1726 return SvxTextAttrPage::GetRanges
;
1727 case RID_SVXPAGE_ALIGNMENT
:
1728 return svx::AlignmentTabPage::GetRanges
;
1729 case RID_SW_TP_BACKGROUND
:
1730 case RID_SVXPAGE_BACKGROUND
:
1731 return SvxBackgroundTabPage::GetRanges
;
1732 case RID_SVXPAGE_BORDER
:
1733 return SvxBorderTabPage::GetRanges
;
1734 case RID_SVXPAGE_CHAR_NAME
:
1735 return SvxCharNamePage::GetRanges
;
1736 case RID_SVXPAGE_CHAR_EFFECTS
:
1737 return SvxCharEffectsPage::GetRanges
;
1738 case RID_SVXPAGE_CHAR_POSITION
:
1739 return SvxCharPositionPage::GetRanges
;
1740 case RID_SVXPAGE_CHAR_TWOLINES
:
1741 return SvxCharTwoLinesPage::GetRanges
;
1742 case RID_SVXPAGE_NUMBERFORMAT
:
1743 return SvxNumberFormatTabPage::GetRanges
;
1744 case RID_SVXPAGE_PAGE
:
1745 return SvxPageDescPage::GetRanges
;
1746 case RID_SVXPAGE_ASIAN_LAYOUT
:
1747 return SvxAsianLayoutPage::GetRanges
;
1755 SfxAbstractInsertObjectDialog
* AbstractDialogFactory_Impl::CreateInsertObjectDialog( vcl::Window
* pParent
, const OUString
& rCommand
,
1756 const Reference
< com::sun::star::embed::XStorage
>& xStor
,
1757 const SvObjectServerList
* pList
)
1759 InsertObjectDialog_Impl
* pDlg
=0;
1760 if ( rCommand
== ".uno:InsertObject" )
1761 pDlg
= VclPtr
<SvInsertOleDlg
>::Create( pParent
, xStor
, pList
);
1762 else if ( rCommand
== ".uno:InsertPlugin" )
1763 pDlg
= VclPtr
<SvInsertPlugInDialog
>::Create( pParent
, xStor
);
1764 else if ( rCommand
== ".uno:InsertObjectFloatingFrame" )
1765 pDlg
= VclPtr
<SfxInsertFloatingFrameDialog
>::Create( pParent
, xStor
);
1769 pDlg
->SetHelpId( OUStringToOString( rCommand
, RTL_TEXTENCODING_UTF8
) );
1770 return new AbstractInsertObjectDialog_Impl( pDlg
);
1775 VclAbstractDialog
* AbstractDialogFactory_Impl::CreateEditObjectDialog( vcl::Window
* pParent
, const OUString
& rCommand
,
1776 const Reference
< com::sun::star::embed::XEmbeddedObject
>& xObj
)
1778 if ( rCommand
== ".uno:InsertObjectFloatingFrame" )
1780 VclPtrInstance
<SfxInsertFloatingFrameDialog
> pDlg( pParent
, xObj
);
1781 pDlg
->SetHelpId( OUStringToOString( rCommand
, RTL_TEXTENCODING_UTF8
) );
1782 return new CuiVclAbstractDialog_Impl( pDlg
);
1789 SfxAbstractPasteDialog
* AbstractDialogFactory_Impl::CreatePasteDialog( vcl::Window
* pParent
)
1791 return new AbstractPasteDialog_Impl( VclPtr
<SvPasteObjectDialog
>::Create( pParent
) );
1794 SfxAbstractLinksDialog
* AbstractDialogFactory_Impl::CreateLinksDialog( vcl::Window
* pParent
, sfx2::LinkManager
* pMgr
, bool bHTML
, sfx2::SvBaseLink
* p
)
1796 VclPtrInstance
<SvBaseLinksDlg
> pLinkDlg( pParent
, pMgr
, bHTML
);
1798 pLinkDlg
->SetActLink(p
);
1799 return new AbstractLinksDialog_Impl( pLinkDlg
);
1802 SfxAbstractTabDialog
* AbstractDialogFactory_Impl::CreateSvxFormatCellsDialog( vcl::Window
* pParent
, const SfxItemSet
* pAttr
, SdrModel
* pModel
, const SdrObject
* /*pObj*/ )
1804 return new CuiAbstractTabDialog_Impl( VclPtr
<SvxFormatCellsDialog
>::Create( pParent
, pAttr
, pModel
) );
1807 SvxAbstractSplittTableDialog
* AbstractDialogFactory_Impl::CreateSvxSplittTableDialog( vcl::Window
* pParent
, bool bIsTableVertical
, long nMaxVertical
, long nMaxHorizontal
)
1809 return new SvxSplitTableDlg( pParent
, bIsTableVertical
, nMaxVertical
, nMaxHorizontal
);
1812 SvxAbstractNewTableDialog
* AbstractDialogFactory_Impl::CreateSvxNewTableDialog( vcl::Window
* pParent
)
1814 return new SvxNewTableDialog( pParent
);
1817 VclAbstractDialog
* AbstractDialogFactory_Impl::CreateOptionsDialog(
1818 vcl::Window
* pParent
, const OUString
& rExtensionId
, const OUString
& /*rApplicationContext*/ )
1820 return new CuiVclAbstractDialog_Impl( VclPtr
<OfaTreeOptionsDialog
>::Create( pParent
, rExtensionId
) );
1823 SvxAbstractInsRowColDlg
* AbstractDialogFactory_Impl::CreateSvxInsRowColDlg( vcl::Window
* pParent
, bool bCol
, const OString
& sHelpId
)
1825 return new SvxInsRowColDlg( pParent
, bCol
, sHelpId
);
1828 AbstractPasswordToOpenModifyDialog
* AbstractDialogFactory_Impl::CreatePasswordToOpenModifyDialog(
1829 vcl::Window
* pParent
,
1830 sal_uInt16 nMinPasswdLen
, sal_uInt16 nMaxPasswdLen
, bool bIsPasswordToModify
)
1832 VclPtrInstance
<PasswordToOpenModifyDialog
> pDlg( pParent
, nMinPasswdLen
, nMaxPasswdLen
, bIsPasswordToModify
);
1833 return new AbstractPasswordToOpenModifyDialog_Impl( pDlg
);
1837 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */