diff options
Diffstat (limited to 'sax')
-rw-r--r-- | sax/source/tools/fastserializer.hxx | 6 | ||||
-rw-r--r-- | sax/source/tools/fshelper.cxx | 4 |
2 files changed, 8 insertions, 2 deletions
diff --git a/sax/source/tools/fastserializer.hxx b/sax/source/tools/fastserializer.hxx index 109ada3c726f..c849e201872b 100644 --- a/sax/source/tools/fastserializer.hxx +++ b/sax/source/tools/fastserializer.hxx @@ -116,6 +116,9 @@ public: void write( const OString& s, bool bEscape = false ); void write( const char* pStr, sal_Int32 nLen, bool bEscape = false ); + // strings with _xHHHH_ are escaped with _x005F unless this is disabled + void setAllowXEscape(bool bSet) { mbXescape = bSet; } + public: /** From now on, don't write directly to the stream, but to top of a stack. @@ -230,8 +233,7 @@ private: sal_Int32 mnDoubleStrCapacity; TokenValueList maTokenValues; bool mbXescape; ///< whether to escape invalid XML characters as _xHHHH_ in write(const char*,sal_Int32,true) - /* TODO: make that configurable from the outside for - * some specific cases? */ + #ifdef DBG_UTIL std::stack<sal_Int32> m_DebugStartedElements; diff --git a/sax/source/tools/fshelper.cxx b/sax/source/tools/fshelper.cxx index fbf7f0672709..f5945d67a9c0 100644 --- a/sax/source/tools/fshelper.cxx +++ b/sax/source/tools/fshelper.cxx @@ -164,6 +164,10 @@ rtl::Reference<FastAttributeList> FastSerializerHelper::createAttrList() return new FastAttributeList( nullptr ); } +void FastSerializerHelper::setAllowXEscape(bool bSet) +{ + mpSerializer->setAllowXEscape(bSet); +} } |