[Libreoffice-commits] core.git: editeng/source include/editeng

Noel Grandin noel.grandin at collabora.co.uk
Mon Nov 6 08:49:57 UTC 2017


 editeng/source/items/numitem.cxx |    6 +++---
 include/editeng/numitem.hxx      |    4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)

New commits:
commit de05d4ee53b5ff0e7404058cef6d3a311e6b35e4
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Mon Nov 6 08:26:34 2017 +0200

    convert GetNumStr from sal_uLong->sal_Int32
    
    the code was truncating the param to sal_Int32 anyway
    
    Change-Id: I743b60097df937c16c995e2e6deacc12cf12e5e9
    Reviewed-on: https://gerrit.libreoffice.org/44341
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/editeng/source/items/numitem.cxx b/editeng/source/items/numitem.cxx
index 24a612f93d4c..6e0d175f029d 100644
--- a/editeng/source/items/numitem.cxx
+++ b/editeng/source/items/numitem.cxx
@@ -98,7 +98,7 @@ SvxNumberType::~SvxNumberType()
         xFormatter = nullptr;
 }
 
-OUString SvxNumberType::GetNumStr( sal_uLong nNo ) const
+OUString SvxNumberType::GetNumStr( sal_Int32 nNo ) const
 {
     LanguageTag aLang = utl::ConfigManager::IsAvoidConfig() ?
         LanguageTag("en-US") :
@@ -106,7 +106,7 @@ OUString SvxNumberType::GetNumStr( sal_uLong nNo ) const
     return GetNumStr( nNo, aLang.getLocale() );
 }
 
-OUString SvxNumberType::GetNumStr( sal_uLong nNo, const css::lang::Locale& rLocale ) const
+OUString SvxNumberType::GetNumStr( sal_Int32 nNo, const css::lang::Locale& rLocale ) const
 {
     lcl_getFormatter(xFormatter);
     if(!xFormatter.is())
@@ -131,7 +131,7 @@ OUString SvxNumberType::GetNumStr( sal_uLong nNo, const css::lang::Locale& rLoca
                         pValues[0].Name = "NumberingType";
                         pValues[0].Value <<= (sal_uInt16)nNumType;
                         pValues[1].Name = "Value";
-                        pValues[1].Value <<= (sal_Int32)nNo;
+                        pValues[1].Value <<= nNo;
 
                         try
                         {
diff --git a/include/editeng/numitem.hxx b/include/editeng/numitem.hxx
index c898e3dc8045..177a360d8b41 100644
--- a/include/editeng/numitem.hxx
+++ b/include/editeng/numitem.hxx
@@ -66,8 +66,8 @@ public:
     SvxNumberType(const SvxNumberType& rType);
     ~SvxNumberType();
 
-    OUString        GetNumStr( sal_uLong nNo ) const;
-    OUString        GetNumStr( sal_uLong nNo, const css::lang::Locale& rLocale ) const;
+    OUString        GetNumStr( sal_Int32 nNo ) const;
+    OUString        GetNumStr( sal_Int32 nNo, const css::lang::Locale& rLocale ) const;
 
     void            SetNumberingType(SvxNumType nSet) {nNumType = nSet;}
     SvxNumType      GetNumberingType() const {return nNumType;}


More information about the Libreoffice-commits mailing list