summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2019-12-03 13:26:52 +0100
committerMichael Stahl <michael.stahl@allotropia.de>2021-01-25 11:18:53 +0100
commite50f2179b5a18ed10c4291dcac7a6e7fd1a725dc (patch)
tree6902f337d62eb2c6c00bc33b81c15ffa236986f7
parent57aed84044cc00608ac6e8f501aa939755643c6d (diff)
Use o3tl::doAccess, prevent -Werror=maybe-uninitialized
Change-Id: I6a86db428dcf92083ee13298417b3d3027e45822 Reviewed-on: https://gerrit.libreoffice.org/84338 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com> (cherry picked from commit 4e62db5876bac758904bb9fcc669f943a03d4c7a)
-rw-r--r--sw/source/filter/ww8/docxexport.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sw/source/filter/ww8/docxexport.cxx b/sw/source/filter/ww8/docxexport.cxx
index 53731ac2126c..a48f4fb7b59e 100644
--- a/sw/source/filter/ww8/docxexport.cxx
+++ b/sw/source/filter/ww8/docxexport.cxx
@@ -85,6 +85,7 @@
#include <comphelper/processfactory.hxx>
#include <comphelper/sequence.hxx>
#include <comphelper/storagehelper.hxx>
+#include <o3tl/any.hxx>
#include <rtl/ustrbuf.hxx>
#include <sal/log.hxx>
#include <vcl/font.hxx>
@@ -1192,8 +1193,7 @@ void DocxExport::WriteSettings()
}
else if (rProp.Name == "HyphenationZone")
{
- sal_Int16 nHyphenationZone;
- rProp.Value >>= nHyphenationZone;
+ sal_Int16 nHyphenationZone = *o3tl::doAccess<sal_Int16>(rProp.Value);
if (nHyphenationZone > 0)
pFS->singleElementNS(XML_w, XML_hyphenationZone, FSNS(XML_w, XML_val),
OString::number(nHyphenationZone));