diff options
author | Noel Grandin <noel@peralex.com> | 2014-12-10 15:36:24 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2014-12-11 06:09:03 +0000 |
commit | 7557f23b31dcfb4d86c122bb34d9675c0db9a694 (patch) | |
tree | 5feb7be2b0841d8ee60d935cf2e29e9a01a31a27 /wizards/com/sun/star/wizards/report | |
parent | 808fd5fbd8868dfd95c8a38676815798fa2b79c4 (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/report')
8 files changed, 62 insertions, 62 deletions
diff --git a/wizards/com/sun/star/wizards/report/DBColumn.java b/wizards/com/sun/star/wizards/report/DBColumn.java index 0785ff3de2e3..5ca1f56a8844 100644 --- a/wizards/com/sun/star/wizards/report/DBColumn.java +++ b/wizards/com/sun/star/wizards/report/DBColumn.java @@ -43,25 +43,25 @@ import com.sun.star.wizards.text.TextFieldHandler; public class DBColumn { - public XCell xValCell; - public XTextRange xValTextCell; - public XTextCursor xValCellCursor; + private XCell xValCell; + private XTextRange xValTextCell; + private XTextCursor xValCellCursor; public XCell xNameCell; - public XTextRange xNameTextCell; - public boolean bAlignLeft; - public String CharFontName; - public PropertyState PropertyState; + private XTextRange xNameTextCell; + private boolean bAlignLeft; + private String CharFontName; + private PropertyState PropertyState; public int ValColumn = 1; - public int ValRow = 0; + private int ValRow = 0; public FieldColumn CurDBField; private XTextTable xTextTable; private XTableColumns xTableColumns; private XCellRange xCellRange; public XNamed xTableName; private boolean bIsGroupColumn; - RecordParser CurDBMetaData; - RecordTable CurRecordTable; - TextTableHandler oTextTableHandler; + private RecordParser CurDBMetaData; + private RecordTable CurRecordTable; + private TextTableHandler oTextTableHandler; public DBColumn(RecordTable _CurRecordTable, TextTableHandler _oTextTableHandler, RecordParser _CurDBMetaData, int i, boolean _bforce) { @@ -230,7 +230,7 @@ public class DBColumn replaceValueCellofTable(_bIsLandscape); } - public void insertUserFieldToTableCell(TextFieldHandler oTextFieldHandler) + private void insertUserFieldToTableCell(TextFieldHandler oTextFieldHandler) { XTextCursor xTextCursor = TextDocument.createTextCursor(xNameCell); xTextCursor.gotoStart(false); @@ -275,7 +275,7 @@ public class DBColumn } } - public void modifyCellContent(Object CurGroupValue) + private void modifyCellContent(Object CurGroupValue) { double dblValue = 0; try @@ -327,7 +327,7 @@ public class DBColumn } } // If the parameter CurGroupValue is null the placeholders are inserted - public void replaceValueCellofTable(boolean _bIsLandscape) + private void replaceValueCellofTable(boolean _bIsLandscape) { try { diff --git a/wizards/com/sun/star/wizards/report/Dataimport.java b/wizards/com/sun/star/wizards/report/Dataimport.java index 92a63d65e836..329dcea92d46 100644 --- a/wizards/com/sun/star/wizards/report/Dataimport.java +++ b/wizards/com/sun/star/wizards/report/Dataimport.java @@ -34,10 +34,10 @@ public class Dataimport extends UnoDialog2 implements com.sun.star.awt.XActionLi // ReportTextDocument CurReportDocument; IReportDocument CurReportDocument; - static String sProgressDBConnection; - static String sProgressDataImport; - static String sProgressTitle; - static String sStop; + private static String sProgressDBConnection; + private static String sProgressDataImport; + private static String sProgressTitle; + private static String sStop; public Dataimport(XMultiServiceFactory _xMSF) { @@ -61,7 +61,7 @@ public class Dataimport extends UnoDialog2 implements com.sun.star.awt.XActionLi CurReportDocument.StopProcess(); } - public void showProgressDisplay(boolean bgetConnection) + private void showProgressDisplay(boolean bgetConnection) { try { @@ -146,7 +146,7 @@ public class Dataimport extends UnoDialog2 implements com.sun.star.awt.XActionLi } } - public void importReportData(final XMultiServiceFactory _xMSF, PropertyValue[] _properties) + private void importReportData(final XMultiServiceFactory _xMSF, PropertyValue[] _properties) { if (CurReportDocument.reconnectToDatabase(_xMSF, _properties)) { diff --git a/wizards/com/sun/star/wizards/report/GroupFieldHandler.java b/wizards/com/sun/star/wizards/report/GroupFieldHandler.java index cbadd8205d5a..b0dc12782476 100644 --- a/wizards/com/sun/star/wizards/report/GroupFieldHandler.java +++ b/wizards/com/sun/star/wizards/report/GroupFieldHandler.java @@ -65,7 +65,7 @@ public class GroupFieldHandler extends FieldSelection } } - public boolean isGroupField(String _FieldName) + private boolean isGroupField(String _FieldName) { return (JavaTools.FieldInList(CurDBMetaData.GroupFieldNames, _FieldName) != -1); } @@ -135,7 +135,7 @@ public class GroupFieldHandler extends FieldSelection } - /* protected */ class FieldSelectionListener implements com.sun.star.wizards.ui.XFieldSelectionListener + /* protected */ private class FieldSelectionListener implements com.sun.star.wizards.ui.XFieldSelectionListener { public void moveItemDown(String Selitem) diff --git a/wizards/com/sun/star/wizards/report/ReportFinalizer.java b/wizards/com/sun/star/wizards/report/ReportFinalizer.java index c20e9fd488b9..682c958a2f4c 100644 --- a/wizards/com/sun/star/wizards/report/ReportFinalizer.java +++ b/wizards/com/sun/star/wizards/report/ReportFinalizer.java @@ -35,12 +35,12 @@ import com.sun.star.wizards.ui.event.XTextListenerAdapter; public class ReportFinalizer { - WizardDialog CurUnoDialog; - XTextComponent xTitleTextBox; - String StoreName; - String DefaultName; - String OldDefaultName; - IReportDocument CurReportDocument; + private WizardDialog CurUnoDialog; + private XTextComponent xTitleTextBox; + private String StoreName; + private String DefaultName; + private String OldDefaultName; + private IReportDocument CurReportDocument; public static final int SOCREATEDOCUMENT = 1; public static final int SOCREATETEMPLATE = 2; public static final int SOUSETEMPLATE = 3; diff --git a/wizards/com/sun/star/wizards/report/ReportLayouter.java b/wizards/com/sun/star/wizards/report/ReportLayouter.java index f092b65a1412..1431fc225355 100644 --- a/wizards/com/sun/star/wizards/report/ReportLayouter.java +++ b/wizards/com/sun/star/wizards/report/ReportLayouter.java @@ -36,18 +36,18 @@ import java.util.ArrayList; public class ReportLayouter { - UnoDialog CurUnoDialog; - static final int SOCONTENTLST = 29; + private UnoDialog CurUnoDialog; + private static final int SOCONTENTLST = 29; final static public int SOOPTLANDSCAPE = 30; final static public int SOOPTPORTRAIT = 31; - static final int SOLAYOUTLST = 32; - XListBox xContentListBox; - XListBox xLayoutListBox; + private static final int SOLAYOUTLST = 32; + private XListBox xContentListBox; + private XListBox xLayoutListBox; int iOldContentPos; int iOldLayoutPos; - IReportDocument CurReportDocument; - public String[][] LayoutFiles; - public String[][] ContentFiles; + private IReportDocument CurReportDocument; + private String[][] LayoutFiles; + private String[][] ContentFiles; Object aOrientationImage; private final XMultiServiceFactory m_xMSF; private XTextRange trTitleconst, trAuthorconst, trDateconst, trPageconst; @@ -365,7 +365,7 @@ public class ReportLayouter } } - public void clearConstants() + private void clearConstants() { constRangeList.clear(); trTitleconst = null; @@ -384,7 +384,7 @@ public class ReportLayouter te.write(tr); } - public List<XTextRange> searchFillInItems(int type) + private List<XTextRange> searchFillInItems(int type) { try { diff --git a/wizards/com/sun/star/wizards/report/ReportTextDocument.java b/wizards/com/sun/star/wizards/report/ReportTextDocument.java index 3484975b985b..e3092bd959c3 100644 --- a/wizards/com/sun/star/wizards/report/ReportTextDocument.java +++ b/wizards/com/sun/star/wizards/report/ReportTextDocument.java @@ -56,14 +56,14 @@ class ReportTextDocument extends com.sun.star.wizards.text.TextDocument implemen private RecordTable CurRecordTable; private String sMsgCommonReportError; private String ContentTemplatePath; - public boolean bIsCurLandscape; + private boolean bIsCurLandscape; public TextTableHandler oTextTableHandler; public TextSectionHandler oTextSectionHandler; public FormHandler oFormHandler; - public TextStyleHandler oTextStyleHandler; + private TextStyleHandler oTextStyleHandler; public TextFieldHandler oTextFieldHandler; public ViewHandler oViewHandler; - public NumberFormatter oNumberFormatter; + private NumberFormatter oNumberFormatter; public static final String TBLRECORDSECTION = "Tbl_RecordSection"; public static final String TBLGROUPSECTION = "Tbl_GroupField"; public static final String RECORDSECTION = "RecordSection"; @@ -185,7 +185,7 @@ class ReportTextDocument extends com.sun.star.wizards.text.TextDocument implemen oFormHandler.insertHiddenControl(xNameAccess, xNamedForm, "RecordFieldNames", JavaTools.ArraytoString(CurDBMetaData.getRecordFieldNames())); } - public void getReportPageStyles() + private void getReportPageStyles() { try { @@ -228,7 +228,7 @@ class ReportTextDocument extends com.sun.star.wizards.text.TextDocument implemen } } - public boolean loadSectionsfromTemplate(String sTemplateUrl) + private boolean loadSectionsfromTemplate(String sTemplateUrl) { try { @@ -304,7 +304,7 @@ class ReportTextDocument extends com.sun.star.wizards.text.TextDocument implemen } } - public void updateTextSections(String[] SelGroupNames) + private void updateTextSections(String[] SelGroupNames) { String TableName; DBColumn OldDBColumn; @@ -322,7 +322,7 @@ class ReportTextDocument extends com.sun.star.wizards.text.TextDocument implemen } } - public void replaceFieldValueInGroupTable(DBColumn CurDBColumn, int TableIndex) + private void replaceFieldValueInGroupTable(DBColumn CurDBColumn, int TableIndex) { String TableName = TBLGROUPSECTION + (TableIndex + 1); // Note: for some reason the table might lose its name and has to be renamed therefore @@ -335,7 +335,7 @@ class ReportTextDocument extends com.sun.star.wizards.text.TextDocument implemen CurDBColumn.setCellFont(); } - public void insertColumnstoRecordTable() + private void insertColumnstoRecordTable() { int GroupCount = CurDBMetaData.GroupFieldNames.length; DBColumn CurDBColumn; @@ -420,7 +420,7 @@ class ReportTextDocument extends com.sun.star.wizards.text.TextDocument implemen DBColumnsVector.remove(iSelItemCount); } - public void removeGroupNamesofRecordTable(int GroupFieldCount) + private void removeGroupNamesofRecordTable(int GroupFieldCount) { int CurFieldCount = DBColumnsVector.size(); if (CurFieldCount > GroupFieldCount) @@ -432,7 +432,7 @@ class ReportTextDocument extends com.sun.star.wizards.text.TextDocument implemen } } - public void showCommonReportErrorBox(Exception exception) + private void showCommonReportErrorBox(Exception exception) { String SystemContentPath = JavaTools.convertfromURLNotation(ContentTemplatePath); String sMsgCurCommonReportError = JavaTools.replaceSubString(sMsgCommonReportError, SystemContentPath, "%PATH"); @@ -529,7 +529,7 @@ class ReportTextDocument extends com.sun.star.wizards.text.TextDocument implemen return null; } - public static FieldColumn[] removeFieldColumnByFieldName(String _FieldName, FieldColumn[] _FieldColumns) + private static FieldColumn[] removeFieldColumnByFieldName(String _FieldName, FieldColumn[] _FieldColumns) { try { diff --git a/wizards/com/sun/star/wizards/report/ReportTextImplementation.java b/wizards/com/sun/star/wizards/report/ReportTextImplementation.java index 3527d7ddd7b8..be202282f3fc 100644 --- a/wizards/com/sun/star/wizards/report/ReportTextImplementation.java +++ b/wizards/com/sun/star/wizards/report/ReportTextImplementation.java @@ -70,7 +70,7 @@ public class ReportTextImplementation extends ReportImplementationHelper impleme * We have to remove this!!! * @return */ - ReportTextDocument getDoc() + private ReportTextDocument getDoc() { if (m_aDoc == null) { @@ -125,9 +125,9 @@ public class ReportTextImplementation extends ReportImplementationHelper impleme { return getDoc().xWindowPeer; } - static String sMsgQueryCreationImpossible; - static String sReportFormNotExisting; - static String sMsgEndAutopilot; + private static String sMsgQueryCreationImpossible; + private static String sReportFormNotExisting; + private static String sMsgEndAutopilot; private void initialResources() { @@ -138,7 +138,7 @@ public class ReportTextImplementation extends ReportImplementationHelper impleme m_resource.getResText(UIConsts.RID_DB_COMMON + 14); } - public void addTextSectionCopies() + private void addTextSectionCopies() { m_aDoc.setLayoutSectionsVisible(false); XTextCursor xTextCursor = ReportTextDocument.createTextCursor(m_aDoc.xTextDocument.getText()); @@ -454,7 +454,7 @@ public class ReportTextImplementation extends ReportImplementationHelper impleme return m_aDoc.xFrame; } - public XMultiServiceFactory getDocumentServiceFactory() + private XMultiServiceFactory getDocumentServiceFactory() { return m_aDoc.xMSFDoc; } diff --git a/wizards/com/sun/star/wizards/report/ReportWizard.java b/wizards/com/sun/star/wizards/report/ReportWizard.java index 5a68433ee2fc..708e43bdc3a6 100644 --- a/wizards/com/sun/star/wizards/report/ReportWizard.java +++ b/wizards/com/sun/star/wizards/report/ReportWizard.java @@ -53,7 +53,7 @@ import java.util.Map; public class ReportWizard extends DatabaseObjectWizard implements XTextListener { - protected FieldSelection CurGroupFieldSelection; + private FieldSelection CurGroupFieldSelection; private SortingComponent CurSortingComponent; private TitlesComponent CurTitlesComponent; private CommandFieldSelection CurDBCommandFieldSelection; @@ -302,7 +302,7 @@ public class ReportWizard extends DatabaseObjectWizard implements XTextListener return bQueryCreated; } - public void buildSteps() + private void buildSteps() { // CurReportDocument.getDoc().xProgressBar.setValue(30); CurDBCommandFieldSelection = new CommandFieldSelection(this, m_reportDocument.getRecordParser(), 100, slblFields, slblSelFields, slblTables, true, 34330); @@ -353,7 +353,7 @@ public class ReportWizard extends DatabaseObjectWizard implements XTextListener xDialog.endExecute(); } - public void insertQueryRelatedSteps() + private void insertQueryRelatedSteps() { setRMItemLabels(m_oResource, UIConsts.RID_QUERY + 80); addRoadmap(); @@ -523,7 +523,7 @@ public class ReportWizard extends DatabaseObjectWizard implements XTextListener m_reportDocument.getRecordParser().dispose(); } - public boolean getReportResources(boolean bgetProgressResourcesOnly) + private boolean getReportResources(boolean bgetProgressResourcesOnly) { sMsgWizardName = super.m_oResource.getResText(UIConsts.RID_REPORT); if (!bgetProgressResourcesOnly) @@ -555,7 +555,7 @@ public class ReportWizard extends DatabaseObjectWizard implements XTextListener return sBlindTextNote; } - public void enableRoadmapItems(boolean _bEnabled) + private void enableRoadmapItems(boolean _bEnabled) { try { @@ -637,10 +637,10 @@ public class ReportWizard extends DatabaseObjectWizard implements XTextListener super.setStepEnabled(SOSORTPAGE, bdoenable); } - public class FieldSelectionListener implements com.sun.star.wizards.ui.XFieldSelectionListener + private class FieldSelectionListener implements com.sun.star.wizards.ui.XFieldSelectionListener { - protected int m_nID; + private int m_nID; public int getID() { |