Issue 123405 - copying and pasting tables as GDI metafile pastes incomplete table
Summary: copying and pasting tables as GDI metafile pastes incomplete table
Status: REOPENED
Alias: None
Product: Calc
Classification: Application
Component: editing (show other issues)
Version: 4.0.1
Hardware: PC Windows 7
: P3 Normal with 2 votes (vote)
Target Milestone: 4.1.0
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-02 11:57 UTC by Francesca
Modified: 2017-05-20 10:45 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
Test file with copied/pasted table as GDI metafile (23.05 KB, application/vnd.oasis.opendocument.spreadsheet)
2013-10-02 11:57 UTC, Francesca
no flags Details
missing area (63.04 KB, image/png)
2014-04-09 05:21 UTC, zhaoshzh
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description Francesca 2013-10-02 11:57:54 UTC
Created attachment 81691 [details]
Test file with copied/pasted table as GDI metafile

When copying a large--but not huge!--table and then pasting it as a GDI Metafile, the pasted image is missing both rows and columns; I've attached a test file from the file I was working on, and erased data, added rows (my original had issues only with columns, but it's clear now it's an issue of how many rows/columns are copied). The pasted GDI image is right next to the original copied table.
Had the same issue before upgrading from OO 3 to OO 4, but usually repeating the copy/paste commands would copy the whole thing eventually...
Comment 1 Francesca 2013-10-02 12:00:53 UTC
p.s. the behaviour is exactly the same when pasting the table to other OO apps; verified in Writer and Draw.
Comment 2 Edwin Sharp 2013-10-02 12:18:18 UTC
Copy from Calc and paste in Draw is truncated.

Rev. 1525015 Win 7
Comment 3 Edwin Sharp 2013-10-02 18:21:26 UTC
Confirmed also in 
AOO401m5(Build:9714)  -  Rev. 1524958
2013-09-20 11:54 - Linux x86_64
Comment 4 Armin Le Grand 2013-10-10 11:23:32 UTC
ALG: First check: Paste special/as Bitmap does paste all, the last two columns get not clipped. Strange, AFAIK the Bitmap is prepared based on the Metafile, thus the Metafile sould work, too. Taking a look...
Comment 5 Armin Le Grand 2013-10-10 15:40:49 UTC
ALG: The limitation is applied in ScTransferObj::InitDocShell(). There, the PageSize is taken, multiplied by 2 (comment is: 'limit OLE object to double of page size') and then the visible size is calculated and set using SetVisArea. Checking how this can be avoided when target is a Metafile...
Comment 6 Armin Le Grand 2013-10-10 15:48:35 UTC
ALG: I do not know why the limitation to 2xpagesize is there, thus it would be unsafe to just remove it. But it seems possible to add a parameter to ScTransferObj::InitDocShell() to define if the value for SetVisArea shall be limited in relation to PageSize or not. Checking possibility...
Comment 7 Armin Le Grand 2013-10-10 16:00:26 UTC
ALG: Works as expected, I can add this with minimal risk impact - only metafile creation will be affected. Preparing commit...
Comment 8 SVN Robot 2013-10-10 16:20:50 UTC
"alg" committed SVN revision 1531041 into trunk:
i123405 Allow to not limit size to PageSize when creating Metafile content
Comment 9 Armin Le Grand 2013-10-10 16:21:50 UTC
ALG: Committed, done.

BTW: I could not find out how to paste/special as Metafile in Calc itself, I get the paste special dialog of calc. How is that done? I always pasted to another app for test purposes...
Comment 10 Francesca 2013-10-10 16:38:33 UTC
@ALG: I have a small drop-down-menu arrow on my paste button which gives all the 'graphical' paste as options, if I correctly understood what you're asking...
and thanks for solving the issue, it's been bugging me for some time...
Comment 11 Armin Le Grand 2013-10-11 10:08:46 UTC
ALG: @darwinbot: Thanks, found and checked, works now. When you have more stuff bugging you, you are already doing the right thing, tasks welcome!
Comment 12 zhaoshzh 2014-04-09 05:20:54 UTC
if pasted as GDI image,
some areas are missing on AOO410m15(Build:9761)  -  Rev. 1585021

refer to 'missing area.png'
Comment 13 zhaoshzh 2014-04-09 05:21:49 UTC
Created attachment 83146 [details]
missing area
Comment 14 zhaoshzh 2014-04-09 07:37:15 UTC
also same issue on AOO410m14(Build:9760)  -  Rev. 1585624
Comment 15 Armin Le Grand 2014-04-09 09:33:55 UTC
Just tried with AOO410 (AOO410m16(Build:9762)  -  Rev. 1585426
2014-04-07 10:29:13 (Mo, 07 Apr 2014)), no problem found. The pasted (as GDI) table looks the same as the selected and copied one.
@zhaoshzh: When I look at your screenshot I think you tried to select not only the table (Ao to AQ50) but also the example graphic. To reproduce the task,

- select Ao to AQ50
- CTRL-C
- PasteSpecial - GDI Metafile

Please try again, I see no error anymore.
Comment 16 Marcus 2017-05-20 10:45:33 UTC
Reset the assignee to the default "issues@openoffice.apache.org".