Hi Camille,
CamilleM wrote (24-10-2008 22:44)
In order to give a quick pragmatic solution to Issue 42282
(http://www.openoffice.org/issues/show_bug.cgi?id=42282) I'd like to
write a small extension that resets the positions of the windows.
Does anyone know where I could find doc that would tell me how to access
the values stored in \user\registry\data\org\openoffice\Office
\Views.xcu ?
I copy/paste a piece of code with lot of comments, but it shows how to
access such data in the OOo registry.
I hope it helps,
Cor
= = =
Sub change_config
' does not work on currently openend document
' see [EMAIL PROTECTED] "changing the OOo-Configuration via API has
no effect during runtime",4-11-2006 0:11
Dim oCP, oCUA
Dim oTextNode
Dim aProps(0) As New com.sun.star.beans.PropertyValue
oCP = GetProcessServiceManager().createInstanceWithContext( _
"com.sun.star.configuration.ConfigurationProvider",
GetDefaultContext() )
' aProps(0).Name = "nodepath"
' aProps(0).Value = "/org.openoffice.Setup/Office/Factories"
'
' registry\data\org\openoffice\Setup.xcu
' <node oor:name="Office">
' <node oor:name="Factories">
'
' oCUA = oCP.createInstanceWithArguments( _
' "com.sun.star.configuration.ConfigurationUpdateAccess", aProps )
'
' If oCUA.hasByName("com.sun.star.text.TextDocument") Then
' oTextNode = oCUA.getByName( "com.sun.star.text.TextDocument" )
' oTextNode.setPropertyValue("ooSetupFactoryDefaultFilter", "writer8")
'
' <node oor:name="com.sun.star.text.TextDocument">
' <prop oor:name="ooSetupFactoryDefaultFilter" oor:type="xs:string">
' <value>writer8</value>
' </prop>
aProps(0).Name = "nodepath"
aProps(0).Value = "/org.openoffice.Office.Writer/Content"
' registry\data\org\openoffice\Office\Writer.xcu
' <node oor:name="Content">
oCUA = oCP.createInstanceWithArguments( _
"com.sun.star.configuration.ConfigurationUpdateAccess", aProps )
If oCUA.hasByName("NonprintingCharacter") Then
oTextNode = oCUA.getByName( "NonprintingCharacter" )
' <node oor:name="NonprintingCharacter">
oTextNode.setPropertyValue("HiddenParagraph", "FALSE")
' <prop oor:name="HiddenCharacter" oor:type="xs:boolean">
' <value>false</value>
' </prop>
' <prop oor:name="HiddenText" oor:type="xs:boolean">
' <value>false</value>
' </prop>
' <prop oor:name="HiddenParagraph" oor:type="xs:boolean">
' <value>true</value>
' </prop>
oCUA.commitChanges()
' oCP.flush()
End If
End Sub
= = =
--
"2008: The Year of 3"
= www.nieuwsteoffice.nl =
Cor Nouws - nl.OpenOffice.org marketing contact
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]