chart2/AllLangResTarget_chartcontroller.mk | 1 chart2/Library_chartcontroller.mk | 1 chart2/source/controller/dialogs/dlg_InsertTrendline.cxx | 106 ------------ chart2/source/controller/dialogs/dlg_InsertTrendline.hrc | 25 -- chart2/source/controller/dialogs/dlg_InsertTrendline.src | 40 ---- chart2/source/controller/dialogs/res_Trendline.cxx | 1 chart2/source/controller/inc/dlg_InsertTrendline.hxx | 62 ------- chart2/source/controller/main/ChartController_Insert.cxx | 48 ----- chart2/source/controller/main/ControllerCommandDispatch.cxx | 10 - chart2/source/tools/PolynomialRegressionCurveCalculator.cxx | 20 +- 10 files changed, 22 insertions(+), 292 deletions(-)
New commits: commit afd74d41e7c8c0014a3b67940f855dc469b306c5 Author: Tomaž Vajngerl <qui...@gmail.com> Date: Mon Jul 1 22:32:35 2013 +0200 Remove InsertTrendlineDialog as it is not used anymore. Change-Id: I58dbdc416254e631f33784bb2a2cf124e69fc69a diff --git a/chart2/AllLangResTarget_chartcontroller.mk b/chart2/AllLangResTarget_chartcontroller.mk index 0da17b2..006266a 100644 --- a/chart2/AllLangResTarget_chartcontroller.mk +++ b/chart2/AllLangResTarget_chartcontroller.mk @@ -37,7 +37,6 @@ $(eval $(call gb_SrsTarget_add_files,chart2/res,\ chart2/source/controller/dialogs/dlg_InsertErrorBars.src \ chart2/source/controller/dialogs/dlg_InsertLegend.src \ chart2/source/controller/dialogs/dlg_InsertTitle.src \ - chart2/source/controller/dialogs/dlg_InsertTrendline.src \ chart2/source/controller/dialogs/dlg_ObjectProperties.src \ chart2/source/controller/dialogs/dlg_ShapeFont.src \ chart2/source/controller/dialogs/dlg_ShapeParagraph.src \ diff --git a/chart2/Library_chartcontroller.mk b/chart2/Library_chartcontroller.mk index 45e4266..e90f716 100644 --- a/chart2/Library_chartcontroller.mk +++ b/chart2/Library_chartcontroller.mk @@ -98,7 +98,6 @@ $(eval $(call gb_Library_add_exception_objects,chartcontroller,\ chart2/source/controller/dialogs/dlg_InsertErrorBars \ chart2/source/controller/dialogs/dlg_InsertLegend \ chart2/source/controller/dialogs/dlg_InsertTitle \ - chart2/source/controller/dialogs/dlg_InsertTrendline \ chart2/source/controller/dialogs/dlg_NumberFormat \ chart2/source/controller/dialogs/dlg_ObjectProperties \ chart2/source/controller/dialogs/dlg_ShapeFont \ diff --git a/chart2/source/controller/dialogs/dlg_InsertTrendline.cxx b/chart2/source/controller/dialogs/dlg_InsertTrendline.cxx deleted file mode 100644 index a00e424..0000000 --- a/chart2/source/controller/dialogs/dlg_InsertTrendline.cxx +++ /dev/null @@ -1,106 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - - -#include "dlg_InsertTrendline.hxx" -#include "dlg_InsertTrendline.hrc" -#include "res_Trendline.hxx" -#include "ResourceIds.hrc" -#include "ResId.hxx" -#include "Strings.hrc" -#include "chartview/ExplicitValueProvider.hxx" -#include "ChartModelHelper.hxx" -#include "ObjectIdentifier.hxx" -#include "DiagramHelper.hxx" -#include "AxisHelper.hxx" -#include "ObjectNameProvider.hxx" -#include <com/sun/star/chart2/XAxis.hpp> -#include <com/sun/star/chart2/XDiagram.hpp> - -#include <svtools/controldims.hrc> - -using namespace ::com::sun::star; -using namespace ::com::sun::star::chart2; - -namespace -{ -void lcl_SetControlXPos( Control & rControl, long nPosPixel ) -{ - Point aPos( rControl.GetPosPixel()); - aPos.setX( nPosPixel ); - rControl.SetPosPixel( aPos ); -} -} // anonymous namespace - -//............................................................................. -namespace chart -{ -//............................................................................. - -InsertTrendlineDialog::InsertTrendlineDialog( Window* pParent, const SfxItemSet& rMyAttrs ) : - ModalDialog( pParent, SchResId( DLG_DATA_TRENDLINE )), - rInAttrs( rMyAttrs ), - aBtnOK( this, SchResId( BTN_OK )), - aBtnCancel( this, SchResId( BTN_CANCEL )), - aBtnHelp( this, SchResId( BTN_HELP )), - m_apTrendlineResources( new TrendlineResources( this, rInAttrs, true )) -{ - FreeResource(); - this->SetText( ObjectNameProvider::getName_ObjectForAllSeries( OBJECTTYPE_DATA_CURVE ) ); -} - -InsertTrendlineDialog::~InsertTrendlineDialog() -{ -} - -void InsertTrendlineDialog::adjustSize() -{ - long nControlsRightEdge = m_apTrendlineResources->adjustControlSizes(); - long nButtonXPos = nControlsRightEdge + - LogicToPixel( Size( RSC_SP_CTRL_X, 10 ), MapMode( MAP_APPFONT )).getWidth(); - lcl_SetControlXPos( aBtnOK, nButtonXPos ); - lcl_SetControlXPos( aBtnCancel, nButtonXPos ); - lcl_SetControlXPos( aBtnHelp, nButtonXPos ); - - Size aDialogSize( GetSizePixel()); - aDialogSize.setWidth( - nControlsRightEdge + - LogicToPixel( Size( RSC_SP_CTRL_X + RSC_CD_PUSHBUTTON_WIDTH + RSC_SP_DLG_INNERBORDER_RIGHT, 0 ), - MapMode( MAP_APPFONT )).getWidth()); - SetSizePixel( aDialogSize ); -} - -void InsertTrendlineDialog::FillItemSet(SfxItemSet& rOutAttrs) -{ - m_apTrendlineResources->FillItemSet(rOutAttrs); -} - -void InsertTrendlineDialog::DataChanged( const DataChangedEvent& rDCEvt ) -{ - ModalDialog::DataChanged( rDCEvt ); - - if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) - m_apTrendlineResources->FillValueSets(); -} - -//............................................................................. -} //namespace chart -//............................................................................. - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/chart2/source/controller/dialogs/dlg_InsertTrendline.hrc b/chart2/source/controller/dialogs/dlg_InsertTrendline.hrc deleted file mode 100644 index fd728a0..0000000 --- a/chart2/source/controller/dialogs/dlg_InsertTrendline.hrc +++ /dev/null @@ -1,25 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ -#include "ResourceIds.hrc" - -#define BTN_OK 1 -#define BTN_CANCEL 1 -#define BTN_HELP 1 - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/chart2/source/controller/dialogs/dlg_InsertTrendline.src b/chart2/source/controller/dialogs/dlg_InsertTrendline.src deleted file mode 100644 index 2b8b621..0000000 --- a/chart2/source/controller/dialogs/dlg_InsertTrendline.src +++ /dev/null @@ -1,40 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#include "dlg_InsertTrendline.hrc" -#include "HelpIds.hrc" -#include "CommonResources.hrc" -#include "res_Trendline.hrc" - -// is only an initial size, will be calculated to contain all controls -#define DLG_DATA_TRENDLINE_RES_WIDTH 130 -#define DLG_DATA_TRENDLINE_ADD_TO_RES 62 - -ModalDialog DLG_DATA_TRENDLINE -{ - HelpID = HID_INSERT_STATISTICS ; - OutputSize = TRUE ; - SVLook = TRUE ; - Size = MAP_APPFONT( DLG_DATA_TRENDLINE_RES_WIDTH + DLG_DATA_TRENDLINE_ADD_TO_RES, 220 ); - Moveable = TRUE ; - BUTTONS_OK_CANCEL_HELP_STACKED( DLG_DATA_TRENDLINE_RES_WIDTH + DLG_DATA_TRENDLINE_ADD_TO_RES ) - RESOURCE_TRENDLINE( DLG_DATA_TRENDLINE_RES_WIDTH, 22 ) -}; - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/chart2/source/controller/dialogs/res_Trendline.cxx b/chart2/source/controller/dialogs/res_Trendline.cxx index 316282c..75f08dc 100644 --- a/chart2/source/controller/dialogs/res_Trendline.cxx +++ b/chart2/source/controller/dialogs/res_Trendline.cxx @@ -18,7 +18,6 @@ */ -#include "dlg_InsertTrendline.hrc" #include "res_Trendline.hxx" #include "res_Trendline_IDs.hrc" #include "ResId.hxx" diff --git a/chart2/source/controller/inc/dlg_InsertTrendline.hxx b/chart2/source/controller/inc/dlg_InsertTrendline.hxx deleted file mode 100644 index 2b07684..0000000 --- a/chart2/source/controller/inc/dlg_InsertTrendline.hxx +++ /dev/null @@ -1,62 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ -#ifndef _CHART2_DLG_INSERT_TRENDLINE_HXX -#define _CHART2_DLG_INSERT_TRENDLINE_HXX - -#include <vcl/dialog.hxx> -#include <vcl/button.hxx> -#include <svl/itemset.hxx> -#include <memory> - -//............................................................................. -namespace chart -{ -//............................................................................. - -class TrendlineResources; -class InsertTrendlineDialog : public ModalDialog -{ -public: - InsertTrendlineDialog( Window* pParent, const SfxItemSet& rMyAttrs ); - virtual ~InsertTrendlineDialog(); - - void FillItemSet( SfxItemSet& rOutAttrs ); - virtual void DataChanged( const DataChangedEvent& rDCEvt ); - - // sets the size so that all control texts fit. Has to be done after - // complete construction of the dialog - void adjustSize(); - -private: - const SfxItemSet & rInAttrs; - - OKButton aBtnOK; - CancelButton aBtnCancel; - HelpButton aBtnHelp; - - ::std::auto_ptr< TrendlineResources > m_apTrendlineResources; -}; - -//............................................................................. -} //namespace chart -//............................................................................. - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/chart2/source/controller/main/ChartController_Insert.cxx b/chart2/source/controller/main/ChartController_Insert.cxx index 9b882db..08c4610 100644 --- a/chart2/source/controller/main/ChartController_Insert.cxx +++ b/chart2/source/controller/main/ChartController_Insert.cxx @@ -22,7 +22,6 @@ #include "dlg_InsertAxis_Grid.hxx" #include "dlg_InsertDataLabel.hxx" #include "dlg_InsertLegend.hxx" -#include "dlg_InsertTrendline.hxx" #include "dlg_InsertErrorBars.hxx" #include "dlg_InsertTitle.hxx" #include "dlg_ObjectProperties.hxx" commit 9c93631864415d725c4c399176c661c18a43ddde Author: Tomaž Vajngerl <qui...@gmail.com> Date: Mon Jul 1 22:16:15 2013 +0200 Adding multiple trendlines with menu item Insert>Trend Lines.. Menu item "Insert>Trend Lines.." allowed adding trendlines for all data series at the same time. As we can now have more trendlines per one data series this becomes cumbersome so only allow to add a trend line when data series is selected or known. Change-Id: I676876f389d00d3fbe668d429f0f98bd8c8d4d3d diff --git a/chart2/source/controller/main/ChartController_Insert.cxx b/chart2/source/controller/main/ChartController_Insert.cxx index 86123f8..9b882db 100644 --- a/chart2/source/controller/main/ChartController_Insert.cxx +++ b/chart2/source/controller/main/ChartController_Insert.cxx @@ -363,48 +363,15 @@ void ChartController::executeDispatch_InsertMenu_MeanValues() void ChartController::executeDispatch_InsertMenu_Trendlines() { - //if a series is selected insert only for that series: - uno::Reference< chart2::XDataSeries > xSeries( - ObjectIdentifier::getDataSeriesForCID( m_aSelection.getSelectedCID(), getModel() ), uno::UNO_QUERY ); - if( xSeries.is()) - { - executeDispatch_InsertTrendline(); - return; - } - - UndoGuard aUndoGuard( - ActionDescriptionProvider::createDescription( - ActionDescriptionProvider::INSERT, ObjectNameProvider::getName_ObjectForAllSeries( OBJECTTYPE_DATA_CURVE ) ), - m_xUndoManager ); - - try - { - wrapper::AllSeriesStatisticsConverter aItemConverter( - getModel(), m_pDrawModelWrapper->GetItemPool() ); - SfxItemSet aItemSet = aItemConverter.CreateEmptyItemSet(); - aItemConverter.FillItemSet( aItemSet ); + OUString aCID = m_aSelection.getSelectedCID(); - //prepare and open dialog - SolarMutexGuard aGuard; - InsertTrendlineDialog aDialog( m_pChartWindow, aItemSet ); - aDialog.adjustSize(); + uno::Reference< chart2::XDataSeries > xSeries( + ObjectIdentifier::getDataSeriesForCID( aCID, getModel() ), uno::UNO_QUERY ); - if( aDialog.Execute() == RET_OK ) - { - SfxItemSet aOutItemSet = aItemConverter.CreateEmptyItemSet(); - aDialog.FillItemSet( aOutItemSet ); + if( !xSeries.is() ) + return; - // lock controllers till end of block - ControllerLockGuard aCLGuard( getModel() ); - bool bChanged = aItemConverter.ApplyItemSet( aOutItemSet );//model should be changed now - if( bChanged ) - aUndoGuard.commit(); - } - } - catch(const uno::RuntimeException& e) - { - ASSERT_EXCEPTION( e ); - } + executeDispatch_InsertTrendline(); } void ChartController::executeDispatch_InsertTrendline() @@ -420,14 +387,12 @@ void ChartController::executeDispatch_InsertTrendline() ActionDescriptionProvider::INSERT, String( SchResId( STR_OBJECT_CURVE ))), m_xUndoManager ); - // add a linear curve uno::Reference< chart2::XRegressionCurve > xCurve = RegressionCurveHelper::addRegressionCurve( RegressionCurveHelper::REGRESSION_TYPE_LINEAR, xRegressionCurveContainer, m_xCC ); - // get an appropriate item converter uno::Reference< beans::XPropertySet > xProperties( xCurve, uno::UNO_QUERY ); if( !xProperties.is()) diff --git a/chart2/source/controller/main/ControllerCommandDispatch.cxx b/chart2/source/controller/main/ControllerCommandDispatch.cxx index 6731998..abb74fc 100644 --- a/chart2/source/controller/main/ControllerCommandDispatch.cxx +++ b/chart2/source/controller/main/ControllerCommandDispatch.cxx @@ -117,6 +117,7 @@ struct ControllerState bool bMayMoveSeriesBackward; // trendlines + bool bMayAddMenuTrendline; bool bMayAddTrendline; bool bMayAddTrendlineEquation; bool bMayAddR2Value; @@ -147,6 +148,7 @@ ControllerState::ControllerState() : bIsFormateableObjectSelected(false), bMayMoveSeriesForward( false ), bMayMoveSeriesBackward( false ), + bMayAddMenuTrendline( false ), bMayAddTrendline( false ), bMayAddTrendlineEquation( false ), bMayAddR2Value( false ), @@ -208,6 +210,7 @@ void ControllerState::update( xGivenDataSeries, MOVE_SERIES_BACKWARD ); + bMayAddMenuTrendline = false; bMayAddTrendline = false; bMayAddTrendlineEquation = false; bMayAddR2Value = false; @@ -229,6 +232,7 @@ void ControllerState::update( { if( xGivenDataSeries.is()) { + bMayAddMenuTrendline = true; sal_Int32 nDimensionCount = DiagramHelper::getDimension( xDiagram ); uno::Reference< chart2::XChartType > xFirstChartType( DataSeriesHelper::getChartTypeOfSeries( xGivenDataSeries, xDiagram )); @@ -237,11 +241,9 @@ void ControllerState::update( if( (OBJECTTYPE_DATA_SERIES == aObjectType || OBJECTTYPE_DATA_POINT == aObjectType) && ChartTypeHelper::isSupportingRegressionProperties( xFirstChartType, nDimensionCount )) { - uno::Reference< chart2::XRegressionCurveContainer > xRegCurveCnt( - xGivenDataSeries, uno::UNO_QUERY ); + uno::Reference< chart2::XRegressionCurveContainer > xRegCurveCnt( xGivenDataSeries, uno::UNO_QUERY ); if( xRegCurveCnt.is()) { - uno::Reference< chart2::XRegressionCurve > xRegCurve( RegressionCurveHelper::getFirstCurveNotMeanValueLine( xRegCurveCnt ) ); // Trendline bMayAddTrendline = true; @@ -578,7 +580,7 @@ void ControllerCommandDispatch::updateCommandAvailability() m_aCommandAvailability[ ".uno:InsertMenuDataLabels" ] = bIsWritable; m_aCommandAvailability[ ".uno:InsertRemoveAxes" ] = m_aCommandAvailability[ ".uno:InsertMenuAxes" ] = bIsWritable && m_apModelState->bSupportsAxes; m_aCommandAvailability[ ".uno:InsertMenuGrids" ] = bIsWritable && m_apModelState->bSupportsAxes; - m_aCommandAvailability[ ".uno:InsertMenuTrendlines" ] = bIsWritable && m_apModelState->bSupportsStatistics; + m_aCommandAvailability[ ".uno:InsertMenuTrendlines" ] = bIsWritable && m_apModelState->bSupportsStatistics && m_apControllerState->bMayAddMenuTrendline; m_aCommandAvailability[ ".uno:InsertMenuMeanValues" ] = bIsWritable && m_apModelState->bSupportsStatistics; m_aCommandAvailability[ ".uno:InsertMenuXErrorBars" ] = bIsWritable && m_apModelState->bSupportsStatistics; m_aCommandAvailability[ ".uno:InsertMenuYErrorBars" ] = bIsWritable && m_apModelState->bSupportsStatistics; commit 58be4fa0b14e31855f30e65c9aa5b5dc0f4f66e5 Author: Tomaž Vajngerl <qui...@gmail.com> Date: Mon Jul 1 19:30:49 2013 +0200 use sal_Int32 instead of int in PolynomialRegressionCurveCalculator Change-Id: Icc3ffdda71482d1a716ea99e6cf8410bc2e39aa0 diff --git a/chart2/source/tools/PolynomialRegressionCurveCalculator.cxx b/chart2/source/tools/PolynomialRegressionCurveCalculator.cxx index 0d3d4d1..50de7d3 100644 --- a/chart2/source/tools/PolynomialRegressionCurveCalculator.cxx +++ b/chart2/source/tools/PolynomialRegressionCurveCalculator.cxx @@ -48,14 +48,14 @@ void SAL_CALL PolynomialRegressionCurveCalculator::recalculateRegression( RegressionCalculationHelper::tDoubleVectorPair aValues( RegressionCalculationHelper::cleanup( aXValues, aYValues, RegressionCalculationHelper::isValid())); - int aNoElements = mForceIntercept ? mDegree : mDegree + 1; - int aNumberOfPowers = 2 * aNoElements - 1; + sal_Int32 aNoElements = mForceIntercept ? mDegree : mDegree + 1; + sal_Int32 aNumberOfPowers = 2 * aNoElements - 1; std::vector<double> aPowers; aPowers.resize(aNumberOfPowers, 0.0); - int aNoColumns = aNoElements; - int aNoRows = aNoElements + 1; + sal_Int32 aNoColumns = aNoElements; + sal_Int32 aNoRows = aNoElements + 1; std::vector<double> aMatrix; aMatrix.resize(aNoColumns * aNoRows, 0.0); @@ -69,7 +69,7 @@ void SAL_CALL PolynomialRegressionCurveCalculator::recalculateRegression( double x = aValues.first[i]; double y = aValues.second[i]; - for (int j = 0; j < aNumberOfPowers; j++) + for (sal_Int32 j = 0; j < aNumberOfPowers; j++) { if (mForceIntercept) aPowers[j] += std::pow(x, j + 2); @@ -77,7 +77,7 @@ void SAL_CALL PolynomialRegressionCurveCalculator::recalculateRegression( aPowers[j] += std::pow(x, j); } - for (int j = 0; j < aNoElements; j++) + for (sal_Int32 j = 0; j < aNoElements; j++) { if (mForceIntercept) aMatrix[j * aNoRows + aNoElements] += std::pow(x, j + 1) * ( y - mInterceptValue ); @@ -90,9 +90,9 @@ void SAL_CALL PolynomialRegressionCurveCalculator::recalculateRegression( yAverage = yAverage / aNoValues; - for (int y = 0; y < aNoElements; y++) + for (sal_Int32 y = 0; y < aNoElements; y++) { - for (int x = 0; x < aNoElements; x++) + for (sal_Int32 x = 0; x < aNoElements; x++) { aMatrix[y * aNoRows + x] = aPowers[y + x]; } @@ -166,8 +166,8 @@ OUString PolynomialRegressionCurveCalculator::ImplGetRepresentation( { OUStringBuffer aBuf( "f(x) = "); - int aLastIndex = mResult.size() - 1; - for (int i = aLastIndex; i >= 0; i--) + sal_Int32 aLastIndex = mResult.size() - 1; + for (sal_Int32 i = aLastIndex; i >= 0; i--) { double aValue = mResult[i]; if (aValue == 0.0)
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits