git-svn-id: svn://svn.code.sf.net/p/writer2latex/code/trunk@7 f0f2a975-2e09-46c8-9428-3b39399b9f3c
This commit is contained in:
parent
f543325e2e
commit
6c7c7cdbf2
11 changed files with 35 additions and 21 deletions
|
@ -16,11 +16,11 @@
|
|||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
||||
* MA 02111-1307 USA
|
||||
*
|
||||
* Copyright: 2002-2008 by Henrik Just
|
||||
* Copyright: 2002-2009 by Henrik Just
|
||||
*
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* Version 1.0 (2008-10-07)
|
||||
* Version 1.0 (2009-03-02)
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -93,15 +93,16 @@ public class GraphicConverterImpl2 implements GraphicConverter {
|
|||
// We don't support cropping and resizing
|
||||
if (bCrop || bResize) { return false; }
|
||||
|
||||
// We currently only support conversion of svm into pdf
|
||||
// We currently support conversion of bitmaps and svm into pdf and eps
|
||||
// Trying wmf causes an IllegalArgumentException "URL seems to be an unsupported one"
|
||||
// Seems to be an OOo bug; workaround: Use temporary files..??
|
||||
boolean bSupportsSource = MIMETypes.SVM.equals(sSourceMime);
|
||||
/*MIMETypes.PNG.equals(sSourceMime) || MIMETypes.JPEG.equals(sSourceMime) ||
|
||||
boolean bSupportsSource = MIMETypes.SVM.equals(sSourceMime) ||
|
||||
MIMETypes.PNG.equals(sSourceMime) || MIMETypes.JPEG.equals(sSourceMime) ||
|
||||
MIMETypes.GIF.equals(sSourceMime) || MIMETypes.TIFF.equals(sSourceMime) ||
|
||||
MIMETypes.BMP.equals(sSourceMime) || MIMETypes.WMF.equals(sSourceMime) ||
|
||||
MIMETypes.SVM.equals(sSourceMime);*/
|
||||
return bSupportsSource && MIMETypes.PDF.equals(sTargetMime);
|
||||
MIMETypes.BMP.equals(sSourceMime);
|
||||
// || MIMETypes.WMF.equals(sSourceMime)
|
||||
boolean bSupportsTarget = MIMETypes.PDF.equals(sTargetMime) || MIMETypes.EPS.equals(sTargetMime);
|
||||
return bSupportsSource && bSupportsTarget;
|
||||
}
|
||||
|
||||
public byte[] convert(byte[] source, String sSourceMime, String sTargetMime) {
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
*
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* Version 1.0 (2009-02-17)
|
||||
* Version 1.0 (2009-03-02)
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -266,7 +266,7 @@ public final class ConverterPalette extends ConverterBase {
|
|||
if (!config.noPreamble()) {
|
||||
// Create document class declaration
|
||||
result.append("% This file was converted to LaTeX by Writer2LaTeX ver. "+ConverterFactory.getVersion()).nl()
|
||||
.append("% see http://www.hj-gym.dk/~hj/writer2latex for more info").nl();
|
||||
.append("% see http://writer2latex.sourceforge.net for more info").nl();
|
||||
result.append("\\documentclass");
|
||||
if (!globalOptions.isEmpty()) {
|
||||
result.append("[").append(globalOptions.toString()).append("]");
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
*
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* Version 1.0 (2009-02-16)
|
||||
* Version 1.0 (2009-03-02)
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -460,7 +460,7 @@ public class Converter extends ConverterBase {
|
|||
"This file was converted to xhtml by "
|
||||
+ (ofr.isText() ? "Writer" : (ofr.isSpreadsheet() ? "Calc" : "Impress"))
|
||||
+ "2xhtml ver. " + ConverterFactory.getVersion() +
|
||||
". See http://www.hj-gym.dk/~hj/writer2latex for more info."),
|
||||
". See http://writer2latex.sourceforge.net for more info."),
|
||||
rootElement.getFirstChild());
|
||||
|
||||
// Apply page formatting (using first master page)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue