diff --git a/codemaker/source/cppumaker/cpputype.cxx b/codemaker/source/cppumaker/cpputype.cxx index aa332fb026e7..24846d054347 100644 --- a/codemaker/source/cppumaker/cpputype.cxx +++ b/codemaker/source/cppumaker/cpputype.cxx @@ -2818,7 +2818,7 @@ void ExceptionType::dumpHdlFile( { if (name_ == "com.sun.star.uno.Exception") { - includes.addCustom(u"#if defined(LIBO_INTERNAL_ONLY) && !defined(NDEBUG)"_ustr); + includes.addCustom(u"#if defined(LIBO_INTERNAL_ONLY) && OSL_DEBUG_LEVEL > 0"_ustr); includes.addCustom(u"#include "_ustr); includes.addCustom(u"#endif"_ustr); includes.addCustom(u"#if defined LIBO_USE_SOURCE_LOCATION"_ustr);