Sophie

Sophie

distrib > Mandriva > 2008.1 > x86_64 > media > main-testing > by-pkgid > 2c50825dd66d0497b96a67f7fab2ee84 > files > 7649

openoffice.org64-devel-doc-2.4.1.10-1mdv2008.1.x86_64.rpm

<html>
<head>
<title>Interface XCloseListener</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="../../../../idl.css">
</head>
<body>
<div id="adc-idlref">

<a name="_top_"> </a><table class="navimain" border="0" cellpadding="3">
<tr>
<td class="navimain"><a href="../module-ix.html" class="navimain">Overview</a></td>
<td class="navimain"><a href="module-ix.html" class="navimain">Module</a></td>
<td class="navimain"><a href="XCloseListener-xref.html" class="navimain">Use</a></td>
<td class="navimain"><a href="http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/OfficeDev/Closing_Documents" class="navimain">Devguide</a></td>
<td class="navimain"><a href="../../../../index-files/index-1.html" class="navimain">Index</a></td>
</tr>
</table>
<table class="navisub" border="0" cellpadding="0">
<tr>
<td class="navisub"><a href="#MethodsSummary" class="navisub">Methods' Summary</a></td>
<td class="navisub"><a href="#MethodsDetails" class="navisub">Methods' Details</a></td>
<td class="navisub">Attributes' Summary</td>
<td class="navisub">Attributes' Details</td>
</tr>
</table>
<hr>
<table border="0" width="100%" cellpadding="5" cellspacing="3" class="title-table" style="margin-bottom:6pt;">
<tr>
<td><p class="namechain"><a href="../../../../module-ix.html" class="namechain">::</a> <a href="../../../module-ix.html" class="namechain">com</a> :: <a href="../../module-ix.html" class="namechain">sun</a> :: <a href="../module-ix.html" class="namechain">star</a> :: <a href="module-ix.html" class="namechain">util</a> :: </p>
</td>
</tr>
<tr>
<td class="title">interface XCloseListener</td>
</tr>
<tr>
<td><dl>
<dt><b>Base Interfaces</b></dt>
<dd><pre style="font-family:monospace;"><strong>XCloseListener</strong>
&#x2517 ::com::sun::star::<a href="../lang/module-ix.html">lang</a>::<a href="../lang/XEventListener.html">XEventListener</a>

