Documentation/DevGuide/Drawing Documents and Presentation Documents

Draw and Impress are vector-oriented applications with the ability to create drawings and presentations. The drawing capabilities of Draw and Impress are identical. Both programs support a number of different shape types, such as rectangle, text, curve, or graphic shapes, that can be edited and arranged in various ways. Impress offers a presentation functionality where Draw does not. Impress is the ideal application to create and show presentations. It supports special presentation features, such as an enhanced page structure, presentation objects, and many slide transition and object effects. Draw is especially adapted for printed or standalone graphics, whereas Impress is optimized to fit screen dimensions and offers effects for business presentations.

The following diagrams show the document structure of Draw and Impress Documents.

In contrast to text documents and spreadsheet documents, the main content of drawing and presentation documents are their draw pages. Therefore the illustrations show the draw page container as integral part of the drawing and presentation document model. The drawing elements on the draw pages have to be created by the document service manager and are added to the draw pages afterwards.

Note the master pages and the layer manager, which are specific to drawings and presentations. Like for texts and spreadsheets, a controller is used to present the drawing in the GUI and services for styles and layout are available to handle overall document features such as styles.



In addition to drawing documents, a presentation document has special presentation aspects, which are shown on the lower left of the illustration below. There is a presentation supplier to obtain a presentation object, which is used to start and stop presentations, it is possible to edit and run custom presentations and the page layout for presentation handouts is accessible through a handout master supplier.



Example: Creating a Simple Organizational Chart
The following example creates a simple organizational chart with two levels. It consists of five rectangle shapes and four connectors that connect the boxes on the second level with the root box on the first level.



The method  that is used in the example connects to the office. The First Steps discussed this method. First an empty drawing document is loaded and retrieves the draw page object of slide number 1 to find the page dimensions. Then the organigram data is prepared and the shape sizes are calculated. The shapes are added in a for loop that iterates over the organigram data, and connectors are added for all shapes on the second level of the organigram.

Creating and Loading Drawing Documents
If a document in LibreOffice is required, begin by getting the com.sun.star.frame.Desktop service from the service manager. The desktop handles all document components in LibreOffice among other things. It is discussed thoroughly in the chapter Office Development. Office documents are often called components because they support the com.sun.star.lang.XComponent interface. An  is a UNO object that can be disposed explicitly and broadcast an event to other UNO objects when this happens.

The Desktop loads new and existing components from a URL. The desktop has a com.sun.star.frame.XComponentLoader interface that has one single method to load and instantiate components from a URL into a frame:

The parameters in our context are the URL that describes the resource to be loaded, and the load arguments. For the target frame pass in " " and set the search flags to 0. In most cases, you will not want to reuse an existing frame.

The URL can be a  URL, an   URL, an   URL or a   URL. The correct URL format is located in the load URL box at the function bar of LibreOffice. For new Draw documents, a special URL scheme is used. The scheme is "private:", followed by "factory" as the hostname and the resource is "sdraw" for LibreOffice Draw documents. Thus, for a new Draw document, use " ".

The load arguments are described in com.sun.star.document.MediaDescriptor. The properties  and   are boolean values and used for programming. If  is true, the loader creates a new untitled document from the given URL. If it is false, template files are loaded for editing. If  is , the document is loaded in the background. This is useful to generate a document in the background without letting the user observe what is happening. For instance, use it to generate a document and print it out without previewing. Refer to Office Development or other available options.

The introductory example shows how to load a drawing document. This snippet loads a new drawing document in hidden mode:

Saving Drawing Documents
The normal File – Save command for drawing documents can only store the current document in the native LibreOffice Draw format and its predecessors. There are other formats that can be stored through the File – Export option. This is mirrored in the API. Exporting in the current version of LibreOffice Draw and Impress is a different procedure than storing.

Storing
Documents are storable through their interface com.sun.star.frame.XStorable. The Office Development discusses this in detail. An  implements these operations:

The method names should be evident. The method  is the exact representation of File - Save As, that is, it changes the current document location. In contrast,  stores a copy to a new location, but leaves the current document URL untouched. There are also store arguments. A filter name can be passed that tells LibreOffice to use older StarOffice Draw file formats. Exporting is a different matter as shown below. The property needed is FilterName which is a string argument that takes filter names defined in the configuration file:

\share\config\registry\instance\org\openoffice\Office\TypeDetection.xml

