[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-5-2+backports' - xmloff/source
Michael Stahl (via logerrit)
logerrit at kemper.freedesktop.org
Fri Nov 22 13:39:18 UTC 2019
xmloff/source/table/XMLTableImport.cxx | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
New commits:
commit 82c038edb8ad3dc507de7044f5b71b06bd8886b9
Author: Michael Stahl <Michael.Stahl at cib.de>
AuthorDate: Thu Nov 21 18:00:00 2019 +0100
Commit: Michael Stahl <michael.stahl at cib.de>
CommitDate: Fri Nov 22 14:38:35 2019 +0100
tdf#106780 xmloff: import ODF 1.2 attribute table:name in addition to...
... the historic wrong attribute text:style-name in XMLTableTemplateContext.
3 lines cherry-picked out of commit 40fba0f4418084d50cc5c388cb0b6e1abe395d61
"GSoC Writer Table Styles Import".
Change-Id: I6228263ba2eb3a6d63809efcea673fe4f89dba38
Reviewed-on: https://gerrit.libreoffice.org/83425
Reviewed-by: Michael Stahl <michael.stahl at cib.de>
Tested-by: Michael Stahl <michael.stahl at cib.de>
diff --git a/xmloff/source/table/XMLTableImport.cxx b/xmloff/source/table/XMLTableImport.cxx
index d4b505d8bb9e..e49c4c31fc5c 100644
--- a/xmloff/source/table/XMLTableImport.cxx
+++ b/xmloff/source/table/XMLTableImport.cxx
@@ -692,7 +692,9 @@ void XMLTableTemplateContext::StartElement( const Reference< XAttributeList >& x
{
OUString sAttrName;
sal_uInt16 nAttrPrefix = GetImport().GetNamespaceMap().GetKeyByAttrName( xAttrList->getNameByIndex( i ), &sAttrName );
- if( (nAttrPrefix == XML_NAMESPACE_TEXT ) && IsXMLToken( sAttrName, XML_STYLE_NAME ) )
+ if( (nAttrPrefix == XML_NAMESPACE_TEXT && IsXMLToken( sAttrName, XML_STYLE_NAME ))
+ // Writer specific: according to oasis odf 1.2 prefix should be "table" and element name should be "name"
+ || (nAttrPrefix == XML_NAMESPACE_TABLE && IsXMLToken( sAttrName, XML_NAME )))
{
msTemplateStyleName = xAttrList->getValueByIndex( i );
break;
More information about the Libreoffice-commits
mailing list