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.


Regards
  Bernard


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org
For additional commands, e-mail: dev-h...@api.openoffice.org

Reply via email to