summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-07-30 12:16:31 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-07-31 08:25:07 +0200
commitc9253818ec8252169c20450b41878be459568d95 (patch)
tree1f271151725042f33c3c8aa3988343bcd7f89e12 /framework
parent242a796a71e29a1d8cdc4dd71d2465b898db32ab (diff)
loplugin:oncevar
extend oncevar to any POD type Change-Id: Ia98ee0a67f183e40fb0c38477760124b2c411dc0 Reviewed-on: https://gerrit.libreoffice.org/40564 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'framework')
-rw-r--r--framework/source/fwe/xml/xmlnamespaces.cxx12
-rw-r--r--framework/source/services/substitutepathvars.cxx3
2 files changed, 5 insertions, 10 deletions
diff --git a/framework/source/fwe/xml/xmlnamespaces.cxx b/framework/source/fwe/xml/xmlnamespaces.cxx
index a658cf12961e..6909508f78a5 100644
--- a/framework/source/fwe/xml/xmlnamespaces.cxx
+++ b/framework/source/fwe/xml/xmlnamespaces.cxx
@@ -60,8 +60,7 @@ void XMLNamespaces::addNamespace( const OUString& aName, const OUString& aValue
else
{
// a xml namespace without name is not allowed (e.g. "xmlns:" )
- OUString aErrorMessage( "A xml namespace without name is not allowed!" );
- throw SAXException( aErrorMessage, Reference< XInterface >(), Any() );
+ throw SAXException( "A xml namespace without name is not allowed!", Reference< XInterface >(), Any() );
}
}
@@ -69,8 +68,7 @@ void XMLNamespaces::addNamespace( const OUString& aName, const OUString& aValue
{
// namespace should be reseted - as xml draft states this is only allowed
// for the default namespace - check and throw exception if check fails
- OUString aErrorMessage( "Clearing xml namespace only allowed for default namespace!" );
- throw SAXException( aErrorMessage, Reference< XInterface >(), Any() );
+ throw SAXException( "Clearing xml namespace only allowed for default namespace!", Reference< XInterface >(), Any() );
}
else
{
@@ -108,8 +106,7 @@ OUString XMLNamespaces::applyNSToAttributeName( const OUString& aName ) const
else
{
// attribute with namespace but without name "namespace:" is not allowed!!
- OUString aErrorMessage( "Attribute has no name only preceding namespace!" );
- throw SAXException( aErrorMessage, Reference< XInterface >(), Any() );
+ throw SAXException( "Attribute has no name only preceding namespace!", Reference< XInterface >(), Any() );
}
}
@@ -143,8 +140,7 @@ OUString XMLNamespaces::applyNSToElementName( const OUString& aName ) const
else
{
// attribute with namespace but without a name is not allowed (e.g. "cfg:" )
- OUString aErrorMessage( "Attribute has no name only preceding namespace!" );
- throw SAXException( aErrorMessage, Reference< XInterface >(), Any() );
+ throw SAXException( "Attribute has no name only preceding namespace!", Reference< XInterface >(), Any() );
}
}
else
diff --git a/framework/source/services/substitutepathvars.cxx b/framework/source/services/substitutepathvars.cxx
index a266af912c8f..ee5fcaffdb64 100644
--- a/framework/source/services/substitutepathvars.cxx
+++ b/framework/source/services/substitutepathvars.cxx
@@ -477,8 +477,7 @@ OUString SubstitutePathVariables::impl_substituteVariable( const OUString& rText
// recursion depth reached!
if ( bSubstRequired )
{
- OUString aMsg( "Endless recursion detected. Cannot substitute variables!" );
- throw NoSuchElementException( aMsg, static_cast<cppu::OWeakObject *>(this) );
+ throw NoSuchElementException( "Endless recursion detected. Cannot substitute variables!", static_cast<cppu::OWeakObject *>(this) );
}
else
aResult = rText;