Google Summer of Code 2018: Project Report
LibreOffice | Listbox separate read values from input values
My name is Hrishabh Rajput, I am an undergraduate student at Indian Institute of Technology Kharagpur.
About the Project
Listboxes are a very useful component when entering data in forms in databases. The proposal primarily concerns providing the user with the ability to choose the list items of the listbox based on the values entered in the other fields and hide the deprecated values of the database list. Listbox provides the user with the facility to choose from a list of choices, and on the other hand, ensures that the values entered in the field are appropriate. Hence, Listbox can be a quicker way to select a value from a list. Listboxes obtain the list items from the tables in the database, and sometimes it is not preferred to list all the items available.
The Community Bonding Period
Discussed with the mentor on various methods the project completion would be accomplished and finalized the model which would be implemented. We decided on duplicating the "list entries" and "list content" properties, which are filled directly from the database values. These new properties would decide what values are to be displayed. Since there are various methods of filling the list box entries, namely
- SQL Native
slightly different methods of implementing new values needed to be utilised.
- For list content Valuelist and Tablefields, a separate field "List filter" will be added and the user would enter boolean values to decide which values are to be shown.
- For list content SQL, SQL Native and Queries, the list content table will contain three columns. The first column will is used for list entries, the second one for bound values, the third (new) will contain the boolean values derived from the database table or Queries.
Duplicated the "list entries" and "list contents" properties and set up output through the properties. Set up the "List filter" and "Filter field". Set up data input and integrated them in the process. The SQL related list contents can now filter values based on the field in the database table on which the list box is based. Set up the default condition in which the List filter and Filter Field contain all "true" values, and thus all entries are displayed. Kept the List filter user-friendly, the user could choose to enter
true case independent or
1 to make the entry visible and vice versa for the false values. Disabling/Enabling the corresponding related field List filter or Filter field.
Work which didn't go according to the plan (Future Work)
Working on the
Dropdown false case. Started working but got stuck after a while. And a slight problem with List filter case not taking into account the values entered by the user.
I am grateful to work with the mentors Lionel Elie Mamane, Caolán McNamara and Tamás Bunth. Was lucky to have such responsive and helpful mentors. Often encouraged to propose and appreciated new implementation ideas. I am thankful to the LibreOffice community to believe in my capabilities and give me the opportunity to work on this project.
I plan to continue working with LibreOffice to help it grow by adding more functionalities and being part of this very friendly and awesome community.