summaryrefslogtreecommitdiff
path: root/ucb
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2023-10-19 10:30:36 +0200
committerStephan Bergmann <sbergman@redhat.com>2023-10-20 16:56:53 +0200
commitdab91084b576410f0d76b4da5f5479bb1578ec0c (patch)
tree626914e26046e9cade0e249d1331d7c696afe7a6 /ucb
parent5bd143316162f29227b2f8ec4d165a3260806bde (diff)
Extended loplugin:ostr: Automatic rewrite O[U]StringLiteral: ucb
Change-Id: Ic3123585203ebcdf2fe791709d38551e7a326d04 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158246 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'ucb')
-rw-r--r--ucb/source/cacher/cachedcontentresultset.cxx4
-rw-r--r--ucb/source/core/FileAccess.cxx2
-rw-r--r--ucb/source/core/ucbcmds.cxx2
-rw-r--r--ucb/source/core/ucbstore.cxx8
-rw-r--r--ucb/source/ucp/ext/ucpext_provider.cxx2
-rw-r--r--ucb/source/ucp/file/bc.cxx2
-rw-r--r--ucb/source/ucp/file/filglob.cxx8
-rw-r--r--ucb/source/ucp/file/filtask.cxx30
-rw-r--r--ucb/source/ucp/ftp/ftpcontent.cxx8
-rw-r--r--ucb/source/ucp/hierarchy/hierarchydata.cxx4
-rw-r--r--ucb/source/ucp/hierarchy/hierarchydatasource.cxx10
-rw-r--r--ucb/source/ucp/hierarchy/hierarchyuri.cxx6
-rw-r--r--ucb/source/ucp/webdav-curl/UCBDeadPropertyValue.cxx18
13 files changed, 52 insertions, 52 deletions
diff --git a/ucb/source/cacher/cachedcontentresultset.cxx b/ucb/source/cacher/cachedcontentresultset.cxx
index 7c1f316d1c65..769c162fd2ae 100644
--- a/ucb/source/cacher/cachedcontentresultset.cxx
+++ b/ucb/source/cacher/cachedcontentresultset.cxx
@@ -408,8 +408,8 @@ public:
//some helping variables ( names for my special properties )
const char16_t g_sPropertyNameForCount[] = u"RowCount";
const char16_t g_sPropertyNameForFinalCount[] = u"IsRowCountFinal";
-constexpr OUStringLiteral g_sPropertyNameForFetchSize(u"FetchSize");
-constexpr OUStringLiteral g_sPropertyNameForFetchDirection(u"FetchDirection");
+constexpr OUString g_sPropertyNameForFetchSize(u"FetchSize"_ustr);
+constexpr OUString g_sPropertyNameForFetchDirection(u"FetchDirection"_ustr);
CCRS_PropertySetInfo::CCRS_PropertySetInfo(
Reference< XPropertySetInfo > const & xInfo )
diff --git a/ucb/source/core/FileAccess.cxx b/ucb/source/core/FileAccess.cxx
index 5a83f9699bed..889655dc3ef2 100644
--- a/ucb/source/core/FileAccess.cxx
+++ b/ucb/source/core/FileAccess.cxx
@@ -53,7 +53,7 @@
#include <vector>
-constexpr OUStringLiteral SERVICE_NAME = u"com.sun.star.ucb.SimpleFileAccess";
+constexpr OUString SERVICE_NAME = u"com.sun.star.ucb.SimpleFileAccess"_ustr;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::lang;
diff --git a/ucb/source/core/ucbcmds.cxx b/ucb/source/core/ucbcmds.cxx
index 8b95f48c0702..c8a102b9c1b2 100644
--- a/ucb/source/core/ucbcmds.cxx
+++ b/ucb/source/core/ucbcmds.cxx
@@ -1501,7 +1501,7 @@ void globalTransfer_(
0,
rContext.xEnv );
- static constexpr OUStringLiteral cmdName(u"flush");
+ static constexpr OUString cmdName(u"flush"_ustr);
if((aAny >>= xci) && xci->hasCommandByName(cmdName))
xcp->execute(
ucb::Command(
diff --git a/ucb/source/core/ucbstore.cxx b/ucb/source/core/ucbstore.cxx
index 6800b5db0e96..10dafddc81a5 100644
--- a/ucb/source/core/ucbstore.cxx
+++ b/ucb/source/core/ucbstore.cxx
@@ -99,10 +99,10 @@ static OUString makeHierarchalNameSegment( std::u16string_view rIn )
return aBuffer.makeStringAndClear();
}
-constexpr OUStringLiteral STORE_CONTENTPROPERTIES_KEY = u"/org.openoffice.ucb.Store/ContentProperties";
+constexpr OUString STORE_CONTENTPROPERTIES_KEY = u"/org.openoffice.ucb.Store/ContentProperties"_ustr;
// describe path of cfg entry
-constexpr OUStringLiteral CFGPROPERTY_NODEPATH = u"nodepath";
+constexpr OUString CFGPROPERTY_NODEPATH = u"nodepath"_ustr;
class PropertySetInfo_Impl : public cppu::WeakImplHelper < XPropertySetInfo >
{
@@ -878,7 +878,7 @@ Reference< XInterface > PropertySetRegistry::getRootConfigReadAccessImpl(std::un
{
Sequence<Any> aArguments(comphelper::InitAnyPropertySequence(
{
- {CFGPROPERTY_NODEPATH, Any(OUString( STORE_CONTENTPROPERTIES_KEY ))}
+ {CFGPROPERTY_NODEPATH, Any(STORE_CONTENTPROPERTIES_KEY)}
}));
m_bTriedToGetRootReadAccess = true;
@@ -939,7 +939,7 @@ Reference< XInterface > PropertySetRegistry::getConfigWriteAccessImpl(std::uniqu
{
Sequence<Any> aArguments(comphelper::InitAnyPropertySequence(
{
- {CFGPROPERTY_NODEPATH, Any(OUString( STORE_CONTENTPROPERTIES_KEY ))}
+ {CFGPROPERTY_NODEPATH, Any(STORE_CONTENTPROPERTIES_KEY)}
}));
m_bTriedToGetRootWriteAccess = true;
diff --git a/ucb/source/ucp/ext/ucpext_provider.cxx b/ucb/source/ucp/ext/ucpext_provider.cxx
index c35c54220fa3..97822af93fa0 100644
--- a/ucb/source/ucp/ext/ucpext_provider.cxx
+++ b/ucb/source/ucp/ext/ucpext_provider.cxx
@@ -93,7 +93,7 @@ namespace ucb::ucp::ext
Reference< XContent > SAL_CALL ContentProvider::queryContent( const Reference< XContentIdentifier >& i_rIdentifier )
{
// Check URL scheme...
- static constexpr OUStringLiteral sScheme( u"vnd.sun.star.extension" );
+ static constexpr OUString sScheme( u"vnd.sun.star.extension"_ustr );
if ( !i_rIdentifier->getContentProviderScheme().equalsIgnoreAsciiCase( sScheme ) )
throw IllegalIdentifierException();
diff --git a/ucb/source/ucp/file/bc.cxx b/ucb/source/ucp/file/bc.cxx
index ddb44589d2c0..607df3ead5a1 100644
--- a/ucb/source/ucp/file/bc.cxx
+++ b/ucb/source/ucp/file/bc.cxx
@@ -685,7 +685,7 @@ BaseContent::setPropertyValues(
return Sequence< Any >( Values.getLength() );
}
- static constexpr OUStringLiteral Title(u"Title");
+ static constexpr OUString Title(u"Title"_ustr);
// Special handling for files which have to be inserted
if( m_nState & JustInserted )
diff --git a/ucb/source/ucp/file/filglob.cxx b/ucb/source/ucp/file/filglob.cxx
index a5097f51117e..ef44d7b25320 100644
--- a/ucb/source/ucp/file/filglob.cxx
+++ b/ucb/source/ucp/file/filglob.cxx
@@ -501,11 +501,11 @@ namespace fileaccess {
else if( errorCode == TASKHANDLING_NONAMESET_INSERT_COMMAND ||
errorCode == TASKHANDLING_NOCONTENTTYPE_INSERT_COMMAND )
{
- static constexpr OUStringLiteral sTitle = u"Title";
- static constexpr OUStringLiteral sContentType = u"ContentType";
+ static constexpr OUString sTitle = u"Title"_ustr;
+ static constexpr OUString sContentType = u"ContentType"_ustr;
Sequence< OUString > aSeq{ (errorCode == TASKHANDLING_NONAMESET_INSERT_COMMAND)
- ? OUString(sTitle)
- : OUString(sContentType) };
+ ? sTitle
+ : sContentType };
aAny <<= MissingPropertiesException(
"a property is missing, necessary to create a content",
diff --git a/ucb/source/ucp/file/filtask.cxx b/ucb/source/ucp/file/filtask.cxx
index 795788ca4125..e909c53071c0 100644
--- a/ucb/source/ucp/file/filtask.cxx
+++ b/ucb/source/ucp/file/filtask.cxx
@@ -116,21 +116,21 @@ TaskManager::MyProperty::MyProperty( bool theisNat
// Default properties
-constexpr OUStringLiteral Title( u"Title" );
-constexpr OUStringLiteral CasePreservingURL( u"CasePreservingURL" );
-constexpr OUStringLiteral IsDocument( u"IsDocument" );
-constexpr OUStringLiteral IsFolder( u"IsFolder" );
-constexpr OUStringLiteral DateModified( u"DateModified" );
-constexpr OUStringLiteral Size( u"Size" );
-constexpr OUStringLiteral IsVolume( u"IsVolume" );
-constexpr OUStringLiteral IsRemoveable( u"IsRemoveable" );
-constexpr OUStringLiteral IsRemote( u"IsRemote" );
-constexpr OUStringLiteral IsCompactDisc( u"IsCompactDisc" );
-constexpr OUStringLiteral IsFloppy( u"IsFloppy" );
-constexpr OUStringLiteral IsHidden( u"IsHidden" );
-constexpr OUStringLiteral ContentType( u"ContentType" );
-constexpr OUStringLiteral IsReadOnly( u"IsReadOnly" );
-constexpr OUStringLiteral CreatableContentsInfo( u"CreatableContentsInfo" );
+constexpr OUString Title( u"Title"_ustr );
+constexpr OUString CasePreservingURL( u"CasePreservingURL"_ustr );
+constexpr OUString IsDocument( u"IsDocument"_ustr );
+constexpr OUString IsFolder( u"IsFolder"_ustr );
+constexpr OUString DateModified( u"DateModified"_ustr );
+constexpr OUString Size( u"Size"_ustr );
+constexpr OUString IsVolume( u"IsVolume"_ustr );
+constexpr OUString IsRemoveable( u"IsRemoveable"_ustr );
+constexpr OUString IsRemote( u"IsRemote"_ustr );
+constexpr OUString IsCompactDisc( u"IsCompactDisc"_ustr );
+constexpr OUString IsFloppy( u"IsFloppy"_ustr );
+constexpr OUString IsHidden( u"IsHidden"_ustr );
+constexpr OUString ContentType( u"ContentType"_ustr );
+constexpr OUString IsReadOnly( u"IsReadOnly"_ustr );
+constexpr OUString CreatableContentsInfo( u"CreatableContentsInfo"_ustr );
TaskManager::TaskManager( const uno::Reference< uno::XComponentContext >& rxContext,
FileProvider* pProvider, bool bWithConfig )
diff --git a/ucb/source/ucp/ftp/ftpcontent.cxx b/ucb/source/ucp/ftp/ftpcontent.cxx
index 5f9097f6de38..4cca92f3b601 100644
--- a/ucb/source/ucp/ftp/ftpcontent.cxx
+++ b/ucb/source/ucp/ftp/ftpcontent.cxx
@@ -573,9 +573,9 @@ Any SAL_CALL FTPContent::execute( const Command& aCommand,
}
}
-constexpr OUStringLiteral FTP_FILE = u"application/vnd.sun.staroffice.ftp-file";
+constexpr OUString FTP_FILE = u"application/vnd.sun.staroffice.ftp-file"_ustr;
-constexpr OUStringLiteral FTP_FOLDER = u"application/vnd.sun.staroffice.ftp-folder";
+constexpr OUString FTP_FOLDER = u"application/vnd.sun.staroffice.ftp-folder"_ustr;
Sequence<ContentInfo > SAL_CALL
FTPContent::queryCreatableContentsInfo( )
@@ -751,8 +751,8 @@ Reference< XRow > FTPContent::getPropertyValues(
if(Name == "ContentType")
xRow->appendString(rProp,
(aDirEntry.m_nMode & INETCOREFTP_FILEMODE_ISDIR)
- ? OUString(FTP_FOLDER)
- : OUString(FTP_FILE) );
+ ? FTP_FOLDER
+ : FTP_FILE );
else if(Name == "IsReadOnly")
xRow->appendBoolean(rProp,
(aDirEntry.m_nMode
diff --git a/ucb/source/ucp/hierarchy/hierarchydata.cxx b/ucb/source/ucp/hierarchy/hierarchydata.cxx
index 25547182b683..6b7e0d857e54 100644
--- a/ucb/source/ucp/hierarchy/hierarchydata.cxx
+++ b/ucb/source/ucp/hierarchy/hierarchydata.cxx
@@ -87,10 +87,10 @@ static void makeXMLName( std::u16string_view rIn, OUStringBuffer & rBuffer )
constexpr OUStringLiteral READ_SERVICE_NAME = u"com.sun.star.ucb.HierarchyDataReadAccess";
-constexpr OUStringLiteral READWRITE_SERVICE_NAME = u"com.sun.star.ucb.HierarchyDataReadWriteAccess";
+constexpr OUString READWRITE_SERVICE_NAME = u"com.sun.star.ucb.HierarchyDataReadWriteAccess"_ustr;
// describe path of cfg entry
-constexpr OUStringLiteral CFGPROPERTY_NODEPATH = u"nodepath";
+constexpr OUString CFGPROPERTY_NODEPATH = u"nodepath"_ustr;
HierarchyEntry::HierarchyEntry(
diff --git a/ucb/source/ucp/hierarchy/hierarchydatasource.cxx b/ucb/source/ucp/hierarchy/hierarchydatasource.cxx
index ec8b5d8229ca..58ec6ce57d78 100644
--- a/ucb/source/ucp/hierarchy/hierarchydatasource.cxx
+++ b/ucb/source/ucp/hierarchy/hierarchydatasource.cxx
@@ -49,12 +49,12 @@ using namespace hierarchy_ucp;
// describe path of cfg entry
-constexpr OUStringLiteral CFGPROPERTY_NODEPATH = u"nodepath";
+constexpr OUString CFGPROPERTY_NODEPATH = u"nodepath"_ustr;
-constexpr OUStringLiteral READ_SERVICE_NAME = u"com.sun.star.ucb.HierarchyDataReadAccess";
-constexpr OUStringLiteral READWRITE_SERVICE_NAME = u"com.sun.star.ucb.HierarchyDataReadWriteAccess";
+constexpr OUString READ_SERVICE_NAME = u"com.sun.star.ucb.HierarchyDataReadAccess"_ustr;
+constexpr OUString READWRITE_SERVICE_NAME = u"com.sun.star.ucb.HierarchyDataReadWriteAccess"_ustr;
-constexpr OUStringLiteral CONFIG_DATA_ROOT_KEY = u"/org.openoffice.ucb.Hierarchy/Root";
+constexpr OUString CONFIG_DATA_ROOT_KEY = u"/org.openoffice.ucb.Hierarchy/Root"_ustr;
namespace hcp_impl
@@ -265,7 +265,7 @@ HierarchyDataSource::createInstance( const OUString & aServiceSpecifier )
// Create view to root node.
beans::PropertyValue aProp = comphelper::makePropertyValue(CFGPROPERTY_NODEPATH,
- OUString( CONFIG_DATA_ROOT_KEY ));
+ CONFIG_DATA_ROOT_KEY);
uno::Sequence< uno::Any > aArguments{ uno::Any(aProp) };
diff --git a/ucb/source/ucp/hierarchy/hierarchyuri.cxx b/ucb/source/ucp/hierarchy/hierarchyuri.cxx
index 052bcd628d34..b637fd85f935 100644
--- a/ucb/source/ucp/hierarchy/hierarchyuri.cxx
+++ b/ucb/source/ucp/hierarchy/hierarchyuri.cxx
@@ -28,9 +28,9 @@
using namespace hierarchy_ucp;
-constexpr OUStringLiteral HIERARCHY_URL_SCHEME = u"vnd.sun.star.hier";
-constexpr OUStringLiteral DEFAULT_DATA_SOURCE_SERVICE =
- u"com.sun.star.ucb.DefaultHierarchyDataSource";
+constexpr OUString HIERARCHY_URL_SCHEME = u"vnd.sun.star.hier"_ustr;
+constexpr OUString DEFAULT_DATA_SOURCE_SERVICE =
+ u"com.sun.star.ucb.DefaultHierarchyDataSource"_ustr;
// HierarchyUri Implementation.
diff --git a/ucb/source/ucp/webdav-curl/UCBDeadPropertyValue.cxx b/ucb/source/ucp/webdav-curl/UCBDeadPropertyValue.cxx
index 1bcf87eacf3d..94acb74c242f 100644
--- a/ucb/source/ucp/webdav-curl/UCBDeadPropertyValue.cxx
+++ b/ucb/source/ucp/webdav-curl/UCBDeadPropertyValue.cxx
@@ -26,15 +26,15 @@ using namespace ::com::sun::star;
// static
-constexpr OUStringLiteral aTypeString = u"string";
-constexpr OUStringLiteral aTypeLong = u"long";
-constexpr OUStringLiteral aTypeShort = u"short";
-constexpr OUStringLiteral aTypeBoolean = u"boolean";
-constexpr OUStringLiteral aTypeChar = u"char";
-constexpr OUStringLiteral aTypeByte = u"byte";
-constexpr OUStringLiteral aTypeHyper = u"hyper";
-constexpr OUStringLiteral aTypeFloat = u"float";
-constexpr OUStringLiteral aTypeDouble = u"double";
+constexpr OUString aTypeString = u"string"_ustr;
+constexpr OUString aTypeLong = u"long"_ustr;
+constexpr OUString aTypeShort = u"short"_ustr;
+constexpr OUString aTypeBoolean = u"boolean"_ustr;
+constexpr OUString aTypeChar = u"char"_ustr;
+constexpr OUString aTypeByte = u"byte"_ustr;
+constexpr OUString aTypeHyper = u"hyper"_ustr;
+constexpr OUString aTypeFloat = u"float"_ustr;
+constexpr OUString aTypeDouble = u"double"_ustr;
// static
bool UCBDeadPropertyValue::supportsType( const uno::Type & rType )