curvirgo$B$G$9!#(B
(B
(BTakashi Ono wrote:
(B> 680$B%3!<%I%i%$%s$N%S%k%I$K$^$@@.8y$7$F$$$J$$(B(^_^;$B$N$G!"(Bcurvirgo$B$5$s$N$H$3$m$G;n$7$F$_(B
(B> [EMAIL PROTECTED]&$+!#(B
(Bm75$B$K$"$o$;$F<[EMAIL PROTECTED](B
(B($BM>7W$J=j$K2~9T$,F~$C$F$7$^$C$?$N$G!"$[$H$s$I
diff -u -r SRC680_m75.orig/svtools/source/svrtf/parrtf.cxx 
SRC680_m75/svtools/source/svrtf/parrtf.cxx
--- SRC680_m75.orig/svtools/source/svrtf/parrtf.cxx     2004-11-16 
21:44:52.000000000 +0900
+++ SRC680_m75/svtools/source/svrtf/parrtf.cxx  2005-01-30 13:43:22.562500000 
+0900
@@ -371,7 +371,7 @@
                                case '\'':
                                        {
 
-#if 1
+#if 0
                         // #i35653 patch from cmc
                         ByteString 
aByteString(static_cast<char>(GetHexValue()));
                         if (aByteString.Len())
@@ -380,15 +380,15 @@
                         ByteString aByteString;
                         while (1)
                         {
-                            aByteString.Append((char)GetHexValue());
+                            
aByteString.Append(static_cast<char>(GetHexValue()));
 
                             bool bBreak = false;
-                            sal_Char nSlash;
+                            sal_Unicode nSlash;
                             while (!bBreak)
                             {
-                                nSlash = (sal_Char)GetNextChar();
+                                nSlash = GetNextChar();
                                 while (nSlash == 0xD || nSlash == 0xA)
-                                    nSlash = (sal_Char)GetNextChar();
+                                    nSlash = GetNextChar();
 
                                 switch (nSlash)
                                 {
@@ -398,7 +398,7 @@
                                         bBreak = true;
                                         break;
                                     default:
-                                        aByteString.Append(nSlash);
+                                        aByteString.Append(ByteString(nSlash, 
GetSrcEncoding()));
                                         break;
                                 }
                             }
diff -u -r SRC680_m75.orig/sw/source/filter/rtf/rtfatr.cxx 
SRC680_m75/sw/source/filter/rtf/rtfatr.cxx
--- SRC680_m75.orig/sw/source/filter/rtf/rtfatr.cxx     2005-01-11 
21:30:38.000000000 +0900
+++ SRC680_m75/sw/source/filter/rtf/rtfatr.cxx  2005-01-30 13:43:22.609375000 
+0900
@@ -435,9 +435,9 @@
        return (rWrt.Strm() << '{' << sRTF_IGNORE << pStr);
 }
 
-Writer& OutRTF_AsByteString( Writer& rWrt, const String& rStr )
+Writer& OutRTF_AsByteString( Writer& rWrt, const String& rStr, 
rtl_TextEncoding eEncoding)
 {
-       ByteString sOutStr( rStr, DEF_ENCODING );
+       ByteString sOutStr( rStr, eEncoding );
        rWrt.Strm() << sOutStr.GetBuffer();
        return rWrt;
 }
@@ -1305,7 +1305,7 @@
                                sURL = aTmp.GetFull();
                        }
 */                     rWrt.Strm()     << '\"';
-            RTFOutFuncs::Out_String( rWrt.Strm(), sURL, 
rRTFWrt.eCurrentCharSet,
+            RTFOutFuncs::Out_String( rWrt.Strm(), sURL, 
rRTFWrt.eCurrentEncoding,
                                                                        
rRTFWrt.bWriteHelpFmt ) << "\" ";
                        sURL = aTmp.GetMark();
                }
@@ -1314,7 +1314,7 @@
                {
                        rWrt.Strm() << "\\\\l \"";
                        sURL.Erase( 0, 1 );
-            RTFOutFuncs::Out_String( rWrt.Strm(), sURL, 
rRTFWrt.eCurrentCharSet,
+            RTFOutFuncs::Out_String( rWrt.Strm(), sURL, 
rRTFWrt.eCurrentEncoding,
                                                                        
rRTFWrt.bWriteHelpFmt ) << "\" ";
                }
 
@@ -1322,7 +1322,7 @@
                {
                        rWrt.Strm() << "\\\\t \"";
                        RTFOutFuncs::Out_String( rWrt.Strm(), 
rURL.GetTargetFrame(),
-                                               DEF_ENCODING, 
rRTFWrt.bWriteHelpFmt ) << "\" ";
+                                               rRTFWrt.eDefaultEncoding, 
rRTFWrt.bWriteHelpFmt ) << "\" ";
                }
 
                rWrt.Strm() << "}{" << sRTF_FLDRSLT << ' ';
@@ -1593,7 +1593,7 @@
                if (nStrPos != nEnde)
         {
                        RTFOutFuncs::Out_String(rWrt.Strm(), 
String(rStr.GetChar(nStrPos)),
-                rRTFWrt.eCurrentCharSet, rRTFWrt.bWriteHelpFmt);
+                rRTFWrt.eCurrentEncoding, rRTFWrt.bWriteHelpFmt);
         }
     }
 
@@ -1890,7 +1890,7 @@
        // Bitmap als File-Referenz speichern
        rRTFWrt.Strm() << sRTF_FIELD << sRTF_FLDPRIV;
        OutComment( rRTFWrt, sRTF_FLDINST ) << "{\\\\import ";
-       RTFOutFuncs::Out_String( rWrt.Strm(), aGrfNm, DEF_ENCODING,
+       RTFOutFuncs::Out_String( rWrt.Strm(), aGrfNm, rRTFWrt.eDefaultEncoding,
                                                                
rRTFWrt.bWriteHelpFmt );
        rRTFWrt.Strm() << "}}{" << sRTF_FLDRSLT << " }}";
        rRTFWrt.Strm() << '}' << SwRTFWriter::sNewLine;
@@ -2376,7 +2376,7 @@
                const sal_Char* pCmd = bAssoc ? sRTF_AF : sRTF_F;
                rWrt.Strm() << pCmd;
                rWrt.OutULong(rRTFWrt.GetId(rFont));
-        rRTFWrt.eCurrentCharSet = rFont.GetCharSet();
+        rRTFWrt.eCurrentEncoding = 
rtl_getTextEncodingFromWindowsCharset(sw::ms::rtl_TextEncodingToWinCharset(rFont.GetCharSet()));
        }
        return rWrt;
 }
@@ -2891,11 +2891,11 @@
                        rWrt.Strm() << aFldStt.GetBuffer() << "EQ \\\\o 
(\\\\s\\\\up ";
                        rWrt.OutLong( nHeight/2 ) << '(';
                        RTFOutFuncs::Out_String( rWrt.Strm(), 
rFldPar1.Copy(0,nAbove),
-                                                                       
DEF_ENCODING, rRTFWrt.bWriteHelpFmt );
+                                                                       
rRTFWrt.eDefaultEncoding, rRTFWrt.bWriteHelpFmt );
                        rWrt.Strm() << "), \\\\s\\\\do ";
                        rWrt.OutLong( nHeight/5 ) << '(';
                        RTFOutFuncs::Out_String( rWrt.Strm(), rFldPar1.Copy( 
nAbove ),
-                                                                       
DEF_ENCODING, rRTFWrt.bWriteHelpFmt )
+                                                                       
rRTFWrt.eDefaultEncoding, rRTFWrt.bWriteHelpFmt )
                                        << "))";
                }
                break;
@@ -2906,7 +2906,7 @@
        case RES_USERFLD:
                        rWrt.Strm() << aFldStt.GetBuffer();
                        RTFOutFuncs::Out_String( rWrt.Strm(), 
pFld->GetTyp()->GetName(),
-                                                                       
DEF_ENCODING, rRTFWrt.bWriteHelpFmt );
+                                                                       
rRTFWrt.eDefaultEncoding, rRTFWrt.bWriteHelpFmt );
                        break;
        case RES_GETREFFLD:
                {
@@ -2918,7 +2918,7 @@
                 case REF_SETREFATTR:
                 case REF_BOOKMARK:
                                        RTFOutFuncs::Out_String( rWrt.Strm(), 
rRFld.GetSetRefName(),
-                                                                       
DEF_ENCODING, rRTFWrt.bWriteHelpFmt );
+                                                                       
rRTFWrt.eDefaultEncoding, rRTFWrt.bWriteHelpFmt );
                     nFldTyp = 3;
                     break;
                        }
@@ -2990,7 +2990,7 @@
                        sOut += DB_DELIM;
                        sOut += (String)aData.sCommand;
                        RTFOutFuncs::Out_String( rWrt.Strm(), sOut,
-                                                                       
DEF_ENCODING, rRTFWrt.bWriteHelpFmt );
+                                                                       
rRTFWrt.eDefaultEncoding, rRTFWrt.bWriteHelpFmt );
        }
        break;
        case RES_AUTHORFLD:
@@ -3000,11 +3000,11 @@
        case RES_HIDDENTXTFLD:
                        if( TYP_CONDTXTFLD == 
((SwHiddenTxtField*)pFld)->GetSubType() )
                                RTFOutFuncs::Out_String( rWrt.Strm(), 
pFld->Expand(),
-                                                                               
DEF_ENCODING, rRTFWrt.bWriteHelpFmt );
+                                                                               
rRTFWrt.eDefaultEncoding, rRTFWrt.bWriteHelpFmt );
                        else
                        {
                                rWrt.Strm() << '{' << sRTF_V << ' ';
-                               OutRTF_AsByteString( rWrt, pFld->GetPar2() 
).Strm()
+                               OutRTF_AsByteString( rWrt, pFld->GetPar2(), 
rRTFWrt.eDefaultEncoding ).Strm()
                                                        << '}' << 
SwRTFWriter::sNewLine;
                        }
                        return rWrt;            // nicht bis zum Ende, kein 
RTF-Feld !!
@@ -3056,7 +3056,7 @@
                        if( ' ' != cCh )                        // vorweg immer 
einen Trenner
                                rWrt.Strm() << ' ';
                        RTFOutFuncs::Out_String( rWrt.Strm(), pFld->Expand(),
-                                                                               
DEF_ENCODING, rRTFWrt.bWriteHelpFmt );
+                                                                               
rRTFWrt.eDefaultEncoding, rRTFWrt.bWriteHelpFmt );
                }
                break;
        }