In TypeDetection.xml, find  elements, their   attribute contains the required strings for. The correct filter name for StarDraw 5.x files is "StarDraw 5.0". The following is the element in TypeDetection.xml that describes the StarDraw 5.0 document filter:



The following method stores a document using this filter:

If an empty array of  structs is passed, the native .odg format of LibreOffice is used.

Exporting
Exporting is not a feature of drawing documents. There is a separate service available from the global service manager for exporting, com.sun.star.drawing.GraphicExportFilter. It supports three interfaces: com.sun.star.document.XFilter, com.sun.star.document.XExporter and com.sun.star.document.XMimeTypeInfo.



Exporting is a simple process. After getting a  from the , use its   interface to inform the filter which draw page, shape or shape collection to export.

Method of :

The method name  may be confusing. Actually, the method would allow exporting entire documents, however, it is only possible to export draw pages, single shapes or shape collections from a drawing document. Since these objects support the XComponent interface, the method specification allows maximum flexibility.

Next, run the method  at the   interface. To interrupt the exporting process, call  on the same interface.

Methods of :

Filter Options
The method  takes a sequence of   structs describing the filter parameters. The following properties from the com.sun.star.document.MediaDescriptor are supported:

The following example exports a draw page  from a given document  :

Printer and Print Job Settings
Printing is a common office functionality. Refer to Chapter Office Development for additional information. The Draw document implements the com.sun.star.view.XPrintable interface for printing. It consists of three methods:

To print to the standard printer without settings, use the snippet below with a given document :

There are two groups of properties involved in general printing. The first one is used with  and , and controls the printer, the second one is passed to   and controls the print job.

The method  returns a sequence of   structs describing the printer containing the properties specified in the service com.sun.star.view.PrinterDescriptor. It comprises the following properties:

The  offer the following choices for a print job:

The following method uses  and   to print to a specific printer, and preselect the pages to print:

The following method uses both,  and , to print to a specific printer and preselect the pages to print:

In Draw documents, one slide is printed as one page on the printer by default. In the example above, slide one through four and slide seven are printed.

Special Print Settings
The printed drawing view (drawings, notes, handout pages, outline), the print quality (color, grayscale), the page options (tile, fit to page, brochure, paper tray) and additional options (page name, date, time, hidden pages) can all be controlled. Settings describes how these settings are used.

Document Structure


Draw documents maintain their drawing content on draw pages, master pages and layers. If a new draw document is opened, it contains one slide that corresponds to a com.sun.star.drawing.DrawPage service. Switching to Master View brings up the master page handled by the service com.sun.star.drawing.MasterPage. The Layer View allows access to layers to structure your drawings. These layers can be controlled through com.sun.star.drawing.Layer and com.sun.star.drawing.LayerManager.

Page Handling
Draw and Impress documents supply their pages (slides) through the interface com.sun.star.drawing.XDrawPagesSupplier. The method com.sun.star.drawing.XDrawPagesSupplier:getDrawPages returns a container of draw pages with a com.sun.star.drawing.XDrawPages interface that is derived from com.sun.star.container.XIndexAccess. That is,  allows accessing, inserting and removing pages of a drawing document:

The example below demonstrates how to access and create draw and master pages. Layers will be described later.

Each draw page always has one master page. The interface com.sun.star.drawing.XMasterPageTarget offers methods to get and set the master page that is correlated to a draw page.

It is possible to copy pages using the interface [IDL:com.sun.star.drawing.XDrawPageDuplicator] of drawing or presentation documents.

Methods of com.sun.star.drawing.XDrawPageDuplicator :

Pass a draw page reference to the method. It appends a new draw page at the end of the page list, using the default naming scheme for pages, "slide n".

Page Partitioning
All units and dimensions are measured in 1/100th of a millimeter. The coordinates are increasing from left to right, and from top to bottom. The upper-left position of a page is (0, 0).

The page size, margins and orientation can be determined using the following properties of a draw page (generic draw page):

Shapes
Drawings consist of shapes on draw pages. Shapes are drawing elements, such as rectangles, circles, polygons, and lines. To create a drawing, get a shape by its service name at the  of a drawing document and add it to the appropriate.

The code below demonstrates how to create shapes. It consists of a static helper method located in the class  and will be used throughout this chapter to create shapes. The parameter  must be a reference to a loaded drawing document. The,  ,   and   are the desired position and size, and   expects a service name for the shape, such as " ". The method does not actually insert the shape into a page. It instantiates it and returns the instance to the caller.



