diff options
-rw-r--r-- | editeng/source/items/numitem.cxx | 25 | ||||
-rw-r--r-- | include/editeng/numitem.hxx | 8 |
2 files changed, 4 insertions, 29 deletions
diff --git a/editeng/source/items/numitem.cxx b/editeng/source/items/numitem.cxx index 2f2a80a31a55..3c3fa19d71a7 100644 --- a/editeng/source/items/numitem.cxx +++ b/editeng/source/items/numitem.cxx @@ -151,7 +151,6 @@ SvxNumberFormat::SvxNumberFormat( sal_Int16 eType, SvxNumPositionAndSpaceMode ePositionAndSpaceMode ) : SvxNumberType(eType), eNumAdjust(SVX_ADJUST_LEFT), - mbNumAdjustChanged(false), nInclUpperLevels(0), nStart(1), cBullet(SVX_DEF_BULLET), @@ -181,8 +180,7 @@ SvxNumberFormat::SvxNumberFormat(const SvxNumberFormat& rFormat) : } SvxNumberFormat::SvxNumberFormat( SvStream &rStream ) - : mbNumAdjustChanged(false) - , nStart(0) + : nStart(0) , nBulletRelSize(100) , nFirstLineOffset(0) , nAbsLSpace(0) @@ -245,26 +243,6 @@ SvxNumberFormat::~SvxNumberFormat() delete pBulletFont; } -void SvxNumberFormat::SetNumberingType(sal_Int16 nSet) -{ - if(!mbNumAdjustChanged) - { - // Right align Roman numbers, tdf#42788 - if(nSet == SVX_NUM_ROMAN_UPPER || nSet == SVX_NUM_ROMAN_LOWER) - eNumAdjust = SVX_ADJUST_RIGHT; - else if (eNumAdjust == SVX_ADJUST_RIGHT && (GetNumberingType() == SVX_NUM_ROMAN_UPPER || GetNumberingType() == SVX_NUM_ROMAN_LOWER)) - eNumAdjust = SVX_ADJUST_LEFT; - } - - SvxNumberType::SetNumberingType(nSet); -} - -void SvxNumberFormat::SetNumAdjust(SvxAdjust eSet) -{ - eNumAdjust = eSet; - mbNumAdjustChanged = true; -} - void SvxNumberFormat::Store(SvStream &rStream, FontToSubsFontConverter pConverter) { if(pConverter && pBulletFont) @@ -338,7 +316,6 @@ SvxNumberFormat& SvxNumberFormat::operator=( const SvxNumberFormat& rFormat ) SvxNumberType::SetNumberingType(rFormat.GetNumberingType()); eNumAdjust = rFormat.eNumAdjust ; - mbNumAdjustChanged = rFormat.mbNumAdjustChanged; nInclUpperLevels = rFormat.nInclUpperLevels ; nStart = rFormat.nStart ; cBullet = rFormat.cBullet ; diff --git a/include/editeng/numitem.hxx b/include/editeng/numitem.hxx index 775e8f1130f9..e4ccbead33c8 100644 --- a/include/editeng/numitem.hxx +++ b/include/editeng/numitem.hxx @@ -60,12 +60,12 @@ class EDITENG_DLLPUBLIC SvxNumberType public: explicit SvxNumberType(sal_Int16 nType = css::style::NumberingType::ARABIC); SvxNumberType(const SvxNumberType& rType); - virtual ~SvxNumberType(); + ~SvxNumberType(); OUString GetNumStr( sal_uLong nNo ) const; OUString GetNumStr( sal_uLong nNo, const css::lang::Locale& rLocale ) const; - virtual void SetNumberingType(sal_Int16 nSet) {nNumType = nSet;} + void SetNumberingType(sal_Int16 nSet) {nNumType = nSet;} sal_Int16 GetNumberingType() const {return nNumType;} void SetShowSymbol(bool bSet) {bShowSymbol = bSet;} @@ -99,7 +99,6 @@ private: OUString sSuffix; SvxAdjust eNumAdjust; - bool mbNumAdjustChanged; sal_uInt8 nInclUpperLevels; // Take over numbers from the previous level. sal_uInt16 nStart; // Start of counting @@ -155,8 +154,7 @@ public: bool operator==( const SvxNumberFormat& ) const; bool operator!=( const SvxNumberFormat& rFmt) const {return !(*this == rFmt);} - void SetNumberingType(sal_Int16 nSet) override; - void SetNumAdjust(SvxAdjust eSet); + void SetNumAdjust(SvxAdjust eSet) {eNumAdjust = eSet;} SvxAdjust GetNumAdjust() const {return eNumAdjust;} void SetPrefix(const OUString& rSet) { sPrefix = rSet;} const OUString& GetPrefix() const { return sPrefix;} |