20#include <svx/svxids.hrc>
32#include <svx/strings.hrc>
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>
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 );
76 return aDefBulletFont;
93 NumSettings_Impl* pNew =
new NumSettings_Impl;
94 for(
const PropertyValue& rValue : rLevelProps)
96 if(rValue.Name ==
"NumberingType")
99 if (rValue.Value >>= nTmp)
100 pNew->nNumberType =
static_cast<SvxNumType>(nTmp);
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")
109 if (rValue.Value >>= nTmp)
110 pNew->eNumAlign =
static_cast<SvxAdjust>(nTmp);
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;
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();
130 sal_uInt16 nLv = sal_uInt16(0xFFFF);
132 sal_uInt16 nMask = 1;
135 if(nCurLevel & nMask)
146 return sal_uInt16(0xFFFF);
166 if(eState == SfxItemState::SET)
172 if(eState == SfxItemState::SET)
189 sal_Int32 nNumIndex = 0;
193 xIStm->ReadInt32( nNumIndex );
210 xIStm->ReadInt32( nNumIndex );
232 SvxNumRule aDefNumRule( SvxNumRuleFlags::BULLET_REL_SIZE | SvxNumRuleFlags::CONTINUOUS | SvxNumRuleFlags::BULLET_COLOR,
235 xOStm->WriteInt32( nItem );
237 aDefNumRule.
Store(*xOStm);
241 xOStm->WriteInt32( nNumIndex );
259 return theBulletsTypeMgr;
271 OString
id = OString::Concat(RID_SVXSTR_BULLET_DESCRIPTION_0.mpId) + OString::number(
i);
277 if ( mLevel == sal_uInt16(0xFFFF) || mLevel == 0)
278 return sal_uInt16(0xFFFF);
283 if ( nActLv == sal_uInt16(0xFFFF) )
284 return sal_uInt16(0xFFFF);
298 return sal_uInt16(0xFFFF);
306 if ( mLevel == sal_uInt16(0xFFFF) || mLevel == 0)
314 if ( nActLv == sal_uInt16(0xFFFF) )
334 sal_uInt16 nMask = 1;
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
404 return theNumberingTypeMgr;
416 aNumberings = xDefNum->getDefaultContinuousNumberingLevels( aLocale );
418 sal_Int32
nLength = aNumberings.getLength();
424 std::shared_ptr<NumberSettings_Impl> pNumEntry = std::make_shared<NumberSettings_Impl>();
425 pNumEntry->pNumSetting = pNew;
438 if ( mLevel == sal_uInt16(0xFFFF) || mLevel > aNum.
GetLevelCount() || mLevel == 0)
439 return sal_uInt16(0xFFFF);
443 if ( nActLv == sal_uInt16(0xFFFF) )
444 return sal_uInt16(0xFFFF);
450 const OUString& sLclSuffix = aFmt.
GetSuffix();
454 for(sal_uInt16
i = nFromIndex;
i <
nCount; ++
i)
461 sLclSuffix == sLocalSuffix &&
469 return sal_uInt16(0xFFFF);
476 if ( nActLv == sal_uInt16(0xFFFF) )
513 sal_uInt16 nMask = 1;
573 return theOutlineTypeMgr;
585 aOutlineAccess = xDefNum->getDefaultOutlineNumberings( aLocale );
587 SvxNumRule aDefNumRule( SvxNumRuleFlags::BULLET_REL_SIZE | SvxNumRuleFlags::CONTINUOUS | SvxNumRuleFlags::BULLET_COLOR,
592 for(sal_Int32 nItem = 0; nItem < nSize; nItem++ )
596 OString
id = OString::Concat(RID_SVXSTR_OUTLINENUM_DESCRIPTION_0.mpId) + OString::number(nItem);
600 for(sal_Int32 nLevel = 0; nLevel <
SVX_MAX_NUM; nLevel++)
603 sal_Int32 nLocaleLevel = std::min(nLevel, xLevel->getCount() - 1);
605 if (nLocaleLevel >= 0)
606 xLevel->getByIndex(nLocaleLevel) >>= aLevelProps;
610 assert(aNumFmt.
GetNumAdjust() == SvxAdjust::Left &&
"new entry was previously defined by default, now defaults to Left");
618 pItemArr->
pNumSettingsArr->push_back(std::shared_ptr<NumSettings_Impl>(pNew));
630 for(sal_uInt16 iDex = nFromIndex; iDex <
nLength; iDex++)
632 bool bNotMatch =
false;
635 for (sal_uInt16 iLevel=0;iLevel <
nCount;iLevel++)
642 const OUString& sLclSuffix = aFmt.
GetSuffix();
653 if ( !((cChar == ccChar) &&
668 bool bIsMatch =
false;
669 if (pBrsh1==pBrsh2) bIsMatch =
true;
670 if (pBrsh1 && pBrsh2) {
673 if (pGrf1==pGrf2) bIsMatch =
true;
674 if (pGrf1 && pGrf2) {
688 sLclSuffix == _pSet->
sSuffix &&
689 eNumType == eNType &&
706 return sal_uInt16(0xFFFF);
717 for (sal_uInt16 iLevel=0;iLevel <
nCount;iLevel++)
733 OUString sChar(&cChar, 1);
785 if(pNumSettingsArr->size() >
i)
786 pLevelSettings = (*pNumSettingsArr)[
i].get();
795 sal_uInt16 nUpperLevelOrChar =
static_cast<sal_uInt16
>(pLevelSettings->
nParentNumbering);
807 pList = pFontListItem ? pFontListItem->
GetFontList() :
nullptr;
820 aCreateFont.
SetCharSet( RTL_TEXTENCODING_DONTKNOW );
855 sal_Int16 eOrient = text::VertOrientation::LINE_CENTER;
858 else if (aSize.
IsEmpty() && pGrf)
869 if(pNumSettingsArr->size() >
i) {
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()
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)
void SetNumberingType(SvxNumType nSet)
SvxNumType GetNumberingType() const
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
#define DBG_ASSERT(sCon, aError)
OUString SvxResId(TranslateId aId)
constexpr TypedWhichId< SvxNumBulletItem > EE_PARA_NUMBULLET(EE_PARA_START+5)
#define SAL_N_ELEMENTS(arr)
const LanguageTag & getLocale()
constexpr T & temporary(T &&x)
css::uno::Reference< css::linguistic2::XProofreadingIterator > get(css::uno::Reference< css::uno::XComponentContext > const &context)
#define DEFAULT_NUMBERING_CACHE_FORMAT_VERSION
#define DEFAULT_BULLET_TYPES
#define DEFAULT_NUM_VALUSET_COUNT
const sal_Unicode cBulletChar
static vcl::Font & lcl_GetDefaultBulletFont()