[Libreoffice-commits] core.git: include/svl svl/source svl/unx
Caolán McNamara
caolanm at redhat.com
Wed Mar 18 10:41:03 PDT 2015
include/svl/svdde.hxx | 2 +-
svl/source/svdde/ddedata.cxx | 14 +++++---------
svl/source/svdde/ddesvr.cxx | 14 +++++++-------
svl/unx/source/svdde/ddedummy.cxx | 2 +-
4 files changed, 14 insertions(+), 18 deletions(-)
New commits:
commit 641b6f2037bec26097574dd921219101d8386da5
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Mar 18 17:39:52 2015 +0000
more cast hell
Change-Id: I125c08ed182786cbdae7b5afabdab0754c31053a
diff --git a/include/svl/svdde.hxx b/include/svl/svdde.hxx
index 5eb8990..f272b72 100644
--- a/include/svl/svdde.hxx
+++ b/include/svl/svdde.hxx
@@ -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
diff --git a/svl/source/svdde/ddedata.cxx b/svl/source/svdde/ddedata.cxx
index 26f0cf9..9b338b8 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 0178aa8..923222b 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 dfe846b..d80752c 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;
}
More information about the Libreoffice-commits
mailing list