SECEdit::EnforceMaxLineLength
BOOLSECEdit::EnforceMaxLineLength(SECEditLineColPair&lcpBlock, SECEditCompositeCommand*pCmd, intnFirstLineInsert= -1)
Scan lines in the given block to enforce the max length rule. This method goes through the buffer, for the text block specified, and makes sure that each line in this block is not greater than the max line length. This is a visible length calculation. Each line found to be too long is split at the end. Special case for the 1st line: If nFirstLineInsert != -1 and the line is too long, the break will be made at lcpBlock.start.col + nFirstLineInsert instead of the end of the line If this point is beyond the end of the line, the break will be made at lcpBlock.start.col.
Defined in: SECEdit.cpp
Return Value
Returns non-zero if any lines required adjusting (i.e., broken) to accomodate the max length rule; otherwise 0.
Parameters
lcpBlock
Input/output parameter. Reference to the positions making up the text block. If any lines are broken, the block will be grown to accomodate this.
pCmd
Points to a composite command for which commands to adjust the text can be appended.
nFirstLineInsert
Specifies the offset into the first line where a line break should be made if necessary. If -1, the line break will be made at the end of the line.
See Also