You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openoffice.apache.org by bu...@apache.org on 2013/10/10 23:37:17 UTC
[Bug 123460] New: XCloseable interface vs the Dispatch Call to using
.uno:closeDoc
https://issues.apache.org/ooo/show_bug.cgi?id=123460
Bug ID: 123460
Issue Type: DEFECT
Summary: XCloseable interface vs the Dispatch Call to using
.uno:closeDoc
Product: Writer
Version: 3.4.1
Hardware: All
OS: Windows 7
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: code
Assignee: issues@openoffice.apache.org
Reporter: andrew.waller@propylon.com
CC: issues@openoffice.apache.org
Created attachment 81744
--> https://issues.apache.org/ooo/attachment.cgi?id=81744&action=edit
simple macro which helps to demonstrate the issue.
There seems to be a difference in the EventListener between when you call the
XCloseable close(true) functionality to when you go to the open office File ->
Close option.
If I use the XCloseable close(true) the event for "document is closing" does
not seem to fire however the "document closed" event does fire.
If I use the Open office file menu and choose File -> Close, I see both the
events for "document is closing" and "document closed"
The attached Macro module is a simple module that I used to help show the
problem. If you install this module and then go to Tools -> Customize, and from
there to the Events tab. If you change the events to the global OpenOffice.org
Listing.
Then set the events for "document is closing" and "document closed" to the
Module6.xba's functions(closing/closed).
Then on the toolbars tab of the Customize screen add the macro closeDoc or just
run the macro through the normal macro run functionality. You will see that the
behaviour between using the macro which calls the XCloseable behaves
differently to if the dispatch call is used from the File -> Close.
--
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.
You are watching all bug changes.
[Issue 123460] XCloseable interface vs the Dispatch Call to using
.uno:closeDoc
Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=123460
--- Comment #6 from brinzing <ol...@gmx.de> ---
@Brant Watson
you are right, my macro shows, the XCloseListener works in general.
someone should check the source code, seem the trigger from
tool menu is broken.
--
You are receiving this mail because:
You are on the CC list for the issue.
You are the assignee for the issue.
You are watching all issue changes.
[Issue 123460] XCloseable interface vs the Dispatch Call to using
.uno:closeDoc
Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=123460
--- Comment #7 from Brant Watson <ol...@gmail.com> ---
@brinzing - I think it might actually be the other way around. It seems to me
that the "document is closing" and "document closed" events are both important
(the distinction is there for a reason anyway), and anytime a document is
closed one would expect to see both events fired. It probably makes more sense
to figure out why XClosable doesn't trigger both events as opposed to checking
the menu code to figure out why its firing both.
There are probably two seperate codepaths for closing a document happening,
otherwise there wouldn't be a behaviour descrepancy. Whatever the reason
though, I think the correct fix would be to make sure that XClosable properly
fires the "document is closing" event.
--
You are receiving this mail because:
You are on the CC list for the issue.
You are the assignee for the issue.
You are watching all issue changes.
[Issue 123460] XCloseable interface vs the Dispatch Call to using
.uno:closeDoc
Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=123460
Edwin Sharp <el...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords|needmoreinfo |
Status|UNCONFIRMED |CONFIRMED
Latest|--- |4.1-dev
Confirmation on| |
Ever confirmed|0 |1
--- Comment #4 from Edwin Sharp <el...@apache.org> ---
Thank you Oliver
Only "notifyClosing" window is shown when closing document.
AOO420m1(Build:9800) - Rev. 1586681
Rev.1586681
Win 7
PS macro close_notifyClosing assigned to event "Document is going to be
closed".
--
You are receiving this mail because:
You are on the CC list for the issue.
You are the assignee for the issue.
You are watching all issue changes.
[Issue 123460] XCloseable interface vs the Dispatch Call to using
.uno:closeDoc
Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=123460
Brant Watson <ol...@gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |oldspiceap@gmail.com
--- Comment #5 from Brant Watson <ol...@gmail.com> ---
@brinzing That still doesn't really explain the behavioural differences. In one
scenario two events get fired, but in another, only one event gets fired. While
sure one could do some magic to add a listener to coerce the other into firing,
that kind of is silly (not to mention it might not get fired when it really
should). In any case, this is more about a behavioural differentiation between
what should not be dissimilar actions. It may be a simple call has been left
out but I haven't been through any of that code in ages.
Either way I can also confirm this is an issue, and has been for some time.
--
You are receiving this mail because:
You are on the CC list for the issue.
You are the assignee for the issue.
You are watching all issue changes.
[Issue 123460] XCloseable interface vs the Dispatch Call to using
.uno:closeDoc
Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=123460
--- Comment #3 from brinzing <ol...@gmx.de> ---
this will add an close listener to a document:
Sub Start()
addCloseListener(ThisComponent)
End Sub
Sub addCloseListener(oDoc as Object)
xListener = createUnoListener("close_", "com.sun.star.util.XCloseListener")
oDoc.addCloseListener(xListener)
End Sub
Sub close_queryClosing(evt as Object, bOwnership as Boolean)
MsgBox "queryclosing"
End Sub
Sub close_notifyClosing(evt as Object)
MsgBox "notifyClosing"
End Sub
Sub close_disposing(evt as Object)
MsgBox "disposing"
End Sub
result: query -> notify -> dispose
if i add macro sub's to events from tool - customize - events menu - as
described above -,
i get only an event for "document is closing"
--
You are receiving this mail because:
You are on the CC list for the issue.
You are the assignee for the issue.
You are watching all issue changes.
[Bug 123460] XCloseable interface vs the Dispatch Call to using
.uno:closeDoc
Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=123460
brinzing <ol...@gmx.de> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |oliver.brinzing@gmx.de
--- Comment #1 from brinzing <ol...@gmx.de> ---
.
--
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.
You are watching all bug changes.
[Issue 123460] XCloseable interface vs the Dispatch Call to using
.uno:closeDoc
Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=123460
Edwin Sharp <el...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |needmoreinfo
CC| |elish@apache.org
--- Comment #2 from Edwin Sharp <el...@apache.org> ---
How to use attachment 81744?
--
You are receiving this mail because:
You are on the CC list for the issue.
You are the assignee for the issue.
You are watching all issue changes.
[Bug 123460] XCloseable interface vs the Dispatch Call to using
.uno:closeDoc
Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=123460
Andrew Waller <an...@propylon.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |andrew.waller@propylon.com
--
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.
You are watching all bug changes.