--- writer2latex-1.0.2.orig/debian/rules
+++ writer2latex-1.0.2/debian/rules
@@ -0,0 +1,117 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+#
+# This file was originally written by Joey Hess and Craig Small.
+# As a special exception, when this file is copied by dh-make into a
+# dh-make output file, you may use that output file without restriction.
+# This special exception was added by Craig Small in version 0.37 of dh-make.
+#
+# Modified to make a template file for a multi-binary package with separated
+# build-arch and build-indep targets by Bill Allombert 2001
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+# This has to be exported to make some magic below work.
+export DH_OPTIONS
+
+include /usr/share/dpatch/dpatch.make
+
+export JAVA_HOME=/usr/lib/jvm/default-java
+
+configure: configure-stamp
+configure-stamp: patch-stamp
+ dh_testdir
+ touch configure-stamp
+
+
+build: build-arch build-indep
+
+build-arch: build-arch-stamp
+build-arch-stamp: configure-stamp
+
+ touch $@
+
+build-indep: build-indep-stamp
+build-indep-stamp: configure-stamp
+
+ ant -DURE_CLASSES=/usr/lib/ure/share/java -DOFFICE_CLASSES=/usr/lib/libreoffice/program/classes jar
+ ant javadoc
+ ant oxt
+ touch $@
+
+clean: unpatch
+ dh_testdir
+ dh_testroot
+ rm -f build-arch-stamp build-indep-stamp configure-stamp
+
+ ant clean
+
+ dh_clean
+
+install: install-indep install-arch
+install-indep:
+ dh_testdir
+ dh_testroot
+ dh_clean -k -i
+ dh_installdirs -i
+
+ install -D -m755 debian/libreoffice-writer2latex.script.bug \
+ debian/libreoffice-writer2latex/usr/share/bug/libreoffice-writer2latex/script
+
+ dh_install -i
+
+ # fix up user-manual.odt (#610312)
+ t=`mktemp -q -d`; \
+ cd $$t && unzip $(CURDIR)/source/distro/doc/user-manual.odt && \
+ perl -pi -e 's#Generic Printer##' settings.xml && \
+ perl -pi -e 's#VAH+/0dlbmVyaWMgUHJpbnRlcgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAU0dFTlBSVAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAWAAMAmgAAAAAAAAABAAhSAAAEdAAASm9iRGF0YSAxCnByaW50ZXI9R2VuZXJpYyBQcmludGVyCm9yaWVudGF0aW9uPVBvcnRyYWl0CmNvcGllcz0xCm1hcmdpbmRhanVzdG1lbnQ9MCwwLDAsMApjb2xvcmRlcHRoPTI0CnBzbGV2ZWw9MApjb2xvcmRldmljZT0wClBQRENvbnRleERhdGEKUGFnZVNpemU6QTQAAA==##' settings.xml && \
+ zip -r $(CURDIR)/debian/writer2latex-manual/usr/share/doc/writer2latex/manual/user-manual.odt settings.xml
+
+ mkdir -p debian/libreoffice-writer2latex/usr/lib/libreoffice/share/extensions/writer2latex
+ cd debian/libreoffice-writer2latex/usr/lib/libreoffice/share/extensions/writer2latex && \
+ unzip -o $(CURDIR)/target/lib/writer2latex.oxt
+ mkdir -p debian/libreoffice-writer2xhtml/usr/lib/libreoffice/share/extensions/writer2xhtml
+ cd debian/libreoffice-writer2xhtml/usr/lib/libreoffice/share/extensions/writer2xhtml && \
+ unzip -o $(CURDIR)/target/lib/writer2xhtml.oxt
+
+install-arch:
+ dh_testdir
+ dh_testroot
+ dh_clean -k -s
+ dh_installdirs -s
+
+ dh_install -s
+
+binary-common:
+ dh_testdir
+ dh_testroot
+ dh_installchangelogs source/distro/History.txt
+ dh_installdocs
+ dh_installexamples -pwriter2latex source/distro/samples/*
+ dh_installman
+ dh_installdebconf
+ dh_link
+ dh_strip
+ dh_compress -X.odt
+ dh_fixperms
+ unset DH_OPTIONS; dh_installtex -p writer2latex
+# dh_perl
+# dh_nativejava
+ dh_lintian
+ dh_makeshlibs
+ dh_installdeb
+ dh_shlibdeps
+ dh_gencontrol
+ dh_md5sums
+ dh_builddeb
+
+binary-indep: build-indep install-indep
+ $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
+
+binary-arch: build-arch install-arch
+ #$(MAKE) -f debian/rules DH_OPTIONS=-s binary-common
+
+binary: binary-arch binary-indep
+.PHONY: build clean binary-indep binary-arch binary install install-indep install-arch configure
--- writer2latex-1.0.2.orig/debian/NEWS
+++ writer2latex-1.0.2/debian/NEWS
@@ -0,0 +1,11 @@
+writer2latex (0.5.0.1-fix1-1) unstable; urgency=low
+
+ * writer2latex 0.5.0.1 split the writer2latex and the writer2xhtml
+ extensions. When you used the XHTML part of openoffice.org-writer2latex
+ so far and want to continue it instead you should install
+ openoffice.org-writer2xhtml.
+ Thus you can also remove this package and install
+ openoffice.org-writer2xhtml if you just need XHTML export but not a LaTeX
+ one.
+
+ -- Rene Engelhard Tue, 29 Jul 2008 01:09:34 +0200
--- writer2latex-1.0.2.orig/debian/libreoffice-writer2xhtml.script.bug
+++ writer2latex-1.0.2/debian/libreoffice-writer2xhtml.script.bug
@@ -0,0 +1,4 @@
+#!/bin/sh
+# this is a legacy package, so we need to find it first...
+id=`/usr/lib/openoffice/program/unopkg list --shared | grep Identifier:.*writer2latex | cut -d":" -f2`
+/usr/lib/openoffice/program/unopkg list --shared $id >&3
--- writer2latex-1.0.2.orig/debian/libreoffice-writer2latex.script.bug
+++ writer2latex-1.0.2/debian/libreoffice-writer2latex.script.bug
@@ -0,0 +1,4 @@
+#!/bin/sh
+# this is a legacy package, so we need to find it first...
+id=`/usr/lib/openoffice/program/unopkg list --shared | grep Identifier:.*writer2latex | cut -d":" -f2`
+/usr/lib/openoffice/program/unopkg list --shared $id >&3
--- writer2latex-1.0.2.orig/debian/changelog
+++ writer2latex-1.0.2/debian/changelog
@@ -0,0 +1,377 @@
+writer2latex (1.0.2-10ubuntu1) saucy; urgency=low
+
+ * Merge from Debian unstable. Remaining changes:
+ - (Build-)depend on default-jre/-jdk.
+ - debian/rules: Change the path of JAVA_HOME to suit with the
+ gcj-jdk -> default-jdk transition.
+
+ -- Logan Rosen Mon, 06 May 2013 15:03:46 -0400
+
+writer2latex (1.0.2-10) unstable; urgency=low
+
+ * upload to unstable
+
+ -- Rene Engelhard Fri, 19 Apr 2013 00:59:31 +0200
+
+writer2latex (1.0.2-9ubuntu1) raring; urgency=low
+
+ * Merge from Debian experimental. Remaining changes:
+ - (Build-)depend on default-jre/-jdk.
+ - debian/rules: Change the path of JAVA_HOME to suit with the
+ gcj-jdk -> default-jdk transition.
+
+ -- Logan Rosen Mon, 22 Apr 2013 22:58:37 -0400
+
+writer2latex (1.0.2-9) experimental; urgency=low
+
+ * "steal" patch from RedHat to adapt to LO 4.0 API Changes
+
+ -- Rene Engelhard Mon, 01 Apr 2013 19:08:45 +0200
+
+writer2latex (1.0.2-8ubuntu1) precise; urgency=low
+
+ * Merge from Debian testing. Remaining changes:
+ - (Build-)depend on default-jre/-jdk.
+ - debian/rules: Change the path of JAVA_HOME to suit with the
+ gcj-jdk -> default-jdk transition.
+
+ -- Adam Conrad Thu, 19 Apr 2012 22:42:28 -0600
+
+writer2latex (1.0.2-8) unstable; urgency=medium
+
+ * Fix build with LibreOffice 3.5, thanks Colin Watson (closes: #669423)
+
+ -- Rene Engelhard Fri, 20 Apr 2012 01:07:04 +0200
+
+writer2latex (1.0.2-7ubuntu1) precise; urgency=low
+
+ * Merge from Debian testing. Remaining changes:
+ - (Build-)depend on default-jre/-jdk.
+ - debian/rules: Change the path of JAVA_HOME to suit with the
+ gcj-jdk -> default-jdk transition.
+
+ -- Angel Abad Mon, 06 Feb 2012 14:14:01 +0100
+
+writer2latex (1.0.2-7) unstable; urgency=low
+
+ * remove obsolete debian/po (closes: #619659)
+ * install source/java/writer2latex/xhtml/config/*.xml,
+ thanks Samuel Thibault (closes: #639736)
+
+ -- Rene Engelhard Mon, 23 Jan 2012 22:05:34 +0100
+
+writer2latex (1.0.2-6ubuntu1) oneiric; urgency=low
+
+ * Merge from debian unstable. (LP: #835773) Remaining changes:
+ - (Build-)depend on default-jre/-jdk.
+ - debian/rules: Change the path of JAVA_HOME to suit with the
+ gcj-jdk -> default-jdk transition.
+
+ -- Angel Abad Tue, 13 Sep 2011 05:13:36 +0200
+
+writer2latex (1.0.2-6) unstable; urgency=high
+
+ * fix build with LibreOffice 3.4
+
+ -- Rene Engelhard Mon, 12 Sep 2011 17:10:58 +0200
+
+writer2latex (1.0.2-5ubuntu1) oneiric; urgency=low
+
+ * Merge from debian unstable. Remaining changes:
+ - (Build-)depend on default-jre/-jdk.
+ - debian/rules: Change the path of JAVA_HOME to suit with the
+ gcj-jdk -> default-jdk transition.
+
+ -- Angel Abad Wed, 04 May 2011 22:56:13 +0200
+
+writer2latex (1.0.2-5) unstable; urgency=low
+
+ * remove spaces at the end of package descriptions (closes: #614214)
+ * fix convertingconverts (closes: #618772, #618773)
+
+ -- Rene Engelhard Fri, 18 Mar 2011 15:54:23 +0100
+
+writer2latex (1.0.2-4) unstable; urgency=low
+
+ * fix/update package descriptions (closes: #613577, #613579)
+ * add Vcs-{Git,Browser}
+
+ -- Rene Engelhard Fri, 18 Feb 2011 14:24:24 +0000
+
+writer2latex (1.0.2-3ubuntu1) natty; urgency=low
+
+ * Merge from debian unstable. Remaining changes:
+ - (Build-)depend on default-jre/-jdk.
+ - debian/rules: Change the path of JAVA_HOME to suit with the
+ gcj-jdk -> default-jdk transition.
+
+ -- Angel Abad Tue, 08 Feb 2011 22:58:46 +0100
+
+writer2latex (1.0.2-3) unstable; urgency=low
+
+ * upload to unstable
+
+ -- Rene Engelhard Sun, 06 Feb 2011 11:19:28 +0000
+
+writer2latex (1.0.2-2) experimental; urgency=low
+
+ * change maintainer to Debian LibreOffice Maintainers
+ * don't gzip .odt files (closes: #610311)
+ * don't predefine printer settings and name (PrinterSetup and
+ PrinterName in settings.xml) in user-manual.odt (closes: #610312)
+ * rename to libreoffice-writer2* and install them unpacked
+ * remove Pre-Depends; now finally not needed anymore, yay
+
+ -- Rene Engelhard Wed, 19 Jan 2011 23:11:06 +0100
+
+writer2latex (1.0.2-1ubuntu1) natty; urgency=low
+
+ * Merge from debian unstable (LP: #683893). Remaining changes:
+ - (Build-)depend on default-jre/-jdk.
+ - debian/rules: Change the path of JAVA_HOME to suit with the
+ gcj-jdk -> default-jdk transition.
+
+ -- Angel Abad Wed, 01 Dec 2010 22:41:23 +0100
+
+writer2latex (1.0.2-1) unstable; urgency=low
+
+ * new upstream release
+ * remove check_for_running_ooo as for OOo itself
+
+ -- Rene Engelhard Mon, 22 Nov 2010 00:44:13 +0100
+
+writer2latex (1.0-12ubuntu1) maverick; urgency=low
+
+ * Merge from debian unstable. Remaining changes:
+ - (Build-)depend on default-jre/-jdk.
+
+ -- Chris Cheney Sat, 05 Jun 2010 21:15:00 -0500
+
+writer2latex (1.0-12) unstable; urgency=medium
+
+ * hack: remove Pre-Depends on openoffice.org-java-common again, add
+ to Depends: instead (see #571771). The gack from 1.0-6 also still
+ needed
+
+ -- Rene Engelhard Sun, 25 Apr 2010 23:56:47 +0200
+
+writer2latex (1.0-11) unstable; urgency=low
+
+ * revert back to build-depending on ant, as ant is now fixed;
+ add build-conflicts against ant 1.8.0-{1,2,3}
+
+ -- Rene Engelhard Tue, 16 Mar 2010 01:03:04 +0100
+
+writer2latex (1.0-10ubuntu1) lucid; urgency=low
+
+ * Merge from debian testing. Remaining changes:
+ - (Build-)depend on default-jre/-jdk.
+
+ -- Chris Cheney Wed, 31 Mar 2010 14:30:00 -0500
+
+writer2latex (1.0-10) unstable; urgency=low
+
+ * build-depend on ant1.7 | ant (<< 1.8.0~) (closes: #571397)
+
+ -- Rene Engelhard Thu, 04 Mar 2010 18:06:03 +0100
+
+writer2latex (1.0-9) unstable; urgency=low
+
+ * update for OOo 3.2
+
+ -- Rene Engelhard Thu, 11 Feb 2010 13:10:20 +0100
+
+writer2latex (1.0-8) unstable; urgency=low
+
+ * oops, actually build with -15...
+
+ -- Rene Engelhard Mon, 08 Feb 2010 01:06:23 +0100
+
+writer2latex (1.0-7) unstable; urgency=low
+
+ * fix clean install to not split out dpkg --compare-versions
+ warning (closes: #568713)
+ * restore lost bits in preinst (closes: #568805)
+
+ -- Rene Engelhard Mon, 08 Feb 2010 00:55:26 +0100
+
+writer2latex (1.0-6) unstable; urgency=low
+
+ * add missing Pre-Depends on Java and openoffice.org-java-common
+ * as the Pre-Depends on -java-common doesn't prevent -common being
+ temporarily removed in the upgrade (and we don't have unopkg then...)
+ try to recover in postinst from preinst not de-registering the old
+ extension.
+
+ -- Rene Engelhard Sat, 06 Feb 2010 23:13:59 +0100
+
+writer2latex (1.0-5) unstable; urgency=medium
+
+ * stop pre-depending on openoffice.org-common for openoffice.org/running.
+ This closes: #566644.
+ Rename to shared/openofficeorg-running and merge here.
+ * add echos instead of debconf message on DEBIAN_FRONTEND = noninteractive
+ so that people in that case also know what goes on
+ * remove unneeded postrms, dh_installdebconf already does it for us
+ * fix debian/NEWS to have correct version number; thanks lintian
+ * rebuild with openoffice.org-dev 1:3.1.1-15
+
+ -- Rene Engelhard Wed, 27 Jan 2010 09:15:59 +0100
+
+writer2latex (1.0-4) unstable; urgency=medium
+
+ * rebuild with OOo 3.1.1-14 to get a uncorrupted .rdb
+ * add missing .lock to find_running_ooo to actually check for the extistence
+ of the lockfile and not for the profile dir, thanks Chris Cheney
+ * adapt for java-gcj-compat-dev -> gcj-jdk
+
+ -- Rene Engelhard Fri, 15 Jan 2010 17:15:17 +0100
+
+writer2latex (1.0-3) unstable; urgency=low
+
+ * debian/openoffice.org-writer2latex.prerm: actually source confmodule...
+
+ -- Rene Engelhard Mon, 19 Oct 2009 12:02:01 +0200
+
+writer2latex (1.0-2) unstable; urgency=low
+
+ * check whether OOo is running and show error openoffice.org/running if it
+ is - as in openoffice.org-common. pre-depend on
+ openoffice.org-common (>= 1:3.1.1-3), debconf (>= 0.5) | debconf-2.0
+ and procps. (closes: #527556)
+
+ -- Rene Engelhard Sun, 04 Oct 2009 15:13:38 +0200
+
+writer2latex (1.0-1) unstable; urgency=low
+
+ * New upstream release
+ * run unopkg with -v
+
+ -- Rene Engelhard Wed, 30 Sep 2009 02:33:25 +0200
+
+writer2latex (1.0~beta3-1) experimental; urgency=low
+
+ * New upstream release
+
+ -- Rene Engelhard Mon, 27 Apr 2009 18:29:55 +0200
+
+writer2latex (1.0~beta2-1) experimental; urgency=low
+
+ * New upstream release
+ * update Homepage:
+ * use /var/lib/openoffice/javasettingsunopkginstall.xml for
+ -env:UNO_JAVA_JFW_INSTALL_DATA
+ * adapt section of libwriter2latex-java: -> java
+
+ -- Rene Engelhard Wed, 15 Apr 2009 18:39:20 +0200
+
+writer2latex (0.5.0.2-4ubuntu1) karmic; urgency=low
+
+ * Merge with Debian; remaining changes:
+ - (Build-)depend on default-jre/-jdk.
+
+ -- Matthias Klose Sun, 17 May 2009 13:41:41 +0200
+
+writer2latex (0.5.0.2-4) unstable; urgency=low
+
+ * add missing Build-Depends: on ure (closes: #521945)
+
+ -- Rene Engelhard Tue, 31 Mar 2009 00:47:44 +0200
+
+writer2latex (0.5.0.2-3) unstable; urgency=high
+
+ * $ORIGIN -> $OOO_BASE_DIR
+
+ -- Rene Engelhard Tue, 03 Mar 2009 02:46:26 +0100
+
+writer2latex (0.5.0.2-2) unstable; urgency=low
+
+ * upload to unstable
+
+ -- Rene Engelhard Fri, 13 Feb 2009 10:03:12 +0100
+
+writer2latex (0.5.0.2-1) experimental; urgency=low
+
+ * New upstream release
+ * lintian fixes
+
+ -- Rene Engelhard Mon, 06 Oct 2008 02:00:55 +0200
+
+writer2latex (0.5.0.1-fix1-1) experimental; urgency=low
+
+ * New upstream release
+ - splits the writer2xhtml part into an own extension
+ * debian/patches/01_dirs.dpatch: make generic to work with OOo 2.4.1 and
+ 3.0.0
+
+ -- Rene Engelhard Tue, 29 Jul 2008 16:22:15 +0200
+
+writer2latex (0.5-8ubuntu1) intrepid; urgency=low
+
+ * Merge from Debian unstable (LP: #244098), remaining Ubuntu changes:
+ - (Build-)depend on default-jre/-jdk.
+
+ -- Luca Falavigna Mon, 04 Aug 2008 02:19:03 +0200
+
+writer2latex (0.5-8) unstable; urgency=high
+
+ * add missing Depends: on ${misc:Depends} for writer2latex
+ (closes: #490138)
+
+ -- Rene Engelhard Fri, 11 Jul 2008 00:28:21 +0200
+
+writer2latex (0.5-7) unstable; urgency=high
+
+ * fix debian/copyright; ooomath.sty is LPPL, actually mention that
+
+ -- Rene Engelhard Wed, 09 Jul 2008 15:40:16 +0200
+
+writer2latex (0.5-6ubuntu1) intrepid; urgency=low
+
+ * (Build-)depend on default-jre/-jdk.
+ * Set Ubuntu maintainer address.
+
+ -- Matthias Klose Thu, 31 Jul 2008 08:17:33 +0000
+
+writer2latex (0.5-6) unstable; urgency=low
+
+ * add missing -env:JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY=1 to the prerm
+ unopkg call, hopefully closes: #468202, please reopen if not
+
+ -- Rene Engelhard Thu, 28 Feb 2008 14:11:44 +0100
+
+writer2latex (0.5-5) unstable; urgency=low
+
+ * build-depend on openoffice.org-java-common (closes: #46760)
+
+ -- Rene Engelhard Tue, 26 Feb 2008 15:53:46 +0100
+
+writer2latex (0.5-4) unstable; urgency=low
+
+ * upload to unstable
+ * add bug script running unopkg list
+
+ -- Rene Engelhard Fri, 15 Feb 2008 12:37:10 +0100
+
+writer2latex (0.5-3) experimental; urgency=low
+
+ * debian/shell-lib.sh:
+ - run unopkg with -env:JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY=1 because
+ otherwise the first run with gcj won't find a JRE (and might fail the
+ install then). Flush the cache after removing as unopkg doesn't remove
+ files on uninstall but marks them as "to-be-removed-on-next-start".
+ Thanks Caolan McNamara.
+
+ -- Rene Engelhard Tue, 04 Dec 2007 17:31:46 +0100
+
+writer2latex (0.5-2) experimental; urgency=low
+
+ * run dh_installtex
+
+ -- Rene Engelhard Mon, 26 Nov 2007 14:12:01 +0100
+
+writer2latex (0.5-1) experimental; urgency=low
+
+ * Initial release
+
+ -- Rene Engelhard Mon, 26 Nov 2007 10:06:34 +0100
--- writer2latex-1.0.2.orig/debian/compat
+++ writer2latex-1.0.2/debian/compat
@@ -0,0 +1 @@
+5
--- writer2latex-1.0.2.orig/debian/copyright
+++ writer2latex-1.0.2/debian/copyright
@@ -0,0 +1,21 @@
+This package was debianized by Rene Engelhard on
+Tue, 20 Nov 2007 21:12:28 +0100.
+
+It was downloaded from http://www.hj-gym.dk/~hj/writer2latex/
+
+Upstream Author:
+
+ Henrik Just
+
+Copyright:
+
+ (C) 2002-2007 Henrik Just
+
+License:
+
+ LGPL 2.1. On Debian systems you can find the full text of the LGPL 2.1
+ in /usr/share/common-licenses/LGPL-2.1
+
+ ooomath.sty is under LPPL 1.2 or later; the latest version of the LPPL
+ is in http://www.latex-project.org/lppl.txt
+
--- writer2latex-1.0.2.orig/debian/libwriter2latex-java-doc.install
+++ writer2latex-1.0.2/debian/libwriter2latex-java-doc.install
@@ -0,0 +1 @@
+target/javadoc usr/share/doc/libwriter2latex-java
--- writer2latex-1.0.2.orig/debian/writer2latex.install
+++ writer2latex-1.0.2/debian/writer2latex.install
@@ -0,0 +1,5 @@
+source/distro/w2l usr/bin
+source/java/writer2latex/latex/config/*.xml usr/share/writer2latex
+source/java/writer2latex/xhtml/config/*.xml usr/share/writer2latex
+source/oxt/xhtml-config-sample/template/xhtml-sample-config/*.ott /usr/share/writer2latex
+source/distro/latex/ooomath.sty usr/share/texmf/tex/latex/ooomath
--- writer2latex-1.0.2.orig/debian/writer2latex.links
+++ writer2latex-1.0.2/debian/writer2latex.links
@@ -0,0 +1 @@
+usr/share/java/writer2latex.jar usr/share/writer2latex/writer2latex.jar
--- writer2latex-1.0.2.orig/debian/control
+++ writer2latex-1.0.2/debian/control
@@ -0,0 +1,128 @@
+Source: writer2latex
+Section: text
+Priority: optional
+Maintainer: Ubuntu Developers
+XSBC-Original-Maintainer: Debian LibreOffice Maintainers
+Uploaders: Rene Engelhard , Chris Halls
+Build-Depends: debhelper (>= 6.0.7~), ant, libxerces2-java, libxalan2-java, default-jdk, libreoffice-java-common (>= 1:3.5.0~), ure (>= 1.4.1~), dpatch, tex-common, zip, unzip
+Build-Conflicts: ant (= 1.8.0-1), ant (= 1.8.0-2), ant (= 1.8.0-3)
+Standards-Version: 3.7.2
+Vcs-Git: https://alioth.debian.org/anonscm/git/pkg-openoffice/writer2latex.git
+Vcs-Browser: http://git.debian.org/?p=pkg-openoffice/writer2latex.git;a=summary
+Homepage: http://writer2latex.sourceforge.net
+
+Package: writer2latex
+Architecture: all
+Depends: default-jre-headless | java2-runtime-headless, libwriter2latex-java, ${misc:Depends}
+Recommends: www-browser | x-www-browser | pdf-viewer | libreoffice-writer
+Description: OpenOffice.org Writer/Calc to LaTeX/XHTML converter
+ Writer2LaTeX is a java utility to convert OpenOffice.org/LibreOffice
+ documents – in particular documents containing formulas – into other
+ formats. It is actually a collection of four converters, i.e.:
+ 1) Writer2LaTeX converts documents into LaTeX 2e format for high quality
+ typesetting.
+ 2) Writer2BibTeX extracts bibliographic data from a document and stores it in
+ BibTeX format (works together with Writer2LaTeX).
+ 3) Writer2xhtml converts documents into XHTML 1.0 or XHTML 1.1+MathML 2.0 with
+ CSS2.
+ 4) Calc2xhtml is a companion to Writer2xhtml that converts Calc documents
+ to XHTML 1.0 with CSS2 to display your spreadsheets on the web.
+
+Package: writer2latex-manual
+Architecture: all
+Section: doc
+Depends: ${misc:Depends}
+Description: OpenOffice.org Writer/Calc to LaTeX/XHTML converter -- manual
+ Writer2LaTeX is a java utility to convert OpenOffice.org/LibreOffice
+ documents – in particular documents containing formulas – into other
+ formats. It is actually a collection of four converters, i.e.:
+ 1) Writer2LaTeX converts documents into LaTeX 2e format for high quality
+ typesetting.
+ 2) Writer2BibTeX extracts bibliographic data from a document and stores it in
+ BibTeX format (works together with Writer2LaTeX).
+ 3) Writer2xhtml converts documents into XHTML 1.0 or XHTML 1.1+MathML 2.0 with
+ CSS2.
+ 4) Calc2xhtml is a companion to Writer2xhtml that converts Calc documents
+ to XHTML 1.0 with CSS2 to display your spreadsheets on the web.
+ .
+ This package contains the manual.
+
+Package: libwriter2latex-java-doc
+Architecture: all
+Section: doc
+Depends: ${misc:Depends}
+Recommends: www-browser | x-www-browser
+Description: OpenOffice.org Writer/Calc to LaTeX/XHTML converter -- javadoc
+ Writer2LaTeX is a java utility to convert OpenOffice.org/LibreOffice
+ documents – in particular documents containing formulas – into other
+ formats. It is actually a collection of four converters, i.e.:
+ 1) Writer2LaTeX converts documents into LaTeX 2e format for high quality
+ typesetting.
+ 2) Writer2BibTeX extracts bibliographic data from a document and stores it in
+ BibTeX format (works together with Writer2LaTeX).
+ 3) Writer2xhtml converts documents into XHTML 1.0 or XHTML 1.1+MathML 2.0 with
+ CSS2.
+ 4) Calc2xhtml is a companion to Writer2xhtml that converts Calc documents
+ to XHTML 1.0 with CSS2 to display your spreadsheets on the web.
+ .
+ This package contains the javadoc for the writer2latex library.
+
+Package: libwriter2latex-java
+Section: java
+Architecture: all
+Depends: libxalan2-java, libxerces2-java, ${misc:Depends}
+Description: OpenOffice.org Writer/Calc to LaTeX/XHTML converter -- library
+ Writer2LaTeX is a java utility to convert OpenOffice.org/LibreOffice
+ documents - in particular documents containing formulas - into other
+ formats. It is actually a collection of four converters, i.e.:
+ 1) Writer2LaTeX converts documents into LaTeX 2e format for high quality
+ typesetting.
+ 2) Writer2BibTeX extracts bibliographic data from a document and stores it in
+ BibTeX format (works together with Writer2LaTeX).
+ 3) Writer2xhtml converts documents into XHTML 1.0 or XHTML 1.1+MathML 2.0 with
+ CSS2.
+ 4) Calc2xhtml is a companion to Writer2xhtml that converts Calc documents
+ to XHTML 1.0 with CSS2 to display your spreadsheets on the web.
+ .
+ This package contains the java library.
+
+Package: libreoffice-writer2latex
+Architecture: all
+Depends: default-jre | gcj-jre | java-gcj-compat | openjdk-6-jre | sun-java5-jre | sun-java6-jre | java5-runtime | jre, libreoffice-core (>= 1:2.3.0~oog680m1), libreoffice-java-common (>= 1:2.3.0~oog680m1), ${misc:Depends}
+Enhances: libreoffice-writer, libreoffice-calc
+Conflicts: libreoffice-core (<< 1:3.0.0~), libreoffice-common (<< 1:3.0.1-10), ure (<< 1.5.1+OOo3.1.1-15)
+Description: Writer/Calc to LaTeX converter extension for LibreOffice
+ Writer2LaTeX is a java utility to convert OpenOffice.org/LibreOffice
+ documents – in particular documents containing formulas – into other
+ formats. It is actually a collection of four converters, i.e.:
+ 1) Writer2LaTeX converts documents into LaTeX 2e format for high quality
+ typesetting.
+ 2) Writer2BibTeX extracts bibliographic data from a document and stores it in
+ BibTeX format (works together with Writer2LaTeX).
+ 3) Writer2xhtml converts documents into XHTML 1.0 or XHTML 1.1+MathML 2.0 with
+ CSS2.
+ 4) Calc2xhtml is a companion to Writer2xhtml that converts Calc documents
+ to XHTML 1.0 with CSS2 to display your spreadsheets on the web.
+ .
+ This package contains the extension providing writer2latex for LibreOffice.
+
+Package: libreoffice-writer2xhtml
+Architecture: all
+Depends: default-jre | gcj-jre | java-gcj-compat | openjdk-6-jre | sun-java5-jre | sun-java6-jre | java5-runtime | jre, libreoffice-core (>= 1:2.3.0~oog680m1), libreoffice-java-common (>= 1:2.3.0~oog680m1), ${misc:Depends}
+Enhances: libreoffice-writer, libreoffice-calc
+Conflicts: libreoffice-core (<< 1:3.0.0~), libreoffice-common (<< 1:3.0.1-10), ure (<< 1.5.1+OOo3.1.1-15)
+Description: Writer/Calc to XHTML converter extension for LibreOffice
+ Writer2LaTeX is a java utility to convert OpenOffice.org/LibreOffice
+ documents – in particular documents containing formulas – into other
+ formats. It is actually a collection of four converters, i.e.:
+ 1) Writer2LaTeX converts documents into LaTeX 2e format for high quality
+ typesetting.
+ 2) Writer2BibTeX extracts bibliographic data from a document and stores it in
+ BibTeX format (works together with Writer2LaTeX).
+ 3) Writer2xhtml converts documents into XHTML 1.0 or XHTML 1.1+MathML 2.0 with
+ CSS2.
+ 4) Calc2xhtml is a companion to Writer2xhtml that converts Calc documents
+ to XHTML 1.0 with CSS2 to display your spreadsheets on the web.
+ .
+ This package contains the extension providing writer2xhtml for LibreOffice.
+
--- writer2latex-1.0.2.orig/debian/libwriter2latex-java.install
+++ writer2latex-1.0.2/debian/libwriter2latex-java.install
@@ -0,0 +1 @@
+target/lib/writer2latex.jar usr/share/java
--- writer2latex-1.0.2.orig/debian/writer2latex-manual.install
+++ writer2latex-1.0.2/debian/writer2latex-manual.install
@@ -0,0 +1 @@
+source/distro/doc/* /usr/share/doc/writer2latex/manual
--- writer2latex-1.0.2.orig/debian/source/lintian-overrides
+++ writer2latex-1.0.2/debian/source/lintian-overrides
@@ -0,0 +1,3 @@
+writer2latex source: missing-build-dependency ant
+writer2latex source: debhelper-but-no-misc-depends openoffice.org-writer2latex
+writer2latex source: debhelper-but-no-misc-depends openoffice.org-writer2xhtml
--- writer2latex-1.0.2.orig/debian/patches/04_add_shebang.dpatch
+++ writer2latex-1.0.2/debian/patches/04_add_shebang.dpatch
@@ -0,0 +1,15 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 03_add_shebang.dpatch by Rene Engelhard
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+@DPATCH@
+diff -urNad writer2latex-1.0~beta2~/source/distro/w2l writer2latex-1.0~beta2/source/distro/w2l
+--- writer2latex-1.0~beta2~/source/distro/w2l 2009-04-15 18:36:09.000000000 +0200
++++ writer2latex-1.0~beta2/source/distro/w2l 2009-04-15 18:36:31.000000000 +0200
+@@ -1,3 +1,4 @@
++#!/bin/sh
+ # *Very* simple script to run Writer2LaTeX (unix version)
+ # Created by Henrik Just, october 2003
+ # Modified december 2003 as suggested by Juan Julian Merelo Guervos
--- writer2latex-1.0.2.orig/debian/patches/01_dirs.dpatch
+++ writer2latex-1.0.2/debian/patches/01_dirs.dpatch
@@ -0,0 +1,27 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 01_dir.dpatch by Rene Engelhard
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: speficy the paths to the office jars and where we install writer2latex
+## DP: into
+
+@DPATCH@
+diff -urNad writer2latex-0.5.0.1~/w2l writer2latex-0.5.0.1/w2l
+--- writer2latex-1.0~beta2/source/distro/w2l 2008-07-29 01:19:17.000000000 +0200
++++ writer2latex-1.0~beta2/source/distro/w2l 2008-07-29 01:20:16.000000000 +0200
+@@ -6,7 +6,7 @@
+
+ # If writer2latex.jar is not in the same directory as the script, please
+ # edit the following line to contain the full path to Writer2LaTeX:
+-W2LPATH=`dirname $0`
++W2LPATH=/usr/share/java
+
+ # If the required JVM is not in your path, or the path is not set by JAVA_HOME,
+ # please edit the following line to contain the full path and file name
+@@ -19,4 +19,4 @@
+ JAVAEXE="$JAVA_HOME/bin/java"
+ fi
+
+-$JAVAEXE -jar "$W2LPATH/writer2latex.jar" "$@"
+\ Kein Zeilenumbruch am Dateiende.
++$JAVAEXE -jar "$W2LPATH/writer2latex.jar" "$@"
--- writer2latex-1.0.2.orig/debian/patches/02_BASE64_no_Sunism.dpatch
+++ writer2latex-1.0.2/debian/patches/02_BASE64_no_Sunism.dpatch
@@ -0,0 +1,33 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 02_BASE64_no_Sunism.dpatch by Rene Engelhard
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: remove Sunism
+
+@DPATCH@
+diff -urNad writer2latex-0.5~/build.xml writer2latex-0.5/build.xml
+--- writer2latex-0.5~/build.xml 2006-11-02 11:15:42.000000000 +0100
++++ writer2latex-0.5/build.xml 2007-11-20 21:17:21.000000000 +0100
+@@ -85,7 +85,7 @@
+
+
+
+-
++
+
+
+
+diff -urNad writer2latex-0.5~/source/writer2latex/office/ImageLoader.java writer2latex-0.5/source/writer2latex/office/ImageLoader.java
+--- writer2latex-1.0~beta2/source/java/writer2latex/office/ImageLoader.java 2007-04-17 09:30:42.000000000 +0200
++++ writer2latex-1.0~beta2/source/java/writer2latex/office/ImageLoader.java 2007-11-20 21:18:32.000000000 +0100
+@@ -107,8 +107,8 @@
+ }
+ // TODO: Use another base64 decoder. This one is "nonstandard"
+ try {
+- blob = new sun.misc.BASE64Decoder().decodeBuffer(buf.toString());
+- } catch (IOException e) {
++ blob = org.apache.xerces.impl.dv.util.Base64.decode(buf.toString());
++ } catch (Exception e) {
+ System.err.println("Oops - error converting base64");
+ }
+ sMIME = MIMETypes.getMagicMIMEType(blob);
--- writer2latex-1.0.2.orig/debian/patches/05_XDocumentPropertiesSupplier.dpatch
+++ writer2latex-1.0.2/debian/patches/05_XDocumentPropertiesSupplier.dpatch
@@ -0,0 +1,737 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 05_XDocumentPropertiesSupplier.dpatch by
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+@DPATCH@
+diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' writer2latex-1.0.2~/XDocumentPropertiesSupplier-writer2xhtml.patch writer2latex-1.0.2/XDocumentPropertiesSupplier-writer2xhtml.patch
+--- writer2latex-1.0.2~/XDocumentPropertiesSupplier-writer2xhtml.patch 1970-01-01 01:00:00.000000000 +0100
++++ writer2latex-1.0.2/XDocumentPropertiesSupplier-writer2xhtml.patch 2013-04-01 19:08:04.000000000 +0200
+@@ -0,0 +1,57 @@
++Index: trunk/source/java/org/openoffice/da/comp/writer2xhtml/BatchConverter.java
++===================================================================
++--- trunk/source/java/org/openoffice/da/comp/writer2xhtml/BatchConverter.java (revision 150)
+++++ trunk/source/java/org/openoffice/da/comp/writer2xhtml/BatchConverter.java (working copy)
++@@ -35,8 +35,8 @@
++ import com.sun.star.lib.uno.adapter.XOutputStreamToOutputStreamAdapter;
++ import com.sun.star.beans.PropertyValue;
++ import com.sun.star.beans.UnknownPropertyException;
++-import com.sun.star.beans.XPropertySet;
++-import com.sun.star.document.XDocumentInfoSupplier;
+++import com.sun.star.document.XDocumentProperties;
+++import com.sun.star.document.XDocumentPropertiesSupplier;
++ import com.sun.star.frame.XComponentLoader;
++ import com.sun.star.frame.XStorable;
++ import com.sun.star.io.NotConnectedException;
++@@ -367,33 +367,15 @@
++ }
++
++ // Get the title and the description of the document
++- XDocumentInfoSupplier docInfo = (XDocumentInfoSupplier) UnoRuntime.queryInterface(XDocumentInfoSupplier.class, xDocument);
++- XPropertySet infoProps = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, docInfo.getDocumentInfo());
++- if (infoProps!=null) {
++- try {
++- Object loadedTitle = infoProps.getPropertyValue("Title");
++- if (AnyConverter.isString(loadedTitle)) {
++- String sLoadedTitle = AnyConverter.toString(loadedTitle);
++- if (bUseTitle && sLoadedTitle.length()>0) {
++- entry.setDisplayName(sLoadedTitle);
++- }
++- }
++-
++- Object loadedDescription = infoProps.getPropertyValue("Description");
++- if (AnyConverter.isString(loadedDescription)) {
++- String sLoadedDescription = AnyConverter.toString(loadedDescription);
++- if (bUseDescription && sLoadedDescription.length()>0) {
++- entry.setDescription(sLoadedDescription);
++- }
++- }
++- }
++- catch (UnknownPropertyException e) {
++- }
++- catch (WrappedTargetException e) {
++- }
++- catch (com.sun.star.lang.IllegalArgumentException e) {
++- }
+++ XDocumentProperties docProps = ((XDocumentPropertiesSupplier) UnoRuntime.queryInterface(XDocumentPropertiesSupplier.class, xDocument)).getDocumentProperties();
+++ String loadedTitle = docProps.getTitle();
+++ if (bUseTitle && loadedTitle.length()>0) {
+++ entry.setDisplayName(loadedTitle);
++ }
+++ String loadedDescription = docProps.getDescription();
+++ if (bUseDescription && loadedDescription.length()>0) {
+++ entry.setDescription(loadedDescription);
+++ }
++
++ // Determine the type of the component
++ boolean bText = false;
+diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' writer2latex-1.0.2~/XDocumentPropertiesSupplier.patch writer2latex-1.0.2/XDocumentPropertiesSupplier.patch
+--- writer2latex-1.0.2~/XDocumentPropertiesSupplier.patch 1970-01-01 01:00:00.000000000 +0100
++++ writer2latex-1.0.2/XDocumentPropertiesSupplier.patch 2013-04-01 19:06:39.000000000 +0200
+@@ -0,0 +1,30 @@
++Index: trunk/source/java/org/openoffice/da/comp/w2lcommon/filter/OptionsDialogBase.java
++===================================================================
++--- trunk/source/java/org/openoffice/da/comp/w2lcommon/filter/OptionsDialogBase.java (revision 150)
+++++ trunk/source/java/org/openoffice/da/comp/w2lcommon/filter/OptionsDialogBase.java (working copy)
++@@ -33,7 +33,7 @@
++ import com.sun.star.beans.XPropertyAccess;
++ import com.sun.star.beans.XPropertySet;
++ import com.sun.star.container.XNameAccess;
++-import com.sun.star.document.XDocumentInfoSupplier;
+++import com.sun.star.document.XDocumentPropertiesSupplier;
++ import com.sun.star.frame.XDesktop;
++ import com.sun.star.lang.XComponent;
++ import com.sun.star.lang.IllegalArgumentException;
++@@ -179,13 +179,9 @@
++ XComponent xComponent = xDesktop.getCurrentComponent();
++
++ // Get the document info property set
++- XDocumentInfoSupplier xDocInfoSuppl = (XDocumentInfoSupplier)
++- UnoRuntime.queryInterface(XDocumentInfoSupplier.class, xComponent);
++- Object docInfo = xDocInfoSuppl.getDocumentInfo();
++- XPropertySet xDocInfo = (XPropertySet)
++- UnoRuntime.queryInterface(XPropertySet.class, docInfo);
++-
++- return getPropertyValueAsString(xDocInfo,"Template");
+++ XDocumentPropertiesSupplier xDocPropsSuppl = (XDocumentPropertiesSupplier)
+++ UnoRuntime.queryInterface(XDocumentPropertiesSupplier.class, xComponent);
+++ return xDocPropsSuppl.getDocumentProperties().getTemplateName();
++ }
++ catch (Exception e) {
++ return "";
+diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' writer2latex-1.0.2~/source/java/org/openoffice/da/comp/w2lcommon/filter/OptionsDialogBase.java writer2latex-1.0.2/source/java/org/openoffice/da/comp/w2lcommon/filter/OptionsDialogBase.java
+--- writer2latex-1.0.2~/source/java/org/openoffice/da/comp/w2lcommon/filter/OptionsDialogBase.java 2010-06-03 08:50:50.000000000 +0200
++++ writer2latex-1.0.2/source/java/org/openoffice/da/comp/w2lcommon/filter/OptionsDialogBase.java 2013-04-01 19:08:26.952448336 +0200
+@@ -33,7 +33,7 @@
+ import com.sun.star.beans.XPropertyAccess;
+ import com.sun.star.beans.XPropertySet;
+ import com.sun.star.container.XNameAccess;
+-import com.sun.star.document.XDocumentInfoSupplier;
++import com.sun.star.document.XDocumentPropertiesSupplier;
+ import com.sun.star.frame.XDesktop;
+ import com.sun.star.lang.XComponent;
+ import com.sun.star.lang.IllegalArgumentException;
+@@ -199,13 +199,9 @@
+ XComponent xComponent = xDesktop.getCurrentComponent();
+
+ // Get the document info property set
+- XDocumentInfoSupplier xDocInfoSuppl = (XDocumentInfoSupplier)
+- UnoRuntime.queryInterface(XDocumentInfoSupplier.class, xComponent);
+- Object docInfo = xDocInfoSuppl.getDocumentInfo();
+- XPropertySet xDocInfo = (XPropertySet)
+- UnoRuntime.queryInterface(XPropertySet.class, docInfo);
+-
+- return getPropertyValueAsString(xDocInfo,"Template");
++ XDocumentPropertiesSupplier xDocPropsSuppl = (XDocumentPropertiesSupplier)
++ UnoRuntime.queryInterface(XDocumentPropertiesSupplier.class, xComponent);
++ return xDocPropsSuppl.getDocumentProperties().getTemplateName();
+ }
+ catch (Exception e) {
+ return "";
+diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' writer2latex-1.0.2~/source/java/org/openoffice/da/comp/w2lcommon/filter/OptionsDialogBase.java.orig writer2latex-1.0.2/source/java/org/openoffice/da/comp/w2lcommon/filter/OptionsDialogBase.java.orig
+--- writer2latex-1.0.2~/source/java/org/openoffice/da/comp/w2lcommon/filter/OptionsDialogBase.java.orig 1970-01-01 01:00:00.000000000 +0100
++++ writer2latex-1.0.2/source/java/org/openoffice/da/comp/w2lcommon/filter/OptionsDialogBase.java.orig 2010-06-03 08:50:50.000000000 +0200
+@@ -0,0 +1,547 @@
++/************************************************************************
++ *
++ * OptionsDialogBase.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-2008 by Henrik Just
++ *
++ * All Rights Reserved.
++ *
++ * Version 1.0 (2008-10-14)
++ *
++ */
++
++package org.openoffice.da.comp.w2lcommon.filter;
++
++import java.util.HashSet;
++
++import com.sun.star.awt.XDialogEventHandler;
++import com.sun.star.beans.PropertyValue;
++import com.sun.star.beans.XPropertyAccess;
++import com.sun.star.beans.XPropertySet;
++import com.sun.star.container.XNameAccess;
++import com.sun.star.document.XDocumentInfoSupplier;
++import com.sun.star.frame.XDesktop;
++import com.sun.star.lang.XComponent;
++import com.sun.star.lang.IllegalArgumentException;
++import com.sun.star.lang.XMultiServiceFactory;
++import com.sun.star.lang.XServiceInfo;
++import com.sun.star.lang.XServiceName;
++import com.sun.star.lang.XTypeProvider;
++import com.sun.star.ui.dialogs.XExecutableDialog;
++import com.sun.star.uno.Type;
++import com.sun.star.uno.UnoRuntime;
++import com.sun.star.uno.XComponentContext;
++import com.sun.star.util.XChangesBatch;
++import com.sun.star.util.XMacroExpander;
++
++import org.openoffice.da.comp.w2lcommon.helper.DialogBase;
++import org.openoffice.da.comp.w2lcommon.helper.PropertyHelper;
++
++/** This class provides an abstract uno component which implements a filter ui
++ */
++public abstract class OptionsDialogBase extends DialogBase implements
++ XPropertyAccess { // Filter ui requires XExecutableDialog + XPropertyAccess
++
++ //////////////////////////////////////////////////////////////////////////
++ // The subclass must override the following; and override the
++ // implementation of XDialogEventHandler if needed
++
++ /** Load settings from the registry to the dialog
++ * The subclass must implement this
++ */
++ protected abstract void loadSettings(XPropertySet xRegistryProps);
++
++ /** Save settings from the dialog to the registry and create FilterData
++ * The subclass must implement this
++ */
++ protected abstract void saveSettings(XPropertySet xRegistryProps, PropertyHelper filterData);
++
++ /** Return the name of the library containing the dialog
++ */
++ public abstract String getDialogLibraryName();
++
++ /** Return the name of the dialog within the library
++ */
++ public abstract String getDialogName();
++
++ /** Return the path to the options in the registry */
++ public abstract String getRegistryPath();
++
++ /** Create a new OptionsDialogBase */
++ public OptionsDialogBase(XComponentContext xContext) {
++ super(xContext);
++ this.xMSF = null; // must be set properly by subclass
++ mediaProps = null;
++ sConfigNames = null;
++ lockedOptions = new HashSet();
++ }
++
++ //////////////////////////////////////////////////////////////////////////
++ // Implement some methods required by DialogBase
++
++ /** Initialize the dialog (eg. with settings from the registry)
++ */
++ public void initialize() {
++ try {
++ // Prepare registry view
++ Object view = getRegistryView(false);
++ XPropertySet xProps = (XPropertySet)
++ UnoRuntime.queryInterface(XPropertySet.class,view);
++
++ // Load settings using method from subclass
++ loadSettings(xProps);
++
++ // Dispose the registry view
++ disposeRegistryView(view);
++ }
++ catch (com.sun.star.uno.Exception e) {
++ // Failed to get registry view
++ }
++ }
++
++ /** Finalize the dialog after execution (eg. save settings to the registry)
++ */
++ public void finalize() {
++ try {
++ // Prepare registry view
++ Object rwview = getRegistryView(true);
++ XPropertySet xProps = (XPropertySet)
++ UnoRuntime.queryInterface(XPropertySet.class,rwview);
++
++ // Save settings and create FilterData using method from subclass
++ PropertyHelper filterData = new PropertyHelper();
++ saveSettings(xProps, filterData);
++
++ // Commit registry changes
++ XChangesBatch xUpdateContext = (XChangesBatch)
++ UnoRuntime.queryInterface(XChangesBatch.class,rwview);
++ try {
++ xUpdateContext.commitChanges();
++ }
++ catch (Exception e) {
++ // ignore
++ }
++
++ // Dispose the registry view
++ disposeRegistryView(rwview);
++
++ // Update the media properties with the FilterData
++ PropertyHelper helper = new PropertyHelper(mediaProps);
++ helper.put("FilterData",filterData.toArray());
++ mediaProps = helper.toArray();
++ }
++ catch (com.sun.star.uno.Exception e) {
++ // Failed to get registry view
++ }
++ }
++
++
++ //////////////////////////////////////////////////////////////////////////
++ // Some private global variables
++
++ // The service factory
++ protected XMultiServiceFactory xMSF;
++
++ // The media properties (set/get via XPropertyAccess implementation)
++ private PropertyValue[] mediaProps;
++
++ // Configuration names (stored during execution of dialog)
++ private String[] sConfigNames;
++
++ // Set of locked controls
++ private HashSet lockedOptions;
++
++
++ //////////////////////////////////////////////////////////////////////////
++ // Some private utility methods
++
++ // Perform macro extansion
++ private String expandMacros(String s) {
++ if (s.startsWith("vnd.sun.star.expand:")) {
++ // The string contains a macro, usually as a result of using %origin% in the registry
++ s = s.substring(20);
++ Object expander = xContext.getValueByName("/singletons/com.sun.star.util.theMacroExpander");
++ XMacroExpander xExpander = (XMacroExpander) UnoRuntime.queryInterface (XMacroExpander.class, expander);
++ try {
++ return xExpander.expandMacros(s);
++ }
++ catch (IllegalArgumentException e) {
++ // Unknown macro name found, proceed and hope for the best
++ return s;
++ }
++ }
++ else {
++ return s;
++ }
++ }
++
++ // Get the template name from the document with ui focus
++ private String getTemplateName() {
++ try {
++ // Get current component
++ Object desktop = xContext.getServiceManager()
++ .createInstanceWithContext("com.sun.star.frame.Desktop",xContext);
++ XDesktop xDesktop = (XDesktop) UnoRuntime.queryInterface(XDesktop.class,desktop);
++ XComponent xComponent = xDesktop.getCurrentComponent();
++
++ // Get the document info property set
++ XDocumentInfoSupplier xDocInfoSuppl = (XDocumentInfoSupplier)
++ UnoRuntime.queryInterface(XDocumentInfoSupplier.class, xComponent);
++ Object docInfo = xDocInfoSuppl.getDocumentInfo();
++ XPropertySet xDocInfo = (XPropertySet)
++ UnoRuntime.queryInterface(XPropertySet.class, docInfo);
++
++ return getPropertyValueAsString(xDocInfo,"Template");
++ }
++ catch (Exception e) {
++ return "";
++ }
++ }
++
++ // Get a view of the options root in the registry
++ private Object getRegistryView(boolean bUpdate)
++ throws com.sun.star.uno.Exception {
++ Object provider = xMSF.createInstance(
++ "com.sun.star.configuration.ConfigurationProvider");
++ XMultiServiceFactory xProvider = (XMultiServiceFactory)
++ UnoRuntime.queryInterface(XMultiServiceFactory.class,provider);
++ PropertyValue[] args = new PropertyValue[1];
++ args[0] = new PropertyValue();
++ args[0].Name = "nodepath";
++ args[0].Value = getRegistryPath();
++ String sServiceName = bUpdate ?
++ "com.sun.star.configuration.ConfigurationUpdateAccess" :
++ "com.sun.star.configuration.ConfigurationAccess";
++ Object view = xProvider.createInstanceWithArguments(sServiceName,args);
++ return view;
++ }
++
++ // Dispose a previously obtained registry view
++ private void disposeRegistryView(Object view) {
++ XComponent xComponent = (XComponent)
++ UnoRuntime.queryInterface(XComponent.class,view);
++ xComponent.dispose();
++ }
++
++ //////////////////////////////////////////////////////////////////////////
++ // Implement uno interfaces
++
++ // Override getTypes() from the interface XTypeProvider
++ public Type[] getTypes() {
++ Type[] typeReturn = {};
++ try {
++ typeReturn = new Type[] {
++ new Type( XServiceName.class ),
++ new Type( XServiceInfo.class ),
++ new Type( XTypeProvider.class ),
++ new Type( XExecutableDialog.class ),
++ new Type( XPropertyAccess.class ),
++ new Type( XDialogEventHandler.class ) };
++ } catch(Exception exception) {
++ }
++ return typeReturn;
++ }
++
++
++ // Implement the interface XPropertyAccess
++ public PropertyValue[] getPropertyValues() {
++ return mediaProps;
++ }
++
++ public void setPropertyValues(PropertyValue[] props) {
++ mediaProps = props;
++ }
++
++
++ //////////////////////////////////////////////////////////////////////////
++ // Various utility methods to be used by the sublasses
++
++ // Helpers to load and save settings
++
++ protected void updateLockedOptions() {
++ lockedOptions.clear();
++ short nItem = getListBoxSelectedItem("Config");
++ int nStdConfigs = getListBoxStringItemList("Config").length - sConfigNames.length;
++ if (nItem>=nStdConfigs) {
++ // Get current configuration name
++ String sName = sConfigNames[nItem-nStdConfigs];
++
++ try {
++ // Prepare registry view
++ Object view = getRegistryView(false);
++ XPropertySet xProps = (XPropertySet)
++ UnoRuntime.queryInterface(XPropertySet.class,view);
++
++ // Get the available configurations
++ Object configurations = getPropertyValue(xProps,"Configurations");
++ XNameAccess xConfigurations = (XNameAccess)
++ UnoRuntime.queryInterface(XNameAccess.class,configurations);
++
++ // Get the LockedOptions node from the desired configuration
++ String sLockedOptions = "";
++ Object config = xConfigurations.getByName(sName);
++ XPropertySet xCfgProps = (XPropertySet)
++ UnoRuntime.queryInterface(XPropertySet.class,config);
++ sLockedOptions = getPropertyValueAsString(xCfgProps,"LockedOptions");
++
++ // Dispose the registry view
++ disposeRegistryView(view);
++
++ // Feed lockedOptions with the comma separated list of options
++ int nStart = 0;
++ for (int i=0; i=nStdConfigs) { // only handle registry configurations
++ int i = nConfig-nStdConfigs;
++ try {
++ Object config = xNameAccess.getByName(sConfigNames[i]);
++ XPropertySet xCfgProps = (XPropertySet)
++ UnoRuntime.queryInterface(XPropertySet.class,config);
++ filterData.put("ConfigURL",expandMacros(getPropertyValueAsString(xCfgProps,"ConfigURL")));
++ filterData.put("TemplateURL",expandMacros(getPropertyValueAsString(xCfgProps,"TargetTemplateURL")));
++ setPropertyValue(xProps,"ConfigName",sConfigNames[i]);
++ bFound = true;
++ }
++ catch (Exception e) {
++ }
++ }
++ setPropertyValue(xProps,"Config",nConfig);
++ if (!bFound) { setPropertyValue(xProps,"ConfigName",""); }
++ return nConfig;
++ }
++
++ // Check box option (boolean)
++ protected boolean loadCheckBoxOption(XPropertySet xProps, String sName) {
++ boolean bValue = getPropertyValueAsBoolean(xProps,sName);
++ setCheckBoxStateAsBoolean(sName, bValue);
++ return bValue;
++ }
++
++ protected boolean saveCheckBoxOption(XPropertySet xProps, String sName) {
++ boolean bValue = getCheckBoxStateAsBoolean(sName);
++ setPropertyValue(xProps, sName, bValue);
++ return bValue;
++ }
++
++ protected boolean saveCheckBoxOption(XPropertySet xProps, PropertyHelper filterData,
++ String sName, String sOptionName) {
++ boolean bValue = saveCheckBoxOption(xProps, sName);
++ if (!isLocked(sOptionName)) {
++ filterData.put(sOptionName, Boolean.toString(bValue));
++ }
++ return bValue;
++ }
++
++ // List box option
++ protected short loadListBoxOption(XPropertySet xProps, String sName) {
++ short nValue = getPropertyValueAsShort(xProps, sName);
++ setListBoxSelectedItem(sName ,nValue);
++ return nValue;
++ }
++
++ protected short saveListBoxOption(XPropertySet xProps, String sName) {
++ short nValue = getListBoxSelectedItem(sName);
++ setPropertyValue(xProps, sName, nValue);
++ return nValue;
++ }
++
++ protected short saveListBoxOption(XPropertySet xProps, PropertyHelper filterData,
++ String sName, String sOptionName, String[] sValues) {
++ short nValue = saveListBoxOption(xProps, sName);
++ if (!isLocked(sOptionName) && (nValue>=0) && (nValue0) {
+- entry.setDisplayName(sLoadedTitle);
+- }
+- }
+-
+- Object loadedDescription = infoProps.getPropertyValue("Description");
+- if (AnyConverter.isString(loadedDescription)) {
+- String sLoadedDescription = AnyConverter.toString(loadedDescription);
+- if (bUseDescription && sLoadedDescription.length()>0) {
+- entry.setDescription(sLoadedDescription);
+- }
+- }
+- }
+- catch (UnknownPropertyException e) {
+- }
+- catch (WrappedTargetException e) {
+- }
+- catch (com.sun.star.lang.IllegalArgumentException e) {
+- }
++ XDocumentProperties docProps = ((XDocumentPropertiesSupplier) UnoRuntime.queryInterface(XDocumentPropertiesSupplier.class, xDocument)).getDocumentProperties();
++ String loadedTitle = docProps.getTitle();
++ if (bUseTitle && loadedTitle.length()>0) {
++ entry.setDisplayName(loadedTitle);
++ }
++ String loadedDescription = docProps.getDescription();
++ if (bUseDescription && loadedDescription.length()>0) {
++ entry.setDescription(loadedDescription);
+ }
+
+ // Determine the type of the component
--- writer2latex-1.0.2.orig/debian/patches/03_no_writer2latex_in_extension.dpatch
+++ writer2latex-1.0.2/debian/patches/03_no_writer2latex_in_extension.dpatch
@@ -0,0 +1,38 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 03_no_writer2latex_in_extension.dpatch by Rene Engelhard
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+@DPATCH@
+diff -urNad writer2latex-0.5~/build.xml writer2latex-0.5/build.xml
+--- writer2latex-0.5~/build.xml 2007-11-20 23:25:55.000000000 +0100
++++ writer2latex-0.5/build.xml 2007-11-20 23:26:27.000000000 +0100
+@@ -100,7 +100,7 @@
+
+
+
++ includes="META-INF/manifest.xml,w2l_types.xcu,w2l_filters.xcu" />
+
+
+
+
+
+
+
+
+-
+\ No newline at end of file
++
--- writer2latex-1.0.2.orig/debian/patches/00list
+++ writer2latex-1.0.2/debian/patches/00list
@@ -0,0 +1,4 @@
+01_dirs
+#02_BASE64_no_Sunism
+04_add_shebang
+05_XDocumentPropertiesSupplier