PPTX export: fix size of shape for slide narrations
This was invisible in PowerPoint without explicit stretching. Change-Id: I29b9f23eba6d59436cb1b6d15c9840794f932e69 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109778 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
This commit is contained in:
@@ -1238,6 +1238,14 @@ void ShapeExport::WriteGraphicObjectShapePart( const Reference< XShape >& xShape
|
||||
if ( pGraphic || bStretch )
|
||||
pFS->singleElementNS(XML_a, XML_stretch);
|
||||
|
||||
if (bHasMediaURL)
|
||||
{
|
||||
// Graphic of media shapes is always stretched.
|
||||
pFS->startElementNS(XML_a, XML_stretch);
|
||||
pFS->singleElementNS(XML_a, XML_fillRect);
|
||||
pFS->endElementNS(XML_a, XML_stretch);
|
||||
}
|
||||
|
||||
pFS->endElementNS( mnXmlNamespace, XML_blipFill );
|
||||
|
||||
// visual shape properties
|
||||
|
@@ -1336,6 +1336,12 @@ void SdOOXMLExportTest1::testNarrationMimeType()
|
||||
// i.e. the bitmap of the narration was lost, some default placeholder was exported instead.
|
||||
CPPUNIT_ASSERT_EQUAL(static_cast<tools::Long>(256), aBitmapEx.GetSizePixel().Height());
|
||||
|
||||
// Without the accompanying fix in place, this test would have failed with:
|
||||
// - Expected: 1
|
||||
// - Actual : 0
|
||||
// i.e. p:blipFill was missing its a:stretch child element, so the shape was invisible.
|
||||
assertXPath(pSlideDoc, "/p:sld/p:cSld/p:spTree/p:pic/p:blipFill/a:stretch/a:fillRect", 1);
|
||||
|
||||
xDocShRef->DoClose();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user