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,8 +63,10 @@ using namespace ::com::sun::star; ...@@ -63,8 +63,10 @@ using namespace ::com::sun::star;
void OleEmbeddedObject::SwitchComponentToRunningState_Impl() void OleEmbeddedObject::SwitchComponentToRunningState_Impl()
{ {
if ( m_pOleComponent ) if ( !m_pOleComponent )
{ {
throw embed::UnreachableStateException();
}
try try
{ {
m_pOleComponent->RunObject(); m_pOleComponent->RunObject();
...@@ -79,11 +81,6 @@ void OleEmbeddedObject::SwitchComponentToRunningState_Impl() ...@@ -79,11 +81,6 @@ void OleEmbeddedObject::SwitchComponentToRunningState_Impl()
GetRidOfComponent(); GetRidOfComponent();
throw; throw;
} }
}
else
{
throw embed::UnreachableStateException();
}
} }
......
...@@ -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() )
{ {
throw io::IOException(); // TODO:
}
// write all the contents to XOutStream // write all the contents to XOutStream
uno::Reference< io::XTruncate > xTrunc( xOutStream, uno::UNO_QUERY_THROW ); uno::Reference< io::XTruncate > xTrunc( xOutStream, uno::UNO_QUERY_THROW );
xTrunc->truncate(); xTrunc->truncate();
::comphelper::OStorageHelper::CopyInputToOutput( xTempInStream, xOutStream ); ::comphelper::OStorageHelper::CopyInputToOutput( xTempInStream, xOutStream );
}
else
throw io::IOException(); // TODO:
// 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