diff options
author | Elton Chung <elton@layerjet.com> | 2012-02-19 16:59:40 +0400 |
---|---|---|
committer | Ivan Timofeev <timofeev.i.s@gmail.com> | 2012-02-19 17:07:46 +0400 |
commit | d30b4e9fb66f377295d8eeea8c1b1cf879aecdf6 (patch) | |
tree | a99079bda02a9d8dd5bd0d54666164f362314c52 /writerfilter | |
parent | ST_InfoListReader and ST_InfoListWriter seem to be unused (diff) | |
download | core-d30b4e9fb66f377295d8eeea8c1b1cf879aecdf6.tar.gz core-d30b4e9fb66f377295d8eeea8c1b1cf879aecdf6.zip |
Get rid of size() == 0
Diffstat (limited to 'writerfilter')
4 files changed, 7 insertions, 7 deletions
diff --git a/writerfilter/qa/cppunittests/odiapi/testProperty.cxx b/writerfilter/qa/cppunittests/odiapi/testProperty.cxx index 3ec344848b74..dc8d519a622a 100644 --- a/writerfilter/qa/cppunittests/odiapi/testProperty.cxx +++ b/writerfilter/qa/cppunittests/odiapi/testProperty.cxx @@ -207,7 +207,7 @@ public: pb->clear(); - CPPUNIT_ASSERT_MESSAGE("Clearing property bag failed", pb->size() == 0); + CPPUNIT_ASSERT_MESSAGE("Clearing property bag failed", pb->empty()); } void testSortPropertyBag() @@ -393,7 +393,7 @@ public: PropertyBag_Pointer_t pb = createPropertyBag(); PropertyPoolHandle_Pointer_t ph = pool->insert(pb); - CPPUNIT_ASSERT_MESSAGE("Inserting empty property bag failed", ph->getPropertyBag()->size() == 0); + CPPUNIT_ASSERT_MESSAGE("Inserting empty property bag failed", ph->getPropertyBag()->empty()); } void testDumpPropertyPool() diff --git a/writerfilter/source/doctok/WW8DocumentImpl.cxx b/writerfilter/source/doctok/WW8DocumentImpl.cxx index b5e15edb90b6..fd628568c586 100644 --- a/writerfilter/source/doctok/WW8DocumentImpl.cxx +++ b/writerfilter/source/doctok/WW8DocumentImpl.cxx @@ -164,7 +164,7 @@ public: { string s((*SprmIdToString::Instance())(rId)); - if (s.size() == 0) + if (s.empty()) s = (*QNameToString::Instance())(rId); return s; diff --git a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx index 4b183b903063..f892357f4ee5 100644 --- a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx +++ b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx @@ -111,7 +111,7 @@ public: { string s((*QNameToString::Instance())(rId)); - if (s.size() == 0) + if (s.empty()) s = "(fasttoken)" + fastTokenToId(rId); else s = "(qname)" + s; diff --git a/writerfilter/source/ooxml/OOXMLFastHelper.hxx b/writerfilter/source/ooxml/OOXMLFastHelper.hxx index f9555662041e..c0296c441b43 100644 --- a/writerfilter/source/ooxml/OOXMLFastHelper.hxx +++ b/writerfilter/source/ooxml/OOXMLFastHelper.hxx @@ -191,7 +191,7 @@ void OOXMLFastHelper<T>::newProperty(OOXMLFastContextHandler * pHandler, ::rtl::OUStringToOString (rValue, RTL_TEXTENCODING_ASCII_US).getStr()); - if (aStr.size() == 0) + if (aStr.empty()) debug_logger->element( "unknown-qname" ); #endif @@ -217,7 +217,7 @@ void OOXMLFastHelper<T>::newProperty(OOXMLFastContextHandler * pHandler, debug_logger->attribute("name", aStr); debug_logger->attribute("value", pVal->toString()); - if (aStr.size() == 0) + if (aStr.empty()) debug_logger->element("unknown-qname"); debug_logger->endElement(); @@ -243,7 +243,7 @@ void OOXMLFastHelper<T>::mark(OOXMLFastContextHandler * pHandler, ::rtl::OUStringToOString (rValue, RTL_TEXTENCODING_ASCII_US).getStr()); - if (aStr.size() == 0) + if (aStr.empty()) debug_logger->element("unknown-qname"); debug_logger->endElement(); |