summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorTobias Madl <tobias.madl.dev@gmail.com>2014-11-06 13:59:53 +0000
committerTobias Madl <tobias.madl.dev@gmail.com>2014-12-09 12:34:51 +0000
commit545fafea1a21902b16b80c3aa2545f6e4b6f3565 (patch)
tree5d246d40ffe7debb3a8bacc52d6a75123b0e4363 /sw
parent7523b588f16e14f87c8146118a1f050f680795fa (diff)
changed some timer to idle
Change-Id: Ibd3a4f66cec6fde4fadc064f27ac44901d005b15
Diffstat (limited to 'sw')
-rw-r--r--sw/inc/doc.hxx2
-rw-r--r--sw/source/core/doc/docnew.cxx6
-rw-r--r--sw/source/ui/envelp/labfmt.cxx8
-rw-r--r--sw/source/ui/envelp/labfmt.hxx2
-rw-r--r--sw/source/uibase/inc/navipi.hxx2
-rw-r--r--sw/source/uibase/utlui/navipi.cxx14
6 files changed, 17 insertions, 17 deletions
diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx
index a7b882998635..8ca9f643c72c 100644
--- a/sw/inc/doc.hxx
+++ b/sw/inc/doc.hxx
@@ -268,7 +268,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
SwDBData maDBData; //< database descriptor
OUString msTOIAutoMarkURL; //< URL of table of index AutoMark file
boost::ptr_vector< boost::nullable<OUString> > maPatternNms; // Array for names of document-templates
diff --git a/sw/source/core/doc/docnew.cxx b/sw/source/core/doc/docnew.cxx
index ced0f2b122f2..97ddb7463c54 100644
--- a/sw/source/core/doc/docnew.cxx
+++ b/sw/source/core/doc/docnew.cxx
@@ -340,8 +340,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
@@ -785,7 +785,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 c07f4f9a0418..98ba6f2df944 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 f90bde30c7f5..a58c0259923e 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;
SwLabItem aItem;
diff --git a/sw/source/uibase/inc/navipi.hxx b/sw/source/uibase/inc/navipi.hxx
index ff36a629e765..386213b74285 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;
SwGlobalTree aGlobalTree;
ListBox aDocListBox;
- Timer aPageChgTimer;
+ Idle aPageChgIdle;
OUString sContentFileName;
OUString aContextArr[3];
OUString aStatusArr[4];
diff --git a/sw/source/uibase/utlui/navipi.cxx b/sw/source/uibase/utlui/navipi.cxx
index 8411776f1e59..0d55abadbf15 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().GotoPage((sal_uInt16)pEdit->GetValue(), true);
pCreateView->GetEditWin().GrabFocus();
pCreateView->GetViewFrame()->GetBindings().Invalidate(FN_STAT_PAGE);
@@ -833,8 +833,8 @@ SwNavigationPI::SwNavigationPI( SfxBindings* _pBindings,
else
aContentTree.GrabFocus();
UsePage(0);
- aPageChgTimer.SetTimeoutHdl(LINK(this, SwNavigationPI, ChangePageHdl));
- aPageChgTimer.SetTimeout(PAGE_CHANGE_TIMEOUT);
+ aPageChgIdle.SetIdleHdl(LINK(this, SwNavigationPI, ChangePageHdl));
+ aPageChgIdle.SetPriority(VCL_IDLE_PRIORITY_LOWEST);
aContentTree.SetAccessibleName(SW_RESSTR(STR_ACCESS_TL_CONTENT));
aGlobalTree.SetAccessibleName(SW_RESSTR(STR_ACCESS_TL_GLOBAL));
@@ -1295,9 +1295,9 @@ IMPL_LINK_NOARG(SwNavigationPI, ChangePageHdl)
IMPL_LINK_NOARG(SwNavigationPI, PageEditModifyHdl)
{
- if(aPageChgTimer.IsActive())
- aPageChgTimer.Stop();
- aPageChgTimer.Start();
+ if(aPageChgIdle.IsActive())
+ aPageChgIdle.Stop();
+ aPageChgIdle.Start();
return 0;
}