Kaydet (Commit) d2978f03 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

loplugin:flatten (clang-cl, embeddedobj)

Change-Id: I842ab53693f87fc9b5151ce9b8b385a9dbd53e11
Reviewed-on: https://gerrit.libreoffice.org/42977Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarStephan Bergmann <sbergman@redhat.com>
üst c3819630
...@@ -63,26 +63,23 @@ using namespace ::com::sun::star; ...@@ -63,26 +63,23 @@ using namespace ::com::sun::star;
void OleEmbeddedObject::SwitchComponentToRunningState_Impl() void OleEmbeddedObject::SwitchComponentToRunningState_Impl()
{ {
if ( m_pOleComponent ) if ( !m_pOleComponent )
{ {
try throw embed::UnreachableStateException();
{
m_pOleComponent->RunObject();
}
catch( const embed::UnreachableStateException& )
{
GetRidOfComponent();
throw;
}
catch( const embed::WrongStateException& )
{
GetRidOfComponent();
throw;
}
} }
else try
{ {
throw embed::UnreachableStateException(); m_pOleComponent->RunObject();
}
catch( const embed::UnreachableStateException& )
{
GetRidOfComponent();
throw;
}
catch( const embed::WrongStateException& )
{
GetRidOfComponent();
throw;
} }
} }
......
...@@ -1013,16 +1013,16 @@ void OleEmbeddedObject::StoreObjectToStream( uno::Reference< io::XOutputStream > ...@@ -1013,16 +1013,16 @@ void OleEmbeddedObject::StoreObjectToStream( uno::Reference< io::XOutputStream >
// TODO: use bStoreVisReplace // TODO: use bStoreVisReplace
if ( xTempInStream.is() ) if ( !xTempInStream.is() )
{ {
// write all the contents to XOutStream
uno::Reference< io::XTruncate > xTrunc( xOutStream, uno::UNO_QUERY_THROW );
xTrunc->truncate();
::comphelper::OStorageHelper::CopyInputToOutput( xTempInStream, xOutStream );
}
else
throw io::IOException(); // TODO: throw io::IOException(); // TODO:
}
// write all the contents to XOutStream
uno::Reference< io::XTruncate > xTrunc( xOutStream, uno::UNO_QUERY_THROW );
xTrunc->truncate();
::comphelper::OStorageHelper::CopyInputToOutput( xTempInStream, xOutStream );
// TODO: should the view replacement be in the stream ??? // TODO: should the view replacement be in the stream ???
// probably it must be specified on storing // probably it must be specified on storing
......
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