@@ -3065,7 +3065,7 @@
        {
                rWrt.Strm() << "}{" << sRTF_FLDRSLT << ' ';
                RTFOutFuncs::Out_String( rWrt.Strm(), pFld->Expand(),
-                                                                               
DEF_ENCODING, rRTFWrt.bWriteHelpFmt );
+                                                                               
rRTFWrt.eDefaultEncoding, rRTFWrt.bWriteHelpFmt );
                rWrt.Strm() << "}}";
                rRTFWrt.bOutFmtAttr = FALSE;
        }
@@ -3112,12 +3112,12 @@
                }
                else
                {
-                       OutRTF_AsByteString( rWrt, rFtn.GetNumStr() );
+                       OutRTF_AsByteString( rWrt, rFtn.GetNumStr(), 
rRTFWrt.eDefaultEncoding );
                        OutComment( rWrt, sRTF_FOOTNOTE );
                        if( rFtn.IsEndNote() )
                                rWrt.Strm() << sRTF_FTNALT;
                        rWrt.Strm() << ' ';
-                       OutRTF_AsByteString( rWrt, rFtn.GetNumStr() );
+                       OutRTF_AsByteString( rWrt, rFtn.GetNumStr(), 
rRTFWrt.eDefaultEncoding );
                }
                RTFSaveData aSaveData( rRTFWrt, nStart, nEnd );
                // damit kein \par ausgegeben wird !!
