Bug 72942 - importing .docx file overwrites all global properties
Summary: importing .docx file overwrites all global properties
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
(earliest affected)
3.5.0 release
Hardware: All Windows (All)
: high normal
Assignee: Serge Krot (CIB)
Whiteboard: target:6.1.0
Keywords: filter:docx, notBibisectable
Depends on: 112025
Blocks: DOCX
  Show dependency treegraph
Reported: 2013-12-21 02:23 UTC by Horst
Modified: 2019-11-01 07:58 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:
Regression By:

imported file (14.72 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2013-12-21 15:29 UTC, Horst
recipe_template.odt: starter file containing some properties. (13.87 KB, application/vnd.oasis.opendocument.text)
2016-12-16 05:51 UTC, Justin L

Note You need to log in before you can comment on or make changes to this bug.
Description Horst 2013-12-21 02:23:01 UTC
Imported a .DOCX file with Insert>File into an existing .odt file.
Expected result: Text, Tables , Formatting to be included in existing file.
.ODT file was english-US, Letter page, lang. english
Docx file was german-switzerland, A4 page, lang. german.

Result: DOCX was imported (Text, Tables etc.) bur overwrote all global parameter Language, Page Format, Author, Dictonary.

It was only a small document, problem fixed in a few minutes, but consider a large document!!!!
Comment 1 Joel Madero 2013-12-21 03:31:37 UTC
Please attach the docx file if possible, much easier for us to test (otherwise we have to make a docx file with language settings and what not)

Marking as NEEDINFO - once you attach the docx mark as UNCONFIRMED and I'll take a look at confirming it. Thanks!
Comment 2 Horst 2013-12-21 15:29:58 UTC
Created attachment 91089 [details]
imported file

File was created with Word.
Comment 3 Jorendc 2013-12-28 17:47:33 UTC
Reproducible, tested using Windows 8.1 with LibreOffice Version:
Build ID: 5be7ec4193b892e5643ff5f3f2e6755319569190
TinderBox: Win-x86@39, Branch:master, Time: 2013-12-27_23:55:02

Kind regards,
Comment 4 QA Administrators 2015-04-19 03:22:57 UTC Comment hidden (obsolete, spam)
Comment 5 Gordo 2015-04-24 13:24:04 UTC
Still reproducible.

Windows Vista 64
Build ID: c4c7d32d0d49397cad38d62472b0bc8acff48dd6
Comment 6 QA Administrators 2016-09-20 09:33:20 UTC Comment hidden (obsolete, spam)
Comment 7 Justin L 2016-12-16 05:51:24 UTC
Created attachment 129679 [details]
recipe_template.odt: starter file containing some properties.

confirmed some parts in 5.3beta by starting with recipe_template.odt and "Insert - Document..." recipe_chessecake.docx.

--- original template ---
Default Para font and Language: Liberation English US                 
Created date: 12/16/2016, 08:26:40
Default Page Size: A6 landscape

 --- with inserted document ---
Default Para Font and Language: Calibri German
Created date: 11/29/2013, 20:55:00, Nicole Gschwind
Default Page Size: still A6 landscape
Comment 8 Justin L 2016-12-16 06:26:52 UTC
probably inherited from OOo - used bibisect43all to confirm as far back as 3.5. The biggest difference since then is that now the default page style is not over-written.

The current status of replacing char/paragraph styles/font/language seems logical to me.  Inserting a document should include most of that document's state.  If you don't want all of that stuff, then do a copy/paste instead.  (The opposite is not true AFAIK - there is probably no other way to replace character/paragraph styles than by importing.) I would suggest marking this bug as fixed (because of the page style) unless there is are very specific items that ought not to be over-written (and in that case give a clear rational).
Comment 9 Thorsten Behrens (allotropia) 2017-12-06 00:53:17 UTC
with bug 112025 fixed, confirm this works, and default page style is no longer overwritten.
Comment 10 Horst 2017-12-09 22:53:16 UTC
Tested it with the attached files.
1) Page style is ok /not overwritten.
2) Default Style Font still overwritten with Calibri 11 instead of Arial 13
3) Document language is set to German (Switzerland) overwriting English(USA)

Only one out of 3 bugs fixed. Resetting status to NEW.
Comment 11 Commit Notification 2018-01-31 00:31:16 UTC
Serge Krot committed a patch related to this issue.
It has been pushed to "master":


tdf#72942 Do not overwrite styles from the inserted doc

It will be available in 6.1.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:

Affected users are encouraged to test the fix and report feedback.