[Libreoffice-commits] .: 2 commits - officecfg/registry tools/qa tools/source

Caolán McNamara caolan at kemper.freedesktop.org
Mon Jan 16 07:41:33 PST 2012


 officecfg/registry/data/org/openoffice/VCL.xcu |   36 ++++++++++++-------------
 tools/qa/cppunit/test_stream.cxx               |   10 ++----
 tools/source/stream/stream.cxx                 |   24 ++++++----------
 3 files changed, 31 insertions(+), 39 deletions(-)

New commits:
commit 969abdc19a4d686b0288fee3d8e223df04becc7e
Author: Cheng-Chia Tseng <pswo10680 at gmail.com>
Date:   Mon Jan 16 15:20:02 2012 +0000

    Resolves: fdo#43984 Update VCL.xcu for Chinese (Traditional) language

diff --git a/officecfg/registry/data/org/openoffice/VCL.xcu b/officecfg/registry/data/org/openoffice/VCL.xcu
index 9a14e02..d4d5f0b 100644
--- a/officecfg/registry/data/org/openoffice/VCL.xcu
+++ b/officecfg/registry/data/org/openoffice/VCL.xcu
@@ -578,60 +578,60 @@
     </node>
     <node oor:name="zh-tw" oor:op="replace">
       <prop oor:name="LATIN_FIXED" oor:type="xs:string" oor:op="replace">
-        <value>方正明體;AR PL Mingti2L Big5;細明體;MingLiU;文鼎PL細上海宋Uni;AR PL ShanHeiSun Uni;文鼎PL新宋;AR PL New Sung;MSung Light TC;Cumberland AMT;Cumberland;Courier New;Nimbus Mono L;Courier;Lucida Sans Typewriter;Lucida Typewriter;Monaco;Monospaced</value>
+        <value>文泉驛等寬微米黑;細明體;MingLiU;Cumberland AMT;Cumberland;Courier New;Nimbus Mono L;Courier;Lucida Sans Typewriter;Lucida Typewriter;Monaco;Monospaced</value>
       </prop>
       <prop oor:name="CJK_DISPLAY" oor:type="xs:string" oor:op="replace">
-        <value>微軟正黑體;方正明體;AR PL Mingti2L Big5;新細明體;PMingLiU;文鼎PL細上海宋Uni;AR PL ShanHeiSun Uni;文鼎PL新宋;AR PL New Sung;MSung Light TC;MingLiU;Ming;Andale Sans UI;Arial Unicode MS;Lucida Sans Unicode;Tahoma</value>
+        <value>文泉驛微米黑;黑體-繁;Heiti TC;儷黑 Pro;LiHei Pro;微軟正黑體;新細明體;PMingLiU;MingLiU;Ming;Andale Sans UI;Arial Unicode MS;Lucida Sans Unicode;Tahoma</value>
       </prop>
       <prop oor:name="CJK_HEADING" oor:type="xs:string" oor:op="replace">
-        <value>方正黑体;新細明體;PMingLiU;文鼎PL中楷Uni;AR PL ZenKai Uni;文鼎PL細上海宋Uni;AR PL ShanHeiSun Uni;文鼎PL新宋;AR PL New Sung;MSung Light TC;MingLiU;Ming;Andale Sans UI;Arial Unicode MS;Lucida Sans Unicode;Tahoma</value>
+        <value>文泉驛微米黑;黑體-繁;Heiti TC;儷黑 Pro;LiHei Pro;微軟正黑體;新細明體;PMingLiU;MingLiU;Ming;Andale Sans UI;Arial Unicode MS;Lucida Sans Unicode;Tahoma</value>
       </prop>
       <prop oor:name="CJK_PRESENTATION" oor:type="xs:string" oor:op="replace">
-        <value>微軟正黑體;方正明體;AR PL Mingti2L Big5;文鼎PL細上海宋Uni;AR PL ShanHeiSun Uni;文鼎PL新宋;AR PL New Sung;MSung Light TC;MingLiU;Ming;PMingLiU;Andale Sans UI;Arial Unicode MS;Lucida Sans Unicode;Tahoma</value>
+        <value>文泉驛微米黑;黑體-繁;Heiti TC;儷黑 Pro;LiHei Pro;微軟正黑體;新細明體;MingLiU;Ming;PMingLiU;Andale Sans UI;Arial Unicode MS;Lucida Sans Unicode;Tahoma</value>
       </prop>
       <prop oor:name="CJK_SPREADSHEET" oor:type="xs:string" oor:op="replace">
