summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--accessibility/inc/pch/precompiled_acc.hxx2
-rw-r--r--basctl/inc/pch/precompiled_basctl.hxx2
-rw-r--r--basic/inc/basic.hrc2
-rw-r--r--basic/inc/pch/precompiled_sb.hxx2
-rw-r--r--basic/inc/sbxbase.hxx2
-rw-r--r--basic/source/classes/sbunoobj.cxx2
-rw-r--r--basic/source/inc/buffer.hxx2
-rw-r--r--basic/source/inc/sbintern.hxx2
-rw-r--r--basic/source/inc/scanner.hxx2
-rw-r--r--basic/source/runtime/ddectrl.cxx2
-rw-r--r--basic/source/runtime/ddectrl.hxx2
-rw-r--r--basic/source/runtime/dllmgr.hxx2
-rw-r--r--basic/source/sbx/sbxbool.cxx2
-rw-r--r--basic/source/sbx/sbxbyte.cxx2
-rw-r--r--basic/source/sbx/sbxchar.cxx2
-rw-r--r--basic/source/sbx/sbxdbl.cxx2
-rw-r--r--basic/source/sbx/sbxint.cxx2
-rw-r--r--basic/source/sbx/sbxlng.cxx2
-rw-r--r--basic/source/sbx/sbxscan.cxx2
-rw-r--r--basic/source/sbx/sbxsng.cxx2
-rw-r--r--basic/source/sbx/sbxuint.cxx2
-rw-r--r--basic/source/sbx/sbxulng.cxx2
-rw-r--r--chart2/inc/pch/precompiled_chartcontroller.hxx2
-rw-r--r--chart2/inc/pch/precompiled_chartcore.hxx2
-rw-r--r--chart2/source/model/inc/XMLFilter.hxx2
-rw-r--r--comphelper/Library_comphelper.mk1
-rw-r--r--comphelper/source/misc/errcode.cxx (renamed from vcl/source/helper/errcode.cxx)108
-rw-r--r--connectivity/inc/pch/precompiled_dbase.hxx2
-rw-r--r--connectivity/inc/pch/precompiled_file.hxx2
-rw-r--r--cui/inc/pch/precompiled_cui.hxx2
-rw-r--r--desktop/inc/pch/precompiled_sofficeapp.hxx2
-rw-r--r--desktop/source/lib/lokinteractionhandler.hxx2
-rw-r--r--editeng/inc/pch/precompiled_editeng.hxx2
-rw-r--r--forms/inc/pch/precompiled_frm.hxx2
-rw-r--r--framework/source/interaction/quietinteraction.cxx2
-rw-r--r--framework/source/loadenv/loadenv.cxx2
-rw-r--r--framework/source/services/desktop.cxx2
-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
-rw-r--r--linguistic/source/dicimp.hxx2
-rw-r--r--reportdesign/inc/pch/precompiled_rpt.hxx2
-rw-r--r--reportdesign/inc/pch/precompiled_rptui.hxx2
-rw-r--r--sc/IwyuFilter_sc.yaml2
-rw-r--r--sc/inc/document.hxx2
-rw-r--r--sc/inc/filter.hxx2
-rw-r--r--sc/inc/pch/precompiled_sc.hxx2
-rw-r--r--sc/inc/pch/precompiled_scfilt.hxx2
-rw-r--r--sc/inc/scerrors.hxx2
-rw-r--r--sc/inc/xmlwrap.hxx2
-rw-r--r--sc/source/filter/inc/eeparser.hxx2
-rw-r--r--sc/source/filter/inc/qpro.hxx2
-rw-r--r--sd/IwyuFilter_sd.yaml2
-rw-r--r--sd/inc/errhdl.hrc2
-rw-r--r--sd/inc/pch/precompiled_sd.hxx2
-rw-r--r--sd/inc/pch/precompiled_sdui.hxx2
-rw-r--r--sd/inc/sderror.hxx2
-rw-r--r--sd/source/ui/inc/filedlg.hxx2
-rw-r--r--sdext/inc/pch/precompiled_PresentationMinimizer.hxx2
-rw-r--r--sdext/source/pdfimport/misc/pwdinteract.cxx2
-rw-r--r--sfx2/inc/pch/precompiled_sfx.hxx2
-rw-r--r--sfx2/source/doc/DocumentMetadataAccess.cxx2
-rw-r--r--sfx2/source/doc/SfxDocumentMetaData.cxx2
-rw-r--r--sfx2/source/doc/sfxbasemodel.cxx14
-rw-r--r--sfx2/source/inc/appopen.hxx2
-rw-r--r--sfx2/source/inc/macroloader.hxx2
-rw-r--r--slideshow/inc/pch/precompiled_slideshow.hxx2
-rw-r--r--solenv/clang-format/excludelist2
-rw-r--r--sot/inc/pch/precompiled_sot.hxx2
-rw-r--r--sot/source/sdstor/storinfo.cxx2
-rw-r--r--starmath/inc/mathml/import.hxx2
-rw-r--r--starmath/inc/mathml/mathmlimport.hxx2
-rw-r--r--starmath/inc/pch/precompiled_sm.hxx2
-rw-r--r--svtools/inc/pch/precompiled_svt.hxx2
-rw-r--r--svx/inc/pch/precompiled_svx.hxx2
-rw-r--r--svx/inc/pch/precompiled_svxcore.hxx2
-rw-r--r--sw/inc/error.hrc2
-rw-r--r--sw/inc/pch/precompiled_msword.hxx2
-rw-r--r--sw/inc/pch/precompiled_sw.hxx2
-rw-r--r--sw/inc/pch/precompiled_swui.hxx2
-rw-r--r--sw/inc/pch/precompiled_vbaswobj.hxx2
-rw-r--r--sw/source/core/inc/swblocks.hxx2
-rw-r--r--tools/CppunitTest_tools_test.mk1
-rw-r--r--unotools/inc/pch/precompiled_utl.hxx2
-rw-r--r--unotools/source/streaming/streamwrap.cxx2
-rw-r--r--unotools/source/ucbhelper/ucblockbytes.hxx2
-rw-r--r--uui/IwyuFilter_uui.yaml2
-rw-r--r--uui/inc/ids.hrc2
-rw-r--r--uui/inc/ids.hxx2
-rw-r--r--uui/source/iahndl.hxx2
-rw-r--r--vbahelper/inc/pch/precompiled_msforms.hxx2
-rw-r--r--vbahelper/inc/pch/precompiled_vbahelper.hxx2
-rw-r--r--vcl/Library_vcl.mk1
-rw-r--r--vcl/inc/filter/XpmReader.hxx1
-rw-r--r--vcl/qa/cppunit/cjktext.cxx2
-rw-r--r--vcl/qa/cppunit/text.cxx2
-rw-r--r--xmlsecurity/inc/pch/precompiled_xmlsecurity.hxx2
-rw-r--r--xmlsecurity/inc/pch/precompiled_xsec_xmlsec.hxx2
124 files changed, 194 insertions, 179 deletions
diff --git a/accessibility/inc/pch/precompiled_acc.hxx b/accessibility/inc/pch/precompiled_acc.hxx
index 07f6fa2c8e8d..806c944ac6dd 100644
--- a/accessibility/inc/pch/precompiled_acc.hxx
+++ b/accessibility/inc/pch/precompiled_acc.hxx
@@ -108,7 +108,7 @@
#include <vcl/dllapi.h>
#include <vcl/dndhelp.hxx>
#include <vcl/dockwin.hxx>
-#include <vcl/errcode.hxx>
+#include <comphelper/errcode.hxx>
#include <vcl/event.hxx>
#include <vcl/fntstyle.hxx>
#include <vcl/font.hxx>
diff --git a/basctl/inc/pch/precompiled_basctl.hxx b/basctl/inc/pch/precompiled_basctl.hxx
index 1b9c5e9763c6..248e8b7cbcaa 100644
--- a/basctl/inc/pch/precompiled_basctl.hxx
+++ b/basctl/inc/pch/precompiled_basctl.hxx
@@ -121,7 +121,7 @@
#include <vcl/ctrl.hxx>
#include <vcl/devicecoordinate.hxx>
#include <vcl/dllapi.h>
-#include <vcl/errcode.hxx>
+#include <comphelper/errcode.hxx>
#include <vcl/event.hxx>
#include <vcl/fntstyle.hxx>
#include <vcl/font.hxx>
diff --git a/basic/inc/basic.hrc b/basic/inc/basic.hrc
index 79b940a38a1e..7a2c8d7de9f6 100644
--- a/basic/inc/basic.hrc
+++ b/basic/inc/basic.hrc
@@ -21,7 +21,7 @@
#include <basic/sberrors.hxx>
#include <unotools/resmgr.hxx>
-#include <vcl/errcode.hxx>
+#include <comphelper/errcode.hxx>
#include <utility>
diff --git a/basic/inc/pch/precompiled_sb.hxx b/basic/inc/pch/precompiled_sb.hxx
index eb0f33eafe5f..47e336d1cce0 100644
--- a/basic/inc/pch/precompiled_sb.hxx
+++ b/basic/inc/pch/precompiled_sb.hxx
@@ -52,7 +52,7 @@
#include <sal/saldllapi.h>
#include <sal/types.h>
#include <vcl/dllapi.h>
-#include <vcl/errcode.hxx>
+#include <comphelper/errcode.hxx>
#include <vcl/graph.hxx>
#include <vcl/mapmod.hxx>
#include <vcl/settings.hxx>
diff --git a/basic/inc/sbxbase.hxx b/basic/inc/sbxbase.hxx
index e06d76161dec..15a16a4ac113 100644
--- a/basic/inc/sbxbase.hxx
+++ b/basic/inc/sbxbase.hxx
@@ -23,7 +23,7 @@
#include <basic/sbxvar.hxx>
#include <i18nlangtag/lang.h>
-#include <vcl/errcode.hxx>
+#include <comphelper/errcode.hxx>
#include <memory>
#include <vector>
diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx
index fd7eee031799..8d3dac965593 100644
--- a/basic/source/classes/sbunoobj.cxx
+++ b/basic/source/classes/sbunoobj.cxx
@@ -23,7 +23,7 @@
#include <o3tl/safeint.hxx>
#include <utility>
#include <vcl/svapp.hxx>
-#include <vcl/errcode.hxx>
+#include <comphelper/errcode.hxx>
#include <svl/hint.hxx>
#include <cppuhelper/implbase.hxx>
diff --git a/basic/source/inc/buffer.hxx b/basic/source/inc/buffer.hxx
index e56d60b6c615..5c555d74c089 100644
--- a/basic/source/inc/buffer.hxx
+++ b/basic/source/inc/buffer.hxx
@@ -21,7 +21,7 @@
#include <rtl/ustring.hxx>
#include <sal/types.h>
-#include <vcl/errcode.hxx>
+#include <comphelper/errcode.hxx>
#include <vector>
// Stores all numbers big endian
diff --git a/basic/source/inc/sbintern.hxx b/basic/source/inc/sbintern.hxx
index fe897ab6bcd6..b00ba29f5521 100644
--- a/basic/source/inc/sbintern.hxx
+++ b/basic/source/inc/sbintern.hxx
@@ -22,7 +22,7 @@
#include <basic/sbstar.hxx>
#include <sbxfac.hxx>
#include <unotools/transliterationwrapper.hxx>
-#include <vcl/errcode.hxx>
+#include <comphelper/errcode.hxx>
#include <config_features.h>
namespace utl
diff --git a/basic/source/inc/scanner.hxx b/basic/source/inc/scanner.hxx
index 2a1b48ffdda2..51e4ed7fa5d8 100644
--- a/basic/source/inc/scanner.hxx
+++ b/basic/source/inc/scanner.hxx
@@ -20,7 +20,7 @@
#pragma once
#include <basic/sbxdef.hxx>
-#include <vcl/errcode.hxx>
+#include <comphelper/errcode.hxx>
// The scanner is stand-alone, i. e. it can be used from everywhere.
// A BASIC-instance is necessary for error messages. Without BASIC
diff --git a/basic/source/runtime/ddectrl.cxx b/basic/source/runtime/ddectrl.cxx
index bb2c4c5548f1..41e5c53d84de 100644
--- a/basic/source/runtime/ddectrl.cxx
+++ b/basic/source/runtime/ddectrl.cxx
@@ -17,7 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include <vcl/errcode.hxx>
+#include <comphelper/errcode.hxx>
#include <svl/svdde.hxx>
#include "ddectrl.hxx"
#include <basic/sberrors.hxx>
diff --git a/basic/source/runtime/ddectrl.hxx b/basic/source/runtime/ddectrl.hxx
index 3b4f3d9bb122..d341bbcb8e72 100644
--- a/basic/source/runtime/ddectrl.hxx
+++ b/basic/source/runtime/ddectrl.hxx
@@ -20,7 +20,7 @@
#pragma once
#include <tools/link.hxx>
-#include <vcl/errcode.hxx>
+#include <comphelper/errcode.hxx>
#include <memory>
#include <vector>
diff --git a/basic/source/runtime/dllmgr.hxx b/basic/source/runtime/dllmgr.hxx
index e0a99e7f4d3a..a280e89b64db 100644
--- a/basic/source/runtime/dllmgr.hxx
+++ b/basic/source/runtime/dllmgr.hxx
@@ -20,7 +20,7 @@
#pragma once
#include <sal/config.h>
-#include <vcl/errcode.hxx>
+#include <comphelper/errcode.hxx>
#include <memory>
class SbxArray;
diff --git a/basic/source/sbx/sbxbool.cxx b/basic/source/sbx/sbxbool.cxx
index 0b5f2111eca8..2f5f031329f2 100644
--- a/basic/source/sbx/sbxbool.cxx
+++ b/basic/source/sbx/sbxbool.cxx
@@ -17,7 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include <vcl/errcode.hxx>
+#include <comphelper/errcode.hxx>
#include <basic/sberrors.hxx>
#include "sbxconv.hxx"
#include "sbxres.hxx"
diff --git a/basic/source/sbx/sbxbyte.cxx b/basic/source/sbx/sbxbyte.cxx
index 1892167121c2..071fcd6338f3 100644
--- a/basic/source/sbx/sbxbyte.cxx
+++ b/basic/source/sbx/sbxbyte.cxx
@@ -20,7 +20,7 @@
#include <sal/config.h>
#include <o3tl/safeint.hxx>
-#include <vcl/errcode.hxx>
+#include <comphelper/errcode.hxx>
//#include <basic/sbx.hxx>
#include <basic/sberrors.hxx>
#include "sbxconv.hxx"
diff --git a/basic/source/sbx/sbxchar.cxx b/basic/source/sbx/sbxchar.cxx
index 36bd8d60d482..f3a6715a2911 100644
--- a/basic/source/sbx/sbxchar.cxx
+++ b/basic/source/sbx/sbxchar.cxx
@@ -17,7 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include <vcl/errcode.hxx>
+#include <comphelper/errcode.hxx>
#include <basic/sberrors.hxx>
#include "sbxconv.hxx"
#include <rtlproto.hxx>
diff --git a/basic/source/sbx/sbxdbl.cxx b/basic/source/sbx/sbxdbl.cxx
index 206a835b4e27..10cdbc203b0d 100644
--- a/basic/source/sbx/sbxdbl.cxx
+++ b/basic/source/sbx/sbxdbl.cxx
@@ -19,7 +19,7 @@
#include <config_features.h>
-#include <vcl/errcode.hxx>
+#include <comphelper/errcode.hxx>
#include "sbxconv.hxx"
#include <rtlproto.hxx>
#include <runtime.hxx>
diff --git a/basic/source/sbx/sbxint.cxx b/basic/source/sbx/sbxint.cxx
index 432aaf9b9cad..3e66e83fd7c4 100644
--- a/basic/source/sbx/sbxint.cxx
+++ b/basic/source/sbx/sbxint.cxx
@@ -20,7 +20,7 @@
#include <sal/config.h>
#include <o3tl/safeint.hxx>
-#include <vcl/errcode.hxx>
+#include <comphelper/errcode.hxx>
#include <basic/sberrors.hxx>
#include "sbxconv.hxx"
#include <rtlproto.hxx>
diff --git a/basic/source/sbx/sbxlng.cxx b/basic/source/sbx/sbxlng.cxx
index 7011a13b0da8..e129406e2f3a 100644
--- a/basic/source/sbx/sbxlng.cxx
+++ b/basic/source/sbx/sbxlng.cxx
@@ -19,7 +19,7 @@
#include <sal/config.h>
-#include <vcl/errcode.hxx>
+#include <comphelper/errcode.hxx>
#include <basic/sberrors.hxx>
#include "sbxconv.hxx"
#include <rtlproto.hxx>
diff --git a/basic/source/sbx/sbxscan.cxx b/basic/source/sbx/sbxscan.cxx
index ec2783b1b837..71633b086a35 100644
--- a/basic/source/sbx/sbxscan.cxx
+++ b/basic/source/sbx/sbxscan.cxx
@@ -23,7 +23,7 @@
#include <config_features.h>
-#include <vcl/errcode.hxx>
+#include <comphelper/errcode.hxx>
#include <unotools/resmgr.hxx>
#include "sbxconv.hxx"
#include <rtlproto.hxx>
diff --git a/basic/source/sbx/sbxsng.cxx b/basic/source/sbx/sbxsng.cxx
index ba5a5428775f..27109971609a 100644
--- a/basic/source/sbx/sbxsng.cxx
+++ b/basic/source/sbx/sbxsng.cxx
@@ -19,7 +19,7 @@
#include <sal/config.h>
-#include <vcl/errcode.hxx>
+#include <comphelper/errcode.hxx>
#include <basic/sberrors.hxx>
#include "sbxconv.hxx"
#include <rtlproto.hxx>
diff --git a/basic/source/sbx/sbxuint.cxx b/basic/source/sbx/sbxuint.cxx
index 1a8013c1cc4b..d536ec99e217 100644
--- a/basic/source/sbx/sbxuint.cxx
+++ b/basic/source/sbx/sbxuint.cxx
@@ -19,7 +19,7 @@
#include <sal/config.h>
-#include <vcl/errcode.hxx>
+#include <comphelper/errcode.hxx>
#include <basic/sberrors.hxx>
#include "sbxconv.hxx"
#include <rtlproto.hxx>
diff --git a/basic/source/sbx/sbxulng.cxx b/basic/source/sbx/sbxulng.cxx
index a14f3b028712..68ae31457088 100644
--- a/basic/source/sbx/sbxulng.cxx
+++ b/basic/source/sbx/sbxulng.cxx
@@ -19,7 +19,7 @@
#include <sal/config.h>
-#include <vcl/errcode.hxx>
+#include <comphelper/errcode.hxx>
#include <basic/sberrors.hxx>
#include "sbxconv.hxx"
#include <rtlproto.hxx>
diff --git a/chart2/inc/pch/precompiled_chartcontroller.hxx b/chart2/inc/pch/precompiled_chartcontroller.hxx
index 6251bd0129e3..5a1c5bb77f2f 100644
--- a/chart2/inc/pch/precompiled_chartcontroller.hxx
+++ b/chart2/inc/pch/precompiled_chartcontroller.hxx
@@ -113,7 +113,7 @@
#include <vcl/devicecoordinate.hxx>
#include <vcl/dllapi.h>
#include <vcl/dockwin.hxx>
-#include <vcl/errcode.hxx>
+#include <comphelper/errcode.hxx>
#include <vcl/event.hxx>
#include <vcl/fntstyle.hxx>
#include <vcl/font.hxx>
diff --git a/chart2/inc/pch/precompiled_chartcore.hxx b/chart2/inc/pch/precompiled_chartcore.hxx
index e42caf8ff0ac..47a8030da161 100644
--- a/chart2/inc/pch/precompiled_chartcore.hxx
+++ b/chart2/inc/pch/precompiled_chartcore.hxx
@@ -73,7 +73,7 @@
#include <vcl/cairo.hxx>
#include <vcl/devicecoordinate.hxx>
#include <vcl/dllapi.h>
-#include <vcl/errcode.hxx>
+#include <comphelper/errcode.hxx>
#include <vcl/font.hxx>
#include <vcl/mapmod.hxx>
#include <vcl/metaactiontypes.hxx>
diff --git a/chart2/source/model/inc/XMLFilter.hxx b/chart2/source/model/inc/XMLFilter.hxx
index 332bf62ca081..c26587c3ebad 100644
--- a/chart2/source/model/inc/XMLFilter.hxx
+++ b/chart2/source/model/inc/XMLFilter.hxx
@@ -25,7 +25,7 @@
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <osl/mutex.hxx>
-#include <vcl/errcode.hxx>
+#include <comphelper/errcode.hxx>
namespace com::sun::star::beans { class XPropertySet; }
namespace com::sun::star::uno { class XComponentContext; }
diff --git a/comphelper/Library_comphelper.mk b/comphelper/Library_comphelper.mk
index 4b601785b544..ffa06369ddbd 100644
--- a/comphelper/Library_comphelper.mk
+++ b/comphelper/Library_comphelper.mk
@@ -104,6 +104,7 @@ $(eval $(call gb_Library_add_exception_objects,comphelper,\
comphelper/source/misc/docpasswordhelper \
comphelper/source/misc/docpasswordrequest \
comphelper/source/misc/documentinfo \
+ comphelper/source/misc/errcode \
comphelper/source/misc/evtlistenerhlp \
comphelper/source/misc/evtmethodhelper \
comphelper/source/misc/fileurl \
diff --git a/vcl/source/helper/errcode.cxx b/comphelper/source/misc/errcode.cxx
index d50bf522c7d8..b8d8230d0a7a 100644
--- a/vcl/source/helper/errcode.cxx
+++ b/comphelper/source/misc/errcode.cxx
@@ -17,130 +17,144 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include <vcl/errcode.hxx>
+#include <comphelper/errcode.hxx>
+#include <rtl/ustrbuf.hxx>
-VCL_DLLPUBLIC std::ostream& operator<<(std::ostream& os, const ErrCode& err)
+COMPHELPER_DLLPUBLIC OUString ErrCode::toString() const
{
- os << err.toHexString() << "(" << (err.IsWarning() ? "Warning" : "Error");
- if (err.IsDynamic())
- os << " Dynamic";
+ OUStringBuffer buf(128);
+ buf.append(toHexString() + "(");
+ if (IsWarning())
+ buf.append("Warning");
+ else
+ buf.append("Error");
+ if (IsDynamic())
+ buf.append(" Dynamic");
else
{
- os << " Area:";
- switch (err.GetArea())
+ std::u16string_view pArea;
+ switch (GetArea())
{
case ErrCodeArea::Io:
- os << "Io";
+ pArea = u"Io";
break;
case ErrCodeArea::Sfx:
- os << "Sfx";
+ pArea = u"Sfx";
break;
case ErrCodeArea::Inet:
- os << "Inet";
+ pArea = u"Inet";
break;
case ErrCodeArea::Vcl:
- os << "Vcl";
+ pArea = u"Vcl";
break;
case ErrCodeArea::Svx:
- os << "Svx";
+ pArea = u"Svx";
break;
case ErrCodeArea::So:
- os << "So";
+ pArea = u"So";
break;
case ErrCodeArea::Sbx:
- os << "Sbx";
+ pArea = u"Sbx";
break;
case ErrCodeArea::Uui:
- os << "Uui";
+ pArea = u"Uui";
break;
case ErrCodeArea::Sc:
- os << "Sc";
+ pArea = u"Sc";
break;
case ErrCodeArea::Sd:
- os << "Sd";
+ pArea = u"Sd";
break;
case ErrCodeArea::Sw:
- os << "Sw";
+ pArea = u"Sw";
break;
- default:
- os << "Unknown";
}
- os << " Class:";
- switch (err.GetClass())
+ buf.append(OUString::Concat(" Area:") + pArea);
+
+ std::u16string_view pClass;
+ switch (GetClass())
{
case ErrCodeClass::NONE:
- os << "NONE";
+ pClass = u"NONE";
break;
case ErrCodeClass::Abort:
- os << "Abort";
+ pClass = u"Abort";
break;
case ErrCodeClass::General:
- os << "General";
+ pClass = u"General";
break;
case ErrCodeClass::NotExists:
- os << "NotExists";
+ pClass = u"NotExists";
break;
case ErrCodeClass::AlreadyExists:
- os << "AlreadyExists";
+ pClass = u"AlreadyExists";
break;
case ErrCodeClass::Access:
- os << "Access";
+ pClass = u"Access";
break;
case ErrCodeClass::Path:
- os << "Path";
+ pClass = u"Path";
break;
case ErrCodeClass::Locking:
- os << "Locking";
+ pClass = u"Locking";
break;
case ErrCodeClass::Parameter:
- os << "Parameter";
+ pClass = u"Parameter";
break;
case ErrCodeClass::Space:
- os << "Space";
+ pClass = u"Space";
break;
case ErrCodeClass::NotSupported:
- os << "NotSupported";
+ pClass = u"NotSupported";
break;
case ErrCodeClass::Read:
- os << "Read";
+ pClass = u"Read";
break;
case ErrCodeClass::Write:
- os << "Write";
+ pClass = u"Write";
break;
case ErrCodeClass::Unknown:
- os << "Unknown";
+ pClass = u"Unknown";
break;
case ErrCodeClass::Version:
- os << "Version";
+ pClass = u"Version";
break;
case ErrCodeClass::Format:
- os << "Format";
+ pClass = u"Format";
break;
case ErrCodeClass::Create:
- os << "Create";
+ pClass = u"Create";
break;
case ErrCodeClass::Import:
- os << "Import";
+ pClass = u"Import";
break;
case ErrCodeClass::Export:
- os << "Export";
+ pClass = u"Export";
break;
case ErrCodeClass::So:
- os << "So";
+ pClass = u"So";
break;
case ErrCodeClass::Sbx:
- os << "Sbx";
+ pClass = u"Sbx";
break;
case ErrCodeClass::Runtime:
- os << "Runtime";
+ pClass = u"Runtime";
break;
case ErrCodeClass::Compiler:
- os << "Compiler";
+ pClass = u"Compiler";
break;
}
- os << " Code:" << OUString::number(err.GetCode());
+ buf.append(OUString::Concat(" Class:") + pClass);
+
+ buf.append(" Code:" + OUString::number(GetCode()));
}
- os << ")";
+ buf.append(")");
+ return buf.makeStringAndClear();
+}
+
+COMPHELPER_DLLPUBLIC std::ostream& operator<<(std::ostream& os, const ErrCode& err)
+{
+ os << err.toString();
return os;
}
diff --git a/connectivity/inc/pch/precompiled_dbase.hxx b/connectivity/inc/pch/precompiled_dbase.hxx
index a8692389670c..bef5dafcd982 100644
--- a/connectivity/inc/pch/precompiled_dbase.hxx
+++ b/connectivity/inc/pch/precompiled_dbase.hxx
@@ -83,7 +83,7 @@
#include <sal/types.h>
#include <sal/typesizes.h>
#include <vcl/dllapi.h>
-#include <vcl/errcode.hxx>
+#include <comphelper/errcode.hxx>
#endif // PCH_LEVEL >= 2
#if PCH_LEVEL >= 3
#include <com/sun/star/beans/Property.hpp>
diff --git a/connectivity/inc/pch/precompiled_file.hxx b/connectivity/inc/pch/precompiled_file.hxx
index f16a7cd7c665..7d8dee504853 100644
--- a/connectivity/inc/pch/precompiled_file.hxx
+++ b/connectivity/inc/pch/precompiled_file.hxx
@@ -81,7 +81,7 @@
#include <sal/types.h>
#include <sal/typesizes.h>
#include <vcl/dllapi.h>
-#include <vcl/errcode.hxx>
+#include <comphelper/errcode.hxx>
#endif // PCH_LEVEL >= 2
#if PCH_LEVEL >= 3
#include <com/sun/star/beans/Property.hpp>
diff --git a/cui/inc/pch/precompiled_cui.hxx b/cui/inc/pch/precompiled_cui.hxx
index 92248cddbd5d..66dc920b620e 100644
--- a/cui/inc/pch/precompiled_cui.hxx
+++ b/cui/inc/pch/precompiled_cui.hxx
@@ -114,7 +114,7 @@
#include <vcl/customweld.hxx>
#include <vcl/devicecoordinate.hxx>
#include <vcl/dllapi.h>
-#include <vcl/errcode.hxx>
+#include <comphelper/errcode.hxx>
#include <vcl/event.hxx>
#include <vcl/fntstyle.hxx>
#include <vcl/font.hxx>
diff --git a/desktop/inc/pch/precompiled_sofficeapp.hxx b/desktop/inc/pch/precompiled_sofficeapp.hxx
index 8abbaa97ea2c..f39dc60aff16 100644
--- a/desktop/inc/pch/precompiled_sofficeapp.hxx
+++ b/desktop/inc/pch/precompiled_sofficeapp.hxx
@@ -102,7 +102,7 @@
#include <vcl/bitmapex.hxx>
#include <vcl/checksum.hxx>
#include <vcl/dllapi.h>
-#include <vcl/errcode.hxx>
+#include <comphelper/errcode.hxx>
#include <vcl/fntstyle.hxx>
#include <vcl/font.hxx>
#include <vcl/mapmod.hxx>
diff --git a/desktop/source/lib/lokinteractionhandler.hxx b/desktop/source/lib/lokinteractionhandler.hxx
index 61524a6c1c07..5c6c6f87de6d 100644
--- a/desktop/source/lib/lokinteractionhandler.hxx
+++ b/desktop/source/lib/lokinteractionhandler.hxx
@@ -21,7 +21,7 @@
#include <osl/conditn.hxx>
#include <cppuhelper/implbase.hxx>
-#include <vcl/errcode.hxx>
+#include <comphelper/errcode.hxx>
#include <com/sun/star/lang/XInitialization.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
diff --git a/editeng/inc/pch/precompiled_editeng.hxx b/editeng/inc/pch/precompiled_editeng.hxx
index 69e3f6fae5ea..91117ecff7f6 100644
--- a/editeng/inc/pch/precompiled_editeng.hxx
+++ b/editeng/inc/pch/precompiled_editeng.hxx
@@ -105,7 +105,7 @@
#include <vcl/bitmapex.hxx>
#include <vcl/checksum.hxx>
#include <vcl/dllapi.h>
-#include <vcl/errcode.hxx>
+#include <comphelper/errcode.hxx>
#include <vcl/font.hxx>
#include <vcl/gfxlink.hxx>
#include <vcl/graph.hxx>
diff --git a/forms/inc/pch/precompiled_frm.hxx b/forms/inc/pch/precompiled_frm.hxx
index 95c86249e15a..cbf7aa3cf8b6 100644
--- a/forms/inc/pch/precompiled_frm.hxx
+++ b/forms/inc/pch/precompiled_frm.hxx
@@ -69,7 +69,7 @@
#include <sal/macros.h>
#include <sal/types.h>
#include <vcl/dllapi.h>
-#include <vcl/errcode.hxx>
+#include <comphelper/errcode.hxx>
#include <vcl/graph.hxx>
#include <vcl/image.hxx>
#include <vcl/keycod.hxx>
diff --git a/framework/source/interaction/quietinteraction.cxx b/framework/source/interaction/quietinteraction.cxx
index e9dc218576e0..11b8bc8b7029 100644
--- a/framework/source/interaction/quietinteraction.cxx
+++ b/framework/source/interaction/quietinteraction.cxx
@@ -28,7 +28,7 @@
#include <com/sun/star/document/LockedDocumentRequest.hpp>
-#include <vcl/errcode.hxx>
+#include <comphelper/errcode.hxx>
#include <vcl/svapp.hxx>
namespace framework{
diff --git a/framework/source/loadenv/loadenv.cxx b/framework/source/loadenv/loadenv.cxx
index 0cd8b0b38330..b3f351a22cae 100644
--- a/framework/source/loadenv/loadenv.cxx
+++ b/framework/source/loadenv/loadenv.cxx
@@ -85,7 +85,7 @@
#include <comphelper/configurationhelper.hxx>
#include <rtl/bootstrap.hxx>
#include <sal/log.hxx>
-#include <vcl/errcode.hxx>
+#include <comphelper/errcode.hxx>
#include <vcl/svapp.hxx>
#include <cppuhelper/implbase.hxx>
#include <comphelper/profilezone.hxx>
diff --git a/framework/source/services/desktop.cxx b/framework/source/services/desktop.cxx
index cbc3ce6ebacb..048b677c9daa 100644
--- a/framework/source/services/desktop.cxx
+++ b/framework/source/services/desktop.cxx
@@ -56,7 +56,7 @@
#include <desktop/crashreport.hxx>
#include <vcl/scheduler.hxx>
#include <sal/log.hxx>
-#include <vcl/errcode.hxx>
+#include <comphelper/errcode.hxx>
#include <vcl/threadex.hxx>
#include <unotools/configmgr.hxx>
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>
diff --git a/linguistic/source/dicimp.hxx b/linguistic/source/dicimp.hxx
index c94094de6571..4ab0025799ea 100644
--- a/linguistic/source/dicimp.hxx
+++ b/linguistic/source/dicimp.hxx
@@ -26,7 +26,7 @@
#include <cppuhelper/implbase.hxx>
#include <comphelper/interfacecontainer3.hxx>
#include <i18nlangtag/lang.h>
-#include <vcl/errcode.hxx>
+#include <comphelper/errcode.hxx>
#include "defs.hxx"
diff --git a/reportdesign/inc/pch/precompiled_rpt.hxx b/reportdesign/inc/pch/precompiled_rpt.hxx
index 6a5c37cbb48d..7c12dd4dbfe8 100644
--- a/reportdesign/inc/pch/precompiled_rpt.hxx
+++ b/reportdesign/inc/pch/precompiled_rpt.hxx
@@ -103,7 +103,7 @@
#include <vcl/checksum.hxx>
#include <vcl/devicecoordinate.hxx>
#include <vcl/dllapi.h>
-#include <vcl/errcode.hxx>
+#include <comphelper/errcode.hxx>
#include <vcl/fntstyle.hxx>
#include <vcl/font.hxx>
#include <vcl/gfxlink.hxx>
diff --git a/reportdesign/inc/pch/precompiled_rptui.hxx b/reportdesign/inc/pch/precompiled_rptui.hxx
index f7f6b482c997..e30c1c332c9b 100644
--- a/reportdesign/inc/pch/precompiled_rptui.hxx
+++ b/reportdesign/inc/pch/precompiled_rptui.hxx
@@ -115,7 +115,7 @@
#include <vcl/ctrl.hxx>
#include <vcl/devicecoordinate.hxx>
#include <vcl/dllapi.h>
-#include <vcl/errcode.hxx>
+#include <comphelper/errcode.hxx>
#include <vcl/event.hxx>
#include <vcl/fntstyle.hxx>
#include <vcl/font.hxx>
diff --git a/sc/IwyuFilter_sc.yaml b/sc/IwyuFilter_sc.yaml
index 4b199a80e8b6..956bf6ad9c4c 100644
--- a/sc/IwyuFilter_sc.yaml
+++ b/sc/IwyuFilter_sc.yaml
@@ -283,7 +283,7 @@ excludelist:
- vcl/outdev.hxx
sc/inc/scerrors.hxx:
# needed for defines
- - vcl/errcode.hxx
+ - comphelper/errcode.hxx
sc/inc/scitems.hxx:
# needed for defines
- svl/typedwhich.hxx
diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index 810a21e0de6f..cd7e08b0dde4 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -20,7 +20,7 @@
#pragma once
#include <vcl/idle.hxx>
-#include <vcl/errcode.hxx>
+#include <comphelper/errcode.hxx>
#include <com/sun/star/uno/Reference.hxx>
#include <vcl/vclptr.hxx>
#include "patattr.hxx"
diff --git a/sc/inc/filter.hxx b/sc/inc/filter.hxx
index 71ed13807f28..7a71b89c503e 100644
--- a/sc/inc/filter.hxx
+++ b/sc/inc/filter.hxx
@@ -21,7 +21,7 @@
#include <rtl/textenc.h>
#include <rtl/ustring.hxx>
-#include <vcl/errcode.hxx>
+#include <comphelper/errcode.hxx>
#include "scdllapi.h"
#include <memory>
diff --git a/sc/inc/pch/precompiled_sc.hxx b/sc/inc/pch/precompiled_sc.hxx
index 0f2139a34663..b1ad6286c859 100644
--- a/sc/inc/pch/precompiled_sc.hxx
+++ b/sc/inc/pch/precompiled_sc.hxx
@@ -129,7 +129,7 @@
#include <vcl/ctrl.hxx>
#include <vcl/customweld.hxx>
#include <vcl/dllapi.h>
-#include <vcl/errcode.hxx>
+#include <comphelper/errcode.hxx>
#include <vcl/event.hxx>
#include <vcl/fntstyle.hxx>
#include <vcl/font.hxx>
diff --git a/sc/inc/pch/precompiled_scfilt.hxx b/sc/inc/pch/precompiled_scfilt.hxx
index 120a3859912a..c44c422833ad 100644
--- a/sc/inc/pch/precompiled_scfilt.hxx
+++ b/sc/inc/pch/precompiled_scfilt.hxx
@@ -88,7 +88,7 @@
#include <vcl/bitmapex.hxx>
#include <vcl/checksum.hxx>
#include <vcl/dllapi.h>
-#include <vcl/errcode.hxx>
+#include <comphelper/errcode.hxx>
#include <vcl/font.hxx>
#include <vcl/gfxlink.hxx>
#include <vcl/graph.hxx>
diff --git a/sc/inc/scerrors.hxx b/sc/inc/scerrors.hxx
index 62ece04d2aee..dcb734502eae 100644
--- a/sc/inc/scerrors.hxx
+++ b/sc/inc/scerrors.hxx
@@ -19,7 +19,7 @@
#pragma once
-#include <vcl/errcode.hxx>
+#include <comphelper/errcode.hxx>
// ErrCodeClass::Read - file related, displays "Read-Error" in MsgBox
#define SCERR_IMPORT_CONNECT ErrCode( ErrCodeArea::Sc, ErrCodeClass::Read, 1 )
diff --git a/sc/inc/xmlwrap.hxx b/sc/inc/xmlwrap.hxx
index 3dc881361f0e..53d3b24f65f4 100644
--- a/sc/inc/xmlwrap.hxx
+++ b/sc/inc/xmlwrap.hxx
@@ -22,7 +22,7 @@
#include <com/sun/star/uno/Reference.hxx>
#include "importfilterdata.hxx"
-#include <vcl/errcode.hxx>
+#include <comphelper/errcode.hxx>
namespace com::sun::star {
namespace beans { struct PropertyValue; }
diff --git a/sc/source/filter/inc/eeparser.hxx b/sc/source/filter/inc/eeparser.hxx
index 737ff896bb21..ebc383e32dac 100644
--- a/sc/source/filter/inc/eeparser.hxx
+++ b/sc/source/filter/inc/eeparser.hxx
@@ -21,7 +21,7 @@
#include <tools/gen.hxx>
#include <utility>
-#include <vcl/errcode.hxx>
+#include <comphelper/errcode.hxx>
#include <vcl/graph.hxx>
#include <svl/itemset.hxx>
#include <svl/itempool.hxx>
diff --git a/sc/source/filter/inc/qpro.hxx b/sc/source/filter/inc/qpro.hxx
index 0a4f780628d4..eb11942e5faa 100644
--- a/sc/source/filter/inc/qpro.hxx
+++ b/sc/source/filter/inc/qpro.hxx
@@ -21,7 +21,7 @@
#include <rtl/ustring.hxx>
#include <sal/config.h>
-#include <vcl/errcode.hxx>
+#include <comphelper/errcode.hxx>
#include <types.hxx>
class ScDocument;
diff --git a/sd/IwyuFilter_sd.yaml b/sd/IwyuFilter_sd.yaml
index 3a1aed9d21d3..530cac5249d8 100644
--- a/sd/IwyuFilter_sd.yaml
+++ b/sd/IwyuFilter_sd.yaml
@@ -35,7 +35,7 @@ excludelist:
- svx/svdobj.hxx
sd/inc/sderror.hxx:
# needed for defines
- - vcl/errcode.hxx
+ - comphelper/errcode.hxx
sd/inc/sdfilter.hxx:
# base class has to be a complete type
- com/sun/star/frame/XModel.hpp
diff --git a/sd/inc/errhdl.hrc b/sd/inc/errhdl.hrc
index ea7d4e7127d7..f6a10e9d909c 100644
--- a/sd/inc/errhdl.hrc
+++ b/sd/inc/errhdl.hrc
@@ -22,7 +22,7 @@
#define NC_(Context, String) TranslateId(Context, reinterpret_cast<char const *>(u8##String))
#include <svtools/ehdl.hxx>
-#include <vcl/errcode.hxx>
+#include <comphelper/errcode.hxx>
#include "sderror.hxx"
const ErrMsgCode RID_SD_ERRHDL[] =
diff --git a/sd/inc/pch/precompiled_sd.hxx b/sd/inc/pch/precompiled_sd.hxx
index 0354569c7a40..8963b9432162 100644
--- a/sd/inc/pch/precompiled_sd.hxx
+++ b/sd/inc/pch/precompiled_sd.hxx
@@ -83,7 +83,7 @@
#include <vcl/commandinfoprovider.hxx>
#include <vcl/customweld.hxx>
#include <vcl/dllapi.h>
-#include <vcl/errcode.hxx>
+#include <comphelper/errcode.hxx>
#include <vcl/errinf.hxx>
#include <vcl/event.hxx>
#include <vcl/fntstyle.hxx>
diff --git a/sd/inc/pch/precompiled_sdui.hxx b/sd/inc/pch/precompiled_sdui.hxx
index 3cdcc98ee6b8..67f322dca750 100644
--- a/sd/inc/pch/precompiled_sdui.hxx
+++ b/sd/inc/pch/precompiled_sdui.hxx
@@ -121,7 +121,7 @@
#include <vcl/devicecoordinate.hxx>
#include <vcl/dllapi.h>
#include <vcl/dockwin.hxx>
-#include <vcl/errcode.hxx>
+#include <comphelper/errcode.hxx>
#include <vcl/event.hxx>
#include <vcl/fntstyle.hxx>
#include <vcl/font.hxx>
diff --git a/sd/inc/sderror.hxx b/sd/inc/sderror.hxx
index 07ee1d7fa801..850d10fbec2a 100644
--- a/sd/inc/sderror.hxx
+++ b/sd/inc/sderror.hxx
@@ -19,7 +19,7 @@
#pragma once
-#include <vcl/errcode.hxx>
+#include <comphelper/errcode.hxx>
// Import errors
#define ERR_FORMAT_ROWCOL ErrCode(ErrCodeArea::Sd, ErrCodeClass::Read, 1)
diff --git a/sd/source/ui/inc/filedlg.hxx b/sd/source/ui/inc/filedlg.hxx
index 6a22d6ba52b7..c2c373a5501b 100644
--- a/sd/source/ui/inc/filedlg.hxx
+++ b/sd/source/ui/inc/filedlg.hxx
@@ -19,7 +19,7 @@
#pragma once
-#include <vcl/errcode.hxx>
+#include <comphelper/errcode.hxx>
#include <vcl/weld.hxx>
#include <memory>
diff --git a/sdext/inc/pch/precompiled_PresentationMinimizer.hxx b/sdext/inc/pch/precompiled_PresentationMinimizer.hxx
index b51da0e6c30c..0e380aeaa57b 100644
--- a/sdext/inc/pch/precompiled_PresentationMinimizer.hxx
+++ b/sdext/inc/pch/precompiled_PresentationMinimizer.hxx
@@ -79,7 +79,7 @@
#include <sal/typesizes.h>
#include <vcl/IDialogRenderable.hxx>
#include <vcl/dllapi.h>
-#include <vcl/errcode.hxx>
+#include <comphelper/errcode.hxx>
#include <vcl/errinf.hxx>
#include <vcl/exceptiontypes.hxx>
#include <vcl/fntstyle.hxx>
diff --git a/sdext/source/pdfimport/misc/pwdinteract.cxx b/sdext/source/pdfimport/misc/pwdinteract.cxx
index 79ef78181600..dcd3f8566d1f 100644
--- a/sdext/source/pdfimport/misc/pwdinteract.cxx
+++ b/sdext/source/pdfimport/misc/pwdinteract.cxx
@@ -32,7 +32,7 @@
#include <cppuhelper/implbase.hxx>
#include <rtl/ref.hxx>
-#include <vcl/errcode.hxx>
+#include <comphelper/errcode.hxx>
using namespace com::sun::star;
diff --git a/sfx2/inc/pch/precompiled_sfx.hxx b/sfx2/inc/pch/precompiled_sfx.hxx
index b6306939f13c..4c7ef0985d00 100644
--- a/sfx2/inc/pch/precompiled_sfx.hxx
+++ b/sfx2/inc/pch/precompiled_sfx.hxx
@@ -101,7 +101,7 @@
#include <vcl/customweld.hxx>
#include <vcl/dibtools.hxx>
#include <vcl/dllapi.h>
-#include <vcl/errcode.hxx>
+#include <comphelper/errcode.hxx>
#include <vcl/event.hxx>
#include <vcl/font.hxx>
#include <vcl/gdimtf.hxx>
diff --git a/sfx2/source/doc/DocumentMetadataAccess.cxx b/sfx2/source/doc/DocumentMetadataAccess.cxx
index 0fe93ed492cc..cdf4c329a074 100644
--- a/sfx2/source/doc/DocumentMetadataAccess.cxx
+++ b/sfx2/source/doc/DocumentMetadataAccess.cxx
@@ -1370,7 +1370,7 @@ DocumentMetadataAccess::storeMetadataToMedium(
nError = ERRCODE_IO_GENERAL;
}
task::ErrorCodeIOException ex(
- "DocumentMetadataAccess::storeMetadataToMedium Commit failed: " + nError.toHexString(),
+ "DocumentMetadataAccess::storeMetadataToMedium Commit failed: " + nError.toString(),
uno::Reference< uno::XInterface >(), sal_uInt32(nError));
throw lang::WrappedTargetException(OUString(), *this,
uno::Any(ex));
diff --git a/sfx2/source/doc/SfxDocumentMetaData.cxx b/sfx2/source/doc/SfxDocumentMetaData.cxx
index af7132fb20fe..a9c26ee3138d 100644
--- a/sfx2/source/doc/SfxDocumentMetaData.cxx
+++ b/sfx2/source/doc/SfxDocumentMetaData.cxx
@@ -2000,7 +2000,7 @@ SfxDocumentMetaData::storeToMedium(const OUString & URL,
}
throw css::task::ErrorCodeIOException(
- "SfxDocumentMetaData::storeToMedium <" + URL + "> Commit failed: " + nError.toHexString(),
+ "SfxDocumentMetaData::storeToMedium <" + URL + "> Commit failed: " + nError.toString(),
css::uno::Reference< css::uno::XInterface >(), sal_uInt32(nError));
}
diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx
index f185a1ebb719..de2e9e2bc235 100644
--- a/sfx2/source/doc/sfxbasemodel.cxx
+++ b/sfx2/source/doc/sfxbasemodel.cxx
@@ -81,7 +81,7 @@
#include <tools/svborder.hxx>
#include <unotools/tempfile.hxx>
#include <osl/mutex.hxx>
-#include <vcl/errcode.hxx>
+#include <comphelper/errcode.hxx>
#include <vcl/filter/SvmWriter.hxx>
#include <vcl/salctype.hxx>
#include <vcl/gdimtf.hxx>
@@ -1695,7 +1695,7 @@ void SAL_CALL SfxBaseModel::storeSelf( const Sequence< beans::PropertyValue >
SfxGetpApp()->NotifyEvent( SfxEventHint( SfxEventHintId::SaveDocFailed, GlobalEventConfig::GetEventName(GlobalEventId::SAVEDOCFAILED), m_pData->m_pObjectShell.get() ) );
throw task::ErrorCodeIOException(
- "SfxBaseModel::storeSelf: " + nErrCode.toHexString(),
+ "SfxBaseModel::storeSelf: " + nErrCode.toString(),
Reference< XInterface >(), sal_uInt32(nErrCode));
}
}
@@ -1860,7 +1860,7 @@ void SAL_CALL SfxBaseModel::initNew()
if ( !bRes )
throw task::ErrorCodeIOException(
- "SfxBaseModel::initNew: " + nErrCode.toHexString(),
+ "SfxBaseModel::initNew: " + nErrCode.toString(),
Reference< XInterface >(), sal_uInt32(nErrCode));
}
@@ -2799,7 +2799,7 @@ SfxMedium* SfxBaseModel::handleLoadError( ErrCode nError, SfxMedium* pMedium )
{
nError = nError ? nError : ERRCODE_IO_CANTREAD;
throw task::ErrorCodeIOException(
- "SfxBaseModel::handleLoadError: 0x" + nError.toHexString(),
+ "SfxBaseModel::handleLoadError: 0x" + nError.toString(),
Reference< XInterface >(), sal_uInt32(nError));
}
@@ -3785,7 +3785,7 @@ void SAL_CALL SfxBaseModel::loadFromStorage( const Reference< embed::XStorage >&
ErrCode nError = m_pData->m_pObjectShell->GetErrorCode();
nError = nError ? nError : ERRCODE_IO_CANTREAD;
throw task::ErrorCodeIOException(
- "SfxBaseModel::loadFromStorage: " + nError.toHexString(),
+ "SfxBaseModel::loadFromStorage: " + nError.toString(),
Reference< XInterface >(), sal_uInt32(nError));
}
loadCmisProperties( );
@@ -3843,7 +3843,7 @@ void SAL_CALL SfxBaseModel::storeToStorage( const Reference< embed::XStorage >&
{
nError = nError ? nError : ERRCODE_IO_GENERAL;
throw task::ErrorCodeIOException(
- "SfxBaseModel::storeToStorage: " + nError.toHexString(),
+ "SfxBaseModel::storeToStorage: " + nError.toString(),
Reference< XInterface >(), sal_uInt32(nError));
}
}
@@ -3863,7 +3863,7 @@ void SAL_CALL SfxBaseModel::switchToStorage( const Reference< embed::XStorage >&
ErrCode nError = m_pData->m_pObjectShell->GetErrorCode();
nError = nError ? nError : ERRCODE_IO_GENERAL;
throw task::ErrorCodeIOException(
- "SfxBaseModel::switchToStorage: " + nError.toHexString(),
+ "SfxBaseModel::switchToStorage: " + nError.toString(),
Reference< XInterface >(), sal_uInt32(nError));
}
else
diff --git a/sfx2/source/inc/appopen.hxx b/sfx2/source/inc/appopen.hxx
index 97a4d7a18bcc..df9057bfa197 100644
--- a/sfx2/source/inc/appopen.hxx
+++ b/sfx2/source/inc/appopen.hxx
@@ -21,7 +21,7 @@
#define INCLUDED_SFX2_SOURCE_INC_APPOPEN_HXX
#include <sal/config.h>
-#include <vcl/errcode.hxx>
+#include <comphelper/errcode.hxx>
class SfxItemPool;
class SfxMedium;
diff --git a/sfx2/source/inc/macroloader.hxx b/sfx2/source/inc/macroloader.hxx
index 250a07cd8ca1..d0cd3fb1466b 100644
--- a/sfx2/source/inc/macroloader.hxx
+++ b/sfx2/source/inc/macroloader.hxx
@@ -35,7 +35,7 @@
#include <cppuhelper/implbase.hxx>
#include <cppuhelper/weakref.hxx>
-#include <vcl/errcode.hxx>
+#include <comphelper/errcode.hxx>
class SfxObjectShell;
diff --git a/slideshow/inc/pch/precompiled_slideshow.hxx b/slideshow/inc/pch/precompiled_slideshow.hxx
index 3a5b2f760669..0f2a0aa493a1 100644
--- a/slideshow/inc/pch/precompiled_slideshow.hxx
+++ b/slideshow/inc/pch/precompiled_slideshow.hxx
@@ -105,7 +105,7 @@
#include <vcl/checksum.hxx>
#include <vcl/devicecoordinate.hxx>
#include <vcl/dllapi.h>
-#include <vcl/errcode.hxx>
+#include <comphelper/errcode.hxx>
#include <vcl/fntstyle.hxx>
#include <vcl/font.hxx>
#include <vcl/gdimtf.hxx>
diff --git a/solenv/clang-format/excludelist b/solenv/clang-format/excludelist
index 640544d2ee11..d0790424e6c0 100644
--- a/solenv/clang-format/excludelist
+++ b/solenv/clang-format/excludelist
@@ -4908,6 +4908,7 @@ include/comphelper/documentconstants.hxx
include/comphelper/documentinfo.hxx
include/comphelper/embeddedobjectcontainer.hxx
include/comphelper/enumhelper.hxx
+include/comphelper/errcode.hxx
include/comphelper/eventattachermgr.hxx
include/comphelper/evtlistenerhlp.hxx
include/comphelper/flagguard.hxx
@@ -6329,7 +6330,6 @@ include/vcl/dndhelp.hxx
include/vcl/dockingarea.hxx
include/vcl/dockwin.hxx
include/vcl/embeddedfontshelper.hxx
-include/vcl/errcode.hxx
include/vcl/errinf.hxx
include/vcl/event.hxx
include/vcl/evntpost.hxx
diff --git a/sot/inc/pch/precompiled_sot.hxx b/sot/inc/pch/precompiled_sot.hxx
index b0875965f7ae..ea883db47cb9 100644
--- a/sot/inc/pch/precompiled_sot.hxx
+++ b/sot/inc/pch/precompiled_sot.hxx
@@ -49,7 +49,7 @@
#include <sal/log.hxx>
#include <sal/types.h>
#include <vcl/dllapi.h>
-#include <vcl/errcode.hxx>
+#include <comphelper/errcode.hxx>
#endif // PCH_LEVEL >= 2
#if PCH_LEVEL >= 3
#include <com/sun/star/uno/Reference.hxx>
diff --git a/sot/source/sdstor/storinfo.cxx b/sot/source/sdstor/storinfo.cxx
index d8480e86a459..4e42ea315c29 100644
--- a/sot/source/sdstor/storinfo.cxx
+++ b/sot/source/sdstor/storinfo.cxx
@@ -21,7 +21,7 @@
#include <sot/storinfo.hxx>
#include <sot/exchange.hxx>
#include <tools/stream.hxx>
-#include <vcl/errcode.hxx>
+#include <comphelper/errcode.hxx>
#include <memory>
/************** class SvStorageInfo **************************************
diff --git a/starmath/inc/mathml/import.hxx b/starmath/inc/mathml/import.hxx
index 29bd01bf0ed0..56f7fe68814b 100644
--- a/starmath/inc/mathml/import.hxx
+++ b/starmath/inc/mathml/import.hxx
@@ -14,7 +14,7 @@
// XML tools
#include <utility>
-#include <vcl/errcode.hxx>
+#include <comphelper/errcode.hxx>
#include <xmloff/xmlimp.hxx>
// Extras
diff --git a/starmath/inc/mathml/mathmlimport.hxx b/starmath/inc/mathml/mathmlimport.hxx
index 8e524f82b7a6..03a78b92a76d 100644
--- a/starmath/inc/mathml/mathmlimport.hxx
+++ b/starmath/inc/mathml/mathmlimport.hxx
@@ -21,7 +21,7 @@
#include <utility>
#include <xmloff/xmlimp.hxx>
-#include <vcl/errcode.hxx>
+#include <comphelper/errcode.hxx>
#include <deque>
diff --git a/starmath/inc/pch/precompiled_sm.hxx b/starmath/inc/pch/precompiled_sm.hxx
index 0ba5d98f6520..02e0d90abb71 100644
--- a/starmath/inc/pch/precompiled_sm.hxx
+++ b/starmath/inc/pch/precompiled_sm.hxx
@@ -65,7 +65,7 @@
#include <vcl/cairo.hxx>
#include <vcl/devicecoordinate.hxx>
#include <vcl/dllapi.h>
-#include <vcl/errcode.hxx>
+#include <comphelper/errcode.hxx>
#include <vcl/font.hxx>
#include <vcl/gradient.hxx>
#include <vcl/mapmod.hxx>
diff --git a/svtools/inc/pch/precompiled_svt.hxx b/svtools/inc/pch/precompiled_svt.hxx
index 74026330dc24..04ca2552bddb 100644
--- a/svtools/inc/pch/precompiled_svt.hxx
+++ b/svtools/inc/pch/precompiled_svt.hxx
@@ -105,7 +105,7 @@
#include <vcl/ctrl.hxx>
#include <vcl/dllapi.h>
#include <vcl/dockwin.hxx>
-#include <vcl/errcode.hxx>
+#include <comphelper/errcode.hxx>
#include <vcl/event.hxx>
#include <vcl/fntstyle.hxx>
#include <vcl/font.hxx>
diff --git a/svx/inc/pch/precompiled_svx.hxx b/svx/inc/pch/precompiled_svx.hxx
index a3195da6d808..d1243143ac9b 100644
--- a/svx/inc/pch/precompiled_svx.hxx
+++ b/svx/inc/pch/precompiled_svx.hxx
@@ -84,7 +84,7 @@
#include <vcl/commandinfoprovider.hxx>
#include <vcl/customweld.hxx>
#include <vcl/dllapi.h>
-#include <vcl/errcode.hxx>
+#include <comphelper/errcode.hxx>
#include <vcl/errinf.hxx>
#include <vcl/event.hxx>
#include <vcl/fieldvalues.hxx>
diff --git a/svx/inc/pch/precompiled_svxcore.hxx b/svx/inc/pch/precompiled_svxcore.hxx
index 6bfb9a18f70f..979ee4ce7b00 100644
--- a/svx/inc/pch/precompiled_svxcore.hxx
+++ b/svx/inc/pch/precompiled_svxcore.hxx
@@ -120,7 +120,7 @@
#include <vcl/customweld.hxx>
#include <vcl/dllapi.h>
#include <vcl/dockwin.hxx>
-#include <vcl/errcode.hxx>
+#include <comphelper/errcode.hxx>
#include <vcl/event.hxx>
#include <vcl/fntstyle.hxx>
#include <vcl/font.hxx>
diff --git a/sw/inc/error.hrc b/sw/inc/error.hrc
index c6db37c65fea..6a9d552887e9 100644
--- a/sw/inc/error.hrc
+++ b/sw/inc/error.hrc
@@ -21,7 +21,7 @@
#define INCLUDED_SW_INC_ERROR_HRC
#include <svtools/ehdl.hxx>
-#include <vcl/errcode.hxx>
+#include <comphelper/errcode.hxx>
#include "swerror.h"
diff --git a/sw/inc/pch/precompiled_msword.hxx b/sw/inc/pch/precompiled_msword.hxx
index a71103b31c54..1eeb5d6dcdf0 100644
--- a/sw/inc/pch/precompiled_msword.hxx
+++ b/sw/inc/pch/precompiled_msword.hxx
@@ -126,7 +126,7 @@
#include <vcl/checksum.hxx>
#include <vcl/devicecoordinate.hxx>
#include <vcl/dllapi.h>
-#include <vcl/errcode.hxx>
+#include <comphelper/errcode.hxx>
#include <vcl/event.hxx>
#include <vcl/fntstyle.hxx>
#include <vcl/font.hxx>
diff --git a/sw/inc/pch/precompiled_sw.hxx b/sw/inc/pch/precompiled_sw.hxx
index f5789fe11732..0c50e04bb69a 100644
--- a/sw/inc/pch/precompiled_sw.hxx
+++ b/sw/inc/pch/precompiled_sw.hxx
@@ -108,7 +108,7 @@
#include <vcl/commandevent.hxx>
#include <vcl/ctrl.hxx>
#include <vcl/dllapi.h>
-#include <vcl/errcode.hxx>
+#include <comphelper/errcode.hxx>
#include <vcl/errinf.hxx>
#include <vcl/event.hxx>
#include <vcl/fntstyle.hxx>
diff --git a/sw/inc/pch/precompiled_swui.hxx b/sw/inc/pch/precompiled_swui.hxx
index 0b44d6a7af9b..1a8d377d985f 100644
--- a/sw/inc/pch/precompiled_swui.hxx
+++ b/sw/inc/pch/precompiled_swui.hxx
@@ -118,7 +118,7 @@
#include <vcl/devicecoordinate.hxx>
#include <vcl/dllapi.h>
#include <vcl/dockwin.hxx>
-#include <vcl/errcode.hxx>
+#include <comphelper/errcode.hxx>
#include <vcl/event.hxx>
#include <vcl/fntstyle.hxx>
#include <vcl/font.hxx>
diff --git a/sw/inc/pch/precompiled_vbaswobj.hxx b/sw/inc/pch/precompiled_vbaswobj.hxx
index a4439f274f64..3769612d9e2d 100644
--- a/sw/inc/pch/precompiled_vbaswobj.hxx
+++ b/sw/inc/pch/precompiled_vbaswobj.hxx
@@ -112,7 +112,7 @@
#include <vcl/cursor.hxx>
#include <vcl/devicecoordinate.hxx>
#include <vcl/dllapi.h>
-#include <vcl/errcode.hxx>
+#include <comphelper/errcode.hxx>
#include <vcl/exceptiontypes.hxx>
#include <vcl/fntstyle.hxx>
#include <vcl/font.hxx>
diff --git a/sw/source/core/inc/swblocks.hxx b/sw/source/core/inc/swblocks.hxx
index 38cede12f5fa..18e73678c0ce 100644
--- a/sw/source/core/inc/swblocks.hxx
+++ b/sw/source/core/inc/swblocks.hxx
@@ -22,7 +22,7 @@
#include <tools/date.hxx>
#include <tools/time.hxx>
#include <o3tl/sorted_vector.hxx>
-#include <vcl/errcode.hxx>
+#include <comphelper/errcode.hxx>
#include <rtl/ref.hxx>
class SwPaM;
diff --git a/tools/CppunitTest_tools_test.mk b/tools/CppunitTest_tools_test.mk
index 02a64209669a..7f36ab8f8f02 100644
--- a/tools/CppunitTest_tools_test.mk
+++ b/tools/CppunitTest_tools_test.mk
@@ -58,6 +58,7 @@ $(eval $(call gb_CppunitTest_use_sdk_api,tools_test))
$(eval $(call gb_CppunitTest_use_libraries,tools_test, \
basegfx \
+ comphelper \
sal \
tl \
test \
diff --git a/unotools/inc/pch/precompiled_utl.hxx b/unotools/inc/pch/precompiled_utl.hxx
index 7af5466cb9a3..1a46cbc1a93d 100644
--- a/unotools/inc/pch/precompiled_utl.hxx
+++ b/unotools/inc/pch/precompiled_utl.hxx
@@ -66,7 +66,7 @@
#include <sal/saldllapi.h>
#include <sal/types.h>
#include <sal/typesizes.h>
-#include <vcl/errcode.hxx>
+#include <comphelper/errcode.hxx>
#endif // PCH_LEVEL >= 2
#if PCH_LEVEL >= 3
#include <com/sun/star/beans/NamedValue.hpp>
diff --git a/unotools/source/streaming/streamwrap.cxx b/unotools/source/streaming/streamwrap.cxx
index 2361d80cd886..bc6e65779a10 100644
--- a/unotools/source/streaming/streamwrap.cxx
+++ b/unotools/source/streaming/streamwrap.cxx
@@ -154,7 +154,7 @@ void OInputStreamWrapper::checkError() const
auto const e = m_pSvStream->SvStream::GetError();
if (e != ERRCODE_NONE)
// TODO: really evaluate the error
- throw css::io::NotConnectedException("utl::OInputStreamWrapper error " + e.toHexString(), const_cast<css::uno::XWeak*>(static_cast<const css::uno::XWeak*>(this)));
+ throw css::io::NotConnectedException("utl::OInputStreamWrapper error " + e.toString(), const_cast<css::uno::XWeak*>(static_cast<const css::uno::XWeak*>(this)));
}
sal_Int64 SAL_CALL OInputStreamWrapper::getSomething( const css::uno::Sequence< sal_Int8 >& rIdentifier )
diff --git a/unotools/source/ucbhelper/ucblockbytes.hxx b/unotools/source/ucbhelper/ucblockbytes.hxx
index ca4eac2ab863..67a2d6216316 100644
--- a/unotools/source/ucbhelper/ucblockbytes.hxx
+++ b/unotools/source/ucbhelper/ucblockbytes.hxx
@@ -23,7 +23,7 @@
#include <osl/conditn.hxx>
#include <osl/mutex.hxx>
#include <tools/stream.hxx>
-#include <vcl/errcode.hxx>
+#include <comphelper/errcode.hxx>
namespace com
{
diff --git a/uui/IwyuFilter_uui.yaml b/uui/IwyuFilter_uui.yaml
index 20e352baa1bf..d1cb97420d49 100644
--- a/uui/IwyuFilter_uui.yaml
+++ b/uui/IwyuFilter_uui.yaml
@@ -3,7 +3,7 @@ assumeFilename: uui/source/iahndl.cxx
excludelist:
uui/inc/ids.hxx:
# Needed by macro defines
- - vcl/errcode.hxx
+ - comphelper/errcode.hxx
uui/source/iahndl.cxx:
# Actually used
- com/sun/star/awt/XWindow.hpp
diff --git a/uui/inc/ids.hrc b/uui/inc/ids.hrc
index 4821c555918b..66f3623641f8 100644
--- a/uui/inc/ids.hrc
+++ b/uui/inc/ids.hrc
@@ -20,7 +20,7 @@
#pragma once
#include <unotools/resmgr.hxx>
-#include <vcl/errcode.hxx>
+#include <comphelper/errcode.hxx>
#include <utility>
diff --git a/uui/inc/ids.hxx b/uui/inc/ids.hxx
index 32ba356a4ee5..3534979f5cbb 100644
--- a/uui/inc/ids.hxx
+++ b/uui/inc/ids.hxx
@@ -19,7 +19,7 @@
#pragma once
-#include <vcl/errcode.hxx>
+#include <comphelper/errcode.hxx>
#define ERRCODE_UUI_IO_ABORT ErrCode(ErrCodeArea::Uui, 0)
#define ERRCODE_UUI_IO_ACCESSDENIED ErrCode(ErrCodeArea::Uui, 1)
diff --git a/uui/source/iahndl.hxx b/uui/source/iahndl.hxx
index 7ca8b8437891..78d283d6bf0e 100644
--- a/uui/source/iahndl.hxx
+++ b/uui/source/iahndl.hxx
@@ -28,7 +28,7 @@
#include <com/sun/star/beans/Optional.hpp>
#include <com/sun/star/task/InteractionClassification.hpp>
-#include <vcl/errcode.hxx>
+#include <comphelper/errcode.hxx>
#include <unotools/resmgr.hxx>
#include <unordered_map>
diff --git a/vbahelper/inc/pch/precompiled_msforms.hxx b/vbahelper/inc/pch/precompiled_msforms.hxx
index b65f96f260f5..fc76984d7276 100644
--- a/vbahelper/inc/pch/precompiled_msforms.hxx
+++ b/vbahelper/inc/pch/precompiled_msforms.hxx
@@ -80,7 +80,7 @@
#include <vcl/checksum.hxx>
#include <vcl/devicecoordinate.hxx>
#include <vcl/dllapi.h>
-#include <vcl/errcode.hxx>
+#include <comphelper/errcode.hxx>
#include <vcl/fntstyle.hxx>
#include <vcl/font.hxx>
#include <vcl/gradient.hxx>
diff --git a/vbahelper/inc/pch/precompiled_vbahelper.hxx b/vbahelper/inc/pch/precompiled_vbahelper.hxx
index 46e066169884..78ab44945e74 100644
--- a/vbahelper/inc/pch/precompiled_vbahelper.hxx
+++ b/vbahelper/inc/pch/precompiled_vbahelper.hxx
@@ -46,7 +46,7 @@
#include <sal/types.h>
#include <vcl/IDialogRenderable.hxx>
#include <vcl/bitmapex.hxx>
-#include <vcl/errcode.hxx>
+#include <comphelper/errcode.hxx>
#include <vcl/region.hxx>
#include <vcl/svapp.hxx>
#endif // PCH_LEVEL >= 2
diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk
index 10907d6c420c..fa11362929f0 100644
--- a/vcl/Library_vcl.mk
+++ b/vcl/Library_vcl.mk
@@ -382,7 +382,6 @@ $(eval $(call gb_Library_add_exception_objects,vcl,\
vcl/source/helper/commandinfoprovider \
vcl/source/helper/displayconnectiondispatch \
vcl/source/helper/driverblocklist \
- vcl/source/helper/errcode \
vcl/source/helper/evntpost \
vcl/source/helper/lazydelete \
vcl/source/helper/strhelper \
diff --git a/vcl/inc/filter/XpmReader.hxx b/vcl/inc/filter/XpmReader.hxx
index b9f7bf5cd7d8..6928a10be872 100644
--- a/vcl/inc/filter/XpmReader.hxx
+++ b/vcl/inc/filter/XpmReader.hxx
@@ -21,6 +21,7 @@
#define INCLUDED_VCL_SOURCE_FILTER_IXPM_XPMREAD_HXX
#include <tools/stream.hxx>
+#include <vcl/dllapi.h>
class Graphic;
diff --git a/vcl/qa/cppunit/cjktext.cxx b/vcl/qa/cppunit/cjktext.cxx
index 4ad8a23ab7d2..af63b29959fd 100644
--- a/vcl/qa/cppunit/cjktext.cxx
+++ b/vcl/qa/cppunit/cjktext.cxx
@@ -14,7 +14,7 @@
#include <tools/stream.hxx>
#include <vcl/BitmapReadAccess.hxx>
-#include <vcl/errcode.hxx>
+#include <comphelper/errcode.hxx>
#include <vcl/graphicfilter.hxx>
#include <vcl/settings.hxx>
#include <vcl/svapp.hxx>
diff --git a/vcl/qa/cppunit/text.cxx b/vcl/qa/cppunit/text.cxx
index 379940a9867b..d233fa9d9aa3 100644
--- a/vcl/qa/cppunit/text.cxx
+++ b/vcl/qa/cppunit/text.cxx
@@ -14,7 +14,7 @@
#include <tools/stream.hxx>
#include <vcl/BitmapReadAccess.hxx>
-#include <vcl/errcode.hxx>
+#include <comphelper/errcode.hxx>
#include <vcl/graphicfilter.hxx>
#include <vcl/settings.hxx>
#include <vcl/svapp.hxx>
diff --git a/xmlsecurity/inc/pch/precompiled_xmlsecurity.hxx b/xmlsecurity/inc/pch/precompiled_xmlsecurity.hxx
index 21e6b93a917e..c05ded48fe80 100644
--- a/xmlsecurity/inc/pch/precompiled_xmlsecurity.hxx
+++ b/xmlsecurity/inc/pch/precompiled_xmlsecurity.hxx
@@ -91,7 +91,7 @@
#include <vcl/bitmapex.hxx>
#include <vcl/checksum.hxx>
#include <vcl/dllapi.h>
-#include <vcl/errcode.hxx>
+#include <comphelper/errcode.hxx>
#include <vcl/fntstyle.hxx>
#include <vcl/font.hxx>
#include <vcl/mapmod.hxx>
diff --git a/xmlsecurity/inc/pch/precompiled_xsec_xmlsec.hxx b/xmlsecurity/inc/pch/precompiled_xsec_xmlsec.hxx
index 3ed7749687d1..d69f3120e0ca 100644
--- a/xmlsecurity/inc/pch/precompiled_xsec_xmlsec.hxx
+++ b/xmlsecurity/inc/pch/precompiled_xsec_xmlsec.hxx
@@ -79,7 +79,7 @@
#include <sal/types.h>
#include <sal/typesizes.h>
#include <vcl/dllapi.h>
-#include <vcl/errcode.hxx>
+#include <comphelper/errcode.hxx>
#endif // PCH_LEVEL >= 2
#if PCH_LEVEL >= 3
#include <com/sun/star/lang/DisposedException.hpp>