chart2/source/controller/dialogs/tp_AxisPositions.cxx |    2 +-
 dbaccess/source/ui/app/AppController.cxx              |    2 +-
 editeng/source/outliner/outliner.cxx                  |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 158be75c71a2a22f108685bc03c64dbac77e9b73
Author:     NirnayK <[email protected]>
AuthorDate: Mon Mar 6 18:30:00 2023 +0530
Commit:     Andreas Heinisch <[email protected]>
CommitDate: Wed Mar 15 13:43:03 2023 +0000

    tdf#114441: Convert use of sal_uLong to better integer types
    
    In tp_AxisPosition.cxx the sal_uLong has been changed to sal_uInt32 as the 
GetValue returns a 32 bit integer
    In outliner.cxx the sal_uLong is converted to sal_uInt64 as the the sum of 
2 sal_uInt32 might exceed 32 bits
    
    
    Change-Id: I560faf952520078f6a0747dfdec8a3039927e5c1
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148335
    Reviewed-by: Andreas Heinisch <[email protected]>
    Tested-by: Andreas Heinisch <[email protected]>

diff --git a/chart2/source/controller/dialogs/tp_AxisPositions.cxx 
b/chart2/source/controller/dialogs/tp_AxisPositions.cxx
index dc1eb926ecfd..8a31c73f3dfc 100644
--- a/chart2/source/controller/dialogs/tp_AxisPositions.cxx
+++ b/chart2/source/controller/dialogs/tp_AxisPositions.cxx
@@ -262,7 +262,7 @@ void AxisPositionsTabPage::SetNumFormatter( 
SvNumberFormatter* pFormatter )
 
     if( const SfxUInt32Item* pNumFormatItem = 
GetItemSet().GetItemIfSet(SCHATTR_AXIS_CROSSING_MAIN_AXIS_NUMBERFORMAT) )
     {
-        sal_uLong nFmt = pNumFormatItem->GetValue();
+        sal_uInt32 nFmt = pNumFormatItem->GetValue();
         rCrossFormatter.SetFormatKey(nFmt);
     }
 }
diff --git a/dbaccess/source/ui/app/AppController.cxx 
b/dbaccess/source/ui/app/AppController.cxx
index bb16c0173ff4..ad18bff5892c 100644
--- a/dbaccess/source/ui/app/AppController.cxx
+++ b/dbaccess/source/ui/app/AppController.cxx
@@ -1025,7 +1025,7 @@ void OApplicationController::Execute(sal_uInt16 _nId, 
const Sequence< PropertyVa
                         {
                             if ( pIter->Name == "FormatStringId" )
                             {
-                                sal_uLong nTmp;
+                                sal_uInt32 nTmp;
                                 if ( pIter->Value >>= nTmp )
                                     
pasteFormat(static_cast<SotClipboardFormatId>(nTmp));
                                 break;
diff --git a/editeng/source/outliner/outliner.cxx 
b/editeng/source/outliner/outliner.cxx
index fa0e7958ce79..72340587ba05 100644
--- a/editeng/source/outliner/outliner.cxx
+++ b/editeng/source/outliner/outliner.cxx
@@ -359,7 +359,7 @@ sal_Int32 Outliner::GetBulletsNumberingStatus() const
 
 std::optional<OutlinerParaObject> Outliner::CreateParaObject( sal_Int32 
nStartPara, sal_Int32 nCount ) const
 {
-    if ( static_cast<sal_uLong>(nStartPara) + nCount >
+    if ( static_cast<sal_uInt64>(nStartPara) + nCount >
             o3tl::make_unsigned(pParaList->GetParagraphCount()) )
         nCount = pParaList->GetParagraphCount() - nStartPara;
 

Reply via email to