-        <value>微軟正黑體;方正明體;AR PL Mingti2L Big5;新細明體;PMingLiU;文鼎PL細上海宋Uni;AR PL ShanHeiSun Uni;文鼎PL新宋;AR PL New Sung;MSung Light TC;MingLiU;Ming;Andale Sans UI;Arial Unicode MS;Lucida Sans Unicode;Tahoma</value>
+        <value>文泉驛微米黑;黑體-繁;Heiti TC;儷黑 Pro;LiHei Pro;微軟正黑體;新細明體;PMingLiU;MingLiU;Ming;Andale Sans UI;Arial Unicode MS;Lucida Sans Unicode;Tahoma</value>
       </prop>
       <prop oor:name="CJK_TEXT" oor:type="xs:string" oor:op="replace">
-        <value>微軟正黑體;方正明體;AR PL Mingti2L Big5;新細明體;PMingLiU;文鼎PL細上海宋Uni;AR PL ShanHeiSun Uni;文鼎PL新宋;AR PL New Sung;MSung Light TC;MingLiU;Ming;Andale Sans UI;Arial Unicode MS;Lucida Sans Unicode;Tahoma</value>
+        <value>AR PL UMing TW;儷宋 Pro;LiSong Pro;黑體-繁;Heiti TC;儷黑 Pro;LiHei Pro;新細明體;PMingLiU;MingLiU;Ming;Andale Sans UI;Arial Unicode MS;Lucida Sans Unicode;Tahoma</value>
       </prop>
       <prop oor:name="UI_FIXED" oor:type="xs:string" oor:op="replace">
-        <value>方正明體;AR PL Mingti2L Big5;細明體;MingLiU;文鼎PL細上海宋Uni;AR PL ShanHeiSun Uni;文鼎PL新宋;AR PL New Sung;MSung Light TC;Cumberland AMT;Cumberland;Courier New;Nimbus Mono L;Courier;Lucida Sans Typewriter;Lucida Typewriter;Monaco;Monospaced</value>
+        <value>文泉驛等寬微米黑;細明體;MingLiU;Cumberland AMT;Cumberland;Courier New;Nimbus Mono L;Courier;Lucida Sans Typewriter;Lucida Typewriter;Monaco;Monospaced</value>
       </prop>
       <prop oor:name="FIXED" oor:type="xs:string" oor:op="replace">
-        <value>方正明體;AR PL Mingti2L Big5;細明體;MingLiU;文鼎PL細上海宋Uni;AR PL ShanHeiSun Uni;文鼎PL新宋;AR PL New Sung;MSung Light TC;Cumberland AMT;Cumberland;Courier New;Nimbus Mono L;Courier;Lucida Sans Typewriter;Lucida Typewriter;Monaco;Monospaced</value>
+        <value>文泉驛等寬微米黑;細明體;MingLiU;Cumberland AMT;Cumberland;Courier New;Nimbus Mono L;Courier;Lucida Sans Typewriter;Lucida Typewriter;Monaco;Monospaced</value>
       </prop>
       <prop oor:name="UI_SANS" oor:type="xs:string" oor:op="replace">
-        <value>微軟正黑體;方正明體;AR PL Mingti2L Big5;新細明體;PMingLiU;文鼎PL細上海宋Uni;AR PL ShanHeiSun Uni;文鼎PL新宋;AR PL New Sung;Andale Sans UI;AR PL Mingti2L Big5;AR PL KaitiM Big5;Kai;Arial Unicode MS;Ming;gnu-unifont;Interface User;WarpSans;Geneva;Tahoma;MS Sans Serif;Helv;Dialog;Albany AMT;Albany;Lucida;Arial;Nimbus Sans L;Helvetica;Charcoal;Chicago;Helmet;Interface System;Sans Serif</value>
+        <value>文泉驛微米黑;黑體-繁;Heiti TC;儷黑 Pro;LiHei Pro;微軟正黑體;新細明體;PMingLiU;Andale Sans UI;Kai;Arial Unicode MS;Ming;gnu-unifont;Interface User;WarpSans;Geneva;Tahoma;MS Sans Serif;Helv;Dialog;Albany AMT;Albany;Lucida;Arial;Nimbus Sans L;Helvetica;Charcoal;Chicago;Helmet;Interface System;Sans Serif</value>
       </prop>
     </node>
     <node oor:name="zh-hk" oor:op="replace">
       <prop oor:name="LATIN_FIXED" oor:type="xs:string" oor:op="replace">
