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