From 96699848ec8e72ec4893777d9f2d657872862ffc Mon Sep 17 00:00:00 2001 From: "Chr. Rossmanith" Date: Sat, 30 Mar 2013 18:59:57 +0100 Subject: Use OUString and sal_Int32 in GetTextWidth() (2) Change-Id: I85ea6cc60add141954c8b75f78a8024c872d7174 Reviewed-on: https://gerrit.libreoffice.org/3158 Reviewed-by: Michael Stahl Tested-by: Michael Stahl --- vcl/inc/textlayout.hxx | 8 ++++---- vcl/source/gdi/textlayout.cxx | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'vcl') diff --git a/vcl/inc/textlayout.hxx b/vcl/inc/textlayout.hxx index 28f21ebaae2e..0788a8a10565 100644 --- a/vcl/inc/textlayout.hxx +++ b/vcl/inc/textlayout.hxx @@ -40,7 +40,7 @@ namespace vcl class SAL_NO_VTABLE ITextLayout { public: - virtual long GetTextWidth( const XubString& _rText, xub_StrLen _nStartIndex, xub_StrLen _nLength ) const = 0; + virtual long GetTextWidth( const OUString& _rText, sal_Int32 _nStartIndex, sal_Int32 _nLength ) const = 0; virtual void DrawText( const Point& _rStartPoint, const OUString& _rText, sal_Int32 _nStartIndex, sal_Int32 _nLength, MetricVector* _pVector, OUString* _pDisplayText ) = 0; virtual bool GetCaretPositions( const OUString& _rText, sal_Int32* _pCaretXArray, sal_Int32 _nStartIndex, sal_Int32 _nLength ) const = 0; @@ -68,9 +68,9 @@ namespace vcl // ITextLayout overridables virtual long GetTextWidth( - const XubString& _rText, - xub_StrLen _nStartIndex, - xub_StrLen _nLength + const OUString& _rText, + sal_Int32 _nStartIndex, + sal_Int32 _nLength ) const; virtual void DrawText( const Point& _rStartPoint, diff --git a/vcl/source/gdi/textlayout.cxx b/vcl/source/gdi/textlayout.cxx index 5e7032970587..1e79f32731a9 100644 --- a/vcl/source/gdi/textlayout.cxx +++ b/vcl/source/gdi/textlayout.cxx @@ -50,7 +50,7 @@ namespace vcl } //-------------------------------------------------------------------- - long DefaultTextLayout::GetTextWidth( const XubString& _rText, xub_StrLen _nStartIndex, xub_StrLen _nLength ) const + long DefaultTextLayout::GetTextWidth( const OUString& _rText, sal_Int32 _nStartIndex, sal_Int32 _nLength ) const { return m_rTargetDevice.GetTextWidth( _rText, _nStartIndex, _nLength ); } @@ -91,7 +91,7 @@ namespace vcl virtual ~ReferenceDeviceTextLayout(); // ITextLayout - virtual long GetTextWidth( const XubString& rStr, xub_StrLen nIndex, xub_StrLen nLen ) const; + virtual long GetTextWidth( const OUString& rStr, sal_Int32 nIndex, sal_Int32 nLen ) const; virtual void DrawText( const Point& _rStartPoint, const OUString& _rText, sal_Int32 _nStartIndex, sal_Int32 _nLength, MetricVector* _pVector, OUString* _pDisplayText ); virtual bool GetCaretPositions( const OUString& _rText, sal_Int32* _pCaretXArray, sal_Int32 _nStartIndex, sal_Int32 _nLength ) const; virtual xub_StrLen GetTextBreak( const OUString& _rText, long _nMaxTextWidth, sal_Int32 _nStartIndex, sal_Int32 _nLength ) const; @@ -223,7 +223,7 @@ namespace vcl } //-------------------------------------------------------------------- - long ReferenceDeviceTextLayout::GetTextWidth( const XubString& _rText, xub_StrLen _nStartIndex, xub_StrLen _nLength ) const + long ReferenceDeviceTextLayout::GetTextWidth( const OUString& _rText, sal_Int32 _nStartIndex, sal_Int32 _nLength ) const { return GetTextArray( _rText, NULL, _nStartIndex, _nLength ); } -- cgit