Windows clipboard patch

From: Dom Lachowicz (doml@appligent.com)
Date: Sat Aug 31 2002 - 13:01:47 EDT

  • Next message: Dom Lachowicz: "Commit: start of XHTML table export"

    This is only a small patch to make things cleaner. Now that the text
    importer and exporter constructors support encoding names, people like
    Andrew and Tomas could make the win32 clipboard a bunch better with
    regard to text selections.

    Dom


    ? Untitled1.CRASHED
    ? Untitled2.CRASHED
    ? autom4te-2.53.cache
    ? win32_clipboard.patch
    ? src/other/ttftool/GNUmakefile.in
    ? src/other/ttftool/unix/GNUmakefile.in
    ? src/wp/main/cocoa/AbiWord.app/GNUmakefile.in
    ? src/wp/main/cocoa/AbiWord.app/Contents/GNUmakefile.in
    ? src/wp/main/cocoa/AbiWord.app/Contents/Frameworks/GNUmakefile.in
    ? src/wp/main/cocoa/AbiWord.app/Contents/MacOS/GNUmakefile.in
    ? src/wp/main/cocoa/AbiWord.app/Contents/Resources/GNUmakefile.in
    ? src/wp/main/cocoa/AbiWord.app/Contents/Resources/English.lproj/GNUmakefile.in
    Index: src/wp/ap/win/ap_Win32App.cpp
    ===================================================================
    RCS file: /cvsroot/abi/src/wp/ap/win/ap_Win32App.cpp,v
    retrieving revision 1.98
    diff -u -r1.98 ap_Win32App.cpp
    --- src/wp/ap/win/ap_Win32App.cpp 30 Aug 2002 22:09:15 -0000 1.98
    +++ src/wp/ap/win/ap_Win32App.cpp 31 Aug 2002 17:02:12 -0000
    @@ -528,7 +528,7 @@
                     }
     
                     // put raw text on the clipboard
    -
    + }
                     // TODO Should use a finer-grain technique than IsWinNT() since Win98 supports unicode clipboard.
                     if (UT_IsWinNT())
                     {
    @@ -537,7 +537,8 @@
                             // TODO The system allows old apps to access it as 8 bit.
                             // TODO We can't do this yet due to the design of Abi's clipboard and import/export modules.
     
    - IE_Exp_Text * pExpUnicodeText = new IE_Exp_Text(pDocRange->m_pDoc);
    + const char * szEncoding = XAP_EncodingManager::get_instance()->getNativeUnicodeEncodingName();
    + IE_Exp_Text * pExpUnicodeText = new IE_Exp_Text(pDocRange->m_pDoc, szEncoding);
                             if (pExpUnicodeText)
                             {
                                     UT_ByteBuf buf;
    Index: src/wp/impexp/xp/ie_exp_Text.cpp
    ===================================================================
    RCS file: /cvsroot/abi/src/wp/impexp/xp/ie_exp_Text.cpp,v
    retrieving revision 1.45
    diff -u -r1.45 ie_exp_Text.cpp
    --- src/wp/impexp/xp/ie_exp_Text.cpp 30 Aug 2002 20:31:19 -0000 1.45
    +++ src/wp/impexp/xp/ie_exp_Text.cpp 31 Aug 2002 17:02:14 -0000
    @@ -171,17 +171,6 @@
     
     UT_Error IE_Exp_Text::_writeDocument(void)
     {
    - // TODO If we're going to the clipboard and the OS supports unicode, set encoding.
    - // TODO Only supports Windows so far.
    - // TODO Should use a finer-grain technique than IsWinNT() since Win98 supports unicode clipboard.
    - if (getDocRange())
    - {
    -#ifdef WIN32
    - if (UT_IsWinNT())
    - _setEncoding(XAP_EncodingManager::get_instance()->getNativeUnicodeEncodingName());
    -#endif
    - }
    -
             m_pListener = _constructListener();
             if (!m_pListener)
                     return UT_IE_NOMEMORY;



    This archive was generated by hypermail 2.1.4 : Sat Aug 31 2002 - 13:05:03 EDT