desktop/source/lib/init.cxx |    5 +++++
 1 file changed, 5 insertions(+)

New commits:
commit bec6837986137705ba8df950d78f8bc27c44f4af
Author: Kohei Yoshida <kohei.yosh...@collabora.com>
Date:   Thu May 29 20:27:08 2014 -0400

    Don't forget to dispose the component here.
    
    Otherwise, none of the associated SfxViewFrame, SfxBaseController,
    SfxObjectShell, SfxMedium etc would get destroyed which would ultimately
    lead to the .~lock.foo file not being deleted upon exit.
    
    But for this to work, the client code has to make sure that its
    LibreOfficeDocument instance gets destroyed when it finishes its thing.
    
    Change-Id: Id45eda526c1496712e4314a947e994eba5c3fa68
    (cherry picked from commit 699e97ebc4169546c63a48736d953349df69fdf3)

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 3b04559..0fcbc5f 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -161,6 +161,11 @@ struct LibLODocument_Impl : public _LibreOfficeDocument
         saveAs = doc_saveAs;
         saveAsWithOptions = doc_saveAsWithOptions;
     }
+
+    ~LibLODocument_Impl()
+    {
+        mxComponent->dispose();
+    }
 };
 
 static void doc_destroy(LibreOfficeDocument *pThis)
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to