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