summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-10-19 08:12:17 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-10-19 10:02:39 +0200
commit2c1b7e8d6a7fa22cb91919238418816671c3a497 (patch)
tree6f356017d24dffcd25261295ab25a21b738dc835 /xmloff
parentad18bb24d51e4f735085d50c496d28bd637dbb0b (diff)
clang-tidy readability-container-size-empty
Change-Id: I1df70b7dff5ebb6048f7fc618789faa15ca5d422 Reviewed-on: https://gerrit.libreoffice.org/61967 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/core/xmlictxt.cxx2
-rw-r--r--xmloff/source/script/XMLEventImportHelper.cxx2
-rw-r--r--xmloff/source/style/PageMasterImportContext.cxx2
-rw-r--r--xmloff/source/style/prstylei.cxx6
-rw-r--r--xmloff/source/text/XMLRedlineExport.cxx2
-rw-r--r--xmloff/source/text/txtlists.cxx2
6 files changed, 8 insertions, 8 deletions
diff --git a/xmloff/source/core/xmlictxt.cxx b/xmloff/source/core/xmlictxt.cxx
index 18e1446e190a..8b25589f8181 100644
--- a/xmloff/source/core/xmlictxt.cxx
+++ b/xmloff/source/core/xmlictxt.cxx
@@ -131,7 +131,7 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL SvXMLImportContext::cre
(sal_Int32 Element, const uno::Reference< xml::sax::XFastAttributeList > & Attribs)
{
// Call CreateFastContext only if it's the first element of the document
- if ( !mrImport.maFastContexts.size() )
+ if ( mrImport.maFastContexts.empty() )
return mrImport.CreateFastContext( Element, Attribs );
else
return new SvXMLImportContext( GetImport() );
diff --git a/xmloff/source/script/XMLEventImportHelper.cxx b/xmloff/source/script/XMLEventImportHelper.cxx
index 6626598f5688..26048e86bacf 100644
--- a/xmloff/source/script/XMLEventImportHelper.cxx
+++ b/xmloff/source/script/XMLEventImportHelper.cxx
@@ -87,7 +87,7 @@ void XMLEventImportHelper::PushTranslationTable()
void XMLEventImportHelper::PopTranslationTable()
{
- DBG_ASSERT(aEventNameMapVector.size() > 0,
+ DBG_ASSERT(!aEventNameMapVector.empty(),
"no translation tables left to pop");
if ( !aEventNameMapVector.empty() )
{
diff --git a/xmloff/source/style/PageMasterImportContext.cxx b/xmloff/source/style/PageMasterImportContext.cxx
index aa81fd62e8c6..3ccac9f8bc47 100644
--- a/xmloff/source/style/PageMasterImportContext.cxx
+++ b/xmloff/source/style/PageMasterImportContext.cxx
@@ -161,7 +161,7 @@ void PageStyleContext::FillPropertySet(const uno::Reference<beans::XPropertySet
{
// need to filter out old fill definitions when the new ones are used. The new
// ones are used when a FillStyle is defined
- if(!m_bIsFillStyleAlreadyConverted && GetProperties().size())
+ if(!m_bIsFillStyleAlreadyConverted && !GetProperties().empty())
{
static ::rtl::OUString s_FillStyle("FillStyle");
static ::rtl::OUString s_HeaderFillStyle("HeaderFillStyle");
diff --git a/xmloff/source/style/prstylei.cxx b/xmloff/source/style/prstylei.cxx
index 5637e3cc959d..e9497349546a 100644
--- a/xmloff/source/style/prstylei.cxx
+++ b/xmloff/source/style/prstylei.cxx
@@ -533,7 +533,7 @@ void XMLPropStyleContext::Finish( bool bOverwrite )
bool XMLPropStyleContext::doNewDrawingLayerFillStyleDefinitionsExist(
const OUString& rFillStyleTag) const
{
- if(maProperties.size() && rFillStyleTag.getLength())
+ if(!maProperties.empty() && rFillStyleTag.getLength())
{
const rtl::Reference< XMLPropertySetMapper >& rMapper = GetStyles()->GetImportPropertyMapper(GetFamily())->getPropertySetMapper();
@@ -578,7 +578,7 @@ bool XMLPropStyleContext::doNewDrawingLayerFillStyleDefinitionsExist(
void XMLPropStyleContext::deactivateOldFillStyleDefinitions(
const OldFillStyleDefinitionSet& rHashSetOfTags)
{
- if(!rHashSetOfTags.empty() && maProperties.size())
+ if(!rHashSetOfTags.empty() && !maProperties.empty())
{
const rtl::Reference< XMLPropertySetMapper >& rMapper = GetStyles()->GetImportPropertyMapper(GetFamily())->getPropertySetMapper();
@@ -603,7 +603,7 @@ void XMLPropStyleContext::deactivateOldFillStyleDefinitions(
void XMLPropStyleContext::translateNameBasedDrawingLayerFillStyleDefinitionsToStyleDisplayNames()
{
- if(maProperties.size())
+ if(!maProperties.empty())
{
const rtl::Reference< XMLPropertySetMapper >& rMapper = GetStyles()->GetImportPropertyMapper(GetFamily())->getPropertySetMapper();
diff --git a/xmloff/source/text/XMLRedlineExport.cxx b/xmloff/source/text/XMLRedlineExport.cxx
index fa494e86396a..b30fc9ba0070 100644
--- a/xmloff/source/text/XMLRedlineExport.cxx
+++ b/xmloff/source/text/XMLRedlineExport.cxx
@@ -126,7 +126,7 @@ void XMLRedlineExport::ExportChangesList(
ChangesVectorType* pChangesList = aFind->second.get();
// export only if changes are found
- if (pChangesList->size() > 0)
+ if (!pChangesList->empty())
{
// changes container element
SvXMLElementExport aChanges(rExport, XML_NAMESPACE_TEXT,
diff --git a/xmloff/source/text/txtlists.cxx b/xmloff/source/text/txtlists.cxx
index bd6593717df4..1ac73d43af68 100644
--- a/xmloff/source/text/txtlists.cxx
+++ b/xmloff/source/text/txtlists.cxx
@@ -292,7 +292,7 @@ void XMLTextListsHelper::PushListOnStack( const OUString& sListId,
void XMLTextListsHelper::PopListFromStack()
{
if ( mpListStack &&
- mpListStack->size() > 0 )
+ !mpListStack->empty() )
{
mpListStack->pop_back();
}