diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2019-12-03 13:26:52 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2019-12-03 20:56:29 +0100 |
commit | 4e62db5876bac758904bb9fcc669f943a03d4c7a (patch) | |
tree | fcf631905124c83921cfd11d0308876b24821be8 /sw | |
parent | 941d53eee9a186e790bb3203b37eeb5fa285d2c4 (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>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/filter/ww8/docxexport.cxx | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sw/source/filter/ww8/docxexport.cxx b/sw/source/filter/ww8/docxexport.cxx index 2d04ac4986c0..94c1a6ad39d6 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> @@ -1148,16 +1149,14 @@ 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)); } else if (rProp.Name == "NoHyphenateCaps") { - bool bNoHyphenateCaps; - rProp.Value >>= bNoHyphenateCaps; + bool bNoHyphenateCaps = *o3tl::doAccess<bool>(rProp.Value); if (bNoHyphenateCaps) pFS->singleElementNS(XML_w, XML_doNotHyphenateCaps); } |