From 001feed29c881da5767dd2ae80127fb74926112e Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 6 Mar 2017 10:02:19 +0200 Subject: convert SdrTextAniKind to scoped enum Change-Id: Ie79aaf96a0d89c96c4ecd4ee8ccb0eabd3456bd0 Reviewed-on: https://gerrit.libreoffice.org/34916 Tested-by: Jenkins Reviewed-by: Noel Grandin --- sw/source/core/draw/dcontact.cxx | 4 ++-- sw/source/core/frmedt/feshview.cxx | 2 +- sw/source/filter/html/htmldrawreader.cxx | 12 ++++++------ sw/source/filter/html/htmldrawwriter.cxx | 14 +++++++------- sw/source/uibase/ribbar/conrect.cxx | 2 +- 5 files changed, 17 insertions(+), 17 deletions(-) (limited to 'sw') diff --git a/sw/source/core/draw/dcontact.cxx b/sw/source/core/draw/dcontact.cxx index c41e52aa2811..e2e67a0de425 100644 --- a/sw/source/core/draw/dcontact.cxx +++ b/sw/source/core/draw/dcontact.cxx @@ -180,8 +180,8 @@ bool IsMarqueeTextObj( const SdrObject& rObj ) SdrTextAniKind eTKind; return SdrInventor::Default == rObj.GetObjInventor() && OBJ_TEXT == rObj.GetObjIdentifier() && - ( SDRTEXTANI_SCROLL == ( eTKind = static_cast(rObj).GetTextAniKind()) - || SDRTEXTANI_ALTERNATE == eTKind || SDRTEXTANI_SLIDE == eTKind ); + ( SdrTextAniKind::Scroll == ( eTKind = static_cast(rObj).GetTextAniKind()) + || SdrTextAniKind::Alternate == eTKind || SdrTextAniKind::Slide == eTKind ); } SwContact::SwContact( SwFrameFormat *pToRegisterIn ) : diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx index 5af9a914bfa4..840c05de5a7a 100644 --- a/sw/source/core/frmedt/feshview.cxx +++ b/sw/source/core/frmedt/feshview.cxx @@ -3075,7 +3075,7 @@ long SwFEShell::GetSectionWidth( SwFormat const & rFormat ) const SfxItemSet aSet(pDrawModel->GetItemPool(), SDRATTR_MISC_FIRST, SDRATTR_MISC_LAST); aSet.Put( makeSdrTextAutoGrowWidthItem( false ) ); aSet.Put( makeSdrTextAutoGrowHeightItem( false ) ); - aSet.Put( SdrTextAniKindItem( SDRTEXTANI_SLIDE ) ); + aSet.Put( SdrTextAniKindItem( SdrTextAniKind::Slide ) ); aSet.Put( SdrTextAniDirectionItem( SdrTextAniDirection::Left ) ); aSet.Put( SdrTextAniCountItem( 1 ) ); aSet.Put( SdrTextAniAmountItem( (sal_Int16)GetWin()->PixelToLogic(Size(2,1)).Width()) ); diff --git a/sw/source/filter/html/htmldrawreader.cxx b/sw/source/filter/html/htmldrawreader.cxx index a8c21eaccd4f..e7f46822f183 100644 --- a/sw/source/filter/html/htmldrawreader.cxx +++ b/sw/source/filter/html/htmldrawreader.cxx @@ -57,9 +57,9 @@ using namespace css; static HTMLOptionEnum aHTMLMarqBehaviorTable[] = { - { OOO_STRING_SVTOOLS_HTML_BEHAV_scroll, SDRTEXTANI_SCROLL }, - { OOO_STRING_SVTOOLS_HTML_BEHAV_alternate, SDRTEXTANI_ALTERNATE }, - { OOO_STRING_SVTOOLS_HTML_BEHAV_slide, SDRTEXTANI_SLIDE }, + { OOO_STRING_SVTOOLS_HTML_BEHAV_scroll, SdrTextAniKind::Scroll }, + { OOO_STRING_SVTOOLS_HTML_BEHAV_alternate, SdrTextAniKind::Alternate }, + { OOO_STRING_SVTOOLS_HTML_BEHAV_slide, SdrTextAniKind::Slide }, { nullptr, (SdrTextAniKind)0 } }; @@ -259,7 +259,7 @@ void SwHTMLParser::NewMarquee( HTMLTable *pCurTable ) Size aSpace( 0, 0 ); sal_Int16 eVertOri = text::VertOrientation::TOP; sal_Int16 eHoriOri = text::HoriOrientation::NONE; - SdrTextAniKind eAniKind = SDRTEXTANI_SCROLL; + SdrTextAniKind eAniKind = SdrTextAniKind::Scroll; SdrTextAniDirection eAniDir = SdrTextAniDirection::Left; sal_uInt16 nCount = 0, nDelay = 60; sal_Int16 nAmount = -6; @@ -365,7 +365,7 @@ void SwHTMLParser::NewMarquee( HTMLTable *pCurTable ) InsertBookmark( aId ); // (Nur) Alternate leueft per Default von links nach rechts - if( SDRTEXTANI_ALTERNATE==eAniKind && !bDirection ) + if( SdrTextAniKind::Alternate==eAniKind && !bDirection ) eAniDir = SdrTextAniDirection::Right; // die fuer das Scrollen benoetigten Attribute umsetzen @@ -381,7 +381,7 @@ void SwHTMLParser::NewMarquee( HTMLTable *pCurTable ) aItemSet.Put( SdrTextAniCountItem( nCount ) ); aItemSet.Put( SdrTextAniDelayItem( nDelay ) ); aItemSet.Put( SdrTextAniAmountItem( nAmount ) ); - if( SDRTEXTANI_ALTERNATE==eAniKind ) + if( SdrTextAniKind::Alternate==eAniKind ) { // (Nur) Alternate startet und stoppt per default Inside aItemSet.Put( SdrTextAniStartInsideItem(true) ); diff --git a/sw/source/filter/html/htmldrawwriter.cxx b/sw/source/filter/html/htmldrawwriter.cxx index 083f6a2df31f..8bf97af0cddb 100644 --- a/sw/source/filter/html/htmldrawwriter.cxx +++ b/sw/source/filter/html/htmldrawwriter.cxx @@ -153,17 +153,17 @@ Writer& OutHTML_DrawFrameFormatAsMarquee( Writer& rWrt, // BEHAVIOUR SdrTextAniKind eAniKind = pTextObj->GetTextAniKind(); - OSL_ENSURE( SDRTEXTANI_SCROLL==eAniKind || - SDRTEXTANI_ALTERNATE==eAniKind || - SDRTEXTANI_SLIDE==eAniKind, + OSL_ENSURE( SdrTextAniKind::Scroll==eAniKind || + SdrTextAniKind::Alternate==eAniKind || + SdrTextAniKind::Slide==eAniKind, "Text-Draw-Objekt nicht fuer Marquee geeignet" ); const sal_Char *pStr = nullptr; switch( eAniKind ) { - case SDRTEXTANI_SCROLL: pStr = OOO_STRING_SVTOOLS_HTML_BEHAV_scroll; break; - case SDRTEXTANI_SLIDE: pStr = OOO_STRING_SVTOOLS_HTML_BEHAV_slide; break; - case SDRTEXTANI_ALTERNATE: pStr = OOO_STRING_SVTOOLS_HTML_BEHAV_alternate; break; + case SdrTextAniKind::Scroll: pStr = OOO_STRING_SVTOOLS_HTML_BEHAV_scroll; break; + case SdrTextAniKind::Slide: pStr = OOO_STRING_SVTOOLS_HTML_BEHAV_slide; break; + case SdrTextAniKind::Alternate: pStr = OOO_STRING_SVTOOLS_HTML_BEHAV_alternate; break; default: ; } @@ -196,7 +196,7 @@ Writer& OutHTML_DrawFrameFormatAsMarquee( Writer& rWrt, static_cast(rItemSet.Get( SDRATTR_TEXT_ANICOUNT )) .GetValue(); if( 0==nCount ) - nCount = SDRTEXTANI_SLIDE==eAniKind ? 1 : -1; + nCount = SdrTextAniKind::Slide==eAniKind ? 1 : -1; sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_loop).append("=\""). append(nCount).append("\""); diff --git a/sw/source/uibase/ribbar/conrect.cxx b/sw/source/uibase/ribbar/conrect.cxx index 39ccea5766ab..744267924c22 100644 --- a/sw/source/uibase/ribbar/conrect.cxx +++ b/sw/source/uibase/ribbar/conrect.cxx @@ -99,7 +99,7 @@ bool ConstRectangle::MouseButtonUp(const MouseEvent& rMEvt) aItemSet.Put( makeSdrTextAutoGrowWidthItem( false ) ); aItemSet.Put( makeSdrTextAutoGrowHeightItem( false ) ); - aItemSet.Put( SdrTextAniKindItem( SDRTEXTANI_SCROLL ) ); + aItemSet.Put( SdrTextAniKindItem( SdrTextAniKind::Scroll ) ); aItemSet.Put( SdrTextAniDirectionItem( SdrTextAniDirection::Left ) ); aItemSet.Put( SdrTextAniCountItem( 0 ) ); aItemSet.Put( SdrTextAniAmountItem( -- cgit