summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2015-01-16 23:56:09 +0100
committerCaolán McNamara <caolanm@redhat.com>2015-01-19 12:28:41 +0000
commit0e0595c59ba399b265146c256bf0e0631623e898 (patch)
treef8d21e69e1f2e40ff40c615b05e2b69f0a179a95 /include
parente02c897a4bbb33d8b506077048557d9c37bd8852 (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...) (cherry picked from commit 5f6bdce0c0ac687f418821ce328f2987bf340cda) Conflicts: sc/source/ui/drawfunc/graphsh.cxx Change-Id: I35f187f0828097a05618dc1733dce819fc6bffc6 Reviewed-on: https://gerrit.libreoffice.org/13995 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
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