summaryrefslogtreecommitdiffstats
path: root/src/dom
diff options
context:
space:
mode:
authorKris De Gussem <kris.degussem@gmail.com>2013-02-13 19:02:23 +0000
committerKris <Kris.De.Gussem@hotmail.com>2013-02-13 19:02:23 +0000
commit47d871e0b2a9ed5fb58d4d02edf840a0d4b19783 (patch)
tree4267c803d47dcc1852b51e6f9b622535e1d2d9d0 /src/dom
parentBuild. Adding unistd header (fixes compilation on Win32 with OpenSuse cross-c... (diff)
downloadinkscape-47d871e0b2a9ed5fb58d4d02edf840a0d4b19783.tar.gz
inkscape-47d871e0b2a9ed5fb58d4d02edf840a0d4b19783.zip
fixing variable type in stream classes to what was intended (preparation for solving bug #1120585 )
(bzr r12123)
Diffstat (limited to 'src/dom')
-rw-r--r--src/dom/io/bufferstream.cpp2
-rw-r--r--src/dom/io/bufferstream.h2
-rw-r--r--src/dom/io/domstream.cpp11
-rw-r--r--src/dom/io/domstream.h14
-rw-r--r--src/dom/io/stringstream.cpp2
-rw-r--r--src/dom/io/stringstream.h2
-rw-r--r--src/dom/io/uristream.cpp7
-rw-r--r--src/dom/io/uristream.h4
8 files changed, 21 insertions, 23 deletions
diff --git a/src/dom/io/bufferstream.cpp b/src/dom/io/bufferstream.cpp
index 7baab4814..3389bd80e 100644
--- a/src/dom/io/bufferstream.cpp
+++ b/src/dom/io/bufferstream.cpp
@@ -146,7 +146,7 @@ void BufferOutputStream::flush()
/**
* Writes the specified byte to this output stream.
*/
-int BufferOutputStream::put(XMLCh ch)
+int BufferOutputStream::put(gunichar ch)
{
if (closed)
return -1;
diff --git a/src/dom/io/bufferstream.h b/src/dom/io/bufferstream.h
index 9a36b30e2..0ac06b362 100644
--- a/src/dom/io/bufferstream.h
+++ b/src/dom/io/bufferstream.h
@@ -102,7 +102,7 @@ public:
virtual void flush();
- virtual int put(XMLCh ch);
+ virtual int put(gunichar ch);
virtual std::vector<unsigned char> &getBuffer()
{ return buffer; }
diff --git a/src/dom/io/domstream.cpp b/src/dom/io/domstream.cpp
index de221f855..21d09662a 100644
--- a/src/dom/io/domstream.cpp
+++ b/src/dom/io/domstream.cpp
@@ -510,7 +510,7 @@ void BasicOutputStream::flush()
/**
* Writes the specified byte to this output stream.
*/
-int BasicOutputStream::put(XMLCh ch)
+int BasicOutputStream::put(gunichar ch)
{
if (closed)
return -1;
@@ -886,7 +886,7 @@ void BasicWriter::flush()
/**
* Writes the specified byte to this output writer.
*/
-int BasicWriter::put(XMLCh ch)
+int BasicWriter::put(gunichar ch)
{
if (destination && destination->put(ch)>=0)
return 1;
@@ -1079,7 +1079,7 @@ void OutputStreamWriter::flush()
* Overloaded to redirect the output chars from the next Writer
* in the chain to an OutputStream instead.
*/
-int OutputStreamWriter::put(XMLCh ch)
+int OutputStreamWriter::put(gunichar ch)
{
//Do we need conversions here?
int intCh = (int) ch;
@@ -1133,11 +1133,10 @@ void StdWriter::flush()
* Overloaded to redirect the output chars from the next Writer
* in the chain to an OutputStream instead.
*/
-int StdWriter::put(XMLCh ch)
+int StdWriter::put(gunichar ch)
{
//Do we need conversions here?
- int intCh = (int) ch;
- if (outputStream->put(intCh) < 0)
+ if (outputStream->put(ch) < 0)
return -1;
return 1;
}
diff --git a/src/dom/io/domstream.h b/src/dom/io/domstream.h
index 1a93e73b2..925e52bfe 100644
--- a/src/dom/io/domstream.h
+++ b/src/dom/io/domstream.h
@@ -218,7 +218,7 @@ public:
/**
* Send one byte to the destination stream.
*/
- virtual int put(XMLCh ch) = 0;
+ virtual int put(gunichar ch) = 0;
}; // class OutputStream
@@ -241,7 +241,7 @@ public:
virtual void flush();
- virtual int put(XMLCh ch);
+ virtual int put(gunichar ch);
protected:
@@ -267,7 +267,7 @@ public:
void flush()
{ }
- int put(XMLCh ch)
+ int put(gunichar ch)
{ putchar(ch); return 1; }
};
@@ -492,7 +492,7 @@ public:
virtual void flush() = 0;
- virtual int put(XMLCh ch) = 0;
+ virtual int put(gunichar ch) = 0;
/* Formatted output */
virtual Writer& printf(const DOMString &fmt, ...) = 0;
@@ -542,7 +542,7 @@ public:
virtual void flush();
- virtual int put(XMLCh ch);
+ virtual int put(gunichar ch);
@@ -635,7 +635,7 @@ public:
virtual void flush();
- virtual int put(XMLCh ch);
+ virtual int put(gunichar ch);
private:
@@ -663,7 +663,7 @@ public:
virtual void flush();
- virtual int put(XMLCh ch);
+ virtual int put(gunichar ch);
private:
diff --git a/src/dom/io/stringstream.cpp b/src/dom/io/stringstream.cpp
index c6e47045e..ca058a575 100644
--- a/src/dom/io/stringstream.cpp
+++ b/src/dom/io/stringstream.cpp
@@ -140,7 +140,7 @@ void StringOutputStream::flush()
/**
* Writes the specified byte to this output stream.
*/
-int StringOutputStream::put(XMLCh ch)
+int StringOutputStream::put(gunichar ch)
{
buffer.push_back(ch);
return 1;
diff --git a/src/dom/io/stringstream.h b/src/dom/io/stringstream.h
index f6ed89e65..9ba24fc26 100644
--- a/src/dom/io/stringstream.h
+++ b/src/dom/io/stringstream.h
@@ -100,7 +100,7 @@ public:
virtual void flush();
- virtual int put(XMLCh ch);
+ virtual int put(gunichar ch);
virtual DOMString &getString()
{ return buffer; }
diff --git a/src/dom/io/uristream.cpp b/src/dom/io/uristream.cpp
index 09b0ac361..68a14a166 100644
--- a/src/dom/io/uristream.cpp
+++ b/src/dom/io/uristream.cpp
@@ -372,7 +372,7 @@ void UriOutputStream::flush() throw(StreamException)
/**
* Writes the specified byte to this output stream.
*/
-int UriOutputStream::put(XMLCh ch) throw(StreamException)
+int UriOutputStream::put(gunichar ch) throw(StreamException)
{
if (closed)
return -1;
@@ -440,10 +440,9 @@ void UriWriter::flush() throw(StreamException)
/**
*
*/
-int UriWriter::put(XMLCh ch) throw(StreamException)
+int UriWriter::put(gunichar ch) throw(StreamException)
{
- int ich = (int)ch;
- if (outputStream->put(ich) < 0)
+ if (outputStream->put(ch) < 0)
return -1;
return 1;
}
diff --git a/src/dom/io/uristream.h b/src/dom/io/uristream.h
index 8d60468a5..2a659d030 100644
--- a/src/dom/io/uristream.h
+++ b/src/dom/io/uristream.h
@@ -143,7 +143,7 @@ public:
virtual void flush() throw(StreamException);
- virtual int put(XMLCh ch) throw(StreamException);
+ virtual int put(gunichar ch) throw(StreamException);
private:
@@ -181,7 +181,7 @@ public:
virtual void flush() throw(StreamException);
- virtual int put(XMLCh ch) throw(StreamException);
+ virtual int put(gunichar ch) throw(StreamException);
private: