[Libreoffice-commits] .: xmloff/source
Thorsten Behrens
thorsten at kemper.freedesktop.org
Fri Oct 28 06:59:09 PDT 2011
xmloff/source/table/XMLTableExport.cxx | 2 +-
xmloff/source/table/XMLTableImport.cxx | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
New commits:
commit f7d9e0526ce69e2fa9801a04137737046784cbe2
Author: Thorsten Behrens <tbehrens at suse.com>
Date: Fri Oct 28 15:54:22 2011 +0200
ODF conformance - Impress table markup fixes
Fix for fdo#35190 - Impress writes invalid ODF for the table
styles (text:style-name instead of table:style-name).
diff --git a/xmloff/source/table/XMLTableExport.cxx b/xmloff/source/table/XMLTableExport.cxx
index a637fd2..6405528 100644
--- a/xmloff/source/table/XMLTableExport.cxx
+++ b/xmloff/source/table/XMLTableExport.cxx
@@ -564,7 +564,7 @@ void XMLTableExport::exportTableTemplates()
Reference< XStyle > xStyle( xStyleNames->getByName( pElements->msStyleName ), UNO_QUERY );
if( xStyle.is() )
{
- mrExport.AddAttribute(XML_NAMESPACE_TEXT, XML_STYLE_NAME, GetExport().EncodeStyleName( xStyle->getName() ) );
+ mrExport.AddAttribute(XML_NAMESPACE_TABLE, XML_STYLE_NAME, GetExport().EncodeStyleName( xStyle->getName() ) );
SvXMLElementExport element( mrExport, XML_NAMESPACE_TABLE, pElements->meElement, sal_True, sal_True );
}
}
diff --git a/xmloff/source/table/XMLTableImport.cxx b/xmloff/source/table/XMLTableImport.cxx
index 26cd862..ff17e07 100644
--- a/xmloff/source/table/XMLTableImport.cxx
+++ b/xmloff/source/table/XMLTableImport.cxx
@@ -812,7 +812,8 @@ SvXMLImportContext * XMLTableTemplateContext::CreateChildContext( sal_uInt16 nPr
{
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 || nAttrPrefix == XML_NAMESPACE_TABLE) &&
+ IsXMLToken( sAttrName, XML_STYLE_NAME ) )
{
maTableTemplate[pElements->msStyleName] = xAttrList->getValueByIndex( i );
break;
More information about the Libreoffice-commits
mailing list