summaryrefslogtreecommitdiffstats
path: root/ucb
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 /ucb
parentgbuild-to-ide, add pr module sources (diff)
downloadcore-f1d83ac45f08270f7f2dd7128056effd0251dc5e.tar.gz
core-f1d83ac45f08270f7f2dd7128056effd0251dc5e.zip
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')
-rw-r--r--ucb/source/core/ucb.cxx4
-rw-r--r--ucb/source/core/ucbcmds.cxx39
-rw-r--r--ucb/source/ucp/cmis/cmis_content.cxx12
-rw-r--r--ucb/source/ucp/cmis/cmis_repo_content.cxx2
-rw-r--r--ucb/source/ucp/file/filglob.cxx11
-rw-r--r--ucb/source/ucp/file/filstr.cxx2
-rw-r--r--ucb/source/ucp/ftp/ftpcontent.cxx14
-rw-r--r--ucb/source/ucp/gio/gio_content.cxx8
-rw-r--r--ucb/source/ucp/hierarchy/hierarchycontent.cxx50
-rw-r--r--ucb/source/ucp/package/pkgcontent.cxx73
-rw-r--r--ucb/source/ucp/tdoc/tdoc_content.cxx89
-rw-r--r--ucb/source/ucp/tdoc/tdoc_documentcontentfactory.cxx3
-rw-r--r--ucb/source/ucp/tdoc/tdoc_provider.cxx11
-rw-r--r--ucb/source/ucp/tdoc/tdoc_storage.cxx33
-rw-r--r--ucb/source/ucp/webdav-neon/webdavcontent.cxx68
15 files changed, 188 insertions, 231 deletions
diff --git a/ucb/source/core/ucb.cxx b/ucb/source/core/ucb.cxx
index 025d5537bb84..d363044f6d19 100644
--- a/ucb/source/core/ucb.cxx
+++ b/ucb/source/core/ucb.cxx
@@ -638,7 +638,7 @@ Any SAL_CALL UniversalContentBroker::execute(
{
ucbhelper::cancelCommandExecution(
makeAny( IllegalArgumentException(
- OUString( "Wrong argument type!" ),
+ "Wrong argument type!",
static_cast< cppu::OWeakObject * >( this ),
-1 ) ),
Environment );
@@ -662,7 +662,7 @@ Any SAL_CALL UniversalContentBroker::execute(
{
ucbhelper::cancelCommandExecution(
makeAny( IllegalArgumentException(
- OUString( "Wrong argument type!" ),
+ "Wrong argument type!",
static_cast< cppu::OWeakObject * >( this ),
-1 ) ),
Environment );
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;
diff --git a/ucb/source/ucp/cmis/cmis_content.cxx b/ucb/source/ucp/cmis/cmis_content.cxx
index 7d0ab609edce..5296e79fa4b8 100644
--- a/ucb/source/ucp/cmis/cmis_content.cxx
+++ b/ucb/source/ucp/cmis/cmis_content.cxx
@@ -595,7 +595,7 @@ namespace cmis
uno::Any Content::getBadArgExcept()
{
return uno::makeAny( lang::IllegalArgumentException(
- OUString("Wrong argument type!"),
+ "Wrong argument type!",
static_cast< cppu::OWeakObject * >( this ), -1) );
}
@@ -1272,7 +1272,7 @@ namespace cmis
ucbhelper::cancelCommandExecution(
uno::makeAny(
ucb::InteractiveBadTransferURLException(
- OUString("Unsupported URL scheme!"),
+ "Unsupported URL scheme!",
static_cast< cppu::OWeakObject * >( this ) ) ),
xEnv );
}
@@ -1479,7 +1479,7 @@ namespace cmis
rValue.Name == "Size" ||
rValue.Name == "CreatableContentsInfo" )
{
- lang::IllegalAccessException e ( OUString("Property is read-only!"),
+ lang::IllegalAccessException e ( "Property is read-only!",
static_cast< cppu::OWeakObject* >( this ) );
aRet[ n ] <<= e;
}
@@ -1489,7 +1489,7 @@ namespace cmis
if (!( rValue.Value >>= aNewTitle ))
{
aRet[ n ] <<= beans::IllegalTypeException
- ( OUString("Property value has wrong type!"),
+ ( "Property value has wrong type!",
static_cast< cppu::OWeakObject * >( this ) );
continue;
}
@@ -1497,7 +1497,7 @@ namespace cmis
if ( aNewTitle.getLength() <= 0 )
{
aRet[ n ] <<= lang::IllegalArgumentException
- ( OUString("Empty title not allowed!"),
+ ( "Empty title not allowed!",
static_cast< cppu::OWeakObject * >( this ), -1 );
continue;
@@ -1509,7 +1509,7 @@ namespace cmis
else
{
SAL_INFO( "ucb.ucp.cmis", "Couldn't set property: " << rValue.Name );
- lang::IllegalAccessException e ( OUString("Property is read-only!"),
+ lang::IllegalAccessException e ( "Property is read-only!",
static_cast< cppu::OWeakObject* >( this ) );
aRet[ n ] <<= e;
}
diff --git a/ucb/source/ucp/cmis/cmis_repo_content.cxx b/ucb/source/ucp/cmis/cmis_repo_content.cxx
index a1a4bd0bedcd..a008c9b92dff 100644
--- a/ucb/source/ucp/cmis/cmis_repo_content.cxx
+++ b/ucb/source/ucp/cmis/cmis_repo_content.cxx
@@ -72,7 +72,7 @@ namespace cmis
uno::Any RepoContent::getBadArgExcept()
{
return uno::makeAny( lang::IllegalArgumentException(
- OUString("Wrong argument type!"),
+ "Wrong argument type!",
static_cast< cppu::OWeakObject * >( this ), -1) );
}
diff --git a/ucb/source/ucp/file/filglob.cxx b/ucb/source/ucp/file/filglob.cxx
index 49d08c6f166d..9700d66ddbca 100644
--- a/ucb/source/ucp/file/filglob.cxx
+++ b/ucb/source/ucp/file/filglob.cxx
@@ -506,7 +506,7 @@ namespace fileaccess {
OUString("ContentType");
aAny <<= MissingPropertiesException(
- OUString( "a property is missing, necessary to create a content"),
+ "a property is missing, necessary to create a content",
xComProc,
aSeq);
cancelCommandExecution(aAny,xEnv);
@@ -537,7 +537,7 @@ namespace fileaccess {
{
aAny <<=
MissingInputStreamException(
- OUString( "the inputstream is missing, necessary to create a content"),
+ "the inputstream is missing, necessary to create a content",
xComProc);
cancelCommandExecution(aAny,xEnv);
}
@@ -779,10 +779,9 @@ namespace fileaccess {
}
else if( errorCode == TASKHANDLING_TRANSFER_INVALIDSCHEME )
{
- aAny <<=
- InteractiveBadTransferURLException(
- OUString( "bad transfer url"),
- xComProc);
+ aAny <<= InteractiveBadTransferURLException(
+ "bad transfer url",
+ xComProc);
cancelCommandExecution( aAny,xEnv );
}
else if( errorCode == TASKHANDLING_OVERWRITE_FOR_MOVE ||
diff --git a/ucb/source/ucp/file/filstr.cxx b/ucb/source/ucp/file/filstr.cxx
index 20e4952ab5f3..31cd2a4e2351 100644
--- a/ucb/source/ucp/file/filstr.cxx
+++ b/ucb/source/ucp/file/filstr.cxx
@@ -265,7 +265,7 @@ void XStream_impl::waitForCompletion()
// afterwards, there appears to be no cheaper way than to call fsync:
if (m_nIsOpen && m_aFile.sync() != osl::FileBase::E_None) {
throw io::IOException(
- OUString( "could not synchronize file to disc"),
+ "could not synchronize file to disc",
static_cast< OWeakObject * >(this));
}
}
diff --git a/ucb/source/ucp/ftp/ftpcontent.cxx b/ucb/source/ucp/ftp/ftpcontent.cxx
index 2933e73820bb..4cde1893879d 100644
--- a/ucb/source/ucp/ftp/ftpcontent.cxx
+++ b/ucb/source/ucp/ftp/ftpcontent.cxx
@@ -386,7 +386,7 @@ Any SAL_CALL FTPContent::execute( const Command& aCommand,
if(!(aCommand.Argument >>= Properties))
{
aRet <<= IllegalArgumentException(
- OUString( "Wrong argument type!" ),
+ "Wrong argument type!",
static_cast< cppu::OWeakObject * >(this),
-1);
ucbhelper::cancelCommandExecution(aRet,Environment);
@@ -400,7 +400,7 @@ Any SAL_CALL FTPContent::execute( const Command& aCommand,
if( ! ( aCommand.Argument >>= propertyValues ) ) {
aRet <<= IllegalArgumentException(
- OUString( "Wrong argument type!" ),
+ "Wrong argument type!",
static_cast< cppu::OWeakObject * >(this),
-1);
ucbhelper::cancelCommandExecution(aRet,Environment);
@@ -421,7 +421,7 @@ Any SAL_CALL FTPContent::execute( const Command& aCommand,
InsertCommandArgument aInsertArgument;
if ( ! ( aCommand.Argument >>= aInsertArgument ) ) {
aRet <<= IllegalArgumentException(
- OUString( "Wrong argument type!" ),
+ "Wrong argument type!",
static_cast< cppu::OWeakObject * >(this),
-1);
ucbhelper::cancelCommandExecution(aRet,Environment);
@@ -436,7 +436,7 @@ Any SAL_CALL FTPContent::execute( const Command& aCommand,
OpenCommandArgument2 aOpenCommand;
if ( !( aCommand.Argument >>= aOpenCommand ) ) {
aRet <<= IllegalArgumentException(
- OUString( "Wrong argument type!" ),
+ "Wrong argument type!",
static_cast< cppu::OWeakObject * >(this),
-1);
@@ -526,7 +526,7 @@ Any SAL_CALL FTPContent::execute( const Command& aCommand,
}
else {
aRet <<= IllegalArgumentException(
- OUString( "Unexpected OpenMode!" ),
+ "Unexpected OpenMode!",
static_cast< cppu::OWeakObject * >(this),
-1);
@@ -538,7 +538,7 @@ Any SAL_CALL FTPContent::execute( const Command& aCommand,
ucbhelper::cancelCommandExecution(
makeAny(
IllegalArgumentException(
- OUString( "Wrong argument type!" ),
+ "Wrong argument type!",
static_cast< cppu::OWeakObject * >(this),
-1)),
Environment);
@@ -849,7 +849,7 @@ Sequence<Any> FTPContent::setPropertyValues(
for(sal_Int32 j = 0; j < props.getLength(); ++j)
if(props[j].Name == seqPropVal[i].Name) {
ret[i] <<= IllegalAccessException(
- OUString( "Property is read-only!"),
+ "Property is read-only!",
//props[j].Attributes & PropertyAttribute::READONLY
// ? "Property is read-only!"
// : "Access denied!"),
diff --git a/ucb/source/ucp/gio/gio_content.cxx b/ucb/source/ucp/gio/gio_content.cxx
index 6b193765dcf3..15712d99b170 100644
--- a/ucb/source/ucp/gio/gio_content.cxx
+++ b/ucb/source/ucp/gio/gio_content.cxx
@@ -311,7 +311,7 @@ uno::Any Content::mapGIOError( GError *pError )
uno::Any Content::getBadArgExcept()
{
return uno::makeAny( lang::IllegalArgumentException(
- OUString("Wrong argument type!"),
+ "Wrong argument type!",
static_cast< cppu::OWeakObject * >( this ), -1) );
}
@@ -697,7 +697,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues(
if (!( rValue.Value >>= aNewTitle ))
{
aRet[ n ] <<= beans::IllegalTypeException
- ( OUString("Property value has wrong type!"),
+ ( "Property value has wrong type!",
static_cast< cppu::OWeakObject * >( this ) );
continue;
}
@@ -705,7 +705,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues(
if ( aNewTitle.getLength() <= 0 )
{
aRet[ n ] <<= lang::IllegalArgumentException
- ( OUString("Empty title not allowed!"),
+ ( "Empty title not allowed!",
static_cast< cppu::OWeakObject * >( this ), -1 );
continue;
@@ -761,7 +761,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues(
if (!exchangeIdentity( xNewId ) )
{
aRet[ nTitlePos ] <<= uno::Exception
- ( OUString("Exchange failed!"),
+ ( "Exchange failed!",
static_cast< cppu::OWeakObject * >( this ) );
}
}
diff --git a/ucb/source/ucp/hierarchy/hierarchycontent.cxx b/ucb/source/ucp/hierarchy/hierarchycontent.cxx
index 2d6d3dedf114..114a37df3fe8 100644
--- a/ucb/source/ucp/hierarchy/hierarchycontent.cxx
+++ b/ucb/source/ucp/hierarchy/hierarchycontent.cxx
@@ -343,7 +343,7 @@ uno::Any SAL_CALL HierarchyContent::execute(
{
ucbhelper::cancelCommandExecution(
uno::makeAny( lang::IllegalArgumentException(
- OUString( "Wrong argument type!" ),
+ "Wrong argument type!",
static_cast< cppu::OWeakObject * >( this ),
-1 ) ),
Environment );
@@ -363,7 +363,7 @@ uno::Any SAL_CALL HierarchyContent::execute(
{
ucbhelper::cancelCommandExecution(
uno::makeAny( lang::IllegalArgumentException(
- OUString( "Wrong argument type!" ),
+ "Wrong argument type!",
static_cast< cppu::OWeakObject * >( this ),
-1 ) ),
Environment );
@@ -374,7 +374,7 @@ uno::Any SAL_CALL HierarchyContent::execute(
{
ucbhelper::cancelCommandExecution(
uno::makeAny( lang::IllegalArgumentException(
- OUString( "No properties!" ),
+ "No properties!",
static_cast< cppu::OWeakObject * >( this ),
-1 ) ),
Environment );
@@ -410,7 +410,7 @@ uno::Any SAL_CALL HierarchyContent::execute(
{
ucbhelper::cancelCommandExecution(
uno::makeAny( lang::IllegalArgumentException(
- OUString( "Wrong argument type!" ),
+ "Wrong argument type!",
static_cast< cppu::OWeakObject * >( this ),
-1 ) ),
Environment );
@@ -433,7 +433,7 @@ uno::Any SAL_CALL HierarchyContent::execute(
{
ucbhelper::cancelCommandExecution(
uno::makeAny( lang::IllegalArgumentException(
- OUString( "Wrong argument type!" ),
+ "Wrong argument type!",
static_cast< cppu::OWeakObject * >( this ),
-1 ) ),
Environment );
@@ -492,7 +492,7 @@ uno::Any SAL_CALL HierarchyContent::execute(
OSL_FAIL( "Wrong argument type!" );
ucbhelper::cancelCommandExecution(
uno::makeAny( lang::IllegalArgumentException(
- OUString( "Wrong argument type!" ),
+ "Wrong argument type!",
static_cast< cppu::OWeakObject * >( this ),
-1 ) ),
Environment );
@@ -514,7 +514,7 @@ uno::Any SAL_CALL HierarchyContent::execute(
OSL_FAIL( "Wrong argument type!" );
ucbhelper::cancelCommandExecution(
uno::makeAny( lang::IllegalArgumentException(
- OUString( "Wrong argument type!" ),
+ "Wrong argument type!",
static_cast< cppu::OWeakObject * >( this ),
-1 ) ),
Environment );
@@ -1080,28 +1080,28 @@ uno::Sequence< uno::Any > HierarchyContent::setPropertyValues(
{
// Read-only property!
aRet[ n ] <<= lang::IllegalAccessException(
- OUString( "Property is read-only!" ),
+ "Property is read-only!",
static_cast< cppu::OWeakObject * >( this ) );
}
else if ( rValue.Name == "IsDocument" )
{
// Read-only property!
aRet[ n ] <<= lang::IllegalAccessException(
- OUString( "Property is read-only!" ),
+ "Property is read-only!",
static_cast< cppu::OWeakObject * >( this ) );
}
else if ( rValue.Name == "IsFolder" )
{
// Read-only property!
aRet[ n ] <<= lang::IllegalAccessException(
- OUString( "Property is read-only!" ),
+ "Property is read-only!",
static_cast< cppu::OWeakObject * >( this ) );
}
else if ( rValue.Name == "CreatableContentsInfo" )
{
// Read-only property!
aRet[ n ] <<= lang::IllegalAccessException(
- OUString( "Property is read-only!" ),
+ "Property is read-only!",
static_cast< cppu::OWeakObject * >( this ) );
}
else if ( rValue.Name == "Title" )
@@ -1109,7 +1109,7 @@ uno::Sequence< uno::Any > HierarchyContent::setPropertyValues(
if ( isReadOnly() )
{
aRet[ n ] <<= lang::IllegalAccessException(
- OUString( "Property is read-only!" ),
+ "Property is read-only!",
static_cast< cppu::OWeakObject * >( this ) );
}
else
@@ -1144,7 +1144,7 @@ uno::Sequence< uno::Any > HierarchyContent::setPropertyValues(
else
{
aRet[ n ] <<= lang::IllegalArgumentException(
- OUString( "Empty title not allowed!" ),
+ "Empty title not allowed!",
static_cast< cppu::OWeakObject * >( this ),
-1 );
}
@@ -1152,7 +1152,7 @@ uno::Sequence< uno::Any > HierarchyContent::setPropertyValues(
else
{
aRet[ n ] <<= beans::IllegalTypeException(
- OUString( "Property value has wrong type!" ),
+ "Property value has wrong type!",
static_cast< cppu::OWeakObject * >( this ) );
}
}
@@ -1162,7 +1162,7 @@ uno::Sequence< uno::Any > HierarchyContent::setPropertyValues(
if ( isReadOnly() )
{
aRet[ n ] <<= lang::IllegalAccessException(
- OUString( "Property is read-only!" ),
+ "Property is read-only!",
static_cast< cppu::OWeakObject * >( this ) );
}
else
@@ -1194,7 +1194,7 @@ uno::Sequence< uno::Any > HierarchyContent::setPropertyValues(
else
{
aRet[ n ] <<= lang::IllegalArgumentException(
- OUString( "Empty target URL not allowed!" ),
+ "Empty target URL not allowed!",
static_cast< cppu::OWeakObject * >( this ),
-1 );
}
@@ -1202,14 +1202,14 @@ uno::Sequence< uno::Any > HierarchyContent::setPropertyValues(
else
{
aRet[ n ] <<= beans::IllegalTypeException(
- OUString( "Property value has wrong type!" ),
+ "Property value has wrong type!",
static_cast< cppu::OWeakObject * >( this ) );
}
}
else
{
aRet[ n ] <<= beans::UnknownPropertyException(
- OUString( "TargetURL only supported by links!" ),
+ "TargetURL only supported by links!",
static_cast< cppu::OWeakObject * >( this ) );
}
}
@@ -1263,7 +1263,7 @@ uno::Sequence< uno::Any > HierarchyContent::setPropertyValues(
else
{
aRet[ n ] <<= uno::Exception(
- OUString( "No property set for storing the value!" ),
+ "No property set for storing the value!",
static_cast< cppu::OWeakObject * >( this ) );
}
}
@@ -1297,7 +1297,7 @@ uno::Sequence< uno::Any > HierarchyContent::setPropertyValues(
// Set error .
aRet[ nTitlePos ] <<= uno::Exception(
- OUString("Exchange failed!"),
+ "Exchange failed!",
static_cast< cppu::OWeakObject * >( this ) );
}
}
@@ -1358,7 +1358,7 @@ void HierarchyContent::insert( sal_Int32 nNameClashResolve,
{
ucbhelper::cancelCommandExecution(
uno::makeAny( ucb::UnsupportedCommandException(
- OUString( "Not supported by root folder!" ),
+ "Not supported by root folder!",
static_cast< cppu::OWeakObject * >( this ) ) ),
xEnv );
// Unreachable
@@ -1426,7 +1426,7 @@ void HierarchyContent::insert( sal_Int32 nNameClashResolve,
ucbhelper::cancelCommandExecution(
uno::makeAny(
ucb::UnsupportedNameClashException(
- OUString( "Unable to resolve name clash!" ),
+ "Unable to resolve name clash!",
static_cast< cppu::OWeakObject * >( this ),
nNameClashResolve ) ),
xEnv );
@@ -1507,7 +1507,7 @@ void HierarchyContent::destroy( bool bDeletePhysical,
{
ucbhelper::cancelCommandExecution(
uno::makeAny( ucb::UnsupportedCommandException(
- OUString( "Not persistent!" ),
+ "Not persistent!",
static_cast< cppu::OWeakObject * >( this ) ) ),
xEnv );
// Unreachable
@@ -1518,7 +1518,7 @@ void HierarchyContent::destroy( bool bDeletePhysical,
{
ucbhelper::cancelCommandExecution(
uno::makeAny( ucb::UnsupportedCommandException(
- OUString( "Not supported by root folder!" ),
+ "Not supported by root folder!",
static_cast< cppu::OWeakObject * >( this ) ) ),
xEnv );
// Unreachable
@@ -1559,7 +1559,7 @@ void HierarchyContent::transfer(
{
ucbhelper::cancelCommandExecution(
uno::makeAny( ucb::UnsupportedCommandException(
- OUString( "Not persistent!" ),
+ "Not persistent!",
static_cast< cppu::OWeakObject * >( this ) ) ),
xEnv );
// Unreachable
diff --git a/ucb/source/ucp/package/pkgcontent.cxx b/ucb/source/ucp/package/pkgcontent.cxx
index 5a4153124bd6..7d7285b61d94 100644
--- a/ucb/source/ucp/package/pkgcontent.cxx
+++ b/ucb/source/ucp/package/pkgcontent.cxx
@@ -438,7 +438,7 @@ uno::Any SAL_CALL Content::execute(
{
ucbhelper::cancelCommandExecution(
uno::makeAny( lang::IllegalArgumentException(
- OUString( "Wrong argument type!" ),
+ "Wrong argument type!",
static_cast< cppu::OWeakObject * >( this ),
-1 ) ),
Environment );
@@ -458,7 +458,7 @@ uno::Any SAL_CALL Content::execute(
{
ucbhelper::cancelCommandExecution(
uno::makeAny( lang::IllegalArgumentException(
- OUString( "Wrong argument type!" ),
+ "Wrong argument type!",
static_cast< cppu::OWeakObject * >( this ),
-1 ) ),
Environment );
@@ -469,7 +469,7 @@ uno::Any SAL_CALL Content::execute(
{
ucbhelper::cancelCommandExecution(
uno::makeAny( lang::IllegalArgumentException(
- OUString( "No properties!" ),
+ "No properties!",
static_cast< cppu::OWeakObject * >( this ),
-1 ) ),
Environment );
@@ -507,7 +507,7 @@ uno::Any SAL_CALL Content::execute(
{
ucbhelper::cancelCommandExecution(
uno::makeAny( lang::IllegalArgumentException(
- OUString( "Wrong argument type!" ),
+ "Wrong argument type!",
static_cast< cppu::OWeakObject * >( this ),
-1 ) ),
Environment );
@@ -527,7 +527,7 @@ uno::Any SAL_CALL Content::execute(
{
ucbhelper::cancelCommandExecution(
uno::makeAny( lang::IllegalArgumentException(
- OUString( "Wrong argument type!" ),
+ "Wrong argument type!",
static_cast< cppu::OWeakObject * >( this ),
-1 ) ),
Environment );
@@ -584,7 +584,7 @@ uno::Any SAL_CALL Content::execute(
{
ucbhelper::cancelCommandExecution(
uno::makeAny( lang::IllegalArgumentException(
- OUString( "Wrong argument type!" ),
+ "Wrong argument type!",
static_cast< cppu::OWeakObject * >( this ),
-1 ) ),
Environment );
@@ -606,7 +606,7 @@ uno::Any SAL_CALL Content::execute(
OSL_FAIL( "Wrong argument type!" );
ucbhelper::cancelCommandExecution(
uno::makeAny( lang::IllegalArgumentException(
- OUString( "Wrong argument type!" ),
+ "Wrong argument type!",
static_cast< cppu::OWeakObject * >( this ),
-1 ) ),
Environment );
@@ -1038,32 +1038,28 @@ uno::Sequence< uno::Any > Content::setPropertyValues(
{
// Read-only property!
aRet[ n ] <<= lang::IllegalAccessException(
- OUString(
- "Property is read-only!" ),
+ "Property is read-only!",
static_cast< cppu::OWeakObject * >( this ) );
}
else if ( rValue.Name == "IsDocument" )
{
// Read-only property!
aRet[ n ] <<= lang::IllegalAccessException(
- OUString(
- "Property is read-only!" ),
+ "Property is read-only!",
static_cast< cppu::OWeakObject * >( this ) );
}
else if ( rValue.Name == "IsFolder" )
{
// Read-only property!
aRet[ n ] <<= lang::IllegalAccessException(
- OUString(
- "Property is read-only!" ),
+ "Property is read-only!",
static_cast< cppu::OWeakObject * >( this ) );
}
else if ( rValue.Name == "CreatableContentsInfo" )
{
// Read-only property!
aRet[ n ] <<= lang::IllegalAccessException(
- OUString(
- "Property is read-only!" ),
+ "Property is read-only!",
static_cast< cppu::OWeakObject * >( this ) );
}
else if ( rValue.Name == "Title" )
@@ -1072,8 +1068,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues(
{
// Read-only property!
aRet[ n ] <<= lang::IllegalAccessException(
- OUString(
- "Property is read-only!" ),
+ "Property is read-only!",
static_cast< cppu::OWeakObject * >( this ) );
}
else
@@ -1102,8 +1097,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues(
{
aRet[ n ] <<=
lang::IllegalArgumentException(
- OUString(
- "Empty title not allowed!" ),
+ "Empty title not allowed!",
static_cast< cppu::OWeakObject * >( this ),
-1 );
}
@@ -1112,8 +1106,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues(
{
aRet[ n ] <<=
beans::IllegalTypeException(
- OUString(
- "Property value has wrong type!" ),
+ "Property value has wrong type!",
static_cast< cppu::OWeakObject * >( this ) );
}
}
@@ -1138,8 +1131,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues(
else
{
aRet[ n ] <<= beans::IllegalTypeException(
- OUString(
- "Property value has wrong type!" ),
+ "Property value has wrong type!",
static_cast< cppu::OWeakObject * >( this ) );
}
}
@@ -1147,8 +1139,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues(
{
// Read-only property!
aRet[ n ] <<= lang::IllegalAccessException(
- OUString(
- "Property is read-only!" ),
+ "Property is read-only!",
static_cast< cppu::OWeakObject * >( this ) );
}
else if ( rValue.Name == "Compressed" )
@@ -1174,16 +1165,14 @@ uno::Sequence< uno::Any > Content::setPropertyValues(
else
{
aRet[ n ] <<= beans::IllegalTypeException(
- OUString(
- "Property value has wrong type!" ),
+ "Property value has wrong type!",
static_cast< cppu::OWeakObject * >( this ) );
}
}
else
{
aRet[ n ] <<= beans::UnknownPropertyException(
- OUString(
- "Compressed only supported by streams!" ),
+ "Compressed only supported by streams!",
static_cast< cppu::OWeakObject * >( this ) );
}
}
@@ -1210,16 +1199,14 @@ uno::Sequence< uno::Any > Content::setPropertyValues(
else
{
aRet[ n ] <<= beans::IllegalTypeException(
- OUString(
- "Property value has wrong type!" ),
+ "Property value has wrong type!",
static_cast< cppu::OWeakObject * >( this ) );
}
}
else
{
aRet[ n ] <<= beans::UnknownPropertyException(
- OUString(
- "Encrypted only supported by streams!" ),
+ "Encrypted only supported by streams!",
static_cast< cppu::OWeakObject * >( this ) );
}
}
@@ -1227,8 +1214,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues(
{
// Read-only property!
aRet[ n ] <<= lang::IllegalAccessException(
- OUString(
- "Property is read-only!" ),
+ "Property is read-only!",
static_cast< cppu::OWeakObject * >( this ) );
}
else if ( rValue.Name == "EncryptionKey" )
@@ -1259,16 +1245,14 @@ uno::Sequence< uno::Any > Content::setPropertyValues(
else
{
aRet[ n ] <<= beans::IllegalTypeException(
- OUString(
- "Property value has wrong type!" ),
+ "Property value has wrong type!",
static_cast< cppu::OWeakObject * >( this ) );
}
}
else
{
aRet[ n ] <<= beans::UnknownPropertyException(
- OUString(
- "EncryptionKey not supported by non-root folder!" ),
+ "EncryptionKey not supported by non-root folder!",
static_cast< cppu::OWeakObject * >( this ) );
}
}
@@ -1321,8 +1305,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues(
else
{
aRet[ n ] <<= uno::Exception(
- OUString(
- "No property set for storing the value!" ),
+ "No property set for storing the value!",
static_cast< cppu::OWeakObject * >( this ) );
}
}
@@ -1356,7 +1339,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues(
// Set error .
aRet[ nTitlePos ] <<= uno::Exception(
- OUString("Exchange failed!"),
+ "Exchange failed!",
static_cast< cppu::OWeakObject * >( this ) );
}
}
@@ -1639,7 +1622,7 @@ void Content::insert(
ucbhelper::cancelCommandExecution(
uno::makeAny(
ucb::UnsupportedNameClashException(
- OUString( "Unable to resolve name clash!" ),
+ "Unable to resolve name clash!",
static_cast< cppu::OWeakObject * >( this ),
nNameClashResolve ) ),
xEnv );
@@ -1729,7 +1712,7 @@ void Content::destroy(
{
ucbhelper::cancelCommandExecution(
uno::makeAny( ucb::UnsupportedCommandException(
- OUString( "Not persistent!" ),
+ "Not persistent!",
static_cast< cppu::OWeakObject * >( this ) ) ),
xEnv );
// Unreachable
@@ -1770,7 +1753,7 @@ void Content::transfer(
{
ucbhelper::cancelCommandExecution(
uno::makeAny( ucb::UnsupportedCommandException(
- OUString( "Not persistent!" ),
+ "Not persistent!",
static_cast< cppu::OWeakObject * >( this ) ) ),
xEnv );
// Unreachable
diff --git a/ucb/source/ucp/tdoc/tdoc_content.cxx b/ucb/source/ucp/tdoc/tdoc_content.cxx
index 5b5e5ec9f506..91eb14ca520c 100644
--- a/ucb/source/ucp/tdoc/tdoc_content.cxx
+++ b/ucb/source/ucp/tdoc/tdoc_content.cxx
@@ -363,7 +363,7 @@ uno::Any SAL_CALL Content::execute(
{
ucbhelper::cancelCommandExecution(
uno::makeAny( lang::IllegalArgumentException(
- OUString( "Wrong argument type!" ),
+ "Wrong argument type!",
static_cast< cppu::OWeakObject * >( this ),
-1 ) ),
Environment );
@@ -383,7 +383,7 @@ uno::Any SAL_CALL Content::execute(
{
ucbhelper::cancelCommandExecution(
uno::makeAny( lang::IllegalArgumentException(
- OUString( "Wrong argument type!" ),
+ "Wrong argument type!",
static_cast< cppu::OWeakObject * >( this ),
-1 ) ),
Environment );
@@ -394,7 +394,7 @@ uno::Any SAL_CALL Content::execute(
{
ucbhelper::cancelCommandExecution(
uno::makeAny( lang::IllegalArgumentException(
- OUString( "No properties!" ),
+ "No properties!",
static_cast< cppu::OWeakObject * >( this ),
-1 ) ),
Environment );
@@ -430,7 +430,7 @@ uno::Any SAL_CALL Content::execute(
{
ucbhelper::cancelCommandExecution(
uno::makeAny( lang::IllegalArgumentException(
- OUString( "Wrong argument type!" ),
+ "Wrong argument type!",
static_cast< cppu::OWeakObject * >( this ),
-1 ) ),
Environment );
@@ -450,8 +450,8 @@ uno::Any SAL_CALL Content::execute(
{
ucbhelper::cancelCommandExecution(
uno::makeAny( ucb::UnsupportedCommandException(
- OUString( "insert command only supported by "
- "folders and streams!" ),
+ "insert command only supported by "
+ "folders and streams!",
static_cast< cppu::OWeakObject * >( this ) ) ),
Environment );
// Unreachable
@@ -466,9 +466,9 @@ uno::Any SAL_CALL Content::execute(
{
ucbhelper::cancelCommandExecution(
uno::makeAny( ucb::UnsupportedCommandException(
- OUString( "insert command not supported by "
- "streams that are direct children "
- "of document root!" ),
+ "insert command not supported by "
+ "streams that are direct children "
+ "of document root!",
static_cast< cppu::OWeakObject * >(
this ) ) ),
Environment );
@@ -481,7 +481,7 @@ uno::Any SAL_CALL Content::execute(
{
ucbhelper::cancelCommandExecution(
uno::makeAny( lang::IllegalArgumentException(
- OUString( "Wrong argument type!" ),
+ "Wrong argument type!",
static_cast< cppu::OWeakObject * >( this ),
-1 ) ),
Environment );
@@ -507,8 +507,8 @@ uno::Any SAL_CALL Content::execute(
{
ucbhelper::cancelCommandExecution(
uno::makeAny( ucb::UnsupportedCommandException(
- OUString( "delete command only supported by "
- "folders and streams!" ),
+ "delete command only supported by "
+ "folders and streams!",
static_cast< cppu::OWeakObject * >(
this ) ) ),
Environment );
@@ -557,8 +557,8 @@ uno::Any SAL_CALL Content::execute(
{
ucbhelper::cancelCommandExecution(
uno::makeAny( ucb::UnsupportedCommandException(
- OUString( "transfer command only supported "
- "by folders and documents!" ),
+ "transfer command only supported "
+ "by folders and documents!",
static_cast< cppu::OWeakObject * >(
this ) ) ),
Environment );
@@ -572,7 +572,7 @@ uno::Any SAL_CALL Content::execute(
OSL_FAIL( "Wrong argument type!" );
ucbhelper::cancelCommandExecution(
uno::makeAny( lang::IllegalArgumentException(
- OUString( "Wrong argument type!" ),
+ "Wrong argument type!",
static_cast< cppu::OWeakObject * >( this ),
-1 ) ),
Environment );
@@ -595,9 +595,9 @@ uno::Any SAL_CALL Content::execute(
{
ucbhelper::cancelCommandExecution(
uno::makeAny( ucb::UnsupportedCommandException(
- OUString( "createNewContent command only "
- "supported by folders and "
- "documents!" ),
+ "createNewContent command only "
+ "supported by folders and "
+ "documents!",
static_cast< cppu::OWeakObject * >(
this ) ) ),
Environment );
@@ -611,7 +611,7 @@ uno::Any SAL_CALL Content::execute(
OSL_FAIL( "Wrong argument type!" );
ucbhelper::cancelCommandExecution(
uno::makeAny( lang::IllegalArgumentException(
- OUString( "Wrong argument type!" ),
+ "Wrong argument type!",
static_cast< cppu::OWeakObject * >( this ),
-1 ) ),
Environment );
@@ -1129,28 +1129,28 @@ uno::Sequence< uno::Any > Content::setPropertyValues(
{
// Read-only property!
aRet[ n ] <<= lang::IllegalAccessException(
- OUString( "Property is read-only!" ),
+ "Property is read-only!",
static_cast< cppu::OWeakObject * >( this ) );
}
else if ( rValue.Name == "IsDocument" )
{
// Read-only property!
aRet[ n ] <<= lang::IllegalAccessException(
- OUString( "Property is read-only!" ),
+ "Property is read-only!",
static_cast< cppu::OWeakObject * >( this ) );
}
else if ( rValue.Name == "IsFolder" )
{
// Read-only property!
aRet[ n ] <<= lang::IllegalAccessException(
- OUString( "Property is read-only!" ),
+ "Property is read-only!",
static_cast< cppu::OWeakObject * >( this ) );
}
else if ( rValue.Name == "CreatableContentsInfo" )
{
// Read-only property!
aRet[ n ] <<= lang::IllegalAccessException(
- OUString( "Property is read-only!" ),
+ "Property is read-only!",
static_cast< cppu::OWeakObject * >( this ) );
}
else if ( rValue.Name == "Title" )
@@ -1160,7 +1160,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues(
if ( ( eType == ROOT ) || ( eType == DOCUMENT ) )
{
aRet[ n ] <<= lang::IllegalAccessException(
- OUString( "Property is read-only!" ),
+ "Property is read-only!",
static_cast< cppu::OWeakObject * >( this ) );
}
else
@@ -1190,7 +1190,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues(
else
{
aRet[ n ] <<= lang::IllegalArgumentException(
- OUString( "Empty Title not allowed!" ),
+ "Empty Title not allowed!",
static_cast< cppu::OWeakObject * >( this ),
-1 );
}
@@ -1198,7 +1198,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues(
else
{
aRet[ n ] <<= beans::IllegalTypeException(
- OUString( "Title Property value has wrong type!" ),
+ "Title Property value has wrong type!",
static_cast< cppu::OWeakObject * >( this ) );
}
}
@@ -1209,14 +1209,14 @@ uno::Sequence< uno::Any > Content::setPropertyValues(
if ( eType == FOLDER )
{
aRet[ n ] <<= lang::IllegalAccessException(
- OUString( "Property is read-only!" ),
+ "Property is read-only!",
static_cast< cppu::OWeakObject * >( this ) );
}
else
{
// Storage is only supported by folders.
aRet[ n ] <<= beans::UnknownPropertyException(
- OUString( "Storage property only supported by folders" ),
+ "Storage property only supported by folders",
static_cast< cppu::OWeakObject * >( this ) );
}
}
@@ -1226,15 +1226,14 @@ uno::Sequence< uno::Any > Content::setPropertyValues(
if ( eType == DOCUMENT )
{
aRet[ n ] <<= lang::IllegalAccessException(
- OUString( "Property is read-only!" ),
+ "Property is read-only!",
static_cast< cppu::OWeakObject * >( this ) );
}
else
{
// Storage is only supported by folders.
aRet[ n ] <<= beans::UnknownPropertyException(
- OUString( "DocumentModel property only supported by "
- "documents" ),
+ "DocumentModel property only supported by documents",
static_cast< cppu::OWeakObject * >( this ) );
}
}
@@ -1287,7 +1286,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues(
else
{
aRet[ n ] <<= uno::Exception(
- OUString( "No property set for storing the value!" ),
+ "No property set for storing the value!",
static_cast< cppu::OWeakObject * >( this ) );
}
}
@@ -1318,7 +1317,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues(
// Set error .
aRet[ nTitlePos ] <<= uno::Exception(
- OUString("Exchange failed!"),
+ "Exchange failed!",
static_cast< cppu::OWeakObject * >( this ) );
}
}
@@ -1650,7 +1649,7 @@ void Content::insert( const uno::Reference< io::XInputStream >& xData,
ucbhelper::cancelCommandExecution(
uno::makeAny(
ucb::UnsupportedNameClashException(
- OUString( "Unable to resolve name clash!" ),
+ "Unable to resolve name clash!",
static_cast< cppu::OWeakObject * >( this ),
nNameClashResolve ) ),
xEnv );
@@ -1742,7 +1741,7 @@ void Content::destroy( bool bDeletePhysical,
{
ucbhelper::cancelCommandExecution(
uno::makeAny( ucb::UnsupportedCommandException(
- OUString( "Not persistent!" ),
+ "Not persistent!",
static_cast< cppu::OWeakObject * >( this ) ) ),
xEnv );
// Unreachable
@@ -1881,7 +1880,7 @@ void Content::transfer(
{
ucbhelper::cancelCommandExecution(
uno::makeAny( ucb::UnsupportedCommandException(
- OUString( "Not persistent!" ),
+ "Not persistent!",
static_cast< cppu::OWeakObject * >( this ) ) ),
xEnv );
// Unreachable
@@ -1920,7 +1919,7 @@ void Content::transfer(
{
ucbhelper::cancelCommandExecution(
uno::makeAny( lang::IllegalArgumentException(
- OUString( "Invalid source URI! Syntax!" ),
+ "Invalid source URI! Syntax!",
static_cast< cppu::OWeakObject * >( this ),
-1 ) ),
xEnv );
@@ -1931,8 +1930,7 @@ void Content::transfer(
{
ucbhelper::cancelCommandExecution(
uno::makeAny( lang::IllegalArgumentException(
- OUString( "Invalid source URI! "
- "Must describe a folder or stream!" ),
+ "Invalid source URI! Must describe a folder or stream!",
static_cast< cppu::OWeakObject * >( this ),
-1 ) ),
xEnv );
@@ -1984,9 +1982,9 @@ void Content::transfer(
{
ucbhelper::cancelCommandExecution(
uno::makeAny( lang::IllegalArgumentException(
- OUString( "Invalid source URI! "
- "Streams cannot be created as "
- "children of document root!" ),
+ "Invalid source URI! "
+ "Streams cannot be created as "
+ "children of document root!",
static_cast< cppu::OWeakObject * >(
this ),
-1 ) ),
@@ -2013,8 +2011,7 @@ void Content::transfer(
{
ucbhelper::cancelCommandExecution(
uno::makeAny( lang::IllegalArgumentException(
- OUString( "Invalid source URI! "
- "Unable to determine source type!" ),
+ "Invalid source URI! Unable to determine source type!",
static_cast< cppu::OWeakObject * >( this ),
-1 ) ),
xEnv );
@@ -2729,7 +2726,7 @@ static OUString obtainPassword(
if ( xAbort.is() )
{
throw ucb::CommandFailedException(
- OUString( "Abort requested by Interaction Handler." ),
+ "Abort requested by Interaction Handler.",
uno::Reference< uno::XInterface >(),
xRequest->getRequest() );
}
@@ -2743,7 +2740,7 @@ static OUString obtainPassword(
// Unknown selection. Should never happen.
throw ucb::CommandFailedException(
- OUString( "Interaction Handler selected unknown continuation!" ),
+ "Interaction Handler selected unknown continuation!",
uno::Reference< uno::XInterface >(),
xRequest->getRequest() );
}
diff --git a/ucb/source/ucp/tdoc/tdoc_documentcontentfactory.cxx b/ucb/source/ucp/tdoc/tdoc_documentcontentfactory.cxx
index 0ec5fbfe00e3..aa459df2601e 100644
--- a/ucb/source/ucp/tdoc/tdoc_documentcontentfactory.cxx
+++ b/ucb/source/ucp/tdoc/tdoc_documentcontentfactory.cxx
@@ -113,8 +113,7 @@ DocumentContentFactory::createDocumentContent(
return xDocFac->createDocumentContent( Model );
throw uno::RuntimeException(
- OUString(
- "Unable to obtain document content factory!" ),
+ "Unable to obtain document content factory!",
static_cast< cppu::OWeakObject * >( this ) );
}
diff --git a/ucb/source/ucp/tdoc/tdoc_provider.cxx b/ucb/source/ucp/tdoc/tdoc_provider.cxx
index 4c80a626035d..f3b7e36e4baf 100644
--- a/ucb/source/ucp/tdoc/tdoc_provider.cxx
+++ b/ucb/source/ucp/tdoc/tdoc_provider.cxx
@@ -134,7 +134,7 @@ ContentProvider::queryContent(
Uri aUri( Identifier->getContentIdentifier() );
if ( !aUri.isValid() )
throw ucb::IllegalIdentifierException(
- OUString( "Invalid URL!" ),
+ "Invalid URL!",
Identifier );
// Normalize URI.
@@ -196,16 +196,14 @@ ContentProvider::createDocumentContent(
// no content.
throw lang::IllegalArgumentException(
- OUString(
- "Illegal Content Identifier!" ),
+ "Illegal Content Identifier!",
static_cast< cppu::OWeakObject * >( this ),
1 );
}
else
{
throw lang::IllegalArgumentException(
- OUString(
- "Unable to obtain document id from model!" ),
+ "Unable to obtain document id from model!",
static_cast< cppu::OWeakObject * >( this ),
1 );
}
@@ -213,8 +211,7 @@ ContentProvider::createDocumentContent(
else
{
throw lang::IllegalArgumentException(
- OUString(
- "No Document Manager!" ),
+ "No Document Manager!",
static_cast< cppu::OWeakObject * >( this ),
1 );
}
diff --git a/ucb/source/ucp/tdoc/tdoc_storage.cxx b/ucb/source/ucp/tdoc/tdoc_storage.cxx
index a8055241522b..2fcc63561a40 100644
--- a/ucb/source/ucp/tdoc/tdoc_storage.cxx
+++ b/ucb/source/ucp/tdoc/tdoc_storage.cxx
@@ -85,8 +85,7 @@ StorageElementFactory::createStorage( const OUString & rUri,
( eMode != READ_WRITE_NOCREATE ) &&
( eMode != READ_WRITE_CREATE ) )
throw lang::IllegalArgumentException(
- OUString(
- "Invalid open mode!" ),
+ "Invalid open mode!",
uno::Reference< uno::XInterface >(),
sal_Int16( 2 ) );
@@ -94,8 +93,7 @@ StorageElementFactory::createStorage( const OUString & rUri,
if ( aUri.isRoot() )
{
throw lang::IllegalArgumentException(
- OUString(
- "Root never has a storage!" ),
+ "Root never has a storage!",
uno::Reference< uno::XInterface >(),
sal_Int16( 1 ) );
}
@@ -369,14 +367,12 @@ uno::Reference< embed::XStorage > StorageElementFactory::queryStorage(
{
if ( eMode == READ_WRITE_CREATE )
throw lang::IllegalArgumentException(
- OUString(
- "Invalid open mode: document storages cannot be "
- "created!" ),
+ "Invalid open mode: document storages cannot be created!",
uno::Reference< uno::XInterface >(),
sal_Int16( 2 ) );
else
throw embed::InvalidStorageException(
- OUString( "Invalid document id!" ),
+ "Invalid document id!",
uno::Reference< uno::XInterface >() );
}
@@ -432,8 +428,7 @@ uno::Reference< embed::XStorage > StorageElementFactory::queryStorage(
OSL_FAIL( "Property OpenMode not supported!" );
throw embed::StorageWrappedTargetException(
- OUString(
- "Bug! Value of property OpenMode has wrong type!" ),
+ "Bug! Value of property OpenMode has wrong type!",
uno::Reference< uno::XInterface >(),
uno::makeAny( e ) );
}
@@ -442,8 +437,7 @@ uno::Reference< embed::XStorage > StorageElementFactory::queryStorage(
OSL_FAIL( "Caught WrappedTargetException!" );
throw embed::StorageWrappedTargetException(
- OUString(
- "WrappedTargetException during getPropertyValue!" ),
+ "WrappedTargetException during getPropertyValue!",
uno::Reference< uno::XInterface >(),
uno::makeAny( e ) );
}
@@ -500,8 +494,7 @@ StorageElementFactory::queryStream(
if ( !xParentStorage.is() )
{
throw lang::IllegalArgumentException(
- OUString(
- "No parent storage!" ),
+ "No parent storage!",
uno::Reference< uno::XInterface >(),
sal_Int16( 2 ) );
}
@@ -510,16 +503,14 @@ StorageElementFactory::queryStream(
if ( aUri.isRoot() )
{
throw lang::IllegalArgumentException(
- OUString(
- "Root never is a stream!" ),
+ "Root never is a stream!",
uno::Reference< uno::XInterface >(),
sal_Int16( 2 ) );
}
else if ( aUri.isDocument() )
{
throw lang::IllegalArgumentException(
- OUString(
- "A document never is a stream!" ),
+ "A document never is a stream!",
uno::Reference< uno::XInterface >(),
sal_Int16( 2 ) );
}
@@ -556,8 +547,7 @@ StorageElementFactory::queryStream(
OSL_FAIL( "StorageElementFactory::queryStream : Unknown open mode!" );
throw embed::InvalidStorageException(
- OUString(
- "Unknown open mode!" ),
+ "Unknown open mode!",
uno::Reference< uno::XInterface >() );
}
@@ -613,8 +603,7 @@ StorageElementFactory::queryStream(
if ( !xStream.is() )
{
throw embed::InvalidStorageException(
- OUString(
- "No stream!" ),
+ "No stream!",
uno::Reference< uno::XInterface >() );
}
diff --git a/ucb/source/ucp/webdav-neon/webdavcontent.cxx b/ucb/source/ucp/webdav-neon/webdavcontent.cxx
index 3b332fa36ce7..1279eaa2a85e 100644
--- a/ucb/source/ucp/webdav-neon/webdavcontent.cxx
+++ b/ucb/source/ucp/webdav-neon/webdavcontent.cxx
@@ -508,7 +508,7 @@ uno::Any SAL_CALL Content::execute(
{
ucbhelper::cancelCommandExecution(
uno::makeAny( lang::IllegalArgumentException(
- OUString( "Wrong argument type!" ),
+ "Wrong argument type!",
static_cast< cppu::OWeakObject * >( this ),
-1 ) ),
Environment );
@@ -528,7 +528,7 @@ uno::Any SAL_CALL Content::execute(
{
ucbhelper::cancelCommandExecution(
uno::makeAny( lang::IllegalArgumentException(
- OUString( "Wrong argument type!" ),
+ "Wrong argument type!",
static_cast< cppu::OWeakObject * >( this ),
-1 ) ),
Environment );
@@ -539,7 +539,7 @@ uno::Any SAL_CALL Content::execute(
{
ucbhelper::cancelCommandExecution(
uno::makeAny( lang::IllegalArgumentException(
- OUString( "No properties!" ),
+ "No properties!",
static_cast< cppu::OWeakObject * >( this ),
-1 ) ),
Environment );
@@ -579,7 +579,7 @@ uno::Any SAL_CALL Content::execute(
{
ucbhelper::cancelCommandExecution(
uno::makeAny( lang::IllegalArgumentException(
- OUString( "Wrong argument type!" ),
+ "Wrong argument type!",
static_cast< cppu::OWeakObject * >( this ),
-1 ) ),
Environment );
@@ -609,7 +609,7 @@ uno::Any SAL_CALL Content::execute(
{
ucbhelper::cancelCommandExecution(
uno::makeAny( lang::IllegalArgumentException(
- OUString( "Wrong argument type!" ),
+ "Wrong argument type!",
static_cast< cppu::OWeakObject * >( this ),
-1 ) ),
Environment );
@@ -673,7 +673,7 @@ uno::Any SAL_CALL Content::execute(
{
ucbhelper::cancelCommandExecution(
uno::makeAny( lang::IllegalArgumentException(
- OUString( "Wrong argument type!" ),
+ "Wrong argument type!",
static_cast< cppu::OWeakObject * >( this ),
-1 ) ),
Environment );
@@ -693,7 +693,7 @@ uno::Any SAL_CALL Content::execute(
{
ucbhelper::cancelCommandExecution(
uno::makeAny( lang::IllegalArgumentException(
- OUString( "Wrong argument type!" ),
+ "Wrong argument type!",
static_cast< cppu::OWeakObject * >( this ),
-1 ) ),
Environment );
@@ -742,7 +742,7 @@ uno::Any SAL_CALL Content::execute(
{
ucbhelper::cancelCommandExecution(
uno::makeAny( lang::IllegalArgumentException(
- OUString( "Wrong argument type!" ),
+ "Wrong argument type!",
static_cast< cppu::OWeakObject * >( this ),
-1 ) ),
Environment );
@@ -1819,7 +1819,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues(
{
// Read-only property!
aRet[ n ] <<= lang::IllegalAccessException(
- OUString( "Property is read-only!" ),
+ "Property is read-only!",
static_cast< cppu::OWeakObject * >( this ) );
continue;
}
@@ -1832,21 +1832,21 @@ uno::Sequence< uno::Any > Content::setPropertyValues(
{
// Read-only property!
aRet[ n ] <<= lang::IllegalAccessException(
- OUString( "Property is read-only!" ),
+ "Property is read-only!",
static_cast< cppu::OWeakObject * >( this ) );
}
else if ( rName == "IsDocument" )
{
// Read-only property!
aRet[ n ] <<= lang::IllegalAccessException(
- OUString( "Property is read-only!" ),
+ "Property is read-only!",
static_cast< cppu::OWeakObject * >( this ) );
}
else if ( rName == "IsFolder" )
{
// Read-only property!
aRet[ n ] <<= lang::IllegalAccessException(
- OUString( "Property is read-only!" ),
+ "Property is read-only!",
static_cast< cppu::OWeakObject * >( this ) );
}
else if ( rName == "Title" )
@@ -1879,7 +1879,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues(
catch ( DAVException const & )
{
aRet[ n ] <<= lang::IllegalArgumentException(
- OUString( "Invalid content identifier!" ),
+ "Invalid content identifier!",
static_cast< cppu::OWeakObject * >( this ),
-1 );
}
@@ -1887,7 +1887,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues(
else
{
aRet[ n ] <<= lang::IllegalArgumentException(
- OUString( "Empty title not allowed!" ),
+ "Empty title not allowed!",
static_cast< cppu::OWeakObject * >( this ),
-1 );
}
@@ -1895,7 +1895,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues(
else
{
aRet[ n ] <<= beans::IllegalTypeException(
- OUString( "Property value has wrong type!" ),
+ "Property value has wrong type!",
static_cast< cppu::OWeakObject * >( this ) );
}
}
@@ -1920,7 +1920,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues(
// PROPPATCH::set would add the property automatically, which
// is not allowed for "setPropertyValues" command!
aRet[ n ] <<= beans::UnknownPropertyException(
- OUString( "Property is unknown!" ),
+ "Property is unknown!",
static_cast< cppu::OWeakObject * >( this ) );
continue;
}
@@ -1929,21 +1929,21 @@ uno::Sequence< uno::Any > Content::setPropertyValues(
{
// Read-only property!
aRet[ n ] <<= lang::IllegalAccessException(
- OUString( "Property is read-only!" ),
+ "Property is read-only!",
static_cast< cppu::OWeakObject * >( this ) );
}
else if ( rName == "DateCreated" )
{
// Read-only property!
aRet[ n ] <<= lang::IllegalAccessException(
- OUString( "Property is read-only!" ),
+ "Property is read-only!",
static_cast< cppu::OWeakObject * >( this ) );
}
else if ( rName == "DateModified" )
{
// Read-only property!
aRet[ n ] <<= lang::IllegalAccessException(
- OUString( "Property is read-only!" ),
+ "Property is read-only!",
static_cast< cppu::OWeakObject * >( this ) );
}
else if ( rName == "MediaType" )
@@ -1951,14 +1951,14 @@ uno::Sequence< uno::Any > Content::setPropertyValues(
// Read-only property!
// (but could be writable, if 'getcontenttype' would be)
aRet[ n ] <<= lang::IllegalAccessException(
- OUString( "Property is read-only!" ),
+ "Property is read-only!",
static_cast< cppu::OWeakObject * >( this ) );
}
if ( rName == "CreatableContentsInfo" )
{
// Read-only property!
aRet[ n ] <<= lang::IllegalAccessException(
- OUString( "Property is read-only!" ),
+ "Property is read-only!",
static_cast< cppu::OWeakObject * >( this ) );
}
else
@@ -2023,7 +2023,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues(
else
{
aRet[ n ] <<= uno::Exception(
- OUString( "No property set for storing the value!" ),
+ "No property set for storing the value!",
static_cast< cppu::OWeakObject * >( this ) );
}
}
@@ -2122,7 +2122,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues(
// Set error .
aRet[ nTitlePos ] <<= uno::Exception(
- OUString("Exchange failed!"),
+ "Exchange failed!",
static_cast< cppu::OWeakObject * >( this ) );
}
}
@@ -2551,7 +2551,7 @@ void Content::insert(
if ( !bTransient || !bCollection )
{
ucb::UnsupportedNameClashException aEx(
- OUString( "Unable to write without overwrite!" ),
+ "Unable to write without overwrite!",
static_cast< cppu::OWeakObject * >( this ),
ucb::NameClash::ERROR );
@@ -2596,7 +2596,7 @@ void Content::insert(
SAL_WARN( "ucb.ucp.webdav", "Content::insert - "
"Unknown interaction selection!" );
throw ucb::CommandFailedException(
- OUString( "Unknown interaction selection!" ),
+ "Unknown interaction selection!",
uno::Reference< uno::XInterface >(),
aExAsAny );
// break;
@@ -2813,7 +2813,7 @@ void Content::transfer(
ucbhelper::cancelCommandExecution(
uno::makeAny(
ucb::InteractiveBadTransferURLException(
- OUString( "Unsupported URL scheme!" ),
+ "Unsupported URL scheme!",
static_cast< cppu::OWeakObject * >( this ) ) ),
Environment );
// Unreachable
@@ -2845,7 +2845,7 @@ void Content::transfer(
{
ucbhelper::cancelCommandExecution(
uno::makeAny( ucb::InteractiveBadTransferURLException(
- OUString( "Different hosts!" ),
+ "Different hosts!",
static_cast< cppu::OWeakObject * >( this ) ) ),
Environment );
// Unreachable
@@ -3294,7 +3294,7 @@ void Content::lock(
<< m_xIdentifier->getContentIdentifier() << ">");
throw
ucb::InteractiveLockingLockedException(
- OUString( "Locked!" ),
+ "Locked!",
static_cast< cppu::OWeakObject * >( this ),
task::InteractionClassification_ERROR,
aURL,
@@ -3317,7 +3317,7 @@ void Content::lock(
// since it mostly happens on read/only part of webdav, this appears to be the most correct exception available
throw
ucb::InteractiveNetworkWriteException(
- OUString( "Authentication error while trying to lock! Write only WebDAV perhaps?" ),
+ "Authentication error while trying to lock! Write only WebDAV perhaps?",
static_cast< cppu::OWeakObject * >( this ),
task::InteractionClassification_ERROR,
e.getData() );
@@ -3580,7 +3580,7 @@ uno::Any Content::MapDAVException( const DAVException & e, bool bWrite )
aException <<=
ucb::InteractiveAugmentedIOException(
- OUString("Not found!"),
+ "Not found!",
static_cast< cppu::OWeakObject * >( this ),
task::InteractionClassification_ERROR,
ucb::IOErrorCode_NOT_EXISTING,
@@ -3658,7 +3658,7 @@ uno::Any Content::MapDAVException( const DAVException & e, bool bWrite )
case DAVException::DAV_LOCKED:
aException <<=
ucb::InteractiveLockingLockedException(
- OUString("Locked!"),
+ "Locked!",
static_cast< cppu::OWeakObject * >( this ),
task::InteractionClassification_ERROR,
aURL,
@@ -3668,7 +3668,7 @@ uno::Any Content::MapDAVException( const DAVException & e, bool bWrite )
case DAVException::DAV_LOCKED_SELF:
aException <<=
ucb::InteractiveLockingLockedException(
- OUString("Locked (self!)"),
+ "Locked (self!)",
static_cast< cppu::OWeakObject * >( this ),
task::InteractionClassification_ERROR,
aURL,
@@ -3678,7 +3678,7 @@ uno::Any Content::MapDAVException( const DAVException & e, bool bWrite )
case DAVException::DAV_NOT_LOCKED:
aException <<=
ucb::InteractiveLockingNotLockedException(
- OUString("Not locked!"),
+ "Not locked!",
static_cast< cppu::OWeakObject * >( this ),
task::InteractionClassification_ERROR,
aURL );
@@ -3687,7 +3687,7 @@ uno::Any Content::MapDAVException( const DAVException & e, bool bWrite )
case DAVException::DAV_LOCK_EXPIRED:
aException <<=
ucb::InteractiveLockingLockExpiredException(
- OUString("Lock expired!"),
+ "Lock expired!",
static_cast< cppu::OWeakObject * >( this ),
task::InteractionClassification_ERROR,
aURL );