Added line length limit to subscript and superscript for cleaning
This commit is contained in:
parent
7694a8911a
commit
d9b458210a
5 changed files with 71 additions and 2 deletions
|
@ -13,6 +13,12 @@ Function initRedactionConfiguration()
|
|||
reg = regFactory.createPropertySetRegistry(redactionExtensionName)
|
||||
redactionProps = reg.openPropertySet(redactionExtensionName, TRUE)
|
||||
propSetInfo = redactionProps.getPropertySetInfo()
|
||||
If Not propSetInfo.hasPropertyByName("superscript_max_length") Then
|
||||
redactionProps.addProperty("superscript_max_length", 128, "10")
|
||||
EndIf
|
||||
If Not propSetInfo.hasPropertyByName("subscript_max_length") Then
|
||||
redactionProps.addProperty("subscript_max_length", 128, "10")
|
||||
EndIf
|
||||
If Not propSetInfo.hasPropertyByName("fixes_russian_iph") Then
|
||||
redactionProps.addProperty("fixes_russian_iph", 128, "true")
|
||||
EndIf
|
||||
|
@ -46,6 +52,9 @@ Private Sub setConfigFromDialog(dialog As Object)
|
|||
config.setPropertyValue("fixes_russian_iph", "false")
|
||||
EndIf
|
||||
|
||||
config.setPropertyValue("superscript_max_length", dialog.getControl("tf_max_superscript").getText())
|
||||
config.setPropertyValue("subscript_max_length", dialog.getControl("tf_max_subscript").getText())
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub loadConfigToDialog(dialog As Object)
|
||||
|
@ -62,7 +71,11 @@ Private Sub loadConfigToDialog(dialog As Object)
|
|||
Else
|
||||
dialog.getControl("cb_russian_fixes_iph").state = 0
|
||||
EndIf
|
||||
|
||||
|
||||
dialog.getControl("tf_max_superscript").setText(config.getPropertyValue("superscript_max_length"))
|
||||
dialog.getControl("tf_max_subscript").setText(config.getPropertyValue("subscript_max_length"))
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
@ -73,6 +86,10 @@ Private Sub configurationDialog
|
|||
loadConfigToDialog(dialog)
|
||||
dialog.getControl("CB_complexity").Label = getTranslation("dialogConfigComplexity")
|
||||
dialog.getControl("cb_russian_fixes_iph").Label = getTranslation("dialogRussianFixesIPH")
|
||||
|
||||
dialog.getControl("label_max_superscript").setText(getTranslation("dialogConfigMaxSuperscript"))
|
||||
dialog.getControl("label_max_subscript").setText(getTranslation("dialogConfigMaxSubscript"))
|
||||
|
||||
dialog.Title = getTranslation("dialogConfigTitle")
|
||||
dialog.getControl("OK").Label = getTranslation("buttonYes")
|
||||
dialog.getControl("CANCEL").Label = getTranslation("buttonStop")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue