summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-09-12 12:15:35 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-09-14 08:34:38 +0200
commitfd3888c69abd813462360f49f853fa988764596c (patch)
tree12ac0b3d2de79dbc53de874b209ef83bf5c31a21 /include
parent5cc45f148dac2080d5cdc2d69db539d55b1ff816 (diff)
move ErrCode to comphelper and improve debug output string
need to move it, because modules "below" vcl want to use the debug output method Change-Id: Ibcaf4089a1e0b3fcc0b5189c7ebf1aae90f50b48 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139791 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include')
-rw-r--r--include/IwyuFilter_include.yaml2
-rw-r--r--include/basic/basmgr.hxx2
-rw-r--r--include/basic/sberrors.hxx2
-rw-r--r--include/basic/sbmeth.hxx2
-rw-r--r--include/comphelper/errcode.hxx (renamed from include/vcl/errcode.hxx)13
-rw-r--r--include/editeng/editeng.hxx2
-rw-r--r--include/editeng/editerr.hxx2
-rw-r--r--include/editeng/editview.hxx2
-rw-r--r--include/editeng/outliner.hxx2
-rw-r--r--include/filter/msfilter/msdffimp.hxx2
-rw-r--r--include/filter/msfilter/svxmsbas.hxx2
-rw-r--r--include/sfx2/app.hxx2
-rw-r--r--include/sfx2/docinf.hxx2
-rw-r--r--include/sfx2/docinsert.hxx2
-rw-r--r--include/sfx2/filedlghelper.hxx2
-rw-r--r--include/sfx2/ipclient.hxx2
-rw-r--r--include/sfx2/objsh.hxx2
-rw-r--r--include/sfx2/opengrf.hxx2
-rw-r--r--include/sfx2/viewsh.hxx2
-rw-r--r--include/sot/storage.hxx2
-rw-r--r--include/svx/svxerr.hxx2
-rw-r--r--include/svx/xoutbmp.hxx2
-rw-r--r--include/tools/stream.hxx2
-rw-r--r--include/vbahelper/vbahelper.hxx2
-rw-r--r--include/vcl/cvtgrf.hxx2
-rw-r--r--include/vcl/errinf.hxx2
-rw-r--r--include/vcl/graphicfilter.hxx2
-rw-r--r--include/vcl/print.hxx2
-rw-r--r--include/xmloff/xmlexp.hxx2
29 files changed, 34 insertions, 35 deletions
diff --git a/include/IwyuFilter_include.yaml b/include/IwyuFilter_include.yaml
index 19b851d14d36..2fddbcabd85a 100644
--- a/include/IwyuFilter_include.yaml
+++ b/include/IwyuFilter_include.yaml
@@ -529,7 +529,7 @@ excludelist:
- com/sun/star/task/XInteractionRequest.hpp
include/basic/sberrors.hxx:
# Needed for macro defines
- - vcl/errcode.hxx
+ - comphelper/errcode.hxx
include/connectivity/BlobHelper.hxx:
# base class has to be a complete type
- com/sun/star/sdbc/XBlob.hpp
diff --git a/include/basic/basmgr.hxx b/include/basic/basmgr.hxx
index 166b62489be1..4f263c41e0cc 100644
--- a/include/basic/basmgr.hxx
+++ b/include/basic/basmgr.hxx
@@ -20,7 +20,7 @@
#define INCLUDED_BASIC_BASMGR_HXX
#include <utility>
-#include <vcl/errcode.hxx>
+#include <comphelper/errcode.hxx>
#include <svl/SfxBroadcaster.hxx>
#include <basic/sbstar.hxx>
#include <basic/basicdllapi.h>
diff --git a/include/basic/sberrors.hxx b/include/basic/sberrors.hxx
index 5976df8b94e3..d630b0747ab1 100644
--- a/include/basic/sberrors.hxx
+++ b/include/basic/sberrors.hxx
@@ -20,7 +20,7 @@
#ifndef INCLUDED_BASIC_SBERRORS_HXX
#define INCLUDED_BASIC_SBERRORS_HXX
-#include <vcl/errcode.hxx>
+#include <comphelper/errcode.hxx>
#define ERRCODE_BASIC_SYNTAX ErrCode( ErrCodeArea::Sbx, ErrCodeClass::Compiler, 1) // unspecified syntax error
#define ERRCODE_BASIC_BAD_ARGUMENT ErrCode( ErrCodeArea::Sbx, ErrCodeClass::NotSupported, 2) // Invalid procedure call
diff --git a/include/basic/sbmeth.hxx b/include/basic/sbmeth.hxx
index fefd84aed1ea..743b4d80b7cf 100644
--- a/include/basic/sbmeth.hxx
+++ b/include/basic/sbmeth.hxx
@@ -20,7 +20,7 @@
#ifndef INCLUDED_BASIC_SBMETH_HXX
#define INCLUDED_BASIC_SBMETH_HXX
-#include <vcl/errcode.hxx>
+#include <comphelper/errcode.hxx>
#include <basic/sbxmeth.hxx>
#include <basic/sbdef.hxx>
#include <basic/basicdllapi.h>
diff --git a/include/vcl/errcode.hxx b/include/comphelper/errcode.hxx
index e43b6b65dd49..7b4fffa1bb3a 100644
--- a/include/vcl/errcode.hxx
+++ b/include/comphelper/errcode.hxx
@@ -16,12 +16,10 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
-#ifndef INCLUDED_VCL_ERRCODE_HXX
-#define INCLUDED_VCL_ERRCODE_HXX
+#pragma once
#include <rtl/ustring.hxx>
-#include <vcl/dllapi.h>
+#include <comphelper/comphelperdllapi.h>
#include <ostream>
/*
@@ -141,6 +139,9 @@ public:
return "0x" + OUString::number(m_value, 16);
}
+ /// Return a string suitable for debug output, the same as the operator<< function
+ COMPHELPER_DLLPUBLIC OUString toString() const;
+
template <typename... Args> bool anyOf(Args... args) const
{
static_assert(sizeof...(args) > 0);
@@ -151,7 +152,7 @@ private:
sal_uInt32 m_value;
};
-VCL_DLLPUBLIC std::ostream& operator<<(std::ostream& os, const ErrCode& err);
+COMPHELPER_DLLPUBLIC std::ostream& operator<<(std::ostream& os, const ErrCode& err);
enum class ErrCodeArea {
Io = 0 ,
@@ -274,6 +275,4 @@ enum class ErrCodeClass {
#define ERRCODE_INET_GENERAL ErrCode(ErrCodeArea::Inet, ErrCodeClass::Write, 5)
#define ERRCODE_INET_OFFLINE ErrCode(ErrCodeArea::Inet, ErrCodeClass::Read, 6)
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/editeng/editeng.hxx b/include/editeng/editeng.hxx
index ae0990666ded..1252487de836 100644
--- a/include/editeng/editeng.hxx
+++ b/include/editeng/editeng.hxx
@@ -44,7 +44,7 @@
#include <editeng/eedata.hxx>
#include <o3tl/typed_flags_set.hxx>
#include <svl/languageoptions.hxx>
-#include <vcl/errcode.hxx>
+#include <comphelper/errcode.hxx>
#include <functional>
template <typename Arg, typename Ret> class Link;
diff --git a/include/editeng/editerr.hxx b/include/editeng/editerr.hxx
index e88b7b0f134f..9458cfd54f0a 100644
--- a/include/editeng/editerr.hxx
+++ b/include/editeng/editerr.hxx
@@ -19,7 +19,7 @@
#ifndef INCLUDED_EDITENG_EDITERR_HXX
#define INCLUDED_EDITENG_EDITERR_HXX
-#include <vcl/errcode.hxx>
+#include <comphelper/errcode.hxx>
#define ERRCODE_SVX_LINGU_LANGUAGENOTEXISTS ErrCode(ErrCodeArea::Svx, 2)
#define ERRCODE_SVX_GRAPHIC_WRONG_FILEFORMAT ErrCode(ErrCodeArea::Svx, ErrCodeClass::Read, 8)
diff --git a/include/editeng/editview.hxx b/include/editeng/editview.hxx
index 4f312b578a62..17ed1bb4e7ac 100644
--- a/include/editeng/editview.hxx
+++ b/include/editeng/editview.hxx
@@ -26,7 +26,7 @@
#include <i18nlangtag/lang.h>
#include <tools/color.hxx>
#include <tools/gen.hxx>
-#include <vcl/errcode.hxx>
+#include <comphelper/errcode.hxx>
#include <vcl/vclptr.hxx>
#include <editeng/editstat.hxx>
#include <editeng/flditem.hxx>
diff --git a/include/editeng/outliner.hxx b/include/editeng/outliner.hxx
index 1712c1f3d427..03acc7cdc633 100644
--- a/include/editeng/outliner.hxx
+++ b/include/editeng/outliner.hxx
@@ -31,7 +31,7 @@
#include <tools/color.hxx>
#include <utility>
#include <vcl/outdev.hxx>
-#include <vcl/errcode.hxx>
+#include <comphelper/errcode.hxx>
#include <tools/link.hxx>
#include <editeng/editengdllapi.h>
diff --git a/include/filter/msfilter/msdffimp.hxx b/include/filter/msfilter/msdffimp.hxx
index 492c64ebf724..da1dc29fe442 100644
--- a/include/filter/msfilter/msdffimp.hxx
+++ b/include/filter/msfilter/msdffimp.hxx
@@ -40,7 +40,7 @@
#include <rtl/ref.hxx>
#include <sal/types.h>
#include <svx/msdffdef.hxx>
-#include <vcl/errcode.hxx>
+#include <comphelper/errcode.hxx>
#include <tools/degree.hxx>
#include <tools/gen.hxx>
#include <tools/ref.hxx>
diff --git a/include/filter/msfilter/svxmsbas.hxx b/include/filter/msfilter/svxmsbas.hxx
index 190e289c42bf..304191ab7950 100644
--- a/include/filter/msfilter/svxmsbas.hxx
+++ b/include/filter/msfilter/svxmsbas.hxx
@@ -23,7 +23,7 @@
#include <filter/msfilter/msfilterdllapi.h>
#include <rtl/ustring.hxx>
#include <sot/storage.hxx>
-#include <vcl/errcode.hxx>
+#include <comphelper/errcode.hxx>
#include <tools/ref.hxx>
class SfxObjectShell;
diff --git a/include/sfx2/app.hxx b/include/sfx2/app.hxx
index 3be6671986a5..6eff39bae926 100644
--- a/include/sfx2/app.hxx
+++ b/include/sfx2/app.hxx
@@ -23,7 +23,7 @@
#include <sal/config.h>
#include <sfx2/dllapi.h>
#include <sal/types.h>
-#include <vcl/errcode.hxx>
+#include <comphelper/errcode.hxx>
#include <svl/poolitem.hxx>
#include <vcl/bitmapex.hxx>
#include <tools/link.hxx>
diff --git a/include/sfx2/docinf.hxx b/include/sfx2/docinf.hxx
index 09ecfff6bdf5..218f80148973 100644
--- a/include/sfx2/docinf.hxx
+++ b/include/sfx2/docinf.hxx
@@ -22,7 +22,7 @@
#include <sal/config.h>
#include <sfx2/dllapi.h>
#include <sal/types.h>
-#include <vcl/errcode.hxx>
+#include <comphelper/errcode.hxx>
class GDIMetaFile;
diff --git a/include/sfx2/docinsert.hxx b/include/sfx2/docinsert.hxx
index 7e64a3882f44..73eb2e4370b8 100644
--- a/include/sfx2/docinsert.hxx
+++ b/include/sfx2/docinsert.hxx
@@ -22,7 +22,7 @@
#include <rtl/ustring.hxx>
#include <sfx2/dllapi.h>
-#include <vcl/errcode.hxx>
+#include <comphelper/errcode.hxx>
#include <tools/link.hxx>
#include <memory>
#include <vector>
diff --git a/include/sfx2/filedlghelper.hxx b/include/sfx2/filedlghelper.hxx
index b0b5303980c8..13593bae0358 100644
--- a/include/sfx2/filedlghelper.hxx
+++ b/include/sfx2/filedlghelper.hxx
@@ -28,7 +28,7 @@
#include <rtl/ustring.hxx>
#include <comphelper/documentconstants.hxx>
#include <tools/link.hxx>
-#include <vcl/errcode.hxx>
+#include <comphelper/errcode.hxx>
#include <o3tl/typed_flags_set.hxx>
#include <memory>
diff --git a/include/sfx2/ipclient.hxx b/include/sfx2/ipclient.hxx
index 6eddf9e9f818..b95018c5614c 100644
--- a/include/sfx2/ipclient.hxx
+++ b/include/sfx2/ipclient.hxx
@@ -26,7 +26,7 @@
#include <tools/gen.hxx>
-#include <vcl/errcode.hxx>
+#include <comphelper/errcode.hxx>
#include <vcl/vclptr.hxx>
namespace com::sun::star::embed { class XEmbeddedObject; }
diff --git a/include/sfx2/objsh.hxx b/include/sfx2/objsh.hxx
index 428995bff493..f27948d81b64 100644
--- a/include/sfx2/objsh.hxx
+++ b/include/sfx2/objsh.hxx
@@ -23,7 +23,7 @@
#include <sfx2/dllapi.h>
#include <sfx2/signaturestate.hxx>
#include <sal/types.h>
-#include <vcl/errcode.hxx>
+#include <comphelper/errcode.hxx>
#include <com/sun/star/uno/Reference.h>
#include <com/sun/star/uno/Sequence.hxx>
#include <com/sun/star/frame/XModel3.hpp>
diff --git a/include/sfx2/opengrf.hxx b/include/sfx2/opengrf.hxx
index d28f88c4f5a3..c23e10989bb0 100644
--- a/include/sfx2/opengrf.hxx
+++ b/include/sfx2/opengrf.hxx
@@ -22,7 +22,7 @@
#include <memory>
#include <sfx2/dllapi.h>
#include <rtl/ustring.hxx>
-#include <vcl/errcode.hxx>
+#include <comphelper/errcode.hxx>
namespace com::sun::star::ui::dialogs { class XFilePickerControlAccess; }
namespace com::sun::star::uno { template <class interface_type> class Reference; }
diff --git a/include/sfx2/viewsh.hxx b/include/sfx2/viewsh.hxx
index 523534f5d1e1..5d1a44ff07be 100644
--- a/include/sfx2/viewsh.hxx
+++ b/include/sfx2/viewsh.hxx
@@ -29,7 +29,7 @@
#include <sfx2/shell.hxx>
#include <i18nlangtag/languagetag.hxx>
#include <vcl/IDialogRenderable.hxx>
-#include <vcl/errcode.hxx>
+#include <comphelper/errcode.hxx>
#include <o3tl/typed_flags_set.hxx>
#include <vcl/vclptr.hxx>
#include <editeng/outliner.hxx>
diff --git a/include/sot/storage.hxx b/include/sot/storage.hxx
index dd44b020694a..ac11340ac26d 100644
--- a/include/sot/storage.hxx
+++ b/include/sot/storage.hxx
@@ -23,7 +23,7 @@
#include <sot/object.hxx>
#include <tools/stream.hxx>
#include <tools/globname.hxx>
-#include <vcl/errcode.hxx>
+#include <comphelper/errcode.hxx>
#include <sot/storinfo.hxx>
#include <sot/sotdllapi.h>
diff --git a/include/svx/svxerr.hxx b/include/svx/svxerr.hxx
index ecb98cd27419..6d20baf5a205 100644
--- a/include/svx/svxerr.hxx
+++ b/include/svx/svxerr.hxx
@@ -19,7 +19,7 @@
#ifndef INCLUDED_SVX_SVXERR_HXX
#define INCLUDED_SVX_SVXERR_HXX
-#include <vcl/errcode.hxx>
+#include <comphelper/errcode.hxx>
#include <svtools/ehdl.hxx>
#include <svx/svxdllapi.h>
diff --git a/include/svx/xoutbmp.hxx b/include/svx/xoutbmp.hxx
index 0451fa479d16..43a666d06277 100644
--- a/include/svx/xoutbmp.hxx
+++ b/include/svx/xoutbmp.hxx
@@ -21,7 +21,7 @@
#define INCLUDED_SVX_XOUTBMP_HXX
#include <vcl/graph.hxx>
-#include <vcl/errcode.hxx>
+#include <comphelper/errcode.hxx>
#include <com/sun/star/uno/Sequence.h>
#include <com/sun/star/beans/PropertyValue.hpp>
#include <svx/svxdllapi.h>
diff --git a/include/tools/stream.hxx b/include/tools/stream.hxx
index 44f69a400b53..c0b920c1d20f 100644
--- a/include/tools/stream.hxx
+++ b/include/tools/stream.hxx
@@ -23,7 +23,7 @@
#include <tools/lineend.hxx>
#include <tools/long.hxx>
#include <tools/ref.hxx>
-#include <vcl/errcode.hxx>
+#include <comphelper/errcode.hxx>
#include <rtl/string.hxx>
#include <rtl/strbuf.hxx>
#include <o3tl/typed_flags_set.hxx>
diff --git a/include/vbahelper/vbahelper.hxx b/include/vbahelper/vbahelper.hxx
index 01366d9ad771..533d5e3698b6 100644
--- a/include/vbahelper/vbahelper.hxx
+++ b/include/vbahelper/vbahelper.hxx
@@ -31,7 +31,7 @@
#include <tools/color.hxx>
#include <vbahelper/vbadllapi.h>
#include <vcl/ptrstyle.hxx>
-#include <vcl/errcode.hxx>
+#include <comphelper/errcode.hxx>
namespace com::sun::star {
namespace awt { class XControl; }
diff --git a/include/vcl/cvtgrf.hxx b/include/vcl/cvtgrf.hxx
index f3d2024e815c..6027f66e5631 100644
--- a/include/vcl/cvtgrf.hxx
+++ b/include/vcl/cvtgrf.hxx
@@ -23,7 +23,7 @@
#include <vcl/dllapi.h>
#include <tools/link.hxx>
#include <vcl/salctype.hxx>
-#include <vcl/errcode.hxx>
+#include <comphelper/errcode.hxx>
class Graphic;
diff --git a/include/vcl/errinf.hxx b/include/vcl/errinf.hxx
index 7e83cd799c3c..7f2976e23cee 100644
--- a/include/vcl/errinf.hxx
+++ b/include/vcl/errinf.hxx
@@ -22,7 +22,7 @@
#include <rtl/ustring.hxx>
#include <utility>
-#include <vcl/errcode.hxx>
+#include <comphelper/errcode.hxx>
#include <vcl/dllapi.h>
#include <o3tl/typed_flags_set.hxx>
diff --git a/include/vcl/graphicfilter.hxx b/include/vcl/graphicfilter.hxx
index 72a767b3d551..787439773bc4 100644
--- a/include/vcl/graphicfilter.hxx
+++ b/include/vcl/graphicfilter.hxx
@@ -23,7 +23,7 @@
#include <tools/gen.hxx>
#include <vcl/dllapi.h>
#include <vcl/graph.hxx>
-#include <vcl/errcode.hxx>
+#include <comphelper/errcode.hxx>
#include <o3tl/typed_flags_set.hxx>
#include <vcl/graphic/GraphicMetadata.hxx>
diff --git a/include/vcl/print.hxx b/include/vcl/print.hxx
index ebd6067788e8..84a8c4d9dc95 100644
--- a/include/vcl/print.hxx
+++ b/include/vcl/print.hxx
@@ -31,7 +31,7 @@
#include <vcl/dllapi.h>
#include <utility>
#include <vcl/PrinterSupport.hxx>
-#include <vcl/errcode.hxx>
+#include <comphelper/errcode.hxx>
#include <vcl/outdev.hxx>
#include <vcl/prntypes.hxx>
#include <vcl/region.hxx>
diff --git a/include/xmloff/xmlexp.hxx b/include/xmloff/xmlexp.hxx
index 93e76360a768..37a9096a0b32 100644
--- a/include/xmloff/xmlexp.hxx
+++ b/include/xmloff/xmlexp.hxx
@@ -49,7 +49,7 @@
#include <comphelper/servicehelper.hxx>
#include <cppuhelper/implbase.hxx>
#include <tools/fldunit.hxx>
-#include <vcl/errcode.hxx>
+#include <comphelper/errcode.hxx>
#include <vector>
#include <memory>