diff options
author | Michael Stahl <mstahl@redhat.com> | 2018-03-01 14:39:56 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2018-03-01 20:58:09 +0100 |
commit | 700ed27678d688b1afdb4d1759dcd4b078898a3a (patch) | |
tree | 4e0d01c203c07eccb3908b03948055c2b3c5bd66 /include/sax | |
parent | 3efd6b5b83364270d2982a0e99bee10f935a793b (diff) |
tdf#115429 xmloff: ODF import: fix handling of unknown attributes
... in SvXMLLegacyToFastDocHandler::startElement(), so that it does not
create invalid "-1" tokens that end up stored as empty-string
attribute names in SvXMLAttrCollection and ultimately exported
as invalid XML.
The maName in struct UnknownAttribute actually stores a QName,
i.e. namespace-prefixed, since commit
bb59a80ee6000d3922fa95262f67e291fd9d8ee2.
The attributes are read and converted again in
SvXMLImportContext::startUnknownElement().
Change-Id: Ia69a4da293f1a84ce30766abc09ca19e2620edbd
Reviewed-on: https://gerrit.libreoffice.org/50580
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'include/sax')
-rw-r--r-- | include/sax/fastattribs.hxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/sax/fastattribs.hxx b/include/sax/fastattribs.hxx index 1f343a7235b9..b5fbe225ee28 100644 --- a/include/sax/fastattribs.hxx +++ b/include/sax/fastattribs.hxx @@ -82,7 +82,8 @@ public: void add( sal_Int32 nToken, const sal_Char* pValue, size_t nValueLength ); void add( sal_Int32 nToken, const OString& rValue ); void addNS( sal_Int32 nNamespaceToken, sal_Int32 nToken, const OString& rValue ); - void addUnknown( const OUString& rNamespaceURL, const OString& rName, const OString& value ); + // note: rQName is *namespace-prefixed* + void addUnknown( const OUString& rNamespaceURL, const OString& rQName, const OString& value ); void addUnknown( const OString& rName, const OString& value ); const std::vector< sal_Int32 >& getFastAttributeTokens() const { return maAttributeTokens; } const char* getFastAttributeValue(size_t nIndex) const { return mpChunk + maAttributeValues[nIndex]; } |