diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-12-12 22:07:41 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-12-13 10:11:42 +0000 |
commit | 73d76958fd626ab55cbaf5264247cee10ec85fd6 (patch) | |
tree | 72abdc29f5a69670f284f23d842f9ee98e37b45e /l10ntools | |
parent | da5f9b7c29ee86c4fc235fa1281477161271f7c9 (diff) |
ByteString->rtl::OString
Diffstat (limited to 'l10ntools')
-rw-r--r-- | l10ntools/inc/lngmerge.hxx | 2 | ||||
-rw-r--r-- | l10ntools/source/lngmerge.cxx | 19 |
2 files changed, 10 insertions, 11 deletions
diff --git a/l10ntools/inc/lngmerge.hxx b/l10ntools/inc/lngmerge.hxx index 285f12953f1e..fce88be235aa 100644 --- a/l10ntools/inc/lngmerge.hxx +++ b/l10ntools/inc/lngmerge.hxx @@ -53,7 +53,7 @@ private: bool bQuiet; std::vector<ByteString> aLanguages; - bool isNextGroup( ByteString &sGroup_out , ByteString &sLine_in); + bool isNextGroup(rtl::OString &sGroup_out, rtl::OString &sLine_in); void ReadLine(const rtl::OString &rLine_in, ByteStringHashMap &rText_inout); void WriteSDF(SvFileStream &aSDFStream, ByteStringHashMap &rText_inout, diff --git a/l10ntools/source/lngmerge.cxx b/l10ntools/source/lngmerge.cxx index cb59f07ee3e6..f63e7d21111a 100644 --- a/l10ntools/source/lngmerge.cxx +++ b/l10ntools/source/lngmerge.cxx @@ -110,10 +110,9 @@ sal_Bool LngParser::CreateSDF(const rtl::OString &rSDFFile, size_t nPos = 0; sal_Bool bStart = true; - ByteString sGroup; + rtl::OString sGroup, sLine; ByteStringHashMap Text; ByteString sID; - ByteString sLine; while( nPos < pLines->size() ) { sLine = *(*pLines)[ nPos++ ]; @@ -164,12 +163,11 @@ void LngParser::WriteSDF(SvFileStream &aSDFStream, } } -bool LngParser::isNextGroup( ByteString &sGroup_out , ByteString &sLine_in ) +bool LngParser::isNextGroup(rtl::OString &sGroup_out, rtl::OString &sLine_in) { sLine_in = comphelper::string::stripStart(sLine_in, ' '); sLine_in = comphelper::string::stripEnd(sLine_in, ' '); - if (( sLine_in.GetChar( 0 ) == '[' ) && - ( sLine_in.GetChar( sLine_in.Len() - 1 ) == ']' )) + if ((sLine_in[0] == '[') && (sLine_in[sLine_in.getLength() - 1] == ']')) { sGroup_out = getToken(getToken(sLine_in, 1, '['), 0, ']'); sGroup_out = comphelper::string::stripStart(sGroup_out, ' '); @@ -211,16 +209,16 @@ sal_Bool LngParser::Merge( size_t nPos = 0; sal_Bool bGroup = sal_False; - ByteString sGroup; + rtl::OString sGroup; // seek to next group while ( nPos < pLines->size() && !bGroup ) { - ByteString sLine( *(*pLines)[ nPos ] ); + rtl::OString sLine( *(*pLines)[ nPos ] ); sLine = comphelper::string::stripStart(sLine, ' '); sLine = comphelper::string::stripEnd(sLine, ' '); - if (( sLine.GetChar( 0 ) == '[' ) && - ( sLine.GetChar( sLine.Len() - 1 ) == ']' )) + if (( sLine[0] == '[' ) && + ( sLine[sLine.getLength() - 1] == ']' )) { sGroup = getToken(getToken(sLine, 1, '['), 0, ']'); sGroup = comphelper::string::stripStart(sGroup, ' '); @@ -277,7 +275,8 @@ sal_Bool LngParser::Merge( { // this is a valid text line ByteString sText = getToken(getToken(sLine, 1, '\"'), 0, '\"'); - if( sLang.Len() ){ + if( sLang.Len() ) + { ByteString sNewText; pEntrys->GetText( sNewText, STRING_TYP_TEXT, sLang, sal_True ); |