diff options
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/source/items/numitem.cxx | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/editeng/source/items/numitem.cxx b/editeng/source/items/numitem.cxx index b6247b4b4d3a..23ca941f49eb 100644 --- a/editeng/source/items/numitem.cxx +++ b/editeng/source/items/numitem.cxx @@ -151,6 +151,7 @@ SvxNumberFormat::SvxNumberFormat( sal_Int16 eType, SvxNumPositionAndSpaceMode ePositionAndSpaceMode ) : SvxNumberType(eType), eNumAdjust(SVX_ADJUST_LEFT), + mbNumAdjustChanged(false), nInclUpperLevels(0), nStart(1), cBullet(SVX_DEF_BULLET), @@ -243,6 +244,25 @@ SvxNumberFormat::~SvxNumberFormat() delete pBulletFont; } +void SvxNumberFormat::SetNumberingType(sal_Int16 nSet) +{ + if(!mbNumAdjustChanged) + {//Romain numbers alignment to right, issue-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) @@ -316,6 +336,7 @@ SvxNumberFormat& SvxNumberFormat::operator=( const SvxNumberFormat& rFormat ) SetNumberingType(rFormat.GetNumberingType()); eNumAdjust = rFormat.eNumAdjust ; + mbNumAdjustChanged = rFormat.mbNumAdjustChanged; nInclUpperLevels = rFormat.nInclUpperLevels ; nStart = rFormat.nStart ; cBullet = rFormat.cBullet ; |