Bug 97083 - FILEOPEN: Support of fld text field from Powerpoint as used by think-cell
Summary: FILEOPEN: Support of fld text field from Powerpoint as used by think-cell
Status: RESOLVED DUPLICATE of bug 126324
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: x86 (IA32) All
: high normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: filter:pptx
Depends on:
Blocks: OOXML-Chart
  Show dependency treegraph
 
Reported: 2016-01-12 19:45 UTC by brent.soffey
Modified: 2021-01-13 14:32 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
Think-Cell charts displayed in PPTX vs in LibreOffice preview (334.91 KB, image/png)
2016-01-12 19:45 UTC, brent.soffey
Details
Presentation for testing (85.18 KB, application/vnd.openxmlformats-officedocument.presentationml.presentation)
2016-01-13 17:43 UTC, brent.soffey
Details
TestPresentation.PPTX screenshot in PowerPoint (63.62 KB, image/png)
2016-01-13 17:44 UTC, brent.soffey
Details
TestPresentation.PPTX screenshot in LibreOffice (broken) (86.12 KB, image/png)
2016-01-13 17:44 UTC, brent.soffey
Details
Think-Cell plugin for PowerPoint (70.63 KB, image/png)
2016-01-14 16:48 UTC, brent.soffey
Details
pptx example file with think-cell chart and PowerPoint footer using <fld> field (113.19 KB, application/vnd.openxmlformats-officedocument.presentationml.presentation)
2016-01-15 13:40 UTC, support
Details
New pptx example file with think-cell chart demonstrating <fld> fields for short and long labels (44.98 KB, application/vnd.openxmlformats-officedocument.presentationml.presentation)
2016-05-27 12:33 UTC, support
Details
attachment #125328 in PP 2013 and LO 7.2 (113.24 KB, image/png)
2021-01-13 14:32 UTC, NISZ LibreOffice Team
Details

Note You need to log in before you can comment on or make changes to this bug.
Description brent.soffey 2016-01-12 19:45:30 UTC
Created attachment 121886 [details]
Think-Cell charts displayed in PPTX vs in LibreOffice preview

Charts created using Think-cell (www.think-cell.com) and embedded in a PPTX are display improperly. In past versions of your software, the axes are labeled incorrectly, and in the current version of your software, the chart is mislabeled and displayed incorrectly altogether. Please see attached images.

This is affecting all customers using Jive for their collaboration platform.
Comment 1 raal 2016-01-13 12:16:48 UTC
Hello Brent,

Thank you for filing the bug. Please send us a sample document, as this makes it easier for us to verify the bug. 
I have set the bug's status to 'NEEDINFO', so please do change it back to 'UNCONFIRMED' once you have attached a document.
(Please note that the attachment will be public, remove any sensitive information before attaching it.)
How can I eliminate confidential data from a sample document?
https://wiki.documentfoundation.org/QA/FAQ#How_can_I_eliminate_confidential_data_from_a_sample_document.3F
Thank you
Comment 2 brent.soffey 2016-01-13 17:43:09 UTC
Created attachment 121901 [details]
Presentation for testing

This is a PPTX that has been created with a Think-Cell chart built into it. Within PowerPoint, it displays correctly, but when uploaded to LibreOffice, it previews incorrectly.
Comment 3 brent.soffey 2016-01-13 17:44:01 UTC
Created attachment 121902 [details]
TestPresentation.PPTX screenshot in PowerPoint

This is a screenshot of the test PPTX displayed correctly within PowerPoint
Comment 4 brent.soffey 2016-01-13 17:44:48 UTC
Created attachment 121903 [details]
TestPresentation.PPTX screenshot in LibreOffice (broken)

This is a screenshot of the Test PPTX previewed in LibreOffice with incorrect labels.
Comment 5 brent.soffey 2016-01-13 17:46:30 UTC
I have uploaded the requested test slide deck for duplication, as well as screenshots of my desktop as it appears in both PowerPoint and in LibreOffice.

