Bug 62044 - Copy Paste from Impress break Writer's Heading Styles (Heading 1, Heading 2, etc)
Summary: Copy Paste from Impress break Writer's Heading Styles (Heading 1, Heading 2, ...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.0.0.3 release
Hardware: All All
: high normal
Assignee: Miklos Vajna
URL:
Whiteboard: bibisected40 target:4.2.0 target:4.1....
Keywords: regression
: 61958 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-03-09 03:27 UTC by ysn
Modified: 2013-09-22 09:03 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
ODT document containing an amended header1 paragraph style (7.70 KB, application/vnd.oasis.opendocument.text)
2013-06-04 09:55 UTC, Miklos Vajna
Details
RTF output from impress. (9.99 KB, text/richtext)
2013-06-04 09:57 UTC, Miklos Vajna
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ysn 2013-03-09 03:27:12 UTC
This bug may related to Bug 37511.
This bug occur only on Libre Office version 4.0 above (it doesn't on version 3.6)

Steps to reproduce:
1) Open writer, type some words and mark it as "Heading 1", 
2) Modify "heading 1" styles, set font size to 10pt
3) Open impress and create a new presentation
4) Insert new slide and write some words in impress
5) Copy newly typed words in impress
6) Paste it to writer
7) You will notice the heading 1 font revert back to 18pt
Comment 1 Joel Madero 2013-04-15 02:14:04 UTC
Thank you for reporting this issue! I have been able to confirm the issue on:
Version: 4.1.0.0.alpha0+Build ID: 6e3e6ef7257e93743a72719581ef6fe0016e58e
Date:   Thu Apr 11 15:24:38 2013 +0200 
Platform: Bodhi Linux 2.2 x64

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
As I've been able to confirm this problem I am marking as:

New (confirmed)
Normal - while this does not prevent high quality work it is a regression and should be fixed quickly.

High - regression + with big documents this could be a serious problem

Keywords - regression

Whiteboard Status - bibisectrequest

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
LibreOffice is powered by a team of volunteers, every bug is confirmed (triaged) by human beings who mostly give their time for free. We invite you to join our triaging by checking out this link:
https://wiki.documentfoundation.org/QA/BugTriage and join us on freenode at #libreoffice-qa

There are also other ways to get involved including with marketing, UX, documentation, and of course developing -  http://www.libreoffice.org/get-help/mailing-lists/. 

Lastly, good bug reports help tremendously in making the process go smoother, please always provide reproducible steps (even if it seems easy) and attach any and all relevant material
Comment 2 Joel Madero 2013-05-02 18:18:14 UTC
So a few things here:

Verified still an issue:
Master pulled:
Date:   Tue Apr 30 23:38:40 2013 +0200

Other note: you can actually see that the font and size is changed if you go back into modify -> header 1, mine changes from Aerial to a Hindi font that I have installed, quite weird

Version: Updating to 4.0.0.3 release as it at least was present at this point (bibisect covers it)
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
47498a36f7af8f54e6e3dda89cd4708802a409e6 is the first bad commit
commit 47498a36f7af8f54e6e3dda89cd4708802a409e6
Author: Bjoern Michaelsen <bjoern.michaelsen@canonical.com>
Date:   Tue Dec 11 03:32:02 2012 +0000

    source-hash-19f4ebd8a54da0ae03b9cc8481613e5cd20ee1e7
    
    commit 19f4ebd8a54da0ae03b9cc8481613e5cd20ee1e7
    Author:     Caolán McNamara <caolanm@redhat.com>
    AuthorDate: Mon Nov 12 21:17:37 2012 +0000
    Commit:     Caolán McNamara <caolanm@redhat.com>
    CommitDate: Tue Nov 13 09:49:18 2012 +0000
    
        use SetControlForeground instead of SetTextColor
    
        because that's persistent across unrelated style
        changes otherwise setting e.g. alignment will
        reset the color to default black
    
        Change-Id: I2b975c3914a59a93e54d72aa0975a066b5edf533

:100644 100644 6d85145f7ba0ead31c84e60a4f7ea59af07f4e83 29d96b0de6d16a73b1e9ff2ca8745b115e40d115 M	autogen.log
:100644 100644 5d2105bc5db0d97452b3f213d028567f7ef47f74 fc50744f3abcdc37e7e8ae63b5ee73f25bb1c6e9 M	ccache.log
:100644 100644 cb3471f771599c0198309b766b1119b4272134de 28c61ffba7e7adab533f7ff9a4f4f595e4439822 M	commitmsg
:100644 100644 ea177fc38ffa1376ecf167db31aadeae1ee62b34 144992024292b77d35ec3f94e2b3fd309f9d27f1 M	dev-install.log
:100644 100644 34bcd3ceb8be50720147e089fde247e8d90868b0 ae2cc20a3e3477e7b1845778dd570bf277812953 M	make.log
:040000 040000 21c1e97d1421f61bbbeb0734daeac98e43fe52a1 2c1a78c87a5e84fe1c2bafb167b87e7c85aed252 M	opt


