summaryrefslogtreecommitdiff
path: root/sw/source/uibase/utlui/numfmtlb.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-12-01 10:18:03 +0200
committerNoel Grandin <noel@peralex.com>2014-12-02 09:32:10 +0200
commitcf16234a23a716fe98adf32dd5b56d48be242c99 (patch)
tree71bde1012375f19303809d233f02c00274854559 /sw/source/uibase/utlui/numfmtlb.cxx
parentaeb6c0ed64a76c722158bf91313b42561cd66071 (diff)
loplugin: cstylecast
Change-Id: If31b41296a91c6a6ac990494e88ab7b47240a823
Diffstat (limited to 'sw/source/uibase/utlui/numfmtlb.cxx')
-rw-r--r--sw/source/uibase/utlui/numfmtlb.cxx18
1 files changed, 9 insertions, 9 deletions
diff --git a/sw/source/uibase/utlui/numfmtlb.cxx b/sw/source/uibase/utlui/numfmtlb.cxx
index d7eb8d662716..fc1b7d5c2990 100644
--- a/sw/source/uibase/utlui/numfmtlb.cxx
+++ b/sw/source/uibase/utlui/numfmtlb.cxx
@@ -242,7 +242,7 @@ void NumFormatListBox::SetFormatType(const short nFormatType)
nFormat != nSysLongDateFmt)
{
const sal_Int32 nPos = InsertEntry( sValue );
- SetEntryData( nPos, (void*)nFormat );
+ SetEntryData( nPos, reinterpret_cast<void*>(nFormat) );
if( nFormat == pFormatter->GetStandardFormat(
nFormatType, eCurLanguage ) )
@@ -292,7 +292,7 @@ void NumFormatListBox::SetDefFormat(const sal_uLong nDefFmt)
for (sal_Int32 i = 0; i < GetEntryCount(); i++)
{
- if (nFormat == (sal_uLong)GetEntryData(i))
+ if (nFormat == reinterpret_cast<sal_uLong>(GetEntryData(i)))
{
SelectEntryPos(i);
nStdEntry = i;
@@ -316,7 +316,7 @@ void NumFormatListBox::SetDefFormat(const sal_uLong nDefFmt)
}
sal_Int32 nPos = 0;
- while ((sal_uLong)GetEntryData(nPos) == ULONG_MAX)
+ while (reinterpret_cast<sal_uLong>(GetEntryData(nPos)) == ULONG_MAX)
nPos++;
sal_uLong nSysNumFmt = pFormatter->GetFormatIndex( NF_NUMBER_SYSTEM, eCurLanguage);
@@ -347,7 +347,7 @@ void NumFormatListBox::SetDefFormat(const sal_uLong nDefFmt)
}
nPos = InsertEntry(sValue, nPos); // Insert as first numeric entry
- SetEntryData(nPos, (void*)nDefFmt);
+ SetEntryData(nPos, reinterpret_cast<void*>(nDefFmt));
SelectEntryPos(nPos);
nDefFormat = GetFormat();
}
@@ -356,7 +356,7 @@ sal_uLong NumFormatListBox::GetFormat() const
{
sal_Int32 nPos = GetSelectEntryPos();
- return (sal_uLong)GetEntryData(nPos);
+ return reinterpret_cast<sal_uLong>(GetEntryData(nPos));
}
IMPL_LINK( NumFormatListBox, SelectHdl, ListBox *, pBox )
@@ -406,11 +406,11 @@ IMPL_LINK( NumFormatListBox, SelectHdl, ListBox *, pBox )
const SfxPoolItem* pItem = pView->GetDocShell()->
GetItem( SID_ATTR_NUMBERFORMAT_INFO );
- if( pItem && 0 != ((SvxNumberInfoItem*)pItem)->GetDelCount() )
+ if( pItem && 0 != static_cast<const SvxNumberInfoItem*>(pItem)->GetDelCount() )
{
- const sal_uInt32* pDelArr = ((SvxNumberInfoItem*)pItem)->GetDelArray();
+ const sal_uInt32* pDelArr = static_cast<const SvxNumberInfoItem*>(pItem)->GetDelArray();
- for ( sal_uInt32 i = 0; i < ((SvxNumberInfoItem*)pItem)->GetDelCount(); i++ )
+ for ( sal_uInt32 i = 0; i < static_cast<const SvxNumberInfoItem*>(pItem)->GetDelCount(); i++ )
pFormatter->DeleteEntry( pDelArr[i] );
}
@@ -418,7 +418,7 @@ IMPL_LINK( NumFormatListBox, SelectHdl, ListBox *, pBox )
if( SfxItemState::SET == pOutSet->GetItemState(
SID_ATTR_NUMBERFORMAT_VALUE, false, &pItem ))
{
- sal_uInt32 nNumberFormat = ((SfxUInt32Item*)pItem)->GetValue();
+ sal_uInt32 nNumberFormat = static_cast<const SfxUInt32Item*>(pItem)->GetValue();
// oj #105473# change order of calls
const SvNumberformat* pFmt = pFormatter->GetEntry(nNumberFormat);
if( pFmt )