[Libreoffice-commits] core.git: sw/source

Matteo Casalin matteo.casalin at yahoo.com
Sun Aug 25 04:51:06 PDT 2013


 sw/source/filter/ww8/ww8par2.cxx |    4 ++--
 sw/source/filter/ww8/ww8scan.cxx |   10 +++++-----
 sw/source/filter/ww8/ww8scan.hxx |    3 ++-
 3 files changed, 9 insertions(+), 8 deletions(-)

New commits:
commit dccdb71d21f2a3c2b483b77a18fec79f3d7f5d39
Author: Matteo Casalin <matteo.casalin at yahoo.com>
Date:   Sun Aug 25 02:50:50 2013 +0200

    String to OUString
    
    Change-Id: Id3959a977c697a9300e8eba09c29b575d4c34c11
    Reviewed-on: https://gerrit.libreoffice.org/5625
    Reviewed-by: Matteo Casalin <matteo.casalin at yahoo.com>
    Tested-by: Matteo Casalin <matteo.casalin at yahoo.com>

diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx
index 7fe428f..3bf32a7 100644
--- a/sw/source/filter/ww8/ww8par2.cxx
+++ b/sw/source/filter/ww8/ww8par2.cxx
@@ -3854,7 +3854,7 @@ void WW8RStyle::Import1Style( sal_uInt16 nNr )
     pStStrm->Seek( rSI.nFilePos );
 
     short nSkip, cbStd;
-    String sName;
+    OUString sName;
 
     boost::scoped_ptr<WW8_STD> xStd(Read1Style(nSkip, &sName, &cbStd));// read Style
 
@@ -3863,7 +3863,7 @@ void WW8RStyle::Import1Style( sal_uInt16 nNr )
 
     // either no Name or unused Slot or unknown Style
 
-    if ( !xStd || (0 == sName.Len()) || ((1 != xStd->sgc) && (2 != xStd->sgc)) )
+    if ( !xStd || sName.isEmpty() || ((1 != xStd->sgc) && (2 != xStd->sgc)) )
     {
         pStStrm->SeekRel( nSkip );
         return;
diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx
index f92ae6e..cde4e9c 100644
--- a/sw/source/filter/ww8/ww8scan.cxx
+++ b/sw/source/filter/ww8/ww8scan.cxx
@@ -6043,7 +6043,7 @@ WW8_STD* WW8Style::Read1STDFixed( short& rSkip, short* pcbStd )
     return pStd;
 }
 
-WW8_STD* WW8Style::Read1Style( short& rSkip, String* pString, short* pcbStd )
+WW8_STD* WW8Style::Read1Style( short& rSkip, OUString* pString, short* pcbStd )
 {
     // Attention: MacWord-Documents have their Stylenames
     // always in ANSI, even if eStructCharSet == CHARSET_MAC !!
@@ -6062,7 +6062,7 @@ WW8_STD* WW8Style::Read1Style( short& rSkip, String* pString, short* pcbStd )
                     // lies Pascal-String
                     *pString = read_uInt8_BeltAndBracesString(rSt, RTL_TEXTENCODING_MS_1252);
                     // leading len and trailing zero --> 2
-                    rSkip -= 2+ pString->Len();
+                    rSkip -= pString->getLength() + 2;
                     break;
                 case 8:
                     // handle Unicode-String with leading length short and
@@ -6070,7 +6070,7 @@ WW8_STD* WW8Style::Read1Style( short& rSkip, String* pString, short* pcbStd )
                     if (TestBeltAndBraces<sal_Unicode>(rSt))
                     {
                         *pString = read_uInt16_BeltAndBracesString(rSt);
-                        rSkip -= (pString->Len() + 2) * 2;
+                        rSkip -= (pString->getLength() + 2) * 2;
                     }
                     else
                     {
@@ -6086,7 +6086,7 @@ WW8_STD* WW8Style::Read1Style( short& rSkip, String* pString, short* pcbStd )
                         */
                         *pString = read_uInt8_BeltAndBracesString(rSt,RTL_TEXTENCODING_MS_1252);
                         // leading len and trailing zero --> 2
-                        rSkip -= 2+ pString->Len();
+                        rSkip -= pString->getLength() + 2;
                     }
                     break;
                 default:
@@ -6095,7 +6095,7 @@ WW8_STD* WW8Style::Read1Style( short& rSkip, String* pString, short* pcbStd )
             }
         }
         else
-            *pString = aEmptyStr;   // Kann keinen Namen liefern
+            *pString = OUString();   // Kann keinen Namen liefern
     }
     return pStd;
 }
diff --git a/sw/source/filter/ww8/ww8scan.hxx b/sw/source/filter/ww8/ww8scan.hxx
index 7026516..7f798f3 100644
--- a/sw/source/filter/ww8/ww8scan.hxx
+++ b/sw/source/filter/ww8/ww8scan.hxx
@@ -30,6 +30,7 @@
 #include <tools/solar.h>        // UINTXX
 #include <tools/stream.hxx>
 #include <tools/string.hxx>
+#include "rtl/ustring.hxx"
 #include "hash_wrap.hxx"
 #include "sortedarray.hxx"
 
@@ -1455,7 +1456,7 @@ protected:
 public:
     WW8Style( SvStream& rSt, WW8Fib& rFibPara );
     WW8_STD* Read1STDFixed( short& rSkip, short* pcbStd );
-    WW8_STD* Read1Style( short& rSkip, String* pString, short* pcbStd );
+    WW8_STD* Read1Style( short& rSkip, OUString* pString, short* pcbStd );
     sal_uInt16 GetCount() const { return cstd; }
 };
 


More information about the Libreoffice-commits mailing list