[Libreoffice-commits] core.git: 30 commits - officecfg/registry sd/CppunitTest_sd_uimpress.mk sd/inc sd/Package_xml.mk sd/source sd/xml solenv/gbuild test/Package_unittest.mk test/user-template

Vishv Brahmbhatt vishvbrahmbhatt19 at gmail.com
Mon Aug 26 05:48:31 PDT 2013


 officecfg/registry/schema/org/openoffice/Office/Impress.xcs        |   13 
 sd/CppunitTest_sd_uimpress.mk                                      |    1 
 sd/Package_xml.mk                                                  |    1 
 sd/inc/drawdoc.hxx                                                 |    8 
 sd/source/core/drawdoc.cxx                                         |   71 ++
 sd/source/core/sdpage.cxx                                          |  301 ++++------
 sd/xml/layoutlist.xml                                              |   86 ++
 sd/xml/objectlist.xml                                              |   19 
 solenv/gbuild/CppunitTest.mk                                       |    1 
 test/Package_unittest.mk                                           |   14 
 test/user-template/user/config/soffice.cfg/simpress/layoutlist.xml |   86 ++
 11 files changed, 420 insertions(+), 181 deletions(-)

New commits:
commit 84bbcab33ee0518f2c575dd99aa67c074e8cc107
Author: Vishv Brahmbhatt <vishvbrahmbhatt19 at gmail.com>
Date:   Sat Aug 24 12:30:50 2013 +0530

    Small fix to the previous commit.
    
    Making a small logical change,as per my code.Please let me know if some other
    logic can be used here.'Slide Layouts' did not work properly after previous commit,
    so pushing this change.
    
    Change-Id: Iefbb33503bf1c37bdb899181c58109fb904af6de

diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx
index 7be55e1..66f3eae 100644
--- a/sd/source/core/sdpage.cxx
+++ b/sd/source/core/sdpage.cxx
@@ -1319,8 +1319,8 @@ static void CalcAutoLayoutRectangles( SdPage& rPage,Rectangle* rRectangle ,const
                     {
                         Size aSize( basegfx::fround(aLayoutSize.Width() * propvalue[1]),
                                     basegfx::fround(aLayoutSize.Height() * propvalue[0]) );
-                        Point aPos( basegfx::fround(aLayoutPos.X() +(aLayoutSize.Width() * propvalue[2])),
-                                    basegfx::fround(aLayoutPos.Y() + (aLayoutSize.Height() * propvalue[3])) );
+                        Point aPos( basegfx::fround(aLayoutPos.X() +(aSize.Width() * propvalue[2])),
+                                    basegfx::fround(aLayoutPos.Y() + (aSize.Height() * propvalue[3])) );
                         rRectangle[count] = Rectangle (aPos, aSize);
                         count = count+1;
                     }
commit 1eecb8df22b77a6982601bf877067a685d913a7d
Author: Thorsten Behrens <tbehrens at suse.com>
Date:   Sat Aug 24 01:23:36 2013 +0200

    Some cleanup and consolidation of the Impress layout work.
    
    Also make unit test work again after Mac-app like path changes.
    
    Change-Id: I13eae20141650e1d1d826a794d1f19baaef5f561

diff --git a/officecfg/registry/schema/org/openoffice/Office/Impress.xcs b/officecfg/registry/schema/org/openoffice/Office/Impress.xcs
index efeb627..c971846 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Impress.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Impress.xcs
@@ -472,15 +472,15 @@
       <prop oor:name="LayoutListFiles" oor:type="oor:string-list" oor:nillable="false">
         <info>
           <desc>
-            Contains a list of layout type.It contains
-            properties of presobj like their Position,
-            Height and Width.Values are put through
-            macro expansion, so, vnd.sun.star.expand prefix
-            is allowed.
+            Contains a list of xml files defining the Impress slide
+            "layouts". It contains properties of presentation objects,
+            like their position, width, and height. Entries are run
+            through macro expansion, so, vnd.sun.star.expand prefix is
+            allowed.
           </desc>
-          <label>List of files containing list of layouts</label>
+          <label>List of files containing Impress slide layouts</label>
         </info>
-        <value oor:separator=";">vnd.sun.star.expand:$BRAND_BASE_DIR/share/config/soffice.cfg/simpress/layoutlist.xml</value>
+        <value oor:separator=";">vnd.sun.star.expand:$BRAND_BASE_DIR/$BRAND_SHARE_SUBDIR/config/soffice.cfg/simpress/layoutlist.xml</value>
       </prop>
       <prop oor:name="PreviewNewEffects" oor:type="xs:boolean" oor:nillable="false">
         <!-- OldPath: -->
diff --git a/sd/inc/drawdoc.hxx b/sd/inc/drawdoc.hxx
index 88d11c9..6ef4c27 100644
--- a/sd/inc/drawdoc.hxx
+++ b/sd/inc/drawdoc.hxx
@@ -264,8 +264,10 @@ public:
     bool IsExitAfterPresenting() const;
     void SetExitAfterPresenting( bool bExitAfterPresenting );
 
-    void SetLayoutVector();
-    std::vector<com::sun::star::uno::Reference<com::sun::star::xml::dom::XNode>> &GetLayoutVector() { return maLayoutInfo; }
+    /// load xml-based impress layout definitions into document
+    void InitLayoutVector();
+    /// return reference to vector of Impress layout definitions
+    const std::vector<com::sun::star::uno::Reference<com::sun::star::xml::dom::XNode>>& GetLayoutVector() const { return maLayoutInfo; }
 
     /** Insert pages into this document
 
diff --git a/sd/source/core/drawdoc.cxx b/sd/source/core/drawdoc.cxx
index a4089cb..2295c97 100644
--- a/sd/source/core/drawdoc.cxx
+++ b/sd/source/core/drawdoc.cxx
@@ -29,6 +29,7 @@
 #include <editeng/scriptspaceitem.hxx>
 
 #include <unotools/useroptions.hxx>
+#include <officecfg/Office/Impress.hxx>
 
 #include <sfx2/printer.hxx>
 #include <sfx2/app.hxx>
@@ -71,9 +72,6 @@
 #include <com/sun/star/uno/XComponentContext.hpp>
 #include <com/sun/star/io/XInputStream.hpp>
 #include <com/sun/star/util/theMacroExpander.hpp>
-#include <com/sun/star/container/XNameAccess.hpp>
-#include <com/sun/star/configuration/theDefaultProvider.hpp>
-#include <com/sun/star/beans/PropertyValue.hpp>
 #include <rtl/ustring.hxx>
 #include <rtl/uri.hxx>
 #include <osl/file.h>
@@ -192,7 +190,7 @@ SdDrawDocument::SdDrawDocument(DocumentType eType, SfxObjectShell* pDrDocSh)
     mpMasterPageListWatcher = ::std::auto_ptr<ImpMasterPageListWatcher>(
         new ImpMasterPageListWatcher(*this));
 
-    SetLayoutVector();
+    InitLayoutVector();
     SetObjectShell(pDrDocSh);       // for VCDrawModel
 
     if (mpDocSh)
@@ -1012,66 +1010,53 @@ sal_uInt16 SdDrawDocument::GetAnnotationAuthorIndex( const OUString& rAuthor )
     return idx;
 }
 
-// to get the root element of the xml file
-Reference<XElement> getRoot()
+void SdDrawDocument::InitLayoutVector()
 {
-    const Reference<css::uno::XComponentContext> xContext( ::comphelper::getProcessComponentContext() );
-    Reference< XMultiServiceFactory > xServiceFactory( xContext->getServiceManager() , UNO_QUERY_THROW );
-    Reference< util::XMacroExpander > xMacroExpander = util::theMacroExpander::get( xContext );
-    Reference< XMultiServiceFactory > xConfigProvider = configuration::theDefaultProvider::get( xContext );
-
-    Any propValue = uno::makeAny(
-        beans::PropertyValue(
-            "nodepath", -1,
-            uno::makeAny( OUString( "/org.openoffice.Office.Impress/Misc" )),
-            beans::PropertyState_DIRECT_VALUE ) );
-
-    Reference<container::XNameAccess> xNameAccess(
-        xConfigProvider->createInstanceWithArguments(
-            "com.sun.star.configuration.ConfigurationAccess",
-            Sequence<Any>( &propValue, 1 ) ), UNO_QUERY_THROW );
-
-    Sequence< rtl::OUString > aFiles;
-    xNameAccess->getByName( "LayoutListFiles" ) >>= aFiles;
-    rtl::OUString aURL;
+    const Reference<css::uno::XComponentContext> xContext(
+        ::comphelper::getProcessComponentContext() );
+    Reference< util::XMacroExpander > xMacroExpander(
+        util::theMacroExpander::get( xContext ) );
 
+    // get file list from configuration
+    Sequence< rtl::OUString > aFiles(
+        officecfg::Office::Impress::Misc::LayoutListFiles::get(xContext) );
+
+    // loop over each file in sequence
+    rtl::OUString aFilename;
     for( sal_Int32 i=0; i < aFiles.getLength(); ++i )
     {
-        aURL = aFiles[i];
-        if( aURL.startsWith( "vnd.sun.star.expand:" ) )
+        aFilename = aFiles[i];
+        if( aFilename.startsWith( "vnd.sun.star.expand:" ) )
         {
             // cut protocol
-            rtl::OUString aMacro( aURL.copy( sizeof ( "vnd.sun.star.expand:" ) -1 ) );
+            rtl::OUString aMacro( aFilename.copy( sizeof ( "vnd.sun.star.expand:" ) -1 ) );
+
             // decode uric class chars
             aMacro = rtl::Uri::decode( aMacro, rtl_UriDecodeWithCharset, RTL_TEXTENCODING_UTF8 );
+
             // expand macro string
-            aURL = xMacroExpander->expandMacros( aMacro );
+            aFilename = xMacroExpander->expandMacros( aMacro );
         }
-    }
-
-    if( aURL.startsWith( "file://" ) )
-    {
-        rtl::OUString aSysPath;
-        if( osl_getSystemPathFromFileURL( aURL.pData, &aSysPath.pData ) == osl_File_E_None )
-            aURL = aSysPath;
-    }
 
-    const Reference<XDocumentBuilder> xDocBuilder( DocumentBuilder::create( comphelper::getComponentContext (xServiceFactory) ));
-    const Reference<XDocument> xDoc = xDocBuilder->parseURI( aURL );
-    const Reference<XElement> xRoot = xDoc->getDocumentElement();
-    return xRoot;                      //this loops seems to work only once,so returning the root element
-}
+        if( aFilename.startsWith( "file://" ) )
+        {
+            rtl::OUString aSysPath;
+            if( osl_getSystemPathFromFileURL( aFilename.pData, &aSysPath.pData ) == osl_File_E_None )
+                aFilename = aSysPath;
+        }
 
-void SdDrawDocument::SetLayoutVector()
-{
-    int layoutlistsize;
-    const Reference<XElement> root = getRoot();                     //get the root element of my xml file
-    const Reference<XNodeList> layoutlist = root->getElementsByTagName("layout");
-    layoutlistsize=layoutlist->getLength();
-    for(int index=0; index < layoutlistsize; index++)
-    {
-        Reference<XNode> layoutnode = layoutlist->item(index);      //get i'th layout element
-        maLayoutInfo.push_back(layoutnode);
+        // load layout file into DOM
+        Reference< XMultiServiceFactory > xServiceFactory(
+            xContext->getServiceManager() , UNO_QUERY_THROW );
+        const Reference<XDocumentBuilder> xDocBuilder(
+            DocumentBuilder::create( comphelper::getComponentContext (xServiceFactory) ));
+
+        // loop over every layout entry in current file
+        const Reference<XDocument> xDoc = xDocBuilder->parseURI( aFilename );
+        const Reference<XNodeList> layoutlist = xDoc->getElementsByTagName("layout");
+        const int nElements = layoutlist->getLength();
+        for(int index=0; index < nElements; index++)
+            maLayoutInfo.push_back( layoutlist->item(index) );
     }
 }
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx
index 64dbefd..7be55e1 100644
--- a/sd/source/core/sdpage.cxx
+++ b/sd/source/core/sdpage.cxx
@@ -48,25 +48,11 @@
 #include <editeng/flditem.hxx>
 #include <svx/sdr/contact/displayinfo.hxx>
 #include <svx/svditer.hxx>
-#include <com/sun/star/xml/dom/XDocumentBuilder.hpp>
-#include <com/sun/star/xml/dom/XDocument.hpp>
 #include <com/sun/star/xml/dom/XNode.hpp>
 #include <com/sun/star/xml/dom/XNodeList.hpp>
 #include <com/sun/star/xml/dom/XNamedNodeMap.hpp>
-#include <com/sun/star/xml/dom/DocumentBuilder.hpp>
 #include <rtl/ustring.hxx>
-#include <comphelper/processfactory.hxx>
-#include <com/sun/star/uno/XComponentContext.hpp>
-#include <com/sun/star/io/XInputStream.hpp>
-#include <com/sun/star/util/theMacroExpander.hpp>
-#include <com/sun/star/container/XNameAccess.hpp>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#include <com/sun/star/configuration/theDefaultProvider.hpp>
-#include <com/sun/star/beans/PropertyValue.hpp>
-#include <unotools/streamwrap.hxx>
-#include <rtl/uri.hxx>
-#include <unotools/ucbstreamhelper.hxx>
-#include <osl/file.h>
+#include <basegfx/tools/tools.hxx>
 
 #include "../ui/inc/DrawDocShell.hxx"
 #include "Outliner.hxx"
@@ -95,12 +81,6 @@ using namespace ::com::sun::star::uno;
 using namespace com::sun::star::xml::dom;
 using ::com::sun::star::uno::Reference;
 
-using ::com::sun::star::io::XInputStream;
-using ::com::sun::star::lang::XMultiServiceFactory;
-using ::com::sun::star::container::XNameAccess;
-using ::com::sun::star::beans::PropertyValue;
-
-
 TYPEINIT2( SdPage, FmFormPage, SdrObjUserCall );
 
 /*************************************************************************
@@ -1116,7 +1096,6 @@ Rectangle SdPage::GetLayoutRect() const
 
 const int MAX_PRESOBJS = 7; // maximum number of presentation objects per layout
 const int VERTICAL = 0x8000;
-const int PRESOBJPROP = 4;
 
 struct LayoutDescriptor
 {
@@ -1247,14 +1226,10 @@ rtl::OUString enumtoString(AutoLayout aut)
     return retstr;
 }
 
-static void CalcAutoLayoutRectangles( SdPage& rPage,Rectangle* rRectangle ,const rtl::OUString& autolayout)
+static void CalcAutoLayoutRectangles( SdPage& rPage,Rectangle* rRectangle ,const rtl::OUString& sLayoutType )
 {
     Rectangle aTitleRect;
     Rectangle aLayoutRect;
-    int presobjsize;
-    rtl::OUString sLayoutAttName;
-    rtl::OUString sPresObjKindAttName;
-    double propvalue[4];
 
     if( rPage.GetPageKind() != PK_HANDOUT )
     {
@@ -1278,42 +1253,39 @@ static void CalcAutoLayoutRectangles( SdPage& rPage,Rectangle* rRectangle ,const
     }
 
     rRectangle[0] = aTitleRect;
-
-    int i;
-    for( i = 1; i < MAX_PRESOBJS; i++ )
+    for( int i = 1; i < MAX_PRESOBJS; i++ )
         rRectangle[i] = aLayoutRect;
-    i=0;
-    for(i=0; i< PRESOBJPROP; i++)
-        propvalue[i]=0;
 
-    Point       aTitlePos( aTitleRect.TopLeft() );
-    Size        aLayoutSize( aLayoutRect.GetSize() );
-    Point       aLayoutPos( aLayoutRect.TopLeft() );
-    Size        aTempSize;
-    Point       aTempPnt;
-    aTempSize = aLayoutSize;
-    aTempPnt  = aLayoutPos;
+    const Point aTitlePos( aTitleRect.TopLeft() );
+    const Size  aLayoutSize( aLayoutRect.GetSize() );
+    const Point aLayoutPos( aLayoutRect.TopLeft() );
+    double propvalue[] = {0,0,0,0};
 
-    const std::vector<Reference<XNode>>  &layoutinfo = static_cast< SdDrawDocument* >( rPage.GetModel() )->GetLayoutVector(); //getting vector from "SdDrawDocument" ,not sure about the correct mechanism
-    for(size_t y=0; y < layoutinfo.size(); y++) //loop through vector of Xnodes
+    const std::vector< Reference<XNode> >& layoutInfo = static_cast<const SdDrawDocument*>(rPage.GetModel())->GetLayoutVector();
+    for( std::vector< Reference<XNode> >::const_iterator aIter=layoutInfo.begin(); aIter != layoutInfo.end(); ++aIter )
     {
-        Reference<XNode> layoutnode = layoutinfo[y];      //get i'th layout element
-        Reference<XNamedNodeMap> layoutattrlist =layoutnode->getAttributes();
-        Reference<XNode> layoutattr = layoutattrlist->getNamedItem("type");
-        sLayoutAttName=layoutattr->getNodeValue();              //get the attribute value of layout(i.e it's type)
-        rtl::OUString sLayoutType = autolayout;
+        Reference<XNode> layoutNode = *aIter;
+        Reference<XNamedNodeMap> layoutAttrList =layoutNode->getAttributes();
 
-        if(sLayoutAttName==sLayoutType)
+        // get the attribute value of layout (i.e it's type)
+        rtl::OUString sLayoutAttName =
+            layoutAttrList->getNamedItem("type")->getNodeValue();
+        if(sLayoutAttName == sLayoutType)
         {
             int count=0;
-            Reference<XNodeList> layoutchildrens = layoutnode->getChildNodes();
-            presobjsize = layoutchildrens->getLength();         //get the length of that of the layout(number of pres objects)
+            Reference<XNodeList> layoutChildren = layoutNode->getChildNodes();
+            const int presobjsize = layoutChildren->getLength();
             for( int j=0; j< presobjsize ; j++)
             {
+                // TODO: rework sd to permit arbitrary number of presentation objects
+                OSL_ASSERT(count < MAX_PRESOBJS);
+
                 rtl::OUString nodename;
-                Reference<XNode> presobj = layoutchildrens->item(j);    //get the j'th presobj for that layout
+                Reference<XNode> presobj = layoutChildren->item(j);
                 nodename=presobj->getNodeName();
-                if(nodename=="presobj")//check whether children is blank 'text-node' or 'presobj' node
+
+                //check whether children is blank 'text-node' or 'presobj' node
+                if(nodename == "presobj")
                 {
                     Reference<XNamedNodeMap> presObjAttributes = presobj->getAttributes();
 
@@ -1333,26 +1305,24 @@ static void CalcAutoLayoutRectangles( SdPage& rPage,Rectangle* rRectangle ,const
                     sValue = presObjPosY->getNodeValue();
                     propvalue[3] = sValue.toDouble();
 
-                    if(count==0)
+                    if(count == 0)
                     {
-                        Size aTitleSize ( aTitleRect.GetSize() );
-                        aTitleSize.Height() = sal_Int32(aTitleSize.Height() * propvalue[0]);
-                        aTitleSize.Width() = sal_Int32(aTitleSize.Width() * propvalue[1]);
-                        aTitlePos.X() = sal_Int32(aTitlePos.X() +(aTitleSize.Width() * propvalue[2]));
-                        aTitlePos.Y() = sal_Int32(aTitlePos.Y() + (aTitleSize.Height() * propvalue[3]));
-                        rRectangle[count] = Rectangle (aTitlePos, aTitleSize);
+                        Size aSize ( aTitleRect.GetSize() );
+                        aSize.Height() = basegfx::fround(aSize.Height() * propvalue[0]);
+                        aSize.Width() = basegfx::fround(aSize.Width() * propvalue[1]);
+                        Point aPos( basegfx::fround(aTitlePos.X() +(aSize.Width() * propvalue[2])),
+                                    basegfx::fround(aTitlePos.Y() + (aSize.Height() * propvalue[3])) );
+                        rRectangle[count] = Rectangle(aPos, aSize);
                         count = count+1;
                     }
                     else
                     {
-                        aLayoutSize = aTempSize; //to re-gain fixed layout size
-                        aLayoutPos = aTempPnt;  //to re-gain fixed layout pos
-                        aLayoutSize.Height() = sal_Int32(aLayoutSize.Height() * propvalue[0]);
-                        aLayoutSize.Width() = sal_Int32(aLayoutSize.Width() * propvalue[1]);
-                        aLayoutPos.X() = sal_Int32(aLayoutPos.X() +(aLayoutSize.Width() * propvalue[2]));
-                        aLayoutPos.Y() = sal_Int32(aLayoutPos.Y() + (aLayoutSize.Height() * propvalue[3]));
-                        rRectangle[count] = Rectangle (aLayoutPos, aLayoutSize);
-                        count=count+1;
+                        Size aSize( basegfx::fround(aLayoutSize.Width() * propvalue[1]),
+                                    basegfx::fround(aLayoutSize.Height() * propvalue[0]) );
+                        Point aPos( basegfx::fround(aLayoutPos.X() +(aLayoutSize.Width() * propvalue[2])),
+                                    basegfx::fround(aLayoutPos.Y() + (aLayoutSize.Height() * propvalue[3])) );
+                        rRectangle[count] = Rectangle (aPos, aSize);
+                        count = count+1;
                     }
                 }
             }
@@ -1525,7 +1495,6 @@ void findAutoLayoutShapesImpl( SdPage& rPage, const LayoutDescriptor& rDescripto
 
 void SdPage::SetAutoLayout(AutoLayout eLayout, sal_Bool bInit, sal_Bool bCreate )
 {
-    rtl::OUString autolayout;
     sd::ScopeLockGuard aGuard( maLockAutoLayoutArrangement );
 
     const bool bSwitchLayout = eLayout != GetAutoLayout();
@@ -1546,12 +1515,11 @@ void SdPage::SetAutoLayout(AutoLayout eLayout, sal_Bool bInit, sal_Bool bCreate
 
     Rectangle aRectangle[MAX_PRESOBJS];
     const LayoutDescriptor& aDescriptor = GetLayoutDescriptor( meAutoLayout );
-    autolayout=enumtoString(meAutoLayout);
-    CalcAutoLayoutRectangles( *this, aRectangle, autolayout);
+    rtl::OUString sLayoutName( enumtoString(meAutoLayout) );
+    CalcAutoLayoutRectangles( *this, aRectangle, sLayoutName);
 
     std::set< SdrObject* > aUsedPresentationObjects;
 
-
     std::vector< SdrObject* > aLayoutShapes(PRESOBJ_MAX, 0);
     findAutoLayoutShapesImpl( *this, aDescriptor, aLayoutShapes, bInit, bSwitchLayout );
 
diff --git a/sd/xml/layoutlist.xml b/sd/xml/layoutlist.xml
index d7338ad..c5f8d5e 100644
--- a/sd/xml/layoutlist.xml
+++ b/sd/xml/layoutlist.xml
@@ -1,5 +1,10 @@
 <?xml version="1.0"?>
-<!-- At present I am not sure about corect XML namespace,so once I am aware of it.I am ready to add it.
+<!-- Configurable definitions of Impress slide layouts.
+
+     Currently the layout type name needs to match a set of predefined strings.
+     Per entry, you can declare up to one Title object, and up to four
+     Outline objects. All values are relative to Impress' 'layout
+     rect', which is roughly 90% of the available slide area.
 -->
 <layout-list>
     <layout type="AUTOLAYOUT_TITLE_CONTENT">
@@ -78,4 +83,4 @@
         <presobj kind="PRESOBJ_OUTLINE1" relative-height="1" relative-width="0.488" relative-posX="0" relative-posY="0"/>
         <presobj kind="PRESOBJ_OUTLINE2" relative-height="1" relative-width="0.488" relative-posX="1.05" relative-posY="0"/>
     </layout>
-</layout-list>
\ No newline at end of file
+</layout-list>
diff --git a/solenv/gbuild/CppunitTest.mk b/solenv/gbuild/CppunitTest.mk
index fb36b1b..48de328 100644
--- a/solenv/gbuild/CppunitTest.mk
+++ b/solenv/gbuild/CppunitTest.mk
@@ -53,6 +53,7 @@ gb_CppunitTest__get_linktargetname = CppunitTest/$(call gb_CppunitTest_get_filen
 define gb_CppunitTest__make_args
 $(HEADLESS) \
 "-env:BRAND_BASE_DIR=$(call gb_Helper_make_url,$(OUTDIR)/unittest/install)" \
+"-env:BRAND_SHARE_SUBDIR=share" \
 $(if $(URE),\
     $(if $(strip $(CONFIGURATION_LAYERS)),\
 	    "-env:CONFIGURATION_LAYERS=$(strip $(CONFIGURATION_LAYERS))") \
diff --git a/test/Package_unittest.mk b/test/Package_unittest.mk
index 1a83b4c..6edfc9c 100644
--- a/test/Package_unittest.mk
+++ b/test/Package_unittest.mk
@@ -19,7 +19,7 @@ $(eval $(call gb_Package_add_file,test_unittest,unittest/user/autotext/en-US/sta
 $(eval $(call gb_Package_add_file,test_unittest,unittest/user/autotext/en-US/crdbus50.bau,user/autotext/en-US/crdbus50.bau))
 $(eval $(call gb_Package_add_file,test_unittest,unittest/user/config/psetup.xpm,user/config/psetup.xpm))
 $(eval $(call gb_Package_add_file,test_unittest,unittest/install/share/config/soffice.cfg/simpress/transitions.xml,user/config/soffice.cfg/simpress/transitions.xml))
-$(eval $(call gb_Package_add_file,test_unittest,unittest/user/config/soffice.cfg/simpress/transitions-ogl.xml,user/config/soffice.cfg/simpress/transitions-ogl.xml))
+$(eval $(call gb_Package_add_file,test_unittest,unittest/install/share/config/soffice.cfg/simpress/transitions-ogl.xml,user/config/soffice.cfg/simpress/transitions-ogl.xml))
 $(eval $(call gb_Package_add_file,test_unittest,unittest/install/share/config/soffice.cfg/simpress/effects.xml,user/config/soffice.cfg/simpress/effects.xml))
 $(eval $(call gb_Package_add_file,test_unittest,unittest/install/share/config/soffice.cfg/simpress/layoutlist.xml,user/config/soffice.cfg/simpress/layoutlist.xml))
 $(eval $(call gb_Package_add_file,test_unittest,unittest/user/config/psetupl.xpm,user/config/psetupl.xpm))
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 d7338ad..c5f8d5e 100644
--- a/test/user-template/user/config/soffice.cfg/simpress/layoutlist.xml
+++ b/test/user-template/user/config/soffice.cfg/simpress/layoutlist.xml
@@ -1,5 +1,10 @@
 <?xml version="1.0"?>
-<!-- At present I am not sure about corect XML namespace,so once I am aware of it.I am ready to add it.
+<!-- Configurable definitions of Impress slide layouts.
+
+     Currently the layout type name needs to match a set of predefined strings.
+     Per entry, you can declare up to one Title object, and up to four
+     Outline objects. All values are relative to Impress' 'layout
+     rect', which is roughly 90% of the available slide area.
 -->
 <layout-list>
     <layout type="AUTOLAYOUT_TITLE_CONTENT">
@@ -78,4 +83,4 @@
         <presobj kind="PRESOBJ_OUTLINE1" relative-height="1" relative-width="0.488" relative-posX="0" relative-posY="0"/>
         <presobj kind="PRESOBJ_OUTLINE2" relative-height="1" relative-width="0.488" relative-posX="1.05" relative-posY="0"/>
     </layout>
-</layout-list>
\ No newline at end of file
+</layout-list>
commit f78db7cb1c973bd3c8f74fe4a226fb78ad7fbaff
Author: Vishv Brahmbhatt <vishvbrahmbhatt19 at gmail.com>
Date:   Fri Aug 23 19:03:39 2013 +0530

    Making changes to unit-test as well.
    
    Have made changes to unit-test file of 'layoutlist.xml' as well.
    
    Change-Id: Ia4d85fd7935a935b77dfbb475a38a087520865b4

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 08328e9..d7338ad 100644
--- a/test/user-template/user/config/soffice.cfg/simpress/layoutlist.xml
+++ b/test/user-template/user/config/soffice.cfg/simpress/layoutlist.xml
@@ -62,12 +62,12 @@
     </layout>
     <layout type="AUTOLAYOUT_VTITLE_VCONTENT">
         <presobj kind="PRESOBJ_TITLE" relative-height="4.6354" relative-width="0.139167" relative-posX="6.1856" relative-posY="0"/>
-        <presobj kind="PRESOBJ_OUTLINE1" relative-height="1.3347" relative-width="0.777778" relative-posX="0" relative-posY="-0.2508"/>
+        <presobj kind="PRESOBJ_OUTLINE1" relative-height="1.3347" relative-width="0.777778" relative-posX="0" relative-posY="-0.25078974"/>
     </layout>
     <layout type="AUTOLAYOUT_VTITLE_VCONTENT_OVER_VCONTENT">
         <presobj kind="PRESOBJ_TITLE" relative-height="4.6354" relative-width="0.139167" relative-posX="6.1856" relative-posY="0"/>
-        <presobj kind="PRESOBJ_OUTLINE1" relative-height="0.628" relative-width="0.777778" relative-posX="0" relative-posY="-0.5337"/>
-        <presobj kind="PRESOBJ_OUTLINE2" relative-height="0.628" relative-width="0.777778" relative-posX="0" relative-posY="0.594"/>
+        <presobj kind="PRESOBJ_OUTLINE1" relative-height="0.6272578" relative-width="0.777778" relative-posX="0" relative-posY="-0.53363874"/>
+        <presobj kind="PRESOBJ_OUTLINE2" relative-height="0.6272578" relative-width="0.777778" relative-posX="0" relative-posY="0.5939791"/>
     </layout>
     <layout type="AUTOLAYOUT_TITLE_VCONTENT">
         <presobj kind="PRESOBJ_TITLE" relative-height="1" relative-width="1" relative-posX="0" relative-posY="0"/>
commit 46ab418b8e1ab34e554777acd0198df3b25d57bf
Author: Vishv Brahmbhatt <vishvbrahmbhatt19 at gmail.com>
Date:   Fri Aug 23 18:27:32 2013 +0530

    Few changes to position co-ordinates of layouts.
    
    Made appropriate changes to the position co-ordinates of layoutlist.xml.And
    now diff of 'vertical layouts' comes empty.
    
    Change-Id: Idd4ced9e7551dc95fd42e2a9767894fff121914d

diff --git a/sd/xml/layoutlist.xml b/sd/xml/layoutlist.xml
index 08328e9..d7338ad 100644
--- a/sd/xml/layoutlist.xml
+++ b/sd/xml/layoutlist.xml
@@ -62,12 +62,12 @@
     </layout>
     <layout type="AUTOLAYOUT_VTITLE_VCONTENT">
         <presobj kind="PRESOBJ_TITLE" relative-height="4.6354" relative-width="0.139167" relative-posX="6.1856" relative-posY="0"/>
-        <presobj kind="PRESOBJ_OUTLINE1" relative-height="1.3347" relative-width="0.777778" relative-posX="0" relative-posY="-0.2508"/>
+        <presobj kind="PRESOBJ_OUTLINE1" relative-height="1.3347" relative-width="0.777778" relative-posX="0" relative-posY="-0.25078974"/>
     </layout>
     <layout type="AUTOLAYOUT_VTITLE_VCONTENT_OVER_VCONTENT">
         <presobj kind="PRESOBJ_TITLE" relative-height="4.6354" relative-width="0.139167" relative-posX="6.1856" relative-posY="0"/>
-        <presobj kind="PRESOBJ_OUTLINE1" relative-height="0.628" relative-width="0.777778" relative-posX="0" relative-posY="-0.5337"/>
-        <presobj kind="PRESOBJ_OUTLINE2" relative-height="0.628" relative-width="0.777778" relative-posX="0" relative-posY="0.594"/>
+        <presobj kind="PRESOBJ_OUTLINE1" relative-height="0.6272578" relative-width="0.777778" relative-posX="0" relative-posY="-0.53363874"/>
+        <presobj kind="PRESOBJ_OUTLINE2" relative-height="0.6272578" relative-width="0.777778" relative-posX="0" relative-posY="0.5939791"/>
     </layout>
     <layout type="AUTOLAYOUT_TITLE_VCONTENT">
         <presobj kind="PRESOBJ_TITLE" relative-height="1" relative-width="1" relative-posX="0" relative-posY="0"/>
commit 08913f858f62dba8331aeae0a9562a10bff912d5
Author: Vishv Brahmbhatt <vishvbrahmbhatt19 at gmail.com>
Date:   Fri Aug 16 00:13:14 2013 +0530

    Adding entries to "objectlist.xml"
    
    Few more entries are added to "objectlist.xml".Only last two magic numbers
    of "sdpage.cxx" are left to be handled.They are slightly different from
    rest of the entries.
    
    Change-Id: Ic1481606a360695dc57174e5e4037169f91bd611

diff --git a/sd/xml/objectlist.xml b/sd/xml/objectlist.xml
index d2c6d9b..b354185 100644
--- a/sd/xml/objectlist.xml
+++ b/sd/xml/objectlist.xml
@@ -1,8 +1,19 @@
 <?xml version="1.0"?>
 <object-list>
     <object pagekind="PK_STANDARD" type="PRESOBJ_DATETIME" relative-height="0.069" relative-width="0.233" relative-posX="0.05" relative-posY="0.911"/>
-    <object pagekind="PK_HANDOUT" type="PRESOBJ_DATETIME" relative-height="1" relative-width="1" relative-posX="0.434" relative-posY="0.05"/>
-    <object pagekind="PK_NOTES" type="PRESOBJ_DATETIME" relative-height="1" relative-width="1" relative-posX="0.434" relative-posY="0.05"/>
+    <object pagekind="PK_HANDOUT" type="PRESOBJ_DATETIME" relative-height="0.434" relative-width="0.05" relative-posX="0.434" relative-posY="0"/>
+    <object pagekind="PK_NOTES" type="PRESOBJ_DATETIME" relative-height="0.434" relative-width="0.05" relative-posX="0.434" relative-posY="0"/>
+    <object pagekind="PK_STANDARD" type="PRESOBJ_FOOTER" relative-height="0.069" relative-width="0.317" relative-posX="0.342" relative-posY="0.911"/>
+    <object pagekind="PK_HANDOUT" type="PRESOBJ_FOOTER" relative-height="0.434" relative-width="0.05" relative-posX="0" relative-posY="0.05"/>
+    <object pagekind="PK_NOTES" type="PRESOBJ_FOOTER" relative-height="0.434" relative-width="0.05" relative-posX="0" relative-posY="0.05"/>
+    <object pagekind="PK_STANDARD" type="PRESOBJ_SLIDENUMBER" relative-height="0.069" relative-width="0.317" relative-posX="0.717" relative-posY="0.911"/>
+    <object pagekind="PK_HANDOUT" type="PRESOBJ_SLIDENUMBER" relative-height="0.434" relative-width="0.05" relative-posX="0" relative-posY="0.05"/>
+    <object pagekind="PK_NOTES" type="PRESOBJ_SLIDENUMBER" relative-height="0.434" relative-width="0.05" relative-posX="0" relative-posY="0.05"/>
+    <object pagekind="PK_STANDARD" type="PRESOBJ_HEADER" relative-height="0.069" relative-width="0.317" relative-posX="0.717" relative-posY="0.911"/>
+    <object pagekind="PK_HANDOUT" type="PRESOBJ_HEADER" relative-height="0.434" relative-width="0.05" relative-posX="0" relative-posY="0"/>
+    <object pagekind="PK_NOTES" type="PRESOBJ_HEADER" relative-height="0.434" relative-width="0.05" relative-posX="0" relative-posY="0"/>
     <object pagekind="PK_STANDARD" type="PRESOBJ_TITLE" relative-height="0.167" relative-width="0.9" relative-posX="0.05" relative-posY="0.0399"/>
     <object pagekind="PK_NOTES" type="PRESOBJ_TITLE" relative-height="0.375" relative-width="1" relative-posX="0" relative-posY="0.076"/>
+    <object pagekind="PK_STANDARD" type="PRESOBJ_OUTLINE" relative-height="0.58" relative-width="0.9" relative-posX="0.05" relative-posY="0.234"/>
+    <object pagekind="PK_NOTES" type="PRESOBJ_OUTLINE" relative-height="0.45" relative-width="0.1" relative-posX="0.1" relative-posY="0.475"/>
 </object-list>
\ No newline at end of file
commit c3631606a369f61ce508b70500a8aa4bfbe025f3
Author: Vishv Brahmbhatt <vishvbrahmbhatt19 at gmail.com>
Date:   Thu Aug 15 22:35:08 2013 +0530

    Creating a new demo XML file
    
    A small demo version of new XML file, to store the remaining of the 'magic numbers' left in the
    "sdpage.cxx".
    
    Change-Id: I2883782dbdfd5a68f707631faec2e7b1d62a00de

diff --git a/sd/xml/objectlist.xml b/sd/xml/objectlist.xml
new file mode 100644
index 0000000..d2c6d9b
--- /dev/null
+++ b/sd/xml/objectlist.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0"?>
+<object-list>
+    <object pagekind="PK_STANDARD" type="PRESOBJ_DATETIME" relative-height="0.069" relative-width="0.233" relative-posX="0.05" relative-posY="0.911"/>
+    <object pagekind="PK_HANDOUT" type="PRESOBJ_DATETIME" relative-height="1" relative-width="1" relative-posX="0.434" relative-posY="0.05"/>
+    <object pagekind="PK_NOTES" type="PRESOBJ_DATETIME" relative-height="1" relative-width="1" relative-posX="0.434" relative-posY="0.05"/>
+    <object pagekind="PK_STANDARD" type="PRESOBJ_TITLE" relative-height="0.167" relative-width="0.9" relative-posX="0.05" relative-posY="0.0399"/>
+    <object pagekind="PK_NOTES" type="PRESOBJ_TITLE" relative-height="0.375" relative-width="1" relative-posX="0" relative-posY="0.076"/>
+</object-list>
\ No newline at end of file
commit 2c6e9b2da2a02e22fc70ad1098aedce38f3538ce
Author: Vishv Brahmbhatt <vishvbrahmbhatt19 at gmail.com>
Date:   Thu Aug 15 21:02:39 2013 +0530

    Deleting the required files.
    
    The files were left to be deleted in the previous commit ,now deleting them.
    
    Change-Id: I1243e6383d3cd96dccf1a786e9b9fc840e46f0a7

diff --git a/test/user-template/user/autocorr/empty_directory b/test/user-template/user/autocorr/empty_directory
deleted file mode 100644
index e69de29..0000000
diff --git a/test/user-template/user/config/soffice.cfg/modules/empty_directory b/test/user-template/user/config/soffice.cfg/modules/empty_directory
deleted file mode 100644
index e69de29..0000000
diff --git a/test/user-template/user/dtd/empty_directory b/test/user-template/user/dtd/empty_directory
deleted file mode 100644
index e69de29..0000000
diff --git a/test/user-template/user/gallery/empty_directory b/test/user-template/user/gallery/empty_directory
deleted file mode 100644
index e69de29..0000000
diff --git a/test/user-template/user/psprint/driver/empty_directory b/test/user-template/user/psprint/driver/empty_directory
deleted file mode 100644
index e69de29..0000000
diff --git a/test/user-template/user/psprint/fontmetric/empty_directory b/test/user-template/user/psprint/fontmetric/empty_directory
deleted file mode 100644
index e69de29..0000000
diff --git a/test/user-template/user/template/empty_directory b/test/user-template/user/template/empty_directory
deleted file mode 100644
index e69de29..0000000
commit 14c81676d1eed017e1d15bf6d6b268d2a00af216
Author: Vishv Brahmbhatt <vishvbrahmbhatt19 at gmail.com>
Date:   Thu Aug 15 20:51:52 2013 +0530

    Deleting useless unit-test files/directory.
    
    Deleting the "empty_directory" entries of "unittest/user/*" in 'Package_unittest.mk' and corresponding
    files from the "test/user-template/*" directory.
    
    Change-Id: Ia53a18bf7d55bfaba91f9bb8c2a15d3578e35e11

diff --git a/test/Package_unittest.mk b/test/Package_unittest.mk
index 6df47f7..1a83b4c 100644
--- a/test/Package_unittest.mk
+++ b/test/Package_unittest.mk
@@ -14,10 +14,6 @@ $(eval $(call gb_Package_add_file,test_unittest,unittest/user/wordbook/sl.dic,us
 $(eval $(call gb_Package_add_file,test_unittest,unittest/user/wordbook/en-US.dic,user/wordbook/en-US.dic))
 $(eval $(call gb_Package_add_file,test_unittest,unittest/user/wordbook/technical.dic,user/wordbook/technical.dic))
 $(eval $(call gb_Package_add_file,test_unittest,unittest/user/wordbook/en-GB.dic,user/wordbook/en-GB.dic))
-$(eval $(call gb_Package_add_file,test_unittest,unittest/user/gallery/empty_directory,user/gallery/empty_directory))
-$(eval $(call gb_Package_add_file,test_unittest,unittest/user/dtd/empty_directory,user/dtd/empty_directory))
-$(eval $(call gb_Package_add_file,test_unittest,unittest/user/psprint/fontmetric/empty_directory,user/psprint/fontmetric/empty_directory))
-$(eval $(call gb_Package_add_file,test_unittest,unittest/user/psprint/driver/empty_directory,user/psprint/driver/empty_directory))
 $(eval $(call gb_Package_add_file,test_unittest,unittest/user/autotext/en-US/template.bau,user/autotext/en-US/template.bau))
 $(eval $(call gb_Package_add_file,test_unittest,unittest/user/autotext/en-US/standard.bau,user/autotext/en-US/standard.bau))
 $(eval $(call gb_Package_add_file,test_unittest,unittest/user/autotext/en-US/crdbus50.bau,user/autotext/en-US/crdbus50.bau))
@@ -26,9 +22,6 @@ $(eval $(call gb_Package_add_file,test_unittest,unittest/install/share/config/so
 $(eval $(call gb_Package_add_file,test_unittest,unittest/user/config/soffice.cfg/simpress/transitions-ogl.xml,user/config/soffice.cfg/simpress/transitions-ogl.xml))
 $(eval $(call gb_Package_add_file,test_unittest,unittest/install/share/config/soffice.cfg/simpress/effects.xml,user/config/soffice.cfg/simpress/effects.xml))
 $(eval $(call gb_Package_add_file,test_unittest,unittest/install/share/config/soffice.cfg/simpress/layoutlist.xml,user/config/soffice.cfg/simpress/layoutlist.xml))
-$(eval $(call gb_Package_add_file,test_unittest,unittest/user/config/soffice.cfg/modules/empty_directory,user/config/soffice.cfg/modules/empty_directory))
 $(eval $(call gb_Package_add_file,test_unittest,unittest/user/config/psetupl.xpm,user/config/psetupl.xpm))
-$(eval $(call gb_Package_add_file,test_unittest,unittest/user/autocorr/empty_directory,user/autocorr/empty_directory))
-$(eval $(call gb_Package_add_file,test_unittest,unittest/user/template/empty_directory,user/template/empty_directory))
 
 # vim: set noet sw=4 ts=4:
commit 8a1ccacb5970a1f8daad4f0b0a2531a123130cad
Author: Vishv Brahmbhatt <vishvbrahmbhatt19 at gmail.com>
Date:   Thu Aug 15 18:44:00 2013 +0530

    Few name conventions changes.
    
    Changed the name of attributes from "title-shape-relative-height" to "relative-height" & all others.
    
    Change-Id: I3010e8faf8a9bf347a7bec366449bbba77f0a69f

diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx
index 753b07e..64dbefd 100644
--- a/sd/source/core/sdpage.cxx
+++ b/sd/source/core/sdpage.cxx
@@ -1317,19 +1317,19 @@ static void CalcAutoLayoutRectangles( SdPage& rPage,Rectangle* rRectangle ,const
                 {
                     Reference<XNamedNodeMap> presObjAttributes = presobj->getAttributes();
 
-                    Reference<XNode> presObjSizeHeight = presObjAttributes->getNamedItem("title-shape-relative-height");
+                    Reference<XNode> presObjSizeHeight = presObjAttributes->getNamedItem("relative-height");
                     rtl::OUString sValue = presObjSizeHeight->getNodeValue();
                     propvalue[0] = sValue.toDouble();
 
-                    Reference<XNode> presObjSizeWidth = presObjAttributes->getNamedItem("title-shape-relative-width");
+                    Reference<XNode> presObjSizeWidth = presObjAttributes->getNamedItem("relative-width");
                     sValue = presObjSizeWidth->getNodeValue();
                     propvalue[1] = sValue.toDouble();
 
-                    Reference<XNode> presObjPosX = presObjAttributes->getNamedItem("title-shape-relative-posX");
+                    Reference<XNode> presObjPosX = presObjAttributes->getNamedItem("relative-posX");
                     sValue = presObjPosX->getNodeValue();
                     propvalue[2] = sValue.toDouble();
 
-                    Reference<XNode> presObjPosY = presObjAttributes->getNamedItem("title-shape-relative-posY");
+                    Reference<XNode> presObjPosY = presObjAttributes->getNamedItem("relative-posY");
                     sValue = presObjPosY->getNodeValue();
                     propvalue[3] = sValue.toDouble();
 
diff --git a/sd/xml/layoutlist.xml b/sd/xml/layoutlist.xml
index b99a18f..08328e9 100644
--- a/sd/xml/layoutlist.xml
+++ b/sd/xml/layoutlist.xml
@@ -3,79 +3,79 @@
 -->
 <layout-list>
     <layout type="AUTOLAYOUT_TITLE_CONTENT">
-        <presobj kind="PRESOBJ_TITLE" title-shape-relative-height="1" title-shape-relative-width="1" title-shape-relative-posX="0" title-shape-relative-posY="0"/>
-        <presobj kind="PRESOBJ_OUTLINE1" title-shape-relative-height="1" title-shape-relative-width="1" title-shape-relative-posX="0" title-shape-relative-posY="0"/>
+        <presobj kind="PRESOBJ_TITLE" relative-height="1" relative-width="1" relative-posX="0" relative-posY="0"/>
+        <presobj kind="PRESOBJ_OUTLINE1" relative-height="1" relative-width="1" relative-posX="0" relative-posY="0"/>
     </layout>
     <layout type="AUTOLAYOUT_TITLE_2CONTENT">
-        <presobj kind="PRESOBJ_TITLE" title-shape-relative-height="1" title-shape-relative-width="1" title-shape-relative-posX="0" title-shape-relative-posY="0"/>
-        <presobj kind="PRESOBJ_OUTLINE1" title-shape-relative-height="1" title-shape-relative-width="0.488" title-shape-relative-posX="0" title-shape-relative-posY="0"/>
-        <presobj kind="PRESOBJ_OUTLINE2" title-shape-relative-height="1" title-shape-relative-width="0.488" title-shape-relative-posX="1.05" title-shape-relative-posY="0"/>
+        <presobj kind="PRESOBJ_TITLE" relative-height="1" relative-width="1" relative-posX="0" relative-posY="0"/>
+        <presobj kind="PRESOBJ_OUTLINE1" relative-height="1" relative-width="0.488" relative-posX="0" relative-posY="0"/>
+        <presobj kind="PRESOBJ_OUTLINE2" relative-height="1" relative-width="0.488" relative-posX="1.05" relative-posY="0"/>
     </layout>
     <layout type="AUTOLAYOUT_TITLE_CONTENT_OVER_CONTENT">
-        <presobj kind="PRESOBJ_TITLE" title-shape-relative-height="1" title-shape-relative-width="1" title-shape-relative-posX="0" title-shape-relative-posY="0"/>
-        <presobj kind="PRESOBJ_OUTLINE1" title-shape-relative-height="0.477" title-shape-relative-width="1" title-shape-relative-posX="0" title-shape-relative-posY="0"/>
-        <presobj kind="PRESOBJ_OUTLINE2" title-shape-relative-height="0.477" title-shape-relative-width="1" title-shape-relative-posX="0" title-shape-relative-posY="1.095"/>
+        <presobj kind="PRESOBJ_TITLE" relative-height="1" relative-width="1" relative-posX="0" relative-posY="0"/>
+        <presobj kind="PRESOBJ_OUTLINE1" relative-height="0.477" relative-width="1" relative-posX="0" relative-posY="0"/>
+        <presobj kind="PRESOBJ_OUTLINE2" relative-height="0.477" relative-width="1" relative-posX="0" relative-posY="1.095"/>
     </layout>
     <layout type="AUTOLAYOUT_TITLE_CONTENT_2CONTENT">
-        <presobj kind="PRESOBJ_TITLE" title-shape-relative-height="1" title-shape-relative-width="1" title-shape-relative-posX="0" title-shape-relative-posY="0"/>
-        <presobj kind="PRESOBJ_OUTLINE1" title-shape-relative-height="1" title-shape-relative-width="0.488" title-shape-relative-posX="0" title-shape-relative-posY="0"/>
-        <presobj kind="PRESOBJ_OUTLINE2" title-shape-relative-height="0.477" title-shape-relative-width="0.488" title-shape-relative-posX="1.05" title-shape-relative-posY="0"/>
-        <presobj kind="PRESOBJ_OUTLINE3" title-shape-relative-height="0.477" title-shape-relative-width="0.488" title-shape-relative-posX="1.05" title-shape-relative-posY="1.095"/>
+        <presobj kind="PRESOBJ_TITLE" relative-height="1" relative-width="1" relative-posX="0" relative-posY="0"/>
+        <presobj kind="PRESOBJ_OUTLINE1" relative-height="1" relative-width="0.488" relative-posX="0" relative-posY="0"/>
+        <presobj kind="PRESOBJ_OUTLINE2" relative-height="0.477" relative-width="0.488" relative-posX="1.05" relative-posY="0"/>
+        <presobj kind="PRESOBJ_OUTLINE3" relative-height="0.477" relative-width="0.488" relative-posX="1.05" relative-posY="1.095"/>
     </layout>
     <layout type="AUTOLAYOUT_TITLE_4CONTENT">
-        <presobj kind="PRESOBJ_TITLE" title-shape-relative-height="1" title-shape-relative-width="1" title-shape-relative-posX="0" title-shape-relative-posY="0"/>
-        <presobj kind="PRESOBJ_OUTLINE1" title-shape-relative-height="0.477" title-shape-relative-width="0.488" title-shape-relative-posX="0" title-shape-relative-posY="0"/>
-        <presobj kind="PRESOBJ_OUTLINE2" title-shape-relative-height="0.477" title-shape-relative-width="0.488" title-shape-relative-posX="1.05" title-shape-relative-posY="0"/>
-        <presobj kind="PRESOBJ_OUTLINE3" title-shape-relative-height="0.477" title-shape-relative-width="0.488" title-shape-relative-posX="1.05" title-shape-relative-posY="1.095"/>
-        <presobj kind="PRESOBJ_OUTLINE4" title-shape-relative-height="0.477" title-shape-relative-width="0.488" title-shape-relative-posX="0" title-shape-relative-posY="1.095"/>
+        <presobj kind="PRESOBJ_TITLE" relative-height="1" relative-width="1" relative-posX="0" relative-posY="0"/>
+        <presobj kind="PRESOBJ_OUTLINE1" relative-height="0.477" relative-width="0.488" relative-posX="0" relative-posY="0"/>
+        <presobj kind="PRESOBJ_OUTLINE2" relative-height="0.477" relative-width="0.488" relative-posX="1.05" relative-posY="0"/>
+        <presobj kind="PRESOBJ_OUTLINE3" relative-height="0.477" relative-width="0.488" relative-posX="1.05" relative-posY="1.095"/>
+        <presobj kind="PRESOBJ_OUTLINE4" relative-height="0.477" relative-width="0.488" relative-posX="0" relative-posY="1.095"/>
     </layout>
     <layout type="AUTOLAYOUT_ONLY_TEXT">
-        <presobj kind="PRESOBJ_OUTLINE1" title-shape-relative-height="4.6354" title-shape-relative-width="1" title-shape-relative-posX="0" title-shape-relative-posY="0"/>
+        <presobj kind="PRESOBJ_OUTLINE1" relative-height="4.6354" relative-width="1" relative-posX="0" relative-posY="0"/>
     </layout>
     <layout type="AUTOLAYOUT_TITLE_ONLY">
-        <presobj kind="PRESOBJ_TITLE" title-shape-relative-height="1" title-shape-relative-width="1" title-shape-relative-posX="0" title-shape-relative-posY="0"/>
+        <presobj kind="PRESOBJ_TITLE" relative-height="1" relative-width="1" relative-posX="0" relative-posY="0"/>
     </layout>
     <layout type="AUTOLAYOUT_TITLE_6CONTENT">
-        <presobj kind="PRESOBJ_TITLE" title-shape-relative-height="1" title-shape-relative-width="1" title-shape-relative-posX="0" title-shape-relative-posY="0"/>
-        <presobj kind="PRESOBJ_OUTLINE1" title-shape-relative-height="0.477" title-shape-relative-width="0.322" title-shape-relative-posX="0" title-shape-relative-posY="0"/>
-        <presobj kind="PRESOBJ_OUTLINE2" title-shape-relative-height="0.477" title-shape-relative-width="0.322" title-shape-relative-posX="1.05" title-shape-relative-posY="0"/>
-        <presobj kind="PRESOBJ_OUTLINE3" title-shape-relative-height="0.477" title-shape-relative-width="0.322" title-shape-relative-posX="2.10" title-shape-relative-posY="0"/>
-        <presobj kind="PRESOBJ_OUTLINE4" title-shape-relative-height="0.477" title-shape-relative-width="0.322" title-shape-relative-posX="2.10" title-shape-relative-posY="1.095"/>
-        <presobj kind="PRESOBJ_OUTLINE5" title-shape-relative-height="0.477" title-shape-relative-width="0.322" title-shape-relative-posX="1.05" title-shape-relative-posY="1.095"/>
-        <presobj kind="PRESOBJ_OUTLINE6" title-shape-relative-height="0.477" title-shape-relative-width="0.322" title-shape-relative-posX="0" title-shape-relative-posY="1.095"/>
+        <presobj kind="PRESOBJ_TITLE" relative-height="1" relative-width="1" relative-posX="0" relative-posY="0"/>
+        <presobj kind="PRESOBJ_OUTLINE1" relative-height="0.477" relative-width="0.322" relative-posX="0" relative-posY="0"/>
+        <presobj kind="PRESOBJ_OUTLINE2" relative-height="0.477" relative-width="0.322" relative-posX="1.05" relative-posY="0"/>
+        <presobj kind="PRESOBJ_OUTLINE3" relative-height="0.477" relative-width="0.322" relative-posX="2.10" relative-posY="0"/>
+        <presobj kind="PRESOBJ_OUTLINE4" relative-height="0.477" relative-width="0.322" relative-posX="2.10" relative-posY="1.095"/>
+        <presobj kind="PRESOBJ_OUTLINE5" relative-height="0.477" relative-width="0.322" relative-posX="1.05" relative-posY="1.095"/>
+        <presobj kind="PRESOBJ_OUTLINE6" relative-height="0.477" relative-width="0.322" relative-posX="0" relative-posY="1.095"/>
     </layout>
     <layout type="AUTOLAYOUT__START">
-        <presobj kind="PRESOBJ_TITLE" title-shape-relative-height="1" title-shape-relative-width="1" title-shape-relative-posX="0" title-shape-relative-posY="0"/>
-        <presobj kind="PRESOBJ_OUTLINE1" title-shape-relative-height="1" title-shape-relative-width="1" title-shape-relative-posX="0" title-shape-relative-posY="0"/>
+        <presobj kind="PRESOBJ_TITLE" relative-height="1" relative-width="1" relative-posX="0" relative-posY="0"/>
+        <presobj kind="PRESOBJ_OUTLINE1" relative-height="1" relative-width="1" relative-posX="0" relative-posY="0"/>
     </layout>
     <layout type="AUTOLAYOUT_TITLE_2CONTENT_CONTENT">
-        <presobj kind="PRESOBJ_TITLE" title-shape-relative-height="1" title-shape-relative-width="1" title-shape-relative-posX="0" title-shape-relative-posY="0"/>
-        <presobj kind="PRESOBJ_OUTLINE1" title-shape-relative-height="0.477" title-shape-relative-width="0.488" title-shape-relative-posX="0" title-shape-relative-posY="0"/>
-        <presobj kind="PRESOBJ_OUTLINE2" title-shape-relative-height="0.477" title-shape-relative-width="0.488" title-shape-relative-posX="0" title-shape-relative-posY="1.095"/>
-        <presobj kind="PRESOBJ_OUTLINE3" title-shape-relative-height="1" title-shape-relative-width="0.488" title-shape-relative-posX="1.05" title-shape-relative-posY="0"/>
+        <presobj kind="PRESOBJ_TITLE" relative-height="1" relative-width="1" relative-posX="0" relative-posY="0"/>
+        <presobj kind="PRESOBJ_OUTLINE1" relative-height="0.477" relative-width="0.488" relative-posX="0" relative-posY="0"/>
+        <presobj kind="PRESOBJ_OUTLINE2" relative-height="0.477" relative-width="0.488" relative-posX="0" relative-posY="1.095"/>
+        <presobj kind="PRESOBJ_OUTLINE3" relative-height="1" relative-width="0.488" relative-posX="1.05" relative-posY="0"/>
     </layout>
     <layout type="AUTOLAYOUT_TITLE_2CONTENT_OVER_CONTENT">
-        <presobj kind="PRESOBJ_TITLE" title-shape-relative-height="1" title-shape-relative-width="1" title-shape-relative-posX="0" title-shape-relative-posY="0"/>
-        <presobj kind="PRESOBJ_OUTLINE1" title-shape-relative-height="0.477" title-shape-relative-width="0.488" title-shape-relative-posX="0" title-shape-relative-posY="0"/>
-        <presobj kind="PRESOBJ_OUTLINE2" title-shape-relative-height="0.477" title-shape-relative-width="0.488" title-shape-relative-posX="1.05" title-shape-relative-posY="0"/>
-        <presobj kind="PRESOBJ_OUTLINE3" title-shape-relative-height="0.477" title-shape-relative-width="1" title-shape-relative-posX="0" title-shape-relative-posY="1.095"/>
+        <presobj kind="PRESOBJ_TITLE" relative-height="1" relative-width="1" relative-posX="0" relative-posY="0"/>
+        <presobj kind="PRESOBJ_OUTLINE1" relative-height="0.477" relative-width="0.488" relative-posX="0" relative-posY="0"/>
+        <presobj kind="PRESOBJ_OUTLINE2" relative-height="0.477" relative-width="0.488" relative-posX="1.05" relative-posY="0"/>
+        <presobj kind="PRESOBJ_OUTLINE3" relative-height="0.477" relative-width="1" relative-posX="0" relative-posY="1.095"/>
     </layout>
     <layout type="AUTOLAYOUT_VTITLE_VCONTENT">
-        <presobj kind="PRESOBJ_TITLE" title-shape-relative-height="4.6354" title-shape-relative-width="0.139167" title-shape-relative-posX="6.1856" title-shape-relative-posY="0"/>
-        <presobj kind="PRESOBJ_OUTLINE1" title-shape-relative-height="1.3347" title-shape-relative-width="0.777778" title-shape-relative-posX="0" title-shape-relative-posY="-0.2508"/>
+        <presobj kind="PRESOBJ_TITLE" relative-height="4.6354" relative-width="0.139167" relative-posX="6.1856" relative-posY="0"/>
+        <presobj kind="PRESOBJ_OUTLINE1" relative-height="1.3347" relative-width="0.777778" relative-posX="0" relative-posY="-0.2508"/>
     </layout>
     <layout type="AUTOLAYOUT_VTITLE_VCONTENT_OVER_VCONTENT">
-        <presobj kind="PRESOBJ_TITLE" title-shape-relative-height="4.6354" title-shape-relative-width="0.139167" title-shape-relative-posX="6.1856" title-shape-relative-posY="0"/>
-        <presobj kind="PRESOBJ_OUTLINE1" title-shape-relative-height="0.628" title-shape-relative-width="0.777778" title-shape-relative-posX="0" title-shape-relative-posY="-0.5337"/>
-        <presobj kind="PRESOBJ_OUTLINE2" title-shape-relative-height="0.628" title-shape-relative-width="0.777778" title-shape-relative-posX="0" title-shape-relative-posY="0.594"/>
+        <presobj kind="PRESOBJ_TITLE" relative-height="4.6354" relative-width="0.139167" relative-posX="6.1856" relative-posY="0"/>
+        <presobj kind="PRESOBJ_OUTLINE1" relative-height="0.628" relative-width="0.777778" relative-posX="0" relative-posY="-0.5337"/>
+        <presobj kind="PRESOBJ_OUTLINE2" relative-height="0.628" relative-width="0.777778" relative-posX="0" relative-posY="0.594"/>
     </layout>
     <layout type="AUTOLAYOUT_TITLE_VCONTENT">
-        <presobj kind="PRESOBJ_TITLE" title-shape-relative-height="1" title-shape-relative-width="1" title-shape-relative-posX="0" title-shape-relative-posY="0"/>
-        <presobj kind="PRESOBJ_OUTLINE1" title-shape-relative-height="1" title-shape-relative-width="1" title-shape-relative-posX="0" title-shape-relative-posY="0"/>
+        <presobj kind="PRESOBJ_TITLE" relative-height="1" relative-width="1" relative-posX="0" relative-posY="0"/>
+        <presobj kind="PRESOBJ_OUTLINE1" relative-height="1" relative-width="1" relative-posX="0" relative-posY="0"/>
     </layout>
     <layout type="AUTOLAYOUT_TITLE_2VTEXT">
-        <presobj kind="PRESOBJ_TITLE" title-shape-relative-height="1" title-shape-relative-width="1" title-shape-relative-posX="0" title-shape-relative-posY="0"/>
-        <presobj kind="PRESOBJ_OUTLINE1" title-shape-relative-height="1" title-shape-relative-width="0.488" title-shape-relative-posX="0" title-shape-relative-posY="0"/>
-        <presobj kind="PRESOBJ_OUTLINE2" title-shape-relative-height="1" title-shape-relative-width="0.488" title-shape-relative-posX="1.05" title-shape-relative-posY="0"/>
+        <presobj kind="PRESOBJ_TITLE" relative-height="1" relative-width="1" relative-posX="0" relative-posY="0"/>
+        <presobj kind="PRESOBJ_OUTLINE1" relative-height="1" relative-width="0.488" relative-posX="0" relative-posY="0"/>
+        <presobj kind="PRESOBJ_OUTLINE2" relative-height="1" relative-width="0.488" relative-posX="1.05" relative-posY="0"/>
     </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 d02bf2a..08328e9 100644
--- a/test/user-template/user/config/soffice.cfg/simpress/layoutlist.xml
+++ b/test/user-template/user/config/soffice.cfg/simpress/layoutlist.xml
@@ -3,61 +3,79 @@
 -->
 <layout-list>
     <layout type="AUTOLAYOUT_TITLE_CONTENT">
-        <presobj kind="PRESOBJ_TITLE" title-shape-relative-height="1" title-shape-relative-width="1" title-shape-relative-posX="0" title-shape-relative-posY="0"/>
-        <presobj kind="PRESOBJ_OUTLINE1" title-shape-relative-height="1" title-shape-relative-width="1" title-shape-relative-posX="0" title-shape-relative-posY="0"/>
+        <presobj kind="PRESOBJ_TITLE" relative-height="1" relative-width="1" relative-posX="0" relative-posY="0"/>
+        <presobj kind="PRESOBJ_OUTLINE1" relative-height="1" relative-width="1" relative-posX="0" relative-posY="0"/>
     </layout>
     <layout type="AUTOLAYOUT_TITLE_2CONTENT">
-        <presobj kind="PRESOBJ_TITLE" title-shape-relative-height="1" title-shape-relative-width="1" title-shape-relative-posX="0" title-shape-relative-posY="0"/>
-        <presobj kind="PRESOBJ_OUTLINE1" title-shape-relative-height="1" title-shape-relative-width="0.488" title-shape-relative-posX="0" title-shape-relative-posY="0"/>
-        <presobj kind="PRESOBJ_OUTLINE2" title-shape-relative-height="1" title-shape-relative-width="0.488" title-shape-relative-posX="1.05" title-shape-relative-posY="0"/>
+        <presobj kind="PRESOBJ_TITLE" relative-height="1" relative-width="1" relative-posX="0" relative-posY="0"/>
+        <presobj kind="PRESOBJ_OUTLINE1" relative-height="1" relative-width="0.488" relative-posX="0" relative-posY="0"/>
+        <presobj kind="PRESOBJ_OUTLINE2" relative-height="1" relative-width="0.488" relative-posX="1.05" relative-posY="0"/>
     </layout>
     <layout type="AUTOLAYOUT_TITLE_CONTENT_OVER_CONTENT">
-        <presobj kind="PRESOBJ_TITLE" title-shape-relative-height="1" title-shape-relative-width="1" title-shape-relative-posX="0" title-shape-relative-posY="0"/>
-        <presobj kind="PRESOBJ_OUTLINE1" title-shape-relative-height="0.477" title-shape-relative-width="1" title-shape-relative-posX="0" title-shape-relative-posY="0"/>
-        <presobj kind="PRESOBJ_OUTLINE2" title-shape-relative-height="0.477" title-shape-relative-width="1" title-shape-relative-posX="0" title-shape-relative-posY="1.095"/>
+        <presobj kind="PRESOBJ_TITLE" relative-height="1" relative-width="1" relative-posX="0" relative-posY="0"/>
+        <presobj kind="PRESOBJ_OUTLINE1" relative-height="0.477" relative-width="1" relative-posX="0" relative-posY="0"/>
+        <presobj kind="PRESOBJ_OUTLINE2" relative-height="0.477" relative-width="1" relative-posX="0" relative-posY="1.095"/>
     </layout>
     <layout type="AUTOLAYOUT_TITLE_CONTENT_2CONTENT">
-        <presobj kind="PRESOBJ_TITLE" title-shape-relative-height="1" title-shape-relative-width="1" title-shape-relative-posX="0" title-shape-relative-posY="0"/>
-        <presobj kind="PRESOBJ_OUTLINE1" title-shape-relative-height="1" title-shape-relative-width="0.488" title-shape-relative-posX="0" title-shape-relative-posY="0"/>
-        <presobj kind="PRESOBJ_OUTLINE2" title-shape-relative-height="0.477" title-shape-relative-width="0.488" title-shape-relative-posX="1.05" title-shape-relative-posY="0"/>
-        <presobj kind="PRESOBJ_OUTLINE3" title-shape-relative-height="0.477" title-shape-relative-width="0.488" title-shape-relative-posX="1.05" title-shape-relative-posY="1.095"/>
+        <presobj kind="PRESOBJ_TITLE" relative-height="1" relative-width="1" relative-posX="0" relative-posY="0"/>
+        <presobj kind="PRESOBJ_OUTLINE1" relative-height="1" relative-width="0.488" relative-posX="0" relative-posY="0"/>
+        <presobj kind="PRESOBJ_OUTLINE2" relative-height="0.477" relative-width="0.488" relative-posX="1.05" relative-posY="0"/>
+        <presobj kind="PRESOBJ_OUTLINE3" relative-height="0.477" relative-width="0.488" relative-posX="1.05" relative-posY="1.095"/>
     </layout>
     <layout type="AUTOLAYOUT_TITLE_4CONTENT">
-        <presobj kind="PRESOBJ_TITLE" title-shape-relative-height="1" title-shape-relative-width="1" title-shape-relative-posX="0" title-shape-relative-posY="0"/>
-        <presobj kind="PRESOBJ_OUTLINE1" title-shape-relative-height="0.477" title-shape-relative-width="0.488" title-shape-relative-posX="0" title-shape-relative-posY="0"/>
-        <presobj kind="PRESOBJ_OUTLINE2" title-shape-relative-height="0.477" title-shape-relative-width="0.488" title-shape-relative-posX="1.05" title-shape-relative-posY="0"/>
-        <presobj kind="PRESOBJ_OUTLINE3" title-shape-relative-height="0.477" title-shape-relative-width="0.488" title-shape-relative-posX="1.05" title-shape-relative-posY="1.095"/>
-        <presobj kind="PRESOBJ_OUTLINE4" title-shape-relative-height="0.477" title-shape-relative-width="0.488" title-shape-relative-posX="0" title-shape-relative-posY="1.095"/>
+        <presobj kind="PRESOBJ_TITLE" relative-height="1" relative-width="1" relative-posX="0" relative-posY="0"/>
+        <presobj kind="PRESOBJ_OUTLINE1" relative-height="0.477" relative-width="0.488" relative-posX="0" relative-posY="0"/>
+        <presobj kind="PRESOBJ_OUTLINE2" relative-height="0.477" relative-width="0.488" relative-posX="1.05" relative-posY="0"/>
+        <presobj kind="PRESOBJ_OUTLINE3" relative-height="0.477" relative-width="0.488" relative-posX="1.05" relative-posY="1.095"/>
+        <presobj kind="PRESOBJ_OUTLINE4" relative-height="0.477" relative-width="0.488" relative-posX="0" relative-posY="1.095"/>
     </layout>
     <layout type="AUTOLAYOUT_ONLY_TEXT">
-        <presobj kind="PRESOBJ_OUTLINE1" title-shape-relative-height="1" title-shape-relative-width="1" title-shape-relative-posX="0" title-shape-relative-posY="0"/>
+        <presobj kind="PRESOBJ_OUTLINE1" relative-height="4.6354" relative-width="1" relative-posX="0" relative-posY="0"/>
     </layout>
     <layout type="AUTOLAYOUT_TITLE_ONLY">
-        <presobj kind="PRESOBJ_TITLE" title-shape-relative-height="1" title-shape-relative-width="1" title-shape-relative-posX="0" title-shape-relative-posY="0"/>
+        <presobj kind="PRESOBJ_TITLE" relative-height="1" relative-width="1" relative-posX="0" relative-posY="0"/>
     </layout>
     <layout type="AUTOLAYOUT_TITLE_6CONTENT">
-        <presobj kind="PRESOBJ_TITLE" title-shape-relative-height="1" title-shape-relative-width="1" title-shape-relative-posX="0" title-shape-relative-posY="0"/>
-        <presobj kind="PRESOBJ_OUTLINE1" title-shape-relative-height="0.477" title-shape-relative-width="0.322" title-shape-relative-posX="0" title-shape-relative-posY="0"/>
-        <presobj kind="PRESOBJ_OUTLINE2" title-shape-relative-height="0.477" title-shape-relative-width="0.322" title-shape-relative-posX="1.05" title-shape-relative-posY="0"/>
-        <presobj kind="PRESOBJ_OUTLINE3" title-shape-relative-height="0.477" title-shape-relative-width="0.322" title-shape-relative-posX="2.10" title-shape-relative-posY="0"/>
-        <presobj kind="PRESOBJ_OUTLINE4" title-shape-relative-height="0.477" title-shape-relative-width="0.322" title-shape-relative-posX="2.10" title-shape-relative-posY="1.095"/>
-        <presobj kind="PRESOBJ_OUTLINE5" title-shape-relative-height="0.477" title-shape-relative-width="0.322" title-shape-relative-posX="1.05" title-shape-relative-posY="1.095"/>
-        <presobj kind="PRESOBJ_OUTLINE6" title-shape-relative-height="0.477" title-shape-relative-width="0.322" title-shape-relative-posX="0" title-shape-relative-posY="1.095"/>
+        <presobj kind="PRESOBJ_TITLE" relative-height="1" relative-width="1" relative-posX="0" relative-posY="0"/>
+        <presobj kind="PRESOBJ_OUTLINE1" relative-height="0.477" relative-width="0.322" relative-posX="0" relative-posY="0"/>
+        <presobj kind="PRESOBJ_OUTLINE2" relative-height="0.477" relative-width="0.322" relative-posX="1.05" relative-posY="0"/>
+        <presobj kind="PRESOBJ_OUTLINE3" relative-height="0.477" relative-width="0.322" relative-posX="2.10" relative-posY="0"/>
+        <presobj kind="PRESOBJ_OUTLINE4" relative-height="0.477" relative-width="0.322" relative-posX="2.10" relative-posY="1.095"/>
+        <presobj kind="PRESOBJ_OUTLINE5" relative-height="0.477" relative-width="0.322" relative-posX="1.05" relative-posY="1.095"/>
+        <presobj kind="PRESOBJ_OUTLINE6" relative-height="0.477" relative-width="0.322" relative-posX="0" relative-posY="1.095"/>
     </layout>
     <layout type="AUTOLAYOUT__START">
-        <presobj kind="PRESOBJ_TITLE" title-shape-relative-height="1" title-shape-relative-width="1" title-shape-relative-posX="0" title-shape-relative-posY="0"/>
-        <presobj kind="PRESOBJ_OUTLINE1" title-shape-relative-height="1" title-shape-relative-width="1" title-shape-relative-posX="0" title-shape-relative-posY="0"/>
+        <presobj kind="PRESOBJ_TITLE" relative-height="1" relative-width="1" relative-posX="0" relative-posY="0"/>
+        <presobj kind="PRESOBJ_OUTLINE1" relative-height="1" relative-width="1" relative-posX="0" relative-posY="0"/>
     </layout>
     <layout type="AUTOLAYOUT_TITLE_2CONTENT_CONTENT">
-        <presobj kind="PRESOBJ_TITLE" title-shape-relative-height="1" title-shape-relative-width="1" title-shape-relative-posX="0" title-shape-relative-posY="0"/>
-        <presobj kind="PRESOBJ_OUTLINE1" title-shape-relative-height="0.477" title-shape-relative-width="0.488" title-shape-relative-posX="0" title-shape-relative-posY="0"/>
-        <presobj kind="PRESOBJ_OUTLINE2" title-shape-relative-height="0.477" title-shape-relative-width="0.488" title-shape-relative-posX="0" title-shape-relative-posY="1.095"/>
-        <presobj kind="PRESOBJ_OUTLINE3" title-shape-relative-height="1" title-shape-relative-width="0.488" title-shape-relative-posX="1.05" title-shape-relative-posY="0"/>
+        <presobj kind="PRESOBJ_TITLE" relative-height="1" relative-width="1" relative-posX="0" relative-posY="0"/>
+        <presobj kind="PRESOBJ_OUTLINE1" relative-height="0.477" relative-width="0.488" relative-posX="0" relative-posY="0"/>
+        <presobj kind="PRESOBJ_OUTLINE2" relative-height="0.477" relative-width="0.488" relative-posX="0" relative-posY="1.095"/>
+        <presobj kind="PRESOBJ_OUTLINE3" relative-height="1" relative-width="0.488" relative-posX="1.05" relative-posY="0"/>
     </layout>
     <layout type="AUTOLAYOUT_TITLE_2CONTENT_OVER_CONTENT">
-        <presobj kind="PRESOBJ_TITLE" title-shape-relative-height="1" title-shape-relative-width="1" title-shape-relative-posX="0" title-shape-relative-posY="0"/>
-        <presobj kind="PRESOBJ_OUTLINE1" title-shape-relative-height="0.477" title-shape-relative-width="0.488" title-shape-relative-posX="0" title-shape-relative-posY="0"/>
-        <presobj kind="PRESOBJ_OUTLINE2" title-shape-relative-height="0.477" title-shape-relative-width="0.488" title-shape-relative-posX="1.05" title-shape-relative-posY="0"/>
-        <presobj kind="PRESOBJ_OUTLINE3" title-shape-relative-height="0.477" title-shape-relative-width="1" title-shape-relative-posX="0" title-shape-relative-posY="1.095"/>
+        <presobj kind="PRESOBJ_TITLE" relative-height="1" relative-width="1" relative-posX="0" relative-posY="0"/>
+        <presobj kind="PRESOBJ_OUTLINE1" relative-height="0.477" relative-width="0.488" relative-posX="0" relative-posY="0"/>
+        <presobj kind="PRESOBJ_OUTLINE2" relative-height="0.477" relative-width="0.488" relative-posX="1.05" relative-posY="0"/>
+        <presobj kind="PRESOBJ_OUTLINE3" relative-height="0.477" relative-width="1" relative-posX="0" relative-posY="1.095"/>
+    </layout>
+    <layout type="AUTOLAYOUT_VTITLE_VCONTENT">
+        <presobj kind="PRESOBJ_TITLE" relative-height="4.6354" relative-width="0.139167" relative-posX="6.1856" relative-posY="0"/>
+        <presobj kind="PRESOBJ_OUTLINE1" relative-height="1.3347" relative-width="0.777778" relative-posX="0" relative-posY="-0.2508"/>
+    </layout>
+    <layout type="AUTOLAYOUT_VTITLE_VCONTENT_OVER_VCONTENT">
+        <presobj kind="PRESOBJ_TITLE" relative-height="4.6354" relative-width="0.139167" relative-posX="6.1856" relative-posY="0"/>
+        <presobj kind="PRESOBJ_OUTLINE1" relative-height="0.628" relative-width="0.777778" relative-posX="0" relative-posY="-0.5337"/>
+        <presobj kind="PRESOBJ_OUTLINE2" relative-height="0.628" relative-width="0.777778" relative-posX="0" relative-posY="0.594"/>
+    </layout>
+    <layout type="AUTOLAYOUT_TITLE_VCONTENT">
+        <presobj kind="PRESOBJ_TITLE" relative-height="1" relative-width="1" relative-posX="0" relative-posY="0"/>
+        <presobj kind="PRESOBJ_OUTLINE1" relative-height="1" relative-width="1" relative-posX="0" relative-posY="0"/>
+    </layout>
+    <layout type="AUTOLAYOUT_TITLE_2VTEXT">
+        <presobj kind="PRESOBJ_TITLE" relative-height="1" relative-width="1" relative-posX="0" relative-posY="0"/>
+        <presobj kind="PRESOBJ_OUTLINE1" relative-height="1" relative-width="0.488" relative-posX="0" relative-posY="0"/>
+        <presobj kind="PRESOBJ_OUTLINE2" relative-height="1" relative-width="0.488" relative-posX="1.05" relative-posY="0"/>
     </layout>
 </layout-list>
\ No newline at end of file
commit 9b7a693eed2f6eb0e128d507510aaad36000e877
Author: Vishv Brahmbhatt <vishvbrahmbhatt19 at gmail.com>
Date:   Tue Aug 13 19:15:14 2013 +0530

    Adding vertical layouts to XML file.
    
    The new vertical layouts and the old layouts works well on my maschine.
    Also the 'vertical writing' mode seems to be working perfectly for 'vertical layouts'.
    And removed the 'switch'case from the "sdpage.cxx".
    
    Change-Id: Ic9f6af68cdeb635f79e67b959f95ac0a79c119ca

diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx
index 5a9d3ec..753b07e 100644
--- a/sd/source/core/sdpage.cxx
+++ b/sd/source/core/sdpage.cxx
@@ -1197,9 +1197,6 @@ rtl::OUString enumtoString(AutoLayout aut)
         case AUTOLAYOUT_TITLE_CONTENT:
         retstr="AUTOLAYOUT_TITLE_CONTENT";
         break;
-        case AUTOLAYOUT_TITLE_2VTEXT:
-        retstr="AUTOLAYOUT_TITLE_2VTEXT";
-        break;
         case AUTOLAYOUT_TITLE_CONTENT_OVER_CONTENT:
         retstr="AUTOLAYOUT_TITLE_CONTENT_OVER_CONTENT";
         break;
@@ -1230,6 +1227,18 @@ rtl::OUString enumtoString(AutoLayout aut)
         case AUTOLAYOUT_TITLE_2CONTENT:
         retstr="AUTOLAYOUT_TITLE_2CONTENT";
         break;
+        case AUTOLAYOUT_VTITLE_VCONTENT:
+        retstr="AUTOLAYOUT_VTITLE_VCONTENT";
+        break;
+        case AUTOLAYOUT_VTITLE_VCONTENT_OVER_VCONTENT:
+        retstr="AUTOLAYOUT_VTITLE_VCONTENT_OVER_VCONTENT";
+        break;
+        case AUTOLAYOUT_TITLE_VCONTENT:
+        retstr="AUTOLAYOUT_TITLE_VCONTENT";
+        break;
+        case AUTOLAYOUT_TITLE_2VTEXT:
+        retstr="AUTOLAYOUT_TITLE_2VTEXT";
+        break;
         default:
         retstr="unknown";
         break;
@@ -1238,7 +1247,7 @@ rtl::OUString enumtoString(AutoLayout aut)
     return retstr;
 }
 
-static void CalcAutoLayoutRectangles( SdPage& rPage, int nLayout, Rectangle* rRectangle ,const rtl::OUString& autolayout)
+static void CalcAutoLayoutRectangles( SdPage& rPage,Rectangle* rRectangle ,const rtl::OUString& autolayout)
 {
     Rectangle aTitleRect;
     Rectangle aLayoutRect;
@@ -1283,10 +1292,9 @@ static void CalcAutoLayoutRectangles( SdPage& rPage, int nLayout, Rectangle* rRe
     Size        aTempSize;
     Point       aTempPnt;
     aTempSize = aLayoutSize;
-    aTempPnt = aLayoutPos;
-    sal_Bool    bRightToLeft = ( rPage.GetModel() && static_cast< SdDrawDocument* >( rPage.GetModel() )->GetDefaultWritingMode() == ::com::sun::star::text::WritingMode_RL_TB );
+    aTempPnt  = aLayoutPos;
 
-    std::vector<Reference<XNode>>  &layoutinfo = static_cast< SdDrawDocument* >( rPage.GetModel() )->GetLayoutVector(); //getting vector from "SdDrawDocument" ,not sure about the correct mechanism
+    const std::vector<Reference<XNode>>  &layoutinfo = static_cast< SdDrawDocument* >( rPage.GetModel() )->GetLayoutVector(); //getting vector from "SdDrawDocument" ,not sure about the correct mechanism
     for(size_t y=0; y < layoutinfo.size(); y++) //loop through vector of Xnodes
     {
         Reference<XNode> layoutnode = layoutinfo[y];      //get i'th layout element
@@ -1351,170 +1359,6 @@ static void CalcAutoLayoutRectangles( SdPage& rPage, int nLayout, Rectangle* rRe
             break;
         }
     }
-
-    switch( nLayout )
-    {
-    case 0: // default layout using only the title and layout area
-        break; // do nothing
-    case 1: // title, 2 shapes
-    case 9: // title, 2 vertical shapes
-
-        // if( bRightToLeft && (nLayout != 9) )
-        //     ::std::swap( rRectangle[1], rRectangle[2] );
-        break;
-    case 2: // title, shape, 2 shapes
-        // aTempPnt = aLayoutPos;
-        // aTempSize = aLayoutSize;
-        // aLayoutSize.Height() = long (aLayoutSize.Height() * 0.477);
-        // aLayoutSize.Width() = long (aLayoutSize.Width() * 0.488);
-        // aLayoutPos.X() = long (aLayoutPos.X() + aLayoutSize.Width() * 1.05);
-        // rRectangle[2] = Rectangle (aLayoutPos, aLayoutSize);
-
-        // aLayoutPos.Y() = long (aLayoutPos.Y() + aLayoutSize.Height() * 1.095);
-        // rRectangle[3] = Rectangle (aLayoutPos, aLayoutSize);
-
-        // aLayoutPos = aTempPnt;
-        // aLayoutSize = aTempSize;
-        // aLayoutSize.Width() = long (aLayoutSize.Width() * 0.488);
-        // rRectangle[1] = Rectangle (aLayoutPos, aLayoutSize);
-
-        // if( bRightToLeft )
-        // {
-        //     ::std::swap( rRectangle[1].Left(), rRectangle[2].Left() );
-        //     rRectangle[3].Left() = rRectangle[2].Left();
-        // }
-        break;
-    case 3: // title, 2 shapes, shape
-        // aTempPnt = aLayoutPos;
-        // aTempSize = aLayoutSize;
-        // aLayoutSize.Height() = long (aLayoutSize.Height() * 0.477);
-        // aLayoutSize.Width() = long (aLayoutSize.Width() * 0.488);
-        // rRectangle[1] = Rectangle (aLayoutPos, aLayoutSize);
-
-        // aLayoutPos.Y() = long (aLayoutPos.Y() + aLayoutSize.Height() * 1.095);
-        // rRectangle[2] = Rectangle (aLayoutPos, aLayoutSize);
-
-        // aLayoutPos = aTempPnt;
-        // aLayoutSize = aTempSize;
-        // aLayoutSize.Width() = long (aLayoutSize.Width() * 0.488);
-        // aLayoutPos.X() = long (aLayoutPos.X() + aLayoutSize.Width() * 1.05);
-        // rRectangle[3] = Rectangle (aLayoutPos, aLayoutSize);
-
-        // if( bRightToLeft )
-        // {
-        //     ::std::swap( rRectangle[1].Left(), rRectangle[2].Left() );
-        //     rRectangle[3].Left() = rRectangle[2].Left();
-        // }
-        break;
-    case 4: // title, shape above shape
-        // aLayoutSize.Height() = long (aLayoutSize.Height() * 0.477);
-        // rRectangle[1] = Rectangle (aLayoutPos, aLayoutSize);
-
-        // aLayoutPos.Y() = long (aLayoutPos.Y() + aLayoutSize.Height() * 1.095);
-        // rRectangle[2] = Rectangle (aLayoutPos, aLayoutSize);
-        break;
-
-    case 5: // title, 2 shapes above shape
-        // aLayoutSize.Height() = long (aLayoutSize.Height() * 0.477);
-        // aLayoutSize.Width() = long (aLayoutSize.Width() * 0.488);
-        // rRectangle[1] = Rectangle (aLayoutPos, aLayoutSize);
-
-        // aTempPnt = aLayoutPos;
-        // aLayoutPos.X() = long (aLayoutPos.X() + aLayoutSize.Width() * 1.05);
-        // rRectangle[2] = Rectangle (aLayoutPos, aLayoutSize);
-
-        // aLayoutPos.X() = aTempPnt.X();
-        // aLayoutPos.Y() = long (aLayoutPos.Y() + aLayoutSize.Height() * 1.095);
-        // aLayoutSize.Width() = long (aLayoutSize.Width() / 0.488);
-        // rRectangle[3] = Rectangle (aLayoutPos, aLayoutSize);
-        break;
-    case 6: // title, 4 shapes
-    {
-        // sal_uLong nX = long (aLayoutPos.X());
-
-        // aLayoutSize.Height() = long (aLayoutSize.Height() * 0.477);
-        // aLayoutSize.Width()  = long (aLayoutSize.Width() * 0.488);
-        // rRectangle[1] = Rectangle (aLayoutPos, aLayoutSize);
-
-        // aLayoutPos.X() = long (nX + aLayoutSize.Width() * 1.05);
-        // rRectangle[2] = Rectangle (aLayoutPos, aLayoutSize);
-
-        // aLayoutPos.Y() = long (aLayoutPos.Y() + aLayoutSize.Height() * 1.095);
-        // rRectangle[3] = Rectangle (aLayoutPos, aLayoutSize);
-
-        // aLayoutPos.X() = nX;
-        // rRectangle[4] = Rectangle (aLayoutPos, aLayoutSize);
-        break;
-    }
-    case 7: // vertical title, shape above shape
-    {
-        Size aSize( rRectangle[0].GetSize().Height(), rRectangle[1].BottomLeft().Y() - rRectangle[0].TopLeft().Y() );
-        rRectangle[0].SetSize( aSize );
-        rRectangle[0].SetPos( aTitleRect.TopRight() - Point( aSize.Width(), 0 ) );
-
-        Size aPageSize ( rPage.GetSize() );
-        aPageSize.Height() -= rPage.GetUppBorder() + rPage.GetLwrBorder();
-        aSize.Height() = long ( rRectangle[0].GetSize().Height() * 0.47 );
-        aSize.Width() = long( aPageSize.Width() * 0.7 );
-        rRectangle[1].SetPos( aTitleRect.TopLeft() );
-        rRectangle[1].SetSize( aSize );
-
-        aSize.Height() = rRectangle[0].GetSize().Height();
-        Point aPos( aTitleRect.TopLeft() );
-        aPos.Y() += long ( aSize.Height() * 0.53 );
-        rRectangle[2].SetPos( aPos );
-        aSize.Height() = long ( rRectangle[0].GetSize().Height() * 0.47 );
-        rRectangle[2].SetSize( aSize );
-        break;
-    }
-    case 8: // vertical title, shape
-    {
-        Size aSize( rRectangle[0].GetSize().Height(), rRectangle[1].BottomLeft().Y() - rRectangle[0].TopLeft().Y() );
-        rRectangle[0].SetSize( aSize );
-        rRectangle[0].SetPos( aTitleRect.TopRight() - Point( aSize.Width(), 0 ) );
-
-        Size aPageSize ( rPage.GetSize() );
-        aPageSize.Height() -= rPage.GetUppBorder() + rPage.GetLwrBorder();
-        aSize.Height() = rRectangle[0].GetSize().Height();
-        aSize.Width() = long( aPageSize.Width() * 0.7 );
-        rRectangle[1].SetPos( aTitleRect.TopLeft() );
-        rRectangle[1].SetSize( aSize );
-        break;
-    }
-    case 10: // onlytext
-    {
-        Size aSize( rRectangle[0].GetSize().Width(), rRectangle[1].BottomLeft().Y() - rRectangle[0].TopLeft().Y() );
-        rRectangle[0].SetSize( aSize );
-        rRectangle[0].SetPos( aTitlePos);
-        break;
-    }
-    case 11: // title, 6 shapes
-    {
-        // sal_uLong nX = long (aLayoutPos.X());
-
-        // aLayoutSize.Height() = long (aLayoutSize.Height() * 0.477);
-        // aLayoutSize.Width()  = long (aLayoutSize.Width() * 0.322);
-        // rRectangle[1] = Rectangle (aLayoutPos, aLayoutSize);
-
-        // aLayoutPos.X() = long (nX + aLayoutSize.Width() * 1.05);
-        // rRectangle[2] = Rectangle (aLayoutPos, aLayoutSize);
-
-        // aLayoutPos.X() = long (nX + aLayoutSize.Width() * 2 * 1.05);
-        // rRectangle[3] = Rectangle (aLayoutPos, aLayoutSize);
-
-        // aLayoutPos.Y() = long (aLayoutPos.Y() + aLayoutSize.Height() * 1.095);
-        // rRectangle[4] = Rectangle (aLayoutPos, aLayoutSize);
-
-        // aLayoutPos.X() = long (nX + aLayoutSize.Width() * 1.05);
-        // rRectangle[5] = Rectangle (aLayoutPos, aLayoutSize);
-
-        // aLayoutPos.X() = nX;
-        // rRectangle[6] = Rectangle (aLayoutPos, aLayoutSize);
-
-        break;
-    }
-
-    }
 }
 
 
@@ -1703,7 +1547,7 @@ void SdPage::SetAutoLayout(AutoLayout eLayout, sal_Bool bInit, sal_Bool bCreate
     Rectangle aRectangle[MAX_PRESOBJS];
     const LayoutDescriptor& aDescriptor = GetLayoutDescriptor( meAutoLayout );
     autolayout=enumtoString(meAutoLayout);
-    CalcAutoLayoutRectangles( *this, aDescriptor.mnLayout, aRectangle, autolayout);
+    CalcAutoLayoutRectangles( *this, aRectangle, autolayout);
 
     std::set< SdrObject* > aUsedPresentationObjects;
 
diff --git a/sd/xml/layoutlist.xml b/sd/xml/layoutlist.xml
index d02bf2a..b99a18f 100644
--- a/sd/xml/layoutlist.xml
+++ b/sd/xml/layoutlist.xml
@@ -30,7 +30,7 @@
         <presobj kind="PRESOBJ_OUTLINE4" title-shape-relative-height="0.477" title-shape-relative-width="0.488" title-shape-relative-posX="0" title-shape-relative-posY="1.095"/>
     </layout>
     <layout type="AUTOLAYOUT_ONLY_TEXT">
-        <presobj kind="PRESOBJ_OUTLINE1" title-shape-relative-height="1" title-shape-relative-width="1" title-shape-relative-posX="0" title-shape-relative-posY="0"/>
+        <presobj kind="PRESOBJ_OUTLINE1" title-shape-relative-height="4.6354" title-shape-relative-width="1" title-shape-relative-posX="0" title-shape-relative-posY="0"/>
     </layout>
     <layout type="AUTOLAYOUT_TITLE_ONLY">
         <presobj kind="PRESOBJ_TITLE" title-shape-relative-height="1" title-shape-relative-width="1" title-shape-relative-posX="0" title-shape-relative-posY="0"/>
@@ -60,4 +60,22 @@
         <presobj kind="PRESOBJ_OUTLINE2" title-shape-relative-height="0.477" title-shape-relative-width="0.488" title-shape-relative-posX="1.05" title-shape-relative-posY="0"/>
         <presobj kind="PRESOBJ_OUTLINE3" title-shape-relative-height="0.477" title-shape-relative-width="1" title-shape-relative-posX="0" title-shape-relative-posY="1.095"/>
     </layout>
+    <layout type="AUTOLAYOUT_VTITLE_VCONTENT">
+        <presobj kind="PRESOBJ_TITLE" title-shape-relative-height="4.6354" title-shape-relative-width="0.139167" title-shape-relative-posX="6.1856" title-shape-relative-posY="0"/>
+        <presobj kind="PRESOBJ_OUTLINE1" title-shape-relative-height="1.3347" title-shape-relative-width="0.777778" title-shape-relative-posX="0" title-shape-relative-posY="-0.2508"/>
+    </layout>
+    <layout type="AUTOLAYOUT_VTITLE_VCONTENT_OVER_VCONTENT">
+        <presobj kind="PRESOBJ_TITLE" title-shape-relative-height="4.6354" title-shape-relative-width="0.139167" title-shape-relative-posX="6.1856" title-shape-relative-posY="0"/>
+        <presobj kind="PRESOBJ_OUTLINE1" title-shape-relative-height="0.628" title-shape-relative-width="0.777778" title-shape-relative-posX="0" title-shape-relative-posY="-0.5337"/>
+        <presobj kind="PRESOBJ_OUTLINE2" title-shape-relative-height="0.628" title-shape-relative-width="0.777778" title-shape-relative-posX="0" title-shape-relative-posY="0.594"/>
+    </layout>
+    <layout type="AUTOLAYOUT_TITLE_VCONTENT">
+        <presobj kind="PRESOBJ_TITLE" title-shape-relative-height="1" title-shape-relative-width="1" title-shape-relative-posX="0" title-shape-relative-posY="0"/>
+        <presobj kind="PRESOBJ_OUTLINE1" title-shape-relative-height="1" title-shape-relative-width="1" title-shape-relative-posX="0" title-shape-relative-posY="0"/>
+    </layout>
+    <layout type="AUTOLAYOUT_TITLE_2VTEXT">
+        <presobj kind="PRESOBJ_TITLE" title-shape-relative-height="1" title-shape-relative-width="1" title-shape-relative-posX="0" title-shape-relative-posY="0"/>
+        <presobj kind="PRESOBJ_OUTLINE1" title-shape-relative-height="1" title-shape-relative-width="0.488" title-shape-relative-posX="0" title-shape-relative-posY="0"/>
+        <presobj kind="PRESOBJ_OUTLINE2" title-shape-relative-height="1" title-shape-relative-width="0.488" title-shape-relative-posX="1.05" title-shape-relative-posY="0"/>
+    </layout>
 </layout-list>
\ No newline at end of file
commit 96087f52d9ab00e80fd4ff57aa3ce3b29c2204ef
Author: Vishv Brahmbhatt <vishvbrahmbhatt19 at gmail.com>
Date:   Fri Aug 9 18:50:52 2013 +0530

    Fixed a broken unit-test.
    
    Added a new component of "unoxml/source/service/unoxml" in makefile of 'sd_uimpress'.
    Also few changes in "drawdoc.cxx".Please ignore the changes of unit-test XML file,
    it has to be deleted in subsequent commit.
    
    Change-Id: I50eb516444820c8037aebc8859a322116989d3bf

diff --git a/sd/CppunitTest_sd_uimpress.mk b/sd/CppunitTest_sd_uimpress.mk
index f17a2d7..f232a91 100644
--- a/sd/CppunitTest_sd_uimpress.mk
+++ b/sd/CppunitTest_sd_uimpress.mk
@@ -92,6 +92,7 @@ $(eval $(call gb_CppunitTest_use_components,sd_uimpress,\
     i18npool/util/i18npool \
     linguistic/source/lng \
     ucb/source/core/ucb1 \
+    unoxml/source/service/unoxml \
 ))
 
 $(eval $(call gb_CppunitTest_use_configuration,sd_uimpress))
diff --git a/sd/source/core/drawdoc.cxx b/sd/source/core/drawdoc.cxx
index 97e3367..a4089cb 100644
--- a/sd/source/core/drawdoc.cxx
+++ b/sd/source/core/drawdoc.cxx
@@ -1015,7 +1015,7 @@ sal_uInt16 SdDrawDocument::GetAnnotationAuthorIndex( const OUString& rAuthor )
 // to get the root element of the xml file
 Reference<XElement> getRoot()
 {
-    const Reference<css::uno::XComponentContext> xContext( comphelper_getProcessComponentContext() );
+    const Reference<css::uno::XComponentContext> xContext( ::comphelper::getProcessComponentContext() );
     Reference< XMultiServiceFactory > xServiceFactory( xContext->getServiceManager() , UNO_QUERY_THROW );
     Reference< util::XMacroExpander > xMacroExpander = util::theMacroExpander::get( xContext );
     Reference< XMultiServiceFactory > xConfigProvider = configuration::theDefaultProvider::get( xContext );
@@ -1056,7 +1056,7 @@ Reference<XElement> getRoot()
             aURL = aSysPath;
     }
 
-    const Reference<XDocumentBuilder> xDocBuilder( css::xml::dom::DocumentBuilder::create( comphelper::getComponentContext (xServiceFactory) ) );
+    const Reference<XDocumentBuilder> xDocBuilder( DocumentBuilder::create( comphelper::getComponentContext (xServiceFactory) ));
     const Reference<XDocument> xDoc = xDocBuilder->parseURI( aURL );
     const Reference<XElement> xRoot = xDoc->getDocumentElement();
     return xRoot;                      //this loops seems to work only once,so returning the root element
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 cfe1f1e..d02bf2a 100644
--- a/test/user-template/user/config/soffice.cfg/simpress/layoutlist.xml
+++ b/test/user-template/user/config/soffice.cfg/simpress/layoutlist.xml
@@ -3,30 +3,61 @@
 -->
 <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"/>
+        <presobj kind="PRESOBJ_TITLE" title-shape-relative-height="1" title-shape-relative-width="1" title-shape-relative-posX="0" title-shape-relative-posY="0"/>
+        <presobj kind="PRESOBJ_OUTLINE1" title-shape-relative-height="1" title-shape-relative-width="1" title-shape-relative-posX="0" title-shape-relative-posY="0"/>
     </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 type="AUTOLAYOUT_TITLE_2CONTENT">
+        <presobj kind="PRESOBJ_TITLE" title-shape-relative-height="1" title-shape-relative-width="1" title-shape-relative-posX="0" title-shape-relative-posY="0"/>
+        <presobj kind="PRESOBJ_OUTLINE1" title-shape-relative-height="1" title-shape-relative-width="0.488" title-shape-relative-posX="0" title-shape-relative-posY="0"/>
+        <presobj kind="PRESOBJ_OUTLINE2" title-shape-relative-height="1" title-shape-relative-width="0.488" title-shape-relative-posX="1.05" title-shape-relative-posY="0"/>
     </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"/>
+        <presobj kind="PRESOBJ_TITLE" title-shape-relative-height="1" title-shape-relative-width="1" title-shape-relative-posX="0" title-shape-relative-posY="0"/>
+        <presobj kind="PRESOBJ_OUTLINE1" title-shape-relative-height="0.477" title-shape-relative-width="1" title-shape-relative-posX="0" title-shape-relative-posY="0"/>
+        <presobj kind="PRESOBJ_OUTLINE2" title-shape-relative-height="0.477" title-shape-relative-width="1" title-shape-relative-posX="0" title-shape-relative-posY="1.095"/>
     </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"/>
+        <presobj kind="PRESOBJ_TITLE" title-shape-relative-height="1" title-shape-relative-width="1" title-shape-relative-posX="0" title-shape-relative-posY="0"/>
+        <presobj kind="PRESOBJ_OUTLINE1" title-shape-relative-height="1" title-shape-relative-width="0.488" title-shape-relative-posX="0" title-shape-relative-posY="0"/>
+        <presobj kind="PRESOBJ_OUTLINE2" title-shape-relative-height="0.477" title-shape-relative-width="0.488" title-shape-relative-posX="1.05" title-shape-relative-posY="0"/>
+        <presobj kind="PRESOBJ_OUTLINE3" title-shape-relative-height="0.477" title-shape-relative-width="0.488" title-shape-relative-posX="1.05" title-shape-relative-posY="1.095"/>
+    </layout>
+    <layout type="AUTOLAYOUT_TITLE_4CONTENT">
+        <presobj kind="PRESOBJ_TITLE" title-shape-relative-height="1" title-shape-relative-width="1" title-shape-relative-posX="0" title-shape-relative-posY="0"/>
+        <presobj kind="PRESOBJ_OUTLINE1" title-shape-relative-height="0.477" title-shape-relative-width="0.488" title-shape-relative-posX="0" title-shape-relative-posY="0"/>
+        <presobj kind="PRESOBJ_OUTLINE2" title-shape-relative-height="0.477" title-shape-relative-width="0.488" title-shape-relative-posX="1.05" title-shape-relative-posY="0"/>
+        <presobj kind="PRESOBJ_OUTLINE3" title-shape-relative-height="0.477" title-shape-relative-width="0.488" title-shape-relative-posX="1.05" title-shape-relative-posY="1.095"/>
+        <presobj kind="PRESOBJ_OUTLINE4" title-shape-relative-height="0.477" title-shape-relative-width="0.488" title-shape-relative-posX="0" title-shape-relative-posY="1.095"/>
+    </layout>
+    <layout type="AUTOLAYOUT_ONLY_TEXT">
+        <presobj kind="PRESOBJ_OUTLINE1" title-shape-relative-height="1" title-shape-relative-width="1" title-shape-relative-posX="0" title-shape-relative-posY="0"/>
+    </layout>
+    <layout type="AUTOLAYOUT_TITLE_ONLY">
+        <presobj kind="PRESOBJ_TITLE" title-shape-relative-height="1" title-shape-relative-width="1" title-shape-relative-posX="0" title-shape-relative-posY="0"/>
+    </layout>
+    <layout type="AUTOLAYOUT_TITLE_6CONTENT">
+        <presobj kind="PRESOBJ_TITLE" title-shape-relative-height="1" title-shape-relative-width="1" title-shape-relative-posX="0" title-shape-relative-posY="0"/>
+        <presobj kind="PRESOBJ_OUTLINE1" title-shape-relative-height="0.477" title-shape-relative-width="0.322" title-shape-relative-posX="0" title-shape-relative-posY="0"/>
+        <presobj kind="PRESOBJ_OUTLINE2" title-shape-relative-height="0.477" title-shape-relative-width="0.322" title-shape-relative-posX="1.05" title-shape-relative-posY="0"/>
+        <presobj kind="PRESOBJ_OUTLINE3" title-shape-relative-height="0.477" title-shape-relative-width="0.322" title-shape-relative-posX="2.10" title-shape-relative-posY="0"/>
+        <presobj kind="PRESOBJ_OUTLINE4" title-shape-relative-height="0.477" title-shape-relative-width="0.322" title-shape-relative-posX="2.10" title-shape-relative-posY="1.095"/>
+        <presobj kind="PRESOBJ_OUTLINE5" title-shape-relative-height="0.477" title-shape-relative-width="0.322" title-shape-relative-posX="1.05" title-shape-relative-posY="1.095"/>
+        <presobj kind="PRESOBJ_OUTLINE6" title-shape-relative-height="0.477" title-shape-relative-width="0.322" title-shape-relative-posX="0" title-shape-relative-posY="1.095"/>
+    </layout>
+    <layout type="AUTOLAYOUT__START">
+        <presobj kind="PRESOBJ_TITLE" title-shape-relative-height="1" title-shape-relative-width="1" title-shape-relative-posX="0" title-shape-relative-posY="0"/>
+        <presobj kind="PRESOBJ_OUTLINE1" title-shape-relative-height="1" title-shape-relative-width="1" title-shape-relative-posX="0" title-shape-relative-posY="0"/>
+    </layout>
+    <layout type="AUTOLAYOUT_TITLE_2CONTENT_CONTENT">
+        <presobj kind="PRESOBJ_TITLE" title-shape-relative-height="1" title-shape-relative-width="1" title-shape-relative-posX="0" title-shape-relative-posY="0"/>
+        <presobj kind="PRESOBJ_OUTLINE1" title-shape-relative-height="0.477" title-shape-relative-width="0.488" title-shape-relative-posX="0" title-shape-relative-posY="0"/>
+        <presobj kind="PRESOBJ_OUTLINE2" title-shape-relative-height="0.477" title-shape-relative-width="0.488" title-shape-relative-posX="0" title-shape-relative-posY="1.095"/>
+        <presobj kind="PRESOBJ_OUTLINE3" title-shape-relative-height="1" title-shape-relative-width="0.488" title-shape-relative-posX="1.05" title-shape-relative-posY="0"/>
+    </layout>
+    <layout type="AUTOLAYOUT_TITLE_2CONTENT_OVER_CONTENT">
+        <presobj kind="PRESOBJ_TITLE" title-shape-relative-height="1" title-shape-relative-width="1" title-shape-relative-posX="0" title-shape-relative-posY="0"/>
+        <presobj kind="PRESOBJ_OUTLINE1" title-shape-relative-height="0.477" title-shape-relative-width="0.488" title-shape-relative-posX="0" title-shape-relative-posY="0"/>
+        <presobj kind="PRESOBJ_OUTLINE2" title-shape-relative-height="0.477" title-shape-relative-width="0.488" title-shape-relative-posX="1.05" title-shape-relative-posY="0"/>
+        <presobj kind="PRESOBJ_OUTLINE3" title-shape-relative-height="0.477" title-shape-relative-width="1" title-shape-relative-posX="0" title-shape-relative-posY="1.095"/>
     </layout>
 </layout-list>
\ No newline at end of file
commit 07dccf031f07c6684f75df235df4a2113c2910ff
Author: Vishv Brahmbhatt <vishvbrahmbhatt19 at gmail.com>
Date:   Thu Aug 8 16:19:48 2013 +0530

    Making few changes to the parser logic.
    
    The logical change seems to work perfectly,only few of the layouts involving
    'vertical title' are left to be handled in the XML file.Also commenting out
    some of the code in the switch case for temporary reference.It will
    be deleted in the subsequent commit.
    
    Change-Id: I491e414dec3dbd01d8566f23ab31096daa7bbfa8

diff --git a/sd/source/core/drawdoc.cxx b/sd/source/core/drawdoc.cxx
index d1c6bde..97e3367 100644
--- a/sd/source/core/drawdoc.cxx
+++ b/sd/source/core/drawdoc.cxx
@@ -76,6 +76,7 @@
 #include <com/sun/star/beans/PropertyValue.hpp>
 #include <rtl/ustring.hxx>
 #include <rtl/uri.hxx>
+#include <osl/file.h>
 
 #include <editeng/outliner.hxx>
 #include "drawdoc.hxx"
@@ -1029,6 +1030,7 @@ Reference<XElement> getRoot()
         xConfigProvider->createInstanceWithArguments(
             "com.sun.star.configuration.ConfigurationAccess",
             Sequence<Any>( &propValue, 1 ) ), UNO_QUERY_THROW );
+
     Sequence< rtl::OUString > aFiles;
     xNameAccess->getByName( "LayoutListFiles" ) >>= aFiles;
     rtl::OUString aURL;
@@ -1054,7 +1056,7 @@ Reference<XElement> getRoot()
             aURL = aSysPath;
     }
 
-    const Reference<XDocumentBuilder> xDocBuilder( css::xml::dom::DocumentBuilder::create( comphelper::getComponentContext (xServiceFactory)) );
+    const Reference<XDocumentBuilder> xDocBuilder( css::xml::dom::DocumentBuilder::create( comphelper::getComponentContext (xServiceFactory) ) );
     const Reference<XDocument> xDoc = xDocBuilder->parseURI( aURL );
     const Reference<XElement> xRoot = xDoc->getDocumentElement();
     return xRoot;                      //this loops seems to work only once,so returning the root element
diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx
index c3316be..5a9d3ec 100644
--- a/sd/source/core/sdpage.cxx
+++ b/sd/source/core/sdpage.cxx
@@ -1227,6 +1227,9 @@ rtl::OUString enumtoString(AutoLayout aut)
         case AUTOLAYOUT_TITLE_2CONTENT_OVER_CONTENT:
         retstr="AUTOLAYOUT_TITLE_2CONTENT_OVER_CONTENT";
         break;
+        case AUTOLAYOUT_TITLE_2CONTENT:
+        retstr="AUTOLAYOUT_TITLE_2CONTENT";
+        break;
         default:
         retstr="unknown";
         break;
@@ -1314,12 +1317,12 @@ static void CalcAutoLayoutRectangles( SdPage& rPage, int nLayout, Rectangle* rRe
                     sValue = presObjSizeWidth->getNodeValue();
                     propvalue[1] = sValue.toDouble();
 
-                    Reference<XNode> presObjPos = presObjAttributes->getNamedItem("title-shape-relative-pos");
-                    sValue = presObjPos->getNodeValue();
+                    Reference<XNode> presObjPosX = presObjAttributes->getNamedItem("title-shape-relative-posX");
+                    sValue = presObjPosX->getNodeValue();
                     propvalue[2] = sValue.toDouble();
 
-                    Reference<XNode> presObjBool = presObjAttributes->getNamedItem("boolx");
-                    sValue = presObjBool->getNodeValue();
+                    Reference<XNode> presObjPosY = presObjAttributes->getNamedItem("title-shape-relative-posY");
+                    sValue = presObjPosY->getNodeValue();
                     propvalue[3] = sValue.toDouble();
 
                     if(count==0)
@@ -1327,23 +1330,19 @@ static void CalcAutoLayoutRectangles( SdPage& rPage, int nLayout, Rectangle* rRe
                         Size aTitleSize ( aTitleRect.GetSize() );
                         aTitleSize.Height() = sal_Int32(aTitleSize.Height() * propvalue[0]);
                         aTitleSize.Width() = sal_Int32(aTitleSize.Width() * propvalue[1]);
-                        if(propvalue[3]==1)
-                            aTitlePos.X() = sal_Int32(aTitlePos.X() +(aTitleSize.Width() * propvalue[2]));
-                        else
-                            aTitlePos.Y() = sal_Int32(aTitlePos.Y() + (aTitleSize.Height() * propvalue[2]));
+                        aTitlePos.X() = sal_Int32(aTitlePos.X() +(aTitleSize.Width() * propvalue[2]));
+                        aTitlePos.Y() = sal_Int32(aTitlePos.Y() + (aTitleSize.Height() * propvalue[3]));
                         rRectangle[count] = Rectangle (aTitlePos, aTitleSize);
                         count = count+1;
                     }
                     else
                     {
-                        aLayoutSize = aTempSize;//to regain fixed layout size
-                        aLayoutPos = aTempPnt;
+                        aLayoutSize = aTempSize; //to re-gain fixed layout size
+                        aLayoutPos = aTempPnt;  //to re-gain fixed layout pos
                         aLayoutSize.Height() = sal_Int32(aLayoutSize.Height() * propvalue[0]);
                         aLayoutSize.Width() = sal_Int32(aLayoutSize.Width() * propvalue[1]);
-                        if(propvalue[3]==1)
-                            aLayoutPos.X() = sal_Int32(aLayoutPos.X() +(aLayoutSize.Width() * propvalue[2]));
-                        else
-                            aLayoutPos.Y() = sal_Int32(aLayoutPos.Y() + (aLayoutSize.Height() * propvalue[2]));
+                        aLayoutPos.X() = sal_Int32(aLayoutPos.X() +(aLayoutSize.Width() * propvalue[2]));
+                        aLayoutPos.Y() = sal_Int32(aLayoutPos.Y() + (aLayoutSize.Height() * propvalue[3]));
                         rRectangle[count] = Rectangle (aLayoutPos, aLayoutSize);
                         count=count+1;
                     }
@@ -1360,59 +1359,59 @@ static void CalcAutoLayoutRectangles( SdPage& rPage, int nLayout, Rectangle* rRe
     case 1: // title, 2 shapes
     case 9: // title, 2 vertical shapes
 
-        if( bRightToLeft && (nLayout != 9) )
-            ::std::swap( rRectangle[1], rRectangle[2] );
+        // if( bRightToLeft && (nLayout != 9) )
+        //     ::std::swap( rRectangle[1], rRectangle[2] );
         break;
     case 2: // title, shape, 2 shapes
-        aTempPnt = aLayoutPos;
-        aTempSize = aLayoutSize;
-        aLayoutSize.Height() = long (aLayoutSize.Height() * 0.477);
-        aLayoutSize.Width() = long (aLayoutSize.Width() * 0.488);
-        aLayoutPos.X() = long (aLayoutPos.X() + aLayoutSize.Width() * 1.05);
-        rRectangle[2] = Rectangle (aLayoutPos, aLayoutSize);
+        // aTempPnt = aLayoutPos;
+        // aTempSize = aLayoutSize;

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list