summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakeshi Abe <tabe@fixedpoint.jp>2015-03-02 18:35:54 +0900
committerStephan Bergmann <sbergman@redhat.com>2015-03-05 11:31:14 +0100
commit9dd8510e41dbdeb39598eed04e260525810141ce (patch)
treef90479ba42e01317997588088be800b76a79f786
parent44337a1fdae8cdc68b6cf539166e60feea879a9b (diff)
tdf#88205 Adapt uses of css::uno::Sequence to use initializer_list ctor
in starmath. Change-Id: I823b352b2b6bdc247bdb3ce875953430546a3be8 Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
-rw-r--r--starmath/source/mathmlexport.cxx24
-rw-r--r--starmath/source/mathmlimport.cxx12
-rw-r--r--starmath/source/unodoc.cxx4
-rw-r--r--starmath/source/unomodel.cxx9
4 files changed, 14 insertions, 35 deletions
diff --git a/starmath/source/mathmlexport.cxx b/starmath/source/mathmlexport.cxx
index 39614c26c3b9..e2a6340c62e4 100644
--- a/starmath/source/mathmlexport.cxx
+++ b/starmath/source/mathmlexport.cxx
@@ -401,9 +401,7 @@ OUString SAL_CALL SmXMLExport_getImplementationName() throw()
uno::Sequence< OUString > SAL_CALL SmXMLExport_getSupportedServiceNames()
throw()
{
- const OUString aServiceName( EXPORT_SVC_NAME );
- const uno::Sequence< OUString > aSeq( &aServiceName, 1 );
- return aSeq;
+ return uno::Sequence<OUString>{ EXPORT_SVC_NAME };
}
uno::Reference< uno::XInterface > SAL_CALL SmXMLExport_createInstance(
@@ -424,9 +422,7 @@ OUString SAL_CALL SmXMLExportMetaOOO_getImplementationName() throw()
uno::Sequence< OUString > SAL_CALL SmXMLExportMetaOOO_getSupportedServiceNames()
throw()
{
- const OUString aServiceName( EXPORT_SVC_NAME );
- const uno::Sequence< OUString > aSeq( &aServiceName, 1 );
- return aSeq;
+ return uno::Sequence<OUString>{ EXPORT_SVC_NAME };
}
uno::Reference< uno::XInterface > SAL_CALL SmXMLExportMetaOOO_createInstance(
@@ -444,9 +440,7 @@ OUString SAL_CALL SmXMLExportMeta_getImplementationName() throw()
uno::Sequence< OUString > SAL_CALL SmXMLExportMeta_getSupportedServiceNames()
throw()
{
- const OUString aServiceName( EXPORT_SVC_NAME );
- const uno::Sequence< OUString > aSeq( &aServiceName, 1 );
- return aSeq;
+ return uno::Sequence<OUString>{ EXPORT_SVC_NAME };
}
uno::Reference< uno::XInterface > SAL_CALL SmXMLExportMeta_createInstance(
@@ -464,9 +458,7 @@ OUString SAL_CALL SmXMLExportSettingsOOO_getImplementationName() throw()
uno::Sequence< OUString > SAL_CALL SmXMLExportSettingsOOO_getSupportedServiceNames()
throw()
{
- const OUString aServiceName( EXPORT_SVC_NAME );
- const uno::Sequence< OUString > aSeq( &aServiceName, 1 );
- return aSeq;
+ return uno::Sequence<OUString>{ EXPORT_SVC_NAME };
}
uno::Reference< uno::XInterface > SAL_CALL SmXMLExportSettingsOOO_createInstance(
@@ -484,9 +476,7 @@ OUString SAL_CALL SmXMLExportSettings_getImplementationName() throw()
uno::Sequence< OUString > SAL_CALL SmXMLExportSettings_getSupportedServiceNames()
throw()
{
- const OUString aServiceName( EXPORT_SVC_NAME );
- const uno::Sequence< OUString > aSeq( &aServiceName, 1 );
- return aSeq;
+ return uno::Sequence<OUString>{ EXPORT_SVC_NAME };
}
uno::Reference< uno::XInterface > SAL_CALL SmXMLExportSettings_createInstance(
@@ -504,9 +494,7 @@ OUString SAL_CALL SmXMLExportContent_getImplementationName() throw()
uno::Sequence< OUString > SAL_CALL SmXMLExportContent_getSupportedServiceNames()
throw()
{
- const OUString aServiceName( EXPORT_SVC_NAME );
- const uno::Sequence< OUString > aSeq( &aServiceName, 1 );
- return aSeq;
+ return uno::Sequence<OUString>{ EXPORT_SVC_NAME };
}
uno::Reference< uno::XInterface > SAL_CALL SmXMLExportContent_createInstance(
diff --git a/starmath/source/mathmlimport.cxx b/starmath/source/mathmlimport.cxx
index f2bd15df9daf..45cb027a4fbc 100644
--- a/starmath/source/mathmlimport.cxx
+++ b/starmath/source/mathmlimport.cxx
@@ -431,9 +431,7 @@ OUString SAL_CALL SmXMLImport_getImplementationName() throw()
uno::Sequence< OUString > SAL_CALL SmXMLImport_getSupportedServiceNames()
throw()
{
- const OUString aServiceName( IMPORT_SVC_NAME );
- const uno::Sequence< OUString > aSeq( &aServiceName, 1 );
- return aSeq;
+ return uno::Sequence<OUString>{ IMPORT_SVC_NAME };
}
uno::Reference< uno::XInterface > SAL_CALL SmXMLImport_createInstance(
@@ -453,9 +451,7 @@ OUString SAL_CALL SmXMLImportMeta_getImplementationName() throw()
uno::Sequence< OUString > SAL_CALL SmXMLImportMeta_getSupportedServiceNames()
throw()
{
- const OUString aServiceName( IMPORT_SVC_NAME );
- const uno::Sequence< OUString > aSeq( &aServiceName, 1 );
- return aSeq;
+ return uno::Sequence<OUString>{ IMPORT_SVC_NAME };
}
uno::Reference< uno::XInterface > SAL_CALL SmXMLImportMeta_createInstance(
@@ -475,9 +471,7 @@ OUString SAL_CALL SmXMLImportSettings_getImplementationName() throw()
uno::Sequence< OUString > SAL_CALL SmXMLImportSettings_getSupportedServiceNames()
throw()
{
- const OUString aServiceName( IMPORT_SVC_NAME );
- const uno::Sequence< OUString > aSeq( &aServiceName, 1 );
- return aSeq;
+ return uno::Sequence<OUString>{ IMPORT_SVC_NAME };
}
uno::Reference< uno::XInterface > SAL_CALL SmXMLImportSettings_createInstance(
diff --git a/starmath/source/unodoc.cxx b/starmath/source/unodoc.cxx
index 225fa29269c5..1d89f4a0ab77 100644
--- a/starmath/source/unodoc.cxx
+++ b/starmath/source/unodoc.cxx
@@ -36,9 +36,7 @@ OUString SAL_CALL SmDocument_getImplementationName() throw()
uno::Sequence< OUString > SAL_CALL SmDocument_getSupportedServiceNames() throw()
{
- uno::Sequence< OUString > aSeq( 1 );
- aSeq[0] = "com.sun.star.formula.FormulaProperties";
- return aSeq;
+ return uno::Sequence<OUString>{ "com.sun.star.formula.FormulaProperties" };
}
uno::Reference< uno::XInterface > SAL_CALL SmDocument_createInstance(
diff --git a/starmath/source/unomodel.cxx b/starmath/source/unomodel.cxx
index 02d8864555ec..d45f7327262a 100644
--- a/starmath/source/unomodel.cxx
+++ b/starmath/source/unomodel.cxx
@@ -422,11 +422,10 @@ uno::Sequence< OUString > SmModel::getSupportedServiceNames_Static(void)
{
SolarMutexGuard aGuard;
- uno::Sequence< OUString > aRet(2);
- OUString* pArray = aRet.getArray();
- pArray[0] = "com.sun.star.document.OfficeDocument";
- pArray[1] = "com.sun.star.formula.FormulaProperties";
- return aRet;
+ return uno::Sequence<OUString>{
+ "com.sun.star.document.OfficeDocument",
+ "com.sun.star.formula.FormulaProperties"
+ };
}
void SmModel::_setPropertyValues(const PropertyMapEntry** ppEntries, const Any* pValues)