A few XeTeX and Writer4LaTeX changes

git-svn-id: svn://svn.code.sf.net/p/writer2latex/code/trunk@12 f0f2a975-2e09-46c8-9428-3b39399b9f3c
This commit is contained in:
henrikjust 2009-04-01 20:33:34 +00:00
parent 9241a44f6c
commit 42236bbce5
5 changed files with 45 additions and 5 deletions

View file

@ -158,6 +158,10 @@ public final class Writer4LaTeX extends WeakBase
if (updateMediaProperties()) {
process();
}
else {
MessageBox msgBox = new MessageBox(m_xContext, m_xFrame);
msgBox.showMessage("Writer4LaTeX Error","Please install Writer2LaTeX version 1.0 or later");
}
}
else {
warnNotSaved();
@ -169,6 +173,10 @@ public final class Writer4LaTeX extends WeakBase
if (mediaProps!=null || updateMediaProperties()) {
process();
}
else {
MessageBox msgBox = new MessageBox(m_xContext, m_xFrame);
msgBox.showMessage("Writer4LaTeX Error","Please install Writer2LaTeX version 1.0 or later");
}
}
else {
warnNotSaved();
@ -250,6 +258,9 @@ public final class Writer4LaTeX extends WeakBase
else if (sBackend=="dvips") {
texify.process(file, TeXify.DVIPS, true);
}
else if (sBackend=="xetex") {
texify.process(file, TeXify.XETEX, true);
}
else if (sBackend=="generic") {
texify.process(file, TeXify.GENERIC, true);
}
@ -303,6 +314,12 @@ public final class Writer4LaTeX extends WeakBase
// Display options dialog
Object dialog = m_xContext.getServiceManager()
.createInstanceWithContext("org.openoffice.da.writer2latex.LaTeXOptionsDialog", m_xContext);
// If Writer2LaTeX is not installed, this will return null
if (dialog==null) {
mediaProps = null;
return false;
}
XPropertyAccess xPropertyAccess = (XPropertyAccess)
UnoRuntime.queryInterface(XPropertyAccess.class, dialog);