incubator-odf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From devin...@apache.org
Subject svn commit: r1181626 - in /incubator/odf/trunk/simple/src/main/java/org/odftoolkit/simple: chart/ common/ draw/ style/ table/ text/
Date Tue, 11 Oct 2011 05:19:50 GMT
Author: devinhan
Date: Tue Oct 11 05:19:50 2011
New Revision: 1181626

URL: http://svn.apache.org/viewvc?rev=1181626&view=rev
Log:
#ODFTOOLKIT-289# Clean up unnecessary log messages for Simple API.[Developer:Devin]

Modified:
    incubator/odf/trunk/simple/src/main/java/org/odftoolkit/simple/chart/DataSet.java
    incubator/odf/trunk/simple/src/main/java/org/odftoolkit/simple/common/EditableTextExtractor.java
    incubator/odf/trunk/simple/src/main/java/org/odftoolkit/simple/draw/Frame.java
    incubator/odf/trunk/simple/src/main/java/org/odftoolkit/simple/draw/Image.java
    incubator/odf/trunk/simple/src/main/java/org/odftoolkit/simple/style/DefaultStyleHandler.java
    incubator/odf/trunk/simple/src/main/java/org/odftoolkit/simple/style/TextProperties.java
    incubator/odf/trunk/simple/src/main/java/org/odftoolkit/simple/table/Table.java
    incubator/odf/trunk/simple/src/main/java/org/odftoolkit/simple/text/Span.java

Modified: incubator/odf/trunk/simple/src/main/java/org/odftoolkit/simple/chart/DataSet.java
URL: http://svn.apache.org/viewvc/incubator/odf/trunk/simple/src/main/java/org/odftoolkit/simple/chart/DataSet.java?rev=1181626&r1=1181625&r2=1181626&view=diff
==============================================================================
--- incubator/odf/trunk/simple/src/main/java/org/odftoolkit/simple/chart/DataSet.java (original)
+++ incubator/odf/trunk/simple/src/main/java/org/odftoolkit/simple/chart/DataSet.java Tue
Oct 11 05:19:50 2011
@@ -23,6 +23,8 @@ import java.util.HashMap;
 import java.util.Map;
 import java.util.StringTokenizer;
 import java.util.Vector;
+import java.util.logging.Level;
+import java.util.logging.Logger;
 
 import org.odftoolkit.odfdom.dom.OdfDocumentNamespace;
 import org.odftoolkit.odfdom.dom.element.table.TableTableCellElement;
@@ -709,7 +711,7 @@ public class DataSet {
 				legendset = rowLabels;
 			}
 		} catch (Exception e) {
-			e.printStackTrace();
+			Logger.getLogger(DataSet.class.getName()).log(Level.SEVERE,	e.getMessage(), e);
 		}
 	}
 

Modified: incubator/odf/trunk/simple/src/main/java/org/odftoolkit/simple/common/EditableTextExtractor.java
URL: http://svn.apache.org/viewvc/incubator/odf/trunk/simple/src/main/java/org/odftoolkit/simple/common/EditableTextExtractor.java?rev=1181626&r1=1181625&r2=1181626&view=diff
==============================================================================
--- incubator/odf/trunk/simple/src/main/java/org/odftoolkit/simple/common/EditableTextExtractor.java
(original)
+++ incubator/odf/trunk/simple/src/main/java/org/odftoolkit/simple/common/EditableTextExtractor.java
Tue Oct 11 05:19:50 2011
@@ -236,7 +236,6 @@ public class EditableTextExtractor exten
 			}
 			return builder.toString();
 		} catch (Exception e) {
-			e.printStackTrace();
 			Logger.getLogger(EditableTextExtractor.class.getName()).severe(e.getMessage());
 			return builder.toString();
 		}

Modified: incubator/odf/trunk/simple/src/main/java/org/odftoolkit/simple/draw/Frame.java
URL: http://svn.apache.org/viewvc/incubator/odf/trunk/simple/src/main/java/org/odftoolkit/simple/draw/Frame.java?rev=1181626&r1=1181625&r2=1181626&view=diff
==============================================================================
--- incubator/odf/trunk/simple/src/main/java/org/odftoolkit/simple/draw/Frame.java (original)
+++ incubator/odf/trunk/simple/src/main/java/org/odftoolkit/simple/draw/Frame.java Tue Oct
11 05:19:50 2011
@@ -20,6 +20,8 @@ under the License.
 package org.odftoolkit.simple.draw;
 
 import java.net.URI;
