diff options
author | NirnayK <nirnaykorde@gmail.com> | 2023-03-06 18:30:00 +0530 |
---|---|---|
committer | Andreas Heinisch <andreas.heinisch@yahoo.de> | 2023-03-15 13:43:03 +0000 |
commit | 158be75c71a2a22f108685bc03c64dbac77e9b73 (patch) | |
tree | 830f0bcea6247463a3da7c5d3e9b9241aba64ed5 | |
parent | 8d024174dcb95c86400f47556738d092487ce429 (diff) |
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 <andreas.heinisch@yahoo.de>
Tested-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
-rw-r--r-- | chart2/source/controller/dialogs/tp_AxisPositions.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/app/AppController.cxx | 2 | ||||
-rw-r--r-- | editeng/source/outliner/outliner.cxx | 2 |
3 files changed, 3 insertions, 3 deletions
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; |