Grammalecte  Check-in [c016dd9e3e]

Overview
Comment:[core] gc_engine: code clarity
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk | core
Files: files | file ages | folders
SHA3-256: c016dd9e3e339ee82d6362612108832cddc1ec362c584042a75a98535155440b
User & Date: olr on 2019-06-05 14:43:58
Other Links: manifest | tags
Context
2019-06-05
14:44
version 1.2 check-in: e58cc33d18 user: olr tags: trunk
14:43
[core] gc_engine: code clarity check-in: c016dd9e3e user: olr tags: trunk, core
14:41
[fr] ajustements check-in: 465b7883f3 user: olr tags: trunk, fr
Changes

Modified gc_core/py/lang_core/gc_engine.py from [04908b510b] to [5fecb35f03].

659
660
661
662
663
664
665
666
667




668
669
670
671
672
673
674
659
660
661
662
663
664
665


666
667
668
669
670
671
672
673
674
675
676







-
-
+
+
+
+







        xErr.nErrorLength = nLen
        xErr.nErrorType = PROOFREADING
        xErr.aRuleIdentifier = sRuleId
        xErr.aShortComment = sMessage   # sMessage.split("|")[0]     # in context menu
        xErr.aFullComment = sMessage    # sMessage.split("|")[-1]    # in dialog
        xErr.aSuggestions = tuple(lSugg)
        # Properties
        lProperties = [ PropertyValue(Name="LineColor", Value=_dOptionsColors.get(sOption, 33023)) ]
        lProperties.append(PropertyValue(Name="LineType", Value=10)) # WAVE: 10, DASH: 5, BOLD: 12, BOLDWAVE: 18 https://api.libreoffice.org/docs/idl/ref/FontUnderline_8idl.html
        lProperties = [
            PropertyValue(Name="LineType", Value=18) # WAVE: 10, DASH: 5, BOLD: 12, BOLDWAVE: 18 https://api.libreoffice.org/docs/idl/ref/FontUnderline_8idl.html
            PropertyValue(Name="LineColor", Value=_dOptionsColors.get(sOption, 33023)),
        ]
        if sURL:
            lProperties.append(PropertyValue(Name="FullCommentURL", Value=sURL))
        xErr.aProperties = lProperties
        return xErr

    def _createErrorAsDict (self, nStart, nEnd, sLineId, sRuleId, sOption, sMessage, lSugg, sURL, bContext):
        dErr = {