Difference between revisions of "Documentation/DevGuide/Drawings/Other Drawing Specific View Settings"
OOoWikiBot (Talk | contribs) m (FINAL VERSION FOR L10N) |
|||
Line 27: | Line 27: | ||
Methods of <idl>com.sun.star.document.XViewDataSupplier</idl>: | Methods of <idl>com.sun.star.document.XViewDataSupplier</idl>: | ||
− | + | <syntaxhighlight lang="idl"> | |
com::sun::star::container::XIndexAccess getViewData() | com::sun::star::container::XIndexAccess getViewData() | ||
− | void setViewData( [in] com::sun::star::container::XIndexAccess aData) | + | void setViewData( [in] com::sun::star::container::XIndexAccess aData)</syntaxhighlight> |
To use <code>ViewData</code> properties, call <code>getViewData()</code> and receive a <code>com.sun.star.container.XIndexContainer</code>: | To use <code>ViewData</code> properties, call <code>getViewData()</code> and receive a <code>com.sun.star.container.XIndexContainer</code>: | ||
Methods of <code>XIndexContainer</code>: | Methods of <code>XIndexContainer</code>: | ||
− | + | <syntaxhighlight lang="idl"> | |
type getElementType() | type getElementType() | ||
boolean hasElements() | boolean hasElements() | ||
Line 41: | Line 41: | ||
void replaceByIndex( [in] long Index, any Element) | void replaceByIndex( [in] long Index, any Element) | ||
void insertByIndex( [in] long Index, any Element) | void insertByIndex( [in] long Index, any Element) | ||
− | void removeByIndex( [in] long Index) | + | void removeByIndex( [in] long Index)</syntaxhighlight> |
Use <code>getByIndex()</code> to iterate over the view data properties, find the required <idl>com.sun.star.beans.PropertyValue</idl> by checking the property names. If found, set the Value Member of the property value and put it back into the container using <code>replaceByIndex()</code>. Finally, apply the whole <code>ViewData</code> container to the document using <code>setViewData()</code>. | Use <code>getByIndex()</code> to iterate over the view data properties, find the required <idl>com.sun.star.beans.PropertyValue</idl> by checking the property names. If found, set the Value Member of the property value and put it back into the container using <code>replaceByIndex()</code>. Finally, apply the whole <code>ViewData</code> container to the document using <code>setViewData()</code>. |
Latest revision as of 15:06, 20 December 2020
- Setting the Current Page
- Zooming
- Other Drawing Specific View Settings
Drawings and presentations can be switched to certain view modes. This is done by the following drawing-specific controller properties of com.sun.star.drawing.DrawingDocumentDrawView:
Properties of com.sun.star.drawing.DrawingDocumentDrawView | |
---|---|
IsLayerMode | boolean - Switch to layer mode.
|
IsMasterPageMode | boolean - Switch to master page mode.
|
CurrentPage | com.sun.star.drawing.XDrawPage - This is the drawing page that is currently visible. |
Furthermore, there are many properties that can be changed through the XViewDataSupplier
interface of the document:
Methods of com.sun.star.document.XViewDataSupplier:
com::sun::star::container::XIndexAccess getViewData() void setViewData( [in] com::sun::star::container::XIndexAccess aData)
To use ViewData
properties, call getViewData()
and receive a com.sun.star.container.XIndexContainer
:
Methods of XIndexContainer
:
type getElementType() boolean hasElements() long getCount() any getByIndex( [in] long Index) void replaceByIndex( [in] long Index, any Element) void insertByIndex( [in] long Index, any Element) void removeByIndex( [in] long Index)
Use getByIndex()
to iterate over the view data properties, find the required com.sun.star.beans.PropertyValue by checking the property names. If found, set the Value Member of the property value and put it back into the container using replaceByIndex()
. Finally, apply the whole ViewData
container to the document using setViewData()
.
The method setViewData()
is currently not working. It can only be used with loadComponentFromURL()
.
Content on this page is licensed under the Public Documentation License (PDL). |