diff options
author | Nusaiba Al-Kindi <noseeba1@gmail.com> | 2016-01-21 15:38:03 +0400 |
---|---|---|
committer | jan iversen <jani@documentfoundation.org> | 2016-01-21 19:39:22 +0000 |
commit | 6517141b6233c5f9667031bc92f66109fddf5b76 (patch) | |
tree | 027f0d4be7dc94efdda64ffed61cbcff3b3ae269 /editeng | |
parent | 18f1eb7b0c3536817572eeb481591418a7eab3da (diff) |
tdf#42788: FORMATTING - Numbering/ordered list
I changed the default numbering alignment of the Roman(upper/ lower) numbers list to the right
instead of left with out any changes in the default alignment of other numbring type lists.
In addition, numbering alignment can be changed by the user and any new list created will not
be affected by the user choice (using the default settings for the new list).
Change-Id: I7a6b7fb31bf40e26910e90538cd336e767f4c056
Reviewed-on: https://gerrit.libreoffice.org/21439
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: jan iversen <jani@documentfoundation.org>
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 ; |