diff options
| author | Jabier Arraiza Cenoz <jabier.arraiza@marker.es> | 2013-02-15 17:41:43 +0000 |
|---|---|---|
| committer | Jabiertxo Arraiza Zenotz <jtx@jtx.marker.es> | 2013-02-15 17:41:43 +0000 |
| commit | f986ce1bf97a05515103c828a42ff9a77a244c02 (patch) | |
| tree | d65419c34b2c3b97230d282d508384565e477109 /src/io | |
| parent | Removed unused function (diff) | |
| parent | Bug #561503: fix typo in earlier fix (r11133) (diff) | |
| download | inkscape-f986ce1bf97a05515103c828a42ff9a77a244c02.tar.gz inkscape-f986ce1bf97a05515103c828a42ff9a77a244c02.zip | |
Merge to trunk
(bzr r11950.2.3)
Diffstat (limited to 'src/io')
| -rw-r--r-- | src/io/base64stream.cpp | 2 | ||||
| -rw-r--r-- | src/io/base64stream.h | 2 | ||||
| -rw-r--r-- | src/io/gzipstream.cpp | 2 | ||||
| -rw-r--r-- | src/io/gzipstream.h | 2 | ||||
| -rw-r--r-- | src/io/inkscapestream.cpp | 10 | ||||
| -rw-r--r-- | src/io/inkscapestream.h | 6 | ||||
| -rw-r--r-- | src/io/stringstream.cpp | 5 | ||||
| -rw-r--r-- | src/io/stringstream.h | 2 | ||||
| -rw-r--r-- | src/io/uristream.cpp | 15 | ||||
| -rw-r--r-- | src/io/uristream.h | 2 | ||||
| -rw-r--r-- | src/io/xsltstream.cpp | 5 | ||||
| -rw-r--r-- | src/io/xsltstream.h | 2 |
12 files changed, 22 insertions, 33 deletions
diff --git a/src/io/base64stream.cpp b/src/io/base64stream.cpp index 667487c35..42a6ba1e4 100644 --- a/src/io/base64stream.cpp +++ b/src/io/base64stream.cpp @@ -290,7 +290,7 @@ void Base64OutputStream::putCh(int ch) /** * Writes the specified byte to this output stream. */ -void Base64OutputStream::put(int ch) +void Base64OutputStream::put(gunichar ch) { if (closed) { diff --git a/src/io/base64stream.h b/src/io/base64stream.h index 554a92fe2..836939130 100644 --- a/src/io/base64stream.h +++ b/src/io/base64stream.h @@ -88,7 +88,7 @@ public: virtual void flush(); - virtual void put(int ch); + virtual void put(gunichar ch); /** * Sets the maximum line length for base64 output. If diff --git a/src/io/gzipstream.cpp b/src/io/gzipstream.cpp index f9e30de91..071179b48 100644 --- a/src/io/gzipstream.cpp +++ b/src/io/gzipstream.cpp @@ -433,7 +433,7 @@ void GzipOutputStream::flush() /** * Writes the specified byte to this output stream. */ -void GzipOutputStream::put(int ch) +void GzipOutputStream::put(gunichar ch) { if (closed) { diff --git a/src/io/gzipstream.h b/src/io/gzipstream.h index 89c5f64f3..5af57b4c5 100644 --- a/src/io/gzipstream.h +++ b/src/io/gzipstream.h @@ -98,7 +98,7 @@ public: virtual void flush(); - virtual void put(int ch); + virtual void put(gunichar ch); private: diff --git a/src/io/inkscapestream.cpp b/src/io/inkscapestream.cpp index 65f24cf59..3270127d6 100644 --- a/src/io/inkscapestream.cpp +++ b/src/io/inkscapestream.cpp @@ -125,7 +125,7 @@ void BasicOutputStream::flush() /** * Writes the specified byte to this output stream. */ -void BasicOutputStream::put(int ch) +void BasicOutputStream::put(gunichar ch) { if (closed) return; @@ -775,9 +775,7 @@ void OutputStreamWriter::flush() */ void OutputStreamWriter::put(gunichar ch) { - //Do we need conversions here? - int intCh = (int) ch; - outputStream.put(intCh); + outputStream.put(ch); } //######################################################################### @@ -827,9 +825,7 @@ void StdWriter::flush() */ void StdWriter::put(gunichar ch) { - //Do we need conversions here? - int intCh = (int) ch; - outputStream->put(intCh); + outputStream->put(ch); } diff --git a/src/io/inkscapestream.h b/src/io/inkscapestream.h index 37c41552f..a9854ae6d 100644 --- a/src/io/inkscapestream.h +++ b/src/io/inkscapestream.h @@ -189,7 +189,7 @@ public: /** * Send one byte to the destination stream. */ - virtual void put(int ch) = 0; + virtual void put(gunichar ch) = 0; }; // class OutputStream @@ -212,7 +212,7 @@ public: virtual void flush(); - virtual void put(int ch); + virtual void put(gunichar ch); protected: @@ -238,7 +238,7 @@ public: void flush() { } - void put(int ch) + void put(gunichar ch) { putchar(ch); } }; diff --git a/src/io/stringstream.cpp b/src/io/stringstream.cpp index 44d11dd04..f204a99d5 100644 --- a/src/io/stringstream.cpp +++ b/src/io/stringstream.cpp @@ -112,10 +112,9 @@ void StringOutputStream::flush() /** * Writes the specified byte to this output stream. */ -void StringOutputStream::put(int ch) +void StringOutputStream::put(gunichar ch) { - gunichar uch = (gunichar)ch; - buffer.push_back(uch); + buffer.push_back(ch); } diff --git a/src/io/stringstream.h b/src/io/stringstream.h index 4a05d88a9..a78935599 100644 --- a/src/io/stringstream.h +++ b/src/io/stringstream.h @@ -67,7 +67,7 @@ public: virtual void flush(); - virtual void put(int ch); + virtual void put(gunichar ch); virtual Glib::ustring &getString() { return buffer; } diff --git a/src/io/uristream.cpp b/src/io/uristream.cpp index 19994bc82..8d7fd9b38 100644 --- a/src/io/uristream.cpp +++ b/src/io/uristream.cpp @@ -402,16 +402,14 @@ void UriOutputStream::flush() throw(StreamException) /** * Writes the specified byte to this output stream. */ -void UriOutputStream::put(int ch) throw(StreamException) +void UriOutputStream::put(gunichar ch) throw(StreamException) { if (closed) return; unsigned char uch; - gunichar gch; switch (scheme) { - case SCHEME_FILE: if (!outf) return; @@ -420,13 +418,11 @@ void UriOutputStream::put(int ch) throw(StreamException) Glib::ustring err = "ERROR writing to file "; throw StreamException(err); } - //fwrite(uch, 1, 1, outf); - break; + break; case SCHEME_DATA: - gch = (gunichar) ch; - data.push_back(gch); - break; + data.push_back(ch); + break; }//switch @@ -474,8 +470,7 @@ void UriWriter::flush() throw(StreamException) */ void UriWriter::put(gunichar ch) throw(StreamException) { - int ich = (int)ch; - outputStream->put(ich); + outputStream->put(ch); } diff --git a/src/io/uristream.h b/src/io/uristream.h index 16b1b0894..e519335e8 100644 --- a/src/io/uristream.h +++ b/src/io/uristream.h @@ -115,7 +115,7 @@ public: virtual void flush() throw(StreamException); - virtual void put(int ch) throw(StreamException); + virtual void put(gunichar ch) throw(StreamException); private: diff --git a/src/io/xsltstream.cpp b/src/io/xsltstream.cpp index 6b72627d3..1c260c0b3 100644 --- a/src/io/xsltstream.cpp +++ b/src/io/xsltstream.cpp @@ -230,10 +230,9 @@ void XsltOutputStream::flush() throw (StreamException) /** * Writes the specified byte to this output stream. */ -void XsltOutputStream::put(int ch) throw (StreamException) +void XsltOutputStream::put(gunichar ch) throw (StreamException) { - gunichar uch = (gunichar) ch; - outbuf.push_back(uch); + outbuf.push_back(ch); } diff --git a/src/io/xsltstream.h b/src/io/xsltstream.h index cfe9e5124..9b8e19215 100644 --- a/src/io/xsltstream.h +++ b/src/io/xsltstream.h @@ -120,7 +120,7 @@ public: virtual void flush() throw (StreamException); - virtual void put(int ch) throw (StreamException); + virtual void put(gunichar ch) throw (StreamException); private: |
