Bug 64145 - 'sub-title' appears when copying chart from Calc and pasting to Writer
Summary: 'sub-title' appears when copying chart from Calc and pasting to Writer
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
3.3.0 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:5.3.0
Keywords:
Depends on:
Blocks: Chart
  Show dependency treegraph
 
Reported: 2013-05-02 11:40 UTC by Dean Laslett
Modified: 2017-05-25 06:41 UTC (History)
9 users (show)

See Also:
Crash report or crash signature:


Attachments
attachment-23102-0.html (6.46 KB, text/html)
2013-05-06 05:34 UTC, Dean Laslett
Details
attachment-23102-1.dat (1 bytes, multipart/alternative)
2013-05-06 05:34 UTC, Dean Laslett
Details
chart.draw.scaling.bug.odt (23.65 KB, application/vnd.oasis.opendocument.text)
2013-05-06 05:34 UTC, Dean Laslett
Details
chart.draw.scaling.bug.xls (14.00 KB, application/vnd.ms-excel)
2013-05-06 05:34 UTC, Dean Laslett
Details
spread-sheet file with chart (no title or subtitle) (25.72 KB, application/vnd.oasis.opendocument.spreadsheet)
2013-06-07 05:32 UTC, Dean Laslett
Details
chart copied and pasted to this file ('sub-title' appears) (24.17 KB, application/vnd.oasis.opendocument.text)
2013-06-07 05:34 UTC, Dean Laslett
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dean Laslett 2013-05-02 11:40:40 UTC
The words 'sub-title' appear on chart when copying from Calc and pasting to Writer. The chart has no sub-title.

Also, text drawn onto the chart appears to scale incorrectly in some cases
when copying and pasting from Calc to Writer
Comment 1 Jorendc 2013-05-02 14:08:36 UTC
Thanks for reporting!

I can not reproduce this issue using a regular bar chart, which I then copy to writer.

Is it possible to attach a sample document which you can reproduce this behavior?

Thanks in advance,
Joren
Comment 2 Dean Laslett 2013-05-06 05:34:39 UTC
Created attachment 78900 [details]
attachment-23102-0.html

Hi Joren,

here are two files that show the bugs.
when copying and pasting the chart from the .xls file to the .odt file, 'sub-title' appears and
the scaling of the drawn text box (kdr=1.5) seems to have been changed.

(note that when I drew a second chart and copy-and-pasted it, 'sub-title' didn't appear)


ps. its better to email me on: gaiaquark at gmail dot com
I don't look at deanlaslett@yahoo.com so often
(only used it because bugzilla recommended not using my main email)

cheers,
Dean



________________________________
 From: "bugzilla-daemon@freedesktop.org" <bugzilla-daemon@freedesktop.org>
To: deanlaslett@yahoo.com 
Sent: Thursday, May 2, 2013 10:08 PM
Subject: [Bug 64145] 'sub-title' appears when copying chart from Calc and pasting to Writer
 


 
Jorendc  changed bug 64145 

What
Removed
Added
Status UNCONFIRMED  NEEDINFO  
CC    joren.libreoffice@telenet.be  
Ever confirmed    1  
Comment # 1 on bug 64145 from Jorendc  
Thanks for reporting! I can not reproduce this issue using a regular bar chart, which I then copy to
writer. Is it possible to attach a sample document which you can reproduce this
behavior? Thanks in advance,
Joren
________________________________
 You are receiving this mail because: 
	* You reported the bug.
Comment 3 Dean Laslett 2013-05-06 05:34:40 UTC
Created attachment 78901 [details]
attachment-23102-1.dat
Comment 4 Dean Laslett 2013-05-06 05:34:40 UTC
Created attachment 78902 [details]
chart.draw.scaling.bug.odt
Comment 5 Dean Laslett 2013-05-06 05:34:40 UTC
Created attachment 78903 [details]
chart.draw.scaling.bug.xls
Comment 6 Jorendc 2013-05-06 13:27:47 UTC
Hi Dean,

Please answer in the bug report itself, not by replying the email you receive :-). You can add a comment by browsing to this bug (https://bugs.freedesktop.org/show_bug.cgi?id=64145). Thanks.

Thanks for your extra information. When I copy the chart from calc to writer, I can't reproduce this behavior (no sub-title appears). But this may be a windows-only bug.

Tested using Linux Mint 14 x64 with Version 4.0.3.2 (Build ID: c6786add5a58268e11aa027c47054344040db1b).

@Florian: you mind testing this on Windows :-)?
 
> ps. its better to email me on: gaiaquark at gmail dot com
> I don't look at deanlaslett@yahoo.com so often
> (only used it because bugzilla recommended not using my main email)

Messages are automatically send to your subscribed email address. In the bug report (by browsing to it) you can add your email address to CC, or just change your general email address of Bugzilla to the new one :-).

