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

Popup when read only

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Calc
View previous topic :: View next topic  
Author Message
beerdog
Newbie
Newbie


Joined: 02 Sep 2004
Posts: 2
Location: Norway

PostPosted: Thu Sep 02, 2004 12:46 am    Post subject: Popup when read only Reply with quote

Is there a way to get an popup when a file is read only. Now it just stand in the top of the document, and many of the people that use it here, dont take a notice at it.
I want it like office, that you get a popup.
_________________
Sincerily
Beer Dog
Back to top
View user's profile Send private message Visit poster's website
uros
Super User
Super User


Joined: 22 May 2003
Posts: 601
Location: Slovenia

PostPosted: Thu Sep 02, 2004 4:46 am    Post subject: Reply with quote

Hi beerdog!

There is a solution you asked for. Copy this macro in a Standard library and assign it to Open document event (Tools > Configurations > Events > Open Document). Check option button at "OpenOffice.org" on the right side of dialog first (not "Document")!

Code:
Sub IsFileReadOnly
   oDesktop = createUnoService("com.sun.star.frame.Desktop")
   oDocument = oDesktop.getCurrentComponent()
   If oDocument.IsReadOnly(oDocument.getURL) Then   MsgBox "Document is read only !!!", 16
End Sub


It works with OOo 1.1.1b on Win XP pro.

Hope it helps.
Uros
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 Calc 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