diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-02-09 08:52:13 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-06-21 08:42:30 +0200 |
commit | 528632660b72b105345945c13c5b68060d94a91b (patch) | |
tree | 860508d482959abeb9175f0ce6b9e65954269f95 /include/sfx2 | |
parent | aee66aa85e75f67135e5c6079a281e18402d261a (diff) |
convert ErrCode to strong typedef
would have preferred to re-use o3tl::strong_int, of which this
is a modified copy, but there are lots of convenience accessors
which are nice to define on the class.
Change-Id: I301b807aaf02fbced3bf75de1e1692cde6c0340a
Reviewed-on: https://gerrit.libreoffice.org/38497
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include/sfx2')
-rw-r--r-- | include/sfx2/app.hxx | 4 | ||||
-rw-r--r-- | include/sfx2/docfile.hxx | 10 | ||||
-rw-r--r-- | include/sfx2/docinf.hxx | 3 | ||||
-rw-r--r-- | include/sfx2/fcontnr.hxx | 8 | ||||
-rw-r--r-- | include/sfx2/objsh.hxx | 10 | ||||
-rw-r--r-- | include/sfx2/opengrf.hxx | 4 | ||||
-rw-r--r-- | include/sfx2/sfxbasemodel.hxx | 2 |
7 files changed, 21 insertions, 20 deletions
diff --git a/include/sfx2/app.hxx b/include/sfx2/app.hxx index cba04af4a281..0b83b0561fcd 100644 --- a/include/sfx2/app.hxx +++ b/include/sfx2/app.hxx @@ -153,8 +153,8 @@ public: /** * @param pArgs Takes ownership */ - sal_uIntPtr LoadTemplate( SfxObjectShellLock& xDoc, const OUString& rFileName, SfxItemSet* pArgs ); - vcl::Window* GetTopWindow() const; + ErrCode LoadTemplate( SfxObjectShellLock& xDoc, const OUString& rFileName, SfxItemSet* pArgs ); + vcl::Window* GetTopWindow() const; // members SfxFilterMatcher& GetFilterMatcher(); diff --git a/include/sfx2/docfile.hxx b/include/sfx2/docfile.hxx index 352cbac471b1..38d5f691a133 100644 --- a/include/sfx2/docfile.hxx +++ b/include/sfx2/docfile.hxx @@ -141,12 +141,12 @@ public: void Download( const Link<void*,void>& aLink = Link<void*,void>()); void SetDoneLink( const Link<void*,void>& rLink ); - sal_uInt32 GetErrorCode() const; - sal_uInt32 GetError() const - { return ERRCODE_TOERROR(GetErrorCode()); } - sal_uInt32 GetLastStorageCreationState(); + ErrCode GetErrorCode() const; + ErrCode GetError() const + { return GetErrorCode().IgnoreWarning(); } + ErrCode GetLastStorageCreationState(); - void SetError(sal_uInt32 nError); + void SetError(ErrCode nError); void CloseInStream(); bool CloseOutStream(); diff --git a/include/sfx2/docinf.hxx b/include/sfx2/docinf.hxx index 19a1075d2dd0..a1c03eb08371 100644 --- a/include/sfx2/docinf.hxx +++ b/include/sfx2/docinf.hxx @@ -22,6 +22,7 @@ #include <sal/config.h> #include <sfx2/dllapi.h> #include <sal/types.h> +#include <vcl/errcode.hxx> #include <com/sun/star/uno/Reference.hxx> @@ -42,7 +43,7 @@ namespace sfx2 { @param i_xDocProps Document meta-data @param i_pStorage OLE Storage */ -sal_uInt32 SFX2_DLLPUBLIC LoadOlePropertySet( +ErrCode SFX2_DLLPUBLIC LoadOlePropertySet( const css::uno::Reference< css::document::XDocumentProperties>& i_xDocProps, SotStorage* i_pStorage ); diff --git a/include/sfx2/fcontnr.hxx b/include/sfx2/fcontnr.hxx index 996f8aca4f42..414e88044f5e 100644 --- a/include/sfx2/fcontnr.hxx +++ b/include/sfx2/fcontnr.hxx @@ -83,10 +83,10 @@ public: SAL_DLLPRIVATE static bool IsFilterInstalled_Impl( const std::shared_ptr<const SfxFilter>& pFilter ); DECL_DLLPRIVATE_LINK( MaybeFileHdl_Impl, OUString*, bool ); - sal_uInt32 GuessFilterIgnoringContent( SfxMedium& rMedium, std::shared_ptr<const SfxFilter>& ) const; - sal_uInt32 GuessFilter( SfxMedium& rMedium, std::shared_ptr<const SfxFilter>& , SfxFilterFlags nMust = SfxFilterFlags::IMPORT, SfxFilterFlags nDont = SFX_FILTER_NOTINSTALLED ) const; - sal_uInt32 GuessFilterControlDefaultUI( SfxMedium& rMedium, std::shared_ptr<const SfxFilter>&, SfxFilterFlags nMust = SfxFilterFlags::IMPORT, SfxFilterFlags nDont = SFX_FILTER_NOTINSTALLED ) const; - sal_uInt32 DetectFilter( SfxMedium& rMedium, std::shared_ptr<const SfxFilter>& ) const; + ErrCode GuessFilterIgnoringContent( SfxMedium& rMedium, std::shared_ptr<const SfxFilter>& ) const; + ErrCode GuessFilter( SfxMedium& rMedium, std::shared_ptr<const SfxFilter>& , SfxFilterFlags nMust = SfxFilterFlags::IMPORT, SfxFilterFlags nDont = SFX_FILTER_NOTINSTALLED ) const; + ErrCode GuessFilterControlDefaultUI( SfxMedium& rMedium, std::shared_ptr<const SfxFilter>&, SfxFilterFlags nMust = SfxFilterFlags::IMPORT, SfxFilterFlags nDont = SFX_FILTER_NOTINSTALLED ) const; + ErrCode DetectFilter( SfxMedium& rMedium, std::shared_ptr<const SfxFilter>& ) const; std::shared_ptr<const SfxFilter> GetFilter4Mime( const OUString& rMime, SfxFilterFlags nMust = SfxFilterFlags::IMPORT, SfxFilterFlags nDont = SFX_FILTER_NOTINSTALLED) const; std::shared_ptr<const SfxFilter> GetFilter4ClipBoardId( SotClipboardFormatId nId, SfxFilterFlags nMust = SfxFilterFlags::IMPORT, SfxFilterFlags nDont = SFX_FILTER_NOTINSTALLED ) const; diff --git a/include/sfx2/objsh.hxx b/include/sfx2/objsh.hxx index fc13b6a0b345..5b97ce138570 100644 --- a/include/sfx2/objsh.hxx +++ b/include/sfx2/objsh.hxx @@ -296,9 +296,9 @@ public: SAL_DLLPRIVATE void SetMacroMode_Impl(bool bModal=true); void ResetError(); - sal_uInt32 GetError() const; - sal_uInt32 GetErrorCode() const; - void SetError(sal_uInt32 rErr); + ErrCode GetError() const; + ErrCode GetErrorCode() const; + void SetError(ErrCode rErr); /** * Initialize bare minimum just enough for unit test runs. @@ -420,7 +420,7 @@ public: const css::uno::Sequence< css::beans::PropertyValue >& GetModifyPasswordInfo() const; bool SetModifyPasswordInfo( const css::uno::Sequence< css::beans::PropertyValue >& aInfo ); - static sal_uInt32 HandleFilter( SfxMedium* pMedium, SfxObjectShell* pDoc ); + static ErrCode HandleFilter( SfxMedium* pMedium, SfxObjectShell* pDoc ); virtual bool PrepareClose(bool bUI = true); virtual HiddenInformation GetHiddenInformationState( HiddenInformation nStates ); @@ -684,7 +684,7 @@ public: SAL_DLLPRIVATE static bool UseInteractionToHandleError( const css::uno::Reference< css::task::XInteractionHandler >& xHandler, - sal_uInt32 nError ); + ErrCode nError ); SAL_DLLPRIVATE const SfxObjectShell_Impl* Get_Impl() const { return pImpl.get(); } SAL_DLLPRIVATE void SetCreateMode_Impl( SfxObjectCreateMode nMode ); diff --git a/include/sfx2/opengrf.hxx b/include/sfx2/opengrf.hxx index 9533a86f9b20..542e573304cf 100644 --- a/include/sfx2/opengrf.hxx +++ b/include/sfx2/opengrf.hxx @@ -31,12 +31,12 @@ public: SvxOpenGraphicDialog ( const OUString& rTitle ); ~SvxOpenGraphicDialog (); - short Execute(); + ErrCode Execute(); void SetPath( const OUString& rPath, bool bLinkState ); OUString GetPath() const; - int GetGraphic(Graphic&) const; + ErrCode GetGraphic(Graphic&) const; void EnableLink(bool); void AsLink(bool); diff --git a/include/sfx2/sfxbasemodel.hxx b/include/sfx2/sfxbasemodel.hxx index 6620fed6f1e5..e721a77e35f4 100644 --- a/include/sfx2/sfxbasemodel.hxx +++ b/include/sfx2/sfxbasemodel.hxx @@ -730,7 +730,7 @@ private: SAL_DLLPRIVATE void loadCmisProperties(); - SAL_DLLPRIVATE SfxMedium* handleLoadError( sal_uInt32 nError, SfxMedium* pMedium ); + SAL_DLLPRIVATE SfxMedium* handleLoadError( ErrCode nError, SfxMedium* pMedium ); // private variables and methods |