summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVishv Brahmbhatt <vishvbrahmbhatt19@gmail.com>2013-08-09 18:50:52 +0530
committerThorsten Behrens <tbehrens@suse.com>2013-08-26 14:47:26 +0200
commit96087f52d9ab00e80fd4ff57aa3ce3b29c2204ef (patch)
tree017c5972e33e7d52bcdf8e18d535992c2a0e8c22
parent07dccf031f07c6684f75df235df4a2113c2910ff (diff)
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
-rw-r--r--sd/CppunitTest_sd_uimpress.mk1
-rw-r--r--sd/source/core/drawdoc.cxx4
-rw-r--r--test/user-template/user/config/soffice.cfg/simpress/layoutlist.xml71
3 files changed, 54 insertions, 22 deletions
diff --git a/sd/CppunitTest_sd_uimpress.mk b/sd/CppunitTest_sd_uimpress.mk
index f17a2d784227..f232a917ce62 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 97e3367270cf..a4089cbf91d5 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 cfe1f1e58e85..d02bf2acfa39 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