diff options
author | Christian Lippka <christian.lippka@sun.com> | 2010-02-24 13:11:19 +0100 |
---|---|---|
committer | Christian Lippka <christian.lippka@sun.com> | 2010-02-24 13:11:19 +0100 |
commit | 3dbbaa9d0eb6259a346f485e52086459f895215e (patch) | |
tree | 13733e0a23b1ab17ee7b704848616394e0331a4a | |
parent | 24be43ab5287828705356e22421cc7fc47fa30a4 (diff) |
fixed storing issue with presentation tables
-rw-r--r-- | xmloff/source/draw/shapeexport.cxx | 1 | ||||
-rw-r--r-- | xmloff/source/table/XMLTableExport.cxx | 10 |
2 files changed, 7 insertions, 4 deletions
diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx index 49d6a87831f0..3db1e336410f 100644 --- a/xmloff/source/draw/shapeexport.cxx +++ b/xmloff/source/draw/shapeexport.cxx @@ -470,6 +470,7 @@ void XMLShapeExport::collectShapeAutoStyles(const uno::Reference< drawing::XShap mrExport.getInterfaceToIdentifierMapper().registerReference( xConnection ); break; } + case XmlShapeTypePresTableShape: case XmlShapeTypeDrawTableShape: { try 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 ); |