[Libreoffice-commits] core.git: oox/source
Miklos Vajna
vmiklos at collabora.co.uk
Mon Dec 22 13:49:05 PST 2014
oox/source/export/shapes.cxx | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
New commits:
commit cf15306ccf49da290b391517e2c5dd22a4f1be45
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Mon Dec 22 22:36:56 2014 +0100
ERROR: Invalid content was found starting with element 'p:pic'.
Again, as pointed out by CppunitTest_sd_export_tests. Sadly it seems that the
spec and PowerPoint is not in sync here, so just do what makes both happy. This
fixes the --with-export-validation build.
Change-Id: I49e22d154d30106f91f1c972012f99a863784d23
diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx
index 81b5698..3526636 100644
--- a/oox/source/export/shapes.cxx
+++ b/oox/source/export/shapes.cxx
@@ -1109,7 +1109,8 @@ ShapeExport& ShapeExport::WriteOLE2Shape( Reference< XShape > xShape )
mpFS->startElementNS( mnXmlNamespace, XML_oleObj,
XML_name, "Document",
FSNS(XML_r, XML_id), USS( sRelId ),
- XML_spid, OString::number(GetShapeID(xShape)),
+ // The spec says that this is a required attribute, but PowerPoint can only handle an empty value.
+ XML_spid, "",
FSEND );
}
@@ -1117,7 +1118,9 @@ ShapeExport& ShapeExport::WriteOLE2Shape( Reference< XShape > xShape )
// pic element
SdrObject* pSdrOLE2( GetSdrObjectFromXShape( xShape ) );
- if ( pSdrOLE2 && pSdrOLE2->ISA( SdrOle2Obj ) )
+ // The spec doesn't allow <p:pic> here, but PowerPoint requires it.
+ bool bEcma = mpFB->getVersion() == oox::core::ECMA_DIALECT;
+ if ( pSdrOLE2 && pSdrOLE2->ISA( SdrOle2Obj ) && bEcma)
{
const Graphic* pGraphic = static_cast<SdrOle2Obj*>(pSdrOLE2)->GetGraphic();
if ( pGraphic )
More information about the Libreoffice-commits
mailing list