Bug 84942 - Textbox is dropped on opening, if the shape is not a custom-shape
Summary: Textbox is dropped on opening, if the shape is not a custom-shape
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.4.0.0.alpha0+ Master
Hardware: Other All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Textbox
  Show dependency treegraph
 
Reported: 2014-10-12 17:11 UTC by Regina Henschel
Modified: 2023-02-01 15:23 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Document contains polygon with textbox and polygon with simple text (15.26 KB, application/vnd.oasis.opendocument.text)
2014-10-12 17:11 UTC, Regina Henschel
Details
a patch that allows the content to be imported, but not laid out right (3.76 KB, patch)
2015-01-20 17:07 UTC, Caolán McNamara
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Regina Henschel 2014-10-12 17:11:38 UTC
Created attachment 107745 [details]
Document contains polygon with textbox and polygon with simple text

The attached file has been created this way:
Draw a polygon with simple text in Draw and insert it into the Writer document twice as 'drawing format'.
For the second polygon remove the text and add a textbox instead.
Insert a Math-object into this textbox.
Save.

Look into the content.xml of the document. Notice, that the Math-object is correctly stored inside the draw:frame element.

Open the document in version 4.4. Notice the text-box is missing.

I consider this not a "missing feature", but a defect, because the user notices, that the content is lost, only when reopening the document. If it is not possible to fix the opening till release of 4.4, then the feature "add textbox" should at least be disabled for non custom-shapes.
Comment 1 Buovjaga 2014-11-15 08:36:28 UTC
Confirmed missing text box.

Win 7 64-bit Version: 4.4.0.0.alpha2+
Build ID: b021b5983c62e266b82d9f0c5c6d8d8900553827
TinderBox: Win-x86@39, Branch:master, Time: 2014-11-12_01:10:08
Comment 2 Buovjaga 2015-01-09 14:22:59 UTC
Lowered version number after reproducing with:

Ubuntu 14.10 64-bit
LibreOffice 3.3.0 
OOO330m19 (Build:6)
tag libreoffice-3.3.0.4
Comment 3 Regina Henschel 2015-01-09 14:56:06 UTC
(In reply to Beluga from comment #2)
> Lowered version number after reproducing with:
> 
> Ubuntu 14.10 64-bit
> LibreOffice 3.3.0 
> OOO330m19 (Build:6)
> tag libreoffice-3.3.0.4

Version 3.3 makes no sense, because "Textbox in shape" is a new feature in LO4.4, which does not exist in version 3.3. For the new feature see https://wiki.documentfoundation.org/ReleaseNotes/4.4#Shapes_can_have_a_TextBox
Comment 4 Buovjaga 2015-01-09 15:03:25 UTC
Sorry for being senseless, changed back.
Comment 5 Caolán McNamara 2015-01-20 16:22:20 UTC
code here assumes that there is a writer text cursor at this point, which there isn't of course.
Comment 6 Caolán McNamara 2015-01-20 17:07:29 UTC
Created attachment 112558 [details]
a patch that allows the content to be imported, but not laid out right

It doesn't work because the special "writer" textbox are only enabled for inside enhanced shapes and not basic shapes. FWIW attached is a patch to enable those, but it doesn't result in right layout of the embedded textbox.

Without this (useless) patch SwXMLTextImportHelper::createAndInsertOLEObject will have a "XSimpleText" cursor into a simple editengine text box and that doesn't support inserting ole objects so nothing gets inserted.

I'm not working on this further, just wanted to have a quick look into it.
Comment 7 Maxim Monastirsky 2015-09-29 19:20:11 UTC
Basic shapes don't have the "Add Text Box" menu item since the fix for Bug 89266, so changing the severity to enhancement.