summaryrefslogtreecommitdiff
path: root/comphelper/source/misc/docpasswordhelper.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'comphelper/source/misc/docpasswordhelper.cxx')
-rw-r--r--comphelper/source/misc/docpasswordhelper.cxx9
1 files changed, 3 insertions, 6 deletions
diff --git a/comphelper/source/misc/docpasswordhelper.cxx b/comphelper/source/misc/docpasswordhelper.cxx
index 1f73bd8d7026..76008b508c68 100644
--- a/comphelper/source/misc/docpasswordhelper.cxx
+++ b/comphelper/source/misc/docpasswordhelper.cxx
@@ -677,19 +677,16 @@ OUString DocPasswordHelper::GetOoxHashAsBase64(
throw uno::RuntimeException("The GpgME library failed to initialize for the OpenPGP protocol.");
ctx->setArmor(false);
- const uno::Sequence < beans::NamedValue > *pSequence = rGpgProperties.getConstArray();
- const sal_Int32 nLength = rGpgProperties.getLength();
- for ( sal_Int32 i = 0; i < nLength ; i++, pSequence++ )
+ for (auto& rSequence : rGpgProperties)
{
- const beans::NamedValue *pValues = pSequence->getConstArray();
- if ( pSequence->getLength() == 3 )
+ if (rSequence.getLength() == 3)
{
// take CipherValue and try to decrypt that - stop after
// the first successful decryption
// ctx is setup now, let's decrypt the lot!
uno::Sequence < sal_Int8 > aVector;
- pValues[2].Value >>= aVector;
+ rSequence[2].Value >>= aVector;
GpgME::Data cipher(
reinterpret_cast<const char*>(aVector.getConstArray()),