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 13:25:26 +0100
commitc92a072ff415931355800f90d4cc0234de661c5f (patch)
treef2251498b45d6f1b0d434ae6747393f110e79a11
parent4e23f386a9eb56dfdc91c79163dd4fc5d0ff125b (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 7fed578100d1..f372cb8bcdfe 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>
@@ -1153,8 +1154,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));