TWPRTFEngineBasis.IsProtected

  • Hi Julian,

    In April 3rd, 2006, I sent you this message, with no answer since:

    So, with this update it is now oficially impossible to delete this empty paragraphs, and the users will not be able to edit the text? Or the protection is only about 'inserting text'?

    Thanks for your help.

    Alessandro

    • Offizieller Beitrag

    Hi,

    empty paragraph cannot hold the afsProtected style since this can be only applied to characters.

    The update solves the problem of
    a) insertion before protected text
    b) insertion between protected texts at first position in par

    It does not prohibt insertion into an empty paragraph

    and about "I sent you this message, with no answer since" - I sent You 438 messages total and received 923. This is in fact a bit excessive. My last custom function for table_to_text did not get recognoced, despit the work which was involed. That is not encouraging.

    Julian

  • Hi Julian,

    It wasn't my intention to be rude. I was just showing since when I have this problem unanswered, and unfortunatelly, the error will not be fixed. At least it was my understanding, based on the description of your post. By the way, I was asking about 'DELETE', not 'INSERT' in empty paragraphs.

    About the messages count, yes, its a bit excessive, but what can I do? If you remember, I use WPTools since version 3, starting in 2001. It sums about 7 years and 3 full version upgrades (3 -> 4 and 4 -> 5). And I have users that need my text editor, to be very close to MSWord in features and easy of use. Some features you did improve in basic WPTools. Others I code myself, and send you, and sometimes you accept my changes, and sometimes not, so I update the code myself. If I remember well, I have about 15 code changes in my custom WPTools compilation, without counting my own inheritance level. And besides one or other minor issue, I can tell you with no doubt, that WPTools is a great product. My only missing is to be much more MSWord compatible, behavioral speaking.

    About the table_to_text routine, sorry, but while testing it, I get some msword incompatibilty behaviors, and since the 'undo problem' didn´t appears to be a big issue after all, was decided keep with my own code. I forgot to tell you, really sorry.

    Alessandro

    • Offizieller Beitrag

    Hi,

    If you need to handle the DELETE key please note the function

    Memo.IsProtected

    that receives a paragraph and position to be checked.

    You can check a previous paragraph like this:

    apar := aCursor.active_paragraph;
    while (apar<>nil) and (apar.prev<>nil) and (apar.CharCount=0) do apar := apar.prev;
    protmode := IsProtected(apar, apar.CharCount - 1);

    I am using such code in SetChar in WPRTEPaint to improve the protection handling.

    Julian