diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-03-14 08:39:55 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-03-15 08:35:10 +0000 |
commit | 8ccbc16b5e3f94b8db105232d7085a8553e6bc03 (patch) | |
tree | 85b8affc4e3916a21c6b303c90dc0f080d464bbf /editeng/source/items/frmitems.cxx | |
parent | 7fafd1aea08ad036ef48f415db5df93df218bf6e (diff) |
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 <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'editeng/source/items/frmitems.cxx')
-rw-r--r-- | editeng/source/items/frmitems.cxx | 21 |
1 files changed, 10 insertions, 11 deletions
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<SvxFrameDirection>(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: |