https://bugs.documentfoundation.org/show_bug.cgi?id=106262

            Bug ID: 106262
           Summary: FILESAVE bad handling of text which is added to an OLE
                    object
           Product: LibreOffice
           Version: 5.4.0.0.alpha0+ Master
          Hardware: x86 (IA32)
                OS: Windows (All)
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: Draw
          Assignee: [email protected]
          Reporter: [email protected]

The error happens with an OLE object of kind MATH, chart or other of the ODF
document kinds. It happens in Impress as well.
This is about the errors in file format. For problems with the UI see bug
106249.

Start with a Draw document and insert a MATH object. Select the object, so that
it has green handles. Then press key F2. Now you are in text edit mode. Write
some text. Save the document using "ODF 1.2 extended". Close and reopen the
document. The text is gone.
Do the same, but save using "ODF 1.2", which should produce strict ODF.
Do the same with a chart.


In case "ODF 1.2 extended" LibreOffice writes the structure
<draw:frame>
  <loext:p text:style-name="P1">Your text</loext:p>
  <draw:object>
    ⁞

The element <loext:p> is not invalid for "extended", but useless, as it is not
evaluated on import and bad in sense of interoperability and not needed, see
below.


In case "ODF 1.2" LibreOffice writes the structure
<draw:frame>
  <p text:style-name="P1">Your text</p>
  <draw:object>
    ⁞

The element <p> is invalid, because the element <draw:frame> has no child of
kind paragraph and because the element itself needs a namespace prefix "text:".



In case you do the same test with a Calc-OLE (copy some cells from a
spreadsheet and insert is as "Calc 8" to get a Calc-OLE), there no text is in
the document at all.


expected behavior
=================
The <draw:frame> element has a child element <draw:text-box>. Such element
<draw:text-box> has a child element <text:p>. So the correct structure would be

<draw:frame>
  <draw:text-box>
     <text:p text:style-name="P1">Your text</text:p>
  </draw:text-box>
  <draw:object>
      ⁞
  </draw:object>
      ⁞

AOO is wrong too, but it fails different from LibreOffice.

I have tested it in Version: 5.4.0.0.alpha0+
Build ID: eb7b03b052ffe8c2c577b2349987653db6c53f76
CPU threads: 4; OS: Windows 6.1; UI render: default; 
TinderBox: Win-x86@62-merge-TDF, Branch:MASTER, Time: 2017-02-26_22:34:18
Locale: de-DE (de_DE); Calc: group
I guess, it had never been correct.

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to