summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-05-30 14:00:22 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-06-03 11:34:23 +0000
commit52225a3b7fd48f79e8376caf498564b7cffc152b (patch)
tree73fafae95a446e7db3d1908c53cc79749faa30b6 /sw
parent1741c0ff36e57f0629ff360a79b18c2d11bb8092 (diff)
Convert ComplexTextLayoutMode to scoped enum
Change-Id: I257f8e15fec92f0701235a6fe4b6a2272498c4f1 Reviewed-on: https://gerrit.libreoffice.org/25667 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/inc/txtfrm.hxx2
-rw-r--r--sw/source/core/text/inftxt.cxx10
-rw-r--r--sw/source/core/text/itradj.cxx4
-rw-r--r--sw/source/core/text/porlin.cxx2
-rw-r--r--sw/source/core/text/txtfrm.cxx6
-rw-r--r--sw/source/core/txtnode/fntcache.cxx6
-rw-r--r--sw/source/core/txtnode/fntcap.cxx4
-rw-r--r--sw/source/core/txtnode/swfont.cxx2
8 files changed, 18 insertions, 18 deletions
diff --git a/sw/source/core/inc/txtfrm.hxx b/sw/source/core/inc/txtfrm.hxx
index 567bd19dd1e9..8ba3bca167bf 100644
--- a/sw/source/core/inc/txtfrm.hxx
+++ b/sw/source/core/inc/txtfrm.hxx
@@ -794,7 +794,7 @@ public:
class SwLayoutModeModifier
{
const OutputDevice& m_rOut;
- ComplexTextLayoutMode m_nOldLayoutMode;
+ ComplexTextLayoutFlags m_nOldLayoutMode;
public:
SwLayoutModeModifier( const OutputDevice& rOutp );
~SwLayoutModeModifier();
diff --git a/sw/source/core/text/inftxt.cxx b/sw/source/core/text/inftxt.cxx
index acc48ea81c27..344c94aaa37e 100644
--- a/sw/source/core/text/inftxt.cxx
+++ b/sw/source/core/text/inftxt.cxx
@@ -284,14 +284,14 @@ void SwTextSizeInfo::CtorInitTextSizeInfo( OutputDevice* pRenderContext, SwTextF
// Set default layout mode ( LTR or RTL ).
if ( m_pFrame->IsRightToLeft() )
{
- m_pOut->SetLayoutMode( TEXT_LAYOUT_BIDI_STRONG | TEXT_LAYOUT_BIDI_RTL );
- m_pRef->SetLayoutMode( TEXT_LAYOUT_BIDI_STRONG | TEXT_LAYOUT_BIDI_RTL );
+ m_pOut->SetLayoutMode( ComplexTextLayoutFlags::BiDiStrong | ComplexTextLayoutFlags::BiDiRtl );
+ m_pRef->SetLayoutMode( ComplexTextLayoutFlags::BiDiStrong | ComplexTextLayoutFlags::BiDiRtl );
m_nDirection = DIR_RIGHT2LEFT;
}
else
{
- m_pOut->SetLayoutMode( TEXT_LAYOUT_BIDI_STRONG );
- m_pRef->SetLayoutMode( TEXT_LAYOUT_BIDI_STRONG );
+ m_pOut->SetLayoutMode( ComplexTextLayoutFlags::BiDiStrong );
+ m_pRef->SetLayoutMode( ComplexTextLayoutFlags::BiDiStrong );
m_nDirection = DIR_LEFT2RIGHT;
}
@@ -591,7 +591,7 @@ void SwTextPaintInfo::DrawText_( const OUString &rText, const SwLinePortion &rPo
if ( GetTextFrame()->IsRightToLeft() )
GetTextFrame()->SwitchLTRtoRTL( aPoint );
- if ( TEXT_LAYOUT_BIDI_STRONG != GetOut()->GetLayoutMode() )
+ if ( ComplexTextLayoutFlags::BiDiStrong != GetOut()->GetLayoutMode() )
aPoint.X() -= rPor.Width();
if ( GetTextFrame()->IsVertical() )
diff --git a/sw/source/core/text/itradj.cxx b/sw/source/core/text/itradj.cxx
index 721950e75c7a..d5261ea83a04 100644
--- a/sw/source/core/text/itradj.cxx
+++ b/sw/source/core/text/itradj.cxx
@@ -163,8 +163,8 @@ static bool lcl_CheckKashidaPositions( SwScriptInfo& rSI, SwTextSizeInfo& rInf,
}
else
{
- ComplexTextLayoutMode nOldLayout = rInf.GetOut()->GetLayoutMode();
- rInf.GetOut()->SetLayoutMode ( nOldLayout | TEXT_LAYOUT_BIDI_RTL );
+ ComplexTextLayoutFlags nOldLayout = rInf.GetOut()->GetLayoutMode();
+ rInf.GetOut()->SetLayoutMode ( nOldLayout | ComplexTextLayoutFlags::BiDiRtl );
nKashidasDropped = rInf.GetOut()->ValidateKashidas ( rInf.GetText(), nIdx, nNext - nIdx,
nKashidasInAttr, pKashidaPos.get() + nKashidaIdx,
pKashidaPosDropped.get() );
diff --git a/sw/source/core/text/porlin.cxx b/sw/source/core/text/porlin.cxx
index 6294a618512f..1fb0b0ddf2ea 100644
--- a/sw/source/core/text/porlin.cxx
+++ b/sw/source/core/text/porlin.cxx
@@ -99,7 +99,7 @@ void SwLinePortion::PrePaint( const SwTextPaintInfo& rInf,
SwTextPaintInfo aInf( rInf );
const bool bBidiPor = rInf.GetTextFrame()->IsRightToLeft() !=
- bool( TEXT_LAYOUT_BIDI_RTL & rInf.GetOut()->GetLayoutMode() );
+ bool( ComplexTextLayoutFlags::BiDiRtl & rInf.GetOut()->GetLayoutMode() );
sal_uInt16 nDir = bBidiPor ?
1800 :
diff --git a/sw/source/core/text/txtfrm.cxx b/sw/source/core/text/txtfrm.cxx
index 12007210ccc5..c509ae6b6df8 100644
--- a/sw/source/core/text/txtfrm.cxx
+++ b/sw/source/core/text/txtfrm.cxx
@@ -300,13 +300,13 @@ SwLayoutModeModifier::~SwLayoutModeModifier()
void SwLayoutModeModifier::Modify( bool bChgToRTL )
{
const_cast<OutputDevice&>(m_rOut).SetLayoutMode( bChgToRTL ?
- TEXT_LAYOUT_BIDI_STRONG | TEXT_LAYOUT_BIDI_RTL :
- TEXT_LAYOUT_BIDI_STRONG );
+ ComplexTextLayoutFlags::BiDiStrong | ComplexTextLayoutFlags::BiDiRtl :
+ ComplexTextLayoutFlags::BiDiStrong );
}
void SwLayoutModeModifier::SetAuto()
{
- const ComplexTextLayoutMode nNewLayoutMode = m_nOldLayoutMode & ~TEXT_LAYOUT_BIDI_STRONG;
+ const ComplexTextLayoutFlags nNewLayoutMode = m_nOldLayoutMode & ~ComplexTextLayoutFlags::BiDiStrong;
const_cast<OutputDevice&>(m_rOut).SetLayoutMode( nNewLayoutMode );
}
diff --git a/sw/source/core/txtnode/fntcache.cxx b/sw/source/core/txtnode/fntcache.cxx
index 5b8ca54a2ca0..94bb6612760e 100644
--- a/sw/source/core/txtnode/fntcache.cxx
+++ b/sw/source/core/txtnode/fntcache.cxx
@@ -876,9 +876,9 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
const bool bSwitchH2V = rInf.GetFrame() && rInf.GetFrame()->IsVertical();
const bool bSwitchL2R = rInf.GetFrame() && rInf.GetFrame()->IsRightToLeft() &&
! rInf.IsIgnoreFrameRTL();
- const ComplexTextLayoutMode nMode = rInf.GetOut().GetLayoutMode();
+ const ComplexTextLayoutFlags nMode = rInf.GetOut().GetLayoutMode();
const bool bBidiPor = ( bSwitchL2R !=
- ( TEXT_LAYOUT_DEFAULT != ( TEXT_LAYOUT_BIDI_RTL & nMode ) ) );
+ ( ComplexTextLayoutFlags::Default != ( ComplexTextLayoutFlags::BiDiRtl & nMode ) ) );
// be sure to have the correct layout mode at the printer
if ( pPrinter )
@@ -1341,7 +1341,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
rInf.GetIdx() + j, i - j );
j = i + 1;
SwTwips nAdd = pKernArray[ i ] + nKernSum;
- if ( ( TEXT_LAYOUT_BIDI_STRONG | TEXT_LAYOUT_BIDI_RTL ) == nMode )
+ if ( ( ComplexTextLayoutFlags::BiDiStrong | ComplexTextLayoutFlags::BiDiRtl ) == nMode )
nAdd *= -1;
aTmpPos.X() = aTextOriginPos.X() + nAdd;
}
diff --git a/sw/source/core/txtnode/fntcap.cxx b/sw/source/core/txtnode/fntcap.cxx
index ccd6936749b3..fc1e93a53a97 100644
--- a/sw/source/core/txtnode/fntcap.cxx
+++ b/sw/source/core/txtnode/fntcap.cxx
@@ -282,9 +282,9 @@ void SwDoDrawCapital::DrawSpace( Point &rPos )
if ( bSwitchL2R )
rInf.GetFrame()->SwitchLTRtoRTL( aPos );
- const ComplexTextLayoutMode nMode = rInf.GetpOut()->GetLayoutMode();
+ const ComplexTextLayoutFlags nMode = rInf.GetpOut()->GetLayoutMode();
const bool bBidiPor = ( bSwitchL2R !=
- ( TEXT_LAYOUT_DEFAULT != ( TEXT_LAYOUT_BIDI_RTL & nMode ) ) );
+ ( ComplexTextLayoutFlags::Default != ( ComplexTextLayoutFlags::BiDiRtl & nMode ) ) );
if ( bBidiPor )
nDiff = -nDiff;
diff --git a/sw/source/core/txtnode/swfont.cxx b/sw/source/core/txtnode/swfont.cxx
index 0dd7670ad872..067ff03a2c11 100644
--- a/sw/source/core/txtnode/swfont.cxx
+++ b/sw/source/core/txtnode/swfont.cxx
@@ -1478,7 +1478,7 @@ void SwDrawTextInfo::Shift( sal_uInt16 nDir )
#endif
const bool bBidiPor = ( GetFrame() && GetFrame()->IsRightToLeft() ) !=
- ( TEXT_LAYOUT_DEFAULT != ( TEXT_LAYOUT_BIDI_RTL & GetpOut()->GetLayoutMode() ) );
+ ( ComplexTextLayoutFlags::Default != ( ComplexTextLayoutFlags::BiDiRtl & GetpOut()->GetLayoutMode() ) );
nDir = bBidiPor ?
1800 :