PATCH 5214 and bidi documentation

From: Tomas Frydrych (tomasfrydrych@yahoo.co.uk)
Date: Thu Jul 10 2003 - 15:32:51 EDT

  • Next message: Francis James Franklin: "commit: abi: piecetable method changes"

    The attached simple patch should fix 5214 (copy and paste bidi
    problem); unfortunatly I am very pressed for time, had not have the
    chance to test this and will not have a chance to do any further work
    on AW until early August.

    Could some please check that with the patch copy and past works
    normally and files saved into rtf can be read by MS Word as expected?

    I am also attaching a stab on some bidi documentation -- it needs
    some editing as some of the GUI it talks about does not exist yet; if
    it could make it into the docs for the 2.0 release, I would be
    grateful (on the assumption we will release before mid August,
    otherwise I can deal with it later myself).

    Tomas

    diff -u -r1.111 ie_exp_RTF_listenerWriteDoc.cpp
    --- C:/cygwin/AbiCVS/abi/src/wp/impexp/xp/ie_exp_RTF_listenerWriteDoc.cpp 4 Jul 2003 02:55:53 -0000 1.111
    +++ C:/cygwin/AbiCVS/abi/src/wp/impexp/xp/ie_exp_RTF_listenerWriteDoc.cpp 10 Jul 2003 19:42:14 -0000
    @@ -174,6 +174,10 @@
                             {
                                     // changing from rtl to ltr
                                     FlushBuffer();
    + // when reading this rtf back into AW, we do not want
    + // the ltrch converted into an override -- issue
    + // custom abinodiroverride keyword
    + m_pie->_rtf_keyword("abinodiroverride");
                                     m_pie->_rtf_keyword("ltrch");
                                     m_pie->setCharRTL(FRIBIDI_TYPE_LTR);
                             }
    @@ -181,6 +185,10 @@
                             {
                                     // changing from ltr to rtl
                                     FlushBuffer();
    + // when reading this rtf back into AW, we do not want
    + // the rtlch converted into an override -- issue
    + // custom abinodiroverride keyword
    + m_pie->_rtf_keyword("abinodiroverride");
                                     m_pie->_rtf_keyword("rtlch");
                                     m_pie->setCharRTL(FRIBIDI_TYPE_RTL);
                             }

    diff -u -r1.240 ie_imp_RTF.cpp
    --- C:/cygwin/AbiCVS/abi/src/wp/impexp/xp/ie_imp_RTF.cpp 28 Jun 2003 16:38:07 -0000 1.240
    +++ C:/cygwin/AbiCVS/abi/src/wp/impexp/xp/ie_imp_RTF.cpp 10 Jul 2003 19:43:40 -0000
    @@ -3826,6 +3826,24 @@
                     {
                             return HandleBotline(true);
                     }
    + else if (strcmp(reinterpret_cast<char*>(pKeyword), "abinodiroverride") == 0)
    + {
    + // this keyword will be immediately followed by either the
    + // ltrch or rtlch keyword, which we need to eat up ...
    + unsigned char kwrd[MAX_KEYWORD_LEN];
    + long par = 0;
    + bool parUsed = false;
    + if (ReadKeyword(kwrd, &par, &parUsed, MAX_KEYWORD_LEN))
    + {
    + if(!(0 == strncmp((const char*)&kwrd[0],"rtlch",MAX_KEYWORD_LEN) ||
    + 0 == strncmp((const char*)&kwrd[0],"ltrch",MAX_KEYWORD_LEN)))
    + {
    + UT_DEBUGMSG(("RTF import: keyword \\%s found where \\ltrch"
    + " or \\rtlch expected\n", kwrd));
    + }
    + }
    +
    + }
                     else if (strcmp(reinterpret_cast<char*>(pKeyword), "ansi") == 0)
                     {
                             // this is charset Windows-1252

    The following section of this message contains a file attachment
    prepared for transmission using the Internet MIME message format.
    If you are using Pegasus Mail, or any another MIME-compliant system,
    you should be able to save it or view it from within your mailer.
    If you cannot, please ask your system administrator for assistance.

       ---- File information -----------
         File: bidi_help.zabw
         Date: 10 Jul 2003, 20:31
         Size: 4756 bytes.
         Type: Unknown





    This archive was generated by hypermail 2.1.4 : Thu Jul 10 2003 - 15:49:18 EDT