Download it now!
Bug 45533 - EDITING: Pasting TABLE as RTF from SPSS fails
Summary: EDITING: Pasting TABLE as RTF from SPSS fails
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
3.4.1 RC1
Hardware: Other Windows (All)
: medium normal
Assignee: Miklos Vajna
URL:
Whiteboard: BSA target:4.1.0
Keywords: filter:rtf, regression
Depends on:
Blocks:
 
Reported: 2012-02-02 03:25 UTC by Johannes
Modified: 2015-12-17 12:03 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
There are Screenshots of how it looks like and the SPSS-Output-File. (302.62 KB, application/zip)
2012-02-02 03:25 UTC, Johannes
Details
Clipboard Contents with RTF table (23.92 KB, application/octet-stream)
2012-03-16 09:27 UTC, Rainer Bielefeld Retired
Details
Paste result with new RTF paste. (82.32 KB, image/png)
2012-12-28 15:00 UTC, Miklos Vajna
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Johannes 2012-02-02 03:25:49 UTC
Created attachment 56507 [details]
There are Screenshots of how it looks like and the SPSS-Output-File.

Problem description: 

I have problems pasting tables from an SPSS Output Document. SPSS is a software for statisical analysis, commonly used in social sciences.

Steps to reproduce:
1. Copy a Table in SPSS (in my case it was a frequencys-table, but that is not important. The Paste fails also with every different table). SPSS makes that an RTF-Export to the clipboard [Ctrl+C]. 

2. Paste it in Libre-Office Writer [Ctrl+V]

Current behavior:

The pasted table looks crappy. It not a "pasted table" at all. The Pasted contend is a table and some text below it. It is really hard to repair.

If i paste it to M$ Word (where it works fine), copy it in Word again and paste it to LibreOffice than i have a lousy formatted table with VERY thick frames. Therefore i assume, that there is a general problem with pasting RTF-Tables.

I attached a ZIP-file with screenshots of how it looks like and the SPSS-output-file. As far as i know it is possible to open the Outputfiles in SPSS and copy content out of it without having a valid licence.

If a developer has further questions, feel free to send me a private mail. My German is better than my Englisch ;)

Expected behavior:

Should look like the source. Or at least look like in OpenOffice. Or even better look like in M$ Word. In M$ Word it looks like the source.

Platform (if different from the browser):
Windows 7 Ultimate, 64 Bit, LibreOffice with standard install options.
IBM SPSS version 20. The Bug also appears with content wich is copied with older SPSS-Versions.
              
Browser: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0) Gecko/20100101 Firefox/10.0
Comment 1 sasha.libreoffice 2012-03-16 03:25:08 UTC
Thanks for bugreport

@ Rainer
Please, take look at this bug. Here needed additional knowledge that You have.
Comment 2 Rainer Bielefeld Retired 2012-03-16 04:52:34 UTC
I doubt that the core of the problem has to do with RTF, but of course, there might be a RTF problem additionally.

I limit this report to the SPSS Problem

I will install SPSS 8omg, 2GB for both 64bit and 32bit versions) and check, additionally I will attach a clipboard contents if necessary. 

Assign to me for now.

@Johannes
It's really limited to tables or is there a general copy paste from SPSS problem?
Comment 3 Rainer Bielefeld Retired 2012-03-16 09:25:49 UTC
I did some tests with reporter's sample and copied it with default settings from SPSS (you can download a test version from IBM).

Copy paste works fine to Calc

[Reproducible] with "LibreOffice 3.5.1.2 German UI/Locale [Build-ID: dc9775d-05ecbee-0851ad3-1586698-727bf66] on German WIN7 Home Premium (64bit),  Copy paste to writer looks as reported 

I did a "Copy Special" from SPSS limited to RTF, furthermore only RTF copy to WRITER.

Reproducible with 3.4.1 RC, so it seems the Problem came with 3.4

