summaryrefslogtreecommitdiff
path: root/swext
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-08-13 10:08:31 +0200
committerNoel Grandin <noel@peralex.com>2014-08-13 10:24:10 +0200
commit34bcf9b498bccb5c924f4cec850ff15d88df6f07 (patch)
tree4d9604ec8c3b73639338ec45a0618b5daa5cf0ed /swext
parent347926e8e57c1825261daa46c1886aa2ebf9571b (diff)
java: remove dead methods
found by UCDetector Change-Id: I219caa8e680dba5a395541a778df6144841c4dde
Diffstat (limited to 'swext')
-rw-r--r--swext/mediawiki/src/com/sun/star/wiki/Helper.java51
-rw-r--r--swext/mediawiki/src/com/sun/star/wiki/MainThreadDialogExecutor.java6
-rw-r--r--swext/mediawiki/src/com/sun/star/wiki/WikiArticle.java29
-rw-r--r--swext/mediawiki/src/com/sun/star/wiki/WikiDialog.java32
-rw-r--r--swext/mediawiki/src/com/sun/star/wiki/WikiEditorImpl.java21
5 files changed, 4 insertions, 135 deletions
diff --git a/swext/mediawiki/src/com/sun/star/wiki/Helper.java b/swext/mediawiki/src/com/sun/star/wiki/Helper.java
index ed78dae482da..2db73cea824e 100644
--- a/swext/mediawiki/src/com/sun/star/wiki/Helper.java
+++ b/swext/mediawiki/src/com/sun/star/wiki/Helper.java
@@ -372,41 +372,7 @@ public class Helper
}
- protected static XInputStream SaveHTMLTemp( XComponentContext xContext, String sArticle )
- {
- XInputStream xResult = null;
- if ( xContext != null )
- {
- try
- {
- Object oTempFile = xContext.getServiceManager().createInstanceWithContext( "com.sun.star.io.TempFile", xContext );
- XStream xStream = UnoRuntime.queryInterface( XStream.class, oTempFile );
- XSeekable xSeekable = UnoRuntime.queryInterface( XSeekable.class, oTempFile );
- if ( xStream != null && xSeekable != null )
- {
- XOutputStream xOutputStream = xStream.getOutputStream();
- XInputStream xInputStream = xStream.getInputStream();
- if ( xOutputStream != null && xInputStream != null )
- {
- String sHTML = sHTMLHeader.concat( sArticle );
- sHTML = sHTML.concat( sHTMLFooter );
- xOutputStream.writeBytes( sHTML.getBytes( "UTF-8" ) );
- // xOutputStream.closeOutput();
- xSeekable.seek( 0 );
-
- xResult = xInputStream;
- }
- }
- }
- catch ( Exception ex )
- {
- ex.printStackTrace();
- }
- }
-
- return xResult;
- }
protected static String CreateTempFile( XComponentContext xContext )
@@ -874,22 +840,7 @@ public class Helper
return null;
}
- protected static void SetControlPropInDialog( XDialog xDialog, String aControlName, String aPropName, Object aPropValue )
- {
- if ( xDialog != null && aControlName != null && aPropName != null && aPropValue != null )
- {
- try
- {
- XPropertySet xPropSet = GetSubControlPropSet( xDialog, aControlName );
- if ( xPropSet != null )
- xPropSet.setPropertyValue( aPropName, aPropValue );
- }
- catch ( com.sun.star.uno.Exception e )
- {
- e.printStackTrace();
- }
- }
- }
+
protected static String[] GetPasswordsForURLAndUser( XComponentContext xContext, String sURL, String sUserName )
{
diff --git a/swext/mediawiki/src/com/sun/star/wiki/MainThreadDialogExecutor.java b/swext/mediawiki/src/com/sun/star/wiki/MainThreadDialogExecutor.java
index b4cb658e7734..70af8831e505 100644
--- a/swext/mediawiki/src/com/sun/star/wiki/MainThreadDialogExecutor.java
+++ b/swext/mediawiki/src/com/sun/star/wiki/MainThreadDialogExecutor.java
@@ -42,11 +42,7 @@ public class MainThreadDialogExecutor implements XCallback
return GetCallback( xContext, aExecutor );
}
- static public boolean Execute( XComponentContext xContext, XDialog xDialog )
- {
- MainThreadDialogExecutor aExecutor = new MainThreadDialogExecutor( xDialog );
- return GetCallback( xContext, aExecutor );
- }
+
static public boolean Execute( XComponentContext xContext, XMessageBox xMessageBox )
{
diff --git a/swext/mediawiki/src/com/sun/star/wiki/WikiArticle.java b/swext/mediawiki/src/com/sun/star/wiki/WikiArticle.java
index b4c445edfda6..0b150125d9d8 100644
--- a/swext/mediawiki/src/com/sun/star/wiki/WikiArticle.java
+++ b/swext/mediawiki/src/com/sun/star/wiki/WikiArticle.java
@@ -111,10 +111,7 @@ public class WikiArticle
return m_sTitle;
}
- public String GetViewURL()
- {
- return m_aMainURI.toString() + "index.php?title=" + m_sTitle;
- }
+
private String getArticleWiki()
throws java.io.IOException, WikiCancelException
@@ -244,31 +241,7 @@ public class WikiArticle
return ( m_aHostConfig != null );
}
- protected void cleanHTML()
- {
- if ( m_sHTMLCode != null )
- {
- //Welcome to regex hell ;)
-
- //strip comments
- m_sHTMLCode = m_sHTMLCode.replaceAll("\\<![ \\r\\n\\t]*(--([^\\-]|[\\r\\n]|-[^\\-])*--[ \\r\\n\\t]*)\\>","");
- //strip edit section links
- m_sHTMLCode = m_sHTMLCode.replaceAll("\\<div class=\"editsection\".*?\\</div\\>","");
-
- //strip huge spaces
- m_sHTMLCode = m_sHTMLCode.replaceAll("\\<p\\>\\<br /\\>[ \r\n\t]*?\\</p\\>","");
-
- //strip toc
- m_sHTMLCode = m_sHTMLCode.replaceAll("\\<table.*id=\"toc\"(.|[\r\n])*?\\</table\\>","");
-
- //strip jump-to-nav
- m_sHTMLCode = m_sHTMLCode.replaceAll("\\<div id=\"jump-to-nav\".*?\\</div\\>","");
-
- //strip Javascript
- m_sHTMLCode = m_sHTMLCode.replaceAll("\\<script(.|[\r\n])*?\\</script\\>","");
- }
- }
protected boolean NotExist()
diff --git a/swext/mediawiki/src/com/sun/star/wiki/WikiDialog.java b/swext/mediawiki/src/com/sun/star/wiki/WikiDialog.java
index 6f1f6d61f13f..9470e962a38c 100644
--- a/swext/mediawiki/src/com/sun/star/wiki/WikiDialog.java
+++ b/swext/mediawiki/src/com/sun/star/wiki/WikiDialog.java
@@ -158,39 +158,7 @@ public class WikiDialog implements XDialogEventHandler, XTopWindowListener
return xPS;
}
- public static XDialog CreateSimpleDialog( XComponentContext xContext, String sURL, int nTitleID, String[] pControls, int[] pStringIDs )
- {
- XDialog xResult = null;
-
- if ( xContext != null && sURL != null && sURL.length() > 0 )
- {
- try
- {
- Object oDialogProvider = xContext.getServiceManager().createInstanceWithContext("com.sun.star.awt.DialogProvider2", xContext );
- XDialogProvider2 xDialogProvider = UnoRuntime.queryInterface( XDialogProvider2.class, oDialogProvider );
-
- if ( xDialogProvider != null )
- xResult = xDialogProvider.createDialog( sURL );
- if ( xResult != null )
- {
- SetTitle( xResult, Helper.GetLocalizedString( xContext, nTitleID ) );
- if ( pControls != null && pStringIDs != null && pControls.length == pStringIDs.length )
- {
- XControlContainer xControlContainer = UnoRuntime.queryInterface( XControlContainer.class, xResult );
- for ( int nInd = 0; nInd < pControls.length; nInd++ )
- GetPropSet( xControlContainer, pControls[nInd] ).setPropertyValue( "Label", new Integer( pStringIDs[nInd] ) );
- }
- }
- }
- catch (Exception ex)
- {
- ex.printStackTrace();
- }
- }
-
- return xResult;
- }
protected void InsertThrobber( int X, int Y, int Width, int Height )
{
diff --git a/swext/mediawiki/src/com/sun/star/wiki/WikiEditorImpl.java b/swext/mediawiki/src/com/sun/star/wiki/WikiEditorImpl.java
index f251fc485777..1152ea6486ea 100644
--- a/swext/mediawiki/src/com/sun/star/wiki/WikiEditorImpl.java
+++ b/swext/mediawiki/src/com/sun/star/wiki/WikiEditorImpl.java
@@ -72,18 +72,7 @@ public final class WikiEditorImpl extends WeakBase
m_aSettings = Settings.getSettings( m_xContext );
}
- public static XSingleComponentFactory __getComponentFactory( String sImplementationName )
- {
- XSingleComponentFactory xFactory = null;
-
- if ( sImplementationName.equals( m_implementationName ) )
- xFactory = Factory.createComponentFactory( WikiEditorImpl.class, m_serviceNames );
- else if ( sImplementationName.equals( WikiOptionsEventHandlerImpl.m_sImplementationName ) )
- xFactory = Factory.createComponentFactory( WikiOptionsEventHandlerImpl.class,
- WikiOptionsEventHandlerImpl.m_pServiceNames );
- return xFactory;
- }
// com.sun.star.lang.XServiceInfo:
public String getImplementationName()
@@ -193,15 +182,7 @@ public final class WikiEditorImpl extends WeakBase
callStatusListener( urlstring );
}
- public void callStatusListeners()
- {
- for (Iterator<String> iter = m_statusListeners.keySet().iterator(); iter.hasNext(); )
- {
- String uristring = iter.next();
- XStatusListener listener = m_statusListeners.get(uristring);
- callStatusListener( uristring );
- }
- }
+
private void callStatusListener( String uristring )
{