diff options
author | Noel Grandin <noel@peralex.com> | 2014-08-08 12:44:57 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-08-13 08:49:23 +0200 |
commit | 68cd011c907d00493bf2bfde531c1e244819596b (patch) | |
tree | 0225318c908b00faaa701a19aaf7aa567c3582a0 /xmerge | |
parent | 70f56bc22fe952c75ec714e05e1bb5296491a36a (diff) |
java: reduce scope, make some methods private
found by UCDetector
Change-Id: Ib1425edde146193a65c242dc159b7e3fbf0e4a2e
Diffstat (limited to 'xmerge')
15 files changed, 26 insertions, 26 deletions
diff --git a/xmerge/source/bridge/java/XMergeBridge.java b/xmerge/source/bridge/java/XMergeBridge.java index 888308d31a47..72771f5b56ab 100644 --- a/xmerge/source/bridge/java/XMergeBridge.java +++ b/xmerge/source/bridge/java/XMergeBridge.java @@ -114,7 +114,7 @@ public class XMergeBridge { return( typeReturn ); } - String getFileName(String origName) + private String getFileName(String origName) { String name; if (origName !=null) @@ -300,7 +300,7 @@ public class XMergeBridge { return tmp; } - public String needsMask(String origString){ + private String needsMask(String origString){ if (origString.contains("&")) { origString = origString.replace("&","&"); } @@ -411,7 +411,7 @@ public class XMergeBridge { - public void convert (com.sun.star.io.XInputStream xml,com.sun.star.io.XOutputStream device, + private void convert (com.sun.star.io.XInputStream xml,com.sun.star.io.XOutputStream device, boolean convertFromOffice,String pluginUrl,String FileName,String offMime,String sdMime) throws com.sun.star.uno.RuntimeException, IOException { String jarName = pluginUrl; diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/Convert.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/Convert.java index a67faf2956ed..c3a12fef4cbb 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/Convert.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/Convert.java @@ -147,7 +147,7 @@ public class Convert implements Cloneable { * <code>addInputStream</code> method to accept input for the next * conversion. */ - public void reset() { + private void reset() { inputCD.reset(); } diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/dom/DOMDocument.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/dom/DOMDocument.java index d9b4c46047c6..37480d7cbd61 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/dom/DOMDocument.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/dom/DOMDocument.java @@ -76,7 +76,7 @@ public class DOMDocument * * @return file extension of the <code>Document</code>. */ - protected String getFileExtension() { + private String getFileExtension() { return fileExt; } diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/palm/PalmDB.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/palm/PalmDB.java index 18356e0fe1fc..fa6828ae78e6 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/palm/PalmDB.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/palm/PalmDB.java @@ -177,7 +177,7 @@ public final class PalmDB { * @param version The PDB header version. * @param attribute The PDB header attribute. */ - public void setAttributes (int creatorID, int typeID, int version, short attribute) { + private void setAttributes (int creatorID, int typeID, int version, short attribute) { this.creatorID = creatorID; this.typeID = typeID; this.version = version; diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/ParaStyle.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/ParaStyle.java index b8527d0332db..4de588c4e545 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/ParaStyle.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/ParaStyle.java @@ -324,7 +324,7 @@ public class ParaStyle extends Style implements Cloneable { * @param attr The attribute to set. * @param value The attribute value to set. */ - public void setAttribute(String attr, String value) { + private void setAttribute(String attr, String value) { for (int i = 0; i < NR_PROPERTIES; i++) { if (attr.equals(attrName[i])) { setAttribute(i, value); @@ -369,7 +369,7 @@ public class ParaStyle extends Style implements Cloneable { * @param attr The attribute index to set. * @param value The attribute value to set. */ - public void setAttribute(int attr, String value) { + private void setAttribute(int attr, String value) { isSet[attr] = true; try { this.value[attr] = (((conversionAlgorithm)algor[attr].newInstance())).I(value); @@ -556,7 +556,7 @@ public class ParaStyle extends Style implements Cloneable { * @param node The <code>Node</code> to add <code>Style</code> * attributes. */ - public void writeAttributes(Element node) { + private void writeAttributes(Element node) { for (int i = 0; i <= TEXT_INDENT; i++) { if (isSet[i]) { double temp = value[i] / 100.0; diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/TextStyle.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/TextStyle.java index 26b923a4980e..2303bb3bb2c1 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/TextStyle.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/TextStyle.java @@ -571,7 +571,7 @@ public class TextStyle extends Style implements Cloneable { * @param node The <code>Node</code> to add <code>Style</code> * attributes. */ - public void writeAttributes(Element node) { + private void writeAttributes(Element node) { if ((mask & BOLD) != 0) if ((values & BOLD) != 0) diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/BookSettings.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/BookSettings.java index 255d8bfaeaa5..bd47df2bb70b 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/BookSettings.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/BookSettings.java @@ -152,7 +152,7 @@ public class BookSettings implements OfficeConstants { * @param name xml name of the attribute to set * @param value String value fo the attribute */ - public void addAttribute(String name, String value) { + private void addAttribute(String name, String value) { if(name.equals("ActiveTable")) { activeSheet = value; @@ -167,7 +167,7 @@ public class BookSettings implements OfficeConstants { * * @param root XML Node to read from */ - public void readNode(Node root) { + private void readNode(Node root) { if (root.hasChildNodes()) { diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/CellStyle.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/CellStyle.java index 5f51f618ccbd..e907dd481822 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/CellStyle.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/CellStyle.java @@ -373,7 +373,7 @@ public class CellStyle extends Style implements Cloneable { * @param node The <code>Node</code> to add <code>Style</code> * attributes. */ - public void writeAttributes(Element node) { + private void writeAttributes(Element node) { if (fmt.getAlign()==Format.RIGHT_ALIGN) node.setAttribute("fo:text-align", "end"); diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/ColumnStyle.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/ColumnStyle.java index 8122562932c2..0adb79bd46c2 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/ColumnStyle.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/ColumnStyle.java @@ -252,7 +252,7 @@ public class ColumnStyle extends Style implements Cloneable { * @param node The <code>Node</code> to add <code>Style</code> * attributes. */ - public void writeAttributes(Element node) { + private void writeAttributes(Element node) { if(colWidth!=0) { String width = TwipsConverter.twips2cm(colWidth) + "cm"; diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/NameDefinition.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/NameDefinition.java index 2dd8eefe10d8..7589143cc57f 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/NameDefinition.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/NameDefinition.java @@ -165,7 +165,7 @@ public class NameDefinition implements OfficeConstants { * * @param root XML Node to read from */ - public void readNode(Node root) { + private void readNode(Node root) { String nodeName = root.getNodeName(); NamedNodeMap cellAtt = root.getAttributes(); diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/RowStyle.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/RowStyle.java index 1e4ca4cd375d..bae24b5a8d4c 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/RowStyle.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/RowStyle.java @@ -252,7 +252,7 @@ public class RowStyle extends Style implements Cloneable { * @param node The <code>Node</code> to add <code>Style</code> * attributes. */ - public void writeAttributes(Element node) { + private void writeAttributes(Element node) { if(rowHeight!=0) { String height = TwipsConverter.twips2cm(rowHeight) + "cm"; diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SheetSettings.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SheetSettings.java index 05b078cd2958..11f938bb41f2 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SheetSettings.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SheetSettings.java @@ -281,7 +281,7 @@ public class SheetSettings implements OfficeConstants { * @param name xml name of the attribute to set * @param value String value fo the attribute */ - public void addAttribute(String name, String value) { + private void addAttribute(String name, String value) { if(name.equals("CursorPositionX")) { cursorX = Integer.parseInt(value); @@ -312,7 +312,7 @@ public class SheetSettings implements OfficeConstants { * * @param root XML Node to read from */ - public void readNode(Node root) { + private void readNode(Node root) { NamedNodeMap sheetAtt = root.getAttributes(); diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/NodeIterator.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/NodeIterator.java index b264b5f9436c..5a27ff05fa71 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/NodeIterator.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/NodeIterator.java @@ -256,7 +256,7 @@ public abstract class NodeIterator implements Iterator { * * @return true if attributes are equal, false otherwise. */ - protected boolean attributesEqual(Node node1, Node node2) { + private boolean attributesEqual(Node node1, Node node2) { boolean equal = false; String nodeName = node1.getNodeName(); diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/merge/DocumentMerge.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/merge/DocumentMerge.java index cd939b799ddd..c0f486d83476 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/merge/DocumentMerge.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/merge/DocumentMerge.java @@ -188,7 +188,7 @@ public class DocumentMerge implements MergeAlgorithm { * @param oldNode <code>Node</code> to append after. * @param newNode <code>Node</code> to append. */ - protected void appendNode(Node oldNode, Node newNode) { + private void appendNode(Node oldNode, Node newNode) { Node clonedNode = XmlUtil.deepClone(oldNode, newNode); Node parent = oldNode.getParentNode(); parent.appendChild(clonedNode); @@ -201,7 +201,7 @@ public class DocumentMerge implements MergeAlgorithm { * @param oldNode <code>Node</code> to insert before. * @param newNode <code>Node</code> to insert. */ - protected void insertNode(Node oldNode, Node newNode) { + private void insertNode(Node oldNode, Node newNode) { Node clonedNode = XmlUtil.deepClone(oldNode, newNode); Node parent = oldNode.getParentNode(); parent.insertBefore(clonedNode, oldNode); @@ -214,7 +214,7 @@ public class DocumentMerge implements MergeAlgorithm { * @param currElem <code>Element</code> to be replaced. * @param newElem <code>Element</code> to replace. */ - protected void replaceElement(Element currElem, Element newElem) { + private void replaceElement(Element currElem, Element newElem) { Node clonedNode = XmlUtil.deepClone(currElem, newElem); Node parent = currElem.getParentNode(); diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/util/registry/ConverterInfoMgr.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/util/registry/ConverterInfoMgr.java index adf2be978633..bfa23666ee82 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/util/registry/ConverterInfoMgr.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/util/registry/ConverterInfoMgr.java @@ -44,7 +44,7 @@ public final class ConverterInfoMgr { * @throws RegistryException If the <code>ConverterInfo</code> * is not valid. */ - public static void addPlugIn(ConverterInfo ci) throws RegistryException { + private static void addPlugIn(ConverterInfo ci) throws RegistryException { // Validate @@ -115,7 +115,7 @@ public final class ConverterInfoMgr { * <code>ConverterInfo</code> objects, an empty * <code>Vector</code> if none exist. */ - public static Iterator<ConverterInfo> getConverterInfoEnumeration() { + private static Iterator<ConverterInfo> getConverterInfoEnumeration() { return (converterInfoList.iterator()); } @@ -151,7 +151,7 @@ public final class ConverterInfoMgr { * @return True if a <code>ConverterInfo</code> object was * removed, false otherwise. */ - public static boolean removeByName(String name) { + private static boolean removeByName(String name) { boolean rc = false; @@ -215,7 +215,7 @@ public final class ConverterInfoMgr { * that can be chained to perform the specified * conversion. */ - public static ConverterInfo[] findConverterInfoChain(String deviceFromMime, String deviceToMime) { + private static ConverterInfo[] findConverterInfoChain(String deviceFromMime, String deviceToMime) { if (deviceFromMime == null || deviceToMime == null) { return null; |