read and set the option "Save URLs relative to file system"

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

read and set the option "Save URLs relative to file system"

Jörg Schmidt-2
Hello,

I will read and set the Option:

Tools-Options-Load/Save-General-Save URLs relative to file system

with a Macro.


For Changing the MacroSecurityLevel i found this:

Sub ChangeMacroSecurity
   Dim sNodePath As String
   Dim oCP, oCUA
   
   sNodePath = "/org.openoffice.Office.Common/Security/Scripting"
   
     Dim aProps(0) As New com.sun.star.beans.PropertyValue

   oCP = CreateUnoService("com.sun.star.configuration.ConfigurationProvider" )
   aProps(0).Name = "nodepath"
   aProps(0).Value = sNodePath
   oCUA = oCP.createInstanceWithArguments("com.sun.star.configuration.ConfigurationUpdateAccess", aProps )
   
   oCUA.MacroSecurityLevel = 0
   oCUA.commitChanges()
End Sub


But how should the line "sNodePath = "/org.openoffice.Office.Common/Security/Scripting"" look for my requirement?

Unfortunately, when I use the XRAY-tool for inspect "oCUA" crashes OpenOffice.



Greetings,
Jörg



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: read and set the option "Save URLs relative to file system"

Tsutomu Uchino
Hi,

It is FileSystem property under /org.openoffice.Office.Common/Save/URL
configuration.
You can find it in the following file:
http://svn.apache.org/viewvc/openoffice/trunk/main/officecfg/registry/schema/org/openoffice/Office/Common.xcs?view=markup#l2326

Regards

2015-09-12 21:51 GMT+09:00 Jörg Schmidt <[hidden email]>:

> Hello,
>
> I will read and set the Option:
>
> Tools-Options-Load/Save-General-Save URLs relative to file system
>
> with a Macro.
>
>
> For Changing the MacroSecurityLevel i found this:
>
> Sub ChangeMacroSecurity
>    Dim sNodePath As String
>    Dim oCP, oCUA
>
>    sNodePath = "/org.openoffice.Office.Common/Security/Scripting"
>
>      Dim aProps(0) As New com.sun.star.beans.PropertyValue
>
>    oCP =
> CreateUnoService("com.sun.star.configuration.ConfigurationProvider" )
>    aProps(0).Name = "nodepath"
>    aProps(0).Value = sNodePath
>    oCUA =
> oCP.createInstanceWithArguments("com.sun.star.configuration.ConfigurationUpdateAccess",
> aProps )
>
>    oCUA.MacroSecurityLevel = 0
>    oCUA.commitChanges()
> End Sub
>
>
> But how should the line "sNodePath =
> "/org.openoffice.Office.Common/Security/Scripting"" look for my requirement?
>
> Unfortunately, when I use the XRAY-tool for inspect "oCUA" crashes
> OpenOffice.
>
>
>
> Greetings,
> Jörg
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
Reply | Threaded
Open this post in threaded view
|

Re: read and set the option "Save URLs relative to file system"

Regina Henschel
In reply to this post by Jörg Schmidt-2
Hi Jörg,

you can use LibreOffice to find it. LibreOffice writes a nice
registrymodifications.xcu where each item is in one line. Make a copy of
it. Start LibreOffice, change the property, close LibreOffice. Sort both
files alphabetically and make a diff.

Kind regards
Regina

Jörg Schmidt schrieb:

> Hello,
>
> I will read and set the Option:
>
> Tools-Options-Load/Save-General-Save URLs relative to file system
>
> with a Macro.
>
>
> For Changing the MacroSecurityLevel i found this:
>
> Sub ChangeMacroSecurity
>     Dim sNodePath As String
>     Dim oCP, oCUA
>
>     sNodePath = "/org.openoffice.Office.Common/Security/Scripting"
>
>       Dim aProps(0) As New com.sun.star.beans.PropertyValue
>
>     oCP = CreateUnoService("com.sun.star.configuration.ConfigurationProvider" )
>     aProps(0).Name = "nodepath"
>     aProps(0).Value = sNodePath
>     oCUA = oCP.createInstanceWithArguments("com.sun.star.configuration.ConfigurationUpdateAccess", aProps )
>
>     oCUA.MacroSecurityLevel = 0
>     oCUA.commitChanges()
> End Sub
>
>
> But how should the line "sNodePath = "/org.openoffice.Office.Common/Security/Scripting"" look for my requirement?
>
> Unfortunately, when I use the XRAY-tool for inspect "oCUA" crashes OpenOffice.
>
>
>
> Greetings,
> Jörg
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: read and set the option "Save URLs relative to file system"

Jörg Schmidt-2
Hello,

Thank you Regina, Thank you Tsutomu.

The following works:

Sub einstellung_pruefen()
        'Speichereinstellung prüfen
        Dim sNodePath As String
    Dim oCP, oCUA
    sNodePath = "/org.openoffice.Office.Common/Save/URL"
        Dim aProps(0) As New com.sun.star.beans.PropertyValue
        oCP = CreateUnoService("com.sun.star.configuration.ConfigurationProvider")
        aProps(0).Name = "nodepath"
        aProps(0).Value = sNodePath
        oCUA = oCP.createInstanceWithArguments("com.sun.star.configuration.ConfigurationAccess", aProps)
    If oCUA.FileSystem = False OR oCUA.FileSystem = False Then
    config_warnung = CHR(13) & CHR(13) & "ACHTUNG:" & CHR(13) & "überprüfen Sie die Einstellungen " & _
    CHR(34) & "Extras-Optionen-Laden/Speichern-Allgemein --> URLs relativ..." & CHR(34)
    Else
    config_warnung = ""
    End If
End Sub



Greetings,
Jörg  


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]