summaryrefslogtreecommitdiff
path: root/dbaccess/source/filter
diff options
context:
space:
mode:
authorArkadiy Illarionov <qarkai@gmail.com>2019-05-04 21:20:18 +0300
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-06-05 19:24:57 +0200
commit2ed3d691b42525f6c1cc430d5863febcb102816e (patch)
tree97088acb96f8ad26f2ae67f3f8e5c2f6aab05cf0 /dbaccess/source/filter
parent6c31c2b01dd32cc7ba1230f2c4a98b8f7def219b (diff)
Use hasElements to check Sequence emptiness in cppcanvas..desktop
Similar to clang-tidy readability-container-size-empty Change-Id: I81c0ff78d2ecc7d984e3ed5e5ce60efe327fc162 Reviewed-on: https://gerrit.libreoffice.org/71799 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'dbaccess/source/filter')
-rw-r--r--dbaccess/source/filter/xml/xmlDataSourceSetting.cxx2
-rw-r--r--dbaccess/source/filter/xml/xmlExport.cxx10
-rw-r--r--dbaccess/source/filter/xml/xmlfilter.cxx2
3 files changed, 7 insertions, 7 deletions
diff --git a/dbaccess/source/filter/xml/xmlDataSourceSetting.cxx b/dbaccess/source/filter/xml/xmlDataSourceSetting.cxx
index 7d928d140949..74d0e9b992b9 100644
--- a/dbaccess/source/filter/xml/xmlDataSourceSetting.cxx
+++ b/dbaccess/source/filter/xml/xmlDataSourceSetting.cxx
@@ -133,7 +133,7 @@ void OXMLDataSourceSetting::EndElement()
{
if ( !m_aSetting.Name.isEmpty() )
{
- if ( m_bIsList && m_aInfoSequence.getLength() )
+ if ( m_bIsList && m_aInfoSequence.hasElements() )
m_aSetting.Value <<= m_aInfoSequence;
// if our property is of type string, but was empty, ensure that
diff --git a/dbaccess/source/filter/xml/xmlExport.cxx b/dbaccess/source/filter/xml/xmlExport.cxx
index fafb22960aee..3d54d0a57b27 100644
--- a/dbaccess/source/filter/xml/xmlExport.cxx
+++ b/dbaccess/source/filter/xml/xmlExport.cxx
@@ -517,14 +517,14 @@ void ODBExport::exportApplicationConnectionSettings(const TSettingsMap& _aSettin
Reference<XPropertySet> xProp(getDataSource());
Sequence< OUString> aValue;
xProp->getPropertyValue(PROPERTY_TABLEFILTER) >>= aValue;
- if ( aValue.getLength() )
+ if ( aValue.hasElements() )
{
SvXMLElementExport aElem2(*this,XML_NAMESPACE_DB, XML_TABLE_FILTER, true, true);
exportSequence(aValue,XML_TABLE_INCLUDE_FILTER,XML_TABLE_FILTER_PATTERN);
}
xProp->getPropertyValue(PROPERTY_TABLETYPEFILTER) >>= aValue;
- if ( aValue.getLength() )
+ if ( aValue.hasElements() )
exportSequence(aValue,XML_TABLE_TYPE_FILTER,XML_TABLE_TYPE);
exportDataSourceSettings();
@@ -687,7 +687,7 @@ void ODBExport::exportDataSourceSettings()
{
Sequence<Any> aSeq;
aIter->Value >>= aSeq;
- if ( aSeq.getLength() )
+ if ( aSeq.hasElements() )
sTypeName = lcl_implGetPropertyXMLType(aSeq[0].getValueType());
}
@@ -773,7 +773,7 @@ void ODBExport::exportSequence(const Sequence< OUString>& _aValue
,::xmloff::token::XMLTokenEnum _eTokenType)
{
Reference<XPropertySet> xProp(getDataSource());
- if ( _aValue.getLength() )
+ if ( _aValue.hasElements() )
{
SvXMLElementExport aElem(*this,XML_NAMESPACE_DB, _eTokenFilter, true, true);
@@ -1295,7 +1295,7 @@ void ODBExport::GetConfigurationSettings(Sequence<PropertyValue>& aProps)
Any aValue = xProp->getPropertyValue(PROPERTY_LAYOUTINFORMATION);
Sequence< PropertyValue > aPropValues;
aValue >>= aPropValues;
- if ( aPropValues.getLength() )
+ if ( aPropValues.hasElements() )
{
aProps.realloc(nLength + 1);
aProps[nLength].Name = "layout-settings";
diff --git a/dbaccess/source/filter/xml/xmlfilter.cxx b/dbaccess/source/filter/xml/xmlfilter.cxx
index 9dbb729f7d47..27bc17bd762d 100644
--- a/dbaccess/source/filter/xml/xmlfilter.cxx
+++ b/dbaccess/source/filter/xml/xmlfilter.cxx
@@ -946,7 +946,7 @@ void ODBFilter::setPropertyInfo()
aDataSourceSettings.merge( ::comphelper::NamedValueCollection( aInfo ), true );
aDataSourceSettings >>= aInfo;
- if ( aInfo.getLength() )
+ if ( aInfo.hasElements() )
{
try
{