xref: /AOO41X/main/sw/source/ui/dialog/swdlgfact.cxx (revision cdf0e10c4e3984b49a9502b011690b615761d4a3)
1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 
28 // MARKER(update_precomp.py): autogen include statement, do not remove
29 #include "precompiled_sw.hxx"
30 
31 #ifdef SW_DLLIMPLEMENTATION
32 #undef SW_DLLIMPLEMENTATION
33 #endif
34 
35 #include "swdlgfact.hxx"
36 #include <svl/style.hxx>
37 #ifndef _SVX_SVXIDS_HRC
38 #include <svx/svxids.hrc>
39 #endif
40 #include "dialog.hrc"
41 #include "misc.hrc"
42 #include "chrdlg.hrc"
43 #include "fldui.hrc"
44 #include "table.hrc"
45 #include "frmui.hrc"
46 #include "dbui.hrc"
47 #include "globals.hrc"
48 #include "fldui.hrc"
49 #include "envelp.hrc"
50 #include "dochdl.hrc"
51 #include <index.hrc>
52 #include <regionsw.hrc>
53 #include <fmtui.hrc>
54 
55 #include <wordcountdialog.hxx>
56 #include "abstract.hxx" // add for SwInsertAbstractDlg
57 #include "addrdlg.hxx" // add for SwAddrDlg
58 #include "ascfldlg.hxx" // add for SwAsciiFilterDlg
59 #include "bookmark.hxx" //add for SwInsertBookmarkDlg
60 #include "break.hxx" //add for SwBreakDlg
61 #include "changedb.hxx" //add for SwChangeDBDlg
62 #include "chrdlg.hxx" // add for SwCharDlg
63 #include "convert.hxx" //add for SwConvertTableDlg
64 #include "cption.hxx" //add for SwCaptionDialog
65 #include "dbinsdlg.hxx" //add for  SwInsertDBColAutoPilot
66 #include "docfnote.hxx" //add for SwFootNoteOptionDlg
67 #include "docstdlg.hxx" //add for SwDocStatPage
68 #include "DropDownFieldDialog.hxx" //add for DropDownFieldDialog
69 #include "envlop.hxx" //add for SwEnvDlg
70 #include "label.hxx" //add for SwLabDlg
71 #include "drpcps.hxx" //add for SwDropCapsDlg
72 #include "swuipardlg.hxx" //add for SwParaDlg
73 #include "pattern.hxx" //add for SwBackgroundDlg
74 #include "rowht.hxx" //add for SwTableHeightDlg
75 #include "selglos.hxx" //add for SwSelGlossaryDlg
76 #include "splittbl.hxx" //add for SwSplitTblDlg
77 #include "srtdlg.hxx" //add for SwSortDlg
78 #include "tautofmt.hxx" //add for SwAutoFormatDlg
79 #include "tblnumfm.hxx" //add for SwNumFmtDlg
80 #include "uiborder.hxx" //add for SwBorderDlg
81 #include "wrap.hxx" //add for SwWrapDlg
82 #include "colwd.hxx" //add for SwTableWidthDlg
83 #include "tabledlg.hxx" //add for SwTableTabDlg
84 #include "fldtdlg.hxx" //add for SwFldDlg
85 #include "fldedt.hxx" //add for SwFldEditDlg
86 #include "swrenamexnameddlg.hxx" //add for SwRenameXNamedDlg
87 #include "swmodalredlineacceptdlg.hxx" //add for SwModalRedlineAcceptDlg
88 #include <frmdlg.hxx> //add for SwFrmDlg
89 #include <tmpdlg.hxx> //add for SwTemplateDlg
90 #include <glossary.hxx> //add for SwGlossaryDlg
91 #include <inpdlg.hxx> //add for SwFldInputDlg
92 #include <insfnote.hxx> //add for SwInsFootNoteDlg
93 #include <insrule.hxx> //add for SwInsertGrfRulerDlg
94 #include <instable.hxx> //add for SwInsTableDlg
95 #include <javaedit.hxx> //add for SwJavaEditDialog
96 #include <linenum.hxx> //add for SwLineNumberingDlg
97 #include <mailmrge.hxx> //add for SwMailMergeDlg, SwMailMergeCreateFromDlg, SwMailMergeFieldConnectionsDlg
98 #include <mergetbl.hxx> //add for SwMergeTblDlg
99 #include <multmrk.hxx> //add for SwMultiTOXMarkDlg
100 #include <num.hxx> //add for SwSvxNumBulletTabDialog
101 #include <outline.hxx> //add for SwOutlineTabDialog
102 #include <column.hxx> //add for SwColumnDlg
103 #include <cnttab.hxx> //add for SwMultiTOXTabDialog
104 #include <swuicnttab.hxx> //add for SwMultiTOXTabDialog
105 #include <regionsw.hxx> //add for SwEditRegionDlg, SwInsertSectionTabDialog
106 #include <optcomp.hxx> //add for SwCompatibilityOptPage
107 #include <optload.hxx> //add for SwLoadOptPage
108 #include <optpage.hxx> //add for OptPage
109 #include <swuiidxmrk.hxx> //add for SwIndexMarkDlg, SwAuthMarkDlg, SwIndexMarkModalDlg, SwAuthMarkModalDlg
110 #include <svx/dialogs.hrc>
111 #include <mailmergewizard.hxx>
112 #include <mailconfigpage.hxx>
113 
114 using namespace ::com::sun::star;
115 
116 IMPL_ABSTDLG_BASE(AbstractSwWordCountDialog_Impl);
117 IMPL_ABSTDLG_BASE(AbstractSwInsertAbstractDlg_Impl);
118 IMPL_ABSTDLG_BASE(AbstractSfxDialog_Impl);
119 IMPL_ABSTDLG_BASE(AbstractSwAsciiFilterDlg_Impl);
120 IMPL_ABSTDLG_BASE(VclAbstractDialog_Impl);
121 IMPL_ABSTDLG_BASE(AbstractSplitTableDialog_Impl);
122 IMPL_ABSTDLG_BASE(AbstractSwBreakDlg_Impl); //add for SwBreakDlg
123 IMPL_ABSTDLG_BASE(AbstractTabDialog_Impl); //add for SwCharDlg, SwFootNoteOptionDlg, SwEnvDlg  SwParaDlg SwTableTabDlg
124 IMPL_ABSTDLG_BASE(AbstractSwConvertTableDlg_Impl); //add for SwConvertTableDlg
125 IMPL_ABSTDLG_BASE(AbstractSwInsertDBColAutoPilot_Impl); //add for SwInsertDBColAutoPilot
126 IMPL_ABSTDLG_BASE(AbstractDropDownFieldDialog_Impl); //add for DropDownFieldDialog
127 IMPL_ABSTDLG_BASE(AbstarctSwLabDlg_Impl);//add for SwLabDlg
128 IMPL_ABSTDLG_BASE(AbstarctSwSelGlossaryDlg_Impl);//add for SwSelGlossaryDlg
129 IMPL_ABSTDLG_BASE(AbstractSwAutoFormatDlg_Impl); //add for SwAutoFormatDlg
130 IMPL_ABSTDLG_BASE(AbstractSwFldDlg_Impl); //add for SwFldDlg
131 IMPL_ABSTDLG_BASE(AbstractSwRenameXNamedDlg_Impl); //add for SwRenameXNamedDlg
132 IMPL_ABSTDLG_BASE(AbstractSwModalRedlineAcceptDlg_Impl); //add for SwModalRedlineAcceptDlg
133 IMPL_ABSTDLG_BASE(AbstractGlossaryDlg_Impl);
134 IMPL_ABSTDLG_BASE(AbstractFldInputDlg_Impl);
135 IMPL_ABSTDLG_BASE(AbstractInsFootNoteDlg_Impl);
136 IMPL_ABSTDLG_BASE(AbstractInsertGrfRulerDlg_Impl);
137 IMPL_ABSTDLG_BASE(AbstractInsTableDlg_Impl);
138 IMPL_ABSTDLG_BASE(AbstractJavaEditDialog_Impl);
139 IMPL_ABSTDLG_BASE(AbstractMailMergeDlg_Impl);
140 IMPL_ABSTDLG_BASE(AbstractMailMergeCreateFromDlg_Impl);
141 IMPL_ABSTDLG_BASE(AbstractMailMergeFieldConnectionsDlg_Impl);
142 IMPL_ABSTDLG_BASE(AbstractMultiTOXTabDialog_Impl);
143 IMPL_ABSTDLG_BASE(AbstractEditRegionDlg_Impl);
144 IMPL_ABSTDLG_BASE(AbstractInsertSectionTabDialog_Impl);
145 IMPL_ABSTDLG_BASE(AbstractIndexMarkFloatDlg_Impl);
146 IMPL_ABSTDLG_BASE(AbstractAuthMarkFloatDlg_Impl);
147 
148 // AbstractTabDialog_Impl begin
149 void AbstractTabDialog_Impl::SetCurPageId( sal_uInt16 nId )
150 {
151 	pDlg->SetCurPageId( nId );
152 }
153 
154 const SfxItemSet* AbstractTabDialog_Impl::GetOutputItemSet() const
155 {
156 	return pDlg->GetOutputItemSet();
157 }
158 
159 const sal_uInt16* AbstractTabDialog_Impl::GetInputRanges(const SfxItemPool& pItem )
160 {
161 	return pDlg->GetInputRanges( pItem );
162 }
163 
164 void AbstractTabDialog_Impl::SetInputSet( const SfxItemSet* pInSet )
165 {
166 	 pDlg->SetInputSet( pInSet );
167 }
168 //From class Window.
169 void AbstractTabDialog_Impl::SetText( const XubString& rStr )
170 {
171 	pDlg->SetText( rStr );
172 }
173 String AbstractTabDialog_Impl::GetText() const
174 {
175 	return pDlg->GetText();
176 }
177 
178 //add for AbstractTabDialog_Impl end
179 
180 void    AbstractSwWordCountDialog_Impl::SetValues(const SwDocStat& rCurrent, const SwDocStat& rDoc)
181 {
182     pDlg->SetValues(rCurrent, rDoc);
183 }
184 
185 //add for SwInsertAbstractDlg begin
186 sal_uInt8 AbstractSwInsertAbstractDlg_Impl::GetLevel() const
187 {
188 	return pDlg->GetLevel();
189 }
190 sal_uInt8 AbstractSwInsertAbstractDlg_Impl::GetPara() const
191 {
192 	return pDlg->GetPara();
193 }
194 //add for SwInsertAbstractDlg end
195 
196 //add for SwAddrDlg, SwDropCapsDlg ,SwBackgroundDlg, SwNumFmtDlg SwBorderDlg SwWrapDlg  SwFldEditDlg begin
197 const SfxItemSet* AbstractSfxDialog_Impl::GetOutputItemSet() const
198 {
199 	return pDlg->GetOutputItemSet();
200 }
201 
202 void AbstractSfxDialog_Impl::SetText( const XubString& rStr )
203 {
204 	pDlg->SetText( rStr );
205 }
206 String AbstractSfxDialog_Impl::GetText() const
207 {
208 	return pDlg->GetText();
209 }
210 
211 //add for SwAddrDlg, SwDropCapsDlg ,SwBackgroundDlg, SwNumFmtDlg SwBorderDlg SwWrapDlg SwFldEditDlg  end
212 
213 //add for SwAsciiFilterDlg begin
214 void AbstractSwAsciiFilterDlg_Impl::FillOptions( SwAsciiOptions& rOptions )
215 {
216 	pDlg->FillOptions(rOptions);
217 }
218 //add for SwAsciiFilterDlg end
219 
220 //add for SwSplitTblDlg
221 sal_uInt16 AbstractSplitTableDialog_Impl::GetSplitMode()
222 {
223     return pDlg->GetSplitMode();
224 }
225 //add for SwBreakDlg begin
226 String AbstractSwBreakDlg_Impl::GetTemplateName()
227 {
228 	return pDlg->GetTemplateName();
229 }
230 
231 sal_uInt16 AbstractSwBreakDlg_Impl:: GetKind()
232 {
233 	return pDlg->GetKind();
234 }
235 
236 sal_uInt16 AbstractSwBreakDlg_Impl:: GetPageNumber()
237 {
238 	return pDlg->GetPageNumber();
239 }
240 //add for SwBreakDlg end
241 
242 //add for SwConvertTableDlg begin
243 void AbstractSwConvertTableDlg_Impl::GetValues( sal_Unicode& rDelim,SwInsertTableOptions& rInsTblFlags,
244 												SwTableAutoFmt *& prTAFmt )
245 {
246 	pDlg->GetValues(rDelim,rInsTblFlags, prTAFmt);
247 }
248 //add for SwConvertTableDlg end
249 
250 //add for SwInsertDBColAutoPilot begin
251 void AbstractSwInsertDBColAutoPilot_Impl::DataToDoc( const uno::Sequence< uno::Any >& rSelection,
252         uno::Reference< sdbc::XDataSource> rxSource,
253         uno::Reference< sdbc::XConnection> xConnection,
254         uno::Reference< sdbc::XResultSet > xResultSet)
255 {
256 	pDlg->DataToDoc(rSelection, rxSource, xConnection, xResultSet);
257 }
258 //add for SwInsertDBColAutoPilot end
259 
260 // add for DropDownFieldDialog begin
261 ByteString      AbstractDropDownFieldDialog_Impl::GetWindowState( sal_uLong nMask  ) const
262 {
263 	return pDlg->GetWindowState(nMask);
264 }
265 void       AbstractDropDownFieldDialog_Impl::SetWindowState( const ByteString& rStr )
266 {
267 	pDlg->SetWindowState(rStr);
268 }
269 //add for DropDownFieldDialog end
270 
271 //add for SwLabDlg begin
272 
273 void AbstarctSwLabDlg_Impl::SetCurPageId( sal_uInt16 nId )
274 {
275 	pDlg->SetCurPageId( nId );
276 }
277 
278 const SfxItemSet* AbstarctSwLabDlg_Impl::GetOutputItemSet() const
279 {
280 	return pDlg->GetOutputItemSet();
281 }
282 
283 const sal_uInt16* AbstarctSwLabDlg_Impl::GetInputRanges(const SfxItemPool& pItem )
284 {
285 	return pDlg->GetInputRanges( pItem );
286 }
287 
288 void AbstarctSwLabDlg_Impl::SetInputSet( const SfxItemSet* pInSet )
289 {
290 	 pDlg->SetInputSet( pInSet );
291 }
292 
293 void AbstarctSwLabDlg_Impl::SetText( const XubString& rStr )
294 {
295 	pDlg->SetText( rStr );
296 }
297 String AbstarctSwLabDlg_Impl::GetText() const
298 {
299 	return pDlg->GetText();
300 }
301 const String& AbstarctSwLabDlg_Impl::GetBusinessCardStr() const
302 {
303 	return pDlg->GetBusinessCardStr();
304 }
305 Printer * AbstarctSwLabDlg_Impl::GetPrt()
306 {
307 	return pDlg->GetPrt();
308 }
309 //add for SwLabDlg end
310 
311 
312 //add for SwSelGlossaryDlg begin
313 
314 void AbstarctSwSelGlossaryDlg_Impl::InsertGlos(const String &rRegion, const String &rGlosName)
315 {
316 	pDlg->InsertGlos( rRegion, rGlosName );
317 }
318 sal_uInt16 AbstarctSwSelGlossaryDlg_Impl::GetSelectedIdx() const
319 {
320 	return pDlg->GetSelectedIdx();
321 }
322 void AbstarctSwSelGlossaryDlg_Impl::SelectEntryPos(sal_uInt16 nIdx)
323 {
324 	pDlg->SelectEntryPos( nIdx );
325 }
326 
327 //add for SwSelGlossaryDlg end
328 
329 //add for SwAutoFormatDlg begin
330 
331 void AbstractSwAutoFormatDlg_Impl::FillAutoFmtOfIndex( SwTableAutoFmt*& rToFill ) const
332 {
333 	pDlg->FillAutoFmtOfIndex(rToFill);
334 }
335 //add for SwAutoFormatDlg end
336 
337 //add for SwFldDlg begin
338 void AbstractSwFldDlg_Impl::SetCurPageId( sal_uInt16 nId )
339 {
340 	pDlg->SetCurPageId( nId );
341 }
342 
343 const SfxItemSet* AbstractSwFldDlg_Impl::GetOutputItemSet() const
344 {
345 	return pDlg->GetOutputItemSet();
346 }
347 
348 const sal_uInt16* AbstractSwFldDlg_Impl::GetInputRanges(const SfxItemPool& pItem )
349 {
350 	return pDlg->GetInputRanges( pItem );
351 }
352 
353 void AbstractSwFldDlg_Impl::SetInputSet( const SfxItemSet* pInSet )
354 {
355 	 pDlg->SetInputSet( pInSet );
356 }
357 
358 void AbstractSwFldDlg_Impl::SetText( const XubString& rStr )
359 {
360 	pDlg->SetText( rStr );
361 }
362 String AbstractSwFldDlg_Impl::GetText() const
363 {
364 	return pDlg->GetText();
365 }
366 void AbstractSwFldDlg_Impl::Start( sal_Bool bShowl )
367 {
368 	pDlg->Start( bShowl );
369 }
370 
371 void AbstractSwFldDlg_Impl::Initialize(SfxChildWinInfo *pInfo)
372 {
373 	pDlg->Initialize( pInfo );
374 }
375 
376 void AbstractSwFldDlg_Impl::ReInitDlg()
377 {
378 	pDlg->ReInitDlg();
379 }
380 void AbstractSwFldDlg_Impl::ActivateDatabasePage()
381 {
382 	pDlg->ActivateDatabasePage();
383 }
384 Window* AbstractSwFldDlg_Impl::GetWindow()
385 {
386 	return (Window*)pDlg;
387 }
388 void	AbstractSwFldDlg_Impl::ShowPage( sal_uInt16 nId )
389 {
390 	pDlg->ShowPage(nId);
391 }
392 //add for SwFldD end
393 
394 //add for SwRenameXNamedDlg begin
395 
396 void AbstractSwRenameXNamedDlg_Impl::SetForbiddenChars( const String& rSet )
397 {
398 	pDlg->SetForbiddenChars( rSet );
399 }
400 
401 void	AbstractSwRenameXNamedDlg_Impl::SetAlternativeAccess(
402 			 STAR_REFERENCE( container::XNameAccess ) & xSecond,
403 			 STAR_REFERENCE( container::XNameAccess ) & xThird )
404 {
405 	pDlg->SetAlternativeAccess( xSecond, xThird);
406 }
407 //add for SwRenameXNamedDlg end
408 
409 //add for SwModalRedlineAcceptDlg begin
410 
411 void	AbstractSwModalRedlineAcceptDlg_Impl::AcceptAll( sal_Bool bAccept )
412 {
413 	pDlg->AcceptAll( bAccept);
414 }
415 //add for SwModalRedlineAcceptDlg end
416 
417 // AbstractGlossaryDlg_Impl begin
418 String AbstractGlossaryDlg_Impl::GetCurrGrpName() const
419 {
420 	return pDlg->GetCurrGrpName();
421 }
422 
423 String AbstractGlossaryDlg_Impl::GetCurrShortName() const
424 {
425 	return pDlg->GetCurrShortName();
426 }
427 // AbstractGlossaryDlg_Impl end
428 
429 // AbstractFldInputDlg_Impl begin
430 void AbstractFldInputDlg_Impl::SetWindowState( const ByteString& rStr )
431 {
432 	pDlg->SetWindowState( rStr );
433 }
434 
435 ByteString AbstractFldInputDlg_Impl::GetWindowState( sal_uLong nMask ) const
436 {
437 	return pDlg->GetWindowState( nMask );
438 }
439 // AbstractFldInputDlg_Impl end
440 
441 // AbstractInsFootNoteDlg_Impl begin
442 String AbstractInsFootNoteDlg_Impl::GetFontName()
443 {
444 	return pDlg->GetFontName();
445 }
446 sal_Bool AbstractInsFootNoteDlg_Impl::IsEndNote()
447 {
448 	return pDlg->IsEndNote();
449 }
450 String AbstractInsFootNoteDlg_Impl::GetStr()
451 {
452 	return pDlg->GetStr();
453 }
454 void AbstractInsFootNoteDlg_Impl::SetHelpId( const rtl::OString& sHelpId )
455 {
456 	pDlg->SetHelpId( sHelpId );
457 }
458 void AbstractInsFootNoteDlg_Impl::SetText( const XubString& rStr )
459 {
460 	pDlg->SetText( rStr );
461 }
462 // AbstractInsFootNoteDlg_Impl end
463 
464 // AbstractInsertGrfRulerDlg_Impl begin
465 String AbstractInsertGrfRulerDlg_Impl::GetGraphicName()
466 {
467 	return pDlg->GetGraphicName();
468 }
469 sal_Bool AbstractInsertGrfRulerDlg_Impl::IsSimpleLine()
470 {
471 	return pDlg->IsSimpleLine();
472 }
473 sal_Bool AbstractInsertGrfRulerDlg_Impl::HasImages() const
474 {
475 	return pDlg->HasImages();
476 }
477 // AbstractInsertGrfRulerDlg_Impl end
478 
479 // AbstractInsTableDlg_Impl begin
480 void AbstractInsTableDlg_Impl::GetValues( String& rName, sal_uInt16& rRow, sal_uInt16& rCol,
481 								SwInsertTableOptions& rInsTblFlags, String& rTableAutoFmtName,
482 								SwTableAutoFmt *& prTAFmt )
483 {
484 	pDlg->GetValues( rName, rRow, rCol,	rInsTblFlags, rTableAutoFmtName, prTAFmt);
485 }
486 // AbstractInsTableDlg_Impl end
487 
488 // AbstractJavaEditDialog_Impl begin
489 String AbstractJavaEditDialog_Impl::GetText()
490 {
491 	return pDlg->GetText();
492 }
493 String AbstractJavaEditDialog_Impl::GetType()
494 {
495 	return pDlg->GetType();
496 }
497 sal_Bool AbstractJavaEditDialog_Impl::IsUrl()
498 {
499 	return pDlg->IsUrl();
500 }
501 sal_Bool AbstractJavaEditDialog_Impl::IsNew()
502 {
503 	return pDlg->IsNew();
504 }
505 sal_Bool AbstractJavaEditDialog_Impl::IsUpdate()
506 {
507 	return pDlg->IsUpdate();
508 }
509 // AbstractJavaEditDialog_Impl end
510 
511 // AbstractMailMergeDlg_Impl begin
512 sal_uInt16 AbstractMailMergeDlg_Impl::GetMergeType()
513 {
514 	return pDlg->GetMergeType();
515 }
516 const ::rtl::OUString& AbstractMailMergeDlg_Impl::GetSaveFilter() const
517 {
518     return pDlg->GetSaveFilter();
519 }
520 
521 const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > AbstractMailMergeDlg_Impl::GetSelection() const
522 {
523 	return pDlg->GetSelection();
524 }
525 uno::Reference< sdbc::XResultSet> AbstractMailMergeDlg_Impl::GetResultSet() const
526 {
527 	return pDlg->GetResultSet();
528 }
529 bool AbstractMailMergeDlg_Impl::IsSaveIndividualDocs() const
530 {
531     return pDlg->IsSaveIndividualDocs();
532 }
533 bool AbstractMailMergeDlg_Impl::IsGenerateFromDataBase() const
534 {
535     return pDlg->IsGenerateFromDataBase();
536 }
537 String AbstractMailMergeDlg_Impl::GetColumnName() const
538 {
539     return pDlg->GetColumnName();
540 }
541 String AbstractMailMergeDlg_Impl::GetPath() const
542 {
543     return pDlg->GetPath();
544 }
545 
546 // AbstractMailMergeDlg_Impl end
547 // AbstractMailMergeCreateFromDlg_Impl begin
548 sal_Bool AbstractMailMergeCreateFromDlg_Impl::IsThisDocument() const
549 {
550 	return pDlg->IsThisDocument();
551 }
552 // AbstractMailMergeCreateFromDlg_Impl end
553 //AbstractMailMergeFieldConnectionsDlg_Impl begin
554 sal_Bool AbstractMailMergeFieldConnectionsDlg_Impl::IsUseExistingConnections() const
555 {
556 	return pDlg->IsUseExistingConnections();
557 }
558 // AbstractMailMergeFieldConnectionsDlg_Impl end
559 
560 // AbstractMultiTOXTabDialog_Impl begin
561 SwForm* AbstractMultiTOXTabDialog_Impl::GetForm(CurTOXType eType)
562 {
563 	return pDlg->GetForm(eType);
564 }
565 CurTOXType AbstractMultiTOXTabDialog_Impl::GetCurrentTOXType() const
566 {
567 	return pDlg->GetCurrentTOXType();
568 }
569 SwTOXDescription& AbstractMultiTOXTabDialog_Impl::GetTOXDescription(CurTOXType eTOXTypes)
570 {
571 	return pDlg->GetTOXDescription(eTOXTypes);
572 }
573 const SfxItemSet* AbstractMultiTOXTabDialog_Impl::GetOutputItemSet() const
574 {
575 	return pDlg->GetOutputItemSet();
576 }
577 // AbstractMultiTOXTabDialog_Impl end
578 
579 // AbstractEditRegionDlg_Impl begin
580 void AbstractEditRegionDlg_Impl::SelectSection(const String& rSectionName)
581 {
582 	pDlg->SelectSection(rSectionName);
583 }
584 // AbstractEditRegionDlg_Impl end
585 //AbstractInsertSectionTabDialog_Impl begin
586 void
587 AbstractInsertSectionTabDialog_Impl::SetSectionData(SwSectionData const& rSect)
588 {
589     pDlg->SetSectionData(rSect);
590 }
591 // AbstractInsertSectionTabDialog_Impl end
592 
593 //AbstractIndexMarkFloatDlg_Impl begin
594 void AbstractIndexMarkFloatDlg_Impl::ReInitDlg(SwWrtShell& rWrtShell)
595 {
596 	pDlg->ReInitDlg( rWrtShell);
597 }
598 Window* AbstractIndexMarkFloatDlg_Impl::GetWindow()
599 {
600 	return (Window*)pDlg;
601 }
602 // AbstractIndexMarkFloatDlg_Impl end
603 
604 //AbstractAuthMarkFloatDlg_Impl begin
605 void AbstractAuthMarkFloatDlg_Impl::ReInitDlg(SwWrtShell& rWrtShell)
606 {
607 	pDlg->ReInitDlg( rWrtShell);
608 }
609 Window* AbstractAuthMarkFloatDlg_Impl::GetWindow()
610 {
611 	return (Window*)pDlg;
612 }
613 // AbstractAuthMarkFloatDlg_Impl end
614 
615 AbstractMailMergeWizard_Impl::~AbstractMailMergeWizard_Impl()
616 {
617     delete pDlg;
618 }
619 
620 void AbstractMailMergeWizard_Impl::StartExecuteModal( const Link& rEndDialogHdl )
621 {
622     aEndDlgHdl = rEndDialogHdl;
623     pDlg->StartExecuteModal(
624         LINK( this, AbstractMailMergeWizard_Impl, EndDialogHdl ) );
625 }
626 
627 long AbstractMailMergeWizard_Impl::GetResult()
628 {
629     return pDlg->GetResult();
630 }
631 
632 #ifdef DBG_UTIL
633 IMPL_LINK( AbstractMailMergeWizard_Impl, EndDialogHdl, SwMailMergeWizard*, pDialog )
634 #else
635 IMPL_LINK( AbstractMailMergeWizard_Impl, EndDialogHdl, SwMailMergeWizard*, EMPTYARG )
636 #endif
637 {
638     DBG_ASSERT( pDialog == pDlg, "wrong dialog passed to EndDialogHdl!" );
639 
640     aEndDlgHdl.Call( this );
641     aEndDlgHdl = Link();
642 
643     return 0L;
644 }
645 
646 void AbstractMailMergeWizard_Impl::SetReloadDocument(const String& rURL)
647 {
648     pDlg->SetReloadDocument(rURL);
649 }
650 const String&       AbstractMailMergeWizard_Impl::GetReloadDocument() const
651 {
652     return pDlg->GetReloadDocument();
653 }
654 sal_Bool AbstractMailMergeWizard_Impl::ShowPage( sal_uInt16 nLevel )
655 {
656     return pDlg->skipUntil(nLevel);
657 }
658 sal_uInt16 AbstractMailMergeWizard_Impl::GetRestartPage() const
659 {
660     return pDlg->GetRestartPage();
661 }
662 
663 //-------------- SwAbstractDialogFactory implementation--------------
664 
665 AbstractSwWordCountDialog* SwAbstractDialogFactory_Impl::CreateSwWordCountDialog(Window* pParent)
666 {
667     SwWordCountDialog* pDlg = new SwWordCountDialog( pParent );
668     return new AbstractSwWordCountDialog_Impl( pDlg );
669 }
670 
671 //add for SwInsertAbstractDlg begin
672 AbstractSwInsertAbstractDlg * SwAbstractDialogFactory_Impl::CreateSwInsertAbstractDlg( Window* pParent,
673 																					  int nResId )
674 {
675 	SwInsertAbstractDlg* pDlg=NULL;
676 	switch ( nResId )
677 	{
678 		case DLG_INSERT_ABSTRACT :
679 			pDlg = new SwInsertAbstractDlg( pParent);
680 			break;
681 		default:
682 			break;
683 	}
684 
685 	if ( pDlg )
686 		return new AbstractSwInsertAbstractDlg_Impl( pDlg );
687 	return 0;
688 }
689 //add for SwInsertAbstractDlg end
690 
691 SfxAbstractDialog* SwAbstractDialogFactory_Impl::CreateSfxDialog( Window* pParent,
692 																		const SfxItemSet& rSet,
693 									const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >&,
694 																		sal_uInt32 nResId
695 																)
696 {
697 	SfxModalDialog* pDlg=NULL;
698 	switch ( nResId )
699 	{
700 		case RC_DLG_ADDR :
701 			pDlg = new SwAddrDlg( pParent, rSet );
702 			break;
703 		case DLG_SWDROPCAPS :
704 			pDlg = new SwDropCapsDlg( pParent, rSet );
705 			break;
706 		case RC_SWDLG_BACKGROUND :
707 			pDlg = new SwBackgroundDlg( pParent, rSet );
708 			break;
709 		case RC_DLG_SWNUMFMTDLG :
710 			pDlg = new SwNumFmtDlg( pParent, rSet );
711 			break;
712 		default:
713 			break;
714 	}
715 
716 	if ( pDlg )
717 		return new AbstractSfxDialog_Impl( pDlg );
718 	return 0;
719 }
720 
721 // add for SwAsciiFilterDlg begin
722 AbstractSwAsciiFilterDlg* SwAbstractDialogFactory_Impl::CreateSwAsciiFilterDlg( Window* pParent,
723 																			   SwDocShell& rDocSh,
724 																				SvStream* pStream,
725                                                                                 int nResId )
726 {
727 	SwAsciiFilterDlg* pDlg=NULL;
728 	switch ( nResId )
729 	{
730 		case DLG_ASCII_FILTER :
731 			pDlg = new SwAsciiFilterDlg( pParent, rDocSh, pStream );
732 			break;
733 
734 		default:
735 			break;
736 	}
737 
738 	if ( pDlg )
739 		return new AbstractSwAsciiFilterDlg_Impl( pDlg );
740 	return 0;
741 }
742 
743 //add for SwAsciiFilterDlg end
744 
745 // add for SwInsertBookmarkDlg begin
746 VclAbstractDialog* SwAbstractDialogFactory_Impl::CreateSwInsertBookmarkDlg( Window *pParent,
747 																		   SwWrtShell &rSh,
748 																		   SfxRequest& rReq,
749 																		   int nResId )
750 {
751 	Dialog* pDlg=NULL;
752 	switch ( nResId )
753 	{
754 		case DLG_INSERT_BOOKMARK :
755 			pDlg = new SwInsertBookmarkDlg( pParent, rSh, rReq );
756 			break;
757 
758 		default:
759 			break;
760 	}
761 
762 	if ( pDlg )
763 		return new VclAbstractDialog_Impl( pDlg );
764 	return 0;
765 }
766 
767 //add for SwInsertBookmarkDlg end
768 
769 //add for SwBreakDlg begin
770 
771 AbstractSwBreakDlg * SwAbstractDialogFactory_Impl::CreateSwBreakDlg ( Window *pParent,
772 																	 SwWrtShell &rSh,
773 																	 int nResId )
774 {
775 	SwBreakDlg* pDlg=NULL;
776 	switch ( nResId )
777 	{
778 		case DLG_BREAK :
779 			pDlg = new SwBreakDlg( pParent, rSh );
780 			break;
781 
782 		default:
783 			break;
784 	}
785 
786 	if ( pDlg )
787 		return new AbstractSwBreakDlg_Impl( pDlg );
788 	return 0;
789 }
790 //add for SwBreakDlg end
791 
792 // add for SwChangeDBDlg begin
793 VclAbstractDialog	* SwAbstractDialogFactory_Impl::CreateSwChangeDBDlg( SwView& rVw, int nResId  )
794 {
795 	Dialog* pDlg=NULL;
796 	switch ( nResId )
797 	{
798 		case DLG_CHANGE_DB :
799 			pDlg = new SwChangeDBDlg( rVw );
800 			break;
801 
802 		default:
803 			break;
804 	}
805 
806 	if ( pDlg )
807 		return new VclAbstractDialog_Impl( pDlg );
808 	return 0;
809 }
810 
811 // add for SwChangeDBDlg end
812 
813 // add for SwCharDlg begin
814 SfxAbstractTabDialog *  SwAbstractDialogFactory_Impl::CreateSwCharDlg(Window* pParent, SwView& pVw, const SfxItemSet& rCoreSet, int nResId, // add for SwCharDlg
815 												const String* pFmtStr , sal_Bool bIsDrwTxtDlg )
816 {
817 
818 	SfxTabDialog* pDlg=NULL;
819 	switch ( nResId )
820 	{
821 		case DLG_CHAR :
822 			pDlg = new SwCharDlg( pParent, pVw, rCoreSet, pFmtStr, bIsDrwTxtDlg );
823 			break;
824 		default:
825 			break;
826 	}
827 
828 	if ( pDlg )
829 		return new AbstractTabDialog_Impl( pDlg );
830 	return 0;
831 
832 }
833 // add for SwCharDlg end
834 
835 //add for SwConvertTableDlg begin
836 AbstractSwConvertTableDlg* SwAbstractDialogFactory_Impl::CreateSwConvertTableDlg (
837                                     SwView& rView,int nResId, bool bToTable )
838 {
839 	SwConvertTableDlg* pDlg=NULL;
840 	switch ( nResId )
841 	{
842 		case DLG_CONV_TEXT_TABLE :
843 			pDlg = new SwConvertTableDlg( rView, bToTable );
844 			break;
845 		default:
846 			break;
847 	}
848 
849 	if ( pDlg )
850 		return new AbstractSwConvertTableDlg_Impl( pDlg );
851 	return 0;
852 }
853 
854 //add for  SwConvertTableDlg end
855 
856 //add for SwCaptionDialog begin
857 VclAbstractDialog * SwAbstractDialogFactory_Impl::CreateSwCaptionDialog ( Window *pParent, SwView &rV,int nResId)
858 {
859 	Dialog* pDlg=NULL;
860 	switch ( nResId )
861 	{
862 		case DLG_CAPTION :
863 			pDlg = new SwCaptionDialog( pParent, rV );
864 			break;
865 
866 		default:
867 			break;
868 	}
869 
870 	if ( pDlg )
871 		return new VclAbstractDialog_Impl( pDlg );
872 	return 0;
873 }
874 //add for SwCaptionDialog end
875 
876 //add for  SwInsertDBColAutoPilot begin
877 
878 AbstractSwInsertDBColAutoPilot* SwAbstractDialogFactory_Impl::CreateSwInsertDBColAutoPilot( SwView& rView, // add for SwInsertDBColAutoPilot
879         uno::Reference< sdbc::XDataSource> rxSource,
880         uno::Reference<sdbcx::XColumnsSupplier> xColSupp,
881 		const SwDBData& rData,  int nResId)
882 {
883 	SwInsertDBColAutoPilot* pDlg=NULL;
884 	switch ( nResId )
885 	{
886 		case DLG_AP_INSERT_DB_SEL :
887 			pDlg = new SwInsertDBColAutoPilot( rView, rxSource, xColSupp, rData );
888 			break;
889 
890 		default:
891 			break;
892 	}
893 
894 	if ( pDlg )
895 		return new AbstractSwInsertDBColAutoPilot_Impl( pDlg );
896 	return 0;
897 }
898 //add for  SwInsertDBColAutoPilot end
899 //add for  SwFootNoteOptionDlg begin
900 SfxAbstractTabDialog *  SwAbstractDialogFactory_Impl::CreateSwFootNoteOptionDlg( Window *pParent, SwWrtShell &rSh,int nResId)
901 {
902 	SfxTabDialog* pDlg=NULL;
903 	switch ( nResId )
904 	{
905 		case DLG_DOC_FOOTNOTE :
906 			pDlg = new SwFootNoteOptionDlg( pParent, rSh );
907 			break;
908 
909 		default:
910 			break;
911 	}
912 
913 	if ( pDlg )
914 		return new AbstractTabDialog_Impl( pDlg );
915 	return 0;
916 }
917 //add for  SwFootNoteOptionDlg begin
918 
919 
920 //add for DropDownFieldDialog begin
921 
922 AbstractDropDownFieldDialog *  SwAbstractDialogFactory_Impl::CreateDropDownFieldDialog ( Window *pParent, SwWrtShell &rSh, //add for DropDownFieldDialog
923                                 SwField* pField,int nResId, sal_Bool bNextButton )
924 {
925 	sw::DropDownFieldDialog* pDlg=NULL;
926 	switch ( nResId )
927 	{
928 		case DLG_FLD_DROPDOWN :
929 			pDlg = new sw::DropDownFieldDialog( pParent, rSh, pField, bNextButton );
930 			break;
931 
932 		default:
933 			break;
934 	}
935 
936 	if ( pDlg )
937 		return new AbstractDropDownFieldDialog_Impl( pDlg );
938 	return 0;
939 }
940 //add for DropDownFieldDialog end
941 
942 //add for SwEnvDlg begin
943 SfxAbstractTabDialog* SwAbstractDialogFactory_Impl::CreateSwEnvDlg ( Window* pParent, const SfxItemSet& rSet,
944 																 SwWrtShell* pWrtSh, Printer* pPrt,
945 																 sal_Bool bInsert,int nResId ) //add for SwEnvDlg
946 {
947 	SfxTabDialog* pDlg=NULL;
948 	switch ( nResId )
949 	{
950 		case DLG_ENV :
951 			pDlg = new SwEnvDlg( pParent, rSet, pWrtSh,pPrt, bInsert  );
952 			break;
953 
954 		default:
955 			break;
956 	}
957 
958 	if ( pDlg )
959 		return new AbstractTabDialog_Impl( pDlg );
960 	return 0;
961 }
962 //add for SwEnvDlg end
963 
964 //add for SwLabDlg begin
965 
966 AbstarctSwLabDlg* SwAbstractDialogFactory_Impl::CreateSwLabDlg ( Window* pParent, const SfxItemSet& rSet, //add for SwLabDlg
967 	 												SwNewDBMgr* pNewDBMgr, sal_Bool bLabel,int nResId  )
968 {
969 	SwLabDlg* pDlg=NULL;
970 	switch ( nResId )
971 	{
972 		case DLG_LAB :
973 			pDlg = new SwLabDlg( pParent, rSet, pNewDBMgr,bLabel  );
974 			break;
975 
976 		default:
977 			break;
978 	}
979 
980 	if ( pDlg )
981 		return new AbstarctSwLabDlg_Impl( pDlg );
982 	return 0;
983 }
984 
985 SwLabDlgMethod SwAbstractDialogFactory_Impl::GetSwLabDlgStaticMethod ()
986 {
987 	return SwLabDlg::UpdateFieldInformation;
988 }
989 
990 //add for SwLabDlg end
991 
992 //add for SwParaDlg begin
993 SfxAbstractTabDialog* SwAbstractDialogFactory_Impl::CreateSwParaDlg ( Window *pParent, SwView& rVw,
994 													const SfxItemSet& rCoreSet	,
995 													sal_uInt8 nDialogMode,
996 													int nResId,
997 													const String *pCollName,
998 													sal_Bool bDraw , sal_uInt16 nDefPage)
999 {
1000 	SfxTabDialog* pDlg=NULL;
1001 	switch ( nResId )
1002 	{
1003 		case DLG_DRAWPARA :
1004 		case DLG_PARA :
1005 			pDlg = new SwParaDlg( pParent, rVw, rCoreSet,nDialogMode, pCollName, bDraw, nDefPage );
1006 			break;
1007 
1008 		default:
1009 			break;
1010 	}
1011 
1012 	if ( pDlg )
1013 		return new AbstractTabDialog_Impl( pDlg );
1014 	return 0;
1015 }
1016 //add for SwParaDlg end
1017 
1018 //add for SwTableHeightDlg SwSortDlg   begin
1019 VclAbstractDialog * SwAbstractDialogFactory_Impl::CreateVclAbstractDialog ( Window *pParent, SwWrtShell &rSh, int nResId )
1020 {
1021 	Dialog* pDlg=NULL;
1022 	switch ( nResId )
1023 	{
1024 		case DLG_ROW_HEIGHT :
1025 			pDlg = new SwTableHeightDlg( pParent, rSh);
1026 			break;
1027 
1028 		case DLG_SORTING :
1029 			pDlg = new SwSortDlg( pParent, rSh);
1030 			break;
1031 		case DLG_COLUMN :
1032 			pDlg = new SwColumnDlg( pParent, rSh );
1033 			break;
1034 		case DLG_EDIT_AUTHMARK :
1035 			pDlg = new SwAuthMarkModalDlg( pParent, rSh );
1036 			break;
1037 		default:
1038 			break;
1039 	}
1040 
1041 	if ( pDlg )
1042 		return new VclAbstractDialog_Impl( pDlg );
1043 	return 0;
1044 }
1045 //add for SwTableHeightDlg SwSortDlg ,end
1046 //add for SwSplitTblDlg  begin
1047 AbstractSplitTableDialog * SwAbstractDialogFactory_Impl::CreateSplitTblDialog ( Window *pParent, SwWrtShell &rSh )
1048 {
1049     return new AbstractSplitTableDialog_Impl( new SwSplitTblDlg( pParent, rSh) );
1050 }
1051 //add SwSplitTblDlg end
1052 
1053 //add for SwSelGlossaryDlg begin
1054 AbstarctSwSelGlossaryDlg * SwAbstractDialogFactory_Impl::CreateSwSelGlossaryDlg ( Window * pParent, const String &rShortName, int nResId )
1055 {
1056 	SwSelGlossaryDlg* pDlg=NULL;
1057 	switch ( nResId )
1058 	{
1059 		case DLG_SEL_GLOS :
1060 			pDlg = new SwSelGlossaryDlg( pParent, rShortName);
1061 			break;
1062 
1063 		default:
1064 			break;
1065 	}
1066 
1067 	if ( pDlg )
1068 		return new AbstarctSwSelGlossaryDlg_Impl( pDlg );
1069 	return 0;
1070 }
1071 
1072 //add for SwSelGlossaryDlg end
1073 
1074 //add for SwAutoFormatDlg begin
1075 AbstractSwAutoFormatDlg * SwAbstractDialogFactory_Impl::CreateSwAutoFormatDlg( Window* pParent, SwWrtShell* pShell,
1076 																					int nResId,
1077 																					sal_Bool bSetAutoFmt,
1078 																					const SwTableAutoFmt* pSelFmt )
1079 {
1080 	SwAutoFormatDlg* pDlg=NULL;
1081 	switch ( nResId )
1082 	{
1083 		case DLG_AUTOFMT_TABLE :
1084 			pDlg = new SwAutoFormatDlg( pParent, pShell,bSetAutoFmt,pSelFmt);
1085 			break;
1086 
1087 		default:
1088 			break;
1089 	}
1090 
1091 	if ( pDlg )
1092 		return new AbstractSwAutoFormatDlg_Impl( pDlg );
1093 	return 0;
1094 }
1095 //add for SwAutoFormatDlg end
1096 
1097 //add for SwBorderDlg begin
1098 SfxAbstractDialog * SwAbstractDialogFactory_Impl::CreateSwBorderDlg (Window* pParent, SfxItemSet& rSet, sal_uInt16 nType,int nResId )
1099 {
1100 	SfxModalDialog* pDlg=NULL;
1101 	switch ( nResId )
1102 	{
1103 		case RC_DLG_SWBORDERDLG :
1104 			pDlg = new SwBorderDlg( pParent, rSet, nType );
1105 			break;
1106 		default:
1107 			break;
1108 	}
1109 
1110 	if ( pDlg )
1111 		return new AbstractSfxDialog_Impl( pDlg );
1112 	return 0;
1113 }
1114 //add for SwBorderDlg end
1115 
1116 //add for SwWrapDlg begin
1117 SfxAbstractDialog* SwAbstractDialogFactory_Impl::CreateSwWrapDlg ( Window* pParent, SfxItemSet& rSet, SwWrtShell* pSh, sal_Bool bDrawMode, int nResId )
1118 {
1119 	SfxModalDialog* pDlg=NULL;
1120 	switch ( nResId )
1121 	{
1122 		case RC_DLG_SWWRAPDLG :
1123 			pDlg = new SwWrapDlg( pParent, rSet, pSh, bDrawMode );
1124 			break;
1125 		default:
1126 			break;
1127 	}
1128 
1129 	if ( pDlg )
1130 		return new AbstractSfxDialog_Impl( pDlg );
1131 	return 0;
1132 }
1133 //add for SwWrapDlg end
1134 
1135 //add for SwTableWidthDlg begin
1136 VclAbstractDialog * SwAbstractDialogFactory_Impl::CreateSwTableWidthDlg ( Window *pParent, SwTableFUNC &rFnc , int nResId )
1137 {
1138 	Dialog* pDlg=NULL;
1139 	switch ( nResId )
1140 	{
1141 		case DLG_COL_WIDTH :
1142 			pDlg = new SwTableWidthDlg( pParent, rFnc);
1143 			break;
1144 
1145 		default:
1146 			break;
1147 	}
1148 
1149 	if ( pDlg )
1150 		return new VclAbstractDialog_Impl( pDlg );
1151 	return 0;
1152 }
1153 //add for SwTableWidthDlg end
1154 
1155  //add for SwTableTabDlg begin
1156 SfxAbstractTabDialog* SwAbstractDialogFactory_Impl::CreateSwTableTabDlg( Window* pParent, SfxItemPool& Pool,
1157 														const SfxItemSet* pItemSet, SwWrtShell* pSh,int nResId )
1158 {
1159 	SfxTabDialog* pDlg=NULL;
1160 	switch ( nResId )
1161 	{
1162 		case DLG_FORMAT_TABLE :
1163 			pDlg = new SwTableTabDlg( pParent, Pool, pItemSet,pSh );
1164 			break;
1165 
1166 		default:
1167 			break;
1168 	}
1169 
1170 	if ( pDlg )
1171 		return new AbstractTabDialog_Impl( pDlg );
1172 	return 0;
1173 }
1174  //add for SwTableTabDlg end
1175 
1176 //add for SwFldDlg begin
1177 AbstractSwFldDlg * SwAbstractDialogFactory_Impl::CreateSwFldDlg ( SfxBindings* pB, SwChildWinWrapper* pCW, Window *pParent, int nResId )
1178 {
1179 	SwFldDlg* pDlg=NULL;
1180 	switch ( nResId )
1181 	{
1182 		case DLG_FLD_INSERT :
1183 			pDlg = new SwFldDlg( pB, pCW,pParent);
1184 			break;
1185 
1186 		default:
1187 			break;
1188 	}
1189 
1190 	if ( pDlg )
1191 		return new AbstractSwFldDlg_Impl( pDlg );
1192 	return 0;
1193 }
1194 //add for SwFldDlg end
1195 
1196 //add for SwFldEditDlg begin
1197 SfxAbstractDialog*	 SwAbstractDialogFactory_Impl::CreateSwFldEditDlg ( SwView& rVw, int nResId )
1198 {
1199 	SfxModalDialog* pDlg=NULL;
1200 	switch ( nResId )
1201 	{
1202 		case RC_DLG_SWFLDEDITDLG :
1203 			pDlg = new SwFldEditDlg( rVw );
1204 			break;
1205 		default:
1206 			break;
1207 	}
1208 
1209 	if ( pDlg )
1210 		return new AbstractSfxDialog_Impl( pDlg );
1211 	return 0;
1212 }
1213 //add for SwFldEditDlg
1214 
1215 //add for SwRenameXNamedDlg begin
1216 AbstractSwRenameXNamedDlg * SwAbstractDialogFactory_Impl::CreateSwRenameXNamedDlg( Window* pParent,
1217 																STAR_REFERENCE( container::XNamed ) & xNamed,
1218 																STAR_REFERENCE( container::XNameAccess ) & xNameAccess,int nResId )
1219 {
1220 	SwRenameXNamedDlg* pDlg=NULL;
1221 	switch ( nResId )
1222 	{
1223 		case DLG_RENAME_XNAMED :
1224 			pDlg = new SwRenameXNamedDlg( pParent,xNamed, xNameAccess);
1225 			break;
1226 		default:
1227 			break;
1228 	}
1229 
1230 	if ( pDlg )
1231 		return new AbstractSwRenameXNamedDlg_Impl( pDlg );
1232 	return 0;
1233 }
1234 
1235 //add for SwRenameXNamedDlg end
1236 
1237 //add for SwModalRedlineAcceptDlg begin
1238 AbstractSwModalRedlineAcceptDlg * SwAbstractDialogFactory_Impl::CreateSwModalRedlineAcceptDlg ( Window *pParent, int nResId )
1239 {
1240 	SwModalRedlineAcceptDlg* pDlg=NULL;
1241 	switch ( nResId )
1242 	{
1243 		case DLG_MOD_REDLINE_ACCEPT :
1244 			pDlg = new SwModalRedlineAcceptDlg( pParent );
1245 			break;
1246 		default:
1247 			break;
1248 	}
1249 
1250 	if ( pDlg )
1251 		return new AbstractSwModalRedlineAcceptDlg_Impl( pDlg );
1252 	return 0;
1253 }
1254 //add for SwModalRedlineAcceptDlg end
1255 
1256 VclAbstractDialog * SwAbstractDialogFactory_Impl::CreateSwVclDialog( int nResId,
1257 												Window* pParent, sal_Bool& rWithPrev ) //add for SwMergeTblDlg
1258 {
1259 	Dialog* pDlg=NULL;
1260 	switch ( nResId )
1261 	{
1262 		case DLG_MERGE_TABLE :
1263 			pDlg = new SwMergeTblDlg( pParent, rWithPrev );
1264 			break;
1265 		default:
1266 			break;
1267 	}
1268 	if ( pDlg )
1269 		return new VclAbstractDialog_Impl( pDlg );
1270 	return 0;
1271 }
1272 SfxAbstractTabDialog* SwAbstractDialogFactory_Impl::CreateFrmTabDialog( int nResId,
1273 												SfxViewFrame *pFrame, Window *pParent,
1274 												const SfxItemSet& rCoreSet,
1275 												sal_Bool			bNewFrm,
1276 												sal_uInt16			nResType,
1277 												sal_Bool			bFmt,
1278 												sal_uInt16			nDefPage,
1279 												const String* 	pFmtStr ) //add for SwFrmDlg
1280 {
1281 	SfxTabDialog* pDlg=NULL;
1282 	switch ( nResId )
1283 	{
1284 		case DLG_FRM_GRF :
1285 		case DLG_FRM_OLE :
1286 		case DLG_FRM_STD :
1287 			pDlg = new SwFrmDlg( pFrame, pParent, rCoreSet, bNewFrm, nResType, bFmt, nDefPage, pFmtStr );
1288 			break;
1289 		default:
1290 			break;
1291 	}
1292 
1293 	if ( pDlg )
1294 		return new AbstractTabDialog_Impl( pDlg );
1295 	return 0;
1296 }
1297 
1298 SfxAbstractTabDialog* SwAbstractDialogFactory_Impl::CreateTemplateDialog( int nResId,
1299 												Window*             pParent,
1300 												SfxStyleSheetBase&  rBase,
1301 												sal_uInt16              nRegion,
1302 												sal_Bool 				bColumn,
1303 												SwWrtShell* 		pActShell,
1304 												sal_Bool 				bNew ) //add for SwTemplateDlg
1305 {
1306 	SfxTabDialog* pDlg=NULL;
1307 	switch ( nResId )
1308 	{
1309 		case DLG_TEMPLATE_BASE :
1310 			pDlg = new SwTemplateDlg( pParent, rBase, nRegion, bColumn, pActShell, bNew );
1311 			break;
1312 		default:
1313 			break;
1314 	}
1315 
1316 	if ( pDlg )
1317 		return new AbstractTabDialog_Impl( pDlg );
1318 	return 0;
1319 }
1320 
1321 AbstractGlossaryDlg* SwAbstractDialogFactory_Impl::CreateGlossaryDlg( int nResId,
1322 												SfxViewFrame* pViewFrame,
1323 												SwGlossaryHdl* pGlosHdl,
1324 												SwWrtShell *pWrtShell) //add for SwGlossaryDlg
1325 {
1326 	SwGlossaryDlg* pDlg=NULL;
1327 	switch ( nResId )
1328 	{
1329 		case DLG_RENAME_GLOS :
1330 			pDlg = new SwGlossaryDlg( pViewFrame, pGlosHdl, pWrtShell );
1331 			break;
1332 		default:
1333 			break;
1334 	}
1335 	if ( pDlg )
1336 		return new AbstractGlossaryDlg_Impl( pDlg );
1337 	return 0;
1338 }
1339 
1340 AbstractFldInputDlg* SwAbstractDialogFactory_Impl::CreateFldInputDlg( int nResId,
1341 												Window *pParent, SwWrtShell &rSh,
1342 												SwField* pField, sal_Bool bNextButton ) //add for SwFldInputDlg
1343 {
1344 	SwFldInputDlg* pDlg=NULL;
1345 	switch ( nResId )
1346 	{
1347 		case DLG_FLD_INPUT :
1348 			pDlg = new SwFldInputDlg( pParent, rSh, pField, bNextButton );
1349 			break;
1350 		default:
1351 			break;
1352 	}
1353 	if ( pDlg )
1354 		return new AbstractFldInputDlg_Impl( pDlg );
1355 	return 0;
1356 }
1357 
1358 AbstractInsFootNoteDlg* SwAbstractDialogFactory_Impl::CreateInsFootNoteDlg( int nResId,
1359 												Window * pParent, SwWrtShell &rSh, sal_Bool bEd ) //add for SwInsFootNoteDlg
1360 {
1361 	SwInsFootNoteDlg* pDlg=NULL;
1362 	switch ( nResId )
1363 	{
1364 		case DLG_INS_FOOTNOTE :
1365 			pDlg = new SwInsFootNoteDlg( pParent, rSh, bEd );
1366 			break;
1367 		default:
1368 			break;
1369 	}
1370 	if ( pDlg )
1371 		return new AbstractInsFootNoteDlg_Impl( pDlg );
1372 	return 0;
1373 }
1374 
1375 VclAbstractDialog * SwAbstractDialogFactory_Impl::CreateVclSwViewDialog( int nResId,
1376 											SwView& rView, sal_Bool /*bCol*/ ) //add for SwInsRowColDlg, SwLineNumberingDlg
1377 {
1378 	Dialog* pDlg=NULL;
1379 	switch ( nResId )
1380 	{
1381 		case DLG_LINE_NUMBERING :
1382 			pDlg = new SwLineNumberingDlg( &rView );
1383 			break;
1384 		default:
1385 			break;
1386 	}
1387 
1388 	if ( pDlg )
1389 		return new VclAbstractDialog_Impl( pDlg );
1390 	return 0;
1391 }
1392 
1393 AbstractInsertGrfRulerDlg * SwAbstractDialogFactory_Impl::CreateInsertGrfRulerDlg( int nResId,
1394 											Window * pParent ) //add for SwInsertGrfRulerDlg
1395 {
1396 	SwInsertGrfRulerDlg* pDlg=NULL;
1397 	switch ( nResId )
1398 	{
1399 		case DLG_INSERT_RULER :
1400 			pDlg = new SwInsertGrfRulerDlg( pParent );
1401 			break;
1402 		default:
1403 			break;
1404 	}
1405 
1406 	if ( pDlg )
1407 		return new AbstractInsertGrfRulerDlg_Impl( pDlg );
1408 	return 0;
1409 }
1410 
1411 AbstractInsTableDlg * SwAbstractDialogFactory_Impl::CreateInsTableDlg( int nResId,
1412 											SwView& rView ) //add for SwInsTableDlg
1413 {
1414 	SwInsTableDlg* pDlg=NULL;
1415 	switch ( nResId )
1416 	{
1417 		case DLG_INSERT_TABLE :
1418 			pDlg = new SwInsTableDlg( rView );
1419 			break;
1420 		default:
1421 			break;
1422 	}
1423 	if ( pDlg )
1424 		return new AbstractInsTableDlg_Impl( pDlg );
1425 	return 0;
1426 }
1427 
1428 AbstractJavaEditDialog * SwAbstractDialogFactory_Impl::CreateJavaEditDialog( int nResId,
1429 												Window* pParent, SwWrtShell* pWrtSh ) //add for SwJavaEditDialog
1430 {
1431 	SwJavaEditDialog* pDlg=NULL;
1432 	switch ( nResId )
1433 	{
1434 		case DLG_JAVAEDIT :
1435 			pDlg = new SwJavaEditDialog( pParent, pWrtSh );
1436 			break;
1437 		default:
1438 			break;
1439 	}
1440 	if ( pDlg )
1441 		return new AbstractJavaEditDialog_Impl( pDlg );
1442 	return 0;
1443 }
1444 
1445 AbstractMailMergeDlg * SwAbstractDialogFactory_Impl::CreateMailMergeDlg( int nResId,
1446 												Window* pParent, SwWrtShell& rSh,
1447 	 											const String& rSourceName,
1448 												const String& rTblName,
1449 												sal_Int32 nCommandType,
1450                                                 const uno::Reference< sdbc::XConnection>& xConnection,
1451                                                 uno::Sequence< uno::Any >* pSelection ) //add for SwMailMergeDlg
1452 {
1453 	SwMailMergeDlg* pDlg=NULL;
1454 	switch ( nResId )
1455 	{
1456 		case DLG_MAILMERGE :
1457 			pDlg = new SwMailMergeDlg( pParent, rSh, rSourceName, rTblName, nCommandType, xConnection, pSelection );
1458 			break;
1459 		default:
1460 			break;
1461 	}
1462 	if ( pDlg )
1463 		return new AbstractMailMergeDlg_Impl( pDlg );
1464 	return 0;
1465 }
1466 AbstractMailMergeCreateFromDlg * SwAbstractDialogFactory_Impl::CreateMailMergeCreateFromDlg( int nResId,
1467 																	Window* pParent ) //add for SwMailMergeCreateFromDlg
1468 {
1469 	SwMailMergeCreateFromDlg* pDlg=NULL;
1470 	switch ( nResId )
1471 	{
1472 		case DLG_MERGE_CREATE :
1473 			pDlg = new SwMailMergeCreateFromDlg( pParent );
1474 			break;
1475 		default:
1476 			break;
1477 	}
1478 	if ( pDlg )
1479 		return new AbstractMailMergeCreateFromDlg_Impl( pDlg );
1480 	return 0;
1481 }
1482 AbstractMailMergeFieldConnectionsDlg * SwAbstractDialogFactory_Impl::CreateMailMergeFieldConnectionsDlg( int nResId,
1483 															Window* pParent ) //add for SwMailMergeFieldConnectionsDlg
1484 {
1485 	SwMailMergeFieldConnectionsDlg* pDlg=NULL;
1486 	switch ( nResId )
1487 	{
1488 		case DLG_MERGE_FIELD_CONNECTIONS :
1489 			pDlg = new SwMailMergeFieldConnectionsDlg( pParent );
1490 			break;
1491 		default:
1492 			break;
1493 	}
1494 	if ( pDlg )
1495 		return new AbstractMailMergeFieldConnectionsDlg_Impl( pDlg );
1496 	return 0;
1497 }
1498 
1499 VclAbstractDialog * SwAbstractDialogFactory_Impl::CreateMultiTOXMarkDlg( int nResId,
1500 												Window* pParent, SwTOXMgr &rTOXMgr ) //add for SwMultiTOXMarkDlg
1501 {
1502 	Dialog* pDlg=NULL;
1503 	switch ( nResId )
1504 	{
1505 		case DLG_MULTMRK :
1506 			pDlg = new SwMultiTOXMarkDlg( pParent, rTOXMgr );
1507 			break;
1508 		default:
1509 			break;
1510 	}
1511 	if ( pDlg )
1512 		return new VclAbstractDialog_Impl( pDlg );
1513 	return 0;
1514 }
1515 SfxAbstractTabDialog* SwAbstractDialogFactory_Impl::CreateSwTabDialog( int nResId,
1516 												Window* pParent,
1517 												const SfxItemSet* pSwItemSet,
1518 												SwWrtShell & rWrtSh ) //add for SwSvxNumBulletTabDialog, SwOutlineTabDialog
1519 {
1520 	SfxTabDialog* pDlg=NULL;
1521 	switch ( nResId )
1522 	{
1523 		case DLG_SVXTEST_NUM_BULLET :
1524 			pDlg = new SwSvxNumBulletTabDialog( pParent, pSwItemSet, rWrtSh );
1525 			break;
1526 		case DLG_TAB_OUTLINE :
1527 			pDlg = new SwOutlineTabDialog( pParent, pSwItemSet, rWrtSh );
1528 			break;
1529 
1530 		default:
1531 			break;
1532 	}
1533 	if ( pDlg )
1534 		return new AbstractTabDialog_Impl( pDlg );
1535 	return 0;
1536 }
1537 AbstractMultiTOXTabDialog * SwAbstractDialogFactory_Impl::CreateMultiTOXTabDialog( int nResId,
1538 												Window* pParent, const SfxItemSet& rSet,
1539 												SwWrtShell &rShell,
1540 												SwTOXBase* pCurTOX, sal_uInt16 nToxType,
1541 												sal_Bool bGlobal ) //add for SwMultiTOXTabDialog
1542 {
1543 	SwMultiTOXTabDialog* pDlg=NULL;
1544 	switch ( nResId )
1545 	{
1546 		case DLG_MULTI_TOX :
1547 			pDlg = new SwMultiTOXTabDialog( pParent, rSet, rShell, pCurTOX, nToxType, bGlobal );
1548 			break;
1549 		default:
1550 			break;
1551 	}
1552 	if ( pDlg )
1553 		return new AbstractMultiTOXTabDialog_Impl( pDlg );
1554 	return 0;
1555 }
1556 AbstractEditRegionDlg * SwAbstractDialogFactory_Impl::CreateEditRegionDlg( int nResId,
1557 												Window* pParent, SwWrtShell& rWrtSh ) //add for SwEditRegionDlg
1558 {
1559 	SwEditRegionDlg* pDlg=NULL;
1560 	switch ( nResId )
1561 	{
1562 		case MD_EDIT_REGION :
1563 			pDlg = new SwEditRegionDlg( pParent, rWrtSh );
1564 			break;
1565 		default:
1566 			break;
1567 	}
1568 	if ( pDlg )
1569 		return new AbstractEditRegionDlg_Impl( pDlg );
1570 	return 0;
1571 }
1572 AbstractInsertSectionTabDialog * SwAbstractDialogFactory_Impl::CreateInsertSectionTabDialog( int nResId,
1573 													Window* pParent, const SfxItemSet& rSet, SwWrtShell& rSh) //add for SwInsertSectionTabDialog
1574 {
1575 	SwInsertSectionTabDialog* pDlg=NULL;
1576 	switch ( nResId )
1577 	{
1578 		case DLG_INSERT_SECTION :
1579 			pDlg = new SwInsertSectionTabDialog( pParent, rSet, rSh );
1580 			break;
1581 		default:
1582 			break;
1583 	}
1584 	if ( pDlg )
1585 		return new AbstractInsertSectionTabDialog_Impl( pDlg );
1586 	return 0;
1587 }
1588 
1589 AbstractMarkFloatDlg * SwAbstractDialogFactory_Impl::CreateIndexMarkFloatDlg( int nResId,
1590 													SfxBindings* pBindings,
1591 				   									SfxChildWindow* pChild,
1592 				   									Window *pParent,
1593 													SfxChildWinInfo* pInfo,
1594 				   									sal_Bool bNew ) //add for SwIndexMarkFloatDlg
1595 {
1596 	SwIndexMarkFloatDlg* pDlg=NULL;
1597 	switch ( nResId )
1598 	{
1599 		case DLG_INSIDXMARK_CJK :
1600 		case DLG_INSIDXMARK :
1601 			pDlg = new SwIndexMarkFloatDlg( pBindings, pChild, pParent, pInfo, bNew );
1602 			break;
1603 		default:
1604 			break;
1605 	}
1606 	if ( pDlg )
1607 		return new AbstractIndexMarkFloatDlg_Impl( pDlg );
1608 	return 0;
1609 }
1610 
1611 AbstractMarkFloatDlg * SwAbstractDialogFactory_Impl::CreateAuthMarkFloatDlg( int nResId,
1612 													SfxBindings* pBindings,
1613 				   									SfxChildWindow* pChild,
1614 				   									Window *pParent,
1615 													SfxChildWinInfo* pInfo,
1616 				   									sal_Bool bNew ) //add for SwAuthMarkFloatDlg
1617 {
1618 	SwAuthMarkFloatDlg* pDlg=NULL;
1619 	switch ( nResId )
1620 	{
1621 		case DLG_INSAUTHMARK :
1622 			pDlg = new SwAuthMarkFloatDlg( pBindings, pChild, pParent, pInfo, bNew );
1623 			break;
1624 		default:
1625 			break;
1626 	}
1627 	if ( pDlg )
1628 		return new AbstractAuthMarkFloatDlg_Impl( pDlg );
1629 	return 0;
1630 }
1631 
1632 //add for SwIndexMarkModalDlg begin
1633 VclAbstractDialog * SwAbstractDialogFactory_Impl::CreateIndexMarkModalDlg( int nResId,
1634 												Window *pParent, SwWrtShell& rSh, SwTOXMark* pCurTOXMark ) //add for SwIndexMarkModalDlg
1635 {
1636 	Dialog* pDlg=NULL;
1637 	switch ( nResId )
1638 	{
1639 		case DLG_EDIT_IDXMARK_CJK :
1640 		case DLG_EDIT_IDXMARK :
1641 			pDlg = new SwIndexMarkModalDlg( pParent, rSh, pCurTOXMark );
1642 			break;
1643 
1644 		default:
1645 			break;
1646 	}
1647 
1648 	if ( pDlg )
1649 		return new VclAbstractDialog_Impl( pDlg );
1650 	return 0;
1651 }
1652 //add for SwIndexMarkModalDlg end
1653 AbstractMailMergeWizard*    SwAbstractDialogFactory_Impl::CreateMailMergeWizard(
1654                                     SwView& rView, SwMailMergeConfigItem& rConfigItem)
1655 {
1656     return new AbstractMailMergeWizard_Impl( new SwMailMergeWizard(rView, rConfigItem));
1657 }
1658 
1659 //add for static func in SwGlossaryDlg
1660 GlossaryGetCurrGroup	SwAbstractDialogFactory_Impl::GetGlossaryCurrGroupFunc( sal_uInt16 nId )
1661 {
1662 	switch ( nId )
1663 	{
1664 		case DLG_RENAME_GLOS :
1665 			return SwGlossaryDlg::GetCurrGroup;
1666 		default:
1667 			break;
1668 	}
1669 	return 0;
1670 }
1671 GlossarySetActGroup	SwAbstractDialogFactory_Impl::SetGlossaryActGroupFunc( sal_uInt16 nId )
1672 {
1673 	switch ( nId )
1674 	{
1675 		case DLG_RENAME_GLOS :
1676 			return SwGlossaryDlg::SetActGroup;
1677 		default:
1678 			break;
1679 	}
1680 	return 0;
1681 }
1682 
1683 //------------------ Factories for TabPages
1684 CreateTabPage SwAbstractDialogFactory_Impl::GetTabPageCreatorFunc( sal_uInt16 nId )
1685 {
1686     CreateTabPage pRet = 0;
1687     switch ( nId )
1688 	{
1689 		case TP_OPTCOMPATIBILITY_PAGE :
1690 		case RID_SW_TP_OPTCOMPATIBILITY_PAGE :
1691             pRet = SwCompatibilityOptPage::Create;
1692 			break;
1693 		case TP_OPTLOAD_PAGE :
1694 		case RID_SW_TP_OPTLOAD_PAGE :
1695             pRet = SwLoadOptPage::Create;
1696 			break;
1697 		case TP_OPTCAPTION_PAGE:
1698 		case RID_SW_TP_OPTCAPTION_PAGE:
1699 			return SwCaptionOptPage::Create;
1700 		case TP_CONTENT_OPT :
1701 		case RID_SW_TP_CONTENT_OPT:
1702 		case RID_SW_TP_HTML_CONTENT_OPT:
1703             pRet = SwContentOptPage::Create;
1704 			break;
1705 		case TP_OPTSHDWCRSR :
1706 		case RID_SW_TP_OPTSHDWCRSR:
1707         case RID_SW_TP_HTML_OPTSHDWCRSR:
1708             pRet = SwShdwCrsrOptionsTabPage::Create;
1709 			break;
1710 		case RID_SW_TP_REDLINE_OPT :
1711 		case TP_REDLINE_OPT :
1712             pRet = SwRedlineOptionsTabPage::Create;
1713 			break;
1714 		case RID_SW_TP_OPTTEST_PAGE :
1715 		case TP_OPTTEST_PAGE :
1716 #ifdef DBG_UTIL
1717             pRet = SwTestTabPage::Create;
1718 #endif
1719 			break;
1720 		case TP_OPTPRINT_PAGE :
1721 		case RID_SW_TP_HTML_OPTPRINT_PAGE:
1722 		case RID_SW_TP_OPTPRINT_PAGE:
1723             pRet = SwAddPrinterTabPage::Create;
1724 			break;
1725 		case TP_STD_FONT :
1726         case RID_SW_TP_STD_FONT:
1727         case RID_SW_TP_STD_FONT_CJK:
1728         case RID_SW_TP_STD_FONT_CTL:
1729             pRet = SwStdFontTabPage::Create;
1730 			break;
1731 		case TP_OPTTABLE_PAGE :
1732         case RID_SW_TP_HTML_OPTTABLE_PAGE:
1733 		case RID_SW_TP_OPTTABLE_PAGE:
1734             pRet = SwTableOptionsTabPage::Create;
1735 			break;
1736 		case TP_DOC_STAT :
1737             pRet = SwDocStatPage::Create;
1738 			break;
1739         case RID_SW_TP_MAILCONFIG:
1740             pRet = SwMailConfigPage::Create;
1741         break;
1742 	}
1743 
1744     return pRet;
1745 }
1746 
1747 GetTabPageRanges SwAbstractDialogFactory_Impl::GetTabPageRangesFunc( sal_uInt16 nId )
1748 {
1749 	switch ( nId )
1750 	{
1751 	case 1 : //RID_SVXPAGE_TEXTANIMATION :
1752 			//return SvxTextAnimationPage::GetRanges;
1753 			break;
1754 		default:
1755 			break;
1756 	}
1757 
1758 	return 0;
1759 }
1760