Bug 111960 - 3D pie chart is not read from flat ODF spreadsheet (fods)
Summary: 3D pie chart is not read from flat ODF spreadsheet (fods)
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Chart (show other bugs)
Version:
(earliest affected)
4.4.0.3 release
Hardware: x86 (IA32) All
: medium normal
Assignee: Markus Mohrhard
URL:
Whiteboard: target:6.1.0 target:6.0.0.1
Keywords: bibisected, bisected, regression
Depends on:
Blocks: ODF-Flat
  Show dependency treegraph
 
Reported: 2017-08-22 09:04 UTC by Regina Henschel
Modified: 2022-04-30 22:25 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
3D pie chart (12.81 KB, application/vnd.oasis.opendocument.spreadsheet)
2017-08-22 09:04 UTC, Regina Henschel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Regina Henschel 2017-08-22 09:04:29 UTC
Created attachment 135720 [details]
3D pie chart

Open attached document. It contains a 3D pie chart.
Save the document as fods and close it.
Open the fods file.
Notice, the chart is empty.

It is OK in Version: 4.4.0.0.alpha0+
Build ID: aa453de65b8b44f9c1e6012caaeef11df9ff65fc
TinderBox: Win-x86@39, Branch:master, Time: 2014-05-24_13:45:34

It fails in Version: 4.4.0.0.alpha0+
Build ID: 86a3fe47a66950e26d23d7d7f2680fa7d4fb0839
TinderBox: Win-x86@39, Branch:master, Time: 2014-10-05_02:45:20

It is an read error, because the older version shows the chart in the fods document.
Comment 1 raal 2017-08-29 16:57:24 UTC
This seems to have begun at the below commit.
Adding Cc: to Kohei Yoshida; Could you possibly take a look at this one?
Thanks
 7cbbb62c3dfb773516c8bf201d6ec7614005c4e5 is the first bad commit
commit 7cbbb62c3dfb773516c8bf201d6ec7614005c4e5
Author: Matthew Francis <mjay.francis@gmail.com>
Date:   Sat Mar 14 21:18:36 2015 +0800

    source-hash-c5539bb585370f095cb6c09e38a7dd005d237295
    
    commit c5539bb585370f095cb6c09e38a7dd005d237295
    Author:     Kohei Yoshida <kohei.yoshida@collabora.com>
    AuthorDate: Mon Jun 9 14:32:53 2014 -0400
    Commit:     Kohei Yoshida <kohei.yoshida@collabora.com>
    CommitDate: Tue Jun 10 10:02:25 2014 -0400
    
        fdo#79676: Initialize with a default chart only from the UI.
    
        When creating an embedded chart object during import, we don't want to
        create a default chart which would only mess up the chart data.
    
        With this change, ChartModel::initNew() is a no-op.
    
        Change-Id: Id29659c3885ec1e06bed26d2c851123fb63072cc
Comment 2 Xisco Faulí 2017-09-05 22:22:59 UTC
@Dennis, I thought you might be interested in this one...
Comment 3 Markus Mohrhard 2017-12-17 23:52:28 UTC
The problem is unrelated to the chart type and affects all charts in flat odf files if the content is imported after the chart.

We are caching the data in the chart data provider in calc which already fills the cache after the chart has been imported but possibly before the calc cell content has been imported. I actually believe that there are possible combinations where this would result in problems in some normal ODS files as well. My implementation just clears the cache at the end of the import and therefore forces the chart data provider to read the data from calc document again.
Comment 4 Commit Notification 2017-12-18 08:09:00 UTC
Markus Mohrhard committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=f9d8fe959d88011d63fc047a8cc00ded1dd2fda1

clear the data provider cache after import, tdf#111960

It will be available in 6.1.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 5 Commit Notification 2017-12-18 18:15:01 UTC
Markus Mohrhard committed a patch related to this issue.
It has been pushed to "libreoffice-6-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=43b5d6b4a5cdafd63866046b1949431d75d7192c&h=libreoffice-6-0

clear the data provider cache after import, tdf#111960

It will be available in 6.0.0.1.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.