cui/source/tabpages/swpossizetabpage.cxx | 3 ++- forms/source/richtext/rtattributehandler.cxx | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-)
New commits: commit 855bf4d68865ef046c8f527bf19e3ec78c7b033a Author: Nalini Prasad Dash <nnnalinid...@protonmail.com> AuthorDate: Wed Nov 23 17:09:55 2022 +0530 Commit: Stephan Bergmann <sberg...@redhat.com> CommitDate: Thu Dec 8 22:44:38 2022 +0000 tdf#114441 - Convert use of sal_uLong to better integer types The variable type of nHeight was changed as the return type of pFontHeightItem->GetHeight() is sal_uInt32.Also nBit was assigned the underlying datatype of LB(int) as it was checked against LB::LAST(Value converted to underlying datatype of LB) in the for loop . Change-Id: I657d545ac7af1786edd61569ba43b42e55d1f47b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143145 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sberg...@redhat.com> diff --git a/cui/source/tabpages/swpossizetabpage.cxx b/cui/source/tabpages/swpossizetabpage.cxx index e8a1e4eb9df4..060f7b44ce9f 100644 --- a/cui/source/tabpages/swpossizetabpage.cxx +++ b/cui/source/tabpages/swpossizetabpage.cxx @@ -19,6 +19,7 @@ #include <memory> #include <cstddef> +#include <type_traits> #include <swpossizetabpage.hxx> #include <svx/dlgutil.hxx> #include <svx/anchorid.hxx> @@ -1696,7 +1697,7 @@ void SvxSwPosSizeTabPage::FillRelLB(FrmMap const *pMap, sal_uInt16 nMapPos, sal_ nLBRelations = pMap[nMapPos].nLBRelations; } - for (sal_uLong nBit = 1; nBit < sal_uLong(LB::LAST); nBit <<= 1) + for (std::underlying_type_t<LB> nBit = 1; nBit < o3tl::to_underlying(LB::LAST) ; nBit <<= 1) { if (nLBRelations & static_cast<LB>(nBit)) { diff --git a/forms/source/richtext/rtattributehandler.cxx b/forms/source/richtext/rtattributehandler.cxx index 582b451a8423..b5cfb55b7820 100644 --- a/forms/source/richtext/rtattributehandler.cxx +++ b/forms/source/richtext/rtattributehandler.cxx @@ -320,7 +320,7 @@ namespace frm if ( pFontHeightItem ) { // by definition, the item should have the unit twip - sal_uLong nHeight = pFontHeightItem->GetHeight(); + sal_uInt32 nHeight = pFontHeightItem->GetHeight(); if ( _rAttribs.GetPool()->GetMetric( getWhich() ) != MapUnit::MapTwip ) { nHeight = OutputDevice::LogicToLogic( @@ -347,7 +347,7 @@ namespace frm if ( !pFontHeightItem ) return; - sal_uLong nHeight = pFontHeightItem->GetHeight(); + sal_uInt32 nHeight = pFontHeightItem->GetHeight(); if ( _rNewAttribs.GetPool()->GetMetric( getWhich() ) != MapUnit::MapTwip ) { nHeight = OutputDevice::LogicToLogic(