[Libreoffice-commits] .: 2 commits - rsc/source unotools/source
Tor Lillqvist
tml at kemper.freedesktop.org
Thu Jan 27 04:04:10 PST 2011
rsc/source/rsc/rsc.cxx | 8 ++++----
unotools/source/config/configitem.cxx | 5 +++++
unotools/source/config/configmgr.cxx | 5 +++++
3 files changed, 14 insertions(+), 4 deletions(-)
New commits:
commit 0d3ec767f918321f733fdafcf7631d857f8d6598
Author: Tor Lillqvist <tlillqvist at novell.com>
Date: Thu Jan 27 13:57:34 2011 +0200
Do potentially pointless assertions only if dbglevel > 1
diff --git a/unotools/source/config/configitem.cxx b/unotools/source/config/configitem.cxx
index eea1eb7..e26b55c 100644
--- a/unotools/source/config/configitem.cxx
+++ b/unotools/source/config/configitem.cxx
@@ -1324,7 +1324,12 @@ Reference< XHierarchicalNameAccess> ConfigItem::GetTree()
xRet = pImpl->pManager->AcquireTree(*this);
else
xRet = m_xHierarchyAccess;
+#if OSL_DEBUG_LEVEL > 1
+ // I think this is a pointless assertion, the callers seem to cope
+ // fine with returning an invalid reference, no need to crash in a
+ // dbglevel=1 build.
OSL_ENSURE(xRet.is(), "AcquireTree failed");
+#endif
return xRet;
}
diff --git a/unotools/source/config/configmgr.cxx b/unotools/source/config/configmgr.cxx
index c44b889..58c02e4 100644
--- a/unotools/source/config/configmgr.cxx
+++ b/unotools/source/config/configmgr.cxx
@@ -116,7 +116,12 @@ ConfigManager::ConfigManager(Reference< XMultiServiceFactory > xConfigProv) :
ConfigManager::~ConfigManager()
{
//check list content -> should be empty!
+#if OSL_DEBUG_LEVEL > 1
+ // I think this is a pointless assertion, the code seems to cope
+ // fine with it being empty, no need to crash in a dbglevel=1
+ // build.
OSL_ENSURE(pMgrImpl->aItemList.empty(), "some ConfigItems are still alive");
+#endif
if(!pMgrImpl->aItemList.empty())
{
ConfigItemList::iterator aListIter;
commit b15b82d963c800014f578f9f0e2d002e091b996b
Author: Tor Lillqvist <tlillqvist at novell.com>
Date: Thu Jan 27 13:54:17 2011 +0200
Revert "Be less verbose when dbglevel <= 2"
I had misunderstood. dbglevel=1 is the "normal" debugging level for
when you want to be able to debug, and dbglevel=2 *is* the one to also
get verbose debugging output.
This reverts commit 0bc3445ae06919e9cf057b98b6d29981e6c2ef91.
diff --git a/rsc/source/rsc/rsc.cxx b/rsc/source/rsc/rsc.cxx
index dd4dc87..2a53501 100644
--- a/rsc/source/rsc/rsc.cxx
+++ b/rsc/source/rsc/rsc.cxx
@@ -148,7 +148,7 @@ RscCmdLine::RscCmdLine( int argc, char ** argv, RscError * pEH )
i = 1;
while( ppStr && i < (aCmdLine.GetCount() -1) )
{
-#if OSL_DEBUG_LEVEL > 2
+#if OSL_DEBUG_LEVEL > 1
fprintf( stderr, "CmdLineArg: \"%s\"\n", *ppStr );
#endif
if( '-' == **ppStr )
@@ -888,7 +888,7 @@ ERRTYPE RscCompiler::Link()
aSysSearchPath.Append( cSearchDelim );
aSysSearchPath.Append( aToken );
}
-#if OSL_DEBUG_LEVEL > 2
+#if OSL_DEBUG_LEVEL > 1
fprintf( stderr, "setting search path for language %s: %s\n", it->aLangName.GetBuffer(), aSysSearchPath.GetBuffer() );
#endif
pTC->SetSysSearchPath( aSysSearchPath );
@@ -1133,7 +1133,7 @@ bool RscCompiler::GetImageFilePath( const RscCmdLine::OutputFile& rOutputFile,
aAbsPath.ToAbs();
const FileStat aFS( aAbsPath.GetFull() );
-#if OSL_DEBUG_LEVEL > 2
+#if OSL_DEBUG_LEVEL > 1
fprintf( stderr, "Searching image: %s\n", ByteString( aRelPath.GetFull(), RTL_TEXTENCODING_ASCII_US ).GetBuffer() );
#endif
@@ -1177,7 +1177,7 @@ bool RscCompiler::GetImageFilePath( const RscCmdLine::OutputFile& rOutputFile,
fprintf( pSysListFile, "%s\n", rContext.pCmdLine->substitutePaths( aSysPathStr ).getStr() );
}
-#if OSL_DEBUG_LEVEL > 2
+#if OSL_DEBUG_LEVEL > 1
fprintf( stderr, "ImagePath to add: %s\n", rImagePath.GetBuffer() );
#endif
}
More information about the Libreoffice-commits
mailing list