diff options
-rwxr-xr-x | chart2/source/view/charttypes/GL3DBarChart.cxx | 9 | ||||
-rw-r--r-- | chart2/source/view/inc/GL3DBarChart.hxx | 2 | ||||
-rw-r--r-- | sc/source/ui/inc/acredlin.hxx | 4 | ||||
-rw-r--r-- | sc/source/ui/miscdlgs/acredlin.cxx | 10 | ||||
-rw-r--r-- | svx/source/form/filtnav.cxx | 25 |
5 files changed, 18 insertions, 32 deletions
diff --git a/chart2/source/view/charttypes/GL3DBarChart.cxx b/chart2/source/view/charttypes/GL3DBarChart.cxx index 7924e48c4306..8236706db511 100755 --- a/chart2/source/view/charttypes/GL3DBarChart.cxx +++ b/chart2/source/view/charttypes/GL3DBarChart.cxx @@ -26,7 +26,6 @@ #define CALC_POS_EVENT_ID 1 #define SHAPE_START_ID 10 -#define DATA_UPDATE_TIME 15 #define FPS_TIME 500 #define DATAUPDATE_FPS_TIME 1000 #define HISTORY_NUM 51 @@ -561,9 +560,9 @@ GL3DBarChart::GL3DBarChart( { mbAutoFly = atoi(aAutoFly); } - maTimer.SetTimeout(DATA_UPDATE_TIME); - maTimer.SetTimeoutHdl(LINK(this, GL3DBarChart, UpdateTimerHdl)); - maTimer.Start(); + maIdle.SetPriority(VCL_IDLE_PRIORITY_REPAINT); + maIdle.SetIdleHdl(LINK(this, GL3DBarChart, UpdateTimerHdl)); + maIdle.Start(); osl_getSystemTime(&maFPSRenderStartTime); osl_getSystemTime(&maFPSRenderEndTime); osl_getSystemTime(&maDataUpdateStartTime); @@ -1475,7 +1474,7 @@ void GL3DBarChart::processAutoFly(sal_uInt32 nId, sal_uInt32 nColor) IMPL_LINK_NOARG(GL3DBarChart, UpdateTimerHdl) { updateScreenText(); - maTimer.Start(); + maIdle.Start(); return 0; } diff --git a/chart2/source/view/inc/GL3DBarChart.hxx b/chart2/source/view/inc/GL3DBarChart.hxx index 79d816d25f88..0daeed0192a8 100644 --- a/chart2/source/view/inc/GL3DBarChart.hxx +++ b/chart2/source/view/inc/GL3DBarChart.hxx @@ -174,7 +174,7 @@ private: Point maClickPos; sal_uInt32 miScrollRate; bool mbScrollFlg; - Timer maTimer; + Idle maIdle; bool mbScreenTextNewRender; boost::ptr_vector<opengl3D::Renderable3DObject> maScreenTextShapes; OUString maFPS; diff --git a/sc/source/ui/inc/acredlin.hxx b/sc/source/ui/inc/acredlin.hxx index 048e55227e48..79a7ad55d8fb 100644 --- a/sc/source/ui/inc/acredlin.hxx +++ b/sc/source/ui/inc/acredlin.hxx @@ -95,8 +95,8 @@ class ScAcceptChgDlg : public SfxModelessDialog { private: - Timer aSelectionTimer; - Timer aReOpenTimer; + Idle aSelectionIdle; + Idle aReOpenIdle; SvxAcceptChgCtr* m_pAcceptChgCtr; ScViewData* pViewData; ScDocument* pDoc; diff --git a/sc/source/ui/miscdlgs/acredlin.cxx b/sc/source/ui/miscdlgs/acredlin.cxx index a511a1444597..dff8ae688150 100644 --- a/sc/source/ui/miscdlgs/acredlin.cxx +++ b/sc/source/ui/miscdlgs/acredlin.cxx @@ -114,14 +114,14 @@ ScAcceptChgDlg::ScAcceptChgDlg(SfxBindings* pB, SfxChildWindow* pCW, vcl::Window m_pAcceptChgCtr = new SvxAcceptChgCtr(get_content_area()); nAcceptCount=0; nRejectCount=0; - aReOpenTimer.SetTimeout(50); - aReOpenTimer.SetTimeoutHdl(LINK( this, ScAcceptChgDlg, ReOpenTimerHdl )); + aReOpenIdle.SetPriority(VCL_IDLE_PRIORITY_MEDIUM); + aReOpenIdle.SetIdleHdl(LINK( this, ScAcceptChgDlg, ReOpenTimerHdl )); pTPFilter=m_pAcceptChgCtr->GetFilterPage(); pTPView=m_pAcceptChgCtr->GetViewPage(); pTheView=pTPView->GetTableControl(); - aSelectionTimer.SetTimeout(100); - aSelectionTimer.SetTimeoutHdl(LINK( this, ScAcceptChgDlg, UpdateSelectionHdl )); + aSelectionIdle.SetPriority(VCL_IDLE_PRIORITY_LOW); + aSelectionIdle.SetIdleHdl(LINK( this, ScAcceptChgDlg, UpdateSelectionHdl )); pTPFilter->SetReadyHdl(LINK( this, ScAcceptChgDlg, FilterHandle )); pTPFilter->SetRefHdl(LINK( this, ScAcceptChgDlg, RefHandle )); @@ -1104,7 +1104,7 @@ IMPL_LINK_NOARG(ScAcceptChgDlg, AcceptAllHandle) IMPL_LINK_NOARG(ScAcceptChgDlg, SelectHandle) { if(!bNoSelection) - aSelectionTimer.Start(); + aSelectionIdle.Start(); bNoSelection=false; return 0; diff --git a/svx/source/form/filtnav.cxx b/svx/source/form/filtnav.cxx index ae552aa64761..6cbf0521b74d 100644 --- a/svx/source/form/filtnav.cxx +++ b/svx/source/form/filtnav.cxx @@ -1265,12 +1265,7 @@ IMPL_LINK_NOARG(FmFilterNavigator, OnDropActionTimer) { SvTreeListEntry* pToExpand = GetEntry(m_aTimerTriggered); if (pToExpand && (GetChildCount(pToExpand) > 0) && !IsExpanded(pToExpand)) - // tja, eigentlich muesste ich noch testen, ob die Node nicht schon expandiert ist, aber ich - // habe dazu weder in den Basisklassen noch im Model eine Methode gefunden ... - // aber ich denke, die BK sollte es auch so vertragen Expand(pToExpand); - - // nach dem Expand habe ich im Gegensatz zum Scrollen natuerlich nix mehr zu tun m_aDropActionTimer.Stop(); } break; @@ -1284,7 +1279,7 @@ sal_Int8 FmFilterNavigator::AcceptDrop( const AcceptDropEvent& rEvt ) { Point aDropPos = rEvt.maPosPixel; - // kuemmern wir uns erst mal um moeglich DropActions (Scrollen und Aufklappen) + // possible DropActions scroll and expand if (rEvt.mbLeaving) { if (m_aDropActionTimer.IsActive()) @@ -1293,7 +1288,7 @@ sal_Int8 FmFilterNavigator::AcceptDrop( const AcceptDropEvent& rEvt ) else { bool bNeedTrigger = false; - // auf dem ersten Eintrag ? + // first entry ? if ((aDropPos.Y() >= 0) && (aDropPos.Y() < GetEntryHeight())) { m_aDropActionType = DA_SCROLLUP; @@ -1301,8 +1296,6 @@ sal_Int8 FmFilterNavigator::AcceptDrop( const AcceptDropEvent& rEvt ) } else { - // auf dem letzten (bzw. in dem Bereich, den ein Eintrag einnehmen wuerde, wenn er unten genau buendig - // abschliessen wuerde) ? if ((aDropPos.Y() < GetSizePixel().Height()) && (aDropPos.Y() >= GetSizePixel().Height() - GetEntryHeight())) { m_aDropActionType = DA_SCROLLDOWN; @@ -1313,7 +1306,7 @@ sal_Int8 FmFilterNavigator::AcceptDrop( const AcceptDropEvent& rEvt ) SvTreeListEntry* pDropppedOn = GetEntry(aDropPos); if (pDropppedOn && (GetChildCount(pDropppedOn) > 0) && !IsExpanded(pDropppedOn)) { - // -> aufklappen + // -> expand m_aDropActionType = DA_EXPANDNODE; bNeedTrigger = true; } @@ -1321,12 +1314,10 @@ sal_Int8 FmFilterNavigator::AcceptDrop( const AcceptDropEvent& rEvt ) } if (bNeedTrigger && (m_aTimerTriggered != aDropPos)) { - // neu anfangen zu zaehlen m_aTimerCounter = DROP_ACTION_TIMER_INITIAL_TICKS; - // die Pos merken, da ich auch QueryDrops bekomme, wenn sich die Maus gar nicht bewegt hat + // remember DropPos because there are QueryDrops even though the mouse was not moved m_aTimerTriggered = aDropPos; - // und den Timer los - if (!m_aDropActionTimer.IsActive()) // gibt es den Timer schon ? + if (!m_aDropActionTimer.IsActive()) { m_aDropActionTimer.SetTimeout(DROP_ACTION_TIMER_TICK_BASE); m_aDropActionTimer.Start(); @@ -1336,8 +1327,6 @@ sal_Int8 FmFilterNavigator::AcceptDrop( const AcceptDropEvent& rEvt ) m_aDropActionTimer.Stop(); } - - // Hat das Object das richtige Format? if (!m_aControlExchange.isDragSource()) return DND_ACTION_NONE; @@ -1386,15 +1375,13 @@ namespace sal_Int8 FmFilterNavigator::ExecuteDrop( const ExecuteDropEvent& rEvt ) { - // ware schlecht, wenn nach dem Droppen noch gescrollt wird ... + // you can't scroll after dropping... if (m_aDropActionTimer.IsActive()) m_aDropActionTimer.Stop(); - // Format-Ueberpruefung if (!m_aControlExchange.isDragSource()) return DND_ACTION_NONE; - // das Ziel des Drop sowie einige Daten darueber Point aDropPos = rEvt.maPosPixel; SvTreeListEntry* pDropTarget = GetEntry( aDropPos ); if (!pDropTarget) |