From 7557f23b31dcfb4d86c122bb34d9675c0db9a694 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 10 Dec 2014 15:36:24 +0200 Subject: 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 Reviewed-by: Noel Grandin --- unotest/source/java/org/openoffice/test/tools/OfficeDocument.java | 8 ++++---- .../source/java/org/openoffice/test/tools/OfficeDocumentView.java | 4 ++-- .../java/org/openoffice/test/tools/SpreadsheetDocument.java | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) (limited to 'unotest') diff --git a/unotest/source/java/org/openoffice/test/tools/OfficeDocument.java b/unotest/source/java/org/openoffice/test/tools/OfficeDocument.java index 4d5630824e90..fe3035fcefa1 100644 --- a/unotest/source/java/org/openoffice/test/tools/OfficeDocument.java +++ b/unotest/source/java/org/openoffice/test/tools/OfficeDocument.java @@ -61,7 +61,7 @@ public class OfficeDocument } /* ------------------------------------------------------------------ */ - protected static XComponent implLoadAsComponent( XMultiServiceFactory orb, String documentOrFactoryURL, final PropertyValue[] i_args ) throws com.sun.star.uno.Exception + private static XComponent implLoadAsComponent( XMultiServiceFactory orb, String documentOrFactoryURL, final PropertyValue[] i_args ) throws com.sun.star.uno.Exception { XComponentLoader aLoader = UnoRuntime.queryInterface( XComponentLoader.class, orb.createInstance( "com.sun.star.frame.Desktop" ) ); @@ -147,7 +147,7 @@ public class OfficeDocument } /* ------------------------------------------------------------------ */ - public T query( Class aInterfaceClass ) + private T query( Class aInterfaceClass ) { return UnoRuntime.queryInterface( aInterfaceClass, m_documentComponent ); } @@ -207,7 +207,7 @@ public class OfficeDocument /* ------------------------------------------------------------------ */ /** returns a URL which can be used to create a document of a certain type */ - public static String getDocumentFactoryURL( DocumentType eType ) + private static String getDocumentFactoryURL( DocumentType eType ) { if ( eType == DocumentType.WRITER ) return "private:factory/swriter"; @@ -227,7 +227,7 @@ public class OfficeDocument /* ------------------------------------------------------------------ */ /** classifies a document */ - public DocumentType classify( ) + private DocumentType classify( ) { XServiceInfo xSI = UnoRuntime.queryInterface( XServiceInfo.class, m_documentComponent ); diff --git a/unotest/source/java/org/openoffice/test/tools/OfficeDocumentView.java b/unotest/source/java/org/openoffice/test/tools/OfficeDocumentView.java index e309504a42c0..fee1da989688 100644 --- a/unotest/source/java/org/openoffice/test/tools/OfficeDocumentView.java +++ b/unotest/source/java/org/openoffice/test/tools/OfficeDocumentView.java @@ -68,7 +68,7 @@ public class OfficeDocumentView @return the dispatcher for the URL in question */ - public XDispatch getDispatcher( URL[] aURL ) throws com.sun.star.uno.Exception + private XDispatch getDispatcher( URL[] aURL ) throws com.sun.star.uno.Exception { XDispatch xReturn = null; @@ -109,7 +109,7 @@ public class OfficeDocumentView } /* ------------------------------------------------------------------ */ - public boolean dispatch( final String i_url, final PropertyValue[] i_arguments ) throws com.sun.star.uno.Exception + private boolean dispatch( final String i_url, final PropertyValue[] i_arguments ) throws com.sun.star.uno.Exception { URL[] completeURL = new URL[] { new URL() }; completeURL[0].Complete = i_url; diff --git a/unotest/source/java/org/openoffice/test/tools/SpreadsheetDocument.java b/unotest/source/java/org/openoffice/test/tools/SpreadsheetDocument.java index 13a82db8ecfb..7db4291034b4 100644 --- a/unotest/source/java/org/openoffice/test/tools/SpreadsheetDocument.java +++ b/unotest/source/java/org/openoffice/test/tools/SpreadsheetDocument.java @@ -44,7 +44,7 @@ public class SpreadsheetDocument extends OfficeDocument /* ------------------------------------------------------------------ */ /** returns the sheets collection */ - public XSpreadsheets getSheets() + private XSpreadsheets getSheets() { XSpreadsheetDocument spreadsheetDoc = UnoRuntime.queryInterface( XSpreadsheetDocument.class, getDocument() ); return spreadsheetDoc.getSheets(); -- cgit