Difference between revisions of "Documentation/DevGuide/Spreadsheets/View Settings"
From Apache OpenOffice Wiki
< Documentation | DevGuide
(Initial author Sun Microsystems, Inc.) |
m |
||
(5 intermediate revisions by 3 users not shown) | |||
Line 5: | Line 5: | ||
|NextPage=Documentation/DevGuide/Spreadsheets/Range Selection | |NextPage=Documentation/DevGuide/Spreadsheets/Range Selection | ||
}} | }} | ||
− | {{DISPLAYTITLE:View Settings}} | + | {{Documentation/DevGuideLanguages|Documentation/DevGuide/Spreadsheets/{{SUBPAGENAME}}}} |
+ | {{DISPLAYTITLE:View Settings}} | ||
<!--<idltopic>com.sun.star.sheet.SpreadsheetViewSettings</idltopic>--> | <!--<idltopic>com.sun.star.sheet.SpreadsheetViewSettings</idltopic>--> | ||
− | The properties from the <idl>com.sun.star.sheet.SpreadsheetViewSettings</idl> service are accessed through the <idl>com.sun.star.beans.XPropertySet</idl> interface controlling the appearance of the view. Most of the properties correspond to settings in the options dialog. The <code>ShowObjects</code>, <code>ShowCharts</code> and <code>ShowDrawing</code> properties take values of 0 for "show" | + | The properties from the <idl>com.sun.star.sheet.SpreadsheetViewSettings</idl> service are accessed through the <idl>com.sun.star.beans.XPropertySet</idl> interface controlling the appearance of the view. Most of the properties correspond to settings in the options dialog. The <code>ShowObjects</code>, <code>ShowCharts</code> and <code>ShowDrawing</code> properties take values of 0 for "show" and 1 for "hide", see <idl>com.sun.star.sheet.SpreadsheetViewObjectsMode</idl>. |
The following example changes the view to display green grid lines: | The following example changes the view to display green grid lines: | ||
<!--SOURCE:Spreadsheet/ViewSample.java]--> | <!--SOURCE:Spreadsheet/ViewSample.java]--> | ||
− | + | <syntaxhighlight lang="java"> | |
// change 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) | com.sun.star.beans.XPropertySet xProp = (com.sun.star.beans.XPropertySet) | ||
UnoRuntime.queryInterface(com.sun.star.beans.XPropertySet.class, xController); | UnoRuntime.queryInterface(com.sun.star.beans.XPropertySet.class, xController); | ||
xProp.setPropertyValue("ShowGrid", new Boolean(true)); | xProp.setPropertyValue("ShowGrid", new Boolean(true)); | ||
− | xProp.setPropertyValue("GridColor", new Integer(0x00CC00)); | + | xProp.setPropertyValue("GridColor", new Integer(0x00CC00));</syntaxhighlight> |
{{PDL1}} | {{PDL1}} | ||
− | [[Category: Spreadsheet Documents]] | + | |
+ | [[Category:Documentation/Developer's Guide/Spreadsheet Documents]] |
Latest revision as of 13:50, 20 December 2020
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" and 1 for "hide", see com.sun.star.sheet.SpreadsheetViewObjectsMode.
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). |