summaryrefslogtreecommitdiff
path: root/vcl/inc/textlayout.hxx
diff options
context:
space:
mode:
authorNorbert Thiebaud <nthiebaud@gmail.com>2014-07-18 18:21:12 +0200
committerNorbert Thiebaud <nthiebaud@gmail.com>2014-07-20 22:10:59 +0200
commitcd3d26b7edbce67805259a71e4118223e02ebdd4 (patch)
treefbb103d9877275f80eab075f22a8e0753fccf151 /vcl/inc/textlayout.hxx
parent8e21a02520cbd2fdc09df1ca675f4aa46a02d5f6 (diff)
vcl consitent use of long for corrdinate
most of length in vcl are calculated in 'long' but array of X position tend to be in sal_Int32. As a prep work to be able to support 'double' as the base type of Device Coordinate, harmonize the use of 'long' for non-float coordinate. Change-Id: I7cb33301ff6a5e2c62247b36a4e07e168a58a323
Diffstat (limited to 'vcl/inc/textlayout.hxx')
-rw-r--r--vcl/inc/textlayout.hxx50
1 files changed, 23 insertions, 27 deletions
diff --git a/vcl/inc/textlayout.hxx b/vcl/inc/textlayout.hxx
index dd5de8b03539..14980218d90a 100644
--- a/vcl/inc/textlayout.hxx
+++ b/vcl/inc/textlayout.hxx
@@ -34,7 +34,7 @@ namespace vcl
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;
+ virtual bool GetCaretPositions( const OUString& _rText, long* _pCaretXArray, sal_Int32 _nStartIndex, sal_Int32 _nLength ) const = 0;
virtual sal_Int32 GetTextBreak( const OUString& _rText, long _nMaxTextWidth, sal_Int32 _nStartIndex, sal_Int32 _nLength ) const = 0;
virtual bool DecomposeTextRectAction() const = 0;
@@ -49,37 +49,33 @@ namespace vcl
{
public:
DefaultTextLayout( OutputDevice& _rTargetDevice )
- :m_rTargetDevice( _rTargetDevice )
+ : m_rTargetDevice( _rTargetDevice )
{
}
virtual ~DefaultTextLayout();
// ITextLayout overridables
- virtual long GetTextWidth(
- const OUString& _rText,
- sal_Int32 _nStartIndex,
- sal_Int32 _nLength
- ) const SAL_OVERRIDE;
- virtual void DrawText(
- const Point& _rStartPoint,
- const OUString& _rText,
- sal_Int32 _nStartIndex,
- sal_Int32 _nLength,
- MetricVector* _pVector,
- OUString* _pDisplayText
- ) SAL_OVERRIDE;
- virtual bool GetCaretPositions(
- const OUString& _rText,
- sal_Int32* _pCaretXArray,
- sal_Int32 _nStartIndex,
- sal_Int32 _nLength
- ) const SAL_OVERRIDE;
- virtual sal_Int32 GetTextBreak(
- const OUString& _rText,
- long _nMaxTextWidth,
- sal_Int32 _nStartIndex,
- sal_Int32 _nLength
- ) const SAL_OVERRIDE;
+ virtual long GetTextWidth( const OUString& _rText,
+ sal_Int32 _nStartIndex,
+ sal_Int32 _nLength ) const SAL_OVERRIDE;
+
+ virtual void DrawText( const Point& _rStartPoint,
+ const OUString& _rText,
+ sal_Int32 _nStartIndex,
+ sal_Int32 _nLength,
+ MetricVector* _pVector,
+ OUString* _pDisplayText ) SAL_OVERRIDE;
+
+ virtual bool GetCaretPositions( const OUString& _rText,
+ long* _pCaretXArray,
+ sal_Int32 _nStartIndex,
+ sal_Int32 _nLength ) const SAL_OVERRIDE;
+
+ virtual sal_Int32 GetTextBreak( const OUString& _rText,
+ long _nMaxTextWidth,
+ sal_Int32 _nStartIndex,
+ sal_Int32 _nLength ) const SAL_OVERRIDE;
+
virtual bool DecomposeTextRectAction() const SAL_OVERRIDE;
private: