19package org.openoffice.xmerge.converter.xml;
21import org.w3c.dom.Node;
22import org.w3c.dom.NamedNodeMap;
65 if (node.getNodeName().equals(
"style:default-style"))
66 name =
"DEFAULT_STYLE";
67 NamedNodeMap attrNodes = node.getAttributes();
68 if (attrNodes !=
null) {
69 int len = attrNodes.getLength();
70 for (
int i = 0;
i < len;
i++) {
71 Node attr = attrNodes.item(
i);
72 if (attr.getNodeName().equals(
"style:family"))
73 family = attr.getNodeValue();
74 else if (attr.getNodeName().equals(
"style:name")) {
75 name = attr.getNodeValue();
76 }
else if (attr.getNodeName().equals(
"style:parent-style-name"))
77 parent = attr.getNodeValue();
A StyleCatalog holds a collection of Style objects.
An object of class Style represents a style in an OpenOffice document.
String parent
Parent of the Style.
Style getResolved()
Return a Style object corresponding to this one, but with all of the inherited information from paren...
StyleCatalog sc
A reference to the StyleCatalog to be used for looking up ancestor Style objects.
Node createNode(org.w3c.dom.Document parentDoc, String name)
Write a Node in parentDoc representing this Style.
String getName()
Returns the name of this Style.
void setName(String newName)
Sets the name of this Style.
boolean isSubset(Style style)
Return true if Style is a subset of this one.
void setCatalog(StyleCatalog sc)
Set the StyleCatalog to be used when looking up the Style parent.
String family
Family of the Style.
String getFamily()
Return the family of this Style.
String getParent()
Return the name of the parent of this Style.
Style(Node node, StyleCatalog sc)
Constructor for use when going from DOM to client device format.
Style(String name, String family, String parent, StyleCatalog sc)
Constructor for use when going from client device format to DOM.
String name
Name of the Style.
OUString newName(std::u16string_view aNewPrefix, std::u16string_view aOldPrefix, std::u16string_view old_Name)