summaryrefslogtreecommitdiff
path: root/include/vcl/errinf.hxx
diff options
context:
space:
mode:
authorChris Sherlock <chris.sherlock79@gmail.com>2017-04-24 01:19:05 +1000
committerChris Sherlock <chris.sherlock79@gmail.com>2017-04-27 08:15:59 +0200
commitb15b1743fcc976b023456acbff4415de35c9c9c5 (patch)
tree3e2b46ae46720149897f5b206ed6dca4db342689 /include/vcl/errinf.hxx
parent201f05f9bf66d0467b1137f3712108a96c159698 (diff)
vcl: rearrange functions in errinf.hxx
Change-Id: I55100d90d342c657db7aed34dcf1a40440955381 Reviewed-on: https://gerrit.libreoffice.org/36855 Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com> Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
Diffstat (limited to 'include/vcl/errinf.hxx')
-rw-r--r--include/vcl/errinf.hxx76
1 files changed, 39 insertions, 37 deletions
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