diff options
author | Fred Kruse <fred.kruse@gmx.de> | 2023-01-15 19:09:36 +0100 |
---|---|---|
committer | Michael Stahl <michael.stahl@allotropia.de> | 2023-01-17 10:17:19 +0000 |
commit | 04f15c8a8c733f159f77bd58905e4136a32b1be9 (patch) | |
tree | b3adec0cb51eb52c348740865b99186e62c79739 /linguistic | |
parent | 79541a4808561fbe400cb4e0d33c8ddc23cf9d84 (diff) |
Properties SortedTextId and DocumentElementsCount added for grammar check
The LanguageTool extension (LT extension) runs not only a grammar check on the level of sentences and paragraphs, some rules work on the level of many paragraphs or full text. The LT extension uses a complex caching mechanism to support this feature. A mapping from a check request to the cached to the (flat)paragraphs is necessary. Until now, this is done by a time-consuming and error-prone mechanism. The adding of the SortedTextId introduce a feature, a paragraph to be checked can be fast and easy identified. The flatparagraphs also can easily be mapped to cursors to get additional information of the paragraph, used for further features of LT extension.
The added Property DocumentElementsCount to flatparagraphs and doProofreading gives the extension the hint to recreate the cache.
Change-Id: I4b6b58bba4dfb3e870fe7b71fd8537ee9ffd6476
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142251
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Diffstat (limited to 'linguistic')
-rw-r--r-- | linguistic/source/gciterator.cxx | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/linguistic/source/gciterator.cxx b/linguistic/source/gciterator.cxx index 581f356f215e..1613b2dac36b 100644 --- a/linguistic/source/gciterator.cxx +++ b/linguistic/source/gciterator.cxx @@ -557,6 +557,8 @@ lcl_makeProperties(uno::Reference<text::XFlatParagraph> const& xFlatPara, sal_In return comphelper::InitPropertySequence({ { "FieldPositions", xProps->getPropertyValue("FieldPositions") }, { "FootnotePositions", xProps->getPropertyValue("FootnotePositions") }, + { "SortedTextId", xProps->getPropertyValue("SortedTextId") }, + { "DocumentElementsCount", xProps->getPropertyValue("DocumentElementsCount") }, { "ProofInfo", a } }); } |