diff options
author | Noel <noel.grandin@collabora.co.uk> | 2021-03-26 13:35:54 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-03-26 18:02:19 +0100 |
commit | b624b13b3d5a8e573c7de8158cadc66b1982d157 (patch) | |
tree | 56948e6a5e8d7f5a7cbde6328a27f13ecd8a72bc /extensions | |
parent | 8136620ff432bf17815bef1f88c7531edb839d23 (diff) |
loplugin:flatten
Change-Id: Ib7a895fba66f8dc9b6501e61631c02694053b7fc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113157
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'extensions')
-rw-r--r-- | extensions/source/bibliography/general.cxx | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/extensions/source/bibliography/general.cxx b/extensions/source/bibliography/general.cxx index 1b712259f80a..f2517ed95515 100644 --- a/extensions/source/bibliography/general.cxx +++ b/extensions/source/bibliography/general.cxx @@ -304,24 +304,24 @@ void BibGeneralPage::SaveChanges() Reference< XForm > xForm = pDatMan->getForm(); Reference< beans::XPropertySet > xProps( xForm, UNO_QUERY ); Reference< sdbc::XResultSetUpdate > xResUpd( xProps, UNO_QUERY ); - if (xResUpd.is() ) + if (!xResUpd.is() ) + return; + + Any aModified = xProps->getPropertyValue( "IsModified" ); + bool bFlag = false; + if ( ( aModified >>= bFlag ) && bFlag ) { - Any aModified = xProps->getPropertyValue( "IsModified" ); - bool bFlag = false; - if ( ( aModified >>= bFlag ) && bFlag ) - { - try - { - Any aNew = xProps->getPropertyValue( "IsNew" ); - aNew >>= bFlag; - if ( bFlag ) - xResUpd->insertRow(); - else - xResUpd->updateRow(); - } - catch( const uno::Exception&) {} + try + { + Any aNew = xProps->getPropertyValue( "IsNew" ); + aNew >>= bFlag; + if ( bFlag ) + xResUpd->insertRow(); + else + xResUpd->updateRow(); } + catch( const uno::Exception&) {} } } |