summaryrefslogtreecommitdiff
path: root/dbaccess
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-04-20 20:54:26 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-04-22 08:43:48 +0100
commitd2ce9699781f0722eea6817a31192380b617c207 (patch)
tree4ebae0fa0db4ed3067206bed5aa63ca35060e7e2 /dbaccess
parent31035f0ebcb9f89a60ed8644b8b40ca33f242120 (diff)
coverity#703938 Unchecked return value
Change-Id: I7bbd7b536227902b3692137340a21eb755aa5ed8
Diffstat (limited to 'dbaccess')
-rw-r--r--dbaccess/source/ui/misc/TableCopyHelper.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/dbaccess/source/ui/misc/TableCopyHelper.cxx b/dbaccess/source/ui/misc/TableCopyHelper.cxx
index 4ce6a8b0ede2..8f382143d74a 100644
--- a/dbaccess/source/ui/misc/TableCopyHelper.cxx
+++ b/dbaccess/source/ui/misc/TableCopyHelper.cxx
@@ -195,15 +195,16 @@ void OTableCopyHelper::pasteTable( SotFormatStringId _nFormatId
try
{
DropDescriptor aTrans;
+ bool bOk;
if ( _nFormatId != SOT_FORMAT_RTF )
- const_cast<TransferableDataHelper&>(_rTransData).GetSotStorageStream(SOT_FORMATSTR_ID_HTML ,aTrans.aHtmlRtfStorage);
+ bOk = const_cast<TransferableDataHelper&>(_rTransData).GetSotStorageStream(SOT_FORMATSTR_ID_HTML ,aTrans.aHtmlRtfStorage);
else
- const_cast<TransferableDataHelper&>(_rTransData).GetSotStorageStream(SOT_FORMAT_RTF,aTrans.aHtmlRtfStorage);
+ bOk = const_cast<TransferableDataHelper&>(_rTransData).GetSotStorageStream(SOT_FORMAT_RTF,aTrans.aHtmlRtfStorage);
aTrans.nType = E_TABLE;
aTrans.bHtml = SOT_FORMATSTR_ID_HTML == _nFormatId;
aTrans.sDefaultTableName = GetTableNameForAppend();
- if ( !copyTagTable(aTrans,false,_xConnection) )
+ if ( !bOk || !copyTagTable(aTrans,false,_xConnection) )
m_pController->showError(SQLException(ModuleRes(STR_NO_TABLE_FORMAT_INSIDE), *m_pController, OUString("S1000"), 0, Any()));
}
catch(const SQLException&)