summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2015-11-15 12:17:19 +0200
committerNoel Grandin <noelgrandin@gmail.com>2015-11-15 11:31:23 +0000
commit54d22957bc241fc5867fa1c720cf1266133e4e90 (patch)
treea94c9008ccbe953226a479a875e01119d77d9402 /sc
parent8e234c5b7d5bae66c544e581bee5770f3f83dd81 (diff)
use initialiser for Sequence<OUString>
performed using: git grep -lP 'Sequence.*OUString.*\(1\)' | xargs perl -0777 -pi -e "s/Sequence<OUString> (\w+)\(1\); .*\[0\] = (\S+);/Sequence<OUString> \1 { \2 };/g" Change-Id: I4da56c80fa09bfc1e8f868794001e9921431e09f Reviewed-on: https://gerrit.libreoffice.org/19968 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/filter/xml/xmlimprt.cxx3
-rw-r--r--sc/source/ui/sidebar/ScPanelFactory.cxx3
-rw-r--r--sc/source/ui/unoobj/exceldetect.cxx3
-rw-r--r--sc/source/ui/unoobj/pageuno.cxx3
-rw-r--r--sc/source/ui/unoobj/scdetect.cxx3
5 files changed, 5 insertions, 10 deletions
diff --git a/sc/source/filter/xml/xmlimprt.cxx b/sc/source/filter/xml/xmlimprt.cxx
index 9e384579ba5a..47978210680d 100644
--- a/sc/source/filter/xml/xmlimprt.cxx
+++ b/sc/source/filter/xml/xmlimprt.cxx
@@ -2678,8 +2678,7 @@ sal_Int32 ScXMLImport::SetCurrencySymbol(const sal_Int32 nKey, const OUString& r
sErrorMessage += sFormatString;
sErrorMessage += " an Position ";
sErrorMessage += OUString::number(rException.CheckPos);
- uno::Sequence<OUString> aSeq(1);
- aSeq[0] = sErrorMessage;
+ uno::Sequence<OUString> aSeq { sErrorMessage };
uno::Reference<xml::sax::XLocator> xLocator;
SetError(XMLERROR_API | XMLERROR_FLAG_ERROR, aSeq, rException.Message, xLocator);
}
diff --git a/sc/source/ui/sidebar/ScPanelFactory.cxx b/sc/source/ui/sidebar/ScPanelFactory.cxx
index 1e634954aa77..c953f192ea83 100644
--- a/sc/source/ui/sidebar/ScPanelFactory.cxx
+++ b/sc/source/ui/sidebar/ScPanelFactory.cxx
@@ -139,8 +139,7 @@ sal_Bool ScPanelFactory::supportsService(OUString const & ServiceName)
css::uno::Sequence<OUString> ScPanelFactory::getSupportedServiceNames()
throw (css::uno::RuntimeException, std::exception)
{
- css::uno::Sequence<OUString> aServiceNames(1);
- aServiceNames[0] = "com.sun.star.ui.UIElementFactory";
+ css::uno::Sequence<OUString> aServiceNames { "com.sun.star.ui.UIElementFactory" };
return aServiceNames;
}
diff --git a/sc/source/ui/unoobj/exceldetect.cxx b/sc/source/ui/unoobj/exceldetect.cxx
index 5e663bf908c6..ae8f2e657af0 100644
--- a/sc/source/ui/unoobj/exceldetect.cxx
+++ b/sc/source/ui/unoobj/exceldetect.cxx
@@ -39,8 +39,7 @@ sal_Bool ScExcelBiffDetect::supportsService( const OUString& aName ) throw (uno:
uno::Sequence<OUString> ScExcelBiffDetect::getSupportedServiceNames() throw (uno::RuntimeException, std::exception)
{
- uno::Sequence<OUString> aNames(1);
- aNames[0] = "com.sun.star.frame.ExtendedTypeDetection";
+ uno::Sequence<OUString> aNames { "com.sun.star.frame.ExtendedTypeDetection" };
return aNames;
}
diff --git a/sc/source/ui/unoobj/pageuno.cxx b/sc/source/ui/unoobj/pageuno.cxx
index 744ac5ecab90..6ba7b31534cb 100644
--- a/sc/source/ui/unoobj/pageuno.cxx
+++ b/sc/source/ui/unoobj/pageuno.cxx
@@ -58,8 +58,7 @@ sal_Bool SAL_CALL ScPageObj::supportsService( const OUString& rServiceName )
uno::Sequence<OUString> SAL_CALL ScPageObj::getSupportedServiceNames()
throw(uno::RuntimeException, std::exception)
{
- uno::Sequence<OUString> aRet(1);
- aRet[0] = "com.sun.star.sheet.SpreadsheetDrawPage";
+ uno::Sequence<OUString> aRet { "com.sun.star.sheet.SpreadsheetDrawPage" };
return aRet;
}
diff --git a/sc/source/ui/unoobj/scdetect.cxx b/sc/source/ui/unoobj/scdetect.cxx
index eac13bb4dff8..66dcac2945d3 100644
--- a/sc/source/ui/unoobj/scdetect.cxx
+++ b/sc/source/ui/unoobj/scdetect.cxx
@@ -325,8 +325,7 @@ sal_Bool ScFilterDetect::supportsService( const OUString& sServiceName )
css::uno::Sequence<OUString> ScFilterDetect::getSupportedServiceNames()
throw (uno::RuntimeException, std::exception)
{
- uno::Sequence<OUString> seqServiceNames(1);
- seqServiceNames.getArray()[0] = "com.sun.star.frame.ExtendedTypeDetection";
+ uno::Sequence<OUString> seqServiceNames { "com.sun.star.frame.ExtendedTypeDetection" };
return seqServiceNames;
}