OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

XCloseable:close true -> Ooffice crash

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API
View previous topic :: View next topic  
Author Message
SkaramasakuS
Newbie
Newbie


Joined: 26 Jan 2012
Posts: 4

PostPosted: Thu Jan 26, 2012 12:31 am    Post subject: XCloseable:close true -> Ooffice crash Reply with quote

hey guys,
i implemented a XEventListener and catched notify : OnSaveDone

in there i decide to close the document so i call
Code:
com.sun.star.util.XCloseable:close true

i get a closevetoexception cuz hes in save-routine -- kk i forwarded ownership so nP

its working if i click save in OpenOffice writer application (its closing after it saved)

but if i click menu: Close -- its ending in a Ooffice crash :P

-cuz Ooffice writer wanna close
-ask if i wanna save
-yes
-then its entering my OnSaveDone event (there i decide to close the document (see above))
-program crash (i think cuz its try to double close itself // try to close itself while its already closed)

i cant even work around it, cuz if i implement XCloseListener - i will be noticed about (queryClosing) Ooffice Writer wanna close (menu click) AFTER i clicked save --> AFTER event routine (so this routine cant know its going to be closed already)

am i wrong or smth?

and, i think the queryClose should be called BEFORE the question (modified document: do u wanna save before quit?) is answered by user (clicked).

thx and greetz
Back to top
View user's profile Send private message
SkaramasakuS
Newbie
Newbie


Joined: 26 Jan 2012
Posts: 4

PostPosted: Tue Jan 31, 2012 12:08 am    Post subject: Re: XCloseable:close true -> Ooffice crash Reply with quote

*push* can anybody help plz :/

sum it up:

-click "end" in Ooffice writer
-its asking if i wanna save
-"yes"
-its entering XEventListener: OnSaveDone
-here i decide to close the writer app (cant know its normal save or "end -> save")
-closing through com.sun.star.util.XCloseable:close true
-get a closevetoexception -- but i forwarded ownership so its ok for me
-ooffice crashes ask if i wanna recover files

if i click normal save in writer its all working fine and closing after saving through my initiate in OnSaveDone

edit: reported: https://issues.apache.org/ooo/show_bug.cgi?id=118858

any ideas are welcome,
greetz
Back to top
View user's profile Send private message
carlos.rocha
General User
General User


Joined: 01 Jul 2008
Posts: 12

PostPosted: Tue Jan 31, 2012 10:58 am    Post subject: Reply with quote

You should try to post here:

http://user.services.openoffice.org/en/forum/viewforum.php?f=44

Good luck
Back to top
View user's profile Send private message
SkaramasakuS
Newbie
Newbie


Joined: 26 Jan 2012
Posts: 4

PostPosted: Thu Feb 02, 2012 12:33 am    Post subject: Reply with quote

ok thx i try
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group