Hi Jan,
if the hidden document and its frame are successfully closed, the
functionality should work well.
I am not quite sure what do you mean with destructor of the extension.
Are you sure that the code that should close the document is called? And
if it is called, do you get any exception from the close() call?
Best regards,
Mikhail.
On 11/08/10 14:34, Jan private wrote:
Hi,
my extension loads a document in the background:
Reference < XComponentLoader > xComponentLoader(
mxMCF->createInstanceWithContext(OU("com.sun.star.frame.Desktop" ),
mxCC), UNO_QUERY_THROW);
Sequence< PropertyValue > args(2);
PropertyValue hidden;
hidden.Name = OU("Hidden");
hidden.Value = makeAny(true);
args[0] = hidden;
PropertyValue ro;
ro.Name = OU("ReadOnly");
ro.Value = makeAny(true);
args[1] = ro;
xMaster = Reference< XModel>(
xComponentLoader->loadComponentFromURL(docURL,
OU("_default"), 0, args), UNO_QUERY_THROW);
In the destructor of the extension, the document is closed again:
Reference< XCloseable > xCloseable(data[docURL]->xMaster, UNO_QUERY);
xCloseable->close(false);
But when I close the main OOo window an instance of soffice.bin remains
running. This does not happen if I comment out the code which loads the
background document.
Thanks,
Jan
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]