summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@collabora.com>2014-05-29 20:27:08 -0400
committerKohei Yoshida <kohei.yoshida@collabora.com>2014-05-29 20:36:05 -0400
commitbec6837986137705ba8df950d78f8bc27c44f4af (patch)
treeb7aa8d7597a83a4ebf035ad2781f58cc846986a1 /desktop
parent1e3c5480cd28afa1a3d80b2c9a96d4497389bf06 (diff)
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)
Diffstat (limited to 'desktop')
-rw-r--r--desktop/source/lib/init.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 3b045590e0f1..0fcbc5f464b9 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)