After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 660242 - copying chart from gnumeric to lowriter does not work
copying chart from gnumeric to lowriter does not work
Status: RESOLVED FIXED
Product: Gnumeric
Classification: Applications
Component: Charting
git master
Other Linux
: Normal normal
: ---
Assigned To: Jean Bréfort
Jody Goldberg
Depends on:
Blocks:
 
 
Reported: 2011-09-27 12:39 UTC by Frédéric Parrenin
Modified: 2011-09-27 21:00 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Frédéric Parrenin 2011-09-27 12:39:15 UTC
My system is ubuntu 11.04 with gnome3
Comment 1 Jean Bréfort 2011-09-27 13:33:51 UTC
lowriter does not recognize our charts format. It should work with abiword.
Comment 2 Frédéric Parrenin 2011-09-27 13:36:38 UTC
It used to work with oowriter and it was very convenient to copy/paste from gnumeric to oowriter.
Comment 3 Jean Bréfort 2011-09-27 13:41:56 UTC
If it worked with oowriter and does not work with liwriter then it is a lo bug.
Comment 4 Andreas J. Guelzow 2011-09-27 17:06:34 UTC
When we are copying a chart we really should _also_ provide some image representation of the chart. 

We can copy/paste charts between different gnumeric processes so we are obviously correctly placing our chart description on to the clipboard.

Currently we don't seem to be able to provide clipboard content (when copying a chart) that can be pasted in lowriter _or_ abiword.
Comment 5 Andreas J. Guelzow 2011-09-27 17:10:26 UTC
I note that when we are copying a chart from one gnumeric process to another with debugging of clipboards enabled, I see:

