summaryrefslogtreecommitdiff
path: root/svl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-03-18 17:39:52 +0000
committerCaolán McNamara <caolanm@redhat.com>2015-03-18 17:40:27 +0000
commit641b6f2037bec26097574dd921219101d8386da5 (patch)
tree3026dc1452eaa1e2503a44d0dc3b6bab322b2c4e /svl
parent4e46370938b1fde8cea5e8123d88a2290e60de8a (diff)
more cast hell
Change-Id: I125c08ed182786cbdae7b5afabdab0754c31053a
Diffstat (limited to 'svl')
-rw-r--r--svl/source/svdde/ddedata.cxx14
-rw-r--r--svl/source/svdde/ddesvr.cxx14
-rw-r--r--svl/unx/source/svdde/ddedummy.cxx2
3 files changed, 13 insertions, 17 deletions
diff --git a/svl/source/svdde/ddedata.cxx b/svl/source/svdde/ddedata.cxx
index 26f0cf9babde..9b338b82d82d 100644
--- a/svl/source/svdde/ddedata.cxx
+++ b/svl/source/svdde/ddedata.cxx
@@ -118,25 +118,21 @@ sal_uLong DdeData::GetExternalFormat(SotClipboardFormatId nFmt)
switch( nFmt )
{
case SotClipboardFormatId::STRING:
- nFmt = CF_TEXT;
- break;
+ return CF_TEXT;
case SotClipboardFormatId::BITMAP:
- nFmt = CF_BITMAP;
- break;
+ return CF_BITMAP;
case SotClipboardFormatId::GDIMETAFILE:
- nFmt = CF_METAFILEPICT;
- break;
-
+ return CF_METAFILEPICT;
default:
{
#if defined(WNT)
OUString aName( SotExchange::GetFormatName( nFmt ) );
if( !aName.isEmpty() )
- nFmt = RegisterClipboardFormat( reinterpret_cast<LPCWSTR>(aName.getStr()) );
+ return RegisterClipboardFormat( reinterpret_cast<LPCWSTR>(aName.getStr()) );
#endif
}
}
- return nFmt;
+ return static_cast<sal_uLong>(nFmt);
}
SotClipboardFormatId DdeData::GetInternalFormat(sal_uLong nFmt)
diff --git a/svl/source/svdde/ddesvr.cxx b/svl/source/svdde/ddesvr.cxx
index 0178aa8bdb28..923222b7b9a1 100644
--- a/svl/source/svdde/ddesvr.cxx
+++ b/svl/source/svdde/ddesvr.cxx
@@ -572,19 +572,19 @@ bool DdeService::HasFormat(SotClipboardFormatId nFmt)
void DdeService::AddFormat(SotClipboardFormatId nFmt)
{
- nFmt = DdeData::GetExternalFormat( nFmt );
+ sal_uLong nExternalFmt = DdeData::GetExternalFormat( nFmt );
for ( size_t i = 0, n = aFormats.size(); i < n; ++i )
- if ( (sal_uLong) aFormats[ i ] == nFmt )
+ if ( (sal_uLong) aFormats[ i ] == nExternalFmt )
return;
- aFormats.push_back( nFmt );
+ aFormats.push_back( nExternalFmt );
}
void DdeService::RemoveFormat(SotClipboardFormatId nFmt)
{
- nFmt = DdeData::GetExternalFormat( nFmt );
+ sal_uLong nExternalFmt = DdeData::GetExternalFormat( nFmt );
for ( DdeFormats::iterator it = aFormats.begin(); it != aFormats.end(); ++it )
{
- if ( (sal_uLong) *it == nFmt )
+ if ( (sal_uLong) *it == nExternalFmt )
{
aFormats.erase( it );
break;
@@ -697,7 +697,7 @@ void DdeTopic::_Disconnect( sal_IntPtr nId )
Disconnect( nId );
}
-DdeData* DdeTopic::Get( sal_uIntPtr nFmt )
+DdeData* DdeTopic::Get(SotClipboardFormatId nFmt)
{
if ( aGetLink.IsSet() )
return (DdeData*)aGetLink.Call( (void*)nFmt );
@@ -872,7 +872,7 @@ DdeGetPutItem::DdeGetPutItem( const DdeItem& rItem )
nType = DDEGETPUTITEM;
}
-DdeData* DdeGetPutItem::Get( sal_uLong )
+DdeData* DdeGetPutItem::Get(SotClipboardFormatId)
{
return 0;
}
diff --git a/svl/unx/source/svdde/ddedummy.cxx b/svl/unx/source/svdde/ddedummy.cxx
index dfe846b77f35..d80752c7f899 100644
--- a/svl/unx/source/svdde/ddedummy.cxx
+++ b/svl/unx/source/svdde/ddedummy.cxx
@@ -166,7 +166,7 @@ void DdeTopic::RemoveItem( SAL_UNUSED_PARAMETER const DdeItem& )
{
}
-DdeData* DdeTopic::Get( SAL_UNUSED_PARAMETER sal_uLong )
+DdeData* DdeTopic::Get(SAL_UNUSED_PARAMETER SotClipboardFormatId)
{
return NULL;
}