You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by al...@apache.org on 2013/06/20 15:19:43 UTC

svn commit: r1494973 - /openoffice/trunk/main/chart2/source/tools/ExplicitCategoriesProvider.cxx

Author: alg
Date: Thu Jun 20 13:19:42 2013
New Revision: 1494973

URL: http://svn.apache.org/r1494973
Log:
i121277 Corrected label data generation

Modified:
    openoffice/trunk/main/chart2/source/tools/ExplicitCategoriesProvider.cxx

Modified: openoffice/trunk/main/chart2/source/tools/ExplicitCategoriesProvider.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/chart2/source/tools/ExplicitCategoriesProvider.cxx?rev=1494973&r1=1494972&r2=1494973&view=diff
==============================================================================
--- openoffice/trunk/main/chart2/source/tools/ExplicitCategoriesProvider.cxx (original)
+++ openoffice/trunk/main/chart2/source/tools/ExplicitCategoriesProvider.cxx Thu Jun 20 13:19:42 2013
@@ -358,8 +358,11 @@ Sequence< OUString > lcl_getExplicitSimp
             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_getExplicitSimp
             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;