-----------------------------------------------------------------------------
aguelzow@kirkman:~$ GNM_DEBUG="clipboard" jhbuild run gnumeric
Clipboard target 0 is TIMESTAMP
Clipboard target 1 is TARGETS
Clipboard target 2 is MULTIPLE
Clipboard target 3 is application/x-gnumeric
Received 3951 bytes of table for target application/x-gnumeric
       0 | 3c 3f 78 6d 6c 20 76 65 72 73 69 6f 6e 3d 22 31 | <?xml.version="1
      10 | 2e 30 22 20 65 6e 63 6f 64 69 6e 67 3d 22 55 54 | .0".encoding="UT
      20 | 46 2d 38 22 3f 3e 0a 3c 67 6e 6d 3a 43 6c 69 70 | F-8"?>.<gnm:Clip
      30 | 62 6f 61 72 64 52 61 6e 67 65 20 78 6d 6c 6e 73 | boardRange.xmlns
      40 | 3a 67 6e 6d 3d 22 68 74 74 70 3a 2f 2f 77 77 77 | :gnm="http://www
      50 | 2e 67 6e 75 6d 65 72 69 63 2e 6f 72 67 2f 76 31 | .gnumeric.org/v1
      60 | 30 2e 64 74 64 22 20 78 6d 6c 6e 73 3d 22 68 74 | 0.dtd".xmlns="ht
      70 | 74 70 3a 2f 2f 77 77 77 2e 67 6e 75 6d 65 72 69 | tp://www.gnumeri
      80 | 63 2e 6f 72 67 2f 76 31 30 2e 64 74 64 22 20 43 | c.org/v10.dtd".C
      90 | 6f 6c 73 3d 22 2d 31 22 20 52 6f 77 73 3d 22 2d | ols="-1".Rows="-
      a0 | 31 22 20 42 61 73 65 43 6f 6c 3d 22 30 22 20 42 | 1".BaseCol="0".B
      b0 | 61 73 65 52 6f 77 3d 22 30 22 20 46 6c 6f 61 74 | aseRow="0".Float
      c0 | 52 61 64 69 78 3d 22 32 22 20 46 6c 6f 61 74 44 | Radix="2".FloatD
      d0 | 69 67 69 74 73 3d 22 35 33 22 3e 0a 20 20 3c 67 | igits="53">...<g
      e0 | 6e 6d 3a 4f 62 6a 65 63 74 73 3e 0a 20 20 20 20 | nm:Objects>.....
      f0 | 3c 67 6e 6d 3a 53 68 65 65 74 4f 62 6a 65 63 74 | <gnm:SheetObject
     100 | 47 72 61 70 68 20 4f 62 6a 65 63 74 42 6f 75 6e | Graph.ObjectBoun
     110 | 64 3d 22 41 31 3a 46 31 33 22 20 4f 62 6a 65 63 | d="A1:F13".Objec
     120 | 74 4f 66 66 73 65 74 3d 22 30 2e 37 35 20 30 2e | tOffset="0.75.0.
     130 | 36 34 37 20 30 2e 35 36 32 20 31 22 20 44 69 72 | 647.0.562.1".Dir
     140 | 65 63 74 69 6f 6e 3d 22 31 37 22 20 50 72 69 6e | ection="17".Prin
     150 | 74 3d 22 31 22 3e 0a 20 20 20 20 20 20 3c 47 6f | t="1">.......<Go
     160 | 67 4f 62 6a 65 63 74 20 74 79 70 65 3d 22 47 6f | gObject.type="Go
     170 | 67 47 72 61 70 68 22 3e 0a 20 20 20 20 20 20 20 | gGraph">........
     180 | 20 3c 70 72 6f 70 65 72 74 79 20 6e 61 6d 65 3d | .<property.name=
     190 | 22 68 65 69 67 68 74 2d 70 74 73 22 3e 31 35 37 | "height-pts">157
     1a0 | 2e 35 30 30 30 30 30 3c 2f 70 72 6f 70 65 72 74 | .500000</propert
     1b0 | 79 3e 0a 20 20 20 20 20 20 20 20 3c 70 72 6f 70 | y>.........<prop
     1c0 | 65 72 74 79 20 6e 61 6d 65 3d 22 77 69 64 74 68 | erty.name="width
     1d0 | 2d 70 74 73 22 3e 32 33 31 2e 30 30 30 30 30 30 | -pts">231.000000
     1e0 | 3c 2f 70 72 6f 70 65 72 74 79 3e 0a 20 20 20 20 | </property>.....
     1f0 | 20 20 20 20 3c 70 72 6f 70 65 72 74 79 20 6e 61 | ....<property.na
     200 | 6d 65 3d 22 74 68 65 6d 65 2d 6e 61 6d 65 22 3e | me="theme-name">
     210 | 44 65 66 61 75 6c 74 3c 2f 70 72 6f 70 65 72 74 | Default</propert
     220 | 79 3e 0a 20 20 20 20 20 20 20 20 3c 70 72 6f 70 | y>.........<prop
     230 | 65 72 74 79 20 6e 61 6d 65 3d 22 70 61 64 64 69 | erty.name="paddi
     240 | 6e 67 2d 70 74 73 22 3e 37 2e 30 38 36 36 31 34 | ng-pts">7.086614
     250 | 3c 2f 70 72 6f 70 65 72 74 79 3e 0a 20 20 20 20 | </property>.....
     260 | 20 20 20 20 3c 70 72 6f 70 65 72 74 79 20 6e 61 | ....<property.na
     270 | 6d 65 3d 22 73 74 79 6c 65 22 20 74 79 70 65 3d | me="style".type=
     280 | 22 47 6f 67 53 74 79 6c 65 22 3e 0a 20 20 20 20 | "GogStyle">.....
     290 | 20 20 20 20 20 20 3c 6f 75 74 6c 69 6e 65 20 64 | ......<outline.d
     2a0 | 61 73 68 3d 22 6e 6f 6e 65 22 20 61 75 74 6f 2d | ash="none".auto-
     2b0 | 64 61 73 68 3d 22 31 22 20 77 69 64 74 68 3d 22 | dash="1".width="
     2c0 | 30 22 20 63 6f 6c 6f 72 3d 22 30 3a 30 3a 30 3a | 0".color="0:0:0:
     2d0 | 46 46 22 20 61 75 74 6f 2d 63 6f 6c 6f 72 3d 22 | FF".auto-color="
     2e0 | 31 22 2f 3e 0a 20 20 20 20 20 20 20 20 20 20 3c | 1"/>...........<
     2f0 | 66 69 6c 6c 20 74 79 70 65 3d 22 6e 6f 6e 65 22 | fill.type="none"
     300 | 20 61 75 74 6f 2d 74 79 70 65 3d 22 31 22 20 69 | .auto-type="1".i
     310 | 73 2d 61 75 74 6f 3d 22 31 22 20 61 75 74 6f 2d | s-auto="1".auto-
     320 | 66 6f 72 65 3d 22 31 22 2f 3e 0a 20 20 20 20 20 | fore="1"/>......
     330 | 20 20 20 3c 2f 70 72 6f 70 65 72 74 79 3e 0a 20 | ...</property>..
     340 | 20 20 20 20 20 20 20 3c 70 72 6f 70 65 72 74 79 | .......<property
     350 | 20 6e 61 6d 65 3d 22 61 6e 63 68 6f 72 22 3e 74 | .name="anchor">t
     360 | 6f 70 2d 6c 65 66 74 3c 2f 70 72 6f 70 65 72 74 | op-left</propert
     370 | 79 3e 0a 20 20 20 20 20 20 20 20 3c 70 72 6f 70 | y>.........<prop
     380 | 65 72 74 79 20 6e 61 6d 65 3d 22 61 6c 69 67 6e | erty.name="align
     390 | 6d 65 6e 74 22 3e 66 69 6c 6c 3c 2f 70 72 6f 70 | ment">fill</prop
     3a0 | 65 72 74 79 3e 0a 20 20 20 20 20 20 20 20 3c 47 | erty>.........<G
     3b0 | 6f 67 4f 62 6a 65 63 74 20 72 6f 6c 65 3d 22 43 | ogObject.role="C
     3c0 | 68 61 72 74 22 3e 0a 20 20 20 20 20 20 20 20 20 | hart">..........
     3d0 | 20 3c 70 72 6f 70 65 72 74 79 20 6e 61 6d 65 3d | .<property.name=
     3e0 | 22 79 70 6f 73 22 3e 30 3c 2f 70 72 6f 70 65 72 | "ypos">0</proper
     3f0 | 74 79 3e 0a 20 20 20 20 20 20 20 20 20 20 3c 70 | ty>...........<p
