summaryrefslogtreecommitdiff
path: root/vcl/win/source
diff options
context:
space:
mode:
authorNorbert Thiebaud <nthiebaud@gmail.com>2014-09-06 16:13:09 +0200
committerNorbert Thiebaud <nthiebaud@gmail.com>2014-09-12 01:45:27 +0200
commit1b42acdaeae134f94580d6e1eba89da16741d596 (patch)
tree882710be2c142cdef62823c9600925ee22f8dab7 /vcl/win/source
parent43638d8428abb8358a703247651fbfc72e47ff72 (diff)
vcl: use DeviceCoordinate for GetCaretPositions in sallayout
Change-Id: I5a959e1c3806da713e106c1b0fc8690a6578987b
Diffstat (limited to 'vcl/win/source')
-rw-r--r--vcl/win/source/gdi/winlayout.cxx22
1 files changed, 11 insertions, 11 deletions
diff --git a/vcl/win/source/gdi/winlayout.cxx b/vcl/win/source/gdi/winlayout.cxx
index eff3f9c0856a..a232bd717cfb 100644
--- a/vcl/win/source/gdi/winlayout.cxx
+++ b/vcl/win/source/gdi/winlayout.cxx
@@ -147,7 +147,7 @@ public:
virtual DeviceCoordinate FillDXArray( DeviceCoordinate* pDXArray ) const;
virtual sal_Int32 GetTextBreak(DeviceCoordinate nMaxWidth, DeviceCoordinate nCharExtra, int nFactor) const SAL_OVERRIDE;
- virtual void GetCaretPositions( int nArraySize, long* pCaretXArray ) const;
+ virtual void GetCaretPositions( int nArraySize, DeviceCoordinate* pCaretXArray ) const;
// for glyph+font+script fallback
virtual void MoveGlyph( int nStart, long nNewXPos );
@@ -667,9 +667,9 @@ sal_Int32 SimpleWinLayout::GetTextBreak( DeviceCoordinate nMaxWidth, DeviceCoord
return -1;
}
-void SimpleWinLayout::GetCaretPositions( int nMaxIdx, long* pCaretXArray ) const
+void SimpleWinLayout::GetCaretPositions( int nMaxIdx, DeviceCoordinat* pCaretXArray ) const
{
- long nXPos = mnBaseAdv;
+ DeviceCoordinate nXPos = mnBaseAdv;
if( !mpGlyphs2Chars )
{
@@ -684,13 +684,13 @@ void SimpleWinLayout::GetCaretPositions( int nMaxIdx, long* pCaretXArray ) const
{
int i;
for( i = 0; i < nMaxIdx; ++i )
- pCaretXArray[ i ] = -1;
+ pCaretXArray[ i ] = (DeviceCoordinate)-1;
// assign glyph positions to character positions
for( i = 0; i < mnGlyphCount; ++i )
{
int nCurrIdx = mpGlyphs2Chars[ i ] - mnMinCharPos;
- long nXRight = nXPos + mpCharWidths[ nCurrIdx ];
+ DeviceCoordinate nXRight = nXPos + mpCharWidths[ nCurrIdx ];
nCurrIdx *= 2;
if( !(mpGlyphRTLFlags && mpGlyphRTLFlags[i]) )
{
@@ -968,7 +968,7 @@ public:
virtual DeviceCoordinate FillDXArray( DeviceCoordinate* pDXArray ) const;
virtual sal_Int32 GetTextBreak(DeviceCoordinate nMaxWidth, DeviceCoordinate nCharExtra, int nFactor) const SAL_OVERRIDE;
- virtual void GetCaretPositions( int nArraySize, long* pCaretXArray ) const;
+ virtual void GetCaretPositions( int nArraySize, DeviceCoordinate* pCaretXArray ) const;
virtual bool IsKashidaPosValid ( int nCharPos ) const;
// for glyph+font+script fallback
@@ -2158,16 +2158,16 @@ sal_Int32 UniscribeLayout::GetTextBreak( DeviceCoordinate nMaxWidth, DeviceCoord
return -1;
}
-void UniscribeLayout::GetCaretPositions( int nMaxIdx, long* pCaretXArray ) const
+void UniscribeLayout::GetCaretPositions( int nMaxIdx, DeviceCoordinate* pCaretXArray ) const
{
int i;
for( i = 0; i < nMaxIdx; ++i )
pCaretXArray[ i ] = -1;
- long* const pGlyphPos = (long*)alloca( (mnGlyphCount+1) * sizeof(long) );
+ DeviceCoordinate* const pGlyphPos = (DeviceCoordinate*)alloca( (mnGlyphCount+1) * sizeof(DeviceCoordinate) );
for( i = 0; i <= mnGlyphCount; ++i )
pGlyphPos[ i ] = -1;
- long nXPos = 0;
+ DeviceCoordinate nXPos = 0;
for( int nItem = 0; nItem < mnItemCount; ++nItem )
{
const VisualItem& rVisualItem = mpVisualItems[ nItem ];
@@ -2643,7 +2643,7 @@ public:
virtual sal_Int32 GetTextBreak(DeviceCoordinate nMaxWidth, DeviceCoordinate nCharExtra=0, int nFactor=1) const SAL_OVERRIDE;
virtual DeviceCoordinate FillDXArray( DeviceCoordinate* pDXArray ) const;
- virtual void GetCaretPositions( int nArraySize, long* pCaretXArray ) const;
+ virtual void GetCaretPositions( int nArraySize, DeviceCoordinate* pCaretXArray ) const;
// methods using glyph indexing
virtual int GetNextGlyphs(int nLen, sal_GlyphId* pGlyphIdxAry, ::Point & rPos, int&,
@@ -2787,7 +2787,7 @@ DeviceCoordinate GraphiteWinLayout::FillDXArray( DeviceCoordinate* pDXArray ) co
return maImpl.FillDXArray(pDXArray);
}
-void GraphiteWinLayout::GetCaretPositions( int nArraySize, long* pCaretXArray ) const
+void GraphiteWinLayout::GetCaretPositions( int nArraySize, DeviceCoordinate* pCaretXArray ) const
{
maImpl.GetCaretPositions(nArraySize, pCaretXArray);
}