Quoting Frank Meies <[EMAIL PROTECTED]>:
On 06/23/08 13:48, Aaron Digulla wrote:
Quoting Frank Meies <[EMAIL PROTECTED]>:
Background: For an editor, I want to get rid of the gray area
around the text and reduce the page margins to 0 to give the
impression that the text fills the frame completely.
in "Web Layout" mode (View - Web Layout), the gray area is reduced to
0. Is this what you are looking for?
Ah! Excellent! Yeah, that's it. Can you tell me how to switch to
this mode via UNO/URE?
you have to set the "ShowOnlineLayout" flag of the ViewSettings:
thiscomponent.currentcontroller.viewsettings.ShowOnlineLayout = true
is the way to do this in Basic
Perfect! Thank you!!
This is the Java code:
XController controller = bean.getDocument ().getCurrentController ();
XViewSettingsSupplier settingsSupplier =
(XViewSettingsSupplier)UnoRuntime.queryInterface
(XViewSettingsSupplier.class, controller);
settingsSupplier.getViewSettings ().setPropertyValue
("ShowOnlineLayout", Boolean.TRUE);
(plus about 100 lines of exception handling ...;-))
Is there a way to access the context menu, too? I'd like to display my
own context menu. Maybe it would be enough to disable it completely; I
could then listen for the right mouse button and display my own menu.
Regards,
--
Aaron "Optimizer" Digulla a.k.a. Philmann Dark
"It's not the universe that's limited, it's our imagination.
Follow me and I'll show you something beyond the limits."
http://www.pdark.de/
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]