2014-03-27 23:52 GMT+01:00 rmg <perm...@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+unsubscr...@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

Reply via email to