Kaydet (Commit) 705b6b61 authored tarafından Caolán McNamara's avatar Caolán McNamara

coverity#983989 Uncaught exception

Change-Id: I7508ee67a10b43686600b41dd58c1a8a5aa90c51
üst ffc3b11d
...@@ -1854,40 +1854,51 @@ namespace cmis ...@@ -1854,40 +1854,51 @@ namespace cmis
uno::Sequence< uno::Type > SAL_CALL Content::getTypes() throw( uno::RuntimeException, std::exception ) uno::Sequence< uno::Type > SAL_CALL Content::getTypes() throw( uno::RuntimeException, std::exception )
{ {
if ( isFolder( uno::Reference< ucb::XCommandEnvironment >() ) ) try
{ {
static cppu::OTypeCollection aFolderCollection if ( isFolder( uno::Reference< ucb::XCommandEnvironment >() ) )
(CPPU_TYPE_REF( lang::XTypeProvider ), {
CPPU_TYPE_REF( lang::XServiceInfo ), static cppu::OTypeCollection aFolderCollection
CPPU_TYPE_REF( lang::XComponent ), (CPPU_TYPE_REF( lang::XTypeProvider ),
CPPU_TYPE_REF( ucb::XContent ), CPPU_TYPE_REF( lang::XServiceInfo ),
CPPU_TYPE_REF( ucb::XCommandProcessor ), CPPU_TYPE_REF( lang::XComponent ),
CPPU_TYPE_REF( beans::XPropertiesChangeNotifier ), CPPU_TYPE_REF( ucb::XContent ),
CPPU_TYPE_REF( ucb::XCommandInfoChangeNotifier ), CPPU_TYPE_REF( ucb::XCommandProcessor ),
CPPU_TYPE_REF( beans::XPropertyContainer ), CPPU_TYPE_REF( beans::XPropertiesChangeNotifier ),
CPPU_TYPE_REF( beans::XPropertySetInfoChangeNotifier ), CPPU_TYPE_REF( ucb::XCommandInfoChangeNotifier ),
CPPU_TYPE_REF( container::XChild ), CPPU_TYPE_REF( beans::XPropertyContainer ),
CPPU_TYPE_REF( ucb::XContentCreator ) ); CPPU_TYPE_REF( beans::XPropertySetInfoChangeNotifier ),
return aFolderCollection.getTypes(); CPPU_TYPE_REF( container::XChild ),
CPPU_TYPE_REF( ucb::XContentCreator ) );
return aFolderCollection.getTypes();
}
} }
else catch (const uno::RuntimeException&)
{ {
static cppu::OTypeCollection aFileCollection throw;
(CPPU_TYPE_REF( lang::XTypeProvider ), }
CPPU_TYPE_REF( lang::XServiceInfo ), catch (const uno::Exception& e)
CPPU_TYPE_REF( lang::XComponent ), {
CPPU_TYPE_REF( ucb::XContent ), uno::Any a(cppu::getCaughtException());
CPPU_TYPE_REF( ucb::XCommandProcessor ), throw lang::WrappedTargetRuntimeException(
CPPU_TYPE_REF( beans::XPropertiesChangeNotifier ), "wrapped Exception " + e.Message,
CPPU_TYPE_REF( ucb::XCommandInfoChangeNotifier ), uno::Reference<uno::XInterface>(), a);
CPPU_TYPE_REF( beans::XPropertyContainer ),
CPPU_TYPE_REF( beans::XPropertySetInfoChangeNotifier ),
CPPU_TYPE_REF( container::XChild ) );
return aFileCollection.getTypes();
} }
}
static cppu::OTypeCollection aFileCollection
(CPPU_TYPE_REF( lang::XTypeProvider ),
CPPU_TYPE_REF( lang::XServiceInfo ),
CPPU_TYPE_REF( lang::XComponent ),
CPPU_TYPE_REF( ucb::XContent ),
CPPU_TYPE_REF( ucb::XCommandProcessor ),
CPPU_TYPE_REF( beans::XPropertiesChangeNotifier ),
CPPU_TYPE_REF( ucb::XCommandInfoChangeNotifier ),
CPPU_TYPE_REF( beans::XPropertyContainer ),
CPPU_TYPE_REF( beans::XPropertySetInfoChangeNotifier ),
CPPU_TYPE_REF( container::XChild ) );
return aFileCollection.getTypes();
}
uno::Sequence< ucb::ContentInfo > Content::queryCreatableContentsInfo( uno::Sequence< ucb::ContentInfo > Content::queryCreatableContentsInfo(
const uno::Reference< ucb::XCommandEnvironment >& xEnv) const uno::Reference< ucb::XCommandEnvironment >& xEnv)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment