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