[Libreoffice-bugs] [Bug 112118] When using page-border, size of margins increases every time file is saved as DOC(X) ( see comment 3)
bugzilla-daemon at bugs.documentfoundation.org
bugzilla-daemon at bugs.documentfoundation.org
Wed Mar 14 10:25:24 UTC 2018
https://bugs.documentfoundation.org/show_bug.cgi?id=112118
Mike Kaganski <mikekaganski at hotmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|libreoffice-bugs at lists.free |mikekaganski at hotmail.com
|desktop.org |
--- Comment #13 from Mike Kaganski <mikekaganski at hotmail.com> ---
https://gerrit.libreoffice.org/51267 is the DOCX part.
Please note that there are fundamental difference in document models between
ODF and MS formats, that disallows from fully preserving the border/margin
sizes/distances. Partly (!) it's discussed at
https://wiki.openoffice.org/wiki/Writer/MSInteroperability/PageBorder.
MS Word only allows one to have page borders to have offset no more than 31 pt
(~1.1 cm) from either page edge, or page text, while ODF allows for any offset
value (so, MS Word cannot display correctly borders placed outside of the
mentioned limits); note that this is Word limitation, not of OOXML. OTOH, ODT
doesn't allow for placing border outside of the page, or inside of text area
(which Word allows).
MS formats only can have integer pt size as border offset, and 1/8 pt as border
width (0.25 pt minimum). So, given that ODF allows for much more precise
control over the sizes, not every size valid for ODF could be saved intact to
MS formats, and so on round-trip, sizes may arrive changed a little.
The patch takes care to preserve size from page edge to text (the most
important size that affects document layout). This should be done correctly
now.
Also, it positions borders properly on import, taking into account the border
width, in all cases supported by ODF (when border is inside ODF page margin).
When borders go outside of range valid for ODF, the margin is set to keep text
area intact, and the border is placed as close to intended position as
possible.
Export code now also handles border width (which it didn't); also it improves
the logic in cases when borders in document are outside of ranges possible for
Word. Note that we write correct sizes to OOXML, so that when reopened by LO,
the borders will be in correct places; but as Word cannot handle sizes more
than 31 pt, it will show borders shifted. To test the change, you may create a
sample text document in Writer with all margins 4 cm, and borders 6 pt wide
padded by 2 cm; and another one with all margins 2 cm, and border padding 4 cm;
and compare the results of export in Word.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20180314/20a85258/attachment-0001.html>
More information about the Libreoffice-bugs
mailing list