// equal
Iterator<OdfStyleProperty> pIter = mProps.keySet().iterator();
boolean isStyle = false;
while (pIter.hasNext()) {
isStyle = false;
OdfStyleProperty p = pIter.next();
if (map.containsKey(p)) {
if (map.get(p).equals(mProps.get(p))) {
isStyle = true;
} else {
break;
}
} else {
break;
}
}
// put all match style names
if (isStyle) {
sname = sStyle.getStyleNameAttribute();
// if(sname.contains("default"))sname="defaultstyle";
styleNames.add(sname);
}
}
// get all automatic styles
Iterator<OdfStyle> cStyles = mTextDocument.getContentDom().getAutomaticStyles().getAllStyles().iterator();
while (cStyles.hasNext()) {
OdfStyle cStyle = cStyles.next();
// get default properties and style properties
Map<OdfStyleProperty, String> map = cStyle.getStylePropertiesDeep();
if (cStyle.getParentStyle() == null) {
if (cStyle.getFamilyName().equals("text")) {
if (defaultStyles.containsKey("text")) {
getTextDefaultProperties("text", defaultStyles, map);
} else {
getTextDefaultProperties("paragraph", defaultStyles, map);
}
}
}
// check if the search properties is in properties
Iterator<OdfStyleProperty> pIter = mProps.keySet().iterator();
boolean isStyle = false;
while (pIter.hasNext()) {
isStyle = false;
OdfStyleProperty p = pIter.next();
if (map.containsKey(p)) {
if (map.get(p).equals(mProps.get(p))) {
isStyle = true;
} else {
break;