diff options
Diffstat (limited to 'filters')
-rw-r--r-- | filters/kspread/qpro/libqpro/src/formula.cc | 14 | ||||
-rw-r--r-- | filters/kspread/qpro/libqpro/src/record.cc | 8 | ||||
-rw-r--r-- | filters/kspread/qpro/libqpro/src/stream.cc | 4 |
3 files changed, 11 insertions, 15 deletions
diff --git a/filters/kspread/qpro/libqpro/src/formula.cc b/filters/kspread/qpro/libqpro/src/formula.cc index 13e3a457..aab0bb8d 100644 --- a/filters/kspread/qpro/libqpro/src/formula.cc +++ b/filters/kspread/qpro/libqpro/src/formula.cc @@ -1,7 +1,7 @@ #include <qpro/common.h> #include <iostream> -#include <strstream> +#include <sstream> #include <string.h> @@ -474,30 +474,26 @@ void QpFormula::floatFuncReal(const char*) { TQP_INT64 lFloat; - std::ostrstream lNum; + std::ostringstream lNum; cFormula >> lFloat; lNum << lFloat << ends; - cStack.push( lNum.str() ); - - lNum.rdbuf()->freeze(0); + cStack.push( lNum.str().c_str() ); } void QpFormula::intFuncReal(const char*) { TQP_INT16 lInt; - std::ostrstream lNum; + std::ostringstream lNum; cFormula >> lInt; lNum << lInt << ends; - cStack.push( lNum.str() ); - - lNum.rdbuf()->freeze(0); + cStack.push( lNum.str().c_str() ); } void diff --git a/filters/kspread/qpro/libqpro/src/record.cc b/filters/kspread/qpro/libqpro/src/record.cc index 8aa877c6..461b65d3 100644 --- a/filters/kspread/qpro/libqpro/src/record.cc +++ b/filters/kspread/qpro/libqpro/src/record.cc @@ -10,7 +10,7 @@ // ----------------------------------------------------------------------- #include <iomanip> -#include <strstream> +#include <sstream> void Charout(ostream& pOut, unsigned char pChar) @@ -32,7 +32,7 @@ Hexout(ostream& pOut, unsigned char pChar) int Hexout(char* pChar, int pLen) { - std::ostrstream* lOStr = new std::ostrstream; + std::ostringstream* lOStr = new std::ostringstream; while( pLen ) { @@ -57,7 +57,7 @@ Hexout(char* pChar, int pLen) cerr << lOStr->rdbuf() << endl; delete lOStr; - lOStr = new std::ostrstream; + lOStr = new std::ostringstream; } delete lOStr; @@ -200,7 +200,7 @@ QpRecCell::cellRef(char* pText, QpTableNames& pTable, TQP_INT16 /*pNoteBook*/, T { //??? cope with relative/absolute references - std::strstream lOut(pText, 20, ios::out); // ??? ard coded len + std::stringstream lOut(pText, ios::out); int lPageRelative = pRow & 0x8000; int lColRelative = pRow & 0x4000; int lRowRelative = pRow & 0x2000; diff --git a/filters/kspread/qpro/libqpro/src/stream.cc b/filters/kspread/qpro/libqpro/src/stream.cc index 012e18bb..390fc370 100644 --- a/filters/kspread/qpro/libqpro/src/stream.cc +++ b/filters/kspread/qpro/libqpro/src/stream.cc @@ -32,7 +32,7 @@ QpIStream::~QpIStream() #else #include <string> #include <fstream> -#include <strstream> +#include <sstream> // For IRIX namespace std {} @@ -61,7 +61,7 @@ QpIStream::QpIStream(unsigned char* pBuffer, unsigned int pLen) , cOffset(0L) , cStreamBuf(0) { - cStreamBuf = new std::strstreambuf (pBuffer, pLen); + cStreamBuf = new std::stringbuf ((char*)(pBuffer)); //cIn will read into char anyway.... cIn = new istream(cStreamBuf); } |