diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-03-28 19:06:09 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-03-28 19:09:24 +0100 |
commit | 77d1a61c95779728799277565de3d6528ddc594b (patch) | |
tree | 0b04a079a0a47e2c2efaf6e2318cf447cdff0096 /sc/source/ui/dbgui | |
parent | a98887d9b82327d4183d24a56ec0636953515aa3 (diff) |
Clean up C-style casts from pointers to void
Change-Id: Ie42848cc9f2d74beeb76e1c5e49ef40b99f6d5f6
Diffstat (limited to 'sc/source/ui/dbgui')
-rw-r--r-- | sc/source/ui/dbgui/PivotLayoutTreeList.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/dbgui/PivotLayoutTreeListBase.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/dbgui/PivotLayoutTreeListData.cxx | 8 | ||||
-rw-r--r-- | sc/source/ui/dbgui/foptmgr.cxx | 6 | ||||
-rw-r--r-- | sc/source/ui/dbgui/sfiltdlg.cxx | 6 | ||||
-rw-r--r-- | sc/source/ui/dbgui/tpsort.cxx | 6 | ||||
-rw-r--r-- | sc/source/ui/dbgui/tpsubt.cxx | 10 |
7 files changed, 22 insertions, 22 deletions
diff --git a/sc/source/ui/dbgui/PivotLayoutTreeList.cxx b/sc/source/ui/dbgui/PivotLayoutTreeList.cxx index dcfdae35b0be..e667ad97b6bf 100644 --- a/sc/source/ui/dbgui/PivotLayoutTreeList.cxx +++ b/sc/source/ui/dbgui/PivotLayoutTreeList.cxx @@ -42,7 +42,7 @@ bool ScPivotLayoutTreeList::DoubleClickHdl() if (!pEntry) return false; - ScItemValue* pCurrentItemValue = (ScItemValue*) pEntry->GetUserData(); + ScItemValue* pCurrentItemValue = static_cast<ScItemValue*>(pEntry->GetUserData()); ScPivotFuncData& rCurrentFunctionData = pCurrentItemValue->maFunctionData; if (mpParent->IsDataElement(rCurrentFunctionData.mnCol)) @@ -85,7 +85,7 @@ void ScPivotLayoutTreeList::FillFields(ScPivotFieldVector& rFieldVector) void ScPivotLayoutTreeList::InsertEntryForSourceTarget(SvTreeListEntry* pSource, SvTreeListEntry* pTarget) { - ScItemValue* pItemValue = (ScItemValue*) pSource->GetUserData(); + ScItemValue* pItemValue = static_cast<ScItemValue*>(pSource->GetUserData()); ScItemValue* pOriginalItemValue = pItemValue->mpOriginalItemValue; // Don't allow to add "Data" element to page fields diff --git a/sc/source/ui/dbgui/PivotLayoutTreeListBase.cxx b/sc/source/ui/dbgui/PivotLayoutTreeListBase.cxx index ff0c95ea771c..0a54325891d2 100644 --- a/sc/source/ui/dbgui/PivotLayoutTreeListBase.cxx +++ b/sc/source/ui/dbgui/PivotLayoutTreeListBase.cxx @@ -83,7 +83,7 @@ void ScPivotLayoutTreeListBase::PushEntriesToPivotFieldVector(ScPivotFieldVector SvTreeListEntry* pEachEntry; for (pEachEntry = First(); pEachEntry != NULL; pEachEntry = Next(pEachEntry)) { - ScItemValue* pItemValue = (ScItemValue*) pEachEntry->GetUserData(); + ScItemValue* pItemValue = static_cast<ScItemValue*>(pEachEntry->GetUserData()); ScPivotFuncData& rFunctionData = pItemValue->maFunctionData; ScPivotField aField; @@ -107,7 +107,7 @@ void ScPivotLayoutTreeListBase::RemoveEntryForItem(ScItemValue* pItemValue) SvTreeListEntry* pEachEntry; for (pEachEntry = First(); pEachEntry != NULL; pEachEntry = Next(pEachEntry)) { - ScItemValue* pEachItemValue = (ScItemValue*) pEachEntry->GetUserData(); + ScItemValue* pEachItemValue = static_cast<ScItemValue*>(pEachEntry->GetUserData()); if (pEachItemValue == pItemValue) { GetModel()->Remove(pEachEntry); diff --git a/sc/source/ui/dbgui/PivotLayoutTreeListData.cxx b/sc/source/ui/dbgui/PivotLayoutTreeListData.cxx index d0b0be120a2d..e112e9a5b0da 100644 --- a/sc/source/ui/dbgui/PivotLayoutTreeListData.cxx +++ b/sc/source/ui/dbgui/PivotLayoutTreeListData.cxx @@ -73,7 +73,7 @@ ScPivotLayoutTreeListData::~ScPivotLayoutTreeListData() bool ScPivotLayoutTreeListData::DoubleClickHdl() { - ScItemValue* pCurrentItemValue = (ScItemValue*) GetCurEntry()->GetUserData(); + ScItemValue* pCurrentItemValue = static_cast<ScItemValue*>(GetCurEntry()->GetUserData()); ScPivotFuncData& rCurrentFunctionData = pCurrentItemValue->maFunctionData; SCCOL nCurrentColumn = rCurrentFunctionData.mnCol; @@ -149,7 +149,7 @@ void ScPivotLayoutTreeListData::PushDataFieldNames(vector<ScDPName>& rDataFieldN SvTreeListEntry* pLoopEntry; for (pLoopEntry = First(); pLoopEntry != NULL; pLoopEntry = Next(pLoopEntry)) { - ScItemValue* pEachItemValue = (ScItemValue*) pLoopEntry->GetUserData(); + ScItemValue* pEachItemValue = static_cast<ScItemValue*>(pLoopEntry->GetUserData()); SCCOL nColumn = pEachItemValue->maFunctionData.mnCol; ScDPLabelData* pLabelData = mpParent->GetLabelData(nColumn); @@ -172,7 +172,7 @@ void ScPivotLayoutTreeListData::PushDataFieldNames(vector<ScDPName>& rDataFieldN void ScPivotLayoutTreeListData::InsertEntryForSourceTarget(SvTreeListEntry* pSource, SvTreeListEntry* pTarget) { - ScItemValue* pItemValue = (ScItemValue*) pSource->GetUserData(); + ScItemValue* pItemValue = static_cast<ScItemValue*>(pSource->GetUserData()); if(mpParent->IsDataElement(pItemValue->maFunctionData.mnCol)) return; @@ -227,7 +227,7 @@ void ScPivotLayoutTreeListData::AdjustDuplicateCount(ScItemValue* pInputItemValu SvTreeListEntry* pEachEntry; for (pEachEntry = First(); pEachEntry != NULL; pEachEntry = Next(pEachEntry)) { - ScItemValue* pItemValue = (ScItemValue*) pEachEntry->GetUserData(); + ScItemValue* pItemValue = static_cast<ScItemValue*>(pEachEntry->GetUserData()); if (pItemValue == pInputItemValue) continue; diff --git a/sc/source/ui/dbgui/foptmgr.cxx b/sc/source/ui/dbgui/foptmgr.cxx index e1f6f2609775..f17ae254715e 100644 --- a/sc/source/ui/dbgui/foptmgr.cxx +++ b/sc/source/ui/dbgui/foptmgr.cxx @@ -72,7 +72,7 @@ ScFilterOptionsMgr::~ScFilterOptionsMgr() sal_uInt16 i; for ( i=2; i<nEntries; i++ ) - delete (OUString*)pLbCopyArea->GetEntryData( i ); + delete static_cast<OUString*>(pLbCopyArea->GetEntryData( i )); } void ScFilterOptionsMgr::Init() @@ -218,7 +218,7 @@ IMPL_LINK( ScFilterOptionsMgr, LbAreaSelHdl, ListBox*, pLb ) sal_uInt16 nSelPos = pLbCopyArea->GetSelectEntryPos(); if ( nSelPos > 0 ) - aString = *(OUString*)pLbCopyArea->GetEntryData( nSelPos ); + aString = *static_cast<OUString*>(pLbCopyArea->GetEntryData( nSelPos )); pEdCopyArea->SetText( aString ); } @@ -241,7 +241,7 @@ IMPL_LINK( ScFilterOptionsMgr, EdAreaModifyHdl, Edit*, pEd ) for ( i=2; i<nCount && !bFound; i++ ) { - OUString* pStr = (OUString*)pLbCopyArea->GetEntryData( i ); + OUString* pStr = static_cast<OUString*>(pLbCopyArea->GetEntryData( i )); bFound = (theCurPosStr == *pStr); } diff --git a/sc/source/ui/dbgui/sfiltdlg.cxx b/sc/source/ui/dbgui/sfiltdlg.cxx index 5ac8147df318..380278b8c8b8 100644 --- a/sc/source/ui/dbgui/sfiltdlg.cxx +++ b/sc/source/ui/dbgui/sfiltdlg.cxx @@ -101,7 +101,7 @@ ScSpecialFilterDlg::~ScSpecialFilterDlg() sal_uInt16 i; for ( i=1; i<nEntries; i++ ) - delete (OUString*)pLbFilterArea->GetEntryData( i ); + delete static_cast<OUString*>(pLbFilterArea->GetEntryData( i )); delete pOptionsMgr; @@ -413,7 +413,7 @@ IMPL_LINK( ScSpecialFilterDlg, FilterAreaSelHdl, ListBox*, pLb ) sal_uInt16 nSelPos = pLbFilterArea->GetSelectEntryPos(); if ( nSelPos > 0 ) - aString = *(OUString*)pLbFilterArea->GetEntryData( nSelPos ); + aString = *static_cast<OUString*>(pLbFilterArea->GetEntryData( nSelPos )); pEdFilterArea->SetText( aString ); } @@ -438,7 +438,7 @@ IMPL_LINK( ScSpecialFilterDlg, FilterAreaModHdl, formula::RefEdit*, pEd ) for ( i=1; i<nCount && !bFound; i++ ) { - OUString* pStr = (OUString*)pLbFilterArea->GetEntryData( i ); + OUString* pStr = static_cast<OUString*>(pLbFilterArea->GetEntryData( i )); bFound = (theCurAreaStr == *pStr); } diff --git a/sc/source/ui/dbgui/tpsort.cxx b/sc/source/ui/dbgui/tpsort.cxx index ba3703f87fc0..9dbc06600955 100644 --- a/sc/source/ui/dbgui/tpsort.cxx +++ b/sc/source/ui/dbgui/tpsort.cxx @@ -519,7 +519,7 @@ ScTabPageSortOptions::~ScTabPageSortOptions() sal_uInt16 nEntries = m_pLbOutPos->GetEntryCount(); for ( sal_uInt16 i=1; i<nEntries; i++ ) - delete (OUString*)m_pLbOutPos->GetEntryData( i ); + delete static_cast<OUString*>(m_pLbOutPos->GetEntryData( i )); delete pColRes; delete pColWrap; //! not if from document @@ -855,7 +855,7 @@ IMPL_LINK( ScTabPageSortOptions, SelOutPosHdl, ListBox *, pLb ) sal_uInt16 nSelPos = m_pLbOutPos->GetSelectEntryPos(); if ( nSelPos > 0 ) - aString = *(OUString*)m_pLbOutPos->GetEntryData( nSelPos ); + aString = *static_cast<OUString*>(m_pLbOutPos->GetEntryData( nSelPos )); m_pEdOutPos->SetText( aString ); } @@ -890,7 +890,7 @@ void ScTabPageSortOptions::EdOutPosModHdl( Edit* pEd ) for ( i=2; i<nCount && !bFound; i++ ) { - OUString* pStr = (OUString*)m_pLbOutPos->GetEntryData( i ); + OUString* pStr = static_cast<OUString*>(m_pLbOutPos->GetEntryData( i )); bFound = (theCurPosStr == *pStr); } diff --git a/sc/source/ui/dbgui/tpsubt.cxx b/sc/source/ui/dbgui/tpsubt.cxx index ed84bc156f9e..12643fc22c61 100644 --- a/sc/source/ui/dbgui/tpsubt.cxx +++ b/sc/source/ui/dbgui/tpsubt.cxx @@ -73,7 +73,7 @@ ScTpSubTotalGroup::~ScTpSubTotalGroup() { for ( sal_uLong i=0; i<nCount; i++ ) { - sal_uInt16* pData = (sal_uInt16*)(mpLbColumns->GetEntryData( i )); + sal_uInt16* pData = static_cast<sal_uInt16*>(mpLbColumns->GetEntryData( i )); OSL_ENSURE( pData, "EntryData not found" ); delete pData; @@ -116,7 +116,7 @@ bool ScTpSubTotalGroup::DoReset( sal_uInt16 nGroupNo, for ( sal_uLong nLbEntry = 0; nLbEntry < mpLbColumns->GetEntryCount(); ++nLbEntry ) { mpLbColumns->CheckEntryPos( nLbEntry, false ); - *((sal_uInt16*)mpLbColumns->GetEntryData( nLbEntry )) = 0; + *static_cast<sal_uInt16*>(mpLbColumns->GetEntryData( nLbEntry )) = 0; } mpLbFunctions->SelectEntryPos( 0 ); @@ -137,7 +137,7 @@ bool ScTpSubTotalGroup::DoReset( sal_uInt16 nGroupNo, for ( sal_uInt16 i=0; i<nSubTotals; i++ ) { sal_uInt16 nCheckPos = GetFieldSelPos( pSubTotals[i] ); - sal_uInt16* pFunction = (sal_uInt16*)mpLbColumns->GetEntryData( nCheckPos ); + sal_uInt16* pFunction = static_cast<sal_uInt16*>(mpLbColumns->GetEntryData( nCheckPos )); mpLbColumns->CheckEntryPos( nCheckPos ); *pFunction = FuncToLbPos( pFunctions[i] ); @@ -216,7 +216,7 @@ bool ScTpSubTotalGroup::DoFillItemSet( sal_uInt16 nGroupNo, { OSL_ENSURE( nCheck <= nCheckCount, "Range error :-(" ); - nFunction = *((sal_uInt16*)mpLbColumns->GetEntryData( i )); + nFunction = *static_cast<sal_uInt16*>(mpLbColumns->GetEntryData( i )); pSubTotals[nCheck] = nFieldArr[i]; pFunctions[nCheck] = LbPosToFunc( nFunction ); nCheck++; @@ -340,7 +340,7 @@ IMPL_LINK( ScTpSubTotalGroup, SelectHdl, void *, pLb ) { sal_uInt16 nFunction = mpLbFunctions->GetSelectEntryPos(); sal_uInt16 nColumn = mpLbColumns->GetSelectEntryPos(); - sal_uInt16* pFunction = (sal_uInt16*)mpLbColumns->GetEntryData( nColumn ); + sal_uInt16* pFunction = static_cast<sal_uInt16*>(mpLbColumns->GetEntryData( nColumn )); OSL_ENSURE( pFunction, "EntryData not found!" ); if ( !pFunction ) |