diff options
author | Jan-Marek Glogowski <glogow@fbihome.de> | 2013-12-22 17:42:20 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2014-02-12 10:23:05 +0000 |
commit | 1a12777f46954045afbe8fffa6dd199b4b338762 (patch) | |
tree | 48df2564f1dbdd151f6ee1460d5790c4264cee13 /offapi | |
parent | 2eb142f4207f921dfeb6f9d5cd34cb0fb288bdd1 (diff) |
Export MailMerge cancel functionality via UNO.
If you start a mail merge jobs via UNO, there is no way to cancel
it. But the functionality is already implemented and used by the
LO internal mail merge dialogs.
This patch adds an optional XCancellable interface to the MailMerge
service and implements it in the SwXMailMerge class.
As the XJob::execute function already uses the SolarMutex to
prevent parallel runs, XCancellable::cancel can be implemented by
storing the SwNewDBMgr in the private variable m_pMgr, protected by
a mutex.
The bCancel member has to be converted from a bitfield value to a
real boolean, because otherwise all bitfield values would have to
be protected by a mutex. Bitfield assignments aren't atomic as you
always have to replace at least a byte.
Change-Id: I007cc23fdf04ccfca7d3cd6180b0e17e99f53061
Reviewed-on: https://gerrit.libreoffice.org/7190
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'offapi')
-rw-r--r-- | offapi/com/sun/star/text/MailMerge.idl | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/offapi/com/sun/star/text/MailMerge.idl b/offapi/com/sun/star/text/MailMerge.idl index f669d71a1225..97411822aa99 100644 --- a/offapi/com/sun/star/text/MailMerge.idl +++ b/offapi/com/sun/star/text/MailMerge.idl @@ -26,6 +26,7 @@ #include <com/sun/star/beans/XPropertySet.idl> #include <com/sun/star/text/XMailMergeBroadcaster.idl> #include <com/sun/star/sdb/DataAccessDescriptor.idl> +#include <com/sun/star/util/XCancellable.idl> module com { module sun { module star { module text { @@ -51,6 +52,12 @@ published service MailMerge */ interface com::sun::star::task::XJob; + /** interface to cancel the current mail merge job. + + @since LibreOffice 4.3 + */ + [optional] interface com::sun::star::util::XCancellable; + /** interface to access the services properties. */ interface com::sun::star::beans::XPropertySet; |