summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2019-11-16 11:35:58 +0200
committerMike Kaganski <mike.kaganski@collabora.com>2019-11-16 14:07:45 +0100
commit51eb969cb77f8b54681033f4959b15ce32116b56 (patch)
treedb2c03214965a7575df5bf0c0c5aa970f40be57b /sd
parent742f59eaa38a3f13b6110573b1428de45c55b035 (diff)
Replace comphelper::ServiceInfoHelper::addToSequence
Change-Id: I325e16fdf9bbbc6f2ba2d06c417da5eeb0d48023 Reviewed-on: https://gerrit.libreoffice.org/82975 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/unoidl/unoobj.cxx14
-rw-r--r--sd/source/ui/unoidl/unopage.cxx27
2 files changed, 19 insertions, 22 deletions
diff --git a/sd/source/ui/unoidl/unoobj.cxx b/sd/source/ui/unoidl/unoobj.cxx
index 6c728052b2cb..9bcc2126eedf 100644
--- a/sd/source/ui/unoidl/unoobj.cxx
+++ b/sd/source/ui/unoidl/unoobj.cxx
@@ -51,7 +51,7 @@
#include <svl/instrm.hxx>
#include <editeng/outlobj.hxx>
#include <Outliner.hxx>
-#include <comphelper/serviceinfohelper.hxx>
+#include <comphelper/sequence.hxx>
#include <svx/svdogrp.hxx>
#include <o3tl/typed_flags_set.hxx>
#include <vcl/svapp.hxx>
@@ -806,10 +806,8 @@ SdAnimationInfo* SdXShape::GetAnimationInfo( bool bCreate ) const
uno::Sequence< OUString > SAL_CALL SdXShape::getSupportedServiceNames()
{
- uno::Sequence< OUString > aSeq( mpShape->_getSupportedServiceNames() );
-
- comphelper::ServiceInfoHelper::addToSequence( aSeq, {"com.sun.star.presentation.Shape",
- "com.sun.star.document.LinkTarget"} );
+ std::vector<OUStringLiteral> aAdd{ "com.sun.star.presentation.Shape",
+ "com.sun.star.document.LinkTarget" };
SdrObject* pObj = mpShape->GetSdrObject();
if(pObj && pObj->GetObjInventor() == SdrInventor::Default )
@@ -818,14 +816,14 @@ uno::Sequence< OUString > SAL_CALL SdXShape::getSupportedServiceNames()
switch( nInventor )
{
case OBJ_TITLETEXT:
- comphelper::ServiceInfoHelper::addToSequence( aSeq, {"com.sun.star.presentation.TitleTextShape"} );
+ aAdd.emplace_back("com.sun.star.presentation.TitleTextShape");
break;
case OBJ_OUTLINETEXT:
- comphelper::ServiceInfoHelper::addToSequence( aSeq, {"com.sun.star.presentation.OutlinerShape"} );
+ aAdd.emplace_back("com.sun.star.presentation.OutlinerShape");
break;
}
}
- return aSeq;
+ return comphelper::concatSequences(mpShape->_getSupportedServiceNames(), aAdd);
}
/** checks if this is a presentation object
diff --git a/sd/source/ui/unoidl/unopage.cxx b/sd/source/ui/unoidl/unopage.cxx
index ed2fadd7be78..244c27bce6a4 100644
--- a/sd/source/ui/unoidl/unopage.cxx
+++ b/sd/source/ui/unoidl/unopage.cxx
@@ -46,8 +46,9 @@
#include <drawdoc.hxx>
#include <svx/unoshape.hxx>
#include <svl/style.hxx>
-#include <comphelper/serviceinfohelper.hxx>
#include <comphelper/extract.hxx>
+#include <comphelper/OUStringLiteralList.hxx>
+#include <comphelper/sequence.hxx>
#include <svx/svditer.hxx>
#include <vcl/wmf.hxx>
#include <svx/svdoole2.hxx>
@@ -1482,11 +1483,11 @@ Reference< drawing::XShape > SdGenericDrawPage::CreateShape(SdrObject *pObj) co
// XServiceInfo
Sequence< OUString > SAL_CALL SdGenericDrawPage::getSupportedServiceNames()
{
- Sequence< OUString > aSeq( SvxFmDrawPage::getSupportedServiceNames() );
- comphelper::ServiceInfoHelper::addToSequence( aSeq, {"com.sun.star.drawing.GenericDrawPage",
- "com.sun.star.document.LinkTarget",
- "com.sun.star.document.LinkTargetSupplier"});
- return aSeq;
+ return comphelper::concatSequences(
+ SvxFmDrawPage::getSupportedServiceNames(),
+ comphelper::OUStringLiteralList({ "com.sun.star.drawing.GenericDrawPage",
+ "com.sun.star.document.LinkTarget",
+ "com.sun.star.document.LinkTargetSupplier" }));
}
// XLinkTargetSupplier
@@ -2185,13 +2186,12 @@ Sequence< OUString > SAL_CALL SdDrawPage::getSupportedServiceNames()
throwIfDisposed();
- Sequence< OUString > aSeq( SdGenericDrawPage::getSupportedServiceNames() );
- comphelper::ServiceInfoHelper::addToSequence( aSeq, {"com.sun.star.drawing.DrawPage"} );
+ std::vector<OUStringLiteral> aAdd{ "com.sun.star.drawing.DrawPage" };
if( IsImpressDocument() )
- comphelper::ServiceInfoHelper::addToSequence( aSeq, {"com.sun.star.presentation.DrawPage"} );
+ aAdd.emplace_back("com.sun.star.presentation.DrawPage");
- return aSeq;
+ return comphelper::concatSequences(SdGenericDrawPage::getSupportedServiceNames(), aAdd);
}
sal_Bool SAL_CALL SdDrawPage::supportsService( const OUString& ServiceName )
@@ -2705,13 +2705,12 @@ Sequence< OUString > SAL_CALL SdMasterPage::getSupportedServiceNames()
throwIfDisposed();
- Sequence< OUString > aSeq( SdGenericDrawPage::getSupportedServiceNames() );
- comphelper::ServiceInfoHelper::addToSequence( aSeq, {"com.sun.star.drawing.MasterPage"} );
+ std::vector<OUStringLiteral> aAdd{ "com.sun.star.drawing.MasterPage" };
if( SvxFmDrawPage::mpPage && static_cast<SdPage*>(SvxFmDrawPage::mpPage)->GetPageKind() == PageKind::Handout )
- comphelper::ServiceInfoHelper::addToSequence( aSeq, {"com.sun.star.presentation.HandoutMasterPage"} );
+ aAdd.emplace_back("com.sun.star.presentation.HandoutMasterPage");
- return aSeq;
+ return comphelper::concatSequences(SdGenericDrawPage::getSupportedServiceNames(), aAdd);
}
sal_Bool SAL_CALL SdMasterPage::supportsService( const OUString& ServiceName )