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) + OUString::number( nAdd );
88  if ( Find( aNewName, eFam ) == nullptr )
89  return SfxStyleSheetPool::Make(aNewName, eFam, mask);
90  }
91  }
92 
93  // Core uses translated names for both naming and display.
94  // This for all three, loading standard builtin styles from styles.xml
95  // configuration, loading documents and updating from templates.
97 }
98 
100  SfxStyleFamily eFamily,
101  SfxStyleSearchBits nMaskP )
102 {
103  ScStyleSheet* pSheet = new ScStyleSheet( rName, *this, eFamily, nMaskP );
104  if ( eFamily == SfxStyleFamily::Para && ScResId(STR_STYLENAME_STANDARD) != rName )
105  pSheet->SetParent( ScResId(STR_STYLENAME_STANDARD) );
106 
107  return pSheet;
108 }
109 
111 {
112  OSL_ENSURE( rStyle.isScStyleSheet(), "Invalid StyleSheet-class! :-/" );
113  return new ScStyleSheet( static_cast<const ScStyleSheet&>(rStyle) );
114 }
115 
117 {
118  if ( pStyle )
119  {
120  OSL_ENSURE( SfxStyleSearchBits::UserDefined & pStyle->GetMask(),
121  "SfxStyleSearchBits::UserDefined not set!" );
122 
123  static_cast<ScDocumentPool&>(rPool).StyleDeleted(static_cast<ScStyleSheet*>(pStyle));
125  }
126 }
127 
129  const OUString& rName, SfxStyleFamily eFamily )
130 {
131  // this is the Dest-Pool
132 
133  SfxStyleSheetBase* pStyleSheet = pSrcPool->Find( rName, eFamily );
134  if (!pStyleSheet)
135  return;
136 
137  const SfxItemSet& rSourceSet = pStyleSheet->GetItemSet();
138  SfxStyleSheetBase* pDestSheet = Find( rName, eFamily );
139  if (!pDestSheet)
140  pDestSheet = &Make( rName, eFamily );
141  SfxItemSet& rDestSet = pDestSheet->GetItemSet();
142  rDestSet.PutExtended( rSourceSet, SfxItemState::DONTCARE, SfxItemState::DEFAULT );
143 
144  const SfxPoolItem* pItem;
145  if ( eFamily == SfxStyleFamily::Page )
146  {
147  // Set-Items
148 
149  if ( rSourceSet.GetItemState( ATTR_PAGE_HEADERSET, false, &pItem ) == SfxItemState::SET )
150  {
151  const SfxItemSet& rSrcSub = static_cast<const SvxSetItem*>(pItem)->GetItemSet();
152  SfxItemSet aDestSub( *rDestSet.GetPool(), rSrcSub.GetRanges() );
153  aDestSub.PutExtended( rSrcSub, SfxItemState::DONTCARE, SfxItemState::DEFAULT );
154  rDestSet.Put( SvxSetItem( ATTR_PAGE_HEADERSET, aDestSub ) );
155  }
156  if ( rSourceSet.GetItemState( ATTR_PAGE_FOOTERSET, false, &pItem ) == SfxItemState::SET )
157  {
158  const SfxItemSet& rSrcSub = static_cast<const SvxSetItem*>(pItem)->GetItemSet();
159  SfxItemSet aDestSub( *rDestSet.GetPool(), rSrcSub.GetRanges() );
160  aDestSub.PutExtended( rSrcSub, SfxItemState::DONTCARE, SfxItemState::DEFAULT );
161  rDestSet.Put( SvxSetItem( ATTR_PAGE_FOOTERSET, aDestSub ) );
162  }
163  }
164  else // cell styles
165  {
166  // number format exchange list has to be handled here, too
167 
168  if ( pDoc && pDoc->GetFormatExchangeList() &&
169  rSourceSet.GetItemState( ATTR_VALUE_FORMAT, false, &pItem ) == SfxItemState::SET )
170  {
171  sal_uLong nOldFormat = static_cast<const SfxUInt32Item*>(pItem)->GetValue();
172  SvNumberFormatterIndexTable::const_iterator it = pDoc->GetFormatExchangeList()->find(nOldFormat);
173  if (it != pDoc->GetFormatExchangeList()->end())
174  {
175  sal_uInt32 nNewFormat = it->second;
176  rDestSet.Put( SfxUInt32Item( ATTR_VALUE_FORMAT, nNewFormat ) );
177  }
178  }
179  }
180 }
181 
182 // Standard templates
183 
184 #define SCSTR(id) ScResId(id)
185 
187 {
188  // Copy Default styles
189 
190  CopyStyleFrom( pSrcPool, SCSTR(STR_STYLENAME_STANDARD), SfxStyleFamily::Para );
191  CopyStyleFrom( pSrcPool, SCSTR(STR_STYLENAME_STANDARD), SfxStyleFamily::Page );
192  CopyStyleFrom( pSrcPool, SCSTR(STR_STYLENAME_REPORT), SfxStyleFamily::Page );
193 }
194 
195 static void lcl_CheckFont( SfxItemSet& rSet, LanguageType eLang, DefaultFontType nFontType, sal_uInt16 nItemId )
196 {
197  if ( eLang != LANGUAGE_NONE && eLang != LANGUAGE_DONTKNOW && eLang != LANGUAGE_SYSTEM )
198  {
199  vcl::Font aDefFont = OutputDevice::GetDefaultFont( nFontType, eLang, GetDefaultFontFlags::OnlyOne );
200  SvxFontItem aNewItem( aDefFont.GetFamilyType(), aDefFont.GetFamilyName(), aDefFont.GetStyleName(),
201  aDefFont.GetPitch(), aDefFont.GetCharSet(), nItemId );
202  if ( aNewItem != rSet.Get( nItemId ) )
203  {
204  // put item into style's ItemSet only if different from (static) default
205  rSet.Put( aNewItem );
206  }
207  }
208 }
209 
211 {
212  // Add new entries even for CopyStdStylesFrom
213 
214  Color aColBlack ( COL_BLACK );
215  OUString aStr;
216  sal_Int32 nStrLen;
217  const OUString aHelpFile;//which text???
218  SfxItemSet* pSet = nullptr;
219  SfxItemSet* pHFSet = nullptr;
220  SvxSetItem* pHFSetItem = nullptr;
221  std::unique_ptr<ScEditEngineDefaulter> pEdEngine(new ScEditEngineDefaulter( EditEngine::CreatePool(), true ));
222  pEdEngine->SetUpdateMode( false );
223  std::unique_ptr<EditTextObject> pEmptyTxtObj = pEdEngine->CreateTextObject();
224  std::unique_ptr<EditTextObject> pTxtObj;
225  std::unique_ptr<ScPageHFItem> pHeaderItem(new ScPageHFItem( ATTR_PAGE_HEADERRIGHT ));
226  std::unique_ptr<ScPageHFItem> pFooterItem(new ScPageHFItem( ATTR_PAGE_FOOTERRIGHT ));
227  ScStyleSheet* pSheet = nullptr;
228  ::editeng::SvxBorderLine aBorderLine ( &aColBlack, DEF_LINE_WIDTH_2 );
229  SvxBoxItem aBoxItem ( ATTR_BORDER );
230  SvxBoxInfoItem aBoxInfoItem ( ATTR_BORDER_INNER );
231 
232  OUString aStrStandard = ScResId(STR_STYLENAME_STANDARD);
233 
234  // Cell format templates:
235 
236  // 1. Standard
237 
238  pSheet = static_cast<ScStyleSheet*>( &Make( aStrStandard, SfxStyleFamily::Para, SfxStyleSearchBits::ScStandard ) );
239  pSheet->SetHelpId( aHelpFile, HID_SC_SHEET_CELL_STD );
240 
241  // if default fonts for the document's languages are different from the pool default,
242  // put them into the default style
243  // (not as pool defaults, because pool defaults can't be changed by the user)
244  // the document languages must be set before creating the default styles!
245 
246  pSet = &pSheet->GetItemSet();
247  LanguageType eLatin, eCjk, eCtl;
248  pDoc->GetLanguage( eLatin, eCjk, eCtl );
249 
250  // If the UI language is Korean, the default Latin font has to
251  // be queried for Korean, too (the Latin language from the document can't be Korean).
252  // This is the same logic as in SwDocShell::InitNew.
254  if (MsLangId::isKorean(eUiLanguage))
255  eLatin = eUiLanguage;
256 
257  lcl_CheckFont( *pSet, eLatin, DefaultFontType::LATIN_SPREADSHEET, ATTR_FONT );
258  lcl_CheckFont( *pSet, eCjk, DefaultFontType::CJK_SPREADSHEET, ATTR_CJK_FONT );
259  lcl_CheckFont( *pSet, eCtl, DefaultFontType::CTL_SPREADSHEET, ATTR_CTL_FONT );
260 
261  // #i55300# default CTL font size for Thai has to be larger
262  // #i59408# The 15 point size causes problems with row heights, so no different
263  // size is used for Thai in Calc for now.
264 // if ( eCtl == LANGUAGE_THAI )
265 // pSet->Put( SvxFontHeightItem( 300, 100, ATTR_CTL_FONT_HEIGHT ) ); // 15 pt
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<sal_Int32> 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:184
const OUString & GetFamilyName() const
#define EMPTY_OUSTRING
Definition: global.hxx:216
constexpr TypedWhichId< SvxBoxItem > ATTR_BORDER(150)
virtual bool SetParent(const OUString &rParentName) override
Definition: stlsheet.cxx:88
void CopyStdStylesFrom(ScStyleSheetPool *pSrcPool)
Definition: stlpool.cxx:186
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:195
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:116
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:89
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:58
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:128
void setAllParaStandard()
Definition: stlpool.cxx:427
SfxStyleSheetBase * Next()
void CreateStandardStyles()
Definition: stlpool.cxx:210
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:99
virtual SC_DLLPUBLIC SfxItemSet & GetItemSet() override
Definition: stlsheet.cxx:126
static SC_DLLPUBLIC const CharClass * getCharClassPtr()
Definition: global.cxx:1009
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:1948
virtual SfxStyleSheetBase * Find(const OUString &, SfxStyleFamily eFam, SfxStyleSearchBits n=SfxStyleSearchBits::All)
aStr
SvNumberFormatterIndexTable * GetFormatExchangeList() const
Definition: document.hxx:896
SfxItemPool & rPool
SfxStyleSearchBits
rtl_TextEncoding GetCharSet() const
void SetDist(bool bNew)
void SetLine(const editeng::SvxBorderLine *pNew, SvxBoxItemLine nLine)
virtual bool isScStyleSheet() const