summaryrefslogtreecommitdiff
path: root/forms
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 /forms
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 'forms')
-rw-r--r--forms/source/richtext/rtattributehandler.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/forms/source/richtext/rtattributehandler.cxx b/forms/source/richtext/rtattributehandler.cxx
index baedb907cf65..39f2948d48bf 100644
--- a/forms/source/richtext/rtattributehandler.cxx
+++ b/forms/source/richtext/rtattributehandler.cxx
@@ -375,14 +375,14 @@ namespace frm
ParagraphDirectionHandler::ParagraphDirectionHandler( AttributeId _nAttributeId )
:AttributeHandler( _nAttributeId, EE_PARA_WRITINGDIR )
- ,m_eParagraphDirection( FRMDIR_HORI_LEFT_TOP )
+ ,m_eParagraphDirection( SvxFrameDirection::Horizontal_LR_TB )
,m_eDefaultAdjustment( SvxAdjust::Right )
,m_eOppositeDefaultAdjustment( SvxAdjust::Left )
{
switch ( getAttributeId() )
{
- case SID_ATTR_PARA_LEFT_TO_RIGHT: m_eParagraphDirection = FRMDIR_HORI_LEFT_TOP; m_eDefaultAdjustment = SvxAdjust::Left; break;
- case SID_ATTR_PARA_RIGHT_TO_LEFT: m_eParagraphDirection = FRMDIR_HORI_RIGHT_TOP; m_eDefaultAdjustment = SvxAdjust::Right; break;
+ case SID_ATTR_PARA_LEFT_TO_RIGHT: m_eParagraphDirection = SvxFrameDirection::Horizontal_LR_TB; m_eDefaultAdjustment = SvxAdjust::Left; break;
+ case SID_ATTR_PARA_RIGHT_TO_LEFT: m_eParagraphDirection = SvxFrameDirection::Horizontal_RL_TB; m_eDefaultAdjustment = SvxAdjust::Right; break;
default:
OSL_FAIL( "ParagraphDirectionHandler::ParagraphDirectionHandler: invalid attribute id!" );
}
@@ -397,7 +397,7 @@ namespace frm
AttributeCheckState ParagraphDirectionHandler::implGetCheckState( const SfxPoolItem& _rItem ) const
{
OSL_ENSURE( dynamic_cast<const SvxFrameDirectionItem*>( &_rItem) != nullptr, "ParagraphDirectionHandler::implGetCheckState: invalid pool item!" );
- SvxFrameDirection eDirection = static_cast< SvxFrameDirection >( static_cast< const SvxFrameDirectionItem& >( _rItem ).GetValue() );
+ SvxFrameDirection eDirection = static_cast< const SvxFrameDirectionItem& >( _rItem ).GetValue();
return ( eDirection == m_eParagraphDirection ) ? eChecked : eUnchecked;
}