diff options
author | Noel Grandin <noel@peralex.com> | 2014-08-12 14:00:54 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-08-19 14:57:16 +0200 |
commit | be1bb7b1ccee28be616b89cc95e97d656e78bbe3 (patch) | |
tree | d67d16a68d1469b5096a27c743c4b0326a0c0ebe /swext | |
parent | 56ef5533fc1bce2134721ae64d4d6c18a3526a7a (diff) |
java: use Boolean.valueOf instead of instantiating Boolean objects
Change-Id: Ie41d6b0170a035a694dd270c311a137fd1810e74
Diffstat (limited to 'swext')
5 files changed, 14 insertions, 14 deletions
diff --git a/swext/mediawiki/src/com/sun/star/wiki/Helper.java b/swext/mediawiki/src/com/sun/star/wiki/Helper.java index f2ab089ac017..50f1ece057e3 100644 --- a/swext/mediawiki/src/com/sun/star/wiki/Helper.java +++ b/swext/mediawiki/src/com/sun/star/wiki/Helper.java @@ -220,7 +220,7 @@ public class Helper try { XNameAccess xAccess = Helper.GetConfigNameAccess( xContext, "org.openoffice.Office.Custom.WikiExtension/Settings" ); - m_bShowInBrowser = new Boolean( AnyConverter.toBoolean( xAccess.getByName( "PreselectShowBrowser" ) ) ); + m_bShowInBrowser = Boolean.valueOf( AnyConverter.toBoolean( xAccess.getByName( "PreselectShowBrowser" ) ) ); } catch( com.sun.star.uno.Exception e ) { @@ -235,10 +235,10 @@ public class Helper { try { - m_bShowInBrowser = new Boolean( bValue ); + m_bShowInBrowser = Boolean.valueOf( bValue ); XPropertySet xProps = Helper.GetConfigProps( xContext, "org.openoffice.Office.Custom.WikiExtension/Settings" ); - xProps.setPropertyValue( "PreselectShowBrowser", new Boolean( bValue ) ); + xProps.setPropertyValue( "PreselectShowBrowser", Boolean.valueOf( bValue ) ); XChangesBatch xBatch = UnoRuntime.queryInterface( XChangesBatch.class, xProps ); if ( xBatch != null ) xBatch.commitChanges(); diff --git a/swext/mediawiki/src/com/sun/star/wiki/WikiEditSettingDialog.java b/swext/mediawiki/src/com/sun/star/wiki/WikiEditSettingDialog.java index be60ba30d8d8..fd3093df40a3 100644 --- a/swext/mediawiki/src/com/sun/star/wiki/WikiEditSettingDialog.java +++ b/swext/mediawiki/src/com/sun/star/wiki/WikiEditSettingDialog.java @@ -130,15 +130,15 @@ public class WikiEditSettingDialog extends WikiDialog try { - GetPropSet( "UsernameField" ).setPropertyValue( "Enabled", new Boolean( bEnable ) ); - GetPropSet( "PasswordField" ).setPropertyValue( "Enabled", new Boolean( bEnable ) ); - GetPropSet( "OkButton" ).setPropertyValue( "Enabled", new Boolean( bEnable ) ); - GetPropSet( "HelpButton" ).setPropertyValue( "Enabled", new Boolean( bEnable ) ); + GetPropSet( "UsernameField" ).setPropertyValue( "Enabled", Boolean.valueOf( bEnable ) ); + GetPropSet( "PasswordField" ).setPropertyValue( "Enabled", Boolean.valueOf( bEnable ) ); + GetPropSet( "OkButton" ).setPropertyValue( "Enabled", Boolean.valueOf( bEnable ) ); + GetPropSet( "HelpButton" ).setPropertyValue( "Enabled", Boolean.valueOf( bEnable ) ); if ( bEnable ) { - GetPropSet( "UrlField" ).setPropertyValue( "Enabled", new Boolean( m_bAllowURLChange ) ); - GetPropSet( "SaveBox" ).setPropertyValue( "Enabled", new Boolean( Helper.PasswordStoringIsAllowed( m_xContext ) ) ); + GetPropSet( "UrlField" ).setPropertyValue( "Enabled", Boolean.valueOf( m_bAllowURLChange ) ); + GetPropSet( "SaveBox" ).setPropertyValue( "Enabled", Boolean.valueOf( Helper.PasswordStoringIsAllowed( m_xContext ) ) ); if ( m_bAllowURLChange ) SetFocusTo( "UrlField" ); else @@ -181,7 +181,7 @@ public class WikiEditSettingDialog extends WikiDialog try { xSaveCheck.setPropertyValue( "State", new Short( bInitSaveCheckBox ? (short)1 : (short)0 ) ); - xSaveCheck.setPropertyValue( "Enabled", new Boolean( Helper.PasswordStoringIsAllowed( xContext ) ) ); + xSaveCheck.setPropertyValue( "Enabled", Boolean.valueOf( Helper.PasswordStoringIsAllowed( xContext ) ) ); } catch( Exception e ) { diff --git a/swext/mediawiki/src/com/sun/star/wiki/WikiEditorImpl.java b/swext/mediawiki/src/com/sun/star/wiki/WikiEditorImpl.java index 344dff27f4ef..22b344eea765 100644 --- a/swext/mediawiki/src/com/sun/star/wiki/WikiEditorImpl.java +++ b/swext/mediawiki/src/com/sun/star/wiki/WikiEditorImpl.java @@ -289,7 +289,7 @@ public final class WikiEditorImpl extends WeakBase lProperties[0].Value = m_aFilterName; lProperties[1] = new PropertyValue(); lProperties[1].Name = "Overwrite"; - lProperties[1].Value = new Boolean( true ); + lProperties[1].Value = Boolean.TRUE; sTemp2Url = Helper.CreateTempFile( m_xContext ); diff --git a/swext/mediawiki/src/com/sun/star/wiki/WikiOptionsEventHandlerImpl.java b/swext/mediawiki/src/com/sun/star/wiki/WikiOptionsEventHandlerImpl.java index b44e0d9d7c44..c88633b70b74 100644 --- a/swext/mediawiki/src/com/sun/star/wiki/WikiOptionsEventHandlerImpl.java +++ b/swext/mediawiki/src/com/sun/star/wiki/WikiOptionsEventHandlerImpl.java @@ -102,7 +102,7 @@ public final class WikiOptionsEventHandlerImpl extends WeakBase short [] pSel = (short []) xListProps.getPropertyValue( "SelectedItems" ); XPropertySet xEditProps = GetPropSet( "EditButton" ); XPropertySet xRemoveProps = GetPropSet( "RemoveButton" ); - Boolean bState = new Boolean( pSel.length != 0 ); + Boolean bState = Boolean.valueOf( pSel.length != 0 ); xEditProps.setPropertyValue( "Enabled", bState ); xRemoveProps.setPropertyValue( "Enabled", bState ); diff --git a/swext/mediawiki/src/com/sun/star/wiki/WikiPropDialog.java b/swext/mediawiki/src/com/sun/star/wiki/WikiPropDialog.java index 650348737ab1..1d6abff6948f 100644 --- a/swext/mediawiki/src/com/sun/star/wiki/WikiPropDialog.java +++ b/swext/mediawiki/src/com/sun/star/wiki/WikiPropDialog.java @@ -219,7 +219,7 @@ public class WikiPropDialog extends WikiDialog{ "AddButton" }; for ( int nInd = 0; nInd < pControls.length; nInd++ ) - GetPropSet( pControls[nInd] ).setPropertyValue( "Enabled", new Boolean( bEnable ) ); + GetPropSet( pControls[nInd] ).setPropertyValue( "Enabled", Boolean.valueOf( bEnable ) ); if ( bEnable ) { @@ -228,7 +228,7 @@ public class WikiPropDialog extends WikiDialog{ } else { - GetPropSet( "SendButton" ).setPropertyValue( "Enabled", new Boolean( bEnable ) ); + GetPropSet( "SendButton" ).setPropertyValue( "Enabled", Boolean.valueOf( bEnable ) ); SetFocusTo( "CancelButton" ); } } |