ofbiz-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shi Jinghai (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (OFBIZ-9123) Add a PriCat component under specialpurpose
Date Thu, 08 Dec 2016 09:43:59 GMT

    [ https://issues.apache.org/jira/browse/OFBIZ-9123?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15731687#comment-15731687
] 

Shi Jinghai commented on OFBIZ-9123:
------------------------------------

Hi Jacques,

Here's the test case on OFBizPricatUtil:
1. Import the sample pricat file and download it;
2. Comment out the OFBizPricatUtil.formatCommentShape method used in pricat;
3. Rebuild and import the sample pricat file;
4. Download the commented pricat file;
5. Open it in Microsoft Excel, the style of comments is not readable.
6. Open it in OpenOffice or WPS, the style of comments is correct.

Unzip the commented pricat file (.xlsx), compare the files with/without running OFBizPricatUtil.formatCommentShape,
the difference is in xl/drawings/vmlDrawing1.vml file. According to POI document:

In Excel 2007 VML drawings are used to describe properties of cell comments, although the
spec says that VML is deprecated:
The VML format is a legacy format originally introduced with Office 2000 and is included and
fully defined in this Standard for backwards compatibility reasons. The DrawingML format is
a newer and richer format created with the goal of eventually replacing any uses of VML in
the Office Open XML formats. VML should be considered a deprecated format included in Office
Open XML for legacy reasons only and new applications that need a file format for drawings
are strongly encouraged to use preferentially DrawingML

Warning - Excel is known to put invalid XML into these files! For example, >br< without
being closed or escaped crops up.
See 6.4 VML - SpreadsheetML Drawing in Office Open XML Part 4 - Markup Language Reference.pdf


By putting OFBizPricatUtil under POI path, I can call the protected method XSSFVMLDrawing.findCommentShape
and build the comments look right in Microsoft Excel.

This is the reason. I'm sure there's a better way to do this.

Kind Regards,

> Add a PriCat component under specialpurpose
> -------------------------------------------
>
>                 Key: OFBIZ-9123
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-9123
>             Project: OFBiz
>          Issue Type: Improvement
>    Affects Versions: Trunk
>            Reporter: Shi Jinghai
>            Assignee: Shi Jinghai
>            Priority: Trivial
>             Fix For: Trunk
>
>
> Add a PriCat component to view excel import with html report and download excel output
with errors commented.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message