diff options
-rw-r--r-- | sd/source/core/sdpage.cxx | 46 | ||||
-rw-r--r-- | sd/xml/layoutlist.xml | 32 | ||||
-rw-r--r-- | test/user-template/user/config/soffice.cfg/simpress/layoutlist.xml | 32 |
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 |