summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--canvas/source/cairo/cairo_canvashelper_text.cxx5
-rw-r--r--canvas/source/cairo/cairo_textlayout.cxx10
-rw-r--r--canvas/source/vcl/canvashelper.cxx5
-rw-r--r--canvas/source/vcl/textlayout.cxx10
-rw-r--r--cppcanvas/source/mtfrenderer/implrenderer.cxx22
-rw-r--r--drawinglayer/source/primitive2d/metafileprimitive2d.cxx8
-rw-r--r--drawinglayer/source/processor2d/vclprocessor2d.cxx4
-rw-r--r--editeng/source/editeng/impedit3.cxx2
-rw-r--r--editeng/source/outliner/outliner.cxx2
-rw-r--r--include/vcl/metaact.hxx7
-rw-r--r--include/vcl/outdev.hxx17
-rw-r--r--include/vcl/outdevstate.hxx40
-rw-r--r--include/vcl/pdfwriter.hxx3
-rw-r--r--sc/source/ui/docshell/docsh4.cxx2
-rw-r--r--starmath/source/ElementsDockingWindow.cxx2
-rw-r--r--starmath/source/document.cxx8
-rw-r--r--svx/source/sdr/contact/objectcontactofpageview.cxx2
-rw-r--r--sw/source/core/inc/txtfrm.hxx2
-rw-r--r--sw/source/core/text/itradj.cxx2
-rw-r--r--sw/source/core/text/txtfrm.cxx2
-rw-r--r--sw/source/core/txtnode/fntcache.cxx2
-rw-r--r--sw/source/core/txtnode/fntcap.cxx2
-rw-r--r--vcl/source/app/help.cxx2
-rw-r--r--vcl/source/control/ctrl.cxx2
-rw-r--r--vcl/source/control/edit.cxx2
-rw-r--r--vcl/source/edit/texteng.cxx2
-rw-r--r--vcl/source/filter/wmf/emfwr.cxx8
-rw-r--r--vcl/source/filter/wmf/enhwmf.cxx2
-rw-r--r--vcl/source/filter/wmf/winmtf.cxx2
-rw-r--r--vcl/source/filter/wmf/winmtf.hxx9
-rw-r--r--vcl/source/filter/wmf/winwmf.cxx2
-rw-r--r--vcl/source/filter/wmf/wmfwr.cxx8
-rw-r--r--vcl/source/gdi/gdimtf.cxx4
-rw-r--r--vcl/source/gdi/metaact.cxx8
-rw-r--r--vcl/source/gdi/pdfwriter.cxx4
-rw-r--r--vcl/source/gdi/pdfwriter_impl.cxx4
-rw-r--r--vcl/source/gdi/pdfwriter_impl.hxx6
-rw-r--r--vcl/source/gdi/textlayout.cxx2
-rw-r--r--vcl/source/outdev/outdevstate.cxx2
-rw-r--r--vcl/source/outdev/text.cxx12
-rw-r--r--vcl/source/outdev/textline.cxx2
41 files changed, 130 insertions, 112 deletions
diff --git a/canvas/source/cairo/cairo_canvashelper_text.cxx b/canvas/source/cairo/cairo_canvashelper_text.cxx
index d65f2de34ab2..f95d71a48485 100644
--- a/canvas/source/cairo/cairo_canvashelper_text.cxx
+++ b/canvas/source/cairo/cairo_canvashelper_text.cxx
@@ -307,14 +307,13 @@ namespace cairocanvas
return uno::Reference< rendering::XCachedPrimitive >(NULL); // no output necessary
// change text direction and layout mode
- sal_uLong nLayoutMode(0);
+ ComplexTextLayoutMode nLayoutMode(TEXT_LAYOUT_DEFAULT);
switch( textDirection )
{
case rendering::TextDirection::WEAK_LEFT_TO_RIGHT:
- nLayoutMode |= TEXT_LAYOUT_BIDI_LTR;
// FALLTHROUGH intended
case rendering::TextDirection::STRONG_LEFT_TO_RIGHT:
- nLayoutMode |= TEXT_LAYOUT_BIDI_LTR | TEXT_LAYOUT_BIDI_STRONG;
+ nLayoutMode |= TEXT_LAYOUT_BIDI_STRONG;
nLayoutMode |= TEXT_LAYOUT_TEXTORIGIN_LEFT;
break;
diff --git a/canvas/source/cairo/cairo_textlayout.cxx b/canvas/source/cairo/cairo_textlayout.cxx
index db9a21cb1602..f01e75a8e892 100644
--- a/canvas/source/cairo/cairo_textlayout.cxx
+++ b/canvas/source/cairo/cairo_textlayout.cxx
@@ -72,17 +72,13 @@ namespace cairocanvas
sal_Int8 nTextDirection )
{
// TODO(P3): avoid if already correctly set
- sal_uLong nLayoutMode;
+ ComplexTextLayoutMode nLayoutMode = TEXT_LAYOUT_DEFAULT;
switch( nTextDirection )
{
- default:
- nLayoutMode = 0;
- break;
case rendering::TextDirection::WEAK_LEFT_TO_RIGHT:
- nLayoutMode = TEXT_LAYOUT_BIDI_LTR;
break;
case rendering::TextDirection::STRONG_LEFT_TO_RIGHT:
- nLayoutMode = TEXT_LAYOUT_BIDI_LTR | TEXT_LAYOUT_BIDI_STRONG;
+ nLayoutMode = TEXT_LAYOUT_BIDI_STRONG;
break;
case rendering::TextDirection::WEAK_RIGHT_TO_LEFT:
nLayoutMode = TEXT_LAYOUT_BIDI_RTL;
@@ -90,6 +86,8 @@ namespace cairocanvas
case rendering::TextDirection::STRONG_RIGHT_TO_LEFT:
nLayoutMode = TEXT_LAYOUT_BIDI_RTL | TEXT_LAYOUT_BIDI_STRONG;
break;
+ default:
+ break;
}
// set calculated layout mode. Origin is always the left edge,
diff --git a/canvas/source/vcl/canvashelper.cxx b/canvas/source/vcl/canvashelper.cxx
index 4112c5b858b1..eff50dc7df87 100644
--- a/canvas/source/vcl/canvashelper.cxx
+++ b/canvas/source/vcl/canvashelper.cxx
@@ -589,14 +589,13 @@ namespace vclcanvas
return uno::Reference< rendering::XCachedPrimitive >(NULL); // no output necessary
// change text direction and layout mode
- sal_uIntPtr nLayoutMode(0);
+ ComplexTextLayoutMode nLayoutMode(TEXT_LAYOUT_DEFAULT);
switch( textDirection )
{
case rendering::TextDirection::WEAK_LEFT_TO_RIGHT:
- nLayoutMode |= TEXT_LAYOUT_BIDI_LTR;
// FALLTHROUGH intended
case rendering::TextDirection::STRONG_LEFT_TO_RIGHT:
- nLayoutMode |= TEXT_LAYOUT_BIDI_LTR | TEXT_LAYOUT_BIDI_STRONG;
+ nLayoutMode |= TEXT_LAYOUT_BIDI_STRONG;
nLayoutMode |= TEXT_LAYOUT_TEXTORIGIN_LEFT;
break;
diff --git a/canvas/source/vcl/textlayout.cxx b/canvas/source/vcl/textlayout.cxx
index 3f8127662a8a..d64f7dfa7fb7 100644
--- a/canvas/source/vcl/textlayout.cxx
+++ b/canvas/source/vcl/textlayout.cxx
@@ -48,17 +48,13 @@ namespace vclcanvas
sal_Int8 nTextDirection )
{
// TODO(P3): avoid if already correctly set
- sal_uIntPtr nLayoutMode;
+ ComplexTextLayoutMode nLayoutMode = TEXT_LAYOUT_DEFAULT;
switch( nTextDirection )
{
- default:
- nLayoutMode = 0;
- break;
case rendering::TextDirection::WEAK_LEFT_TO_RIGHT:
- nLayoutMode = TEXT_LAYOUT_BIDI_LTR;
break;
case rendering::TextDirection::STRONG_LEFT_TO_RIGHT:
- nLayoutMode = TEXT_LAYOUT_BIDI_LTR | TEXT_LAYOUT_BIDI_STRONG;
+ nLayoutMode = TEXT_LAYOUT_BIDI_STRONG;
break;
case rendering::TextDirection::WEAK_RIGHT_TO_LEFT:
nLayoutMode = TEXT_LAYOUT_BIDI_RTL;
@@ -66,6 +62,8 @@ namespace vclcanvas
case rendering::TextDirection::STRONG_RIGHT_TO_LEFT:
nLayoutMode = TEXT_LAYOUT_BIDI_RTL | TEXT_LAYOUT_BIDI_STRONG;
break;
+ default:
+ break;
}
// set calculated layout mode. Origin is always the left edge,
diff --git a/cppcanvas/source/mtfrenderer/implrenderer.cxx b/cppcanvas/source/mtfrenderer/implrenderer.cxx
index 0208486ce0df..63cb370c8a91 100644
--- a/cppcanvas/source/mtfrenderer/implrenderer.cxx
+++ b/cppcanvas/source/mtfrenderer/implrenderer.cxx
@@ -1515,26 +1515,18 @@ namespace cppcanvas
case META_LAYOUTMODE_ACTION:
{
// TODO(F2): A lot is missing here
- int nLayoutMode = static_cast<MetaLayoutModeAction*>(pCurrAct)->GetLayoutMode();
+ ComplexTextLayoutMode nLayoutMode = static_cast<MetaLayoutModeAction*>(pCurrAct)->GetLayoutMode();
::cppcanvas::internal::OutDevState& rState = rStates.getState();
- switch( nLayoutMode & (TEXT_LAYOUT_BIDI_RTL|TEXT_LAYOUT_BIDI_STRONG) )
- {
- case TEXT_LAYOUT_BIDI_LTR:
- rState.textDirection = rendering::TextDirection::WEAK_LEFT_TO_RIGHT;
- break;
- case (TEXT_LAYOUT_BIDI_LTR | TEXT_LAYOUT_BIDI_STRONG):
+ ComplexTextLayoutMode nBidiLayoutMode = nLayoutMode & (TEXT_LAYOUT_BIDI_RTL|TEXT_LAYOUT_BIDI_STRONG);
+ if( nBidiLayoutMode == 0)
+ rState.textDirection = rendering::TextDirection::WEAK_LEFT_TO_RIGHT;
+ else if( nBidiLayoutMode == TEXT_LAYOUT_BIDI_STRONG)
rState.textDirection = rendering::TextDirection::STRONG_LEFT_TO_RIGHT;
- break;
-
- case TEXT_LAYOUT_BIDI_RTL:
+ else if( nBidiLayoutMode == TEXT_LAYOUT_BIDI_RTL)
rState.textDirection = rendering::TextDirection::WEAK_RIGHT_TO_LEFT;
- break;
-
- case (TEXT_LAYOUT_BIDI_RTL | TEXT_LAYOUT_BIDI_STRONG):
+ else if( nBidiLayoutMode == (TEXT_LAYOUT_BIDI_RTL | TEXT_LAYOUT_BIDI_STRONG))
rState.textDirection = rendering::TextDirection::STRONG_RIGHT_TO_LEFT;
- break;
- }
rState.textAlignment = 0; // TODO(F2): rendering::TextAlignment::LEFT_ALIGNED;
if( (nLayoutMode & (TEXT_LAYOUT_BIDI_RTL | TEXT_LAYOUT_TEXTORIGIN_RIGHT) )
diff --git a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx
index 943e16a37acd..8f77949f4adb 100644
--- a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx
@@ -89,7 +89,7 @@ namespace
/// font, etc.
Font maFont;
RasterOp maRasterOp;
- sal_uInt32 mnLayoutMode;
+ ComplexTextLayoutMode mnLayoutMode;
LanguageType maLanguageType;
sal_uInt16 mnPushFlags;
@@ -116,7 +116,7 @@ namespace
maClipPolyPoygon(),
maFont(),
maRasterOp(ROP_OVERPAINT),
- mnLayoutMode(0),
+ mnLayoutMode(TEXT_LAYOUT_DEFAULT),
maLanguageType(0),
mnPushFlags(0),
mbLineColor(false),
@@ -184,8 +184,8 @@ namespace
bool isRasterOpForceBlack() const { return ROP_0 == maRasterOp; }
bool isRasterOpActive() const { return isRasterOpInvert() || isRasterOpForceBlack(); }
- sal_uInt32 getLayoutMode() const { return mnLayoutMode; }
- void setLayoutMode(sal_uInt32 nNew) { if(nNew != mnLayoutMode) mnLayoutMode = nNew; }
+ ComplexTextLayoutMode getLayoutMode() const { return mnLayoutMode; }
+ void setLayoutMode(ComplexTextLayoutMode nNew) { if(nNew != mnLayoutMode) mnLayoutMode = nNew; }
LanguageType getLanguageType() const { return maLanguageType; }
void setLanguageType(LanguageType aNew) { if(aNew != maLanguageType) maLanguageType = aNew; }
diff --git a/drawinglayer/source/processor2d/vclprocessor2d.cxx b/drawinglayer/source/processor2d/vclprocessor2d.cxx
index 137901eb3f9e..869afd83fe6a 100644
--- a/drawinglayer/source/processor2d/vclprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclprocessor2d.cxx
@@ -261,11 +261,11 @@ namespace drawinglayer
const basegfx::BColor aRGBFontColor(maBColorModifierStack.getModifiedColor(rTextCandidate.getFontColor()));
const basegfx::B2DPoint aPoint(aLocalTransform * basegfx::B2DPoint(0.0, 0.0));
const Point aStartPoint(basegfx::fround(aPoint.getX()), basegfx::fround(aPoint.getY()));
- const sal_uInt32 nOldLayoutMode(mpOutputDevice->GetLayoutMode());
+ const ComplexTextLayoutMode nOldLayoutMode(mpOutputDevice->GetLayoutMode());
if(rTextCandidate.getFontAttribute().getRTL())
{
- sal_uInt32 nRTLLayoutMode(nOldLayoutMode & ~(TEXT_LAYOUT_COMPLEX_DISABLED|TEXT_LAYOUT_BIDI_STRONG));
+ ComplexTextLayoutMode nRTLLayoutMode(nOldLayoutMode & ~(TEXT_LAYOUT_COMPLEX_DISABLED|TEXT_LAYOUT_BIDI_STRONG));
nRTLLayoutMode |= TEXT_LAYOUT_BIDI_RTL|TEXT_LAYOUT_TEXTORIGIN_LEFT;
mpOutputDevice->SetLayoutMode(nRTLLayoutMode);
}
diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx
index f6961f775224..e23b4e899d89 100644
--- a/editeng/source/editeng/impedit3.cxx
+++ b/editeng/source/editeng/impedit3.cxx
@@ -4326,7 +4326,7 @@ void ImpEditEngine::ImplInitLayoutMode( OutputDevice* pOutDev, sal_Int32 nPara,
// it also works for issue 55927
}
- sal_uLong nLayoutMode = pOutDev->GetLayoutMode();
+ ComplexTextLayoutMode nLayoutMode = pOutDev->GetLayoutMode();
// We always use the left position for DrawText()
nLayoutMode &= ~(TEXT_LAYOUT_BIDI_RTL);
diff --git a/editeng/source/outliner/outliner.cxx b/editeng/source/outliner/outliner.cxx
index ace9482001b5..2b35a5d8fa2c 100644
--- a/editeng/source/outliner/outliner.cxx
+++ b/editeng/source/outliner/outliner.cxx
@@ -996,7 +996,7 @@ void Outliner::PaintBullet( sal_Int32 nPara, const Point& rStartPos,
}
// VCL will take care of brackets and so on...
- sal_uLong nLayoutMode = pOutDev->GetLayoutMode();
+ ComplexTextLayoutMode nLayoutMode = pOutDev->GetLayoutMode();
nLayoutMode &= ~(TEXT_LAYOUT_BIDI_RTL|TEXT_LAYOUT_COMPLEX_DISABLED|TEXT_LAYOUT_BIDI_STRONG);
if ( bRightToLeftPara )
nLayoutMode |= TEXT_LAYOUT_BIDI_RTL | TEXT_LAYOUT_TEXTORIGIN_LEFT | TEXT_LAYOUT_BIDI_STRONG;
diff --git a/include/vcl/metaact.hxx b/include/vcl/metaact.hxx
index 569fd64de23d..572a0a2f3be4 100644
--- a/include/vcl/metaact.hxx
+++ b/include/vcl/metaact.hxx
@@ -35,6 +35,7 @@
#include <vcl/gfxlink.hxx>
#include <vcl/lineinfo.hxx>
#include <vcl/metaactiontypes.hxx>
+#include <vcl/outdevstate.hxx>
class SvStream;
@@ -1562,7 +1563,7 @@ class VCL_DLLPUBLIC MetaLayoutModeAction : public MetaAction
{
private:
- sal_uInt32 mnLayoutMode;
+ ComplexTextLayoutMode mnLayoutMode;
virtual bool Compare( const MetaAction& ) const SAL_OVERRIDE;
public:
@@ -1575,9 +1576,9 @@ public:
virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) SAL_OVERRIDE;
virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) SAL_OVERRIDE;
- explicit MetaLayoutModeAction( sal_uInt32 nLayoutMode );
+ explicit MetaLayoutModeAction( ComplexTextLayoutMode nLayoutMode );
- sal_uInt32 GetLayoutMode() const { return mnLayoutMode; }
+ ComplexTextLayoutMode GetLayoutMode() const { return mnLayoutMode; }
};
class VCL_DLLPUBLIC MetaTextLanguageAction : public MetaAction
diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx
index 738e6847bdf7..61114a1fba9c 100644
--- a/include/vcl/outdev.hxx
+++ b/include/vcl/outdev.hxx
@@ -181,17 +181,6 @@ namespace vcl
#define GRID_VERTLINES ((sal_uLong)0x00000004)
#define GRID_LINES (GRID_HORZLINES | GRID_VERTLINES)
-// LayoutModes for Complex Text Layout
-#define TEXT_LAYOUT_DEFAULT ((sal_uLong)0x00000000)
-#define TEXT_LAYOUT_BIDI_LTR ((sal_uLong)0x00000000)
-#define TEXT_LAYOUT_BIDI_RTL ((sal_uLong)0x00000001)
-#define TEXT_LAYOUT_BIDI_STRONG ((sal_uLong)0x00000002)
-#define TEXT_LAYOUT_TEXTORIGIN_LEFT ((sal_uLong)0x00000004)
-#define TEXT_LAYOUT_TEXTORIGIN_RIGHT ((sal_uLong)0x00000008)
-#define TEXT_LAYOUT_COMPLEX_DISABLED ((sal_uLong)0x00000100)
-#define TEXT_LAYOUT_ENABLE_LIGATURES ((sal_uLong)0x00000200)
-#define TEXT_LAYOUT_SUBSTITUTE_DIGITS ((sal_uLong)0x00000400)
-
// DrawModes
#define DRAWMODE_DEFAULT ((sal_uLong)0x00000000)
#define DRAWMODE_BLACKLINE ((sal_uLong)0x00000001)
@@ -316,7 +305,7 @@ private:
mutable long mnEmphasisAscent;
mutable long mnEmphasisDescent;
sal_uLong mnDrawMode;
- sal_uLong mnTextLayoutMode;
+ ComplexTextLayoutMode mnTextLayoutMode;
ImplMapRes maMapRes;
ImplThresholdRes maThresRes;
OutDevType meOutDevType;
@@ -565,8 +554,8 @@ public:
void SetDrawMode( sal_uLong nDrawMode );
sal_uLong GetDrawMode() const { return mnDrawMode; }
- void SetLayoutMode( sal_uLong nTextLayoutMode );
- sal_uLong GetLayoutMode() const { return mnTextLayoutMode; }
+ void SetLayoutMode( ComplexTextLayoutMode nTextLayoutMode );
+ ComplexTextLayoutMode GetLayoutMode() const { return mnTextLayoutMode; }
void SetDigitLanguage( LanguageType );
LanguageType GetDigitLanguage() const { return meTextLanguage; }
diff --git a/include/vcl/outdevstate.hxx b/include/vcl/outdevstate.hxx
index 39aedcbab390..847a5f27a70b 100644
--- a/include/vcl/outdevstate.hxx
+++ b/include/vcl/outdevstate.hxx
@@ -50,6 +50,44 @@
#define PUSH_ALLFONT (PUSH_ALLTEXT | PUSH_FONT)
#define PUSH_ALL ((sal_uInt16)0xFFFF)
+// LayoutModes for Complex Text Layout
+// These are flag values, i.e they can be combined
+enum ComplexTextLayoutMode
+{
+ TEXT_LAYOUT_DEFAULT = ((sal_uLong)0x00000000),
+ TEXT_LAYOUT_BIDI_RTL = ((sal_uLong)0x00000001),
+ TEXT_LAYOUT_BIDI_STRONG = ((sal_uLong)0x00000002),
+ TEXT_LAYOUT_TEXTORIGIN_LEFT = ((sal_uLong)0x00000004),
+ TEXT_LAYOUT_TEXTORIGIN_RIGHT = ((sal_uLong)0x00000008),
+ TEXT_LAYOUT_COMPLEX_DISABLED = ((sal_uLong)0x00000100),
+ TEXT_LAYOUT_ENABLE_LIGATURES = ((sal_uLong)0x00000200),
+ TEXT_LAYOUT_SUBSTITUTE_DIGITS = ((sal_uLong)0x00000400)
+};
+// make combining these type-safe
+inline ComplexTextLayoutMode operator| (ComplexTextLayoutMode lhs, ComplexTextLayoutMode rhs)
+{
+ return static_cast<ComplexTextLayoutMode>(static_cast<sal_uLong>(lhs) | static_cast<sal_uLong>(rhs));
+}
+inline ComplexTextLayoutMode operator& (ComplexTextLayoutMode lhs, ComplexTextLayoutMode rhs)
+{
+ return static_cast<ComplexTextLayoutMode>(static_cast<sal_uLong>(lhs) & static_cast<sal_uLong>(rhs));
+}
+inline ComplexTextLayoutMode operator~ (ComplexTextLayoutMode rhs)
+{
+ return static_cast<ComplexTextLayoutMode>(0x7ff & ~(static_cast<sal_uLong>(rhs)));
+}
+inline ComplexTextLayoutMode& operator|= (ComplexTextLayoutMode& lhs, ComplexTextLayoutMode rhs)
+{
+ lhs = static_cast<ComplexTextLayoutMode>(static_cast<sal_uLong>(lhs) | static_cast<sal_uLong>(rhs));
+ return lhs;
+}
+inline ComplexTextLayoutMode& operator&= (ComplexTextLayoutMode& lhs, ComplexTextLayoutMode rhs)
+{
+ lhs = static_cast<ComplexTextLayoutMode>(static_cast<sal_uLong>(lhs) & static_cast<sal_uLong>(rhs));
+ return lhs;
+}
+
+
class OutDevState
{
public:
@@ -68,7 +106,7 @@ public:
Point* mpRefPoint;
TextAlign meTextAlign;
RasterOp meRasterOp;
- sal_uLong mnTextLayoutMode;
+ ComplexTextLayoutMode mnTextLayoutMode;
LanguageType meTextLanguage;
sal_uInt16 mnFlags;
};
diff --git a/include/vcl/pdfwriter.hxx b/include/vcl/pdfwriter.hxx
index 49ce97cf1157..95a99ed8133f 100644
--- a/include/vcl/pdfwriter.hxx
+++ b/include/vcl/pdfwriter.hxx
@@ -28,6 +28,7 @@
#include <vcl/vclenum.hxx>
#include <vcl/font.hxx>
#include <vcl/graphictools.hxx>
+#include <vcl/outdevstate.hxx>
#include <com/sun/star/io/XOutputStream.hpp>
#include <com/sun/star/beans/XMaterialHolder.hpp>
@@ -737,7 +738,7 @@ The following structure describes the permissions used in PDF security
void IntersectClipRegion( const Rectangle& rRect );
void IntersectClipRegion( const basegfx::B2DPolyPolygon& rRegion );
- void SetLayoutMode( sal_uLong nMode );
+ void SetLayoutMode( ComplexTextLayoutMode nMode );
void SetDigitLanguage( LanguageType eLang );
void SetLineColor( const Color& rColor );
diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx
index 2aa636ae3f4e..ea1409111256 100644
--- a/sc/source/ui/docshell/docsh4.cxx
+++ b/sc/source/ui/docshell/docsh4.cxx
@@ -1860,7 +1860,7 @@ void ScDocShell::Draw( OutputDevice* pDev, const JobSetup & /* rSetup */, sal_uI
if (!aDocument.HasTable(nVisTab))
return;
- sal_uLong nOldLayoutMode = pDev->GetLayoutMode();
+ ComplexTextLayoutMode nOldLayoutMode = pDev->GetLayoutMode();
pDev->SetLayoutMode( TEXT_LAYOUT_DEFAULT ); // even if it's the same, to get the metafile action
if ( nAspect == ASPECT_THUMBNAIL )
diff --git a/starmath/source/ElementsDockingWindow.cxx b/starmath/source/ElementsDockingWindow.cxx
index 97c66e58da2a..6c99406f8cd5 100644
--- a/starmath/source/ElementsDockingWindow.cxx
+++ b/starmath/source/ElementsDockingWindow.cxx
@@ -222,7 +222,7 @@ SmElementsControl::SmElementsControl(Window *pParent, const ResId& rResId)
{
SetMapMode( MapMode(MAP_100TH_MM) );
SetDrawMode( DRAWMODE_DEFAULT );
- SetLayoutMode( TEXT_LAYOUT_BIDI_LTR );
+ SetLayoutMode( TEXT_LAYOUT_DEFAULT );
SetDigitLanguage( LANGUAGE_ENGLISH );
maFormat.SetBaseSize(PixelToLogic(Size(0, SmPtsTo100th_mm(12))));
diff --git a/starmath/source/document.cxx b/starmath/source/document.cxx
index c76b16fcea39..d4b06a448551 100644
--- a/starmath/source/document.cxx
+++ b/starmath/source/document.cxx
@@ -284,8 +284,8 @@ void SmDocShell::ArrangeFormula()
// format/draw formulas always from left to right,
// and numbers should not be converted
- sal_uLong nLayoutMode = pOutDev->GetLayoutMode();
- pOutDev->SetLayoutMode( TEXT_LAYOUT_BIDI_LTR );
+ ComplexTextLayoutMode nLayoutMode = pOutDev->GetLayoutMode();
+ pOutDev->SetLayoutMode( TEXT_LAYOUT_DEFAULT );
sal_Int16 nDigitLang = pOutDev->GetDigitLanguage();
pOutDev->SetDigitLanguage( LANGUAGE_ENGLISH );
@@ -440,8 +440,8 @@ void SmDocShell::DrawFormula(OutputDevice &rDev, Point &rPosition, bool bDrawSel
// format/draw formulas always from left to right
// and numbers should not be converted
- sal_uLong nLayoutMode = rDev.GetLayoutMode();
- rDev.SetLayoutMode( TEXT_LAYOUT_BIDI_LTR );
+ ComplexTextLayoutMode nLayoutMode = rDev.GetLayoutMode();
+ rDev.SetLayoutMode( TEXT_LAYOUT_DEFAULT );
sal_Int16 nDigitLang = rDev.GetDigitLanguage();
rDev.SetDigitLanguage( LANGUAGE_ENGLISH );
diff --git a/svx/source/sdr/contact/objectcontactofpageview.cxx b/svx/source/sdr/contact/objectcontactofpageview.cxx
index dbd43d30b57e..8894d9910c06 100644
--- a/svx/source/sdr/contact/objectcontactofpageview.cxx
+++ b/svx/source/sdr/contact/objectcontactofpageview.cxx
@@ -282,7 +282,7 @@ namespace sdr
{
// prepare OutputDevice (historical stuff, maybe soon removed)
rDisplayInfo.ClearGhostedDrawMode(); // reset, else the VCL-paint with the processor will not do the right thing
- pOutDev->SetLayoutMode(0); // reset, default is no BiDi/RTL
+ pOutDev->SetLayoutMode(TEXT_LAYOUT_DEFAULT); // reset, default is no BiDi/RTL
// create renderer
boost::scoped_ptr<drawinglayer::processor2d::BaseProcessor2D> pProcessor2D(
diff --git a/sw/source/core/inc/txtfrm.hxx b/sw/source/core/inc/txtfrm.hxx
index d34390b1393d..ce7df217c382 100644
--- a/sw/source/core/inc/txtfrm.hxx
+++ b/sw/source/core/inc/txtfrm.hxx
@@ -728,7 +728,7 @@ public:
class SwLayoutModeModifier
{
const OutputDevice& rOut;
- long nOldLayoutMode;
+ ComplexTextLayoutMode nOldLayoutMode;
public:
SwLayoutModeModifier( const OutputDevice& rOutp );
~SwLayoutModeModifier();
diff --git a/sw/source/core/text/itradj.cxx b/sw/source/core/text/itradj.cxx
index 3a9ce0e6ddeb..c113ec1836a4 100644
--- a/sw/source/core/text/itradj.cxx
+++ b/sw/source/core/text/itradj.cxx
@@ -164,7 +164,7 @@ static bool lcl_CheckKashidaPositions( SwScriptInfo& rSI, SwTxtSizeInfo& rInf, S
}
else
{
- sal_uLong nOldLayout = rInf.GetOut()->GetLayoutMode();
+ ComplexTextLayoutMode nOldLayout = rInf.GetOut()->GetLayoutMode();
rInf.GetOut()->SetLayoutMode ( nOldLayout | TEXT_LAYOUT_BIDI_RTL );
nKashidasDropped = rInf.GetOut()->ValidateKashidas ( rInf.GetTxt(), nIdx, nNext - nIdx,
nKashidasInAttr, pKashidaPos + nKashidaIdx,
diff --git a/sw/source/core/text/txtfrm.cxx b/sw/source/core/text/txtfrm.cxx
index 955177a2129e..015d24612b9e 100644
--- a/sw/source/core/text/txtfrm.cxx
+++ b/sw/source/core/text/txtfrm.cxx
@@ -300,7 +300,7 @@ void SwLayoutModeModifier::Modify( bool bChgToRTL )
void SwLayoutModeModifier::SetAuto()
{
- const sal_uLong nNewLayoutMode = nOldLayoutMode & ~TEXT_LAYOUT_BIDI_STRONG;
+ const ComplexTextLayoutMode nNewLayoutMode = nOldLayoutMode & ~TEXT_LAYOUT_BIDI_STRONG;
((OutputDevice&)rOut).SetLayoutMode( nNewLayoutMode );
}
diff --git a/sw/source/core/txtnode/fntcache.cxx b/sw/source/core/txtnode/fntcache.cxx
index ae2b90f36630..ebcf923303fc 100644
--- a/sw/source/core/txtnode/fntcache.cxx
+++ b/sw/source/core/txtnode/fntcache.cxx
@@ -857,7 +857,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
const bool bSwitchH2V = rInf.GetFrm() && rInf.GetFrm()->IsVertical();
const bool bSwitchL2R = rInf.GetFrm() && rInf.GetFrm()->IsRightToLeft() &&
! rInf.IsIgnoreFrmRTL();
- const sal_uLong nMode = rInf.GetOut().GetLayoutMode();
+ const ComplexTextLayoutMode nMode = rInf.GetOut().GetLayoutMode();
const bool bBidiPor = ( bSwitchL2R !=
( 0 != ( TEXT_LAYOUT_BIDI_RTL & nMode ) ) );
diff --git a/sw/source/core/txtnode/fntcap.cxx b/sw/source/core/txtnode/fntcap.cxx
index 5621ce8fa290..1790664a1160 100644
--- a/sw/source/core/txtnode/fntcap.cxx
+++ b/sw/source/core/txtnode/fntcap.cxx
@@ -282,7 +282,7 @@ void SwDoDrawCapital::DrawSpace( Point &rPos )
if ( bSwitchL2R )
rInf.GetFrm()->SwitchLTRtoRTL( aPos );
- const sal_uLong nMode = rInf.GetpOut()->GetLayoutMode();
+ const ComplexTextLayoutMode nMode = rInf.GetpOut()->GetLayoutMode();
const bool bBidiPor = ( bSwitchL2R !=
( 0 != ( TEXT_LAYOUT_BIDI_RTL & nMode ) ) );
diff --git a/vcl/source/app/help.cxx b/vcl/source/app/help.cxx
index b84364e00b24..3180bee56f9a 100644
--- a/vcl/source/app/help.cxx
+++ b/vcl/source/app/help.cxx
@@ -271,7 +271,7 @@ HelpTextWindow::HelpTextWindow( Window* pParent, const OUString& rText, sal_uInt
if( mnStyle & QUICKHELP_BIDI_RTL )
{
- sal_uLong nLayoutMode = GetLayoutMode();
+ ComplexTextLayoutMode nLayoutMode = GetLayoutMode();
nLayoutMode |= TEXT_LAYOUT_BIDI_RTL | TEXT_LAYOUT_TEXTORIGIN_LEFT;
SetLayoutMode( nLayoutMode );
}
diff --git a/vcl/source/control/ctrl.cxx b/vcl/source/control/ctrl.cxx
index c505afa3d094..8c5ac2e0dd37 100644
--- a/vcl/source/control/ctrl.cxx
+++ b/vcl/source/control/ctrl.cxx
@@ -74,7 +74,7 @@ void Control::EnableRTL( bool bEnable )
{
// convenience: for controls also switch layout mode
SetLayoutMode( bEnable ? TEXT_LAYOUT_BIDI_RTL | TEXT_LAYOUT_TEXTORIGIN_LEFT :
- TEXT_LAYOUT_BIDI_LTR | TEXT_LAYOUT_TEXTORIGIN_LEFT );
+ TEXT_LAYOUT_TEXTORIGIN_LEFT );
StateChanged( STATE_CHANGE_MIRRORING );
OutputDevice::EnableRTL(bEnable);
}
diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx
index bf6b283e43ee..b1b903a2e6e3 100644
--- a/vcl/source/control/edit.cxx
+++ b/vcl/source/control/edit.cxx
@@ -2238,7 +2238,7 @@ void Edit::StateChanged( StateChangedType nType )
else if( mbIsSubEdit && !GetParent()->IsRTLEnabled() )
{
if ( nType == STATE_CHANGE_MIRRORING )
- SetLayoutMode( TEXT_LAYOUT_BIDI_LTR | TEXT_LAYOUT_TEXTORIGIN_LEFT );
+ SetLayoutMode( TEXT_LAYOUT_TEXTORIGIN_LEFT );
}
if ( nStyle & WB_RIGHT )
diff --git a/vcl/source/edit/texteng.cxx b/vcl/source/edit/texteng.cxx
index 42ef8efcdc0d..9fb2e5c62ffe 100644
--- a/vcl/source/edit/texteng.cxx
+++ b/vcl/source/edit/texteng.cxx
@@ -3072,7 +3072,7 @@ long TextEngine::ImpGetPortionXOffset( sal_uLong nPara, TextLine* pLine, sal_uIn
void TextEngine::ImpInitLayoutMode( OutputDevice* pOutDev, bool bDrawingR2LPortion )
{
- sal_uLong nLayoutMode = pOutDev->GetLayoutMode();
+ ComplexTextLayoutMode nLayoutMode = pOutDev->GetLayoutMode();
nLayoutMode &= ~(TEXT_LAYOUT_BIDI_RTL | TEXT_LAYOUT_COMPLEX_DISABLED | TEXT_LAYOUT_BIDI_STRONG );
if ( bDrawingR2LPortion )
diff --git a/vcl/source/filter/wmf/emfwr.cxx b/vcl/source/filter/wmf/emfwr.cxx
index e8320b7dc63f..08461a3bd9ea 100644
--- a/vcl/source/filter/wmf/emfwr.cxx
+++ b/vcl/source/filter/wmf/emfwr.cxx
@@ -1467,15 +1467,15 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
case( META_LAYOUTMODE_ACTION ):
{
- sal_uInt32 nLayoutMode = ( (MetaLayoutModeAction*) pAction )->GetLayoutMode();
+ ComplexTextLayoutMode nLayoutMode = ( (MetaLayoutModeAction*) pAction )->GetLayoutMode();
mnHorTextAlign = 0;
- if (nLayoutMode & TEXT_LAYOUT_BIDI_RTL)
+ if ((nLayoutMode & TEXT_LAYOUT_BIDI_RTL) != TEXT_LAYOUT_DEFAULT)
{
mnHorTextAlign = TA_RIGHT | TA_RTLREADING;
}
- if (nLayoutMode & TEXT_LAYOUT_TEXTORIGIN_RIGHT)
+ if ((nLayoutMode & TEXT_LAYOUT_TEXTORIGIN_RIGHT) != TEXT_LAYOUT_DEFAULT)
mnHorTextAlign |= TA_RIGHT;
- else if (nLayoutMode & TEXT_LAYOUT_TEXTORIGIN_LEFT)
+ else if ((nLayoutMode & TEXT_LAYOUT_TEXTORIGIN_LEFT) != TEXT_LAYOUT_DEFAULT)
mnHorTextAlign &= ~TA_RIGHT;
break;
}
diff --git a/vcl/source/filter/wmf/enhwmf.cxx b/vcl/source/filter/wmf/enhwmf.cxx
index 48988d5f280d..164bfecb5f16 100644
--- a/vcl/source/filter/wmf/enhwmf.cxx
+++ b/vcl/source/filter/wmf/enhwmf.cxx
@@ -1418,7 +1418,7 @@ bool EnhWMFReader::ReadEnhWMF()
pWMF->SeekRel( 0x10 );
pWMF->ReadUInt32( offDx );
- sal_Int32 nTextLayoutMode = TEXT_LAYOUT_DEFAULT;
+ ComplexTextLayoutMode nTextLayoutMode = TEXT_LAYOUT_DEFAULT;
if ( nOptions & ETO_RTLREADING )
nTextLayoutMode = TEXT_LAYOUT_BIDI_RTL | TEXT_LAYOUT_TEXTORIGIN_LEFT;
pOut->SetTextLayoutMode( nTextLayoutMode );
diff --git a/vcl/source/filter/wmf/winmtf.cxx b/vcl/source/filter/wmf/winmtf.cxx
index 4f08ad1055f5..736ac69b8578 100644
--- a/vcl/source/filter/wmf/winmtf.cxx
+++ b/vcl/source/filter/wmf/winmtf.cxx
@@ -606,7 +606,7 @@ void WinMtfOutput::SelectObject( sal_Int32 nIndex )
}
-void WinMtfOutput::SetTextLayoutMode( const sal_uInt32 nTextLayoutMode )
+void WinMtfOutput::SetTextLayoutMode( ComplexTextLayoutMode nTextLayoutMode )
{
mnTextLayoutMode = nTextLayoutMode;
}
diff --git a/vcl/source/filter/wmf/winmtf.hxx b/vcl/source/filter/wmf/winmtf.hxx
index b3c675bf1939..e5fe7ae1f337 100644
--- a/vcl/source/filter/wmf/winmtf.hxx
+++ b/vcl/source/filter/wmf/winmtf.hxx
@@ -471,7 +471,8 @@ struct XForm
struct SaveStruct
{
- sal_uInt32 nBkMode, nMapMode, nGfxMode, nTextLayoutMode;
+ sal_uInt32 nBkMode, nMapMode, nGfxMode;
+ ComplexTextLayoutMode nTextLayoutMode;
sal_Int32 nWinOrgX, nWinOrgY, nWinExtX, nWinExtY;
sal_Int32 nDevOrgX, nDevOrgY, nDevWidth, nDevHeight;
@@ -593,8 +594,8 @@ class WinMtfOutput
Color maTextColor;
Color maLatestBkColor;
Color maBkColor;
- sal_uInt32 mnLatestTextLayoutMode;
- sal_uInt32 mnTextLayoutMode;
+ ComplexTextLayoutMode mnLatestTextLayoutMode;
+ ComplexTextLayoutMode mnTextLayoutMode;
sal_uInt32 mnLatestBkMode;
sal_uInt32 mnBkMode;
RasterOp meLatestRasterOp;
@@ -690,7 +691,7 @@ public:
rtl_TextEncoding GetCharSet(){ return maFont.GetCharSet(); };
WinMtfFillStyle& GetFillStyle () { return maFillStyle; }
const Font& GetFont() const { return maFont;}
- void SetTextLayoutMode( const sal_uInt32 nLayoutMode );
+ void SetTextLayoutMode( ComplexTextLayoutMode 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 8540ff90943d..41e652d84fbe 100644
--- a/vcl/source/filter/wmf/winwmf.cxx
+++ b/vcl/source/filter/wmf/winwmf.cxx
@@ -469,7 +469,7 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc )
pWMF->ReadUInt16( nLen );
pWMF->ReadUInt16( nOptions );
- sal_Int32 nTextLayoutMode = TEXT_LAYOUT_DEFAULT;
+ ComplexTextLayoutMode nTextLayoutMode = TEXT_LAYOUT_DEFAULT;
if ( nOptions & ETO_RTLREADING )
nTextLayoutMode = TEXT_LAYOUT_BIDI_RTL | TEXT_LAYOUT_TEXTORIGIN_LEFT;
pOut->SetTextLayoutMode( nTextLayoutMode );
diff --git a/vcl/source/filter/wmf/wmfwr.cxx b/vcl/source/filter/wmf/wmfwr.cxx
index c964487adc13..8dde397668b0 100644
--- a/vcl/source/filter/wmf/wmfwr.cxx
+++ b/vcl/source/filter/wmf/wmfwr.cxx
@@ -1582,15 +1582,15 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF )
case( META_LAYOUTMODE_ACTION ):
{
- sal_uInt32 nLayoutMode = ( (MetaLayoutModeAction*) pMA )->GetLayoutMode();
+ ComplexTextLayoutMode nLayoutMode = ( (MetaLayoutModeAction*) pMA )->GetLayoutMode();
eSrcHorTextAlign = 0; // TA_LEFT
- if (nLayoutMode & TEXT_LAYOUT_BIDI_RTL)
+ if ((nLayoutMode & TEXT_LAYOUT_BIDI_RTL) != TEXT_LAYOUT_DEFAULT)
{
eSrcHorTextAlign = W_TA_RIGHT | W_TA_RTLREADING;
}
- if (nLayoutMode & TEXT_LAYOUT_TEXTORIGIN_RIGHT)
+ if ((nLayoutMode & TEXT_LAYOUT_TEXTORIGIN_RIGHT) != TEXT_LAYOUT_DEFAULT)
eSrcHorTextAlign |= W_TA_RIGHT;
- else if (nLayoutMode & TEXT_LAYOUT_TEXTORIGIN_LEFT)
+ else if ((nLayoutMode & TEXT_LAYOUT_TEXTORIGIN_LEFT) != TEXT_LAYOUT_DEFAULT)
eSrcHorTextAlign &= ~W_TA_RIGHT;
break;
}
diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx
index 36c10226fceb..5217f2561ee8 100644
--- a/vcl/source/gdi/gdimtf.cxx
+++ b/vcl/source/gdi/gdimtf.cxx
@@ -351,7 +351,7 @@ void GDIMetaFile::Play( OutputDevice* pOut, size_t nPos )
// recent add-ons. Newer metafiles must of course explicitly set
// those states.
pOut->Push( PUSH_TEXTLAYOUTMODE|PUSH_TEXTLANGUAGE );
- pOut->SetLayoutMode( 0 );
+ pOut->SetLayoutMode( TEXT_LAYOUT_DEFAULT );
pOut->SetDigitLanguage( 0 );
OSL_TRACE("GDIMetaFile::Play on device of size: %ld x %ld", pOut->GetOutputSizePixel().Width(), pOut->GetOutputSizePixel().Height());
@@ -580,7 +580,7 @@ void GDIMetaFile::Play( OutputDevice* pOut, const Point& rPos,
// This is necessary, since old metafiles don't even know of these
// recent add-ons. Newer metafiles must of course explicitly set
// those states.
- pOut->SetLayoutMode( 0 );
+ pOut->SetLayoutMode( TEXT_LAYOUT_DEFAULT );
pOut->SetDigitLanguage( 0 );
Play( pOut, nPos );
diff --git a/vcl/source/gdi/metaact.cxx b/vcl/source/gdi/metaact.cxx
index 728860b7bd35..cad74be4c1d3 100644
--- a/vcl/source/gdi/metaact.cxx
+++ b/vcl/source/gdi/metaact.cxx
@@ -3698,13 +3698,13 @@ void MetaCommentAction::Read( SvStream& rIStm, ImplMetaReadData* )
MetaLayoutModeAction::MetaLayoutModeAction() :
MetaAction ( META_LAYOUTMODE_ACTION ),
- mnLayoutMode( 0 )
+ mnLayoutMode( TEXT_LAYOUT_DEFAULT )
{}
MetaLayoutModeAction::~MetaLayoutModeAction()
{}
-MetaLayoutModeAction::MetaLayoutModeAction( sal_uInt32 nLayoutMode ) :
+MetaLayoutModeAction::MetaLayoutModeAction( ComplexTextLayoutMode nLayoutMode ) :
MetaAction ( META_LAYOUTMODE_ACTION ),
mnLayoutMode( nLayoutMode )
{}
@@ -3736,7 +3736,9 @@ void MetaLayoutModeAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
void MetaLayoutModeAction::Read( SvStream& rIStm, ImplMetaReadData* )
{
VersionCompat aCompat(rIStm, STREAM_READ);
- rIStm.ReadUInt32( mnLayoutMode );
+ sal_uInt32 tmp;
+ rIStm.ReadUInt32( tmp );
+ mnLayoutMode = static_cast<ComplexTextLayoutMode>(tmp);
}
MetaTextLanguageAction::MetaTextLanguageAction() :
diff --git a/vcl/source/gdi/pdfwriter.cxx b/vcl/source/gdi/pdfwriter.cxx
index 8cc1c314baa2..8acf85f6e0f1 100644
--- a/vcl/source/gdi/pdfwriter.cxx
+++ b/vcl/source/gdi/pdfwriter.cxx
@@ -274,9 +274,9 @@ void PDFWriter::IntersectClipRegion( const Rectangle& rRect )
pImplementation->intersectClipRegion( rRect );
}
-void PDFWriter::SetLayoutMode( sal_uLong nMode )
+void PDFWriter::SetLayoutMode( ComplexTextLayoutMode nMode )
{
- pImplementation->setLayoutMode( (sal_Int32)nMode );
+ pImplementation->setLayoutMode( nMode );
}
void PDFWriter::SetDigitLanguage( LanguageType eLang )
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index 2ff64f1daf24..8b18321d7665 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -7581,7 +7581,7 @@ void PDFWriterImpl::drawLayout( SalLayout& rLayout, const OUString& rText, bool
// TODO: a real solution would be to map the layout engine's
// glyphid (i.e. FreeType's synthetic glyphid for a Type1 font)
// back to unicode and then to embeddable font's encoding
- if( getReferenceDevice()->GetLayoutMode() & TEXT_LAYOUT_BIDI_RTL )
+ if( (getReferenceDevice()->GetLayoutMode() & TEXT_LAYOUT_BIDI_RTL) != TEXT_LAYOUT_DEFAULT )
{
size_t nI = aUnicodes.size()-1;
for( int n = 0; n < nChars; n++, nI-- )
@@ -8386,7 +8386,7 @@ void PDFWriterImpl::drawStrikeoutChar( const Point& rPos, long nWidth, FontStrik
}
// strikeout string is left aligned non-CTL text
- sal_uLong nOrigTLM = m_pReferenceDevice->GetLayoutMode();
+ ComplexTextLayoutMode nOrigTLM = m_pReferenceDevice->GetLayoutMode();
m_pReferenceDevice->SetLayoutMode( TEXT_LAYOUT_BIDI_STRONG|TEXT_LAYOUT_COMPLEX_DISABLED );
push( PUSH_CLIPREGION );
diff --git a/vcl/source/gdi/pdfwriter_impl.hxx b/vcl/source/gdi/pdfwriter_impl.hxx
index 0020e9b1e202..ed4013befcd8 100644
--- a/vcl/source/gdi/pdfwriter_impl.hxx
+++ b/vcl/source/gdi/pdfwriter_impl.hxx
@@ -710,7 +710,7 @@ private:
basegfx::B2DPolyPolygon m_aClipRegion;
bool m_bClipRegion;
sal_Int32 m_nAntiAlias;
- sal_Int32 m_nLayoutMode;
+ ComplexTextLayoutMode m_nLayoutMode;
LanguageType m_aDigitLanguage;
sal_Int32 m_nTransparentPercent;
sal_uInt16 m_nFlags;
@@ -735,7 +735,7 @@ private:
m_aOverlineColor( COL_TRANSPARENT ),
m_bClipRegion( false ),
m_nAntiAlias( 1 ),
- m_nLayoutMode( 0 ),
+ m_nLayoutMode( TEXT_LAYOUT_DEFAULT ),
m_aDigitLanguage( 0 ),
m_nTransparentPercent( 0 ),
m_nFlags( 0xffff ),
@@ -1182,7 +1182,7 @@ public:
bool intersectClipRegion( const basegfx::B2DPolyPolygon& rRegion );
- void setLayoutMode( sal_Int32 nLayoutMode )
+ void setLayoutMode( ComplexTextLayoutMode nLayoutMode )
{
m_aGraphicsStack.front().m_nLayoutMode = nLayoutMode;
m_aGraphicsStack.front().m_nUpdateFlags |= GraphicsState::updateLayoutMode;
diff --git a/vcl/source/gdi/textlayout.cxx b/vcl/source/gdi/textlayout.cxx
index b1a3a77debd4..f7d3b81d3cac 100644
--- a/vcl/source/gdi/textlayout.cxx
+++ b/vcl/source/gdi/textlayout.cxx
@@ -263,7 +263,7 @@ namespace vcl
return Rectangle();
// determine text layout mode from the RTL-ness of the control whose text we render
- sal_uLong nTextLayoutMode = m_bRTLEnabled ? TEXT_LAYOUT_BIDI_RTL : TEXT_LAYOUT_BIDI_LTR;
+ ComplexTextLayoutMode nTextLayoutMode = m_bRTLEnabled ? TEXT_LAYOUT_BIDI_RTL : TEXT_LAYOUT_DEFAULT;
m_rReferenceDevice.SetLayoutMode( nTextLayoutMode );
m_rTargetDevice.SetLayoutMode( nTextLayoutMode | TEXT_LAYOUT_TEXTORIGIN_LEFT );
diff --git a/vcl/source/outdev/outdevstate.cxx b/vcl/source/outdev/outdevstate.cxx
index 2dcaf11f76a0..21a7727dfe55 100644
--- a/vcl/source/outdev/outdevstate.cxx
+++ b/vcl/source/outdev/outdevstate.cxx
@@ -289,7 +289,7 @@ void OutputDevice::SetDrawMode( sal_uLong nDrawMode )
mpAlphaVDev->SetDrawMode( nDrawMode );
}
-void OutputDevice::SetLayoutMode( sal_uLong nTextLayoutMode )
+void OutputDevice::SetLayoutMode( ComplexTextLayoutMode nTextLayoutMode )
{
if( mpMetaFile )
mpMetaFile->AddAction( new MetaLayoutModeAction( nTextLayoutMode ) );
diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx
index 75ac162ff040..51117fe1c172 100644
--- a/vcl/source/outdev/text.cxx
+++ b/vcl/source/outdev/text.cxx
@@ -1201,9 +1201,9 @@ ImplLayoutArgs OutputDevice::ImplPrepareLayoutArgs( OUString& rStr,
if( nEndIndex < nMinIndex )
nEndIndex = nMinIndex;
- if( mnTextLayoutMode & TEXT_LAYOUT_BIDI_RTL )
+ if( (mnTextLayoutMode & TEXT_LAYOUT_BIDI_RTL) != 0 )
nLayoutFlags |= SAL_LAYOUT_BIDI_RTL;
- if( mnTextLayoutMode & TEXT_LAYOUT_BIDI_STRONG )
+ if( (mnTextLayoutMode & TEXT_LAYOUT_BIDI_STRONG) != 0 )
nLayoutFlags |= SAL_LAYOUT_BIDI_STRONG;
else if( 0 == (mnTextLayoutMode & TEXT_LAYOUT_BIDI_RTL) )
{
@@ -1226,9 +1226,9 @@ ImplLayoutArgs OutputDevice::ImplPrepareLayoutArgs( OUString& rStr,
if( maFont.IsVertical() )
nLayoutFlags |= SAL_LAYOUT_VERTICAL;
- if( mnTextLayoutMode & TEXT_LAYOUT_ENABLE_LIGATURES )
+ if( (mnTextLayoutMode & TEXT_LAYOUT_ENABLE_LIGATURES) != 0 )
nLayoutFlags |= SAL_LAYOUT_ENABLE_LIGATURES;
- else if( mnTextLayoutMode & TEXT_LAYOUT_COMPLEX_DISABLED )
+ else if( (mnTextLayoutMode & TEXT_LAYOUT_COMPLEX_DISABLED) != 0 )
nLayoutFlags |= SAL_LAYOUT_COMPLEX_DISABLED;
else
{
@@ -1274,9 +1274,9 @@ ImplLayoutArgs OutputDevice::ImplPrepareLayoutArgs( OUString& rStr,
// right align for RTL text, DRAWPOS_REVERSED, RTL window style
bool bRightAlign = ((mnTextLayoutMode & TEXT_LAYOUT_BIDI_RTL) != 0);
- if( mnTextLayoutMode & TEXT_LAYOUT_TEXTORIGIN_LEFT )
+ if( (mnTextLayoutMode & TEXT_LAYOUT_TEXTORIGIN_LEFT) != 0 )
bRightAlign = false;
- else if ( mnTextLayoutMode & TEXT_LAYOUT_TEXTORIGIN_RIGHT )
+ else if ( (mnTextLayoutMode & TEXT_LAYOUT_TEXTORIGIN_RIGHT) != 0 )
bRightAlign = true;
// SSA: hack for western office, ie text get right aligned
// for debugging purposes of mirrored UI
diff --git a/vcl/source/outdev/textline.cxx b/vcl/source/outdev/textline.cxx
index 5cf597823fbd..def2f64af08d 100644
--- a/vcl/source/outdev/textline.cxx
+++ b/vcl/source/outdev/textline.cxx
@@ -625,7 +625,7 @@ void OutputDevice::ImplDrawStrikeoutChar( long nBaseX, long nBaseY,
nBaseY += nDistY;
// strikeout text has to be left aligned
- sal_uLong nOrigTLM = mnTextLayoutMode;
+ ComplexTextLayoutMode nOrigTLM = mnTextLayoutMode;
mnTextLayoutMode = TEXT_LAYOUT_BIDI_STRONG | TEXT_LAYOUT_COMPLEX_DISABLED;
pLayout = ImplLayout( aStrikeoutText, 0, aStrikeoutText.getLength() );
mnTextLayoutMode = nOrigTLM;