summaryrefslogtreecommitdiff
path: root/xmloff/source/table/XMLTableExport.cxx
diff options
context:
space:
mode:
authorChristian Lippka <christian.lippka@sun.com>2010-02-24 13:11:19 +0100
committerChristian Lippka <christian.lippka@sun.com>2010-02-24 13:11:19 +0100
commit3dbbaa9d0eb6259a346f485e52086459f895215e (patch)
tree13733e0a23b1ab17ee7b704848616394e0331a4a /xmloff/source/table/XMLTableExport.cxx
parent24be43ab5287828705356e22421cc7fc47fa30a4 (diff)
fixed storing issue with presentation tables
Diffstat (limited to 'xmloff/source/table/XMLTableExport.cxx')
-rw-r--r--xmloff/source/table/XMLTableExport.cxx10
1 files changed, 6 insertions, 4 deletions
diff --git a/xmloff/source/table/XMLTableExport.cxx b/xmloff/source/table/XMLTableExport.cxx
index de930d6dd288..29e9c6c257dc 100644
--- a/xmloff/source/table/XMLTableExport.cxx
+++ b/xmloff/source/table/XMLTableExport.cxx
@@ -356,6 +356,8 @@ static bool has_states( const std::vector< XMLPropertyState >& xPropStates )
// get the current row
Reference< XCellRange > xCellRange( xIndexAccess->getByIndex(rowIndex), UNO_QUERY_THROW );
+ OUString sDefaultCellStyle;
+
// table:style-name
if( pTableInfo.get() )
{
@@ -363,11 +365,11 @@ static bool has_states( const std::vector< XMLPropertyState >& xPropStates )
const OUString sStyleName( pTableInfo->maRowStyleMap[xKey] );
if( sStyleName.getLength() )
mrExport.AddAttribute(XML_NAMESPACE_TABLE, XML_STYLE_NAME, sStyleName );
- }
- const OUString sDefaultCellStyle( pTableInfo->maDefaultRowCellStyles[rowIndex] );
- if( sDefaultCellStyle.getLength() )
- mrExport.AddAttribute(XML_NAMESPACE_TABLE, XML_DEFAULT_CELL_STYLE_NAME, sDefaultCellStyle );
+ sDefaultCellStyle = pTableInfo->maDefaultRowCellStyles[rowIndex];
+ if( sDefaultCellStyle.getLength() )
+ mrExport.AddAttribute(XML_NAMESPACE_TABLE, XML_DEFAULT_CELL_STYLE_NAME, sDefaultCellStyle );
+ }
// write row element
SvXMLElementExport tableRowElement( mrExport, XML_NAMESPACE_TABLE, XML_TABLE_ROW, sal_True, sal_True );