[Libreoffice-commits] core.git: Branch 'feature/gsoc-impresslayout' - sd/CppunitTest_sd_uimpress.mk sd/source test/user-template

Vishv Brahmbhatt vishvbrahmbhatt19 at gmail.com
Fri Aug 9 06:41:15 PDT 2013


 sd/CppunitTest_sd_uimpress.mk                                      |    1 
 sd/source/core/drawdoc.cxx                                         |    4 
 test/user-template/user/config/soffice.cfg/simpress/layoutlist.xml |   71 +++++++---
 3 files changed, 54 insertions(+), 22 deletions(-)

New commits:
commit 4af93aaf9c50c795f7789e1c256627204be7199c
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 5fb5961..a5b0491 100644
--- a/sd/CppunitTest_sd_uimpress.mk
+++ b/sd/CppunitTest_sd_uimpress.mk
@@ -89,6 +89,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 68180f1..f7515be 100644
--- a/sd/source/core/drawdoc.cxx
+++ b/sd/source/core/drawdoc.cxx
@@ -1005,7 +1005,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 );
@@ -1046,7 +1046,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


More information about the Libreoffice-commits mailing list