xref: /aoo41x/main/cui/source/factory/dlgfact.cxx (revision 2ee96f1c)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 // MARKER(update_precomp.py): autogen include statement, do not remove
25 #include "precompiled_cui.hxx"
26 
27 #include "align.hxx" //add for SvxAlignmentTabPage
28 #include "dlgfact.hxx"
29 
30 #include <tools/rc.hxx>
31 #include <sfx2/basedlgs.hxx>
32 #include <sfx2/app.hxx>
33 #include <sfx2/request.hxx>
34 #include <cuires.hrc>
35 #include <svx/dialogs.hrc>
36 #include "numfmt.hxx"
37 #include "optimprove.hxx"
38 #include "splitcelldlg.hxx"
39 #include "gallery.hrc"
40 #include "dstribut.hxx"
41 #include "cuigaldlg.hxx"
42 #include "cuiimapwnd.hxx"
43 #include "hlmarkwn.hxx"
44 #include "cuicharmap.hxx"
45 #include "srchxtra.hxx"
46 #include "textanim.hxx"
47 #include "autocdlg.hxx"
48 #include "treeopt.hxx"
49 #include "internationaloptions.hxx"
50 #include "labdlg.hxx"
51 #include "hangulhanjadlg.hxx" //add for HangulHanjaConversionDialog
52 #include "showcols.hxx" //add for FmShowColsDialog
53 #include "zoom.hxx" //add for SvxZoomDialog
54 #include "cuigaldlg.hxx"		//add for Gallery 6 Dialogs and 1 TabPage
55 #include "cuiimapwnd.hxx"		//add for URLDlg
56 #include "hlmarkwn.hxx"		//add for SvxHlinkDlgMarkWnd
57 #include "srchxtra.hxx"		//add for SvxSearchFormatDialog
58 #include "transfrm.hxx" //add for SvxTransformTabDialog
59 #include "bbdlg.hxx" //add for SvxBorderBackgroundDlg
60 #include "cuisrchdlg.hxx" //add for SvxJSearchOptionsDialog
61 #include "cuitbxform.hxx" //add for FmInputRecordNoDialog
62 #include "optdict.hxx" //add for SvxNewDictionaryDialog
63 #include "dlgname.hxx" //add for SvxNameDialog & SvxMessDialog
64 #include "multipat.hxx" //add for SvxMultiPathDialog
65 #include "multifil.hxx" //add for SvxMultiFileDialog
66 #include "cuihyperdlg.hxx" //add for SvxHpLinkDlg
67 #include "cuifmsearch.hxx" //add  for FmSearchDialog
68 #include "cuigrfflt.hxx"	//add for GraphicFilterDialog
69 #include "cuitabarea.hxx" //add for SvxAreaTabDialog
70 #include "cuitabline.hxx" //add for SvxLineTabDialog
71 #include "measure.hxx" //add for SvxMeasureDialog
72 #include "connect.hxx" //add for SvxConnectionDialog
73 #include "dbregister.hxx" // add for DatabaseRegistrationDialog
74 #include "cuioptgenrl.hxx"	//add for SvxGeneralTabPage
75 #include "optasian.hxx"
76 #include "insdlg.hxx"
77 #include "pastedlg.hxx"
78 #include "linkdlg.hxx"
79 #include "SpellDialog.hxx"
80 #include "cfg.hxx"    //add for SvxConfigDialog
81 #include "numpages.hxx" // add for
82 #include "paragrph.hxx" //add for
83 #include "tabstpge.hxx" // add  for
84 #include "textattr.hxx" // add for SvxTextAttrPage
85 #include "backgrnd.hxx" //add for SvxBackgroundTabPage
86 #include "border.hxx" //add for SvxBorderTabPage
87 #include "chardlg.hxx" //add for SvxCharNamePage,SvxCharEffectsPage,SvxCharPositionPage,SvxCharTwoLinesPage
88 #include "page.hxx" //add for SvxPageDescPage
89 #include "postdlg.hxx" //add for SvxPostItDialog
90 #include "grfpage.hxx" //add for SvxGrfCropPage
91 #include "scriptdlg.hxx" // for ScriptOrgDialog
92 #include "selector.hxx" // for SvxScriptSelectorDialog
93 #include "macropg.hxx" // for SvxMacroAssignDlg
94 #include "sdrcelldlg.hxx"
95 #include "newtabledlg.hxx"
96 #include "macroass.hxx"
97 #include "acccfg.hxx"
98 #include "insrc.hxx"
99 #include "passwdomdlg.hxx"
100 #include "hyphen.hxx"
101 #include "thesdlg.hxx"
102 #include "about.hxx"
103 #include "dialmgr.hxx"
104 
105 using namespace ::com::sun::star;
106 using namespace ::com::sun::star::frame;
107 using namespace ::com::sun::star::container;
108 
109 using ::com::sun::star::uno::Reference;
110 
111 using namespace svx;
112 // AbstractTabDialog implementations just forwards everything to the dialog
113 IMPL_ABSTDLG_BASE(AbstractSfxDialog_Impl)
114 IMPL_ABSTDLG_BASE(VclAbstractDialog_Impl)
115 IMPL_ABSTDLG_BASE(VclAbstractRefreshableDialog_Impl);
116 IMPL_ABSTDLG_BASE(AbstractTabDialog_Impl);
117 IMPL_ABSTDLG_BASE(AbstractSvxDistributeDialog_Impl);
118 IMPL_ABSTDLG_BASE(AbstractHangulHanjaConversionDialog_Impl);
119 IMPL_ABSTDLG_BASE(AbstractFmShowColsDialog_Impl);
120 IMPL_ABSTDLG_BASE(AbstractHyphenWordDialog_Impl)
121 IMPL_ABSTDLG_BASE(AbstractThesaurusDialog_Impl)
122 
123 AbstractSvxZoomDialog_Impl::~AbstractSvxZoomDialog_Impl()                    					\
124 {
125 	delete pDlg;
126 }
127 short AbstractSvxZoomDialog_Impl::Execute()
128 {
129 	return pDlg->Execute();
130 }
131 
132 //IMPL_ABSTDLG_BASE(AbstractSvxZoomDialog_Impl);
133 IMPL_ABSTDLG_BASE(AbstractSearchProgress_Impl);
134 IMPL_ABSTDLG_BASE(AbstractTakeProgress_Impl);
135 IMPL_ABSTDLG_BASE(AbstractTitleDialog_Impl);
136 IMPL_ABSTDLG_BASE(AbstractScriptSelectorDialog_Impl);
137 IMPL_ABSTDLG_BASE(AbstractGalleryIdDialog_Impl);
138 IMPL_ABSTDLG_BASE(AbstractURLDlg_Impl);
139 IMPL_ABSTDLG_BASE(AbstractSvxHlinkDlgMarkWnd_Impl);
140 IMPL_ABSTDLG_BASE(AbstractSvxSearchSimilarityDialog_Impl);
141 IMPL_ABSTDLG_BASE(AbstractSvxTransformTabDialog_Impl);
142 IMPL_ABSTDLG_BASE(AbstractSvxCaptionDialog_Impl);
143 IMPL_ABSTDLG_BASE(AbstractSvxJSearchOptionsDialog_Impl);
144 IMPL_ABSTDLG_BASE(AbstractFmInputRecordNoDialog_Impl);
145 IMPL_ABSTDLG_BASE(AbstractSvxNewDictionaryDialog_Impl);
146 IMPL_ABSTDLG_BASE(AbstractSvxNameDialog_Impl);
147 
148 // #i68101#
149 IMPL_ABSTDLG_BASE(AbstractSvxObjectNameDialog_Impl);
150 IMPL_ABSTDLG_BASE(AbstractSvxObjectTitleDescDialog_Impl);
151 
152 IMPL_ABSTDLG_BASE(AbstractSvxMessDialog_Impl);
153 IMPL_ABSTDLG_BASE(AbstractSvxMultiPathDialog_Impl);
154 IMPL_ABSTDLG_BASE(AbstractSvxMultiFileDialog_Impl);
155 IMPL_ABSTDLG_BASE(AbstractSvxHpLinkDlg_Impl);
156 IMPL_ABSTDLG_BASE(AbstractFmSearchDialog_Impl);
157 IMPL_ABSTDLG_BASE(AbstractGraphicFilterDialog_Impl);
158 IMPL_ABSTDLG_BASE(AbstractSvxAreaTabDialog_Impl);
159 IMPL_ABSTDLG_BASE(AbstractPasteDialog_Impl);
160 IMPL_ABSTDLG_BASE(AbstractInsertObjectDialog_Impl);
161 IMPL_ABSTDLG_BASE(AbstractLinksDialog_Impl);
162 IMPL_ABSTDLG_BASE(AbstractSpellDialog_Impl);
163 IMPL_ABSTDLG_BASE(AbstractSvxPostItDialog_Impl);
164 IMPL_ABSTDLG_BASE(AbstractPasswordToOpenModifyDialog_Impl);
165 
166 //////////////////////////////////////////////////////////////////////////
167 // VclAbstractDialog2_Impl
168 //////////////////////////////////////////////////////////////////////////
169 
170 // virtual
171 VclAbstractDialog2_Impl::~VclAbstractDialog2_Impl()
172 {
173     delete m_pDlg;
174 }
175 
176 // virtual
177 void  VclAbstractDialog2_Impl::StartExecuteModal( const Link& rEndDialogHdl )
178 {
179     m_aEndDlgHdl = rEndDialogHdl;
180     m_pDlg->StartExecuteModal(
181         LINK( this, VclAbstractDialog2_Impl, EndDialogHdl ) );
182 }
183 
184 // virtual
185 long VclAbstractDialog2_Impl::GetResult()
186 {
187     return m_pDlg->GetResult();
188 }
189 
190 IMPL_LINK( VclAbstractDialog2_Impl, EndDialogHdl, Dialog*, pDlg )
191 {
192     if ( pDlg != m_pDlg )
193     {
194         DBG_ERRORFILE( "VclAbstractDialog2_Impl::EndDialogHdl(): wrong dialog" );
195     }
196 
197     m_aEndDlgHdl.Call( this );
198     m_aEndDlgHdl = Link();
199 
200     return 0L;
201 }
202 
203 //////////////////////////////////////////////////////////////////////////
204 
205 void AbstractTabDialog_Impl::SetCurPageId( sal_uInt16 nId )
206 {
207 	pDlg->SetCurPageId( nId );
208 }
209 
210 const SfxItemSet* AbstractTabDialog_Impl::GetOutputItemSet() const
211 {
212 	return pDlg->GetOutputItemSet();
213 }
214 
215 const sal_uInt16* AbstractTabDialog_Impl::GetInputRanges(const SfxItemPool& pItem )
216 {
217 	return pDlg->GetInputRanges( pItem );
218 }
219 
220 void AbstractTabDialog_Impl::SetInputSet( const SfxItemSet* pInSet )
221 {
222 	 pDlg->SetInputSet( pInSet );
223 }
224 //From class Window.
225 void AbstractTabDialog_Impl::SetText( const XubString& rStr )
226 {
227 	pDlg->SetText( rStr );
228 }
229 String AbstractTabDialog_Impl::GetText() const
230 {
231 	return pDlg->GetText();
232 }
233 
234 
235 const SfxItemSet* AbstractSfxDialog_Impl::GetOutputItemSet() const
236 {
237 	return pDlg->GetOutputItemSet();
238 }
239 
240 void AbstractSfxDialog_Impl::SetText( const XubString& rStr )
241 {
242 	pDlg->SetText( rStr );
243 }
244 
245 String AbstractSfxDialog_Impl::GetText() const
246 {
247 	return pDlg->GetText();
248 }
249 
250 SvxDistributeHorizontal AbstractSvxDistributeDialog_Impl::GetDistributeHor()const
251 {
252 	return pDlg->GetDistributeHor();
253 }
254 SvxDistributeVertical AbstractSvxDistributeDialog_Impl::GetDistributeVer()const
255 {
256 	return pDlg->GetDistributeVer();
257 }
258 
259 void AbstractHangulHanjaConversionDialog_Impl::EndDialog(long nResult)
260 {
261 	pDlg->EndDialog(nResult);
262 }
263 
264 void AbstractHangulHanjaConversionDialog_Impl::EnableRubySupport( sal_Bool _bVal )
265 {
266     pDlg->EnableRubySupport(_bVal);
267 }
268 
269 void AbstractHangulHanjaConversionDialog_Impl::SetByCharacter( sal_Bool _bByCharacter )
270 {
271 	pDlg->SetByCharacter(_bByCharacter);
272 }
273 
274 void AbstractHangulHanjaConversionDialog_Impl::SetConversionDirectionState( sal_Bool _bTryBothDirections, editeng::HangulHanjaConversion::ConversionDirection _ePrimaryConversionDirection )
275 {
276 	pDlg->SetConversionDirectionState(_bTryBothDirections, _ePrimaryConversionDirection);
277 }
278 
279 void AbstractHangulHanjaConversionDialog_Impl::SetConversionFormat( editeng::HangulHanjaConversion::ConversionFormat _eType )
280 {
281 	 pDlg->SetConversionFormat(_eType);
282 }
283 
284 void AbstractHangulHanjaConversionDialog_Impl::SetOptionsChangedHdl( const Link& _rHdl )
285 {
286 	 pDlg->SetOptionsChangedHdl(_rHdl );
287 }
288 
289 void AbstractHangulHanjaConversionDialog_Impl::SetIgnoreHdl( const Link& _rHdl )
290 {
291 	 pDlg->SetIgnoreHdl(_rHdl );
292 }
293 
294 void AbstractHangulHanjaConversionDialog_Impl::SetIgnoreAllHdl( const Link& _rHdl )
295 {
296 	 pDlg->SetIgnoreAllHdl(_rHdl );
297 }
298 
299 void AbstractHangulHanjaConversionDialog_Impl::SetChangeHdl( const Link& _rHdl )
300 {
301 	pDlg->SetChangeHdl(_rHdl );
302 }
303 
304 void AbstractHangulHanjaConversionDialog_Impl::SetChangeAllHdl( const Link& _rHdl )
305 {
306 	pDlg->SetChangeAllHdl(_rHdl );
307 }
308 
309 void AbstractHangulHanjaConversionDialog_Impl::SetClickByCharacterHdl( const Link& _rHdl )
310 {
311 	 pDlg->SetClickByCharacterHdl(_rHdl );
312 }
313 
314 void AbstractHangulHanjaConversionDialog_Impl::SetConversionFormatChangedHdl( const Link& _rHdl )
315 {
316 	pDlg->SetConversionFormatChangedHdl(_rHdl );
317 }
318 void AbstractHangulHanjaConversionDialog_Impl::SetFindHdl( const Link& _rHdl )
319 {
320 	 pDlg->SetFindHdl(_rHdl );
321 }
322 
323 sal_Bool AbstractHangulHanjaConversionDialog_Impl::GetUseBothDirections( ) const
324 {
325 	return pDlg->GetUseBothDirections();
326 }
327 
328 editeng::HangulHanjaConversion::ConversionDirection AbstractHangulHanjaConversionDialog_Impl::GetDirection( editeng::HangulHanjaConversion::ConversionDirection _eDefaultDirection ) const
329 {
330     return pDlg->GetDirection( _eDefaultDirection );
331 }
332 
333 void AbstractHangulHanjaConversionDialog_Impl::SetCurrentString(
334 					const String& _rNewString,
335 					const ::com::sun::star::uno::Sequence< ::rtl::OUString >& _rSuggestions,
336 					bool _bOriginatesFromDocument
337 				)
338 {
339 	 pDlg->SetCurrentString(_rNewString,_rSuggestions,_bOriginatesFromDocument);
340 }
341 String	 AbstractHangulHanjaConversionDialog_Impl::GetCurrentString( ) const
342 {
343 	return pDlg->GetCurrentString();
344 }
345 editeng::HangulHanjaConversion::ConversionFormat	 AbstractHangulHanjaConversionDialog_Impl::GetConversionFormat( ) const
346 {
347 	return pDlg->GetConversionFormat();
348 }
349 
350 void AbstractHangulHanjaConversionDialog_Impl::FocusSuggestion( )
351 {
352 	pDlg->FocusSuggestion();
353 }
354 
355 String	AbstractHangulHanjaConversionDialog_Impl::GetCurrentSuggestion( ) const
356 {
357 	return pDlg->GetCurrentSuggestion();
358 }
359 
360 String AbstractThesaurusDialog_Impl::GetWord()
361 {
362 	return pDlg->GetWord();
363 };
364 
365 sal_uInt16 AbstractThesaurusDialog_Impl::GetLanguage() const
366 {
367 	return pDlg->GetLanguage();
368 };
369 
370 Window*	AbstractThesaurusDialog_Impl::GetWindow()
371 {
372 	return pDlg;
373 }
374 
375 void AbstractHyphenWordDialog_Impl::SelLeft()
376 {
377 	pDlg->SelLeft();
378 }
379 
380 void AbstractHyphenWordDialog_Impl::SelRight()
381 {
382 	pDlg->SelRight();
383 }
384 
385 Window*	AbstractHyphenWordDialog_Impl::GetWindow()
386 {
387 	return pDlg;
388 }
389 
390 Reference < com::sun::star::embed::XEmbeddedObject > AbstractInsertObjectDialog_Impl::GetObject()
391 {
392    return pDlg->GetObject();
393 }
394 
395 sal_Bool AbstractInsertObjectDialog_Impl::IsCreateNew()
396 {
397     return pDlg->IsCreateNew();
398 }
399 
400 ::Reference< ::com::sun::star::io::XInputStream > AbstractInsertObjectDialog_Impl::GetIconIfIconified( ::rtl::OUString* pGraphicMediaType )
401 {
402    return pDlg->GetIconIfIconified( pGraphicMediaType );
403 }
404 
405 void AbstractPasteDialog_Impl::Insert( SotFormatStringId nFormat, const String & rFormatName )
406 {
407     pDlg->Insert( nFormat, rFormatName );
408 }
409 
410 void AbstractPasteDialog_Impl::SetObjName( const SvGlobalName & rClass, const String & rObjName )
411 {
412     pDlg->SetObjName( rClass, rObjName );
413 }
414 
415 sal_uLong AbstractPasteDialog_Impl::GetFormat( const TransferableDataHelper& aHelper,
416                         const DataFlavorExVector* pFormats,
417                         const TransferableObjectDescriptor* pDesc )
418 {
419     return pDlg->GetFormat( aHelper, pFormats, pDesc );
420 }
421 
422 void  AbstractFmShowColsDialog_Impl::SetColumns(const ::Reference< ::com::sun::star::container::XIndexContainer>& xCols)
423 {
424 	 pDlg->SetColumns(xCols);
425 }
426 
427 void AbstractSvxZoomDialog_Impl::SetLimits( sal_uInt16 nMin, sal_uInt16 nMax )
428 {
429 	pDlg->SetLimits( nMin, nMax );
430 }
431 
432 void AbstractSvxZoomDialog_Impl::HideButton( sal_uInt16 nBtnId )
433 {
434 	pDlg->HideButton( nBtnId );
435 }
436 
437 const SfxItemSet* AbstractSvxZoomDialog_Impl::GetOutputItemSet() const
438 {
439 	return pDlg->GetOutputItemSet();
440 }
441 
442 void AbstractSpellDialog_Impl::SetLanguage( sal_uInt16 nLang )
443 {
444     pDlg->SetLanguage(nLang);
445 }
446 
447 sal_Bool AbstractSpellDialog_Impl::Close()
448 {
449     return pDlg->Close();
450 }
451 
452 void  AbstractSpellDialog_Impl::Invalidate()
453 {
454     pDlg->InvalidateDialog();
455 }
456 
457 Window*     AbstractSpellDialog_Impl::GetWindow()
458 {
459     return pDlg;
460 }
461 
462 SfxBindings& AbstractSpellDialog_Impl::GetBindings()
463 {
464     return pDlg->GetBindings();
465 }
466 
467 void AbstractSearchProgress_Impl::Update()
468 {
469 	 pDlg->Update();
470 }
471 
472 void AbstractSearchProgress_Impl::Sync()
473 {
474 	 pDlg-> Sync();
475 }
476 
477 void AbstractSearchProgress_Impl::SetFileType( const String& rType )
478 {
479 	 pDlg->SetFileType( rType );
480 }
481 
482 void AbstractSearchProgress_Impl::SetDirectory( const INetURLObject& rURL )
483 {
484 	 pDlg->SetDirectory( rURL );
485 }
486 PLinkStub	AbstractSearchProgress_Impl::GetLinkStubCleanUpHdl()
487 {
488 	return SearchProgress::LinkStubCleanUpHdl;
489 }
490 
491 void AbstractTakeProgress_Impl::Update()
492 {
493 	 pDlg->Update();
494 }
495 
496 void AbstractTakeProgress_Impl::Sync()
497 {
498 	 pDlg-> Sync();
499 }
500 
501 void AbstractTakeProgress_Impl::SetFile( const INetURLObject& rURL )
502 {
503 	 pDlg->SetFile( rURL );
504 }
505 
506 PLinkStub	AbstractTakeProgress_Impl::GetLinkStubCleanUpHdl()
507 {
508 	return TakeProgress::LinkStubCleanUpHdl;
509 }
510 
511 String AbstractTitleDialog_Impl::GetTitle() const
512 {
513 	return pDlg->GetTitle();
514 }
515 
516 sal_uLong AbstractGalleryIdDialog_Impl::GetId() const
517 {
518 	return pDlg->GetId();
519 }
520 
521 void VclAbstractRefreshableDialog_Impl::Update()
522 {
523 	pDlg->Update();
524 }
525 
526 void VclAbstractRefreshableDialog_Impl::Sync()
527 {
528 	 pDlg-> Sync();
529 }
530 
531 String AbstractURLDlg_Impl::GetURL() const
532 {
533 	return pDlg->GetURL();
534 }
535 
536 String AbstractURLDlg_Impl::GetAltText() const
537 {
538 	return pDlg->GetAltText();
539 }
540 
541 String AbstractURLDlg_Impl::GetDesc() const
542 {
543 	return pDlg->GetDesc();
544 }
545 
546 String AbstractURLDlg_Impl::GetTarget() const
547 {
548 	return pDlg->GetTarget();
549 }
550 
551 String AbstractURLDlg_Impl::GetName() const
552 {
553 	return pDlg->GetName();
554 }
555 
556 void AbstractSvxHlinkDlgMarkWnd_Impl::Hide( sal_uInt16 nFlags )
557 {
558 	((Window*)pDlg)->Hide( nFlags );
559 }
560 
561 void AbstractSvxHlinkDlgMarkWnd_Impl::SetSizePixel( const Size& rNewSize )
562 {
563 	pDlg->SetSizePixel( rNewSize );
564 }
565 
566 Size AbstractSvxHlinkDlgMarkWnd_Impl::GetSizePixel() const
567 {
568 	return pDlg->GetSizePixel();
569 }
570 
571 sal_Bool AbstractSvxHlinkDlgMarkWnd_Impl::IsVisible( ) const
572 {
573 	return (( Window* )pDlg)->IsVisible();
574 }
575 
576 void AbstractSvxHlinkDlgMarkWnd_Impl::Invalidate( sal_uInt16 nFlags )
577 {
578 	(( Window* )pDlg)->Invalidate(nFlags);
579 }
580 
581 sal_Bool AbstractSvxHlinkDlgMarkWnd_Impl::MoveTo( Point aNewPos )const
582 {
583 	return pDlg->MoveTo(aNewPos);
584 }
585 
586 sal_Bool AbstractSvxHlinkDlgMarkWnd_Impl::ConnectToDialog( sal_Bool bDoit  )const
587 {
588 	return pDlg->ConnectToDialog(bDoit);
589 }
590 
591 void AbstractSvxHlinkDlgMarkWnd_Impl::RefreshTree ( String aStrURL )
592 {
593 	pDlg->RefreshTree(aStrURL);
594 }
595 
596 void AbstractSvxHlinkDlgMarkWnd_Impl::SelectEntry ( String aStrMark )
597 {
598 	pDlg->SelectEntry(aStrMark);
599 }
600 
601 sal_uInt16 AbstractSvxHlinkDlgMarkWnd_Impl::SetError( sal_uInt16 nError)
602 {
603 	return pDlg->SetError(nError);
604 }
605 
606 sal_uInt16 AbstractSvxSearchSimilarityDialog_Impl::GetOther()
607 {
608 	return pDlg->GetOther();
609 }
610 
611 sal_uInt16 AbstractSvxSearchSimilarityDialog_Impl::GetShorter()
612 {
613 	return pDlg->GetShorter();
614 }
615 
616 sal_uInt16 AbstractSvxSearchSimilarityDialog_Impl::GetLonger()
617 {
618 	return pDlg-> GetLonger();
619 }
620 
621 sal_Bool AbstractSvxSearchSimilarityDialog_Impl::IsRelaxed()
622 {
623 	return pDlg-> IsRelaxed();
624 }
625 
626 // AbstractSvxTransformTabDialog implementations just forwards everything to the dialog
627 void AbstractSvxTransformTabDialog_Impl::SetCurPageId( sal_uInt16 nId )
628 {
629     pDlg->SetCurPageId( nId );
630 }
631 const SfxItemSet* AbstractSvxTransformTabDialog_Impl::GetOutputItemSet() const
632 {
633     return pDlg->GetOutputItemSet();
634 }
635 //
636 const sal_uInt16* AbstractSvxTransformTabDialog_Impl::GetInputRanges(const SfxItemPool& pItem )
637 {
638     return pDlg->GetInputRanges( pItem );
639 }
640 //
641 void AbstractSvxTransformTabDialog_Impl::SetInputSet( const SfxItemSet* pInSet )
642 {
643      pDlg->SetInputSet( pInSet );
644 }
645 //From class Window.
646 void AbstractSvxTransformTabDialog_Impl::SetText( const XubString& rStr )
647 {
648     pDlg->SetText( rStr );
649 }
650 String AbstractSvxTransformTabDialog_Impl::GetText() const
651 {
652     return pDlg->GetText();
653 }
654 void AbstractSvxTransformTabDialog_Impl::SetValidateFramePosLink( const Link& rLink )
655 {
656     pDlg->SetValidateFramePosLink( rLink );
657 }
658 
659 // AbstractSvxCaptionDialog implementations just forwards everything to the dialog
660 void AbstractSvxCaptionDialog_Impl::SetCurPageId( sal_uInt16 nId )
661 {
662     pDlg->SetCurPageId( nId );
663 }
664 const SfxItemSet* AbstractSvxCaptionDialog_Impl::GetOutputItemSet() const
665 {
666     return pDlg->GetOutputItemSet();
667 }
668 //
669 const sal_uInt16* AbstractSvxCaptionDialog_Impl::GetInputRanges(const SfxItemPool& pItem )
670 {
671     return pDlg->GetInputRanges( pItem );
672 }
673 //
674 void AbstractSvxCaptionDialog_Impl::SetInputSet( const SfxItemSet* pInSet )
675 {
676      pDlg->SetInputSet( pInSet );
677 }
678 //From class Window.
679 void AbstractSvxCaptionDialog_Impl::SetText( const XubString& rStr )
680 {
681     pDlg->SetText( rStr );
682 }
683 String AbstractSvxCaptionDialog_Impl::GetText() const
684 {
685     return pDlg->GetText();
686 }
687 void AbstractSvxCaptionDialog_Impl::SetValidateFramePosLink( const Link& rLink )
688 {
689     pDlg->SetValidateFramePosLink( rLink );
690 }
691 
692 sal_Int32 AbstractSvxJSearchOptionsDialog_Impl::GetTransliterationFlags() const
693 {
694 	return pDlg->GetTransliterationFlags();
695 }
696 
697 void AbstractFmInputRecordNoDialog_Impl::SetValue(long nNew)
698 {
699     pDlg->SetValue(nNew);
700 }
701 
702 long AbstractFmInputRecordNoDialog_Impl::GetValue() const
703 {
704 	return pDlg->GetValue();
705 }
706 
707 ::Reference<
708         ::com::sun::star::linguistic2::XDictionary > AbstractSvxNewDictionaryDialog_Impl::GetNewDictionary()
709 {
710 	return pDlg->GetNewDictionary();
711 }
712 
713 void AbstractSvxNameDialog_Impl::GetName( String& rName )
714 {
715 	pDlg->GetName( rName );
716 }
717 
718 void AbstractSvxNameDialog_Impl::SetCheckNameHdl( const Link& rLink, bool bCheckImmediately )
719 {
720 	aCheckNameHdl = rLink;
721 	if( rLink.IsSet() )
722         pDlg->SetCheckNameHdl( LINK(this, AbstractSvxNameDialog_Impl, CheckNameHdl), bCheckImmediately );
723 	else
724 		pDlg->SetCheckNameHdl( Link(), bCheckImmediately );
725 }
726 void AbstractSvxNameDialog_Impl::SetEditHelpId(const rtl::OString& aHelpId)
727 {
728 	pDlg->SetEditHelpId( aHelpId );
729 }
730 void AbstractSvxNameDialog_Impl::SetHelpId( const rtl::OString& aHelpId )
731 {
732 	pDlg->SetHelpId( aHelpId );
733 }
734 void AbstractSvxNameDialog_Impl::SetText( const XubString& rStr )
735 {
736 	pDlg->SetText( rStr );
737 }
738 IMPL_LINK( AbstractSvxNameDialog_Impl, CheckNameHdl, Window*, EMPTYARG )
739 {
740 	if( aCheckNameHdl.IsSet() )
741 		return aCheckNameHdl.Call(this);
742 	return 0;
743 }
744 
745 void AbstractSvxObjectNameDialog_Impl::GetName(String& rName)
746 {
747 	pDlg->GetName(rName);
748 }
749 
750 void AbstractSvxObjectNameDialog_Impl::SetCheckNameHdl(const Link& rLink, bool bCheckImmediately)
751 {
752 	aCheckNameHdl = rLink;
753 
754 	if(rLink.IsSet())
755 	{
756         pDlg->SetCheckNameHdl(LINK(this, AbstractSvxObjectNameDialog_Impl, CheckNameHdl), bCheckImmediately);
757 	}
758 	else
759 	{
760 		pDlg->SetCheckNameHdl(Link(), bCheckImmediately);
761 	}
762 }
763 
764 IMPL_LINK(AbstractSvxObjectNameDialog_Impl, CheckNameHdl, Window*, EMPTYARG)
765 {
766 	if(aCheckNameHdl.IsSet())
767 	{
768 		return aCheckNameHdl.Call(this);
769 	}
770 
771 	return 0;
772 }
773 
774 void AbstractSvxObjectTitleDescDialog_Impl::GetTitle(String& rTitle)
775 {
776 	pDlg->GetTitle(rTitle);
777 }
778 
779 void AbstractSvxObjectTitleDescDialog_Impl::GetDescription(String& rDescription)
780 {
781 	pDlg->GetDescription(rDescription);
782 }
783 
784 void AbstractSvxMessDialog_Impl::SetButtonText( sal_uInt16 nBtnId, const String& rNewTxt )
785 {
786 	pDlg->SetButtonText( nBtnId, rNewTxt );
787 }
788 
789 String AbstractSvxMultiPathDialog_Impl::GetPath() const
790 {
791 	return pDlg->GetPath();
792 }
793 
794 void AbstractSvxMultiPathDialog_Impl::SetPath( const String& rPath )
795 {
796     pDlg->SetPath( rPath );
797 }
798 
799 void AbstractSvxMultiPathDialog_Impl::EnableRadioButtonMode()
800 {
801     pDlg->EnableRadioButtonMode();
802 }
803 
804 void AbstractSvxMultiPathDialog_Impl::SetTitle( const String& rNewTitle )
805 {
806     pDlg->SetText( rNewTitle );
807 }
808 
809 String AbstractSvxMultiFileDialog_Impl::GetPath() const
810 {
811 	return pDlg->GetPath();
812 }
813 
814 void AbstractSvxMultiFileDialog_Impl::SetPath( const String& rPath )
815 {
816 	pDlg->SetPath( rPath );
817 }
818 
819 String AbstractSvxMultiFileDialog_Impl::GetFiles() const
820 {
821 	return pDlg->GetFiles();
822 }
823 
824 void AbstractSvxMultiFileDialog_Impl::SetFiles( const String& rPath )
825 {
826 	pDlg->SetFiles( rPath );
827 }
828 
829 void AbstractSvxMultiFileDialog_Impl::SetClassPathMode()
830 {
831     pDlg->SetClassPathMode();
832 }
833 
834 void AbstractSvxMultiFileDialog_Impl::EnableRadioButtonMode()
835 {
836     pDlg->EnableRadioButtonMode();
837 }
838 
839 void AbstractSvxMultiFileDialog_Impl::SetTitle( const String& rNewTitle )
840 {
841     pDlg->SetText( rNewTitle );
842 }
843 
844 void AbstractSvxMultiFileDialog_Impl::SetHelpId( const rtl::OString& aHelpId )
845 {
846 	pDlg->SetHelpId( aHelpId );
847 }
848 
849 Window * AbstractSvxHpLinkDlg_Impl::GetWindow()
850 {
851     return (Window *)pDlg;
852 }
853 
854 sal_Bool AbstractSvxHpLinkDlg_Impl::QueryClose()
855 {
856     return pDlg->QueryClose();
857 }
858 
859 
860 void AbstractFmSearchDialog_Impl::SetFoundHandler(const Link& lnk)
861 {
862 	pDlg->SetFoundHandler(lnk);
863 }
864 void AbstractFmSearchDialog_Impl::SetCanceledNotFoundHdl(const Link& lnk)
865 {
866 	pDlg->SetCanceledNotFoundHdl(lnk);
867 }
868 void AbstractFmSearchDialog_Impl::SetActiveField(const String& strField)
869 {
870 	pDlg->SetActiveField(strField);
871 }
872 
873 Graphic AbstractGraphicFilterDialog_Impl::GetFilteredGraphic( const Graphic& rGraphic, double fScaleX, double fScaleY )
874 {
875 	return pDlg->GetFilteredGraphic( rGraphic, fScaleX, fScaleY );
876 }
877 
878 // AbstractSvxAreaTabDialog implementations just forwards everything to the dialog
879 void AbstractSvxAreaTabDialog_Impl::SetCurPageId( sal_uInt16 nId )
880 {
881 	pDlg->SetCurPageId( nId );
882 }
883 
884 const SfxItemSet* AbstractSvxAreaTabDialog_Impl::GetOutputItemSet() const
885 {
886 	return pDlg->GetOutputItemSet();
887 }
888 
889 const sal_uInt16* AbstractSvxAreaTabDialog_Impl::GetInputRanges(const SfxItemPool& pItem )
890 {
891 	return pDlg->GetInputRanges( pItem );
892 }
893 
894 void AbstractSvxAreaTabDialog_Impl::SetInputSet( const SfxItemSet* pInSet )
895 {
896 	 pDlg->SetInputSet( pInSet );
897 }
898 //From class Window.
899 void AbstractSvxAreaTabDialog_Impl::SetText( const XubString& rStr )
900 {
901 	pDlg->SetText( rStr );
902 }
903 String AbstractSvxAreaTabDialog_Impl::GetText() const
904 {
905 	return pDlg->GetText();
906 }
907 
908 void AbstractSvxAreaTabDialog_Impl::DontDeleteColorTable()
909 {
910 	return pDlg->DontDeleteColorTable();
911 }
912 
913 void AbstractSvxPostItDialog_Impl::SetText( const XubString& rStr )
914 {
915 	pDlg->SetText( rStr );
916 }
917 const SfxItemSet* AbstractSvxPostItDialog_Impl::GetOutputItemSet() const
918 {
919 	return pDlg->GetOutputItemSet();
920 }
921 void AbstractSvxPostItDialog_Impl::EnableTravel(sal_Bool bNext, sal_Bool bPrev)
922 {
923 	pDlg->EnableTravel( bNext, bPrev );
924 }
925 String AbstractSvxPostItDialog_Impl::GetNote()
926 {
927 	return pDlg->GetNote();
928 }
929 void AbstractSvxPostItDialog_Impl::SetNote(const String& rTxt)
930 {
931 	pDlg->SetNote( rTxt );
932 }
933 void AbstractSvxPostItDialog_Impl::ShowLastAuthor(const String& rAuthor, const String& rDate)
934 {
935 	pDlg->ShowLastAuthor( rAuthor, rDate );
936 }
937 void AbstractSvxPostItDialog_Impl::DontChangeAuthor()
938 {
939 	pDlg->DontChangeAuthor();
940 }
941 void AbstractSvxPostItDialog_Impl::HideAuthor()
942 {
943 	pDlg->HideAuthor();
944 }
945 void AbstractSvxPostItDialog_Impl::SetReadonlyPostIt(sal_Bool bDisable)
946 {
947 	pDlg->SetReadonlyPostIt( bDisable );
948 }
949 sal_Bool AbstractSvxPostItDialog_Impl::IsOkEnabled() const
950 {
951 	return pDlg->IsOkEnabled();
952 }
953 void AbstractSvxPostItDialog_Impl::SetNextHdl( const Link& rLink )
954 {
955 	aNextHdl = rLink;
956 	if( rLink.IsSet() )
957         pDlg->SetNextHdl( LINK(this, AbstractSvxPostItDialog_Impl, NextHdl ) );
958 	else
959 		pDlg->SetNextHdl( Link() );
960 }
961 void AbstractSvxPostItDialog_Impl::SetPrevHdl( const Link& rLink )
962 {
963 	aPrevHdl = rLink;
964 	if( rLink.IsSet() )
965         pDlg->SetPrevHdl( LINK(this, AbstractSvxPostItDialog_Impl, PrevHdl ) );
966 	else
967 		pDlg->SetPrevHdl( Link() );
968 }
969 IMPL_LINK( AbstractSvxPostItDialog_Impl, NextHdl, Window*, EMPTYARG )
970 {
971 	if( aNextHdl.IsSet() )
972 		aNextHdl.Call(this);
973 	return 0;
974 }
975 IMPL_LINK( AbstractSvxPostItDialog_Impl, PrevHdl, Window*, EMPTYARG )
976 {
977 	if( aPrevHdl.IsSet() )
978 		aPrevHdl.Call(this);
979 	return 0;
980 }
981 Window * AbstractSvxPostItDialog_Impl::GetWindow()
982 {
983 	return (Window *)pDlg;
984 }
985 
986 String AbstractPasswordToOpenModifyDialog_Impl::GetPasswordToOpen() const
987 {
988     return pDlg->GetPasswordToOpen();
989 }
990 String AbstractPasswordToOpenModifyDialog_Impl::GetPasswordToModify() const
991 {
992     return pDlg->GetPasswordToModify();
993 }
994 bool AbstractPasswordToOpenModifyDialog_Impl::IsRecommendToOpenReadonly() const
995 {
996     return pDlg->IsRecommendToOpenReadonly();
997 }
998 
999 // Create dialogs with simplest interface
1000 VclAbstractDialog* AbstractDialogFactory_Impl::CreateVclDialog( Window* pParent, sal_uInt32 nResId )
1001 {
1002 	Dialog* pDlg=NULL;
1003     switch ( nResId )
1004 	{
1005         case RID_DEFAULTABOUT:
1006         {
1007             pDlg = new AboutDialog( pParent, CUI_RES( (sal_uInt16) nResId ) );
1008             break;
1009         }
1010 		case SID_OPTIONS_TREEDIALOG :
1011         case SID_OPTIONS_DATABASES :
1012 		case SID_LANGUAGE_OPTIONS :
1013         {
1014 			bool bActivateLastSelection = false;
1015 			if (nResId == SID_OPTIONS_TREEDIALOG)
1016 				bActivateLastSelection = true;
1017             Reference< frame::XFrame > xFrame;
1018             OfaTreeOptionsDialog* pOptDlg = new OfaTreeOptionsDialog( pParent, xFrame, bActivateLastSelection );
1019             if (nResId == SID_OPTIONS_DATABASES)
1020             {
1021                 pOptDlg->ActivatePage(SID_SB_DBREGISTEROPTIONS);
1022             }
1023             else if (nResId == SID_LANGUAGE_OPTIONS)
1024             {
1025 				//open the tab page "tools/options/languages"
1026                 pOptDlg->ActivatePage(OFA_TP_LANGUAGES_FOR_SET_DOCUMENT_LANGUAGE);
1027             }
1028             pDlg = pOptDlg;
1029         }
1030         break;
1031 		default:
1032 			break;
1033 	}
1034 
1035 	if ( pDlg )
1036 		return new VclAbstractDialog_Impl( pDlg );
1037 	return 0;
1038 }
1039 
1040 // dialogs that use SfxBindings
1041 VclAbstractDialog* AbstractDialogFactory_Impl::CreateSfxDialog( Window* /*pParent*/, const SfxBindings&, sal_uInt32 )
1042 {
1043 	return 0;
1044 }
1045 
1046 VclAbstractDialog* AbstractDialogFactory_Impl::CreateFrameDialog(
1047     Window* pParent, const Reference< frame::XFrame >& rxFrame,
1048     sal_uInt32 nResId, const String& rParameter )
1049 {
1050     Dialog* pDlg = NULL;
1051     if ( SID_OPTIONS_TREEDIALOG == nResId || SID_OPTIONS_DATABASES == nResId )
1052     {
1053         // only activate last page if we dont want to activate a special page
1054 		bool bActivateLastSelection = ( nResId != SID_OPTIONS_DATABASES && rParameter.Len() == 0 );
1055         OfaTreeOptionsDialog* pOptDlg = new OfaTreeOptionsDialog( pParent, rxFrame, bActivateLastSelection );
1056         if ( nResId == SID_OPTIONS_DATABASES )
1057             pOptDlg->ActivatePage(SID_SB_DBREGISTEROPTIONS);
1058         else if ( rParameter.Len() > 0 )
1059             pOptDlg->ActivatePage( rParameter );
1060         pDlg = pOptDlg;
1061     }
1062 
1063     if ( pDlg )
1064         return new VclAbstractDialog_Impl( pDlg );
1065     else
1066         return NULL;
1067 }
1068 
1069 // TabDialog outside the drawing layer
1070 SfxAbstractTabDialog* AbstractDialogFactory_Impl::CreateTabDialog( sal_uInt32 nResId,
1071 												Window* pParent,
1072 												const SfxItemSet* pAttrSet,
1073                                                 SfxViewFrame* ,
1074                                                 bool /*bEditFmt*/,
1075                                                 const String * )
1076 {
1077 	SfxTabDialog* pDlg=NULL;
1078 	switch ( nResId )
1079 	{
1080 		case RID_OFA_AUTOCORR_DLG :
1081 			pDlg = new OfaAutoCorrDlg( pParent, pAttrSet );
1082 			break;
1083 		case RID_SVXDLG_CUSTOMIZE :
1084 			pDlg = new SvxConfigDialog( pParent, pAttrSet );
1085 			break;
1086 		default:
1087 			break;
1088 	}
1089 
1090 	if ( pDlg )
1091 		return new AbstractTabDialog_Impl( pDlg );
1092 	return 0;
1093 }
1094 
1095 SfxAbstractTabDialog* AbstractDialogFactory_Impl::CreateTabDialog( sal_uInt32 nResId,
1096 												Window* pParent,
1097 												const SfxItemSet* pAttrSet,
1098                                                 const Reference< frame::XFrame >& xViewFrame,
1099                                                 bool /*bEditFmt*/,
1100                                                 const String * )
1101 {
1102 	SfxTabDialog* pDlg=NULL;
1103 	switch ( nResId )
1104 	{
1105 		case RID_OFA_AUTOCORR_DLG :
1106 			pDlg = new OfaAutoCorrDlg( pParent, pAttrSet );
1107 			break;
1108 		case RID_SVXDLG_CUSTOMIZE :
1109             {
1110 			    SvxConfigDialog* pDlg1 = new SvxConfigDialog( pParent, pAttrSet );
1111                 pDlg1->SetFrame(xViewFrame);
1112                 pDlg = (SfxTabDialog*)pDlg1;
1113             }
1114 			break;
1115 		default:
1116 			break;
1117 	}
1118 
1119 	if ( pDlg )
1120 		return new AbstractTabDialog_Impl( pDlg );
1121 	return 0;
1122 }
1123 
1124 // TabDialog that use functionality of the drawing layer
1125 SfxAbstractTabDialog* AbstractDialogFactory_Impl::CreateTextTabDialog( Window* pParent,
1126 											const SfxItemSet* pAttrSet,
1127 											SdrView* pView,
1128                                             SdrModel* )
1129 {
1130 	SfxTabDialog* pDlg = new SvxTextTabDialog( pParent, pAttrSet, pView );
1131 	return new AbstractTabDialog_Impl( pDlg );
1132 }
1133 
1134 //TabDialog that use functionality of the drawing layer and add AnchorTypes  -- for SvxCaptionTabDialog CHINA001
1135 AbstractSvxCaptionDialog*       AbstractDialogFactory_Impl::CreateCaptionDialog( Window* pParent,
1136 											const SdrView* pView,
1137 											sal_uInt16 nAnchorTypes )
1138 {
1139     SvxCaptionTabDialog* pDlg = new SvxCaptionTabDialog( pParent, pView, nAnchorTypes );
1140     return new AbstractSvxCaptionDialog_Impl( pDlg );
1141 }
1142 
1143 AbstractSvxDistributeDialog* 	AbstractDialogFactory_Impl::CreateSvxDistributeDialog(Window* pParent,
1144 											const SfxItemSet& rAttr,
1145 											SvxDistributeHorizontal eHor ,
1146 											SvxDistributeVertical eVer)
1147 {
1148 	SvxDistributeDialog* pDlg = new SvxDistributeDialog( pParent, rAttr, eHor, eVer);
1149 	return new AbstractSvxDistributeDialog_Impl( pDlg );
1150 }
1151 
1152 AbstractHangulHanjaConversionDialog* AbstractDialogFactory_Impl::CreateHangulHanjaConversionDialog(Window* pParent,
1153 																	   editeng::HangulHanjaConversion::ConversionDirection _ePrimaryDirection )
1154 {
1155 	HangulHanjaConversionDialog* pDlg = new HangulHanjaConversionDialog( pParent, _ePrimaryDirection);
1156 	return new AbstractHangulHanjaConversionDialog_Impl( pDlg );
1157 }
1158 
1159 AbstractThesaurusDialog* AbstractDialogFactory_Impl::CreateThesaurusDialog( Window* pParent,
1160 								::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XThesaurus >  xThesaurus,
1161 								const String &rWord, sal_Int16 nLanguage )
1162 {
1163 	SvxThesaurusDialog* pDlg = new SvxThesaurusDialog( pParent, xThesaurus, rWord, nLanguage );
1164 	return new AbstractThesaurusDialog_Impl( pDlg );
1165 }
1166 
1167 AbstractHyphenWordDialog* AbstractDialogFactory_Impl::CreateHyphenWordDialog( Window* pParent,
1168 												const String &rWord, LanguageType nLang,
1169 												::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XHyphenator >  &xHyphen,
1170 												SvxSpellWrapper* pWrapper )
1171 {
1172 	SvxHyphenWordDialog* pDlg = new SvxHyphenWordDialog( rWord, nLang, pParent, xHyphen, pWrapper );
1173 	return new AbstractHyphenWordDialog_Impl( pDlg );
1174 }
1175 
1176 AbstractFmShowColsDialog * AbstractDialogFactory_Impl::CreateFmShowColsDialog( Window* pParent )
1177 {
1178     FmShowColsDialog* pDlg = new FmShowColsDialog( pParent);
1179 	return new AbstractFmShowColsDialog_Impl( pDlg );
1180 }
1181 AbstractSvxZoomDialog * AbstractDialogFactory_Impl::CreateSvxZoomDialog( Window* pParent,  //add for SvxZoomDialog
1182 											const SfxItemSet& rCoreSet)
1183 {
1184     SvxZoomDialog* pDlg = new SvxZoomDialog( pParent, rCoreSet);
1185 	return new AbstractSvxZoomDialog_Impl( pDlg );
1186 }
1187 
1188 AbstractSpellDialog *  AbstractDialogFactory_Impl::CreateSvxSpellDialog(
1189                         Window* pParent,
1190                         SfxBindings* pBindings,
1191                         svx::SpellDialogChildWindow* pSpellChildWindow )
1192 {
1193     svx::SpellDialog* pDlg = new svx::SpellDialog(pSpellChildWindow, pParent, pBindings);
1194     return new AbstractSpellDialog_Impl(pDlg);
1195 }
1196 
1197 VclAbstractRefreshableDialog * AbstractDialogFactory_Impl::CreateActualizeProgressDialog( Window* pParent, GalleryTheme* pThm )
1198 {
1199    Dialog* pDlg = new ActualizeProgress( pParent, pThm);
1200    return new VclAbstractRefreshableDialog_Impl( pDlg );
1201 }
1202 
1203 AbstractSearchProgress * AbstractDialogFactory_Impl::CreateSearchProgressDialog( Window* pParent,  //add for SearchProgress
1204 											const INetURLObject& rStartURL )
1205 {
1206     SearchProgress* pDlg = new SearchProgress( pParent, rStartURL);
1207 	return new AbstractSearchProgress_Impl( pDlg );
1208 }
1209 
1210 AbstractTakeProgress * AbstractDialogFactory_Impl::CreateTakeProgressDialog( Window* pParent )
1211 {
1212     TakeProgress* pDlg = new TakeProgress( pParent );
1213 	return new AbstractTakeProgress_Impl( pDlg );
1214 }
1215 
1216 VclAbstractDialog*
1217 AbstractDialogFactory_Impl::CreateScriptErrorDialog(
1218 	Window* pParent, ::com::sun::star::uno::Any aException )
1219 {
1220 	return new SvxScriptErrorDialog( pParent, aException );
1221 }
1222 
1223 AbstractScriptSelectorDialog*
1224 AbstractDialogFactory_Impl::CreateScriptSelectorDialog(
1225     Window* pParent, sal_Bool bShowSlots, const Reference< frame::XFrame >& _rxFrame )
1226 {
1227 	SvxScriptSelectorDialog* pDlg = NULL;
1228 
1229 	pDlg = new SvxScriptSelectorDialog( pParent, bShowSlots, _rxFrame );
1230 
1231 	if (pDlg)
1232 	{
1233 		return new AbstractScriptSelectorDialog_Impl( pDlg );
1234 	}
1235 	return 0;
1236 }
1237 
1238 String AbstractScriptSelectorDialog_Impl::GetScriptURL() const
1239 {
1240 	if (pDlg)
1241 		return pDlg->GetScriptURL();
1242 	return String();
1243 }
1244 
1245 void AbstractScriptSelectorDialog_Impl::SetRunLabel()
1246 {
1247 	if (pDlg)
1248 		pDlg->SetRunLabel();
1249 	return;
1250 }
1251 
1252 VclAbstractDialog * AbstractDialogFactory_Impl::CreateSvxScriptOrgDialog( Window* pParent,  //add for SvxScriptOrgDialog
1253 											const String& rLanguage)
1254 {
1255     Dialog* pDlg=NULL;
1256 
1257     pDlg = new SvxScriptOrgDialog( pParent, rLanguage);
1258 
1259 	if ( pDlg )
1260 		return new VclAbstractDialog_Impl( pDlg );
1261 	return 0;
1262 }
1263 
1264 AbstractTitleDialog * AbstractDialogFactory_Impl::CreateTitleDialog( Window* pParent,  //add for TitleDialog
1265 											const String& rOldText)
1266 {
1267    TitleDialog* pDlg = new TitleDialog( pParent, rOldText);
1268    return new AbstractTitleDialog_Impl( pDlg );
1269 }
1270 
1271 AbstractGalleryIdDialog * AbstractDialogFactory_Impl::CreateGalleryIdDialog( Window* pParent,  //add for SvxZoomDialog
1272 											GalleryTheme* pThm )
1273 {
1274    GalleryIdDialog* pDlg = new GalleryIdDialog( pParent, pThm);
1275    return new AbstractGalleryIdDialog_Impl( pDlg );
1276 }
1277 
1278 VclAbstractDialog2 * AbstractDialogFactory_Impl::CreateGalleryThemePropertiesDialog( Window* pParent,  //add for GalleryThemeProperties
1279 											ExchangeData* pData,
1280 											SfxItemSet* pItemSet)
1281 {
1282 	Dialog* pDlg = new GalleryThemeProperties( pParent, pData, pItemSet);
1283     return new VclAbstractDialog2_Impl( pDlg );
1284 }
1285 
1286 AbstractURLDlg * AbstractDialogFactory_Impl::CreateURLDialog( Window* pParent,  //add for URLDlg
1287 											const String& rURL, const String& rAltText, const String& rDescription,
1288 											const String& rTarget, const String& rName,
1289 											TargetList& rTargetList )
1290 {
1291 	URLDlg* pDlg = new URLDlg( pParent, rURL, rAltText, rDescription, rTarget, rName, rTargetList);
1292 	return new AbstractURLDlg_Impl( pDlg );
1293 }
1294 
1295 AbstractSvxHlinkDlgMarkWnd* AbstractDialogFactory_Impl::CreateSvxHlinkDlgMarkWndDialog( SvxHyperlinkTabPageBase* pParent, sal_uInt32 nResId )
1296 {
1297 	SvxHlinkDlgMarkWnd* pDlg=NULL;
1298 	switch ( nResId )
1299 	{
1300 		case RID_SVXFLOAT_HYPERLINK_MARKWND :
1301 			pDlg = new  SvxHlinkDlgMarkWnd( pParent );
1302 			break;
1303 		default:
1304 			break;
1305 	}
1306 
1307 	if ( pDlg )
1308 		return new AbstractSvxHlinkDlgMarkWnd_Impl( pDlg );
1309 	return 0;
1310 }
1311 
1312 SfxAbstractDialog* AbstractDialogFactory_Impl::CreateSfxDialog( sal_uInt32 nResId,
1313 											Window* pParent,
1314 											const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& ,
1315 											const SfxItemSet* pAttrSet )
1316 {
1317 	SfxModalDialog* pDlg=NULL;
1318 	switch ( nResId )
1319 	{
1320 		case RID_SVXDLG_CHARMAP :
1321 			pDlg = new SvxCharacterMap( pParent, sal_True, pAttrSet );
1322 			break;
1323 		default:
1324 			break;
1325 	}
1326 
1327 	if ( pDlg )
1328 		return new AbstractSfxDialog_Impl( pDlg );
1329 	return 0;
1330 }
1331 
1332 SfxAbstractTabDialog* AbstractDialogFactory_Impl::CreateTabItemDialog( Window* pParent,
1333 											const SfxItemSet& rSet,
1334 											sal_uInt32 nResId)
1335 {
1336 	SfxTabDialog* pDlg=NULL;
1337 	switch ( nResId )
1338 	{
1339 		case RID_SVXDLG_SEARCHFORMAT :
1340 			pDlg = new SvxSearchFormatDialog( pParent, rSet );
1341 			break;
1342 		default:
1343 			break;
1344 	}
1345 
1346 	if ( pDlg )
1347 		return new AbstractTabDialog_Impl( pDlg );
1348 	return 0;
1349 }
1350 
1351 VclAbstractDialog* 		AbstractDialogFactory_Impl::CreateSvxSearchAttributeDialog( Window* pParent,
1352 											SearchAttrItemList& rLst,
1353 											const sal_uInt16* pWhRanges )
1354 {
1355 	Dialog* pDlg = new SvxSearchAttributeDialog( pParent, rLst, pWhRanges);
1356 	return new VclAbstractDialog_Impl( pDlg );
1357 }
1358 
1359 AbstractSvxSearchSimilarityDialog * AbstractDialogFactory_Impl::CreateSvxSearchSimilarityDialog( Window* pParent,
1360 															sal_Bool bRelax,
1361 															sal_uInt16 nOther,
1362 															sal_uInt16 nShorter,
1363 															sal_uInt16 nLonger)
1364 {
1365 	SvxSearchSimilarityDialog* pDlg = new SvxSearchSimilarityDialog( pParent, bRelax, nOther, nShorter, nLonger );
1366 	if ( pDlg )
1367 		return new AbstractSvxSearchSimilarityDialog_Impl( pDlg );
1368 	return NULL;
1369 }
1370 
1371 SfxAbstractTabDialog* AbstractDialogFactory_Impl::CreateSvxBorderBackgroundDlg( Window* pParent,
1372 											const SfxItemSet& rCoreSet,
1373 											sal_Bool bEnableSelector)
1374 {
1375 	SfxTabDialog* pDlg = new SvxBorderBackgroundDlg( pParent, rCoreSet, bEnableSelector);
1376 	return new AbstractTabDialog_Impl( pDlg );
1377 }
1378 
1379 AbstractSvxTransformTabDialog* AbstractDialogFactory_Impl::CreateSvxTransformTabDialog( Window* pParent,
1380 																			  const SfxItemSet* pAttr,
1381 																				const SdrView* pView,
1382 																				sal_uInt16 nAnchorTypes )
1383 {
1384     SvxTransformTabDialog* pDlg = new SvxTransformTabDialog( pParent, pAttr,pView, nAnchorTypes);
1385     return new AbstractSvxTransformTabDialog_Impl( pDlg );
1386 }
1387 
1388 SfxAbstractTabDialog* AbstractDialogFactory_Impl::CreateSchTransformTabDialog( Window* pParent,
1389 																const SfxItemSet* pAttr,
1390 																const SdrView* pSdrView,
1391 																sal_uInt32 nResId,
1392 																bool bSizeTabPage
1393 																)
1394 {
1395 	SfxTabDialog* pDlg=NULL;
1396 	switch ( nResId )
1397 	{
1398 		case RID_SCH_TransformTabDLG_SVXPAGE_ANGLE :
1399 			{
1400 			pDlg = new SvxTransformTabDialog( pParent, pAttr,pSdrView, bSizeTabPage ? SVX_OBJ_NOPROTECT :  SVX_OBJ_NOPROTECT|SVX_OBJ_NORESIZE);
1401 			pDlg->RemoveTabPage( RID_SVXPAGE_ANGLE );
1402 			pDlg->RemoveTabPage( RID_SVXPAGE_SLANT );
1403 			}
1404 			break;
1405 		case RID_SCH_TransformTabDLG_SVXPAGE_SLANT:
1406 			{
1407 			pDlg = new  SvxTransformTabDialog( pParent, pAttr,pSdrView, bSizeTabPage ? SVX_OBJ_NOPROTECT :  SVX_OBJ_NOPROTECT|SVX_OBJ_NORESIZE);
1408 			pDlg->RemoveTabPage( RID_SVXPAGE_SLANT );
1409 			}
1410 			break;
1411 		default:
1412 			break;
1413 	}
1414 
1415 	if ( pDlg )
1416 		return new AbstractTabDialog_Impl( pDlg );
1417 	return 0;
1418 }
1419 
1420 AbstractSvxJSearchOptionsDialog * AbstractDialogFactory_Impl::CreateSvxJSearchOptionsDialog( Window* pParent,
1421 															const SfxItemSet& rOptionsSet,
1422 															sal_Int32 nInitialFlags)
1423 {
1424 	SvxJSearchOptionsDialog* pDlg = new SvxJSearchOptionsDialog( pParent, rOptionsSet, nInitialFlags );
1425 	return new AbstractSvxJSearchOptionsDialog_Impl( pDlg );
1426 }
1427 
1428 AbstractFmInputRecordNoDialog * AbstractDialogFactory_Impl::CreateFmInputRecordNoDialog( Window* pParent )
1429 {
1430 	FmInputRecordNoDialog* pDlg = new FmInputRecordNoDialog( pParent );
1431 	return new AbstractFmInputRecordNoDialog_Impl( pDlg );
1432 }
1433 
1434 AbstractSvxNewDictionaryDialog * AbstractDialogFactory_Impl::CreateSvxNewDictionaryDialog( Window* pParent,
1435 											::Reference< ::com::sun::star::linguistic2::XSpellChecker1 >  &xSpl,
1436 											sal_uInt32 nResId )
1437 {
1438 	SvxNewDictionaryDialog* pDlg=NULL;
1439 	switch ( nResId )
1440 	{
1441 		case RID_SFXDLG_NEWDICT :
1442 			pDlg = new SvxNewDictionaryDialog( pParent, xSpl );
1443 			break;
1444 		default:
1445 			break;
1446 	}
1447 
1448 	if ( pDlg )
1449 		return new AbstractSvxNewDictionaryDialog_Impl( pDlg );
1450 	return 0;
1451 }
1452 
1453 VclAbstractDialog* 		AbstractDialogFactory_Impl::CreateSvxEditDictionaryDialog( Window* pParent,
1454 											const String& rName,
1455 											::Reference< ::com::sun::star::linguistic2::XSpellChecker1> &xSpl,
1456 											sal_uInt32 nResId )
1457 {
1458 	Dialog* pDlg=NULL;
1459 	switch ( nResId )
1460 	{
1461 		case RID_SFXDLG_EDITDICT :
1462 			pDlg = new SvxEditDictionaryDialog( pParent, rName, xSpl );
1463 			break;
1464 		default:
1465 			break;
1466 	}
1467 
1468 	if ( pDlg )
1469 		return new VclAbstractDialog_Impl( pDlg );
1470 	return 0;
1471 }
1472 
1473 AbstractSvxNameDialog * AbstractDialogFactory_Impl::CreateSvxNameDialog( Window* pParent,
1474 									const String& rName, const String& rDesc )
1475 {
1476 	SvxNameDialog* pDlg = new SvxNameDialog( pParent, rName, rDesc );
1477 	return new AbstractSvxNameDialog_Impl( pDlg );
1478 }
1479 
1480 AbstractSvxObjectNameDialog* AbstractDialogFactory_Impl::CreateSvxObjectNameDialog(Window* pParent, const String& rName )
1481 {
1482 	return new AbstractSvxObjectNameDialog_Impl(new SvxObjectNameDialog(pParent, rName));
1483 }
1484 
1485 AbstractSvxObjectTitleDescDialog* AbstractDialogFactory_Impl::CreateSvxObjectTitleDescDialog(Window* pParent, const String& rTitle, const String& rDescription)
1486 {
1487 	return new AbstractSvxObjectTitleDescDialog_Impl(new SvxObjectTitleDescDialog(pParent, rTitle, rDescription));
1488 }
1489 
1490 AbstractSvxMessDialog * AbstractDialogFactory_Impl::CreateSvxMessDialog( Window* pParent, sal_uInt32 nResId,
1491 									const String& rText, const String& rDesc, Image* pImg )
1492 {
1493 	SvxMessDialog* pDlg=NULL;
1494 	switch ( nResId )
1495 	{
1496 		case RID_SVXDLG_MESSBOX :
1497 			pDlg = new SvxMessDialog( pParent, rText, rDesc, pImg );
1498 			break;
1499 		default:
1500 			break;
1501 	}
1502 
1503 	if ( pDlg )
1504 		return new AbstractSvxMessDialog_Impl( pDlg );
1505 	return 0;
1506 }
1507 
1508 AbstractSvxMultiPathDialog * AbstractDialogFactory_Impl::CreateSvxMultiPathDialog( Window* pParent, sal_Bool bEmptyAllowed )
1509 {
1510 	SvxMultiPathDialog* pDlg = new SvxMultiPathDialog( pParent, bEmptyAllowed );
1511 	return new AbstractSvxMultiPathDialog_Impl( pDlg );
1512 }
1513 
1514 AbstractSvxMultiFileDialog * AbstractDialogFactory_Impl::CreateSvxMultiFileDialog( Window* pParent, sal_Bool bEmptyAllowed )
1515 {
1516 	SvxMultiFileDialog* pDlg = new SvxMultiFileDialog( pParent, bEmptyAllowed );
1517 	return new AbstractSvxMultiFileDialog_Impl( pDlg );
1518 }
1519 
1520 AbstractSvxHpLinkDlg * AbstractDialogFactory_Impl::CreateSvxHpLinkDlg (Window* pParent,  //add for SvxMultiFileDialog
1521 											SfxBindings* pBindings,
1522 											sal_uInt32 nResId)
1523 {
1524 	SvxHpLinkDlg* pDlg=NULL;
1525 	switch ( nResId )
1526 	{
1527 		case SID_HYPERLINK_DIALOG :
1528 			pDlg = new SvxHpLinkDlg( pParent, pBindings );
1529 			break;
1530 		default:
1531 			break;
1532 	}
1533 
1534 	if ( pDlg )
1535 		return new AbstractSvxHpLinkDlg_Impl( pDlg );
1536 	return 0;
1537 }
1538 
1539 AbstractFmSearchDialog*  AbstractDialogFactory_Impl::CreateFmSearchDialog(Window* pParent, //add for FmSearchDialog
1540 														const String& strInitialText,
1541 														const ::std::vector< String >& _rContexts,
1542 														sal_Int16 nInitialContext,
1543 														const Link& lnkContextSupplier)
1544 {
1545 	FmSearchDialog* pDlg = new FmSearchDialog( pParent, strInitialText, _rContexts, nInitialContext, lnkContextSupplier );
1546 	if ( pDlg )
1547 		return new AbstractFmSearchDialog_Impl( pDlg );
1548 	return 0;
1549 }
1550 
1551 AbstractGraphicFilterDialog * AbstractDialogFactory_Impl::CreateGraphicFilterEmboss (Window* pParent,  //add for GraphicFilterEmboss
1552 											const Graphic& rGraphic,
1553 											RECT_POINT eLightSource,
1554 											sal_uInt32)
1555 {
1556 	GraphicFilterDialog* pDlg = new GraphicFilterEmboss( pParent, rGraphic, eLightSource );
1557 	return new AbstractGraphicFilterDialog_Impl( pDlg );
1558 }
1559 
1560 AbstractGraphicFilterDialog * AbstractDialogFactory_Impl::CreateGraphicFilterPosterSepia (Window* pParent,
1561 											const Graphic& rGraphic,
1562 											sal_uInt16 nCount,
1563 											sal_uInt32 nResId)
1564 {
1565 	GraphicFilterDialog* pDlg=NULL;
1566 	switch ( nResId )
1567 	{
1568 		case RID_SVX_GRFFILTER_DLG_POSTER :
1569 			pDlg = new GraphicFilterPoster( pParent, rGraphic, nCount );
1570 			break;
1571 		case RID_SVX_GRFFILTER_DLG_SEPIA :
1572 			pDlg = new GraphicFilterSepia( pParent, rGraphic, nCount );
1573 			break;
1574 
1575 		default:
1576 			break;
1577 	}
1578 
1579 	if ( pDlg )
1580 		return new AbstractGraphicFilterDialog_Impl( pDlg );
1581 	return 0;
1582 }
1583 
1584 AbstractGraphicFilterDialog * AbstractDialogFactory_Impl::CreateGraphicFilterSolarize (Window* pParent,  //add for GraphicFilterSolarize
1585 											const Graphic& rGraphic,
1586 											sal_uInt8 nGreyThreshold, sal_Bool bInvert, sal_uInt32 )
1587 {
1588 	GraphicFilterDialog* pDlg = new GraphicFilterSolarize( pParent, rGraphic, nGreyThreshold, bInvert );
1589 	return new AbstractGraphicFilterDialog_Impl( pDlg );
1590 }
1591 
1592 AbstractGraphicFilterDialog * AbstractDialogFactory_Impl::CreateGraphicFilterMosaic (Window* pParent,  //add for GraphicFilterMosaic
1593 											const Graphic& rGraphic,
1594 											sal_uInt16 nTileWidth, sal_uInt16 nTileHeight, sal_Bool bEnhanceEdges,
1595 											sal_uInt32 nResId)
1596 {
1597 	GraphicFilterDialog* pDlg=NULL;
1598 	switch ( nResId )
1599 	{
1600 		case RID_SVX_GRFFILTER_DLG_MOSAIC :
1601 			pDlg = new GraphicFilterMosaic( pParent, rGraphic, nTileWidth, nTileHeight, bEnhanceEdges );
1602 			break;
1603 		default:
1604 			break;
1605 	}
1606 
1607 	if ( pDlg )
1608 		return new AbstractGraphicFilterDialog_Impl( pDlg );
1609 	return 0;
1610 }
1611 
1612 AbstractSvxAreaTabDialog* AbstractDialogFactory_Impl::CreateSvxAreaTabDialog( Window* pParent,
1613 															const SfxItemSet* pAttr,
1614 															SdrModel* pModel,
1615 															const SdrView* pSdrView )
1616 {
1617 	SvxAreaTabDialog* pDlg = new SvxAreaTabDialog( pParent, pAttr, pModel,pSdrView );
1618 	return new AbstractSvxAreaTabDialog_Impl( pDlg );
1619 }
1620 
1621 SfxAbstractTabDialog* AbstractDialogFactory_Impl::CreateSvxLineTabDialog( Window* pParent, const SfxItemSet* pAttr, //add forSvxLineTabDialog
1622 																 SdrModel* pModel,
1623 																 const SdrObject* pObj ,
1624 																sal_Bool bHasObj)
1625 {
1626 	SfxTabDialog* pDlg = new SvxLineTabDialog( pParent, pAttr, pModel,pObj,bHasObj );
1627 	return new AbstractTabDialog_Impl( pDlg );
1628 }
1629 
1630 SfxAbstractDialog* AbstractDialogFactory_Impl::CreateSfxDialog( Window* pParent,
1631 																		const SfxItemSet& rAttr,
1632 																		const Reference< XFrame >& _rxDocumentFrame,
1633 																		sal_uInt32 nResId
1634 																		)
1635 {
1636 	SfxModalDialog* pDlg=NULL;
1637 	switch ( nResId )
1638 	{
1639 		case SID_EVENTCONFIG :
1640 			pDlg = new SfxMacroAssignDlg( pParent, _rxDocumentFrame, rAttr );
1641 			break;
1642 		case RID_SVXPAGE_MACROASSIGN :
1643 			pDlg = new SvxShortcutAssignDlg( pParent, _rxDocumentFrame, rAttr );
1644 			break;
1645 		case RID_SVXDLG_CHARMAP :
1646 			pDlg = new SvxCharacterMap( pParent, sal_True, &rAttr );
1647 			break;
1648 		default:
1649 			break;
1650 	}
1651 
1652 	if ( pDlg )
1653 		return new AbstractSfxDialog_Impl( pDlg );
1654 	return 0;
1655 }
1656 
1657 SfxAbstractDialog* AbstractDialogFactory_Impl::CreateSfxDialog( Window* pParent,
1658 																		const SfxItemSet& rAttr,
1659 																		const SdrView* pView,
1660 																		sal_uInt32 nResId
1661 																		)
1662 {
1663 	SfxSingleTabDialog* pDlg=NULL;
1664 	switch ( nResId )
1665 	{
1666 		case RID_SVXPAGE_MEASURE :
1667 			pDlg = new SvxMeasureDialog( pParent, rAttr, pView );
1668 			break;
1669 		case RID_SVXPAGE_CONNECTION :
1670 			pDlg = new SvxConnectionDialog( pParent, rAttr, pView );
1671 			break;
1672 		case RID_SFXPAGE_DBREGISTER :
1673 			pDlg = new DatabaseRegistrationDialog( pParent, rAttr );
1674 			break;
1675 		case RID_SVXPAGE_IMPROVEMENT :
1676 		{
1677 			String help_url;
1678 			SFX_ITEMSET_ARG( &rAttr, pItem, SfxStringItem, SID_CURRENT_URL, sal_False );
1679 			if ( pItem )
1680 				help_url = pItem->GetValue();
1681 			pDlg = new SvxImprovementDialog( pParent, help_url);
1682 		}
1683 		default:
1684 			break;
1685 	}
1686 
1687 	if ( pDlg )
1688 		return new AbstractSfxDialog_Impl( pDlg );
1689 	return 0;
1690 }
1691 
1692 AbstractSvxPostItDialog* AbstractDialogFactory_Impl::CreateSvxPostItDialog( Window* pParent,
1693 																		const SfxItemSet& rCoreSet,
1694 																		sal_Bool bPrevNext, sal_Bool bRedline )
1695 {
1696 	SvxPostItDialog* pDlg = new SvxPostItDialog( pParent, rCoreSet, bPrevNext, bRedline );
1697 	return new AbstractSvxPostItDialog_Impl( pDlg );
1698 }
1699 
1700 class SvxMacroAssignDialog : public VclAbstractDialog
1701 {
1702 public:
1703     SvxMacroAssignDialog( Window* _pParent, const Reference< XFrame >& _rxDocumentFrame, const bool _bUnoDialogMode,
1704             const Reference< XNameReplace >& _rxEvents, const sal_uInt16 _nInitiallySelectedEvent )
1705         :m_aItems( SFX_APP()->GetPool(), SID_ATTR_MACROITEM, SID_ATTR_MACROITEM )
1706     {
1707         m_aItems.Put( SfxBoolItem( SID_ATTR_MACROITEM, _bUnoDialogMode ) );
1708         m_pDialog.reset( new SvxMacroAssignDlg( _pParent, _rxDocumentFrame, m_aItems, _rxEvents, _nInitiallySelectedEvent ) );
1709     }
1710 
1711     virtual short Execute();
1712     virtual ~SvxMacroAssignDialog();
1713 
1714 private:
1715     SfxItemSet                              m_aItems;
1716     ::std::auto_ptr< SvxMacroAssignDlg >    m_pDialog;
1717 };
1718 
1719 short SvxMacroAssignDialog::Execute()
1720 {
1721     return m_pDialog->Execute();
1722 }
1723 
1724 SvxMacroAssignDialog::~SvxMacroAssignDialog()
1725 {
1726 }
1727 
1728 VclAbstractDialog * AbstractDialogFactory_Impl::CreateSvxMacroAssignDlg(
1729     Window* _pParent, const Reference< XFrame >& _rxDocumentFrame, const bool _bUnoDialogMode,
1730     const Reference< XNameReplace >& _rxEvents, const sal_uInt16 _nInitiallySelectedEvent )
1731 {
1732     return new SvxMacroAssignDialog( _pParent, _rxDocumentFrame, _bUnoDialogMode, _rxEvents, _nInitiallySelectedEvent );
1733 }
1734 
1735 // Factories for TabPages
1736 CreateTabPage AbstractDialogFactory_Impl::GetTabPageCreatorFunc( sal_uInt16 nId )
1737 {
1738 	switch ( nId )
1739 	{
1740 		case RID_OFA_TP_INTERNATIONAL:
1741 			return ::offapp::InternationalOptionsPage::CreateSc;
1742 		case RID_OFA_TP_INTERNATIONAL_SD:
1743 		case RID_OFA_TP_INTERNATIONAL_IMPR:
1744 			return offapp::InternationalOptionsPage::CreateSd;
1745 		case RID_SVXPAGE_TEXTANIMATION :
1746 			return SvxTextAnimationPage::Create;
1747 		case RID_SVXTABPAGE_GALLERY_GENERAL :
1748 			return TPGalleryThemeGeneral::Create;
1749 		case RID_SVXPAGE_TRANSPARENCE :
1750 			return SvxTransparenceTabPage::Create;
1751 		case RID_SVXPAGE_AREA :
1752 			return SvxAreaTabPage::Create;
1753 		case RID_SVXPAGE_SHADOW :
1754 			return SvxShadowTabPage::Create;
1755 		case RID_SVXPAGE_LINE :
1756 			return SvxLineTabPage::Create;
1757 		case RID_SVXPAGE_CONNECTION :
1758 			return SvxConnectionPage::Create;
1759 		case RID_SVXPAGE_MEASURE :
1760 			return SvxMeasurePage::Create;
1761 		case RID_SFXPAGE_GENERAL :
1762 			return SvxGeneralTabPage::Create;
1763 		case RID_SVXPAGE_PICK_SINGLE_NUM :
1764 			return SvxSingleNumPickTabPage::Create;
1765 		case RID_SVXPAGE_PICK_BMP :
1766 			return SvxBitmapPickTabPage::Create;
1767 		case RID_SVXPAGE_PICK_BULLET :
1768 			return SvxBulletPickTabPage::Create;
1769 		case RID_SVXPAGE_NUM_OPTIONS :
1770 			return SvxNumOptionsTabPage::Create;
1771 		case RID_SVXPAGE_PICK_NUM :
1772 			return SvxNumPickTabPage::Create;
1773 		case RID_SVXPAGE_NUM_POSITION :
1774 			return SvxNumPositionTabPage::Create;
1775 		case RID_SVXPAGE_PARA_ASIAN :
1776 			return SvxAsianTabPage::Create;
1777 		case RID_SVXPAGE_EXT_PARAGRAPH :
1778 			return SvxExtParagraphTabPage::Create;
1779 		case RID_SVXPAGE_ALIGN_PARAGRAPH :
1780 			return SvxParaAlignTabPage::Create;
1781 		case RID_SVXPAGE_STD_PARAGRAPH :
1782 			return SvxStdParagraphTabPage::Create;
1783 		case RID_SVXPAGE_TABULATOR :
1784 			return SvxTabulatorTabPage::Create;
1785 		case RID_SVXPAGE_TEXTATTR :
1786 			return SvxTextAttrPage::Create;
1787 		case RID_SVXPAGE_ALIGNMENT :
1788             return svx::AlignmentTabPage::Create;
1789 		case RID_SW_TP_BACKGROUND :
1790 		case RID_SVXPAGE_BACKGROUND :
1791 			return SvxBackgroundTabPage::Create;
1792 		case RID_SVXPAGE_BORDER :
1793 			return SvxBorderTabPage::Create;
1794 		case RID_SVXPAGE_CHAR_NAME :
1795 			return SvxCharNamePage::Create;
1796 		case RID_SVXPAGE_CHAR_EFFECTS :
1797 			return SvxCharEffectsPage::Create;
1798 		case RID_SVXPAGE_CHAR_POSITION :
1799 			return SvxCharPositionPage::Create;
1800 		case RID_SVXPAGE_CHAR_TWOLINES :
1801 			return SvxCharTwoLinesPage::Create;
1802 		case RID_SVXPAGE_NUMBERFORMAT :
1803 			return SvxNumberFormatTabPage::Create;
1804 		case RID_SVXPAGE_PAGE :
1805 			return SvxPageDescPage::Create;
1806 		case RID_SVXPAGE_GRFCROP :
1807 			return SvxGrfCropPage::Create;
1808 		case RID_SVXPAGE_MACROASSIGN :
1809 			return SfxMacroTabPage::Create;
1810 		default:
1811 			break;
1812 	}
1813 
1814 	return 0;
1815 }
1816 
1817 CreateSvxDistributePage	AbstractDialogFactory_Impl::GetSvxDistributePageCreatorFunc()
1818 {
1819 	return SvxDistributePage::Create;
1820 }
1821 
1822 DialogGetRanges	AbstractDialogFactory_Impl::GetDialogGetRangesFunc( sal_uInt16 nId )
1823 {
1824 		switch ( nId )
1825 	{
1826 		case RID_SVXDLG_POSTIT:
1827 			return SvxPostItDialog::GetRanges;	//add for SvxPostItDialog
1828 		default:
1829 			break;
1830 	}
1831 
1832 	return 0;
1833 }
1834 GetTabPageRanges AbstractDialogFactory_Impl::GetTabPageRangesFunc( sal_uInt16 nId )
1835 {
1836 	switch ( nId )
1837 	{
1838 		case RID_SVXPAGE_TEXTANIMATION :
1839 			return SvxTextAnimationPage::GetRanges;
1840 		case RID_SVXPAGE_DISTRIBUTE:
1841 			return SvxDistributePage::GetRanges;
1842 		case RID_SVXPAGE_TRANSPARENCE :
1843 			return SvxTransparenceTabPage::GetRanges;
1844 		case RID_SVXPAGE_AREA :
1845 			return SvxAreaTabPage::GetRanges;
1846 		case RID_SVXPAGE_SHADOW :
1847 			return SvxShadowTabPage::GetRanges;
1848 		case RID_SVXPAGE_LINE :
1849 			return SvxLineTabPage::GetRanges;
1850 		case RID_SVXPAGE_CONNECTION :
1851 			return SvxConnectionPage::GetRanges;
1852 		case RID_SVXPAGE_MEASURE :
1853 			return SvxMeasurePage::GetRanges;
1854 		case RID_SVXPAGE_PARA_ASIAN :
1855 			return SvxAsianTabPage::GetRanges;
1856 		case RID_SVXPAGE_EXT_PARAGRAPH :
1857 			return SvxExtParagraphTabPage::GetRanges;
1858 		case RID_SVXPAGE_ALIGN_PARAGRAPH :
1859 			return SvxParaAlignTabPage::GetRanges;
1860 		case RID_SVXPAGE_STD_PARAGRAPH :
1861 			return SvxStdParagraphTabPage::GetRanges;
1862 		case RID_SVXPAGE_TABULATOR :
1863 			return SvxTabulatorTabPage::GetRanges;
1864 		case RID_SVXPAGE_TEXTATTR :
1865 			return SvxTextAttrPage::GetRanges;
1866 		case RID_SVXPAGE_ALIGNMENT :
1867             return svx::AlignmentTabPage::GetRanges;
1868 		case RID_SW_TP_BACKGROUND :
1869 		case RID_SVXPAGE_BACKGROUND :
1870 			return SvxBackgroundTabPage::GetRanges;
1871 		case RID_SVXPAGE_BORDER :
1872 			return SvxBorderTabPage::GetRanges;
1873 		case RID_SVXPAGE_CHAR_NAME :
1874 			return SvxCharNamePage::GetRanges;
1875 		case RID_SVXPAGE_CHAR_EFFECTS :
1876 			return SvxCharEffectsPage::GetRanges;
1877 		case RID_SVXPAGE_CHAR_POSITION :
1878 			return SvxCharPositionPage::GetRanges;
1879 		case RID_SVXPAGE_CHAR_TWOLINES :
1880 			return SvxCharTwoLinesPage::GetRanges;
1881 		case RID_SVXPAGE_NUMBERFORMAT :
1882 			return SvxNumberFormatTabPage::GetRanges;
1883 		case RID_SVXPAGE_PAGE :
1884 			return SvxPageDescPage::GetRanges;
1885         case RID_SVXPAGE_ASIAN_LAYOUT:
1886             return SvxAsianLayoutPage::GetRanges;
1887 		default:
1888 			break;
1889 	}
1890 
1891 	return 0;
1892 }
1893 
1894 SfxAbstractInsertObjectDialog* AbstractDialogFactory_Impl::CreateInsertObjectDialog( Window* pParent, const rtl::OUString& rCommand,
1895             const Reference < com::sun::star::embed::XStorage >& xStor,
1896             const SvObjectServerList* pList )
1897 {
1898     InsertObjectDialog_Impl* pDlg=0;
1899     if ( rCommand.equalsAscii(".uno:InsertObject" ) )
1900         pDlg = new SvInsertOleDlg( pParent, xStor, pList );
1901     else if ( rCommand.equalsAscii(".uno:InsertPlugin" ) )
1902         pDlg = new SvInsertPlugInDialog( pParent, xStor );
1903     else if ( rCommand.equalsAscii(".uno:InsertObjectFloatingFrame" ) )
1904         pDlg = new SfxInsertFloatingFrameDialog( pParent, xStor );
1905 
1906     if ( pDlg )
1907     {
1908         pDlg->SetHelpId( rtl::OString( rCommand, rCommand.getLength(), RTL_TEXTENCODING_UTF8 ) );
1909         return new AbstractInsertObjectDialog_Impl( pDlg );
1910     }
1911     return 0;
1912 }
1913 
1914 VclAbstractDialog* AbstractDialogFactory_Impl::CreateEditObjectDialog( Window* pParent,  const rtl::OUString& rCommand,
1915             const Reference < com::sun::star::embed::XEmbeddedObject >& xObj )
1916 {
1917     InsertObjectDialog_Impl* pDlg=0;
1918     if ( rCommand.equalsAscii(".uno:InsertObjectFloatingFrame" ) )
1919     {
1920         pDlg = new SfxInsertFloatingFrameDialog( pParent, xObj );
1921         pDlg->SetHelpId( rtl::OString( rCommand, rCommand.getLength(), RTL_TEXTENCODING_UTF8 ) );
1922         return new VclAbstractDialog_Impl( pDlg );
1923     }
1924     return 0;
1925 }
1926 
1927 
1928 
1929 SfxAbstractPasteDialog* AbstractDialogFactory_Impl::CreatePasteDialog( Window* pParent )
1930 {
1931     return new AbstractPasteDialog_Impl( new SvPasteObjectDialog( pParent ) );
1932 }
1933 
1934 SfxAbstractLinksDialog* AbstractDialogFactory_Impl::CreateLinksDialog( Window* pParent, sfx2::LinkManager* pMgr, sal_Bool bHTML, sfx2::SvBaseLink* p)
1935 {
1936     SvBaseLinksDlg* pLinkDlg = new SvBaseLinksDlg( pParent, pMgr, bHTML );
1937     if ( p )
1938         pLinkDlg->SetActLink(p);
1939     return new AbstractLinksDialog_Impl( pLinkDlg );
1940 }
1941 
1942 SfxAbstractTabDialog* AbstractDialogFactory_Impl::CreateSvxFormatCellsDialog( Window* pParent, const SfxItemSet* pAttr, SdrModel* pModel, const SdrObject* /*pObj*/ )
1943 {
1944 	return new AbstractTabDialog_Impl( new SvxFormatCellsDialog( pParent, pAttr, pModel ) );
1945 }
1946 
1947 SvxAbstractSplittTableDialog* AbstractDialogFactory_Impl::CreateSvxSplittTableDialog( Window* pParent, bool bIsTableVertical, long nMaxVertical, long nMaxHorizontal )
1948 {
1949 	return new SvxSplitTableDlg( pParent, bIsTableVertical, nMaxVertical, nMaxHorizontal );
1950 }
1951 
1952 SvxAbstractNewTableDialog* AbstractDialogFactory_Impl::CreateSvxNewTableDialog( Window* pParent )
1953 {
1954 	return new SvxNewTableDialog( pParent );
1955 }
1956 
1957 VclAbstractDialog* AbstractDialogFactory_Impl::CreateOptionsDialog(
1958     Window* pParent, const rtl::OUString& rExtensionId, const rtl::OUString& /*rApplicationContext*/ )
1959 {
1960     return new VclAbstractDialog_Impl( new OfaTreeOptionsDialog( pParent, rExtensionId ) );
1961 }
1962 
1963 SvxAbstractInsRowColDlg* AbstractDialogFactory_Impl::CreateSvxInsRowColDlg( Window* pParent, bool bCol, const rtl::OString& sHelpId )
1964 {
1965     return new SvxInsRowColDlg( pParent, bCol, sHelpId );
1966 }
1967 
1968 AbstractPasswordToOpenModifyDialog * AbstractDialogFactory_Impl::CreatePasswordToOpenModifyDialog(
1969     Window * pParent,
1970     sal_uInt16 nMinPasswdLen, sal_uInt16 nMaxPasswdLen, bool bIsPasswordToModify )
1971 {
1972     PasswordToOpenModifyDialog * pDlg = new PasswordToOpenModifyDialog( pParent, nMinPasswdLen, nMaxPasswdLen, bIsPasswordToModify );
1973     return new AbstractPasswordToOpenModifyDialog_Impl( pDlg );
1974 }
1975 
1976 
1977