diff options
author | Norbert Thiebaud <nthiebaud@gmail.com> | 2014-07-15 21:45:11 +0200 |
---|---|---|
committer | Norbert Thiebaud <nthiebaud@gmail.com> | 2014-07-15 21:45:11 +0200 |
commit | 7a8fcfca98ee10666c58011ebe0a5f96e008d22d (patch) | |
tree | 9b309898f40cde3f9945c170ec46e628d10d66cf /vcl/source/outdev | |
parent | 6c8de2b107964cd3d26dba8fcf80c6da77b1d97a (diff) |
fdo#79673 quartz: draw 'bullet' for 'space' directly in one pass
the current implementation of CoreText simply dropped the proper
implementation of DrawTextArray, by ignoring DXArray
this very visibly borked the show-non-displayable character
feature of writer.. the bullet representing the 'spaces'
was quite misplaced.
This solve specifically this problem.
More work is needed to bring proper support of DXArray back to CoreText
Conflicts:
vcl/inc/sallayout.hxx
vcl/source/outdev/text.cxx
Change-Id: Idb2cc90d5ffaa8b83f79241cee2d512112d1c3be
Diffstat (limited to 'vcl/source/outdev')
-rw-r--r-- | vcl/source/outdev/text.cxx | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx index 1c20f7f08050..93a0e919d2a2 100644 --- a/vcl/source/outdev/text.cxx +++ b/vcl/source/outdev/text.cxx @@ -281,8 +281,8 @@ bool OutputDevice::ImplDrawRotateText( SalLayout& rSalLayout ) } bool OutputDevice::ImplDrawTextDirect( SalLayout& rSalLayout, - bool bTextLines, - sal_uInt32 flags ) + bool bTextLines, + sal_uInt32 flags ) { if( mpFontEntry->mnOwnOrientation ) if( ImplDrawRotateText( rSalLayout ) ) @@ -950,7 +950,7 @@ float OutputDevice::approximate_char_width() const void OutputDevice::DrawTextArray( const Point& rStartPt, const OUString& rStr, const sal_Int32* pDXAry, - sal_Int32 nIndex, sal_Int32 nLen ) + sal_Int32 nIndex, sal_Int32 nLen, int flags ) { if(nLen == 0x0FFFF) { @@ -973,7 +973,7 @@ void OutputDevice::DrawTextArray( const Point& rStartPt, const OUString& rStr, if( mbOutputClipped ) return; - SalLayout* pSalLayout = ImplLayout(rStr, nIndex, nLen, rStartPt, 0, pDXAry); + SalLayout* pSalLayout = ImplLayout(rStr, nIndex, nLen, rStartPt, 0, pDXAry, flags); if( pSalLayout ) { ImplDrawText( *pSalLayout ); @@ -981,7 +981,7 @@ void OutputDevice::DrawTextArray( const Point& rStartPt, const OUString& rStr, } if( mpAlphaVDev ) - mpAlphaVDev->DrawTextArray( rStartPt, rStr, pDXAry, nIndex, nLen ); + mpAlphaVDev->DrawTextArray( rStartPt, rStr, pDXAry, nIndex, nLen, flags ); } long OutputDevice::GetTextArray( const OUString& rStr, sal_Int32* pDXAry, @@ -1101,7 +1101,7 @@ bool OutputDevice::GetCaretPositions( const OUString& rStr, sal_Int32* pCaretXAr void OutputDevice::DrawStretchText( const Point& rStartPt, sal_uLong nWidth, const OUString& rStr, - sal_Int32 nIndex, sal_Int32 nLen ) + sal_Int32 nIndex, sal_Int32 nLen) { if(nIndex < 0 || nIndex == 0x0FFFF || nLen == 0x0FFFF) { @@ -1131,8 +1131,9 @@ void OutputDevice::DrawStretchText( const Point& rStartPt, sal_uLong nWidth, } ImplLayoutArgs OutputDevice::ImplPrepareLayoutArgs( OUString& rStr, - const sal_Int32 nMinIndex, const sal_Int32 nLen, - long nPixelWidth, const sal_Int32* pDXArray ) const + const sal_Int32 nMinIndex, const sal_Int32 nLen, + long nPixelWidth, const sal_Int32* pDXArray, + int nLayoutFlags ) const { assert(nMinIndex >= 0); assert(nLen >= 0); @@ -1146,7 +1147,6 @@ ImplLayoutArgs OutputDevice::ImplPrepareLayoutArgs( OUString& rStr, if( nEndIndex < nMinIndex ) nEndIndex = nMinIndex; - int nLayoutFlags = 0; if( mnTextLayoutMode & TEXT_LAYOUT_BIDI_RTL ) nLayoutFlags |= SAL_LAYOUT_BIDI_RTL; if( mnTextLayoutMode & TEXT_LAYOUT_BIDI_STRONG ) @@ -1244,9 +1244,9 @@ ImplLayoutArgs OutputDevice::ImplPrepareLayoutArgs( OUString& rStr, } SalLayout* OutputDevice::ImplLayout(const OUString& rOrigStr, - sal_Int32 nMinIndex, sal_Int32 nLen, - const Point& rLogicalPos, long nLogicalWidth, - const sal_Int32* pDXArray) const + sal_Int32 nMinIndex, sal_Int32 nLen, + const Point& rLogicalPos, long nLogicalWidth, + const sal_Int32* pDXArray, int flags) const { // we need a graphics if( !mpGraphics ) @@ -1292,7 +1292,7 @@ SalLayout* OutputDevice::ImplLayout(const OUString& rOrigStr, pDXArray = pTempDXAry; } - ImplLayoutArgs aLayoutArgs = ImplPrepareLayoutArgs( aStr, nMinIndex, nLen, nPixelWidth, pDXArray ); + ImplLayoutArgs aLayoutArgs = ImplPrepareLayoutArgs( aStr, nMinIndex, nLen, nPixelWidth, pDXArray, flags); // get matching layout object for base font SalLayout* pSalLayout = mpGraphics->GetTextLayout( aLayoutArgs, 0 ); |