summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Benisch <tbe@openoffice.org>2010-04-14 18:54:36 +0200
committerThomas Benisch <tbe@openoffice.org>2010-04-14 18:54:36 +0200
commit862738d2a8214b0bf2de060a2093faaf3055db2f (patch)
tree3345026eefdec54c0245276d5775bcc3cf0363a0
parent2bac439e653e5fb4e983e2363b966a714de8644b (diff)
parente9ec6f67bf4aa0d7474e54b5f55ca71671356a48 (diff)
chart45: #i110805# Chartshapes: Toolbarbuttons can't be opened
-rw-r--r--xmloff/source/chart/SchXMLExport.cxx7
-rw-r--r--xmloff/source/chart/SchXMLTableContext.cxx12
2 files changed, 17 insertions, 2 deletions
diff --git a/xmloff/source/chart/SchXMLExport.cxx b/xmloff/source/chart/SchXMLExport.cxx
index cb75268ad309..8154d284f628 100644
--- a/xmloff/source/chart/SchXMLExport.cxx
+++ b/xmloff/source/chart/SchXMLExport.cxx
@@ -649,7 +649,12 @@ lcl_TableData lcl_getDataForLocalTable(
SchXMLExportHelper::tDataSequenceCont::const_iterator aIt( aBegin );
size_t nMaxSequenceLength( lcl_getMaxSequenceLength( aSequencesToExport ));
- nMaxSequenceLength = std::max( nMaxSequenceLength, size_t( aSimpleCategories.getLength() ) );
+ size_t nCategoriesLength( aSimpleCategories.getLength() );
+ if( nCategoriesLength > nMaxSequenceLength )
+ {
+ aSimpleCategories.realloc(nMaxSequenceLength);//#i110617#
+ nCategoriesLength = nMaxSequenceLength;
+ }
size_t nNumColumns( bSeriesFromColumns ? nNumSequences : nMaxSequenceLength );
size_t nNumRows( bSeriesFromColumns ? nMaxSequenceLength : nNumSequences );
diff --git a/xmloff/source/chart/SchXMLTableContext.cxx b/xmloff/source/chart/SchXMLTableContext.cxx
index 6ba9a49e4502..d82970858ebe 100644
--- a/xmloff/source/chart/SchXMLTableContext.cxx
+++ b/xmloff/source/chart/SchXMLTableContext.cxx
@@ -161,6 +161,11 @@ struct lcl_ApplyCellToData : public ::std::unary_function< SchXMLCell, void >
++m_nIndex;
}
+ sal_Int32 getCurrentIndex() const
+ {
+ return m_nIndex;
+ }
+
private:
Sequence< double > & m_rData;
sal_Int32 m_nIndex;
@@ -865,7 +870,12 @@ void SchXMLTableHelper::applyTableToInternalDataProvider(
lcl_ApplyCellToComplexLabel( rRow.front(), aComplexRowDescriptions[nRow] );
// values
- ::std::for_each( rRow.begin() + nColOffset, rRow.end(), lcl_ApplyCellToData( aDataInRows[nRow] ));
+ Sequence< double >& rTargetRow = aDataInRows[nRow];
+ lcl_ApplyCellToData aApplyCellToData = ::std::for_each( rRow.begin() + nColOffset, rRow.end(), lcl_ApplyCellToData( rTargetRow ) );
+ double fNaN = 0.0;
+ ::rtl::math::setNan( &fNaN );
+ for( sal_Int32 nCurrentIndex = aApplyCellToData.getCurrentIndex(); nCurrentIndex<nNumColumns; nCurrentIndex++ )
+ rTargetRow[nCurrentIndex] = fNaN;//#i110615#
}
}
}