Re: SwAutoCompleteWord

2013-06-05 Thread Tomaž Vajngerl
Hi Michael, Bjoern

On Tue, Jun 4, 2013 at 11:52 PM, Michael Stahl  wrote:

> hi Tomaž,
>
> i noticed that SwAutoCompleteWord appears to contain 2 different
> auto-complete mechanisms - an old vector m_WordList and a new
> m_LookupTree that was introduced a year ago; is there some
> ongoing work here?  can the old vector be removed?
>

Ah yes this is still a to-do. Currently you need both because LookupTree
does not implement an iteration through all words. You however need this
for the dialog - so a temporary solution then was to just use both for the
time being and put new words in both lists. I have forgot about this but
now you reminded me, I will take a look and implement iteration.


> regards,
>  michael



On Wed, Jun 5, 2013 at 12:15 AM, Bjoern Michaelsen <
bjoern.michael...@canonical.com> wrote:

> Hi there,
>
> sorry for shamelessly piggybacking:
>
> On Tue, Jun 04, 2013 at 11:52:49PM +0200, Michael Stahl wrote:
> > hi Tomaž,
> >
> > i noticed that SwAutoCompleteWord appears to contain 2 different
> > auto-complete mechanisms - an old vector m_WordList and a new
> > m_LookupTree that was introduced a year ago; is there some
> > ongoing work here?  can the old vector be removed?
>
> Oh, while we are at it:
>
> This fancy new lookup tree seems to cause this crasher/stacktrace:
>
>  https://bugs.launchpad.net/ubuntu/+source/libreoffice/+bug/1162191
>
> since LibreOffice 4.0~beta2, which was the first 4.0 release packaged for
> Ubuntu, causing some ~50 crashes on Ubuntu daily (second most common
> stacktrace
> for libreoffice right now).
>

This is pretty bad! There was already a bug report about this [1] but was
later closed.. so I did not look further into this. I will do a review of
the implementation, maybe I will spot the problem.


> Best,
>
> Bjoern
>

Regards, Tomaž

[1] https://bugs.freedesktop.org/show_bug.cgi?id=55315
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: SwAutoCompleteWord

2013-06-05 Thread Tomaž Vajngerl
On Wed, Jun 5, 2013 at 12:10 PM, Michael Stahl  wrote:

> looking at the backtrace it seems the m_pSuggest in some node is invalid
> and points into the woods
>
> i wonder what happens if the child node that is currently pointed to by
> m_pSuggest is somehow removed (via removeKey), does childHasChanged()
> handle this case?
> it's not obvious to me.
>

I am not sure.. however note that the only methods on LookupTree which are
used in auto-complete are "insert", "gotoNode" and "suggestAutoCompletion".
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: SwAutoCompleteWord

2013-06-11 Thread Tomaž Vajngerl
Hi Michael,

I implemented a simple Trie lookup tree which is  tailored to what we need
in auto-complete [1]. I was studying the LatinLookupTree but it is too
complex and I could not find the problem that causes it to crash in some
cases. Then I figured that implementing a simple, focused lookup tree
should not be too hard, so I did. This should fix the problem with crashes
(unless I made a mistake somewhere) and the problem with Ctrl-Tab word
cycle which was not implemented yet in LatinLookupTree.

Can you take a look and do a quick code review?

Thanks.

Regards, Tomaž

[1]
http://cgit.freedesktop.org/libreoffice/core/commit/?id=af3916f8ee5dbd5ccb3b8faca940b57ff2102d76
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice