summaryrefslogtreecommitdiff
path: root/embeddedobj/source/general/dummyobject.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-09-27 09:11:35 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-09-27 11:02:56 +0200
commitcc1ed7fbce20f90650f96acc2846b6f232c8ab0f (patch)
treefcd441cdf9568861363894f63107967adf571f81 /embeddedobj/source/general/dummyobject.cxx
parentb50f595b34585f2927adfd44b4eaaafb8f600972 (diff)
loplugin:flatten in various
Change-Id: I42dca691ffadbddad38a7e8f978b1da9d5d9a7b0 Reviewed-on: https://gerrit.libreoffice.org/42842 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'embeddedobj/source/general/dummyobject.cxx')
-rw-r--r--embeddedobj/source/general/dummyobject.cxx33
1 files changed, 14 insertions, 19 deletions
diff --git a/embeddedobj/source/general/dummyobject.cxx b/embeddedobj/source/general/dummyobject.cxx
index fa44b4db4286..935ad015fb0b 100644
--- a/embeddedobj/source/general/dummyobject.cxx
+++ b/embeddedobj/source/general/dummyobject.cxx
@@ -293,34 +293,29 @@ void SAL_CALL ODummyEmbeddedObject::setPersistentEntry(
if ( m_bWaitSaveCompleted )
{
- if ( nEntryConnectionMode == embed::EntryInitModes::NO_INIT )
- saveCompleted( m_xParentStorage != xStorage || m_aEntryName != sEntName );
- else
+ if ( nEntryConnectionMode != embed::EntryInitModes::NO_INIT )
throw embed::WrongStateException(
"The object waits for saveCompleted() call!",
static_cast< ::cppu::OWeakObject* >(this) );
- }
- if ( nEntryConnectionMode == embed::EntryInitModes::DEFAULT_INIT
- || nEntryConnectionMode == embed::EntryInitModes::NO_INIT )
- {
- if ( xStorage->hasByName( sEntName ) )
-
- {
- m_xParentStorage = xStorage;
- m_aEntryName = sEntName;
- m_nObjectState = embed::EmbedStates::LOADED;
- }
- else
- throw lang::IllegalArgumentException( "Wrong entry is provided!",
- static_cast< ::cppu::OWeakObject* >(this),
- 2 );
+ saveCompleted( m_xParentStorage != xStorage || m_aEntryName != sEntName );
}
- else
+
+ if ( nEntryConnectionMode != embed::EntryInitModes::DEFAULT_INIT
+ && nEntryConnectionMode != embed::EntryInitModes::NO_INIT )
throw lang::IllegalArgumentException( "Wrong connection mode is provided!",
static_cast< ::cppu::OWeakObject* >(this),
3 );
+
+ if ( !xStorage->hasByName( sEntName ) )
+ throw lang::IllegalArgumentException( "Wrong entry is provided!",
+ static_cast< ::cppu::OWeakObject* >(this),
+ 2 );
+
+ m_xParentStorage = xStorage;
+ m_aEntryName = sEntName;
+ m_nObjectState = embed::EmbedStates::LOADED;
}