@@ -3134,7 +3134,7 @@
 static Writer& OutRTF_SwHardBlank( Writer& rWrt, const SfxPoolItem& rHt)
 {
        RTFOutFuncs::Out_String(rWrt.Strm(),
-        String(((SwFmtHardBlank&)rHt).GetChar()), DEF_ENCODING,
+        String(((SwFmtHardBlank&)rHt).GetChar()), 
((SwRTFWriter&)rWrt).eDefaultEncoding,
         ((SwRTFWriter&)rWrt).bWriteHelpFmt);
        return rWrt;
 }
@@ -3215,7 +3215,7 @@
                                << " EQ \\\\* jc" << cJC
                                << " \\\\* \"Font:";
        RTFOutFuncs::Out_String( rWrt.Strm(), pFont->GetFamilyName(),
-                                                       DEF_ENCODING, 
rRTFWrt.bWriteHelpFmt );
+                                                       
rRTFWrt.eDefaultEncoding, rRTFWrt.bWriteHelpFmt );
        rWrt.Strm() << "\" \\\\* hps";
        rWrt.OutLong( nHeight );
        rWrt.Strm() << " \\\\o";
@@ -3243,7 +3243,7 @@
                        rWrt.Strm() << ' ';
        }
        RTFOutFuncs::Out_String( rWrt.Strm(), rRuby.GetText(),
-                                                       DEF_ENCODING, 
rRTFWrt.bWriteHelpFmt );
+                                                       
rRTFWrt.eDefaultEncoding, rRTFWrt.bWriteHelpFmt );
        if( pFmt )
                rWrt.Strm() << '}';
 
diff -u -r SRC680_m75.orig/sw/source/filter/rtf/rtfnum.cxx 
SRC680_m75/sw/source/filter/rtf/rtfnum.cxx
--- SRC680_m75.orig/sw/source/filter/rtf/rtfnum.cxx     2004-04-27 
23:08:30.000000000 +0900
+++ SRC680_m75/sw/source/filter/rtf/rtfnum.cxx  2005-01-30 13:43:22.609375000 
+0900
@@ -1216,7 +1216,7 @@
                                        Strm() << "\\'";
                                        OutHex( sOut.Len() );
                                        RTFOutFuncs::Out_String( Strm(), sOut,
-                                                                               
        DEF_ENCODING, bWriteHelpFmt );
+                                                                               
        eDefaultEncoding, bWriteHelpFmt );
                                }
                        }
                        else
@@ -1245,7 +1245,7 @@
 
                                if( rFmt.GetPrefix().Len() )
                                        RTFOutFuncs::Out_String( Strm(), 
rFmt.GetPrefix(),
-                                                                               
        DEF_ENCODING, bWriteHelpFmt );
+                                                                               
        eDefaultEncoding, bWriteHelpFmt );
 
 
                                for( xub_StrLen x = 0; x < sNumStr.Len(); ++x )
@@ -1259,7 +1259,7 @@
 
                                if( rFmt.GetSuffix().Len() )
                                        RTFOutFuncs::Out_String( Strm(), 
rFmt.GetSuffix(),
-                                                                               
        DEF_ENCODING, bWriteHelpFmt );
+                                                                               
        eDefaultEncoding, bWriteHelpFmt );
                        }
 
                        // write the levelnumbers
