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 /include | |
parent | clang-tidy misc-uniqueptr-reset-release (diff) | |
download | core-0265bdb92e5dbb5ba851a3d89eb8722bdaf081be.tar.gz core-0265bdb92e5dbb5ba851a3d89eb8722bdaf081be.zip |
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 'include')
-rw-r--r-- | include/svx/xoutbmp.hxx | 4 | ||||
-rw-r--r-- | include/vcl/errcode.hxx | 1 | ||||
-rw-r--r-- | include/vcl/graphicfilter.hxx | 28 |
3 files changed, 17 insertions, 16 deletions
diff --git a/include/svx/xoutbmp.hxx b/include/svx/xoutbmp.hxx index 28748cb0cd2f..25164e273254 100644 --- a/include/svx/xoutbmp.hxx +++ b/include/svx/xoutbmp.hxx @@ -58,12 +58,12 @@ public: static Graphic MirrorGraphic( const Graphic& rGraphic, const BmpMirrorFlags nMirrorFlags ); static Animation MirrorAnimation( const Animation& rAnimation, bool bHMirr, bool bVMirr ); - static sal_uInt16 WriteGraphic( const Graphic& rGraphic, OUString& rFileName, + static ErrCode WriteGraphic( const Graphic& rGraphic, OUString& rFileName, const OUString& rFilterName, const XOutFlags nFlags, const Size* pMtfSize_100TH_MM = nullptr ); static bool GraphicToBase64(const Graphic& rGraphic, OUString& rOUString); - static sal_uInt16 ExportGraphic( const Graphic& rGraphic, const INetURLObject& rURL, + static ErrCode ExportGraphic( const Graphic& rGraphic, const INetURLObject& rURL, GraphicFilter& rFilter, const sal_uInt16 nFormat, const css::uno::Sequence< css::beans::PropertyValue >* pFilterData = nullptr ); diff --git a/include/vcl/errcode.hxx b/include/vcl/errcode.hxx index 22ab86fbf22c..ba739e069753 100644 --- a/include/vcl/errcode.hxx +++ b/include/vcl/errcode.hxx @@ -81,6 +81,7 @@ inline sal_uInt32 ERRCODE_TOERROR( ErrCode x ) #define ERRCODE_AREA_SFX CAST_TO_UINT32(2UL << ERRCODE_AREA_SHIFT) #define ERRCODE_AREA_INET CAST_TO_UINT32(3UL << ERRCODE_AREA_SHIFT) #define ERRCODE_AREA_IO ERRCODE_AREA_TOOLS +#define ERRCODE_AREA_VCL CAST_TO_UINT32(4UL << ERRCODE_AREA_SHIFT) #define ERRCODE_AREA_LIB1 CAST_TO_UINT32(8UL << ERRCODE_AREA_SHIFT) #define ERRCODE_AREA_SVX ERRCODE_AREA_LIB1 diff --git a/include/vcl/graphicfilter.hxx b/include/vcl/graphicfilter.hxx index c4c6c4359ce9..f2b07db11047 100644 --- a/include/vcl/graphicfilter.hxx +++ b/include/vcl/graphicfilter.hxx @@ -25,6 +25,7 @@ #include <vcl/dllapi.h> #include <vcl/field.hxx> #include <vcl/graph.hxx> +#include <vcl/errcode.hxx> #include <o3tl/typed_flags_set.hxx> #include <com/sun/star/uno/Sequence.h> @@ -35,14 +36,13 @@ class SvStream; struct WMF_EXTERNALHEADER; struct ConvertData; -#define GRFILTER_OK 0 -#define GRFILTER_OPENERROR 1 -#define GRFILTER_IOERROR 2 -#define GRFILTER_FORMATERROR 3 -#define GRFILTER_VERSIONERROR 4 -#define GRFILTER_FILTERERROR 5 -#define GRFILTER_ABORT 6 -#define GRFILTER_TOOBIG 7 +#define ERRCODE_GRFILTER_OPENERROR (ERRCODE_AREA_VCL | ERRCODE_CLASS_GENERAL | 1) +#define ERRCODE_GRFILTER_IOERROR (ERRCODE_AREA_VCL | ERRCODE_CLASS_GENERAL | 2) +#define ERRCODE_GRFILTER_FORMATERROR (ERRCODE_AREA_VCL | ERRCODE_CLASS_GENERAL | 3) +#define ERRCODE_GRFILTER_VERSIONERROR (ERRCODE_AREA_VCL | ERRCODE_CLASS_GENERAL | 4) +#define ERRCODE_GRFILTER_FILTERERROR (ERRCODE_AREA_VCL | ERRCODE_CLASS_GENERAL | 5) +#define ERRCODE_GRFILTER_ABORT (ERRCODE_AREA_VCL | ERRCODE_CLASS_GENERAL | 6) +#define ERRCODE_GRFILTER_TOOBIG (ERRCODE_AREA_VCL | ERRCODE_CLASS_GENERAL | 7) #define GRFILTER_OUTHINT_GREY 1 @@ -258,18 +258,18 @@ public: OUString GetExportWildcard( sal_uInt16 nFormat ); bool IsExportPixelFormat( sal_uInt16 nFormat ); - sal_uInt16 ExportGraphic( const Graphic& rGraphic, const INetURLObject& rPath, + ErrCode ExportGraphic( const Graphic& rGraphic, const INetURLObject& rPath, sal_uInt16 nFormat, const css::uno::Sequence< css::beans::PropertyValue >* pFilterData = nullptr ); - sal_uInt16 ExportGraphic( const Graphic& rGraphic, const OUString& rPath, + ErrCode ExportGraphic( const Graphic& rGraphic, const OUString& rPath, SvStream& rOStm, sal_uInt16 nFormat, const css::uno::Sequence< css::beans::PropertyValue >* pFilterData = nullptr ); - sal_uInt16 CanImportGraphic( const INetURLObject& rPath, + ErrCode CanImportGraphic( const INetURLObject& rPath, sal_uInt16 nFormat, sal_uInt16 * pDeterminedFormat); - sal_uInt16 ImportGraphic( Graphic& rGraphic, const INetURLObject& rPath, + ErrCode ImportGraphic( Graphic& rGraphic, const INetURLObject& rPath, sal_uInt16 nFormat = GRFILTER_FORMAT_DONTKNOW, sal_uInt16 * pDeterminedFormat = nullptr, GraphicFilterImportFlags nImportFlags = GraphicFilterImportFlags::NONE ); @@ -288,7 +288,7 @@ public: /// The resulting graphic is added to rGraphics on success, nullptr is added on failure. void ImportGraphics(std::vector< std::shared_ptr<Graphic> >& rGraphics, const std::vector< std::shared_ptr<SvStream> >& rStreams); - sal_uInt16 ImportGraphic( Graphic& rGraphic, const OUString& rPath, + ErrCode ImportGraphic( Graphic& rGraphic, const OUString& rPath, SvStream& rStream, sal_uInt16 nFormat, sal_uInt16 * pDeterminedFormat, GraphicFilterImportFlags nImportFlags, @@ -314,7 +314,7 @@ protected: private: void ImplInit(); sal_uLong ImplSetError( sal_uLong nError, const SvStream* pStm = nullptr ); - sal_uInt16 ImpTestOrFindFormat( const OUString& rPath, SvStream& rStream, sal_uInt16& rFormat ); + ErrCode ImpTestOrFindFormat( const OUString& rPath, SvStream& rStream, sal_uInt16& rFormat ); DECL_LINK( FilterCallback, ConvertData&, bool ); |