From ac5b9651a471d9ee28d5c7996d592ac2df08ca2b Mon Sep 17 00:00:00 2001 From: Vishv Brahmbhatt Date: Mon, 22 Jul 2013 20:01:24 +0530 Subject: 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 --- sd/source/core/sdpage.cxx | 46 ++++++++++++---------- sd/xml/layoutlist.xml | 32 ++++++++++++--- .../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& root, const rtl::OUString Reference 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 presobj = layoutchildrens->item(j); //get the j'th presobj for that layout - Reference presObjAttributes = presobj->getAttributes(); - Reference 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 presObjPosX = presObjAttributes->getNamedItem("layout-pos-x"); - rtl::OUString sValue = presObjPosX->getNodeValue(); - propvalue[0] = sValue.toDouble(); - Reference presObjPosY = presObjAttributes->getNamedItem("layout-pos-y"); - sValue = presObjPosY->getNodeValue(); - propvalue[1] = sValue.toDouble(); - Reference presObjSizeHeight = presObjAttributes->getNamedItem("layout-size-height"); - sValue = presObjSizeHeight->getNodeValue(); - propvalue[2] = sValue.toDouble(); - Reference presObjSizeWidth = presObjAttributes->getNamedItem("layout-size-width"); - sValue = presObjSizeWidth->getNodeValue(); - propvalue[3] = sValue.toDouble(); - bnoprop=false; - break; + Reference presObjAttributes = presobj->getAttributes(); + Reference presObjKindAttr = presObjAttributes->getNamedItem("kind"); + sPresObjKindAttName = presObjKindAttr->getNodeValue(); //get the value of it's presobj kind + if(sPresObjKindAttName==sPresObjKind) + { + Reference presObjPosX = presObjAttributes->getNamedItem("layout-pos-x"); + rtl::OUString sValue = presObjPosX->getNodeValue(); + propvalue[0] = sValue.toDouble(); + Reference presObjPosY = presObjAttributes->getNamedItem("layout-pos-y"); + sValue = presObjPosY->getNodeValue(); + propvalue[1] = sValue.toDouble(); + Reference presObjSizeHeight = presObjAttributes->getNamedItem("layout-size-height"); + sValue = presObjSizeHeight->getNodeValue(); + propvalue[2] = sValue.toDouble(); + Reference 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 @@ - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + \ 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 @@ - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file -- cgit