summaryrefslogtreecommitdiff
path: root/filter
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2023-10-29 10:45:04 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2023-10-29 10:17:48 +0100
commitac296a9b21193ac492da17b7510dff9bdd855aad (patch)
treebb6ec00f669cb94f720c484273b5e0b509724741 /filter
parent63ae3bd49834b9961f43b5a082ec809878acb891 (diff)
Simplify a bit
Change-Id: Ib9e3cb046ac5b3b6af8308cda02f20c3575d15d4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158608 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'filter')
-rw-r--r--filter/source/pdf/pdffilter.cxx32
1 files changed, 13 insertions, 19 deletions
diff --git a/filter/source/pdf/pdffilter.cxx b/filter/source/pdf/pdffilter.cxx
index d28803aa01c9..dcfc918bbdd0 100644
--- a/filter/source/pdf/pdffilter.cxx
+++ b/filter/source/pdf/pdffilter.cxx
@@ -54,31 +54,25 @@ bool PDFFilter::implExport( const Sequence< PropertyValue >& rDescriptor )
Reference< XOutputStream > xOStm;
Sequence< PropertyValue > aFilterData;
OUString aFilterOptions;
- sal_Int32 nLength = rDescriptor.getLength();
- const PropertyValue* pValue = rDescriptor.getConstArray();
bool bIsRedactMode = false;
bool bRet = false;
Reference< task::XStatusIndicator > xStatusIndicator;
Reference< task::XInteractionHandler > xIH;
- for (sal_Int32 i = 0; i < nLength; ++i)
+ for (const auto& rValue : rDescriptor)
{
- if ( pValue[ i ].Name == "OutputStream" )
- pValue[ i ].Value >>= xOStm;
- else if ( pValue[ i ].Name == "FilterData" )
- pValue[ i ].Value >>= aFilterData;
- else if ( pValue[ i ].Name == "FilterOptions" )
- pValue[ i ].Value >>= aFilterOptions;
- else if ( pValue[ i ].Name == "StatusIndicator" )
- pValue[ i ].Value >>= xStatusIndicator;
- else if ( pValue[i].Name == "InteractionHandler" )
- pValue[i].Value >>= xIH;
- }
-
- for (sal_Int32 i = 0 ; i < nLength; ++i)
- {
- if ( pValue[i].Name == "IsRedactMode")
- pValue[i].Value >>= bIsRedactMode;
+ if (rValue.Name == "OutputStream")
+ rValue.Value >>= xOStm;
+ else if (rValue.Name == "FilterData")
+ rValue.Value >>= aFilterData;
+ else if (rValue.Name == "FilterOptions")
+ rValue.Value >>= aFilterOptions;
+ else if (rValue.Name == "StatusIndicator")
+ rValue.Value >>= xStatusIndicator;
+ else if (rValue.Name == "InteractionHandler")
+ rValue.Value >>= xIH;
+ else if (rValue.Name == "IsRedactMode")
+ rValue.Value >>= bIsRedactMode;
}
if (!aFilterData.hasElements() && aFilterOptions.startsWith("{"))