Kaydet (Commit) da17ccae authored tarafından Miklos Vajna's avatar Miklos Vajna

CppunitTest_desktop_lib: close the document while LOK is still active

Otherwise the LOK notifiers won't be released (since LOK is not active),
and we leak vcl::Windows in GetLOKWindowsMap()::s_pLOKWindowsMap.

In dbgutil builds, this leads to an assertion failure if the sidebar is
active.

Change-Id: Idedb9578478ff4a9f2e17c0cfd203da6f007bdbd
Reviewed-on: https://gerrit.libreoffice.org/72065Reviewed-by: 's avatarMiklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
üst de022e50
......@@ -92,6 +92,7 @@
#include <com/sun/star/linguistic2/LinguServiceManager.hpp>
#include <com/sun/star/linguistic2/XSpellChecker.hpp>
#include <com/sun/star/i18n/ScriptType.hpp>
#include <com/sun/star/lang/DisposedException.hpp>
#include <editeng/fontitem.hxx>
#include <editeng/flstitem.hxx>
......@@ -916,7 +917,14 @@ LibLODocument_Impl::LibLODocument_Impl(const uno::Reference <css::lang::XCompone
LibLODocument_Impl::~LibLODocument_Impl()
{
mxComponent->dispose();
try
{
mxComponent->dispose();
}
catch (const css::lang::DisposedException& rException)
{
SAL_WARN("lok", "failed to dispose document:" << rException.Message);
}
}
CallbackFlushHandler::CallbackFlushHandler(LibreOfficeKitDocument* pDocument, LibreOfficeKitCallback pCallback, void* pData)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment