Good afternoon
There is a problem to block the document (to translate in a mode only reading) by means of macros (i.e. duplicate work of property of the menu service-parameters-security-set password). Somebody can faced a similar problem or even knows from what it is necessary to begin?
Read only mode
Re: Read only mode
Hello, I have the same problem, I'd like to catch the opening event of a Document and if it complies with certain constraints open iot in read-only mode.
Did you solve your problem?
TIA
Did you solve your problem?
TIA
OOo 2.3.X on Ms Windows XP + Linux
Re: Read only mode
Hi again, I finded a post in the old forum which solves the problem with OOBasic, now I'm figuring out how to translate it into Java.
http://www.oooforum.org/forum/viewtopic.phtml?t=65973
Code: Select all
Sub SetReadOnly
dim url as string
dim document as object
dim dispatcher as object
document=thisComponent
url=document.getUrl
GlobalScope.BasicLibraries.LoadLibrary("Tools")
if getAttr(url)<>1 then
dispatcher=createUnoService("com.sun.star.frame.DispatchHelper")
setattr(url,1) //readonly mode.
dispatcher.executeDispatch(thisComponent.CurrentController.Frame,".uno:Reload","",0,array())
end if
End Sub
OOo 2.3.X on Ms Windows XP + Linux