summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2021-06-09 23:17:41 +0200
committerJulien Nabet <serval2412@yahoo.fr>2021-06-10 08:30:12 +0200
commit159030991c70fc3c4018ef28abf1814902a0aebb (patch)
tree02f3b436f205a71e32b3fbaa9c4ab21d2ab5f830 /svtools
parent36db408b9027da01464927e5853950435596ae05 (diff)
Simplify Sequences initializations (sot/stock/svl/svtools/svx)
Change-Id: Iec21851d69f4a8d5f557e9ed2d30e5f680cd62c2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116943 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/control/inettbc.cxx15
1 files changed, 2 insertions, 13 deletions
diff --git a/svtools/source/control/inettbc.cxx b/svtools/source/control/inettbc.cxx
index 83953ef1a469..c027e45ea129 100644
--- a/svtools/source/control/inettbc.cxx
+++ b/svtools/source/control/inettbc.cxx
@@ -317,31 +317,20 @@ void SvtMatchContext_Impl::ReadFolder( const OUString& rURL,
uno::Reference< XProgressHandler >() ),
comphelper::getProcessComponentContext() );
uno::Reference< XResultSet > xResultSet;
- Sequence< OUString > aProps(2);
- OUString* pProps = aProps.getArray();
- pProps[0] = "Title";
- pProps[1] = "IsFolder";
try
{
ResultSetInclude eInclude = INCLUDE_FOLDERS_AND_DOCUMENTS;
if ( bOnlyDirectories )
eInclude = INCLUDE_FOLDERS_ONLY;
- uno::Reference< XDynamicResultSet > xDynResultSet = aCnt.createDynamicCursor( aProps, eInclude );
+ uno::Reference< XDynamicResultSet > xDynResultSet = aCnt.createDynamicCursor( { "Title", "IsFolder" }, eInclude );
uno::Reference < XAnyCompareFactory > xCompare;
uno::Reference < XSortedDynamicResultSetFactory > xSRSFac =
SortedDynamicResultSetFactory::create( ::comphelper::getProcessComponentContext() );
- Sequence< NumberedSortingInfo > aSortInfo( 2 );
- NumberedSortingInfo* pInfo = aSortInfo.getArray();
- pInfo[ 0 ].ColumnIndex = 2;
- pInfo[ 0 ].Ascending = false;
- pInfo[ 1 ].ColumnIndex = 1;
- pInfo[ 1 ].Ascending = true;
-
uno::Reference< XDynamicResultSet > xDynamicResultSet =
- xSRSFac->createSortedDynamicResultSet( xDynResultSet, aSortInfo, xCompare );
+ xSRSFac->createSortedDynamicResultSet( xDynResultSet, { { 2, false }, { 1, true } }, xCompare );
if ( xDynamicResultSet.is() )
{