canvas/source/cairo/cairo_textlayout.cxx                |    4 +-
 canvas/source/cairo/cairo_textlayout.hxx                |    2 -
 canvas/source/opengl/ogl_canvashelper.cxx               |    2 -
 canvas/source/vcl/textlayout.cxx                        |    8 ++--
 canvas/source/vcl/textlayout.hxx                        |    2 -
 cppcanvas/source/inc/implrenderer.hxx                   |    2 -
 cppcanvas/source/mtfrenderer/implrenderer.cxx           |   10 ++---
 cppcanvas/source/mtfrenderer/textaction.cxx             |   10 ++---
 cppcanvas/source/mtfrenderer/textaction.hxx             |    2 -
 drawinglayer/source/primitive2d/textlayoutdevice.cxx    |    4 +-
 drawinglayer/source/processor2d/vclprocessor2d.cxx      |    2 -
 drawinglayer/source/tools/wmfemfhelper.cxx              |    2 -
 editeng/inc/editdoc.hxx                                 |   18 +++++-----
 editeng/source/editeng/editdoc.cxx                      |    8 ++--
 editeng/source/editeng/editeng.cxx                      |    2 -
 editeng/source/editeng/impedit.hxx                      |    2 -
 editeng/source/editeng/impedit2.cxx                     |    2 -
 editeng/source/editeng/impedit3.cxx                     |   18 +++++-----
 editeng/source/items/svxfont.cxx                        |    4 +-
 editeng/source/outliner/outleeng.cxx                    |    2 -
 editeng/source/outliner/outleeng.hxx                    |    2 -
 editeng/source/outliner/outliner.cxx                    |    4 +-
 emfio/inc/mtftools.hxx                                  |    2 -
 emfio/source/reader/emfreader.cxx                       |    2 -
 emfio/source/reader/mtftools.cxx                        |    8 ++--
 emfio/source/reader/wmfreader.cxx                       |    4 +-
 filter/source/svg/svgwriter.cxx                         |   10 ++---
 filter/source/svg/svgwriter.hxx                         |    4 +-
 include/editeng/editeng.hxx                             |    2 -
 include/editeng/outliner.hxx                            |    6 +--
 include/editeng/svxfont.hxx                             |    4 +-
 include/vcl/devicecoordinate.hxx                        |    2 -
 include/vcl/metaact.hxx                                 |   10 ++---
 include/vcl/outdev.hxx                                  |   12 +++---
 include/vcl/pdfwriter.hxx                               |    2 -
 sc/source/ui/view/output2.cxx                           |    2 -
 starmath/source/accessibility.cxx                       |    4 +-
 svx/source/customshapes/EnhancedCustomShapeFontWork.cxx |    2 -
 sw/source/core/inc/scriptinfo.hxx                       |   12 +++---
 sw/source/core/text/porlay.cxx                          |   14 ++++----
 sw/source/core/txtnode/fntcache.cxx                     |   28 ++++++++--------
 toolkit/source/awt/vclxfont.cxx                         |    2 -
 toolkit/source/awt/vclxgraphics.cxx                     |    2 -
 vcl/inc/calendar.hxx                                    |    2 -
 vcl/inc/pdf/pdfwriter_impl.hxx                          |    2 -
 vcl/qa/cppunit/complextext.cxx                          |   10 ++---
 vcl/qa/cppunit/svm/svmtest.cxx                          |    2 -
 vcl/source/control/calendar.cxx                         |    2 -
 vcl/source/filter/eps/eps.cxx                           |    8 ++--
 vcl/source/filter/svm/SvmConverter.cxx                  |    4 +-
 vcl/source/filter/svm/SvmReader.cxx                     |    2 -
 vcl/source/filter/svm/SvmWriter.cxx                     |    2 -
 vcl/source/filter/wmf/emfwr.cxx                         |    6 +--
 vcl/source/filter/wmf/emfwr.hxx                         |    2 -
 vcl/source/filter/wmf/wmfwr.cxx                         |    8 ++--
 vcl/source/filter/wmf/wmfwr.hxx                         |    6 +--
 vcl/source/gdi/metaact.cxx                              |    6 +--
 vcl/source/gdi/pdfwriter.cxx                            |    2 -
 vcl/source/gdi/pdfwriter_impl.cxx                       |    2 -
 vcl/source/gdi/textlayout.cxx                           |    6 +--
 vcl/source/outdev/text.cxx                              |   12 +++---
 vcl/workben/vcldemo.cxx                                 |    2 -
 62 files changed, 166 insertions(+), 166 deletions(-)

New commits:
commit bc413e15fae3672f580894a3cd7b077d533d8e6c
Author:     Noel Grandin <noelgran...@gmail.com>
AuthorDate: Sat Oct 30 11:03:48 2021 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Sat Oct 30 15:43:23 2021 +0200

    tools::Long->sal_Int32 in the DX arrays
    
    Change-Id: I36ddc11b39763dc77086591fe9bb756195b4294f
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124459
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/canvas/source/cairo/cairo_textlayout.cxx 
b/canvas/source/cairo/cairo_textlayout.cxx
index acf2672be51d..7dc992a8c360 100644
--- a/canvas/source/cairo/cairo_textlayout.cxx
+++ b/canvas/source/cairo/cairo_textlayout.cxx
@@ -263,7 +263,7 @@ namespace cairocanvas
         ::osl::MutexGuard aGuard( m_aMutex );
         setupLayoutMode( rOutDev, mnTextDirection );
 
-        std::vector<tools::Long> aOffsets(maLogicalAdvancements.getLength());
+        std::vector<sal_Int32> aOffsets(maLogicalAdvancements.getLength());
 
         if( maLogicalAdvancements.hasElements() )
             setupTextOffsets( aOffsets.data(), maLogicalAdvancements, 
viewState, renderState );
@@ -314,7 +314,7 @@ namespace cairocanvas
         };
     }
 
-    void TextLayout::setupTextOffsets( tools::Long*                       
outputOffsets,
+    void TextLayout::setupTextOffsets( sal_Int32*                       
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 b4159e737e48..3349a9d830e6 100644
--- a/canvas/source/cairo/cairo_textlayout.hxx
+++ b/canvas/source/cairo/cairo_textlayout.hxx
@@ -85,7 +85,7 @@ namespace cairocanvas
                    const css::rendering::ViewState&   viewState,
                    const css::rendering::RenderState& renderState ) const;
 
-        void setupTextOffsets( tools::Long*                                    
   outputOffsets,
+        void setupTextOffsets( sal_Int32*                          
outputOffsets,
                                const css::uno::Sequence< double >& 
inputOffsets,
                                const css::rendering::ViewState&    viewState,
                                const css::rendering::RenderState&  renderState 
    ) const;
diff --git a/canvas/source/opengl/ogl_canvashelper.cxx 
b/canvas/source/opengl/ogl_canvashelper.cxx
index fdd4a7ac541b..b3c79bd4f6e8 100644
--- a/canvas/source/opengl/ogl_canvashelper.cxx
+++ b/canvas/source/opengl/ogl_canvashelper.cxx
@@ -729,7 +729,7 @@ namespace oglcanvas
                 {
                     // create the DXArray
                     const sal_Int32 nLen( aLogicalAdvancements.getLength() );
-                    std::vector<tools::Long> aDXArray(nLen);
+                    std::vector<sal_Int32> aDXArray(nLen);
                     for( sal_Int32 i=0; i<nLen; ++i )
                         aDXArray[i] = basegfx::fround( aLogicalAdvancements[i] 
);
 
diff --git a/canvas/source/vcl/textlayout.cxx b/canvas/source/vcl/textlayout.cxx
index 1c1f1317b865..b5c2ffce5154 100644
--- a/canvas/source/vcl/textlayout.cxx
+++ b/canvas/source/vcl/textlayout.cxx
@@ -117,7 +117,7 @@ namespace vclcanvas
             uno::Sequence<double>(4),
             rendering::CompositeOperation::SOURCE);
 
-        std::vector<::tools::Long> aOffsets(maLogicalAdvancements.getLength());
+        std::vector<sal_Int32> aOffsets(maLogicalAdvancements.getLength());
         setupTextOffsets(aOffsets.data(), maLogicalAdvancements, aViewState, 
aRenderState);
 
         std::vector< uno::Reference< rendering::XPolyPolygon2D> > 
aOutlineSequence;
@@ -165,7 +165,7 @@ namespace vclcanvas
             uno::Sequence<double>(4),
             rendering::CompositeOperation::SOURCE);
 
-        std::unique_ptr< ::tools::Long []> aOffsets(new 
::tools::Long[maLogicalAdvancements.getLength()]);
+        std::unique_ptr< sal_Int32 []> aOffsets(new 
sal_Int32[maLogicalAdvancements.getLength()]);
         setupTextOffsets(aOffsets.get(), maLogicalAdvancements, aViewState, 
aRenderState);
 
         std::vector< ::tools::Rectangle > aMetricVector;
@@ -335,7 +335,7 @@ namespace vclcanvas
         if( maLogicalAdvancements.hasElements() )
         {
             // TODO(P2): cache that
-            std::vector<::tools::Long> 
aOffsets(maLogicalAdvancements.getLength());
+            std::vector<sal_Int32> aOffsets(maLogicalAdvancements.getLength());
             setupTextOffsets( aOffsets.data(), maLogicalAdvancements, 
viewState, renderState );
 
             // TODO(F3): ensure correct length and termination for DX
@@ -388,7 +388,7 @@ namespace vclcanvas
         };
     }
 