</pre></dd>
<dd><a name/><table border="1" width="100%" cellpadding="5" cellspacing="0" class="crosstitle">
<tr>
<td class="imsum_left">::com::sun::star::<a href="../lang/module-ix.html">lang</a>::<a href="../lang/XEventListener.html">XEventListener</a></td>
<td class="imsum_right"><dl>
<dt>(referenced interface's summary:)</dt>
<dd>base interface for all event listeners interfaces.
 </dd>
</dl>
</td>
</tr>
</table>
</dd>
</dl>
</td>
</tr>
<tr>
<td><dl>
<dt><b>Description</b></dt>
<dd>makes it possible to receive events when an object
 is called for closing

 </dd>
<dd><p>
 Such close events are broadcasted by a <a href="XCloseBroadcaster.html">XCloseBroadcaster</a>
 if somewhere tries to close it by calling <a href="XCloseable.html">XCloseable</a>::<a href="XCloseable.html#close">close()</a>.
 Listener can:
 <ul>
 <li>break that by throwing <a href="CloseVetoException.html">CloseVetoException</a></li>
 <li>or accept that by deregister himself at this broadcaster.</li>
 </ul>
 </p>

 <p>
 If an event <method scope="com::sun::star::lang">XEventListener::disposing</method>
 occured, nobody called <method>XCloseable::close</method> on listened object before.
 Then it's not allowed to break this request - it must be accepted!
 </p>

 </dd>
<dt><b>See also</b></dt>
<dd><a href="XCloseable.html">XCloseable</a>, <a href="XCloseBroadcaster.html">XCloseBroadcaster</a></dd>
</dl>
<a name="devmanual"> </a><dl>
<dt><b>Developers Guide</b></dt>
<dd><a href="http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/OfficeDev/Closing_Documents">OfficeDev - Closing Documents</a></dd>
</dl>
</td>
</tr>
</table>
<hr>
<a name="MethodsSummary"/><table border="1" width="100%" cellpadding="5" cellspacing="0" class="subtitle">
<tr>
<td class="subtitle" colspan="2">Methods' Summary</td>
</tr>
<tr>
<td class="imsum_left"><a href="#queryClosing">queryClosing</a></td>
<td class="imsum_right">is called when somewhere tries to close listened object

 &nbsp;</td>
</tr>
<tr>
<td class="imsum_left"><a href="#notifyClosing">notifyClosing</a></td>
<td class="imsum_right">is called when the listened object is closed realy

 &nbsp;</td>
</tr>
</table>
<a name="MethodsDetails"/><table border="1" width="100%" cellpadding="5" cellspacing="0" class="subtitle">
<tr>
<td class="subtitle">Methods' Details</td>
</tr>
<tr>
<td class="imdetail"><a name="queryClosing" class="membertitle">queryClosing</a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-method" bgcolor="#ffffff" align="center">
<tr>
<td><table class="table-in-method" border="0">
<tr>
<td valign="top" colspan="3">void</td>
</tr>
<tr>
<td valign="top"><b>queryClosing</b>(</td>
<td valign="top">[in] ::com::sun::star::<a href="../lang/module-ix.html">lang</a>::<a href="../lang/EventObject.html">EventObject</a></td>
<td valign="bottom">&nbsp;Source,</td>
</tr>
<tr>
<td/><td valign="top">[in] boolean</td>
<td valign="bottom">&nbsp;GetsOwnership )</td>
</tr>
<tr>
<td valign="top" align="right">raises( </td>
<td valign="top" colspan="2"><a href="CloseVetoException.html">CloseVetoException</a> );</td>
</tr>
</table>
<hr>
<dl>
<dt><b>Description</b></dt>
<dd>is called when somewhere tries to close listened object

 </dd>
<dd><p>
 Is called before <a href="XCloseListener.html">XCloseListener</a>::<a href="XCloseListener.html#notifyClosing">notifyClosing()</a>.
 Listener has the chance to break that by throwing a <a href="CloseVetoException.html">CloseVetoException</a>.
 This exception must be passed to the original caller of <a href="XCloseable.html">XCloseable</a>::<a href="XCloseable.html#close">close()</a>
 without any interaction.
 </p>

 <p>
 The parameter <var>GetsOwnership</var> regulate who has to try to close the listened object
 again, if this listener disagree with the request by throwing the exception.
 If it's set to <b>false</b> the original caller of <a href="XCloseable.html">XCloseable</a>::<a href="XCloseable.html#close">close()</a>
 will be the owner in every case. It's not allowed to call close() from this listener then.
 If it's set to <b>true</b> this listener will be the new owner if he throw the exception,
 otherwise not! If his still running processes will be finished he must call close() on
 listened object again then.
 </p>

 <p>
 If this listener doesn't disagree with th close request it depends from his internal
 implementation if he deregister himself at the listened object.
 But normaly this must be done in <a href="XCloseListener.html">XCloseListener</a>::<a href="XCloseListener.html#notifyClosing">notifyClosing()</a>.
 </p>

 </dd>
<dt><b>Parameter Source</b></dt>
<dd>describes the source of the event (must be the listened object)

 </dd>
<dt><b>Parameter GetsOwnership</b></dt>
<dd><b>true</b> pass the ownership to this listener, if he throw the veto exception
 (otherwise this parameter must be ignored!)
 <br>
 <b>false</b> forbids to grab the ownership for the listened close object and call
 close() on that any time.

 </dd>
<dt><b>Throws</b></dt>
<dd>CloseVetoException
 if listener disagree with the close request on listened object he must throw this exception
 </dd>
</dl>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="imdetail"><a name="notifyClosing" class="membertitle">notifyClosing</a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-method" bgcolor="#ffffff" align="center">
<tr>
<td><table class="table-in-method" border="0">
<tr>
<td valign="top" colspan="3">void</td>
</tr>
<tr>
<td valign="top"><b>notifyClosing</b>(</td>
<td valign="top">[in] ::com::sun::star::<a href="../lang/module-ix.html">lang</a>::<a href="../lang/EventObject.html">EventObject</a></td>
<td valign="bottom">&nbsp;Source );</td>
</tr>
</table>
<hr>
<dl>
<dt><b>Description</b></dt>
<dd>is called when the listened object is closed realy

 </dd>
<dd><p>
 Now the listened object is closed realy. Listener has to accept that;
 should deregister himself and relaese all references to it.
 It's not allowed nor possible to disagree with that by throwing any exception.
 </p>

 <p>
 If the event ::com::sun::star::<a href="../lang/module-ix.html">lang</a>::<a href="../lang/XEventListener.html">XEventListener</a>::<a href="../lang/XEventListener.html#disposing">disposing()</a> occured before
 it must be accepted too. There exist no chance for a disagreement any more.
 </p>

 </dd>
<dt><b>Parameter Source</b></dt>
<dd>describes the source of the event (must be the listened object)
 </dd>
</dl>
</td>
</tr>
</table>
</td>
</tr>
</table>
<a href="#_top_">Top of Page</a><hr size="3"><p class="copyright" align="center">Copyright &copy; 2008 Sun Microsystems, Inc.</p>

</div> <!-- id="adc-idlref" -->
</body>

</html>