summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-10-20 17:00:03 +0100
committerCaolán McNamara <caolanm@redhat.com>2017-10-20 17:00:08 +0100
commit6ce83d387fc784fa171a2ffaf46dfc8142012081 (patch)
tree1621045cfd6f1737c947f7385619dd9e7fb63c57 /sfx2
parent8280bdaf48973125ac4f64a42902de2d929b6188 (diff)
ensure init codepage on short read
Change-Id: Id288b7473fa65c35c45d726d47e5016ae0b630e4
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/doc/oleprops.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/sfx2/source/doc/oleprops.cxx b/sfx2/source/doc/oleprops.cxx
index dbf446b4a11c..7e412e6e2c9e 100644
--- a/sfx2/source/doc/oleprops.cxx
+++ b/sfx2/source/doc/oleprops.cxx
@@ -366,12 +366,12 @@ SfxOleCodePageProperty::SfxOleCodePageProperty() :
{
}
-void SfxOleCodePageProperty::ImplLoad( SvStream& rStrm )
+void SfxOleCodePageProperty::ImplLoad(SvStream& rStrm)
{
// property type is signed int16, but we use always unsigned int16 for codepages
- sal_uInt16 nCodePage;
- rStrm.ReadUInt16( nCodePage );
- SetCodePage( nCodePage );
+ sal_uInt16 nCodePage(0);
+ rStrm.ReadUInt16(nCodePage);
+ SetCodePage(nCodePage);
}
void SfxOleCodePageProperty::ImplSave( SvStream& rStrm )