https://bugs.documentfoundation.org/show_bug.cgi?id=155736

--- Comment #8 from Justin L <[email protected]> ---
(In reply to SATYA SRINIVAS K from comment #7) 
> Please let me know, if you have a direct answer or guess.
IIUC, this is a lot of hacky stuff, so it all could be dreadfully wrong. I
believe there was a lot of code changes/research into this area recently, and
some of it dealt with exceptions.
So, it will take a fair amount of work to try and wrap your mind around what
the code is doing here.
I suggest adding SAL_WARN statements when TOC starts and stops, when
Push/PopPageHeaderFooter, at Push/PopSdt, and when CloseSectionGroup so that
you get a feel for the flow of the code.

In general, we have a LOT of problems in writerfilter because we don't have a
stack. For example, you may be working in a paragraph, and then begin a content
control (which also has its own paragraph) which contains a shape (which also
has its own paragraph). So now, which of the writerfilter properties can you
believe? You can't trust the "this is the first paragraph in the section" or
pretty much any other property. Likely the same thing is true for m_bStartTOC.

I tried to create stack properties once, but failed because RTF format doesn't
track closely enough with DOCX (and they both share the same code).

But in this case you can probably say "since I am in a footer, I can ignore any
TOC flags because obviously I am not building a TOC right now". You will find
lots of IsInHeaderFooter() examples similar to this in writerfilter.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to