Petteri Larjos wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Hello,
> 
> I managed to debug my problem to XCloseable.close() function.
> 
> Reference< XCloseable > xCloseable( xComponent, UNO_QUERY );
> if ( xCloseable.is() ) {
>   xCloseable->close( sal_True );
> }
> 
> This makes my function to throw when it comes out from try block. If I
> comment  'xCloseable->close' then everythin works and my function newer
> throw. I also got it working by addin sleep call after 'xCloseable->close':
> 
> Reference< XCloseable > xCloseable( xComponent, UNO_QUERY );
> if ( xCloseable.is() ) {
>   xCloseable->close( sal_True );
>   sleep(1); // works but too slow
> }
> 
> What this means? BTW 'xComponent->dispose();' causes throwing as well. This
> never happened with OOo3.0.
The possible errors mentioned by Stephan and Mikhail put aside, can you
tell us what kind of exception is thrown here? Is it a
com::sun::star::util::CloseVetoException?

Calling "close" always can throw a css::util::CloseVetoException in case
the document can't be closed ATM, this is not an error. So just catch it
and go ahead. In case you passed "true" as parameter, the document will
be closed later as soon as the reason for the exception has gone away.

Regards,
Mathias

-- 
Mathias Bauer (mba) - Project Lead OpenOffice.org Writer
OpenOffice.org Engineering at Sun: http://blogs.sun.com/GullFOSS
Please don't reply to "[email protected]".
I use it for the OOo lists and only rarely read other mails sent to it.



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to