summaryrefslogtreecommitdiff
path: root/sw/source/filter/ww8/ww8atr.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-03-14 08:39:55 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-03-15 08:35:10 +0000
commit8ccbc16b5e3f94b8db105232d7085a8553e6bc03 (patch)
tree85b8affc4e3916a21c6b303c90dc0f080d464bbf /sw/source/filter/ww8/ww8atr.cxx
parent7fafd1aea08ad036ef48f415db5df93df218bf6e (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/ww8atr.cxx')
-rw-r--r--sw/source/filter/ww8/ww8atr.cxx26
1 files changed, 13 insertions, 13 deletions
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index e463164a4077..1f4c3e255edc 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -4196,7 +4196,7 @@ void AttributeOutputBase::FormatColumns( const SwFormatCol& rCol )
const SwFrameFormat* pFormat = GetExport( ).m_pAktPageDesc ? &GetExport( ).m_pAktPageDesc->GetMaster() : &const_cast<const SwDoc *>(GetExport( ).m_pDoc)->GetPageDesc(0).GetMaster();
const SvxFrameDirectionItem &frameDirection = pFormat->GetFrameDir();
SwTwips nPageSize;
- if ( frameDirection.GetValue() == FRMDIR_VERT_TOP_RIGHT || frameDirection.GetValue() == FRMDIR_VERT_TOP_LEFT )
+ if ( frameDirection.GetValue() == SvxFrameDirection::Vertical_RL_TB || frameDirection.GetValue() == SvxFrameDirection::Vertical_LR_TB )
{
const SvxULSpaceItem &rUL = pFormat->GetULSpace();
nPageSize = pFormat->GetFrameSize().GetHeight();
@@ -4381,7 +4381,7 @@ void WW8AttributeOutput::ParaAdjust( const SvxAdjustItem& rAdjust )
bool bBiDiSwap = false;
if ( m_rWW8Export.m_pOutFormatNode )
{
- short nDirection = FRMDIR_HORI_LEFT_TOP;
+ SvxFrameDirection nDirection = SvxFrameDirection::Horizontal_LR_TB;
if ( dynamic_cast< const SwTextNode *>( m_rWW8Export.m_pOutFormatNode ) != nullptr )
{
SwPosition aPos(*static_cast<const SwContentNode*>(m_rWW8Export.m_pOutFormatNode));
@@ -4395,8 +4395,8 @@ void WW8AttributeOutput::ParaAdjust( const SvxAdjustItem& rAdjust )
ItemGet<SvxFrameDirectionItem>(*pC, RES_FRAMEDIR);
nDirection = rItem.GetValue();
}
- if ( ( nDirection == FRMDIR_HORI_RIGHT_TOP ) ||
- ( nDirection == FRMDIR_ENVIRONMENT && AllSettings::GetLayoutRTL() ) )
+ if ( ( nDirection == SvxFrameDirection::Horizontal_RL_TB ) ||
+ ( nDirection == SvxFrameDirection::Environment && AllSettings::GetLayoutRTL() ) )
{
bBiDiSwap = true;
}
@@ -4413,9 +4413,9 @@ void WW8AttributeOutput::FormatFrameDirection( const SvxFrameDirectionItem& rDir
{
sal_uInt16 nTextFlow=0;
bool bBiDi = false;
- short nDir = rDirection.GetValue();
+ SvxFrameDirection nDir = rDirection.GetValue();
- if ( nDir == FRMDIR_ENVIRONMENT )
+ if ( nDir == SvxFrameDirection::Environment )
{
if ( m_rWW8Export.m_bOutPageDescs )
nDir = m_rWW8Export.GetCurrentPageDirection();
@@ -4434,11 +4434,11 @@ void WW8AttributeOutput::FormatFrameDirection( const SvxFrameDirectionItem& rDir
nDir = m_rWW8Export.m_pDoc->GetTextDirection( aPos );
}
else if ( dynamic_cast< const SwTextFormatColl *>( m_rWW8Export.m_pOutFormatNode ) != nullptr )
- nDir = FRMDIR_HORI_LEFT_TOP; //what else can we do :-(
+ nDir = SvxFrameDirection::Horizontal_LR_TB; //what else can we do :-(
}
- if ( nDir == FRMDIR_ENVIRONMENT )
- nDir = FRMDIR_HORI_LEFT_TOP; //Set something
+ if ( nDir == SvxFrameDirection::Environment )
+ nDir = SvxFrameDirection::Horizontal_LR_TB; //Set something
}
switch ( nDir )
@@ -4447,15 +4447,15 @@ void WW8AttributeOutput::FormatFrameDirection( const SvxFrameDirectionItem& rDir
//Can't get an unknown type here
OSL_FAIL("Unknown frame direction");
SAL_FALLTHROUGH;
- case FRMDIR_HORI_LEFT_TOP:
+ case SvxFrameDirection::Horizontal_LR_TB:
nTextFlow = 0;
break;
- case FRMDIR_HORI_RIGHT_TOP:
+ case SvxFrameDirection::Horizontal_RL_TB:
nTextFlow = 0;
bBiDi = true;
break;
- case FRMDIR_VERT_TOP_LEFT: //word doesn't have this
- case FRMDIR_VERT_TOP_RIGHT:
+ case SvxFrameDirection::Vertical_LR_TB: //word doesn't have this
+ case SvxFrameDirection::Vertical_RL_TB:
nTextFlow = 1;
break;
}