summaryrefslogtreecommitdiff
path: root/embeddedobj
diff options
context:
space:
mode:
authorArkadiy Illarionov <qarkai@gmail.com>2019-05-04 17:06:38 +0300
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-05-31 16:10:17 +0200
commit966f40eecfc60f20c309bc2477149442d753763a (patch)
treeed72f7b3d2fe609696834d47da120eeb4bd1460c /embeddedobj
parent4830a1bae89a8ed60696503e315ffd42c70dff74 (diff)
Use hasElements to check Sequence emptiness in [e-i]*
Similar to clang-tidy readability-container-size-empty Change-Id: I79e31919db8f4132216f09a7868d18835eeb154b Reviewed-on: https://gerrit.libreoffice.org/71795 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'embeddedobj')
-rw-r--r--embeddedobj/source/commonembedding/persistence.cxx2
-rw-r--r--embeddedobj/source/commonembedding/xfactory.cxx14
2 files changed, 8 insertions, 8 deletions
diff --git a/embeddedobj/source/commonembedding/persistence.cxx b/embeddedobj/source/commonembedding/persistence.cxx
index b0decc28bd6a..cba1be7c4d19 100644
--- a/embeddedobj/source/commonembedding/persistence.cxx
+++ b/embeddedobj/source/commonembedding/persistence.cxx
@@ -1760,7 +1760,7 @@ sal_Bool SAL_CALL OCommonEmbeddedObject::isStored()
if (!xNA.is())
return false;
- return xNA->getElementNames().getLength() > 0;
+ return xNA->getElementNames().hasElements();
}
diff --git a/embeddedobj/source/commonembedding/xfactory.cxx b/embeddedobj/source/commonembedding/xfactory.cxx
index 2bac339a7651..ce36832027ba 100644
--- a/embeddedobj/source/commonembedding/xfactory.cxx
+++ b/embeddedobj/source/commonembedding/xfactory.cxx
@@ -115,7 +115,7 @@ uno::Reference< uno::XInterface > SAL_CALL OOoEmbeddedObjectFactory::createInsta
if (!aObject.hasElements() && aMediaType == MIMETYPE_OASIS_OPENDOCUMENT_DATABASE_ASCII)
aObject = m_aConfigHelper.GetObjectPropsByMediaType(MIMETYPE_VND_SUN_XML_BASE_ASCII);
- if ( !aObject.getLength() )
+ if ( !aObject.hasElements() )
throw io::IOException(); // unexpected mimetype of the storage
xResult.set(static_cast< ::cppu::OWeakObject* > ( new OCommonEmbeddedObject(
@@ -164,7 +164,7 @@ uno::Reference< uno::XInterface > SAL_CALL OOoEmbeddedObjectFactory::createInsta
throw io::IOException(); // TODO:
}
uno::Sequence< beans::NamedValue > aObject = m_aConfigHelper.GetObjectPropsByFilter( aFilterName );
- if ( !aObject.getLength() )
+ if ( !aObject.hasElements() )
throw io::IOException(); // unexpected mimetype of the storage
@@ -204,7 +204,7 @@ uno::Reference< uno::XInterface > SAL_CALL OOoEmbeddedObjectFactory::createInsta
4 );
uno::Sequence< beans::NamedValue > aObject = m_aConfigHelper.GetObjectPropsByClassID( aClassID );
- if ( !aObject.getLength() )
+ if ( !aObject.hasElements() )
throw io::IOException(); // unexpected mimetype of the storage
xResult.set( static_cast< ::cppu::OWeakObject* > ( new OCommonEmbeddedObject(
@@ -245,7 +245,7 @@ uno::Reference< uno::XInterface > SAL_CALL OOoEmbeddedObjectFactory::createInsta
2 );
uno::Sequence< beans::NamedValue > aObject = m_aConfigHelper.GetObjectPropsByClassID( aClassID );
- if ( !aObject.getLength() )
+ if ( !aObject.hasElements() )
throw io::IOException(); // unexpected mimetype of the storage
uno::Sequence< beans::PropertyValue > aTempMedDescr( lArguments );
@@ -302,7 +302,7 @@ uno::Reference< uno::XInterface > SAL_CALL OOoEmbeddedObjectFactory::createInsta
throw io::IOException(); // TODO:
}
uno::Sequence< beans::NamedValue > aObject = m_aConfigHelper.GetObjectPropsByFilter( aFilterName );
- if ( !aObject.getLength() )
+ if ( !aObject.hasElements() )
throw io::IOException(); // unexpected mimetype of the storage
@@ -350,7 +350,7 @@ uno::Reference< uno::XInterface > SAL_CALL OOoEmbeddedObjectFactory::createInsta
3 );
uno::Sequence< beans::NamedValue > aObject = m_aConfigHelper.GetObjectPropsByClassID( aClassID );
- if ( !aObject.getLength() )
+ if ( !aObject.hasElements() )
throw io::IOException(); // unexpected mimetype of the storage
OUString aFilterName = m_aConfigHelper.UpdateMediaDescriptorWithFilterName( aTempMedDescr, aObject );
@@ -415,7 +415,7 @@ uno::Reference< uno::XInterface > SAL_CALL OOoSpecialEmbeddedObjectFactory::crea
const uno::Sequence< beans::PropertyValue >& /*lObjArgs*/ )
{
uno::Sequence< beans::NamedValue > aObject = m_aConfigHelper.GetObjectPropsByClassID( aClassID );
- if ( !aObject.getLength() )
+ if ( !aObject.hasElements() )
throw io::IOException(); // unexpected mimetype of the storage
uno::Reference< uno::XInterface > xResult(