diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-12-12 13:33:14 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-12-13 06:07:57 +0000 |
commit | 81f2a9f46451492d4d879573bc9ac7f2e44abedb (patch) | |
tree | 5090a809dec7d368a376881202417eaee550bfc6 /scripting | |
parent | ba6b35fc68a01aff72b39eb7809bacb326068668 (diff) |
OSL_TRACE->SAL in sc..scripting
Change-Id: I389d8cb733a5ee24d3119a1ebac5a5b70daff04e
Reviewed-on: https://gerrit.libreoffice.org/31900
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'scripting')
-rw-r--r-- | scripting/source/basprov/basprov.cxx | 4 | ||||
-rw-r--r-- | scripting/source/protocolhandler/scripthandler.cxx | 15 | ||||
-rw-r--r-- | scripting/source/provider/BrowseNodeFactoryImpl.cxx | 3 | ||||
-rw-r--r-- | scripting/source/provider/MasterScriptProvider.cxx | 7 | ||||
-rw-r--r-- | scripting/source/provider/ProviderCache.cxx | 2 | ||||
-rw-r--r-- | scripting/source/provider/URIHelper.cxx | 6 | ||||
-rw-r--r-- | scripting/source/vbaevents/eventhelper.cxx | 26 |
7 files changed, 17 insertions, 46 deletions
diff --git a/scripting/source/basprov/basprov.cxx b/scripting/source/basprov/basprov.cxx index 185c4f937692..a166b2cf8efa 100644 --- a/scripting/source/basprov/basprov.cxx +++ b/scripting/source/basprov/basprov.cxx @@ -326,9 +326,7 @@ namespace basprov OUString aLibrary; if ( !sProjectName.isEmpty() && aDescription.match( sProjectName ) ) { - OSL_TRACE("LibraryName %s is part of the url %s", - OUStringToOString( sProjectName, RTL_TEXTENCODING_UTF8 ).getStr(), - OUStringToOString( aDescription, RTL_TEXTENCODING_UTF8 ).getStr() ); + SAL_WARN("scripting", "LibraryName " << sProjectName << " is part of the url " << aDescription ); aLibrary = sProjectName; nIndex = sProjectName.getLength() + 1; } diff --git a/scripting/source/protocolhandler/scripthandler.cxx b/scripting/source/protocolhandler/scripthandler.cxx index 8decdb26671e..2dff3383e348 100644 --- a/scripting/source/protocolhandler/scripthandler.cxx +++ b/scripting/source/protocolhandler/scripthandler.cxx @@ -168,11 +168,10 @@ void SAL_CALL ScriptProtocolHandler::dispatchWithNotification( } catch(RuntimeException & e) { - OSL_TRACE( + SAL_WARN("scripting", "ScriptProtocolHandler::dispatchWithNotification: caught RuntimeException" - "while dispatchFinished with failture of the execution %s", - ::rtl::OUStringToOString( e.Message, - RTL_TEXTENCODING_ASCII_US ).pData->buffer ); + "while dispatchFinished with failture of the execution " + << e.Message ); } } return; @@ -301,11 +300,9 @@ void SAL_CALL ScriptProtocolHandler::dispatchWithNotification( } catch(const RuntimeException & e) { - OSL_TRACE( - "ScriptProtocolHandler::dispatchWithNotification: caught RuntimeException" - "while dispatchFinished %s", - OUStringToOString( e.Message, - RTL_TEXTENCODING_ASCII_US ).pData->buffer ); + SAL_WARN("scripting", + "ScriptProtocolHandler::dispatchWithNotification: caught RuntimeException" + "while dispatchFinished " << e.Message ); } } } diff --git a/scripting/source/provider/BrowseNodeFactoryImpl.cxx b/scripting/source/provider/BrowseNodeFactoryImpl.cxx index 1fb72befc05d..c6481a46d660 100644 --- a/scripting/source/provider/BrowseNodeFactoryImpl.cxx +++ b/scripting/source/provider/BrowseNodeFactoryImpl.cxx @@ -308,8 +308,7 @@ std::vector< Reference< browse::XBrowseNode > > getAllBrowseNodes( const Referen catch( const Exception& e ) { (void)e; - OSL_TRACE("Caught Exception %s", - OUStringToOString( e.Message , RTL_TEXTENCODING_ASCII_US ).pData->buffer ); + SAL_WARN("scripting", "Caught Exception " << e.Message ); locnBNs.resize( mspIndex ); return locnBNs; } diff --git a/scripting/source/provider/MasterScriptProvider.cxx b/scripting/source/provider/MasterScriptProvider.cxx index 764731c2ea2d..6481734c9f48 100644 --- a/scripting/source/provider/MasterScriptProvider.cxx +++ b/scripting/source/provider/MasterScriptProvider.cxx @@ -221,11 +221,8 @@ void MasterScriptProvider::createPkgProvider() catch ( const Exception& e ) { (void)e; - OSL_TRACE("Exception creating MasterScriptProvider for uno_packages in context %s: %s", - OUStringToOString( m_sCtxString, - RTL_TEXTENCODING_ASCII_US ).pData->buffer, - OUStringToOString( e.Message, - RTL_TEXTENCODING_ASCII_US ).pData->buffer ); + SAL_WARN("scripting", "Exception creating MasterScriptProvider for uno_packages in context " + << m_sCtxString << ": " << e.Message ); } } diff --git a/scripting/source/provider/ProviderCache.cxx b/scripting/source/provider/ProviderCache.cxx index 34686b156b1f..57a2f924fbbe 100644 --- a/scripting/source/provider/ProviderCache.cxx +++ b/scripting/source/provider/ProviderCache.cxx @@ -125,7 +125,7 @@ ProviderCache::getAllProviders() throw ( RuntimeException ) } else { - OSL_TRACE("no available providers, something very wrong!!!"); + SAL_WARN("scripting", "no available providers, something very wrong!!!"); } return providers; } diff --git a/scripting/source/provider/URIHelper.cxx b/scripting/source/provider/URIHelper.cxx index 1bf4cf958021..3d51a8fbdb1a 100644 --- a/scripting/source/provider/URIHelper.cxx +++ b/scripting/source/provider/URIHelper.cxx @@ -152,13 +152,13 @@ ScriptingFrameworkURIHelper::initBaseURI() OUString child = children[i]; sal_Int32 idx = child.lastIndexOf(test); - // OSL_TRACE("Trying: %s", PRTSTR(child)); - // OSL_TRACE("idx=%d, testlen=%d, children=%d", + // SAL_WARNx("scripting", "Trying: %s", PRTSTR(child)); + // SAL_WARNx("scripting", "idx=%d, testlen=%d, children=%d", // idx, test.getLength(), child.getLength()); if ( idx != -1 && (idx + test.getLength()) == child.getLength() ) { - // OSL_TRACE("FOUND PATH: %s", PRTSTR(child)); + // SAL_WARNx("scripting", "FOUND PATH: %s", PRTSTR(child)); if ( bAppendScriptsPart ) { m_sBaseURI = child.concat( SCRIPTS_PART ); diff --git a/scripting/source/vbaevents/eventhelper.cxx b/scripting/source/vbaevents/eventhelper.cxx index 7cb345ca389b..44fea79a8609 100644 --- a/scripting/source/vbaevents/eventhelper.cxx +++ b/scripting/source/vbaevents/eventhelper.cxx @@ -811,25 +811,16 @@ bool DenyMouseDrag(const ScriptEvent& evt, void* ) void EventListener::firing_Impl(const ScriptEvent& evt, Any* pRet ) throw(RuntimeException, std::exception) { - OSL_TRACE("EventListener::firing_Impl( FAKE VBA_EVENTS )"); - static const OUString vbaInterOp = - OUString("VBAInterop"); - // let default handlers deal with non vba stuff - if ( !evt.ScriptType.equals( vbaInterOp ) ) + if ( evt.ScriptType != "VBAInterop" ) return; lang::EventObject aEvent; evt.Arguments[ 0 ] >>= aEvent; - OSL_TRACE("evt.MethodName is %s", OUStringToOString( evt.MethodName, RTL_TEXTENCODING_UTF8 ).getStr() ); - OSL_TRACE("Argument[0] is %s", OUStringToOString( comphelper::anyToString( evt.Arguments[0] ), RTL_TEXTENCODING_UTF8 ).getStr() ); - OSL_TRACE("Getting Control"); OUString sName = "UserForm"; - OSL_TRACE("Getting Name"); uno::Reference< awt::XDialog > xDlg( aEvent.Source, uno::UNO_QUERY ); if ( !xDlg.is() ) { - OSL_TRACE("Getting Control"); // evt.Source is // a) Dialog // b) xShapeControl ( from api (sheet control) ) @@ -844,16 +835,13 @@ EventListener::firing_Impl(const ScriptEvent& evt, Any* pRet ) throw(RuntimeExce // api code creates just a control instance that is transferred // via aEvent.Arguments[ 0 ] that control though has no // info like name etc. - OSL_TRACE("Got control shape"); uno::Reference< container::XNamed > xName( xCntrlShape->getControl(), uno::UNO_QUERY_THROW ); - OSL_TRACE("Got xnamed "); sName = xName->getName(); } else { // Userform control ( fired from the api or from event manager ) uno::Reference< beans::XPropertySet > xProps; - OSL_TRACE("Getting properties"); xProps.set( xControl->getModel(), uno::UNO_QUERY_THROW ); xProps->getPropertyValue("Name") >>= sName; } @@ -864,8 +852,7 @@ EventListener::firing_Impl(const ScriptEvent& evt, Any* pRet ) throw(RuntimeExce EventInfoHash::const_iterator it_end = infos.end(); if ( eventInfo_it == it_end ) { - OSL_TRACE("Bogus event for %s", - OUStringToOString( evt.ScriptType, RTL_TEXTENCODING_UTF8 ).getStr() ); + SAL_WARN("scripting", "Bogus event for " << evt.ScriptType ); return; } @@ -906,7 +893,6 @@ EventListener::firing_Impl(const ScriptEvent& evt, Any* pRet ) throw(RuntimeExce sMacroLoc = sMacroLoc.concat( "." ); sMacroLoc = sMacroLoc.concat( sScriptCode ).concat( "." ); - OSL_TRACE("sMacroLoc is %s", OUStringToOString( sMacroLoc, RTL_TEXTENCODING_UTF8 ).getStr() ); for ( ; txInfo != txInfo_end; ++txInfo ) { // If the document is closed, we should not execute macro. @@ -920,8 +906,6 @@ EventListener::firing_Impl(const ScriptEvent& evt, Any* pRet ) throw(RuntimeExce // where ScriptCode is methodname_handlerextension OUString sToResolve = sMacroLoc.concat( sTemp ); - OSL_TRACE("*** trying to invoke %s ", - OUStringToOString( sToResolve, RTL_TEXTENCODING_UTF8 ).getStr() ); ooo::vba::MacroResolvedInfo aMacroResolvedInfo = ooo::vba::resolveVBAMacro( mpShell, sToResolve ); if ( aMacroResolvedInfo.mbFound ) { @@ -947,10 +931,6 @@ EventListener::firing_Impl(const ScriptEvent& evt, Any* pRet ) throw(RuntimeExce // create script url OUString url = aMacroResolvedInfo.msResolvedMacro; - - OSL_TRACE("resolved script = %s", - OUStringToOString( url, - RTL_TEXTENCODING_UTF8 ).getStr() ); try { uno::Any aDummyCaller = uno::makeAny( OUString("Error") ); @@ -966,7 +946,7 @@ EventListener::firing_Impl(const ScriptEvent& evt, Any* pRet ) throw(RuntimeExce } catch ( uno::Exception& e ) { - OSL_TRACE("event script raised %s", OUStringToOString( e.Message, RTL_TEXTENCODING_UTF8 ).getStr() ); + SAL_WARN("scripting", "event script raised " << e.Message ); } } } |