Google Summer of Code 2020 with LibreOffice
Move Gallery Code to Use ZIP Files
An impactful project with a prestigious open source organization, LibreOffice
During the summer of 2020, I was selected as the student developer to complete the project under LibreOffice. Click here to view the project information.
BLOGS
A Summer of Code without writing technical blogs isn't a summer of code at all :)
Please read my blogs and if you like them, please throw a 👏
WEEKLY REPORTS
I had submitted a report to the LO developer's mailing list mentioning the tasks that I performed every week. Feel free to click on your desired week to view the report.
Hi,
You can check the final GSoC Report here [1]. Thank you LibreOffice community for guidance and help.
Special thanks to Tomaž who was super helpful during the whole project. I'm grateful to do this
project with such a great mentor. I will be submitting final changes in upcoming days. It has been
a pleasure contributing to LO.
Warm Regards,
Aditya Sahu
[1] https://gist.github.com/aditya-sahu/b36dfe02c4f58b869bde18d47030a04a
Hi,
I'm working on some last additions on the XML Engine. Last week I worked on adding a ZIP file,
and writing mimetype and xml file+content inside it. I implemented GalleryXMLEngine::writeGalleryTheme,
and am now working towards reading part of it so that tests work for the XML Engine as well.
Warm Regards,
Aditya Sahu
Hi, sorry for late submission. Here's the week 11 highlights:
* Started implementing writeGalleryTheme for GalleryXMLEngine [1]
* Refactoring of GalleryObjectCollection is still required before anything - so looking into that
[1] https://gerrit.libreoffice.org/c/core/+/100609
Warm Regards,
Aditya Sahu
Hi,
Week 10 report:
* Introduced GalleryFileStorage interface that would be used by XML and binary engines
+ It is empty right now, but as I add methods in XML Engine, sequentially those methods will be added one by one
* Working on GalleryXMLEngine now
+ [1] introduced it - however, currently it's WIP.
+ So far, I have learnt how to read ZIP files, read XML files, write to XML files
* XML walker to access the xml files
* XML writer to write them, element by element
To do for this week:
* Learn to do encapsulation of multiple files in a ZIP is left
* Add methods to GalleryXMLEngine and by the end of the week, have it working
Warm Regards,
Aditya Sahu
<aditya-sahu>
[1] https://gerrit.libreoffice.org/c/core/+/100158
Hi all,
9 weeks have been completed and here are the highlights of what I did last week:
* Commit [1] and [2] were reviewed and pushed to remote
+ They're already summarized in my previous email
* Commit [3] was pushed to remote
+ It implements 3 functions of GalleryObjectCollection class
* Worked on Commit [4] and [5]
+ It is yet to be pushed to remote
* Refactoring work is almost done
+ Final changes remaining
+ Plan is to do them alongside the next phase
* I have published some articles on the work done till now
+ [5] briefs the project summary and distribution of phases (7 min read)
+ [6] elaborates on the unit testing phase (4 min read)
+ [7] is about refactoring work done till now (6 min read)
Tasks for next week:
* Create an XML engine which would read from and write to XML files
* Learn to create a ZIP file, put contents in it, read/write from/to it (design of the ZIP file should be similar to ODF)
I'll be waiting for feedback.
Warm Regards,
Aditya Sahu
References:
[1] https://gerrit.libreoffice.org/c/core/+/99035
[2] https://gerrit.libreoffice.org/c/core/+/99479
[3] https://gerrit.libreoffice.org/c/core/+/99789
[4] https://gerrit.libreoffice.org/c/core/+/99940
[5] https://medium.com/@adityasahu1511/google-summer-of-code-with-libreoffice-project-overview-bb993b4d067b?source=friends_link&sk=81f8f10ca4fe50785bd86c4c6aef1b9d
[6] https://medium.com/@adityasahu1511/google-summer-of-code-20-with-libreoffice-part-1-9bcf11a05701?source=friends_link&sk=27e7df527c6b06f195ca7fb3d8164515
[7] https://medium.com/@adityasahu1511/google-summer-of-code-20-with-libreoffice-part-2-26033988dbd0?source=friends_link&sk=851f56d3f80d76538a70034771bd8510
Hi, sorry for sending the report a bit late - got caught up in some personal business. Here are the highlights of last week:
* Change [1] was pushed to remote this week.
+ Implement GalleryStorageLocations, a shared class which contains locations
to binary files like aThmURL, aSdgURL, aSdvURL and aStrURL.
+ The class shares its members between GalleryBinaryEngine and GalleryBinaryEngineEntry.
* Change [2] was completed and is under review
+ Implemented GalleryObjectCollection, a shared class which contains an object list to be used by GalleryTheme and GalleryBinaryEngine.
* Renaming of its functions is needed which will be done in an upcoming change.
+ This class is primarily owned by GalleryTheme, and shared with GalleryBinaryEngine.
+ This change also contains further refactoring work:
* ImplCreateUniqueURL, InsertGraphic() were refactored.
* Implements comphelper::GraphicMimeTypeHelper::GetExtensionForConvertDataFormat()
* Refactors Actualize() and introduce updateSvDrawObject(), updateTheme()
+ As pointed out by my mentor, I realize that this one specific change is quite big and apologize for that; so from now on I will make sure to do separate changes for different things/functionalities as it would be easier to locate the commit if regression occurs.
* Change [3] is completed and under review
+ Refactored GalleryTheme::InsertFileOrDirURL function, leaving only the last 3 functions from that class to be refactored.
[1] https://gerrit.libreoffice.org/c/core/+/98979
[2] https://gerrit.libreoffice.org/c/core/+/99035
[3] https://gerrit.libreoffice.org/c/core/+/99479
Warm Regards,
Aditya Sahu
<aditya-sahu>
Hi,
* Change [1] was pushed to remote this week
+ Large change deals with 8 functions that were refactored
* Classes were re-structured further and implementing new classes for better shareability
+ Change [2] deals with that - it's also a large patch and work is in progress
To-do tasks for this week:
* Finish with this phase to move on to next one
[1] https://gerrit.libreoffice.org/c/core/+/98492
[2] https://gerrit.libreoffice.org/c/core/+/98979
Warm Regards,
Aditya Sahu
<aditya-sahu>
Hi,
Here is the week 6 Report:
* Worked on patch [1] which was pushed to remote this week
+ Implemented InitGalleryTheme() and DestroyGalleryTheme() to handle the lifecycle of SotStorage object
* Removed long chains from the code I wrote
+ e.g., pGalleryTheme2->pThm->getGalleryBinaryEngine()->GetSvDrawStorage() from the code and improved it by implementing new functions in GalleryThemeEntry
+ Two chains were removed last week, a lot more to come in the next patch
* Resumed working on refactoring more functions
+ Submitted [2] which is still WIP
+ GetModel() and GetModelStream() were refactored
+ implCreateUniqueURL() and ImplGetURL() are now in galmisc.cxx, which is the right place for now..
To-do tasks for this week would be:
* Finish further refactoring on InsertModel(), InsertModelStream(), InsertObject()
* GalleryTheme class should be done by the end of the week.
Warm Regards,
Aditya Sahu
<aditya-sahu>
.
[1] https://gerrit.libreoffice.org/c/core/+/96764
[2] https://gerrit.libreoffice.org/c/core/+/98492
Hi all,
I am excited to announce that the first evaluation has been completed and I'm happy to have made it in the second phase of coding. Thanks to my mentor for his continuous support. Here's the week 5 report:
* I was stuck with a problem and after not getting it myself, I discussed it with my mentor
+ Basically, it occurred during the refactoring of aSvDrawStorageRef to binary engine.
+ I did not give much time this week to work on this issue, that's why there is a bit of lag.
+ Yesterday, after communicating with my mentor, I applied his solution and now it seems to be working almost fine.. [1]
+ Will make further improvement to it today.
Warm Regards,
Aditya Sahu
<aditya-sahu>
[1] https://gerrit.libreoffice.org/c/core/+/96764
Hi,
It has been an exciting summer so far working towards the project. Special thanks to my mentor for providing guidance. This week's highlights:
* Patch [1] was pushed to remote.
+ It moves three functionalities to the gallery binary engine
* Worked on another patch for moving more functionalities
+ After code review, there were mistakes that I need to work upon
+ Will try to fix them and provide a better patch.
Upcoming milestones:
* Try to finish refactoring to move to the next phase, hopefully done by the end of this week.
* After the current phase is completed, publish a blog about the overall progress and accomplishments.
Warm Regards,
Aditya Sahu
<aditya-sahu>
[1] https://gerrit.libreoffice.org/c/core/+/96541
Hey!
Week 3 report for project - Move the Gallery Code to Use ZIP Files:
* Done GalleryThemeEntry refactoring
+ 4 data members, 7 functions have been moved from GalleryThemeEntry
+ 4 new functions introduced to the binary engine.
+ Commit [1] was pushed to remote this week.
* Moved to GalleryTheme class for refactoring
+ Worked on commits [2] and [3] - yet to be pushed to remote.
+ Remaining with some more members to move - the work is still in progress..
Have a great week ahead!
Warm Regards,
Aditya Sahu
<aditya-sahu>
[1] https://gerrit.libreoffice.org/c/core/+/96253
[2] https://gerrit.libreoffice.org/c/core/+/96527
[3] https://gerrit.libreoffice.org/c/core/+/96764/
Hello,
This was the second week for the project "Move Gallery Code to Use ZIP Files". Learning some good stuff for sure! :)
This week's report:
* Continued refactoring of GalleryThemeEntry
+ Moved some R/W stuff to the new class GalleryBinaryEngine [1]
+ aThmURL, aSdgURL, aSdvURL, aStrURL are now part of GalleryBinaryEngine
+ Also moved some functions which now exist as GalleryBinaryEngine::ImplGetURLIgnoreCase(), GalleryBinaryEngine::CreateUniqueURL().
+ Hopefully, no change in external behaviour is reflected.
* My commit was reviewed and pushed to remote [2]
* One more patch on its way [3]
Thanks to my mentor and the org for their continuous guidance.
Warm Regards,
Aditya Sahu
<aditya-sahu>
[1] https://opengrok.libreoffice.org/xref/core/include/svx/gallerybinaryengine.hxx?r=e0c9ed26#25
[2] https://gerrit.libreoffice.org/c/core/+/95922
[3] https://gerrit.libreoffice.org/c/core/+/96253
Hi,
This was the first week of GSoC project - quite good.. Here is this week's report:
* Moved on to the next phase of the project i.e., code refactoring
+ Created GalleryBinaryEngine class that would deal with all the reading and writing of files.
+ Must be done such that older classes have no knowledge of R/W of files.
+ Started moving data members and functions from GalleryThemeEntry class to the new class.
+ Work is in progress - just started moving stuff
* This week I wasn't able to provide solid results because most of the time spent on reading the code than writing it
* My commit was pushed to remote this week [1]
Warm regards,
Aditya Sahu
<aditya-sahu>
[1] https://gerrit.libreoffice.org/c/core/+/94646
Hi
* Started first phase of implementation of the project "Move Gallery Code to ZIP File" [1]
+ Wrote unit tests for Gallery, GalleryTheme, GalleryThemeEntry classes.
+ Two commits were pushed to master [2], [3]
+ Familiarized myself with gallery codebase
* Tasks for next week when coding period begins
+ Finish remaining unit tests
+ Move to next phase of project
Thanks to mentor for continuous support. Will be sending a weekly report when the coding period begins.
Hope you are keeping yourselves safe amidst the pandemic!
Warm regards,
Aditya Sahu
IRC: <aditya-sahu>
[1] https://summerofcode.withgoogle.com/projects/#5814711242719232
[2] https://gerrit.libreoffice.org/c/core/+/92679
[3] https://gerrit.libreoffice.org/c/core/+/93305