-        <value>方正明體;AR PL Mingti2L Big5;細明體;MingLiU;文鼎PL細上海宋Uni;AR PL ShanHeiSun Uni;文鼎PL新宋;AR PL New Sung;MSung Light TC;Cumberland AMT;Cumberland;Courier New;Nimbus Mono L;Courier;Lucida Sans Typewriter;Lucida Typewriter;Monaco;Monospaced</value>
+        <value>文泉驛等寬微米黑;細明體;MingLiU;Cumberland AMT;Cumberland;Courier New;Nimbus Mono L;Courier;Lucida Sans Typewriter;Lucida Typewriter;Monaco;Monospaced</value>
       </prop>
       <prop oor:name="CJK_DISPLAY" oor:type="xs:string" oor:op="replace">
-        <value>微軟正黑體;方正明體;AR PL Mingti2L Big5;新細明體;PMingLiU;文鼎PL細上海宋Uni;AR PL ShanHeiSun Uni;文鼎PL新宋;AR PL New Sung;MSung Light TC;MingLiU;Ming;Andale Sans UI;Arial Unicode MS;Lucida Sans Unicode;Tahoma</value>
+        <value>文泉驛微米黑;黑體-繁;Heiti TC;儷黑 Pro;LiHei Pro;微軟正黑體;新細明體;MingLiU;Ming;Andale Sans UI;Arial Unicode MS;Lucida Sans Unicode;Tahoma</value>
       </prop>
       <prop oor:name="CJK_HEADING" oor:type="xs:string" oor:op="replace">
-        <value>微軟正黑體;FZHeiTi;方正明體;AR PL Mingti2L Big5;新細明體;PMingLiU;文鼎PL中楷Uni;AR PL ZenKai Uni;文鼎PL細上海宋Uni;AR PL ShanHeiSun Uni;文鼎PL新宋;AR PL New Sung;MSung Light TC;MingLiU;Ming;Andale Sans UI;Arial Unicode MS;Lucida Sans Unicode;Tahoma</value>
+        <value>文泉驛微米黑;黑體-繁;Heiti TC;儷黑 Pro;LiHei Pro;微軟正黑體;新細明體;PMingLiU;MingLiU;Ming;Andale Sans UI;Arial Unicode MS;Lucida Sans Unicode;Tahoma</value>
       </prop>
       <prop oor:name="CJK_PRESENTATION" oor:type="xs:string" oor:op="replace">
-        <value>微軟正黑體;方正明體;AR PL Mingti2L Big5;文鼎PL細上海宋Uni;AR PL ShanHeiSun Uni;文鼎PL新宋;AR PL New Sung;MSung Light TC;MingLiU;Ming;PMingLiU;Andale Sans UI;Arial Unicode MS;Lucida Sans Unicode;Tahoma</value>
+        <value>文泉驛微米黑;黑體-繁;Heiti TC;儷黑 Pro;LiHei Pro;微軟正黑體;新細明體;MingLiU;Ming;PMingLiU;Andale Sans UI;Arial Unicode MS;Lucida Sans Unicode;Tahoma</value>
       </prop>
       <prop oor:name="CJK_SPREADSHEET" oor:type="xs:string" oor:op="replace">
-        <value>微軟正黑體;方正明體;AR PL Mingti2L Big5;新細明體;PMingLiU;文鼎PL細上海宋Uni;AR PL ShanHeiSun Uni;文鼎PL新宋;AR PL New Sung;MSung Light TC;MingLiU;Ming;Andale Sans UI;Arial Unicode MS;Lucida Sans Unicode;Tahoma</value>
+        <value>文泉驛微米黑;黑體-繁;Heiti TC;儷黑 Pro;LiHei Pro;微軟正黑體;新細明體;PMingLiU;MingLiU;Ming;Andale Sans UI;Arial Unicode MS;Lucida Sans Unicode;Tahoma</value>
       </prop>
       <prop oor:name="CJK_TEXT" oor:type="xs:string" oor:op="replace">
