diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-09-26 12:47:54 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-09-27 09:06:10 +0200 |
commit | 595309903211ed5986ba0d2ef4d3b21bdfad10d9 (patch) | |
tree | cfcf597d2008a974be1365ad9e9ca9da1d188f07 /xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx | |
parent | cdd211d0a3f8bf977ecca67e72afbc63d53a72ee (diff) |
loplugin:flatten in vcl..xmlsecurity
Change-Id: I730fc0b3b6b7ac1803d75b5d9e007b15395888c6
Reviewed-on: https://gerrit.libreoffice.org/42826
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx')
-rw-r--r-- | xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx index 073ac07d44d4..10f7d0779d2b 100644 --- a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx +++ b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx @@ -87,21 +87,18 @@ namespace { OUString sDef("ODF/DefaultVersion"); Sequence< css::uno::Any > aValues = GetProperties( Sequence<OUString>(&sDef,1) ); - if ( aValues.getLength() == 1) - { - sal_Int16 nTmp = 0; - if ( aValues[0] >>= nTmp ) - m_nODF = nTmp; - else - throw uno::RuntimeException( - "[xmlsecurity]SaveODFItem::SaveODFItem(): Wrong Type!", - nullptr ); - - } - else + if ( aValues.getLength() != 1) throw uno::RuntimeException( "[xmlsecurity] Could not open property Office.Common/Save/ODF/DefaultVersion", nullptr); + + sal_Int16 nTmp = 0; + if ( !(aValues[0] >>= nTmp) ) + throw uno::RuntimeException( + "[xmlsecurity]SaveODFItem::SaveODFItem(): Wrong Type!", + nullptr ); + + m_nODF = nTmp; } } |