DEADSOFTWARE

Update handling of multi-byte strings
authorGert van Valkenhoef <g.h.m.van.valkenhoef@rug.nl>
Wed, 9 Nov 2011 10:32:36 +0000 (10:32 +0000)
committerGert van Valkenhoef <g.h.m.van.valkenhoef@rug.nl>
Wed, 9 Nov 2011 10:32:36 +0000 (10:32 +0000)
odcread.cc
textmodel.cc
textmodel.h

index 24bb51ea68a0fa9e8706ac8a42aa11b94871c6fb..e790fdd36bcdc3b211d3c4d277cf9462ee6db3dd 100644 (file)
@@ -85,8 +85,9 @@ namespace odc {
                        d_context.top()->addPiece(text);
                }
                virtual void textLongPiece(const LongPiece *piece) {
-                       std::string text = piece->getText();
-                       d_context.top()->addPiece(text);
+                       throw "Long Piece not handled";
+                       //std::string text = piece->getText();
+                       //d_context.top()->addPiece(text);
                }
        };
 
index f9dbae242b007f39c8438e7dfae1708cae626a8c..56bedbae3aa34a82d08c8249a16796fcb71099b8 100644 (file)
@@ -182,8 +182,8 @@ std::string LongPiece::toString() const {
        return std::string("LongPiece(FIXME)");// + std::wstring((wchar_t*)d_buf) + std::string(")");
 }
 
-std::string LongPiece::getText() const {
-       return std::string("FIXME");// + std::wstring((wchar_t*)d_buf) + std::string(")");
+std::wstring LongPiece::getText() const {
+       return std::wstring((wchar_t*)d_buf);
 }
 
 void LongPiece::accept(Visitor &visitor) const {
index 92d387a61b5596595b4dd985c9f1c36692671755..07a8f646c56760606adf5607623a3a5260dd7d46 100644 (file)
@@ -37,7 +37,7 @@ namespace odc {
                ~LongPiece();
                virtual void read(Reader &reader);
                virtual std::string toString() const;
-               virtual std::string getText() const;
+               virtual std::wstring getText() const;
                virtual void accept(Visitor &visitor) const;
        };