Bug 149259 - After updating a Table Of Contents, text alignment of toc entries is not preserved (related to alignment of tab stop)
Summary: After updating a Table Of Contents, text alignment of toc entries is not pres...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.3.3.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: TableofContents-Indexes
  Show dependency treegraph
 
Reported: 2022-05-24 10:30 UTC by Jambunathan K
Modified: 2024-06-06 03:17 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Note that TOC content doesn't use any automatic styles; Also the text is NOT IN SYNC with the template (17.73 KB, application/vnd.oasis.opendocument.text)
2022-05-24 10:30 UTC, Jambunathan K
Details
How the document looks when it is loaded in to LibreOffice (140.85 KB, image/png)
2022-05-24 10:31 UTC, Jambunathan K
Details
How the documnet looks after update of TOC. Note that text is left aligned (when it should be right aligned) (133.39 KB, image/png)
2022-05-24 10:32 UTC, Jambunathan K
Details
Contents 1 is right aligned (40.39 KB, image/png)
2022-05-24 10:44 UTC, Jambunathan K
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jambunathan K 2022-05-24 10:30:05 UTC
Created attachment 180327 [details]
Note that TOC content doesn't use any automatic styles; Also the text is NOT IN SYNC with the template

1.  Open the attached document.  See the TOC is right aligned, and it doesn't have page numbers.
2. Right Click on TOC -> Update Index. 
3. TOC now will have page numbers because the TOC template requests it.   But why does the entry have left alignment as opposed to right alignment?


See screen shot for details.

$ dpkg -l | grep libreoffice | grep writer
ii  libreoffice-writer                                 1:7.3.3~rc2-1  

Version: 7.3.3.2 / LibreOffice Community
Build ID: 30(Build:2)
CPU threads: 4; OS: Linux 5.17; UI render: default; VCL: x11
Locale: en-IN (en_IN); UI: en-US
Debian package version: 1:7.3.3~rc2-1
Calc: threaded
Comment 1 Jambunathan K 2022-05-24 10:31:00 UTC
Created attachment 180328 [details]
How the document looks when it is loaded in to LibreOffice
Comment 2 Jambunathan K 2022-05-24 10:32:21 UTC
Created attachment 180329 [details]
How the documnet looks after update of TOC.  Note that text is left aligned (when it should be right aligned)
Comment 3 Jambunathan K 2022-05-24 10:41:56 UTC
This is how TOC template looks like  ....

Note that Contents_20_1 etc inherit from the default paragraph style ... which requests right aligned text.  See screenshot.


<text:table-of-content text:style-name="OrgIndexSection"
                       text:name="Table of Contents"
                       text:protected="false">
  <text:table-of-content-source text:index-scope="document"
				text:outline-level="3"
				text:use-index-source-styles="true"
				text:use-outline-level="false">
    <text:index-title-template text:style-name="Contents_20_Heading">
    Table of Contents</text:index-title-template>
    <text:table-of-content-entry-template text:style-name="Contents_20_1"
					  text:outline-level="1">
      <text:index-entry-link-start text:style-name="Index_20_Link" />
      <text:index-entry-chapter />
      <text:index-entry-text />
      <text:index-entry-tab-stop style:leader-char="."
				 style:type="right" />
      <text:index-entry-page-number />
      <text:index-entry-link-end />
    </text:table-of-content-entry-template>
    <text:table-of-content-entry-template text:style-name="Contents_20_2"
					  text:outline-level="2">
      <text:index-entry-link-start text:style-name="Index_20_Link" />
      <text:index-entry-chapter />
      <text:index-entry-text />
      <text:index-entry-tab-stop style:leader-char="."
				 style:type="right" />
      <text:index-entry-page-number />
      <text:index-entry-link-end />
    </text:table-of-content-entry-template>

    <!-- snipped -->
    <text:index-source-styles text:outline-level="1">
      <text:index-source-style text:style-name="Heading_20_1" />
    </text:index-source-styles>
    <text:index-source-styles text:outline-level="2">
      <text:index-source-style text:style-name="Heading_20_2" />
    </text:index-source-styles>
    <text:index-source-styles text:outline-level="3">
      <text:index-source-style text:style-name="Heading_20_3" />
    </text:index-source-styles>
  </text:table-of-content-source>
  <text:index-body>
    <text:index-title text:style-name="OrgIndexSection"
                      text:name="Table of Contents1_Head">
      <text:p text:style-name="Contents_20_Heading">Table of
      Contents</text:p>
    </text:index-title>
    <text:p text:style-name="Contents_20_1">
      <text:a xlink:href="#org2dbeb53"
              xlink:type="simple">1. Align all paragraphs to the
      Right</text:a>
    </text:p>
    <!-- snipped -->
  </text:index-body>
</text:table-of-content>
Comment 4 Jambunathan K 2022-05-24 10:44:02 UTC
Created attachment 180330 [details]
Contents 1 is right aligned
Comment 5 Dieter 2022-06-06 10:30:32 UTC
I confirm the behaviour with

Version: 7.3.4.1 (x64) / LibreOffice Community
Build ID: 13668373362b52f6e3ebcaaecb031bd59a3ac66b
CPU threads: 4; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: en-GB
Calc: CL

How to solve the problem
1. Edit Index => Enries
2. In structure click on "T" and deselect "Align right" -> O.K.

I'm not sure for 100%, if this is the correct behaviour (for me it is not) or a bug. Help [1] isn't helpful here.

But in a right aligned paragraph, there shouldn't be a different, if tab stop is aligned right or not.

[1] https://help.libreoffice.org/7.3/en-GB/text/swriter/01/04120221.html?&DbPAR=WRITER&System=WIN
Comment 6 QA Administrators 2024-06-06 03:17:27 UTC
Dear Jambunathan K,

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information from Help - About LibreOffice.
 
If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice.

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not 
appropriate in this case)


If you want to do more to help you can test to see if your issue is a REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from https://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword


Feel free to come ask questions or to say hello in our QA chat: https://web.libera.chat/?settings=#libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team

MassPing-UntouchedBug