# bad: [5b4b36d87517a6ea96ff8c84c46b12f462fc9a1a] source-hash-8450a99c744e9005f19173e4df35d65640bcf5c4
# good: [65fd30f5cb4cdd37995a33420ed8273c0a29bf00] source-hash-d6cde02dbce8c28c6af836e2dc1120f8a6ef9932
git bisect start 'latest' 'oldest'
# good: [16b0b88cbd4ef0f51816e97277e40c5cf78f7bf9] source-hash-099198a4224778fe6e43f5dc13b5b9b1b4dc828c
git bisect good 16b0b88cbd4ef0f51816e97277e40c5cf78f7bf9
# good: [f28b8f9a6c47fa59bf98fffe937a2f2db7a2445a] source-hash-a581d31b227623e09d2970a91214fda398f98eda
git bisect good f28b8f9a6c47fa59bf98fffe937a2f2db7a2445a
# good: [114fd3b76bcba890e6d702d00cef910f1493c262] source-hash-64ab96cd15e52da88781e720d6f031dbcd0ba902
git bisect good 114fd3b76bcba890e6d702d00cef910f1493c262
# bad: [47498a36f7af8f54e6e3dda89cd4708802a409e6] source-hash-19f4ebd8a54da0ae03b9cc8481613e5cd20ee1e7
git bisect bad 47498a36f7af8f54e6e3dda89cd4708802a409e6
# good: [f4e2d84db194943180f3e7ed4adce5f8e377d9bc] source-hash-806d18ae7b8c241fe90e49d3d370306769c50a10
git bisect good f4e2d84db194943180f3e7ed4adce5f8e377d9bc
# good: [fb4214f9d134b556582a4a5280e5458de5f8eebd] source-hash-683758efb22d08a4cf211a6d985148f513da2a90
git bisect good fb4214f9d134b556582a4a5280e5458de5f8eebd
# good: [7b32edd2389319e0d394368c4109201528c41f7e] source-hash-44b96a2fce52b6e3e683dc917fab219cf75001db
git bisect good 7b32edd2389319e0d394368c4109201528c41f7e
# good: [9ec4be63ed5281f2e9364b140da69291c7abc348] source-hash-a1ac2538e9b287444500618ab4d2f0f06c25cf34
git bisect good 9ec4be63ed5281f2e9364b140da69291c7abc348
Comment 3 Michael Stahl (CIB) 2013-05-31 21:57:27 UTC
caused by ed654c4aa7f9f10fcb16127349009bc0c38b12e8

 Revert "fdo#43869 use the old rtf importer for paste"

probably need to prevent importing some styles from clipboard...
Comment 4 Miklos Vajna 2013-06-04 09:55:56 UTC
Created attachment 80276 [details]
ODT document containing an amended header1 paragraph style
Comment 5 Miklos Vajna 2013-06-04 09:57:24 UTC
Created attachment 80277 [details]
RTF output from impress.

Using the attached files, one can reproduce the bug using

SW_DEBUG_RTF_PASTE_FROM=/path/to/paste.rtf ./soffice.bin /path/to/writer.odt

and a simple paste.
Comment 6 Commit Notification 2013-06-04 10:46:51 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":

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

fdo#62044 RTF import: don't overwrite existing styles when pasting



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 7 Commit Notification 2013-06-04 12:07:32 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "libreoffice-4-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=9a63f21bcefe07250de463c488c459b0767534b4&h=libreoffice-4-1

fdo#62044 RTF import: don't overwrite existing styles when pasting


It will be available in LibreOffice 4.1.

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 8 Miklos Vajna 2013-06-04 12:13:51 UTC
-4-0 review: https://gerrit.libreoffice.org/4149
Comment 9 Michael Stahl (CIB) 2013-07-02 19:19:37 UTC
was pushed to libreoffice-4-0 as eedf31c5a548d88acbc42daf3fdd647c7aee859e
Comment 10 Miklos Vajna 2013-09-22 09:03:51 UTC
*** Bug 61958 has been marked as a duplicate of this bug. ***