[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - sc/source
Michael Stahl
mstahl at redhat.com
Tue Jun 7 08:08:15 UTC 2016
sc/source/filter/starcalc/scflt.cxx | 16 +++++++++++++++-
1 file changed, 15 insertions(+), 1 deletion(-)
New commits:
commit 6b6ca45ad6ea62e8085ac017f5ee6a743191b900
Author: Michael Stahl <mstahl at redhat.com>
Date: Mon Jun 6 13:56:43 2016 +0200
sc: StarCalc/DOS import: fix an endian issue
(cherry picked from commit 1bf3cafd4cd6c3133adaad764e4f216a5d0ead1c)
sc: -Werror=unused-variable
(cherry picked from commit 722f6109296e115f56281bae548f809ef60327c2)
Change-Id: I0f76661d1aec104ee7e22a8abd5f734553796c33
Reviewed-on: https://gerrit.libreoffice.org/25994
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sc/source/filter/starcalc/scflt.cxx b/sc/source/filter/starcalc/scflt.cxx
index bfac4b0..d2ff51c 100644
--- a/sc/source/filter/starcalc/scflt.cxx
+++ b/sc/source/filter/starcalc/scflt.cxx
@@ -1023,7 +1023,21 @@ void Sc10Import::LoadFileInfo()
void Sc10Import::LoadEditStateInfo()
{
Sc10EditStateInfo EditStateInfo;
- rStream.Read(&EditStateInfo, sizeof(EditStateInfo));
+
+#if !defined(NDEBUG)
+ sal_uInt64 const nOldPos(rStream.Tell());
+#endif
+
+ 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);
More information about the Libreoffice-commits
mailing list