Kind regards,
Joren
Comment 7 Florian Reisinger 2013-05-07 13:47:45 UTC
First one thing: Do not try to copy from Excel 2010 to LibO....
WFM with Version 4.0.3.1 (Build ID: a67943cd4d125208f4ea7fa29439551825cfb39) Win 7 x64
Comment 8 Dean Laslett 2013-05-09 11:07:14 UTC
Hi Florian,


I did not use Microsoft Excel at any time,

all files were created by Libre-Office
4.0.2.2 (Build ID: 4c82dcdd6efcd48b1d8bba66bfe1989deee49c3)

running on windows 7 64 bit

Dean
Comment 9 Florian Reisinger 2013-05-09 15:34:06 UTC
Hi Dean,

As I stated out this works, when opened in a newer version (4.0.3). Could you please verify that.

Florian

(If working leave status, else Unconfirmed)
Comment 10 Dean Laslett 2013-05-15 04:28:20 UTC
Hi Florian,

I tried it again with LibO 4.0.3.3 on windows7x64

and no sub-title appears, also the scaling of the text object
seems to be ok,

Thanks alot!

Dean
Comment 11 Jorendc 2013-05-15 12:42:38 UTC
(In reply to comment #10)
> I tried it again with LibO 4.0.3.3 on windows7x64
> 
> and no sub-title appears, also the scaling of the text object
> seems to be ok,

Thanks! So lets mark it as VERIFIED WORKSFORME then.
Comment 12 Dean Laslett 2013-06-07 05:32:10 UTC
Created attachment 80450 [details]
spread-sheet file with chart (no title or subtitle)
Comment 13 Dean Laslett 2013-06-07 05:34:38 UTC
Created attachment 80451 [details]
chart copied and pasted to this file ('sub-title' appears)
Comment 14 Dean Laslett 2013-06-07 05:37:16 UTC
Dammit!

This bug has appeared again, in LibO4.03.3

It probably also hasthe same behaviour if the spreadsheet file is .xls

2 files attached


Dean
Comment 15 Lorenzo 2013-06-19 23:04:20 UTC
Hello,

  For me it is the same. I am using Ubuntu 12.04 and with previous version 3.4.x.x (I didn't take note) and with 4.0.3.3 of LibO it does the same. I have the same issues as some others users, meaning that starting with a chart without sub-tile and:

- copying it to the same sheet, the new copy has a new sub-title that says "sub-title".
- saving it and then reopening (not straight away, but after "some time") it adds a 'sub-title' either
    - in a new sub-title box
    - in an existing box (I even had one saying two times "sub-title")
- Copying it to Impress (same as first case). 

  Concerning the java version, performing a 'java -version' command, I get:

java version "1.7.0_25"
Java(TM) SE Runtime Environment (build 1.7.0_25-b15)
Java HotSpot(TM) 64-Bit Server VM (build 23.25-b01, mixed mode)

I think that in order to reproduce the problem, it has not to do with the file itself (mine is a .xls), but more with the environment. 

  Please let me know if you need any other information. 

  In the meantime, is there any 'batch' way of replacing the 'sub-title- text with a blank one?

   Thanks!

    Best, 
          Lorenzo
Comment 16 higuita 2013-11-06 15:36:08 UTC
I can confirm that the sub-title problem is related to xls files. Saving a file as ods i do not have this problem. Saving the same ods as xls, the sub-title start to appears in all graphs when we interact with then. i'm using 4.1.2 on ubuntu 64bit 13.10.

So looks like the internal conversion from xls is messing up this.
Comment 17 raal 2014-06-01 16:49:13 UTC
I can confirm on win7, LO 4.2.3, 32bit
Ubuntu 14.04, 32bit, LO Version: 4.3.0.0.beta1
Build ID: 2e39c7e59c8fc8b16a54c3d981dceef27fb0c07f
Steps to reproduce:
Open new calc file
Create chart (no title nor subtitle)
Save as .xlsx
Copy chart to writer (ctrl+c, ctrl+v)
Chart correctly copied, but unwanted string „sub-title“
Comment 18 Joel Madero 2014-11-05 23:59:12 UTC
Version is oldest version not newest confirmed on. Also not confirmed by QA team so moving to UNCONFIRMED to get QA to confirm.
Comment 19 raal 2014-11-06 10:25:14 UTC
Hello Dean,
cannot reproduce with LO 4.3.2, win7 (open .xls, copy paste chart into writer). Please retest with actual 4.3.x version. 
Setting as worksforme, set to Unconfirmed again if bug still exists in 4.3.x .Thank you.
Comment 20 Andrew 2015-12-29 04:47:07 UTC
I'm running into this issue with:

Windows 10, x86 LO
Version: 5.0.3.2
Build ID: e5f16313668ac592c1bfb310f4390624e3dbfb75
Locale: en-US (en_US)

See comment 17 for steps to reproduce. The important step is to save the file with the chart as an .xlsx file.  Before this "Save as", the copy from Calc to Writer works fine.  The problem appears to occur only when copying from an XLSX spreadsheet.

The chart I used to reproduce this is based on one cell of data, using the default settings for everything in the Chart Wizard (the simplest of charts.)

I'm not sure whether this is a regression or if this was just never fixed.
Comment 21 raal 2015-12-29 16:11:44 UTC
Reproducible with Version: 5.2.0.0.alpha0+
Build ID: 4c4f096a81e1643646f72cab17fb94610a346961
CPU Threads: 4; OS Version: Linux 4.2; UI Render: default; 
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2015-12-28_11:02:13

Steps from comment 17

Works OK in Version: 4.4.0.0.alpha2+
Build ID: 3f94c9e9ddfd807b449f3bb9b232cf2041fa12d2, regression
Comment 22 raal 2015-12-30 12:38:44 UTC
bibisect-win32-5.0, oldest version contains bug too.
git checkout oldest: Version: 4.5.0.0.alpha0+
Comment 23 testjava 2016-01-16 19:12:29 UTC
Bug reproducible:
The Calc is saved as XLSX aand then the Chart is copied in Libreoffice Writer. The "sub-title" appears.

Version: 5.0.3.2
Build ID: e5f16313668ac592c1bfb310f4390624e3dbfb75
Locale: it-IT (de_DE)

Windows XP 32 bit
Comment 24 Alex 2016-02-27 12:05:25 UTC
I have experienced this bug repeatedly on Ubuntu 15.10 and LO Portable (Windows 7).

It does not do it when copying (an x,y scatter w/ y-axis error bars) from .ods to .odt, just .xls to .odt. If I re-save the chart file as an .ods then copy to writer then the subtitle does not appear. It does not seem to matter if the writer document is .odt or .docx.
Comment 25 raal 2016-02-27 12:09:14 UTC
Version:
(earliest affected)
Comment 26 Laurent BP 2016-07-20 15:41:21 UTC
No need to paste in Writer. Paste in Calc has same bug.

Steps to reproduce:
1. Create new calc file
2. Create chart (no title nor subtitle)
3. Save as .xlsx
4. Copy (Ctrl+C), paste in same file (Ctrl+V)

Actual behavior:
A sub-title is inserted

Bug is not present if file is reloaded after step 3.
Other procedure, without Copy/paste
1. Create new calc file
2. Create chart (no title nor subtitle)
3. Save as .xlsx
4. Save as .ods
5. File > Reload

Note: string is "sub-title" even in my French UI. This string may come from here: WrappedHasSubTitleProperty::setPropertyValue
http://opengrok.libreoffice.org/xref/core/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx#663


Reproduce with:
- Version: 4.1.6.2
Build ID: 40ff705089295be5be0aae9b15123f687c05b0a
- Version: 5.1.4.2 (x64)
Build ID: f99d75f39f1c57ebdd7ffc5f42867c12031db97a
Threads CPU : 4; Version de l'OS :Windows 6.1; UI Render : par défaut; 
Locale : fr-FR (fr_FR)
- Version: 5.3.0.0.alpha0+
Build ID: fc305bb6d656736bedc2f89789e18d8c9a3bbf2c
CPU Threads: 4; OS Version: Windows 6.1; UI Render: default; 
TinderBox: Win-x86@42, Branch:master, Time: 2016-07-14_23:42:51
Locale: fr-FR (fr_FR); Calc: CL
Comment 27 Laurent BP 2016-07-23 21:32:02 UTC
Reproduce with:
- Version 4.0.6.2
- Version 3.6.7.1 (need to open chart to see subtitle)
- Version 3.5.7.2 (idem)
- Version 3.4.6 (save as XLS)
- Version 3.3.4
- Version 3.3.0.4

NOT reproduce with:
- OOo 3.3.0m20
- AOO 4.1.2m3

Change version accordingly
Comment 28 Laurent BP 2016-08-05 10:07:39 UTC
For what I can understand:
Excel do not have subtitle field, but only a title field. When saving to Excel format, the trick is to add the subtitle to the title with a '\n'. See http://opengrok.libreoffice.org/xref/core/sc/source/filter/excel/xechart.cxx#ConvertTitle
Actually it does not work for XLSX, but only for XLS. See bug 101322

During save to XLSX, the XML representation of the chart is recreated, and a <chart:subtitle ...> is accidentally created empty. If you save to Excel format, then this field will be lost. Unfortunately, if you copy/paste this XML code in Calc or Writer, or if you resaved to ODF format, the field is preserved. A subtitle is detected and a dummy text is added for initialization ("sub-title") and never replaced as chart:subtitle is empty.

So, I see two problems:
- <chart:subtitle ...> should not be created when exporting to XLSX
- subtitle should be removed if <chart:subtitle...> contains no text
Comment 29 Commit Notification 2016-08-30 15:15:20 UTC
Laurent Balland-Poirier committed a patch related to this issue.
It has been pushed to "master":

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

tdf#64145 Add empty subtitle string as default

It will be available in 5.3.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.