diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2017-04-02 11:32:18 +0200 |
---|---|---|
committer | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2017-04-02 11:32:18 +0200 |
commit | 2f9a1a499dd4909acb621cbc7976a59c031e2a56 (patch) | |
tree | f9dcbd25576f4652c4d30e705428a7c213ba3188 /sc/source/ui/unoobj/PivotChartDataProvider.cxx | |
parent | ef792a6e88d8d388a0cc9631b1fcb060026abbc7 (diff) |
fix crash when there are no row fields + testfeature/pivotcharts
Change-Id: I56852e953e32767fcf7d93f5cfcfd0fe7642443a
Diffstat (limited to 'sc/source/ui/unoobj/PivotChartDataProvider.cxx')
-rw-r--r-- | sc/source/ui/unoobj/PivotChartDataProvider.cxx | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/sc/source/ui/unoobj/PivotChartDataProvider.cxx b/sc/source/ui/unoobj/PivotChartDataProvider.cxx index 954453193387..7fe660c4a77d 100644 --- a/sc/source/ui/unoobj/PivotChartDataProvider.cxx +++ b/sc/source/ui/unoobj/PivotChartDataProvider.cxx @@ -564,10 +564,12 @@ uno::Reference<chart2::data::XDataSource> PivotChartDataProvider::createPivotCha { std::vector<PivotChartItem> aFirstCategories; - std::copy (m_aCategoriesColumnOrientation[0].begin(), - m_aCategoriesColumnOrientation[0].end(), - std::back_inserter(aFirstCategories)); - + if (!m_aCategoriesColumnOrientation.empty()) + { + std::copy(m_aCategoriesColumnOrientation[0].begin(), + m_aCategoriesColumnOrientation[0].end(), + std::back_inserter(aFirstCategories)); + } uno::Reference<chart2::data::XLabeledDataSequence> xResult = newLabeledDataSequence(); setLabeledDataSequenceValues(xResult, "categories", "Categories", aFirstCategories); aLabeledSequences.push_back(xResult); |