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 #include <com/sun/star/i18n/ScriptType.hpp>
40 #define _SVSTDARR_STRINGSDTOR
41 #include <svtools/svstdarr.hxx>
43 #ifndef _MSGBOX_HXX //autogen
44 #include <vcl/msgbox.hxx>
46 #include <svtools/eitem.hxx>
47 #include <sfx2/request.hxx>
48 #include <sfx2/app.hxx>
49 #include <sfx2/printer.hxx>
50 #include <svx/htmlmode.hxx>
51 #include <sfx2/bindings.hxx>
52 #include <svx/brshitem.hxx>
53 #ifndef _SVX_TSTPITEM_HXX //autogen
54 #include <svx/tstpitem.hxx>
56 #include <svx/optgrid.hxx>
57 #include <svx/svxdlg.hxx>
58 #include <svx/dialogs.hrc>
59 #include <i18npool/mslangid.hxx>
60 #include <fontcfg.hxx>
61 #include <optload.hxx>
62 #include <optcomp.hxx>
64 #include <swmodule.hxx>
69 #ifndef IDOCUMENTDEVICEACCESS_HXX_INCLUDED
70 #include <IDocumentDeviceAccess.hxx>
73 #include <initui.hxx> // fuer ::GetGlossaries()
74 #include <fldbas.hxx> //fuer UpdateFields
78 #include <cfgitems.hxx>
83 #include <usrpref.hxx>
87 #include <glosdoc.hxx>
88 #include <uiitems.hxx>
89 #include <svx/langitem.hxx>
90 #include <svtools/lingucfg.hxx>
91 #include <svx/unolingu.hxx>
94 #include <globals.hrc>
96 #include <globals.h> // globale Konstanten z.B.
97 #include <svtools/slstitm.hxx>
98 #include "swabstdlg.hxx"
99 #include <swwrtshitem.hxx>
103 using namespace ::com::sun::star::uno
;
104 using namespace ::com::sun::star::lang
;
106 /* -----------------12.02.99 12:28-------------------
108 * --------------------------------------------------*/
110 SfxItemSet
* SwModule::CreateItemSet( USHORT nId
)
112 BOOL bTextDialog
= (nId
== SID_SW_EDITOPTIONS
) ? TRUE
: FALSE
;
114 // hier werden die Optionen fuer die Web- und den Textdialog zusmmengesetzt
115 SwViewOption aViewOpt
= *GetUsrPref(!bTextDialog
);
116 SwMasterUsrPref
* pPref
= bTextDialog
? pUsrPref
: pWebUsrPref
;
117 //kein MakeUsrPref, da hier nur die Optionen von Textdoks genommen werden duerfen
118 SwView
* pAppView
= GetView();
119 if(pAppView
&& pAppView
->GetViewFrame() != SfxViewFrame::Current())
123 // wenn Text dann nicht WebView und umgekehrt
124 BOOL bWebView
= 0 != PTR_CAST(SwWebView
, pAppView
);
125 if( (bWebView
&& !bTextDialog
) ||(!bWebView
&& bTextDialog
))
127 aViewOpt
= *pAppView
->GetWrtShell().GetViewOptions();
130 pAppView
= 0; // mit View kann hier nichts gewonnen werden
133 /********************************************************************/
135 /* Optionen/Bearbeiten */
137 /********************************************************************/
138 SfxItemSet
* pRet
= new SfxItemSet (GetPool(), FN_PARAM_DOCDISP
, FN_PARAM_ELEM
,
139 SID_PRINTPREVIEW
, SID_PRINTPREVIEW
,
140 SID_ATTR_GRID_OPTIONS
, SID_ATTR_GRID_OPTIONS
,
141 FN_PARAM_PRINTER
, FN_PARAM_STDFONTS
,
142 FN_PARAM_WRTSHELL
, FN_PARAM_WRTSHELL
,
143 FN_PARAM_ADDPRINTER
, FN_PARAM_ADDPRINTER
,
144 SID_ATTR_METRIC
, SID_ATTR_METRIC
,
145 SID_ATTR_APPLYCHARUNIT
, SID_ATTR_APPLYCHARUNIT
,
146 SID_ATTR_DEFTABSTOP
, SID_ATTR_DEFTABSTOP
,
147 RES_BACKGROUND
, RES_BACKGROUND
,
148 SID_HTML_MODE
, SID_HTML_MODE
,
149 FN_PARAM_SHADOWCURSOR
, FN_PARAM_SHADOWCURSOR
,
150 FN_PARAM_CRSR_IN_PROTECTED
, FN_PARAM_CRSR_IN_PROTECTED
,
151 FN_HSCROLL_METRIC
, FN_VSCROLL_METRIC
,
152 SID_ATTR_LANGUAGE
, SID_ATTR_LANGUAGE
,
153 SID_ATTR_CHAR_CJK_LANGUAGE
, SID_ATTR_CHAR_CJK_LANGUAGE
,
154 SID_ATTR_CHAR_CTL_LANGUAGE
, SID_ATTR_CHAR_CTL_LANGUAGE
,
156 FN_PARAM_SWTEST
, FN_PARAM_SWTEST
,
160 pRet
->Put( SwDocDisplayItem( aViewOpt
, FN_PARAM_DOCDISP
) );
161 pRet
->Put( SwElemItem( aViewOpt
, FN_PARAM_ELEM
) );
164 pRet
->Put( SwShadowCursorItem( aViewOpt
, FN_PARAM_SHADOWCURSOR
));
165 pRet
->Put( SfxBoolItem(FN_PARAM_CRSR_IN_PROTECTED
, aViewOpt
.IsCursorInProtectedArea()));
170 SwWrtShell
& rWrtShell
= pAppView
->GetWrtShell();
172 SfxPrinter
* pPrt
= rWrtShell
.getIDocumentDeviceAccess()->getPrinter( false );
174 pRet
->Put(SwPtrItem(FN_PARAM_PRINTER
, pPrt
));
175 pRet
->Put(SwPtrItem(FN_PARAM_WRTSHELL
, &rWrtShell
));
177 pRet
->Put((const SvxLanguageItem
&)
178 rWrtShell
.GetDefault(RES_CHRATR_LANGUAGE
), SID_ATTR_LANGUAGE
);
180 pRet
->Put((const SvxLanguageItem
&)
181 rWrtShell
.GetDefault(RES_CHRATR_CJK_LANGUAGE
), SID_ATTR_CHAR_CJK_LANGUAGE
);
183 pRet
->Put((const SvxLanguageItem
&)
184 rWrtShell
.GetDefault(RES_CHRATR_CTL_LANGUAGE
), SID_ATTR_CHAR_CTL_LANGUAGE
);
188 /* Der Drucker wird jetzt von der TabPage erzeugt und auch geloescht
189 * SfxItemSet* pSet = new SfxItemSet( SFX_APP()->GetPool(),
190 SID_PRINTER_NOTFOUND_WARN, SID_PRINTER_NOTFOUND_WARN,
191 SID_PRINTER_CHANGESTODOC, SID_PRINTER_CHANGESTODOC,
194 pPrt = new SfxPrinter(pSet);
195 pRet->Put(SwPtrItem(FN_PARAM_PRINTER, pPrt));*/
197 SvtLinguConfig aLinguCfg
;
201 using namespace ::com::sun::star::i18n::ScriptType
;
203 Any aLang
= aLinguCfg
.GetProperty(C2U("DefaultLocale"));
205 nLang
= MsLangId::resolveSystemLanguageByScriptType(MsLangId::convertLocaleToLanguage(aLocale
), LATIN
);
206 pRet
->Put(SvxLanguageItem(nLang
, SID_ATTR_LANGUAGE
));
208 aLang
= aLinguCfg
.GetProperty(C2U("DefaultLocale_CJK"));
210 nLang
= MsLangId::resolveSystemLanguageByScriptType(MsLangId::convertLocaleToLanguage(aLocale
), ASIAN
);
211 pRet
->Put(SvxLanguageItem(nLang
, SID_ATTR_CHAR_CJK_LANGUAGE
));
213 aLang
= aLinguCfg
.GetProperty(C2U("DefaultLocale_CTL"));
215 nLang
= MsLangId::resolveSystemLanguageByScriptType(MsLangId::convertLocaleToLanguage(aLocale
), COMPLEX
);
216 pRet
->Put(SvxLanguageItem(nLang
, SID_ATTR_CHAR_CTL_LANGUAGE
));
219 pRet
->Put(SwPtrItem(FN_PARAM_STDFONTS
, GetStdFontConfig()));
220 if( PTR_CAST( SwPagePreView
, SfxViewShell::Current())!=0)
222 SfxBoolItem
aBool(SfxBoolItem(SID_PRINTPREVIEW
, TRUE
));
226 FieldUnit eUnit
= pPref
->GetHScrollMetric();
228 pAppView
->GetHLinealMetric(eUnit
);
229 pRet
->Put(SfxUInt16Item( FN_HSCROLL_METRIC
, static_cast< UINT16
>(eUnit
)));
231 eUnit
= pPref
->GetVScrollMetric();
233 pAppView
->GetVLinealMetric(eUnit
);
234 pRet
->Put(SfxUInt16Item( FN_VSCROLL_METRIC
, static_cast< UINT16
>(eUnit
) ));
235 pRet
->Put(SfxUInt16Item( SID_ATTR_METRIC
, static_cast< UINT16
>(pPref
->GetMetric()) ));
236 pRet
->Put(SfxBoolItem(SID_ATTR_APPLYCHARUNIT
, pPref
->IsApplyCharUnit()));
241 const SvxTabStopItem
& rDefTabs
=
242 (const SvxTabStopItem
&)pAppView
->GetWrtShell().
243 GetDefault(RES_PARATR_TABSTOP
);
244 pRet
->Put( SfxUInt16Item( SID_ATTR_DEFTABSTOP
, (USHORT
)::GetTabDist(rDefTabs
)));
247 pRet
->Put(SfxUInt16Item( SID_ATTR_DEFTABSTOP
, (UINT16
)pPref
->GetDefTab()));
250 /*-----------------01.02.97 11.13-------------------
251 Optionen fuer GridTabPage
252 --------------------------------------------------*/
254 SvxGridItem
aGridItem( SID_ATTR_GRID_OPTIONS
);
256 aGridItem
.SetUseGridSnap( aViewOpt
.IsSnap());
257 aGridItem
.SetSynchronize( aViewOpt
.IsSynchronize());
258 aGridItem
.SetGridVisible( aViewOpt
.IsGridVisible());
260 const Size
& rSnapSize
= aViewOpt
.GetSnapSize();
261 aGridItem
.SetFldDrawX( (USHORT
) (rSnapSize
.Width() ));
262 aGridItem
.SetFldDrawY( (USHORT
) (rSnapSize
.Height()));
264 aGridItem
.SetFldDivisionX( aViewOpt
.GetDivisionX());
265 aGridItem
.SetFldDivisionY( aViewOpt
.GetDivisionY());
267 pRet
->Put(aGridItem
);
269 /*-----------------01.02.97 13.02-------------------
270 Optionen fuer PrintTabPage
271 --------------------------------------------------*/
272 SwPrintData
* pOpt
= pAppView
?
273 pAppView
->GetWrtShell().getIDocumentDeviceAccess()->getPrintData() :
277 pOpt
= GetPrtOptions(!bTextDialog
);
279 SwAddPrinterItem
aAddPrinterItem (FN_PARAM_ADDPRINTER
, *pOpt
);
280 pRet
->Put(aAddPrinterItem
);
282 /*-----------------01.02.97 13.12-------------------
283 Optionen fuer Web-Hintergrund
284 --------------------------------------------------*/
287 pRet
->Put(SvxBrushItem(aViewOpt
.GetRetoucheColor(), RES_BACKGROUND
));
291 /*-----------------01.02.97 13.02-------------------
293 --------------------------------------------------*/
294 SwTestItem
aTestItem(FN_PARAM_SWTEST
);
295 aTestItem
.bTest1
= aViewOpt
.IsTest1();
296 aTestItem
.bTest2
= aViewOpt
.IsTest2();
297 aTestItem
.bTest3
= aViewOpt
.IsTest3();
298 aTestItem
.bTest4
= aViewOpt
.IsTest4();
299 aTestItem
.bTest5
= aViewOpt
.IsTest5();
300 aTestItem
.bTest6
= aViewOpt
.IsTest6();
301 aTestItem
.bTest7
= aViewOpt
.IsTest7();
302 aTestItem
.bTest8
= aViewOpt
.IsTest8();
303 aTestItem
.bTest9
= SwViewOption::IsTest9();
304 aTestItem
.bTest10
= aViewOpt
.IsTest10();
305 pRet
->Put(aTestItem
);
307 /*-----------------01.02.97 13.04-------------------
309 --------------------------------------------------*/
311 pRet
->Put(SfxUInt16Item(SID_HTML_MODE
, HTMLMODE_ON
));
315 /* -----------------12.02.99 12:28-------------------
317 * --------------------------------------------------*/
318 void SwModule::ApplyItemSet( USHORT nId
, const SfxItemSet
& rSet
)
320 BOOL bTextDialog
= nId
== SID_SW_EDITOPTIONS
;
321 SwView
* pAppView
= GetView();
322 if(pAppView
&& pAppView
->GetViewFrame() != SfxViewFrame::Current())
326 // the text dialog mustn't apply data to the web view and vice versa
327 BOOL bWebView
= 0 != PTR_CAST(SwWebView
, pAppView
);
328 if( (bWebView
== bTextDialog
))
332 SwViewOption aViewOpt
= *GetUsrPref(!bTextDialog
);
333 SwMasterUsrPref
* pPref
= bTextDialog
? pUsrPref
: pWebUsrPref
;
335 const SfxPoolItem
* pItem
;
336 SfxBindings
*pBindings
= pAppView
? &pAppView
->GetViewFrame()->GetBindings()
339 /*---------------------------------------------------------------------
340 Seite Dokumentansicht auswerten
341 -----------------------------------------------------------------------*/
342 if( SFX_ITEM_SET
== rSet
.GetItemState(
343 FN_PARAM_DOCDISP
, FALSE
, &pItem
))
345 const SwDocDisplayItem
* pDocDispItem
= (const SwDocDisplayItem
*)pItem
;
347 if(!aViewOpt
.IsViewMetaChars())
349 if( (!aViewOpt
.IsTab( TRUE
) && pDocDispItem
->bTab
) ||
350 (!aViewOpt
.IsBlank( TRUE
) && pDocDispItem
->bSpace
) ||
351 (!aViewOpt
.IsParagraph( TRUE
) && pDocDispItem
->bParagraphEnd
) ||
352 (!aViewOpt
.IsLineBreak( TRUE
) && pDocDispItem
->bManualBreak
) )
354 aViewOpt
.SetViewMetaChars(TRUE
);
356 pBindings
->Invalidate(FN_VIEW_META_CHARS
);
360 pDocDispItem
->FillViewOptions( aViewOpt
);
363 pBindings
->Invalidate(FN_VIEW_GRAPHIC
);
364 pBindings
->Invalidate(FN_VIEW_HIDDEN_PARA
);
368 /*---------------------------------------------------------------------
369 Elemente - Item auswerten
370 -----------------------------------------------------------------------*/
372 if( SFX_ITEM_SET
== rSet
.GetItemState(
373 FN_PARAM_ELEM
, FALSE
, &pItem
) )
375 const SwElemItem
* pElemItem
= (const SwElemItem
*)pItem
;
376 pElemItem
->FillViewOptions( aViewOpt
);
380 if( SFX_ITEM_SET
== rSet
.GetItemState(SID_ATTR_METRIC
,
383 SFX_APP()->SetOptions(rSet
);
384 const SfxUInt16Item
* pMetricItem
= (const SfxUInt16Item
*)pItem
;
385 ::SetDfltMetric((FieldUnit
)pMetricItem
->GetValue(), !bTextDialog
);
388 if( SFX_ITEM_SET
== rSet
.GetItemState(SID_ATTR_APPLYCHARUNIT
,
391 SFX_APP()->SetOptions(rSet
);
392 const SfxBoolItem
* pCharItem
= (const SfxBoolItem
*)pItem
;
393 ::SetApplyCharUnit(pCharItem
->GetValue(), !bTextDialog
);
396 if( SFX_ITEM_SET
== rSet
.GetItemState(FN_HSCROLL_METRIC
,
399 const SfxUInt16Item
* pMetricItem
= (const SfxUInt16Item
*)pItem
;
400 FieldUnit eUnit
= (FieldUnit
)pMetricItem
->GetValue();
401 pPref
->SetHScrollMetric(eUnit
);
403 pAppView
->ChangeTabMetric(eUnit
);
406 if( SFX_ITEM_SET
== rSet
.GetItemState(FN_VSCROLL_METRIC
,
409 const SfxUInt16Item
* pMetricItem
= (const SfxUInt16Item
*)pItem
;
410 FieldUnit eUnit
= (FieldUnit
)pMetricItem
->GetValue();
411 pPref
->SetVScrollMetric(eUnit
);
413 pAppView
->ChangeVLinealMetric(eUnit
);
416 if( SFX_ITEM_SET
== rSet
.GetItemState(SID_ATTR_DEFTABSTOP
,
419 USHORT nTabDist
= ((const SfxUInt16Item
*)pItem
)->GetValue();
420 pPref
->SetDefTab(nTabDist
);
423 SvxTabStopItem
aDefTabs( 0, 0, SVX_TAB_ADJUST_DEFAULT
, RES_PARATR_TABSTOP
);
424 MakeDefTabs( nTabDist
, aDefTabs
);
425 pAppView
->GetWrtShell().SetDefault( aDefTabs
);
430 /*-----------------01.02.97 11.36-------------------
431 Hintergrund nur im WebDialog
432 --------------------------------------------------*/
433 if(SFX_ITEM_SET
== rSet
.GetItemState(RES_BACKGROUND
))
435 const SvxBrushItem
& rBrushItem
= (const SvxBrushItem
&)rSet
.Get(
437 aViewOpt
.SetRetoucheColor( rBrushItem
.GetColor() );
440 /*--------------------------------------------------------------------
441 Seite Rastereinstellungen auswerten
442 ----------------------------------------------------------------------*/
444 if( SFX_ITEM_SET
== rSet
.GetItemState(
445 SID_ATTR_GRID_OPTIONS
, FALSE
, &pItem
))
447 const SvxGridItem
* pGridItem
= (const SvxGridItem
*)pItem
;
449 aViewOpt
.SetSnap( pGridItem
->GetUseGridSnap() );
450 aViewOpt
.SetSynchronize(pGridItem
->GetSynchronize());
451 if( aViewOpt
.IsGridVisible() != pGridItem
->GetGridVisible() )
452 aViewOpt
.SetGridVisible( pGridItem
->GetGridVisible());
453 Size aSize
= Size( pGridItem
->GetFldDrawX() ,
454 pGridItem
->GetFldDrawY() );
455 if( aViewOpt
.GetSnapSize() != aSize
)
456 aViewOpt
.SetSnapSize( aSize
);
457 short nDiv
= (short)pGridItem
->GetFldDivisionX() ;
458 if( aViewOpt
.GetDivisionX() != nDiv
)
459 aViewOpt
.SetDivisionX( nDiv
);
460 nDiv
= (short)pGridItem
->GetFldDivisionY();
461 if( aViewOpt
.GetDivisionY() != nDiv
)
462 aViewOpt
.SetDivisionY( nDiv
);
466 pBindings
->Invalidate(SID_GRID_VISIBLE
);
467 pBindings
->Invalidate(SID_GRID_USE
);
471 //--------------------------------------------------------------------------
472 // Writer Drucker Zusatzeinstellungen auswerten
473 //----------------------------------------------------------------------------
475 if( SFX_ITEM_SET
== rSet
.GetItemState(
476 FN_PARAM_ADDPRINTER
, FALSE
, &pItem
))
478 SwPrintOptions
* pOpt
= GetPrtOptions(!bTextDialog
);
481 const SwAddPrinterItem
* pAddPrinterAttr
= (const SwAddPrinterItem
*)pItem
;
482 *pOpt
= *pAddPrinterAttr
;
485 pAppView
->GetWrtShell().getIDocumentDeviceAccess()->setPrintData( *pOpt
);
490 if( SFX_ITEM_SET
== rSet
.GetItemState(
491 FN_PARAM_SHADOWCURSOR
, FALSE
, &pItem
))
493 ((SwShadowCursorItem
*)pItem
)->FillViewOptions( aViewOpt
);
495 pBindings
->Invalidate(FN_SHADOWCURSOR
);
498 if( SFX_ITEM_SET
== rSet
.GetItemState(
499 FN_PARAM_CRSR_IN_PROTECTED
, FALSE
, &pItem
))
501 aViewOpt
.SetCursorInProtectedArea(((const SfxBoolItem
*)pItem
)->GetValue());
506 /*--------------------------------------------------------------------------
507 Writer Testseite auswerten
508 ----------------------------------------------------------------------------*/
510 if( SFX_ITEM_SET
== rSet
.GetItemState(
511 FN_PARAM_SWTEST
, FALSE
, &pItem
))
513 const SwTestItem
* pTestItem
= (const SwTestItem
*)pItem
;
514 aViewOpt
.SetTest1((BOOL
)pTestItem
->bTest1
);
515 aViewOpt
.SetTest2((BOOL
)pTestItem
->bTest2
);
516 aViewOpt
.SetTest3((BOOL
)pTestItem
->bTest3
);
517 aViewOpt
.SetTest4((BOOL
)pTestItem
->bTest4
);
518 aViewOpt
.SetTest5((BOOL
)pTestItem
->bTest5
);
519 aViewOpt
.SetTest6((BOOL
)pTestItem
->bTest6
);
520 aViewOpt
.SetTest7((BOOL
)pTestItem
->bTest7
);
521 aViewOpt
.SetTest8((BOOL
)pTestItem
->bTest8
);
522 SwViewOption::SetTest9((BOOL
)pTestItem
->bTest9
);
523 aViewOpt
.SetTest10((BOOL
)pTestItem
->bTest10
);
526 // dann an der akt. View und Shell die entsp. Elemente setzen
527 ApplyUsrPref( aViewOpt
, pAppView
,
528 bTextDialog
? VIEWOPT_DEST_TEXT
: VIEWOPT_DEST_WEB
);
530 /* -----------------12.02.99 12:28-------------------
532 * --------------------------------------------------*/
533 SfxTabPage
* SwModule::CreateTabPage( USHORT nId
, Window
* pParent
, const SfxItemSet
& rSet
)
535 SfxTabPage
* pRet
= NULL
;
536 SfxAllItemSet
aSet(*(rSet
.GetPool()));
539 case RID_SW_TP_CONTENT_OPT
:
540 case RID_SW_TP_HTML_CONTENT_OPT
:
542 SwAbstractDialogFactory
* pFact
= SwAbstractDialogFactory::Create();
545 ::CreateTabPage fnCreatePage
= pFact
->GetTabPageCreatorFunc( nId
);
547 pRet
= (*fnCreatePage
)( pParent
, rSet
);
551 case RID_SW_TP_HTML_OPTGRID_PAGE
:
552 case RID_SVXPAGE_GRID
:
553 pRet
= SvxGridTabPage::Create(pParent
, rSet
);
556 case RID_SW_TP_STD_FONT
:
557 case RID_SW_TP_STD_FONT_CJK
:
558 case RID_SW_TP_STD_FONT_CTL
:
560 SwAbstractDialogFactory
* pFact
= SwAbstractDialogFactory::Create();
563 ::CreateTabPage fnCreatePage
= pFact
->GetTabPageCreatorFunc( nId
);
565 pRet
= (*fnCreatePage
)( pParent
, rSet
);
567 if(RID_SW_TP_STD_FONT
!= nId
)
569 aSet
.Put (SfxUInt16Item(SID_FONTMODE_TYPE
, RID_SW_TP_STD_FONT_CJK
== nId
? FONT_GROUP_CJK
: FONT_GROUP_CTL
));
570 pRet
->PageCreated(aSet
);
574 case RID_SW_TP_HTML_OPTPRINT_PAGE
:
575 case RID_SW_TP_OPTPRINT_PAGE
:
577 SwAbstractDialogFactory
* pFact
= SwAbstractDialogFactory::Create();
580 ::CreateTabPage fnCreatePage
= pFact
->GetTabPageCreatorFunc( nId
);
582 pRet
= (*fnCreatePage
)( pParent
, rSet
);
584 aSet
.Put (SfxBoolItem(SID_FAX_LIST
, sal_True
));
585 pRet
->PageCreated(aSet
);
588 case RID_SW_TP_HTML_OPTTABLE_PAGE
:
589 case RID_SW_TP_OPTTABLE_PAGE
:
591 SwAbstractDialogFactory
* pFact
= SwAbstractDialogFactory::Create();
594 ::CreateTabPage fnCreatePage
= pFact
->GetTabPageCreatorFunc( nId
);
596 pRet
= (*fnCreatePage
)( pParent
, rSet
);
598 SwView
* pCurrView
= GetView();
601 // wenn Text dann nicht WebView und umgekehrt
602 BOOL bWebView
= 0 != PTR_CAST(SwWebView
, pCurrView
);
603 if( (bWebView
&& RID_SW_TP_HTML_OPTTABLE_PAGE
== nId
) ||
604 (!bWebView
&& RID_SW_TP_HTML_OPTTABLE_PAGE
!= nId
) )
606 aSet
.Put (SwWrtShellItem(SID_WRT_SHELL
,pCurrView
->GetWrtShellPtr()));
607 pRet
->PageCreated(aSet
);
612 case RID_SW_TP_OPTSHDWCRSR
:
613 case RID_SW_TP_HTML_OPTSHDWCRSR
:
614 case RID_SW_TP_REDLINE_OPT
:
615 case RID_SW_TP_OPTLOAD_PAGE
:
616 case RID_SW_TP_OPTCOMPATIBILITY_PAGE
:
617 case RID_SW_TP_MAILCONFIG
:
619 SwAbstractDialogFactory
* pFact
= SwAbstractDialogFactory::Create();
622 ::CreateTabPage fnCreatePage
= pFact
->GetTabPageCreatorFunc( nId
);
624 pRet
= (*fnCreatePage
)( pParent
, rSet
);
629 case RID_SW_TP_OPTTEST_PAGE
:
631 SwAbstractDialogFactory
* pFact
= SwAbstractDialogFactory::Create();
634 ::CreateTabPage fnCreatePage
= pFact
->GetTabPageCreatorFunc( nId
);
636 pRet
= (*fnCreatePage
)( pParent
, rSet
);
641 case RID_SW_TP_BACKGROUND
:
643 SfxAbstractDialogFactory
* pFact
= SfxAbstractDialogFactory::Create();
646 ::CreateTabPage fnCreatePage
= pFact
->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND
);
648 pRet
= (*fnCreatePage
)( pParent
, rSet
);
652 case TP_OPTCAPTION_PAGE
:
653 case RID_SW_TP_OPTCAPTION_PAGE
:
655 SwAbstractDialogFactory
* pFact
= SwAbstractDialogFactory::Create();
658 ::CreateTabPage fnCreatePage
= pFact
->GetTabPageCreatorFunc( RID_SW_TP_OPTCAPTION_PAGE
);
660 pRet
= (*fnCreatePage
)( pParent
, rSet
);
666 DBG_ASSERT( pRet
, "SwModule::CreateTabPage(): Unknown tabpage id" );