diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-01-26 10:22:45 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-01-26 12:14:39 +0000 |
commit | bb12434f9fd9766598955a2257c62b4e3c3090f2 (patch) | |
tree | ddb3243d76393c2c692dcb3fc141856c0d4be6db /sw | |
parent | 9cb0833c07f0ab0d4b619bfe08cdaf5877afd1ab (diff) |
coverity#1266441 Unchecked return value
Change-Id: Ifa0ebd05ed22a5c32b75b7c86e1910eab291fa55
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/filter/ww8/rtfattributeoutput.cxx | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx index 3ae033e35dd4..beca8826b627 100644 --- a/sw/source/filter/ww8/rtfattributeoutput.cxx +++ b/sw/source/filter/ww8/rtfattributeoutput.cxx @@ -3624,7 +3624,7 @@ void RtfAttributeOutput::FlyFrameOLEReplacement(const SwFlyFrmFmt* pFlyFrmFmt, S const sal_uInt8* pGraphicAry = 0; SvMemoryStream aStream; if (GraphicConverter::Export(aStream, *pGraphic, CVT_PNG) != ERRCODE_NONE) - OSL_FAIL("failed to export the graphic"); + SAL_WARN("sw.rtf", "failed to export the graphic"); aStream.Seek(STREAM_SEEK_TO_END); sal_uInt32 nSize = aStream.Tell(); pGraphicAry = (sal_uInt8*)aStream.GetData(); @@ -3634,7 +3634,7 @@ void RtfAttributeOutput::FlyFrameOLEReplacement(const SwFlyFrmFmt* pFlyFrmFmt, S pBLIPType = OOO_STRING_SVTOOLS_RTF_WMETAFILE; SvMemoryStream aWmfStream; if (GraphicConverter::Export(aWmfStream, *pGraphic, CVT_WMF) != ERRCODE_NONE) - OSL_FAIL("failed to export the graphic"); + SAL_WARN("sw.rtf", "failed to export the graphic"); aWmfStream.Seek(STREAM_SEEK_TO_END); nSize = aWmfStream.Tell(); pGraphicAry = (sal_uInt8*)aWmfStream.GetData(); @@ -3834,7 +3834,8 @@ void RtfAttributeOutput::FlyFrameGraphic(const SwFlyFrmFmt* pFlyFrmFmt, const Sw else { aStream.Seek(0); - GraphicConverter::Export(aStream, rGraphic, CVT_WMF); + if (GraphicConverter::Export(aStream, rGraphic, CVT_WMF) != ERRCODE_NONE) + SAL_WARN("sw.rtf", "failed to export the graphic"); pBLIPType = OOO_STRING_SVTOOLS_RTF_WMETAFILE; aStream.Seek(STREAM_SEEK_TO_END); nSize = aStream.Tell(); @@ -3850,7 +3851,8 @@ void RtfAttributeOutput::FlyFrameGraphic(const SwFlyFrmFmt* pFlyFrmFmt, const Sw m_rExport.Strm().WriteCharPtr("}" "{" OOO_STRING_SVTOOLS_RTF_NONSHPPICT); aStream.Seek(0); - GraphicConverter::Export(aStream, rGraphic, CVT_WMF); + if (GraphicConverter::Export(aStream, rGraphic, CVT_WMF) != ERRCODE_NONE) + SAL_WARN("sw.rtf", "failed to export the graphic"); pBLIPType = OOO_STRING_SVTOOLS_RTF_WMETAFILE; aStream.Seek(STREAM_SEEK_TO_END); nSize = aStream.Tell(); |