Date: prev next · Thread: first prev next last
2013 Archives by date, by thread · List index


Hi,

I have submitted a patch for review:

    https://gerrit.libreoffice.org/3158

To pull it, you can do:

    git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/58/3158/1

Use OUString and sal_Int32 in GetTextWidth() (2)

Change-Id: I85ea6cc60add141954c8b75f78a8024c872d7174
---
M vcl/inc/textlayout.hxx
M vcl/source/gdi/textlayout.cxx
2 files changed, 7 insertions(+), 7 deletions(-)



diff --git a/vcl/inc/textlayout.hxx b/vcl/inc/textlayout.hxx
index 28f21eb..0788a8a 100644
--- a/vcl/inc/textlayout.hxx
+++ b/vcl/inc/textlayout.hxx
@@ -40,7 +40,7 @@
     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 @@
 
         // 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 5e70329..1e79f32 100644
--- a/vcl/source/gdi/textlayout.cxx
+++ b/vcl/source/gdi/textlayout.cxx
@@ -50,7 +50,7 @@
     }
 
     //--------------------------------------------------------------------
-    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 @@
         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 @@
     }
 
     //--------------------------------------------------------------------
-    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 );
     }

-- 
To view, visit https://gerrit.libreoffice.org/3158
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I85ea6cc60add141954c8b75f78a8024c872d7174
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Christina Roßmanith <ChrRossmanith@web.de>


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.