summaryrefslogtreecommitdiff
path: root/unoxml/source/rdf/CLiteral.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'unoxml/source/rdf/CLiteral.cxx')
-rw-r--r--unoxml/source/rdf/CLiteral.cxx35
1 files changed, 18 insertions, 17 deletions
diff --git a/unoxml/source/rdf/CLiteral.cxx b/unoxml/source/rdf/CLiteral.cxx
index 1b7297169cee..ac0eadcd6985 100644
--- a/unoxml/source/rdf/CLiteral.cxx
+++ b/unoxml/source/rdf/CLiteral.cxx
@@ -105,25 +105,26 @@ void SAL_CALL CLiteral::initialize(const css::uno::Sequence< css::uno::Any > & a
}
m_Value = arg0;
- if (len > 1) {
- OUString arg1;
- css::uno::Reference< css::rdf::XURI > xURI;
- if (aArguments[1] >>= arg1) {
- if (arg1.isEmpty()) {
- throw css::lang::IllegalArgumentException(
- "CLiteral::initialize: argument is not valid language", *this, 1);
- }
- m_Language = arg1;
- } else if (aArguments[1] >>= xURI) {
- if (!xURI.is()) {
- throw css::lang::IllegalArgumentException(
- "CLiteral::initialize: argument is null", *this, 1);
- }
- m_xDatatype = xURI;
- } else {
+ if (len <= 1)
+ return;
+
+ OUString arg1;
+ css::uno::Reference< css::rdf::XURI > xURI;
+ if (aArguments[1] >>= arg1) {
+ if (arg1.isEmpty()) {
+ throw css::lang::IllegalArgumentException(
+ "CLiteral::initialize: argument is not valid language", *this, 1);
+ }
+ m_Language = arg1;
+ } else if (aArguments[1] >>= xURI) {
+ if (!xURI.is()) {
throw css::lang::IllegalArgumentException(
- "CLiteral::initialize: argument must be string or URI", *this, 1);
+ "CLiteral::initialize: argument is null", *this, 1);
}
+ m_xDatatype = xURI;
+ } else {
+ throw css::lang::IllegalArgumentException(
+ "CLiteral::initialize: argument must be string or URI", *this, 1);
}
}