Index: include/xml/SkXMLWriter.h |
diff --git a/include/xml/SkXMLWriter.h b/include/xml/SkXMLWriter.h |
index b33ccd75d7065381672101fa5ce3ae1e62805588..6e3c7de79dc50c3697d45b6715a5247637590c2d 100644 |
--- a/include/xml/SkXMLWriter.h |
+++ b/include/xml/SkXMLWriter.h |
@@ -1,4 +1,3 @@ |
- |
/* |
* Copyright 2006 The Android Open Source Project |
* |
@@ -6,7 +5,6 @@ |
* found in the LICENSE file. |
*/ |
- |
#ifndef SkXMLWriter_DEFINED |
#define SkXMLWriter_DEFINED |
@@ -27,7 +25,7 @@ public: |
void addAttributeLen(const char name[], const char value[], size_t length); |
void addHexAttribute(const char name[], uint32_t value, int minDigits = 0); |
void addScalarAttribute(const char name[], SkScalar value); |
- void addText(const char text[]); |
+ void addText(const char text[], size_t length); |
void endElement() { this->onEndElement(); } |
void startElement(const char elem[]); |
void startElementLen(const char elem[], size_t length); |
@@ -38,7 +36,7 @@ public: |
protected: |
virtual void onStartElementLen(const char elem[], size_t length) = 0; |
virtual void onAddAttributeLen(const char name[], const char value[], size_t length) = 0; |
- virtual void onAddText(const char text[]) = 0; |
+ virtual void onAddText(const char text[], size_t length) = 0; |
virtual void onEndElement() = 0; |
struct Elem { |
@@ -69,11 +67,12 @@ public: |
virtual ~SkXMLStreamWriter(); |
virtual void writeHeader(); |
SkDEBUGCODE(static void UnitTest();) |
+ |
protected: |
- virtual void onStartElementLen(const char elem[], size_t length); |
- virtual void onEndElement(); |
- virtual void onAddAttributeLen(const char name[], const char value[], size_t length); |
- virtual void onAddText(const char text[]) SK_OVERRIDE; |
+ void onStartElementLen(const char elem[], size_t length) SK_OVERRIDE; |
+ void onEndElement() SK_OVERRIDE; |
+ void onAddAttributeLen(const char name[], const char value[], size_t length) SK_OVERRIDE; |
+ void onAddText(const char text[], size_t length) SK_OVERRIDE; |
private: |
SkWStream& fStream; |
@@ -87,7 +86,7 @@ protected: |
virtual void onStartElementLen(const char elem[], size_t length); |
virtual void onEndElement(); |
virtual void onAddAttributeLen(const char name[], const char value[], size_t length); |
- virtual void onAddText(const char text[]) SK_OVERRIDE; |
+ virtual void onAddText(const char text[], size_t length) SK_OVERRIDE; |
private: |
SkXMLParser& fParser; |
}; |