coverity#1371220 Missing move assignment operator

Change-Id: Ie2947ea621da7ffc6c9530f007e1acdd4efb50cb
Reviewed-on: https://gerrit.libreoffice.org/32650
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
This commit is contained in:
Caolán McNamara 2017-01-02 15:17:33 +00:00
parent 9d6a749bc6
commit f97cd16ea4
3 changed files with 30 additions and 8 deletions

View File

@ -68,6 +68,7 @@ public:
DdeData(SAL_UNUSED_PARAMETER const void*, SAL_UNUSED_PARAMETER long, SAL_UNUSED_PARAMETER SotClipboardFormatId = SotClipboardFormatId::STRING); DdeData(SAL_UNUSED_PARAMETER const void*, SAL_UNUSED_PARAMETER long, SAL_UNUSED_PARAMETER SotClipboardFormatId = SotClipboardFormatId::STRING);
DdeData(SAL_UNUSED_PARAMETER const OUString&); DdeData(SAL_UNUSED_PARAMETER const OUString&);
DdeData(const DdeData&); DdeData(const DdeData&);
DdeData(DdeData&&);
~DdeData(); ~DdeData();
void const * getData() const; void const * getData() const;
@ -76,6 +77,7 @@ public:
SotClipboardFormatId GetFormat() const; SotClipboardFormatId GetFormat() const;
DdeData& operator=(const DdeData&); DdeData& operator=(const DdeData&);
DdeData& operator=(DdeData&&);
static sal_uLong GetExternalFormat(SotClipboardFormatId nFmt); static sal_uLong GetExternalFormat(SotClipboardFormatId nFmt);
static SotClipboardFormatId GetInternalFormat(sal_uLong nFmt); static SotClipboardFormatId GetInternalFormat(sal_uLong nFmt);

View File

@ -67,6 +67,11 @@ DdeData::DdeData( const DdeData& rData )
Lock(); Lock();
} }
DdeData::DdeData(DdeData&& rData)
: xImp(std::move(rData.xImp))
{
}
DdeData::~DdeData() DdeData::~DdeData()
{ {
if (xImp && xImp->hData) if (xImp && xImp->hData)
@ -110,6 +115,12 @@ DdeData& DdeData::operator = ( const DdeData& rData )
return *this; return *this;
} }
DdeData& DdeData::operator=(DdeData&& rData)
{
xImp = std::move(rData.xImp);
return *this;
}
sal_uLong DdeData::GetExternalFormat(SotClipboardFormatId nFmt) sal_uLong DdeData::GetExternalFormat(SotClipboardFormatId nFmt)
{ {
switch( nFmt ) switch( nFmt )

View File

@ -36,6 +36,10 @@ DdeData::DdeData( const DdeData& )
{ {
} }
DdeData::DdeData(DdeData&&)
{
}
DdeData::DdeData( const void*, long, SotClipboardFormatId) DdeData::DdeData( const void*, long, SotClipboardFormatId)
{ {
} }
@ -58,6 +62,11 @@ DdeData& DdeData::operator = ( const DdeData& )
return *this; return *this;
} }
DdeData& DdeData::operator=(DdeData&&)
{
return *this;
}
long DdeData::getSize() const long DdeData::getSize() const
{ {
return 0L; return 0L;