-        <value>方正明體;AR PL Mingti2L Big5;新細明體;PMingLiU;文鼎PL細上海宋Uni;AR PL ShanHeiSun Uni;文鼎PL新宋;AR PL New Sung;MSung Light TC;MingLiU;Ming;Andale Sans UI;Arial Unicode MS;Lucida Sans Unicode;Tahoma</value>
+        <value>AR PL UMing HK;儷宋 Pro;LiSong Pro;新細明體;PMingLiU;MingLiU;Ming;Andale Sans UI;Arial Unicode MS;Lucida Sans Unicode;Tahoma</value>
       </prop>
       <prop oor:name="UI_FIXED" oor:type="xs:string" oor:op="replace">
-        <value>方正明體;AR PL Mingti2L Big5;細明體;MingLiU;文鼎PL細上海宋Uni;AR PL ShanHeiSun Uni;文鼎PL新宋;AR PL New Sung;MSung Light TC;Cumberland AMT;Cumberland;Courier New;Nimbus Mono L;Courier;Lucida Sans Typewriter;Lucida Typewriter;Monaco;Monospaced</value>
+        <value>文泉驛等寬微米黑;細明體;MingLiU;Cumberland AMT;Cumberland;Courier New;Nimbus Mono L;Courier;Lucida Sans Typewriter;Lucida Typewriter;Monaco;Monospaced</value>
       </prop>
       <prop oor:name="FIXED" oor:type="xs:string" oor:op="replace">
-        <value>方正明體;AR PL Mingti2L Big5;細明體;MingLiU;文鼎PL細上海宋Uni;AR PL ShanHeiSun Uni;文鼎PL新宋;AR PL New Sung;MSung Light TC;Cumberland AMT;Cumberland;Courier New;Nimbus Mono L;Courier;Lucida Sans Typewriter;Lucida Typewriter;Monaco;Monospaced</value>
+        <value>文泉驛等寬微米黑;細明體;MingLiU;Cumberland AMT;Cumberland;Courier New;Nimbus Mono L;Courier;Lucida Sans Typewriter;Lucida Typewriter;Monaco;Monospaced</value>
       </prop>
       <prop oor:name="UI_SANS" oor:type="xs:string" oor:op="replace">
-        <value>微軟正黑體;方正明體;AR PL Mingti2L Big5;新細明體;PMingLiU;文鼎PL細上海宋Uni;AR PL ShanHeiSun Uni;文鼎PL新宋;AR PL New Sung;Andale Sans UI;AR PL Mingti2L Big5;AR PL KaitiM Big5;Kai;Arial Unicode MS;Ming;gnu-unifont;Interface User;WarpSans;Geneva;Tahoma;MS Sans Serif;Helv;Dialog;Albany AMT;Albany;Lucida;Arial;Nimbus Sans L;Helvetica;Charcoal;Chicago;Helmet;Interface System;Sans Serif</value>
+        <value>文泉驛微米黑;黑體-繁;Heiti TC;儷黑 Pro;LiHei Pro;微軟正黑體;新細明體;PMingLiU;Andale Sans UI;Kai;Arial Unicode MS;Ming;gnu-unifont;Interface User;WarpSans;Geneva;Tahoma;MS Sans Serif;Helv;Dialog;Albany AMT;Albany;Lucida;Arial;Nimbus Sans L;Helvetica;Charcoal;Chicago;Helmet;Interface System;Sans Serif</value>
       </prop>
     </node>
     <node oor:name="zh-sg" oor:op="replace">
commit 94a8737a54c9e2c320e0be0286a5ecc0d354b8cc
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Jan 16 15:05:25 2012 +0000

    drop strange embedded null handling behaviour

diff --git a/tools/qa/cppunit/test_stream.cxx b/tools/qa/cppunit/test_stream.cxx
index 107d1c1..16293d0 100644
--- a/tools/qa/cppunit/test_stream.cxx
+++ b/tools/qa/cppunit/test_stream.cxx
@@ -264,16 +264,14 @@ namespace
         aMemStream.Seek(0);
         bRet = aMemStream.ReadLine(aFoo);
         CPPUNIT_ASSERT(bRet);
