1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: appopt.cxx,v $
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"
33 #include <hintids.hxx>
35 #include <cmdid.h> // Funktion-Ids
38 #define _SVSTDARR_STRINGSDTOR
39 #include <svtools/svstdarr.hxx>
41 #ifndef _MSGBOX_HXX //autogen
42 #include <vcl/msgbox.hxx>
44 #include <svtools/eitem.hxx>
45 #include <sfx2/request.hxx>
46 #include <sfx2/app.hxx>
47 #include <sfx2/printer.hxx>
48 #include <svx/htmlmode.hxx>
49 #include <sfx2/bindings.hxx>
50 #include <svx/brshitem.hxx>
51 #ifndef _SVX_TSTPITEM_HXX //autogen
52 #include <svx/tstpitem.hxx>
54 #include <svx/optgrid.hxx>
55 #include <svx/svxdlg.hxx>
56 #include <svx/dialogs.hrc>
57 #include <fontcfg.hxx>
58 #include <optload.hxx>
59 #include <optcomp.hxx>
61 #include <swmodule.hxx>
66 #ifndef IDOCUMENTDEVICEACCESS_HXX_INCLUDED
67 #include <IDocumentDeviceAccess.hxx>
70 #include <initui.hxx> // fuer ::GetGlossaries()
71 #include <fldbas.hxx> //fuer UpdateFields
75 #include <cfgitems.hxx>
80 #include <usrpref.hxx>
84 #include <glosdoc.hxx>
85 #include <uiitems.hxx>
86 #include <svx/langitem.hxx>
87 #include <svtools/lingucfg.hxx>
88 #include <svx/unolingu.hxx>
91 #include <globals.hrc>
93 #include <globals.h> // globale Konstanten z.B.
94 #include <svtools/slstitm.hxx>
95 #include "swabstdlg.hxx"
96 #include <swwrtshitem.hxx>
100 using namespace ::com::sun::star::uno
;
101 using namespace ::com::sun::star::lang
;
103 /* -----------------12.02.99 12:28-------------------
105 * --------------------------------------------------*/
107 SfxItemSet
* SwModule::CreateItemSet( USHORT nId
)
109 BOOL bTextDialog
= (nId
== SID_SW_EDITOPTIONS
) ? TRUE
: FALSE
;
111 // hier werden die Optionen fuer die Web- und den Textdialog zusmmengesetzt
112 SwViewOption aViewOpt
= *GetUsrPref(!bTextDialog
);
113 SwMasterUsrPref
* pPref
= bTextDialog
? pUsrPref
: pWebUsrPref
;
114 //kein MakeUsrPref, da hier nur die Optionen von Textdoks genommen werden duerfen
115 SwView
* pAppView
= GetView();
116 if(pAppView
&& pAppView
->GetViewFrame() != SfxViewFrame::Current())
120 // wenn Text dann nicht WebView und umgekehrt
121 BOOL bWebView
= 0 != PTR_CAST(SwWebView
, pAppView
);
122 if( (bWebView
&& !bTextDialog
) ||(!bWebView
&& bTextDialog
))
124 aViewOpt
= *pAppView
->GetWrtShell().GetViewOptions();
127 pAppView
= 0; // mit View kann hier nichts gewonnen werden
130 /********************************************************************/
132 /* Optionen/Bearbeiten */
134 /********************************************************************/
135 SfxItemSet
* pRet
= new SfxItemSet (GetPool(), FN_PARAM_DOCDISP
, FN_PARAM_ELEM
,
136 SID_PRINTPREVIEW
, SID_PRINTPREVIEW
,
137 SID_ATTR_GRID_OPTIONS
, SID_ATTR_GRID_OPTIONS
,
138 FN_PARAM_PRINTER
, FN_PARAM_STDFONTS
,
139 FN_PARAM_WRTSHELL
, FN_PARAM_WRTSHELL
,
140 FN_PARAM_ADDPRINTER
, FN_PARAM_ADDPRINTER
,
141 SID_ATTR_METRIC
, SID_ATTR_METRIC
,
142 SID_ATTR_APPLYCHARUNIT
, SID_ATTR_APPLYCHARUNIT
,
143 SID_ATTR_DEFTABSTOP
, SID_ATTR_DEFTABSTOP
,
144 RES_BACKGROUND
, RES_BACKGROUND
,
145 SID_HTML_MODE
, SID_HTML_MODE
,
146 FN_PARAM_SHADOWCURSOR
, FN_PARAM_SHADOWCURSOR
,
147 FN_PARAM_CRSR_IN_PROTECTED
, FN_PARAM_CRSR_IN_PROTECTED
,
148 FN_HSCROLL_METRIC
, FN_VSCROLL_METRIC
,
149 SID_ATTR_LANGUAGE
, SID_ATTR_LANGUAGE
,
150 SID_ATTR_CHAR_CJK_LANGUAGE
, SID_ATTR_CHAR_CJK_LANGUAGE
,
151 SID_ATTR_CHAR_CTL_LANGUAGE
, SID_ATTR_CHAR_CTL_LANGUAGE
,
153 FN_PARAM_SWTEST
, FN_PARAM_SWTEST
,
157 pRet
->Put( SwDocDisplayItem( aViewOpt
, FN_PARAM_DOCDISP
) );
158 pRet
->Put( SwElemItem( aViewOpt
, FN_PARAM_ELEM
) );
161 pRet
->Put( SwShadowCursorItem( aViewOpt
, FN_PARAM_SHADOWCURSOR
));
162 pRet
->Put( SfxBoolItem(FN_PARAM_CRSR_IN_PROTECTED
, aViewOpt
.IsCursorInProtectedArea()));
167 SwWrtShell
& rWrtShell
= pAppView
->GetWrtShell();
169 SfxPrinter
* pPrt
= rWrtShell
.getIDocumentDeviceAccess()->getPrinter( false );
171 pRet
->Put(SwPtrItem(FN_PARAM_PRINTER
, pPrt
));
172 pRet
->Put(SwPtrItem(FN_PARAM_WRTSHELL
, &rWrtShell
));
174 pRet
->Put((const SvxLanguageItem
&)
175 rWrtShell
.GetDefault(RES_CHRATR_LANGUAGE
), SID_ATTR_LANGUAGE
);
177 pRet
->Put((const SvxLanguageItem
&)
178 rWrtShell
.GetDefault(RES_CHRATR_CJK_LANGUAGE
), SID_ATTR_CHAR_CJK_LANGUAGE
);
180 pRet
->Put((const SvxLanguageItem
&)
181 rWrtShell
.GetDefault(RES_CHRATR_CTL_LANGUAGE
), SID_ATTR_CHAR_CTL_LANGUAGE
);
185 /* Der Drucker wird jetzt von der TabPage erzeugt und auch geloescht
186 * SfxItemSet* pSet = new SfxItemSet( SFX_APP()->GetPool(),
187 SID_PRINTER_NOTFOUND_WARN, SID_PRINTER_NOTFOUND_WARN,
188 SID_PRINTER_CHANGESTODOC, SID_PRINTER_CHANGESTODOC,
191 pPrt = new SfxPrinter(pSet);
192 pRet->Put(SwPtrItem(FN_PARAM_PRINTER, pPrt));*/
194 SvtLinguConfig aLinguCfg
;
196 Any aLang
= aLinguCfg
.GetProperty(C2U("DefaultLocale"));
199 pRet
->Put(SvxLanguageItem(SvxLocaleToLanguage( aLocale
), SID_ATTR_LANGUAGE
));
201 aLang
= aLinguCfg
.GetProperty(C2U("DefaultLocale_CJK"));
203 pRet
->Put(SvxLanguageItem(SvxLocaleToLanguage( aLocale
), SID_ATTR_CHAR_CJK_LANGUAGE
));
205 aLang
= aLinguCfg
.GetProperty(C2U("DefaultLocale_CTL"));
207 pRet
->Put(SvxLanguageItem(SvxLocaleToLanguage( aLocale
), SID_ATTR_CHAR_CTL_LANGUAGE
));
210 pRet
->Put(SwPtrItem(FN_PARAM_STDFONTS
, GetStdFontConfig()));
211 if( PTR_CAST( SwPagePreView
, SfxViewShell::Current())!=0)
213 SfxBoolItem
aBool(SfxBoolItem(SID_PRINTPREVIEW
, TRUE
));
217 FieldUnit eUnit
= pPref
->GetHScrollMetric();
219 pAppView
->GetHLinealMetric(eUnit
);
220 pRet
->Put(SfxUInt16Item( FN_HSCROLL_METRIC
, static_cast< UINT16
>(eUnit
)));
222 eUnit
= pPref
->GetVScrollMetric();
224 pAppView
->GetVLinealMetric(eUnit
);
225 pRet
->Put(SfxUInt16Item( FN_VSCROLL_METRIC
, static_cast< UINT16
>(eUnit
) ));
226 pRet
->Put(SfxUInt16Item( SID_ATTR_METRIC
, static_cast< UINT16
>(pPref
->GetMetric()) ));
227 pRet
->Put(SfxBoolItem(SID_ATTR_APPLYCHARUNIT
, pPref
->IsApplyCharUnit()));
232 const SvxTabStopItem
& rDefTabs
=
233 (const SvxTabStopItem
&)pAppView
->GetWrtShell().
234 GetDefault(RES_PARATR_TABSTOP
);
235 pRet
->Put( SfxUInt16Item( SID_ATTR_DEFTABSTOP
, (USHORT
)::GetTabDist(rDefTabs
)));
238 pRet
->Put(SfxUInt16Item( SID_ATTR_DEFTABSTOP
, (UINT16
)pPref
->GetDefTab()));
241 /*-----------------01.02.97 11.13-------------------
242 Optionen fuer GridTabPage
243 --------------------------------------------------*/
245 SvxGridItem
aGridItem( SID_ATTR_GRID_OPTIONS
);
247 aGridItem
.SetUseGridSnap( aViewOpt
.IsSnap());
248 aGridItem
.SetSynchronize( aViewOpt
.IsSynchronize());
249 aGridItem
.SetGridVisible( aViewOpt
.IsGridVisible());
251 const Size
& rSnapSize
= aViewOpt
.GetSnapSize();
252 aGridItem
.SetFldDrawX( (USHORT
) (rSnapSize
.Width() ));
253 aGridItem
.SetFldDrawY( (USHORT
) (rSnapSize
.Height()));
255 aGridItem
.SetFldDivisionX( aViewOpt
.GetDivisionX());
256 aGridItem
.SetFldDivisionY( aViewOpt
.GetDivisionY());
258 pRet
->Put(aGridItem
);
260 /*-----------------01.02.97 13.02-------------------
261 Optionen fuer PrintTabPage
262 --------------------------------------------------*/
263 SwPrintData
* pOpt
= pAppView
?
264 pAppView
->GetWrtShell().getIDocumentDeviceAccess()->getPrintData() :
268 pOpt
= GetPrtOptions(!bTextDialog
);
270 SwAddPrinterItem
aAddPrinterItem (FN_PARAM_ADDPRINTER
, *pOpt
);
271 pRet
->Put(aAddPrinterItem
);
273 /*-----------------01.02.97 13.12-------------------
274 Optionen fuer Web-Hintergrund
275 --------------------------------------------------*/
278 pRet
->Put(SvxBrushItem(aViewOpt
.GetRetoucheColor(), RES_BACKGROUND
));
282 /*-----------------01.02.97 13.02-------------------
284 --------------------------------------------------*/
285 SwTestItem
aTestItem(FN_PARAM_SWTEST
);
286 aTestItem
.bTest1
= aViewOpt
.IsTest1();
287 aTestItem
.bTest2
= aViewOpt
.IsTest2();
288 aTestItem
.bTest3
= aViewOpt
.IsTest3();
289 aTestItem
.bTest4
= aViewOpt
.IsTest4();
290 aTestItem
.bTest5
= aViewOpt
.IsTest5();
291 aTestItem
.bTest6
= aViewOpt
.IsTest6();
292 aTestItem
.bTest7
= aViewOpt
.IsTest7();
293 aTestItem
.bTest8
= aViewOpt
.IsTest8();
294 aTestItem
.bTest9
= SwViewOption::IsTest9();
295 aTestItem
.bTest10
= aViewOpt
.IsTest10();
296 pRet
->Put(aTestItem
);
298 /*-----------------01.02.97 13.04-------------------
300 --------------------------------------------------*/
302 pRet
->Put(SfxUInt16Item(SID_HTML_MODE
, HTMLMODE_ON
));
306 /* -----------------12.02.99 12:28-------------------
308 * --------------------------------------------------*/
309 void SwModule::ApplyItemSet( USHORT nId
, const SfxItemSet
& rSet
)
311 BOOL bTextDialog
= nId
== SID_SW_EDITOPTIONS
;
312 SwView
* pAppView
= GetView();
313 if(pAppView
&& pAppView
->GetViewFrame() != SfxViewFrame::Current())
317 // the text dialog mustn't apply data to the web view and vice versa
318 BOOL bWebView
= 0 != PTR_CAST(SwWebView
, pAppView
);
319 if( (bWebView
== bTextDialog
))
323 SwViewOption aViewOpt
= *GetUsrPref(!bTextDialog
);
324 SwMasterUsrPref
* pPref
= bTextDialog
? pUsrPref
: pWebUsrPref
;
326 const SfxPoolItem
* pItem
;
327 SfxBindings
*pBindings
= pAppView
? &pAppView
->GetViewFrame()->GetBindings()
330 /*---------------------------------------------------------------------
331 Seite Dokumentansicht auswerten
332 -----------------------------------------------------------------------*/
333 if( SFX_ITEM_SET
== rSet
.GetItemState(
334 FN_PARAM_DOCDISP
, FALSE
, &pItem
))
336 const SwDocDisplayItem
* pDocDispItem
= (const SwDocDisplayItem
*)pItem
;
338 if(!aViewOpt
.IsViewMetaChars())
340 if( (!aViewOpt
.IsTab( TRUE
) && pDocDispItem
->bTab
) ||
341 (!aViewOpt
.IsBlank( TRUE
) && pDocDispItem
->bSpace
) ||
342 (!aViewOpt
.IsParagraph( TRUE
) && pDocDispItem
->bParagraphEnd
) ||
343 (!aViewOpt
.IsLineBreak( TRUE
) && pDocDispItem
->bManualBreak
) )
345 aViewOpt
.SetViewMetaChars(TRUE
);
347 pBindings
->Invalidate(FN_VIEW_META_CHARS
);
351 pDocDispItem
->FillViewOptions( aViewOpt
);
354 pBindings
->Invalidate(FN_VIEW_GRAPHIC
);
355 pBindings
->Invalidate(FN_VIEW_HIDDEN_PARA
);
359 /*---------------------------------------------------------------------
360 Elemente - Item auswerten
361 -----------------------------------------------------------------------*/
363 if( SFX_ITEM_SET
== rSet
.GetItemState(
364 FN_PARAM_ELEM
, FALSE
, &pItem
) )
366 const SwElemItem
* pElemItem
= (const SwElemItem
*)pItem
;
367 pElemItem
->FillViewOptions( aViewOpt
);
371 if( SFX_ITEM_SET
== rSet
.GetItemState(SID_ATTR_METRIC
,
374 SFX_APP()->SetOptions(rSet
);
375 const SfxUInt16Item
* pMetricItem
= (const SfxUInt16Item
*)pItem
;
376 ::SetDfltMetric((FieldUnit
)pMetricItem
->GetValue(), !bTextDialog
);
379 if( SFX_ITEM_SET
== rSet
.GetItemState(SID_ATTR_APPLYCHARUNIT
,
382 SFX_APP()->SetOptions(rSet
);
383 const SfxBoolItem
* pCharItem
= (const SfxBoolItem
*)pItem
;
384 ::SetApplyCharUnit(pCharItem
->GetValue(), !bTextDialog
);
387 if( SFX_ITEM_SET
== rSet
.GetItemState(FN_HSCROLL_METRIC
,
390 const SfxUInt16Item
* pMetricItem
= (const SfxUInt16Item
*)pItem
;
391 FieldUnit eUnit
= (FieldUnit
)pMetricItem
->GetValue();
392 pPref
->SetHScrollMetric(eUnit
);
394 pAppView
->ChangeTabMetric(eUnit
);
397 if( SFX_ITEM_SET
== rSet
.GetItemState(FN_VSCROLL_METRIC
,
400 const SfxUInt16Item
* pMetricItem
= (const SfxUInt16Item
*)pItem
;
401 FieldUnit eUnit
= (FieldUnit
)pMetricItem
->GetValue();
402 pPref
->SetVScrollMetric(eUnit
);
404 pAppView
->ChangeVLinealMetric(eUnit
);
407 if( SFX_ITEM_SET
== rSet
.GetItemState(SID_ATTR_DEFTABSTOP
,
410 USHORT nTabDist
= ((const SfxUInt16Item
*)pItem
)->GetValue();
411 pPref
->SetDefTab(nTabDist
);
414 SvxTabStopItem
aDefTabs( 0, 0, SVX_TAB_ADJUST_DEFAULT
, RES_PARATR_TABSTOP
);
415 MakeDefTabs( nTabDist
, aDefTabs
);
416 pAppView
->GetWrtShell().SetDefault( aDefTabs
);
421 /*-----------------01.02.97 11.36-------------------
422 Hintergrund nur im WebDialog
423 --------------------------------------------------*/
424 if(SFX_ITEM_SET
== rSet
.GetItemState(RES_BACKGROUND
))
426 const SvxBrushItem
& rBrushItem
= (const SvxBrushItem
&)rSet
.Get(
428 aViewOpt
.SetRetoucheColor( rBrushItem
.GetColor() );
431 /*--------------------------------------------------------------------
432 Seite Rastereinstellungen auswerten
433 ----------------------------------------------------------------------*/
435 if( SFX_ITEM_SET
== rSet
.GetItemState(
436 SID_ATTR_GRID_OPTIONS
, FALSE
, &pItem
))
438 const SvxGridItem
* pGridItem
= (const SvxGridItem
*)pItem
;
440 aViewOpt
.SetSnap( pGridItem
->GetUseGridSnap() );
441 aViewOpt
.SetSynchronize(pGridItem
->GetSynchronize());
442 if( aViewOpt
.IsGridVisible() != pGridItem
->GetGridVisible() )
443 aViewOpt
.SetGridVisible( pGridItem
->GetGridVisible());
444 Size aSize
= Size( pGridItem
->GetFldDrawX() ,
445 pGridItem
->GetFldDrawY() );
446 if( aViewOpt
.GetSnapSize() != aSize
)
447 aViewOpt
.SetSnapSize( aSize
);
448 short nDiv
= (short)pGridItem
->GetFldDivisionX() ;
449 if( aViewOpt
.GetDivisionX() != nDiv
)
450 aViewOpt
.SetDivisionX( nDiv
);
451 nDiv
= (short)pGridItem
->GetFldDivisionY();
452 if( aViewOpt
.GetDivisionY() != nDiv
)
453 aViewOpt
.SetDivisionY( nDiv
);
457 pBindings
->Invalidate(SID_GRID_VISIBLE
);
458 pBindings
->Invalidate(SID_GRID_USE
);
462 //--------------------------------------------------------------------------
463 // Writer Drucker Zusatzeinstellungen auswerten
464 //----------------------------------------------------------------------------
466 if( SFX_ITEM_SET
== rSet
.GetItemState(
467 FN_PARAM_ADDPRINTER
, FALSE
, &pItem
))
469 SwPrintOptions
* pOpt
= GetPrtOptions(!bTextDialog
);
472 const SwAddPrinterItem
* pAddPrinterAttr
= (const SwAddPrinterItem
*)pItem
;
473 *pOpt
= *pAddPrinterAttr
;
476 pAppView
->GetWrtShell().getIDocumentDeviceAccess()->setPrintData( *pOpt
);
481 if( SFX_ITEM_SET
== rSet
.GetItemState(
482 FN_PARAM_SHADOWCURSOR
, FALSE
, &pItem
))
484 ((SwShadowCursorItem
*)pItem
)->FillViewOptions( aViewOpt
);
486 pBindings
->Invalidate(FN_SHADOWCURSOR
);
489 if( SFX_ITEM_SET
== rSet
.GetItemState(
490 FN_PARAM_CRSR_IN_PROTECTED
, FALSE
, &pItem
))
492 aViewOpt
.SetCursorInProtectedArea(((const SfxBoolItem
*)pItem
)->GetValue());
497 /*--------------------------------------------------------------------------
498 Writer Testseite auswerten
499 ----------------------------------------------------------------------------*/
501 if( SFX_ITEM_SET
== rSet
.GetItemState(
502 FN_PARAM_SWTEST
, FALSE
, &pItem
))
504 const SwTestItem
* pTestItem
= (const SwTestItem
*)pItem
;
505 aViewOpt
.SetTest1((BOOL
)pTestItem
->bTest1
);
506 aViewOpt
.SetTest2((BOOL
)pTestItem
->bTest2
);
507 aViewOpt
.SetTest3((BOOL
)pTestItem
->bTest3
);
508 aViewOpt
.SetTest4((BOOL
)pTestItem
->bTest4
);
509 aViewOpt
.SetTest5((BOOL
)pTestItem
->bTest5
);
510 aViewOpt
.SetTest6((BOOL
)pTestItem
->bTest6
);
511 aViewOpt
.SetTest7((BOOL
)pTestItem
->bTest7
);
512 aViewOpt
.SetTest8((BOOL
)pTestItem
->bTest8
);
513 SwViewOption::SetTest9((BOOL
)pTestItem
->bTest9
);
514 aViewOpt
.SetTest10((BOOL
)pTestItem
->bTest10
);
517 // dann an der akt. View und Shell die entsp. Elemente setzen
518 ApplyUsrPref( aViewOpt
, pAppView
,
519 bTextDialog
? VIEWOPT_DEST_TEXT
: VIEWOPT_DEST_WEB
);
521 /* -----------------12.02.99 12:28-------------------
523 * --------------------------------------------------*/
524 SfxTabPage
* SwModule::CreateTabPage( USHORT nId
, Window
* pParent
, const SfxItemSet
& rSet
)
526 SfxTabPage
* pRet
= NULL
;
527 SfxAllItemSet
aSet(*(rSet
.GetPool()));
530 case RID_SW_TP_CONTENT_OPT
:
531 case RID_SW_TP_HTML_CONTENT_OPT
:
533 SwAbstractDialogFactory
* pFact
= SwAbstractDialogFactory::Create();
536 ::CreateTabPage fnCreatePage
= pFact
->GetTabPageCreatorFunc( nId
);
538 pRet
= (*fnCreatePage
)( pParent
, rSet
);
542 case RID_SW_TP_HTML_OPTGRID_PAGE
:
543 case RID_SVXPAGE_GRID
:
544 pRet
= SvxGridTabPage::Create(pParent
, rSet
);
547 case RID_SW_TP_STD_FONT
:
548 case RID_SW_TP_STD_FONT_CJK
:
549 case RID_SW_TP_STD_FONT_CTL
:
551 SwAbstractDialogFactory
* pFact
= SwAbstractDialogFactory::Create();
554 ::CreateTabPage fnCreatePage
= pFact
->GetTabPageCreatorFunc( nId
);
556 pRet
= (*fnCreatePage
)( pParent
, rSet
);
558 if(RID_SW_TP_STD_FONT
!= nId
)
560 aSet
.Put (SfxUInt16Item(SID_FONTMODE_TYPE
, RID_SW_TP_STD_FONT_CJK
== nId
? FONT_GROUP_CJK
: FONT_GROUP_CTL
));
561 pRet
->PageCreated(aSet
);
565 case RID_SW_TP_HTML_OPTPRINT_PAGE
:
566 case RID_SW_TP_OPTPRINT_PAGE
:
568 SwAbstractDialogFactory
* pFact
= SwAbstractDialogFactory::Create();
571 ::CreateTabPage fnCreatePage
= pFact
->GetTabPageCreatorFunc( nId
);
573 pRet
= (*fnCreatePage
)( pParent
, rSet
);
575 aSet
.Put (SfxBoolItem(SID_FAX_LIST
, sal_True
));
576 pRet
->PageCreated(aSet
);
579 case RID_SW_TP_HTML_OPTTABLE_PAGE
:
580 case RID_SW_TP_OPTTABLE_PAGE
:
582 SwAbstractDialogFactory
* pFact
= SwAbstractDialogFactory::Create();
585 ::CreateTabPage fnCreatePage
= pFact
->GetTabPageCreatorFunc( nId
);
587 pRet
= (*fnCreatePage
)( pParent
, rSet
);
589 SwView
* pCurrView
= GetView();
592 // wenn Text dann nicht WebView und umgekehrt
593 BOOL bWebView
= 0 != PTR_CAST(SwWebView
, pCurrView
);
594 if( (bWebView
&& RID_SW_TP_HTML_OPTTABLE_PAGE
== nId
) ||
595 (!bWebView
&& RID_SW_TP_HTML_OPTTABLE_PAGE
!= nId
) )
597 aSet
.Put (SwWrtShellItem(SID_WRT_SHELL
,pCurrView
->GetWrtShellPtr()));
598 pRet
->PageCreated(aSet
);
603 case RID_SW_TP_OPTSHDWCRSR
:
604 case RID_SW_TP_HTML_OPTSHDWCRSR
:
605 case RID_SW_TP_REDLINE_OPT
:
606 case RID_SW_TP_OPTLOAD_PAGE
:
607 case RID_SW_TP_OPTCOMPATIBILITY_PAGE
:
608 case RID_SW_TP_MAILCONFIG
:
610 SwAbstractDialogFactory
* pFact
= SwAbstractDialogFactory::Create();
613 ::CreateTabPage fnCreatePage
= pFact
->GetTabPageCreatorFunc( nId
);
615 pRet
= (*fnCreatePage
)( pParent
, rSet
);
620 case RID_SW_TP_OPTTEST_PAGE
:
622 SwAbstractDialogFactory
* pFact
= SwAbstractDialogFactory::Create();
625 ::CreateTabPage fnCreatePage
= pFact
->GetTabPageCreatorFunc( nId
);
627 pRet
= (*fnCreatePage
)( pParent
, rSet
);
632 case RID_SW_TP_BACKGROUND
:
634 SfxAbstractDialogFactory
* pFact
= SfxAbstractDialogFactory::Create();
637 ::CreateTabPage fnCreatePage
= pFact
->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND
);
639 pRet
= (*fnCreatePage
)( pParent
, rSet
);
643 case TP_OPTCAPTION_PAGE
:
644 case RID_SW_TP_OPTCAPTION_PAGE
:
646 SwAbstractDialogFactory
* pFact
= SwAbstractDialogFactory::Create();
649 ::CreateTabPage fnCreatePage
= pFact
->GetTabPageCreatorFunc( RID_SW_TP_OPTCAPTION_PAGE
);
651 pRet
= (*fnCreatePage
)( pParent
, rSet
);
657 DBG_ASSERT( pRet
, "SwModule::CreateTabPage(): Unknown tabpage id" );