summaryrefslogtreecommitdiff
path: root/chart2/source/controller/dialogs
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-04-28 12:45:40 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-04-28 13:41:48 +0200
commitda57421b366dfd5bef840f5caeffcd030b19c643 (patch)
treea9ab7a6ba138c063866af2f2c8a4d7fc990c274f /chart2/source/controller/dialogs
parent5a394be952c0795cd12ed0eea8f5186e44814225 (diff)
commit: loplugin:checkunusedparams in chart2
Change-Id: Ia1f42e74365ca1dace93babc132ad67fd09fc99d Reviewed-on: https://gerrit.libreoffice.org/37064 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'chart2/source/controller/dialogs')
-rw-r--r--chart2/source/controller/dialogs/DataBrowser.cxx28
-rw-r--r--chart2/source/controller/dialogs/DataBrowser.hxx4
-rw-r--r--chart2/source/controller/dialogs/DataBrowserModel.cxx8
-rw-r--r--chart2/source/controller/dialogs/DataBrowserModel.hxx4
-rw-r--r--chart2/source/controller/dialogs/dlg_ObjectProperties.cxx2
5 files changed, 22 insertions, 24 deletions
diff --git a/chart2/source/controller/dialogs/DataBrowser.cxx b/chart2/source/controller/dialogs/DataBrowser.cxx
index 0ed15d33058c..4548d3b6f4df 100644
--- a/chart2/source/controller/dialogs/DataBrowser.cxx
+++ b/chart2/source/controller/dialogs/DataBrowser.cxx
@@ -654,7 +654,7 @@ OUString DataBrowser::GetCellText( long nRow, sal_uInt16 nColumnId ) const
{
sal_Int32 nColIndex = static_cast< sal_Int32 >( nColumnId ) - 1;
- if( m_apDataBrowserModel->getCellType( nColIndex, nRow ) == DataBrowserModel::NUMBER )
+ if( m_apDataBrowserModel->getCellType( nColIndex ) == DataBrowserModel::NUMBER )
{
double fData( m_apDataBrowserModel->getCellNumber( nColIndex, nRow ));
sal_Int32 nLabelColor;
@@ -664,11 +664,11 @@ OUString DataBrowser::GetCellText( long nRow, sal_uInt16 nColumnId ) const
{
bool bColorChanged = false;
aResult = m_spNumberFormatterWrapper->getFormattedString(
- GetNumberFormatKey( nRow, nColumnId ),
+ GetNumberFormatKey( nColumnId ),
fData, nLabelColor, bColorChanged );
}
}
- else if( m_apDataBrowserModel->getCellType( nColIndex, nRow ) == DataBrowserModel::TEXTORDATE )
+ else if( m_apDataBrowserModel->getCellType( nColIndex ) == DataBrowserModel::TEXTORDATE )
{
uno::Any aAny = m_apDataBrowserModel->getCellAny( nColIndex, nRow );
OUString aText;
@@ -694,7 +694,7 @@ OUString DataBrowser::GetCellText( long nRow, sal_uInt16 nColumnId ) const
}
else
{
- OSL_ASSERT( m_apDataBrowserModel->getCellType( nColIndex, nRow ) == DataBrowserModel::TEXT );
+ OSL_ASSERT( m_apDataBrowserModel->getCellType( nColIndex ) == DataBrowserModel::TEXT );
aResult = m_apDataBrowserModel->getCellText( nColIndex, nRow );
}
}
@@ -780,10 +780,9 @@ bool DataBrowser::ShowQueryBox()
bool DataBrowser::IsDataValid()
{
bool bValid = true;
- const sal_Int32 nRow = lcl_getRowInData( GetCurRow());
const sal_Int32 nCol = lcl_getColumnInData( GetCurColumnId());
- if( m_apDataBrowserModel->getCellType( nCol, nRow ) == DataBrowserModel::NUMBER )
+ if( m_apDataBrowserModel->getCellType( nCol ) == DataBrowserModel::NUMBER )
{
sal_uInt32 nDummy = 0;
double fDummy = 0.0;
@@ -1087,15 +1086,15 @@ bool DataBrowser::IsTabAllowed( bool bForward ) const
nCol != nBadCol );
}
-::svt::CellController* DataBrowser::GetController( long nRow, sal_uInt16 nCol )
+::svt::CellController* DataBrowser::GetController( long /*nRow*/, sal_uInt16 nCol )
{
if( m_bIsReadOnly )
return nullptr;
- if( CellContainsNumbers( nRow, nCol ))
+ if( CellContainsNumbers( nCol ))
{
m_aNumberEditField->UseInputStringForFormatting();
- m_aNumberEditField->SetFormatKey( GetNumberFormatKey( nRow, nCol ));
+ m_aNumberEditField->SetFormatKey( GetNumberFormatKey( nCol ));
return m_rNumberEditController.get();
}
@@ -1128,19 +1127,18 @@ void DataBrowser::InitController(
}
}
-bool DataBrowser::CellContainsNumbers( sal_Int32 nRow, sal_uInt16 nCol ) const
+bool DataBrowser::CellContainsNumbers( sal_uInt16 nCol ) const
{
if( ! m_apDataBrowserModel.get())
return false;
- return (m_apDataBrowserModel->getCellType( lcl_getColumnInData( nCol ), lcl_getRowInData( nRow )) ==
- DataBrowserModel::NUMBER);
+ return m_apDataBrowserModel->getCellType( lcl_getColumnInData( nCol )) == DataBrowserModel::NUMBER;
}
-sal_uInt32 DataBrowser::GetNumberFormatKey( sal_Int32 nRow, sal_uInt16 nCol ) const
+sal_uInt32 DataBrowser::GetNumberFormatKey( sal_uInt16 nCol ) const
{
if( ! m_apDataBrowserModel.get())
return 0;
- return m_apDataBrowserModel->getNumberFormatKey( lcl_getColumnInData( nCol ), lcl_getRowInData( nRow ));
+ return m_apDataBrowserModel->getNumberFormatKey( lcl_getColumnInData( nCol ) );
}
bool DataBrowser::isDateTimeString( const OUString& aInputString, double& fOutDateTimeValue )
@@ -1168,7 +1166,7 @@ bool DataBrowser::SaveModified()
OSL_ENSURE( nRow >= 0 || nCol >= 0, "This cell should not be modified!" );
SvNumberFormatter* pSvNumberFormatter = m_spNumberFormatterWrapper.get() ? m_spNumberFormatterWrapper->getSvNumberFormatter() : nullptr;
- switch( m_apDataBrowserModel->getCellType( nCol, nRow ))
+ switch( m_apDataBrowserModel->getCellType( nCol ))
{
case DataBrowserModel::NUMBER:
{
diff --git a/chart2/source/controller/dialogs/DataBrowser.hxx b/chart2/source/controller/dialogs/DataBrowser.hxx
index 0be7b531cafe..a3edc8cde4b2 100644
--- a/chart2/source/controller/dialogs/DataBrowser.hxx
+++ b/chart2/source/controller/dialogs/DataBrowser.hxx
@@ -132,9 +132,9 @@ public:
/// confirms all pending changes to be ready to be closed
bool EndEditing();
- bool CellContainsNumbers( sal_Int32 nRow, sal_uInt16 nCol ) const;
+ bool CellContainsNumbers( sal_uInt16 nCol ) const;
- sal_uInt32 GetNumberFormatKey( sal_Int32 nRow, sal_uInt16 nCol ) const;
+ sal_uInt32 GetNumberFormatKey( sal_uInt16 nCol ) const;
bool IsEnableItem() { return m_bDataValid;}
bool IsDataValid();
diff --git a/chart2/source/controller/dialogs/DataBrowserModel.cxx b/chart2/source/controller/dialogs/DataBrowserModel.cxx
index 91a332394cf0..875137f1f576 100644
--- a/chart2/source/controller/dialogs/DataBrowserModel.cxx
+++ b/chart2/source/controller/dialogs/DataBrowserModel.cxx
@@ -576,7 +576,7 @@ Reference< chart2::XDataSeries >
return nullptr;
}
-DataBrowserModel::eCellType DataBrowserModel::getCellType( sal_Int32 nAtColumn, sal_Int32 /* nAtRow */ ) const
+DataBrowserModel::eCellType DataBrowserModel::getCellType( sal_Int32 nAtColumn ) const
{
eCellType eResult = TEXT;
tDataColumnVector::size_type nIndex( nAtColumn );
@@ -646,7 +646,7 @@ OUString DataBrowserModel::getCellText( sal_Int32 nAtColumn, sal_Int32 nAtRow )
return aResult;
}
-sal_uInt32 DataBrowserModel::getNumberFormatKey( sal_Int32 nAtColumn, sal_Int32 /* nAtRow */ )
+sal_uInt32 DataBrowserModel::getNumberFormatKey( sal_Int32 nAtColumn )
{
tDataColumnVector::size_type nIndex( nAtColumn );
if( nIndex < m_aColumns.size())
@@ -697,13 +697,13 @@ bool DataBrowserModel::setCellAny( sal_Int32 nAtColumn, sal_Int32 nAtRow, const
bool DataBrowserModel::setCellNumber( sal_Int32 nAtColumn, sal_Int32 nAtRow, double fValue )
{
- return (getCellType( nAtColumn, nAtRow ) == NUMBER) &&
+ return (getCellType( nAtColumn ) == NUMBER) &&
setCellAny( nAtColumn, nAtRow, uno::Any( fValue ));
}
bool DataBrowserModel::setCellText( sal_Int32 nAtColumn, sal_Int32 nAtRow, const OUString & rText )
{
- return (getCellType( nAtColumn, nAtRow ) == TEXT) &&
+ return (getCellType( nAtColumn ) == TEXT) &&
setCellAny( nAtColumn, nAtRow, uno::Any( rText ));
}
diff --git a/chart2/source/controller/dialogs/DataBrowserModel.hxx b/chart2/source/controller/dialogs/DataBrowserModel.hxx
index 589fe79086b9..7d9f90843dbf 100644
--- a/chart2/source/controller/dialogs/DataBrowserModel.hxx
+++ b/chart2/source/controller/dialogs/DataBrowserModel.hxx
@@ -73,12 +73,12 @@ public:
TEXTORDATE
};
- eCellType getCellType( sal_Int32 nAtColumn, sal_Int32 nAtRow ) const;
+ eCellType getCellType( sal_Int32 nAtColumn ) const;
/// If getCellType( nAtColumn, nAtRow ) returns TEXT, the result will be Nan
double getCellNumber( sal_Int32 nAtColumn, sal_Int32 nAtRow );
OUString getCellText( sal_Int32 nAtColumn, sal_Int32 nAtRow );
css::uno::Any getCellAny( sal_Int32 nAtColumn, sal_Int32 nAtRow );
- sal_uInt32 getNumberFormatKey( sal_Int32 nAtColumn, sal_Int32 nAtRow );
+ sal_uInt32 getNumberFormatKey( sal_Int32 nAtColumn );
/// returns </sal_True> if the number could successfully be set at the given position
bool setCellNumber( sal_Int32 nAtColumn, sal_Int32 nAtRow, double fValue );
diff --git a/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx b/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx
index e23c021b50f5..6f8cc675d86f 100644
--- a/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx
+++ b/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx
@@ -130,7 +130,7 @@ void ObjectPropertiesDialogParameter::init( const uno::Reference< frame::XModel
if( bHasSeriesProperties )
{
m_bHasStatisticProperties = ChartTypeHelper::isSupportingStatisticProperties( xChartType, nDimensionCount );
- m_bProvidesSecondaryYAxis = ChartTypeHelper::isSupportingSecondaryAxis( xChartType, nDimensionCount, 1 );
+ m_bProvidesSecondaryYAxis = ChartTypeHelper::isSupportingSecondaryAxis( xChartType, nDimensionCount );
m_bProvidesOverlapAndGapWidth = ChartTypeHelper::isSupportingOverlapAndGapWidthProperties( xChartType, nDimensionCount );
m_bProvidesBarConnectors = ChartTypeHelper::isSupportingBarConnectors( xChartType, nDimensionCount );
m_bProvidesStartingAngle = ChartTypeHelper::isSupportingStartingAngle( xChartType );