// css::lang::XInitialization: void SAL_CALL CLiteral::initialize(const css::uno::Sequence< css::uno::Any > & aArguments)
{ const sal_Int32 len( aArguments.getLength() ); if (len < 1 || len > 2) { throw css::lang::IllegalArgumentException(
u"CLiteral::initialize: must give 1 or 2 argument(s)"_ustr, *this, 2);
}
OUString arg0; if (!(aArguments[0] >>= arg0)) { throw css::lang::IllegalArgumentException(
u"CLiteral::initialize: argument must be string"_ustr, *this, 0);
} //FIXME: what is legal? if (!(true)) { throw css::lang::IllegalArgumentException(
u"CLiteral::initialize: argument is not valid literal value"_ustr, *this, 0);
}
m_Value = arg0;
if (len <= 1) return;
OUString arg1;
css::uno::Reference< css::rdf::XURI > xURI; if (aArguments[1] >>= arg1) { if (arg1.isEmpty()) { throw css::lang::IllegalArgumentException(
u"CLiteral::initialize: argument is not valid language"_ustr, *this, 1);
}
m_Language = arg1;
} elseif (aArguments[1] >>= xURI) { if (!xURI.is()) { throw css::lang::IllegalArgumentException(
u"CLiteral::initialize: argument is null"_ustr, *this, 1);
}
m_xDatatype = std::move(xURI);
} else { throw css::lang::IllegalArgumentException(
u"CLiteral::initialize: argument must be string or URI"_ustr, *this, 1);
}
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.