[Libreoffice-commits] core.git: basctl/source idl/inc idl/source

Ahmet Hakan Çelik (via logerrit) logerrit at kemper.freedesktop.org
Tue Mar 16 10:45:45 UTC 2021


 basctl/source/dlged/dlged.cxx |    4 ++--
 idl/inc/types.hxx             |    6 +++---
 idl/source/objects/types.cxx  |   12 ++++++------
 3 files changed, 11 insertions(+), 11 deletions(-)

New commits:
commit 0726ecd9e2f2d94e9f49eb40d2b4952475e02764
Author:     Ahmet Hakan Çelik <ahmethcelik at gmail.com>
AuthorDate: Mon Mar 8 11:13:46 2021 +0300
Commit:     Michael Stahl <michael.stahl at allotropia.de>
CommitDate: Tue Mar 16 11:45:04 2021 +0100

    tdf#114441: Convert use of sal_uLong to better integer types
    
    Change-Id: I173d57105429e2bdf2288678fa7911b8541a402b
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112154
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <michael.stahl at allotropia.de>

diff --git a/basctl/source/dlged/dlged.cxx b/basctl/source/dlged/dlged.cxx
index d74d375357ce..9ddb6adbc8a5 100644
--- a/basctl/source/dlged/dlged.cxx
+++ b/basctl/source/dlged/dlged.cxx
@@ -278,8 +278,8 @@ void DlgEditor::InitScrollBars()
 
     pHScroll->SetRange( Range( 0, aPgSize.Width()  ));
     pVScroll->SetRange( Range( 0, aPgSize.Height() ));
-    pHScroll->SetVisibleSize( static_cast<sal_uLong>(aOutSize.Width()) );
-    pVScroll->SetVisibleSize( static_cast<sal_uLong>(aOutSize.Height()) );
+    pHScroll->SetVisibleSize( aOutSize.Width() );
+    pVScroll->SetVisibleSize( aOutSize.Height() );
 
     pHScroll->SetLineSize( aOutSize.Width() / 10 );
     pVScroll->SetLineSize( aOutSize.Height() / 10 );
diff --git a/idl/inc/types.hxx b/idl/inc/types.hxx
index 97c353b36541..298e863c6663 100644
--- a/idl/inc/types.hxx
+++ b/idl/inc/types.hxx
@@ -44,7 +44,7 @@ public:
 
     virtual bool        Test( SvTokenStream & rInStm );
     virtual bool        ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ) override;
-    sal_uLong           MakeSfx( OStringBuffer& rAtrrArray ) const;
+    size_t           MakeSfx( OStringBuffer& rAtrrArray ) const;
     virtual void        Insert( SvSlotElementList& );
 };
 
@@ -70,7 +70,7 @@ public:
 
     SvRefMemberList<SvMetaAttribute *>&
                         GetAttrList() { return aAttrList; }
-    sal_uLong           GetAttrCount() const { return aAttrList.size(); }
+    size_t           GetAttrCount() const { return aAttrList.size(); }
 
     void                SetType( MetaTypeType nT );
     MetaTypeType        GetMetaTypeType() const { return nType; }
@@ -81,7 +81,7 @@ public:
 
     virtual bool        ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ) override;
 
-    sal_uLong           MakeSfx( OStringBuffer& rAtrrArray );
+    size_t           MakeSfx( OStringBuffer& rAtrrArray );
     virtual void        WriteSfx( SvIdlDataBase & rBase, SvStream & rOutStm );
     bool                ReadMethodArgs( SvIdlDataBase & rBase,
                                         SvTokenStream & rInStm );
diff --git a/idl/source/objects/types.cxx b/idl/source/objects/types.cxx
index 9cb1684caffc..a0238d9b4c78 100644
--- a/idl/source/objects/types.cxx
+++ b/idl/source/objects/types.cxx
@@ -96,7 +96,7 @@ bool SvMetaAttribute::ReadSvIdl( SvIdlDataBase & rBase,
     return bOk;
 }
 
-sal_uLong SvMetaAttribute::MakeSfx( OStringBuffer& rAttrArray ) const
+size_t SvMetaAttribute::MakeSfx( OStringBuffer& rAttrArray ) const
 {
     SvMetaType * pType = GetType();
     DBG_ASSERT( pType, "no type for attribute" );
@@ -199,15 +199,15 @@ void SvMetaType::ReadContextSvIdl( SvIdlDataBase & rBase,
     }
 }
 
-sal_uLong SvMetaType::MakeSfx( OStringBuffer& rAttrArray )
+size_t SvMetaType::MakeSfx( OStringBuffer& rAttrArray )
 {
-    sal_uLong nC = 0;
+    size_t nC = 0;
 
     if( GetBaseType()->GetMetaTypeType() == MetaTypeType::Struct )
     {
-        sal_uLong nAttrCount = GetAttrCount();
+        size_t nAttrCount = GetAttrCount();
         // write the single attributes
-        for( sal_uLong n = 0; n < nAttrCount; n++ )
+        for( size_t n = 0; n < nAttrCount; n++ )
         {
             nC += aAttrList[n]->MakeSfx( rAttrArray );
             if( n +1 < nAttrCount )
@@ -224,7 +224,7 @@ void SvMetaType::WriteSfxItem(
     OString aVarName = " a" + rItemName + "_Impl";
 
     OStringBuffer aAttrArray(1024);
-    sal_uLong   nAttrCount = MakeSfx( aAttrArray );
+    size_t   nAttrCount = MakeSfx( aAttrArray );
     OString aAttrCount( OString::number(nAttrCount));
     OString aTypeName = "SfxType" + aAttrCount;
 


More information about the Libreoffice-commits mailing list