summaryrefslogtreecommitdiff
path: root/unoxml/source/rdf/CURI.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-01-27 16:09:54 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-01-28 09:22:55 +0000
commitf1d83ac45f08270f7f2dd7128056effd0251dc5e (patch)
tree55d924eaa7f55627039d44458d869ef65130fdf8 /unoxml/source/rdf/CURI.cxx
parent53d3755972bfd3bd2cd650edf91f1483038028c8 (diff)
loplugin:stringconstant check for unnecessary OUString constructor..
..calls when creating exceptions Change-Id: I3bc58a5aa4dc6f0508ecb88b3a843b96b8c7ebfe Reviewed-on: https://gerrit.libreoffice.org/33617 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'unoxml/source/rdf/CURI.cxx')
-rw-r--r--unoxml/source/rdf/CURI.cxx24
1 files changed, 8 insertions, 16 deletions
diff --git a/unoxml/source/rdf/CURI.cxx b/unoxml/source/rdf/CURI.cxx
index 0a6d903b1088..2b45f65a77d2 100644
--- a/unoxml/source/rdf/CURI.cxx
+++ b/unoxml/source/rdf/CURI.cxx
@@ -700,8 +700,7 @@ void SAL_CALL CURI::initFromConstant(const sal_Int16 i_Constant)
default:
throw css::lang::IllegalArgumentException(
- OUString("CURI::initialize: "
- "invalid URIs constant argument"), *this, 0);
+ "CURI::initialize: invalid URIs constant argument", *this, 0);
}
m_Namespace = OUString::createFromAscii(ns).intern();
m_LocalName = OUString::createFromAscii(ln).intern();
@@ -714,8 +713,7 @@ void SAL_CALL CURI::initialize(const css::uno::Sequence< css::uno::Any > & aArgu
sal_Int32 len = aArguments.getLength();
if ((len < 1) || (len > 2)) {
throw css::lang::IllegalArgumentException(
- OUString("CURI::initialize: "
- "must give 1 or 2 argument(s)"), *this, 2);
+ "CURI::initialize: must give 1 or 2 argument(s)", *this, 2);
}
sal_Int16 arg(0);
@@ -725,22 +723,19 @@ void SAL_CALL CURI::initialize(const css::uno::Sequence< css::uno::Any > & aArgu
// integer argument: constant from rdf::URIs
if (len != 1) {
throw css::lang::IllegalArgumentException(
- OUString("CURI::initialize: "
- "must give 1 int argument"), *this, 1);
+ "CURI::initialize: must give 1 int argument", *this, 1);
}
initFromConstant(arg);
return;
}
if (!(aArguments[0] >>= arg0)) {
throw css::lang::IllegalArgumentException(
- OUString("CURI::initialize: "
- "argument must be string or short"), *this, 0);
+ "CURI::initialize: argument must be string or short", *this, 0);
}
if (len > 1) {
if (!(aArguments[1] >>= arg1)) {
throw css::lang::IllegalArgumentException(
- OUString("CURI::initialize: "
- "argument must be string"), *this, 1);
+ "CURI::initialize: argument must be string", *this, 1);
}
// just append the parameters and then split them again; seems simplest
arg0 = arg0 + arg1;
@@ -760,8 +755,7 @@ void SAL_CALL CURI::initialize(const css::uno::Sequence< css::uno::Any > & aArgu
}
} else {
throw css::lang::IllegalArgumentException(
- OUString("CURI::initialize: "
- "argument not splittable: no separator [#/:]"), *this, 0);
+ "CURI::initialize: argument not splittable: no separator [#/:]", *this, 0);
}
//FIXME: what is legal?
@@ -769,16 +763,14 @@ void SAL_CALL CURI::initialize(const css::uno::Sequence< css::uno::Any > & aArgu
m_Namespace = arg0;
} else {
throw css::lang::IllegalArgumentException(
- OUString("CURI::initialize: "
- "argument is not valid namespace"), *this, 0);
+ "CURI::initialize: argument is not valid namespace", *this, 0);
}
//FIXME: what is legal?
if (true) {
m_LocalName = arg1;
} else {
throw css::lang::IllegalArgumentException(
- OUString("CURI::initialize: "
- "argument is not valid local name"), *this, 1);
+ "CURI::initialize: argument is not valid local name", *this, 1);
}
}