diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-06-01 16:47:00 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-06-02 09:00:13 +0200 |
commit | 0265bdb92e5dbb5ba851a3d89eb8722bdaf081be (patch) | |
tree | 46c8f87d626cb6c74e211f4dce2721ab5c9b9e14 /sfx2 | |
parent | cf0651fe736c1f411651ee2691ab009fe271be2f (diff) |
convert GRFILTER constants to ERRCODE_GRFILTER_
since various code mixes these constants in with ErrCode values from
other code, let us just make it into real ErrCode values.
Change-Id: Ifa3d0f7526172609a44e6749bed9f730ab6b1a95
Reviewed-on: https://gerrit.libreoffice.org/38313
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/appl/fileobj.cxx | 6 | ||||
-rw-r--r-- | sfx2/source/appl/opengrf.cxx | 18 | ||||
-rw-r--r-- | sfx2/source/doc/graphhelp.cxx | 2 |
3 files changed, 13 insertions, 13 deletions
diff --git a/sfx2/source/appl/fileobj.cxx b/sfx2/source/appl/fileobj.cxx index af5bdb8758b9..084461658c43 100644 --- a/sfx2/source/appl/fileobj.cxx +++ b/sfx2/source/appl/fileobj.cxx @@ -296,7 +296,7 @@ bool SvFileObject::GetGraphic_Impl( Graphic& rGrf, SvStream* pStream ) ? rGF.GetImportFormatNumber( sFilter ) : GRFILTER_FORMAT_DONTKNOW; - int nRes; + ErrCode nRes; // To avoid that a native link is created if( !rGrf.IsLink() && @@ -304,7 +304,7 @@ bool SvFileObject::GetGraphic_Impl( Graphic& rGrf, SvStream* pStream ) rGrf.SetLink( GfxLink() ); if( !pStream ) - nRes = xMed.is() ? GRFILTER_OPENERROR + nRes = xMed.is() ? ERRCODE_GRFILTER_OPENERROR : rGF.ImportGraphic( rGrf, INetURLObject(sFileNm), nFilter ); else @@ -326,7 +326,7 @@ bool SvFileObject::GetGraphic_Impl( Graphic& rGrf, SvStream* pStream ) SAL_WARN( "sfx.appl", "Graphic error [" << nRes << "] - [" << sFileNm << "]" ); } - return GRFILTER_OK == nRes; + return ERRCODE_NONE == nRes; } /** detect the filter of the given file diff --git a/sfx2/source/appl/opengrf.cxx b/sfx2/source/appl/opengrf.cxx index c2871ba641cb..ef3a060d99cc 100644 --- a/sfx2/source/appl/opengrf.cxx +++ b/sfx2/source/appl/opengrf.cxx @@ -55,19 +55,19 @@ using namespace ::com::sun::star::uno; using namespace ::cppu; -sal_uInt16 SvxOpenGrfErr2ResId( short err ) +sal_uInt16 SvxOpenGrfErr2ResId( ErrCode err ) { switch( err ) { - case GRFILTER_OPENERROR: + case ERRCODE_GRFILTER_OPENERROR: return RID_SVXSTR_GRFILTER_OPENERROR; - case GRFILTER_IOERROR: + case ERRCODE_GRFILTER_IOERROR: return RID_SVXSTR_GRFILTER_IOERROR; - case GRFILTER_VERSIONERROR: + case ERRCODE_GRFILTER_VERSIONERROR: return RID_SVXSTR_GRFILTER_VERSIONERROR; - case GRFILTER_FILTERERROR: + case ERRCODE_GRFILTER_FILTERERROR: return RID_SVXSTR_GRFILTER_FILTERERROR; - case GRFILTER_FORMATERROR: + case ERRCODE_GRFILTER_FORMATERROR: default: return RID_SVXSTR_GRFILTER_FORMATERROR; } @@ -135,7 +135,7 @@ short SvxOpenGraphicDialog::Execute() else nImpRet = rFilter.CanImportGraphic( aObj, nFormatNum, &nRetFormat ); - if ( GRFILTER_OK != nImpRet ) + if ( ERRCODE_NONE != nImpRet ) { if ( !pStream ) nImpRet = rFilter.CanImportGraphic( aObj, GRFILTER_FORMAT_DONTKNOW, &nRetFormat ); @@ -146,11 +146,11 @@ short SvxOpenGraphicDialog::Execute() } else { - if( (nImpRet=rFilter.CanImportGraphic( aObj, nFormatNum, &nRetFormat )) != GRFILTER_OK ) + if( (nImpRet=rFilter.CanImportGraphic( aObj, nFormatNum, &nRetFormat )) != ERRCODE_NONE ) nImpRet = rFilter.CanImportGraphic( aObj, GRFILTER_FORMAT_DONTKNOW, &nRetFormat ); } - if ( GRFILTER_OK == nImpRet ) + if ( ERRCODE_NONE == nImpRet ) nFound = nRetFormat; // could not load? diff --git a/sfx2/source/doc/graphhelp.cxx b/sfx2/source/doc/graphhelp.cxx index 696bfd7af4da..8d443844e9f1 100644 --- a/sfx2/source/doc/graphhelp.cxx +++ b/sfx2/source/doc/graphhelp.cxx @@ -197,7 +197,7 @@ bool GraphicHelper::getThumbnailFormatFromGDI_Impl(GDIMetaFile* pMetaFile, const GraphicFilter& rFilter = GraphicFilter::GetGraphicFilter(); - if (rFilter.compressAsPNG(aResultBitmap, *pStream.get()) != GRFILTER_OK) + if (rFilter.compressAsPNG(aResultBitmap, *pStream.get()) != ERRCODE_NONE) return false; pStream->Flush(); |