Help in solving a bug in TOC

Michael Stahl mstahl at
Thu Mar 31 22:09:15 UTC 2016

On 29.03.2016 23:03, Mohamed Thabet wrote:
> Hello,
> I'm working on this bug
> Currently I want to add a tab separator after the number in the table of
> contents, but I can't get the correct tab stop position.
> My goal is to mimic the behaviour of normal numbered lists, so how can I
> determine the tab position?

hi Mohamed,

SwTextNode::GetLabelFollowedBy() to get the type of spacing.

SwTextNode::GetListTabStopPosition() would give a tab stop position but
i think it may be the wrong one for your case - we probably don't want
to apply a first-line indent of the paragraph to ToX entries.... and the
list style also may have indents which probably shouldn't be applied
either, although i'm less sure of that...

well i don't know the details of numbering well enough, the general idea
sounds right but it's not immediately obvious to me what exactly this
should do.


More information about the LibreOffice mailing list