diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2021-10-16 10:15:30 +0200 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2021-10-16 18:13:05 +0200 |
commit | edf82470de0f7796992666a0c2b5c56dc66c94fd (patch) | |
tree | 6c15690fa70b514d89e6462542fd0ba67b2b0a90 | |
parent | ac10792ed4ca8d92f60c95ab4acd5b911e42cec7 (diff) |
Simplify vector initialization in filter
Change-Id: I78653b32a5418e44733e3d2740a9a7dd784f17ae
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123686
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
-rw-r--r-- | filter/source/msfilter/escherex.cxx | 18 | ||||
-rw-r--r-- | filter/source/pdf/impdialog.cxx | 15 |
2 files changed, 20 insertions, 13 deletions
diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx index fecb2fa45291..5ab075d6050a 100644 --- a/filter/source/msfilter/escherex.cxx +++ b/filter/source/msfilter/escherex.cxx @@ -1907,14 +1907,20 @@ bool EscherPropertyContainer::CreatePolygonProperties( const sal_uInt16 nPolyCount(aPolyPolygon.Count()); sal_uInt32 nTotalPoints(0); - std::vector< sal_uInt8 > aVertices(4, 0); - std::vector< sal_uInt8 > aSegments(4, 0); - aVertices.push_back(static_cast<sal_uInt8>(0xf0)); - aVertices.push_back(static_cast<sal_uInt8>(0xff)); + std::vector< sal_uInt8 > aVertices + { + 0, 0, 0, 0, + static_cast<sal_uInt8>(0xf0), + static_cast<sal_uInt8>(0xff) + }; - aSegments.push_back(static_cast<sal_uInt8>(2)); - aSegments.push_back(static_cast<sal_uInt8>(0)); + std::vector< sal_uInt8 > aSegments + { + 0, 0, 0, 0, + static_cast<sal_uInt8>(2), + static_cast<sal_uInt8>(0) + }; for(sal_uInt16 j(0); j < nPolyCount; ++j) { diff --git a/filter/source/pdf/impdialog.cxx b/filter/source/pdf/impdialog.cxx index e15d8a4c9bdd..c1a3c94d5a85 100644 --- a/filter/source/pdf/impdialog.cxx +++ b/filter/source/pdf/impdialog.cxx @@ -449,13 +449,14 @@ Sequence< PropertyValue > ImpPDFTabDialog::GetFilterData() maConfigItem.WriteBool( "EnableCopyingOfContent", mbCanCopyOrExtract ); maConfigItem.WriteBool( "EnableTextAccessForAccessibilityTools", mbCanExtractForAccessibility ); - std::vector<beans::PropertyValue> aRet; - - aRet.push_back(comphelper::makePropertyValue("Watermark", maWatermarkText)); - aRet.push_back(comphelper::makePropertyValue("EncryptFile", mbEncrypt)); - aRet.push_back(comphelper::makePropertyValue("PreparedPasswords", mxPreparedPasswords)); - aRet.push_back(comphelper::makePropertyValue("RestrictPermissions", mbRestrictPermissions)); - aRet.push_back(comphelper::makePropertyValue("PreparedPermissionPassword", maPreparedOwnerPassword)); + std::vector<beans::PropertyValue> aRet + { + comphelper::makePropertyValue("Watermark", maWatermarkText), + comphelper::makePropertyValue("EncryptFile", mbEncrypt), + comphelper::makePropertyValue("PreparedPasswords", mxPreparedPasswords), + comphelper::makePropertyValue("RestrictPermissions", mbRestrictPermissions), + comphelper::makePropertyValue("PreparedPermissionPassword", maPreparedOwnerPassword) + }; if( mbIsRangeChecked ) aRet.push_back(comphelper::makePropertyValue("PageRange", msPageRange)); else if( mbSelectionIsChecked ) |