summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2015-01-16 23:56:09 +0100
committerMichael Stahl <mstahl@redhat.com>2015-01-17 01:03:30 +0100
commit5f6bdce0c0ac687f418821ce328f2987bf340cda (patch)
treee59f769e234d5feee4a54d60f8c2ac9e1a21f920 /include
parent3b70717f02d5f2f255de078bd277e8662884bfb0 (diff)
rhbz#1136013: svx: try to make the ExternalToolEdit not crash all the time
This thing was starting a timer that re-starts itself forever, and when the file it was watching changed, it would just assume the drawing objects were still there (and the document, for that matter...) Change-Id: I35f187f0828097a05618dc1733dce819fc6bffc6
Diffstat (limited to 'include')
-rw-r--r--include/svx/extedit.hxx41
1 files changed, 31 insertions, 10 deletions
diff --git a/include/svx/extedit.hxx b/include/svx/extedit.hxx
index dc0c48917d06..65e178d74762 100644
--- a/include/svx/extedit.hxx
+++ b/include/svx/extedit.hxx
@@ -10,30 +10,51 @@
#ifndef INCLUDED_SVX_EXTEDIT_HXX
#define INCLUDED_SVX_EXTEDIT_HXX
-#include <svtools/grfmgr.hxx>
-#include <osl/file.hxx>
-#include <osl/process.h>
-#include <vcl/graph.hxx>
-#include <vcl/timer.hxx>
#include <svx/svxdllapi.h>
+#include <svl/lstner.hxx>
+#include <rtl/ustring.hxx>
+#include <memory>
+
+class Graphic;
+class GraphicObject;
+class FileChangedChecker;
class SVX_DLLPUBLIC ExternalToolEdit
{
-public:
- GraphicObject* m_pGraphicObject;
+protected:
OUString m_aFileName;
+ ::std::unique_ptr<FileChangedChecker> m_pChecker;
+
+public:
+
ExternalToolEdit();
virtual ~ExternalToolEdit();
virtual void Update( Graphic& aGraphic ) = 0;
- void Edit( GraphicObject *pGraphic );
+ void Edit(GraphicObject const*const pGraphic);
- DECL_LINK( StartListeningEvent, void *pEvent );
+ void StartListeningEvent();
- static void threadWorker( void *pThreadData );
static void HandleCloseEvent( ExternalToolEdit* pData );
};
+class FmFormView;
+class SdrObject;
+
+class SVX_DLLPUBLIC SdrExternalToolEdit
+ : public ExternalToolEdit
+ , public SfxListener
+{
+private:
+ FmFormView * m_pView;
+ SdrObject * m_pObj;
+
+ SAL_DLLPRIVATE virtual void Update(Graphic&) SAL_OVERRIDE;
+ SAL_DLLPRIVATE virtual void Notify(SfxBroadcaster&, const SfxHint&) SAL_OVERRIDE;
+
+public:
+ SdrExternalToolEdit(FmFormView * pView, SdrObject * pObj);
+};
#endif