diff options
Diffstat (limited to 'starmath')
-rw-r--r-- | starmath/inc/document.hxx | 2 | ||||
-rw-r--r-- | starmath/source/document.cxx | 7 |
2 files changed, 4 insertions, 5 deletions
diff --git a/starmath/inc/document.hxx b/starmath/inc/document.hxx index f86207dffb4f..4446ad0d86fd 100644 --- a/starmath/inc/document.hxx +++ b/starmath/inc/document.hxx @@ -39,7 +39,6 @@ #include "format.hxx" #include "parse.hxx" #include "smmod.hxx" -#include "unomodel.hxx" class SmNode; class SfxMenuBarManager; @@ -96,7 +95,6 @@ class SmDocShell : public SfxObjectShell, public SfxListener OUString aText; SmFormat aFormat; SmParser aInterpreter; - SmModel *pModel; OUString aAccText; SmNode *pTree; SfxMenuBarManager *pMenuMgr; diff --git a/starmath/source/document.cxx b/starmath/source/document.cxx index edc635ed4ac5..e49faecbc852 100644 --- a/starmath/source/document.cxx +++ b/starmath/source/document.cxx @@ -684,7 +684,6 @@ void SmDocShell::Repaint() SmDocShell::SmDocShell( const sal_uInt64 i_nSfxCreationFlags ) : SfxObjectShell( i_nSfxCreationFlags ), - pModel ( new SmModel(this) ), pTree ( 0 ), pEditEngineItemPool ( 0 ), pEditEngine ( 0 ), @@ -704,9 +703,11 @@ SmDocShell::SmDocShell( const sal_uInt64 i_nSfxCreationFlags ) : StartListening(aFormat); StartListening(*pp->GetConfig()); - SetBaseModel( pModel ); + SetBaseModel( new SmModel(this) ); } + + SmDocShell::~SmDocShell() { SAL_INFO( "starmath", "starmath: SmDocShell::~SmDocShell" ); @@ -716,6 +717,7 @@ SmDocShell::~SmDocShell() EndListening(aFormat); EndListening(*pp->GetConfig()); + if(pCursor) delete pCursor; pCursor = NULL; @@ -724,7 +726,6 @@ SmDocShell::~SmDocShell() SfxItemPool::Free(pEditEngineItemPool); delete pTree; delete pPrinter; - delete pModel; } |