summaryrefslogtreecommitdiff
path: root/chart2/source/controller/dialogs/TimerTriggeredControllerLock.cxx
diff options
context:
space:
mode:
authorVladimir Glazounov <vg@openoffice.org>2007-05-22 16:31:20 +0000
committerVladimir Glazounov <vg@openoffice.org>2007-05-22 16:31:20 +0000
commitd47b6f50056be963f8867385fe56969fab2bc1c4 (patch)
treec7d5f82d34206c0be6147080a253f4db288ea1d9 /chart2/source/controller/dialogs/TimerTriggeredControllerLock.cxx
parent7a36672e61598577d108babc63e4160f830cd06a (diff)
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED
2007/02/08 21:25:32 iha 1.1.2.2: resync m195 -> m202 2006/11/10 21:00:23 iha 1.1.2.1: prevent immidiate redraw in wizard and according dialogs (important for charts with many data)
Diffstat (limited to 'chart2/source/controller/dialogs/TimerTriggeredControllerLock.cxx')
-rw-r--r--chart2/source/controller/dialogs/TimerTriggeredControllerLock.cxx80
1 files changed, 80 insertions, 0 deletions
diff --git a/chart2/source/controller/dialogs/TimerTriggeredControllerLock.cxx b/chart2/source/controller/dialogs/TimerTriggeredControllerLock.cxx
new file mode 100644
index 000000000000..0bb347ed32cf
--- /dev/null
+++ b/chart2/source/controller/dialogs/TimerTriggeredControllerLock.cxx
@@ -0,0 +1,80 @@
+/*************************************************************************
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: TimerTriggeredControllerLock.cxx,v $
+ *
+ * $Revision: 1.2 $
+ *
+ * last change: $Author: vg $ $Date: 2007-05-22 17:31:20 $
+ *
+ * The Contents of this file are made available subject to
+ * the terms of GNU Lesser General Public License Version 2.1.
+ *
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2005 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_chart2.hxx"
+
+#include "TimerTriggeredControllerLock.hxx"
+
+// header for define EDIT_UPDATEDATA_TIMEOUT
+#ifndef _SV_EDIT_HXX
+#include <vcl/edit.hxx>
+#endif
+
+//.............................................................................
+namespace chart
+{
+//.............................................................................
+
+using namespace ::com::sun::star;
+
+TimerTriggeredControllerLock::TimerTriggeredControllerLock( const uno::Reference< frame::XModel >& xModel )
+ : m_xModel( xModel )
+ , m_apControllerLockGuard()
+ , m_aTimer()
+{
+ m_aTimer.SetTimeout( 4*EDIT_UPDATEDATA_TIMEOUT );
+ m_aTimer.SetTimeoutHdl( LINK( this, TimerTriggeredControllerLock, TimerTimeout ) );
+}
+TimerTriggeredControllerLock::~TimerTriggeredControllerLock()
+{
+ m_aTimer.Stop();
+}
+
+void TimerTriggeredControllerLock::startTimer()
+{
+ if(!m_apControllerLockGuard.get())
+ m_apControllerLockGuard = std::auto_ptr< ControllerLockGuard >( new ControllerLockGuard(m_xModel) );
+ m_aTimer.Start();
+}
+IMPL_LINK( TimerTriggeredControllerLock, TimerTimeout, void*, EMPTYARG )
+{
+ m_apControllerLockGuard.reset();
+ return 0;
+}
+
+//.............................................................................
+} //namespace chart
+//.............................................................................