...
Invalid clipboard contents.
-----------------------------------------------------------------------------

The last line is disconcerting. Which "invalid clipboard contents" is Gnumeric providing?
Comment 6 Jean Bréfort 2011-09-27 19:06:07 UTC
Andreas, we do provide a format for abiword. You just need the abiword goffice plugin to make this work.
Comment 7 Jean Bréfort 2011-09-27 19:09:41 UTC
Just forgot to mention, the format that abiword accepts is "application/x-goffice-graph". Anyway, it is generally better to embed a sheet in abiword and only show the graph. Things are much easier to edit, especially if data need to be changed.
Comment 8 Andreas J. Guelzow 2011-09-27 19:47:37 UTC
Jean, we should also be including an image. Note that the debugging output does _not_ list a application/x-goffice-graph target.

As far as I can tell I have the AbiGOffice 2.8.6 plugin loaded in Abiword. Pasting of charts still does not work from Gnumeric.
Comment 9 Andreas J. Guelzow 2011-09-27 19:50:16 UTC
If I use Gnumeric 1.10.13 then pasting into both Abiword and LibreOfficeWriter works for me.

Using current git does _not_ work!
Comment 10 Andreas J. Guelzow 2011-09-27 19:53:18 UTC
The pasting into LibreOffice appears to be an image. So it seems that we used to export that just fine.

In Gnumeric 1.10.13 the debug output is quite different:

