summaryrefslogtreecommitdiff
path: root/vcl/source/filter
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 /vcl/source/filter
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 'vcl/source/filter')
-rw-r--r--vcl/source/filter/wmf/emfwr.cxx8
-rw-r--r--vcl/source/filter/wmf/enhwmf.cxx4
-rw-r--r--vcl/source/filter/wmf/winmtf.cxx6
-rw-r--r--vcl/source/filter/wmf/winmtf.hxx8
-rw-r--r--vcl/source/filter/wmf/winwmf.cxx4
-rw-r--r--vcl/source/filter/wmf/wmfwr.cxx8
6 files changed, 19 insertions, 19 deletions
diff --git a/vcl/source/filter/wmf/emfwr.cxx b/vcl/source/filter/wmf/emfwr.cxx
index 5ac14fb2f232..98a1f957b2a7 100644
--- a/vcl/source/filter/wmf/emfwr.cxx
+++ b/vcl/source/filter/wmf/emfwr.cxx
@@ -1484,15 +1484,15 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
case( MetaActionType::LAYOUTMODE ):
{
- ComplexTextLayoutMode nLayoutMode = static_cast<const MetaLayoutModeAction*>(pAction)->GetLayoutMode();
+ ComplexTextLayoutFlags nLayoutMode = static_cast<const MetaLayoutModeAction*>(pAction)->GetLayoutMode();
mnHorTextAlign = 0;
- if ((nLayoutMode & TEXT_LAYOUT_BIDI_RTL) != TEXT_LAYOUT_DEFAULT)
+ if ((nLayoutMode & ComplexTextLayoutFlags::BiDiRtl) != ComplexTextLayoutFlags::Default)
{
mnHorTextAlign = TA_RIGHT | TA_RTLREADING;
}
- if ((nLayoutMode & TEXT_LAYOUT_TEXTORIGIN_RIGHT) != TEXT_LAYOUT_DEFAULT)
+ if ((nLayoutMode & ComplexTextLayoutFlags::TextOriginRight) != ComplexTextLayoutFlags::Default)
mnHorTextAlign |= TA_RIGHT;
- else if ((nLayoutMode & TEXT_LAYOUT_TEXTORIGIN_LEFT) != TEXT_LAYOUT_DEFAULT)
+ else if ((nLayoutMode & ComplexTextLayoutFlags::TextOriginLeft) != ComplexTextLayoutFlags::Default)
mnHorTextAlign &= ~TA_RIGHT;
break;
}
diff --git a/vcl/source/filter/wmf/enhwmf.cxx b/vcl/source/filter/wmf/enhwmf.cxx
index 152bdfce6086..f4e7d45b9a4a 100644
--- a/vcl/source/filter/wmf/enhwmf.cxx
+++ b/vcl/source/filter/wmf/enhwmf.cxx
@@ -1548,9 +1548,9 @@ bool EnhWMFReader::ReadEnhWMF()
pWMF->SeekRel( 0x10 );
pWMF->ReadUInt32( offDx );
- ComplexTextLayoutMode nTextLayoutMode = TEXT_LAYOUT_DEFAULT;
+ ComplexTextLayoutFlags nTextLayoutMode = ComplexTextLayoutFlags::Default;
if ( nOptions & ETO_RTLREADING )
- nTextLayoutMode = TEXT_LAYOUT_BIDI_RTL | TEXT_LAYOUT_TEXTORIGIN_LEFT;
+ nTextLayoutMode = ComplexTextLayoutFlags::BiDiRtl | ComplexTextLayoutFlags::TextOriginLeft;
pOut->SetTextLayoutMode( nTextLayoutMode );
DBG_ASSERT( ( nOptions & ( ETO_PDY | ETO_GLYPH_INDEX ) ) == 0, "SJ: ETO_PDY || ETO_GLYPH_INDEX in EMF" );
diff --git a/vcl/source/filter/wmf/winmtf.cxx b/vcl/source/filter/wmf/winmtf.cxx
index 663267aa7d3c..20576438ec8b 100644
--- a/vcl/source/filter/wmf/winmtf.cxx
+++ b/vcl/source/filter/wmf/winmtf.cxx
@@ -614,7 +614,7 @@ void WinMtfOutput::SelectObject( sal_Int32 nIndex )
}
}
-void WinMtfOutput::SetTextLayoutMode( ComplexTextLayoutMode nTextLayoutMode )
+void WinMtfOutput::SetTextLayoutMode( ComplexTextLayoutFlags nTextLayoutMode )
{
mnTextLayoutMode = nTextLayoutMode;
}
@@ -805,8 +805,8 @@ WinMtfOutput::WinMtfOutput( GDIMetaFile& rGDIMetaFile ) :
mnTextAlign ( TA_LEFT | TA_TOP | TA_NOUPDATECP ),
maLatestBkColor ( 0x12345678 ),
maBkColor ( COL_WHITE ),
- mnLatestTextLayoutMode( TEXT_LAYOUT_DEFAULT ),
- mnTextLayoutMode ( TEXT_LAYOUT_DEFAULT ),
+ mnLatestTextLayoutMode( ComplexTextLayoutFlags::Default ),
+ mnTextLayoutMode ( ComplexTextLayoutFlags::Default ),
mnLatestBkMode ( BkMode::NONE ),
mnBkMode ( BkMode::OPAQUE ),
meLatestRasterOp ( ROP_INVERT ),
diff --git a/vcl/source/filter/wmf/winmtf.hxx b/vcl/source/filter/wmf/winmtf.hxx
index caf3a88b8a5e..a1ba920353ba 100644
--- a/vcl/source/filter/wmf/winmtf.hxx
+++ b/vcl/source/filter/wmf/winmtf.hxx
@@ -419,7 +419,7 @@ struct SaveStruct
{
BkMode nBkMode;
sal_uInt32 nMapMode, nGfxMode;
- ComplexTextLayoutMode nTextLayoutMode;
+ ComplexTextLayoutFlags nTextLayoutMode;
sal_Int32 nWinOrgX, nWinOrgY, nWinExtX, nWinExtY;
sal_Int32 nDevOrgX, nDevOrgY, nDevWidth, nDevHeight;
@@ -482,8 +482,8 @@ class WinMtfOutput
Color maTextColor;
Color maLatestBkColor;
Color maBkColor;
- ComplexTextLayoutMode mnLatestTextLayoutMode;
- ComplexTextLayoutMode mnTextLayoutMode;
+ ComplexTextLayoutFlags mnLatestTextLayoutMode;
+ ComplexTextLayoutFlags mnTextLayoutMode;
BkMode mnLatestBkMode;
BkMode mnBkMode;
RasterOp meLatestRasterOp;
@@ -583,7 +583,7 @@ public:
void SelectObject( sal_Int32 nIndex );
rtl_TextEncoding GetCharSet(){ return maFont.GetCharSet(); };
const vcl::Font& GetFont() const { return maFont;}
- void SetTextLayoutMode( ComplexTextLayoutMode nLayoutMode );
+ void SetTextLayoutMode( ComplexTextLayoutFlags nLayoutMode );
void ClearPath(){ aPathObj.Init(); };
void ClosePath(){ aPathObj.ClosePath(); };
diff --git a/vcl/source/filter/wmf/winwmf.cxx b/vcl/source/filter/wmf/winwmf.cxx
index d33e24ccdf83..12fef7f872a8 100644
--- a/vcl/source/filter/wmf/winwmf.cxx
+++ b/vcl/source/filter/wmf/winwmf.cxx
@@ -533,9 +533,9 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc )
pWMF->ReadUInt16( nLen );
pWMF->ReadUInt16( nOptions );
- ComplexTextLayoutMode nTextLayoutMode = TEXT_LAYOUT_DEFAULT;
+ ComplexTextLayoutFlags nTextLayoutMode = ComplexTextLayoutFlags::Default;
if ( nOptions & ETO_RTLREADING )
- nTextLayoutMode = TEXT_LAYOUT_BIDI_RTL | TEXT_LAYOUT_TEXTORIGIN_LEFT;
+ nTextLayoutMode = ComplexTextLayoutFlags::BiDiRtl | ComplexTextLayoutFlags::TextOriginLeft;
pOut->SetTextLayoutMode( nTextLayoutMode );
DBG_ASSERT( ( nOptions & ( ETO_PDY | ETO_GLYPH_INDEX ) ) == 0, "SJ: ETO_PDY || ETO_GLYPH_INDEX in WMF" );
diff --git a/vcl/source/filter/wmf/wmfwr.cxx b/vcl/source/filter/wmf/wmfwr.cxx
index 8986a41fa5c8..9fa5bb3eb3db 100644
--- a/vcl/source/filter/wmf/wmfwr.cxx
+++ b/vcl/source/filter/wmf/wmfwr.cxx
@@ -1596,15 +1596,15 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF )
case( MetaActionType::LAYOUTMODE ):
{
- ComplexTextLayoutMode nLayoutMode = static_cast<const MetaLayoutModeAction*>(pMA)->GetLayoutMode();
+ ComplexTextLayoutFlags nLayoutMode = static_cast<const MetaLayoutModeAction*>(pMA)->GetLayoutMode();
eSrcHorTextAlign = 0; // TA_LEFT
- if ((nLayoutMode & TEXT_LAYOUT_BIDI_RTL) != TEXT_LAYOUT_DEFAULT)
+ if ((nLayoutMode & ComplexTextLayoutFlags::BiDiRtl) != ComplexTextLayoutFlags::Default)
{
eSrcHorTextAlign = W_TA_RIGHT | W_TA_RTLREADING;
}
- if ((nLayoutMode & TEXT_LAYOUT_TEXTORIGIN_RIGHT) != TEXT_LAYOUT_DEFAULT)
+ if ((nLayoutMode & ComplexTextLayoutFlags::TextOriginRight) != ComplexTextLayoutFlags::Default)
eSrcHorTextAlign |= W_TA_RIGHT;
- else if ((nLayoutMode & TEXT_LAYOUT_TEXTORIGIN_LEFT) != TEXT_LAYOUT_DEFAULT)
+ else if ((nLayoutMode & ComplexTextLayoutFlags::TextOriginLeft) != ComplexTextLayoutFlags::Default)
eSrcHorTextAlign &= ~W_TA_RIGHT;
break;
}