The size and position of a shape can be set before adding a shape to a page. After adding the shape, change the shape properties through com.sun.star.beans.XPropertySet.

The previously declared method will be used to create a simple rectangle shape with a size of 10 cm x 5 cm that is positioned in the upper-left, and inserted into a drawing page.



The UML diagram in the illustration below describes all services that are included by the com.sun.star.drawing.RectangleShape service and provides an overview of properties that can be used with such a simple shape.



Shape Types


The following table lists all shapes supported in Draw and Impress documents. They come from the com.sun.star.drawing. Each shape is based on com.sun.star.drawing.Shape. Additionally, there are five services in the module com.sun.star.drawing that most of the shapes have in common:

com.sun.star.drawing.Text, com.sun.star.drawing.LineProperties , com.sun.star.drawing.FillProperties and com.sun.star.drawing.ShadowProperties handle shape formatting, whereas com.sun.star.drawing.RotationDescriptor controls rotation and shearing. The section General Drawing Properties below discusses shape formatting in more detail. Refer to the section Shape Operations for information on rotation and shearing.

An x denotes which of these services are supported by each shape. The rightmost column shows the services, interfaces and properties that are specific for the various shapes.

Bezier Shapes
Draw supports three different kinds of Bezier curves:,   and. They are all controlled by com.sun.star.drawing.PolyPolygonBezierDescriptor which is made up of the following properties:

The next Java example will demonstrate how to create a  that looks like the following picture.

Shape Operations
You can modify shapes in many different ways:


 * Moving and Scaling
 * Rotating and Shearing
 * Transforming
 * Ordering
 * Grouping, Combining and Binding
 * General Drawing Properties
 * Glue Points and Connectors
 * Layer Handling

Moving and Scaling
Moving and scaling of a shape can be done by using the corresponding methods,  ,   and   of the com.sun.star.drawing.XShape interface:

and  are IDL structs. In Java, these structs are mapped to classes with constructors that take values for the struct members. Therefore, when new is used to instantiate these classes, the coordinates and dimensions are passed to initialize the class members X, Y, Width and Height.

Rotating and Shearing
Most shapes, except OLE and group objects, can be rotated and sheared. All of these objects include the com.sun.star.drawing.RotationDescriptor service that has the properties  and.

Setting the com.sun.star.drawing.RotationDescriptor rotates or shears a shape:



The following example shows how a shape can be rotated by 25 degrees counterclockwise:

Transforming
Changing the size, rotation and shearing of an object can be done by using the transformation mechanism provided by LibreOffice. The matrix of our API is a standard homogenous 3x3 matrix that may be used together with the java.awt.geom.AffineTransform class from Java. The transformation received describes the actual values of the transformations as a linear combination of the single matrices. The basic object without transformation has a size of (1, 1) and a position of (0, 0), and is not rotated or sheared. Thus, to transform an object get its matrix and multiply from the left side to influence the current appearance. To set the whole transformation directly, build a combined matrix of the single values mentioned above and apply it to the object.

Ordering
The property  of the com.sun.star.drawing.Shape service defines the order a shape is drawn. That is, if there are many shapes on a page, the shape that has the lowest  value is drawn first, and the shape that has the highest   is drawn last. By using this property it is possible to bring an object to the back or front of a page. It is also possible to switch the order of two shapes as demonstrated in the following example:

Grouping, Combining and Binding
The  plays an important role for the handling of multiple shapes. It has three interfaces for this purpose. Its interface com.sun.star.drawing.XShapeGrouper is used to create a group shape from a  and ungroup existing groups.

The example below creates a group using the com.sun.star.drawing.XShapeGrouper interface. For this purpose, the shapes that are to be grouped have to be added to a com.sun.star.drawing.ShapeCollection that is created by the com.sun.star.lang.XMultiServiceFactory of the global service manager. It is a container of shapes that is accessed using the interface com.sun.star.drawing.XShapes. The following example accesses the  interface of the   to locate two shapes on the , and uses the   interface of the   to add these shapes to the. Finally, it employs the  interface of the   to move the shapes from the   into a new.

The service com.sun.star.drawing.GroupShape includes com.sun.star.drawing.Shape and supports two additional interfaces:


 * com.sun.star.drawing.XShapes is used to access the shapes in the group.
 * com.sun.star.drawing.XShapeGroup handles access to the group.

The interface  inherits from com.sun.star.container.XIndexAccess, and introduces   and. It contains the following methods:

