summaryrefslogtreecommitdiff
path: root/unotools
diff options
context:
space:
mode:
authorMathias Bauer <mba@openoffice.org>2010-02-04 17:59:58 +0100
committerMathias Bauer <mba@openoffice.org>2010-02-04 17:59:58 +0100
commit509f78fb1dfb021c48510075680d2b3aa01681cc (patch)
treefbf70fea1551a1640e16bf74510942089bcb14c1 /unotools
parent1153489dc129ff4d4b26fbf39f154b3833f423f4 (diff)
parentda2c680d23b67d4721aa29f740475fd6d40e2e08 (diff)
CWS svxsplit: merge with 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 56d258461e95..c8134137db0c 100644
--- a/unotools/source/config/confignode.cxx
+++ b/unotools/source/config/confignode.cxx
@@ -468,16 +468,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;
}
@@ -500,7 +493,7 @@ namespace utl
}
catch(Exception&)
{
- OSL_ENSURE(sal_False, "OConfigurationNode::cloneAsRoot: could not retrieve the node path!");
+ DBG_UNHANDLED_EXCEPTION();
}
}
@@ -561,13 +554,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;
}
@@ -604,7 +593,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
@@ -648,15 +637,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;
@@ -683,9 +666,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;