diff options
author | Noel Grandin <noel@peralex.com> | 2014-08-01 12:34:33 +0200 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-08-20 09:01:26 -0500 |
commit | 794d5ac4ac0b1dcaac289772ce096a4295d4e15d (patch) | |
tree | d02d4d13e793b0856c4dd962cf4b8d946942e3c4 /starmath | |
parent | Resolves: fdo#79227 labels are truncated (diff) | |
download | core-794d5ac4ac0b1dcaac289772ce096a4295d4e15d.tar.gz core-794d5ac4ac0b1dcaac289772ce096a4295d4e15d.zip |
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 'starmath')
-rw-r--r-- | starmath/source/ElementsDockingWindow.cxx | 2 | ||||
-rw-r--r-- | starmath/source/document.cxx | 8 |
2 files changed, 5 insertions, 5 deletions
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 ); |