Skip to content

Commit

Permalink
Refs #3 - doc update.
Browse files Browse the repository at this point in the history
  • Loading branch information
cbmarcum committed Jul 2, 2020
1 parent 0d9f355 commit d4930ee
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 58 deletions.
37 changes: 8 additions & 29 deletions docs/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -264,52 +264,31 @@ _Integer getVertJustify()_ +
_void setVertJustify(Object value)_

*Without Extension*

[source,java]
[source,groovy]
----
xCellProps.setPropertyValue("VertJustify", com.sun.star.table.CellVertJustify.TOP)
----

*With Extension*

[source,java]
[source,groovy]
----
xCell.vertJustify = com.sun.star.table.CellVertJustify.TOP
----

=== Setting The Active Sheet

*Without Extension* but using SpreadsheetDocHelper.groovy included with the https://wiki.openoffice.org/wiki/OpenOffice_Gradle_Integration[OpenOffice Gradle Integration] aoo-client template.

[source,java]
----
XModel xSpreadsheetModel = sdHelper.getModel()
XController xSpreadsheetController = xSpreadsheetModel.getCurrentController()
XSpreadsheetView xSpreadsheetView = UnoRuntime.queryInterface(XSpreadsheetView.class, xSpreadsheetController)
xSpreadsheetView.setActiveSheet(xSpreadsheet)
----

*With Extension* and a SpreadsheetDocHelper.groovy method to get the XSpreadsheetView directly

[source,java]
----
XSpreadsheetView xSpreadsheetView = sdHelper.getSpreadsheetView()
xSpreadsheetView.setActiveSheet(xSpreadsheet)
----

=== Get Cell Ranges
=== Cell Ranges
The GUNO Extension adds a method XSpeadsheet to get the the cell ranges that match certain types. +
_XSheetCellRanges getCellRanges(Object type)_ +
where type is one or a combination of http://www.openoffice.org/api/docs/common/ref/com/sun/star/sheet/CellFlags.html[CellFlag constants].

*Without Extension*

[source,java]
[source,groovy]
----
XCellRangesQuery xCellQuery = UnoRuntime.queryInterface(XCellRangesQuery.class, xSpreadsheet)
XSheetCellRanges xFormulaCells = xCellQuery.queryContentCells((short)CellFlags.FORMULA)
----

*With Extension*

