[PATCH] Removal VERBOSE
Rob Snelders
programming at ertai.nl
Wed Apr 4 10:57:05 PDT 2012
---
.../configuration/ChangeRequestQueueProcessor.cxx | 29 ++++--------
.../ui/framework/configuration/Configuration.cxx | 18 +++-----
.../configuration/ConfigurationClassifier.cxx | 24 +++--------
.../configuration/ConfigurationController.cxx | 32 ++++----------
.../ConfigurationControllerResourceManager.cxx | 47 ++++++++------------
.../configuration/ConfigurationUpdater.cxx | 43 ++++++------------
sd/source/ui/framework/module/ModuleController.cxx | 15 +-----
sd/source/ui/tools/TimerBasedTaskExecution.cxx | 15 ++-----
sd/source/ui/view/ToolBarManager.cxx | 8 +---
9 files changed, 72 insertions(+), 159 deletions(-)
diff --git a/sd/source/ui/framework/configuration/ChangeRequestQueueProcessor.cxx b/sd/source/ui/framework/configuration/ChangeRequestQueueProcessor.cxx
index 92982b7..cbefb08 100644
--- a/sd/source/ui/framework/configuration/ChangeRequestQueueProcessor.cxx
+++ b/sd/source/ui/framework/configuration/ChangeRequestQueueProcessor.cxx
@@ -42,18 +42,15 @@ using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::drawing::framework;
-#undef VERBOSE
-//#define VERBOSE 1
-
namespace {
-#ifdef VERBOSE
+#if OSL_DEBUG_LEVEL > 0
void TraceRequest (const Reference<XConfigurationChangeRequest>& rxRequest)
{
Reference<container::XNamed> xNamed (rxRequest, UNO_QUERY);
if (xNamed.is())
- OSL_TRACE(" %s\n",
+ SAL_INFO("sd.fwk", OSL_THIS_FUNC << ": " <<
::rtl::OUStringToOString(xNamed->getName(), RTL_TEXTENCODING_UTF8).getStr());
}
@@ -105,14 +102,14 @@ void ChangeRequestQueueProcessor::AddRequest (
{
::osl::MutexGuard aGuard (maMutex);
-#ifdef VERBOSE
+#if OSL_DEBUG_LEVEL >= 2
if (maQueue.empty())
{
- OSL_TRACE("Adding requests to empty queue");
+ SAL_INFO("sd.fwk", OSL_THIS_FUNC << ": Adding requests to empty queue");
ConfigurationTracer::TraceConfiguration(
mxConfiguration, "current configuration of queue processor");
}
- OSL_TRACE("Adding request");
+ SAL_INFO("sd.fwk", OSL_THIS_FUNC << ": Adding request");
TraceRequest(rxRequest);
#endif
@@ -131,9 +128,7 @@ void ChangeRequestQueueProcessor::StartProcessing (void)
&& mxConfiguration.is()
&& ! maQueue.empty())
{
-#ifdef VERBOSE
- OSL_TRACE("ChangeRequestQueueProcessor scheduling processing");
-#endif
+ SAL_INFO("sd.fwk", OSL_THIS_FUNC << ": ChangeRequestQueueProcessor scheduling processing");
mnUserEventId = Application::PostUserEvent(
LINK(this,ChangeRequestQueueProcessor,ProcessEvent));
}
@@ -168,9 +163,7 @@ void ChangeRequestQueueProcessor::ProcessOneEvent (void)
{
::osl::MutexGuard aGuard (maMutex);
-#ifdef VERBOSE
- OSL_TRACE("ProcessOneEvent");
-#endif
+ SAL_INFO("sd.fwk", OSL_THIS_FUNC << ": ProcessOneEvent");
if (mxConfiguration.is()
&& ! maQueue.empty())
@@ -182,7 +175,7 @@ void ChangeRequestQueueProcessor::ProcessOneEvent (void)
// Execute the change request.
if (xRequest.is())
{
-#ifdef VERBOSE
+#if OSL_DEBUG_LEVEL >= 2
TraceRequest(xRequest);
#endif
xRequest->execute(mxConfiguration);
@@ -190,14 +183,12 @@ void ChangeRequestQueueProcessor::ProcessOneEvent (void)
if (maQueue.empty())
{
-#ifdef VERBOSE
- OSL_TRACE("All requests are processed");
-#endif
+ SAL_INFO("sd.fwk", OSL_THIS_FUNC << ": All requests are processed");
// The queue is empty so tell the ConfigurationManager to update
// its state.
if (mpConfigurationUpdater.get() != NULL)
{
-#ifdef VERBOSE
+#if OSL_DEBUG_LEVEL >= 2
ConfigurationTracer::TraceConfiguration (
mxConfiguration, "updating to configuration");
#endif
diff --git a/sd/source/ui/framework/configuration/Configuration.cxx b/sd/source/ui/framework/configuration/Configuration.cxx
index 16b25eb..0e01cc9 100644
--- a/sd/source/ui/framework/configuration/Configuration.cxx
+++ b/sd/source/ui/framework/configuration/Configuration.cxx
@@ -40,8 +40,6 @@ using namespace ::com::sun::star::drawing::framework;
using ::sd::framework::FrameworkHelper;
using ::rtl::OUString;
-#undef VERBOSE
-
namespace {
/** Use the XResourceId::compareTo() method to implement a compare operator
for STL containers.
@@ -163,11 +161,9 @@ void SAL_CALL Configuration::addResource (const Reference<XResourceId>& rxResour
if (mpResourceContainer->find(rxResourceId) == mpResourceContainer->end())
{
-#ifdef VERBOSE
- OSL_TRACE("Configuration::addResource() %s",
- OUStringToOString(
- FrameworkHelper::ResourceIdToString(rxResourceId), RTL_TEXTENCODING_UTF8).getStr());
-#endif
+ SAL_INFO("sd.fwk", OSL_THIS_FUNC << ": Configuration::addResource() " <<
+ OUStringToOString(
+ FrameworkHelper::ResourceIdToString(rxResourceId), RTL_TEXTENCODING_UTF8).getStr());
mpResourceContainer->insert(rxResourceId);
PostEvent(rxResourceId, true);
}
@@ -187,11 +183,9 @@ void SAL_CALL Configuration::removeResource (const Reference<XResourceId>& rxRes
ResourceContainer::iterator iResource (mpResourceContainer->find(rxResourceId));
if (iResource != mpResourceContainer->end())
{
-#ifdef VERBOSE
- OSL_TRACE("Configuration::removeResource() %s",
- OUStringToOString(
- FrameworkHelper::ResourceIdToString(rxResourceId), RTL_TEXTENCODING_UTF8).getStr());
-#endif
+ SAL_INFO("sd.fwk", OSL_THIS_FUNC << ": Configuration::removeResource() " <<
+ OUStringToOString(
+ FrameworkHelper::ResourceIdToString(rxResourceId), RTL_TEXTENCODING_UTF8).getStr());
PostEvent(rxResourceId,false);
mpResourceContainer->erase(iResource);
}
diff --git a/sd/source/ui/framework/configuration/ConfigurationClassifier.cxx b/sd/source/ui/framework/configuration/ConfigurationClassifier.cxx
index 40fab0a..37a3b47 100644
--- a/sd/source/ui/framework/configuration/ConfigurationClassifier.cxx
+++ b/sd/source/ui/framework/configuration/ConfigurationClassifier.cxx
@@ -36,10 +36,6 @@ using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::drawing::framework;
using ::rtl::OUString;
-#undef VERBOSE
-//#define VERBOSE 2
-
-
namespace sd { namespace framework {
ConfigurationClassifier::ConfigurationClassifier (
@@ -110,13 +106,9 @@ void ConfigurationClassifier::PartitionResources (
aC2minusC1,
aC1andC2);
-#if defined VERBOSE && VERBOSE >= 2
- OSL_TRACE("copying resource ids to C1-C2\r");
-#endif
+ SAL_INFO("sd.fwk", OSL_THIS_FUNC << ": copying resource ids to C1-C2");
CopyResources(aC1minusC2, mxConfiguration1, maC1minusC2);
-#if defined VERBOSE && VERBOSE >= 2
- OSL_TRACE("copying resource ids to C2-C1\r");
-#endif
+ SAL_INFO("sd.fwk", OSL_THIS_FUNC << ": copying resource ids to C2-C1");
CopyResources(aC2minusC1, mxConfiguration2, maC2minusC1);
// Process the unique resources that belong to both configurations.
@@ -199,21 +191,17 @@ void ConfigurationClassifier::CopyResources (
rTarget.reserve(rTarget.size() + 1 + nL);
rTarget.push_back(*iResource);
-#if defined VERBOSE && VERBOSE >= 2
- OSL_TRACE(" copying %s\r",
+ SAL_INFO("sd.fwk", OSL_THIS_FUNC << ": copying " <<
OUStringToOString(FrameworkHelper::ResourceIdToString(*iResource),
RTL_TEXTENCODING_UTF8).getStr());
-#endif
const Reference<XResourceId>* aA = aBoundResources.getConstArray();
for (sal_Int32 i=0; i<nL; ++i)
{
rTarget.push_back(aA[i]);
-#if defined VERBOSE && VERBOSE >= 2
- OSL_TRACE(" copying %s\r",
+ SAL_INFO("sd.fwk", OSL_THIS_FUNC << ": copying " <<
OUStringToOString(FrameworkHelper::ResourceIdToString(aA[i]),
RTL_TEXTENCODING_UTF8).getStr());
-#endif
}
}
}
@@ -224,12 +212,12 @@ void ConfigurationClassifier::TraceResourceIdVector (
const ResourceIdVector& rResources) const
{
- OSL_TRACE(pMessage);
+ SAL_INFO("sd.fwk", OSL_THIS_FUNC << ": " << pMessage);
ResourceIdVector::const_iterator iResource;
for (iResource=rResources.begin(); iResource!=rResources.end(); ++iResource)
{
OUString sResource (FrameworkHelper::ResourceIdToString(*iResource));
- OSL_TRACE(" %s\r",
+ SAL_INFO("sd.fwk", OSL_THIS_FUNC << ": " <<
OUStringToOString(sResource, RTL_TEXTENCODING_UTF8).getStr());
}
}
diff --git a/sd/source/ui/framework/configuration/ConfigurationController.cxx b/sd/source/ui/framework/configuration/ConfigurationController.cxx
index 617de84..5bfec32 100644
--- a/sd/source/ui/framework/configuration/ConfigurationController.cxx
+++ b/sd/source/ui/framework/configuration/ConfigurationController.cxx
@@ -52,10 +52,6 @@ using namespace ::com::sun::star::drawing::framework;
using rtl::OUString;
using ::sd::framework::FrameworkHelper;
-#undef VERBOSE
-//#define VERBOSE 3
-
-
namespace sd { namespace framework {
Reference<XInterface> SAL_CALL ConfigurationController_createInstance (
@@ -180,18 +176,14 @@ void SAL_CALL ConfigurationController::disposing (void)
if (mpImplementation.get() == NULL)
return;
-#if defined VERBOSE && VERBOSE>=1
- OSL_TRACE("ConfigurationController::disposing");
- OSL_TRACE(" requesting empty configuration\n");
-#endif
+ SAL_INFO("sd.fwk", OSL_THIS_FUNC << ": ConfigurationController::disposing");
+ SAL_INFO("sd.fwk", OSL_THIS_FUNC << ": requesting empty configuration");
// To destroy all resources an empty configuration is requested and then,
// synchronously, all resulting requests are processed.
mpImplementation->mpQueueProcessor->Clear();
restoreConfiguration(new Configuration(this,false));
mpImplementation->mpQueueProcessor->ProcessUntilEmpty();
-#if defined VERBOSE && VERBOSE>=1
- OSL_TRACE(" all requests processed");
-#endif
+ SAL_INFO("sd.fwk", OSL_THIS_FUNC << ": all requests processed");
// Now that all resources have been deactivated, mark the controller as
// disposed.
@@ -337,19 +329,15 @@ void SAL_CALL ConfigurationController::requestResourceActivation (
// we just return silently during that stage.
if (rBHelper.bInDispose)
{
-#if defined VERBOSE && VERBOSE>=1
- OSL_TRACE("ConfigurationController::requestResourceActivation(): ignoring %s\n",
+ SAL_INFO("sd.fwk", OSL_THIS_FUNC << ": ConfigurationController::requestResourceActivation(): ignoring " <<
OUStringToOString(
FrameworkHelper::ResourceIdToString(rxResourceId), RTL_TEXTENCODING_UTF8).getStr());
-#endif
return;
}
-#if defined VERBOSE && VERBOSE>=2
- OSL_TRACE("ConfigurationController::requestResourceActivation() %s\n",
+ SAL_INFO("sd.fwk", OSL_THIS_FUNC << ": ConfigurationController::requestResourceActivation() " <<
OUStringToOString(
FrameworkHelper::ResourceIdToString(rxResourceId), RTL_TEXTENCODING_UTF8).getStr());
-#endif
if (rxResourceId.is())
{
@@ -395,11 +383,9 @@ void SAL_CALL ConfigurationController::requestResourceDeactivation (
::osl::MutexGuard aGuard (maMutex);
ThrowIfDisposed();
-#if defined VERBOSE && VERBOSE>=2
- OSL_TRACE("ConfigurationController::requestResourceDeactivation() %s\n",
+ SAL_INFO("sd.fwk", OSL_THIS_FUNC << ": ConfigurationController::requestResourceDeactivation() " <<
OUStringToOString(
FrameworkHelper::ResourceIdToString(rxResourceId), RTL_TEXTENCODING_UTF8).getStr());
-#endif
if (rxResourceId.is())
{
@@ -545,14 +531,14 @@ void SAL_CALL ConfigurationController::restoreConfiguration (
// Get lists of resources that are to be activated or deactivated.
Reference<XConfiguration> xCurrentConfiguration (mpImplementation->mxRequestedConfiguration);
-#if defined VERBOSE && VERBOSE>=1
- OSL_TRACE("ConfigurationController::restoreConfiguration(");
+#if OSL_DEBUG_LEVEL >=1
+ SAL_INFO("sd.fwk", OSL_THIS_FUNC << ": ConfigurationController::restoreConfiguration(");
ConfigurationTracer::TraceConfiguration(rxNewConfiguration, "requested configuration");
ConfigurationTracer::TraceConfiguration(xCurrentConfiguration, "current configuration");
#endif
ConfigurationClassifier aClassifier (rxNewConfiguration, xCurrentConfiguration);
aClassifier.Partition();
-#if defined VERBOSE && VERBOSE>=3
+#if OSL_DEBUG_LEVEL >=2
aClassifier.TraceResourceIdVector(
"requested but not current resources:\n", aClassifier.GetC1minusC2());
aClassifier.TraceResourceIdVector(
diff --git a/sd/source/ui/framework/configuration/ConfigurationControllerResourceManager.cxx b/sd/source/ui/framework/configuration/ConfigurationControllerResourceManager.cxx
index f2b2353..82fac32 100644
--- a/sd/source/ui/framework/configuration/ConfigurationControllerResourceManager.cxx
+++ b/sd/source/ui/framework/configuration/ConfigurationControllerResourceManager.cxx
@@ -41,9 +41,6 @@ using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::drawing::framework;
using ::rtl::OUString;
-#undef VERBOSE
-//#define VERBOSE 1
-
namespace sd { namespace framework {
//===== ConfigurationControllerResourceManager ================================
@@ -136,20 +133,16 @@ void ConfigurationControllerResourceManager::ActivateResource (
return;
}
-#if defined VERBOSE && VERBOSE>=1
- OSL_TRACE("activating resource %s\n", OUStringToOString(
+ SAL_INFO("sd.fwk", OSL_THIS_FUNC << ": activating resource " << OUStringToOString(
FrameworkHelper::ResourceIdToString(rxResourceId), RTL_TEXTENCODING_UTF8).getStr());
-#endif
// 1. Get the factory.
const OUString sResourceURL (rxResourceId->getResourceURL());
Reference<XResourceFactory> xFactory (mpResourceFactoryContainer->GetFactory(sResourceURL));
if ( ! xFactory.is())
{
-#if defined VERBOSE && VERBOSE>=1
- OSL_TRACE(" no factory found fo %s\n",
+ SAL_INFO("sd.fwk", OSL_THIS_FUNC << ": no factory found for " <<
OUStringToOString(sResourceURL, RTL_TEXTENCODING_UTF8).getStr());
-#endif
return;
}
@@ -174,9 +167,7 @@ void ConfigurationControllerResourceManager::ActivateResource (
if (xResource.is())
{
-#if defined VERBOSE && VERBOSE>=1
- OSL_TRACE(" successfully created");
-#endif
+ SAL_INFO("sd.fwk", OSL_THIS_FUNC << ": successfully created");
// 3. Add resource to URL->Object map.
AddResource(xResource, xFactory);
@@ -191,9 +182,7 @@ void ConfigurationControllerResourceManager::ActivateResource (
}
else
{
-#if defined VERBOSE && VERBOSE>=1
- OSL_TRACE(" resource creation failed");
-#endif
+ SAL_INFO("sd.fwk", OSL_THIS_FUNC << ": resource creation failed");
}
}
catch (RuntimeException&)
@@ -219,7 +208,7 @@ void ConfigurationControllerResourceManager::DeactivateResource (
if ( ! rxResourceId.is())
return;
-#if defined VERBOSE && VERBOSE>=1
+#if OSL_DEBUG_LEVEL >= 1
bool bSuccess (false);
#endif
try
@@ -255,7 +244,7 @@ void ConfigurationControllerResourceManager::DeactivateResource (
}
}
-#if defined VERBOSE && VERBOSE>=1
+#if OSL_DEBUG_LEVEL >= 1
bSuccess = true;
#endif
}
@@ -265,13 +254,14 @@ void ConfigurationControllerResourceManager::DeactivateResource (
DBG_UNHANDLED_EXCEPTION();
}
-#if defined VERBOSE && VERBOSE>=1
+#if OSL_DEBUG_LEVEL >= 1
if (bSuccess)
- OSL_TRACE("successfully deactivated %s\n", OUStringToOString(
+ SAL_INFO("sd.fwk", OSL_THIS_FUNC << ": successfully deactivated " << OUStringToOString(
FrameworkHelper::ResourceIdToString(rxResourceId), RTL_TEXTENCODING_UTF8).getStr());
else
- OSL_TRACE("activating resource %s failed\n", OUStringToOString(
- FrameworkHelper::ResourceIdToString(rxResourceId), RTL_TEXTENCODING_UTF8).getStr());
+ SAL_INFO("sd.fwk", OSL_THIS_FUNC << ": activating resource " << OUStringToOString(
+ FrameworkHelper::ResourceIdToString(rxResourceId), RTL_TEXTENCODING_UTF8).getStr()
+ << " failed");
#endif
}
@@ -294,12 +284,11 @@ void ConfigurationControllerResourceManager::AddResource (
aDescriptor.mxResourceFactory = rxFactory;
maResourceMap[rxResource->getResourceId()] = aDescriptor;
-#if defined VERBOSE && VERBOSE>=2
- OSL_TRACE("ConfigurationControllerResourceManager::AddResource(): added %s -> %x\n",
+#if OSL_DEBUG_LEVEL >= 2
+ SAL_INFO("sd.fwk", OSL_THIS_FUNC << ": ConfigurationControllerResourceManager::AddResource(): added " <<
OUStringToOString(
FrameworkHelper::ResourceIdToString(rxResource->getResourceId()),
- RTL_TEXTENCODING_UTF8).getStr(),
- rxResource.get());
+ RTL_TEXTENCODING_UTF8).getStr() << " -> " << rxResource.get());
#endif
}
@@ -315,12 +304,12 @@ ConfigurationControllerResourceManager::ResourceDescriptor
ResourceMap::iterator iResource (maResourceMap.find(rxResourceId));
if (iResource != maResourceMap.end())
{
-#if defined VERBOSE && VERBOSE>=2
- OSL_TRACE("ConfigurationControllerResourceManager::RemoveResource(): removing %s -> %x\n",
+#if OSL_DEBUG_LEVEL >= 2
+ SAL_INFO("sd.fwk", OSL_THIS_FUNC << ": ConfigurationControllerResourceManager::RemoveResource(): removing " <<
OUStringToOString(
FrameworkHelper::ResourceIdToString(rxResourceId),
- RTL_TEXTENCODING_UTF8).getStr(),
- *iResource);
+ RTL_TEXTENCODING_UTF8).getStr() <<
+ " -> " << &iResource);
#endif
aDescriptor = iResource->second;
diff --git a/sd/source/ui/framework/configuration/ConfigurationUpdater.cxx b/sd/source/ui/framework/configuration/ConfigurationUpdater.cxx
index a691b77..6e20c73 100644
--- a/sd/source/ui/framework/configuration/ConfigurationUpdater.cxx
+++ b/sd/source/ui/framework/configuration/ConfigurationUpdater.cxx
@@ -46,9 +46,6 @@ using ::sd::framework::FrameworkHelper;
using ::rtl::OUString;
using ::std::vector;
-#undef VERBOSE
-//#define VERBOSE 2
-
namespace {
static const sal_Int32 snShortTimeout (100);
static const sal_Int32 snNormalTimeout (1000);
@@ -128,9 +125,7 @@ void ConfigurationUpdater::RequestUpdate (
// Find out whether we really can update the configuration.
if (IsUpdatePossible())
{
-#if defined VERBOSE && VERBOSE>=1
- OSL_TRACE("UpdateConfiguration start");
-#endif
+ SAL_INFO("sd.fwk", OSL_THIS_FUNC << ": UpdateConfiguration start");
// Call UpdateConfiguration while that is possible and while someone
// set mbUpdatePending to true in the middle of it.
@@ -146,9 +141,7 @@ void ConfigurationUpdater::RequestUpdate (
else
{
mbUpdatePending = true;
-#if defined VERBOSE && VERBOSE>=1
- OSL_TRACE("scheduling update for later");
-#endif
+ SAL_INFO("sd.fwk", OSL_THIS_FUNC << ": scheduling update for later");
}
}
@@ -177,9 +170,7 @@ bool ConfigurationUpdater::IsUpdatePossible (void)
void ConfigurationUpdater::UpdateConfiguration (void)
{
-#if defined VERBOSE && VERBOSE>=1
- OSL_TRACE("UpdateConfiguration update");
-#endif
+ SAL_INFO("sd.fwk", OSL_THIS_FUNC << ": UpdateConfiguration update");
SetUpdateBeingProcessed(true);
comphelper::ScopeGuard aScopeGuard (
::boost::bind(&ConfigurationUpdater::SetUpdateBeingProcessed, this, false));
@@ -192,8 +183,8 @@ void ConfigurationUpdater::UpdateConfiguration (void)
ConfigurationClassifier aClassifier(mxRequestedConfiguration, mxCurrentConfiguration);
if (aClassifier.Partition())
{
-#if defined VERBOSE && VERBOSE>=2
- OSL_TRACE("ConfigurationUpdater::UpdateConfiguration(");
+#if OSL_DEBUG_LEVEL >= 2
+ SAL_INFO("sd.fwk", OSL_THIS_FUNC << ": ConfigurationUpdater::UpdateConfiguration(");
ConfigurationTracer::TraceConfiguration(
mxRequestedConfiguration, "requested configuration");
ConfigurationTracer::TraceConfiguration(
@@ -224,15 +215,13 @@ void ConfigurationUpdater::UpdateConfiguration (void)
}
else
{
-#if defined VERBOSE && VERBOSE>0
- OSL_TRACE("nothing to do");
-#if defined VERBOSE && VERBOSE>=2
+ SAL_INFO("sd.fwk", OSL_THIS_FUNC << ": nothing to do");
+#if OSL_DEBUG_LEVEL >= 2
ConfigurationTracer::TraceConfiguration(
mxRequestedConfiguration, "requested configuration");
ConfigurationTracer::TraceConfiguration(
mxCurrentConfiguration, "current configuration");
#endif
-#endif
}
}
catch(const RuntimeException &)
@@ -240,10 +229,8 @@ void ConfigurationUpdater::UpdateConfiguration (void)
DBG_UNHANDLED_EXCEPTION();
}
-#if defined VERBOSE && VERBOSE>0
- OSL_TRACE("ConfigurationUpdater::UpdateConfiguration)");
- OSL_TRACE("UpdateConfiguration end");
-#endif
+ SAL_INFO("sd.fwk", OSL_THIS_FUNC << ": ConfigurationUpdater::UpdateConfiguration)");
+ SAL_INFO("sd.fwk", OSL_THIS_FUNC << ": UpdateConfiguration end");
}
@@ -300,7 +287,7 @@ void ConfigurationUpdater::UpdateCore (const ConfigurationClassifier& rClassifie
{
try
{
-#if defined VERBOSE && VERBOSE>=2
+#if OSL_DEBUG_LEVEL >= 2
rClassifier.TraceResourceIdVector(
"requested but not current resources:", rClassifier.GetC1minusC2());
rClassifier.TraceResourceIdVector(
@@ -316,8 +303,8 @@ void ConfigurationUpdater::UpdateCore (const ConfigurationClassifier& rClassifie
mpResourceManager->DeactivateResources(rClassifier.GetC2minusC1(), mxCurrentConfiguration);
mpResourceManager->ActivateResources(rClassifier.GetC1minusC2(), mxCurrentConfiguration);
-#if defined VERBOSE && VERBOSE>=2
- OSL_TRACE("ConfigurationController::UpdateConfiguration)");
+#if OSL_DEBUG_LEVEL >= 2
+ SAL_INFO("sd.fwk", OSL_THIS_FUNC << ": ConfigurationController::UpdateConfiguration)");
ConfigurationTracer::TraceConfiguration(
mxRequestedConfiguration, "requested configuration");
ConfigurationTracer::TraceConfiguration(
@@ -392,12 +379,10 @@ void ConfigurationUpdater::CheckPureAnchors (
if (bDeactiveCurrentResource)
{
-#if defined VERBOSE && VERBOSE>=2
- OSL_TRACE("deactiving pure anchor %s because it has no children",
+ SAL_INFO("sd.fwk", OSL_THIS_FUNC << ": deactiving pure anchor " <<
OUStringToOString(
FrameworkHelper::ResourceIdToString(xResourceId),
- RTL_TEXTENCODING_UTF8).getStr());
-#endif
+ RTL_TEXTENCODING_UTF8).getStr() << "because it has no children");
// Erase element from current configuration.
for (sal_Int32 nI=nIndex; nI<nCount-2; ++nI)
aResources[nI] = aResources[nI+1];
diff --git a/sd/source/ui/framework/module/ModuleController.cxx b/sd/source/ui/framework/module/ModuleController.cxx
index ba2e2b4..98216e5 100644
--- a/sd/source/ui/framework/module/ModuleController.cxx
+++ b/sd/source/ui/framework/module/ModuleController.cxx
@@ -43,9 +43,6 @@ using namespace ::com::sun::star::drawing::framework;
using ::rtl::OUString;
using ::sd::tools::ConfigurationAccess;
-#undef VERBOSE
-//#define VERBOSE 2
-
namespace sd { namespace framework {
static const sal_uInt32 snFactoryPropertyCount (2);
@@ -197,20 +194,16 @@ void ModuleController::ProcessFactory (const ::std::vector<Any>& rValues)
OUString(RTL_CONSTASCII_USTRINGPARAM("URL")),
aURLs);
-#if defined VERBOSE && VERBOSE>0
- OSL_TRACE("ModuleController::adding factory %s",
+ SAL_INFO("sd.fwk", OSL_THIS_FUNC << ": ModuleController::adding factory " <<
OUStringToOString(sServiceName, RTL_TEXTENCODING_UTF8).getStr());
-#endif
// Add the resource URLs to the map.
::std::vector<rtl::OUString>::const_iterator iResource;
for (iResource=aURLs.begin(); iResource!=aURLs.end(); ++iResource)
{
(*mpResourceToFactoryMap)[*iResource] = sServiceName;
-#if defined VERBOSE && VERBOSE>1
- OSL_TRACE(" %s",
+ SAL_INFO("sd.fwk", OSL_THIS_FUNC << ": " <<
OUStringToOString(*iResource, RTL_TEXTENCODING_UTF8).getStr());
-#endif
}
}
@@ -268,10 +261,8 @@ void ModuleController::ProcessStartupService (const ::std::vector<Any>& rValues)
// at the configuration controller.
xGlobalFactory->createInstanceWithArguments(sServiceName, aArguments);
-#if defined VERBOSE && VERBOSE>0
- OSL_TRACE("ModuleController::created startup service %s",
+ SAL_INFO("sd.fwk", OSL_THIS_FUNC << ": ModuleController::created startup service " <<
OUStringToOString(sServiceName, RTL_TEXTENCODING_UTF8).getStr());
-#endif
}
}
catch (Exception&)
diff --git a/sd/source/ui/tools/TimerBasedTaskExecution.cxx b/sd/source/ui/tools/TimerBasedTaskExecution.cxx
index 33812c9..69f3a04 100644
--- a/sd/source/ui/tools/TimerBasedTaskExecution.cxx
+++ b/sd/source/ui/tools/TimerBasedTaskExecution.cxx
@@ -32,8 +32,7 @@
#include <tools/time.hxx>
#include <osl/diagnose.h>
#include <boost/weak_ptr.hpp>
-
-#undef VERBOSE
+#include "sal/log.hxx"
namespace sd { namespace tools {
@@ -148,23 +147,17 @@ IMPL_LINK_NOARG(TimerBasedTaskExecution, TimerCallback)
// mnMaxTimePerStep. Note that the last step may take longer
// than allowed.
sal_uInt32 nStartTime (Time( Time::SYSTEM ).GetMSFromTime());
-#ifdef VERBOSE
- OSL_TRACE("starting TimerBasedTaskExecution at %d", nStartTime);
-#endif
+ SAL_INFO("sd.tools", OSL_THIS_FUNC << ": starting TimerBasedTaskExecution at " << nStartTime);
do
{
mpTask->RunNextStep();
sal_uInt32 nDuration (Time( Time::SYSTEM ).GetMSFromTime()-nStartTime);
-#ifdef VERBOSE
- OSL_TRACE("executed step in %d", nDuration);
-#endif
+ SAL_INFO("sd.tools", OSL_THIS_FUNC << ": executed step in " << nDuration);
if (nDuration > mnMaxTimePerStep)
break;
}
while (mpTask->HasNextStep());
-#ifdef VERBOSE
- OSL_TRACE("TimerBasedTaskExecution sleeping");
-#endif
+ SAL_INFO("sd.tools", OSL_THIS_FUNC << ": TimerBasedTaskExecution sleeping");
maTimer.Start();
}
else
diff --git a/sd/source/ui/view/ToolBarManager.cxx b/sd/source/ui/view/ToolBarManager.cxx
index d3aff93..be97fd9 100644
--- a/sd/source/ui/view/ToolBarManager.cxx
+++ b/sd/source/ui/view/ToolBarManager.cxx
@@ -1643,9 +1643,7 @@ void ToolBarShellList::UpdateShells (
std::insert_iterator<GroupedShellList>(aList,aList.begin()));
for (GroupedShellList::iterator iShell=aList.begin(); iShell!=aList.end(); ++iShell)
{
-#ifdef VERBOSE
- OSL_TRACE("deactivating tool bar shell %d", iShell->mnId);
-#endif
+ SAL_INFO("sd.view", OSL_THIS_FUNC << ": deactivating tool bar shell " << iShell->mnId);
rpManager->DeactivateSubShell(*rpMainViewShell, iShell->mnId);
}
@@ -1657,9 +1655,7 @@ void ToolBarShellList::UpdateShells (
std::insert_iterator<GroupedShellList>(aList,aList.begin()));
for (GroupedShellList::iterator iShell=aList.begin(); iShell!=aList.end(); ++iShell)
{
-#ifdef VERBOSE
- OSL_TRACE("activating tool bar shell %d", iShell->mnId);
-#endif
+ SAL_INFO("sd.view", OSL_THIS_FUNC << ": activating tool bar shell " << iShell->mnId);
rpManager->ActivateSubShell(*rpMainViewShell, iShell->mnId);
}
--
1.7.5.4
--------------010407010003040908060009--
More information about the LibreOffice
mailing list