diff options
author | Noel Grandin <noel@peralex.com> | 2015-05-15 11:05:45 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-05-20 09:52:08 +0200 |
commit | 7a0af37989d1f1b508a61f28e785c5b1f27d58af (patch) | |
tree | 758b9e8afed12bd028229c72bcb080264191219c /vcl/source/outdev | |
parent | 78deb81c55266d37e35ff97fbb5b4086245d8ff2 (diff) |
convert SAL_LAYOUT flags to scoped enum
Change-Id: I0aeea1f32136e43e90a1afb0ea84dbaff2b77587
Diffstat (limited to 'vcl/source/outdev')
-rw-r--r-- | vcl/source/outdev/font.cxx | 2 | ||||
-rw-r--r-- | vcl/source/outdev/outdev.cxx | 8 | ||||
-rw-r--r-- | vcl/source/outdev/text.cxx | 36 |
3 files changed, 23 insertions, 23 deletions
diff --git a/vcl/source/outdev/font.cxx b/vcl/source/outdev/font.cxx index eefa320c8434..3e7f00917d51 100644 --- a/vcl/source/outdev/font.cxx +++ b/vcl/source/outdev/font.cxx @@ -2072,7 +2072,7 @@ SalLayout* OutputDevice::ImplGlyphFallbackLayout( SalLayout* pSalLayout, ImplLay MultiSalLayout* pMultiSalLayout = NULL; ImplLayoutRuns aLayoutRuns = rLayoutArgs.maRuns; rLayoutArgs.PrepareFallback(); - rLayoutArgs.mnFlags |= SAL_LAYOUT_FOR_FALLBACK; + rLayoutArgs.mnFlags |= SalLayoutFlags::ForFallback; // get list of unicodes that need glyph fallback int nCharPos = -1; diff --git a/vcl/source/outdev/outdev.cxx b/vcl/source/outdev/outdev.cxx index e9e622867c14..85ab4a2528f0 100644 --- a/vcl/source/outdev/outdev.cxx +++ b/vcl/source/outdev/outdev.cxx @@ -723,7 +723,7 @@ void OutputDevice::drawOutDevDirect( const OutputDevice* pSrcDev, SalTwoRect& rP // mirroring may be required // because only windows have a SalGraphicsLayout // mirroring is performed here - if( (GetOutDevType() != OUTDEV_WINDOW) && pSrcGraphics && (pSrcGraphics->GetLayout() & SAL_LAYOUT_BIDI_RTL) ) + if( (GetOutDevType() != OUTDEV_WINDOW) && pSrcGraphics && (pSrcGraphics->GetLayout() & SalLayoutFlags::BiDiRtl) ) { SalTwoRect aPosAry2 = rPosAry; pSrcGraphics->mirror( aPosAry2.mnSrcX, aPosAry2.mnSrcWidth, pSrcDev ); @@ -749,8 +749,8 @@ bool OutputDevice::ImplIsAntiparallel() const bool bRet = false; if( AcquireGraphics() ) { - if( ( (mpGraphics->GetLayout() & SAL_LAYOUT_BIDI_RTL) && ! IsRTLEnabled() ) || - ( ! (mpGraphics->GetLayout() & SAL_LAYOUT_BIDI_RTL) && IsRTLEnabled() ) ) + if( ( (mpGraphics->GetLayout() & SalLayoutFlags::BiDiRtl) && ! IsRTLEnabled() ) || + ( ! (mpGraphics->GetLayout() & SalLayoutFlags::BiDiRtl) && IsRTLEnabled() ) ) { bRet = true; } @@ -794,7 +794,7 @@ void OutputDevice::ReMirror( vcl::Region &rRegion ) const bool OutputDevice::HasMirroredGraphics() const { - return ( AcquireGraphics() && (mpGraphics->GetLayout() & SAL_LAYOUT_BIDI_RTL) ); + return ( AcquireGraphics() && (mpGraphics->GetLayout() & SalLayoutFlags::BiDiRtl) ); } bool OutputDevice::ImplIsRecordLayout() const diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx index b142dd2dc30b..832cdbc4d0a5 100644 --- a/vcl/source/outdev/text.cxx +++ b/vcl/source/outdev/text.cxx @@ -959,7 +959,7 @@ float OutputDevice::approximate_char_width() const void OutputDevice::DrawTextArray( const Point& rStartPt, const OUString& rStr, const long* pDXAry, - sal_Int32 nIndex, sal_Int32 nLen, int flags ) + sal_Int32 nIndex, sal_Int32 nLen, SalLayoutFlags flags ) { if(nLen == 0x0FFFF) { @@ -1012,7 +1012,7 @@ long OutputDevice::GetTextArray( const OUString& rStr, long* pDXAry, } // do layout SalLayout *const pSalLayout = ImplLayout(rStr, nIndex, nLen, - Point(0,0), 0, nullptr, 0, pLayoutCache); + Point(0,0), 0, nullptr, SalLayoutFlags::NONE, pLayoutCache); if( !pSalLayout ) return 0; #if VCL_FLOAT_DEVICE_PIXEL @@ -1194,7 +1194,7 @@ void OutputDevice::DrawStretchText( const Point& rStartPt, sal_uLong nWidth, ImplLayoutArgs OutputDevice::ImplPrepareLayoutArgs( OUString& rStr, const sal_Int32 nMinIndex, const sal_Int32 nLen, DeviceCoordinate nPixelWidth, const DeviceCoordinate* pDXArray, - int nLayoutFlags, + SalLayoutFlags nLayoutFlags, vcl::TextLayoutCache const*const pLayoutCache) const { assert(nMinIndex >= 0); @@ -1210,9 +1210,9 @@ ImplLayoutArgs OutputDevice::ImplPrepareLayoutArgs( OUString& rStr, nEndIndex = nMinIndex; if( mnTextLayoutMode & TEXT_LAYOUT_BIDI_RTL ) - nLayoutFlags |= SAL_LAYOUT_BIDI_RTL; + nLayoutFlags |= SalLayoutFlags::BiDiRtl; if( mnTextLayoutMode & TEXT_LAYOUT_BIDI_STRONG ) - nLayoutFlags |= SAL_LAYOUT_BIDI_STRONG; + nLayoutFlags |= SalLayoutFlags::BiDiStrong; else if( !(mnTextLayoutMode & TEXT_LAYOUT_BIDI_RTL) ) { // disable Bidi if no RTL hint and no RTL codes used @@ -1224,20 +1224,20 @@ ImplLayoutArgs OutputDevice::ImplPrepareLayoutArgs( OUString& rStr, || ((*pStr >= 0xFE70) && (*pStr < 0xFEFF)) ) // arabic presentation forms B break; if( pStr >= pEnd ) - nLayoutFlags |= SAL_LAYOUT_BIDI_STRONG; + nLayoutFlags |= SalLayoutFlags::BiDiStrong; } if( mbKerning ) - nLayoutFlags |= SAL_LAYOUT_KERNING_PAIRS; + nLayoutFlags |= SalLayoutFlags::KerningPairs; if( maFont.GetKerning() & FontKerning::Asian ) - nLayoutFlags |= SAL_LAYOUT_KERNING_ASIAN; + nLayoutFlags |= SalLayoutFlags::KerningAsian; if( maFont.IsVertical() ) - nLayoutFlags |= SAL_LAYOUT_VERTICAL; + nLayoutFlags |= SalLayoutFlags::Vertical; if( mnTextLayoutMode & TEXT_LAYOUT_ENABLE_LIGATURES ) - nLayoutFlags |= SAL_LAYOUT_ENABLE_LIGATURES; + nLayoutFlags |= SalLayoutFlags::EnableLigatures; else if( mnTextLayoutMode & TEXT_LAYOUT_COMPLEX_DISABLED ) - nLayoutFlags |= SAL_LAYOUT_COMPLEX_DISABLED; + nLayoutFlags |= SalLayoutFlags::ComplexDisabled; else { // disable CTL for non-CTL text @@ -1255,7 +1255,7 @@ ImplLayoutArgs OutputDevice::ImplPrepareLayoutArgs( OUString& rStr, ) break; if( pStr >= pEnd ) - nLayoutFlags |= SAL_LAYOUT_COMPLEX_DISABLED; + nLayoutFlags |= SalLayoutFlags::ComplexDisabled; } if( meTextLanguage ) //TODO: (mnTextLayoutMode & TEXT_LAYOUT_SUBSTITUTE_DIGITS) @@ -1291,7 +1291,7 @@ ImplLayoutArgs OutputDevice::ImplPrepareLayoutArgs( OUString& rStr, bool bRTLWindow = IsRTLEnabled(); bRightAlign ^= bRTLWindow; if( bRightAlign ) - nLayoutFlags |= SAL_LAYOUT_RIGHT_ALIGN; + nLayoutFlags |= SalLayoutFlags::RightAlign; // set layout options ImplLayoutArgs aLayoutArgs( rStr.getStr(), rStr.getLength(), nMinIndex, nEndIndex, nLayoutFlags, maFont.GetLanguageTag(), pLayoutCache ); @@ -1308,7 +1308,7 @@ ImplLayoutArgs OutputDevice::ImplPrepareLayoutArgs( OUString& rStr, SalLayout* OutputDevice::ImplLayout(const OUString& rOrigStr, sal_Int32 nMinIndex, sal_Int32 nLen, const Point& rLogicalPos, long nLogicalWidth, - const long* pDXArray, int flags, + const long* pDXArray, SalLayoutFlags flags, vcl::TextLayoutCache const* pLayoutCache) const { // we need a graphics @@ -1399,7 +1399,7 @@ SalLayout* OutputDevice::ImplLayout(const OUString& rOrigStr, pSalLayout->AdjustLayout( aLayoutArgs ); pSalLayout->DrawBase() = ImplLogicToDevicePixel( rLogicalPos ); // adjust to right alignment if necessary - if( aLayoutArgs.mnFlags & SAL_LAYOUT_RIGHT_ALIGN ) + if( aLayoutArgs.mnFlags & SalLayoutFlags::RightAlign ) { DeviceCoordinate nRTLOffset; if( pDXPixelArray ) @@ -1421,7 +1421,7 @@ std::shared_ptr<vcl::TextLayoutCache> OutputDevice::CreateTextLayoutCache( return nullptr; OUString copyBecausePrepareModifiesIt(rString); ImplLayoutArgs aLayoutArgs = ImplPrepareLayoutArgs(copyBecausePrepareModifiesIt, - 0, rString.getLength(), 0, nullptr, 0, nullptr); + 0, rString.getLength(), 0, nullptr, SalLayoutFlags::NONE, nullptr); SalLayout *const pSalLayout = mpGraphics->GetTextLayout( aLayoutArgs, 0 ); if (!pSalLayout) @@ -1449,7 +1449,7 @@ sal_Int32 OutputDevice::GetTextBreak( const OUString& rStr, long nTextWidth, vcl::TextLayoutCache const*const pLayoutCache) const { SalLayout *const pSalLayout = ImplLayout( rStr, nIndex, nLen, - Point(0,0), 0, nullptr, 0, pLayoutCache); + Point(0,0), 0, nullptr, SalLayoutFlags::NONE, pLayoutCache); sal_Int32 nRetVal = -1; if( pSalLayout ) { @@ -1484,7 +1484,7 @@ sal_Int32 OutputDevice::GetTextBreak( const OUString& rStr, long nTextWidth, rHyphenPos = -1; SalLayout *const pSalLayout = ImplLayout( rStr, nIndex, nLen, - Point(0,0), 0, nullptr, 0, pLayoutCache); + Point(0,0), 0, nullptr, SalLayoutFlags::NONE, pLayoutCache); sal_Int32 nRetVal = -1; if( pSalLayout ) { |