LibreOffice Module xmerge (master) 1
ColumnRowInfo.java
Go to the documentation of this file.
1/*
2 * This file is part of the LibreOffice project.
3 *
4 * This Source Code Form is subject to the terms of the Mozilla Public
5 * License, v. 2.0. If a copy of the MPL was not distributed with this
6 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
7 *
8 * This file incorporates work covered by the following license notice:
9 *
10 * Licensed to the Apache Software Foundation (ASF) under one or more
11 * contributor license agreements. See the NOTICE file distributed
12 * with this work for additional information regarding copyright
13 * ownership. The ASF licenses this file to you under the Apache
14 * License, Version 2.0 (the "License"); you may not use this file
15 * except in compliance with the License. You may obtain a copy of
16 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
17 */
18
19package org.openoffice.xmerge.converter.xml.sxc;
20
27public class ColumnRowInfo {
28
29 final public static int COLUMN = 0x01;
30 final public static int ROW = 0x02;
31
32 final private static int DEFAULTROWSIZE_MIN = 250;
33 final private static int DEFAULTROWSIZE_MAX = 260;
34
35 private int type;
36 private int dimension = 0;
37 private int repeated = 1;
38 private boolean userDefined = true;
39 private Format fmt = new Format();
40
46 public ColumnRowInfo(int type) {
47
48 this.type = type;
49 }
50
58 private ColumnRowInfo(int dimension, int repeated, int type) {
59
60 this.dimension = dimension;
61 this.repeated = repeated;
62 this.type = type;
63 }
64
73 public ColumnRowInfo(int dimension, int repeated, int type, boolean userDefined) {
74
75 this(dimension, repeated, type);
76 this.userDefined = userDefined;
77 }
78
84 public void setFormat(Format fmt) {
85
86 this.fmt = fmt;
87 }
88
94 public Format getFormat() {
95
96 return fmt;
97 }
98
104 public int getSize() {
105
106 return dimension;
107 }
108
114 public void setSize(int dimension) {
115
116 this.dimension = dimension;
117 }
118
124 public int getRepeated() {
125
126 return repeated;
127 }
128
134 public void setRepeated(int repeated) {
135
136 this.repeated = repeated;
137 }
138
144 public boolean isRow() {
145
146 return type==ROW;
147 }
148
154 public boolean isColumn() {
155
156 return type==COLUMN;
157 }
158
164 public boolean isUserDefined() {
165
166 return userDefined;
167 }
168
174 public boolean isDefaultSize() {
175
176 return type==ROW &&
179 }
180}
This is a class to define a table-column structure.
ColumnRowInfo(int dimension, int repeated, int type)
Constructor for a ColumnRowInfo.
ColumnRowInfo(int dimension, int repeated, int type, boolean userDefined)
Constructor for a ColumnRowInfo that includes userDefined field.
boolean isRow()
Does this ColumnRowInfo represent a row?
int getRepeated()
Get the repeat count for this item.
int getSize()
Get the height (for rows) or width (for columns).
boolean isColumn()
Does this ColumnRowInfo represent a column?
boolean isDefaultSize()
Test if the row height is default.
void setRepeated(int repeated)
Set the repeat count for this item.
ColumnRowInfo(int type)
Constructor for a ColumnRowInfo.
void setSize(int dimension)
Set the height (for rows) or width (for columns).
boolean isUserDefined()
Test if the row height has been set manually.
This class specifies the format for a given spreadsheet cell.
Definition: Format.java:26