summaryrefslogtreecommitdiff
path: root/ucb/source/core
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2021-06-10 21:59:45 +0200
committerJulien Nabet <serval2412@yahoo.fr>2021-06-11 14:57:41 +0200
commita75596f3f8d3660bd96a107eb13a2ea210be5b66 (patch)
treeca2bad558f45f464c3ee8e53d533c83268ecc419 /ucb/source/core
parentf676b194faf2805529556c2f1da0578b58bf37de (diff)
Simplify Sequences initializations (ucb)
Change-Id: Idd38076a40b1177253719c01c1928da4c903151c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117017 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'ucb/source/core')
-rw-r--r--ucb/source/core/FileAccess.cxx17
-rw-r--r--ucb/source/core/provprox.cxx4
2 files changed, 4 insertions, 17 deletions
diff --git a/ucb/source/core/FileAccess.cxx b/ucb/source/core/FileAccess.cxx
index c998318924ff..8e93248bd192 100644
--- a/ucb/source/core/FileAccess.cxx
+++ b/ucb/source/core/FileAccess.cxx
@@ -364,15 +364,10 @@ void OFileAccess::createFolder( const OUString& NewFolderURL )
if ( rProps[ 0 ].Name != "Title" )
continue;
- Sequence<OUString> aNames { "Title" };
- Sequence< Any > aValues(1);
- Any* pValues = aValues.getArray();
- pValues[0] <<= aTitle;
-
ucbhelper::Content aNew;
try
{
- if ( !aCnt.insertNewContent( rCurr.Type, aNames, aValues, aNew ) )
+ if ( !aCnt.insertNewContent( rCurr.Type, { "Title" }, { Any(aTitle) }, aNew ) )
continue;
// Success. We're done.
@@ -429,13 +424,12 @@ Sequence< OUString > OFileAccess::getFolderContents( const OUString& FolderURL,
ucbhelper::Content aCnt( aFolderObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ), mxEnvironment, comphelper::getProcessComponentContext() );
Reference< XResultSet > xResultSet;
- Sequence< OUString > aProps(0);
ucbhelper::ResultSetInclude eInclude = bIncludeFolders ? ucbhelper::INCLUDE_FOLDERS_AND_DOCUMENTS : ucbhelper::INCLUDE_DOCUMENTS_ONLY;
try
{
- xResultSet = aCnt.createCursor( aProps, eInclude );
+ xResultSet = aCnt.createCursor( {}, eInclude );
}
catch ( css::ucb::CommandFailedException const & )
{
@@ -598,16 +592,11 @@ bool OFileAccess::createNewFile( const OUString & rParentURL,
if ( rProps[ 0 ].Name != "Title" )
continue;
- Sequence<OUString> aNames { "Title" };
- Sequence< Any > aValues(1);
- Any* pValues = aValues.getArray();
- pValues[0] <<= rTitle;
-
try
{
ucbhelper::Content aNew;
if ( aParentCnt.insertNewContent(
- rCurr.Type, aNames, aValues, data, aNew ) )
+ rCurr.Type, { "Title" }, { Any(rTitle) }, data, aNew ) )
return true; // success.
else
continue;
diff --git a/ucb/source/core/provprox.cxx b/ucb/source/core/provprox.cxx
index 337a1d8f1c42..379b6e4887ed 100644
--- a/ucb/source/core/provprox.cxx
+++ b/ucb/source/core/provprox.cxx
@@ -306,9 +306,7 @@ UcbContentProviderProxy::getContentProvider()
{
Reference<XInitialization> xInit(m_xProvider,UNO_QUERY);
if(xInit.is()) {
- Sequence<Any> aArgs(1);
- aArgs[0] <<= m_aArguments;
- xInit->initialize(aArgs);
+ xInit->initialize({ Any(m_aArguments) });
}
}
}