Issue 98430 - Opening particular .ODT created by MS Word (with frame/picture in shape) fails with "read error" message
Summary: Opening particular .ODT created by MS Word (with frame/picture in shape) fail...
Alias: None
Product: Writer
Classification: Application
Component: open-import (show other issues)
Version: OOo 3.0
Hardware: All All
: P3 Minor with 2 votes (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
Depends on:
Reported: 2009-01-24 15:32 UTC by divo76
Modified: 2017-05-20 10:44 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: 4.0.0
Developer Difficulty: ---

Document containing picture inside a shape failing to open (114.16 KB, application/vnd.oasis.opendocument.text)
2009-01-24 15:35 UTC, divo76
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description divo76 2009-01-24 15:32:01 UTC
ODF 1.0/1.1 documents containing a frame inside a shape produce an error when
trying to open in 3.0 (and I think all other versions of OOo as

Steps to reproduce:
Not possible with OOo. Create a new document in Microsoft Word, insert a shape
of any type and insert a picture inside the shape. Save the document to ODF
using MS Office 2007 SP2 or the OpenXML/ODF Translator Add-in.

Expected behavior:
Even if OOo does not support the specific feature, Writer should be able to fail
gracefully and open the valid ODF document (by simply ignoring the ODF features
that are not supported by OOo).

Generally the input parser is already quite robust; however it should also be
capable of opening documents created by other applications, especially when
these documents only used features of ODF 1.0/1.1.

Please find below the *valid* content part which was created using MS Office SP2

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <style:font-face style:name="Calibri" svg:font-family="Calibri"
style:font-family-generic="swiss" style:font-pitch="variable" svg:panose-1="2 15
5 2 2 2 4 3 2 4"/>
    <style:font-face style:name="Times New Roman" svg:font-family="Times New
Roman" style:font-family-generic="roman" style:font-pitch="variable"
svg:panose-1="2 2 6 3 5 4 5 2 3 4"/>
    <style:font-face style:name="Tahoma" svg:font-family="Tahoma"
style:font-family-generic="swiss" style:font-pitch="variable" svg:panose-1="2 11
6 4 3 5 4 4 2 4"/>
    <style:font-face style:name="Cambria" svg:font-family="Cambria"
style:font-family-generic="roman" style:font-pitch="variable" svg:panose-1="2 4
5 3 5 4 6 3 2 4"/>
    <style:style style:name="P1" style:parent-style-name="Normal"
style:master-page-name="MP0" style:family="paragraph">
      <style:paragraph-properties fo:break-before="page"/>
    <style:style style:name="T2" style:parent-style-name="DefaultParagraphFont"
      <style:text-properties fo:language="de" fo:country="DE"/>
    <style:style style:name="P3" style:parent-style-name="Normal"
      <style:text-properties fo:language="de" fo:country="DE"/>
    <style:style style:name="P4" style:parent-style-name="Normal"
      <style:text-properties fo:language="de" fo:country="DE"/>
    <style:style style:name="P5" style:parent-style-name="Normal"
      <style:text-properties fo:language="de" fo:country="DE"/>
    <style:style style:name="P6" style:parent-style-name="Normal"
      <style:text-properties fo:language="de" fo:country="DE"/>
    <style:style style:family="graphic" style:name="a0">
      <style:graphic-properties fo:min-width="3.89514in"
fo:min-height="4.58125in" fo:wrap-option="wrap" fo:padding-top="0.05in"
fo:padding-bottom="0.05in" fo:padding-left="0.1in" fo:padding-right="0.1in"
draw:textarea-vertical-align="top" style:wrap="run-through"
style:run-through="foreground" style:writing-mode="lr-tb" draw:fill="solid"
draw:fill-color="#ffffff" draw:opacity="100%" draw:stroke="solid"
svg:stroke-width="0.01042in" svg:stroke-color="#000000"
svg:stroke-opacity="100%" draw:stroke-linejoin="round"
style:horizontal-rel="paragraph" style:vertical-rel="paragraph"
style:horizontal-pos="from-left" style:vertical-pos="from-top"
draw:auto-grow-width="false" draw:auto-grow-height="false"/>
    <style:style style:family="graphic" style:name="a1"
      <style:graphic-properties fo:border="none" fo:background-color="transparent"/>
    <office:text text:use-soft-page-breaks="true">
      <text:p text:style-name="P1">
        <draw:custom-shape svg:x="0.74444in" svg:y="1.05833in"
svg:width="4.58125in" svg:height="3.89514in" draw:z-index="251658240"
draw:id="id0" draw:style-name="a0" draw:name="AutoShape 2"
          <text:p text:style-name="Normal">
            <text:span text:style-name="T2">kjhkjh</text:span>
            <draw:frame draw:style-name="a1" draw:name="Picture 0"
text:anchor-type="as-char" svg:x="0in" svg:y="0in" svg:width="2.60417in"
svg:height="2.08333in" style:rel-width="scale" style:rel-height="scale">
              <draw:image xlink:href="media/image1.png" xlink:type="simple"
xlink:show="embed" xlink:actuate="onLoad"/>
          <text:p text:style-name="P3">lkjl</text:p>
          <text:p text:style-name="P4"/>
          <text:p text:style-name="P5">kjh</text:p>
          <text:p text:style-name="P6">l</text:p>
          <draw:enhanced-geometry draw:path-stretchpoint-x="10800"
draw:path-stretchpoint-y="10800" draw:type="non-primitive" svg:viewBox="0 0
21600 21600" draw:enhanced-path="M ?f7 0 X 0 ?f8 L 0 ?f9 Y ?f7 21600 L ?f10
21600 X 21600 ?f9 L 21600 ?f8 Y ?f10 0 Z N" draw:text-areas="?f3 ?f4 ?f5 ?f6"
            <draw:equation draw:name="f0" draw:formula="45"/>
            <draw:equation draw:name="f1" draw:formula="$0 *sin(?f0 *(pi/180))"/>
            <draw:equation draw:name="f2" draw:formula="?f1 *3163/7636"/>
            <draw:equation draw:name="f3" draw:formula="left+?f2 "/>
            <draw:equation draw:name="f4" draw:formula="top+?f2 "/>
            <draw:equation draw:name="f5" draw:formula="right-?f2 "/>
            <draw:equation draw:name="f6" draw:formula="bottom-?f2 "/>
            <draw:equation draw:name="f7" draw:formula="left+$0 "/>
            <draw:equation draw:name="f8" draw:formula="top+$0 "/>
            <draw:equation draw:name="f9" draw:formula="bottom-$0 "/>
            <draw:equation draw:name="f10" draw:formula="right-$0 "/>
            <draw:handle draw:handle-switched="true" draw:handle-position="$0
top" draw:handle-range-x-minimum="0" draw:handle-range-x-maximum="10800"/>
Comment 1 divo76 2009-01-24 15:35:19 UTC
Created attachment 59643 [details]
Document containing picture inside a shape failing to open
Comment 2 michael.ruess 2009-01-26 16:33:38 UTC
MRU->HBRINKM: could you please have a look if this is valid ODF which is
produced by MS Word?
When I create a similar document and save it in MS Word using "SUN ODF Plugin
for MS Word" it can be opened by OOo without any problem.
Comment 3 divo76 2009-01-26 18:58:26 UTC
Just some additional information: 

- The document is valid ODF according to the odftoolkit validator and the ODF
schema allows pictures/frames to be contained in shapes (A drawing object such
as a draw:rect contains draw-text, which can e.g. be a regular paragraph
containing paragraph-content, i.e. this definition is somwhat recursive)

- Word documents with pictures in shapes converted with Sun's ODF Add-in or
OOo's .doc import can be opened because the converter simply drops the image
(after all they are build from the same code base)

- However, both the (only as non-public beta available) MS Word 2007 SP2
converter and the OpenXML/ODF Translator try not to retain the image for full
round-tripability, hence the problem with OOo.
Comment 4 divo76 2009-01-26 19:00:39 UTC
Sorry, should of course the last point should have been:

- However, both the (only as non-public beta available) MS Word 2007 SP2
converter and the OpenXML/ODF Translator try to retain the image for full
round-tripability, hence the problem with OOo.
Comment 5 Mathias_Bauer 2009-05-14 12:37:38 UTC
"Simply ignoring" is a bad idea. The user should at least get a notification
that content couldn't be loaded.

So if I understand correctly you are asking for converting the error into a
warning, right?
Comment 6 openoffice 2009-10-26 15:37:29 UTC
did not manage to fix for OOo 3.2
Comment 7 Rainer Bielefeld 2013-09-17 04:57:47 UTC
<> rates reporter's sample INVALID (I don't know whether that's related to reported problem), but of course yes, writer should open the document and simply ignore the invalid or unknown parts.

Still Reproducible with reporter's sample document and "AOO 4.1.0-Dev – English  UI / German locale - [AOO410m1(Build:9750)  -  Rev. 1521488 - 2013-09-11]" on German WIN7 Home
Premium (64bit)", own separate user profile.:

1. Try to open sample document from AOO Start Center File menu
   Bug: error message "Read error. Error reading file"

Additional info:
a) Competitors:
a1) SoftMaker FreeOffice: opens document without error message, 
    but frame looks empty
a2) Calligra: opens document, cat with gun picture in frame
a3) LibO 4.0.3: same as AOO
b) OOo 2.0.2 crashes when I try ot open
c) Also error message with 3.1.1
d) I wonder whether that's a feature what will be used often. If yes, this one
   would be a major issue
Comment 8 Marcus 2017-05-20 10:44:16 UTC
Reset the assignee to the default "".