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 /sw/source/filter/ww8/ww8par2.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 'sw/source/filter/ww8/ww8par2.cxx')
-rw-r--r-- | sw/source/filter/ww8/ww8par2.cxx | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx index 7d50bddad22a..ec889ea5ce07 100644 --- a/sw/source/filter/ww8/ww8par2.cxx +++ b/sw/source/filter/ww8/ww8par2.cxx @@ -2479,7 +2479,7 @@ void WW8TabDesc::CreateSwTable() } SvxFrameDirectionItem aDirection( - m_bIsBiDi ? FRMDIR_HORI_RIGHT_TOP : FRMDIR_HORI_LEFT_TOP, RES_FRAMEDIR ); + m_bIsBiDi ? SvxFrameDirection::Horizontal_RL_TB : SvxFrameDirection::Horizontal_LR_TB, RES_FRAMEDIR ); m_pTable->GetFrameFormat()->SetFormatAttr(aDirection); if (text::HoriOrientation::LEFT_AND_WIDTH == m_eOri) @@ -3108,7 +3108,7 @@ void WW8TabDesc::SetTabShades( SwTableBox* pBox, short nWwIdx ) SvxFrameDirection MakeDirection(sal_uInt16 nCode, bool bIsBiDi) { - SvxFrameDirection eDir = FRMDIR_ENVIRONMENT; + SvxFrameDirection eDir = SvxFrameDirection::Environment; // 1: Asian layout with rotated CJK characters // 5: Asian layout // 3: Western layout rotated by 90 degrees @@ -3116,19 +3116,19 @@ SvxFrameDirection MakeDirection(sal_uInt16 nCode, bool bIsBiDi) switch (nCode) { default: - OSL_ENSURE(eDir == 4, "unknown direction code, maybe it's a bitfield"); + OSL_ENSURE(eDir == SvxFrameDirection::Environment, "unknown direction code, maybe it's a bitfield"); SAL_FALLTHROUGH; case 3: - eDir = bIsBiDi ? FRMDIR_HORI_RIGHT_TOP : FRMDIR_HORI_LEFT_TOP; // #i38158# - Consider RTL tables + eDir = bIsBiDi ? SvxFrameDirection::Horizontal_RL_TB : SvxFrameDirection::Horizontal_LR_TB; // #i38158# - Consider RTL tables break; case 5: - eDir = FRMDIR_VERT_TOP_RIGHT; + eDir = SvxFrameDirection::Vertical_RL_TB; break; case 1: - eDir = FRMDIR_VERT_TOP_RIGHT; + eDir = SvxFrameDirection::Vertical_RL_TB; break; case 4: - eDir = bIsBiDi ? FRMDIR_HORI_RIGHT_TOP : FRMDIR_HORI_LEFT_TOP; // #i38158# - Consider RTL tables + eDir = bIsBiDi ? SvxFrameDirection::Horizontal_RL_TB : SvxFrameDirection::Horizontal_LR_TB; // #i38158# - Consider RTL tables break; } return eDir; @@ -4576,7 +4576,7 @@ void WW8RStyle::Import() false)) { pIo->m_pStandardFormatColl->SetFormatAttr( - SvxFrameDirectionItem(FRMDIR_HORI_LEFT_TOP, RES_FRAMEDIR)); + SvxFrameDirectionItem(SvxFrameDirection::Horizontal_LR_TB, RES_FRAMEDIR)); } } @@ -4586,14 +4586,14 @@ void WW8RStyle::Import() rtl_TextEncoding SwWW8StyInf::GetCharSet() const { - if ((m_pFormat) && (m_pFormat->GetFrameDir().GetValue() == FRMDIR_HORI_RIGHT_TOP)) + if ((m_pFormat) && (m_pFormat->GetFrameDir().GetValue() == SvxFrameDirection::Horizontal_RL_TB)) return m_eRTLFontSrcCharSet; return m_eLTRFontSrcCharSet; } rtl_TextEncoding SwWW8StyInf::GetCJKCharSet() const { - if ((m_pFormat) && (m_pFormat->GetFrameDir().GetValue() == FRMDIR_HORI_RIGHT_TOP)) + if ((m_pFormat) && (m_pFormat->GetFrameDir().GetValue() == SvxFrameDirection::Horizontal_RL_TB)) return m_eRTLFontSrcCharSet; return m_eCJKFontSrcCharSet; } |