diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-09-21 11:06:43 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-09-21 15:29:20 +0200 |
commit | 3a481dde031ba416ec4ef0351130e26e49417418 (patch) | |
tree | abfec5320c66e8c28b3da01852c531ef4a7ce0eb /extensions | |
parent | ac80f048f2bb23651ddc3c6608e9ef24635698d7 (diff) |
loplugin:flatten in editeng..extensions
Change-Id: I2b68f5640471ea827c09af1b5a319fb526a53b4b
Reviewed-on: https://gerrit.libreoffice.org/42579
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'extensions')
-rw-r--r-- | extensions/source/bibliography/bibload.cxx | 21 | ||||
-rw-r--r-- | extensions/source/update/ui/updatecheckui.cxx | 5 |
2 files changed, 11 insertions, 15 deletions
diff --git a/extensions/source/bibliography/bibload.cxx b/extensions/source/bibliography/bibload.cxx index eeb13f2fc7b7..22cf6b8275b0 100644 --- a/extensions/source/bibliography/bibload.cxx +++ b/extensions/source/bibliography/bibload.cxx @@ -621,20 +621,17 @@ Any BibliographyLoader::getPropertyValue(const OUString& rPropertyName) CUSTOM5_POS , // BibliographyDataField_CUSTOM5 ISBN_POS //BibliographyDataField_ISBN }; - if(rPropertyName == "BibliographyDataFieldNames") + if(rPropertyName != "BibliographyDataFieldNames") + throw UnknownPropertyException(); + Sequence<PropertyValue> aSeq(COLUMN_COUNT); + PropertyValue* pArray = aSeq.getArray(); + BibConfig* pConfig = BibModul::GetConfig(); + for(sal_uInt16 i = 0; i <= text::BibliographyDataField::ISBN ; i++) { - Sequence<PropertyValue> aSeq(COLUMN_COUNT); - PropertyValue* pArray = aSeq.getArray(); - BibConfig* pConfig = BibModul::GetConfig(); - for(sal_uInt16 i = 0; i <= text::BibliographyDataField::ISBN ; i++) - { - pArray[i].Name = pConfig->GetDefColumnName(aInternalMapping[i]); - pArray[i].Value <<= (sal_Int16) i; - } - aRet <<= aSeq; + pArray[i].Name = pConfig->GetDefColumnName(aInternalMapping[i]); + pArray[i].Value <<= (sal_Int16) i; } - else - throw UnknownPropertyException(); + aRet <<= aSeq; return aRet; } diff --git a/extensions/source/update/ui/updatecheckui.cxx b/extensions/source/update/ui/updatecheckui.cxx index 2e334fc2c361..b7e512dd537c 100644 --- a/extensions/source/update/ui/updatecheckui.cxx +++ b/extensions/source/update/ui/updatecheckui.cxx @@ -390,10 +390,9 @@ void UpdateCheckUI::setPropertyValue(const OUString& rPropertyName, else if( rPropertyName == PROPERTY_CLICK_HDL ) { uno::Reference< task::XJob > aJob; rValue >>= aJob; - if ( aJob.is() ) - mrJob = aJob; - else + if ( !aJob.is() ) throw lang::IllegalArgumentException(); + mrJob = aJob; } else if (rPropertyName == PROPERTY_SHOW_MENUICON ) { bool bShowMenuIcon = false; |