summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2022-02-06 16:18:11 +0100
committerJulien Nabet <serval2412@yahoo.fr>2022-02-06 19:35:34 +0100
commit64c0569d8d1328091e1dfbd76afd86a3664a0da7 (patch)
tree3fa9e09a4f1ad735975f802d1e138b9f0d71d57f /editeng
parent049bc1e7d7ca44767dc826fdda161e01306bf17b (diff)
Simplify sequence of PropertyValue in cui/editeng/extensions
Change-Id: I0c8f46d2671f3623ff3dd1ee6ec84cde7db41003 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129580 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'editeng')
-rw-r--r--editeng/source/editeng/editview.cxx6
-rw-r--r--editeng/source/items/numitem.cxx12
2 files changed, 8 insertions, 10 deletions
diff --git a/editeng/source/editeng/editview.cxx b/editeng/source/editeng/editview.cxx
index c8d12f0388d3..b471eed01dc3 100644
--- a/editeng/source/editeng/editview.cxx
+++ b/editeng/source/editeng/editview.cxx
@@ -34,6 +34,7 @@
#include <svl/srchitem.hxx>
#include "impedit.hxx"
+#include <comphelper/propertyvalue.hxx>
#include <editeng/editeng.hxx>
#include <editeng/editview.hxx>
#include <editeng/flditem.hxx>
@@ -1017,10 +1018,7 @@ void EditView::ExecuteSpellPopup(const Point& rPosPixel, const Link<SpellCallbac
// than returning e.g. 16 suggestions and using only the
// first 7. Thus we hand down the value to use to that
// implementation here by providing an additional parameter.
- Sequence< PropertyValue > aPropVals(1);
- PropertyValue &rVal = aPropVals.getArray()[0];
- rVal.Name = UPN_MAX_NUMBER_OF_SUGGESTIONS;
- rVal.Value <<= sal_Int16(7);
+ Sequence< PropertyValue > aPropVals { comphelper::makePropertyValue(UPN_MAX_NUMBER_OF_SUGGESTIONS, sal_Int16(7)) };
// Are there any replace suggestions?
Reference< linguistic2::XSpellAlternatives > xSpellAlt =
diff --git a/editeng/source/items/numitem.cxx b/editeng/source/items/numitem.cxx
index 6823a6616d03..7d6fa5fe23ae 100644
--- a/editeng/source/items/numitem.cxx
+++ b/editeng/source/items/numitem.cxx
@@ -24,6 +24,7 @@
#include <editeng/numitem.hxx>
#include <com/sun/star/text/VertOrientation.hpp>
+#include <comphelper/propertyvalue.hxx>
#include <editeng/brushitem.hxx>
#include <rtl/ustrbuf.hxx>
#include <vcl/font.hxx>
@@ -132,12 +133,11 @@ OUString SvxNumberType::GetNumStr( sal_Int32 nNo, const css::lang::Locale& rLoca
return OUString('0');
else
{
- Sequence< PropertyValue > aProperties(2);
- PropertyValue* pValues = aProperties.getArray();
- pValues[0].Name = "NumberingType";
- pValues[0].Value <<= static_cast<sal_uInt16>(nNumType);
- pValues[1].Name = "Value";
- pValues[1].Value <<= nNo;
+ Sequence< PropertyValue > aProperties
+ {
+ comphelper::makePropertyValue("NumberingType", static_cast<sal_uInt16>(nNumType)),
+ comphelper::makePropertyValue("Value", nNo)
+ };
try
{