summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2015-11-15 08:43:35 +0200
committerNoel Grandin <noelgrandin@gmail.com>2015-11-15 10:13:08 +0000
commit8e234c5b7d5bae66c544e581bee5770f3f83dd81 (patch)
tree7d78f03ce2231de4f727d1135449aeb8cba74e99 /sw
parent3bdd176731c351638f541a37b94094124f3c9f52 (diff)
use initialiser syntax for Sequence<OUString>
replaced using the script: 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: I23688a91562051a8eed11fc2a85599545c285c34 Reviewed-on: https://gerrit.libreoffice.org/19967 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'sw')
-rw-r--r--sw/qa/core/uwriter.cxx3
-rw-r--r--sw/source/core/docnode/finalthreadmanager.cxx3
-rw-r--r--sw/source/core/unocore/unocoll.cxx3
-rw-r--r--sw/source/core/unocore/unoport.cxx3
-rw-r--r--sw/source/core/unocore/unosect.cxx9
5 files changed, 7 insertions, 14 deletions
diff --git a/sw/qa/core/uwriter.cxx b/sw/qa/core/uwriter.cxx
index 13d9642c3b79..3d6751c67a56 100644
--- a/sw/qa/core/uwriter.cxx
+++ b/sw/qa/core/uwriter.cxx
@@ -333,8 +333,7 @@ SwTextNode* getModelToViewTestDocument2(SwDoc *pDoc)
sw::mark::IFieldmark *pFieldmark = dynamic_cast<sw::mark::IFieldmark*>(
pMarksAccess->makeNoTextFieldBookmark(aPaM, "test", ODF_FORMDROPDOWN));
CPPUNIT_ASSERT(pFieldmark);
- uno::Sequence< OUString > vListEntries(1);
- vListEntries[0] = "BBBBB";
+ uno::Sequence< OUString > vListEntries { "BBBBB" };
(*pFieldmark->GetParameters())[ODF_FORMDROPDOWN_LISTENTRY] = uno::makeAny(vListEntries);
(*pFieldmark->GetParameters())[ODF_FORMDROPDOWN_RESULT] = uno::makeAny(sal_Int32(0));
pDoc->getIDocumentContentOperations().InsertString(aPaM, "CCCCC");
diff --git a/sw/source/core/docnode/finalthreadmanager.cxx b/sw/source/core/docnode/finalthreadmanager.cxx
index 658b4c9ef3b7..a5a8802c89cd 100644
--- a/sw/source/core/docnode/finalthreadmanager.cxx
+++ b/sw/source/core/docnode/finalthreadmanager.cxx
@@ -294,8 +294,7 @@ sal_Bool SAL_CALL FinalThreadManager::supportsService(OUString const & serviceNa
css::uno::Sequence< OUString > SAL_CALL FinalThreadManager::getSupportedServiceNames() throw (css::uno::RuntimeException, std::exception)
{
- css::uno::Sequence< OUString > s(1);
- s[0] = "com.sun.star.util.JobManager";
+ css::uno::Sequence< OUString > s { "com.sun.star.util.JobManager" };
return s;
}
diff --git a/sw/source/core/unocore/unocoll.cxx b/sw/source/core/unocore/unocoll.cxx
index 39ae82535b1d..acc29c675099 100644
--- a/sw/source/core/unocore/unocoll.cxx
+++ b/sw/source/core/unocore/unocoll.cxx
@@ -1574,8 +1574,7 @@ sal_Bool SwXBookmarks::supportsService(const OUString& rServiceName) throw( Runt
Sequence< OUString > SwXBookmarks::getSupportedServiceNames() throw( RuntimeException, std::exception )
{
- Sequence< OUString > aRet(1);
- aRet[0] = "com.sun.star.text.Bookmarks";
+ Sequence< OUString > aRet { "com.sun.star.text.Bookmarks" };
return aRet;
}
diff --git a/sw/source/core/unocore/unoport.cxx b/sw/source/core/unocore/unoport.cxx
index c2044f36ebb8..6e1de3db7667 100644
--- a/sw/source/core/unocore/unoport.cxx
+++ b/sw/source/core/unocore/unoport.cxx
@@ -428,8 +428,7 @@ uno::Any SwXTextPortion::getPropertyValue(
throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException, std::exception )
{
SolarMutexGuard aGuard;
- uno::Sequence< OUString > aPropertyNames(1);
- aPropertyNames.getArray()[0] = rPropertyName;
+ uno::Sequence< OUString > aPropertyNames { rPropertyName };
return GetPropertyValues_Impl(aPropertyNames).getConstArray()[0];
}
diff --git a/sw/source/core/unocore/unosect.cxx b/sw/source/core/unocore/unosect.cxx
index 2179c688d785..8c235fa89dcd 100644
--- a/sw/source/core/unocore/unosect.cxx
+++ b/sw/source/core/unocore/unosect.cxx
@@ -939,8 +939,7 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException,
{
SolarMutexGuard aGuard;
- uno::Sequence< OUString > aPropertyNames(1);
- aPropertyNames.getArray()[0] = rPropertyName;
+ uno::Sequence< OUString > aPropertyNames { rPropertyName };
uno::Sequence< uno::Any > aValues(1);
aValues.getArray()[0] = rValue;
m_pImpl->SetPropertyValues_Impl( aPropertyNames, aValues );
@@ -1288,8 +1287,7 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException,
{
SolarMutexGuard aGuard;
- uno::Sequence< OUString > aPropertyNames(1);
- aPropertyNames.getArray()[0] = rPropertyName;
+ uno::Sequence< OUString > aPropertyNames { rPropertyName };
return m_pImpl->GetPropertyValues_Impl(aPropertyNames).getConstArray()[0];
}
@@ -1362,8 +1360,7 @@ throw (beans::UnknownPropertyException, uno::RuntimeException, std::exception)
{
SolarMutexGuard aGuard;
- uno::Sequence< OUString > aNames(1);
- aNames.getArray()[0] = rPropertyName;
+ uno::Sequence< OUString > aNames { rPropertyName };
return getPropertyStates(aNames).getConstArray()[0];
}