Download it now!
Bug 96980 - Border width can only be entered in pt units
Summary: Border width can only be entered in pt units
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
(earliest affected)
Inherited From OOo
Hardware: All All
: medium minor
Assignee: Not Assigned
Depends on:
Blocks: Writer-UX Borders
  Show dependency treegraph
Reported: 2016-01-09 06:55 UTC by LRN
Modified: 2019-01-05 21:16 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Note You need to log in before you can comment on or make changes to this bug.
Description LRN 2016-01-09 06:55:10 UTC
When i say "Line" i mean the "Line" tool from the drawing toolbar (also applies to TextBox tool from that toolbar).

Bug (1)
   Page border width is in "pt", one pt is 0.352(7)mm.
   Minimal border width is 0.05pt (0.017635 mm).
   Border width granularity is 0.01pt.
   Maximal border width is 9pt (3.175mm).

   Line width is in "cm", one cm is 10mm.
   Minimal line width is 0.01cm (0.1mm).
   Line width granularity is 0.01cm (0.1mm).
   Maximal line width is freaking big.

Meaning that:

A) it's very difficult to make the line width to be visibly equal to the page border width, unless you choose a very specific size (like, 2.83pt page border and, accordingly, 0.01cm line)

B) page borders can be much thinner than lines could ever be

C) lines can be much thicker than page borders could ever be

Bug (2)
   Actual page border is drawn *inward* from the logical page border.
   Actual line is drawn *through* the logical line.

This is obvious if you make really thick 9pt page border (say, 2cm space from the left edge of the page) and then look at the horizontal ruler. The ruler will tell you that the left edge of the thick black line of the border is exactly 2cm away from the edge.
At the same time, if you create a line, set its PositionAndSize to be 2cm ToTheLeft from the EntirePage, you'll see that the line center is 2cm away, not its left edge.

Obviously, this is preferred behaviour for lines (as lines have no inherent "inward" or "outward" edge). However, this also applies to the TextBox tool. Text boxes *do* have inward and outward edges.

Tables also have inward and outward edges, *and* their borders are defined as page borders - in pt, up to 9.00pt. However, table borders are drawn like lines - squarely through the logical border, so that half the width is on one side, and the other half is on the other side.

Possible fixes:

For (1) - Allow lines/borders to be defined in pt/cm respectively, with the granularity and maximal width changed to match

For (2) - Add inward/outward/centered property to each line (for lines inward would be right, outward would be left, relative to the direction of the line; for textboxes it's obvious; defaults to centered). Add inward/outward/centered property to page/table borders (defaults to inward for pages, centered for tables).

Use-case: i want to place a textbox at the edge of my page and align it with the page border. That has proven to be very difficult, because of the border/line width discrepancy and because textbox line is drawn through the textbox logical border while page border line is drawn along its inward logical edge. When exported to PDF, i can clearly see that the box and the page borders are not aligned (i would assume that printing it on paper wouldn't change anything).

This applies to both and
Comment 1 Buovjaga 2016-01-18 18:04:40 UTC
Sounds fair, so setting to NEW.
Comment 2 QA Administrators 2017-03-06 14:24:22 UTC Comment hidden (obsolete)
Comment 3 LRN 2017-03-23 17:45:38 UTC
LibreOffice Version: (x64)
Build ID: e80a0e0fd1875e1696614d24c32df0f95f03deb2
CPU Threads: 8; OS Version: Windows 6.19

The bug is present. Nothing is changed, as far as i can see.
Comment 4 Regina Henschel 2018-02-18 17:04:37 UTC
There are multiple problems in one issue. That cannot be handles properly. I suggest to focus on entering border width and to change the subject accordingly.


The text box, which you get by the T icon in the toolbar is a drawing object. All drawing objects have line and fill properties. The "line" in a drawing object is represented by a draw:stroke attribute in file format. Your observation is correct, that it is symmetric to its logical position. I see no chance to change it, especially as it is the same behavior as in SVG.

The border of a page or of a table cell is represented by fo:border attributes in file format.

Tables have a special feature to collapse the borders of adjacent cells. In case that is not enabled, the borders of cells are inside the cell, so that the width of the paragraph area = cell-width minus border-widths minus padding-widths. For pages you get similar: width of page-content = page-width minus border-width minus padding-width. I think, that this behavior is correct.

The fact, that the value for the border-width cannot be entered in cm or mm or others, is indeed a problem. That is not covered by file format and a shortcoming of LibreOffice.