summaryrefslogtreecommitdiff
path: root/vcl
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
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')
-rw-r--r--vcl/inc/graphite_layout.hxx4
-rw-r--r--vcl/inc/graphite_serverfont.hxx4
-rw-r--r--vcl/inc/sallayout.hxx12
-rw-r--r--vcl/inc/textlayout.hxx50
-rw-r--r--vcl/quartz/ctlayout.cxx8
-rw-r--r--vcl/source/control/edit.cxx32
-rw-r--r--vcl/source/filter/wmf/emfwr.cxx10
-rw-r--r--vcl/source/filter/wmf/emfwr.hxx2
-rw-r--r--vcl/source/filter/wmf/enhwmf.cxx14
-rw-r--r--vcl/source/filter/wmf/winmtf.cxx6
-rw-r--r--vcl/source/filter/wmf/winmtf.hxx13
-rw-r--r--vcl/source/filter/wmf/winwmf.cxx14
-rw-r--r--vcl/source/filter/wmf/wmfwr.cxx15
-rw-r--r--vcl/source/filter/wmf/wmfwr.hxx18
-rw-r--r--vcl/source/gdi/cvtsvm.cxx23
-rw-r--r--vcl/source/gdi/metaact.cxx17
-rw-r--r--vcl/source/gdi/pdfwriter.cxx2
-rw-r--r--vcl/source/gdi/pdfwriter_impl.cxx9
-rw-r--r--vcl/source/gdi/pdfwriter_impl.hxx2
-rw-r--r--vcl/source/gdi/sallayout.cxx18
-rw-r--r--vcl/source/gdi/textlayout.cxx14
-rw-r--r--vcl/source/glyphs/graphite_layout.cxx2
-rw-r--r--vcl/source/outdev/text.cxx32
-rw-r--r--vcl/source/outdev/textline.cxx3
-rw-r--r--vcl/win/source/gdi/winlayout.cxx2
-rw-r--r--vcl/workben/outdevgrind.cxx5
26 files changed, 168 insertions, 163 deletions
diff --git a/vcl/inc/graphite_layout.hxx b/vcl/inc/graphite_layout.hxx
index feb341d76b86..77bab7e30893 100644
--- a/vcl/inc/graphite_layout.hxx
+++ b/vcl/inc/graphite_layout.hxx
@@ -127,11 +127,11 @@ public:
virtual DeviceCoordinate FillDXArray( DeviceCoordinate* pDXArray ) const SAL_OVERRIDE;
virtual void ApplyDXArray(ImplLayoutArgs &rArgs, std::vector<int> & rDeltaWidth);
- virtual void GetCaretPositions( int nArraySize, sal_Int32* pCaretXArray ) const SAL_OVERRIDE;
+ virtual void GetCaretPositions( int nArraySize, long* pCaretXArray ) const SAL_OVERRIDE;
// methods using glyph indexing
virtual int GetNextGlyphs(int nLen, sal_GlyphId* pGlyphIdxAry, ::Point & rPos, int&,
- sal_Int32* pGlyphAdvAry = NULL, int* pCharPosAry = NULL,
+ long* pGlyphAdvAry = NULL, int* pCharPosAry = NULL,
const PhysicalFontFace** pFallbackFonts = NULL ) const SAL_OVERRIDE;
// used by glyph+font+script fallback
diff --git a/vcl/inc/graphite_serverfont.hxx b/vcl/inc/graphite_serverfont.hxx
index b4540e20d600..ffbcc064c575 100644
--- a/vcl/inc/graphite_serverfont.hxx
+++ b/vcl/inc/graphite_serverfont.hxx
@@ -80,14 +80,14 @@ public:
{
return maImpl.GetTextBreak(mw, ce, f);
}
- virtual void GetCaretPositions( int as, sal_Int32* cxa ) const SAL_OVERRIDE
+ virtual void GetCaretPositions( int as, long* cxa ) const SAL_OVERRIDE
{
maImpl.GetCaretPositions(as, cxa);
}
// used by display layers
virtual int GetNextGlyphs( int l, sal_GlyphId* gia, Point& p, int& s,
- sal_Int32* gaa = NULL, int* cpa = NULL,
+ long* gaa = NULL, int* cpa = NULL,
const PhysicalFontFace** pFallbackFonts = NULL ) const SAL_OVERRIDE
{
maImpl.DrawBase() = maDrawBase;
diff --git a/vcl/inc/sallayout.hxx b/vcl/inc/sallayout.hxx
index c69b42b0bfb4..976ac5b9598f 100644
--- a/vcl/inc/sallayout.hxx
+++ b/vcl/inc/sallayout.hxx
@@ -174,12 +174,12 @@ public:
virtual sal_Int32 GetTextBreak(long nMaxWidth, long nCharExtra=0, int nFactor=1) const = 0;
virtual DeviceCoordinate FillDXArray( DeviceCoordinate* pDXArray ) const = 0;
virtual long GetTextWidth() const { return FillDXArray( NULL ); }
- virtual void GetCaretPositions( int nArraySize, sal_Int32* pCaretXArray ) const = 0;
+ virtual void GetCaretPositions( int nArraySize, long* pCaretXArray ) const = 0;
virtual bool IsKashidaPosValid ( int /*nCharPos*/ ) const { return true; } // i60594
// methods using glyph indexing
virtual int GetNextGlyphs( int nLen, sal_GlyphId* pGlyphIdAry, Point& rPos, int&,
- sal_Int32* pGlyphAdvAry = NULL, int* pCharPosAry = NULL,
+ long* pGlyphAdvAry = NULL, int* pCharPosAry = NULL,
const PhysicalFontFace** pFallbackFonts = NULL ) const = 0;
virtual bool GetOutline( SalGraphics&, ::basegfx::B2DPolyPolygonVector& ) const;
virtual bool GetBoundRect( SalGraphics&, Rectangle& ) const;
@@ -231,9 +231,9 @@ public:
virtual void DrawText( SalGraphics& ) const SAL_OVERRIDE;
virtual sal_Int32 GetTextBreak(long nMaxWidth, long nCharExtra, int nFactor) const SAL_OVERRIDE;
virtual DeviceCoordinate FillDXArray( DeviceCoordinate* pDXArray ) const SAL_OVERRIDE;
- virtual void GetCaretPositions( int nArraySize, sal_Int32* pCaretXArray ) const SAL_OVERRIDE;
+ virtual void GetCaretPositions( int nArraySize, long* pCaretXArray ) const SAL_OVERRIDE;
virtual int GetNextGlyphs( int nLen, sal_GlyphId* pGlyphIdxAry, Point& rPos,
- int&, sal_Int32* pGlyphAdvAry, int* pCharPosAry,
+ int&, long* pGlyphAdvAry, int* pCharPosAry,
const PhysicalFontFace** pFallbackFonts ) const SAL_OVERRIDE;
virtual bool GetOutline( SalGraphics&, ::basegfx::B2DPolyPolygonVector& ) const SAL_OVERRIDE;
@@ -332,11 +332,11 @@ public:
virtual long GetTextWidth() const SAL_OVERRIDE;
virtual DeviceCoordinate FillDXArray( DeviceCoordinate* pDXArray ) const SAL_OVERRIDE;
virtual sal_Int32 GetTextBreak(long nMaxWidth, long nCharExtra, int nFactor) const SAL_OVERRIDE;
- virtual void GetCaretPositions( int nArraySize, sal_Int32* pCaretXArray ) const SAL_OVERRIDE;
+ virtual void GetCaretPositions( int nArraySize, long* pCaretXArray ) const SAL_OVERRIDE;
// used by display layers
virtual int GetNextGlyphs( int nLen, sal_GlyphId* pGlyphIdxAry, Point& rPos, int&,
- sal_Int32* pGlyphAdvAry = NULL, int* pCharPosAry = NULL,
+ long* pGlyphAdvAry = NULL, int* pCharPosAry = NULL,
const PhysicalFontFace** pFallbackFonts = NULL ) const SAL_OVERRIDE;
protected:
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:
diff --git a/vcl/quartz/ctlayout.cxx b/vcl/quartz/ctlayout.cxx
index b21d8607a470..48d9626244e5 100644
--- a/vcl/quartz/ctlayout.cxx
+++ b/vcl/quartz/ctlayout.cxx
@@ -39,13 +39,13 @@ public:
virtual bool DrawTextSpecial( SalGraphics& rGraphics, sal_uInt32 flags ) const SAL_OVERRIDE;
virtual int GetNextGlyphs( int nLen, sal_GlyphId* pOutGlyphIds, Point& rPos, int&,
- sal_Int32* pGlyphAdvances, int* pCharIndexes,
+ long* pGlyphAdvances, int* pCharIndexes,
const PhysicalFontFace** pFallbackFonts ) const SAL_OVERRIDE;
virtual long GetTextWidth() const SAL_OVERRIDE;
virtual DeviceCoordinate FillDXArray( DeviceCoordinate* pDXArray ) const SAL_OVERRIDE;
virtual sal_Int32 GetTextBreak(long nMaxWidth, long nCharExtra, int nFactor) const SAL_OVERRIDE;
- virtual void GetCaretPositions( int nArraySize, sal_Int32* pCaretXArray ) const SAL_OVERRIDE;
+ virtual void GetCaretPositions( int nArraySize, long* pCaretXArray ) const SAL_OVERRIDE;
virtual bool GetBoundRect( SalGraphics&, Rectangle& ) const SAL_OVERRIDE;
virtual void InitFont( void) const SAL_OVERRIDE;
@@ -473,7 +473,7 @@ bool CTLayout::CacheGlyphLayout(void) const // eew!
}
int CTLayout::GetNextGlyphs( int nLen, sal_GlyphId* pOutGlyphIds, Point& rPos, int& nStart,
- sal_Int32* pGlyphAdvances, int* pCharIndexes,
+ long* pGlyphAdvances, int* pCharIndexes,
const PhysicalFontFace** pFallbackFonts ) const
{
if( !mpCTLine )
@@ -679,7 +679,7 @@ sal_Int32 CTLayout::GetTextBreak( long nMaxWidth, long nCharExtra, int nFactor )
return nIndex;
}
-void CTLayout::GetCaretPositions( int nMaxIndex, sal_Int32* pCaretXArray ) const
+void CTLayout::GetCaretPositions( int nMaxIndex, long* pCaretXArray ) const
{
DBG_ASSERT( ((nMaxIndex>0)&&!(nMaxIndex&1)),
"CTLayout::GetCaretPositions() : invalid number of caret pairs requested");
diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx
index 2e9726069366..e03f0e5391db 100644
--- a/vcl/source/control/edit.cxx
+++ b/vcl/source/control/edit.cxx
@@ -483,15 +483,15 @@ void Edit::ImplRepaint(bool bLayout)
OUString aText = ImplGetText();
sal_Int32 nLen = aText.getLength();
- sal_Int32 nDXBuffer[256];
- boost::scoped_array<sal_Int32> pDXBuffer;
- sal_Int32* pDX = nDXBuffer;
+ long nDXBuffer[256];
+ boost::scoped_array<long> pDXBuffer;
+ long* pDX = nDXBuffer;
if( !aText.isEmpty() )
{
if( (size_t) (2*aText.getLength()) > SAL_N_ELEMENTS(nDXBuffer) )
{
- pDXBuffer.reset(new sal_Int32[2*(aText.getLength()+1)]);
+ pDXBuffer.reset(new long[2*(aText.getLength()+1)]);
pDX = pDXBuffer.get();
}
@@ -1081,15 +1081,15 @@ void Edit::ImplShowCursor( bool bOnlyIfVisible )
long nTextPos = 0;
- sal_Int32 nDXBuffer[256];
- boost::scoped_array<sal_Int32> pDXBuffer;
- sal_Int32* pDX = nDXBuffer;
+ long nDXBuffer[256];
+ boost::scoped_array<long> pDXBuffer;
+ long* pDX = nDXBuffer;
if( !aText.isEmpty() )
{
if( (size_t) (2*aText.getLength()) > SAL_N_ELEMENTS(nDXBuffer) )
{
- pDXBuffer.reset(new sal_Int32[2*(aText.getLength()+1)]);
+ pDXBuffer.reset(new long[2*(aText.getLength()+1)]);
pDX = pDXBuffer.get();
}
@@ -1197,12 +1197,12 @@ sal_Int32 Edit::ImplGetCharPos( const Point& rWindowPos ) const
sal_Int32 nIndex = EDIT_NOLIMIT;
OUString aText = ImplGetText();
- sal_Int32 nDXBuffer[256];
- boost::scoped_array<sal_Int32> pDXBuffer;
- sal_Int32* pDX = nDXBuffer;
+ long nDXBuffer[256];
+ boost::scoped_array<long> pDXBuffer;
+ long* pDX = nDXBuffer;
if( (size_t) (2*aText.getLength()) > SAL_N_ELEMENTS(nDXBuffer) )
{
- pDXBuffer.reset(new sal_Int32[2*(aText.getLength()+1)]);
+ pDXBuffer.reset(new long[2*(aText.getLength()+1)]);
pDX = pDXBuffer.get();
}
@@ -2162,15 +2162,15 @@ void Edit::Command( const CommandEvent& rCEvt )
if (mpIMEInfos && mpIMEInfos->nLen > 0)
{
OUString aText = ImplGetText();
- sal_Int32 nDXBuffer[256];
- boost::scoped_array<sal_Int32> pDXBuffer;
- sal_Int32* pDX = nDXBuffer;
+ long nDXBuffer[256];
+ boost::scoped_array<long> pDXBuffer;
+ long* pDX = nDXBuffer;
if( !aText.isEmpty() )
{
if( (size_t) (2*aText.getLength()) > SAL_N_ELEMENTS(nDXBuffer) )
{
- pDXBuffer.reset(new sal_Int32[2*(aText.getLength()+1)]);
+ pDXBuffer.reset(new long[2*(aText.getLength()+1)]);
pDX = pDXBuffer.get();
}
diff --git a/vcl/source/filter/wmf/emfwr.cxx b/vcl/source/filter/wmf/emfwr.cxx
index af017b17415b..e8320b7dc63f 100644
--- a/vcl/source/filter/wmf/emfwr.cxx
+++ b/vcl/source/filter/wmf/emfwr.cxx
@@ -870,25 +870,25 @@ void EMFWriter::ImplWriteBmpRecord( const Bitmap& rBmp, const Point& rPt,
}
}
-void EMFWriter::ImplWriteTextRecord( const Point& rPos, const OUString& rText, const sal_Int32* pDXArray, sal_uInt32 nWidth )
+void EMFWriter::ImplWriteTextRecord( const Point& rPos, const OUString& rText, const long* pDXArray, sal_uInt32 nWidth )
{
sal_Int32 nLen = rText.getLength(), i;
if( nLen )
{
sal_uInt32 nNormWidth;
- boost::scoped_array<sal_Int32> pOwnArray;
- sal_Int32* pDX;
+ boost::scoped_array<long> pOwnArray;
+ long* pDX;
// get text sizes
if( pDXArray )
{
nNormWidth = maVDev.GetTextWidth( rText );
- pDX = (sal_Int32*) pDXArray;
+ pDX = (long*) pDXArray;
}
else
{
- pOwnArray.reset(new sal_Int32[ nLen ]);
+ pOwnArray.reset(new long[ nLen ]);
nNormWidth = maVDev.GetTextArray( rText, pOwnArray.get() );
pDX = pOwnArray.get();
}
diff --git a/vcl/source/filter/wmf/emfwr.hxx b/vcl/source/filter/wmf/emfwr.hxx
index 66b28952b8e5..bbd86f06bbc5 100644
--- a/vcl/source/filter/wmf/emfwr.hxx
+++ b/vcl/source/filter/wmf/emfwr.hxx
@@ -77,7 +77,7 @@ private:
void ImplWritePolygonRecord( const Polygon& rPoly, bool bClose );
void ImplWritePolyPolygonRecord( const PolyPolygon& rPolyPoly );
void ImplWriteBmpRecord( const Bitmap& rBmp, const Point& rPt, const Size& rSz, sal_uInt32 nROP );
- void ImplWriteTextRecord( const Point& rPos, const OUString& rText, const sal_Int32* pDXArray, sal_uInt32 nWidth );
+ void ImplWriteTextRecord( const Point& rPos, const OUString& rText, const long* pDXArray, sal_uInt32 nWidth );
void Impl_handleLineInfoPolyPolygons(const LineInfo& rInfo, const basegfx::B2DPolygon& rLinePolygon);
void ImplWrite( const GDIMetaFile& rMtf );
diff --git a/vcl/source/filter/wmf/enhwmf.cxx b/vcl/source/filter/wmf/enhwmf.cxx
index e917947755a7..48988d5f280d 100644
--- a/vcl/source/filter/wmf/enhwmf.cxx
+++ b/vcl/source/filter/wmf/enhwmf.cxx
@@ -1408,7 +1408,7 @@ bool EnhWMFReader::ReadEnhWMF()
sal_Int32 nLeft, nTop, nRight, nBottom, ptlReferenceX, ptlReferenceY, nGfxMode, nXScale, nYScale;
sal_uInt32 nCurPos, nOffString, nOptions, offDx;
sal_Int32 nLen;
- sal_Int32* pDX = NULL;
+ long* pDX = NULL;
nCurPos = pWMF->Tell() - 8;
@@ -1432,10 +1432,14 @@ bool EnhWMFReader::ReadEnhWMF()
pWMF->Seek( nCurPos + offDx );
if ( ( nLen * sizeof(sal_uInt32) ) <= ( nEndPos - pWMF->Tell() ) )
{
- pDX = new sal_Int32[ nLen ];
+ pDX = new long[ nLen ];
sal_Int32 i;
+ sal_Int32 val;
for ( i = 0; i < nLen; i++ )
- pWMF->ReadInt32( pDX[ i ] );
+ {
+ pWMF->ReadInt32( val );
+ pDX[ i ] = val;
+ }
}
}
pWMF->Seek( nCurPos + nOffString );
@@ -1452,8 +1456,8 @@ bool EnhWMFReader::ReadEnhWMF()
if ( aText.getLength() != nLen )
{
sal_uInt16 i, j;
- sal_Int32* pOldDx = pDX;
- pDX = new sal_Int32[ aText.getLength() ];
+ long* pOldDx = pDX;
+ pDX = new long[ aText.getLength() ];
for ( i = 0, j = 0; i < aText.getLength(); i++ )
{
sal_Unicode cUniChar = aText[i];
diff --git a/vcl/source/filter/wmf/winmtf.cxx b/vcl/source/filter/wmf/winmtf.cxx
index 1d8130918971..4f08ad1055f5 100644
--- a/vcl/source/filter/wmf/winmtf.cxx
+++ b/vcl/source/filter/wmf/winmtf.cxx
@@ -1327,7 +1327,7 @@ void WinMtfOutput::DrawPolyBezier( Polygon& rPolygon, bool bTo, bool bRecordPath
}
}
-void WinMtfOutput::DrawText( Point& rPosition, OUString& rText, sal_Int32* pDXArry, bool bRecordPath, sal_Int32 nGfxMode )
+void WinMtfOutput::DrawText( Point& rPosition, OUString& rText, long* pDXArry, bool bRecordPath, sal_Int32 nGfxMode )
{
UpdateClipRegion();
rPosition = ImplMap( rPosition );
@@ -1479,14 +1479,14 @@ void WinMtfOutput::DrawText( Point& rPosition, OUString& rText, sal_Int32* pDXAr
{
/* because text without dx array is badly scaled, we
will create such an array if necessary */
- sal_Int32* pDX = pDXArry;
+ long* pDX = pDXArry;
if (!pDXArry)
{
// #i117968# VirtualDevice is not thread safe, but filter is used in multithreading
SolarMutexGuard aGuard;
VirtualDevice aVDev;
- pDX = new sal_Int32[ rText.getLength() ];
+ pDX = new long[ rText.getLength() ];
aVDev.SetMapMode( MAP_100TH_MM );
aVDev.SetFont( maLatestFont );
aVDev.GetTextArray( rText, pDX, 0, rText.getLength());
diff --git a/vcl/source/filter/wmf/winmtf.hxx b/vcl/source/filter/wmf/winmtf.hxx
index 3332888c567c..b3c675bf1939 100644
--- a/vcl/source/filter/wmf/winmtf.hxx
+++ b/vcl/source/filter/wmf/winmtf.hxx
@@ -735,13 +735,12 @@ public:
bool bDrawTo = false,
bool bRecordPath = false
);
- void DrawText(
- Point& rPosition,
- OUString& rString,
- sal_Int32* pDXArry = NULL,
- bool bRecordPath = false,
- sal_Int32 nGraphicsMode = GM_COMPATIBLE
- );
+ void DrawText( Point& rPosition,
+ OUString& rString,
+ long* pDXArry = NULL,
+ bool bRecordPath = false,
+ sal_Int32 nGraphicsMode = GM_COMPATIBLE);
+
void ResolveBitmapActions( BSaveStructList_impl& rSaveList );
void IntersectClipRect( const Rectangle& rRect );
diff --git a/vcl/source/filter/wmf/winwmf.cxx b/vcl/source/filter/wmf/winwmf.cxx
index a6cac25eb7f5..8540ff90943d 100644
--- a/vcl/source/filter/wmf/winwmf.cxx
+++ b/vcl/source/filter/wmf/winwmf.cxx
@@ -459,7 +459,7 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc )
sal_Int32 nRecordPos, nRecordSize = 0, nOriginalTextLen, nNewTextLen;
Point aPosition;
Rectangle aRect;
- boost::scoped_array<sal_Int32> pDXAry;
+ boost::scoped_array<long> pDXAry;
pWMF->SeekRel(-6);
nRecordPos = pWMF->Tell();
@@ -502,7 +502,7 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc )
{
sal_Int16 nDx = 0, nDxTmp = 0;
sal_uInt16 i; //needed just outside the for
- pDXAry.reset(new sal_Int32[ nNewTextLen ]);
+ pDXAry.reset(new long[ nNewTextLen ]);
for (i = 0; i < nNewTextLen; i++ )
{
if ( pWMF->Tell() >= nMaxStreamPos )
@@ -978,7 +978,7 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc )
Point aPt;
OUString aString;
sal_uInt32 nStringLen, nDXCount;
- boost::scoped_array<sal_Int32> pDXAry;
+ boost::scoped_array<long> pDXAry;
SvMemoryStream aMemoryStream( nEscLen );
aMemoryStream.Write( pData.get(), nEscLen );
aMemoryStream.Seek( STREAM_SEEK_TO_BEGIN );
@@ -998,9 +998,13 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc )
if ( ( static_cast< sal_uInt64 >( nDXCount ) * sizeof( sal_Int32 ) ) >= ( nEscLen - aMemoryStream.Tell() ) )
nDXCount = 0;
if ( nDXCount )
- pDXAry.reset(new sal_Int32[ nDXCount ]);
+ pDXAry.reset(new long[ nDXCount ]);
for (sal_uInt32 i = 0; i < nDXCount; i++ )
- aMemoryStream.ReadInt32( pDXAry[ i ] );
+ {
+ sal_Int32 val;
+ aMemoryStream.ReadInt32( val);
+ pDXAry[ i ] = val;
+ }
aMemoryStream.ReadUInt32( nSkipActions );
pOut->DrawText( aPt, aString, pDXAry.get() );
}
diff --git a/vcl/source/filter/wmf/wmfwr.cxx b/vcl/source/filter/wmf/wmfwr.cxx
index 9362d2d1fb60..c964487adc13 100644
--- a/vcl/source/filter/wmf/wmfwr.cxx
+++ b/vcl/source/filter/wmf/wmfwr.cxx
@@ -438,7 +438,7 @@ void WMFWriter::WMFRecord_Escape( sal_uInt32 nEsc, sal_uInt32 nLen, const sal_In
/* if return value is true, then a complete unicode string and also a polygon replacement has been written,
so there is no more action necessary
*/
-bool WMFWriter::WMFRecord_Escape_Unicode( const Point& rPoint, const OUString& rUniStr, const sal_Int32* pDXAry )
+bool WMFWriter::WMFRecord_Escape_Unicode( const Point& rPoint, const OUString& rUniStr, const long* pDXAry )
{
bool bEscapeUsed = false;
@@ -536,8 +536,9 @@ bool WMFWriter::WMFRecord_Escape_Unicode( const Point& rPoint, const OUString& r
return bEscapeUsed;
}
-void WMFWriter::WMFRecord_ExtTextOut( const Point & rPoint,
- const OUString & rString, const sal_Int32 * pDXAry )
+void WMFWriter::WMFRecord_ExtTextOut( const Point& rPoint,
+ const OUString& rString,
+ const long* pDXAry )
{
sal_Int32 nOriginalTextLen = rString.getLength();
@@ -548,11 +549,11 @@ void WMFWriter::WMFRecord_ExtTextOut( const Point & rPoint,
}
rtl_TextEncoding eChrSet = aSrcFont.GetCharSet();
OString aByteString(OUStringToOString(rString, eChrSet));
- TrueExtTextOut(rPoint,rString,aByteString,pDXAry);
+ TrueExtTextOut(rPoint, rString, aByteString, pDXAry);
}
-void WMFWriter::TrueExtTextOut( const Point & rPoint, const OUString & rString,
- const OString& rByteString, const sal_Int32 * pDXAry )
+void WMFWriter::TrueExtTextOut( const Point& rPoint, const OUString& rString,
+ const OString& rByteString, const long* pDXAry )
{
WriteRecordHeader( 0, W_META_EXTTEXTOUT );
WritePointYX( rPoint );
@@ -1198,7 +1199,7 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF )
pVirDev->SetFont( aSrcFont );
nLen = aTemp.getLength();
- boost::scoped_array<sal_Int32> pDXAry(nLen ? new sal_Int32[ nLen ] : NULL);
+ boost::scoped_array<long> pDXAry(nLen ? new long[ nLen ] : NULL);
nNormSize = pVirDev->GetTextArray( aTemp, pDXAry.get() );
for ( i = 0; i < ( nLen - 1 ); i++ )
pDXAry[ i ] = pDXAry[ i ] * (sal_Int32)pA->GetWidth() / nNormSize;
diff --git a/vcl/source/filter/wmf/wmfwr.hxx b/vcl/source/filter/wmf/wmfwr.hxx
index 5114ecc6a755..13bf796e901b 100644
--- a/vcl/source/filter/wmf/wmfwr.hxx
+++ b/vcl/source/filter/wmf/wmfwr.hxx
@@ -135,20 +135,20 @@ private:
// nSizeWords was unknown upon calling WriteRecordHeader(..)
// if needed it inserts a BYTE 0 to make number of bytes even
- void WMFRecord_Arc(const Rectangle & rRect, const Point & rStartPt, const Point & rEndPt);
- void WMFRecord_Chord(const Rectangle & rRect, const Point & rStartPt, const Point & rEndPt);
+ void WMFRecord_Arc(const Rectangle& rRect, const Point& rStartPt, const Point& rEndPt);
+ void WMFRecord_Chord(const Rectangle& rRect, const Point& rStartPt, const Point& rEndPt);
void WMFRecord_CreateBrushIndirect(const Color& rColor);
- void WMFRecord_CreateFontIndirect(const Font & rFont);
+ void WMFRecord_CreateFontIndirect(const Font& rFont);
void WMFRecord_CreatePenIndirect(const Color& rColor, const LineInfo& rLineInfo );
void WMFRecord_DeleteObject(sal_uInt16 nObjectHandle);
- void WMFRecord_Ellipse(const Rectangle & rRect);
+ void WMFRecord_Ellipse(const Rectangle& rRect);
void WMFRecord_Escape( sal_uInt32 nEsc, sal_uInt32 nLen, const sal_Int8* pData );
- bool WMFRecord_Escape_Unicode( const Point& rPoint, const OUString& rStr, const sal_Int32 * pDXAry );
- void WMFRecord_ExtTextOut(const Point & rPoint, const OUString & rString, const sal_Int32 * pDXAry);
+ bool WMFRecord_Escape_Unicode( const Point& rPoint, const OUString& rStr, const long* pDXAry );
+ void WMFRecord_ExtTextOut(const Point& rPoint, const OUString& rString, const long* pDXAry);
- void TrueExtTextOut(const Point & rPoint, const OUString & rString,
- const OString& rByteString, const sal_Int32 * pDXAry);
- void TrueTextOut(const Point & rPoint, const OString& rString);
+ void TrueExtTextOut(const Point& rPoint, const OUString& rString,
+ const OString& rByteString, const long* pDXAry);
+ void TrueTextOut(const Point& rPoint, const OString& rString);
void WMFRecord_LineTo(const Point & rPoint);
void WMFRecord_MoveTo(const Point & rPoint);
void WMFRecord_Pie(const Rectangle & rRect, const Point & rStartPt, const Point & rEndPt);
diff --git a/vcl/source/gdi/cvtsvm.cxx b/vcl/source/gdi/cvtsvm.cxx
index 598d800fed18..d49044c3ca54 100644
--- a/vcl/source/gdi/cvtsvm.cxx
+++ b/vcl/source/gdi/cvtsvm.cxx
@@ -864,12 +864,12 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
OUString aStr(OStringToOUString(aByteStr, eActualCharSet));
- boost::scoped_array<sal_Int32> pDXAry;
+ boost::scoped_array<long> pDXAry;
if (nAryLen > 0)
{
sal_Int32 nStrLen( aStr.getLength() );
- pDXAry.reset(new sal_Int32[ std::max( nAryLen, nStrLen ) ]);
+ pDXAry.reset(new long[ std::max( nAryLen, nStrLen ) ]);
for (sal_Int32 j = 0; j < nAryLen; ++j)
rIStm.ReadInt32( nTmp ), pDXAry[ j ] = nTmp;
@@ -879,7 +879,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
{
if( nAryLen+1 == nStrLen )
{
- boost::scoped_array<sal_Int32> pTmpAry(new sal_Int32[nStrLen]);
+ boost::scoped_array<long> pTmpAry(new long[nStrLen]);
aFontVDev.GetTextArray( aStr, pTmpAry.get(), nIndex, nLen );
@@ -1721,14 +1721,15 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
case( META_TEXTARRAY_ACTION ):
{
- MetaTextArrayAction* pAct = (MetaTextArrayAction*)pAction;
- OString aText(OUStringToOString(pAct->GetText(),
- rActualCharSet));
- OUString aUniText = pAct->GetText().copy( pAct->GetIndex(), std::min<sal_Int32>(pAct->GetText().getLength() - pAct->GetIndex(), pAct->GetLen()) );
- sal_Int32 nAryLen;
- sal_Int32 nLen = pAct->GetLen();
- const sal_Int32 nTextLen = aText.getLength();
- sal_Int32* pDXArray = pAct->GetDXArray();
+ MetaTextArrayAction* pAct = (MetaTextArrayAction*)pAction;
+ OString aText(OUStringToOString(pAct->GetText(), rActualCharSet));
+ OUString aUniText = pAct->GetText().copy(
+ pAct->GetIndex(),
+ std::min<sal_Int32>(pAct->GetText().getLength() - pAct->GetIndex(), pAct->GetLen()) );
+ sal_Int32 nAryLen;
+ sal_Int32 nLen = pAct->GetLen();
+ const sal_Int32 nTextLen = aText.getLength();
+ long* pDXArray = pAct->GetDXArray();
if ( ImplWriteUnicodeComment( rOStm, aUniText ) )
nCount++;
diff --git a/vcl/source/gdi/metaact.cxx b/vcl/source/gdi/metaact.cxx
index 0158a6d003ba..25f14fec2618 100644
--- a/vcl/source/gdi/metaact.cxx
+++ b/vcl/source/gdi/metaact.cxx
@@ -1176,8 +1176,8 @@ MetaTextArrayAction::MetaTextArrayAction( const MetaTextArrayAction& rAction ) :
{
const sal_Int32 nAryLen = mnLen;
- mpDXAry = new sal_Int32[ nAryLen ];
- memcpy( mpDXAry, rAction.mpDXAry, nAryLen * sizeof( sal_Int32 ) );
+ mpDXAry = new long[ nAryLen ];
+ memcpy( mpDXAry, rAction.mpDXAry, nAryLen * sizeof( long ) );
}
else
mpDXAry = NULL;
@@ -1185,7 +1185,7 @@ MetaTextArrayAction::MetaTextArrayAction( const MetaTextArrayAction& rAction ) :
MetaTextArrayAction::MetaTextArrayAction( const Point& rStartPt,
const OUString& rStr,
- const sal_Int32* pDXAry,
+ const long* pDXAry,
sal_Int32 nIndex,
sal_Int32 nLen ) :
MetaAction ( META_TEXTARRAY_ACTION ),
@@ -1198,7 +1198,7 @@ MetaTextArrayAction::MetaTextArrayAction( const Point& rStartPt,
if( nAryLen )
{
- mpDXAry = new sal_Int32[ nAryLen ];
+ mpDXAry = new long[ nAryLen ];
memcpy( mpDXAry, pDXAry, nAryLen * sizeof( sal_Int32 ) );
}
else
@@ -1293,13 +1293,16 @@ void MetaTextArrayAction::Read( SvStream& rIStm, ImplMetaReadData* pData )
// #i9762#, #106172# Ensure that DX array is at least mnLen entries long
if ( mnLen >= nAryLen )
{
- mpDXAry = new (std::nothrow)sal_Int32[ mnLen ];
+ mpDXAry = new (std::nothrow)long[ mnLen ];
if ( mpDXAry )
{
sal_Int32 i;
+ sal_Int32 val;
for( i = 0; i < nAryLen; i++ )
- rIStm.ReadInt32( mpDXAry[ i ] );
-
+ {
+ rIStm.ReadInt32( val);
+ mpDXAry[ i ] = val;
+ }
// #106172# setup remainder
for( ; i < mnLen; i++ )
mpDXAry[ i ] = 0;
diff --git a/vcl/source/gdi/pdfwriter.cxx b/vcl/source/gdi/pdfwriter.cxx
index 1249d6c0653c..8cc1c314baa2 100644
--- a/vcl/source/gdi/pdfwriter.cxx
+++ b/vcl/source/gdi/pdfwriter.cxx
@@ -81,7 +81,7 @@ void PDFWriter::DrawTextLine(
void PDFWriter::DrawTextArray(
const Point& rStartPt,
const OUString& rStr,
- const sal_Int32* pDXAry,
+ const long* pDXAry,
sal_Int32 nIndex,
sal_Int32 nLen )
{
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index 9628eec29ba4..718da4921cd5 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -7416,7 +7416,7 @@ void PDFWriterImpl::drawLayout( SalLayout& rLayout, const OUString& rText, bool
aUnicodes.reserve( nMaxGlyphs );
sal_Int32 pUnicodesPerGlyph[nMaxGlyphs];
int pCharPosAry[nMaxGlyphs];
- sal_Int32 nAdvanceWidths[nMaxGlyphs];
+ long nAdvanceWidths[nMaxGlyphs];
const PhysicalFontFace* pFallbackFonts[nMaxGlyphs] = { NULL };
bool bVertical = m_aCurrentPDFState.m_aFont.IsVertical();
int nGlyphs;
@@ -7654,7 +7654,8 @@ void PDFWriterImpl::drawLayout( SalLayout& rLayout, const OUString& rText, bool
if( m_aCurrentPDFState.m_aFont.IsWordLineMode() )
{
Point aPos, aStartPt;
- sal_Int32 nWidth = 0, nAdvance=0;
+ sal_Int32 nWidth = 0;
+ long nAdvance = 0;
for( int nStart = 0;;)
{
sal_GlyphId aGlyphId;
@@ -7757,7 +7758,7 @@ void PDFWriterImpl::drawLayout( SalLayout& rLayout, const OUString& rText, bool
{
Point aPos;
sal_GlyphId aGlyphId;
- sal_Int32 nAdvance;
+ long nAdvance;
if( !rLayout.GetNextGlyphs( 1, &aGlyphId, aPos, nStart, &nAdvance ) )
break;
@@ -7838,7 +7839,7 @@ void PDFWriterImpl::drawText( const Point& rPos, const OUString& rText, sal_Int3
}
}
-void PDFWriterImpl::drawTextArray( const Point& rPos, const OUString& rText, const sal_Int32* pDXArray, sal_Int32 nIndex, sal_Int32 nLen, bool bTextLines )
+void PDFWriterImpl::drawTextArray( const Point& rPos, const OUString& rText, const long* pDXArray, sal_Int32 nIndex, sal_Int32 nLen, bool bTextLines )
{
MARK( "drawText with array" );
diff --git a/vcl/source/gdi/pdfwriter_impl.hxx b/vcl/source/gdi/pdfwriter_impl.hxx
index 59f83da27fdf..0020e9b1e202 100644
--- a/vcl/source/gdi/pdfwriter_impl.hxx
+++ b/vcl/source/gdi/pdfwriter_impl.hxx
@@ -1202,7 +1202,7 @@ public:
/* actual drawing functions */
void drawText( const Point& rPos, const OUString& rText, sal_Int32 nIndex, sal_Int32 nLen, bool bTextLines = true );
- void drawTextArray( const Point& rPos, const OUString& rText, const sal_Int32* pDXArray, sal_Int32 nIndex, sal_Int32 nLen, bool bTextLines = true );
+ void drawTextArray( const Point& rPos, const OUString& rText, const long* pDXArray, sal_Int32 nIndex, sal_Int32 nLen, bool bTextLines = true );
void drawStretchText( const Point& rPos, sal_uLong nWidth, const OUString& rText,
sal_Int32 nIndex, sal_Int32 nLen,
bool bTextLines = true );
diff --git a/vcl/source/gdi/sallayout.cxx b/vcl/source/gdi/sallayout.cxx
index 100352082631..6724862a1e32 100644
--- a/vcl/source/gdi/sallayout.cxx
+++ b/vcl/source/gdi/sallayout.cxx
@@ -1018,7 +1018,7 @@ void GenericSalLayout::ApplyDXArray( ImplLayoutArgs& rArgs )
}
// calculate adjusted cluster widths
- sal_Int32* pNewGlyphWidths = (sal_Int32*)alloca( m_GlyphItems.size() * sizeof(sal_Int32) );
+ long* pNewGlyphWidths = (long*)alloca( m_GlyphItems.size() * sizeof(long) );
for( i = 0; i < m_GlyphItems.size(); ++i )
pNewGlyphWidths[ i ] = 0;
@@ -1248,7 +1248,7 @@ void GenericSalLayout::KashidaJustify( long nKashidaIndex, int nKashidaWidth )
}
}
-void GenericSalLayout::GetCaretPositions( int nMaxIndex, sal_Int32* pCaretXArray ) const
+void GenericSalLayout::GetCaretPositions( int nMaxIndex, long* pCaretXArray ) const
{
// initialize result array
long nXPos = -1;
@@ -1298,8 +1298,8 @@ sal_Int32 GenericSalLayout::GetTextBreak( long nMaxWidth, long nCharExtra, int n
}
int GenericSalLayout::GetNextGlyphs( int nLen, sal_GlyphId* pGlyphs, Point& rPos,
- int& nStart, sal_Int32* pGlyphAdvAry, int* pCharPosAry,
- const PhysicalFontFace** /*pFallbackFonts*/ ) const
+ int& nStart, long* pGlyphAdvAry, int* pCharPosAry,
+ const PhysicalFontFace** /*pFallbackFonts*/ ) const
{
GlyphVector::const_iterator pG = m_GlyphItems.begin();
GlyphVector::const_iterator pGEnd = m_GlyphItems.end();
@@ -1607,7 +1607,7 @@ void MultiSalLayout::AdjustLayout( ImplLayoutArgs& rArgs )
int nStartOld[ MAX_FALLBACK ];
int nStartNew[ MAX_FALLBACK ];
int nCharPos[ MAX_FALLBACK ];
- sal_Int32 nGlyphAdv[ MAX_FALLBACK ];
+ long nGlyphAdv[ MAX_FALLBACK ];
int nValid[ MAX_FALLBACK ] = {0};
sal_GlyphId nDummy;
@@ -1990,14 +1990,14 @@ DeviceCoordinate MultiSalLayout::FillDXArray( DeviceCoordinate* pCharWidths ) co
return nMaxWidth;
}
-void MultiSalLayout::GetCaretPositions( int nMaxIndex, sal_Int32* pCaretXArray ) const
+void MultiSalLayout::GetCaretPositions( int nMaxIndex, long* pCaretXArray ) const
{
SalLayout& rLayout = *mpLayouts[ 0 ];
rLayout.GetCaretPositions( nMaxIndex, pCaretXArray );
if( mnLevel > 1 )
{
- sal_Int32* pTempPos = (sal_Int32*)alloca( nMaxIndex * sizeof(sal_Int32) );
+ long* pTempPos = (long*)alloca( nMaxIndex * sizeof(long) );
for( int n = 1; n < mnLevel; ++n )
{
mpLayouts[ n ]->GetCaretPositions( nMaxIndex, pTempPos );
@@ -2015,8 +2015,8 @@ void MultiSalLayout::GetCaretPositions( int nMaxIndex, sal_Int32* pCaretXArray )
}
int MultiSalLayout::GetNextGlyphs( int nLen, sal_GlyphId* pGlyphIdxAry, Point& rPos,
- int& nStart, sal_Int32* pGlyphAdvAry, int* pCharPosAry,
- const PhysicalFontFace** pFallbackFonts ) const
+ int& nStart, long* pGlyphAdvAry, int* pCharPosAry,
+ const PhysicalFontFace** pFallbackFonts ) const
{
// for multi-level fallback only single glyphs should be used
if( mnLevel > 1 && nLen > 1 )
diff --git a/vcl/source/gdi/textlayout.cxx b/vcl/source/gdi/textlayout.cxx
index e891e1713292..b1a3a77debd4 100644
--- a/vcl/source/gdi/textlayout.cxx
+++ b/vcl/source/gdi/textlayout.cxx
@@ -55,7 +55,7 @@ namespace vcl
m_rTargetDevice.DrawText( _rStartPoint, _rText, _nStartIndex, _nLength, _pVector, _pDisplayText );
}
- bool DefaultTextLayout::GetCaretPositions( const OUString& _rText, sal_Int32* _pCaretXArray,
+ bool DefaultTextLayout::GetCaretPositions( const OUString& _rText, long* _pCaretXArray,
sal_Int32 _nStartIndex, sal_Int32 _nLength ) const
{
return m_rTargetDevice.GetCaretPositions( _rText, _pCaretXArray, _nStartIndex, _nLength );
@@ -80,13 +80,13 @@ namespace vcl
// ITextLayout
virtual long GetTextWidth( const OUString& rStr, sal_Int32 nIndex, sal_Int32 nLen ) 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 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;
public:
// equivalents to the respective OutputDevice methods, which take the reference device into account
- long GetTextArray( const OUString& _rText, sal_Int32* _pDXAry, sal_Int32 _nStartIndex, sal_Int32 _nLength ) const;
+ long GetTextArray( const OUString& _rText, long* _pDXAry, sal_Int32 _nStartIndex, sal_Int32 _nLength ) const;
Rectangle DrawText( const Rectangle& _rRect, const OUString& _rText, sal_uInt16 _nStyle, MetricVector* _pVector, OUString* _pDisplayText );
protected:
@@ -173,7 +173,7 @@ namespace vcl
}
}
- long ReferenceDeviceTextLayout::GetTextArray( const OUString& _rText, sal_Int32* _pDXAry, sal_Int32 _nStartIndex, sal_Int32 _nLength ) const
+ long ReferenceDeviceTextLayout::GetTextArray( const OUString& _rText, long* _pDXAry, sal_Int32 _nStartIndex, sal_Int32 _nLength ) const
{
if ( !lcl_normalizeLength( _rText, _nStartIndex, _nLength ) )
return 0;
@@ -223,7 +223,7 @@ namespace vcl
return;
}
- boost::scoped_array<sal_Int32> pCharWidths(new sal_Int32[ _nLength ]);
+ boost::scoped_array<long> pCharWidths(new long[ _nLength ]);
long nTextWidth = GetTextArray( _rText, pCharWidths.get(), _nStartIndex, _nLength );
m_rTargetDevice.DrawTextArray( _rStartPoint, _rText, pCharWidths.get(), _nStartIndex, _nLength );
pCharWidths.reset();
@@ -231,8 +231,8 @@ namespace vcl
m_aCompleteTextRect.Union( Rectangle( _rStartPoint, Size( nTextWidth, m_rTargetDevice.GetTextHeight() ) ) );
}
- bool ReferenceDeviceTextLayout::GetCaretPositions( const OUString& _rText, sal_Int32* _pCaretXArray,
- sal_Int32 _nStartIndex, sal_Int32 _nLength ) const
+ bool ReferenceDeviceTextLayout::GetCaretPositions( const OUString& _rText, long* _pCaretXArray,
+ sal_Int32 _nStartIndex, sal_Int32 _nLength ) const
{
if ( !lcl_normalizeLength( _rText, _nStartIndex, _nLength ) )
return false;
diff --git a/vcl/source/glyphs/graphite_layout.cxx b/vcl/source/glyphs/graphite_layout.cxx
index d9801102787f..f04b5ec93c46 100644
--- a/vcl/source/glyphs/graphite_layout.cxx
+++ b/vcl/source/glyphs/graphite_layout.cxx
@@ -1090,7 +1090,7 @@ void GraphiteLayout::kashidaJustify(std::vector<int>& rDeltaWidths, sal_GlyphId
}
-void GraphiteLayout::GetCaretPositions( int nArraySize, sal_Int32* pCaretXArray ) const
+void GraphiteLayout::GetCaretPositions( int nArraySize, long* pCaretXArray ) const
{
// For each character except the last discover the caret positions
// immediately before and after that character.
diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx
index f9669e0f402e..1cffe587912b 100644
--- a/vcl/source/outdev/text.cxx
+++ b/vcl/source/outdev/text.cxx
@@ -949,7 +949,7 @@ float OutputDevice::approximate_char_width() const
}
void OutputDevice::DrawTextArray( const Point& rStartPt, const OUString& rStr,
- const sal_Int32* pDXAry,
+ const long* pDXAry,
sal_Int32 nIndex, sal_Int32 nLen, int flags )
{
if(nLen == 0x0FFFF)
@@ -984,7 +984,7 @@ void OutputDevice::DrawTextArray( const Point& rStartPt, const OUString& rStr,
mpAlphaVDev->DrawTextArray( rStartPt, rStr, pDXAry, nIndex, nLen, flags );
}
-long OutputDevice::GetTextArray( const OUString& rStr, sal_Int32* pDXAry,
+long OutputDevice::GetTextArray( const OUString& rStr, long* pDXAry,
sal_Int32 nIndex, sal_Int32 nLen ) const
{
if(nLen == 0x0FFFF)
@@ -1084,10 +1084,10 @@ long OutputDevice::GetTextArray( const OUString& rStr, sal_Int32* pDXAry,
#endif /* VCL_FLOAT_DEVICE_PIXEL */
}
-bool OutputDevice::GetCaretPositions( const OUString& rStr, sal_Int32* pCaretXArray,
- sal_Int32 nIndex, sal_Int32 nLen,
- sal_Int32* pDXAry, long nLayoutWidth,
- bool bCellBreaking ) const
+bool OutputDevice::GetCaretPositions( const OUString& rStr, long* pCaretXArray,
+ sal_Int32 nIndex, sal_Int32 nLen,
+ long* pDXAry, long nLayoutWidth,
+ bool bCellBreaking ) const
{
if( nIndex >= rStr.getLength() )
@@ -1097,7 +1097,7 @@ bool OutputDevice::GetCaretPositions( const OUString& rStr, sal_Int32* pCaretXAr
// layout complex text
SalLayout* pSalLayout = ImplLayout( rStr, nIndex, nLen,
- Point(0,0), nLayoutWidth, pDXAry );
+ Point(0,0), nLayoutWidth, pDXAry );
if( !pSalLayout )
return false;
@@ -1296,7 +1296,7 @@ ImplLayoutArgs OutputDevice::ImplPrepareLayoutArgs( OUString& rStr,
SalLayout* OutputDevice::ImplLayout(const OUString& rOrigStr,
sal_Int32 nMinIndex, sal_Int32 nLen,
const Point& rLogicalPos, long nLogicalWidth,
- const sal_Int32* pDXArray, int flags) const
+ const long* pDXArray, int flags) const
{
// we need a graphics
if( !mpGraphics )
@@ -1648,7 +1648,7 @@ void OutputDevice::ImplDrawText( OutputDevice& rTargetDevice, const Rectangle& r
long nMnemonicY;
long nMnemonicWidth;
- sal_Int32* pCaretXArray = (sal_Int32*) alloca( 2 * sizeof(sal_Int32) * nLineLen );
+ long* pCaretXArray = (long*) alloca( 2 * sizeof(long) * nLineLen );
/*sal_Bool bRet =*/ _rLayout.GetCaretPositions( aStr, pCaretXArray,
nIndex, nLineLen );
long lc_x1 = pCaretXArray[2*(nMnemonicPos - nIndex)];
@@ -1717,7 +1717,7 @@ void OutputDevice::ImplDrawText( OutputDevice& rTargetDevice, const Rectangle& r
long nMnemonicWidth = 0;
if ( nMnemonicPos != -1 )
{
- sal_Int32* pCaretXArray = (sal_Int32*) alloca( 2 * sizeof(sal_Int32) * aStr.getLength() );
+ long* pCaretXArray = (long*) alloca( 2 * sizeof(long) * aStr.getLength() );
/*sal_Bool bRet =*/ _rLayout.GetCaretPositions( aStr, pCaretXArray, 0, aStr.getLength() );
long lc_x1 = pCaretXArray[2*(nMnemonicPos)];
long lc_x2 = pCaretXArray[2*(nMnemonicPos)+1];
@@ -2164,7 +2164,7 @@ void OutputDevice::DrawCtrlText( const Point& rPos, const OUString& rStr,
nMnemonicPos = nLen-1;
}
- sal_Int32* pCaretXArray = (sal_Int32*)alloca( 2 * sizeof(sal_Int32) * nLen );
+ long* pCaretXArray = (long*)alloca( 2 * sizeof(long) * nLen );
/*sal_Bool bRet =*/ GetCaretPositions( aStr, pCaretXArray, nIndex, nLen );
long lc_x1 = pCaretXArray[ 2*(nMnemonicPos - nIndex) ];
long lc_x2 = pCaretXArray[ 2*(nMnemonicPos - nIndex)+1 ];
@@ -2324,7 +2324,7 @@ OUString OutputDevice::GetNonMnemonicString( const OUString& rStr, sal_Int32& rM
* @return SystemTextLayoutData
**/
SystemTextLayoutData OutputDevice::GetSysTextLayoutData(const Point& rStartPt, const OUString& rStr, sal_Int32 nIndex, sal_Int32 nLen,
- const sal_Int32* pDXAry) const
+ const long* pDXAry) const
{
if(nLen == 0x0FFFF)
{
@@ -2383,7 +2383,7 @@ SystemTextLayoutData OutputDevice::GetSysTextLayoutData(const Point& rStartPt, c
bool OutputDevice::GetTextBoundRect( Rectangle& rRect,
const OUString& rStr, sal_Int32 nBase,
sal_Int32 nIndex, sal_Int32 nLen,
- sal_uLong nLayoutWidth, const sal_Int32* pDXAry ) const
+ sal_uLong nLayoutWidth, const long* pDXAry ) const
{
if(nLen == 0x0FFFF)
{
@@ -2566,7 +2566,7 @@ bool OutputDevice::GetTextBoundRect( Rectangle& rRect,
bool OutputDevice::GetTextOutlines( ::basegfx::B2DPolyPolygonVector& rVector,
const OUString& rStr, sal_Int32 nBase,
sal_Int32 nIndex, sal_Int32 nLen,
- bool bOptimize, sal_uLong nLayoutWidth, const sal_Int32* pDXArray ) const
+ bool bOptimize, sal_uLong nLayoutWidth, const long* pDXArray ) const
{
if(nLen == 0x0FFFF)
{
@@ -2800,7 +2800,7 @@ bool OutputDevice::GetTextOutlines( ::basegfx::B2DPolyPolygonVector& rVector,
bool OutputDevice::GetTextOutlines( PolyPolyVector& rResultVector,
const OUString& rStr, sal_Int32 nBase,
sal_Int32 nIndex, sal_Int32 nLen, bool bOptimize,
- sal_uLong nTWidth, const sal_Int32* pDXArray ) const
+ sal_uLong nTWidth, const long* pDXArray ) const
{
if(nLen == 0x0FFFF)
{
@@ -2827,7 +2827,7 @@ bool OutputDevice::GetTextOutlines( PolyPolyVector& rResultVector,
bool OutputDevice::GetTextOutline( PolyPolygon& rPolyPoly, const OUString& rStr,
sal_Int32 nBase, sal_Int32 nIndex, sal_Int32 nLen,
- bool bOptimize, sal_uLong nTWidth, const sal_Int32* pDXArray ) const
+ bool bOptimize, sal_uLong nTWidth, const long* pDXArray ) const
{
if(nLen == 0x0FFFF)
{
diff --git a/vcl/source/outdev/textline.cxx b/vcl/source/outdev/textline.cxx
index 862e1ac3b8dd..5acd59f4c3e9 100644
--- a/vcl/source/outdev/textline.cxx
+++ b/vcl/source/outdev/textline.cxx
@@ -745,7 +745,8 @@ void OutputDevice::ImplDrawTextLines( SalLayout& rSalLayout, FontStrikeout eStri
// calculate distance of each word from the base point
Point aPos;
- sal_Int32 nDist = 0, nWidth = 0, nAdvance=0;
+ sal_Int32 nDist = 0, nWidth = 0;
+ long nAdvance = 0;
for( int nStart = 0;;)
{
// iterate through the layouted glyphs
diff --git a/vcl/win/source/gdi/winlayout.cxx b/vcl/win/source/gdi/winlayout.cxx
index d6adc874a514..6d5f46811e43 100644
--- a/vcl/win/source/gdi/winlayout.cxx
+++ b/vcl/win/source/gdi/winlayout.cxx
@@ -794,7 +794,7 @@ void SimpleWinLayout::ApplyDXArray( const ImplLayoutArgs& rArgs )
if( j >= 0 )
{
nOldWidth += mpGlyphAdvances[ j ];
- int nDiff = nOldWidth - pDXArray[ i ];
+ long nDiff = nOldWidth - pDXArray[ i ];
// disabled because of #104768#
// works great for static text, but problems when typing
diff --git a/vcl/workben/outdevgrind.cxx b/vcl/workben/outdevgrind.cxx
index 648c52b0b3ee..eb992818fa00 100644
--- a/vcl/workben/outdevgrind.cxx
+++ b/vcl/workben/outdevgrind.cxx
@@ -137,11 +137,6 @@ void setupMethodStubs( functor_vector_type& res )
aMtf.AddAction( new MetaFillColorAction(Color(COL_RED),true) );
aMtf.AddAction( new MetaRectAction(aRect) );
- /* void DrawTextArray( const Point& rStartPt, const OUString& rStr,
- const sal_Int32* pDXAry = NULL,
- sal_uInt16 nIndex = 0,
- sal_Int32 nLen = STRING_LEN );
- */
add(res,
"DrawTextArray",
boost::bind(