From 8ccbc16b5e3f94b8db105232d7085a8553e6bc03 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 14 Mar 2017 08:39:55 +0200 Subject: convert SvxFrameDirection to scoped enum Based on the casts in chart2/source/view/main/ChartView.cxx and the similarity of naming of values, I conclude that this enum was intended to abstract over css::text::WritingMode2. Added a comment to that effect. Change-Id: I3af8bbe8b6ac8c4a9375f6ccde145b98b9c69a57 Reviewed-on: https://gerrit.libreoffice.org/35164 Tested-by: Jenkins Reviewed-by: Noel Grandin --- editeng/source/items/frmitems.cxx | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) (limited to 'editeng/source/items') diff --git a/editeng/source/items/frmitems.cxx b/editeng/source/items/frmitems.cxx index 7e01d0c42418..88d319099f65 100644 --- a/editeng/source/items/frmitems.cxx +++ b/editeng/source/items/frmitems.cxx @@ -4072,7 +4072,6 @@ SfxPoolItem* SvxFrameDirectionItem::Create( SvStream & rStrm, sal_uInt16 /*nVer* return new SvxFrameDirectionItem( static_cast(nValue), Which() ); } - sal_uInt16 SvxFrameDirectionItem::GetVersion( sal_uInt16 nFVer ) const { return SOFFICE_FILEFORMAT_50 > nFVer ? USHRT_MAX : 0; @@ -4101,19 +4100,19 @@ bool SvxFrameDirectionItem::PutValue( const css::uno::Any& rVal, switch( nVal ) { case text::WritingMode2::LR_TB: - SetValue( FRMDIR_HORI_LEFT_TOP ); + SetValue( SvxFrameDirection::Horizontal_LR_TB ); break; case text::WritingMode2::RL_TB: - SetValue( FRMDIR_HORI_RIGHT_TOP ); + SetValue( SvxFrameDirection::Horizontal_RL_TB ); break; case text::WritingMode2::TB_RL: - SetValue( FRMDIR_VERT_TOP_RIGHT ); + SetValue( SvxFrameDirection::Vertical_RL_TB ); break; case text::WritingMode2::TB_LR: - SetValue( FRMDIR_VERT_TOP_LEFT ); + SetValue( SvxFrameDirection::Vertical_LR_TB ); break; case text::WritingMode2::PAGE: - SetValue( FRMDIR_ENVIRONMENT ); + SetValue( SvxFrameDirection::Environment ); break; default: bRet = false; @@ -4133,19 +4132,19 @@ bool SvxFrameDirectionItem::QueryValue( css::uno::Any& rVal, bool bRet = true; switch( GetValue() ) { - case FRMDIR_HORI_LEFT_TOP: + case SvxFrameDirection::Horizontal_LR_TB: nVal = text::WritingMode2::LR_TB; break; - case FRMDIR_HORI_RIGHT_TOP: + case SvxFrameDirection::Horizontal_RL_TB: nVal = text::WritingMode2::RL_TB; break; - case FRMDIR_VERT_TOP_RIGHT: + case SvxFrameDirection::Vertical_RL_TB: nVal = text::WritingMode2::TB_RL; break; - case FRMDIR_VERT_TOP_LEFT: + case SvxFrameDirection::Vertical_LR_TB: nVal = text::WritingMode2::TB_LR; break; - case FRMDIR_ENVIRONMENT: + case SvxFrameDirection::Environment: nVal = text::WritingMode2::PAGE; break; default: -- cgit