[Libreoffice-commits] core.git: sc/source
Mike Kaganski (via logerrit)
logerrit at kemper.freedesktop.org
Tue Aug 13 09:35:33 UTC 2019
sc/source/ui/unoobj/cursuno.cxx | 16 +++-------------
1 file changed, 3 insertions(+), 13 deletions(-)
New commits:
commit 23cf31c175f1c60da89c6594c5db25dddaaa57d5
Author: Mike Kaganski <mike.kaganski at collabora.com>
AuthorDate: Mon Aug 12 13:34:03 2019 +0200
Commit: Mike Kaganski <mike.kaganski at collabora.com>
CommitDate: Tue Aug 13 11:34:55 2019 +0200
Simplify ScCellCursorObj::getSupportedServiceNames
Change-Id: I28a2d14dd4e1543c964cfc712a2f78103899bdbb
Reviewed-on: https://gerrit.libreoffice.org/77352
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>
diff --git a/sc/source/ui/unoobj/cursuno.cxx b/sc/source/ui/unoobj/cursuno.cxx
index e5aef385d361..28e6c92f6f50 100644
--- a/sc/source/ui/unoobj/cursuno.cxx
+++ b/sc/source/ui/unoobj/cursuno.cxx
@@ -439,20 +439,10 @@ sal_Bool SAL_CALL ScCellCursorObj::supportsService( const OUString& rServiceName
uno::Sequence<OUString> SAL_CALL ScCellCursorObj::getSupportedServiceNames()
{
- // get all service names from cell range
- const uno::Sequence<OUString> aParentSeq(ScCellRangeObj::getSupportedServiceNames());
- sal_Int32 nParentLen = aParentSeq.getLength();
-
// SheetCellCursor should be first (?)
- uno::Sequence<OUString> aTotalSeq( nParentLen + 2 );
- OUString* pTotalArr = aTotalSeq.getArray();
- pTotalArr[0] = SCSHEETCELLCURSOR_SERVICE;
- pTotalArr[1] = SCCELLCURSOR_SERVICE;
-
- // append cell range services
- std::copy_n(aParentSeq.begin(), nParentLen, std::next(pTotalArr, 2));
-
- return aTotalSeq;
+ return comphelper::concatSequences<OUString>(
+ { SCSHEETCELLCURSOR_SERVICE, SCCELLCURSOR_SERVICE },
+ ScCellRangeObj::getSupportedServiceNames());
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
More information about the Libreoffice-commits
mailing list