As you can see, within PowerPoint, the labels are correct. Once previewed in LO, some labels change to dates.
Comment 6 raal 2016-01-14 12:04:51 UTC
I can confirm with LO 5.2, win7 and powerpoint2010.
It's some kind of "old" type of chart, because when I double click on chart in powerpoint2010, it says something like "do you want to convert chart into new format?"  After this conversion I can see "Chart properties". But after resave in powerpoint2010 is x and y axis still the same in LO.

Brent, is it problem only in Jive software or do you observe this also in charts created from scratch in powerpoint?
Comment 7 raal 2016-01-14 12:29:41 UTC
These labels are not part of chart, just text boxes placed on the slide..
Comment 8 brent.soffey 2016-01-14 16:47:03 UTC
(In reply to raal from comment #7)
> These labels are not part of chart, just text boxes placed on the slide..

Please be advised that the end user is using Think-Cell to create these charts. If you do not have Think-Cell installed on your test machine, this is the reason that you are prompted to convert to a current chart type.

https://www.think-cell.com/en/  (I was able to secure a trial version by filling out a form)

When testing on my machine, these are the steps I followed:

1. Download/Install Think-Cell
2. Open PowerPoint
3. Go to the "Insert" tab and select a "Stacked Chart" from the Think-Cell "Elements" menu (see newly attached screenshot for reference).
4. Double-click chart to edit labels/values to whatever you want.
5. Save PPTX presentation.
6. Upload file in LibreOffice.

Once the PPTX is available for preview in LO, the issue is observable as the labels are incorrect.

Charts created *without* Think-Cell display correctly. This issue persists only with charts created via the steps outlined above. However, our end users employ Think-Cell as their standard method for creating charts in PowerPoint.
Comment 9 brent.soffey 2016-01-14 16:48:45 UTC
Created attachment 121945 [details]
Think-Cell plugin for PowerPoint

This image is referenced in Comment 8 (https://bugs.documentfoundation.org/show_bug.cgi?id=97083#c8) and displays the Think-Cell plugin working in PowerPoint after Think-Cell is installed.
Comment 10 support 2016-01-15 13:40:33 UTC
Created attachment 121954 [details]
pptx example file with think-cell chart and PowerPoint footer using <fld> field
Comment 11 support 2016-01-15 13:43:57 UTC
Hi,

This is Mario Vukelic from think-cell support. Thanks to Brent for bringing this up.
We are very interested in LibreOffice displaying think-cell charts correctly, so please let us know if we can help. We have made a note in our tracker as #11739.
As Brent noted in comment #8, a fully functional think-cell trial version is available at https://www.think-cell.com/trial or email us at support(at)think-cell(dot)com.


A few fundamentals before I explain the issue:

* think-cell is a COM add-in for PowerPoint and Excel

* think-cell creates all its charts from native PowerPoint shapes and objects, using the PowerPoint COM API. This means that PowerPoint users who do not have think-cell installed can not only view but also edit the charts with plain PowerPoint. The think-cell elements then appear as regular PowerPoint shapes such as textboxes, PowerPoint shapes like rectangles or lines, and Microsoft Graph objects.

* As far as LibreOffice is compatible with PowerPoint files, a chart created with think-cell should therefore display the same in LibreOffice as a chart created manually in PowerPoint by using the same objects via the UI. 

* The body of most think-cell charts (all except think-cell's Mekko and Gantt chart types) is created with a Microsoft Graph object. To insert such a Graph object with plain PowerPoint 2007 and later, click PowerPoint > Insert > Text > Object > Microsoft Graph Chart. Graph was Office's standard chart engine up to Office 2003 and is still included in current Office versions, incl. 2016. When you doubleclick such a Graph object in plain PowerPoint 2007 and later, it asks the "Do you want to convert this chart?" question, noted by raal in comment #6. This is explained in think-cell KB0084 at https://www.think-cell.com/en/support/kb/0084.shtml.
(The current think-cell v7 still uses Graph because it is the only editable Office chart object that works in all PowerPoint versions, Office 2003 and earlier as well as Office 2007 and later.)

* think-cell creates labels inside the Graph object where possible. In the examples posted in this bug report these are the labels that show the correct content in LibreOffice (though slightly off position).

* Using VBA, you can check if an object was created by think-cell as explained in think-cell KB0073, https://www.think-cell.com/en/support/kb/0073.shtml


*** The issue observed by Brent ***

Labels that think-cell cannot create inside Graph (typically due to limitations in Graph) are created as standalone PowerPoint textboxes containing OOXML <fld> fields. Plain PowerPoint itself uses <fld> fields, e.g., for auto-updating dates in the slide footer. To create an <fld> field with PowerPoint:

1. Go to tab Insert, then click Text > Header & Footer.
2. In the Header & Footer dialog window, check "Date and time", choose "Update automatically". To make the issue easy to spot, choose a format using day and month names (not numbers).
3. Confirm with "Apply to All".
4. A footer with the date in the chosen format will appear on the slides.

I have attached an example file, created with PowerPoint 2013 (15.0.4787.1000) and think-cell 7 (curent build 24146): "LibreOffice #97083 - think-cell example.pptx". It contains:
1. A chart created by think-cell, plus a screenshot of how it looks in PowerPoint (even if think-cell is not installed). 
2. An <fld> date field as created by PowerPoint for its footer, plus a screenshot of how it looks in PowerPoint.

In the example file, the date format chosen for the field in PowerPoint uses day and month names.

It appears that the tested LibreOffice Version 5.0.4.2 (Build ID: 2b9802c1994aa0b7dc6079e128979269cf95bc78), does not correctly display <fld> fields, as all fields - including the one created by plain PowerPoint - show the date in numbers, instead of the text that should replace it. 

<fld> fields are described in section 21.1.2.2.4 of the Office Open XML File Formats specification, Part 1, 4th edition (at ECMA-376 at http://www.ecma-international.org/publications/standards/Ecma-376.htm), quote:

21.1.2.2.4 fld (Text Field)
----------------------------------------------------------------
This element specifies a text field which contains generated text that the application should update periodically. Each piece of text when it is generated is given a unique identification number that is used to refer to a specific
field. At the time of creation the text field indicates the kind of text that should be used to update this field. This update type is used so that all applications that did not create this text field can still know what kind of text it should be updated with. Thus the new application can then attach an update type to the text field id for continual updating.
 
[Example: Consider a slide within a presentation that needs to have the slide number placed on the slide. The following DrawingML can be used to describe such a situation.
 
<p:txBody>
            <a:bodyPr/>
                        <a:lstStyle/>
                        <a:p>
                                   <a:fld id="{424CEEAC-8F67-4238-9622-1B74DC6E8318}" type="slidenum">
                                   <a:rPr lang="en-US" smtClean="0"/>
                                   <a:pPr/>
                                   <a:t>3</a:t>
                        </a:fld>
                        <a:endParaRPr lang="en-US"/>
            </a:p>
</p:txBody>
 
end example]

Attributes:

id (Field ID):
Specifies the unique to this document, host specified token that is used to identify the field. This token is generated when the text field is created and persists in the file as the same token until the text field is removed. Any application should check the document for conflicting tokens before assigning a new token to a text field. The possible values for this attribute are defined by the ST_Guid simple type (§22.9.2.4).

type (Field Type):
Specifies the type of text that should be used to update this text field. This is used to inform the rendering application what text it should use to update this text field. There are no specific syntax restrictions placed on this attribute. The generating application can use it to represent any text that should be updated before rendering the presentation.

Reserved Values: [are given in the OOXML spec, please see there]


------------[ End of quote from 21.1.2.2.4 fld (Text Field)]--------------------
Comment 12 raal 2016-01-21 18:55:21 UTC
(In reply to support from comment #11)
To create an <fld> field
> with PowerPoint:
> 
> 1. Go to tab Insert, then click Text > Header & Footer.
> 2. In the Header & Footer dialog window, check "Date and time", choose
> "Update automatically". To make the issue easy to spot, choose a format
> using day and month names (not numbers).
> 3. Confirm with "Apply to All".
> 4. A footer with the date in the chosen format will appear on the slides.
> 
> I have attached an example file, created with PowerPoint 2013
> (15.0.4787.1000) and think-cell 7 (curent build 24146): "LibreOffice #97083
> - think-cell example.pptx". It contains:
> 1. A chart created by think-cell, plus a screenshot of how it looks in
> PowerPoint (even if think-cell is not installed). 
> 2. An <fld> date field as created by PowerPoint for its footer, plus a
> screenshot of how it looks in PowerPoint.
> 
> In the example file, the date format chosen for the field in PowerPoint uses
> day and month names.
> 
> It appears that the tested LibreOffice Version 5.0.4.2 (Build ID:
> 2b9802c1994aa0b7dc6079e128979269cf95bc78), does not correctly display <fld>
> fields, as all fields - including the one created by plain PowerPoint - show
> the date in numbers, instead of the text that should replace it. 

I can confirm on win7 , 5.2alpha
Comment 13 brent.soffey 2016-02-11 00:27:18 UTC
Hello,

Please update status on this case. Is there any kind of timeline to resolution available? This is currently affecting all Jive customers and I am providing periodic updates to mine.

Thank you.
Comment 14 raal 2016-02-11 06:31:10 UTC
(In reply to brent.soffey from comment #13)
Hello,

> Hello,
> 
> Please update status on this case. 

Status is NEW, it means confirmed. There is nothing more to do.

> Is there any kind of timeline to
> resolution available? 

No, we need to wait to some developer to fix it. You can boost it with hiring some devs: https://www.libreoffice.org/get-help/professional-support/

>This is currently affecting all Jive customers and I
> am providing periodic updates to mine.
> 
> Thank you.
Comment 15 Katarina Behrens (Inactive) 2016-02-17 09:14:18 UTC
Brent || Mario: it'd be helpful if you could download and test one of the daily builds and see if the issue with text field(s) persist.

One of my mentees significantly improved text field support in pptx format. We didn't target this specific bug, but it might be resolved now as a nice side-effect of her work. Or not, but then we will know there's a room for improvement

@raal: Is it just me or are there indeed multiple issues in this single ticket? Maybe we'd then better open separate tickets for every issue ... but I'm not a QA
Comment 16 raal 2016-02-17 10:17:22 UTC
(In reply to Katarina Behrens (CIB) from comment #15)
> Brent || Mario: it'd be helpful if you could download and test one of the
> daily builds and see if the issue with text field(s) persist.
> 
> One of my mentees significantly improved text field support in pptx format.
> We didn't target this specific bug, but it might be resolved now as a nice
> side-effect of her work. Or not, but then we will know there's a room for
> improvement
> 
> @raal: Is it just me or are there indeed multiple issues in this single
> ticket? Maybe we'd then better open separate tickets for every issue ... but
> I'm not a QA

I think root cause is missing support of fld text field.

Mario, dev version you can download here: http://dev-builds.libreoffice.org/daily/master/
Comment 17 support 2016-02-19 14:28:53 UTC
Hi, using the test pptx I attached earlier the result is still the same with master~2016-02-19_01.57.40_LibreOfficeDev_5.2.0.0.alpha0_Win_x86.msi.
Comment 18 support 2016-05-27 12:31:41 UTC
Verified that problem is still present in master~2016-05-20_05.45.40_LibreOfficeDev_5.2.0.0.alpha1_Win_x86.msi

I wanted to clarify a detail in addition to my previous comment #11 and the example file attached there, which will help to understand the behavior of LibreOffice. I am also attaching a new example file to demonstrate, 
"LibreOffice #97083 - think-cell example (2).pptx".

As explained in comment #11, think-cell uses <fld> text fields for some labels. Namely for labels which think-cell must be able to update when the chart's datasheet (which is a separate Excel process) changes. (If a label contains static text, e.g., after a user types into the label directly in PowerPoint, think-cell uses simple PowerPoint text, and then the problem described in this bug report does not occur).

However there is a little twist regarding the <fld> field which was not mentioned in comment #11:

In the old binary ppt file format, full-featured text fields do not exist. Instead, ppt files have RTFDateTimeMCAtom fields as described in https://msdn.microsoft.com/en-us/library/dd925029%28v=office.12%29.aspx?f=255&MSPPError=-2147217396
For RTFDateTimeMCAtom the field type is limited to datetime. Hence, to use RTFDateTimeMCAtom in ppt files for think-cell's purpose, the label text has to be shoehorned into RTFDateTimeMCAtom format.
RTFDateTimeMCAtom is also limited to 64 characters, which leaves 57 characters available for label text after subtracting control characters needed by think-cell.

Current PowerPoint versions can of course still save files in ppt format. think-cell maintains compatibility in this instance as far as possible. Therefore, think-cell continues to use the approach that is compatible with RTFDateTimeMCAtom if label text is shorter than 58 characters.

Hence, in the pptx file format two different kinds of <fld> fields may occur for think-cell labels:
(1) If label text is shorter than 58 characters: <fld> type is datetime with some encoding appended. (I.e., the approach compatible with RTFDateTimeMCAtom). 
(2) If label text is 58 characters or longer: think-cell uses the capabilities provided by the Office Open XML ECMA spec as quoted in comment #11, and defines its own type. 

In either case however, the label text to display is available within the <a:t></a:t> tags within the <fld>. LibreOffice displays this text just fine in case (2), but currently does not in case (1).

As LibreOffice does not need to care about actually updating these fields and - I suppose - does not care about ppt format, all it would have to do in pptx files is to recognize case (1) and display the <a:t></a:t> text just like it does in case (2).
Comment 19 support 2016-05-27 12:33:42 UTC
Created attachment 125328 [details]
New pptx example file with think-cell chart demonstrating <fld> fields for short and long labels

See comment #18
Comment 20 eisa01 2018-03-18 15:36:48 UTC
This is still present using the handy test case in comment #19

The short label fields are not displayed correctly as described in comment #18

This problem was also present in OOo

Raising the importance from the default as this can make LO unusable in many business settings where think-cell is often used

Version: 6.1.0.0.alpha0+
Build ID: 8e8dd8f320a3ff59ff8a16c1a7a867888ce80700
CPU threads: 2; OS: Mac OS X 10.12.6; UI render: default; 
TinderBox: MacOSX-x86_64@49-TDF, Branch:master, Time: 2018-03-13_23:59:29
Locale: en-US (en_US.UTF-8); Calc: group
Comment 21 QA Administrators 2019-03-19 03:49:47 UTC Comment hidden (obsolete)
Comment 22 eisa01 2019-04-20 17:38:19 UTC
This is still present

I don't see any relation to bug 59323 so removing that

Version: 6.3.0.0.alpha0+
Build ID: ea9c13be02ba731074fa4207944ff7df40a0fb5c
CPU threads: 2; OS: Mac OS X 10.13.6; UI render: default; VCL: osx; 
TinderBox: MacOSX-x86_64@49-TDF, Branch:master, Time: 2019-04-10_20:43:17
Locale: en-US (en_US.UTF-8); UI-Language: en-US
Calc: threaded
Comment 23 NISZ LibreOffice Team 2021-01-13 14:32:26 UTC
Created attachment 168856 [details]
attachment #125328 [details] in PP 2013 and LO 7.2

This seems to have been fixed since 6.4 with:

https://cgit.freedesktop.org/libreoffice/core/commit/?id=df9672b1fada6fc847bfa4c8a8f016fb2af6a7b5

author	Tamas Bunth <tamas.bunth@collabora.co.uk>	2019-10-25 17:45:01 +0200
committer	Tamás Bunth <btomi96@gmail.com>	2019-10-25 20:22:35 +0200

tdf#126324 Import custom date as custom XTextField
Comment 24 NISZ LibreOffice Team 2021-01-13 14:32:54 UTC

*** This bug has been marked as a duplicate of bug 126324 ***