summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2017-02-07 23:02:28 +0100
committerMichael Stahl <mstahl@redhat.com>2017-02-07 23:02:28 +0100
commit32cae6a2eaa41568888df9c8fc5605debd8d704a (patch)
treea17234bc71f7cbde274bfa2c9930d7ea2dfe35bf /include
parentsfx2: if the exception thrown by filter isn't known... (diff)
downloadcore-32cae6a2eaa41568888df9c8fc5605debd8d704a.tar.gz
core-32cae6a2eaa41568888df9c8fc5605debd8d704a.zip
Revert "create ErrorHandlerFlags scoped enum for error handling flags"
This reverts commit 05e78bde26d8b8b257ed22a0ce20c5b386a629d1. Depends on the other commit that needs reverting
Diffstat (limited to 'include')
-rw-r--r--include/svtools/ehdl.hxx4
-rw-r--r--include/svtools/sfxecode.hxx1
-rw-r--r--include/tools/errcode.hxx19
-rw-r--r--include/tools/errinf.hxx50
4 files changed, 32 insertions, 42 deletions
diff --git a/include/svtools/ehdl.hxx b/include/svtools/ehdl.hxx
index 2865e26c8a6c..cb73990d31ce 100644
--- a/include/svtools/ehdl.hxx
+++ b/include/svtools/ehdl.hxx
@@ -54,7 +54,7 @@ public:
virtual ~SfxErrorHandler() override;
protected:
- bool GetErrorString(sal_uLong lErrId, OUString &, ErrorHandlerFlags&) const;
+ bool GetErrorString(sal_uLong lErrId, OUString &, sal_uInt16&) const;
private:
@@ -66,7 +66,7 @@ private:
pFreeMgr;
SVT_DLLPRIVATE static void GetClassString(sal_uLong lErrId, OUString &);
- virtual bool CreateString( const ErrorInfo *, OUString &, ErrorHandlerFlags &) const override;
+ virtual bool CreateString( const ErrorInfo *, OUString &, sal_uInt16 &) const override;
};
#endif
diff --git a/include/svtools/sfxecode.hxx b/include/svtools/sfxecode.hxx
index 77c3ee43bfaa..99083f298ec3 100644
--- a/include/svtools/sfxecode.hxx
+++ b/include/svtools/sfxecode.hxx
@@ -34,6 +34,7 @@
#define ERRCODE_SFX_WRONGPASSWORD (ERRCODE_AREA_SFX|ERRCODE_CLASS_READ|11)
#define ERRCODE_SFX_DOCUMENTREADONLY (ERRCODE_AREA_SFX|ERRCODE_CLASS_WRITE|12)
#define ERRCODE_SFX_OLEGENERAL (ERRCODE_AREA_SFX|ERRCODE_CLASS_NONE|14)
+#define ERRCODE_SFXMSG_STYLEREPLACE (ERRCODE_WARNING_MASK|ERRCODE_AREA_SFX|ERRCODE_CLASS_NONE|13)
#define ERRCODE_SFX_TEMPLATENOTFOUND (ERRCODE_AREA_SFX|ERRCODE_CLASS_NOTEXISTS|15)
#define ERRCODE_SFX_ISRELATIVE (ERRCODE_WARNING_MASK|ERRCODE_AREA_SFX|ERRCODE_CLASS_NOTEXISTS|16)
#define ERRCODE_SFX_FORCEDOCLOAD (ERRCODE_WARNING_MASK|ERRCODE_AREA_SFX|ERRCODE_CLASS_NONE|17)
diff --git a/include/tools/errcode.hxx b/include/tools/errcode.hxx
index 6eaef4b1b77e..32edbe72f052 100644
--- a/include/tools/errcode.hxx
+++ b/include/tools/errcode.hxx
@@ -46,6 +46,25 @@ Warning || || |
Code
*/
+#define ERRCODE_BUTTON_OK 0x01
+#define ERRCODE_BUTTON_CANCEL 0x02
+#define ERRCODE_BUTTON_RETRY 0x04
+#define ERRCODE_BUTTON_OK_CANCEL 0x03
+#define ERRCODE_BUTTON_NO 0x08
+#define ERRCODE_BUTTON_YES 0x10
+#define ERRCODE_BUTTON_YES_NO 0x18
+#define ERRCODE_BUTTON_YES_NO_CANCEL 0x1a
+
+#define ERRCODE_BUTTON_DEF_OK 0x100
+#define ERRCODE_BUTTON_DEF_CANCEL 0x200
+#define ERRCODE_BUTTON_DEF_YES 0x300
+#define ERRCODE_BUTTON_DEF_NO 0x400
+
+#define ERRCODE_MSG_ERROR 0x1000
+#define ERRCODE_MSG_WARNING 0x2000
+#define ERRCODE_MSG_INFO 0x3000
+#define ERRCODE_MSG_QUERY 0x4000
+
#define ERRCODE_ERROR_MASK 0x3fffffffUL
#define ERRCODE_WARNING_MASK 0x80000000UL
#define ERRCODE_RES_MASK 0x7fff
diff --git a/include/tools/errinf.hxx b/include/tools/errinf.hxx
index d83fa54151ac..2b9f6b533d9b 100644
--- a/include/tools/errinf.hxx
+++ b/include/tools/errinf.hxx
@@ -26,7 +26,6 @@
#include <rtl/ustring.hxx>
#include <tools/errcode.hxx>
#include <tools/toolsdllapi.h>
-#include <o3tl/typed_flags_set.hxx>
#include <memory>
// FIXME: horrible legacy dependency on VCL from tools.
@@ -35,35 +34,6 @@ namespace vcl { class Window; }
class DynamicErrorInfo_Impl;
class ErrorHandler_Impl;
-enum class ErrorHandlerFlags
-{
- NONE = 0x0000,
- ButtonsOk = 0x0001,
- ButtonsCancel = 0x0002,
- ButtonsRetry = 0x0004,
- ButtonsOkCancel = 0x0003,
- ButtonsNo = 0x0008,
- ButtonsYes = 0x0010,
- ButtonsYesNo = 0x0018,
- ButtonsYesNoCancel = 0x001a,
-
- ButtonDefaultsOk = 0x0100,
- ButtonDefaultsCancel = 0x0200,
- ButtonDefaultsYes = 0x0300,
- ButtonDefaultsNo = 0x0400,
-
- MessageError = 0x1000,
- MessageWarning = 0x2000,
- MessageInfo = 0x3000,
- MessageQuery = 0x4000,
-
- MAX = USHRT_MAX,
-};
-namespace o3tl
-{
- template<> struct typed_flags<ErrorHandlerFlags> : is_typed_flags<ErrorHandlerFlags, 0xffff> {};
-}
-
class SAL_WARN_UNUSED TOOLS_DLLPUBLIC ErrorInfo
{
private:
@@ -89,11 +59,11 @@ private:
public:
- DynamicErrorInfo(sal_uIntPtr lUserId, ErrorHandlerFlags nMask);
+ DynamicErrorInfo(sal_uIntPtr lUserId, sal_uInt16 nMask);
virtual ~DynamicErrorInfo() override;
sal_uIntPtr GetErrorCode() const;
- ErrorHandlerFlags GetDialogMask() const;
+ sal_uInt16 GetDialogMask() const;
};
class SAL_WARN_UNUSED TOOLS_DLLPUBLIC StringErrorInfo : public DynamicErrorInfo
@@ -105,7 +75,7 @@ public:
StringErrorInfo( sal_uIntPtr lUserId,
const OUString& aStringP,
- ErrorHandlerFlags nMask = ErrorHandlerFlags::NONE);
+ sal_uInt16 nMask = 0);
const OUString& GetErrorString() const { return aString; }
};
@@ -118,7 +88,7 @@ private:
public:
TwoStringErrorInfo(sal_uIntPtr nUserID, const OUString & rTheArg1,
- const OUString & rTheArg2, ErrorHandlerFlags nMask):
+ const OUString & rTheArg2, sal_uInt16 nMask):
DynamicErrorInfo(nUserID, nMask), aArg1(rTheArg1), aArg2(rTheArg2) {}
const OUString& GetArg1() const { return aArg1; }
@@ -143,8 +113,8 @@ public:
static ErrorContext* GetContext();
};
-typedef ErrorHandlerFlags WindowDisplayErrorFunc(
- vcl::Window *, ErrorHandlerFlags nMask, const OUString &rErr, const OUString &rAction);
+typedef sal_uInt16 WindowDisplayErrorFunc(
+ vcl::Window *, sal_uInt16 nMask, const OUString &rErr, const OUString &rAction);
typedef void BasicDisplayErrorFunc(
const OUString &rErr, const OUString &rAction);
@@ -154,19 +124,19 @@ class SAL_WARN_UNUSED TOOLS_DLLPUBLIC ErrorHandler
friend class ErrorHandler_Impl;
private:
- static ErrorHandlerFlags HandleError_Impl( sal_uIntPtr lId,
- ErrorHandlerFlags nFlags,
+ static sal_uInt16 HandleError_Impl( sal_uIntPtr lId,
+ sal_uInt16 nFlags,
bool bJustCreateString,
OUString & rError);
protected:
virtual bool CreateString( const ErrorInfo *,
- OUString &, ErrorHandlerFlags& nMask ) const = 0;
+ OUString &, sal_uInt16& nMask ) const = 0;
public:
ErrorHandler();
virtual ~ErrorHandler();
- static ErrorHandlerFlags HandleError ( sal_uIntPtr lId, ErrorHandlerFlags nMask = ErrorHandlerFlags::MAX );
+ static sal_uInt16 HandleError ( sal_uIntPtr lId, sal_uInt16 nMask = USHRT_MAX );
static bool GetErrorString( sal_uIntPtr lId, OUString& rStr );
static void RegisterDisplay( BasicDisplayErrorFunc* );