Bug 77484 - Writer: Tabstopps applied wrong if page margins and frameborder are set.
Summary: Writer: Tabstopps applied wrong if page margins and frameborder are set.
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.2.3.3 release
Hardware: Other Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Paragraph-Tab-Stops
  Show dependency treegraph
 
Reported: 2014-04-15 12:46 UTC by a07cd040897db54e103c
Modified: 2023-08-07 21:37 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
An example document. (23.40 KB, application/vnd.oasis.opendocument.text)
2014-04-15 12:48 UTC, a07cd040897db54e103c
Details
The settings used for page margins. (20.06 KB, image/png)
2014-04-15 12:49 UTC, a07cd040897db54e103c
Details
The settings used for border spacing. (17.63 KB, image/png)
2014-04-15 12:50 UTC, a07cd040897db54e103c
Details
Document created with 4.3 (118.29 KB, application/vnd.oasis.opendocument.text)
2014-04-22 08:52 UTC, Florian Reisinger
Details

Note You need to log in before you can comment on or make changes to this bug.
Description a07cd040897db54e103c 2014-04-15 12:46:34 UTC
We need our business documents to have a background image, that goes beyond the textarea. Due to the lack of an option to stretch the background image to the whole page (not only the writable textarea) we are forced to set our page margins to 0,00 and emulate this missing spaces by applying a border with spacing to each page. (see screenshots how this is done)

Under these circumstances the following misbehaviour in calculating tabstopp positions reveals.

Assume we need a (optical) page margin of 2.00 cm. Then we would set the page margins to 0.00 cm and the border spacing would be set to 2.00 cm. If now a text is written and a tabstopp is set by clicking the horizontal ruler at 5.00 cm the text will start at 7.00 cm. (see example document)

Writer seems to calculate the position of the tabstopp by adding the border spacing to the page margin. As a result the tabstop is placed at 7cm instead of 5cm.

The expected behaviour is that tabstopps positions are *always* only calculated from the beginning of the page margin - no matter what border spacing is used. This also better confirms to the users expectation when clicking the horizontal ruler (or defining a tabstopp in format dialog).

P.S. It would also be nice if an option was introduced, that allows a background image to be stretched to the *whole* page.
Comment 1 a07cd040897db54e103c 2014-04-15 12:48:07 UTC
Created attachment 97407 [details]
An example document.
Comment 2 a07cd040897db54e103c 2014-04-15 12:49:28 UTC
Created attachment 97408 [details]
The settings used for page margins.
Comment 3 a07cd040897db54e103c 2014-04-15 12:50:15 UTC
Created attachment 97409 [details]
The settings used for border spacing.
Comment 4 Florian Reisinger 2014-04-22 08:52:48 UTC
Created attachment 97734 [details]
Document created with 4.3

Hi,
I could reprocuce the bug
Comment 5 Florian Reisinger 2014-04-22 08:59:53 UTC
I am very sorry for this noise, but this is expected behaviour (if you think about it): Borders are, in the same way as the page margains drawn at the real (natural) borders of the page. A tabulator with 5cm is content right? Add 2 cm for the "Space to the content" from the border and you got the 7cm. So, it is desired behaviour....
Comment 6 a07cd040897db54e103c 2014-04-28 06:52:14 UTC
> I am very sorry for this noise, but this is expected behaviour (if you think
> about it): Borders are, in the same way as the page margains drawn at the
> real (natural) borders of the page. A tabulator with 5cm is content right?
> Add 2 cm for the "Space to the content" from the border and you got the 7cm.
> So, it is desired behaviour....

If you only think about it theoretically and light-minded you seem to be right, that the spacing should be added to the page margins. But if you think about it once more, you will see that the current behaviour ob setting tabstopps (by clicking the ruler) produces unexpected results.

It should never be "desired behaviour" to produce unexpected results (even if technically everything seems to be right).

You can turn it as you want: Either the calculation of the spacing is correct, then setting the tabstopps is erroneous. Or you might argue that creating the tabstopps ist correct, then the calculation of the spacing must be erroneous. Currently the calculation of the spacing and the function to set the tabstopps do *NOT* fit together.

I feel that the first case applies and the function to set tabstopps is wrong 'cause it does not expect that a border spacing > 0 can exist.
Comment 7 Tomaz Vajngerl 2014-05-21 08:44:35 UTC
I think this is a bug, yes - or at least something to inspect in the code.
Comment 8 QA Administrators 2015-06-08 14:41:37 UTC Comment hidden (obsolete)
Comment 9 a07cd040897db54e103c 2016-08-10 08:22:18 UTC Comment hidden (me-too)
Comment 10 a07cd040897db54e103c 2016-08-10 08:31:03 UTC Comment hidden (me-too)
Comment 11 a07cd040897db54e103c 2016-08-10 08:34:46 UTC Comment hidden (obsolete)
Comment 12 QA Administrators 2018-06-13 02:36:01 UTC Comment hidden (obsolete)
Comment 13 a07cd040897db54e103c 2018-06-20 14:44:29 UTC
retestet with

Version: 5.2.7.2 (x64)
Build-ID: 2b7f1e640c46ceb28adf43ee075a6e8b8439ed10
CPU-Threads: 10; BS-Version: Windows 6.1; UI-Render: Standard; 
Gebietsschema: de-DE (de_DE); Calc: group

=> problem still exists
Comment 14 a07cd040897db54e103c 2018-12-21 09:18:20 UTC
retestet with:

Version: 6.1.3.2
Build-ID: 1:6.1.3-2
CPU-Threads: 2; BS: Linux 4.18; UI-Render: Standard; VCL: x11; 
Gebietsschema: de-DE (de_DE.UTF-8); Calc: group threaded

and 

Version: 6.0.6.2 (x64)
Build-ID: 0c292870b25a325b5ed35f6b45599d2ea4458e77
CPU-Threads: 16; BS: Windows 6.1; UI-Render: Standard; 
Gebietsschema: de-DE (de_DE); Calc: group

=> problem still exists in both cases
Comment 15 QA Administrators 2020-12-21 03:43:53 UTC Comment hidden (obsolete)
Comment 16 QA Administrators 2022-12-22 03:36:16 UTC Comment hidden (obsolete)
Comment 17 a07cd040897db54e103c 2023-03-21 14:19:07 UTC
retested with:

Version: 7.0.4.2
Build ID: 00(Build:2)
CPU threads: 16; OS: Linux 5.10; UI render: default; VCL: gtk3
Locale: de-DE (de_DE.UTF-8); UI: de-DE
Debian package version: 1:7.0.4-4+deb11u4
Calc: threaded

=> problem still exists
Comment 18 a07cd040897db54e103c 2023-04-26 12:07:08 UTC
retested with:

Version: 7.4.5.1 / LibreOffice Community
Build ID: 40(Build:1)
CPU threads: 8; OS: Linux 6.1; UI render: default; VCL: gtk3
Locale: de-DE (de_DE.UTF-8); UI: de-DE
Debian package version: 4:7.4.5-2
Calc: threaded

=> problem is FIXED

Thank you!