summaryrefslogtreecommitdiff
path: root/oox/source
diff options
context:
space:
mode:
authorAron Budea <aron.budea@collabora.com>2025-03-10 04:08:31 +1030
committerMike Kaganski <mike.kaganski@collabora.com>2025-03-31 21:58:03 +0200
commitab45b8d9959f8f392a10d0874c50f26b816a4da8 (patch)
tree8bc5b473a96ba682957f1a927ce2ffaa1a549c04 /oox/source
parent215500ea4d1f6f2d7630ab161d59c9a265425c56 (diff)
tdf#165655 oox: don't export incomplete shape data coming from VML
Some export was added in fd238380ae7820f12ac1f7c52d0f7180a93f3ba3. This can result in only anchor pointers and no other data saved for certain shapes having no export code, making it an invalid file. Change-Id: I81bf513b6ebaa9f6456a26ccbc3276e019551eca Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182699 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
Diffstat (limited to 'oox/source')
-rw-r--r--oox/source/export/shapes.cxx10
1 files changed, 10 insertions, 0 deletions
diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx
index 261bd5a24040..f05e9212a952 100644
--- a/oox/source/export/shapes.cxx
+++ b/oox/source/export/shapes.cxx
@@ -2189,6 +2189,16 @@ constexpr auto constMap = frozen::make_unordered_map<std::u16string_view, ShapeC
} // end anonymous namespace
+
+bool ShapeExport::IsShapeTypeKnown(const Reference<XShape>& xShape)
+{
+ if (!xShape)
+ return false;
+
+ const OUString sShapeType = xShape->getShapeType();
+ return constMap.contains(sShapeType);
+}
+
ShapeExport& ShapeExport::WriteShape( const Reference< XShape >& xShape )
{
if (!xShape)