summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2018-12-05 10:14:17 +0100
committerStephan Bergmann <sbergman@redhat.com>2018-12-06 08:35:43 +0100
commit87d4597090aeaa473727834bad4caad83698275e (patch)
tree850ee756e2a933c382c9a52310858436a20c210b
parent931cb1caf26a09d7152360407e1f163fc3fab1c2 (diff)
Fix reading 16 bit millisecond value
It had originally been read as 16 bit via >> in d2000efb31f864e912c6cf52760eea0e602b6893 "#i106421#: move msfilter to filter", then accidentally changed to be read as 32 bit via >> in 9830fd36dbdb72c79703b0c61efc027fba793c5a "date/time IDL datatypes incompatible change" (and later changed to be read as 32 bit explicitly via ReadUInt32 with 15535e32ddcfee451d4dbc9be9de0b8c9f9d78d4 "convert SvStream::operator>> methods to ReadXXX methods"). Change-Id: I5062e67a578d182a0df2726ab8d0bae465f154f3 Reviewed-on: https://gerrit.libreoffice.org/64604 Reviewed-by: Lionel Elie Mamane <lionel@mamane.lu> Tested-by: Jenkins (cherry picked from commit f84f5b0a0cdb82f444de572f9d8554a96056f874) Reviewed-on: https://gerrit.libreoffice.org/64635 Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
-rw-r--r--filter/source/msfilter/svdfppt.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx
index ac8728cd424f..97eefcc77c8b 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -2704,6 +2704,7 @@ static void ImportComment10( SvxMSDffManager const & rMan, SvStream& rStCtrl, Sd
case PPT_PST_CommentAtom10 :
{
+ sal_uInt16 millisec = 0;
rStCtrl.ReadInt32( nIndex )
.ReadInt16( aDateTime.Year )
.ReadUInt16( aDateTime.Month )
@@ -2712,11 +2713,11 @@ static void ImportComment10( SvxMSDffManager const & rMan, SvStream& rStCtrl, Sd
.ReadUInt16( aDateTime.Hours )
.ReadUInt16( aDateTime.Minutes )
.ReadUInt16( aDateTime.Seconds )
- .ReadUInt32( aDateTime.NanoSeconds )
+ .ReadUInt16( millisec )
.ReadInt32( nPosX )
.ReadInt32( nPosY );
- aDateTime.NanoSeconds *= ::tools::Time::nanoPerMilli;
+ aDateTime.NanoSeconds = millisec * ::tools::Time::nanoPerMilli;
}
break;
}