summaryrefslogtreecommitdiff
path: root/sw
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
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')
-rw-r--r--sw/inc/crsrsh.hxx2
-rw-r--r--sw/inc/doc.hxx2
-rw-r--r--sw/inc/node.hxx2
-rw-r--r--sw/source/core/bastyp/init.cxx2
-rw-r--r--sw/source/core/crsr/crsrsh.cxx12
-rw-r--r--sw/source/core/doc/DocumentStylePoolManager.cxx2
-rw-r--r--sw/source/core/doc/docdesc.cxx2
-rw-r--r--sw/source/core/doc/docdraw.cxx17
-rw-r--r--sw/source/core/doc/doclay.cxx12
-rw-r--r--sw/source/core/doc/poolfmt.cxx4
-rw-r--r--sw/source/core/doc/tblafmt.cxx2
-rw-r--r--sw/source/core/docnode/node.cxx12
-rw-r--r--sw/source/core/frmedt/fetab.cxx13
-rw-r--r--sw/source/core/inc/frame.hxx3
-rw-r--r--sw/source/core/layout/fly.cxx10
-rw-r--r--sw/source/core/layout/pagechg.cxx10
-rw-r--r--sw/source/core/layout/pagedesc.cxx4
-rw-r--r--sw/source/core/layout/wsfrm.cxx14
-rw-r--r--sw/source/core/unocore/unoframe.cxx2
-rw-r--r--sw/source/core/unocore/unosect.cxx4
-rw-r--r--sw/source/core/unocore/unotbl.cxx4
-rw-r--r--sw/source/filter/html/css1atr.cxx13
-rw-r--r--sw/source/filter/html/htmlatr.cxx2
-rw-r--r--sw/source/filter/html/htmlcss1.cxx10
-rw-r--r--sw/source/filter/html/htmlflywriter.cxx4
-rw-r--r--sw/source/filter/html/htmltabw.cxx2
-rw-r--r--sw/source/filter/html/svxcss1.cxx6
-rw-r--r--sw/source/filter/html/wrthtml.cxx33
-rw-r--r--sw/source/filter/html/wrthtml.hxx14
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.cxx24
-rw-r--r--sw/source/filter/ww8/rtfattributeoutput.cxx4
-rw-r--r--sw/source/filter/ww8/writerwordglue.cxx2
-rw-r--r--sw/source/filter/ww8/wrtw8esh.cxx12
-rw-r--r--sw/source/filter/ww8/wrtw8nds.cxx32
-rw-r--r--sw/source/filter/ww8/wrtw8sty.cxx2
-rw-r--r--sw/source/filter/ww8/wrtww8.cxx4
-rw-r--r--sw/source/filter/ww8/wrtww8.hxx12
-rw-r--r--sw/source/filter/ww8/ww8atr.cxx26
-rw-r--r--sw/source/filter/ww8/ww8graf.cxx2
-rw-r--r--sw/source/filter/ww8/ww8par2.cxx20
-rw-r--r--sw/source/filter/ww8/ww8par6.cxx28
-rw-r--r--sw/source/ui/dialog/uiregionsw.cxx2
-rw-r--r--sw/source/ui/frmdlg/column.cxx6
-rw-r--r--sw/source/ui/frmdlg/frmpage.cxx6
-rw-r--r--sw/source/ui/misc/pggrid.cxx4
-rw-r--r--sw/source/uibase/app/docshini.cxx2
-rw-r--r--sw/source/uibase/frmdlg/colex.cxx4
-rw-r--r--sw/source/uibase/shells/annotsh.cxx8
-rw-r--r--sw/source/uibase/shells/drwtxtex.cxx8
-rw-r--r--sw/source/uibase/shells/tabsh.cxx4
-rw-r--r--sw/source/uibase/shells/txtattr.cxx10
-rw-r--r--sw/source/uibase/uiview/formatclipboard.cxx4
-rw-r--r--sw/source/uibase/uiview/viewtab.cxx2
53 files changed, 227 insertions, 220 deletions
diff --git a/sw/inc/crsrsh.hxx b/sw/inc/crsrsh.hxx
index 064990b927c0..37a14b7b2eb5 100644
--- a/sw/inc/crsrsh.hxx
+++ b/sw/inc/crsrsh.hxx
@@ -261,7 +261,7 @@ private:
SAL_DLLPRIVATE bool LRMargin( bool, bool bAPI = false );
SAL_DLLPRIVATE bool IsAtLRMargin( bool, bool bAPI = false ) const;
- SAL_DLLPRIVATE short GetTextDirection( const Point* pPt = nullptr ) const;
+ SAL_DLLPRIVATE SvxFrameDirection GetTextDirection( const Point* pPt = nullptr ) const;
SAL_DLLPRIVATE bool isInHiddenTextFrame(SwShellCursor* pShellCursor);
diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx
index 1a6545898c8e..bc20780a04de 100644
--- a/sw/inc/doc.hxx
+++ b/sw/inc/doc.hxx
@@ -687,7 +687,7 @@ public:
void ChangeAuthorityData(const SwAuthEntry* pNewData);
bool IsInHeaderFooter( const SwNodeIndex& rIdx ) const;
- short GetTextDirection( const SwPosition& rPos,
+ SvxFrameDirection GetTextDirection( const SwPosition& rPos,
const Point* pPt = nullptr ) const;
bool IsInVerticalText( const SwPosition& rPos ) const;
diff --git a/sw/inc/node.hxx b/sw/inc/node.hxx
index a9a52227b7e9..83fbbd2da269 100644
--- a/sw/inc/node.hxx
+++ b/sw/inc/node.hxx
@@ -468,7 +468,7 @@ public:
/** determines the text direction for a certain
position. @return -1, if text direction could *not* be determined. */
- short GetTextDirection( const SwPosition& rPos,
+ SvxFrameDirection GetTextDirection( const SwPosition& rPos,
const Point* pPt ) const;
void SetModifyAtAttr( bool bSetModifyAtAttr ) const { mbSetModifyAtAttr = bSetModifyAtAttr; }
diff --git a/sw/source/core/bastyp/init.cxx b/sw/source/core/bastyp/init.cxx
index 7b85287a72e0..862e46aade0c 100644
--- a/sw/source/core/bastyp/init.cxx
+++ b/sw/source/core/bastyp/init.cxx
@@ -600,7 +600,7 @@ void InitCore()
aAttrTab[ RES_FTN_AT_TXTEND - POOLATTR_BEGIN ] = new SwFormatFootnoteAtTextEnd;
aAttrTab[ RES_END_AT_TXTEND - POOLATTR_BEGIN ] = new SwFormatEndAtTextEnd;
aAttrTab[ RES_COLUMNBALANCE - POOLATTR_BEGIN ] = new SwFormatNoBalancedColumns;
- aAttrTab[ RES_FRAMEDIR - POOLATTR_BEGIN ] = new SvxFrameDirectionItem( FRMDIR_ENVIRONMENT, RES_FRAMEDIR );
+ aAttrTab[ RES_FRAMEDIR - POOLATTR_BEGIN ] = new SvxFrameDirectionItem( SvxFrameDirection::Environment, RES_FRAMEDIR );
aAttrTab[ RES_ROW_SPLIT - POOLATTR_BEGIN ] = new SwFormatRowSplit;
// #i18732#
diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx
index fb14f5a7ed26..dc6898b8e3c5 100644
--- a/sw/source/core/crsr/crsrsh.cxx
+++ b/sw/source/core/crsr/crsrsh.cxx
@@ -3109,7 +3109,7 @@ bool SwCursorShell::IsSelFullPara() const
return bRet;
}
-short SwCursorShell::GetTextDirection( const Point* pPt ) const
+SvxFrameDirection SwCursorShell::GetTextDirection( const Point* pPt ) const
{
SwPosition aPos( *m_pCurrentCursor->GetPoint() );
Point aPt( pPt ? *pPt : m_pCurrentCursor->GetPtPos() );
@@ -3126,16 +3126,16 @@ short SwCursorShell::GetTextDirection( const Point* pPt ) const
bool SwCursorShell::IsInVerticalText( const Point* pPt ) const
{
- const short nDir = GetTextDirection( pPt );
- return FRMDIR_VERT_TOP_RIGHT == nDir || FRMDIR_VERT_TOP_LEFT == nDir;
+ const SvxFrameDirection nDir = GetTextDirection( pPt );
+ return SvxFrameDirection::Vertical_RL_TB == nDir || SvxFrameDirection::Vertical_LR_TB == nDir;
}
bool SwCursorShell::IsInRightToLeftText() const
{
- const short nDir = GetTextDirection();
- // GetTextDirection uses FRMDIR_VERT_TOP_LEFT to indicate RTL in
+ const SvxFrameDirection nDir = GetTextDirection();
+ // GetTextDirection uses SvxFrameDirection::Vertical_LR_TB to indicate RTL in
// vertical environment
- return FRMDIR_VERT_TOP_LEFT == nDir || FRMDIR_HORI_RIGHT_TOP == nDir;
+ return SvxFrameDirection::Vertical_LR_TB == nDir || SvxFrameDirection::Horizontal_RL_TB == nDir;
}
/// If the current cursor position is inside a hidden range, the hidden range
diff --git a/sw/source/core/doc/DocumentStylePoolManager.cxx b/sw/source/core/doc/DocumentStylePoolManager.cxx
index 11f83a206e30..d495d85698ad 100644
--- a/sw/source/core/doc/DocumentStylePoolManager.cxx
+++ b/sw/source/core/doc/DocumentStylePoolManager.cxx
@@ -356,7 +356,7 @@ SwTextFormatColl* DocumentStylePoolManager::GetTextCollFromPool( sal_uInt16 nId,
{
sal_uLong nAppLanguage = GetAppLanguage();
if (GetDefaultFrameDirection(nAppLanguage) ==
- FRMDIR_HORI_RIGHT_TOP)
+ SvxFrameDirection::Horizontal_RL_TB)
{
SvxAdjustItem aAdjust(SvxAdjust::Right, RES_PARATR_ADJUST );
aSet.Put(aAdjust);
diff --git a/sw/source/core/doc/docdesc.cxx b/sw/source/core/doc/docdesc.cxx
index 6c108ed9f166..bbc3897392c6 100644
--- a/sw/source/core/doc/docdesc.cxx
+++ b/sw/source/core/doc/docdesc.cxx
@@ -660,7 +660,7 @@ SwPageDesc* SwDoc::MakePageDesc(const OUString &rName, const SwPageDesc *pCpy,
SvxFrameDirection aFrameDirection = bRegardLanguage ?
GetDefaultFrameDirection(GetAppLanguage())
- : FRMDIR_HORI_LEFT_TOP;
+ : SvxFrameDirection::Horizontal_LR_TB;
pNew->GetMaster().SetFormatAttr( SvxFrameDirectionItem(aFrameDirection, RES_FRAMEDIR) );
pNew->GetLeft().SetFormatAttr( SvxFrameDirectionItem(aFrameDirection, RES_FRAMEDIR) );
diff --git a/sw/source/core/doc/docdraw.cxx b/sw/source/core/doc/docdraw.cxx
index 97ae882fb448..df94f1bab31c 100644
--- a/sw/source/core/doc/docdraw.cxx
+++ b/sw/source/core/doc/docdraw.cxx
@@ -113,7 +113,7 @@ static void lcl_AdjustPositioningAttr( SwDrawFrameFormat* _pFrameFormat,
static_cast<const SvxFrameDirectionItem&>(_pFrameFormat->GetAttrSet().GetPool()->GetDefaultItem( RES_FRAMEDIR ));
switch ( rDirItem.GetValue() )
{
- case FRMDIR_VERT_TOP_LEFT:
+ case SvxFrameDirection::Vertical_LR_TB:
{
// vertical from left-to-right
bVert = true;
@@ -121,30 +121,31 @@ static void lcl_AdjustPositioningAttr( SwDrawFrameFormat* _pFrameFormat,
OSL_FAIL( "<lcl_AdjustPositioningAttr(..)> - vertical from left-to-right not supported." );
}
break;
- case FRMDIR_VERT_TOP_RIGHT:
+ case SvxFrameDirection::Vertical_RL_TB:
{
// vertical from right-to-left
bVert = true;
bR2L = false;
}
break;
- case FRMDIR_HORI_RIGHT_TOP:
+ case SvxFrameDirection::Horizontal_RL_TB:
{
// horizontal from right-to-left
bVert = false;
bR2L = true;
}
break;
- case FRMDIR_HORI_LEFT_TOP:
+ case SvxFrameDirection::Horizontal_LR_TB:
{
// horizontal from left-to-right
bVert = false;
bR2L = false;
}
break;
- case FRMDIR_ENVIRONMENT:
- SAL_WARN("sw.core", "lcl_AdjustPositioningAttr(..) FRMDIR_ENVIRONMENT not supported");
+ case SvxFrameDirection::Environment:
+ SAL_WARN("sw.core", "lcl_AdjustPositioningAttr(..) SvxFrameDirection::Environment not supported");
break;
+ default: break;
}
}
@@ -154,11 +155,11 @@ static void lcl_AdjustPositioningAttr( SwDrawFrameFormat* _pFrameFormat,
if ( bVert )
{
if ( bR2L ) {
- //FRMDIR_VERT_TOP_LEFT
+ //SvxFrameDirection::Vertical_LR_TB
nHoriRelPos = aObjRect.Left() - aAnchorPos.getX();
nVertRelPos = aObjRect.Top() - aAnchorPos.getY();
} else {
- //FRMDIR_VERT_TOP_RIGHT
+ //SvxFrameDirection::Vertical_RL_TB
nHoriRelPos = aObjRect.Top() - aAnchorPos.getY();
nVertRelPos = aAnchorPos.getX() - aObjRect.Right();
}
diff --git a/sw/source/core/doc/doclay.cxx b/sw/source/core/doc/doclay.cxx
index 260adbaf8c71..0aecf911b2e7 100644
--- a/sw/source/core/doc/doclay.cxx
+++ b/sw/source/core/doc/doclay.cxx
@@ -1576,10 +1576,10 @@ bool SwDoc::IsInHeaderFooter( const SwNodeIndex& rIdx ) const
nullptr != pNd->FindFooterStartNode();
}
-short SwDoc::GetTextDirection( const SwPosition& rPos,
+SvxFrameDirection SwDoc::GetTextDirection( const SwPosition& rPos,
const Point* pPt ) const
{
- short nRet = -1;
+ SvxFrameDirection nRet = SvxFrameDirection::Unknown;
SwContentNode *pNd = rPos.nNode.GetNode().GetContentNode();
@@ -1588,7 +1588,7 @@ short SwDoc::GetTextDirection( const SwPosition& rPos,
{
nRet = pNd->GetTextDirection( rPos, pPt );
}
- if ( nRet == -1 )
+ if ( nRet == SvxFrameDirection::Unknown )
{
const SvxFrameDirectionItem* pItem = nullptr;
if( pNd )
@@ -1598,7 +1598,7 @@ short SwDoc::GetTextDirection( const SwPosition& rPos,
while( pFlyFormat )
{
pItem = &pFlyFormat->GetFrameDir();
- if( FRMDIR_ENVIRONMENT == pItem->GetValue() )
+ if( SvxFrameDirection::Environment == pItem->GetValue() )
{
pItem = nullptr;
const SwFormatAnchor* pAnchor = &pFlyFormat->GetAnchor();
@@ -1632,8 +1632,8 @@ short SwDoc::GetTextDirection( const SwPosition& rPos,
bool SwDoc::IsInVerticalText( const SwPosition& rPos ) const
{
- const short nDir = GetTextDirection( rPos );
- return FRMDIR_VERT_TOP_RIGHT == nDir || FRMDIR_VERT_TOP_LEFT == nDir;
+ const SvxFrameDirection nDir = GetTextDirection( rPos );
+ return SvxFrameDirection::Vertical_RL_TB == nDir || SvxFrameDirection::Vertical_LR_TB == nDir;
}
std::set<SwRootFrame*> SwDoc::GetAllLayouts()
diff --git a/sw/source/core/doc/poolfmt.cxx b/sw/source/core/doc/poolfmt.cxx
index ee3a57981848..e302ee6c0f6d 100644
--- a/sw/source/core/doc/poolfmt.cxx
+++ b/sw/source/core/doc/poolfmt.cxx
@@ -120,7 +120,7 @@ void SetAllScriptItem( SfxItemSet& rSet, const SfxPoolItem& rItem )
SvxFrameDirection GetDefaultFrameDirection(sal_uLong nLanguage)
{
SvxFrameDirection eResult = (MsLangId::isRightToLeft( static_cast<LanguageType>(nLanguage)) ?
- FRMDIR_HORI_RIGHT_TOP : FRMDIR_HORI_LEFT_TOP);
+ SvxFrameDirection::Horizontal_RL_TB : SvxFrameDirection::Horizontal_LR_TB);
return eResult;
}
@@ -319,7 +319,7 @@ void SwDoc::RemoveAllFormatLanguageDependencies()
/* koreans do not like SvxScriptItem(TRUE) */
pTextFormatColl->ResetFormatAttr( RES_PARATR_SCRIPTSPACE );
- SvxFrameDirectionItem aFrameDir( FRMDIR_HORI_LEFT_TOP, RES_FRAMEDIR );
+ SvxFrameDirectionItem aFrameDir( SvxFrameDirection::Horizontal_LR_TB, RES_FRAMEDIR );
size_t nCount = GetPageDescCnt();
for( size_t i=0; i<nCount; ++i )
diff --git a/sw/source/core/doc/tblafmt.cxx b/sw/source/core/doc/tblafmt.cxx
index c8be04e922b3..57cacf03a8c0 100644
--- a/sw/source/core/doc/tblafmt.cxx
+++ b/sw/source/core/doc/tblafmt.cxx
@@ -289,7 +289,7 @@ SwBoxAutoFormat::SwBoxAutoFormat()
m_aBLTR( 0 ),
m_aBackground( RES_BACKGROUND ),
m_aAdjust( SvxAdjust::Left, RES_PARATR_ADJUST ),
- m_aTextOrientation(FRMDIR_ENVIRONMENT, RES_FRAMEDIR),
+ m_aTextOrientation(SvxFrameDirection::Environment, RES_FRAMEDIR),
m_aVerticalAlignment(0, css::text::VertOrientation::NONE, css::text::RelOrientation::FRAME),
m_aHorJustify( SvxCellHorJustify::Standard, 0),
m_aVerJustify( SVX_VER_JUSTIFY_STANDARD, 0),
diff --git a/sw/source/core/docnode/node.cxx b/sw/source/core/docnode/node.cxx
index 611a8d212bd2..f985634ed09d 100644
--- a/sw/source/core/docnode/node.cxx
+++ b/sw/source/core/docnode/node.cxx
@@ -1935,10 +1935,10 @@ void SwContentNode::ChkCondColl()
}
// #i42921#
-short SwContentNode::GetTextDirection( const SwPosition& rPos,
+SvxFrameDirection SwContentNode::GetTextDirection( const SwPosition& rPos,
const Point* pPt ) const
{
- short nRet = -1;
+ SvxFrameDirection nRet = SvxFrameDirection::Unknown;
Point aPt;
if( pPt )
@@ -1952,16 +1952,16 @@ short SwContentNode::GetTextDirection( const SwPosition& rPos,
if ( pFrame->IsVertical() )
{
if ( pFrame->IsRightToLeft() )
- nRet = FRMDIR_VERT_TOP_LEFT;
+ nRet = SvxFrameDirection::Vertical_LR_TB;
else
- nRet = FRMDIR_VERT_TOP_RIGHT;
+ nRet = SvxFrameDirection::Vertical_RL_TB;
}
else
{
if ( pFrame->IsRightToLeft() )
- nRet = FRMDIR_HORI_RIGHT_TOP;
+ nRet = SvxFrameDirection::Horizontal_RL_TB;
else
- nRet = FRMDIR_HORI_LEFT_TOP;
+ nRet = SvxFrameDirection::Horizontal_LR_TB;
}
}
diff --git a/sw/source/core/frmedt/fetab.cxx b/sw/source/core/frmedt/fetab.cxx
index 094a8fe55861..8380afb0eab2 100644
--- a/sw/source/core/frmedt/fetab.cxx
+++ b/sw/source/core/frmedt/fetab.cxx
@@ -2018,23 +2018,24 @@ bool SwFEShell::IsVerticalModeAtNdAndPos( const SwTextNode& _rTextNode,
{
bool bRet( false );
- const short nTextDir =
+ const SvxFrameDirection nTextDir =
_rTextNode.GetTextDirection( SwPosition(_rTextNode), &_rDocPos );
switch ( nTextDir )
{
- case -1:
- case FRMDIR_HORI_RIGHT_TOP:
- case FRMDIR_HORI_LEFT_TOP:
+ case SvxFrameDirection::Unknown:
+ case SvxFrameDirection::Horizontal_RL_TB:
+ case SvxFrameDirection::Horizontal_LR_TB:
{
bRet = false;
}
break;
- case FRMDIR_VERT_TOP_LEFT:
- case FRMDIR_VERT_TOP_RIGHT:
+ case SvxFrameDirection::Vertical_LR_TB:
+ case SvxFrameDirection::Vertical_RL_TB:
{
bRet = true;
}
break;
+ default: break;
}
return bRet;
diff --git a/sw/source/core/inc/frame.hxx b/sw/source/core/inc/frame.hxx
index e9f121bdf059..25d733db62a2 100644
--- a/sw/source/core/inc/frame.hxx
+++ b/sw/source/core/inc/frame.hxx
@@ -57,6 +57,7 @@ class SwPrintData;
class SwSortedObjs;
class SwAnchoredObject;
typedef struct _xmlTextWriter *xmlTextWriterPtr;
+enum class SvxFrameDirection;
// Each FrameType is represented here as a bit.
// The bits must be set in a way that it can be determined with masking of
@@ -295,7 +296,7 @@ protected:
SwFrame( SwModify*, SwFrame* );
- void CheckDir( sal_uInt16 nDir, bool bVert, bool bOnlyBiDi, bool bBrowse );
+ void CheckDir( SvxFrameDirection nDir, bool bVert, bool bOnlyBiDi, bool bBrowse );
/** enumeration for the different invalidations
#i28701#
diff --git a/sw/source/core/layout/fly.cxx b/sw/source/core/layout/fly.cxx
index 97e17fc38dd7..4f235b2ebe1b 100644
--- a/sw/source/core/layout/fly.cxx
+++ b/sw/source/core/layout/fly.cxx
@@ -86,9 +86,9 @@ SwFlyFrame::SwFlyFrame( SwFlyFrameFormat *pFormat, SwFrame* pSib, SwFrame *pAnch
// Size setting: Fixed size is always the width
const SwFormatFrameSize &rFrameSize = pFormat->GetFrameSize();
- const sal_uInt16 nDir =
+ const SvxFrameDirection nDir =
static_cast<const SvxFrameDirectionItem&>(pFormat->GetFormatAttr( RES_FRAMEDIR )).GetValue();
- if( FRMDIR_ENVIRONMENT == nDir )
+ if( SvxFrameDirection::Environment == nDir )
{
mbDerivedVert = true;
mbDerivedR2L = true;
@@ -98,7 +98,7 @@ SwFlyFrame::SwFlyFrame( SwFlyFrameFormat *pFormat, SwFrame* pSib, SwFrame *pAnch
mbInvalidVert = false;
mbDerivedVert = false;
mbDerivedR2L = false;
- if( FRMDIR_HORI_LEFT_TOP == nDir || FRMDIR_HORI_RIGHT_TOP == nDir )
+ if( SvxFrameDirection::Horizontal_LR_TB == nDir || SvxFrameDirection::Horizontal_RL_TB == nDir )
{
mbVertLR = false;
mbVertical = false;
@@ -115,7 +115,7 @@ SwFlyFrame::SwFlyFrame( SwFlyFrameFormat *pFormat, SwFrame* pSib, SwFrame *pAnch
{
mbVertical = true;
- if ( FRMDIR_VERT_TOP_LEFT == nDir )
+ if ( SvxFrameDirection::Vertical_LR_TB == nDir )
mbVertLR = true;
else
mbVertLR = false;
@@ -123,7 +123,7 @@ SwFlyFrame::SwFlyFrame( SwFlyFrameFormat *pFormat, SwFrame* pSib, SwFrame *pAnch
}
mbInvalidR2L = false;
- if( FRMDIR_HORI_RIGHT_TOP == nDir )
+ if( SvxFrameDirection::Horizontal_RL_TB == nDir )
mbRightToLeft = true;
else
mbRightToLeft = false;
diff --git a/sw/source/core/layout/pagechg.cxx b/sw/source/core/layout/pagechg.cxx
index 170428358634..44ca0dd07756 100644
--- a/sw/source/core/layout/pagechg.cxx
+++ b/sw/source/core/layout/pagechg.cxx
@@ -299,11 +299,11 @@ void SwPageFrame::CheckGrid( bool bInvalidate )
void SwPageFrame::CheckDirection( bool bVert )
{
- sal_uInt16 nDir =
+ SvxFrameDirection nDir =
static_cast<const SvxFrameDirectionItem&>(GetFormat()->GetFormatAttr( RES_FRAMEDIR )).GetValue();
if( bVert )
{
- if( FRMDIR_HORI_LEFT_TOP == nDir || FRMDIR_HORI_RIGHT_TOP == nDir )
+ if( SvxFrameDirection::Horizontal_LR_TB == nDir || SvxFrameDirection::Horizontal_RL_TB == nDir )
{
mbVertLR = false;
mbVertical = false;
@@ -320,9 +320,9 @@ void SwPageFrame::CheckDirection( bool bVert )
{
mbVertical = true;
- if(FRMDIR_VERT_TOP_RIGHT == nDir)
+ if(SvxFrameDirection::Vertical_RL_TB == nDir)
mbVertLR = false;
- else if(FRMDIR_VERT_TOP_LEFT==nDir)
+ else if(SvxFrameDirection::Vertical_LR_TB==nDir)
mbVertLR = true;
}
}
@@ -332,7 +332,7 @@ void SwPageFrame::CheckDirection( bool bVert )
}
else
{
- if( FRMDIR_HORI_RIGHT_TOP == nDir )
+ if( SvxFrameDirection::Horizontal_RL_TB == nDir )
mbRightToLeft = true;
else
mbRightToLeft = false;
diff --git a/sw/source/core/layout/pagedesc.cxx b/sw/source/core/layout/pagedesc.cxx
index 14a09148f234..0644928619a9 100644
--- a/sw/source/core/layout/pagedesc.cxx
+++ b/sw/source/core/layout/pagedesc.cxx
@@ -149,7 +149,7 @@ void SwPageDesc::ResetAllAttr()
// #i73790# - method renamed
rFormat.ResetAllFormatAttr();
- rFormat.SetFormatAttr( SvxFrameDirectionItem(FRMDIR_HORI_LEFT_TOP, RES_FRAMEDIR) );
+ rFormat.SetFormatAttr( SvxFrameDirectionItem(SvxFrameDirection::Horizontal_LR_TB, RES_FRAMEDIR) );
}
// gets information from Modify
@@ -382,7 +382,7 @@ SwPageFootnoteInfo::SwPageFootnoteInfo()
, m_nTopDist( 57 ) //1mm
, m_nBottomDist( 57 )
{
- m_eAdjust = FRMDIR_HORI_RIGHT_TOP == GetDefaultFrameDirection(GetAppLanguage()) ?
+ m_eAdjust = SvxFrameDirection::Horizontal_RL_TB == GetDefaultFrameDirection(GetAppLanguage()) ?
css::text::HorizontalAdjust_RIGHT :
css::text::HorizontalAdjust_LEFT;
}
diff --git a/sw/source/core/layout/wsfrm.cxx b/sw/source/core/layout/wsfrm.cxx
index 6f71f423d440..79ba414c06cf 100644
--- a/sw/source/core/layout/wsfrm.cxx
+++ b/sw/source/core/layout/wsfrm.cxx
@@ -96,19 +96,19 @@ void SwFrame::RegisterToFormat( SwFormat& rFormat )
rFormat.Add( this );
}
-void SwFrame::CheckDir( sal_uInt16 nDir, bool bVert, bool bOnlyBiDi, bool bBrowse )
+void SwFrame::CheckDir( SvxFrameDirection nDir, bool bVert, bool bOnlyBiDi, bool bBrowse )
{
- if( FRMDIR_ENVIRONMENT == nDir || ( bVert && bOnlyBiDi ) )
+ if( SvxFrameDirection::Environment == nDir || ( bVert && bOnlyBiDi ) )
{
mbDerivedVert = true;
- if( FRMDIR_ENVIRONMENT == nDir )
+ if( SvxFrameDirection::Environment == nDir )
mbDerivedR2L = true;
SetDirFlags( bVert );
}
else if( bVert )
{
mbInvalidVert = false;
- if( FRMDIR_HORI_LEFT_TOP == nDir || FRMDIR_HORI_RIGHT_TOP == nDir
+ if( SvxFrameDirection::Horizontal_LR_TB == nDir || SvxFrameDirection::Horizontal_RL_TB == nDir
|| bBrowse )
{
mbVertical = false;
@@ -117,16 +117,16 @@ void SwFrame::CheckDir( sal_uInt16 nDir, bool bVert, bool bOnlyBiDi, bool bBrows
else
{
mbVertical = true;
- if(FRMDIR_VERT_TOP_RIGHT == nDir)
+ if(SvxFrameDirection::Vertical_RL_TB == nDir)
mbVertLR = false;
- else if(FRMDIR_VERT_TOP_LEFT==nDir)
+ else if(SvxFrameDirection::Vertical_LR_TB==nDir)
mbVertLR = true;
}
}
else
{
mbInvalidR2L = false;
- if( FRMDIR_HORI_RIGHT_TOP == nDir )
+ if( SvxFrameDirection::Horizontal_RL_TB == nDir )
mbRightToLeft = true;
else
mbRightToLeft = false;
diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx
index 5c7a4afbfd05..128bc48e0318 100644
--- a/sw/source/core/unocore/unoframe.cxx
+++ b/sw/source/core/unocore/unoframe.cxx
@@ -905,7 +905,7 @@ bool BaseFrameProperties_Impl::FillBaseProperties(SfxItemSet& rToSet, const SfxI
GetProperty(RES_FRAMEDIR, 0, pFrameDirection);
if(pFrameDirection)
{
- SvxFrameDirectionItem aAttr(FRMDIR_HORI_LEFT_TOP, RES_FRAMEDIR);
+ SvxFrameDirectionItem aAttr(SvxFrameDirection::Horizontal_LR_TB, RES_FRAMEDIR);
aAttr.PutValue(*pFrameDirection, 0);
rToSet.Put(aAttr);
}
diff --git a/sw/source/core/unocore/unosect.cxx b/sw/source/core/unocore/unosect.cxx
index 55e636f58ca2..a8ea565c43ef 100644
--- a/sw/source/core/unocore/unosect.cxx
+++ b/sw/source/core/unocore/unosect.cxx
@@ -876,7 +876,7 @@ void SwXTextSection::Impl::SetPropertyValues_Impl(
{
m_pProps->m_pFrameDirItem.reset(
new SvxFrameDirectionItem(
- FRMDIR_HORI_LEFT_TOP, RES_FRAMEDIR));
+ SvxFrameDirection::Horizontal_LR_TB, RES_FRAMEDIR));
}
pPutItem = m_pProps->m_pFrameDirItem.get();
}
@@ -1216,7 +1216,7 @@ SwXTextSection::Impl::GetPropertyValues_Impl(
{
m_pProps->m_pFrameDirItem.reset(
new SvxFrameDirectionItem(
- FRMDIR_ENVIRONMENT, RES_FRAMEDIR));
+ SvxFrameDirection::Environment, RES_FRAMEDIR));
}
pQueryItem = m_pProps->m_pFrameDirItem.get();
}
diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx
index 27d3af746b38..86f8e0919859 100644
--- a/sw/source/core/unocore/unotbl.cxx
+++ b/sw/source/core/unocore/unotbl.cxx
@@ -1017,10 +1017,10 @@ void SwXCell::setPropertyValue(const OUString& rPropertyName, const uno::Any& aV
// Hack to support hidden property to transfer textDirection
if(rPropertyName == "FRMDirection")
{
- SvxFrameDirection eDir = FRMDIR_ENVIRONMENT;
+ SvxFrameDirection eDir = SvxFrameDirection::Environment;
try
{
- const std::array<SvxFrameDirection, 3> vDirs = { FRMDIR_HORI_LEFT_TOP, FRMDIR_HORI_RIGHT_TOP, FRMDIR_VERT_TOP_RIGHT };
+ const std::array<SvxFrameDirection, 3> vDirs = { SvxFrameDirection::Horizontal_LR_TB, SvxFrameDirection::Horizontal_RL_TB, SvxFrameDirection::Vertical_RL_TB };
eDir = vDirs.at(aValue.get<sal_Int32>());
} catch(std::out_of_range) {
SAL_WARN("sw.uno", "unknown direction code, maybe it's a bitfield");
diff --git a/sw/source/filter/html/css1atr.cxx b/sw/source/filter/html/css1atr.cxx
index 09ec5740028c..7ffb743014b8 100644
--- a/sw/source/filter/html/css1atr.cxx
+++ b/sw/source/filter/html/css1atr.cxx
@@ -3455,22 +3455,23 @@ static Writer& OutCSS1_SvxFrameDirection( Writer& rWrt, const SfxPoolItem& rHt )
if( !rHTMLWrt.IsCSS1Source( CSS1_OUTMODE_TEMPLATE ) )
return rWrt;
- sal_uInt16 nDir =
+ SvxFrameDirection nDir =
static_cast< const SvxFrameDirectionItem& >( rHt ).GetValue();
const sal_Char* pStr = nullptr;
switch( nDir )
{
- case FRMDIR_HORI_LEFT_TOP:
- case FRMDIR_VERT_TOP_LEFT:
+ case SvxFrameDirection::Horizontal_LR_TB:
+ case SvxFrameDirection::Vertical_LR_TB:
pStr = sCSS1_PV_ltr;
break;
- case FRMDIR_HORI_RIGHT_TOP:
- case FRMDIR_VERT_TOP_RIGHT:
+ case SvxFrameDirection::Horizontal_RL_TB:
+ case SvxFrameDirection::Vertical_RL_TB:
pStr = sCSS1_PV_rtl;
break;
- case FRMDIR_ENVIRONMENT:
+ case SvxFrameDirection::Environment:
pStr = sCSS1_PV_inherit;
break;
+ default: break;
}
if( pStr )
diff --git a/sw/source/filter/html/htmlatr.cxx b/sw/source/filter/html/htmlatr.cxx
index a6801dcf3816..a8e3ac1df19a 100644
--- a/sw/source/filter/html/htmlatr.cxx
+++ b/sw/source/filter/html/htmlatr.cxx
@@ -822,7 +822,7 @@ void OutHTML_SwFormat( Writer& rWrt, const SwFormat& rFormat,
}
// and the text direction
- sal_uInt16 nDir = rHWrt.GetHTMLDirection(
+ SvxFrameDirection nDir = rHWrt.GetHTMLDirection(
(pNodeItemSet ? static_cast < const SvxFrameDirectionItem& >(
pNodeItemSet->Get( RES_FRAMEDIR ) )
: rFormat.GetFrameDir() ).GetValue() );
diff --git a/sw/source/filter/html/htmlcss1.cxx b/sw/source/filter/html/htmlcss1.cxx
index e3167264ed0f..fca9779e273a 100644
--- a/sw/source/filter/html/htmlcss1.cxx
+++ b/sw/source/filter/html/htmlcss1.cxx
@@ -385,7 +385,7 @@ void SwCSS1Parser::SetPageDescAttrs( const SvxBrushItem *pBrush,
{
SvxBrushItem aBrushItem( RES_BACKGROUND );
SvxBoxItem aBoxItem( RES_BOX );
- SvxFrameDirectionItem aFrameDirItem(FRMDIR_ENVIRONMENT, RES_FRAMEDIR);
+ SvxFrameDirectionItem aFrameDirItem(SvxFrameDirection::Environment, RES_FRAMEDIR);
bool bSetBrush = pBrush!=nullptr, bSetBox = false, bSetFrameDir = false;
if( pBrush )
aBrushItem = *pBrush;
@@ -1918,13 +1918,13 @@ bool SwHTMLParser::ParseStyleOptions( const OUString &rStyle,
if( pDir && !pDir->isEmpty() )
{
OUString aValue( *pDir );
- SvxFrameDirection eDir = FRMDIR_ENVIRONMENT;
+ SvxFrameDirection eDir = SvxFrameDirection::Environment;
if (aValue.equalsIgnoreAsciiCase("LTR"))
- eDir = FRMDIR_HORI_LEFT_TOP;
+ eDir = SvxFrameDirection::Horizontal_LR_TB;
else if (aValue.equalsIgnoreAsciiCase("RTL"))
- eDir = FRMDIR_HORI_RIGHT_TOP;
+ eDir = SvxFrameDirection::Horizontal_RL_TB;
- if( FRMDIR_ENVIRONMENT != eDir )
+ if( SvxFrameDirection::Environment != eDir )
{
SvxFrameDirectionItem aDir( eDir, RES_FRAMEDIR );
rItemSet.Put( aDir );
diff --git a/sw/source/filter/html/htmlflywriter.cxx b/sw/source/filter/html/htmlflywriter.cxx
index a1d77f525996..7356d697bf0b 100644
--- a/sw/source/filter/html/htmlflywriter.cxx
+++ b/sw/source/filter/html/htmlflywriter.cxx
@@ -542,7 +542,7 @@ OString SwHTMLWriter::OutFrameFormatOptions( const SwFrameFormat &rFrameFormat,
// Name
if( nFrameOpts & HtmlFrmOpts::Dir )
{
- sal_uInt16 nDir = GetHTMLDirection( rItemSet );
+ SvxFrameDirection nDir = GetHTMLDirection( rItemSet );
Strm().WriteCharPtr( sOut.makeStringAndClear().getStr() );
OutDirection( nDir );
}
@@ -817,7 +817,7 @@ void SwHTMLWriter::writeFrameFormatOptions(HtmlWriter& aHtml, const SwFrameForma
// Name
if (nFrameOptions & HtmlFrmOpts::Dir)
{
- sal_uInt16 nCurrentDirection = GetHTMLDirection(rItemSet);
+ SvxFrameDirection nCurrentDirection = GetHTMLDirection(rItemSet);
OString sDirection = convertDirection(nCurrentDirection);
aHtml.attribute(OOO_STRING_SVTOOLS_HTML_O_dir, sDirection);
}
diff --git a/sw/source/filter/html/htmltabw.cxx b/sw/source/filter/html/htmltabw.cxx
index 12e71f94848e..dc2cbe168c21 100644
--- a/sw/source/filter/html/htmltabw.cxx
+++ b/sw/source/filter/html/htmltabw.cxx
@@ -608,7 +608,7 @@ void SwHTMLWrtTable::Write( SwHTMLWriter& rWrt, sal_Int16 eAlign,
OStringBuffer sOut;
sOut.append('<').append(OOO_STRING_SVTOOLS_HTML_table);
- const sal_uInt16 nOldDirection = rWrt.m_nDirection;
+ const SvxFrameDirection nOldDirection = rWrt.m_nDirection;
if( pFrameFormat )
rWrt.m_nDirection = rWrt.GetHTMLDirection( pFrameFormat->GetAttrSet() );
if( rWrt.m_bOutFlyFrame || nOldDirection != rWrt.m_nDirection )
diff --git a/sw/source/filter/html/svxcss1.cxx b/sw/source/filter/html/svxcss1.cxx
index e74a629157f7..f2c33fef1bed 100644
--- a/sw/source/filter/html/svxcss1.cxx
+++ b/sw/source/filter/html/svxcss1.cxx
@@ -117,9 +117,9 @@ static CSS1PropertyEnum const aTextTransformTable[] =
static CSS1PropertyEnum const aDirectionTable[] =
{
- { "ltr", FRMDIR_HORI_LEFT_TOP },
- { "rtl", FRMDIR_HORI_RIGHT_TOP },
- { "inherit", FRMDIR_ENVIRONMENT },
+ { "ltr", (sal_uInt16)SvxFrameDirection::Horizontal_LR_TB },
+ { "rtl", (sal_uInt16)SvxFrameDirection::Horizontal_RL_TB },
+ { "inherit", (sal_uInt16)SvxFrameDirection::Environment },
{ nullptr, 0 }
};
diff --git a/sw/source/filter/html/wrthtml.cxx b/sw/source/filter/html/wrthtml.cxx
index 6560e5fea912..ef319e744969 100644
--- a/sw/source/filter/html/wrthtml.cxx
+++ b/sw/source/filter/html/wrthtml.cxx
@@ -119,7 +119,7 @@ SwHTMLWriter::SwHTMLWriter( const OUString& rBaseURL )
, m_nExportMode(0)
, m_nCSS1OutMode(0)
, m_nCSS1Script(CSS1_OUTMODE_WESTERN)
- , m_nDirection(FRMDIR_HORI_LEFT_TOP)
+ , m_nDirection(SvxFrameDirection::Horizontal_LR_TB)
, m_eDestEnc(RTL_TEXTENCODING_MS_1252)
, m_eLang(LANGUAGE_DONTKNOW)
, m_bCfgOutStyles( false )
@@ -577,7 +577,7 @@ static void lcl_html_OutSectionStartTag( SwHTMLWriter& rHTMLWrt,
sOut.append('\"');
}
- sal_uInt16 nDir = rHTMLWrt.GetHTMLDirection( rFormat.GetAttrSet() );
+ SvxFrameDirection nDir = rHTMLWrt.GetHTMLDirection( rFormat.GetAttrSet() );
rHTMLWrt.Strm().WriteCharPtr( sOut.makeStringAndClear().getStr() );
rHTMLWrt.OutDirection( nDir );
@@ -1293,31 +1293,33 @@ void SwHTMLWriter::OutLanguage( LanguageType nLang )
}
}
-sal_uInt16 SwHTMLWriter::GetHTMLDirection( const SfxItemSet& rItemSet ) const
+SvxFrameDirection SwHTMLWriter::GetHTMLDirection( const SfxItemSet& rItemSet ) const
{
return GetHTMLDirection(
static_cast < const SvxFrameDirectionItem& >( rItemSet.Get( RES_FRAMEDIR ) )
.GetValue() );
}
-sal_uInt16 SwHTMLWriter::GetHTMLDirection( sal_uInt16 nDir ) const
+SvxFrameDirection SwHTMLWriter::GetHTMLDirection( SvxFrameDirection nDir ) const
{
switch( nDir )
{
- case FRMDIR_VERT_TOP_LEFT:
- nDir = FRMDIR_HORI_LEFT_TOP;
+ case SvxFrameDirection::Vertical_LR_TB:
+ nDir = SvxFrameDirection::Horizontal_LR_TB;
break;
- case FRMDIR_VERT_TOP_RIGHT:
- nDir = FRMDIR_HORI_RIGHT_TOP;
+ case SvxFrameDirection::Vertical_RL_TB:
+ nDir = SvxFrameDirection::Horizontal_RL_TB;
break;
- case FRMDIR_ENVIRONMENT:
+ case SvxFrameDirection::Environment:
nDir = m_nDirection;
+ break;
+ default: break;
}
return nDir;
}
-void SwHTMLWriter::OutDirection( sal_uInt16 nDir )
+void SwHTMLWriter::OutDirection( SvxFrameDirection nDir )
{
OString sConverted = convertDirection(nDir);
if (!sConverted.isEmpty())
@@ -1329,19 +1331,20 @@ void SwHTMLWriter::OutDirection( sal_uInt16 nDir )
}
}
-OString SwHTMLWriter::convertDirection(sal_uInt16 nDir)
+OString SwHTMLWriter::convertDirection(SvxFrameDirection nDir)
{
OString sConverted;
switch (nDir)
{
- case FRMDIR_HORI_LEFT_TOP:
- case FRMDIR_VERT_TOP_LEFT:
+ case SvxFrameDirection::Horizontal_LR_TB:
+ case SvxFrameDirection::Vertical_LR_TB:
sConverted = "ltr";
break;
- case FRMDIR_HORI_RIGHT_TOP:
- case FRMDIR_VERT_TOP_RIGHT:
+ case SvxFrameDirection::Horizontal_RL_TB:
+ case SvxFrameDirection::Vertical_RL_TB:
sConverted = "rtl";
break;
+ default: break;
}
return sConverted;
}
diff --git a/sw/source/filter/html/wrthtml.hxx b/sw/source/filter/html/wrthtml.hxx
index 1f31d9769e6e..0fd82ff92a9b 100644
--- a/sw/source/filter/html/wrthtml.hxx
+++ b/sw/source/filter/html/wrthtml.hxx
@@ -327,8 +327,8 @@ public:
sal_uInt16 m_nExportMode;
sal_uInt16 m_nCSS1OutMode;
sal_uInt16 m_nCSS1Script; // contains default script (that's the one
- // that is not contained in class names)
- sal_uInt16 m_nDirection; // the current direction
+ // that is not contained in class names)
+ SvxFrameDirection m_nDirection; // the current direction
rtl_TextEncoding m_eDestEnc;
LanguageType m_eLang;
@@ -456,10 +456,10 @@ public:
void OutBackground( const SfxItemSet& rItemSet, bool bGraphic );
void OutLanguage( LanguageType eLang );
- sal_uInt16 GetHTMLDirection( sal_uInt16 nDir ) const;
- sal_uInt16 GetHTMLDirection( const SfxItemSet& rItemSet ) const;
- void OutDirection( sal_uInt16 nDir );
- static OString convertDirection(sal_uInt16 nDirection);
+ SvxFrameDirection GetHTMLDirection( SvxFrameDirection nDir ) const;
+ SvxFrameDirection GetHTMLDirection( const SfxItemSet& rItemSet ) const;
+ void OutDirection( SvxFrameDirection nDir );
+ static OString convertDirection(SvxFrameDirection nDirection);
// ALT/ALIGN/WIDTH/HEIGHT/HSPACE/VSPACE-Optionen des aktuellen
// Frame-Formats ausgeben und ggf. ein <BR CLEAR=...> vorne an
@@ -614,7 +614,7 @@ struct HTMLSaveData
SwHTMLNumRuleInfo *pOldNumRuleInfo; // Owner = this
SwHTMLNumRuleInfo *pOldNextNumRuleInfo; // Owner = HTML-Writer
sal_uInt16 nOldDefListLvl;
- sal_uInt16 nOldDirection;
+ SvxFrameDirection nOldDirection;
bool bOldWriteAll : 1;
bool bOldOutHeader : 1;
bool bOldOutFooter : 1;
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index 011a9b1df464..24ccdb069299 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -3704,7 +3704,7 @@ void DocxAttributeOutput::TableBidi( ww8::WW8TableNodeInfoInner::Pointer_t pTabl
const SwTable * pTable = pTableTextNodeInfoInner->getTable();
const SwFrameFormat * pFrameFormat = pTable->GetFrameFormat();
- if ( m_rExport.TrueFrameDirection( *pFrameFormat ) == FRMDIR_HORI_RIGHT_TOP )
+ if ( m_rExport.TrueFrameDirection( *pFrameFormat ) == SvxFrameDirection::Horizontal_RL_TB )
{
m_pSerializer->singleElementNS( XML_w, XML_bidiVisual,
FSNS( XML_w, XML_val ), "true",
@@ -3717,11 +3717,11 @@ void DocxAttributeOutput::TableVerticalCell( ww8::WW8TableNodeInfoInner::Pointer
const SwTableBox * pTabBox = pTableTextNodeInfoInner->getTableBox();
const SwFrameFormat *pFrameFormat = pTabBox->GetFrameFormat( );
- if ( FRMDIR_VERT_TOP_RIGHT == m_rExport.TrueFrameDirection( *pFrameFormat ) )
+ if ( SvxFrameDirection::Vertical_RL_TB == m_rExport.TrueFrameDirection( *pFrameFormat ) )
m_pSerializer->singleElementNS( XML_w, XML_textDirection,
FSNS( XML_w, XML_val ), "tbRl",
FSEND );
- else if ( FRMDIR_HORI_LEFT_TOP == m_rExport.TrueFrameDirection( *pFrameFormat ) )
+ else if ( SvxFrameDirection::Horizontal_LR_TB == m_rExport.TrueFrameDirection( *pFrameFormat ) )
{
// Undo the text direction mangling done by the btLr handler in writerfilter::dmapper::DomainMapperTableManager::sprm()
const SwStartNode* pSttNd = pTabBox->GetSttNd();
@@ -7076,12 +7076,12 @@ void DocxAttributeOutput::ParaAdjust( const SvxAdjustItem& rAdjust )
const SvxFrameDirectionItem* rFrameDir = pItems?
static_cast< const SvxFrameDirectionItem* >( pItems->GetItem( RES_FRAMEDIR ) ): nullptr;
- short nDir = FRMDIR_ENVIRONMENT;
+ SvxFrameDirection nDir = SvxFrameDirection::Environment;
if( rFrameDir != nullptr )
nDir = rFrameDir->GetValue();
- if ( nDir == FRMDIR_ENVIRONMENT )
+ if ( nDir == SvxFrameDirection::Environment )
nDir = GetExport( ).GetDefaultFrameDirection( );
- bool bRtl = ( nDir == FRMDIR_HORI_RIGHT_TOP );
+ bool bRtl = ( nDir == SvxFrameDirection::Horizontal_RL_TB );
switch ( rAdjust.GetAdjust() )
{
@@ -8082,23 +8082,23 @@ void DocxAttributeOutput::FormatFrameDirection( const SvxFrameDirectionItem& rDi
{
OString sTextFlow;
bool bBiDi = false;
- short nDir = rDirection.GetValue();
+ SvxFrameDirection nDir = rDirection.GetValue();
- if ( nDir == FRMDIR_ENVIRONMENT )
+ if ( nDir == SvxFrameDirection::Environment )
nDir = GetExport( ).GetDefaultFrameDirection( );
switch ( nDir )
{
default:
- case FRMDIR_HORI_LEFT_TOP:
+ case SvxFrameDirection::Horizontal_LR_TB:
sTextFlow = OString( "lrTb" );
break;
- case FRMDIR_HORI_RIGHT_TOP:
+ case SvxFrameDirection::Horizontal_RL_TB:
sTextFlow = OString( "lrTb" );
bBiDi = true;
break;
- case FRMDIR_VERT_TOP_LEFT: // many things but not this one
- case FRMDIR_VERT_TOP_RIGHT:
+ case SvxFrameDirection::Vertical_LR_TB: // many things but not this one
+ case SvxFrameDirection::Vertical_RL_TB:
sTextFlow = OString( "tbRl" );
break;
}
diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx
index 6d790ce9dee6..59452abc62c3 100644
--- a/sw/source/filter/ww8/rtfattributeoutput.cxx
+++ b/sw/source/filter/ww8/rtfattributeoutput.cxx
@@ -865,7 +865,7 @@ void RtfAttributeOutput::TableBidi(ww8::WW8TableNodeInfoInner::Pointer_t pTableT
const SwTable* pTable = pTableTextNodeInfoInner->getTable();
const SwFrameFormat* pFrameFormat = pTable->GetFrameFormat();
- if (m_rExport.TrueFrameDirection(*pFrameFormat) != FRMDIR_HORI_RIGHT_TOP)
+ if (m_rExport.TrueFrameDirection(*pFrameFormat) != SvxFrameDirection::Horizontal_RL_TB)
m_aRowDefs.append(OOO_STRING_SVTOOLS_RTF_LTRROW);
else
m_aRowDefs.append(OOO_STRING_SVTOOLS_RTF_RTLROW);
@@ -3377,7 +3377,7 @@ void RtfAttributeOutput::FormatFrameDirection(const SvxFrameDirectionItem& rDire
{
if (!m_rExport.m_bOutPageDescs)
{
- if (rDirection.GetValue() == FRMDIR_HORI_RIGHT_TOP)
+ if (rDirection.GetValue() == SvxFrameDirection::Horizontal_RL_TB)
m_aStyles.append(OOO_STRING_SVTOOLS_RTF_RTLPAR);
else
m_aStyles.append(OOO_STRING_SVTOOLS_RTF_LTRPAR);
diff --git a/sw/source/filter/ww8/writerwordglue.cxx b/sw/source/filter/ww8/writerwordglue.cxx
index b9fbd570fac0..4cea33ce6ed0 100644
--- a/sw/source/filter/ww8/writerwordglue.cxx
+++ b/sw/source/filter/ww8/writerwordglue.cxx
@@ -523,7 +523,7 @@ namespace sw
OSL_ENSURE(rTextNd.GetDoc(), "No document for node?, suspicious");
if (rTextNd.GetDoc())
{
- if (FRMDIR_HORI_RIGHT_TOP ==
+ if (SvxFrameDirection::Horizontal_RL_TB ==
rTextNd.GetDoc()->GetTextDirection(SwPosition(rTextNd)))
{
bParaIsRTL = true;
diff --git a/sw/source/filter/ww8/wrtw8esh.cxx b/sw/source/filter/ww8/wrtw8esh.cxx
index 63cf2d698f52..d122ffbd1243 100644
--- a/sw/source/filter/ww8/wrtw8esh.cxx
+++ b/sw/source/filter/ww8/wrtw8esh.cxx
@@ -662,7 +662,7 @@ void WW8Export::MiserableRTLFrameFormatHack(SwTwips &rLeft, SwTwips &rRight,
const ww8::Frame &rFrameFormat)
{
//Require nasty bidi swap
- if (FRMDIR_HORI_RIGHT_TOP != m_pDoc->GetTextDirection(rFrameFormat.GetPosition()))
+ if (SvxFrameDirection::Horizontal_RL_TB != m_pDoc->GetTextDirection(rFrameFormat.GetPosition()))
return;
SwTwips nWidth = rRight - rLeft;
@@ -2954,7 +2954,7 @@ sal_Int32 SwEscherEx::WriteTextFlyFrame(const DrawObj &rObj, sal_uInt32 nShapeId
sal_uInt32 nTextBox, DrawObjPointerVector &rPVec)
{
const SwFrameFormat &rFormat = rObj.maContent.GetFrameFormat();
- short nDirection = rObj.mnDirection;
+ SvxFrameDirection nDirection = rObj.mnDirection;
sal_Int32 nBorderThick=0;
OpenContainer( ESCHER_SpContainer );
@@ -2977,14 +2977,14 @@ sal_Int32 SwEscherEx::WriteTextFlyFrame(const DrawObj &rObj, sal_uInt32 nShapeId
default:
OSL_ENSURE(false, "unknown direction type");
SAL_FALLTHROUGH;
- case FRMDIR_HORI_LEFT_TOP:
+ case SvxFrameDirection::Horizontal_LR_TB:
nFlow=mso_txflHorzN;
break;
- case FRMDIR_HORI_RIGHT_TOP:
+ case SvxFrameDirection::Horizontal_RL_TB:
nFlow=mso_txflHorzN;
break;
- case FRMDIR_VERT_TOP_LEFT: //not really possible in word
- case FRMDIR_VERT_TOP_RIGHT:
+ case SvxFrameDirection::Vertical_LR_TB: //not really possible in word
+ case SvxFrameDirection::Vertical_RL_TB:
nFlow=mso_txflTtoBA;
break;
}
diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx
index cdfde537b037..92a4c358bd16 100644
--- a/sw/source/filter/ww8/wrtw8nds.cxx
+++ b/sw/source/filter/ww8/wrtw8nds.cxx
@@ -187,7 +187,7 @@ SwWW8AttrIter::SwWW8AttrIter(MSWordExportBase& rWr, const SwTextNode& rTextNd) :
{
SwPosition aPos(rTextNd);
- if (FRMDIR_HORI_RIGHT_TOP == rWr.m_pDoc->GetTextDirection(aPos))
+ if (SvxFrameDirection::Horizontal_RL_TB == rWr.m_pDoc->GetTextDirection(aPos))
mbParaIsRTL = true;
else
mbParaIsRTL = false;
@@ -1488,7 +1488,7 @@ const SwRedlineData* SwWW8AttrIter::GetRunLevelRedline( sal_Int32 nPos )
return nullptr;
}
-short MSWordExportBase::GetCurrentPageDirection() const
+SvxFrameDirection MSWordExportBase::GetCurrentPageDirection() const
{
const SwFrameFormat &rFormat = m_pAktPageDesc
? m_pAktPageDesc->GetMaster()
@@ -1496,9 +1496,9 @@ short MSWordExportBase::GetCurrentPageDirection() const
return rFormat.GetFrameDir().GetValue();
}
-short MSWordExportBase::GetDefaultFrameDirection( ) const
+SvxFrameDirection MSWordExportBase::GetDefaultFrameDirection( ) const
{
- short nDir = FRMDIR_ENVIRONMENT;
+ SvxFrameDirection nDir = SvxFrameDirection::Environment;
if ( m_bOutPageDescs )
nDir = GetCurrentPageDirection( );
@@ -1517,32 +1517,32 @@ short MSWordExportBase::GetDefaultFrameDirection( ) const
else if ( dynamic_cast< const SwTextFormatColl *>( m_pOutFormatNode ) != nullptr )
{
if ( MsLangId::isRightToLeft( static_cast<LanguageType>(GetAppLanguage())) )
- nDir = FRMDIR_HORI_RIGHT_TOP;
+ nDir = SvxFrameDirection::Horizontal_RL_TB;
else
- nDir = FRMDIR_HORI_LEFT_TOP; //what else can we do :-(
+ nDir = SvxFrameDirection::Horizontal_LR_TB; //what else can we do :-(
}
}
- if ( nDir == FRMDIR_ENVIRONMENT )
+ if ( nDir == SvxFrameDirection::Environment )
{
// fdo#44029 put direction right when the locale are RTL.
if( MsLangId::isRightToLeft( static_cast<LanguageType>(GetAppLanguage())) )
- nDir = FRMDIR_HORI_RIGHT_TOP;
+ nDir = SvxFrameDirection::Horizontal_RL_TB;
else
- nDir = FRMDIR_HORI_LEFT_TOP; //Set something
+ nDir = SvxFrameDirection::Horizontal_LR_TB; //Set something
}
return nDir;
}
-short MSWordExportBase::TrueFrameDirection( const SwFrameFormat &rFlyFormat ) const
+SvxFrameDirection MSWordExportBase::TrueFrameDirection( const SwFrameFormat &rFlyFormat ) const
{
const SwFrameFormat *pFlyFormat = &rFlyFormat;
const SvxFrameDirectionItem* pItem = nullptr;
while ( pFlyFormat )
{
pItem = &pFlyFormat->GetFrameDir();
- if ( FRMDIR_ENVIRONMENT == pItem->GetValue() )
+ if ( SvxFrameDirection::Environment == pItem->GetValue() )
{
pItem = nullptr;
const SwFormatAnchor* pAnchor = &pFlyFormat->GetAnchor();
@@ -1558,13 +1558,13 @@ short MSWordExportBase::TrueFrameDirection( const SwFrameFormat &rFlyFormat ) co
pFlyFormat = nullptr;
}
- short nRet;
+ SvxFrameDirection nRet;
if ( pItem )
nRet = pItem->GetValue();
else
nRet = GetCurrentPageDirection();
- OSL_ENSURE( nRet != FRMDIR_ENVIRONMENT, "leaving with environment direction" );
+ OSL_ENSURE( nRet != SvxFrameDirection::Environment, "leaving with environment direction" );
return nRet;
}
@@ -2601,21 +2601,21 @@ void MSWordExportBase::OutputTextNode( const SwTextNode& rNode )
}
/*
- If a given para is using the FRMDIR_ENVIRONMENT direction we
+ If a given para is using the SvxFrameDirection::Environment direction we
cannot export that, its its ltr then that's ok as thats word's
default. Otherwise we must add a RTL attribute to our export list
*/
const SvxFrameDirectionItem* pItem = static_cast<const SvxFrameDirectionItem*>(
rNode.GetSwAttrSet().GetItem(RES_FRAMEDIR));
if (
- (!pItem || pItem->GetValue() == FRMDIR_ENVIRONMENT) &&
+ (!pItem || pItem->GetValue() == SvxFrameDirection::Environment) &&
aAttrIter.IsParaRTL()
)
{
if ( !pTmpSet )
pTmpSet = new SfxItemSet(rNode.GetSwAttrSet());
- pTmpSet->Put(SvxFrameDirectionItem(FRMDIR_HORI_RIGHT_TOP, RES_FRAMEDIR));
+ pTmpSet->Put(SvxFrameDirectionItem(SvxFrameDirection::Horizontal_RL_TB, RES_FRAMEDIR));
}
// move code for handling of numbered,
// but not counted paragraphs to this place. Otherwise, the paragraph
diff --git a/sw/source/filter/ww8/wrtw8sty.cxx b/sw/source/filter/ww8/wrtw8sty.cxx
index dfca863a8cf9..f79de76257a1 100644
--- a/sw/source/filter/ww8/wrtw8sty.cxx
+++ b/sw/source/filter/ww8/wrtw8sty.cxx
@@ -1592,7 +1592,7 @@ void MSWordExportBase::SectionProperties( const WW8_SepInfo& rSepInfo, WW8_PdAtt
//Cannot export as normal page framedir, as continuous sections
//cannot contain any grid settings like proper sections
- AttrOutput().SectionBiDi( FRMDIR_HORI_RIGHT_TOP == TrueFrameDirection( *rSepInfo.pSectionFormat ) );
+ AttrOutput().SectionBiDi( SvxFrameDirection::Horizontal_RL_TB == TrueFrameDirection( *rSepInfo.pSectionFormat ) );
m_pISet = pOldI;
}
diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx
index 108421820af0..90aa97886cde 100644
--- a/sw/source/filter/ww8/wrtww8.cxx
+++ b/sw/source/filter/ww8/wrtww8.cxx
@@ -2119,7 +2119,7 @@ void WW8AttributeOutput::TableVerticalCell( ww8::WW8TableNodeInfoInner::Pointer_
const SwTableBox * pTabBox1 = rTableBoxes[n];
const SwFrameFormat * pFrameFormat = pTabBox1->GetFrameFormat();
- if ( FRMDIR_VERT_TOP_RIGHT == m_rWW8Export.TrueFrameDirection( *pFrameFormat ) )
+ if ( SvxFrameDirection::Vertical_RL_TB == m_rWW8Export.TrueFrameDirection( *pFrameFormat ) )
{
m_rWW8Export.InsUInt16( NS_sprm::sprmTTextFlow );
m_rWW8Export.pO->push_back( sal_uInt8(n) ); //start range
@@ -2154,7 +2154,7 @@ void WW8AttributeOutput::TableBidi( ww8::WW8TableNodeInfoInner::Pointer_t pTable
const SwTable * pTable = pTableTextNodeInfoInner->getTable();
const SwFrameFormat * pFrameFormat = pTable->GetFrameFormat();
- if ( m_rWW8Export.TrueFrameDirection(*pFrameFormat) == FRMDIR_HORI_RIGHT_TOP )
+ if ( m_rWW8Export.TrueFrameDirection(*pFrameFormat) == SvxFrameDirection::Horizontal_RL_TB )
{
m_rWW8Export.InsUInt16( NS_sprm::sprmTFBiDi );
m_rWW8Export.InsUInt16( 1 );
diff --git a/sw/source/filter/ww8/wrtww8.hxx b/sw/source/filter/ww8/wrtww8.hxx
index d4e58c5fc2da..063b556e58f5 100644
--- a/sw/source/filter/ww8/wrtww8.hxx
+++ b/sw/source/filter/ww8/wrtww8.hxx
@@ -337,14 +337,14 @@ class DrawObj
public:
WW8_CP mnCp; // CP-Pos of references
sal_uInt32 mnShapeId; // ShapeId for the SwFrameFormats
- ww8::Frame maContent; // the frame itself
+ ww8::Frame maContent; // the frame itself
Point maParentPos; // Points
sal_Int32 mnThick; // Border Thicknesses
- short mnDirection; // If BiDi or not
+ SvxFrameDirection mnDirection; // If BiDi or not
unsigned int mnHdFtIndex; // 0 for main text, +1 for each subsequent
// msword hd/ft
- DrawObj(const ww8::Frame &rContent, WW8_CP nCp, Point aParentPos, short nDir,
+ DrawObj(const ww8::Frame &rContent, WW8_CP nCp, Point aParentPos, SvxFrameDirection nDir,
unsigned int nHdFtIndex)
: mnCp(nCp), mnShapeId(0), maContent(rContent), maParentPos(aParentPos),
mnThick(0), mnDirection(nDir), mnHdFtIndex(nHdFtIndex) {}
@@ -622,13 +622,13 @@ public:
/// Use OutputItem() on an item set according to the parameters.
void OutputItemSet( const SfxItemSet& rSet, bool bPapFormat, bool bChpFormat, sal_uInt16 nScript, bool bExportParentItemSet );
- short GetDefaultFrameDirection( ) const;
+ SvxFrameDirection GetDefaultFrameDirection( ) const;
/// Right to left?
- short TrueFrameDirection( const SwFrameFormat& rFlyFormat ) const;
+ SvxFrameDirection TrueFrameDirection( const SwFrameFormat& rFlyFormat ) const;
/// Right to left?
- short GetCurrentPageDirection() const;
+ SvxFrameDirection GetCurrentPageDirection() const;
/// In case of numbering restart.
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;
}
diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx
index af5918404a3c..f88d91c87219 100644
--- a/sw/source/filter/ww8/ww8graf.cxx
+++ b/sw/source/filter/ww8/ww8graf.cxx
@@ -2885,7 +2885,7 @@ SwFlyFrameFormat* SwWW8ImplReader::ConvertDrawTextToFly(SdrObject* &rpObject,
SdrTextObj *pSdrTextObj = dynamic_cast<SdrTextObj*>(rpObject);
if (pSdrTextObj && pSdrTextObj->IsVerticalWriting())
- rFlySet.Put(SvxFrameDirectionItem(FRMDIR_VERT_TOP_RIGHT, RES_FRAMEDIR));
+ rFlySet.Put(SvxFrameDirectionItem(SvxFrameDirection::Vertical_RL_TB, RES_FRAMEDIR));
pRetFrameFormat = m_rDoc.MakeFlySection(eAnchor, m_pPaM->GetPoint(), &rFlySet);
OSL_ENSURE(pRetFrameFormat->GetAnchor().GetAnchorId() == eAnchor,
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;
}
diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx
index 57ac9b2c7ed3..82368638ed1b 100644
--- a/sw/source/filter/ww8/ww8par6.cxx
+++ b/sw/source/filter/ww8/ww8par6.cxx
@@ -167,36 +167,36 @@ void wwSection::SetDirection()
OSL_ENSURE(false, "Unknown layout type");
SAL_FALLTHROUGH;
case 0:
- meDir=FRMDIR_HORI_LEFT_TOP;
+ meDir=SvxFrameDirection::Horizontal_LR_TB;
break;
case 1:
- meDir=FRMDIR_VERT_TOP_RIGHT;
+ meDir=SvxFrameDirection::Vertical_RL_TB;
break;
case 2:
//asian letters are not rotated, western are. We can't import
//bottom to top going left to right, we can't do this in
//pages, (in drawboxes we could partly hack it with a rotated
//drawing box, though not frame)
- meDir=FRMDIR_VERT_TOP_RIGHT;
+ meDir=SvxFrameDirection::Vertical_RL_TB;
break;
case 3:
//asian letters are not rotated, western are. We can't import
- meDir=FRMDIR_VERT_TOP_RIGHT;
+ meDir=SvxFrameDirection::Vertical_RL_TB;
break;
case 4:
//asian letters are rotated, western not. We can't import
- meDir=FRMDIR_HORI_LEFT_TOP;
+ meDir=SvxFrameDirection::Horizontal_LR_TB;
break;
}
sal_uInt8 bRTLPgn = maSep.fBiDi;
- if ((meDir == FRMDIR_HORI_LEFT_TOP) && bRTLPgn)
- meDir = FRMDIR_HORI_RIGHT_TOP;
+ if ((meDir == SvxFrameDirection::Horizontal_LR_TB) && bRTLPgn)
+ meDir = SvxFrameDirection::Horizontal_RL_TB;
}
bool wwSection::IsVertical() const
{
- if (meDir == FRMDIR_VERT_TOP_RIGHT || meDir == FRMDIR_VERT_TOP_LEFT)
+ if (meDir == SvxFrameDirection::Vertical_RL_TB || meDir == SvxFrameDirection::Vertical_LR_TB)
return true;
return false;
}
@@ -316,7 +316,7 @@ void SwWW8ImplReader::Read_ParaBiDi(sal_uInt16, const sal_uInt8* pData, short nL
else
{
SvxFrameDirection eDir =
- *pData ? FRMDIR_HORI_RIGHT_TOP : FRMDIR_HORI_LEFT_TOP;
+ *pData ? SvxFrameDirection::Horizontal_RL_TB : SvxFrameDirection::Horizontal_LR_TB;
NewAttr(SvxFrameDirectionItem(eDir, RES_FRAMEDIR));
}
}
@@ -651,7 +651,7 @@ SwSectionFormat *wwSectionManager::InsertSection(
bool bRTLPgn = !maSegments.empty() && maSegments.back().IsBiDi();
aSet.Put(SvxFrameDirectionItem(
- bRTLPgn ? FRMDIR_HORI_RIGHT_TOP : FRMDIR_HORI_LEFT_TOP, RES_FRAMEDIR));
+ bRTLPgn ? SvxFrameDirection::Horizontal_RL_TB : SvxFrameDirection::Horizontal_LR_TB, RES_FRAMEDIR));
if (2 == mrReader.m_pWDop->fpc)
aSet.Put( SwFormatFootnoteAtTextEnd(FTNEND_ATTXTEND));
@@ -757,7 +757,7 @@ void SwWW8ImplReader::HandleLineNumbering(const wwSection &rSection)
wwSection::wwSection(const SwPosition &rPos) : maStart(rPos.nNode)
, mpSection(nullptr)
, mpPage(nullptr)
- , meDir(FRMDIR_HORI_LEFT_TOP)
+ , meDir(SvxFrameDirection::Horizontal_LR_TB)
, nPgWidth(SvxPaperInfo::GetPaperSize(PAPER_A4).Width())
, nPgLeft(MM_250)
, nPgRight(MM_250)
@@ -2018,7 +2018,7 @@ WW8FlySet::WW8FlySet(SwWW8ImplReader& rReader, const WW8FlyPara* pFW,
if (!rReader.m_bNewDoc)
Reader::ResetFrameFormatAttrs(*this); // remove distance/border
// position
- Put(SvxFrameDirectionItem(FRMDIR_HORI_LEFT_TOP, RES_FRAMEDIR));
+ Put(SvxFrameDirectionItem(SvxFrameDirection::Horizontal_LR_TB, RES_FRAMEDIR));
/*Below can all go when we have from left in rtl mode*/
SwTwips nXPos = pFS->nXPos;
@@ -2073,7 +2073,7 @@ WW8FlySet::WW8FlySet( SwWW8ImplReader& rReader, const SwPaM* pPaM,
{
Init(rReader, pPaM);
- Put(SvxFrameDirectionItem(FRMDIR_HORI_LEFT_TOP, RES_FRAMEDIR));
+ Put(SvxFrameDirectionItem(SvxFrameDirection::Horizontal_LR_TB, RES_FRAMEDIR));
short aSizeArray[5]={0};
/*
@@ -4378,7 +4378,7 @@ bool SwWW8ImplReader::IsRightToLeft()
{
const SvxFrameDirectionItem* pItem=
static_cast<const SvxFrameDirectionItem*>(GetFormatAttr(RES_FRAMEDIR));
- if (pItem && (pItem->GetValue() == FRMDIR_HORI_RIGHT_TOP))
+ if (pItem && (pItem->GetValue() == SvxFrameDirection::Horizontal_RL_TB))
bRTL = true;
}
return bRTL;
diff --git a/sw/source/ui/dialog/uiregionsw.cxx b/sw/source/ui/dialog/uiregionsw.cxx
index 6fda9ca1ef36..54afd020a52a 100644
--- a/sw/source/ui/dialog/uiregionsw.cxx
+++ b/sw/source/ui/dialog/uiregionsw.cxx
@@ -193,7 +193,7 @@ public:
SectRepr::SectRepr( size_t nPos, SwSection& rSect )
: m_SectionData( rSect )
, m_Brush( RES_BACKGROUND )
- , m_FrameDirItem( FRMDIR_ENVIRONMENT, RES_FRAMEDIR )
+ , m_FrameDirItem( SvxFrameDirection::Environment, RES_FRAMEDIR )
, m_LRSpaceItem( RES_LR_SPACE )
, m_nArrPos(nPos)
, m_bContent(m_SectionData.GetLinkFileName().isEmpty())
diff --git a/sw/source/ui/frmdlg/column.cxx b/sw/source/ui/frmdlg/column.cxx
index 9954623cce85..5b5f3c855672 100644
--- a/sw/source/ui/frmdlg/column.cxx
+++ b/sw/source/ui/frmdlg/column.cxx
@@ -616,7 +616,7 @@ void SwColumnPage::Reset(const SfxItemSet *rSet)
if( SfxItemState::DEFAULT <= rSet->GetItemState( RES_FRAMEDIR ) )
{
const SvxFrameDirectionItem& rItem = static_cast<const SvxFrameDirectionItem&>(rSet->Get(RES_FRAMEDIR));
- sal_uIntPtr nVal = rItem.GetValue();
+ SvxFrameDirection nVal = rItem.GetValue();
const sal_Int32 nPos = m_pTextDirectionLB->GetEntryPos( reinterpret_cast<void*>(nVal) );
m_pTextDirectionLB->SelectEntryPos( nPos );
m_pTextDirectionLB->SaveValue();
@@ -1204,8 +1204,8 @@ void SwColumnPage::ActivatePage(const SfxItemSet& rSet)
{
const SvxFrameDirectionItem& rDirItem =
static_cast<const SvxFrameDirectionItem&>(rSet.Get(RES_FRAMEDIR));
- bVertical = rDirItem.GetValue() == FRMDIR_VERT_TOP_RIGHT||
- rDirItem.GetValue() == FRMDIR_VERT_TOP_LEFT;
+ bVertical = rDirItem.GetValue() == SvxFrameDirection::Vertical_RL_TB||
+ rDirItem.GetValue() == SvxFrameDirection::Vertical_LR_TB;
}
if (!m_bFrame)
diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx
index bfcf5c6a1fce..a5eb7386a6d7 100644
--- a/sw/source/ui/frmdlg/frmpage.cxx
+++ b/sw/source/ui/frmdlg/frmpage.cxx
@@ -3079,13 +3079,13 @@ void SwFrameAddPage::Reset(const SfxItemSet *rSet )
//vertical text flow is not possible in HTML
if(m_bHtmlMode)
{
- sal_uLong nData = FRMDIR_VERT_TOP_RIGHT;
+ SvxFrameDirection nData = SvxFrameDirection::Vertical_RL_TB;
m_pTextFlowLB->RemoveEntry(m_pTextFlowLB->GetEntryPos(reinterpret_cast<void*>(nData)));
}
- sal_uInt16 nVal = static_cast<const SvxFrameDirectionItem&>(rSet->Get(RES_FRAMEDIR)).GetValue();
+ SvxFrameDirection nVal = static_cast<const SvxFrameDirectionItem&>(rSet->Get(RES_FRAMEDIR)).GetValue();
sal_Int32 nPos;
for( nPos = m_pTextFlowLB->GetEntryCount(); nPos; )
- if( (sal_uInt16)reinterpret_cast<sal_IntPtr>(m_pTextFlowLB->GetEntryData( --nPos )) == nVal )
+ if( (SvxFrameDirection)reinterpret_cast<sal_IntPtr>(m_pTextFlowLB->GetEntryData( --nPos )) == nVal )
break;
m_pTextFlowLB->SelectEntryPos( nPos );
m_pTextFlowLB->SaveValue();
diff --git a/sw/source/ui/misc/pggrid.cxx b/sw/source/ui/misc/pggrid.cxx
index e622569496ca..c9b37dbeefb4 100644
--- a/sw/source/ui/misc/pggrid.cxx
+++ b/sw/source/ui/misc/pggrid.cxx
@@ -300,8 +300,8 @@ void SwTextGridPage::UpdatePageSize(const SfxItemSet& rSet)
{
const SvxFrameDirectionItem& rDirItem =
static_cast<const SvxFrameDirectionItem&>(rSet.Get(RES_FRAMEDIR));
- m_bVertical = rDirItem.GetValue() == FRMDIR_VERT_TOP_RIGHT||
- rDirItem.GetValue() == FRMDIR_VERT_TOP_LEFT;
+ m_bVertical = rDirItem.GetValue() == SvxFrameDirection::Vertical_RL_TB||
+ rDirItem.GetValue() == SvxFrameDirection::Vertical_LR_TB;
}
if( SfxItemState::SET == rSet.GetItemState( SID_ATTR_PAGE_SIZE ))
diff --git a/sw/source/uibase/app/docshini.cxx b/sw/source/uibase/app/docshini.cxx
index d2c3e85b4d7f..9c6663518d99 100644
--- a/sw/source/uibase/app/docshini.cxx
+++ b/sw/source/uibase/app/docshini.cxx
@@ -309,7 +309,7 @@ bool SwDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor )
/* #106748# If the default frame direction of a document is RTL
the default adjustment is to the right. */
if( !bHTMLTemplSet &&
- FRMDIR_HORI_RIGHT_TOP == GetDefaultFrameDirection(GetAppLanguage()) )
+ SvxFrameDirection::Horizontal_RL_TB == GetDefaultFrameDirection(GetAppLanguage()) )
{
m_pDoc->SetDefault( SvxAdjustItem(SvxAdjust::Right, RES_PARATR_ADJUST ) );
}
diff --git a/sw/source/uibase/frmdlg/colex.cxx b/sw/source/uibase/frmdlg/colex.cxx
index 01ae1d42056f..412c0cd9b32d 100644
--- a/sw/source/uibase/frmdlg/colex.cxx
+++ b/sw/source/uibase/frmdlg/colex.cxx
@@ -46,8 +46,8 @@ void SwPageExample::UpdateExample( const SfxItemSet& rSet )
{
const SvxFrameDirectionItem& rDirItem =
static_cast<const SvxFrameDirectionItem&>(rSet.Get(RES_FRAMEDIR));
- m_bVertical = rDirItem.GetValue() == FRMDIR_VERT_TOP_RIGHT||
- rDirItem.GetValue() == FRMDIR_VERT_TOP_LEFT;
+ m_bVertical = rDirItem.GetValue() == SvxFrameDirection::Vertical_RL_TB||
+ rDirItem.GetValue() == SvxFrameDirection::Vertical_LR_TB;
}
SfxItemPool* pPool = rSet.GetPool();
diff --git a/sw/source/uibase/shells/annotsh.cxx b/sw/source/uibase/shells/annotsh.cxx
index 4bf14b35c692..499cc63a85ea 100644
--- a/sw/source/uibase/shells/annotsh.cxx
+++ b/sw/source/uibase/shells/annotsh.cxx
@@ -587,13 +587,13 @@ void SwAnnotationShell::Exec( SfxRequest &rReq )
if( bLeftToRight )
{
- aAttr.Put( SvxFrameDirectionItem( FRMDIR_HORI_LEFT_TOP, EE_PARA_WRITINGDIR ) );
+ aAttr.Put( SvxFrameDirectionItem( SvxFrameDirection::Horizontal_LR_TB, EE_PARA_WRITINGDIR ) );
if( nAdjust == SvxAdjust::Right )
aAttr.Put( SvxAdjustItem( SvxAdjust::Left, EE_PARA_JUST ) );
}
else
{
- aAttr.Put( SvxFrameDirectionItem( FRMDIR_HORI_RIGHT_TOP, EE_PARA_WRITINGDIR ) );
+ aAttr.Put( SvxFrameDirectionItem( SvxFrameDirection::Horizontal_RL_TB, EE_PARA_WRITINGDIR ) );
if( nAdjust == SvxAdjust::Left )
aAttr.Put( SvxAdjustItem( SvxAdjust::Right, EE_PARA_JUST ) );
}
@@ -821,13 +821,13 @@ void SwAnnotationShell::GetState(SfxItemSet& rSet)
bool bFlag = false;
switch( static_cast<const SvxFrameDirectionItem&>( aEditAttr.Get( EE_PARA_WRITINGDIR ) ).GetValue() )
{
- case FRMDIR_HORI_LEFT_TOP:
+ case SvxFrameDirection::Horizontal_LR_TB:
{
bFlag = nWhich == SID_ATTR_PARA_LEFT_TO_RIGHT;
rSet.Put( SfxBoolItem( nWhich, bFlag ));
break;
}
- case FRMDIR_HORI_RIGHT_TOP:
+ case SvxFrameDirection::Horizontal_RL_TB:
{
bFlag = nWhich != SID_ATTR_PARA_LEFT_TO_RIGHT;
rSet.Put( SfxBoolItem( nWhich, bFlag ));
diff --git a/sw/source/uibase/shells/drwtxtex.cxx b/sw/source/uibase/shells/drwtxtex.cxx
index cade0dfd07bc..59d12c4fcb97 100644
--- a/sw/source/uibase/shells/drwtxtex.cxx
+++ b/sw/source/uibase/shells/drwtxtex.cxx
@@ -532,13 +532,13 @@ void SwDrawTextShell::Execute( SfxRequest &rReq )
if( bLeftToRight )
{
- aAttr.Put( SvxFrameDirectionItem( FRMDIR_HORI_LEFT_TOP, EE_PARA_WRITINGDIR ) );
+ aAttr.Put( SvxFrameDirectionItem( SvxFrameDirection::Horizontal_LR_TB, EE_PARA_WRITINGDIR ) );
if( nAdjust == SvxAdjust::Right )
aAttr.Put( SvxAdjustItem( SvxAdjust::Left, EE_PARA_JUST ) );
}
else
{
- aAttr.Put( SvxFrameDirectionItem( FRMDIR_HORI_RIGHT_TOP, EE_PARA_WRITINGDIR ) );
+ aAttr.Put( SvxFrameDirectionItem( SvxFrameDirection::Horizontal_RL_TB, EE_PARA_WRITINGDIR ) );
if( nAdjust == SvxAdjust::Left )
aAttr.Put( SvxAdjustItem( SvxAdjust::Right, EE_PARA_JUST ) );
}
@@ -815,11 +815,11 @@ ASK_ESCAPE:
{
switch( static_cast<const SvxFrameDirectionItem&>( aEditAttr.Get( EE_PARA_WRITINGDIR ) ).GetValue() )
{
- case FRMDIR_HORI_LEFT_TOP:
+ case SvxFrameDirection::Horizontal_LR_TB:
bFlag = nWhich == SID_ATTR_PARA_LEFT_TO_RIGHT;
break;
- case FRMDIR_HORI_RIGHT_TOP:
+ case SvxFrameDirection::Horizontal_RL_TB:
bFlag = nWhich != SID_ATTR_PARA_LEFT_TO_RIGHT;
break;
default:
diff --git a/sw/source/uibase/shells/tabsh.cxx b/sw/source/uibase/shells/tabsh.cxx
index 01083d12c01a..585222a38f59 100644
--- a/sw/source/uibase/shells/tabsh.cxx
+++ b/sw/source/uibase/shells/tabsh.cxx
@@ -171,7 +171,7 @@ static SwTableRep* lcl_TableParamToItemSet( SfxItemSet& rSet, SwWrtShell &rSh )
rSet.Put( aBrush );
// text direction in boxes
- SvxFrameDirectionItem aBoxDirection( FRMDIR_ENVIRONMENT, RES_FRAMEDIR );
+ SvxFrameDirectionItem aBoxDirection( SvxFrameDirection::Environment, RES_FRAMEDIR );
if(rSh.GetBoxDirection( aBoxDirection ))
{
aBoxDirection.SetWhich(FN_TABLE_BOX_TEXTORIENTATION);
@@ -328,7 +328,7 @@ void ItemSetToTableParam( const SfxItemSet& rSet,
if(bBoxDirection)
{
- SvxFrameDirectionItem aDirection( FRMDIR_ENVIRONMENT, RES_FRAMEDIR );
+ SvxFrameDirectionItem aDirection( SvxFrameDirection::Environment, RES_FRAMEDIR );
aDirection.SetValue(static_cast< const SvxFrameDirectionItem* >(pBoxDirection)->GetValue());
rSh.SetBoxDirection(aDirection);
}
diff --git a/sw/source/uibase/shells/txtattr.cxx b/sw/source/uibase/shells/txtattr.cxx
index b0f753760721..efc78b4d727e 100644
--- a/sw/source/uibase/shells/txtattr.cxx
+++ b/sw/source/uibase/shells/txtattr.cxx
@@ -391,7 +391,7 @@ SET_LINESPACE:
SvxFrameDirection eFrameDirection =
(SID_ATTR_PARA_LEFT_TO_RIGHT == nSlot) ?
- FRMDIR_HORI_LEFT_TOP : FRMDIR_HORI_RIGHT_TOP;
+ SvxFrameDirection::Horizontal_LR_TB : SvxFrameDirection::Horizontal_RL_TB;
aSet.Put( SvxFrameDirectionItem( eFrameDirection, RES_FRAMEDIR ) );
if (bChgAdjust)
@@ -749,15 +749,15 @@ void SwTextShell::GetAttrState(SfxItemSet &rSet)
{
SvxFrameDirection eFrameDir =
static_cast<const SvxFrameDirectionItem& >(aCoreSet.Get(RES_FRAMEDIR)).GetValue();
- if (FRMDIR_ENVIRONMENT == eFrameDir)
+ if (SvxFrameDirection::Environment == eFrameDir)
{
eFrameDir = rSh.IsInRightToLeftText() ?
- FRMDIR_HORI_RIGHT_TOP : FRMDIR_HORI_LEFT_TOP;
+ SvxFrameDirection::Horizontal_RL_TB : SvxFrameDirection::Horizontal_LR_TB;
}
bFlag = (SID_ATTR_PARA_LEFT_TO_RIGHT == nSlot &&
- FRMDIR_HORI_LEFT_TOP == eFrameDir) ||
+ SvxFrameDirection::Horizontal_LR_TB == eFrameDir) ||
(SID_ATTR_PARA_RIGHT_TO_LEFT == nSlot &&
- FRMDIR_HORI_RIGHT_TOP == eFrameDir);
+ SvxFrameDirection::Horizontal_RL_TB == eFrameDir);
}
else
{
diff --git a/sw/source/uibase/uiview/formatclipboard.cxx b/sw/source/uibase/uiview/formatclipboard.cxx
index cab5e7bbee24..99e49c2ce089 100644
--- a/sw/source/uibase/uiview/formatclipboard.cxx
+++ b/sw/source/uibase/uiview/formatclipboard.cxx
@@ -106,7 +106,7 @@ void lcl_getTableAttributes( SfxItemSet& rSet, SwWrtShell &rSh )
rSet.Put(aBoxInfo);
rSh.GetTabBorders( rSet );
- SvxFrameDirectionItem aBoxDirection( FRMDIR_ENVIRONMENT, RES_FRAMEDIR );
+ SvxFrameDirectionItem aBoxDirection( SvxFrameDirection::Environment, RES_FRAMEDIR );
if(rSh.GetBoxDirection( aBoxDirection ))
{
aBoxDirection.SetWhich(FN_TABLE_BOX_TEXTORIENTATION);
@@ -209,7 +209,7 @@ void lcl_setTableAttributes( const SfxItemSet& rSet, SwWrtShell &rSh )
if( SfxItemState::SET == rSet.GetItemState( FN_TABLE_BOX_TEXTORIENTATION, false, &pItem) )
{
- SvxFrameDirectionItem aDirection( FRMDIR_ENVIRONMENT, RES_FRAMEDIR );
+ SvxFrameDirectionItem aDirection( SvxFrameDirection::Environment, RES_FRAMEDIR );
aDirection.SetValue(static_cast< const SvxFrameDirectionItem* >(pItem)->GetValue());
rSh.SetBoxDirection(aDirection);
}
diff --git a/sw/source/uibase/uiview/viewtab.cxx b/sw/source/uibase/uiview/viewtab.cxx
index c656c404047b..98bf19dcfca2 100644
--- a/sw/source/uibase/uiview/viewtab.cxx
+++ b/sw/source/uibase/uiview/viewtab.cxx
@@ -1812,7 +1812,7 @@ void SwView::StateTabWin(SfxItemSet& rSet)
{ // Columns on the page
const SwFrameFormat& rMaster = rDesc.GetMaster();
SwFormatCol aCol(rMaster.GetCol());
- if(rFrameDir.GetValue() == FRMDIR_HORI_RIGHT_TOP)
+ if(rFrameDir.GetValue() == SvxFrameDirection::Horizontal_RL_TB)
nNum = aCol.GetColumns().size() - nNum;
else
nNum--;