Kaydet (Commit) d7f69b1c authored tarafından Tor Lillqvist's avatar Tor Lillqvist

Add code to VbaApplicationBase::Quit() for the Automation client case

Change-Id: I4354adf5353bdfb0b080b24a5c49e3d22539eb23
Reviewed-on: https://gerrit.libreoffice.org/55051Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarTor Lillqvist <tml@collabora.com>
üst 1eda8cbe
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
/*
* This file is part of the LibreOffice project.
*
......@@ -37,6 +37,7 @@
#include <rtl/ref.hxx>
#include <tools/datetime.hxx>
#include <vcl/timer.hxx>
#include <vcl/svapp.hxx>
#include <basic/sbx.hxx>
#include <basic/sbstar.hxx>
......@@ -45,6 +46,8 @@
#include <basic/sbmod.hxx>
#include <basic/vbahelper.hxx>
#include <comphelper/asyncquithandler.hxx>
#include "vbacommandbars.hxx"
#include <unordered_map>
......@@ -440,6 +443,15 @@ void VbaApplicationBase::Quit()
pBasic->QuitAndExitApplication();
}
}
else
{
// This is the case of a call from an (OLE) Automation client.
// TODO: Probably we should just close any document windows open by the "application"
// (Writer or Calc) the call being handled is for. And only then, if no document windows
// are left open, quit the actual LibreOffice application.
Application::PostUserEvent( LINK( &AsyncQuitHandler::instance(), AsyncQuitHandler, OnAsyncQuit ) );
}
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
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