Date: prev next · Thread: first prev next last
2013 Archives by date, by thread · List index


Hi,

I am working on "Slide Layout Extendibility" project for GSOC. As for one
of my initial task,I had to set up XML file and parser which reads
information from that XML file.So as of now the parser is working perfectly
and even compilation works perfectly.But the "unit test" fails.I have been
stuck on this error for last 4 days and it seems that,there is a bug in the
"unit-test" process(for XML configuration files in Impress). And I am
sharing this problem as per the advice of my mentor Thorsten(Please refer
to my commit & Error links at the end):

(1) So for setting up the configuration path of "layoutlist.xml" ,I have
made an entry of "LayoutListFiles",similar to that of "EffectFiles" in
"Impress.xcs:457".

(2) The code processing of XML is similar to that in
"core/sd/source/core/CustomAnimationPreset.cxx:300".

(3) After using xNameAccess->getByName( "LayoutListFiles" ) >>= aFiles and
expandMacros() function.The configuration file-path
"*
vnd.sun.star.expand:$BRAND_BASE_DIR/share/config/soffice.cfg/simpress/layoutlist.xml
*" expands to "*
/home/vishv/Libre_Git/core/solver/unxlngx6/installation/opt/program/../share/config/soffice.cfg/simpress/layoutlist.xml
*" for "installation" process.

But for "Unit-Test" ,it expands to  "*
/home/vishv/Libre_Git/core/solver/unxlngx6/unittest/install/share/config/soffice.cfg/simpress/layoutlist.xml
*".

I am using the above generated string in *parseURI(string filepath)* to get
DOM structure and then traverse through XML for information.

(4)So in-spite of unit-test errors, XML parser works perfectly,because
correct path goes into the parseURI() in the installation process(i.e
.install/program/simpress works well without any crashes).

(5)The problem here is that path generated for unit-test check is wrong:

Correct path should be: "*
/home/vishv/Libre_Git/core/solver/unxlngx6/unittest/install/../user/share/config/soffice.cfg/simpress/layoutlist.xml
*" , because at this place a new "layoutlist.xml" is generated after
packaging.
But the wrong path generated as stated above is :"*
/home/vishv/Libre_Git/core/solver/unxlngx6/unittest/install/share/config/soffice.cfg/simpress/layoutlist.xml
*"
It leads to errors (i.e failed to load external entity  at "filepath..." )

Also this scenario happens for the current configuration "effects.xml" file
as well.

It would be great ,if someone can guide in correcting the "unit-test" path
and indeed removing the error.Also please correct me,if I am wrong in my
observations.

Here are the links of my commits and Errors for Reference:
Error: Error-Link <http://pastebin.com/PPUuXXQt>
feature/gsoc-impresslayout:
Commit2<http://cgit.freedesktop.org/libreoffice/core/commit/?h=feature/gsoc-impresslayout&id=e2a23779c42a4b252706794dd7e89e975804c50e>
 & 
Commit3<http://cgit.freedesktop.org/libreoffice/core/commit/?h=feature/gsoc-impresslayout&id=d5a552ee01d491e85b76dbb9c373a019ce18a06a>

Thanks and Regards,
Vishv Brahmbhatt

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.