[ooo-build-commit] Branch 'ooo/master' - 2 commits - chart2/source sc/source
Jan Holesovsky
kendy at kemper.freedesktop.org
Tue Sep 15 17:27:52 PDT 2009
chart2/source/tools/InternalDataProvider.cxx | 10 +--
chart2/source/view/main/VDataSeries.cxx | 82 ++++++++++++++++-----------
sc/source/core/tool/interpr1.cxx | 2
sc/source/ui/unoobj/chartuno.cxx | 11 ++-
4 files changed, 65 insertions(+), 40 deletions(-)
New commits:
commit 21a6601c046f274c7f75569aed8004ba21d25fac
Author: Kurt Zenker <kz at openoffice.org>
Date: Mon Sep 14 14:21:40 2009 +0000
#i10000# build break fixed
diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index 5069a06..531f089 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -5114,7 +5114,7 @@ void ScInterpreter::ScLookup()
if ( !rEntry.bQueryByString )
bFound = false;
else
- bFound = (ScGlobal::pCollator->compareString( aDataStr, *rEntry.pStr) <= 0);
+ bFound = (ScGlobal::GetCollator()->compareString( aDataStr, *rEntry.pStr) <= 0);
}
if (!bFound)
commit 785b06b3909cadb26d72c9ff24ebec79518e38b3
Author: Kurt Zenker <kz at openoffice.org>
Date: Mon Sep 14 10:57:16 2009 +0000
CWS-TOOLING: integrate CWS chart41
2009-09-07 11:17:59 +0200 iha r275880 : #i104854# ODF: Fallback to bar chart for surface charts as long as surface charts are not implemented
2009-09-03 10:07:24 +0200 iha r275745 : #i104020# Y axis scaling problem with stock chart
2009-09-02 17:11:42 +0200 iha r275723 : #i103984# XChartDataArray / setDataArray broken
2009-09-02 17:05:16 +0200 iha r275721 : #i103984# XChartDataArray / setDataArray broken
2009-08-31 18:18:21 +0200 iha r275629 : #i103076# ODF, chart from MS-Office2007sp2 doesn't load caused be different xlink:href syntax
2009-08-28 18:35:52 +0200 iha r275548 : #i103460# ODF charts without svg:width and svg:height are not imported correctly
2009-08-28 18:35:25 +0200 iha r275547 : #i103460# ODF charts without svg:width and svg:height are not imported correctly
2009-08-28 18:25:45 +0200 iha r275546 : #i103460# ODF charts without svg:width and svg:height are not imported correctly
2009-08-28 18:23:21 +0200 iha r275544 : #i103460# ODF charts without svg:width and svg:height are not imported correctly
2009-08-28 18:18:34 +0200 iha r275543 : #i103460# ODF charts without svg:width and svg:height are not imported correctly
2009-08-27 15:57:20 +0200 iha r275490 : #i104160# report designer broken
diff --git a/chart2/source/tools/InternalDataProvider.cxx b/chart2/source/tools/InternalDataProvider.cxx
index 1673908..db64dc8 100644
--- a/chart2/source/tools/InternalDataProvider.cxx
+++ b/chart2/source/tools/InternalDataProvider.cxx
@@ -393,8 +393,8 @@ void InternalData::swapAllDataAtIndexWithNext( sal_Int32 nAtIndex, bool bDataInC
bool InternalData::enlargeData( sal_Int32 nColumnCount, sal_Int32 nRowCount )
{
- sal_Int32 nNewColumnCount( ::std::max<sal_Int32>(1, ::std::max<sal_Int32>( m_nColumnCount, nColumnCount )));
- sal_Int32 nNewRowCount( ::std::max<sal_Int32>(1, ::std::max<sal_Int32>( m_nRowCount, nRowCount )));
+ sal_Int32 nNewColumnCount( ::std::max<sal_Int32>( m_nColumnCount, nColumnCount ) );
+ sal_Int32 nNewRowCount( ::std::max<sal_Int32>( m_nRowCount, nRowCount ) );
sal_Int32 nNewSize( nNewColumnCount*nNewRowCount );
bool bGrow = (nNewSize > m_nColumnCount*m_nRowCount);
@@ -412,9 +412,9 @@ bool InternalData::enlargeData( sal_Int32 nColumnCount, sal_Int32 nRowCount )
m_aData.resize( nNewSize );
m_aData = aNewData;
- m_nColumnCount = nNewColumnCount;
- m_nRowCount = nNewRowCount;
}
+ m_nColumnCount = nNewColumnCount;
+ m_nRowCount = nNewRowCount;
return bGrow;
}
@@ -739,6 +739,8 @@ Sequence< Reference< chart2::data::XLabeledDataSequence > >
{
::std::vector< OUString > aLabels( rInternalData.getColumnLabels());
OSL_ASSERT( static_cast< size_t >( nNewIndex ) < aLabels.size());
+ if( aLabels.size() <= static_cast< size_t >( nNewIndex ) )
+ aLabels.resize( nNewIndex+1 );
aLabels[nNewIndex] = impl::FlattenStringSequence( xLabel->getTextualData());
rInternalData.setColumnLabels( aLabels );
Reference< chart2::data::XDataSequence > xNewLabel(
diff --git a/chart2/source/view/main/VDataSeries.cxx b/chart2/source/view/main/VDataSeries.cxx
index 8f7f0a5..6acb037 100644
--- a/chart2/source/view/main/VDataSeries.cxx
+++ b/chart2/source/view/main/VDataSeries.cxx
@@ -620,24 +620,33 @@ sal_Int32 VDataSeries::getLabelPlacement( sal_Int32 nPointIndex, const uno::Refe
double VDataSeries::getMinimumofAllDifferentYValues( sal_Int32 index ) const
{
- double fY = getYValue( index );
- double fY_Min = getY_Min( index );
- double fY_Max = getY_Max( index );
- double fY_First = getY_First( index );
- double fY_Last = getY_Last( index );
-
double fMin=0.0;
::rtl::math::setInf(&fMin, false);
- if(fMin>fY)
- fMin=fY;
- if(fMin>fY_First)
- fMin=fY_First;
- if(fMin>fY_Last)
- fMin=fY_Last;
- if(fMin>fY_Min)
- fMin=fY_Min;
- if(fMin>fY_Max)
- fMin=fY_Max;
+
+ if( !m_aValues_Y.is() &&
+ (m_aValues_Y_Min.is() || m_aValues_Y_Max.is()
+ || m_aValues_Y_First.is() || m_aValues_Y_Last.is() ) )
+ {
+ double fY_Min = getY_Min( index );
+ double fY_Max = getY_Max( index );
+ double fY_First = getY_First( index );
+ double fY_Last = getY_Last( index );
+
+ if(fMin>fY_First)
+ fMin=fY_First;
+ if(fMin>fY_Last)
+ fMin=fY_Last;
+ if(fMin>fY_Min)
+ fMin=fY_Min;
+ if(fMin>fY_Max)
+ fMin=fY_Max;
+ }
+ else
+ {
+ double fY = getYValue( index );
+ if(fMin>fY)
+ fMin=fY;
+ }
if( ::rtl::math::isInf(fMin) )
::rtl::math::setNan(&fMin);
@@ -647,24 +656,33 @@ double VDataSeries::getMinimumofAllDifferentYValues( sal_Int32 index ) const
double VDataSeries::getMaximumofAllDifferentYValues( sal_Int32 index ) const
{
- double fY = getYValue( index );
- double fY_Min = getY_Min( index );
- double fY_Max = getY_Max( index );
- double fY_First = getY_First( index );
- double fY_Last = getY_Last( index );
-
double fMax=0.0;
::rtl::math::setInf(&fMax, true);
- if(fMax<fY)
- fMax=fY;
- if(fMax<fY_First)
- fMax=fY_First;
- if(fMax<fY_Last)
- fMax=fY_Last;
- if(fMax<fY_Min)
- fMax=fY_Min;
- if(fMax<fY_Max)
- fMax=fY_Max;
+
+ if( !m_aValues_Y.is() &&
+ (m_aValues_Y_Min.is() || m_aValues_Y_Max.is()
+ || m_aValues_Y_First.is() || m_aValues_Y_Last.is() ) )
+ {
+ double fY_Min = getY_Min( index );
+ double fY_Max = getY_Max( index );
+ double fY_First = getY_First( index );
+ double fY_Last = getY_Last( index );
+
+ if(fMax<fY_First)
+ fMax=fY_First;
+ if(fMax<fY_Last)
+ fMax=fY_Last;
+ if(fMax<fY_Min)
+ fMax=fY_Min;
+ if(fMax<fY_Max)
+ fMax=fY_Max;
+ }
+ else
+ {
+ double fY = getYValue( index );
+ if(fMax<fY)
+ fMax=fY;
+ }
if( ::rtl::math::isInf(fMax) )
::rtl::math::setNan(&fMax);
diff --git a/sc/source/ui/unoobj/chartuno.cxx b/sc/source/ui/unoobj/chartuno.cxx
index eb737d0..207c306 100644
--- a/sc/source/ui/unoobj/chartuno.cxx
+++ b/sc/source/ui/unoobj/chartuno.cxx
@@ -255,14 +255,19 @@ void SAL_CALL ScChartsObj::addNewByName( const rtl::OUString& aName,
xReceiver.set( xCompSupp->getComponent(), uno::UNO_QUERY );
if( xReceiver.is())
{
+ String sRangeStr;
+ xNewRanges->Format(sRangeStr, SCR_ABS_3D, pDoc);
+
// connect
- xReceiver->attachDataProvider( xDataProvider );
+ if( sRangeStr.Len() )
+ xReceiver->attachDataProvider( xDataProvider );
+ else
+ sRangeStr = String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM( "all" ) );
+
uno::Reference< util::XNumberFormatsSupplier > xNumberFormatsSupplier( pDocShell->GetModel(), uno::UNO_QUERY );
xReceiver->attachNumberFormatsSupplier( xNumberFormatsSupplier );
// set arguments
- String sRangeStr;
- xNewRanges->Format(sRangeStr, SCR_ABS_3D, pDoc);
uno::Sequence< beans::PropertyValue > aArgs( 4 );
aArgs[0] = beans::PropertyValue(
::rtl::OUString::createFromAscii("CellRangeRepresentation"), -1,
More information about the ooo-build-commit
mailing list