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  rtl::Reference<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  if ( eFamily == SfxStyleFamily::Page )
145  {
146  // Set-Items
147 
148  if ( const SvxSetItem* pSetItem = rSourceSet.GetItemIfSet( ATTR_PAGE_HEADERSET, false ) )
149  {
150  const SfxItemSet& rSrcSub = pSetItem->GetItemSet();
151  SfxItemSet aDestSub( *rDestSet.GetPool(), rSrcSub.GetRanges() );
152  aDestSub.PutExtended( rSrcSub, SfxItemState::DONTCARE, SfxItemState::DEFAULT );
153  }
154  if ( const SvxSetItem* pSetItem = rSourceSet.GetItemIfSet( ATTR_PAGE_FOOTERSET, false ) )
155  {
156  const SfxItemSet& rSrcSub = pSetItem->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  const SfxUInt32Item* pItem;
167  if ( pDoc && pDoc->GetFormatExchangeList() &&
168  (pItem = rSourceSet.GetItemIfSet( ATTR_VALUE_FORMAT, false )) )
169  {
170  sal_uLong nOldFormat = pItem->GetValue();
171  SvNumberFormatterIndexTable::const_iterator it = pDoc->GetFormatExchangeList()->find(nOldFormat);
172  if (it != pDoc->GetFormatExchangeList()->end())
173  {
174  sal_uInt32 nNewFormat = it->second;
175  rDestSet.Put( SfxUInt32Item( ATTR_VALUE_FORMAT, nNewFormat ) );
176  }
177  }
178  }
179 }
180 
181 // Standard templates
182 
184 {
185  // Copy Default styles
186 
187  CopyStyleFrom( pSrcPool, ScResId(STR_STYLENAME_STANDARD), SfxStyleFamily::Para );
188  CopyStyleFrom( pSrcPool, ScResId(STR_STYLENAME_STANDARD), SfxStyleFamily::Page );
189  CopyStyleFrom( pSrcPool, ScResId(STR_STYLENAME_REPORT), SfxStyleFamily::Page );
190 }
191 
192 static void lcl_CheckFont( SfxItemSet& rSet, LanguageType eLang, DefaultFontType nFontType, sal_uInt16 nItemId )
193 {
194  if ( eLang != LANGUAGE_NONE && eLang != LANGUAGE_DONTKNOW && eLang != LANGUAGE_SYSTEM )
195  {
196  vcl::Font aDefFont = OutputDevice::GetDefaultFont( nFontType, eLang, GetDefaultFontFlags::OnlyOne );
197  SvxFontItem aNewItem( aDefFont.GetFamilyType(), aDefFont.GetFamilyName(), aDefFont.GetStyleName(),
198  aDefFont.GetPitch(), aDefFont.GetCharSet(), nItemId );
199  if ( aNewItem != rSet.Get( nItemId ) )
200  {
201  // put item into style's ItemSet only if different from (static) default
202  rSet.Put( aNewItem );
203  }
204  }
205 }
206 
208 {
209  // Add new entries even for CopyStdStylesFrom
210 
211  Color aColBlack ( COL_BLACK );
212  OUString aStr;
213  sal_Int32 nStrLen;
214  const OUString aHelpFile;//which text???
215  SfxItemSet* pSet = nullptr;
216  SfxItemSet* pHFSet = nullptr;
217  ScEditEngineDefaulter aEdEngine( EditEngine::CreatePool().get(), true );
218  aEdEngine.SetUpdateLayout( false );
219  std::unique_ptr<EditTextObject> pEmptyTxtObj = aEdEngine.CreateTextObject();
220  std::unique_ptr<EditTextObject> pTxtObj;
221  ScPageHFItem aHeaderItem( ATTR_PAGE_HEADERRIGHT );
222  ScPageHFItem aFooterItem( ATTR_PAGE_FOOTERRIGHT );
223  ScStyleSheet* pSheet = nullptr;
224  ::editeng::SvxBorderLine aBorderLine ( &aColBlack, SvxBorderLineWidth::Medium );
225  SvxBoxItem aBoxItem ( ATTR_BORDER );
226  SvxBoxInfoItem aBoxInfoItem ( ATTR_BORDER_INNER );
227 
228  OUString aStrStandard = ScResId(STR_STYLENAME_STANDARD);
229 
230  // Cell format templates:
231 
232  // 1. Standard
233 
234  pSheet = static_cast<ScStyleSheet*>( &Make( aStrStandard, SfxStyleFamily::Para, SfxStyleSearchBits::ScStandard ) );
235  pSheet->SetHelpId( aHelpFile, HID_SC_SHEET_CELL_STD );
236 
237  // if default fonts for the document's languages are different from the pool default,
238  // put them into the default style
239  // (not as pool defaults, because pool defaults can't be changed by the user)
240  // the document languages must be set before creating the default styles!
241 
242  pSet = &pSheet->GetItemSet();
243  LanguageType eLatin, eCjk, eCtl;
244  pDoc->GetLanguage( eLatin, eCjk, eCtl );
245 
246  // If the UI language is Korean, the default Latin font has to
247  // be queried for Korean, too (the Latin language from the document can't be Korean).
248  // This is the same logic as in SwDocShell::InitNew.
250  if (MsLangId::isKorean(eUiLanguage))
251  eLatin = eUiLanguage;
252 
253  lcl_CheckFont( *pSet, eLatin, DefaultFontType::LATIN_SPREADSHEET, ATTR_FONT );
254  lcl_CheckFont( *pSet, eCjk, DefaultFontType::CJK_SPREADSHEET, ATTR_CJK_FONT );
255  lcl_CheckFont( *pSet, eCtl, DefaultFontType::CTL_SPREADSHEET, ATTR_CTL_FONT );
256 
257  // #i55300# default CTL font size for Thai has to be larger
258  // #i59408# The 15 point size causes problems with row heights, so no different
259  // size is used for Thai in Calc for now.
260 // if ( eCtl == LANGUAGE_THAI )
261 // pSet->Put( SvxFontHeightItem( 300, 100, ATTR_CTL_FONT_HEIGHT ) ); // 15 pt
262 
263  // Page format template:
264 
265  // 1. Standard
266 
267  pSheet = static_cast<ScStyleSheet*>( &Make( aStrStandard,
268  SfxStyleFamily::Page,
269  SfxStyleSearchBits::ScStandard ) );
270 
271  pSet = &pSheet->GetItemSet();
272  pSheet->SetHelpId( aHelpFile, HID_SC_SHEET_PAGE_STD );
273 
274  // distance to header/footer for the sheet
275  SvxSetItem aHFSetItem = pSet->Get( ATTR_PAGE_HEADERSET );
276  aHFSetItem.SetWhich(ATTR_PAGE_HEADERSET);
277  pSet->Put( aHFSetItem );
278  aHFSetItem.SetWhich(ATTR_PAGE_FOOTERSET);
279  pSet->Put( aHFSetItem );
280 
281  // Header:
282  // [empty][\sheet\][empty]
283 
284  aEdEngine.SetTextCurrentDefaults(OUString());
286  pTxtObj = aEdEngine.CreateTextObject();
287  aHeaderItem.SetLeftArea ( *pEmptyTxtObj );
288  aHeaderItem.SetCenterArea( *pTxtObj );
289  aHeaderItem.SetRightArea ( *pEmptyTxtObj );
290  pSet->Put( aHeaderItem );
291 
292  // Footer:
293  // [empty][Page \STR_PAGE\][empty]
294 
295  aStr = ScResId( STR_PAGE ) + " ";
296  aEdEngine.SetTextCurrentDefaults( aStr );
297  nStrLen = aStr.getLength();
298  aEdEngine.QuickInsertField( SvxFieldItem(SvxPageField(), EE_FEATURE_FIELD), ESelection(0,nStrLen,0,nStrLen) );
299  pTxtObj = aEdEngine.CreateTextObject();
300  aFooterItem.SetLeftArea ( *pEmptyTxtObj );
301  aFooterItem.SetCenterArea( *pTxtObj );
302  aFooterItem.SetRightArea ( *pEmptyTxtObj );
303  pSet->Put( aFooterItem );
304 
305  // 2. Report
306 
307  pSheet = static_cast<ScStyleSheet*>( &Make( ScResId( STR_STYLENAME_REPORT ),
308  SfxStyleFamily::Page,
309  SfxStyleSearchBits::ScStandard ) );
310  pSet = &pSheet->GetItemSet();
311  pSheet->SetHelpId( aHelpFile, HID_SC_SHEET_PAGE_REP );
312 
313  // Background and border
314  aBoxItem.SetLine( &aBorderLine, SvxBoxItemLine::TOP );
315  aBoxItem.SetLine( &aBorderLine, SvxBoxItemLine::BOTTOM );
316  aBoxItem.SetLine( &aBorderLine, SvxBoxItemLine::LEFT );
317  aBoxItem.SetLine( &aBorderLine, SvxBoxItemLine::RIGHT );
318  aBoxItem.SetAllDistances( 10 ); // 0.2mm
319  aBoxInfoItem.SetValid( SvxBoxInfoItemValidFlags::TOP );
320  aBoxInfoItem.SetValid( SvxBoxInfoItemValidFlags::BOTTOM );
321  aBoxInfoItem.SetValid( SvxBoxInfoItemValidFlags::LEFT );
322  aBoxInfoItem.SetValid( SvxBoxInfoItemValidFlags::RIGHT );
323  aBoxInfoItem.SetValid( SvxBoxInfoItemValidFlags::DISTANCE );
324  aBoxInfoItem.SetTable( false );
325  aBoxInfoItem.SetDist ( true );
326 
327  SvxSetItem aHFSetItem2 = pSet->Get( ATTR_PAGE_HEADERSET );
328  pHFSet = &(aHFSetItem2.GetItemSet());
329 
331  pHFSet->Put( aBoxItem );
332  pHFSet->Put( aBoxInfoItem );
333  aHFSetItem2.SetWhich(ATTR_PAGE_HEADERSET);
334  pSet->Put( aHFSetItem2 );
335  aHFSetItem2.SetWhich(ATTR_PAGE_FOOTERSET);
336  pSet->Put( aHFSetItem2 );
337 
338  // Footer:
339  // [\TABLE\ (\DATA\)][empty][\DATE\, \TIME\]
340 
341  aStr = " ()";
342  aEdEngine.SetTextCurrentDefaults( aStr );
345  pTxtObj = aEdEngine.CreateTextObject();
346  aHeaderItem.SetLeftArea( *pTxtObj );
347  aHeaderItem.SetCenterArea( *pEmptyTxtObj );
348  aStr = ", ";
349  aEdEngine.SetTextCurrentDefaults( aStr );
352  ESelection() );
353  pTxtObj = aEdEngine.CreateTextObject();
354  aHeaderItem.SetRightArea( *pTxtObj );
355  pSet->Put( aHeaderItem );
356 
357  // Footer:
358  // [empty][Page: \PAGE\ / \PAGE\][empty]
359 
360  aStr = ScResId( STR_PAGE ) + " ";
361  nStrLen = aStr.getLength();
362  aStr += " / ";
363  sal_Int32 nStrLen2 = aStr.getLength();
364  aEdEngine.SetTextCurrentDefaults( aStr );
365  aEdEngine.QuickInsertField( SvxFieldItem(SvxPagesField(), EE_FEATURE_FIELD), ESelection(0,nStrLen2,0,nStrLen2) );
366  aEdEngine.QuickInsertField( SvxFieldItem(SvxPageField(), EE_FEATURE_FIELD), ESelection(0,nStrLen,0,nStrLen) );
367  pTxtObj = aEdEngine.CreateTextObject();
368  aFooterItem.SetLeftArea ( *pEmptyTxtObj );
369  aFooterItem.SetCenterArea( *pTxtObj );
370  aFooterItem.SetRightArea ( *pEmptyTxtObj );
371  pSet->Put( aFooterItem );
372 
373  bHasStandardStyles = true;
374 }
375 
376 namespace {
377 
378 struct CaseInsensitiveNamePredicate : svl::StyleSheetPredicate
379 {
380  CaseInsensitiveNamePredicate(const OUString& rName, SfxStyleFamily eFam)
381  : mUppercaseName(ScGlobal::getCharClass().uppercase(rName)), mFamily(eFam)
382  {
383  }
384 
385  bool
386  Check(const SfxStyleSheetBase& rStyleSheet) override
387  {
388  if (rStyleSheet.GetFamily() == mFamily)
389  {
390  OUString aUpName = ScGlobal::getCharClass().uppercase(rStyleSheet.GetName());
391  if (mUppercaseName == aUpName)
392  {
393  return true;
394  }
395  }
396  return false;
397  }
398 
399  OUString mUppercaseName;
400  SfxStyleFamily mFamily;
401 };
402 
403 }
404 
405 // Functor object to find all style sheets of a family which match a given name caseinsensitively
407 {
408  CaseInsensitiveNamePredicate aPredicate(rName, eFam);
409  std::vector<sal_Int32> aFoundPositions = GetIndexedStyleSheets().FindPositionsByPredicate(aPredicate);
410 
411  for (const auto& rPos : aFoundPositions)
412  {
414  // we do not know what kind of sheets we have.
415  if (pFound->isScStyleSheet())
416  return static_cast<ScStyleSheet*>(pFound);
417  }
418  return nullptr;
419 }
420 
422 {
423  SfxStyleSheetBase* pSheet = First(SfxStyleFamily::Para);
424  while (pSheet)
425  {
426  pSheet->SetMask(SfxStyleSearchBits::ScStandard);
427  pSheet = Next();
428  }
429 }
430 
431 /* 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)
const T * GetItemIfSet(TypedWhichId< T > nWhich, bool bSrchInParent=true) const
const OUString & GetFamilyName() const
OUString ScResId(TranslateId aId)
Definition: scdll.cxx:90
constexpr TypedWhichId< SvxBoxItem > ATTR_BORDER(150)
void CopyStdStylesFrom(ScStyleSheetPool *pSrcPool)
Definition: stlpool.cxx:183
const LanguageTag & GetUILanguageTag() const
const OUString & GetStyleName() const
LanguageType getLanguageType(bool bResolveSystem=true) const
void QuickInsertField(const SvxFieldItem &rFld, const ESelection &rSel)
virtual void Remove(SfxStyleSheetBase *)
sal_uIntPtr sal_uLong
void SetTable(bool bNew)
static const AllSettings & GetSettings()
const WhichRangesContainer & GetRanges() const
ScStyleSheet * FindCaseIns(const OUString &rName, SfxStyleFamily eFam)
Definition: stlpool.cxx:406
static void lcl_CheckFont(SfxItemSet &rSet, LanguageType eLang, DefaultFontType nFontType, sal_uInt16 nItemId)
Definition: stlpool.cxx:192
constexpr TypedWhichId< SvxBoxInfoItem > ATTR_BORDER_INNER(151)
constexpr OUStringLiteral STRING_STANDARD
Definition: global.hxx:59
static SC_DLLPUBLIC 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 SetLeftArea(const EditTextObject &rNew)
Definition: attrib.cxx:483
static rtl::Reference< SfxItemPool > CreatePool()
constexpr TypedWhichId< ScPageHFItem > ATTR_PAGE_HEADERRIGHT(180)
void SetMask(SfxStyleSearchBits mask)
virtual ~ScStyleSheetPool() override
Definition: stlpool.cxx:63
SfxStyleSheetBase * GetStyleSheetByPositionInIndex(unsigned pos)
const OUString & GetName() const
constexpr TypedWhichId< SvxFieldItem > EE_FEATURE_FIELD(EE_FEATURE_NOTCONV+1)
ScDocument * pDoc
Definition: stlpool.hxx:71
void SetCenterArea(const EditTextObject &rNew)
Definition: attrib.cxx:488
static const sal_Int16 Medium
int nCount
SfxStyleFamily
void SetAllDistances(sal_uInt16 nNew)
std::vector< sal_Int32 > FindPositionsByPredicate(StyleSheetPredicate &predicate) const
FontPitch GetPitch()
void SetTextCurrentDefaults(const EditTextObject &rTextObject)
SetText and apply defaults already set.
Definition: editutil.cxx:603
constexpr TypedWhichId< SvxSetItem > ATTR_PAGE_HEADERSET(184)
#define LANGUAGE_SYSTEM
virtual SfxStyleSheetBase & Make(const OUString &, SfxStyleFamily eFam, SfxStyleSearchBits nMask=SfxStyleSearchBits::All)
static SC_DLLPUBLIC const CharClass & getCharClass()
Definition: global.cxx:1024
sal_Int32 GetNumberOfStyleSheets() const
std::unique_ptr< EditTextObject > CreateTextObject()
OUString uppercase(const OUString &rStr, sal_Int32 nPos, sal_Int32 nCount) const
virtual rtl::Reference< SfxStyleSheetBase > Create(const OUString &rName, SfxStyleFamily eFamily, SfxStyleSearchBits nMask) override
Definition: stlpool.cxx:99
void PutExtended(const SfxItemSet &, SfxItemState eDontCareAs, SfxItemState eDefaultAs)
#define LANGUAGE_DONTKNOW
constexpr TypedWhichId< SfxUInt32Item > ATTR_VALUE_FORMAT(146)
void SetRightArea(const EditTextObject &rNew)
Definition: attrib.cxx:493
constexpr TypedWhichId< SvxFontItem > ATTR_CTL_FONT(116)
ScStyleSheetPool(const SfxItemPool &rPool, ScDocument *pDocument)
Definition: stlpool.cxx:54
SfxItemPool * GetPool() const
bool bHasStandardStyles
Definition: stlpool.hxx:72
bool SetUpdateLayout(bool bUpdate, bool bRestoring=false)
constexpr TypedWhichId< SvxFontItem > ATTR_CJK_FONT(111)
constexpr TypedWhichId< SvxBrushItem > ATTR_BACKGROUND(148)
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
PyRef getCharClass(const Runtime &)
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:421
SfxStyleSheetBase * Next()
void CreateStandardStyles()
Definition: stlpool.cxx:207
virtual SfxStyleSheetBase & Make(const OUString &, SfxStyleFamily eFam, SfxStyleSearchBits nMask=SfxStyleSearchBits::All) override
Definition: stlpool.cxx:72
virtual SC_DLLPUBLIC SfxItemSet & GetItemSet() override
Definition: stlsheet.cxx:128
const ::std::vector< Color > ImpSvNumberformatScan::StandardColor COL_BLACK
static bool isKorean(LanguageType nLang)
DefaultFontType
sal_uInt32 GetValue() const
void SetValid(SvxBoxInfoItemValidFlags nValid, bool bValid=true)
constexpr TypedWhichId< ScPageHFItem > ATTR_PAGE_FOOTERRIGHT(181)
SC_DLLPUBLIC void GetLanguage(LanguageType &rLatin, LanguageType &rCjk, LanguageType &rCtl) const
Definition: documen3.cxx:1972
virtual SfxStyleSheetBase * Find(const OUString &, SfxStyleFamily eFam, SfxStyleSearchBits n=SfxStyleSearchBits::All)
constexpr TypedWhichId< SvxSetItem > ATTR_PAGE_FOOTERSET(185)
aStr
SvNumberFormatterIndexTable * GetFormatExchangeList() const
Definition: document.hxx:924
SfxItemPool & rPool
SfxStyleSearchBits
rtl_TextEncoding GetCharSet() const
void SetDist(bool bNew)
bool m_bDetectedRangeSegmentation false
void SetLine(const editeng::SvxBorderLine *pNew, SvxBoxItemLine nLine)
virtual bool isScStyleSheet() const