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

--- Comment #16 from Justin L <[email protected]> ---
Comment 10 and comment 14 are good code pointers, showing that footnotes within
a range of hidden text are intentionally hidden.

Stepping back and looking at the big picture - normally if a paragraph is
hidden, you would want any attached things like comments or footnotes to also
hidden. So the concept in general makes sense. Rarely would anyone hide only a
footnote anchor in order to hide a footnote.

It would be rather difficult to specify an exception clause for this.  One
possible clause could be that if the hidden range contains only anchor
character and spaces, then don't hide the footnote. However, this kind of
"black box" implementation I'm sure would be frowned on.

 bool SwHiddenTextPortion::Format( SwTextFormatInfo &rInf )
 {
    const OUString sHidden = rInf.GetText().copy(rInf.GetIdx(), GetLen());
    bool bShowFootEndnotes = true;
    for (int i=0; i < sHidden.getLength(); ++i)
    {
        if ( sHidden[i] != 1 && sHidden[i] != ' ' )
        {
            bShowFootEndnotes = false;
            break;
        }
    }
     Width( 0 );
    if ( !bShowFootEndnotes )
        rInf.GetTextFrame()->HideFootnotes( rInf.GetIdx(), rInf.GetIdx() +
GetLen() );

     return false;
 };

For some reason, upon loading the document, the footnote is still hidden, even
with this change. Also, the field shaping isn't hidden.

I'm a bug fixer, not a developer, so I don't expect to continue much further on
this bug. There already is a right-click window for footnotes - perhaps an
invisible flag could be added to hide the anchor.

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to