[Libreoffice-commits] core.git: include/vcl
Chris Sherlock
chris.sherlock79 at gmail.com
Thu Apr 27 06:16:33 UTC 2017
include/vcl/errinf.hxx | 76 +++++++++++++++++++++++++------------------------
1 file changed, 39 insertions(+), 37 deletions(-)
New commits:
commit b15b1743fcc976b023456acbff4415de35c9c9c5
Author: Chris Sherlock <chris.sherlock79 at gmail.com>
Date: Mon Apr 24 01:19:05 2017 +1000
vcl: rearrange functions in errinf.hxx
Change-Id: I55100d90d342c657db7aed34dcf1a40440955381
Reviewed-on: https://gerrit.libreoffice.org/36855
Reviewed-by: Chris Sherlock <chris.sherlock79 at gmail.com>
Tested-by: Chris Sherlock <chris.sherlock79 at gmail.com>
diff --git a/include/vcl/errinf.hxx b/include/vcl/errinf.hxx
index 6b7a4b84ec98..32be5d99a635 100644
--- a/include/vcl/errinf.hxx
+++ b/include/vcl/errinf.hxx
@@ -36,6 +36,7 @@ namespace vcl { class Window; }
class ErrorHandler;
class ErrorContext;
class ErrorStringFactory;
+class ErrorInfo;
class DynamicErrorInfo;
class DynamicErrorInfo_Impl;
enum class DialogMask;
@@ -50,6 +51,30 @@ typedef DialogMask WindowDisplayErrorFunc(
typedef void BasicDisplayErrorFunc(
const OUString &rErr, const OUString &rAction);
+class VCL_DLLPUBLIC ErrorRegistry
+{
+ friend class ErrorHandler;
+ friend class ErrorContext;
+ friend class ErrorStringFactory;
+ friend class DynamicErrorInfo_Impl;
+
+public:
+ ErrorRegistry();
+
+ static void RegisterDisplay(BasicDisplayErrorFunc*);
+ static void RegisterDisplay(WindowDisplayErrorFunc*);
+
+private:
+ DisplayFnPtr pDsp;
+ bool bIsWindowDsp;
+ sal_uInt16 nNextError;
+
+ std::vector<ErrorHandler*> errorHandlers;
+ std::vector<ErrorContext*> contexts;
+
+ DynamicErrorInfo* ppDynErrInfo[ERRCODE_DYNAMIC_COUNT];
+};
+
enum class DialogMask
{
NONE = 0x0000,
@@ -78,28 +103,26 @@ namespace o3tl
template<> struct typed_flags<DialogMask> : is_typed_flags<DialogMask, 0xffff> {};
}
-class VCL_DLLPUBLIC ErrorRegistry
+typedef DialogMask WindowDisplayErrorFunc(
+ vcl::Window *, DialogMask nMask, const OUString &rErr, const OUString &rAction);
+
+typedef void BasicDisplayErrorFunc(
+ const OUString &rErr, const OUString &rAction);
+
+class SAL_WARN_UNUSED VCL_DLLPUBLIC ErrorHandler
{
- friend class ErrorHandler;
- friend class ErrorContext;
friend class ErrorStringFactory;
- friend class DynamicErrorInfo_Impl;
public:
- ErrorRegistry();
-
- static void RegisterDisplay(BasicDisplayErrorFunc*);
- static void RegisterDisplay(WindowDisplayErrorFunc*);
+ ErrorHandler();
+ virtual ~ErrorHandler();
-private:
- DisplayFnPtr pDsp;
- bool bIsWindowDsp;
- sal_uInt16 nNextError;
+ static DialogMask HandleError ( sal_uInt32 lId, DialogMask nMask = DialogMask::MAX );
+ static bool GetErrorString( sal_uInt32 lId, OUString& rStr );
- std::vector<ErrorHandler*> errorHandlers;
- std::vector<ErrorContext*> contexts;
+protected:
+ virtual bool CreateString(const ErrorInfo*, OUString &) const = 0;
- DynamicErrorInfo* ppDynErrInfo[ERRCODE_DYNAMIC_COUNT];
};
class SAL_WARN_UNUSED VCL_DLLPUBLIC ErrorInfo
@@ -164,6 +187,7 @@ public:
};
struct ErrorContextImpl;
+
class SAL_WARN_UNUSED VCL_DLLPUBLIC ErrorContext
{
friend class ErrorHandler;
@@ -181,28 +205,6 @@ public:
static ErrorContext* GetContext();
};
-typedef DialogMask WindowDisplayErrorFunc(
- vcl::Window *, DialogMask nMask, const OUString &rErr, const OUString &rAction);
-
-typedef void BasicDisplayErrorFunc(
- const OUString &rErr, const OUString &rAction);
-
-class SAL_WARN_UNUSED VCL_DLLPUBLIC ErrorHandler
-{
- friend class ErrorStringFactory;
-
-public:
- ErrorHandler();
- virtual ~ErrorHandler();
-
- static DialogMask HandleError ( sal_uInt32 lId, DialogMask nMask = DialogMask::MAX );
- static bool GetErrorString( sal_uInt32 lId, OUString& rStr );
-
-protected:
- virtual bool CreateString(const ErrorInfo *, OUString &) const = 0;
-
-};
-
#endif
#endif
More information about the Libreoffice-commits
mailing list