Issue 72811 - C# CloseVetoException problem
Summary: C# CloseVetoException problem
Status: CLOSED NOT_AN_OOO_ISSUE
Alias: None
Product: App Dev
Classification: Unclassified
Component: api (show other issues)
Version: 3.3.0 or older (OOo)
Hardware: All Windows XP
: P3 Trivial
Target Milestone: ---
Assignee: jsc
QA Contact: issues@api
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-12-20 15:34 UTC by rpavelic
Modified: 2013-02-24 21:09 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description rpavelic 2006-12-20 15:34:10 UTC
Hi!

I'm having trouble making OO close document using uno from C# (MS.NET).

After call to
XCloseable xClose = (XCloseable)xTextDocument;
xClose.close(true);

Exception is raised in unoidl.com.sun.star.uno.Exception

unoidl.com.sun.star.util.CloseVetoException: Controller disagree ...

Server stack trace: 


Exception rethrown at [0]: 
   at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage
reqMsg, IMessage retMsg)
   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData&
msgData, Int32 type)
   at unoidl.com.sun.star.util.XCloseable.close(Boolean DeliverOwnership)


What I'm doing is the following
open existing document
write to it
print it
try to close it

But the document wont close and it raises this exception.

Maybe this is not a bug, but I'm just doing in the wrong way.

This is exactly what I'm doing

xLocalContext = uno.util.Bootstrap.bootstrap();
xRemoteFactory =
(unoidl.com.sun.star.lang.XMultiServiceFactory)xLocalContext.getServiceManager();
aLoader =
(XComponentLoader)xRemoteFactory.createInstance("com.sun.star.frame.Desktop");
xComponent = aLoader.loadComponentFromURL("file:///" + fajl, "_blank", 0, new
unoidl.com.sun.star.beans.PropertyValue[0]);
xTextDocument = (unoidl.com.sun.star.text.XTextDocument)xComponent; 
...
some edditing
...
XCloseable xClose = (XCloseable)xTextDocument;
xClose.close(true);
Comment 1 jsc 2006-12-21 09:22:07 UTC
That is no bug. You have either to use a XPrintJobListener or print with the
PrintOption Wait=true to force a synchronous call. See teh appropriate IDL docu
and/or the DevGuide
Comment 2 jsc 2006-12-21 09:44:03 UTC
closed