Kaydet (Commit) 641b6f20 authored tarafından Caolán McNamara's avatar Caolán McNamara

more cast hell

Change-Id: I125c08ed182786cbdae7b5afabdab0754c31053a
üst 4e463709
...@@ -290,7 +290,7 @@ class SVL_DLLPUBLIC DdeTopic ...@@ -290,7 +290,7 @@ class SVL_DLLPUBLIC DdeTopic
public: public:
virtual void Connect( sal_IntPtr ); virtual void Connect( sal_IntPtr );
virtual void Disconnect( sal_IntPtr ); virtual void Disconnect( sal_IntPtr );
virtual DdeData* Get( sal_uLong ); virtual DdeData* Get(SotClipboardFormatId);
virtual bool Put( const DdeData* ); virtual bool Put( const DdeData* );
virtual bool Execute( const OUString* ); virtual bool Execute( const OUString* );
// Eventually create a new item. return 0 -> Item creation failed // Eventually create a new item. return 0 -> Item creation failed
......
...@@ -118,25 +118,21 @@ sal_uLong DdeData::GetExternalFormat(SotClipboardFormatId nFmt) ...@@ -118,25 +118,21 @@ sal_uLong DdeData::GetExternalFormat(SotClipboardFormatId nFmt)
switch( nFmt ) switch( nFmt )
{ {
case SotClipboardFormatId::STRING: case SotClipboardFormatId::STRING:
nFmt = CF_TEXT; return CF_TEXT;
break;
case SotClipboardFormatId::BITMAP: case SotClipboardFormatId::BITMAP:
nFmt = CF_BITMAP; return CF_BITMAP;
break;
case SotClipboardFormatId::GDIMETAFILE: case SotClipboardFormatId::GDIMETAFILE:
nFmt = CF_METAFILEPICT; return CF_METAFILEPICT;
break;
default: default:
{ {
#if defined(WNT) #if defined(WNT)
OUString aName( SotExchange::GetFormatName( nFmt ) ); OUString aName( SotExchange::GetFormatName( nFmt ) );
if( !aName.isEmpty() ) if( !aName.isEmpty() )
nFmt = RegisterClipboardFormat( reinterpret_cast<LPCWSTR>(aName.getStr()) ); return RegisterClipboardFormat( reinterpret_cast<LPCWSTR>(aName.getStr()) );
#endif #endif
} }
} }
return nFmt; return static_cast<sal_uLong>(nFmt);
} }
SotClipboardFormatId DdeData::GetInternalFormat(sal_uLong nFmt) SotClipboardFormatId DdeData::GetInternalFormat(sal_uLong nFmt)
......
...@@ -572,19 +572,19 @@ bool DdeService::HasFormat(SotClipboardFormatId nFmt) ...@@ -572,19 +572,19 @@ bool DdeService::HasFormat(SotClipboardFormatId nFmt)
void DdeService::AddFormat(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 ) for ( size_t i = 0, n = aFormats.size(); i < n; ++i )
if ( (sal_uLong) aFormats[ i ] == nFmt ) if ( (sal_uLong) aFormats[ i ] == nExternalFmt )
return; return;
aFormats.push_back( nFmt ); aFormats.push_back( nExternalFmt );
} }
void DdeService::RemoveFormat(SotClipboardFormatId nFmt) 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 ) for ( DdeFormats::iterator it = aFormats.begin(); it != aFormats.end(); ++it )
{ {
if ( (sal_uLong) *it == nFmt ) if ( (sal_uLong) *it == nExternalFmt )
{ {
aFormats.erase( it ); aFormats.erase( it );
break; break;
...@@ -697,7 +697,7 @@ void DdeTopic::_Disconnect( sal_IntPtr nId ) ...@@ -697,7 +697,7 @@ void DdeTopic::_Disconnect( sal_IntPtr nId )
Disconnect( nId ); Disconnect( nId );
} }
DdeData* DdeTopic::Get( sal_uIntPtr nFmt ) DdeData* DdeTopic::Get(SotClipboardFormatId nFmt)
{ {
if ( aGetLink.IsSet() ) if ( aGetLink.IsSet() )
return (DdeData*)aGetLink.Call( (void*)nFmt ); return (DdeData*)aGetLink.Call( (void*)nFmt );
...@@ -872,7 +872,7 @@ DdeGetPutItem::DdeGetPutItem( const DdeItem& rItem ) ...@@ -872,7 +872,7 @@ DdeGetPutItem::DdeGetPutItem( const DdeItem& rItem )
nType = DDEGETPUTITEM; nType = DDEGETPUTITEM;
} }
DdeData* DdeGetPutItem::Get( sal_uLong ) DdeData* DdeGetPutItem::Get(SotClipboardFormatId)
{ {
return 0; return 0;
} }
......
...@@ -166,7 +166,7 @@ void DdeTopic::RemoveItem( SAL_UNUSED_PARAMETER const DdeItem& ) ...@@ -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; return NULL;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment