Update ooo320-m1
[ooovba.git] / sw / source / ui / dialog / swdlgfact.cxx
blob4e27969016f14b952f81cd7f802e69fd0b073c6e
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: swdlgfact.cxx,v $
10 * $Revision: 1.17 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 // MARKER(update_precomp.py): autogen include statement, do not remove
32 #include "precompiled_sw.hxx"
34 #ifdef SW_DLLIMPLEMENTATION
35 #undef SW_DLLIMPLEMENTATION
36 #endif
38 #include "swdlgfact.hxx"
39 #include <svtools/style.hxx>
40 #ifndef _SVX_SVXIDS_HRC
41 #include <svx/svxids.hrc>
42 #endif
43 #include "dialog.hrc"
44 #include "misc.hrc"
45 #include "chrdlg.hrc"
46 #include "fldui.hrc"
47 #include "table.hrc"
48 #include "frmui.hrc"
49 #include "dbui.hrc"
50 #include "globals.hrc"
51 #include "fldui.hrc"
52 #include "envelp.hrc"
53 #include "dochdl.hrc"
54 #include <index.hrc>
55 #include <regionsw.hrc>
56 #include <fmtui.hrc>
58 #include <wordcountdialog.hxx>
59 #include "abstract.hxx" // add for SwInsertAbstractDlg
60 #include "addrdlg.hxx" // add for SwAddrDlg
61 #include "ascfldlg.hxx" // add for SwAsciiFilterDlg
62 #include "bookmark.hxx" //add for SwInsertBookmarkDlg
63 #include "break.hxx" //add for SwBreakDlg
64 #include "changedb.hxx" //add for SwChangeDBDlg
65 #include "chrdlg.hxx" // add for SwCharDlg
66 #include "convert.hxx" //add for SwConvertTableDlg
67 #include "cption.hxx" //add for SwCaptionDialog
68 #include "dbinsdlg.hxx" //add for SwInsertDBColAutoPilot
69 #include "docfnote.hxx" //add for SwFootNoteOptionDlg
70 #include "docstdlg.hxx" //add for SwDocStatPage
71 #include "DropDownFieldDialog.hxx" //add for DropDownFieldDialog
72 #include "envlop.hxx" //add for SwEnvDlg
73 #include "label.hxx" //add for SwLabDlg
74 #include "drpcps.hxx" //add for SwDropCapsDlg
75 #include "swuipardlg.hxx" //add for SwParaDlg
76 #include "pattern.hxx" //add for SwBackgroundDlg
77 #include "rowht.hxx" //add for SwTableHeightDlg
78 #include "selglos.hxx" //add for SwSelGlossaryDlg
79 #include "splittbl.hxx" //add for SwSplitTblDlg
80 #include "srtdlg.hxx" //add for SwSortDlg
81 #include "tautofmt.hxx" //add for SwAutoFormatDlg
82 #include "tblnumfm.hxx" //add for SwNumFmtDlg
83 #include "uiborder.hxx" //add for SwBorderDlg
84 #include "wrap.hxx" //add for SwWrapDlg
85 #include "colwd.hxx" //add for SwTableWidthDlg
86 #include "tabledlg.hxx" //add for SwTableTabDlg
87 #include "fldtdlg.hxx" //add for SwFldDlg
88 #include "fldedt.hxx" //add for SwFldEditDlg
89 #include "swrenamexnameddlg.hxx" //add for SwRenameXNamedDlg
90 #include "swmodalredlineacceptdlg.hxx" //add for SwModalRedlineAcceptDlg
91 #include <frmdlg.hxx> //add for SwFrmDlg
92 #include <tmpdlg.hxx> //add for SwTemplateDlg
93 #include <glossary.hxx> //add for SwGlossaryDlg
94 #include <inpdlg.hxx> //add for SwFldInputDlg
95 #include <insfnote.hxx> //add for SwInsFootNoteDlg
96 #include <insrule.hxx> //add for SwInsertGrfRulerDlg
97 #include <instable.hxx> //add for SwInsTableDlg
98 #include <javaedit.hxx> //add for SwJavaEditDialog
99 #include <linenum.hxx> //add for SwLineNumberingDlg
100 #include <mailmrge.hxx> //add for SwMailMergeDlg, SwMailMergeCreateFromDlg, SwMailMergeFieldConnectionsDlg
101 #include <mergetbl.hxx> //add for SwMergeTblDlg
102 #include <multmrk.hxx> //add for SwMultiTOXMarkDlg
103 #include <num.hxx> //add for SwSvxNumBulletTabDialog
104 #include <outline.hxx> //add for SwOutlineTabDialog
105 #include <column.hxx> //add for SwColumnDlg
106 #include <cnttab.hxx> //add for SwMultiTOXTabDialog
107 #include <swuicnttab.hxx> //add for SwMultiTOXTabDialog
108 #include <regionsw.hxx> //add for SwEditRegionDlg, SwInsertSectionTabDialog
109 #include <optcomp.hxx> //add for SwCompatibilityOptPage
110 #include <optload.hxx> //add for SwLoadOptPage
111 #include <optpage.hxx> //add for OptPage
112 #include <swuiidxmrk.hxx> //add for SwIndexMarkDlg, SwAuthMarkDlg, SwIndexMarkModalDlg, SwAuthMarkModalDlg
113 #include <svx/dialogs.hrc>
114 #include <mailmergewizard.hxx>
115 #include <mailconfigpage.hxx>
117 using namespace ::com::sun::star;
119 IMPL_ABSTDLG_BASE(AbstractSwWordCountDialog_Impl);
120 IMPL_ABSTDLG_BASE(AbstractSwInsertAbstractDlg_Impl);
121 IMPL_ABSTDLG_BASE(AbstractSfxDialog_Impl);
122 IMPL_ABSTDLG_BASE(AbstractSwAsciiFilterDlg_Impl);
123 IMPL_ABSTDLG_BASE(VclAbstractDialog_Impl);
124 IMPL_ABSTDLG_BASE(AbstractSplitTableDialog_Impl);
125 IMPL_ABSTDLG_BASE(AbstractSwBreakDlg_Impl); //add for SwBreakDlg
126 IMPL_ABSTDLG_BASE(AbstractTabDialog_Impl); //add for SwCharDlg, SwFootNoteOptionDlg, SwEnvDlg SwParaDlg SwTableTabDlg
127 IMPL_ABSTDLG_BASE(AbstractSwConvertTableDlg_Impl); //add for SwConvertTableDlg
128 IMPL_ABSTDLG_BASE(AbstractSwInsertDBColAutoPilot_Impl); //add for SwInsertDBColAutoPilot
129 IMPL_ABSTDLG_BASE(AbstractDropDownFieldDialog_Impl); //add for DropDownFieldDialog
130 IMPL_ABSTDLG_BASE(AbstarctSwLabDlg_Impl);//add for SwLabDlg
131 IMPL_ABSTDLG_BASE(AbstarctSwSelGlossaryDlg_Impl);//add for SwSelGlossaryDlg
132 IMPL_ABSTDLG_BASE(AbstractSwAutoFormatDlg_Impl); //add for SwAutoFormatDlg
133 IMPL_ABSTDLG_BASE(AbstractSwFldDlg_Impl); //add for SwFldDlg
134 IMPL_ABSTDLG_BASE(AbstractSwRenameXNamedDlg_Impl); //add for SwRenameXNamedDlg
135 IMPL_ABSTDLG_BASE(AbstractSwModalRedlineAcceptDlg_Impl); //add for SwModalRedlineAcceptDlg
136 IMPL_ABSTDLG_BASE(AbstractGlossaryDlg_Impl);
137 IMPL_ABSTDLG_BASE(AbstractFldInputDlg_Impl);
138 IMPL_ABSTDLG_BASE(AbstractInsFootNoteDlg_Impl);
139 IMPL_ABSTDLG_BASE(AbstractInsertGrfRulerDlg_Impl);
140 IMPL_ABSTDLG_BASE(AbstractInsTableDlg_Impl);
141 IMPL_ABSTDLG_BASE(AbstractJavaEditDialog_Impl);
142 IMPL_ABSTDLG_BASE(AbstractMailMergeDlg_Impl);
143 IMPL_ABSTDLG_BASE(AbstractMailMergeCreateFromDlg_Impl);
144 IMPL_ABSTDLG_BASE(AbstractMailMergeFieldConnectionsDlg_Impl);
145 IMPL_ABSTDLG_BASE(AbstractMultiTOXTabDialog_Impl);
146 IMPL_ABSTDLG_BASE(AbstractEditRegionDlg_Impl);
147 IMPL_ABSTDLG_BASE(AbstractInsertSectionTabDialog_Impl);
148 IMPL_ABSTDLG_BASE(AbstractIndexMarkFloatDlg_Impl);
149 IMPL_ABSTDLG_BASE(AbstractAuthMarkFloatDlg_Impl);
151 // AbstractTabDialog_Impl begin
152 void AbstractTabDialog_Impl::SetCurPageId( USHORT nId )
154 pDlg->SetCurPageId( nId );
157 const SfxItemSet* AbstractTabDialog_Impl::GetOutputItemSet() const
159 return pDlg->GetOutputItemSet();
162 const USHORT* AbstractTabDialog_Impl::GetInputRanges(const SfxItemPool& pItem )
164 return pDlg->GetInputRanges( pItem );
167 void AbstractTabDialog_Impl::SetInputSet( const SfxItemSet* pInSet )
169 pDlg->SetInputSet( pInSet );
171 //From class Window.
172 void AbstractTabDialog_Impl::SetText( const XubString& rStr )
174 pDlg->SetText( rStr );
176 String AbstractTabDialog_Impl::GetText() const
178 return pDlg->GetText();
181 //add for AbstractTabDialog_Impl end
183 void AbstractSwWordCountDialog_Impl::SetValues(const SwDocStat& rCurrent, const SwDocStat& rDoc)
185 pDlg->SetValues(rCurrent, rDoc);
188 //add for SwInsertAbstractDlg begin
189 BYTE AbstractSwInsertAbstractDlg_Impl::GetLevel() const
191 return pDlg->GetLevel();
193 BYTE AbstractSwInsertAbstractDlg_Impl::GetPara() const
195 return pDlg->GetPara();
197 //add for SwInsertAbstractDlg end
199 //add for SwAddrDlg, SwDropCapsDlg ,SwBackgroundDlg, SwNumFmtDlg SwBorderDlg SwWrapDlg SwFldEditDlg begin
200 const SfxItemSet* AbstractSfxDialog_Impl::GetOutputItemSet() const
202 return pDlg->GetOutputItemSet();
205 void AbstractSfxDialog_Impl::SetText( const XubString& rStr )
207 pDlg->SetText( rStr );
209 String AbstractSfxDialog_Impl::GetText() const
211 return pDlg->GetText();
214 //add for SwAddrDlg, SwDropCapsDlg ,SwBackgroundDlg, SwNumFmtDlg SwBorderDlg SwWrapDlg SwFldEditDlg end
216 //add for SwAsciiFilterDlg begin
217 void AbstractSwAsciiFilterDlg_Impl::FillOptions( SwAsciiOptions& rOptions )
219 pDlg->FillOptions(rOptions);
221 //add for SwAsciiFilterDlg end
223 //add for SwSplitTblDlg
224 sal_uInt16 AbstractSplitTableDialog_Impl::GetSplitMode()
226 return pDlg->GetSplitMode();
228 //add for SwBreakDlg begin
229 String AbstractSwBreakDlg_Impl::GetTemplateName()
231 return pDlg->GetTemplateName();
234 USHORT AbstractSwBreakDlg_Impl:: GetKind()
236 return pDlg->GetKind();
239 USHORT AbstractSwBreakDlg_Impl:: GetPageNumber()
241 return pDlg->GetPageNumber();
243 //add for SwBreakDlg end
245 //add for SwConvertTableDlg begin
246 void AbstractSwConvertTableDlg_Impl::GetValues( sal_Unicode& rDelim,SwInsertTableOptions& rInsTblFlags,
247 SwTableAutoFmt *& prTAFmt )
249 pDlg->GetValues(rDelim,rInsTblFlags, prTAFmt);
251 //add for SwConvertTableDlg end
253 //add for SwInsertDBColAutoPilot begin
254 void AbstractSwInsertDBColAutoPilot_Impl::DataToDoc( const uno::Sequence< uno::Any >& rSelection,
255 uno::Reference< sdbc::XDataSource> rxSource,
256 uno::Reference< sdbc::XConnection> xConnection,
257 uno::Reference< sdbc::XResultSet > xResultSet)
259 pDlg->DataToDoc(rSelection, rxSource, xConnection, xResultSet);
261 //add for SwInsertDBColAutoPilot end
263 // add for DropDownFieldDialog begin
264 ByteString AbstractDropDownFieldDialog_Impl::GetWindowState( ULONG nMask ) const
266 return pDlg->GetWindowState(nMask);
268 void AbstractDropDownFieldDialog_Impl::SetWindowState( const ByteString& rStr )
270 pDlg->SetWindowState(rStr);
272 //add for DropDownFieldDialog end
274 //add for SwLabDlg begin
276 void AbstarctSwLabDlg_Impl::SetCurPageId( USHORT nId )
278 pDlg->SetCurPageId( nId );
281 const SfxItemSet* AbstarctSwLabDlg_Impl::GetOutputItemSet() const
283 return pDlg->GetOutputItemSet();
286 const USHORT* AbstarctSwLabDlg_Impl::GetInputRanges(const SfxItemPool& pItem )
288 return pDlg->GetInputRanges( pItem );
291 void AbstarctSwLabDlg_Impl::SetInputSet( const SfxItemSet* pInSet )
293 pDlg->SetInputSet( pInSet );
296 void AbstarctSwLabDlg_Impl::SetText( const XubString& rStr )
298 pDlg->SetText( rStr );
300 String AbstarctSwLabDlg_Impl::GetText() const
302 return pDlg->GetText();
304 const String& AbstarctSwLabDlg_Impl::GetBusinessCardStr() const
306 return pDlg->GetBusinessCardStr();
308 Printer * AbstarctSwLabDlg_Impl::GetPrt()
310 return pDlg->GetPrt();
312 //add for SwLabDlg end
315 //add for SwSelGlossaryDlg begin
317 void AbstarctSwSelGlossaryDlg_Impl::InsertGlos(const String &rRegion, const String &rGlosName)
319 pDlg->InsertGlos( rRegion, rGlosName );
321 USHORT AbstarctSwSelGlossaryDlg_Impl::GetSelectedIdx() const
323 return pDlg->GetSelectedIdx();
325 void AbstarctSwSelGlossaryDlg_Impl::SelectEntryPos(USHORT nIdx)
327 pDlg->SelectEntryPos( nIdx );
330 //add for SwSelGlossaryDlg end
332 //add for SwAutoFormatDlg begin
334 void AbstractSwAutoFormatDlg_Impl::FillAutoFmtOfIndex( SwTableAutoFmt*& rToFill ) const
336 pDlg->FillAutoFmtOfIndex(rToFill);
338 //add for SwAutoFormatDlg end
340 //add for SwFldDlg begin
341 void AbstractSwFldDlg_Impl::SetCurPageId( USHORT nId )
343 pDlg->SetCurPageId( nId );
346 const SfxItemSet* AbstractSwFldDlg_Impl::GetOutputItemSet() const
348 return pDlg->GetOutputItemSet();
351 const USHORT* AbstractSwFldDlg_Impl::GetInputRanges(const SfxItemPool& pItem )
353 return pDlg->GetInputRanges( pItem );
356 void AbstractSwFldDlg_Impl::SetInputSet( const SfxItemSet* pInSet )
358 pDlg->SetInputSet( pInSet );
361 void AbstractSwFldDlg_Impl::SetText( const XubString& rStr )
363 pDlg->SetText( rStr );
365 String AbstractSwFldDlg_Impl::GetText() const
367 return pDlg->GetText();
369 void AbstractSwFldDlg_Impl::Start( BOOL bShowl )
371 pDlg->Start( bShowl );
374 void AbstractSwFldDlg_Impl::Initialize(SfxChildWinInfo *pInfo)
376 pDlg->Initialize( pInfo );
379 void AbstractSwFldDlg_Impl::ReInitDlg()
381 pDlg->ReInitDlg();
383 void AbstractSwFldDlg_Impl::ActivateDatabasePage()
385 pDlg->ActivateDatabasePage();
387 Window* AbstractSwFldDlg_Impl::GetWindow()
389 return (Window*)pDlg;
391 void AbstractSwFldDlg_Impl::ShowPage( USHORT nId )
393 pDlg->ShowPage(nId);
395 //add for SwFldD end
397 //add for SwRenameXNamedDlg begin
399 void AbstractSwRenameXNamedDlg_Impl::SetForbiddenChars( const String& rSet )
401 pDlg->SetForbiddenChars( rSet );
404 void AbstractSwRenameXNamedDlg_Impl::SetAlternativeAccess(
405 STAR_REFERENCE( container::XNameAccess ) & xSecond,
406 STAR_REFERENCE( container::XNameAccess ) & xThird )
408 pDlg->SetAlternativeAccess( xSecond, xThird);
410 //add for SwRenameXNamedDlg end
412 //add for SwModalRedlineAcceptDlg begin
414 void AbstractSwModalRedlineAcceptDlg_Impl::AcceptAll( BOOL bAccept )
416 pDlg->AcceptAll( bAccept);
418 //add for SwModalRedlineAcceptDlg end
420 // AbstractGlossaryDlg_Impl begin
421 String AbstractGlossaryDlg_Impl::GetCurrGrpName() const
423 return pDlg->GetCurrGrpName();
426 String AbstractGlossaryDlg_Impl::GetCurrShortName() const
428 return pDlg->GetCurrShortName();
430 // AbstractGlossaryDlg_Impl end
432 // AbstractFldInputDlg_Impl begin
433 void AbstractFldInputDlg_Impl::SetWindowState( const ByteString& rStr )
435 pDlg->SetWindowState( rStr );
438 ByteString AbstractFldInputDlg_Impl::GetWindowState( ULONG nMask ) const
440 return pDlg->GetWindowState( nMask );
442 // AbstractFldInputDlg_Impl end
444 // AbstractInsFootNoteDlg_Impl begin
445 String AbstractInsFootNoteDlg_Impl::GetFontName()
447 return pDlg->GetFontName();
449 BOOL AbstractInsFootNoteDlg_Impl::IsEndNote()
451 return pDlg->IsEndNote();
453 String AbstractInsFootNoteDlg_Impl::GetStr()
455 return pDlg->GetStr();
457 void AbstractInsFootNoteDlg_Impl::SetHelpId( ULONG nHelpId )
459 pDlg->SetHelpId( nHelpId );
461 void AbstractInsFootNoteDlg_Impl::SetText( const XubString& rStr )
463 pDlg->SetText( rStr );
465 // AbstractInsFootNoteDlg_Impl end
467 // AbstractInsertGrfRulerDlg_Impl begin
468 String AbstractInsertGrfRulerDlg_Impl::GetGraphicName()
470 return pDlg->GetGraphicName();
472 BOOL AbstractInsertGrfRulerDlg_Impl::IsSimpleLine()
474 return pDlg->IsSimpleLine();
476 BOOL AbstractInsertGrfRulerDlg_Impl::HasImages() const
478 return pDlg->HasImages();
480 // AbstractInsertGrfRulerDlg_Impl end
482 // AbstractInsTableDlg_Impl begin
483 void AbstractInsTableDlg_Impl::GetValues( String& rName, USHORT& rRow, USHORT& rCol,
484 SwInsertTableOptions& rInsTblFlags, String& rTableAutoFmtName,
485 SwTableAutoFmt *& prTAFmt )
487 pDlg->GetValues( rName, rRow, rCol, rInsTblFlags, rTableAutoFmtName, prTAFmt);
489 // AbstractInsTableDlg_Impl end
491 // AbstractJavaEditDialog_Impl begin
492 String AbstractJavaEditDialog_Impl::GetText()
494 return pDlg->GetText();
496 String AbstractJavaEditDialog_Impl::GetType()
498 return pDlg->GetType();
500 BOOL AbstractJavaEditDialog_Impl::IsUrl()
502 return pDlg->IsUrl();
504 BOOL AbstractJavaEditDialog_Impl::IsNew()
506 return pDlg->IsNew();
508 BOOL AbstractJavaEditDialog_Impl::IsUpdate()
510 return pDlg->IsUpdate();
512 // AbstractJavaEditDialog_Impl end
514 // AbstractMailMergeDlg_Impl begin
515 USHORT AbstractMailMergeDlg_Impl::GetMergeType()
517 return pDlg->GetMergeType();
519 const ::rtl::OUString& AbstractMailMergeDlg_Impl::GetSaveFilter() const
521 return pDlg->GetSaveFilter();
524 const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > AbstractMailMergeDlg_Impl::GetSelection() const
526 return pDlg->GetSelection();
528 uno::Reference< sdbc::XResultSet> AbstractMailMergeDlg_Impl::GetResultSet() const
530 return pDlg->GetResultSet();
532 // AbstractMailMergeDlg_Impl end
533 // AbstractMailMergeCreateFromDlg_Impl begin
534 BOOL AbstractMailMergeCreateFromDlg_Impl::IsThisDocument() const
536 return pDlg->IsThisDocument();
538 // AbstractMailMergeCreateFromDlg_Impl end
539 //AbstractMailMergeFieldConnectionsDlg_Impl begin
540 BOOL AbstractMailMergeFieldConnectionsDlg_Impl::IsUseExistingConnections() const
542 return pDlg->IsUseExistingConnections();
544 // AbstractMailMergeFieldConnectionsDlg_Impl end
546 // AbstractMultiTOXTabDialog_Impl begin
547 SwForm* AbstractMultiTOXTabDialog_Impl::GetForm(CurTOXType eType)
549 return pDlg->GetForm(eType);
551 CurTOXType AbstractMultiTOXTabDialog_Impl::GetCurrentTOXType() const
553 return pDlg->GetCurrentTOXType();
555 SwTOXDescription& AbstractMultiTOXTabDialog_Impl::GetTOXDescription(CurTOXType eTOXTypes)
557 return pDlg->GetTOXDescription(eTOXTypes);
559 const SfxItemSet* AbstractMultiTOXTabDialog_Impl::GetOutputItemSet() const
561 return pDlg->GetOutputItemSet();
563 // AbstractMultiTOXTabDialog_Impl end
565 // AbstractEditRegionDlg_Impl begin
566 void AbstractEditRegionDlg_Impl::SelectSection(const String& rSectionName)
568 pDlg->SelectSection(rSectionName);
570 // AbstractEditRegionDlg_Impl end
571 //AbstractInsertSectionTabDialog_Impl begin
572 void AbstractInsertSectionTabDialog_Impl::SetSection(const SwSection& rSect)
574 pDlg->SetSection( rSect);
576 // AbstractInsertSectionTabDialog_Impl end
578 //AbstractIndexMarkFloatDlg_Impl begin
579 void AbstractIndexMarkFloatDlg_Impl::ReInitDlg(SwWrtShell& rWrtShell)
581 pDlg->ReInitDlg( rWrtShell);
583 Window* AbstractIndexMarkFloatDlg_Impl::GetWindow()
585 return (Window*)pDlg;
587 // AbstractIndexMarkFloatDlg_Impl end
589 //AbstractAuthMarkFloatDlg_Impl begin
590 void AbstractAuthMarkFloatDlg_Impl::ReInitDlg(SwWrtShell& rWrtShell)
592 pDlg->ReInitDlg( rWrtShell);
594 Window* AbstractAuthMarkFloatDlg_Impl::GetWindow()
596 return (Window*)pDlg;
598 // AbstractAuthMarkFloatDlg_Impl end
600 AbstractMailMergeWizard_Impl::~AbstractMailMergeWizard_Impl()
602 delete pDlg;
605 void AbstractMailMergeWizard_Impl::StartExecuteModal( const Link& rEndDialogHdl )
607 aEndDlgHdl = rEndDialogHdl;
608 pDlg->StartExecuteModal(
609 LINK( this, AbstractMailMergeWizard_Impl, EndDialogHdl ) );
612 long AbstractMailMergeWizard_Impl::GetResult()
614 return pDlg->GetResult();
617 #ifdef DBG_UTIL
618 IMPL_LINK( AbstractMailMergeWizard_Impl, EndDialogHdl, SwMailMergeWizard*, pDialog )
619 #else
620 IMPL_LINK( AbstractMailMergeWizard_Impl, EndDialogHdl, SwMailMergeWizard*, EMPTYARG )
621 #endif
623 DBG_ASSERT( pDialog == pDlg, "wrong dialog passed to EndDialogHdl!" );
625 aEndDlgHdl.Call( this );
626 aEndDlgHdl = Link();
628 return 0L;
631 void AbstractMailMergeWizard_Impl::SetReloadDocument(const String& rURL)
633 pDlg->SetReloadDocument(rURL);
635 const String& AbstractMailMergeWizard_Impl::GetReloadDocument() const
637 return pDlg->GetReloadDocument();
639 BOOL AbstractMailMergeWizard_Impl::ShowPage( USHORT nLevel )
641 return pDlg->skipUntil(nLevel);
643 sal_uInt16 AbstractMailMergeWizard_Impl::GetRestartPage() const
645 return pDlg->GetRestartPage();
648 //-------------- SwAbstractDialogFactory implementation--------------
650 AbstractSwWordCountDialog* SwAbstractDialogFactory_Impl::CreateSwWordCountDialog(Window* pParent)
652 SwWordCountDialog* pDlg = new SwWordCountDialog( pParent );
653 return new AbstractSwWordCountDialog_Impl( pDlg );
656 //add for SwInsertAbstractDlg begin
657 AbstractSwInsertAbstractDlg * SwAbstractDialogFactory_Impl::CreateSwInsertAbstractDlg( Window* pParent,
658 int nResId )
660 SwInsertAbstractDlg* pDlg=NULL;
661 switch ( nResId )
663 case DLG_INSERT_ABSTRACT :
664 pDlg = new SwInsertAbstractDlg( pParent);
665 break;
666 default:
667 break;
670 if ( pDlg )
671 return new AbstractSwInsertAbstractDlg_Impl( pDlg );
672 return 0;
674 //add for SwInsertAbstractDlg end
676 SfxAbstractDialog* SwAbstractDialogFactory_Impl::CreateSfxDialog( Window* pParent,
677 const SfxItemSet& rSet,
678 const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >&,
679 sal_uInt32 nResId
682 SfxModalDialog* pDlg=NULL;
683 switch ( nResId )
685 case RC_DLG_ADDR :
686 pDlg = new SwAddrDlg( pParent, rSet );
687 break;
688 case DLG_SWDROPCAPS :
689 pDlg = new SwDropCapsDlg( pParent, rSet );
690 break;
691 case RC_SWDLG_BACKGROUND :
692 pDlg = new SwBackgroundDlg( pParent, rSet );
693 break;
694 case RC_DLG_SWNUMFMTDLG :
695 pDlg = new SwNumFmtDlg( pParent, rSet );
696 break;
697 default:
698 break;
701 if ( pDlg )
702 return new AbstractSfxDialog_Impl( pDlg );
703 return 0;
706 // add for SwAsciiFilterDlg begin
707 AbstractSwAsciiFilterDlg* SwAbstractDialogFactory_Impl::CreateSwAsciiFilterDlg( Window* pParent,
708 SwDocShell& rDocSh,
709 SvStream* pStream,
710 int nResId )
712 SwAsciiFilterDlg* pDlg=NULL;
713 switch ( nResId )
715 case DLG_ASCII_FILTER :
716 pDlg = new SwAsciiFilterDlg( pParent, rDocSh, pStream );
717 break;
719 default:
720 break;
723 if ( pDlg )
724 return new AbstractSwAsciiFilterDlg_Impl( pDlg );
725 return 0;
728 //add for SwAsciiFilterDlg end
730 // add for SwInsertBookmarkDlg begin
731 VclAbstractDialog* SwAbstractDialogFactory_Impl::CreateSwInsertBookmarkDlg( Window *pParent,
732 SwWrtShell &rSh,
733 SfxRequest& rReq,
734 int nResId )
736 Dialog* pDlg=NULL;
737 switch ( nResId )
739 case DLG_INSERT_BOOKMARK :
740 pDlg = new SwInsertBookmarkDlg( pParent, rSh, rReq );
741 break;
743 default:
744 break;
747 if ( pDlg )
748 return new VclAbstractDialog_Impl( pDlg );
749 return 0;
752 //add for SwInsertBookmarkDlg end
754 //add for SwBreakDlg begin
756 AbstractSwBreakDlg * SwAbstractDialogFactory_Impl::CreateSwBreakDlg ( Window *pParent,
757 SwWrtShell &rSh,
758 int nResId )
760 SwBreakDlg* pDlg=NULL;
761 switch ( nResId )
763 case DLG_BREAK :
764 pDlg = new SwBreakDlg( pParent, rSh );
765 break;
767 default:
768 break;
771 if ( pDlg )
772 return new AbstractSwBreakDlg_Impl( pDlg );
773 return 0;
775 //add for SwBreakDlg end
777 // add for SwChangeDBDlg begin
778 VclAbstractDialog * SwAbstractDialogFactory_Impl::CreateSwChangeDBDlg( SwView& rVw, int nResId )
780 Dialog* pDlg=NULL;
781 switch ( nResId )
783 case DLG_CHANGE_DB :
784 pDlg = new SwChangeDBDlg( rVw );
785 break;
787 default:
788 break;
791 if ( pDlg )
792 return new VclAbstractDialog_Impl( pDlg );
793 return 0;
796 // add for SwChangeDBDlg end
798 // add for SwCharDlg begin
799 SfxAbstractTabDialog * SwAbstractDialogFactory_Impl::CreateSwCharDlg(Window* pParent, SwView& pVw, const SfxItemSet& rCoreSet, int nResId, // add for SwCharDlg
800 const String* pFmtStr , BOOL bIsDrwTxtDlg )
803 SfxTabDialog* pDlg=NULL;
804 switch ( nResId )
806 case DLG_CHAR :
807 pDlg = new SwCharDlg( pParent, pVw, rCoreSet, pFmtStr, bIsDrwTxtDlg );
808 break;
809 default:
810 break;
813 if ( pDlg )
814 return new AbstractTabDialog_Impl( pDlg );
815 return 0;
818 // add for SwCharDlg end
820 //add for SwConvertTableDlg begin
821 AbstractSwConvertTableDlg* SwAbstractDialogFactory_Impl::CreateSwConvertTableDlg (
822 SwView& rView,int nResId, bool bToTable )
824 SwConvertTableDlg* pDlg=NULL;
825 switch ( nResId )
827 case DLG_CONV_TEXT_TABLE :
828 pDlg = new SwConvertTableDlg( rView, bToTable );
829 break;
830 default:
831 break;
834 if ( pDlg )
835 return new AbstractSwConvertTableDlg_Impl( pDlg );
836 return 0;
839 //add for SwConvertTableDlg end
841 //add for SwCaptionDialog begin
842 VclAbstractDialog * SwAbstractDialogFactory_Impl::CreateSwCaptionDialog ( Window *pParent, SwView &rV,int nResId)
844 Dialog* pDlg=NULL;
845 switch ( nResId )
847 case DLG_CAPTION :
848 pDlg = new SwCaptionDialog( pParent, rV );
849 break;
851 default:
852 break;
855 if ( pDlg )
856 return new VclAbstractDialog_Impl( pDlg );
857 return 0;
859 //add for SwCaptionDialog end
861 //add for SwInsertDBColAutoPilot begin
863 AbstractSwInsertDBColAutoPilot* SwAbstractDialogFactory_Impl::CreateSwInsertDBColAutoPilot( SwView& rView, // add for SwInsertDBColAutoPilot
864 uno::Reference< sdbc::XDataSource> rxSource,
865 uno::Reference<sdbcx::XColumnsSupplier> xColSupp,
866 const SwDBData& rData, int nResId)
868 SwInsertDBColAutoPilot* pDlg=NULL;
869 switch ( nResId )
871 case DLG_AP_INSERT_DB_SEL :
872 pDlg = new SwInsertDBColAutoPilot( rView, rxSource, xColSupp, rData );
873 break;
875 default:
876 break;
879 if ( pDlg )
880 return new AbstractSwInsertDBColAutoPilot_Impl( pDlg );
881 return 0;
883 //add for SwInsertDBColAutoPilot end
884 //add for SwFootNoteOptionDlg begin
885 SfxAbstractTabDialog * SwAbstractDialogFactory_Impl::CreateSwFootNoteOptionDlg( Window *pParent, SwWrtShell &rSh,int nResId)
887 SfxTabDialog* pDlg=NULL;
888 switch ( nResId )
890 case DLG_DOC_FOOTNOTE :
891 pDlg = new SwFootNoteOptionDlg( pParent, rSh );
892 break;
894 default:
895 break;
898 if ( pDlg )
899 return new AbstractTabDialog_Impl( pDlg );
900 return 0;
902 //add for SwFootNoteOptionDlg begin
905 //add for DropDownFieldDialog begin
907 AbstractDropDownFieldDialog * SwAbstractDialogFactory_Impl::CreateDropDownFieldDialog ( Window *pParent, SwWrtShell &rSh, //add for DropDownFieldDialog
908 SwField* pField,int nResId, BOOL bNextButton )
910 sw::DropDownFieldDialog* pDlg=NULL;
911 switch ( nResId )
913 case DLG_FLD_DROPDOWN :
914 pDlg = new sw::DropDownFieldDialog( pParent, rSh, pField, bNextButton );
915 break;
917 default:
918 break;
921 if ( pDlg )
922 return new AbstractDropDownFieldDialog_Impl( pDlg );
923 return 0;
925 //add for DropDownFieldDialog end
927 //add for SwEnvDlg begin
928 SfxAbstractTabDialog* SwAbstractDialogFactory_Impl::CreateSwEnvDlg ( Window* pParent, const SfxItemSet& rSet,
929 SwWrtShell* pWrtSh, Printer* pPrt,
930 BOOL bInsert,int nResId ) //add for SwEnvDlg
932 SfxTabDialog* pDlg=NULL;
933 switch ( nResId )
935 case DLG_ENV :
936 pDlg = new SwEnvDlg( pParent, rSet, pWrtSh,pPrt, bInsert );
937 break;
939 default:
940 break;
943 if ( pDlg )
944 return new AbstractTabDialog_Impl( pDlg );
945 return 0;
947 //add for SwEnvDlg end
949 //add for SwLabDlg begin
951 AbstarctSwLabDlg* SwAbstractDialogFactory_Impl::CreateSwLabDlg ( Window* pParent, const SfxItemSet& rSet, //add for SwLabDlg
952 SwNewDBMgr* pNewDBMgr, BOOL bLabel,int nResId )
954 SwLabDlg* pDlg=NULL;
955 switch ( nResId )
957 case DLG_LAB :
958 pDlg = new SwLabDlg( pParent, rSet, pNewDBMgr,bLabel );
959 break;
961 default:
962 break;
965 if ( pDlg )
966 return new AbstarctSwLabDlg_Impl( pDlg );
967 return 0;
970 SwLabDlgMethod SwAbstractDialogFactory_Impl::GetSwLabDlgStaticMethod ()
972 return SwLabDlg::UpdateFieldInformation;
975 //add for SwLabDlg end
977 //add for SwParaDlg begin
978 SfxAbstractTabDialog* SwAbstractDialogFactory_Impl::CreateSwParaDlg ( Window *pParent, SwView& rVw,
979 const SfxItemSet& rCoreSet ,
980 BYTE nDialogMode,
981 int nResId,
982 const String *pCollName,
983 BOOL bDraw , UINT16 nDefPage)
985 SfxTabDialog* pDlg=NULL;
986 switch ( nResId )
988 case DLG_DRAWPARA :
989 case DLG_PARA :
990 pDlg = new SwParaDlg( pParent, rVw, rCoreSet,nDialogMode, pCollName, bDraw, nDefPage );
991 break;
993 default:
994 break;
997 if ( pDlg )
998 return new AbstractTabDialog_Impl( pDlg );
999 return 0;
1001 //add for SwParaDlg end
1003 //add for SwTableHeightDlg SwSortDlg begin
1004 VclAbstractDialog * SwAbstractDialogFactory_Impl::CreateVclAbstractDialog ( Window *pParent, SwWrtShell &rSh, int nResId )
1006 Dialog* pDlg=NULL;
1007 switch ( nResId )
1009 case DLG_ROW_HEIGHT :
1010 pDlg = new SwTableHeightDlg( pParent, rSh);
1011 break;
1013 case DLG_SORTING :
1014 pDlg = new SwSortDlg( pParent, rSh);
1015 break;
1016 case DLG_COLUMN :
1017 pDlg = new SwColumnDlg( pParent, rSh );
1018 break;
1019 case DLG_EDIT_AUTHMARK :
1020 pDlg = new SwAuthMarkModalDlg( pParent, rSh );
1021 break;
1022 default:
1023 break;
1026 if ( pDlg )
1027 return new VclAbstractDialog_Impl( pDlg );
1028 return 0;
1030 //add for SwTableHeightDlg SwSortDlg ,end
1031 //add for SwSplitTblDlg begin
1032 AbstractSplitTableDialog * SwAbstractDialogFactory_Impl::CreateSplitTblDialog ( Window *pParent, SwWrtShell &rSh )
1034 return new AbstractSplitTableDialog_Impl( new SwSplitTblDlg( pParent, rSh) );
1036 //add SwSplitTblDlg end
1038 //add for SwSelGlossaryDlg begin
1039 AbstarctSwSelGlossaryDlg * SwAbstractDialogFactory_Impl::CreateSwSelGlossaryDlg ( Window * pParent, const String &rShortName, int nResId )
1041 SwSelGlossaryDlg* pDlg=NULL;
1042 switch ( nResId )
1044 case DLG_SEL_GLOS :
1045 pDlg = new SwSelGlossaryDlg( pParent, rShortName);
1046 break;
1048 default:
1049 break;
1052 if ( pDlg )
1053 return new AbstarctSwSelGlossaryDlg_Impl( pDlg );
1054 return 0;
1057 //add for SwSelGlossaryDlg end
1059 //add for SwAutoFormatDlg begin
1060 AbstractSwAutoFormatDlg * SwAbstractDialogFactory_Impl::CreateSwAutoFormatDlg( Window* pParent, SwWrtShell* pShell,
1061 int nResId,
1062 BOOL bSetAutoFmt,
1063 const SwTableAutoFmt* pSelFmt )
1065 SwAutoFormatDlg* pDlg=NULL;
1066 switch ( nResId )
1068 case DLG_AUTOFMT_TABLE :
1069 pDlg = new SwAutoFormatDlg( pParent, pShell,bSetAutoFmt,pSelFmt);
1070 break;
1072 default:
1073 break;
1076 if ( pDlg )
1077 return new AbstractSwAutoFormatDlg_Impl( pDlg );
1078 return 0;
1080 //add for SwAutoFormatDlg end
1082 //add for SwBorderDlg begin
1083 SfxAbstractDialog * SwAbstractDialogFactory_Impl::CreateSwBorderDlg (Window* pParent, SfxItemSet& rSet, USHORT nType,int nResId )
1085 SfxModalDialog* pDlg=NULL;
1086 switch ( nResId )
1088 case RC_DLG_SWBORDERDLG :
1089 pDlg = new SwBorderDlg( pParent, rSet, nType );
1090 break;
1091 default:
1092 break;
1095 if ( pDlg )
1096 return new AbstractSfxDialog_Impl( pDlg );
1097 return 0;
1099 //add for SwBorderDlg end
1101 //add for SwWrapDlg begin
1102 SfxAbstractDialog* SwAbstractDialogFactory_Impl::CreateSwWrapDlg ( Window* pParent, SfxItemSet& rSet, SwWrtShell* pSh, BOOL bDrawMode, int nResId )
1104 SfxModalDialog* pDlg=NULL;
1105 switch ( nResId )
1107 case RC_DLG_SWWRAPDLG :
1108 pDlg = new SwWrapDlg( pParent, rSet, pSh, bDrawMode );
1109 break;
1110 default:
1111 break;
1114 if ( pDlg )
1115 return new AbstractSfxDialog_Impl( pDlg );
1116 return 0;
1118 //add for SwWrapDlg end
1120 //add for SwTableWidthDlg begin
1121 VclAbstractDialog * SwAbstractDialogFactory_Impl::CreateSwTableWidthDlg ( Window *pParent, SwTableFUNC &rFnc , int nResId )
1123 Dialog* pDlg=NULL;
1124 switch ( nResId )
1126 case DLG_COL_WIDTH :
1127 pDlg = new SwTableWidthDlg( pParent, rFnc);
1128 break;
1130 default:
1131 break;
1134 if ( pDlg )
1135 return new VclAbstractDialog_Impl( pDlg );
1136 return 0;
1138 //add for SwTableWidthDlg end
1140 //add for SwTableTabDlg begin
1141 SfxAbstractTabDialog* SwAbstractDialogFactory_Impl::CreateSwTableTabDlg( Window* pParent, SfxItemPool& Pool,
1142 const SfxItemSet* pItemSet, SwWrtShell* pSh,int nResId )
1144 SfxTabDialog* pDlg=NULL;
1145 switch ( nResId )
1147 case DLG_FORMAT_TABLE :
1148 pDlg = new SwTableTabDlg( pParent, Pool, pItemSet,pSh );
1149 break;
1151 default:
1152 break;
1155 if ( pDlg )
1156 return new AbstractTabDialog_Impl( pDlg );
1157 return 0;
1159 //add for SwTableTabDlg end
1161 //add for SwFldDlg begin
1162 AbstractSwFldDlg * SwAbstractDialogFactory_Impl::CreateSwFldDlg ( SfxBindings* pB, SwChildWinWrapper* pCW, Window *pParent, int nResId )
1164 SwFldDlg* pDlg=NULL;
1165 switch ( nResId )
1167 case DLG_FLD_INSERT :
1168 pDlg = new SwFldDlg( pB, pCW,pParent);
1169 break;
1171 default:
1172 break;
1175 if ( pDlg )
1176 return new AbstractSwFldDlg_Impl( pDlg );
1177 return 0;
1179 //add for SwFldDlg end
1181 //add for SwFldEditDlg begin
1182 SfxAbstractDialog* SwAbstractDialogFactory_Impl::CreateSwFldEditDlg ( SwView& rVw, int nResId )
1184 SfxModalDialog* pDlg=NULL;
1185 switch ( nResId )
1187 case RC_DLG_SWFLDEDITDLG :
1188 pDlg = new SwFldEditDlg( rVw );
1189 break;
1190 default:
1191 break;
1194 if ( pDlg )
1195 return new AbstractSfxDialog_Impl( pDlg );
1196 return 0;
1198 //add for SwFldEditDlg
1200 //add for SwRenameXNamedDlg begin
1201 AbstractSwRenameXNamedDlg * SwAbstractDialogFactory_Impl::CreateSwRenameXNamedDlg( Window* pParent,
1202 STAR_REFERENCE( container::XNamed ) & xNamed,
1203 STAR_REFERENCE( container::XNameAccess ) & xNameAccess,int nResId )
1205 SwRenameXNamedDlg* pDlg=NULL;
1206 switch ( nResId )
1208 case DLG_RENAME_XNAMED :
1209 pDlg = new SwRenameXNamedDlg( pParent,xNamed, xNameAccess);
1210 break;
1211 default:
1212 break;
1215 if ( pDlg )
1216 return new AbstractSwRenameXNamedDlg_Impl( pDlg );
1217 return 0;
1220 //add for SwRenameXNamedDlg end
1222 //add for SwModalRedlineAcceptDlg begin
1223 AbstractSwModalRedlineAcceptDlg * SwAbstractDialogFactory_Impl::CreateSwModalRedlineAcceptDlg ( Window *pParent, int nResId )
1225 SwModalRedlineAcceptDlg* pDlg=NULL;
1226 switch ( nResId )
1228 case DLG_MOD_REDLINE_ACCEPT :
1229 pDlg = new SwModalRedlineAcceptDlg( pParent );
1230 break;
1231 default:
1232 break;
1235 if ( pDlg )
1236 return new AbstractSwModalRedlineAcceptDlg_Impl( pDlg );
1237 return 0;
1239 //add for SwModalRedlineAcceptDlg end
1241 VclAbstractDialog * SwAbstractDialogFactory_Impl::CreateSwVclDialog( int nResId,
1242 Window* pParent, BOOL& rWithPrev ) //add for SwMergeTblDlg
1244 Dialog* pDlg=NULL;
1245 switch ( nResId )
1247 case DLG_MERGE_TABLE :
1248 pDlg = new SwMergeTblDlg( pParent, rWithPrev );
1249 break;
1250 default:
1251 break;
1253 if ( pDlg )
1254 return new VclAbstractDialog_Impl( pDlg );
1255 return 0;
1257 SfxAbstractTabDialog* SwAbstractDialogFactory_Impl::CreateFrmTabDialog( int nResId,
1258 SfxViewFrame *pFrame, Window *pParent,
1259 const SfxItemSet& rCoreSet,
1260 BOOL bNewFrm,
1261 USHORT nResType,
1262 BOOL bFmt,
1263 UINT16 nDefPage,
1264 const String* pFmtStr ) //add for SwFrmDlg
1266 SfxTabDialog* pDlg=NULL;
1267 switch ( nResId )
1269 case DLG_FRM_GRF :
1270 case DLG_FRM_OLE :
1271 case DLG_FRM_STD :
1272 pDlg = new SwFrmDlg( pFrame, pParent, rCoreSet, bNewFrm, nResType, bFmt, nDefPage, pFmtStr );
1273 break;
1274 default:
1275 break;
1278 if ( pDlg )
1279 return new AbstractTabDialog_Impl( pDlg );
1280 return 0;
1283 SfxAbstractTabDialog* SwAbstractDialogFactory_Impl::CreateTemplateDialog( int nResId,
1284 Window* pParent,
1285 SfxStyleSheetBase& rBase,
1286 USHORT nRegion,
1287 BOOL bColumn,
1288 SwWrtShell* pActShell,
1289 BOOL bNew ) //add for SwTemplateDlg
1291 SfxTabDialog* pDlg=NULL;
1292 switch ( nResId )
1294 case DLG_TEMPLATE_BASE :
1295 pDlg = new SwTemplateDlg( pParent, rBase, nRegion, bColumn, pActShell, bNew );
1296 break;
1297 default:
1298 break;
1301 if ( pDlg )
1302 return new AbstractTabDialog_Impl( pDlg );
1303 return 0;
1306 AbstractGlossaryDlg* SwAbstractDialogFactory_Impl::CreateGlossaryDlg( int nResId,
1307 SfxViewFrame* pViewFrame,
1308 SwGlossaryHdl* pGlosHdl,
1309 SwWrtShell *pWrtShell) //add for SwGlossaryDlg
1311 SwGlossaryDlg* pDlg=NULL;
1312 switch ( nResId )
1314 case DLG_RENAME_GLOS :
1315 pDlg = new SwGlossaryDlg( pViewFrame, pGlosHdl, pWrtShell );
1316 break;
1317 default:
1318 break;
1320 if ( pDlg )
1321 return new AbstractGlossaryDlg_Impl( pDlg );
1322 return 0;
1325 AbstractFldInputDlg* SwAbstractDialogFactory_Impl::CreateFldInputDlg( int nResId,
1326 Window *pParent, SwWrtShell &rSh,
1327 SwField* pField, BOOL bNextButton ) //add for SwFldInputDlg
1329 SwFldInputDlg* pDlg=NULL;
1330 switch ( nResId )
1332 case DLG_FLD_INPUT :
1333 pDlg = new SwFldInputDlg( pParent, rSh, pField, bNextButton );
1334 break;
1335 default:
1336 break;
1338 if ( pDlg )
1339 return new AbstractFldInputDlg_Impl( pDlg );
1340 return 0;
1343 AbstractInsFootNoteDlg* SwAbstractDialogFactory_Impl::CreateInsFootNoteDlg( int nResId,
1344 Window * pParent, SwWrtShell &rSh, BOOL bEd ) //add for SwInsFootNoteDlg
1346 SwInsFootNoteDlg* pDlg=NULL;
1347 switch ( nResId )
1349 case DLG_INS_FOOTNOTE :
1350 pDlg = new SwInsFootNoteDlg( pParent, rSh, bEd );
1351 break;
1352 default:
1353 break;
1355 if ( pDlg )
1356 return new AbstractInsFootNoteDlg_Impl( pDlg );
1357 return 0;
1360 VclAbstractDialog * SwAbstractDialogFactory_Impl::CreateVclSwViewDialog( int nResId,
1361 SwView& rView, BOOL /*bCol*/ ) //add for SwInsRowColDlg, SwLineNumberingDlg
1363 Dialog* pDlg=NULL;
1364 switch ( nResId )
1366 case DLG_LINE_NUMBERING :
1367 pDlg = new SwLineNumberingDlg( &rView );
1368 break;
1369 default:
1370 break;
1373 if ( pDlg )
1374 return new VclAbstractDialog_Impl( pDlg );
1375 return 0;
1378 AbstractInsertGrfRulerDlg * SwAbstractDialogFactory_Impl::CreateInsertGrfRulerDlg( int nResId,
1379 Window * pParent ) //add for SwInsertGrfRulerDlg
1381 SwInsertGrfRulerDlg* pDlg=NULL;
1382 switch ( nResId )
1384 case DLG_INSERT_RULER :
1385 pDlg = new SwInsertGrfRulerDlg( pParent );
1386 break;
1387 default:
1388 break;
1391 if ( pDlg )
1392 return new AbstractInsertGrfRulerDlg_Impl( pDlg );
1393 return 0;
1396 AbstractInsTableDlg * SwAbstractDialogFactory_Impl::CreateInsTableDlg( int nResId,
1397 SwView& rView ) //add for SwInsTableDlg
1399 SwInsTableDlg* pDlg=NULL;
1400 switch ( nResId )
1402 case DLG_INSERT_TABLE :
1403 pDlg = new SwInsTableDlg( rView );
1404 break;
1405 default:
1406 break;
1408 if ( pDlg )
1409 return new AbstractInsTableDlg_Impl( pDlg );
1410 return 0;
1413 AbstractJavaEditDialog * SwAbstractDialogFactory_Impl::CreateJavaEditDialog( int nResId,
1414 Window* pParent, SwWrtShell* pWrtSh ) //add for SwJavaEditDialog
1416 SwJavaEditDialog* pDlg=NULL;
1417 switch ( nResId )
1419 case DLG_JAVAEDIT :
1420 pDlg = new SwJavaEditDialog( pParent, pWrtSh );
1421 break;
1422 default:
1423 break;
1425 if ( pDlg )
1426 return new AbstractJavaEditDialog_Impl( pDlg );
1427 return 0;
1430 AbstractMailMergeDlg * SwAbstractDialogFactory_Impl::CreateMailMergeDlg( int nResId,
1431 Window* pParent, SwWrtShell& rSh,
1432 const String& rSourceName,
1433 const String& rTblName,
1434 sal_Int32 nCommandType,
1435 const uno::Reference< sdbc::XConnection>& xConnection,
1436 uno::Sequence< uno::Any >* pSelection ) //add for SwMailMergeDlg
1438 SwMailMergeDlg* pDlg=NULL;
1439 switch ( nResId )
1441 case DLG_MAILMERGE :
1442 pDlg = new SwMailMergeDlg( pParent, rSh, rSourceName, rTblName, nCommandType, xConnection, pSelection );
1443 break;
1444 default:
1445 break;
1447 if ( pDlg )
1448 return new AbstractMailMergeDlg_Impl( pDlg );
1449 return 0;
1451 AbstractMailMergeCreateFromDlg * SwAbstractDialogFactory_Impl::CreateMailMergeCreateFromDlg( int nResId,
1452 Window* pParent ) //add for SwMailMergeCreateFromDlg
1454 SwMailMergeCreateFromDlg* pDlg=NULL;
1455 switch ( nResId )
1457 case DLG_MERGE_CREATE :
1458 pDlg = new SwMailMergeCreateFromDlg( pParent );
1459 break;
1460 default:
1461 break;
1463 if ( pDlg )
1464 return new AbstractMailMergeCreateFromDlg_Impl( pDlg );
1465 return 0;
1467 AbstractMailMergeFieldConnectionsDlg * SwAbstractDialogFactory_Impl::CreateMailMergeFieldConnectionsDlg( int nResId,
1468 Window* pParent ) //add for SwMailMergeFieldConnectionsDlg
1470 SwMailMergeFieldConnectionsDlg* pDlg=NULL;
1471 switch ( nResId )
1473 case DLG_MERGE_FIELD_CONNECTIONS :
1474 pDlg = new SwMailMergeFieldConnectionsDlg( pParent );
1475 break;
1476 default:
1477 break;
1479 if ( pDlg )
1480 return new AbstractMailMergeFieldConnectionsDlg_Impl( pDlg );
1481 return 0;
1484 VclAbstractDialog * SwAbstractDialogFactory_Impl::CreateMultiTOXMarkDlg( int nResId,
1485 Window* pParent, SwTOXMgr &rTOXMgr ) //add for SwMultiTOXMarkDlg
1487 Dialog* pDlg=NULL;
1488 switch ( nResId )
1490 case DLG_MULTMRK :
1491 pDlg = new SwMultiTOXMarkDlg( pParent, rTOXMgr );
1492 break;
1493 default:
1494 break;
1496 if ( pDlg )
1497 return new VclAbstractDialog_Impl( pDlg );
1498 return 0;
1500 SfxAbstractTabDialog* SwAbstractDialogFactory_Impl::CreateSwTabDialog( int nResId,
1501 Window* pParent,
1502 const SfxItemSet* pSwItemSet,
1503 SwWrtShell & rWrtSh ) //add for SwSvxNumBulletTabDialog, SwOutlineTabDialog
1505 SfxTabDialog* pDlg=NULL;
1506 switch ( nResId )
1508 case DLG_SVXTEST_NUM_BULLET :
1509 pDlg = new SwSvxNumBulletTabDialog( pParent, pSwItemSet, rWrtSh );
1510 break;
1511 case DLG_TAB_OUTLINE :
1512 pDlg = new SwOutlineTabDialog( pParent, pSwItemSet, rWrtSh );
1513 break;
1515 default:
1516 break;
1518 if ( pDlg )
1519 return new AbstractTabDialog_Impl( pDlg );
1520 return 0;
1522 AbstractMultiTOXTabDialog * SwAbstractDialogFactory_Impl::CreateMultiTOXTabDialog( int nResId,
1523 Window* pParent, const SfxItemSet& rSet,
1524 SwWrtShell &rShell,
1525 SwTOXBase* pCurTOX, USHORT nToxType,
1526 BOOL bGlobal ) //add for SwMultiTOXTabDialog
1528 SwMultiTOXTabDialog* pDlg=NULL;
1529 switch ( nResId )
1531 case DLG_MULTI_TOX :
1532 pDlg = new SwMultiTOXTabDialog( pParent, rSet, rShell, pCurTOX, nToxType, bGlobal );
1533 break;
1534 default:
1535 break;
1537 if ( pDlg )
1538 return new AbstractMultiTOXTabDialog_Impl( pDlg );
1539 return 0;
1541 AbstractEditRegionDlg * SwAbstractDialogFactory_Impl::CreateEditRegionDlg( int nResId,
1542 Window* pParent, SwWrtShell& rWrtSh ) //add for SwEditRegionDlg
1544 SwEditRegionDlg* pDlg=NULL;
1545 switch ( nResId )
1547 case MD_EDIT_REGION :
1548 pDlg = new SwEditRegionDlg( pParent, rWrtSh );
1549 break;
1550 default:
1551 break;
1553 if ( pDlg )
1554 return new AbstractEditRegionDlg_Impl( pDlg );
1555 return 0;
1557 AbstractInsertSectionTabDialog * SwAbstractDialogFactory_Impl::CreateInsertSectionTabDialog( int nResId,
1558 Window* pParent, const SfxItemSet& rSet, SwWrtShell& rSh) //add for SwInsertSectionTabDialog
1560 SwInsertSectionTabDialog* pDlg=NULL;
1561 switch ( nResId )
1563 case DLG_INSERT_SECTION :
1564 pDlg = new SwInsertSectionTabDialog( pParent, rSet, rSh );
1565 break;
1566 default:
1567 break;
1569 if ( pDlg )
1570 return new AbstractInsertSectionTabDialog_Impl( pDlg );
1571 return 0;
1574 AbstractMarkFloatDlg * SwAbstractDialogFactory_Impl::CreateIndexMarkFloatDlg( int nResId,
1575 SfxBindings* pBindings,
1576 SfxChildWindow* pChild,
1577 Window *pParent,
1578 SfxChildWinInfo* pInfo,
1579 sal_Bool bNew ) //add for SwIndexMarkFloatDlg
1581 SwIndexMarkFloatDlg* pDlg=NULL;
1582 switch ( nResId )
1584 case DLG_INSIDXMARK_CJK :
1585 case DLG_INSIDXMARK :
1586 pDlg = new SwIndexMarkFloatDlg( pBindings, pChild, pParent, pInfo, bNew );
1587 break;
1588 default:
1589 break;
1591 if ( pDlg )
1592 return new AbstractIndexMarkFloatDlg_Impl( pDlg );
1593 return 0;
1596 AbstractMarkFloatDlg * SwAbstractDialogFactory_Impl::CreateAuthMarkFloatDlg( int nResId,
1597 SfxBindings* pBindings,
1598 SfxChildWindow* pChild,
1599 Window *pParent,
1600 SfxChildWinInfo* pInfo,
1601 sal_Bool bNew ) //add for SwAuthMarkFloatDlg
1603 SwAuthMarkFloatDlg* pDlg=NULL;
1604 switch ( nResId )
1606 case DLG_INSAUTHMARK :
1607 pDlg = new SwAuthMarkFloatDlg( pBindings, pChild, pParent, pInfo, bNew );
1608 break;
1609 default:
1610 break;
1612 if ( pDlg )
1613 return new AbstractAuthMarkFloatDlg_Impl( pDlg );
1614 return 0;
1617 //add for SwIndexMarkModalDlg begin
1618 VclAbstractDialog * SwAbstractDialogFactory_Impl::CreateIndexMarkModalDlg( int nResId,
1619 Window *pParent, SwWrtShell& rSh, SwTOXMark* pCurTOXMark ) //add for SwIndexMarkModalDlg
1621 Dialog* pDlg=NULL;
1622 switch ( nResId )
1624 case DLG_EDIT_IDXMARK_CJK :
1625 case DLG_EDIT_IDXMARK :
1626 pDlg = new SwIndexMarkModalDlg( pParent, rSh, pCurTOXMark );
1627 break;
1629 default:
1630 break;
1633 if ( pDlg )
1634 return new VclAbstractDialog_Impl( pDlg );
1635 return 0;
1637 //add for SwIndexMarkModalDlg end
1638 AbstractMailMergeWizard* SwAbstractDialogFactory_Impl::CreateMailMergeWizard(
1639 SwView& rView, SwMailMergeConfigItem& rConfigItem)
1641 return new AbstractMailMergeWizard_Impl( new SwMailMergeWizard(rView, rConfigItem));
1644 //add for static func in SwGlossaryDlg
1645 GlossaryGetCurrGroup SwAbstractDialogFactory_Impl::GetGlossaryCurrGroupFunc( USHORT nId )
1647 switch ( nId )
1649 case DLG_RENAME_GLOS :
1650 return SwGlossaryDlg::GetCurrGroup;
1651 default:
1652 break;
1654 return 0;
1656 GlossarySetActGroup SwAbstractDialogFactory_Impl::SetGlossaryActGroupFunc( USHORT nId )
1658 switch ( nId )
1660 case DLG_RENAME_GLOS :
1661 return SwGlossaryDlg::SetActGroup;
1662 default:
1663 break;
1665 return 0;
1668 //------------------ Factories for TabPages
1669 CreateTabPage SwAbstractDialogFactory_Impl::GetTabPageCreatorFunc( USHORT nId )
1671 CreateTabPage pRet = 0;
1672 switch ( nId )
1674 case TP_OPTCOMPATIBILITY_PAGE :
1675 case RID_SW_TP_OPTCOMPATIBILITY_PAGE :
1676 pRet = SwCompatibilityOptPage::Create;
1677 break;
1678 case TP_OPTLOAD_PAGE :
1679 case RID_SW_TP_OPTLOAD_PAGE :
1680 pRet = SwLoadOptPage::Create;
1681 break;
1682 case TP_OPTCAPTION_PAGE:
1683 case RID_SW_TP_OPTCAPTION_PAGE:
1684 return SwCaptionOptPage::Create;
1685 case TP_CONTENT_OPT :
1686 case RID_SW_TP_CONTENT_OPT:
1687 case RID_SW_TP_HTML_CONTENT_OPT:
1688 pRet = SwContentOptPage::Create;
1689 break;
1690 case TP_OPTSHDWCRSR :
1691 case RID_SW_TP_OPTSHDWCRSR:
1692 case RID_SW_TP_HTML_OPTSHDWCRSR:
1693 pRet = SwShdwCrsrOptionsTabPage::Create;
1694 break;
1695 case RID_SW_TP_REDLINE_OPT :
1696 case TP_REDLINE_OPT :
1697 pRet = SwRedlineOptionsTabPage::Create;
1698 break;
1699 case RID_SW_TP_OPTTEST_PAGE :
1700 case TP_OPTTEST_PAGE :
1701 #ifndef PRODUCT
1702 pRet = SwTestTabPage::Create;
1703 #endif
1704 break;
1705 case TP_OPTPRINT_PAGE :
1706 case RID_SW_TP_HTML_OPTPRINT_PAGE:
1707 case RID_SW_TP_OPTPRINT_PAGE:
1708 pRet = SwAddPrinterTabPage::Create;
1709 break;
1710 case TP_STD_FONT :
1711 case RID_SW_TP_STD_FONT:
1712 case RID_SW_TP_STD_FONT_CJK:
1713 case RID_SW_TP_STD_FONT_CTL:
1714 pRet = SwStdFontTabPage::Create;
1715 break;
1716 case TP_OPTTABLE_PAGE :
1717 case RID_SW_TP_HTML_OPTTABLE_PAGE:
1718 case RID_SW_TP_OPTTABLE_PAGE:
1719 pRet = SwTableOptionsTabPage::Create;
1720 break;
1721 case TP_DOC_STAT :
1722 pRet = SwDocStatPage::Create;
1723 break;
1724 case RID_SW_TP_MAILCONFIG:
1725 pRet = SwMailConfigPage::Create;
1726 break;
1729 return pRet;
1732 GetTabPageRanges SwAbstractDialogFactory_Impl::GetTabPageRangesFunc( USHORT nId )
1734 switch ( nId )
1736 case 1 : //RID_SVXPAGE_TEXTANIMATION :
1737 //return SvxTextAnimationPage::GetRanges;
1738 break;
1739 default:
1740 break;
1743 return 0;