[Libreoffice-commits] .: 3 commits - chart2/source sc/source

Markus Mohrhard mmohrhard at kemper.freedesktop.org
Mon Feb 20 18:13:54 PST 2012


 chart2/source/tools/ExplicitCategoriesProvider.cxx |   10 +++++-----
 sc/source/ui/unoobj/chart2uno.cxx                  |    2 +-
 2 files changed, 6 insertions(+), 6 deletions(-)

New commits:
commit e4f14d089d81459ac2bf3c40e75e6cfd348b58c5
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Tue Feb 21 03:06:27 2012 +0100

    don't add empty categories, fdo#46332

diff --git a/sc/source/ui/unoobj/chart2uno.cxx b/sc/source/ui/unoobj/chart2uno.cxx
index 0317f94..7e42f8d 100644
--- a/sc/source/ui/unoobj/chart2uno.cxx
+++ b/sc/source/ui/unoobj/chart2uno.cxx
@@ -1560,7 +1560,7 @@ ScChart2DataProvider::createDataSource(
         }
         Reference< chart2::data::XLabeledDataSequence > xChartSeries = lcl_createLabeledDataSequenceFromTokens(
             pValueTokens, pLabelTokens, m_pDocument, this, m_bIncludeHiddenCells ); //ownership of pointers is transfered!
-        if ( xChartSeries.is() )
+        if ( xChartSeries.is() && xChartSeries->getValues()->getData().getLength() )
         {
             aSeqs.push_back( xChartSeries );
         }
commit fc8a69bd337a8523eebe5f47a4fe49519cfc3fbc
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Tue Feb 21 02:44:50 2012 +0100

    fix typo

diff --git a/chart2/source/tools/ExplicitCategoriesProvider.cxx b/chart2/source/tools/ExplicitCategoriesProvider.cxx
index b174912..73f5801 100644
--- a/chart2/source/tools/ExplicitCategoriesProvider.cxx
+++ b/chart2/source/tools/ExplicitCategoriesProvider.cxx
@@ -86,19 +86,19 @@ ExplicitCategoriesProvider::ExplicitCategoriesProvider( const Reference< chart2:
             {
                 uno::Reference< data::XDataProvider > xDataProvider( xChartDoc->getDataProvider() );
 
-                OUString aCatgoriesRange( DataSourceHelper::getRangeFromValues( m_xOriginalCategories ) );
-                if( xDataProvider.is() && !aCatgoriesRange.isEmpty() )
+                OUString aCategoriesRange( DataSourceHelper::getRangeFromValues( m_xOriginalCategories ) );
+                if( xDataProvider.is() && !aCategoriesRange.isEmpty() )
                 {
                     const bool bFirstCellAsLabel = false;
                     const bool bHasCategories = false;
                     const uno::Sequence< sal_Int32 > aSequenceMapping;
 
                     uno::Reference< data::XDataSource > xColumnCategoriesSource( xDataProvider->createDataSource(
-                         DataSourceHelper::createArguments( aCatgoriesRange, aSequenceMapping, true /*bUseColumns*/
+                         DataSourceHelper::createArguments( aCategoriesRange, aSequenceMapping, true /*bUseColumns*/
                             , bFirstCellAsLabel, bHasCategories ) ) );
 
                     uno::Reference< data::XDataSource > xRowCategoriesSource( xDataProvider->createDataSource(
-                         DataSourceHelper::createArguments( aCatgoriesRange, aSequenceMapping, false /*bUseColumns*/
+                         DataSourceHelper::createArguments( aCategoriesRange, aSequenceMapping, false /*bUseColumns*/
                             , bFirstCellAsLabel, bHasCategories ) ) );
 
                     if( xColumnCategoriesSource.is() &&  xRowCategoriesSource.is() )
commit b57137d1ca3902e4c191fa0e3a872ffff19380a0
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Mon Feb 20 16:05:42 2012 +0100

    use const_iterator for begin and end

diff --git a/chart2/source/tools/ExplicitCategoriesProvider.cxx b/chart2/source/tools/ExplicitCategoriesProvider.cxx
index 80f2808..b174912 100644
--- a/chart2/source/tools/ExplicitCategoriesProvider.cxx
+++ b/chart2/source/tools/ExplicitCategoriesProvider.cxx
@@ -321,7 +321,7 @@ std::vector< ComplexCategory > lcl_DataSequenceToComplexCategoryVector(
 sal_Int32 lcl_getCategoryCount( std::vector< ComplexCategory >& rComplexCategories )
 {
     sal_Int32 nCount = 0;
-    std::vector< ComplexCategory >::iterator aIt( rComplexCategories.begin() );
+    std::vector< ComplexCategory >::const_iterator aIt( rComplexCategories.begin() );
     std::vector< ComplexCategory >::const_iterator aEnd( rComplexCategories.end() );
     for( ; aIt != aEnd; ++aIt )
         nCount+=aIt->Count;


More information about the Libreoffice-commits mailing list