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