-------------------------------------------------------------------------------
Clipboard target 0 is TIMESTAMP
Clipboard target 1 is TARGETS
Clipboard target 2 is MULTIPLE
Clipboard target 3 is application/x-gnumeric
Clipboard target 4 is application/x-goffice-graph
Clipboard target 5 is image/svg
Clipboard target 6 is image/svg+xml
Clipboard target 7 is image/png
Clipboard target 8 is image/bmp
Clipboard target 9 is image/x-bmp
Clipboard target 10 is image/x-MS-bmp
Clipboard target 11 is image/x-icon
Clipboard target 12 is image/x-ico
Clipboard target 13 is image/x-win-bitmap
Clipboard target 14 is image/jpeg
Clipboard target 15 is image/tiff
Received 3950 bytes of table for target application/x-gnumeric
       0 | 3c 3f 78 6d 6c 20 76 65 72 73 69 6f 6e 3d 22 31 | <?xml.version="1
      10 | 2e 30 22 20 65 6e 63 6f 64 69 6e 67 3d 22 55 54 | .0".encoding="UT
      20 | 46 2d 38 22 3f 3e 0a 3c 67 6e 6d 3a 43 6c 69 70 | F-8"?>.<gnm:Clip
      30 | 62 6f 61 72 64 52 61 6e 67 65 20 78 6d 6c 6e 73 | boardRange.xmlns
      40 | 3a 67 6e 6d 3d 22 68 74 74 70 3a 2f 2f 77 77 77 | :gnm="http://www
      50 | 2e 67 6e 75 6d 65 72 69 63 2e 6f 72 67 2f 76 31 | .gnumeric.org/v1
      60 | 30 2e 64 74 64 22 20 78 6d 6c 6e 73 3d 22 68 74 | 0.dtd".xmlns="ht
      70 | 74 70 3a 2f 2f 77 77 77 2e 67 6e 75 6d 65 72 69 | tp://www.gnumeri
      80 | 63 2e 6f 72 67 2f 76 31 30 2e 64 74 64 22 20 43 | c.org/v10.dtd".C
      90 | 6f 6c 73 3d 22 2d 31 22 20 52 6f 77 73 3d 22 2d | ols="-1".Rows="-
      a0 | 31 22 20 42 61 73 65 43 6f 6c 3d 22 30 22 20 42 | 1".BaseCol="0".B
      b0 | 61 73 65 52 6f 77 3d 22 30 22 20 46 6c 6f 61 74 | aseRow="0".Float
      c0 | 52 61 64 69 78 3d 22 32 22 20 46 6c 6f 61 74 44 | Radix="2".FloatD
      d0 | 69 67 69 74 73 3d 22 35 33 22 3e 0a 20 20 3c 67 | igits="53">...<g
      e0 | 6e 6d 3a 4f 62 6a 65 63 74 73 3e 0a 20 20 20 20 | nm:Objects>.....
      f0 | 3c 67 6e 6d 3a 53 68 65 65 74 4f 62 6a 65 63 74 | <gnm:SheetObject
     100 | 47 72 61 70 68 20 4f 62 6a 65 63 74 42 6f 75 6e | Graph.ObjectBoun
     110 | 64 3d 22 41 31 3a 44 38 22 20 4f 62 6a 65 63 74 | d="A1:D8".Object
     120 | 4f 66 66 73 65 74 3d 22 30 2e 38 34 34 20 31 20 | Offset="0.844.1.
     130 | 30 2e 32 33 34 20 30 2e 38 38 32 22 20 44 69 72 | 0.234.0.882".Dir
     140 | 65 63 74 69 6f 6e 3d 22 31 37 22 20 50 72 69 6e | ection="17".Prin
     150 | 74 3d 22 31 22 3e 0a 20 20 20 20 20 20 3c 47 6f | t="1">.......<Go
     160 | 67 4f 62 6a 65 63 74 20 74 79 70 65 3d 22 47 6f | gObject.type="Go
     170 | 67 47 72 61 70 68 22 3e 0a 20 20 20 20 20 20 20 | gGraph">........
     180 | 20 3c 70 72 6f 70 65 72 74 79 20 6e 61 6d 65 3d | .<property.name=
     190 | 22 68 65 69 67 68 74 2d 70 74 73 22 3e 38 37 2e | "height-pts">87.
     1a0 | 37 35 30 30 30 30 3c 2f 70 72 6f 70 65 72 74 79 | 750000</property
     1b0 | 3e 0a 20 20 20 20 20 20 20 20 3c 70 72 6f 70 65 | >.........<prope
     1c0 | 72 74 79 20 6e 61 6d 65 3d 22 77 69 64 74 68 2d | rty.name="width-
     1d0 | 70 74 73 22 3e 31 31 34 2e 37 35 30 30 30 30 3c | pts">114.750000<
     1e0 | 2f 70 72 6f 70 65 72 74 79 3e 0a 20 20 20 20 20 | /property>......
     1f0 | 20 20 20 3c 70 72 6f 70 65 72 74 79 20 6e 61 6d | ...<property.nam
     200 | 65 3d 22 74 68 65 6d 65 2d 6e 61 6d 65 22 3e 44 | e="theme-name">D
     210 | 65 66 61 75 6c 74 3c 2f 70 72 6f 70 65 72 74 79 | efault</property
     220 | 3e 0a 20 20 20 20 20 20 20 20 3c 70 72 6f 70 65 | >.........<prope
     230 | 72 74 79 20 6e 61 6d 65 3d 22 70 61 64 64 69 6e | rty.name="paddin
     240 | 67 2d 70 74 73 22 3e 37 2e 30 38 36 36 31 34 3c | g-pts">7.086614<
     250 | 2f 70 72 6f 70 65 72 74 79 3e 0a 20 20 20 20 20 | /property>......
     260 | 20 20 20 3c 70 72 6f 70 65 72 74 79 20 6e 61 6d | ...<property.nam
     270 | 65 3d 22 73 74 79 6c 65 22 20 74 79 70 65 3d 22 | e="style".type="
     280 | 47 6f 67 53 74 79 6c 65 22 3e 0a 20 20 20 20 20 | GogStyle">......
     290 | 20 20 20 20 20 3c 6f 75 74 6c 69 6e 65 20 64 61 | .....<outline.da
     2a0 | 73 68 3d 22 6e 6f 6e 65 22 20 61 75 74 6f 2d 64 | sh="none".auto-d
     2b0 | 61 73 68 3d 22 31 22 20 77 69 64 74 68 3d 22 30 | ash="1".width="0
     2c0 | 22 20 63 6f 6c 6f 72 3d 22 30 3a 30 3a 30 3a 46 | ".color="0:0:0:F
     2d0 | 46 22 20 61 75 74 6f 2d 63 6f 6c 6f 72 3d 22 31 | F".auto-color="1
     2e0 | 22 2f 3e 0a 20 20 20 20 20 20 20 20 20 20 3c 66 | "/>...........<f
     2f0 | 69 6c 6c 20 74 79 70 65 3d 22 6e 6f 6e 65 22 20 | ill.type="none".
     300 | 61 75 74 6f 2d 74 79 70 65 3d 22 31 22 20 69 73 | auto-type="1".is
     310 | 2d 61 75 74 6f 3d 22 31 22 20 61 75 74 6f 2d 66 | -auto="1".auto-f
     320 | 6f 72 65 3d 22 31 22 2f 3e 0a 20 20 20 20 20 20 | ore="1"/>.......
     330 | 20 20 3c 2f 70 72 6f 70 65 72 74 79 3e 0a 20 20 | ..</property>...
     340 | 20 20 20 20 20 20 3c 70 72 6f 70 65 72 74 79 20 | ......<property.
     350 | 6e 61 6d 65 3d 22 61 6e 63 68 6f 72 22 3e 74 6f | name="anchor">to
     360 | 70 2d 6c 65 66 74 3c 2f 70 72 6f 70 65 72 74 79 | p-left</property
     370 | 3e 0a 20 20 20 20 20 20 20 20 3c 70 72 6f 70 65 | >.........<prope
     380 | 72 74 79 20 6e 61 6d 65 3d 22 61 6c 69 67 6e 6d | rty.name="alignm
     390 | 65 6e 74 22 3e 66 69 6c 6c 3c 2f 70 72 6f 70 65 | ent">fill</prope
     3a0 | 72 74 79 3e 0a 20 20 20 20 20 20 20 20 3c 47 6f | rty>.........<Go
     3b0 | 67 4f 62 6a 65 63 74 20 72 6f 6c 65 3d 22 43 68 | gObject.role="Ch
     3c0 | 61 72 74 22 3e 0a 20 20 20 20 20 20 20 20 20 20 | art">...........
     3d0 | 3c 70 72 6f 70 65 72 74 79 20 6e 61 6d 65 3d 22 | <property.name="
     3e0 | 79 70 6f 73 22 3e 30 3c 2f 70 72 6f 70 65 72 74 | ypos">0</propert
     3f0 | 79 3e 0a 20 20 20 20 20 20 20 20 20 20 3c 70 72 | y>...........<pr
