summaryrefslogtreecommitdiff
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
parent1f26095e9c4f72f7bd6e78416c409f68ceae3027 (diff)
convert vectors to OString
-rw-r--r--l10ntools/inc/lngmerge.hxx2
-rw-r--r--l10ntools/source/lngmerge.cxx18
2 files changed, 10 insertions, 10 deletions
diff --git a/l10ntools/inc/lngmerge.hxx b/l10ntools/inc/lngmerge.hxx
index 4dc9fb90aef2..2a4a0d31db1f 100644
--- a/l10ntools/inc/lngmerge.hxx
+++ b/l10ntools/inc/lngmerge.hxx
@@ -29,7 +29,7 @@
#include "export.hxx"
#include <vector>
-typedef ::std::vector< ByteString* > LngLineList;
+typedef ::std::vector< rtl::OString* > LngLineList;
#define LNG_OK 0x0000
#define LNG_FILE_NOTFOUND 0x0001
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();