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