sw/source/core/unocore/unoparagraph.cxx |    5 +----
 sw/source/core/unocore/unosect.cxx      |    5 +----
 sw/source/core/unocore/unostyle.cxx     |    3 +--
 3 files changed, 3 insertions(+), 10 deletions(-)

New commits:
commit a7bdfd979470a842712f6475590bbda7542c4ccc
Author:     Julien Nabet <serval2...@yahoo.fr>
AuthorDate: Sun Feb 6 10:33:31 2022 +0100
Commit:     Julien Nabet <serval2...@yahoo.fr>
CommitDate: Sun Feb 6 11:34:31 2022 +0100

    Simplify sequences uses in sw
    
    Change-Id: I23358cc037656181d71ded4f7e53435e767166bf
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129543
    Tested-by: Jenkins
    Reviewed-by: Julien Nabet <serval2...@yahoo.fr>

diff --git a/sw/source/core/unocore/unoparagraph.cxx 
b/sw/source/core/unocore/unoparagraph.cxx
index 208ebad07fd7..f39bc2cc234f 100644
--- a/sw/source/core/unocore/unoparagraph.cxx
+++ b/sw/source/core/unocore/unoparagraph.cxx
@@ -357,10 +357,7 @@ SwXParagraph::setPropertyValue(const OUString& 
rPropertyName,
         const uno::Any& rValue)
 {
     SolarMutexGuard aGuard;
-    uno::Sequence<OUString> aPropertyNames { rPropertyName };
-    uno::Sequence<uno::Any> aValues(1);
-    aValues.getArray()[0] = rValue;
-    m_pImpl->SetPropertyValues_Impl( aPropertyNames, aValues );
+    m_pImpl->SetPropertyValues_Impl( { rPropertyName }, { rValue } );
 }
 
 uno::Any
diff --git a/sw/source/core/unocore/unosect.cxx 
b/sw/source/core/unocore/unosect.cxx
index 54cc983c57c8..a19baae82840 100644
--- a/sw/source/core/unocore/unosect.cxx
+++ b/sw/source/core/unocore/unosect.cxx
@@ -948,10 +948,7 @@ void SwXTextSection::setPropertyValue(
 {
     SolarMutexGuard aGuard;
 
-    uno::Sequence< OUString > aPropertyNames { rPropertyName };
-    uno::Sequence< uno::Any > aValues(1);
-    aValues.getArray()[0] = rValue;
-    m_pImpl->SetPropertyValues_Impl( aPropertyNames, aValues );
+    m_pImpl->SetPropertyValues_Impl( { rPropertyName } , { rValue } );
 }
 
 uno::Sequence< uno::Any >
diff --git a/sw/source/core/unocore/unostyle.cxx 
b/sw/source/core/unocore/unostyle.cxx
index a6858ba5d39a..b19758648ddf 100644
--- a/sw/source/core/unocore/unostyle.cxx
+++ b/sw/source/core/unocore/unostyle.cxx
@@ -4276,8 +4276,7 @@ void SwXAutoStyle::setPropertiesToDefault(
 uno::Sequence< uno::Any > SwXAutoStyle::getPropertyDefaults(
         const uno::Sequence< OUString >& /*aPropertyNames*/ )
 {
-    uno::Sequence< uno::Any > aRet(0);
-    return aRet;
+    return { };
 }
 
 uno::Sequence< beans::PropertyValue > SwXAutoStyle::getProperties()

Reply via email to