[Libreoffice-bugs] [Bug 121618] VIEWING: When the document displays !broken!! instead of the correct text, writer can lock up

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Fri May 24 04:36:24 UTC 2019


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

--- Comment #12 from Luke Kendall <luke.kendall at gmail.com> ---
Huh - it appears that typing TAB executed a SAVE instead of inserting a tab. I
shouldn't be surprised.

What I was about to type was

if ( count < 0 || beginIndex < 0 || beginIndex + count > pFrom->length )
{
        assert(false); // fail fast at least in debug builds
        IMPL_RTL_STRINGNAME( newFromLiteral )( ppThis, "!!br0ken!!", 10, 0 );
        return;
}

should change to something like:

if ( count < 0 || beginIndex < 0 || beginIndex + count > pFrom->length )
{
        const static char *b1 = "!!br0ken!!(1.1)", *b2 = "!!br0ken!!(1.2)", *b3
= "!!br0ken!!(1.3)";
        assert(false); // fail fast at least in debug builds
        IMPL_RTL_STRINGNAME( newFromLiteral )( ppThis, (count < 0 ? b1 :
(beginIndex < 0 ? b2 : b3)), 10, 0 );
        return;
}

Instrumenting the code so an accurate user error report gives you more
information would in general make bug reporting and fixing easier for all
concerned.  It would probably be worth the effort to start gradually doing
that.

How great would it be to have semantic editors where you could instruct the
editor to look for semantics and adjust the code for you according to a
semantic restructuring pattern you described?  A programmer-assistive
technology still 50 years away, maybe? :-)

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20190524/4fc499f2/attachment-0001.html>


More information about the Libreoffice-bugs mailing list