diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-01-27 16:09:54 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-01-28 09:22:55 +0000 |
commit | f1d83ac45f08270f7f2dd7128056effd0251dc5e (patch) | |
tree | 55d924eaa7f55627039d44458d869ef65130fdf8 /ucb/source/core/ucbcmds.cxx | |
parent | 53d3755972bfd3bd2cd650edf91f1483038028c8 (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 'ucb/source/core/ucbcmds.cxx')
-rw-r--r-- | ucb/source/core/ucbcmds.cxx | 39 |
1 files changed, 16 insertions, 23 deletions
diff --git a/ucb/source/core/ucbcmds.cxx b/ucb/source/core/ucbcmds.cxx index e93f056c8e37..22734ad82256 100644 --- a/ucb/source/core/ucbcmds.cxx +++ b/ucb/source/core/ucbcmds.cxx @@ -641,7 +641,7 @@ uno::Reference< ucb::XContent > createNew( { ucbhelper::cancelCommandExecution( uno::makeAny( lang::IllegalArgumentException( - OUString( "Unknown transfer operation!" ), + "Unknown transfer operation!", rContext.xProcessor, -1 ) ), rContext.xOrigEnv ); @@ -1028,7 +1028,7 @@ void handleNameClashRename( { ucbhelper::cancelCommandExecution( uno::makeAny( beans::UnknownPropertyException( - OUString( "Unable to get property 'Title' from new object!" ), + "Unable to get property 'Title' from new object!", rContext.xProcessor ) ), rContext.xOrigEnv ); // Unreachable @@ -1143,7 +1143,7 @@ void handleNameClashRename( ucbhelper::cancelCommandExecution( uno::makeAny( ucb::UnsupportedNameClashException( - OUString( "Unable to resolve name clash!" ), + "Unable to resolve name clash!", rContext.xProcessor, ucb::NameClash::RENAME ) ), rContext.xOrigEnv ); @@ -1164,8 +1164,7 @@ void globalTransfer_( { ucbhelper::cancelCommandExecution( uno::makeAny( beans::UnknownPropertyException( - OUString( "Unable to get property 'IsFolder' " - "from source object!" ), + "Unable to get property 'IsFolder' from source object!", rContext.xProcessor ) ), rContext.xOrigEnv ); // Unreachable @@ -1177,8 +1176,7 @@ void globalTransfer_( { ucbhelper::cancelCommandExecution( uno::makeAny( beans::UnknownPropertyException( - OUString( "Unable to get property 'IsDocument' " - "from source object!" ), + "Unable to get property 'IsDocument' from source object!", rContext.xProcessor ) ), rContext.xOrigEnv ); // Unreachable @@ -1338,9 +1336,8 @@ void globalTransfer_( // No chance to solve name clashes, because I'm not able to detect // whether there is one. throw ucb::UnsupportedNameClashException( - OUString( - "Unable to resolve name clashes, no chance to detect " - "that there is one!" ), + "Unable to resolve name clashes, no chance to detect " + "that there is one!", rContext.xProcessor, rContext.aArg.NameClash ); } @@ -1366,9 +1363,8 @@ void globalTransfer_( ucbhelper::cancelCommandExecution( uno::makeAny( ucb::UnsupportedNameClashException( - OUString( - "BUG: insert + replace == true MUST NOT " - "throw NameClashException." ), + "BUG: insert + replace == true MUST NOT " + "throw NameClashException.", rContext.xProcessor, rContext.aArg.NameClash ) ), rContext.xOrigEnv ); @@ -1414,9 +1410,8 @@ void globalTransfer_( case ABORT: throw ucb::CommandFailedException( - OUString( - "abort requested via interaction " - "handler" ), + "abort requested via interaction " + "handler", uno::Reference< uno::XInterface >(), aExc ); // break; @@ -1446,7 +1441,7 @@ void globalTransfer_( { // error setting title. Abort. throw ucb::CommandFailedException( - OUString( "error setting Title property!" ), + "error setting Title property!", uno::Reference< uno::XInterface >(), aExc ); } @@ -1464,9 +1459,8 @@ void globalTransfer_( ucbhelper::cancelCommandExecution( uno::makeAny( ucb::UnsupportedNameClashException( - OUString( - "default action, don't know how to " - "handle name clash" ), + "default action, don't know how to " + "handle name clash", rContext.xProcessor, rContext.aArg.NameClash ) ), rContext.xOrigEnv ); @@ -1786,9 +1780,8 @@ void UniversalContentBroker::globalTransfer( case ABORT: throw ucb::CommandFailedException( - OUString( - "abort requested via interaction " - "handler" ), + "abort requested via interaction " + "handler", uno::Reference< uno::XInterface >(), aExc ); // break; |