summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2017-06-06 23:04:49 +0200
committerMichael Stahl <mstahl@redhat.com>2017-06-07 15:56:48 +0200
commit2e5e92eed940ea1992f7962b43b6bfcea0daf08b (patch)
treedb48b0a2e2bdcf5c41371df931fbcdc01068c32d /sw
parent630791320d3f777557ec16558d705878c0c57b7e (diff)
tdf#108349: fix LanguageType conversions from UNO "short"
The bugdoc uses LANGUAGE_USER_LATIN_VATICAN LanguageType(0x8076). The UNO API uses signed "short" for these in various interfaces, and so the LanguageType constructor complains about out-of-(short)-range values. Avoid this by deleting the problematic constructor, so that the places that currently call it with API parameters can be changed to first cast the parameter to unsigned. (Yes, we need to write "template<>" twice in a row. Don't ask me why, i just work here. sberg says we also need to omit the explict <short>.) Change-Id: I2443a89bc8d579504fc707ded3d145f9a625597a Reviewed-on: https://gerrit.libreoffice.org/38473 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com> (cherry picked from commit 93a41b20538f18344eb1b8c23b1eae134212b141) Reviewed-on: https://gerrit.libreoffice.org/38499 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/filter/ww8/ww8scan.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx
index fabae0651e6e..f71618f56044 100644
--- a/sw/source/filter/ww8/ww8scan.cxx
+++ b/sw/source/filter/ww8/ww8scan.cxx
@@ -5531,8 +5531,8 @@ WW8Fib::WW8Fib(SvStream& rSt, sal_uInt8 nWantedVersion, sal_uInt32 nOffset)
sal_Int16 cpnBtePap_Ver67=0;
// read FIB
- sal_Int16 nTmpLid = 0;
- rSt.ReadInt16( nTmpLid );
+ sal_uInt16 nTmpLid = 0;
+ rSt.ReadUInt16(nTmpLid);
m_lid = LanguageType(nTmpLid);
rSt.ReadInt16( m_pnNext );
rSt.ReadUChar( aBits1 );
@@ -5579,8 +5579,8 @@ WW8Fib::WW8Fib(SvStream& rSt, sal_uInt8 nWantedVersion, sal_uInt32 nOffset)
&& (bVer67 || WW8ReadINT16( rSt, pnLvcFirst_W6 )) // 8
&& (bVer67 || WW8ReadINT16( rSt, cpnBteLvc_W6 )) // 9
*/
- sal_Int16 nTmpFE = 0;
- rSt.ReadInt16( nTmpFE );
+ sal_uInt16 nTmpFE = 0;
+ rSt.ReadUInt16(nTmpFE);
m_lidFE = LanguageType(nTmpFE);
rSt.ReadUInt16( m_clw );
}