Hi Andreas,

how can i set the orientation (via uno-call from java-client) for a
swriter-document. i can load and export (e.g. pdf) the document via uno.
now i must know how can i change some "document-properties", e.g. the
orientation.

the following macro switches between Portrait and Landscape

xDoc = ThisComponent    

xStyleFamiliesSupplier = xDoc.StyleFamilies
xStyleFamily = xStyleFamiliesSupplier.getByName("PageStyles")
xStyle = xStyleFamily.getByName("Default")

oldHeight = xStyle.Height
oldWidth = xStyle.Width
xStyle.IsLandscape = not(xStyle.IsLandscape)
xStyle.Height = oldWidth
xStyle.Width=oldHeight

Hope that helps

Regards

Stephan

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to