[Libreoffice-commits] core.git: starmath/inc starmath/source

Fridrich Strba fridrich at documentfoundation.org
Thu Jul 25 02:06:22 PDT 2013


 starmath/inc/document.hxx    |    2 --
 starmath/source/document.cxx |    7 ++++---
 2 files changed, 4 insertions(+), 5 deletions(-)

New commits:
commit 5dd1cd72f45df0ec13842d4ee9c849726cb74ea9
Author: Fridrich Strba <fridrich at documentfoundation.org>
Date:   Thu Jul 25 08:55:35 2013 +0000

    Revert "Fix memory leak in Math, by holding SmModel pointer"
    
    Breaks unit tests of rtf import
    
    This reverts commit ef66cc105e0051fa1414b72c5ee2bf1b2f9331cb
    
    Change-Id: I95c13fc2bc3f9494a33153c62a7d52eb6f8efdd9
    Reviewed-on: https://gerrit.libreoffice.org/5095
    Reviewed-by: Fridrich Strba <fridrich at documentfoundation.org>
    Tested-by: Fridrich Strba <fridrich at documentfoundation.org>

diff --git a/starmath/inc/document.hxx b/starmath/inc/document.hxx
index f86207d..4446ad0 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 edc635e..e49faec 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;
 }
 
 


More information about the Libreoffice-commits mailing list