summaryrefslogtreecommitdiff
path: root/sw/source/core/model
AgeCommit message (Collapse)AuthorFilesLines
2021-10-21introduce SwNodeOffset strong typedefNoel Grandin2-5/+5
for indexing into node children. Replaces various usage of sal_uLong, tools::Long, sal_uInt32 with an underlying type of sal_Int32. Also add a NODE_OFFSET_MAX constant to replace usage of ULONG_MAX Change-Id: I2f466922e1ebc19029bb2883d2b29aa4c0614170 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123892 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-09-15loplugin:constvarsNoel Grandin1-1/+1
Change-Id: I9b35d6333afa6b305bf73fc55a7e60c8365674e9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122134 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-09-08indexing: fix correct size and pos. for shapes + more testsTomaž Vajngerl1-2/+1
Determining the position and size of the shapes (SdrObjects) was wrong as the assumption was the values are in Hmm but were in twips. Added some more tests that check rendering of SdrObjects. Change-Id: I6ef9287892d1774a1243118a5c97f58384bcfd68 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121801 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-09-08indexing: rename "parent" attibute and parse the attribute backTomaž Vajngerl1-2/+16
Rename the attribute "parent" to "object_name" and "parent_index" and parse the "object_name" attribute for JSON and XML when used as input to SearchResultLocator. Change-Id: I46ad8d6aa14f15d1b759126af71284f7d73a7a96 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121797 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-09-08indexing: rename "type" for prargraph an object nodesTomaž Vajngerl1-6/+18
They are conflicting, so rename the one for paragraphs to "node_type and the one for objects to "object_type". This needs adusting all the tests. Also change the node_type from numerical value (correcponding to a enum) to string based - "writer" or "commom" values. Change-Id: I0465cd4c2c6989e436d5a675db20c87066d19208 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121743 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-09-08indexing: support JSON and XML as input for SearchResultLocatorTomaž Vajngerl1-28/+70
JSON is much easier to deal with when using REST and javascript, so support both. Change-Id: I61035452d9a7ba889ac355a42201d79b9fafec6f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121742 Tested-by: Tomaž Vajngerl <quikee@gmail.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-08-26indexing: move xml parsing into SearchResultLocatorTomaž Vajngerl2-0/+51
Let's keep unneeded complexity out of SwXTextDocument, so move parsing into SearchResultLocator. As a bonus we can now test parsing. Change-Id: I944bfc43e6953523eee19b26b7f483aa401809aa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121032 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-08-13indexing: allow for multiple entries in search indexing dataTomaž Vajngerl1-12/+18
Change-Id: Idb9bbbaa940b7cd48423c6cc65b9c7d0b94f57dc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120396 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-08-10indexing: add support for SdrObjects in SearchResultLocatorTomaž Vajngerl1-14/+48
Also add (node) "type" parameter because we need to differentiate between Writer nodes and SdrObject nodes. Change-Id: I590695ae71781f64c22bdd7e1df01d69e3376e67 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118671 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-07-26indexing: search result locator to return the rect of the resultTomaž Vajngerl1-0/+47
Returns the rectangle(s) where the search result is located in the document. Change-Id: Ib2333584fbc460cc16b1bf205fc3d674a1c06957 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118668 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-06-19indexing: indexing shapes/text boxes for the IndexingExportTomaž Vajngerl1-0/+21
Adds handling of shapes and text boxes to the IndexingExport with exporting the the name, alt text, description and paragraphs of the inner shape text to the indexing xml. Change-Id: I3db68078b7e793cab552b4f7f8e8ddf9bfd1a6f2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117359 Tested-by: Tomaž Vajngerl <quikee@gmail.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-06-19indexing: indexing paragraph text with the ModelTraverserTomaž Vajngerl1-0/+39
This adds the basic paragraph text export for indexing, which uses the new ModelTraverser, which is inspired by AccessibilityCheck (and in the future it will be changed to use the ModelTraverser too, when it matures). ModelTraverser implements traversing through the model and executes a handler for a element of a model (which can be various things). IndexingExport class implements indexing export that uses the ModelTraverser to write into the indexing xml document, that uses the tools::XmlWriter. Change-Id: I7a6a5de332534270fe894a881131e5eb5ea9d881 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117356 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>