summaryrefslogtreecommitdiff
path: root/l10ntools/source/lngmerge.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-01-25 21:07:19 +0000
committerCaolán McNamara <caolanm@redhat.com>2012-01-26 11:10:41 +0000
commit0143300979ecf2d25deebf69c7c9d52217204fa8 (patch)
tree4bc7fd428450faba9b0e48217a9754ea5d547e4d /l10ntools/source/lngmerge.cxx
parent1f26095e9c4f72f7bd6e78416c409f68ceae3027 (diff)
convert vectors to OString
Diffstat (limited to 'l10ntools/source/lngmerge.cxx')
-rw-r--r--l10ntools/source/lngmerge.cxx18
1 files changed, 9 insertions, 9 deletions
diff --git a/l10ntools/source/lngmerge.cxx b/l10ntools/source/lngmerge.cxx
index eaa0b39588d3..d738a89a562c 100644
--- a/l10ntools/source/lngmerge.cxx
+++ b/l10ntools/source/lngmerge.cxx
@@ -67,7 +67,7 @@ LngParser::LngParser(const rtl::OString &rLngFile, sal_Bool bUTF8,
bFirstLine = false;
}
- pLines->push_back( new ByteString( sLine ) );
+ pLines->push_back( new rtl::OString(sLine) );
}
}
else
@@ -79,7 +79,7 @@ LngParser::LngParser(const rtl::OString &rLngFile, sal_Bool bUTF8,
LngParser::~LngParser()
{
- for ( size_t i = 0, n = pLines->size(); i < n; i++ )
+ for ( size_t i = 0, n = pLines->size(); i < n; ++i )
delete (*pLines)[ i ];
pLines->clear();
delete pLines;
@@ -244,11 +244,11 @@ sal_Bool LngParser::Merge(
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, ' ');
@@ -280,7 +280,7 @@ sal_Bool LngParser::Merge(
pEntrys->GetText( sNewText, STRING_TYP_TEXT, sLang, sal_True );
if ( sNewText.Len()) {
- ByteString *pLine = (*pLines)[ nPos ];
+ rtl::OString *pLine = (*pLines)[ nPos ];
ByteString sText1( sLang );
sText1 += " = \"";
@@ -329,9 +329,9 @@ sal_Bool LngParser::Merge(
if ( nLastLangPos < pLines->size() ) {
LngLineList::iterator it = pLines->begin();
::std::advance( it, nLastLangPos );
- pLines->insert( it, new ByteString( sLine ) );
+ pLines->insert( it, new rtl::OString(sLine) );
} else {
- pLines->push_back( new ByteString( sLine ) );
+ pLines->push_back( new rtl::OString(sLine) );
}
}
}
@@ -341,7 +341,7 @@ sal_Bool LngParser::Merge(
delete pResData;
}
- for ( size_t i = 0; i < pLines->size(); i++ )
+ for ( size_t i = 0; i < pLines->size(); ++i )
aDestination.WriteLine( *(*pLines)[ i ] );
aDestination.Close();