summaryrefslogtreecommitdiff
path: root/include/editeng
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-02-09 08:52:13 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-06-21 08:42:30 +0200
commit528632660b72b105345945c13c5b68060d94a91b (patch)
tree860508d482959abeb9175f0ce6b9e65954269f95 /include/editeng
parentaee66aa85e75f67135e5c6079a281e18402d261a (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/editeng')
-rw-r--r--include/editeng/editdata.hxx6
-rw-r--r--include/editeng/editeng.hxx4
-rw-r--r--include/editeng/editerr.hxx4
-rw-r--r--include/editeng/editview.hxx3
-rw-r--r--include/editeng/outliner.hxx2
5 files changed, 10 insertions, 9 deletions
diff --git a/include/editeng/editdata.hxx b/include/editeng/editdata.hxx
index 40bb2de969c4..4c493865659f 100644
--- a/include/editeng/editdata.hxx
+++ b/include/editeng/editdata.hxx
@@ -55,9 +55,9 @@ enum class EEAnchorMode {
EDITENG_DLLPUBLIC extern const size_t EE_APPEND;
// Error messages for Read / Write Method
-#define EE_READWRITE_OK (ERRCODE_NONE)
-#define EE_READWRITE_WRONGFORMAT (SVSTREAM_ERRBASE_USER+1)
-#define EE_READWRITE_GENERALERROR (SVSTREAM_ERRBASE_USER+2)
+#define EE_READWRITE_OK ERRCODE_NONE
+#define EE_READWRITE_WRONGFORMAT ErrCode(SVSTREAM_ERRBASE_USER+1)
+#define EE_READWRITE_GENERALERROR ErrCode(SVSTREAM_ERRBASE_USER+2)
#define EDITUNDO_REMOVECHARS 100
#define EDITUNDO_CONNECTPARAS 101
diff --git a/include/editeng/editeng.hxx b/include/editeng/editeng.hxx
index ff9bed37e27c..05ccb792d5f6 100644
--- a/include/editeng/editeng.hxx
+++ b/include/editeng/editeng.hxx
@@ -39,6 +39,7 @@
#include <editeng/eedata.hxx>
#include <o3tl/typed_flags_set.hxx>
#include <svl/languageoptions.hxx>
+#include <vcl/errcode.hxx>
#include <functional>
namespace com { namespace sun { namespace star {
@@ -364,8 +365,7 @@ public:
void Draw( OutputDevice* pOutDev, const tools::Rectangle& rOutRect, const Point& rStartDocPos, bool bClip );
void Draw( OutputDevice* pOutDev, const Point& rStartPos, short nOrientation = 0 );
- // sal_uInt32: Error code of the stream.
- sal_uLong Read( SvStream& rInput, const OUString& rBaseURL, EETextFormat, SvKeyValueIterator* pHTTPHeaderAttrs = nullptr );
+ ErrCode Read( SvStream& rInput, const OUString& rBaseURL, EETextFormat, SvKeyValueIterator* pHTTPHeaderAttrs = nullptr );
void Write( SvStream& rOutput, EETextFormat );
void SetStatusEventHdl( const Link<EditStatus&,void>& rLink );
diff --git a/include/editeng/editerr.hxx b/include/editeng/editerr.hxx
index f020d01a4855..041e5320e547 100644
--- a/include/editeng/editerr.hxx
+++ b/include/editeng/editerr.hxx
@@ -21,9 +21,9 @@
#include <vcl/errcode.hxx>
-#define ERRCODE_SVX_LINGU_LANGUAGENOTEXISTS (2UL | ERRCODE_AREA_SVX)
+#define ERRCODE_SVX_LINGU_LANGUAGENOTEXISTS ErrCode(2UL | ERRCODE_AREA_SVX)
-#define ERRCODE_SVX_GRAPHIC_WRONG_FILEFORMAT (8UL | ERRCODE_AREA_SVX | \
+#define ERRCODE_SVX_GRAPHIC_WRONG_FILEFORMAT ErrCode(8UL | ERRCODE_AREA_SVX | \
ERRCODE_CLASS_READ )
#endif
diff --git a/include/editeng/editview.hxx b/include/editeng/editview.hxx
index 61dc4949ae63..f402730653a0 100644
--- a/include/editeng/editview.hxx
+++ b/include/editeng/editview.hxx
@@ -29,6 +29,7 @@
#include <tools/gen.hxx>
#include <tools/link.hxx>
#include <vcl/cursor.hxx>
+#include <vcl/errcode.hxx>
#include <editeng/editstat.hxx>
#include <svl/languageoptions.hxx>
#include <LibreOfficeKit/LibreOfficeKitTypes.h>
@@ -187,7 +188,7 @@ public:
void RemoveCharAttribs( sal_Int32 nPara, sal_uInt16 nWhich );
void RemoveAttribsKeepLanguages( bool bRemoveParaAttribs );
- sal_uInt32 Read( SvStream& rInput, EETextFormat eFormat, SvKeyValueIterator* pHTTPHeaderAttrs );
+ ErrCode Read( SvStream& rInput, EETextFormat eFormat, SvKeyValueIterator* pHTTPHeaderAttrs );
void SetBackgroundColor( const Color& rColor );
Color GetBackgroundColor() const;
diff --git a/include/editeng/outliner.hxx b/include/editeng/outliner.hxx
index dd83ed03c9cd..d5f5d7e3b9bc 100644
--- a/include/editeng/outliner.hxx
+++ b/include/editeng/outliner.hxx
@@ -892,7 +892,7 @@ public:
sal_Int32 GetLineLen( sal_Int32 nParagraph, sal_Int32 nLine ) const;
sal_uLong GetLineHeight( sal_Int32 nParagraph );
- sal_uLong Read( SvStream& rInput, const OUString& rBaseURL, sal_uInt16, SvKeyValueIterator* pHTTPHeaderAttrs = nullptr );
+ ErrCode Read( SvStream& rInput, const OUString& rBaseURL, sal_uInt16, SvKeyValueIterator* pHTTPHeaderAttrs = nullptr );
::svl::IUndoManager& GetUndoManager();
::svl::IUndoManager* SetUndoManager(::svl::IUndoManager* pNew);