Replace w4l menu with toolbar + ensure compatibility of toolbars with AOO4

git-svn-id: svn://svn.code.sf.net/p/writer2latex/code/trunk@186 f0f2a975-2e09-46c8-9428-3b39399b9f3c
This commit is contained in:
henrikjust 2014-10-23 12:47:27 +00:00
parent 934dd30696
commit 049bf052bc
16 changed files with 288 additions and 76 deletions

View file

@ -2,6 +2,9 @@ Changelog for Writer2LaTeX version 1.4 -> 1.6
---------- version 1.5.1 ----------
[w4l] Replaced menu with a toolbar with four buttons: Insert BibTeX citation (not yet implemented), publish to LaTeX,
view log files and edit custom format. (Publishing without showing the dialog is currently removed.)
[w2x] Added toolbar with four buttons: Publish directly to XHTML, publish directly to EPUB, edit EPUB metadata
and edit custom configuration. Publishing directly implies that the export dialog is not displayed. Instead
the document will be exported to the same directory as the currently open document and with the same name.

View file

@ -16,11 +16,11 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
* Copyright: 2002-2011 by Henrik Just
* Copyright: 2002-2014 by Henrik Just
*
* All Rights Reserved.
*
* Version 1.2 (2011-03-23)
* Version 1.6 (2014-10-23)
*
*/
@ -134,6 +134,8 @@ public final class Writer4LaTeX extends WeakBase
return this;
else if ( aURL.Path.compareTo("ViewLog") == 0 )
return this;
else if ( aURL.Path.compareTo("InsertBibTeX") == 0 )
return this;
}
return null;
}
@ -174,6 +176,10 @@ public final class Writer4LaTeX extends WeakBase
viewLog();
return;
}
else if ( aURL.Path.compareTo("InsertBibTeX") == 0 ) {
insertBibTeX();
return;
}
}
}
@ -339,6 +345,11 @@ public final class Writer4LaTeX extends WeakBase
}
}
}
private void insertBibTeX() {
MessageBox msgBox = new MessageBox(m_xContext, m_xFrame);
msgBox.showMessage("Writer4LaTeX","This feature is not implemented yet");
}
// Some utility methods
private void prepareMediaProperties() {

View file

@ -20,7 +20,7 @@
*
* All Rights Reserved.
*
* Version 1.6 (2014-10-22)
* Version 1.6 (2014-10-23)
*
*/
@ -33,7 +33,7 @@ public class ConverterFactory {
// Version information
private static final String VERSION = "1.5.1";
private static final String DATE = "2014-10-22";
private static final String DATE = "2014-10-23";
/** Return the Writer2LaTeX version in the form
* (major version).(minor version).(patch level)<br/>

View file

@ -2,78 +2,82 @@
<oor:component-data xmlns:oor="http://openoffice.org/2001/registry" xmlns:xs="http://www.w3.org/2001/XMLSchema" oor:name="Addons" oor:package="org.openoffice.Office">
<!-- Defines the menus and toolbars provided by Writer4LaTeX -->
<node oor:name="AddonUI">
<node oor:name="OfficeMenuBar">
<node oor:name="org.openoffice.da.writer4latex" oor:op="fuse">
<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>LaTe~X</value>
</prop>
<prop oor:name="Target" oor:type="xs:string">
<value>_self</value>
</prop>
<prop oor:name="ImageIdentifier" oor:type="xs:string">
<value/>
</prop>
<node oor:name="Submenu">
<node oor:name="menu01" 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">Run ~LaTeX...</value>
<value xml:lang="da">K&#x00F8;r ~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:ProcessDocument</value>
</prop>
<prop oor:name="ImageIdentifier" oor:type="xs:string">
<value/>
</prop>
</node>
<node oor:name="menu02" 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">Run LaTe~X directly</value>
<value xml:lang="da">K&#x00F8;r LaTe~X direkte</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:ProcessDirectly</value>
</prop>
<prop oor:name="ImageIdentifier" oor:type="xs:string">
<value/>
</prop>
</node>
<node oor:name="menu03" 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">View Lo~g files</value>
<value xml:lang="da">Vis lo~gfiler</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:ViewLog</value>
</prop>
<prop oor:name="ImageIdentifier" oor:type="xs:string">
<value/>
</prop>
</node>
</node>
</node>
</node>
<node oor:name="OfficeToolBar">
<node oor:name="org.openoffice.da.writer4latex.OfficeToolBar" oor:op="replace">
<node oor:name="button1" 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">Insert BibTeX citation</value>
<value xml:lang="da">Indsæt BibTeX-reference</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:InsertBibTeX</value>
</prop>
<prop oor:name="ImageIdentifier" oor:type="xs:string">
<value>%origin%/icons/bibtex</value>
</prop>
</node>
<node oor:name="button2" 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">Publish to LaTeX</value>
<value xml:lang="da">Publicer til 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:ProcessDocument</value>
</prop>
<prop oor:name="ImageIdentifier" oor:type="xs:string">
<value>%origin%/icons/latex</value>
</prop>
</node>
<node oor:name="button3" 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">View log files</value>
<value xml:lang="da">Vis logfiler</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:ViewLog</value>
</prop>
<prop oor:name="ImageIdentifier" oor:type="xs:string">
<value>%origin%/icons/log</value>
</prop>
</node>
<node oor:name="button4" 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">Edit custom format</value>
<value xml:lang="da">Rediger brugerdefineret format</value>
</prop>
<prop oor:name="Target" oor:type="xs:string">
<value>_self</value>
</prop>
<prop oor:name="URL" oor:type="xs:string">
<value>.uno:OptionsTreeDialog?OptionsPageURL:string=%origin%/W2LDialogs2/Documentclass.xdl</value>
</prop>
<prop oor:name="ImageIdentifier" oor:type="xs:string">
<value>%origin%/icons/custom</value>
</prop>
</node>
</node>
</node>
</node>
</oor:component-data>

View file

@ -0,0 +1,88 @@
<?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:name="Addons" oor:package="org.openoffice.Office">
<!-- Defines the menus and toolbars provided by Writer4LaTeX -->
<node oor:name="AddonUI">
<node oor:name="OfficeToolBar">
<node oor:name="org.openoffice.da.writer4latex.OfficeToolBar.AOO4" oor:op="replace">
<prop oor:name="Title" oor:type="xs:string">
<value xml:lang="en-US">Writer4LaTeX</value>
</prop>
<node oor:name="ToolBarItems">
<node oor:name="button1" 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">Insert BibTeX citation</value>
<value xml:lang="da">Indsæt BibTeX-reference</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:InsertBibTeX</value>
</prop>
<prop oor:name="ImageIdentifier" oor:type="xs:string">
<value>%origin%/icons/bibtex</value>
</prop>
</node>
<node oor:name="button2" 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">Publish to LaTeX</value>
<value xml:lang="da">Publicer til 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:ProcessDocument</value>
</prop>
<prop oor:name="ImageIdentifier" oor:type="xs:string">
<value>%origin%/icons/latex</value>
</prop>
</node>
<node oor:name="button3" 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">View log files</value>
<value xml:lang="da">Vis logfiler</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:ViewLog</value>
</prop>
<prop oor:name="ImageIdentifier" oor:type="xs:string">
<value>%origin%/icons/log</value>
</prop>
</node>
<node oor:name="button4" 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">Edit custom format</value>
<value xml:lang="da">Rediger brugerdefineret format</value>
</prop>
<prop oor:name="Target" oor:type="xs:string">
<value>_self</value>
</prop>
<prop oor:name="URL" oor:type="xs:string">
<value>.uno:OptionsTreeDialog?OptionsPageURL:string=%origin%/W2LDialogs2/Documentclass.xdl</value>
</prop>
<prop oor:name="ImageIdentifier" oor:type="xs:string">
<value>%origin%/icons/custom</value>
</prop>
</node>
</node>
</node>
</node>
</node>
</oor:component-data>

View file

@ -8,6 +8,14 @@
<manifest:file-entry
manifest:full-path="Addons.xcu"
manifest:media-type="application/vnd.sun.star.configuration-data"/>
<manifest:file-entry
manifest:full-path="AddonsAOO4.xcu"
manifest:media-type="application/vnd.sun.star.configuration-data"/>
<manifest:file-entry
manifest:full-path="Office/UI/WriterWindowState.xcu"
manifest:media-type="application/vnd.sun.star.configuration-data"/>
<manifest:file-entry
manifest:full-path="OptionPages.xcu"

View file

@ -0,0 +1,15 @@
<?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:name="WriterWindowState"
oor:package="org.openoffice.Office.UI">
<node oor:name="UIElements">
<node oor:name="States">
<node oor:name="private:resource/toolbar/addon_org.openoffice.da.writer4latex.OfficeToolBar" oor:op="replace">
<prop oor:name="UIName" oor:type="xs:string">
<value>Writer4LaTeX</value>
</prop>
</node>
</node>
</node>
</oor:component-data>

View file

@ -0,0 +1,83 @@
<?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:name="Addons" oor:package="org.openoffice.Office">
<!-- Defines the menus and toolbars provided by Writer4LaTeX -->
<node oor:name="AddonUI">
<node oor:name="OfficeToolBar">
<node oor:name="org.openoffice.da.writer4latex.OfficeToolBar" oor:op="replace">
<node oor:name="button1" 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">Insert BibTeX citation</value>
<value xml:lang="da">Indsæt BibTeX-reference</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:InsertBibTeX</value>
</prop>
<prop oor:name="ImageIdentifier" oor:type="xs:string">
<value>%origin%/icons/bibtex</value>
</prop>
</node>
<node oor:name="button2" 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">Publish to LaTeX</value>
<value xml:lang="da">Publicer til 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:ProcessDocument</value>
</prop>
<prop oor:name="ImageIdentifier" oor:type="xs:string">
<value>%origin%/icons/latex</value>
</prop>
</node>
<node oor:name="button3" 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">View log files</value>
<value xml:lang="da">Vis logfiler</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:ViewLog</value>
</prop>
<prop oor:name="ImageIdentifier" oor:type="xs:string">
<value>%origin%/icons/log</value>
</prop>
</node>
<node oor:name="button4" 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">Edit custom format</value>
<value xml:lang="da">Rediger brugerdefineret format</value>
</prop>
<prop oor:name="Target" oor:type="xs:string">
<value>_self</value>
</prop>
<prop oor:name="URL" oor:type="xs:string">
<value>.uno:OptionsTreeDialog?OptionsPageURL:string=%origin%/W2LDialogs2/Documentclass.xdl</value>
</prop>
<prop oor:name="ImageIdentifier" oor:type="xs:string">
<value>%origin%/icons/custom</value>
</prop>
</node>
</node>
</node>
</node>
</oor:component-data>

Binary file not shown.

After

Width:  |  Height:  |  Size: 890 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 890 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 890 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 890 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB