Kaydet (Commit) 2922a967 authored tarafından Noel Grandin's avatar Noel Grandin

java: Avoid naming non-fields with the prefix m_

found by PMD

Change-Id: I5955cfc9c4d777496a2e8e4b2c422a51764a8bc1
üst 188af1e5
......@@ -243,10 +243,10 @@ public class RowSet extends TestCase
}
void testPosition(XResultSet m_resultSet, XRow m_row, int expectedValue, String location) throws SQLException
void testPosition(XResultSet resultSet, XRow row, int expectedValue, String location) throws SQLException
{
final int val = m_row.getInt(1);
final int pos = m_resultSet.getRow();
final int val = row.getInt(1);
final int pos = resultSet.getRow();
assertTrue(location + ": value/position do not match: " + pos + " (pos) != " + val + " (val)", val == pos);
assertTrue(location + ": value/position are not as expected: " + val + " (val) != " + expectedValue + " (expected)", val == expectedValue);
}
......
......@@ -238,12 +238,12 @@ public class Helper {
ArrayList<String> vReturn = new ArrayList<String>();
ArrayList<String> placeHolders = new ArrayList<String>();
Iterator<String> m_params = m_param.keySet().iterator();
Iterator<String> paramsIter = m_param.keySet().iterator();
String placeHolder = (String)m_param.get("placeHolder");
// get all place holders from typeDetection.csv
while (m_params.hasNext()){
String holderKey = m_params.next();
while (paramsIter.hasNext()){
String holderKey = paramsIter.next();
if (holderKey.startsWith(placeHolder)){
placeHolders.add(holderKey);
}
......
......@@ -81,11 +81,11 @@ public class AcceleratorsConfigurationTest
String sConfigPath = "org.openoffice.Office.Accelerators";
boolean bReadOnly = false;
XNameAccess m_xConfig2 = openConfig(sConfigPath, bReadOnly);
if (m_xConfig2 != null)
XNameAccess xConfig2 = openConfig(sConfigPath, bReadOnly);
if (xConfig2 != null)
{
m_xPrimaryKeys = UnoRuntime.queryInterface(XNameAccess.class, m_xConfig2.getByName("PrimaryKeys"));
m_xSecondaryKeys = UnoRuntime.queryInterface(XNameAccess.class, m_xConfig2.getByName("SecondaryKeys"));
m_xPrimaryKeys = UnoRuntime.queryInterface(XNameAccess.class, xConfig2.getByName("PrimaryKeys"));
m_xSecondaryKeys = UnoRuntime.queryInterface(XNameAccess.class, xConfig2.getByName("SecondaryKeys"));
}
}
......
......@@ -473,14 +473,14 @@ public class CheckXComponentLoader
* all possible exceptions and try to leave the office without any forgotten
* but opened documents.
*/
private void loadURL(XComponentLoader m_xLoader, int nRequiredResult,
private void loadURL(XComponentLoader xLoader, int nRequiredResult,
String sURL, String sTarget, int nFlags,
PropertyValue[] lProps) {
int nResult = RESULT_EMPTY_DOC;
XComponent xDoc = null;
try {
xDoc = m_xLoader.loadComponentFromURL(sURL, sTarget, nFlags,
xDoc = xLoader.loadComponentFromURL(sURL, sTarget, nFlags,
lProps);
if (xDoc != null) {
......
......@@ -70,10 +70,10 @@ public class UnoDialogSample2 extends UnoDialogSample {
try {
m_oUnoObject = _oUnoObject;
Object o = m_xMCF.createInstanceWithContext("com.sun.star.beans.Introspection", m_xContext);
XIntrospection m_xIntrospection = UnoRuntime.queryInterface(XIntrospection.class, o );
XIntrospection xIntrospection = UnoRuntime.queryInterface(XIntrospection.class, o );
// the variable m_xIntrospectionAccess offers functionality to access all methods and properties
// of a variable
m_xIntrospectionAccess = m_xIntrospection.inspect(_oUnoObject);
m_xIntrospectionAccess = xIntrospection.inspect(_oUnoObject);
} catch (com.sun.star.uno.Exception ex) {
ex.printStackTrace();
}
......
......@@ -180,21 +180,21 @@ public class PRNCompare
// TODO: return a real filename, due to the fact we don't know how much files are created, maybe better to return a list
ArrayList<String> m_aFileList = new ArrayList<String>();
ArrayList<String> aFileList = new ArrayList<String>();
for (int i=1;i<9999;i++)
{
String sNewJPEGFilename = sJPGFilename.replace(sGS_PageOutput, StringHelper.createValueString(i, 4));
if (FileHelper.exists(sNewJPEGFilename))
{
m_aFileList.add(sNewJPEGFilename); // as long as the files exist, fill the array
aFileList.add(sNewJPEGFilename); // as long as the files exist, fill the array
}
else
{
break; // stop file check
}
}
String[] aList = new String[m_aFileList.size()];
aList = m_aFileList.toArray(aList);
String[] aList = new String[aFileList.size()];
aList = aFileList.toArray(aList);
return aList; // sNewJPEGFilename;
}
......
......@@ -310,15 +310,15 @@ public class IniFile implements Enumeration<String>
public String getValue(String _sSection, String _sKey)
{
String sValue = "";
int m_nCurrentPosition = findKey(_sSection, _sKey);
if (m_nCurrentPosition == -1)
int nCurrentPosition = findKey(_sSection, _sKey);
if (nCurrentPosition == -1)
{
// Section not found, therefore the value can't exist
return "";
}
// m_sOldKey = _sKey;
sValue = getValue(m_nCurrentPosition);
sValue = getValue(nCurrentPosition);
return sValue;
}
......
......@@ -52,9 +52,9 @@ public class SOImageService implements ImageService
}
final XMultiComponentFactory m_xMCF = xCompContext.getServiceManager();
final XMultiComponentFactory xMCF = xCompContext.getServiceManager();
m_xGraphicProvider = UnoRuntime.queryInterface(XGraphicProvider.class,
m_xMCF.createInstanceWithContext("com.sun.star.graphic.GraphicProvider", xCompContext));
xMCF.createInstanceWithContext("com.sun.star.graphic.GraphicProvider", xCompContext));
if (m_xGraphicProvider == null)
{
......
......@@ -81,8 +81,8 @@ public class CheckXCellRangesQuery /* extends ComplexTestCase */ {
new Type(XSpreadsheet.class),oIndexSheets.getByIndex(0));
// get the first sheet name
XNamed m_xNamed = (XNamed) AnyConverter.toObject(new Type(XNamed.class),m_xSpreadSheet);
sSheetName = m_xNamed.getName();
XNamed xNamed = (XNamed) AnyConverter.toObject(new Type(XNamed.class),m_xSpreadSheet);
sSheetName = xNamed.getName();
// get the cell
System.out.println("Getting a cell from sheet") ;
......
......@@ -42,10 +42,10 @@ public class WriterHelper {
private XMultiServiceFactory m_xMSF = null;
/** Creates a new instance of WriterHelper
* @param m_xMSF The MultiServiceFactory gained from the office
* @param xMSF The MultiServiceFactory gained from the office
*/
public WriterHelper(XMultiServiceFactory m_xMSF) {
this.m_xMSF = m_xMSF;
public WriterHelper(XMultiServiceFactory xMSF) {
this.m_xMSF = xMSF;
}
/** Opens an empty document
......
......@@ -148,7 +148,7 @@ public class ReportLayouter
8, sOrientationHeader, 95, 148, Integer.valueOf(ReportWizard.SOTEMPLATEPAGE), Short.valueOf(curtabindex++), 74
});
short m_nLandscapeState = CurReportDocument.getDefaultPageOrientation() == SOOPTLANDSCAPE ? (short) 1 : 0;
short nLandscapeState = CurReportDocument.getDefaultPageOrientation() == SOOPTLANDSCAPE ? (short) 1 : 0;
CurUnoDialog.insertRadioButton("optLandscape", SOOPTLANDSCAPE, new ItemListenerImpl(),
new String[]
{
......@@ -156,10 +156,10 @@ public class ReportLayouter
},
new Object[]
{
10, "HID:WIZARDS_HID_DLGREPORT_4_LANDSCAPE", sOrientHorizontal, 101, 158, Short.valueOf(m_nLandscapeState), Integer.valueOf(ReportWizard.SOTEMPLATEPAGE), Short.valueOf(curtabindex++), 60
10, "HID:WIZARDS_HID_DLGREPORT_4_LANDSCAPE", sOrientHorizontal, 101, 158, Short.valueOf(nLandscapeState), Integer.valueOf(ReportWizard.SOTEMPLATEPAGE), Short.valueOf(curtabindex++), 60
});
short m_nPortraitState = CurReportDocument.getDefaultPageOrientation() == SOOPTPORTRAIT ? (short) 1 : (short) 0;
short nPortraitState = CurReportDocument.getDefaultPageOrientation() == SOOPTPORTRAIT ? (short) 1 : (short) 0;
CurUnoDialog.insertRadioButton("optPortrait", SOOPTPORTRAIT, new ItemListenerImpl(),
new String[]
{
......@@ -167,7 +167,7 @@ public class ReportLayouter
},
new Object[]
{
10, "HID:WIZARDS_HID_DLGREPORT_4_PORTRAIT", sOrientVertical, 101, 171, Short.valueOf(m_nPortraitState), Integer.valueOf(ReportWizard.SOTEMPLATEPAGE), Short.valueOf(curtabindex++), 60
10, "HID:WIZARDS_HID_DLGREPORT_4_PORTRAIT", sOrientVertical, 101, 171, Short.valueOf(nPortraitState), Integer.valueOf(ReportWizard.SOTEMPLATEPAGE), Short.valueOf(curtabindex++), 60
});
aOrientationImage = CurUnoDialog.insertControlModel("com.sun.star.awt.UnoControlImageControlModel", "imgOrientation",
......@@ -190,7 +190,7 @@ public class ReportLayouter
{
34, sNote, Boolean.TRUE, 205, 148, Integer.valueOf(ReportWizard.SOTEMPLATEPAGE), 99
});
if (m_nLandscapeState == 1)
if (nLandscapeState == 1)
{
CurUnoDialog.getPeerConfiguration().setImageUrl(aOrientationImage, 1002, 1003);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment