[Libreoffice-commits] .: 3 commits - basic/source sfx2/source ucb/source
Caolán McNamara
caolan at kemper.freedesktop.org
Wed Aug 3 02:35:48 PDT 2011
basic/source/basmgr/basicmanagerrepository.cxx | 7 ++++++-
sfx2/source/doc/oleprops.cxx | 6 +++++-
ucb/source/core/ucb.cxx | 6 +++---
ucb/source/core/ucbstore.cxx | 23 +++++------------------
4 files changed, 19 insertions(+), 23 deletions(-)
New commits:
commit b749f0520353c901954cb337c9cc9aa726dc63cd
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Aug 3 09:42:00 2011 +0100
make these less noisy
diff --git a/ucb/source/core/ucb.cxx b/ucb/source/core/ucb.cxx
index 73dca16..3d45cde 100644
--- a/ucb/source/core/ucb.cxx
+++ b/ucb/source/core/ucb.cxx
@@ -790,7 +790,7 @@ bool UniversalContentBroker::configureUcb()
ContentProviderDataList aData;
if (!getContentProviderData(aKey1, aKey2, aData))
{
- OSL_FAIL("UniversalContentBroker::configureUcb(): No configuration");
+ OSL_TRACE("UniversalContentBroker::configureUcb(): No configuration");
return false;
}
@@ -916,14 +916,14 @@ bool UniversalContentBroker::getContentProviderData(
}
catch (const uno::RuntimeException&)
{
- OSL_FAIL( "UniversalContentBroker::getContentProviderData - caught RuntimeException!" );
+ OSL_TRACE( "UniversalContentBroker::getContentProviderData - caught RuntimeException!" );
return false;
}
catch (const uno::Exception&)
{
// createInstance, createInstanceWithArguments
- OSL_FAIL( "UniversalContentBroker::getContentProviderData - caught Exception!" );
+ OSL_TRACE( "UniversalContentBroker::getContentProviderData - caught Exception!" );
return false;
}
diff --git a/ucb/source/core/ucbstore.cxx b/ucb/source/core/ucbstore.cxx
index e9b341b..7cc46ab 100644
--- a/ucb/source/core/ucbstore.cxx
+++ b/ucb/source/core/ucbstore.cxx
@@ -519,7 +519,7 @@ PropertySetRegistry::openPropertySet( const OUString& key, sal_Bool create )
}
}
- OSL_FAIL( "PropertySetRegistry::openPropertySet - Error!" );
+ OSL_TRACE( "PropertySetRegistry::openPropertySet no root access" );
}
}
@@ -547,14 +547,6 @@ void SAL_CALL PropertySetRegistry::removePropertySet( const OUString& key )
getConfigWriteAccess( OUString() ), UNO_QUERY );
Reference< XNameContainer > xContainer( xBatch, UNO_QUERY );
- OSL_ENSURE( xBatch.is(),
- "PropertySetRegistry::removePropertySet - "
- "No batch!" );
-
- OSL_ENSURE( xContainer.is(),
- "PropertySetRegistry::removePropertySet - "
- "No conteiner!" );
-
if ( xBatch.is() && xContainer.is() )
{
try
@@ -588,7 +580,7 @@ void SAL_CALL PropertySetRegistry::removePropertySet( const OUString& key )
return;
}
- OSL_FAIL( "PropertySetRegistry::removePropertySet - Error!" );
+ OSL_TRACE( "PropertySetRegistry::removePropertySet - no root access" );
}
//=========================================================================
@@ -1065,16 +1057,11 @@ Reference< XMultiServiceFactory > PropertySetRegistry::getConfigProvider()
OUString(RTL_CONSTASCII_USTRINGPARAM(
"com.sun.star.configuration."
"ConfigurationProvider" )) ),
- UNO_QUERY );
-
- OSL_ENSURE( m_pImpl->m_xConfigProvider.is(),
- "PropertySetRegistry::getConfigProvider - "
- "No config provider!" );
-
+ UNO_QUERY_THROW );
}
catch (const Exception&)
{
- OSL_FAIL( "PropertySetRegistry::getConfigProvider - "
+ OSL_TRACE( "PropertySetRegistry::getConfigProvider - "
"caught exception!" );
}
}
@@ -1141,7 +1128,7 @@ Reference< XInterface > PropertySetRegistry::getRootConfigReadAccess()
return Reference< XInterface >();
}
- OSL_FAIL( "PropertySetRegistry::getRootConfigReadAccess - Error!" );
+ OSL_TRACE( "PropertySetRegistry::getRootConfigReadAccess - Error!" );
return Reference< XInterface >();
}
commit 4c1cfdb83fa42ca64c0b64484fe826e45c911603
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Aug 2 23:40:14 2011 +0100
make assert useful, tell me the invalid size
diff --git a/sfx2/source/doc/oleprops.cxx b/sfx2/source/doc/oleprops.cxx
index 3b133ea..a21ce53 100644
--- a/sfx2/source/doc/oleprops.cxx
+++ b/sfx2/source/doc/oleprops.cxx
@@ -35,6 +35,7 @@
#include <tools/debug.hxx>
#include <tools/datetime.hxx>
#include <rtl/tencinfo.h>
+#include <rtl/strbuf.hxx>
// ============================================================================
@@ -300,7 +301,10 @@ String SfxOleStringHelper::ImplLoadString8( SvStream& rStrm ) const
sal_Int32 nSize(0);
rStrm >> nSize;
// size field includes trailing NUL character
- DBG_ASSERT( (0 < nSize) && (nSize <= 0xFFFF), "SfxOleStringHelper::ImplLoadString8 - invalid string" );
+ DBG_ASSERT( (0 < nSize) && (nSize <= 0xFFFF),
+ rtl::OStringBuffer(RTL_CONSTASCII_STRINGPARAM(
+ "SfxOleStringHelper::ImplLoadString8 - invalid string of len ")).
+ append(nSize).getStr() );
if( (0 < nSize) && (nSize <= 0xFFFF) )
{
// load character buffer
commit 1d2c51738bcc782a309455fa39f8b9baba3c9edc
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Aug 2 22:47:07 2011 +0100
make assert useful, state *what* url is invalid
diff --git a/basic/source/basmgr/basicmanagerrepository.cxx b/basic/source/basmgr/basicmanagerrepository.cxx
index 628f97e..074ff8c 100644
--- a/basic/source/basmgr/basicmanagerrepository.cxx
+++ b/basic/source/basmgr/basicmanagerrepository.cxx
@@ -315,7 +315,12 @@ namespace basic
// The first dir in the path as destination:
String aFileName( aAppBasic.getName() );
aAppBasic = INetURLObject( aAppBasicDir.GetToken(1) );
- DBG_ASSERT( aAppBasic.GetProtocol() != INET_PROT_NOT_VALID, "Invalid URL!" );
+ DBG_ASSERT(aAppBasic.GetProtocol() != INET_PROT_NOT_VALID,
+ rtl::OStringBuffer(RTL_CONSTASCII_STRINGPARAM("Invalid URL: \"")).
+ append(rtl::OUStringToOString(aAppBasicDir,
+ osl_getThreadTextEncoding())).
+ append('"').getStr()
+ );
aAppBasic.insertName( aFileName );
pBasicManager->SetStorageName( aAppBasic.PathToFileName() );
More information about the Libreoffice-commits
mailing list