summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/doc/number.cxx4
-rw-r--r--sw/source/core/ole/ndole.cxx4
-rw-r--r--sw/source/core/unocore/unocoll.cxx4
-rw-r--r--sw/source/core/unocore/unodraw.cxx4
-rw-r--r--sw/source/core/unocore/unoframe.cxx4
-rw-r--r--sw/source/core/unocore/unoobj.cxx3
-rw-r--r--sw/source/core/unocore/unostyle.cxx8
-rw-r--r--sw/source/uibase/uno/unodoc.cxx5
-rw-r--r--sw/source/uibase/uno/unotxdoc.cxx8
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;
}