...
Invalid clipboard contents.

------------------------------------------------------------------------------

Note those target 4 to 15 that appear to be missing for the current version!
Comment 11 Andreas J. Guelzow 2011-09-27 20:26:08 UTC
It seems that in gui-clipboard.c, after we have run through:
------------------------------------------------------------------------------
	if (content &&
	    (content->cols <= 0 || content->rows <= 0)) {
		for (ptr = content->objects; ptr != NULL;
		     ptr = ptr->next) {
			candidate = SHEET_OBJECT (ptr->data);
			if (exportable == NULL && IS_SHEET_OBJECT_EXPORTABLE (candidate))
				exportable = candidate;
			if (imageable == NULL && IS_SHEET_OBJECT_IMAGEABLE (candidate))
				imageable = candidate;
		}
		/* Currently, we can't render sheet objects as text or html */
		n_targets = 1;
	}
	if (exportable) {
		tl = sheet_object_exportable_get_target_list (exportable);
		/* _add_table prepends to target_list */
		gtk_target_list_add_table (tl, table_targets, 1);
		targets = target_list_to_entries (tl, &n_targets);
		gtk_target_list_unref (tl);
	}
	if (imageable) {
		tl = sheet_object_get_target_list (imageable);
		/* _add_table prepends to target_list */
		gtk_target_list_add_table (tl, targets, (exportable)? n_targets: 1);
		targets = target_list_to_entries (tl, &n_targets);
		gtk_target_list_unref (tl);
	}
------------------------------------------------------------------------------

we have found a candidate sheet object as exportable and imageable but n_targets is still at 1.
Comment 12 Andreas J. Guelzow 2011-09-27 21:00:42 UTC
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.