From 0fcc41e6d142c50a43e14e120e639227a7795dc9 Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Thu, 22 May 2014 12:10:12 +0300 Subject: WaE: unused variable 'bHandled' While at it, make it use SAL_INFO instead of fprintf. Change-Id: Id4018819f8f790bef219e5aca3b6bbb5f6acd6aa --- include/sal/log-areas.dox | 1 + vcl/source/window/debugevent.cxx | 26 ++++++++++++++++---------- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/include/sal/log-areas.dox b/include/sal/log-areas.dox index 826872d6a514..8412f015c50c 100644 --- a/include/sal/log-areas.dox +++ b/include/sal/log-areas.dox @@ -369,6 +369,7 @@ certain functionality. @li @c vcl.cg - CoreGraphics calls on OS X and iOS @li @c vcl.control @li @c vcl.coretext - CoreText-using code for Mac OS X and iOS +@li @c vcl.debugevent @li @c vcl.emf - EMF/EMF+ processing @li @c vcl.filter @li @c vcl.fonts - font-specific code diff --git a/vcl/source/window/debugevent.cxx b/vcl/source/window/debugevent.cxx index e83909e04f2a..373001c17280 100644 --- a/vcl/source/window/debugevent.cxx +++ b/vcl/source/window/debugevent.cxx @@ -7,7 +7,6 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -// #include #include #include #include @@ -110,11 +109,11 @@ void DebugEventInjector::InjectMenuEvent() SalMenuEvent aEvent = aIds[ getRandom() * aIds.size() ]; bool bHandled = ImplWindowFrameProc( pSysWin, NULL, nEvent, &aEvent); -/* fprintf( stderr, "Injected menu event %p (%d) '%s' -> %d\n", - aEvent.mpMenu, aEvent.mnId, - OUStringToOString( ((Menu *)aEvent.mpMenu)->GetItemText( aEvent.mnId ), - RTL_TEXTENCODING_UTF8 ).getStr(), - (int)bHandled); */ + SAL_INFO( "vcl.debugevent", + "Injected menu event " << aEvent.mpMenu + << " (" << aEvent.mnId << ") " + << "'" << ((Menu *)aEvent.mpMenu)->GetItemText( aEvent.mnId ) << "'" + << " -> " << bHandled ); } static void InitKeyEvent( SalKeyEvent &rKeyEvent ) @@ -165,8 +164,12 @@ void DebugEventInjector::InjectTextEvent() aKeyEvent.mnCode |= (sal_uInt16)( getRandom() * KEY_MODTYPE ) & KEY_MODTYPE; bool bHandled = ImplWindowFrameProc( pWindow, NULL, SALEVENT_KEYINPUT, &aKeyEvent); -// fprintf( stderr, "Injected key 0x%x -> %d win %p\n", -// (int) aKeyEvent.mnCode, (int)bHandled, pWindow ); + + SAL_INFO( "vcl.debugevent", + "Injected key 0x" << std::hex << (int) aKeyEvent.mnCode << std::dec + << " -> " << bHandled + << " win " << pWindow ); + ImplWindowFrameProc( pWindow, NULL, SALEVENT_KEYUP, &aKeyEvent ); } @@ -245,8 +248,11 @@ void DebugEventInjector::InjectKeyNavEdit() aKeyEvent.mnCharCode = 0x0; // hopefully unused. bool bHandled = ImplWindowFrameProc( pWindow, NULL, SALEVENT_KEYINPUT, &aKeyEvent ); -// fprintf( stderr, "Injected edit / move key 0x%x -> %d win %p\n", -// (int) aKeyEvent.mnCode, (int)bHandled, pWindow ); + + SAL_INFO( "vcl.debugevent", + "Injected edit / move key 0x" << std::hex << (int) aKeyEvent.mnCode << std::dec + << " -> " << bHandled + << " win " << pWindow ); ImplWindowFrameProc( pWindow, NULL, SALEVENT_KEYUP, &aKeyEvent ); } -- cgit