diff options
-rw-r--r-- | cui/source/tabpages/textanim.cxx | 20 | ||||
-rw-r--r-- | include/svx/sdtaditm.hxx | 10 | ||||
-rw-r--r-- | include/svx/svddef.hxx | 2 | ||||
-rw-r--r-- | sc/source/ui/drawfunc/futext.cxx | 4 | ||||
-rw-r--r-- | svx/source/sdr/primitive2d/sdrdecompositiontools.cxx | 2 | ||||
-rw-r--r-- | svx/source/svdraw/svdotext.cxx | 16 | ||||
-rw-r--r-- | svx/source/svdraw/svdotextdecomposition.cxx | 2 | ||||
-rw-r--r-- | svx/source/svdraw/svdotxat.cxx | 4 | ||||
-rw-r--r-- | svx/source/svdraw/svdotxed.cxx | 4 | ||||
-rw-r--r-- | sw/source/core/frmedt/feshview.cxx | 2 | ||||
-rw-r--r-- | sw/source/filter/html/htmldrawreader.cxx | 12 | ||||
-rw-r--r-- | sw/source/filter/html/htmldrawwriter.cxx | 4 | ||||
-rw-r--r-- | sw/source/uibase/ribbar/conrect.cxx | 2 |
13 files changed, 42 insertions, 42 deletions
diff --git a/cui/source/tabpages/textanim.cxx b/cui/source/tabpages/textanim.cxx index 5c9ba06dedb7..b2ffc914913a 100644 --- a/cui/source/tabpages/textanim.cxx +++ b/cui/source/tabpages/textanim.cxx @@ -618,26 +618,26 @@ IMPL_LINK_TYPED( SvxTextAnimationPage, ClickDirectionHdl_Impl, Button *, pBtn, v void SvxTextAnimationPage::SelectDirection( SdrTextAniDirection nValue ) { - m_pBtnUp->Check( nValue == SDRTEXTANI_UP ); - m_pBtnLeft->Check( nValue == SDRTEXTANI_LEFT ); - m_pBtnRight->Check( nValue == SDRTEXTANI_RIGHT ); - m_pBtnDown->Check( nValue == SDRTEXTANI_DOWN ); + m_pBtnUp->Check( nValue == SdrTextAniDirection::Up ); + m_pBtnLeft->Check( nValue == SdrTextAniDirection::Left ); + m_pBtnRight->Check( nValue == SdrTextAniDirection::Right ); + m_pBtnDown->Check( nValue == SdrTextAniDirection::Down ); } sal_uInt16 SvxTextAnimationPage::GetSelectedDirection() { - sal_uInt16 nValue = 0; + SdrTextAniDirection nValue = SdrTextAniDirection::Left; if( m_pBtnUp->IsChecked() ) - nValue = SDRTEXTANI_UP; + nValue = SdrTextAniDirection::Up; else if( m_pBtnLeft->IsChecked() ) - nValue = SDRTEXTANI_LEFT; + nValue = SdrTextAniDirection::Left; else if( m_pBtnRight->IsChecked() ) - nValue = SDRTEXTANI_RIGHT; + nValue = SdrTextAniDirection::Right; else if( m_pBtnDown->IsChecked() ) - nValue = SDRTEXTANI_DOWN; + nValue = SdrTextAniDirection::Down; - return nValue; + return (sal_uInt16)nValue; } diff --git a/include/svx/sdtaditm.hxx b/include/svx/sdtaditm.hxx index 2c05bde526c1..2481aa7daa24 100644 --- a/include/svx/sdtaditm.hxx +++ b/include/svx/sdtaditm.hxx @@ -27,14 +27,14 @@ // class SdrTextAniDirectionItem -enum SdrTextAniDirection {SDRTEXTANI_LEFT, - SDRTEXTANI_RIGHT, - SDRTEXTANI_UP, - SDRTEXTANI_DOWN}; +enum class SdrTextAniDirection +{ + Left, Right, Up, Down +}; class SVX_DLLPUBLIC SdrTextAniDirectionItem: public SfxEnumItem { public: - SdrTextAniDirectionItem(SdrTextAniDirection eDir=SDRTEXTANI_LEFT): SfxEnumItem(SDRATTR_TEXT_ANIDIRECTION,(sal_uInt16)eDir) {} + SdrTextAniDirectionItem(SdrTextAniDirection eDir=SdrTextAniDirection::Left): SfxEnumItem(SDRATTR_TEXT_ANIDIRECTION,(sal_uInt16)eDir) {} SdrTextAniDirectionItem(SvStream& rIn) : SfxEnumItem(SDRATTR_TEXT_ANIDIRECTION,rIn) {} virtual SfxPoolItem* Clone(SfxItemPool* pPool=nullptr) const override; virtual SfxPoolItem* Create(SvStream& rIn, sal_uInt16 nVer) const override; diff --git a/include/svx/svddef.hxx b/include/svx/svddef.hxx index 4a4baaf62380..0f93472cd81f 100644 --- a/include/svx/svddef.hxx +++ b/include/svx/svddef.hxx @@ -100,7 +100,7 @@ #define SDRATTR_TEXT_AUTOGROWWIDTH (SDRATTR_MISC_FIRST +12) /* 1109 */ /* 1109 */ /* 1092 sal_Bool, def=sal_False - Pool V2 */ #define SDRATTR_TEXT_HORZADJUST (SDRATTR_MISC_FIRST +13) /* 1110 */ /* 1110 */ /* 1093 enum, def=SDRTEXTHORZADJUST_LEFT */ /* Pool V2+ (04-12-1995) */ #define SDRATTR_TEXT_ANIKIND (SDRATTR_MISC_FIRST +14) /* 1111 */ /* 1111 */ /* 1094 enum, def=SDRTEXTANI_NONE - Pool V2/V4 */ -#define SDRATTR_TEXT_ANIDIRECTION (SDRATTR_MISC_FIRST +15) /* 1112 */ /* 1112 */ /* 1095 enum, def=SDRTEXTANI_LEFT - Pool V2/V4 */ +#define SDRATTR_TEXT_ANIDIRECTION (SDRATTR_MISC_FIRST +15) /* 1112 */ /* 1112 */ /* 1095 enum, def=SdrTextAniDirection::Left - Pool V2/V4 */ #define SDRATTR_TEXT_ANISTARTINSIDE (SDRATTR_MISC_FIRST +16) /* 1113 */ /* 1113 */ /* 1096 sal_Bool, def=sal_False - Pool V2/V4 */ #define SDRATTR_TEXT_ANISTOPINSIDE (SDRATTR_MISC_FIRST +17) /* 1114 */ /* 1114 */ /* 1097 sal_Bool, def=sal_False - Pool V2/V4 */ #define SDRATTR_TEXT_ANICOUNT (SDRATTR_MISC_FIRST +18) /* 1115 */ /* 1115 */ /* 1098 sal_uInt16, def=0 - Pool V2/V4 */ diff --git a/sc/source/ui/drawfunc/futext.cxx b/sc/source/ui/drawfunc/futext.cxx index 358e1d5b0574..b23fb0e60d6c 100644 --- a/sc/source/ui/drawfunc/futext.cxx +++ b/sc/source/ui/drawfunc/futext.cxx @@ -458,7 +458,7 @@ bool FuText::MouseButtonUp(const MouseEvent& rMEvt) aItemSet.Put( makeSdrTextAutoGrowWidthItem( false ) ); aItemSet.Put( makeSdrTextAutoGrowHeightItem( false ) ); aItemSet.Put( SdrTextAniKindItem( SDRTEXTANI_SLIDE ) ); - aItemSet.Put( SdrTextAniDirectionItem( SDRTEXTANI_LEFT ) ); + aItemSet.Put( SdrTextAniDirectionItem( SdrTextAniDirection::Left ) ); aItemSet.Put( SdrTextAniCountItem( 1 ) ); aItemSet.Put( SdrTextAniAmountItem( (sal_Int16)pWindow->PixelToLogic(Size(2,1)).Width()) ); @@ -762,7 +762,7 @@ SdrObject* FuText::CreateDefaultObject(const sal_uInt16 nID, const Rectangle& rR 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)pWindow->PixelToLogic(Size(2,1)).Width()) ); diff --git a/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx b/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx index 39cef1e421bc..93755067adc3 100644 --- a/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx +++ b/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx @@ -369,7 +369,7 @@ namespace drawinglayer { // get scroll direction const SdrTextAniDirection eDirection(rText.getSdrText().GetObject().GetTextAniDirection()); - const bool bHorizontal(SDRTEXTANI_LEFT == eDirection || SDRTEXTANI_RIGHT == eDirection); + const bool bHorizontal(SdrTextAniDirection::Left == eDirection || SdrTextAniDirection::Right == eDirection); // decompose to get separated values for the scroll box basegfx::B2DVector aScale, aTranslate; diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx index 54dda65b2f49..8bf65851dacf 100644 --- a/svx/source/svdraw/svdotext.cxx +++ b/svx/source/svdraw/svdotext.cxx @@ -296,7 +296,7 @@ bool SdrTextObj::IsAutoGrowHeight() const { SdrTextAniDirection eDirection = static_cast<const SdrTextAniDirectionItem&>(rSet.Get(SDRATTR_TEXT_ANIDIRECTION)).GetValue(); - if(eDirection == SDRTEXTANI_UP || eDirection == SDRTEXTANI_DOWN) + if(eDirection == SdrTextAniDirection::Up || eDirection == SdrTextAniDirection::Down) { bRet = false; } @@ -323,7 +323,7 @@ bool SdrTextObj::IsAutoGrowWidth() const { SdrTextAniDirection eDirection = static_cast<const SdrTextAniDirectionItem&>(rSet.Get(SDRATTR_TEXT_ANIDIRECTION)).GetValue(); - if(eDirection == SDRTEXTANI_LEFT || eDirection == SDRTEXTANI_RIGHT) + if(eDirection == SdrTextAniDirection::Left || eDirection == SdrTextAniDirection::Right) { bRet = false; } @@ -354,7 +354,7 @@ SdrTextHorzAdjust SdrTextObj::GetTextHorizontalAdjust(const SfxItemSet& rSet) co { SdrTextAniDirection eDirection = static_cast<const SdrTextAniDirectionItem&>(rSet.Get(SDRATTR_TEXT_ANIDIRECTION)).GetValue(); - if(eDirection == SDRTEXTANI_LEFT || eDirection == SDRTEXTANI_RIGHT) + if(eDirection == SdrTextAniDirection::Left || eDirection == SdrTextAniDirection::Right) { eRet = SDRTEXTHORZADJUST_LEFT; } @@ -387,7 +387,7 @@ SdrTextVertAdjust SdrTextObj::GetTextVerticalAdjust(const SfxItemSet& rSet) cons { SdrTextAniDirection eDirection = static_cast<const SdrTextAniDirectionItem&>(rSet.Get(SDRATTR_TEXT_ANIDIRECTION)).GetValue(); - if(eDirection == SDRTEXTANI_LEFT || eDirection == SDRTEXTANI_RIGHT) + if(eDirection == SdrTextAniDirection::Left || eDirection == SdrTextAniDirection::Right) { eRet = SDRTEXTVERTADJUST_TOP; } @@ -721,8 +721,8 @@ void SdrTextObj::TakeTextRect( SdrOutliner& rOutliner, Rectangle& rTextRect, boo if (!bInEditMode && (eAniKind==SDRTEXTANI_SCROLL || eAniKind==SDRTEXTANI_ALTERNATE || eAniKind==SDRTEXTANI_SLIDE)) { // unlimited paper size for ticker text - if (eAniDirection==SDRTEXTANI_LEFT || eAniDirection==SDRTEXTANI_RIGHT) nWdt=1000000; - if (eAniDirection==SDRTEXTANI_UP || eAniDirection==SDRTEXTANI_DOWN) nHgt=1000000; + if (eAniDirection==SdrTextAniDirection::Left || eAniDirection==SdrTextAniDirection::Right) nWdt=1000000; + if (eAniDirection==SdrTextAniDirection::Up || eAniDirection==SdrTextAniDirection::Down) nHgt=1000000; } bool bChainedFrame = IsChainable(); @@ -1877,13 +1877,13 @@ GDIMetaFile* SdrTextObj::GetTextScrollMetaFileAndRectangle( const SfxItemSet& rSet = GetObjectItemSet(); SdrTextAniDirection eDirection = static_cast<const SdrTextAniDirectionItem&>(rSet.Get(SDRATTR_TEXT_ANIDIRECTION)).GetValue(); - if(SDRTEXTANI_LEFT == eDirection || SDRTEXTANI_RIGHT == eDirection) + if(SdrTextAniDirection::Left == eDirection || SdrTextAniDirection::Right == eDirection) { aScrollFrameRect.Left() = aAnchorRect.Left(); aScrollFrameRect.Right() = aAnchorRect.Right(); } - if(SDRTEXTANI_UP == eDirection || SDRTEXTANI_DOWN == eDirection) + if(SdrTextAniDirection::Up == eDirection || SdrTextAniDirection::Down == eDirection) { aScrollFrameRect.Top() = aAnchorRect.Top(); aScrollFrameRect.Bottom() = aAnchorRect.Bottom(); diff --git a/svx/source/svdraw/svdotextdecomposition.cxx b/svx/source/svdraw/svdotextdecomposition.cxx index 8a6a74182d9e..ff941a738fda 100644 --- a/svx/source/svdraw/svdotextdecomposition.cxx +++ b/svx/source/svdraw/svdotextdecomposition.cxx @@ -1368,7 +1368,7 @@ void SdrTextObj::impGetScrollTextTiming(drawinglayer::animation::AnimationEntryL double fAnimationDelay((double)static_cast<const SdrTextAniDelayItem&>(rSet.Get(SDRATTR_TEXT_ANIDELAY)).GetValue()); double fSingleStepWidth((double)static_cast<const SdrTextAniAmountItem&>(rSet.Get(SDRATTR_TEXT_ANIAMOUNT)).GetValue()); const SdrTextAniDirection eDirection(GetTextAniDirection()); - const bool bForward(SDRTEXTANI_RIGHT == eDirection || SDRTEXTANI_DOWN == eDirection); + const bool bForward(SdrTextAniDirection::Right == eDirection || SdrTextAniDirection::Down == eDirection); if(basegfx::fTools::equalZero(fAnimationDelay)) { diff --git a/svx/source/svdraw/svdotxat.cxx b/svx/source/svdraw/svdotxat.cxx index 653e8436e64b..170a2677e62c 100644 --- a/svx/source/svdraw/svdotxat.cxx +++ b/svx/source/svdraw/svdotxat.cxx @@ -85,8 +85,8 @@ bool SdrTextObj::AdjustTextFrameWidthAndHeight( Rectangle& rR, bool bHgt, bool b SdrTextAniDirection eAniDir = GetTextAniDirection(); bool bScroll = eAniKind == SDRTEXTANI_SCROLL || eAniKind == SDRTEXTANI_ALTERNATE || eAniKind == SDRTEXTANI_SLIDE; - bool bHScroll = bScroll && (eAniDir == SDRTEXTANI_LEFT || eAniDir == SDRTEXTANI_RIGHT); - bool bVScroll = bScroll && (eAniDir == SDRTEXTANI_UP || eAniDir == SDRTEXTANI_DOWN); + bool bHScroll = bScroll && (eAniDir == SdrTextAniDirection::Left || eAniDir == SdrTextAniDirection::Right); + bool bVScroll = bScroll && (eAniDir == SdrTextAniDirection::Up || eAniDir == SdrTextAniDirection::Down); Rectangle aOldRect = rR; long nHgt = 0, nMinHgt = 0, nMaxHgt = 0; diff --git a/svx/source/svdraw/svdotxed.cxx b/svx/source/svdraw/svdotxed.cxx index 824f1057836a..b656fa7d7704 100644 --- a/svx/source/svdraw/svdotxed.cxx +++ b/svx/source/svdraw/svdotxed.cxx @@ -201,8 +201,8 @@ void SdrTextObj::TakeTextEditArea(Size* pPaperMin, Size* pPaperMax, Rectangle* p if (!bInEditMode && (eAniKind==SDRTEXTANI_SCROLL || eAniKind==SDRTEXTANI_ALTERNATE || eAniKind==SDRTEXTANI_SLIDE)) { // ticker text uses an unlimited paper size - if (eAniDirection==SDRTEXTANI_LEFT || eAniDirection==SDRTEXTANI_RIGHT) nMaxWdt=1000000; - if (eAniDirection==SDRTEXTANI_UP || eAniDirection==SDRTEXTANI_DOWN) nMaxHgt=1000000; + if (eAniDirection==SdrTextAniDirection::Left || eAniDirection==SdrTextAniDirection::Right) nMaxWdt=1000000; + if (eAniDirection==SdrTextAniDirection::Up || eAniDirection==SdrTextAniDirection::Down) nMaxHgt=1000000; } bool bChainedFrame = IsChainable(); 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()) ); |