summaryrefslogtreecommitdiff
path: root/unoxml/source/rdf
diff options
context:
space:
mode:
authorOlivier Hallot <olivier.hallot@alta.org.br>2012-01-19 16:25:16 -0200
committerOlivier Hallot <olivier.hallot@alta.org.br>2012-01-19 22:07:59 -0200
commit5738e07a78c5894d111ee6c6e0d07b56ff126b2c (patch)
treef2d0eeeeda023117939860faba286f34169cca6f /unoxml/source/rdf
parent6a1390eaf6464e71668c402d262a21c9192278e9 (diff)
Fix for fdo43460 Part XLIII getLength() to isEmpty()
Part XLIII Modules unoxml
Diffstat (limited to 'unoxml/source/rdf')
-rw-r--r--unoxml/source/rdf/CBlankNode.cxx2
-rw-r--r--unoxml/source/rdf/CLiteral.cxx4
-rw-r--r--unoxml/source/rdf/CURI.cxx2
-rw-r--r--unoxml/source/rdf/librdf_repository.cxx14
4 files changed, 11 insertions, 11 deletions
diff --git a/unoxml/source/rdf/CBlankNode.cxx b/unoxml/source/rdf/CBlankNode.cxx
index 62d5978b3846..0a937180d471 100644
--- a/unoxml/source/rdf/CBlankNode.cxx
+++ b/unoxml/source/rdf/CBlankNode.cxx
@@ -113,7 +113,7 @@ void SAL_CALL CBlankNode::initialize(const css::uno::Sequence< ::com::sun::star:
}
//FIXME: what is legal?
- if (arg.getLength() > 0) {
+ if (!arg.isEmpty()) {
m_NodeID = arg;
} else {
throw css::lang::IllegalArgumentException(
diff --git a/unoxml/source/rdf/CLiteral.cxx b/unoxml/source/rdf/CLiteral.cxx
index 549cee2146f4..38e585fe137f 100644
--- a/unoxml/source/rdf/CLiteral.cxx
+++ b/unoxml/source/rdf/CLiteral.cxx
@@ -134,7 +134,7 @@ void SAL_CALL CLiteral::initialize(const css::uno::Sequence< ::com::sun::star::u
::rtl::OUString arg1;
css::uno::Reference< css::rdf::XURI > xURI;
if ((aArguments[1] >>= arg1)) {
- if (arg1.getLength() > 0) {
+ if (!arg1.isEmpty()) {
m_Language = arg1;
} else {
throw css::lang::IllegalArgumentException(
@@ -160,7 +160,7 @@ void SAL_CALL CLiteral::initialize(const css::uno::Sequence< ::com::sun::star::u
// ::com::sun::star::rdf::XNode:
::rtl::OUString SAL_CALL CLiteral::getStringValue() throw (css::uno::RuntimeException)
{
- if (m_Language.getLength()) {
+ if (!m_Language.isEmpty()) {
::rtl::OUStringBuffer buf(m_Value);
buf.appendAscii("@");
buf.append(m_Language);
diff --git a/unoxml/source/rdf/CURI.cxx b/unoxml/source/rdf/CURI.cxx
index 414267ffe795..fe40ddb4e182 100644
--- a/unoxml/source/rdf/CURI.cxx
+++ b/unoxml/source/rdf/CURI.cxx
@@ -803,7 +803,7 @@ void SAL_CALL CURI::initialize(const css::uno::Sequence< ::com::sun::star::uno::
}
//FIXME: what is legal?
- if (arg0.getLength() > 0) {
+ if (!arg0.isEmpty()) {
m_Namespace = arg0;
} else {
throw css::lang::IllegalArgumentException(
diff --git a/unoxml/source/rdf/librdf_repository.cxx b/unoxml/source/rdf/librdf_repository.cxx
index f292682fbbcd..85b40e968ca6 100644
--- a/unoxml/source/rdf/librdf_repository.cxx
+++ b/unoxml/source/rdf/librdf_repository.cxx
@@ -1265,7 +1265,7 @@ static bool isMetadatableWithoutMetadata(
uno::Reference<uno::XInterface> const & i_xNode)
{
const uno::Reference<rdf::XMetadatable> xMeta( i_xNode, uno::UNO_QUERY );
- return (xMeta.is() && !xMeta->getMetadataReference().Second.getLength());
+ return (xMeta.is() && xMeta->getMetadataReference().Second.isEmpty());
}
uno::Reference< container::XEnumeration > SAL_CALL
@@ -1483,7 +1483,7 @@ throw (uno::RuntimeException, lang::IllegalArgumentException,
// ensure that the metadatable has an XML ID
i_xObject->ensureMetadataReference();
const beans::StringPair mdref( i_xObject->getMetadataReference() );
- if ((mdref.First.getLength() == 0) || (mdref.Second.getLength() == 0)) {
+ if ((mdref.First.isEmpty()) || (mdref.Second.isEmpty())) {
throw uno::RuntimeException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
"librdf_Repository::setStatementRDFa: "
"ensureMetadataReference did not")), *this);
@@ -1503,7 +1503,7 @@ throw (uno::RuntimeException, lang::IllegalArgumentException,
}
::osl::MutexGuard g(m_aMutex);
- ::rtl::OUString const content( (i_rRDFaContent.getLength() == 0)
+ ::rtl::OUString const content( (i_rRDFaContent.isEmpty())
? xTextRange->getString()
: i_rRDFaContent );
uno::Reference<rdf::XNode> xContent;
@@ -1523,7 +1523,7 @@ throw (uno::RuntimeException, lang::IllegalArgumentException,
"cannot create literal")), *this, uno::makeAny(iae));
}
removeStatementRDFa(i_xObject);
- if (i_rRDFaContent.getLength() == 0) {
+ if (i_rRDFaContent.isEmpty()) {
m_RDFaXHTMLContentSet.erase(sXmlId);
} else {
m_RDFaXHTMLContentSet.insert(sXmlId);
@@ -1546,7 +1546,7 @@ throw (uno::RuntimeException, lang::IllegalArgumentException,
}
const beans::StringPair mdref( i_xElement->getMetadataReference() );
- if ((mdref.First.getLength() == 0) || (mdref.Second.getLength() == 0)) {
+ if ((mdref.First.isEmpty()) || (mdref.Second.isEmpty())) {
return; // nothing to do...
}
uno::Reference<rdf::XURI> xXmlId;
@@ -1577,7 +1577,7 @@ throw (uno::RuntimeException, lang::IllegalArgumentException,
"librdf_Repository::getStatementRDFa: Element is null")), *this, 0);
}
const beans::StringPair mdref( i_xElement->getMetadataReference() );
- if ((mdref.First.getLength() == 0) || (mdref.Second.getLength() == 0)) {
+ if ((mdref.First.isEmpty()) || (mdref.Second.isEmpty())) {
return beans::Pair< uno::Sequence<rdf::Statement>, sal_Bool >();
}
::rtl::OUString const sXmlId(mdref.First +
@@ -2065,7 +2065,7 @@ librdf_node* librdf_TypeConverter::mkNode( librdf_world* i_pWorld,
RTL_TEXTENCODING_UTF8) );
const uno::Reference< rdf::XURI > xType(xLiteral->getDatatype());
librdf_node * ret(0);
- if (lang.getLength() == 0) {
+ if (lang.isEmpty()) {
if (!xType.is()) {
ret = librdf_new_node_from_literal(i_pWorld,
reinterpret_cast<const unsigned char*> (val.getStr()),