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
public:
virtual void Connect( sal_IntPtr );
virtual void Disconnect( sal_IntPtr );
virtual DdeData* Get( sal_uLong );
virtual DdeData* Get(SotClipboardFormatId);
virtual bool Put( const DdeData* );
virtual bool Execute( const OUString* );
// Eventually create a new item. return 0 -> Item creation failed
......
......@@ -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)
......
......@@ -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;
}
......
......@@ -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;
}
......
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