summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorRegina Henschel <rb.henschel@t-online.de>2017-10-22 19:34:44 +0200
committerMichael Stahl <mstahl@redhat.com>2017-11-10 23:33:43 +0100
commit0958cd79545a21a37642f812937d57164117bffe (patch)
tree2d982d5ffa92f5e3c52a0b4ee1b05252e3a2a8b5 /xmloff
parentdab3722d7a09ad500f369146f132c38d464ab0dd (diff)
tdf#112547 element p to draw:object, import expects it there
There exists no documents produced by LibreOffice, where text on OLE objects has worked, because import expects the paragraphs inside the draw:object element, but LO has written them outside. The patch changes LO to write the paragraphs inside the draw:object element. The patch does not enable LibreOffice to read the paragraphs in old documents. But versions at least since 5.1 will be able to read text on OLE objects from documents which were produced by versions with applied patch. Reviewed-on: https://gerrit.libreoffice.org/43696 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Armin Le Grand <Armin.Le.Grand@cib.de> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Reviewed-by: Michael Stahl <mstahl@redhat.com> (cherry picked from commit 21f61ffeb7e72caee98f12cac2dd25fe7ec3a821) tdf#112547 sd: add unit test (cherry picked from commit b3cfb849b19dc1e40c12586bebd2b76fc41007fa) Change-Id: I879135f1a869e46c32361db653ede05227bab95e Reviewed-on: https://gerrit.libreoffice.org/44374 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/draw/shapeexport.cxx15
1 files changed, 7 insertions, 8 deletions
diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx
index b36dbc49e81b..899fa0015839 100644
--- a/xmloff/source/draw/shapeexport.cxx
+++ b/xmloff/source/draw/shapeexport.cxx
@@ -2777,14 +2777,6 @@ void XMLShapeExport::ImpExportOLE2Shape(
if( !bIsEmptyPresObj || bSaveBackwardsCompatible )
{
- // tdf#112005 export text *before* adding any attributes
- if (!bIsEmptyPresObj && supportsText(eShapeType))
- {
- // #i118485# Add text export, the draw OLE shape allows text now
- // fdo#58571 chart objects don't allow text:p
- ImpExportText( xShape, TextPNS::EXTENSION );
- }
-
if (pAttrList)
{
mrExport.AddAttributeList(pAttrList);
@@ -2849,6 +2841,13 @@ void XMLShapeExport::ImpExportOLE2Shape(
enum XMLTokenEnum eElem = sClassId.isEmpty() ? XML_OBJECT : XML_OBJECT_OLE ;
SvXMLElementExport aElem( mrExport, XML_NAMESPACE_DRAW, eElem, true, true );
+ // tdf#112547 export text as child of draw:object, where import expects it
+ if (!bIsEmptyPresObj && supportsText(eShapeType))
+ {
+ // #i118485# Add text export, the draw OLE shape allows text now
+ ImpExportText( xShape, TextPNS::EXTENSION );
+ }
+
if(bExportEmbedded && !bIsEmptyPresObj)
{
if(bInternal)