+import java.util.logging.Level;
+import java.util.logging.Logger;
 
 import org.odftoolkit.odfdom.dom.OdfDocumentNamespace;
 import org.odftoolkit.odfdom.dom.element.draw.DrawAElement;
@@ -195,7 +197,7 @@ public class Frame extends Component {
 					mElement.getSvgWidthAttribute(), mElement.getSvgHeightAttribute());
 			return rectange;
 		} catch (Exception e) {
-			e.printStackTrace();
+			Logger.getLogger(Frame.class.getName()).log(Level.FINE, e.getMessage(), e);
 			return null;
 		}
 	}
@@ -283,7 +285,7 @@ public class Frame extends Component {
 				parent.appendChild(aElement);
 			parent.insertBefore(aElement, brother);
 		} catch (Exception e) {
-			e.printStackTrace();
+			Logger.getLogger(Frame.class.getName()).log(Level.SEVERE, e.getMessage(), e);
 		}
 	}
 

Modified: incubator/odf/trunk/simple/src/main/java/org/odftoolkit/simple/draw/Image.java
URL: http://svn.apache.org/viewvc/incubator/odf/trunk/simple/src/main/java/org/odftoolkit/simple/draw/Image.java?rev=1181626&r1=1181625&r2=1181626&view=diff
==============================================================================
--- incubator/odf/trunk/simple/src/main/java/org/odftoolkit/simple/draw/Image.java (original)
+++ incubator/odf/trunk/simple/src/main/java/org/odftoolkit/simple/draw/Image.java Tue Oct
11 05:19:50 2011
@@ -197,7 +197,7 @@ public class Image extends Component {
 			return mImage;
 
 		} catch (Exception e) {
-			e.printStackTrace();
+			Logger.getLogger(Image.class.getName()).log(Level.SEVERE, e.getMessage(), e);
 		}
 
 		return null;
@@ -239,7 +239,7 @@ public class Image extends Component {
 			return mImage;
 
 		} catch (Exception e) {
-			e.printStackTrace();
+			Logger.getLogger(Image.class.getName()).severe(e.getMessage());
 		}
 		return null;
 	}
@@ -341,7 +341,7 @@ public class Image extends Component {
 			String mediaType = OdfFileEntry.getMediaTypeString(imageRef);
 			mOwnerDocument.getPackage().insert(imageUri, packagePath, mediaType);
 		} catch (Exception e) {
-			e.printStackTrace();
+			Logger.getLogger(Image.class.getName()).log(Level.SEVERE, e.getMessage(), e);
 		}
 	}
 
@@ -366,7 +366,7 @@ public class Image extends Component {
 				mImageURI = new URI(mImageElement.getXlinkHrefAttribute());
 			return mImageURI.toString();
 		} catch (URISyntaxException e) {
-			e.printStackTrace();
+			Logger.getLogger(Image.class.getName()).log(Level.SEVERE, e.getMessage(), e);
 		}
 		return null;
 	}