-        //This is the weird current behavior where an embedded null is read but
-        //discarded
-        CPPUNIT_ASSERT(aFoo.equalsL(RTL_CONSTASCII_STRINGPARAM("foobar"))); //<--diff A
+        CPPUNIT_ASSERT(aFoo.getLength() == 7 && aFoo[3] == 0);
         CPPUNIT_ASSERT(aMemStream.good());
 
         std::string sStr(RTL_CONSTASCII_STRINGPARAM(foo));
         std::istringstream iss(sStr, std::istringstream::in);
         std::getline(iss, sStr, '\n');
         //embedded null read as expected
-        CPPUNIT_ASSERT(sStr.size() == 7 && sStr[3] == 0);                   //<--diff A
+        CPPUNIT_ASSERT(sStr.size() == 7 && sStr[3] == 0);
         CPPUNIT_ASSERT(iss.good());
 
         bRet = aMemStream.ReadLine(aFoo);
@@ -299,12 +297,12 @@ namespace
         bRet = aMemStreamB.ReadLine(aFoo);
         CPPUNIT_ASSERT(bRet);
         CPPUNIT_ASSERT(aFoo.equalsL(RTL_CONSTASCII_STRINGPARAM("foo")));
-        CPPUNIT_ASSERT(!aMemStreamB.eof()); //<-- diff B
+        CPPUNIT_ASSERT(!aMemStreamB.eof()); //<-- diff A
 
         std::istringstream issB(bar, std::istringstream::in);
         std::getline(issB, sStr, '\n');
         CPPUNIT_ASSERT(sStr == "foo");
-        CPPUNIT_ASSERT(issB.eof());         //<-- diff B
+        CPPUNIT_ASSERT(issB.eof());         //<-- diff A
     }
 
     CPPUNIT_TEST_SUITE_REGISTRATION(Test);
diff --git a/tools/source/stream/stream.cxx b/tools/source/stream/stream.cxx
index 08559ad..7a9bf0d 100644
--- a/tools/source/stream/stream.cxx
+++ b/tools/source/stream/stream.cxx
@@ -643,7 +643,7 @@ sal_Bool SvStream::ReadLine( ByteString& rStr )
     sal_Char    c           = 0;
     sal_Size       nTotalLen   = 0;
 
-    rStr.Erase();
+    rtl::OStringBuffer aBuf;
     while( !bEnd && !GetError() )   // !!! nicht auf EOF testen,
                                     // !!! weil wir blockweise
                                     // !!! lesen
@@ -651,10 +651,11 @@ sal_Bool SvStream::ReadLine( ByteString& rStr )
         sal_uInt16 nLen = (sal_uInt16)Read( buf, sizeof(buf)-1 );
         if ( !nLen )
         {
-            if ( rStr.Len() == 0 )
+            if ( aBuf.getLength() == 0 )
             {
                 // der allererste Blockread hat fehlgeschlagen -> Abflug
                 bIsEof = sal_True;
+                rStr = rtl::OString();
                 return sal_False;
             }
             else
@@ -670,23 +671,15 @@ sal_Bool SvStream::ReadLine( ByteString& rStr )
                 bEnd = sal_True;
                 break;
             }
-            // erAck 26.02.01: Old behavior was no special treatment of '\0'
-            // character here, but a following rStr+=c did ignore it. Is this
-            // really intended? Or should a '\0' better terminate a line?
-            // The nOldFilePos stuff wasn't correct then anyways.
-            if ( c )
-            {
-                if ( n < j )
-                    buf[n] = c;
-                ++n;
-            }
+            if ( n < j )
+                buf[n] = c;
+            ++n;
         }
-        if ( n )
-            rStr.Append( buf, n );
+        aBuf.append(buf, n);
         nTotalLen += j;
     }
 
-    if ( !bEnd && !GetError() && rStr.Len() )
+    if ( !bEnd && !GetError() && aBuf.getLength() )
         bEnd = sal_True;
 
     nOldFilePos += nTotalLen;
@@ -706,6 +699,7 @@ sal_Bool SvStream::ReadLine( ByteString& rStr )
 
     if ( bEnd )
         bIsEof = sal_False;
+    rStr = aBuf.makeStringAndClear();
     return bEnd;
 }
 


More information about the Libreoffice-commits mailing list