diff options
author | Michael Stahl <mstahl@redhat.com> | 2016-06-06 13:56:43 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2016-06-06 14:49:31 +0200 |
commit | 1bf3cafd4cd6c3133adaad764e4f216a5d0ead1c (patch) | |
tree | f3cb22167d027aa239e4e6d113f667b42f2aead1 | |
parent | da4f7d5d76e054627b61521657d40141b9728e15 (diff) |
sc: StarCalc/DOS import: fix an endian issue
Change-Id: I0f76661d1aec104ee7e22a8abd5f734553796c33
-rw-r--r-- | sc/source/filter/starcalc/scflt.cxx | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/sc/source/filter/starcalc/scflt.cxx b/sc/source/filter/starcalc/scflt.cxx index 0d7f37c0028a..44088e31ffa1 100644 --- a/sc/source/filter/starcalc/scflt.cxx +++ b/sc/source/filter/starcalc/scflt.cxx @@ -1021,7 +1021,19 @@ void Sc10Import::LoadFileInfo() void Sc10Import::LoadEditStateInfo() { Sc10EditStateInfo EditStateInfo; - rStream.Read(&EditStateInfo, sizeof(EditStateInfo)); + + sal_uInt64 const nOldPos(rStream.Tell()); + + rStream.ReadUInt16(EditStateInfo.CarretX); + rStream.ReadUInt16(EditStateInfo.CarretY); + rStream.ReadUInt16(EditStateInfo.CarretZ); + rStream.ReadUInt16(EditStateInfo.DeltaX); + rStream.ReadUInt16(EditStateInfo.DeltaY); + rStream.ReadUInt16(EditStateInfo.DeltaZ); + rStream.ReadUChar(EditStateInfo.DataBaseMode); + rStream.Read(EditStateInfo.Reserved, sizeof(EditStateInfo.Reserved)); + + assert(rStream.GetError() || rStream.Tell() == nOldPos + sizeof(Sc10EditStateInfo)); nError = rStream.GetError(); nShowTab = static_cast<SCTAB>(EditStateInfo.DeltaZ); |