summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/source/ui/dbui/createaddresslistdialog.cxx4
-rw-r--r--sw/source/ui/dbui/mmaddressblockpage.cxx20
-rw-r--r--sw/source/ui/dbui/selectdbtabledialog.cxx2
-rw-r--r--sw/source/ui/misc/glosbib.cxx8
-rw-r--r--sw/source/ui/misc/pgfnote.cxx18
5 files changed, 26 insertions, 26 deletions
diff --git a/sw/source/ui/dbui/createaddresslistdialog.cxx b/sw/source/ui/dbui/createaddresslistdialog.cxx
index b398105e02e4..b331a8ec210e 100644
--- a/sw/source/ui/dbui/createaddresslistdialog.cxx
+++ b/sw/source/ui/dbui/createaddresslistdialog.cxx
@@ -179,7 +179,7 @@ void SwAddressControl_Impl::SetData(SwCSVData& rDBData)
FixedText* pNewFT = new FixedText(m_pWindow, WB_RIGHT);
Edit* pNewED = new Edit(m_pWindow, WB_BORDER);
//set nLines a position identifier - used in the ModifyHdl
- pNewED->SetData((void*)nLines);
+ pNewED->SetData(reinterpret_cast<void*>(nLines));
pNewED->SetGetFocusHdl(aFocusLink);
pNewED->SetModifyHdl(aEditModifyLink);
@@ -299,7 +299,7 @@ void SwAddressControl_Impl::MakeVisible(const Rectangle & rRect)
IMPL_LINK(SwAddressControl_Impl, EditModifyHdl_Impl, Edit*, pEdit)
{
//get the data element number of the current set
- sal_Int32 nIndex = (sal_Int32)(sal_IntPtr)pEdit->GetData();
+ sal_Int32 nIndex = (sal_Int32)reinterpret_cast<sal_IntPtr>(pEdit->GetData());
//get the index of the set
OSL_ENSURE(m_pData->aDBData.size() > m_nCurrentDataSet, "wrong data set index" );
if(m_pData->aDBData.size() > m_nCurrentDataSet)
diff --git a/sw/source/ui/dbui/mmaddressblockpage.cxx b/sw/source/ui/dbui/mmaddressblockpage.cxx
index 675b1e8c7b32..f0868a7f4179 100644
--- a/sw/source/ui/dbui/mmaddressblockpage.cxx
+++ b/sw/source/ui/dbui/mmaddressblockpage.cxx
@@ -483,11 +483,11 @@ SwCustomizeAddressBlockDialog::SwCustomizeAddressBlockDialog(
m_pFieldFT->Show();
m_pFieldCB->Show();
SvTreeListEntry* pEntry = m_pAddressElementsLB->InsertEntry(SW_RESSTR(ST_SALUTATION));
- pEntry->SetUserData((void*)(sal_Int32)USER_DATA_SALUTATION );
+ pEntry->SetUserData(reinterpret_cast<void*>((sal_Int32)USER_DATA_SALUTATION) );
pEntry = m_pAddressElementsLB->InsertEntry(SW_RESSTR(ST_PUNCTUATION));
- pEntry->SetUserData((void*)(sal_Int32)USER_DATA_PUNCTUATION );
+ pEntry->SetUserData(reinterpret_cast<void*>((sal_Int32)USER_DATA_PUNCTUATION) );
pEntry = m_pAddressElementsLB->InsertEntry(SW_RESSTR(ST_TEXT));
- pEntry->SetUserData((void*)(sal_Int32)USER_DATA_TEXT );
+ pEntry->SetUserData(reinterpret_cast<void*>((sal_Int32)USER_DATA_TEXT) );
ResStringArray aSalutArr(SW_RES(RA_SALUTATION));
for(sal_uInt32 i = 0; i < aSalutArr.Count(); ++i)
m_aSalutations.push_back(aSalutArr.GetString(i));
@@ -512,7 +512,7 @@ SwCustomizeAddressBlockDialog::SwCustomizeAddressBlockDialog(
for(sal_uInt32 i = 0; i < rHeaders.Count(); ++i)
{
SvTreeListEntry* pEntry = m_pAddressElementsLB->InsertEntry(rHeaders.GetString( i ));
- pEntry->SetUserData((void*)(sal_IntPtr)i);
+ pEntry->SetUserData(reinterpret_cast<void*>((sal_IntPtr)i));
}
m_pOK->SetClickHdl(LINK(this, SwCustomizeAddressBlockDialog, OKHdl_Impl));
m_pAddressElementsLB->SetSelectHdl(LINK(this, SwCustomizeAddressBlockDialog, ListBoxSelectHdl_Impl ));
@@ -543,7 +543,7 @@ IMPL_LINK_NOARG(SwCustomizeAddressBlockDialog, OKHdl_Impl)
IMPL_LINK(SwCustomizeAddressBlockDialog, ListBoxSelectHdl_Impl, DDListBox*, pBox)
{
- sal_Int32 nUserData = (sal_Int32)(sal_IntPtr)pBox->FirstSelected()->GetUserData();
+ sal_Int32 nUserData = (sal_Int32)reinterpret_cast<sal_IntPtr>(pBox->FirstSelected()->GetUserData());
// Check if the selected entry is already in the address and then forbid inserting
m_pInsertFieldIB->Enable(nUserData >= 0 || !HasItem_Impl(nUserData));
return 0;
@@ -596,7 +596,7 @@ sal_Int32 SwCustomizeAddressBlockDialog::GetSelectedItem_Impl()
const OUString sEntry = m_pAddressElementsLB->GetEntryText(pEntry);
if( sEntry == sSelected.copy( 1, sSelected.getLength() - 2 ) )
{
- nRet = (sal_Int32)(sal_IntPtr)pEntry->GetUserData();
+ nRet = (sal_Int32)reinterpret_cast<sal_IntPtr>(pEntry->GetUserData());
break;
}
}
@@ -610,7 +610,7 @@ bool SwCustomizeAddressBlockDialog::HasItem_Impl(sal_Int32 nUserData)
for(sal_uLong i = 0; i < m_pAddressElementsLB->GetEntryCount(); ++i)
{
SvTreeListEntry* pEntry = m_pAddressElementsLB->GetEntry(i);
- if((sal_Int32)(sal_IntPtr)pEntry->GetUserData() == nUserData)
+ if((sal_Int32)reinterpret_cast<sal_IntPtr>(pEntry->GetUserData()) == nUserData)
{
sEntry = m_pAddressElementsLB->GetEntryText(pEntry);
break;
@@ -705,7 +705,7 @@ void SwCustomizeAddressBlockDialog::UpdateImageButtons_Impl()
m_pRemoveFieldIB->Enable(m_pDragED->HasCurrentItem());
SvTreeListEntry* pEntry = m_pAddressElementsLB->GetCurEntry();
m_pInsertFieldIB->Enable( pEntry &&
- (0 < (sal_Int32)(sal_IntPtr)pEntry->GetUserData() || !m_pFieldCB->GetText().isEmpty()));
+ (0 < (sal_Int32)reinterpret_cast<sal_IntPtr>(pEntry->GetUserData()) || !m_pFieldCB->GetText().isEmpty()));
}
void SwCustomizeAddressBlockDialog::SetAddress(const OUString& rAddress)
@@ -725,7 +725,7 @@ OUString SwCustomizeAddressBlockDialog::GetAddress()
{
SvTreeListEntry* pEntry = m_pAddressElementsLB->GetEntry(i);
const OUString sEntry = "<" + m_pAddressElementsLB->GetEntryText(pEntry) + ">";
- sal_Int32 nUserData = (sal_Int32)(sal_IntPtr)pEntry->GetUserData();
+ sal_Int32 nUserData = (sal_Int32)reinterpret_cast<sal_IntPtr>(pEntry->GetUserData());
switch(nUserData)
{
case USER_DATA_SALUTATION:
@@ -1227,7 +1227,7 @@ void DDListBox::StartDrag( sal_Int8 /*nAction*/, const Point& /*rPosPixel*/ )
uno::Reference<
datatransfer::XTransferable > xRef( pContainer );
- sal_Int32 nUserData = (sal_Int32)(sal_IntPtr)pEntry->GetUserData();
+ sal_Int32 nUserData = (sal_Int32)reinterpret_cast<sal_IntPtr>(pEntry->GetUserData());
//special entries can only be once in the address / greeting
if(nUserData >= 0 || !m_pParentDialog->HasItem_Impl(nUserData))
{
diff --git a/sw/source/ui/dbui/selectdbtabledialog.cxx b/sw/source/ui/dbui/selectdbtabledialog.cxx
index 949368c267d0..9978bd22d6ce 100644
--- a/sw/source/ui/dbui/selectdbtabledialog.cxx
+++ b/sw/source/ui/dbui/selectdbtabledialog.cxx
@@ -140,7 +140,7 @@ SwSelectDBTableDialog::SwSelectDBTableDialog(vcl::Window* pParent,
sEntry += "\t";
sEntry += m_sQuery;
SvTreeListEntry* pEntry = m_pTable->InsertEntry(sEntry);
- pEntry->SetUserData((void*)1);
+ pEntry->SetUserData(reinterpret_cast<void*>(1));
}
}
}
diff --git a/sw/source/ui/misc/glosbib.cxx b/sw/source/ui/misc/glosbib.cxx
index 9aab2ff9e24d..6f93bc1e30ae 100644
--- a/sw/source/ui/misc/glosbib.cxx
+++ b/sw/source/ui/misc/glosbib.cxx
@@ -87,7 +87,7 @@ SwGlossaryGroupDlg::SwGlossaryGroupDlg(vcl::Window * pParent,
nCaseReadonly |= PATH_READONLY;
else if( SWUnoHelper::UCB_IsCaseSensitiveFileName( aTempFile.GetURL()))
nCaseReadonly |= PATH_CASE_SENSITIVE;
- m_pPathLB->SetEntryData(i, (void*)nCaseReadonly);
+ m_pPathLB->SetEntryData(i, reinterpret_cast<void*>(nCaseReadonly));
}
m_pPathLB->SelectEntryPos(0);
m_pPathLB->Enable(true);
@@ -318,7 +318,7 @@ IMPL_LINK_NOARG(SwGlossaryGroupDlg, ModifyHdl)
bool bEnableNew = true;
bool bEnableDel = false;
sal_uLong nCaseReadonly =
- (sal_uLong)m_pPathLB->GetEntryData(m_pPathLB->GetSelectEntryPos());
+ reinterpret_cast<sal_uLong>(m_pPathLB->GetEntryData(m_pPathLB->GetSelectEntryPos()));
bool bDirReadonly = 0 != (nCaseReadonly&PATH_READONLY);
if(sEntry.isEmpty() || bDirReadonly)
@@ -333,8 +333,8 @@ IMPL_LINK_NOARG(SwGlossaryGroupDlg, ModifyHdl)
for(sal_uLong i = 0; i < m_pGroupTLB->GetEntryCount(); i++)
{
OUString sTemp = m_pGroupTLB->GetEntryText( i, 0 );
- nCaseReadonly = (sal_uLong)m_pPathLB->GetEntryData(
- m_pPathLB->GetEntryPos(m_pGroupTLB->GetEntryText(i,1)));
+ nCaseReadonly = reinterpret_cast<sal_uLong>(m_pPathLB->GetEntryData(
+ m_pPathLB->GetEntryPos(m_pGroupTLB->GetEntryText(i,1))));
bool bCase = 0 != (nCaseReadonly & PATH_CASE_SENSITIVE);
if( !bCase && rSCmp.isEqual( sTemp, sEntry ))
diff --git a/sw/source/ui/misc/pgfnote.cxx b/sw/source/ui/misc/pgfnote.cxx
index bf3632ed2dbb..cd0d81bb7a6b 100644
--- a/sw/source/ui/misc/pgfnote.cxx
+++ b/sw/source/ui/misc/pgfnote.cxx
@@ -150,7 +150,7 @@ void SwFootNotePage::Reset(const SfxItemSet *rSet)
const SfxPoolItem* pItem = SfxTabPage::GetItem(*rSet, FN_PARAM_FTN_INFO);
if( pItem )
{
- pFtnInfo = &((const SwPageFtnInfoItem*)pItem)->GetPageFtnInfo();
+ pFtnInfo = &static_cast<const SwPageFtnInfoItem*>(pItem)->GetPageFtnInfo();
}
else
{
@@ -212,7 +212,7 @@ void SwFootNotePage::Reset(const SfxItemSet *rSet)
{
const SfxPoolItem* pColorItem = pDocSh->GetItem( SID_COLOR_TABLE );
if ( pColorItem != NULL )
- pColorList = ( (SvxColorListItem*)pColorItem )->GetColorList();
+ pColorList = static_cast<const SvxColorListItem*>(pColorItem)->GetColorList();
}
OSL_ENSURE( pColorList.is(), "ColorTable not found!" );
@@ -257,7 +257,7 @@ void SwFootNotePage::Reset(const SfxItemSet *rSet)
// stuff attributes into the set, when OK
bool SwFootNotePage::FillItemSet(SfxItemSet *rSet)
{
- SwPageFtnInfoItem aItem((const SwPageFtnInfoItem&)GetItemSet().Get(FN_PARAM_FTN_INFO));
+ SwPageFtnInfoItem aItem(static_cast<const SwPageFtnInfoItem&>(GetItemSet().Get(FN_PARAM_FTN_INFO)));
// that's the original
SwPageFtnInfo &rFtnInfo = aItem.GetPageFtnInfo();
@@ -304,7 +304,7 @@ bool SwFootNotePage::FillItemSet(SfxItemSet *rSet)
void SwFootNotePage::ActivatePage(const SfxItemSet& rSet)
{
- const SvxSizeItem& rSize = (const SvxSizeItem&)rSet.Get( RES_FRM_SIZE );
+ const SvxSizeItem& rSize = static_cast<const SvxSizeItem&>(rSet.Get( RES_FRM_SIZE ));
lMaxHeight = rSize.GetSize().Height();
const SfxPoolItem* pItem;
@@ -312,12 +312,12 @@ void SwFootNotePage::ActivatePage(const SfxItemSet& rSet)
{
const SfxItemSet& rHeaderSet = static_cast<const SvxSetItem*>(pItem)->GetItemSet();
const SfxBoolItem& rHeaderOn =
- (const SfxBoolItem&)rHeaderSet.Get( rSet.GetPool()->GetWhich( SID_ATTR_PAGE_ON ) );
+ static_cast<const SfxBoolItem&>(rHeaderSet.Get( rSet.GetPool()->GetWhich( SID_ATTR_PAGE_ON ) ));
if ( rHeaderOn.GetValue() )
{
const SvxSizeItem& rSizeItem =
- (const SvxSizeItem&)rHeaderSet.Get(rSet.GetPool()->GetWhich(SID_ATTR_PAGE_SIZE));
+ static_cast<const SvxSizeItem&>(rHeaderSet.Get(rSet.GetPool()->GetWhich(SID_ATTR_PAGE_SIZE)));
lMaxHeight -= rSizeItem.GetSize().Height();
}
}
@@ -327,19 +327,19 @@ void SwFootNotePage::ActivatePage(const SfxItemSet& rSet)
{
const SfxItemSet& rFooterSet = static_cast<const SvxSetItem*>(pItem)->GetItemSet();
const SfxBoolItem& rFooterOn =
- (const SfxBoolItem&)rFooterSet.Get( SID_ATTR_PAGE_ON );
+ static_cast<const SfxBoolItem&>(rFooterSet.Get( SID_ATTR_PAGE_ON ));
if ( rFooterOn.GetValue() )
{
const SvxSizeItem& rSizeItem =
- (const SvxSizeItem&)rFooterSet.Get( rSet.GetPool()->GetWhich( SID_ATTR_PAGE_SIZE ) );
+ static_cast<const SvxSizeItem&>(rFooterSet.Get( rSet.GetPool()->GetWhich( SID_ATTR_PAGE_SIZE ) ));
lMaxHeight -= rSizeItem.GetSize().Height();
}
}
if ( rSet.GetItemState( RES_UL_SPACE , false ) == SfxItemState::SET )
{
- const SvxULSpaceItem &rUL = (const SvxULSpaceItem&)rSet.Get( RES_UL_SPACE );
+ const SvxULSpaceItem &rUL = static_cast<const SvxULSpaceItem&>(rSet.Get( RES_UL_SPACE ));
lMaxHeight -= rUL.GetUpper() + rUL.GetLower();
}