filter/source/svg/svgexport.cxx |    8 ++++----
 filter/source/svg/svgfilter.cxx |    4 ++--
 filter/source/svg/svgwriter.cxx |   20 ++++++++++----------
 filter/source/svg/svgwriter.hxx |    4 ++--
 4 files changed, 18 insertions(+), 18 deletions(-)

New commits:
commit 116340b2bab8365c08bec532e1a7126b5312e159
Author:     Julien Nabet <serval2...@yahoo.fr>
AuthorDate: Thu Oct 21 17:44:20 2021 +0200
Commit:     Julien Nabet <serval2...@yahoo.fr>
CommitDate: Fri Oct 22 08:29:55 2021 +0200

    Use size_t instead of sal_uLong in filter/source/svg
    
    Change-Id: I741307bdecbb6e5104a8fcdf892ea609671ae6fa
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124032
    Tested-by: Jenkins
    Reviewed-by: Julien Nabet <serval2...@yahoo.fr>

diff --git a/filter/source/svg/svgexport.cxx b/filter/source/svg/svgexport.cxx
index 0e0ba464e762..8eb8e8ccfe42 100644
--- a/filter/source/svg/svgexport.cxx
+++ b/filter/source/svg/svgexport.cxx
@@ -2404,8 +2404,8 @@ bool SVGFilter::implCreateObjectsFromShape( const 
Reference< css::drawing::XDraw
                                     MetaAction*   pAction;
                                     bool bIsTextShapeStarted = false;
                                     const GDIMetaFile& rMtf = 
aGraphic.GetGDIMetaFile();
-                                    sal_uLong nCount = rMtf.GetActionSize();
-                                    for( sal_uLong nCurAction = 0; nCurAction 
< nCount; ++nCurAction )
+                                    size_t nCount = rMtf.GetActionSize();
+                                    for( size_t nCurAction = 0; nCurAction < 
nCount; ++nCurAction )
                                     {
                                         pAction = rMtf.GetAction( nCurAction );
                                         const MetaActionType nType = 
pAction->GetType();
@@ -2510,8 +2510,8 @@ void SVGFilter::implCreateObjectsFromBackground( const 
Reference< css::drawing::
     GDIMetaFile aTiledMtf;
     bool bBitmapFound = false;
     MetaAction* pAction;
-    sal_uLong nCount = aMtf.GetActionSize();
-    for( sal_uLong nCurAction = 0; nCurAction < nCount; ++nCurAction )
+    size_t nCount = aMtf.GetActionSize();
+    for( size_t nCurAction = 0; nCurAction < nCount; ++nCurAction )
     {
         pAction = aMtf.GetAction( nCurAction );
         const MetaActionType nType = pAction->GetType();
diff --git a/filter/source/svg/svgfilter.cxx b/filter/source/svg/svgfilter.cxx
index 830767a33458..e2a3279f86c1 100644
--- a/filter/source/svg/svgfilter.cxx
+++ b/filter/source/svg/svgfilter.cxx
@@ -660,7 +660,7 @@ private:
             return;
         }
 
-        const sal_uLong nStreamLen(aStream->remainingSize());
+        const sal_uInt64 nStreamLen(aStream->remainingSize());
 
         if(aStream->GetError())
         {
@@ -669,7 +669,7 @@ private:
 
         mnFirstRead = aStream->ReadBytes(
             &mnFirstBytes[0],
-            std::min(nStreamLen, sal_uLong(mnFirstBytesSize)));
+            std::min(nStreamLen, static_cast<sal_uInt64>(mnFirstBytesSize)));
 
         if(aStream->GetError())
         {
diff --git a/filter/source/svg/svgwriter.cxx b/filter/source/svg/svgwriter.cxx
index a386ad935fb4..43386384cfcb 100644
--- a/filter/source/svg/svgwriter.cxx
+++ b/filter/source/svg/svgwriter.cxx
@@ -586,18 +586,18 @@ bool SVGTextWriter::implGetTextPositionFromBitmap( const 
MetaAction* pAction, Po
  *     0 if no text found and end of text shape is reached
  *     1 if text found!
  */
-sal_Int32 SVGTextWriter::setTextPosition(const GDIMetaFile& rMtf, sal_uLong& 
nCurAction,
+sal_Int32 SVGTextWriter::setTextPosition(const GDIMetaFile& rMtf, size_t& 
nCurAction,
                                          sal_uInt32 nWriteFlags)
 {
     Point aPos;
-    sal_uLong nCount = rMtf.GetActionSize();
+    size_t nCount = rMtf.GetActionSize();
     bool bEOL = false;
     bool bEOP = false;
     bool bETS = false;
     bool bConfigured = false;
     bool bEmpty = true;
 
-    sal_uLong nActionIndex = nCurAction + 1;
+    size_t nActionIndex = nCurAction + 1;
     for( ; nActionIndex < nCount; ++nActionIndex )
     {
         const MetaAction*    pAction = rMtf.GetAction( nActionIndex );
@@ -628,7 +628,7 @@ sal_Int32 SVGTextWriter::setTextPosition(const GDIMetaFile& 
rMtf, sal_uLong& nCu
                 const MetaFloatTransparentAction* pA
                     = static_cast<const MetaFloatTransparentAction*>(pAction);
                 GDIMetaFile aTmpMtf(pA->GetGDIMetaFile());
-                sal_uLong nTmpAction = 0;
+                size_t nTmpAction = 0;
                 if (setTextPosition(aTmpMtf, nTmpAction, nWriteFlags) == 1)
                 {
                     // Text is found in the inner metafile.
@@ -726,12 +726,12 @@ sal_Int32 SVGTextWriter::setTextPosition(const 
GDIMetaFile& rMtf, sal_uLong& nCu
 }
 
 
-void SVGTextWriter::setTextProperties( const GDIMetaFile& rMtf, sal_uLong 
nCurAction )
+void SVGTextWriter::setTextProperties( const GDIMetaFile& rMtf, size_t 
nCurAction )
 {
-    sal_uLong nCount = rMtf.GetActionSize();
+    size_t nCount = rMtf.GetActionSize();
     bool bEOP = false;
     bool bConfigured = false;
-    for( sal_uLong nActionIndex = nCurAction + 1; nActionIndex < nCount; 
++nActionIndex )
+    for( size_t nActionIndex = nCurAction + 1; nActionIndex < nCount; 
++nActionIndex )
     {
         const MetaAction*    pAction = rMtf.GetAction( nActionIndex );
         const MetaActionType nType = pAction->GetType();
@@ -1483,8 +1483,8 @@ void SVGTextWriter::implWriteEmbeddedBitmaps()
     BitmapChecksum nId, nChecksum = 0;
     Point aPt;
     Size  aSz;
-    sal_uLong nCount = rMtf.GetActionSize();
-    for( sal_uLong nCurAction = 0; nCurAction < nCount; nCurAction++ )
+    size_t nCount = rMtf.GetActionSize();
+    for( size_t nCurAction = 0; nCurAction < nCount; nCurAction++ )
     {
 
         const MetaAction*    pAction = rMtf.GetAction( nCurAction );
@@ -2973,7 +2973,7 @@ void SVGActionWriter::ImplWriteActions( const 
GDIMetaFile& rMtf,
         pElementId = nullptr;
     }
 
-    for( sal_uLong nCurAction = 0, nCount = rMtf.GetActionSize(); nCurAction < 
nCount; nCurAction++ )
+    for( size_t nCurAction = 0, nCount = rMtf.GetActionSize(); nCurAction < 
nCount; nCurAction++ )
     {
         const MetaAction*    pAction = rMtf.GetAction( nCurAction );
         const MetaActionType nType = pAction->GetType();
diff --git a/filter/source/svg/svgwriter.hxx b/filter/source/svg/svgwriter.hxx
index f37246bf2edb..348c77be1a86 100644
--- a/filter/source/svg/svgwriter.hxx
+++ b/filter/source/svg/svgwriter.hxx
@@ -241,9 +241,9 @@ class SVGTextWriter final
             SVGActionWriter& mrActionWriter);
     ~SVGTextWriter();
 
-    sal_Int32 setTextPosition(const GDIMetaFile& rMtf, sal_uLong& nCurAction,
+    sal_Int32 setTextPosition(const GDIMetaFile& rMtf, size_t& nCurAction,
                               sal_uInt32 nWriteFlags);
-    void setTextProperties( const GDIMetaFile& rMtf, sal_uLong nCurAction );
+    void setTextProperties( const GDIMetaFile& rMtf, size_t nCurAction );
     void addFontAttributes( bool bIsTextContainer );
 
     void createParagraphEnumeration();

Reply via email to