19package org.openoffice.xmerge.converter.xml.sxc;
21import org.w3c.dom.NamedNodeMap;
22import org.w3c.dom.NodeList;
23import org.w3c.dom.Node;
24import org.w3c.dom.Element;
49 final private static int SPLIT = 0x01;
50 final private static int FREEZE = 0x02;
220 private void addConfigItem(Node root, String attribute, String type, String value) {
228 root.appendChild(configItem);
249 addConfigItem(configItemMapEntry,
"HorizontalSplitMode",
"short", splitMode);
255 addConfigItem(configItemMapEntry,
"VerticalSplitMode",
"short", splitMode);
261 addConfigItem(configItemMapEntry,
"PositionLeft",
"int",
"0");
263 addConfigItem(configItemMapEntry,
"PositionTop",
"int",
"0");
265 root.appendChild(configItemMapEntry);
276 if(
name.equals(
"CursorPositionX")) {
278 }
else if(
name.equals(
"CursorPositionY")) {
281 }
else if(
name.equals(
"HorizontalSplitPosition")) {
283 }
else if(
name.equals(
"VerticalSplitPosition")) {
285 }
else if(
name.equals(
"ActiveSplitRange")) {
288 }
else if(
name.equals(
"PositionRight")) {
290 }
else if(
name.equals(
"PositionBottom")) {
293 }
else if(
name.equals(
"HorizontalSplitMode")) {
295 }
else if(
name.equals(
"VerticalSplitMode")) {
307 NamedNodeMap sheetAtt = root.getAttributes();
311 sheetName = sheetNameNode.getNodeValue();
313 if (root.hasChildNodes()) {
315 NodeList nodeList = root.getChildNodes();
316 int len = nodeList.getLength();
317 for (
int i = 0;
i < len;
i++) {
318 Node child = nodeList.item(
i);
320 if (child.getNodeType() == Node.ELEMENT_NODE) {
321 String nodeName = child.getNodeName();
325 NamedNodeMap cellAtt = child.getAttributes();
327 Node configNameNode =
331 NodeList nodeList2 = child.getChildNodes();
332 int len2 = nodeList2.getLength();
334 for (
int j = 0; j < len2; j++) {
335 Node child2 = nodeList2.item(j);
336 if (child2.getNodeType() == Node.TEXT_NODE) {
337 s = child2.getNodeValue();
This is a class representing the different attributes for a worksheet contained in settings....
String getSheetName()
Gets the name of the worksheet these Settings apply to.
org.w3c.dom.Document settings
A w3c Document.
SheetSettings(Node root)
Constructor that takes a Node to build a SheetSettings.
void addAttribute(String name, String value)
Sets a variable based on a String value read from XML.
int getLeft()
Gets the leftmost column visible in the right pane.
void setCursor(Point activeCell)
Sets the position of the active cell.
void readNode(Node root)
Reads document settings from xml and inits SheetSettings variables.
SheetSettings()
Default Constructor for a SheetSettings.
int getTop()
Gets the top row visible in the lower pane.
Point getCursor()
Gets the position of the active cell.
void setSheetName(String sheetName)
Sets the sheetName this settings object applies to.
void setPaneNumber(int paneNumber)
Sets the active pane number.
Point getSplitType()
Gets the type of the split.
void writeNode(org.w3c.dom.Document settings, Node root)
Writes out a settings.xml entry for this SheetSettings object.
void setFreeze(Point splitPoint)
Sets the position of the freeze.
void addConfigItem(Node root, String attribute, String type, String value)
Adds an XML entry for a particular setting.
void setSplit(Point splitPoint)
Sets the position of the split.
int getPaneNumber()
Gets the active Panel.
Point getSplit()
Gets the position of the split.
SheetSettings(String name)
Constructor for a SheetSettings.
This interface contains constants for StarOffice XML tags, attributes (StarCalc cell types,...
String ATTRIBUTE_CONFIG_NAME
Attribute tag for config:name of element config:config-item.
String TAG_CONFIG_ITEM
Element tag for config:config-item.
String TAG_CONFIG_ITEM_MAP_ENTRY
Element tag for config:config-item-map-entry.
String ATTRIBUTE_CONFIG_TYPE
Attribute tag for config:type of element config:config-item.
Document and PluginFactory implementations for XML based formats.
Provides interfaces for converting between two Document formats, and supports a "merge" interface for...
const wchar_t *typedef int(__stdcall *DllNativeUnregProc)(int