summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVishv Brahmbhatt <vishvbrahmbhatt19@gmail.com>2013-07-22 20:01:24 +0530
committerThorsten Behrens <tbehrens@suse.com>2013-08-26 14:47:22 +0200
commitac5b9651a471d9ee28d5c7996d592ac2df08ca2b (patch)
tree9c6f4e56a9b15cbea7c58ac472329abfc525fe65
parent6ef5537422b9a1e69f4a4f9894d4343db3adca34 (diff)
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
-rw-r--r--sd/source/core/sdpage.cxx46
-rw-r--r--sd/xml/layoutlist.xml32
-rw-r--r--test/user-template/user/config/soffice.cfg/simpress/layoutlist.xml32
3 files changed, 79 insertions, 31 deletions
diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx
index 4ad39f10f428..906137080fd1 100644
--- a/sd/source/core/sdpage.cxx
+++ b/sd/source/core/sdpage.cxx
@@ -1261,30 +1261,34 @@ void readLayoutPropFromFile(const Reference<XElement>& root, const rtl::OUString
Reference<XNodeList> layoutchildrens = layoutnode->getChildNodes();
presobjsize = layoutchildrens->getLength(); //get the length of that of the layout(number of pres objects)
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<XNamedNodeMap> presObjAttributes = presobj->getAttributes();
- Reference<XNode> presObjKindAttr = presObjAttributes->getNamedItem("kind");
- sPresObjKindAttName = presObjKindAttr->getNodeValue(); //get the value of it's presobj kind
- if(sPresObjKindAttName==sPresObjKind)
+ nodename=presobj->getNodeName();
+ if(nodename=="presobj")//check whether children is blank 'text-node' or 'presobj' node
{
- Reference<XNode> presObjPosX = presObjAttributes->getNamedItem("layout-pos-x");
- rtl::OUString sValue = presObjPosX->getNodeValue();
- propvalue[0] = sValue.toDouble();
- Reference<XNode> presObjPosY = presObjAttributes->getNamedItem("layout-pos-y");
- sValue = presObjPosY->getNodeValue();
- propvalue[1] = sValue.toDouble();
- Reference<XNode> presObjSizeHeight = presObjAttributes->getNamedItem("layout-size-height");
- sValue = presObjSizeHeight->getNodeValue();
- propvalue[2] = sValue.toDouble();
- Reference<XNode> presObjSizeWidth = presObjAttributes->getNamedItem("layout-size-width");
- sValue = presObjSizeWidth->getNodeValue();
- propvalue[3] = sValue.toDouble();
- bnoprop=false;
- break;
+ Reference<XNamedNodeMap> presObjAttributes = presobj->getAttributes();
+ Reference<XNode> presObjKindAttr = presObjAttributes->getNamedItem("kind");
+ sPresObjKindAttName = presObjKindAttr->getNodeValue(); //get the value of it's presobj kind
+ if(sPresObjKindAttName==sPresObjKind)
+ {
+ Reference<XNode> presObjPosX = presObjAttributes->getNamedItem("layout-pos-x");
+ rtl::OUString sValue = presObjPosX->getNodeValue();
+ propvalue[0] = sValue.toDouble();
+ Reference<XNode> presObjPosY = presObjAttributes->getNamedItem("layout-pos-y");
+ sValue = presObjPosY->getNodeValue();
+ propvalue[1] = sValue.toDouble();
+ Reference<XNode> presObjSizeHeight = presObjAttributes->getNamedItem("layout-size-height");
+ sValue = presObjSizeHeight->getNodeValue();
+ 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
diff --git a/sd/xml/layoutlist.xml b/sd/xml/layoutlist.xml
index 6695c530e41a..cfe1f1e58e85 100644
--- a/sd/xml/layoutlist.xml
+++ b/sd/xml/layoutlist.xml
@@ -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.
-->
<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_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 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_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> \ No newline at end of file
diff --git a/test/user-template/user/config/soffice.cfg/simpress/layoutlist.xml b/test/user-template/user/config/soffice.cfg/simpress/layoutlist.xml
index 6695c530e41a..cfe1f1e58e85 100644
--- a/test/user-template/user/config/soffice.cfg/simpress/layoutlist.xml
+++ b/test/user-template/user/config/soffice.cfg/simpress/layoutlist.xml
@@ -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.
-->
<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_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 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_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> \ No newline at end of file