Modified: incubator/odf/trunk/simple/src/main/java/org/odftoolkit/simple/style/DefaultStyleHandler.java
URL: http://svn.apache.org/viewvc/incubator/odf/trunk/simple/src/main/java/org/odftoolkit/simple/style/DefaultStyleHandler.java?rev=1181626&r1=1181625&r2=1181626&view=diff
==============================================================================
--- incubator/odf/trunk/simple/src/main/java/org/odftoolkit/simple/style/DefaultStyleHandler.java
(original)
+++ incubator/odf/trunk/simple/src/main/java/org/odftoolkit/simple/style/DefaultStyleHandler.java
Tue Oct 11 05:19:50 2011
@@ -164,7 +164,7 @@ public class DefaultStyleHandler {
 	 */
 	public TextProperties getTextPropertiesForRead() {
 		if (!mFamilyProperties.get(mOdfElement.getStyleFamily()).contains(OdfStylePropertiesSet.TextProperties))
{
-			Logger.getLogger(CellStyleHandler.class.getName()).log(Level.INFO,
+			Logger.getLogger(CellStyleHandler.class.getName()).log(Level.FINE,
 					"Text properties are not supported by style family: " + mOdfElement.getStyleFamily()
+ "!", "");
 			return null;
 		}
@@ -176,14 +176,14 @@ public class DefaultStyleHandler {
 
 		OdfStyleBase style = getStyleElementForRead();
 		if (style == null) {
-			Logger.getLogger(CellStyleHandler.class.getName()).log(Level.INFO, "No style definition
is found!", "");
+			Logger.getLogger(CellStyleHandler.class.getName()).log(Level.FINE, "No style definition
is found!", "");
 			return null;
 		}
 		mTextProperties = TextProperties.getTextProperties(style);
 		if (mTextProperties != null)
 			return mTextProperties;
 		else {
-			Logger.getLogger(CellStyleHandler.class.getName()).log(Level.INFO,
+			Logger.getLogger(CellStyleHandler.class.getName()).log(Level.FINE,
 					"No explicit text properties definition is found!", "");
 			return null;
 		}
@@ -204,7 +204,7 @@ public class DefaultStyleHandler {
 	 */
 	public TextProperties getTextPropertiesForWrite() {
 		if (!mFamilyProperties.get(mOdfElement.getStyleFamily()).contains(OdfStylePropertiesSet.TextProperties))
{
-			Logger.getLogger(CellStyleHandler.class.getName()).log(Level.INFO,
+			Logger.getLogger(CellStyleHandler.class.getName()).log(Level.FINE,
 					"Text properties are not supported by style family: " + mOdfElement.getStyleFamily()
+ "!", "");
 			return null;
 		}
@@ -235,7 +235,7 @@ public class DefaultStyleHandler {
 		if (!mFamilyProperties.get(mOdfElement.getStyleFamily()).contains(OdfStylePropertiesSet.TableCellProperties))
{
 			Logger.getLogger(CellStyleHandler.class.getName())
 					.log(
-							Level.INFO,
+							Level.FINE,
 							"TableCell properties are not supported by style family: " + mOdfElement.getStyleFamily()
 									+ "!", "");
 			return null;
@@ -248,14 +248,14 @@ public class DefaultStyleHandler {
 
 		OdfStyleBase style = getStyleElementForRead();
 		if (style == null) {
-			Logger.getLogger(CellStyleHandler.class.getName()).log(Level.INFO, "No style definition
is found!", "");
+			Logger.getLogger(CellStyleHandler.class.getName()).log(Level.FINE, "No style definition
is found!", "");
 			return null;
 		}
 		mTableCellProperties = TableCellProperties.getTableCellProperties(style);
 		if (mTableCellProperties != null)
 			return mTableCellProperties;
 		else {
-			Logger.getLogger(CellStyleHandler.class.getName()).log(Level.INFO,
+			Logger.getLogger(CellStyleHandler.class.getName()).log(Level.FINE,
 					"No explicit table cell properties definition is found!", "");
 			return null;
 		}
@@ -278,7 +278,7 @@ public class DefaultStyleHandler {
 		if (!mFamilyProperties.get(mOdfElement.getStyleFamily()).contains(OdfStylePropertiesSet.TableCellProperties))
{
 			Logger.getLogger(CellStyleHandler.class.getName())
 					.log(
-							Level.INFO,
+							Level.FINE,
 							"TableCell properties are not supported by style family: " + mOdfElement.getStyleFamily()
 									+ "!", "");
 			return null;
@@ -310,7 +310,7 @@ public class DefaultStyleHandler {
 		if (!mFamilyProperties.get(mOdfElement.getStyleFamily()).contains(OdfStylePropertiesSet.ParagraphProperties))
{
 			Logger.getLogger(CellStyleHandler.class.getName())
 					.log(
-							Level.INFO,
+							Level.FINE,
 							"Paragraph properties are not supported by style family: " + mOdfElement.getStyleFamily()
 									+ "!", "");
 			return null;
@@ -323,14 +323,14 @@ public class DefaultStyleHandler {
 
 		OdfStyleBase style = getStyleElementForRead();
 		if (style == null) {
-			Logger.getLogger(CellStyleHandler.class.getName()).log(Level.INFO, "No style definition
is found!", "");
+			Logger.getLogger(CellStyleHandler.class.getName()).log(Level.FINE, "No style definition
is found!", "");
 			return null;
 		}
 		mParagraphProperties = ParagraphProperties.getParagraphProperties(style);
 		if (mParagraphProperties != null)
 			return mParagraphProperties;
 		else {
-			Logger.getLogger(CellStyleHandler.class.getName()).log(Level.INFO,
+			Logger.getLogger(CellStyleHandler.class.getName()).log(Level.FINE,
 					"No explicit paragraph properties definition is found!", "");
 			return null;
 		}
@@ -353,7 +353,7 @@ public class DefaultStyleHandler {
 		if (!mFamilyProperties.get(mOdfElement.getStyleFamily()).contains(OdfStylePropertiesSet.ParagraphProperties))
{
 			Logger.getLogger(CellStyleHandler.class.getName())
 					.log(
-							Level.INFO,
+							Level.FINE,
 							"Paragraph properties are not supported by style family: " + mOdfElement.getStyleFamily()
 									+ "!", "");
 			return null;
@@ -383,7 +383,7 @@ public class DefaultStyleHandler {
 	 */
 	public GraphicProperties getGraphicPropertiesForRead() {
 		if (!mFamilyProperties.get(mOdfElement.getStyleFamily()).contains(OdfStylePropertiesSet.GraphicProperties))
{
-			Logger.getLogger(CellStyleHandler.class.getName()).log(Level.INFO,
+			Logger.getLogger(CellStyleHandler.class.getName()).log(Level.FINE,
 					"Graphics properties are not supported by style family: " + mOdfElement.getStyleFamily()
+ "!", "");
 			return null;
 		}
@@ -395,14 +395,14 @@ public class DefaultStyleHandler {
 
 		OdfStyleBase style = getStyleElementForRead();
 		if (style == null) {
-			Logger.getLogger(CellStyleHandler.class.getName()).log(Level.INFO, "No style definition
is found!", "");
+			Logger.getLogger(CellStyleHandler.class.getName()).log(Level.FINE, "No style definition
is found!", "");
 			return null;
 		}
 		mGraphicProperties = GraphicProperties.getGraphicProperties(style);
 		if (mGraphicProperties != null)
 			return mGraphicProperties;
 		else {
-			Logger.getLogger(CellStyleHandler.class.getName()).log(Level.INFO,
+			Logger.getLogger(CellStyleHandler.class.getName()).log(Level.FINE,
 					"No explicit graphic properties definition is found!", "");
 			return null;
 		}
@@ -423,7 +423,7 @@ public class DefaultStyleHandler {
 	 */
 	public GraphicProperties getGraphicPropertiesForWrite() {
 		if (!mFamilyProperties.get(mOdfElement.getStyleFamily()).contains(OdfStylePropertiesSet.GraphicProperties))
{
-			Logger.getLogger(CellStyleHandler.class.getName()).log(Level.INFO,
+			Logger.getLogger(CellStyleHandler.class.getName()).log(Level.FINE,
 					"Graphics properties are not supported by style family: " + mOdfElement.getStyleFamily()
+ "!", "");
 			return null;
 		}

Modified: incubator/odf/trunk/simple/src/main/java/org/odftoolkit/simple/style/TextProperties.java
URL: http://svn.apache.org/viewvc/incubator/odf/trunk/simple/src/main/java/org/odftoolkit/simple/style/TextProperties.java?rev=1181626&r1=1181625&r2=1181626&view=diff
==============================================================================
--- incubator/odf/trunk/simple/src/main/java/org/odftoolkit/simple/style/TextProperties.java
(original)
+++ incubator/odf/trunk/simple/src/main/java/org/odftoolkit/simple/style/TextProperties.java
Tue Oct 11 05:19:50 2011
@@ -20,6 +20,8 @@ under the License.
 package org.odftoolkit.simple.style;
 
 import java.util.Locale;
+import java.util.logging.Level;
+import java.util.logging.Logger;
 
 import org.odftoolkit.odfdom.dom.OdfContentDom;
 import org.odftoolkit.odfdom.dom.OdfStylesDom;
@@ -997,7 +999,7 @@ public class TextProperties {
 				}
 			}
 		} catch (Exception e) {
-			e.printStackTrace();
+			Logger.getLogger(TextProperties.class.getName()).log(Level.SEVERE, e.getMessage(), e);
 		}
 		return null;
 	}
@@ -1052,7 +1054,7 @@ public class TextProperties {
 			newfont.setSvgFontFamilyAttribute(aFamilyName);
 			return aFontName;
 		} catch (Exception e) {
-			e.printStackTrace();
+			Logger.getLogger(TextProperties.class.getName()).log(Level.SEVERE,	e.getMessage(), e);
 		}
 		return null;
 

Modified: incubator/odf/trunk/simple/src/main/java/org/odftoolkit/simple/table/Table.java
URL: http://svn.apache.org/viewvc/incubator/odf/trunk/simple/src/main/java/org/odftoolkit/simple/table/Table.java?rev=1181626&r1=1181625&r2=1181626&view=diff
==============================================================================
--- incubator/odf/trunk/simple/src/main/java/org/odftoolkit/simple/table/Table.java (original)
+++ incubator/odf/trunk/simple/src/main/java/org/odftoolkit/simple/table/Table.java Tue Oct
11 05:19:50 2011
@@ -1254,9 +1254,9 @@ public class Table extends Component {
 									}
 									tempi = tempi - cellElement.getTableNumberColumnsRepeatedAttribute();
 									i = i + cellElement.getTableNumberColumnsRepeatedAttribute();
-									if (!(cellElement instanceof TableCoveredTableCellElement) && (tempi >
0))
-										Logger.getLogger(Table.class.getName()).log(Level.INFO,
-												"Not covered cell was ignored");
+									if (!(cellElement instanceof TableCoveredTableCellElement) && (tempi >
0)){
+										Logger.getLogger(Table.class.getName()).log(Level.FINE,	"Not covered cell was ignored");
+									}
 									cellElement = (TableTableCellElementBase) (cellElement.getNextSibling());
 									// while ((cellElement != null) &&
 									// (cellElement instanceof
@@ -1333,9 +1333,9 @@ public class Table extends Component {
 									}
 								}
 								tempi = tempi - cellElement.getTableNumberColumnsRepeatedAttribute();
-								if (!(cellElement instanceof TableCoveredTableCellElement) && (tempi >
1))
-									Logger.getLogger(Table.class.getName()).log(Level.INFO,
-											"Not covered cell was ignored");
+								if (!(cellElement instanceof TableCoveredTableCellElement) && (tempi >
1)){
+									Logger.getLogger(Table.class.getName()).log(Level.FINE,	"Not covered cell was ignored");
+								}
 								cellElement = (TableTableCellElementBase) (cellElement.getNextSibling());
 							}
 						} else {
@@ -1885,7 +1885,7 @@ public class Table extends Component {
 		try {
 			automaticStyles = getOwnerDocument(container).getStylesDom().getAutomaticStyles();
 		} catch (Exception e) {
-			e.printStackTrace();
+			Logger.getLogger(Table.class.getName()).log(Level.SEVERE,	e.getMessage(), e);
 		}
 		OdfStylePageLayout pageLayout = automaticStyles.getPageLayout("pm1");
 		if (pageLayout == null) {

Modified: incubator/odf/trunk/simple/src/main/java/org/odftoolkit/simple/text/Span.java
URL: http://svn.apache.org/viewvc/incubator/odf/trunk/simple/src/main/java/org/odftoolkit/simple/text/Span.java?rev=1181626&r1=1181625&r2=1181626&view=diff
==============================================================================
--- incubator/odf/trunk/simple/src/main/java/org/odftoolkit/simple/text/Span.java (original)
+++ incubator/odf/trunk/simple/src/main/java/org/odftoolkit/simple/text/Span.java Tue Oct
11 05:19:50 2011
@@ -21,6 +21,8 @@ package org.odftoolkit.simple.text;
 
 import java.net.URI;
 import java.util.Iterator;
+import java.util.logging.Level;
+import java.util.logging.Logger;
 
 import org.odftoolkit.odfdom.dom.element.text.TextAElement;
 import org.odftoolkit.odfdom.dom.element.text.TextSpanElement;
@@ -90,7 +92,7 @@ public class Span extends Component impl
 			TextSpanElement element = textSelection.createSpanElement();
 			return Span.getInstanceof(element);
 		} catch (InvalidNavigationException e) {
-			e.printStackTrace();
+			Logger.getLogger(Span.class.getName()).log(Level.SEVERE, e.getMessage(), e);
 		}
 		return null;
 	}



Mime
View raw message