From ddb7afe6b0bcb82487bbfc14bb4581a5b7be97b1 Mon Sep 17 00:00:00 2001 From: Vishv Brahmbhatt Date: Sun, 28 Jul 2013 23:11:21 +0530 Subject: Refactoring changes in the "sdpage.cxx" Converted some 'long' to 'int' and 'double' to 'sal_Int32'.So removed the long from the file. Also one of the changes for "readLayoutPropFromFile" will be removed soon. Change-Id: I4e88807908520439fa64f07808af9138c6556890 --- sd/source/core/sdpage.cxx | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx index 108bbba09233..bee2ecf3a293 100644 --- a/sd/source/core/sdpage.cxx +++ b/sd/source/core/sdpage.cxx @@ -1238,7 +1238,7 @@ Reference getRootElement() } //read the information from XML file(traversing from layout node) -void readLayoutPropFromFile(const Reference& root, const rtl::OUString& sLayoutType, const rtl::OUString& sPresObjKind, double propvalue[]) +void readLayoutPropFromFile(const Reference& root, const rtl::OUString& sLayoutType, const rtl::OUString& sPresObjKind, sal_Int32 propvalue[]) { long presobjsize; long layoutlistsize; @@ -1353,7 +1353,7 @@ void parseXml() const Reference root= getRootElement();//get the root element of my xml file const Reference layoutlist = root->getElementsByTagName("layout"); layoutlistsize=layoutlist->getLength(); - for( long index=0; index layoutnode = layoutlist->item(index); //get i'th layout element layoutinfo.push_back(layoutnode); @@ -1364,11 +1364,10 @@ static void CalcAutoLayoutRectangles( SdPage& rPage, int nLayout, Rectangle* rRe { Rectangle aTitleRect; Rectangle aLayoutRect; - long presobjsize; - long layoutlistsize; + int presobjsize; rtl::OUString sLayoutAttName; rtl::OUString sPresObjKindAttName; - double propvalue[4]; + sal_Int32 propvalue[4]; if( rPage.GetPageKind() != PK_HANDOUT ) { @@ -1424,7 +1423,7 @@ static void CalcAutoLayoutRectangles( SdPage& rPage, int nLayout, Rectangle* rRe int count=0; 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++) + for( int j=0; j< presobjsize ; j++) { rtl::OUString nodename; Reference presobj = layoutchildrens->item(j); //get the j'th presobj for that layout @@ -1435,19 +1434,19 @@ static void CalcAutoLayoutRectangles( SdPage& rPage, int nLayout, Rectangle* rRe Reference presObjPosX = presObjAttributes->getNamedItem("layout-pos-x"); rtl::OUString sValue = presObjPosX->getNodeValue(); - propvalue[0] = sValue.toDouble(); + propvalue[0] = sValue.toInt32(); Reference presObjPosY = presObjAttributes->getNamedItem("layout-pos-y"); sValue = presObjPosY->getNodeValue(); - propvalue[1] = sValue.toDouble(); + propvalue[1] = sValue.toInt32(); Reference presObjSizeHeight = presObjAttributes->getNamedItem("layout-size-height"); sValue = presObjSizeHeight->getNodeValue(); - propvalue[2] = sValue.toDouble(); + propvalue[2] = sValue.toInt32(); Reference presObjSizeWidth = presObjAttributes->getNamedItem("layout-size-width"); sValue = presObjSizeWidth->getNodeValue(); - propvalue[3] = sValue.toDouble(); + propvalue[3] = sValue.toInt32(); aLayoutPos.X() = propvalue[0]; aLayoutPos.Y() = propvalue[1]; -- cgit