diff --git a/apple_remote/source/AppleRemote.m b/apple_remote/source/AppleRemote.m index fe50af4cc1be..ac062f28a4d5 100644 --- a/apple_remote/source/AppleRemote.m +++ b/apple_remote/source/AppleRemote.m @@ -48,7 +48,7 @@ static const char* AppleRemoteDeviceName = "AppleIRController"; - (void) setCookieMappingInDictionary: (NSMutableDictionary*) _cookieToButtonMapping { // TODO : avoid such magics -#ifdef DEBUG +#if OSL_DEBUG_LEVEL >= 2 NSLog( @"Apple Remote: setting 10.6 cookies" ); #endif // 10.6.x Snow Leopard diff --git a/apple_remote/source/GlobalKeyboardDevice.m b/apple_remote/source/GlobalKeyboardDevice.m index cbd78f5b011c..a44f30f1ba55 100644 --- a/apple_remote/source/GlobalKeyboardDevice.m +++ b/apple_remote/source/GlobalKeyboardDevice.m @@ -111,7 +111,7 @@ static OSStatus hotKeyEventHandler(EventHandlerCallRef, EventRef, void*); defaultsKey = @"playhold"; break; default: -#ifdef DEBUG +#if OSL_DEBUG_LEVEL >= 2 NSLog( @"Apple Remote: Unknown global keyboard defaults key for button identifier %d", remoteButtonIdentifier); #endif break; diff --git a/apple_remote/source/RemoteControl.m b/apple_remote/source/RemoteControl.m index 2d4021a910b1..e0dccb344331 100644 --- a/apple_remote/source/RemoteControl.m +++ b/apple_remote/source/RemoteControl.m @@ -51,7 +51,7 @@ NSString* kTargetApplicationIdentifier = @"TargetBundleIdentifier"; - (id) initWithDelegate: (id) _remoteControlDelegate { if ( (self = [super init]) ) { delegate = [_remoteControlDelegate retain]; -#ifdef DEBUG +#if OSL_DEBUG_LEVEL >= 2 NSLog( @"Apple RemoteControl initWithDelegate ok"); #endif } @@ -64,7 +64,7 @@ NSString* kTargetApplicationIdentifier = @"TargetBundleIdentifier"; } - (void) setListeningToRemote: (BOOL) value { -#ifdef DEBUG +#if OSL_DEBUG_LEVEL >= 2 NSLog( @"Apple RemoteControl setListeningToRemote ok"); #endif (void)value; @@ -74,13 +74,13 @@ NSString* kTargetApplicationIdentifier = @"TargetBundleIdentifier"; } - (void) startListening: (id) sender { -#ifdef DEBUG +#if OSL_DEBUG_LEVEL >= 2 NSLog( @"Apple RemoteControl startListening ok"); #endif (void)sender; } - (void) stopListening: (id) sender { -#ifdef DEBUG +#if OSL_DEBUG_LEVEL >= 2 NSLog( @"Apple RemoteControl stopListening ok"); #endif (void)sender; @@ -94,7 +94,7 @@ NSString* kTargetApplicationIdentifier = @"TargetBundleIdentifier"; } - (BOOL) sendsEventForButtonIdentifier: (RemoteControlEventIdentifier) identifier { -#ifdef DEBUG +#if OSL_DEBUG_LEVEL >= 2 NSLog( @"Apple RemoteControl: sending event for button identifier\n"); #endif (void)identifier; @@ -110,7 +110,7 @@ NSString* kTargetApplicationIdentifier = @"TargetBundleIdentifier"; targetIdentifier /*value = AppleIRController -> OK */, kTargetApplicationIdentifier /*targetBundleIdentifier -> does not appear, since the peer is nil*/, nil]; -#ifdef DEBUG +#if OSL_DEBUG_LEVEL >= 2 NSLog( @"Apple Remote: sendDistributedNotification ..."); // Debug purpose: returns all the existing dictionary keys. NSEnumerator* itKey = [userInfo keyEnumerator]; @@ -134,13 +134,13 @@ NSString* kTargetApplicationIdentifier = @"TargetBundleIdentifier"; + (void) sendFinishedNotificationForAppIdentifier: (NSString*) identifier { [self sendDistributedNotification:FINISHED_USING_REMOTE_CONTROL_NOTIFICATION targetBundleIdentifier:identifier]; -#ifdef DEBUG +#if OSL_DEBUG_LEVEL >= 2 NSLog( @"Apple RemoteControl: sendFinishedNotificationForAppIdentifier ..."); #endif } + (void) sendRequestForRemoteControlNotification { [self sendDistributedNotification:REQUEST_FOR_REMOTE_CONTROL_NOTIFICATION targetBundleIdentifier:nil]; -#ifdef DEBUG +#if OSL_DEBUG_LEVEL >= 2 NSLog( @"Apple RemoteControl: sendRequestForRemoteControlNotification ..."); #endif } diff --git a/apple_remote/source/RemoteControlContainer.m b/apple_remote/source/RemoteControlContainer.m index 14ecb36f1336..0c22ca26efa4 100644 --- a/apple_remote/source/RemoteControlContainer.m +++ b/apple_remote/source/RemoteControlContainer.m @@ -36,7 +36,7 @@ - (id) initWithDelegate: (id) _remoteControlDelegate { if ( (self = [super initWithDelegate:_remoteControlDelegate]) ) { remoteControls = [[NSMutableArray alloc] init]; -#ifdef DEBUG +#if OSL_DEBUG_LEVEL >= 2 NSLog( @"Apple Remote: ControlContainer initWithDelegate ok"); } else { @@ -61,7 +61,7 @@ [remoteControl addObserver: self forKeyPath:@"listeningToRemote" options:NSKeyValueObservingOptionNew context:nil]; toReturn = YES; } -#ifdef DEBUG +#if OSL_DEBUG_LEVEL >= 2 else { NSLog( @"Apple Remote: ControlContainer instantiateAndAddRemoteControlDeviceWithClass failed"); toReturn = NO; @@ -77,7 +77,7 @@ - (void) reset { [self willChangeValueForKey:@"listeningToRemote"]; [self didChangeValueForKey:@"listeningToRemote"]; -#ifdef DEBUG +#if OSL_DEBUG_LEVEL >= 2 // debug purpose NSLog( @"Apple Remote: reset... (after listening)"); #endif @@ -107,7 +107,7 @@ } - (void) startListening: (id) sender { -#ifdef DEBUG +#if OSL_DEBUG_LEVEL >= 2 NSLog(@"Apple Remote: start listening to events... "); #endif for(NSUInteger i=0; i < [remoteControls count]; i++) { @@ -115,7 +115,7 @@ } } - (void) stopListening: (id) sender { -#ifdef DEBUG +#if OSL_DEBUG_LEVEL >= 2 NSLog(@"Apple Remote: stopListening to events... "); #endif for(NSUInteger i=0; i < [remoteControls count]; i++) { diff --git a/apple_remote/source/RemoteMainController.m b/apple_remote/source/RemoteMainController.m index 9e933a302880..5401b3d1dd6c 100644 --- a/apple_remote/source/RemoteMainController.m +++ b/apple_remote/source/RemoteMainController.m @@ -56,7 +56,7 @@ RemoteControlContainer* container = [[RemoteControlContainer alloc] initWithDelegate: remoteControlBehavior]; if ( [container instantiateAndAddRemoteControlDeviceWithClass: [AppleRemote class]] != 0 ) { -#ifdef DEBUG +#if OSL_DEBUG_LEVEL >= 2 NSLog(@"[container instantiateAndAddRemoteControlDeviceWithClass: [AppleRemote class]] successful"); } else { @@ -65,7 +65,7 @@ } if ( [container instantiateAndAddRemoteControlDeviceWithClass: [GlobalKeyboardDevice class]] != 0 ) { -#ifdef DEBUG +#if OSL_DEBUG_LEVEL >= 2 NSLog(@"[container instantiateAndAddRemoteControlDeviceWithClass: [GlobalKeyboardDevice class]] successful"); } else { @@ -74,7 +74,7 @@ } // to give the binding mechanism a chance to see the change of the attribute [self setValue: container forKey: @"remoteControl"]; -#ifdef DEBUG +#if OSL_DEBUG_LEVEL >= 2 NSLog(@"AppleRemoteMainController init done"); #endif } @@ -105,13 +105,13 @@ SAL_WNODEPRECATED_DECLARATIONS_POP - (void) remoteButton: (RemoteControlEventIdentifier)buttonIdentifier pressedDown: (BOOL) pressedDown clickCount: (unsigned int)clickCount { (void)clickCount; -#ifdef DEBUG +#if OSL_DEBUG_LEVEL >= 2 NSString* pressed = @""; NSString* buttonName = nil; #endif if (pressedDown) { -#ifdef DEBUG +#if OSL_DEBUG_LEVEL >= 2 pressed = @"(AppleRemoteMainController: button pressed)"; switch(buttonIdentifier) @@ -137,12 +137,12 @@ SAL_WNODEPRECATED_DECLARATIONS_POP } else // not pressed { -#ifdef DEBUG +#if OSL_DEBUG_LEVEL >= 2 pressed = @"(AppleRemoteMainController: button released)"; #endif } -#ifdef DEBUG +#if OSL_DEBUG_LEVEL >= 2 //NSLog(@"Button %@ pressed %@", buttonName, pressed); NSString* clickCountString = @""; if (clickCount > 1) clickCountString = [NSString stringWithFormat: @"%d clicks", clickCount]; diff --git a/desktop/source/app/check_ext_deps.cxx b/desktop/source/app/check_ext_deps.cxx index 58e2375c6537..7f76d155c31e 100644 --- a/desktop/source/app/check_ext_deps.cxx +++ b/desktop/source/app/check_ext_deps.cxx @@ -255,7 +255,7 @@ static bool impl_checkDependencies( const uno::Reference< uno::XComponentContext e.Context, anyEx ); } -#ifdef DEBUG +#if OSL_DEBUG_LEVEL >= 2 sal_Int32 const nMax = 3; #else sal_Int32 const nMax = 2; @@ -362,7 +362,7 @@ static bool impl_needsCompatCheck() pset->setPropertyValue("LastCompatibilityCheckID", result ); Reference< util::XChangesBatch >( pset, UNO_QUERY_THROW )->commitChanges(); } -#ifdef DEBUG +#if OSL_DEBUG_LEVEL >= 2 bNeedsCheck = true; #endif } diff --git a/editeng/source/editeng/editview.cxx b/editeng/source/editeng/editview.cxx index 9868c3ebec59..7f20f65cb0bb 100644 --- a/editeng/source/editeng/editview.cxx +++ b/editeng/source/editeng/editview.cxx @@ -124,7 +124,7 @@ LanguageType EditView::CheckLanguage( aLangList[2] = rSettings.GetLanguageTag().getLanguageType(); // en-US aLangList[3] = LANGUAGE_ENGLISH_US; -#ifdef DEBUG +#if OSL_DEBUG_LEVEL >= 2 lang::Locale a0( LanguageTag::convertToLocale( aLangList[0] ) ); lang::Locale a1( LanguageTag::convertToLocale( aLangList[1] ) ); lang::Locale a2( LanguageTag::convertToLocale( aLangList[2] ) ); diff --git a/editeng/source/editeng/impedit4.cxx b/editeng/source/editeng/impedit4.cxx index 5b0dac15b609..b761c4914c07 100644 --- a/editeng/source/editeng/impedit4.cxx +++ b/editeng/source/editeng/impedit4.cxx @@ -1537,7 +1537,7 @@ bool ImpEditEngine::HasConvertibleTextPortion( LanguageType nSrcLang ) if (nEnd > nStart) // empty para? ++nStart; LanguageType nLangFound = mpEditEngine->GetLanguage( k, nStart ).nLang; -#ifdef DEBUG +#if OSL_DEBUG_LEVEL >= 2 lang::Locale aLocale( LanguageTag::convertToLocale( nLangFound ) ); #endif bHasConvTxt = (nSrcLang == nLangFound) || @@ -1721,7 +1721,7 @@ void ImpEditEngine::ImpConvert( OUString &rConvTxt, LanguageType &rConvTxtLang, // of the text right to the cursor position const sal_Int32 nLangIdx = nEnd > nStart ? nStart + 1 : nStart; LanguageType nLangFound = mpEditEngine->GetLanguage( aCurStart.nPara, nLangIdx ).nLang; -#ifdef DEBUG +#if OSL_DEBUG_LEVEL >= 2 lang::Locale aLocale( LanguageTag::convertToLocale( nLangFound ) ); #endif bool bLangOk = (nLangFound == nSrcLang) || diff --git a/extensions/source/update/feed/updatefeed.cxx b/extensions/source/update/feed/updatefeed.cxx index f9e6a5706c91..556955b7123c 100644 --- a/extensions/source/update/feed/updatefeed.cxx +++ b/extensions/source/update/feed/updatefeed.cxx @@ -70,7 +70,7 @@ namespace xml = com::sun::star::xml ; namespace { -#ifdef DEBUG +#if OSL_DEBUG_LEVEL >= 2 class InputStreamWrapper : public ::cppu::WeakImplHelper< io::XInputStream > { diff --git a/hwpfilter/source/formula.cxx b/hwpfilter/source/formula.cxx index a011e48354fd..e220afe9d881 100644 --- a/hwpfilter/source/formula.cxx +++ b/hwpfilter/source/formula.cxx @@ -25,7 +25,7 @@ #include "hwpeq.h" #include -#ifndef DEBUG +#if OSL_DEBUG_LEVEL < 2 #include "hcode.h" @@ -46,7 +46,7 @@ void Formula::makeMathML(Node *res) { Node *tmp = res; if( !tmp ) return; -#ifdef DEBUG +#if OSL_DEBUG_LEVEL >= 2 inds; fprintf(stderr,"\n"); #else @@ -58,7 +58,7 @@ void Formula::makeMathML(Node *res) if( tmp->child ) makeLines( tmp->child ); -#ifdef DEBUG +#if OSL_DEBUG_LEVEL >= 2 inds; fprintf(stderr,"\n"); indo; @@ -88,14 +88,14 @@ void Formula::makeLines(Node *res) void Formula::makeLine(Node *res) { if( !res ) return; -#ifdef DEBUG +#if OSL_DEBUG_LEVEL >= 2 inds; fprintf(stderr,"\n"); #else rstartEl("math:mrow", mxList); #endif if( res->child ) makeExprList( res->child ); -#ifdef DEBUG +#if OSL_DEBUG_LEVEL >= 2 inde; fprintf(stderr,"\n"); #else rendEl("math:mrow"); @@ -126,7 +126,7 @@ void Formula::makeExpr(Node *res) switch( tmp->id ) { case ID_PRIMARYEXPR: if( tmp->next ){ -#ifdef DEBUG +#if OSL_DEBUG_LEVEL >= 2 inds; fprintf(stderr,"\n"); #else @@ -137,7 +137,7 @@ void Formula::makeExpr(Node *res) makePrimary(tmp); if( tmp->next ){ -#ifdef DEBUG +#if OSL_DEBUG_LEVEL >= 2 inde; fprintf(stderr,"\n"); #else rendEl("math:mrow"); @@ -188,7 +188,7 @@ void Formula::makeIdentifier(Node *res) if( !tmp->value ) return; switch( tmp->id ){ case ID_CHARACTER : -#ifdef DEBUG +#if OSL_DEBUG_LEVEL >= 2 inds; fprintf(stderr,"%s\n",tmp->value.get()); indo; @@ -200,7 +200,7 @@ void Formula::makeIdentifier(Node *res) break; case ID_STRING : { -#ifdef DEBUG +#if OSL_DEBUG_LEVEL >= 2 #else rstartEl("math:mi", mxList); reucstr(tmp->value.get(), strlen(tmp->value.get())); @@ -209,7 +209,7 @@ void Formula::makeIdentifier(Node *res) } break; case ID_IDENTIFIER : -#ifdef DEBUG +#if OSL_DEBUG_LEVEL >= 2 inds; fprintf(stderr,"%s\n", getMathMLEntity(tmp->value.get()).c_str()); @@ -221,7 +221,7 @@ void Formula::makeIdentifier(Node *res) #endif break; case ID_NUMBER : -#ifdef DEBUG +#if OSL_DEBUG_LEVEL >= 2 inds; fprintf(stderr,"%s\n",tmp->value.get()); indo; @@ -234,7 +234,7 @@ void Formula::makeIdentifier(Node *res) case ID_OPERATOR : case ID_DELIMITER : { -#ifdef DEBUG +#if OSL_DEBUG_LEVEL >= 2 inds; fprintf(stderr,"%s\n",tmp->value.get()); indo; #else rstartEl("math:mo", mxList); @@ -267,7 +267,7 @@ void Formula::makeSubSup(Node *res) Node *tmp = res; if( !tmp ) return; -#ifdef DEBUG +#if OSL_DEBUG_LEVEL >= 2 inds; if( res->id == ID_SUBEXPR ) fprintf(stderr,"\n"); @@ -295,7 +295,7 @@ void Formula::makeSubSup(Node *res) makeExpr(tmp->next); } -#ifdef DEBUG +#if OSL_DEBUG_LEVEL >= 2 inde; if( res->id == ID_SUBEXPR ) fprintf(stderr,"\n"); @@ -318,7 +318,7 @@ void Formula::makeFraction(Node *res) Node *tmp = res; if( !tmp ) return; -#ifdef DEBUG +#if OSL_DEBUG_LEVEL >= 2 inds; fprintf(stderr,"\n"); #else @@ -326,7 +326,7 @@ void Formula::makeFraction(Node *res) #endif tmp = tmp->child; -#ifdef DEBUG +#if OSL_DEBUG_LEVEL >= 2 inds; fprintf(stderr,"\n"); #else @@ -338,7 +338,7 @@ void Formula::makeFraction(Node *res) else makeExprList(tmp); -#ifdef DEBUG +#if OSL_DEBUG_LEVEL >= 2 inde; fprintf(stderr,"\n"); inds; @@ -353,7 +353,7 @@ void Formula::makeFraction(Node *res) else makeExprList(tmp->next); -#ifdef DEBUG +#if OSL_DEBUG_LEVEL >= 2 inde; fprintf(stderr,"\n"); inde; @@ -371,7 +371,7 @@ void Formula::makeDecoration(Node *res) if( !tmp ) return; if( !strncmp(tmp->value.get(),"under", 5) ) isover = 0; -#ifdef DEBUG +#if OSL_DEBUG_LEVEL >= 2 inds; if( isover ) fprintf(stderr,"\n"); @@ -392,7 +392,7 @@ void Formula::makeDecoration(Node *res) makeBlock(tmp->next); -#ifdef DEBUG +#if OSL_DEBUG_LEVEL >= 2 inds; fprintf(stderr,"%s\n", getMathMLEntity(tmp->value.get()).c_str()); @@ -403,7 +403,7 @@ void Formula::makeDecoration(Node *res) rendEl("math:mo"); #endif -#ifdef DEBUG +#if OSL_DEBUG_LEVEL >= 2 inde; if( isover ) fprintf(stderr,"\n"); @@ -421,7 +421,7 @@ void Formula::makeRoot(Node *res) { Node *tmp = res; if( !tmp ) return; -#ifdef DEBUG +#if OSL_DEBUG_LEVEL >= 2 inds; if( tmp->id == ID_SQRTEXPR ) fprintf(stderr,"\n"); @@ -442,7 +442,7 @@ void Formula::makeRoot(Node *res) makeBlock(tmp->child->next); } -#ifdef DEBUG +#if OSL_DEBUG_LEVEL >= 2 inde; if( tmp->id == ID_SQRTEXPR ) fprintf(stderr,"\n"); @@ -463,7 +463,7 @@ void Formula::makeParenth(Node *res) { Node *tmp = res; if( !tmp ) return; -#ifdef DEBUG +#if OSL_DEBUG_LEVEL >= 2 inds; fprintf(stderr,"\n"); inds; @@ -488,7 +488,7 @@ void Formula::makeParenth(Node *res) if( tmp->child ) makeExprList(tmp->child); -#ifdef DEBUG +#if OSL_DEBUG_LEVEL >= 2 inde; fprintf(stderr,"\n"); inds; @@ -514,7 +514,7 @@ void Formula::makeParenth(Node *res) void Formula::makeFence(Node *res) { Node *tmp = res->child; -#ifdef DEBUG +#if OSL_DEBUG_LEVEL >= 2 inds; fprintf(stderr,"\n", getMathMLEntity(tmp->value.get()).c_str(), @@ -530,7 +530,7 @@ void Formula::makeFence(Node *res) makeExprList(tmp->next); -#ifdef DEBUG +#if OSL_DEBUG_LEVEL >= 2 inde; fprintf(stderr,"\n"); #else @@ -545,7 +545,7 @@ void Formula::makeBracket(Node *res) void Formula::makeBlock(Node *res) { -#ifdef DEBUG +#if OSL_DEBUG_LEVEL >= 2 inds; fprintf(stderr,"\n"); #else @@ -555,7 +555,7 @@ void Formula::makeBlock(Node *res) if( res->child ) makeExprList(res->child); -#ifdef DEBUG +#if OSL_DEBUG_LEVEL >= 2 inde; fprintf(stderr,"\n"); #else diff --git a/hwpfilter/source/mapping.h b/hwpfilter/source/mapping.h index 2b573cb80e8b..5235f7e777d5 100644 --- a/hwpfilter/source/mapping.h +++ b/hwpfilter/source/mapping.h @@ -360,7 +360,7 @@ const struct FormulaEntry FormulaMapTab[] = { }; -#ifndef DEBUG +#if OSL_DEBUG_LEVEL < 2 hchar_string getMathMLEntity(const char *tex) { static const size_t tabSize = SAL_N_ELEMENTS(FormulaMapTab); diff --git a/i18nlangtag/source/isolang/inunx.cxx b/i18nlangtag/source/isolang/inunx.cxx index 4dd4cdb3531b..297c2c0c188b 100644 --- a/i18nlangtag/source/isolang/inunx.cxx +++ b/i18nlangtag/source/isolang/inunx.cxx @@ -104,7 +104,7 @@ static void getPlatformSystemLanguageImpl( LanguageType& rSystemLanguage, nLang = LanguageTag( *procLocale ).makeFallback().getLanguageType(); OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER(); rSystemLanguage = nLang; -#ifdef DEBUG +#if OSL_DEBUG_LEVEL >= 2 if ( rSystemLanguage == LANGUAGE_DONTKNOW ) fprintf( stderr, "intnunx.cxx: failed to convert osl_getProcessLocale() language to system language.\n" ); #endif diff --git a/include/default.rc b/include/default.rc index 5474d55c4c0a..eec301267144 100644 --- a/include/default.rc +++ b/include/default.rc @@ -29,7 +29,7 @@ VS_VERSION_INFO VERSIONINFO PRODUCTVERSION VERSION, SUBVERSION, MICROVERSION, VERVARIANT FILEFLAGSMASK 0x3F FILEFLAGS -#if defined(DEBUG) +#if OSL_DEBUG_LEVEL >= 2 VS_FF_DEBUG | #endif #ifdef VER_PREL diff --git a/oox/source/drawingml/customshapeproperties.cxx b/oox/source/drawingml/customshapeproperties.cxx index 533401f586dd..862ffd8624a3 100644 --- a/oox/source/drawingml/customshapeproperties.cxx +++ b/oox/source/drawingml/customshapeproperties.cxx @@ -118,7 +118,7 @@ void CustomShapeProperties::pushToPropSet( "found property map for preset: " << mnShapePresetType); aPropertyMap = maPresetDataMap[mnShapePresetType]; -#ifdef DEBUG +#if OSL_DEBUG_LEVEL >= 2 aPropertyMap.dumpCode( aPropertyMap.makePropertySet() ); #endif } @@ -372,7 +372,7 @@ void CustomShapeProperties::pushToPropSet( aPropertyMap.setProperty( PROP_Extrusion, aExtrusionSequence); } -#ifdef DEBUG +#if OSL_DEBUG_LEVEL >= 2 // Note that the script oox/source/drawingml/customshapes/generatePresetsData.pl looks // for these ==cscode== and ==csdata== markers, so don't "clean up" these SAL_INFOs. SAL_INFO("oox.cscode", "==cscode== begin"); diff --git a/oox/source/drawingml/customshapes/generate.sh b/oox/source/drawingml/customshapes/generate.sh index b0e661ec1914..a13ef646dfb8 100755 --- a/oox/source/drawingml/customshapes/generate.sh +++ b/oox/source/drawingml/customshapes/generate.sh @@ -6,7 +6,7 @@ set -o errexit -# oox needs to be build with dbglevel=2 so that DEBUG is defined. +# oox needs to be build with dbglevel=2 so that OSL_DEBUG_LEVEL=2 is defined. make oox.clean && make oox dbglevel=2 diff --git a/oox/source/ole/axcontrol.cxx b/oox/source/ole/axcontrol.cxx index 1c45988b2bfe..4a2287bc196b 100644 --- a/oox/source/ole/axcontrol.cxx +++ b/oox/source/ole/axcontrol.cxx @@ -2644,7 +2644,7 @@ HtmlTextBoxModel::HtmlTextBoxModel() bool HtmlTextBoxModel::importBinaryModel( BinaryInputStream& rInStrm ) { -#ifdef DEBUG +#if OSL_DEBUG_LEVEL >= 2 OUString sStringContents = rInStrm.readUnicodeArray( rInStrm.size() ); // in msocximex ( where this is ported from, it appears *nothing* is read // from the control stream ), surely there is some useful info there ? diff --git a/sd/source/core/CustomAnimationPreset.cxx b/sd/source/core/CustomAnimationPreset.cxx index 0fc8e6b82c70..1d63b5d217b9 100644 --- a/sd/source/core/CustomAnimationPreset.cxx +++ b/sd/source/core/CustomAnimationPreset.cxx @@ -337,7 +337,7 @@ void CustomAnimationPresets::importResources() void CustomAnimationPresets::importPresets( const Reference< XMultiServiceFactory >& xConfigProvider, const OUString& rNodePath, PresetCategoryList& rPresetMap ) { -#ifdef DEBUG +#if OSL_DEBUG_LEVEL >= 2 OUString aMissedPresetIds; #endif @@ -370,7 +370,7 @@ void CustomAnimationPresets::importPresets( const Reference< XMultiServiceFactor { aEffectsList.push_back( pEffect ); } -#ifdef DEBUG +#if OSL_DEBUG_LEVEL >= 2 else { aMissedPresetIds += OUString(rEffectName); @@ -388,7 +388,7 @@ void CustomAnimationPresets::importPresets( const Reference< XMultiServiceFactor TOOLS_WARN_EXCEPTION( "sd", "sd::CustomAnimationPresets::importPresets()" ); } -#ifdef DEBUG +#if OSL_DEBUG_LEVEL >= 2 SAL_WARN_IF(!aMissedPresetIds.isEmpty(), "sd", "sd::CustomAnimationPresets::importPresets(), invalid preset id: " << aMissedPresetIds); #endif diff --git a/sd/source/filter/eppt/pptx-epptooxml.cxx b/sd/source/filter/eppt/pptx-epptooxml.cxx index 2cfd29be0fcc..e4e0b617d198 100644 --- a/sd/source/filter/eppt/pptx-epptooxml.cxx +++ b/sd/source/filter/eppt/pptx-epptooxml.cxx @@ -1585,7 +1585,7 @@ void PowerPointExport::ImplWritePPTXLayout(sal_Int32 nOffset, sal_uInt32 nMaster Reference< drawing::XDrawPages > xDrawPages = xDPS->getDrawPages(); Reference< drawing::XDrawPage > xSlide = xDrawPages->insertNewByIndex(xDrawPages->getCount()); -#ifdef DEBUG +#if OSL_DEBUG_LEVEL >= 2 if (xSlide.is()) printf("new page created\n"); #endif diff --git a/sd/source/ui/framework/module/ShellStackGuard.cxx b/sd/source/ui/framework/module/ShellStackGuard.cxx index d7dcfb0f2923..3a3f31a01e1f 100644 --- a/sd/source/ui/framework/module/ShellStackGuard.cxx +++ b/sd/source/ui/framework/module/ShellStackGuard.cxx @@ -107,7 +107,7 @@ void SAL_CALL ShellStackGuard::disposing ( IMPL_LINK(ShellStackGuard, TimeoutHandler, Timer*, pIdle, void) { -#ifdef DEBUG +#if OSL_DEBUG_LEVEL >= 2 OSL_ASSERT(pIdle==&maPrinterPollingIdle); #else (void)pIdle; diff --git a/setup_native/source/win32/customactions/reg4allmsdoc/reg4allmsi.cxx b/setup_native/source/win32/customactions/reg4allmsdoc/reg4allmsi.cxx index 70ba1cc5246c..1e133e2158de 100644 --- a/setup_native/source/win32/customactions/reg4allmsdoc/reg4allmsi.cxx +++ b/setup_native/source/win32/customactions/reg4allmsdoc/reg4allmsi.cxx @@ -72,7 +72,7 @@ const int VISIO_END = 32; // ".ppam", // Office PowerPoint 2007 macro-enabled XML add-in // ".ppsm", // Office PowerPoint 2007 macro-enabled XML show -#ifdef DEBUG +#if OSL_DEBUG_LEVEL >= 2 inline void OutputDebugStringFormatW( LPCWSTR pFormat, ... ) { WCHAR buffer[1024]; diff --git a/setup_native/source/win32/customactions/shellextensions/checkpatches.cxx b/setup_native/source/win32/customactions/shellextensions/checkpatches.cxx index d573161fb11b..e0be45db41df 100644 --- a/setup_native/source/win32/customactions/shellextensions/checkpatches.cxx +++ b/setup_native/source/win32/customactions/shellextensions/checkpatches.cxx @@ -21,7 +21,7 @@ #include #include -#ifdef DEBUG +#if OSL_DEBUG_LEVEL >= 2 inline void OutputDebugStringFormatW( PCWSTR pFormat, ... ) { WCHAR buffer[1024]; diff --git a/setup_native/source/win32/customactions/tools/checkversion.cxx b/setup_native/source/win32/customactions/tools/checkversion.cxx index 3f0b30f3ce34..4f4dbd2379fe 100644 --- a/setup_native/source/win32/customactions/tools/checkversion.cxx +++ b/setup_native/source/win32/customactions/tools/checkversion.cxx @@ -50,7 +50,7 @@ static bool GetMsiPropW( MSIHANDLE hMSI, const wchar_t* pPropName, wchar_t** ppV } -#ifdef DEBUG +#if OSL_DEBUG_LEVEL >= 2 inline void OutputDebugStringFormatW( PCWSTR pFormat, ... ) { WCHAR buffer[1024]; diff --git a/setup_native/source/win32/customactions/tools/seterror.cxx b/setup_native/source/win32/customactions/tools/seterror.cxx index f1800ffb7ffb..9a35ab0af019 100644 --- a/setup_native/source/win32/customactions/tools/seterror.cxx +++ b/setup_native/source/win32/customactions/tools/seterror.cxx @@ -28,7 +28,7 @@ #include "seterror.hxx" -#ifdef DEBUG +#if OSL_DEBUG_LEVEL >= 2 inline void OutputDebugStringFormatW( PCWSTR pFormat, ... ) { WCHAR buffer[1024]; diff --git a/sfx2/source/sidebar/DeckTitleBar.cxx b/sfx2/source/sidebar/DeckTitleBar.cxx index 9e12fd15c6ab..f425e21a92bc 100644 --- a/sfx2/source/sidebar/DeckTitleBar.cxx +++ b/sfx2/source/sidebar/DeckTitleBar.cxx @@ -26,7 +26,7 @@ #include #include -#ifdef DEBUG +#if OSL_DEBUG_LEVEL >= 2 #include #endif diff --git a/sfx2/source/sidebar/Panel.cxx b/sfx2/source/sidebar/Panel.cxx index 5998cb2ee94c..6bc1424e7d41 100644 --- a/sfx2/source/sidebar/Panel.cxx +++ b/sfx2/source/sidebar/Panel.cxx @@ -27,7 +27,7 @@ #include -#ifdef DEBUG +#if OSL_DEBUG_LEVEL >= 2 #include #include #endif diff --git a/sfx2/source/sidebar/SidebarController.cxx b/sfx2/source/sidebar/SidebarController.cxx index a9ec224cfe7d..468ad56f080f 100644 --- a/sfx2/source/sidebar/SidebarController.cxx +++ b/sfx2/source/sidebar/SidebarController.cxx @@ -908,7 +908,7 @@ void SidebarController::SwitchToDeck ( if ( ! mpCurrentDeck) return; -#ifdef DEBUG +#if OSL_DEBUG_LEVEL >= 2 // Show the context name in the deck title bar. DeckTitleBar* pDebugTitleBar = mpCurrentDeck->GetTitleBar(); if (pDebugTitleBar) diff --git a/sfx2/source/sidebar/SidebarToolBox.cxx b/sfx2/source/sidebar/SidebarToolBox.cxx index 349e5bef1497..768262e3003f 100644 --- a/sfx2/source/sidebar/SidebarToolBox.cxx +++ b/sfx2/source/sidebar/SidebarToolBox.cxx @@ -75,7 +75,7 @@ SidebarToolBox::SidebarToolBox (vcl::Window* pParentWindow) mxImageController = sfx2::sidebar::ControllerFactory::CreateImageController(xFrame, xWidget); } -#ifdef DEBUG +#if OSL_DEBUG_LEVEL >= 2 SetText(OUString("SidebarToolBox")); #endif } diff --git a/sfx2/source/sidebar/TabBar.cxx b/sfx2/source/sidebar/TabBar.cxx index 3ccaa7ebd454..b5ae63842357 100644 --- a/sfx2/source/sidebar/TabBar.cxx +++ b/sfx2/source/sidebar/TabBar.cxx @@ -82,7 +82,7 @@ TabBar::TabBar(vcl::Window* pParentWindow, mxMenuButton->connect_toggled(LINK(this, TabBar, OnToolboxClicked)); -#ifdef DEBUG +#if OSL_DEBUG_LEVEL >= 2 SetText(OUString("TabBar")); #endif } diff --git a/shell/inc/utilities.hxx b/shell/inc/utilities.hxx index 1941d85e658a..823c18791240 100644 --- a/shell/inc/utilities.hxx +++ b/shell/inc/utilities.hxx @@ -74,7 +74,7 @@ std::wstring getShortPathName(const std::wstring& aLongName); LCID LocaleSetToLCID(const LocaleSet_t& Locale); -#ifdef DEBUG +#if OSL_DEBUG_LEVEL >= 2 inline void OutputDebugStringFormatW(LPCWSTR pFormat, ...) { WCHAR buffer[1024]; diff --git a/solenv/gbuild/gbuild.mk b/solenv/gbuild/gbuild.mk index eb80cfa368f5..9b3b1d519b05 100644 --- a/solenv/gbuild/gbuild.mk +++ b/solenv/gbuild/gbuild.mk @@ -254,13 +254,6 @@ gb_GLOBALDEFS += -DSAL_LOG_INFO \ endif -ifneq ($(gb_DEBUGLEVEL),0) -ifneq ($(gb_DEBUGLEVEL),1) # 2 or more -gb_GLOBALDEFS += -DDEBUG \ - -endif -endif - gb_GLOBALDEFS += \ $(call gb_Helper_define_if_set,\ DISABLE_DYNLOADING \ diff --git a/soltools/mkdepend/def.h b/soltools/mkdepend/def.h index bd06c5f01378..0dfb5638eddf 100644 --- a/soltools/mkdepend/def.h +++ b/soltools/mkdepend/def.h @@ -77,7 +77,7 @@ in this Software without prior written authorization from the X Consortium. #define ELIFFALSE 16 /* pseudo value --- never matched */ #define ELIFGUESSFALSE 19 /* pseudo value --- never matched */ -#ifdef DEBUG +#if OSL_DEBUG_LEVEL >= 2 extern int _debugmask; /* * debug levels are: diff --git a/soltools/mkdepend/main.c b/soltools/mkdepend/main.c index 708d2c3b53dd..cf06e9797d94 100644 --- a/soltools/mkdepend/main.c +++ b/soltools/mkdepend/main.c @@ -83,7 +83,7 @@ typedef _W64 int ssize_t; #define USE_CHMOD 1 #endif -#ifdef DEBUG +#if OSL_DEBUG_LEVEL >= 2 int _debugmask; #endif @@ -309,7 +309,7 @@ int main(int argc, char **argv) case 'v': if (endmarker) break; verbose = TRUE; -#ifdef DEBUG +#if OSL_DEBUG_LEVEL >= 2 if (argv[0][2]) _debugmask = atoi(argv[0]+2); #endif diff --git a/svl/source/items/stylepool.cxx b/svl/source/items/stylepool.cxx index 22900163ad59..0f3959cb4687 100644 --- a/svl/source/items/stylepool.cxx +++ b/svl/source/items/stylepool.cxx @@ -343,14 +343,14 @@ private: std::map< const SfxItemSet*, OUString> maParentNames; // #i86923# std::unique_ptr mpIgnorableItems; -#ifdef DEBUG +#if OSL_DEBUG_LEVEL >= 2 sal_Int32 mnCount; #endif public: // #i86923# explicit StylePoolImpl( SfxItemSet const * pIgnorableItems ) : -#ifdef DEBUG +#if OSL_DEBUG_LEVEL >= 2 mnCount(0), #endif mpIgnorableItems( pIgnorableItems != nullptr @@ -416,14 +416,14 @@ std::shared_ptr StylePoolImpl::insertItemSet( const SfxItemSet& rSet { pCurNode->setItemSet( rSet ); bNonShareable = false; // to avoid a double insertion -#ifdef DEBUG +#if OSL_DEBUG_LEVEL >= 2 ++mnCount; #endif } // If rSet contains at least one non poolable item, a new itemset has to be inserted if( bNonShareable ) pCurNode->setItemSet( rSet ); -#ifdef DEBUG +#if OSL_DEBUG_LEVEL >= 2 { sal_Int32 nCheck = -1; std::unique_ptr pIter = createIterator(false,false); diff --git a/vcl/osx/salinst.cxx b/vcl/osx/salinst.cxx index 7f755bb618b3..db2b2c605677 100644 --- a/vcl/osx/salinst.cxx +++ b/vcl/osx/salinst.cxx @@ -1078,7 +1078,7 @@ bool AquaSalInstance::SVMainHook(int* pnInit) osl_getSystemPathFromFileURL( aExeURL.pData, &aExe.pData ); OString aByteExe( OUStringToOString( aExe, osl_getThreadTextEncoding() ) ); -#ifdef DEBUG +#if OSL_DEBUG_LEVEL >= 2 aByteExe += OString ( " NSAccessibilityDebugLogLevel 1" ); const char* pArgv[] = { aByteExe.getStr(), NULL }; NSApplicationMain( 3, pArgv ); diff --git a/vcl/osx/vclnsapp.mm b/vcl/osx/vclnsapp.mm index cd60cb0b0cec..d023e9758879 100644 --- a/vcl/osx/vclnsapp.mm +++ b/vcl/osx/vclnsapp.mm @@ -391,7 +391,7 @@ // workaround : declare remoteControl instance variable as public in RemoteMainController.m [pAppleRemoteCtrl->remoteControl startListening: self]; -#ifdef DEBUG +#if OSL_DEBUG_LEVEL >= 2 NSLog(@"Apple Remote will become active - Using remote controls"); #endif } @@ -419,7 +419,7 @@ // workaround : declare remoteControl instance variable as public in RemoteMainController.m [pAppleRemoteCtrl->remoteControl stopListening: self]; -#ifdef DEBUG +#if OSL_DEBUG_LEVEL >= 2 NSLog(@"Apple Remote will resign active - Releasing remote controls"); #endif } diff --git a/vcl/unx/generic/fontmanager/fontsubst.cxx b/vcl/unx/generic/fontmanager/fontsubst.cxx index d4fae2f79085..a5c34a112d78 100644 --- a/vcl/unx/generic/fontmanager/fontsubst.cxx +++ b/vcl/unx/generic/fontmanager/fontsubst.cxx @@ -133,7 +133,7 @@ bool FcPreMatchSubstitution::FindFontSubstitute(vcl::font::FontSelectPattern &rF const bool bHaveSubstitute = !uselessmatch( rFontSelData, aOut ); -#ifdef DEBUG +#if OSL_DEBUG_LEVEL >= 2 std::ostringstream oss; oss << "FcPreMatchSubstitution \"" << rFontSelData.maTargetName @@ -191,7 +191,7 @@ bool FcGlyphFallbackSubstitution::FindFontSubstitute(vcl::font::FontSelectPatter const bool bHaveSubstitute = !uselessmatch( rFontSelData, aOut ); -#ifdef DEBUG +#if OSL_DEBUG_LEVEL >= 2 std::ostringstream oss; oss << "FcGFSubstitution \"" << rFontSelData.maTargetName diff --git a/vcl/unx/generic/gdi/salgdi.cxx b/vcl/unx/generic/gdi/salgdi.cxx index 39ded2207cd3..092ab26e6b85 100644 --- a/vcl/unx/generic/gdi/salgdi.cxx +++ b/vcl/unx/generic/gdi/salgdi.cxx @@ -186,7 +186,7 @@ void X11SalGraphics::GetResolution( sal_Int32 &rDPIX, sal_Int32 &rDPIY ) // cons // different x- and y- resolutions are usually artifacts of // a wrongly calculated screen size. -#ifdef DEBUG +#if OSL_DEBUG_LEVEL >= 2 SAL_INFO("vcl.gdi", "Forcing Resolution from " << std::hex << rDPIX << std::dec << rDPIX