LibreOffice Module sc (master)  1
stlpool.cxx
Go to the documentation of this file.
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 #include <memory>
21 #include <scitems.hxx>
22 #include <editeng/eeitem.hxx>
23 #include <i18nlangtag/mslangid.hxx>
24 #include <editeng/borderline.hxx>
25 #include <editeng/boxitem.hxx>
26 #include <editeng/brushitem.hxx>
27 #include <editeng/editdata.hxx>
28 #include <editeng/editeng.hxx>
29 #include <editeng/editobj.hxx>
30 #include <editeng/flditem.hxx>
31 #include <editeng/fontitem.hxx>
32 #include <svx/pageitem.hxx>
33 #include <svl/itemset.hxx>
34 #include <svl/zforlist.hxx>
36 #include <unotools/charclass.hxx>
37 #include <vcl/outdev.hxx>
38 #include <vcl/svapp.hxx>
39 #include <vcl/settings.hxx>
40 #include <osl/diagnose.h>
41 
42 #include <sc.hrc>
43 #include <attrib.hxx>
44 #include <global.hxx>
45 #include <globstr.hrc>
46 #include <scresid.hxx>
47 #include <document.hxx>
48 #include <docpool.hxx>
49 #include <stlpool.hxx>
50 #include <stlsheet.hxx>
51 #include <editutil.hxx>
52 
54  ScDocument* pDocument )
55  : SfxStyleSheetPool( rPoolP ),
56  pActualStyleSheet( nullptr ),
57  pDoc( pDocument ),
58  bHasStandardStyles( false )
59 {
60 }
61 
63 {
64 }
65 
67 {
68  pDoc = pDocument;
69 }
70 
71 SfxStyleSheetBase& ScStyleSheetPool::Make( const OUString& rName,
73 {
74  // When updating styles from a template, Office 5.1 sometimes created
75  // files with multiple default styles.
76  // Create new styles in that case:
77 
78  //TODO: only when loading?
79 
80  if ( rName == STRING_STANDARD && Find( rName, eFam ) != nullptr )
81  {
82  OSL_FAIL("renaming additional default style");
84  for ( sal_uInt32 nAdd = 1; nAdd <= nCount; nAdd++ )
85  {
86  OUString aNewName = ScResId(STR_STYLENAME_STANDARD_CELL) + OUString::number( nAdd );
87  if ( Find( aNewName, eFam ) == nullptr )
88  return SfxStyleSheetPool::Make(aNewName, eFam, mask);
89  aNewName = ScResId(STR_STYLENAME_STANDARD_PAGE) + OUString::number( nAdd );
90  if ( Find( aNewName, eFam ) == nullptr )
91  return SfxStyleSheetPool::Make(aNewName, eFam, mask);
92  }
93  }
94  return SfxStyleSheetPool::Make(rName, eFam, mask);
95 }
96 
98  SfxStyleFamily eFamily,
99  SfxStyleSearchBits nMaskP )
100 {
101  ScStyleSheet* pSheet = new ScStyleSheet( rName, *this, eFamily, nMaskP );
102  if ( eFamily == SfxStyleFamily::Para && ScResId(STR_STYLENAME_STANDARD_CELL) != rName )
103  pSheet->SetParent( ScResId(STR_STYLENAME_STANDARD_CELL) );
104 
105  return pSheet;
106 }
107 
109 {
110  OSL_ENSURE( rStyle.isScStyleSheet(), "Invalid StyleSheet-class! :-/" );
111  return new ScStyleSheet( static_cast<const ScStyleSheet&>(rStyle) );
112 }
113 
115 {
116  if ( pStyle )
117  {
118  OSL_ENSURE( SfxStyleSearchBits::UserDefined & pStyle->GetMask(),
119  "SfxStyleSearchBits::UserDefined not set!" );
120 
121  static_cast<ScDocumentPool&>(rPool).StyleDeleted(static_cast<ScStyleSheet*>(pStyle));
123  }
124 }
125 
127  const OUString& rName, SfxStyleFamily eFamily )
128 {
129  // this is the Dest-Pool
130 
131  SfxStyleSheetBase* pStyleSheet = pSrcPool->Find( rName, eFamily );
132  if (!pStyleSheet)
133  return;
134 
135  const SfxItemSet& rSourceSet = pStyleSheet->GetItemSet();
136  SfxStyleSheetBase* pDestSheet = Find( rName, eFamily );
137  if (!pDestSheet)
138  pDestSheet = &Make( rName, eFamily );
139  SfxItemSet& rDestSet = pDestSheet->GetItemSet();
140  rDestSet.PutExtended( rSourceSet, SfxItemState::DONTCARE, SfxItemState::DEFAULT );
141 
142  const SfxPoolItem* pItem;
143  if ( eFamily == SfxStyleFamily::Page )
144  {
145  // Set-Items
146 
147  if ( rSourceSet.GetItemState( ATTR_PAGE_HEADERSET, false, &pItem ) == SfxItemState::SET )
148  {
149  const SfxItemSet& rSrcSub = static_cast<const SvxSetItem*>(pItem)->GetItemSet();
150  SfxItemSet aDestSub( *rDestSet.GetPool(), rSrcSub.GetRanges() );
151  aDestSub.PutExtended( rSrcSub, SfxItemState::DONTCARE, SfxItemState::DEFAULT );
152  rDestSet.Put( SvxSetItem( ATTR_PAGE_HEADERSET, aDestSub ) );
153  }
154  if ( rSourceSet.GetItemState( ATTR_PAGE_FOOTERSET, false, &pItem ) == SfxItemState::SET )
155  {
156  const SfxItemSet& rSrcSub = static_cast<const SvxSetItem*>(pItem)->GetItemSet();
157  SfxItemSet aDestSub( *rDestSet.GetPool(), rSrcSub.GetRanges() );
158  aDestSub.PutExtended( rSrcSub, SfxItemState::DONTCARE, SfxItemState::DEFAULT );
159  rDestSet.Put( SvxSetItem( ATTR_PAGE_FOOTERSET, aDestSub ) );
160  }
161  }
162  else // cell styles
163  {
164  // number format exchange list has to be handled here, too
165 
166  if ( pDoc && pDoc->GetFormatExchangeList() &&
167  rSourceSet.GetItemState( ATTR_VALUE_FORMAT, false, &pItem ) == SfxItemState::SET )
168  {
169  sal_uLong nOldFormat = static_cast<const SfxUInt32Item*>(pItem)->GetValue();
170  SvNumberFormatterIndexTable::const_iterator it = pDoc->GetFormatExchangeList()->find(nOldFormat);
171  if (it != pDoc->GetFormatExchangeList()->end())
172  {
173  sal_uInt32 nNewFormat = it->second;
174  rDestSet.Put( SfxUInt32Item( ATTR_VALUE_FORMAT, nNewFormat ) );
175  }
176  }
177  }
178 }
179 
180 // Standard templates
181 
182 #define SCSTR(id) ScResId(id)
183 
185 {
186  // Copy Default styles
187 
188  CopyStyleFrom( pSrcPool, SCSTR(STR_STYLENAME_STANDARD_CELL), SfxStyleFamily::Para );
189  CopyStyleFrom( pSrcPool, SCSTR(STR_STYLENAME_STANDARD_PAGE), SfxStyleFamily::Page );
190  CopyStyleFrom( pSrcPool, SCSTR(STR_STYLENAME_REPORT), SfxStyleFamily::Page );
191 }
192 
193 static void lcl_CheckFont( SfxItemSet& rSet, LanguageType eLang, DefaultFontType nFontType, sal_uInt16 nItemId )
194 {
195  if ( eLang != LANGUAGE_NONE && eLang != LANGUAGE_DONTKNOW && eLang != LANGUAGE_SYSTEM )
196  {
197  vcl::Font aDefFont = OutputDevice::GetDefaultFont( nFontType, eLang, GetDefaultFontFlags::OnlyOne );
198  SvxFontItem aNewItem( aDefFont.GetFamilyType(), aDefFont.GetFamilyName(), aDefFont.GetStyleName(),
199  aDefFont.GetPitch(), aDefFont.GetCharSet(), nItemId );
200  if ( aNewItem != rSet.Get( nItemId ) )
201  {
202  // put item into style's ItemSet only if different from (static) default
203  rSet.Put( aNewItem );
204  }
205  }
206 }
207 
209 {
210  // Add new entries even for CopyStdStylesFrom
211 
212  Color aColBlack ( COL_BLACK );
213  OUString aStr;
214  sal_Int32 nStrLen;
215  OUString aHelpFile;//which text???
216  SfxItemSet* pSet = nullptr;
217  SfxItemSet* pHFSet = nullptr;
218  SvxSetItem* pHFSetItem = nullptr;
219  std::unique_ptr<ScEditEngineDefaulter> pEdEngine(new ScEditEngineDefaulter( EditEngine::CreatePool(), true ));
220  pEdEngine->SetUpdateMode( false );
221  std::unique_ptr<EditTextObject> pEmptyTxtObj = pEdEngine->CreateTextObject();
222  std::unique_ptr<EditTextObject> pTxtObj;
223  std::unique_ptr<ScPageHFItem> pHeaderItem(new ScPageHFItem( ATTR_PAGE_HEADERRIGHT ));
224  std::unique_ptr<ScPageHFItem> pFooterItem(new ScPageHFItem( ATTR_PAGE_FOOTERRIGHT ));
225  ScStyleSheet* pSheet = nullptr;
226  ::editeng::SvxBorderLine aBorderLine ( &aColBlack, DEF_LINE_WIDTH_2 );
227  SvxBoxItem aBoxItem ( ATTR_BORDER );
228  SvxBoxInfoItem aBoxInfoItem ( ATTR_BORDER_INNER );
229 
230  OUString aStrStandard = ScResId(STR_STYLENAME_STANDARD_CELL);
231 
232  // Cell format templates:
233 
234  // 1. Standard
235 
236  pSheet = static_cast<ScStyleSheet*>( &Make( aStrStandard, SfxStyleFamily::Para, SfxStyleSearchBits::ScStandard ) );
237  pSheet->SetHelpId( aHelpFile, HID_SC_SHEET_CELL_STD );
238 
239  // if default fonts for the document's languages are different from the pool default,
240  // put them into the default style
241  // (not as pool defaults, because pool defaults can't be changed by the user)
242  // the document languages must be set before creating the default styles!
243 
244  pSet = &pSheet->GetItemSet();
245  LanguageType eLatin, eCjk, eCtl;
246  pDoc->GetLanguage( eLatin, eCjk, eCtl );
247 
248  // If the UI language is Korean, the default Latin font has to
249  // be queried for Korean, too (the Latin language from the document can't be Korean).
250  // This is the same logic as in SwDocShell::InitNew.
252  if (MsLangId::isKorean(eUiLanguage))
253  eLatin = eUiLanguage;
254 
255  lcl_CheckFont( *pSet, eLatin, DefaultFontType::LATIN_SPREADSHEET, ATTR_FONT );
256  lcl_CheckFont( *pSet, eCjk, DefaultFontType::CJK_SPREADSHEET, ATTR_CJK_FONT );
257  lcl_CheckFont( *pSet, eCtl, DefaultFontType::CTL_SPREADSHEET, ATTR_CTL_FONT );
258 
259  // #i55300# default CTL font size for Thai has to be larger
260  // #i59408# The 15 point size causes problems with row heights, so no different
261  // size is used for Thai in Calc for now.
262 // if ( eCtl == LANGUAGE_THAI )
263 // pSet->Put( SvxFontHeightItem( 300, 100, ATTR_CTL_FONT_HEIGHT ) ); // 15 pt
264 
265  aStrStandard = ScResId(STR_STYLENAME_STANDARD_PAGE);
266 
267  // Page format template:
268 
269  // 1. Standard
270 
271  pSheet = static_cast<ScStyleSheet*>( &Make( aStrStandard,
272  SfxStyleFamily::Page,
273  SfxStyleSearchBits::ScStandard ) );
274 
275  pSet = &pSheet->GetItemSet();
276  pSheet->SetHelpId( aHelpFile, HID_SC_SHEET_PAGE_STD );
277 
278  // distance to header/footer for the sheet
279  pHFSetItem = new SvxSetItem( pSet->Get( ATTR_PAGE_HEADERSET ) );
280  pHFSetItem->SetWhich(ATTR_PAGE_HEADERSET);
281  pSet->Put( *pHFSetItem );
282  pHFSetItem->SetWhich(ATTR_PAGE_FOOTERSET);
283  pSet->Put( *pHFSetItem );
284  delete pHFSetItem;
285 
286  // Header:
287  // [empty][\sheet\][empty]
288 
289  pEdEngine->SetTextCurrentDefaults(EMPTY_OUSTRING);
290  pEdEngine->QuickInsertField( SvxFieldItem(SvxTableField(), EE_FEATURE_FIELD), ESelection() );
291  pTxtObj = pEdEngine->CreateTextObject();
292  pHeaderItem->SetLeftArea ( *pEmptyTxtObj );
293  pHeaderItem->SetCenterArea( *pTxtObj );
294  pHeaderItem->SetRightArea ( *pEmptyTxtObj );
295  pSet->Put( *pHeaderItem );
296 
297  // Footer:
298  // [empty][Page \STR_PAGE\][empty]
299 
300  aStr = SCSTR( STR_PAGE ) + " ";
301  pEdEngine->SetTextCurrentDefaults( aStr );
302  nStrLen = aStr.getLength();
303  pEdEngine->QuickInsertField( SvxFieldItem(SvxPageField(), EE_FEATURE_FIELD), ESelection(0,nStrLen,0,nStrLen) );
304  pTxtObj = pEdEngine->CreateTextObject();
305  pFooterItem->SetLeftArea ( *pEmptyTxtObj );
306  pFooterItem->SetCenterArea( *pTxtObj );
307  pFooterItem->SetRightArea ( *pEmptyTxtObj );
308  pSet->Put( *pFooterItem );
309 
310  // 2. Report
311 
312  pSheet = static_cast<ScStyleSheet*>( &Make( SCSTR( STR_STYLENAME_REPORT ),
313  SfxStyleFamily::Page,
314  SfxStyleSearchBits::ScStandard ) );
315  pSet = &pSheet->GetItemSet();
316  pSheet->SetHelpId( aHelpFile, HID_SC_SHEET_PAGE_REP );
317 
318  // Background and border
319  aBoxItem.SetLine( &aBorderLine, SvxBoxItemLine::TOP );
320  aBoxItem.SetLine( &aBorderLine, SvxBoxItemLine::BOTTOM );
321  aBoxItem.SetLine( &aBorderLine, SvxBoxItemLine::LEFT );
322  aBoxItem.SetLine( &aBorderLine, SvxBoxItemLine::RIGHT );
323  aBoxItem.SetAllDistances( 10 ); // 0.2mm
324  aBoxInfoItem.SetValid( SvxBoxInfoItemValidFlags::TOP );
325  aBoxInfoItem.SetValid( SvxBoxInfoItemValidFlags::BOTTOM );
326  aBoxInfoItem.SetValid( SvxBoxInfoItemValidFlags::LEFT );
327  aBoxInfoItem.SetValid( SvxBoxInfoItemValidFlags::RIGHT );
328  aBoxInfoItem.SetValid( SvxBoxInfoItemValidFlags::DISTANCE );
329  aBoxInfoItem.SetTable( false );
330  aBoxInfoItem.SetDist ( true );
331 
332  pHFSetItem = new SvxSetItem( pSet->Get( ATTR_PAGE_HEADERSET ) );
333  pHFSet = &(pHFSetItem->GetItemSet());
334 
335  pHFSet->Put( SvxBrushItem( COL_LIGHTGRAY, ATTR_BACKGROUND ) );
336  pHFSet->Put( aBoxItem );
337  pHFSet->Put( aBoxInfoItem );
338  pHFSetItem->SetWhich(ATTR_PAGE_HEADERSET);
339  pSet->Put( *pHFSetItem );
340  pHFSetItem->SetWhich(ATTR_PAGE_FOOTERSET);
341  pSet->Put( *pHFSetItem );
342  delete pHFSetItem;
343 
344  // Footer:
345  // [\TABLE\ (\DATA\)][empty][\DATE\, \TIME\]
346 
347  aStr = " ()";
348  pEdEngine->SetTextCurrentDefaults( aStr );
349  pEdEngine->QuickInsertField( SvxFieldItem(SvxFileField(), EE_FEATURE_FIELD), ESelection(0,2,0,2) );
350  pEdEngine->QuickInsertField( SvxFieldItem(SvxTableField(), EE_FEATURE_FIELD), ESelection() );
351  pTxtObj = pEdEngine->CreateTextObject();
352  pHeaderItem->SetLeftArea( *pTxtObj );
353  pHeaderItem->SetCenterArea( *pEmptyTxtObj );
354  aStr = ", ";
355  pEdEngine->SetTextCurrentDefaults( aStr );
356  pEdEngine->QuickInsertField( SvxFieldItem(SvxTimeField(), EE_FEATURE_FIELD), ESelection(0,2,0,2) );
357  pEdEngine->QuickInsertField( SvxFieldItem(SvxDateField(Date( Date::SYSTEM ),SvxDateType::Var), EE_FEATURE_FIELD),
358  ESelection() );
359  pTxtObj = pEdEngine->CreateTextObject();
360  pHeaderItem->SetRightArea( *pTxtObj );
361  pSet->Put( *pHeaderItem );
362 
363  // Footer:
364  // [empty][Page: \PAGE\ / \PAGE\][empty]
365 
366  aStr = SCSTR( STR_PAGE ) + " ";
367  nStrLen = aStr.getLength();
368  aStr += " / ";
369  sal_Int32 nStrLen2 = aStr.getLength();
370  pEdEngine->SetTextCurrentDefaults( aStr );
371  pEdEngine->QuickInsertField( SvxFieldItem(SvxPagesField(), EE_FEATURE_FIELD), ESelection(0,nStrLen2,0,nStrLen2) );
372  pEdEngine->QuickInsertField( SvxFieldItem(SvxPageField(), EE_FEATURE_FIELD), ESelection(0,nStrLen,0,nStrLen) );
373  pTxtObj = pEdEngine->CreateTextObject();
374  pFooterItem->SetLeftArea ( *pEmptyTxtObj );
375  pFooterItem->SetCenterArea( *pTxtObj );
376  pFooterItem->SetRightArea ( *pEmptyTxtObj );
377  pSet->Put( *pFooterItem );
378 
379  bHasStandardStyles = true;
380 }
381 
382 namespace {
383 
384 struct CaseInsensitiveNamePredicate : svl::StyleSheetPredicate
385 {
386  CaseInsensitiveNamePredicate(const OUString& rName, SfxStyleFamily eFam)
387  : mUppercaseName(ScGlobal::getCharClassPtr()->uppercase(rName)), mFamily(eFam)
388  {
389  }
390 
391  bool
392  Check(const SfxStyleSheetBase& rStyleSheet) override
393  {
394  if (rStyleSheet.GetFamily() == mFamily)
395  {
396  OUString aUpName = ScGlobal::getCharClassPtr()->uppercase(rStyleSheet.GetName());
397  if (mUppercaseName == aUpName)
398  {
399  return true;
400  }
401  }
402  return false;
403  }
404 
405  OUString mUppercaseName;
406  SfxStyleFamily mFamily;
407 };
408 
409 }
410 
411 // Functor object to find all style sheets of a family which match a given name caseinsensitively
413 {
414  CaseInsensitiveNamePredicate aPredicate(rName, eFam);
415  std::vector<unsigned> aFoundPositions = GetIndexedStyleSheets().FindPositionsByPredicate(aPredicate);
416 
417  for (const auto& rPos : aFoundPositions)
418  {
420  // we do not know what kind of sheets we have.
421  if (pFound->isScStyleSheet())
422  return static_cast<ScStyleSheet*>(pFound);
423  }
424  return nullptr;
425 }
426 
428 {
429  SfxStyleSheetBase* pSheet = First(SfxStyleFamily::Para);
430  while (pSheet)
431  {
432  pSheet->SetMask(SfxStyleSearchBits::ScStandard);
433  pSheet = Next();
434  }
435 }
436 
437 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
SfxStyleSheetBase * First(SfxStyleFamily eFamily, SfxStyleSearchBits eMask=SfxStyleSearchBits::All)
#define LANGUAGE_NONE
static vcl::Font GetDefaultFont(DefaultFontType nType, LanguageType eLang, GetDefaultFontFlags nFlags, const OutputDevice *pOutDev=nullptr)
#define SCSTR(id)
Definition: stlpool.cxx:182
constexpr::Color COL_BLACK(0x00, 0x00, 0x00)
const OUString & GetFamilyName() const
#define EMPTY_OUSTRING
Definition: global.hxx:214
constexpr TypedWhichId< SvxBoxItem > ATTR_BORDER(150)
virtual bool SetParent(const OUString &rParentName) override
Definition: stlsheet.cxx:88
void CopyStdStylesFrom(ScStyleSheetPool *pSrcPool)
Definition: stlpool.cxx:184
const LanguageTag & GetUILanguageTag() const
std::string GetValue
const OUString & GetStyleName() const
LanguageType getLanguageType(bool bResolveSystem=true) const
virtual void Remove(SfxStyleSheetBase *)
sal_uIntPtr sal_uLong
void SetTable(bool bNew)
static const AllSettings & GetSettings()
ScStyleSheet * FindCaseIns(const OUString &rName, SfxStyleFamily eFam)
Definition: stlpool.cxx:412
static void lcl_CheckFont(SfxItemSet &rSet, LanguageType eLang, DefaultFontType nFontType, sal_uInt16 nItemId)
Definition: stlpool.cxx:193
constexpr TypedWhichId< SvxBoxInfoItem > ATTR_BORDER_INNER(151)
constexpr TypedWhichId< SvxFontItem > ATTR_FONT(100)
virtual SfxItemSet & GetItemSet()
constexpr::Color COL_LIGHTGRAY(0xC0, 0xC0, 0xC0)
virtual void Remove(SfxStyleSheetBase *pStyle) override
Definition: stlpool.cxx:114
SfxStyleFamily GetFamily() const
SfxStyleSearchBits GetMask() const
void SetDocument(ScDocument *pDocument)
Definition: stlpool.cxx:66
FontFamily GetFamilyType()
virtual void SetHelpId(const OUString &r, sal_uLong nId)
virtual bool Check(const SfxStyleSheetBase &styleSheet)=0
void SetMask(SfxStyleSearchBits mask)
virtual ~ScStyleSheetPool() override
Definition: stlpool.cxx:62
SfxStyleSheetBase * GetStyleSheetByPositionInIndex(unsigned pos)
const OUString & GetName() const
ScDocument * pDoc
Definition: stlpool.hxx:72
int nCount
SfxStyleFamily
void SetAllDistances(sal_uInt16 nNew)
FontPitch GetPitch()
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
constexpr TypedWhichId< SvxSetItem > ATTR_PAGE_FOOTERSET(182)
#define LANGUAGE_SYSTEM
virtual SfxStyleSheetBase & Make(const OUString &, SfxStyleFamily eFam, SfxStyleSearchBits nMask=SfxStyleSearchBits::All)
std::vector< unsigned > FindPositionsByPredicate(StyleSheetPredicate &predicate) const
OUString uppercase(const OUString &rStr, sal_Int32 nPos, sal_Int32 nCount) const
const SfxItemSet * GetItemSet(const SfxPoolItem &rAttr)
OUString ScResId(const char *pId)
Definition: scdll.cxx:95
void PutExtended(const SfxItemSet &, SfxItemState eDontCareAs, SfxItemState eDefaultAs)
#define LANGUAGE_DONTKNOW
constexpr TypedWhichId< SfxUInt32Item > ATTR_VALUE_FORMAT(146)
unsigned GetNumberOfStyleSheets() const
constexpr TypedWhichId< ScPageHFItem > ATTR_PAGE_HEADERRIGHT(179)
constexpr TypedWhichId< SvxFontItem > ATTR_CTL_FONT(116)
ScStyleSheetPool(const SfxItemPool &rPool, ScDocument *pDocument)
Definition: stlpool.cxx:53
SfxItemPool * GetPool() const
constexpr TypedWhichId< ScPageHFItem > ATTR_PAGE_FOOTERRIGHT(180)
#define STRING_STANDARD
Definition: global.hxx:56
bool bHasStandardStyles
Definition: stlpool.hxx:73
static SfxItemPool * CreatePool()
constexpr TypedWhichId< SvxFontItem > ATTR_CJK_FONT(111)
constexpr TypedWhichId< SvxBrushItem > ATTR_BACKGROUND(148)
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
const svl::IndexedStyleSheets & GetIndexedStyleSheets() const
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
void CopyStyleFrom(ScStyleSheetPool *pSrcPool, const OUString &rName, SfxStyleFamily eFamily)
Definition: stlpool.cxx:126
void setAllParaStandard()
Definition: stlpool.cxx:427
SfxStyleSheetBase * Next()
void CreateStandardStyles()
Definition: stlpool.cxx:208
virtual SfxStyleSheetBase & Make(const OUString &, SfxStyleFamily eFam, SfxStyleSearchBits nMask=SfxStyleSearchBits::All) override
Definition: stlpool.cxx:71
virtual SfxStyleSheetBase * Create(const OUString &rName, SfxStyleFamily eFamily, SfxStyleSearchBits nMask) override
Definition: stlpool.cxx:97
virtual SC_DLLPUBLIC SfxItemSet & GetItemSet() override
Definition: stlsheet.cxx:126
static SC_DLLPUBLIC const CharClass * getCharClassPtr()
Definition: global.cxx:1016
static bool isKorean(LanguageType nLang)
DefaultFontType
#define DEF_LINE_WIDTH_2
const sal_uInt16 * GetRanges() const
void SetValid(SvxBoxInfoItemValidFlags nValid, bool bValid=true)
constexpr TypedWhichId< SvxSetItem > ATTR_PAGE_HEADERSET(181)
constexpr sal_uInt16 EE_FEATURE_FIELD(EE_FEATURE_NOTCONV+1)
SC_DLLPUBLIC void GetLanguage(LanguageType &rLatin, LanguageType &rCjk, LanguageType &rCtl) const
Definition: documen3.cxx:1930
virtual SfxStyleSheetBase * Find(const OUString &, SfxStyleFamily eFam, SfxStyleSearchBits n=SfxStyleSearchBits::All)
aStr
SvNumberFormatterIndexTable * GetFormatExchangeList() const
Definition: document.hxx:899
SfxItemPool & rPool
SfxStyleSearchBits
rtl_TextEncoding GetCharSet() const
void SetDist(bool bNew)
void SetLine(const editeng::SvxBorderLine *pNew, SvxBoxItemLine nLine)
virtual bool isScStyleSheet() const