Still [Reproducible] with "LOdev 3.6.0alpha0+  English UI/Locale [Build ID: 9518535-d09cf17-8a74106-c695ecd-16afab (libreoffice-3-5-branch-point)]"  {Win-x86@9-Voreppe Win32 pull time 2012-02-29 04:21:51}. OS: German WIN7 Home Premium (64bit).

Works fine with "LibreOffice Portable 3.3.0  - WIN7  Home Premium (64bit) German UI [OOO330m19 (Build:6) tag libreoffice-3.3.0.4]" 

It seems reporter's suspect was correct, it's a RTF problem.

I can reproduce the problem simply with a clipbrd.exe (from WIN XP, also works fine with WIN7) saved clipboard contents, I will attach it.

IBM SPSS Statistics Trial Software is available for MAC and Linux, may be someone wants to test for those OS, too?

I wonder whether this one is related to "Bug 43874 - Writer showing tables as text"

@Miklós:
Please set Status to ASSIGNED and add yourself to "Assigned To" if you accept this Bug
Comment 4 Rainer Bielefeld Retired 2012-03-16 09:27:27 UTC
Created attachment 58571 [details]
Clipboard Contents with RTF table

Can be transferred to Clipboard with WIN tool CLIPBRD.EXE for tests.
Comment 5 Johannes 2012-03-19 03:07:14 UTC
(In reply to comment #2)
> @Johannes
> It's really limited to tables or is there a general copy paste from SPSS
> problem?

Sorry for the late answer, but i was absent last week.

Copying data cells from the data field works fine.

Copying from the output window:
Text messages -> works fine.
Diagrams -> are copied as picture. Works fine.

I never met more types of output. So I think that the problem only occurs to tables.
Comment 6 Michael Meeks 2012-12-18 16:01:53 UTC
Is the RTF filter shared with calc for this ? if so, should it be tagged as an rtf-filter regression ? and/or did anything change here with your new cut/paste work in writer :-)
Comment 7 Miklos Vajna 2012-12-18 16:07:54 UTC
I think it should be tagged as such. No, the Calc RTF filter is separate, but as far as I see this has nothing to do with Calc, either.

Rainer -- you rock, with your clipboard dump, I can try to fix this. :-)
Comment 8 Not Assigned 2012-12-28 14:57:22 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":

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

fdo#45533 make it easier to debug RTF copy&paste



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 9 Miklos Vajna 2012-12-28 15:00:02 UTC
Created attachment 72214 [details]
Paste result with new RTF paste.
Comment 10 Miklos Vajna 2012-12-28 15:04:24 UTC
I'm happy to say that it seems this is no longer an issue with the new RTF paste introduced in commit 232ad2f2588beff50cb5c1f3b689c581ba317583. Above is a screenshot, that looks fine to me.

To test on Linux without installing SPSS, extract the RTF part of the clipboard dump, and use:

SW_DEBUG_RTF_PASTE_FROM=/path/to/extracted.rtf ./soffice.bin

Then just copy something (e.g. type "a", select, and cut), and during paste, the contents of extracted.rtf will be pasted, not the originally copied content.
Comment 11 sasha.libreoffice 2012-12-29 05:57:39 UTC
Thanks for fixing this bug
Comment 12 Daniel L 2013-07-12 17:26:44 UTC
Hello everybody,
this bug still exist on MacOS (LibreOffice 4.0.4.2 & SPSS 21)

Should I open a new ticket?
Comment 13 Miklos Vajna 2013-07-13 16:01:52 UTC
Daniel,

I just tried the above sample, and it still works. So yes, I would suggest creating a separate bug, see comment 4 on how can you extract clipboard data, and then attach it to the new bug.

Thanks.
Comment 14 Robinson Tryon (qubit) 2015-12-17 12:03:27 UTC
Migrating Whiteboard tags to Keywords: (filter:rtf)
Replace rtf_filter -> filter:rtf.
[NinjaEdit]