Le 04/01/2015 18:49, [email protected] a écrit :
Hi,

is there a function to change row styles, e.g., set the row-height?

I'm currently using the following patch on top of jOpenDocument-1.4rc2
in order to work on RowStyle rowStyle =
sheet.getRow(index).getPrivateStyle()
or call sheet.getRow(index).setStyleName(rowStyleName).

diff --git a/src/org/jopendocument/dom/spreadsheet/Table.java
b/src/org/jopendocument/dom/spreadsheet/Table.java
--- a/src/org/jopendocument/dom/spreadsheet/Table.java
+++ b/src/org/jopendocument/dom/spreadsheet/Table.java
@@ -635,7 +635,7 @@ public class Table<D extends ODDocument> extends
TableCalcNode<TableStyle, D> {

      // *** get count

-    final Row<D> getRow(int index) {
+    public final Row<D> getRow(int index) {
          return this.rows.get(index);
      }

I don't see why org.jopendocument.dom.spreadsheet.Table.getRow(int)
should not be part of the public API just as
org.jopendocument.dom.spreadsheet.Table.getColumn(int) is.

Hi,

It's because, as opposed to the columns, the rows are physical (XML) rows not logical rows. One Row may represent many logical rows, so changing the style of one instance can change the style of many logical rows. If you want to change the style of one row, you should instead call getMutableRow(). For now, I've added getRowStyle(), so we can at least get the height of a row.

Cheers,
Sylvain

--

--- You received this message because you are subscribed to the Google Groups "jOpenDocument" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to