summaryrefslogtreecommitdiff
path: root/svx/source/items
diff options
context:
space:
mode:
Diffstat (limited to 'svx/source/items')
-rw-r--r--svx/source/items/algitem.cxx32
-rw-r--r--svx/source/items/hlnkitem.cxx4
-rw-r--r--svx/source/items/numfmtsh.cxx22
-rw-r--r--svx/source/items/pageitem.cxx2
-rw-r--r--svx/source/items/viewlayoutitem.cxx6
-rw-r--r--svx/source/items/zoomslideritem.cxx10
6 files changed, 38 insertions, 38 deletions
diff --git a/svx/source/items/algitem.cxx b/svx/source/items/algitem.cxx
index c8c3623dce5d..a6464bf11161 100644
--- a/svx/source/items/algitem.cxx
+++ b/svx/source/items/algitem.cxx
@@ -201,31 +201,31 @@ bool SvxMarginItem::GetPresentation
{
case SfxItemPresentation::Nameless:
{
- rText = GetMetricText( (long)nLeftMargin, eCoreUnit, ePresUnit, &rIntl ) +
+ rText = GetMetricText( static_cast<long>(nLeftMargin), eCoreUnit, ePresUnit, &rIntl ) +
cpDelimTmp +
- GetMetricText( (long)nTopMargin, eCoreUnit, ePresUnit, &rIntl ) +
+ GetMetricText( static_cast<long>(nTopMargin), eCoreUnit, ePresUnit, &rIntl ) +
cpDelimTmp +
- GetMetricText( (long)nRightMargin, eCoreUnit, ePresUnit, &rIntl ) +
+ GetMetricText( static_cast<long>(nRightMargin), eCoreUnit, ePresUnit, &rIntl ) +
cpDelimTmp +
- GetMetricText( (long)nBottomMargin, eCoreUnit, ePresUnit, &rIntl );
+ GetMetricText( static_cast<long>(nBottomMargin), eCoreUnit, ePresUnit, &rIntl );
return true;
}
case SfxItemPresentation::Complete:
{
rText = SvxResId(RID_SVXITEMS_MARGIN_LEFT) +
- GetMetricText( (long)nLeftMargin, eCoreUnit, ePresUnit, &rIntl ) +
+ GetMetricText( static_cast<long>(nLeftMargin), eCoreUnit, ePresUnit, &rIntl ) +
" " + EditResId(GetMetricId(ePresUnit)) +
cpDelimTmp +
SvxResId(RID_SVXITEMS_MARGIN_TOP) +
- GetMetricText( (long)nTopMargin, eCoreUnit, ePresUnit, &rIntl ) +
+ GetMetricText( static_cast<long>(nTopMargin), eCoreUnit, ePresUnit, &rIntl ) +
" " + EditResId(GetMetricId(ePresUnit)) +
cpDelimTmp +
SvxResId(RID_SVXITEMS_MARGIN_RIGHT) +
- GetMetricText( (long)nRightMargin, eCoreUnit, ePresUnit, &rIntl ) +
+ GetMetricText( static_cast<long>(nRightMargin), eCoreUnit, ePresUnit, &rIntl ) +
" " + EditResId(GetMetricId(ePresUnit)) +
cpDelimTmp +
SvxResId(RID_SVXITEMS_MARGIN_BOTTOM) +
- GetMetricText( (long)nBottomMargin, eCoreUnit, ePresUnit, &rIntl ) +
+ GetMetricText( static_cast<long>(nBottomMargin), eCoreUnit, ePresUnit, &rIntl ) +
" " + EditResId(GetMetricId(ePresUnit));
return true;
}
@@ -284,16 +284,16 @@ bool SvxMarginItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
{
// now sign everything
case MID_MARGIN_L_MARGIN:
- rVal <<= (sal_Int32)( bConvert ? convertTwipToMm100(nLeftMargin) : nLeftMargin );
+ rVal <<= static_cast<sal_Int32>( bConvert ? convertTwipToMm100(nLeftMargin) : nLeftMargin );
break;
case MID_MARGIN_R_MARGIN:
- rVal <<= (sal_Int32)( bConvert ? convertTwipToMm100(nRightMargin) : nRightMargin );
+ rVal <<= static_cast<sal_Int32>( bConvert ? convertTwipToMm100(nRightMargin) : nRightMargin );
break;
case MID_MARGIN_UP_MARGIN:
- rVal <<= (sal_Int32)( bConvert ? convertTwipToMm100(nTopMargin) : nTopMargin );
+ rVal <<= static_cast<sal_Int32>( bConvert ? convertTwipToMm100(nTopMargin) : nTopMargin );
break;
case MID_MARGIN_LO_MARGIN:
- rVal <<= (sal_Int32)( bConvert ? convertTwipToMm100(nBottomMargin) : nBottomMargin );
+ rVal <<= static_cast<sal_Int32>( bConvert ? convertTwipToMm100(nBottomMargin) : nBottomMargin );
break;
default:
OSL_FAIL("unknown MemberId");
@@ -314,16 +314,16 @@ bool SvxMarginItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
switch ( nMemberId & ~CONVERT_TWIPS )
{
case MID_MARGIN_L_MARGIN:
- nLeftMargin = (sal_Int16)( bConvert ? convertMm100ToTwip(nVal) : nVal );
+ nLeftMargin = static_cast<sal_Int16>( bConvert ? convertMm100ToTwip(nVal) : nVal );
break;
case MID_MARGIN_R_MARGIN:
- nRightMargin = (sal_Int16)( bConvert ? convertMm100ToTwip(nVal) : nVal );
+ nRightMargin = static_cast<sal_Int16>( bConvert ? convertMm100ToTwip(nVal) : nVal );
break;
case MID_MARGIN_UP_MARGIN:
- nTopMargin = (sal_Int16)( bConvert ? convertMm100ToTwip(nVal) : nVal );
+ nTopMargin = static_cast<sal_Int16>( bConvert ? convertMm100ToTwip(nVal) : nVal );
break;
case MID_MARGIN_LO_MARGIN:
- nBottomMargin = (sal_Int16)( bConvert ? convertMm100ToTwip(nVal) : nVal );
+ nBottomMargin = static_cast<sal_Int16>( bConvert ? convertMm100ToTwip(nVal) : nVal );
break;
default:
OSL_FAIL("unknown MemberId");
diff --git a/svx/source/items/hlnkitem.cxx b/svx/source/items/hlnkitem.cxx
index 1783f1245f3d..4585b270d2d0 100644
--- a/svx/source/items/hlnkitem.cxx
+++ b/svx/source/items/hlnkitem.cxx
@@ -136,7 +136,7 @@ bool SvxHyperlinkItem::QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId ) co
rVal <<= sTarget;
break;
case MID_HLINK_TYPE:
- rVal <<= (sal_Int32) eType;
+ rVal <<= static_cast<sal_Int32>(eType);
break;
default:
return false;
@@ -175,7 +175,7 @@ bool SvxHyperlinkItem::PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId
case MID_HLINK_TYPE:
if(!(rVal >>= nVal))
return false;
- eType = (SvxLinkInsertMode) (sal_uInt16) nVal;
+ eType = (SvxLinkInsertMode) static_cast<sal_uInt16>(nVal);
break;
default:
return false;
diff --git a/svx/source/items/numfmtsh.cxx b/svx/source/items/numfmtsh.cxx
index 94d3df1cb181..6a23dd3b9d97 100644
--- a/svx/source/items/numfmtsh.cxx
+++ b/svx/source/items/numfmtsh.cxx
@@ -95,7 +95,7 @@ SvxNumberFormatShell::SvxNumberFormatShell( SvNumberFormatter* pNumFormatter,
, eCurLanguage (LANGUAGE_NONE)
, pCurCurrencyEntry(nullptr)
, bBankingSymbol (false)
- , nCurCurrencyEntryPos((sal_uInt16) SELPOS_NONE)
+ , nCurCurrencyEntryPos(sal_uInt16(SELPOS_NONE))
, bUseStarFormat (false)
, bIsDefaultValNum (true)
{
@@ -132,7 +132,7 @@ SvxNumberFormatShell::SvxNumberFormatShell( SvNumberFormatter* pNumFormatter,
, eCurLanguage (LANGUAGE_NONE)
, pCurCurrencyEntry(nullptr)
, bBankingSymbol (false)
- , nCurCurrencyEntryPos((sal_uInt16) SELPOS_NONE)
+ , nCurCurrencyEntryPos(sal_uInt16(SELPOS_NONE))
, bUseStarFormat (false)
, bIsDefaultValNum (false)
{
@@ -555,7 +555,7 @@ void SvxNumberFormatShell::GetInitSettings( sal_uInt16& nCatLbPos,
DBG_ASSERT( nSelPos != SELPOS_NONE, "Leere Formatliste!" );
- nFmtLbSelPos = (nSelPos != SELPOS_NONE) ? (sal_uInt16)nSelPos : 0;
+ nFmtLbSelPos = (nSelPos != SELPOS_NONE) ? static_cast<sal_uInt16>(nSelPos) : 0;
GetPreviewString_Impl( rPrevString, rpPrevColor );
}
@@ -1242,7 +1242,7 @@ short SvxNumberFormatShell::GetCategory4Entry(short nEntry) const
SvNumFormatType nMyCat=pNumEntry->GetMaskedType();
CategoryToPos_Impl(nMyCat,nMyType);
- return (short) nMyType;
+ return static_cast<short>(nMyType);
}
return 0;
}
@@ -1388,7 +1388,7 @@ void SvxNumberFormatShell::GetCurrencySymbols(std::vector<OUString>& rList, sal_
for(size_t i=1;i<nCount;i++)
{
const sal_uInt16 j = aCurCurrencyList[i];
- if (j != (sal_uInt16)-1 && j < nTableCount &&
+ if (j != sal_uInt16(-1) && j < nTableCount &&
pTmpCurrencyEntry == &rCurrencyTable[j])
{
*pPos=static_cast<sal_uInt16>(i);
@@ -1412,7 +1412,7 @@ void SvxNumberFormatShell::SetCurrencySymbol(sal_uInt32 nPos)
if(nPos<aCurCurrencyList.size())
{
sal_uInt16 nCurrencyPos=aCurCurrencyList[nPos];
- if(nCurrencyPos!=(sal_uInt16)-1)
+ if(nCurrencyPos!=sal_uInt16(-1))
{
pCurCurrencyEntry=const_cast<NfCurrencyEntry*>(&rCurrencyTable[nCurrencyPos]);
nCurCurrencyEntryPos=nPos;
@@ -1449,7 +1449,7 @@ sal_uInt16 SvxNumberFormatShell::FindCurrencyFormat( const OUString& rFmtString
sal_uInt16 nPos=FindCurrencyTableEntry(rFmtString, bTestBanking);
- if(nPos!=(sal_uInt16)-1)
+ if(nPos!=sal_uInt16(-1))
{
sal_uInt16 nStart=0;
if(bTestBanking && aCurCurrencyList.size()>nPos)
@@ -1461,12 +1461,12 @@ sal_uInt16 SvxNumberFormatShell::FindCurrencyFormat( const OUString& rFmtString
if(aCurCurrencyList[j]==nPos) return j;
}
}
- return (sal_uInt16) -1;
+ return sal_uInt16(-1);
}
sal_uInt16 SvxNumberFormatShell::FindCurrencyTableEntry( const OUString& rFmtString, bool &bTestBanking )
{
- sal_uInt16 nPos=(sal_uInt16) -1;
+ sal_uInt16 nPos=sal_uInt16(-1);
const NfCurrencyTable& rCurrencyTable=SvNumberFormatter::GetTheCurrencyTable();
sal_uInt16 nCount=rCurrencyTable.size();
@@ -1543,7 +1543,7 @@ sal_uInt16 SvxNumberFormatShell::FindCurrencyFormat(const NfCurrencyEntry* pTmpC
{
if(aCurCurrencyList[j]==nPos) return j;
}
- return (sal_uInt16) -1;
+ return sal_uInt16(-1);
}
bool SvxNumberFormatShell::IsInTable(sal_uInt16 const nPos,
@@ -1551,7 +1551,7 @@ bool SvxNumberFormatShell::IsInTable(sal_uInt16 const nPos,
{
bool bFlag=false;
- if(nPos!=(sal_uInt16)-1)
+ if(nPos!=sal_uInt16(-1))
{
const NfCurrencyTable& rCurrencyTable=SvNumberFormatter::GetTheCurrencyTable();
sal_uInt16 nCount=rCurrencyTable.size();
diff --git a/svx/source/items/pageitem.cxx b/svx/source/items/pageitem.cxx
index 1da923284439..f18e4fe50037 100644
--- a/svx/source/items/pageitem.cxx
+++ b/svx/source/items/pageitem.cxx
@@ -162,7 +162,7 @@ bool SvxPageItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
case MID_PAGE_NUMTYPE:
{
//! constants aren't in IDLs any more ?!?
- rVal <<= (sal_Int16)( eNumType );
+ rVal <<= static_cast<sal_Int16>( eNumType );
}
break;
case MID_PAGE_ORIENTATION:
diff --git a/svx/source/items/viewlayoutitem.cxx b/svx/source/items/viewlayoutitem.cxx
index 8310933e1d7c..95f749d9bcb2 100644
--- a/svx/source/items/viewlayoutitem.cxx
+++ b/svx/source/items/viewlayoutitem.cxx
@@ -89,7 +89,7 @@ bool SvxViewLayoutItem::QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId ) c
}
break;
- case MID_VIEWLAYOUT_COLUMNS : rVal <<= (sal_Int32) GetValue(); break;
+ case MID_VIEWLAYOUT_COLUMNS : rVal <<= static_cast<sal_Int32>(GetValue()); break;
case MID_VIEWLAYOUT_BOOKMODE: rVal <<= mbBookMode; break;
default:
OSL_FAIL("svx::SvxViewLayoutItem::QueryValue(), Wrong MemberId!");
@@ -129,7 +129,7 @@ bool SvxViewLayoutItem::PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId
if ( bAllConverted && nConvertedCount == VIEWLAYOUT_PARAMS )
{
- SetValue( (sal_uInt16)nColumns );
+ SetValue( static_cast<sal_uInt16>(nColumns) );
mbBookMode = bBookMode;
return true;
}
@@ -143,7 +143,7 @@ bool SvxViewLayoutItem::PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId
sal_Int32 nVal = 0;
if ( rVal >>= nVal )
{
- SetValue( (sal_uInt16)nVal );
+ SetValue( static_cast<sal_uInt16>(nVal) );
return true;
}
else
diff --git a/svx/source/items/zoomslideritem.cxx b/svx/source/items/zoomslideritem.cxx
index ed261b781b91..67e40294c448 100644
--- a/svx/source/items/zoomslideritem.cxx
+++ b/svx/source/items/zoomslideritem.cxx
@@ -78,7 +78,7 @@ bool SvxZoomSliderItem::QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId ) c
case MID_ZOOMSLIDER_CURRENTZOOM :
{
- rVal <<= (sal_Int32) GetValue();
+ rVal <<= static_cast<sal_Int32>(GetValue());
}
break;
case MID_ZOOMSLIDER_SNAPPINGPOINTS:
@@ -147,7 +147,7 @@ bool SvxZoomSliderItem::PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId
if ( bAllConverted && nConvertedCount == ZOOMSLIDER_PARAMS )
{
- SetValue( (sal_uInt16)nCurrentZoom );
+ SetValue( static_cast<sal_uInt16>(nCurrentZoom) );
maValues = aValues;
mnMinZoom = sal::static_int_cast< sal_uInt16 >( nMinZoom );
mnMaxZoom = sal::static_int_cast< sal_uInt16 >( nMaxZoom );
@@ -164,7 +164,7 @@ bool SvxZoomSliderItem::PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId
sal_Int32 nVal = 0;
if ( rVal >>= nVal )
{
- SetValue( (sal_uInt16)nVal );
+ SetValue( static_cast<sal_uInt16>(nVal) );
return true;
}
else
@@ -187,7 +187,7 @@ bool SvxZoomSliderItem::PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId
sal_Int32 nVal = 0;
if( rVal >>= nVal )
{
- mnMinZoom = (sal_uInt16)nVal;
+ mnMinZoom = static_cast<sal_uInt16>(nVal);
return true;
}
else
@@ -198,7 +198,7 @@ bool SvxZoomSliderItem::PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId
sal_Int32 nVal = 0;
if( rVal >>= nVal )
{
- mnMaxZoom = (sal_uInt16)nVal;
+ mnMaxZoom = static_cast<sal_uInt16>(nVal);
return true;
}
else