diff options
author | Noel Grandin <noel@peralex.com> | 2016-08-16 13:39:18 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2016-08-17 08:45:15 +0200 |
commit | 430b93f7f3c9f5aeb89db634447cb554acd125aa (patch) | |
tree | a38e466a9f8cacfe753ac7373016ce01191bbfa9 /editeng/source/items | |
parent | 49561be0fd2041fc9d32c4ac1ab1063f620a4e08 (diff) |
convert SvxEscapement to scoped enum
and fix a potential bug with footnotes and superscripts in writer in
ndtxt.cxx, where it was passing bad args to the SvxEscapementItem
constructor
Change-Id: I0d2de34c056e7824f3b456a86d502e10ac93a1c1
Diffstat (limited to 'editeng/source/items')
-rw-r--r-- | editeng/source/items/textitem.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/editeng/source/items/textitem.cxx b/editeng/source/items/textitem.cxx index c6ab046ddc8b..e76b527d0469 100644 --- a/editeng/source/items/textitem.cxx +++ b/editeng/source/items/textitem.cxx @@ -2238,7 +2238,7 @@ SfxPoolItem* SvxEscapementItem::Create(SvStream& rStrm, sal_uInt16) const sal_uInt16 SvxEscapementItem::GetValueCount() const { - return SVX_ESCAPEMENT_END; // SVX_ESCAPEMENT_SUBSCRIPT + 1 + return (sal_uInt16)SvxEscapement::End; // SvxEscapement::Subscript + 1 } @@ -2265,7 +2265,7 @@ bool SvxEscapementItem::GetPresentation OUString SvxEscapementItem::GetValueTextByPos( sal_uInt16 nPos ) const { - DBG_ASSERT( nPos < (sal_uInt16)SVX_ESCAPEMENT_END, "enum overflow!" ); + DBG_ASSERT( nPos < (sal_uInt16)SvxEscapement::End, "enum overflow!" ); return EE_RESSTR(RID_SVXITEMS_ESCAPEMENT_BEGIN + nPos); } @@ -2273,10 +2273,10 @@ OUString SvxEscapementItem::GetValueTextByPos( sal_uInt16 nPos ) const sal_uInt16 SvxEscapementItem::GetEnumValue() const { if ( nEsc < 0 ) - return SVX_ESCAPEMENT_SUBSCRIPT; + return (sal_uInt16)SvxEscapement::Subscript; else if ( nEsc > 0 ) - return SVX_ESCAPEMENT_SUPERSCRIPT; - return SVX_ESCAPEMENT_OFF; + return (sal_uInt16)SvxEscapement::Superscript; + return (sal_uInt16)SvxEscapement::Off; } |