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

coverity#983985 Uncaught exception

Change-Id: I0082d75aa2c00daa35d8d72e44fbb6da161f9774
üst 0ac73115
...@@ -1893,35 +1893,46 @@ namespace cmis ...@@ -1893,35 +1893,46 @@ namespace cmis
const uno::Reference< ucb::XCommandEnvironment >& xEnv) const uno::Reference< ucb::XCommandEnvironment >& xEnv)
throw( uno::RuntimeException ) throw( uno::RuntimeException )
{ {
if ( isFolder( xEnv ) ) try
{ {
uno::Sequence< ucb::ContentInfo > seq(2); if ( isFolder( xEnv ) )
{
// Minimum set of props we really need uno::Sequence< ucb::ContentInfo > seq(2);
uno::Sequence< beans::Property > props( 1 );
props[0] = beans::Property( // Minimum set of props we really need
OUString("Title"), uno::Sequence< beans::Property > props( 1 );
-1, props[0] = beans::Property(
cppu::UnoType<OUString>::get(), OUString("Title"),
beans::PropertyAttribute::MAYBEVOID | beans::PropertyAttribute::BOUND ); -1,
cppu::UnoType<OUString>::get(),
// file beans::PropertyAttribute::MAYBEVOID | beans::PropertyAttribute::BOUND );
seq[0].Type = CMIS_FILE_TYPE;
seq[0].Attributes = ( ucb::ContentInfoAttribute::INSERT_WITH_INPUTSTREAM | // file
ucb::ContentInfoAttribute::KIND_DOCUMENT ); seq[0].Type = CMIS_FILE_TYPE;
seq[0].Properties = props; seq[0].Attributes = ( ucb::ContentInfoAttribute::INSERT_WITH_INPUTSTREAM |
ucb::ContentInfoAttribute::KIND_DOCUMENT );
// folder seq[0].Properties = props;
seq[1].Type = CMIS_FOLDER_TYPE;
seq[1].Attributes = ucb::ContentInfoAttribute::KIND_FOLDER; // folder
seq[1].Properties = props; seq[1].Type = CMIS_FOLDER_TYPE;
seq[1].Attributes = ucb::ContentInfoAttribute::KIND_FOLDER;
return seq; seq[1].Properties = props;
return seq;
}
} }
else catch (const uno::RuntimeException&)
{ {
return uno::Sequence< ucb::ContentInfo >(); throw;
}
catch (const uno::Exception& e)
{
uno::Any a(cppu::getCaughtException());
throw lang::WrappedTargetRuntimeException(
"wrapped Exception " + e.Message,
uno::Reference<uno::XInterface>(), a);
} }
return uno::Sequence< ucb::ContentInfo >();
} }
list< uno::Reference< ucb::XContent > > Content::getChildren( ) list< uno::Reference< ucb::XContent > > Content::getChildren( )
......
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