Writer4LaTeX: LaTeX import
git-svn-id: svn://svn.code.sf.net/p/writer2latex/code/trunk@21 f0f2a975-2e09-46c8-9428-3b39399b9f3c
This commit is contained in:
parent
0e2d725c17
commit
1bbf6241a4
11 changed files with 497 additions and 280 deletions
|
@ -1,118 +0,0 @@
|
||||||
/************************************************************************
|
|
||||||
*
|
|
||||||
* LaTeXImporter.java
|
|
||||||
*
|
|
||||||
* This library is free software; you can redistribute it and/or
|
|
||||||
* modify it under the terms of the GNU Lesser General Public
|
|
||||||
* License version 2.1, as published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This library is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
* Lesser General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Lesser General Public
|
|
||||||
* License along with this library; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
|
||||||
* MA 02111-1307 USA
|
|
||||||
*
|
|
||||||
* Copyright: 2002-2009 by Henrik Just
|
|
||||||
*
|
|
||||||
* All Rights Reserved.
|
|
||||||
*
|
|
||||||
* Version 1.2 (2009-05-01)
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
package org.openoffice.da.comp.writer4latex;
|
|
||||||
|
|
||||||
import java.io.File;
|
|
||||||
import java.net.URI;
|
|
||||||
|
|
||||||
import com.sun.star.beans.PropertyValue;
|
|
||||||
import com.sun.star.frame.XComponentLoader;
|
|
||||||
import com.sun.star.uno.UnoRuntime;
|
|
||||||
import com.sun.star.uno.XComponentContext;
|
|
||||||
|
|
||||||
public class LaTeXImporter {
|
|
||||||
|
|
||||||
private XComponentContext xContext;
|
|
||||||
|
|
||||||
private ExternalApps externalApps;
|
|
||||||
|
|
||||||
public LaTeXImporter(XComponentContext xContext) {
|
|
||||||
this.xContext = xContext;
|
|
||||||
externalApps = new ExternalApps(xContext);
|
|
||||||
externalApps.load();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void importLaTeX(String sURL) {
|
|
||||||
// Get the LaTeX file
|
|
||||||
File file = null;
|
|
||||||
try {
|
|
||||||
file = new File(new URI(sURL));
|
|
||||||
}
|
|
||||||
catch (java.net.URISyntaxException e) {
|
|
||||||
// Could not use the URL provided
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Protect the ODT file if it already exists
|
|
||||||
String sBaseName = file.getName();
|
|
||||||
if (sBaseName.endsWith(".tex")) { sBaseName = sBaseName.substring(0, sBaseName.length()-4); }
|
|
||||||
File odtFile = new File(file.getParentFile(),sBaseName+".odt");
|
|
||||||
File tempFile = null;
|
|
||||||
if (odtFile.exists()) {
|
|
||||||
try {
|
|
||||||
tempFile = File.createTempFile("w4l", ".tmp", file.getParentFile());
|
|
||||||
}
|
|
||||||
catch (java.io.IOException e) {
|
|
||||||
// Failed to protect the ODT file, give up
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
odtFile.renameTo(tempFile);
|
|
||||||
}
|
|
||||||
|
|
||||||
externalApps.execute(ExternalApps.MK4HT, file.getName(), file.getParentFile(), true);
|
|
||||||
|
|
||||||
// Assemble the URL of the ODT file
|
|
||||||
String sODTURL = sURL;
|
|
||||||
if (sODTURL.endsWith(".tex")) { sODTURL = sODTURL.substring(0, sODTURL.length()-4); }
|
|
||||||
sODTURL += ".odt";
|
|
||||||
|
|
||||||
// Get the component loader
|
|
||||||
Object desktop;
|
|
||||||
try {
|
|
||||||
desktop = xContext.getServiceManager().createInstanceWithContext(
|
|
||||||
"com.sun.star.frame.Desktop", xContext);
|
|
||||||
|
|
||||||
XComponentLoader xComponentLoader = (XComponentLoader)UnoRuntime.queryInterface(
|
|
||||||
XComponentLoader.class, desktop);
|
|
||||||
|
|
||||||
// Load the file
|
|
||||||
PropertyValue[] props = new PropertyValue[1];
|
|
||||||
props[0] = new PropertyValue();
|
|
||||||
props[0].Name = "AsTemplate";
|
|
||||||
props[0].Value = new Boolean(true);
|
|
||||||
|
|
||||||
xComponentLoader.loadComponentFromURL(sODTURL, "_blank", 0, props);
|
|
||||||
}
|
|
||||||
catch (com.sun.star.lang.IllegalArgumentException e) {
|
|
||||||
System.out.println("Fejler med illegalargumentexception");
|
|
||||||
}
|
|
||||||
catch (com.sun.star.io.IOException e) {
|
|
||||||
System.out.println("Fejler med ioexception");
|
|
||||||
}
|
|
||||||
catch (com.sun.star.uno.Exception e) {
|
|
||||||
System.out.println("Failed to get desktop");
|
|
||||||
}
|
|
||||||
finally {
|
|
||||||
odtFile.delete();
|
|
||||||
// Restore origninal ODT file, if any
|
|
||||||
if (tempFile!=null) {
|
|
||||||
tempFile.renameTo(odtFile);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -45,7 +45,7 @@ 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);
|
//System.out.println(type + ">" + line);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (IOException ioe) {
|
catch (IOException ioe) {
|
||||||
|
|
|
@ -0,0 +1,93 @@
|
||||||
|
/************************************************************************
|
||||||
|
*
|
||||||
|
* TeXDetectService.java
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
* License version 2.1, as published by the Free Software Foundation.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
||||||
|
* MA 02111-1307 USA
|
||||||
|
*
|
||||||
|
* Copyright: 2002-2009 by Henrik Just
|
||||||
|
*
|
||||||
|
* All Rights Reserved.
|
||||||
|
*
|
||||||
|
* Version 1.2 (2009-05-20)
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
package org.openoffice.da.comp.writer4latex;
|
||||||
|
|
||||||
|
import com.sun.star.lib.uno.helper.WeakBase;
|
||||||
|
|
||||||
|
import com.sun.star.beans.PropertyValue;
|
||||||
|
import com.sun.star.document.XExtendedFilterDetection;
|
||||||
|
import com.sun.star.task.XStatusIndicator;
|
||||||
|
import com.sun.star.uno.AnyConverter;
|
||||||
|
import com.sun.star.uno.XComponentContext;
|
||||||
|
|
||||||
|
/** This class provides detect services for TeX documents
|
||||||
|
* It is thus an implementation of the service com.sun.star.document.ExtendedTypeDetection
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class TeXDetectService extends WeakBase implements XExtendedFilterDetection {
|
||||||
|
|
||||||
|
// Constants
|
||||||
|
|
||||||
|
// Identify this service
|
||||||
|
public static final String __implementationName = TeXDetectService.class.getName();
|
||||||
|
public static final String __serviceName = "com.sun.star.document.ExtendedTypeDetection";
|
||||||
|
private static final String[] m_serviceNames = { __serviceName };
|
||||||
|
|
||||||
|
// From constructor+initialization
|
||||||
|
private final XComponentContext m_xContext;
|
||||||
|
|
||||||
|
/** Construct a new <code>TeXDetectService</code>
|
||||||
|
*
|
||||||
|
* @param xContext The Component Context
|
||||||
|
*/
|
||||||
|
public TeXDetectService( XComponentContext xContext ) {
|
||||||
|
m_xContext = xContext;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Implement XExtendedFilterDetection
|
||||||
|
public String detect(PropertyValue[][] mediaDescriptor) {
|
||||||
|
// Read the media properties
|
||||||
|
String sURL = null;
|
||||||
|
String sTypeName = null;
|
||||||
|
if (mediaDescriptor.length>0) {
|
||||||
|
int nLength = mediaDescriptor[0].length;
|
||||||
|
for (int i=0; i<nLength; i++) {
|
||||||
|
try {
|
||||||
|
if (mediaDescriptor[0][i].Name.equals("URL")) {
|
||||||
|
sURL = AnyConverter.toString(mediaDescriptor[0][i].Value);
|
||||||
|
}
|
||||||
|
else if (mediaDescriptor[0][i].Name.equals("TypeName")) {
|
||||||
|
sTypeName = AnyConverter.toString(mediaDescriptor[0][i].Value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (com.sun.star.lang.IllegalArgumentException e) {
|
||||||
|
// AnyConverter failed to convert; ignore this
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ("org.openoffice.da.writer4latex.LaTeX_File".equals(sTypeName)) {
|
||||||
|
return sTypeName;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,332 @@
|
||||||
|
/************************************************************************
|
||||||
|
*
|
||||||
|
* TeXImportFilter.java
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
* License version 2.1, as published by the Free Software Foundation.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
||||||
|
* MA 02111-1307 USA
|
||||||
|
*
|
||||||
|
* Copyright: 2002-2009 by Henrik Just
|
||||||
|
*
|
||||||
|
* All Rights Reserved.
|
||||||
|
*
|
||||||
|
* Version 1.2 (2009-05-19)
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
package org.openoffice.da.comp.writer4latex;
|
||||||
|
|
||||||
|
//import com.sun.star.lib.uno.helper.Factory;
|
||||||
|
import java.io.File;
|
||||||
|
import java.net.URI;
|
||||||
|
|
||||||
|
import com.sun.star.lib.uno.helper.WeakBase;
|
||||||
|
import com.sun.star.document.XDocumentInsertable;
|
||||||
|
import com.sun.star.task.XStatusIndicator;
|
||||||
|
import com.sun.star.text.XTextCursor;
|
||||||
|
import com.sun.star.text.XTextDocument;
|
||||||
|
import com.sun.star.uno.XComponentContext;
|
||||||
|
import com.sun.star.uno.UnoRuntime;
|
||||||
|
import com.sun.star.uno.AnyConverter;
|
||||||
|
|
||||||
|
import com.sun.star.beans.PropertyValue;
|
||||||
|
import com.sun.star.lang.XInitialization;
|
||||||
|
import com.sun.star.container.XNamed;
|
||||||
|
import com.sun.star.document.XImporter;
|
||||||
|
import com.sun.star.document.XFilter;
|
||||||
|
|
||||||
|
/** This class implements an import filter for TeX documents using TeX4ht
|
||||||
|
* It is thus an implementation of the service com.sun.star.document.ImportFilter
|
||||||
|
*/
|
||||||
|
public class TeXImportFilter extends WeakBase implements XInitialization, XNamed, XImporter, XFilter {
|
||||||
|
|
||||||
|
// Constants
|
||||||
|
|
||||||
|
// Identify this service
|
||||||
|
public static final String __implementationName = TeXImportFilter.class.getName();
|
||||||
|
public static final String __serviceName = "com.sun.star.document.ImportFilter";
|
||||||
|
private static final String[] m_serviceNames = { __serviceName };
|
||||||
|
|
||||||
|
// Possible states of the filtering process
|
||||||
|
public static final int FILTERPROC_RUNNING = 0;
|
||||||
|
public static final int FILTERPROC_BREAKING = 1;
|
||||||
|
public static final int FILTERPROC_STOPPED = 2;
|
||||||
|
|
||||||
|
// Global data
|
||||||
|
|
||||||
|
// From constructor
|
||||||
|
private final XComponentContext m_xContext;
|
||||||
|
|
||||||
|
// The filter name
|
||||||
|
private String m_sFilterName;
|
||||||
|
|
||||||
|
// The target document for the import
|
||||||
|
private com.sun.star.text.XTextDocument m_xTargetDoc;
|
||||||
|
|
||||||
|
// The current state of the filtering process
|
||||||
|
private int m_nState;
|
||||||
|
|
||||||
|
/** Construct a new <code>TeXImportFilter</code>
|
||||||
|
*
|
||||||
|
* @param xContext The Component Context
|
||||||
|
*/
|
||||||
|
public TeXImportFilter( XComponentContext xContext ) {
|
||||||
|
m_xContext = xContext;
|
||||||
|
m_sFilterName = "";
|
||||||
|
m_xTargetDoc = null;
|
||||||
|
m_nState = FILTERPROC_STOPPED;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Implement com.sun.star.lang.XServiceInfo:
|
||||||
|
public String getImplementationName() {
|
||||||
|
return __implementationName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean supportsService( String sService ) {
|
||||||
|
int len = m_serviceNames.length;
|
||||||
|
|
||||||
|
for(int i=0; i < len; i++) {
|
||||||
|
if (sService.equals(m_serviceNames[i]))
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String[] getSupportedServiceNames() {
|
||||||
|
return m_serviceNames;
|
||||||
|
}
|
||||||
|
|
||||||
|
// The following methods may be called from multiple threads (eg. if someone wants to cancel the filtering),
|
||||||
|
// thus all access to class members must be synchronized
|
||||||
|
|
||||||
|
// Implement XInitialization:
|
||||||
|
public void initialize( Object[] arguments ) throws com.sun.star.uno.Exception {
|
||||||
|
if (arguments.length>0) {
|
||||||
|
// The first argument contains configuration data, from which we extract the filter name for further reference
|
||||||
|
// We need this to know which flavour of TeX we're supposed to handle
|
||||||
|
PropertyValue[] config = (PropertyValue[]) arguments[0];
|
||||||
|
int nLen = config.length;
|
||||||
|
for (int i=0; i<nLen; i++) {
|
||||||
|
if (config[i].Name.equals("Name")) {
|
||||||
|
synchronized(this) {
|
||||||
|
try {
|
||||||
|
m_sFilterName = AnyConverter.toString(config[i].Value);
|
||||||
|
}
|
||||||
|
catch(com.sun.star.lang.IllegalArgumentException exConvert) {
|
||||||
|
// ignore
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Implement XNamed
|
||||||
|
public String getName() {
|
||||||
|
synchronized(this) {
|
||||||
|
return m_sFilterName;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setName( String sName ) {
|
||||||
|
// must be ignored as we cannot change the filter name
|
||||||
|
}
|
||||||
|
|
||||||
|
// Implement XImporter
|
||||||
|
public void setTargetDocument( com.sun.star.lang.XComponent xDocument ) throws com.sun.star.lang.IllegalArgumentException {
|
||||||
|
// If there's no target document we cannot import into it
|
||||||
|
if (xDocument==null)
|
||||||
|
throw new com.sun.star.lang.IllegalArgumentException("Null pointer");
|
||||||
|
|
||||||
|
// And if it's not a text document we're out of luck too
|
||||||
|
com.sun.star.lang.XServiceInfo xInfo = (com.sun.star.lang.XServiceInfo)UnoRuntime.queryInterface(
|
||||||
|
com.sun.star.lang.XServiceInfo.class, xDocument);
|
||||||
|
if (!xInfo.supportsService("com.sun.star.text.TextDocument"))
|
||||||
|
throw new com.sun.star.lang.IllegalArgumentException("Wrong document type");
|
||||||
|
|
||||||
|
// Otherwise set the target document
|
||||||
|
synchronized(this) {
|
||||||
|
m_xTargetDoc = (com.sun.star.text.XTextDocument)UnoRuntime.queryInterface(
|
||||||
|
com.sun.star.text.XTextDocument.class, xDocument);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Implement XFilter:
|
||||||
|
|
||||||
|
/** Filter (import only) the document given by the media descriptor
|
||||||
|
* According to the service contract, we should understand either of
|
||||||
|
* the properties URL or InputStream, but currently we only use the former.
|
||||||
|
* We also use the property StatusIndicator: OOo internally uses this to
|
||||||
|
* pass around an XStatusIndicator instance, and if it's available we
|
||||||
|
* use it to display a progress bar
|
||||||
|
*
|
||||||
|
* @param mediaDescriptor the Media Descriptor
|
||||||
|
*/
|
||||||
|
public boolean filter(com.sun.star.beans.PropertyValue[] mediaDescriptor) {
|
||||||
|
// Extract values from the MediaDescriptor
|
||||||
|
String sURL = null;
|
||||||
|
XStatusIndicator xStatusIndicator = null;
|
||||||
|
int nLength = mediaDescriptor.length;
|
||||||
|
for (int i=0; i<nLength; i++) {
|
||||||
|
try {
|
||||||
|
if (mediaDescriptor[i].Name.equals("URL")) {
|
||||||
|
sURL = AnyConverter.toString(mediaDescriptor[i].Value);
|
||||||
|
}
|
||||||
|
else if (mediaDescriptor[i].Name.equals("InputStream")) {
|
||||||
|
// Ignore this currently
|
||||||
|
}
|
||||||
|
else if (mediaDescriptor[i].Name.equals("StatusIndicator")) {
|
||||||
|
xStatusIndicator = (XStatusIndicator) AnyConverter.toObject(XStatusIndicator.class, mediaDescriptor[i].Value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (com.sun.star.lang.IllegalArgumentException e) {
|
||||||
|
// AnyConverter failed to convert; ignore this
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (sURL==null) {
|
||||||
|
// Currently we need and URL to import
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Copy the current value of the target document and mark the filtering process as running
|
||||||
|
XTextDocument xText = null;
|
||||||
|
synchronized(this) {
|
||||||
|
if (m_nState!=FILTERPROC_STOPPED) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
xText = m_xTargetDoc;
|
||||||
|
m_nState = FILTERPROC_RUNNING;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Do the import
|
||||||
|
boolean bResult = importTeX(xText,sURL,xStatusIndicator);
|
||||||
|
m_nState = FILTERPROC_STOPPED;
|
||||||
|
return bResult;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Cancel the filtering process. This will not only trigger cancellation, but also wait until it's finished
|
||||||
|
*/
|
||||||
|
public void cancel() {
|
||||||
|
// Change state to "breaking"
|
||||||
|
synchronized(this) {
|
||||||
|
if (m_nState==FILTERPROC_RUNNING) m_nState=FILTERPROC_BREAKING;
|
||||||
|
}
|
||||||
|
|
||||||
|
// And wait until state has changed to "stopped"
|
||||||
|
while (true) {
|
||||||
|
synchronized(this) {
|
||||||
|
if (m_nState==FILTERPROC_STOPPED)
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Private helper methods
|
||||||
|
/** Import a TeX document with TeX4ht
|
||||||
|
* @param xText into this document
|
||||||
|
* @param sURL from the TeX documetn given by this URL
|
||||||
|
*/
|
||||||
|
public boolean importTeX(XTextDocument xText, String sURL, XStatusIndicator xStatus) {
|
||||||
|
int nStep = 0;
|
||||||
|
if (xStatus!=null) {
|
||||||
|
xStatus.start("Writer4LaTeX",10);
|
||||||
|
xStatus.setValue(++nStep);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get the LaTeX file
|
||||||
|
File file = null;
|
||||||
|
try {
|
||||||
|
file = new File(new URI(sURL));
|
||||||
|
}
|
||||||
|
catch (java.net.URISyntaxException e) {
|
||||||
|
// Could not use the URL provided
|
||||||
|
if (xStatus!=null) xStatus.end();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (xStatus!=null) { xStatus.setValue(++nStep); }
|
||||||
|
|
||||||
|
// Protect the ODT file if it already exists
|
||||||
|
String sBaseName = file.getName();
|
||||||
|
if (sBaseName.endsWith(".tex")) { sBaseName = sBaseName.substring(0, sBaseName.length()-4); }
|
||||||
|
File odtFile = new File(file.getParentFile(),sBaseName+".odt");
|
||||||
|
File tempFile = null;
|
||||||
|
if (odtFile.exists()) {
|
||||||
|
try {
|
||||||
|
tempFile = File.createTempFile("w4l", ".tmp", file.getParentFile());
|
||||||
|
}
|
||||||
|
catch (java.io.IOException e) {
|
||||||
|
// Failed to protect the ODT file, give up
|
||||||
|
if (xStatus!=null) xStatus.end();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
odtFile.renameTo(tempFile);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (xStatus!=null) { xStatus.setValue(++nStep); }
|
||||||
|
|
||||||
|
// Execute TeX4ht
|
||||||
|
ExternalApps externalApps = new ExternalApps(m_xContext);
|
||||||
|
externalApps.load();
|
||||||
|
|
||||||
|
if (xStatus!=null) { xStatus.setValue(++nStep); }
|
||||||
|
|
||||||
|
externalApps.execute(ExternalApps.MK4HT, file.getName(), file.getParentFile(), true);
|
||||||
|
|
||||||
|
if (xStatus!=null) { nStep+=5; xStatus.setValue(nStep); }
|
||||||
|
|
||||||
|
// Assemble the URL of the ODT file
|
||||||
|
String sODTURL = sURL;
|
||||||
|
if (sODTURL.endsWith(".tex")) { sODTURL = sODTURL.substring(0, sODTURL.length()-4); }
|
||||||
|
sODTURL += ".odt";
|
||||||
|
|
||||||
|
// This is the only good time to test if we should cancel the import
|
||||||
|
boolean bSuccess = true;
|
||||||
|
synchronized(this) {
|
||||||
|
if (m_nState==FILTERPROC_BREAKING) bSuccess = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (xStatus!=null) {
|
||||||
|
xStatus.end();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (bSuccess) {
|
||||||
|
// Load ODT file into the text document
|
||||||
|
XTextCursor xTextCursor = xText.getText().createTextCursor();
|
||||||
|
XDocumentInsertable xDocInsert = (XDocumentInsertable)
|
||||||
|
UnoRuntime.queryInterface(XDocumentInsertable.class, xTextCursor);
|
||||||
|
try {
|
||||||
|
PropertyValue[] props = new PropertyValue[0];
|
||||||
|
xDocInsert.insertDocumentFromURL(sODTURL, props);
|
||||||
|
}
|
||||||
|
catch (com.sun.star.lang.IllegalArgumentException e) {
|
||||||
|
bSuccess = false;
|
||||||
|
}
|
||||||
|
catch (com.sun.star.io.IOException e) {
|
||||||
|
bSuccess = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
odtFile.delete();
|
||||||
|
// Restore origninal ODT file, if any
|
||||||
|
if (tempFile!=null) {
|
||||||
|
tempFile.renameTo(odtFile);
|
||||||
|
}
|
||||||
|
|
||||||
|
return bSuccess;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -20,7 +20,7 @@
|
||||||
*
|
*
|
||||||
* All Rights Reserved.
|
* All Rights Reserved.
|
||||||
*
|
*
|
||||||
* Version 1.2 (2009-03-26)
|
* Version 1.2 (2009-05-20)
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -66,6 +66,18 @@ public class W4LRegistration {
|
||||||
multiFactory,
|
multiFactory,
|
||||||
regKey);
|
regKey);
|
||||||
}
|
}
|
||||||
|
else if (implName.equals(TeXImportFilter.__implementationName) ) {
|
||||||
|
xSingleServiceFactory = FactoryHelper.getServiceFactory(TeXImportFilter.class,
|
||||||
|
TeXImportFilter.__serviceName,
|
||||||
|
multiFactory,
|
||||||
|
regKey);
|
||||||
|
}
|
||||||
|
else if (implName.equals(TeXDetectService.__implementationName) ) {
|
||||||
|
xSingleServiceFactory = FactoryHelper.getServiceFactory(TeXDetectService.class,
|
||||||
|
TeXDetectService.__serviceName,
|
||||||
|
multiFactory,
|
||||||
|
regKey);
|
||||||
|
}
|
||||||
else if (implName.equals(ConfigurationDialog.__implementationName) ) {
|
else if (implName.equals(ConfigurationDialog.__implementationName) ) {
|
||||||
xSingleServiceFactory = FactoryHelper.getServiceFactory(ConfigurationDialog.class,
|
xSingleServiceFactory = FactoryHelper.getServiceFactory(ConfigurationDialog.class,
|
||||||
ConfigurationDialog.__serviceName,
|
ConfigurationDialog.__serviceName,
|
||||||
|
@ -94,6 +106,10 @@ public class W4LRegistration {
|
||||||
return
|
return
|
||||||
FactoryHelper.writeRegistryServiceInfo(Writer4LaTeX.__implementationName,
|
FactoryHelper.writeRegistryServiceInfo(Writer4LaTeX.__implementationName,
|
||||||
Writer4LaTeX.__serviceName, regKey) &
|
Writer4LaTeX.__serviceName, regKey) &
|
||||||
|
FactoryHelper.writeRegistryServiceInfo(TeXImportFilter.__implementationName,
|
||||||
|
TeXImportFilter.__serviceName, regKey) &
|
||||||
|
FactoryHelper.writeRegistryServiceInfo(TeXDetectService.__implementationName,
|
||||||
|
TeXDetectService.__serviceName, regKey) &
|
||||||
FactoryHelper.writeRegistryServiceInfo(ConfigurationDialog.__implementationName,
|
FactoryHelper.writeRegistryServiceInfo(ConfigurationDialog.__implementationName,
|
||||||
ConfigurationDialog.__serviceName, regKey) &
|
ConfigurationDialog.__serviceName, regKey) &
|
||||||
FactoryHelper.writeRegistryServiceInfo(LogViewerDialog.__implementationName,
|
FactoryHelper.writeRegistryServiceInfo(LogViewerDialog.__implementationName,
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
*
|
*
|
||||||
* All Rights Reserved.
|
* All Rights Reserved.
|
||||||
*
|
*
|
||||||
* Version 1.2 (2009-05-01)
|
* Version 1.2 (2009-05-18)
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -38,14 +38,11 @@ import com.sun.star.frame.XController;
|
||||||
import com.sun.star.frame.XFrame;
|
import com.sun.star.frame.XFrame;
|
||||||
import com.sun.star.frame.XModel;
|
import com.sun.star.frame.XModel;
|
||||||
import com.sun.star.frame.XStorable;
|
import com.sun.star.frame.XStorable;
|
||||||
import com.sun.star.lang.XComponent;
|
|
||||||
import com.sun.star.lib.uno.helper.WeakBase;
|
import com.sun.star.lib.uno.helper.WeakBase;
|
||||||
import com.sun.star.task.XStatusIndicator;
|
import com.sun.star.task.XStatusIndicator;
|
||||||
import com.sun.star.task.XStatusIndicatorFactory;
|
import com.sun.star.task.XStatusIndicatorFactory;
|
||||||
import com.sun.star.ui.dialogs.ExecutableDialogResults;
|
import com.sun.star.ui.dialogs.ExecutableDialogResults;
|
||||||
import com.sun.star.ui.dialogs.XExecutableDialog;
|
import com.sun.star.ui.dialogs.XExecutableDialog;
|
||||||
import com.sun.star.ui.dialogs.XFilePicker;
|
|
||||||
import com.sun.star.ui.dialogs.XFilterManager;
|
|
||||||
import com.sun.star.uno.UnoRuntime;
|
import com.sun.star.uno.UnoRuntime;
|
||||||
import com.sun.star.uno.XComponentContext;
|
import com.sun.star.uno.XComponentContext;
|
||||||
|
|
||||||
|
@ -73,7 +70,6 @@ public final class Writer4LaTeX extends WeakBase
|
||||||
|
|
||||||
// Global data
|
// Global data
|
||||||
private TeXify texify = null;
|
private TeXify texify = null;
|
||||||
private LaTeXImporter latexImporter = null;
|
|
||||||
private PropertyValue[] mediaProps = null;
|
private PropertyValue[] mediaProps = null;
|
||||||
private String sBasePath = null;
|
private String sBasePath = null;
|
||||||
private String sBaseFileName = null;
|
private String sBaseFileName = null;
|
||||||
|
@ -131,12 +127,6 @@ public final class Writer4LaTeX extends WeakBase
|
||||||
return this;
|
return this;
|
||||||
else if ( aURL.Path.compareTo("ViewLog") == 0 )
|
else if ( aURL.Path.compareTo("ViewLog") == 0 )
|
||||||
return this;
|
return this;
|
||||||
else if ( aURL.Path.compareTo("UseBibTeX") == 0 )
|
|
||||||
return this;
|
|
||||||
else if ( aURL.Path.compareTo("ImportBibTeX") == 0 )
|
|
||||||
return this;
|
|
||||||
else if ( aURL.Path.compareTo("ImportLaTeX") == 0 )
|
|
||||||
return this;
|
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -185,20 +175,6 @@ public final class Writer4LaTeX extends WeakBase
|
||||||
viewLog();
|
viewLog();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if ( aURL.Path.compareTo("UseBibTeX") == 0 ) {
|
|
||||||
org.openoffice.da.comp.w2lcommon.helper.MessageBox msgBox = new org.openoffice.da.comp.w2lcommon.helper.MessageBox(m_xContext);
|
|
||||||
msgBox.showMessage("Writer4LaTeX", "This feature has not been implemented yet");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
else if ( aURL.Path.compareTo("ImportBibTeX") == 0 ) {
|
|
||||||
org.openoffice.da.comp.w2lcommon.helper.MessageBox msgBox = new org.openoffice.da.comp.w2lcommon.helper.MessageBox(m_xContext);
|
|
||||||
msgBox.showMessage("Writer4LaTeX", "This feature has not been implemented yet");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
else if ( aURL.Path.compareTo("ImportLaTeX") == 0 ) {
|
|
||||||
importLaTeX();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -295,59 +271,7 @@ public final class Writer4LaTeX extends WeakBase
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void importLaTeX() {
|
|
||||||
// Display the file dialog
|
|
||||||
String sURL = browseForLaTeXFile();
|
|
||||||
if (sURL!=null) {
|
|
||||||
if (latexImporter==null) {
|
|
||||||
latexImporter = new LaTeXImporter(m_xContext);
|
|
||||||
}
|
|
||||||
latexImporter.importLaTeX(sURL);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Some utility methods
|
// Some utility methods
|
||||||
|
|
||||||
private String browseForLaTeXFile() {
|
|
||||||
String sPath = null;
|
|
||||||
XComponent xComponent = null;
|
|
||||||
try {
|
|
||||||
// Create FilePicker
|
|
||||||
Object filePicker = m_xContext.getServiceManager()
|
|
||||||
.createInstanceWithContext("com.sun.star.ui.dialogs.FilePicker", m_xContext);
|
|
||||||
XFilePicker xFilePicker = (XFilePicker)
|
|
||||||
UnoRuntime.queryInterface(XFilePicker.class, filePicker);
|
|
||||||
xComponent = (XComponent)
|
|
||||||
UnoRuntime.queryInterface(XComponent.class, xFilePicker);
|
|
||||||
|
|
||||||
XFilterManager xFilterManager = (XFilterManager) UnoRuntime.queryInterface(XFilterManager.class, xFilePicker);
|
|
||||||
xFilterManager.appendFilter("LaTeX","*.tex");
|
|
||||||
|
|
||||||
|
|
||||||
// Display the FilePicker
|
|
||||||
XExecutableDialog xExecutable = (XExecutableDialog)
|
|
||||||
UnoRuntime.queryInterface(XExecutableDialog.class, xFilePicker);
|
|
||||||
|
|
||||||
// Get the path
|
|
||||||
if (xExecutable.execute() == ExecutableDialogResults.OK) {
|
|
||||||
String[] sPathList = xFilePicker.getFiles();
|
|
||||||
if (sPathList.length > 0) {
|
|
||||||
sPath = sPathList[0];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (com.sun.star.uno.Exception e) {
|
|
||||||
}
|
|
||||||
finally{
|
|
||||||
// Always dispose the FilePicker component
|
|
||||||
if (xComponent!=null) {
|
|
||||||
xComponent.dispose();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return sPath;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
private void prepareMediaProperties() {
|
private void prepareMediaProperties() {
|
||||||
// Create inital media properties
|
// Create inital media properties
|
||||||
mediaProps = new PropertyValue[2];
|
mediaProps = new PropertyValue[2];
|
||||||
|
@ -533,19 +457,6 @@ public final class Writer4LaTeX extends WeakBase
|
||||||
|
|
||||||
registry.disposeRegistryView(view);
|
registry.disposeRegistryView(view);
|
||||||
|
|
||||||
// Write out the filter data
|
|
||||||
/*PropertyValue[] props = filterData.toArray();
|
|
||||||
for (int i=0; i<props.length; i++) {
|
|
||||||
String sName = props[i].Name;
|
|
||||||
Object value = props[i].Value;
|
|
||||||
if (value instanceof String) {
|
|
||||||
System.out.println(sName+"="+(String)value);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
System.out.println(sName+"= ???");
|
|
||||||
}
|
|
||||||
}*/
|
|
||||||
|
|
||||||
// Update the media properties with the FilterData
|
// Update the media properties with the FilterData
|
||||||
PropertyHelper helper = new PropertyHelper(mediaProps);
|
PropertyHelper helper = new PropertyHelper(mediaProps);
|
||||||
helper.put("FilterData",filterData.toArray());
|
helper.put("FilterData",filterData.toArray());
|
||||||
|
|
|
@ -33,7 +33,7 @@ public class ConverterFactory {
|
||||||
|
|
||||||
// Version information
|
// Version information
|
||||||
private static final String VERSION = "1.1.1";
|
private static final String VERSION = "1.1.1";
|
||||||
private static final String DATE = "2008-05-01";
|
private static final String DATE = "2008-05-18";
|
||||||
|
|
||||||
/** Return version information
|
/** Return version information
|
||||||
* @return the Writer2LaTeX version in the form
|
* @return the Writer2LaTeX version in the form
|
||||||
|
|
|
@ -22,8 +22,8 @@
|
||||||
<value>com.sun.star.text.TextDocument</value>
|
<value>com.sun.star.text.TextDocument</value>
|
||||||
</prop>
|
</prop>
|
||||||
<prop oor:name="Title" oor:type="xs:string">
|
<prop oor:name="Title" oor:type="xs:string">
|
||||||
<value xml:lang="en-US">Run LaTeX...</value>
|
<value xml:lang="en-US">Run ~LaTeX...</value>
|
||||||
<value xml:lang="da">Kør LaTeX...</value>
|
<value xml:lang="da">Kør ~LaTeX...</value>
|
||||||
</prop>
|
</prop>
|
||||||
<prop oor:name="Target" oor:type="xs:string">
|
<prop oor:name="Target" oor:type="xs:string">
|
||||||
<value>_self</value>
|
<value>_self</value>
|
||||||
|
@ -40,8 +40,8 @@
|
||||||
<value>com.sun.star.text.TextDocument</value>
|
<value>com.sun.star.text.TextDocument</value>
|
||||||
</prop>
|
</prop>
|
||||||
<prop oor:name="Title" oor:type="xs:string">
|
<prop oor:name="Title" oor:type="xs:string">
|
||||||
<value xml:lang="en-US">Run LaTeX directly</value>
|
<value xml:lang="en-US">Run LaTe~X directly</value>
|
||||||
<value xml:lang="da">Kør LaTeX direkte</value>
|
<value xml:lang="da">Kør LaTe~X direkte</value>
|
||||||
</prop>
|
</prop>
|
||||||
<prop oor:name="Target" oor:type="xs:string">
|
<prop oor:name="Target" oor:type="xs:string">
|
||||||
<value>_self</value>
|
<value>_self</value>
|
||||||
|
@ -58,8 +58,8 @@
|
||||||
<value>com.sun.star.text.TextDocument</value>
|
<value>com.sun.star.text.TextDocument</value>
|
||||||
</prop>
|
</prop>
|
||||||
<prop oor:name="Title" oor:type="xs:string">
|
<prop oor:name="Title" oor:type="xs:string">
|
||||||
<value xml:lang="en-US">View Log files</value>
|
<value xml:lang="en-US">View Lo~g files</value>
|
||||||
<value xml:lang="da">Vis logfiler</value>
|
<value xml:lang="da">Vis lo~gfiler</value>
|
||||||
</prop>
|
</prop>
|
||||||
<prop oor:name="Target" oor:type="xs:string">
|
<prop oor:name="Target" oor:type="xs:string">
|
||||||
<value>_self</value>
|
<value>_self</value>
|
||||||
|
@ -71,69 +71,6 @@
|
||||||
<value/>
|
<value/>
|
||||||
</prop>
|
</prop>
|
||||||
</node>
|
</node>
|
||||||
<!--later:
|
|
||||||
<node oor:name="menu4" oor:op="replace">
|
|
||||||
<prop oor:name="Context" oor:type="xs:string">
|
|
||||||
<value>com.sun.star.text.TextDocument</value>
|
|
||||||
</prop>
|
|
||||||
<prop oor:name="Title" oor:type="xs:string">
|
|
||||||
<value xml:lang="en-US">Use BibTeX files...</value>
|
|
||||||
<value xml:lang="da">Anvend BibTeX filer...</value>
|
|
||||||
</prop>
|
|
||||||
<prop oor:name="Target" oor:type="xs:string">
|
|
||||||
<value>_self</value>
|
|
||||||
</prop>
|
|
||||||
<prop oor:name="URL" oor:type="xs:string">
|
|
||||||
<value>org.openoffice.da.writer4latex:UseBibTeX</value>
|
|
||||||
</prop>
|
|
||||||
<prop oor:name="ImageIdentifier" oor:type="xs:string">
|
|
||||||
<value/>
|
|
||||||
</prop>
|
|
||||||
</node>
|
|
||||||
-->
|
|
||||||
<node oor:name="menu5" oor:op="replace">
|
|
||||||
<prop oor:name="URL" oor:type="xs:string">
|
|
||||||
<value>private:separator</value>
|
|
||||||
</prop>
|
|
||||||
</node>
|
|
||||||
<node oor:name="menu6" oor:op="replace">
|
|
||||||
<prop oor:name="Context" oor:type="xs:string">
|
|
||||||
<value>com.sun.star.text.TextDocument</value>
|
|
||||||
</prop>
|
|
||||||
<prop oor:name="Title" oor:type="xs:string">
|
|
||||||
<value xml:lang="en-US">Import LaTeX...</value>
|
|
||||||
<value xml:lang="da">Importer LaTeX...</value>
|
|
||||||
</prop>
|
|
||||||
<prop oor:name="Target" oor:type="xs:string">
|
|
||||||
<value>_self</value>
|
|
||||||
</prop>
|
|
||||||
<prop oor:name="URL" oor:type="xs:string">
|
|
||||||
<value>org.openoffice.da.writer4latex:ImportLaTeX</value>
|
|
||||||
</prop>
|
|
||||||
<prop oor:name="ImageIdentifier" oor:type="xs:string">
|
|
||||||
<value/>
|
|
||||||
</prop>
|
|
||||||
</node>
|
|
||||||
<!--later:
|
|
||||||
<node oor:name="menu7" oor:op="replace">
|
|
||||||
<prop oor:name="Context" oor:type="xs:string">
|
|
||||||
<value>com.sun.star.text.TextDocument</value>
|
|
||||||
</prop>
|
|
||||||
<prop oor:name="Title" oor:type="xs:string">
|
|
||||||
<value xml:lang="en-US">Import BibTeX...</value>
|
|
||||||
<value xml:lang="da">Importer BibTeX...</value>
|
|
||||||
</prop>
|
|
||||||
<prop oor:name="Target" oor:type="xs:string">
|
|
||||||
<value>_self</value>
|
|
||||||
</prop>
|
|
||||||
<prop oor:name="URL" oor:type="xs:string">
|
|
||||||
<value>org.openoffice.da.writer4latex:ImportBibTeX</value>
|
|
||||||
</prop>
|
|
||||||
<prop oor:name="ImageIdentifier" oor:type="xs:string">
|
|
||||||
<value/>
|
|
||||||
</prop>
|
|
||||||
</node>
|
|
||||||
-->
|
|
||||||
</node>
|
</node>
|
||||||
</node>
|
</node>
|
||||||
</node>
|
</node>
|
||||||
|
|
|
@ -29,6 +29,14 @@
|
||||||
manifest:full-path="Paths.xcu"
|
manifest:full-path="Paths.xcu"
|
||||||
manifest:media-type="application/vnd.sun.star.configuration-data"/>
|
manifest:media-type="application/vnd.sun.star.configuration-data"/>
|
||||||
|
|
||||||
|
<manifest:file-entry
|
||||||
|
manifest:full-path="w4l_types.xcu"
|
||||||
|
manifest:media-type="application/vnd.sun.star.configuration-data"/>
|
||||||
|
|
||||||
|
<manifest:file-entry
|
||||||
|
manifest:full-path="w4l_filters.xcu"
|
||||||
|
manifest:media-type="application/vnd.sun.star.configuration-data"/>
|
||||||
|
|
||||||
<manifest:file-entry
|
<manifest:file-entry
|
||||||
manifest:full-path="writer4latex.jar"
|
manifest:full-path="writer4latex.jar"
|
||||||
manifest:media-type="application/vnd.sun.star.uno-component;type=Java"/>
|
manifest:media-type="application/vnd.sun.star.uno-component;type=Java"/>
|
||||||
|
|
20
source/oxt/writer4latex/w4l_filters.xcu
Normal file
20
source/oxt/writer4latex/w4l_filters.xcu
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<oor:component-data xmlns:oor="http://openoffice.org/2001/registry" xmlns:xs="http://www.w3.org/2001/XMLSchema" oor:package="org.openoffice.TypeDetection" oor:name="Filter">
|
||||||
|
|
||||||
|
<node oor:name="Filters">
|
||||||
|
|
||||||
|
<node oor:name="org.openoffice.da.writer4latex.latex" oor:op="replace" oor:finalized="true" oor:mandatory="true">
|
||||||
|
<prop oor:name="UIName"><value>LaTeX</value></prop>
|
||||||
|
<prop oor:name="Type"><value>org.openoffice.da.writer4latex.LaTeX_File</value></prop>
|
||||||
|
<prop oor:name="DocumentService"><value>com.sun.star.text.TextDocument</value></prop>
|
||||||
|
<prop oor:name="FilterService"><value>org.openoffice.da.comp.writer4latex.TeXImportFilter</value></prop>
|
||||||
|
<prop oor:name="UIComponent"/>
|
||||||
|
<prop oor:name="Flags"><value>IMPORT TEMPLATE TEMPLATEPATH ALIEN 3RDPARTYFILTER</value></prop>
|
||||||
|
<prop oor:name="UserData"/>
|
||||||
|
<prop oor:name="FileFormatVersion"><value>0</value></prop>
|
||||||
|
<prop oor:name="TemplateName"/>
|
||||||
|
</node>
|
||||||
|
|
||||||
|
</node>
|
||||||
|
|
||||||
|
</oor:component-data>
|
18
source/oxt/writer4latex/w4l_types.xcu
Normal file
18
source/oxt/writer4latex/w4l_types.xcu
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<oor:component-data xmlns:oor="http://openoffice.org/2001/registry" xmlns:xs="http://www.w3.org/2001/XMLSchema" oor:package="org.openoffice.TypeDetection" oor:name="Types">
|
||||||
|
|
||||||
|
<node oor:name="Types">
|
||||||
|
|
||||||
|
<node oor:name="org.openoffice.da.writer4latex.LaTeX_File" oor:op="replace" oor:finalized="true" oor:mandatory="true">
|
||||||
|
<prop oor:name="UIName"><value>LaTeX File</value></prop>
|
||||||
|
<prop oor:name="MediaType"/>
|
||||||
|
<prop oor:name="ClipboardFormat"/>
|
||||||
|
<prop oor:name="URLPattern"/>
|
||||||
|
<prop oor:name="Extensions"><value>tex</value></prop>
|
||||||
|
<prop oor:name="Preferred"><value>true</value></prop>
|
||||||
|
<prop oor:name="DetectService"><value>org.openoffice.da.comp.writer4latex.TeXDetectService</value></prop>
|
||||||
|
<prop oor:name="PreferredFilter"><value>org.openoffice.da.writer4latex.latex</value></prop>
|
||||||
|
</node>
|
||||||
|
</node>
|
||||||
|
|
||||||
|
</oor:component-data>
|
Loading…
Add table
Reference in a new issue