Kaydet (Commit) 07dccf03 authored tarafından Vishv Brahmbhatt's avatar Vishv Brahmbhatt Kaydeden (comit) Thorsten Behrens

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
üst 20ee726d
...@@ -76,6 +76,7 @@ ...@@ -76,6 +76,7 @@
#include <com/sun/star/beans/PropertyValue.hpp> #include <com/sun/star/beans/PropertyValue.hpp>
#include <rtl/ustring.hxx> #include <rtl/ustring.hxx>
#include <rtl/uri.hxx> #include <rtl/uri.hxx>
#include <osl/file.h>
#include <editeng/outliner.hxx> #include <editeng/outliner.hxx>
#include "drawdoc.hxx" #include "drawdoc.hxx"
...@@ -1029,6 +1030,7 @@ Reference<XElement> getRoot() ...@@ -1029,6 +1030,7 @@ Reference<XElement> getRoot()
xConfigProvider->createInstanceWithArguments( xConfigProvider->createInstanceWithArguments(
"com.sun.star.configuration.ConfigurationAccess", "com.sun.star.configuration.ConfigurationAccess",
Sequence<Any>( &propValue, 1 ) ), UNO_QUERY_THROW ); Sequence<Any>( &propValue, 1 ) ), UNO_QUERY_THROW );
Sequence< rtl::OUString > aFiles; Sequence< rtl::OUString > aFiles;
xNameAccess->getByName( "LayoutListFiles" ) >>= aFiles; xNameAccess->getByName( "LayoutListFiles" ) >>= aFiles;
rtl::OUString aURL; rtl::OUString aURL;
...@@ -1054,7 +1056,7 @@ Reference<XElement> getRoot() ...@@ -1054,7 +1056,7 @@ Reference<XElement> getRoot()
aURL = aSysPath; 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<XDocument> xDoc = xDocBuilder->parseURI( aURL );
const Reference<XElement> xRoot = xDoc->getDocumentElement(); const Reference<XElement> xRoot = xDoc->getDocumentElement();
return xRoot; //this loops seems to work only once,so returning the root element return xRoot; //this loops seems to work only once,so returning the root element
......
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment