From 68cd011c907d00493bf2bfde531c1e244819596b Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 8 Aug 2014 12:44:57 +0200 Subject: java: reduce scope, make some methods private found by UCDetector Change-Id: Ib1425edde146193a65c242dc159b7e3fbf0e4a2e --- .../star/comp/Calc/NLPSolver/BaseEvolutionarySolver.java | 4 ++-- .../com/sun/star/comp/Calc/NLPSolver/BaseNLPSolver.java | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) (limited to 'nlpsolver/src/com') diff --git a/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/BaseEvolutionarySolver.java b/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/BaseEvolutionarySolver.java index e3db5d16fa2f..9d779afe7225 100644 --- a/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/BaseEvolutionarySolver.java +++ b/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/BaseEvolutionarySolver.java @@ -168,7 +168,7 @@ public abstract class BaseEvolutionarySolver extends BaseNLPSolver { protected IEvolutionarySolverStatusDialog m_solverStatusDialog; - protected void prepareVariables(double[][] variableBounds) { + private void prepareVariables(double[][] variableBounds) { m_variables.clear(); for (int i = 0; i < m_variableCount; i++) { Variable var = new Variable(m_variableMap[i], i); @@ -342,7 +342,7 @@ public abstract class BaseEvolutionarySolver extends BaseNLPSolver { super.finalizeSolve(); } - protected boolean checkConstraints() { + private boolean checkConstraints() { boolean result = true; for (int i = 0; i < m_constraintCount && result; i++) { if (m_extConstraints[i].Left.getError() == 0) { diff --git a/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/BaseNLPSolver.java b/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/BaseNLPSolver.java index ef7ae96debef..7401af7eda0c 100644 --- a/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/BaseNLPSolver.java +++ b/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/BaseNLPSolver.java @@ -175,7 +175,7 @@ public abstract class BaseNLPSolver extends WeakBase Row = row; } - public CellRangeAddress getCellRangeAddress(int lastRow) { + private CellRangeAddress getCellRangeAddress(int lastRow) { CellRangeAddress result = new CellRangeAddress(); result.Sheet = Sheet; result.StartColumn = StartCol; @@ -341,11 +341,11 @@ public abstract class BaseNLPSolver extends WeakBase return m_currentParameters; } - protected XCell getCell(CellAddress cellAddress) { + private XCell getCell(CellAddress cellAddress) { return getCell(cellAddress.Column, cellAddress.Row, cellAddress.Sheet); } - protected XCell getCell(int col, int row, int sheet) { + private XCell getCell(int col, int row, int sheet) { try { XSpreadsheets xSpreadsheets = m_document.getSheets(); XIndexAccess xSheetIndex = UnoRuntime.queryInterface(XIndexAccess.class, xSpreadsheets); @@ -365,7 +365,7 @@ public abstract class BaseNLPSolver extends WeakBase cellRangeAddress.StartRow, cellRangeAddress.EndColumn, cellRangeAddress.EndRow); } - protected XCellRangeData getCellRangeData(int sheet, int startCol, int startRow, int endCol, int endRow) { + private XCellRangeData getCellRangeData(int sheet, int startCol, int startRow, int endCol, int endRow) { try { XSpreadsheets xSpreadsheets = m_document.getSheets(); XIndexAccess xSheetIndex = UnoRuntime.queryInterface(XIndexAccess.class, xSpreadsheets); @@ -380,12 +380,12 @@ public abstract class BaseNLPSolver extends WeakBase return null; } - protected XChartDataArray getChartDataArray(CellRangeAddress cellRangeAddress) { + private XChartDataArray getChartDataArray(CellRangeAddress cellRangeAddress) { return getChartDataArray(cellRangeAddress.Sheet, cellRangeAddress.StartColumn, cellRangeAddress.StartRow, cellRangeAddress.EndColumn, cellRangeAddress.EndRow); } - protected XChartDataArray getChartDataArray(int sheet, int startCol, int startRow, int endCol, int endRow) { + private XChartDataArray getChartDataArray(int sheet, int startCol, int startRow, int endCol, int endRow) { try { XSpreadsheets xSpreadsheets = m_document.getSheets(); XIndexAccess xSheetIndex = UnoRuntime.queryInterface(XIndexAccess.class, xSpreadsheets); @@ -487,7 +487,7 @@ public abstract class BaseNLPSolver extends WeakBase } // - protected void lockDocument(boolean lock) { + private void lockDocument(boolean lock) { if (lock) m_xModel.lockControllers(); else -- cgit