Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /*
3 : * This file is part of the LibreOffice project.
4 : *
5 : * This Source Code Form is subject to the terms of the Mozilla Public
6 : * License, v. 2.0. If a copy of the MPL was not distributed with this
7 : * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 : *
9 : * This file incorporates work covered by the following license notice:
10 : *
11 : * Licensed to the Apache Software Foundation (ASF) under one or more
12 : * contributor license agreements. See the NOTICE file distributed
13 : * with this work for additional information regarding copyright
14 : * ownership. The ASF licenses this file to you under the Apache
15 : * License, Version 2.0 (the "License"); you may not use this file
16 : * except in compliance with the License. You may obtain a copy of
17 : * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 : */
19 :
20 :
21 : #include <com/sun/star/lang/DisposedException.hpp>
22 : #include <editeng/eeitem.hxx>
23 : #include <editeng/fhgtitem.hxx>
24 : #include <editeng/colritem.hxx>
25 : #include <editeng/cntritem.hxx>
26 : #include <editeng/shdditem.hxx>
27 : #include <editeng/crsditem.hxx>
28 : #include <editeng/udlnitem.hxx>
29 : #include <editeng/wghtitem.hxx>
30 : #include <editeng/postitem.hxx>
31 : #include <editeng/fontitem.hxx>
32 : #include <svl/poolitem.hxx>
33 : #include <svx/xfillit0.hxx>
34 : #include <svx/xlineit0.hxx>
35 : #include <editeng/ulspitem.hxx>
36 : #include <editeng/numitem.hxx>
37 : #include <editeng/brshitem.hxx>
38 : #include <editeng/editeng.hxx>
39 : #include <svl/smplhint.hxx>
40 : #include <editeng/langitem.hxx>
41 : #include <editeng/charreliefitem.hxx>
42 : #include <editeng/emphitem.hxx>
43 : #include <svx/sdr/table/tabledesign.hxx>
44 : #include <editeng/akrnitem.hxx>
45 :
46 : #include <svx/svdattr.hxx>
47 : #include "eetext.hxx"
48 : #include <svx/xtable.hxx> // fuer RGB_Color
49 : #include <editeng/bulitem.hxx>
50 : #include <editeng/lrspitem.hxx>
51 : #include <editeng/adjitem.hxx>
52 : #include <svl/itempool.hxx>
53 :
54 : #include "stlpool.hxx"
55 : #include "sdresid.hxx"
56 : #include "stlsheet.hxx"
57 : #include "glob.hrc"
58 : #include "glob.hxx"
59 : #include "drawdoc.hxx"
60 : #include "sdmod.hxx"
61 : #include "sdpage.hxx"
62 : #include "helpids.h"
63 : #include <svl/itemset.hxx>
64 : #include "app.hrc"
65 :
66 : using ::rtl::OUString;
67 : using namespace ::com::sun::star::uno;
68 : using namespace ::com::sun::star::lang;
69 : using namespace ::com::sun::star::style;
70 : using namespace ::com::sun::star::container;
71 :
72 : // ----------------------------------------------------------
73 :
74 20 : SdStyleSheetPool::SdStyleSheetPool(SfxItemPool const& _rPool, SdDrawDocument* pDocument)
75 : : SdStyleSheetPoolBase( _rPool )
76 : , mpActualStyleSheet(NULL)
77 20 : , mpDoc(pDocument)
78 : {
79 20 : if( mpDoc )
80 : {
81 20 : rtl::Reference< SfxStyleSheetPool > xPool( this );
82 :
83 : // create graphics family
84 20 : mxGraphicFamily = new SdStyleFamily( xPool, SD_STYLE_FAMILY_GRAPHICS );
85 20 : mxCellFamily = new SdStyleFamily( xPool, SD_STYLE_FAMILY_CELL );
86 :
87 20 : mxTableFamily = sdr::table::CreateTableDesignFamily();
88 20 : Reference< XNamed > xNamed( mxTableFamily, UNO_QUERY );
89 20 : if( xNamed.is() )
90 20 : msTableFamilyName = xNamed->getName();
91 :
92 : // create presentation families, one for each master page
93 20 : const sal_uInt16 nCount = mpDoc->GetMasterSdPageCount(PK_STANDARD);
94 20 : for( sal_uInt16 nPage = 0; nPage < nCount; ++nPage )
95 20 : AddStyleFamily( mpDoc->GetMasterSdPage(nPage,PK_STANDARD) );
96 :
97 : }
98 20 : }
99 :
100 : // ----------------------------------------------------------
101 :
102 36 : SdStyleSheetPool::~SdStyleSheetPool()
103 : {
104 : DBG_ASSERT( mpDoc == NULL, "sd::SdStyleSheetPool::~SdStyleSheetPool(), dispose me first!" );
105 36 : }
106 :
107 : // ----------------------------------------------------------
108 :
109 973 : SfxStyleSheetBase* SdStyleSheetPool::Create(const String& rName, SfxStyleFamily eFamily, sal_uInt16 _nMask )
110 : {
111 973 : return new SdStyleSheet(rName, *this, eFamily, _nMask);
112 : }
113 :
114 : // ----------------------------------------------------------
115 :
116 0 : SfxStyleSheetBase* SdStyleSheetPool::Create(const SdStyleSheet& rStyle)
117 : {
118 0 : return new SdStyleSheet( rStyle );
119 : }
120 :
121 : // ----------------------------------------------------------
122 :
123 0 : SfxStyleSheetBase* SdStyleSheetPool::GetTitleSheet(const String& rLayoutName)
124 : {
125 0 : String aName(rLayoutName);
126 0 : aName.AppendAscii( RTL_CONSTASCII_STRINGPARAM( SD_LT_SEPARATOR ));
127 0 : aName += String(SdResId(STR_LAYOUT_TITLE));
128 0 : SfxStyleSheetBase* pResult = Find(aName, SD_STYLE_FAMILY_MASTERPAGE);
129 0 : return pResult;
130 : }
131 :
132 : /*************************************************************************
133 : |*
134 : |* eine Liste der Gliederungstextvorlagen fuer ein Praesentationlayout
135 : |* erstellen, der Aufrufer muss die Liste wieder loeschen
136 : |*
137 : \************************************************************************/
138 :
139 30 : void SdStyleSheetPool::CreateOutlineSheetList (const String& rLayoutName, std::vector<SfxStyleSheetBase*> &rOutlineStyles)
140 : {
141 30 : String aName(rLayoutName);
142 30 : aName.AppendAscii( RTL_CONSTASCII_STRINGPARAM( SD_LT_SEPARATOR ));
143 30 : aName += String(SdResId(STR_LAYOUT_OUTLINE));
144 :
145 300 : for (sal_uInt16 nSheet = 1; nSheet < 10; nSheet++)
146 : {
147 270 : String aFullName(aName);
148 270 : aFullName.Append( sal_Unicode( ' ' ));
149 270 : aFullName.Append( String::CreateFromInt32( (sal_Int32)nSheet ));
150 270 : SfxStyleSheetBase* pSheet = Find(aFullName, SD_STYLE_FAMILY_MASTERPAGE);
151 :
152 270 : if (pSheet)
153 270 : rOutlineStyles.push_back(pSheet);
154 300 : }
155 30 : }
156 :
157 : /*************************************************************************
158 : |*
159 : |* StyleSheets mit Defaultweren fuer das genannte Praesentationslayout erzeugen
160 : |*
161 : \************************************************************************/
162 :
163 13 : void SdStyleSheetPool::CreateLayoutStyleSheets(const String& rLayoutName, sal_Bool bCheck /*= sal_False*/ )
164 : {
165 13 : const sal_uInt16 nUsedMask = SFXSTYLEBIT_ALL & ~SFXSTYLEBIT_USERDEF;
166 :
167 : (void)bCheck;
168 13 : sal_Bool bCreated = sal_False;
169 :
170 13 : SfxStyleSheetBase* pSheet = NULL;
171 :
172 13 : String aPrefix(rLayoutName);
173 13 : String aSep( RTL_CONSTASCII_USTRINGPARAM( SD_LT_SEPARATOR ));
174 13 : aPrefix.Insert(aSep);
175 :
176 13 : Font aLatinFont, aCJKFont, aCTLFont;
177 :
178 13 : mpDoc->getDefaultFonts( aLatinFont, aCJKFont, aCTLFont );
179 :
180 : // Font fuer Titel und Gliederung
181 13 : SvxFontItem aSvxFontItem( aLatinFont.GetFamily(), aLatinFont.GetName(), aLatinFont.GetStyleName(), aLatinFont.GetPitch(),
182 26 : aLatinFont.GetCharSet(), EE_CHAR_FONTINFO );
183 :
184 13 : SvxFontItem aSvxFontItemCJK( aCJKFont.GetFamily(), aCJKFont.GetName(), aCJKFont.GetStyleName(), aCJKFont.GetPitch(),
185 26 : aCJKFont.GetCharSet(), EE_CHAR_FONTINFO_CJK );
186 :
187 13 : SvxFontItem aSvxFontItemCTL( aCTLFont.GetFamily(), aCTLFont.GetName(), aCTLFont.GetStyleName(), aCTLFont.GetPitch(),
188 26 : aCTLFont.GetCharSet(), EE_CHAR_FONTINFO_CTL );
189 :
190 13 : Font aBulletFont( GetBulletFont() );
191 :
192 : /**************************************************************************
193 : * Gliederungsebenen
194 : **************************************************************************/
195 13 : String aName(SdResId(STR_LAYOUT_OUTLINE));
196 13 : String aHelpFile;
197 :
198 13 : SfxStyleSheetBase* pParent = NULL;
199 13 : SvxLRSpaceItem aSvxLRSpaceItem( EE_PARA_LRSPACE );
200 13 : SvxULSpaceItem aSvxULSpaceItem( EE_PARA_ULSPACE );
201 : sal_uInt16 nLevel;
202 :
203 130 : for( nLevel = 1; nLevel < 10; nLevel++)
204 : {
205 117 : String aLevelName(aName);
206 117 : aLevelName.Append( sal_Unicode( ' ' ));
207 117 : aLevelName.Append( String::CreateFromInt32( sal_Int32( nLevel )));
208 :
209 117 : aLevelName.Insert(aPrefix, 0);
210 :
211 117 : if (!Find(aLevelName, SD_STYLE_FAMILY_MASTERPAGE))
212 : {
213 108 : bCreated = sal_True;
214 108 : pSheet = &Make(aLevelName, SD_STYLE_FAMILY_MASTERPAGE,nUsedMask);
215 108 : pSheet->SetHelpId( aHelpFile, HID_PSEUDOSHEET_OUTLINE + nLevel );
216 :
217 108 : pSheet->SetParent( String() );
218 :
219 : // Attributierung fuer Level 1, die anderen Ebenen "erben"
220 108 : if (nLevel == 1)
221 : {
222 12 : SfxItemSet& rSet = pSheet->GetItemSet();
223 :
224 12 : rSet.Put(aSvxFontItem);
225 12 : rSet.Put(aSvxFontItemCJK);
226 12 : rSet.Put(aSvxFontItemCTL);
227 12 : rSet.Put( SvxPostureItem( ITALIC_NONE, EE_CHAR_ITALIC ) );
228 12 : rSet.Put( SvxPostureItem( ITALIC_NONE, EE_CHAR_ITALIC_CJK ) );
229 12 : rSet.Put( SvxPostureItem( ITALIC_NONE, EE_CHAR_ITALIC_CTL ) );
230 12 : rSet.Put( SvxWeightItem( WEIGHT_NORMAL, EE_CHAR_WEIGHT ) );
231 12 : rSet.Put( SvxWeightItem( WEIGHT_NORMAL, EE_CHAR_WEIGHT_CJK ) );
232 12 : rSet.Put( SvxWeightItem( WEIGHT_NORMAL, EE_CHAR_WEIGHT_CTL ) );
233 12 : rSet.Put( SvxUnderlineItem(UNDERLINE_NONE, EE_CHAR_UNDERLINE ) );
234 12 : rSet.Put( SvxOverlineItem(UNDERLINE_NONE, EE_CHAR_OVERLINE ) );
235 12 : rSet.Put( SvxCrossedOutItem(STRIKEOUT_NONE, EE_CHAR_STRIKEOUT ) );
236 12 : rSet.Put( SvxShadowedItem(sal_False, EE_CHAR_SHADOW ) );
237 12 : rSet.Put( SvxContourItem(sal_False, EE_CHAR_OUTLINE ) );
238 12 : rSet.Put( SvxEmphasisMarkItem(EMPHASISMARK_NONE, EE_CHAR_EMPHASISMARK ) );
239 12 : rSet.Put( SvxCharReliefItem(RELIEF_NONE, EE_CHAR_RELIEF) );
240 12 : rSet.Put( SvxColorItem( Color(COL_AUTO), EE_CHAR_COLOR) );
241 12 : rSet.Put( XLineStyleItem(XLINE_NONE) );
242 12 : rSet.Put( XFillStyleItem(XFILL_NONE) );
243 12 : rSet.Put( SdrTextFitToSizeTypeItem(SDRTEXTFIT_AUTOFIT) );
244 12 : rSet.Put( SdrTextAutoGrowHeightItem(sal_False) );
245 : // #i16874# enable kerning by default but only for new documents
246 12 : rSet.Put( SvxAutoKernItem( sal_True, EE_CHAR_PAIRKERNING ) );
247 :
248 12 : if( nLevel == 1 )
249 : {
250 12 : Font f( GetBulletFont() );
251 12 : PutNumBulletItem( pSheet, f );
252 : }
253 : }
254 :
255 108 : sal_uLong nFontSize = 20;
256 108 : sal_uInt16 nLower = 100;
257 :
258 108 : switch (nLevel)
259 : {
260 : case 1:
261 : {
262 12 : nFontSize = 32;
263 12 : nLower = 500;
264 : }
265 12 : break;
266 :
267 : case 2:
268 : {
269 12 : nFontSize = 28;
270 12 : nLower = 400;
271 : }
272 12 : break;
273 :
274 : case 3:
275 : {
276 12 : nFontSize = 24;
277 12 : nLower = 300;
278 : }
279 12 : break;
280 :
281 : case 4:
282 : {
283 12 : nLower = 200;
284 : }
285 12 : break;
286 : }
287 :
288 : // FontSize
289 108 : nFontSize = (sal_uInt16)((nFontSize * 2540L) / 72); // Pt --> 1/100 mm
290 108 : SfxItemSet& rOutlineSet = pSheet->GetItemSet();
291 108 : rOutlineSet.Put( SvxFontHeightItem( nFontSize, 100, EE_CHAR_FONTHEIGHT ) );
292 108 : rOutlineSet.Put( SvxFontHeightItem( nFontSize, 100, EE_CHAR_FONTHEIGHT_CJK ) );
293 108 : rOutlineSet.Put( SvxFontHeightItem( SdDrawDocument::convertFontHeightToCTL( nFontSize ), 100, EE_CHAR_FONTHEIGHT_CTL ) );
294 :
295 : // Line distance (downwards). Stuff around here cleaned up in i35937
296 108 : aSvxULSpaceItem.SetLower(nLower);
297 108 : pSheet->GetItemSet().Put(aSvxULSpaceItem);
298 : }
299 117 : }
300 :
301 : // if we created outline styles, we need to chain them
302 13 : if( bCreated )
303 : {
304 12 : pParent = NULL;
305 120 : for (nLevel = 1; nLevel < 10; nLevel++)
306 : {
307 108 : String aLevelName(aName);
308 108 : aLevelName.Append( sal_Unicode( ' ' ));
309 108 : aLevelName.Append( String::CreateFromInt32( sal_Int32( nLevel )));
310 :
311 108 : aLevelName.Insert(aPrefix, 0);
312 :
313 108 : pSheet = Find(aLevelName, SD_STYLE_FAMILY_MASTERPAGE);
314 :
315 : DBG_ASSERT( pSheet, "missing layout style!");
316 :
317 108 : if( pSheet )
318 : {
319 108 : if (pParent)
320 96 : pSheet->SetParent(pParent->GetName());
321 108 : pParent = pSheet;
322 : }
323 108 : }
324 : }
325 :
326 : /**************************************************************************
327 : * Titel
328 : **************************************************************************/
329 13 : aName = String(SdResId(STR_LAYOUT_TITLE));
330 13 : aName.Insert(aPrefix, 0);
331 :
332 13 : if (!Find(aName, SD_STYLE_FAMILY_MASTERPAGE))
333 : {
334 12 : bCreated = sal_True;
335 :
336 12 : pSheet = &Make(aName, SD_STYLE_FAMILY_MASTERPAGE,nUsedMask);
337 12 : pSheet->SetHelpId( aHelpFile, HID_PSEUDOSHEET_TITLE );
338 12 : pSheet->SetParent(String());
339 12 : SfxItemSet& rTitleSet = pSheet->GetItemSet();
340 12 : rTitleSet.Put(XLineStyleItem(XLINE_NONE));
341 12 : rTitleSet.Put(XFillStyleItem(XFILL_NONE));
342 12 : rTitleSet.Put(aSvxFontItem);
343 12 : rTitleSet.Put(aSvxFontItemCJK);
344 12 : rTitleSet.Put(aSvxFontItemCTL);
345 12 : rTitleSet.Put(SvxPostureItem( ITALIC_NONE, EE_CHAR_ITALIC ) );
346 12 : rTitleSet.Put(SvxPostureItem( ITALIC_NONE, EE_CHAR_ITALIC_CJK ) );
347 12 : rTitleSet.Put(SvxPostureItem( ITALIC_NONE, EE_CHAR_ITALIC_CTL ) );
348 12 : rTitleSet.Put(SvxWeightItem( WEIGHT_NORMAL, EE_CHAR_WEIGHT ) );
349 12 : rTitleSet.Put(SvxWeightItem( WEIGHT_NORMAL, EE_CHAR_WEIGHT_CJK ) );
350 12 : rTitleSet.Put(SvxWeightItem( WEIGHT_NORMAL, EE_CHAR_WEIGHT_CTL ) );
351 12 : rTitleSet.Put(SvxFontHeightItem( 1552, 100, EE_CHAR_FONTHEIGHT ) ); // 44 pt
352 12 : rTitleSet.Put(SvxFontHeightItem( 1552, 100, EE_CHAR_FONTHEIGHT_CJK ) ); // 44 pt
353 12 : rTitleSet.Put(SvxFontHeightItem( SdDrawDocument::convertFontHeightToCTL( 1552 ), 100, EE_CHAR_FONTHEIGHT_CTL ) ); // 44 pt
354 12 : rTitleSet.Put(SvxUnderlineItem(UNDERLINE_NONE, EE_CHAR_UNDERLINE ));
355 12 : rTitleSet.Put(SvxOverlineItem(UNDERLINE_NONE, EE_CHAR_OVERLINE ));
356 12 : rTitleSet.Put(SvxCrossedOutItem(STRIKEOUT_NONE, EE_CHAR_STRIKEOUT ));
357 12 : rTitleSet.Put(SvxShadowedItem(sal_False, EE_CHAR_SHADOW ));
358 12 : rTitleSet.Put(SvxContourItem(sal_False, EE_CHAR_OUTLINE ));
359 12 : rTitleSet.Put( SvxEmphasisMarkItem(EMPHASISMARK_NONE, EE_CHAR_EMPHASISMARK ) );
360 12 : rTitleSet.Put( SvxCharReliefItem(RELIEF_NONE, EE_CHAR_RELIEF ) );
361 12 : rTitleSet.Put(SvxColorItem( Color(COL_AUTO), EE_CHAR_COLOR ));
362 12 : rTitleSet.Put(SvxAdjustItem(SVX_ADJUST_CENTER, EE_PARA_JUST ));
363 12 : rTitleSet.Put( SdrTextVertAdjustItem( SDRTEXTVERTADJUST_CENTER ) );
364 : // #i16874# enable kerning by default but only for new documents
365 12 : rTitleSet.Put( SvxAutoKernItem( sal_True, EE_CHAR_PAIRKERNING ) );
366 :
367 12 : aBulletFont.SetSize(Size(0,1552)); // 44 pt
368 12 : PutNumBulletItem( pSheet, aBulletFont );
369 : }
370 :
371 : /**************************************************************************
372 : * Untertitel
373 : **************************************************************************/
374 13 : aName = String(SdResId(STR_LAYOUT_SUBTITLE));
375 13 : aName.Insert(aPrefix, 0);
376 :
377 13 : if (!Find(aName, SD_STYLE_FAMILY_MASTERPAGE))
378 : {
379 12 : bCreated = sal_True;
380 :
381 12 : pSheet = &Make(aName, SD_STYLE_FAMILY_MASTERPAGE,nUsedMask);
382 12 : pSheet->SetHelpId( aHelpFile, HID_PSEUDOSHEET_SUBTITLE );
383 12 : pSheet->SetParent(String());
384 12 : SfxItemSet& rSubtitleSet = pSheet->GetItemSet();
385 12 : rSubtitleSet.Put(XLineStyleItem(XLINE_NONE));
386 12 : rSubtitleSet.Put(XFillStyleItem(XFILL_NONE));
387 12 : rSubtitleSet.Put(aSvxFontItem);
388 12 : rSubtitleSet.Put(aSvxFontItemCJK);
389 12 : rSubtitleSet.Put(aSvxFontItemCTL);
390 12 : rSubtitleSet.Put(SvxPostureItem( ITALIC_NONE, EE_CHAR_ITALIC ) );
391 12 : rSubtitleSet.Put(SvxPostureItem( ITALIC_NONE, EE_CHAR_ITALIC_CJK ) );
392 12 : rSubtitleSet.Put(SvxPostureItem( ITALIC_NONE, EE_CHAR_ITALIC_CTL ) );
393 12 : rSubtitleSet.Put(SvxWeightItem( WEIGHT_NORMAL, EE_CHAR_WEIGHT ) );
394 12 : rSubtitleSet.Put(SvxWeightItem( WEIGHT_NORMAL, EE_CHAR_WEIGHT_CJK ) );
395 12 : rSubtitleSet.Put(SvxWeightItem( WEIGHT_NORMAL, EE_CHAR_WEIGHT_CTL ) );
396 12 : rSubtitleSet.Put( SvxFontHeightItem( 1129, 100, EE_CHAR_FONTHEIGHT ) ); // 32 pt
397 12 : rSubtitleSet.Put( SvxFontHeightItem( 1129, 100, EE_CHAR_FONTHEIGHT_CJK ) ); // 32 pt
398 12 : rSubtitleSet.Put( SvxFontHeightItem( SdDrawDocument::convertFontHeightToCTL( 1129 ), 100, EE_CHAR_FONTHEIGHT_CTL ) ); // 32 pt
399 12 : rSubtitleSet.Put(SvxUnderlineItem(UNDERLINE_NONE, EE_CHAR_UNDERLINE ));
400 12 : rSubtitleSet.Put(SvxOverlineItem(UNDERLINE_NONE, EE_CHAR_OVERLINE ));
401 12 : rSubtitleSet.Put(SvxCrossedOutItem(STRIKEOUT_NONE, EE_CHAR_STRIKEOUT ));
402 12 : rSubtitleSet.Put(SvxShadowedItem(sal_False, EE_CHAR_SHADOW ));
403 12 : rSubtitleSet.Put(SvxContourItem(sal_False, EE_CHAR_OUTLINE ));
404 12 : rSubtitleSet.Put( SvxEmphasisMarkItem(EMPHASISMARK_NONE, EE_CHAR_EMPHASISMARK ) );
405 12 : rSubtitleSet.Put( SvxCharReliefItem(RELIEF_NONE, EE_CHAR_RELIEF ) );
406 12 : rSubtitleSet.Put(SvxColorItem( Color(COL_AUTO), EE_CHAR_COLOR ));
407 12 : rSubtitleSet.Put(SvxAdjustItem(SVX_ADJUST_CENTER, EE_PARA_JUST ));
408 12 : rSubtitleSet.Put( SdrTextVertAdjustItem( SDRTEXTVERTADJUST_CENTER ) );
409 : // #i16874# enable kerning by default but only for new documents
410 12 : rSubtitleSet.Put( SvxAutoKernItem( sal_True, EE_CHAR_PAIRKERNING ) );
411 12 : aSvxLRSpaceItem.SetTxtLeft(0);
412 12 : rSubtitleSet.Put(aSvxLRSpaceItem);
413 :
414 12 : Font aTmpFont( GetBulletFont() );
415 12 : aTmpFont.SetSize(Size(0, 1129)); // 32 pt
416 12 : PutNumBulletItem( pSheet, aTmpFont );
417 : }
418 :
419 : /**************************************************************************
420 : * Notizen
421 : **************************************************************************/
422 13 : aName = String(SdResId(STR_LAYOUT_NOTES));
423 13 : aName.Insert(aPrefix, 0);
424 :
425 13 : if (!Find(aName, SD_STYLE_FAMILY_MASTERPAGE))
426 : {
427 12 : bCreated = sal_True;
428 :
429 12 : pSheet = &Make(aName, SD_STYLE_FAMILY_MASTERPAGE,nUsedMask);
430 12 : pSheet->SetHelpId( aHelpFile, HID_PSEUDOSHEET_NOTES );
431 12 : pSheet->SetParent(String());
432 12 : SfxItemSet& rNotesSet = pSheet->GetItemSet();
433 12 : rNotesSet.Put(XLineStyleItem(XLINE_NONE));
434 12 : rNotesSet.Put(XFillStyleItem(XFILL_NONE));
435 12 : rNotesSet.Put(aSvxFontItem);
436 12 : rNotesSet.Put(aSvxFontItemCJK);
437 12 : rNotesSet.Put(aSvxFontItemCTL);
438 12 : rNotesSet.Put( SvxPostureItem( ITALIC_NONE, EE_CHAR_ITALIC ) );
439 12 : rNotesSet.Put( SvxPostureItem( ITALIC_NONE, EE_CHAR_ITALIC_CJK ) );
440 12 : rNotesSet.Put( SvxPostureItem( ITALIC_NONE, EE_CHAR_ITALIC_CTL ) );
441 12 : rNotesSet.Put( SvxWeightItem( WEIGHT_NORMAL, EE_CHAR_WEIGHT ) );
442 12 : rNotesSet.Put( SvxWeightItem( WEIGHT_NORMAL, EE_CHAR_WEIGHT_CJK ) );
443 12 : rNotesSet.Put( SvxWeightItem( WEIGHT_NORMAL, EE_CHAR_WEIGHT_CTL ) );
444 12 : rNotesSet.Put( SvxFontHeightItem( 705, 100, EE_CHAR_FONTHEIGHT ) ); // 20 pt
445 12 : rNotesSet.Put( SvxFontHeightItem( 705, 100, EE_CHAR_FONTHEIGHT_CJK ) ); // 20 pt
446 12 : rNotesSet.Put( SvxFontHeightItem( SdDrawDocument::convertFontHeightToCTL( 705 ), 100, EE_CHAR_FONTHEIGHT_CTL ) ); // 20 pt
447 12 : rNotesSet.Put( SvxUnderlineItem(UNDERLINE_NONE, EE_CHAR_UNDERLINE ) );
448 12 : rNotesSet.Put( SvxOverlineItem(UNDERLINE_NONE, EE_CHAR_OVERLINE ) );
449 12 : rNotesSet.Put( SvxCrossedOutItem(STRIKEOUT_NONE, EE_CHAR_STRIKEOUT ) );
450 12 : rNotesSet.Put( SvxShadowedItem(sal_False, EE_CHAR_SHADOW ) );
451 12 : rNotesSet.Put( SvxContourItem(sal_False, EE_CHAR_OUTLINE ) );
452 12 : rNotesSet.Put( SvxEmphasisMarkItem(EMPHASISMARK_NONE, EE_CHAR_EMPHASISMARK ) );
453 12 : rNotesSet.Put( SvxCharReliefItem(RELIEF_NONE, EE_CHAR_RELIEF) );
454 12 : rNotesSet.Put( SvxColorItem( Color(COL_AUTO), EE_CHAR_COLOR ) );
455 12 : rNotesSet.Put( SvxLRSpaceItem( 0, 0, 600, -600, EE_PARA_LRSPACE ) );
456 : // #i16874# enable kerning by default but only for new documents
457 12 : rNotesSet.Put( SvxAutoKernItem( sal_True, EE_CHAR_PAIRKERNING ) );
458 :
459 : /* #i35937# */
460 :
461 : }
462 :
463 : /**************************************************************************
464 : * Hintergrundobjekte
465 : **************************************************************************/
466 13 : aName = String(SdResId(STR_LAYOUT_BACKGROUNDOBJECTS));
467 13 : aName.Insert(aPrefix, 0);
468 :
469 13 : if (!Find(aName, SD_STYLE_FAMILY_MASTERPAGE))
470 : {
471 12 : bCreated = sal_True;
472 :
473 12 : pSheet = &Make(aName, SD_STYLE_FAMILY_MASTERPAGE,nUsedMask);
474 12 : pSheet->SetHelpId( aHelpFile, HID_PSEUDOSHEET_BACKGROUNDOBJECTS );
475 12 : pSheet->SetParent(String());
476 12 : SfxItemSet& rBackgroundObjectsSet = pSheet->GetItemSet();
477 12 : rBackgroundObjectsSet.Put(SdrShadowItem(sal_False));
478 12 : rBackgroundObjectsSet.Put(SdrShadowColorItem(String(), Color(COL_GRAY)));
479 12 : rBackgroundObjectsSet.Put(SdrShadowXDistItem(200)); // 3 mm Schattendistanz
480 12 : rBackgroundObjectsSet.Put(SdrShadowYDistItem(200));
481 : // #i16874# enable kerning by default but only for new documents
482 12 : rBackgroundObjectsSet.Put( SvxAutoKernItem( sal_True, EE_CHAR_PAIRKERNING ) );
483 12 : rBackgroundObjectsSet.Put(SdrTextHorzAdjustItem(SDRTEXTHORZADJUST_BLOCK));
484 : }
485 :
486 : /**************************************************************************
487 : * Hintergrund
488 : **************************************************************************/
489 13 : aName = String(SdResId(STR_LAYOUT_BACKGROUND));
490 13 : aName.Insert(aPrefix, 0);
491 :
492 13 : if (!Find(aName, SD_STYLE_FAMILY_MASTERPAGE))
493 : {
494 12 : bCreated = sal_True;
495 :
496 12 : pSheet = &Make(aName, SD_STYLE_FAMILY_MASTERPAGE,nUsedMask);
497 12 : pSheet->SetHelpId( aHelpFile, HID_PSEUDOSHEET_BACKGROUND );
498 12 : pSheet->SetParent(String());
499 12 : SfxItemSet& rBackgroundSet = pSheet->GetItemSet();
500 12 : rBackgroundSet.Put(XLineStyleItem(XLINE_NONE));
501 12 : rBackgroundSet.Put(XFillStyleItem(XFILL_NONE));
502 : // #i16874# enable kerning by default but only for new documents
503 12 : rBackgroundSet.Put( SvxAutoKernItem( sal_True, EE_CHAR_PAIRKERNING ) );
504 : }
505 :
506 13 : DBG_ASSERT( !bCheck || !bCreated, "missing layout style sheets detected!" );
507 13 : }
508 :
509 : /*************************************************************************
510 : |*
511 : |* Graphik-StyleSheets aus dem Quellpool in diesen Pool kopieren
512 : |*
513 : |* (rSourcePool kann nicht const sein, weil SfxStyleSheetPoolBase::Find
514 : |* nicht const ist)
515 : |*
516 : \************************************************************************/
517 :
518 0 : void SdStyleSheetPool::CopyGraphicSheets(SdStyleSheetPool& rSourcePool)
519 : {
520 0 : CopySheets( rSourcePool, SD_STYLE_FAMILY_GRAPHICS );
521 0 : }
522 :
523 0 : void SdStyleSheetPool::CopyCellSheets(SdStyleSheetPool& rSourcePool)
524 : {
525 0 : CopySheets( rSourcePool, SD_STYLE_FAMILY_CELL );
526 0 : }
527 :
528 0 : void SdStyleSheetPool::CopyTableStyles(SdStyleSheetPool& rSourcePool)
529 : {
530 0 : Reference< XIndexAccess > xSource( rSourcePool.mxTableFamily, UNO_QUERY );
531 0 : Reference< XNameContainer > xTarget( mxTableFamily, UNO_QUERY );
532 0 : Reference< XSingleServiceFactory > xFactory( mxTableFamily, UNO_QUERY );
533 :
534 0 : if( xSource.is() && xFactory.is() && mxTableFamily.is() )
535 : {
536 0 : for( sal_Int32 nIndex = 0; nIndex < xSource->getCount(); nIndex++ ) try
537 : {
538 0 : Reference< XStyle > xSourceTableStyle( xSource->getByIndex( nIndex ), UNO_QUERY );
539 0 : if( xSourceTableStyle.is() )
540 : {
541 0 : Reference< XStyle > xNewTableStyle( xFactory->createInstance(), UNO_QUERY );
542 0 : if( xNewTableStyle.is() )
543 : {
544 0 : Reference< XNameAccess> xSourceNames( xSourceTableStyle, UNO_QUERY_THROW );
545 :
546 0 : Sequence< OUString > aStyleNames( xSourceNames->getElementNames() );
547 0 : OUString* pStyleNames( aStyleNames.getArray() );
548 :
549 0 : Reference< XNameReplace > xTargetNames( xNewTableStyle, UNO_QUERY );
550 :
551 0 : sal_Int32 nNames = aStyleNames.getLength();
552 0 : while( nNames-- )
553 : {
554 0 : const OUString aName( *pStyleNames++ );
555 0 : Reference< XStyle > xSourceStyle( xSourceNames->getByName( aName ), UNO_QUERY );
556 0 : Reference< XStyle > xTargetStyle;
557 0 : if( xSourceStyle.is() ) try
558 : {
559 0 : mxCellFamily->getByName( xSourceStyle->getName() ) >>= xTargetStyle;
560 : }
561 0 : catch( Exception& )
562 : {
563 : OSL_FAIL( "sd::SdStyleSheetPool::CopyTableStyles(), exception caught!" );
564 : }
565 :
566 0 : if( xTargetStyle.is() )
567 0 : xTargetNames->replaceByName( aName, Any( xTargetStyle ) );
568 0 : }
569 : }
570 :
571 0 : OUString sName( Reference< XNamed >( xSourceTableStyle, UNO_QUERY_THROW )->getName() );
572 0 : if( xTarget->hasByName( sName ) )
573 0 : xTarget->replaceByName( sName, Any( xNewTableStyle ) );
574 : else
575 0 : xTarget->insertByName( sName, Any( xNewTableStyle ) );
576 0 : }
577 : }
578 0 : catch( Exception& )
579 : {
580 : OSL_FAIL("sd::SdStyleSheetPool::CopyTableStyles(), exception caught!");
581 : }
582 0 : }
583 0 : }
584 :
585 0 : void SdStyleSheetPool::CopySheets(SdStyleSheetPool& rSourcePool, SfxStyleFamily eFamily )
586 : {
587 0 : String aHelpFile;
588 :
589 0 : sal_uInt32 nCount = rSourcePool.aStyles.size();
590 :
591 0 : std::vector< std::pair< rtl::Reference< SfxStyleSheetBase >, String > > aNewStyles;
592 :
593 0 : for (sal_uInt32 n = 0; n < nCount; n++)
594 : {
595 0 : rtl::Reference< SfxStyleSheetBase > xSheet( rSourcePool.aStyles[sal::static_int_cast<sal_uInt16>(n)] );
596 :
597 0 : if( xSheet->GetFamily() == eFamily )
598 : {
599 0 : String aName( xSheet->GetName() );
600 0 : if ( !Find( aName, eFamily ) )
601 : {
602 0 : rtl::Reference< SfxStyleSheetBase > xNewSheet( &Make( aName, eFamily ) );
603 :
604 0 : xNewSheet->SetMask( xSheet->GetMask() );
605 :
606 : // Also set parent relation for copied style sheets
607 0 : String aParent( xSheet->GetParent() );
608 0 : if( aParent.Len() )
609 0 : aNewStyles.push_back( std::pair< rtl::Reference< SfxStyleSheetBase >, String >( xNewSheet, aParent ) );
610 :
611 0 : xNewSheet->SetHelpId( aHelpFile, xSheet->GetHelpId( aHelpFile ) );
612 0 : xNewSheet->GetItemSet().Put( xSheet->GetItemSet() );
613 0 : }
614 : }
615 0 : }
616 :
617 : // set parents on newly added stylesheets
618 0 : std::vector< std::pair< rtl::Reference< SfxStyleSheetBase >, String > >::iterator aIter;
619 0 : for( aIter = aNewStyles.begin(); aIter != aNewStyles.end(); ++aIter )
620 : {
621 : DBG_ASSERT( rSourcePool.Find( (*aIter).second, eFamily ), "StyleSheet has invalid parent: Family mismatch" );
622 0 : (*aIter).first->SetParent( (*aIter).second );
623 0 : }
624 0 : }
625 :
626 :
627 : /*************************************************************************
628 : |*
629 : |* StyleSheets des genannten Praesentationslayouts aus dem Quellpool in diesen
630 : |* Pool kopieren. Kopiert werden nur solche StyleSheets, die in diesem Pool
631 : |* noch nicht vorhanden sind.
632 : |* pCreatedSheets wird - wenn ungleich NULL - mit Zeigern auf die erzeugten
633 : |* StyleSheets gefuellt.
634 : |*
635 : |* (rSourcePool kann nicht const sein, weil SfxStyleSheetPoolBase::Find
636 : |* nicht const ist)
637 : |*
638 : \************************************************************************/
639 :
640 0 : void SdStyleSheetPool::CopyLayoutSheets(const String& rLayoutName, SdStyleSheetPool& rSourcePool, SdStyleSheetVector& rCreatedSheets)
641 : {
642 0 : SfxStyleSheetBase* pSheet = NULL;
643 :
644 0 : String aOutlineTag(SdResId(STR_LAYOUT_OUTLINE));
645 :
646 0 : std::vector<String> aNameList;
647 0 : CreateLayoutSheetNames(rLayoutName,aNameList);
648 :
649 0 : String sEmpty;
650 0 : for (std::vector<String>::const_iterator it = aNameList.begin(); it != aNameList.end(); ++it)
651 : {
652 0 : pSheet = Find(*it, SD_STYLE_FAMILY_MASTERPAGE);
653 0 : if (!pSheet)
654 : {
655 0 : SfxStyleSheetBase* pSourceSheet = rSourcePool.Find(*it, SD_STYLE_FAMILY_MASTERPAGE);
656 : DBG_ASSERT(pSourceSheet, "CopyLayoutSheets: Quellvorlage nicht gefunden");
657 0 : if (pSourceSheet)
658 : {
659 : // falls einer mit Methusalem-Doks. ankommt
660 0 : SfxStyleSheetBase& rNewSheet = Make(*it, SD_STYLE_FAMILY_MASTERPAGE);
661 0 : rNewSheet.SetHelpId( sEmpty, pSourceSheet->GetHelpId( sEmpty ) );
662 0 : rNewSheet.GetItemSet().Put(pSourceSheet->GetItemSet());
663 0 : rCreatedSheets.push_back( SdStyleSheetRef( static_cast< SdStyleSheet* >( &rNewSheet ) ) );
664 : }
665 : }
666 : }
667 :
668 : // Sonderbehandlung fuer Gliederungsvorlagen: Parentbeziehungen aufbauen
669 0 : std::vector<SfxStyleSheetBase*> aOutlineSheets;
670 0 : CreateOutlineSheetList(rLayoutName,aOutlineSheets);
671 :
672 0 : if( !aOutlineSheets.empty() )
673 : {
674 0 : std::vector<SfxStyleSheetBase*>::iterator it = aOutlineSheets.begin();
675 0 : SfxStyleSheetBase* pParent = *it;
676 0 : ++it;
677 :
678 0 : while (it != aOutlineSheets.end())
679 : {
680 0 : pSheet = *it;
681 :
682 0 : if (!pSheet)
683 0 : break;
684 :
685 0 : if (pSheet->GetParent().Len() == 0)
686 0 : pSheet->SetParent(pParent->GetName());
687 :
688 0 : pParent = pSheet;
689 :
690 0 : ++it;
691 : }
692 0 : }
693 0 : }
694 :
695 : /*************************************************************************
696 : |*
697 : |* Liste mit den Namen der Praesentationsvorlagen eines Layouts erzeugen.
698 : |* Die Liste und die enthaltenen Strings gehoeren dem Caller!
699 : |*
700 : \************************************************************************/
701 :
702 0 : void SdStyleSheetPool::CreateLayoutSheetNames(const String& rLayoutName, std::vector<String> &aNameList) const
703 : {
704 0 : String aPrefix(rLayoutName);
705 0 : String aSep( RTL_CONSTASCII_USTRINGPARAM( SD_LT_SEPARATOR ));
706 0 : aPrefix.Insert(aSep);
707 :
708 0 : String aName(SdResId(STR_LAYOUT_OUTLINE));
709 0 : String aStr;
710 :
711 0 : for (sal_uInt16 nLevel = 1; nLevel < 10; nLevel++)
712 : {
713 0 : aStr = String( aPrefix );
714 0 : aStr.Append(aName);
715 0 : aStr.Append( sal_Unicode( ' ' ));
716 0 : aStr.Append( String::CreateFromInt32( sal_Int32( nLevel )));
717 0 : aNameList.push_back(aStr);
718 : }
719 :
720 0 : aStr = String(SdResId(STR_LAYOUT_TITLE));
721 0 : aStr.Insert(aPrefix, 0);
722 0 : aNameList.push_back(aStr);
723 :
724 0 : aStr = String(SdResId(STR_LAYOUT_SUBTITLE));
725 0 : aStr.Insert(aPrefix, 0);
726 0 : aNameList.push_back(aStr);
727 :
728 0 : aStr = String(SdResId(STR_LAYOUT_NOTES));
729 0 : aStr.Insert(aPrefix, 0);
730 0 : aNameList.push_back(aStr);
731 :
732 0 : aStr = String(SdResId(STR_LAYOUT_BACKGROUNDOBJECTS));
733 0 : aStr.Insert(aPrefix, 0);
734 0 : aNameList.push_back(aStr);
735 :
736 0 : aStr = String(SdResId(STR_LAYOUT_BACKGROUND));
737 0 : aStr.Insert(aPrefix, 0);
738 0 : aNameList.push_back(aStr);
739 0 : }
740 :
741 : /*************************************************************************
742 : |*
743 : |* Liste mit Zeigern auf Praesentationsvorlagen eines Layouts erzeugen.
744 : |* Die Liste gehoert dem Caller!
745 : |*
746 : \************************************************************************/
747 :
748 0 : void SdStyleSheetPool::CreateLayoutSheetList(const String& rLayoutName, SdStyleSheetVector& rLayoutSheets )
749 : {
750 0 : String aLayoutNameWithSep(rLayoutName);
751 0 : aLayoutNameWithSep.AppendAscii( RTL_CONSTASCII_STRINGPARAM( SD_LT_SEPARATOR ));
752 0 : sal_uInt16 nLen = aLayoutNameWithSep.Len();
753 :
754 0 : SfxStyleSheetIterator aIter(this, SD_STYLE_FAMILY_MASTERPAGE);
755 0 : SfxStyleSheetBase* pSheet = aIter.First();
756 :
757 0 : while (pSheet)
758 : {
759 0 : if (pSheet->GetName().Match(aLayoutNameWithSep) == nLen)
760 0 : rLayoutSheets.push_back( SdStyleSheetRef( static_cast< SdStyleSheet* >( pSheet ) ) );
761 0 : pSheet = aIter.Next();
762 0 : }
763 0 : }
764 :
765 : /*************************************************************************
766 : |*
767 : |* ggfs. PseudoStyleSheets erzeugen
768 : |*
769 : \************************************************************************/
770 :
771 13 : void SdStyleSheetPool::CreatePseudosIfNecessary()
772 : {
773 13 : String aName;
774 13 : String aHelpFile;
775 13 : SfxStyleSheetBase* pSheet = NULL;
776 13 : SfxStyleSheetBase* pParent = NULL;
777 :
778 13 : sal_uInt16 nUsedMask = SFXSTYLEBIT_USED;
779 :
780 13 : aName = String(SdResId(STR_PSEUDOSHEET_TITLE));
781 13 : if( (pSheet = Find(aName, SD_STYLE_FAMILY_PSEUDO)) == 0 )
782 : {
783 12 : pSheet = &Make(aName, SD_STYLE_FAMILY_PSEUDO, nUsedMask);
784 12 : pSheet->SetParent( String() );
785 12 : ((SfxStyleSheet*)pSheet)->StartListening(*this);
786 : }
787 13 : pSheet->SetHelpId( aHelpFile, HID_PSEUDOSHEET_TITLE );
788 :
789 13 : aName = String(SdResId(STR_PSEUDOSHEET_SUBTITLE));
790 13 : if( (pSheet = Find(aName, SD_STYLE_FAMILY_PSEUDO)) == 0 )
791 : {
792 12 : pSheet = &Make(aName, SD_STYLE_FAMILY_PSEUDO, nUsedMask);
793 12 : pSheet->SetParent(String());
794 12 : ((SfxStyleSheet*)pSheet)->StartListening(*this);
795 : }
796 13 : pSheet->SetHelpId( aHelpFile, HID_PSEUDOSHEET_SUBTITLE );
797 :
798 13 : aName = String(SdResId(STR_PSEUDOSHEET_BACKGROUNDOBJECTS));
799 13 : if( (pSheet = Find(aName, SD_STYLE_FAMILY_PSEUDO)) == 0 )
800 : {
801 12 : pSheet = &Make(aName, SD_STYLE_FAMILY_PSEUDO, nUsedMask);
802 12 : pSheet->SetParent( String() );
803 12 : ((SfxStyleSheet*)pSheet)->StartListening(*this);
804 : }
805 13 : pSheet->SetHelpId( aHelpFile, HID_PSEUDOSHEET_BACKGROUNDOBJECTS );
806 :
807 13 : aName = String(SdResId(STR_PSEUDOSHEET_BACKGROUND));
808 13 : if( (pSheet = Find(aName, SD_STYLE_FAMILY_PSEUDO)) == 0 )
809 : {
810 12 : pSheet = &Make(aName, SD_STYLE_FAMILY_PSEUDO, nUsedMask);
811 12 : pSheet->SetParent( String() );
812 12 : ((SfxStyleSheet*)pSheet)->StartListening(*this);
813 : }
814 13 : pSheet->SetHelpId( aHelpFile, HID_PSEUDOSHEET_BACKGROUND );
815 :
816 13 : aName = String(SdResId(STR_PSEUDOSHEET_NOTES));
817 13 : if( (pSheet = Find(aName, SD_STYLE_FAMILY_PSEUDO)) == 0 )
818 : {
819 12 : pSheet = &Make(aName, SD_STYLE_FAMILY_PSEUDO, nUsedMask);
820 12 : pSheet->SetParent( String() );
821 12 : ((SfxStyleSheet*)pSheet)->StartListening(*this);
822 : }
823 13 : pSheet->SetHelpId( aHelpFile, HID_PSEUDOSHEET_NOTES );
824 :
825 13 : pParent = NULL;
826 13 : SetSearchMask(SD_STYLE_FAMILY_PSEUDO);
827 13 : aName = String(SdResId(STR_PSEUDOSHEET_OUTLINE));
828 130 : for (sal_uInt16 nLevel = 1; nLevel < 10; nLevel++)
829 : {
830 117 : String aLevelName(aName);
831 117 : aLevelName.Append( sal_Unicode( ' ' ));
832 117 : aLevelName.Append( String::CreateFromInt32( sal_Int32( nLevel )));
833 :
834 117 : if( (pSheet = Find(aLevelName, SD_STYLE_FAMILY_PSEUDO)) == 0 )
835 : {
836 108 : pSheet = &Make(aLevelName, SD_STYLE_FAMILY_PSEUDO, nUsedMask);
837 :
838 108 : if (pSheet)
839 : {
840 108 : if (pParent)
841 96 : pSheet->SetParent(pParent->GetName());
842 108 : pParent = pSheet;
843 108 : ((SfxStyleSheet*)pSheet)->StartListening(*this);
844 : }
845 : }
846 117 : pSheet->SetHelpId( aHelpFile, HID_PSEUDOSHEET_OUTLINE + nLevel );
847 130 : }
848 13 : }
849 :
850 :
851 : /*************************************************************************
852 : |*
853 : |* Standard-Styles den richtigen Namen in der Programm-Sprache geben
854 : |*
855 : \************************************************************************/
856 :
857 0 : void SdStyleSheetPool::UpdateStdNames()
858 : {
859 0 : String aHelpFile;
860 0 : sal_uInt32 nCount = aStyles.size();
861 0 : std::vector<SfxStyleSheetBase*> aEraseList;
862 :
863 0 : for( sal_uInt32 n=0; n < nCount; n++ )
864 : {
865 0 : SfxStyleSheetBase* pStyle = aStyles[ n ].get();
866 :
867 0 : if( !pStyle->IsUserDefined() )
868 : {
869 0 : String aOldName = pStyle->GetName();
870 0 : sal_uLong nHelpId = pStyle->GetHelpId( aHelpFile );
871 0 : SfxStyleFamily eFam = pStyle->GetFamily();
872 :
873 0 : sal_Bool bHelpKnown = sal_True;
874 0 : String aNewName;
875 0 : sal_uInt16 nNameId = 0;
876 0 : switch( nHelpId )
877 : {
878 0 : case HID_STANDARD_STYLESHEET_NAME: nNameId = STR_STANDARD_STYLESHEET_NAME; break;
879 0 : case HID_POOLSHEET_OBJWITHARROW: nNameId = STR_POOLSHEET_OBJWITHARROW; break;
880 0 : case HID_POOLSHEET_OBJWITHSHADOW: nNameId = STR_POOLSHEET_OBJWITHSHADOW; break;
881 0 : case HID_POOLSHEET_OBJWITHOUTFILL: nNameId = STR_POOLSHEET_OBJWITHOUTFILL; break;
882 0 : case HID_POOLSHEET_TEXT: nNameId = STR_POOLSHEET_TEXT; break;
883 0 : case HID_POOLSHEET_TEXTBODY: nNameId = STR_POOLSHEET_TEXTBODY; break;
884 0 : case HID_POOLSHEET_TEXTBODY_JUSTIFY:nNameId = STR_POOLSHEET_TEXTBODY_JUSTIFY;break;
885 0 : case HID_POOLSHEET_TEXTBODY_INDENT: nNameId = STR_POOLSHEET_TEXTBODY_INDENT;break;
886 0 : case HID_POOLSHEET_TITLE: nNameId = STR_POOLSHEET_TITLE; break;
887 0 : case HID_POOLSHEET_TITLE1: nNameId = STR_POOLSHEET_TITLE1; break;
888 0 : case HID_POOLSHEET_TITLE2: nNameId = STR_POOLSHEET_TITLE2; break;
889 0 : case HID_POOLSHEET_HEADLINE: nNameId = STR_POOLSHEET_HEADLINE; break;
890 0 : case HID_POOLSHEET_HEADLINE1: nNameId = STR_POOLSHEET_HEADLINE1; break;
891 0 : case HID_POOLSHEET_HEADLINE2: nNameId = STR_POOLSHEET_HEADLINE2; break;
892 0 : case HID_POOLSHEET_MEASURE: nNameId = STR_POOLSHEET_MEASURE; break;
893 :
894 0 : case HID_PSEUDOSHEET_TITLE: nNameId = STR_PSEUDOSHEET_TITLE; break;
895 0 : case HID_PSEUDOSHEET_SUBTITLE: nNameId = STR_PSEUDOSHEET_SUBTITLE; break;
896 : case HID_PSEUDOSHEET_OUTLINE1:
897 : case HID_PSEUDOSHEET_OUTLINE2:
898 : case HID_PSEUDOSHEET_OUTLINE3:
899 : case HID_PSEUDOSHEET_OUTLINE4:
900 : case HID_PSEUDOSHEET_OUTLINE5:
901 : case HID_PSEUDOSHEET_OUTLINE6:
902 : case HID_PSEUDOSHEET_OUTLINE7:
903 : case HID_PSEUDOSHEET_OUTLINE8:
904 0 : case HID_PSEUDOSHEET_OUTLINE9: nNameId = STR_PSEUDOSHEET_OUTLINE; break;
905 0 : case HID_PSEUDOSHEET_BACKGROUNDOBJECTS: nNameId = STR_PSEUDOSHEET_BACKGROUNDOBJECTS; break;
906 0 : case HID_PSEUDOSHEET_BACKGROUND: nNameId = STR_PSEUDOSHEET_BACKGROUND; break;
907 0 : case HID_PSEUDOSHEET_NOTES: nNameId = STR_PSEUDOSHEET_NOTES; break;
908 :
909 0 : case HID_SD_CELL_STYLE_DEFAULT: nNameId = STR_STANDARD_STYLESHEET_NAME; break;
910 0 : case HID_SD_CELL_STYLE_BANDED: nNameId = STR_POOLSHEET_BANDED_CELL; break;
911 0 : case HID_SD_CELL_STYLE_HEADER: nNameId = STR_POOLSHEET_HEADER; break;
912 0 : case HID_SD_CELL_STYLE_TOTAL: nNameId = STR_POOLSHEET_TOTAL; break;
913 0 : case HID_SD_CELL_STYLE_FIRST_COLUMN: nNameId = STR_POOLSHEET_FIRST_COLUMN; break;
914 0 : case HID_SD_CELL_STYLE_LAST_COLUMN: nNameId = STR_POOLSHEET_LAST_COLUMN; break;
915 :
916 : default:
917 : // 0 oder falsche (alte) HelpId
918 0 : bHelpKnown = sal_False;
919 : }
920 0 : if( bHelpKnown )
921 : {
922 0 : if( nNameId )
923 : {
924 0 : aNewName = String( SdResId( nNameId ) );
925 0 : if( nNameId == STR_PSEUDOSHEET_OUTLINE )
926 : {
927 0 : aNewName.Append( sal_Unicode( ' ' ));
928 0 : aNewName.Append( String::CreateFromInt32( sal_Int32( nHelpId - HID_PSEUDOSHEET_OUTLINE )));
929 : }
930 : }
931 :
932 0 : if( aNewName.Len() && aNewName != aOldName )
933 : {
934 0 : SfxStyleSheetBase* pSheetFound = Find( aNewName, eFam );
935 :
936 0 : if ( !pSheetFound )
937 : {
938 : // Sheet existiert noch nicht: Altes Sheet wird umbenannt
939 0 : pStyle->SetName( aNewName ); // setzt auch Parents um
940 : }
941 : else
942 : {
943 : // Sheet existiert schon: Altes Sheet muss entfernt werden
944 0 : aEraseList.push_back( pStyle );
945 : }
946 : }
947 0 : }
948 : }
949 : }
950 :
951 : // Styles, welche nicht umbenannt werden konnten, muessen entfernt werden
952 0 : for ( size_t i = 0, n = aEraseList.size(); i < n; ++i )
953 0 : Remove( aEraseList[ i ] );
954 0 : }
955 : // --------------------------------------------------------------------
956 : // Neues SvxNumBulletItem fuer das jeweilige StyleSheet setzen
957 : // --------------------------------------------------------------------
958 :
959 56 : void SdStyleSheetPool::PutNumBulletItem( SfxStyleSheetBase* pSheet,
960 : Font& rBulletFont )
961 : {
962 56 : String aHelpFile;
963 56 : sal_uLong nHelpId = pSheet->GetHelpId( aHelpFile );
964 56 : SfxItemSet& rSet = pSheet->GetItemSet();
965 :
966 56 : switch ( nHelpId )
967 : {
968 : case HID_STANDARD_STYLESHEET_NAME :
969 : {
970 : // Standard-Vorlage
971 15 : SvxNumberFormat aNumberFormat(SVX_NUM_CHAR_SPECIAL);
972 15 : aNumberFormat.SetBulletFont(&rBulletFont);
973 15 : aNumberFormat.SetBulletChar( 0x25CF ); // StarBats: 0xF000 + 34
974 15 : aNumberFormat.SetBulletRelSize(45);
975 15 : aNumberFormat.SetBulletColor(Color(COL_AUTO));
976 15 : aNumberFormat.SetStart(1);
977 15 : aNumberFormat.SetNumAdjust(SVX_ADJUST_LEFT);
978 :
979 15 : SvxNumRule aNumRule( NUM_BULLET_REL_SIZE|NUM_BULLET_COLOR|NUM_CHAR_TEXT_DISTANCE, 10 , sal_False);
980 :
981 165 : for( sal_uInt16 i = 0; i < aNumRule.GetLevelCount(); i++ )
982 : {
983 150 : const short nLSpace = (i + 1) * 600;
984 150 : aNumberFormat.SetLSpace(nLSpace);
985 150 : aNumberFormat.SetAbsLSpace(nLSpace);
986 150 : aNumberFormat.SetFirstLineOffset(-600);
987 150 : aNumRule.SetLevel( i, aNumberFormat );
988 : }
989 :
990 15 : rSet.Put( SvxNumBulletItem( aNumRule, EE_PARA_NUMBULLET ) );
991 15 : ((SfxStyleSheet*)pSheet)->Broadcast(SfxSimpleHint( SFX_HINT_DATACHANGED ) );
992 : }
993 15 : break;
994 :
995 : case HID_PSEUDOSHEET_TITLE:
996 : /* title gets same bullet as subtitle and not that page symbol anymore */
997 : case HID_PSEUDOSHEET_SUBTITLE :
998 : {
999 : // Untertitel-Vorlage
1000 26 : SvxNumRule* pDefaultRule = ((SvxNumBulletItem*) rSet.GetPool()->GetSecondaryPool()->GetPoolDefaultItem(EE_PARA_NUMBULLET))->GetNumRule();
1001 : DBG_ASSERT( pDefaultRule, "Wo ist mein Default? [CL]" );
1002 :
1003 26 : if(pDefaultRule)
1004 : {
1005 26 : SvxNumRule aNumRule(pDefaultRule->GetFeatureFlags(), 10, sal_False);
1006 286 : for(sal_uInt16 i=0; i < aNumRule.GetLevelCount(); i++)
1007 : {
1008 260 : SvxNumberFormat aFrmt( pDefaultRule->GetLevel(i) );
1009 260 : aFrmt.SetNumberingType(SVX_NUM_CHAR_SPECIAL);
1010 : // #i93908# clear suffix for bullet lists
1011 260 : aFrmt.SetPrefix(::rtl::OUString());
1012 260 : aFrmt.SetSuffix(::rtl::OUString());
1013 260 : aFrmt.SetStart(1);
1014 260 : aFrmt.SetBulletRelSize(45);
1015 260 : aFrmt.SetBulletChar( 0x25CF ); // StarBats: 0xF000 + 34
1016 260 : aFrmt.SetBulletFont(&rBulletFont);
1017 260 : aNumRule.SetLevel(i, aFrmt);
1018 260 : }
1019 :
1020 26 : rSet.Put( SvxNumBulletItem( aNumRule, EE_PARA_NUMBULLET ) );
1021 26 : ((SfxStyleSheet*)pSheet)->Broadcast(SfxSimpleHint( SFX_HINT_DATACHANGED ) );
1022 : }
1023 : }
1024 26 : break;
1025 :
1026 : case HID_PSEUDOSHEET_OUTLINE + 1 :
1027 : {
1028 : // Gliederungs-Vorlage
1029 13 : SvxNumberFormat aNumberFormat(SVX_NUM_CHAR_SPECIAL);
1030 13 : aNumberFormat.SetBulletColor(Color(COL_AUTO));
1031 13 : aNumberFormat.SetStart(1);
1032 13 : aNumberFormat.SetNumAdjust(SVX_ADJUST_LEFT);
1033 :
1034 : SvxNumRule aNumRule( NUM_BULLET_REL_SIZE|NUM_BULLET_COLOR|NUM_CHAR_TEXT_DISTANCE|NUM_SYMBOL_ALIGNMENT,
1035 13 : 10, sal_False );
1036 143 : for( sal_uInt16 i = 0; i < aNumRule.GetLevelCount(); i++ )
1037 : {
1038 130 : aNumberFormat.SetBulletChar( 0x25CF ); // StarBats: 0xF000 + 34
1039 130 : aNumberFormat.SetBulletRelSize(45);
1040 130 : const short nLSpace = (i + 1) * 1200;
1041 130 : aNumberFormat.SetLSpace(nLSpace);
1042 130 : aNumberFormat.SetAbsLSpace(nLSpace);
1043 130 : short nFirstLineOffset = -600;
1044 :
1045 130 : sal_uLong nFontSize = 20;
1046 130 : switch(i)
1047 : {
1048 : case 0:
1049 : {
1050 13 : nFontSize = 32;
1051 13 : nFirstLineOffset = -900;
1052 : }
1053 13 : break;
1054 :
1055 : case 1:
1056 : {
1057 13 : aNumberFormat.SetBulletChar( 0x2013 ); // StarBats: 0xF000 + 150
1058 13 : aNumberFormat.SetBulletRelSize(75);
1059 13 : nFontSize = 32;
1060 13 : nFirstLineOffset = -900;
1061 : }
1062 13 : break;
1063 :
1064 : case 2:
1065 : {
1066 13 : nFontSize = 28;
1067 13 : nFirstLineOffset = -800;
1068 : }
1069 13 : break;
1070 :
1071 : case 3:
1072 : {
1073 13 : aNumberFormat.SetBulletChar( 0x2013 ); // StarBats: 0xF000 + 150
1074 13 : aNumberFormat.SetBulletRelSize(75);
1075 13 : nFontSize = 24;
1076 : }
1077 13 : break;
1078 : }
1079 :
1080 130 : aNumberFormat.SetFirstLineOffset(nFirstLineOffset);
1081 130 : nFontSize = (sal_uInt16)((nFontSize * 2540L) / 72); // Pt --> 1/100 mm
1082 130 : rBulletFont.SetSize(Size(0,846)); // 24 pt
1083 130 : aNumberFormat.SetBulletFont(&rBulletFont);
1084 130 : aNumRule.SetLevel( i, aNumberFormat );
1085 : }
1086 :
1087 13 : rSet.Put( SvxNumBulletItem( aNumRule, EE_PARA_NUMBULLET ) );
1088 13 : ((SfxStyleSheet*)pSheet)->Broadcast(SfxSimpleHint( SFX_HINT_DATACHANGED ) );
1089 : }
1090 13 : break;
1091 56 : }
1092 56 : }
1093 :
1094 : /*************************************************************************
1095 : |*
1096 : |* Standard Bullet-Font erzeugen (ohne Groesse)
1097 : |*
1098 : \************************************************************************/
1099 :
1100 70 : Font SdStyleSheetPool::GetBulletFont() const
1101 : {
1102 70 : Font aBulletFont( OUString( "StarSymbol" ), Size(0, 1000) );
1103 70 : aBulletFont.SetCharSet(RTL_TEXTENCODING_UNICODE);
1104 70 : aBulletFont.SetWeight(WEIGHT_NORMAL);
1105 70 : aBulletFont.SetUnderline(UNDERLINE_NONE);
1106 70 : aBulletFont.SetOverline(UNDERLINE_NONE);
1107 70 : aBulletFont.SetStrikeout(STRIKEOUT_NONE);
1108 70 : aBulletFont.SetItalic(ITALIC_NONE);
1109 70 : aBulletFont.SetOutline(sal_False);
1110 70 : aBulletFont.SetShadow(sal_False);
1111 70 : aBulletFont.SetColor(Color(COL_AUTO));
1112 70 : aBulletFont.SetTransparent(sal_True);
1113 :
1114 70 : return aBulletFont;
1115 : }
1116 :
1117 : // --------------------------------------------------------------------
1118 :
1119 17 : void SdStyleSheetPool::AddStyleFamily( const SdPage* pPage )
1120 : {
1121 17 : rtl::Reference< SfxStyleSheetPool > xPool( this );
1122 17 : maStyleFamilyMap[pPage] = new SdStyleFamily( xPool, pPage );
1123 17 : }
1124 :
1125 : // --------------------------------------------------------------------
1126 :
1127 10 : void SdStyleSheetPool::RemoveStyleFamily( const SdPage* pPage )
1128 : {
1129 10 : SdStyleFamilyMap::iterator iter( maStyleFamilyMap.find( pPage ) );
1130 10 : if( iter != maStyleFamilyMap.end() )
1131 : {
1132 10 : SdStyleFamilyRef xStyle( (*iter).second );
1133 10 : maStyleFamilyMap.erase( iter );
1134 :
1135 10 : if( xStyle.is() ) try
1136 : {
1137 10 : xStyle->dispose();
1138 : }
1139 0 : catch( Exception& )
1140 : {
1141 10 : }
1142 : }
1143 10 : }
1144 :
1145 : // --------------------------------------------------------------------
1146 :
1147 185 : void SdStyleSheetPool::throwIfDisposed() throw(::com::sun::star::uno::RuntimeException)
1148 : {
1149 185 : if( mpDoc == NULL )
1150 0 : throw DisposedException();
1151 185 : }
1152 :
1153 : // --------------------------------------------------------------------
1154 : // XServiceInfo
1155 : // --------------------------------------------------------------------
1156 :
1157 0 : OUString SAL_CALL SdStyleSheetPool::getImplementationName() throw(RuntimeException)
1158 : {
1159 0 : return OUString( "SdStyleSheetPool" );
1160 : }
1161 :
1162 : // --------------------------------------------------------------------
1163 :
1164 : static const sal_Char* gpServiceName = "com.sun.star.style.StyleFamilies";
1165 :
1166 0 : sal_Bool SAL_CALL SdStyleSheetPool::supportsService( const OUString& ServiceName ) throw(RuntimeException)
1167 : {
1168 0 : return ServiceName.equalsAscii( gpServiceName );
1169 : }
1170 :
1171 : // --------------------------------------------------------------------
1172 :
1173 0 : Sequence< OUString > SAL_CALL SdStyleSheetPool::getSupportedServiceNames() throw(RuntimeException)
1174 : {
1175 0 : OUString aStr( OUString::createFromAscii( gpServiceName ) );
1176 0 : return Sequence< OUString >( &aStr, 1 );
1177 : }
1178 :
1179 : // --------------------------------------------------------------------
1180 : // XNameAccess
1181 : // --------------------------------------------------------------------
1182 :
1183 147 : Any SAL_CALL SdStyleSheetPool::getByName( const OUString& aName ) throw(NoSuchElementException, WrappedTargetException, RuntimeException)
1184 : {
1185 147 : throwIfDisposed();
1186 :
1187 147 : if( mxGraphicFamily->getName() == aName )
1188 90 : return Any( Reference< XNameAccess >( static_cast< XNameAccess* >( mxGraphicFamily.get() ) ) );
1189 :
1190 57 : if( mxCellFamily->getName() == aName )
1191 3 : return Any( Reference< XNameAccess >( static_cast< XNameAccess* >( mxCellFamily.get() ) ) );
1192 :
1193 54 : if( msTableFamilyName == aName )
1194 16 : return Any( mxTableFamily );
1195 :
1196 38 : for( SdStyleFamilyMap::iterator iter( maStyleFamilyMap.begin() ); iter != maStyleFamilyMap.end(); ++iter )
1197 : {
1198 38 : if( (*iter).second->getName() == aName )
1199 38 : return Any( Reference< XNameAccess >( static_cast< XNameAccess* >( (*iter).second.get() ) ) );
1200 : }
1201 :
1202 0 : throw NoSuchElementException();
1203 : }
1204 :
1205 : // --------------------------------------------------------------------
1206 :
1207 0 : Sequence< OUString > SAL_CALL SdStyleSheetPool::getElementNames() throw(RuntimeException)
1208 : {
1209 0 : throwIfDisposed();
1210 :
1211 0 : Sequence< OUString > aNames( maStyleFamilyMap.size() + 3 );
1212 0 : OUString* pNames = aNames.getArray();
1213 :
1214 0 : *pNames++ = mxGraphicFamily->getName();
1215 0 : *pNames++ = mxCellFamily->getName();
1216 0 : *pNames++ = msTableFamilyName;
1217 :
1218 0 : for( SdStyleFamilyMap::iterator iter( maStyleFamilyMap.begin() ); iter != maStyleFamilyMap.end(); ++iter )
1219 : {
1220 0 : *pNames++ = (*iter).second->getName();
1221 : }
1222 :
1223 0 : return aNames;
1224 : }
1225 :
1226 : // --------------------------------------------------------------------
1227 :
1228 38 : sal_Bool SAL_CALL SdStyleSheetPool::hasByName( const OUString& aName ) throw(RuntimeException)
1229 : {
1230 38 : throwIfDisposed();
1231 :
1232 38 : if( mxGraphicFamily->getName() == aName )
1233 0 : return sal_True;
1234 :
1235 38 : if( mxCellFamily->getName() == aName )
1236 0 : return sal_True;
1237 :
1238 38 : if( msTableFamilyName == aName )
1239 0 : return sal_True;
1240 :
1241 58 : for( SdStyleFamilyMap::iterator iter( maStyleFamilyMap.begin() ); iter != maStyleFamilyMap.end(); ++iter )
1242 : {
1243 38 : if( (*iter).second->getName() == aName )
1244 18 : return sal_True;
1245 : }
1246 :
1247 20 : return sal_False;
1248 : }
1249 :
1250 : // --------------------------------------------------------------------
1251 : // XElementAccess
1252 : // --------------------------------------------------------------------
1253 :
1254 0 : Type SAL_CALL SdStyleSheetPool::getElementType() throw(RuntimeException)
1255 : {
1256 0 : throwIfDisposed();
1257 :
1258 0 : return XNameAccess::static_type();
1259 : }
1260 :
1261 : // --------------------------------------------------------------------
1262 :
1263 0 : sal_Bool SAL_CALL SdStyleSheetPool::hasElements() throw(RuntimeException)
1264 : {
1265 0 : return sal_True;
1266 : }
1267 :
1268 : // --------------------------------------------------------------------
1269 : // XIndexAccess
1270 : // --------------------------------------------------------------------
1271 :
1272 0 : sal_Int32 SAL_CALL SdStyleSheetPool::getCount() throw(RuntimeException)
1273 : {
1274 0 : throwIfDisposed();
1275 :
1276 0 : return maStyleFamilyMap.size() + 3;
1277 : }
1278 :
1279 : // --------------------------------------------------------------------
1280 :
1281 0 : Any SAL_CALL SdStyleSheetPool::getByIndex( sal_Int32 Index ) throw(IndexOutOfBoundsException, WrappedTargetException, RuntimeException)
1282 : {
1283 0 : switch( Index )
1284 : {
1285 : case 0:
1286 0 : return Any( Reference< XNameAccess >( static_cast< XNameAccess* >( mxGraphicFamily.get() ) ) );
1287 :
1288 : case 1:
1289 0 : return Any( Reference< XNameAccess >( static_cast< XNameAccess* >( mxCellFamily.get() ) ) );
1290 :
1291 : case 2:
1292 0 : return Any( mxTableFamily );
1293 :
1294 : default:
1295 : {
1296 0 : Index -= 3;
1297 0 : if( (Index < 0) || (Index >= sal::static_int_cast<sal_Int32>(maStyleFamilyMap.size())) )
1298 0 : throw IndexOutOfBoundsException();
1299 0 : SdStyleFamilyMap::iterator iter( maStyleFamilyMap.begin() );
1300 0 : while( Index-- )
1301 0 : ++iter;
1302 :
1303 0 : return Any( Reference< XNameAccess >( static_cast< XNameAccess* >( (*iter).second.get() ) ) );
1304 : }
1305 : }
1306 : }
1307 :
1308 : // --------------------------------------------------------------------
1309 : // XComponent
1310 : // --------------------------------------------------------------------
1311 :
1312 18 : void SAL_CALL SdStyleSheetPool::dispose() throw (RuntimeException)
1313 : {
1314 18 : if( mpDoc )
1315 : {
1316 18 : mxGraphicFamily->dispose();
1317 18 : mxGraphicFamily.clear();
1318 18 : mxCellFamily->dispose();
1319 18 : mxCellFamily.clear();
1320 :
1321 18 : Reference< XComponent > xComp( mxTableFamily, UNO_QUERY );
1322 18 : if( xComp.is() )
1323 18 : xComp->dispose();
1324 18 : mxTableFamily = 0;
1325 :
1326 18 : SdStyleFamilyMap aTempMap;
1327 18 : aTempMap.swap( maStyleFamilyMap );
1328 :
1329 23 : for( SdStyleFamilyMap::iterator iter( aTempMap.begin() ); iter != aTempMap.end(); ++iter ) try
1330 : {
1331 5 : (*iter).second->dispose();
1332 : }
1333 0 : catch( Exception& )
1334 : {
1335 : }
1336 :
1337 18 : mpDoc = 0;
1338 :
1339 18 : Clear();
1340 : }
1341 18 : }
1342 :
1343 : // --------------------------------------------------------------------
1344 :
1345 0 : void SAL_CALL SdStyleSheetPool::addEventListener( const Reference< XEventListener >& /*xListener*/ ) throw (RuntimeException)
1346 : {
1347 0 : }
1348 :
1349 : // --------------------------------------------------------------------
1350 :
1351 0 : void SAL_CALL SdStyleSheetPool::removeEventListener( const Reference< XEventListener >& /*aListener*/ ) throw (RuntimeException)
1352 : {
1353 0 : }
1354 :
1355 : // --------------------------------------------------------------------
1356 :
1357 0 : SdStyleSheetVector SdStyleSheetPool::CreateChildList( SdStyleSheet* pSheet )
1358 : {
1359 0 : SdStyleSheetVector aResult;
1360 :
1361 0 : sal_uInt16 nListenerCount = pSheet->GetListenerCount();
1362 0 : if (nListenerCount > 0)
1363 : {
1364 0 : for (sal_uInt16 n = 0; n < nListenerCount; n++)
1365 : {
1366 0 : SdStyleSheet* pChild = dynamic_cast< SdStyleSheet* >( pSheet->GetListener(n) );
1367 0 : if(pChild && pChild->GetParent() == pSheet->GetName())
1368 : {
1369 0 : aResult.push_back( SdStyleSheetRef( pChild ) );
1370 : }
1371 : }
1372 : }
1373 :
1374 0 : return aResult;
1375 : }
1376 :
1377 : // --------------------------------------------------------------------
1378 :
1379 1285 : void SAL_CALL SdStyleSheetPool::acquire (void) throw ()
1380 : {
1381 1285 : SdStyleSheetPoolBase::acquire();
1382 1285 : }
1383 :
1384 1121 : void SAL_CALL SdStyleSheetPool::release (void) throw ()
1385 : {
1386 1121 : SdStyleSheetPoolBase::release();
1387 1121 : }
1388 :
1389 : // --------------------------------------------------------------------
1390 :
1391 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|