sw/source/filter/ww8/docxsdrexport.cxx | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-)
New commits: commit a27039f912fac32261cc6225f21823231eb10745 Author: Mike Kaganski <mike.kagan...@collabora.com> AuthorDate: Fri Oct 18 13:04:41 2019 +0200 Commit: Mike Kaganski <mike.kagan...@collabora.com> CommitDate: Fri Oct 18 16:26:26 2019 +0200 Properly restore DMLAndVMLDrawingOpen See other places which also call setDMLAndVMLDrawingOpen in a similar way: DocxSdrExport::writeDMLTextFrame and DocxSdrExport::writeVMLTextFrame. This also slightly optimizes calls to lcl_isLockedCanvas. Change-Id: I5df71640816883a14ddc86259e7d649f150dc422 Reviewed-on: https://gerrit.libreoffice.org/81036 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com> diff --git a/sw/source/filter/ww8/docxsdrexport.cxx b/sw/source/filter/ww8/docxsdrexport.cxx index 5d80a78a9d90..8cc14d097fa0 100644 --- a/sw/source/filter/ww8/docxsdrexport.cxx +++ b/sw/source/filter/ww8/docxsdrexport.cxx @@ -991,17 +991,13 @@ void DocxSdrExport::writeDMLAndVMLDrawing(const SdrObject* sdrObj, uno::Reference<drawing::XShape> xShape(const_cast<SdrObject*>(sdrObj)->getUnoShape(), uno::UNO_QUERY_THROW); - // Locked canvas is OK inside DML. - if (lcl_isLockedCanvas(xShape)) - bDMLAndVMLDrawingOpen = false; - MSO_SPT eShapeType = EscherPropertyContainer::GetCustomShapeType(xShape, nMirrorFlags, sShapeType); // In case we are already inside a DML block, then write the shape only as VML, turn out that's allowed to do. // A common service created in util to check for VML shapes which are allowed to have textbox in content if ((msfilter::util::HasTextBoxContent(eShapeType)) && Impl::isSupportedDMLShape(xShape) - && !bDMLAndVMLDrawingOpen) + && (!bDMLAndVMLDrawingOpen || lcl_isLockedCanvas(xShape))) // Locked canvas is OK inside DML { m_pImpl->getSerializer()->startElementNS(XML_mc, XML_AlternateContent); @@ -1020,7 +1016,7 @@ void DocxSdrExport::writeDMLAndVMLDrawing(const SdrObject* sdrObj, else writeVMLDrawing(sdrObj, rFrameFormat); - m_pImpl->setDMLAndVMLDrawingOpen(false); + m_pImpl->setDMLAndVMLDrawingOpen(bDMLAndVMLDrawingOpen); } // Converts ARGB transparency (0..255) to drawingml alpha (opposite, and 0..100000) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits