summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-08-01 12:34:33 +0200
committerCaolán McNamara <caolanm@redhat.com>2014-08-20 09:01:26 -0500
commit794d5ac4ac0b1dcaac289772ce096a4295d4e15d (patch)
treed02d4d13e793b0856c4dd962cf4b8d946942e3c4 /editeng
parent71804294c79136ef43a8f91b5c961e266d32187a (diff)
vcl: use enum for complex text layout constants
Since these constants are bitfield flags, we define some methods to make working with them reasonably type safe. Move the definitions to outdevstate.hxx, since we need the values there, and that appears to be the "root most" header file. Also dump TEXT_LAYOUT_BIDI_LTR constant, since it means the same thing as TEXT_LAYOUT_DEFAULT (ie. 0), and leaving it in causes people to write weird code thinking that it's a real flag. Change-Id: Iddab86cd6c78181ceb8caa48e77e1f5a8e526343 Reviewed-on: https://gerrit.libreoffice.org/10676 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'editeng')
-rw-r--r--editeng/source/editeng/impedit3.cxx2
-rw-r--r--editeng/source/outliner/outliner.cxx2
2 files changed, 2 insertions, 2 deletions
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;