[Libreoffice-commits] core.git: sfx2/source

Caolán McNamara caolanm at redhat.com
Fri Oct 20 16:02:03 UTC 2017


 sfx2/source/doc/oleprops.cxx |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 6ce83d387fc784fa171a2ffaf46dfc8142012081
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Oct 20 17:00:03 2017 +0100

    ensure init codepage on short read
    
    Change-Id: Id288b7473fa65c35c45d726d47e5016ae0b630e4

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 )


More information about the Libreoffice-commits mailing list