[source,java]
[source,groovy]
----
XSheetCellRanges xFormulaCells = xSpreadsheet.getCellRanges(CellFlags.FORMULA)
----
Expand Down
39 changes: 10 additions & 29 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -467,8 +467,7 @@ <h1>GUNO Extension Documentation</h1>
<li><a href="#truecell-contents">Cell Contents</a></li>
<li><a href="#truecell-style">Cell Style</a></li>
<li><a href="#truecellvertjustify-enum">CellVertJustify Enum</a></li>
<li><a href="#truesetting-the-active-sheet">Setting The Active Sheet</a></li>
<li><a href="#trueget-cell-ranges">Get Cell Ranges</a></li>
<li><a href="#truecell-ranges">Cell Ranges</a></li>
<li><a href="#trueuse-of-xenumerationaccess">Use of XEnumerationAccess</a></li>
<li><a href="#truerangecontainer">RangeContainer</a></li>
</ul>
Expand Down Expand Up @@ -843,49 +842,31 @@ <h3 id="truecellvertjustify-enum"><a class="anchor" href="#truecellvertjustify-e
</div>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code data-lang="java" class="language-java hljs">xCellProps.setPropertyValue("VertJustify", com.sun.star.table.CellVertJustify.TOP)</code></pre>
<pre class="highlightjs highlight"><code data-lang="groovy" class="language-groovy hljs">xCellProps.setPropertyValue("VertJustify", com.sun.star.table.CellVertJustify.TOP)</code></pre>
</div>
</div>
<div class="paragraph">
<p><strong>With Extension</strong></p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code data-lang="java" class="language-java hljs">xCell.vertJustify = com.sun.star.table.CellVertJustify.TOP</code></pre>
<pre class="highlightjs highlight"><code data-lang="groovy" class="language-groovy hljs">xCell.vertJustify = com.sun.star.table.CellVertJustify.TOP</code></pre>
</div>
</div>
</div>
<div class="sect2">
<h3 id="truesetting-the-active-sheet"><a class="anchor" href="#truesetting-the-active-sheet"></a>Setting The Active Sheet</h3>
<h3 id="truecell-ranges"><a class="anchor" href="#truecell-ranges"></a>Cell Ranges</h3>
<div class="paragraph">
<p><strong>Without Extension</strong> but using SpreadsheetDocHelper.groovy included with the <a href="https://wiki.openoffice.org/wiki/OpenOffice_Gradle_Integration">OpenOffice Gradle Integration</a> aoo-client template.</p>
<p>The GUNO Extension adds a method XSpeadsheet to get the the cell ranges that match certain types.<br>
<em>XSheetCellRanges getCellRanges(Object type)</em><br>
where type is one or a combination of <a href="http://www.openoffice.org/api/docs/common/ref/com/sun/star/sheet/CellFlags.html">CellFlag constants</a>.</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code data-lang="java" class="language-java hljs">XModel xSpreadsheetModel = sdHelper.getModel()
XController xSpreadsheetController = xSpreadsheetModel.getCurrentController()
XSpreadsheetView xSpreadsheetView = UnoRuntime.queryInterface(XSpreadsheetView.class, xSpreadsheetController)
xSpreadsheetView.setActiveSheet(xSpreadsheet)</code></pre>
</div>
</div>
<div class="paragraph">
<p><strong>With Extension</strong> and a SpreadsheetDocHelper.groovy method to get the XSpreadsheetView directly</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code data-lang="java" class="language-java hljs">XSpreadsheetView xSpreadsheetView = sdHelper.getSpreadsheetView()
xSpreadsheetView.setActiveSheet(xSpreadsheet)</code></pre>
</div>
</div>
</div>
<div class="sect2">
<h3 id="trueget-cell-ranges"><a class="anchor" href="#trueget-cell-ranges"></a>Get Cell Ranges</h3>
<div class="paragraph">
<p><strong>Without Extension</strong></p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code data-lang="java" class="language-java hljs">XCellRangesQuery xCellQuery = UnoRuntime.queryInterface(XCellRangesQuery.class, xSpreadsheet)
<pre class="highlightjs highlight"><code data-lang="groovy" class="language-groovy hljs">XCellRangesQuery xCellQuery = UnoRuntime.queryInterface(XCellRangesQuery.class, xSpreadsheet)
XSheetCellRanges xFormulaCells = xCellQuery.queryContentCells((short)CellFlags.FORMULA)</code></pre>
</div>
</div>
Expand All @@ -894,7 +875,7 @@ <h3 id="trueget-cell-ranges"><a class="anchor" href="#trueget-cell-ranges"></a>G
</div>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code data-lang="java" class="language-java hljs">XSheetCellRanges xFormulaCells = xSpreadsheet.getCellRanges(CellFlags.FORMULA)</code></pre>
<pre class="highlightjs highlight"><code data-lang="groovy" class="language-groovy hljs">XSheetCellRanges xFormulaCells = xSpreadsheet.getCellRanges(CellFlags.FORMULA)</code></pre>
</div>
</div>
</div>
Expand Down Expand Up @@ -977,7 +958,7 @@ <h3 id="truerangecontainer"><a class="anchor" href="#truerangecontainer"></a>Ran
</div>
<div id="footer">
<div id="footer-text">
Last updated 2020-07-02 11:45:56 -0400
Last updated 2020-07-02 18:34:39 -0400
</div>
</div>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.15.6/styles/github.min.css">
Expand Down

0 comments on commit d4930ee

Please sign in to comment.