diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2019-08-12 13:34:03 +0200 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2019-08-13 11:34:55 +0200 |
commit | 23cf31c175f1c60da89c6594c5db25dddaaa57d5 (patch) | |
tree | 9a434aa67b1e3ed3710cdf6924142589648a9c72 /sc/source | |
parent | 7dbeb17da18612df84a4f865057059f7eea8350c (diff) |
Simplify ScCellCursorObj::getSupportedServiceNames
Change-Id: I28a2d14dd4e1543c964cfc712a2f78103899bdbb
Reviewed-on: https://gerrit.libreoffice.org/77352
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sc/source')
-rw-r--r-- | sc/source/ui/unoobj/cursuno.cxx | 16 |
1 files changed, 3 insertions, 13 deletions
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: */ |