[Libreoffice-commits] core.git: sw/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Sat Oct 27 09:13:51 UTC 2018
sw/source/filter/ww8/wrtww8.cxx | 13 +++----------
1 file changed, 3 insertions(+), 10 deletions(-)
New commits:
commit 8255ef26395500d9965972a28cba20fa492e127c
Author: Justin Luth <justin_luth at sil.org>
AuthorDate: Sat Oct 27 10:59:43 2018 +0300
Commit: Justin Luth <justin_luth at sil.org>
CommitDate: Sat Oct 27 11:13:31 2018 +0200
use comphelper::SequenceAsHashMap to avoid manual iteration
Thanks for the suggestion Miklos
Change-Id: Ie37259a1f05919fa50194afde7171efbe5473771
Reviewed-on: https://gerrit.libreoffice.org/62409
Tested-by: Jenkins
Reviewed-by: Justin Luth <justin_luth at sil.org>
diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx
index e72a5da2a952..b415dfb6cc55 100644
--- a/sw/source/filter/ww8/wrtww8.cxx
+++ b/sw/source/filter/ww8/wrtww8.cxx
@@ -93,6 +93,7 @@
#include <fmtfsize.hxx>
#include "sprmids.hxx"
+#include <comphelper/sequenceashashmap.hxx>
#include "writerhelper.hxx"
#include "writerwordglue.hxx"
#include "ww8attributeoutput.hxx"
@@ -514,16 +515,8 @@ static void WriteDop( WW8Export& rWrt )
// so round-trip it since protection is still enabled.
if ( rDop.lKeyProtDoc == 0 && xProps.is() )
{
- uno::Sequence< beans::PropertyValue > aGrabBag;
- xProps->getPropertyValue("InteropGrabBag") >>= aGrabBag;
- for ( sal_Int32 i = 0; i < aGrabBag.getLength(); ++i )
- {
- if ( aGrabBag[i].Name == "FormPasswordHash" )
- {
- aGrabBag[i].Value >>= rDop.lKeyProtDoc;
- break;
- }
- }
+ comphelper::SequenceAsHashMap aPropMap( xProps->getPropertyValue("InteropGrabBag"));
+ aPropMap.getValue("FormPasswordHash") >>= rDop.lKeyProtDoc;
}
}
else
More information about the Libreoffice-commits
mailing list