summaryrefslogtreecommitdiff
path: root/wizards/com/sun/star/wizards/reportbuilder
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-12-10 15:36:24 +0200
committerNoel Grandin <noelgrandin@gmail.com>2014-12-11 06:09:03 +0000
commit7557f23b31dcfb4d86c122bb34d9675c0db9a694 (patch)
tree5feb7be2b0841d8ee60d935cf2e29e9a01a31a27 /wizards/com/sun/star/wizards/reportbuilder
parent808fd5fbd8868dfd95c8a38676815798fa2b79c4 (diff)
java: reduce visibility of fields and methods
found by PMD Change-Id: Id6737916b68ccbdbdeec5d314747a38410923ac6 Reviewed-on: https://gerrit.libreoffice.org/13409 Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'wizards/com/sun/star/wizards/reportbuilder')
-rw-r--r--wizards/com/sun/star/wizards/reportbuilder/layout/ReportBuilderLayouter.java80
-rw-r--r--wizards/com/sun/star/wizards/reportbuilder/layout/SectionLabel.java2
-rw-r--r--wizards/com/sun/star/wizards/reportbuilder/layout/SectionObject.java2
-rw-r--r--wizards/com/sun/star/wizards/reportbuilder/layout/SectionTextField.java2
4 files changed, 43 insertions, 43 deletions
diff --git a/wizards/com/sun/star/wizards/reportbuilder/layout/ReportBuilderLayouter.java b/wizards/com/sun/star/wizards/reportbuilder/layout/ReportBuilderLayouter.java
index 8b0aef149f67..fc84743e0654 100644
--- a/wizards/com/sun/star/wizards/reportbuilder/layout/ReportBuilderLayouter.java
+++ b/wizards/com/sun/star/wizards/reportbuilder/layout/ReportBuilderLayouter.java
@@ -164,7 +164,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter
/**
* Remove all Groups
*/
- protected void clearGroups()
+ private void clearGroups()
{
final XGroups xGroups = getReportDefinition().getGroups();
while (xGroups.hasElements())
@@ -233,7 +233,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter
return nIndent;
}
- int m_nLeftIndent = -1;
+ private int m_nLeftIndent = -1;
/**
* Get left page indent.
@@ -250,7 +250,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter
return m_nLeftIndent;
}
- int m_nRightIndent = -1;
+ private int m_nRightIndent = -1;
/**
* Get right page indent.
@@ -298,7 +298,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter
return aUsedStyle;
}
- protected int getFromPageStyles(String _sStyleName, int _nDefault)
+ private int getFromPageStyles(String _sStyleName, int _nDefault)
{
int nValue = _nDefault;
final XStyle xStyle = getUsedStyle("PageStyles");
@@ -311,7 +311,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter
return nValue;
}
- protected void setToPageStyles(String _sStyleName, Object _aObj)
+ private void setToPageStyles(String _sStyleName, Object _aObj)
{
final XStyle xStyle = getUsedStyle("PageStyles");
if (xStyle != null)
@@ -321,7 +321,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter
}
}
- int m_nPageWidth = -1;
+ private int m_nPageWidth = -1;
/**
* Get page width. The default is 21000 1/100mm what is 21cm of DIN A4.
@@ -382,7 +382,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter
}
- protected int insertGroups()
+ private int insertGroups()
{
final XGroups xGroups = getReportDefinition().getGroups();
int lastGroupPosition = -1;
@@ -474,7 +474,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter
}
- protected String getTitleFromFieldName(String _sField)
+ private String getTitleFromFieldName(String _sField)
{
for (int i = 0; i < m_aFieldNames.length; i++)
{
@@ -486,7 +486,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter
return PropertyNames.EMPTY_STRING;
}
- protected int getTypeFromFieldName(String _sField)
+ private int getTypeFromFieldName(String _sField)
{
for (int i = 0; i < m_aFieldNames.length; i++)
{
@@ -498,7 +498,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter
return 0;
}
- protected boolean listContains(String[] _aList, String _aValue)
+ private boolean listContains(String[] _aList, String _aValue)
{
for (int i = 0; i < _aList.length; i++)
{
@@ -517,7 +517,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter
* @param _aGetResultFrom
* @return
*/
- protected String[] getNamesWithoutGroupNames(String[] _aList, String[] _aGetResultFrom)
+ private String[] getNamesWithoutGroupNames(String[] _aList, String[] _aGetResultFrom)
{
if (_aList == null)
{
@@ -695,7 +695,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter
}
- protected String convertFromFieldName(String _sName)
+ private String convertFromFieldName(String _sName)
{
if (_sName.startsWith("field:["))
{
@@ -723,7 +723,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter
return insertFormattedField(_xSection, _sFormattedfield, _aRect, _nWidth, _aSO, (short) com.sun.star.awt.TextAlign.LEFT);
}
- protected Rectangle insertFormattedField(XSection _xSection, String _sFormattedfield, Rectangle _aRect, int _nWidth, SectionObject _aSO, short _nAlignment)
+ private Rectangle insertFormattedField(XSection _xSection, String _sFormattedfield, Rectangle _aRect, int _nWidth, SectionObject _aSO, short _nAlignment)
{
if (_xSection != null)
{
@@ -832,9 +832,9 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter
getReportDefinition().setCommandType(_aType);
getReportDefinition().setCommand(_sTableName);
}
- protected XMultiServiceFactory m_xMSF;
+ private XMultiServiceFactory m_xMSF;
- protected XMultiServiceFactory getMSFofReportDefinition()
+ private XMultiServiceFactory getMSFofReportDefinition()
{
if (m_xMSF == null)
{
@@ -846,12 +846,12 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter
- protected Rectangle insertHorizontalLine(XSection _xSection, Rectangle _aRect, int _nWidth, int _nHeight)
+ private Rectangle insertHorizontalLine(XSection _xSection, Rectangle _aRect, int _nWidth, int _nHeight)
{
return insertLine(_xSection, _aRect, _nWidth, _nHeight, 0);
}
- protected Rectangle insertLine(XSection _xSection, Rectangle _aRect, int _nWidth, int _nHeight, int _nOrientation)
+ private Rectangle insertLine(XSection _xSection, Rectangle _aRect, int _nWidth, int _nHeight, int _nOrientation)
{
if (_xSection != null)
{
@@ -881,7 +881,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter
}
- protected void clearReportHeader()
+ private void clearReportHeader()
{
XSection xSection;
try
@@ -898,7 +898,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter
}
}
- protected void insertReportHeader()
+ private void insertReportHeader()
{
if (getDesignTemplate() != null)
{
@@ -931,7 +931,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter
}
}
- protected void clearReportFooter()
+ private void clearReportFooter()
{
XSection xSection;
try
@@ -948,7 +948,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter
}
}
- protected void insertReportFooter()
+ private void insertReportFooter()
{
if (getDesignTemplate() != null)
{
@@ -982,7 +982,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter
}
- protected void clearPageHeader()
+ private void clearPageHeader()
{
XSection xSection;
try
@@ -999,7 +999,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter
}
}
- protected void clearPageFooter()
+ private void clearPageFooter()
{
XSection xSection;
try
@@ -1051,7 +1051,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter
* @param _aFont
* @return width of given text in 1/100mm
*/
- Size getPreferredSize(String _sText, FontDescriptor _aFont)
+ private Size getPreferredSize(String _sText, FontDescriptor _aFont)
{
Size aSizeMM_100TH = new Size(0, 0);
try
@@ -1098,7 +1098,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter
return aSizeMM_100TH;
}
- protected String getTableName()
+ private String getTableName()
{
if (m_sTableName != null)
{
@@ -1107,7 +1107,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter
return PropertyNames.EMPTY_STRING;
}
- protected String getUserNameFromConfiguration()
+ private String getUserNameFromConfiguration()
{
String sFirstName = PropertyNames.EMPTY_STRING;
String sLastName = PropertyNames.EMPTY_STRING;
@@ -1200,7 +1200,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter
}
}
- protected void insertPageHeader()
+ private void insertPageHeader()
{
if (getDesignTemplate() != null)
{
@@ -1301,7 +1301,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter
}
}
- protected void insertPageFooter()
+ private void insertPageFooter()
{
if (getDesignTemplate() != null)
{
@@ -1395,13 +1395,13 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter
{
return m_aResource;
}
- protected int m_aCommandType; // Table or Query
- protected String m_sTableName;
- protected String[] m_aGroupNames;
- protected String[] m_aFieldNames;
- protected String[] m_aFieldTitleNames;
- protected int[] m_aFieldWidths;
- protected int[] m_aFieldTypes;
+ private int m_aCommandType; // Table or Query
+ private String m_sTableName;
+ private String[] m_aGroupNames;
+ private String[] m_aFieldNames;
+ private String[] m_aFieldTitleNames;
+ private int[] m_aFieldWidths;
+ private int[] m_aFieldTypes;
private DesignTemplate m_xDesignTemplate = null;
public void initializeData(IReportBuilderLayouter _aOther)
@@ -1460,14 +1460,14 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter
* @param _sLabel
* @return the width in 1/100mm
*/
- protected int getLabelWidth(String _sLabel)
+ private int getLabelWidth(String _sLabel)
{
return getLabelWidth(_sLabel, 0.0f, 0.0f);
}
- XFixedText m_aFixedTextHelper = null;
- HashMap<String, Integer> m_aLabelWidthMap;
+ private XFixedText m_aFixedTextHelper = null;
+ private HashMap<String, Integer> m_aLabelWidthMap;
- protected int getLabelWidth(String _sLabel, FontDescriptor _aFD)
+ private int getLabelWidth(String _sLabel, FontDescriptor _aFD)
{
float fCharWeight = 0.0f;
float fCharHeight = 0.0f;
@@ -1479,7 +1479,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter
return getLabelWidth(_sLabel, fCharWeight, fCharHeight);
}
- protected int getLabelWidth(String _sLabel, float _nCharWeight, float _nCharHeight)
+ private int getLabelWidth(String _sLabel, float _nCharWeight, float _nCharHeight)
{
int nWidth = 0;
diff --git a/wizards/com/sun/star/wizards/reportbuilder/layout/SectionLabel.java b/wizards/com/sun/star/wizards/reportbuilder/layout/SectionLabel.java
index b00d24cb01a7..8ee85ffc4d8b 100644
--- a/wizards/com/sun/star/wizards/reportbuilder/layout/SectionLabel.java
+++ b/wizards/com/sun/star/wizards/reportbuilder/layout/SectionLabel.java
@@ -23,7 +23,7 @@ import com.sun.star.report.XFixedText;
public class SectionLabel extends SectionObject
{
- protected SectionLabel(XFixedText _aFixedText)
+ private SectionLabel(XFixedText _aFixedText)
{
m_aParentObject = _aFixedText;
}
diff --git a/wizards/com/sun/star/wizards/reportbuilder/layout/SectionObject.java b/wizards/com/sun/star/wizards/reportbuilder/layout/SectionObject.java
index de2d1cd4aded..c6d3887cccaf 100644
--- a/wizards/com/sun/star/wizards/reportbuilder/layout/SectionObject.java
+++ b/wizards/com/sun/star/wizards/reportbuilder/layout/SectionObject.java
@@ -25,7 +25,7 @@ abstract public class SectionObject
{
Object m_aParentObject; // this could be FixedText or FormattedField or null
- PropertySetHelper m_aPropertySetHelper;
+ private PropertySetHelper m_aPropertySetHelper;
public SectionObject()
{
diff --git a/wizards/com/sun/star/wizards/reportbuilder/layout/SectionTextField.java b/wizards/com/sun/star/wizards/reportbuilder/layout/SectionTextField.java
index fae7d9a2fe37..46a42a0bd2a9 100644
--- a/wizards/com/sun/star/wizards/reportbuilder/layout/SectionTextField.java
+++ b/wizards/com/sun/star/wizards/reportbuilder/layout/SectionTextField.java
@@ -23,7 +23,7 @@ import com.sun.star.report.XFormattedField;
public class SectionTextField extends SectionObject
{
- protected SectionTextField(XFormattedField _aFormattedField)
+ private SectionTextField(XFormattedField _aFormattedField)
{
m_aParentObject = _aFormattedField;
// We would like to know, what properties are in this object.