Methods of com.sun.star.drawing.XShapeGroup :

It is also possible to create GroupShapes directly without using the  interface. The following code demonstrates the creation of a com.sun.star.drawing.GroupShape that takes up three other shapes.

The interface com.sun.star.drawing.XShapeCombiner combines shapes and is equivalent to Modify - Combine in the user interface.

The draw page interface com.sun.star.drawing.XShapeBinder draws a connection line between the ending point of a line shape (or curve) to the starting point of another line shape (or curve), merging the connected lines into a single shape object. This function corresponds to Modify - Connect in the user interface. It works for area shapes as well, but the connection line usually can not resolve them.

General Drawing Properties
This chapter introduces the relevant drawing attributes provided by services, such as com.sun.star.drawing.LineProperties, com.sun.star.drawing.FillProperties and com.sun.star.drawing.TextProperties. The service is described by listing all its properties, followed by an example that uses and explains some of the properties. Each of the following Java examples assumes an already existing valid shape  that has already been inserted into the page.

Colors are given in Hex ARGB format, a four-byte value containing the alpha, red, green and blue components of a color in the format 0xAARRGGBB. The leading component can be omitted if it is zero. The hex format 0xFF0000 is light red, 0xFF00 is green, and 0xFF is blue.

Angles must be given in steps of 1/100th of a degree.

Measures, such as line widths and lengths are given in 100th of a millimeter.

Properties provided by the service :

The service com.sun.star.drawing.TextProperties includes com.sun.star.style.ParagraphProperties and com.sun.star.style.CharacterProperties. Since these services contain optional properties, the properties actually supported by drawing shapes are listed. Refer to the API reference or explanations or Formatting.

The service com.sun.star.drawing.TextProperties includes com.sun.star.style.ParagraphProperties and com.sun.star.style.CharacterProperties. Since these services contain many optional properties, we list the properties actually supported by drawing shapes. Please look up the explanations in the API reference or in Formatting.

There are Asian counterparts for a number of character properties.

There is also a  flavor of the same properties:

Paragraphs in drawing text support a selection of com.sun.star.style.ParagraphProperties :

And of com.sun.star.style.ParagraphPropertiesAsian :

The next example introduces a method that appends single text portions to a shape. It returns the XPropertySet interface of the text range that has been added.

Using the previous method, the next example creates a rectangle shape that has a border of 2.5 cm with the text of two paragraphs is stretched by using the com.sun.star.drawing.TextFitToSizeType property. The text of the first paragraph is then colored green, and the second red. The Editing Text provides further details of handling text.

Many shapes cast shadows. The  controls how this shadow looks:

Glue Points and Connectors
By default, there are four glue points available that are used within the properties  and. If a connector connects to the top, bottom, left or right of a shape, a new glue point is not created. The four directions are declared in the following example.

The first example demonstrates how to create a com.sun.star.drawing.ConnectorShape and connect it to two other shapes using the glue point index property.

The next example demonstrates the usage of user defined glue points.

Layer Handling
In Draw and Impress, each shape is associated to exactly one layer. The layer has properties that specify if connected shapes are visible, printable or editable.

The service com.sun.star.drawing.DrawingDocument implements the interface com.sun.star.drawing.XLayerSupplier that gives access to the com.sun.star.drawing.XLayerManager interface. The com.sun.star.drawing.XLayerManager interface is used to create and edit a layer, and is used to attach a layer to a shape.

Inserting Files
Currently it is not possible to insert slides from a drawing or presentation into a drawing document through API. To accomplish this, use the Insert – File command from the menu.

Navigating
Initially, shapes in a document can only be accessed by their index. The only method to get more information about a shape on the page is to test for the shape type, so it is impossible to identify a particular shape. However, after a shape is inserted, you can name it in the user interface or through the shape interface com.sun.star.container.XNamed, and identify the shape by its name after retrieving it by index. Shapes cannot be accessed by their names.

Searching and replacing text in Drawing documents retrieves the shapes that contain the text that is searched for. For more information, refer to Search and Replace.

Creating and Loading Presentation Documents
The URL that must be used with  for new presentation documents is " ".

To avoid the initial dialog in new presentation documents, set the property  defined in com.sun.star.document.MediaDescriptor to true. This property has to be used with the sequence of  structs that is passed to.

The snippet below loads a new presentation document in silent mode:

Printing Presentation Documents
Presentation documents have the following specific properties to define if the notes and outline view should be printed:

