summaryrefslogtreecommitdiff
path: root/svx/source/dialog/compressgraphicdialog.cxx
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2021-10-29 10:13:01 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2021-10-31 15:49:07 +0100
commit5b54ba7084d6b575814af26be30cf5af5dfca12c (patch)
tree38f1fd7bfca54886c34f6bcbdd9220d3f1a90f13 /svx/source/dialog/compressgraphicdialog.cxx
parent3d469248ada8632a9d86efc80f2ac97dcb617c27 (diff)
Prepare for removal of non-const operator[] from Sequence in svx
Change-Id: Ib5fda9469f9a1987cf9071c0e228c582cfb3dfa1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124397 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'svx/source/dialog/compressgraphicdialog.cxx')
-rw-r--r--svx/source/dialog/compressgraphicdialog.cxx13
1 files changed, 6 insertions, 7 deletions
diff --git a/svx/source/dialog/compressgraphicdialog.cxx b/svx/source/dialog/compressgraphicdialog.cxx
index 30af216be404..1eb6a32501f2 100644
--- a/svx/source/dialog/compressgraphicdialog.cxx
+++ b/svx/source/dialog/compressgraphicdialog.cxx
@@ -34,6 +34,7 @@
#include <sfx2/dispatch.hxx>
#include <sfx2/module.hxx>
#include <comphelper/fileformat.h>
+#include <comphelper/propertyvalue.hxx>
#include <com/sun/star/uno/Sequence.hxx>
#include <tools/stream.hxx>
#include <unotools/localedatawrapper.hxx>
@@ -222,13 +223,11 @@ void CompressGraphicsDialog::Compress(SvStream& aStream)
Graphic aScaledGraphic( aBitmap );
GraphicFilter& rFilter = GraphicFilter::GetGraphicFilter();
- Sequence< PropertyValue > aFilterData( 3 );
- aFilterData[ 0 ].Name = "Interlaced";
- aFilterData[ 0 ].Value <<= sal_Int32(0);
- aFilterData[ 1 ].Name = "Compression";
- aFilterData[ 1 ].Value <<= static_cast<sal_Int32>(m_xCompressionMF->get_value());
- aFilterData[ 2 ].Name = "Quality";
- aFilterData[ 2 ].Value <<= static_cast<sal_Int32>(m_xQualityMF->get_value());
+ Sequence< PropertyValue > aFilterData{
+ comphelper::makePropertyValue("Interlaced", sal_Int32(0)),
+ comphelper::makePropertyValue("Compression", static_cast<sal_Int32>(m_xCompressionMF->get_value())),
+ comphelper::makePropertyValue("Quality", static_cast<sal_Int32>(m_xQualityMF->get_value()))
+ };
OUString aGraphicFormatName = m_xLosslessRB->get_active() ? OUString( "png" ) : OUString( "jpg" );