Hey Bernhard,
thank you for your explanation :-) Now I got it...
Bernard Marcelly schrieb:
> Message de Thomas Krumbein date 2010-08-08 20:35 :
>> the searched property is: PrinterIndependentLayout
>> I can set a value using basic as you mentioned - that works.
>> But: Even using xray I cannot find the property anywhere in the
>> document. Maybe you have an idea?
>
> This is a property of service com.sun.star.document.Settings that you can see
> with Xray and modify by program.
>
> Remember that this service has to be instantiated from the document
> (ThisComponent), it is not directly accessible.
>
> Although this property is documented as optional, it should be provided by
> official OpenOffice versions. I found it in various Writer documents, even in
> a
> sxw document not modified since year 2002, and in MS-Word documents opened by
> OOo 3.1.1.
>
> Dim ds As Object
> ds = ThisComponent.createInstance("com.sun.star.text.DocumentSettings")
> xray ds
>
> ds.PrinterIndependentLayout =
> com.sun.star.document.PrinterIndependentLayout.HIGH_RESOLUTION
>
> HIGH_RESOLUTION sets the flag in Writer > Compatibility > Use printer metrics
> for document formatting.
> DISABLED and LOW_RESOLUTION both reset the flag.
Where I have my errors: Because this flag is stored inside the document
(settings.xml), I was looking to get a direct access to this property.
I thought, creating a new service is the way to create a new property
but I wasn´t aware, that - loading a document - the presets will be
overwritten by the documents settings - and therefor visible, when
inspecting the "DocumentSettings -Service".
Thanks again,
Thomas
--
## Marketing deutschsprachiges Projekt
## http://de.openoffice.org - www.openoffice.org
## Vorstand OpenOffice.org Deutschland e.V.
## Mitglieder willkommen: www.OOoDeV.org
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]