summaryrefslogtreecommitdiff
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
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
-rw-r--r--canvas/source/cairo/cairo_textlayout.cxx4
-rw-r--r--canvas/source/cairo/cairo_textlayout.hxx2
-rw-r--r--canvas/source/opengl/ogl_canvashelper.cxx2
-rw-r--r--canvas/source/vcl/textlayout.cxx8
-rw-r--r--canvas/source/vcl/textlayout.hxx2
-rw-r--r--cppcanvas/source/inc/implrenderer.hxx2
-rw-r--r--cppcanvas/source/mtfrenderer/implrenderer.cxx12
-rw-r--r--cppcanvas/source/mtfrenderer/textaction.cxx8
-rw-r--r--cppcanvas/source/mtfrenderer/textaction.hxx2
-rw-r--r--drawinglayer/source/primitive2d/metafileprimitive2d.cxx2
-rw-r--r--drawinglayer/source/primitive2d/textlayoutdevice.cxx4
-rw-r--r--drawinglayer/source/processor2d/vclprocessor2d.cxx7
-rw-r--r--editeng/source/accessibility/AccessibleStringWrap.cxx2
-rw-r--r--editeng/source/editeng/editdoc.cxx6
-rw-r--r--editeng/source/editeng/editdoc.hxx6
-rw-r--r--editeng/source/editeng/editeng.cxx16
-rw-r--r--editeng/source/editeng/impedit.hxx3
-rw-r--r--editeng/source/editeng/impedit2.cxx2
-rw-r--r--editeng/source/editeng/impedit3.cxx46
-rw-r--r--editeng/source/items/svxfont.cxx4
-rw-r--r--editeng/source/outliner/outleeng.cxx18
-rw-r--r--editeng/source/outliner/outleeng.hxx10
-rw-r--r--editeng/source/outliner/outliner.cxx23
-rw-r--r--filter/source/flash/swfwriter.hxx4
-rw-r--r--filter/source/flash/swfwriter1.cxx12
-rw-r--r--filter/source/graphicfilter/eos2met/eos2met.cxx2
-rw-r--r--filter/source/graphicfilter/epict/epict.cxx6
-rw-r--r--filter/source/graphicfilter/eps/eps.cxx8
-rw-r--r--filter/source/svg/svgwriter.cxx10
-rw-r--r--filter/source/svg/svgwriter.hxx4
-rw-r--r--include/editeng/editeng.hxx38
-rw-r--r--include/editeng/outliner.hxx42
-rw-r--r--include/editeng/svxfont.hxx6
-rw-r--r--include/svtools/calendar.hxx2
-rw-r--r--include/vcl/devicecoordinate.hxx2
-rw-r--r--include/vcl/metaact.hxx6
-rw-r--r--include/vcl/outdev.hxx20
-rw-r--r--include/vcl/pdfwriter.hxx2
-rw-r--r--sc/source/ui/view/output2.cxx2
-rw-r--r--starmath/source/accessibility.cxx4
-rw-r--r--svx/source/customshapes/EnhancedCustomShapeFontWork.cxx4
-rw-r--r--sw/source/core/inc/scriptinfo.hxx14
-rw-r--r--sw/source/core/text/porlay.cxx20
-rw-r--r--sw/source/core/txtnode/fntcache.cxx30
-rw-r--r--toolkit/source/awt/vclxfont.cxx7
-rw-r--r--toolkit/source/awt/vclxgraphics.cxx7
-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
72 files changed, 396 insertions, 378 deletions
diff --git a/canvas/source/cairo/cairo_textlayout.cxx b/canvas/source/cairo/cairo_textlayout.cxx
index 2eb7b0ce5cd1..db9a21cb1602 100644
--- a/canvas/source/cairo/cairo_textlayout.cxx
+++ b/canvas/source/cairo/cairo_textlayout.cxx
@@ -353,7 +353,7 @@ namespace cairocanvas
setupLayoutMode( rOutDev, mnTextDirection );
// TODO(P2): cache that
- ::boost::scoped_array< sal_Int32 > aOffsets(new sal_Int32[maLogicalAdvancements.getLength()]);
+ ::boost::scoped_array< long > aOffsets(new long[maLogicalAdvancements.getLength()]);
if( maLogicalAdvancements.getLength() )
{
@@ -615,7 +615,7 @@ namespace cairocanvas
};
}
- void TextLayout::setupTextOffsets( sal_Int32* outputOffsets,
+ void TextLayout::setupTextOffsets( long* outputOffsets,
const uno::Sequence< double >& inputOffsets,
const rendering::ViewState& viewState,
const rendering::RenderState& renderState ) const
diff --git a/canvas/source/cairo/cairo_textlayout.hxx b/canvas/source/cairo/cairo_textlayout.hxx
index 77a293e64eb8..4509b5213761 100644
--- a/canvas/source/cairo/cairo_textlayout.hxx
+++ b/canvas/source/cairo/cairo_textlayout.hxx
@@ -87,7 +87,7 @@ namespace cairocanvas
const ::com::sun::star::rendering::ViewState& viewState,
const ::com::sun::star::rendering::RenderState& renderState ) const;
- void setupTextOffsets( sal_Int32* outputOffsets,
+ void setupTextOffsets( long* outputOffsets,
const ::com::sun::star::uno::Sequence< double >& inputOffsets,
const ::com::sun::star::rendering::ViewState& viewState,
const ::com::sun::star::rendering::RenderState& renderState ) const;
diff --git a/canvas/source/opengl/ogl_canvashelper.cxx b/canvas/source/opengl/ogl_canvashelper.cxx
index e9983f09fcb8..d6db4db6111a 100644
--- a/canvas/source/opengl/ogl_canvashelper.cxx
+++ b/canvas/source/opengl/ogl_canvashelper.cxx
@@ -779,7 +779,7 @@ namespace oglcanvas
{
// create the DXArray
const sal_Int32 nLen( aLogicalAdvancements.getLength() );
- ::boost::scoped_array<sal_Int32> pDXArray( new sal_Int32[nLen] );
+ ::boost::scoped_array<long> pDXArray( new long[nLen] );
for( sal_Int32 i=0; i<nLen; ++i )
pDXArray[i] = basegfx::fround( aLogicalAdvancements[i] );
diff --git a/canvas/source/vcl/textlayout.cxx b/canvas/source/vcl/textlayout.cxx
index 6cbb3d58df37..3f8127662a8a 100644
--- a/canvas/source/vcl/textlayout.cxx
+++ b/canvas/source/vcl/textlayout.cxx
@@ -121,7 +121,7 @@ namespace vclcanvas
uno::Sequence<double>(4),
rendering::CompositeOperation::SOURCE);
- ::boost::scoped_array< sal_Int32 > aOffsets(new sal_Int32[maLogicalAdvancements.getLength()]);
+ ::boost::scoped_array< long > aOffsets(new long[maLogicalAdvancements.getLength()]);
setupTextOffsets(aOffsets.get(), maLogicalAdvancements, aViewState, aRenderState);
uno::Sequence< uno::Reference< rendering::XPolyPolygon2D> > aOutlineSequence;
@@ -174,7 +174,7 @@ namespace vclcanvas
uno::Sequence<double>(4),
rendering::CompositeOperation::SOURCE);
- ::boost::scoped_array< sal_Int32 > aOffsets(new sal_Int32[maLogicalAdvancements.getLength()]);
+ ::boost::scoped_array< long > aOffsets(new long[maLogicalAdvancements.getLength()]);
setupTextOffsets(aOffsets.get(), maLogicalAdvancements, aViewState, aRenderState);
MetricVector aMetricVector;
@@ -386,7 +386,7 @@ namespace vclcanvas
if( maLogicalAdvancements.getLength() )
{
// TODO(P2): cache that
- ::boost::scoped_array< sal_Int32 > aOffsets(new sal_Int32[maLogicalAdvancements.getLength()]);
+ ::boost::scoped_array< long > aOffsets(new long[maLogicalAdvancements.getLength()]);
setupTextOffsets( aOffsets.get(), maLogicalAdvancements, viewState, renderState );
// TODO(F3): ensure correct length and termination for DX
@@ -441,7 +441,7 @@ namespace vclcanvas
};
}
- void TextLayout::setupTextOffsets( sal_Int32* outputOffsets,
+ void TextLayout::setupTextOffsets( long* outputOffsets,
const uno::Sequence< double >& inputOffsets,
const rendering::ViewState& viewState,
const rendering::RenderState& renderState ) const
diff --git a/canvas/source/vcl/textlayout.hxx b/canvas/source/vcl/textlayout.hxx
index 38e36f8622ec..8dc7f89e6f5b 100644
--- a/canvas/source/vcl/textlayout.hxx
+++ b/canvas/source/vcl/textlayout.hxx
@@ -88,7 +88,7 @@ namespace vclcanvas
const ::com::sun::star::rendering::RenderState& renderState ) const;
private:
- void setupTextOffsets( sal_Int32* outputOffsets,
+ void setupTextOffsets( long* outputOffsets,
const ::com::sun::star::uno::Sequence< double >& inputOffsets,
const ::com::sun::star::rendering::ViewState& viewState,
const ::com::sun::star::rendering::RenderState& renderState ) const;
diff --git a/cppcanvas/source/inc/implrenderer.hxx b/cppcanvas/source/inc/implrenderer.hxx
index 76a86c882dce..7ff185efe19b 100644
--- a/cppcanvas/source/inc/implrenderer.hxx
+++ b/cppcanvas/source/inc/implrenderer.hxx
@@ -269,7 +269,7 @@ static float GetSwapFloat( SvStream& rSt )
const OUString& rString,
int nIndex,
int nLength,
- const sal_Int32* pCharWidths,
+ const long* pCharWidths,
const ActionFactoryParameters& rParms,
bool bSubsettable );
diff --git a/cppcanvas/source/mtfrenderer/implrenderer.cxx b/cppcanvas/source/mtfrenderer/implrenderer.cxx
index 4f261b08a632..0208486ce0df 100644
--- a/cppcanvas/source/mtfrenderer/implrenderer.cxx
+++ b/cppcanvas/source/mtfrenderer/implrenderer.cxx
@@ -863,7 +863,7 @@ namespace cppcanvas
const OUString& rString,
int nIndex,
int nLength,
- const sal_Int32* pCharWidths,
+ const long* pCharWidths,
const ActionFactoryParameters& rParms,
bool bSubsettableActions )
{
@@ -996,7 +996,7 @@ namespace cppcanvas
{
long nInterval = ( nWidth - nStrikeoutWidth * nLen ) / nLen;
nStrikeoutWidth += nInterval;
- sal_Int32* pStrikeoutCharWidths = new sal_Int32[nLen];
+ long* pStrikeoutCharWidths = new long[nLen];
for ( int i = 0;i<nLen; i++)
{
@@ -2602,7 +2602,7 @@ namespace cppcanvas
// generating a DX array, and uniformly
// distributing the excess/insufficient width
// to every logical character.
- ::boost::scoped_array< sal_Int32 > pDXArray( new sal_Int32[nLen] );
+ ::boost::scoped_array< long > pDXArray( new long[nLen] );
rVDev.GetTextArray( pAct->GetText(), pDXArray.get(),
pAct->GetIndex(), pAct->GetLen() );
@@ -2610,8 +2610,8 @@ namespace cppcanvas
const sal_Int32 nWidthDifference( pAct->GetWidth() - pDXArray[ nLen-1 ] );
// Last entry of pDXArray contains total width of the text
- sal_Int32* p=pDXArray.get();
- for (sal_Int32 i=1; i<=nLen; ++i)
+ long* p = pDXArray.get();
+ for (sal_Int32 i = 1; i <= nLen; ++i)
{
// calc ratio for every array entry, to
// distribute rounding errors 'evenly'
@@ -2619,7 +2619,7 @@ namespace cppcanvas
// entry represents the 'end' position of
// the corresponding character, thus, we
// let i run from 1 to nLen.
- *p++ += (sal_Int32)i*nWidthDifference/nLen;
+ *p++ += (long)i*nWidthDifference/nLen;
}
createTextAction(
diff --git a/cppcanvas/source/mtfrenderer/textaction.cxx b/cppcanvas/source/mtfrenderer/textaction.cxx
index 6849a3e68800..717335790dad 100644
--- a/cppcanvas/source/mtfrenderer/textaction.cxx
+++ b/cppcanvas/source/mtfrenderer/textaction.cxx
@@ -168,7 +168,7 @@ namespace cppcanvas
rTextLineInfo );
}
- uno::Sequence< double > setupDXArray( const sal_Int32* pCharWidths,
+ uno::Sequence< double > setupDXArray( const long* pCharWidths,
sal_Int32 nLen,
const OutDevState& rState )
{
@@ -197,7 +197,7 @@ namespace cppcanvas
{
// no external DX array given, create one from given
// string
- ::boost::scoped_array< sal_Int32 > pCharWidths( new sal_Int32[nLen] );
+ ::boost::scoped_array< long > pCharWidths( new long[nLen] );
rVDev.GetTextArray( rText, pCharWidths.get(),
nStartPos, nLen );
@@ -1939,7 +1939,7 @@ namespace cppcanvas
const OUString& rText,
sal_Int32 nStartPos,
sal_Int32 nLen,
- const sal_Int32* pDXArray,
+ const long* pDXArray,
VirtualDevice& rVDev,
const CanvasSharedPtr& rCanvas,
const OutDevState& rState,
@@ -2089,7 +2089,7 @@ namespace cppcanvas
const OUString& rText,
sal_Int32 nStartPos,
sal_Int32 nLen,
- const sal_Int32* pDXArray,
+ const long* pDXArray,
VirtualDevice& rVDev,
const CanvasSharedPtr& rCanvas,
const OutDevState& rState,
diff --git a/cppcanvas/source/mtfrenderer/textaction.hxx b/cppcanvas/source/mtfrenderer/textaction.hxx
index 7afe47aeba01..622360240cc1 100644
--- a/cppcanvas/source/mtfrenderer/textaction.hxx
+++ b/cppcanvas/source/mtfrenderer/textaction.hxx
@@ -73,7 +73,7 @@ namespace cppcanvas
const OUString& rText,
sal_Int32 nStartPos,
sal_Int32 nLen,
- const sal_Int32* pDXArray,
+ const long* pDXArray,
VirtualDevice& rVDev,
const CanvasSharedPtr& rCanvas,
const OutDevState& rState,
diff --git a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx
index dc922b5a4759..943e16a37acd 100644
--- a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx
@@ -1997,7 +1997,7 @@ namespace
{
// preapare DXArray (if used)
std::vector< double > aDXArray;
- sal_Int32* pDXArray = pA->GetDXArray();
+ long* pDXArray = pA->GetDXArray();
if(pDXArray)
{
diff --git a/drawinglayer/source/primitive2d/textlayoutdevice.cxx b/drawinglayer/source/primitive2d/textlayoutdevice.cxx
index 3abe03d78b0a..cbd21e37d898 100644
--- a/drawinglayer/source/primitive2d/textlayoutdevice.cxx
+++ b/drawinglayer/source/primitive2d/textlayoutdevice.cxx
@@ -241,7 +241,7 @@ namespace drawinglayer
if(nDXArrayCount)
{
OSL_ENSURE(nDXArrayCount == nTextLength, "DXArray size does not correspond to text portion size (!)");
- std::vector< sal_Int32 > aIntegerDXArray(nDXArrayCount);
+ std::vector< long > aIntegerDXArray(nDXArrayCount);
for(sal_uInt32 a(0); a < nDXArrayCount; a++)
{
@@ -347,7 +347,7 @@ namespace drawinglayer
if(nTextLength)
{
aRetval.reserve(nTextLength);
- ::std::vector<sal_Int32> aArray(nTextLength);
+ ::std::vector<long> aArray(nTextLength);
mrDevice.GetTextArray(rText, &aArray[0], nIndex, nLength);
aRetval.assign(aArray.begin(), aArray.end());
}
diff --git a/drawinglayer/source/processor2d/vclprocessor2d.cxx b/drawinglayer/source/processor2d/vclprocessor2d.cxx
index 9b904718d9d2..137901eb3f9e 100644
--- a/drawinglayer/source/processor2d/vclprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclprocessor2d.cxx
@@ -242,7 +242,7 @@ namespace drawinglayer
}
// create transformed integer DXArray in view coordinate system
- ::std::vector< sal_Int32 > aTransformedDXArray;
+ ::std::vector< long > aTransformedDXArray;
if(rTextCandidate.getDXArray().size())
{
@@ -277,7 +277,7 @@ namespace drawinglayer
sal_Int32 nPos = rTextCandidate.getTextPosition();
sal_Int32 nLen = rTextCandidate.getTextLength();
- sal_Int32* pDXArray = aTransformedDXArray.size() ? &(aTransformedDXArray[0]) : NULL ;
+ long* pDXArray = aTransformedDXArray.size() ? &(aTransformedDXArray[0]) : NULL ;
if ( rTextCandidate.isFilled() )
{
@@ -287,8 +287,7 @@ namespace drawinglayer
long nWidthToFill = static_cast<long>(rTextCandidate.getWidthToFill( ) * aFontScaling.getX() / aOldFontScaling.getX());
- long nWidth = mpOutputDevice->GetTextArray(
- rTextCandidate.getText(), pDXArray, 0, 1 );
+ long nWidth = mpOutputDevice->GetTextArray( rTextCandidate.getText(), pDXArray, 0, 1 );
long nChars = 2;
if ( nWidth )
nChars = nWidthToFill / nWidth;
diff --git a/editeng/source/accessibility/AccessibleStringWrap.cxx b/editeng/source/accessibility/AccessibleStringWrap.cxx
index e98f77e86de5..ecddbd32a75f 100644
--- a/editeng/source/accessibility/AccessibleStringWrap.cxx
+++ b/editeng/source/accessibility/AccessibleStringWrap.cxx
@@ -56,7 +56,7 @@ void AccessibleStringWrap::GetCharacterBounds( sal_Int32 nIndex, Rectangle& rRec
}
else
{
- sal_Int32 aXArray[2];
+ long aXArray[2];
mrDev.GetCaretPositions( maText, aXArray, static_cast< sal_uInt16 >(nIndex), 1 );
rRect.Left() = 0;
rRect.Top() = 0;
diff --git a/editeng/source/editeng/editdoc.cxx b/editeng/source/editeng/editdoc.cxx
index 162491fa2707..97073c072d2c 100644
--- a/editeng/source/editeng/editdoc.cxx
+++ b/editeng/source/editeng/editdoc.cxx
@@ -548,13 +548,13 @@ ExtraPortionInfo::~ExtraPortionInfo()
delete[] pOrgDXArray;
}
-void ExtraPortionInfo::SaveOrgDXArray( const sal_Int32* pDXArray, sal_Int32 nLen )
+void ExtraPortionInfo::SaveOrgDXArray( const long* pDXArray, sal_Int32 nLen )
{
delete[] pOrgDXArray;
if (pDXArray)
{
- pOrgDXArray = new sal_Int32[nLen];
- memcpy( pOrgDXArray, pDXArray, nLen*sizeof(sal_Int32) );
+ pOrgDXArray = new long[nLen];
+ memcpy( pOrgDXArray, pDXArray, nLen * sizeof(long) );
}
else
pOrgDXArray = NULL;
diff --git a/editeng/source/editeng/editdoc.hxx b/editeng/source/editeng/editdoc.hxx
index c9ba4496c3ce..3db2ac3e88c9 100644
--- a/editeng/source/editeng/editdoc.hxx
+++ b/editeng/source/editeng/editdoc.hxx
@@ -351,14 +351,14 @@ struct ExtraPortionInfo
bool bFirstCharIsRightPunktuation;
bool bCompressed;
- sal_Int32* pOrgDXArray;
+ long* pOrgDXArray;
::std::vector< sal_Int32 > lineBreaksList;
ExtraPortionInfo();
~ExtraPortionInfo();
- void SaveOrgDXArray( const sal_Int32* pDXArray, sal_Int32 nLen );
+ void SaveOrgDXArray( const long* pDXArray, sal_Int32 nLen );
};
@@ -465,7 +465,7 @@ class ParaPortion;
class EditLine
{
public:
- typedef std::vector<sal_Int32> CharPosArrayType;
+ typedef std::vector<long> CharPosArrayType;
private:
CharPosArrayType aPositions;
diff --git a/editeng/source/editeng/editeng.cxx b/editeng/source/editeng/editeng.cxx
index 7b4d94a8074f..86ebf835d1e5 100644
--- a/editeng/source/editeng/editeng.cxx
+++ b/editeng/source/editeng/editeng.cxx
@@ -2424,19 +2424,19 @@ ParagraphInfos EditEngine::GetParagraphInfos( sal_Int32 nPara )
// ====================== Virtual Methods ========================
void EditEngine::DrawingText( const Point&, const OUString&, sal_Int32, sal_Int32,
- const sal_Int32*, const SvxFont&, sal_Int32, sal_Int32, sal_uInt8,
- const EEngineData::WrongSpellVector*, const SvxFieldData*, bool, bool, bool,
- const ::com::sun::star::lang::Locale*, const Color&, const Color&)
+ const long*, const SvxFont&, sal_Int32, sal_Int32, sal_uInt8,
+ const EEngineData::WrongSpellVector*, const SvxFieldData*, bool, bool, bool,
+ const ::com::sun::star::lang::Locale*, const Color&, const Color&)
{
}
void EditEngine::DrawingTab( const Point& /*rStartPos*/, long /*nWidth*/,
- const OUString& /*rChar*/, const SvxFont& /*rFont*/,
- sal_Int32 /*nPara*/, sal_Int32 /*nIndex*/,
- sal_uInt8 /*nRightToLeft*/, bool /*bEndOfLine*/,
- bool /*bEndOfParagraph*/, const Color& /*rOverlineColor*/,
- const Color& /*rTextLineColor*/)
+ const OUString& /*rChar*/, const SvxFont& /*rFont*/,
+ sal_Int32 /*nPara*/, sal_Int32 /*nIndex*/,
+ sal_uInt8 /*nRightToLeft*/, bool /*bEndOfLine*/,
+ bool /*bEndOfParagraph*/, const Color& /*rOverlineColor*/,
+ const Color& /*rTextLineColor*/)
{
}
diff --git a/editeng/source/editeng/impedit.hxx b/editeng/source/editeng/impedit.hxx
index b1e64b1a5f86..e406a67692f4 100644
--- a/editeng/source/editeng/impedit.hxx
+++ b/editeng/source/editeng/impedit.hxx
@@ -602,7 +602,8 @@ private:
bool IsScriptChange( const EditPaM& rPaM ) const;
bool HasScriptType( sal_Int32 nPara, sal_uInt16 nType ) const;
- bool ImplCalcAsianCompression( ContentNode* pNode, TextPortion* pTextPortion, sal_Int32 nStartPos, sal_Int32* pDXArray, sal_uInt16 n100thPercentFromMax, bool bManipulateDXArray );
+ bool ImplCalcAsianCompression( ContentNode* pNode, TextPortion* pTextPortion, sal_Int32 nStartPos,
+ long* pDXArray, sal_uInt16 n100thPercentFromMax, bool bManipulateDXArray );
void ImplExpandCompressedPortions( EditLine* pLine, ParaPortion* pParaPortion, long nRemainingWidth );
void ImplInitLayoutMode( OutputDevice* pOutDev, sal_Int32 nPara, sal_Int32 nIndex );
diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx
index a1bac55cf2b0..339b102e9299 100644
--- a/editeng/source/editeng/impedit2.cxx
+++ b/editeng/source/editeng/impedit2.cxx
@@ -3978,7 +3978,7 @@ long ImpEditEngine::GetXPos(
if ( nType == CHAR_PUNCTUATIONRIGHT && !pLine->GetCharPosArray().empty() )
{
sal_Int32 n = nIndex - nTextPortionStart;
- const sal_Int32* pDXArray = &pLine->GetCharPosArray()[0]+( nTextPortionStart-pLine->GetStart() );
+ const long* pDXArray = &pLine->GetCharPosArray()[0]+( nTextPortionStart-pLine->GetStart() );
sal_Int32 nCharWidth = ( ( (n+1) < pPortion->GetLen() ) ? pDXArray[n] : pPortion->GetSize().Width() )
- ( n ? pDXArray[n-1] : 0 );
if ( (n+1) < pPortion->GetLen() )
diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx
index adbc9feb2628..f6961f775224 100644
--- a/editeng/source/editeng/impedit3.cxx
+++ b/editeng/source/editeng/impedit3.cxx
@@ -151,18 +151,17 @@ sal_uInt8 GetCharTypeForCompression( sal_Unicode cChar )
}
}
-static void lcl_DrawRedLines(
- OutputDevice* pOutDev,
- long nFontHeight,
- const Point& rPnt,
- size_t nIndex,
- size_t nMaxEnd,
- const sal_Int32* pDXArray,
- WrongList* pWrongs,
- short nOrientation,
- const Point& rOrigin,
- bool bVertical,
- bool bIsRightToLeft )
+static void lcl_DrawRedLines( OutputDevice* pOutDev,
+ long nFontHeight,
+ const Point& rPnt,
+ size_t nIndex,
+ size_t nMaxEnd,
+ const long* pDXArray,
+ WrongList* pWrongs,
+ short nOrientation,
+ const Point& rOrigin,
+ bool bVertical,
+ bool bIsRightToLeft )
{
// But only if font is not too small ...
long nHght = pOutDev->LogicToPixel( Size( 0, nFontHeight ) ).Height();
@@ -733,7 +732,7 @@ bool ImpEditEngine::CreateLines( sal_Int32 nPara, sal_uInt32 nStartPosY )
SvxFont aTmpFont( pNode->GetCharAttribs().GetDefFont() );
bool bCalcCharPositions = true;
- boost::scoped_array<sal_Int32> pBuf(new sal_Int32[ pNode->Len() ]);
+ boost::scoped_array<long> pBuf(new long[ pNode->Len() ]);
bool bSameLineAgain = false; // For TextRanger, if the height changes.
TabInfo aCurrentTab;
@@ -1079,7 +1078,7 @@ bool ImpEditEngine::CreateLines( sal_Int32 nPara, sal_uInt32 nStartPosY )
if ( pPortion->GetLen() && GetAsianCompressionMode() )
{
EditLine::CharPosArrayType& rArray = pLine->GetCharPosArray();
- sal_Int32* pDXArray = &rArray[0] + nTmpPos - pLine->GetStart();
+ long* pDXArray = &rArray[0] + nTmpPos - pLine->GetStart();
bCompressedChars |= ImplCalcAsianCompression(
pNode, pPortion, nTmpPos, pDXArray, 10000, false);
}
@@ -1255,9 +1254,11 @@ bool ImpEditEngine::CreateLines( sal_Int32 nPara, sal_uInt32 nStartPosY )
if ( bCompressedChars && pPortion && ( pPortion->GetLen() > 1 ) && pPortion->GetExtraInfos() && pPortion->GetExtraInfos()->bCompressed )
{
// I need the manipulated DXArray for determining the break position...
- sal_Int32* pDXArray = NULL;
+ long* pDXArray = NULL;
if (!pLine->GetCharPosArray().empty())
+ {
pDXArray = &pLine->GetCharPosArray()[0] + (nPortionStart - pLine->GetStart());
+ }
ImplCalcAsianCompression(
pNode, pPortion, nPortionStart, pDXArray, 10000, true);
}
@@ -3038,8 +3039,8 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, Rectangle aClipRect, Point aSt
OUString aText;
sal_Int32 nTextStart = 0;
sal_Int32 nTextLen = 0;
- const sal_Int32* pDXArray = 0;
- boost::scoped_array<sal_Int32> pTmpDXArray;
+ const long* pDXArray = 0;
+ boost::scoped_array<long> pTmpDXArray;
if ( pTextPortion->GetKind() == PORTIONKIND_TEXT )
{
@@ -3183,7 +3184,7 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, Rectangle aClipRect, Point aSt
}
}
- pTmpDXArray.reset(new sal_Int32[ aText.getLength() ]);
+ pTmpDXArray.reset(new long[ aText.getLength() ]);
pDXArray = pTmpDXArray.get();
Font _aOldFont( GetRefDevice()->GetFont() );
aTmpFont.SetPhysFont( GetRefDevice() );
@@ -3213,7 +3214,7 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, Rectangle aClipRect, Point aSt
nTextLen = aText.getLength();
// crash when accessing 0 pointer in pDXArray
- pTmpDXArray.reset(new sal_Int32[ aText.getLength() ]);
+ pTmpDXArray.reset(new long[ aText.getLength() ]);
pDXArray = pTmpDXArray.get();
Font _aOldFont( GetRefDevice()->GetFont() );
aTmpFont.SetPhysFont( GetRefDevice() );
@@ -4390,8 +4391,9 @@ Color ImpEditEngine::GetAutoColor() const
bool ImpEditEngine::ImplCalcAsianCompression(ContentNode* pNode,
- TextPortion* pTextPortion, sal_Int32 nStartPos, sal_Int32* pDXArray,
- sal_uInt16 n100thPercentFromMax, bool bManipulateDXArray)
+ TextPortion* pTextPortion, sal_Int32 nStartPos,
+ long* pDXArray, sal_uInt16 n100thPercentFromMax,
+ bool bManipulateDXArray)
{
DBG_ASSERT( GetAsianCompressionMode(), "ImplCalcAsianCompression - Why?" );
DBG_ASSERT( pTextPortion->GetLen(), "ImplCalcAsianCompression - Empty Portion?" );
@@ -4557,7 +4559,7 @@ void ImpEditEngine::ImplExpandCompressedPortions( EditLine* pLine, ParaPortion*
sal_Int32 nTxtPortion = pParaPortion->GetTextPortions().GetPos( pTP );
sal_Int32 nTxtPortionStart = pParaPortion->GetTextPortions().GetStartPos( nTxtPortion );
DBG_ASSERT( nTxtPortionStart >= pLine->GetStart(), "Portion doesn't belong to the line!!!" );
- sal_Int32* pDXArray = NULL;
+ long* pDXArray = NULL;
if (!pLine->GetCharPosArray().empty())
{
pDXArray = &pLine->GetCharPosArray()[0]+( nTxtPortionStart-pLine->GetStart() );
diff --git a/editeng/source/items/svxfont.cxx b/editeng/source/items/svxfont.cxx
index 895eef60291c..d4c2de04ec56 100644
--- a/editeng/source/items/svxfont.cxx
+++ b/editeng/source/items/svxfont.cxx
@@ -404,7 +404,7 @@ Size SvxFont::GetPhysTxtSize( const OutputDevice *pOut, const OUString &rTxt )
}
Size SvxFont::QuickGetTextSize( const OutputDevice *pOut, const OUString &rTxt,
- const sal_Int32 nIdx, const sal_Int32 nLen, sal_Int32* pDXArray ) const
+ const sal_Int32 nIdx, const sal_Int32 nLen, long* pDXArray ) const
{
if ( !IsCaseMap() && !IsKern() )
return Size( pOut->GetTextArray( rTxt, pDXArray, nIdx, nLen ),
@@ -454,7 +454,7 @@ Size SvxFont::GetTxtSize( const OutputDevice *pOut, const OUString &rTxt,
void SvxFont::QuickDrawText( OutputDevice *pOut,
const Point &rPos, const OUString &rTxt,
- const sal_Int32 nIdx, const sal_Int32 nLen, const sal_Int32* pDXArray ) const
+ const sal_Int32 nIdx, const sal_Int32 nLen, const long* pDXArray ) const
{
// Font has to be selected in OutputDevice...
diff --git a/editeng/source/outliner/outleeng.cxx b/editeng/source/outliner/outleeng.cxx
index bac8437de7c6..db90fda6c41e 100644
--- a/editeng/source/outliner/outleeng.cxx
+++ b/editeng/source/outliner/outleeng.cxx
@@ -147,15 +147,15 @@ OUString OutlinerEditEng::GetUndoComment( sal_uInt16 nUndoId ) const
}
void OutlinerEditEng::DrawingText( const Point& rStartPos, const OUString& rText, sal_Int32 nTextStart, sal_Int32 nTextLen,
- const sal_Int32* pDXArray, const SvxFont& rFont, sal_Int32 nPara, sal_Int32 nIndex, sal_uInt8 nRightToLeft,
- const EEngineData::WrongSpellVector* pWrongSpellVector,
- const SvxFieldData* pFieldData,
- bool bEndOfLine,
- bool bEndOfParagraph,
- bool bEndOfBullet,
- const ::com::sun::star::lang::Locale* pLocale,
- const Color& rOverlineColor,
- const Color& rTextLineColor)
+ const long* pDXArray, const SvxFont& rFont, sal_Int32 nPara, sal_Int32 nIndex, sal_uInt8 nRightToLeft,
+ const EEngineData::WrongSpellVector* pWrongSpellVector,
+ const SvxFieldData* pFieldData,
+ bool bEndOfLine,
+ bool bEndOfParagraph,
+ bool bEndOfBullet,
+ const ::com::sun::star::lang::Locale* pLocale,
+ const Color& rOverlineColor,
+ const Color& rTextLineColor)
{
pOwner->DrawingText(rStartPos,rText,nTextStart,nTextLen,pDXArray,rFont,nPara,nIndex,nRightToLeft,
pWrongSpellVector, pFieldData, bEndOfLine, bEndOfParagraph, bEndOfBullet, pLocale, rOverlineColor, rTextLineColor);
diff --git a/editeng/source/outliner/outleeng.hxx b/editeng/source/outliner/outleeng.hxx
index dae743f8f7d5..a802eedf1fb8 100644
--- a/editeng/source/outliner/outleeng.hxx
+++ b/editeng/source/outliner/outleeng.hxx
@@ -44,11 +44,11 @@ public:
virtual void ParagraphDeleted( sal_Int32 nDeletedParagraph ) SAL_OVERRIDE;
virtual void ParagraphConnected( sal_Int32 nLeftParagraph, sal_Int32 nRightParagraph ) SAL_OVERRIDE;
- virtual void DrawingText(
- const Point& rStartPos, const OUString& rText, sal_Int32 nTextStart, sal_Int32 nTextLen, const sal_Int32* pDXArray, const SvxFont& rFont,
- sal_Int32 nPara, sal_Int32 nIndex, sal_uInt8 nRightToLeft,
- const EEngineData::WrongSpellVector* pWrongSpellVector,
- const SvxFieldData* pFieldData,
+ virtual void DrawingText( const Point& rStartPos, const OUString& rText, sal_Int32 nTextStart,
+ sal_Int32 nTextLen, const long* pDXArray, const SvxFont& rFont,
+ sal_Int32 nPara, sal_Int32 nIndex, sal_uInt8 nRightToLeft,
+ const EEngineData::WrongSpellVector* pWrongSpellVector,
+ const SvxFieldData* pFieldData,
bool bEndOfLine,
bool bEndOfParagraph,
bool bEndOfBullet,
diff --git a/editeng/source/outliner/outliner.cxx b/editeng/source/outliner/outliner.cxx
index aaa843da69c0..ace9482001b5 100644
--- a/editeng/source/outliner/outliner.cxx
+++ b/editeng/source/outliner/outliner.cxx
@@ -1005,7 +1005,7 @@ void Outliner::PaintBullet( sal_Int32 nPara, const Point& rStartPos,
if(bStrippingPortions)
{
const Font aSvxFont(pOutDev->GetFont());
- boost::scoped_array<sal_Int32> pBuf(new sal_Int32[ pPara->GetText().getLength() ]);
+ boost::scoped_array<long> pBuf(new long[ pPara->GetText().getLength() ]);
pOutDev->GetTextArray( pPara->GetText(), pBuf.get() );
if(bSymbol)
@@ -1738,16 +1738,17 @@ void Outliner::StripPortions()
bStrippingPortions = false;
}
-void Outliner::DrawingText( const Point& rStartPos, const OUString& rText, sal_Int32 nTextStart, sal_Int32 nTextLen, const sal_Int32* pDXArray,const SvxFont& rFont,
- sal_Int32 nPara, sal_Int32 nIndex, sal_uInt8 nRightToLeft,
- const EEngineData::WrongSpellVector* pWrongSpellVector,
- const SvxFieldData* pFieldData,
- bool bEndOfLine,
- bool bEndOfParagraph,
- bool bEndOfBullet,
- const ::com::sun::star::lang::Locale* pLocale,
- const Color& rOverlineColor,
- const Color& rTextLineColor)
+void Outliner::DrawingText( const Point& rStartPos, const OUString& rText, sal_Int32 nTextStart,
+ sal_Int32 nTextLen, const long* pDXArray,const SvxFont& rFont,
+ sal_Int32 nPara, sal_Int32 nIndex, sal_uInt8 nRightToLeft,
+ const EEngineData::WrongSpellVector* pWrongSpellVector,
+ const SvxFieldData* pFieldData,
+ bool bEndOfLine,
+ bool bEndOfParagraph,
+ bool bEndOfBullet,
+ const ::com::sun::star::lang::Locale* pLocale,
+ const Color& rOverlineColor,
+ const Color& rTextLineColor)
{
if(aDrawPortionHdl.IsSet())
diff --git a/filter/source/flash/swfwriter.hxx b/filter/source/flash/swfwriter.hxx
index 4c31000dd4e8..7b3161fcaac8 100644
--- a/filter/source/flash/swfwriter.hxx
+++ b/filter/source/flash/swfwriter.hxx
@@ -345,8 +345,8 @@ private:
void Impl_writePolygon( const Polygon& rPoly, bool bFilled, const Color& rFillColor, const Color& rLineColor );
void Impl_writePolyPolygon( const PolyPolygon& rPolyPoly, bool bFilled, sal_uInt8 nTransparence = 0);
void Impl_writePolyPolygon( const PolyPolygon& rPolyPoly, bool bFilled, const Color& rFillColor, const Color& rLineColor );
- void Impl_writeText( const Point& rPos, const OUString& rText, const sal_Int32* pDXArray, long nWidth );
- void Impl_writeText( const Point& rPos, const OUString& rText, const sal_Int32* pDXArray, long nWidth, Color aTextColor );
+ void Impl_writeText( const Point& rPos, const OUString& rText, const long* pDXArray, long nWidth );
+ void Impl_writeText( const Point& rPos, const OUString& rText, const long* pDXArray, long nWidth, Color aTextColor );
void Impl_writeGradientEx( const PolyPolygon& rPolyPoly, const Gradient& rGradient );
void Impl_writeLine( const Point& rPt1, const Point& rPt2, const Color* pLineColor = NULL );
void Impl_writeRect( const Rectangle& rRect, long nRadX, long nRadY );
diff --git a/filter/source/flash/swfwriter1.cxx b/filter/source/flash/swfwriter1.cxx
index 9ea53e5bf819..dedcb983d14d 100644
--- a/filter/source/flash/swfwriter1.cxx
+++ b/filter/source/flash/swfwriter1.cxx
@@ -403,7 +403,7 @@ FlashFont& Writer::Impl_getFont( const Font& rFont )
-void Writer::Impl_writeText( const Point& rPos, const OUString& rText, const sal_Int32* pDXArray, long nWidth )
+void Writer::Impl_writeText( const Point& rPos, const OUString& rText, const long* pDXArray, long nWidth )
{
const FontMetric aMetric( mpVDev->GetFontMetric() );
@@ -491,7 +491,7 @@ void Writer::Impl_writeText( const Point& rPos, const OUString& rText, const sal
}
}
-void Writer::Impl_writeText( const Point& rPos, const OUString& rText, const sal_Int32* pDXArray, long nWidth, Color aTextColor )
+void Writer::Impl_writeText( const Point& rPos, const OUString& rText, const long* pDXArray, long nWidth, Color aTextColor )
{
sal_Int32 nLen = rText.getLength();
@@ -524,18 +524,18 @@ void Writer::Impl_writeText( const Point& rPos, const OUString& rText, const sal
else
{
Size aNormSize;
- boost::scoped_array<sal_Int32> pOwnArray;
- sal_Int32* pDX;
+ boost::scoped_array<long> pOwnArray;
+ long* pDX;
// get text sizes
if( pDXArray )
{
aNormSize = Size( mpVDev->GetTextWidth( rText ), 0 );
- pDX = (sal_Int32*) pDXArray;
+ pDX = (long*) pDXArray;
}
else
{
- pOwnArray.reset(new sal_Int32[ nLen ]);
+ pOwnArray.reset(new long[ nLen ]);
aNormSize = Size( mpVDev->GetTextArray( rText, pOwnArray.get() ), 0 );
pDX = pOwnArray.get();
}
diff --git a/filter/source/graphicfilter/eos2met/eos2met.cxx b/filter/source/graphicfilter/eos2met/eos2met.cxx
index 5927744a6a43..a217c58f4d00 100644
--- a/filter/source/graphicfilter/eos2met/eos2met.cxx
+++ b/filter/source/graphicfilter/eos2met/eos2met.cxx
@@ -1957,7 +1957,7 @@ void METWriter::WriteOrders( const GDIMetaFile* pMTF )
METSetChrAngle( nOrientation = aGDIFont.GetOrientation() );
METSetChrSet(FindChrSet(aGDIFont));
aStr = pA->GetText().copy(pA->GetIndex(),pA->GetLen());
- boost::scoped_array<sal_Int32> pDXAry(new sal_Int32[aStr.getLength()]);
+ boost::scoped_array<long> pDXAry(new long[aStr.getLength()]);
nNormSize = aVDev.GetTextArray( aStr, pDXAry.get() );
for ( i = 0; i < aStr.getLength(); i++ )
diff --git a/filter/source/graphicfilter/epict/epict.cxx b/filter/source/graphicfilter/epict/epict.cxx
index 1675cdce0744..d8f929f8ff8a 100644
--- a/filter/source/graphicfilter/epict/epict.cxx
+++ b/filter/source/graphicfilter/epict/epict.cxx
@@ -158,7 +158,7 @@ private:
void SetAttrForFrame();
void SetAttrForText();
- void WriteTextArray(Point & rPoint, const OUString& rString, const sal_Int32 * pDXAry);
+ void WriteTextArray(Point & rPoint, const OUString& rString, const long* pDXAry);
void HandleLineInfoPolyPolygons(const LineInfo& rInfo, const basegfx::B2DPolygon& rLinePolygon);
void WriteOpcodes(const GDIMetaFile & rMTF);
@@ -1306,7 +1306,7 @@ void PictWriter::SetAttrForText()
}
-void PictWriter::WriteTextArray(Point & rPoint, const OUString& rString, const sal_Int32 * pDXAry)
+void PictWriter::WriteTextArray(Point & rPoint, const OUString& rString, const long* pDXAry)
{
bool bDelta;
Point aPt;
@@ -1743,7 +1743,7 @@ void PictWriter::WriteOpcodes( const GDIMetaFile & rMTF )
Point aPt( pA->GetPoint() );
OUString aStr = pA->GetText().copy( pA->GetIndex(),pA->GetLen() );
VirtualDevice aVirDev;
- boost::scoped_array<sal_Int32> pDXAry(new sal_Int32[ aStr.getLength() ]);
+ boost::scoped_array<long> pDXAry(new long[ aStr.getLength() ]);
sal_Int32 nNormSize( aVirDev.GetTextArray( aStr,pDXAry.get() ) );
sal_uInt16 i;
diff --git a/filter/source/graphicfilter/eps/eps.cxx b/filter/source/graphicfilter/eps/eps.cxx
index d0f0802e5cf4..fc2d28573268 100644
--- a/filter/source/graphicfilter/eps/eps.cxx
+++ b/filter/source/graphicfilter/eps/eps.cxx
@@ -209,10 +209,10 @@ private:
void ImplSetClipRegion( Region& rRegion );
void ImplBmp( Bitmap*, Bitmap*, const Point &, double nWidth, double nHeight );
- void ImplText( const OUString& rUniString, const Point& rPos, const sal_Int32* pDXArry, sal_Int32 nWidth, VirtualDevice& rVDev );
+ void ImplText( const OUString& rUniString, const Point& rPos, const long* pDXArry, sal_Int32 nWidth, VirtualDevice& rVDev );
void ImplSetAttrForText( const Point & rPoint );
void ImplWriteCharacter( sal_Char );
- void ImplWriteString( const OString&, VirtualDevice& rVDev, const sal_Int32* pDXArry = NULL, bool bStretch = false );
+ void ImplWriteString( const OString&, VirtualDevice& rVDev, const long* pDXArry = NULL, bool bStretch = false );
void ImplDefineFont( const char*, const char* );
void ImplClosePathDraw( sal_uLong nMode = PS_RET );
@@ -2100,7 +2100,7 @@ void PSWriter::ImplWriteCharacter( sal_Char nChar )
-void PSWriter::ImplWriteString( const OString& rString, VirtualDevice& rVDev, const sal_Int32* pDXArry, bool bStretch )
+void PSWriter::ImplWriteString( const OString& rString, VirtualDevice& rVDev, const long* pDXArry, bool bStretch )
{
sal_Int32 nLen = rString.getLength();
if ( nLen )
@@ -2132,7 +2132,7 @@ void PSWriter::ImplWriteString( const OString& rString, VirtualDevice& rVDev, co
-void PSWriter::ImplText( const OUString& rUniString, const Point& rPos, const sal_Int32* pDXArry, sal_Int32 nWidth, VirtualDevice& rVDev )
+void PSWriter::ImplText( const OUString& rUniString, const Point& rPos, const long* pDXArry, sal_Int32 nWidth, VirtualDevice& rVDev )
{
if ( rUniString.isEmpty() )
return;
diff --git a/filter/source/svg/svgwriter.cxx b/filter/source/svg/svgwriter.cxx
index baea39f073f4..6851f81c2c92 100644
--- a/filter/source/svg/svgwriter.cxx
+++ b/filter/source/svg/svgwriter.cxx
@@ -2306,7 +2306,7 @@ void SVGActionWriter::ImplWriteMask( GDIMetaFile& rMtf,
}
void SVGActionWriter::ImplWriteText( const Point& rPos, const OUString& rText,
- const sal_Int32* pDXArray, long nWidth,
+ const long* pDXArray, long nWidth,
bool bApplyMapping )
{
const FontMetric aMetric( mpVDev->GetFontMetric() );
@@ -2396,7 +2396,7 @@ void SVGActionWriter::ImplWriteText( const Point& rPos, const OUString& rText,
}
void SVGActionWriter::ImplWriteText( const Point& rPos, const OUString& rText,
- const sal_Int32* pDXArray, long nWidth,
+ const long* pDXArray, long nWidth,
Color aTextColor, bool bApplyMapping )
{
sal_Int32 nLen = rText.getLength();
@@ -2416,18 +2416,18 @@ void SVGActionWriter::ImplWriteText( const Point& rPos, const OUString& rText,
else
aPos = rPos;
- boost::shared_array<sal_Int32> xTmpArray(new sal_Int32[nLen]);
+ boost::shared_array<long> xTmpArray(new long[nLen]);
// get text sizes
if( pDXArray )
{
aNormSize = Size( mpVDev->GetTextWidth( rText ), 0 );
- memcpy(xTmpArray.get(), pDXArray, nLen * sizeof(sal_Int32));
+ memcpy(xTmpArray.get(), pDXArray, nLen * sizeof(long));
}
else
{
aNormSize = Size( mpVDev->GetTextArray( rText, xTmpArray.get() ), 0 );
}
- sal_Int32* pDX = xTmpArray.get();
+ long* pDX = xTmpArray.get();
// if text is rotated, set transform matrix at new g element
if( rFont.GetOrientation() )
diff --git a/filter/source/svg/svgwriter.hxx b/filter/source/svg/svgwriter.hxx
index d77e2f558a65..c4450a093382 100644
--- a/filter/source/svg/svgwriter.hxx
+++ b/filter/source/svg/svgwriter.hxx
@@ -363,8 +363,8 @@ private:
Color ImplGetColorWithIntensity( const Color& rColor, sal_uInt16 nIntensity );
Color ImplGetGradientColor( const Color& rStartColor, const Color& rEndColor, double fOffset );
void ImplWriteMask( GDIMetaFile& rMtf, const Point& rDestPt, const Size& rDestSize, const Gradient& rGradient, sal_uInt32 nWriteFlags );
- void ImplWriteText( const Point& rPos, const OUString& rText, const sal_Int32* pDXArray, long nWidth, bool bApplyMapping = true );
- void ImplWriteText( const Point& rPos, const OUString& rText, const sal_Int32* pDXArray, long nWidth, Color aTextColor, bool bApplyMapping );
+ void ImplWriteText( const Point& rPos, const OUString& rText, const long* pDXArray, long nWidth, bool bApplyMapping = true );
+ void ImplWriteText( const Point& rPos, const OUString& rText, const long* pDXArray, long nWidth, Color aTextColor, bool bApplyMapping );
void ImplWriteBmp( const BitmapEx& rBmpEx, const Point& rPt, const Size& rSz, const Point& rSrcPt, const Size& rSrcSz,
bool bApplyMapping = true );
diff --git a/include/editeng/editeng.hxx b/include/editeng/editeng.hxx
index bb5efa3be97f..76468d83c34d 100644
--- a/include/editeng/editeng.hxx
+++ b/include/editeng/editeng.hxx
@@ -467,25 +467,25 @@ public:
virtual void StyleSheetChanged( SfxStyleSheet* pStyle );
virtual void ParagraphHeightChanged( sal_Int32 nPara );
- virtual void DrawingText(
- const Point& rStartPos, const OUString& rText, sal_Int32 nTextStart, sal_Int32 nTextLen, const sal_Int32* pDXArray,
- const SvxFont& rFont, sal_Int32 nPara, sal_Int32 nIndex, sal_uInt8 nRightToLeft,
- const EEngineData::WrongSpellVector* pWrongSpellVector,
- const SvxFieldData* pFieldData,
- bool bEndOfLine,
- bool bEndOfParagraph,
- bool bEndOfBullet,
- const ::com::sun::star::lang::Locale* pLocale,
- const Color& rOverlineColor,
- const Color& rTextLineColor);
-
- virtual void DrawingTab(
- const Point& rStartPos, long nWidth, const OUString& rChar,
- const SvxFont& rFont, sal_Int32 nPara, sal_Int32 nIndex, sal_uInt8 nRightToLeft,
- bool bEndOfLine,
- bool bEndOfParagraph,
- const Color& rOverlineColor,
- const Color& rTextLineColor);
+ virtual void DrawingText( const Point& rStartPos, const OUString& rText,
+ sal_Int32 nTextStart, sal_Int32 nTextLen,
+ const long* pDXArray, const SvxFont& rFont,
+ sal_Int32 nPara, sal_Int32 nIndex, sal_uInt8 nRightToLeft,
+ const EEngineData::WrongSpellVector* pWrongSpellVector,
+ const SvxFieldData* pFieldData,
+ bool bEndOfLine,
+ bool bEndOfParagraph,
+ bool bEndOfBullet,
+ const ::com::sun::star::lang::Locale* pLocale,
+ const Color& rOverlineColor,
+ const Color& rTextLineColor);
+
+ virtual void DrawingTab( const Point& rStartPos, long nWidth, const OUString& rChar,
+ const SvxFont& rFont, sal_Int32 nPara, sal_Int32 nIndex, sal_uInt8 nRightToLeft,
+ bool bEndOfLine,
+ bool bEndOfParagraph,
+ const Color& rOverlineColor,
+ const Color& rTextLineColor);
virtual OUString GetUndoComment( sal_uInt16 nUndoId ) const;
virtual bool FormattingParagraph( sal_Int32 nPara );
virtual bool SpellNextDocument();
diff --git a/include/editeng/outliner.hxx b/include/editeng/outliner.hxx
index 2c9b0355d710..218d9ffdfc79 100644
--- a/include/editeng/outliner.hxx
+++ b/include/editeng/outliner.hxx
@@ -373,7 +373,7 @@ public:
sal_Int32 mnPara;
sal_Int32 mnIndex;
const SvxFont& mrFont;
- const sal_Int32* mpDXArray;
+ const long* mpDXArray;
const EEngineData::WrongSpellVector* mpWrongSpellVector;
const SvxFieldData* mpFieldData;
@@ -402,7 +402,7 @@ public:
const SvxFont& rFnt,
sal_Int32 nPar,
sal_Int32 nIdx,
- const sal_Int32* pDXArr,
+ const long* pDXArr,
const EEngineData::WrongSpellVector* pWrongSpellVector,
const SvxFieldData* pFieldData,
const ::com::sun::star::lang::Locale* pLocale,
@@ -836,25 +836,25 @@ public:
void StripPortions();
- virtual void DrawingText(
- const Point& rStartPos, const OUString& rText, sal_Int32 nTextStart, sal_Int32 nTextLen,
- const sal_Int32* pDXArray, const SvxFont& rFont, sal_Int32 nPara, sal_Int32 nIndex, sal_uInt8 nRightToLeft,
- const EEngineData::WrongSpellVector* pWrongSpellVector,
- const SvxFieldData* pFieldData,
- bool bEndOfLine,
- bool bEndOfParagraph,
- bool bEndOfBullet,
- const ::com::sun::star::lang::Locale* pLocale,
- const Color& rOverlineColor,
- const Color& rTextLineColor);
-
- virtual void DrawingTab(
- const Point& rStartPos, long nWidth, const OUString& rChar,
- const SvxFont& rFont, sal_Int32 nPara, sal_Int32 nIndex, sal_uInt8 nRightToLeft,
- bool bEndOfLine,
- bool bEndOfParagraph,
- const Color& rOverlineColor,
- const Color& rTextLineColor);
+ virtual void DrawingText( const Point& rStartPos, const OUString& rText,
+ sal_Int32 nTextStart, sal_Int32 nTextLen,
+ const long* pDXArray, const SvxFont& rFont,
+ sal_Int32 nPara, sal_Int32 nIndex, sal_uInt8 nRightToLeft,
+ const EEngineData::WrongSpellVector* pWrongSpellVector,
+ const SvxFieldData* pFieldData,
+ bool bEndOfLine,
+ bool bEndOfParagraph,
+ bool bEndOfBullet,
+ const ::com::sun::star::lang::Locale* pLocale,
+ const Color& rOverlineColor,
+ const Color& rTextLineColor);
+
+ virtual void DrawingTab( const Point& rStartPos, long nWidth, const OUString& rChar,
+ const SvxFont& rFont, sal_Int32 nPara, sal_Int32 nIndex, sal_uInt8 nRightToLeft,
+ bool bEndOfLine,
+ bool bEndOfParagraph,
+ const Color& rOverlineColor,
+ const Color& rTextLineColor);
Size CalcTextSize();
Size CalcTextSizeNTP();
diff --git a/include/editeng/svxfont.hxx b/include/editeng/svxfont.hxx
index 43036503be16..e9487b5ee0c7 100644
--- a/include/editeng/svxfont.hxx
+++ b/include/editeng/svxfont.hxx
@@ -93,17 +93,17 @@ public:
const sal_Int32 nIdx = 0, const sal_Int32 nLen = SAL_MAX_INT32 ) const;
void QuickDrawText( OutputDevice *pOut, const Point &rPos, const OUString &rTxt,
- const sal_Int32 nIdx = 0, const sal_Int32 nLen = SAL_MAX_INT32, const sal_Int32* pDXArray = NULL ) const;
+ const sal_Int32 nIdx = 0, const sal_Int32 nLen = SAL_MAX_INT32, const long* pDXArray = NULL ) const;
Size QuickGetTextSize( const OutputDevice *pOut, const OUString &rTxt,
- const sal_Int32 nIdx, const sal_Int32 nLen, sal_Int32* pDXArray = NULL ) const;
+ const sal_Int32 nIdx, const sal_Int32 nLen, long* pDXArray = NULL ) const;
void DrawPrev( OutputDevice* pOut, Printer* pPrinter,
const Point &rPos, const OUString &rTxt,
const sal_Int32 nIdx = 0, const sal_Int32 nLen = SAL_MAX_INT32 ) const;
static void DrawArrow( OutputDevice &rOut, const Rectangle& rRect,
- const Size& rSize, const Color& rCol, bool bLeft );
+ const Size& rSize, const Color& rCol, bool bLeft );
SvxFont& operator=( const SvxFont& rFont );
SvxFont& operator=( const Font& rFont );
};
diff --git a/include/svtools/calendar.hxx b/include/svtools/calendar.hxx
index ef270c5db3a8..e2d042a7f9b7 100644
--- a/include/svtools/calendar.hxx
+++ b/include/svtools/calendar.hxx
@@ -169,7 +169,7 @@ private:
Rectangle maPrevRect;
Rectangle maNextRect;
OUString maDayOfWeekText;
- sal_Int32 mnDayOfWeekAry[7];
+ long mnDayOfWeekAry[7];
Date maOldFormatFirstDate;
Date maOldFormatLastDate;
Date maFirstDate;
diff --git a/include/vcl/devicecoordinate.hxx b/include/vcl/devicecoordinate.hxx
index bcc2bb2255b8..58ff3d2425dd 100644
--- a/include/vcl/devicecoordinate.hxx
+++ b/include/vcl/devicecoordinate.hxx
@@ -20,7 +20,7 @@ typedef ::basegfx::B2DPoint DevicePoint;
#else /* !VCL_FLOAT_DEVICE_PIXEL */
#include <basegfx/point/b2ipoint.hxx>
-typedef sal_Int32 DeviceCoordinate;
+typedef long DeviceCoordinate;
typedef ::basegfx::B2IPoint DevicePoint;
#endif /* ! Carpet Cushion */
diff --git a/include/vcl/metaact.hxx b/include/vcl/metaact.hxx
index 4709d24f57a7..569fd64de23d 100644
--- a/include/vcl/metaact.hxx
+++ b/include/vcl/metaact.hxx
@@ -473,7 +473,7 @@ private:
Point maStartPt;
OUString maStr;
- sal_Int32* mpDXAry;
+ long* mpDXAry;
sal_Int32 mnIndex;
sal_Int32 mnLen;
@@ -486,7 +486,7 @@ public:
MetaTextArrayAction();
MetaTextArrayAction( const MetaTextArrayAction& rAction );
MetaTextArrayAction( const Point& rStartPt, const OUString& rStr,
- const sal_Int32* pDXAry, sal_Int32 nIndex,
+ const long* pDXAry, sal_Int32 nIndex,
sal_Int32 nLen );
virtual void Execute( OutputDevice* pOut ) SAL_OVERRIDE;
@@ -503,7 +503,7 @@ public:
const OUString& GetText() const { return maStr; }
sal_Int32 GetIndex() const { return mnIndex; }
sal_Int32 GetLen() const { return mnLen; }
- sal_Int32* GetDXArray() const { return mpDXAry; }
+ long* GetDXArray() const { return mpDXAry; }
};
class VCL_DLLPUBLIC MetaStretchTextAction : public MetaAction
diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx
index 66559c26ae11..dc954272d799 100644
--- a/include/vcl/outdev.hxx
+++ b/include/vcl/outdev.hxx
@@ -1005,24 +1005,24 @@ public:
*/
bool GetTextBoundRect( Rectangle& rRect,
const OUString& rStr, sal_Int32 nBase = 0, sal_Int32 nIndex = 0, sal_Int32 nLen = -1,
- sal_uLong nLayoutWidth = 0, const sal_Int32* pDXArray = NULL ) const;
+ sal_uLong nLayoutWidth = 0, const long* pDXArray = NULL ) const;
Rectangle ImplGetTextBoundRect( const SalLayout& );
bool GetTextOutline( PolyPolygon&,
const OUString& rStr, sal_Int32 nBase = 0, sal_Int32 nIndex = 0,
sal_Int32 nLen = -1, bool bOptimize = true,
- sal_uLong nLayoutWidth = 0, const sal_Int32* pDXArray = NULL ) const;
+ sal_uLong nLayoutWidth = 0, const long* pDXArray = NULL ) const;
bool GetTextOutlines( PolyPolyVector&,
const OUString& rStr, sal_Int32 nBase = 0, sal_Int32 nIndex = 0,
sal_Int32 nLen = -1, bool bOptimize = true,
- sal_uLong nLayoutWidth = 0, const sal_Int32* pDXArray = NULL ) const;
+ sal_uLong nLayoutWidth = 0, const long* pDXArray = NULL ) const;
bool GetTextOutlines( ::basegfx::B2DPolyPolygonVector &rVector,
const OUString& rStr, sal_Int32 nBase = 0, sal_Int32 nIndex = 0,
sal_Int32 nLen = -1, bool bOptimize = true,
- sal_uLong nLayoutWidth = 0, const sal_Int32* pDXArray = NULL ) const;
+ sal_uLong nLayoutWidth = 0, const long* pDXArray = NULL ) const;
OUString GetEllipsisString( const OUString& rStr, long nMaxWidth,
@@ -1085,16 +1085,16 @@ public:
float approximate_char_width() const;
void DrawTextArray( const Point& rStartPt, const OUString& rStr,
- const sal_Int32* pDXAry = NULL,
+ const long* pDXAry = NULL,
sal_Int32 nIndex = 0,
sal_Int32 nLen = -1,
int flags = 0);
- long GetTextArray( const OUString& rStr, sal_Int32* pDXAry = NULL,
+ long GetTextArray( const OUString& rStr, long* pDXAry = NULL,
sal_Int32 nIndex = 0, sal_Int32 nLen = -1 ) const;
- bool GetCaretPositions( const OUString&, sal_Int32* pCaretXArray,
+ bool GetCaretPositions( const OUString&, long* pCaretXArray,
sal_Int32 nIndex, sal_Int32 nLen,
- sal_Int32* pDXAry = NULL, long nWidth = 0,
+ long* pDXAry = NULL, long nWidth = 0,
bool bCellBreaking = true ) const;
void DrawStretchText( const Point& rStartPt, sal_uLong nWidth,
const OUString& rStr,
@@ -1237,7 +1237,7 @@ public:
SystemTextLayoutData GetSysTextLayoutData( const Point& rStartPt, const OUString& rStr,
sal_Int32 nIndex = 0, sal_Int32 nLen = -1,
- const sal_Int32* pDXAry = NULL ) const;
+ const long* pDXAry = NULL ) const;
SAL_DLLPRIVATE bool ImplIsAntiparallel() const ;
SAL_DLLPRIVATE void ReMirror( Point &rPoint ) const;
@@ -1247,7 +1247,7 @@ public:
virtual bool HasMirroredGraphics() const;
SAL_DLLPRIVATE SalLayout* ImplLayout( const OUString&, sal_Int32 nIndex, sal_Int32 nLen,
const Point& rLogicPos = Point(0,0), long nLogicWidth=0,
- const sal_Int32* pLogicDXArray=NULL, int flags=0 ) const;
+ const long* pLogicDXArray=NULL, int flags=0 ) const;
SAL_DLLPRIVATE ImplLayoutArgs ImplPrepareLayoutArgs( OUString&, const sal_Int32 nIndex, const sal_Int32 nLen,
DeviceCoordinate nPixelWidth, const DeviceCoordinate* pPixelDXArray, int flags = 0 ) const;
SAL_DLLPRIVATE SalLayout* ImplGlyphFallbackLayout( SalLayout*, ImplLayoutArgs& ) const;
diff --git a/include/vcl/pdfwriter.hxx b/include/vcl/pdfwriter.hxx
index d4b6e9014503..49ce97cf1157 100644
--- a/include/vcl/pdfwriter.hxx
+++ b/include/vcl/pdfwriter.hxx
@@ -769,7 +769,7 @@ The following structure describes the permissions used in PDF security
FontUnderline eOverline,
bool bUnderlineAbove = false );
void DrawTextArray( const Point& rStartPt, const OUString& rStr,
- const sal_Int32* pDXAry,
+ const long* pDXAry,
sal_Int32 nIndex,
sal_Int32 nLen );
void DrawStretchText( const Point& rStartPt, sal_uLong nWidth,
diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx
index 1493e34c341b..23300387d009 100644
--- a/sc/source/ui/view/output2.cxx
+++ b/sc/source/ui/view/output2.cxx
@@ -1466,7 +1466,7 @@ void ScOutputData::DrawStrings( bool bPixelToLogic )
// before processing the cell value.
::boost::ptr_vector<ScPatternAttr> aAltPatterns;
- std::vector<sal_Int32> aDX;
+ std::vector<long> aDX;
long nPosY = nScrY;
for (SCSIZE nArrY=1; nArrY+1<nArrCount; nArrY++)
{
diff --git a/starmath/source/accessibility.cxx b/starmath/source/accessibility.cxx
index 5032a2ef400a..a037861ea704 100644
--- a/starmath/source/accessibility.cxx
+++ b/starmath/source/accessibility.cxx
@@ -527,7 +527,7 @@ awt::Rectangle SAL_CALL SmGraphicAccessible::getCharacterBounds( sal_Int32 nInde
aTLPos.X() -= 0;
Size aSize (pNode->GetSize());
- sal_Int32 *pXAry = new sal_Int32[ aNodeText.getLength() ];
+ long* pXAry = new long[ aNodeText.getLength() ];
pWin->SetFont( pNode->GetFont() );
pWin->GetTextArray( aNodeText, pXAry, 0, aNodeText.getLength() );
aTLPos.X() += nNodeIndex > 0 ? pXAry[nNodeIndex - 1] : 0;
@@ -601,7 +601,7 @@ sal_Int32 SAL_CALL SmGraphicAccessible::getIndexAtPoint( const awt::Point& aPoin
long nNodeX = pNode->GetLeft();
- sal_Int32 *pXAry = new sal_Int32[ aTxt.getLength() ];
+ long* pXAry = new long[ aTxt.getLength() ];
pWin->SetFont( pNode->GetFont() );
pWin->GetTextArray( aTxt, pXAry, 0, aTxt.getLength() );
for (sal_Int32 i = 0; i < aTxt.getLength() && nRes == -1; ++i)
diff --git a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx
index 1f5aa6a5bcd5..72545295f665 100644
--- a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx
+++ b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx
@@ -267,7 +267,7 @@ void GetTextAreaOutline( const FWData& rFWData, const SdrObject* pCustomShape, F
SvxCharScaleWidthItem& rCharScaleWidthItem = (SvxCharScaleWidthItem&)pCustomShape->GetMergedItem( EE_CHAR_FONTWIDTH );
sal_uInt16 nCharScaleWidth = rCharScaleWidthItem.GetValue();
- sal_Int32* pDXArry = NULL;
+ long* pDXArry = NULL;
sal_Int32 nWidth = 0;
// VERTICAL
@@ -332,7 +332,7 @@ void GetTextAreaOutline( const FWData& rFWData, const SdrObject* pCustomShape, F
{
if ( ( nCharScaleWidth != 100 ) && nCharScaleWidth )
{ // applying character spacing
- pDXArry = new sal_Int32[ rText.getLength() ];
+ pDXArry = new long[ rText.getLength() ];
aVirDev.GetTextArray( rText, pDXArry);
FontMetric aFontMetric( aVirDev.GetFontMetric() );
aFont.SetWidth( (sal_Int32)( (double)aFontMetric.GetWidth() * ( (double)100 / (double)nCharScaleWidth ) ) );
diff --git a/sw/source/core/inc/scriptinfo.hxx b/sw/source/core/inc/scriptinfo.hxx
index 001bc3d48c03..6ed350960d19 100644
--- a/sw/source/core/inc/scriptinfo.hxx
+++ b/sw/source/core/inc/scriptinfo.hxx
@@ -251,7 +251,7 @@ public:
sal_uInt16 HasKana( sal_Int32 nStart, const sal_Int32 nEnd ) const;
// modifies the kerning array according to a given compress value
- long Compress( sal_Int32* pKernArray, sal_Int32 nIdx, sal_Int32 nLen,
+ long Compress( long* pKernArray, sal_Int32 nIdx, sal_Int32 nLen,
const sal_uInt16 nCompress, const sal_uInt16 nFontHeight,
Point* pPoint = NULL ) const;
@@ -271,8 +271,8 @@ public:
The value which has to be added to a kashida opportunity.
@return The number of kashida opportunities in the given range
*/
- sal_Int32 KashidaJustify( sal_Int32* pKernArray, sal_Int32* pScrArray,
- sal_Int32 nStt, sal_Int32 nLen, long nSpaceAdd = 0) const;
+ sal_Int32 KashidaJustify( long* pKernArray, long* pScrArray,
+ sal_Int32 nStt, sal_Int32 nLen, long nSpaceAdd = 0) const;
/** Clears array of kashidas marked as invalid
*/
@@ -344,10 +344,10 @@ public:
The value which has to be added to the cells.
@return The number of extra spaces in the given range
*/
- static sal_Int32 ThaiJustify( const OUString& rTxt, sal_Int32* pKernArray,
- sal_Int32* pScrArray, sal_Int32 nIdx,
- sal_Int32 nLen, sal_Int32 nNumberOfBlanks = 0,
- long nSpaceAdd = 0 );
+ static sal_Int32 ThaiJustify( const OUString& rTxt, long* pKernArray,
+ long* pScrArray, sal_Int32 nIdx,
+ sal_Int32 nLen, sal_Int32 nNumberOfBlanks = 0,
+ long nSpaceAdd = 0 );
static SwScriptInfo* GetScriptInfo( const SwTxtNode& rNode,
bool bAllowInvalid = false );
diff --git a/sw/source/core/text/porlay.cxx b/sw/source/core/text/porlay.cxx
index dd5066a0af7e..133b7414333e 100644
--- a/sw/source/core/text/porlay.cxx
+++ b/sw/source/core/text/porlay.cxx
@@ -1512,7 +1512,7 @@ sal_uInt16 SwScriptInfo::HasKana( sal_Int32 nStart, const sal_Int32 nLen ) const
return USHRT_MAX;
}
-long SwScriptInfo::Compress( sal_Int32* pKernArray, sal_Int32 nIdx, sal_Int32 nLen,
+long SwScriptInfo::Compress( long* pKernArray, sal_Int32 nIdx, sal_Int32 nLen,
const sal_uInt16 nCompress, const sal_uInt16 nFontHeight,
Point* pPoint ) const
{
@@ -1626,11 +1626,11 @@ long SwScriptInfo::Compress( sal_Int32* pKernArray, sal_Int32 nIdx, sal_Int32 nL
// total number of kashida positions, or the number of kashida positions after some positions
// have been dropped, depending on the state of the aKashidaInvalid array.
-sal_Int32 SwScriptInfo::KashidaJustify( sal_Int32* pKernArray,
- sal_Int32* pScrArray,
- sal_Int32 nStt,
- sal_Int32 nLen,
- long nSpaceAdd ) const
+sal_Int32 SwScriptInfo::KashidaJustify( long* pKernArray,
+ long* pScrArray,
+ sal_Int32 nStt,
+ sal_Int32 nLen,
+ long nSpaceAdd ) const
{
SAL_WARN_IF( !nLen, "sw.core", "Kashida justification without text?!" );
@@ -1895,10 +1895,10 @@ bool SwScriptInfo::MarkKashidasInvalid(sal_Int32 nCnt, sal_Int32* pKashidaPositi
return true;
}
-sal_Int32 SwScriptInfo::ThaiJustify( const OUString& rTxt, sal_Int32* pKernArray,
- sal_Int32* pScrArray, sal_Int32 nStt,
- sal_Int32 nLen, sal_Int32 nNumberOfBlanks,
- long nSpaceAdd )
+sal_Int32 SwScriptInfo::ThaiJustify( const OUString& rTxt, long* pKernArray,
+ long* pScrArray, sal_Int32 nStt,
+ sal_Int32 nLen, sal_Int32 nNumberOfBlanks,
+ long nSpaceAdd )
{
SAL_WARN_IF( nStt + nLen > rTxt.getLength(), "sw.core", "String in ThaiJustify too small" );
diff --git a/sw/source/core/txtnode/fntcache.cxx b/sw/source/core/txtnode/fntcache.cxx
index f0ede7690c87..38b1f6c076d0 100644
--- a/sw/source/core/txtnode/fntcache.cxx
+++ b/sw/source/core/txtnode/fntcache.cxx
@@ -174,12 +174,12 @@ struct CalcLinePosData
const bool bSwitchH2V;
const bool bSwitchL2R;
long nHalfSpace;
- sal_Int32* pKernArray;
+ long* pKernArray;
const bool bBidiPor;
CalcLinePosData( SwDrawTextInfo& _rInf, Font& _rFont,
sal_Int32 _nCnt, const bool _bSwitchH2V, const bool _bSwitchL2R,
- long _nHalfSpace, sal_Int32* _pKernArray, const bool _bBidiPor) :
+ long _nHalfSpace, long* _pKernArray, const bool _bBidiPor) :
rInf( _rInf ),
rFont( _rFont ),
nCnt( _nCnt ),
@@ -905,7 +905,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
//const sal_uInt16 nGridWidth = pGrid->GetBaseHeight();
const SwDoc* pDoc = rInf.GetShell()->GetDoc();
const sal_uInt16 nGridWidth = GetGridWidth(*pGrid, *pDoc);
- sal_Int32* pKernArray = new sal_Int32[rInf.GetLen()];
+ long* pKernArray = new long[rInf.GetLen()];
if ( pPrinter )
pPrinter->GetTextArray( rInf.GetText(), pKernArray,
@@ -1001,7 +1001,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
else
nGridWidthAdd = nGridWidthAdd - nDefaultFontHeight;
- sal_Int32* pKernArray = new sal_Int32[rInf.GetLen()];
+ long* pKernArray = new long[rInf.GetLen()];
if ( pPrinter )
pPrinter->GetTextArray( rInf.GetText(), pKernArray,
@@ -1112,7 +1112,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
else
{
//long nKernAdd = rInf.GetKern();
- long nKernAdd = 0;
+ long nKernAdd = 0;
long nGridAddSum = nGridWidthAdd + nKernAdd;
for(sal_Int32 i = 0; i < rInf.GetLen(); i++,nGridAddSum += nGridWidthAdd + nKernAdd )
{
@@ -1147,7 +1147,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
// Simple kerning is handled by DrawStretchText
if( rInf.GetSpace() || rInf.GetKanaComp() )
{
- sal_Int32 *pKernArray = new sal_Int32[ rInf.GetLen() ];
+ long *pKernArray = new long[ rInf.GetLen() ];
rInf.GetOut().GetTextArray( rInf.GetText(), pKernArray,
rInf.GetIdx(), rInf.GetLen() );
@@ -1360,12 +1360,12 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
bool bBullet = rInf.GetBullet();
if( bSymbol )
bBullet = false;
- sal_Int32 *pKernArray = new sal_Int32[ rInf.GetLen() ];
+ long* pKernArray = new long[ rInf.GetLen() ];
CreateScrFont( *rInf.GetShell(), rInf.GetOut() );
long nScrPos;
// get screen array
- sal_Int32* pScrArray = new sal_Int32[ rInf.GetLen() ];
+ long* pScrArray = new long[ rInf.GetLen() ];
rInf.GetOut().GetTextArray( rInf.GetText(), pScrArray,
rInf.GetIdx(), rInf.GetLen() );
@@ -1877,7 +1877,7 @@ Size SwFntObj::GetTextSize( SwDrawTextInfo& rInf )
aTxtSize.Width() = pPrinter->GetTextWidth( rInf.GetText(),
rInf.GetIdx(), nLn );
aTxtSize.Height() = pPrinter->GetTextHeight();
- sal_Int32 *pKernArray = new sal_Int32[nLn];
+ long* pKernArray = new long[nLn];
CreateScrFont( *rInf.GetShell(), rInf.GetOut() );
if( !GetScrFont()->IsSameInstance( rInf.GetOut().GetFont() ) )
rInf.GetOut().SetFont( *pScrFont );
@@ -1895,7 +1895,7 @@ Size SwFntObj::GetTextSize( SwDrawTextInfo& rInf )
nScrPos = pKernArray[ nLn - 1 ];
else
{
- sal_Int32* pScrArray = new sal_Int32[ rInf.GetLen() ];
+ long* pScrArray = new long[ rInf.GetLen() ];
rInf.GetOut().GetTextArray( rInf.GetText(), pScrArray,
rInf.GetIdx(), rInf.GetLen() );
nScrPos = pScrArray[ 0 ];
@@ -1947,7 +1947,7 @@ Size SwFntObj::GetTextSize( SwDrawTextInfo& rInf )
rInf.GetOut().SetFont( *pPrtFont );
if( bCompress )
{
- sal_Int32 *pKernArray = new sal_Int32[nLn];
+ long* pKernArray = new long[nLn];
rInf.GetOut().GetTextArray( rInf.GetText(), pKernArray,
rInf.GetIdx(), nLn );
rInf.SetKanaDiff( rInf.GetScriptInfo()->Compress( pKernArray,
@@ -1985,7 +1985,7 @@ sal_Int32 SwFntObj::GetCrsrOfst( SwDrawTextInfo &rInf )
if( 0 != nSperren )
nKern -= nSperren;
- sal_Int32 *pKernArray = new sal_Int32[ rInf.GetLen() ];
+ long* pKernArray = new long[ rInf.GetLen() ];
// be sure to have the correct layout mode at the printer
if ( pPrinter )
@@ -2321,7 +2321,7 @@ sal_Int32 SwFont::GetTxtBreak( SwDrawTextInfo& rInf, long nTextWidth )
const SwDoc* pDoc = rInf.GetShell()->GetDoc();
const sal_uInt16 nGridWidth = GetGridWidth(*pGrid, *pDoc);
- sal_Int32* pKernArray = new sal_Int32[rInf.GetLen()];
+ long* pKernArray = new long[rInf.GetLen()];
rInf.GetOut().GetTextArray( rInf.GetText(), pKernArray,
rInf.GetIdx(), rInf.GetLen() );
@@ -2361,7 +2361,7 @@ sal_Int32 SwFont::GetTxtBreak( SwDrawTextInfo& rInf, long nTextWidth )
else
nGridWidthAdd = nGridWidthAdd - nDefaultFontHeight;
- sal_Int32* pKernArray = new sal_Int32[rInf.GetLen()];
+ long* pKernArray = new long[rInf.GetLen()];
rInf.GetOut().GetTextArray( rInf.GetText(), pKernArray,
rInf.GetIdx(), rInf.GetLen() );
long nCurrPos = pKernArray[nTxtBreak] + nGridWidthAdd;
@@ -2460,7 +2460,7 @@ sal_Int32 SwFont::GetTxtBreak( SwDrawTextInfo& rInf, long nTextWidth )
nLn = 1;
else if( nLn > 2 * nTxtBreak2 )
nLn = 2 * nTxtBreak2;
- sal_Int32 *pKernArray = new sal_Int32[ nLn ];
+ long* pKernArray = new long[ nLn ];
rInf.GetOut().GetTextArray( rInf.GetText(), pKernArray,
rInf.GetIdx(), nLn );
if( rInf.GetScriptInfo()->Compress( pKernArray, rInf.GetIdx(), nLn,
diff --git a/toolkit/source/awt/vclxfont.cxx b/toolkit/source/awt/vclxfont.cxx
index 14174f25b5d7..139defbc1af4 100644
--- a/toolkit/source/awt/vclxfont.cxx
+++ b/toolkit/source/awt/vclxfont.cxx
@@ -176,8 +176,13 @@ sal_Int32 VCLXFont::getStringWidthArray( const OUString& str, ::com::sun::star::
{
Font aOldFont = pOutDev->GetFont();
pOutDev->SetFont( maFont );
+ long* pDXA = (long*)alloca(str.getLength() * sizeof(long));
+ nRet = pOutDev->GetTextArray( str, pDXA );
rDXArray = ::com::sun::star::uno::Sequence<sal_Int32>( str.getLength() );
- nRet = pOutDev->GetTextArray( str, rDXArray.getArray() );
+ for(int i = 0; i < str.getLength(); i++)
+ {
+ rDXArray[i] = pDXA[i];
+ }
pOutDev->SetFont( aOldFont );
}
return nRet;
diff --git a/toolkit/source/awt/vclxgraphics.cxx b/toolkit/source/awt/vclxgraphics.cxx
index 6a3a479a44dc..98b4d022e6ab 100644
--- a/toolkit/source/awt/vclxgraphics.cxx
+++ b/toolkit/source/awt/vclxgraphics.cxx
@@ -540,7 +540,12 @@ void VCLXGraphics::drawTextArray( sal_Int32 x, sal_Int32 y, const OUString& rTex
if( mpOutputDevice )
{
InitOutputDevice( INITOUTDEV_CLIPREGION|INITOUTDEV_RASTEROP|INITOUTDEV_COLORS|INITOUTDEV_FONT );
- mpOutputDevice->DrawTextArray( Point( x, y ), rText, rLongs.getConstArray() );
+ long* pDXA = (long*)alloca(rText.getLength() * sizeof(long));
+ for(int i = 0; i < rText.getLength(); i++)
+ {
+ pDXA[i] = rLongs[i];
+ }
+ mpOutputDevice->DrawTextArray( Point( x, y ), rText, pDXA );
}
}
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(