Remove some occurrences (used for test and debugging) of System.out.println
git-svn-id: svn://svn.code.sf.net/p/writer2latex/code/trunk@178 f0f2a975-2e09-46c8-9428-3b39399b9f3c
This commit is contained in:
parent
0746282f26
commit
751e14eb9f
13 changed files with 24 additions and 46 deletions
|
@ -16,11 +16,11 @@
|
||||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
||||||
* MA 02111-1307 USA
|
* MA 02111-1307 USA
|
||||||
*
|
*
|
||||||
* Copyright: 2002-2011 by Henrik Just
|
* Copyright: 2002-2014 by Henrik Just
|
||||||
*
|
*
|
||||||
* All Rights Reserved.
|
* All Rights Reserved.
|
||||||
*
|
*
|
||||||
* Version 1.2 (2010-06-11)
|
* Version 1.4 (2014-09-24)
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -109,7 +109,6 @@ public class FilePicker {
|
||||||
sPaths = new String[nCount-1];
|
sPaths = new String[nCount-1];
|
||||||
for (int i=1; i<nCount; i++) {
|
for (int i=1; i<nCount; i++) {
|
||||||
sPaths[i-1]=sPathList[0] + sPathList[i];
|
sPaths[i-1]=sPathList[0] + sPathList[i];
|
||||||
System.out.println("File "+sPaths[i-1]);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (nCount==1) {
|
else if (nCount==1) {
|
||||||
|
|
|
@ -697,7 +697,6 @@ public class EpubMetadataDialog extends DialogBase {
|
||||||
date.Year = (short) (nDate/10000);
|
date.Year = (short) (nDate/10000);
|
||||||
date.Month = (short) ((nDate%10000)/100);
|
date.Month = (short) ((nDate%10000)/100);
|
||||||
date.Day = (short) (nDate%100);
|
date.Day = (short) (nDate%100);
|
||||||
System.out.println(date.Year+"-"+date.Month+"-"+date.Day);
|
|
||||||
return date;
|
return date;
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
|
|
|
@ -16,11 +16,11 @@
|
||||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
||||||
* MA 02111-1307 USA
|
* MA 02111-1307 USA
|
||||||
*
|
*
|
||||||
* Copyright: 2002-2011 by Henrik Just
|
* Copyright: 2002-2014 by Henrik Just
|
||||||
*
|
*
|
||||||
* All Rights Reserved.
|
* All Rights Reserved.
|
||||||
*
|
*
|
||||||
* Version 1.2 (2011-06-19)
|
* Version 1.4 (2014-09-24)
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -309,7 +309,6 @@ public class EpubOptionsDialog extends OptionsDialogBase {
|
||||||
// Dispose the dialog after execution (to free up the memory)
|
// Dispose the dialog after execution (to free up the memory)
|
||||||
XComponent xComponent = (XComponent) UnoRuntime.queryInterface(XComponent.class, dialog);
|
XComponent xComponent = (XComponent) UnoRuntime.queryInterface(XComponent.class, dialog);
|
||||||
if (xComponent!=null) {
|
if (xComponent!=null) {
|
||||||
System.out.println("Disposing the dialog!");
|
|
||||||
xComponent.dispose();
|
xComponent.dispose();
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|
|
@ -16,11 +16,11 @@
|
||||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
||||||
* MA 02111-1307 USA
|
* MA 02111-1307 USA
|
||||||
*
|
*
|
||||||
* Copyright: 2002-2009 by Henrik Just
|
* Copyright: 2002-2014 by Henrik Just
|
||||||
*
|
*
|
||||||
* All Rights Reserved.
|
* All Rights Reserved.
|
||||||
*
|
*
|
||||||
* Version 1.2 (2009-06-19)
|
* Version 1.4 (2014-09-24)
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -88,7 +88,7 @@ public class DeTeXtive {
|
||||||
skipBlanks();
|
skipBlanks();
|
||||||
if (token.isCS("documentclass") || token.isCS("documentstyle")) {
|
if (token.isCS("documentclass") || token.isCS("documentstyle")) {
|
||||||
// The first non-blank token is \documentclass or \documentstyle => could be a LaTeX document
|
// The first non-blank token is \documentclass or \documentstyle => could be a LaTeX document
|
||||||
System.out.println("** Found "+token.toString());
|
//System.out.println("** Found "+token.toString());
|
||||||
mouth.getToken();
|
mouth.getToken();
|
||||||
skipSpaces();
|
skipSpaces();
|
||||||
// Skip options, if any
|
// Skip options, if any
|
||||||
|
@ -99,12 +99,12 @@ public class DeTeXtive {
|
||||||
if (token.getType()==TokenType.BEGIN_GROUP) {
|
if (token.getType()==TokenType.BEGIN_GROUP) {
|
||||||
// Get class name
|
// Get class name
|
||||||
String sClassName = parseArgumentAsString();
|
String sClassName = parseArgumentAsString();
|
||||||
System.out.println("** Found the class name "+sClassName);
|
//System.out.println("** Found the class name "+sClassName);
|
||||||
// Accept any class name of one or more characters
|
// Accept any class name of one or more characters
|
||||||
if (sClassName.length()>0) { return true; }
|
if (sClassName.length()>0) { return true; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
System.out.println("** Doesn't look like LaTeX; failed to get class name");
|
//System.out.println("** Doesn't look like LaTeX; failed to get class name");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -122,7 +122,7 @@ public class DeTeXtive {
|
||||||
skipSpaces();
|
skipSpaces();
|
||||||
}
|
}
|
||||||
String sName = parseArgumentAsString();
|
String sName = parseArgumentAsString();
|
||||||
System.out.println("** Found package "+sName);
|
//System.out.println("** Found package "+sName);
|
||||||
packages.add(sName);
|
packages.add(sName);
|
||||||
}
|
}
|
||||||
else if (token.getType()==TokenType.BEGIN_GROUP) {
|
else if (token.getType()==TokenType.BEGIN_GROUP) {
|
||||||
|
@ -134,7 +134,7 @@ public class DeTeXtive {
|
||||||
mouth.getToken();
|
mouth.getToken();
|
||||||
skipSpaces();
|
skipSpaces();
|
||||||
if ("document".equals(parseArgumentAsString())) {
|
if ("document".equals(parseArgumentAsString())) {
|
||||||
System.out.println("Found \\begin{document}");
|
//System.out.println("Found \\begin{document}");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -143,7 +143,7 @@ public class DeTeXtive {
|
||||||
mouth.getToken();
|
mouth.getToken();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
System.out.println("** Doesn't look like LaTeX; failed to find \\begin{document}");
|
//System.out.println("** Doesn't look like LaTeX; failed to find \\begin{document}");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -45,7 +45,6 @@ class StreamGobbler extends Thread {
|
||||||
//while ( (line = br.readLine()) != null) {
|
//while ( (line = br.readLine()) != null) {
|
||||||
while ( br.readLine() != null) {
|
while ( br.readLine() != null) {
|
||||||
// Do nothing...
|
// Do nothing...
|
||||||
//System.out.println(type + ">" + line);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (IOException ioe) {
|
catch (IOException ioe) {
|
||||||
|
|
|
@ -16,11 +16,11 @@
|
||||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
||||||
* MA 02111-1307 USA
|
* MA 02111-1307 USA
|
||||||
*
|
*
|
||||||
* Copyright: 2002-2009 by Henrik Just
|
* Copyright: 2002-2014 by Henrik Just
|
||||||
*
|
*
|
||||||
* All Rights Reserved.
|
* All Rights Reserved.
|
||||||
*
|
*
|
||||||
* Version 1.2 (2009-06-19)
|
* Version 1.4 (2014-09-24)
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -113,11 +113,9 @@ private final XComponentContext m_xContext;
|
||||||
|
|
||||||
// If there's no URL, we cannot verify the type (this should never happen on proper use of the service)
|
// If there's no URL, we cannot verify the type (this should never happen on proper use of the service)
|
||||||
if (sURL==null) {
|
if (sURL==null) {
|
||||||
System.out.println("No URL given!");
|
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
System.out.println("Asked to verify the type "+sTypeName);
|
|
||||||
// Also, we can only verify LaTeX and XeLaTeX
|
// Also, we can only verify LaTeX and XeLaTeX
|
||||||
if (sTypeName==null || !(sTypeName.equals(LATEX_FILE) || sTypeName.equals(XELATEX_FILE))) {
|
if (sTypeName==null || !(sTypeName.equals(LATEX_FILE) || sTypeName.equals(XELATEX_FILE))) {
|
||||||
return "";
|
return "";
|
||||||
|
@ -132,7 +130,6 @@ private final XComponentContext m_xContext;
|
||||||
}
|
}
|
||||||
catch (com.sun.star.uno.Exception e) {
|
catch (com.sun.star.uno.Exception e) {
|
||||||
// failed to get SimpleFileAccess service (should not happen)
|
// failed to get SimpleFileAccess service (should not happen)
|
||||||
System.out.println("Failed to get SFA service");
|
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -144,12 +141,10 @@ private final XComponentContext m_xContext;
|
||||||
}
|
}
|
||||||
catch (com.sun.star.ucb.CommandAbortedException e) {
|
catch (com.sun.star.ucb.CommandAbortedException e) {
|
||||||
// Failed to create input stream, cannot verify the type
|
// Failed to create input stream, cannot verify the type
|
||||||
System.out.println("Failed to get input stream");
|
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
catch (com.sun.star.uno.Exception e) {
|
catch (com.sun.star.uno.Exception e) {
|
||||||
// Failed to create input stream, cannot verify the type
|
// Failed to create input stream, cannot verify the type
|
||||||
System.out.println("Failed to get input stream");
|
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -157,7 +152,6 @@ private final XComponentContext m_xContext;
|
||||||
DeTeXtive deTeXtive = new DeTeXtive();
|
DeTeXtive deTeXtive = new DeTeXtive();
|
||||||
try {
|
try {
|
||||||
String sType = deTeXtive.deTeXt(is);
|
String sType = deTeXtive.deTeXt(is);
|
||||||
System.out.println("The DeTeXtive returned the type "+sType);
|
|
||||||
if ("LaTeX".equals(sType)) {
|
if ("LaTeX".equals(sType)) {
|
||||||
return LATEX_FILE;
|
return LATEX_FILE;
|
||||||
}
|
}
|
||||||
|
@ -170,7 +164,6 @@ private final XComponentContext m_xContext;
|
||||||
}
|
}
|
||||||
catch (IOException e) {
|
catch (IOException e) {
|
||||||
// Failed to read the stream, cannot verify the type
|
// Failed to read the stream, cannot verify the type
|
||||||
System.out.println("Failed to read the input stream");
|
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -16,11 +16,11 @@
|
||||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
||||||
* MA 02111-1307 USA
|
* MA 02111-1307 USA
|
||||||
*
|
*
|
||||||
* Copyright: 2002-2010 by Henrik Just
|
* Copyright: 2002-2014 by Henrik Just
|
||||||
*
|
*
|
||||||
* All Rights Reserved.
|
* All Rights Reserved.
|
||||||
*
|
*
|
||||||
* Version 1.2 (2011-01-25)
|
* Version 1.4 (2014-09-24)
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -289,8 +289,6 @@ public class TeXImportFilter extends WeakBase implements XInitialization, XNamed
|
||||||
sCommand = "ooxelatex";
|
sCommand = "ooxelatex";
|
||||||
}
|
}
|
||||||
|
|
||||||
System.out.println("Executing tex4ht with command "+sCommand+" on file "+file.getName());
|
|
||||||
|
|
||||||
externalApps.execute(ExternalApps.MK4HT, sCommand, file.getName(), file.getParentFile(), null, true);
|
externalApps.execute(ExternalApps.MK4HT, sCommand, file.getName(), file.getParentFile(), null, true);
|
||||||
|
|
||||||
if (xStatus!=null) { nStep+=5; xStatus.setValue(nStep); }
|
if (xStatus!=null) { nStep+=5; xStatus.setValue(nStep); }
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
*
|
*
|
||||||
* All Rights Reserved.
|
* All Rights Reserved.
|
||||||
*
|
*
|
||||||
* Version 1.4 (2014-08-13)
|
* Version 1.4 (2014-08-25)
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -87,11 +87,11 @@ public final class Application {
|
||||||
*/
|
*/
|
||||||
public static final void main (String[] args){
|
public static final void main (String[] args){
|
||||||
try {
|
try {
|
||||||
long time = System.currentTimeMillis();
|
//long time = System.currentTimeMillis();
|
||||||
Application app = new Application();
|
Application app = new Application();
|
||||||
app.parseCommandLine(args);
|
app.parseCommandLine(args);
|
||||||
app.doConversion();
|
app.doConversion();
|
||||||
System.out.println("Total conversion time was "+(System.currentTimeMillis()-time)+" miliseconds");
|
//System.out.println("Total conversion time was "+(System.currentTimeMillis()-time)+" miliseconds");
|
||||||
} catch (IllegalArgumentException ex) {
|
} catch (IllegalArgumentException ex) {
|
||||||
String msg = ex.getMessage();
|
String msg = ex.getMessage();
|
||||||
showUsage(msg);
|
showUsage(msg);
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
*
|
*
|
||||||
* All Rights Reserved.
|
* All Rights Reserved.
|
||||||
*
|
*
|
||||||
* version 1.4 (2014-09-06)
|
* version 1.4 (2014-09-24)
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -41,7 +41,6 @@ public final class EPUBConverter extends Xhtml11Converter {
|
||||||
// Constructor
|
// Constructor
|
||||||
public EPUBConverter() {
|
public EPUBConverter() {
|
||||||
super();
|
super();
|
||||||
System.out.println("Creating epub converter");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override public ConverterResult convert(InputStream is, String sTargetFileName) throws IOException {
|
@Override public ConverterResult convert(InputStream is, String sTargetFileName) throws IOException {
|
||||||
|
|
|
@ -166,7 +166,6 @@ public class DrawConverter extends ConverterHelper {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else { // unsupported object
|
else { // unsupported object
|
||||||
//System.out.println("Unsupported "+sHref);
|
|
||||||
boolean bIgnore = true;
|
boolean bIgnore = true;
|
||||||
if (ofr.isOpenDocument()) { // look for replacement image
|
if (ofr.isOpenDocument()) { // look for replacement image
|
||||||
Element replacementImage = Misc.getChildByTagName(getFrame(node),XMLString.DRAW_IMAGE);
|
Element replacementImage = Misc.getChildByTagName(getFrame(node),XMLString.DRAW_IMAGE);
|
||||||
|
|
|
@ -16,11 +16,11 @@
|
||||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
||||||
* MA 02111-1307 USA
|
* MA 02111-1307 USA
|
||||||
*
|
*
|
||||||
* Copyright: 2002-2009 by Henrik Just
|
* Copyright: 2002-2014 by Henrik Just
|
||||||
*
|
*
|
||||||
* All Rights Reserved.
|
* All Rights Reserved.
|
||||||
*
|
*
|
||||||
* Version 1.2 (2009-09-20)
|
* Version 1.4 (2014-09-24)
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -122,7 +122,6 @@ public class ReplacementTrieNode {
|
||||||
while (child!=null) {
|
while (child!=null) {
|
||||||
if (child.getLaTeXCode()!=null) {
|
if (child.getLaTeXCode()!=null) {
|
||||||
strings.add(sPrefix+child.getLetter());
|
strings.add(sPrefix+child.getLetter());
|
||||||
System.out.println("Found "+sPrefix+child.getLetter());
|
|
||||||
}
|
}
|
||||||
child.collectStrings(strings, sPrefix+child.getLetter());
|
child.collectStrings(strings, sPrefix+child.getLetter());
|
||||||
child = child.getNextSibling();
|
child = child.getNextSibling();
|
||||||
|
|
|
@ -78,7 +78,6 @@ public class SimpleXMLParser extends DefaultHandler {
|
||||||
|
|
||||||
// We don't need - and in fact should avoid - any external entities
|
// We don't need - and in fact should avoid - any external entities
|
||||||
@Override public InputSource resolveEntity(String publicID, String systemID) throws SAXException {
|
@Override public InputSource resolveEntity(String publicID, String systemID) throws SAXException {
|
||||||
//System.out.println("resolveEntity "+publicID+" "+systemID);
|
|
||||||
return new InputSource(new StringReader(""));
|
return new InputSource(new StringReader(""));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -507,16 +507,11 @@ public class DrawConverter extends ConverterHelper {
|
||||||
// Store in cache in case we need to recycle
|
// Store in cache in case we need to recycle
|
||||||
svgImages.put(bgd.getFileName(), imageElement);
|
svgImages.put(bgd.getFileName(), imageElement);
|
||||||
}
|
}
|
||||||
else {
|
// Else fail silently
|
||||||
System.out.println("Failed to parse SVG");
|
|
||||||
}
|
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
// Will not happen with a byte array
|
// Will not happen with a byte array
|
||||||
System.out.println("IOException parsing SVG");
|
|
||||||
e.printStackTrace();
|
|
||||||
} catch (SAXException e) {
|
} catch (SAXException e) {
|
||||||
e.printStackTrace();
|
// Fail silently
|
||||||
System.out.println("SAXException parsing SVG");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue