LibreOffice Module svx (master)  1
nbdtmg.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 #include <svx/nbdtmg.hxx>
20 #include <svx/svxids.hrc>
21 #include <vcl/svapp.hxx>
22 #include <svl/itemset.hxx>
23 #include <sfx2/request.hxx>
24 #include <svl/stritem.hxx>
25 #include <svtools/ctrltool.hxx>
26 #include <sfx2/objsh.hxx>
27 #include <editeng/flstitem.hxx>
28 #include <svl/itempool.hxx>
29 #include <vcl/outdev.hxx>
30 #include <editeng/brushitem.hxx>
31 #include <svx/dialmgr.hxx>
32 #include <svx/strings.hrc>
33 #include <vcl/graph.hxx>
34 #include <vcl/settings.hxx>
35 
37 #include <o3tl/temporary.hxx>
38 #include <tools/debug.hxx>
39 #include <tools/urlobj.hxx>
41 #include <unotools/pathoptions.hxx>
42 #include <editeng/eeitem.hxx>
43 
44 #include <com/sun/star/text/VertOrientation.hpp>
45 #include <com/sun/star/style/NumberingType.hpp>
46 #include <com/sun/star/container/XIndexAccess.hpp>
47 #include <com/sun/star/text/DefaultNumberingProvider.hpp>
48 #include <com/sun/star/beans/PropertyValue.hpp>
50 #include <memory>
51 
52 using namespace com::sun::star;
53 using namespace com::sun::star::uno;
54 using namespace com::sun::star::beans;
55 using namespace com::sun::star::lang;
56 using namespace com::sun::star::text;
57 using namespace com::sun::star::container;
58 using namespace com::sun::star::style;
59 
60 namespace svx::sidebar {
61 
62 namespace {
63 
65 {
66  static vcl::Font aDefBulletFont = [&]()
67  {
68  static vcl::Font tmp("OpenSymbol", "", Size(0, 14));
69  tmp.SetCharSet( RTL_TEXTENCODING_SYMBOL );
70  tmp.SetFamily( FAMILY_DONTKNOW );
71  tmp.SetPitch( PITCH_DONTKNOW );
72  tmp.SetWeight( WEIGHT_DONTKNOW );
73  tmp.SetTransparent( true );
74  return tmp;
75  }();
76  return aDefBulletFont;
77 }
78 
79 const sal_Unicode aDefaultBulletTypes[] =
80 {
81  0x2022,
82  0x25cf,
83  0xe00c,
84  0xe00a,
85  0x2794,
86  0x27a2,
87  0x2717,
88  0x2714
89 };
90 
91 NumSettings_Impl* lcl_CreateNumberingSettingsPtr(const Sequence<PropertyValue>& rLevelProps)
92 {
93  NumSettings_Impl* pNew = new NumSettings_Impl;
94  for(const PropertyValue& rValue : rLevelProps)
95  {
96  if(rValue.Name == "NumberingType")
97  {
98  sal_Int16 nTmp;
99  if (rValue.Value >>= nTmp)
100  pNew->nNumberType = static_cast<SvxNumType>(nTmp);
101  }
102  else if(rValue.Name == "Prefix")
103  rValue.Value >>= pNew->sPrefix;
104  else if(rValue.Name == "Suffix")
105  rValue.Value >>= pNew->sSuffix;
106  else if(rValue.Name == "ParentNumbering")
107  rValue.Value >>= pNew->nParentNumbering;
108  else if(rValue.Name == "BulletChar")
109  rValue.Value >>= pNew->sBulletChar;
110  else if(rValue.Name == "BulletFontName")
111  rValue.Value >>= pNew->sBulletFont;
112  }
113  const sal_Unicode cLocalPrefix = pNew->sPrefix.getLength() ? pNew->sPrefix[0] : 0;
114  const sal_Unicode cLocalSuffix = pNew->sSuffix.getLength() ? pNew->sSuffix[0] : 0;
115  if( cLocalPrefix == ' ') pNew->sPrefix.clear();
116  if( cLocalSuffix == ' ') pNew->sSuffix.clear();
117  return pNew;
118 }
119 
120 }
121 
122 sal_uInt16 NBOTypeMgrBase:: IsSingleLevel(sal_uInt16 nCurLevel)
123 {
124  sal_uInt16 nLv = sal_uInt16(0xFFFF);
125  sal_uInt16 nCount = 0;
126  sal_uInt16 nMask = 1;
127  for( sal_uInt16 i = 0; i < SVX_MAX_NUM; i++ )
128  {
129  if(nCurLevel & nMask)
130  {
131  nCount++;
132  nLv=i;
133  }
134  nMask <<= 1 ;
135  }
136 
137  if ( nCount == 1)
138  return nLv;
139  else
140  return sal_uInt16(0xFFFF);
141 }
142 
143 void NBOTypeMgrBase::SetItems(const SfxItemSet* pArg) {
144  pSet = pArg;
145  if ( !pSet )
146  return;
147 
148  SfxAllItemSet aSet(*pSet);
149 
150  const SfxStringItem* pBulletCharFmt = aSet.GetItem<SfxStringItem>(SID_BULLET_CHAR_FMT, false);
151  if (pBulletCharFmt)
152  aBulletCharFmtName = pBulletCharFmt->GetValue();
153 
154  const SfxStringItem* pNumCharFmt = aSet.GetItem<SfxStringItem>(SID_NUM_CHAR_FMT, false);
155  if (pNumCharFmt)
156  aNumCharFmtName = pNumCharFmt->GetValue();
157 
158  const SfxPoolItem* pItem;
159  SfxItemState eState = pSet->GetItemState(SID_ATTR_NUMBERING_RULE, false, &pItem);
160  if(eState == SfxItemState::SET)
161  {
162  eCoreUnit = pSet->GetPool()->GetMetric(pSet->GetPool()->GetWhich(SID_ATTR_NUMBERING_RULE));
163  } else {
164  //sd use different sid for numbering rule
165  eState = pSet->GetItemState(EE_PARA_NUMBULLET, false, &pItem);
166  if(eState == SfxItemState::SET)
167  {
168  eCoreUnit = pSet->GetPool()->GetMetric(pSet->GetPool()->GetWhich(EE_PARA_NUMBULLET));
169  }
170  }
171 }
172 
173 void NBOTypeMgrBase::ImplLoad(const OUString& filename)
174 {
175  bIsLoading = true;
176  MapUnit eOldCoreUnit=eCoreUnit;
177  eCoreUnit = MapUnit::Map100thMM;
178  INetURLObject aFile( SvtPathOptions().GetUserConfigPath() );
179  aFile.Append( filename);
180  std::unique_ptr<SvStream> xIStm(::utl::UcbStreamHelper::CreateStream( aFile.GetMainURL( INetURLObject::DecodeMechanism::NONE ), StreamMode::READ ));
181  if( xIStm ) {
182  sal_uInt32 nVersion = 0;
183  sal_Int32 nNumIndex = 0;
184  xIStm->ReadUInt32( nVersion );
185  if (nVersion==DEFAULT_NUMBERING_CACHE_FORMAT_VERSION) //first version
186  {
187  xIStm->ReadInt32( nNumIndex );
188  while (nNumIndex>=0 && nNumIndex<DEFAULT_NUM_VALUSET_COUNT) {
189  SvxNumRule aNum(*xIStm);
190  //bullet color in font properties is not stored correctly. Need set transparency bits manually
191  for(sal_uInt16 i = 0; i < aNum.GetLevelCount(); i++)
192  {
193  SvxNumberFormat aFmt(aNum.GetLevel(i));
194  if (aFmt.GetBulletFont()) {
195  vcl::Font aFont(*aFmt.GetBulletFont());
196  Color c=aFont.GetColor();
197  c.SetAlpha(0);
198  aFont.SetColor(c);
199  aFmt.SetBulletFont(&aFont);
200  aNum.SetLevel(i, aFmt);
201  }
202  }
203  RelplaceNumRule(aNum,nNumIndex,0x1/*nLevel*/);
204  xIStm->ReadInt32( nNumIndex );
205  }
206  }
207  }
208  eCoreUnit = eOldCoreUnit;
209  bIsLoading = false;
210 }
211 void NBOTypeMgrBase::ImplStore(const OUString& filename)
212 {
213  if (bIsLoading) return;
214  MapUnit eOldCoreUnit=eCoreUnit;
215  eCoreUnit = MapUnit::Map100thMM;
216  INetURLObject aFile( SvtPathOptions().GetUserConfigPath() );
217  aFile.Append( filename);
218  std::unique_ptr<SvStream> xOStm(::utl::UcbStreamHelper::CreateStream( aFile.GetMainURL( INetURLObject::DecodeMechanism::NONE ), StreamMode::WRITE ));
219  if( xOStm ) {
220  sal_uInt32 nVersion;
221  sal_Int32 nNumIndex;
223  xOStm->WriteUInt32( nVersion );
224  for(sal_Int32 nItem = 0; nItem < DEFAULT_NUM_VALUSET_COUNT; nItem++ ) {
225  if (IsCustomized(nItem)) {
226  SvxNumRule aDefNumRule( SvxNumRuleFlags::BULLET_REL_SIZE | SvxNumRuleFlags::CONTINUOUS | SvxNumRuleFlags::BULLET_COLOR,
227  10, false,
228  SvxNumRuleType::NUMBERING, SvxNumberFormat::LABEL_ALIGNMENT);
229  xOStm->WriteInt32( nItem );
230  ApplyNumRule(aDefNumRule,nItem,0x1/*nLevel*/,false,true);
231  aDefNumRule.Store(*xOStm);
232  }
233  }
234  nNumIndex = -1;
235  xOStm->WriteInt32( nNumIndex ); //write end flag
236  }
237  eCoreUnit = eOldCoreUnit;
238 }
239 
240 // Character Bullet Type lib
241 BulletsSettings* BulletsTypeMgr::pActualBullets[] ={nullptr,nullptr,nullptr,nullptr,nullptr,nullptr,nullptr,nullptr};
242 sal_Unicode BulletsTypeMgr::aDynamicBulletTypes[]={' ',' ',' ',' ',' ',' ',' ',' '};
243 sal_Unicode BulletsTypeMgr::aDynamicRTLBulletTypes[]={' ',' ',' ',' ',' ',' ',' ',' '};
244 
245 BulletsTypeMgr::BulletsTypeMgr()
246  : NBOTypeMgrBase()
247 {
248  Init();
249 }
250 
251 namespace {
252 
253 class theBulletsTypeMgr : public rtl::Static<BulletsTypeMgr, theBulletsTypeMgr> {};
254 
255 }
256 
258 {
259  return theBulletsTypeMgr::get();
260 }
261 
263 {
264  const vcl::Font& rActBulletFont = lcl_GetDefaultBulletFont();
265 
266  for (sal_uInt16 i=0;i<DEFAULT_BULLET_TYPES;i++)
267  {
269  pActualBullets[i]->cBulletChar = aDefaultBulletTypes[i];
270  pActualBullets[i]->aFont = rActBulletFont;
271  pActualBullets[i]->sDescription = SvxResId( RID_SVXSTR_BULLET_DESCRIPTION_0 + i );
272  }
273 }
274 sal_uInt16 BulletsTypeMgr::GetNBOIndexForNumRule(SvxNumRule& aNum,sal_uInt16 mLevel,sal_uInt16 nFromIndex)
275 {
276  if ( mLevel == sal_uInt16(0xFFFF) || mLevel == 0)
277  return sal_uInt16(0xFFFF);
278  //if ( !lcl_IsNumFmtSet(pNR, mLevel) ) return (sal_uInt16)0xFFFF;
279 
280  sal_uInt16 nActLv = IsSingleLevel(mLevel);
281 
282  if ( nActLv == sal_uInt16(0xFFFF) )
283  return sal_uInt16(0xFFFF);
284 
285  const SvxNumberFormat& aFmt(aNum.GetLevel(nActLv));
286  sal_UCS4 cChar = aFmt.GetBulletChar();
287  for(sal_uInt16 i = nFromIndex; i < DEFAULT_BULLET_TYPES; i++)
288  {
289  if ( (cChar == pActualBullets[i]->cBulletChar) ||
290  (cChar == 9830 && 57356 == pActualBullets[i]->cBulletChar) ||
291  (cChar == 9632 && 57354 == pActualBullets[i]->cBulletChar) )
292  {
293  return i+1;
294  }
295  }
296 
297  return sal_uInt16(0xFFFF);
298 }
299 
300 void BulletsTypeMgr::RelplaceNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uInt16 mLevel)
301 {
302  if ( mLevel == sal_uInt16(0xFFFF) || mLevel == 0)
303  return;
304 
305  if ( GetNBOIndexForNumRule(aNum,mLevel) != sal_uInt16(0xFFFF) )
306  return;
307 
308  sal_uInt16 nActLv = IsSingleLevel(mLevel);
309 
310  if ( nActLv == sal_uInt16(0xFFFF) )
311  return;
312 
313  SvxNumberFormat aFmt(aNum.GetLevel(nActLv));
314  sal_UCS4 cChar = aFmt.GetBulletChar();
315  const vcl::Font* pFont = aFmt.GetBulletFont();
316  if ( nIndex >= DEFAULT_BULLET_TYPES )
317  return;
318 
319  pActualBullets[nIndex]->cBulletChar = cChar;
320  if ( pFont )
321  pActualBullets[nIndex]->aFont = *pFont;
322  pActualBullets[nIndex]->bIsCustomized = true;
323 }
324 
325 void BulletsTypeMgr::ApplyNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uInt16 mLevel, bool /*isDefault*/, bool isResetSize)
326 {
327  if ( nIndex >= DEFAULT_BULLET_TYPES )
328  return;
329  sal_UCS4 cChar = pActualBullets[nIndex]->cBulletChar;
330  const vcl::Font& rActBulletFont = pActualBullets[nIndex]->aFont;
331 
332  sal_uInt16 nMask = 1;
333  OUString sBulletCharFormatName = GetBulletCharFmtName();
334  for(sal_uInt16 i = 0; i < aNum.GetLevelCount(); i++)
335  {
336  if(mLevel & nMask)
337  {
338  SvxNumberFormat aFmt(aNum.GetLevel(i));
340  aFmt.SetBulletFont(&rActBulletFont);
341  aFmt.SetBulletChar(cChar);
342  aFmt.SetCharFormatName(sBulletCharFormatName);
343  aFmt.SetPrefix( "" );
344  aFmt.SetSuffix( "" );
345  if (isResetSize) aFmt.SetBulletRelSize(45);
346  aNum.SetLevel(i, aFmt);
347  }
348  nMask <<= 1;
349  }
350 }
351 
352 OUString BulletsTypeMgr::GetDescription(sal_uInt16 nIndex, bool /*isDefault*/)
353 {
354  OUString sRet;
355 
356  if ( nIndex >= DEFAULT_BULLET_TYPES )
357  return sRet;
358  else
359  sRet = pActualBullets[nIndex]->sDescription;
360 
361  return sRet;
362 }
363 
364 bool BulletsTypeMgr::IsCustomized(sal_uInt16 nIndex)
365 {
366  bool bRet = false;
367 
368  if ( nIndex >= DEFAULT_BULLET_TYPES )
369  bRet = false;
370  else
371  bRet = pActualBullets[nIndex]->bIsCustomized;
372 
373  return bRet;
374 }
375 
376 // Numbering Type lib
378  : NBOTypeMgrBase()
379 {
380  Init();
382  ImplLoad("standard.syb");
383 }
384 
386 {
387 }
388 
389 static const char* RID_SVXSTR_SINGLENUM_DESCRIPTIONS[] =
390 {
391  RID_SVXSTR_SINGLENUM_DESCRIPTION_0,
392  RID_SVXSTR_SINGLENUM_DESCRIPTION_1,
393  RID_SVXSTR_SINGLENUM_DESCRIPTION_2,
394  RID_SVXSTR_SINGLENUM_DESCRIPTION_3,
395  RID_SVXSTR_SINGLENUM_DESCRIPTION_4,
396  RID_SVXSTR_SINGLENUM_DESCRIPTION_5,
397  RID_SVXSTR_SINGLENUM_DESCRIPTION_6,
398  RID_SVXSTR_SINGLENUM_DESCRIPTION_7
399 };
400 
401 namespace {
402 
403 class theNumberingTypeMgr : public rtl::Static<NumberingTypeMgr, theNumberingTypeMgr> {};
404 
405 }
406 
408 {
409  return theNumberingTypeMgr::get();
410 }
411 
413 {
414  Reference< XComponentContext > xContext = ::comphelper::getProcessComponentContext();
415  Reference<XDefaultNumberingProvider> xDefNum = DefaultNumberingProvider::create( xContext );
416 
418  Locale aLocale(Application::GetSettings().GetLanguageTag().getLocale());
419  try
420  {
421  aNumberings = xDefNum->getDefaultContinuousNumberingLevels( aLocale );
422 
423  sal_Int32 nLength = aNumberings.getLength();
424 
425  const Sequence<PropertyValue>* pValuesArr = aNumberings.getConstArray();
426  for(sal_Int32 i = 0; i < nLength; i++)
427  {
428  NumSettings_Impl* pNew = lcl_CreateNumberingSettingsPtr(pValuesArr[i]);
429  std::shared_ptr<NumberSettings_Impl> pNumEntry = std::make_shared<NumberSettings_Impl>();
430  pNumEntry->pNumSetting = pNew;
431  if ( i < 8 )
432  pNumEntry->sDescription = SvxResId(RID_SVXSTR_SINGLENUM_DESCRIPTIONS[i]);
433  maNumberSettingsArr.push_back(pNumEntry);
434  }
435  }
436  catch(Exception&)
437  {
438  }
439 }
440 
441 sal_uInt16 NumberingTypeMgr::GetNBOIndexForNumRule(SvxNumRule& aNum,sal_uInt16 mLevel,sal_uInt16 nFromIndex)
442 {
443  if ( mLevel == sal_uInt16(0xFFFF) || mLevel > aNum.GetLevelCount() || mLevel == 0)
444  return sal_uInt16(0xFFFF);
445 
446  sal_uInt16 nActLv = IsSingleLevel(mLevel);
447 
448  if ( nActLv == sal_uInt16(0xFFFF) )
449  return sal_uInt16(0xFFFF);
450 
451  const SvxNumberFormat& aFmt(aNum.GetLevel(nActLv));
452  //sal_Unicode cPrefix = OUString(aFmt.GetPrefix())[0];
453  //sal_Unicode cSuffix = :OUString(aFmt.GetSuffix())[0];
454  const OUString& sPrefix = aFmt.GetPrefix();
455  const OUString& sLclSuffix = aFmt.GetSuffix();
456  sal_Int16 eNumType = aFmt.GetNumberingType();
457 
458  sal_uInt16 nCount = maNumberSettingsArr.size();
459  for(sal_uInt16 i = nFromIndex; i < nCount; ++i)
460  {
461  NumberSettings_Impl* _pSet = maNumberSettingsArr[i].get();
462  sal_Int16 eNType = _pSet->pNumSetting->nNumberType;
463  OUString sLocalPrefix = _pSet->pNumSetting->sPrefix;
464  OUString sLocalSuffix = _pSet->pNumSetting->sSuffix;
465  if (sPrefix == sLocalPrefix &&
466  sLclSuffix == sLocalSuffix &&
467  eNumType == eNType )
468  {
469  return i+1;
470  }
471  }
472 
473 
474  return sal_uInt16(0xFFFF);
475 }
476 
477 void NumberingTypeMgr::RelplaceNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uInt16 mLevel)
478 {
479  sal_uInt16 nActLv = IsSingleLevel(mLevel);
480 
481  if ( nActLv == sal_uInt16(0xFFFF) )
482  return;
483 
484  const SvxNumberFormat& aFmt(aNum.GetLevel(nActLv));
485  SvxNumType eNumType = aFmt.GetNumberingType();
486 
487  sal_uInt16 nCount = maNumberSettingsArr.size();
488  if ( nIndex >= nCount )
489  return;
490 
491  NumberSettings_Impl* _pSet = maNumberSettingsArr[nIndex].get();
492 
493  _pSet->pNumSetting->sPrefix = aFmt.GetPrefix();
494  _pSet->pNumSetting->sSuffix = aFmt.GetSuffix();
495  _pSet->pNumSetting->nNumberType = eNumType;
496  _pSet->bIsCustomized = true;
497 
498  SvxNumRule aTmpRule1(aNum);
499  SvxNumRule aTmpRule2(aNum);
500  ApplyNumRule(aTmpRule1,nIndex,mLevel,true);
501  ApplyNumRule(aTmpRule2,nIndex,mLevel);
502  if (aTmpRule1==aTmpRule2) _pSet->bIsCustomized=false;
503  if (!_pSet->bIsCustomized) {
504  _pSet->sDescription = GetDescription(nIndex,true);
505  }
506  ImplStore("standard.syb");
507 }
508 
509 void NumberingTypeMgr::ApplyNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uInt16 mLevel, bool isDefault, bool isResetSize)
510 {
511  if(maNumberSettingsArr.size() <= nIndex)
512  return;
513  NumberSettingsArr_Impl* pCurrentNumberSettingsArr = &maNumberSettingsArr;
514  if (isDefault) pCurrentNumberSettingsArr = &maDefaultNumberSettingsArr;
515  NumberSettings_Impl* _pSet = (*pCurrentNumberSettingsArr)[nIndex].get();
516  SvxNumType eNewType = _pSet->pNumSetting->nNumberType;
517 
518  sal_uInt16 nMask = 1;
519  OUString sNumCharFmtName = GetNumCharFmtName();
520  for(sal_uInt16 i = 0; i < aNum.GetLevelCount(); i++)
521  {
522  if(mLevel & nMask)
523  {
524  SvxNumberFormat aFmt(aNum.GetLevel(i));
525  if (eNewType!=aFmt.GetNumberingType()) isResetSize=true;
526  aFmt.SetNumberingType(eNewType);
527  aFmt.SetPrefix(_pSet->pNumSetting->sPrefix);
528  aFmt.SetSuffix(_pSet->pNumSetting->sSuffix);
529 
530  aFmt.SetCharFormatName(sNumCharFmtName);
531  if (isResetSize) aFmt.SetBulletRelSize(100);
532  aNum.SetLevel(i, aFmt);
533  }
534  nMask <<= 1 ;
535  }
536 }
537 
538 OUString NumberingTypeMgr::GetDescription(sal_uInt16 nIndex, bool isDefault)
539 {
540  OUString sRet;
541  sal_uInt16 nLength = maNumberSettingsArr.size();
542 
543  if ( nIndex >= nLength )
544  return sRet;
545  else
546  sRet = maNumberSettingsArr[nIndex]->sDescription;
547  if (isDefault) sRet = maDefaultNumberSettingsArr[nIndex]->sDescription;
548 
549  return sRet;
550 }
551 
552 bool NumberingTypeMgr::IsCustomized(sal_uInt16 nIndex)
553 {
554  bool bRet = false;
555  sal_uInt16 nLength = maNumberSettingsArr.size();
556 
557  if ( nIndex >= nLength )
558  bRet = false;
559  else
560  bRet = maNumberSettingsArr[nIndex]->bIsCustomized;
561 
562  return bRet;
563 }
564 // Multi-level /Outline Type lib
566  : NBOTypeMgrBase()
567 {
568  Init();
569  for(sal_Int32 nItem = 0; nItem < DEFAULT_NUM_VALUSET_COUNT; nItem++ )
570  {
572  }
573  //Initial the first time to store the default value. Then do it again for customized value
574  Init();
575  ImplLoad("standard.syc");
576 }
577 
578 namespace {
579 
580 class theOutlineTypeMgr : public rtl::Static<OutlineTypeMgr, theOutlineTypeMgr> {};
581 
582 }
583 
585 {
586  return theOutlineTypeMgr::get();
587 }
588 
590 {
591  Reference< XComponentContext > xContext = ::comphelper::getProcessComponentContext();
592  Reference<XDefaultNumberingProvider> xDefNum = DefaultNumberingProvider::create( xContext );
593 
594  Sequence<Reference<XIndexAccess> > aOutlineAccess;
595  Locale aLocale(Application::GetSettings().GetLanguageTag().getLocale());
596  try
597  {
598  aOutlineAccess = xDefNum->getDefaultOutlineNumberings( aLocale );
599 
600  SvxNumRule aDefNumRule( SvxNumRuleFlags::BULLET_REL_SIZE | SvxNumRuleFlags::CONTINUOUS | SvxNumRuleFlags::BULLET_COLOR,
601  10, false,
602  SvxNumRuleType::NUMBERING, SvxNumberFormat::LABEL_ALIGNMENT);
603 
604  auto nSize = std::min<sal_Int32>(aOutlineAccess.getLength(), DEFAULT_NUM_VALUSET_COUNT);
605  for(sal_Int32 nItem = 0; nItem < nSize; nItem++ )
606  {
608  OutlineSettings_Impl* pItemArr = pOutlineSettingsArrs[ nItem ];
609  pItemArr->sDescription = SvxResId( RID_SVXSTR_OUTLINENUM_DESCRIPTION_0 + nItem );
610  pItemArr->pNumSettingsArr = new NumSettingsArr_Impl;
611  Reference<XIndexAccess> xLevel = aOutlineAccess.getConstArray()[nItem];
612  for(sal_Int32 nLevel = 0; nLevel < xLevel->getCount() && nLevel < 5; nLevel++)
613  {
614  Any aValueAny = xLevel->getByIndex(nLevel);
615  Sequence<PropertyValue> aLevelProps;
616  aValueAny >>= aLevelProps;
617  NumSettings_Impl* pNew = lcl_CreateNumberingSettingsPtr(aLevelProps);
618  const SvxNumberFormat& aNumFmt( aDefNumRule.GetLevel( nLevel) );
619  pNew->eLabelFollowedBy = aNumFmt.GetLabelFollowedBy();
620  pNew->nTabValue = aNumFmt.GetListtabPos();
621  pNew->eNumAlign = aNumFmt.GetNumAdjust();
622  pNew->nNumAlignAt = aNumFmt.GetFirstLineIndent();
623  pNew->nNumIndentAt = aNumFmt.GetIndentAt();
624  pItemArr->pNumSettingsArr->push_back(std::shared_ptr<NumSettings_Impl>(pNew));
625  }
626  }
627  }
628  catch(Exception&)
629  {
630  }
631 }
632 
633 sal_uInt16 OutlineTypeMgr::GetNBOIndexForNumRule(SvxNumRule& aNum,sal_uInt16 /*mLevel*/,sal_uInt16 nFromIndex)
634 {
635  sal_uInt16 const nLength = SAL_N_ELEMENTS(pOutlineSettingsArrs);
636  for(sal_uInt16 iDex = nFromIndex; iDex < nLength; iDex++)
637  {
638  bool bNotMatch = false;
639  OutlineSettings_Impl* pItemArr = pOutlineSettingsArrs[iDex];
640  sal_uInt16 nCount = pItemArr->pNumSettingsArr->size();
641  for (sal_uInt16 iLevel=0;iLevel < nCount;iLevel++)
642  {
643  NumSettings_Impl* _pSet = (*pItemArr->pNumSettingsArr)[iLevel].get();
644  sal_Int16 eNType = _pSet->nNumberType;
645 
646  const SvxNumberFormat& aFmt(aNum.GetLevel(iLevel));
647  const OUString& sPrefix = aFmt.GetPrefix();
648  const OUString& sLclSuffix = aFmt.GetSuffix();
649  sal_Int16 eNumType = aFmt.GetNumberingType();
650  if( eNumType == SVX_NUM_CHAR_SPECIAL)
651  {
652  sal_UCS4 cChar = aFmt.GetBulletChar();
653 
654  sal_UCS4 ccChar
655  = _pSet->sBulletChar.iterateCodePoints(&o3tl::temporary(sal_Int32(0)));
656 
657  if ( !((cChar == ccChar) &&
658  _pSet->eLabelFollowedBy == aFmt.GetLabelFollowedBy() &&
659  _pSet->nTabValue == aFmt.GetListtabPos() &&
660  _pSet->eNumAlign == aFmt.GetNumAdjust() &&
661  _pSet->nNumAlignAt == aFmt.GetFirstLineIndent() &&
662  _pSet->nNumIndentAt == aFmt.GetIndentAt()))
663  {
664  bNotMatch = true;
665  break;
666  }
667  }else if ((eNumType&(~LINK_TOKEN)) == SVX_NUM_BITMAP ) {
668  const SvxBrushItem* pBrsh1 = aFmt.GetBrush();
669  const SvxBrushItem* pBrsh2 = _pSet->pBrushItem;
670  bool bIsMatch = false;
671  if (pBrsh1==pBrsh2) bIsMatch = true;
672  if (pBrsh1 && pBrsh2) {
673  const Graphic* pGrf1 = pBrsh1->GetGraphic();
674  const Graphic* pGrf2 = pBrsh2->GetGraphic();
675  if (pGrf1==pGrf2) bIsMatch = true;
676  if (pGrf1 && pGrf2) {
677  if ( pGrf1->GetBitmapEx() == pGrf2->GetBitmapEx() &&
678  _pSet->aSize == aFmt.GetGraphicSize())
679  bIsMatch = true;
680  }
681  }
682  if (!bIsMatch) {
683  bNotMatch = true;
684  break;
685  }
686  } else
687  {
688  if (!(sPrefix == _pSet->sPrefix &&
689  sLclSuffix == _pSet->sSuffix &&
690  eNumType == eNType &&
691  _pSet->eLabelFollowedBy == aFmt.GetLabelFollowedBy() &&
692  _pSet->nTabValue == aFmt.GetListtabPos() &&
693  _pSet->eNumAlign == aFmt.GetNumAdjust() &&
694  _pSet->nNumAlignAt == aFmt.GetFirstLineIndent() &&
695  _pSet->nNumIndentAt == aFmt.GetIndentAt()))
696  {
697  bNotMatch = true;
698  break;
699  }
700  }
701  }
702  if ( !bNotMatch )
703  return iDex+1;
704  }
705 
706 
707  return sal_uInt16(0xFFFF);
708 }
709 
710 void OutlineTypeMgr::RelplaceNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uInt16 mLevel)
711 {
712  sal_uInt16 const nLength = SAL_N_ELEMENTS(pOutlineSettingsArrs);
713  if ( nIndex >= nLength )
714  return;
715 
716  OutlineSettings_Impl* pItemArr = pOutlineSettingsArrs[nIndex];
717  sal_uInt16 nCount = pItemArr->pNumSettingsArr->size();
718  for (sal_uInt16 iLevel=0;iLevel < nCount;iLevel++)
719  {
720  const SvxNumberFormat& aFmt(aNum.GetLevel(iLevel));
721  SvxNumType eNumType = aFmt.GetNumberingType();
722 
723  NumSettings_Impl* _pSet = (*pItemArr->pNumSettingsArr)[iLevel].get();
724 
725  _pSet->eLabelFollowedBy = aFmt.GetLabelFollowedBy();
726  _pSet->nTabValue = aFmt.GetListtabPos();
727  _pSet->eNumAlign = aFmt.GetNumAdjust();
728  _pSet->nNumAlignAt = aFmt.GetFirstLineIndent();
729  _pSet->nNumIndentAt = aFmt.GetIndentAt();
730 
731  if( eNumType == SVX_NUM_CHAR_SPECIAL)
732  {
733  sal_UCS4 cChar = aFmt.GetBulletChar();
734  OUString sChar(&cChar, 1);
735  _pSet->sBulletChar = sChar;
736  if ( aFmt.GetBulletFont() )
737  _pSet->sBulletFont = aFmt.GetBulletFont()->GetFamilyName();
738  _pSet->nNumberType = eNumType;
739  pItemArr->bIsCustomized = true;
740  }else if ((eNumType&(~LINK_TOKEN)) == SVX_NUM_BITMAP ) {
741  if (_pSet->pBrushItem) {
742  delete _pSet->pBrushItem;
743  _pSet->pBrushItem=nullptr;
744  }
745  if (aFmt.GetBrush())
746  _pSet->pBrushItem = new SvxBrushItem(*aFmt.GetBrush());
747  _pSet->aSize = aFmt.GetGraphicSize();
748  _pSet->nNumberType = eNumType;
749  } else
750  {
751  _pSet->sPrefix = aFmt.GetPrefix();
752  _pSet->sSuffix = aFmt.GetSuffix();
753  _pSet->nNumberType = eNumType;
754  if ( aFmt.GetBulletFont() )
755  _pSet->sBulletFont = aFmt.GetBulletFont()->GetFamilyName();
756  pItemArr->bIsCustomized = true;
757  }
758  }
759  SvxNumRule aTmpRule1(aNum);
760  SvxNumRule aTmpRule2(aNum);
761  ApplyNumRule(aTmpRule1,nIndex,mLevel,true);
762  ApplyNumRule(aTmpRule2,nIndex,mLevel);
763  if (aTmpRule1==aTmpRule2) pItemArr->bIsCustomized=false;
764  if (!pItemArr->bIsCustomized) {
765  pItemArr->sDescription = GetDescription(nIndex,true);
766  }
767  ImplStore("standard.syc");
768 }
769 
770 void OutlineTypeMgr::ApplyNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uInt16 /*mLevel*/, bool isDefault, bool isResetSize)
771 {
772  DBG_ASSERT(DEFAULT_NUM_VALUSET_COUNT > nIndex, "wrong index");
773  if(DEFAULT_NUM_VALUSET_COUNT <= nIndex)
774  return;
775 
776  const FontList* pList = nullptr;
777 
778  OutlineSettings_Impl* pItemArr = pOutlineSettingsArrs[nIndex];
779  if (isDefault) pItemArr=pDefaultOutlineSettingsArrs[nIndex];
780 
781  NumSettingsArr_Impl *pNumSettingsArr=pItemArr->pNumSettingsArr;
782 
783  NumSettings_Impl* pLevelSettings = nullptr;
784  for(sal_uInt16 i = 0; i < aNum.GetLevelCount(); i++)
785  {
786  if(pNumSettingsArr->size() > i)
787  pLevelSettings = (*pNumSettingsArr)[i].get();
788 
789  if(!pLevelSettings)
790  break;
791 
792  SvxNumberFormat aFmt(aNum.GetLevel(i));
793  const vcl::Font& rActBulletFont = lcl_GetDefaultBulletFont();
794  if (pLevelSettings->nNumberType !=aFmt.GetNumberingType()) isResetSize=true;
795  aFmt.SetNumberingType( pLevelSettings->nNumberType );
796  sal_uInt16 nUpperLevelOrChar = static_cast<sal_uInt16>(pLevelSettings->nParentNumbering);
797  if(aFmt.GetNumberingType() == SVX_NUM_CHAR_SPECIAL)
798  {
799  if( pLevelSettings->sBulletFont.getLength() &&
800  pLevelSettings->sBulletFont != rActBulletFont.GetFamilyName() )
801  {
802  //search for the font
803  if(!pList)
804  {
805  SfxObjectShell* pCurDocShell = SfxObjectShell::Current();
806  const SvxFontListItem* pFontListItem = static_cast<const SvxFontListItem*>( pCurDocShell->GetItem( SID_ATTR_CHAR_FONTLIST ) );
807  pList = pFontListItem ? pFontListItem->GetFontList() : nullptr;
808  }
809  if(pList && pList->IsAvailable( pLevelSettings->sBulletFont ) )
810  {
811  FontMetric aFontMetric = pList->Get(pLevelSettings->sBulletFont,WEIGHT_NORMAL, ITALIC_NONE);
812  vcl::Font aFont(aFontMetric);
813  aFmt.SetBulletFont(&aFont);
814  }
815  else
816  {
817  //if it cannot be found then create a new one
818  vcl::Font aCreateFont( pLevelSettings->sBulletFont, OUString(), Size( 0, 14 ) );
819  aCreateFont.SetCharSet( RTL_TEXTENCODING_DONTKNOW );
820  aCreateFont.SetFamily( FAMILY_DONTKNOW );
821  aCreateFont.SetPitch( PITCH_DONTKNOW );
822  aCreateFont.SetWeight( WEIGHT_DONTKNOW );
823  aCreateFont.SetTransparent( true );
824  aFmt.SetBulletFont( &aCreateFont );
825  }
826  }else
827  aFmt.SetBulletFont( &rActBulletFont );
828 
829  sal_UCS4 cChar = 0;
830  if( !pLevelSettings->sBulletChar.isEmpty() )
831  {
832  cChar
833  = pLevelSettings->sBulletChar.iterateCodePoints(&o3tl::temporary(sal_Int32(0)));
834  }
836  {
837  if( 0 == i && cChar == BulletsTypeMgr::aDynamicBulletTypes[5] )
838  cChar = BulletsTypeMgr::aDynamicRTLBulletTypes[5];
839  else if( 1 == i )
840  {
841  const SvxNumberFormat& numberFmt = aNum.GetLevel(0);
842  if( numberFmt.GetBulletChar() == BulletsTypeMgr::aDynamicRTLBulletTypes[5] )
843  cChar = BulletsTypeMgr::aDynamicRTLBulletTypes[4];
844  }
845  }
846 
847  aFmt.SetBulletChar(cChar);
848  aFmt.SetCharFormatName( GetBulletCharFmtName() );
849  if (isResetSize) aFmt.SetBulletRelSize(45);
850  }else if ((aFmt.GetNumberingType()&(~LINK_TOKEN)) == SVX_NUM_BITMAP ) {
851  if (pLevelSettings->pBrushItem) {
852  const Graphic* pGrf = pLevelSettings->pBrushItem->GetGraphic();
853  Size aSize = pLevelSettings->aSize;
854  sal_Int16 eOrient = text::VertOrientation::LINE_CENTER;
855  if (!isResetSize && aFmt.GetGraphicSize()!=Size(0,0))\
856  aSize = aFmt.GetGraphicSize();
857  else if (aSize.IsEmpty() && pGrf)
858  aSize = SvxNumberFormat::GetGraphicSizeMM100( pGrf );
859  aSize = OutputDevice::LogicToLogic(aSize, MapMode(MapUnit::Map100thMM), MapMode(GetMapUnit()));
860  aFmt.SetGraphicBrush( pLevelSettings->pBrushItem, &aSize, &eOrient );
861  }
862  } else
863  {
864  aFmt.SetIncludeUpperLevels(sal::static_int_cast< sal_uInt8 >(0 != nUpperLevelOrChar ? aNum.GetLevelCount() : 0));
865  aFmt.SetCharFormatName(GetNumCharFmtName());
866  if (isResetSize) aFmt.SetBulletRelSize(100);
867  }
868  if(pNumSettingsArr->size() > i) {
869  aFmt.SetLabelFollowedBy(pLevelSettings->eLabelFollowedBy);
870  aFmt.SetListtabPos(pLevelSettings->nTabValue);
871  aFmt.SetNumAdjust(pLevelSettings->eNumAlign);
872  aFmt.SetFirstLineIndent(pLevelSettings->nNumAlignAt);
873  aFmt.SetIndentAt(pLevelSettings->nNumIndentAt);
874  }
875  aFmt.SetPrefix(pLevelSettings->sPrefix);
876  aFmt.SetSuffix(pLevelSettings->sSuffix);
877  aNum.SetLevel(i, aFmt);
878  }
879 }
880 
881 OUString OutlineTypeMgr::GetDescription(sal_uInt16 nIndex, bool isDefault)
882 {
883  OUString sRet;
884 
885  if ( nIndex >= SAL_N_ELEMENTS(pOutlineSettingsArrs) )
886  return sRet;
887  else
888  {
889  OutlineSettings_Impl* pItemArr = pOutlineSettingsArrs[nIndex];
890  if (isDefault) pItemArr = pDefaultOutlineSettingsArrs[nIndex];
891  if ( pItemArr )
892  {
893  sRet = pItemArr->sDescription;
894  }
895  }
896  return sRet;
897 }
898 
899 bool OutlineTypeMgr::IsCustomized(sal_uInt16 nIndex)
900 {
901  bool bRet = false;
902 
903  if ( nIndex >= SAL_N_ELEMENTS(pOutlineSettingsArrs) )
904  return bRet;
905  else
906  {
907  OutlineSettings_Impl* pItemArr = pOutlineSettingsArrs[nIndex];
908  if ( pItemArr )
909  {
910  bRet = pItemArr->bIsCustomized;
911  }
912  }
913 
914  return bRet;
915 }
916 
917 
918 }
919 
920 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
void SetFamily(FontFamily)
virtual void ApplyNumRule(SvxNumRule &aNum, sal_uInt16 nIndex, sal_uInt16 mLevel, bool isDefault=false, bool isResetSize=false) override
Definition: nbdtmg.cxx:325
SvxNumType GetNumberingType() const
#define DEFAULT_BULLET_TYPES
Definition: nbdtmg.hxx:29
static const char * RID_SVXSTR_SINGLENUM_DESCRIPTIONS[]
Definition: nbdtmg.cxx:389
virtual OUString GetDescription(sal_uInt16 nIndex, bool isDefault) override
Definition: nbdtmg.cxx:881
void SetAlpha(sal_uInt8 nAlpha)
sal_UCS4 GetBulletChar() const
void ImplStore(const OUString &filename)
Definition: nbdtmg.cxx:211
virtual sal_uInt16 GetNBOIndexForNumRule(SvxNumRule &aNum, sal_uInt16 mLevel, sal_uInt16 nFromIndex=0) override
Definition: nbdtmg.cxx:633
sal_uInt32 sal_UCS4
Point LogicToLogic(const Point &rPtSource, const MapMode *pMapModeSource, const MapMode *pMapModeDest) const
MapUnit GetMapUnit() const
Definition: nbdtmg.hxx:141
#define DEFAULT_NUM_VALUSET_COUNT
Definition: nbdtmg.hxx:30
FAMILY_DONTKNOW
NumberSettingsArr_Impl maNumberSettingsArr
Definition: nbdtmg.hxx:176
static const AllSettings & GetSettings()
const sal_Unicode cBulletChar
std::vector< std::shared_ptr< NumberSettings_Impl > > NumberSettingsArr_Impl
Definition: nbdtmg.hxx:95
void SetWeight(FontWeight)
static sal_uInt16 IsSingleLevel(sal_uInt16 nCurLevel)
Definition: nbdtmg.cxx:122
NumSettings_Impl * pNumSetting
Definition: nbdtmg.hxx:87
void SetCharSet(rtl_TextEncoding)
static SfxObjectShell * Current()
#define DEFAULT_NUMBERING_CACHE_FORMAT_VERSION
Definition: nbdtmg.hxx:31
virtual void Init() override
Definition: nbdtmg.cxx:262
virtual bool IsCustomized(sal_uInt16 nIndex) override
Definition: nbdtmg.cxx:364
static Size GetGraphicSizeMM100(const Graphic *pGraphic)
bool IsAvailable(const OUString &rName) const
virtual OUString GetDescription(sal_uInt16 nIndex, bool isDefault) override
Definition: nbdtmg.cxx:538
SvxNumType
void Store(SvStream &rStream)
css::uno::Any const & rValue
sal_uInt16 sal_Unicode
static OutlineTypeMgr & GetInstance()
Definition: nbdtmg.cxx:584
virtual void Init() override
Definition: nbdtmg.cxx:589
std::vector< std::shared_ptr< NumSettings_Impl > > NumSettingsArr_Impl
Definition: nbdtmg.hxx:69
static std::unique_ptr< SvStream > CreateStream(const OUString &rFileName, StreamMode eOpenMode, css::uno::Reference< css::awt::XWindow > xParentWin=nullptr)
OUString SvxResId(const char *pId)
Definition: dialmgr.cxx:25
static vcl::Font & lcl_GetDefaultBulletFont()
SvxNumberFormat::LabelFollowedBy eLabelFollowedBy
Definition: nbdtmg.hxx:43
int nCount
FontMetric Get(const OUString &rName, const OUString &rStyleName) const
NumSettingsArr_Impl * pNumSettingsArr
Definition: nbdtmg.hxx:102
const Graphic * GetGraphic(OUString const &referer=OUString()) const
virtual void RelplaceNumRule(SvxNumRule &aNum, sal_uInt16 nIndex, sal_uInt16 mLevel) override
Definition: nbdtmg.cxx:300
virtual sal_uInt16 GetNBOIndexForNumRule(SvxNumRule &aNum, sal_uInt16 mLevel, sal_uInt16 nFromIndex=0) override
Definition: nbdtmg.cxx:441
void SetPitch(FontPitch ePitch)
const OUString & GetNumCharFmtName() const
Definition: nbdtmg.hxx:140
#define SAL_N_ELEMENTS(arr)
SVX_NUM_BITMAP
SVX_NUM_CHAR_SPECIAL
WEIGHT_DONTKNOW
const SfxPoolItem * GetItem(sal_uInt16 nSlotId) const
OUString sPrefix
bool IsEmpty() const
#define DBG_ASSERT(sCon, aError)
int i
virtual ~NumberingTypeMgr() override
Definition: nbdtmg.cxx:385
bool Append(OUString const &rTheSegment, EncodeMechanism eMechanism=EncodeMechanism::WasEncoded, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8)
const OUString & GetValue() const
WEIGHT_NORMAL
const SvxNumberFormat & GetLevel(sal_uInt16 nLevel) const
sal_uInt16 GetLevelCount() const
static bool GetLayoutRTL()
PITCH_DONTKNOW
virtual sal_uInt16 GetNBOIndexForNumRule(SvxNumRule &aNum, sal_uInt16 mLevel, sal_uInt16 nFromIndex=0) override
Definition: nbdtmg.cxx:274
SvxBrushItem * pBrushItem
Definition: nbdtmg.hxx:52
virtual void ApplyNumRule(SvxNumRule &aNum, sal_uInt16 nIndex, sal_uInt16 mLevel, bool isDefault=false, bool isResetSize=false) override
Definition: nbdtmg.cxx:770
BitmapEx GetBitmapEx(const GraphicConversionParameters &rParameters=GraphicConversionParameters()) const
ITALIC_NONE
virtual bool IsCustomized(sal_uInt16 nIndex) override
Definition: nbdtmg.cxx:899
sal_Int16 nVersion
void ImplLoad(const OUString &filename)
Definition: nbdtmg.cxx:173
static BulletsSettings * pActualBullets[DEFAULT_BULLET_TYPES]
Definition: nbdtmg.hxx:158
constexpr T & temporary(T &&x)
void SetBulletChar(sal_UCS4 cSet)
const LanguageTag & getLocale()
OUString GetMainURL(DecodeMechanism eMechanism, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8) const
NumberSettingsArr_Impl maDefaultNumberSettingsArr
Definition: nbdtmg.hxx:177
SfxItemState
OutlineSettings_Impl * pOutlineSettingsArrs[DEFAULT_NUM_VALUSET_COUNT]
Definition: nbdtmg.hxx:195
#define LINK_TOKEN
virtual void RelplaceNumRule(SvxNumRule &aNum, sal_uInt16 nIndex, sal_uInt16 mLevel) override
Definition: nbdtmg.cxx:710
void SetTransparent(bool bTransparent)
const OUString & GetBulletCharFmtName() const
Definition: nbdtmg.hxx:139
#define SVX_MAX_NUM
static BulletsTypeMgr & GetInstance()
Definition: nbdtmg.cxx:257
virtual void ApplyNumRule(SvxNumRule &aNum, sal_uInt16 nIndex, sal_uInt16 mLevel, bool isDefault=false, bool isResetSize=false) override
Definition: nbdtmg.cxx:509
MapUnit
sal_Int32 nLength
OutlineSettings_Impl * pDefaultOutlineSettingsArrs[DEFAULT_NUM_VALUSET_COUNT]
Definition: nbdtmg.hxx:196
constexpr TypedWhichId< SvxNumBulletItem > EE_PARA_NUMBULLET(EE_PARA_START+5)
virtual OUString GetDescription(sal_uInt16 nIndex, bool isDefault) override
Definition: nbdtmg.cxx:352
const FontList * GetFontList() const
virtual bool IsCustomized(sal_uInt16 nIndex) override
Definition: nbdtmg.cxx:552
void SetNumberingType(SvxNumType nSet)
const SfxPoolItem * GetItem(sal_uInt16 nWhich, bool bSearchInParent=true) const
virtual void RelplaceNumRule(SvxNumRule &aNum, sal_uInt16 nIndex, sal_uInt16 mLevel) override
Definition: nbdtmg.cxx:477
void SetLevel(sal_uInt16 nLevel, const SvxNumberFormat &rFmt, bool bIsValid=true)
static NumberingTypeMgr & GetInstance()
Definition: nbdtmg.cxx:407
virtual void Init() override
Definition: nbdtmg.cxx:412