summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-06-14 13:34:55 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-06-14 15:42:31 +0200
commita6aa57ff591fdf3d834a7e0b1e9e2ebad1d87c5c (patch)
tree3de1d4767963fd78bcf6f8a90a4e2467e3a2acc5 /svx
parent546c35519125a769755330c961c7b8fc61e24d89 (diff)
use ERRCODE_NONE instead of 0
peeling off a small chunk of my ErrCode strong_int conversion Change-Id: Idc89e8496083beed7608cba705cd981139eb7111 Reviewed-on: https://gerrit.libreoffice.org/38777 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx')
-rw-r--r--svx/source/core/graphichelper.cxx4
-rw-r--r--svx/source/xml/xmlgrhlp.cxx12
2 files changed, 8 insertions, 8 deletions
diff --git a/svx/source/core/graphichelper.cxx b/svx/source/core/graphichelper.cxx
index f307083f5245..86b1025e18f7 100644
--- a/svx/source/core/graphichelper.cxx
+++ b/svx/source/core/graphichelper.cxx
@@ -172,11 +172,11 @@ OUString GraphicHelper::ExportGraphic( const Graphic& rGraphic, const OUString&
if( aOut.GetOutStream() && !aOut.GetOutStream()->GetError())
{
aOut.GetOutStream()->WriteStream( *aIn.GetInStream() );
- if ( 0 == aIn.GetError() )
+ if ( ERRCODE_NONE == aIn.GetError() )
{
aOut.Close();
aOut.Commit();
- if ( 0 == aOut.GetError() )
+ if ( ERRCODE_NONE == aOut.GetError() )
return sPath;
}
}
diff --git a/svx/source/xml/xmlgrhlp.cxx b/svx/source/xml/xmlgrhlp.cxx
index e6114ffc2776..a51aa1b641ae 100644
--- a/svx/source/xml/xmlgrhlp.cxx
+++ b/svx/source/xml/xmlgrhlp.cxx
@@ -115,7 +115,7 @@ SvXMLGraphicInputStream::SvXMLGraphicInputStream( const OUString& rGraphicId )
if( aGfxLink.GetDataSize() && aGfxLink.GetData() )
{
pStm->WriteBytes(aGfxLink.GetData(), aGfxLink.GetDataSize());
- bRet = ( pStm->GetError() == 0 );
+ bRet = ( pStm->GetError() == ERRCODE_NONE );
}
else
{
@@ -129,14 +129,14 @@ SvXMLGraphicInputStream::SvXMLGraphicInputStream( const OUString& rGraphicId )
else
aFormat = "png";
- bRet = ( rFilter.ExportGraphic( aGraphic, "", *pStm, rFilter.GetExportFormatNumberForShortName( aFormat ) ) == 0 );
+ bRet = ( rFilter.ExportGraphic( aGraphic, "", *pStm, rFilter.GetExportFormatNumberForShortName( aFormat ) ) == ERRCODE_NONE );
}
else if( aGraphic.GetType() == GraphicType::GdiMetafile )
{
pStm->SetVersion( SOFFICE_FILEFORMAT_8 );
pStm->SetCompressMode( SvStreamCompressFlags::ZBITMAP );
const_cast<GDIMetaFile&>( aGraphic.GetGDIMetaFile() ).Write( *pStm );
- bRet = ( pStm->GetError() == 0 );
+ bRet = ( pStm->GetError() == ERRCODE_NONE );
}
}
@@ -564,7 +564,7 @@ bool SvXMLGraphicHelper::ImplWriteGraphic( const OUString& rPictureStorageName,
// higher PDF version, while aGfxLink still contains the
// original data provided by the user.
pStream->WriteBytes(rPdfData.getConstArray(), rPdfData.getLength());
- bRet = (pStream->GetError() == 0);
+ bRet = (pStream->GetError() == ERRCODE_NONE);
}
else
pStream->WriteBytes(aGfxLink.GetData(), aGfxLink.GetDataSize());
@@ -582,7 +582,7 @@ bool SvXMLGraphicHelper::ImplWriteGraphic( const OUString& rPictureStorageName,
aFormat = "png";
bRet = ( rFilter.ExportGraphic( aGraphic, "", *pStream,
- rFilter.GetExportFormatNumberForShortName( aFormat ) ) == 0 );
+ rFilter.GetExportFormatNumberForShortName( aFormat ) ) == ERRCODE_NONE );
}
else if( aGraphic.GetType() == GraphicType::GdiMetafile )
{
@@ -607,7 +607,7 @@ bool SvXMLGraphicHelper::ImplWriteGraphic( const OUString& rPictureStorageName,
else
rMtf.Write( *pStream );
- bRet = ( pStream->GetError() == 0 );
+ bRet = ( pStream->GetError() == ERRCODE_NONE );
}
}
uno::Reference < embed::XTransactedObject > xStorage(