cool#15716 find associated shape in SmartArt export
The export needs to write pt-elements for content text nodes with the original modelId to data.xml. However, the shape has not this modelId but the modelId of the associated pt-element of type=pres. Thus this element is searched for in getMasterXShapeForPoint(). The error was, to examine msPresentationLayoutName. That name is created by the author of the SmartArt template and is arbitrary. And indeed, a name textNode exists only twice in the over hundred predefined SmartArt templates. So remove this test, it prevents to find the shape. After removing the above mentioned test, an error in WriteText() in the export becomes visible. The export of a SmartArt diagram calls WriteText() with bBodyPr=false. With that no a:bodyPr element is written at all. But for the CT_TextBody it is specified in OOXML, that the bodyPr child element is mandatory. Thus we need to write an empty element in this case. Without it, the file markup is invalid and MS Office requests to repair the document. Change-Id: I9cdf5e882b415ca1d13718d6c1e47ebb1d2c7018 Signed-off-by: Regina Henschel <rb.henschel@t-online.de> Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/4396 Reviewed-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.com> Tested-by: Jenkins CPCI <releng@collaboraoffice.com> (cherry picked from commit 533dccff298edc397a9c0fc564ba4d31b8c27432) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206994 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> Tested-by: Jenkins
This commit is contained in:
committed by
Xisco Fauli
parent
9fbc05ae4f
commit
54d6937ab4
@@ -4614,6 +4614,10 @@ void DrawingML::WriteText(const Reference<XInterface>& rXIface, bool bBodyPr, bo
|
||||
if (bBodyPr)
|
||||
{
|
||||
WriteBodyProps(rXIface, nXmlNamespace, bIsFontworkShape, nTop, nBottom, nLeft, nRight);
|
||||
}
|
||||
else
|
||||
{
|
||||
mpFS->singleElementNS(XML_a, XML_bodyPr);
|
||||
} // end of bodyPr
|
||||
|
||||
Reference< XEnumerationAccess > access( xXText, UNO_QUERY );
|
||||
|
||||
@@ -671,7 +671,6 @@ uno::Reference<drawing::XShape> DiagramData_svx::getMasterXShapeForPoint(const P
|
||||
for (auto& rCandidate : getPoints())
|
||||
{
|
||||
if (!rCandidate.msPresentationAssociationId.isEmpty()
|
||||
&& "textNode" == rCandidate.msPresentationLayoutName
|
||||
&& rCandidate.msPresentationAssociationId == rPoint.msModelId)
|
||||
{
|
||||
const uno::Reference<drawing::XShape> xMasterText = getXShapeByModelID(rCandidate.msModelId);
|
||||
|
||||
Reference in New Issue
Block a user