[Libreoffice-bugs] [Bug 112118] When using page-border, size of margins increases every time file is saved as DOC(X) ( see comment 3)

2018-03-07 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=112118

Aron Budea  changed:

   What|Removed |Added

   Keywords||filter:doc, filter:docx
   Hardware|x86-64 (AMD64)  |All
Version|5.4.0.3 release |Inherited From OOo
 Blocks|108576  |108382, 108569, 112762
Summary|When using page-border, |When using page-border,
   |size of margins increases   |size of margins increases
   |every time file is saved as |every time file is saved as
   |docx (see comment 3)|DOC(X) (see comment 3)

--- Comment #11 from Aron Budea  ---
Simpler repro steps as described in duplicate bug 116247:

Add borders to an empty page, and save it in DOC or DOCX format, then reopen
the document.

=> Margin is changed (eg. default 2 cm is changed to 2.05 cm).

Attaching a sample with varied margins:  1.5 / 2.5 / 1 / 3 cm (left / right /
top / bottom).

When saving in DOC format the margins become: 1.51 / 2.51 / 1.01 / 3.01 cm.
When saving in DOCX format the margins become: 1.55 / 2.55 / 1.05 / 3.05 cm.


Referenced Bugs:

https://bugs.documentfoundation.org/show_bug.cgi?id=108382
[Bug 108382] [META] Borders bugs and enhancements
https://bugs.documentfoundation.org/show_bug.cgi?id=108569
[Bug 108569] [META] Page margin bugs and enhancements
https://bugs.documentfoundation.org/show_bug.cgi?id=108576
[Bug 108576] [META] Writer page style bugs and enhancements
https://bugs.documentfoundation.org/show_bug.cgi?id=112762
[Bug 112762] [META] DOC (binary) page-related issues
-- 
You are receiving this mail because:
You are the assignee for the bug.___
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs


[Libreoffice-bugs] [Bug 112118] When using page-border, size of margins increases every time file is saved as DOC(X) ( see comment 3)

2018-03-12 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=112118

--- Comment #12 from Aron Budea  ---
Created attachment 140583
  --> https://bugs.documentfoundation.org/attachment.cgi?id=140583&action=edit
Sample ODT

Attaching a sample with somewhat more exotic settings than in bug 116247, with
varying margin, padding and border width.

-- 
You are receiving this mail because:
You are the assignee for the bug.___
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs


[Libreoffice-bugs] [Bug 112118] When using page-border, size of margins increases every time file is saved as DOC(X) ( see comment 3)

2018-03-14 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=112118

Mike Kaganski  changed:

   What|Removed |Added

   Assignee|libreoffice-b...@lists.free |mikekagan...@hotmail.com
   |desktop.org |

--- Comment #13 from Mike Kaganski  ---
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.___
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs