Date: prev next · Thread: first prev next last
2010 Archives by date, by thread · List index


On Wed, Nov 24, 2010 at 08:14:08AM +0100, Julien Nabet wrote:
Le 24/11/2010 08:11, Julien Nabet a écrit :
Date: Tue, 23 Nov 2010 22:20:36 -0500
From: Kohei Yoshida<kyoshida@novell.com>
Subject: Re: [Libreoffice] [PATCH] try to correct some timers in sc +
    question
To:libreoffice@lists.freedesktop.org
Message-ID:<1290568836.2532.14.camel@localhost>
Content-Type: text/plain; charset="UTF-8"

Hi Julien,

On Sat, 2010-11-20 at 01:19 +0100, Julien Nabet wrote:
 Hello,
 >  Here's a try to correct some timers in scmod.cxx.
 Here's what I did and why.
 >  1) In IMPL_LINK( ScModule, SpellTimerHdl, Timer*, EMPTYARG
)
 I just added aSpellTimer.Stop() when there's neither input from keyboard
 nor ContinueOnlineSpelling.
 + I changed the function to have 1 return only.
 >  2) In IMPL_LINK( ScModule, IdleHandler, Timer*, EMPTYARG )
 I removed all the things with bSpell since it seems that
 ContinueOnlineSpelling is managed by SpellTimerHdl
 I'd like to add a stop but i'd like first to understand what's the use
 of all the SC_IDLE_STEP, SC_IDLE_MAX, nIdleCount...
 >  I repeat, this patch is just a try. If I'm all wrong,
sorry for the
 noise and please, explain my mistakes.
Well, I applaud your attempt to challenge this rather difficult task,
and sorry it took me so long to get back to you.

I took a closer look at this issue, and while I don't yet have a
complete picture of how this can be fixed, I can at least see that the
problem is not with the spell check timer, but the idle timer.  The
spell check timer itself actually turns itself off rather nicely after
it does what it needs.  The idle timer, OTOH, keeps on running pretty
much forever.  I guess my previous comment about the spell check timer
may have given you the wrong impression.  Sorry about that.

So, let's not change the spell check timer since it doesn't look broken,
and let's focus on fixing the idle timer itself.

Hello,

To know how to fix the idle timer I'd like first understand well how
it works since it seems to be simpler than idletimer. Could you tell
me when and how the spelltimer is stopped ? (I haven't seen where it
had a stop).

Julien.


Hi Julien,

a timer is stopped after it expired, unless it's explicitly restarted or
unless it's an auto timer (see Timer::ImplTimerCallbackProc in
vcl/source/app/timer.cxx). If you look at sc/source/ui/app/scmod.cxx,
you see that aSpellTimer is only restared (in SpellTimerHdl) if there is
a fresh keyboard input or if spell checking of the whole sheet hasn't
been finished yet, but aIdleTimer is restarted (in IdleHandler)
unconditionally.

HTH,

D.

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.