summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2016-06-03 22:00:12 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2016-06-09 09:21:18 +0000
commit523505e556aed1934ad5c5609d9a6377e72becce (patch)
tree9eee2991b61920ca3c2296a3c0b74b1158dc75ca
parent8a94e538c3306b2af1a76c724e4dcae0e3968164 (diff)
filter: PPT import: PptPlaceholder is 1 byte large
The array of 8 bytes corresponds to 8 enum values and is read directly in ReadPptSlideLayoutAto(); this was wrongly converted to enum. (regression from e5a03da8eb02c333502d6b427625e7bf554ff203) Change-Id: I5757e06459467b3c84c4a404493fa3be23e4e9a0 (cherry picked from commit 6325cdb735effc5c9ff85819b20aec4271158519) Reviewed-on: https://gerrit.libreoffice.org/26011 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
-rw-r--r--filter/source/msfilter/svdfppt.cxx1
-rw-r--r--include/filter/msfilter/svdfppt.hxx4
2 files changed, 3 insertions, 2 deletions
diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx
index 127e779aab41..450097500bd2 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -306,6 +306,7 @@ SvStream& ReadPptSlideLayoutAtom( SvStream& rIn, PptSlideLayoutAtom& rAtom )
sal_Int32 nTmp;
rIn.ReadInt32(nTmp);
rAtom.eLayout = static_cast<PptSlideLayout>(nTmp);
+ static_assert(sizeof(rAtom.aPlaceholderId) == 8, "wrong size of serialized array");
rIn.Read( rAtom.aPlaceholderId, 8 );
return rIn;
}
diff --git a/include/filter/msfilter/svdfppt.hxx b/include/filter/msfilter/svdfppt.hxx
index cfd27ddba410..885634ef15e9 100644
--- a/include/filter/msfilter/svdfppt.hxx
+++ b/include/filter/msfilter/svdfppt.hxx
@@ -57,7 +57,7 @@ class PPTTextObj;
class DffRecordHeader;
class SvxBulletItem;
enum class PptSlideLayout;
-enum class PptPlaceholder;
+enum class PptPlaceholder : sal_uInt8;
#define PPT_IMPORTFLAGS_NO_TEXT_ASSERT 1
@@ -1463,7 +1463,7 @@ enum class PptSlideLayout
};
// the following table describes the placeholder id's (values from reality followed by values taken from the documentation)
-enum class PptPlaceholder
+enum class PptPlaceholder : sal_uInt8
{
NONE = 0, // 0 None
MASTERTITLE = 1, // 1 Master title