@@ -1296,7 +1296,7 @@
                if( !pRule->IsAutoRule() )
                {
                        Strm() << '{' << sRTF_LISTNAME << ' ';
-                       RTFOutFuncs::Out_String( Strm(), pRule->GetName(), 
DEF_ENCODING,
+                       RTFOutFuncs::Out_String( Strm(), pRule->GetName(), 
eDefaultEncoding,
                                                                        
bWriteHelpFmt ) << ";}" ;
                }
                Strm() << sRTF_LISTID;
@@ -1428,7 +1428,7 @@
 
                        if (sTxt.Len())
             {
-                               RTFOutFuncs::Out_String(Strm(), sTxt, 
DEF_ENCODING, 
+                               RTFOutFuncs::Out_String(Strm(), sTxt, 
eDefaultEncoding, 
                     bWriteHelpFmt);
             }
 
diff -u -r SRC680_m75.orig/sw/source/filter/rtf/wrtrtf.cxx 
SRC680_m75/sw/source/filter/rtf/wrtrtf.cxx
--- SRC680_m75.orig/sw/source/filter/rtf/wrtrtf.cxx     2005-01-11 
21:31:38.000000000 +0900
+++ SRC680_m75/sw/source/filter/rtf/wrtrtf.cxx  2005-01-30 15:12:17.421875000 
+0900
@@ -233,8 +233,7 @@
 SV_DECL_VARARR( RTFColorTbl, Color, 5, 8 )
 SV_IMPL_VARARR( RTFColorTbl, Color )
 
-
-SwRTFWriter::SwRTFWriter( const String& rFltName, const String& rBaseURL ) : 
eCurrentCharSet(DEF_ENCODING)
+SwRTFWriter::SwRTFWriter( const String& rFltName, const String& rBaseURL ) : 
eDefaultEncoding(rtl_getTextEncodingFromWindowsCharset(sw::ms::rtl_TextEncodingToWinCharset(DEF_ENCODING))),
  eCurrentEncoding(eDefaultEncoding)
 {
     SetBaseURL( rBaseURL );
        // schreibe Win-RTF-HelpFileFmt
@@ -680,7 +679,7 @@
                                sOut += DB_DELIM;
                                sOut += (String)aData.sCommand;
                                RTFOutFuncs::Out_String( Strm(), sOut,
-                                                                               
DEF_ENCODING, bWriteHelpFmt );
+                                                                               
eDefaultEncoding, bWriteHelpFmt );
                                Strm() << "}{" << sRTF_FLDRSLT << " }}";
                                break;
                        }
@@ -716,20 +715,20 @@
 {
     if (rContent.Len())
     {
-        bool bNeedUnicodeWrapper = !CharsetSufficient(rContent, DEF_ENCODING);
+        bool bNeedUnicodeWrapper = !CharsetSufficient(rContent, 
eDefaultEncoding);
 
         if (bNeedUnicodeWrapper)
             Strm() << '{' << sRTF_UPR;
 
         Strm() << '{' << pToken << ' ';
-        OutRTF_AsByteString(*this, rContent);
+        OutRTF_AsByteString(*this, rContent, eDefaultEncoding);
         Strm() << '}';
 
         if (bNeedUnicodeWrapper)
         {
             OutComment(*this, sRTF_UD);
             Strm() << '{' << pToken << ' ';
-            RTFOutFuncs::Out_String(Strm(), rContent, DEF_ENCODING,
+            RTFOutFuncs::Out_String(Strm(), rContent, eDefaultEncoding,
                 bWriteHelpFmt);
             Strm() << "}}}";
         }
@@ -1024,7 +1023,7 @@
     {
         rRTFWrt.Strm() << '{';
         // rWrt.bWriteHelpFmt
-       RTFOutFuncs::Out_String( rRTFWrt.Strm(), *aIter, DEF_ENCODING,  
rRTFWrt.bWriteHelpFmt  ) << ";}";
+       RTFOutFuncs::Out_String( rRTFWrt.Strm(), *aIter, 
rRTFWrt.eDefaultEncoding,      rRTFWrt.bWriteHelpFmt  ) << ";}";
     }
        rRTFWrt.Strm() << '}' << SwRTFWriter::sNewLine;
 }
@@ -1196,7 +1195,7 @@
                }
 
                Strm() << ' ';
-        RTFOutFuncs::Out_String( Strm(), XlateFmtName( pColl->GetName(), 
GET_POOLID_TXTCOLL ), DEF_ENCODING,
+        RTFOutFuncs::Out_String( Strm(), XlateFmtName( pColl->GetName(), 
GET_POOLID_TXTCOLL ), eDefaultEncoding,
                                                bWriteHelpFmt ) << ";}" << 
SwRTFWriter::sNewLine;
        }
 
@@ -1223,7 +1222,7 @@
                                }
 
                Strm() << ' ';
-        RTFOutFuncs::Out_String( Strm(), XlateFmtName( pFmt->GetName(), 
GET_POOLID_CHRFMT ), DEF_ENCODING,
+        RTFOutFuncs::Out_String( Strm(), XlateFmtName( pFmt->GetName(), 
GET_POOLID_CHRFMT ), eDefaultEncoding,
                                        bWriteHelpFmt ) << ";}" << 
SwRTFWriter::sNewLine;
        }
 
@@ -1394,13 +1393,13 @@
                        else
                        {
                                Strm() << ' ';
-                               OutRTF_AsByteString( *this, 
pBookmark->GetShortName() );
+                               OutRTF_AsByteString( *this, 
pBookmark->GetShortName(), eDefaultEncoding );
                        }
                        Strm() << '}';
                }
                OutComment( *this, sRTF_BKMKSTART ) << ' ';
                RTFOutFuncs::Out_String( Strm(), pBookmark->GetName(),
-                                                               DEF_ENCODING, 
bWriteHelpFmt ) << '}';
+                                                               
eDefaultEncoding, bWriteHelpFmt ) << '}';
        }
 
        if (pEndPos->nNode.GetIndex() == pCurPam->GetPoint()->nNode.GetIndex() 
&&
@@ -1423,13 +1422,13 @@
                        else
                        {
                                Strm() << ' ';
-                               OutRTF_AsByteString( *this, 
pBookmark->GetShortName() );
+                               OutRTF_AsByteString( *this, 
pBookmark->GetShortName(), eDefaultEncoding );
                        }
                        Strm() << '}';
                }
                OutComment( *this, sRTF_BKMKEND ) << ' ';
                RTFOutFuncs::Out_String( Strm(), pBookmark->GetName(),
-                                                               DEF_ENCODING, 
bWriteHelpFmt ) << '}';
+                                                               
eDefaultEncoding, bWriteHelpFmt ) << '}';
 
                if( ++nBkmkTabPos >= pDoc->GetBookmarks().Count() )
                        nBkmkTabPos = USHRT_MAX;
