Kaydet (Commit) 202fc3fc authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Improved loplugin:redundantcast (const-qualified typedefs): editeng

Change-Id: I1beefd1a3ae24361b5345d9c226c410493c363d8
Reviewed-on: https://gerrit.libreoffice.org/56694
Tested-by: Jenkins
Reviewed-by: 's avatarStephan Bergmann <sbergman@redhat.com>
üst 2be04013
...@@ -374,7 +374,7 @@ void EditDbg::ShowEditEngineData( EditEngine* pEE, bool bInfoBox ) ...@@ -374,7 +374,7 @@ void EditDbg::ShowEditEngineData( EditEngine* pEE, bool bInfoBox )
const sal_Int32 nTextPortions = pPPortion->GetTextPortions().Count(); const sal_Int32 nTextPortions = pPPortion->GetTextPortions().Count();
OStringBuffer aPortionStr("\nText portions: #"); OStringBuffer aPortionStr("\nText portions: #");
aPortionStr.append(static_cast<sal_Int32>(nTextPortions)); aPortionStr.append(nTextPortions);
aPortionStr.append(" \nA"); aPortionStr.append(" \nA");
aPortionStr.append(nPortion); aPortionStr.append(nPortion);
aPortionStr.append(": Paragraph Length = "); aPortionStr.append(": Paragraph Length = ");
......
...@@ -100,7 +100,7 @@ uno::Any SvxItemPropertySet::getPropertyValue( const SfxItemPropertySimpleEntry* ...@@ -100,7 +100,7 @@ uno::Any SvxItemPropertySet::getPropertyValue( const SfxItemPropertySimpleEntry*
if( nullptr == pItem && pPool ) if( nullptr == pItem && pPool )
pItem = &(pPool->GetDefaultItem( pMap->nWID )); pItem = &(pPool->GetDefaultItem( pMap->nWID ));
const MapUnit eMapUnit = pPool ? pPool->GetMetric(static_cast<sal_uInt16>(pMap->nWID)) : MapUnit::Map100thMM; const MapUnit eMapUnit = pPool ? pPool->GetMetric(pMap->nWID) : MapUnit::Map100thMM;
sal_uInt8 nMemberId = pMap->nMemberId; sal_uInt8 nMemberId = pMap->nMemberId;
if( eMapUnit == MapUnit::Map100thMM ) if( eMapUnit == MapUnit::Map100thMM )
nMemberId &= (~CONVERT_TWIPS); nMemberId &= (~CONVERT_TWIPS);
...@@ -161,7 +161,7 @@ void SvxItemPropertySet::setPropertyValue( const SfxItemPropertySimpleEntry* pMa ...@@ -161,7 +161,7 @@ void SvxItemPropertySet::setPropertyValue( const SfxItemPropertySimpleEntry* pMa
{ {
uno::Any aValue( rVal ); uno::Any aValue( rVal );
const MapUnit eMapUnit = pPool ? pPool->GetMetric(static_cast<sal_uInt16>(pMap->nWID)) : MapUnit::Map100thMM; const MapUnit eMapUnit = pPool ? pPool->GetMetric(pMap->nWID) : MapUnit::Map100thMM;
// check for needed metric translation // check for needed metric translation
if( (pMap->nMoreFlags & PropertyMoreFlags::METRIC_ITEM) && eMapUnit != MapUnit::Map100thMM ) if( (pMap->nMoreFlags & PropertyMoreFlags::METRIC_ITEM) && eMapUnit != MapUnit::Map100thMM )
...@@ -195,7 +195,7 @@ uno::Any SvxItemPropertySet::getPropertyValue( const SfxItemPropertySimpleEntry* ...@@ -195,7 +195,7 @@ uno::Any SvxItemPropertySet::getPropertyValue( const SfxItemPropertySimpleEntry*
return *pUsrAny; return *pUsrAny;
// No UsrAny detected yet, generate Default entry and return this // No UsrAny detected yet, generate Default entry and return this
const MapUnit eMapUnit = mrItemPool.GetMetric(static_cast<sal_uInt16>(pMap->nWID)); const MapUnit eMapUnit = mrItemPool.GetMetric(pMap->nWID);
sal_uInt8 nMemberId = pMap->nMemberId; sal_uInt8 nMemberId = pMap->nMemberId;
if( eMapUnit == MapUnit::Map100thMM ) if( eMapUnit == MapUnit::Map100thMM )
nMemberId &= (~CONVERT_TWIPS); nMemberId &= (~CONVERT_TWIPS);
......
...@@ -582,9 +582,9 @@ uno::Any SAL_CALL SvxUnoTextRangeBase::getPropertyValue(const OUString& Property ...@@ -582,9 +582,9 @@ uno::Any SAL_CALL SvxUnoTextRangeBase::getPropertyValue(const OUString& Property
const ESelection& rSel = GetSelection(); const ESelection& rSel = GetSelection();
text::TextRangeSelection aSel; text::TextRangeSelection aSel;
aSel.Start.Paragraph = rSel.nStartPara; aSel.Start.Paragraph = rSel.nStartPara;
aSel.Start.PositionInParagraph = static_cast<sal_Int32>(rSel.nStartPos); aSel.Start.PositionInParagraph = rSel.nStartPos;
aSel.End.Paragraph = rSel.nEndPara; aSel.End.Paragraph = rSel.nEndPara;
aSel.End.PositionInParagraph = static_cast<sal_Int32>(rSel.nEndPos); aSel.End.PositionInParagraph = rSel.nEndPos;
return uno::makeAny(aSel); return uno::makeAny(aSel);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment