diff options
author | Matteo Casalin <matteo.casalin@yahoo.com> | 2013-08-25 02:50:50 +0200 |
---|---|---|
committer | Matteo Casalin <matteo.casalin@yahoo.com> | 2013-08-25 11:50:39 +0000 |
commit | dccdb71d21f2a3c2b483b77a18fec79f3d7f5d39 (patch) | |
tree | a062f251df73288cf33f246bec09da64540df636 /sw | |
parent | 4a386c42f03bdb1896cbdd9391e2c4e1841dd5b6 (diff) |
String to OUString
Change-Id: Id3959a977c697a9300e8eba09c29b575d4c34c11
Reviewed-on: https://gerrit.libreoffice.org/5625
Reviewed-by: Matteo Casalin <matteo.casalin@yahoo.com>
Tested-by: Matteo Casalin <matteo.casalin@yahoo.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/filter/ww8/ww8par2.cxx | 4 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8scan.cxx | 10 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8scan.hxx | 3 |
3 files changed, 9 insertions, 8 deletions
diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx index 7fe428f5a399..3bf32a748456 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 f92ae6e37b77..cde4e9c8432e 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 7026516ae7f0..7f798f343cf5 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; } }; |