Settings describes how these settings are used.

Working with Presentation Documents
The structure of Impress documents is enhanced by a handout page per document, one notes page per draw page, and one notes master page for each master page. This means that the creation of normal draw and draw master pages automatically create corresponding notes and notes master pages. Due to this fact there are no interfaces for creation or deletion of notes or notes master pages.

The following UML diagram describes the whole page structure of Impress. The horizontal dotted line illustrates the general page structure lying beneath the dotted line, and the enhanced page structure of Impress lying above.



Calling  at the com.sun.star.drawing.XDrawPagesSupplier interface of a presentation document retrieves a collection of com.sun.star.presentation.DrawPage instances with presentation specific properties.

The following two examples demonstrate how to access the notes pages and the handout page of an Impress document:

The notes master page that corresponds to a notes page can be accessed by the com.sun.star.presentation.XPresentation interface of the master page.

Presentation Settings
Impress documents contain a Presentation service that controls a running presentation. This com.sun.star.presentation.Presentation service can be accessed through the com.sun.star.presentation.XPresentationSupplier interface through the method:

The method  returns a com.sun.star.presentation.Presentation service. It contains properties for presentation settings and the interface com.sun.star.presentation.XPresentation.

The presentation settings define the slide range, which custom show is used, and how the presentation is executed. These settings are provided as properties of the service com.sun.star.presentation.Presentation. This service also exports the com.sun.star.presentation.XPresentation interface that starts and ends a presentation.

The properties,   and   are currently not documented in the API reference.

The next example demonstrates how to start a presentation that is automatically repeated and plays in full-screen mode by modifying the presentation settings.

Custom Slide Show
Custom presentations are available at the com.sun.star.presentation.XCustomPresentationSupplier interface of the presentation document. It contains the method:

The method  returns a com.sun.star.presentation.CustomPresentationAccess service that consists of the interfaces com.sun.star.container.XNameContainer and com.sun.star.lang.XSingleServiceFactory. The standard API interface com.sun.star.container.XNameContainer derived from com.sun.star.container.XNameContainer obtains existing Custom Presentations and to add new custom presentations by name. It introduces the methods:

To add a new, create it using   at the   interface of the.

Methods of com.sun.star.lang.XSingleServiceFactory :

The  is now created. Its content consists of a com.sun.star.presentation.CustomPresentation. From the API, it is a named container of selected presentation draw pages. Draw pages can be added to a custom presentation or removed using its interface com.sun.star.container.XIndexContainer. In addition to the methods of an, this standard API interface supports the following operations:

Methods introduced by :

The name of a  is read and written using the interface com.sun.star.container.XNamed :

Methods of :

A custom show is a collection of slides in a user-defined order that can be executed as a presentation. It is also possible to use a slide twice or skip slides. For instance, it is possible to create a short version of a presentation and a long version within the same document. The number of custom shows is unlimited.

The next example demonstrates how to create two custom shows and set one of them as an active presentation.

Presentation Effects
There are two kinds of presentation effects, the fading of one page to another, and the animation of objects and texts within a slideshow.

Slide Transition
In Impress, each page has its own slide transition that can be composed by the properties of the service com.sun.star.presentation.DrawPage.

Setting the following properties enables slide transition:

The next table contains all available com.sun.star.presentation.FadeEffect enum values:

The following Java example shows how to set slide transition effects that are applied to the first page.

Animations and Interactions
In a Presentation, each shape of the draw and master page provides the com.sun.star.presentation.Shape service with a number of properties that describe the manner the shape is displayed or acting in a presentation.

There are two kinds of shape effects. The first kind of effects are visual changes, such as animations and dimming effects. The second kind of effects are  actions. All of these effects are controlled by the properties of a presentation shape:

The next table contains all available com.sun.star.presentation.AnimationEffect enums.

The next example demonstrates how to set object effects and object interaction.

The example use a method  from the   class. It takes the drawing document, the  interface of the   the shape is to be inserted in, the position and size of the new shape, and the service name of the required shape. It delegates shape creation to the helper method  and inserts the new shape into the given   container. Finally, it retrieves the  interface of the inserted shape and returns it to the caller.

The following example shows animations and  actions for four shapes. On click, the first shape builds up in a wavy line from the bottom and is dimmed (painted) red afterwards. The second shape is hidden on click. Clicking the third shape makes the presentation jump to the first page, whereas clicking the fourth shape jumps to a bookmark. The bookmark contains the name of the second slide "page - two".

