From 4319114420c69d7789eaea329b354c86bf8ff642 Mon Sep 17 00:00:00 2001 From: RĂ¼diger Timm Date: Fri, 22 Oct 2004 12:52:59 +0000 Subject: INTEGRATION: CWS scriptingf6 (1.2.40); FILE MERGED 2004/07/23 09:55:21 dfoster 1.2.40.1: #i30606# Add descriptions to code in examples. --- .../javascript/ExportSheetsToHTML/exportsheetstohtml.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'scripting/examples') diff --git a/scripting/examples/javascript/ExportSheetsToHTML/exportsheetstohtml.js b/scripting/examples/javascript/ExportSheetsToHTML/exportsheetstohtml.js index bf72759a20ef..a66d08a185c6 100644 --- a/scripting/examples/javascript/ExportSheetsToHTML/exportsheetstohtml.js +++ b/scripting/examples/javascript/ExportSheetsToHTML/exportsheetstohtml.js @@ -16,13 +16,22 @@ importClass(Packages.com.sun.star.uno.Type); importClass(java.lang.System); +//get the document object from the scripting context oDoc = XSCRIPTCONTEXT.getDocument(); +//get the XSpreadsheetDocument interface from the document xSDoc = UnoRuntime.queryInterface(XSpreadsheetDocument, oDoc); +//get the XModel interface from the document xModel = UnoRuntime.queryInterface(XModel,oDoc); +//get the XIndexAccess interface used to access each sheet xSheetsIndexAccess = UnoRuntime.queryInterface(XIndexAccess, xSDoc.getSheets()); +//get the XStorable interface used to save the document xStorable = UnoRuntime.queryInterface(XStorable,xSDoc); +//get the XModifiable interface used to indicate if the document has been +//changed xModifiable = UnoRuntime.queryInterface(XModifiable,xSDoc); +//set up an array of PropertyValue objects used to save each sheet in the +//document storeProps = new Array;//PropertyValue[1]; storeProps[0] = new PropertyValue(); storeProps[0].Name = "FilterName"; @@ -47,8 +56,11 @@ for(var i=0;i