summaryrefslogtreecommitdiff
path: root/xmloff
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 /xmloff
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 'xmloff')
-rw-r--r--xmloff/source/meta/MetaImportComponent.cxx8
-rw-r--r--xmloff/source/meta/xmlmetai.cxx5
2 files changed, 6 insertions, 7 deletions
diff --git a/xmloff/source/meta/MetaImportComponent.cxx b/xmloff/source/meta/MetaImportComponent.cxx
index 98fe47608ca3..2ba733d1abc0 100644
--- a/xmloff/source/meta/MetaImportComponent.cxx
+++ b/xmloff/source/meta/MetaImportComponent.cxx
@@ -77,9 +77,9 @@ SvXMLImportContext* XMLMetaImportComponent::CreateContext(
IsXMLToken(rLocalName, XML_DOCUMENT_META) )
{
if (!mxDocProps.is()) {
- throw uno::RuntimeException(OUString(
+ throw uno::RuntimeException(
"XMLMetaImportComponent::CreateContext: setTargetDocument "
- "has not been called"), *this);
+ "has not been called", *this);
}
return new SvXMLMetaDocumentContext(
*this, nPrefix, rLocalName, mxDocProps);
@@ -95,9 +95,9 @@ void SAL_CALL XMLMetaImportComponent::setTargetDocument(
{
mxDocProps.set( xDoc, uno::UNO_QUERY );
if( !mxDocProps.is() )
- throw lang::IllegalArgumentException(OUString(
+ throw lang::IllegalArgumentException(
"XMLMetaImportComponent::setTargetDocument: argument is no "
- "XDocumentProperties"), uno::Reference<uno::XInterface>(*this), 0);
+ "XDocumentProperties", uno::Reference<uno::XInterface>(*this), 0);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/source/meta/xmlmetai.cxx b/xmloff/source/meta/xmlmetai.cxx
index 459f3cfd7c8f..82e2d8e4c979 100644
--- a/xmloff/source/meta/xmlmetai.cxx
+++ b/xmloff/source/meta/xmlmetai.cxx
@@ -116,9 +116,8 @@ lcl_initDocumentProperties(SvXMLImport & rImport,
throw;
} catch (const uno::Exception& e) {
throw lang::WrappedTargetRuntimeException(
- OUString(
- "SvXMLMetaDocumentContext::initDocumentProperties: "
- "properties init exception"),
+ "SvXMLMetaDocumentContext::initDocumentProperties: "
+ "properties init exception",
rImport, makeAny(e));
}
}