From 02329af0cbd25f5901be2ec938984968080d17f5 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 23 Aug 2016 13:18:25 +0200 Subject: convert SdrTextAniDirection to scoped enum Change-Id: I67d1ffb1169e9faf4df90dd70a5496aa485979cf --- sw/source/core/frmedt/feshview.cxx | 2 +- sw/source/filter/html/htmldrawreader.cxx | 12 ++++++------ sw/source/filter/html/htmldrawwriter.cxx | 4 ++-- sw/source/uibase/ribbar/conrect.cxx | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) (limited to 'sw') diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx index cc66fb9ea1d7..7d4b170b7637 100644 --- a/sw/source/core/frmedt/feshview.cxx +++ b/sw/source/core/frmedt/feshview.cxx @@ -2890,7 +2890,7 @@ long SwFEShell::GetSectionWidth( SwFormat const & rFormat ) const aSet.Put( makeSdrTextAutoGrowWidthItem( false ) ); aSet.Put( makeSdrTextAutoGrowHeightItem( false ) ); aSet.Put( SdrTextAniKindItem( SDRTEXTANI_SLIDE ) ); - aSet.Put( SdrTextAniDirectionItem( SDRTEXTANI_LEFT ) ); + aSet.Put( SdrTextAniDirectionItem( SdrTextAniDirection::Left ) ); aSet.Put( SdrTextAniCountItem( 1 ) ); aSet.Put( SdrTextAniAmountItem( (sal_Int16)GetWin()->PixelToLogic(Size(2,1)).Width()) ); pObj->SetMergedItemSetAndBroadcast(aSet); diff --git a/sw/source/filter/html/htmldrawreader.cxx b/sw/source/filter/html/htmldrawreader.cxx index 22c650016267..aadcb2f17500 100644 --- a/sw/source/filter/html/htmldrawreader.cxx +++ b/sw/source/filter/html/htmldrawreader.cxx @@ -65,9 +65,9 @@ static HTMLOptionEnum aHTMLMarqBehaviorTable[] = static HTMLOptionEnum aHTMLMarqDirectionTable[] = { - { OOO_STRING_SVTOOLS_HTML_AL_left, SDRTEXTANI_LEFT }, - { OOO_STRING_SVTOOLS_HTML_AL_right, SDRTEXTANI_RIGHT }, - { nullptr, 0 } + { OOO_STRING_SVTOOLS_HTML_AL_left, (sal_uInt16)SdrTextAniDirection::Left }, + { OOO_STRING_SVTOOLS_HTML_AL_right, (sal_uInt16)SdrTextAniDirection::Right }, + { nullptr, 0 } }; void SwHTMLParser::InsertDrawObject( SdrObject* pNewDrawObj, @@ -260,7 +260,7 @@ void SwHTMLParser::NewMarquee( HTMLTable *pCurTable ) sal_Int16 eVertOri = text::VertOrientation::TOP; sal_Int16 eHoriOri = text::HoriOrientation::NONE; SdrTextAniKind eAniKind = SDRTEXTANI_SCROLL; - SdrTextAniDirection eAniDir = SDRTEXTANI_LEFT; + SdrTextAniDirection eAniDir = SdrTextAniDirection::Left; sal_uInt16 nCount = 0, nDelay = 60; sal_Int16 nAmount = -6; Color aBGColor; @@ -370,7 +370,7 @@ void SwHTMLParser::NewMarquee( HTMLTable *pCurTable ) // (Nur) Alternate leueft per Default von links nach rechts if( SDRTEXTANI_ALTERNATE==eAniKind && !bDirection ) - eAniDir = SDRTEXTANI_RIGHT; + eAniDir = SdrTextAniDirection::Right; // die fuer das Scrollen benoetigten Attribute umsetzen sal_uInt16 aWhichMap[7] = { XATTR_FILL_FIRST, XATTR_FILL_LAST, @@ -390,7 +390,7 @@ void SwHTMLParser::NewMarquee( HTMLTable *pCurTable ) // (Nur) Alternate startet und stoppt per default Inside aItemSet.Put( SdrTextAniStartInsideItem(true) ); aItemSet.Put( SdrTextAniStopInsideItem(true) ); - if( SDRTEXTANI_LEFT==eAniDir ) + if( SdrTextAniDirection::Left==eAniDir ) aItemSet.Put( SdrTextHorzAdjustItem(SDRTEXTHORZADJUST_RIGHT) ); } diff --git a/sw/source/filter/html/htmldrawwriter.cxx b/sw/source/filter/html/htmldrawwriter.cxx index 3685ea104558..a134f085c64a 100644 --- a/sw/source/filter/html/htmldrawwriter.cxx +++ b/sw/source/filter/html/htmldrawwriter.cxx @@ -179,8 +179,8 @@ Writer& OutHTML_DrawFrameFormatAsMarquee( Writer& rWrt, SdrTextAniDirection eAniDir = pTextObj->GetTextAniDirection(); switch( eAniDir ) { - case SDRTEXTANI_LEFT: pStr = OOO_STRING_SVTOOLS_HTML_AL_left; break; - case SDRTEXTANI_RIGHT: pStr = OOO_STRING_SVTOOLS_HTML_AL_right; break; + case SdrTextAniDirection::Left: pStr = OOO_STRING_SVTOOLS_HTML_AL_left; break; + case SdrTextAniDirection::Right: pStr = OOO_STRING_SVTOOLS_HTML_AL_right; break; default: ; } diff --git a/sw/source/uibase/ribbar/conrect.cxx b/sw/source/uibase/ribbar/conrect.cxx index 8394299cf9f6..9966394a04d8 100644 --- a/sw/source/uibase/ribbar/conrect.cxx +++ b/sw/source/uibase/ribbar/conrect.cxx @@ -87,7 +87,7 @@ bool ConstRectangle::MouseButtonUp(const MouseEvent& rMEvt) aItemSet.Put( makeSdrTextAutoGrowWidthItem( false ) ); aItemSet.Put( makeSdrTextAutoGrowHeightItem( false ) ); aItemSet.Put( SdrTextAniKindItem( SDRTEXTANI_SCROLL ) ); - aItemSet.Put( SdrTextAniDirectionItem( SDRTEXTANI_LEFT ) ); + aItemSet.Put( SdrTextAniDirectionItem( SdrTextAniDirection::Left ) ); aItemSet.Put( SdrTextAniCountItem( 0 ) ); aItemSet.Put( SdrTextAniAmountItem( (sal_Int16)m_pWin->PixelToLogic(Size(2,1)).Width()) ); -- cgit