Bug 75659 - FILEOPEN: Imported .docx charts missing legend with default name
Summary: FILEOPEN: Imported .docx charts missing legend with default name
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Chart (show other bugs)
Version:
(earliest affected)
4.2.0.4 release
Hardware: Other All
: medium normal
Assignee: Balázs Varga
URL:
Whiteboard: interoperability target:6.4.0 target:...
Keywords: filter:docx
Depends on:
Blocks: OOXML-Chart Chart-Legends
  Show dependency treegraph
 
Reported: 2014-03-02 02:36 UTC by Joey Reid
Modified: 2019-06-18 12:09 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Simple .docx chart missing label name (11.46 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2014-03-02 02:36 UTC, Joey Reid
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Joey Reid 2014-03-02 02:36:57 UTC
Created attachment 94952 [details]
Simple .docx chart missing label name

Sometimes when I open ms office .docx charts in writer, the legend is showing but missing the name. I have attached an example.
Comment 1 Jorendc 2014-03-05 13:02:35 UTC
reproducible, tested using Mac OSX 10.9 with LibreOffice Version: 4.2.2.1
Build ID: 3be8cda0bddd8e430d8cda1ebfd581265cca5a0f

Kind regards,
Joren
Comment 2 Markus Mohrhard 2015-04-20 19:31:32 UTC
Leaving some comments for me for the future.

The problem is that in MSO there are no unnamed data series however data series with default name have no name exported to OOXML.

One approach might be to set the name during import if none is set in the file but that causes some problems with localization.
The other approach is to provide a  similar mechanism in chart2 that replaces no series name with a correct localized one.

The first one will not cause any problems except for localization whereas the second needs to explore the impact on existing files and how to represent that in the chart2 model.
Comment 3 Luke 2015-04-26 09:57:48 UTC Comment hidden (obsolete)
Comment 4 Markus Mohrhard 2015-05-08 22:41:34 UTC
(In reply to Luke from comment #3)
> Markus,
> I've noticed in my charts that the Calc importer automatically generates a
> name, while the Writer importer leaves them blank. Could we use Calc's
> system in writer?

It is not that easy in that case. Looks like that document references an external file that is not included. So we are using actually not even the writer data provider but the internal one.

I'll see if I can do some ugly hacks in the import to set the data series name in case we fall back to the internal data provider.
Comment 5 Luke 2015-05-11 20:41:46 UTC
Markus,
Not sure I follow you. Compare attachment 115112 [details] with  attachment 115115 [details].

Both files were made with the same exact chart, but the .DOCX version is missing the legend in Writer. Is this the same issue as reported here or should I open a new case?
Comment 6 Joey Reid 2016-05-15 19:42:43 UTC
Label still missing in Version: 5.2.0.0.alpha1+
Build ID: 23ad336bfe61316b08f85e827b98fc593ac6908a
Comment 7 Xisco Faulí 2017-10-03 14:16:08 UTC
Still reproducible in

Version: 6.0.0.0.alpha0+
Build ID: 34e8fd7e99489e9f50a512b07c6f3923b358b4d3
CPU threads: 4; OS: Linux 4.10; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group
Comment 8 QA Administrators 2019-01-06 04:19:57 UTC Comment hidden (obsolete)
Comment 9 Timur 2019-01-07 12:25:51 UTC
Repro 6.3+.
Comment 10 László Németh 2019-06-12 14:55:06 UTC
Description of the fix:

 tdf#75659 Chart: fix empty legend at not available legend names
    
    by using localized versions of "Unnamed Series 1" etc.
    
    Note: OOXML files don't contain the default or fallback legend names
    used by MSO in this case, so the original empty string replacement
    of the missing names resulted bad chart import.
Comment 11 Commit Notification 2019-06-12 14:55:40 UTC
Balazs Varga committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/007bf60611e2ba5a65ffabe80dbb0e279fcb9f26%5E%21

tdf#75659 Chart: fix empty legend at not available legend names

It will be available in 6.4.0.

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

Affected users are encouraged to test the fix and report feedback.
Comment 12 Luke 2019-06-12 22:16:52 UTC
Verified FIXED in Version: 6.4.0.0.alpha0+ (x64)
Build ID: 2b3f6d73496f7d0fb4624e1d14f66e922d05fb31

Thanks Balazs!
Comment 13 Balázs Varga 2019-06-13 09:33:09 UTC
You're welcome!

Thanks for the quick feedback, Luke!
Comment 14 Commit Notification 2019-06-18 12:09:41 UTC
Balazs Varga committed a patch related to this issue.
It has been pushed to "libreoffice-6-3":

https://git.libreoffice.org/core/+/0869c65a7e937d71bd623ed498a3a47cebe0a66d%5E%21

tdf#75659 Chart: fix empty legend at not available legend names

It will be available in 6.3.0.1.

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

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