summaryrefslogtreecommitdiff
path: root/unotools
diff options
context:
space:
mode:
authorsb <sb@openoffice.org>2010-02-05 09:17:48 +0100
committersb <sb@openoffice.org>2010-02-05 09:17:48 +0100
commiteec332142dbfec6a5ab3d8cf4cf1a405cbd3e30c (patch)
tree55ea7d363745c205a49ebdac6e2b2ccf296eeb37 /unotools
parent08e3d3d8892f40bac9b1c45ecf331e8c0f4ffcbd (diff)
parentda2c680d23b67d4721aa29f740475fd6d40e2e08 (diff)
sb111: merged in DEV300_m71
Diffstat (limited to 'unotools')
-rw-r--r--unotools/source/config/confignode.cxx37
-rw-r--r--unotools/source/ucbhelper/ucbhelper.cxx16
2 files changed, 13 insertions, 40 deletions
diff --git a/unotools/source/config/confignode.cxx b/unotools/source/config/confignode.cxx
index b0e1dc95f00a..56ad978d1262 100644
--- a/unotools/source/config/confignode.cxx
+++ b/unotools/source/config/confignode.cxx
@@ -465,16 +465,9 @@ namespace utl
aReturn = m_xHierarchyAccess->getByHierarchicalName(_rPath);
}
}
- catch(NoSuchElementException& e)
+ catch(const NoSuchElementException&)
{
- #if OSL_DEBUG_LEVEL > 0
- rtl::OStringBuffer aBuf( 256 );
- aBuf.append("OConfigurationNode::getNodeValue: caught a NoSuchElementException while trying to open ");
- aBuf.append( rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ) );
- OSL_ENSURE(sal_False, aBuf.getStr());
- #else
- (void)e;
- #endif
+ DBG_UNHANDLED_EXCEPTION();
}
return aReturn;
}
@@ -497,7 +490,7 @@ namespace utl
}
catch(Exception&)
{
- OSL_ENSURE(sal_False, "OConfigurationNode::cloneAsRoot: could not retrieve the node path!");
+ DBG_UNHANDLED_EXCEPTION();
}
}
@@ -558,13 +551,9 @@ namespace utl
m_xCommitter->commitChanges();
return sal_True;
}
- catch(WrappedTargetException&)
- {
- OSL_ENSURE(sal_False, "OConfigurationTreeRoot::commit: caught a WrappedTargetException!");
- }
- catch(RuntimeException&)
+ catch(const Exception&)
{
- OSL_ENSURE(sal_False, "OConfigurationTreeRoot::commit: caught a RuntimeException!");
+ DBG_UNHANDLED_EXCEPTION();
}
return sal_False;
}
@@ -601,7 +590,7 @@ namespace utl
}
catch(const Exception&)
{
- OSL_ENSURE(sal_False, "OConfigurationTreeRoot::createWithProvider: unable to check the service conformance of the provider given!");
+ DBG_UNHANDLED_EXCEPTION();
}
}
#endif
@@ -645,15 +634,9 @@ namespace utl
try { xComp->dispose(); } catch(Exception&) { }
}
}
- catch(Exception& e)
+ catch(const Exception&)
{
- #if OSL_DEBUG_LEVEL > 0
- ::rtl::OString sMessage( "OConfigurationTreeRoot::createWithProvider: caught an exception while creating the access object!\nmessage:\n" );
- sMessage += ::rtl::OString( e.Message.getStr(), e.Message.getLength(), RTL_TEXTENCODING_ASCII_US );
- OSL_ENSURE( sal_False, sMessage.getStr() );
- #else
- (void)e;
- #endif
+ DBG_UNHANDLED_EXCEPTION();
}
}
bTryAgain = CM_PREFER_UPDATABLE == _eMode;
@@ -680,9 +663,9 @@ namespace utl
if (xProviderAsFac.is())
return createWithProvider(xProviderAsFac, _rPath, _nDepth, _eMode, _bLazyWrite);
}
- catch(Exception&)
+ catch(const Exception&)
{
- OSL_ENSURE(sal_False, "OConfigurationTreeRoot::createWithServiceFactory: error while instantiating the provider service!");
+ DBG_UNHANDLED_EXCEPTION();
}
}
return OConfigurationTreeRoot();
diff --git a/unotools/source/ucbhelper/ucbhelper.cxx b/unotools/source/ucbhelper/ucbhelper.cxx
index 2b301efc4e52..a798f485516a 100644
--- a/unotools/source/ucbhelper/ucbhelper.cxx
+++ b/unotools/source/ucbhelper/ucbhelper.cxx
@@ -46,15 +46,13 @@
#include <com/sun/star/ucb/XAnyCompareFactory.hpp>
#include <com/sun/star/ucb/XCommandInfo.hpp>
#include <com/sun/star/ucb/XContentAccess.hpp>
+#include <com/sun/star/ucb/ContentInfo.hpp>
#include <com/sun/star/ucb/ContentInfoAttribute.hpp>
-#include <com/sun/star/ucb/XContentCreator.hpp>
#include <com/sun/star/ucb/XDynamicResultSet.hpp>
#include <com/sun/star/ucb/XSortedDynamicResultSetFactory.hpp>
#include <com/sun/star/util/DateTime.hpp>
#include <com/sun/star/container/XChild.hpp>
-#ifndef _COM_SUN_STAR_UCB_INTERACTIVEIODEXCEPTION_HPP_
#include <com/sun/star/ucb/InteractiveIOException.hpp>
-#endif
#include <com/sun/star/task/XInteractionHandler.hpp>
#include <ucbhelper/commandenvironment.hxx>
#include <ucbhelper/content.hxx>
@@ -489,11 +487,7 @@ sal_Bool UCBContentHelper::CanMakeFolder( const String& rFolder )
try
{
Content aCnt( rFolder, uno::Reference< XCommandEnvironment > () );
- uno::Reference< XContentCreator > xCreator = uno::Reference< XContentCreator >( aCnt.get(), UNO_QUERY );
- if ( !xCreator.is() )
- return sal_False;
-
- Sequence< ContentInfo > aInfo = xCreator->queryCreatableContentsInfo();
+ Sequence< ContentInfo > aInfo = aCnt.queryCreatableContentsInfo();
sal_Int32 nCount = aInfo.getLength();
if ( nCount == 0 )
return sal_False;
@@ -538,11 +532,7 @@ sal_Bool UCBContentHelper::MakeFolder( Content& aCnt, const String& aTitle, Cont
try
{
- uno::Reference< XContentCreator > xCreator( aCnt.get(), UNO_QUERY );
- if ( !xCreator.is() )
- return sal_False;
-
- Sequence< ContentInfo > aInfo = xCreator->queryCreatableContentsInfo();
+ Sequence< ContentInfo > aInfo = aCnt.queryCreatableContentsInfo();
sal_Int32 nCount = aInfo.getLength();
if ( nCount == 0 )
return sal_False;