Difference between revisions of "Documentation/DevGuide/Spreadsheets/View Settings"

From Apache OpenOffice Wiki
Jump to: navigation, search
m (Robot: Changing Category:Spreadsheet Documents)
m (Robot: Changing Category:Documentation/Developers Guide/Spreadsheet Documents)
Line 20: Line 20:
[[Category:Documentation/Developers Guide/Spreadsheet Documents]]
[[Category:Documentation/Developer's Guide/Spreadsheet Documents]]

Revision as of 10:33, 5 June 2008

The properties from the com.sun.star.sheet.SpreadsheetViewSettings service are accessed through the com.sun.star.beans.XPropertySet interface controlling the appearance of the view. Most of the properties correspond to settings in the options dialog. The ShowObjects, ShowCharts and ShowDrawing properties take values of 0 for "show", 1 for "hide", and 2 for "placeholder display".

The following example changes the view to display green grid lines:

 // change the view to display green grid lines
 com.sun.star.beans.XPropertySet xProp = (com.sun.star.beans.XPropertySet)
     UnoRuntime.queryInterface(com.sun.star.beans.XPropertySet.class, xController);
 xProp.setPropertyValue("ShowGrid", new Boolean(true));
 xProp.setPropertyValue("GridColor", new Integer(0x00CC00));
Content on this page is licensed under the Public Documentation License (PDL).
Personal tools