Issue 119903

Summary: Alternative text for form control can't import and export correctly in AOO.
Product: Calc Reporter: binguo <binbjguo>
Component: codeAssignee: Andre <awf.aoo>
Status: CLOSED FIXED QA Contact:
Severity: Normal    
Priority: P3 CC: awf.aoo, lijianyuan1983
Version: 3.4.0   
Target Milestone: ---   
Hardware: PC   
OS: All   
Issue Type: DEFECT Latest Confirmation in: ---
Developer Difficulty: ---
Attachments:
Description Flags
Sample file with form control with alternative text can repro this bug
none
Patch for Excel form alt text import and export
awf.aoo: review+
File for UT none

Description binguo 2012-06-08 02:51:28 UTC
Created attachment 78158 [details]
Sample file with form control with alternative text can repro this bug

Steps:
1.Open the attached sample file in AOO.
2.Enable form controls toolbar via "View->ToolBar->Form Controls " and make sure Design mode is on.
3.Select the form control on sheet1, right click and select Object Description.
4.Check the info.

Defect:
1. Default Alternative text can't be imported into AOO.
2. Set the Title OR Description info of form control in AOO, save and re-open in AOO, content is lost. Open it in MS Excel 2003, data is also lost.
Comment 1 Jianyuan Li 2012-06-08 03:00:52 UTC
I am investigating this issue. Plan to use the AOO's shape|form control attribute "title" for the import and export of Microsoft Excel 2003 shape|form control attribute "alt text".
Comment 2 Jianyuan Li 2012-06-08 09:33:19 UTC
I will use "Description" other than "Title". Below is the discussion about this issue:
Jianyuan Li
6月7日 (1 天前)

发送至 ooo-dev 
Hi, All,

In Excel 2003, for shape and form control, there is an attribute named "alt text". But Aoo shape and form control do not have an attribute similar like it. So when Aoo import them, this attribute will be omitted. And on exporting it as an Excel 2003 file, this attribute will not be exported. So on opening the export file in Excel 2003, incorrect attribute value will be shown. There is a bug related to it: https://issues.apache.org/ooo/show_bug.cgi?id=119659

To fix this issue, is there someone having a good solution? How about import alt text as the title(in shape description dialog) in Aoo? And then export the Aoo title as Excel 2007 alt text?


Oliver-Rainer Wittmann orwittmann@googlemail.com
6月7日 (1 天前)

发送至 ooo-dev 
Hi,
I think it is a good idea to use the AOO's shape|form control attribute "title" for the import and export of Microsoft Excel 2003 shape|form control attribute "alt text".

Best regards, Oliver.


ZuoJun Chen zjchencdl@gmail.com 通过“incubator.apache.org”
6月7日 (1 天前)

发送至 ooo-dev 
Hi, Jianyuan

    I think this problem may exist on  those documentation objects which
has alternative text or object description properties, such as Chart, OLE,
Fontwork, etc. Currently the import filter does not parse alt text, The
solution that import alt text as the title sounds good to me:)



Armin Le Grand Armin.Le.Grand@me.com 通过“incubator.apache.org”
1:17 (16 小时前)

发送至 ooo-dev 
       Hi Jianyuan Li,


On 07.06.2012 10:08, Jianyuan Li wrote:
There are 'Title', 'Description' and 'Name' properties for each shape. "alt text" sounds more like many lines, so I would suggest to use 'Description' for it, maybe there is also a good fit for 'Title'. The property 'Name' should be a short string and is shown in the navigator, maybe also a good candidate to add something useful.

HTH!

Sincerely,
       Armin
--
ALG


Jianyuan Li
16:03 (1 小时前)

发送至 ooo-dev 
Thanks for everyone.
I will use "Description" for Alt text because Alt text allow multiple lines which are supported by "Description" other than "Title". I have tried with "Title", multiple lines will become as one line with return removed after import.
Comment 3 Jianyuan Li 2012-06-11 11:05:32 UTC
Created attachment 78233 [details]
Patch for Excel form alt text import and export

This is a patch for Excel form alt text import and export
Comment 4 Jianyuan Li 2012-06-11 11:10:34 UTC
Created attachment 78234 [details]
File for UT

This is the file for UT. Kinds of form controls are contained. And I set different alt text for them(default, empty, long text).
Comment 5 binguo 2012-06-12 09:01:50 UTC
This bug can repros on AOO3.4.O Rev. 1327774,
and I change the status from Unconfirmed to confirmed.
Comment 6 Andre 2012-06-19 11:17:04 UTC
Taking over for review.
Comment 7 Andre 2012-06-20 08:47:32 UTC
Comment on attachment 78233 [details]
Patch for Excel form alt text import and export

Patch looks good.

I will commit it as soon as my current build is finished and I can do a short test of the fix.
Comment 8 Jianyuan Li 2012-06-20 11:19:17 UTC
Andre, thanks.
Comment 9 Andre 2012-06-20 13:02:12 UTC
Testing this will take more time: when I try to save the document as ODF than Calc crashes.  Patch is not yet applied.  This happens on a freshly built office, without any changes.
Comment 10 Andre 2012-06-21 12:43:49 UTC
Fixed the crash (bug 120055).
Reviewed and checked in the patch in SVN revision 1352497.  However, I mixed up two patches (this and bug 119537) and mentioned the wrong bug id in the commit message.
Comment 11 binguo 2012-09-07 08:52:53 UTC
Verified on latest AOO trunk build 20120906, Alternative text for form control can import and export correctly in AOO. and if Set the Title info of form control in AOO, save and re-open in AOO, Title content is lost. that is acceptable(please refer to the comment above), so this bug is fixed, close it. thank you.