Bug 59338 - RTF: Inserting RTF into footnote fails
Summary: RTF: Inserting RTF into footnote fails
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.0.0.1 rc
Hardware: Other All
: medium normal
Assignee: Miklos Vajna
URL:
Whiteboard: target:4.1.0 target:4.0.0.2
Keywords: regression
Depends on:
Blocks:
 
Reported: 2013-01-14 04:32 UTC by Simon Kornblith
Modified: 2013-01-15 12:03 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Kornblith 2013-01-14 04:32:24 UTC
Steps to reproduce:

1. Write some text
2. Copy this text to the clipboard
3. Create a new footnote and place the cursor in it
4. Choose Edit->Paste Special->Formatted text [RTF]

Expected results:

The copied text should be pasted

Observed results:

Only a return is pasted

Notes:

I see the same results when inserting an RTF file using Edit->Insert, or programmatically via XDocumentInsertable.insertDocumentFromURL()

This currently breaks the Zotero LibreOffice Integration extension (https://github.com/zotero/zotero-libreoffice-integration), which needs to be able to insert RTF into footnotes to function properly.
Comment 1 Jorendc 2013-01-14 16:46:56 UTC
I can reproduce this behavior using Mac OSX 10.8.2, LibreOffice 4.0.0.1 RC1.
Comment 2 Jorendc 2013-01-14 16:59:05 UTC
Reproducible with LibreOffice Version 4.0.0.0.beta1+ (Build ID: f4a1520c58f8bbbaf5027222c071374afb55961)
TinderBox: MacOSX-Intel@27-OSX_10.7.0-gcc_4.2.1_llvm, Branch:libreoffice-4-0, Time: 2012-12-16_21:58:26

WORKS with LibreOffice Version 3.6.4.3 (Build ID: 2ef5aff) (Mac OSX also)
therefore REGRESSION
Comment 3 Miklos Vajna 2013-01-15 08:45:10 UTC
Ah yes, this is because we just pass the insert position to the filter, but not the XText object, so headers/footers/footnotes/etc aren't working. I'll look into this.
Comment 4 Not Assigned 2013-01-15 10:22:25 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":

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

fdo#59338 fix RTF paste into footnote



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 5 Miklos Vajna 2013-01-15 10:39:34 UTC
-4-0 review: https://gerrit.libreoffice.org/1691
Comment 6 Not Assigned 2013-01-15 12:03:41 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "libreoffice-4-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=2ad8c6c786d7d07130ee6968d89f0be8e7bd7165&h=libreoffice-4-0

fdo#59338 fix RTF paste into footnote


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