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 <sbergman@redhat.com>
This commit is contained in:
committed by
Stephan Bergmann
parent
0569a84c16
commit
855bf4d688
@@ -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))
|
||||
{
|
||||
|
@@ -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(
|
||||
|
Reference in New Issue
Block a user