diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-03-20 13:18:25 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-03-20 14:40:32 +0000 |
commit | 7a8815875f2d4f31b05d8b3796c5cfc03b581977 (patch) | |
tree | 26e7208ef4c0be99ff11907f765bc6a2445618b0 | |
parent | ed6171632005cdaa987214e84f0ad8fd0dbdd2da (diff) |
all the filterText impls are now no-ops, so remove
Change-Id: I6e67756bb89235198c8d2705833d18ee9fb77fb1
-rw-r--r-- | include/vcl/outdev.hxx | 2 | ||||
-rw-r--r-- | vcl/generic/print/genpspgraphics.cxx | 5 | ||||
-rw-r--r-- | vcl/inc/generic/genpspgraphics.h | 2 | ||||
-rw-r--r-- | vcl/inc/salgdi.hxx | 34 | ||||
-rw-r--r-- | vcl/source/gdi/outdev3.cxx | 36 | ||||
-rw-r--r-- | vcl/source/gdi/salgdilayout.cxx | 5 |
6 files changed, 9 insertions, 75 deletions
diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx index e3986acd783f..2adb4d1f4a56 100644 --- a/include/vcl/outdev.hxx +++ b/include/vcl/outdev.hxx @@ -783,7 +783,7 @@ public: SAL_DLLPRIVATE void ReMirror( Region &rRegion ) const; SAL_DLLPRIVATE SalLayout* ImplLayout( const OUString&, sal_Int32 nIndex, sal_Int32 nLen, const Point& rLogicPos = Point(0,0), long nLogicWidth=0, - const sal_Int32* pLogicDXArray=NULL, bool bFilter = false ) const; + const sal_Int32* pLogicDXArray=NULL ) const; SAL_DLLPRIVATE ImplLayoutArgs ImplPrepareLayoutArgs( OUString&, const sal_Int32 nIndex, const sal_Int32 nLen, long nPixelWidth, const sal_Int32* pPixelDXArray ) const; SAL_DLLPRIVATE SalLayout* ImplGlyphFallbackLayout( SalLayout*, ImplLayoutArgs& ) const; diff --git a/vcl/generic/print/genpspgraphics.cxx b/vcl/generic/print/genpspgraphics.cxx index 9e0221f499fc..84eb8be57491 100644 --- a/vcl/generic/print/genpspgraphics.cxx +++ b/vcl/generic/print/genpspgraphics.cxx @@ -1194,11 +1194,6 @@ void GenPspGraphics::AnnounceFonts( ImplDevFontList* pFontList, const psp::FastP pFontList->Add( pFD ); } -bool GenPspGraphics::filterText( const OUString& /*rOrig*/, OUString& /*rNewText*/, sal_Int32 /*nIndex*/, sal_Int32& /*rLen*/, sal_Int32& /*rCutStart*/, sal_Int32& /*rCutStop*/ ) -{ - return false; -} - bool GenPspGraphics::drawAlphaBitmap( const SalTwoRect&, const SalBitmap&, const SalBitmap& ) diff --git a/vcl/inc/generic/genpspgraphics.h b/vcl/inc/generic/genpspgraphics.h index 946f79c39b72..6bb32682b7ca 100644 --- a/vcl/inc/generic/genpspgraphics.h +++ b/vcl/inc/generic/genpspgraphics.h @@ -168,8 +168,6 @@ public: virtual void invert( sal_uInt32 nPoints, const SalPoint* pPtAry, SalInvert nFlags ); virtual bool drawEPS( long nX, long nY, long nWidth, long nHeight, void* pPtr, sal_uIntPtr nSize ); - virtual bool filterText( const OUString& rOrigText, OUString& rNewText, sal_Int32 nIndex, sal_Int32& rLen, sal_Int32& rCutStart, sal_Int32& rCutStop ); - virtual bool drawAlphaBitmap( const SalTwoRect&, const SalBitmap& rSourceBitmap, const SalBitmap& rAlphaBitmap ); diff --git a/vcl/inc/salgdi.hxx b/vcl/inc/salgdi.hxx index add454786a4d..69920f6dca7e 100644 --- a/vcl/inc/salgdi.hxx +++ b/vcl/inc/salgdi.hxx @@ -310,40 +310,6 @@ public: virtual SalLayout* GetTextLayout( ImplLayoutArgs&, int nFallbackLevel ) = 0; virtual void DrawServerFontLayout( const ServerFontLayout& ) = 0; - /** Filter text from DrawText commands in a device specific manner - <p> - This function allows a device (or rather the corresponding SalGraphics - implementation) to prevent text portions from being drawn. This currently - is used only for filtering out the fax number in a document that is printed - to one of psprint's specialized "fax" printers. - </p> - - @param rOrigText - The original text - - @param rNewText - A String that will be filled with the adjusted version - - @param nIndex - The index inside <code>rOrigText</code> that marks the first draw character - - @param rLen - in: length of text beginning at <code>nIndex</code> to be drawn - out: length of <code>rNewText</code> containing the substituted text - - @param rCutStart - out: index at which the cutout portion of <code>rOrigText</code> begins - - @param rCutStop - out: index at which the cutout portion of <code>rOrigText</code> ends - - @returns - true: a substitution has taken place and rNewText rLen, rCutStart and rCutStop have been filled accordingly - false: no substitution has taken place, rNewText, rLen, rCutStart, rCutStop remain unchanged - */ - virtual bool filterText( const OUString& rOrigText, OUString& rNewText, - sal_Int32 nIndex, sal_Int32& rLen, sal_Int32& rCutStart, sal_Int32& rCutStop ); - virtual bool supportsOperation( OutDevSupportType ) const = 0; // mirroring specifica diff --git a/vcl/source/gdi/outdev3.cxx b/vcl/source/gdi/outdev3.cxx index c78794d76bb9..78bbb17cf891 100644 --- a/vcl/source/gdi/outdev3.cxx +++ b/vcl/source/gdi/outdev3.cxx @@ -5468,7 +5468,7 @@ void OutputDevice::DrawText( const Point& rStartPt, const OUString& rStr, if ( !IsDeviceOutputNecessary() || pVector ) return; - SalLayout* pSalLayout = ImplLayout( rStr, nIndex, nLen, rStartPt, 0, NULL, true ); + SalLayout* pSalLayout = ImplLayout(rStr, nIndex, nLen, rStartPt, 0, NULL); if( pSalLayout ) { ImplDrawText( *pSalLayout ); @@ -5535,7 +5535,7 @@ void OutputDevice::DrawTextArray( const Point& rStartPt, const OUString& rStr, if( mbOutputClipped ) return; - SalLayout* pSalLayout = ImplLayout( rStr, nIndex, nLen, rStartPt, 0, pDXAry, true ); + SalLayout* pSalLayout = ImplLayout(rStr, nIndex, nLen, rStartPt, 0, pDXAry); if( pSalLayout ) { ImplDrawText( *pSalLayout ); @@ -5681,7 +5681,7 @@ void OutputDevice::DrawStretchText( const Point& rStartPt, sal_uLong nWidth, if ( !IsDeviceOutputNecessary() ) return; - SalLayout* pSalLayout = ImplLayout( rStr, nIndex, nLen, rStartPt, nWidth, NULL, true ); + SalLayout* pSalLayout = ImplLayout(rStr, nIndex, nLen, rStartPt, nWidth, NULL); if( pSalLayout ) { ImplDrawText( *pSalLayout ); @@ -5805,9 +5805,10 @@ ImplLayoutArgs OutputDevice::ImplPrepareLayoutArgs( OUString& rStr, return aLayoutArgs; } -SalLayout* OutputDevice::ImplLayout( const OUString& rOrigStr, sal_Int32 nMinIndex, sal_Int32 nLen, - const Point& rLogicalPos, long nLogicalWidth, const sal_Int32* pDXArray, - bool bFilter ) const +SalLayout* OutputDevice::ImplLayout(const OUString& rOrigStr, + sal_Int32 nMinIndex, sal_Int32 nLen, + const Point& rLogicalPos, long nLogicalWidth, + const sal_Int32* pDXArray) const { // we need a graphics if( !mpGraphics ) @@ -5832,27 +5833,6 @@ SalLayout* OutputDevice::ImplLayout( const OUString& rOrigStr, sal_Int32 nMinInd OUString aStr = rOrigStr; - // filter out special markers - if( bFilter ) - { - sal_Int32 nCutStart, nCutStop, nOrgLen = nLen; - bool bFiltered = mpGraphics->filterText( rOrigStr, aStr, nMinIndex, nLen, nCutStart, nCutStop ); - if( !nLen ) - return NULL; - - if( bFiltered && nCutStop != nCutStart && pDXArray ) - { - sal_Int32* pAry = (sal_Int32*)alloca(sizeof(sal_Int32)*nLen); - if( nCutStart > nMinIndex ) - memcpy( pAry, pDXArray, sizeof(sal_Int32)*(nCutStart-nMinIndex) ); - // note: nCutStart will never be smaller than nMinIndex - memcpy( pAry+nCutStart-nMinIndex, - pDXArray + nOrgLen - (nCutStop-nMinIndex), - sizeof(sal_Int32)*(nLen - (nCutStart-nMinIndex)) ); - pDXArray = pAry; - } - } - // convert from logical units to physical units // recode string if needed if( mpFontEntry->mpConversion ) { @@ -7161,7 +7141,7 @@ SystemTextLayoutData OutputDevice::GetSysTextLayoutData(const Point& rStartPt, c if ( !IsDeviceOutputNecessary() ) return aSysLayoutData; - SalLayout* pLayout = ImplLayout( rStr, nIndex, nLen, rStartPt, 0, pDXAry, true ); + SalLayout* pLayout = ImplLayout(rStr, nIndex, nLen, rStartPt, 0, pDXAry); if ( !pLayout ) return aSysLayoutData; diff --git a/vcl/source/gdi/salgdilayout.cxx b/vcl/source/gdi/salgdilayout.cxx index 6ef35096e269..1d9430fc7c2b 100644 --- a/vcl/source/gdi/salgdilayout.cxx +++ b/vcl/source/gdi/salgdilayout.cxx @@ -796,9 +796,4 @@ bool SalGraphics::DrawAlphaRect( long nX, long nY, long nWidth, long nHeight, return drawAlphaRect( nX, nY, nWidth, nHeight, nTransparency ); } -bool SalGraphics::filterText( const OUString&, OUString&, sal_Int32, sal_Int32&, sal_Int32&, sal_Int32& ) -{ - return false; -} - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |