diff options
author | Noel Grandin <noel@peralex.com> | 2015-11-16 09:23:41 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2015-11-16 08:35:42 +0000 |
commit | 8569c6d0ad70c32a08774fa6f5ec25b465ea98ee (patch) | |
tree | 3287608f4bb3170cc609b64c70d8d5e806c83b46 /sw | |
parent | 57b4c4bcb0cb3c48190670b4c46ab9e92a489729 (diff) |
use initialiser list for Sequence<OUString>
Change-Id: Ia5e47261d1fc6fac2d046656c05a1c5eedb07e02
Reviewed-on: https://gerrit.libreoffice.org/19978
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/doc/number.cxx | 4 | ||||
-rw-r--r-- | sw/source/core/ole/ndole.cxx | 4 | ||||
-rw-r--r-- | sw/source/core/unocore/unocoll.cxx | 4 | ||||
-rw-r--r-- | sw/source/core/unocore/unodraw.cxx | 4 | ||||
-rw-r--r-- | sw/source/core/unocore/unoframe.cxx | 4 | ||||
-rw-r--r-- | sw/source/core/unocore/unoobj.cxx | 3 | ||||
-rw-r--r-- | sw/source/core/unocore/unostyle.cxx | 8 | ||||
-rw-r--r-- | sw/source/uibase/uno/unodoc.cxx | 5 | ||||
-rw-r--r-- | sw/source/uibase/uno/unotxdoc.cxx | 8 |
9 files changed, 11 insertions, 33 deletions
diff --git a/sw/source/core/doc/number.cxx b/sw/source/core/doc/number.cxx index f529315bbaff..e4152e5b10ba 100644 --- a/sw/source/core/doc/number.cxx +++ b/sw/source/core/doc/number.cxx @@ -1359,9 +1359,7 @@ namespace numfunc css::uno::Sequence<OUString> SwNumberingUIBehaviorConfig::GetPropNames() { - css::uno::Sequence<OUString> aPropNames(1); - OUString* pNames = aPropNames.getArray(); - pNames[0] = "ChangeIndentOnTabAtFirstPosOfFirstListItem"; + css::uno::Sequence<OUString> aPropNames { "ChangeIndentOnTabAtFirstPosOfFirstListItem" }; return aPropNames; } diff --git a/sw/source/core/ole/ndole.cxx b/sw/source/core/ole/ndole.cxx index 36289181918d..579caab46067 100644 --- a/sw/source/core/ole/ndole.cxx +++ b/sw/source/core/ole/ndole.cxx @@ -910,9 +910,7 @@ SwOLELRUCache::SwOLELRUCache() uno::Sequence< OUString > SwOLELRUCache::GetPropertyNames() { - Sequence< OUString > aNames( 1 ); - OUString* pNames = aNames.getArray(); - pNames[0] = "Writer/OLE_Objects"; + Sequence< OUString > aNames { "Writer/OLE_Objects" }; return aNames; } diff --git a/sw/source/core/unocore/unocoll.cxx b/sw/source/core/unocore/unocoll.cxx index 107a1f1622c1..4cd09735e93f 100644 --- a/sw/source/core/unocore/unocoll.cxx +++ b/sw/source/core/unocore/unocoll.cxx @@ -975,9 +975,7 @@ sal_Bool SwXTextTables::supportsService(const OUString& rServiceName) throw( uno uno::Sequence< OUString > SwXTextTables::getSupportedServiceNames() throw( uno::RuntimeException, std::exception ) { - uno::Sequence< OUString > aRet(1); - OUString* pArr = aRet.getArray(); - pArr[0] = "com.sun.star.text.TextTables"; + uno::Sequence< OUString > aRet { "com.sun.star.text.TextTables" }; return aRet; } diff --git a/sw/source/core/unocore/unodraw.cxx b/sw/source/core/unocore/unodraw.cxx index 11ce3dcead4d..171592f3e3e8 100644 --- a/sw/source/core/unocore/unodraw.cxx +++ b/sw/source/core/unocore/unodraw.cxx @@ -1805,9 +1805,7 @@ beans::PropertyState SwXShape::getPropertyState( const OUString& rPropertyName ) throw(beans::UnknownPropertyException, uno::RuntimeException, std::exception) { SolarMutexGuard aGuard; - uno::Sequence< OUString > aNames(1); - OUString* pStrings = aNames.getArray(); - pStrings[0] = rPropertyName; + uno::Sequence< OUString > aNames { rPropertyName }; uno::Sequence< beans::PropertyState > aStates = getPropertyStates(aNames); return aStates.getConstArray()[0]; } diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx index eb0e40822504..fe197200e6d5 100644 --- a/sw/source/core/unocore/unoframe.cxx +++ b/sw/source/core/unocore/unoframe.cxx @@ -2384,9 +2384,7 @@ beans::PropertyState SwXFrame::getPropertyState( const OUString& rPropertyName ) throw(beans::UnknownPropertyException, uno::RuntimeException, std::exception) { SolarMutexGuard aGuard; - uno::Sequence< OUString > aPropertyNames(1); - OUString* pNames = aPropertyNames.getArray(); - pNames[0] = rPropertyName; + uno::Sequence< OUString > aPropertyNames { rPropertyName }; uno::Sequence< beans::PropertyState > aStates = getPropertyStates(aPropertyNames); return aStates.getConstArray()[0]; } diff --git a/sw/source/core/unocore/unoobj.cxx b/sw/source/core/unocore/unoobj.cxx index 24447de5ba87..e71a2fc1fa25 100644 --- a/sw/source/core/unocore/unoobj.cxx +++ b/sw/source/core/unocore/unoobj.cxx @@ -1987,8 +1987,7 @@ beans::PropertyState SwUnoCursorHelper::GetPropertyState( const OUString& rPropertyName) throw (beans::UnknownPropertyException, uno::RuntimeException) { - uno::Sequence< OUString > aStrings ( 1 ); - aStrings[0] = rPropertyName; + uno::Sequence< OUString > aStrings { rPropertyName }; uno::Sequence< beans::PropertyState > aSeq = GetPropertyStates(rPaM, rPropSet, aStrings, SW_PROPERTY_STATE_CALLER_SINGLE_VALUE_ONLY ); diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx index 7b284c339b51..c8a06ca629d2 100644 --- a/sw/source/core/unocore/unostyle.cxx +++ b/sw/source/core/unocore/unostyle.cxx @@ -2822,9 +2822,7 @@ beans::PropertyState SwXStyle::getPropertyState(const OUString& rPropertyName) throw( beans::UnknownPropertyException, uno::RuntimeException, std::exception ) { SolarMutexGuard aGuard; - uno::Sequence< OUString > aNames(1); - OUString* pNames = aNames.getArray(); - pNames[0] = rPropertyName; + uno::Sequence< OUString > aNames { rPropertyName }; uno::Sequence< beans::PropertyState > aStates = getPropertyStates(aNames); return aStates.getConstArray()[0]; } @@ -4800,9 +4798,7 @@ beans::PropertyState SwXAutoStyle::getPropertyState( const OUString& rPropertyNa { SolarMutexGuard aGuard; - uno::Sequence< OUString > aNames(1); - OUString* pNames = aNames.getArray(); - pNames[0] = rPropertyName; + uno::Sequence< OUString > aNames { rPropertyName }; uno::Sequence< beans::PropertyState > aStates = getPropertyStates(aNames); return aStates.getConstArray()[0]; } diff --git a/sw/source/uibase/uno/unodoc.cxx b/sw/source/uibase/uno/unodoc.cxx index 80f3ca86e80a..aded8e90c06c 100644 --- a/sw/source/uibase/uno/unodoc.cxx +++ b/sw/source/uibase/uno/unodoc.cxx @@ -35,10 +35,7 @@ uno::Sequence< OUString > SAL_CALL SwTextDocument_getSupportedServiceNames() thr { // return only top level services here! All others must be // resolved by rtti! - uno::Sequence< OUString > aRet ( 1 ); - OUString* pArray = aRet.getArray(); - pArray[0] = "com.sun.star.text.TextDocument"; - + uno::Sequence< OUString > aRet { "com.sun.star.text.TextDocument" }; return aRet; } diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx index 546d3c40e0e5..2331a972cad4 100644 --- a/sw/source/uibase/uno/unotxdoc.cxx +++ b/sw/source/uibase/uno/unotxdoc.cxx @@ -3771,9 +3771,7 @@ sal_Bool SwXLinkTargetSupplier::supportsService(const OUString& rServiceName) Sequence< OUString > SwXLinkTargetSupplier::getSupportedServiceNames() throw( RuntimeException, std::exception ) { - Sequence< OUString > aRet(1); - OUString* pNames = aRet.getArray(); - pNames[0] = "com.sun.star.document.LinkTargets"; + Sequence< OUString > aRet { "com.sun.star.document.LinkTargets" }; return aRet; } @@ -4059,9 +4057,7 @@ sal_Bool SwXLinkNameAccessWrapper::supportsService(const OUString& rServiceName) Sequence< OUString > SwXLinkNameAccessWrapper::getSupportedServiceNames() throw( RuntimeException, std::exception ) { - Sequence< OUString > aRet(1); - OUString* pNames = aRet.getArray(); - pNames[0] = "com.sun.star.document.LinkTargets"; + Sequence< OUString > aRet { "com.sun.star.document.LinkTargets" }; return aRet; } |