summaryrefslogtreecommitdiff
path: root/sd/source/ui/view/drviews2.cxx
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 /sd/source/ui/view/drviews2.cxx
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 'sd/source/ui/view/drviews2.cxx')
-rw-r--r--sd/source/ui/view/drviews2.cxx33
1 files changed, 4 insertions, 29 deletions
diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx
index 5b4517ee2657..f30b974c8f65 100644
--- a/sd/source/ui/view/drviews2.cxx
+++ b/sd/source/ui/view/drviews2.cxx
@@ -185,33 +185,6 @@ using namespace ::com::sun::star::uno;
namespace sd {
-class SdExternalToolEdit : public ExternalToolEdit
-{
- FmFormView* m_pView;
- SdrObject* m_pObj;
-
-public:
- SdExternalToolEdit ( FmFormView* pView, SdrObject* pObj ) :
- m_pView (pView),
- m_pObj (pObj)
- {}
-
- virtual void Update( Graphic& aGraphic ) SAL_OVERRIDE
- {
- SdrPageView* pPageView = m_pView->GetSdrPageView();
- if( pPageView )
- {
- SdrGrafObj* pNewObj = static_cast<SdrGrafObj*>( m_pObj->Clone() );
- OUString aStr = m_pView->GetDescriptionOfMarkedObjects();
- aStr += " External Edit";
- m_pView->BegUndo( aStr );
- pNewObj->SetGraphicObject( aGraphic );
- m_pView->ReplaceObjectAtView( m_pObj, *pPageView, pNewObj );
- m_pView->EndUndo();
- }
- }
-};
-
/**
* SfxRequests for temporary actions
*/
@@ -999,8 +972,10 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
if( pObj && pObj->ISA( SdrGrafObj ) && static_cast<SdrGrafObj*>(pObj)->GetGraphicType() == GRAPHIC_BITMAP )
{
GraphicObject aGraphicObject( static_cast<SdrGrafObj*>(pObj)->GetGraphicObject() );
- SdExternalToolEdit* aExternalToolEdit = new SdExternalToolEdit( mpDrawView, pObj );
- aExternalToolEdit->Edit( &aGraphicObject );
+ m_ExternalEdits.push_back(
+ std::unique_ptr<SdrExternalToolEdit>(
+ new SdrExternalToolEdit(mpDrawView, pObj)));
+ m_ExternalEdits.back()->Edit( &aGraphicObject );
}
}
Cancel();