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


2014-03-27 23:52 GMT+01:00 rmg <permail@dick.georgeson.me.uk>:

​​
if HasUnoInterfaces(doc, "com.sun.star.util.Xcloseable")
    doc.close(TRUE)
else
    doc.dispose()
End if

 as I said lifted straight from the macro examples; the Libreoffice API
reference seems to say that's right.



​I'm not very fluent in LO API, but according to the documentation (
http://api.libreoffice.org/docs/idl/ref/interfacecom_1_1sun_1_1star_1_1util_1_1XCloseable.html)​
XCloseable.close() must be called before XComponent.dispose(), so maybe you
can try this:


​
if HasUnoInterfaces(doc, "com.sun.star.util.XCloseable")
    doc.close(TRUE)
End if
doc.dispose()


​Also note that it's XCloseable with a capital C. I don't know however if
it's case-sensitive (the doc seems to say it's not) but it wouldn't hurt to
check this too :)​​

-- 
To unsubscribe e-mail to: users+unsubscribe@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted

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.