Date: prev next · Thread: first prev next last
2015 Archives by date, by thread · List index


Supporting documentation:

  http://www.openoffice.org/api/docs/common/ref/com/sun/star/util/XCloseable.html
  https://wiki.openoffice.org/wiki/Documentation/DevGuide/OfficeDev/Closing_Documents

I've now used this code:

    if document.supportsService("com.sun.star.util.XCloseable") :        
        document.close(True)                                             
    office.document.dispose()                                                   

Does that look about right?
Jens


On Tue, Feb 24, 2015 at 12:54:16PM +0100, Michael Stahl wrote:
i think the general idea is to first close all open documents (via
XClosable::close() - only use XComponent::dispose() if the document does
not implement XClosable), and then call XDesktop::terminate()

-- 
Jens Tröger
http://savage.light-speed.de/

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.