-    void TextLayout::setupTextOffsets( ::tools::Long*                       
outputOffsets,
+    void TextLayout::setupTextOffsets( sal_Int32*                       
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 43853740588b..6471aa5a67d1 100644
--- a/canvas/source/vcl/textlayout.hxx
+++ b/canvas/source/vcl/textlayout.hxx
@@ -85,7 +85,7 @@ namespace vclcanvas
                    const css::rendering::RenderState&              renderState 
) const;
 
     private:
-        void setupTextOffsets( ::tools::Long* outputOffsets,
+        void setupTextOffsets( sal_Int32* outputOffsets,
                                const css::uno::Sequence< double >& 
inputOffsets,
                                const css::rendering::ViewState&    viewState,
                                const css::rendering::RenderState&  renderState 
    ) const;
diff --git a/cppcanvas/source/inc/implrenderer.hxx 
b/cppcanvas/source/inc/implrenderer.hxx
index 2a77639e4ae8..1df9ac93207f 100644
--- a/cppcanvas/source/inc/implrenderer.hxx
+++ b/cppcanvas/source/inc/implrenderer.hxx
@@ -192,7 +192,7 @@ namespace cppcanvas::internal
                                    const OUString&                rString,
                                    int                            nIndex,
                                    int                            nLength,
-                                   o3tl::span<const tools::Long>  pCharWidths,
+                                   o3tl::span<const sal_Int32>    pCharWidths,
                                    const ActionFactoryParameters& rParms,
                                    bool                           bSubsettable 
);
 
diff --git a/cppcanvas/source/mtfrenderer/implrenderer.cxx 
b/cppcanvas/source/mtfrenderer/implrenderer.cxx
index 3ea609e2530e..730fc11b1845 100644
--- a/cppcanvas/source/mtfrenderer/implrenderer.cxx
+++ b/cppcanvas/source/mtfrenderer/implrenderer.cxx
@@ -847,7 +847,7 @@ namespace cppcanvas::internal
                                              const OUString&                
rString,
                                              int                            
nIndex,
                                              int                            
nLength,
-                                             o3tl::span<const ::tools::Long> 
pCharWidths,
+                                             o3tl::span<const sal_Int32>    
pCharWidths,
                                              const ActionFactoryParameters& 
rParms,
                                              bool                           
bSubsettableActions )
         {
@@ -985,7 +985,7 @@ namespace cppcanvas::internal
                 {
                     ::tools::Long nInterval = ( nWidth - nStrikeoutWidth * 
nLen ) / nLen;
                     nStrikeoutWidth += nInterval;
-                    std::vector<::tools::Long> aStrikeoutCharWidths(nLen);
+                    std::vector<sal_Int32> aStrikeoutCharWidths(nLen);
 
                     for ( int i = 0;i<nLen; i++)
                     {
@@ -2557,7 +2557,7 @@ namespace cppcanvas::internal
                         // generating a DX array, and uniformly
                         // distributing the excess/insufficient width
                         // to every logical character.
-                        std::vector<::tools::Long> aDXArray;
+                        std::vector<sal_Int32> aDXArray;
 
                         rVDev.GetTextArray( pAct->GetText(), &aDXArray,
                                             pAct->GetIndex(), pAct->GetLen() );
@@ -2565,7 +2565,7 @@ namespace cppcanvas::internal
                         const sal_Int32 nWidthDifference( pAct->GetWidth() - 
aDXArray[ nLen-1 ] );
 
                         // Last entry of pDXArray contains total width of the 
text
-                        ::tools::Long* p = aDXArray.data();
+                        sal_Int32* p = aDXArray.data();
                         for (sal_Int32 i = 1; i <= nLen; ++i)
                         {
                             // calc ratio for every array entry, to
@@ -2574,7 +2574,7 @@ namespace cppcanvas::internal
                             // entry represents the 'end' position of
                             // the corresponding character, thus, we
                             // let i run from 1 to nLen.
-                            *p++ += 
static_cast<::tools::Long>(i)*nWidthDifference/nLen;
+                            *p++ += i * nWidthDifference / nLen;
                         }
 
                         createTextAction(
diff --git a/cppcanvas/source/mtfrenderer/textaction.cxx 
b/cppcanvas/source/mtfrenderer/textaction.cxx
index 735bcb685555..c63c92a5b851 100644
--- a/cppcanvas/source/mtfrenderer/textaction.cxx
+++ b/cppcanvas/source/mtfrenderer/textaction.cxx
@@ -157,7 +157,7 @@ namespace cppcanvas::internal
                 rLayoutWidth = *(std::max_element(rOffsets.begin(), 
rOffsets.end()));
             }
 
-            uno::Sequence< double > setupDXArray( o3tl::span<const 
::tools::Long> rCharWidths,
+            uno::Sequence< double > setupDXArray( o3tl::span<const sal_Int32> 
rCharWidths,
                                                   sal_Int32          nLen,
                                                   const OutDevState& rState )
             {
@@ -169,7 +169,7 @@ namespace cppcanvas::internal
                 // array, by circumventing integer-based
                 // OutDev-mapping
                 const double nScale( rState.mapModeTransform.get(0,0) );
-                ::tools::Long const * pCharWidths = rCharWidths.data();
+                sal_Int32 const * pCharWidths = rCharWidths.data();
                 for( int i = 0; i < nLen; ++i )
                 {
                     // TODO(F2): use correct scale direction
@@ -187,7 +187,7 @@ namespace cppcanvas::internal
             {
                 // no external DX array given, create one from given
                 // string
-                std::vector<::tools::Long> aCharWidths;
+                std::vector<sal_Int32> aCharWidths;
 
                 rVDev.GetTextArray( rText, &aCharWidths, nStartPos, nLen );
 
@@ -1966,7 +1966,7 @@ namespace cppcanvas::internal
                                            const OUString&                  
rText,
                                            sal_Int32                        
nStartPos,
                                            sal_Int32                        
nLen,
-                                           o3tl::span<const ::tools::Long>  
pDXArray,
+                                           o3tl::span<const sal_Int32>      
pDXArray,
                                            VirtualDevice&                   
rVDev,
                                            const CanvasSharedPtr&           
rCanvas,
                                            const OutDevState&               
rState,
@@ -2096,7 +2096,7 @@ namespace cppcanvas::internal
                                                              const OUString&   
             rText,
                                                              sal_Int32         
             nStartPos,
                                                              sal_Int32         
             nLen,
-                                                             o3tl::span<const 
::tools::Long> pDXArray,
+                                                             o3tl::span<const 
sal_Int32>    pDXArray,
                                                              VirtualDevice&    
             rVDev,
                                                              const 
CanvasSharedPtr&         rCanvas,
                                                              const 
OutDevState&             rState,
diff --git a/cppcanvas/source/mtfrenderer/textaction.hxx 
b/cppcanvas/source/mtfrenderer/textaction.hxx
index 4cbdd46284bf..279f810f8efb 100644
--- a/cppcanvas/source/mtfrenderer/textaction.hxx
+++ b/cppcanvas/source/mtfrenderer/textaction.hxx
@@ -67,7 +67,7 @@ namespace cppcanvas::internal
                                                      const OUString&           
     rText,
                                                      sal_Int32                 
     nStartPos,
                                                      sal_Int32                 
     nLen,
-                                                     o3tl::span<const 
::tools::Long> pDXArray,
+                                                     o3tl::span<const 
sal_Int32>    pDXArray,
                                                      VirtualDevice&            
     rVDev,
                                                      const CanvasSharedPtr&    
     rCanvas,
                                                      const OutDevState&        
     rState,
diff --git a/drawinglayer/source/primitive2d/textlayoutdevice.cxx 
b/drawinglayer/source/primitive2d/textlayoutdevice.cxx
index 11e903027122..3dfd0258f099 100644
--- a/drawinglayer/source/primitive2d/textlayoutdevice.cxx
+++ b/drawinglayer/source/primitive2d/textlayoutdevice.cxx
@@ -231,7 +231,7 @@ void 
TextLayouterDevice::getTextOutlines(basegfx::B2DPolyPolygonVector& rB2DPoly
     {
         OSL_ENSURE(nDXArrayCount == nTextLength,
                    "DXArray size does not correspond to text portion size 
(!)");
-        std::vector<tools::Long> aIntegerDXArray(nDXArrayCount);
+        std::vector<sal_Int32> aIntegerDXArray(nDXArrayCount);
 
         for (sal_uInt32 a(0); a < nDXArrayCount; a++)
         {
@@ -308,7 +308,7 @@ std::vector<double> TextLayouterDevice::getTextArray(const 
OUString& rText, sal_
     if (nTextLength)
     {
         aRetval.reserve(nTextLength);
-        std::vector<tools::Long> aArray(nTextLength);
+        std::vector<sal_Int32> aArray(nTextLength);
         mrDevice.GetTextArray(rText, &aArray, nIndex, nLength);
         aRetval.assign(aArray.begin(), aArray.end());
     }
diff --git a/drawinglayer/source/processor2d/vclprocessor2d.cxx 
b/drawinglayer/source/processor2d/vclprocessor2d.cxx
index 034e82e1f50e..796a9dbe8b75 100644
--- a/drawinglayer/source/processor2d/vclprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclprocessor2d.cxx
@@ -248,7 +248,7 @@ void 
VclProcessor2D::RenderTextSimpleOrDecoratedPortionPrimitive2D(
             }
 
             // create transformed integer DXArray in view coordinate system
-            std::vector<tools::Long> aTransformedDXArray;
+            std::vector<sal_Int32> aTransformedDXArray;
 
             if (!rTextCandidate.getDXArray().empty())
             {
diff --git a/drawinglayer/source/tools/wmfemfhelper.cxx 
b/drawinglayer/source/tools/wmfemfhelper.cxx
index 78b178355fbd..f9cfbc60cbd3 100644
--- a/drawinglayer/source/tools/wmfemfhelper.cxx
+++ b/drawinglayer/source/tools/wmfemfhelper.cxx
@@ -1828,7 +1828,7 @@ namespace wmfemfhelper
                     {
                         // prepare DXArray (if used)
                         std::vector< double > aDXArray;
-                        const std::vector<tools::Long> & rDXArray = 
pA->GetDXArray();
+                        const std::vector<sal_Int32> & rDXArray = 
pA->GetDXArray();
 
                         if(!rDXArray.empty())
                         {
diff --git a/editeng/inc/editdoc.hxx b/editeng/inc/editdoc.hxx
index 7d9af8e7d616..4fdff5b2a378 100644
--- a/editeng/inc/editdoc.hxx
+++ b/editeng/inc/editdoc.hxx
@@ -362,14 +362,14 @@ struct ExtraPortionInfo
     bool    bFirstCharIsRightPunktuation;
     bool    bCompressed;
 
-    std::unique_ptr<tools::Long[]> pOrgDXArray;
+    std::unique_ptr<sal_Int32[]> pOrgDXArray;
     std::vector< sal_Int32 > lineBreaksList;
 
 
             ExtraPortionInfo();
             ~ExtraPortionInfo();
 
-    void    SaveOrgDXArray( const tools::Long* pDXArray, sal_Int32 nLen );
+    void    SaveOrgDXArray( const sal_Int32* pDXArray, sal_Int32 nLen );
 };
 
 
@@ -460,12 +460,12 @@ class ParaPortion;
 class EditLine
 {
 public:
-    typedef std::vector<tools::Long> CharPosArrayType;
+    typedef std::vector<sal_Int32> CharPosArrayType;
 
 private:
     CharPosArrayType aPositions;
-    tools::Long            nTxtWidth;
-    tools::Long            nStartPosX;
+    sal_Int32          nTxtWidth;
+    sal_Int32          nStartPosX;
     sal_Int32          nStart;     // could be replaced by nStartPortion
     sal_Int32          nEnd;       // could be replaced by nEndPortion
     sal_Int32          nStartPortion;
@@ -505,8 +505,8 @@ public:
     sal_uInt16      GetHeight() const               { return nHeight; }
     sal_uInt16      GetTxtHeight() const            { return nTxtHeight; }
 
-    void            SetTextWidth( tools::Long n )          { nTxtWidth = n; }
-    tools::Long            GetTextWidth() const            { return nTxtWidth; 
}
+    void            SetTextWidth( sal_Int32 n )          { nTxtWidth = n; }
+    sal_Int32       GetTextWidth() const            { return nTxtWidth; }
 
     void            SetMaxAscent( sal_uInt16 n )        { nMaxAscent = n; }
     sal_uInt16      GetMaxAscent() const            { return nMaxAscent; }
@@ -516,8 +516,8 @@ public:
 
     sal_Int32       GetLen() const                  { return nEnd - nStart; }
 
-    tools::Long            GetStartPosX() const            { return 
nStartPosX; }
-    void            SetStartPosX( tools::Long start );
+    sal_Int32       GetStartPosX() const            { return nStartPosX; }
+    void            SetStartPosX( sal_Int32 start );
     Size            CalcTextSize( ParaPortion& rParaPortion );
 
     bool            IsInvalid() const               { return bInvalid; }
diff --git a/editeng/source/editeng/editdoc.cxx 
b/editeng/source/editeng/editdoc.cxx
index 4539b3cd44dc..f2fef724e696 100644
--- a/editeng/source/editeng/editdoc.cxx
+++ b/editeng/source/editeng/editdoc.cxx
@@ -490,12 +490,12 @@ ExtraPortionInfo::~ExtraPortionInfo()
 {
 }
 
-void ExtraPortionInfo::SaveOrgDXArray( const tools::Long* pDXArray, sal_Int32 
nLen )
+void ExtraPortionInfo::SaveOrgDXArray( const sal_Int32* pDXArray, sal_Int32 
nLen )
 {
     if (pDXArray)
     {
-        pOrgDXArray.reset(new tools::Long[nLen]);
-        memcpy( pOrgDXArray.get(), pDXArray, nLen * sizeof(tools::Long) );
+        pOrgDXArray.reset(new sal_Int32[nLen]);
+        memcpy( pOrgDXArray.get(), pDXArray, nLen * sizeof(sal_Int32) );
     }
     else
         pOrgDXArray.reset();
@@ -979,7 +979,7 @@ void EditLine::SetHeight( sal_uInt16 nH, sal_uInt16 nTxtH )
     nTxtHeight = ( nTxtH ? nTxtH : nH );
 }
 
-void EditLine::SetStartPosX( tools::Long start )
+void EditLine::SetStartPosX( sal_Int32 start )
 {
     if (start > 0)
         nStartPosX = start;
diff --git a/editeng/source/editeng/editeng.cxx 
b/editeng/source/editeng/editeng.cxx
index 5301de9513e0..ae30e651b594 100644
--- a/editeng/source/editeng/editeng.cxx
+++ b/editeng/source/editeng/editeng.cxx
@@ -2464,7 +2464,7 @@ css::uno::Reference< css::datatransfer::XTransferable >
 // ======================    Virtual Methods    ========================
 
 void EditEngine::DrawingText( const Point&, const OUString&, sal_Int32, 
sal_Int32,
-                              o3tl::span<const tools::Long>, const SvxFont&, 
sal_Int32 /*nPara*/, sal_uInt8 /*nRightToLeft*/,
+                              o3tl::span<const sal_Int32>, const SvxFont&, 
sal_Int32 /*nPara*/, sal_uInt8 /*nRightToLeft*/,
                               const EEngineData::WrongSpellVector*, const 
SvxFieldData*, bool, bool,
                               const css::lang::Locale*, const Color&, const 
Color&)
 
diff --git a/editeng/source/editeng/impedit.hxx 
b/editeng/source/editeng/impedit.hxx
index c93a8a78f746..7e22687aba7c 100644
--- a/editeng/source/editeng/impedit.hxx
+++ b/editeng/source/editeng/impedit.hxx
@@ -706,7 +706,7 @@ private:
     bool                HasScriptType( sal_Int32 nPara, sal_uInt16 nType ) 
const;
 
     bool                ImplCalcAsianCompression( ContentNode* pNode, 
TextPortion* pTextPortion, sal_Int32 nStartPos,
-                                                  tools::Long* pDXArray, 
sal_uInt16 n100thPercentFromMax, bool bManipulateDXArray );
+                                                sal_Int32* pDXArray, 
sal_uInt16 n100thPercentFromMax, bool bManipulateDXArray );
     void                ImplExpandCompressedPortions( EditLine* pLine, 
ParaPortion* pParaPortion, tools::Long nRemainingWidth );
 
     void                ImplInitLayoutMode(OutputDevice& rOutDev, sal_Int32 
nPara, sal_Int32 nIndex);
diff --git a/editeng/source/editeng/impedit2.cxx 
b/editeng/source/editeng/impedit2.cxx
index c54405b3c30f..3eacc677e00a 100644
--- a/editeng/source/editeng/impedit2.cxx
+++ b/editeng/source/editeng/impedit2.cxx
@@ -4197,7 +4197,7 @@ tools::Long ImpEditEngine::GetXPos(
                         if ( nType == AsianCompressionFlags::PunctuationRight 
&& !pLine->GetCharPosArray().empty() )
                         {
                             sal_Int32 n = nIndex - nTextPortionStart;
-                            const tools::Long* pDXArray = 
pLine->GetCharPosArray().data()+( nTextPortionStart-pLine->GetStart() );
+                            const sal_Int32* pDXArray = 
pLine->GetCharPosArray().data()+( nTextPortionStart-pLine->GetStart() );
                             sal_Int32 nCharWidth = ( ( (n+1) < 
rPortion.GetLen() ) ? pDXArray[n] : rPortion.GetSize().Width() )
                                                             - ( n ? 
pDXArray[n-1] : 0 );
                             if ( (n+1) < rPortion.GetLen() )
diff --git a/editeng/source/editeng/impedit3.cxx 
b/editeng/source/editeng/impedit3.cxx
index 98736f11cb85..59d0d4d583c1 100644
--- a/editeng/source/editeng/impedit3.cxx
+++ b/editeng/source/editeng/impedit3.cxx
@@ -156,7 +156,7 @@ static void lcl_DrawRedLines( OutputDevice& rOutDev,
                               const Point& rPoint,
                               size_t nIndex,
                               size_t nMaxEnd,
-                              o3tl::span<const tools::Long> pDXArray,
+                              o3tl::span<const sal_Int32> pDXArray,
                               WrongList const * pWrongs,
                               Degree10 nOrientation,
                               const Point& rOrigin,
@@ -753,7 +753,7 @@ bool ImpEditEngine::CreateLines( sal_Int32 nPara, 
sal_uInt32 nStartPosY )
 
     ImplInitLayoutMode(*GetRefDevice(), nPara, nIndex);
 
-    std::vector<tools::Long> aBuf( pNode->Len() );
+    std::vector<sal_Int32> aBuf( pNode->Len() );
 
     bool bSameLineAgain = false;    // For TextRanger, if the height changes.
     TabInfo aCurrentTab;
@@ -1040,7 +1040,7 @@ bool ImpEditEngine::CreateLines( sal_Int32 nPara, 
sal_uInt32 nStartPosY )
 
                         OUString aFieldValue = static_cast<const 
EditCharAttribField*>(pNextFeature)->GetFieldValue();
                         // get size, but also DXArray to allow length 
information in line breaking below
-                        std::vector<tools::Long> aTmpDXArray;
+                        std::vector<sal_Int32> aTmpDXArray;
                         pPortion->GetSize() = 
aTmpFont.QuickGetTextSize(GetRefDevice(), aFieldValue, 0, 
aFieldValue.getLength(), &aTmpDXArray);
 
                         // So no scrolling for oversized fields
@@ -1171,7 +1171,7 @@ bool ImpEditEngine::CreateLines( sal_Int32 nPara, 
sal_uInt32 nStartPosY )
                 // And now check for Compression:
                 if ( !bContinueLastPortion && nPortionLen && 
GetAsianCompressionMode() != CharCompressType::NONE )
                 {
-                    tools::Long* pDXArray = rArray.data() + nTmpPos - 
pLine->GetStart();
+                    sal_Int32* pDXArray = rArray.data() + nTmpPos - 
pLine->GetStart();
                     bCompressedChars |= ImplCalcAsianCompression(
                         pNode, pPortion, nTmpPos, pDXArray, 10000, false);
                 }
@@ -1344,7 +1344,7 @@ 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...
-                tools::Long* pDXArray = pLine->GetCharPosArray().data() + 
(nPortionStart - pLine->GetStart());
+                sal_Int32* pDXArray = pLine->GetCharPosArray().data() + 
(nPortionStart - pLine->GetStart());
                 ImplCalcAsianCompression(
                     pNode, pPortion, nPortionStart, pDXArray, 10000, true);
             }
@@ -3258,8 +3258,8 @@ void ImpEditEngine::Paint( OutputDevice& rOutDev, 
tools::Rectangle aClipRect, Po
                                 OUString aText;
                                 sal_Int32 nTextStart = 0;
                                 sal_Int32 nTextLen = 0;
-                                o3tl::span<const tools::Long> pDXArray;
-                                std::vector<tools::Long> aTmpDXArray;
+                                o3tl::span<const sal_Int32> pDXArray;
+                                std::vector<sal_Int32> aTmpDXArray;
 
                                 if ( rTextPortion.GetKind() == 
PortionKind::TEXT )
                                 {
@@ -4419,7 +4419,7 @@ Color ImpEditEngine::GetAutoColor() const
 
 bool ImpEditEngine::ImplCalcAsianCompression(ContentNode* pNode,
                                              TextPortion* pTextPortion, 
sal_Int32 nStartPos,
-                                             tools::Long* pDXArray, sal_uInt16 
n100thPercentFromMax,
+                                             sal_Int32* pDXArray, sal_uInt16 
n100thPercentFromMax,
                                              bool bManipulateDXArray)
 {
     DBG_ASSERT( GetAsianCompressionMode() != CharCompressType::NONE, 
"ImplCalcAsianCompression - Why?" );
@@ -4587,7 +4587,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!!!" );
-            tools::Long* pDXArray = pLine->GetCharPosArray().data() + 
(nTxtPortionStart - pLine->GetStart());
+            sal_Int32* pDXArray = pLine->GetCharPosArray().data() + 
(nTxtPortionStart - pLine->GetStart());
             if ( pTP->GetExtraInfos()->pOrgDXArray )
                 memcpy( pDXArray, pTP->GetExtraInfos()->pOrgDXArray.get(), 
(pTP->GetLen()-1)*sizeof(sal_Int32) );
             ImplCalcAsianCompression( pParaPortion->GetNode(), pTP, 
nTxtPortionStart, pDXArray, static_cast<sal_uInt16>(nCompressPercent), true );
diff --git a/editeng/source/items/svxfont.cxx b/editeng/source/items/svxfont.cxx
index e5b6a6df4fbf..d4370e9b00de 100644
--- a/editeng/source/items/svxfont.cxx
+++ b/editeng/source/items/svxfont.cxx
@@ -452,7 +452,7 @@ Size SvxFont::GetPhysTxtSize( const OutputDevice *pOut )
 }
 
 Size SvxFont::QuickGetTextSize( const OutputDevice *pOut, const OUString &rTxt,
-                         const sal_Int32 nIdx, const sal_Int32 nLen, 
std::vector<tools::Long>* pDXArray ) const
+                         const sal_Int32 nIdx, const sal_Int32 nLen, 
std::vector<sal_Int32>* pDXArray ) const
 {
     if ( !IsCaseMap() && !IsKern() )
         return Size( pOut->GetTextArray( rTxt, pDXArray, nIdx, nLen ),
@@ -500,7 +500,7 @@ Size SvxFont::GetTextSize(const OutputDevice& rOut, const 
OUString &rTxt,
 
 void SvxFont::QuickDrawText( OutputDevice *pOut,
     const Point &rPos, const OUString &rTxt,
-    const sal_Int32 nIdx, const sal_Int32 nLen, o3tl::span<const tools::Long> 
pDXArray ) const
+    const sal_Int32 nIdx, const sal_Int32 nLen, o3tl::span<const sal_Int32> 
pDXArray ) const
 {
 
     // Font has to be selected in OutputDevice...
diff --git a/editeng/source/outliner/outleeng.cxx 
b/editeng/source/outliner/outleeng.cxx
index ed0099d2ac1a..e4fc414ad8e3 100644
--- a/editeng/source/outliner/outleeng.cxx
+++ b/editeng/source/outliner/outleeng.cxx
@@ -141,7 +141,7 @@ OUString OutlinerEditEng::GetUndoComment( sal_uInt16 
nUndoId ) const
 }
 
 void OutlinerEditEng::DrawingText( const Point& rStartPos, const OUString& 
rText, sal_Int32 nTextStart, sal_Int32 nTextLen,
-                                   o3tl::span<const tools::Long> pDXArray, 
const SvxFont& rFont, sal_Int32 nPara, sal_uInt8 nRightToLeft,
+                                   o3tl::span<const sal_Int32> pDXArray, const 
SvxFont& rFont, sal_Int32 nPara, sal_uInt8 nRightToLeft,
                                    const EEngineData::WrongSpellVector* 
pWrongSpellVector,
                                    const SvxFieldData* pFieldData,
                                    bool bEndOfLine,
diff --git a/editeng/source/outliner/outleeng.hxx 
b/editeng/source/outliner/outleeng.hxx
index ecc14d61a75c..963e74582ec0 100644
--- a/editeng/source/outliner/outleeng.hxx
+++ b/editeng/source/outliner/outleeng.hxx
@@ -44,7 +44,7 @@ public:
     virtual void        ParagraphConnected( sal_Int32 nLeftParagraph, 
sal_Int32 nRightParagraph ) override;
 
     virtual void DrawingText( const Point& rStartPos, const OUString& rText, 
sal_Int32 nTextStart,
-                              sal_Int32 nTextLen, o3tl::span<const 
tools::Long> pDXArray, const SvxFont& rFont,
+                              sal_Int32 nTextLen, o3tl::span<const sal_Int32> 
pDXArray, const SvxFont& rFont,
                               sal_Int32 nPara, sal_uInt8 nRightToLeft,
                               const EEngineData::WrongSpellVector* 
pWrongSpellVector,
                               const SvxFieldData* pFieldData,
diff --git a/editeng/source/outliner/outliner.cxx 
b/editeng/source/outliner/outliner.cxx
index 48d02130135a..c5ee16f7760c 100644
--- a/editeng/source/outliner/outliner.cxx
+++ b/editeng/source/outliner/outliner.cxx
@@ -967,7 +967,7 @@ void Outliner::PaintBullet(sal_Int32 nPara, const Point& 
rStartPos, const Point&
             if(bStrippingPortions)
             {
                 const vcl::Font& aSvxFont(rOutDev.GetFont());
-                std::vector<tools::Long> aBuf;
+                std::vector<sal_Int32> aBuf;
                 rOutDev.GetTextArray( pPara->GetText(), &aBuf );
 
                 if(bSymbol)
@@ -1653,7 +1653,7 @@ void Outliner::StripPortions()
 }
 
 void Outliner::DrawingText( const Point& rStartPos, const OUString& rText, 
sal_Int32 nTextStart,
-                            sal_Int32 nTextLen, o3tl::span<const tools::Long> 
pDXArray,const SvxFont& rFont,
+                            sal_Int32 nTextLen, o3tl::span<const sal_Int32> 
pDXArray,const SvxFont& rFont,
                             sal_Int32 nPara, sal_uInt8 nRightToLeft,
                             const EEngineData::WrongSpellVector* 
pWrongSpellVector,
                             const SvxFieldData* pFieldData,
diff --git a/emfio/inc/mtftools.hxx b/emfio/inc/mtftools.hxx
index a9de54706f6d..3bae0285a9bc 100644
--- a/emfio/inc/mtftools.hxx
+++ b/emfio/inc/mtftools.hxx
@@ -675,7 +675,7 @@ namespace emfio
         );
         void                DrawText(Point& rPosition,
             OUString const & rString,
-            std::vector<tools::Long>* pDXArry = nullptr,
+            std::vector<sal_Int32>* pDXArry = nullptr,
             tools::Long* pDYArry = nullptr,
             bool bRecordPath = false,
             sal_Int32 nGraphicsMode = GM_COMPATIBLE);
diff --git a/emfio/source/reader/emfreader.cxx 
b/emfio/source/reader/emfreader.cxx
index ff258182595f..632dca430a98 100644
--- a/emfio/source/reader/emfreader.cxx
+++ b/emfio/source/reader/emfreader.cxx
@@ -1939,7 +1939,7 @@ namespace emfio
                                 SAL_INFO("emfio", "\t\tText: " << aText);
                                 SAL_INFO("emfio", "\t\tDxBuffer:");
 
-                                std::vector<tools::Long> aDXAry;
+                                std::vector<sal_Int32> aDXAry;
                                 std::unique_ptr<tools::Long[]> pDYAry;
 
                                 sal_Int32 nDxSize;
diff --git a/emfio/source/reader/mtftools.cxx b/emfio/source/reader/mtftools.cxx
index d43a62e665e1..0d62f4f9a373 100644
--- a/emfio/source/reader/mtftools.cxx
+++ b/emfio/source/reader/mtftools.cxx
@@ -1677,7 +1677,7 @@ namespace emfio
         }
     }
 
-    void MtfTools::DrawText( Point& rPosition, OUString const & rText, 
std::vector<tools::Long>* pDXArry, tools::Long* pDYArry, bool bRecordPath, 
sal_Int32 nGfxMode )
+    void MtfTools::DrawText( Point& rPosition, OUString const & rText, 
std::vector<sal_Int32>* pDXArry, tools::Long* pDYArry, bool bRecordPath, 
sal_Int32 nGfxMode )
     {
         UpdateClipRegion();
         rPosition = ImplMap( rPosition );
@@ -1861,15 +1861,15 @@ namespace emfio
                 {
                     Point aCharDisplacement( i ? (*pDXArry)[i-1] : 0, i ? 
pDYArry[i-1] : 0 );
                     Point().RotateAround(aCharDisplacement, 
maFont.GetOrientation());
-                    mpGDIMetaFile->AddAction( new MetaTextArrayAction( 
rPosition + aCharDisplacement, OUString( rText[i] ), o3tl::span<const 
tools::Long>{}, 0, 1 ) );
+                    mpGDIMetaFile->AddAction( new MetaTextArrayAction( 
rPosition + aCharDisplacement, OUString( rText[i] ), o3tl::span<const 
sal_Int32>{}, 0, 1 ) );
                 }
             }
             else
             {
                 /* because text without dx array is badly scaled, we
                    will create such an array if necessary */
-                o3tl::span<const tools::Long> pDX;
-                std::vector<tools::Long> aMyDXArray;
+                o3tl::span<const sal_Int32> pDX;
+                std::vector<sal_Int32> aMyDXArray;
                 if (pDXArry)
                 {
                     pDX = { pDXArry->data(), pDXArry->size() };
diff --git a/emfio/source/reader/wmfreader.cxx 
b/emfio/source/reader/wmfreader.cxx
index 9a04cdeb9823..41f7564c1295 100644
--- a/emfio/source/reader/wmfreader.cxx
+++ b/emfio/source/reader/wmfreader.cxx
@@ -721,7 +721,7 @@ namespace emfio
                             IntersectClipRect( aRect );
                         }
                         SAL_INFO( "emfio", "\t\t\t Text : " << aText );
-                        std::vector<tools::Long> aDXAry;
+                        std::vector<sal_Int32> aDXAry;
                         std::unique_ptr<tools::Long[]> pDYAry;
                         auto nDxArySize =  nMaxStreamPos - 
mpInputStream->Tell();
                         auto nDxAryEntries = nDxArySize >> 1;
@@ -1257,7 +1257,7 @@ namespace emfio
                                                 {
                                                     Point  aPt;
                                                     sal_uInt32  nStringLen, 
nDXCount;
-                                                    std::vector<tools::Long> 
aDXAry;
+                                                    std::vector<sal_Int32> 
aDXAry;
                                                     SvMemoryStream 
aMemoryStream( nEscLen );
                                                     
aMemoryStream.WriteBytes(pData.get(), nEscLen);
                                                     aMemoryStream.Seek( 
STREAM_SEEK_TO_BEGIN );
diff --git a/filter/source/svg/svgwriter.cxx b/filter/source/svg/svgwriter.cxx
index a2eb3eccf065..c8295a790a38 100644
--- a/filter/source/svg/svgwriter.cxx
+++ b/filter/source/svg/svgwriter.cxx
@@ -2536,7 +2536,7 @@ void SVGActionWriter::ImplWriteMask(GDIMetaFile& rMtf, 
const Point& rDestPt, con
 
 
 void SVGActionWriter::ImplWriteText( const Point& rPos, const OUString& rText,
-                                     o3tl::span<const tools::Long> pDXArray, 
tools::Long nWidth )
+                                     o3tl::span<const sal_Int32> pDXArray, 
tools::Long nWidth )
 {
     const FontMetric aMetric( mpVDev->GetFontMetric() );
 
@@ -2627,7 +2627,7 @@ void SVGActionWriter::ImplWriteText( const Point& rPos, 
const OUString& rText,
 
 
 void SVGActionWriter::ImplWriteText( const Point& rPos, const OUString& rText,
-                                     o3tl::span<const tools::Long> pDXArray, 
tools::Long nWidth,
+                                     o3tl::span<const sal_Int32> pDXArray, 
tools::Long nWidth,
                                      Color aTextColor )
 {
     sal_Int32                               nLen = rText.getLength();
@@ -2644,18 +2644,18 @@ void SVGActionWriter::ImplWriteText( const Point& rPos, 
const OUString& rText,
 
     ImplMap( rPos, aPos );
 
-    std::vector<tools::Long> aTmpArray(nLen);
+    std::vector<sal_Int32> aTmpArray(nLen);
     // get text sizes
     if( !pDXArray.empty() )
     {
         aNormSize = Size( mpVDev->GetTextWidth( rText ), 0 );
-        memcpy(aTmpArray.data(), pDXArray.data(), nLen * sizeof(tools::Long));
+        memcpy(aTmpArray.data(), pDXArray.data(), nLen * sizeof(sal_Int32));
     }
     else
     {
         aNormSize = Size( mpVDev->GetTextArray( rText, &aTmpArray ), 0 );
     }
-    tools::Long* pDX = aTmpArray.data();
+    sal_Int32* pDX = aTmpArray.data();
 
     // 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 81c71e5cd149..2e3d777cbf39 100644
--- a/filter/source/svg/svgwriter.hxx
+++ b/filter/source/svg/svgwriter.hxx
@@ -345,8 +345,8 @@ private:
     static Color            ImplGetColorWithIntensity( const Color& rColor, 
sal_uInt16 nIntensity );
     static 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, o3tl::span<const tools::Long> pDXArray, tools::Long nWidth );
-    void                    ImplWriteText( const Point& rPos, const OUString& 
rText, o3tl::span<const tools::Long> pDXArray, tools::Long nWidth, Color 
aTextColor );
+    void                    ImplWriteText( const Point& rPos, const OUString& 
rText, o3tl::span<const sal_Int32> pDXArray, tools::Long nWidth );
+    void                    ImplWriteText( const Point& rPos, const OUString& 
rText, o3tl::span<const sal_Int32> pDXArray, tools::Long nWidth, Color 
aTextColor );
     void                    ImplWriteBmp( const BitmapEx& rBmpEx, const Point& 
rPt, const Size& rSz, const Point& rSrcPt, const Size& rSrcSz, const 
css::uno::Reference<css::drawing::XShape>* pShape);
 
     void                    ImplWriteActions( const GDIMetaFile& rMtf,
diff --git a/include/editeng/editeng.hxx b/include/editeng/editeng.hxx
index 3006e178783c..fb109d7baa53 100644
--- a/include/editeng/editeng.hxx
+++ b/include/editeng/editeng.hxx
@@ -498,7 +498,7 @@ public:
 
     virtual void DrawingText( const Point& rStartPos, const OUString& rText,
                               sal_Int32 nTextStart, sal_Int32 nTextLen,
-                              o3tl::span<const tools::Long> pDXArray, const 
SvxFont& rFont,
+                              o3tl::span<const sal_Int32> pDXArray, const 
SvxFont& rFont,
                               sal_Int32 nPara, sal_uInt8 nRightToLeft,
                               const EEngineData::WrongSpellVector* 
pWrongSpellVector,
                               const SvxFieldData* pFieldData,
diff --git a/include/editeng/outliner.hxx b/include/editeng/outliner.hxx
index 98fc4ff41667..5a2d561ae8d3 100644
--- a/include/editeng/outliner.hxx
+++ b/include/editeng/outliner.hxx
@@ -395,7 +395,7 @@ public:
     sal_Int32           mnTextLen;
     sal_Int32           mnPara;
     const SvxFont&      mrFont;
-    o3tl::span<const tools::Long> mpDXArray;
+    o3tl::span<const sal_Int32> mpDXArray;
 
     const EEngineData::WrongSpellVector*  mpWrongSpellVector;
     const SvxFieldData* mpFieldData;
@@ -421,7 +421,7 @@ public:
         sal_Int32 nTxtLen,
         const SvxFont& rFnt,
         sal_Int32 nPar,
-        o3tl::span<const tools::Long> pDXArr,
+        o3tl::span<const sal_Int32> pDXArr,
         const EEngineData::WrongSpellVector* pWrongSpellVector,
         const SvxFieldData* pFieldData,
         const css::lang::Locale* pLocale,
@@ -813,7 +813,7 @@ public:
 
     void DrawingText( const Point& rStartPos, const OUString& rText,
                               sal_Int32 nTextStart, sal_Int32 nTextLen,
-                              o3tl::span<const tools::Long> pDXArray, const 
SvxFont& rFont,
+                              o3tl::span<const sal_Int32> pDXArray, const 
SvxFont& rFont,
                               sal_Int32 nPara, sal_uInt8 nRightToLeft,
                               const EEngineData::WrongSpellVector* 
pWrongSpellVector,
                               const SvxFieldData* pFieldData,
diff --git a/include/editeng/svxfont.hxx b/include/editeng/svxfont.hxx
index eabffc4f6301..dffc4101e009 100644
--- a/include/editeng/svxfont.hxx
+++ b/include/editeng/svxfont.hxx
@@ -96,10 +96,10 @@ 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, o3tl::span<const tools::Long> pDXArray = {} ) const;
+                        const sal_Int32 nIdx = 0, const sal_Int32 nLen = 
SAL_MAX_INT32, o3tl::span<const sal_Int32> pDXArray = {} ) const;
 
     Size QuickGetTextSize( const OutputDevice *pOut, const OUString &rTxt,
-                         const sal_Int32 nIdx, const sal_Int32 nLen, 
std::vector<tools::Long>* pDXArray = nullptr ) const;
+                         const sal_Int32 nIdx, const sal_Int32 nLen, 
std::vector<sal_Int32>* pDXArray = nullptr ) const;
 
     void DrawPrev( OutputDevice* pOut, Printer* pPrinter,
                    const Point &rPos, const OUString &rTxt,
diff --git a/include/vcl/devicecoordinate.hxx b/include/vcl/devicecoordinate.hxx
index 0d5eeb6aeb28..acece32cc204 100644
--- a/include/vcl/devicecoordinate.hxx
+++ b/include/vcl/devicecoordinate.hxx
@@ -20,7 +20,7 @@ typedef double DeviceCoordinate;
 #else /* !VCL_FLOAT_DEVICE_PIXEL */
 
 #include <basegfx/point/b2ipoint.hxx>
-typedef tools::Long DeviceCoordinate;
+typedef sal_Int32 DeviceCoordinate;
 
 #endif /* ! Carpet Cushion */
 
diff --git a/include/vcl/metaact.hxx b/include/vcl/metaact.hxx
index 43251d0facc2..3ac267aae3fc 100644
--- a/include/vcl/metaact.hxx
+++ b/include/vcl/metaact.hxx
@@ -506,7 +506,7 @@ private:
 
     Point       maStartPt;
     OUString    maStr;
-    std::vector<::tools::Long> maDXAry;
+    std::vector<sal_Int32> maDXAry;
     sal_Int32   mnIndex;
     sal_Int32   mnLen;
 
@@ -516,10 +516,10 @@ public:
                         MetaTextArrayAction();
                         MetaTextArrayAction( const MetaTextArrayAction& 
rAction );
     MetaTextArrayAction( const Point& rStartPt, const OUString& rStr,
-                         const std::vector<tools::Long>& rDXAry, sal_Int32 
nIndex,
+                         const std::vector<sal_Int32>& rDXAry, sal_Int32 
nIndex,
                          sal_Int32 nLen );
     MetaTextArrayAction( const Point& rStartPt, const OUString& rStr,
-                         o3tl::span<const tools::Long> pDXAry, sal_Int32 
nIndex,
+                         o3tl::span<const sal_Int32> pDXAry, sal_Int32 nIndex,
                          sal_Int32 nLen );
 
     virtual void        Execute( OutputDevice* pOut ) override;
@@ -533,12 +533,12 @@ public:
     const OUString& GetText() const { return maStr; }
     sal_Int32       GetIndex() const { return mnIndex; }
     sal_Int32       GetLen() const { return mnLen; }
-    const std::vector<tools::Long> & GetDXArray() const { return maDXAry; }
+    const std::vector<sal_Int32> & GetDXArray() const { return maDXAry; }
     void            SetPoint(const Point& rPt) { maStartPt = rPt; }
     void            SetText(const OUString& rStr) { maStr = rStr; }
     void            SetIndex(sal_Int32 rIndex) { mnIndex = rIndex; }
     void            SetLen(sal_Int32 rLen) { mnLen = rLen; }
-    void            SetDXArray(std::vector<tools::Long> aArray);
+    void            SetDXArray(std::vector<sal_Int32> aArray);
 };
 
 class SAL_DLLPUBLIC_RTTI MetaStretchTextAction final : public MetaAction
diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx
index 0075015dee28..900a4e88db80 100644
--- a/include/vcl/outdev.hxx
+++ b/include/vcl/outdev.hxx
@@ -970,7 +970,7 @@ public:
     */
     bool                        GetTextBoundRect( tools::Rectangle& rRect,
                                                   const OUString& rStr, 
sal_Int32 nBase = 0, sal_Int32 nIndex = 0, sal_Int32 nLen = -1,
-                                                  sal_uLong nLayoutWidth = 0, 
o3tl::span<const tools::Long> pDXArray = {},
+                                                  sal_uLong nLayoutWidth = 0, 
o3tl::span<const sal_Int32> pDXArray = {},
                                                   const SalLayoutGlyphs* 
pGlyphs = nullptr ) const;
 
     tools::Rectangle            ImplGetTextBoundRect( const SalLayout& ) const;
@@ -981,12 +981,12 @@ public:
     bool                        GetTextOutlines( PolyPolyVector&,
                                                  const OUString& rStr, 
sal_Int32 nBase = 0, sal_Int32 nIndex = 0,
                                                  sal_Int32 nLen = -1,
-                                                 sal_uLong nLayoutWidth = 0, 
o3tl::span<const tools::Long> pDXArray = {} ) const;
+                                                 sal_uLong nLayoutWidth = 0, 
o3tl::span<const sal_Int32> pDXArray = {} ) const;
 
     bool                        GetTextOutlines( basegfx::B2DPolyPolygonVector 
&rVector,
                                                  const OUString& rStr, 
sal_Int32 nBase, sal_Int32 nIndex = 0,
                                                  sal_Int32 nLen = -1,
-                                                 sal_uLong nLayoutWidth = 0, 
o3tl::span<const tools::Long> pDXArray = {} ) const;
+                                                 sal_uLong nLayoutWidth = 0, 
o3tl::span<const sal_Int32> pDXArray = {} ) const;
 
 
     OUString                    GetEllipsisString( const OUString& rStr, 
tools::Long nMaxWidth,
@@ -1051,12 +1051,12 @@ public:
     float                       approximate_digit_width() const;
 
     void                        DrawTextArray( const Point& rStartPt, const 
OUString& rStr,
-                                               o3tl::span<const tools::Long> 
pDXAry,
+                                               o3tl::span<const sal_Int32> 
pDXAry,
                                                sal_Int32 nIndex = 0,
                                                sal_Int32 nLen = -1,
                                                SalLayoutFlags flags = 
SalLayoutFlags::NONE,
                                                const SalLayoutGlyphs* 
pLayoutCache = nullptr);
-    tools::Long                        GetTextArray( const OUString& rStr, 
std::vector<tools::Long>* pDXAry,
+    tools::Long                        GetTextArray( const OUString& rStr, 
std::vector<sal_Int32>* pDXAry,
                                               sal_Int32 nIndex = 0, sal_Int32 
nLen = -1,
                                               vcl::text::TextLayoutCache 
const* = nullptr,
                                               SalLayoutGlyphs const*const 
pLayoutCache = nullptr) const;
@@ -1237,7 +1237,7 @@ public:
     std::unique_ptr<SalLayout>
                                 ImplLayout( const OUString&, sal_Int32 nIndex, 
sal_Int32 nLen,
                                             const Point& rLogicPos = 
Point(0,0), tools::Long nLogicWidth=0,
-                                            o3tl::span<const tools::Long> 
pLogicDXArray={}, SalLayoutFlags flags = SalLayoutFlags::NONE,
+                                            o3tl::span<const sal_Int32> 
pLogicDXArray={}, SalLayoutFlags flags = SalLayoutFlags::NONE,
                                             vcl::text::TextLayoutCache const* 
= nullptr,
                                             const SalLayoutGlyphs* pGlyphs = 
nullptr) const;
     SAL_DLLPRIVATE vcl::text::ImplLayoutArgs ImplPrepareLayoutArgs( OUString&, 
const sal_Int32 nIndex, const sal_Int32 nLen,
diff --git a/include/vcl/pdfwriter.hxx b/include/vcl/pdfwriter.hxx
index 5a566937e373..6e8d68cfcff9 100644
--- a/include/vcl/pdfwriter.hxx
+++ b/include/vcl/pdfwriter.hxx
@@ -746,7 +746,7 @@ The following structure describes the permissions used in 
PDF security
                                       FontLineStyle eUnderline,
                                       FontLineStyle eOverline );
     void                DrawTextArray( const Point& rStartPt, const OUString& 
rStr,
-                                       o3tl::span<const tools::Long> pDXAry,
+                                       o3tl::span<const sal_Int32> 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 53eb899af9b9..b54b8017132b 100644
--- a/sc/source/ui/view/output2.cxx
+++ b/sc/source/ui/view/output2.cxx
@@ -1556,7 +1556,7 @@ tools::Rectangle ScOutputData::LayoutStrings(bool 
bPixelToLogic, bool bPaint, co
     // before processing the cell value.
     std::vector<std::unique_ptr<ScPatternAttr> > aAltPatterns;
 
-    std::vector<tools::Long> aDX;
+    std::vector<sal_Int32> aDX;
     tools::Long nPosY = nScrY;
     for (SCSIZE nArrY=1; nArrY+1<nArrCount; nArrY++)
     {
diff --git a/starmath/source/accessibility.cxx 
b/starmath/source/accessibility.cxx
index 6eb9da06a5f2..b5686d01b97b 100644
--- a/starmath/source/accessibility.cxx
+++ b/starmath/source/accessibility.cxx
@@ -487,7 +487,7 @@ awt::Rectangle SAL_CALL 
SmGraphicAccessible::getCharacterBounds( sal_Int32 nInde
             weld::DrawingArea* pDrawingArea = pWin->GetDrawingArea();
             OutputDevice& rDevice = pDrawingArea->get_ref_device();
 
-            std::vector<tools::Long> aXAry;
+            std::vector<sal_Int32> aXAry;
             rDevice.SetFont( pNode->GetFont() );
             rDevice.GetTextArray( aNodeText, &aXAry, 0, aNodeText.getLength() 
);
             aTLPos.AdjustX(nNodeIndex > 0 ? aXAry[nNodeIndex - 1] : 0 );
@@ -559,7 +559,7 @@ sal_Int32 SAL_CALL SmGraphicAccessible::getIndexAtPoint( 
const awt::Point& aPoin
 
                 tools::Long nNodeX = pNode->GetLeft();
 
-                std::vector<tools::Long> aXAry;
+                std::vector<sal_Int32> aXAry;
                 rDevice.SetFont( pNode->GetFont() );
                 rDevice.GetTextArray( aTxt, &aXAry, 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 38a4c441f53c..c68a35483728 100644
--- a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx
+++ b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx
@@ -363,7 +363,7 @@ static void GetTextAreaOutline(
             }
             else
             {
-                std::vector<tools::Long> aDXArry;
+                std::vector<sal_Int32> aDXArry;
                 if ( ( nCharScaleWidth != 100 ) && nCharScaleWidth )
                 {   // applying character spacing
                     pVirDev->GetTextArray( rText, &aDXArry);
diff --git a/sw/source/core/inc/scriptinfo.hxx 
b/sw/source/core/inc/scriptinfo.hxx
index 7e660309aa54..cd479034ed06 100644
--- a/sw/source/core/inc/scriptinfo.hxx
+++ b/sw/source/core/inc/scriptinfo.hxx
@@ -270,7 +270,7 @@ public:
     // HIDDEN TEXT STUFF END
 
     // modifies the kerning array according to a given compress value
-    tools::Long Compress( tools::Long* pKernArray, TextFrameIndex nIdx, 
TextFrameIndex nLen,
+    tools::Long Compress( sal_Int32* pKernArray, TextFrameIndex nIdx, 
TextFrameIndex nLen,
                    const sal_uInt16 nCompress, const sal_uInt16 nFontHeight,
                    const bool bCentered,
                    Point* pPoint = nullptr ) const;
@@ -291,7 +291,7 @@ 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( tools::Long* pKernArray, tools::Long* pScrArray,
+    sal_Int32 KashidaJustify( sal_Int32* pKernArray, sal_Int32* pScrArray,
           TextFrameIndex nStt, TextFrameIndex nLen, tools::Long nSpaceAdd = 0) 
const;
 
 /** Clears array of kashidas marked as invalid
@@ -364,8 +364,8 @@ public:
                 The value which has to be added to the cells.
     @return The number of extra spaces in the given range
 */
-    static TextFrameIndex ThaiJustify( const OUString& rText, tools::Long* 
pKernArray,
-                                  tools::Long* pScrArray, TextFrameIndex nIdx,
+    static TextFrameIndex ThaiJustify( const OUString& rText, sal_Int32* 
pKernArray,
+                                  sal_Int32* pScrArray, TextFrameIndex nIdx,
                                   TextFrameIndex nLen,
                                   TextFrameIndex nNumberOfBlanks = 
TextFrameIndex(0),
                                   tools::Long nSpaceAdd = 0 );
@@ -373,8 +373,8 @@ public:
     static TextFrameIndex CountCJKCharacters(const OUString &rText,
             TextFrameIndex nPos, TextFrameIndex nEnd, LanguageType aLang);
 
-    static void CJKJustify( const OUString& rText, tools::Long* pKernArray,
-                                  tools::Long* pScrArray, TextFrameIndex nStt,
+    static void CJKJustify( const OUString& rText, sal_Int32* pKernArray,
+                                  sal_Int32* pScrArray, TextFrameIndex nStt,
                                   TextFrameIndex nLen, LanguageType aLang,
                                   tools::Long nSpaceAdd, bool bIsSpaceStop );
 
diff --git a/sw/source/core/text/porlay.cxx b/sw/source/core/text/porlay.cxx
index 5e80f7cb1b30..e1e5796294a3 100644
--- a/sw/source/core/text/porlay.cxx
+++ b/sw/source/core/text/porlay.cxx
@@ -2037,7 +2037,7 @@ size_t SwScriptInfo::HasKana(TextFrameIndex const nStart, 
TextFrameIndex const n
     return SAL_MAX_SIZE;
 }
 
-tools::Long SwScriptInfo::Compress(tools::Long* pKernArray, TextFrameIndex 
nIdx, TextFrameIndex nLen,
+tools::Long SwScriptInfo::Compress(sal_Int32* pKernArray, TextFrameIndex nIdx, 
TextFrameIndex nLen,
                              const sal_uInt16 nCompress, const sal_uInt16 
nFontHeight,
                              bool bCenter,
                              Point* pPoint ) const
@@ -2154,8 +2154,8 @@ tools::Long SwScriptInfo::Compress(tools::Long* 
pKernArray, TextFrameIndex nIdx,
 // total number of kashida positions, or the number of kashida positions after 
some positions
 // have been dropped, depending on the state of the m_KashidaInvalid set.
 
-sal_Int32 SwScriptInfo::KashidaJustify( tools::Long* pKernArray,
-                                        tools::Long* pScrArray,
+sal_Int32 SwScriptInfo::KashidaJustify( sal_Int32* pKernArray,
+                                        sal_Int32* pScrArray,
                                         TextFrameIndex const nStt,
                                         TextFrameIndex const nLen,
                                         tools::Long nSpaceAdd ) const
@@ -2413,8 +2413,8 @@ void SwScriptInfo::MarkKashidasInvalid(sal_Int32 const 
nCnt,
     }
 }
 
-TextFrameIndex SwScriptInfo::ThaiJustify( const OUString& rText, tools::Long* 
pKernArray,
-                                     tools::Long* pScrArray, TextFrameIndex 
const nStt,
+TextFrameIndex SwScriptInfo::ThaiJustify( const OUString& rText, sal_Int32* 
pKernArray,
+                                     sal_Int32* pScrArray, TextFrameIndex 
const nStt,
                                      TextFrameIndex const nLen,
                                      TextFrameIndex nNumberOfBlanks,
                                      tools::Long nSpaceAdd )
@@ -2746,8 +2746,8 @@ TextFrameIndex SwScriptInfo::CountCJKCharacters(const 
OUString &rText,
     return nCount;
 }
 
-void SwScriptInfo::CJKJustify( const OUString& rText, tools::Long* pKernArray,
-                                     tools::Long* pScrArray, TextFrameIndex 
const nStt,
+void SwScriptInfo::CJKJustify( const OUString& rText, sal_Int32* pKernArray,
+                                     sal_Int32* pScrArray, TextFrameIndex 
const nStt,
                                      TextFrameIndex const nLen, LanguageType 
aLang,
                                      tools::Long nSpaceAdd, bool bIsSpaceStop )
 {
diff --git a/sw/source/core/txtnode/fntcache.cxx 
b/sw/source/core/txtnode/fntcache.cxx
index 9db05f74ff0b..bfa88bf306b1 100644
--- a/sw/source/core/txtnode/fntcache.cxx
+++ b/sw/source/core/txtnode/fntcache.cxx
@@ -288,12 +288,12 @@ struct CalcLinePosData
     const bool bSwitchH2VLRBT;
     const bool bSwitchL2R;
     tools::Long nHalfSpace;
-    tools::Long* pKernArray;
+    sal_Int32* pKernArray;
     const bool bBidiPor;
 
     CalcLinePosData( SwDrawTextInfo& _rInf, vcl::Font& _rFont,
           TextFrameIndex const _nCnt, const bool _bSwitchH2V, const bool 
_bSwitchH2VLRBT, const bool _bSwitchL2R,
-                      tools::Long _nHalfSpace, tools::Long* _pKernArray, const 
bool _bBidiPor) :
+                      tools::Long _nHalfSpace, sal_Int32* _pKernArray, const 
bool _bBidiPor) :
         rInf( _rInf ),
         rFont( _rFont ),
         nCnt( _nCnt ),
@@ -1025,7 +1025,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
             const sal_uInt16 nGridWidth = GetGridWidth(*pGrid, *pDoc);
 
             // kerning array - gives the absolute position of end of each 
character
-            std::vector<tools::Long> aKernArray;
+            std::vector<sal_Int32> aKernArray;
 
             if ( m_pPrinter )
                 m_pPrinter->GetTextArray( rInf.GetText(), &aKernArray,
@@ -1132,7 +1132,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
         {
             const tools::Long nGridWidthAdd = EvalGridWidthAdd( pGrid, rInf );
 
-            std::vector<tools::Long> aKernArray;
+            std::vector<sal_Int32> aKernArray;
 
             if ( m_pPrinter )
                 m_pPrinter->GetTextArray( rInf.GetText(), &aKernArray,
@@ -1274,7 +1274,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
         // Simple kerning is handled by DrawStretchText
         if( rInf.GetSpace() || rInf.GetKanaComp() )
         {
-            std::vector<tools::Long> aKernArray;
+            std::vector<sal_Int32> aKernArray;
             rInf.GetOut().GetTextArray( rInf.GetText(), &aKernArray,
                            sal_Int32(rInf.GetIdx()), sal_Int32(rInf.GetLen()));
 
@@ -1482,12 +1482,12 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
         bool bBullet = rInf.GetBullet();
         if( m_bSymbol )
             bBullet = false;
-        std::vector<tools::Long> aKernArray;
+        std::vector<sal_Int32> aKernArray;
         CreateScrFont( *rInf.GetShell(), rInf.GetOut() );
         tools::Long nScrPos;
 
         // get screen array
-        std::vector<tools::Long> aScrArray;
+        std::vector<sal_Int32> aScrArray;
         SwTextGlyphsKey aGlyphsKey{ &rInf.GetOut(), rInf.GetText(), 
sal_Int32(rInf.GetIdx()), sal_Int32(rInf.GetLen()) };
         SalLayoutGlyphs* pGlyphs = GetCachedSalLayoutGlyphs(aGlyphsKey);
         rInf.GetOut().GetTextArray( rInf.GetText(), &aScrArray,
@@ -1997,7 +1997,7 @@ Size SwFntObj::GetTextSize( SwDrawTextInfo& rInf )
         aTextSize.setWidth( m_pPrinter->GetTextWidth( rInf.GetText(),
                                sal_Int32(rInf.GetIdx()), sal_Int32(nLn)));
         aTextSize.setHeight( m_pPrinter->GetTextHeight() );
-        std::vector<tools::Long> aKernArray;
+        std::vector<sal_Int32> aKernArray;
         CreateScrFont( *rInf.GetShell(), rInf.GetOut() );
         if( !GetScrFont()->IsSameInstance( rInf.GetOut().GetFont() ) )
             rInf.GetOut().SetFont( *m_pScrFont );
@@ -2016,7 +2016,7 @@ Size SwFntObj::GetTextSize( SwDrawTextInfo& rInf )
             nScrPos = aKernArray[ sal_Int32(nLn) - 1 ];
         else
         {
-            std::vector<tools::Long> aScrArray;
+            std::vector<sal_Int32> aScrArray;
             rInf.GetOut().GetTextArray( rInf.GetText(), &aScrArray,
                         sal_Int32(rInf.GetIdx()), sal_Int32(rInf.GetLen()));
             nScrPos = aScrArray[ 0 ];
@@ -2063,7 +2063,7 @@ Size SwFntObj::GetTextSize( SwDrawTextInfo& rInf )
             rInf.GetOut().SetFont( *m_pPrtFont );
         if( bCompress )
         {
-            std::vector<tools::Long> aKernArray;
+            std::vector<sal_Int32> aKernArray;
             rInf.GetOut().GetTextArray( rInf.GetText(), &aKernArray,
                                 sal_Int32(rInf.GetIdx()), sal_Int32(nLn));
             rInf.SetKanaDiff( rInf.GetScriptInfo()->Compress( 
aKernArray.data(),
@@ -2100,7 +2100,7 @@ TextFrameIndex 
SwFntObj::GetModelPositionForViewPoint(SwDrawTextInfo &rInf)
     if( 0 != nSperren )
         nKern -= nSperren;
 
-    std::vector<tools::Long> aKernArray;
+    std::vector<sal_Int32> aKernArray;
 
     // be sure to have the correct layout mode at the printer
     if ( m_pPrinter )
@@ -2417,7 +2417,7 @@ TextFrameIndex SwFont::GetTextBreak(SwDrawTextInfo const 
& rInf, tools::Long nTe
             const SwDoc* pDoc = rInf.GetShell()->GetDoc();
             const sal_uInt16 nGridWidth = GetGridWidth(*pGrid, *pDoc);
 
-            std::vector<tools::Long> aKernArray;
+            std::vector<sal_Int32> aKernArray;
             rInf.GetOut().GetTextArray( rInf.GetText(), &aKernArray,
                     sal_Int32(rInf.GetIdx()), sal_Int32(rInf.GetLen()));
 
@@ -2448,7 +2448,7 @@ TextFrameIndex SwFont::GetTextBreak(SwDrawTextInfo const 
& rInf, tools::Long nTe
         {
             const tools::Long nGridWidthAdd = EvalGridWidthAdd( pGrid, rInf );
 
-            std::vector<tools::Long> aKernArray;
+            std::vector<sal_Int32> aKernArray;
             rInf.GetOut().GetTextArray( rInf.GetText(), &aKernArray,
                         sal_Int32(rInf.GetIdx()), sal_Int32(rInf.GetLen()));
             tools::Long nCurrPos = aKernArray[sal_Int32(nTextBreak)] + 
nGridWidthAdd;
@@ -2563,7 +2563,7 @@ TextFrameIndex SwFont::GetTextBreak(SwDrawTextInfo const 
& rInf, tools::Long nTe
             nLn = TextFrameIndex(1);
         else if (nLn > nTextBreak2 + nTextBreak2)
             nLn = nTextBreak2 + nTextBreak2;
-        std::vector<tools::Long> aKernArray;
+        std::vector<sal_Int32> aKernArray;
         rInf.GetOut().GetTextArray( rInf.GetText(), &aKernArray,
                                     sal_Int32(rInf.GetIdx()), sal_Int32(nLn));
         if( rInf.GetScriptInfo()->Compress( aKernArray.data(), rInf.GetIdx(), 
nLn,
diff --git a/toolkit/source/awt/vclxfont.cxx b/toolkit/source/awt/vclxfont.cxx
index 35648afdc1fc..2ae914cca2a7 100644
--- a/toolkit/source/awt/vclxfont.cxx
+++ b/toolkit/source/awt/vclxfont.cxx
@@ -156,7 +156,7 @@ sal_Int32 VCLXFont::getStringWidthArray( const OUString& 
str, css::uno::Sequence
     {
         vcl::Font aOldFont = pOutDev->GetFont();
         pOutDev->SetFont( maFont );
-        std::vector<tools::Long> aDXA;
+        std::vector<sal_Int32> aDXA;
         nRet = pOutDev->GetTextArray( str, &aDXA );
         rDXArray = css::uno::Sequence<sal_Int32>( str.getLength() );
         for(int i = 0; i < str.getLength(); i++)
diff --git a/toolkit/source/awt/vclxgraphics.cxx 
b/toolkit/source/awt/vclxgraphics.cxx
index e735a2eedcfd..00321b4236a4 100644
--- a/toolkit/source/awt/vclxgraphics.cxx
+++ b/toolkit/source/awt/vclxgraphics.cxx
@@ -465,7 +465,7 @@ void VCLXGraphics::drawTextArray( sal_Int32 x, sal_Int32 y, 
const OUString& rTex
     if( mpOutputDevice )
     {
         InitOutputDevice( InitOutDevFlags::COLORS|InitOutDevFlags::FONT );
-        std::vector<tools::Long> aDXA(rText.getLength());
+        std::vector<sal_Int32> aDXA(rText.getLength());
         for(int i = 0; i < rText.getLength(); i++)
         {
             aDXA[i] = rLongs[i];
diff --git a/vcl/inc/calendar.hxx b/vcl/inc/calendar.hxx
index 8948220cce0a..500b97f47cd1 100644
--- a/vcl/inc/calendar.hxx
+++ b/vcl/inc/calendar.hxx
@@ -126,7 +126,7 @@ class Calendar final : public Control
     tools::Rectangle       maPrevRect;
     tools::Rectangle       maNextRect;
     OUString        maDayOfWeekText;
-    tools::Long            mnDayOfWeekAry[7];
+    sal_Int32       mnDayOfWeekAry[7];
     Date            maOldFormatFirstDate;
     Date            maOldFormatLastDate;
     Date            maFirstDate;
diff --git a/vcl/inc/pdf/pdfwriter_impl.hxx b/vcl/inc/pdf/pdfwriter_impl.hxx
index b07b7d7bbfce..b8bdc3825eee 100644
--- a/vcl/inc/pdf/pdfwriter_impl.hxx
+++ b/vcl/inc/pdf/pdfwriter_impl.hxx
@@ -1176,7 +1176,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, 
o3tl::span<const tools::Long> pDXArray, sal_Int32 nIndex, sal_Int32 nLen );
+    void drawTextArray( const Point& rPos, const OUString& rText, 
o3tl::span<const sal_Int32> pDXArray, sal_Int32 nIndex, sal_Int32 nLen );
     void drawStretchText( const Point& rPos, sal_uLong nWidth, const OUString& 
rText,
                           sal_Int32 nIndex, sal_Int32 nLen  );
     void drawText( const tools::Rectangle& rRect, const OUString& rOrigStr, 
DrawTextFlags nStyle );
diff --git a/vcl/qa/cppunit/complextext.cxx b/vcl/qa/cppunit/complextext.cxx
index 76570ed579bf..21e1e58f96ac 100644
--- a/vcl/qa/cppunit/complextext.cxx
+++ b/vcl/qa/cppunit/complextext.cxx
@@ -15,7 +15,7 @@
 
 #if HAVE_MORE_FONTS
 // must be declared before inclusion of test/bootstrapfixture.hxx
-static std::ostream& operator<<(std::ostream& rStream, const 
std::vector<tools::Long>& rVec);
+static std::ostream& operator<<(std::ostream& rStream, const 
std::vector<sal_Int32>& rVec);
 #endif
 #include <test/bootstrapfixture.hxx>
 
@@ -29,7 +29,7 @@ static std::ostream& operator<<(std::ostream& rStream, const 
std::vector<tools::
 #include <ImplLayoutArgs.hxx>
 
 #if HAVE_MORE_FONTS
-static std::ostream& operator<<(std::ostream& rStream, const 
std::vector<tools::Long>& rVec)
+static std::ostream& operator<<(std::ostream& rStream, const 
std::vector<sal_Int32>& rVec)
 {
     rStream << "{ ";
     for (size_t i = 0; i < rVec.size() - 1; i++)
@@ -72,15 +72,15 @@ void VclComplexTextTest::testArabic()
     pOutDev->SetFont( aFont );
 
     // absolute character widths AKA text array.
-    std::vector<tools::Long> aRefCharWidths {6,  9,  16, 16, 22, 22, 26, 29, 
32, 32,
+    std::vector<sal_Int32> aRefCharWidths {6,  9,  16, 16, 22, 22, 26, 29, 32, 
32,
                                       36, 40, 49, 53, 56, 63, 63, 66, 72, 72};
-    std::vector<tools::Long> aCharWidths(aOneTwoThree.getLength(), 0);
+    std::vector<sal_Int32> aCharWidths(aOneTwoThree.getLength(), 0);
     tools::Long nTextWidth = pOutDev->GetTextArray(aOneTwoThree, &aCharWidths);
 
     CPPUNIT_ASSERT_EQUAL(aRefCharWidths, aCharWidths);
     // this sporadically returns 75 or 74 on some of the windows tinderboxes 
eg. tb73
     CPPUNIT_ASSERT_EQUAL(tools::Long(72), nTextWidth);
-    CPPUNIT_ASSERT_EQUAL(nTextWidth, aCharWidths.back());
+    CPPUNIT_ASSERT_EQUAL(sal_Int32(nTextWidth), aCharWidths.back());
 
     // text advance width and line height
     CPPUNIT_ASSERT_EQUAL(tools::Long(72), pOutDev->GetTextWidth(aOneTwoThree));
diff --git a/vcl/qa/cppunit/svm/svmtest.cxx b/vcl/qa/cppunit/svm/svmtest.cxx
index 7efb1050c736..7b2fcc8cf4cc 100644
--- a/vcl/qa/cppunit/svm/svmtest.cxx
+++ b/vcl/qa/cppunit/svm/svmtest.cxx
@@ -857,7 +857,7 @@ void SvmTest::testTextArray()
     GDIMetaFile aGDIMetaFile;
     ScopedVclPtrInstance<VirtualDevice> pVirtualDev;
     setupBaseVirtualDevice(*pVirtualDev, aGDIMetaFile);
-    tools::Long const aDX[] = { 10, 15, 20, 25, 30, 35 };
+    sal_Int32 const aDX[] = { 10, 15, 20, 25, 30, 35 };
     pVirtualDev->DrawTextArray(Point(4,6), "123456", aDX, 1, 4);
 
     checkTextArray(writeAndReadStream(aGDIMetaFile));
diff --git a/vcl/source/control/calendar.cxx b/vcl/source/control/calendar.cxx
index 2d5910a920f0..1ce0c72b0687 100644
--- a/vcl/source/control/calendar.cxx
+++ b/vcl/source/control/calendar.cxx
@@ -704,7 +704,7 @@ void Calendar::ImplDraw(vcl::RenderContext& rRenderContext)
             rRenderContext.SetLineColor(rStyleSettings.GetWindowTextColor());
             Point aStartPos(nDayX, nDeltaY);
             rRenderContext.DrawLine(aStartPos, Point(nDayX + (7 * mnDayWidth), 
nDeltaY));
-            std::vector<tools::Long> aTmp;
+            std::vector<sal_Int32> aTmp;
             for (int k=0; k<6; ++k)
                 aTmp.push_back(mnDayOfWeekAry[k+1]);
             rRenderContext.DrawTextArray(Point(nDayX + mnDayOfWeekAry[0], 
nDayY), maDayOfWeekText, {aTmp.data(), aTmp.size()});
diff --git a/vcl/source/filter/eps/eps.cxx b/vcl/source/filter/eps/eps.cxx
index 6da05bb24fb7..f692071a8d92 100644
--- a/vcl/source/filter/eps/eps.cxx
+++ b/vcl/source/filter/eps/eps.cxx
@@ -200,10 +200,10 @@ private:
 
     void                ImplSetClipRegion( vcl::Region const & rRegion );
     void                ImplBmp( Bitmap const *, Bitmap const *, const Point 
&, double nWidth, double nHeight );
-    void                ImplText( const OUString& rUniString, const Point& 
rPos, o3tl::span<const tools::Long> pDXArry, sal_Int32 nWidth, VirtualDevice 
const & rVDev );
+    void                ImplText( const OUString& rUniString, const Point& 
rPos, o3tl::span<const sal_Int32> pDXArry, sal_Int32 nWidth, VirtualDevice 
const & rVDev );
     void                ImplSetAttrForText( const Point & rPoint );
     void                ImplWriteCharacter( char );
-    void                ImplWriteString( const OString&, VirtualDevice const & 
rVDev, o3tl::span<const tools::Long> pDXArry, bool bStretch );
+    void                ImplWriteString( const OString&, VirtualDevice const & 
rVDev, o3tl::span<const sal_Int32> pDXArry, bool bStretch );
     void                ImplDefineFont( const char*, const char* );
 
     void                ImplClosePathDraw();
@@ -1951,7 +1951,7 @@ void PSWriter::ImplWriteCharacter( char nChar )
     ImplWriteByte( static_cast<sal_uInt8>(nChar), PS_NONE );
 }
 
-void PSWriter::ImplWriteString( const OString& rString, VirtualDevice const & 
rVDev, o3tl::span<const tools::Long> pDXArry, bool bStretch )
+void PSWriter::ImplWriteString( const OString& rString, VirtualDevice const & 
rVDev, o3tl::span<const sal_Int32> pDXArry, bool bStretch )
 {
     sal_Int32 nLen = rString.getLength();
     if ( !nLen )
@@ -1981,7 +1981,7 @@ void PSWriter::ImplWriteString( const OString& rString, 
VirtualDevice const & rV
     }
 }
 
-void PSWriter::ImplText( const OUString& rUniString, const Point& rPos, 
o3tl::span<const tools::Long> pDXArry, sal_Int32 nWidth, VirtualDevice const & 
rVDev )
+void PSWriter::ImplText( const OUString& rUniString, const Point& rPos, 
o3tl::span<const sal_Int32> pDXArry, sal_Int32 nWidth, VirtualDevice const & 
rVDev )
 {
     if ( rUniString.isEmpty() )
         return;
diff --git a/vcl/source/filter/svm/SvmConverter.cxx 
b/vcl/source/filter/svm/SvmConverter.cxx
index 71c400fb37f3..a5618ab95fd6 100644
--- a/vcl/source/filter/svm/SvmConverter.cxx
+++ b/vcl/source/filter/svm/SvmConverter.cxx
@@ -715,7 +715,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, 
GDIMetaFile& rMtf )
 
                     OUString aStr(OStringToOUString(aByteStr, eActualCharSet));
 
-                    std::vector<tools::Long> aDXAry;
+                    std::vector<sal_Int32> aDXAry;
                     if (nAryLen > 0)
                     {
                         const size_t nMinRecordSize = sizeof(sal_Int32);
@@ -755,7 +755,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, 
GDIMetaFile& rMtf )
                             {
                                 if (nAryLen+1 == nStrLen && nIndex >= 0)
                                 {
-                                    std::vector<tools::Long> aTmpAry;
+                                    std::vector<sal_Int32> aTmpAry;
 
                                     aFontVDev->GetTextArray( aStr, &aTmpAry, 
nIndex, nLen );
 
diff --git a/vcl/source/filter/svm/SvmReader.cxx 
b/vcl/source/filter/svm/SvmReader.cxx
index 0f6c19ed0a31..490ff002854e 100644
--- a/vcl/source/filter/svm/SvmReader.cxx
+++ b/vcl/source/filter/svm/SvmReader.cxx
@@ -683,7 +683,7 @@ rtl::Reference<MetaAction> 
SvmReader::TextArrayHandler(const ImplMetaReadData* p
 {
     rtl::Reference<MetaTextArrayAction> pAction(new MetaTextArrayAction);
 
-    std::vector<tools::Long> aArray;
+    std::vector<sal_Int32> aArray;
 
     VersionCompatRead aCompat(mrStream);
     TypeSerializer aSerializer(mrStream);
diff --git a/vcl/source/filter/svm/SvmWriter.cxx 
b/vcl/source/filter/svm/SvmWriter.cxx
index bcc15c5806e4..118db1325d71 100644
--- a/vcl/source/filter/svm/SvmWriter.cxx
+++ b/vcl/source/filter/svm/SvmWriter.cxx
@@ -984,7 +984,7 @@ void SvmWriter::TextArrayHandler(const MetaTextArrayAction* 
pAction, const ImplM
 {
     mrStream.WriteUInt16(static_cast<sal_uInt16>(pAction->GetType()));
 
-    const std::vector<tools::Long>& rDXArray = pAction->GetDXArray();
+    const std::vector<sal_Int32>& rDXArray = pAction->GetDXArray();
 
     const sal_Int32 nAryLen = !rDXArray.empty() ? pAction->GetLen() : 0;
 
diff --git a/vcl/source/filter/wmf/emfwr.cxx b/vcl/source/filter/wmf/emfwr.cxx
index d9f41fd81fed..f77e2aad2001 100644
--- a/vcl/source/filter/wmf/emfwr.cxx
+++ b/vcl/source/filter/wmf/emfwr.cxx
@@ -861,7 +861,7 @@ void EMFWriter::ImplWriteBmpRecord( const Bitmap& rBmp, 
const Point& rPt,
 
 }
 
-void EMFWriter::ImplWriteTextRecord( const Point& rPos, const OUString& rText, 
o3tl::span<const tools::Long> pDXArray, sal_uInt32 nWidth )
+void EMFWriter::ImplWriteTextRecord( const Point& rPos, const OUString& rText, 
o3tl::span<const sal_Int32> pDXArray, sal_uInt32 nWidth )
 {
     sal_Int32 nLen = rText.getLength(), i;
 
@@ -869,8 +869,8 @@ void EMFWriter::ImplWriteTextRecord( const Point& rPos, 
const OUString& rText, o
         return;
 
     sal_uInt32  nNormWidth;
-    std::vector<tools::Long> aOwnArray;
-    o3tl::span<const tools::Long> pDX;
+    std::vector<sal_Int32> aOwnArray;
+    o3tl::span<const sal_Int32> pDX;
 
     // get text sizes
     if( !pDXArray.empty() )
diff --git a/vcl/source/filter/wmf/emfwr.hxx b/vcl/source/filter/wmf/emfwr.hxx
index d2d3d9845931..502ae5d28fc7 100644
--- a/vcl/source/filter/wmf/emfwr.hxx
+++ b/vcl/source/filter/wmf/emfwr.hxx
@@ -75,7 +75,7 @@ private:
     void                ImplWritePolygonRecord( const tools::Polygon& rPoly, 
bool bClose );
     void                ImplWritePolyPolygonRecord( const tools::PolyPolygon& 
rPolyPoly );
     void                ImplWriteBmpRecord( const Bitmap& rBmp, const Point& 
rPt, const Size& rSz, sal_uInt32 nROP );
-    void                ImplWriteTextRecord( const Point& rPos, const 
OUString& rText, o3tl::span<const tools::Long> pDXArray, sal_uInt32 nWidth );
+    void                ImplWriteTextRecord( const Point& rPos, const 
OUString& rText, o3tl::span<const sal_Int32> 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/wmfwr.cxx b/vcl/source/filter/wmf/wmfwr.cxx
index b58a25408523..339479b2b42c 100644
--- a/vcl/source/filter/wmf/wmfwr.cxx
+++ b/vcl/source/filter/wmf/wmfwr.cxx
@@ -442,7 +442,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, o3tl::span<const tools::Long> pDXAry )
+bool WMFWriter::WMFRecord_Escape_Unicode( const Point& rPoint, const OUString& 
rUniStr, o3tl::span<const sal_Int32> pDXAry )
 {
     bool bEscapeUsed = false;
 
@@ -547,7 +547,7 @@ bool WMFWriter::WMFRecord_Escape_Unicode( const Point& 
rPoint, const OUString& r
 
 void WMFWriter::WMFRecord_ExtTextOut( const Point& rPoint,
                                       const OUString& rString,
-                                      o3tl::span<const tools::Long> pDXAry )
+                                      o3tl::span<const sal_Int32> pDXAry )
 {
     sal_Int32 nOriginalTextLen = rString.getLength();
 
@@ -562,7 +562,7 @@ void WMFWriter::WMFRecord_ExtTextOut( const Point& rPoint,
 }
 
 void WMFWriter::TrueExtTextOut( const Point& rPoint, const OUString& rString,
-                                const OString& rByteString, o3tl::span<const 
tools::Long> pDXAry )
+                                const OString& rByteString, o3tl::span<const 
sal_Int32> pDXAry )
 {
     WriteRecordHeader( 0, W_META_EXTTEXTOUT );
     WritePointYX( rPoint );
@@ -1197,7 +1197,7 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF )
 
                 pVirDev->SetFont( aSrcFont );
                 const sal_Int32 nLen = aTemp.getLength();
-                std::vector<tools::Long> aDXAry;
+                std::vector<sal_Int32> aDXAry;
                 const sal_Int32 nNormSize = pVirDev->GetTextArray( aTemp, nLen 
? &aDXAry : nullptr );
                 if (nLen && nNormSize == 0)
                 {
diff --git a/vcl/source/filter/wmf/wmfwr.hxx b/vcl/source/filter/wmf/wmfwr.hxx
index a0961e63a15c..7b0ce679e7dc 100644
--- a/vcl/source/filter/wmf/wmfwr.hxx
+++ b/vcl/source/filter/wmf/wmfwr.hxx
@@ -142,11 +142,11 @@ private:
     void WMFRecord_DeleteObject(sal_uInt16 nObjectHandle);
     void WMFRecord_Ellipse(const tools::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, 
o3tl::span<const tools::Long> pDXAry );
-    void WMFRecord_ExtTextOut(const Point& rPoint, const OUString& rString, 
o3tl::span<const tools::Long> pDXAry);
+    bool WMFRecord_Escape_Unicode( const Point& rPoint, const OUString& rStr, 
o3tl::span<const sal_Int32> pDXAry );
+    void WMFRecord_ExtTextOut(const Point& rPoint, const OUString& rString, 
o3tl::span<const sal_Int32> pDXAry);
 
     void TrueExtTextOut(const Point& rPoint, const OUString& rString,
-                        const OString& rByteString, o3tl::span<const 
tools::Long> pDXAry);
+                        const OString& rByteString, o3tl::span<const 
sal_Int32> pDXAry);
     void TrueTextOut(const Point& rPoint, const OString& rString);
     void WMFRecord_LineTo(const Point & rPoint);
     void WMFRecord_MoveTo(const Point & rPoint);
diff --git a/vcl/source/gdi/metaact.cxx b/vcl/source/gdi/metaact.cxx
index 191c5c05539c..0135afd9d626 100644
--- a/vcl/source/gdi/metaact.cxx
+++ b/vcl/source/gdi/metaact.cxx
@@ -606,7 +606,7 @@ MetaTextArrayAction::MetaTextArrayAction( const 
MetaTextArrayAction& rAction ) :
 
 MetaTextArrayAction::MetaTextArrayAction( const Point& rStartPt,
                                           const OUString& rStr,
-                                          const std::vector<tools::Long>& 
rDXAry,
+                                          const std::vector<sal_Int32>& rDXAry,
                                           sal_Int32 nIndex,
                                           sal_Int32 nLen ) :
     MetaAction  ( MetaActionType::TEXTARRAY ),
@@ -620,7 +620,7 @@ MetaTextArrayAction::MetaTextArrayAction( const Point& 
rStartPt,
 
 MetaTextArrayAction::MetaTextArrayAction( const Point& rStartPt,
                                           const OUString& rStr,
-                                          o3tl::span<const tools::Long> pDXAry,
+                                          o3tl::span<const sal_Int32> pDXAry,
                                           sal_Int32 nIndex,
                                           sal_Int32 nLen ) :
     MetaAction  ( MetaActionType::TEXTARRAY ),
@@ -662,7 +662,7 @@ void MetaTextArrayAction::Scale( double fScaleX, double 
fScaleY )
     }
 }
 
-void MetaTextArrayAction::SetDXArray(std::vector<tools::Long> aArray)
+void MetaTextArrayAction::SetDXArray(std::vector<sal_Int32> aArray)
 {
     maDXAry = std::move(aArray);
 }
diff --git a/vcl/source/gdi/pdfwriter.cxx b/vcl/source/gdi/pdfwriter.cxx
index 2130b0fc30f7..f26f6c31705b 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,
-                              o3tl::span<const tools::Long> pDXAry,
+                              o3tl::span<const sal_Int32> pDXAry,
                               sal_Int32 nIndex,
                               sal_Int32 nLen )
 {
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx 
b/vcl/source/gdi/pdfwriter_impl.cxx
index ef77b6b691f6..6aa8cb0eec73 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -6500,7 +6500,7 @@ void PDFWriterImpl::drawText( const Point& rPos, const 
OUString& rText, sal_Int3
     }
 }
 
-void PDFWriterImpl::drawTextArray( const Point& rPos, const OUString& rText, 
o3tl::span<const tools::Long> pDXArray, sal_Int32 nIndex, sal_Int32 nLen )
+void PDFWriterImpl::drawTextArray( const Point& rPos, const OUString& rText, 
o3tl::span<const sal_Int32> pDXArray, sal_Int32 nIndex, sal_Int32 nLen )
 {
     MARK( "drawText with array" );
 
diff --git a/vcl/source/gdi/textlayout.cxx b/vcl/source/gdi/textlayout.cxx
index 6fdd0d72ffb8..760dba073750 100644
--- a/vcl/source/gdi/textlayout.cxx
+++ b/vcl/source/gdi/textlayout.cxx
@@ -86,7 +86,7 @@ namespace vcl
         tools::Rectangle   GetTextRect( const tools::Rectangle& _rRect, const 
OUString& _rText, DrawTextFlags _nStyle, Size* o_pDeviceSize );
 
     private:
-        tools::Long        GetTextArray( const OUString& _rText, 
std::vector<tools::Long>* _pDXAry, sal_Int32 _nStartIndex, sal_Int32 _nLength ) 
const;
+        tools::Long        GetTextArray( const OUString& _rText, 
std::vector<sal_Int32>* _pDXAry, sal_Int32 _nStartIndex, sal_Int32 _nLength ) 
const;
 
         OutputDevice&   m_rTargetDevice;
         OutputDevice&   m_rReferenceDevice;
@@ -159,7 +159,7 @@ namespace vcl
         }
     }
 
-    tools::Long ReferenceDeviceTextLayout::GetTextArray( const OUString& 
_rText, std::vector<tools::Long>* _pDXAry, sal_Int32 _nStartIndex, sal_Int32 
_nLength ) const
+    tools::Long ReferenceDeviceTextLayout::GetTextArray( const OUString& 
_rText, std::vector<sal_Int32>* _pDXAry, sal_Int32 _nStartIndex, sal_Int32 
_nLength ) const
     {
         if ( !lcl_normalizeLength( _rText, _nStartIndex, _nLength ) )
             return 0;
@@ -207,7 +207,7 @@ namespace vcl
             return;
         }
 
-        std::vector<tools::Long> aCharWidths;
+        std::vector<sal_Int32> aCharWidths;
         tools::Long nTextWidth = GetTextArray( _rText, &aCharWidths, 
_nStartIndex, _nLength );
         m_rTargetDevice.DrawTextArray( _rStartPoint, _rText, { 
aCharWidths.data(), aCharWidths.size() }, _nStartIndex, _nLength );
 
diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx
index 30f915b7fca3..3de36a88e4e1 100644
--- a/vcl/source/outdev/text.cxx
+++ b/vcl/source/outdev/text.cxx
@@ -919,7 +919,7 @@ float OutputDevice::approximate_digit_width() const
 }
 
 void OutputDevice::DrawTextArray( const Point& rStartPt, const OUString& rStr,
-                                  o3tl::span<const tools::Long> pDXAry,
+                                  o3tl::span<const sal_Int32> pDXAry,
                                   sal_Int32 nIndex, sal_Int32 nLen, 
SalLayoutFlags flags,
                                   const SalLayoutGlyphs* pSalLayoutCache )
 {
@@ -952,7 +952,7 @@ void OutputDevice::DrawTextArray( const Point& rStartPt, 
const OUString& rStr,
         mpAlphaVDev->DrawTextArray( rStartPt, rStr, pDXAry, nIndex, nLen, 
flags );
 }
 
-tools::Long OutputDevice::GetTextArray( const OUString& rStr, 
std::vector<tools::Long>* pDXAry,
+tools::Long OutputDevice::GetTextArray( const OUString& rStr, 
std::vector<sal_Int32>* pDXAry,
                                  sal_Int32 nIndex, sal_Int32 nLen,
                                  vcl::text::TextLayoutCache const*const 
pLayoutCache,
                                  SalLayoutGlyphs const*const pSalLayoutCache) 
const
@@ -1245,7 +1245,7 @@ vcl::text::ImplLayoutArgs 
OutputDevice::ImplPrepareLayoutArgs( OUString& rStr,
 std::unique_ptr<SalLayout> OutputDevice::ImplLayout(const OUString& rOrigStr,
                                     sal_Int32 nMinIndex, sal_Int32 nLen,
                                     const Point& rLogicalPos, tools::Long 
nLogicalWidth,
-                                    o3tl::span<const tools::Long> pDXArray, 
SalLayoutFlags flags,
+                                    o3tl::span<const sal_Int32> pDXArray, 
SalLayoutFlags flags,
          vcl::text::TextLayoutCache const* pLayoutCache,
          const SalLayoutGlyphs* pGlyphs) const
 {
@@ -2257,7 +2257,7 @@ OUString OutputDevice::GetNonMnemonicString( const 
OUString& rStr, sal_Int32& rM
 bool OutputDevice::GetTextBoundRect( tools::Rectangle& rRect,
                                          const OUString& rStr, sal_Int32 nBase,
                                          sal_Int32 nIndex, sal_Int32 nLen,
-                                         sal_uLong nLayoutWidth, 
o3tl::span<const tools::Long> pDXAry,
+                                         sal_uLong nLayoutWidth, 
o3tl::span<const sal_Int32> pDXAry,
                                          const SalLayoutGlyphs* pGlyphs ) const
 {
     bool bRet = false;
@@ -2321,7 +2321,7 @@ bool OutputDevice::GetTextBoundRect( tools::Rectangle& 
rRect,
 bool OutputDevice::GetTextOutlines( basegfx::B2DPolyPolygonVector& rVector,
                                         const OUString& rStr, sal_Int32 nBase,
                                         sal_Int32 nIndex, sal_Int32 nLen,
-                                        sal_uLong nLayoutWidth, 
o3tl::span<const tools::Long> pDXArray ) const
+                                        sal_uLong nLayoutWidth, 
o3tl::span<const sal_Int32> pDXArray ) const
 {
     if (!InitFont())
         return false;
@@ -2408,7 +2408,7 @@ bool OutputDevice::GetTextOutlines( 
basegfx::B2DPolyPolygonVector& rVector,
 bool OutputDevice::GetTextOutlines( PolyPolyVector& rResultVector,
                                         const OUString& rStr, sal_Int32 nBase,
                                         sal_Int32 nIndex, sal_Int32 nLen,
-                                        sal_uLong nLayoutWidth, 
o3tl::span<const tools::Long> pDXArray ) const
+                                        sal_uLong nLayoutWidth, 
o3tl::span<const sal_Int32> pDXArray ) const
 {
     rResultVector.clear();
 
diff --git a/vcl/workben/vcldemo.cxx b/vcl/workben/vcldemo.cxx
index 61c2d650fbb7..372a96d3126f 100644
--- a/vcl/workben/vcldemo.cxx
+++ b/vcl/workben/vcldemo.cxx
@@ -630,7 +630,7 @@ public:
                 }
 
                 // DX array rendering
-                std::vector<tools::Long> aItems;
+                std::vector<sal_Int32> aItems;
                 rDev.GetTextArray(aText, &aItems);
                 for (tools::Long j = 0; j < aText.getLength(); ++j)
                 {

Reply via email to