Graphics Styles
Graphics Styles are available in drawing and presentation documents, and they control the formatting of the drawing shapes in drawing or presentation slides. In contrast to styles in text documents, the style property of a shape is not a string, but a com.sun.star.style.XStyle. To work with an existing graphics style, get the styles container from the com.sun.star.style.XStyleFamiliesSupplier and use its com.sun.star.container.XNameAccess to retrieve the style family named "graphics". The programmatic names of the style families in graphics are:

There are two methods to change an applied shape style:


 * Retrieve the style from the style family "graphics" by its programmatic name, change the properties, and put back into the style family using  at the style family's com.sun.star.container.XNameContainer interface.
 * Apply an existing style object that is not applied to a shape by setting the shape's style property.

New styles can be created, as well. For this purpose, use  at the document factory of a drawing document and ask for a " " service. Set the properties of the new style, as required. Append the new style to the style family "graphics" using  at its   interface. Now use the  property of existing shapes to put the new style to work.

You can either change a currently applied shape style by retrieving it from the style family "graphics" by its programmatic name, changing its properties and putting it back into the style family using  at the style family's com.sun.star.container.XNameContainer interface. Or you can apply an existing, but currently unapplied style object to a shape by setting the shape's Style property accordingly.

You can create new styles as well. For this purpose, use  at the document factory of a drawing document and ask for a "com.sun.star.style.Style" service. Set the properties of the new style as needed. Afterwards append the new style to the style family "graphics" using  at its   interface. Now you can use the  property of existing shapes in order to put your new style to work.

Styles created by the document factory support the properties of the following services:


 * com.sun.star.drawing.FillProperties
 * com.sun.star.drawing.LineProperties
 * com.sun.star.drawing.ShadowProperties
 * com.sun.star.drawing.ConnectorProperties
 * com.sun.star.drawing.MeasureProperties
 * com.sun.star.style.ParagraphProperties
 * com.sun.star.style.CharacterProperties
 * com.sun.star.drawing.TextProperties

Presentation Styles
Presentation styles are only available in presentation documents and control the formatting of the following parts of a presentation:


 * title text
 * subtitle text
 * outline text
 * background
 * background shapes
 * notes text

The corresponding style family has the programmatic name "Default" and is available at the com.sun.star.style.XStyleFamiliesSupplier of a presentation document.

Existing presentation styles can only be altered. New styles can not be created and a different presentation style cannot be applied other than the current one. The following example works with presentation styles.

You can only alter existing presentation styles. You cannot create new styles and you cannot apply a different presentation style other than the current one. The following example works with presentation styles:

Settings
To use the global document settings, the document service factory must be asked for a com.sun.star.document.Settings service using the method  at its com.sun.star.lang.XMultiServiceFactory interface. This service supports com.sun.star.beans.PropertySet and acts upon the current document by setting its properties.

The services com.sun.star.drawing.DocumentSettings and com.sun.star.presentation.DocumentSettings provide the following properties additionally to the global document settings.

Page Formatting
As opposed to text and spreadsheet documents, page formatting in drawings and presentations is not done through styles. Rather, hard format the following properties:

Drawing and Presentation Document Controller
The controller is available at the  interface of the document model:

Setting the Current Page, Using the Selection
The controller is a com.sun.star.drawing.DrawingDocumentDrawView that supports the following interfaces:


 * com.sun.star.drawing.XDrawView
 * com.sun.star.beans.XPropertySet
 * com.sun.star.frame.XController
 * com.sun.star.view.XSelectionSupplier

The following methods of com.sun.star.view.XSelectionSupplier control the current selection in the GUI:

With these methods of com.sun.star.drawing.XDrawView, the visible page is set in the GUI:

In addition to, it supports the following interfaces. For details about these interfaces, refer to Office Development.


 * com.sun.star.task.XStatusIndicatorSupplier
 * com.sun.star.ui.XContextMenuInterception
 * com.sun.star.frame.XDispatchProvider

Zooming
Zooming can be set by certain drawing-specific controller properties of the com.sun.star.drawing.DrawingDocumentDrawView service:

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 :

Furthermore, there are many properties that can be changed through the  interface of the document:

Methods of com.sun.star.document.XViewDataSupplier :

To use  properties, call   and receive a  :

Methods of :

Use  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. Finally, apply the whole  container to the document using.

The method  is currently not working. It can only be used with.