@@ -1564,7 +1563,7 @@
                                break;
                Strm() << sRTF_PGDSCNXT;
                OutULong( i ) << ' ';
-        RTFOutFuncs::Out_String( Strm(), XlateFmtName( rPageDesc.GetName(), 
GET_POOLID_PAGEDESC ), DEF_ENCODING,
+        RTFOutFuncs::Out_String( Strm(), XlateFmtName( rPageDesc.GetName(), 
GET_POOLID_PAGEDESC ), eDefaultEncoding,
                     bWriteHelpFmt ) << ";}";
        }
        Strm() << '}' << SwRTFWriter::sNewLine;
diff -u -r SRC680_m75.orig/sw/source/filter/rtf/wrtrtf.hxx 
SRC680_m75/sw/source/filter/rtf/wrtrtf.hxx
--- SRC680_m75.orig/sw/source/filter/rtf/wrtrtf.hxx     2005-01-11 
21:31:53.000000000 +0900
+++ SRC680_m75/sw/source/filter/rtf/wrtrtf.hxx  2005-01-30 13:43:22.562500000 
+0900
@@ -151,7 +151,8 @@
        const SwPageDesc* pAktPageDesc;         // aktuell gesetzter PageDesc.
        USHORT nBkmkTabPos;                             // akt. Position in der 
Bookmark-Tabelle
        USHORT nCurScript;                                  // actual scripttype
-    rtl_TextEncoding eCurrentCharSet;
+    rtl_TextEncoding eDefaultEncoding;
+    rtl_TextEncoding eCurrentEncoding;
 
 #if defined(MAC) || defined(UNX)
        static const sal_Char sNewLine;                                 // nur 
\012 oder \015
@@ -264,7 +265,7 @@
 
 
 // einige Funktions-Deklarationen
-Writer& OutRTF_AsByteString( Writer& rWrt, const String& rStr );
+Writer& OutRTF_AsByteString( Writer& rWrt, const String& rStr, 
rtl_TextEncoding eEncoding);
 Writer& OutRTF_SwFmt( Writer& rWrt, const SwFmt& );
 Writer& OutRTF_SwTblNode(Writer& , const SwTableNode&);
 Writer& OutRTF_SwSectionNode( Writer& , SwSectionNode & );
---------------------------------------------------------------------
(BTo unsubscribe, e-mail: [EMAIL PROTECTED]
(BFor additional commands, e-mail: [EMAIL PROTECTED]

メールによる返信