1efeef26fSAndrew Rist /**************************************************************
2cdf0e10cSrcweir *
3efeef26fSAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one
4efeef26fSAndrew Rist * or more contributor license agreements. See the NOTICE file
5efeef26fSAndrew Rist * distributed with this work for additional information
6efeef26fSAndrew Rist * regarding copyright ownership. The ASF licenses this file
7efeef26fSAndrew Rist * to you under the Apache License, Version 2.0 (the
8efeef26fSAndrew Rist * "License"); you may not use this file except in compliance
9efeef26fSAndrew Rist * with the License. You may obtain a copy of the License at
10efeef26fSAndrew Rist *
11efeef26fSAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0
12efeef26fSAndrew Rist *
13efeef26fSAndrew Rist * Unless required by applicable law or agreed to in writing,
14efeef26fSAndrew Rist * software distributed under the License is distributed on an
15efeef26fSAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16efeef26fSAndrew Rist * KIND, either express or implied. See the License for the
17efeef26fSAndrew Rist * specific language governing permissions and limitations
18efeef26fSAndrew Rist * under the License.
19efeef26fSAndrew Rist *
20efeef26fSAndrew Rist *************************************************************/
21efeef26fSAndrew Rist
22efeef26fSAndrew Rist
23cdf0e10cSrcweir
24cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove
25cdf0e10cSrcweir #include "precompiled_sw.hxx"
26cdf0e10cSrcweir
27cdf0e10cSrcweir #ifdef SW_DLLIMPLEMENTATION
28cdf0e10cSrcweir #undef SW_DLLIMPLEMENTATION
29cdf0e10cSrcweir #endif
30cdf0e10cSrcweir
31cdf0e10cSrcweir
32cdf0e10cSrcweir #include <hintids.hxx>
33cdf0e10cSrcweir
34cdf0e10cSrcweir #ifndef _SVSTDARR_STRINGSSORTDTOR
35cdf0e10cSrcweir #define _SVSTDARR_STRINGSSORTDTOR
36cdf0e10cSrcweir #include <svl/svstdarr.hxx>
37cdf0e10cSrcweir #endif
38cdf0e10cSrcweir #include <vcl/msgbox.hxx>
39cdf0e10cSrcweir #include <sfx2/viewfrm.hxx>
40cdf0e10cSrcweir #include <svx/hdft.hxx>
41cdf0e10cSrcweir #include <editeng/flstitem.hxx>
42cdf0e10cSrcweir #include <svx/htmlmode.hxx>
43cdf0e10cSrcweir #include <svtools/htmlcfg.hxx>
44cdf0e10cSrcweir #include <svl/cjkoptions.hxx>
45cdf0e10cSrcweir #include <numpara.hxx>
46cdf0e10cSrcweir #include <fmtclds.hxx>
47cdf0e10cSrcweir #include <swtypes.hxx>
48cdf0e10cSrcweir #include <swmodule.hxx>
49cdf0e10cSrcweir #include <errhdl.hxx> // fuer Create-Methoden
50cdf0e10cSrcweir #include <wrtsh.hxx>
51cdf0e10cSrcweir #ifndef _VIEW_HXX
52cdf0e10cSrcweir #include <view.hxx>
53cdf0e10cSrcweir #endif
54cdf0e10cSrcweir #include <wdocsh.hxx>
55cdf0e10cSrcweir #include <viewopt.hxx>
56cdf0e10cSrcweir #include <pgfnote.hxx>
57cdf0e10cSrcweir #ifndef _PGFGRID_HXX
58cdf0e10cSrcweir #include <pggrid.hxx>
59cdf0e10cSrcweir #endif
60cdf0e10cSrcweir #ifndef _TMPDLG_HXX
61cdf0e10cSrcweir #include <tmpdlg.hxx> // der Dialog
62cdf0e10cSrcweir #endif
63cdf0e10cSrcweir #include <column.hxx> // Spalten
64cdf0e10cSrcweir #include <drpcps.hxx> // Initialen
65cdf0e10cSrcweir #include <frmpage.hxx> // Rahmen
66cdf0e10cSrcweir #include <wrap.hxx> // Rahmen
67cdf0e10cSrcweir #include <frmmgr.hxx> // Rahmen
68cdf0e10cSrcweir #include <ccoll.hxx> // CondColl
69cdf0e10cSrcweir #include <swuiccoll.hxx>
70cdf0e10cSrcweir #include <docstyle.hxx> //
71cdf0e10cSrcweir #include <fmtcol.hxx> //
72cdf0e10cSrcweir #include <macassgn.hxx> //
73cdf0e10cSrcweir #include <poolfmt.hxx>
74cdf0e10cSrcweir #include <uitool.hxx>
75cdf0e10cSrcweir #include <shellres.hxx>
76cdf0e10cSrcweir
77cdf0e10cSrcweir #ifndef _CMDID_H
78cdf0e10cSrcweir #include <cmdid.h>
79cdf0e10cSrcweir #endif
80cdf0e10cSrcweir #ifndef _HELPID_H
81cdf0e10cSrcweir #include <helpid.h>
82cdf0e10cSrcweir #endif
83cdf0e10cSrcweir #ifndef _GLOBALS_HRC
84cdf0e10cSrcweir #include <globals.hrc>
85cdf0e10cSrcweir #endif
86cdf0e10cSrcweir #ifndef _FMTUI_HRC
87cdf0e10cSrcweir #include <fmtui.hrc>
88cdf0e10cSrcweir #endif
89cdf0e10cSrcweir #include <SwStyleNameMapper.hxx>
90cdf0e10cSrcweir #include <svx/svxids.hrc>
91cdf0e10cSrcweir #include <svl/stritem.hxx>
92cdf0e10cSrcweir #include <svl/aeitem.hxx>
93cdf0e10cSrcweir #include <svl/slstitm.hxx>
94cdf0e10cSrcweir #include <svl/eitem.hxx>
95cdf0e10cSrcweir #include <svl/intitem.hxx>
96cdf0e10cSrcweir #include <svx/svxdlg.hxx>
97cdf0e10cSrcweir #include <svx/dialogs.hrc>
98cdf0e10cSrcweir #include <svx/flagsdef.hxx>
99cdf0e10cSrcweir
100cdf0e10cSrcweir extern SW_DLLPUBLIC SwWrtShell* GetActiveWrtShell();
101cdf0e10cSrcweir
102cdf0e10cSrcweir /*--------------------------------------------------------------------
103cdf0e10cSrcweir Beschreibung: Der Traeger des Dialoges
104cdf0e10cSrcweir --------------------------------------------------------------------*/
105cdf0e10cSrcweir
SwTemplateDlg(Window * pParent,SfxStyleSheetBase & rBase,sal_uInt16 nRegion,const sal_uInt16 nSlot,SwWrtShell * pActShell,sal_Bool bNew)106cdf0e10cSrcweir SwTemplateDlg::SwTemplateDlg(Window* pParent,
107cdf0e10cSrcweir SfxStyleSheetBase& rBase,
108cdf0e10cSrcweir sal_uInt16 nRegion,
109*ff0525f2SOliver-Rainer Wittmann const sal_uInt16 nSlot,
110cdf0e10cSrcweir SwWrtShell* pActShell,
111cdf0e10cSrcweir sal_Bool bNew ) :
112cdf0e10cSrcweir SfxStyleDialog( pParent,
113cdf0e10cSrcweir SW_RES(DLG_TEMPLATE_BASE + nRegion),
114cdf0e10cSrcweir rBase,
115cdf0e10cSrcweir sal_False,
116cdf0e10cSrcweir 0 ),
117cdf0e10cSrcweir nType( nRegion ),
118cdf0e10cSrcweir pWrtShell(pActShell),
119cdf0e10cSrcweir bNewStyle(bNew)
120cdf0e10cSrcweir {
121cdf0e10cSrcweir FreeResource();
122cdf0e10cSrcweir
123cdf0e10cSrcweir nHtmlMode = ::GetHtmlMode(pWrtShell->GetView().GetDocShell());
124cdf0e10cSrcweir SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
125cdf0e10cSrcweir DBG_ASSERT(pFact, "Dialogdiet fail!");
126cdf0e10cSrcweir // TabPages zusammenfieseln
127cdf0e10cSrcweir switch( nRegion )
128cdf0e10cSrcweir {
129cdf0e10cSrcweir // Zeichenvorlagen
130cdf0e10cSrcweir case SFX_STYLE_FAMILY_CHAR:
131cdf0e10cSrcweir {
132cdf0e10cSrcweir DBG_ASSERT(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_NAME ), "GetTabPageCreatorFunc fail!");
133cdf0e10cSrcweir DBG_ASSERT(pFact->GetTabPageRangesFunc( RID_SVXPAGE_CHAR_NAME ) , "GetTabPageRangesFunc fail!");
134cdf0e10cSrcweir AddTabPage(TP_CHAR_STD, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_NAME ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_CHAR_NAME ) );
135cdf0e10cSrcweir
136cdf0e10cSrcweir DBG_ASSERT(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_EFFECTS ), "GetTabPageCreatorFunc fail!");
137cdf0e10cSrcweir DBG_ASSERT(pFact->GetTabPageRangesFunc( RID_SVXPAGE_CHAR_EFFECTS ) , "GetTabPageRangesFunc fail!");
138cdf0e10cSrcweir AddTabPage(TP_CHAR_EXT, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_EFFECTS ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_CHAR_EFFECTS ) );
139cdf0e10cSrcweir
140cdf0e10cSrcweir DBG_ASSERT(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_POSITION ), "GetTabPageCreatorFunc fail!");
141cdf0e10cSrcweir DBG_ASSERT(pFact->GetTabPageRangesFunc( RID_SVXPAGE_CHAR_POSITION ) , "GetTabPageRangesFunc fail!");
142cdf0e10cSrcweir AddTabPage(TP_CHAR_POS, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_POSITION ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_CHAR_POSITION ) );
143cdf0e10cSrcweir
144cdf0e10cSrcweir DBG_ASSERT(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_TWOLINES ), "GetTabPageCreatorFunc fail!");
145cdf0e10cSrcweir DBG_ASSERT(pFact->GetTabPageRangesFunc( RID_SVXPAGE_CHAR_TWOLINES ) , "GetTabPageRangesFunc fail!");
146cdf0e10cSrcweir AddTabPage(TP_CHAR_TWOLN, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_TWOLINES ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_CHAR_TWOLINES ) );
147cdf0e10cSrcweir
148cdf0e10cSrcweir DBG_ASSERT(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ), "GetTabPageCreatorFunc fail!");
149cdf0e10cSrcweir DBG_ASSERT(pFact->GetTabPageRangesFunc( RID_SVXPAGE_BACKGROUND ) , "GetTabPageRangesFunc fail!");
150cdf0e10cSrcweir AddTabPage(TP_BACKGROUND, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_BACKGROUND ) );
151cdf0e10cSrcweir
152cdf0e10cSrcweir SvtCJKOptions aCJKOptions;
153cdf0e10cSrcweir if(nHtmlMode & HTMLMODE_ON || !aCJKOptions.IsDoubleLinesEnabled())
154cdf0e10cSrcweir RemoveTabPage(TP_CHAR_TWOLN);
155cdf0e10cSrcweir }
156cdf0e10cSrcweir break;
157cdf0e10cSrcweir // Absatzvorlagen
158cdf0e10cSrcweir case SFX_STYLE_FAMILY_PARA:
159cdf0e10cSrcweir {
160cdf0e10cSrcweir DBG_ASSERT(pFact->GetTabPageCreatorFunc(RID_SVXPAGE_STD_PARAGRAPH), "GetTabPageCreatorFunc fail!");
161cdf0e10cSrcweir DBG_ASSERT(pFact->GetTabPageRangesFunc(RID_SVXPAGE_STD_PARAGRAPH), "GetTabPageRangesFunc fail!");
162cdf0e10cSrcweir AddTabPage( TP_PARA_STD, pFact->GetTabPageCreatorFunc(RID_SVXPAGE_STD_PARAGRAPH), pFact->GetTabPageRangesFunc(RID_SVXPAGE_STD_PARAGRAPH) );
163cdf0e10cSrcweir
164cdf0e10cSrcweir DBG_ASSERT(pFact->GetTabPageCreatorFunc(RID_SVXPAGE_ALIGN_PARAGRAPH), "GetTabPageCreatorFunc fail!");
165cdf0e10cSrcweir DBG_ASSERT(pFact->GetTabPageRangesFunc(RID_SVXPAGE_ALIGN_PARAGRAPH), "GetTabPageRangesFunc fail!");
166cdf0e10cSrcweir AddTabPage( TP_PARA_ALIGN, pFact->GetTabPageCreatorFunc(RID_SVXPAGE_ALIGN_PARAGRAPH), pFact->GetTabPageRangesFunc(RID_SVXPAGE_ALIGN_PARAGRAPH) );
167cdf0e10cSrcweir
168cdf0e10cSrcweir DBG_ASSERT(pFact->GetTabPageCreatorFunc(RID_SVXPAGE_EXT_PARAGRAPH), "GetTabPageCreatorFunc fail!");
169cdf0e10cSrcweir DBG_ASSERT(pFact->GetTabPageRangesFunc(RID_SVXPAGE_EXT_PARAGRAPH), "GetTabPageRangesFunc fail!");
170cdf0e10cSrcweir AddTabPage( TP_PARA_EXT, pFact->GetTabPageCreatorFunc(RID_SVXPAGE_EXT_PARAGRAPH), pFact->GetTabPageRangesFunc(RID_SVXPAGE_EXT_PARAGRAPH) );
171cdf0e10cSrcweir
172cdf0e10cSrcweir DBG_ASSERT(pFact->GetTabPageCreatorFunc(RID_SVXPAGE_PARA_ASIAN), "GetTabPageCreatorFunc fail!");
173cdf0e10cSrcweir DBG_ASSERT(pFact->GetTabPageRangesFunc(RID_SVXPAGE_PARA_ASIAN), "GetTabPageRangesFunc fail!");
174cdf0e10cSrcweir AddTabPage( TP_PARA_ASIAN, pFact->GetTabPageCreatorFunc(RID_SVXPAGE_PARA_ASIAN), pFact->GetTabPageRangesFunc(RID_SVXPAGE_PARA_ASIAN) );
175cdf0e10cSrcweir
176cdf0e10cSrcweir DBG_ASSERT(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_NAME ), "GetTabPageCreatorFunc fail!");
177cdf0e10cSrcweir DBG_ASSERT(pFact->GetTabPageRangesFunc( RID_SVXPAGE_CHAR_NAME ), "GetTabPageRangesFunc fail!");
178cdf0e10cSrcweir AddTabPage(TP_CHAR_STD, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_NAME ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_CHAR_NAME ) );
179cdf0e10cSrcweir
180cdf0e10cSrcweir DBG_ASSERT(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_EFFECTS ), "GetTabPageCreatorFunc fail!");
181cdf0e10cSrcweir DBG_ASSERT(pFact->GetTabPageRangesFunc( RID_SVXPAGE_CHAR_EFFECTS ), "GetTabPageRangesFunc fail!");
182cdf0e10cSrcweir AddTabPage(TP_CHAR_EXT, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_EFFECTS ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_CHAR_EFFECTS ) );
183cdf0e10cSrcweir
184cdf0e10cSrcweir DBG_ASSERT(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_POSITION ), "GetTabPageCreatorFunc fail!");
185cdf0e10cSrcweir DBG_ASSERT(pFact->GetTabPageRangesFunc( RID_SVXPAGE_CHAR_POSITION ) , "GetTabPageRangesFunc fail!");
186cdf0e10cSrcweir AddTabPage(TP_CHAR_POS, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_POSITION ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_CHAR_POSITION ) );
187cdf0e10cSrcweir
188cdf0e10cSrcweir DBG_ASSERT(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_TWOLINES ), "GetTabPageCreatorFunc fail!");
189cdf0e10cSrcweir DBG_ASSERT(pFact->GetTabPageRangesFunc( RID_SVXPAGE_CHAR_TWOLINES ) , "GetTabPageRangesFunc fail!");
190cdf0e10cSrcweir AddTabPage(TP_CHAR_TWOLN, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_TWOLINES ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_CHAR_TWOLINES ) );
191cdf0e10cSrcweir
192cdf0e10cSrcweir
193cdf0e10cSrcweir DBG_ASSERT(pFact->GetTabPageCreatorFunc(RID_SVXPAGE_TABULATOR), "GetTabPageCreatorFunc fail!");
194cdf0e10cSrcweir DBG_ASSERT(pFact->GetTabPageRangesFunc(RID_SVXPAGE_TABULATOR), "GetTabPageRangesFunc fail!");
195cdf0e10cSrcweir AddTabPage( TP_TABULATOR, pFact->GetTabPageCreatorFunc(RID_SVXPAGE_TABULATOR), pFact->GetTabPageRangesFunc(RID_SVXPAGE_TABULATOR) );
196cdf0e10cSrcweir
197cdf0e10cSrcweir
198cdf0e10cSrcweir AddTabPage(TP_NUMPARA, SwParagraphNumTabPage::Create,
199cdf0e10cSrcweir SwParagraphNumTabPage::GetRanges);
200cdf0e10cSrcweir AddTabPage(TP_DROPCAPS, SwDropCapsPage::Create,
201cdf0e10cSrcweir SwDropCapsPage::GetRanges );
202cdf0e10cSrcweir DBG_ASSERT(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ), "GetTabPageCreatorFunc fail!");
203cdf0e10cSrcweir DBG_ASSERT(pFact->GetTabPageRangesFunc( RID_SVXPAGE_BACKGROUND ), "GetTabPageRangesFunc fail!");
204cdf0e10cSrcweir AddTabPage(TP_BACKGROUND, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_BACKGROUND ) );
205cdf0e10cSrcweir DBG_ASSERT(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BORDER ), "GetTabPageCreatorFunc fail!");
206cdf0e10cSrcweir DBG_ASSERT(pFact->GetTabPageRangesFunc( RID_SVXPAGE_BORDER ), "GetTabPageRangesFunc fail!");
207cdf0e10cSrcweir AddTabPage(TP_BORDER, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BORDER ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_BORDER ) );
208cdf0e10cSrcweir
209cdf0e10cSrcweir AddTabPage( TP_CONDCOLL, SwCondCollPage::Create,
210cdf0e10cSrcweir SwCondCollPage::GetRanges );
211cdf0e10cSrcweir if( (!bNewStyle && RES_CONDTXTFMTCOLL != ((SwDocStyleSheet&)rBase).GetCollection()->Which())
212cdf0e10cSrcweir || nHtmlMode & HTMLMODE_ON )
213cdf0e10cSrcweir RemoveTabPage(TP_CONDCOLL);
214cdf0e10cSrcweir
215cdf0e10cSrcweir SvtCJKOptions aCJKOptions;
216cdf0e10cSrcweir if(nHtmlMode & HTMLMODE_ON)
217cdf0e10cSrcweir {
218cdf0e10cSrcweir SvxHtmlOptions* pHtmlOpt = SvxHtmlOptions::Get();
219cdf0e10cSrcweir if (!pHtmlOpt->IsPrintLayoutExtension())
220cdf0e10cSrcweir RemoveTabPage(TP_PARA_EXT);
221cdf0e10cSrcweir RemoveTabPage(TP_PARA_ASIAN);
222cdf0e10cSrcweir RemoveTabPage(TP_TABULATOR);
223cdf0e10cSrcweir RemoveTabPage(TP_NUMPARA);
224cdf0e10cSrcweir RemoveTabPage(TP_CHAR_TWOLN);
225cdf0e10cSrcweir if(!(nHtmlMode & HTMLMODE_FULL_STYLES))
226cdf0e10cSrcweir {
227cdf0e10cSrcweir RemoveTabPage(TP_BACKGROUND);
228cdf0e10cSrcweir RemoveTabPage(TP_DROPCAPS);
229cdf0e10cSrcweir }
230cdf0e10cSrcweir if(!(nHtmlMode & HTMLMODE_PARA_BORDER))
231cdf0e10cSrcweir RemoveTabPage(TP_BORDER);
232cdf0e10cSrcweir }
233cdf0e10cSrcweir else
234cdf0e10cSrcweir {
235cdf0e10cSrcweir if(!aCJKOptions.IsAsianTypographyEnabled())
236cdf0e10cSrcweir RemoveTabPage(TP_PARA_ASIAN);
237cdf0e10cSrcweir if(!aCJKOptions.IsDoubleLinesEnabled())
238cdf0e10cSrcweir RemoveTabPage(TP_CHAR_TWOLN);
239cdf0e10cSrcweir }
240cdf0e10cSrcweir }
241cdf0e10cSrcweir break;
242cdf0e10cSrcweir // Rahmenvorlagen
243cdf0e10cSrcweir case SFX_STYLE_FAMILY_FRAME:
244cdf0e10cSrcweir {
245cdf0e10cSrcweir AddTabPage(TP_FRM_STD, SwFrmPage::Create,
246cdf0e10cSrcweir SwFrmPage::GetRanges );
247cdf0e10cSrcweir AddTabPage(TP_FRM_ADD, SwFrmAddPage::Create,
248cdf0e10cSrcweir SwFrmAddPage::GetRanges );
249cdf0e10cSrcweir AddTabPage(TP_FRM_WRAP, SwWrapTabPage::Create,
250cdf0e10cSrcweir SwWrapTabPage::GetRanges );
251cdf0e10cSrcweir DBG_ASSERT(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ), "GetTabPageCreatorFunc fail!");
252cdf0e10cSrcweir DBG_ASSERT(pFact->GetTabPageRangesFunc( RID_SVXPAGE_BACKGROUND ), "GetTabPageRangesFunc fail!");
253cdf0e10cSrcweir AddTabPage(TP_BACKGROUND, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_BACKGROUND ) );
254cdf0e10cSrcweir DBG_ASSERT(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BORDER ), "GetTabPageCreatorFunc fail!");
255cdf0e10cSrcweir DBG_ASSERT(pFact->GetTabPageRangesFunc( RID_SVXPAGE_BORDER ), "GetTabPageRangesFunc fail!");
256cdf0e10cSrcweir AddTabPage(TP_BORDER, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BORDER ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_BORDER ) );
257cdf0e10cSrcweir
258cdf0e10cSrcweir AddTabPage(TP_COLUMN, SwColumnPage::Create,
259cdf0e10cSrcweir SwColumnPage::GetRanges );
260cdf0e10cSrcweir
261cdf0e10cSrcweir AddTabPage( TP_MACRO_ASSIGN, pFact->GetTabPageCreatorFunc(RID_SVXPAGE_MACROASSIGN), 0);
262cdf0e10cSrcweir
263cdf0e10cSrcweir break;
264cdf0e10cSrcweir }
265cdf0e10cSrcweir // Seitenvorlagen
266cdf0e10cSrcweir case SFX_STYLE_FAMILY_PAGE:
267cdf0e10cSrcweir {
268cdf0e10cSrcweir DBG_ASSERT(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ), "GetTabPageCreatorFunc fail!");
269cdf0e10cSrcweir DBG_ASSERT(pFact->GetTabPageRangesFunc( RID_SVXPAGE_BACKGROUND ), "GetTabPageRangesFunc fail!");
270cdf0e10cSrcweir AddTabPage(TP_BACKGROUND, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_BACKGROUND ) );
271*ff0525f2SOliver-Rainer Wittmann AddTabPage(TP_HEADER_PAGE, String(SW_RES(STR_PAGE_HEADER)),
272*ff0525f2SOliver-Rainer Wittmann SvxHeaderPage::Create,
273*ff0525f2SOliver-Rainer Wittmann SvxHeaderPage::GetRanges );
274*ff0525f2SOliver-Rainer Wittmann AddTabPage(TP_FOOTER_PAGE, String(SW_RES(STR_PAGE_FOOTER)),
275*ff0525f2SOliver-Rainer Wittmann SvxFooterPage::Create,
276*ff0525f2SOliver-Rainer Wittmann SvxFooterPage::GetRanges );
277*ff0525f2SOliver-Rainer Wittmann if ( nSlot == FN_FORMAT_PAGE_COLUMN_DLG )
278*ff0525f2SOliver-Rainer Wittmann {
279*ff0525f2SOliver-Rainer Wittmann SetCurPageId(TP_COLUMN);
280*ff0525f2SOliver-Rainer Wittmann }
281*ff0525f2SOliver-Rainer Wittmann else if ( nSlot == FN_FORMAT_PAGE_SETTING_DLG )
282*ff0525f2SOliver-Rainer Wittmann {
283*ff0525f2SOliver-Rainer Wittmann SetCurPageId(TP_PAGE_STD);
284*ff0525f2SOliver-Rainer Wittmann }
285cdf0e10cSrcweir
286cdf0e10cSrcweir DBG_ASSERT(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_PAGE ), "GetTabPageCreatorFunc fail!");
287cdf0e10cSrcweir DBG_ASSERT(pFact->GetTabPageRangesFunc( RID_SVXPAGE_PAGE ), "GetTabPageRangesFunc fail!");
288*ff0525f2SOliver-Rainer Wittmann AddTabPage(TP_PAGE_STD, String(SW_RES(STR_PAGE_STD)),
289cdf0e10cSrcweir pFact->GetTabPageCreatorFunc( RID_SVXPAGE_PAGE ),
290cdf0e10cSrcweir pFact->GetTabPageRangesFunc( RID_SVXPAGE_PAGE ),
291*ff0525f2SOliver-Rainer Wittmann sal_False,
292*ff0525f2SOliver-Rainer Wittmann 1 ); // nach der Verwalten-Page
293*ff0525f2SOliver-Rainer Wittmann if(!pActShell || 0 == ::GetHtmlMode(pWrtShell->GetView().GetDocShell()))
294*ff0525f2SOliver-Rainer Wittmann {
295cdf0e10cSrcweir DBG_ASSERT(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BORDER ), "GetTabPageCreatorFunc fail!");
296cdf0e10cSrcweir DBG_ASSERT(pFact->GetTabPageRangesFunc( RID_SVXPAGE_BORDER ), "GetTabPageRangesFunc fail!");
297*ff0525f2SOliver-Rainer Wittmann AddTabPage(TP_BORDER, String(SW_RES(STR_PAGE_BORDER)),
298*ff0525f2SOliver-Rainer Wittmann pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BORDER ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_BORDER ) );
299*ff0525f2SOliver-Rainer Wittmann AddTabPage(TP_COLUMN, String(SW_RES(STR_PAGE_COLUMN)),
300*ff0525f2SOliver-Rainer Wittmann SwColumnPage::Create,
301*ff0525f2SOliver-Rainer Wittmann SwColumnPage::GetRanges );
302*ff0525f2SOliver-Rainer Wittmann AddTabPage(TP_FOOTNOTE_PAGE, String(SW_RES(STR_PAGE_FOOTNOTE)),
303*ff0525f2SOliver-Rainer Wittmann SwFootNotePage::Create,
304*ff0525f2SOliver-Rainer Wittmann SwFootNotePage::GetRanges );
305cdf0e10cSrcweir AddTabPage(TP_TEXTGRID_PAGE, String(SW_RES(STR_PAGE_TEXTGRID)),
306cdf0e10cSrcweir SwTextGridPage::Create,
307cdf0e10cSrcweir SwTextGridPage::GetRanges );
308cdf0e10cSrcweir SvtCJKOptions aCJKOptions;
309cdf0e10cSrcweir if(!aCJKOptions.IsAsianTypographyEnabled())
310cdf0e10cSrcweir RemoveTabPage(TP_TEXTGRID_PAGE);
311cdf0e10cSrcweir }
312cdf0e10cSrcweir
313cdf0e10cSrcweir
314*ff0525f2SOliver-Rainer Wittmann }
315*ff0525f2SOliver-Rainer Wittmann break;
316*ff0525f2SOliver-Rainer Wittmann // Numerierungsvorlagen
317cdf0e10cSrcweir case SFX_STYLE_FAMILY_PSEUDO:
318cdf0e10cSrcweir {
319cdf0e10cSrcweir AddTabPage( RID_SVXPAGE_PICK_SINGLE_NUM );
320cdf0e10cSrcweir AddTabPage( RID_SVXPAGE_PICK_BULLET );
321cdf0e10cSrcweir AddTabPage( RID_SVXPAGE_PICK_NUM );
322cdf0e10cSrcweir AddTabPage( RID_SVXPAGE_PICK_BMP);
323cdf0e10cSrcweir AddTabPage( RID_SVXPAGE_NUM_OPTIONS );
324cdf0e10cSrcweir AddTabPage( RID_SVXPAGE_NUM_POSITION );
325cdf0e10cSrcweir
326cdf0e10cSrcweir
327cdf0e10cSrcweir /* const SfxPoolItem* pItem;
328cdf0e10cSrcweir if(SFX_ITEM_SET == rBase.GetItemSet().GetItemState(
329cdf0e10cSrcweir FN_PARAM_ACT_NUMBER, sal_False, &pItem ))
330cdf0e10cSrcweir {
331cdf0e10cSrcweir // pActNum = (ActNumberFormat*)((const SwPtrItem*)pItem)->GetValue();
332cdf0e10cSrcweir }
333cdf0e10cSrcweir */
334cdf0e10cSrcweir }
335cdf0e10cSrcweir break;
336cdf0e10cSrcweir
337cdf0e10cSrcweir default:
338cdf0e10cSrcweir ASSERT(!this, "Falsche Familie");
339cdf0e10cSrcweir
340cdf0e10cSrcweir }
341cdf0e10cSrcweir }
342cdf0e10cSrcweir
343cdf0e10cSrcweir /*--------------------------------------------------------------------
344cdf0e10cSrcweir Beschreibung:
345cdf0e10cSrcweir --------------------------------------------------------------------*/
346cdf0e10cSrcweir
~SwTemplateDlg()347cdf0e10cSrcweir SwTemplateDlg::~SwTemplateDlg()
348cdf0e10cSrcweir {
349cdf0e10cSrcweir }
350cdf0e10cSrcweir
351cdf0e10cSrcweir /*--------------------------------------------------------------------
352cdf0e10cSrcweir Beschreibung:
353cdf0e10cSrcweir --------------------------------------------------------------------*/
354cdf0e10cSrcweir
Ok()355cdf0e10cSrcweir short SwTemplateDlg::Ok()
356cdf0e10cSrcweir {
357cdf0e10cSrcweir short nRet = SfxTabDialog::Ok();
358cdf0e10cSrcweir if( RET_OK == nRet )
359cdf0e10cSrcweir {
360cdf0e10cSrcweir const SfxPoolItem *pOutItem, *pExItem;
361cdf0e10cSrcweir if( SFX_ITEM_SET == pExampleSet->GetItemState(
362cdf0e10cSrcweir SID_ATTR_NUMBERING_RULE, sal_False, &pExItem ) &&
363cdf0e10cSrcweir ( !GetOutputItemSet() ||
364cdf0e10cSrcweir SFX_ITEM_SET != GetOutputItemSet()->GetItemState(
365cdf0e10cSrcweir SID_ATTR_NUMBERING_RULE, sal_False, &pOutItem ) ||
366cdf0e10cSrcweir *pExItem != *pOutItem ))
367cdf0e10cSrcweir {
368cdf0e10cSrcweir if( GetOutputItemSet() )
369cdf0e10cSrcweir ((SfxItemSet*)GetOutputItemSet())->Put( *pExItem );
370cdf0e10cSrcweir else
371cdf0e10cSrcweir nRet = RET_CANCEL;
372cdf0e10cSrcweir }
373cdf0e10cSrcweir }
374cdf0e10cSrcweir else
375cdf0e10cSrcweir //JP 09.01.98 Bug #46446#:
376cdf0e10cSrcweir // das ist der Ok - Handler also muss auf OK defaultet werden!
377cdf0e10cSrcweir nRet = RET_OK;
378cdf0e10cSrcweir return nRet;
379cdf0e10cSrcweir }
380cdf0e10cSrcweir
381cdf0e10cSrcweir /*--------------------------------------------------------------------
382cdf0e10cSrcweir Beschreibung:
383cdf0e10cSrcweir --------------------------------------------------------------------*/
384cdf0e10cSrcweir
GetRefreshedSet()385cdf0e10cSrcweir const SfxItemSet* SwTemplateDlg::GetRefreshedSet()
386cdf0e10cSrcweir {
387cdf0e10cSrcweir SfxItemSet* pInSet = GetInputSetImpl();
388cdf0e10cSrcweir pInSet->ClearItem();
389cdf0e10cSrcweir pInSet->SetParent( &GetStyleSheet().GetItemSet() );
390cdf0e10cSrcweir return pInSet;
391cdf0e10cSrcweir }
392cdf0e10cSrcweir
393cdf0e10cSrcweir /*--------------------------------------------------------------------
394cdf0e10cSrcweir Beschreibung:
395cdf0e10cSrcweir --------------------------------------------------------------------*/
396cdf0e10cSrcweir
PageCreated(sal_uInt16 nId,SfxTabPage & rPage)397cdf0e10cSrcweir void SwTemplateDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
398cdf0e10cSrcweir {
399cdf0e10cSrcweir //Namen der Vorlagen und Metric setzen
400cdf0e10cSrcweir String sNumCharFmt, sBulletCharFmt;
401cdf0e10cSrcweir SwStyleNameMapper::FillUIName( RES_POOLCHR_NUM_LEVEL, sNumCharFmt);
402cdf0e10cSrcweir SwStyleNameMapper::FillUIName( RES_POOLCHR_BUL_LEVEL, sBulletCharFmt);
403cdf0e10cSrcweir SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool()));
404cdf0e10cSrcweir
405cdf0e10cSrcweir switch( nId )
406cdf0e10cSrcweir {
407cdf0e10cSrcweir case TP_CHAR_STD:
408cdf0e10cSrcweir {
409cdf0e10cSrcweir ASSERT(::GetActiveView(), "keine View aktiv");
410cdf0e10cSrcweir
411cdf0e10cSrcweir SvxFontListItem aFontListItem( *( (SvxFontListItem*)::GetActiveView()->
412cdf0e10cSrcweir GetDocShell()->GetItem( SID_ATTR_CHAR_FONTLIST ) ) );
413cdf0e10cSrcweir
414cdf0e10cSrcweir aSet.Put (SvxFontListItem( aFontListItem.GetFontList(), SID_ATTR_CHAR_FONTLIST));
415cdf0e10cSrcweir sal_uInt32 nFlags = 0;
416cdf0e10cSrcweir if(rPage.GetItemSet().GetParent() && 0 == (nHtmlMode & HTMLMODE_ON ))
417cdf0e10cSrcweir nFlags = SVX_RELATIVE_MODE;
418cdf0e10cSrcweir if( SFX_STYLE_FAMILY_CHAR == nType )
419cdf0e10cSrcweir nFlags = nFlags|SVX_PREVIEW_CHARACTER;
420cdf0e10cSrcweir aSet.Put (SfxUInt32Item(SID_FLAG_TYPE, nFlags));
421cdf0e10cSrcweir rPage.PageCreated(aSet);
422cdf0e10cSrcweir }
423cdf0e10cSrcweir break;
424cdf0e10cSrcweir
425cdf0e10cSrcweir case TP_CHAR_EXT:
426cdf0e10cSrcweir {
427cdf0e10cSrcweir sal_uInt32 nFlags = SVX_ENABLE_FLASH;
428cdf0e10cSrcweir if( SFX_STYLE_FAMILY_CHAR == nType )
429cdf0e10cSrcweir nFlags = nFlags|SVX_PREVIEW_CHARACTER;
430cdf0e10cSrcweir aSet.Put (SfxUInt32Item(SID_FLAG_TYPE, nFlags));
431cdf0e10cSrcweir rPage.PageCreated(aSet);
432cdf0e10cSrcweir }
433cdf0e10cSrcweir break;
434cdf0e10cSrcweir
435cdf0e10cSrcweir case TP_CHAR_POS:
436cdf0e10cSrcweir if( SFX_STYLE_FAMILY_CHAR == nType )
437cdf0e10cSrcweir {
438cdf0e10cSrcweir aSet.Put (SfxUInt32Item(SID_FLAG_TYPE, SVX_PREVIEW_CHARACTER));
439cdf0e10cSrcweir rPage.PageCreated(aSet);
440cdf0e10cSrcweir }
441cdf0e10cSrcweir break;
442cdf0e10cSrcweir
443cdf0e10cSrcweir case TP_CHAR_TWOLN:
444cdf0e10cSrcweir if( SFX_STYLE_FAMILY_CHAR == nType )
445cdf0e10cSrcweir {
446cdf0e10cSrcweir aSet.Put (SfxUInt32Item(SID_FLAG_TYPE, SVX_PREVIEW_CHARACTER));
447cdf0e10cSrcweir rPage.PageCreated(aSet);
448cdf0e10cSrcweir }
449cdf0e10cSrcweir break;
450cdf0e10cSrcweir
451cdf0e10cSrcweir case TP_PARA_STD:
452cdf0e10cSrcweir {
453cdf0e10cSrcweir if( rPage.GetItemSet().GetParent() )
454cdf0e10cSrcweir {
455cdf0e10cSrcweir aSet.Put(SfxUInt32Item(SID_SVXSTDPARAGRAPHTABPAGE_ABSLINEDIST,MM50/10));
456cdf0e10cSrcweir aSet.Put(SfxUInt32Item(SID_SVXSTDPARAGRAPHTABPAGE_FLAGSET,0x000F));
457cdf0e10cSrcweir rPage.PageCreated(aSet);
458cdf0e10cSrcweir }
459cdf0e10cSrcweir
460cdf0e10cSrcweir }
461cdf0e10cSrcweir break;
462cdf0e10cSrcweir case TP_NUMPARA:
463cdf0e10cSrcweir {
464cdf0e10cSrcweir //-->#outlinelevel added by zhaojianwei
465cdf0e10cSrcweir // handle if the current paragraph style is assigned to a list level of outline style,
466cdf0e10cSrcweir SwTxtFmtColl* pTmpColl = pWrtShell->FindTxtFmtCollByName( GetStyleSheet().GetName() );
467cdf0e10cSrcweir if( pTmpColl && pTmpColl->IsAssignedToListLevelOfOutlineStyle() )
468cdf0e10cSrcweir {
469cdf0e10cSrcweir ((SwParagraphNumTabPage&)rPage).DisableOutline() ;
470cdf0e10cSrcweir ((SwParagraphNumTabPage&)rPage).DisableNumbering();
471cdf0e10cSrcweir }//<-end
472cdf0e10cSrcweir ListBox & rBox = ((SwParagraphNumTabPage&)rPage).GetStyleBox();
473cdf0e10cSrcweir SfxStyleSheetBasePool* pPool = pWrtShell->GetView().GetDocShell()->GetStyleSheetPool();
474cdf0e10cSrcweir pPool->SetSearchMask(SFX_STYLE_FAMILY_PSEUDO, SFXSTYLEBIT_ALL);
475cdf0e10cSrcweir const SfxStyleSheetBase* pBase = pPool->First();
476cdf0e10cSrcweir SvStringsSortDtor aNames;
477cdf0e10cSrcweir while(pBase)
478cdf0e10cSrcweir {
479cdf0e10cSrcweir aNames.Insert(new String(pBase->GetName()));
480cdf0e10cSrcweir pBase = pPool->Next();
481cdf0e10cSrcweir }
482cdf0e10cSrcweir for(sal_uInt16 i = 0; i < aNames.Count(); i++)
483cdf0e10cSrcweir rBox.InsertEntry(*aNames.GetObject(i));
484cdf0e10cSrcweir }
485cdf0e10cSrcweir break;
486cdf0e10cSrcweir case TP_PARA_ALIGN:
487cdf0e10cSrcweir {
488cdf0e10cSrcweir aSet.Put(SfxBoolItem(SID_SVXPARAALIGNTABPAGE_ENABLEJUSTIFYEXT,sal_True));
489cdf0e10cSrcweir rPage.PageCreated(aSet);
490cdf0e10cSrcweir }
491cdf0e10cSrcweir break;
492cdf0e10cSrcweir
493cdf0e10cSrcweir case TP_FRM_STD:
494cdf0e10cSrcweir ((SwFrmPage&)rPage).SetNewFrame( sal_True );
495cdf0e10cSrcweir ((SwFrmPage&)rPage).SetFormatUsed( sal_True );
496cdf0e10cSrcweir break;
497cdf0e10cSrcweir
498cdf0e10cSrcweir case TP_FRM_ADD:
499cdf0e10cSrcweir ((SwFrmAddPage&)rPage).SetFormatUsed(sal_True);
500cdf0e10cSrcweir ((SwFrmAddPage&)rPage).SetNewFrame(sal_True);
501cdf0e10cSrcweir break;
502cdf0e10cSrcweir
503cdf0e10cSrcweir case TP_FRM_WRAP:
504cdf0e10cSrcweir ((SwWrapTabPage&)rPage).SetFormatUsed( sal_True, sal_False );
505cdf0e10cSrcweir break;
506cdf0e10cSrcweir
507cdf0e10cSrcweir case TP_COLUMN:
508cdf0e10cSrcweir if( nType == SFX_STYLE_FAMILY_FRAME )
509cdf0e10cSrcweir ((SwColumnPage&)rPage).SetFrmMode(sal_True);
510cdf0e10cSrcweir ((SwColumnPage&)rPage).SetFormatUsed( sal_True );
511cdf0e10cSrcweir break;
512cdf0e10cSrcweir
513cdf0e10cSrcweir case TP_BACKGROUND:
514cdf0e10cSrcweir {
515cdf0e10cSrcweir sal_Int32 nFlagType = 0;
516cdf0e10cSrcweir if( SFX_STYLE_FAMILY_PARA == nType )
517cdf0e10cSrcweir nFlagType |= SVX_SHOW_PARACTL;
518cdf0e10cSrcweir if( SFX_STYLE_FAMILY_CHAR != nType )
519cdf0e10cSrcweir nFlagType |= SVX_SHOW_SELECTOR;
520cdf0e10cSrcweir if( SFX_STYLE_FAMILY_FRAME == nType )
521cdf0e10cSrcweir nFlagType |= SVX_ENABLE_TRANSPARENCY;
522cdf0e10cSrcweir aSet.Put (SfxUInt32Item(SID_FLAG_TYPE, nFlagType));
523cdf0e10cSrcweir rPage.PageCreated(aSet);
524cdf0e10cSrcweir }
525cdf0e10cSrcweir break;
526cdf0e10cSrcweir case TP_CONDCOLL:
527cdf0e10cSrcweir ((SwCondCollPage&)rPage).SetCollection(
528cdf0e10cSrcweir ((SwDocStyleSheet&)GetStyleSheet()).GetCollection(), bNewStyle );
529cdf0e10cSrcweir break;
530cdf0e10cSrcweir
531cdf0e10cSrcweir case TP_PAGE_STD:
532cdf0e10cSrcweir if(0 == (nHtmlMode & HTMLMODE_ON ))
533cdf0e10cSrcweir {
534cdf0e10cSrcweir List aList;
535cdf0e10cSrcweir String* pNew = new String;
536cdf0e10cSrcweir SwStyleNameMapper::FillUIName( RES_POOLCOLL_TEXT, *pNew );
537cdf0e10cSrcweir aList.Insert( pNew, (sal_uLong)0 );
538cdf0e10cSrcweir if( pWrtShell )
539cdf0e10cSrcweir {
540cdf0e10cSrcweir SfxStyleSheetBasePool* pStyleSheetPool = pWrtShell->
541cdf0e10cSrcweir GetView().GetDocShell()->GetStyleSheetPool();
542cdf0e10cSrcweir pStyleSheetPool->SetSearchMask(SFX_STYLE_FAMILY_PARA);
543cdf0e10cSrcweir SfxStyleSheetBase *pFirstStyle = pStyleSheetPool->First();
544cdf0e10cSrcweir while(pFirstStyle)
545cdf0e10cSrcweir {
546cdf0e10cSrcweir aList.Insert( new String(pFirstStyle->GetName()),
547cdf0e10cSrcweir aList.Count());
548cdf0e10cSrcweir pFirstStyle = pStyleSheetPool->Next();
549cdf0e10cSrcweir }
550cdf0e10cSrcweir }
551cdf0e10cSrcweir aSet.Put (SfxStringListItem(SID_COLLECT_LIST, &aList));
552cdf0e10cSrcweir rPage.PageCreated(aSet);
553cdf0e10cSrcweir for( sal_uInt16 i = (sal_uInt16)aList.Count(); i; --i )
554cdf0e10cSrcweir delete (String*)aList.Remove(i);
555cdf0e10cSrcweir }
556cdf0e10cSrcweir break;
557cdf0e10cSrcweir
558cdf0e10cSrcweir case TP_MACRO_ASSIGN:
559cdf0e10cSrcweir {
560cdf0e10cSrcweir SfxAllItemSet aNewSet(*aSet.GetPool());
561cdf0e10cSrcweir aNewSet.Put( SwMacroAssignDlg::AddEvents(MACASSGN_ALLFRM) );
562cdf0e10cSrcweir if ( pWrtShell )
563cdf0e10cSrcweir rPage.SetFrame( pWrtShell->GetView().GetViewFrame()->GetFrame().GetFrameInterface() );
564cdf0e10cSrcweir rPage.PageCreated(aNewSet);
565cdf0e10cSrcweir break;
566cdf0e10cSrcweir }
567cdf0e10cSrcweir
568cdf0e10cSrcweir case RID_SVXPAGE_PICK_NUM:
569cdf0e10cSrcweir {
570cdf0e10cSrcweir aSet.Put (SfxStringItem(SID_NUM_CHAR_FMT,sNumCharFmt));
571cdf0e10cSrcweir aSet.Put (SfxStringItem(SID_BULLET_CHAR_FMT,sBulletCharFmt));
572cdf0e10cSrcweir rPage.PageCreated(aSet);
573cdf0e10cSrcweir }
574cdf0e10cSrcweir break;
575cdf0e10cSrcweir case RID_SVXPAGE_NUM_OPTIONS:
576cdf0e10cSrcweir {
577cdf0e10cSrcweir
578cdf0e10cSrcweir aSet.Put (SfxStringItem(SID_NUM_CHAR_FMT,sNumCharFmt));
579cdf0e10cSrcweir aSet.Put (SfxStringItem(SID_BULLET_CHAR_FMT,sBulletCharFmt));
580cdf0e10cSrcweir // Zeichenvorlagen sammeln
581cdf0e10cSrcweir ListBox rCharFmtLB(this);
582cdf0e10cSrcweir rCharFmtLB.Clear();
583cdf0e10cSrcweir rCharFmtLB.InsertEntry( ViewShell::GetShellRes()->aStrNone );
584cdf0e10cSrcweir SwDocShell* pDocShell = ::GetActiveWrtShell()->GetView().GetDocShell();
585cdf0e10cSrcweir ::FillCharStyleListBox(rCharFmtLB, pDocShell);
586cdf0e10cSrcweir List aList;
587cdf0e10cSrcweir for(sal_uInt16 j = 0; j < rCharFmtLB.GetEntryCount(); j++)
588cdf0e10cSrcweir {
589cdf0e10cSrcweir
590cdf0e10cSrcweir aList.Insert( new XubString(rCharFmtLB.GetEntry(j)), LIST_APPEND );
591cdf0e10cSrcweir }
592cdf0e10cSrcweir aSet.Put( SfxStringListItem( SID_CHAR_FMT_LIST_BOX,&aList ) ) ;
593cdf0e10cSrcweir FieldUnit eMetric = ::GetDfltMetric(0 != PTR_CAST(SwWebDocShell, pDocShell));
594cdf0e10cSrcweir aSet.Put ( SfxAllEnumItem(SID_METRIC_ITEM, static_cast< sal_uInt16 >(eMetric)));
595cdf0e10cSrcweir rPage.PageCreated(aSet);
596cdf0e10cSrcweir for( sal_uInt16 i = (sal_uInt16)aList.Count(); i; --i )
597cdf0e10cSrcweir delete (XubString*)aList.Remove(i);
598cdf0e10cSrcweir aList.Clear();
599cdf0e10cSrcweir }
600cdf0e10cSrcweir break;
601cdf0e10cSrcweir case RID_SVXPAGE_NUM_POSITION:
602cdf0e10cSrcweir {
603cdf0e10cSrcweir SwDocShell* pDocShell = ::GetActiveWrtShell()->GetView().GetDocShell();
604cdf0e10cSrcweir FieldUnit eMetric = ::GetDfltMetric(0 != PTR_CAST(SwWebDocShell, pDocShell));
605cdf0e10cSrcweir
606cdf0e10cSrcweir aSet.Put ( SfxAllEnumItem(SID_METRIC_ITEM, static_cast< sal_uInt16 >(eMetric)));
607cdf0e10cSrcweir rPage.PageCreated(aSet);
608cdf0e10cSrcweir }
609cdf0e10cSrcweir break;
610cdf0e10cSrcweir case RID_SVXPAGE_PICK_BULLET :
611cdf0e10cSrcweir {
612cdf0e10cSrcweir aSet.Put (SfxStringItem(SID_BULLET_CHAR_FMT,sBulletCharFmt));
613cdf0e10cSrcweir rPage.PageCreated(aSet);
614cdf0e10cSrcweir }
615cdf0e10cSrcweir break;
616cdf0e10cSrcweir case TP_HEADER_PAGE:
617cdf0e10cSrcweir if(0 == (nHtmlMode & HTMLMODE_ON ))
618cdf0e10cSrcweir ((SvxHeaderPage&)rPage).EnableDynamicSpacing();
619cdf0e10cSrcweir break;
620cdf0e10cSrcweir case TP_FOOTER_PAGE:
621cdf0e10cSrcweir if(0 == (nHtmlMode & HTMLMODE_ON ))
622cdf0e10cSrcweir ((SvxFooterPage&)rPage).EnableDynamicSpacing();
623cdf0e10cSrcweir break;
624cdf0e10cSrcweir case TP_BORDER :
625cdf0e10cSrcweir if( SFX_STYLE_FAMILY_PARA == nType )
626cdf0e10cSrcweir {
627cdf0e10cSrcweir aSet.Put (SfxUInt16Item(SID_SWMODE_TYPE,SW_BORDER_MODE_PARA));
628cdf0e10cSrcweir }
629cdf0e10cSrcweir else if( SFX_STYLE_FAMILY_FRAME == nType )
630cdf0e10cSrcweir {
631cdf0e10cSrcweir aSet.Put (SfxUInt16Item(SID_SWMODE_TYPE,SW_BORDER_MODE_FRAME));
632cdf0e10cSrcweir }
633cdf0e10cSrcweir rPage.PageCreated(aSet);
634cdf0e10cSrcweir
635cdf0e10cSrcweir break;
636cdf0e10cSrcweir }
637cdf0e10cSrcweir }
638cdf0e10cSrcweir
639cdf0e10cSrcweir
640cdf0e10cSrcweir
641