[Libreoffice-commits] core.git: filter/source
Eike Rathke
erack at redhat.com
Fri Sep 22 21:06:24 UTC 2017
filter/source/graphic/GraphicExportFilter.cxx | 60 --------------------------
filter/source/graphic/GraphicExportFilter.hxx | 5 --
2 files changed, 2 insertions(+), 63 deletions(-)
New commits:
commit 4e1d53b40605aaecd90753b9798d7210641b409c
Author: Eike Rathke <erack at redhat.com>
Date: Fri Sep 22 17:23:13 2017 +0200
GraphicExportFilter: adding FilterData defaults is unnecessary
... now that we use the proper dialog that sets the proper filter
properties.
Change-Id: Iabc3e4b2c13b60bccc0b596a851109df32fe535c
Reviewed-on: https://gerrit.libreoffice.org/42668
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Eike Rathke <erack at redhat.com>
diff --git a/filter/source/graphic/GraphicExportFilter.cxx b/filter/source/graphic/GraphicExportFilter.cxx
index b2569879fe19..c3b0e6bc751e 100644
--- a/filter/source/graphic/GraphicExportFilter.cxx
+++ b/filter/source/graphic/GraphicExportFilter.cxx
@@ -83,22 +83,6 @@ void GraphicExportFilter::gatherProperties( const uno::Sequence< beans::Property
{
maFilterDataSequence[i].Value >>= mnTargetHeight;
}
- else if ( maFilterDataSequence[i].Name == "Compression" )
- {
- maCompression = maFilterDataSequence[i].Value;
- }
- else if ( maFilterDataSequence[i].Name == "Interlaced" )
- {
- maInterlaced = maFilterDataSequence[i].Value;
- }
- else if ( maFilterDataSequence[i].Name == "Translucent" )
- {
- maTranslucent = maFilterDataSequence[i].Value;
- }
- else if ( maFilterDataSequence[i].Name == "Quality" )
- {
- maQuality = maFilterDataSequence[i].Value;
- }
}
if ( !aInternalFilterName.isEmpty() )
@@ -158,53 +142,13 @@ bool GraphicExportFilter::filterRenderDocument() const
GraphicFilter& rFilter = GraphicFilter::GetGraphicFilter();
- uno::Sequence< beans::PropertyValue > aFilterData( maFilterDataSequence );
- sal_Int32 nAdd = 0;
- if (!maCompression.hasValue())
- ++nAdd;
- if (!maInterlaced.hasValue())
- ++nAdd;
- if (!maTranslucent.hasValue())
- ++nAdd;
- if (!maQuality.hasValue())
- ++nAdd;
- if (nAdd)
- {
- sal_Int32 nLen = aFilterData.getLength();
- aFilterData.realloc( nLen + nAdd);
- if (!maCompression.hasValue())
- { // PNG
- aFilterData[ nLen ].Name = "Compression";
- aFilterData[ nLen ].Value <<= (sal_Int32) 9;
- ++nLen;
- }
- if (!maInterlaced.hasValue())
- { // PNG,GIF
- aFilterData[ nLen ].Name = "Interlaced";
- aFilterData[ nLen ].Value <<= (sal_Int32) 0;
- ++nLen;
- }
- if (!maTranslucent.hasValue())
- { // PNG,GIF
- aFilterData[ nLen ].Name = "Translucent";
- aFilterData[ nLen ].Value <<= (sal_Int32) 0;
- ++nLen;
- }
- if (!maQuality.hasValue())
- { // JPG
- aFilterData[ nLen ].Name = "Quality";
- aFilterData[ nLen ].Value <<= (sal_Int32) 99;
- ++nLen;
- }
- assert( nLen == aFilterData.getLength());
- }
-
sal_uInt16 nFilterFormat = rFilter.GetExportFormatNumberForShortName( maFilterExtension );
SvMemoryStream aMemStream;
const GraphicConversionParameters aParameters(aTargetSizePixel, true, true);
- const ErrCode nResult = rFilter.ExportGraphic( aGraphic.GetBitmapEx(aParameters), OUString(), aMemStream, nFilterFormat, &aFilterData );
+ const ErrCode nResult = rFilter.ExportGraphic( aGraphic.GetBitmapEx(aParameters), OUString(), aMemStream,
+ nFilterFormat, &maFilterDataSequence );
if ( nResult == ERRCODE_NONE )
{
diff --git a/filter/source/graphic/GraphicExportFilter.hxx b/filter/source/graphic/GraphicExportFilter.hxx
index 09dc646b52eb..22a1a98a1f61 100644
--- a/filter/source/graphic/GraphicExportFilter.hxx
+++ b/filter/source/graphic/GraphicExportFilter.hxx
@@ -44,11 +44,6 @@ class GraphicExportFilter :
css::uno::Sequence< css::beans::PropertyValue > maFilterDataSequence;
- css::uno::Any maCompression;
- css::uno::Any maInterlaced;
- css::uno::Any maTranslucent;
- css::uno::Any maQuality;
-
OUString maFilterExtension;
sal_Int32 mnTargetWidth;
sal_Int32 mnTargetHeight;
More information about the Libreoffice-commits
mailing list