summaryrefslogtreecommitdiff
path: root/sfx2/source/bastyp
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2021-06-09 20:03:04 +0200
committerJulien Nabet <serval2412@yahoo.fr>2021-06-09 21:28:05 +0200
commit58d218df8c5e36468183ebae666120a6d5d0a4f7 (patch)
tree3cc30e0702146f896c5c8abbbb264f46b8eb0f22 /sfx2/source/bastyp
parentda44de883f205736fffeacc148c32dcfd638ad66 (diff)
Simplify Sequences initializations (sfx2)
Change-Id: I1384dd80e910ba1c55ec7481ab481bc48740fc5c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116937 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'sfx2/source/bastyp')
-rw-r--r--sfx2/source/bastyp/helper.cxx13
1 files changed, 2 insertions, 11 deletions
diff --git a/sfx2/source/bastyp/helper.cxx b/sfx2/source/bastyp/helper.cxx
index 7918cfcceec1..d9d1a4bb4da4 100644
--- a/sfx2/source/bastyp/helper.cxx
+++ b/sfx2/source/bastyp/helper.cxx
@@ -49,15 +49,10 @@ std::vector<OUString> SfxContentHelper::GetResultSet( const OUString& rURL )
::ucbhelper::Content aCnt( rURL, uno::Reference< ucb::XCommandEnvironment >(), comphelper::getProcessComponentContext() );
uno::Reference< sdbc::XResultSet > xResultSet;
uno::Reference< ucb::XDynamicResultSet > xDynResultSet;
- uno::Sequence< OUString > aProps(3);
- OUString* pProps = aProps.getArray();
- pProps[0] = "Title";
- pProps[1] = "ContentType";
- pProps[2] = "IsFolder";
try
{
- xDynResultSet = aCnt.createDynamicCursor( aProps );
+ xDynResultSet = aCnt.createDynamicCursor( { "Title", "ContentType", "IsFolder" } );
if ( xDynResultSet.is() )
xResultSet = xDynResultSet->getStaticResultSet();
}
@@ -112,14 +107,10 @@ std::vector< OUString > SfxContentHelper::GetHelpTreeViewContents( const OUStrin
::ucbhelper::Content aCnt( rURL, new ::ucbhelper::CommandEnvironment( xInteractionHandler, uno::Reference< ucb::XProgressHandler >() ), comphelper::getProcessComponentContext() );
uno::Reference< sdbc::XResultSet > xResultSet;
- uno::Sequence< OUString > aProps(2);
- OUString* pProps = aProps.getArray();
- pProps[0] = "Title";
- pProps[1] = "IsFolder";
try
{
- uno::Reference< ucb::XDynamicResultSet > xDynResultSet = aCnt.createDynamicCursor( aProps );
+ uno::Reference< ucb::XDynamicResultSet > xDynResultSet = aCnt.createDynamicCursor( { "Title", "IsFolder" } );
if ( xDynResultSet.is() )
xResultSet = xDynResultSet->getStaticResultSet();
}