diff options
author | Arkadiy Illarionov <qarkai@gmail.com> | 2019-05-01 00:53:03 +0300 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-05-02 09:53:48 +0200 |
commit | 855f52ead7fa361b6a73105d1f0086559a8ed5b6 (patch) | |
tree | 042fb792f2c64666ef5fa01436ccafd728860eca /xmlscript | |
parent | 0c434b06a3792a6429fbe718a0231c48597c1ff5 (diff) |
Use hasElements to check Sequence emptiness in [v-x]*
Similar to clang-tidy readability-container-size-empty
Change-Id: I71e7af4ac3043d8d40922e99f8a4798f0993294c
Reviewed-on: https://gerrit.libreoffice.org/71603
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'xmlscript')
-rw-r--r-- | xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx | 10 | ||||
-rw-r--r-- | xmlscript/source/xmldlg_imexp/xmldlg_export.cxx | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx b/xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx index 48acefb63f14..186dc6923f61 100644 --- a/xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx +++ b/xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx @@ -89,7 +89,7 @@ void ElementDescriptor::readMultiPageModel( StyleBag * all_styles ) readEvents(); uno::Reference< container::XNameContainer > xPagesContainer( _xProps, uno::UNO_QUERY ); - if ( xPagesContainer.is() && xPagesContainer->getElementNames().getLength() ) + if ( xPagesContainer.is() && xPagesContainer->getElementNames().hasElements() ) { ElementDescriptor * pElem = new ElementDescriptor( _xProps, _xPropState, XMLNS_DIALOGS_PREFIX ":bulletinboard", _xDocument ); pElem->readBullitinBoard( all_styles ); @@ -124,7 +124,7 @@ void ElementDescriptor::readFrameModel( StyleBag * all_styles ) addSubElement( title ); } uno::Reference< container::XNameContainer > xControlContainer( _xProps, uno::UNO_QUERY ); - if ( xControlContainer.is() && xControlContainer->getElementNames().getLength() ) + if ( xControlContainer.is() && xControlContainer->getElementNames().hasElements() ) { ElementDescriptor * pElem = new ElementDescriptor( _xProps, _xPropState, XMLNS_DIALOGS_PREFIX ":bulletinboard", _xDocument ); pElem->readBullitinBoard( all_styles ); @@ -154,7 +154,7 @@ void ElementDescriptor::readPageModel( StyleBag * all_styles ) readDefaults(); readStringAttr( "Title", XMLNS_DIALOGS_PREFIX ":title" ); uno::Reference< container::XNameContainer > xControlContainer( _xProps, uno::UNO_QUERY ); - if ( xControlContainer.is() && xControlContainer->getElementNames().getLength() ) + if ( xControlContainer.is() && xControlContainer->getElementNames().hasElements() ) { ElementDescriptor * pElem = new ElementDescriptor( _xProps, _xPropState, XMLNS_DIALOGS_PREFIX ":bulletinboard", _xDocument ); pElem->readBullitinBoard( all_styles ); @@ -314,7 +314,7 @@ void ElementDescriptor::readComboBoxModel( StyleBag * all_styles ) // string item list Sequence< OUString > itemValues; - if ((readProp( "StringItemList" ) >>= itemValues) && itemValues.getLength() > 0) + if ((readProp( "StringItemList" ) >>= itemValues) && itemValues.hasElements()) { ElementDescriptor * popup = new ElementDescriptor( _xProps, _xPropState, XMLNS_DIALOGS_PREFIX ":menupopup", _xDocument ); @@ -362,7 +362,7 @@ void ElementDescriptor::readListBoxModel( StyleBag * all_styles ) readDataAwareAttr( XMLNS_DIALOGS_PREFIX ":source-cell-range" ); // string item list Sequence< OUString > itemValues; - if ((readProp( "StringItemList" ) >>= itemValues) && itemValues.getLength() > 0) + if ((readProp( "StringItemList" ) >>= itemValues) && itemValues.hasElements()) { ElementDescriptor * popup = new ElementDescriptor( _xProps, _xPropState, XMLNS_DIALOGS_PREFIX ":menupopup", _xDocument ); diff --git a/xmlscript/source/xmldlg_imexp/xmldlg_export.cxx b/xmlscript/source/xmldlg_imexp/xmldlg_export.cxx index 82cf6eca2116..9341952eef35 100644 --- a/xmlscript/source/xmldlg_imexp/xmldlg_export.cxx +++ b/xmlscript/source/xmldlg_imexp/xmldlg_export.cxx @@ -1397,7 +1397,7 @@ void exportDialogModel( // dump out stylebag all_styles.dump( xOut ); - if ( xDialogModel->getElementNames().getLength() ) + if ( xDialogModel->getElementNames().hasElements() ) { // open up bulletinboard OUString aBBoardName( XMLNS_DIALOGS_PREFIX ":bulletinboard" ); |