Bug 134971 - Insert from file overwrites default style
Summary: Insert from file overwrites default style
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:7.1.0 target:7.0.1
Keywords:
Depends on:
Blocks: Insert-File-Content
  Show dependency treegraph
 
Reported: 2020-07-20 00:22 UTC by Thorsten Behrens (allotropia)
Modified: 2020-09-03 20:39 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
File to insert (8.40 KB, application/vnd.oasis.opendocument.text)
2020-07-20 00:24 UTC, Thorsten Behrens (allotropia)
Details
Template to insert into (9.73 KB, application/vnd.oasis.opendocument.text)
2020-07-20 00:24 UTC, Thorsten Behrens (allotropia)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thorsten Behrens (allotropia) 2020-07-20 00:22:50 UTC
Description:
Insert from file overwrites default style (instead of applying destination document styles to inserted one)


Steps to Reproduce:
* load document 'template.odt'
* insert document 'insert.odt' via Insert->Text from File


Actual Results:
Inserted document uses Liberation in table (clear direct formatting on bodytemplate string reveals the default document style went from Arial to Liberation)

Expected Results:
Inserted document inherits default style font (arial), bodytemplate does not get hard formatting & remains arial, too


Reproducible: Always


User Profile Reset: No



Additional Info:
-
Comment 1 Thorsten Behrens (allotropia) 2020-07-20 00:24:18 UTC
Created attachment 163293 [details]
File to insert
Comment 2 Thorsten Behrens (allotropia) 2020-07-20 00:24:43 UTC
Created attachment 163294 [details]
Template to insert into
Comment 3 Thorsten Behrens (allotropia) 2020-07-20 00:27:12 UTC
Somewhat unusual document, in that template.odt has:

* <style:default-style> overridden for paragraph style
* style "Standard" not explicitely overriding font, but inheriting from default
Comment 4 Commit Notification 2020-08-02 22:08:48 UTC
Thorsten Behrens committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/c84764e08da5e1c6202d300684baab0076d6b3ed

tdf#134971 Don't overwrite default styles when inserting doc

It will be available in 7.1.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 5 Commit Notification 2020-08-04 08:23:41 UTC
Thorsten Behrens committed a patch related to this issue.
It has been pushed to "libreoffice-7-0":

https://git.libreoffice.org/core/commit/a975573406553f46507dd309f02a5bf5198596fc

tdf#134971 Don't overwrite default styles when inserting doc

It will be available in 7.0.1.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 6 BogdanB 2020-09-03 20:39:22 UTC
It's ok now

Version: 7.1.0.0.alpha0+
Build ID: e2f4e65a7b8024c00b049eebf0d87637efda7f24
CPU threads: 4; OS: Linux 5.4; UI render: default; VCL: gtk3
Locale: en-US (ro_RO.UTF-8); UI: en-US
Calc: threaded