summaryrefslogtreecommitdiff
path: root/sax
diff options
context:
space:
mode:
authorJustin Luth <justin.luth@collabora.com>2023-01-12 11:18:55 -0500
committerJustin Luth <jluth@mail.com>2023-01-15 02:09:06 +0000
commitd50eca2a30bdabdc1735c590d6ec1913c6dd22fd (patch)
treef8d8a738c60fa0c69954a9fbf684a2e7640d8740 /sax
parent37e3455a13ab5741104bf41d05a80e60a4612682 (diff)
tdf#117266 sc oox: export vml button with a correct name
Without a correctly formatted ID, LO was unable to import the shape into the spreadsheet. Now at least the button shows up and can be pressed. MS Word already showed the button before the patch, so nothing there has changed. That suggests that our problem may be more during import. This code path is also followed by DOC and DOCX formats, but they do completely different things with the results. This is super nasty code... Change-Id: I383736a7de9c3e94b427d5747e5949c0348dcecd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145509 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com>
Diffstat (limited to 'sax')
-rw-r--r--sax/source/tools/fastserializer.hxx6
-rw-r--r--sax/source/tools/fshelper.cxx4
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);
+}
}