From: Christian P. <cp...@us...> - 2005-07-08 08:17:54
|
Update of /cvsroot/pclasses/pclasses2/src/IO In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21106/src/IO Modified Files: TextStream.cpp Log Message: - Fixed IO::TextStream Index: TextStream.cpp =================================================================== RCS file: /cvsroot/pclasses/pclasses2/src/IO/TextStream.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- TextStream.cpp 6 Jul 2005 13:01:05 -0000 1.2 +++ TextStream.cpp 8 Jul 2005 08:17:45 -0000 1.3 @@ -112,7 +112,7 @@ // create the new converter ... if(_converter) { - Unicode::Converter* newConverter = new Unicode::Converter(cp); + Unicode::Converter* newConverter = new Unicode::Converter(newCodePage.get()); delete _converter; _converter = newConverter; } @@ -142,7 +142,8 @@ // create the new number formater ... if(_numFormater) { - Unicode::NumberFormat* newNumFormater = createNumFormater(_numFormat, loc); + Unicode::NumberFormat* newNumFormater = createNumFormater(_numFormat, + newLocale.get()); delete _numFormater; _numFormater = newNumFormater; } @@ -205,15 +206,15 @@ return _padPos; } -void TextStream::setPadChar(Unicode::Char ch) throw() +void TextStream::setPadChar(const Unicode::String& str) throw() { if(_numFormater) - _numFormater->setPadChar(ch); + _numFormater->setPadChar(str); - _padChar = ch; + _padChar = str; } -Unicode::Char TextStream::padChar() const throw() +const Unicode::String& TextStream::padChar() const throw() { return _padChar; } @@ -316,10 +317,11 @@ return *this; } -void writePadString(TextStream& strm, Unicode::Char padChar, size_t count) +void writePadString(TextStream& strm, const Unicode::String& padChar, size_t count) { Unicode::String fillStr(count); - fillStr.insert(0, count, padChar); + while(fillStr.size() < count) + fillStr.append(padChar); strm.write(fillStr); } |