editeng/source/items/svxfont.cxx  |    2 +-
 include/vcl/outdev.hxx            |    2 +-
 include/vcl/pdfwriter.hxx         |    2 +-
 vcl/inc/pdf/pdfwriter_impl.hxx    |    2 +-
 vcl/source/gdi/pdfwriter.cxx      |    2 +-
 vcl/source/gdi/pdfwriter_impl.cxx |    2 +-
 vcl/source/outdev/text.cxx        |    2 +-
 7 files changed, 7 insertions(+), 7 deletions(-)

New commits:
commit d3a5a97f77378421f17b1fa43d0b88dde8bc686a
Author:     Andrea Rosetti <andreamassim...@gmail.com>
AuthorDate: Wed Nov 30 15:32:25 2022 +0100
Commit:     Hossein <hoss...@libreoffice.org>
CommitDate: Tue Jan 3 22:42:13 2023 +0000

    tdf#114441 Convert sal_uLong to a better type
    
    Used sal_Int32 instead of sal_uLong
    
    Change-Id: I229c4e59054b3aa1885698d1cd5332ebd9d162d6
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143513
    Tested-by: Jenkins
    Reviewed-by: Hossein <hoss...@libreoffice.org>

diff --git a/editeng/source/items/svxfont.cxx b/editeng/source/items/svxfont.cxx
index b484a645a7f6..b57449f3c359 100644
--- a/editeng/source/items/svxfont.cxx
+++ b/editeng/source/items/svxfont.cxx
@@ -789,7 +789,7 @@ void SvxDoDrawCapital::DoSpace( const bool bDraw )
     if ( !(bDraw || pFont->IsWordLineMode()) )
         return;
 
-    sal_uLong nDiff = static_cast<sal_uLong>(aPos.X() - aSpacePos.X());
+    sal_Int32 nDiff = static_cast<sal_Int32>(aPos.X() - aSpacePos.X());
     if ( nDiff )
     {
         bool bWordWise = pFont->IsWordLineMode();
diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx
index b2053f412b49..d550ecfce293 100644
--- a/include/vcl/outdev.hxx
+++ b/include/vcl/outdev.hxx
@@ -1050,7 +1050,7 @@ public:
     void                        GetCaretPositions( const OUString&, sal_Int32* 
pCaretXArray,
                                               sal_Int32 nIndex, sal_Int32 nLen,
                                               const SalLayoutGlyphs* pGlyphs = 
nullptr ) const;
-    void                        DrawStretchText( const Point& rStartPt, 
sal_uLong nWidth,
+    void                        DrawStretchText( const Point& rStartPt, 
sal_Int32 nWidth,
                                                  const OUString& rStr,
                                                  sal_Int32 nIndex = 0, 
sal_Int32 nLen = -1);
     sal_Int32                   GetTextBreak( const OUString& rStr, 
tools::Long nTextWidth,
diff --git a/include/vcl/pdfwriter.hxx b/include/vcl/pdfwriter.hxx
index 8aeade99f504..f98f2c231261 100644
--- a/include/vcl/pdfwriter.hxx
+++ b/include/vcl/pdfwriter.hxx
@@ -769,7 +769,7 @@ The following structure describes the permissions used in 
PDF security
                                        o3tl::span<const sal_Bool> pKashidaAry,
                                        sal_Int32 nIndex,
                                        sal_Int32 nLen );
-    void                DrawStretchText( const Point& rStartPt, sal_uLong 
nWidth,
+    void                DrawStretchText( const Point& rStartPt, sal_Int32 
nWidth,
                                          const OUString& rStr,
                                          sal_Int32 nIndex, sal_Int32 nLen );
     void                DrawText( const tools::Rectangle& rRect,
diff --git a/vcl/inc/pdf/pdfwriter_impl.hxx b/vcl/inc/pdf/pdfwriter_impl.hxx
index e8ce5163177f..ea7c3d3462ab 100644
--- a/vcl/inc/pdf/pdfwriter_impl.hxx
+++ b/vcl/inc/pdf/pdfwriter_impl.hxx
@@ -1231,7 +1231,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, 
KernArraySpan pDXArray, o3tl::span<const sal_Bool> pKashidaArray, sal_Int32 
nIndex, sal_Int32 nLen );
-    void drawStretchText( const Point& rPos, sal_uLong nWidth, const OUString& 
rText,
+    void drawStretchText( const Point& rPos, sal_Int32 nWidth, const OUString& 
rText,
                           sal_Int32 nIndex, sal_Int32 nLen  );
     void drawText( const tools::Rectangle& rRect, const OUString& rOrigStr, 
DrawTextFlags nStyle );
     void drawTextLine( const Point& rPos, tools::Long nWidth, FontStrikeout 
eStrikeout, FontLineStyle eUnderline, FontLineStyle eOverline, bool 
bUnderlineAbove );
diff --git a/vcl/source/gdi/pdfwriter.cxx b/vcl/source/gdi/pdfwriter.cxx
index 8b206debfbc1..294d071db154 100644
--- a/vcl/source/gdi/pdfwriter.cxx
+++ b/vcl/source/gdi/pdfwriter.cxx
@@ -91,7 +91,7 @@ void PDFWriter::DrawTextArray(
 
 void PDFWriter::DrawStretchText(
                                 const Point& rStartPt,
-                                sal_uLong nWidth,
+                                sal_Int32 nWidth,
                                 const OUString& rStr,
                                 sal_Int32 nIndex,
                                 sal_Int32 nLen )
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx 
b/vcl/source/gdi/pdfwriter_impl.cxx
index d95a74aeb6af..99c1b1e27e84 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -6990,7 +6990,7 @@ void PDFWriterImpl::drawTextArray( const Point& rPos, 
const OUString& rText, Ker
     }
 }
 
-void PDFWriterImpl::drawStretchText( const Point& rPos, sal_uLong nWidth, 
const OUString& rText, sal_Int32 nIndex, sal_Int32 nLen )
+void PDFWriterImpl::drawStretchText( const Point& rPos, sal_Int32 nWidth, 
const OUString& rText, sal_Int32 nIndex, sal_Int32 nLen )
 {
     MARK( "drawStretchText" );
 
diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx
index f66ece92d48b..587f98e10010 100644
--- a/vcl/source/outdev/text.cxx
+++ b/vcl/source/outdev/text.cxx
@@ -1110,7 +1110,7 @@ void OutputDevice::GetCaretPositions( const OUString& 
rStr, sal_Int32* pCaretXAr
     }
 }
 
-void OutputDevice::DrawStretchText( const Point& rStartPt, sal_uLong nWidth,
+void OutputDevice::DrawStretchText( const Point& rStartPt, sal_Int32 nWidth,
                                     const OUString& rStr,
                                     sal_Int32 nIndex, sal_Int32 nLen)
 {

Reply via email to