summaryrefslogtreecommitdiff
path: root/unoxml
diff options
context:
space:
mode:
authorNorbert Thiebaud <nthiebaud@gmail.com>2012-06-02 17:55:00 -0500
committerNorbert Thiebaud <nthiebaud@gmail.com>2012-06-02 17:57:18 -0500
commitbcce59d5ffa3c3b17f0894347d7138e126782952 (patch)
tree2c6821673ce370058a87540168582337154da555 /unoxml
parent11ccf6b59c4db4673718ca2b3b24d4623ac5e406 (diff)
targeted string re-work
Change-Id: Ic547a05d2540a9fb70a38b3717cb4e87726a74a5
Diffstat (limited to 'unoxml')
-rw-r--r--unoxml/source/rdf/CBlankNode.cxx18
-rw-r--r--unoxml/source/rdf/CLiteral.cxx30
-rw-r--r--unoxml/source/rdf/CURI.cxx39
3 files changed, 41 insertions, 46 deletions
diff --git a/unoxml/source/rdf/CBlankNode.cxx b/unoxml/source/rdf/CBlankNode.cxx
index 0a937180d471..0f296cd10521 100644
--- a/unoxml/source/rdf/CBlankNode.cxx
+++ b/unoxml/source/rdf/CBlankNode.cxx
@@ -101,15 +101,15 @@ void SAL_CALL CBlankNode::initialize(const css::uno::Sequence< ::com::sun::star:
{
if (aArguments.getLength() != 1) {
throw css::lang::IllegalArgumentException(
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CBlankNode::initialize: "
- "must give exactly 1 argument")), *this, 1);
+ ::rtl::OUString("CBlankNode::initialize: "
+ "must give exactly 1 argument"), *this, 1);
}
::rtl::OUString arg;
if (!(aArguments[0] >>= arg)) {
throw css::lang::IllegalArgumentException(
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CBlankNode::initialize: "
- "argument must be string")), *this, 0);
+ ::rtl::OUString("CBlankNode::initialize: "
+ "argument must be string"), *this, 0);
}
//FIXME: what is legal?
@@ -117,8 +117,8 @@ void SAL_CALL CBlankNode::initialize(const css::uno::Sequence< ::com::sun::star:
m_NodeID = arg;
} else {
throw css::lang::IllegalArgumentException(
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CBlankNode::initialize: "
- "argument is not valid blank node ID")), *this, 0);
+ ::rtl::OUString("CBlankNode::initialize: "
+ "argument is not valid blank node ID"), *this, 0);
}
}
@@ -136,15 +136,13 @@ void SAL_CALL CBlankNode::initialize(const css::uno::Sequence< ::com::sun::star:
namespace comp_CBlankNode {
::rtl::OUString SAL_CALL _getImplementationName() {
- return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
- "CBlankNode"));
+ return ::rtl::OUString( "CBlankNode");
}
css::uno::Sequence< ::rtl::OUString > SAL_CALL _getSupportedServiceNames()
{
css::uno::Sequence< ::rtl::OUString > s(1);
- s[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.rdf.BlankNode"));
+ s[0] = ::rtl::OUString( "com.sun.star.rdf.BlankNode");
return s;
}
diff --git a/unoxml/source/rdf/CLiteral.cxx b/unoxml/source/rdf/CLiteral.cxx
index 38e585fe137f..16dbff3d5351 100644
--- a/unoxml/source/rdf/CLiteral.cxx
+++ b/unoxml/source/rdf/CLiteral.cxx
@@ -111,23 +111,23 @@ void SAL_CALL CLiteral::initialize(const css::uno::Sequence< ::com::sun::star::u
const sal_Int32 len( aArguments.getLength() );
if (len < 1 || len > 2) {
throw css::lang::IllegalArgumentException(
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CLiteral::initialize: "
- "must give 1 or 2 argument(s)")), *this, 2);
+ ::rtl::OUString("CLiteral::initialize: "
+ "must give 1 or 2 argument(s)"), *this, 2);
}
::rtl::OUString arg0;
if (!(aArguments[0] >>= arg0)) {
throw css::lang::IllegalArgumentException(
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CLiteral::initialize: "
- "argument must be string")), *this, 0);
+ ::rtl::OUString("CLiteral::initialize: "
+ "argument must be string"), *this, 0);
}
//FIXME: what is legal?
if (true) {
m_Value = arg0;
} else {
throw css::lang::IllegalArgumentException(
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CLiteral::initialize: "
- "argument is not valid literal value")), *this, 0);
+ ::rtl::OUString("CLiteral::initialize: "
+ "argument is not valid literal value"), *this, 0);
}
if (len > 1) {
@@ -138,21 +138,21 @@ void SAL_CALL CLiteral::initialize(const css::uno::Sequence< ::com::sun::star::u
m_Language = arg1;
} else {
throw css::lang::IllegalArgumentException(
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CLiteral::initialize: "
- "argument is not valid language")), *this, 1);
+ ::rtl::OUString("CLiteral::initialize: "
+ "argument is not valid language"), *this, 1);
}
} else if ((aArguments[1] >>= xURI)) {
if (xURI.is()) {
m_xDatatype = xURI;
} else {
throw css::lang::IllegalArgumentException(
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CLiteral::initialize: "
- "argument is null")), *this, 1);
+ ::rtl::OUString("CLiteral::initialize: "
+ "argument is null"), *this, 1);
}
} else {
throw css::lang::IllegalArgumentException(
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CLiteral::initialize: "
- "argument must be string or URI")), *this, 1);
+ ::rtl::OUString("CLiteral::initialize: "
+ "argument must be string or URI"), *this, 1);
}
}
}
@@ -199,15 +199,13 @@ css::uno::Reference< css::rdf::XURI > SAL_CALL CLiteral::getDatatype() throw (cs
namespace comp_CLiteral {
::rtl::OUString SAL_CALL _getImplementationName() {
- return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
- "CLiteral"));
+ return ::rtl::OUString( "CLiteral");
}
css::uno::Sequence< ::rtl::OUString > SAL_CALL _getSupportedServiceNames()
{
css::uno::Sequence< ::rtl::OUString > s(1);
- s[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.rdf.Literal"));
+ s[0] = ::rtl::OUString( "com.sun.star.rdf.Literal");
return s;
}
diff --git a/unoxml/source/rdf/CURI.cxx b/unoxml/source/rdf/CURI.cxx
index fe40ddb4e182..f657f73cbcd4 100644
--- a/unoxml/source/rdf/CURI.cxx
+++ b/unoxml/source/rdf/CURI.cxx
@@ -738,8 +738,8 @@ void SAL_CALL CURI::initFromConstant(const sal_Int16 i_Constant)
default:
throw css::lang::IllegalArgumentException(
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CURI::initialize: "
- "invalid URIs constant argument")), *this, 0);
+ ::rtl::OUString("CURI::initialize: "
+ "invalid URIs constant argument"), *this, 0);
}
m_Namespace = ::rtl::OUString::createFromAscii(ns).intern();
m_LocalName = ::rtl::OUString::createFromAscii(ln).intern();
@@ -752,8 +752,8 @@ void SAL_CALL CURI::initialize(const css::uno::Sequence< ::com::sun::star::uno::
sal_Int32 len = aArguments.getLength();
if ((len < 1) || (len > 2)) {
throw css::lang::IllegalArgumentException(
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CURI::initialize: "
- "must give 1 or 2 argument(s)")), *this, 2);
+ ::rtl::OUString("CURI::initialize: "
+ "must give 1 or 2 argument(s)"), *this, 2);
}
sal_Int16 arg(0);
@@ -763,22 +763,22 @@ void SAL_CALL CURI::initialize(const css::uno::Sequence< ::com::sun::star::uno::
// integer argument: constant from rdf::URIs
if (len != 1) {
throw css::lang::IllegalArgumentException(
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CURI::initialize: "
- "must give 1 int argument")), *this, 1);
+ ::rtl::OUString("CURI::initialize: "
+ "must give 1 int argument"), *this, 1);
}
initFromConstant(arg);
return;
}
if (!(aArguments[0] >>= arg0)) {
throw css::lang::IllegalArgumentException(
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CURI::initialize: "
- "argument must be string or short")), *this, 0);
+ ::rtl::OUString("CURI::initialize: "
+ "argument must be string or short"), *this, 0);
}
if (len > 1) {
if (!(aArguments[1] >>= arg1)) {
throw css::lang::IllegalArgumentException(
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CURI::initialize: "
- "argument must be string")), *this, 1);
+ ::rtl::OUString("CURI::initialize: "
+ "argument must be string"), *this, 1);
}
// just append the parameters and then split them again; seems simplest
arg0 = arg0 + arg1;
@@ -798,8 +798,8 @@ void SAL_CALL CURI::initialize(const css::uno::Sequence< ::com::sun::star::uno::
}
} else {
throw css::lang::IllegalArgumentException(
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CURI::initialize: "
- "argument not splittable: no separator [#/:]")), *this, 0);
+ ::rtl::OUString("CURI::initialize: "
+ "argument not splittable: no separator [#/:]"), *this, 0);
}
//FIXME: what is legal?
@@ -807,16 +807,16 @@ void SAL_CALL CURI::initialize(const css::uno::Sequence< ::com::sun::star::uno::
m_Namespace = arg0;
} else {
throw css::lang::IllegalArgumentException(
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CURI::initialize: "
- "argument is not valid namespace")), *this, 0);
+ ::rtl::OUString("CURI::initialize: "
+ "argument is not valid namespace"), *this, 0);
}
//FIXME: what is legal?
if (true) {
m_LocalName = arg1;
} else {
throw css::lang::IllegalArgumentException(
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CURI::initialize: "
- "argument is not valid local name")), *this, 1);
+ ::rtl::OUString("CURI::initialize: "
+ "argument is not valid local name"), *this, 1);
}
}
@@ -845,15 +845,14 @@ void SAL_CALL CURI::initialize(const css::uno::Sequence< ::com::sun::star::uno::
namespace comp_CURI {
::rtl::OUString SAL_CALL _getImplementationName() {
- return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
- "CURI"));
+ return ::rtl::OUString(
+ "CURI");
}
css::uno::Sequence< ::rtl::OUString > SAL_CALL _getSupportedServiceNames()
{
css::uno::Sequence< ::rtl::OUString > s(1);
- s[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.rdf.URI"));
+ s[0] = ::rtl::OUString( "com.sun.star.rdf.URI");
return s;
}