incubator-ooo-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 119011] formulas are lost by "DOCX" import filter
Date Fri, 09 Mar 2012 13:52:38 GMT
https://issues.apache.org/ooo/show_bug.cgi?id=119011

Andre <af@a-w-f.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |af@a-w-f.de

--- Comment #8 from Andre <af@a-w-f.de> 2012-03-09 13:52:38 UTC ---
I looked into this and found out why we do not display the
formules. But I know neither how to fix it nor how this could have
worked in recent versions.

Here is what I have found out so far (please keep in mind that I know
nearly nothing about XML or XSLT processing nor about the docx import
filter, so I may be statiting the obvious):

For context here is how a typical formula in the bugdoc looks like in
the document.xml stream:

        <w:object w:dxaOrig="700" w:dyaOrig="380">
          <v:shape id="_x0000_i1026" type="#_x0000_t75"
style="width:35.25pt;height:18.75pt" o:ole="">
            <v:imagedata r:id="rId18" o:title=""/>
          </v:shape>
          <o:OLEObject Type="Embed" ProgID="Equation.3" ShapeID="_x0000_i1026"
DrawAspect="Content" ObjectID="_1391609263" r:id="rId19"/>
        </w:object>

There is only one such object that also contains an explicit
description of the formula.

As you may see there is both an OLE object (the o:OLEObject tag) and a
bitmap replacement (the v:imagedata tag).  The OLE object is not read
properly because (among others) the r:id attribute is not recognized.
Therefore the stream that describes the OLE object is not found and
not processed.  Even if that is fixed
(I made a little experiment by
hacking the wntmsci12/misc/OOXMLFactory_vml-officeDrawing.cxx file
by adding the line
   (*pMap)[NS_relationships|OOXML_id] = AttributeInfo(RT_String, 0);
below the
   case NN_vml_officeDrawing|DEFINE_CT_OLEObject:
switch near line 448.)
a replacement is not extracted from the OLE stream.

More importantly, the outer w:object and the parallel v:shape tags are not
processed.  As a result neither the location of the OLE is read nor
the replacement image.

I did not find any recent or not-so-recent changes that could have
broken this.


Somebody whith more knowledge about XML, XSLT, Writer, and OLE may
need little time to add support for at least reading the replacement
image.

-- 
Configure bugmail: https://issues.apache.org/ooo/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

Mime
View raw message