diff options
author | Michele Calgaro <[email protected]> | 2018-08-16 23:36:38 +0900 |
---|---|---|
committer | Michele Calgaro <[email protected]> | 2018-08-16 23:36:38 +0900 |
commit | 7a7c17092fcdd4772fb6e499ef13429f96ac04bb (patch) | |
tree | e704b24ea9e06e2d1483130ab51bbc7b21723ad4 /filters | |
parent | d3ca65fd8dd632a157f3199f07c6a765bd715b09 (diff) | |
download | koffice-7a7c17092fcdd4772fb6e499ef13429f96ac04bb.tar.gz koffice-7a7c17092fcdd4772fb6e499ef13429f96ac04bb.zip |
Switch from strstream to sstream.
Signed-off-by: Michele Calgaro <[email protected]>
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); } |