diff options
author | Noel Grandin <noel@peralex.com> | 2013-07-25 11:24:53 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-07-29 14:15:41 +0200 |
commit | eb96a5296a76d25bc751177a5e785178f2497adb (patch) | |
tree | c2800e00ae8155a62ec902079d8e634cecfbf80f /vcl | |
parent | d5ee0143082c29b9822324e9a55191379f1d163f (diff) |
convert OutputDevice::DrawText from XubString to OUString
Change-Id: I5c641fff9a7b2a32658cdaf81aa5f45048263f22
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/inc/textlayout.hxx | 2 | ||||
-rw-r--r-- | vcl/source/gdi/outdev3.cxx | 14 | ||||
-rw-r--r-- | vcl/source/gdi/textlayout.cxx | 2 |
3 files changed, 9 insertions, 9 deletions
diff --git a/vcl/inc/textlayout.hxx b/vcl/inc/textlayout.hxx index 0788a8a10565..2b51699c1d7e 100644 --- a/vcl/inc/textlayout.hxx +++ b/vcl/inc/textlayout.hxx @@ -112,7 +112,7 @@ namespace vcl virtual ~ControlTextRenderer(); Rectangle DrawText( const Rectangle& _rRect, - const XubString& _rText, sal_uInt16 _nStyle = 0, + const OUString& _rText, sal_uInt16 _nStyle = 0, MetricVector* _pVector = NULL, OUString* _pDisplayText = NULL ); private: diff --git a/vcl/source/gdi/outdev3.cxx b/vcl/source/gdi/outdev3.cxx index f5ef5adc4422..401b25ec7c84 100644 --- a/vcl/source/gdi/outdev3.cxx +++ b/vcl/source/gdi/outdev3.cxx @@ -5364,7 +5364,7 @@ void OutputDevice::DrawWaveLine( const Point& rStartPos, const Point& rEndPos, mpAlphaVDev->DrawWaveLine( rStartPos, rEndPos, nStyle ); } -void OutputDevice::DrawText( const Point& rStartPt, const String& rStr, +void OutputDevice::DrawText( const Point& rStartPt, const OUString& rStr, xub_StrLen nIndex, xub_StrLen nLen, MetricVector* pVector, OUString* pDisplayText ) @@ -5406,7 +5406,7 @@ void OutputDevice::DrawText( const Point& rStartPt, const String& rStr, if( aClip.IsOver( *it ) ) bAppend = true; - else if( rStr.GetChar( nIndex ) == ' ' && bInserted ) + else if( rStr[ nIndex ] == ' ' && bInserted ) { MetricVector::const_iterator next = it; ++next; @@ -5418,7 +5418,7 @@ void OutputDevice::DrawText( const Point& rStartPt, const String& rStr, { pVector->push_back( *it ); if( pDisplayText ) - *pDisplayText += OUString(rStr.GetChar( nIndex )); + *pDisplayText += OUString(rStr[ nIndex ]); bInserted = true; } } @@ -5427,7 +5427,7 @@ void OutputDevice::DrawText( const Point& rStartPt, const String& rStr, { GetGlyphBoundRects( rStartPt, rStr, nIndex, nLen, nIndex, *pVector ); if( pDisplayText ) - *pDisplayText += rStr.Copy( nIndex, nLen ); + *pDisplayText += rStr.copy( nIndex, nLen ); } } @@ -6084,7 +6084,7 @@ xub_StrLen OutputDevice::GetTextBreak( const OUString& rStr, long nTextWidth, } void OutputDevice::ImplDrawText( OutputDevice& rTargetDevice, const Rectangle& rRect, - const String& rOrigStr, sal_uInt16 nStyle, + const OUString& rOrigStr, sal_uInt16 nStyle, MetricVector* pVector, OUString* pDisplayText, ::vcl::ITextLayout& _rLayout ) { @@ -6380,7 +6380,7 @@ void OutputDevice::AddTextRectActions( const Rectangle& rRect, mpMetaFile = pMtf; } -void OutputDevice::DrawText( const Rectangle& rRect, const String& rOrigStr, sal_uInt16 nStyle, +void OutputDevice::DrawText( const Rectangle& rRect, const OUString& rOrigStr, sal_uInt16 nStyle, MetricVector* pVector, OUString* pDisplayText, ::vcl::ITextLayout* _pTextLayout ) { @@ -6396,7 +6396,7 @@ void OutputDevice::DrawText( const Rectangle& rRect, const String& rOrigStr, sal if ( mpMetaFile && !bDecomposeTextRectAction ) mpMetaFile->AddAction( new MetaTextRectAction( rRect, rOrigStr, nStyle ) ); - if ( ( !IsDeviceOutputNecessary() && !pVector && !bDecomposeTextRectAction ) || !rOrigStr.Len() || rRect.IsEmpty() ) + if ( ( !IsDeviceOutputNecessary() && !pVector && !bDecomposeTextRectAction ) || rOrigStr.isEmpty() || rRect.IsEmpty() ) return; // we need a graphics diff --git a/vcl/source/gdi/textlayout.cxx b/vcl/source/gdi/textlayout.cxx index 7be750d52ee3..ba2cfb5b89c3 100644 --- a/vcl/source/gdi/textlayout.cxx +++ b/vcl/source/gdi/textlayout.cxx @@ -315,7 +315,7 @@ namespace vcl { } - Rectangle ControlTextRenderer::DrawText( const Rectangle& _rRect, const XubString& _rText, sal_uInt16 _nStyle, + Rectangle ControlTextRenderer::DrawText( const Rectangle& _rRect, const OUString& _rText, sal_uInt16 _nStyle, MetricVector* _pVector, OUString* _pDisplayText ) { return m_pImpl->DrawText( _rRect, _rText, _nStyle, _pVector, _pDisplayText ); |