xref: /trunk/main/sd/source/ui/dlg/prltempl.cxx (revision cf6516809c57e1bb0a940545cca99cdad54d4ce2)
15b190011SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
35b190011SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
45b190011SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
55b190011SAndrew Rist  * distributed with this work for additional information
65b190011SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
75b190011SAndrew Rist  * to you under the Apache License, Version 2.0 (the
85b190011SAndrew Rist  * "License"); you may not use this file except in compliance
95b190011SAndrew Rist  * with the License.  You may obtain a copy of the License at
10cdf0e10cSrcweir  *
115b190011SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12cdf0e10cSrcweir  *
135b190011SAndrew Rist  * Unless required by applicable law or agreed to in writing,
145b190011SAndrew Rist  * software distributed under the License is distributed on an
155b190011SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
165b190011SAndrew Rist  * KIND, either express or implied.  See the License for the
175b190011SAndrew Rist  * specific language governing permissions and limitations
185b190011SAndrew Rist  * under the License.
19cdf0e10cSrcweir  *
205b190011SAndrew Rist  *************************************************************/
215b190011SAndrew Rist 
225b190011SAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove
25cdf0e10cSrcweir #include "precompiled_sd.hxx"
26cdf0e10cSrcweir 
27cdf0e10cSrcweir #ifdef SD_DLLIMPLEMENTATION
28cdf0e10cSrcweir #undef SD_DLLIMPLEMENTATION
29cdf0e10cSrcweir #endif
30cdf0e10cSrcweir 
31cdf0e10cSrcweir 
32cdf0e10cSrcweir #include "eetext.hxx"
33cdf0e10cSrcweir 
34cdf0e10cSrcweir #include <svx/dialogs.hrc>
35cdf0e10cSrcweir #include <editeng/flstitem.hxx>
36cdf0e10cSrcweir #include <svx/drawitem.hxx>
37cdf0e10cSrcweir #include <svl/style.hxx>
38cdf0e10cSrcweir #include <svx/tabline.hxx>
39cdf0e10cSrcweir #include <editeng/bulitem.hxx>
40cdf0e10cSrcweir #include <editeng/eeitem.hxx>
41cdf0e10cSrcweir #include <editeng/brshitem.hxx>
42cdf0e10cSrcweir #include <vcl/graph.hxx>
43cdf0e10cSrcweir #include <editeng/lrspitem.hxx>
44cdf0e10cSrcweir #include <editeng/numitem.hxx>
45cdf0e10cSrcweir #include <svl/cjkoptions.hxx>
46cdf0e10cSrcweir 
47cdf0e10cSrcweir #include "DrawDocShell.hxx"
48cdf0e10cSrcweir #include "glob.hrc"
49cdf0e10cSrcweir #include "sdresid.hxx"
50cdf0e10cSrcweir #include "prltempl.hxx"
51cdf0e10cSrcweir #include "prltempl.hrc"
52cdf0e10cSrcweir #include "enumdlg.hrc"
53cdf0e10cSrcweir //#include "enumdlg.hxx"
54cdf0e10cSrcweir #include "bulmaper.hxx"
55cdf0e10cSrcweir #include <svl/intitem.hxx>
56cdf0e10cSrcweir #include <svx/svxgrahicitem.hxx>
57cdf0e10cSrcweir #include <svx/flagsdef.hxx>
58cdf0e10cSrcweir #include "drawdoc.hxx"
59cdf0e10cSrcweir #define IS_OUTLINE(x) (x >= PO_OUTLINE_1 && x <= PO_OUTLINE_9)
60cdf0e10cSrcweir 
61cdf0e10cSrcweir /*************************************************************************
62cdf0e10cSrcweir |*
63cdf0e10cSrcweir |* Konstruktor des Tab-Dialogs: Fuegt die Seiten zum Dialog hinzu
64cdf0e10cSrcweir |*
65cdf0e10cSrcweir \************************************************************************/
66cdf0e10cSrcweir 
SdPresLayoutTemplateDlg(SfxObjectShell * pDocSh,Window * pParent,SdResId DlgId,SfxStyleSheetBase & rStyleBase,PresentationObjects _ePO,SfxStyleSheetBasePool * pSSPool)67cdf0e10cSrcweir SdPresLayoutTemplateDlg::SdPresLayoutTemplateDlg( SfxObjectShell* pDocSh,
68cdf0e10cSrcweir                                 Window* pParent,
69cdf0e10cSrcweir                                 SdResId DlgId,
70cdf0e10cSrcweir                                 SfxStyleSheetBase& rStyleBase,
71cdf0e10cSrcweir                                 PresentationObjects _ePO,
72cdf0e10cSrcweir                                 SfxStyleSheetBasePool* pSSPool ) :
73cdf0e10cSrcweir         SfxTabDialog        ( pParent, DlgId ),
74cdf0e10cSrcweir         mpDocShell          ( pDocSh ),
75cdf0e10cSrcweir         ePO                 ( _ePO ),
76cdf0e10cSrcweir         aInputSet           ( *rStyleBase.GetItemSet().GetPool(), SID_PARAM_NUM_PRESET, SID_PARAM_CUR_NUM_LEVEL ),
77cdf0e10cSrcweir         pOutSet             ( NULL ),
78cdf0e10cSrcweir         pOrgSet             ( &rStyleBase.GetItemSet() )
79cdf0e10cSrcweir {
80cdf0e10cSrcweir     if( IS_OUTLINE(ePO))
81cdf0e10cSrcweir     {
82cdf0e10cSrcweir         // Leider sind die Itemsets unserer Stylesheets nicht discret..
83cdf0e10cSrcweir         const sal_uInt16* pPtr = pOrgSet->GetRanges();
84cdf0e10cSrcweir         sal_uInt16 p1, p2;
85cdf0e10cSrcweir         while( *pPtr )
86cdf0e10cSrcweir         {
87cdf0e10cSrcweir             p1 = pPtr[0];
88cdf0e10cSrcweir             p2 = pPtr[1];
89cdf0e10cSrcweir 
90cdf0e10cSrcweir             // erstmal das ganze discret machen
91cdf0e10cSrcweir             while(pPtr[2] && (pPtr[2] - p2 == 1))
92cdf0e10cSrcweir             {
93cdf0e10cSrcweir                 p2 = pPtr[3];
94cdf0e10cSrcweir                 pPtr += 2;
95cdf0e10cSrcweir             }
96cdf0e10cSrcweir             aInputSet.MergeRange( p1, p2 );
97cdf0e10cSrcweir             pPtr += 2;
98cdf0e10cSrcweir         }
99cdf0e10cSrcweir 
100cdf0e10cSrcweir         aInputSet.Put( rStyleBase.GetItemSet() );
101cdf0e10cSrcweir 
102cdf0e10cSrcweir         // need parent-relationship
103*be099857Smseidel         const SfxItemSet* pParentItemSet = rStyleBase.GetItemSet().GetParent();
104cdf0e10cSrcweir         if( pParentItemSet )
105cdf0e10cSrcweir             aInputSet.SetParent( pParentItemSet );
106cdf0e10cSrcweir 
107cdf0e10cSrcweir         pOutSet = new SfxItemSet( rStyleBase.GetItemSet() );
108cdf0e10cSrcweir         pOutSet->ClearItem();
109cdf0e10cSrcweir 
110cdf0e10cSrcweir         const SfxPoolItem *pItem = NULL;
111cdf0e10cSrcweir 
112cdf0e10cSrcweir         // Fals in diesem Stylesheet kein Bullet Item ist, holen wir uns
113cdf0e10cSrcweir         // das aus dem 'Outline 1' Stylesheet.
114cdf0e10cSrcweir         if( SFX_ITEM_SET != aInputSet.GetItemState(EE_PARA_NUMBULLET, sal_False, &pItem ))
115cdf0e10cSrcweir         {
116cdf0e10cSrcweir             String aStyleName((SdResId(STR_PSEUDOSHEET_OUTLINE)));
117cdf0e10cSrcweir             aStyleName.AppendAscii( RTL_CONSTASCII_STRINGPARAM( " 1" ) );
118cdf0e10cSrcweir             SfxStyleSheetBase* pFirstStyleSheet = pSSPool->Find( aStyleName, SD_STYLE_FAMILY_PSEUDO);
119cdf0e10cSrcweir 
120cdf0e10cSrcweir             if(pFirstStyleSheet)
121cdf0e10cSrcweir                 if( SFX_ITEM_SET == pFirstStyleSheet->GetItemSet().GetItemState(EE_PARA_NUMBULLET, sal_False, &pItem) )
122cdf0e10cSrcweir                     aInputSet.Put( *pItem );
123cdf0e10cSrcweir         }
124cdf0e10cSrcweir 
125cdf0e10cSrcweir         // gewaehlte Ebene im Dialog vorselektieren
126cdf0e10cSrcweir         aInputSet.Put( SfxUInt16Item( SID_PARAM_CUR_NUM_LEVEL, 1<<GetOutlineLevel()));
127cdf0e10cSrcweir 
128cdf0e10cSrcweir         SetInputSet( &aInputSet );
129cdf0e10cSrcweir     }
130cdf0e10cSrcweir     else
131cdf0e10cSrcweir         SetInputSet( pOrgSet );
132cdf0e10cSrcweir 
133cdf0e10cSrcweir     FreeResource();
134cdf0e10cSrcweir 
135cdf0e10cSrcweir     SvxColorTableItem aColorTableItem(*( (const SvxColorTableItem*)
136cdf0e10cSrcweir         ( mpDocShell->GetItem( SID_COLOR_TABLE ) ) ) );
137cdf0e10cSrcweir     SvxGradientListItem aGradientListItem(*( (const SvxGradientListItem*)
138cdf0e10cSrcweir         ( mpDocShell->GetItem( SID_GRADIENT_LIST ) ) ) );
139cdf0e10cSrcweir     SvxBitmapListItem aBitmapListItem(*( (const SvxBitmapListItem*)
140cdf0e10cSrcweir         ( mpDocShell->GetItem( SID_BITMAP_LIST ) ) ) );
141cdf0e10cSrcweir     SvxHatchListItem aHatchListItem(*( (const SvxHatchListItem*)
142cdf0e10cSrcweir         ( mpDocShell->GetItem( SID_HATCH_LIST ) ) ) );
143cdf0e10cSrcweir     SvxDashListItem aDashListItem(*( (const SvxDashListItem*)
144cdf0e10cSrcweir         ( mpDocShell->GetItem( SID_DASH_LIST ) ) ) );
145cdf0e10cSrcweir     SvxLineEndListItem aLineEndListItem(*( (const SvxLineEndListItem*)
146cdf0e10cSrcweir         ( mpDocShell->GetItem( SID_LINEEND_LIST ) ) ) );
147cdf0e10cSrcweir 
148c7be74b1SArmin Le Grand     maColorTab = aColorTableItem.GetColorTable();
149c7be74b1SArmin Le Grand     maDashList = aDashListItem.GetDashList();
150c7be74b1SArmin Le Grand     maLineEndList = aLineEndListItem.GetLineEndList();
151c7be74b1SArmin Le Grand     maGradientList = aGradientListItem.GetGradientList();
152c7be74b1SArmin Le Grand     maHatchingList = aHatchListItem.GetHatchList();
153c7be74b1SArmin Le Grand     maBitmapList = aBitmapListItem.GetBitmapList();
154cdf0e10cSrcweir 
155cdf0e10cSrcweir     switch( DlgId.GetId() )
156cdf0e10cSrcweir     {
157cdf0e10cSrcweir         case TAB_PRES_LAYOUT_TEMPLATE:
158cdf0e10cSrcweir         {
159cdf0e10cSrcweir             AddTabPage( RID_SVXPAGE_LINE);
160cdf0e10cSrcweir             AddTabPage( RID_SVXPAGE_AREA);
161cdf0e10cSrcweir             AddTabPage( RID_SVXPAGE_SHADOW);
162cdf0e10cSrcweir             AddTabPage( RID_SVXPAGE_TRANSPARENCE);
163cdf0e10cSrcweir             AddTabPage( RID_SVXPAGE_CHAR_NAME );
164cdf0e10cSrcweir             AddTabPage( RID_SVXPAGE_CHAR_EFFECTS );
165cdf0e10cSrcweir             AddTabPage( RID_SVXPAGE_STD_PARAGRAPH );
166cdf0e10cSrcweir             AddTabPage( RID_SVXPAGE_TEXTATTR );
167cdf0e10cSrcweir             AddTabPage( RID_SVXPAGE_PICK_BULLET );
168cdf0e10cSrcweir             AddTabPage( RID_SVXPAGE_PICK_SINGLE_NUM );
169cdf0e10cSrcweir             AddTabPage( RID_SVXPAGE_PICK_BMP );
170cdf0e10cSrcweir             AddTabPage( RID_SVXPAGE_NUM_OPTIONS );
171cdf0e10cSrcweir             AddTabPage( RID_SVXPAGE_TABULATOR );
172cdf0e10cSrcweir         }
173cdf0e10cSrcweir         break;
174cdf0e10cSrcweir 
175cdf0e10cSrcweir         case TAB_PRES_LAYOUT_TEMPLATE_BACKGROUND:        // background
176cdf0e10cSrcweir             AddTabPage( RID_SVXPAGE_AREA);
177cdf0e10cSrcweir         break;
178cdf0e10cSrcweir     }
179cdf0e10cSrcweir 
180cdf0e10cSrcweir     // #112490# the tabpages Alignment, Tabs and Asian Typography are very
18186e1cf34SPedro Giffuni     // useful, except for the background style
182cdf0e10cSrcweir     if( DlgId.GetId() != TAB_PRES_LAYOUT_TEMPLATE_BACKGROUND )
183cdf0e10cSrcweir     {
184cdf0e10cSrcweir         SvtCJKOptions aCJKOptions;
185cdf0e10cSrcweir         if( aCJKOptions.IsAsianTypographyEnabled() )
186cdf0e10cSrcweir             AddTabPage( RID_SVXPAGE_PARA_ASIAN );
187cdf0e10cSrcweir         else
188cdf0e10cSrcweir             RemoveTabPage( RID_SVXPAGE_PARA_ASIAN );
189cdf0e10cSrcweir 
190cdf0e10cSrcweir         AddTabPage( RID_SVXPAGE_ALIGN_PARAGRAPH );
191cdf0e10cSrcweir     }
192cdf0e10cSrcweir 
193cdf0e10cSrcweir     // Titel setzen und
194cdf0e10cSrcweir     // entsprechende Seiten zum Dialog hinzufuegen
195cdf0e10cSrcweir     String aTitle;
196cdf0e10cSrcweir 
197cdf0e10cSrcweir     switch( ePO )
198cdf0e10cSrcweir     {
199cdf0e10cSrcweir         case PO_TITLE:
200cdf0e10cSrcweir             aTitle = String(SdResId( STR_PSEUDOSHEET_TITLE ));
201cdf0e10cSrcweir         break;
202cdf0e10cSrcweir 
203cdf0e10cSrcweir         case PO_SUBTITLE:
204cdf0e10cSrcweir             aTitle = String(SdResId( STR_PSEUDOSHEET_SUBTITLE ));
205cdf0e10cSrcweir         break;
206cdf0e10cSrcweir 
207cdf0e10cSrcweir         case PO_BACKGROUND:
208cdf0e10cSrcweir             aTitle = String(SdResId( STR_PSEUDOSHEET_BACKGROUND ));
209cdf0e10cSrcweir         break;
210cdf0e10cSrcweir 
211cdf0e10cSrcweir         case PO_BACKGROUNDOBJECTS:
212cdf0e10cSrcweir             aTitle = String(SdResId( STR_PSEUDOSHEET_BACKGROUNDOBJECTS ));
213cdf0e10cSrcweir         break;
214cdf0e10cSrcweir 
215cdf0e10cSrcweir         case PO_OUTLINE_1:
216cdf0e10cSrcweir         case PO_OUTLINE_2:
217cdf0e10cSrcweir         case PO_OUTLINE_3:
218cdf0e10cSrcweir         case PO_OUTLINE_4:
219cdf0e10cSrcweir         case PO_OUTLINE_5:
220cdf0e10cSrcweir         case PO_OUTLINE_6:
221cdf0e10cSrcweir         case PO_OUTLINE_7:
222cdf0e10cSrcweir         case PO_OUTLINE_8:
223cdf0e10cSrcweir         case PO_OUTLINE_9:
224cdf0e10cSrcweir             aTitle = String(SdResId( STR_PSEUDOSHEET_OUTLINE ));
225cdf0e10cSrcweir             aTitle.Append( sal_Unicode(' ') );
226cdf0e10cSrcweir             aTitle.Append( UniString::CreateFromInt32( ePO - PO_OUTLINE_1 + 1 ) );
227cdf0e10cSrcweir         break;
228cdf0e10cSrcweir 
229cdf0e10cSrcweir         case PO_NOTES:
230cdf0e10cSrcweir             aTitle = String(SdResId( STR_PSEUDOSHEET_NOTES ));
231cdf0e10cSrcweir         break;
232cdf0e10cSrcweir     }
233cdf0e10cSrcweir     SetText( aTitle );
234cdf0e10cSrcweir 
235cdf0e10cSrcweir     nDlgType = 1; // Vorlagen-Dialog
236cdf0e10cSrcweir     nPageType = 0;
237cdf0e10cSrcweir     nPos = 0;
238cdf0e10cSrcweir 
239cdf0e10cSrcweir     nColorTableState = CT_NONE;
240cdf0e10cSrcweir     nBitmapListState = CT_NONE;
241cdf0e10cSrcweir     nGradientListState = CT_NONE;
242cdf0e10cSrcweir     nHatchingListState = CT_NONE;
243cdf0e10cSrcweir }
244cdf0e10cSrcweir 
245cdf0e10cSrcweir // -----------------------------------------------------------------------
246cdf0e10cSrcweir 
~SdPresLayoutTemplateDlg()247cdf0e10cSrcweir SdPresLayoutTemplateDlg::~SdPresLayoutTemplateDlg()
248cdf0e10cSrcweir {
249cdf0e10cSrcweir     delete pOutSet;
250cdf0e10cSrcweir }
251cdf0e10cSrcweir 
252cdf0e10cSrcweir // -----------------------------------------------------------------------
253cdf0e10cSrcweir 
PageCreated(sal_uInt16 nId,SfxTabPage & rPage)254cdf0e10cSrcweir void SdPresLayoutTemplateDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
255cdf0e10cSrcweir {   SfxAllItemSet aSet(*(aInputSet.GetPool()));
256cdf0e10cSrcweir     switch( nId )
257cdf0e10cSrcweir     {
258cdf0e10cSrcweir         case RID_SVXPAGE_LINE:
259cdf0e10cSrcweir         {
260c7be74b1SArmin Le Grand             aSet.Put (SvxColorTableItem(maColorTab,SID_COLOR_TABLE));
261c7be74b1SArmin Le Grand             aSet.Put (SvxDashListItem(maDashList,SID_DASH_LIST));
262c7be74b1SArmin Le Grand             aSet.Put (SvxLineEndListItem(maLineEndList,SID_LINEEND_LIST));
263cdf0e10cSrcweir             aSet.Put (SfxUInt16Item(SID_DLG_TYPE,nDlgType));
264cdf0e10cSrcweir 
265cdf0e10cSrcweir             rPage.PageCreated(aSet);
266cdf0e10cSrcweir         }
267cdf0e10cSrcweir         break;
268cdf0e10cSrcweir 
269cdf0e10cSrcweir         case RID_SVXPAGE_AREA:
270cdf0e10cSrcweir         {
271c7be74b1SArmin Le Grand             aSet.Put (SvxColorTableItem(maColorTab,SID_COLOR_TABLE));
272c7be74b1SArmin Le Grand             aSet.Put (SvxGradientListItem(maGradientList,SID_GRADIENT_LIST));
273c7be74b1SArmin Le Grand             aSet.Put (SvxHatchListItem(maHatchingList,SID_HATCH_LIST));
274c7be74b1SArmin Le Grand             aSet.Put (SvxBitmapListItem(maBitmapList,SID_BITMAP_LIST));
275cdf0e10cSrcweir             aSet.Put (SfxUInt16Item(SID_PAGE_TYPE,nPageType));
276cdf0e10cSrcweir             aSet.Put (SfxUInt16Item(SID_DLG_TYPE,nDlgType));
277cdf0e10cSrcweir             aSet.Put (SfxUInt16Item(SID_TABPAGE_POS,nPos));
278cdf0e10cSrcweir             rPage.PageCreated(aSet);
279cdf0e10cSrcweir 
280cdf0e10cSrcweir         }
281cdf0e10cSrcweir         break;
282cdf0e10cSrcweir 
283cdf0e10cSrcweir         case RID_SVXPAGE_SHADOW:
284c7be74b1SArmin Le Grand                 aSet.Put (SvxColorTableItem(maColorTab,SID_COLOR_TABLE)); //add CHINA001
285cdf0e10cSrcweir                 aSet.Put (SfxUInt16Item(SID_PAGE_TYPE,nPageType));
286cdf0e10cSrcweir                 aSet.Put (SfxUInt16Item(SID_DLG_TYPE,nDlgType));
287cdf0e10cSrcweir                 rPage.PageCreated(aSet);
288cdf0e10cSrcweir             break;
289cdf0e10cSrcweir 
290cdf0e10cSrcweir         case RID_SVXPAGE_TRANSPARENCE:
291cdf0e10cSrcweir             aSet.Put (SfxUInt16Item(SID_PAGE_TYPE,nPageType));
292cdf0e10cSrcweir             aSet.Put (SfxUInt16Item(SID_DLG_TYPE,nDlgType));
293cdf0e10cSrcweir             rPage.PageCreated(aSet);
294cdf0e10cSrcweir         break;
295cdf0e10cSrcweir 
296cdf0e10cSrcweir         case RID_SVXPAGE_CHAR_NAME:
297cdf0e10cSrcweir         {
298cdf0e10cSrcweir             SvxFontListItem aItem(*( (const SvxFontListItem*)
299cdf0e10cSrcweir                 ( mpDocShell->GetItem( SID_ATTR_CHAR_FONTLIST) ) ) );
300cdf0e10cSrcweir 
301cdf0e10cSrcweir             aSet.Put (SvxFontListItem( aItem.GetFontList(), SID_ATTR_CHAR_FONTLIST));
302cdf0e10cSrcweir             rPage.PageCreated(aSet);
303cdf0e10cSrcweir         }
304cdf0e10cSrcweir         break;
305cdf0e10cSrcweir 
306cdf0e10cSrcweir         case RID_SVXPAGE_CHAR_EFFECTS:
307cdf0e10cSrcweir             aSet.Put (SfxUInt16Item(SID_DISABLE_CTL,DISABLE_CASEMAP));
308cdf0e10cSrcweir             rPage.PageCreated(aSet);
309cdf0e10cSrcweir         break;
310cdf0e10cSrcweir 
311cdf0e10cSrcweir         case RID_SVXPAGE_STD_PARAGRAPH:
312cdf0e10cSrcweir         break;
313cdf0e10cSrcweir     }
314cdf0e10cSrcweir }
315cdf0e10cSrcweir 
GetOutputItemSet() const316cdf0e10cSrcweir const SfxItemSet* SdPresLayoutTemplateDlg::GetOutputItemSet() const
317cdf0e10cSrcweir {
318cdf0e10cSrcweir     if( pOutSet )
319cdf0e10cSrcweir     {
320cdf0e10cSrcweir         pOutSet->Put( *SfxTabDialog::GetOutputItemSet() );
321cdf0e10cSrcweir 
322cdf0e10cSrcweir         const SvxNumBulletItem *pSvxNumBulletItem = NULL;
323cdf0e10cSrcweir         if( SFX_ITEM_SET == pOutSet->GetItemState(EE_PARA_NUMBULLET, sal_False, (const SfxPoolItem**)&pSvxNumBulletItem ))
324cdf0e10cSrcweir             SdBulletMapper::MapFontsInNumRule( *pSvxNumBulletItem->GetNumRule(), *pOutSet );
325cdf0e10cSrcweir         return pOutSet;
326cdf0e10cSrcweir     }
327cdf0e10cSrcweir     else
328cdf0e10cSrcweir         return SfxTabDialog::GetOutputItemSet();
329cdf0e10cSrcweir }
330cdf0e10cSrcweir 
331cdf0e10cSrcweir // ---------------------------------------------------------------------
332cdf0e10cSrcweir // ---------------------------------------------------------------------
GetOutlineLevel() const333cdf0e10cSrcweir sal_uInt16 SdPresLayoutTemplateDlg::GetOutlineLevel() const
334cdf0e10cSrcweir {
335cdf0e10cSrcweir     switch( ePO )
336cdf0e10cSrcweir     {
337cdf0e10cSrcweir     case PO_OUTLINE_1: return 0;
338cdf0e10cSrcweir     case PO_OUTLINE_2: return 1;
339cdf0e10cSrcweir     case PO_OUTLINE_3: return 2;
340cdf0e10cSrcweir     case PO_OUTLINE_4: return 3;
341cdf0e10cSrcweir     case PO_OUTLINE_5: return 4;
342cdf0e10cSrcweir     case PO_OUTLINE_6: return 5;
343cdf0e10cSrcweir     case PO_OUTLINE_7: return 6;
344cdf0e10cSrcweir     case PO_OUTLINE_8: return 7;
345cdf0e10cSrcweir     case PO_OUTLINE_9: return 8;
346cdf0e10cSrcweir     default:
347cdf0e10cSrcweir         DBG_ASSERT( sal_False, "Falscher Po! [CL]");
348cdf0e10cSrcweir     }
349cdf0e10cSrcweir     return 0;
350cdf0e10cSrcweir }
351