chart2/source/tools/ExplicitCategoriesProvider.cxx | 22 ++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-)
New commits: commit 0231f801a0bf15e3ce59642d502756ec6828bb5e Author: Armin Le Grand <a...@apache.org> Date: Thu Jun 20 13:19:42 2013 +0000 i121277 Corrected label data generation diff --git a/chart2/source/tools/ExplicitCategoriesProvider.cxx b/chart2/source/tools/ExplicitCategoriesProvider.cxx index 7e84b66..08a4fd9 100755 --- a/chart2/source/tools/ExplicitCategoriesProvider.cxx +++ b/chart2/source/tools/ExplicitCategoriesProvider.cxx @@ -358,8 +358,11 @@ Sequence< OUString > lcl_getExplicitSimpleCategories( sal_Int32 nCurrentCount = lcl_getCategoryCount( *aOuterIt ); if( nCurrentCount< nMaxCategoryCount ) { - ComplexCategory& rComplexCategory = aOuterIt->back(); - rComplexCategory.Count += (nMaxCategoryCount-nCurrentCount); + if(!aOuterIt->empty()) // #121277# Caution, aOuterIt may be empty (!) + { + ComplexCategory& rComplexCategory = aOuterIt->back(); + rComplexCategory.Count += (nMaxCategoryCount-nCurrentCount); + } } } } @@ -391,12 +394,17 @@ Sequence< OUString > lcl_getExplicitSimpleCategories( OUString aText; for( aOuterIt=aComplexCatsPerIndex.begin() ; aOuterIt != aOuterEnd; ++aOuterIt ) { - OUString aAddText = (*aOuterIt)[nN].Text; - if( aAddText.getLength() ) + OUString aAddText; + + if(!aOuterIt->empty()) // #121277# Caution, aOuterIt may be empty (!) { - if(aText.getLength()) - aText += aSpace; - aText += aAddText; + aAddText = (*aOuterIt)[nN].Text; + if( aAddText.getLength() ) + { + if(aText.getLength()) + aText += aSpace; + aText += aAddText; + } } } aRet[nN]=aText; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits