[Libreoffice-commits] core.git: include/vcl vcl/source

2015-05-14 Thread Tobias Madl
 include/vcl/scheduler.hxx|1 +
 vcl/source/app/scheduler.cxx |2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

New commits:
commit b6044f76405cdf2a956d2c429d5d29f4c711363c
Author: Tobias Madl tobias.madl@gmail.com
Date:   Wed May 6 08:34:28 2015 +

Scheduler: Deactivate task without deletion

Now a task can be temporary deactivatet, without deletion.

Change-Id: Ie72f0fe0e1529e2216271a3ae73be1c406947dec
Reviewed-on: https://gerrit.libreoffice.org/15640
Reviewed-by: Caolán McNamara caol...@redhat.com
Tested-by: Caolán McNamara caol...@redhat.com

diff --git a/include/vcl/scheduler.hxx b/include/vcl/scheduler.hxx
index da3fb1f..5ce31e2 100644
--- a/include/vcl/scheduler.hxx
+++ b/include/vcl/scheduler.hxx
@@ -76,6 +76,7 @@ public:
 virtual voidStop();
 
 boolIsActive() const { return mbActive; }
+voidSetInActive() { mbActive = false; }
 
 Scheduler  operator=( const Scheduler rScheduler );
 static void ImplDeInitScheduler();
diff --git a/vcl/source/app/scheduler.cxx b/vcl/source/app/scheduler.cxx
index a213fe2..20b11dc 100644
--- a/vcl/source/app/scheduler.cxx
+++ b/vcl/source/app/scheduler.cxx
@@ -47,7 +47,7 @@ ImplSchedulerData *ImplSchedulerData::GetMostImportantTask( 
bool bTimer )
 for ( ImplSchedulerData *pSchedulerData = pSVData-mpFirstSchedulerData; 
pSchedulerData; pSchedulerData = pSchedulerData-mpNext )
 {
 if ( !pSchedulerData-mpScheduler || pSchedulerData-mbDelete || 
pSchedulerData-mnUpdateStack = pSVData-mnUpdateStack
-|| !pSchedulerData-mpScheduler-ReadyForSchedule( bTimer ) )
+|| !pSchedulerData-mpScheduler-ReadyForSchedule( bTimer ) || 
!pSchedulerData-mpScheduler-IsActive())
 continue;
 if (!pMostUrgent)
 pMostUrgent = pSchedulerData;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: [Libreoffice-commits] Adapt SwSrcEditWindow's SyntaxTimerHdl to being used in an Idle now

2015-05-06 Thread Tobias Madl
Patch in Gerrit: 5a142827fb945408c51725b31ebc1ded13a2d9c5

On Wed, May 6, 2015 at 10:03 AM, Tobias Madl tobias.madl@gmail.com
wrote:

 So yeah SetTimeout should be deletet, but it should be replaced with
 SetPriority (and of course set with an appropriate Priority), because
 otherwise it gets the default priority: HIGH.

 The taks should be stopped if there is absolutely no more work to do. If
 stop is called it gets completely removed of the tasklist. So if you think
 that it has no more work todo you can stop it by yourself.

 But i think i get your point, because i see that i missed to ask if the
 task is active (i only check if it should be delete). I wil change this and
 then you could set the task as inactive if you think that for now it has no
 more work to do and if it comes to the position:


   if (... !pIdle-IsActive()) pIdle-Start();

 it should be reactivatet.

 On Tue, May 5, 2015 at 11:46 AM, Stephan Bergmann sberg...@redhat.com
 wrote:

 I assume deleting the SetTimeout calls without replacement is fine, as
 the idle handler will automatically keep being called again?

 But then, is it OK that it only ever gets Stop()'ed in
 SwSrcEditWindow::dispose, or should it also stop itself when there's no
 more work to do?

 And is it necessary to do that

   if (... !pIdle-IsActive()) pIdle-Start();

 thing from within the handler?

 On 05/05/2015 10:22 AM, Stephan Bergmann wrote:

 commit c0e209bf5f418f1564d16e234251783a0857a9d4
 Author: Stephan Bergmann sberg...@redhat.com
 Date:   Tue May 5 10:16:43 2015 +0200

  Adapt SwSrcEditWindow's SyntaxTimerHdl to being used in an Idle now

  ...not a Timer, since d843f3de731667a298a83fc66637c7f983f3b24d
 changed timers
  to idle

  Change-Id: If8c6a52d6fb7b1e392e8f31bc8f0db22b2f049e1

 diff --git a/sw/source/uibase/docvw/srcedtw.cxx
 b/sw/source/uibase/docvw/srcedtw.cxx
 index cd66ace..02e1e66 100644
 --- a/sw/source/uibase/docvw/srcedtw.cxx
 +++ b/sw/source/uibase/docvw/srcedtw.cxx
 @@ -56,7 +56,6 @@ struct SwTextPortion

   #define MAX_SYNTAX_HIGHLIGHT 20
   #define MAX_HIGHLIGHTTIME 200
 -#define SYNTAX_HIGHLIGHT_TIMEOUT 200

   typedef std::dequeSwTextPortion SwTextPortions;

 @@ -579,7 +578,7 @@ IMPL_LINK(SwSrcEditWindow, ScrollHdl, ScrollBar*,
 pScroll)
   return 0;
   }

 -IMPL_LINK( SwSrcEditWindow, SyntaxTimerHdl, Timer *, pTimer )
 +IMPL_LINK( SwSrcEditWindow, SyntaxTimerHdl, Idle *, pIdle )
   {
   tools::Time aSyntaxCheckStart( tools::Time::SYSTEM );
   SAL_WARN_IF(pTextView == 0, sw, No View yet, but syntax
 highlighting?!);
 @@ -605,7 +604,6 @@ IMPL_LINK( SwSrcEditWindow, SyntaxTimerHdl, Timer *,
 pTimer )
   break;
   if((tools::Time( tools::Time::SYSTEM ).GetTime() -
 aSyntaxCheckStart.GetTime())  MAX_HIGHLIGHTTIME )
   {
 -pTimer-SetTimeout( 2 * SYNTAX_HIGHLIGHT_TIMEOUT );
   break;
   }
   }
 @@ -620,13 +618,12 @@ IMPL_LINK( SwSrcEditWindow, SyntaxTimerHdl, Timer
 *, pTimer )
   nCount ++;
   if(tools::Time( tools::Time::SYSTEM ).GetTime() -
 aSyntaxCheckStart.GetTime()  MAX_HIGHLIGHTTIME)
   {
 -pTimer-SetTimeout( 2 * SYNTAX_HIGHLIGHT_TIMEOUT );
   break;
   }
   }

 -if(!aSyntaxLineTable.empty()  !pTimer-IsActive())
 -pTimer-Start();
 +if(!aSyntaxLineTable.empty()  !pIdle-IsActive())
 +pIdle-Start();
   // SyntaxTimerHdl is called when text changed
   // = good opportunity to determine text width!
   long nPrevTextWidth = nCurTextWidth;
 diff --git a/sw/source/uibase/inc/srcedtw.hxx
 b/sw/source/uibase/inc/srcedtw.hxx
 index 823e3cd..55e53f4 100644
 --- a/sw/source/uibase/inc/srcedtw.hxx
 +++ b/sw/source/uibase/inc/srcedtw.hxx
 @@ -95,7 +95,7 @@ private:
   using OutputDevice::SetFont;
   voidSetFont();

 -DECL_LINK( SyntaxTimerHdl, Timer * );
 +DECL_LINK( SyntaxTimerHdl, Idle * );
   DECL_LINK( TimeoutHdl, Timer * );

   using Window::Notify;




___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice-commits] Adapt SwSrcEditWindow's SyntaxTimerHdl to being used in an Idle now

2015-05-06 Thread Tobias Madl
So yeah SetTimeout should be deletet, but it should be replaced with
SetPriority (and of course set with an appropriate Priority), because
otherwise it gets the default priority: HIGH.

The taks should be stopped if there is absolutely no more work to do. If
stop is called it gets completely removed of the tasklist. So if you think
that it has no more work todo you can stop it by yourself.

But i think i get your point, because i see that i missed to ask if the
task is active (i only check if it should be delete). I wil change this and
then you could set the task as inactive if you think that for now it has no
more work to do and if it comes to the position:


  if (... !pIdle-IsActive()) pIdle-Start();

it should be reactivatet.

On Tue, May 5, 2015 at 11:46 AM, Stephan Bergmann sberg...@redhat.com
wrote:

 I assume deleting the SetTimeout calls without replacement is fine, as the
 idle handler will automatically keep being called again?

 But then, is it OK that it only ever gets Stop()'ed in
 SwSrcEditWindow::dispose, or should it also stop itself when there's no
 more work to do?

 And is it necessary to do that

   if (... !pIdle-IsActive()) pIdle-Start();

 thing from within the handler?

 On 05/05/2015 10:22 AM, Stephan Bergmann wrote:

 commit c0e209bf5f418f1564d16e234251783a0857a9d4
 Author: Stephan Bergmann sberg...@redhat.com
 Date:   Tue May 5 10:16:43 2015 +0200

  Adapt SwSrcEditWindow's SyntaxTimerHdl to being used in an Idle now

  ...not a Timer, since d843f3de731667a298a83fc66637c7f983f3b24d
 changed timers
  to idle

  Change-Id: If8c6a52d6fb7b1e392e8f31bc8f0db22b2f049e1

 diff --git a/sw/source/uibase/docvw/srcedtw.cxx
 b/sw/source/uibase/docvw/srcedtw.cxx
 index cd66ace..02e1e66 100644
 --- a/sw/source/uibase/docvw/srcedtw.cxx
 +++ b/sw/source/uibase/docvw/srcedtw.cxx
 @@ -56,7 +56,6 @@ struct SwTextPortion

   #define MAX_SYNTAX_HIGHLIGHT 20
   #define MAX_HIGHLIGHTTIME 200
 -#define SYNTAX_HIGHLIGHT_TIMEOUT 200

   typedef std::dequeSwTextPortion SwTextPortions;

 @@ -579,7 +578,7 @@ IMPL_LINK(SwSrcEditWindow, ScrollHdl, ScrollBar*,
 pScroll)
   return 0;
   }

 -IMPL_LINK( SwSrcEditWindow, SyntaxTimerHdl, Timer *, pTimer )
 +IMPL_LINK( SwSrcEditWindow, SyntaxTimerHdl, Idle *, pIdle )
   {
   tools::Time aSyntaxCheckStart( tools::Time::SYSTEM );
   SAL_WARN_IF(pTextView == 0, sw, No View yet, but syntax
 highlighting?!);
 @@ -605,7 +604,6 @@ IMPL_LINK( SwSrcEditWindow, SyntaxTimerHdl, Timer *,
 pTimer )
   break;
   if((tools::Time( tools::Time::SYSTEM ).GetTime() -
 aSyntaxCheckStart.GetTime())  MAX_HIGHLIGHTTIME )
   {
 -pTimer-SetTimeout( 2 * SYNTAX_HIGHLIGHT_TIMEOUT );
   break;
   }
   }
 @@ -620,13 +618,12 @@ IMPL_LINK( SwSrcEditWindow, SyntaxTimerHdl, Timer
 *, pTimer )
   nCount ++;
   if(tools::Time( tools::Time::SYSTEM ).GetTime() -
 aSyntaxCheckStart.GetTime()  MAX_HIGHLIGHTTIME)
   {
 -pTimer-SetTimeout( 2 * SYNTAX_HIGHLIGHT_TIMEOUT );
   break;
   }
   }

 -if(!aSyntaxLineTable.empty()  !pTimer-IsActive())
 -pTimer-Start();
 +if(!aSyntaxLineTable.empty()  !pIdle-IsActive())
 +pIdle-Start();
   // SyntaxTimerHdl is called when text changed
   // = good opportunity to determine text width!
   long nPrevTextWidth = nCurTextWidth;
 diff --git a/sw/source/uibase/inc/srcedtw.hxx
 b/sw/source/uibase/inc/srcedtw.hxx
 index 823e3cd..55e53f4 100644
 --- a/sw/source/uibase/inc/srcedtw.hxx
 +++ b/sw/source/uibase/inc/srcedtw.hxx
 @@ -95,7 +95,7 @@ private:
   using OutputDevice::SetFont;
   voidSetFont();

 -DECL_LINK( SyntaxTimerHdl, Timer * );
 +DECL_LINK( SyntaxTimerHdl, Idle * );
   DECL_LINK( TimeoutHdl, Timer * );

   using Window::Notify;



___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Information about our work on Libreoffice

2015-04-04 Thread Tobias Madl
Thanks for your email Juergen or i will try to fix this.

regards

Tobi

On Fri, Apr 3, 2015 at 11:00 AM, Caolán McNamara caol...@redhat.com wrote:

 On Wed, 2015-03-11 at 17:54 +0100, Tobias Madl wrote:
  That is all I can think of atm. One last request of mine would be,
  that if someone discovers some weird behavior or some windows, that
  are not loading or flicker, please contact me and I will look over it
  and try to fix it.

 writer: insert-index and tables-index and tables. The button area
 isn't drawn correctly for some reason.

 C.



___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Information about our work on Libreoffice

2015-03-23 Thread Tobias Madl
Hi Miklos,

atm i'm still very busy with the work at university, so for the next few
days i will not be able to look over it. Maybe Jürgen could have a look.
Otherwise i think you should do a bugreport, so people know about it. If i
can manage to get some spare time, i will try to solve this issue.

Thanks for your patience and efforts

regards

Tobi

On Mon, Mar 23, 2015 at 4:40 PM, Miklos Vajna vmik...@collabora.co.uk
wrote:

 Hi Tobias,

 On Sun, Mar 15, 2015 at 11:40:28AM +0100, Miklos Vajna 
 vmik...@collabora.co.uk wrote:
  Thanks for the recent improvements, the current master is much better
  than what it was right after the merge. :-)
 
  With bcefd5cda926f86db16b1bcf6838431b5b0d61b5 I still see one problem,
  though:
 
  1) Start Writer.
 
  2) Press F11 to open the styles sidebar
 
  3) Right-click on e.g. heading 1, and select modify - repaint problem.
 
  Screenshot:
 
  http://people.freedesktop.org/~vmiklos/2015/heading1-repaint-problem.png

 This is still a problem -- please let me know if you prefer a bugreport
 instead.

 Thanks,

 Miklos

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Information about our work on Libreoffice

2015-03-12 Thread Tobias Madl
Hello everyone,

As you may heard before, Jennifer (Liebel) and me changed the current
mainloop task handling. We didn't want to leave you in the dark and wanted
to tell you some differences to the previous behaviour.

First of all, there are two types of tasks now. We have idle tasks, which
don't have a waiting period and we have timer tasks which wait a specified
amount of time. If somebody creates a new task, he has to decide the type. If
it's a timer it should be given a timeout and a priority (priority list is
in core/include/vcl/scheduler.hxx) and if it's an idle it only needs a
priority.

There is also another little optimization, because we want to get rid of
the callback links, in these tasks or in more detail, get rid of the whole
callback thing. So it would be awesome not to pass a link anymore, but
sub-class the Timer and override the method “Invoke”.

There should be filed an hack about adapting the current task priorities.
Jenny and me tried to declare idle priorities without timer priorities. At
one point in the future developers have to watch over these tasks, timers
as well as idle and define new or better priorities. (list of almost all
tasks:
https://wiki.documentfoundation.org/Development/LHM_LiMux/Main_Loop#Timers_used_at_the_moment
)

That is all I can think of atm. One last request of mine would be, that if
someone discovers some weird behavior or some windows, that are not loading
or flicker, please contact me and I will look over it and try to fix it.
Because most of the time it's some dependencies among some tasks, which
should be resolved. (Contact: tobias.madl@gmail.com )

Thank you in advance for all your efforts and have a nice day

regards

Tobias
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: svx/source

2015-03-10 Thread Tobias Madl
 svx/source/dialog/srchdlg.cxx |   10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 5b517719e894a179ee5df64fe5e56e26398e8512
Author: Tobias Madl tobias.madl@gmail.com
Date:   Tue Mar 10 14:05:49 2015 +

Idle/Timer: reverted idle to timer

This task waits for user io.

Change-Id: Id5b3725b316f1bbd73e94d5368bc0d5c7d057189

diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx
index 2b03bbc..8e4d3c6 100644
--- a/svx/source/dialog/srchdlg.cxx
+++ b/svx/source/dialog/srchdlg.cxx
@@ -22,7 +22,7 @@
 #include vcl/wrkwin.hxx
 #include vcl/morebtn.hxx
 #include vcl/msgbox.hxx
-#include vcl/idle.hxx
+#include vcl/timer.hxx
 #include svl/slstitm.hxx
 #include svl/itemiter.hxx
 #include svl/style.hxx
@@ -111,7 +111,7 @@ struct SearchDlg_Impl
 boolbSaveToModule  : 1,
 bFocusOnSearch : 1;
 sal_uInt16* pRanges;
-IdleaSelectionIdle;
+Timer   aSelectionTimer;
 
 uno::Reference frame::XDispatch  xCommand1Dispatch;
 uno::Reference frame::XDispatch  xCommand2Dispatch;
@@ -365,8 +365,8 @@ void SvxSearchDialog::Construct_Impl()
 {
 // temporary to avoid incompatibility
 pImpl = new SearchDlg_Impl();
-pImpl-aSelectionIdle.SetPriority( SchedulerPriority::LOWEST );
-pImpl-aSelectionIdle.SetIdleHdl(
+pImpl-aSelectionTimer.SetTimeout( 500 );
+pImpl-aSelectionTimer.SetTimeoutHdl(
 LINK( this, SvxSearchDialog, TimeoutHdl_Impl ) );
 EnableControls_Impl( 0 );
 
@@ -409,7 +409,7 @@ void SvxSearchDialog::Construct_Impl()
 new SvxSearchController( SID_SEARCH_OPTIONS, rBindings, *this );
 rBindings.LeaveRegistrations();
 rBindings.GetDispatcher()-Execute( FID_SEARCH_ON, SfxCallMode::SLOT, 
ppArgs );
-pImpl-aSelectionIdle.Start();
+pImpl-aSelectionTimer.Start();
 
 
 SvtCJKOptions aCJKOptions;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: vcl/source

2015-03-10 Thread Tobias Madl
 vcl/source/app/scheduler.cxx |2 +-
 vcl/source/app/timer.cxx |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 0a5c1be22a88094018e2741b38d743800018ca5e
Author: Tobias Madl tobias.madl@gmail.com
Date:   Tue Mar 10 08:08:21 2015 +

Scheduler: replaced max cast with SAL_MAX_UINT64

Change-Id: I9e8d5863c31187b373ff93d5a6e992a1281220b4

diff --git a/vcl/source/app/scheduler.cxx b/vcl/source/app/scheduler.cxx
index 56eaf12..8162332 100644
--- a/vcl/source/app/scheduler.cxx
+++ b/vcl/source/app/scheduler.cxx
@@ -23,7 +23,7 @@
 #include vcl/timer.hxx
 #include saltimer.hxx
 
-#define MAX_TIMER_PERIOD((sal_uInt64)0x)
+#define MAX_TIMER_PERIODSAL_MAX_UINT64
 
 void ImplSchedulerData::Invoke()
 {
diff --git a/vcl/source/app/timer.cxx b/vcl/source/app/timer.cxx
index 7e631d1..6c1724e 100644
--- a/vcl/source/app/timer.cxx
+++ b/vcl/source/app/timer.cxx
@@ -23,7 +23,7 @@
 #include svdata.hxx
 #include salinst.hxx
 
-#define MAX_TIMER_PERIOD((sal_uInt64)0x)
+#define MAX_TIMER_PERIOD   SAL_MAX_UINT64
 
 void Timer::ImplStartTimer( ImplSVData* pSVData, sal_uInt64 nMS )
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: include/vcl

2015-03-09 Thread Tobias Madl
 include/vcl/scheduler.hxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 5748d6bad2e16673bed50374a7d8e1f4ba0fc7fc
Author: Tobias Madl tobias.madl@gmail.com
Date:   Mon Mar 9 16:08:09 2015 +

Scheduler: wrong priority order

Change-Id: Ia2a50922fdfe07ff452bcc78b973d5d4943a128c

diff --git a/include/vcl/scheduler.hxx b/include/vcl/scheduler.hxx
index fc3668e..da3fb1f 100644
--- a/include/vcl/scheduler.hxx
+++ b/include/vcl/scheduler.hxx
@@ -41,8 +41,8 @@ struct ImplSchedulerData
 enum class SchedulerPriority {
 HIGHEST   = 0,
 HIGH  = 1,
-REPAINT   = 2,
-RESIZE= 3,
+RESIZE= 2,
+REPAINT   = 3,
 MEDIUM= 3,
 LOW   = 4,
 LOWER = 5,
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: include/vcl vcl/inc vcl/source

2015-03-09 Thread Tobias Madl
 include/vcl/scheduler.hxx|6 +++---
 include/vcl/timer.hxx|   12 ++--
 vcl/inc/svdata.hxx   |4 ++--
 vcl/source/app/scheduler.cxx |8 
 vcl/source/app/timer.cxx |   12 ++--
 5 files changed, 21 insertions(+), 21 deletions(-)

New commits:
commit 9c7016b5b530ca212b1275f44f9e2fc0527109ee
Author: Tobias Madl tobias.madl@gmail.com
Date:   Mon Mar 9 08:44:26 2015 +

Scheduler: Changed uLong to uInt32/uInt64

Change-Id: Ic60463027c7f1b2d513539adba834b8d8e0ce6d3

diff --git a/include/vcl/scheduler.hxx b/include/vcl/scheduler.hxx
index 1e7b3ed..fc3668e 100644
--- a/include/vcl/scheduler.hxx
+++ b/include/vcl/scheduler.hxx
@@ -30,8 +30,8 @@ struct ImplSchedulerData
 Scheduler*  mpScheduler;  // Pointer to VCL Scheduler instance
 boolmbDelete;// Destroy this scheduler?
 boolmbInScheduler;// Scheduler currently processed?
-sal_uLong   mnUpdateTime;   // Last Update Time
-sal_uLong   mnUpdateStack;  // Update Stack
+sal_uInt64  mnUpdateTime;   // Last Update Time
+sal_uInt32  mnUpdateStack;  // Update Stack
 
 void Invoke();
 
@@ -59,7 +59,7 @@ protected:
 friend struct ImplSchedulerData;
 virtual void SetDeletionFlags();
 virtual bool ReadyForSchedule( bool bTimer ) { return !bTimer; }
-virtual sal_uLong UpdateMinPeriod( sal_uLong nMinPeriod, sal_uLong nTime );
+virtual sal_uInt64 UpdateMinPeriod( sal_uInt64 nMinPeriod, sal_uInt64 
nTime );
 
 public:
 Scheduler();
diff --git a/include/vcl/timer.hxx b/include/vcl/timer.hxx
index e2fd4a7..d671919 100644
--- a/include/vcl/timer.hxx
+++ b/include/vcl/timer.hxx
@@ -27,12 +27,12 @@ class VCL_DLLPUBLIC Timer : public Scheduler
 {
 protected:
 LinkmaTimeoutHdl;  // Callback Link
-sal_uLong   mnTimeout;
+sal_uInt64  mnTimeout;
 boolmbAuto;
 
 virtual void SetDeletionFlags() SAL_OVERRIDE;
 virtual bool ReadyForSchedule( bool bTimer ) SAL_OVERRIDE;
-virtual sal_uLong UpdateMinPeriod( sal_uLong nMinPeriod, sal_uLong nTime ) 
SAL_OVERRIDE;
+virtual sal_uInt64 UpdateMinPeriod( sal_uInt64 nMinPeriod, sal_uInt64 
nTime ) SAL_OVERRIDE;
 
 public:
 Timer();
@@ -42,13 +42,13 @@ public:
 /// of course, you can also sub-class and override 'Invoke'
 voidSetTimeoutHdl( const Link rLink ) { maTimeoutHdl = rLink; 
}
 const Link GetTimeoutHdl() const { return maTimeoutHdl; }
-voidSetTimeout( sal_uLong nTimeoutMs );
-sal_uLong   GetTimeout() const { return mnTimeout; }
+voidSetTimeout( sal_uInt64 nTimeoutMs );
+sal_uInt64  GetTimeout() const { return mnTimeout; }
 virtual voidInvoke() SAL_OVERRIDE;
 voidTimeout() { Invoke(); }
 Timer  operator=( const Timer rTimer );
-virtual voidStart() SAL_OVERRIDE;
-static void ImplStartTimer( ImplSVData* pSVData, sal_uLong nMS );
+virtual voidStart() SAL_OVERRIDE;
+static void ImplStartTimer( ImplSVData* pSVData, sal_uInt64 nMS );
 };
 
 /// An auto-timer is a multi-shot timer re-emitting itself at
diff --git a/vcl/inc/svdata.hxx b/vcl/inc/svdata.hxx
index 967f3df..3b04e76f 100644
--- a/vcl/inc/svdata.hxx
+++ b/vcl/inc/svdata.hxx
@@ -316,8 +316,8 @@ struct ImplSVData
 SalI18NImeStatus*   mpImeStatus;// interface to 
ime status window
 SalSystem*  mpSalSystem;// SalSystem 
interface
 ResMgr* mpResMgr;   // 
SV-Resource-Manager
-sal_uLong   mnTimerPeriod;  // current timer 
period
-sal_uLong   mnUpdateStack;  // Scheduler on 
stack
+sal_uInt64  mnTimerPeriod;  // current timer 
period
+sal_uInt32  mnUpdateStack;  // Scheduler on 
stack
 ImplSVAppData   maAppData;  // indepen data 
for class Application
 ImplSVGDIData   maGDIData;  // indepen data 
for Output classes
 ImplSVWinData   maWinData;  // indepen data 
for Windows classes
diff --git a/vcl/source/app/scheduler.cxx b/vcl/source/app/scheduler.cxx
index 5a0061f..56eaf12 100644
--- a/vcl/source/app/scheduler.cxx
+++ b/vcl/source/app/scheduler.cxx
@@ -23,7 +23,7 @@
 #include vcl/timer.hxx
 #include saltimer.hxx
 
-#define MAX_TIMER_PERIOD((sal_uLong)0x)
+#define MAX_TIMER_PERIOD((sal_uInt64)0x)
 
 void ImplSchedulerData::Invoke()
 {
@@ -116,8 +116,8 @@ void Scheduler::ProcessTaskScheduling( bool bTimer )
 ImplSchedulerData* pSchedulerData = NULL;
 ImplSchedulerData* pPrevSchedulerData = NULL;
 ImplSVData*pSVData = ImplGetSVData();
-sal_uLong  nTime = tools::Time::GetSystemTicks

[Libreoffice-commits] core.git: include/vcl

2015-03-06 Thread Tobias Madl
 include/vcl/timer.hxx |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit e7c2b4b981b9b43c31fa442d5596b7a765dbe699
Author: Tobias Madl tobias.madl@gmail.com
Date:   Fri Mar 6 15:45:03 2015 +0100

Timer: added virtual before definition

Change-Id: Ief4da1f1241fc4175f5ad132fd103e6d29470b58

diff --git a/include/vcl/timer.hxx b/include/vcl/timer.hxx
index 004e78c..e2fd4a7 100644
--- a/include/vcl/timer.hxx
+++ b/include/vcl/timer.hxx
@@ -30,9 +30,9 @@ protected:
 sal_uLong   mnTimeout;
 boolmbAuto;
 
-void SetDeletionFlags() SAL_OVERRIDE;
-bool ReadyForSchedule( bool bTimer ) SAL_OVERRIDE;
-sal_uLong UpdateMinPeriod( sal_uLong nMinPeriod, sal_uLong nTime ) 
SAL_OVERRIDE;
+virtual void SetDeletionFlags() SAL_OVERRIDE;
+virtual bool ReadyForSchedule( bool bTimer ) SAL_OVERRIDE;
+virtual sal_uLong UpdateMinPeriod( sal_uLong nMinPeriod, sal_uLong nTime ) 
SAL_OVERRIDE;
 
 public:
 Timer();
@@ -47,7 +47,7 @@ public:
 virtual voidInvoke() SAL_OVERRIDE;
 voidTimeout() { Invoke(); }
 Timer  operator=( const Timer rTimer );
-voidStart() SAL_OVERRIDE;
+virtual voidStart() SAL_OVERRIDE;
 static void ImplStartTimer( ImplSVData* pSVData, sal_uLong nMS );
 };
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: desktop/source drawinglayer/source include/sfx2 include/svx include/vcl sc/inc sc/source sd/source sfx2/source svx/inc svx/source sw/source vcl/osx vcl/source vcl/win

2015-03-06 Thread Tobias Madl
 desktop/source/app/app.cxx|2 +-
 drawinglayer/source/primitive2d/textlayoutdevice.cxx  |4 ++--
 drawinglayer/source/processor2d/vclhelperbufferdevice.cxx |4 ++--
 include/sfx2/objsh.hxx|2 +-
 include/svx/sdr/animation/scheduler.hxx   |2 +-
 include/vcl/debugevent.hxx|2 +-
 sc/inc/refreshtimer.hxx   |2 +-
 sc/source/core/tool/refreshtimer.cxx  |2 +-
 sc/source/filter/oox/workbookfragment.cxx |2 +-
 sd/source/ui/remotecontrol/ImagePreparer.cxx  |2 +-
 sd/source/ui/remotecontrol/ImagePreparer.hxx  |2 +-
 sd/source/ui/remotecontrol/Receiver.cxx   |2 +-
 sd/source/ui/remotecontrol/Receiver.hxx   |2 +-
 sfx2/source/appl/linksrc.cxx  |4 ++--
 sfx2/source/doc/objmisc.cxx   |2 +-
 svx/inc/sdr/contact/objectcontactofpageview.hxx   |2 +-
 svx/source/inc/eventhandler.hxx   |2 +-
 svx/source/sdr/animation/scheduler.cxx|2 +-
 svx/source/sdr/contact/objectcontactofpageview.cxx|6 +++---
 svx/source/sdr/contact/viewobjectcontactofpageobj.cxx |6 +++---
 svx/source/sdr/event/eventhandler.cxx |2 +-
 sw/source/uibase/inc/gloslst.hxx  |2 +-
 sw/source/uibase/utlui/gloslst.cxx|2 +-
 vcl/osx/salinst.cxx   |6 +++---
 vcl/osx/salnativewidgets.cxx  |2 +-
 vcl/source/window/debugevent.cxx  |2 +-
 vcl/win/source/gdi/salbmp.cxx |2 +-
 27 files changed, 36 insertions(+), 36 deletions(-)

New commits:
commit d05a64df34fd143670cb939b72abfb32d6b714c7
Author: Tobias Madl tobias.madl@gmail.com
Date:   Fri Mar 6 14:48:18 2015 +0100

Timer/Idle: adapted inherited funktions

Change-Id: I7714a4638b03d020820b276028c0819ef054fa26

diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index 145c0c1..01b20d5 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -1910,7 +1910,7 @@ class ExitTimer : public Timer
 SetTimeout(500);
 Start();
 }
-virtual void Timeout() SAL_OVERRIDE
+virtual void Invoke() SAL_OVERRIDE
 {
 exit(42);
 }
diff --git a/drawinglayer/source/primitive2d/textlayoutdevice.cxx 
b/drawinglayer/source/primitive2d/textlayoutdevice.cxx
index b1e1ad0..9196259 100644
--- a/drawinglayer/source/primitive2d/textlayoutdevice.cxx
+++ b/drawinglayer/source/primitive2d/textlayoutdevice.cxx
@@ -65,7 +65,7 @@ namespace
 public:
 explicit ImpTimedRefDev(scoped_timed_RefDev rOwnerofMe);
 virtual ~ImpTimedRefDev();
-virtual void Timeout() SAL_OVERRIDE;
+virtual void Invoke() SAL_OVERRIDE;
 
 VirtualDevice acquireVirtualDevice();
 void releaseVirtualDevice();
@@ -87,7 +87,7 @@ namespace
 delete mpVirDev;
 }
 
-void ImpTimedRefDev::Timeout()
+void ImpTimedRefDev::Invoke()
 {
 // for obvious reasons, do not call anything after this
 mrOwnerOfMe.reset();
diff --git a/drawinglayer/source/processor2d/vclhelperbufferdevice.cxx 
b/drawinglayer/source/processor2d/vclhelperbufferdevice.cxx
index feb2df0..efa41c8 100644
--- a/drawinglayer/source/processor2d/vclhelperbufferdevice.cxx
+++ b/drawinglayer/source/processor2d/vclhelperbufferdevice.cxx
@@ -51,7 +51,7 @@ namespace
 void free(VirtualDevice rDevice);
 
 // Timer virtuals
-virtual void Timeout() SAL_OVERRIDE;
+virtual void Invoke() SAL_OVERRIDE;
 };
 
 VDevBuffer::VDevBuffer()
@@ -191,7 +191,7 @@ namespace
 Start();
 }
 
-void VDevBuffer::Timeout()
+void VDevBuffer::Invoke()
 {
 ::osl::MutexGuard aGuard(m_aMutex);
 
diff --git a/include/sfx2/objsh.hxx b/include/sfx2/objsh.hxx
index d08baa9..289a2da 100644
--- a/include/sfx2/objsh.hxx
+++ b/include/sfx2/objsh.hxx
@@ -776,7 +776,7 @@ class AutoReloadTimer_Impl : public Timer
 public:
 AutoReloadTimer_Impl( const OUString rURL, sal_uInt32 nTime,
   SfxObjectShell* pSh );
-virtual void Timeout() SAL_OVERRIDE;
+virtual void Invoke() SAL_OVERRIDE;
 };
 
 class SFX2_DLLPUBLIC SfxObjectShellItem: public SfxPoolItem
diff --git a/include/svx/sdr/animation/scheduler.hxx 
b/include/svx/sdr/animation/scheduler.hxx
index 5a5ca9e..1feda3a 100644
--- a/include/svx/sdr/animation/scheduler.hxx
+++ b/include/svx/sdr/animation/scheduler.hxx
@@ -116,7 +116,7 @@ namespace sdr
 virtual ~Scheduler();
 
 // From baseclass Timer, the timeout call
-virtual void Timeout() SAL_OVERRIDE;
+virtual void

[Libreoffice-commits] core.git: Branch 'feature/priorities' - 3 commits - include/vcl vcl/inc vcl/source

2015-03-06 Thread Tobias Madl
 include/vcl/scheduler.hxx|   22 --
 include/vcl/timer.hxx|4 +--
 vcl/inc/svdata.hxx   |3 --
 vcl/source/app/scheduler.cxx |   52 ---
 vcl/source/app/svapp.cxx |4 ---
 vcl/source/app/svmain.cxx|1 
 vcl/source/app/timer.cxx |6 +---
 7 files changed, 40 insertions(+), 52 deletions(-)

New commits:
commit 950d093f21a1ce42020386052aaff8c0812d57a0
Author: Tobias Madl tobias.madl@gmail.com
Date:   Fri Mar 6 10:39:49 2015 +

adapted comments and variable names

Change-Id: I4f2c1d743ce2f30e8c24180b73f0716fc13b459e

diff --git a/include/vcl/timer.hxx b/include/vcl/timer.hxx
index a999559..004e78c 100644
--- a/include/vcl/timer.hxx
+++ b/include/vcl/timer.hxx
@@ -40,10 +40,10 @@ public:
 
 /// Make it possible to associate a callback with this timer handler
 /// of course, you can also sub-class and override 'Invoke'
-voidSetTimeout( sal_uLong nTimeoutMs );
-sal_uLong   GetTimeout() const { return mnTimeout; }
 voidSetTimeoutHdl( const Link rLink ) { maTimeoutHdl = rLink; 
}
 const Link GetTimeoutHdl() const { return maTimeoutHdl; }
+voidSetTimeout( sal_uLong nTimeoutMs );
+sal_uLong   GetTimeout() const { return mnTimeout; }
 virtual voidInvoke() SAL_OVERRIDE;
 voidTimeout() { Invoke(); }
 Timer  operator=( const Timer rTimer );
diff --git a/vcl/inc/svdata.hxx b/vcl/inc/svdata.hxx
index 132c272..967f3df 100644
--- a/vcl/inc/svdata.hxx
+++ b/vcl/inc/svdata.hxx
@@ -317,8 +317,7 @@ struct ImplSVData
 SalSystem*  mpSalSystem;// SalSystem 
interface
 ResMgr* mpResMgr;   // 
SV-Resource-Manager
 sal_uLong   mnTimerPeriod;  // current timer 
period
-sal_uLong   mnTimerUpdate;  // 
TimerCallbackProcs on stack
-boolmbNotAllTimerCalled;// true: Timer 
must still be processed
+sal_uLong   mnUpdateStack;  // Scheduler on 
stack
 ImplSVAppData   maAppData;  // indepen data 
for class Application
 ImplSVGDIData   maGDIData;  // indepen data 
for Output classes
 ImplSVWinData   maWinData;  // indepen data 
for Windows classes
diff --git a/vcl/source/app/scheduler.cxx b/vcl/source/app/scheduler.cxx
index fc52b90..5a0061f 100644
--- a/vcl/source/app/scheduler.cxx
+++ b/vcl/source/app/scheduler.cxx
@@ -23,11 +23,14 @@
 #include vcl/timer.hxx
 #include saltimer.hxx
 
+#define MAX_TIMER_PERIOD((sal_uLong)0x)
+
 void ImplSchedulerData::Invoke()
 {
 if (mbDelete || mbInScheduler )
 return;
 
+// prepare Scheduler Object for deletion after handling
 mpScheduler-SetDeletionFlags();
 
 // invoke it
@@ -41,20 +44,20 @@ ImplSchedulerData *ImplSchedulerData::GetMostImportantTask( 
bool bTimer )
 ImplSVData* pSVData = ImplGetSVData();
 ImplSchedulerData *pMostUrgent = NULL;
 
-for ( ImplSchedulerData *p = pSVData-mpFirstSchedulerData; p; p = 
p-mpNext )
+for ( ImplSchedulerData *pSchedulerData = pSVData-mpFirstSchedulerData; 
pSchedulerData; pSchedulerData = pSchedulerData-mpNext )
 {
-if ( !p-mpScheduler || p-mbDelete || p-mnUpdateStack = 
pSVData-mnTimerUpdate || !p-mpScheduler-ReadyForSchedule( bTimer ) )
+if ( !pSchedulerData-mpScheduler || pSchedulerData-mbDelete || 
pSchedulerData-mnUpdateStack = pSVData-mnUpdateStack
+|| !pSchedulerData-mpScheduler-ReadyForSchedule( bTimer ) )
 continue;
 if (!pMostUrgent)
-pMostUrgent = p;
+pMostUrgent = pSchedulerData;
 else
 {
 // Find the highest priority.
-// If the priority of the current idle is higher (numerical value 
is lower) than
-// the priority of the most urgent, the priority of most urgent is 
increased and
-// the current is the new most urgent. So starving is impossible.
-if ( p-mpScheduler-GetPriority()  
pMostUrgent-mpScheduler-GetPriority() )
-pMostUrgent = p;
+// If the priority of the current task is higher (numerical value 
is lower) than
+// the priority of the most urgent, the current task gets the new 
most urgent.
+if ( pSchedulerData-mpScheduler-GetPriority()  
pMostUrgent-mpScheduler-GetPriority() )
+pMostUrgent = pSchedulerData;
 }
 }
 
@@ -101,6 +104,7 @@ void Scheduler::ImplDeInitScheduler()
 
 void Scheduler::CallbackTaskScheduling(bool ignore)
 {
+// this function is for the saltimer callback
 (void)ignore;
 Scheduler::ProcessTaskScheduling( true );
 }
@@ -108,12 +112,13 @@ void Scheduler::CallbackTaskScheduling(bool ignore)
 void

[Libreoffice-commits] core.git: sc/inc

2015-03-06 Thread Tobias Madl
 sc/inc/refreshtimer.hxx |4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

New commits:
commit 2c0189a8a3aeb3668bf6de1ea1958ba475b80a38
Author: Tobias Madl tobias.madl@gmail.com
Date:   Fri Mar 6 16:55:17 2015 +0100

Autotimer: added function to public

Change-Id: I6522e7a2bb895973d9d8cf1b7cfbad2f2abc62a2

diff --git a/sc/inc/refreshtimer.hxx b/sc/inc/refreshtimer.hxx
index 29a0028e..20c57db 100644
--- a/sc/inc/refreshtimer.hxx
+++ b/sc/inc/refreshtimer.hxx
@@ -57,9 +57,7 @@ public:
 
 SC_DLLPUBLIC virtual void SetRefreshDelay( sal_uLong nSeconds );
 SC_DLLPUBLIC virtual void Invoke() SAL_OVERRIDE;
-
-private:
-void Start();
+virtual void Start() SAL_OVERRIDE;
 };
 
 #endif // INCLUDED_SC_INC_REFRESHTIMER_HXX
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/priorities' - 0 commits -

2015-03-06 Thread Tobias Madl
Rebased ref, commits from common ancestor:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/priorities' - 2 commits - include/vcl vcl/source

2015-03-05 Thread Tobias Madl
 include/vcl/scheduler.hxx|3 ++-
 include/vcl/timer.hxx|4 +++-
 vcl/source/app/scheduler.cxx |   41 +
 vcl/source/app/svapp.cxx |3 ++-
 vcl/source/app/timer.cxx |   33 ++---
 5 files changed, 74 insertions(+), 10 deletions(-)

New commits:
commit ce0998127e9e0af03f1d66f5dd6aab4252f7caf1
Author: Tobias Madl tobias.madl@gmail.com
Date:   Thu Mar 5 14:05:15 2015 +

Timer: added new saltimer handling

Change-Id: Icdc5abf9dca727a8cc312ddb5861f7a34a38bbe1

diff --git a/include/vcl/scheduler.hxx b/include/vcl/scheduler.hxx
index af17016..30f2e1a 100644
--- a/include/vcl/scheduler.hxx
+++ b/include/vcl/scheduler.hxx
@@ -60,6 +60,7 @@ protected:
 friend struct ImplSchedulerData;
 virtual void SetDeletionFlags();
 virtual bool ReadyForSchedule( bool bTimer ) { return !bTimer; }
+virtual sal_uLong UpdateMinPeriod( sal_uLong nMinPeriod, sal_uLong nTime );
 
 public:
 Scheduler();
@@ -79,7 +80,7 @@ public:
 
 boolIsActive() const { return mbActive; }
 
-Scheduler  operator=( const Scheduler Scheduler );
+Scheduler  operator=( const Scheduler rScheduler );
 static void ImplDeInitScheduler();
 
 /// Process all pending idle tasks ahead of time in priority order.
diff --git a/include/vcl/timer.hxx b/include/vcl/timer.hxx
index d2db1d4..a999559 100644
--- a/include/vcl/timer.hxx
+++ b/include/vcl/timer.hxx
@@ -32,6 +32,7 @@ protected:
 
 void SetDeletionFlags() SAL_OVERRIDE;
 bool ReadyForSchedule( bool bTimer ) SAL_OVERRIDE;
+sal_uLong UpdateMinPeriod( sal_uLong nMinPeriod, sal_uLong nTime ) 
SAL_OVERRIDE;
 
 public:
 Timer();
@@ -44,9 +45,10 @@ public:
 voidSetTimeoutHdl( const Link rLink ) { maTimeoutHdl = rLink; 
}
 const Link GetTimeoutHdl() const { return maTimeoutHdl; }
 virtual voidInvoke() SAL_OVERRIDE;
-voidTimeout() { Invoke(); }
+voidTimeout() { Invoke(); }
 Timer  operator=( const Timer rTimer );
 voidStart() SAL_OVERRIDE;
+static void ImplStartTimer( ImplSVData* pSVData, sal_uLong nMS );
 };
 
 /// An auto-timer is a multi-shot timer re-emitting itself at
diff --git a/vcl/source/app/scheduler.cxx b/vcl/source/app/scheduler.cxx
index 06de1ba..ef5e1f0 100644
--- a/vcl/source/app/scheduler.cxx
+++ b/vcl/source/app/scheduler.cxx
@@ -20,6 +20,8 @@
 #include svdata.hxx
 #include tools/time.hxx
 #include vcl/scheduler.hxx
+#include vcl/timer.hxx
+#include saltimer.hxx
 
 void ImplSchedulerData::Invoke()
 {
@@ -70,6 +72,10 @@ void Scheduler::ImplDeInitScheduler()
 {
 ImplSVData* pSVData = ImplGetSVData();
 ImplSchedulerData*  pSchedulerData = pSVData-mpFirstSchedulerData;
+if (pSVData-mpSalTimer)
+{
+pSVData-mpSalTimer-Stop();
+}
 
 if ( pSchedulerData )
 {
@@ -87,7 +93,11 @@ void Scheduler::ImplDeInitScheduler()
 while ( pSchedulerData );
 
 pSVData-mpFirstSchedulerData   = NULL;
+pSVData-mnTimerPeriod  = 0;
 }
+
+delete pSVData-mpSalTimer;
+pSVData-mpSalTimer = 0;
 }
 
 void Scheduler::CallbackTaskScheduling(bool ignore)
@@ -102,19 +112,26 @@ void Scheduler::ProcessTaskScheduling( bool bTimer )
 ImplSchedulerData* pSchedulerData = NULL;
 ImplSchedulerData* pPrevSchedulerData = NULL;
 ImplSVData*pSVData = ImplGetSVData();
+sal_uLong  nTime = tools::Time::GetSystemTicks();
+sal_uLong  nMinPeriod = ((sal_uLong)0x);
 pSVData-mnTimerUpdate++;
 
 if ((pSchedulerData = ImplSchedulerData::GetMostImportantTask(bTimer)))
 {
-pSchedulerData-mnUpdateTime = tools::Time::GetSystemTicks();
+pSchedulerData-mnUpdateTime = nTime;
 pSchedulerData-Invoke();
 }
 
 pSchedulerData = pSVData-mpFirstSchedulerData;
 while ( pSchedulerData )
 {
+if( pSchedulerData-mbInScheduler )
+{
+pPrevSchedulerData = pSchedulerData;
+pSchedulerData = pSchedulerData-mpNext;
+}
 // Should Task be released from scheduling?
-if ( pSchedulerData-mbDelete )
+else if ( pSchedulerData-mbDelete )
 {
 if ( pPrevSchedulerData )
 pPrevSchedulerData-mpNext = pSchedulerData-mpNext;
@@ -128,15 +145,31 @@ void Scheduler::ProcessTaskScheduling( bool bTimer )
 }
 else
 {
-if( !pSchedulerData-mbInScheduler )
-pSchedulerData-mnUpdateStack = 0;
+pSchedulerData-mnUpdateStack = 0;
+nMinPeriod = pSchedulerData-mpScheduler-UpdateMinPeriod( 
nMinPeriod, nTime );
 pPrevSchedulerData = pSchedulerData;
 pSchedulerData = pSchedulerData-mpNext;
 }
 }
+
+// delete clock if no more timers available
+if ( !pSVData-mpFirstSchedulerData )
+{
+if ( pSVData-mpSalTimer

[Libreoffice-commits] core.git: Branch 'feature/priorities' - 3718 commits - accessibility/inc accessibility/source android/Bootstrap android/CustomTarget_android_desktop.mk android/CustomTarget_lo_an

2015-03-04 Thread Tobias Madl
Rebased ref, commits from common ancestor:
commit fb2b2777e452a99d06d8b6425614edfd34f99f5d
Author: Tobias Madl tobias.madl@gmail.com
Date:   Wed Mar 4 14:13:52 2015 +

Timer: patch for commit 06d7314

Change-Id: I762062a4782438ec5bbcb53da9a42f44db65c40d

diff --git a/include/vcl/scheduler.hxx b/include/vcl/scheduler.hxx
index a18aa71..af17016 100644
--- a/include/vcl/scheduler.hxx
+++ b/include/vcl/scheduler.hxx
@@ -83,7 +83,7 @@ public:
 static void ImplDeInitScheduler();
 
 /// Process all pending idle tasks ahead of time in priority order.
-static void CallbackTaskScheduling();
+static void CallbackTaskScheduling( bool ignore );
 static void ProcessTaskScheduling( bool bTimer );
 };
 
diff --git a/include/vcl/timer.hxx b/include/vcl/timer.hxx
index 01fd36c..d2db1d4 100644
--- a/include/vcl/timer.hxx
+++ b/include/vcl/timer.hxx
@@ -44,7 +44,7 @@ public:
 voidSetTimeoutHdl( const Link rLink ) { maTimeoutHdl = rLink; 
}
 const Link GetTimeoutHdl() const { return maTimeoutHdl; }
 virtual voidInvoke() SAL_OVERRIDE;
-virtual voidTimeout() { Invoke(); }
+voidTimeout() { Invoke(); }
 Timer  operator=( const Timer rTimer );
 voidStart() SAL_OVERRIDE;
 };
diff --git a/vcl/source/app/scheduler.cxx b/vcl/source/app/scheduler.cxx
index fcaeb35..06de1ba 100644
--- a/vcl/source/app/scheduler.cxx
+++ b/vcl/source/app/scheduler.cxx
@@ -90,8 +90,9 @@ void Scheduler::ImplDeInitScheduler()
 }
 }
 
-void Scheduler::CallbackTaskScheduling()
+void Scheduler::CallbackTaskScheduling(bool ignore)
 {
+(void)ignore;
 Scheduler::ProcessTaskScheduling( true );
 }
 
commit 8d266a510d759094c1e0e003b9a44d371b9c0a81
Author: Tobias Madl tobias.madl@gmail.com
Date:   Tue Mar 3 13:30:11 2015 +

Timer: Faster Word Count

Change-Id: I45d6fc28e898b945c7754b9ee1f2842247a071e6

diff --git a/sw/source/core/doc/DocumentStatisticsManager.cxx 
b/sw/source/core/doc/DocumentStatisticsManager.cxx
index 989d548..fca66719 100644
--- a/sw/source/core/doc/DocumentStatisticsManager.cxx
+++ b/sw/source/core/doc/DocumentStatisticsManager.cxx
@@ -72,7 +72,8 @@ namespace sw
 DocumentStatisticsManager::DocumentStatisticsManager( SwDoc i_rSwdoc ) : 
m_rDoc( i_rSwdoc ),
   
mpDocStat( new SwDocStat )
 {
-maStatsUpdateTimer.SetTimeout( 100 );
+maStatsUpdateTimer.SetTimeout( 1 );
+maStatsUpdateTimer.SetPriority( SchedulerPriority::LOWEST );
 maStatsUpdateTimer.SetTimeoutHdl( LINK( this, DocumentStatisticsManager, 
DoIdleStatsUpdate ) );
 }
 
commit cbff288e140871519693bca400f3f5177de036e5
Author: Tobias Madl tobias.madl@gmail.com
Date:   Tue Mar 3 12:55:27 2015 +

Timer Idle: adapted unit tests to new classes

Change-Id: I15654a7aa5a99cb3aa6f8ba222cf2aa1d2f040ab

diff --git a/vcl/qa/cppunit/timer.cxx b/vcl/qa/cppunit/timer.cxx
index 5abdb52..5b81281 100644
--- a/vcl/qa/cppunit/timer.cxx
+++ b/vcl/qa/cppunit/timer.cxx
@@ -93,7 +93,7 @@ public:
 Start();
 mrBool = false;
 }
-virtual void DoIdle() SAL_OVERRIDE
+virtual void Invoke() SAL_OVERRIDE
 {
 mrBool = true;
 Application::EndYield();
@@ -104,7 +104,7 @@ void TimerTest::testIdle()
 {
 bool bTriggered = false;
 IdleBool aTest( bTriggered );
-Idle::ProcessAllIdleHandlers();
+Scheduler::ProcessTaskScheduling(false);
 CPPUNIT_ASSERT_MESSAGE(watchdog triggered, bTriggered);
 }
 
@@ -121,7 +121,7 @@ public:
 Start();
 mrBool = false;
 }
-virtual void Timeout() SAL_OVERRIDE
+virtual void Invoke() SAL_OVERRIDE
 {
 mrBool = true;
 Application::EndYield();
@@ -156,7 +156,7 @@ public:
 Start();
 mrCount = 0;
 }
-virtual void Timeout() SAL_OVERRIDE
+virtual void Invoke() SAL_OVERRIDE
 {
 mrCount++;
 }
@@ -181,7 +181,7 @@ public:
 SetTimeout( nMS );
 Start();
 }
-virtual void Timeout() SAL_OVERRIDE
+virtual void Invoke() SAL_OVERRIDE
 {
 for (int i = 0; i  100; i++)
 Application::Yield();
@@ -211,7 +211,7 @@ public:
 Start();
 mbSlow = false;
 }
-virtual void Timeout() SAL_OVERRIDE
+virtual void Invoke() SAL_OVERRIDE
 {
 TimeValue aWait;
 aWait.Seconds = 1;
diff --git a/vcl/source/app/scheduler.cxx b/vcl/source/app/scheduler.cxx
index e2465fe..fcaeb35 100644
--- a/vcl/source/app/scheduler.cxx
+++ b/vcl/source/app/scheduler.cxx
@@ -53,12 +53,7 @@ ImplSchedulerData *ImplSchedulerData::GetMostImportantTask( 
bool bTimer )
 // the priority of the most urgent, the priority of most urgent is 
increased and
 // the current is the new most urgent. So starving is impossible.
 if ( p-mpScheduler-GetPriority()  
pMostUrgent-mpScheduler-GetPriority() )
-{
-pMostUrgent

[Libreoffice-commits] core.git: Branch 'feature/priorities' - 5 commits - avmedia/source basctl/source chart2/source cui/source dbaccess/source desktop/source editeng/source extensions/source forms/so

2015-03-03 Thread Tobias Madl
/tbxctrls/grafctrl.cxx  |2 
 sw/source/core/doc/DocumentStatisticsManager.cxx  |3 
 sw/source/core/doc/DocumentTimerManager.cxx   |   26 -
 sw/source/core/doc/docnew.cxx |2 
 sw/source/core/docnode/threadmanager.cxx  |2 
 sw/source/core/inc/DocumentTimerManager.hxx   |6 
 sw/source/ui/dbui/mmoutputtypepage.cxx|2 
 sw/source/ui/envelp/labfmt.cxx|2 
 sw/source/uibase/docvw/edtwin.cxx |2 
 sw/source/uibase/docvw/srcedtw.cxx|2 
 sw/source/uibase/utlui/navipi.cxx |2 
 sw/source/uibase/utlui/unotools.cxx   |2 
 toolkit/source/awt/vclxtoolkit.cxx|4 
 vcl/Library_vcl.mk|1 
 vcl/generic/print/genprnpsp.cxx   |2 
 vcl/inc/svdata.hxx|3 
 vcl/qa/cppunit/timer.cxx  |   14 
 vcl/source/app/idle.cxx   |  205 
 vcl/source/app/scheduler.cxx  |  230 +
 vcl/source/app/svapp.cxx  |   19 -
 vcl/source/app/svmain.cxx |6 
 vcl/source/app/timer.cxx  |  305 ++
 vcl/source/edit/textdata.cxx  |2 
 vcl/source/window/dockmgr.cxx |4 
 vcl/source/window/dockwin.cxx |4 
 vcl/source/window/syswin.cxx  |2 
 vcl/source/window/toolbox.cxx |2 
 vcl/source/window/window.cxx  |4 
 107 files changed, 544 insertions(+), 707 deletions(-)

New commits:
commit a1f08a7cfa4500da529919ea5ed23b489e849776
Author: Tobias Madl tobias.madl@gmail.com
Date:   Tue Mar 3 13:30:11 2015 +

Timer: Faster Word Count

Change-Id: I45d6fc28e898b945c7754b9ee1f2842247a071e6

diff --git a/sw/source/core/doc/DocumentStatisticsManager.cxx 
b/sw/source/core/doc/DocumentStatisticsManager.cxx
index 3f6ccb4..9063871 100644
--- a/sw/source/core/doc/DocumentStatisticsManager.cxx
+++ b/sw/source/core/doc/DocumentStatisticsManager.cxx
@@ -77,7 +77,8 @@ namespace sw
 DocumentStatisticsManager::DocumentStatisticsManager( SwDoc i_rSwdoc ) : 
m_rDoc( i_rSwdoc ),
   
mpDocStat( new SwDocStat )
 {
-maStatsUpdateTimer.SetTimeout( 100 );
+maStatsUpdateTimer.SetTimeout( 1 );
+maStatsUpdateTimer.SetPriority( SchedulerPriority::LOWEST );
 maStatsUpdateTimer.SetTimeoutHdl( LINK( this, DocumentStatisticsManager, 
DoIdleStatsUpdate ) );
 }
 
commit 80c61f2ea32833469163416d477a5082e7a7af39
Author: Tobias Madl tobias.madl@gmail.com
Date:   Tue Mar 3 12:55:27 2015 +

Timer Idle: adapted unit tests to new classes

Change-Id: I15654a7aa5a99cb3aa6f8ba222cf2aa1d2f040ab

diff --git a/vcl/qa/cppunit/timer.cxx b/vcl/qa/cppunit/timer.cxx
index 5abdb52..5b81281 100644
--- a/vcl/qa/cppunit/timer.cxx
+++ b/vcl/qa/cppunit/timer.cxx
@@ -93,7 +93,7 @@ public:
 Start();
 mrBool = false;
 }
-virtual void DoIdle() SAL_OVERRIDE
+virtual void Invoke() SAL_OVERRIDE
 {
 mrBool = true;
 Application::EndYield();
@@ -104,7 +104,7 @@ void TimerTest::testIdle()
 {
 bool bTriggered = false;
 IdleBool aTest( bTriggered );
-Idle::ProcessAllIdleHandlers();
+Scheduler::ProcessTaskScheduling(false);
 CPPUNIT_ASSERT_MESSAGE(watchdog triggered, bTriggered);
 }
 
@@ -121,7 +121,7 @@ public:
 Start();
 mrBool = false;
 }
-virtual void Timeout() SAL_OVERRIDE
+virtual void Invoke() SAL_OVERRIDE
 {
 mrBool = true;
 Application::EndYield();
@@ -156,7 +156,7 @@ public:
 Start();
 mrCount = 0;
 }
-virtual void Timeout() SAL_OVERRIDE
+virtual void Invoke() SAL_OVERRIDE
 {
 mrCount++;
 }
@@ -181,7 +181,7 @@ public:
 SetTimeout( nMS );
 Start();
 }
-virtual void Timeout() SAL_OVERRIDE
+virtual void Invoke() SAL_OVERRIDE
 {
 for (int i = 0; i  100; i++)
 Application::Yield();
@@ -211,7 +211,7 @@ public:
 Start();
 mbSlow = false;
 }
-virtual void Timeout() SAL_OVERRIDE
+virtual void Invoke() SAL_OVERRIDE
 {
 TimeValue aWait;
 aWait.Seconds = 1;
diff --git a/vcl/source/app/scheduler.cxx b/vcl/source/app/scheduler.cxx
index e2465fe..fcaeb35 100644
--- a/vcl/source/app/scheduler.cxx
+++ b/vcl/source/app/scheduler.cxx
@@ -53,12 +53,7 @@ ImplSchedulerData *ImplSchedulerData::GetMostImportantTask( 
bool bTimer )
 // the priority of the most urgent, the priority of most urgent is 
increased and
 // the current is the new

[Libreoffice-commits] core.git: Branch 'feature/priorities' - vcl/source

2015-01-27 Thread Tobias Madl
 vcl/source/app/svmain.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit a1769f834d9c199a75b48a897cc38bc878097be1
Author: Tobias Madl tobias.madl@gmail.com
Date:   Thu Jan 22 14:20:04 2015 +

Idle: Now using deinitialisation

Change-Id: I12290bed7e4f298ab90393b8de6e2b6e7061e53f

diff --git a/vcl/source/app/svmain.cxx b/vcl/source/app/svmain.cxx
index 3187f59..cd0ba59 100644
--- a/vcl/source/app/svmain.cxx
+++ b/vcl/source/app/svmain.cxx
@@ -390,7 +390,7 @@ void DeInitVCL()
 if ( pSVData-maAppData.mpIdleMgr )
 delete pSVData-maAppData.mpIdleMgr;
 Timer::ImplDeInitTimer();
-Idle::ImplDeInitIdle;
+Idle::ImplDeInitIdle();
 
 if ( pSVData-maWinData.mpMsgBoxImgList )
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/priorities' - include/vcl vcl/source

2015-01-22 Thread Tobias Madl
 include/vcl/idle.hxx|   41 -
 vcl/source/app/idle.cxx |4 ++--
 2 files changed, 10 insertions(+), 35 deletions(-)

New commits:
commit d2382e1a8f04ac91768fe59e1498048f3fcfdc9a
Author: Tobias Madl tobias.madl@gmail.com
Date:   Thu Jan 22 12:27:45 2015 +0100

Idle: Inserted static cast

Change-Id: I4cfbb53763001854d37fbcd304e77e65279173b6

diff --git a/include/vcl/idle.hxx b/include/vcl/idle.hxx
index 6c40ca3..ef6d7b5 100644
--- a/include/vcl/idle.hxx
+++ b/include/vcl/idle.hxx
@@ -28,41 +28,16 @@ struct ImplIdleData;
 struct ImplSVData;
 
 enum class IdlePriority {
-VCL_IDLE_PRIORITY_HIGHEST,
-VCL_IDLE_PRIORITY_HIGH,
-VCL_IDLE_PRIORITY_REPAINT,
-VCL_IDLE_PRIORITY_RESIZE,
-VCL_IDLE_PRIORITY_MEDIUM,
-VCL_IDLE_PRIORITY_LOW,
-VCL_IDLE_PRIORITY_LOWER,
-VCL_IDLE_PRIORITY_LOWEST
+VCL_IDLE_PRIORITY_HIGHEST   = 0,
+VCL_IDLE_PRIORITY_HIGH  = 1,
+VCL_IDLE_PRIORITY_REPAINT   = 2,
+VCL_IDLE_PRIORITY_RESIZE= 3,
+VCL_IDLE_PRIORITY_MEDIUM= 3,
+VCL_IDLE_PRIORITY_LOW   = 4,
+VCL_IDLE_PRIORITY_LOWER = 5,
+VCL_IDLE_PRIORITY_LOWEST= 6
 };
 
-inline sal_Int32 convertToInt( IdlePriority ePriority )
-{
-switch (ePriority)
-{
-case IdlePriority::VCL_IDLE_PRIORITY_HIGHEST:
-return 0;
-case IdlePriority::VCL_IDLE_PRIORITY_HIGH:
-return 1;
-case IdlePriority::VCL_IDLE_PRIORITY_REPAINT:
-return 2;
-case IdlePriority::VCL_IDLE_PRIORITY_RESIZE:
-return 3;
-case IdlePriority::VCL_IDLE_PRIORITY_MEDIUM:
-return 3;
-case IdlePriority::VCL_IDLE_PRIORITY_LOW:
-return 4;
-case IdlePriority::VCL_IDLE_PRIORITY_LOWER:
-return 5;
-case IdlePriority::VCL_IDLE_PRIORITY_LOWEST:
-return 6;
-}
-
-return 42; // Should not happen
-}
-
 class VCL_DLLPUBLIC Idle
 {
 protected:
diff --git a/vcl/source/app/idle.cxx b/vcl/source/app/idle.cxx
index cc92d36..555bc34 100644
--- a/vcl/source/app/idle.cxx
+++ b/vcl/source/app/idle.cxx
@@ -36,7 +36,7 @@ struct ImplIdleData
 if (mbDelete || mbInIdle )
 return;
 
-
mpIdle-SetSchedulingPriority(convertToInt(mpIdle-GetDefaultPriority()));
+
mpIdle-SetSchedulingPriority(static_castsal_Int32(mpIdle-GetDefaultPriority()));
 mbDelete = true;
 mpIdle-mbActive = false;
 
@@ -208,7 +208,7 @@ Idle Idle::operator=( const Idle rIdle )
 
 Idle::Idle():
 mpIdleData(NULL),
-miPriority(convertToInt(IdlePriority::VCL_IDLE_PRIORITY_HIGH)),
+miPriority(static_castsal_Int32(IdlePriority::VCL_IDLE_PRIORITY_HIGH)),
 meDefaultPriority(IdlePriority::VCL_IDLE_PRIORITY_HIGH),
 mbActive(false)
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/priorities' - avmedia/source basctl/source chart2/source cui/source dbaccess/source desktop/source editeng/source extensions/source forms/source formula

2015-01-22 Thread Tobias Madl
  |2 +-
 sw/source/core/doc/docnew.cxx |2 +-
 sw/source/core/docnode/threadmanager.cxx  |2 +-
 sw/source/ui/dbui/mmoutputtypepage.cxx|2 +-
 sw/source/ui/envelp/labfmt.cxx|2 +-
 sw/source/uibase/docvw/edtwin.cxx |2 +-
 sw/source/uibase/docvw/srcedtw.cxx|2 +-
 sw/source/uibase/utlui/navipi.cxx |2 +-
 sw/source/uibase/utlui/unotools.cxx   |2 +-
 vcl/generic/print/genprnpsp.cxx   |2 +-
 vcl/osx/salinst.cxx   |2 +-
 vcl/qa/cppunit/timer.cxx  |2 +-
 vcl/source/app/idle.cxx   |4 ++--
 vcl/source/edit/textdata.cxx  |2 +-
 vcl/source/window/dockmgr.cxx |4 ++--
 vcl/source/window/dockwin.cxx |4 ++--
 vcl/source/window/syswin.cxx  |2 +-
 vcl/source/window/toolbox.cxx |2 +-
 vcl/source/window/window.cxx  |4 ++--
 94 files changed, 131 insertions(+), 131 deletions(-)

New commits:
commit 2dc1136e2287b52ba3c3c58a1d70de78ad53fef7
Author: Tobias Madl tobias.madl@gmail.com
Date:   Thu Jan 22 14:20:04 2015 +

Idle: Removed VCL_IDLE_PRIORITY_ prefix of enum

Change-Id: I12290bed7e4f298ab90393b8de6e2b6e7061e53f

diff --git a/avmedia/source/framework/mediacontrol.cxx 
b/avmedia/source/framework/mediacontrol.cxx
index 431108b..3c20767 100644
--- a/avmedia/source/framework/mediacontrol.cxx
+++ b/avmedia/source/framework/mediacontrol.cxx
@@ -187,7 +187,7 @@ MediaControl::MediaControl( vcl::Window* pParent, 
MediaControlStyle eControlStyl
 maMinSize.Height() = ( maMinSize.Height()  1 ) + 
AVMEDIA_CONTROLOFFSET;
 }
 
-maIdle.SetPriority( IdlePriority::VCL_IDLE_PRIORITY_LOW );
+maIdle.SetPriority( IdlePriority::LOW );
 maIdle.SetIdleHdl( LINK( this, MediaControl, implTimeoutHdl ) );
 maIdle.Start();
 }
diff --git a/avmedia/source/framework/soundhandler.cxx 
b/avmedia/source/framework/soundhandler.cxx
index 9195401..22658db 100644
--- a/avmedia/source/framework/soundhandler.cxx
+++ b/avmedia/source/framework/soundhandler.cxx
@@ -263,7 +263,7 @@ void SAL_CALL SoundHandler::dispatchWithNotification(const 
css::util::URL
 // Count this request and initialize self-holder against dying by uno 
ref count ...
 m_xSelfHold = css::uno::Reference css::uno::XInterface (static_cast 
::cppu::OWeakObject* (this), css::uno::UNO_QUERY);
 m_xPlayer-start();
-m_aUpdateIdle.SetPriority( IdlePriority::VCL_IDLE_PRIORITY_LOWER );
+m_aUpdateIdle.SetPriority( IdlePriority::LOWER );
 m_aUpdateIdle.Start();
 }
 catch( css::uno::Exception e )
diff --git a/basctl/source/basicide/baside2b.cxx 
b/basctl/source/basicide/baside2b.cxx
index b9cca06..0e1de19 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -950,7 +950,7 @@ void EditorWindow::CreateEditEngine()
 
 ImplSetFont();
 
-aSyntaxIdle.SetPriority( IdlePriority::VCL_IDLE_PRIORITY_LOWER );
+aSyntaxIdle.SetPriority( IdlePriority::LOWER );
 aSyntaxIdle.SetIdleHdl( LINK( this, EditorWindow, SyntaxTimerHdl ) );
 
 bool bWasDoSyntaxHighlight = bDoSyntaxHighlight;
diff --git a/basctl/source/dlged/dlged.cxx b/basctl/source/dlged/dlged.cxx
index 44c9331..9b4bb81 100644
--- a/basctl/source/dlged/dlged.cxx
+++ b/basctl/source/dlged/dlged.cxx
@@ -220,7 +220,7 @@ DlgEditor::DlgEditor (
 m_ClipboardDataFlavorsResource[1].HumanPresentableName = Dialog 8.0 ;
 m_ClipboardDataFlavorsResource[1].DataType = ::getCppuType( 
(const Sequence sal_Int8 *) 0 );
 
-aMarkIdle.SetPriority(IdlePriority::VCL_IDLE_PRIORITY_LOW);
+aMarkIdle.SetPriority(IdlePriority::LOW);
 aMarkIdle.SetIdleHdl( LINK( this, DlgEditor, MarkTimeout ) );
 
 rWindow.SetMapMode( MapMode( MAP_100TH_MM ) );
diff --git a/chart2/source/view/charttypes/GL3DBarChart.cxx 
b/chart2/source/view/charttypes/GL3DBarChart.cxx
index 473718b..dc68ebb 100755
--- a/chart2/source/view/charttypes/GL3DBarChart.cxx
+++ b/chart2/source/view/charttypes/GL3DBarChart.cxx
@@ -560,7 +560,7 @@ GL3DBarChart::GL3DBarChart(
 {
 mbAutoFly = atoi(aAutoFly);
 }
-maIdle.SetPriority(IdlePriority::VCL_IDLE_PRIORITY_REPAINT);
+maIdle.SetPriority(IdlePriority::REPAINT);
 maIdle.SetIdleHdl(LINK(this, GL3DBarChart, UpdateTimerHdl));
 maIdle.Start();
 osl_getSystemTime(maFPSRenderStartTime);
diff --git a/cui/source/dialogs/cuigaldlg.cxx b/cui/source/dialogs/cuigaldlg.cxx
index 30e64eb..8610c0e 100644
--- a/cui/source/dialogs/cuigaldlg.cxx
+++ b/cui/source/dialogs/cuigaldlg.cxx
@@ -452,7 +452,7 @@ short ActualizeProgress::Execute()
 if ( pIdle )
 {
 pIdle

Re: [Libreoffice-commits] core.git: Branch 'feature/priorities' - include/vcl vcl/source

2015-01-22 Thread Tobias Madl
Removed the Prefix :)

2dc1136e2287b52ba3c3c58a1d70de78ad53fef7

Cheers

Tobi

On Thu, Jan 22, 2015 at 12:14 PM, Miklos Vajna vmik...@collabora.co.uk
wrote:

 On Thu, Jan 22, 2015 at 10:58:13AM +0100, Tobias Madl 
 tobias.madl@gmail.com wrote:
  But i don't get the thing with changing it to a C++11 enum class. It is
  already an enum class 

 In your feature branch, you have:

   enum class IdlePriority {

 That's a C++11 enum class.

 On master, it's:

  enum IdlePriority {

 That's why I said -- if you change it to an enum class and you need to
 adjust all client code anyway, then I would also drop the now redundant
 prefixes as well. See 22f0862ae782c90306d444d2f5aa253b9e97acd2 for
 example or 5333782d090a9e147c0c431f0f741863d1d8cf8e.

 Regards,

 Miklos

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice-commits] core.git: Branch 'feature/priorities' - include/vcl vcl/source

2015-01-22 Thread Tobias Madl
So i replaced it with a static cast now :)

But i don't get the thing with changing it to a C++11 enum class. It is
already an enum class 

Cheers

Tobi

On Thu, Jan 22, 2015 at 10:41 AM, Miklos Vajna vmik...@collabora.co.uk
wrote:

 Hi Tobias,

 [ Taking back the discussion to the list, so Noel and others can jump
 in. ]

 On Thu, Jan 22, 2015 at 10:20:59AM +0100, Tobias Madl 
 tobias.madl@gmail.com wrote:
  Replacing sounds good, but i have to change it in every single file, that
  uses them, so there is the question if this work is really that
 usefull
  (but if you prefer to replace it i will do :)

 If you change IdlePriority to a C++11 enum class, you have to adjust all
 the clients anyway. *If* you do that, then removing the now redundant
 prefix makes sense, I would say.

  I had the same idea with the static cast, but last time i wanted to use
 one
  noel said no ^^ So is it ok, or not?

 static_cast is not always safe (that's difference between
 dynamic_cast and static_cast), but static_casting an enum class to
 an int value is always safe, AFAIK. I would certainly choose that if it
 helps avoiding repeating yourself, which is the case here.

 Regards,

 Miklos

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: Branch 'feature/priorities' - include/vcl vcl/source

2015-01-21 Thread Tobias Madl
 include/vcl/idle.hxx|   51 
 vcl/source/app/idle.cxx |   68 
 2 files changed, 53 insertions(+), 66 deletions(-)

New commits:
commit 75d61d16fce70a53d250a0ef6b7df30b1fd329e6
Author: Tobias Madl tobias.madl@gmail.com
Date:   Wed Jan 21 14:04:59 2015 +0100

Idle: New enum system, comments

Change-Id: I8ca272481e573bf3338c5c1b9873a39022928812

diff --git a/include/vcl/idle.hxx b/include/vcl/idle.hxx
index 0415575..6c40ca3 100644
--- a/include/vcl/idle.hxx
+++ b/include/vcl/idle.hxx
@@ -27,28 +27,47 @@
 struct ImplIdleData;
 struct ImplSVData;
 
-// The timemarks behind the priorities are need to change timer to idle. It is 
to convert
-// timeout values to priorities.
 enum class IdlePriority {
-VCL_IDLE_PRIORITY_STARVATIONPROTECTION  = -1, // Do not use this for 
normal prioritizing!
-
-VCL_IDLE_PRIORITY_HIGHEST   = 0,  // - 0ms
-VCL_IDLE_PRIORITY_HIGH  = 1,  // - 1ms
-VCL_IDLE_PRIORITY_DEFAULT   = 1,  // - 1ms
-VCL_IDLE_PRIORITY_REPAINT   = 2,  // - 30ms
-VCL_IDLE_PRIORITY_RESIZE= 3,  // - 50ms
-VCL_IDLE_PRIORITY_MEDIUM= 3,  // - 50ms
-VCL_IDLE_PRIORITY_LOW   = 4,  // - 100ms
-VCL_IDLE_PRIORITY_LOWER = 5,  // - 200ms
-VCL_IDLE_PRIORITY_LOWEST= 6   // - 400ms
+VCL_IDLE_PRIORITY_HIGHEST,
+VCL_IDLE_PRIORITY_HIGH,
+VCL_IDLE_PRIORITY_REPAINT,
+VCL_IDLE_PRIORITY_RESIZE,
+VCL_IDLE_PRIORITY_MEDIUM,
+VCL_IDLE_PRIORITY_LOW,
+VCL_IDLE_PRIORITY_LOWER,
+VCL_IDLE_PRIORITY_LOWEST
 };
 
+inline sal_Int32 convertToInt( IdlePriority ePriority )
+{
+switch (ePriority)
+{
+case IdlePriority::VCL_IDLE_PRIORITY_HIGHEST:
+return 0;
+case IdlePriority::VCL_IDLE_PRIORITY_HIGH:
+return 1;
+case IdlePriority::VCL_IDLE_PRIORITY_REPAINT:
+return 2;
+case IdlePriority::VCL_IDLE_PRIORITY_RESIZE:
+return 3;
+case IdlePriority::VCL_IDLE_PRIORITY_MEDIUM:
+return 3;
+case IdlePriority::VCL_IDLE_PRIORITY_LOW:
+return 4;
+case IdlePriority::VCL_IDLE_PRIORITY_LOWER:
+return 5;
+case IdlePriority::VCL_IDLE_PRIORITY_LOWEST:
+return 6;
+}
+
+return 42; // Should not happen
+}
 
 class VCL_DLLPUBLIC Idle
 {
 protected:
 ImplIdleData*   mpIdleData; // Pointer to element in idle list
-IdlePrioritymePriority; // Idle priority ( maybe divergent to 
default)
+sal_Int32   miPriority; // Idle priority ( maybe divergent to 
default)
 IdlePrioritymeDefaultPriority;  // Default idle priority
 boolmbActive;   // Currently in the scheduler
 LinkmaIdleHdl;  // Callback Link
@@ -61,7 +80,8 @@ public:
 virtual ~Idle();
 
 void SetPriority( IdlePriority ePriority );
-IdlePriority GetPriority() const { return mePriority; }
+void SetSchedulingPriority( sal_Int32 iPriority );
+sal_Int32GetPriority() const { return miPriority; }
 IdlePriority GetDefaultPriority() const { return meDefaultPriority; }
 
 /// Make it possible to associate a callback with this idle handler
@@ -79,7 +99,6 @@ public:
 
 Idle  operator=( const Idle rIdle );
 static void ImplDeInitIdle();
-static void ImplIdleCallbackProc();
 
 /// Process all pending idle tasks ahead of time in priority order.
 static void ProcessAllIdleHandlers();
diff --git a/vcl/source/app/idle.cxx b/vcl/source/app/idle.cxx
index 37299de..cc92d36 100644
--- a/vcl/source/app/idle.cxx
+++ b/vcl/source/app/idle.cxx
@@ -26,17 +26,17 @@
 
 struct ImplIdleData
 {
-ImplIdleData*   mpNext;  // Pointer to the next Instance
+ImplIdleData*   mpNext;  // Pointer to the next element in list
 Idle*   mpIdle;  // Pointer to VCL Idle instance
-boolmbDelete;// Was Idle deleted during Update()?
-boolmbInIdle;// Are we in a idle handler?
+boolmbDelete;// Destroy this idle?
+boolmbInIdle;// Idle handler currently processed?
 
 void Invoke()
 {
 if (mbDelete || mbInIdle )
 return;
 
-mpIdle-SetPriority(mpIdle-GetDefaultPriority());
+
mpIdle-SetSchedulingPriority(convertToInt(mpIdle-GetDefaultPriority()));
 mbDelete = true;
 mpIdle-mbActive = false;
 
@@ -65,49 +65,16 @@ struct ImplIdleData
 // the current is the new most urgent. So starving is 
impossible.
 if ( p-mpIdle-GetPriority()  
pMostUrgent-mpIdle-GetPriority() )
 {
-IncreasePriority(pMostUrgent-mpIdle);
+pMostUrgent-mpIdle-SetSchedulingPriority( 
pMostUrgent-mpIdle-GetPriority() - 1

[Libreoffice-commits] core.git: Branch 'feature/priorities' - include/vcl vcl/inc vcl/source

2015-01-19 Thread Tobias Madl
 include/vcl/timer.hxx|1 +
 vcl/inc/svdata.hxx   |1 -
 vcl/source/app/idle.cxx  |   10 +-
 vcl/source/app/svapp.cxx |9 +++--
 vcl/source/app/timer.cxx |   41 +++--
 5 files changed, 20 insertions(+), 42 deletions(-)

New commits:
commit 6168c160f89887d90c3b969e99b09d847f60140e
Author: Tobias Madl tobias.madl@gmail.com
Date:   Mon Jan 19 13:08:26 2015 +

Optimized Timer/Idle code

Change-Id: I285bd632faba5a29a770404d6967f4faf7667b16

diff --git a/include/vcl/timer.hxx b/include/vcl/timer.hxx
index 3aca8e5..635a045 100644
--- a/include/vcl/timer.hxx
+++ b/include/vcl/timer.hxx
@@ -63,6 +63,7 @@ public:
 static void ImplDeInitTimer();
 static void ImplTimerCallbackProc();
 static bool TimerReady();
+static bool CheckExpiredTimer(const bool bDoInvoke);
 };
 
 /// An auto-timer is a multi-shot timer re-emitting itself at
diff --git a/vcl/inc/svdata.hxx b/vcl/inc/svdata.hxx
index fc49591..b227173 100644
--- a/vcl/inc/svdata.hxx
+++ b/vcl/inc/svdata.hxx
@@ -320,7 +320,6 @@ struct ImplSVData
 sal_uLong   mnTimerPeriod;  // current timer 
period
 sal_uLong   mnTimerUpdate;  // 
TimerCallbackProcs on stack
 boolmbNotAllTimerCalled;// true: Timer 
must still be processed
-boolmbNoCallTimer;  // true: No 
Timeout calls
 ImplSVAppData   maAppData;  // indepen data 
for class Application
 ImplSVGDIData   maGDIData;  // indepen data 
for Output classes
 ImplSVWinData   maWinData;  // indepen data 
for Windows classes
diff --git a/vcl/source/app/idle.cxx b/vcl/source/app/idle.cxx
index 74f0eaf..c3e24e1 100644
--- a/vcl/source/app/idle.cxx
+++ b/vcl/source/app/idle.cxx
@@ -185,7 +185,6 @@ void Idle::Start()
 // insert timer and start
 mpIdleData = new ImplIdleData;
 mpIdleData-mpIdle= this;
-mpIdleData-mbDelete   = false;
 mpIdleData-mbInIdle= false;
 
 // insert last due to SFX!
@@ -202,14 +201,7 @@ void Idle::Start()
 else
 pSVData-mpFirstIdleData = mpIdleData;
 }
-else if( !mpIdleData-mpIdle ) // TODO: remove when guilty found
-{
-OSL_FAIL( Idle::Start() on a destroyed Idle! );
-}
-else
-{
-mpIdleData-mbDelete= false;
-}
+mpIdleData-mbDelete= false;
 }
 
 void Idle::Stop()
diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx
index fa97a4f..0dcdee9 100644
--- a/vcl/source/app/svapp.cxx
+++ b/vcl/source/app/svapp.cxx
@@ -343,11 +343,8 @@ inline void ImplYield( bool i_bWait, bool i_bAllEvents )
 ImplSVData* pSVData = ImplGetSVData();
 
 // run timers that have timed out
-if ( !pSVData-mbNoCallTimer )
-{
-while ( pSVData-mbNotAllTimerCalled )
-Timer::ImplTimerCallbackProc();
-}
+while ( pSVData-mbNotAllTimerCalled )
+Timer::ImplTimerCallbackProc();
 
 //Process all idles
 Idle::Idle::ProcessAllIdleHandlers();
@@ -368,7 +365,7 @@ inline void ImplYield( bool i_bWait, bool i_bAllEvents )
 
 // the system timer events will not necessarily come in non waiting mode
 // e.g. on OS X; need to trigger timer checks manually
-if( pSVData-maAppData.mbNoYield  !pSVData-mbNoCallTimer )
+if( pSVData-maAppData.mbNoYield )
 {
 do
 {
diff --git a/vcl/source/app/timer.cxx b/vcl/source/app/timer.cxx
index 4adc8e8..ff7233c 100644
--- a/vcl/source/app/timer.cxx
+++ b/vcl/source/app/timer.cxx
@@ -117,33 +117,10 @@ void Timer::ImplTimerCallbackProc()
 sal_uLong   nDeltaTime;
 sal_uLong   nTime = tools::Time::GetSystemTicks();
 
-if ( pSVData-mbNoCallTimer )
-return;
-
 pSVData-mnTimerUpdate++;
 pSVData-mbNotAllTimerCalled = true;
 
-// find timer where the timer handler needs to be called
-pTimerData = pSVData-mpFirstTimerData;
-while ( pTimerData )
-{
-// If the timer is not new, was not deleted, and if it is not in the 
timeout handler, then
-// call the handler as soon as the time is up.
-if ( (pTimerData-mnTimerUpdate  pSVData-mnTimerUpdate) 
- !pTimerData-mbDelete  !pTimerData-mbInTimeout)
-{
-// time has expired
-if ( pTimerData-GetDeadline() = nTime )
-{
-// set new update time
-pTimerData-mnUpdateTime = nTime;
-
-pTimerData-Invoke();
-}
-}
-
-pTimerData = pTimerData-mpNext;
-}
+Timer::CheckExpiredTimer(true);
 
 // determine new time
 sal_uLong nNewTime = tools::Time::GetSystemTicks();
@@ -212,10 +189,16 @@ void Timer::ImplTimerCallbackProc()
 
 bool Timer::TimerReady()
 {
+return Timer::CheckExpiredTimer(false);
+}
+
+bool Timer

[Libreoffice-commits] core.git: Branch 'feature/priorities' - include/vcl vcl/source

2015-01-19 Thread Tobias Madl
 include/vcl/idle.hxx|   13 ++---
 vcl/source/app/idle.cxx |   11 ---
 2 files changed, 14 insertions(+), 10 deletions(-)

New commits:
commit 7d40d5fbf0464725f85b24c1dcbe568b3a162c35
Author: Tobias Madl tobias.madl@gmail.com
Date:   Mon Jan 19 16:30:23 2015 +

Added Comments

Change-Id: I093b4812bf3b75d6a6f3c8ea38755619f5c9d151

diff --git a/include/vcl/idle.hxx b/include/vcl/idle.hxx
index da0a5c7..5a46462 100644
--- a/include/vcl/idle.hxx
+++ b/include/vcl/idle.hxx
@@ -27,6 +27,7 @@
 struct ImplIdleData;
 struct ImplSVData;
 
+// The timemarks behind the priorities is the catgorizing of timer to idle
 enum class IdlePriority {
 VCL_IDLE_PRIORITY_STARVATIONPROTECTION  = -1, // Do not use this for 
normal prioritizing
 VCL_IDLE_PRIORITY_HIGHEST   = 0, // - 0ms
@@ -41,16 +42,14 @@ enum class IdlePriority {
 };
 
 
-// To port from Timer - Idle switch class name,
-// s/Timeout/DoIdle/ etc. and select priority
 class VCL_DLLPUBLIC Idle
 {
 protected:
-ImplIdleData*   mpIdleData;
-IdlePrioritymePriority;
-IdlePrioritymeDefaultPriority;
-boolmbActive;
-LinkmaIdleHdl;
+ImplIdleData*   mpIdleData; // Pointer to element in idle list
+IdlePrioritymePriority; // Idle priority ( maybe divergent to 
default)
+IdlePrioritymeDefaultPriority;  // Default idle priority
+boolmbActive;   // Currently in the scheduler
+LinkmaIdleHdl;  // Callback Link
 
 friend struct ImplIdleData;
 
diff --git a/vcl/source/app/idle.cxx b/vcl/source/app/idle.cxx
index c3e24e1..6ad03d2 100644
--- a/vcl/source/app/idle.cxx
+++ b/vcl/source/app/idle.cxx
@@ -59,7 +59,7 @@ struct ImplIdleData
 pMostUrgent = p;
 else
 {
-// Find the highest priority one somehow.
+// Find the highest priority.
 if ( p-mpIdle-GetPriority()  
pMostUrgent-mpIdle-GetPriority() )
 {
 IncreasePriority(pMostUrgent-mpIdle);
@@ -77,8 +77,10 @@ struct ImplIdleData
 {
 switch(pIdle-GetPriority())
 {
+// Increase priority based on their current priority
 case IdlePriority::VCL_IDLE_PRIORITY_STARVATIONPROTECTION:
 break;
+// If already highest priority - extra state for starving tasks
 case IdlePriority::VCL_IDLE_PRIORITY_HIGHEST:
 
pIdle-SetPriority(IdlePriority::VCL_IDLE_PRIORITY_STARVATIONPROTECTION);
 break;
@@ -142,7 +144,7 @@ void Idle::ProcessAllIdleHandlers()
 pIdleData = pSVData-mpFirstIdleData;
 while ( pIdleData )
 {
-// Was timer destroyed in the meantime?
+// Was Idle destroyed in the meantime?
 if ( pIdleData-mbDelete )
 {
 if ( pPrevIdleData )
@@ -166,6 +168,8 @@ void Idle::ProcessAllIdleHandlers()
 void Idle::SetPriority( IdlePriority ePriority )
 {
 mePriority = ePriority;
+// Was a new priority set before excecution?
+// Then take it as default priority
 if( !mbActive  meDefaultPriority == 
IdlePriority::VCL_IDLE_PRIORITY_DEFAULT )
 meDefaultPriority = mePriority;
 }
@@ -177,12 +181,13 @@ void Idle::DoIdle()
 
 void Idle::Start()
 {
+// Mark timer active
 mbActive = true;
 
 ImplSVData* pSVData = ImplGetSVData();
 if ( !mpIdleData )
 {
-// insert timer and start
+// insert Idle
 mpIdleData = new ImplIdleData;
 mpIdleData-mpIdle= this;
 mpIdleData-mbInIdle= false;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/priorities' - include/vcl vcl/source

2015-01-16 Thread Tobias Madl
 include/vcl/idle.hxx |   22 +++-
 include/vcl/timer.hxx|1 
 vcl/source/app/idle.cxx  |   51 +--
 vcl/source/app/timer.cxx |   25 +++
 4 files changed, 88 insertions(+), 11 deletions(-)

New commits:
commit f3e757ea37d176f70605bbadbb1b5018f9fbce9f
Author: Tobias Madl tobias.madl@gmail.com
Date:   Fri Jan 16 13:28:29 2015 +

Scheduling optimization and starving protection

If a Timeout appears, while the idle scheduling is in progress.
The idle scheduler gets interrupted and the timeouts are handled.
Now the idle scheduler has a new starving protection.

Change-Id: Ic9081c647e3fb0abf3b0dc014e711a3b97e0e37d

diff --git a/include/vcl/idle.hxx b/include/vcl/idle.hxx
index 9da8414..da0a5c7 100644
--- a/include/vcl/idle.hxx
+++ b/include/vcl/idle.hxx
@@ -28,14 +28,16 @@ struct ImplIdleData;
 struct ImplSVData;
 
 enum class IdlePriority {
-VCL_IDLE_PRIORITY_HIGHEST   = 0, // - 0ms
-VCL_IDLE_PRIORITY_HIGH  = 1,// - 1ms
-VCL_IDLE_PRIORITY_REPAINT   = 2, // - 30ms
-VCL_IDLE_PRIORITY_RESIZE= 3,  // - 50ms
-VCL_IDLE_PRIORITY_MEDIUM= 4,  // - 50ms
-VCL_IDLE_PRIORITY_LOW   = 5, // - 100ms
-VCL_IDLE_PRIORITY_LOWER = 6,   // - 200ms
-VCL_IDLE_PRIORITY_LOWEST= 7   // - 400ms
+VCL_IDLE_PRIORITY_STARVATIONPROTECTION  = -1, // Do not use this for 
normal prioritizing
+VCL_IDLE_PRIORITY_HIGHEST   = 0, // - 0ms
+VCL_IDLE_PRIORITY_HIGH  = 1,// - 1ms
+VCL_IDLE_PRIORITY_DEFAULT   = 1,// - 1ms
+VCL_IDLE_PRIORITY_REPAINT   = 2, // - 30ms
+VCL_IDLE_PRIORITY_RESIZE= 3,  // - 50ms
+VCL_IDLE_PRIORITY_MEDIUM= 3,  // - 50ms
+VCL_IDLE_PRIORITY_LOW   = 5, // - 100ms
+VCL_IDLE_PRIORITY_LOWER = 6,   // - 200ms
+VCL_IDLE_PRIORITY_LOWEST= 7   // - 400ms
 };
 
 
@@ -46,6 +48,7 @@ class VCL_DLLPUBLIC Idle
 protected:
 ImplIdleData*   mpIdleData;
 IdlePrioritymePriority;
+IdlePrioritymeDefaultPriority;
 boolmbActive;
 LinkmaIdleHdl;
 
@@ -56,8 +59,9 @@ public:
 Idle( const Idle rIdle );
 virtual ~Idle();
 
-void SetPriority( IdlePriority ePriority ) { mePriority = ePriority; }
+void SetPriority( IdlePriority ePriority );
 IdlePriority GetPriority() const { return mePriority; }
+IdlePriority GetDefaultPriority() const { return meDefaultPriority; }
 
 /// Make it possible to associate a callback with this idle handler
 /// of course, you can also sub-class and override 'DoIdle'
diff --git a/include/vcl/timer.hxx b/include/vcl/timer.hxx
index ea65d6f..3aca8e5 100644
--- a/include/vcl/timer.hxx
+++ b/include/vcl/timer.hxx
@@ -62,6 +62,7 @@ public:
 
 static void ImplDeInitTimer();
 static void ImplTimerCallbackProc();
+static bool TimerReady();
 };
 
 /// An auto-timer is a multi-shot timer re-emitting itself at
diff --git a/vcl/source/app/idle.cxx b/vcl/source/app/idle.cxx
index 15427d6..74f0eaf 100644
--- a/vcl/source/app/idle.cxx
+++ b/vcl/source/app/idle.cxx
@@ -19,6 +19,7 @@
 
 #include vcl/svapp.hxx
 #include vcl/idle.hxx
+#include vcl/timer.hxx
 
 #include svdata.hxx
 #include salinst.hxx
@@ -35,6 +36,7 @@ struct ImplIdleData
 if (mbDelete || mbInIdle )
 return;
 
+mpIdle-SetPriority(mpIdle-GetDefaultPriority());
 mbDelete = true;
 mpIdle-mbActive = false;
 
@@ -59,12 +61,47 @@ struct ImplIdleData
 {
 // Find the highest priority one somehow.
 if ( p-mpIdle-GetPriority()  
pMostUrgent-mpIdle-GetPriority() )
+{
+IncreasePriority(pMostUrgent-mpIdle);
 pMostUrgent = p;
+}
+else
+IncreasePriority(p-mpIdle);
 }
 }
 
 return pMostUrgent;
 }
+
+static void IncreasePriority( Idle *pIdle )
+{
+switch(pIdle-GetPriority())
+{
+case IdlePriority::VCL_IDLE_PRIORITY_STARVATIONPROTECTION:
+break;
+case IdlePriority::VCL_IDLE_PRIORITY_HIGHEST:
+
pIdle-SetPriority(IdlePriority::VCL_IDLE_PRIORITY_STARVATIONPROTECTION);
+break;
+case IdlePriority::VCL_IDLE_PRIORITY_HIGH:
+pIdle-SetPriority(IdlePriority::VCL_IDLE_PRIORITY_HIGHEST);
+break;
+case IdlePriority::VCL_IDLE_PRIORITY_REPAINT:
+pIdle-SetPriority(IdlePriority::VCL_IDLE_PRIORITY_HIGH);
+break;
+case IdlePriority::VCL_IDLE_PRIORITY_MEDIUM:
+pIdle-SetPriority(IdlePriority::VCL_IDLE_PRIORITY_REPAINT);
+break;
+case IdlePriority::VCL_IDLE_PRIORITY_LOW:
+pIdle-SetPriority

[Libreoffice-commits] core.git: Branch 'feature/priorities' - 82 commits - android/Bootstrap android/experimental basctl/source chart2/source configure.ac cui/source dbaccess/source desktop/source dow

2015-01-15 Thread Tobias Madl
 277897193126b42adc31c9605c385073e0f1a1da
Author: Tobias Madl tobias.madl@gmail.com
Date:   Wed Jan 14 13:11:28 2015 +

Idle and Timer are now completely independent

And everything is functionating pretty well.

Change-Id: Id7f5a995362f6f7c5235f2e9facb7c7f119f3140

diff --git a/sfx2/source/appl/appcfg.cxx b/sfx2/source/appl/appcfg.cxx
index e750a87..7e6fb2b 100644
--- a/sfx2/source/appl/appcfg.cxx
+++ b/sfx2/source/appl/appcfg.cxx
@@ -91,7 +91,7 @@ public:
 virtual voidNotify( SfxBroadcaster rBC, const SfxHint rHint ) 
SAL_OVERRIDE;
 SfxEventAsyncer_Impl( const SfxEventHint rHint );
 virtual ~SfxEventAsyncer_Impl();
-DECL_LINK( TimerHdl, Timer*);
+DECL_LINK( IdleHdl, Idle*);
 };
 
 
@@ -114,7 +114,7 @@ SfxEventAsyncer_Impl::SfxEventAsyncer_Impl( const 
SfxEventHint rHint )
 if( rHint.GetObjShell() )
 StartListening( *rHint.GetObjShell() );
 pIdle = new Idle;
-pIdle-SetIdleHdl( LINK(this, SfxEventAsyncer_Impl, TimerHdl) );
+pIdle-SetIdleHdl( LINK(this, SfxEventAsyncer_Impl, IdleHdl) );
 pIdle-SetPriority( IdlePriority::VCL_IDLE_PRIORITY_HIGHEST );
 pIdle-Start();
 }
@@ -128,10 +128,10 @@ SfxEventAsyncer_Impl::~SfxEventAsyncer_Impl()
 
 
 
-IMPL_LINK(SfxEventAsyncer_Impl, TimerHdl, Timer*, pAsyncTimer)
+IMPL_LINK(SfxEventAsyncer_Impl, IdleHdl, Idle*, pAsyncIdle)
 {
 SfxObjectShellRef xRef( aHint.GetObjShell() );
-pAsyncTimer-Stop();
+pAsyncIdle-Stop();
 #ifdef DBG_UTIL
 if (!xRef.Is())
 {
diff --git a/sfx2/source/appl/appinit.cxx b/sfx2/source/appl/appinit.cxx
index 2c64e34..cc90544 100644
--- a/sfx2/source/appl/appinit.cxx
+++ b/sfx2/source/appl/appinit.cxx
@@ -47,6 +47,7 @@
 
 #include vcl/edit.hxx
 #include vcl/timer.hxx
+#include vcl/idle.hxx
 
 #include sfx2/unoctitm.hxx
 #include app.hrc
@@ -110,6 +111,7 @@ void SAL_CALL SfxTerminateListener_Impl::notifyTermination( 
const EventObject a
 // Timers may access the SfxApplication and are only deleted in
 // Application::Quit(), which is asynchronous (PostUserEvent) - disable!
 Timer::ImplDeInitTimer();
+Idle::ImplDeInitIdle();
 
 SfxApplication* pApp = SfxGetpApp();
 pApp-Broadcast( SfxSimpleHint( SFX_HINT_DEINITIALIZING ) );
diff --git a/vcl/source/app/svmain.cxx b/vcl/source/app/svmain.cxx
index 8ae3592..3187f59 100644
--- a/vcl/source/app/svmain.cxx
+++ b/vcl/source/app/svmain.cxx
@@ -35,6 +35,7 @@
 #include vcl/svapp.hxx
 #include vcl/wrkwin.hxx
 #include vcl/cvtgrf.hxx
+#include vcl/idle.hxx
 #include vcl/image.hxx
 #include vcl/settings.hxx
 #include vcl/unowrap.hxx
@@ -389,6 +390,7 @@ void DeInitVCL()
 if ( pSVData-maAppData.mpIdleMgr )
 delete pSVData-maAppData.mpIdleMgr;
 Timer::ImplDeInitTimer();
+Idle::ImplDeInitIdle;
 
 if ( pSVData-maWinData.mpMsgBoxImgList )
 {
commit 894acc98e73eeef25702a521962d49bd95129a64
Author: David Tardon dtar...@redhat.com
Date:   Tue Jan 13 10:27:23 2015 +0100

SwFlyLayFrm is already indirectly derived from noncopyable

Change-Id: Ic64b56a55d43efed8920eb1662fb9b6a5a2b5e14

diff --git a/sw/source/core/inc/flyfrms.hxx b/sw/source/core/inc/flyfrms.hxx
index 82b1b96..489e475 100644
--- a/sw/source/core/inc/flyfrms.hxx
+++ b/sw/source/core/inc/flyfrms.hxx
@@ -21,8 +21,6 @@
 
 #include sal/config.h
 
-#include boost/noncopyable.hpp
-
 #include flyfrm.hxx
 
 // #i28701#
@@ -123,7 +121,7 @@ public:
 };
 
 // Flys that are bound to LayoutFrms and not to Cntnt
-class SwFlyLayFrm : public SwFlyFreeFrm, private boost::noncopyable
+class SwFlyLayFrm : public SwFlyFreeFrm
 {
 public:
 // #i28701#
commit 3ad1e5d4d19e62986d59c86675c600abc0e7fccd
Author: Stephan Bergmann sberg...@redhat.com
Date:   Tue Jan 13 10:07:34 2015 +0100

Improve ImplLogicToPixel overflow check

Change-Id: Ib0554f6d489e410527d7bf4dc77f76db1bdbf1fc

diff --git a/vcl/source/outdev/map.cxx b/vcl/source/outdev/map.cxx
index 5117471..7a9cc0c 100644
--- a/vcl/source/outdev/map.cxx
+++ b/vcl/source/outdev/map.cxx
@@ -17,7 +17,11 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include sal/config.h
+
+#include cstdlib
 #include limits.h
+
 #include o3tl/numeric.hxx
 #include tools/bigint.hxx
 
@@ -382,7 +386,9 @@ static long ImplLogicToPixel( long n, long nDPI, long 
nMapNum, long nMapDenom,
 }
 else
 #else
-assert(n  std::numeric_limitslong::max() / nMapNum); //detect overflows
+assert(nMapNum  0);
+assert(nDPI  0);
+assert(std::abs(n)  std::numeric_limitslong::max() / nMapNum / nDPI); 
//detect overflows
 #endif
 {
sal_Int64 n64 = n;
commit 724aa55c9e888fc4f22fea0bad1daa8b1fe94349
Author: Stephan Bergmann sberg...@redhat.com
Date:   Tue Jan 13 10:02:57 2015 +0100

Exclude FAR_AWAY objects from bounds computation

...otherwise, running CppunitTest_writerperfect_writer would overflow in
ImplLogicToPixel (vcl/source/outdev/map.cxx) when nMaxRight would be
ridiculously large due to including the ridiculously large right bound

[Libreoffice-commits] core.git: Branch 'feature/priorities' - avmedia/inc avmedia/source basctl/source cui/source desktop/source extensions/source forms/source formula/source include/sfx2 include/svto

2015-01-14 Thread Tobias Madl
  |1 +
 sw/source/ui/dbui/mmoutputtypepage.cxx|3 ++-
 sw/source/ui/envelp/labfmt.cxx|2 +-
 sw/source/ui/envelp/labfmt.hxx|1 +
 sw/source/uibase/docvw/edtwin.cxx |2 +-
 sw/source/uibase/docvw/srcedtw.cxx|2 +-
 sw/source/uibase/inc/edtwin.hxx   |1 +
 sw/source/uibase/inc/navipi.hxx   |1 +
 sw/source/uibase/inc/unotools.hxx |1 +
 sw/source/uibase/utlui/navipi.cxx |2 +-
 sw/source/uibase/utlui/unotools.cxx   |2 +-
 vcl/generic/print/genprnpsp.cxx   |3 ++-
 vcl/source/edit/textdat2.hxx  |1 +
 94 files changed, 126 insertions(+), 76 deletions(-)

New commits:
commit d238d4dadce888678e9d342075cd3bba661c50c0
Author: Tobias Madl tobias.madl@gmail.com
Date:   Wed Jan 14 10:21:20 2015 +0100

Timer: Adapted all idle includes and enum uses

Change-Id: Id4ef36d6c80ad62306bdbaa7094c2cb0b8ff77da

diff --git a/avmedia/inc/mediacontrol.hxx b/avmedia/inc/mediacontrol.hxx
index 4d367a5..c6e0622 100644
--- a/avmedia/inc/mediacontrol.hxx
+++ b/avmedia/inc/mediacontrol.hxx
@@ -23,6 +23,7 @@
 #include avmedia/mediaitem.hxx
 
 #include vcl/timer.hxx
+#include vcl/idle.hxx
 #include vcl/slider.hxx
 #include vcl/toolbox.hxx
 #include vcl/edit.hxx
diff --git a/avmedia/source/framework/mediacontrol.cxx 
b/avmedia/source/framework/mediacontrol.cxx
index 9c92ffa..431108b 100644
--- a/avmedia/source/framework/mediacontrol.cxx
+++ b/avmedia/source/framework/mediacontrol.cxx
@@ -187,7 +187,7 @@ MediaControl::MediaControl( vcl::Window* pParent, 
MediaControlStyle eControlStyl
 maMinSize.Height() = ( maMinSize.Height()  1 ) + 
AVMEDIA_CONTROLOFFSET;
 }
 
-maIdle.SetPriority( VCL_IDLE_PRIORITY_LOW );
+maIdle.SetPriority( IdlePriority::VCL_IDLE_PRIORITY_LOW );
 maIdle.SetIdleHdl( LINK( this, MediaControl, implTimeoutHdl ) );
 maIdle.Start();
 }
diff --git a/avmedia/source/framework/soundhandler.cxx 
b/avmedia/source/framework/soundhandler.cxx
index 9017a52..9195401 100644
--- a/avmedia/source/framework/soundhandler.cxx
+++ b/avmedia/source/framework/soundhandler.cxx
@@ -263,7 +263,7 @@ void SAL_CALL SoundHandler::dispatchWithNotification(const 
css::util::URL
 // Count this request and initialize self-holder against dying by uno 
ref count ...
 m_xSelfHold = css::uno::Reference css::uno::XInterface (static_cast 
::cppu::OWeakObject* (this), css::uno::UNO_QUERY);
 m_xPlayer-start();
-m_aUpdateIdle.SetPriority( VCL_IDLE_PRIORITY_LOWER );
+m_aUpdateIdle.SetPriority( IdlePriority::VCL_IDLE_PRIORITY_LOWER );
 m_aUpdateIdle.Start();
 }
 catch( css::uno::Exception e )
diff --git a/avmedia/source/framework/soundhandler.hxx 
b/avmedia/source/framework/soundhandler.hxx
index 687bbb2..09cd8fd 100644
--- a/avmedia/source/framework/soundhandler.hxx
+++ b/avmedia/source/framework/soundhandler.hxx
@@ -36,6 +36,7 @@
 #include cppuhelper/weak.hxx
 
 #include vcl/timer.hxx
+#include vcl/idle.hxx
 #include tools/link.hxx
 #include avmedia/mediawindow.hxx
 #include osl/mutex.hxx
diff --git a/basctl/source/basicide/baside2.hxx 
b/basctl/source/basicide/baside2.hxx
index 1008643..4eced19 100644
--- a/basctl/source/basicide/baside2.hxx
+++ b/basctl/source/basicide/baside2.hxx
@@ -35,6 +35,7 @@ class SvxSearchItem;
 #include vcl/button.hxx
 #include basic/sbmod.hxx
 #include vcl/lstbox.hxx
+#include vcl/idle.hxx
 
 #include sfx2/progress.hxx
 
diff --git a/basctl/source/basicide/baside2b.cxx 
b/basctl/source/basicide/baside2b.cxx
index cdd734d..0540ea5 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -950,7 +950,7 @@ void EditorWindow::CreateEditEngine()
 
 ImplSetFont();
 
-aSyntaxIdle.SetPriority( VCL_IDLE_PRIORITY_LOWER );
+aSyntaxIdle.SetPriority( IdlePriority::VCL_IDLE_PRIORITY_LOWER );
 aSyntaxIdle.SetIdleHdl( LINK( this, EditorWindow, SyntaxTimerHdl ) );
 
 bool bWasDoSyntaxHighlight = bDoSyntaxHighlight;
diff --git a/basctl/source/dlged/dlged.cxx b/basctl/source/dlged/dlged.cxx
index b45544c..44c9331 100644
--- a/basctl/source/dlged/dlged.cxx
+++ b/basctl/source/dlged/dlged.cxx
@@ -220,7 +220,7 @@ DlgEditor::DlgEditor (
 m_ClipboardDataFlavorsResource[1].HumanPresentableName = Dialog 8.0 ;
 m_ClipboardDataFlavorsResource[1].DataType = ::getCppuType( 
(const Sequence sal_Int8 *) 0 );
 
-aMarkIdle.SetPriority(VCL_IDLE_PRIORITY_LOW);
+aMarkIdle.SetPriority(IdlePriority::VCL_IDLE_PRIORITY_LOW);
 aMarkIdle.SetIdleHdl( LINK( this, DlgEditor, MarkTimeout ) );
 
 rWindow.SetMapMode( MapMode( MAP_100TH_MM ) );
diff --git a/basctl/source/inc/dlged.hxx b/basctl/source/inc/dlged.hxx
index cd722fe..fda829d 100644
--- a/basctl/source/inc/dlged.hxx
+++ b/basctl/source/inc/dlged.hxx
@@ -29,6 +29,7 @@
 #include svl/hint.hxx

[Libreoffice-commits] core.git: Branch 'feature/priorities' - basctl/source cui/source dbaccess/source linguistic/source sc/source starmath/inc starmath/source svx/inc svx/source sw/source toolkit/sou

2015-01-14 Thread Tobias Madl
 basctl/source/basicide/baside2b.cxx   |2 +-
 cui/source/inc/backgrnd.hxx   |2 +-
 cui/source/tabpages/backgrnd.cxx  |8 
 cui/source/tabpages/macroass.cxx  |2 +-
 dbaccess/source/ui/inc/JoinTableView.hxx  |1 +
 dbaccess/source/ui/querydesign/JoinTableView.cxx  |2 +-
 linguistic/source/lngsvcmgr.hxx   |1 +
 sc/source/ui/dbgui/sfiltdlg.cxx   |2 +-
 sc/source/ui/inc/navipi.hxx   |2 +-
 sc/source/ui/navipi/navipi.cxx|6 +++---
 starmath/inc/edit.hxx |4 ++--
 starmath/source/edit.cxx  |4 ++--
 svx/inc/sdr/contact/objectcontactofpageview.hxx   |1 +
 svx/source/inc/eventhandler.hxx   |3 ++-
 svx/source/sdr/contact/objectcontactofpageview.cxx|2 +-
 svx/source/sdr/contact/viewobjectcontactofpageobj.cxx |3 ++-
 sw/source/uibase/inc/srcedtw.hxx  |1 +
 toolkit/source/awt/vclxtoolkit.cxx|3 ++-
 vcl/Library_vcl.mk|1 +
 vcl/qa/cppunit/timer.cxx  |8 +---
 vcl/source/app/idle.cxx   |9 +
 vcl/source/edit/textdata.cxx  |2 +-
 22 files changed, 40 insertions(+), 29 deletions(-)

New commits:
commit b26abd5a75444714cdb3d8fc4c00161f96ab06c6
Author: Tobias Madl tobias.madl@gmail.com
Date:   Wed Jan 14 13:11:28 2015 +

Idle and Timer are now completely independent

And everything is functionating pretty well.

Change-Id: Id7f5a995362f6f7c5235f2e9facb7c7f119f3140

diff --git a/basctl/source/basicide/baside2b.cxx 
b/basctl/source/basicide/baside2b.cxx
index 0540ea5..3a2789c 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -1334,7 +1334,7 @@ void EditorWindow::DestroyProgress()
 void EditorWindow::ForceSyntaxTimeout()
 {
 aSyntaxIdle.Stop();
-aSyntaxIdle.GetTimeoutHdl().Call(aSyntaxIdle);
+aSyntaxIdle.GetIdleHdl().Call(aSyntaxIdle);
 }
 
 
diff --git a/cui/source/inc/backgrnd.hxx b/cui/source/inc/backgrnd.hxx
index ab4145f..9e34d66 100644
--- a/cui/source/inc/backgrnd.hxx
+++ b/cui/source/inc/backgrnd.hxx
@@ -137,7 +137,7 @@ private:
 boolFillItemSetWithWallpaperItem( SfxItemSet rCoreSet, 
sal_uInt16 nSlot);
 voidResetFromWallpaperItem( const SfxItemSet rSet );
 
-DECL_LINK( LoadTimerHdl_Impl, Timer* );
+DECL_LINK( LoadIdleHdl_Impl, Idle* );
 DECL_LINK(SelectHdl_Impl, void *);
 DECL_LINK(BrowseHdl_Impl, void *);
 DECL_LINK( RadioClickHdl_Impl, RadioButton* );
diff --git a/cui/source/tabpages/backgrnd.cxx b/cui/source/tabpages/backgrnd.cxx
index 1b27534..4217da6 100644
--- a/cui/source/tabpages/backgrnd.cxx
+++ b/cui/source/tabpages/backgrnd.cxx
@@ -723,7 +723,7 @@ bool SvxBackgroundTabPage::FillItemSet( SfxItemSet* 
rCoreSet )
 if ( pPageImpl-pLoadIdle  pPageImpl-pLoadIdle-IsActive() )
 {
 pPageImpl-pLoadIdle-Stop();
-LoadTimerHdl_Impl( pPageImpl-pLoadIdle );
+LoadIdleHdl_Impl( pPageImpl-pLoadIdle );
 }
 // os: Such a nonsense! One will always find such an item somewhere,
 // but it must be existing in the rSet!
@@ -1095,7 +1095,7 @@ void SvxBackgroundTabPage::ShowSelector()
 pPageImpl-pLoadIdle = new Idle;
 pPageImpl-pLoadIdle-SetPriority( 
IdlePriority::VCL_IDLE_PRIORITY_LOWEST );
 pPageImpl-pLoadIdle-SetIdleHdl(
-LINK( this, SvxBackgroundTabPage, LoadTimerHdl_Impl ) );
+LINK( this, SvxBackgroundTabPage, LoadIdleHdl_Impl ) );
 
 bAllowShowSelector = false;
 
@@ -1453,7 +1453,7 @@ IMPL_LINK_NOARG(SvxBackgroundTabPage, BrowseHdl_Impl)
 
 
 
-IMPL_LINK( SvxBackgroundTabPage, LoadTimerHdl_Impl, Timer* , pTimer )
+IMPL_LINK( SvxBackgroundTabPage, LoadIdleHdl_Impl, Idle* , pIdle )
 
 /*  [Description]
 
@@ -1463,7 +1463,7 @@ IMPL_LINK( SvxBackgroundTabPage, LoadTimerHdl_Impl, 
Timer* , pTimer )
 */
 
 {
-if ( pTimer == pPageImpl-pLoadIdle )
+if ( pIdle == pPageImpl-pLoadIdle )
 {
 pPageImpl-pLoadIdle-Stop();
 
diff --git a/cui/source/tabpages/macroass.cxx b/cui/source/tabpages/macroass.cxx
index a4a23b2..3a160a0 100644
--- a/cui/source/tabpages/macroass.cxx
+++ b/cui/source/tabpages/macroass.cxx
@@ -189,7 +189,7 @@ bool _SfxMacroTabPage::FillItemSet( SfxItemSet* rSet )
 
 void _SfxMacroTabPage::LaunchFillGroup()
 {
-if (!mpImpl-maFillGroupIdle.GetTimeoutHdl().IsSet())
+if (!mpImpl-maFillGroupIdle.GetIdleHdl().IsSet())
 {
 mpImpl-maFillGroupIdle.SetIdleHdl( STATIC_LINK( this, 
_SfxMacroTabPage, TimeOut_Impl ) );
 mpImpl-maFillGroupIdle.SetPriority( 
IdlePriority::VCL_IDLE_PRIORITY_HIGHEST );
diff --git a/dbaccess/source/ui/inc

[Libreoffice-commits] core.git: Branch 'feature/priorities' - include/vcl vcl/inc vcl/source

2015-01-13 Thread Tobias Madl
 include/vcl/idle.hxx |   84 ++
 include/vcl/timer.hxx|   41 
 vcl/inc/svdata.hxx   |3 
 vcl/inc/window.h |1 
 vcl/source/app/idle.cxx  |  218 +++
 vcl/source/app/svapp.cxx |3 
 vcl/source/app/timer.cxx |   98 -
 7 files changed, 310 insertions(+), 138 deletions(-)

New commits:
commit f23d12b5fc9e1750972b0f67cff8b6ac40538469
Author: Tobias Madl tobias.madl@gmail.com
Date:   Wed Jan 14 08:29:37 2015 +0100

Idle: Idle and Timer completely independend

Now the Idle and Timer are divided in two seperate classes. But now all 
changed
idles need a new import, before the programm is working again.

Change-Id: I5be7424622b6fcc993c621fa4a11fbee1b6d9bf2

diff --git a/include/vcl/idle.hxx b/include/vcl/idle.hxx
new file mode 100644
index 000..9da8414
--- /dev/null
+++ b/include/vcl/idle.hxx
@@ -0,0 +1,84 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the License); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_VCL_IDLE_HXX
+#define INCLUDED_VCL_IDLE_HXX
+
+#include tools/link.hxx
+#include tools/solar.h
+#include vcl/dllapi.h
+
+struct ImplIdleData;
+struct ImplSVData;
+
+enum class IdlePriority {
+VCL_IDLE_PRIORITY_HIGHEST   = 0, // - 0ms
+VCL_IDLE_PRIORITY_HIGH  = 1,// - 1ms
+VCL_IDLE_PRIORITY_REPAINT   = 2, // - 30ms
+VCL_IDLE_PRIORITY_RESIZE= 3,  // - 50ms
+VCL_IDLE_PRIORITY_MEDIUM= 4,  // - 50ms
+VCL_IDLE_PRIORITY_LOW   = 5, // - 100ms
+VCL_IDLE_PRIORITY_LOWER = 6,   // - 200ms
+VCL_IDLE_PRIORITY_LOWEST= 7   // - 400ms
+};
+
+
+// To port from Timer - Idle switch class name,
+// s/Timeout/DoIdle/ etc. and select priority
+class VCL_DLLPUBLIC Idle
+{
+protected:
+ImplIdleData*   mpIdleData;
+IdlePrioritymePriority;
+boolmbActive;
+LinkmaIdleHdl;
+
+friend struct ImplIdleData;
+
+public:
+Idle();
+Idle( const Idle rIdle );
+virtual ~Idle();
+
+void SetPriority( IdlePriority ePriority ) { mePriority = ePriority; }
+IdlePriority GetPriority() const { return mePriority; }
+
+/// Make it possible to associate a callback with this idle handler
+/// of course, you can also sub-class and override 'DoIdle'
+voidSetIdleHdl( const Link rLink ) { maIdleHdl = rLink; }
+const Link GetIdleHdl() const  { return maIdleHdl; }
+
+virtual voidDoIdle();
+
+voidStart();
+voidStop();
+
+boolIsActive() const { return mbActive; }
+
+Idle  operator=( const Idle rIdle );
+static void ImplDeInitIdle();
+static void ImplIdleCallbackProc();
+
+/// Process all pending idle tasks ahead of time in priority order.
+static void ProcessAllIdleHandlers();
+};
+
+#endif // INCLUDED_VCL_IDLE_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/vcl/timer.hxx b/include/vcl/timer.hxx
index 11e8f3f..ea65d6f 100644
--- a/include/vcl/timer.hxx
+++ b/include/vcl/timer.hxx
@@ -35,7 +35,6 @@ protected:
 sal_uLong   mnTimeout;
 boolmbActive;
 boolmbAuto;
-boolmbIdle;
 LinkmaTimeoutHdl;
 
 friend struct ImplTimerData;
@@ -63,9 +62,6 @@ public:
 
 static void ImplDeInitTimer();
 static void ImplTimerCallbackProc();
-
-/// Process all pending idle tasks ahead of time in priority order.
-static void ProcessAllIdleHandlers();
 };
 
 /// An auto-timer is a multi-shot timer re-emitting itself at
@@ -78,43 +74,6 @@ public:
 
 AutoTimer  operator=( const AutoTimer rTimer );
 };
-
-enum IdlePriority {
-VCL_IDLE_PRIORITY_HIGHEST, // - 0ms
-VCL_IDLE_PRIORITY_HIGH,// - 1ms
-VCL_IDLE_PRIORITY_REPAINT, // - 30ms
-VCL_IDLE_PRIORITY_RESIZE,  // - 50ms
-VCL_IDLE_PRIORITY_MEDIUM,  // - 50ms
-VCL_IDLE_PRIORITY_LOW, // - 100ms
-VCL_IDLE_PRIORITY_LOWER,   // - 200ms
-VCL_IDLE_PRIORITY_LOWEST   // - 400ms
-};
-
-
-// To port from Timer - Idle switch class name,
-// s/Timeout/DoIdle/ etc. and select

[Libreoffice-commits] core.git: Branch 'feature/priorities' - vcl/source

2015-01-13 Thread Tobias Madl
 vcl/source/app/svapp.cxx |4 +++-
 vcl/source/app/timer.cxx |3 ++-
 2 files changed, 5 insertions(+), 2 deletions(-)

New commits:
commit a373e59936a31a81d013869cf3b6cec2711ddab7
Author: Tobias Madl tobias.madl@gmail.com
Date:   Tue Jan 13 09:14:46 2015 +

Idle: Better place for Idle handling

Change-Id: I2e5462544d83572e8206bb1db92a2b9df032281b

diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx
index 0ed3219..cba619a 100644
--- a/vcl/source/app/svapp.cxx
+++ b/vcl/source/app/svapp.cxx
@@ -354,9 +354,11 @@ inline void ImplYield( bool i_bWait, bool i_bAllEvents )
 {
 while ( pSVData-mbNotAllTimerCalled )
 Timer::ImplTimerCallbackProc();
-Timer::Timer::ProcessAllIdleHandlers();
 }
 
+//Process all idles
+Timer::Timer::ProcessAllIdleHandlers();
+
 pSVData-maAppData.mnDispatchLevel++;
 // do not wait for events if application was already quit; in that
 // case only dispatch events already available
diff --git a/vcl/source/app/timer.cxx b/vcl/source/app/timer.cxx
index 0dea56d..0348543 100644
--- a/vcl/source/app/timer.cxx
+++ b/vcl/source/app/timer.cxx
@@ -234,7 +234,8 @@ void Timer::ImplTimerCallbackProc()
 void Timer::ProcessAllIdleHandlers()
 {
 // process all pending Idle timers
-while (ImplTimerData* pTimerData =
+ImplTimerData* pTimerData;
+while (pTimerData =
 ImplTimerData::GetFirstIdle())
 {
 pTimerData-Invoke();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/priorities' - 2 commits - editeng/source sc/inc sc/source sd/source svtools/source sw/source vcl/source

2014-12-19 Thread Tobias Madl
 editeng/source/editeng/impedit.hxx|6 -
 editeng/source/editeng/impedit2.cxx   |6 -
 editeng/source/editeng/impedit3.cxx   |2 
 editeng/source/editeng/impedit4.cxx   |4 
 sc/inc/scmod.hxx  |2 
 sc/source/ui/app/scmod.cxx|   47 --
 sd/source/ui/framework/configuration/ConfigurationUpdater.cxx |   20 ++--
 sd/source/ui/framework/configuration/ConfigurationUpdater.hxx |2 
 sd/source/ui/slidesorter/cache/SlsQueueProcessor.cxx  |   18 +--
 sd/source/ui/slidesorter/cache/SlsQueueProcessor.hxx  |2 
 svtools/source/graphic/grfcache.cxx   |6 -
 svtools/source/graphic/grfcache.hxx   |2 
 sw/source/core/doc/DocumentTimerManager.cxx   |   18 +--
 sw/source/core/inc/DocumentTimerManager.hxx   |2 
 vcl/source/app/svapp.cxx  |3 
 vcl/source/app/timer.cxx  |2 
 16 files changed, 90 insertions(+), 52 deletions(-)

New commits:
commit a3b404e21e7ffd74b1456f3e150f6ca361480c1d
Author: Tobias Madl tobias.madl@gmail.com
Date:   Fri Dec 19 13:02:50 2014 +

Timer: first independend idle use

Change-Id: I27985e456447ef3d71cae39c2acaf59b3aa60b83

diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx
index 7c4a76d..17c589e 100644
--- a/vcl/source/app/svapp.cxx
+++ b/vcl/source/app/svapp.cxx
@@ -355,8 +355,11 @@ inline void ImplYield( bool i_bWait, bool i_bAllEvents )
 
 // run timers that have timed out
 if ( !pSVData-mbNoCallTimer )
+{
 while ( pSVData-mbNotAllTimerCalled )
 Timer::ImplTimerCallbackProc();
+Timer::Timer::ProcessAllIdleHandlers();
+}
 
 pSVData-maAppData.mnDispatchLevel++;
 // do not wait for events if application was already quit; in that
diff --git a/vcl/source/app/timer.cxx b/vcl/source/app/timer.cxx
index 529c8b5..0dea56d 100644
--- a/vcl/source/app/timer.cxx
+++ b/vcl/source/app/timer.cxx
@@ -151,7 +151,7 @@ void Timer::ImplTimerCallbackProc()
 // If the timer is not new, was not deleted, and if it is not in the 
timeout handler, then
 // call the handler as soon as the time is up.
 if ( (pTimerData-mnTimerUpdate  pSVData-mnTimerUpdate) 
- !pTimerData-mbDelete  !pTimerData-mbInTimeout )
+ !pTimerData-mbDelete  !pTimerData-mbInTimeout  
!pTimerData-mpTimer-mbIdle)
 {
 // time has expired
 if ( pTimerData-GetDeadline() = nTime )
commit 256d5241f1a242f2e20608a0ded2554bfece9ac5
Author: Tobias Madl tobias.madl@gmail.com
Date:   Fri Dec 19 13:01:46 2014 +

Timer: Reversed some Idles to Timer

Change-Id: I213722cc98490430378014290cb09cca9e469bbb

diff --git a/editeng/source/editeng/impedit.hxx 
b/editeng/source/editeng/impedit.hxx
index f98f943..c6e41d4 100644
--- a/editeng/source/editeng/impedit.hxx
+++ b/editeng/source/editeng/impedit.hxx
@@ -465,7 +465,7 @@ private:
 
 IdleFormattter  aIdleFormatter;
 
-IdleaOnlineSpellIdle;
+Timer   aOnlineSpellTimer;
 
 // If it is detected at one point that the StatusHdl has to be called, but
 // this should not happen immediately (critical section):
@@ -979,8 +979,8 @@ public:
 
 inline EditEngine*  GetEditEnginePtr() const{ return pEditEngine; }
 
-voidStartOnlineSpellTimer() { 
aOnlineSpellIdle.Start(); }
-voidStopOnlineSpellTimer()  { aOnlineSpellIdle.Stop(); 
}
+voidStartOnlineSpellTimer() { 
aOnlineSpellTimer.Start(); }
+voidStopOnlineSpellTimer()  { 
aOnlineSpellTimer.Stop(); }
 
 const OUString GetAutoCompleteText() const { return 
aAutoCompleteText; }
 voidSetAutoCompleteText(const OUString rStr, bool 
bUpdateTipWindow);
diff --git a/editeng/source/editeng/impedit2.cxx 
b/editeng/source/editeng/impedit2.cxx
index f4b48b8..fcc9c24 100644
--- a/editeng/source/editeng/impedit2.cxx
+++ b/editeng/source/editeng/impedit2.cxx
@@ -148,8 +148,8 @@ ImpEditEngine::ImpEditEngine( EditEngine* pEE, SfxItemPool* 
pItemPool ) :
 aIdleFormatter.SetPriority( VCL_IDLE_PRIORITY_REPAINT );
 aIdleFormatter.SetIdleHdl( LINK( this, ImpEditEngine, IdleFormatHdl ) );
 
-aOnlineSpellIdle.SetPriority( VCL_IDLE_PRIORITY_LOW );
-aOnlineSpellIdle.SetIdleHdl( LINK( this, ImpEditEngine, OnlineSpellHdl ) );
+aOnlineSpellTimer.SetTimeout( 100 );
+aOnlineSpellTimer.SetTimeoutHdl( LINK( this, ImpEditEngine, OnlineSpellHdl 
) );
 
 // Access data already from here on!
 SetRefDevice( NULL );
@@ -163,7 +163,7 @@ ImpEditEngine::ImpEditEngine( EditEngine* pEE, SfxItemPool* 
pItemPool ) :
 ImpEditEngine::~ImpEditEngine

[Libreoffice-commits] core.git: filter/source include/filter sd/source

2014-12-14 Thread Tobias Madl
 filter/source/msfilter/svdfppt.cxx  |   35 ++-
 include/filter/msfilter/svdfppt.hxx |   60 ++-
 sd/source/filter/ppt/pptin.cxx  |  112 ++--
 3 files changed, 108 insertions(+), 99 deletions(-)

New commits:
commit e5a03da8eb02c333502d6b427625e7bf554ff203
Author: Tobias Madl tobias.madl@gmail.com
Date:   Fri Dec 12 13:16:41 2014 +

fdo#84938 replace PPT_PLACEHOLDER_ constants-enum

Change-Id: I4110fab17f42a747ec55b27445f28bdef873ef86
Reviewed-on: https://gerrit.libreoffice.org/13447
Reviewed-by: Noel Grandin noelgran...@gmail.com
Tested-by: Noel Grandin noelgran...@gmail.com

diff --git a/filter/source/msfilter/svdfppt.cxx 
b/filter/source/msfilter/svdfppt.cxx
index 3c0a205..744a7c3 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -295,7 +295,7 @@ void PptSlideLayoutAtom::Clear()
 {
 eLayout = PptSlideLayout::TITLESLIDE;
 for ( sal_uInt16 i = 0; i  8; i++ )
-aPlaceholderId[ i ] = 0;
+aPlaceholderId[ i ] = PptPlaceholder::NONE;
 }
 
 SvStream ReadPptSlideLayoutAtom( SvStream rIn, PptSlideLayoutAtom rAtom )
@@ -470,14 +470,17 @@ SvStream ReadPptUserEditAtom( SvStream rIn, 
PptUserEditAtom rAtom )
 void PptOEPlaceholderAtom::Clear()
 {
 nPlacementId = 0;
-nPlaceholderSize = nPlaceholderId = 0;
+nPlaceholderSize = 0;
+nPlaceholderId = PptPlaceholder::NONE;
 }
 
 SvStream ReadPptOEPlaceholderAtom( SvStream rIn, PptOEPlaceholderAtom rAtom 
)
 {
-rIn.ReadUInt32( rAtom.nPlacementId )
-   .ReadUChar( rAtom.nPlaceholderId )
-   .ReadUChar( rAtom.nPlaceholderSize );
+rIn.ReadUInt32( rAtom.nPlacementId );
+sal_uInt8 nTmp;
+rIn.ReadUChar(nTmp);
+rAtom.nPlaceholderId = static_castPptPlaceholder(nTmp);
+rIn.ReadUChar( rAtom.nPlaceholderSize );
 return rIn;
 }
 
@@ -746,13 +749,15 @@ SdrObject* SdrEscherImport::ProcessObj( SvStream rSt, 
DffObjData rObjData, voi
 {
 switch ( aPlaceholderAtom.nPlaceholderId )
 {
-case PPT_PLACEHOLDER_MASTERSLIDENUMBER :
nHeaderFooterInstance++;
+case PptPlaceholder::MASTERSLIDENUMBER :
nHeaderFooterInstance++;
 // fall-through
-case PPT_PLACEHOLDER_MASTERFOOTER : 
nHeaderFooterInstance++;
+case PptPlaceholder::MASTERFOOTER : 
nHeaderFooterInstance++;
 // fall-through
-case PPT_PLACEHOLDER_MASTERHEADER : 
nHeaderFooterInstance++;
+case PptPlaceholder::MASTERHEADER : 
nHeaderFooterInstance++;
 // fall-through
-case PPT_PLACEHOLDER_MASTERDATE :   
nHeaderFooterInstance++; break;
+case PptPlaceholder::MASTERDATE :   
nHeaderFooterInstance++; break;
+default: break;
+
 }
 if ( ! ( nHeaderFooterInstance  0xfffc ) ) // 
is this a valid instance ( 0-3 )
 rPersistEntry.HeaderFooterOfs[ 
nHeaderFooterInstance ] = rObjData.rSpHd.GetRecBegFilePos();
@@ -774,7 +779,7 @@ SdrObject* SdrEscherImport::ProcessObj( SvStream rSt, 
DffObjData rObjData, voi
 aClientDataHd.SeekToEndOfRecord( rSt );
 }
 }
-if ( ( aPlaceholderAtom.nPlaceholderId == 
PPT_PLACEHOLDER_NOTESSLIDEIMAGE )  ( rPersistEntry.bNotesMaster == false ) )
+if ( ( aPlaceholderAtom.nPlaceholderId == 
PptPlaceholder::NOTESSLIDEIMAGE )  ( rPersistEntry.bNotesMaster == false ) )
 {
 sal_uInt16 nPageNum = pSdrModel-GetPageCount();
 if ( nPageNum  0 )
@@ -961,14 +966,14 @@ SdrObject* SdrEscherImport::ProcessObj( SvStream rSt, 
DffObjData rObjData, voi
 }
 
 SdrObjKind eTextKind = OBJ_RECT;
-if ( ( aPlaceholderAtom.nPlaceholderId == 
PPT_PLACEHOLDER_NOTESSLIDEIMAGE )
-|| ( aPlaceholderAtom.nPlaceholderId == 
PPT_PLACEHOLDER_MASTERNOTESSLIDEIMAGE ) )
+if ( ( aPlaceholderAtom.nPlaceholderId == 
PptPlaceholder::NOTESSLIDEIMAGE )
+|| ( aPlaceholderAtom.nPlaceholderId == 
PptPlaceholder::MASTERNOTESSLIDEIMAGE ) )
 {
 aTextObj.SetInstance( 2 );
 eTextKind = OBJ_TITLETEXT;
 }
-else if ( ( aPlaceholderAtom.nPlaceholderId == 
PPT_PLACEHOLDER_MASTERNOTESBODYIMAGE )
-|| ( aPlaceholderAtom.nPlaceholderId == 
PPT_PLACEHOLDER_NOTESBODY ) )
+else if ( ( aPlaceholderAtom.nPlaceholderId == 
PptPlaceholder::MASTERNOTESBODYIMAGE

[Libreoffice-commits] core.git: filter/source include/filter sd/source

2014-12-12 Thread Tobias Madl
 filter/source/msfilter/svdfppt.cxx  |8 +++--
 include/filter/msfilter/svdfppt.hxx |   44 +++-
 sd/source/filter/ppt/pptin.cxx  |   56 ++--
 3 files changed, 57 insertions(+), 51 deletions(-)

New commits:
commit f5c5bab09f2e3a7e13a6b397faf4bdfcb898f295
Author: Tobias Madl tobias.madl@gmail.com
Date:   Thu Dec 11 14:45:53 2014 +

fdo#84938 replace PPT_LAYOUT_ constants with enum

Change-Id: I3c77e7e551bd4b657cb58fdfeead73d50441e890
Reviewed-on: https://gerrit.libreoffice.org/13437
Tested-by: LibreOffice gerrit bot ger...@libreoffice.org
Reviewed-by: Noel Grandin noelgran...@gmail.com

diff --git a/filter/source/msfilter/svdfppt.cxx 
b/filter/source/msfilter/svdfppt.cxx
index 0400f5b..c74fc49 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -293,14 +293,16 @@ SvStream ReadPptDocumentAtom(SvStream rIn, 
PptDocumentAtom rAtom)
 
 void PptSlideLayoutAtom::Clear()
 {
-eLayout = 0;
+eLayout = PptSlideLayout::TITLESLIDE;
 for ( sal_uInt16 i = 0; i  8; i++ )
 aPlaceholderId[ i ] = 0;
 }
 
 SvStream ReadPptSlideLayoutAtom( SvStream rIn, PptSlideLayoutAtom rAtom )
 {
-rIn.ReadInt32( rAtom.eLayout );
+sal_Int32 nTmp;
+rIn.ReadInt32(nTmp);
+rAtom.eLayout = static_castPptSlideLayout(nTmp);
 rIn.Read( rAtom.aPlaceholderId, 8 );
 return rIn;
 }
@@ -988,7 +990,7 @@ SdrObject* SdrEscherImport::ProcessObj( SvStream rSt, 
DffObjData rObjData, voi
 case TSS_TYPE_PAGETITLE :
 case TSS_TYPE_TITLE :
 {
-if ( GetSlideLayoutAtom()-eLayout == 
PPT_LAYOUT_TITLEMASTERSLIDE )
+if ( GetSlideLayoutAtom()-eLayout == 
PptSlideLayout::TITLEMASTERSLIDE )
 nDestinationInstance = TSS_TYPE_TITLE;
 else
 nDestinationInstance = TSS_TYPE_PAGETITLE;
diff --git a/include/filter/msfilter/svdfppt.hxx 
b/include/filter/msfilter/svdfppt.hxx
index c7a1912..43c846a 100644
--- a/include/filter/msfilter/svdfppt.hxx
+++ b/include/filter/msfilter/svdfppt.hxx
@@ -54,6 +54,7 @@ class SvxMSDffManager;
 class PPTTextObj;
 class DffRecordHeader;
 class SvxBulletItem;
+enum class PptSlideLayout;
 
 #define PPT_IMPORTFLAGS_NO_TEXT_ASSERT  1
 
@@ -194,7 +195,7 @@ public:
 
 struct PptSlideLayoutAtom
 {
-sal_Int32   eLayout;// 0..18
+PptSlideLayout  eLayout;// 0..18
 sal_uInt8   aPlaceholderId[ 8 ];
 
 public:
@@ -1574,25 +1575,28 @@ public :
 #define PPT_CharAttr_Escapement 19  //0008
 
 // values for PptSlideLayoutAtom.eLayout
-#define PPT_LAYOUT_TITLESLIDE   0   // The slide is a title slide
-#define PPT_LAYOUT_TITLEANDBODYSLIDE1   // Title and body slide
-#define PPT_LAYOUT_TITLEMASTERSLIDE 2   // Title master slide
-#define PPT_LAYOUT_MASTERSLIDE  3   // Master slide layout
-#define PPT_LAYOUT_MASTERNOTES  4   // Master notes layout
-#define PPT_LAYOUT_NOTESTITLEBODY   5   // Notes title/body layout
-#define PPT_LAYOUT_HANDOUTLAYOUT6   // Handout layout, therefore 
it doesn't have placeholders except header, footer, and date
-#define PPT_LAYOUT_ONLYTITLE7   // Only title placeholder
-#define PPT_LAYOUT_2COLUMNSANDTITLE 8   // Body of the slide has 2 
columns and a title
-#define PPT_LAYOUT_2ROWSANDTITLE9   // Slide's body has 2 rows and 
a title
-#define PPT_LAYOUT_RIGHTCOLUMN2ROWS 10  // Body contains 2 columns, 
right column has 2 rows
-#define PPT_LAYOUT_LEFTCOLUMN2ROWS  11  // Body contains 2 columns, 
left column has 2 rows
-#define PPT_LAYOUT_BOTTOMROW2COLUMNS12  // Body contains 2 rows, 
bottom row has 2 columns
-#define PPT_LAYOUT_TOPROW2COLUMN13  // Body contains 2 rows, top 
row has 2 columns
-#define PPT_LAYOUT_4OBJECTS 14  // 4 objects
-#define PPT_LAYOUT_BIGOBJECT15  // Big object
-#define PPT_LAYOUT_BLANCSLIDE   16  // Blank slide
-#define PPT_LAYOUT_TITLERIGHTBODYLEFT   17  // Vertical title on the 
right, body on the left
-#define PPT_LAYOUT_TITLERIGHT2BODIESLEFT18  // Vertical title on the 
right, body on the left split into 2 rows
+enum class PptSlideLayout
+{
+TITLESLIDE =  0,   // The slide is a title slide
+TITLEANDBODYSLIDE  =  1,   // Title and body slide
+TITLEMASTERSLIDE   =  2,   // Title master slide
+MASTERSLIDE=  3,   // Master slide layout
+MASTERNOTES=  4,   // Master notes layout
+NOTESTITLEBODY =  5,   // Notes title/body layout
+HANDOUTLAYOUT  =  6,   // Handout layout, therefore it doesn't 
have placeholders except header, footer, and date
+ONLYTITLE  =  7,   // Only title placeholder

[Libreoffice-commits] core.git: sd/source sfx2/source

2014-12-10 Thread Tobias Madl
 sd/source/ui/framework/module/ShellStackGuard.cxx |6 +++---
 sd/source/ui/framework/module/ShellStackGuard.hxx |2 +-
 sfx2/source/appl/newhelp.cxx  |   15 ++-
 sfx2/source/appl/newhelp.hxx  |3 ++-
 4 files changed, 16 insertions(+), 10 deletions(-)

New commits:
commit d1577ee1ed215d9d4adfcdc0a71e2cfec0f3ebda
Author: Tobias Madl tobias.madl@gmail.com
Date:   Wed Dec 10 11:01:48 2014 +

priorities: prevent future compatibility problems

Change-Id: I735bac570a0bed35d9ddc07e5f107fb696b49082

diff --git a/sd/source/ui/framework/module/ShellStackGuard.cxx 
b/sd/source/ui/framework/module/ShellStackGuard.cxx
index cf72edc..d567c20 100644
--- a/sd/source/ui/framework/module/ShellStackGuard.cxx
+++ b/sd/source/ui/framework/module/ShellStackGuard.cxx
@@ -118,12 +118,12 @@ void SAL_CALL ShellStackGuard::disposing (
 }
 }
 
-IMPL_LINK(ShellStackGuard, TimeoutHandler, Timer*, pTimer)
+IMPL_LINK(ShellStackGuard, TimeoutHandler, Idle*, pIdle)
 {
 #ifdef DEBUG
-OSL_ASSERT(pTimer==maPrinterPollingIdle);
+OSL_ASSERT(pIdle==maPrinterPollingIdle);
 #else
-(void)pTimer;
+(void)pIdle;
 #endif
 if (mpUpdateLock.get() != NULL)
 {
diff --git a/sd/source/ui/framework/module/ShellStackGuard.hxx 
b/sd/source/ui/framework/module/ShellStackGuard.hxx
index 227..c41158c 100644
--- a/sd/source/ui/framework/module/ShellStackGuard.hxx
+++ b/sd/source/ui/framework/module/ShellStackGuard.hxx
@@ -86,7 +86,7 @@ private:
 ::boost::scoped_ptrConfigurationController::Lock mpUpdateLock;
 Idle maPrinterPollingIdle;
 
-DECL_LINK(TimeoutHandler, Timer*);
+DECL_LINK(TimeoutHandler, Idle*);
 
 /** Return TRUE/ when the printer is printing.  Return FALSE/ when
 the printer is not printing, or there is no printer, or something
diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx
index 77265a2..cdad563 100644
--- a/sfx2/source/appl/newhelp.cxx
+++ b/sfx2/source/appl/newhelp.cxx
@@ -538,7 +538,7 @@ IndexTabPage_Impl::IndexTabPage_Impl(vcl::Window* pParent, 
SfxHelpIndexWindow_Im
 
 m_pOpenBtn-SetClickHdl( LINK( this, IndexTabPage_Impl, OpenHdl ) );
 Link aTimeoutLink = LINK( this, IndexTabPage_Impl, TimeoutHdl );
-aFactoryIdle.SetIdleHdl( aTimeoutLink );
+aFactoryIdle.SetIdleHdl( LINK(this, IndexTabPage_Impl, IdleHdl ));
 aFactoryIdle.SetPriority(VCL_IDLE_PRIORITY_LOWER);
 aKeywordTimer.SetTimeoutHdl( aTimeoutLink );
 }
@@ -708,12 +708,17 @@ IMPL_LINK_NOARG(IndexTabPage_Impl, OpenHdl)
 return 0;
 }
 
-IMPL_LINK( IndexTabPage_Impl, TimeoutHdl, Timer*, pTimer )
+IMPL_LINK( IndexTabPage_Impl, IdleHdl, Idle*, pIdle )
 {
-if ( aFactoryIdle == pTimer )
+if ( aFactoryIdle == pIdle )
 InitializeIndex();
-else if ( aKeywordTimer == pTimer  !sKeyword.isEmpty() )
-aKeywordLink.Call( this );
+return 0;
+}
+
+IMPL_LINK( IndexTabPage_Impl, TimeoutHdl, Timer*, pTimer)
+{
+if(aKeywordTimer == pTimer  !sKeyword.isEmpty())
+aKeywordLink.Call(this);
 return 0;
 }
 
diff --git a/sfx2/source/appl/newhelp.hxx b/sfx2/source/appl/newhelp.hxx
index e3f5202..95b8794 100644
--- a/sfx2/source/appl/newhelp.hxx
+++ b/sfx2/source/appl/newhelp.hxx
@@ -134,7 +134,8 @@ private:
 voidClearIndex();
 
 DECL_LINK(OpenHdl, void *);
-DECL_LINK(  TimeoutHdl, Timer* );
+DECL_LINK(IdleHdl, Idle* );
+DECL_LINK(TimeoutHdl, Timer*);
 
 public:
 IndexTabPage_Impl( vcl::Window* pParent, SfxHelpIndexWindow_Impl* _pIdxWin 
);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/priorities' - 3136 commits - accessibility/source android/Bootstrap android/experimental android/mobile-config.py android/Module_android.mk animations/s

2014-12-10 Thread Tobias Madl
Rebased ref, commits from common ancestor:
commit d1577ee1ed215d9d4adfcdc0a71e2cfec0f3ebda
Author: Tobias Madl tobias.madl@gmail.com
Date:   Wed Dec 10 11:01:48 2014 +

priorities: prevent future compatibility problems

Change-Id: I735bac570a0bed35d9ddc07e5f107fb696b49082

diff --git a/sd/source/ui/framework/module/ShellStackGuard.cxx 
b/sd/source/ui/framework/module/ShellStackGuard.cxx
index cf72edc..d567c20 100644
--- a/sd/source/ui/framework/module/ShellStackGuard.cxx
+++ b/sd/source/ui/framework/module/ShellStackGuard.cxx
@@ -118,12 +118,12 @@ void SAL_CALL ShellStackGuard::disposing (
 }
 }
 
-IMPL_LINK(ShellStackGuard, TimeoutHandler, Timer*, pTimer)
+IMPL_LINK(ShellStackGuard, TimeoutHandler, Idle*, pIdle)
 {
 #ifdef DEBUG
-OSL_ASSERT(pTimer==maPrinterPollingIdle);
+OSL_ASSERT(pIdle==maPrinterPollingIdle);
 #else
-(void)pTimer;
+(void)pIdle;
 #endif
 if (mpUpdateLock.get() != NULL)
 {
diff --git a/sd/source/ui/framework/module/ShellStackGuard.hxx 
b/sd/source/ui/framework/module/ShellStackGuard.hxx
index 227..c41158c 100644
--- a/sd/source/ui/framework/module/ShellStackGuard.hxx
+++ b/sd/source/ui/framework/module/ShellStackGuard.hxx
@@ -86,7 +86,7 @@ private:
 ::boost::scoped_ptrConfigurationController::Lock mpUpdateLock;
 Idle maPrinterPollingIdle;
 
-DECL_LINK(TimeoutHandler, Timer*);
+DECL_LINK(TimeoutHandler, Idle*);
 
 /** Return TRUE/ when the printer is printing.  Return FALSE/ when
 the printer is not printing, or there is no printer, or something
diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx
index 77265a2..cdad563 100644
--- a/sfx2/source/appl/newhelp.cxx
+++ b/sfx2/source/appl/newhelp.cxx
@@ -538,7 +538,7 @@ IndexTabPage_Impl::IndexTabPage_Impl(vcl::Window* pParent, 
SfxHelpIndexWindow_Im
 
 m_pOpenBtn-SetClickHdl( LINK( this, IndexTabPage_Impl, OpenHdl ) );
 Link aTimeoutLink = LINK( this, IndexTabPage_Impl, TimeoutHdl );
-aFactoryIdle.SetIdleHdl( aTimeoutLink );
+aFactoryIdle.SetIdleHdl( LINK(this, IndexTabPage_Impl, IdleHdl ));
 aFactoryIdle.SetPriority(VCL_IDLE_PRIORITY_LOWER);
 aKeywordTimer.SetTimeoutHdl( aTimeoutLink );
 }
@@ -708,12 +708,17 @@ IMPL_LINK_NOARG(IndexTabPage_Impl, OpenHdl)
 return 0;
 }
 
-IMPL_LINK( IndexTabPage_Impl, TimeoutHdl, Timer*, pTimer )
+IMPL_LINK( IndexTabPage_Impl, IdleHdl, Idle*, pIdle )
 {
-if ( aFactoryIdle == pTimer )
+if ( aFactoryIdle == pIdle )
 InitializeIndex();
-else if ( aKeywordTimer == pTimer  !sKeyword.isEmpty() )
-aKeywordLink.Call( this );
+return 0;
+}
+
+IMPL_LINK( IndexTabPage_Impl, TimeoutHdl, Timer*, pTimer)
+{
+if(aKeywordTimer == pTimer  !sKeyword.isEmpty())
+aKeywordLink.Call(this);
 return 0;
 }
 
diff --git a/sfx2/source/appl/newhelp.hxx b/sfx2/source/appl/newhelp.hxx
index e3f5202..95b8794 100644
--- a/sfx2/source/appl/newhelp.hxx
+++ b/sfx2/source/appl/newhelp.hxx
@@ -134,7 +134,8 @@ private:
 voidClearIndex();
 
 DECL_LINK(OpenHdl, void *);
-DECL_LINK(  TimeoutHdl, Timer* );
+DECL_LINK(IdleHdl, Idle* );
+DECL_LINK(TimeoutHdl, Timer*);
 
 public:
 IndexTabPage_Impl( vcl::Window* pParent, SfxHelpIndexWindow_Impl* _pIdxWin 
);
commit 861e7853e3b98b0adf5a72c88e2bf8c16ca17d09
Author: Miklos Vajna vmik...@collabora.co.uk
Date:   Wed Dec 10 12:48:03 2014 +0100

fdo#85286 android: add missing library for PPT loading

Change-Id: I5f7bfffd1b9751c30c737c886afcd572fa44d234

diff --git a/solenv/bin/native-code.py b/solenv/bin/native-code.py
index aff6f90..52d98c9 100755
--- a/solenv/bin/native-code.py
+++ b/solenv/bin/native-code.py
@@ -150,6 +150,7 @@ draw_factory_list = [
 (libsvgfilterlo.a, svgfilter_component_getFactory),
 (libdeployment.a, deployment_component_getFactory),
 (libemboleobj.a, emboleobj_component_getFactory),
+(libanimcorelo.a, animcore_component_getFactory, #ifdef ANDROID),
 ]
 
 draw_constructor_list = [
commit ac8796dd5e1120ffc67752eb298ebd3e24c198b2
Author: Stephan Bergmann sberg...@redhat.com
Date:   Wed Dec 10 12:42:23 2014 +0100

loplugin:cstylecast

Change-Id: I7f7e9094cb992b2cec3ab156a83791559cbb4344

diff --git a/sd/source/ui/remotecontrol/BluetoothServer.cxx 
b/sd/source/ui/remotecontrol/BluetoothServer.cxx
index c559c49..e04392d 100644
--- a/sd/source/ui/remotecontrol/BluetoothServer.cxx
+++ b/sd/source/ui/remotecontrol/BluetoothServer.cxx
@@ -1492,7 +1492,7 @@ void SAL_CALL BluetoothServer::run()
 // Create service
 IOBluetoothSDPServiceRecordRef serviceRecordRef;
 SAL_WNODEPRECATED_DECLARATIONS_PUSH //TODO: 10.9 IOBluetoothAddServiceDict
-IOReturn rc = IOBluetoothAddServiceDict((CFDictionaryRef) dict, 
serviceRecordRef);
+IOReturn rc = 
IOBluetoothAddServiceDict(reinterpret_castCFDictionaryRef(dict), 
serviceRecordRef);
 SAL_WNODEPRECATED_DECLARATIONS_POP
 
 SAL_INFO(sdremote.bluetooth

[Libreoffice-commits] core.git: Branch 'feature/priorities' - svx/inc svx/source

2014-12-04 Thread Tobias Madl
 svx/inc/sdr/contact/objectcontactofpageview.hxx   |2 +-
 svx/source/inc/eventhandler.hxx   |4 ++--
 svx/source/sdr/contact/objectcontactofpageview.cxx|2 +-
 svx/source/sdr/contact/viewobjectcontactofpageobj.cxx |4 ++--
 svx/source/sdr/event/eventhandler.cxx |4 ++--
 5 files changed, 8 insertions(+), 8 deletions(-)

New commits:
commit d9c9153d2b3a13d128be7550d27549619bd390c1
Author: Tobias Madl tobias.madl@gmail.com
Date:   Thu Dec 4 09:31:30 2014 +

changed inherited timer to idle

Change-Id: I9da6d08964c32e4aafbc9cebc7840eb517f9c33a

diff --git a/svx/inc/sdr/contact/objectcontactofpageview.hxx 
b/svx/inc/sdr/contact/objectcontactofpageview.hxx
index d8ea21f..90706b9 100644
--- a/svx/inc/sdr/contact/objectcontactofpageview.hxx
+++ b/svx/inc/sdr/contact/objectcontactofpageview.hxx
@@ -34,7 +34,7 @@ namespace sdr
 {
 namespace contact
 {
-class ObjectContactOfPageView : public ObjectContact, public Timer
+class ObjectContactOfPageView : public ObjectContact, public Idle
 {
 protected:
 // the owner of this ObjectContactOfPageView. Set from constructor 
and not
diff --git a/svx/source/inc/eventhandler.hxx b/svx/source/inc/eventhandler.hxx
index 3c7670c..f3a31de 100644
--- a/svx/source/inc/eventhandler.hxx
+++ b/svx/source/inc/eventhandler.hxx
@@ -92,10 +92,10 @@ namespace sdr
 {
 namespace event
 {
-class TimerEventHandler : public EventHandler, public Timer
+class TimerEventHandler : public EventHandler, public Idle
 {
 public:
-TimerEventHandler(sal_uInt32 nTimeout = 1L);
+TimerEventHandler(IdlePriority ePriority = VCL_IDLE_PRIORITY_HIGH);
 
 virtual ~TimerEventHandler();
 
diff --git a/svx/source/sdr/contact/objectcontactofpageview.cxx 
b/svx/source/sdr/contact/objectcontactofpageview.cxx
index 1d2c154..ddf1a72 100644
--- a/svx/source/sdr/contact/objectcontactofpageview.cxx
+++ b/svx/source/sdr/contact/objectcontactofpageview.cxx
@@ -59,7 +59,7 @@ namespace sdr
 
setPreviewRenderer(((SdrPaintView)rPageWindow.GetPageView().GetView()).IsPreviewRenderer());
 
 // init timer
-SetTimeout(1);
+SetPriority(VCL_IDLE_PRIORITY_HIGH);
 Stop();
 }
 
diff --git a/svx/source/sdr/contact/viewobjectcontactofpageobj.cxx 
b/svx/source/sdr/contact/viewobjectcontactofpageobj.cxx
index 8e65fb0..007dc7d 100644
--- a/svx/source/sdr/contact/viewobjectcontactofpageobj.cxx
+++ b/svx/source/sdr/contact/viewobjectcontactofpageobj.cxx
@@ -36,7 +36,7 @@ using namespace com::sun::star;
 
 namespace sdr { namespace contact {
 
-class PagePrimitiveExtractor : public ObjectContactOfPagePainter, public Timer
+class PagePrimitiveExtractor : public ObjectContactOfPagePainter, public Idle
 {
 private:
 // the ViewObjectContactOfPageObj using this painter
@@ -83,7 +83,7 @@ PagePrimitiveExtractor::PagePrimitiveExtractor(
 setPreviewRenderer(true);
 
 // init timer
-SetTimeout(1);
+SetPriority(VCL_IDLE_PRIORITY_HIGH);
 Stop();
 }
 
diff --git a/svx/source/sdr/event/eventhandler.cxx 
b/svx/source/sdr/event/eventhandler.cxx
index cf9b2f5..14156c42 100644
--- a/svx/source/sdr/event/eventhandler.cxx
+++ b/svx/source/sdr/event/eventhandler.cxx
@@ -121,9 +121,9 @@ namespace sdr
 {
 namespace event
 {
-TimerEventHandler::TimerEventHandler(sal_uInt32 nTimeout)
+TimerEventHandler::TimerEventHandler(IdlePriority ePriority)
 {
-SetTimeout(nTimeout);
+SetPriority(ePriority);
 Stop();
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: basic/source include/basic

2014-12-03 Thread Tobias Madl
 basic/source/basmgr/basmgr.cxx |   20 ++--
 include/basic/basmgr.hxx   |   34 ++
 2 files changed, 28 insertions(+), 26 deletions(-)

New commits:
commit 57fe57677887dd951000d3317690f8c628a58e02
Author: Tobias Madl tobias.madl@gmail.com
Date:   Tue Dec 2 12:19:32 2014 +

fdo#84938 replace BASERR_REASON_ constants - enum

Change-Id: I80fe0108c2d27b72d2fadc23032cf2b52c3193a6
Reviewed-on: https://gerrit.libreoffice.org/13268
Reviewed-by: Noel Grandin noelgran...@gmail.com
Tested-by: Noel Grandin noelgran...@gmail.com

diff --git a/basic/source/basmgr/basmgr.cxx b/basic/source/basmgr/basmgr.cxx
index b0f0521..8029d18 100644
--- a/basic/source/basmgr/basmgr.cxx
+++ b/basic/source/basmgr/basmgr.cxx
@@ -358,7 +358,7 @@ void SAL_CALL BasMgrContainerListenerImpl::elementRemoved( 
const container::Cont
 }
 }
 
-BasicError::BasicError( sal_uInt64 nId, sal_uInt16 nR, const OUString rErrStr 
) :
+BasicError::BasicError( sal_uInt64 nId, BasicErrorReason nR, const OUString 
rErrStr ) :
 aErrStr( rErrStr )
 {
 nErrorId= nId;
@@ -796,7 +796,7 @@ void BasicManager::ImpMgrNotLoaded( const OUString 
rStorageName )
 // pErrInf is only destroyed if the error os processed by an
 // ErrorHandler
 StringErrorInfo* pErrInf = new StringErrorInfo( ERRCODE_BASMGR_MGROPEN, 
rStorageName, ERRCODE_BUTTON_OK );
-aErrors.push_back(BasicError(*pErrInf, BASERR_REASON_OPENMGRSTREAM, 
rStorageName));
+aErrors.push_back(BasicError(*pErrInf, BasicErrorReason::OPENMGRSTREAM, 
rStorageName));
 
 // Create a stdlib otherwise we crash!
 BasicLibInfo* pStdLibInfo = CreateLibInfo();
@@ -936,7 +936,7 @@ void BasicManager::LoadOldBasicManager( SotStorage 
rStorage )
 if( !ImplLoadBasic( *xManagerStream, pLibs-GetObject(0)-GetLibRef() ) )
 {
 StringErrorInfo* pErrInf = new StringErrorInfo( 
ERRCODE_BASMGR_MGROPEN, aStorName, ERRCODE_BUTTON_OK );
-aErrors.push_back(BasicError(*pErrInf, BASERR_REASON_OPENMGRSTREAM, 
aStorName));
+aErrors.push_back(BasicError(*pErrInf, 
BasicErrorReason::OPENMGRSTREAM, aStorName));
 // and it proceeds ...
 }
 xManagerStream-Seek( nBasicEndOff+1 ); // +1: 0x00 as separator
@@ -985,7 +985,7 @@ void BasicManager::LoadOldBasicManager( SotStorage 
rStorage )
 else
 {
 StringErrorInfo* pErrInf = new StringErrorInfo( 
ERRCODE_BASMGR_LIBLOAD, aStorName, ERRCODE_BUTTON_OK );
-aErrors.push_back(BasicError(*pErrInf, 
BASERR_REASON_STORAGENOTFOUND, aStorName));
+aErrors.push_back(BasicError(*pErrInf, 
BasicErrorReason::STORAGENOTFOUND, aStorName));
 }
 }
 }
@@ -1078,7 +1078,7 @@ bool BasicManager::ImpLoadLibrary( BasicLibInfo* 
pLibInfo, SotStorage* pCurStora
 if ( !xBasicStorage.Is() || xBasicStorage-GetError() )
 {
 StringErrorInfo* pErrInf = new StringErrorInfo( 
ERRCODE_BASMGR_MGROPEN, xStorage-GetName(), ERRCODE_BUTTON_OK );
-aErrors.push_back(BasicError(*pErrInf, BASERR_REASON_OPENLIBSTORAGE, 
pLibInfo-GetLibName()));
+aErrors.push_back(BasicError(*pErrInf, 
BasicErrorReason::OPENLIBSTORAGE, pLibInfo-GetLibName()));
 }
 else
 {
@@ -1087,7 +1087,7 @@ bool BasicManager::ImpLoadLibrary( BasicLibInfo* 
pLibInfo, SotStorage* pCurStora
 if ( !xBasicStream.Is() || xBasicStream-GetError() )
 {
 StringErrorInfo* pErrInf = new StringErrorInfo( 
ERRCODE_BASMGR_LIBLOAD , pLibInfo-GetLibName(), ERRCODE_BUTTON_OK );
-aErrors.push_back(BasicError(*pErrInf, 
BASERR_REASON_OPENLIBSTREAM, pLibInfo-GetLibName()));
+aErrors.push_back(BasicError(*pErrInf, 
BasicErrorReason::OPENLIBSTREAM, pLibInfo-GetLibName()));
 }
 else
 {
@@ -1121,7 +1121,7 @@ bool BasicManager::ImpLoadLibrary( BasicLibInfo* 
pLibInfo, SotStorage* pCurStora
 if ( !bLoaded )
 {
 StringErrorInfo* pErrInf = new StringErrorInfo( 
ERRCODE_BASMGR_LIBLOAD, pLibInfo-GetLibName(), ERRCODE_BUTTON_OK );
-aErrors.push_back(BasicError(*pErrInf, 
BASERR_REASON_BASICLOADERROR, pLibInfo-GetLibName()));
+aErrors.push_back(BasicError(*pErrInf, 
BasicErrorReason::BASICLOADERROR, pLibInfo-GetLibName()));
 }
 else
 {
@@ -1309,7 +1309,7 @@ bool BasicManager::RemoveLib( sal_uInt16 nLib, bool 
bDelBasicFromStorage )
 if ( !pLibInfo || !nLib )
 {
 StringErrorInfo* pErrInf = new StringErrorInfo( 
ERRCODE_BASMGR_REMOVELIB, OUString(), ERRCODE_BUTTON_OK );
-aErrors.push_back(BasicError(*pErrInf, BASERR_REASON_STDLIB, 
pLibInfo-GetLibName()));
+aErrors.push_back(BasicError(*pErrInf, BasicErrorReason::STDLIB, 
pLibInfo-GetLibName()));
 return false;
 }
 
@@ -1343,7 +1343,7 @@ bool BasicManager::RemoveLib( sal_uInt16 nLib, bool 
bDelBasicFromStorage

[Libreoffice-commits] core.git: Branch 'feature/priorities' - editeng/source vcl/osx

2014-12-03 Thread Tobias Madl
 editeng/source/editeng/impedit5.cxx |2 +-
 vcl/osx/salinst.cxx |8 
 2 files changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 81c5c064bb2b8c54b1175585957ba4ad2f76ff36
Author: Tobias Madl tobias.madl@gmail.com
Date:   Wed Dec 3 10:16:28 2014 +

changed inherited timers to idle

Change-Id: I1d70d4d2fe8573d0f120f2a1ece83f504d5efde5

diff --git a/editeng/source/editeng/impedit5.cxx 
b/editeng/source/editeng/impedit5.cxx
index 62ded41..072249f 100644
--- a/editeng/source/editeng/impedit5.cxx
+++ b/editeng/source/editeng/impedit5.cxx
@@ -798,7 +798,7 @@ void IdleFormattter::ForceTimeout()
 if ( IsActive() )
 {
 Stop();
-((Link)GetTimeoutHdl()).Call( this );
+((Link)GetIdleHdl()).Call( this );
 }
 }
 
diff --git a/vcl/osx/salinst.cxx b/vcl/osx/salinst.cxx
index 26ff137..4264fcd 100644
--- a/vcl/osx/salinst.cxx
+++ b/vcl/osx/salinst.cxx
@@ -69,7 +69,7 @@ static NSMenu* pDockMenu = nil;
 static bool bNoSVMain = true;
 static bool bLeftMain = false;
 
-class AquaDelayedSettingsChanged : public Timer
+class AquaDelayedSettingsChanged : public Idle
 {
 boolmbInvalidate;
 public:
@@ -101,9 +101,9 @@ class AquaDelayedSettingsChanged : public Timer
 void AquaSalInstance::delayedSettingsChanged( bool bInvalidate )
 {
 osl::Guard comphelper::SolarMutex  aGuard( *mpSalYieldMutex );
-AquaDelayedSettingsChanged* pTimer = new AquaDelayedSettingsChanged( 
bInvalidate );
-pTimer-SetTimeout( 50 );
-pTimer-Start();
+AquaDelayedSettingsChanged* pIdle = new AquaDelayedSettingsChanged( 
bInvalidate );
+pIdle-SetPriority( VCL_IDLE_PRIORITY_MEDIUM );
+pIdle-Start();
 }
 
 // the AppEventList must be available before any SalData/SalInst/etc. objects 
are ready
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: include/svx

2014-12-01 Thread Tobias Madl
 include/svx/svdedxv.hxx |  116 ++--
 include/svx/svdglev.hxx |   26 +-
 include/svx/svdglue.hxx |   16 +++---
 3 files changed, 76 insertions(+), 82 deletions(-)

New commits:
commit ff5d0daebfddfaff79972df5d539710f3700adfe
Author: Tobias Madl tobias.madl@gmail.com
Date:   Fri Nov 28 16:40:03 2014 +0100

fdo#39468: Translated some german comments

Change-Id: I7fba5d4d91c85289f2be5c0338977bea2cce2b06
Reviewed-on: https://gerrit.libreoffice.org/13178
Reviewed-by: Caolán McNamara caol...@redhat.com
Tested-by: Caolán McNamara caol...@redhat.com

diff --git a/include/svx/svdedxv.hxx b/include/svx/svdedxv.hxx
index 70f6612..2615865 100644
--- a/include/svx/svdedxv.hxx
+++ b/include/svx/svdedxv.hxx
@@ -44,15 +44,15 @@ namespace sdr {
 class SelectionController;
 }
 
-enum SdrEndTextEditKind {SDRENDTEXTEDIT_UNCHANGED, // Textobjekt unveraendert
- SDRENDTEXTEDIT_CHANGED,   // Textobjekt wurde 
geaendert
- SDRENDTEXTEDIT_DELETED,   // Textobjekt implizit 
geloescht
- SDRENDTEXTEDIT_SHOULDBEDELETED}; // Fuer Writer: 
Textobjekt sollte geloescht werden
+enum SdrEndTextEditKind {SDRENDTEXTEDIT_UNCHANGED, // textobject unchanged
+ SDRENDTEXTEDIT_CHANGED,   // textobject changed
+ SDRENDTEXTEDIT_DELETED,   // textobject implicitly 
deleted
+ SDRENDTEXTEDIT_SHOULDBEDELETED}; // for writer: 
textobject should be deleted
 
 
-// - Allgemeines Edit fuer objektspeziefische Eigenschaften
-// - Textedit fuer alle vom SdrTextObj abgeleiteten Zeichenobjekte
-// - Macromodus
+// - general edit for objectspecific properties
+// - textedit for all drawobjects, inherited from SdrTextObj
+// - macromod
 
 
 class SVX_DLLPUBLIC SdrObjEditView: public SdrGlueEditView
@@ -62,27 +62,27 @@ class SVX_DLLPUBLIC SdrObjEditView: public SdrGlueEditView
 
 protected:
 // TextEdit
-SdrObjectWeakRefmxTextEditObj;  // Aktuell im TextEdit 
befindliches Obj
+SdrObjectWeakRefmxTextEditObj;  // current object in 
TextEdit
 SdrPageView*pTextEditPV;
-SdrOutliner*pTextEditOutliner; // Na eben der Outliner 
fuers TextEdit
-OutlinerView*   pTextEditOutlinerView; // die aktuelle View 
des Outliners
-vcl::Window* pTextEditWin;  // passendes Win 
zu pTextEditOutlinerView
-vcl::Cursor*pTextEditCursorMerker; // Zum Restaurieren des 
Cursors am jeweiligen Win
-ImpSdrEditPara* pEditPara; // Da hau' ich erstmal alles rein 
um kompatibel zu bleiben...
+SdrOutliner*pTextEditOutliner; // outliner for the 
TextEdit
+OutlinerView*   pTextEditOutlinerView; // current view of the 
outliners
+vcl::Window* pTextEditWin;  // matching window 
to pTextEditOutlinerView
+vcl::Cursor*pTextEditCursorMerker; // to restore the 
cursor in each window
+ImpSdrEditPara* pEditPara; // trashbin for everything else to 
stay compatible
 SdrObject*  pMacroObj;
 SdrPageView*pMacroPV;
 vcl::Window* pMacroWin;
 
 Rectangle   aTextEditArea;
 Rectangle   aMinTextEditArea;
-LinkaOldCalcFieldValueLink; // Zum rufen des alten 
Handlers
+LinkaOldCalcFieldValueLink; // for call the old 
handler
 Point   aMacroDownPos;
 
 sal_uInt16  nMacroTol;
 
-boolbTextEditDontDelete : 1;   // Outliner und 
View bei SdrEndTextEdit nicht deleten (f. Rechtschreibpruefung)
-boolbTextEditOnlyOneView : 1;  // Nur eine 
OutlinerView (f. Rechtschreibpruefung)
-boolbTextEditNewObj : 1;   // Aktuell 
editiertes Objekt wurde gerade neu erzeugt
+boolbTextEditDontDelete : 1;   // do not delete 
outliner and view of SdrEndTextEdit (f. spellchecking)
+boolbTextEditOnlyOneView : 1;  // a single 
OutlinerView (f. spellchecking)
+boolbTextEditNewObj : 1;   // current edited 
object was just recreated
 boolbQuickTextEditMode : 1;// 
persistent(-CrtV). Default=TRUE
 boolbMacroMode : 1;// 
persistent(-CrtV). Default=TRUE
 boolbMacroDown : 1;
@@ -104,18 +104,18 @@ protected:
 
 OutlinerView* ImpFindOutlinerView(vcl::Window* pWin) const;
 
-// Eine neue OutlinerView auf dem Heap anlegen und alle erforderlichen 
Parameter setzen.
-// pTextEditObj, pTextEditPV und pTextEditOutliner muessen initiallisiert 
sein.
+// Create a new OutlinerView

[Libreoffice-commits] core.git: basctl/source chart2/source cui/source dbaccess/source desktop/source extensions/source filter/source forms/source formula/source fpicker/source framework/source includ

2014-11-30 Thread Tobias Madl
, 444 insertions(+), 440 deletions(-)

New commits:
commit 14596452e781f6a66bcc63b0c447c852df1f2896
Author: Tobias Madl tobias.madl@gmail.com
Date:   Wed Nov 26 14:53:25 2014 +

fdo#84938: replace EVENT_ constants with enum

Change-Id: I8275832d8dae43b374bddd48520d11592e9a6a1f
Reviewed-on: https://gerrit.libreoffice.org/13134
Tested-by: LibreOffice gerrit bot ger...@libreoffice.org
Reviewed-by: Noel Grandin noelgran...@gmail.com

diff --git a/basctl/source/basicide/basicbox.cxx 
b/basctl/source/basicide/basicbox.cxx
index 79a60e8..9735c59 100644
--- a/basctl/source/basicide/basicbox.cxx
+++ b/basctl/source/basicide/basicbox.cxx
@@ -257,7 +257,7 @@ void LibBox::InsertEntries( const ScriptDocument 
rDocument, LibraryLocation eLo
 bool LibBox::PreNotify( NotifyEvent rNEvt )
 {
 bool nDone = false;
-if( rNEvt.GetType() == EVENT_KEYINPUT )
+if( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT )
 {
 KeyEvent aKeyEvt = *rNEvt.GetKeyEvent();
 sal_uInt16 nKeyCode = aKeyEvt.GetKeyCode().GetCode();
@@ -279,7 +279,7 @@ bool LibBox::PreNotify( NotifyEvent rNEvt )
 break;
 }
 }
-else if( rNEvt.GetType() == EVENT_GETFOCUS )
+else if( rNEvt.GetType() == MouseNotifyEvent::GETFOCUS )
 {
 if ( bFillBox )
 {
@@ -287,7 +287,7 @@ bool LibBox::PreNotify( NotifyEvent rNEvt )
 bFillBox = false;
 }
 }
-else if( rNEvt.GetType() == EVENT_LOSEFOCUS )
+else if( rNEvt.GetType() == MouseNotifyEvent::LOSEFOCUS )
 {
 if ( !HasChildPathFocus(true) )
 {
@@ -475,7 +475,7 @@ void LanguageBox::Select()
 bool LanguageBox::PreNotify( NotifyEvent rNEvt )
 {
 bool nDone = false;
-if( rNEvt.GetType() == EVENT_KEYINPUT )
+if( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT )
 {
 sal_uInt16 nKeyCode = rNEvt.GetKeyEvent()-GetKeyCode().GetCode();
 switch( nKeyCode )
@@ -495,10 +495,10 @@ bool LanguageBox::PreNotify( NotifyEvent rNEvt )
 break;
 }
 }
-else if( rNEvt.GetType() == EVENT_GETFOCUS )
+else if( rNEvt.GetType() == MouseNotifyEvent::GETFOCUS )
 {
 }
-else if( rNEvt.GetType() == EVENT_LOSEFOCUS )
+else if( rNEvt.GetType() == MouseNotifyEvent::LOSEFOCUS )
 {
 }
 
diff --git a/basctl/source/basicide/baside2b.cxx 
b/basctl/source/basicide/baside2b.cxx
index 23b03e0..e1733e1 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -2776,7 +2776,7 @@ void CodeCompleteListBox::KeyInput( const KeyEvent 
rKeyEvt )
 InsertSelectedEntry();
 break;
 case KEY_UP: case KEY_DOWN:
-NotifyEvent nEvt( EVENT_KEYINPUT, NULL, rKeyEvt );
+NotifyEvent nEvt( MouseNotifyEvent::KEYINPUT, NULL, rKeyEvt );
 PreNotify(nEvt);
 break;
 }
diff --git a/basctl/source/basicide/bastypes.cxx 
b/basctl/source/basicide/bastypes.cxx
index 169902a..d0b9fe6 100644
--- a/basctl/source/basicide/bastypes.cxx
+++ b/basctl/source/basicide/bastypes.cxx
@@ -112,7 +112,7 @@ bool BaseWindow::Notify( NotifyEvent rNEvt )
 {
 bool nDone = false;
 
-if ( rNEvt.GetType() == EVENT_KEYINPUT )
+if ( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT )
 {
 KeyEvent aKEvt = *rNEvt.GetKeyEvent();
 vcl::KeyCode aCode = aKEvt.GetKeyCode();
diff --git a/chart2/source/controller/main/ElementSelector.cxx 
b/chart2/source/controller/main/ElementSelector.cxx
index df2c602..31073b1 100644
--- a/chart2/source/controller/main/ElementSelector.cxx
+++ b/chart2/source/controller/main/ElementSelector.cxx
@@ -207,7 +207,7 @@ bool SelectorListBox::Notify( NotifyEvent rNEvt )
 {
 bool nHandled = false;
 
-if ( rNEvt.GetType() == EVENT_KEYINPUT )
+if ( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT )
 {
 sal_uInt16 nCode = rNEvt.GetKeyEvent()-GetKeyCode().GetCode();
 
@@ -230,7 +230,7 @@ bool SelectorListBox::Notify( NotifyEvent rNEvt )
 break;
 }
 }
-else if ( EVENT_LOSEFOCUS == rNEvt.GetType() )
+else if ( MouseNotifyEvent::LOSEFOCUS == rNEvt.GetType() )
 {
 if ( !HasFocus() )
 SelectEntryPos( GetSavedValue() );
diff --git a/cui/source/customize/macropg.cxx b/cui/source/customize/macropg.cxx
index c2d4451..ca978e5 100644
--- a/cui/source/customize/macropg.cxx
+++ b/cui/source/customize/macropg.cxx
@@ -120,7 +120,7 @@ bool MacroEventListBox::Notify( NotifyEvent rNEvt )
 {
 bool nRet = Control::Notify( rNEvt );
 
-if( rNEvt.GetType() == EVENT_GETFOCUS )
+if( rNEvt.GetType() == MouseNotifyEvent::GETFOCUS )
 {
 if ( rNEvt.GetWindow() != maListBox )
 maListBox.GrabFocus();
diff --git a/cui/source/dialogs/SpellDialog.cxx 
b/cui/source/dialogs/SpellDialog.cxx
index 96b59dc..5bbf6dd 100644
--- a/cui/source/dialogs/SpellDialog.cxx
+++ b/cui/source/dialogs/SpellDialog.cxx
@@ -988,12 +988,12

[Libreoffice-commits] core.git: Branch 'feature/priorities' - sfx2/source vcl/osx vcl/win

2014-11-28 Thread Tobias Madl
 sfx2/source/sidebar/PopupContainer.cxx |2 +-
 vcl/osx/salinst.cxx|2 +-
 vcl/win/source/window/salframe.cxx |2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 597e83407d9e91daed61cb6dfea167ae8c4a9ad1
Author: Tobias Madl tobias.madl@gmail.com
Date:   Wed Nov 26 14:53:25 2014 +

fdo#84938: replace EVENT_ constants with enum

Change-Id: I8275832d8dae43b374bddd48520d11592e9a6a1f

diff --git a/sfx2/source/sidebar/PopupContainer.cxx 
b/sfx2/source/sidebar/PopupContainer.cxx
index 97566fb..92e5e20 100644
--- a/sfx2/source/sidebar/PopupContainer.cxx
+++ b/sfx2/source/sidebar/PopupContainer.cxx
@@ -39,7 +39,7 @@ PopupContainer::~PopupContainer (void)
 
 long  PopupContainer::Notify (NotifyEvent rEvent)
 {
-if (rEvent.GetType() == EVENT_LOSEFOCUS)
+if (rEvent.GetType() == MouseNotifyEvent::LOSEFOCUS)
 {
 if( ! HasChildPathFocus(sal_True))
 EndPopupMode();
diff --git a/vcl/osx/salinst.cxx b/vcl/osx/salinst.cxx
index 5e81c6b..26ff137 100644
--- a/vcl/osx/salinst.cxx
+++ b/vcl/osx/salinst.cxx
@@ -521,7 +521,7 @@ void AquaSalInstance::handleAppDefinedEvent( NSEvent* 
pEvent )
 {
 const Point aPoint;
 CommandEvent aCEvt( aPoint, COMMAND_MEDIA, FALSE, nCommand );
-NotifyEvent aNCmdEvt( EVENT_COMMAND, pWindow, aCEvt );
+NotifyEvent aNCmdEvt( MouseNotifyEvent::COMMAND, pWindow, aCEvt );
 
 if ( !ImplCallPreNotify( aNCmdEvt ) )
 pWindow-Command( aCEvt );
diff --git a/vcl/win/source/window/salframe.cxx 
b/vcl/win/source/window/salframe.cxx
index d2fef8f..c8f5f3f 100644
--- a/vcl/win/source/window/salframe.cxx
+++ b/vcl/win/source/window/salframe.cxx
@@ -5214,7 +5214,7 @@ static boolean ImplHandleAppCommand( HWND hWnd, LPARAM 
lParam )
 {
 const Point aPoint;
 CommandEvent aCEvt( aPoint, COMMAND_MEDIA, FALSE, nCommand );
-NotifyEvent aNCmdEvt( EVENT_COMMAND, pWindow, aCEvt );
+NotifyEvent aNCmdEvt( MouseNotifyEvent::COMMAND, pWindow, aCEvt );
 
 if ( !ImplCallPreNotify( aNCmdEvt ) )
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/priorities' - include/svx

2014-11-28 Thread Tobias Madl
 include/svx/svdedxv.hxx |  116 ++--
 include/svx/svdglev.hxx |   26 +-
 include/svx/svdglue.hxx |   14 +++--
 3 files changed, 76 insertions(+), 80 deletions(-)

New commits:
commit 2c5f68c04118a509a2ef54ec9f3c5f34e4a70066
Author: Tobias Madl tobias.madl@gmail.com
Date:   Fri Nov 28 16:40:03 2014 +0100

fdo#39468: Translated some german comments

Change-Id: I7fba5d4d91c85289f2be5c0338977bea2cce2b06

diff --git a/include/svx/svdedxv.hxx b/include/svx/svdedxv.hxx
index 70f6612..2615865 100644
--- a/include/svx/svdedxv.hxx
+++ b/include/svx/svdedxv.hxx
@@ -44,15 +44,15 @@ namespace sdr {
 class SelectionController;
 }
 
-enum SdrEndTextEditKind {SDRENDTEXTEDIT_UNCHANGED, // Textobjekt unveraendert
- SDRENDTEXTEDIT_CHANGED,   // Textobjekt wurde 
geaendert
- SDRENDTEXTEDIT_DELETED,   // Textobjekt implizit 
geloescht
- SDRENDTEXTEDIT_SHOULDBEDELETED}; // Fuer Writer: 
Textobjekt sollte geloescht werden
+enum SdrEndTextEditKind {SDRENDTEXTEDIT_UNCHANGED, // textobject unchanged
+ SDRENDTEXTEDIT_CHANGED,   // textobject changed
+ SDRENDTEXTEDIT_DELETED,   // textobject implicitly 
deleted
+ SDRENDTEXTEDIT_SHOULDBEDELETED}; // for writer: 
textobject should be deleted
 
 
-// - Allgemeines Edit fuer objektspeziefische Eigenschaften
-// - Textedit fuer alle vom SdrTextObj abgeleiteten Zeichenobjekte
-// - Macromodus
+// - general edit for objectspecific properties
+// - textedit for all drawobjects, inherited from SdrTextObj
+// - macromod
 
 
 class SVX_DLLPUBLIC SdrObjEditView: public SdrGlueEditView
@@ -62,27 +62,27 @@ class SVX_DLLPUBLIC SdrObjEditView: public SdrGlueEditView
 
 protected:
 // TextEdit
-SdrObjectWeakRefmxTextEditObj;  // Aktuell im TextEdit 
befindliches Obj
+SdrObjectWeakRefmxTextEditObj;  // current object in 
TextEdit
 SdrPageView*pTextEditPV;
-SdrOutliner*pTextEditOutliner; // Na eben der Outliner 
fuers TextEdit
-OutlinerView*   pTextEditOutlinerView; // die aktuelle View 
des Outliners
-vcl::Window* pTextEditWin;  // passendes Win 
zu pTextEditOutlinerView
-vcl::Cursor*pTextEditCursorMerker; // Zum Restaurieren des 
Cursors am jeweiligen Win
-ImpSdrEditPara* pEditPara; // Da hau' ich erstmal alles rein 
um kompatibel zu bleiben...
+SdrOutliner*pTextEditOutliner; // outliner for the 
TextEdit
+OutlinerView*   pTextEditOutlinerView; // current view of the 
outliners
+vcl::Window* pTextEditWin;  // matching window 
to pTextEditOutlinerView
+vcl::Cursor*pTextEditCursorMerker; // to restore the 
cursor in each window
+ImpSdrEditPara* pEditPara; // trashbin for everything else to 
stay compatible
 SdrObject*  pMacroObj;
 SdrPageView*pMacroPV;
 vcl::Window* pMacroWin;
 
 Rectangle   aTextEditArea;
 Rectangle   aMinTextEditArea;
-LinkaOldCalcFieldValueLink; // Zum rufen des alten 
Handlers
+LinkaOldCalcFieldValueLink; // for call the old 
handler
 Point   aMacroDownPos;
 
 sal_uInt16  nMacroTol;
 
-boolbTextEditDontDelete : 1;   // Outliner und 
View bei SdrEndTextEdit nicht deleten (f. Rechtschreibpruefung)
-boolbTextEditOnlyOneView : 1;  // Nur eine 
OutlinerView (f. Rechtschreibpruefung)
-boolbTextEditNewObj : 1;   // Aktuell 
editiertes Objekt wurde gerade neu erzeugt
+boolbTextEditDontDelete : 1;   // do not delete 
outliner and view of SdrEndTextEdit (f. spellchecking)
+boolbTextEditOnlyOneView : 1;  // a single 
OutlinerView (f. spellchecking)
+boolbTextEditNewObj : 1;   // current edited 
object was just recreated
 boolbQuickTextEditMode : 1;// 
persistent(-CrtV). Default=TRUE
 boolbMacroMode : 1;// 
persistent(-CrtV). Default=TRUE
 boolbMacroDown : 1;
@@ -104,18 +104,18 @@ protected:
 
 OutlinerView* ImpFindOutlinerView(vcl::Window* pWin) const;
 
-// Eine neue OutlinerView auf dem Heap anlegen und alle erforderlichen 
Parameter setzen.
-// pTextEditObj, pTextEditPV und pTextEditOutliner muessen initiallisiert 
sein.
+// Create a new OutlinerView at the heap and initialize all required 
parameters.
+// pTextEditObj, pTextEditPV and pTextEditOutliner have to be initialized
 OutlinerView

[Libreoffice-commits] core.git: Branch 'feature/priorities' - basctl/source chart2/source cui/source dbaccess/source desktop/source extensions/source filter/source forms/source formula/source fpicker/

2014-11-27 Thread Tobias Madl
/partwnd.cxx|2 
 sfx2/source/dialog/templdlg.cxx   |4 
 sfx2/source/sidebar/Deck.cxx  |2 
 sfx2/source/sidebar/SidebarToolBox.cxx|2 
 sfx2/source/view/frame2.cxx   |   16 +-
 sfx2/source/view/printer.cxx  |2 
 sfx2/source/view/userinputinterception.cxx|   14 +-
 svtools/source/brwbox/ebbcontrols.cxx |   10 -
 svtools/source/brwbox/editbrowsebox.cxx   |6 
 svtools/source/contnr/imivctl1.cxx|2 
 svtools/source/contnr/simptabl.cxx|2 
 svtools/source/control/calendar.cxx   |2 
 svtools/source/control/fileurlbox.cxx |6 
 svtools/source/control/fmtfield.cxx   |8 -
 svtools/source/control/inettbc.cxx|6 
 svtools/source/control/roadmap.cxx|2 
 svtools/source/control/tabbar.cxx |4 
 svtools/source/control/urlcontrol.cxx |4 
 svtools/source/dialogs/addresstemplate.cxx|2 
 svtools/source/dialogs/prnsetup.cxx   |2 
 svtools/source/dialogs/wizdlg.cxx |2 
 svtools/source/edit/editsyntaxhighlighter.cxx |2 
 svtools/source/hatchwindow/ipwin.cxx  |4 
 svtools/source/table/tabledatawindow.cxx  |2 
 svtools/source/toolpanel/toolpaneldeck.cxx|2 
 svx/source/dialog/rubydialog.cxx  |2 
 svx/source/fmcomp/gridctrl.cxx|2 
 svx/source/form/datanavi.cxx  |2 
 svx/source/form/tabwin.cxx|2 
 svx/source/gallery2/galbrws1.cxx  |4 
 svx/source/sidebar/tools/PopupContainer.cxx   |2 
 svx/source/tbxctrls/colrctrl.cxx  |2 
 svx/source/tbxctrls/grafctrl.cxx  |6 
 svx/source/tbxctrls/itemwin.cxx   |   32 ++--
 svx/source/tbxctrls/tbcontrl.cxx  |   18 +-
 svx/source/tbxctrls/tbunocontroller.cxx   |4 
 svx/source/tbxctrls/tbunosearchcontrollers.cxx|4 
 sw/source/ui/dbui/createaddresslistdialog.cxx |2 
 sw/source/ui/dbui/mmaddressblockpage.cxx  |6 
 sw/source/ui/fldui/fldvar.cxx |4 
 sw/source/ui/index/cnttab.cxx |2 
 sw/source/ui/misc/bookmark.cxx|2 
 sw/source/uibase/cctrl/actctrl.cxx|2 
 sw/source/uibase/ribbar/workctrl.cxx  |4 
 vcl/inc/window.h  |3 
 vcl/source/control/button.cxx |6 
 vcl/source/control/combobox.cxx   |8 -
 vcl/source/control/ctrl.cxx   |4 
 vcl/source/control/field.cxx  |   36 ++---
 vcl/source/control/field2.cxx |   36 ++---
 vcl/source/control/ilstbox.cxx|6 
 vcl/source/control/longcurr.cxx   |   12 -
 vcl/source/control/lstbox.cxx |6 
 vcl/source/control/scrbar.cxx |2 
 vcl/source/control/spinbtn.cxx|2 
 vcl/source/control/spinfld.cxx|6 
 vcl/source/control/tabctrl.cxx|4 
 vcl/source/edit/vclmedit.cxx  |4 
 vcl/source/window/dialog.cxx  |8 -
 vcl/source/window/dlgctrl.cxx |8 -
 vcl/source/window/dockwin.cxx |4 
 vcl/source/window/event.cxx   |   32 ++--
 vcl/source/window/floatwin.cxx|2 
 vcl/source/window/layout.cxx  |2 
 vcl/source/window/mouse.cxx   |   12 -
 vcl/source/window/scrwnd.cxx  |2 
 vcl/source/window/splitwin.cxx|2 
 vcl/source/window/syswin.cxx  |4 
 vcl/source/window/toolbox.cxx |6 
 vcl/source/window/window.cxx  |   14 +-
 vcl/source/window/winproc.cxx |   92 +++---
 145 files changed, 440 insertions(+), 436 deletions(-)

New commits:
commit ec8687e1ef75386fdfc113ebfeb7bea517334ed0
Author: Tobias Madl tobias.madl@gmail.com
Date:   Wed Nov 26 14:53:25 2014 +

fdo#84938

[Libreoffice-commits] core.git: Branch 'feature/priorities' - 2 commits - sc/source svx/source

2014-11-24 Thread Tobias Madl
 sc/source/ui/dbgui/dbnamdlg.cxx |   12 
 sc/source/ui/inc/dbnamdlg.hxx   |1 -
 svx/source/svdraw/svdpntv.cxx   |2 +-
 3 files changed, 1 insertion(+), 14 deletions(-)

New commits:
commit 25d020a3aa2c0e99898fec93cf3931ec09c13ce0
Author: Tobias Madl tobias.madl@gmail.com
Date:   Mon Nov 24 10:34:56 2014 +

adapted priority to repaint

Change-Id: I6a780e93bcd0621d75222e182eb100694e02448d

diff --git a/svx/source/svdraw/svdpntv.cxx b/svx/source/svdraw/svdpntv.cxx
index 07794bc..4580d6c 100644
--- a/svx/source/svdraw/svdpntv.cxx
+++ b/svx/source/svdraw/svdpntv.cxx
@@ -190,7 +190,7 @@ void SdrPaintView::ImpClearVars()
 pDefaultStyleSheet=NULL;
 bSomeObjChgdFlag=false;
 nGraphicManagerDrawMode = GRFMGR_DRAW_STANDARD;
-aComeBackIdle.SetPriority(VCL_IDLE_PRIORITY_HIGH);
+aComeBackIdle.SetPriority(VCL_IDLE_PRIORITY_REPAINT);
 aComeBackIdle.SetIdleHdl(LINK(this,SdrPaintView,ImpComeBackHdl));
 
 if (pMod)
commit 389feb66caa26711604f51c0699f2383468caded
Author: Tobias Madl tobias.madl@gmail.com
Date:   Sun Nov 23 10:48:12 2014 +

timers: callback useless, remove timer completely.

Change-Id: I904a91b38d846841e24149f897962abb429878be

diff --git a/sc/source/ui/dbgui/dbnamdlg.cxx b/sc/source/ui/dbgui/dbnamdlg.cxx
index c46be30..b6910bb 100644
--- a/sc/source/ui/dbgui/dbnamdlg.cxx
+++ b/sc/source/ui/dbgui/dbnamdlg.cxx
@@ -154,10 +154,6 @@ ScDbNameDlg::ScDbNameDlg(SfxBindings* pB, SfxChildWindow* 
pCW, vcl::Window* pPar
 pSaveObj = new DBSaveData( *m_pEdAssign, *m_pBtnHeader,
 *m_pBtnDoSize, *m_pBtnKeepFmt, *m_pBtnStripData, 
theCurArea );
 Init();
-
-SynFocusTimer.SetTimeout(150);
-SynFocusTimer.SetTimeoutHdl(LINK( this, ScDbNameDlg, FocusToComoboxHdl));
-SynFocusTimer.Start();
 }
 
 ScDbNameDlg::~ScDbNameDlg()
@@ -635,12 +631,4 @@ IMPL_LINK_NOARG(ScDbNameDlg, AssModifyHdl)
 return 0;
 }
 
-IMPL_LINK( ScDbNameDlg, FocusToComoboxHdl, Timer*, pTi)
-{
-(void)pTi;
-// CallEventListeners is still protected - figure out if we need to make 
it public, or if the focus stuff can be handled better in VCL directly. First 
see what AT is expecting...
-// aEdName.CallEventListeners( VCLEVENT_CONTROL_GETFOCUS );
-return 0;
-}
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/dbnamdlg.hxx b/sc/source/ui/inc/dbnamdlg.hxx
index ae2fdda..6b6d683 100644
--- a/sc/source/ui/inc/dbnamdlg.hxx
+++ b/sc/source/ui/inc/dbnamdlg.hxx
@@ -82,7 +82,6 @@ private:
 ScDBCollection  aLocalDbCol;
 ScRange theCurArea;
 std::vectorScRange aRemoveList;
-Timer   SynFocusTimer;
 DECL_LINK( FocusToComoboxHdl, Timer* );
 
 private:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sc/source

2014-11-23 Thread Tobias Madl
 sc/source/ui/dbgui/dbnamdlg.cxx |   12 
 sc/source/ui/inc/dbnamdlg.hxx   |1 -
 2 files changed, 13 deletions(-)

New commits:
commit c9067dd0e13a51e70b71c4730e08cd518477a4f3
Author: Tobias Madl tobias.madl@gmail.com
Date:   Sun Nov 23 10:48:12 2014 +

timers: callback useless, remove timer completely.

Change-Id: I904a91b38d846841e24149f897962abb429878be
Reviewed-on: https://gerrit.libreoffice.org/13062
Reviewed-by: Noel Grandin noelgran...@gmail.com
Tested-by: Noel Grandin noelgran...@gmail.com

diff --git a/sc/source/ui/dbgui/dbnamdlg.cxx b/sc/source/ui/dbgui/dbnamdlg.cxx
index c46be30..b6910bb 100644
--- a/sc/source/ui/dbgui/dbnamdlg.cxx
+++ b/sc/source/ui/dbgui/dbnamdlg.cxx
@@ -154,10 +154,6 @@ ScDbNameDlg::ScDbNameDlg(SfxBindings* pB, SfxChildWindow* 
pCW, vcl::Window* pPar
 pSaveObj = new DBSaveData( *m_pEdAssign, *m_pBtnHeader,
 *m_pBtnDoSize, *m_pBtnKeepFmt, *m_pBtnStripData, 
theCurArea );
 Init();
-
-SynFocusTimer.SetTimeout(150);
-SynFocusTimer.SetTimeoutHdl(LINK( this, ScDbNameDlg, FocusToComoboxHdl));
-SynFocusTimer.Start();
 }
 
 ScDbNameDlg::~ScDbNameDlg()
@@ -635,12 +631,4 @@ IMPL_LINK_NOARG(ScDbNameDlg, AssModifyHdl)
 return 0;
 }
 
-IMPL_LINK( ScDbNameDlg, FocusToComoboxHdl, Timer*, pTi)
-{
-(void)pTi;
-// CallEventListeners is still protected - figure out if we need to make 
it public, or if the focus stuff can be handled better in VCL directly. First 
see what AT is expecting...
-// aEdName.CallEventListeners( VCLEVENT_CONTROL_GETFOCUS );
-return 0;
-}
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/dbnamdlg.hxx b/sc/source/ui/inc/dbnamdlg.hxx
index ae2fdda..6b6d683 100644
--- a/sc/source/ui/inc/dbnamdlg.hxx
+++ b/sc/source/ui/inc/dbnamdlg.hxx
@@ -82,7 +82,6 @@ private:
 ScDBCollection  aLocalDbCol;
 ScRange theCurArea;
 std::vectorScRange aRemoveList;
-Timer   SynFocusTimer;
 DECL_LINK( FocusToComoboxHdl, Timer* );
 
 private:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/priorities' - sd/inc sd/source svx/source

2014-11-21 Thread Tobias Madl
 sd/inc/drawdoc.hxx   |2 +-
 sd/source/core/drawdoc.cxx   |2 +-
 sd/source/core/drawdoc4.cxx  |   18 +-
 sd/source/ui/slidesorter/cache/SlsQueueProcessor.cxx |   18 +-
 sd/source/ui/slidesorter/cache/SlsQueueProcessor.hxx |2 +-
 svx/source/stbctrls/modctrl.cxx  |   16 +---
 6 files changed, 26 insertions(+), 32 deletions(-)

New commits:
commit 3f3f83678e6f1734ee2e9b087207c558f40730a1
Author: Tobias Madl tobias.madl@gmail.com
Date:   Fri Nov 21 08:12:11 2014 +

changed timers to idles

Change-Id: Iac97f482df9fca8563e6931e4c710c1cc4e6503d

diff --git a/sd/inc/drawdoc.hxx b/sd/inc/drawdoc.hxx
index 6cd99ce..524dcba 100644
--- a/sd/inc/drawdoc.hxx
+++ b/sd/inc/drawdoc.hxx
@@ -149,7 +149,7 @@ private:
 ::sd::Outliner* mpOutliner;  /// local outliner for outline 
mode
 ::sd::Outliner* mpInternalOutliner;  /// internal outliner for 
creation of text objects
 Timer*  mpWorkStartupTimer;
-Timer*  mpOnlineSpellingTimer;
+Idle*   mpOnlineSpellingIdle;
 sd::ShapeList*  mpOnlineSpellingList;
 SvxSearchItem*  mpOnlineSearchItem;
 std::vectorsd::FrameView* maFrameViewList;
diff --git a/sd/source/core/drawdoc.cxx b/sd/source/core/drawdoc.cxx
index 8b47fe7..c47e934 100644
--- a/sd/source/core/drawdoc.cxx
+++ b/sd/source/core/drawdoc.cxx
@@ -152,7 +152,7 @@ SdDrawDocument::SdDrawDocument(DocumentType eType, 
SfxObjectShell* pDrDocSh)
 , mpOutliner(NULL)
 , mpInternalOutliner(NULL)
 , mpWorkStartupTimer(NULL)
-, mpOnlineSpellingTimer(NULL)
+, mpOnlineSpellingIdle(NULL)
 , mpOnlineSpellingList(NULL)
 , mpOnlineSearchItem(NULL)
 , mpCustomShowList(NULL)
diff --git a/sd/source/core/drawdoc4.cxx b/sd/source/core/drawdoc4.cxx
index b39b343..74cc2dd 100644
--- a/sd/source/core/drawdoc4.cxx
+++ b/sd/source/core/drawdoc4.cxx
@@ -724,13 +724,13 @@ sal_uInt16 
SdDrawDocument::GetMasterPageUserCount(SdrPage* pMaster) const
 
 void SdDrawDocument::StopOnlineSpelling()
 {
-if (mpOnlineSpellingTimer  mpOnlineSpellingTimer-IsActive())
+if (mpOnlineSpellingIdle  mpOnlineSpellingIdle-IsActive())
 {
-mpOnlineSpellingTimer-Stop();
+mpOnlineSpellingIdle-Stop();
 }
 
-delete mpOnlineSpellingTimer;
-mpOnlineSpellingTimer = NULL;
+delete mpOnlineSpellingIdle;
+mpOnlineSpellingIdle = NULL;
 
 delete mpOnlineSpellingList;
 mpOnlineSpellingList = NULL;
@@ -772,10 +772,10 @@ void SdDrawDocument::StartOnlineSpelling(bool 
bForceSpelling)
 }
 
 mpOnlineSpellingList-seekShape(0);
-mpOnlineSpellingTimer = new Timer();
-mpOnlineSpellingTimer-SetTimeoutHdl( LINK(this, SdDrawDocument, 
OnlineSpellingHdl) );
-mpOnlineSpellingTimer-SetTimeout(250);
-mpOnlineSpellingTimer-Start();
+mpOnlineSpellingIdle = new Idle();
+mpOnlineSpellingIdle-SetIdleHdl( LINK(this, SdDrawDocument, 
OnlineSpellingHdl) );
+mpOnlineSpellingIdle-SetPriority(VCL_IDLE_PRIORITY_LOWEST);
+mpOnlineSpellingIdle-Start();
 }
 }
 
@@ -860,7 +860,7 @@ IMPL_LINK_NOARG(SdDrawDocument, OnlineSpellingHdl)
 }
 
 // Continue search
-mpOnlineSpellingTimer-Start();
+mpOnlineSpellingIdle-Start();
 }
 else
 {
diff --git a/sd/source/ui/slidesorter/cache/SlsQueueProcessor.cxx 
b/sd/source/ui/slidesorter/cache/SlsQueueProcessor.cxx
index cc6c788..1364bee 100644
--- a/sd/source/ui/slidesorter/cache/SlsQueueProcessor.cxx
+++ b/sd/source/ui/slidesorter/cache/SlsQueueProcessor.cxx
@@ -32,7 +32,7 @@ QueueProcessor::QueueProcessor (
 const bool bDoSuperSampling,
 const SharedCacheContext rpCacheContext)
 : maMutex(),
-  maTimer(),
+  maIdle(),
   mnTimeBetweenHighPriorityRequests (10/*ms*/),
   mnTimeBetweenLowPriorityRequests (100/*ms*/),
   mnTimeBetweenRequestsWhenNotIdle (1000/*ms*/),
@@ -58,8 +58,8 @@ QueueProcessor::QueueProcessor (
 if (aTimeBetweenReqeusts.hassal_Int32())
 aTimeBetweenReqeusts = mnTimeBetweenRequestsWhenNotIdle;
 
-maTimer.SetTimeoutHdl (LINK(this,QueueProcessor,ProcessRequestHdl));
-maTimer.SetTimeout (mnTimeBetweenHighPriorityRequests);
+maIdle.SetIdleHdl (LINK(this,QueueProcessor,ProcessRequestHdl));
+maIdle.SetPriority (VCL_IDLE_PRIORITY_REPAINT);
 }
 
 QueueProcessor::~QueueProcessor (void)
@@ -70,20 +70,20 @@ void QueueProcessor::Start (int nPriorityClass)
 {
 if (mbIsPaused)
 return;
-if ( ! maTimer.IsActive())
+if ( ! maIdle.IsActive())
 {
 if (nPriorityClass == 0)
-maTimer.SetTimeout (mnTimeBetweenHighPriorityRequests);
+maIdle.SetPriority (VCL_IDLE_PRIORITY_REPAINT);
 else
-maTimer.SetTimeout (mnTimeBetweenLowPriorityRequests);
-maTimer.Start();
+maIdle.SetPriority

[Libreoffice-commits] core.git: Branch 'feature/priorities' - basctl/source

2014-11-21 Thread Tobias Madl
 basctl/source/dlged/dlged.cxx |   12 
 basctl/source/inc/dlged.hxx   |2 --
 2 files changed, 14 deletions(-)

New commits:
commit dbe53133817ee00743216e9f0532f8d63e6f16eb
Author: Tobias Madl tobias.madl@gmail.com
Date:   Fri Nov 21 21:16:47 2014 +

timers: Timer never started, remove it completely.

Change-Id: I119529498f4bea014e5e0d3d81c39203080ff1c4

diff --git a/basctl/source/dlged/dlged.cxx b/basctl/source/dlged/dlged.cxx
index e1b40a1..d8c4be4 100644
--- a/basctl/source/dlged/dlged.cxx
+++ b/basctl/source/dlged/dlged.cxx
@@ -219,9 +219,6 @@ DlgEditor::DlgEditor (
 m_ClipboardDataFlavorsResource[1].HumanPresentableName = Dialog 8.0 ;
 m_ClipboardDataFlavorsResource[1].DataType = ::getCppuType( 
(const Sequence sal_Int8 *) 0 );
 
-aPaintIdle.SetPriority( VCL_IDLE_PRIORITY_HIGH );
-aPaintIdle.SetIdleHdl( LINK( this, DlgEditor, PaintTimeout ) );
-
 aMarkIdle.SetPriority(VCL_IDLE_PRIORITY_LOW);
 aMarkIdle.SetIdleHdl( LINK( this, DlgEditor, MarkTimeout ) );
 
@@ -249,7 +246,6 @@ DlgEditor::DlgEditor (
 
 DlgEditor::~DlgEditor()
 {
-aPaintIdle.Stop();
 aMarkIdle.Stop();
 
 ::comphelper::disposeComponent( m_xControlContainer );
@@ -478,12 +474,6 @@ bool DlgEditor::KeyInput( const KeyEvent rKEvt )
 void DlgEditor::Paint( const Rectangle rRect )
 {
 aPaintRect = rRect;
-PaintTimeout( aPaintIdle );
-}
-
-
-IMPL_LINK_NOARG(DlgEditor, PaintTimeout)
-{
 mnPaintGuard++;
 
 Size aMacSize;
@@ -580,8 +570,6 @@ IMPL_LINK_NOARG(DlgEditor, PaintTimeout)
 }
 
 mnPaintGuard--;
-
-return 0;
 }
 
 
diff --git a/basctl/source/inc/dlged.hxx b/basctl/source/inc/dlged.hxx
index 794f3f7..cd722fe 100644
--- a/basctl/source/inc/dlged.hxx
+++ b/basctl/source/inc/dlged.hxx
@@ -100,7 +100,6 @@ public:
 };
 
 private:
-DECL_LINK(PaintTimeout, void *);
 DECL_LINK(MarkTimeout, void *);
 
 void Print( Printer* pPrinter, const OUString rTitle );
@@ -128,7 +127,6 @@ private:
 boolbGridVisible;
 boolbGridSnap;
 boolbCreateOK;
-IdleaPaintIdle;
 Rectangle   aPaintRect;
 boolbDialogModelChanged;
 IdleaMarkIdle;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: basctl/source

2014-11-21 Thread Tobias Madl
 basctl/source/dlged/dlged.cxx |   11 ---
 basctl/source/inc/dlged.hxx   |2 --
 2 files changed, 13 deletions(-)

New commits:
commit 371c549b4921f7ac7bb336a1308b4fb14b9324ae
Author: Tobias Madl tobias.madl@gmail.com
Date:   Fri Nov 21 21:16:47 2014 +

timers: Timer never started, remove it completely.

Change-Id: I119529498f4bea014e5e0d3d81c39203080ff1c4
Reviewed-on: https://gerrit.libreoffice.org/13030
Reviewed-by: Jan Holesovsky ke...@collabora.com
Tested-by: Jan Holesovsky ke...@collabora.com

diff --git a/basctl/source/dlged/dlged.cxx b/basctl/source/dlged/dlged.cxx
index b6d525c..74c46e9 100644
--- a/basctl/source/dlged/dlged.cxx
+++ b/basctl/source/dlged/dlged.cxx
@@ -219,9 +219,6 @@ DlgEditor::DlgEditor (
 m_ClipboardDataFlavorsResource[1].HumanPresentableName = Dialog 8.0 ;
 m_ClipboardDataFlavorsResource[1].DataType = ::getCppuType( 
(const Sequence sal_Int8 *) 0 );
 
-aPaintTimer.SetTimeout( 1 );
-aPaintTimer.SetTimeoutHdl( LINK( this, DlgEditor, PaintTimeout ) );
-
 aMarkTimer.SetTimeout( 100 );
 aMarkTimer.SetTimeoutHdl( LINK( this, DlgEditor, MarkTimeout ) );
 
@@ -249,7 +246,6 @@ DlgEditor::DlgEditor (
 
 DlgEditor::~DlgEditor()
 {
-aPaintTimer.Stop();
 aMarkTimer.Stop();
 
 ::comphelper::disposeComponent( m_xControlContainer );
@@ -478,12 +474,7 @@ bool DlgEditor::KeyInput( const KeyEvent rKEvt )
 void DlgEditor::Paint( const Rectangle rRect )
 {
 aPaintRect = rRect;
-PaintTimeout( aPaintTimer );
-}
-
 
-IMPL_LINK_NOARG(DlgEditor, PaintTimeout)
-{
 mnPaintGuard++;
 
 Size aMacSize;
@@ -580,8 +571,6 @@ IMPL_LINK_NOARG(DlgEditor, PaintTimeout)
 }
 
 mnPaintGuard--;
-
-return 0;
 }
 
 
diff --git a/basctl/source/inc/dlged.hxx b/basctl/source/inc/dlged.hxx
index 981bc08..5204262 100644
--- a/basctl/source/inc/dlged.hxx
+++ b/basctl/source/inc/dlged.hxx
@@ -100,7 +100,6 @@ public:
 };
 
 private:
-DECL_LINK(PaintTimeout, void *);
 DECL_LINK(MarkTimeout, void *);
 
 void Print( Printer* pPrinter, const OUString rTitle );
@@ -128,7 +127,6 @@ private:
 boolbGridVisible;
 boolbGridSnap;
 boolbCreateOK;
-Timer   aPaintTimer;
 Rectangle   aPaintRect;
 boolbDialogModelChanged;
 Timer   aMarkTimer;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/priorities' - formula/source include/formula svtools/source svx/source vcl/source

2014-11-20 Thread Tobias Madl
 formula/source/ui/dlg/formula.cxx  |   18 +-
 formula/source/ui/dlg/funcutl.cxx  |   26 --
 include/formula/funcutl.hxx|2 +-
 svtools/source/contnr/imivctl.hxx  |8 
 svtools/source/contnr/imivctl1.cxx |   12 ++--
 svx/source/dialog/imapdlg.cxx  |8 
 svx/source/dialog/imapimp.hxx  |2 +-
 vcl/source/window/dockmgr.cxx  |   26 +-
 vcl/source/window/dockwin.cxx  |   14 +++---
 9 files changed, 57 insertions(+), 59 deletions(-)

New commits:
commit 918cb026bf0d3d7feb7f299ad4a4c83cda8ea504
Author: Tobias Madl tobias.madl@gmail.com
Date:   Thu Nov 20 16:21:17 2014 +

changed timers to idles

Change-Id: Iaceef008e7df91f3a9ad54fdaec25f2170100ee0

diff --git a/formula/source/ui/dlg/formula.cxx 
b/formula/source/ui/dlg/formula.cxx
index 5573f72..16d96fe 100644
--- a/formula/source/ui/dlg/formula.cxx
+++ b/formula/source/ui/dlg/formula.cxx
@@ -183,7 +183,7 @@ namespace formula
 boolbStructUpdate;
 MultiLineEdit*  pMEdit;
 boolbUserMatrixFlag;
-Timer   aTimer;
+IdleaIdle;
 
 const OUString  aTitle1;
 const OUString  aTitle2;
@@ -353,11 +353,11 @@ FormulaDlg_Impl::FormulaDlg_Impl(Dialog* pParent
 
 FormulaDlg_Impl::~FormulaDlg_Impl()
 {
-if(aTimer.IsActive())
+if(aIdle.IsActive())
 {
-aTimer.SetTimeoutHdl(Link());
-aTimer.Stop();
-}// if(aTimer.IsActive())
+aIdle.SetIdleHdl(Link());
+aIdle.Stop();
+}// if(aIdle.IsActive())
 bIsShutDown=true;// Set it in order to PreNotify not to save GetFocus.
 
 m_pTabCtrl-RemovePage(TP_FUNCTION);
@@ -412,7 +412,7 @@ void FormulaDlg_Impl::PreNotify( NotifyEvent rNEvt )
 
 FormEditData* pData = m_pHelper-getFormEditData();
 
-if (pData  !aTimer.IsActive()) // won't be destroyed via 
Close
+if (pData  !aIdle.IsActive()) // won't be destroyed via Close
 {
 pData-SetUniqueId(aActivWinId);
 }
@@ -1773,9 +1773,9 @@ OUString FormulaDlg::GetMeText() const
 void FormulaDlg::Update()
 {
 m_pImpl-Update();
-m_pImpl-aTimer.SetTimeout(200);
-m_pImpl-aTimer.SetTimeoutHdl(LINK( this, FormulaDlg, UpdateFocusHdl));
-m_pImpl-aTimer.Start();
+m_pImpl-aIdle.SetPriority(VCL_IDLE_PRIORITY_LOWER);
+m_pImpl-aIdle.SetIdleHdl(LINK( this, FormulaDlg, UpdateFocusHdl));
+m_pImpl-aIdle.Start();
 }
 
 void FormulaDlg::DoEnter(bool _bOk)
diff --git a/formula/source/ui/dlg/funcutl.cxx 
b/formula/source/ui/dlg/funcutl.cxx
index c02ed91..b089718 100644
--- a/formula/source/ui/dlg/funcutl.cxx
+++ b/formula/source/ui/dlg/funcutl.cxx
@@ -455,15 +455,13 @@ void EditBox::UpdateOldSel()
 
 // class RefEdit
 
-#define SC_ENABLE_TIME 100
-
 RefEdit::RefEdit( vcl::Window* _pParent, vcl::Window* pShrinkModeLabel, 
WinBits nStyle )
 : Edit( _pParent, nStyle )
 , pAnyRefDlg( NULL )
 , pLabelWidget(pShrinkModeLabel)
 {
-aTimer.SetTimeoutHdl( LINK( this, RefEdit, UpdateHdl ) );
-aTimer.SetTimeout( SC_ENABLE_TIME );
+aIdle.SetIdleHdl( LINK( this, RefEdit, UpdateHdl ) );
+aIdle.SetPriority( VCL_IDLE_PRIORITY_LOW );
 }
 
 RefEdit::RefEdit( vcl::Window* _pParent,IControlReferenceHandler* pParent,
@@ -472,8 +470,8 @@ RefEdit::RefEdit( vcl::Window* 
_pParent,IControlReferenceHandler* pParent,
 , pAnyRefDlg( pParent )
 , pLabelWidget(pShrinkModeLabel)
 {
-aTimer.SetTimeoutHdl( LINK( this, RefEdit, UpdateHdl ) );
-aTimer.SetTimeout( SC_ENABLE_TIME );
+aIdle.SetIdleHdl( LINK( this, RefEdit, UpdateHdl ) );
+aIdle.SetPriority( VCL_IDLE_PRIORITY_LOW );
 }
 
 extern C SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeRefEdit(vcl::Window 
*pParent, VclBuilder::stringmap )
@@ -483,8 +481,8 @@ extern C SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL 
makeRefEdit(vcl::Window *p
 
 RefEdit::~RefEdit()
 {
-aTimer.SetTimeoutHdl( Link() );
-aTimer.Stop();
+aIdle.SetIdleHdl( Link() );
+aIdle.Stop();
 }
 
 void RefEdit::SetRefString( const OUString rStr )
@@ -509,12 +507,12 @@ void RefEdit::SetRefValid(bool bValid)
 void RefEdit::SetText(const OUString rStr)
 {
 Edit::SetText( rStr );
-UpdateHdl( aTimer );
+UpdateHdl( aIdle );
 }
 
 void RefEdit::StartUpdateData()
 {
-aTimer.Start();
+aIdle.Start();
 }
 
 void RefEdit::SetReferences( IControlReferenceHandler* pDlg, vcl::Window* 
pLabel )
@@ -524,13 +522,13 @@ void RefEdit::SetReferences( IControlReferenceHandler* 
pDlg, vcl::Window* pLabel
 
 if( pDlg )
 {
-aTimer.SetTimeoutHdl( LINK( this, RefEdit, UpdateHdl ) );
-aTimer.SetTimeout( SC_ENABLE_TIME );
+aIdle.SetIdleHdl( LINK( this, RefEdit, UpdateHdl ) );
+aIdle.SetPriority( VCL_IDLE_PRIORITY_LOW );
 }
 else
 {
-aTimer.SetTimeoutHdl( Link() );
-aTimer.Stop

[Libreoffice-commits] core.git: Branch 'feature/priorities' - framework/source

2014-11-19 Thread Tobias Madl
 framework/source/uielement/toolbarmanager.cxx |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit ccad3636f8577b1e89a8e3064dd51d2bd4d53751
Author: Tobias Madl tobias.madl@gmail.com
Date:   Wed Nov 19 12:47:05 2014 +

merge fix

Change-Id: If567ad20c9bfbe93da8ea73a4e36b46a62280474

diff --git a/framework/source/uielement/toolbarmanager.cxx 
b/framework/source/uielement/toolbarmanager.cxx
index cc07a53..f18bc3f 100644
--- a/framework/source/uielement/toolbarmanager.cxx
+++ b/framework/source/uielement/toolbarmanager.cxx
@@ -477,7 +477,7 @@ throw ( RuntimeException, std::exception )
 SolarMutexGuard g;
 if ( Action.Action == FrameAction_CONTEXT_CHANGED )
 {
-m_aAsyncUpdateControllersIdle.Start();
+m_aAsyncUpdateControllersTimer.Start();
 }
 }
 
@@ -1417,7 +1417,7 @@ void ToolBarManager::FillToolbar( const Reference 
XIndexAccess  rItemContaine
 UpdateControllers();
 else if ( m_pToolBar-IsReallyVisible() )
 {
-m_aAsyncUpdateControllersIdle.Start();
+m_aAsyncUpdateControllersTimer.Start();
 }
 
 // Try to retrieve UIName from the container property set and set it as 
the title
@@ -2046,7 +2046,7 @@ IMPL_LINK( ToolBarManager, StateChanged, 
StateChangedType*, pStateChangedType )
 {
 if ( m_pToolBar-IsReallyVisible() )
 {
-m_aAsyncUpdateControllersIdle.Start();
+m_aAsyncUpdateControllersTimer.Start();
 }
 }
 else if ( *pStateChangedType == StateChangedType::INITSHOW )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/priorities' - avmedia/source cui/source sc/source sfx2/source sw/source

2014-11-19 Thread Tobias Madl
 avmedia/source/framework/mediacontrol.cxx |1 -
 cui/source/options/optjava.cxx|1 -
 sc/source/core/tool/chartlis.cxx  |1 -
 sfx2/source/control/dispatch.cxx  |2 --
 sw/source/uibase/utlui/navipi.cxx |2 --
 5 files changed, 7 deletions(-)

New commits:
commit 6f4487a6ae7f5fab02d87ad80404381a4731c9b8
Author: Tobias Madl tobias.madl@gmail.com
Date:   Thu Nov 20 07:51:46 2014 +

removed unused timeout defines

Change-Id: I1ebada7b06657e0ac294e60bca5d6dd5b45e9d04

diff --git a/avmedia/source/framework/mediacontrol.cxx 
b/avmedia/source/framework/mediacontrol.cxx
index 5d64845..9c92ffa 100644
--- a/avmedia/source/framework/mediacontrol.cxx
+++ b/avmedia/source/framework/mediacontrol.cxx
@@ -33,7 +33,6 @@
 #include math.h
 #include algorithm
 
-#define AVMEDIA_TIMEOUT 100
 #define AVMEDIA_TIME_RANGE  2048
 #define AVMEDIA_DB_RANGE-40
 #define AVMEDIA_LINEINCREMENT   1.0
diff --git a/cui/source/options/optjava.cxx b/cui/source/options/optjava.cxx
index 242ac08..ef7b7c3 100644
--- a/cui/source/options/optjava.cxx
+++ b/cui/source/options/optjava.cxx
@@ -53,7 +53,6 @@
 // define 
 
 #define CLASSPATH_DELIMITER SAL_PATHSEPARATOR
-#define RESET_TIMEOUT   300
 
 using namespace ::com::sun::star::lang;
 using namespace ::com::sun::star::ucb;
diff --git a/sc/source/core/tool/chartlis.cxx b/sc/source/core/tool/chartlis.cxx
index c3c2905..bf16b3e 100644
--- a/sc/source/core/tool/chartlis.cxx
+++ b/sc/source/core/tool/chartlis.cxx
@@ -34,7 +34,6 @@ using ::std::for_each;
 
 // Update chart listeners quickly, to get a similar behavior to loaded charts
 // which register UNO listeners.
-#define SC_CHARTTIMEOUT 10
 
 class ScChartUnoData
 {
diff --git a/sfx2/source/control/dispatch.cxx b/sfx2/source/control/dispatch.cxx
index 96c2d29..849ac8b 100644
--- a/sfx2/source/control/dispatch.cxx
+++ b/sfx2/source/control/dispatch.cxx
@@ -140,8 +140,6 @@ struct SfxDispatcher_Impl
 std::deque std::dequeSfxToDo_Impl  aToDoCopyStack;
 };
 
-#define SFX_FLUSH_TIMEOUT50
-
 /** This method checks if the stack of the SfxDispatchers is flushed, or if
 push- or pop- commands are pending.
 */
diff --git a/sw/source/uibase/utlui/navipi.cxx 
b/sw/source/uibase/utlui/navipi.cxx
index 79110f7..a677d1d 100644
--- a/sw/source/uibase/utlui/navipi.cxx
+++ b/sw/source/uibase/utlui/navipi.cxx
@@ -56,8 +56,6 @@
 #include unomid.h
 #include boost/scoped_ptr.hpp
 
-#define PAGE_CHANGE_TIMEOUT 1000
-
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::frame;
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/priorities' - sc/source sd/source sfx2/source

2014-11-18 Thread Tobias Madl
 sc/source/ui/dbgui/sfiltdlg.cxx |   20 ++--
 sc/source/ui/inc/filtdlg.hxx|4 ++--
 sd/source/ui/inc/View.hxx   |4 ++--
 sd/source/ui/view/sdview.cxx|   12 ++--
 sd/source/ui/view/sdview3.cxx   |8 
 sfx2/source/dialog/basedlgs.cxx |   28 ++--
 sfx2/source/dialog/dockwin.cxx  |   16 
 7 files changed, 46 insertions(+), 46 deletions(-)

New commits:
commit 8d502682aca3351deb91c3e58a1fad588131321a
Author: Tobias Madl tobias.madl@gmail.com
Date:   Tue Nov 18 15:11:29 2014 +

changed timers to idles

Change-Id: I1595a9711e3d5c564f1c9028cbb756f2b0ca45f1

diff --git a/sc/source/ui/dbgui/sfiltdlg.cxx b/sc/source/ui/dbgui/sfiltdlg.cxx
index 5f1e33f..d39e7c4 100644
--- a/sc/source/ui/dbgui/sfiltdlg.cxx
+++ b/sc/source/ui/dbgui/sfiltdlg.cxx
@@ -57,7 +57,7 @@ ScSpecialFilterDlg::ScSpecialFilterDlg( SfxBindings* pB, 
SfxChildWindow* pCW, vc
 pDoc( NULL ),
 pRefInputEdit   ( NULL ),
 bRefInputMode   ( false ),
-pTimer  ( NULL )
+pIdle  ( NULL )
 {
 get(pLbFilterArea,lbfilterarea);
 get(pEdFilterArea,edfilterarea);
@@ -85,10 +85,10 @@ ScSpecialFilterDlg::ScSpecialFilterDlg( SfxBindings* pB, 
SfxChildWindow* pCW, vc
 pEdFilterArea-GrabFocus();
 
 // Hack: RefInput-Kontrolle
-pTimer = new Timer;
-pTimer-SetTimeout( 50 ); // 50ms warten
-pTimer-SetTimeoutHdl( LINK( this, ScSpecialFilterDlg, TimeOutHdl ) );
-pTimer-Start();
+pIdle = new Idle;
+pIdle-SetTimeout( VCL_IDLE_PRIORITY_MEDIUM ); // 50ms warten
+pIdle-SetIdleHdl( LINK( this, ScSpecialFilterDlg, TimeOutHdl ) );
+pIdle-Start();
 
 pLbCopyArea-SetAccessibleName(pBtnCopyResult-GetText());
 pEdCopyArea-SetAccessibleName(pBtnCopyResult-GetText());
@@ -108,8 +108,8 @@ ScSpecialFilterDlg::~ScSpecialFilterDlg()
 delete pOutItem;
 
 // Hack: RefInput-Kontrolle
-pTimer-Stop();
-delete pTimer;
+pIdle-Stop();
+delete pIdle;
 }
 
 void ScSpecialFilterDlg::Init( const SfxItemSet rArgSet )
@@ -376,11 +376,11 @@ IMPL_LINK( ScSpecialFilterDlg, EndDlgHdl, Button*, pBtn )
 return 0;
 }
 
-IMPL_LINK( ScSpecialFilterDlg, TimeOutHdl, Timer*, _pTimer )
+IMPL_LINK( ScSpecialFilterDlg, TimeOutHdl, Idle*, _pIdle )
 {
 // alle 50ms nachschauen, ob RefInputMode noch stimmt
 
-if( (_pTimer == pTimer)  IsActive() )
+if( (_pIdle == pIdle)  IsActive() )
 {
 if( pEdCopyArea-HasFocus() || pRbCopyArea-HasFocus() )
 {
@@ -399,7 +399,7 @@ IMPL_LINK( ScSpecialFilterDlg, TimeOutHdl, Timer*, _pTimer )
 }
 }
 
-pTimer-Start();
+pIdle-Start();
 
 return 0;
 }
diff --git a/sc/source/ui/inc/filtdlg.hxx b/sc/source/ui/inc/filtdlg.hxx
index 1b1fdc5..e7e89cc 100644
--- a/sc/source/ui/inc/filtdlg.hxx
+++ b/sc/source/ui/inc/filtdlg.hxx
@@ -206,7 +206,7 @@ private:
 boolbRefInputMode;
 
 // Hack: RefInput control
-Timer*  pTimer;
+Idle*  pIdle;
 
 private:
 voidInit( const SfxItemSet rArgSet );
@@ -220,7 +220,7 @@ private:
 DECL_LINK( ScrollHdl, ScrollBar* );
 
 // Hack: RefInput control
-DECL_LINK( TimeOutHdl,   Timer* );
+DECL_LINK( TimeOutHdl,   Idle* );
 };
 
 #endif // INCLUDED_SC_SOURCE_UI_INC_FILTDLG_HXX
diff --git a/sd/source/ui/inc/View.hxx b/sd/source/ui/inc/View.hxx
index 6714dae..290860c 100644
--- a/sd/source/ui/inc/View.hxx
+++ b/sd/source/ui/inc/View.hxx
@@ -276,8 +276,8 @@ protected:
 Point   maDropPos;
 ::std::vectorOUString maDropFileVector;
 sal_Int8mnAction;
-Timer   maDropErrorTimer;
-Timer   maDropInsertFileTimer;
+IdlemaDropErrorIdle;
+IdlemaDropInsertFileIdle;
 sal_uInt16  mnLockRedrawSmph;
 boost::ptr_vectorSdViewRedrawRec maLockedRedraws;
 boolmbIsDropAllowed;
diff --git a/sd/source/ui/view/sdview.cxx b/sd/source/ui/view/sdview.cxx
index 9b93c8c..488edd4 100644
--- a/sd/source/ui/view/sdview.cxx
+++ b/sd/source/ui/view/sdview.cxx
@@ -138,10 +138,10 @@ View::View(SdDrawDocument rDrawDoc, OutputDevice* 
pOutDev,
 SetMeasureLayer(SD_RESSTR(STR_LAYER_MEASURELINES));
 
 // Timer for delayed drop (has to be for MAC)
-maDropErrorTimer.SetTimeoutHdl( LINK(this, View, DropErrorHdl) );
-maDropErrorTimer.SetTimeout(50);
-maDropInsertFileTimer.SetTimeoutHdl( LINK(this, View, DropInsertFileHdl) );
-maDropInsertFileTimer.SetTimeout(50);
+maDropErrorIdle.SetIdleHdl( LINK(this, View, DropErrorHdl) );
+maDropErrorIdle.SetPriority(VCL_IDLE_PRIORITY_MEDIUM);
+maDropInsertFileIdle.SetIdleHdl( LINK(this, View, DropInsertFileHdl) );
+maDropInsertFileIdle.SetPriority(VCL_IDLE_PRIORITY_MEDIUM);
 }
 
 void View::ImplClearDrawDropMarker()
@@ -160,8 +160,8 @@ View::~View()
 // release content

[Libreoffice-commits] core.git: Branch 'feature/priorities' - include/sfx2 include/svx sfx2/source svx/source

2014-11-17 Thread Tobias Madl
 include/sfx2/dinfdlg.hxx|4 ++--
 include/svx/numvset.hxx |4 ++--
 sfx2/source/dialog/dinfdlg.cxx  |   16 
 svx/source/dialog/svxbmpnumvalueset.cxx |6 +++---
 4 files changed, 15 insertions(+), 15 deletions(-)

New commits:
commit 55cf9f3194f5bc5a6b98b6424d806d53a617c3bc
Author: Tobias Madl tobias.madl@gmail.com
Date:   Mon Nov 17 09:25:25 2014 +

changed timers to idles

Change-Id: Icb6e3e72939ab0d04d9f099f1e476131a223de48

diff --git a/include/sfx2/dinfdlg.hxx b/include/sfx2/dinfdlg.hxx
index 340681a..0f867a4 100644
--- a/include/sfx2/dinfdlg.hxx
+++ b/include/sfx2/dinfdlg.hxx
@@ -424,8 +424,8 @@ private:
 std::vector CustomPropertyLine*   m_aCustomPropertiesLines;
 CustomPropertyLine* m_pCurrentLine;
 SvNumberFormatter   m_aNumberFormatter;
-Timer   m_aEditLoseFocusTimer;
-Timer   m_aBoxLoseFocusTimer;
+Idlem_aEditLoseFocusIdle;
+Idlem_aBoxLoseFocusIdle;
 Linkm_aRemovedHdl;
 
 DECL_LINK(  TypeHdl, CustomPropertiesTypeBox* );
diff --git a/include/svx/numvset.hxx b/include/svx/numvset.hxx
index ae5a402..4bc16cf 100644
--- a/include/svx/numvset.hxx
+++ b/include/svx/numvset.hxx
@@ -90,7 +90,7 @@ class SVX_DLLPUBLIC SvxNumValueSet : public ValueSet
 
 class SVX_DLLPUBLIC SvxBmpNumValueSet : public SvxNumValueSet
 {
-Timer   aFormatTimer;
+IdleaFormatIdle;
 boolbGrfNotFound;
 
 void init();
@@ -101,7 +101,7 @@ class SVX_DLLPUBLIC SvxBmpNumValueSet : public 
SvxNumValueSet
 voidSetGrfNotFound(bool bSet) {bGrfNotFound = bSet;}
 boolIsGrfNotFound()const {return bGrfNotFound;}
 
-Timer  GetFormatTimer() {return aFormatTimer;}
+Idle  GetFormatIdle() {return aFormatIdle;}
 
 public:
 SvxBmpNumValueSet(vcl::Window* pParent, WinBits nWinBits = WB_TABSTOP);
diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx
index 850cb9c..4ac4070 100644
--- a/sfx2/source/dialog/dinfdlg.cxx
+++ b/sfx2/source/dialog/dinfdlg.cxx
@@ -1426,10 +1426,10 @@ 
CustomPropertiesWindow::CustomPropertiesWindow(vcl::Window* pParent,
 
Application::GetSettings().GetLanguageTag().getLanguageType() )
 
 {
-m_aEditLoseFocusTimer.SetTimeout( 300 );
-m_aEditLoseFocusTimer.SetTimeoutHdl( LINK( this, CustomPropertiesWindow, 
EditTimeoutHdl ) );
-m_aBoxLoseFocusTimer.SetTimeout( 300 );
-m_aBoxLoseFocusTimer.SetTimeoutHdl( LINK( this, CustomPropertiesWindow, 
BoxTimeoutHdl ) );
+m_aEditLoseFocusIdle.SetPriority( VCL_IDLE_PRIORITY_LOWEST );
+m_aEditLoseFocusIdle.SetIdleHdl( LINK( this, CustomPropertiesWindow, 
EditTimeoutHdl ) );
+m_aBoxLoseFocusIdle.SetPriority( VCL_IDLE_PRIORITY_LOWEST );
+m_aBoxLoseFocusIdle.SetIdleHdl( LINK( this, CustomPropertiesWindow, 
BoxTimeoutHdl ) );
 
 m_aNameBox.add_mnemonic_label(m_pHeaderAccName);
 m_aNameBox.SetAccessibleName(m_pHeaderAccName-GetText());
@@ -1454,8 +1454,8 @@ 
CustomPropertiesWindow::CustomPropertiesWindow(vcl::Window* pParent,
 
 CustomPropertiesWindow::~CustomPropertiesWindow()
 {
-m_aEditLoseFocusTimer.Stop();
-m_aBoxLoseFocusTimer.Stop();
+m_aEditLoseFocusIdle.Stop();
+m_aBoxLoseFocusIdle.Stop();
 ClearAllLines();
 }
 
@@ -1531,7 +1531,7 @@ IMPL_LINK( CustomPropertiesWindow, EditLoseFocusHdl, 
CustomPropertiesEdit*, pEdi
 if ( !pLine-m_bTypeLostFocus )
 {
 m_pCurrentLine = pLine;
-m_aEditLoseFocusTimer.Start();
+m_aEditLoseFocusIdle.Start();
 }
 else
 pLine-m_bTypeLostFocus = false;
@@ -1544,7 +1544,7 @@ IMPL_LINK( CustomPropertiesWindow, BoxLoseFocusHdl, 
CustomPropertiesTypeBox*, pB
 if ( pBox )
 {
 m_pCurrentLine = pBox-GetLine();
-m_aBoxLoseFocusTimer.Start();
+m_aBoxLoseFocusIdle.Start();
 }
 
 return 0;
diff --git a/svx/source/dialog/svxbmpnumvalueset.cxx 
b/svx/source/dialog/svxbmpnumvalueset.cxx
index 0963e6d..55aebe3 100644
--- a/svx/source/dialog/svxbmpnumvalueset.cxx
+++ b/svx/source/dialog/svxbmpnumvalueset.cxx
@@ -480,15 +480,15 @@ void SvxBmpNumValueSet::init()
 GalleryExplorer::BeginLocking(GALLERY_THEME_BULLETS);
 SetStyle( GetStyle() | WB_VSCROLL );
 SetLineCount( 3 );
-aFormatTimer.SetTimeout(300);
-aFormatTimer.SetTimeoutHdl(LINK(this, SvxBmpNumValueSet, FormatHdl_Impl));
+aFormatIdle.SetPriority(VCL_IDLE_PRIORITY_LOWEST);
+aFormatIdle.SetIdleHdl(LINK(this, SvxBmpNumValueSet, FormatHdl_Impl));
 }
 
 
 SvxBmpNumValueSet::~SvxBmpNumValueSet()
 {
 GalleryExplorer::EndLocking(GALLERY_THEME_BULLETS);
-aFormatTimer.Stop();
+aFormatIdle.Stop();
 }
 
 void SvxBmpNumValueSet::UserDraw( const UserDrawEvent rUDEvt

[Libreoffice-commits] core.git: Branch 'feature/priorities' - 2 commits - include/svtools svtools/source svx/source

2014-11-17 Thread Tobias Madl
 include/svtools/asynclink.hxx |8 
 svtools/source/control/asynclink.cxx  |   18 +-
 svx/source/sdr/overlay/overlaymanagerbuffered.cxx |2 +-
 3 files changed, 14 insertions(+), 14 deletions(-)

New commits:
commit 280649a558b085de0bfdd9ff6a70a4d6c5be527b
Author: Tobias Madl tobias.madl@gmail.com
Date:   Mon Nov 17 12:36:23 2014 +

changed Timer tp idle

Change-Id: Ia3e76239ba98530547e057bebfda767ad684730b

diff --git a/include/svtools/asynclink.hxx b/include/svtools/asynclink.hxx
index e303bbe..fea886d 100644
--- a/include/svtools/asynclink.hxx
+++ b/include/svtools/asynclink.hxx
@@ -25,7 +25,7 @@
 #include tools/link.hxx
 #include osl/mutex.hxx
 
-class Timer;
+class Idle;
 struct ImplSVEvent;
 
 namespace svtools {
@@ -34,7 +34,7 @@ class SVT_DLLPUBLIC AsynchronLink
 {
 Link   _aLink;
 ImplSVEvent * _nEventId;
-Timer* _pTimer;
+Idle*  _pIdle;
 bool   _bInCall;
 bool*  _pDeleted;
 void*  _pArg;
@@ -47,7 +47,7 @@ public:
 AsynchronLink( const Link rLink )
 : _aLink( rLink )
 , _nEventId( 0 )
-, _pTimer( 0 )
+, _pIdle( 0 )
 , _bInCall( false )
 , _pDeleted( 0 )
 , _pArg( 0 )
@@ -55,7 +55,7 @@ public:
 {}
 AsynchronLink()
 : _nEventId( 0 )
-, _pTimer( 0 )
+, _pIdle( 0 )
 , _bInCall( false )
 , _pDeleted( 0 )
 , _pArg( 0 )
diff --git a/svtools/source/control/asynclink.cxx 
b/svtools/source/control/asynclink.cxx
index 57550e8..1efd934 100644
--- a/svtools/source/control/asynclink.cxx
+++ b/svtools/source/control/asynclink.cxx
@@ -46,7 +46,7 @@ bAllowDoubles
 {
 _pArg = pObj;
 DBG_ASSERT( bAllowDoubles ||
-( !_nEventId  ( !_pTimer || !_pTimer-IsActive() ) ),
+( !_nEventId  ( !_pIdle || !_pIdle-IsActive() ) ),
 Schon ein Call unterwegs );
 if( _nEventId )
 {
@@ -54,17 +54,17 @@ bAllowDoubles
 Application::RemoveUserEvent( _nEventId );
 if( _pMutex ) _pMutex-release();
 }
-if( _pTimer )_pTimer-Stop();
+if( _pIdle )_pIdle-Stop();
 if( bUseTimer )
 {
-if( !_pTimer )
+if( !_pIdle )
 {
-_pTimer = new Timer;
-_pTimer-SetTimeout( 0 );
-_pTimer-SetTimeoutHdl( STATIC_LINK(
+_pIdle = new Idle;
+_pIdle-SetPriority( VCL_IDLE_PRIORITY_HIGHEST );
+_pIdle-SetIdleHdl( STATIC_LINK(
 this, AsynchronLink, HandleCall) );
 }
-_pTimer-Start();
+_pIdle-Start();
 }
 else
 {
@@ -81,7 +81,7 @@ AsynchronLink::~AsynchronLink()
 {
 Application::RemoveUserEvent( _nEventId );
 }
-delete _pTimer;
+delete _pIdle;
 if( _pDeleted ) *_pDeleted = true;
 delete _pMutex;
 }
@@ -104,7 +104,7 @@ void AsynchronLink::ClearPendingCall()
 _nEventId = 0;
 }
 if( _pMutex ) _pMutex-release();
-if( _pTimer ) _pTimer-Stop();
+if( _pIdle ) _pIdle-Stop();
 }
 
 void AsynchronLink::Call_Impl( void* pArg )
commit 1688ee26cf83fcb954af20fff0a66ab381759ca3
Author: Tobias Madl tobias.madl@gmail.com
Date:   Mon Nov 17 12:14:50 2014 +

fixed timer, idle bug

Change-Id: Ic7ce17e39d2bcaf608576dd785b4f6abf62407c0

diff --git a/svx/source/sdr/overlay/overlaymanagerbuffered.cxx 
b/svx/source/sdr/overlay/overlaymanagerbuffered.cxx
index dde69b3..006c310 100644
--- a/svx/source/sdr/overlay/overlaymanagerbuffered.cxx
+++ b/svx/source/sdr/overlay/overlaymanagerbuffered.cxx
@@ -429,7 +429,7 @@ namespace sdr
 {
 // Init timer
 maBufferIdle.SetPriority( VCL_IDLE_PRIORITY_HIGH );
-maBufferIdle.SetTimeoutHdl(LINK(this, OverlayManagerBuffered, 
ImpBufferTimerHandler));
+maBufferIdle.SetIdleHdl(LINK(this, OverlayManagerBuffered, 
ImpBufferTimerHandler));
 }
 
 rtl::ReferenceOverlayManager OverlayManagerBuffered::create(
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/priorities' - cui/source extensions/source sw/source

2014-11-14 Thread Tobias Madl
 cui/source/dialogs/cuigaldlg.cxx  |   12 ++--
 cui/source/dialogs/thesdlg.cxx|8 
 cui/source/inc/cuigaldlg.hxx  |2 +-
 cui/source/inc/thesdlg.hxx|2 +-
 cui/source/tabpages/backgrnd.cxx  |   26 +-
 cui/source/tabpages/chardlg.cxx   |8 
 extensions/source/bibliography/bibcont.cxx|6 +++---
 extensions/source/bibliography/bibcont.hxx|2 +-
 extensions/source/bibliography/toolbar.cxx|6 +++---
 extensions/source/bibliography/toolbar.hxx|2 +-
 extensions/source/update/ui/updatecheckui.cxx |   12 ++--
 sw/source/uibase/docvw/edtwin.cxx |8 
 sw/source/uibase/inc/edtwin.hxx   |2 +-
 13 files changed, 48 insertions(+), 48 deletions(-)

New commits:
commit 5ee62de1e4fa55a45f49bbb0cfe81dd07111ba51
Author: Tobias Madl tobias.madl@gmail.com
Date:   Fri Nov 14 15:31:13 2014 +

changed timers to idles

Change-Id: I223026ce7676a3f8fcda7eb33326cd4ee949c6f0

diff --git a/cui/source/dialogs/cuigaldlg.cxx b/cui/source/dialogs/cuigaldlg.cxx
index e06c973..ddb379a 100644
--- a/cui/source/dialogs/cuigaldlg.cxx
+++ b/cui/source/dialogs/cuigaldlg.cxx
@@ -435,7 +435,7 @@ void TakeProgress::StartExecuteModal( const Link 
rEndDialogHdl )
 ActualizeProgress::ActualizeProgress(vcl::Window* pWindow, GalleryTheme* pThm)
 : ModalDialog(pWindow, GalleryUpdateProgress,
 cui/ui/galleryupdateprogress.ui)
-, pTimer(NULL)
+, pIdle(NULL)
 , pTheme(pThm)
 {
 get(m_pFtActualizeFile, file);
@@ -447,13 +447,13 @@ short ActualizeProgress::Execute()
 {
 short nRet;
 
-pTimer = new Timer;
+pIdle = new Idle;
 
-if ( pTimer )
+if ( pIdle )
 {
-pTimer-SetTimeoutHdl( LINK( this, ActualizeProgress, TimeoutHdl ) );
-pTimer-SetTimeout( 500 );
-pTimer-Start();
+pIdle-SetIdleHdl( LINK( this, ActualizeProgress, TimeoutHdl ) );
+pIdle-SetPriority( VCL_IDLE_PRIORITY_LOWEST );
+pIdle-Start();
 }
 
 nRet = ModalDialog::Execute();
diff --git a/cui/source/dialogs/thesdlg.cxx b/cui/source/dialogs/thesdlg.cxx
index 03f587b..79c4d9e 100644
--- a/cui/source/dialogs/thesdlg.cxx
+++ b/cui/source/dialogs/thesdlg.cxx
@@ -60,8 +60,8 @@ LookUpComboBox::LookUpComboBox(vcl::Window *pParent)
 {
 EnableAutoSize(true);
 
-m_aModifyTimer.SetTimeoutHdl( LINK( this, LookUpComboBox, ModifyTimer_Hdl 
) );
-m_aModifyTimer.SetTimeout( 500 );
+m_aModifyIdle.SetIdleHdl( LINK( this, LookUpComboBox, ModifyTimer_Hdl ) );
+m_aModifyIdle.SetPriority( VCL_IDLE_PRIORITY_LOWEST );
 
 EnableAutocomplete( false );
 }
@@ -82,13 +82,13 @@ LookUpComboBox::~LookUpComboBox()
 
 void LookUpComboBox::Modify()
 {
-m_aModifyTimer.Start();
+m_aModifyIdle.Start();
 }
 
 IMPL_LINK( LookUpComboBox, ModifyTimer_Hdl, Timer *, EMPTYARG /*pTimer*/ )
 {
 m_pDialog-LookUp( GetText() );
-m_aModifyTimer.Stop();
+m_aModifyIdle.Stop();
 return 0;
 }
 
diff --git a/cui/source/inc/cuigaldlg.hxx b/cui/source/inc/cuigaldlg.hxx
index 83f234f..ed98621 100644
--- a/cui/source/inc/cuigaldlg.hxx
+++ b/cui/source/inc/cuigaldlg.hxx
@@ -150,7 +150,7 @@ class ActualizeProgress : public ModalDialog
 private:
 FixedText*  m_pFtActualizeFile;
 CancelButton*   m_pBtnCancel;
-Timer*  pTimer;
+Idle*   pIdle;
 GalleryTheme*   pTheme;
 GalleryProgress aStatusProgress;
 
diff --git a/cui/source/inc/thesdlg.hxx b/cui/source/inc/thesdlg.hxx
index 95e712c..729fb8f 100644
--- a/cui/source/inc/thesdlg.hxx
+++ b/cui/source/inc/thesdlg.hxx
@@ -33,7 +33,7 @@ class SvxThesaurusDialog;
 
 class LookUpComboBox : public ComboBox
 {
-Timer   m_aModifyTimer;
+Idlem_aModifyIdle;
 Selection   m_aSelection;
 SvxThesaurusDialog* m_pDialog;
 
diff --git a/cui/source/tabpages/backgrnd.cxx b/cui/source/tabpages/backgrnd.cxx
index 8cb9a4a..03fc1a7 100644
--- a/cui/source/tabpages/backgrnd.cxx
+++ b/cui/source/tabpages/backgrnd.cxx
@@ -106,11 +106,11 @@ struct SvxBackgroundPara_Impl
 
 struct SvxBackgroundPage_Impl
 {
-Timer*  pLoadTimer;
+Idle*  pLoadIdle;
 boolbIsImportDlgInExecute;
 
 SvxBackgroundPage_Impl()
-: pLoadTimer(NULL)
+: pLoadIdle(NULL)
 , bIsImportDlgInExecute(false)
 {}
 };
@@ -421,7 +421,7 @@ SvxBackgroundTabPage::SvxBackgroundTabPage(vcl::Window* 
pParent, const SfxItemSe
 
 SvxBackgroundTabPage::~SvxBackgroundTabPage()
 {
-delete pPageImpl-pLoadTimer;
+delete pPageImpl-pLoadIdle;
 delete pPageImpl;
 delete pImportDlg;
 
@@ -719,10 +719,10 @@ void SvxBackgroundTabPage::FillUserData()
 
 bool SvxBackgroundTabPage::FillItemSet( SfxItemSet* rCoreSet )
 {
-if ( pPageImpl-pLoadTimer  pPageImpl-pLoadTimer-IsActive

[Libreoffice-commits] core.git: Branch 'feature/priorities' - forms/source linguistic/source sfx2/source starmath/inc starmath/source

2014-11-13 Thread Tobias Madl
 forms/source/component/ListBox.cxx   |   16 +++
 forms/source/component/ListBox.hxx   |2 -
 linguistic/source/lngsvcmgr.cxx  |6 ++---
 linguistic/source/lngsvcmgr.hxx  |2 -
 sfx2/source/dialog/filedlghelper.cxx |   12 +--
 sfx2/source/dialog/filedlgimpl.hxx   |2 -
 sfx2/source/dialog/templdlg.cxx  |   18 -
 sfx2/source/doc/new.cxx  |8 +++
 sfx2/source/inc/templdgi.hxx |2 -
 starmath/inc/edit.hxx|4 +--
 starmath/source/edit.cxx |   36 +--
 11 files changed, 54 insertions(+), 54 deletions(-)

New commits:
commit dd523a5f478420d15ace896a961c02ad048ab43d
Author: Tobias Madl tobias.madl@gmail.com
Date:   Thu Nov 13 14:50:26 2014 +

changed timers to idles

Change-Id: Ic0d7730f7880dfe2e83c84e773b8cc420249b269

diff --git a/forms/source/component/ListBox.cxx 
b/forms/source/component/ListBox.cxx
index 2d42a97..e86bef7 100644
--- a/forms/source/component/ListBox.cxx
+++ b/forms/source/component/ListBox.cxx
@@ -1789,8 +1789,8 @@ namespace frm
 
 doSetDelegator();
 
-m_aChangeTimer.SetTimeout(500);
-m_aChangeTimer.SetTimeoutHdl(LINK(this,OListBoxControl,OnTimeout));
+m_aChangeIdle.SetPriority(VCL_IDLE_PRIORITY_LOWEST);
+m_aChangeIdle.SetIdleHdl(LINK(this,OListBoxControl,OnTimeout));
 }
 
 
@@ -1866,13 +1866,13 @@ namespace frm
 
 // and do the handling for the ChangeListeners
 ::osl::ClearableMutexGuard aGuard(m_aMutex);
-if ( m_aChangeTimer.IsActive() )
+if ( m_aChangeIdle.IsActive() )
 {
 ReferenceXPropertySet xSet(getModel(), UNO_QUERY);
 m_aCurrentSelection = xSet-getPropertyValue(PROPERTY_SELECT_SEQ);
 
-m_aChangeTimer.Stop();
-m_aChangeTimer.Start();
+m_aChangeIdle.Stop();
+m_aChangeIdle.Start();
 }
 else
 {
@@ -1902,7 +1902,7 @@ namespace frm
 if (bModified)
 {
 m_aCurrentSelection = aValue;
-m_aChangeTimer.Start();
+m_aChangeIdle.Start();
 }
 }
 }
@@ -1935,8 +1935,8 @@ namespace frm
 
 void OListBoxControl::disposing()
 {
-if (m_aChangeTimer.IsActive())
-m_aChangeTimer.Stop();
+if (m_aChangeIdle.IsActive())
+m_aChangeIdle.Stop();
 
 EventObject aEvent( *this );
 m_aChangeListeners.disposeAndClear( aEvent );
diff --git a/forms/source/component/ListBox.hxx 
b/forms/source/component/ListBox.hxx
index 991627c..85b380c 100644
--- a/forms/source/component/ListBox.hxx
+++ b/forms/source/component/ListBox.hxx
@@ -255,7 +255,7 @@ private:
 ::cppu::OInterfaceContainerHelper   m_aItemListeners;
 
 ::com::sun::star::uno::Any  m_aCurrentSelection;
-Timer   m_aChangeTimer;
+Idlem_aChangeIdle;
 
 ::com::sun::star::uno::Reference ::com::sun::star::awt::XListBox 
 m_xAggregateListBox;
diff --git a/linguistic/source/lngsvcmgr.cxx b/linguistic/source/lngsvcmgr.cxx
index 259dd8f..2538f41 100644
--- a/linguistic/source/lngsvcmgr.cxx
+++ b/linguistic/source/lngsvcmgr.cxx
@@ -476,8 +476,8 @@ LngSvcMgr::LngSvcMgr()
 
 UpdateAll();
 
-aUpdateTimer.SetTimeout(500);
-aUpdateTimer.SetTimeoutHdl(LINK(this, LngSvcMgr, updateAndBroadcast));
+aUpdateIdle.SetPriority(VCL_IDLE_PRIORITY_LOWEST);
+aUpdateIdle.SetIdleHdl(LINK(this, LngSvcMgr, updateAndBroadcast));
 
 // request to be notified if an extension has been added/removed
 uno::Referenceuno::XComponentContext 
xContext(comphelper::getProcessComponentContext());
@@ -513,7 +513,7 @@ void LngSvcMgr::modified(const lang::EventObject)
 clearSvcInfoArray(pAvailThesSvcs);
 
 //schedule in an update to execute in the main thread
-aUpdateTimer.Start();
+aUpdateIdle.Start();
 }
 
 //run update, and inform everyone that dictionaries (may) have changed, this
diff --git a/linguistic/source/lngsvcmgr.hxx b/linguistic/source/lngsvcmgr.hxx
index 1b0d664..c3046e8 100644
--- a/linguistic/source/lngsvcmgr.hxx
+++ b/linguistic/source/lngsvcmgr.hxx
@@ -81,7 +81,7 @@ class LngSvcMgr :
 com::sun::star::uno::Reference
 ::com::sun::star::util::XModifyBroadcaster xMB;
 
-Timer   aUpdateTimer;
+IdleaUpdateIdle;
 
 
 com::sun::star::uno::Sequence
diff --git a/sfx2/source/dialog/filedlghelper.cxx 
b/sfx2/source/dialog/filedlghelper.cxx
index 18da893..fe2fe37 100644
--- a/sfx2/source/dialog/filedlghelper.cxx
+++ b/sfx2/source/dialog/filedlghelper.cxx
@@ -200,7 +200,7 @@ void FileDialogHelper_Impl::handleFileSelectionChanged( 
const

[Libreoffice-commits] core.git: Branch 'feature/priorities' - include/svx svtools/source svx/source

2014-11-12 Thread Tobias Madl
 include/svx/fontwork.hxx   |2 +-
 include/svx/graphctl.hxx   |2 +-
 svtools/source/contnr/imivctl.hxx  |4 ++--
 svtools/source/contnr/imivctl1.cxx |6 +++---
 svx/source/dialog/fontwork.cxx |6 +++---
 svx/source/dialog/graphctl.cxx |6 +++---
 svx/source/dialog/srchdlg.cxx  |8 
 svx/source/form/datanavi.cxx   |8 
 svx/source/form/formcontroller.cxx |   18 +-
 svx/source/inc/datanavi.hxx|4 ++--
 svx/source/inc/formcontroller.hxx  |2 +-
 11 files changed, 33 insertions(+), 33 deletions(-)

New commits:
commit e2f6f98e0dca3888e50dbc6efca2771e9bcb66f9
Author: Tobias Madl tobias.madl@gmail.com
Date:   Wed Nov 12 12:59:59 2014 +

changed timers to idles

Change-Id: I39b081b751219201e86fec1e626b450f15bea9ab

diff --git a/include/svx/fontwork.hxx b/include/svx/fontwork.hxx
index 656eb91..ac91d4c 100644
--- a/include/svx/fontwork.hxx
+++ b/include/svx/fontwork.hxx
@@ -109,7 +109,7 @@ class SVX_DLLPUBLIC SvxFontWorkDialog : public 
SfxDockingWindow
 ColorLB aShadowColorLB;
 
 SfxBindingsrBindings;
-Timer   aInputTimer;
+IdleaInputIdle;
 
 sal_uInt16  nLastStyleTbxId;
 sal_uInt16  nLastAdjustTbxId;
diff --git a/include/svx/graphctl.hxx b/include/svx/graphctl.hxx
index 4e8060d..a2863d0 100644
--- a/include/svx/graphctl.hxx
+++ b/include/svx/graphctl.hxx
@@ -38,7 +38,7 @@ class SVX_DLLPUBLIC GraphCtrl : public Control
 friend class GraphCtrlUserCall;
 
 Graphic aGraphic;
-Timer   aUpdateTimer;
+IdleaUpdateIdle;
 LinkaMousePosLink;
 LinkaGraphSizeLink;
 LinkaMarkObjLink;
diff --git a/svtools/source/contnr/imivctl.hxx 
b/svtools/source/contnr/imivctl.hxx
index 03a9d06..ed244ad 100644
--- a/svtools/source/contnr/imivctl.hxx
+++ b/svtools/source/contnr/imivctl.hxx
@@ -168,7 +168,7 @@ class SvxIconChoiceCtrl_Impl
 Timer   aAutoArrangeTimer;
 Timer   aDocRectChangedTimer;
 Timer   aVisRectChangedTimer;
-Timer   aCallSelectHdlTimer;
+IdleaCallSelectHdlIdle;
 SizeaVirtOutputSize;
 SizeaImageSize;
 SizeaDefaultTextSize;
@@ -552,7 +552,7 @@ public:
 const Rectangle rBmpRect,
 bool bHide
 );
-voidStopSelectTimer() { aCallSelectHdlTimer.Stop(); }
+voidStopSelectTimer() { aCallSelectHdlIdle.Stop(); }
 
 voidCallEventListeners( sal_uLong nEvent, void* pData = 
NULL );
 
diff --git a/svtools/source/contnr/imivctl1.cxx 
b/svtools/source/contnr/imivctl1.cxx
index bbffe70..af597bb 100644
--- a/svtools/source/contnr/imivctl1.cxx
+++ b/svtools/source/contnr/imivctl1.cxx
@@ -139,8 +139,8 @@ SvxIconChoiceCtrl_Impl::SvxIconChoiceCtrl_Impl(
 aEditIdle.SetIdleHdl(LINK(this,SvxIconChoiceCtrl_Impl,EditTimeoutHdl));
 aAutoArrangeTimer.SetTimeout( 100 );
 
aAutoArrangeTimer.SetTimeoutHdl(LINK(this,SvxIconChoiceCtrl_Impl,AutoArrangeHdl));
-aCallSelectHdlTimer.SetTimeout( 500 );
-aCallSelectHdlTimer.SetTimeoutHdl( 
LINK(this,SvxIconChoiceCtrl_Impl,CallSelectHdlHdl));
+aCallSelectHdlIdle.SetPriority( VCL_IDLE_PRIORITY_LOWEST );
+aCallSelectHdlIdle.SetIdleHdl( 
LINK(this,SvxIconChoiceCtrl_Impl,CallSelectHdlHdl));
 
 aDocRectChangedTimer.SetTimeout( 50 );
 
aDocRectChangedTimer.SetTimeoutHdl(LINK(this,SvxIconChoiceCtrl_Impl,DocRectChangedHdl));
@@ -3778,7 +3778,7 @@ void SvxIconChoiceCtrl_Impl::CallSelectHandler( 
SvxIconChoiceCtrlEntry* )
 //pView-Select();
 }
 else
-aCallSelectHdlTimer.Start();
+aCallSelectHdlIdle.Start();
 }
 
 IMPL_LINK_NOARG(SvxIconChoiceCtrl_Impl, CallSelectHdlHdl)
diff --git a/svx/source/dialog/fontwork.cxx b/svx/source/dialog/fontwork.cxx
index ed0a318..660869c 100644
--- a/svx/source/dialog/fontwork.cxx
+++ b/svx/source/dialog/fontwork.cxx
@@ -265,8 +265,8 @@ SvxFontWorkDialog::SvxFontWorkDialog( SfxBindings *pBindinx,
 
 aShadowColorLB.SetSelectHdl( LINK(this, SvxFontWorkDialog, 
ColorSelectHdl_Impl) );
 
-aInputTimer.SetTimeout(500);
-aInputTimer.SetTimeoutHdl(LINK(this, SvxFontWorkDialog, 
InputTimoutHdl_Impl));
+aInputIdle.SetPriority(VCL_IDLE_PRIORITY_LOWEST);
+aInputIdle.SetIdleHdl(LINK(this, SvxFontWorkDialog, InputTimoutHdl_Impl));
 }
 
 SvxFontWorkDialog::~SvxFontWorkDialog()
@@ -709,7 +709,7 @@ IMPL_LINK_NOARG(SvxFontWorkDialog, SelectShadowHdl_Impl)
 
 IMPL_LINK_NOARG_INLINE_START(SvxFontWorkDialog, ModifyInputHdl_Impl)
 {
-aInputTimer.Start();
+aInputIdle.Start();
 return 0;
 }
 IMPL_LINK_NOARG_INLINE_END(SvxFontWorkDialog, ModifyInputHdl_Impl)
diff --git a/svx/source/dialog/graphctl.cxx b/svx

[Libreoffice-commits] core.git: Branch 'feature/priorities' - sc/source sw/source

2014-11-11 Thread Tobias Madl
 sc/source/ui/inc/tphfedit.hxx   |2 +-
 sc/source/ui/pagedlg/tphfedit.cxx   |   16 
 sw/source/core/doc/DocumentTimerManager.cxx |   16 
 sw/source/core/inc/DocumentTimerManager.hxx |2 +-
 4 files changed, 18 insertions(+), 18 deletions(-)

New commits:
commit c3b749e186fda9fd4ff98994f967d90c4d0e77ab
Author: Tobias Madl tobias.madl@gmail.com
Date:   Tue Nov 11 08:21:19 2014 +

changed timers to Idle

Change-Id: Ic7e795702618d1c623a2deeba1a86f804a249508

diff --git a/sc/source/ui/inc/tphfedit.hxx b/sc/source/ui/inc/tphfedit.hxx
index d304ebd..500e62d 100644
--- a/sc/source/ui/inc/tphfedit.hxx
+++ b/sc/source/ui/inc/tphfedit.hxx
@@ -100,7 +100,7 @@ class SC_DLLPUBLIC ScExtIButton : public ImageButton
 {
 private:
 
-Timer   aTimer;
+IdleaIdle;
 PopupMenu*  pPopupMenu;
 LinkaMLink;
 sal_uInt16  nSelected;
diff --git a/sc/source/ui/pagedlg/tphfedit.cxx 
b/sc/source/ui/pagedlg/tphfedit.cxx
index 33db5b3..3017413 100644
--- a/sc/source/ui/pagedlg/tphfedit.cxx
+++ b/sc/source/ui/pagedlg/tphfedit.cxx
@@ -331,7 +331,7 @@ ScExtIButton::ScExtIButton(vcl::Window* pParent, WinBits 
nBits )
 : ImageButton(pParent,nBits), pPopupMenu(NULL)
 {
 nSelected=0;
-aTimer.SetTimeout(600);
+aIdle.SetPriority(VCL_IDLE_PRIORITY_LOWEST);
 SetDropDown(PUSHBUTTON_DROPDOWN_TOOLBOX);
 }
 
@@ -347,10 +347,10 @@ void ScExtIButton::SetPopupMenu(PopupMenu* pPopUp)
 
 void ScExtIButton::MouseButtonDown( const MouseEvent rMEvt )
 {
-if(!aTimer.IsActive())
+if(!aIdle.IsActive())
 {
-aTimer.Start();
-aTimer.SetTimeoutHdl(LINK( this, ScExtIButton, TimerHdl));
+aIdle.SetIdleHdl(LINK( this, ScExtIButton, TimerHdl));
+aIdle.Start();
 }
 
 ImageButton::MouseButtonDown(rMEvt );
@@ -358,15 +358,15 @@ void ScExtIButton::MouseButtonDown( const MouseEvent 
rMEvt )
 
 void ScExtIButton::MouseButtonUp( const MouseEvent rMEvt)
 {
-aTimer.Stop();
-aTimer.SetTimeoutHdl(Link());
+aIdle.Stop();
+aIdle.SetIdleHdl(Link());
 ImageButton::MouseButtonUp(rMEvt );
 }
 
 void ScExtIButton::Click()
 {
-aTimer.Stop();
-aTimer.SetTimeoutHdl(Link());
+aIdle.Stop();
+aIdle.SetIdleHdl(Link());
 ImageButton::Click();
 }
 
diff --git a/sw/source/core/doc/DocumentTimerManager.cxx 
b/sw/source/core/doc/DocumentTimerManager.cxx
index 180b50b..6ee6e85 100644
--- a/sw/source/core/doc/DocumentTimerManager.cxx
+++ b/sw/source/core/doc/DocumentTimerManager.cxx
@@ -42,39 +42,39 @@ DocumentTimerManager::DocumentTimerManager( SwDoc i_rSwdoc 
) : m_rSwdoc( i_rSwd
 
mbStartIdleTimer( false ),
 
mIdleBlockCount( 0 )
 {
-maIdleTimer.SetTimeout( 600 );
-maIdleTimer.SetTimeoutHdl( LINK( this, DocumentTimerManager, DoIdleJobs) );
+maIdle.SetPriority( VCL_IDLE_PRIORITY_LOWEST );
+maIdle.SetIdleHdl( LINK( this, DocumentTimerManager, DoIdleJobs) );
 }
 
 void DocumentTimerManager::StartIdling()
 {
 mbStartIdleTimer = true;
 if( !mIdleBlockCount )
-maIdleTimer.Start();
+maIdle.Start();
 }
 
 void DocumentTimerManager::StopIdling()
 {
 mbStartIdleTimer = false;
-maIdleTimer.Stop();
+maIdle.Stop();
 }
 
 void DocumentTimerManager::BlockIdling()
 {
-maIdleTimer.Stop();
+maIdle.Stop();
 ++mIdleBlockCount;
 }
 
 void DocumentTimerManager::UnblockIdling()
 {
 --mIdleBlockCount;
-if( !mIdleBlockCount  mbStartIdleTimer  !maIdleTimer.IsActive() )
-maIdleTimer.Start();
+if( !mIdleBlockCount  mbStartIdleTimer  !maIdle.IsActive() )
+maIdle.Start();
 }
 
 void DocumentTimerManager::StartBackgroundJobs() {
 // Trigger DoIdleJobs(), asynchronously.
-maIdleTimer.Start();
+maIdle.Start();
 }
 
 IMPL_LINK( DocumentTimerManager, DoIdleJobs, Timer *, pTimer )
diff --git a/sw/source/core/inc/DocumentTimerManager.hxx 
b/sw/source/core/inc/DocumentTimerManager.hxx
index 5becf1b..7aaea4c 100644
--- a/sw/source/core/inc/DocumentTimerManager.hxx
+++ b/sw/source/core/inc/DocumentTimerManager.hxx
@@ -60,7 +60,7 @@ private:
 
  bool mbStartIdleTimer; // idle timer mode start/stop
  sal_Int32 mIdleBlockCount;
- Timer maIdleTimer;
+ Idle maIdle;
 };
 
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/priorities' - vcl/generic

2014-11-11 Thread Tobias Madl
 vcl/generic/print/genprnpsp.cxx |   28 ++--
 1 file changed, 14 insertions(+), 14 deletions(-)

New commits:
commit 0337c0ebcbd36e699785a9871c86e7f80dcb2b00
Author: Tobias Madl tobias.madl@gmail.com
Date:   Tue Nov 11 08:49:58 2014 +

changed timer to idle

Change-Id: Iac4b100e3eca456fdd19d67ff311a02c40dc060a

diff --git a/vcl/generic/print/genprnpsp.cxx b/vcl/generic/print/genprnpsp.cxx
index d215a1d..c15fcdb 100644
--- a/vcl/generic/print/genprnpsp.cxx
+++ b/vcl/generic/print/genprnpsp.cxx
@@ -1271,7 +1271,7 @@ bool PspSalPrinter::StartJob( const OUString* 
i_pFileName, const OUString i_rJo
 
 class PrinterUpdate
 {
-static Timer* pPrinterUpdateTimer;
+static Idle*  pPrinterUpdateIdle;
 static intnActiveJobs;
 
 static void doUpdate();
@@ -1282,7 +1282,7 @@ public:
 static void jobEnded();
 };
 
-Timer* PrinterUpdate::pPrinterUpdateTimer = NULL;
+Idle* PrinterUpdate::pPrinterUpdateIdle = NULL;
 int PrinterUpdate::nActiveJobs = 0;
 
 void PrinterUpdate::doUpdate()
@@ -1298,11 +1298,11 @@ IMPL_STATIC_LINK_NOINSTANCE( PrinterUpdate, 
UpdateTimerHdl, void*, EMPTYARG )
 if( nActiveJobs  1 )
 {
 doUpdate();
-delete pPrinterUpdateTimer;
-pPrinterUpdateTimer = NULL;
+delete pPrinterUpdateIdle;
+pPrinterUpdateIdle = NULL;
 }
 else
-pPrinterUpdateTimer-Start();
+pPrinterUpdateIdle-Start();
 
 return 0;
 }
@@ -1321,12 +1321,12 @@ void PrinterUpdate::update(SalGenericInstance 
rInstance)
 
 if( nActiveJobs  1 )
 doUpdate();
-else if( ! pPrinterUpdateTimer )
+else if( ! pPrinterUpdateIdle )
 {
-pPrinterUpdateTimer = new Timer();
-pPrinterUpdateTimer-SetTimeout( 500 );
-pPrinterUpdateTimer-SetTimeoutHdl( STATIC_LINK( NULL, PrinterUpdate, 
UpdateTimerHdl ) );
-pPrinterUpdateTimer-Start();
+pPrinterUpdateIdle = new Idle();
+pPrinterUpdateIdle-SetPriority( VCL_IDLE_PRIORITY_LOWEST );
+pPrinterUpdateIdle-SetIdleHdl( STATIC_LINK( NULL, PrinterUpdate, 
UpdateTimerHdl ) );
+pPrinterUpdateIdle-Start();
 }
 }
 
@@ -1345,11 +1345,11 @@ void PrinterUpdate::jobEnded()
 nActiveJobs--;
 if( nActiveJobs  1 )
 {
-if( pPrinterUpdateTimer )
+if( pPrinterUpdateIdle )
 {
-pPrinterUpdateTimer-Stop();
-delete pPrinterUpdateTimer;
-pPrinterUpdateTimer = NULL;
+pPrinterUpdateIdle-Stop();
+delete pPrinterUpdateIdle;
+pPrinterUpdateIdle = NULL;
 doUpdate();
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/priorities' - sw/source

2014-11-11 Thread Tobias Madl
 sw/source/ui/dbui/mmoutputtypepage.cxx |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit d0f9a92fdabdef3f16a5df46dec34421e6943b7f
Author: Tobias Madl tobias.madl@gmail.com
Date:   Tue Nov 11 09:44:53 2014 +

changed timer to idle

Change-Id: I58bcbf7f7f2d1f7237561d5abf8e73d46d0726de

diff --git a/sw/source/ui/dbui/mmoutputtypepage.cxx 
b/sw/source/ui/dbui/mmoutputtypepage.cxx
index 9c849c0..57abcde 100644
--- a/sw/source/ui/dbui/mmoutputtypepage.cxx
+++ b/sw/source/ui/dbui/mmoutputtypepage.cxx
@@ -86,13 +86,13 @@ struct SwSendMailDialog_Impl
 ::rtl::Reference IMailDispatcherListener  xMailListener;
 uno::Reference mail::XMailService xConnectedMailService;
 uno::Reference mail::XMailService xConnectedInMailService;
-Timer   aRemoveTimer;
+IdleaRemoveIdle;
 
 SwSendMailDialog_Impl() :
 nCurrentDescriptor(0),
 nDocumentCount(0)
  {
-aRemoveTimer.SetTimeout(500);
+aRemoveIdle.SetPriority(VCL_IDLE_PRIORITY_LOWEST);
  }
 
 ~SwSendMailDialog_Impl()
@@ -513,9 +513,9 @@ void  SwSendMailDialog::StateChanged( StateChangedType 
nStateChange )
 ModelessDialog::StateChanged( nStateChange );
 if(StateChangedType::VISIBLE == nStateChange  !IsVisible())
 {
-m_pImpl-aRemoveTimer.SetTimeoutHdl( STATIC_LINK( this, 
SwSendMailDialog,
+m_pImpl-aRemoveIdle.SetIdleHdl( STATIC_LINK( this, SwSendMailDialog,
 RemoveThis ) );
-m_pImpl-aRemoveTimer.Start();
+m_pImpl-aRemoveIdle.Start();
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/priorities' - framework/source vcl/opengl

2014-11-11 Thread Tobias Madl
 framework/source/uielement/toolbarmanager.cxx |4 ++--
 vcl/opengl/gdiimpl.cxx|3 ---
 2 files changed, 2 insertions(+), 5 deletions(-)

New commits:
commit ce423057fd995d7ba1d968db6de6f26cc3b6f374
Author: Tobias Madl tobias.madl@gmail.com
Date:   Tue Nov 11 15:38:40 2014 +

merge fixes

Change-Id: Ibca73c7099739790e1659a24841f168a2c06b71e

diff --git a/framework/source/uielement/toolbarmanager.cxx 
b/framework/source/uielement/toolbarmanager.cxx
index b1984b0..cbcc849 100644
--- a/framework/source/uielement/toolbarmanager.cxx
+++ b/framework/source/uielement/toolbarmanager.cxx
@@ -243,7 +243,7 @@ ToolBarManager::ToolBarManager( const Reference 
XComponentContext  rxContext,
 
 ToolBarManager::~ToolBarManager()
 {
-assert(!m_aAsyncUpdateControllersTimer.IsActive());
+assert(!m_aAsyncUpdateControllersIdle.IsActive());
 OSL_ASSERT( m_pToolBar == 0 );
 OSL_ASSERT( !m_bAddedToTaskPaneList );
 }
@@ -629,7 +629,7 @@ void SAL_CALL ToolBarManager::dispose() throw( 
RuntimeException, std::exception
 
 // stop timer to prevent timer events after dispose
 // do it last because other calls could restart timer in StateChanged()
-m_aAsyncUpdateControllersTimer.Stop();
+m_aAsyncUpdateControllersIdle.Stop();
 
 m_bDisposed = true;
 }
diff --git a/vcl/opengl/gdiimpl.cxx b/vcl/opengl/gdiimpl.cxx
index 0cd4fc9..e00c9c0 100644
--- a/vcl/opengl/gdiimpl.cxx
+++ b/vcl/opengl/gdiimpl.cxx
@@ -53,9 +53,6 @@
 
 OpenGLSalGraphicsImpl::OpenGLSalGraphicsImpl()
 : mpFrame(NULL)
-, mbOffscreen(false)
-, mnFramebufferId(0)
-, mpOffscreenTex(NULL)
 , mnLineColor(SALCOLOR_NONE)
 , mnFillColor(SALCOLOR_NONE)
 , mnSolidProgram(0)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/priorities' - 2 commits - sc/source sd/source

2014-11-10 Thread Tobias Madl
 sc/source/ui/inc/navipi.hxx   |2 
 sc/source/ui/navipi/navipi.cxx|  121 --
 sd/source/ui/framework/configuration/ConfigurationUpdater.cxx |   19 -
 sd/source/ui/framework/configuration/ConfigurationUpdater.hxx |2 
 4 files changed, 68 insertions(+), 76 deletions(-)

New commits:
commit 675e8e2727794dcddc92e13865ccfa9403e81922
Author: Tobias Madl tobias.madl@gmail.com
Date:   Mon Nov 10 12:19:19 2014 +

changed timer to idle

Change-Id: I46c2ebfae3a62d65ada50410187712ccf4c9c91e

diff --git a/sd/source/ui/framework/configuration/ConfigurationUpdater.cxx 
b/sd/source/ui/framework/configuration/ConfigurationUpdater.cxx
index 10ea920..2972f93 100644
--- a/sd/source/ui/framework/configuration/ConfigurationUpdater.cxx
+++ b/sd/source/ui/framework/configuration/ConfigurationUpdater.cxx
@@ -36,9 +36,6 @@ using ::sd::framework::FrameworkHelper;
 using ::std::vector;
 
 namespace {
-static const sal_Int32 snShortTimeout (100);
-static const sal_Int32 snNormalTimeout (1000);
-static const sal_Int32 snLongTimeout (1);
 static const sal_Int32 snShortTimeoutCountThreshold (1);
 static const sal_Int32 snNormalTimeoutCountThreshold (5);
 }
@@ -70,21 +67,21 @@ ConfigurationUpdater::ConfigurationUpdater (
   mbUpdatePending(false),
   mbUpdateBeingProcessed(false),
   mnLockCount(0),
-  maUpdateTimer(),
+  maUpdateIdle(),
   mnFailedUpdateCount(0),
   mpResourceManager(rpResourceManager)
 {
 // Prepare the timer that is started when after an update the current
 // and the requested configuration differ.  With the timer we try
 // updates until the two configurations are the same.
-maUpdateTimer.SetTimeout(snNormalTimeout);
-
maUpdateTimer.SetTimeoutHdl(LINK(this,ConfigurationUpdater,TimeoutHandler));
+maUpdateIdle.SetPriority(VCL_IDLE_PRIORITY_LOWEST);
+maUpdateIdle.SetIdleHdl(LINK(this,ConfigurationUpdater,TimeoutHandler));
 SetControllerManager(rxControllerManager);
 }
 
 ConfigurationUpdater::~ConfigurationUpdater (void)
 {
-maUpdateTimer.Stop();
+maUpdateIdle.Stop();
 }
 
 void ConfigurationUpdater::SetControllerManager(
@@ -218,13 +215,11 @@ void ConfigurationUpdater::CheckUpdateSuccess (void)
 if ( ! AreConfigurationsEquivalent(mxCurrentConfiguration, 
mxRequestedConfiguration))
 {
 if (mnFailedUpdateCount = snShortTimeoutCountThreshold)
-maUpdateTimer.SetTimeout(snShortTimeout);
-else if (mnFailedUpdateCount  snNormalTimeoutCountThreshold)
-maUpdateTimer.SetTimeout(snNormalTimeout);
+maUpdateIdle.SetPriority(VCL_IDLE_PRIORITY_LOW);
 else
-maUpdateTimer.SetTimeout(snLongTimeout);
+maUpdateIdle.SetPriority(VCL_IDLE_PRIORITY_LOWEST);
 ++mnFailedUpdateCount;
-maUpdateTimer.Start();
+maUpdateIdle.Start();
 }
 else
 {
diff --git a/sd/source/ui/framework/configuration/ConfigurationUpdater.hxx 
b/sd/source/ui/framework/configuration/ConfigurationUpdater.hxx
index feb6ad6..382fac6 100644
--- a/sd/source/ui/framework/configuration/ConfigurationUpdater.hxx
+++ b/sd/source/ui/framework/configuration/ConfigurationUpdater.hxx
@@ -131,7 +131,7 @@ private:
 This is used to overcome problems with resources that become
 available asynchronously.
 */
-Timer maUpdateTimer;
+Idle maUpdateIdle;
 
 /** The number of failed updates (those after which the current
 configuration is not equivalent to the requested configuration) is
commit 8ecc879345a9a6cac980d8c69f28b47b1046ae42
Author: Tobias Madl tobias.madl@gmail.com
Date:   Mon Nov 10 12:17:55 2014 +

changed timer to idle, and translated de to en

Change-Id: Ie7789b17a6055e30f67b3a523fd38d221aa8e9ed

diff --git a/sc/source/ui/inc/navipi.hxx b/sc/source/ui/inc/navipi.hxx
index cb31d36..29da9a6 100644
--- a/sc/source/ui/inc/navipi.hxx
+++ b/sc/source/ui/inc/navipi.hxx
@@ -228,7 +228,7 @@ private:
 ScScenarioWindowaWndScenarios;
 ScDocListBoxaLbDocuments;
 
-Timer   aContentTimer;
+IdleaContentIdle;
 
 OUStringaTitleBase;
 OUStringaStrDragMode;
diff --git a/sc/source/ui/navipi/navipi.cxx b/sc/source/ui/navipi/navipi.cxx
index efd1e80..276bdac 100644
--- a/sc/source/ui/navipi/navipi.cxx
+++ b/sc/source/ui/navipi/navipi.cxx
@@ -49,10 +49,7 @@
 
 #include algorithm
 
-//  Timeout, um Notizen zu suchen
-#define SC_CONTENT_TIMEOUT  1000
-
-//  Toleranz, wieviel ueber der eingeklappten Groesse noch klein ist
+//  toleance, how much spac above the folded size is still small
 #define SCNAV_MINTOL5
 
 //  maximum values for UI
@@ -103,9 +100,9 @@ bool ColumnEdit::Notify( NotifyEvent rNEvt )
 
 if ( !aCode.IsMod1()  !aCode.IsMod2() )
 {
-//! Eingabeueberpruefung (nur Zahlen oder nur Buchstaben, max 2 
bzw 3 Stellen)
-//! war vor

[Libreoffice-commits] core.git: Branch 'feature/priorities' - cui/source

2014-11-10 Thread Tobias Madl
 cui/source/dialogs/linkdlg.cxx |4 ++--
 cui/source/inc/linkdlg.hxx |4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 39e1a64e14098cf04ce03c9d1c47af159c138d69
Author: Tobias Madl tobias.madl@gmail.com
Date:   Mon Nov 10 14:37:14 2014 +

changed timer to idle

Change-Id: I713976070359e1f5628e7b34f7fd8f6f26b2372e

diff --git a/cui/source/dialogs/linkdlg.cxx b/cui/source/dialogs/linkdlg.cxx
index a6909d6..5f515db 100644
--- a/cui/source/dialogs/linkdlg.cxx
+++ b/cui/source/dialogs/linkdlg.cxx
@@ -123,8 +123,8 @@ SvBaseLinksDlg::SvBaseLinksDlg( vcl::Window * pParent, 
LinkManager* pMgr, bool b
 m_pTbLinks-Resize();  // OS: hack for correct selection
 
 // UpdateTimer for DDE-/Grf-links, which are waited for
-aUpdateTimer.SetTimeoutHdl( LINK( this, SvBaseLinksDlg, UpdateWaitingHdl ) 
);
-aUpdateTimer.SetTimeout( 1000 );
+aUpdateIdle.SetIdleHdl( LINK( this, SvBaseLinksDlg, UpdateWaitingHdl ) );
+aUpdateIdle.SetPriority( VCL_IDLE_PRIORITY_LOWEST );
 
 m_pPbOpenSource-Hide();
 
diff --git a/cui/source/inc/linkdlg.hxx b/cui/source/inc/linkdlg.hxx
index d5440bd..64e9b87 100644
--- a/cui/source/inc/linkdlg.hxx
+++ b/cui/source/inc/linkdlg.hxx
@@ -61,7 +61,7 @@ class SvBaseLinksDlg : public ModalDialog
 OUString aStrWaitinglink;
 sfx2::LinkManager*  pLinkMgr;
 boolbHtmlMode;
-Timer aUpdateTimer;
+Idle aUpdateIdle;
 
 DECL_LINK( LinksSelectHdl, SvTabListBox * );
 DECL_LINK( LinksDoubleClickHdl, SvTabListBox * );
@@ -78,7 +78,7 @@ class SvBaseLinksDlg : public ModalDialog
 void SetType( sfx2::SvBaseLink rLink, sal_uLong nPos, sal_uInt16 nType );
 void InsertEntry( const sfx2::SvBaseLink rLink, sal_uLong nPos = 
TREELIST_APPEND, bool bSelect = false);
 
-void StartUpdateTimer() { aUpdateTimer.Start(); }
+void StartUpdateTimer() { aUpdateIdle.Start(); }
 
 OUString   Autolink()  { return aStrAutolink; }
 OUString   Manuallink(){ return aStrManuallink; }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/priorities' - svtools/source

2014-11-10 Thread Tobias Madl
 svtools/source/contnr/imivctl.hxx  |6 +++---
 svtools/source/contnr/imivctl1.cxx |4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 18623657715039ccbadfb4a0be9ad35a34a3784c
Author: Tobias Madl tobias.madl@gmail.com
Date:   Mon Nov 10 16:19:19 2014 +

Changed timer to idle

Change-Id: Id1de5f1ee73fbef9ddebd6642ab8c9b558be4d71

diff --git a/svtools/source/contnr/imivctl.hxx 
b/svtools/source/contnr/imivctl.hxx
index 24c3bdd..03a9d06 100644
--- a/svtools/source/contnr/imivctl.hxx
+++ b/svtools/source/contnr/imivctl.hxx
@@ -164,7 +164,7 @@ class SvxIconChoiceCtrl_Impl
 ScrollBarBoxaScrBarBox;
 Rectangle   aCurSelectionRect;
 std::vectorRectangle* aSelectedRectList;
-Timer   aEditTimer; // for editing in place
+IdleaEditIdle; // for editing in place
 Timer   aAutoArrangeTimer;
 Timer   aDocRectChangedTimer;
 Timer   aVisRectChangedTimer;
@@ -251,8 +251,8 @@ class SvxIconChoiceCtrl_Impl
 voidToggleSelection( SvxIconChoiceCtrlEntry* );
 voidDeselectAllBut( SvxIconChoiceCtrlEntry*, bool 
bPaintSync = false );
 voidCenter( SvxIconChoiceCtrlEntry* pEntry ) const;
-voidStopEditTimer() { aEditTimer.Stop(); }
-voidStartEditTimer() { aEditTimer.Start(); }
+voidStopEditTimer() { aEditIdle.Stop(); }
+voidStartEditTimer() { aEditIdle.Start(); }
 voidImpHideDDIcon();
 voidCallSelectHandler( SvxIconChoiceCtrlEntry* );
 voidSelectRect(
diff --git a/svtools/source/contnr/imivctl1.cxx 
b/svtools/source/contnr/imivctl1.cxx
index bee6011..9843c5b 100644
--- a/svtools/source/contnr/imivctl1.cxx
+++ b/svtools/source/contnr/imivctl1.cxx
@@ -135,8 +135,8 @@ SvxIconChoiceCtrl_Impl::SvxIconChoiceCtrl_Impl(
 nHorSBarHeight = aHorSBar.GetSizePixel().Height();
 nVerSBarWidth = aVerSBar.GetSizePixel().Width();
 
-aEditTimer.SetTimeout( 800 );
-aEditTimer.SetTimeoutHdl(LINK(this,SvxIconChoiceCtrl_Impl,EditTimeoutHdl));
+aEditIdle.SetPriority( VCL_IDLE_PRIORITY_LOWEST );
+aEditIdle.SetIdleHdl(LINK(this,SvxIconChoiceCtrl_Impl,EditTimeoutHdl));
 aAutoArrangeTimer.SetTimeout( 100 );
 
aAutoArrangeTimer.SetTimeoutHdl(LINK(this,SvxIconChoiceCtrl_Impl,AutoArrangeHdl));
 aCallSelectHdlTimer.SetTimeout( 500 );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/priorities' - sfx2/source

2014-11-09 Thread Tobias Madl
 sfx2/source/appl/newhelp.cxx |   14 +++---
 sfx2/source/appl/newhelp.hxx |2 +-
 2 files changed, 8 insertions(+), 8 deletions(-)

New commits:
commit 3a604d5da0c6811cf57ccdb048ec7748f05c02e3
Author: Tobias Madl tobias.madl@gmail.com
Date:   Mon Nov 10 07:55:35 2014 +

changed timer to idle

Change-Id: Ib04932fe0f9e742e47bdff83748ffc5eb5706d71

diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx
index d38356f..d9bb71d 100644
--- a/sfx2/source/appl/newhelp.cxx
+++ b/sfx2/source/appl/newhelp.cxx
@@ -1402,9 +1402,9 @@ 
SfxHelpIndexWindow_Impl::SfxHelpIndexWindow_Impl(SfxHelpWindow_Impl* _pParent)
 m_pActiveLB-SetSelectHdl( LINK( this, SfxHelpIndexWindow_Impl, SelectHdl 
) );
 nMinWidth = ( m_pActiveLB-GetSizePixel().Width() / 2 );
 
-aTimer.SetTimeoutHdl( LINK( this, SfxHelpIndexWindow_Impl, InitHdl ) );
-aTimer.SetTimeout( 200 );
-aTimer.Start();
+aIdle.SetIdleHdl( LINK( this, SfxHelpIndexWindow_Impl, InitHdl ) );
+aIdle.SetPriority( VCL_IDLE_PRIORITY_LOWER );
+aIdle.Start();
 
 Show();
 }
@@ -1458,7 +1458,7 @@ void SfxHelpIndexWindow_Impl::SetActiveFactory()
 DBG_ASSERT( pIPage, index page not initialized );
 if ( !bIsInitDone  !m_pActiveLB-GetEntryCount() )
 {
-aTimer.Stop();
+aIdle.Stop();
 InitHdl( NULL );
 }
 
@@ -1518,7 +1518,7 @@ IMPL_LINK( SfxHelpIndexWindow_Impl, ActivatePageHdl, 
TabControl *, pTabCtrl )
 
 IMPL_LINK_NOARG(SfxHelpIndexWindow_Impl, SelectHdl)
 {
-aTimer.Start();
+aIdle.Start();
 
 return 0;
 }
@@ -1529,8 +1529,8 @@ IMPL_LINK_NOARG(SfxHelpIndexWindow_Impl, InitHdl)
 Initialize();
 
 // now use the timer for selection
-aTimer.SetTimeoutHdl( LINK( this, SfxHelpIndexWindow_Impl, 
SelectFactoryHdl ) );
-aTimer.SetTimeout( 1000 );
+aIdle.SetIdleHdl( LINK( this, SfxHelpIndexWindow_Impl, SelectFactoryHdl ) 
);
+aIdle.SetPriority( VCL_IDLE_PRIORITY_LOWEST );
 
 return 0;
 }
diff --git a/sfx2/source/appl/newhelp.hxx b/sfx2/source/appl/newhelp.hxx
index eb303e1..233a317 100644
--- a/sfx2/source/appl/newhelp.hxx
+++ b/sfx2/source/appl/newhelp.hxx
@@ -274,7 +274,7 @@ private:
 ListBox*m_pActiveLB;
 TabControl* m_pTabCtrl;
 
-Timer   aTimer;
+IdleaIdle;
 
 LinkaSelectFactoryLink;
 LinkaPageDoubleClickLink;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/priorities' - sfx2/source vcl/source

2014-11-07 Thread Tobias Madl
 sfx2/source/appl/newhelp.cxx |6 +++---
 sfx2/source/appl/newhelp.hxx |2 +-
 vcl/source/edit/textdat2.hxx |2 +-
 vcl/source/edit/textdata.cxx |5 +++--
 vcl/source/edit/texteng.cxx  |2 +-
 5 files changed, 9 insertions(+), 8 deletions(-)

New commits:
commit 2b468b1b6b3bde9ac931a19ee30b8783c893fc49
Author: Tobias Madl tobias.madl@gmail.com
Date:   Fri Nov 7 11:13:37 2014 +

change timers to idles

Change-Id: I224976e75b020d03e4b0d8beb79ad1c1310e8874

diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx
index 4ee115d..d38356f 100644
--- a/sfx2/source/appl/newhelp.cxx
+++ b/sfx2/source/appl/newhelp.cxx
@@ -1875,8 +1875,8 @@ SfxHelpTextWindow_Impl::SfxHelpTextWindow_Impl( 
SfxHelpWindow_Impl* pParent ) :
 InitOnStartupBox( false );
 aOnStartupCB.SetClickHdl( LINK( this, SfxHelpTextWindow_Impl, CheckHdl ) );
 
-aSelectTimer.SetTimeoutHdl( LINK( this, SfxHelpTextWindow_Impl, SelectHdl 
) );
-aSelectTimer.SetTimeout( 1000 );
+aSelectIdle.SetIdleHdl( LINK( this, SfxHelpTextWindow_Impl, SelectHdl ) );
+aSelectIdle.SetPriority( VCL_IDLE_PRIORITY_LOWEST );
 
 char* pEnv = getenv( help_debug );
 if ( pEnv )
@@ -2497,7 +2497,7 @@ void SfxHelpTextWindow_Impl::SelectSearchText( const 
OUString rSearchText, bool
 {
 aSearchText = rSearchText;
 bIsFullWordSearch = _bIsFullWordSearch;
-aSelectTimer.Start();
+aSelectIdle.Start();
 }
 
 
diff --git a/sfx2/source/appl/newhelp.hxx b/sfx2/source/appl/newhelp.hxx
index a910fd0..eb303e1 100644
--- a/sfx2/source/appl/newhelp.hxx
+++ b/sfx2/source/appl/newhelp.hxx
@@ -405,7 +405,7 @@ class SfxHelpTextWindow_Impl : public vcl::Window
 private:
 ToolBox aToolBox;
 CheckBoxaOnStartupCB;
-Timer   aSelectTimer;
+IdleaSelectIdle;
 Image   aIndexOnImage;
 Image   aIndexOffImage;
 OUStringaIndexOnText;
diff --git a/vcl/source/edit/textdat2.hxx b/vcl/source/edit/textdat2.hxx
index b5e2118..820be5e 100644
--- a/vcl/source/edit/textdat2.hxx
+++ b/vcl/source/edit/textdat2.hxx
@@ -261,7 +261,7 @@ public:
 virtual voidDestroyAnchor() SAL_OVERRIDE;
 };
 
-class IdleFormatter : public Timer
+class IdleFormatter : public Idle
 {
 private:
 TextView*   mpView;
diff --git a/vcl/source/edit/textdata.cxx b/vcl/source/edit/textdata.cxx
index e6bebd2..dbdfbee 100644
--- a/vcl/source/edit/textdata.cxx
+++ b/vcl/source/edit/textdata.cxx
@@ -223,6 +223,7 @@ IdleFormatter::IdleFormatter()
 {
 mpView = 0;
 mnRestarts = 0;
+SetPriority(VCL_IDLE_PRIORITY_HIGH);
 }
 
 IdleFormatter::~IdleFormatter()
@@ -240,7 +241,7 @@ void IdleFormatter::DoIdleFormat( TextView* pV, sal_uInt16 
nMaxRestarts )
 if ( mnRestarts  nMaxRestarts )
 {
 mnRestarts = 0;
-((Link)GetTimeoutHdl()).Call( this );
+((Link)GetIdleHdl()).Call( this );
 }
 else
 {
@@ -254,7 +255,7 @@ void IdleFormatter::ForceTimeout()
 {
 Stop();
 mnRestarts = 0;
-((Link)GetTimeoutHdl()).Call( this );
+((Link)GetIdleHdl()).Call( this );
 }
 }
 
diff --git a/vcl/source/edit/texteng.cxx b/vcl/source/edit/texteng.cxx
index 5be733f..629c8a7 100644
--- a/vcl/source/edit/texteng.cxx
+++ b/vcl/source/edit/texteng.cxx
@@ -92,7 +92,7 @@ TextEngine::TextEngine()
 mpLocaleDataWrapper = NULL;
 
 mpIdleFormatter = new IdleFormatter;
-mpIdleFormatter-SetTimeoutHdl( LINK( this, TextEngine, IdleFormatHdl ) );
+mpIdleFormatter-SetIdleHdl( LINK( this, TextEngine, IdleFormatHdl ) );
 
 mpRefDev = new VirtualDevice;
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/priorities' - sw/inc sw/source

2014-11-06 Thread Tobias Madl
 sw/inc/doc.hxx|2 +-
 sw/source/core/doc/docnew.cxx |6 +++---
 sw/source/ui/envelp/labfmt.cxx|8 
 sw/source/ui/envelp/labfmt.hxx|2 +-
 sw/source/uibase/inc/navipi.hxx   |2 +-
 sw/source/uibase/utlui/navipi.cxx |   14 +++---
 6 files changed, 17 insertions(+), 17 deletions(-)

New commits:
commit 14d484e9ce7fd686cce8514649053cb9f770bda6
Author: Tobias Madl tobias.madl@gmail.com
Date:   Thu Nov 6 13:59:53 2014 +

changed some timer to idle

Change-Id: Ibd3a4f66cec6fde4fadc064f27ac44901d005b15

diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx
index 3bbf546..6455b74 100644
--- a/sw/inc/doc.hxx
+++ b/sw/inc/doc.hxx
@@ -264,7 +264,7 @@ class SW_DLLPUBLIC SwDoc :
 /* @@@MAINTAINABILITY-HORROR@@@
Timer should not be members of the model
 */
-Timer   maOLEModifiedTimer;  // Timer for update modified 
OLE-Objecs
+Idle   maOLEModifiedIdle;  // Timer for update modified OLE-Objecs
 SwDBDatamaDBData;// database descriptor
 OUStringmsTOIAutoMarkURL;// URL of table of index AutoMark 
file
 boost::ptr_vector boost::nullableOUString  maPatternNms;  // 
Array for names of document-templates
diff --git a/sw/source/core/doc/docnew.cxx b/sw/source/core/doc/docnew.cxx
index 227dcc7..c3e95c2 100644
--- a/sw/source/core/doc/docnew.cxx
+++ b/sw/source/core/doc/docnew.cxx
@@ -338,8 +338,8 @@ SwDoc::SwDoc()
 new SwTxtNode( SwNodeIndex( GetNodes().GetEndOfContent() ),
 getIDocumentStylePoolAccess().GetTxtCollFromPool( 
RES_POOLCOLL_STANDARD ));
 
-maOLEModifiedTimer.SetTimeout( 1000 );
-maOLEModifiedTimer.SetTimeoutHdl( LINK( this, SwDoc, DoUpdateModifiedOLE 
));
+maOLEModifiedIdle.SetPriority( VCL_IDLE_PRIORITY_LOWEST );
+maOLEModifiedIdle.SetIdleHdl( LINK( this, SwDoc, DoUpdateModifiedOLE ));
 
 #if HAVE_FEATURE_DBCONNECTIVITY
 // Create DBManager
@@ -782,7 +782,7 @@ void SwDoc::SetPreviewPrtData( const SwPagePreviewPrtData* 
pNew )
 
 void SwDoc::SetOLEObjModified()
 {
-if( getIDocumentLayoutAccess().GetCurrentViewShell() ) 
maOLEModifiedTimer.Start();
+if( getIDocumentLayoutAccess().GetCurrentViewShell() ) 
maOLEModifiedIdle.Start();
 }
 
 /** SwDoc: Reading and writing of the layout cache. */
diff --git a/sw/source/ui/envelp/labfmt.cxx b/sw/source/ui/envelp/labfmt.cxx
index dbc8d70..250d2ee 100644
--- a/sw/source/ui/envelp/labfmt.cxx
+++ b/sw/source/ui/envelp/labfmt.cxx
@@ -347,8 +347,8 @@ SwLabFmtPage::SwLabFmtPage(vcl::Window* pParent, const 
SfxItemSet rSet)
 
 m_pSavePB-SetClickHdl( LINK (this, SwLabFmtPage, SaveHdl));
 // Set timer
-aPreviewTimer.SetTimeout(1000);
-aPreviewTimer.SetTimeoutHdl(LINK(this, SwLabFmtPage, PreviewHdl));
+aPreviewIdle.SetPriority(VCL_IDLE_PRIORITY_LOWEST);
+aPreviewIdle.SetIdleHdl(LINK(this, SwLabFmtPage, PreviewHdl));
 }
 
 SwLabFmtPage::~SwLabFmtPage()
@@ -359,7 +359,7 @@ SwLabFmtPage::~SwLabFmtPage()
 IMPL_LINK_NOARG_INLINE_START(SwLabFmtPage, ModifyHdl)
 {
 bModified = true;
-aPreviewTimer.Start();
+aPreviewIdle.Start();
 return 0;
 }
 IMPL_LINK_NOARG_INLINE_END(SwLabFmtPage, ModifyHdl)
@@ -367,7 +367,7 @@ IMPL_LINK_NOARG_INLINE_END(SwLabFmtPage, ModifyHdl)
 // Invalidate preview
 IMPL_LINK_NOARG_INLINE_START(SwLabFmtPage, PreviewHdl)
 {
-aPreviewTimer.Stop();
+aPreviewIdle.Stop();
 ChangeMinMax();
 FillItem( aItem );
 m_pPreview-UpdateItem( aItem );
diff --git a/sw/source/ui/envelp/labfmt.hxx b/sw/source/ui/envelp/labfmt.hxx
index b4b7606..215644f 100644
--- a/sw/source/ui/envelp/labfmt.hxx
+++ b/sw/source/ui/envelp/labfmt.hxx
@@ -83,7 +83,7 @@ class SwLabFmtPage : public SfxTabPage
 MetricField*  m_pPHeightField;
 PushButton*   m_pSavePB;
 
-Timer aPreviewTimer;
+Idle aPreviewIdle;
 bool  bModified;
 
 SwLabItemaItem;
diff --git a/sw/source/uibase/inc/navipi.hxx b/sw/source/uibase/inc/navipi.hxx
index ff36a62..386213b 100644
--- a/sw/source/uibase/inc/navipi.hxx
+++ b/sw/source/uibase/inc/navipi.hxx
@@ -60,7 +60,7 @@ class SwNavigationPI : public vcl::Window,
 SwContentTree   aContentTree;
 SwGlobalTreeaGlobalTree;
 ListBox aDocListBox;
-Timer   aPageChgTimer;
+IdleaPageChgIdle;
 OUStringsContentFileName;
 OUStringaContextArr[3];
 OUStringaStatusArr[4];
diff --git a/sw/source/uibase/utlui/navipi.cxx 
b/sw/source/uibase/utlui/navipi.cxx
index 0df9924..79110f7 100644
--- a/sw/source/uibase/utlui/navipi.cxx
+++ b/sw/source/uibase/utlui/navipi.cxx
@@ -466,8 +466,8 @@ IMPL_LINK( SwNavigationPI, EditAction, NumEditAction *, 
pEdit )
 SwView *pView = GetCreateView();
 if (pView)
 {
-if(aPageChgTimer.IsActive())
-aPageChgTimer.Stop();
+if(aPageChgIdle.IsActive())
+aPageChgIdle.Stop();
 pCreateView-GetWrtShell

[Libreoffice-commits] core.git: Branch 'feature/priorities' - sw/source

2014-11-05 Thread Tobias Madl
 sw/source/core/docnode/threadmanager.cxx |   12 ++--
 sw/source/core/inc/threadmanager.hxx |2 +-
 2 files changed, 7 insertions(+), 7 deletions(-)

New commits:
commit a2091de039aefcd2ce6b94bd506e755c6c4f5c11
Author: Tobias Madl tobias.madl@gmail.com
Date:   Wed Nov 5 09:40:57 2014 +

changed timers to idles

Change-Id: Ia9f6afb29a387c0af7d898fb69f5a3b415add7b0

diff --git a/sw/source/core/docnode/threadmanager.cxx 
b/sw/source/core/docnode/threadmanager.cxx
index 2f43f77..c8353c8 100644
--- a/sw/source/core/docnode/threadmanager.cxx
+++ b/sw/source/core/docnode/threadmanager.cxx
@@ -35,7 +35,7 @@ ThreadManager::ThreadManager( uno::Reference 
util::XJobManager  rThreadJoiner
   mnThreadIDCounter( 0 ),
   maWaitingForStartThreads(),
   maStartedThreads(),
-  maStartNewThreadTimer(),
+  maStartNewThreadIdle(),
   mbStartingOfThreadsSuspended( false )
 {
 }
@@ -44,8 +44,8 @@ void ThreadManager::Init()
 {
 mpThreadListener.reset( new ThreadListener( *this ) );
 
-maStartNewThreadTimer.SetTimeout( 2000 );
-maStartNewThreadTimer.SetTimeoutHdl( LINK( this, ThreadManager, 
TryToStartNewThread ) );
+maStartNewThreadIdle.SetPriority( VCL_IDLE_PRIORITY_LOWEST );
+maStartNewThreadIdle.SetIdleHdl( LINK( this, ThreadManager, 
TryToStartNewThread ) );
 }
 
 ThreadManager::~ThreadManager()
@@ -96,7 +96,7 @@ oslInterlockedCount ThreadManager::AddThread(
 // setup Timer to start thread from waiting ones
 if ( maStartedThreads.empty()  !maWaitingForStartThreads.empty() 
)
 {
-maStartNewThreadTimer.Start();
+maStartNewThreadIdle.Start();
 }
 }
 }
@@ -214,7 +214,7 @@ IMPL_LINK_NOARG(ThreadManager, TryToStartNewThread)
 // setup Timer to start thread from waiting ones
 if ( maStartedThreads.empty()  !maWaitingForStartThreads.empty() 
)
 {
-maStartNewThreadTimer.Start();
+maStartNewThreadIdle.Start();
 }
 }
 }
@@ -238,7 +238,7 @@ void ThreadManager::ResumeStartingOfThreads()
 // setup Timer to start thread from waiting ones
 if ( maStartedThreads.empty()  !maWaitingForStartThreads.empty() 
)
 {
-maStartNewThreadTimer.Start();
+maStartNewThreadIdle.Start();
 break;
 }
 }
diff --git a/sw/source/core/inc/threadmanager.hxx 
b/sw/source/core/inc/threadmanager.hxx
index c78cb78..54cb08b 100644
--- a/sw/source/core/inc/threadmanager.hxx
+++ b/sw/source/core/inc/threadmanager.hxx
@@ -123,7 +123,7 @@ class ThreadManager : public IThreadListenerOwner
 std::deque tThreadData  maWaitingForStartThreads;
 std::deque tThreadData  maStartedThreads;
 
-Timer maStartNewThreadTimer;
+Idle maStartNewThreadIdle;
 
 bool mbStartingOfThreadsSuspended;
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/priorities' - include/svtools svtools/source

2014-11-04 Thread Tobias Madl
 include/svtools/filechangedchecker.hxx |2 +-
 svtools/source/graphic/grfcache.cxx|7 +++
 svtools/source/graphic/grfcache.hxx|2 +-
 svtools/source/misc/filechangedchecker.cxx |   18 +-
 4 files changed, 14 insertions(+), 15 deletions(-)

New commits:
commit 930a2c4cc5a5895d44a01e1da5467c0387af69af
Author: Tobias Madl tobias.madl@gmail.com
Date:   Tue Nov 4 11:51:18 2014 +

Changed Idle Timers. into Idle

Change-Id: I44e33e9e04893237578eb685516fa5ffe43e397f

diff --git a/include/svtools/filechangedchecker.hxx 
b/include/svtools/filechangedchecker.hxx
index acff32d..cea8d16 100644
--- a/include/svtools/filechangedchecker.hxx
+++ b/include/svtools/filechangedchecker.hxx
@@ -23,7 +23,7 @@
 class SVT_DLLPUBLIC FileChangedChecker
 {
 private :
-TimermTimer;
+IdlemIdle;
 OUStringmFileName;
 TimeValuemLastModTime;
 ::boost::function0void mpCallback;
diff --git a/svtools/source/graphic/grfcache.cxx 
b/svtools/source/graphic/grfcache.cxx
index ca4347e..243eeb9 100644
--- a/svtools/source/graphic/grfcache.cxx
+++ b/svtools/source/graphic/grfcache.cxx
@@ -32,7 +32,6 @@
 #include rtl/crc.h
 #include boost/scoped_ptr.hpp
 
-#define RELEASE_TIMEOUT 1
 #define MAX_BMP_EXTENT  4096
 
 static const char aHexData[] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', 
'9', 'A', 'B', 'C', 'D', 'E', 'F' };
@@ -828,9 +827,9 @@ GraphicCache::GraphicCache( sal_uLong nDisplayCacheSize, 
sal_uLong nMaxObjDispla
 mnMaxObjDisplaySize ( nMaxObjDisplayCacheSize ),
 mnUsedDisplaySize   ( 0UL )
 {
-maReleaseTimer.SetTimeoutHdl( LINK( this, GraphicCache, ReleaseTimeoutHdl 
) );
-maReleaseTimer.SetTimeout( RELEASE_TIMEOUT );
-maReleaseTimer.Start();
+maReleaseIdle.SetIdleHdl( LINK( this, GraphicCache, ReleaseTimeoutHdl ) );
+maReleaseIdle.SetPriority( VCL_IDLE_PRIORITY_LOWEST );
+maReleaseIdle.Start();
 }
 
 GraphicCache::~GraphicCache()
diff --git a/svtools/source/graphic/grfcache.hxx 
b/svtools/source/graphic/grfcache.hxx
index ddb6f6b..e8259e7 100644
--- a/svtools/source/graphic/grfcache.hxx
+++ b/svtools/source/graphic/grfcache.hxx
@@ -39,7 +39,7 @@ private:
 typedef std::list GraphicCacheEntry*  GraphicCacheEntryList;
 typedef std::list GraphicDisplayCacheEntry*  
GraphicDisplayCacheEntryList;
 
-Timer   maReleaseTimer;
+IdlemaReleaseIdle;
 GraphicCacheEntryList   maGraphicCache;
 GraphicDisplayCacheEntryList maDisplayCache;
 sal_uLong   mnReleaseTimeoutSeconds;
diff --git a/svtools/source/misc/filechangedchecker.cxx 
b/svtools/source/misc/filechangedchecker.cxx
index 9d8a713..33d5008 100644
--- a/svtools/source/misc/filechangedchecker.cxx
+++ b/svtools/source/misc/filechangedchecker.cxx
@@ -12,7 +12,7 @@
 #include svtools/filechangedchecker.hxx
 
 FileChangedChecker::FileChangedChecker(const OUString rFilename, const 
::boost::function0void rCallback) :
-mTimer(),
+mIdle(),
 mFileName(rFilename),
 mLastModTime(),
 mpCallback(rCallback)
@@ -20,8 +20,8 @@ FileChangedChecker::FileChangedChecker(const OUString 
rFilename, const ::boost:
 // Get the curren last file modified Status
 getCurrentModTime(mLastModTime);
 
-// associate the callback function for the timer
-mTimer.SetTimeoutHdl(LINK(this, FileChangedChecker, TimerHandler));
+// associate the callback function for the Idle
+mIdle.SetIdleHdl(LINK(this, FileChangedChecker, TimerHandler));
 
 //start the timer
 resetTimer();
@@ -29,12 +29,12 @@ FileChangedChecker::FileChangedChecker(const OUString 
rFilename, const ::boost:
 
 void FileChangedChecker::resetTimer()
 {
-//Start the timer if its not active
-if(!mTimer.IsActive())
-mTimer.Start();
+//Start the Idle if its not active
+if(!mIdle.IsActive())
+mIdle.Start();
 
-// Set a timeout of 3 seconds
-mTimer.SetTimeout(3000);
+// Set lowest Priority
+mIdle.SetPriority(VCL_IDLE_PRIORITY_LOWEST);
 }
 
 bool FileChangedChecker::getCurrentModTime(TimeValue o_rValue) const
@@ -85,7 +85,7 @@ IMPL_LINK_NOARG(FileChangedChecker, TimerHandler)
 mpCallback();
 }
 
-// Reset the timer in any case
+// Reset the Idle in any case
 resetTimer();
 return 0;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/priorities' - include/vcl vcl/inc vcl/source

2014-10-31 Thread Tobias Madl
 include/vcl/timer.hxx |5 +++--
 vcl/inc/window.h  |2 +-
 vcl/source/app/timer.cxx  |   14 +-
 vcl/source/window/paint.cxx   |   16 
 vcl/source/window/window.cxx  |8 
 vcl/source/window/winproc.cxx |2 +-
 6 files changed, 30 insertions(+), 17 deletions(-)

New commits:
commit 74afbb7aa871c846f23c85cb1e1620b3b3590ab1
Author: Tobias Madl tobias.madl@gmail.com
Date:   Fri Oct 31 10:25:49 2014 +

Michael's patch implemented

Change-Id: I3f0802d5001172fc7b8409274bc5a3632e5dad34

diff --git a/include/vcl/timer.hxx b/include/vcl/timer.hxx
index 5c3a49a..10dd3fc 100644
--- a/include/vcl/timer.hxx
+++ b/include/vcl/timer.hxx
@@ -87,9 +87,10 @@ enum IdlePriority {
 
 // To port from Timer - Idle switch class name,
 // s/Timeout/DoIdle/ etc. and select priority
-class VCL_DLLPUBLIC Idle : private Timer
+class VCL_DLLPUBLIC Idle : public Timer
 {
  public:
+Idle();
 Idle( IdlePriority ePriority );
 virtual ~Idle();
 
@@ -103,7 +104,7 @@ class VCL_DLLPUBLIC Idle : private Timer
 voidStart() { Timer::Start(); }
 voidStop()  { Timer::Stop();  }
 
-virtual voidDoIdle() = 0;
+virtual voidDoIdle();
 
 virtual voidTimeout() SAL_OVERRIDE { DoIdle(); }
 };
diff --git a/vcl/inc/window.h b/vcl/inc/window.h
index 60a4489..2b2082e 100644
--- a/vcl/inc/window.h
+++ b/vcl/inc/window.h
@@ -128,7 +128,7 @@ struct ImplOverlapData
 struct ImplFrameData
 {
 IdlemaPaintIdle;// paint idle handler
-IdlemaResizeTimer;  // resize timer
+IdlemaResizeIdle;  // resize timer
 InputContextmaOldInputContext;  // last set Input Context
 vcl::Window*mpNextFrame;// next frame window
 vcl::Window*mpFirstOverlap; // first overlap vcl::Window
diff --git a/vcl/source/app/timer.cxx b/vcl/source/app/timer.cxx
index e38c347..5f706ab 100644
--- a/vcl/source/app/timer.cxx
+++ b/vcl/source/app/timer.cxx
@@ -336,6 +336,12 @@ AutoTimer AutoTimer::operator=( const AutoTimer rTimer )
 return *this;
 }
 
+Idle::Idle()
+: Timer()
+{
+SetPriority(VCL_IDLE_PRIORITY_LOWEST);
+}
+
 Idle::Idle( IdlePriority ePriority )
 : Timer()
 {
@@ -344,7 +350,7 @@ Idle::Idle( IdlePriority ePriority )
 
 void Idle::SetPriority( IdlePriority ePriority )
 {
-sal_ulong nTimeoutMS = 0;
+sal_uLong nTimeoutMS = 0;
 
 // Ultimately this will just be a sort key in a work queue.
 switch (ePriority) {
@@ -377,6 +383,12 @@ void Idle::SetPriority( IdlePriority ePriority )
 SetTimeout( nTimeoutMS );
 }
 
+void Idle::DoIdle()
+{
+maTimeoutHdl.Call( this );
+}
+
+
 Idle::~Idle()
 {
 }
diff --git a/vcl/source/window/paint.cxx b/vcl/source/window/paint.cxx
index ce10aba..7ec329c 100644
--- a/vcl/source/window/paint.cxx
+++ b/vcl/source/window/paint.cxx
@@ -283,8 +283,8 @@ void Window::ImplCallOverlapPaint()
 
 void Window::ImplPostPaint()
 {
-if ( !ImplDoTiledRendering()  
!mpWindowImpl-mpFrameData-maPaintTimer.IsActive() )
-mpWindowImpl-mpFrameData-maPaintTimer.Start();
+if ( !ImplDoTiledRendering()  
!mpWindowImpl-mpFrameData-maPaintIdle.IsActive() )
+mpWindowImpl-mpFrameData-maPaintIdle.Start();
 }
 
 IMPL_LINK_NOARG(Window, ImplHandlePaintHdl)
@@ -292,14 +292,14 @@ IMPL_LINK_NOARG(Window, ImplHandlePaintHdl)
 // save paint events until layout is done
 if (!ImplDoTiledRendering()  IsSystemWindow()  static_castconst 
SystemWindow*(this)-hasPendingLayout())
 {
-mpWindowImpl-mpFrameData-maPaintTimer.Start();
+mpWindowImpl-mpFrameData-maPaintIdle.Start();
 return 0;
 }
 
 // save paint events until resizing is done
 if( !ImplDoTiledRendering() 
-mpWindowImpl-mbFrame  
mpWindowImpl-mpFrameData-maResizeTimer.IsActive() )
-mpWindowImpl-mpFrameData-maPaintTimer.Start();
+mpWindowImpl-mbFrame  
mpWindowImpl-mpFrameData-maResizeIdle.IsActive() )
+mpWindowImpl-mpFrameData-maPaintIdle.Start();
 else if ( mpWindowImpl-mbReallyVisible )
 ImplCallOverlapPaint();
 return 0;
@@ -314,10 +314,10 @@ IMPL_LINK_NOARG(Window, ImplHandleResizeTimerHdl)
 {
 ImplHandlePaintHdl(NULL);
 }
-else if( mpWindowImpl-mpFrameData-maPaintTimer.IsActive() )
+else if( mpWindowImpl-mpFrameData-maPaintIdle.IsActive() )
 {
-mpWindowImpl-mpFrameData-maPaintTimer.Stop();
-mpWindowImpl-mpFrameData-maPaintTimer.GetTimeoutHdl().Call( NULL 
);
+mpWindowImpl-mpFrameData-maPaintIdle.Stop();
+mpWindowImpl-mpFrameData-maPaintIdle.GetIdleHdl().Call( NULL );
 }
 }
 
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index a1ac1a1..b446884 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -1030,7 +1030,7 @@ void Window

[Libreoffice-commits] core.git: Branch 'feature/priorities' - 3 commits - include/vcl vcl/inc vcl/source

2014-10-29 Thread Tobias Madl
 include/vcl/timer.hxx|   18 ++
 vcl/inc/svdata.hxx   |1 
 vcl/source/app/timer.cxx |  122 +++
 3 files changed, 121 insertions(+), 20 deletions(-)

New commits:
commit aede500f3d565299c70670694494570b36f36d6c
Author: Tobias Madl tobias.madl@gmail.com
Date:   Wed Oct 29 07:20:41 2014 +

Added starvation protection and Prio scheduling

Change-Id: I23f09ac5ce56179af3ac9dcd79ec4104b09297ba

diff --git a/include/vcl/timer.hxx b/include/vcl/timer.hxx
index 7a952db..1fec77d 100644
--- a/include/vcl/timer.hxx
+++ b/include/vcl/timer.hxx
@@ -28,14 +28,14 @@ struct ImplTimerData;
 struct ImplSVData;
 
 enum IdlePriority : sal_Int32 {
-VCL_IDLE_PRIORITY_HIGHEST = -40, //   - 0ms
-VCL_IDLE_PRIORITY_HIGH = -30, //  - 1ms
-VCL_IDLE_PRIORITY_REPAINT = -20, //- 30ms
-VCL_IDLE_PRIORITY_RESIZE = -10,  //- 50ms
+VCL_IDLE_PRIORITY_HIGHEST = -400, //   - 0ms
+VCL_IDLE_PRIORITY_HIGH = -300, //  - 1ms
+VCL_IDLE_PRIORITY_REPAINT = -200, //- 30ms
+VCL_IDLE_PRIORITY_RESIZE = -100,  //- 50ms
 VCL_IDLE_PRIORITY_MEDIUM = 0, // - 50ms
-VCL_IDLE_PRIORITY_LOW = 10, //- 100ms
-VCL_IDLE_PRIORITY_LOWER = 20, //  - 200ms
-VCL_IDLE_PRIORITY_LOWEST = 30 // - 400ms
+VCL_IDLE_PRIORITY_LOW = 100, //- 100ms
+VCL_IDLE_PRIORITY_LOWER = 200, //  - 200ms
+VCL_IDLE_PRIORITY_LOWEST = 300 // - 400ms
 };
 
 /// Base-class for timers - usually a simple, one-shot timeout
diff --git a/vcl/inc/svdata.hxx b/vcl/inc/svdata.hxx
index c1d9eed..dc74595 100644
--- a/vcl/inc/svdata.hxx
+++ b/vcl/inc/svdata.hxx
@@ -308,6 +308,7 @@ struct ImplSVData
 sal_uLong   mnThreadCount;  // is VCL MultiThread 
enabled
 ImplConfigData* mpFirstConfigData;  // Zeiger auf ersten 
Config-Block
 ImplTimerData*  mpFirstTimerData;   // list of all running timers
+ImplTimerData*  mpWaitingTimerData; // sorted (prio) list of ready 
timers
 SalTimer*   mpSalTimer; // interface to sal event 
loop/timers
 SalI18NImeStatus*   mpImeStatus;// interface to ime status 
window
 SalSystem*  mpSalSystem;// SalSystem interface
diff --git a/vcl/source/app/timer.cxx b/vcl/source/app/timer.cxx
index 8c635a2..c039de1 100644
--- a/vcl/source/app/timer.cxx
+++ b/vcl/source/app/timer.cxx
@@ -93,6 +93,7 @@ void Timer::ImplTimerCallbackProc()
 ImplTimerData*  pTimerData;
 ImplTimerData*  pPrioFirstTimerData;
 ImplTimerData*  pPrevTimerData;
+sal_Int32   nPrevPrio;
 sal_uLong   nMinPeriod = MAX_TIMER_PERIOD;
 sal_uLong   nDeltaTime;
 sal_uLong   nTime = tools::Time::GetSystemTicks();
@@ -105,7 +106,11 @@ void Timer::ImplTimerCallbackProc()
 
 // find timer where the timer handler needs to be called
 pTimerData = pSVData-mpFirstTimerData;
-pPrioFirstTimerData = pTimerData;
+if(!pSVData-mpWaitingTimerData)
+pPrioFirstTimerData = pTimerData;
+else
+pPrioFirstTimerData = pSVData-mpWaitingTimerData;
+
 while ( pTimerData )
 {
 // If the timer is not new, was not deleted, and if it is not in the 
timeout handler, then
@@ -143,15 +148,24 @@ void Timer::ImplTimerCallbackProc()
 pCurrentTimer = pPrioFirstTimerData;
 }
 }
+
pTimerData-mpTimer-SetPriority(pTimerData-mpTimer-GetPriority() - 1);
 pPrioFirstTimerData = pCurrentTimer;
 }
 }
 pTimerData = pTimerData-mpNext;
 }
 
-while(pPrioFirstTimerData  pPrioFirstTimerData-mpTimer){
+if(pPrioFirstTimerData  pPrioFirstTimerData-mpTimer){
+nPrevPrio = pPrioFirstTimerData-mpTimer-GetPriority();
+pSVData-mpWaitingTimerData = pPrioFirstTimerData;
+}
+else
+pSVData-mpWaitingTimerData = NULL;
+
+while(pPrioFirstTimerData  pPrioFirstTimerData-mpTimer  
pPrioFirstTimerData-mpTimer-GetPriority() == nPrevPrio){
 // set new update time
 pPrioFirstTimerData-mnUpdateTime = nTime;
+nPrevPrio = pPrioFirstTimerData-mpTimer-GetPriority();
 
 // if no AutoTimer than stop
 if ( !pPrioFirstTimerData-mpTimer-mbAuto )
@@ -167,13 +181,17 @@ void Timer::ImplTimerCallbackProc()
 pPrioFirstTimerData-mbInTimeout = false;
 pPrevTimerData = pPrioFirstTimerData;
 pPrioFirstTimerData = pPrioFirstTimerData-mpPrioNext;
+pPrevTimerData-mpNext = pPrevTimerData-mpPrioNext;
 pPrevTimerData-mpPrioNext = NULL;
 }
 
+if(pPrevTimerData  !pPrevTimerData-mpPrioNext)
+pPrevTimerData-mpNext = NULL;
+
 // determine new time
 sal_uLong nNewTime = tools::Time::GetSystemTicks();
 pPrevTimerData = NULL;
-pTimerData = pSVData-mpFirstTimerData;
+pTimerData = pSVData

[Libreoffice-commits] core.git: Branch 'feature/priorities' - vcl/inc vcl/source

2014-10-29 Thread Tobias Madl
 vcl/inc/svdata.hxx   |1 
 vcl/source/app/timer.cxx |   56 ---
 2 files changed, 24 insertions(+), 33 deletions(-)

New commits:
commit 4e08ce00d4f1df57edf1e9fed8d05ba854156e9a
Author: Tobias Madl tobias.madl@gmail.com
Date:   Wed Oct 29 10:36:21 2014 +

Working starvation protection and prio scheduling

Change-Id: I9434fd2fdfad5f54021325648c547a9634d6b291

diff --git a/vcl/inc/svdata.hxx b/vcl/inc/svdata.hxx
index dc74595..c1d9eed 100644
--- a/vcl/inc/svdata.hxx
+++ b/vcl/inc/svdata.hxx
@@ -308,7 +308,6 @@ struct ImplSVData
 sal_uLong   mnThreadCount;  // is VCL MultiThread 
enabled
 ImplConfigData* mpFirstConfigData;  // Zeiger auf ersten 
Config-Block
 ImplTimerData*  mpFirstTimerData;   // list of all running timers
-ImplTimerData*  mpWaitingTimerData; // sorted (prio) list of ready 
timers
 SalTimer*   mpSalTimer; // interface to sal event 
loop/timers
 SalI18NImeStatus*   mpImeStatus;// interface to ime status 
window
 SalSystem*  mpSalSystem;// SalSystem interface
diff --git a/vcl/source/app/timer.cxx b/vcl/source/app/timer.cxx
index c039de1..894fb7a 100644
--- a/vcl/source/app/timer.cxx
+++ b/vcl/source/app/timer.cxx
@@ -97,19 +97,15 @@ void Timer::ImplTimerCallbackProc()
 sal_uLong   nMinPeriod = MAX_TIMER_PERIOD;
 sal_uLong   nDeltaTime;
 sal_uLong   nTime = tools::Time::GetSystemTicks();
+boolbAllTimerCalled = true;
 
 if ( pSVData-mbNoCallTimer )
 return;
 
 pSVData-mnTimerUpdate++;
 pSVData-mbNotAllTimerCalled = true;
-
-// find timer where the timer handler needs to be called
 pTimerData = pSVData-mpFirstTimerData;
-if(!pSVData-mpWaitingTimerData)
-pPrioFirstTimerData = pTimerData;
-else
-pPrioFirstTimerData = pSVData-mpWaitingTimerData;
+pPrioFirstTimerData = pTimerData;
 
 while ( pTimerData )
 {
@@ -155,12 +151,8 @@ void Timer::ImplTimerCallbackProc()
 pTimerData = pTimerData-mpNext;
 }
 
-if(pPrioFirstTimerData  pPrioFirstTimerData-mpTimer){
+if(pPrioFirstTimerData  pPrioFirstTimerData-mpTimer)
 nPrevPrio = pPrioFirstTimerData-mpTimer-GetPriority();
-pSVData-mpWaitingTimerData = pPrioFirstTimerData;
-}
-else
-pSVData-mpWaitingTimerData = NULL;
 
 while(pPrioFirstTimerData  pPrioFirstTimerData-mpTimer  
pPrioFirstTimerData-mpTimer-GetPriority() == nPrevPrio){
 // set new update time
@@ -181,17 +173,20 @@ void Timer::ImplTimerCallbackProc()
 pPrioFirstTimerData-mbInTimeout = false;
 pPrevTimerData = pPrioFirstTimerData;
 pPrioFirstTimerData = pPrioFirstTimerData-mpPrioNext;
-pPrevTimerData-mpNext = pPrevTimerData-mpPrioNext;
 pPrevTimerData-mpPrioNext = NULL;
 }
 
-if(pPrevTimerData  !pPrevTimerData-mpPrioNext)
-pPrevTimerData-mpNext = NULL;
+while(pPrioFirstTimerData  pPrioFirstTimerData-mpTimer){
+pPrevTimerData = pPrioFirstTimerData;
+pPrioFirstTimerData = pPrioFirstTimerData-mpPrioNext;
+pPrevTimerData-mpPrioNext = NULL;
+bAllTimerCalled = false;
+}
 
 // determine new time
 sal_uLong nNewTime = tools::Time::GetSystemTicks();
 pPrevTimerData = NULL;
-pTimerData = pSVData-mpWaitingTimerData;
+pTimerData = pSVData-mpFirstTimerData;
 while ( pTimerData )
 {
 // ignore if timer is still in timeout handler
@@ -238,15 +233,10 @@ void Timer::ImplTimerCallbackProc()
 pPrevTimerData = pTimerData;
 pTimerData = pTimerData-mpNext;
 }
-}
-
-if(pPrioFirstTimerData  pPrioFirstTimerData-mpTimer)
-pSVData-mpWaitingTimerData = pPrioFirstTimerData;
-else
-pSVData-mpWaitingTimerData = NULL;
+ }
 
 // delete clock if no more timers available
-if ( !pSVData-mpFirstTimerData  !pSVData-mpWaitingTimerData )
+if ( !pSVData-mpFirstTimerData )
 {
 pSVData-mpSalTimer-Stop();
 pSVData-mnTimerPeriod = MAX_TIMER_PERIOD;
@@ -254,16 +244,16 @@ void Timer::ImplTimerCallbackProc()
 else
 ImplStartTimer( pSVData, nMinPeriod );
 
-if(!pSVData-mpWaitingTimerData){
-pSVData-mnTimerUpdate--;
+pSVData-mnTimerUpdate--;
+if(bAllTimerCalled)
 pSVData-mbNotAllTimerCalled = false;
-}
 }
 
 Timer::Timer():
 mpTimerData(NULL),
 mnTimeout(1),
-mnPriority(0),
+mnPriority(VCL_IDLE_PRIORITY_HIGH),
+mnDefaultPriority(VCL_IDLE_PRIORITY_HIGH),
 mbActive(false),
 mbAuto(false)
 {
@@ -273,6 +263,7 @@ Timer::Timer( const Timer rTimer ):
 mpTimerData(NULL),
 mnTimeout(rTimer.mnTimeout),
 mnPriority(rTimer.mnPriority),
+mnDefaultPriority(rTimer.mnDefaultPriority),
 mbActive(false),
 mbAuto(false),
 maTimeoutHdl(rTimer.maTimeoutHdl)
@@ -301,17 +292,17 @@ void Timer

[Libreoffice-commits] core.git: Branch 'feature/priorities' - vcl/source

2014-10-29 Thread Tobias Madl
 vcl/source/app/timer.cxx |   10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 921da06de1d246652665c6dd535fd50c68647f74
Author: Tobias Madl tobias.madl@gmail.com
Date:   Wed Oct 29 15:17:32 2014 +

Minor bug fixes of scheduling process

Change-Id: I47ad343496aff29016941f6c894c517136f992d5

diff --git a/vcl/source/app/timer.cxx b/vcl/source/app/timer.cxx
index 894fb7a..bad6c1b 100644
--- a/vcl/source/app/timer.cxx
+++ b/vcl/source/app/timer.cxx
@@ -105,7 +105,7 @@ void Timer::ImplTimerCallbackProc()
 pSVData-mnTimerUpdate++;
 pSVData-mbNotAllTimerCalled = true;
 pTimerData = pSVData-mpFirstTimerData;
-pPrioFirstTimerData = pTimerData;
+pPrioFirstTimerData = NULL;
 
 while ( pTimerData )
 {
@@ -115,8 +115,9 @@ void Timer::ImplTimerCallbackProc()
  !pTimerData-mbDelete  !pTimerData-mbInTimeout )
 {
 // time has expired
-if ( (pTimerData-mnUpdateTime+pTimerData-mpTimer-mnTimeout) = 
nTime )
+if ( (pTimerData-mnUpdateTime+pTimerData-mpTimer-mnTimeout) = 
nTime || pTimerData-mpTimer-GetPriority()  
pTimerData-mpTimer-GetDefaultPriority() )
 {
+
pTimerData-mpTimer-SetPriority(pTimerData-mpTimer-GetPriority() - 1);
 ImplTimerData* pCurrentTimer = pPrioFirstTimerData;
 pPrevTimerData = NULL;
 if(pCurrentTimer != pTimerData){
@@ -144,7 +145,6 @@ void Timer::ImplTimerCallbackProc()
 pCurrentTimer = pPrioFirstTimerData;
 }
 }
-
pTimerData-mpTimer-SetPriority(pTimerData-mpTimer-GetPriority() - 1);
 pPrioFirstTimerData = pCurrentTimer;
 }
 }
@@ -245,8 +245,8 @@ void Timer::ImplTimerCallbackProc()
 ImplStartTimer( pSVData, nMinPeriod );
 
 pSVData-mnTimerUpdate--;
-if(bAllTimerCalled)
-pSVData-mbNotAllTimerCalled = false;
+//if(bAllTimerCalled)
+pSVData-mbNotAllTimerCalled = false;
 }
 
 Timer::Timer():
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/05/11605/1'

2014-09-29 Thread Tobias Madl

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/04/11604/2'

2014-09-29 Thread Tobias Madl

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/03/11603/2'

2014-09-29 Thread Tobias Madl

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/61/11461/1'

2014-09-29 Thread Tobias Madl

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/61/11461/2'

2014-09-29 Thread Tobias Madl

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/61/11461/5'

2014-09-29 Thread Tobias Madl

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/03/11603/1'

2014-09-29 Thread Tobias Madl

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/61/11461/3'

2014-09-29 Thread Tobias Madl

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/61/11461/4'

2014-09-29 Thread Tobias Madl

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/04/11604/1'

2014-09-29 Thread Tobias Madl

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/03/11603/3'

2014-09-29 Thread Tobias Madl

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/02/11602/1'

2014-09-29 Thread Tobias Madl

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: unoxml/CppunitTest_unoxml_domtest.mk unoxml/Module_unoxml.mk unoxml/test

2014-09-25 Thread Tobias Madl
 unoxml/CppunitTest_unoxml_domtest.mk |   47 ++
 unoxml/Module_unoxml.mk  |4 
 unoxml/test/domtest.cxx  |  150 ---
 3 files changed, 103 insertions(+), 98 deletions(-)

New commits:
commit dbbd89efdeaa44421d1f2ad774c342009d881d9b
Author: Tobias Madl tobias.madl@gmail.com
Date:   Tue Sep 23 11:43:14 2014 +

fdo#39625 Make existing CppUnit tests work

As in the ticket description, this test is now working, but
some parts of it are still commented out, because they are waiting
for a fix of another bug (Bug 84237). Once it is fixed, it should
be possible to just uncomment them, and then they should work.

Change-Id: I73d1cc7391080e357c08cb3442616e2901070c1f
Signed-off-by: Stephan Bergmann sberg...@redhat.com (with minor 
amendments)

diff --git a/unoxml/CppunitTest_unoxml_domtest.mk 
b/unoxml/CppunitTest_unoxml_domtest.mk
new file mode 100644
index 000..b12fd1e
--- /dev/null
+++ b/unoxml/CppunitTest_unoxml_domtest.mk
@@ -0,0 +1,47 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_CppunitTest_CppunitTest,unoxml_domtest))
+
+$(eval $(call gb_CppunitTest_add_exception_objects,unoxml_domtest, \
+unoxml/test/domtest \
+))
+
+$(eval $(call gb_CppunitTest_use_api,unoxml_domtest,\
+offapi \
+udkapi \
+))
+
+$(eval $(call gb_CppunitTest_use_components,unoxml_domtest,\
+configmgr/source/configmgr \
+framework/util/fwk \
+i18npool/util/i18npool \
+sfx2/util/sfx \
+ucb/source/core/ucb1 \
+ucb/source/ucp/file/ucpfile1 \
+unoxml/source/service/unoxml \
+))
+
+$(eval $(call gb_CppunitTest_use_externals,unoxml_domtest, \
+boost_headers \
+))
+
+$(eval $(call gb_CppunitTest_use_libraries,unoxml_domtest, \
+comphelper \
+cppu \
+cppuhelper \
+sal \
+test \
+))
+
+$(eval $(call gb_CppunitTest_use_configuration,unoxml_domtest))
+$(eval $(call gb_CppunitTest_use_ure,unoxml_domtest))
+$(eval $(call gb_CppunitTest_use_vcl,unoxml_domtest))
+
+# vim: set noet sw=4 ts=4:
diff --git a/unoxml/Module_unoxml.mk b/unoxml/Module_unoxml.mk
index 53cf589..bb06953 100644
--- a/unoxml/Module_unoxml.mk
+++ b/unoxml/Module_unoxml.mk
@@ -24,6 +24,10 @@ $(eval $(call gb_Module_add_targets,unoxml,\
 Library_unordf \
 ))
 
+$(eval $(call gb_Module_add_slowcheck_targets,unoxml,\
+CppunitTest_unoxml_domtest \
+))
+
 ifneq ($(OOO_JUNIT_JAR),)
 $(eval $(call gb_Module_add_subsequentcheck_targets,unoxml,\
 JunitTest_unoxml_complex \
diff --git a/unoxml/test/domtest.cxx b/unoxml/test/domtest.cxx
index 5d49922..07d1738 100644
--- a/unoxml/test/domtest.cxx
+++ b/unoxml/test/domtest.cxx
@@ -17,28 +17,34 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-// autogenerated file with codegen.pl
-
-#include testshl/simpleheader.hxx
-
 #include rtl/ref.hxx
+#include rtl/byteseq.hxx
 #include osl/file.hxx
 #include osl/process.h
 #include comphelper/seqstream.hxx
 #include comphelper/sequence.hxx
+#include comphelper/processfactory.hxx
 #include cppuhelper/compbase1.hxx
 #include cppuhelper/bootstrap.hxx
 #include cppuhelper/basemutex.hxx
+#include cppunit/TestFixture.h
+#include cppunit/extensions/HelperMacros.h
+#include cppunit/plugin/TestPlugIn.h
+#include unotest/macros_test.hxx
+#include test/bootstrapfixture.hxx
 
+#include com/sun/star/xml/dom/DocumentBuilder.hpp
 #include com/sun/star/xml/sax/FastToken.hpp
 #include com/sun/star/xml/sax/XSAXSerializable.hpp
 #include com/sun/star/xml/sax/XFastSAXSerializable.hpp
-
 #include ../source/dom/documentbuilder.hxx
 
 using namespace ::DOM;
 using namespace ::comphelper;
 using namespace ::com::sun::star;
+using namespace ::com::sun::star::uno;
+using css::xml::dom::XDocumentBuilder;
+using css::xml::dom::DocumentBuilder;
 
 namespace
 {
@@ -96,17 +102,17 @@ struct ErrorHandler
 ErrorHandler() : mnErrCount(0), mnFatalCount(0), mnWarnCount(0)
 {}
 
-virtual void SAL_CALL error( const uno::Any ) throw 
(xml::sax::SAXException, uno::RuntimeException)
+virtual void SAL_CALL error( const uno::Any ) throw 
(xml::sax::SAXException, uno::RuntimeException) SAL_OVERRIDE
 {
 ++mnErrCount;
 }
 
-virtual void SAL_CALL fatalError( const uno::Any ) throw 
(xml::sax::SAXException, uno::RuntimeException)
+virtual void SAL_CALL fatalError( const uno::Any ) throw 
(xml::sax::SAXException, uno::RuntimeException) SAL_OVERRIDE
 {
 ++mnFatalCount;
 }
 
-virtual void SAL_CALL warning( const uno::Any ) throw 
(xml::sax::SAXException, uno::RuntimeException)
+virtual void SAL_CALL warning( const uno::Any ) throw 
(xml::sax::SAXException, uno::RuntimeException

[Libreoffice-commits] core.git: qadevOOo/runner

2014-09-24 Thread Tobias Madl
 qadevOOo/runner/convwatch/EnhancedComplexTestCase.java |1 -
 1 file changed, 1 deletion(-)

New commits:
commit 8f661c6b2b870452bf45c9fd1b7c56a8978c2482
Author: Tobias Madl tobias.madl@gmail.com
Date:   Tue Sep 23 12:09:07 2014 +

fdo#39625 Make existing CppUnittests work

Just removed some useless comment.

Change-Id: I3f43e245849b82f8a1257c6ac0bace673d0ca9d6
Reviewed-on: https://gerrit.libreoffice.org/11604
Reviewed-by: Noel Grandin noelgran...@gmail.com
Tested-by: Noel Grandin noelgran...@gmail.com

diff --git a/qadevOOo/runner/convwatch/EnhancedComplexTestCase.java 
b/qadevOOo/runner/convwatch/EnhancedComplexTestCase.java
index 16a743e..7146680 100644
--- a/qadevOOo/runner/convwatch/EnhancedComplexTestCase.java
+++ b/qadevOOo/runner/convwatch/EnhancedComplexTestCase.java
@@ -29,7 +29,6 @@ public abstract class EnhancedComplexTestCase extends 
ComplexTestCase
 {
 private void checkExistance(String _sScriptFile, String _sName)
 {
-// Process testshl = Runtime.getRuntime().exec(scriptFile);
 ProcessHandler aHandler = new ProcessHandler(_sScriptFile);
 aHandler.executeSynchronously();
 TimeHelper.waitInSeconds(1, wait after 
ProcessHandler.executeSynchronously());
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sal/qa

2014-09-24 Thread Tobias Madl
 sal/qa/rtl/bootstrap/bootstrap_process.cxx |  110 ---
 sal/qa/rtl/bootstrap/rtl_Bootstrap.cxx |  901 -
 sal/qa/rtl/bootstrap/rtl_Bootstrap.xsce|   24 
 3 files changed, 1035 deletions(-)

New commits:
commit 18cc5cb2fdb8bca18a6c55d0a165b749f6730420
Author: Tobias Madl tobias.madl@gmail.com
Date:   Mon Sep 15 16:19:46 2014 +

fdo#39625 Delete unused cppunittests

As discussed with Stephan Bergmann, these files, which contained unused
cppunittests, could be removed.

Change-Id: I91844b96967e3c3e0e8367452f2dda420f479ffe
Signed-off-by: Stephan Bergmann sberg...@redhat.com

diff --git a/sal/qa/rtl/bootstrap/bootstrap_process.cxx 
b/sal/qa/rtl/bootstrap/bootstrap_process.cxx
deleted file mode 100644
index 914e25f..000
--- a/sal/qa/rtl/bootstrap/bootstrap_process.cxx
+++ /dev/null
@@ -1,110 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the License); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#include stdlib.h
-#include stdio.h
-#include sal/main.h
-#include rtl/bootstrap.hxx
-#include rtl/ustring.h
-#include rtl/ustring.hxx
-
-using namespace ::rtl;
-
-// --- Main ---
-SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
-{
-(void)argc;
-Bootstrap aBootstrap;
-//custom .ini/rc file
-Bootstrap aBs_custom( OUString::createFromAscii(argv[3]) );
-OUString suValue;
-OUString suDefault( mydefault );
-int flag = atoi( argv[1] );
-
-switch( flag ) {
-case 1:
-// parameters may be passed by command line arguments
-aBootstrap.getFrom(
-OUString(UNO_SERVICES),
-suValue );
-if ( suValue == service.rdb )
-{
-return 10;
-}
-else
-return 11;
-case 2:
-// parameters may be passed by ini file
-aBootstrap.getFrom(
-OUString(EXECUTABLE_RC),
-suValue );
-if ( suValue == true )
-{
-return 20;
-}
-else
-return 21;
-case 3:
-// parameters may be passed by command line arguments
-aBootstrap.getFrom(
-OUString(QADEV_BOOTSTRAP),
-suValue );
-if ( suValue == sunms )
-{
-return 30;
-}
-else
-return 31;
-case 4:
-// parameters may be passed by custom .ini/rc file
-aBs_custom.getFrom(
-OUString(RTLVALUE),
-suValue );
-if ( suValue == qadev17 )
-{
-return 40;
-}
-else
-return 41;
-case 5:
-// parameters may be passed by inheritance
-aBs_custom.getFrom(
-OUString(EXECUTABLE_RC),
-suValue );
-if ( suValue == true )
-{
-return 50;
-}
-else
-return 51;
-default:
-// parameters may be passed by inheritance
-aBs_custom.getFrom(
-OUString(ABCDE),
-suValue, suDefault );
-if ( suValue == mydefault )
-{
-return 60;
-}
-else
-return 61;
-}
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sal/qa/rtl/bootstrap/rtl_Bootstrap.cxx 
b/sal/qa/rtl/bootstrap/rtl_Bootstrap.cxx
deleted file mode 100644
index a80d108..000
--- a/sal/qa/rtl/bootstrap/rtl_Bootstrap.cxx
+++ /dev/null
@@ -1,901 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under

[Libreoffice-commits] core.git: forms/source

2014-09-24 Thread Tobias Madl
 forms/source/component/FormComponent.cxx  |2 -
 forms/source/component/FormattedField.cxx |   35 ++
 2 files changed, 18 insertions(+), 19 deletions(-)

New commits:
commit 0e55cc95dfe21e4d4800592ce8029ff039ea4307
Author: Tobias Madl tobias.madl@gmail.com
Date:   Mon Sep 15 15:46:32 2014 +

fdo#39468 Translated German to English

Change-Id: I7405b8251b977f8e5c1b95c37fbab6ae6cb120e7
Reviewed-on: https://gerrit.libreoffice.org/11461
Reviewed-by: Samuel Mehrbrodt s.mehrbr...@gmail.com
Tested-by: Samuel Mehrbrodt s.mehrbr...@gmail.com

diff --git a/forms/source/component/FormComponent.cxx 
b/forms/source/component/FormComponent.cxx
index 7d606cc..e8547ac 100644
--- a/forms/source/component/FormComponent.cxx
+++ b/forms/source/component/FormComponent.cxx
@@ -761,7 +761,7 @@ void SAL_CALL OControlModel::write(const 
Referencecss::io::XObjectOutputStream
 // 2. wrting a version number
 _rxOutStream-writeShort(0x0003);
 
-// 3. Schreiben der allgemeinen Properties
+// 3. writing the general properties
 ::comphelper::operator( _rxOutStream, m_aName);
 _rxOutStream-writeShort(m_nTabIndex);
 ::comphelper::operator( _rxOutStream, m_aTag); // 3. version
diff --git a/forms/source/component/FormattedField.cxx 
b/forms/source/component/FormattedField.cxx
index db3221c..30d72fc 100644
--- a/forms/source/component/FormattedField.cxx
+++ b/forms/source/component/FormattedField.cxx
@@ -196,7 +196,7 @@ void OFormattedControl::keyPressed(const 
::com::sun::star::awt::KeyEvent e) thr
 {
 if( e.KeyCode != KEY_RETURN || e.Modifiers != 0 )
 return;
-// Steht das Control in einem Formular mit einer Submit-URL?
+// Is the control on a form with a submit URL?
 Referencecom::sun::star::beans::XPropertySet  xSet(getModel(), 
UNO_QUERY);
 if( !xSet.is() )
 return;
@@ -223,13 +223,13 @@ void OFormattedControl::keyPressed(const 
::com::sun::star::awt::KeyEvent e) thr
 if (hasProperty(PROPERTY_CLASSID, xFCSet) 
 getINT16(xFCSet-getPropertyValue(PROPERTY_CLASSID)) == 
FormComponentType::TEXTFIELD)
 {
-// Noch ein weiteres Edit gefunden == dann nicht submitten
+// Found another edit == no submit
 if (xFCSet != xSet)
 return;
 }
 }
 }
-// Da wir noch im Haender stehen, submit asynchron ausloesen
+// Still in the handler, trigger submit asynchronous
 if( m_nKeyEvent )
 Application::RemoveUserEvent( m_nKeyEvent );
 m_nKeyEvent = Application::PostUserEvent( LINK(this, OFormattedControl,
@@ -363,8 +363,8 @@ void OFormattedModel::describeFixedProperties( Sequence 
Property  _rProps ) c
 void OFormattedModel::describeAggregateProperties( Sequence Property  
_rAggregateProps ) const
 {
 OEditBaseModel::describeAggregateProperties( _rAggregateProps );
-// TreatAsNumeric nicht transient : wir wollen es an der UI anbinden (ist 
noetig, um dem EffectiveDefault
-// - der kann Text oder Zahl sein - einen Sinn zu geben)
+// TreatAsNumeric not transient : we want to bind it to the UI (necessary, 
because EffectiveDefault
+// - could be text or numbers - for making sense)
 ModifyPropertyAttributes(_rAggregateProps, PROPERTY_TREATASNUMERIC, 0, 
PropertyAttribute::TRANSIENT);
 // same for FormatKey
 // (though the paragraph above for the TreatAsNumeric does not hold 
anymore - we do not have an UI for this.
@@ -492,7 +492,7 @@ Reference XNumberFormatsSupplier  
OFormattedModel::calcFormatsSupplier() const
 {
 ReferenceXNumberFormatsSupplier  xSupplier;
 DBG_ASSERT(m_xAggregateSet.is(), OFormattedModel::calcFormatsSupplier : 
have no aggregate !);
-// hat mein aggregiertes Model einen FormatSupplier ?
+// check if my aggregated model has a FormatSupplier
 if( m_xAggregateSet.is() )
 m_xAggregateSet-getPropertyValue(PROPERTY_FORMATSSUPPLIER) = 
xSupplier;
 if (!xSupplier.is())
@@ -501,7 +501,7 @@ Reference XNumberFormatsSupplier  
OFormattedModel::calcFormatsSupplier() const
 if (!xSupplier.is())
 xSupplier = calcDefaultFormatsSupplier();
 DBG_ASSERT(xSupplier.is(), OFormattedModel::calcFormatsSupplier : no 
supplier !);
-// jetzt sollte aber einer da sein
+// now it should be there
 return xSupplier;
 }
 
@@ -509,10 +509,9 @@ ReferenceXNumberFormatsSupplier  
OFormattedModel::calcFormFormatsSupplier() co
 {
 ReferenceXChild  xMe;
 query_interface(static_castXWeak*(const_castOFormattedModel*(this)), 
xMe);
-// damit stellen wir sicher, dass wir auch fuer den Fall der Aggregation 
das richtige
-// Objekt bekommen
+// now we are sure, in case of an aggregation, to get the right object
 DBG_ASSERT(xMe.is(), OFormattedModel::calcFormFormatsSupplier : I should 
have a content interface !);
-// jetzt durchhangeln nach oben, bis wir auf eine starform treffen

Tobias Madl license statement

2014-09-01 Thread Tobias Madl
 Hi,

all my current and past contributions made to the LibreOffice project
may be licensed under the MPLv2/LGPLv3+ dual license.

Until further notice, all my future contributions to the LibreOffice
project are available under the MPLv2/LGPLv3+ dual license.

Best regards,

Tobias Madl
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice