java: remove dead methods
found by UCDetector Change-Id: I219caa8e680dba5a395541a778df6144841c4dde
This commit is contained in:
@@ -67,61 +67,7 @@ public class DialogFactory
|
||||
return factory;
|
||||
}
|
||||
|
||||
public boolean showConfirmDialog(String title, String prompt)
|
||||
{
|
||||
final XDialog xDialog;
|
||||
try
|
||||
{
|
||||
xDialog = createConfirmDialog(title, prompt);
|
||||
}
|
||||
catch (com.sun.star.uno.Exception e)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// add an action listener to the button controls
|
||||
XControlContainer controls = UnoRuntime.queryInterface(XControlContainer.class, xDialog);
|
||||
|
||||
XButton okButton = UnoRuntime.queryInterface(
|
||||
XButton.class, controls.getControl("Ok"));
|
||||
okButton.setActionCommand("Ok");
|
||||
|
||||
XButton cancelButton = UnoRuntime.queryInterface(
|
||||
XButton.class, controls.getControl("Cancel"));
|
||||
cancelButton.setActionCommand("Cancel");
|
||||
|
||||
final ResultHolder resultHolder = new ResultHolder();
|
||||
|
||||
com.sun.star.awt.XActionListener listener =
|
||||
new com.sun.star.awt.XActionListener()
|
||||
{
|
||||
public void actionPerformed(com.sun.star.awt.ActionEvent e) {
|
||||
if (e.ActionCommand.equals("Cancel"))
|
||||
{
|
||||
resultHolder.setResult(Boolean.FALSE);
|
||||
xDialog.endExecute();
|
||||
}
|
||||
else
|
||||
{
|
||||
resultHolder.setResult(Boolean.TRUE);
|
||||
xDialog.endExecute();
|
||||
}
|
||||
}
|
||||
|
||||
public void disposing(EventObject o) {
|
||||
// does nothing
|
||||
}
|
||||
};
|
||||
|
||||
okButton.addActionListener(listener);
|
||||
cancelButton.addActionListener(listener);
|
||||
|
||||
xDialog.execute();
|
||||
|
||||
Boolean result = (Boolean)resultHolder.getResult();
|
||||
|
||||
return result == null ? false : result.booleanValue();
|
||||
}
|
||||
|
||||
public String showInputDialog(String title, String prompt)
|
||||
{
|
||||
|
@@ -61,20 +61,7 @@ public class ParcelContainer implements XNameAccess
|
||||
* @return <tt>true</tt> if has parent <tt>false</tt> otherwise
|
||||
*/
|
||||
public boolean isUnoPkg() { return isPkgContainer; }
|
||||
/**
|
||||
* Tests if this <tt>ParcelContainer</tt> has a parent
|
||||
* a parent.
|
||||
*
|
||||
* @return <tt>true</tt> if has parent <tt>false</tt> otherwise
|
||||
*/
|
||||
public boolean hasParent()
|
||||
{
|
||||
if ( parent == null )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns this <tt>ParcelContainer</tt>'s parent
|
||||
|
@@ -57,21 +57,9 @@ public class ParcelDescriptor {
|
||||
private String language = null;
|
||||
private Map<String,String> languagedepprops = new HashMap<String,String>(3);
|
||||
|
||||
public static synchronized void removeParcelDescriptor(File parent) {
|
||||
File path = new File(parent, PARCEL_DESCRIPTOR_NAME);
|
||||
PARCEL_DESCRIPTOR_MAP.remove(path);
|
||||
}
|
||||
|
||||
public static synchronized void renameParcelDescriptor(File oldFile, File newFile) {
|
||||
File oldPath = new File(oldFile, PARCEL_DESCRIPTOR_NAME);
|
||||
ParcelDescriptor pd = PARCEL_DESCRIPTOR_MAP.get(oldPath);
|
||||
if(pd != null) {
|
||||
PARCEL_DESCRIPTOR_MAP.remove(oldPath);
|
||||
File newPath = new File(newFile, PARCEL_DESCRIPTOR_NAME);
|
||||
pd.file = newPath;
|
||||
PARCEL_DESCRIPTOR_MAP.put(newPath, pd);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// returns the ParcelDescriptor in the corresponding directory
|
||||
// returns null if no ParcelDescriptor is found in the directory
|
||||
@@ -93,24 +81,7 @@ public class ParcelDescriptor {
|
||||
return pd;
|
||||
}
|
||||
|
||||
// returns a ParcelDescriptor for the corresponding directory
|
||||
// if no ParcelDescriptor exists, one is created
|
||||
public static synchronized ParcelDescriptor
|
||||
createParcelDescriptor(File parent) throws IOException {
|
||||
|
||||
ParcelDescriptor pd = getParcelDescriptor(parent);
|
||||
|
||||
if (pd == null) {
|
||||
if (parent == null || !parent.exists() || !parent.isDirectory()) {
|
||||
throw new IOException("Cannot create Parcel Descriptor");
|
||||
}
|
||||
|
||||
File path = new File(parent, PARCEL_DESCRIPTOR_NAME);
|
||||
pd = new ParcelDescriptor(path);
|
||||
PARCEL_DESCRIPTOR_MAP.put(path, pd);
|
||||
}
|
||||
return pd;
|
||||
}
|
||||
|
||||
public ParcelDescriptor() throws IOException {
|
||||
ByteArrayInputStream bis = null;
|
||||
@@ -172,12 +143,7 @@ public class ParcelDescriptor {
|
||||
fos.close();
|
||||
}
|
||||
|
||||
public void write() throws IOException {
|
||||
if (file == null)
|
||||
throw new FileNotFoundException("No file specified");
|
||||
|
||||
write(file);
|
||||
}
|
||||
|
||||
public void write(OutputStream out) throws IOException {
|
||||
XMLParserFactory.getParser().write(document, out);
|
||||
@@ -301,10 +267,7 @@ public class ParcelDescriptor {
|
||||
return languagedepprops.get(name);
|
||||
}
|
||||
|
||||
public void setLanguageProperty(String name, String value) {
|
||||
languagedepprops.put(name, value);
|
||||
setScriptEntries(getScriptEntries());
|
||||
}
|
||||
|
||||
|
||||
private void initLanguageProperties() {
|
||||
NodeList nl = document.getElementsByTagName("languagedepprops");
|
||||
|
@@ -46,9 +46,7 @@ public class XMLParserFactory {
|
||||
return parser;
|
||||
}
|
||||
|
||||
public static void setParser(XMLParser p) {
|
||||
parser = p;
|
||||
}
|
||||
|
||||
|
||||
public static void setOfficeDTDURL(String url) {
|
||||
officedtdurl = url;
|
||||
|
@@ -135,19 +135,7 @@ public class ScriptDescriptor
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Adds the given array of <code>Class</code> to the list of argument types
|
||||
* stored in this ScriptDescriptor
|
||||
*
|
||||
* @param classes The feature to be added to the ArgumentTypes attribute
|
||||
*/
|
||||
public synchronized void addArgumentTypes( Class<?>[] classes )
|
||||
{
|
||||
for ( int i = 0; i < classes.length; i++ )
|
||||
{
|
||||
addArgumentType( classes[ i ] );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user