Kaydet (Commit) ac5b9651 authored tarafından Vishv Brahmbhatt's avatar Vishv Brahmbhatt Kaydeden (comit) Thorsten Behrens

Solved the identation problem related to "layoutlist.xml".

Have added a 'if' conditional statement to know whether layout's child is a empty 'text' node or 'presobj' node.And proceed with rest of the
things ,if it is a 'presobj' node.Also the xml files are indented.

Change-Id: I676e710b86b1f50dbd861f2cb180bf9be839b867
üst 6ef55374
...@@ -1261,30 +1261,34 @@ void readLayoutPropFromFile(const Reference<XElement>& root, const rtl::OUString ...@@ -1261,30 +1261,34 @@ void readLayoutPropFromFile(const Reference<XElement>& root, const rtl::OUString
Reference<XNodeList> layoutchildrens = layoutnode->getChildNodes(); Reference<XNodeList> layoutchildrens = layoutnode->getChildNodes();
presobjsize = layoutchildrens->getLength(); //get the length of that of the layout(number of pres objects) presobjsize = layoutchildrens->getLength(); //get the length of that of the layout(number of pres objects)
for( long j=0; j< presobjsize ; j++) for( long j=0; j< presobjsize ; j++)
{ { rtl::OUString nodename;
Reference<XNode> presobj = layoutchildrens->item(j); //get the j'th presobj for that layout Reference<XNode> presobj = layoutchildrens->item(j); //get the j'th presobj for that layout
Reference<XNamedNodeMap> presObjAttributes = presobj->getAttributes(); nodename=presobj->getNodeName();
Reference<XNode> presObjKindAttr = presObjAttributes->getNamedItem("kind"); if(nodename=="presobj")//check whether children is blank 'text-node' or 'presobj' node
sPresObjKindAttName = presObjKindAttr->getNodeValue(); //get the value of it's presobj kind
if(sPresObjKindAttName==sPresObjKind)
{ {
Reference<XNode> presObjPosX = presObjAttributes->getNamedItem("layout-pos-x"); Reference<XNamedNodeMap> presObjAttributes = presobj->getAttributes();
rtl::OUString sValue = presObjPosX->getNodeValue(); Reference<XNode> presObjKindAttr = presObjAttributes->getNamedItem("kind");
propvalue[0] = sValue.toDouble(); sPresObjKindAttName = presObjKindAttr->getNodeValue(); //get the value of it's presobj kind
Reference<XNode> presObjPosY = presObjAttributes->getNamedItem("layout-pos-y"); if(sPresObjKindAttName==sPresObjKind)
sValue = presObjPosY->getNodeValue(); {
propvalue[1] = sValue.toDouble(); Reference<XNode> presObjPosX = presObjAttributes->getNamedItem("layout-pos-x");
Reference<XNode> presObjSizeHeight = presObjAttributes->getNamedItem("layout-size-height"); rtl::OUString sValue = presObjPosX->getNodeValue();
sValue = presObjSizeHeight->getNodeValue(); propvalue[0] = sValue.toDouble();
propvalue[2] = sValue.toDouble(); Reference<XNode> presObjPosY = presObjAttributes->getNamedItem("layout-pos-y");
Reference<XNode> presObjSizeWidth = presObjAttributes->getNamedItem("layout-size-width"); sValue = presObjPosY->getNodeValue();
sValue = presObjSizeWidth->getNodeValue(); propvalue[1] = sValue.toDouble();
propvalue[3] = sValue.toDouble(); Reference<XNode> presObjSizeHeight = presObjAttributes->getNamedItem("layout-size-height");
bnoprop=false; sValue = presObjSizeHeight->getNodeValue();
break; propvalue[2] = sValue.toDouble();
Reference<XNode> presObjSizeWidth = presObjAttributes->getNamedItem("layout-size-width");
sValue = presObjSizeWidth->getNodeValue();
propvalue[3] = sValue.toDouble();
bnoprop=false;
break;
}
else
continue;
} }
else
continue;
} }
} }
else else
......
...@@ -2,9 +2,31 @@ ...@@ -2,9 +2,31 @@
<!-- At present I am not sure about corect XML namespace,so once I am aware of it.I am ready to add it. <!-- At present I am not sure about corect XML namespace,so once I am aware of it.I am ready to add it.
--> -->
<layout-list> <layout-list>
<layout type="AUTOLAYOUT_TITLE_CONTENT"><presobj kind="PRESOBJ_TITLE" layout-pos-x="1400" layout-pos-y="837" layout-size-height="4400" layout-size-width="25600"/><presobj kind="PRESOBJ_OUTLINE1" layout-pos-x="1400" layout-pos-y="4914" layout-size-height="25200" layout-size-width="12180"/></layout> <layout type="AUTOLAYOUT_TITLE_CONTENT">
<layout type="AUTOLAYOUT_TITLE_2VTEXT"><presobj kind="PRESOBJ_TITLE" layout-pos-x="1400" layout-pos-y="837" layout-size-height="4400" layout-size-width="25600"/><presobj kind="PRESOBJ_OUTLINE1" layout-pos-x="1400" layout-pos-y="4914" layout-size-height="12297" layout-size-width="12180"/><presobj kind="PRESOBJ_OUTLINE2" layout-pos-x="14311" layout-pos-y="4914" layout-size-height="12297" layout-size-width="12180"/></layout> <presobj kind="PRESOBJ_TITLE" layout-pos-x="1400" layout-pos-y="837" layout-size-height="4400" layout-size-width="25600"/>
<layout type="AUTOLAYOUT_TITLE_CONTENT_OVER_CONTENT"><presobj kind="PRESOBJ_TITLE" layout-pos-x="1400" layout-pos-y="837" layout-size-height="4400" layout-size-width="25600"/><presobj kind="PRESOBJ_OUTLINE1" layout-pos-x="1400" layout-pos-y="4914" layout-size-height="25200" layout-size-width="5809"/><presobj kind="PRESOBJ_OUTLINE2" layout-pos-x="1400" layout-pos-y="11274" layout-size-height="25200" layout-size-width="5809"/></layout> <presobj kind="PRESOBJ_OUTLINE1" layout-pos-x="1400" layout-pos-y="4914" layout-size-height="25200" layout-size-width="12180"/>
<layout type="AUTOLAYOUT_TITLE_CONTENT_2CONTENT"><presobj kind="PRESOBJ_TITLE" layout-pos-x="1400" layout-pos-y="837" layout-size-height="4400" layout-size-width="25600"/><presobj kind="PRESOBJ_OUTLINE1" layout-pos-x="1400" layout-pos-y="4914" layout-size-height="5809" layout-size-width="25198"/><presobj kind="PRESOBJ_OUTLINE2" layout-pos-x="1400" layout-pos-y="11274" layout-size-height="5809" layout-size-width="12297"/><presobj kind="PRESOBJ_OUTLINE3" layout-pos-x="14311" layout-pos-y="11274" layout-size-height="5809" layout-size-width="12297"/></layout> </layout>
<layout type="AUTOLAYOUT_TITLE_4SCONTENT"><presobj kind="PRESOBJ_TITLE" layout-pos-x="1400" layout-pos-y="837" layout-size-height="4400" layout-size-width="25600"/><presobj kind="PRESOBJ_OUTLINE1" layout-pos-x="1400" layout-pos-y="4914" layout-size-height="5809" layout-size-width="12297"/><presobj kind="PRESOBJ_OUTLINE2" layout-pos-x="14311" layout-pos-y="5914" layout-size-height="4509" layout-size-width="12297"/><presobj kind="PRESOBJ_OUTLINE3" layout-pos-x="14311" layout-pos-y="12274" layout-size-height="4509" layout-size-width="12297"/><presobj kind="PRESOBJ_OUTLINE4" layout-pos-x="1400" layout-pos-y="11274" layout-size-height="5809" layout-size-width="12297"/></layout> <layout type="AUTOLAYOUT_TITLE_2VTEXT">
<presobj kind="PRESOBJ_TITLE" layout-pos-x="1400" layout-pos-y="837" layout-size-height="4400" layout-size-width="25600"/>
<presobj kind="PRESOBJ_OUTLINE1" layout-pos-x="1400" layout-pos-y="4914" layout-size-height="12297" layout-size-width="12180"/>
<presobj kind="PRESOBJ_OUTLINE2" layout-pos-x="14311" layout-pos-y="4914" layout-size-height="12297" layout-size-width="12180"/>
</layout>
<layout type="AUTOLAYOUT_TITLE_CONTENT_OVER_CONTENT">
<presobj kind="PRESOBJ_TITLE" layout-pos-x="1400" layout-pos-y="837" layout-size-height="4400" layout-size-width="25600"/>
<presobj kind="PRESOBJ_OUTLINE1" layout-pos-x="1400" layout-pos-y="4914" layout-size-height="25200" layout-size-width="5809"/>
<presobj kind="PRESOBJ_OUTLINE2" layout-pos-x="1400" layout-pos-y="11274" layout-size-height="25200" layout-size-width="5809"/>
</layout>
<layout type="AUTOLAYOUT_TITLE_CONTENT_2CONTENT">
<presobj kind="PRESOBJ_TITLE" layout-pos-x="1400" layout-pos-y="837" layout-size-height="4400" layout-size-width="25600"/>
<presobj kind="PRESOBJ_OUTLINE1" layout-pos-x="1400" layout-pos-y="4914" layout-size-height="5809" layout-size-width="25198"/>
<presobj kind="PRESOBJ_OUTLINE2" layout-pos-x="1400" layout-pos-y="11274" layout-size-height="5809" layout-size-width="12297"/>
<presobj kind="PRESOBJ_OUTLINE3" layout-pos-x="14311" layout-pos-y="11274" layout-size-height="5809" layout-size-width="12297"/>
</layout>
<layout type="AUTOLAYOUT_TITLE_4SCONTENT">
<presobj kind="PRESOBJ_TITLE" layout-pos-x="1400" layout-pos-y="837" layout-size-height="4400" layout-size-width="25600"/>
<presobj kind="PRESOBJ_OUTLINE1" layout-pos-x="1400" layout-pos-y="4914" layout-size-height="5809" layout-size-width="12297"/>
<presobj kind="PRESOBJ_OUTLINE2" layout-pos-x="14311" layout-pos-y="5914" layout-size-height="4509" layout-size-width="12297"/>
<presobj kind="PRESOBJ_OUTLINE3" layout-pos-x="14311" layout-pos-y="12274" layout-size-height="4509" layout-size-width="12297"/>
<presobj kind="PRESOBJ_OUTLINE4" layout-pos-x="1400" layout-pos-y="11274" layout-size-height="5809" layout-size-width="12297"/>
</layout>
</layout-list> </layout-list>
\ No newline at end of file
...@@ -2,9 +2,31 @@ ...@@ -2,9 +2,31 @@
<!-- At present I am not sure about corect XML namespace,so once I am aware of it.I am ready to add it. <!-- At present I am not sure about corect XML namespace,so once I am aware of it.I am ready to add it.
--> -->
<layout-list> <layout-list>
<layout type="AUTOLAYOUT_TITLE_CONTENT"><presobj kind="PRESOBJ_TITLE" layout-pos-x="1400" layout-pos-y="837" layout-size-height="4400" layout-size-width="25600"/><presobj kind="PRESOBJ_OUTLINE1" layout-pos-x="1400" layout-pos-y="4914" layout-size-height="25200" layout-size-width="12180"/></layout> <layout type="AUTOLAYOUT_TITLE_CONTENT">
<layout type="AUTOLAYOUT_TITLE_2VTEXT"><presobj kind="PRESOBJ_TITLE" layout-pos-x="1400" layout-pos-y="837" layout-size-height="4400" layout-size-width="25600"/><presobj kind="PRESOBJ_OUTLINE1" layout-pos-x="1400" layout-pos-y="4914" layout-size-height="12297" layout-size-width="12180"/><presobj kind="PRESOBJ_OUTLINE2" layout-pos-x="14311" layout-pos-y="4914" layout-size-height="12297" layout-size-width="12180"/></layout> <presobj kind="PRESOBJ_TITLE" layout-pos-x="1400" layout-pos-y="837" layout-size-height="4400" layout-size-width="25600"/>
<layout type="AUTOLAYOUT_TITLE_CONTENT_OVER_CONTENT"><presobj kind="PRESOBJ_TITLE" layout-pos-x="1400" layout-pos-y="837" layout-size-height="4400" layout-size-width="25600"/><presobj kind="PRESOBJ_OUTLINE1" layout-pos-x="1400" layout-pos-y="4914" layout-size-height="25200" layout-size-width="5809"/><presobj kind="PRESOBJ_OUTLINE2" layout-pos-x="1400" layout-pos-y="11274" layout-size-height="25200" layout-size-width="5809"/></layout> <presobj kind="PRESOBJ_OUTLINE1" layout-pos-x="1400" layout-pos-y="4914" layout-size-height="25200" layout-size-width="12180"/>
<layout type="AUTOLAYOUT_TITLE_CONTENT_2CONTENT"><presobj kind="PRESOBJ_TITLE" layout-pos-x="1400" layout-pos-y="837" layout-size-height="4400" layout-size-width="25600"/><presobj kind="PRESOBJ_OUTLINE1" layout-pos-x="1400" layout-pos-y="4914" layout-size-height="5809" layout-size-width="25198"/><presobj kind="PRESOBJ_OUTLINE2" layout-pos-x="1400" layout-pos-y="11274" layout-size-height="5809" layout-size-width="12297"/><presobj kind="PRESOBJ_OUTLINE3" layout-pos-x="14311" layout-pos-y="11274" layout-size-height="5809" layout-size-width="12297"/></layout> </layout>
<layout type="AUTOLAYOUT_TITLE_4SCONTENT"><presobj kind="PRESOBJ_TITLE" layout-pos-x="1400" layout-pos-y="837" layout-size-height="4400" layout-size-width="25600"/><presobj kind="PRESOBJ_OUTLINE1" layout-pos-x="1400" layout-pos-y="4914" layout-size-height="5809" layout-size-width="12297"/><presobj kind="PRESOBJ_OUTLINE2" layout-pos-x="14311" layout-pos-y="5914" layout-size-height="4509" layout-size-width="12297"/><presobj kind="PRESOBJ_OUTLINE3" layout-pos-x="14311" layout-pos-y="12274" layout-size-height="4509" layout-size-width="12297"/><presobj kind="PRESOBJ_OUTLINE4" layout-pos-x="1400" layout-pos-y="11274" layout-size-height="5809" layout-size-width="12297"/></layout> <layout type="AUTOLAYOUT_TITLE_2VTEXT">
<presobj kind="PRESOBJ_TITLE" layout-pos-x="1400" layout-pos-y="837" layout-size-height="4400" layout-size-width="25600"/>
<presobj kind="PRESOBJ_OUTLINE1" layout-pos-x="1400" layout-pos-y="4914" layout-size-height="12297" layout-size-width="12180"/>
<presobj kind="PRESOBJ_OUTLINE2" layout-pos-x="14311" layout-pos-y="4914" layout-size-height="12297" layout-size-width="12180"/>
</layout>
<layout type="AUTOLAYOUT_TITLE_CONTENT_OVER_CONTENT">
<presobj kind="PRESOBJ_TITLE" layout-pos-x="1400" layout-pos-y="837" layout-size-height="4400" layout-size-width="25600"/>
<presobj kind="PRESOBJ_OUTLINE1" layout-pos-x="1400" layout-pos-y="4914" layout-size-height="25200" layout-size-width="5809"/>
<presobj kind="PRESOBJ_OUTLINE2" layout-pos-x="1400" layout-pos-y="11274" layout-size-height="25200" layout-size-width="5809"/>
</layout>
<layout type="AUTOLAYOUT_TITLE_CONTENT_2CONTENT">
<presobj kind="PRESOBJ_TITLE" layout-pos-x="1400" layout-pos-y="837" layout-size-height="4400" layout-size-width="25600"/>
<presobj kind="PRESOBJ_OUTLINE1" layout-pos-x="1400" layout-pos-y="4914" layout-size-height="5809" layout-size-width="25198"/>
<presobj kind="PRESOBJ_OUTLINE2" layout-pos-x="1400" layout-pos-y="11274" layout-size-height="5809" layout-size-width="12297"/>
<presobj kind="PRESOBJ_OUTLINE3" layout-pos-x="14311" layout-pos-y="11274" layout-size-height="5809" layout-size-width="12297"/>
</layout>
<layout type="AUTOLAYOUT_TITLE_4SCONTENT">
<presobj kind="PRESOBJ_TITLE" layout-pos-x="1400" layout-pos-y="837" layout-size-height="4400" layout-size-width="25600"/>
<presobj kind="PRESOBJ_OUTLINE1" layout-pos-x="1400" layout-pos-y="4914" layout-size-height="5809" layout-size-width="12297"/>
<presobj kind="PRESOBJ_OUTLINE2" layout-pos-x="14311" layout-pos-y="5914" layout-size-height="4509" layout-size-width="12297"/>
<presobj kind="PRESOBJ_OUTLINE3" layout-pos-x="14311" layout-pos-y="12274" layout-size-height="4509" layout-size-width="12297"/>
<presobj kind="PRESOBJ_OUTLINE4" layout-pos-x="1400" layout-pos-y="11274" layout-size-height="5809" layout-size-width="12297"/>
</layout>
</layout-list> </layout-list>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment