summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2015-11-26 11:15:11 +0000
committerMichael Meeks <michael.meeks@collabora.com>2015-11-26 13:48:21 +0000
commited6aceab08e1c3951e1e33aa3d8070c57589b5db (patch)
tree9c2e2abc8cb129c0ed1040b536b6b11a6b87fd7d
parentbc8dcb2b5db706c8c5bdd6cf3ac1311d6625d962 (diff)
vcl: reduce pointless timer / scheduler / idle includes.
Change-Id: I8bf7f8d6ba1a54f2969e055956fadc52ff6c8673
-rw-r--r--include/sfx2/objsh.hxx12
-rw-r--r--include/vcl/dialog.hxx1
-rw-r--r--include/vcl/edit.hxx6
-rw-r--r--include/vcl/toolbox.hxx7
-rw-r--r--sfx2/source/inc/objshimp.hxx12
-rw-r--r--vcl/source/control/edit.cxx6
-rw-r--r--vcl/source/window/toolbox.cxx9
7 files changed, 31 insertions, 22 deletions
diff --git a/include/sfx2/objsh.hxx b/include/sfx2/objsh.hxx
index 8eca878255ac..09f8f074c2ff 100644
--- a/include/sfx2/objsh.hxx
+++ b/include/sfx2/objsh.hxx
@@ -37,7 +37,6 @@
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/document/CmisVersion.hpp>
-#include <vcl/timer.hxx>
#include <vcl/vclptr.hxx>
#include <svl/poolitem.hxx>
#include <vcl/bitmap.hxx>
@@ -805,17 +804,6 @@ inline SfxObjectShellLock & SfxObjectShellLock::
inline SfxObjectShellLock & SfxObjectShellLock::operator = ( SfxObjectShell * pObjP )
{ return *this = SfxObjectShellLock( pObjP ); }
-class AutoReloadTimer_Impl : public Timer
-{
- OUString aUrl;
- SfxObjectShell* pObjSh;
-
-public:
- AutoReloadTimer_Impl( const OUString& rURL, sal_uInt32 nTime,
- SfxObjectShell* pSh );
- virtual void Invoke() override;
-};
-
class SFX2_DLLPUBLIC SfxObjectShellItem: public SfxPoolItem
{
SfxObjectShell* pObjSh;
diff --git a/include/vcl/dialog.hxx b/include/vcl/dialog.hxx
index d4bbe5ce21dd..eb4a2fdda033 100644
--- a/include/vcl/dialog.hxx
+++ b/include/vcl/dialog.hxx
@@ -23,7 +23,6 @@
#include <tools/solar.h>
#include <vcl/dllapi.h>
#include <vcl/syswin.hxx>
-#include <vcl/timer.hxx>
#include <vcl/vclptr.hxx>
// - Dialog -
diff --git a/include/vcl/edit.hxx b/include/vcl/edit.hxx
index da5dc164e739..3e6fbb77c5da 100644
--- a/include/vcl/edit.hxx
+++ b/include/vcl/edit.hxx
@@ -27,8 +27,6 @@
#include <tools/solar.h>
#include <vcl/dllapi.h>
-#include <vcl/timer.hxx>
-#include <vcl/idle.hxx>
#include <vcl/menu.hxx>
#include <vcl/dndhelp.hxx>
#include <vcl/vclptr.hxx>
@@ -70,6 +68,8 @@ public:
enum AutocompleteAction{ AUTOCOMPLETE_KEYINPUT, AUTOCOMPLETE_TABFORWARD, AUTOCOMPLETE_TABBACKWARD };
+class Timer;
+
// - Edit -
class VCL_DLLPUBLIC Edit : public Control, public vcl::unohelper::DragAndDropClient
{
@@ -205,7 +205,7 @@ public:
virtual bool IsModified() const { return mpSubEdit ? mpSubEdit->mbModified : mbModified; }
virtual void EnableUpdateData( sal_uLong nTimeout = EDIT_UPDATEDATA_TIMEOUT );
- virtual void DisableUpdateData() { delete mpUpdateDataTimer; mpUpdateDataTimer = nullptr; }
+ virtual void DisableUpdateData();
void SetEchoChar( sal_Unicode c );
sal_Unicode GetEchoChar() const { return mcEchoChar; }
diff --git a/include/vcl/toolbox.hxx b/include/vcl/toolbox.hxx
index a2e5a0ac1e27..e0b4fd731fde 100644
--- a/include/vcl/toolbox.hxx
+++ b/include/vcl/toolbox.hxx
@@ -25,12 +25,10 @@
#include <vcl/dllapi.h>
#include <vcl/dockwin.hxx>
#include <vcl/image.hxx>
-#include <vcl/timer.hxx>
-#include <vcl/idle.hxx>
#include <vector>
+class Timer;
class UserDrawEvent;
-
struct ImplToolItem;
struct ImplToolSize;
struct ImplToolBoxPrivateData;
@@ -67,6 +65,7 @@ struct ImplToolSize
sal_uInt16 mnLines;
};
+class Idle;
class VCL_DLLPUBLIC ToolBox : public DockingWindow
{
friend class FloatingWindow;
@@ -76,7 +75,7 @@ private:
ImplToolBoxPrivateData* mpData;
std::vector<ImplToolSize> maFloatSizes;
ImageList maImageList;
- Idle maIdle;
+ Idle *mpIdle;
Rectangle maUpperRect;
Rectangle maLowerRect;
Rectangle maOutDockRect;
diff --git a/sfx2/source/inc/objshimp.hxx b/sfx2/source/inc/objshimp.hxx
index b7dbb0c8bac2..36f8bdff6618 100644
--- a/sfx2/source/inc/objshimp.hxx
+++ b/sfx2/source/inc/objshimp.hxx
@@ -30,6 +30,7 @@
#include <sfx2/objsh.hxx>
#include <sfx2/docmacromode.hxx>
#include "bitset.hxx"
+#include <vcl/timer.hxx>
#include <appbaslib.hxx>
@@ -45,6 +46,17 @@ struct MarkData_Impl
class SfxBasicManagerHolder;
+class AutoReloadTimer_Impl : public Timer
+{
+ OUString aUrl;
+ SfxObjectShell* pObjSh;
+
+public:
+ AutoReloadTimer_Impl( const OUString& rURL, sal_uInt32 nTime,
+ SfxObjectShell* pSh );
+ virtual void Invoke() override;
+};
+
struct SfxObjectShell_Impl : public ::sfx2::IMacroDocumentAccess
{
::comphelper::EmbeddedObjectContainer* mpObjectContainer;
diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx
index dbd8233b0040..4b1056c55fc7 100644
--- a/vcl/source/control/edit.cxx
+++ b/vcl/source/control/edit.cxx
@@ -2463,6 +2463,12 @@ void Edit::EnableUpdateData( sal_uLong nTimeout )
}
}
+void Edit::DisableUpdateData()
+{
+ delete mpUpdateDataTimer;
+ mpUpdateDataTimer = nullptr;
+}
+
void Edit::SetEchoChar( sal_Unicode c )
{
mcEchoChar = c;
diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx
index 6b4db051f61e..4105b586a40e 100644
--- a/vcl/source/window/toolbox.cxx
+++ b/vcl/source/window/toolbox.cxx
@@ -1398,8 +1398,9 @@ void ToolBox::ImplInit( vcl::Window* pParent, WinBits nStyle )
mnKeyModifier = 0;
mnActivateCount = 0;
- maIdle.SetPriority( SchedulerPriority::RESIZE );
- maIdle.SetIdleHdl( LINK( this, ToolBox, ImplUpdateHdl ) );
+ mpIdle = new Idle("toolbox update");
+ mpIdle->SetPriority( SchedulerPriority::RESIZE );
+ mpIdle->SetIdleHdl( LINK( this, ToolBox, ImplUpdateHdl ) );
// set timeout and handler for dropdown items
mpData->maDropdownTimer.SetTimeout( 250 );
@@ -1657,6 +1658,10 @@ void ToolBox::dispose()
}
}
mpFloatWin.clear();
+
+ delete mpIdle;
+ mpIdle = nullptr;
+
DockingWindow::dispose();
}