Re: I need some help!


Subject: Re: I need some help!
From: Belcon Zhao (belcon@hotmail.com)
Date: Thu Nov 09 2000 - 02:49:09 CST


Hello everyone:

  I put this debug instruction in
AP_UnixApp.cpp:copyToClipboard(PD_DocumentRange * pDocRange) like:
...

IE_Exp_RTF * pExpRtf = new IE_Exp_RTF(pDocRange->m_pDoc);
        if (pExpRtf)
        {
                pExpRtf->copyToBuffer(pDocRange,&bufRTF);
                DELETEP(pExpRtf);
                UT_DEBUGMSG(("CopyToClipboard: copying %d bytes in RTF
format.\n",bufRTF.getLength()));
                UT_DEBUGMSG(("Belcon:in
AP_UnixApp::copyToClipboard,bufRTF=%s\n",bufRTF.getPointer(0)));

//*****************************************************************
// Here,I find that the string's sequence has been changed
// by AW.Originally,it is "abiword**"(** stands for 2 Chinese chars),
// while output is "**abiword".
//*****************************************************************
        }

        // create raw 8bit text buffer to put on the clipboard

        IE_Exp_Text * pExpText = new IE_Exp_Text(pDocRange->m_pDoc);
        if (pExpText)
        {
                pExpText->copyToBuffer(pDocRange,&bufTEXT);
                DELETEP(pExpText);
                UT_DEBUGMSG(("CopyToClipboard: copying %d bytes in TEXTPLAIN
format.\n",bufTEXT.getLength()));
                UT_DEBUGMSG(("Belcon:in
AP_UnixApp::copyToClipboard,bufRTXT=%s\n",bufTEXT.getPointer(0)));

//*****************************************************************
// Here output string's sequence is quite right.
//*****************************************************************
        }

So,I know after "pExpRtf->copyToBuffer(pDocRange,&bufRTF)",string's
sequence is wrong.But I am still not know where AW change the
sequence.
May someone give me a detail reference to trace the string which
is selected ,copied and pasted.Then I can put debug instructions
in source code to make it clear where AW change the sequence.

>From: Vlad Harchev <hvv@hippo.ru>
>To: Belcon Zhao <belcon@hotmail.com>
>Subject: Re: I need some help!
>Date: Thu, 9 Nov 2000 10:16:39 +0400 (SAMT)
>
>On Thu, 9 Nov 2000, Belcon Zhao wrote:
>
> Hello Belcon,
>
> > Hello Vlad:
> > I am tracing AW,and I have a question.
> > As you know, copy&paste need
> > copyToClipboard (PD_DocumentRange * pDocRange)
> > of ap_UnixApp.cpp.
> > Here pDocRange should include the strings that
> > we have selected before.Am I right?Then,how can
> > I know what strings it contain?In another word,
> > how can I set UT_DEBUGMSG sentence to show the
> > string?I want to know where AW change the string's
> > sequence.If pDocRange doesn't include the string,
> > then where AW put the string and how can I show it?
>
> pDocRange is ptr to the list of internal structures that describes piece
>of
>document you've selected. So it's very difficult to see what strings they
>contain directly (I don't know its format).
> I recommend the following methods to see:
>* Save to .abw or .txt or .html file and look there
> Yes, you can see only the whole file, not what you've selected. So select
>whole file :)
>
> If you need to know what gets put to clipboard - then print the buffer
>pDocRange is exported to (but this is the same as saving as rtf to file).

Yes.the sequence of the buffer has been changed.:-(

>
> >
> > Best regards,
> > -Belcon
>
> Best regards,
> -Vlad
>
Best regard!
-Belcon
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

Share information about yourself, create your own public profile at
http://profiles.msn.com.



This archive was generated by hypermail 2b25 : Thu Nov 09 2000 - 02:49:12 CST