diffstat for abiword-2.8.2 abiword-2.8.4

 abiword.desktop                                                  |    2 
 config.h.in                                                      |    6 
 configure                                                        |   36 
 configure.in                                                     |    4 
 debian/README.source                                             |    6 
 debian/changelog                                                 |   28 
 debian/control                                                   |    2 
 debian/patches/fixes/mime-types-desktop.diff                     |   29 
 debian/patches/fixes/mime-types.diff                             |   50 -
 debian/patches/fixes/svn-backports.diff                          |   35 
 debian/patches/series                                            |    3 
 debian/rules                                                     |    5 
 debian/source/format                                             |    1 
 plugin-configure.m4                                              |    2 
 plugins/goffice/unix/AbiGOComponent.cpp                          |    9 
 plugins/opendocument/common/xp/Makefile.am                       |   25 
 plugins/opendocument/common/xp/Makefile.in                       |  115 ++
 plugins/opendocument/common/xp/ODc_Crypto.cpp                    |  130 +++
 plugins/opendocument/common/xp/ODc_Crypto.h                      |   52 +
 plugins/opendocument/common/xp/crypto/README                     |   16 
 plugins/opendocument/common/xp/crypto/blowfish/COPYRIGHT         |   46 +
 plugins/opendocument/common/xp/crypto/blowfish/README            |   14 
 plugins/opendocument/common/xp/crypto/blowfish/bf_cfb64.c        |  121 ++
 plugins/opendocument/common/xp/crypto/blowfish/bf_enc.c          |  306 +++++++
 plugins/opendocument/common/xp/crypto/blowfish/bf_locl.h         |  219 +++++
 plugins/opendocument/common/xp/crypto/blowfish/bf_pi.h           |  325 +++++++
 plugins/opendocument/common/xp/crypto/blowfish/bf_skey.c         |  118 ++
 plugins/opendocument/common/xp/crypto/blowfish/blowfish.h        |  129 +++
 plugins/opendocument/common/xp/crypto/gc-pbkdf2-sha1.c           |  106 ++
 plugins/opendocument/common/xp/crypto/gc-pbkdf2-sha1.h           |   38 
 plugins/opendocument/common/xp/crypto/hmac-sha1.c                |   81 +
 plugins/opendocument/common/xp/crypto/hmac.h                     |   43 +
 plugins/opendocument/common/xp/crypto/memxor.c                   |   35 
 plugins/opendocument/common/xp/crypto/memxor.h                   |   31 
 plugins/opendocument/common/xp/crypto/sha1.c                     |  428 ++++++++++
 plugins/opendocument/common/xp/crypto/sha1.h                     |   99 ++
 plugins/opendocument/exp/xp/Makefile.am                          |    2 
 plugins/opendocument/exp/xp/Makefile.in                          |    7 
 plugins/opendocument/exp/xp/ODe_DefaultStyles.cpp                |   54 +
 plugins/opendocument/exp/xp/ODe_DefaultStyles.h                  |   50 +
 plugins/opendocument/exp/xp/ODe_DocumentData.cpp                 |   52 +
 plugins/opendocument/exp/xp/ODe_DocumentData.h                   |    5 
 plugins/opendocument/exp/xp/ODe_MetaDataWriter.cpp               |   13 
 plugins/opendocument/exp/xp/ODe_Style_Style.cpp                  |  249 +++++
 plugins/opendocument/exp/xp/ODe_Style_Style.h                    |   40 
 plugins/opendocument/exp/xp/ODe_Styles.cpp                       |    3 
 plugins/opendocument/exp/xp/ODe_Styles.h                         |    8 
 plugins/opendocument/exp/xp/ODe_Text_Listener.cpp                |   10 
 plugins/opendocument/imp/xp/Makefile.am                          |    1 
 plugins/opendocument/imp/xp/Makefile.in                          |    1 
 plugins/opendocument/imp/xp/ODi_ManifestStream_ListenerState.cpp |   64 +
 plugins/opendocument/imp/xp/ODi_ManifestStream_ListenerState.h   |   16 
 plugins/opendocument/imp/xp/ODi_Style_Style.cpp                  |  142 +++
 plugins/opendocument/imp/xp/ODi_Style_Style.h                    |   11 
 plugins/opendocument/imp/xp/ODi_StylesStream_ListenerState.cpp   |    2 
 plugins/opendocument/imp/xp/ie_imp_OpenDocument.cpp              |  125 ++
 plugins/opendocument/imp/xp/ie_imp_OpenDocument.h                |   13 
 plugins/opendocument/imp/xp/ie_imp_OpenDocument_Sniffer.cpp      |    4 
 plugins/opendocument/plugin.m4                                   |    2 
 plugins/openxml/common/xp/OXML_Element_Text.cpp                  |    5 
 plugins/openxml/exp/xp/ie_exp_OpenXML.cpp                        |   33 
 plugins/openxml/exp/xp/ie_exp_OpenXML.h                          |    2 
 plugins/openxml/imp/xp/OXMLi_StreamListener.cpp                  |    4 
 src/af/gr/xp/gr_CairoGraphics.cpp                                |  180 ++--
 src/af/gr/xp/gr_CairoGraphics.h                                  |    9 
 src/af/gr/xp/gr_Graphics.cpp                                     |    2 
 src/af/util/xp/ut_xml.cpp                                        |    3 
 src/af/util/xp/ut_xml.h                                          |    3 
 src/af/util/xp/ut_xml_libxml2.cpp                                |   15 
 src/text/fmt/xp/fl_BlockLayout.h                                 |    2 
 src/text/fmt/xp/fp_TextRun.cpp                                   |    4 
 src/wp/impexp/xp/ie_exp_AbiWord_1.cpp                            |    1 
 src/wp/main/cocoa/Makefile.am                                    |    2 
 src/wp/main/cocoa/Makefile.in                                    |    2 
 src/wp/main/cocoa/bundle/ABWBackup.icns                          |binary
 src/wp/main/cocoa/bundle/ABWDocument.icns                        |binary
 src/wp/main/cocoa/bundle/ABWPlugin.icns                          |binary
 src/wp/main/cocoa/bundle/ABWSaved.icns                           |binary
 src/wp/main/cocoa/bundle/AWDocument.icns                         |binary
 src/wp/main/cocoa/bundle/AbiStops.icns                           |binary
 src/wp/main/cocoa/bundle/AbiWord.icns                            |binary
 src/wp/main/cocoa/bundle/Blue11x16.png                           |binary
 src/wp/main/cocoa/bundle/Blue16x15.png                           |binary
 src/wp/main/cocoa/bundle/Cursor_Compass.png                      |binary
 src/wp/main/cocoa/bundle/Cursor_Crosshair.png                    |binary
 src/wp/main/cocoa/bundle/Cursor_DownArrow.png                    |binary
 src/wp/main/cocoa/bundle/Cursor_E.png                            |binary
 src/wp/main/cocoa/bundle/Cursor_Exchange.png                     |binary
 src/wp/main/cocoa/bundle/Cursor_HandPointer.png                  |binary
 src/wp/main/cocoa/bundle/Cursor_LeftArrow.png                    |binary
 src/wp/main/cocoa/bundle/Cursor_N.png                            |binary
 src/wp/main/cocoa/bundle/Cursor_NE.png                           |binary
 src/wp/main/cocoa/bundle/Cursor_NW.png                           |binary
 src/wp/main/cocoa/bundle/Cursor_RightArrow.png                   |binary
 src/wp/main/cocoa/bundle/Cursor_S.png                            |binary
 src/wp/main/cocoa/bundle/Cursor_SE.png                           |binary
 src/wp/main/cocoa/bundle/Cursor_SW.png                           |binary
 src/wp/main/cocoa/bundle/Cursor_W.png                            |binary
 src/wp/main/cocoa/bundle/Cursor_Wait.png                         |binary
 src/wp/main/cocoa/bundle/DOCDocument.icns                        |binary
 src/wp/main/cocoa/bundle/Grey11x16.png                           |binary
 src/wp/main/cocoa/bundle/Grey16x15.png                           |binary
 src/wp/main/cocoa/bundle/HTMDocument.icns                        |binary
 src/wp/main/cocoa/bundle/Info.plist                              |  376 ++++++++
 src/wp/main/cocoa/bundle/ODTDocument.icns                        |binary
 src/wp/main/cocoa/bundle/PkgInfo                                 |    1 
 src/wp/main/cocoa/bundle/RTFDocument.icns                        |binary
 src/wp/main/cocoa/bundle/SDWDocument.icns                        |binary
 src/wp/main/cocoa/bundle/SXWDocument.icns                        |binary
 src/wp/main/cocoa/bundle/TEXDocument.icns                        |binary
 src/wp/main/cocoa/bundle/TXTDocument.icns                        |binary
 src/wp/main/cocoa/bundle/WPDDocument.icns                        |binary
 src/wp/main/cocoa/bundle/abiword_48.tif                          |binary
 113 files changed, 3900 insertions(+), 313 deletions(-)

diff -Nru abiword-2.8.2/abiword.desktop abiword-2.8.4/abiword.desktop
--- abiword-2.8.2/abiword.desktop	2009-06-21 16:28:21.000000000 +0300
+++ abiword-2.8.4/abiword.desktop	2010-04-15 00:50:18.000000000 +0300
@@ -6,7 +6,7 @@
 Categories=Office;WordProcessor;GNOME;GTK;X-Red-Hat-Base;
 StartupNotify=true
 X-Desktop-File-Install-Version=0.9
-MimeType=application/x-abiword;text/x-abiword;text/x-xml-abiword;text/plain;application/msword;application/rtf;application/vnd.plain;application/xhtml+xml;text/html;application/x-crossmark;application/docbook+xml;application/x-t602;application/vnd.oasis.opendocument.text;application/vnd.sun.xml.writer;application/vnd.stardivision.writer;text/vnd.wap.wml;application/wordperfect6;application/wordperfect5.1;application/vnd.wordperfect;application/x-abicollab;
+MimeType=application/x-abiword;text/x-abiword;text/x-xml-abiword;text/plain;application/msword;application/rtf;application/vnd.plain;application/xhtml+xml;text/html;application/x-crossmark;application/docbook+xml;application/x-t602;application/vnd.oasis.opendocument.text;application/vnd.oasis.opendocument.text-template;application/vnd.oasis.opendocument.text-web;application/vnd.sun.xml.writer;application/vnd.stardivision.writer;text/vnd.wap.wml;application/wordperfect6;application/wordperfect5.1;application/vnd.wordperfect;application/x-abicollab;
 Name=AbiWord
 GenericName=Word Processor
 Comment=Compose, edit, and view documents
diff -Nru abiword-2.8.2/config.h.in abiword-2.8.4/config.h.in
--- abiword-2.8.2/config.h.in	2010-02-12 16:12:26.000000000 +0200
+++ abiword-2.8.4/config.h.in	2010-04-15 00:50:58.000000000 +0300
@@ -118,12 +118,18 @@
 /* Define to the version of this package. */
 #undef PACKAGE_VERSION
 
+/* The platform that is compiled for */
+#undef PLATFORM
+
 /* Define to 1 if you have the ANSI C header files. */
 #undef STDC_HEADERS
 
 /* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
 #undef TIME_WITH_SYS_TIME
 
+/* The toolkit that is used */
+#undef TOOLKIT
+
 /* Build cocoa user interface */
 #undef TOOLKIT_COCOA
 
diff -Nru abiword-2.8.2/configure abiword-2.8.4/configure
--- abiword-2.8.2/configure	2010-02-12 16:12:23.000000000 +0200
+++ abiword-2.8.4/configure	2010-04-15 00:50:56.000000000 +0300
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.63 for abiword 2.8.2.
+# Generated by GNU Autoconf 2.63 for abiword 2.8.4.
 #
 # Report bugs to <http://www.abisource.com/>.
 #
@@ -745,8 +745,8 @@
 # Identity of this package.
 PACKAGE_NAME='abiword'
 PACKAGE_TARNAME='abiword'
-PACKAGE_VERSION='2.8.2'
-PACKAGE_STRING='abiword 2.8.2'
+PACKAGE_VERSION='2.8.4'
+PACKAGE_STRING='abiword 2.8.4'
 PACKAGE_BUGREPORT='http://www.abisource.com/'
 
 # Factoring default headers for most tests.
@@ -1907,7 +1907,7 @@
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures abiword 2.8.2 to adapt to many kinds of systems.
+\`configure' configures abiword 2.8.4 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1977,7 +1977,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of abiword 2.8.2:";;
+     short | recursive ) echo "Configuration of abiword 2.8.4:";;
    esac
   cat <<\_ACEOF
 
@@ -2250,7 +2250,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-abiword configure 2.8.2
+abiword configure 2.8.4
 generated by GNU Autoconf 2.63
 
 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -2264,7 +2264,7 @@
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by abiword $as_me 2.8.2, which was
+It was created by abiword $as_me 2.8.4, which was
 generated by GNU Autoconf 2.63.  Invocation command line was
 
   $ $0 $@
@@ -3199,7 +3199,7 @@
 
 # Define the identity of the package.
  PACKAGE='abiword'
- VERSION='2.8.2'
+ VERSION='2.8.4'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -16615,6 +16615,16 @@
 $as_echo "$PLATFORM / $TOOLKIT" >&6; }
 
 
+cat >>confdefs.h <<_ACEOF
+#define PLATFORM "$PLATFORM"
+_ACEOF
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define TOOLKIT "$TOOLKIT"
+_ACEOF
+
 
 # Platform-specific tests
 
@@ -27700,7 +27710,7 @@
 test "$enable_opendocument" == "auto" && PLUGINS="$PLUGINS opendocument"
 
 OPENDOCUMENT_CFLAGS="$OPENDOCUMENT_CFLAGS "'${PLUGIN_CFLAGS}'
-OPENDOCUMENT_LIBS="$OPENDOCUMENT_LIBS "'${PLUGIN_LIBS}'
+OPENDOCUMENT_LIBS="$OPENDOCUMENT_LIBS "'${PLUGIN_LIBS} -lz'
 
 if test "$enable_opendocument_builtin" == "yes"; then
 	OPENDOCUMENT_CFLAGS="$OPENDOCUMENT_CFLAGS -DABI_PLUGIN_BUILTIN"
@@ -29222,7 +29232,7 @@
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by abiword $as_me 2.8.2, which was
+This file was extended by abiword $as_me 2.8.4, which was
 generated by GNU Autoconf 2.63.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -29285,7 +29295,7 @@
 _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_version="\\
-abiword config.status 2.8.2
+abiword config.status 2.8.4
 configured by $0, generated by GNU Autoconf 2.63,
   with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
 
@@ -32476,7 +32486,7 @@
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by abiword $as_me 2.8.2, which was
+This file was extended by abiword $as_me 2.8.4, which was
 generated by GNU Autoconf 2.63.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -32539,7 +32549,7 @@
 _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_version="\\
-abiword config.status 2.8.2
+abiword config.status 2.8.4
 configured by $0, generated by GNU Autoconf 2.63,
   with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
 
diff -Nru abiword-2.8.2/configure.in abiword-2.8.4/configure.in
--- abiword-2.8.2/configure.in	2010-02-11 22:15:45.000000000 +0200
+++ abiword-2.8.4/configure.in	2010-04-15 00:50:18.000000000 +0300
@@ -1,7 +1,7 @@
 
 m4_define([abi_version_major], [2])
 m4_define([abi_version_minor], [8])
-m4_define([abi_version_micro], [2])
+m4_define([abi_version_micro], [4])
 m4_define([abi_series], [abi_version_major.abi_version_minor])
 m4_define([abi_version], [abi_version_major.abi_version_minor.abi_version_micro])
 
@@ -151,7 +151,9 @@
 esac
 AC_MSG_RESULT([$PLATFORM / $TOOLKIT])
 AC_SUBST([PLATFORM])
+AC_DEFINE_UNQUOTED(PLATFORM, "$PLATFORM", The platform that is compiled for)
 AC_SUBST([TOOLKIT])
+AC_DEFINE_UNQUOTED(TOOLKIT, "$TOOLKIT", The toolkit that is used)
 
 # Platform-specific tests
 
diff -Nru abiword-2.8.2/debian/changelog abiword-2.8.4/debian/changelog
--- abiword-2.8.2/debian/changelog	2010-06-27 12:51:21.000000000 +0300
+++ abiword-2.8.4/debian/changelog	2010-05-06 18:22:43.000000000 +0300
@@ -1,3 +1,31 @@
+abiword (2.8.4-0.1) unstable; urgency=low
+
+  [ Jari Aalto ]
+  * Non-maintainer upload.
+    - Move to packaging format "3.0 (quilt)" due to patches.
+  * New upstream release (Closes: #577733).
+    + Fixes
+      - not being able to open password protected ODT files.
+      - No more crashes on occasions when importing OpenDocument files.
+  * debian/patches
+    - (fixes/svn-backports.diff): Remove. Obsoleted by new release
+    - (debian/patches/fixes/mime-types.diff): Refresh. Move
+      abiword.desktop changes to separate diff.
+    - (fixes/mime-types-desktop.diff): New file.
+  * debian/README.source
+    - Delete. Obsoleted by new packaging format.
+  * debian/source/format
+    - New file.
+
+  [  Hideki Yamane (Debian-JP) <henrich@debian.or.jp> ]
+  * debian/rules
+    - (LDFLAGS): New variable. Move --as-needed from CC variable
+      (FTBFS; Closes: #577871).
+  * debian/control
+    - (Build-Depends): Add flex, bison.
+
+ -- Jari Aalto <jari.aalto@cante.net>  Thu, 06 May 2010 18:22:43 +0300
+
 abiword (2.8.2-2) unstable; urgency=low
 
   * Move from libgoffice-0-8-dev to libgoffice-0.8-dev (see #570351,
diff -Nru abiword-2.8.2/debian/control abiword-2.8.4/debian/control
--- abiword-2.8.2/debian/control	2010-06-27 12:51:21.000000000 +0300
+++ abiword-2.8.4/debian/control	2010-05-27 11:16:25.000000000 +0300
@@ -2,7 +2,7 @@
 Section: gnome
 Priority: optional
 Maintainer: Patrik Fimml <patrik@fimml.at>
-Build-Depends: cdbs, debhelper (>= 7), quilt, libaiksaurus-1.2-dev (>= 1.2.1+dev-0.12-1.1), libaiksaurusgtk-1.2-dev (>= 1.2.1+dev-0.12-1.1), libasio-dev (>= 1.4.1), libenchant-dev (>= 1.2.0), libfreetype6-dev, libfribidi-dev, libglade2-dev, libglib2.0-dev, libgsf-1-dev (>= 1.13.2), libgtk2.0-dev, libgtkmathview-dev (>= 0.7.5), liblink-grammar4-dev, libloudmouth1-dev, libots-dev, libpng-dev, libpopt-dev, libreadline-dev, libwmf-dev, libwpd-dev, libwpg-dev (>= 0.1.0), libwps-dev, libwv-dev (>= 1.2), libgoffice-0.8-dev, libgucharmap2-dev, libpsiconv-dev (>= 0.9.4), librsvg2-dev (>= 2.16.0), libboost-regex-dev, libsoup2.4-dev, libdbus-glib-1-dev, libxslt-dev, libaspell-dev
+Build-Depends: cdbs, debhelper (>= 7), quilt, libaiksaurus-1.2-dev (>= 1.2.1+dev-0.12-1.1), libaiksaurusgtk-1.2-dev (>= 1.2.1+dev-0.12-1.1), libasio-dev (>= 1.4.1), libenchant-dev (>= 1.2.0), libfreetype6-dev, libfribidi-dev, libglade2-dev, libglib2.0-dev, libgsf-1-dev (>= 1.13.2), libgtk2.0-dev, libgtkmathview-dev (>= 0.7.5), liblink-grammar4-dev, libloudmouth1-dev, libots-dev, libpng-dev, libpopt-dev, libreadline-dev, libwmf-dev, libwpd-dev, libwpg-dev (>= 0.1.0), libwps-dev, libwv-dev (>= 1.2), libgoffice-0.8-dev, libgucharmap2-dev, libpsiconv-dev (>= 0.9.4), librsvg2-dev (>= 2.16.0), libboost-regex-dev, libsoup2.4-dev, libdbus-glib-1-dev, libxslt-dev, libaspell-dev, flex, bison
 Standards-Version: 3.8.4
 Homepage: http://www.abisource.com/
 Vcs-Browser: http://git.debian.org/?p=users/patrikf-guest/abiword.git;a=summary
diff -Nru abiword-2.8.2/debian/patches/fixes/mime-types-desktop.diff abiword-2.8.4/debian/patches/fixes/mime-types-desktop.diff
--- abiword-2.8.2/debian/patches/fixes/mime-types-desktop.diff	1970-01-01 02:00:00.000000000 +0200
+++ abiword-2.8.4/debian/patches/fixes/mime-types-desktop.diff	2010-05-05 14:29:27.000000000 +0300
@@ -0,0 +1,29 @@
+From 29ed705879829d8cbc5d0a6a53d82ee00bc7de79 Mon Sep 17 00:00:00 2001
+From: Jari Aalto <jari.aalto@cante.net>
+Date: Wed, 5 May 2010 14:26:48 +0300
+Subject: [PATCH] abiword.desktop: Add to the end application/vnd.palm...
+Organization: Private
+Content-Type: text/plain; charset="utf-8"
+Content-Transfer-Encoding: 8bit
+
+Signed-off-by: Jari Aalto <jari.aalto@cante.net>
+---
+ abiword.desktop |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/abiword.desktop b/abiword.desktop
+index badb794..8ebc4cc 100644
+--- a/abiword.desktop
++++ b/abiword.desktop
+@@ -6,7 +6,7 @@ Type=Application
+ Categories=Office;WordProcessor;GNOME;GTK;X-Red-Hat-Base;
+ StartupNotify=true
+ X-Desktop-File-Install-Version=0.9
+-MimeType=application/x-abiword;text/x-abiword;text/x-xml-abiword;text/plain;application/msword;application/rtf;application/vnd.plain;application/xhtml+xml;text/html;application/x-crossmark;application/docbook+xml;application/x-t602;application/vnd.oasis.opendocument.text;application/vnd.oasis.opendocument.text-template;application/vnd.oasis.opendocument.text-web;application/vnd.sun.xml.writer;application/vnd.stardivision.writer;text/vnd.wap.wml;application/wordperfect6;application/wordperfect5.1;application/vnd.wordperfect;application/x-abicollab;
++MimeType=application/x-abiword;text/x-abiword;text/x-xml-abiword;text/plain;application/msword;application/rtf;application/vnd.plain;application/xhtml+xml;text/html;application/x-crossmark;application/docbook+xml;application/x-t602;application/vnd.oasis.opendocument.text;application/vnd.oasis.opendocument.text-template;application/vnd.oasis.opendocument.text-web;application/vnd.sun.xml.writer;application/vnd.stardivision.writer;text/vnd.wap.wml;application/wordperfect6;application/wordperfect5.1;application/vnd.wordperfect;application/x-abicollab;application/vnd.palm;application/x-applix-word;application/x-kword;application/x-mif;application/x-mswrite;application/x-palm-database;text/abiword;text/richtext;text/rtf;application/x-abicollab
+ Name=AbiWord
+ GenericName=Word Processor
+ Comment=Compose, edit, and view documents
+-- 
+1.7.0
+
diff -Nru abiword-2.8.2/debian/patches/fixes/mime-types.diff abiword-2.8.4/debian/patches/fixes/mime-types.diff
--- abiword-2.8.2/debian/patches/fixes/mime-types.diff	2010-06-27 12:51:21.000000000 +0300
+++ abiword-2.8.4/debian/patches/fixes/mime-types.diff	2010-05-05 14:32:56.000000000 +0300
@@ -1,48 +1,29 @@
-From: Patrik Fimml <patrik@fimml.at>
-Subject: [PATCH] fixes/mime-types
-
-Add more MIME types
-
-Signed-off-by: Patrik Fimml <patrik@fimml.at>
+From 9936beb5f7ddd2d68ddf5076af2ccba6949dedf3 Mon Sep 17 00:00:00 2001
+From: Jari Aalto <jari.aalto@cante.net>
+Date: Wed, 5 May 2010 01:28:35 +0300
+Subject: [PATCH] abiword.keys: Add more MIME types
+Organization: Private
+Content-Type: text/plain; charset="utf-8"
+Content-Transfer-Encoding: 8bit
 
+Signed-off-by: Jari Aalto <jari.aalto@cante.net>
 ---
- abiword.desktop |    2 +-
- abiword.keys    |  104 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
- 2 files changed, 105 insertions(+), 1 deletions(-)
+ abiword.keys |  104 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 104 insertions(+), 0 deletions(-)
 
-diff --git a/abiword.desktop b/abiword.desktop
-index c11d0ac..7612564 100644
---- a/abiword.desktop
-+++ b/abiword.desktop
-@@ -6,7 +6,7 @@ Type=Application
- Categories=Office;WordProcessor;GNOME;GTK;X-Red-Hat-Base;
- StartupNotify=true
- X-Desktop-File-Install-Version=0.9
--MimeType=application/x-abiword;text/x-abiword;text/x-xml-abiword;text/plain;application/msword;application/rtf;application/vnd.plain;application/xhtml+xml;text/html;application/x-crossmark;application/docbook+xml;application/x-t602;application/vnd.oasis.opendocument.text;application/vnd.sun.xml.writer;application/vnd.stardivision.writer;text/vnd.wap.wml;application/wordperfect6;application/wordperfect5.1;application/vnd.wordperfect;application/x-abicollab;
-+MimeType=application/x-abiword;text/x-abiword;text/x-xml-abiword;text/plain;application/msword;application/rtf;application/vnd.plain;application/xhtml+xml;text/html;application/x-crossmark;application/docbook+xml;application/x-t602;application/vnd.oasis.opendocument.text;application/vnd.sun.xml.writer;application/vnd.stardivision.writer;text/vnd.wap.wml;application/wordperfect6;application/wordperfect5.1;application/vnd.wordperfect;application/x-abicollab;application/vnd.palm;application/x-applix-word;application/x-kword;application/x-mif;application/x-mswrite;application/x-palm-database;text/abiword;text/richtext;text/rtf;application/x-abicollab
- Name=AbiWord
- GenericName=Word Processor
- Comment=Compose, edit, and view documents
 diff --git a/abiword.keys b/abiword.keys
-index 308384d..5a15c25 100644
+index 308384d..b098aed 100644
 --- a/abiword.keys
 +++ b/abiword.keys
-@@ -2,6 +2,10 @@ application/x-abiword:
+@@ -9,3 +9,107 @@ application/msword:
+ application/rtf:
  	open=abiword %f
  	view=abiword %f
- 
++
 +application/x-abicollab:
 +	open=abiword %f
 +	view=abiword %f
 +
- application/msword:
- 	open=abiword %f
- 	view=abiword %f
-@@ -9,3 +13,103 @@ application/msword:
- application/rtf:
- 	open=abiword %f
- 	view=abiword %f
-+
 +application/x-crossmark:
 +	open=abiword %f
 +	view=abiword %f
@@ -143,4 +124,5 @@
 +	open=abiword %f
 +	open=abiword %f
 -- 
-tg: (a60ef3b..) fixes/mime-types (depends on: master)
+1.7.0
+
diff -Nru abiword-2.8.2/debian/patches/fixes/svn-backports.diff abiword-2.8.4/debian/patches/fixes/svn-backports.diff
--- abiword-2.8.2/debian/patches/fixes/svn-backports.diff	2010-06-27 12:51:21.000000000 +0300
+++ abiword-2.8.4/debian/patches/fixes/svn-backports.diff	1970-01-01 02:00:00.000000000 +0200
@@ -1,35 +0,0 @@
-From: Patrik Fimml <patrik@fimml.at>
-Subject: [PATCH] fixes/svn-backports
-
-Backports from SVN trunk for 2.8.2
-
-r28710: Fixes GValue initialization. Please backport. (Jean Brefort)
-
-Signed-off-by: Patrik Fimml <patrik@fimml.at>
-
----
- plugins/goffice/unix/AbiGOComponent.cpp |    2 ++
- 1 files changed, 2 insertions(+), 0 deletions(-)
-
-diff --git a/plugins/goffice/unix/AbiGOComponent.cpp b/plugins/goffice/unix/AbiGOComponent.cpp
-index ba617c8..40638d5 100644
---- a/plugins/goffice/unix/AbiGOComponent.cpp
-+++ b/plugins/goffice/unix/AbiGOComponent.cpp
-@@ -626,6 +626,7 @@ changed_cb (GOComponent *component, gpointer data)
- 				for (i = 0; i < nbprops; i++) {
- 					if (specs[i]->flags & GOC_PARAM_PERSISTENT) {
- 						prop_type = G_PARAM_SPEC_VALUE_TYPE (specs[i]);
-+						memset(&value, 0, sizeof(value));
- 						g_value_init (&value, prop_type);
- 						g_object_get_property  (G_OBJECT (component), specs[i]->name, &value);
- 						if (!g_param_value_defaults (specs[i], &value))
-@@ -640,6 +641,7 @@ changed_cb (GOComponent *component, gpointer data)
- 							case G_TYPE_FLOAT:
- 							case G_TYPE_DOUBLE: {
- 								GValue str;
-+								memset(&str, 0, sizeof(str));
- 								g_value_init (&str, G_TYPE_STRING);
- 								g_value_transform (&value, &str);
- 								prop = g_strdup (g_value_get_string (&str));
--- 
-tg: (194543c..) fixes/svn-backports (depends on: master)
diff -Nru abiword-2.8.2/debian/patches/series abiword-2.8.4/debian/patches/series
--- abiword-2.8.2/debian/patches/series	2010-06-27 12:51:21.000000000 +0300
+++ abiword-2.8.4/debian/patches/series	2010-05-05 14:35:34.000000000 +0300
@@ -4,5 +4,6 @@
 fixes/ctrl-comma-subscript.diff -p1
 fixes/fully-link-plugins.diff -p1
 fixes/link-plugins-with-cxx.diff -p1
+fixes/mime-types-desktop.diff -p1
 fixes/mime-types.diff -p1
-fixes/svn-backports.diff -p1
+
diff -Nru abiword-2.8.2/debian/README.source abiword-2.8.4/debian/README.source
--- abiword-2.8.2/debian/README.source	2010-06-27 12:51:21.000000000 +0300
+++ abiword-2.8.4/debian/README.source	1970-01-01 02:00:00.000000000 +0200
@@ -1,6 +0,0 @@
-This package uses quilt at build-time to apply patches. See
-/usr/share/doc/quilt/README.source for information on how to use quilt.
-
-This package is maintained in a Git repository, and TopGit is used to generate
-the quilt series from git branches. For more information on TopGit, see
-/usr/share/doc/topgit/HOWTO-tg2quilt.gz .
diff -Nru abiword-2.8.2/debian/rules abiword-2.8.4/debian/rules
--- abiword-2.8.2/debian/rules	2010-06-27 12:51:21.000000000 +0300
+++ abiword-2.8.4/debian/rules	2010-05-05 18:37:07.000000000 +0300
@@ -31,10 +31,7 @@
 DEB_INSTALL_DOCS_abiword := $(CURDIR)/user/wp/readme.txt $(CURDIR)/user/wp/readme.abw
 DEB_DH_MAKESHLIBS_ARGS_libabiword-2.8 := -V "libabiword-2.8 (= $(DEB_VERSION))"
 
-# --as-needed needs to be in front of all library flags. a small hack to
-# achieve this
-CC := gcc -Wl,--as-needed
-CXX := g++ -Wl,--as-needed
+LDFLAGS = -Wl,-z,defs,--as-needed
 
 # handle DEB_BUILD_OPTIONS
 # noopt is handled by cdbs' langcore.mk
diff -Nru abiword-2.8.2/debian/source/format abiword-2.8.4/debian/source/format
--- abiword-2.8.2/debian/source/format	1970-01-01 02:00:00.000000000 +0200
+++ abiword-2.8.4/debian/source/format	2010-05-05 17:30:02.000000000 +0300
@@ -0,0 +1 @@
+3.0 (quilt)
diff -Nru abiword-2.8.2/plugin-configure.m4 abiword-2.8.4/plugin-configure.m4
--- abiword-2.8.2/plugin-configure.m4	2010-02-12 16:12:07.000000000 +0200
+++ abiword-2.8.4/plugin-configure.m4	2010-04-15 00:50:40.000000000 +0300
@@ -1678,7 +1678,7 @@
 test "$enable_opendocument" == "auto" && PLUGINS="$PLUGINS opendocument"
 
 OPENDOCUMENT_CFLAGS="$OPENDOCUMENT_CFLAGS "'${PLUGIN_CFLAGS}'
-OPENDOCUMENT_LIBS="$OPENDOCUMENT_LIBS "'${PLUGIN_LIBS}'
+OPENDOCUMENT_LIBS="$OPENDOCUMENT_LIBS "'${PLUGIN_LIBS} -lz'
 
 if test "$enable_opendocument_builtin" == "yes"; then
 	OPENDOCUMENT_CFLAGS="$OPENDOCUMENT_CFLAGS -DABI_PLUGIN_BUILTIN"
diff -Nru abiword-2.8.2/plugins/goffice/unix/AbiGOComponent.cpp abiword-2.8.4/plugins/goffice/unix/AbiGOComponent.cpp
--- abiword-2.8.2/plugins/goffice/unix/AbiGOComponent.cpp	2009-12-13 22:21:44.000000000 +0200
+++ abiword-2.8.4/plugins/goffice/unix/AbiGOComponent.cpp	2010-04-15 00:50:16.000000000 +0300
@@ -225,6 +225,12 @@
     return true;
 }
 
+static bool button_press_cb(GtkDialog *dlg, GdkEventButton *ev)
+{
+	if (ev->type == GDK_2BUTTON_PRESS)
+		gtk_dialog_response(dlg, GTK_RESPONSE_OK);
+	return false;
+}
 //
 // AbiGOComponent_Create
 // -------------------
@@ -240,6 +246,7 @@
 		GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_OK, GTK_RESPONSE_OK, NULL));
 	GtkListStore *list = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_STRING);
 	GtkWidget *w = gtk_tree_view_new_with_model (GTK_TREE_MODEL (list));
+	g_signal_connect_swapped(w, "button-press-event", G_CALLBACK(button_press_cb), dialog);
 	GtkCellRenderer *renderer;
 	GtkTreeViewColumn *column;
 	renderer = gtk_cell_renderer_text_new ();
@@ -626,6 +633,7 @@
 				for (i = 0; i < nbprops; i++) {
 					if (specs[i]->flags & GOC_PARAM_PERSISTENT) {
 						prop_type = G_PARAM_SPEC_VALUE_TYPE (specs[i]);
+						memset(&value, 0, sizeof(value));
 						g_value_init (&value, prop_type);
 						g_object_get_property  (G_OBJECT (component), specs[i]->name, &value);
 						if (!g_param_value_defaults (specs[i], &value))
@@ -640,6 +648,7 @@
 							case G_TYPE_FLOAT:
 							case G_TYPE_DOUBLE: {
 								GValue str;
+								memset(&str, 0, sizeof(str));
 								g_value_init (&str, G_TYPE_STRING);
 								g_value_transform (&value, &str);
 								prop = g_strdup (g_value_get_string (&str));
diff -Nru abiword-2.8.2/plugins/opendocument/common/xp/crypto/blowfish/bf_cfb64.c abiword-2.8.4/plugins/opendocument/common/xp/crypto/blowfish/bf_cfb64.c
--- abiword-2.8.2/plugins/opendocument/common/xp/crypto/blowfish/bf_cfb64.c	1970-01-01 02:00:00.000000000 +0200
+++ abiword-2.8.4/plugins/opendocument/common/xp/crypto/blowfish/bf_cfb64.c	2010-04-15 00:50:16.000000000 +0300
@@ -0,0 +1,121 @@
+/* crypto/bf/bf_cfb64.c */
+/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
+ * All rights reserved.
+ *
+ * This package is an SSL implementation written
+ * by Eric Young (eay@cryptsoft.com).
+ * The implementation was written so as to conform with Netscapes SSL.
+ * 
+ * This library is free for commercial and non-commercial use as long as
+ * the following conditions are aheared to.  The following conditions
+ * apply to all code found in this distribution, be it the RC4, RSA,
+ * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
+ * included with this distribution is covered by the same copyright terms
+ * except that the holder is Tim Hudson (tjh@cryptsoft.com).
+ * 
+ * Copyright remains Eric Young's, and as such any Copyright notices in
+ * the code are not to be removed.
+ * If this package is used in a product, Eric Young should be given attribution
+ * as the author of the parts of the library used.
+ * This can be in the form of a textual message at program startup or
+ * in documentation (online or textual) provided with the package.
+ * 
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *    "This product includes cryptographic software written by
+ *     Eric Young (eay@cryptsoft.com)"
+ *    The word 'cryptographic' can be left out if the rouines from the library
+ *    being used are not cryptographic related :-).
+ * 4. If you include any Windows specific code (or a derivative thereof) from 
+ *    the apps directory (application code) you must include an acknowledgement:
+ *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
+ * 
+ * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ * 
+ * The licence and distribution terms for any publically available version or
+ * derivative of this code cannot be changed.  i.e. this code cannot simply be
+ * copied and put under another distribution licence
+ * [including the GNU Public Licence.]
+ */
+
+#include <blowfish.h>
+#include "bf_locl.h"
+
+/* The input and output encrypted as though 64bit cfb mode is being
+ * used.  The extra state information to record how much of the
+ * 64bit block we have used is contained in *num;
+ */
+
+void BF_cfb64_encrypt(const unsigned char *in, unsigned char *out, long length,
+	     const BF_KEY *schedule, unsigned char *ivec, int *num, int encrypt)
+	{
+	register BF_LONG v0,v1,t;
+	register int n= *num;
+	register long l=length;
+	BF_LONG ti[2];
+	unsigned char *iv,c,cc;
+
+	iv=(unsigned char *)ivec;
+	if (encrypt)
+		{
+		while (l--)
+			{
+			if (n == 0)
+				{
+				n2l(iv,v0); ti[0]=v0;
+				n2l(iv,v1); ti[1]=v1;
+				BF_encrypt((BF_LONG *)ti,schedule);
+				iv=(unsigned char *)ivec;
+				t=ti[0]; l2n(t,iv);
+				t=ti[1]; l2n(t,iv);
+				iv=(unsigned char *)ivec;
+				}
+			c= *(in++)^iv[n];
+			*(out++)=c;
+			iv[n]=c;
+			n=(n+1)&0x07;
+			}
+		}
+	else
+		{
+		while (l--)
+			{
+			if (n == 0)
+				{
+				n2l(iv,v0); ti[0]=v0;
+				n2l(iv,v1); ti[1]=v1;
+				BF_encrypt((BF_LONG *)ti,schedule);
+				iv=(unsigned char *)ivec;
+				t=ti[0]; l2n(t,iv);
+				t=ti[1]; l2n(t,iv);
+				iv=(unsigned char *)ivec;
+				}
+			cc= *(in++);
+			c=iv[n];
+			iv[n]=cc;
+			*(out++)=c^cc;
+			n=(n+1)&0x07;
+			}
+		}
+	v0=v1=ti[0]=ti[1]=t=c=cc=0;
+	*num=n;
+	}
+
diff -Nru abiword-2.8.2/plugins/opendocument/common/xp/crypto/blowfish/bf_enc.c abiword-2.8.4/plugins/opendocument/common/xp/crypto/blowfish/bf_enc.c
--- abiword-2.8.2/plugins/opendocument/common/xp/crypto/blowfish/bf_enc.c	1970-01-01 02:00:00.000000000 +0200
+++ abiword-2.8.4/plugins/opendocument/common/xp/crypto/blowfish/bf_enc.c	2010-04-15 00:50:16.000000000 +0300
@@ -0,0 +1,306 @@
+/* crypto/bf/bf_enc.c */
+/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
+ * All rights reserved.
+ *
+ * This package is an SSL implementation written
+ * by Eric Young (eay@cryptsoft.com).
+ * The implementation was written so as to conform with Netscapes SSL.
+ * 
+ * This library is free for commercial and non-commercial use as long as
+ * the following conditions are aheared to.  The following conditions
+ * apply to all code found in this distribution, be it the RC4, RSA,
+ * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
+ * included with this distribution is covered by the same copyright terms
+ * except that the holder is Tim Hudson (tjh@cryptsoft.com).
+ * 
+ * Copyright remains Eric Young's, and as such any Copyright notices in
+ * the code are not to be removed.
+ * If this package is used in a product, Eric Young should be given attribution
+ * as the author of the parts of the library used.
+ * This can be in the form of a textual message at program startup or
+ * in documentation (online or textual) provided with the package.
+ * 
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *    "This product includes cryptographic software written by
+ *     Eric Young (eay@cryptsoft.com)"
+ *    The word 'cryptographic' can be left out if the rouines from the library
+ *    being used are not cryptographic related :-).
+ * 4. If you include any Windows specific code (or a derivative thereof) from 
+ *    the apps directory (application code) you must include an acknowledgement:
+ *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
+ * 
+ * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ * 
+ * The licence and distribution terms for any publically available version or
+ * derivative of this code cannot be changed.  i.e. this code cannot simply be
+ * copied and put under another distribution licence
+ * [including the GNU Public Licence.]
+ */
+
+#include <blowfish.h>
+#include "bf_locl.h"
+
+/* Blowfish as implemented from 'Blowfish: Springer-Verlag paper'
+ * (From LECTURE NOTES IN COMPUTER SCIENCE 809, FAST SOFTWARE ENCRYPTION,
+ * CAMBRIDGE SECURITY WORKSHOP, CAMBRIDGE, U.K., DECEMBER 9-11, 1993)
+ */
+
+#if (BF_ROUNDS != 16) && (BF_ROUNDS != 20)
+#error If you set BF_ROUNDS to some value other than 16 or 20, you will have \
+to modify the code.
+#endif
+
+void BF_encrypt(BF_LONG *data, const BF_KEY *key)
+	{
+#ifndef BF_PTR2
+	register BF_LONG l,r;
+	register const BF_LONG *p,*s;
+
+	p=key->P;
+	s= &(key->S[0]);
+	l=data[0];
+	r=data[1];
+
+	l^=p[0];
+	BF_ENC(r,l,s,p[ 1]);
+	BF_ENC(l,r,s,p[ 2]);
+	BF_ENC(r,l,s,p[ 3]);
+	BF_ENC(l,r,s,p[ 4]);
+	BF_ENC(r,l,s,p[ 5]);
+	BF_ENC(l,r,s,p[ 6]);
+	BF_ENC(r,l,s,p[ 7]);
+	BF_ENC(l,r,s,p[ 8]);
+	BF_ENC(r,l,s,p[ 9]);
+	BF_ENC(l,r,s,p[10]);
+	BF_ENC(r,l,s,p[11]);
+	BF_ENC(l,r,s,p[12]);
+	BF_ENC(r,l,s,p[13]);
+	BF_ENC(l,r,s,p[14]);
+	BF_ENC(r,l,s,p[15]);
+	BF_ENC(l,r,s,p[16]);
+#if BF_ROUNDS == 20
+	BF_ENC(r,l,s,p[17]);
+	BF_ENC(l,r,s,p[18]);
+	BF_ENC(r,l,s,p[19]);
+	BF_ENC(l,r,s,p[20]);
+#endif
+	r^=p[BF_ROUNDS+1];
+
+	data[1]=l&0xffffffffL;
+	data[0]=r&0xffffffffL;
+#else
+	register BF_LONG l,r,t,*k;
+
+	l=data[0];
+	r=data[1];
+	k=(BF_LONG*)key;
+
+	l^=k[0];
+	BF_ENC(r,l,k, 1);
+	BF_ENC(l,r,k, 2);
+	BF_ENC(r,l,k, 3);
+	BF_ENC(l,r,k, 4);
+	BF_ENC(r,l,k, 5);
+	BF_ENC(l,r,k, 6);
+	BF_ENC(r,l,k, 7);
+	BF_ENC(l,r,k, 8);
+	BF_ENC(r,l,k, 9);
+	BF_ENC(l,r,k,10);
+	BF_ENC(r,l,k,11);
+	BF_ENC(l,r,k,12);
+	BF_ENC(r,l,k,13);
+	BF_ENC(l,r,k,14);
+	BF_ENC(r,l,k,15);
+	BF_ENC(l,r,k,16);
+#if BF_ROUNDS == 20
+	BF_ENC(r,l,k,17);
+	BF_ENC(l,r,k,18);
+	BF_ENC(r,l,k,19);
+	BF_ENC(l,r,k,20);
+#endif
+	r^=k[BF_ROUNDS+1];
+
+	data[1]=l&0xffffffffL;
+	data[0]=r&0xffffffffL;
+#endif
+	}
+
+#ifndef BF_DEFAULT_OPTIONS
+
+void BF_decrypt(BF_LONG *data, const BF_KEY *key)
+	{
+#ifndef BF_PTR2
+	register BF_LONG l,r;
+	register const BF_LONG *p,*s;
+
+	p=key->P;
+	s= &(key->S[0]);
+	l=data[0];
+	r=data[1];
+
+	l^=p[BF_ROUNDS+1];
+#if BF_ROUNDS == 20
+	BF_ENC(r,l,s,p[20]);
+	BF_ENC(l,r,s,p[19]);
+	BF_ENC(r,l,s,p[18]);
+	BF_ENC(l,r,s,p[17]);
+#endif
+	BF_ENC(r,l,s,p[16]);
+	BF_ENC(l,r,s,p[15]);
+	BF_ENC(r,l,s,p[14]);
+	BF_ENC(l,r,s,p[13]);
+	BF_ENC(r,l,s,p[12]);
+	BF_ENC(l,r,s,p[11]);
+	BF_ENC(r,l,s,p[10]);
+	BF_ENC(l,r,s,p[ 9]);
+	BF_ENC(r,l,s,p[ 8]);
+	BF_ENC(l,r,s,p[ 7]);
+	BF_ENC(r,l,s,p[ 6]);
+	BF_ENC(l,r,s,p[ 5]);
+	BF_ENC(r,l,s,p[ 4]);
+	BF_ENC(l,r,s,p[ 3]);
+	BF_ENC(r,l,s,p[ 2]);
+	BF_ENC(l,r,s,p[ 1]);
+	r^=p[0];
+
+	data[1]=l&0xffffffffL;
+	data[0]=r&0xffffffffL;
+#else
+	register BF_LONG l,r,t,*k;
+
+	l=data[0];
+	r=data[1];
+	k=(BF_LONG *)key;
+
+	l^=k[BF_ROUNDS+1];
+#if BF_ROUNDS == 20
+	BF_ENC(r,l,k,20);
+	BF_ENC(l,r,k,19);
+	BF_ENC(r,l,k,18);
+	BF_ENC(l,r,k,17);
+#endif
+	BF_ENC(r,l,k,16);
+	BF_ENC(l,r,k,15);
+	BF_ENC(r,l,k,14);
+	BF_ENC(l,r,k,13);
+	BF_ENC(r,l,k,12);
+	BF_ENC(l,r,k,11);
+	BF_ENC(r,l,k,10);
+	BF_ENC(l,r,k, 9);
+	BF_ENC(r,l,k, 8);
+	BF_ENC(l,r,k, 7);
+	BF_ENC(r,l,k, 6);
+	BF_ENC(l,r,k, 5);
+	BF_ENC(r,l,k, 4);
+	BF_ENC(l,r,k, 3);
+	BF_ENC(r,l,k, 2);
+	BF_ENC(l,r,k, 1);
+	r^=k[0];
+
+	data[1]=l&0xffffffffL;
+	data[0]=r&0xffffffffL;
+#endif
+	}
+
+void BF_cbc_encrypt(const unsigned char *in, unsigned char *out, long length,
+	     const BF_KEY *schedule, unsigned char *ivec, int encrypt)
+	{
+	register BF_LONG tin0,tin1;
+	register BF_LONG tout0,tout1,xor0,xor1;
+	register long l=length;
+	BF_LONG tin[2];
+
+	if (encrypt)
+		{
+		n2l(ivec,tout0);
+		n2l(ivec,tout1);
+		ivec-=8;
+		for (l-=8; l>=0; l-=8)
+			{
+			n2l(in,tin0);
+			n2l(in,tin1);
+			tin0^=tout0;
+			tin1^=tout1;
+			tin[0]=tin0;
+			tin[1]=tin1;
+			BF_encrypt(tin,schedule);
+			tout0=tin[0];
+			tout1=tin[1];
+			l2n(tout0,out);
+			l2n(tout1,out);
+			}
+		if (l != -8)
+			{
+			n2ln(in,tin0,tin1,l+8);
+			tin0^=tout0;
+			tin1^=tout1;
+			tin[0]=tin0;
+			tin[1]=tin1;
+			BF_encrypt(tin,schedule);
+			tout0=tin[0];
+			tout1=tin[1];
+			l2n(tout0,out);
+			l2n(tout1,out);
+			}
+		l2n(tout0,ivec);
+		l2n(tout1,ivec);
+		}
+	else
+		{
+		n2l(ivec,xor0);
+		n2l(ivec,xor1);
+		ivec-=8;
+		for (l-=8; l>=0; l-=8)
+			{
+			n2l(in,tin0);
+			n2l(in,tin1);
+			tin[0]=tin0;
+			tin[1]=tin1;
+			BF_decrypt(tin,schedule);
+			tout0=tin[0]^xor0;
+			tout1=tin[1]^xor1;
+			l2n(tout0,out);
+			l2n(tout1,out);
+			xor0=tin0;
+			xor1=tin1;
+			}
+		if (l != -8)
+			{
+			n2l(in,tin0);
+			n2l(in,tin1);
+			tin[0]=tin0;
+			tin[1]=tin1;
+			BF_decrypt(tin,schedule);
+			tout0=tin[0]^xor0;
+			tout1=tin[1]^xor1;
+			l2nn(tout0,tout1,out,l+8);
+			xor0=tin0;
+			xor1=tin1;
+			}
+		l2n(xor0,ivec);
+		l2n(xor1,ivec);
+		}
+	tin0=tin1=tout0=tout1=xor0=xor1=0;
+	tin[0]=tin[1]=0;
+	}
+
+#endif
diff -Nru abiword-2.8.2/plugins/opendocument/common/xp/crypto/blowfish/bf_locl.h abiword-2.8.4/plugins/opendocument/common/xp/crypto/blowfish/bf_locl.h
--- abiword-2.8.2/plugins/opendocument/common/xp/crypto/blowfish/bf_locl.h	1970-01-01 02:00:00.000000000 +0200
+++ abiword-2.8.4/plugins/opendocument/common/xp/crypto/blowfish/bf_locl.h	2010-04-15 00:50:16.000000000 +0300
@@ -0,0 +1,219 @@
+/* crypto/bf/bf_locl.h */
+/* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
+ * All rights reserved.
+ *
+ * This package is an SSL implementation written
+ * by Eric Young (eay@cryptsoft.com).
+ * The implementation was written so as to conform with Netscapes SSL.
+ * 
+ * This library is free for commercial and non-commercial use as long as
+ * the following conditions are aheared to.  The following conditions
+ * apply to all code found in this distribution, be it the RC4, RSA,
+ * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
+ * included with this distribution is covered by the same copyright terms
+ * except that the holder is Tim Hudson (tjh@cryptsoft.com).
+ * 
+ * Copyright remains Eric Young's, and as such any Copyright notices in
+ * the code are not to be removed.
+ * If this package is used in a product, Eric Young should be given attribution
+ * as the author of the parts of the library used.
+ * This can be in the form of a textual message at program startup or
+ * in documentation (online or textual) provided with the package.
+ * 
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *    "This product includes cryptographic software written by
+ *     Eric Young (eay@cryptsoft.com)"
+ *    The word 'cryptographic' can be left out if the rouines from the library
+ *    being used are not cryptographic related :-).
+ * 4. If you include any Windows specific code (or a derivative thereof) from 
+ *    the apps directory (application code) you must include an acknowledgement:
+ *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
+ * 
+ * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ * 
+ * The licence and distribution terms for any publically available version or
+ * derivative of this code cannot be changed.  i.e. this code cannot simply be
+ * copied and put under another distribution licence
+ * [including the GNU Public Licence.]
+ */
+
+#ifndef HEADER_BF_LOCL_H
+#define HEADER_BF_LOCL_H
+//#include <openssl/opensslconf.h> /* BF_PTR, BF_PTR2 */
+
+#undef c2l
+#define c2l(c,l)	(l =((unsigned long)(*((c)++)))    , \
+			 l|=((unsigned long)(*((c)++)))<< 8L, \
+			 l|=((unsigned long)(*((c)++)))<<16L, \
+			 l|=((unsigned long)(*((c)++)))<<24L)
+
+/* NOTE - c is not incremented as per c2l */
+#undef c2ln
+#define c2ln(c,l1,l2,n)	{ \
+			c+=n; \
+			l1=l2=0; \
+			switch (n) { \
+			case 8: l2 =((unsigned long)(*(--(c))))<<24L; \
+			case 7: l2|=((unsigned long)(*(--(c))))<<16L; \
+			case 6: l2|=((unsigned long)(*(--(c))))<< 8L; \
+			case 5: l2|=((unsigned long)(*(--(c))));     \
+			case 4: l1 =((unsigned long)(*(--(c))))<<24L; \
+			case 3: l1|=((unsigned long)(*(--(c))))<<16L; \
+			case 2: l1|=((unsigned long)(*(--(c))))<< 8L; \
+			case 1: l1|=((unsigned long)(*(--(c))));     \
+				} \
+			}
+
+#undef l2c
+#define l2c(l,c)	(*((c)++)=(unsigned char)(((l)     )&0xff), \
+			 *((c)++)=(unsigned char)(((l)>> 8L)&0xff), \
+			 *((c)++)=(unsigned char)(((l)>>16L)&0xff), \
+			 *((c)++)=(unsigned char)(((l)>>24L)&0xff))
+
+/* NOTE - c is not incremented as per l2c */
+#undef l2cn
+#define l2cn(l1,l2,c,n)	{ \
+			c+=n; \
+			switch (n) { \
+			case 8: *(--(c))=(unsigned char)(((l2)>>24L)&0xff); \
+			case 7: *(--(c))=(unsigned char)(((l2)>>16L)&0xff); \
+			case 6: *(--(c))=(unsigned char)(((l2)>> 8L)&0xff); \
+			case 5: *(--(c))=(unsigned char)(((l2)     )&0xff); \
+			case 4: *(--(c))=(unsigned char)(((l1)>>24L)&0xff); \
+			case 3: *(--(c))=(unsigned char)(((l1)>>16L)&0xff); \
+			case 2: *(--(c))=(unsigned char)(((l1)>> 8L)&0xff); \
+			case 1: *(--(c))=(unsigned char)(((l1)     )&0xff); \
+				} \
+			}
+
+/* NOTE - c is not incremented as per n2l */
+#define n2ln(c,l1,l2,n)	{ \
+			c+=n; \
+			l1=l2=0; \
+			switch (n) { \
+			case 8: l2 =((unsigned long)(*(--(c))))    ; \
+			case 7: l2|=((unsigned long)(*(--(c))))<< 8; \
+			case 6: l2|=((unsigned long)(*(--(c))))<<16; \
+			case 5: l2|=((unsigned long)(*(--(c))))<<24; \
+			case 4: l1 =((unsigned long)(*(--(c))))    ; \
+			case 3: l1|=((unsigned long)(*(--(c))))<< 8; \
+			case 2: l1|=((unsigned long)(*(--(c))))<<16; \
+			case 1: l1|=((unsigned long)(*(--(c))))<<24; \
+				} \
+			}
+
+/* NOTE - c is not incremented as per l2n */
+#define l2nn(l1,l2,c,n)	{ \
+			c+=n; \
+			switch (n) { \
+			case 8: *(--(c))=(unsigned char)(((l2)    )&0xff); \
+			case 7: *(--(c))=(unsigned char)(((l2)>> 8)&0xff); \
+			case 6: *(--(c))=(unsigned char)(((l2)>>16)&0xff); \
+			case 5: *(--(c))=(unsigned char)(((l2)>>24)&0xff); \
+			case 4: *(--(c))=(unsigned char)(((l1)    )&0xff); \
+			case 3: *(--(c))=(unsigned char)(((l1)>> 8)&0xff); \
+			case 2: *(--(c))=(unsigned char)(((l1)>>16)&0xff); \
+			case 1: *(--(c))=(unsigned char)(((l1)>>24)&0xff); \
+				} \
+			}
+
+#undef n2l
+#define n2l(c,l)        (l =((unsigned long)(*((c)++)))<<24L, \
+                         l|=((unsigned long)(*((c)++)))<<16L, \
+                         l|=((unsigned long)(*((c)++)))<< 8L, \
+                         l|=((unsigned long)(*((c)++))))
+
+#undef l2n
+#define l2n(l,c)        (*((c)++)=(unsigned char)(((l)>>24L)&0xff), \
+                         *((c)++)=(unsigned char)(((l)>>16L)&0xff), \
+                         *((c)++)=(unsigned char)(((l)>> 8L)&0xff), \
+                         *((c)++)=(unsigned char)(((l)     )&0xff))
+
+/* This is actually a big endian algorithm, the most significant byte
+ * is used to lookup array 0 */
+
+#if defined(BF_PTR2)
+
+/*
+ * This is basically a special Intel version. Point is that Intel
+ * doesn't have many registers, but offers a reach choice of addressing
+ * modes. So we spare some registers by directly traversing BF_KEY
+ * structure and hiring the most decorated addressing mode. The code
+ * generated by EGCS is *perfectly* competitive with assembler
+ * implementation!
+ */
+#define BF_ENC(LL,R,KEY,Pi) (\
+	LL^=KEY[Pi], \
+	t=  KEY[BF_ROUNDS+2 +   0 + ((R>>24)&0xFF)], \
+	t+= KEY[BF_ROUNDS+2 + 256 + ((R>>16)&0xFF)], \
+	t^= KEY[BF_ROUNDS+2 + 512 + ((R>>8 )&0xFF)], \
+	t+= KEY[BF_ROUNDS+2 + 768 + ((R    )&0xFF)], \
+	LL^=t \
+	)
+
+#elif defined(BF_PTR)
+
+#ifndef BF_LONG_LOG2
+#define BF_LONG_LOG2  2       /* default to BF_LONG being 32 bits */
+#endif
+#define BF_M  (0xFF<<BF_LONG_LOG2)
+#define BF_0  (24-BF_LONG_LOG2)
+#define BF_1  (16-BF_LONG_LOG2)
+#define BF_2  ( 8-BF_LONG_LOG2)
+#define BF_3  BF_LONG_LOG2 /* left shift */
+
+/*
+ * This is normally very good on RISC platforms where normally you
+ * have to explicitly "multiply" array index by sizeof(BF_LONG)
+ * in order to calculate the effective address. This implementation
+ * excuses CPU from this extra work. Power[PC] uses should have most
+ * fun as (R>>BF_i)&BF_M gets folded into a single instruction, namely
+ * rlwinm. So let'em double-check if their compiler does it.
+ */
+
+#define BF_ENC(LL,R,S,P) ( \
+	LL^=P, \
+	LL^= (((*(BF_LONG *)((unsigned char *)&(S[  0])+((R>>BF_0)&BF_M))+ \
+		*(BF_LONG *)((unsigned char *)&(S[256])+((R>>BF_1)&BF_M)))^ \
+		*(BF_LONG *)((unsigned char *)&(S[512])+((R>>BF_2)&BF_M)))+ \
+		*(BF_LONG *)((unsigned char *)&(S[768])+((R<<BF_3)&BF_M))) \
+	)
+#else
+
+/*
+ * This is a *generic* version. Seem to perform best on platforms that
+ * offer explicit support for extraction of 8-bit nibbles preferably
+ * complemented with "multiplying" of array index by sizeof(BF_LONG).
+ * For the moment of this writing the list comprises Alpha CPU featuring
+ * extbl and s[48]addq instructions.
+ */
+
+#define BF_ENC(LL,R,S,P) ( \
+	LL^=P, \
+	LL^=(((	S[       ((int)(R>>24)&0xff)] + \
+		S[0x0100+((int)(R>>16)&0xff)])^ \
+		S[0x0200+((int)(R>> 8)&0xff)])+ \
+		S[0x0300+((int)(R    )&0xff)])&0xffffffffL \
+	)
+#endif
+
+#endif
diff -Nru abiword-2.8.2/plugins/opendocument/common/xp/crypto/blowfish/bf_pi.h abiword-2.8.4/plugins/opendocument/common/xp/crypto/blowfish/bf_pi.h
--- abiword-2.8.2/plugins/opendocument/common/xp/crypto/blowfish/bf_pi.h	1970-01-01 02:00:00.000000000 +0200
+++ abiword-2.8.4/plugins/opendocument/common/xp/crypto/blowfish/bf_pi.h	2010-04-15 00:50:16.000000000 +0300
@@ -0,0 +1,325 @@
+/* crypto/bf/bf_pi.h */
+/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
+ * All rights reserved.
+ *
+ * This package is an SSL implementation written
+ * by Eric Young (eay@cryptsoft.com).
+ * The implementation was written so as to conform with Netscapes SSL.
+ * 
+ * This library is free for commercial and non-commercial use as long as
+ * the following conditions are aheared to.  The following conditions
+ * apply to all code found in this distribution, be it the RC4, RSA,
+ * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
+ * included with this distribution is covered by the same copyright terms
+ * except that the holder is Tim Hudson (tjh@cryptsoft.com).
+ * 
+ * Copyright remains Eric Young's, and as such any Copyright notices in
+ * the code are not to be removed.
+ * If this package is used in a product, Eric Young should be given attribution
+ * as the author of the parts of the library used.
+ * This can be in the form of a textual message at program startup or
+ * in documentation (online or textual) provided with the package.
+ * 
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *    "This product includes cryptographic software written by
+ *     Eric Young (eay@cryptsoft.com)"
+ *    The word 'cryptographic' can be left out if the rouines from the library
+ *    being used are not cryptographic related :-).
+ * 4. If you include any Windows specific code (or a derivative thereof) from 
+ *    the apps directory (application code) you must include an acknowledgement:
+ *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
+ * 
+ * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ * 
+ * The licence and distribution terms for any publically available version or
+ * derivative of this code cannot be changed.  i.e. this code cannot simply be
+ * copied and put under another distribution licence
+ * [including the GNU Public Licence.]
+ */
+
+static const BF_KEY bf_init= {
+	{
+	0x243f6a88L, 0x85a308d3L, 0x13198a2eL, 0x03707344L,
+	0xa4093822L, 0x299f31d0L, 0x082efa98L, 0xec4e6c89L,
+	0x452821e6L, 0x38d01377L, 0xbe5466cfL, 0x34e90c6cL,
+	0xc0ac29b7L, 0xc97c50ddL, 0x3f84d5b5L, 0xb5470917L,
+	0x9216d5d9L, 0x8979fb1b
+	},{
+	0xd1310ba6L, 0x98dfb5acL, 0x2ffd72dbL, 0xd01adfb7L, 
+	0xb8e1afedL, 0x6a267e96L, 0xba7c9045L, 0xf12c7f99L, 
+	0x24a19947L, 0xb3916cf7L, 0x0801f2e2L, 0x858efc16L, 
+	0x636920d8L, 0x71574e69L, 0xa458fea3L, 0xf4933d7eL, 
+	0x0d95748fL, 0x728eb658L, 0x718bcd58L, 0x82154aeeL, 
+	0x7b54a41dL, 0xc25a59b5L, 0x9c30d539L, 0x2af26013L, 
+	0xc5d1b023L, 0x286085f0L, 0xca417918L, 0xb8db38efL, 
+	0x8e79dcb0L, 0x603a180eL, 0x6c9e0e8bL, 0xb01e8a3eL, 
+	0xd71577c1L, 0xbd314b27L, 0x78af2fdaL, 0x55605c60L, 
+	0xe65525f3L, 0xaa55ab94L, 0x57489862L, 0x63e81440L, 
+	0x55ca396aL, 0x2aab10b6L, 0xb4cc5c34L, 0x1141e8ceL, 
+	0xa15486afL, 0x7c72e993L, 0xb3ee1411L, 0x636fbc2aL, 
+	0x2ba9c55dL, 0x741831f6L, 0xce5c3e16L, 0x9b87931eL, 
+	0xafd6ba33L, 0x6c24cf5cL, 0x7a325381L, 0x28958677L, 
+	0x3b8f4898L, 0x6b4bb9afL, 0xc4bfe81bL, 0x66282193L, 
+	0x61d809ccL, 0xfb21a991L, 0x487cac60L, 0x5dec8032L, 
+	0xef845d5dL, 0xe98575b1L, 0xdc262302L, 0xeb651b88L, 
+	0x23893e81L, 0xd396acc5L, 0x0f6d6ff3L, 0x83f44239L, 
+	0x2e0b4482L, 0xa4842004L, 0x69c8f04aL, 0x9e1f9b5eL, 
+	0x21c66842L, 0xf6e96c9aL, 0x670c9c61L, 0xabd388f0L, 
+	0x6a51a0d2L, 0xd8542f68L, 0x960fa728L, 0xab5133a3L, 
+	0x6eef0b6cL, 0x137a3be4L, 0xba3bf050L, 0x7efb2a98L, 
+	0xa1f1651dL, 0x39af0176L, 0x66ca593eL, 0x82430e88L, 
+	0x8cee8619L, 0x456f9fb4L, 0x7d84a5c3L, 0x3b8b5ebeL, 
+	0xe06f75d8L, 0x85c12073L, 0x401a449fL, 0x56c16aa6L, 
+	0x4ed3aa62L, 0x363f7706L, 0x1bfedf72L, 0x429b023dL, 
+	0x37d0d724L, 0xd00a1248L, 0xdb0fead3L, 0x49f1c09bL, 
+	0x075372c9L, 0x80991b7bL, 0x25d479d8L, 0xf6e8def7L, 
+	0xe3fe501aL, 0xb6794c3bL, 0x976ce0bdL, 0x04c006baL, 
+	0xc1a94fb6L, 0x409f60c4L, 0x5e5c9ec2L, 0x196a2463L, 
+	0x68fb6fafL, 0x3e6c53b5L, 0x1339b2ebL, 0x3b52ec6fL, 
+	0x6dfc511fL, 0x9b30952cL, 0xcc814544L, 0xaf5ebd09L, 
+	0xbee3d004L, 0xde334afdL, 0x660f2807L, 0x192e4bb3L, 
+	0xc0cba857L, 0x45c8740fL, 0xd20b5f39L, 0xb9d3fbdbL, 
+	0x5579c0bdL, 0x1a60320aL, 0xd6a100c6L, 0x402c7279L, 
+	0x679f25feL, 0xfb1fa3ccL, 0x8ea5e9f8L, 0xdb3222f8L, 
+	0x3c7516dfL, 0xfd616b15L, 0x2f501ec8L, 0xad0552abL, 
+	0x323db5faL, 0xfd238760L, 0x53317b48L, 0x3e00df82L, 
+	0x9e5c57bbL, 0xca6f8ca0L, 0x1a87562eL, 0xdf1769dbL, 
+	0xd542a8f6L, 0x287effc3L, 0xac6732c6L, 0x8c4f5573L, 
+	0x695b27b0L, 0xbbca58c8L, 0xe1ffa35dL, 0xb8f011a0L, 
+	0x10fa3d98L, 0xfd2183b8L, 0x4afcb56cL, 0x2dd1d35bL, 
+	0x9a53e479L, 0xb6f84565L, 0xd28e49bcL, 0x4bfb9790L, 
+	0xe1ddf2daL, 0xa4cb7e33L, 0x62fb1341L, 0xcee4c6e8L, 
+	0xef20cadaL, 0x36774c01L, 0xd07e9efeL, 0x2bf11fb4L, 
+	0x95dbda4dL, 0xae909198L, 0xeaad8e71L, 0x6b93d5a0L, 
+	0xd08ed1d0L, 0xafc725e0L, 0x8e3c5b2fL, 0x8e7594b7L, 
+	0x8ff6e2fbL, 0xf2122b64L, 0x8888b812L, 0x900df01cL, 
+	0x4fad5ea0L, 0x688fc31cL, 0xd1cff191L, 0xb3a8c1adL, 
+	0x2f2f2218L, 0xbe0e1777L, 0xea752dfeL, 0x8b021fa1L, 
+	0xe5a0cc0fL, 0xb56f74e8L, 0x18acf3d6L, 0xce89e299L, 
+	0xb4a84fe0L, 0xfd13e0b7L, 0x7cc43b81L, 0xd2ada8d9L, 
+	0x165fa266L, 0x80957705L, 0x93cc7314L, 0x211a1477L, 
+	0xe6ad2065L, 0x77b5fa86L, 0xc75442f5L, 0xfb9d35cfL, 
+	0xebcdaf0cL, 0x7b3e89a0L, 0xd6411bd3L, 0xae1e7e49L, 
+	0x00250e2dL, 0x2071b35eL, 0x226800bbL, 0x57b8e0afL, 
+	0x2464369bL, 0xf009b91eL, 0x5563911dL, 0x59dfa6aaL, 
+	0x78c14389L, 0xd95a537fL, 0x207d5ba2L, 0x02e5b9c5L, 
+	0x83260376L, 0x6295cfa9L, 0x11c81968L, 0x4e734a41L, 
+	0xb3472dcaL, 0x7b14a94aL, 0x1b510052L, 0x9a532915L, 
+	0xd60f573fL, 0xbc9bc6e4L, 0x2b60a476L, 0x81e67400L, 
+	0x08ba6fb5L, 0x571be91fL, 0xf296ec6bL, 0x2a0dd915L, 
+	0xb6636521L, 0xe7b9f9b6L, 0xff34052eL, 0xc5855664L, 
+	0x53b02d5dL, 0xa99f8fa1L, 0x08ba4799L, 0x6e85076aL, 
+	0x4b7a70e9L, 0xb5b32944L, 0xdb75092eL, 0xc4192623L, 
+	0xad6ea6b0L, 0x49a7df7dL, 0x9cee60b8L, 0x8fedb266L, 
+	0xecaa8c71L, 0x699a17ffL, 0x5664526cL, 0xc2b19ee1L, 
+	0x193602a5L, 0x75094c29L, 0xa0591340L, 0xe4183a3eL, 
+	0x3f54989aL, 0x5b429d65L, 0x6b8fe4d6L, 0x99f73fd6L, 
+	0xa1d29c07L, 0xefe830f5L, 0x4d2d38e6L, 0xf0255dc1L, 
+	0x4cdd2086L, 0x8470eb26L, 0x6382e9c6L, 0x021ecc5eL, 
+	0x09686b3fL, 0x3ebaefc9L, 0x3c971814L, 0x6b6a70a1L, 
+	0x687f3584L, 0x52a0e286L, 0xb79c5305L, 0xaa500737L, 
+	0x3e07841cL, 0x7fdeae5cL, 0x8e7d44ecL, 0x5716f2b8L, 
+	0xb03ada37L, 0xf0500c0dL, 0xf01c1f04L, 0x0200b3ffL, 
+	0xae0cf51aL, 0x3cb574b2L, 0x25837a58L, 0xdc0921bdL, 
+	0xd19113f9L, 0x7ca92ff6L, 0x94324773L, 0x22f54701L, 
+	0x3ae5e581L, 0x37c2dadcL, 0xc8b57634L, 0x9af3dda7L, 
+	0xa9446146L, 0x0fd0030eL, 0xecc8c73eL, 0xa4751e41L, 
+	0xe238cd99L, 0x3bea0e2fL, 0x3280bba1L, 0x183eb331L, 
+	0x4e548b38L, 0x4f6db908L, 0x6f420d03L, 0xf60a04bfL, 
+	0x2cb81290L, 0x24977c79L, 0x5679b072L, 0xbcaf89afL, 
+	0xde9a771fL, 0xd9930810L, 0xb38bae12L, 0xdccf3f2eL, 
+	0x5512721fL, 0x2e6b7124L, 0x501adde6L, 0x9f84cd87L, 
+	0x7a584718L, 0x7408da17L, 0xbc9f9abcL, 0xe94b7d8cL, 
+	0xec7aec3aL, 0xdb851dfaL, 0x63094366L, 0xc464c3d2L, 
+	0xef1c1847L, 0x3215d908L, 0xdd433b37L, 0x24c2ba16L, 
+	0x12a14d43L, 0x2a65c451L, 0x50940002L, 0x133ae4ddL, 
+	0x71dff89eL, 0x10314e55L, 0x81ac77d6L, 0x5f11199bL, 
+	0x043556f1L, 0xd7a3c76bL, 0x3c11183bL, 0x5924a509L, 
+	0xf28fe6edL, 0x97f1fbfaL, 0x9ebabf2cL, 0x1e153c6eL, 
+	0x86e34570L, 0xeae96fb1L, 0x860e5e0aL, 0x5a3e2ab3L, 
+	0x771fe71cL, 0x4e3d06faL, 0x2965dcb9L, 0x99e71d0fL, 
+	0x803e89d6L, 0x5266c825L, 0x2e4cc978L, 0x9c10b36aL, 
+	0xc6150ebaL, 0x94e2ea78L, 0xa5fc3c53L, 0x1e0a2df4L, 
+	0xf2f74ea7L, 0x361d2b3dL, 0x1939260fL, 0x19c27960L, 
+	0x5223a708L, 0xf71312b6L, 0xebadfe6eL, 0xeac31f66L, 
+	0xe3bc4595L, 0xa67bc883L, 0xb17f37d1L, 0x018cff28L, 
+	0xc332ddefL, 0xbe6c5aa5L, 0x65582185L, 0x68ab9802L, 
+	0xeecea50fL, 0xdb2f953bL, 0x2aef7dadL, 0x5b6e2f84L, 
+	0x1521b628L, 0x29076170L, 0xecdd4775L, 0x619f1510L, 
+	0x13cca830L, 0xeb61bd96L, 0x0334fe1eL, 0xaa0363cfL, 
+	0xb5735c90L, 0x4c70a239L, 0xd59e9e0bL, 0xcbaade14L, 
+	0xeecc86bcL, 0x60622ca7L, 0x9cab5cabL, 0xb2f3846eL, 
+	0x648b1eafL, 0x19bdf0caL, 0xa02369b9L, 0x655abb50L, 
+	0x40685a32L, 0x3c2ab4b3L, 0x319ee9d5L, 0xc021b8f7L, 
+	0x9b540b19L, 0x875fa099L, 0x95f7997eL, 0x623d7da8L, 
+	0xf837889aL, 0x97e32d77L, 0x11ed935fL, 0x16681281L, 
+	0x0e358829L, 0xc7e61fd6L, 0x96dedfa1L, 0x7858ba99L, 
+	0x57f584a5L, 0x1b227263L, 0x9b83c3ffL, 0x1ac24696L, 
+	0xcdb30aebL, 0x532e3054L, 0x8fd948e4L, 0x6dbc3128L, 
+	0x58ebf2efL, 0x34c6ffeaL, 0xfe28ed61L, 0xee7c3c73L, 
+	0x5d4a14d9L, 0xe864b7e3L, 0x42105d14L, 0x203e13e0L, 
+	0x45eee2b6L, 0xa3aaabeaL, 0xdb6c4f15L, 0xfacb4fd0L, 
+	0xc742f442L, 0xef6abbb5L, 0x654f3b1dL, 0x41cd2105L, 
+	0xd81e799eL, 0x86854dc7L, 0xe44b476aL, 0x3d816250L, 
+	0xcf62a1f2L, 0x5b8d2646L, 0xfc8883a0L, 0xc1c7b6a3L, 
+	0x7f1524c3L, 0x69cb7492L, 0x47848a0bL, 0x5692b285L, 
+	0x095bbf00L, 0xad19489dL, 0x1462b174L, 0x23820e00L, 
+	0x58428d2aL, 0x0c55f5eaL, 0x1dadf43eL, 0x233f7061L, 
+	0x3372f092L, 0x8d937e41L, 0xd65fecf1L, 0x6c223bdbL, 
+	0x7cde3759L, 0xcbee7460L, 0x4085f2a7L, 0xce77326eL, 
+	0xa6078084L, 0x19f8509eL, 0xe8efd855L, 0x61d99735L, 
+	0xa969a7aaL, 0xc50c06c2L, 0x5a04abfcL, 0x800bcadcL, 
+	0x9e447a2eL, 0xc3453484L, 0xfdd56705L, 0x0e1e9ec9L, 
+	0xdb73dbd3L, 0x105588cdL, 0x675fda79L, 0xe3674340L, 
+	0xc5c43465L, 0x713e38d8L, 0x3d28f89eL, 0xf16dff20L, 
+	0x153e21e7L, 0x8fb03d4aL, 0xe6e39f2bL, 0xdb83adf7L, 
+	0xe93d5a68L, 0x948140f7L, 0xf64c261cL, 0x94692934L, 
+	0x411520f7L, 0x7602d4f7L, 0xbcf46b2eL, 0xd4a20068L, 
+	0xd4082471L, 0x3320f46aL, 0x43b7d4b7L, 0x500061afL, 
+	0x1e39f62eL, 0x97244546L, 0x14214f74L, 0xbf8b8840L, 
+	0x4d95fc1dL, 0x96b591afL, 0x70f4ddd3L, 0x66a02f45L, 
+	0xbfbc09ecL, 0x03bd9785L, 0x7fac6dd0L, 0x31cb8504L, 
+	0x96eb27b3L, 0x55fd3941L, 0xda2547e6L, 0xabca0a9aL, 
+	0x28507825L, 0x530429f4L, 0x0a2c86daL, 0xe9b66dfbL, 
+	0x68dc1462L, 0xd7486900L, 0x680ec0a4L, 0x27a18deeL, 
+	0x4f3ffea2L, 0xe887ad8cL, 0xb58ce006L, 0x7af4d6b6L, 
+	0xaace1e7cL, 0xd3375fecL, 0xce78a399L, 0x406b2a42L, 
+	0x20fe9e35L, 0xd9f385b9L, 0xee39d7abL, 0x3b124e8bL, 
+	0x1dc9faf7L, 0x4b6d1856L, 0x26a36631L, 0xeae397b2L, 
+	0x3a6efa74L, 0xdd5b4332L, 0x6841e7f7L, 0xca7820fbL, 
+	0xfb0af54eL, 0xd8feb397L, 0x454056acL, 0xba489527L, 
+	0x55533a3aL, 0x20838d87L, 0xfe6ba9b7L, 0xd096954bL, 
+	0x55a867bcL, 0xa1159a58L, 0xcca92963L, 0x99e1db33L, 
+	0xa62a4a56L, 0x3f3125f9L, 0x5ef47e1cL, 0x9029317cL, 
+	0xfdf8e802L, 0x04272f70L, 0x80bb155cL, 0x05282ce3L, 
+	0x95c11548L, 0xe4c66d22L, 0x48c1133fL, 0xc70f86dcL, 
+	0x07f9c9eeL, 0x41041f0fL, 0x404779a4L, 0x5d886e17L, 
+	0x325f51ebL, 0xd59bc0d1L, 0xf2bcc18fL, 0x41113564L, 
+	0x257b7834L, 0x602a9c60L, 0xdff8e8a3L, 0x1f636c1bL, 
+	0x0e12b4c2L, 0x02e1329eL, 0xaf664fd1L, 0xcad18115L, 
+	0x6b2395e0L, 0x333e92e1L, 0x3b240b62L, 0xeebeb922L, 
+	0x85b2a20eL, 0xe6ba0d99L, 0xde720c8cL, 0x2da2f728L, 
+	0xd0127845L, 0x95b794fdL, 0x647d0862L, 0xe7ccf5f0L, 
+	0x5449a36fL, 0x877d48faL, 0xc39dfd27L, 0xf33e8d1eL, 
+	0x0a476341L, 0x992eff74L, 0x3a6f6eabL, 0xf4f8fd37L, 
+	0xa812dc60L, 0xa1ebddf8L, 0x991be14cL, 0xdb6e6b0dL, 
+	0xc67b5510L, 0x6d672c37L, 0x2765d43bL, 0xdcd0e804L, 
+	0xf1290dc7L, 0xcc00ffa3L, 0xb5390f92L, 0x690fed0bL, 
+	0x667b9ffbL, 0xcedb7d9cL, 0xa091cf0bL, 0xd9155ea3L, 
+	0xbb132f88L, 0x515bad24L, 0x7b9479bfL, 0x763bd6ebL, 
+	0x37392eb3L, 0xcc115979L, 0x8026e297L, 0xf42e312dL, 
+	0x6842ada7L, 0xc66a2b3bL, 0x12754cccL, 0x782ef11cL, 
+	0x6a124237L, 0xb79251e7L, 0x06a1bbe6L, 0x4bfb6350L, 
+	0x1a6b1018L, 0x11caedfaL, 0x3d25bdd8L, 0xe2e1c3c9L, 
+	0x44421659L, 0x0a121386L, 0xd90cec6eL, 0xd5abea2aL, 
+	0x64af674eL, 0xda86a85fL, 0xbebfe988L, 0x64e4c3feL, 
+	0x9dbc8057L, 0xf0f7c086L, 0x60787bf8L, 0x6003604dL, 
+	0xd1fd8346L, 0xf6381fb0L, 0x7745ae04L, 0xd736fcccL, 
+	0x83426b33L, 0xf01eab71L, 0xb0804187L, 0x3c005e5fL, 
+	0x77a057beL, 0xbde8ae24L, 0x55464299L, 0xbf582e61L, 
+	0x4e58f48fL, 0xf2ddfda2L, 0xf474ef38L, 0x8789bdc2L, 
+	0x5366f9c3L, 0xc8b38e74L, 0xb475f255L, 0x46fcd9b9L, 
+	0x7aeb2661L, 0x8b1ddf84L, 0x846a0e79L, 0x915f95e2L, 
+	0x466e598eL, 0x20b45770L, 0x8cd55591L, 0xc902de4cL, 
+	0xb90bace1L, 0xbb8205d0L, 0x11a86248L, 0x7574a99eL, 
+	0xb77f19b6L, 0xe0a9dc09L, 0x662d09a1L, 0xc4324633L, 
+	0xe85a1f02L, 0x09f0be8cL, 0x4a99a025L, 0x1d6efe10L, 
+	0x1ab93d1dL, 0x0ba5a4dfL, 0xa186f20fL, 0x2868f169L, 
+	0xdcb7da83L, 0x573906feL, 0xa1e2ce9bL, 0x4fcd7f52L, 
+	0x50115e01L, 0xa70683faL, 0xa002b5c4L, 0x0de6d027L, 
+	0x9af88c27L, 0x773f8641L, 0xc3604c06L, 0x61a806b5L, 
+	0xf0177a28L, 0xc0f586e0L, 0x006058aaL, 0x30dc7d62L, 
+	0x11e69ed7L, 0x2338ea63L, 0x53c2dd94L, 0xc2c21634L, 
+	0xbbcbee56L, 0x90bcb6deL, 0xebfc7da1L, 0xce591d76L, 
+	0x6f05e409L, 0x4b7c0188L, 0x39720a3dL, 0x7c927c24L, 
+	0x86e3725fL, 0x724d9db9L, 0x1ac15bb4L, 0xd39eb8fcL, 
+	0xed545578L, 0x08fca5b5L, 0xd83d7cd3L, 0x4dad0fc4L, 
+	0x1e50ef5eL, 0xb161e6f8L, 0xa28514d9L, 0x6c51133cL, 
+	0x6fd5c7e7L, 0x56e14ec4L, 0x362abfceL, 0xddc6c837L, 
+	0xd79a3234L, 0x92638212L, 0x670efa8eL, 0x406000e0L, 
+	0x3a39ce37L, 0xd3faf5cfL, 0xabc27737L, 0x5ac52d1bL, 
+	0x5cb0679eL, 0x4fa33742L, 0xd3822740L, 0x99bc9bbeL, 
+	0xd5118e9dL, 0xbf0f7315L, 0xd62d1c7eL, 0xc700c47bL, 
+	0xb78c1b6bL, 0x21a19045L, 0xb26eb1beL, 0x6a366eb4L, 
+	0x5748ab2fL, 0xbc946e79L, 0xc6a376d2L, 0x6549c2c8L, 
+	0x530ff8eeL, 0x468dde7dL, 0xd5730a1dL, 0x4cd04dc6L, 
+	0x2939bbdbL, 0xa9ba4650L, 0xac9526e8L, 0xbe5ee304L, 
+	0xa1fad5f0L, 0x6a2d519aL, 0x63ef8ce2L, 0x9a86ee22L, 
+	0xc089c2b8L, 0x43242ef6L, 0xa51e03aaL, 0x9cf2d0a4L, 
+	0x83c061baL, 0x9be96a4dL, 0x8fe51550L, 0xba645bd6L, 
+	0x2826a2f9L, 0xa73a3ae1L, 0x4ba99586L, 0xef5562e9L, 
+	0xc72fefd3L, 0xf752f7daL, 0x3f046f69L, 0x77fa0a59L, 
+	0x80e4a915L, 0x87b08601L, 0x9b09e6adL, 0x3b3ee593L, 
+	0xe990fd5aL, 0x9e34d797L, 0x2cf0b7d9L, 0x022b8b51L, 
+	0x96d5ac3aL, 0x017da67dL, 0xd1cf3ed6L, 0x7c7d2d28L, 
+	0x1f9f25cfL, 0xadf2b89bL, 0x5ad6b472L, 0x5a88f54cL, 
+	0xe029ac71L, 0xe019a5e6L, 0x47b0acfdL, 0xed93fa9bL, 
+	0xe8d3c48dL, 0x283b57ccL, 0xf8d56629L, 0x79132e28L, 
+	0x785f0191L, 0xed756055L, 0xf7960e44L, 0xe3d35e8cL, 
+	0x15056dd4L, 0x88f46dbaL, 0x03a16125L, 0x0564f0bdL, 
+	0xc3eb9e15L, 0x3c9057a2L, 0x97271aecL, 0xa93a072aL, 
+	0x1b3f6d9bL, 0x1e6321f5L, 0xf59c66fbL, 0x26dcf319L, 
+	0x7533d928L, 0xb155fdf5L, 0x03563482L, 0x8aba3cbbL, 
+	0x28517711L, 0xc20ad9f8L, 0xabcc5167L, 0xccad925fL, 
+	0x4de81751L, 0x3830dc8eL, 0x379d5862L, 0x9320f991L, 
+	0xea7a90c2L, 0xfb3e7bceL, 0x5121ce64L, 0x774fbe32L, 
+	0xa8b6e37eL, 0xc3293d46L, 0x48de5369L, 0x6413e680L, 
+	0xa2ae0810L, 0xdd6db224L, 0x69852dfdL, 0x09072166L, 
+	0xb39a460aL, 0x6445c0ddL, 0x586cdecfL, 0x1c20c8aeL, 
+	0x5bbef7ddL, 0x1b588d40L, 0xccd2017fL, 0x6bb4e3bbL, 
+	0xdda26a7eL, 0x3a59ff45L, 0x3e350a44L, 0xbcb4cdd5L, 
+	0x72eacea8L, 0xfa6484bbL, 0x8d6612aeL, 0xbf3c6f47L, 
+	0xd29be463L, 0x542f5d9eL, 0xaec2771bL, 0xf64e6370L, 
+	0x740e0d8dL, 0xe75b1357L, 0xf8721671L, 0xaf537d5dL, 
+	0x4040cb08L, 0x4eb4e2ccL, 0x34d2466aL, 0x0115af84L, 
+	0xe1b00428L, 0x95983a1dL, 0x06b89fb4L, 0xce6ea048L, 
+	0x6f3f3b82L, 0x3520ab82L, 0x011a1d4bL, 0x277227f8L, 
+	0x611560b1L, 0xe7933fdcL, 0xbb3a792bL, 0x344525bdL, 
+	0xa08839e1L, 0x51ce794bL, 0x2f32c9b7L, 0xa01fbac9L, 
+	0xe01cc87eL, 0xbcc7d1f6L, 0xcf0111c3L, 0xa1e8aac7L, 
+	0x1a908749L, 0xd44fbd9aL, 0xd0dadecbL, 0xd50ada38L, 
+	0x0339c32aL, 0xc6913667L, 0x8df9317cL, 0xe0b12b4fL, 
+	0xf79e59b7L, 0x43f5bb3aL, 0xf2d519ffL, 0x27d9459cL, 
+	0xbf97222cL, 0x15e6fc2aL, 0x0f91fc71L, 0x9b941525L, 
+	0xfae59361L, 0xceb69cebL, 0xc2a86459L, 0x12baa8d1L, 
+	0xb6c1075eL, 0xe3056a0cL, 0x10d25065L, 0xcb03a442L, 
+	0xe0ec6e0eL, 0x1698db3bL, 0x4c98a0beL, 0x3278e964L, 
+	0x9f1f9532L, 0xe0d392dfL, 0xd3a0342bL, 0x8971f21eL, 
+	0x1b0a7441L, 0x4ba3348cL, 0xc5be7120L, 0xc37632d8L, 
+	0xdf359f8dL, 0x9b992f2eL, 0xe60b6f47L, 0x0fe3f11dL, 
+	0xe54cda54L, 0x1edad891L, 0xce6279cfL, 0xcd3e7e6fL, 
+	0x1618b166L, 0xfd2c1d05L, 0x848fd2c5L, 0xf6fb2299L, 
+	0xf523f357L, 0xa6327623L, 0x93a83531L, 0x56cccd02L, 
+	0xacf08162L, 0x5a75ebb5L, 0x6e163697L, 0x88d273ccL, 
+	0xde966292L, 0x81b949d0L, 0x4c50901bL, 0x71c65614L, 
+	0xe6c6c7bdL, 0x327a140aL, 0x45e1d006L, 0xc3f27b9aL, 
+	0xc9aa53fdL, 0x62a80f00L, 0xbb25bfe2L, 0x35bdd2f6L, 
+	0x71126905L, 0xb2040222L, 0xb6cbcf7cL, 0xcd769c2bL, 
+	0x53113ec0L, 0x1640e3d3L, 0x38abbd60L, 0x2547adf0L, 
+	0xba38209cL, 0xf746ce76L, 0x77afa1c5L, 0x20756060L, 
+	0x85cbfe4eL, 0x8ae88dd8L, 0x7aaaf9b0L, 0x4cf9aa7eL, 
+	0x1948c25cL, 0x02fb8a8cL, 0x01c36ae4L, 0xd6ebe1f9L, 
+	0x90d4f869L, 0xa65cdea0L, 0x3f09252dL, 0xc208e69fL, 
+	0xb74e6132L, 0xce77e25bL, 0x578fdfe3L, 0x3ac372e6L, 
+	}
+	};
+
diff -Nru abiword-2.8.2/plugins/opendocument/common/xp/crypto/blowfish/bf_skey.c abiword-2.8.4/plugins/opendocument/common/xp/crypto/blowfish/bf_skey.c
--- abiword-2.8.2/plugins/opendocument/common/xp/crypto/blowfish/bf_skey.c	1970-01-01 02:00:00.000000000 +0200
+++ abiword-2.8.4/plugins/opendocument/common/xp/crypto/blowfish/bf_skey.c	2010-04-15 00:50:16.000000000 +0300
@@ -0,0 +1,118 @@
+/* crypto/bf/bf_skey.c */
+/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
+ * All rights reserved.
+ *
+ * This package is an SSL implementation written
+ * by Eric Young (eay@cryptsoft.com).
+ * The implementation was written so as to conform with Netscapes SSL.
+ * 
+ * This library is free for commercial and non-commercial use as long as
+ * the following conditions are aheared to.  The following conditions
+ * apply to all code found in this distribution, be it the RC4, RSA,
+ * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
+ * included with this distribution is covered by the same copyright terms
+ * except that the holder is Tim Hudson (tjh@cryptsoft.com).
+ * 
+ * Copyright remains Eric Young's, and as such any Copyright notices in
+ * the code are not to be removed.
+ * If this package is used in a product, Eric Young should be given attribution
+ * as the author of the parts of the library used.
+ * This can be in the form of a textual message at program startup or
+ * in documentation (online or textual) provided with the package.
+ * 
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *    "This product includes cryptographic software written by
+ *     Eric Young (eay@cryptsoft.com)"
+ *    The word 'cryptographic' can be left out if the rouines from the library
+ *    being used are not cryptographic related :-).
+ * 4. If you include any Windows specific code (or a derivative thereof) from 
+ *    the apps directory (application code) you must include an acknowledgement:
+ *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
+ * 
+ * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ * 
+ * The licence and distribution terms for any publically available version or
+ * derivative of this code cannot be changed.  i.e. this code cannot simply be
+ * copied and put under another distribution licence
+ * [including the GNU Public Licence.]
+ */
+
+#include <stdio.h>
+#include <string.h>
+
+#include <blowfish.h>
+
+#include "bf_locl.h"
+#include "bf_pi.h"
+
+void BF_set_key(BF_KEY *key, int len, const unsigned char *data)
+	{
+	int i;
+	BF_LONG *p,ri,in[2];
+	const unsigned char *d,*end;
+
+
+	memcpy(key,&bf_init,sizeof(BF_KEY));
+	p=key->P;
+
+	if (len > ((BF_ROUNDS+2)*4)) len=(BF_ROUNDS+2)*4;
+
+	d=data;
+	end= &(data[len]);
+	for (i=0; i<(BF_ROUNDS+2); i++)
+		{
+		ri= *(d++);
+		if (d >= end) d=data;
+
+		ri<<=8;
+		ri|= *(d++);
+		if (d >= end) d=data;
+
+		ri<<=8;
+		ri|= *(d++);
+		if (d >= end) d=data;
+
+		ri<<=8;
+		ri|= *(d++);
+		if (d >= end) d=data;
+
+		p[i]^=ri;
+		}
+
+	in[0]=0L;
+	in[1]=0L;
+	for (i=0; i<(BF_ROUNDS+2); i+=2)
+		{
+		BF_encrypt(in,key);
+		p[i  ]=in[0];
+		p[i+1]=in[1];
+		}
+
+	p=key->S;
+	for (i=0; i<4*256; i+=2)
+		{
+		BF_encrypt(in,key);
+		p[i  ]=in[0];
+		p[i+1]=in[1];
+		}
+	}
+
diff -Nru abiword-2.8.2/plugins/opendocument/common/xp/crypto/blowfish/blowfish.h abiword-2.8.4/plugins/opendocument/common/xp/crypto/blowfish/blowfish.h
--- abiword-2.8.2/plugins/opendocument/common/xp/crypto/blowfish/blowfish.h	1970-01-01 02:00:00.000000000 +0200
+++ abiword-2.8.4/plugins/opendocument/common/xp/crypto/blowfish/blowfish.h	2010-04-15 00:50:16.000000000 +0300
@@ -0,0 +1,129 @@
+/* crypto/bf/blowfish.h */
+/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
+ * All rights reserved.
+ *
+ * This package is an SSL implementation written
+ * by Eric Young (eay@cryptsoft.com).
+ * The implementation was written so as to conform with Netscapes SSL.
+ * 
+ * This library is free for commercial and non-commercial use as long as
+ * the following conditions are aheared to.  The following conditions
+ * apply to all code found in this distribution, be it the RC4, RSA,
+ * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
+ * included with this distribution is covered by the same copyright terms
+ * except that the holder is Tim Hudson (tjh@cryptsoft.com).
+ * 
+ * Copyright remains Eric Young's, and as such any Copyright notices in
+ * the code are not to be removed.
+ * If this package is used in a product, Eric Young should be given attribution
+ * as the author of the parts of the library used.
+ * This can be in the form of a textual message at program startup or
+ * in documentation (online or textual) provided with the package.
+ * 
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *    "This product includes cryptographic software written by
+ *     Eric Young (eay@cryptsoft.com)"
+ *    The word 'cryptographic' can be left out if the rouines from the library
+ *    being used are not cryptographic related :-).
+ * 4. If you include any Windows specific code (or a derivative thereof) from 
+ *    the apps directory (application code) you must include an acknowledgement:
+ *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
+ * 
+ * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ * 
+ * The licence and distribution terms for any publically available version or
+ * derivative of this code cannot be changed.  i.e. this code cannot simply be
+ * copied and put under another distribution licence
+ * [including the GNU Public Licence.]
+ */
+
+#ifndef HEADER_BLOWFISH_H
+#define HEADER_BLOWFISH_H
+
+//#include <openssl/e_os2.h>
+
+#ifdef  __cplusplus
+extern "C" {
+#endif
+
+#ifdef OPENSSL_NO_BF
+#error BF is disabled.
+#endif
+
+#define BF_ENCRYPT	1
+#define BF_DECRYPT	0
+
+/*
+ * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ * ! BF_LONG has to be at least 32 bits wide. If it's wider, then !
+ * ! BF_LONG_LOG2 has to be defined along.                        !
+ * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ */
+
+#if defined(OPENSSL_SYS_WIN16) || defined(__LP32__)
+#define BF_LONG unsigned long
+#elif defined(OPENSSL_SYS_CRAY) || defined(__ILP64__)
+#define BF_LONG unsigned long
+#define BF_LONG_LOG2 3
+/*
+ * _CRAY note. I could declare short, but I have no idea what impact
+ * does it have on performance on none-T3E machines. I could declare
+ * int, but at least on C90 sizeof(int) can be chosen at compile time.
+ * So I've chosen long...
+ *					<appro@fy.chalmers.se>
+ */
+#else
+#define BF_LONG unsigned int
+#endif
+
+#define BF_ROUNDS	16
+#define BF_BLOCK	8
+
+typedef struct bf_key_st
+	{
+	BF_LONG P[BF_ROUNDS+2];
+	BF_LONG S[4*256];
+	} BF_KEY;
+
+#ifdef OPENSSL_FIPS 
+void private_BF_set_key(BF_KEY *key, int len, const unsigned char *data);
+#endif
+void BF_set_key(BF_KEY *key, int len, const unsigned char *data);
+
+void BF_encrypt(BF_LONG *data,const BF_KEY *key);
+void BF_decrypt(BF_LONG *data,const BF_KEY *key);
+
+void BF_ecb_encrypt(const unsigned char *in, unsigned char *out,
+	const BF_KEY *key, int enc);
+void BF_cbc_encrypt(const unsigned char *in, unsigned char *out, long length,
+	const BF_KEY *schedule, unsigned char *ivec, int enc);
+void BF_cfb64_encrypt(const unsigned char *in, unsigned char *out, long length,
+	const BF_KEY *schedule, unsigned char *ivec, int *num, int enc);
+void BF_ofb64_encrypt(const unsigned char *in, unsigned char *out, long length,
+	const BF_KEY *schedule, unsigned char *ivec, int *num);
+const char *BF_options(void);
+
+#ifdef  __cplusplus
+}
+#endif
+
+#endif
diff -Nru abiword-2.8.2/plugins/opendocument/common/xp/crypto/blowfish/COPYRIGHT abiword-2.8.4/plugins/opendocument/common/xp/crypto/blowfish/COPYRIGHT
--- abiword-2.8.2/plugins/opendocument/common/xp/crypto/blowfish/COPYRIGHT	1970-01-01 02:00:00.000000000 +0200
+++ abiword-2.8.4/plugins/opendocument/common/xp/crypto/blowfish/COPYRIGHT	2010-04-15 00:50:16.000000000 +0300
@@ -0,0 +1,46 @@
+Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
+All rights reserved.
+
+This package is an Blowfish implementation written
+by Eric Young (eay@cryptsoft.com).
+
+This library is free for commercial and non-commercial use as long as
+the following conditions are aheared to.  The following conditions
+apply to all code found in this distribution.
+
+Copyright remains Eric Young's, and as such any Copyright notices in
+the code are not to be removed.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+3. All advertising materials mentioning features or use of this software
+   must display the following acknowledgement:
+   This product includes software developed by Eric Young (eay@cryptsoft.com)
+
+THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+The license and distribution terms for any publically available version or
+derivative of this code cannot be changed.  i.e. this code cannot simply be
+copied and put under another distrubution license
+[including the GNU Public License.]
+
+The reason behind this being stated in this direct manner is past
+experience in code simply being copied and the attribution removed
+from it and then being distributed as part of other packages. This
+implementation was a non-trivial and unpaid effort.
diff -Nru abiword-2.8.2/plugins/opendocument/common/xp/crypto/blowfish/README abiword-2.8.4/plugins/opendocument/common/xp/crypto/blowfish/README
--- abiword-2.8.2/plugins/opendocument/common/xp/crypto/blowfish/README	1970-01-01 02:00:00.000000000 +0200
+++ abiword-2.8.4/plugins/opendocument/common/xp/crypto/blowfish/README	2010-04-15 00:50:16.000000000 +0300
@@ -0,0 +1,14 @@
+This is a quick packaging up of my blowfish code into a library.
+It has been lifted from SSLeay.
+The copyright notices seem a little harsh because I have not spent the
+time to rewrite the conditions from the normal SSLeay ones.
+
+Basically if you just want to play with the library, not a problem.
+
+eric 15-Apr-1997
+
+---
+
+Taken from openssl-0.9.8m and slightly modified to remove the openssl dependency.
+
+ - Marc Maurer, March 20, 2010
\ No newline at end of file
diff -Nru abiword-2.8.2/plugins/opendocument/common/xp/crypto/gc-pbkdf2-sha1.c abiword-2.8.4/plugins/opendocument/common/xp/crypto/gc-pbkdf2-sha1.c
--- abiword-2.8.2/plugins/opendocument/common/xp/crypto/gc-pbkdf2-sha1.c	1970-01-01 02:00:00.000000000 +0200
+++ abiword-2.8.4/plugins/opendocument/common/xp/crypto/gc-pbkdf2-sha1.c	2010-04-15 00:50:16.000000000 +0300
@@ -0,0 +1,106 @@
+/* gc-pbkdf2-sha1.c --- Password-Based Key Derivation Function a'la PKCS#5
+   Copyright (C) 2002, 2003, 2004, 2005, 2006, 2009, 2010 Free Software
+   Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   This program 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 General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+
+/* Written by Simon Josefsson. */
+
+// #include <config.h>
+
+// #include "gc.h"
+
+#include "hmac.h"
+
+#include <stdlib.h>
+#include <string.h>
+
+/* Implement PKCS#5 PBKDF2 as per RFC 2898.  The PRF to use is hard
+   coded to be HMAC-SHA1.  Inputs are the password P of length PLEN,
+   the salt S of length SLEN, the iteration counter C (> 0), and the
+   desired derived output length DKLEN.  Output buffer is DK which
+   must have room for at least DKLEN octets.  The output buffer will
+   be filled with the derived data.  */
+/*Gc_rc*/ int
+/*gc_*/pbkdf2_sha1 (const char *P, size_t Plen,
+                const char *S, size_t Slen,
+                unsigned int c,
+                char *DK, size_t dkLen)
+{
+  unsigned int hLen = 20;
+  char U[20];
+  char T[20];
+  unsigned int u;
+  unsigned int l;
+  unsigned int r;
+  unsigned int i;
+  unsigned int k;
+  int rc;
+  char *tmp;
+  size_t tmplen = Slen + 4;
+
+  if (c == 0)
+    return /*GC_PKCS5_INVALID_ITERATION_COUNT*/ -1;
+
+  if (dkLen == 0)
+    return /*GC_PKCS5_INVALID_DERIVED_KEY_LENGTH*/ -1;
+
+  if (dkLen > 4294967295U)
+    return /*GC_PKCS5_DERIVED_KEY_TOO_LONG*/ -1;
+
+  l = ((dkLen - 1) / hLen) + 1;
+  r = dkLen - (l - 1) * hLen;
+
+  tmp = (char*)malloc (tmplen);
+  if (tmp == NULL)
+    return /*GC_MALLOC_ERROR*/ -1;
+
+  memcpy (tmp, S, Slen);
+
+  for (i = 1; i <= l; i++)
+    {
+      memset (T, 0, hLen);
+
+      for (u = 1; u <= c; u++)
+        {
+          if (u == 1)
+            {
+              tmp[Slen + 0] = (i & 0xff000000) >> 24;
+              tmp[Slen + 1] = (i & 0x00ff0000) >> 16;
+              tmp[Slen + 2] = (i & 0x0000ff00) >> 8;
+              tmp[Slen + 3] = (i & 0x000000ff) >> 0;
+
+              rc = /*gc_*/hmac_sha1 (P, Plen, tmp, tmplen, U);
+            }
+          else
+            rc = /*gc_*/hmac_sha1 (P, Plen, U, hLen, U);
+
+          if (rc != /*GC_OK*/ 0)
+            {
+              free (tmp);
+              return rc;
+            }
+
+          for (k = 0; k < hLen; k++)
+            T[k] ^= U[k];
+        }
+
+      memcpy (DK + (i - 1) * hLen, T, i == l ? r : hLen);
+    }
+
+  free (tmp);
+
+  return /*GC_OK*/ 0;
+}
diff -Nru abiword-2.8.2/plugins/opendocument/common/xp/crypto/gc-pbkdf2-sha1.h abiword-2.8.4/plugins/opendocument/common/xp/crypto/gc-pbkdf2-sha1.h
--- abiword-2.8.2/plugins/opendocument/common/xp/crypto/gc-pbkdf2-sha1.h	1970-01-01 02:00:00.000000000 +0200
+++ abiword-2.8.4/plugins/opendocument/common/xp/crypto/gc-pbkdf2-sha1.h	2010-04-15 00:50:16.000000000 +0300
@@ -0,0 +1,38 @@
+/* gc-pbkdf2-sha1.h --- Password-Based Key Derivation Function a'la PKCS#5
+   Copyright (C) 2002, 2003, 2004, 2005, 2006, 2009, 2010 Free Software
+   Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   This program 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 General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+
+/* Written by Simon Josefsson. */
+
+#ifndef __PBKDF2_SHA1__
+#define __PBKDF2_SHA1__
+
+# ifdef __cplusplus
+extern "C" {
+# endif
+
+extern int pbkdf2_sha1 (const char *P, size_t Plen,
+                const char *S, size_t Slen,
+                unsigned int c,
+                char *DK, size_t dkLen);
+
+# ifdef __cplusplus
+}
+# endif
+
+
+#endif /* __PBKDF2_SHA1__ */
\ No newline at end of file
diff -Nru abiword-2.8.2/plugins/opendocument/common/xp/crypto/hmac.h abiword-2.8.4/plugins/opendocument/common/xp/crypto/hmac.h
--- abiword-2.8.2/plugins/opendocument/common/xp/crypto/hmac.h	1970-01-01 02:00:00.000000000 +0200
+++ abiword-2.8.4/plugins/opendocument/common/xp/crypto/hmac.h	2010-04-15 00:50:16.000000000 +0300
@@ -0,0 +1,43 @@
+/* hmac.h -- hashed message authentication codes
+   Copyright (C) 2005, 2009, 2010 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   This program 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 General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+
+/* Written by Simon Josefsson.  */
+
+#ifndef HMAC_H
+# define HMAC_H 1
+
+#include <stddef.h>
+
+/* Compute Hashed Message Authentication Code with MD5, as described
+   in RFC 2104, over BUFFER data of BUFLEN bytes using the KEY of
+   KEYLEN bytes, writing the output to pre-allocated 16 byte minimum
+   RESBUF buffer.  Return 0 on success.  */
+/*
+int
+hmac_md5 (const void *key, size_t keylen,
+          const void *buffer, size_t buflen, void *resbuf);
+*/
+
+/* Compute Hashed Message Authentication Code with SHA-1, over BUFFER
+   data of BUFLEN bytes using the KEY of KEYLEN bytes, writing the
+   output to pre-allocated 20 byte minimum RESBUF buffer.  Return 0 on
+   success.  */
+int
+hmac_sha1 (const void *key, size_t keylen,
+           const void *in, size_t inlen, void *resbuf);
+
+#endif /* HMAC_H */
diff -Nru abiword-2.8.2/plugins/opendocument/common/xp/crypto/hmac-sha1.c abiword-2.8.4/plugins/opendocument/common/xp/crypto/hmac-sha1.c
--- abiword-2.8.2/plugins/opendocument/common/xp/crypto/hmac-sha1.c	1970-01-01 02:00:00.000000000 +0200
+++ abiword-2.8.4/plugins/opendocument/common/xp/crypto/hmac-sha1.c	2010-04-15 00:50:16.000000000 +0300
@@ -0,0 +1,81 @@
+/* hmac-sha1.c -- hashed message authentication codes
+   Copyright (C) 2005, 2006, 2009, 2010 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   This program 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 General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+
+/* Written by Simon Josefsson.  */
+
+// #include <config.h>
+
+#include "hmac.h"
+
+#include "memxor.h"
+#include "sha1.h"
+
+#include <string.h>
+
+#define IPAD 0x36
+#define OPAD 0x5c
+
+int
+hmac_sha1 (const void *key, size_t keylen,
+           const void *in, size_t inlen, void *resbuf)
+{
+  struct sha1_ctx inner;
+  struct sha1_ctx outer;
+  char optkeybuf[20];
+  char block[64];
+  char innerhash[20];
+
+  /* Reduce the key's size, so that it becomes <= 64 bytes large.  */
+
+  if (keylen > 64)
+    {
+      struct sha1_ctx keyhash;
+
+      sha1_init_ctx (&keyhash);
+      sha1_process_bytes (key, keylen, &keyhash);
+      sha1_finish_ctx (&keyhash, optkeybuf);
+
+      key = optkeybuf;
+      keylen = 20;
+    }
+
+  /* Compute INNERHASH from KEY and IN.  */
+
+  sha1_init_ctx (&inner);
+
+  memset (block, IPAD, sizeof (block));
+  memxor (block, key, keylen);
+
+  sha1_process_block (block, 64, &inner);
+  sha1_process_bytes (in, inlen, &inner);
+
+  sha1_finish_ctx (&inner, innerhash);
+
+  /* Compute result from KEY and INNERHASH.  */
+
+  sha1_init_ctx (&outer);
+
+  memset (block, OPAD, sizeof (block));
+  memxor (block, key, keylen);
+
+  sha1_process_block (block, 64, &outer);
+  sha1_process_bytes (innerhash, 20, &outer);
+
+  sha1_finish_ctx (&outer, resbuf);
+
+  return 0;
+}
diff -Nru abiword-2.8.2/plugins/opendocument/common/xp/crypto/memxor.c abiword-2.8.4/plugins/opendocument/common/xp/crypto/memxor.c
--- abiword-2.8.2/plugins/opendocument/common/xp/crypto/memxor.c	1970-01-01 02:00:00.000000000 +0200
+++ abiword-2.8.4/plugins/opendocument/common/xp/crypto/memxor.c	2010-04-15 00:50:16.000000000 +0300
@@ -0,0 +1,35 @@
+/* memxor.c -- perform binary exclusive OR operation of two memory blocks.
+   Copyright (C) 2005, 2006, 2009, 2010 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   This program 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 General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+
+/* Written by Simon Josefsson.  The interface was inspired by memxor
+   in Niels Möller's Nettle. */
+
+// #include <config.h>
+
+#include "memxor.h"
+
+void *
+memxor (void * /*restrict*/ dest, const void * /*restrict*/ src, size_t n)
+{
+  char const *s = (char const *)src;
+  char *d = (char*)dest;
+
+  for (; n > 0; n--)
+    *d++ ^= *s++;
+
+  return dest;
+}
diff -Nru abiword-2.8.2/plugins/opendocument/common/xp/crypto/memxor.h abiword-2.8.4/plugins/opendocument/common/xp/crypto/memxor.h
--- abiword-2.8.2/plugins/opendocument/common/xp/crypto/memxor.h	1970-01-01 02:00:00.000000000 +0200
+++ abiword-2.8.4/plugins/opendocument/common/xp/crypto/memxor.h	2010-04-15 00:50:16.000000000 +0300
@@ -0,0 +1,31 @@
+/* memxor.h -- perform binary exclusive OR operation on memory blocks.
+   Copyright (C) 2005, 2009, 2010 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   This program 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 General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+
+/* Written by Simon Josefsson.  The interface was inspired by memxor
+   in Niels Möller's Nettle. */
+
+#ifndef MEMXOR_H
+# define MEMXOR_H
+
+#include <stddef.h>
+
+/* Compute binary exclusive OR of memory areas DEST and SRC, putting
+   the result in DEST, of length N bytes.  Returns a pointer to
+   DEST. */
+void *memxor (void * /*restrict*/ dest, const void * /*restrict*/ src, size_t n);
+
+#endif /* MEMXOR_H */
diff -Nru abiword-2.8.2/plugins/opendocument/common/xp/crypto/README abiword-2.8.4/plugins/opendocument/common/xp/crypto/README
--- abiword-2.8.2/plugins/opendocument/common/xp/crypto/README	1970-01-01 02:00:00.000000000 +0200
+++ abiword-2.8.4/plugins/opendocument/common/xp/crypto/README	2010-04-15 00:50:16.000000000 +0300
@@ -0,0 +1,16 @@
+The following files were taken from gnulib.
+
+  * gc-pbkdf2-sha1.c
+  * hmac-sha1.c
+  * hmac.h
+  * memxor.c
+  * memxor.h
+  * sha1.c
+  * sha1.h
+
+I added gc-pbkdf2-sha1.h to have a nice header file to use.
+
+Some files were slightly modified to remove the gnulib dependency
+and to make them compile using MSVC.
+
+  - Marc Maurer, March 20, 2010
diff -Nru abiword-2.8.2/plugins/opendocument/common/xp/crypto/sha1.c abiword-2.8.4/plugins/opendocument/common/xp/crypto/sha1.c
--- abiword-2.8.2/plugins/opendocument/common/xp/crypto/sha1.c	1970-01-01 02:00:00.000000000 +0200
+++ abiword-2.8.4/plugins/opendocument/common/xp/crypto/sha1.c	2010-04-15 00:50:16.000000000 +0300
@@ -0,0 +1,428 @@
+/* sha1.c - Functions to compute SHA1 message digest of files or
+   memory blocks according to the NIST specification FIPS-180-1.
+
+   Copyright (C) 2000, 2001, 2003, 2004, 2005, 2006, 2008, 2009, 2010 Free
+   Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify it
+   under the terms of the GNU General Public License as published by the
+   Free Software Foundation; either version 2, or (at your option) any
+   later version.
+
+   This program 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 General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+
+/* Written by Scott G. Miller
+   Credits:
+      Robert Klep <robert@ilse.nl>  -- Expansion function fix
+*/
+
+// #include <config.h>
+
+#include "sha1.h"
+
+#include <stddef.h>
+#include <stdlib.h>
+#include <string.h>
+
+#if USE_UNLOCKED_IO
+# include "unlocked-io.h"
+#endif
+
+#ifdef WORDS_BIGENDIAN
+# define SWAP(n) (n)
+#else
+# define SWAP(n) \
+    (((n) << 24) | (((n) & 0xff00) << 8) | (((n) >> 8) & 0xff00) | ((n) >> 24))
+#endif
+
+#define BLOCKSIZE 32768
+#if BLOCKSIZE % 64 != 0
+# error "invalid BLOCKSIZE"
+#endif
+
+/* This array contains the bytes used to pad the buffer to the next
+   64-byte boundary.  (RFC 1321, 3.1: Step 1)  */
+static const unsigned char fillbuf[64] = { 0x80, 0 /* , 0, 0, ...  */ };
+
+
+/* Take a pointer to a 160 bit block of data (five 32 bit ints) and
+   initialize it to the start constants of the SHA1 algorithm.  This
+   must be called before using hash in the call to sha1_hash.  */
+void
+sha1_init_ctx (struct sha1_ctx *ctx)
+{
+  ctx->A = 0x67452301;
+  ctx->B = 0xefcdab89;
+  ctx->C = 0x98badcfe;
+  ctx->D = 0x10325476;
+  ctx->E = 0xc3d2e1f0;
+
+  ctx->total[0] = ctx->total[1] = 0;
+  ctx->buflen = 0;
+}
+
+/* Copy the 4 byte value from v into the memory location pointed to by *cp,
+   If your architecture allows unaligned access this is equivalent to
+   * (uint32_t *) cp = v  */
+static inline void
+set_uint32 (char *cp, uint32_t v)
+{
+  memcpy (cp, &v, sizeof v);
+}
+
+/* Put result from CTX in first 20 bytes following RESBUF.  The result
+   must be in little endian byte order.  */
+void *
+sha1_read_ctx (const struct sha1_ctx *ctx, void *resbuf)
+{
+  char *r = (char*)resbuf;
+  set_uint32 (r + 0 * sizeof ctx->A, SWAP (ctx->A));
+  set_uint32 (r + 1 * sizeof ctx->B, SWAP (ctx->B));
+  set_uint32 (r + 2 * sizeof ctx->C, SWAP (ctx->C));
+  set_uint32 (r + 3 * sizeof ctx->D, SWAP (ctx->D));
+  set_uint32 (r + 4 * sizeof ctx->E, SWAP (ctx->E));
+
+  return resbuf;
+}
+
+/* Process the remaining bytes in the internal buffer and the usual
+   prolog according to the standard and write the result to RESBUF.  */
+void *
+sha1_finish_ctx (struct sha1_ctx *ctx, void *resbuf)
+{
+  /* Take yet unprocessed bytes into account.  */
+  uint32_t bytes = ctx->buflen;
+  size_t size = (bytes < 56) ? 64 / 4 : 64 * 2 / 4;
+
+  /* Now count remaining bytes.  */
+  ctx->total[0] += bytes;
+  if (ctx->total[0] < bytes)
+    ++ctx->total[1];
+
+  /* Put the 64-bit file length in *bits* at the end of the buffer.  */
+  ctx->buffer[size - 2] = SWAP ((ctx->total[1] << 3) | (ctx->total[0] >> 29));
+  ctx->buffer[size - 1] = SWAP (ctx->total[0] << 3);
+
+  memcpy (&((char *) ctx->buffer)[bytes], fillbuf, (size - 2) * 4 - bytes);
+
+  /* Process last bytes.  */
+  sha1_process_block (ctx->buffer, size * 4, ctx);
+
+  return sha1_read_ctx (ctx, resbuf);
+}
+
+/* Compute SHA1 message digest for bytes read from STREAM.  The
+   resulting message digest number will be written into the 16 bytes
+   beginning at RESBLOCK.  */
+int
+sha1_stream (FILE *stream, void *resblock)
+{
+  struct sha1_ctx ctx;
+  size_t sum;
+
+  char *buffer = (char*)malloc (BLOCKSIZE + 72);
+  if (!buffer)
+    return 1;
+
+  /* Initialize the computation context.  */
+  sha1_init_ctx (&ctx);
+
+  /* Iterate over full file contents.  */
+  while (1)
+    {
+      /* We read the file in blocks of BLOCKSIZE bytes.  One call of the
+         computation function processes the whole buffer so that with the
+         next round of the loop another block can be read.  */
+      size_t n;
+      sum = 0;
+
+      /* Read block.  Take care for partial reads.  */
+      while (1)
+        {
+          n = fread (buffer + sum, 1, BLOCKSIZE - sum, stream);
+
+          sum += n;
+
+          if (sum == BLOCKSIZE)
+            break;
+
+          if (n == 0)
+            {
+              /* Check for the error flag IFF N == 0, so that we don't
+                 exit the loop after a partial read due to e.g., EAGAIN
+                 or EWOULDBLOCK.  */
+              if (ferror (stream))
+                {
+                  free (buffer);
+                  return 1;
+                }
+              goto process_partial_block;
+            }
+
+          /* We've read at least one byte, so ignore errors.  But always
+             check for EOF, since feof may be true even though N > 0.
+             Otherwise, we could end up calling fread after EOF.  */
+          if (feof (stream))
+            goto process_partial_block;
+        }
+
+      /* Process buffer with BLOCKSIZE bytes.  Note that
+                        BLOCKSIZE % 64 == 0
+       */
+      sha1_process_block (buffer, BLOCKSIZE, &ctx);
+    }
+
+ process_partial_block:;
+
+  /* Process any remaining bytes.  */
+  if (sum > 0)
+    sha1_process_bytes (buffer, sum, &ctx);
+
+  /* Construct result in desired memory.  */
+  sha1_finish_ctx (&ctx, resblock);
+  free (buffer);
+  return 0;
+}
+
+/* Compute SHA1 message digest for LEN bytes beginning at BUFFER.  The
+   result is always in little endian byte order, so that a byte-wise
+   output yields to the wanted ASCII representation of the message
+   digest.  */
+void *
+sha1_buffer (const char *buffer, size_t len, void *resblock)
+{
+  struct sha1_ctx ctx;
+
+  /* Initialize the computation context.  */
+  sha1_init_ctx (&ctx);
+
+  /* Process whole buffer but last len % 64 bytes.  */
+  sha1_process_bytes (buffer, len, &ctx);
+
+  /* Put result in desired memory area.  */
+  return sha1_finish_ctx (&ctx, resblock);
+}
+
+void
+sha1_process_bytes (const void *buffer, size_t len, struct sha1_ctx *ctx)
+{
+  /* When we already have some bits in our internal buffer concatenate
+     both inputs first.  */
+  if (ctx->buflen != 0)
+    {
+      size_t left_over = ctx->buflen;
+      size_t add = 128 - left_over > len ? len : 128 - left_over;
+
+      memcpy (&((char *) ctx->buffer)[left_over], buffer, add);
+      ctx->buflen += add;
+
+      if (ctx->buflen > 64)
+        {
+          sha1_process_block (ctx->buffer, ctx->buflen & ~63, ctx);
+
+          ctx->buflen &= 63;
+          /* The regions in the following copy operation cannot overlap.  */
+          memcpy (ctx->buffer,
+                  &((char *) ctx->buffer)[(left_over + add) & ~63],
+                  ctx->buflen);
+        }
+
+      buffer = (const char *) buffer + add;
+      len -= add;
+    }
+
+  /* Process available complete blocks.  */
+  if (len >= 64)
+    {
+#if !_STRING_ARCH_unaligned
+# define alignof(type) offsetof (struct { char c; type x; }, x)
+# define UNALIGNED_P(p) (((size_t) p) % alignof (uint32_t) != 0)
+      if (UNALIGNED_P (buffer))
+        while (len > 64)
+          {
+            sha1_process_block (memcpy (ctx->buffer, buffer, 64), 64, ctx);
+            buffer = (const char *) buffer + 64;
+            len -= 64;
+          }
+      else
+#endif
+        {
+          sha1_process_block (buffer, len & ~63, ctx);
+          buffer = (const char *) buffer + (len & ~63);
+          len &= 63;
+        }
+    }
+
+  /* Move remaining bytes in internal buffer.  */
+  if (len > 0)
+    {
+      size_t left_over = ctx->buflen;
+
+      memcpy (&((char *) ctx->buffer)[left_over], buffer, len);
+      left_over += len;
+      if (left_over >= 64)
+        {
+          sha1_process_block (ctx->buffer, 64, ctx);
+          left_over -= 64;
+          memcpy (ctx->buffer, &ctx->buffer[16], left_over);
+        }
+      ctx->buflen = left_over;
+    }
+}
+
+/* --- Code below is the primary difference between md5.c and sha1.c --- */
+
+/* SHA1 round constants */
+#define K1 0x5a827999
+#define K2 0x6ed9eba1
+#define K3 0x8f1bbcdc
+#define K4 0xca62c1d6
+
+/* Round functions.  Note that F2 is the same as F4.  */
+#define F1(B,C,D) ( D ^ ( B & ( C ^ D ) ) )
+#define F2(B,C,D) (B ^ C ^ D)
+#define F3(B,C,D) ( ( B & C ) | ( D & ( B | C ) ) )
+#define F4(B,C,D) (B ^ C ^ D)
+
+/* Process LEN bytes of BUFFER, accumulating context into CTX.
+   It is assumed that LEN % 64 == 0.
+   Most of this code comes from GnuPG's cipher/sha1.c.  */
+
+void
+sha1_process_block (const void *buffer, size_t len, struct sha1_ctx *ctx)
+{
+  const uint32_t *words = (const uint32_t*)buffer;
+  size_t nwords = len / sizeof (uint32_t);
+  const uint32_t *endp = words + nwords;
+  uint32_t x[16];
+  uint32_t a = ctx->A;
+  uint32_t b = ctx->B;
+  uint32_t c = ctx->C;
+  uint32_t d = ctx->D;
+  uint32_t e = ctx->E;
+
+  /* First increment the byte count.  RFC 1321 specifies the possible
+     length of the file up to 2^64 bits.  Here we only compute the
+     number of bytes.  Do a double word increment.  */
+  ctx->total[0] += len;
+  if (ctx->total[0] < len)
+    ++ctx->total[1];
+
+#define rol(x, n) (((x) << (n)) | ((uint32_t) (x) >> (32 - (n))))
+
+#define M(I) ( tm =   x[I&0x0f] ^ x[(I-14)&0x0f] \
+                    ^ x[(I-8)&0x0f] ^ x[(I-3)&0x0f] \
+               , (x[I&0x0f] = rol(tm, 1)) )
+
+#define R(A,B,C,D,E,F,K,M)  do { E += rol( A, 5 )     \
+                                      + F( B, C, D )  \
+                                      + K             \
+                                      + M;            \
+                                 B = rol( B, 30 );    \
+                               } while(0)
+
+  while (words < endp)
+    {
+      uint32_t tm;
+      int t;
+      for (t = 0; t < 16; t++)
+        {
+          x[t] = SWAP (*words);
+          words++;
+        }
+
+      R( a, b, c, d, e, F1, K1, x[ 0] );
+      R( e, a, b, c, d, F1, K1, x[ 1] );
+      R( d, e, a, b, c, F1, K1, x[ 2] );
+      R( c, d, e, a, b, F1, K1, x[ 3] );
+      R( b, c, d, e, a, F1, K1, x[ 4] );
+      R( a, b, c, d, e, F1, K1, x[ 5] );
+      R( e, a, b, c, d, F1, K1, x[ 6] );
+      R( d, e, a, b, c, F1, K1, x[ 7] );
+      R( c, d, e, a, b, F1, K1, x[ 8] );
+      R( b, c, d, e, a, F1, K1, x[ 9] );
+      R( a, b, c, d, e, F1, K1, x[10] );
+      R( e, a, b, c, d, F1, K1, x[11] );
+      R( d, e, a, b, c, F1, K1, x[12] );
+      R( c, d, e, a, b, F1, K1, x[13] );
+      R( b, c, d, e, a, F1, K1, x[14] );
+      R( a, b, c, d, e, F1, K1, x[15] );
+      R( e, a, b, c, d, F1, K1, M(16) );
+      R( d, e, a, b, c, F1, K1, M(17) );
+      R( c, d, e, a, b, F1, K1, M(18) );
+      R( b, c, d, e, a, F1, K1, M(19) );
+      R( a, b, c, d, e, F2, K2, M(20) );
+      R( e, a, b, c, d, F2, K2, M(21) );
+      R( d, e, a, b, c, F2, K2, M(22) );
+      R( c, d, e, a, b, F2, K2, M(23) );
+      R( b, c, d, e, a, F2, K2, M(24) );
+      R( a, b, c, d, e, F2, K2, M(25) );
+      R( e, a, b, c, d, F2, K2, M(26) );
+      R( d, e, a, b, c, F2, K2, M(27) );
+      R( c, d, e, a, b, F2, K2, M(28) );
+      R( b, c, d, e, a, F2, K2, M(29) );
+      R( a, b, c, d, e, F2, K2, M(30) );
+      R( e, a, b, c, d, F2, K2, M(31) );
+      R( d, e, a, b, c, F2, K2, M(32) );
+      R( c, d, e, a, b, F2, K2, M(33) );
+      R( b, c, d, e, a, F2, K2, M(34) );
+      R( a, b, c, d, e, F2, K2, M(35) );
+      R( e, a, b, c, d, F2, K2, M(36) );
+      R( d, e, a, b, c, F2, K2, M(37) );
+      R( c, d, e, a, b, F2, K2, M(38) );
+      R( b, c, d, e, a, F2, K2, M(39) );
+      R( a, b, c, d, e, F3, K3, M(40) );
+      R( e, a, b, c, d, F3, K3, M(41) );
+      R( d, e, a, b, c, F3, K3, M(42) );
+      R( c, d, e, a, b, F3, K3, M(43) );
+      R( b, c, d, e, a, F3, K3, M(44) );
+      R( a, b, c, d, e, F3, K3, M(45) );
+      R( e, a, b, c, d, F3, K3, M(46) );
+      R( d, e, a, b, c, F3, K3, M(47) );
+      R( c, d, e, a, b, F3, K3, M(48) );
+      R( b, c, d, e, a, F3, K3, M(49) );
+      R( a, b, c, d, e, F3, K3, M(50) );
+      R( e, a, b, c, d, F3, K3, M(51) );
+      R( d, e, a, b, c, F3, K3, M(52) );
+      R( c, d, e, a, b, F3, K3, M(53) );
+      R( b, c, d, e, a, F3, K3, M(54) );
+      R( a, b, c, d, e, F3, K3, M(55) );
+      R( e, a, b, c, d, F3, K3, M(56) );
+      R( d, e, a, b, c, F3, K3, M(57) );
+      R( c, d, e, a, b, F3, K3, M(58) );
+      R( b, c, d, e, a, F3, K3, M(59) );
+      R( a, b, c, d, e, F4, K4, M(60) );
+      R( e, a, b, c, d, F4, K4, M(61) );
+      R( d, e, a, b, c, F4, K4, M(62) );
+      R( c, d, e, a, b, F4, K4, M(63) );
+      R( b, c, d, e, a, F4, K4, M(64) );
+      R( a, b, c, d, e, F4, K4, M(65) );
+      R( e, a, b, c, d, F4, K4, M(66) );
+      R( d, e, a, b, c, F4, K4, M(67) );
+      R( c, d, e, a, b, F4, K4, M(68) );
+      R( b, c, d, e, a, F4, K4, M(69) );
+      R( a, b, c, d, e, F4, K4, M(70) );
+      R( e, a, b, c, d, F4, K4, M(71) );
+      R( d, e, a, b, c, F4, K4, M(72) );
+      R( c, d, e, a, b, F4, K4, M(73) );
+      R( b, c, d, e, a, F4, K4, M(74) );
+      R( a, b, c, d, e, F4, K4, M(75) );
+      R( e, a, b, c, d, F4, K4, M(76) );
+      R( d, e, a, b, c, F4, K4, M(77) );
+      R( c, d, e, a, b, F4, K4, M(78) );
+      R( b, c, d, e, a, F4, K4, M(79) );
+
+      a = ctx->A += a;
+      b = ctx->B += b;
+      c = ctx->C += c;
+      d = ctx->D += d;
+      e = ctx->E += e;
+    }
+}
diff -Nru abiword-2.8.2/plugins/opendocument/common/xp/crypto/sha1.h abiword-2.8.4/plugins/opendocument/common/xp/crypto/sha1.h
--- abiword-2.8.2/plugins/opendocument/common/xp/crypto/sha1.h	1970-01-01 02:00:00.000000000 +0200
+++ abiword-2.8.4/plugins/opendocument/common/xp/crypto/sha1.h	2010-04-15 00:50:16.000000000 +0300
@@ -0,0 +1,99 @@
+/* Declarations of functions and data types used for SHA1 sum
+   library functions.
+   Copyright (C) 2000, 2001, 2003, 2005, 2006, 2008, 2009, 2010 Free Software
+   Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify it
+   under the terms of the GNU General Public License as published by the
+   Free Software Foundation; either version 2, or (at your option) any
+   later version.
+
+   This program 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 General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+
+#ifndef SHA1_H
+# define SHA1_H 1
+
+# include <stdio.h>
+
+#ifndef _MSC_VER
+# include <stdint.h>
+#else
+typedef unsigned int uint32_t;
+#define inline __inline
+#endif
+
+
+# ifdef __cplusplus
+extern "C" {
+# endif
+
+#define SHA1_DIGEST_SIZE 20
+
+/* Structure to save state of computation between the single steps.  */
+struct sha1_ctx
+{
+  uint32_t A;
+  uint32_t B;
+  uint32_t C;
+  uint32_t D;
+  uint32_t E;
+
+  uint32_t total[2];
+  uint32_t buflen;
+  uint32_t buffer[32];
+};
+
+
+/* Initialize structure containing state of computation. */
+extern void sha1_init_ctx (struct sha1_ctx *ctx);
+
+/* Starting with the result of former calls of this function (or the
+   initialization function update the context for the next LEN bytes
+   starting at BUFFER.
+   It is necessary that LEN is a multiple of 64!!! */
+extern void sha1_process_block (const void *buffer, size_t len,
+                                struct sha1_ctx *ctx);
+
+/* Starting with the result of former calls of this function (or the
+   initialization function update the context for the next LEN bytes
+   starting at BUFFER.
+   It is NOT required that LEN is a multiple of 64.  */
+extern void sha1_process_bytes (const void *buffer, size_t len,
+                                struct sha1_ctx *ctx);
+
+/* Process the remaining bytes in the buffer and put result from CTX
+   in first 20 bytes following RESBUF.  The result is always in little
+   endian byte order, so that a byte-wise output yields to the wanted
+   ASCII representation of the message digest.  */
+extern void *sha1_finish_ctx (struct sha1_ctx *ctx, void *resbuf);
+
+
+/* Put result from CTX in first 20 bytes following RESBUF.  The result is
+   always in little endian byte order, so that a byte-wise output yields
+   to the wanted ASCII representation of the message digest.  */
+extern void *sha1_read_ctx (const struct sha1_ctx *ctx, void *resbuf);
+
+
+/* Compute SHA1 message digest for bytes read from STREAM.  The
+   resulting message digest number will be written into the 20 bytes
+   beginning at RESBLOCK.  */
+extern int sha1_stream (FILE *stream, void *resblock);
+
+/* Compute SHA1 message digest for LEN bytes beginning at BUFFER.  The
+   result is always in little endian byte order, so that a byte-wise
+   output yields to the wanted ASCII representation of the message
+   digest.  */
+extern void *sha1_buffer (const char *buffer, size_t len, void *resblock);
+
+# ifdef __cplusplus
+}
+# endif
+
+#endif
diff -Nru abiword-2.8.2/plugins/opendocument/common/xp/Makefile.am abiword-2.8.4/plugins/opendocument/common/xp/Makefile.am
--- abiword-2.8.2/plugins/opendocument/common/xp/Makefile.am	2008-05-08 16:12:53.000000000 +0300
+++ abiword-2.8.4/plugins/opendocument/common/xp/Makefile.am	2010-04-15 00:50:16.000000000 +0300
@@ -2,10 +2,31 @@
 noinst_LTLIBRARIES = libxp.la
 
 AM_CPPFLAGS = \
+	-I$(srcdir)/crypto \
+	-I$(srcdir)/crypto/blowfish \
 	$(OPENDOCUMENT_CFLAGS) \
 	-DABI_BUILD_VERSION=\"$(VERSION)\"
 
 libxp_la_SOURCES = \
-	ie_impexp_OpenDocument.cpp
-
+	crypto/blowfish/bf_cfb64.c \
+	crypto/blowfish/bf_enc.c \
+	crypto/blowfish/bf_locl.h \
+	crypto/blowfish/bf_pi.h \
+	crypto/blowfish/bf_skey.c \
+	crypto/blowfish/blowfish.h \
+	crypto/gc-pbkdf2-sha1.c \
+	crypto/gc-pbkdf2-sha1.h \
+	crypto/hmac-sha1.c \
+	crypto/hmac.h \
+	crypto/memxor.c \
+	crypto/memxor.h \
+	crypto/sha1.c \
+	crypto/sha1.h \
+	ie_impexp_OpenDocument.cpp \
+	ODc_Crypto.cpp \
+	ODc_Crypto.h
 
+EXTRA_DIST = \
+	crypto/blowfish/COPYRIGHT \
+	crypto/blowfish/README \
+	crypto/README
\ No newline at end of file
diff -Nru abiword-2.8.2/plugins/opendocument/common/xp/Makefile.in abiword-2.8.4/plugins/opendocument/common/xp/Makefile.in
--- abiword-2.8.2/plugins/opendocument/common/xp/Makefile.in	2010-02-12 16:12:43.000000000 +0200
+++ abiword-2.8.4/plugins/opendocument/common/xp/Makefile.in	2010-04-15 00:51:13.000000000 +0300
@@ -53,12 +53,20 @@
 CONFIG_CLEAN_VPATH_FILES =
 LTLIBRARIES = $(noinst_LTLIBRARIES)
 libxp_la_LIBADD =
-am_libxp_la_OBJECTS = ie_impexp_OpenDocument.lo
+am_libxp_la_OBJECTS = bf_cfb64.lo bf_enc.lo bf_skey.lo \
+	gc-pbkdf2-sha1.lo hmac-sha1.lo memxor.lo sha1.lo \
+	ie_impexp_OpenDocument.lo ODc_Crypto.lo
 libxp_la_OBJECTS = $(am_libxp_la_OBJECTS)
 DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
 depcomp = $(SHELL) $(top_srcdir)/depcomp
 am__depfiles_maybe = depfiles
 am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+	$(LDFLAGS) -o $@
 CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
 	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
 CXXLD = $(CXX)
@@ -354,16 +362,39 @@
 top_srcdir = @top_srcdir@
 noinst_LTLIBRARIES = libxp.la
 AM_CPPFLAGS = \
+	-I$(srcdir)/crypto \
+	-I$(srcdir)/crypto/blowfish \
 	$(OPENDOCUMENT_CFLAGS) \
 	-DABI_BUILD_VERSION=\"$(VERSION)\"
 
 libxp_la_SOURCES = \
-	ie_impexp_OpenDocument.cpp
+	crypto/blowfish/bf_cfb64.c \
+	crypto/blowfish/bf_enc.c \
+	crypto/blowfish/bf_locl.h \
+	crypto/blowfish/bf_pi.h \
+	crypto/blowfish/bf_skey.c \
+	crypto/blowfish/blowfish.h \
+	crypto/gc-pbkdf2-sha1.c \
+	crypto/gc-pbkdf2-sha1.h \
+	crypto/hmac-sha1.c \
+	crypto/hmac.h \
+	crypto/memxor.c \
+	crypto/memxor.h \
+	crypto/sha1.c \
+	crypto/sha1.h \
+	ie_impexp_OpenDocument.cpp \
+	ODc_Crypto.cpp \
+	ODc_Crypto.h
+
+EXTRA_DIST = \
+	crypto/blowfish/COPYRIGHT \
+	crypto/blowfish/README \
+	crypto/README
 
 all: all-am
 
 .SUFFIXES:
-.SUFFIXES: .cpp .lo .o .obj
+.SUFFIXES: .c .cpp .lo .o .obj
 $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
 	@for dep in $?; do \
 	  case '$(am__configure_deps)' in \
@@ -412,7 +443,85 @@
 distclean-compile:
 	-rm -f *.tab.c
 
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ODc_Crypto.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bf_cfb64.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bf_enc.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bf_skey.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gc-pbkdf2-sha1.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hmac-sha1.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ie_impexp_OpenDocument.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/memxor.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sha1.Plo@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(COMPILE) -c $<
+
+.c.obj:
+@am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@	$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(LTCOMPILE) -c -o $@ $<
+
+bf_cfb64.lo: crypto/blowfish/bf_cfb64.c
+@am__fastdepCC_TRUE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bf_cfb64.lo -MD -MP -MF $(DEPDIR)/bf_cfb64.Tpo -c -o bf_cfb64.lo `test -f 'crypto/blowfish/bf_cfb64.c' || echo '$(srcdir)/'`crypto/blowfish/bf_cfb64.c
+@am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/bf_cfb64.Tpo $(DEPDIR)/bf_cfb64.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='crypto/blowfish/bf_cfb64.c' object='bf_cfb64.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bf_cfb64.lo `test -f 'crypto/blowfish/bf_cfb64.c' || echo '$(srcdir)/'`crypto/blowfish/bf_cfb64.c
+
+bf_enc.lo: crypto/blowfish/bf_enc.c
+@am__fastdepCC_TRUE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bf_enc.lo -MD -MP -MF $(DEPDIR)/bf_enc.Tpo -c -o bf_enc.lo `test -f 'crypto/blowfish/bf_enc.c' || echo '$(srcdir)/'`crypto/blowfish/bf_enc.c
+@am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/bf_enc.Tpo $(DEPDIR)/bf_enc.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='crypto/blowfish/bf_enc.c' object='bf_enc.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bf_enc.lo `test -f 'crypto/blowfish/bf_enc.c' || echo '$(srcdir)/'`crypto/blowfish/bf_enc.c
+
+bf_skey.lo: crypto/blowfish/bf_skey.c
+@am__fastdepCC_TRUE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bf_skey.lo -MD -MP -MF $(DEPDIR)/bf_skey.Tpo -c -o bf_skey.lo `test -f 'crypto/blowfish/bf_skey.c' || echo '$(srcdir)/'`crypto/blowfish/bf_skey.c
+@am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/bf_skey.Tpo $(DEPDIR)/bf_skey.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='crypto/blowfish/bf_skey.c' object='bf_skey.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bf_skey.lo `test -f 'crypto/blowfish/bf_skey.c' || echo '$(srcdir)/'`crypto/blowfish/bf_skey.c
+
+gc-pbkdf2-sha1.lo: crypto/gc-pbkdf2-sha1.c
+@am__fastdepCC_TRUE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT gc-pbkdf2-sha1.lo -MD -MP -MF $(DEPDIR)/gc-pbkdf2-sha1.Tpo -c -o gc-pbkdf2-sha1.lo `test -f 'crypto/gc-pbkdf2-sha1.c' || echo '$(srcdir)/'`crypto/gc-pbkdf2-sha1.c
+@am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/gc-pbkdf2-sha1.Tpo $(DEPDIR)/gc-pbkdf2-sha1.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='crypto/gc-pbkdf2-sha1.c' object='gc-pbkdf2-sha1.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o gc-pbkdf2-sha1.lo `test -f 'crypto/gc-pbkdf2-sha1.c' || echo '$(srcdir)/'`crypto/gc-pbkdf2-sha1.c
+
+hmac-sha1.lo: crypto/hmac-sha1.c
+@am__fastdepCC_TRUE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT hmac-sha1.lo -MD -MP -MF $(DEPDIR)/hmac-sha1.Tpo -c -o hmac-sha1.lo `test -f 'crypto/hmac-sha1.c' || echo '$(srcdir)/'`crypto/hmac-sha1.c
+@am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/hmac-sha1.Tpo $(DEPDIR)/hmac-sha1.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='crypto/hmac-sha1.c' object='hmac-sha1.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o hmac-sha1.lo `test -f 'crypto/hmac-sha1.c' || echo '$(srcdir)/'`crypto/hmac-sha1.c
+
+memxor.lo: crypto/memxor.c
+@am__fastdepCC_TRUE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT memxor.lo -MD -MP -MF $(DEPDIR)/memxor.Tpo -c -o memxor.lo `test -f 'crypto/memxor.c' || echo '$(srcdir)/'`crypto/memxor.c
+@am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/memxor.Tpo $(DEPDIR)/memxor.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='crypto/memxor.c' object='memxor.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o memxor.lo `test -f 'crypto/memxor.c' || echo '$(srcdir)/'`crypto/memxor.c
+
+sha1.lo: crypto/sha1.c
+@am__fastdepCC_TRUE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sha1.lo -MD -MP -MF $(DEPDIR)/sha1.Tpo -c -o sha1.lo `test -f 'crypto/sha1.c' || echo '$(srcdir)/'`crypto/sha1.c
+@am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/sha1.Tpo $(DEPDIR)/sha1.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='crypto/sha1.c' object='sha1.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sha1.lo `test -f 'crypto/sha1.c' || echo '$(srcdir)/'`crypto/sha1.c
 
 .cpp.o:
 @am__fastdepCXX_TRUE@	$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
diff -Nru abiword-2.8.2/plugins/opendocument/common/xp/ODc_Crypto.cpp abiword-2.8.4/plugins/opendocument/common/xp/ODc_Crypto.cpp
--- abiword-2.8.2/plugins/opendocument/common/xp/ODc_Crypto.cpp	1970-01-01 02:00:00.000000000 +0200
+++ abiword-2.8.4/plugins/opendocument/common/xp/ODc_Crypto.cpp	2010-04-15 00:50:16.000000000 +0300
@@ -0,0 +1,130 @@
+/* Copyright (C) 2010 Marc Maurer <uwog@uwog.net>
+ * 
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ * 
+ * This program 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 General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  
+ * 02111-1307, USA.
+ */
+
+#include <stdlib.h>
+
+#include <zlib.h>
+#include <glib.h>
+#include <gsf/gsf-input-gzip.h>
+#include <gsf/gsf-input-memory.h>
+
+#include "sha1.h"
+#include "gc-pbkdf2-sha1.h"
+#include "blowfish/blowfish.h"
+
+#include "ut_assert.h"
+#include "ODc_Crypto.h"
+
+#define PASSWORD_HASH_LEN 20
+#define PBKDF2_KEYLEN 16
+
+UT_Error ODc_Crypto::performDecrypt(GsfInput* pStream, 
+	unsigned char* salt, UT_uint32 salt_length, UT_uint32 iter_count,
+	unsigned char* ivec, const std::string& password, UT_uint32 decrypted_size,
+	GsfInput** pDecryptedInput)
+{
+	unsigned char sha1_password[PASSWORD_HASH_LEN];
+	char key[PBKDF2_KEYLEN];
+
+	// get the sha1 sum of the password
+	sha1_buffer(&password[0], password.size(), sha1_password);
+
+	// create a PBKDF2 key from the sha1 sum
+	int k = pbkdf2_sha1 ((const char*)sha1_password, PASSWORD_HASH_LEN, (const char*)salt, salt_length, iter_count, key, PBKDF2_KEYLEN);
+	if (k != 0)
+		return UT_ERROR;
+
+	// create the decryption key
+	BF_KEY bf_key;
+	BF_set_key(&bf_key, PBKDF2_KEYLEN, (const unsigned char*)key);
+
+	// perform the actual decryption
+	UT_sint32 content_size = gsf_input_size(pStream); 
+	if (content_size == -1)
+		return UT_ERROR;
+	const unsigned char* content = gsf_input_read(pStream, content_size, NULL);
+	if (!content)
+		return UT_ERROR;
+	int num = 0;
+	unsigned char* content_decrypted = (unsigned char*)g_malloc(content_size);
+	BF_cfb64_encrypt(content, content_decrypted, content_size, &bf_key, ivec, &num, BF_DECRYPT);
+
+	// deflate the decrypted content
+	z_stream zs;
+	zs.zalloc = Z_NULL;
+	zs.zfree = Z_NULL;
+	zs.opaque = Z_NULL;
+	zs.avail_in = 0;
+	zs.next_in = Z_NULL;
+
+	int err;
+	err = inflateInit2(&zs, -MAX_WBITS);
+	if (err != Z_OK)
+		return UT_ERROR;
+
+	unsigned char* decrypted = (unsigned char*)g_malloc(decrypted_size);
+	zs.avail_in = content_size;
+	zs.avail_out = decrypted_size;
+	zs.next_in = content_decrypted;
+	zs.next_out = decrypted;
+
+	err = inflate(&zs, Z_FINISH);
+	FREEP(content_decrypted);
+	
+	if (err != Z_STREAM_END)
+	{
+		inflateEnd(&zs);
+		FREEP(decrypted);
+		return UT_ERROR;
+	}
+
+	inflateEnd(&zs);
+
+	*pDecryptedInput = gsf_input_memory_new(decrypted, decrypted_size, TRUE);
+	
+	return UT_OK;
+}
+
+UT_Error ODc_Crypto::decrypt(GsfInput* pStream, const ODc_CryptoInfo& cryptInfo,
+    const std::string& password, GsfInput** pDecryptedInput)
+{
+	UT_return_val_if_fail(pStream, UT_ERROR);
+	UT_return_val_if_fail(pDecryptedInput, UT_ERROR);
+	
+	// check if we support the requested decryption method
+	UT_return_val_if_fail(g_ascii_strcasecmp(cryptInfo.m_algorithm.c_str(), "Blowfish CFB") == 0, UT_ERROR);
+	UT_return_val_if_fail(g_ascii_strcasecmp(cryptInfo.m_keyType.c_str(), "PBKDF2") == 0, UT_ERROR);
+	
+	// base64 decode the salt
+	gsize salt_length;
+	unsigned char* salt = g_base64_decode(cryptInfo.m_salt.c_str(), &salt_length);
+
+	// base64 decode the initialization vector
+	gsize ivec_length;
+	unsigned char* ivec = g_base64_decode(cryptInfo.m_initVector.c_str(), &ivec_length);
+
+	// decrypt the content
+	UT_Error result = performDecrypt(pStream, salt, salt_length, cryptInfo.m_iterCount,  
+			ivec, password, cryptInfo.m_decryptedSize, pDecryptedInput);
+
+	// cleanup
+	FREEP(salt);
+	FREEP(ivec);
+
+	return result;
+}
diff -Nru abiword-2.8.2/plugins/opendocument/common/xp/ODc_Crypto.h abiword-2.8.4/plugins/opendocument/common/xp/ODc_Crypto.h
--- abiword-2.8.2/plugins/opendocument/common/xp/ODc_Crypto.h	1970-01-01 02:00:00.000000000 +0200
+++ abiword-2.8.4/plugins/opendocument/common/xp/ODc_Crypto.h	2010-04-15 00:50:16.000000000 +0300
@@ -0,0 +1,52 @@
+/* Copyright (C) 2010 Marc Maurer <uwog@uwog.net>
+ * 
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ * 
+ * This program 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 General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  
+ * 02111-1307, USA.
+ */
+
+#ifndef __ODC_CRYPTO__
+#define __ODC_CRYPTO__
+
+#include <string>
+#include <gsf/gsf.h>
+#include <gsf/gsf-input.h>
+#include "ut_types.h"
+
+class ODc_CryptoInfo {
+public:
+	// stream information
+	UT_uint32		m_decryptedSize;
+	
+	// algorithm information
+	std::string		m_algorithm;
+	std::string		m_initVector;
+	
+	// key information
+	std::string		m_keyType;
+	UT_uint32		m_iterCount;
+	std::string		m_salt;
+};
+
+class ODc_Crypto {
+public:
+	static UT_Error decrypt(GsfInput* pStream, const ODc_CryptoInfo& cryptInfo, 
+							const std::string& password, GsfInput** pDecryptedInput);
+
+private:
+	static UT_Error performDecrypt(GsfInput* pStream,	unsigned char* salt, UT_uint32 salt_length, UT_uint32 iter_count,
+							unsigned char* ivec, const std::string& password, UT_uint32 decrypted_size, GsfInput** pDecryptedInput);
+};
+
+#endif /* __ODC_CRYPTO__ */
\ No newline at end of file
diff -Nru abiword-2.8.2/plugins/opendocument/exp/xp/Makefile.am abiword-2.8.4/plugins/opendocument/exp/xp/Makefile.am
--- abiword-2.8.2/plugins/opendocument/exp/xp/Makefile.am	2008-05-13 18:22:14.000000000 +0300
+++ abiword-2.8.4/plugins/opendocument/exp/xp/Makefile.am	2010-04-15 00:50:16.000000000 +0300
@@ -19,6 +19,8 @@
 	ODe_AuxiliaryData.h \
 	ODe_Common.cpp \
 	ODe_Common.h \
+	ODe_DefaultStyles.cpp \
+	ODe_DefaultStyles.h \
 	ODe_DocumentData.cpp \
 	ODe_DocumentData.h \
 	ODe_FontFaceDecls.cpp \
diff -Nru abiword-2.8.2/plugins/opendocument/exp/xp/Makefile.in abiword-2.8.4/plugins/opendocument/exp/xp/Makefile.in
--- abiword-2.8.2/plugins/opendocument/exp/xp/Makefile.in	2010-02-12 16:12:43.000000000 +0200
+++ abiword-2.8.4/plugins/opendocument/exp/xp/Makefile.in	2010-04-15 00:51:13.000000000 +0300
@@ -56,8 +56,8 @@
 am_libxp_la_OBJECTS = ie_exp_OpenDocument.lo \
 	ie_exp_OpenDocument_Sniffer.lo ODe_AbiDocListener.lo \
 	ODe_AbiDocListenerImpl.lo ODe_AutomaticStyles.lo \
-	ODe_AuxiliaryData.lo ODe_Common.lo ODe_DocumentData.lo \
-	ODe_FontFaceDecls.lo ODe_Frame_Listener.lo \
+	ODe_AuxiliaryData.lo ODe_Common.lo ODe_DefaultStyles.lo \
+	ODe_DocumentData.lo ODe_FontFaceDecls.lo ODe_Frame_Listener.lo \
 	ODe_HeadingSearcher_Listener.lo ODe_ListLevelStyle.lo \
 	ODe_Main_Listener.lo ODe_ManifestWriter.lo \
 	ODe_MetaDataWriter.lo ODe_Note_Listener.lo \
@@ -387,6 +387,8 @@
 	ODe_AuxiliaryData.h \
 	ODe_Common.cpp \
 	ODe_Common.h \
+	ODe_DefaultStyles.cpp \
+	ODe_DefaultStyles.h \
 	ODe_DocumentData.cpp \
 	ODe_DocumentData.h \
 	ODe_FontFaceDecls.cpp \
@@ -482,6 +484,7 @@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ODe_AutomaticStyles.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ODe_AuxiliaryData.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ODe_Common.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ODe_DefaultStyles.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ODe_DocumentData.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ODe_FontFaceDecls.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ODe_Frame_Listener.Plo@am__quote@
diff -Nru abiword-2.8.2/plugins/opendocument/exp/xp/ODe_DefaultStyles.cpp abiword-2.8.4/plugins/opendocument/exp/xp/ODe_DefaultStyles.cpp
--- abiword-2.8.2/plugins/opendocument/exp/xp/ODe_DefaultStyles.cpp	1970-01-01 02:00:00.000000000 +0200
+++ abiword-2.8.4/plugins/opendocument/exp/xp/ODe_DefaultStyles.cpp	2010-04-15 00:50:16.000000000 +0300
@@ -0,0 +1,54 @@
+/* AbiSource
+ * 
+ * Copyright (C) 2010 Marc Maurer <uwog@uwog.net>
+ * 
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ * 
+ * This program 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 General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  
+ * 02111-1307, USA.
+ */
+
+// Class definition include
+#include "ODe_DefaultStyles.h"
+
+// Interal includes
+#include "ODe_Style_Style.h"
+
+UT_GenericVector<ODe_Style_Style*>* ODe_DefaultStyles::enumerate() const {
+    UT_GenericVector<ODe_Style_Style*>* pVec = new UT_GenericVector<ODe_Style_Style*>(m_styles.size());
+    
+    std::map<std::string, ODe_Style_Style*>::const_iterator pos = m_styles.begin();
+    for (; pos != m_styles.end(); pos++) {
+        pVec->addItem((*pos).second);
+    }
+
+    return pVec;
+}
+
+ODe_Style_Style* ODe_DefaultStyles::getStyle(std::string family) {
+    std::map<std::string, ODe_Style_Style*>::iterator pos = m_styles.find(family);
+    if (pos == m_styles.end())
+        return NULL;
+
+    return (*pos).second;
+}
+
+void ODe_DefaultStyles::storeStyle(std::string family, ODe_Style_Style* pStyle) {
+
+    // there can only be one default style for a given family, so let's check
+    // for that to catch possible errors
+    std::map<std::string, ODe_Style_Style*>::iterator pos = m_styles.find(family);
+    UT_return_if_fail(pos == m_styles.end());
+    
+    m_styles[family] = pStyle;
+}
\ No newline at end of file
diff -Nru abiword-2.8.2/plugins/opendocument/exp/xp/ODe_DefaultStyles.h abiword-2.8.4/plugins/opendocument/exp/xp/ODe_DefaultStyles.h
--- abiword-2.8.2/plugins/opendocument/exp/xp/ODe_DefaultStyles.h	1970-01-01 02:00:00.000000000 +0200
+++ abiword-2.8.4/plugins/opendocument/exp/xp/ODe_DefaultStyles.h	2010-04-15 00:50:16.000000000 +0300
@@ -0,0 +1,50 @@
+/* AbiSource
+ * 
+ * Copyright (C) 2010 Marc Maurer <uwog@uwog.net>
+ * 
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ * 
+ * This program 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 General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  
+ * 02111-1307, USA.
+ */
+
+#ifndef _ODE_DEFAULTSTYLES_H_
+#define _ODE_DEFAULTSTYLES_H_
+
+#include <map>
+#include <string>
+
+// AbiWord includes
+#include <ut_hash.h>
+
+// External includes
+#include <gsf/gsf-output.h>
+
+class ODe_Style_Style;
+
+/**
+ * This class stores all default styles.
+ */
+class ODe_DefaultStyles {
+public:
+
+    UT_GenericVector<ODe_Style_Style*>* enumerate() const;
+    ODe_Style_Style* getStyle(std::string family);
+    void storeStyle(std::string family, ODe_Style_Style* pStyle);
+
+private:
+    
+    std::map<std::string, ODe_Style_Style*> m_styles;
+};
+
+#endif //_ODE_DEFAULTSTYLES_H_
diff -Nru abiword-2.8.2/plugins/opendocument/exp/xp/ODe_DocumentData.cpp abiword-2.8.4/plugins/opendocument/exp/xp/ODe_DocumentData.cpp
--- abiword-2.8.2/plugins/opendocument/exp/xp/ODe_DocumentData.cpp	2009-12-13 22:23:52.000000000 +0200
+++ abiword-2.8.4/plugins/opendocument/exp/xp/ODe_DocumentData.cpp	2010-04-15 00:50:16.000000000 +0300
@@ -166,10 +166,62 @@
         }
     }
     
+    ////
+    // Build/expand the <style:default-style> paragraph elements for the Styles
+    // XML file based on the existence of AbiWord's default-tab-interval 
+    // property in any of the automatic or normal styles.
+    // 
+    pStylesVector = m_contentAutoStyles.getParagraphStyles();
+    count = pStylesVector->getItemCount();
+    for (i=0; i<count; i++) {
+        handleDefaultTabInterval((*pStylesVector)[i]);
+    }
+
+    pStylesVector = m_stylesAutoStyles.getTextStyles();
+    count = pStylesVector->getItemCount();
+    for (i=0; i<count; i++) {
+        handleDefaultTabInterval((*pStylesVector)[i]);
+    }
+
+    pStylesVector = m_styles.getParagraphStylesEnumeration();
+    count = pStylesVector->getItemCount();
+    for (i=0; i<count; i++) {
+        handleDefaultTabInterval((*pStylesVector)[i]);
+    }
+    
     return true;
 }
 
 
+/**
+ * 
+ */
+void ODe_DocumentData::handleDefaultTabInterval(ODe_Style_Style* pStyle) {
+    UT_return_if_fail(pStyle);
+    
+    UT_UTF8String defaultTabInterval = pStyle->getDefaultTabInterval();
+    if (defaultTabInterval.empty())
+        return;
+
+    // remove the default tab interval property from the style
+    pStyle->setDefaultTabInterval("");
+
+    // ... and create a default style to hold the default tab interval property
+    ODe_Style_Style* pDefaultStyle = m_styles.getDefaultStyles().getStyle("paragraph");
+    if (!pDefaultStyle) {
+        pDefaultStyle = new ODe_Style_Style();
+        pDefaultStyle->setFamily("paragraph");
+        pDefaultStyle->makeDefaultStyle();
+        m_styles.getDefaultStyles().storeStyle("paragraph", pDefaultStyle);
+    }
+    // NOTE: if a paragraph default style already exists with a default tab interval
+    // property set, then we'll just overwrite it. This can happen because AbiWord 
+    // supports such a property on every paragraph and paragraph style, but ODT only 
+    // supports one on the default paragraph style.
+    pDefaultStyle->setDefaultTabInterval(defaultTabInterval);
+}
+
+
 /**
  * 
  */
diff -Nru abiword-2.8.2/plugins/opendocument/exp/xp/ODe_DocumentData.h abiword-2.8.4/plugins/opendocument/exp/xp/ODe_DocumentData.h
--- abiword-2.8.2/plugins/opendocument/exp/xp/ODe_DocumentData.h	2008-01-04 14:47:33.000000000 +0200
+++ abiword-2.8.4/plugins/opendocument/exp/xp/ODe_DocumentData.h	2010-04-15 00:50:16.000000000 +0300
@@ -59,8 +59,6 @@
     bool writeStylesXML(GsfOutfile* pOdt) const;
     bool writeContentXML(GsfOutfile* pOdt);
 
-
-
     // <office:automatic-styles> for <office:document-styles>
     ODe_AutomaticStyles m_stylesAutoStyles;
     
@@ -82,6 +80,9 @@
     // after having written the entire <office:text>, but, on
     // content.xml, <office:automatic-styles> must appear *before* <office:text>.
     GsfOutput* m_pOfficeTextTemp;
+
+private:
+    void handleDefaultTabInterval(ODe_Style_Style* pStyle);
 };
 
 #endif /*ODE_DOCUMENTDATA_H_*/
diff -Nru abiword-2.8.2/plugins/opendocument/exp/xp/ODe_MetaDataWriter.cpp abiword-2.8.4/plugins/opendocument/exp/xp/ODe_MetaDataWriter.cpp
--- abiword-2.8.2/plugins/opendocument/exp/xp/ODe_MetaDataWriter.cpp	2009-12-13 22:23:52.000000000 +0200
+++ abiword-2.8.4/plugins/opendocument/exp/xp/ODe_MetaDataWriter.cpp	2010-04-15 00:50:16.000000000 +0300
@@ -46,25 +46,24 @@
     
     GsfOutput* meta = gsf_outfile_new_child (oo, "meta.xml", FALSE);
 
-    static const char * const preamble [] = {
-        "<?xml version='1.0' encoding='UTF-8'?>\n",
+    static const UT_UTF8String preamble =
+        UT_UTF8String("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
         "<office:document-meta"
             " xmlns:office=\"urn:oasis:names:tc:opendocument:xmlns:office:1.0\""
             " xmlns:xlink=\"http://www.w3.org/1999/xlink\""
             " xmlns:dc=\"http://purl.org/dc/elements/1.1/\""
             " xmlns:meta=\"urn:oasis:names:tc:opendocument:xmlns:meta:1.0\""
             " xmlns:ooo=\"http://openoffice.org/2004/office\""
-            " office:version=\"1.1\">\n",
-        "<office:meta>\n",
-        "<meta:generator>AbiWord</meta:generator>\n"
-    };
+            " office:version=\"1.1\">\n"
+        "<office:meta>\n"
+        "<meta:generator>AbiWord/") + PACKAGE_VERSION + " (" + PLATFORM + ", " + TOOLKIT + ")</meta:generator>\n";
 
     static const char * const postamble [] = {
         "</office:meta>\n",
         "</office:document-meta>\n"
     };
 
-    ODe_writeToStream(meta, preamble, G_N_ELEMENTS(preamble));
+    ODe_writeUTF8String(meta, preamble);
 
     UT_UTF8String meta_val, val;
     
diff -Nru abiword-2.8.2/plugins/opendocument/exp/xp/ODe_Styles.cpp abiword-2.8.4/plugins/opendocument/exp/xp/ODe_Styles.cpp
--- abiword-2.8.2/plugins/opendocument/exp/xp/ODe_Styles.cpp	2009-09-22 17:43:04.000000000 +0300
+++ abiword-2.8.4/plugins/opendocument/exp/xp/ODe_Styles.cpp	2010-04-15 00:50:16.000000000 +0300
@@ -169,7 +169,8 @@
     output += " <office:styles>\n";
     ODe_writeUTF8String(pODT, output);
     output.clear();
-    
+
+    UT_return_val_if_fail(_writeStyles(pODT, m_defaultStyles.enumerate()), false);
 	UT_return_val_if_fail(_writeStyles(pODT, m_textStyles.enumerate()), false);
 	UT_return_val_if_fail(_writeStyles(pODT, m_paragraphStyles.enumerate()), false);
 	UT_return_val_if_fail(_writeStyles(pODT, m_graphicStyles.enumerate()), false);
diff -Nru abiword-2.8.2/plugins/opendocument/exp/xp/ODe_Styles.h abiword-2.8.4/plugins/opendocument/exp/xp/ODe_Styles.h
--- abiword-2.8.2/plugins/opendocument/exp/xp/ODe_Styles.h	2009-09-22 17:43:04.000000000 +0300
+++ abiword-2.8.4/plugins/opendocument/exp/xp/ODe_Styles.h	2010-04-15 00:50:16.000000000 +0300
@@ -25,6 +25,9 @@
 // AbiWord includes
 #include <ut_hash.h>
 
+// Internal includes
+#include "ODe_DefaultStyles.h"
+
 // External includes
 #include <gsf/gsf-output.h>
 
@@ -52,6 +55,10 @@
 
     // Writes the <office:styles> element.
     bool write(GsfOutput* pODT) const;
+
+    ODe_DefaultStyles& getDefaultStyles() {
+        return m_defaultStyles;
+    }
     
     UT_GenericVector<ODe_Style_Style*>* getParagraphStylesEnumeration() {
         return m_paragraphStyles.enumerate();
@@ -75,6 +82,7 @@
     bool _addStyle(const PP_AttrProp* pAP);
     bool _writeStyles(GsfOutput* pODT, UT_GenericVector<ODe_Style_Style*>* pStyleVector) const;
 
+    ODe_DefaultStyles m_defaultStyles;
     UT_GenericStringMap<ODe_Style_Style*> m_textStyles;
     UT_GenericStringMap<ODe_Style_Style*> m_paragraphStyles;
 	UT_GenericStringMap<ODe_Style_Style*> m_graphicStyles;
diff -Nru abiword-2.8.2/plugins/opendocument/exp/xp/ODe_Style_Style.cpp abiword-2.8.4/plugins/opendocument/exp/xp/ODe_Style_Style.cpp
--- abiword-2.8.2/plugins/opendocument/exp/xp/ODe_Style_Style.cpp	2009-09-29 23:31:45.000000000 +0300
+++ abiword-2.8.4/plugins/opendocument/exp/xp/ODe_Style_Style.cpp	2010-04-15 00:50:16.000000000 +0300
@@ -32,6 +32,7 @@
 #include <pp_AttrProp.h>
 #include <pt_Types.h>
 #include <ut_locale.h>
+#include <fl_BlockLayout.h> // for fl_TabStop
 
 // External includes
 #include <ctype.h>
@@ -46,6 +47,7 @@
  * Constructor
  */
 ODe_Style_Style::ODe_Style_Style() :
+    m_defaultStyle(false),
     m_pSectionProps(NULL),
     m_pParagraphProps(NULL),
     m_pTextProps(NULL),
@@ -85,17 +87,8 @@
     UT_UTF8String escape;
     
     output += rSpacesOffset;
-    output += "<style:style";
-    
-    if (m_name.empty()) {
-        UT_ASSERT_HARMLESS(UT_SHOULD_NOT_HAPPEN);
-        return false;
-    }
-    escape = m_name;
-    output += " style:name=\"";
-    output += escape.escapeXML();
-    output += "\"";
-    
+    output += !m_defaultStyle ? "<style:style" : "<style:default-style";
+
     if (m_family.empty()) {
         UT_ASSERT_HARMLESS(UT_SHOULD_NOT_HAPPEN);
         return false;
@@ -103,20 +96,31 @@
     output += " style:family=\"";
     output += m_family;
     output += "\"";
-    
-    escape = m_parentStyleName;
-    escape.escapeXML();
-    ODe_writeAttribute(output, "style:parent-style-name", escape);
-    escape = m_nextStyleName;
-    escape.escapeXML();
-    ODe_writeAttribute(output, "style:next-style-name", escape);
-    escape = m_masterPageName;
-    escape.escapeXML();
-    ODe_writeAttribute(output, "style:master-page-name", escape);
-    escape = m_listStyleName;
-    escape.escapeXML();
-    ODe_writeAttribute(output, "style:list-style-name", escape);
-    
+
+    if (!m_defaultStyle) {
+        if (m_name.empty()) {
+            UT_ASSERT_HARMLESS(UT_SHOULD_NOT_HAPPEN);
+            return false;
+        }
+        escape = m_name;
+        output += " style:name=\"";
+        output += escape.escapeXML();
+        output += "\"";
+        
+        escape = m_parentStyleName;
+        escape.escapeXML();
+        ODe_writeAttribute(output, "style:parent-style-name", escape);
+        escape = m_nextStyleName;
+        escape.escapeXML();
+        ODe_writeAttribute(output, "style:next-style-name", escape);
+        escape = m_masterPageName;
+        escape.escapeXML();
+        ODe_writeAttribute(output, "style:master-page-name", escape);
+        escape = m_listStyleName;
+        escape.escapeXML();
+        ODe_writeAttribute(output, "style:list-style-name", escape);
+    }
+
     if (isEmpty()) {
         // This style has no props at all.
         output += "/>\n";
@@ -124,8 +128,7 @@
         return true;
     } else {
         output += ">\n";
-    }
-    
+    }    
     
     // Increase the offset for sub elements.
     subOffset = rSpacesOffset;
@@ -146,7 +149,8 @@
 #undef ODE_WRITE_STYLE_PROPS
     
     output += rSpacesOffset;
-    output += "</style:style>\n";
+    output += !m_defaultStyle ? "</style:style>" : "</style:default-style>";
+    output += "\n";
     
     ODe_writeUTF8String(pODT, output);
     return true;
@@ -284,6 +288,16 @@
     if (ok && pValue != NULL) {
         return true;
     }
+
+    ok = pAP->getProperty("default-tab-interval", pValue);
+    if (ok && pValue != NULL) {
+        return true;
+    }
+    
+    ok = pAP->getProperty("tabstops", pValue);
+    if (ok && pValue != NULL) {
+        return true;
+    }
     
     return false;
 }
@@ -477,7 +491,7 @@
     m_pTextProps->fetchAttributesFromAbiProps(*pAP);
     
     if (m_pParagraphProps == NULL) {
-        m_pParagraphProps = new ParagraphProps();
+        m_pParagraphProps = new ParagraphProps(m_defaultStyle);
     }
     m_pParagraphProps->fetchAttributesFromAbiProps(*pAP);
     
@@ -524,7 +538,7 @@
     m_pTextProps->fetchAttributesFromAbiProps(*pAP);
     
     if (m_pParagraphProps == NULL) {
-        m_pParagraphProps = new ParagraphProps();
+        m_pParagraphProps = new ParagraphProps(m_defaultStyle);
     }
     m_pParagraphProps->fetchAttributesFromAbiProps(*pAP);
     
@@ -598,7 +612,7 @@
  */
 void ODe_Style_Style::setBreakBefore(const gchar* pBreakBefore) {
     if (m_pParagraphProps == NULL) {
-        m_pParagraphProps = new ParagraphProps();
+        m_pParagraphProps = new ParagraphProps(m_defaultStyle);
     }
     m_pParagraphProps->m_breakBefore = pBreakBefore;
 }
@@ -827,6 +841,27 @@
 }
 
 
+/**
+ * 
+ */
+const UT_UTF8String& ODe_Style_Style::getDefaultTabInterval() {
+    if (m_pParagraphProps == NULL) {
+        m_pParagraphProps = new ParagraphProps(m_defaultStyle);
+    }
+    return m_pParagraphProps->m_defaultTabInterval;
+}
+
+/**
+ * 
+ */
+void ODe_Style_Style::setDefaultTabInterval(const UT_UTF8String& rDefaultTabInterval) {
+    if (m_pParagraphProps == NULL) {
+        m_pParagraphProps = new ParagraphProps(m_defaultStyle);
+    }
+    m_pParagraphProps->m_defaultTabInterval = rDefaultTabInterval;
+}
+
+
 /*******************************************************************************
  * SectionProps
  ******************************************************************************/
@@ -910,6 +945,23 @@
 
 
 /*******************************************************************************
+ * TabStop
+ ******************************************************************************/
+
+
+bool ODe_Style_Style::TabStop::operator==(
+                 const ODe_Style_Style::TabStop& rTabStop) const {
+
+    return
+        m_type           == rTabStop.m_type &&
+        m_char           == rTabStop.m_char &&
+        m_position       == rTabStop.m_position &&
+        m_leaderStyle    == rTabStop.m_leaderStyle &&
+        m_leaderText     == rTabStop.m_leaderText;
+}
+
+
+/*******************************************************************************
  * ParagraphProps
  ******************************************************************************/
 
@@ -931,7 +983,9 @@
              m_marginBottom.empty() &&
              m_keepWithNext.empty() &&
              m_breakBefore.empty() &&
-             m_writingMode.empty());
+             m_writingMode.empty() &&
+             m_defaultTabInterval.empty() &&
+             m_tabStops.size() == 0);
 }
 
 /**
@@ -1035,6 +1089,103 @@
             m_keepWithNext = "auto";
         }
     }
+
+    ok = rAP.getProperty("default-tab-interval", pValue);
+    if (ok && pValue != NULL) {
+        m_defaultTabInterval = pValue;
+    }
+    
+    // tab stops
+    ok = rAP.getProperty("tabstops", pValue);
+    if(!ok)
+        m_tabStops.clear();
+    else
+    {
+        // use a convenience function from fl_BlockLayout to parse the tabstops property
+        UT_GenericVector<fl_TabStop*> tabStops;
+        buildTabStops(pValue, tabStops);
+
+        // convert the tabstops to a format we can write out
+        for (UT_sint32 i = 0; i < tabStops.size(); i++)
+        {
+            fl_TabStop* pTabStop = tabStops[i];
+            UT_continue_if_fail(pTabStop);
+
+            TabStop tabStop;
+
+            // style:type
+            switch (pTabStop->getType())
+            {
+                case FL_TAB_LEFT:
+                    tabStop.m_type = "left";
+                    break;
+                case FL_TAB_CENTER:
+                    tabStop.m_type = "center";
+                    break;
+                case FL_TAB_RIGHT:
+                    tabStop.m_type = "right";
+                    break;
+                case FL_TAB_DECIMAL:
+                {
+                    UT_LocaleInfo locale(UT_LocaleInfo::system());
+                    UT_LocaleTransactor t(LC_NUMERIC, locale.toString().utf8_str());
+                    
+                    // AbiWord always uses the locale-defined decimal point as the
+                    // decimal tab character. See fp_Line::_calculateWidthOfRun()
+                    // for details.
+					lconv *loc = localeconv();
+                    UT_UCSChar *pDecimalStr = NULL;
+					UT_UCS4_cloneString_char(&pDecimalStr, loc->decimal_point);
+                    
+                    tabStop.m_type = "char";
+                    tabStop.m_char.appendUCS4(pDecimalStr);
+                    FREEP(pDecimalStr);
+                    break;
+                }
+                case FL_TAB_NONE: // huh, a tab that is no tab?!
+                case FL_TAB_BAR: // I have no clue what this is supposed to do, and ODF does not have any equivalent for it anyway.
+                default:
+                    // default to a left tab
+                    tabStop.m_type = "left";
+                    break;
+            }
+            
+            // style:position
+            UT_LocaleTransactor t(LC_NUMERIC, "C");
+            double pos = (double)pTabStop->getPosition() / UT_LAYOUT_RESOLUTION;
+            tabStop.m_position = UT_UTF8String_sprintf("%fin", pos);
+
+            // style:leader-style & style:leader-text
+            switch (pTabStop->getLeader())
+            {
+                case FL_LEADER_NONE:
+                    // no need to write out a style or text
+                    break;
+                case FL_LEADER_DOT:
+                    tabStop.m_leaderStyle = "dotted";
+                    tabStop.m_leaderText = ".";
+                    break;
+                case FL_LEADER_HYPHEN:
+                    tabStop.m_leaderStyle = "dash"; // OOo uses "solid" for this case, but dash seems more appropriate
+                    tabStop.m_leaderText = "-";
+                    break;
+                case FL_LEADER_UNDERLINE:
+                case FL_LEADER_THICKLINE: // we don't have this in the interface, but this looks like the best choice if it ever occurs
+                case FL_LEADER_EQUALSIGN: // we don't have this in the interface, but this looks like the best choice if it ever occurs
+                    tabStop.m_leaderStyle = "solid";
+                    tabStop.m_leaderText = "_";
+                    break;
+                default:
+                    // no need to write out a style or text
+                    break;
+            }
+            m_tabStops.push_back(tabStop);
+
+            DELETEP(pTabStop);
+        }
+        
+        tabStops.clear();
+    }
 }
 
 
@@ -1066,7 +1217,33 @@
     ODe_writeAttribute(rOutput, "fo:break-before", m_breakBefore);
     ODe_writeAttribute(rOutput, "style:writing-mode", m_writingMode);
 
-    rOutput += "/>\n";
+    if (m_defaultStyle) {
+        ODe_writeAttribute(rOutput, "style:tab-stop-distance", m_defaultTabInterval); 
+    }
+    
+    if (!m_tabStops.size())
+        rOutput += "/>\n";
+    else
+    {
+        rOutput += ">\n";
+
+        rOutput += UT_UTF8String_sprintf("%s  <style:tab-stops>\n", rSpacesOffset.utf8_str());
+        for (UT_uint32 i = 0; i < m_tabStops.size(); i++)
+        {
+            rOutput += UT_UTF8String_sprintf("%s    <style:tab-stop", rSpacesOffset.utf8_str());
+
+            ODe_writeAttribute(rOutput, "style:type", m_tabStops[i].m_type);
+            ODe_writeAttribute(rOutput, "style:char", m_tabStops[i].m_char);
+            ODe_writeAttribute(rOutput, "style:position", m_tabStops[i].m_position);
+            ODe_writeAttribute(rOutput, "style:leader-style", m_tabStops[i].m_leaderStyle);
+            ODe_writeAttribute(rOutput, "style:leader-text", m_tabStops[i].m_leaderText);
+            
+            rOutput += "/>\n";
+        }
+        rOutput += UT_UTF8String_sprintf("%s  </style:tab-stops>\n", rSpacesOffset.utf8_str());
+
+        rOutput += UT_UTF8String_sprintf("%s</style:paragraph-properties>\n", rSpacesOffset.utf8_str());
+    }
 }
 
 
@@ -1090,6 +1267,8 @@
     m_keepWithNext = rParagraphProps.m_keepWithNext;
     m_breakBefore = rParagraphProps.m_breakBefore;
     m_writingMode = rParagraphProps.m_writingMode;
+    m_defaultTabInterval = rParagraphProps.m_defaultTabInterval;
+    m_tabStops = rParagraphProps.m_tabStops;
     
     return *this;
 }
@@ -1115,7 +1294,9 @@
         m_marginBottom    == rParagraphProps.m_marginBottom &&
         m_keepWithNext    == rParagraphProps.m_keepWithNext &&
         m_breakBefore     == rParagraphProps.m_breakBefore &&
-        m_writingMode     == rParagraphProps.m_writingMode;
+        m_writingMode     == rParagraphProps.m_writingMode &&
+        m_defaultTabInterval == rParagraphProps.m_defaultTabInterval &&
+        m_tabStops        == rParagraphProps.m_tabStops;
 }
 
 
diff -Nru abiword-2.8.2/plugins/opendocument/exp/xp/ODe_Style_Style.h abiword-2.8.4/plugins/opendocument/exp/xp/ODe_Style_Style.h
--- abiword-2.8.2/plugins/opendocument/exp/xp/ODe_Style_Style.h	2009-09-29 23:31:45.000000000 +0300
+++ abiword-2.8.4/plugins/opendocument/exp/xp/ODe_Style_Style.h	2010-04-15 00:50:16.000000000 +0300
@@ -23,6 +23,7 @@
 #ifndef _ODE_STYLE_STYLE_H_
 #define _ODE_STYLE_STYLE_H_
 
+#include <vector>
 
 // AbiWord includes
 #include <ut_string_class.h>
@@ -80,6 +81,12 @@
     
     // Defines the style from attributes and properties of an AbiWord <frame>.
     void fetchAttributesFromAbiFrame(const PP_AttrProp& rAP);
+
+    void makeDefaultStyle() {
+        m_defaultStyle = true;
+        if (m_pParagraphProps)
+            m_pParagraphProps->m_defaultStyle = m_defaultStyle;
+    }
     
     void setStyleName(const UT_UTF8String& rStyleName) {
         m_name = rStyleName;
@@ -105,7 +112,7 @@
         m_listStyleName = rListStyleName;
     }
     
-    const UT_UTF8String& getFontName();
+    const UT_UTF8String& getFontName();    
 
     void setBreakBefore(const gchar* pBreakBefore);    
     void setColumnWidth(const gchar* pColumnWidth);
@@ -121,11 +128,15 @@
     void setHorizontalPos(const UT_UTF8String& rHorizontalPos);
     void setVerticalPos(const UT_UTF8String& rVerticalPos);
     void setVerticalRel(const UT_UTF8String& rVerticalRel);
+
+    const UT_UTF8String& getDefaultTabInterval();
+    void setDefaultTabInterval(const UT_UTF8String& rDefaultTabInterval);
     
 private:
     
     ////
     // <style:style> attributes
+    bool m_defaultStyle;             // if we are a <style:style>, or a <style:default-style>
     UT_UTF8String m_name;            // text:style-name
     UT_UTF8String m_family;          // style:family
     UT_UTF8String m_parentStyleName; // style:parent-style-name
@@ -153,16 +164,38 @@
 
 
     ////
+    // <style:tab-stops> members
+    class TabStop {
+        public:
+        bool operator==(const TabStop& rTabStop) const;
+
+        UT_UTF8String m_type;            // style:type
+        UT_UTF8String m_char;            // style:char
+        UT_UTF8String m_position;        // style:position
+        UT_UTF8String m_leaderStyle;     // style:leader-style
+        UT_UTF8String m_leaderText;      // style:leader-text
+    };
+    
+    ////
     // <style:paragraph-properties> attributes
     class ParagraphProps {
         public:
+        ParagraphProps() {
+            // Rule of thumb: never use this constructor, it only exists for
+            // ODe_Style_Style::operator=(const ODe_Style_Style& rStyle)
+        }
+        ParagraphProps(bool defaultStyle)
+            : m_defaultStyle(defaultStyle)
+        { }
         
         bool isEmpty() const;
         void fetchAttributesFromAbiProps(const PP_AttrProp& rAP);
         void write(UT_UTF8String& rOutput, const UT_UTF8String& rSpacesOffset) const ;
         ParagraphProps& operator=(const ParagraphProps& rParagraphProps);
         bool operator==(const ParagraphProps& rParagraphProps) const;
-        
+
+        bool m_defaultStyle;             // if we are a <style:style>, or a <style:default-style>
+            
         UT_UTF8String m_textAlign;       // fo:text-align
         UT_UTF8String m_textIndent;      // fo:text-indent
         UT_UTF8String m_lineHeight;      // fo:line-height    
@@ -177,6 +210,9 @@
         UT_UTF8String m_keepWithNext;    // fo:keep-with-next
         UT_UTF8String m_breakBefore;     // fo:break-before
         UT_UTF8String m_writingMode;     // style:writing-mode
+
+        UT_UTF8String m_defaultTabInterval; // style:tab-stop-distance
+        std::vector<TabStop> m_tabStops; // style:tab-stops
     } *m_pParagraphProps;
     
     
diff -Nru abiword-2.8.2/plugins/opendocument/exp/xp/ODe_Text_Listener.cpp abiword-2.8.4/plugins/opendocument/exp/xp/ODe_Text_Listener.cpp
--- abiword-2.8.2/plugins/opendocument/exp/xp/ODe_Text_Listener.cpp	2009-12-13 22:24:09.000000000 +0200
+++ abiword-2.8.4/plugins/opendocument/exp/xp/ODe_Text_Listener.cpp	2010-04-15 00:50:16.000000000 +0300
@@ -1257,7 +1257,15 @@
         
         m_rAutomatiStyles.storeParagraphStyle(pStyle);
         styleName = pStyle->getName();
-        
+
+        // There is a special case for the default-tab-interval property, as in
+        // AbiWord that is a paragraph property, but in ODF it belongs in the
+        // default style for the "paragraph" family.
+        ok = pAP->getProperty("default-tab-interval", pValue);
+        if (ok && pValue != NULL) {
+            UT_DEBUGMSG(("Got a default tab interval:  !!!!!!!!!!!!! %s\n", pValue));
+        }
+            
     } else {
         ok = pAP->getAttribute("style", pValue);
         if (ok) {
diff -Nru abiword-2.8.2/plugins/opendocument/imp/xp/ie_imp_OpenDocument.cpp abiword-2.8.4/plugins/opendocument/imp/xp/ie_imp_OpenDocument.cpp
--- abiword-2.8.2/plugins/opendocument/imp/xp/ie_imp_OpenDocument.cpp	2009-06-18 20:59:42.000000000 +0300
+++ abiword-2.8.4/plugins/opendocument/imp/xp/ie_imp_OpenDocument.cpp	2010-04-15 00:50:16.000000000 +0300
@@ -31,6 +31,11 @@
 
 // AbiWord includes
 #include <ut_types.h>
+#include "xap_App.h"
+#include "xap_Frame.h"
+#include "xap_DialogFactory.h"
+#include "xap_Dlg_Password.h"
+#include "ap_Dialog_Id.h"
 
 // External includes
 #include <glib-object.h>
@@ -43,7 +48,9 @@
  * Constructor
  */
 IE_Imp_OpenDocument::IE_Imp_OpenDocument (PD_Document * pDocument)
-  : IE_Imp (pDocument), m_pGsfInfile (0)
+  : IE_Imp (pDocument),
+  m_pGsfInfile (0),
+  m_sPassword ("")
 {
 }
 
@@ -127,27 +134,74 @@
 
 
 /**
+ * Asks the user for a password.
+ *
+ * Taken from ie_imp_MsWord97.cpp
+ */
+
+#define GetPassword() _getPassword ( XAP_App::getApp()->getLastFocussedFrame() )
+
+static UT_UTF8String _getPassword (XAP_Frame * pFrame)
+{
+  UT_UTF8String password ( "" );
+
+  if ( pFrame )
+    {
+      pFrame->raise ();
+
+      XAP_DialogFactory * pDialogFactory
+		  = (XAP_DialogFactory *)(pFrame->getDialogFactory());
+
+      XAP_Dialog_Password * pDlg = static_cast<XAP_Dialog_Password*>(pDialogFactory->requestDialog(XAP_DIALOG_ID_PASSWORD));
+      UT_return_val_if_fail(pDlg, password);
+
+      pDlg->runModal (pFrame);
+
+      XAP_Dialog_Password::tAnswer ans = pDlg->getAnswer();
+      bool bOK = (ans == XAP_Dialog_Password::a_OK);
+
+      if (bOK)
+		  password = pDlg->getPassword ();
+
+      pDialogFactory->releaseDialog(pDlg);
+    }
+
+  return password;
+}
+
+
+/**
  * Handle the manifest file.
  */
 UT_Error IE_Imp_OpenDocument::_handleManifestStream() {
-    GsfInput* pMetaInf = gsf_infile_child_by_name(m_pGsfInfile, "META-INF");
+    // clear the cryptography state
+    m_cryptoInfo.clear();
+    m_sPassword = "";
+
+	GsfInput* pMetaInf = gsf_infile_child_by_name(m_pGsfInfile, "META-INF");
     ODi_ManifestStream_ListenerState manifestListener(getDoc(),
-                                          *(m_pStreamListener->getElementStack()));
-    UT_Error error;
-    
-    m_pStreamListener->setState(&manifestListener, false);
+                                          *(m_pStreamListener->getElementStack()),
+                                           m_cryptoInfo);
+
+	m_pStreamListener->setState(&manifestListener, false);
 
-    error = _handleStream (GSF_INFILE(pMetaInf), "manifest.xml", *m_pStreamListener);
+    UT_Error error = _handleStream (GSF_INFILE(pMetaInf), "manifest.xml", *m_pStreamListener);
 
     g_object_unref (G_OBJECT (pMetaInf));
     
     if (error != UT_OK) {
         return error;
-    } else if (manifestListener.isDocumentEncripted()) {
-        return UT_IE_UNSUPTYPE;
-    } else {
-        return UT_OK;
     }
+
+    if (m_cryptoInfo.size() > 0) {
+        // there is at least one entry in the manifest that is encrypted, so
+        // ask the user for a password
+        m_sPassword = GetPassword();
+        if (m_sPassword.size() == 0)
+            return UT_IE_PROTECTED;
+    }
+	
+    return UT_OK;
 }
 
 
@@ -175,7 +229,8 @@
     UT_Error err = UT_OK;
 
     if ((strcmp("application/vnd.oasis.opendocument.text", mimetype.utf8_str()) != 0) &&
-        (strcmp("application/vnd.oasis.opendocument.text-template", mimetype.utf8_str()) != 0))
+        (strcmp("application/vnd.oasis.opendocument.text-template", mimetype.utf8_str()) != 0) &&
+        (strcmp("application/vnd.oasis.opendocument.text-web", mimetype.utf8_str()) != 0))
     {
         UT_DEBUGMSG(("*** Unknown mimetype '%s'\n", mimetype.utf8_str()));
         err = UT_IE_BOGUSDOCUMENT;
@@ -283,9 +338,36 @@
 UT_Error IE_Imp_OpenDocument::_handleStream ( GsfInfile* pGsfInfile,
                    const char * pStream, UT_XML::Listener& rListener)
 {
-  UT_XML reader;
-  reader.setListener ( &rListener );
-  return _parseStream (pGsfInfile, pStream, reader);
+    GsfInput* pInput = gsf_infile_child_by_name(pGsfInfile, pStream);
+    UT_return_val_if_fail(pInput, UT_ERROR);
+
+	// check if the stream is encrypted, and if so, decrypt it
+    std::map<std::string, ODc_CryptoInfo>::iterator pos = m_cryptoInfo.find(pStream);
+    if (pos != m_cryptoInfo.end())
+	{
+        UT_DEBUGMSG(("Running decrypt on stream %s\n", pStream));
+		
+        GsfInput* pDecryptedInput = NULL;
+        UT_Error err = ODc_Crypto::decrypt(pInput, (*pos).second, m_sPassword.utf8_str(), &pDecryptedInput);
+        g_object_unref (G_OBJECT (pInput));
+		
+        if (err != UT_OK) {
+            UT_DEBUGMSG(("Decryption failed!\n"));
+            return err;
+        }
+		
+        UT_DEBUGMSG(("Stream %s decrypted\n", pStream));
+        pInput = pDecryptedInput;
+	}
+
+	// parse the XML stream
+    UT_XML reader;
+    reader.setListener ( &rListener );
+    UT_Error err = _parseStream (pInput, reader);
+
+    g_object_unref (G_OBJECT (pInput));
+	
+    return err;
 }
 
 
@@ -293,20 +375,14 @@
  * Static utility method to read a file/stream embedded inside of the
  * zipfile into an xml parser
  */
-UT_Error IE_Imp_OpenDocument::_parseStream ( GsfInfile* pGsfInfile, 
-                  const char* pStream,
-                  UT_XML & parser )
+UT_Error IE_Imp_OpenDocument::_parseStream (GsfInput* pInput, UT_XML & parser)
 {
     guint8 const *data = NULL;
     size_t len = 0;
     UT_Error ret = UT_OK;
 
-    GsfInput* pInput = gsf_infile_child_by_name(pGsfInfile, pStream);
-
-    if (!pInput) {
-        return UT_ERROR;
-    }
-
+	UT_return_val_if_fail(pInput, UT_ERROR);
+	
     if (gsf_input_size (pInput) > 0) {
         while ((len = gsf_input_remaining (pInput)) > 0) {
             // FIXME: we want to pass the stream in chunks, but libXML2 finds this disagreeable.
@@ -324,7 +400,6 @@
         }
     }
   
-    g_object_unref (G_OBJECT (pInput));
     return ret;
 }
 
diff -Nru abiword-2.8.2/plugins/opendocument/imp/xp/ie_imp_OpenDocument.h abiword-2.8.4/plugins/opendocument/imp/xp/ie_imp_OpenDocument.h
--- abiword-2.8.2/plugins/opendocument/imp/xp/ie_imp_OpenDocument.h	2008-05-15 16:17:04.000000000 +0300
+++ abiword-2.8.4/plugins/opendocument/imp/xp/ie_imp_OpenDocument.h	2010-04-15 00:50:16.000000000 +0300
@@ -25,8 +25,11 @@
 #ifndef _IE_IMP_OPENDOCUMENT_H_
 #define _IE_IMP_OPENDOCUMENT_H_
 
+#include <map>
+#include <string>
 
 // Internal includes
+#include "../../common/xp/ODc_Crypto.h"
 #include "ODi_Office_Styles.h"
 #include "ODi_Abi_Data.h"
 
@@ -63,15 +66,15 @@
     UT_Error _handleContentStream ();
     void _setDocumentProperties();
 
-    static UT_Error _handleStream (GsfInfile* pGsfInfile,
+    UT_Error _handleStream(GsfInfile* pGsfInfile,
                    const char* pStream, UT_XML::Listener& rListener);
 
-    static UT_Error _parseStream ( GsfInfile* pGsfInfile, 
-                  const char* pStream,
-                  UT_XML & parser );
+    UT_Error _parseStream(GsfInput* pInput, UT_XML & parser);
 
     GsfInfile* m_pGsfInfile;
-    
+
+    UT_UTF8String m_sPassword;
+    std::map<std::string, ODc_CryptoInfo> m_cryptoInfo;
     ODi_StreamListener* m_pStreamListener;
     ODi_Office_Styles m_styles;
     ODi_Abi_Data* m_pAbiData;
diff -Nru abiword-2.8.2/plugins/opendocument/imp/xp/ie_imp_OpenDocument_Sniffer.cpp abiword-2.8.4/plugins/opendocument/imp/xp/ie_imp_OpenDocument_Sniffer.cpp
--- abiword-2.8.2/plugins/opendocument/imp/xp/ie_imp_OpenDocument_Sniffer.cpp	2008-01-04 14:47:33.000000000 +0200
+++ abiword-2.8.4/plugins/opendocument/imp/xp/ie_imp_OpenDocument_Sniffer.cpp	2010-04-15 00:50:16.000000000 +0300
@@ -66,6 +66,7 @@
 static IE_MimeConfidence IE_Imp_OpenDocument_Sniffer__MimeConfidence[] = {
 	{ IE_MIME_MATCH_FULL, 	"application/vnd.oasis.opendocument.text", 	UT_CONFIDENCE_GOOD 	},
 	{ IE_MIME_MATCH_FULL, 	"application/vnd.oasis.opendocument.text-template", UT_CONFIDENCE_GOOD 	},
+	{ IE_MIME_MATCH_FULL, 	"application/vnd.oasis.opendocument.text-web", UT_CONFIDENCE_GOOD 	},
 	{ IE_MIME_MATCH_BOGUS, 	"", 										UT_CONFIDENCE_ZILCH }
 };
 
@@ -100,7 +101,8 @@
 					}
 
 					if ((strcmp("application/vnd.oasis.opendocument.text", mimetype.utf8_str()) == 0) ||
-						(strcmp("application/vnd.oasis.opendocument.text-template", mimetype.utf8_str()) == 0))
+						(strcmp("application/vnd.oasis.opendocument.text-template", mimetype.utf8_str()) == 0) ||
+						(strcmp("application/vnd.oasis.opendocument.text-web", mimetype.utf8_str()) == 0))
 						confidence = UT_CONFIDENCE_PERFECT;
 
 					g_object_unref (G_OBJECT (pInput));
diff -Nru abiword-2.8.2/plugins/opendocument/imp/xp/Makefile.am abiword-2.8.4/plugins/opendocument/imp/xp/Makefile.am
--- abiword-2.8.2/plugins/opendocument/imp/xp/Makefile.am	2008-05-13 18:22:14.000000000 +0300
+++ abiword-2.8.4/plugins/opendocument/imp/xp/Makefile.am	2010-04-15 00:50:16.000000000 +0300
@@ -2,6 +2,7 @@
 noinst_LTLIBRARIES = libxp.la
 
 AM_CPPFLAGS = \
+	-I$(srcdir)/../../common/xp \
 	$(OPENDOCUMENT_CFLAGS)
 
 libxp_la_SOURCES = \
diff -Nru abiword-2.8.2/plugins/opendocument/imp/xp/Makefile.in abiword-2.8.4/plugins/opendocument/imp/xp/Makefile.in
--- abiword-2.8.2/plugins/opendocument/imp/xp/Makefile.in	2010-02-12 16:12:43.000000000 +0200
+++ abiword-2.8.4/plugins/opendocument/imp/xp/Makefile.in	2010-04-15 00:51:14.000000000 +0300
@@ -373,6 +373,7 @@
 top_srcdir = @top_srcdir@
 noinst_LTLIBRARIES = libxp.la
 AM_CPPFLAGS = \
+	-I$(srcdir)/../../common/xp \
 	$(OPENDOCUMENT_CFLAGS)
 
 libxp_la_SOURCES = \
diff -Nru abiword-2.8.2/plugins/opendocument/imp/xp/ODi_ManifestStream_ListenerState.cpp abiword-2.8.4/plugins/opendocument/imp/xp/ODi_ManifestStream_ListenerState.cpp
--- abiword-2.8.2/plugins/opendocument/imp/xp/ODi_ManifestStream_ListenerState.cpp	2008-04-20 17:44:51.000000000 +0300
+++ abiword-2.8.4/plugins/opendocument/imp/xp/ODi_ManifestStream_ListenerState.cpp	2010-04-15 00:50:16.000000000 +0300
@@ -34,24 +34,69 @@
  */
 ODi_ManifestStream_ListenerState::ODi_ManifestStream_ListenerState(
                                                 PD_Document* pDocument,
-                                                ODi_ElementStack& rElementStack)
+                                                ODi_ElementStack& rElementStack,
+                                                std::map<std::string, ODc_CryptoInfo>& cryptoInfo)
         : ODi_ListenerState("ManifestStream", rElementStack),
           m_pDocument(pDocument),
-          m_isDocumentEncripted(false)
+          m_sFullPath(""),
+          m_iSize(-1),
+          m_pCryptoInfo(NULL),
+          m_cryptoInfo(cryptoInfo)
 {
 }
 
+/**
+ * Destructor
+ */
+ODi_ManifestStream_ListenerState::~ODi_ManifestStream_ListenerState()
+{
+    DELETEP(m_pCryptoInfo);
+}
 
 /**
  * Called to signal that the start tag of an element has been reached.
  */
 void ODi_ManifestStream_ListenerState::startElement (const gchar* pName,
-													 const gchar** /*ppAtts*/,
+													 const gchar** ppAtts,
 													 ODi_ListenerStateAction& /*rAction*/) 
 {
+    const char* pVal;
+
+    if (!strcmp(pName, "manifest:file-entry")) {
+        pVal = UT_getAttribute ("manifest:full-path", ppAtts);
+		m_sFullPath = pVal ? pVal : "";
+
+        pVal = UT_getAttribute ("manifest:size", ppAtts);
+		m_iSize = pVal ? atol(pVal) : -1;
+	}
+	
     if (!strcmp(pName, "manifest:encryption-data")) {
-        m_isDocumentEncripted = true;
+        DELETEP(m_pCryptoInfo);
+        m_pCryptoInfo = new ODc_CryptoInfo();
     }
+
+    if (!strcmp(pName, "manifest:algorithm")) {
+        UT_return_if_fail(m_pCryptoInfo);
+
+        pVal = UT_getAttribute ("manifest:algorithm-name", ppAtts);
+        m_pCryptoInfo->m_algorithm = pVal ? pVal : "";
+
+        pVal = UT_getAttribute ("manifest:initialisation-vector", ppAtts);
+        m_pCryptoInfo->m_initVector = pVal ? pVal : "";
+	}
+
+	if (!strcmp(pName, "manifest:key-derivation")) {
+        UT_return_if_fail(m_pCryptoInfo);
+
+        pVal = UT_getAttribute ("manifest:key-derivation-name", ppAtts);
+        m_pCryptoInfo->m_keyType = pVal ? pVal : "";
+
+        pVal = UT_getAttribute ("manifest:iteration-count", ppAtts);
+        m_pCryptoInfo->m_iterCount = pVal ? atol(pVal) : -1;
+
+        pVal = UT_getAttribute ("manifest:salt", ppAtts);
+        m_pCryptoInfo->m_salt = pVal ? pVal : "";
+	}
 }
 
 
@@ -61,7 +106,16 @@
 void ODi_ManifestStream_ListenerState::endElement (const gchar* pName,
                                               ODi_ListenerStateAction& rAction)
 {
-    if (!strcmp(pName, "manifest:manifest")) {
+    if (!strcmp(pName, "manifest:encryption-data")) {
+        UT_return_if_fail(m_pCryptoInfo);
+		
+        // store the encryption information
+		m_pCryptoInfo->m_decryptedSize = m_iSize;
+        m_cryptoInfo[m_sFullPath] = *m_pCryptoInfo;
+        DELETEP(m_pCryptoInfo);
+    }
+
+	if (!strcmp(pName, "manifest:manifest")) {
         rAction.popState();
     }
 }
diff -Nru abiword-2.8.2/plugins/opendocument/imp/xp/ODi_ManifestStream_ListenerState.h abiword-2.8.4/plugins/opendocument/imp/xp/ODi_ManifestStream_ListenerState.h
--- abiword-2.8.2/plugins/opendocument/imp/xp/ODi_ManifestStream_ListenerState.h	2008-04-20 17:44:51.000000000 +0300
+++ abiword-2.8.4/plugins/opendocument/imp/xp/ODi_ManifestStream_ListenerState.h	2010-04-15 00:50:16.000000000 +0300
@@ -22,7 +22,11 @@
 #ifndef ODI_MANIFESTSTREAM_LISTENERSTATE_H_
 #define ODI_MANIFESTSTREAM_LISTENERSTATE_H_
 
+#include <map>
+#include <string>
+
 // Internal includes
+#include "../../common/xp/ODc_Crypto.h"
 #include "ODi_ListenerState.h"
 
 // AbiWord classes
@@ -36,9 +40,10 @@
 public:
     
     ODi_ManifestStream_ListenerState(PD_Document* pDocument,
-                                ODi_ElementStack& rElementStack);
+                                ODi_ElementStack& rElementStack,
+                                std::map<std::string, ODc_CryptoInfo>& cryptoInfo);
                                 
-    virtual ~ODi_ManifestStream_ListenerState() {}
+    virtual ~ODi_ManifestStream_ListenerState();
     
     void startElement (const gchar* pName, const gchar** ppAtts,
                                ODi_ListenerStateAction& rAction);
@@ -46,14 +51,15 @@
     void endElement (const gchar* pName, ODi_ListenerStateAction& rAction);
                              
     void charData (const gchar* /*pBuffer*/, int /*length*/) {}
-    
-    bool isDocumentEncripted() const {return m_isDocumentEncripted;};
 
 private:
 
     PD_Document* m_pDocument;
     
-    bool m_isDocumentEncripted;
+    std::string m_sFullPath;
+	UT_sint64 m_iSize;
+    ODc_CryptoInfo* m_pCryptoInfo;
+	std::map<std::string, ODc_CryptoInfo>& m_cryptoInfo;
 };
 
 #endif /*ODI_MANIFESTSTREAM_LISTENERSTATE_H_*/
diff -Nru abiword-2.8.2/plugins/opendocument/imp/xp/ODi_StylesStream_ListenerState.cpp abiword-2.8.4/plugins/opendocument/imp/xp/ODi_StylesStream_ListenerState.cpp
--- abiword-2.8.2/plugins/opendocument/imp/xp/ODi_StylesStream_ListenerState.cpp	2010-02-06 21:48:04.000000000 +0200
+++ abiword-2.8.4/plugins/opendocument/imp/xp/ODi_StylesStream_ListenerState.cpp	2010-04-15 00:50:16.000000000 +0300
@@ -149,7 +149,7 @@
       ODi_ListenerState* pStyle=NULL;
       UT_sint32 icnt = 0;
       for(icnt=0; ppAtts[icnt] != NULL;icnt++);
-      const gchar ** ppExtra = new const gchar*[icnt+2];
+      const gchar ** ppExtra = new const gchar*[icnt+3];
       UT_sint32 i = 0;
       UT_UTF8String sLName="BaseHeading";
       for(i=0; i<icnt;i++)
diff -Nru abiword-2.8.2/plugins/opendocument/imp/xp/ODi_Style_Style.cpp abiword-2.8.4/plugins/opendocument/imp/xp/ODi_Style_Style.cpp
--- abiword-2.8.2/plugins/opendocument/imp/xp/ODi_Style_Style.cpp	2009-09-20 06:02:27.000000000 +0300
+++ abiword-2.8.4/plugins/opendocument/imp/xp/ODi_Style_Style.cpp	2010-04-15 00:50:16.000000000 +0300
@@ -29,6 +29,7 @@
 #include "ODi_FontFaceDecls.h"
 #include "ODi_ListenerStateAction.h"
 #include "ODi_ElementStack.h"
+#include "ODi_StartTag.h"
 #include "ODi_Abi_Data.h"
 
 // AbiWord includes
@@ -77,6 +78,22 @@
     } else if (!strcmp("style:paragraph-properties", pName)) {
         
         _parse_style_paragraphProperties(ppAtts);
+
+    } else if (!strcmp("style:tab-stop", pName)) {
+
+        if (m_rElementStack.getStackSize() >= 2 &&
+            !strcmp(m_rElementStack.getStartTag(1)->getName(), "style:paragraph-properties") &&
+            !strcmp(m_rElementStack.getStartTag(0)->getName(), "style:tab-stops")) {
+
+            UT_DEBUGMSG(("TAB STOPS IN PARAGRAPH!!!!!!!!!!!!1\n"));
+            _parse_style_tabStopProperties(ppAtts);
+            
+        } else {
+
+            // we only know tabstops inside paragraphs
+            UT_ASSERT_HARMLESS(UT_SHOULD_NOT_HAPPEN);
+            
+        }
         
     } else if (!strcmp("style:text-properties", pName)) {
         
@@ -335,6 +352,129 @@
             m_direction = "ltr";
         }
     }
+
+    // style:tab-stop-distance
+    pVal = UT_getAttribute("style:tab-stop-distance", ppProps);
+       if (pVal) {
+        m_defaultTabInterval = pVal;
+    }
+}
+
+
+
+
+/**
+ *  <style:tab-stop />
+ */
+void ODi_Style_Style::_parse_style_tabStopProperties(const gchar** ppProps) {
+    
+    const gchar* pVal = NULL;
+    UT_UTF8String type;
+    UT_UTF8String position;
+    UT_UTF8String leaderStyle;
+    UT_UTF8String leaderText;
+    
+    pVal = UT_getAttribute("style:type", ppProps);
+    if (pVal) {
+        type = pVal;
+    }
+
+    pVal = UT_getAttribute("style:position", ppProps);
+    if (pVal) {
+        position = pVal;
+    }
+
+    pVal = UT_getAttribute("style:leader-style", ppProps);
+    if (pVal) {
+        leaderStyle = pVal;
+    }
+
+    pVal = UT_getAttribute("style:leader-text", ppProps);
+    if (pVal) {
+        leaderText = pVal;
+    }
+
+    pVal = UT_getAttribute("style:char", ppProps);
+    if (pVal) {
+        // We ignore the "style:char" attribute if it exists, as abiword has no
+        // equivalent: it will always use the locale-defined decimal point as the
+        // decimal tab character. See fp_Line::_calculateWidthOfRun() for details.
+    }
+
+    // convert the tab information into an AbiWord property value
+    
+    UT_return_if_fail(!position.empty()); // a tab position is required (at least for AbiWord)
+
+    if (!m_tabStops.empty())
+        m_tabStops += ",";
+
+    // tab position
+    m_tabStops += position;
+    m_tabStops += "/";
+
+    // tab type
+    if (type == "left") {
+        m_tabStops += "L";
+    } else if (type == "center") {
+        m_tabStops += "C";
+    } else if (type == "right") {
+        m_tabStops += "R";
+    } else if (type == "char") {
+        m_tabStops += "D";
+    } else {
+        m_tabStops += "L";
+    }
+
+    // tab leader style: AbiWord's 4 tab styles map not to ODF's leader-styles but 
+    // to leader-text's, with style 1 mapping to character ".", 2 to "-" and 3 to "_".
+    // AbiWord tab style 0 means no leader style. ODF's leader-styles denoting a
+    // line style are not supported.
+    //
+    // NOTE: in ODF, leader text (if present) *always* has a higher priority than 
+    // leader styles, even if the text character is not supported.
+    if (!leaderText.empty()) {
+        UT_UCS4String leaderTextUCS4 = leaderText.ucs4_str();
+        UT_UCS4Char ucs4char = leaderTextUCS4[0];
+
+        switch (ucs4char) {
+            case '.':
+                m_tabStops += "1";
+                break;
+            case '-':
+                m_tabStops += "2";
+                break;
+            case '_':
+                m_tabStops += "3";
+                break;
+            default:
+                m_tabStops += "0";
+                break;
+        }
+    } else if (!leaderStyle.empty()) {
+        
+        // AbiWord does not really support leader-styles, so do a best effort conversion.
+        // Note: leader-styles describe the *underlining* line style. This means that we
+        //       won't map "dash" for example to AbiWord's tab style "2" (dashed), as that
+        //       does not represent underlining.
+
+        if (leaderStyle == "none") {
+                    m_tabStops += "0";
+        } else if (leaderStyle == "solid") {
+                    m_tabStops += "3";
+        } else if (leaderStyle == "dotted") {
+               m_tabStops += "1";
+        } else if (leaderStyle == "dash" || leaderStyle == "long-dash" ||
+                   leaderStyle == "dot-dash" || leaderStyle == "dot-dot-dash" ||
+                   leaderStyle == "wave") {
+            // 
+               m_tabStops += "3";
+        } else {
+             m_tabStops += "0";
+        }
+    } else {
+        // fall back to style "none"
+        m_tabStops += "0";
+    }
 }
 
 
@@ -845,6 +985,8 @@
     APPEND_STYLE("keep-with-next: ", m_keepWithNext);
     APPEND_STYLE("text-indent: ", m_textIndent);
     APPEND_STYLE("dom-dir: ", m_direction);
+    APPEND_STYLE("default-tab-interval: ", m_defaultTabInterval);
+    APPEND_STYLE("tabstops: ", m_tabStops);
     
     // <style:text-properties />
     APPEND_STYLE("color: ", m_color);
diff -Nru abiword-2.8.2/plugins/opendocument/imp/xp/ODi_Style_Style.h abiword-2.8.4/plugins/opendocument/imp/xp/ODi_Style_Style.h
--- abiword-2.8.2/plugins/opendocument/imp/xp/ODi_Style_Style.h	2009-09-29 16:18:24.000000000 +0300
+++ abiword-2.8.4/plugins/opendocument/imp/xp/ODi_Style_Style.h	2010-04-15 00:50:16.000000000 +0300
@@ -181,7 +181,9 @@
                !m_TableMarginRight.empty() ||
                !m_TableWidth.empty() ||
                !m_TableRelWidth.empty() ||
-               !m_rowHeight.empty();
+               !m_rowHeight.empty() ||
+
+               !m_tabStops.empty();
     }
     
     bool isAutomatic() const {return m_bAutomatic;}
@@ -238,7 +240,10 @@
     
     // <style:paragraph-properties />
     void _parse_style_paragraphProperties(const gchar** ppProps);
-    
+
+    // <style:tab-stop />
+    void _parse_style_tabStopProperties(const gchar** ppProps);
+        
     // <style:text-properties />
     void _parse_style_textProperties(const gchar** ppProps);
     
@@ -361,6 +366,8 @@
     UT_UTF8String m_keepWithNext;
     UT_UTF8String m_textIndent; // fo:text-indent
     UT_UTF8String m_direction; // style:writing-mode
+    UT_UTF8String m_defaultTabInterval; // style:tab-stop-distance
+    UT_UTF8String m_tabStops; // style:tab-stops
     
     ////
     // <style:text-properties />
diff -Nru abiword-2.8.2/plugins/opendocument/plugin.m4 abiword-2.8.4/plugins/opendocument/plugin.m4
--- abiword-2.8.2/plugins/opendocument/plugin.m4	2008-05-19 17:06:19.000000000 +0300
+++ abiword-2.8.4/plugins/opendocument/plugin.m4	2010-04-15 00:50:16.000000000 +0300
@@ -21,7 +21,7 @@
 test "$enable_opendocument" == "auto" && PLUGINS="$PLUGINS opendocument"
 
 OPENDOCUMENT_CFLAGS="$OPENDOCUMENT_CFLAGS "'${PLUGIN_CFLAGS}'
-OPENDOCUMENT_LIBS="$OPENDOCUMENT_LIBS "'${PLUGIN_LIBS}'
+OPENDOCUMENT_LIBS="$OPENDOCUMENT_LIBS "'${PLUGIN_LIBS} -lz'
 
 if test "$enable_opendocument_builtin" == "yes"; then
 	OPENDOCUMENT_CFLAGS="$OPENDOCUMENT_CFLAGS -DABI_PLUGIN_BUILTIN"
diff -Nru abiword-2.8.2/plugins/openxml/common/xp/OXML_Element_Text.cpp abiword-2.8.4/plugins/openxml/common/xp/OXML_Element_Text.cpp
--- abiword-2.8.2/plugins/openxml/common/xp/OXML_Element_Text.cpp	2009-07-26 09:06:53.000000000 +0300
+++ abiword-2.8.4/plugins/openxml/common/xp/OXML_Element_Text.cpp	2010-04-15 00:50:16.000000000 +0300
@@ -82,7 +82,10 @@
 	if(err != UT_OK)
 		return err;
 
-	err = exporter->writeText(TARGET, getText());
+	const UT_UCS4Char * text = getText_UCS4String();
+	if(text)
+		err = exporter->writeText(TARGET, text);
+
 	if(err != UT_OK)
 		return err;
 	
diff -Nru abiword-2.8.2/plugins/openxml/exp/xp/ie_exp_OpenXML.cpp abiword-2.8.4/plugins/openxml/exp/xp/ie_exp_OpenXML.cpp
--- abiword-2.8.2/plugins/openxml/exp/xp/ie_exp_OpenXML.cpp	2009-07-30 03:16:30.000000000 +0300
+++ abiword-2.8.4/plugins/openxml/exp/xp/ie_exp_OpenXML.cpp	2010-04-15 00:50:16.000000000 +0300
@@ -258,19 +258,36 @@
 /**
  * Writes the actual content of OXML_Element_Text object
  */
-UT_Error IE_Exp_OpenXML::writeText(int target, const char* text)
+UT_Error IE_Exp_OpenXML::writeText(int target, const UT_UCS4Char* text)
 {
-	UT_UTF8String sEscText = "";
+	// This shouldn't happen, but if it does just return UT_OK
+	// to prevent export errors
+	UT_return_val_if_fail(text, UT_OK);
 
-	while(text && *text)
+	UT_uint32 len = UT_UCS4_strlen(text);
+
+	UT_UTF8String sEscText;
+	sEscText.reserve(len);
+
+	const UT_UCS4Char* pText;
+	for(pText = text; pText < text + len; pText++)
 	{
-		// ignore invalid XML characters
-		if((*text >= 0x20 && *text != 0x7f) || (*text == '\n' || *text == '\r' || *text == '\t'))
-			sEscText += *text;
+		switch(*pText)
+		{
+			// any other special handling needed?
 
-		// TODO: column breaks and page breaks are being discarded due to the above check
+			default:
 
-		text++;
+				if((*pText >= 0x20 && *pText != 0x7f) ||
+					(*pText == '\n' || *pText == '\r' || *pText == '\t'))
+				{
+					sEscText.appendUCS4(pText, 1);
+				}
+				else
+				{
+					xxx_UT_DEBUGMSG(("OOXML export: dropping character (%d)\n", *pText));
+				}
+		}
 	}
 
 	sEscText.escapeXML();
diff -Nru abiword-2.8.2/plugins/openxml/exp/xp/ie_exp_OpenXML.h abiword-2.8.4/plugins/openxml/exp/xp/ie_exp_OpenXML.h
--- abiword-2.8.2/plugins/openxml/exp/xp/ie_exp_OpenXML.h	2009-07-20 04:50:23.000000000 +0300
+++ abiword-2.8.4/plugins/openxml/exp/xp/ie_exp_OpenXML.h	2010-04-15 00:50:16.000000000 +0300
@@ -76,7 +76,7 @@
 	UT_Error startParagraph(int target);
 	UT_Error finishParagraph(int target);
 	UT_Error startText(int target);
-	UT_Error writeText(int target, const char* text);
+	UT_Error writeText(int target, const UT_UCS4Char* text);
 	UT_Error finishText(int target);
 	UT_Error startRun(int target);
 	UT_Error finishRun(int target);
diff -Nru abiword-2.8.2/plugins/openxml/imp/xp/OXMLi_StreamListener.cpp abiword-2.8.4/plugins/openxml/imp/xp/OXMLi_StreamListener.cpp
--- abiword-2.8.2/plugins/openxml/imp/xp/OXMLi_StreamListener.cpp	2009-08-04 09:00:20.000000000 +0300
+++ abiword-2.8.4/plugins/openxml/imp/xp/OXMLi_StreamListener.cpp	2010-04-15 00:50:16.000000000 +0300
@@ -178,7 +178,7 @@
 		++it;
 		if(!rqst.valid)
 		{
-			UT_DEBUGMSG(("FRT:Invalid startElement request: [%s]\n", rqst.pName.c_str()));
+			xxx_UT_DEBUGMSG(("FRT:Invalid startElement request: [%s]\n", rqst.pName.c_str()));
 		}
 	} while ( this->getStatus() == UT_OK && it!=m_states.end() && !rqst.handled);
 
@@ -199,7 +199,7 @@
 		++it;
 		if(!rqst.valid)
 		{
-			UT_DEBUGMSG(("FRT:Invalid endElement request: [%s]\n", rqst.pName.c_str()));
+			xxx_UT_DEBUGMSG(("FRT:Invalid endElement request: [%s]\n", rqst.pName.c_str()));
 		}
 	} while ( this->getStatus() == UT_OK && it!=m_states.end() && !rqst.handled);
 }
diff -Nru abiword-2.8.2/src/af/gr/xp/gr_CairoGraphics.cpp abiword-2.8.4/src/af/gr/xp/gr_CairoGraphics.cpp
--- abiword-2.8.2/src/af/gr/xp/gr_CairoGraphics.cpp	2009-10-29 19:51:30.000000000 +0200
+++ abiword-2.8.4/src/af/gr/xp/gr_CairoGraphics.cpp	2010-04-15 00:50:09.000000000 +0300
@@ -309,7 +309,7 @@
 	if(s_pOwnerUTF8 == this)
 		return true;
 	
-	UT_return_val_if_fail( m_pText, false );
+	UT_return_val_if_fail( m_pText && m_pText->getStatus() == UTIter_OK, false );
 
 	UT_TextIterator & text = *m_pText;
 	sUTF8->clear();
@@ -342,9 +342,11 @@
 	m_pPFont(NULL),
 	m_pPFontGUI(NULL),
 	m_pAdjustedPangoFont(NULL),
+	m_pAdjustedPangoFontDescription(NULL),
+	m_iAdjustedPangoFontSize(0),
 	m_pAdjustedLayoutPangoFont(NULL),
-	m_pAdjustedPangoFontSource(NULL),
-	m_iAdjustedPangoFontZoom (0),
+	m_pAdjustedLayoutPangoFontDescription(NULL),
+	m_iAdjustedLayoutPangoFontSize(0),
 	m_iDeviceResolution(iDeviceResolution),
 	m_cr(cr),
 	m_cursor(GR_CURSOR_INVALID),
@@ -376,9 +378,11 @@
 	m_pPFont(NULL),
 	m_pPFontGUI(NULL),
 	m_pAdjustedPangoFont(NULL),
+	m_pAdjustedPangoFontDescription(NULL),
+	m_iAdjustedPangoFontSize(0),
 	m_pAdjustedLayoutPangoFont(NULL),
-	m_pAdjustedPangoFontSource(NULL),
-	m_iAdjustedPangoFontZoom (0),
+	m_pAdjustedLayoutPangoFontDescription(NULL),
+	m_iAdjustedLayoutPangoFontSize(0),
 	m_iDeviceResolution(getDefaultDeviceResolution()),
 	m_cr(NULL),
 	m_cursor(GR_CURSOR_INVALID),
@@ -436,10 +440,18 @@
 	{
 		g_object_unref(m_pAdjustedPangoFont);
 	}
+	if(m_pAdjustedPangoFontDescription)
+	{
+		pango_font_description_free(m_pAdjustedPangoFontDescription);
+	}
 	if(m_pAdjustedLayoutPangoFont!= NULL)
 	{
 		g_object_unref(m_pAdjustedLayoutPangoFont);
 	}
+	if(m_pAdjustedLayoutPangoFontDescription)
+	{
+		pango_font_description_free(m_pAdjustedLayoutPangoFontDescription);
+	}
 	if (m_pContext != NULL)
 	{
 		g_object_unref(m_pContext);
@@ -1141,49 +1153,38 @@
 	if (!pf)
 		return pFont->getPangoFont();
 
-	/* See if this is not the font we have currently cached */
-	if (pFont == m_pAdjustedPangoFontSource &&
-		m_iAdjustedPangoFontZoom == getZoomPercentage())
-	{
-		return m_pAdjustedPangoFont;
-	}
-
 	/*
 	 * When Pango is doing font substitution for us, the substitute font
 	 * we are getting always has size 12pt, so we have to use the size of
 	 * our own font to fix this.
 	 */
 	PangoFontDescription * pfd = pango_font_describe (pf);
+	UT_sint32 dSize = (gint)(pFont->getPointSize() * (double)PANGO_SCALE * (double)getZoomPercentage() / 100.0);
+	pango_font_description_set_size (pfd, dSize);
 
-	double dSize = pFont->getPointSize ();
-
-	/* We cache this font to avoid all this huha if we can */
-	if (m_pAdjustedLayoutPangoFont) 
+	// Check if we have already cached a font with this description and size
+	if (m_pAdjustedPangoFontDescription && pango_font_description_equal(m_pAdjustedPangoFontDescription, pfd) && m_iAdjustedPangoFontSize == dSize)
 	{
-		g_object_unref(m_pAdjustedLayoutPangoFont);
+		pango_font_description_free(pfd);
+		return m_pAdjustedPangoFont;
 	}
+	
+	/* Create and cache this font to avoid all this huha if we can */
 	if (m_pAdjustedPangoFont) 
-	{
 		g_object_unref(m_pAdjustedPangoFont);
-	}
-	pango_font_description_set_size (pfd, (gint)dSize * PANGO_SCALE);
-	m_pAdjustedLayoutPangoFont = pango_context_load_font(getLayoutContext(), pfd);
-	m_pAdjustedPangoFontSource = pFont;
-
-	dSize =
-		(gint)(dSize*(double)PANGO_SCALE *(double)getZoomPercentage() / 100.0);
-	pango_font_description_set_size (pfd, (gint)dSize);
-	m_pAdjustedPangoFont = pango_context_load_font(getContext(), pfd);
-	m_iAdjustedPangoFontZoom = getZoomPercentage();
+	if (m_pAdjustedPangoFontDescription)
+		pango_font_description_free(m_pAdjustedPangoFontDescription);
 	
-	pango_font_description_free(pfd);
+	m_pAdjustedPangoFont = pango_context_load_font(getContext(), pfd);
+	m_pAdjustedPangoFontDescription = pfd;
+	m_iAdjustedPangoFontSize = dSize;
 	
 	return m_pAdjustedPangoFont;
 }
 
 
 /*
- * This is used to get Layout PangoFont that is correct for present zoom level.
+ * This is used to get Layout PangoFont (that is independent from the zoom level).
  * pFont is the font that we are supposed to be using (the user-selected font)
  * pf is the PangoFont that we are actually using (possibly a different,
  * substituted font).
@@ -1193,16 +1194,7 @@
 	UT_return_val_if_fail(pFont, NULL);
 	
 	if (!pf)
-		{
-			xxx_UT_DEBUGMSG(("Getting Layout font \n"));
-			return pFont->getPangoLayoutFont();
-		}
-	/* See if this is not the font we have currently cached */
-	if (pFont == m_pAdjustedPangoFontSource &&
-		m_iAdjustedPangoFontZoom == getZoomPercentage())
-	{
-		return m_pAdjustedLayoutPangoFont;
-	}
+		return pFont->getPangoLayoutFont();
 
 	/*
 	 * When Pango is doing font substitution for us, the substitute font
@@ -1210,31 +1202,25 @@
 	 * our own font to fix this.
 	 */
 	PangoFontDescription * pfd = pango_font_describe (pf);
+	UT_sint32 dSize = (gint)(pFont->getPointSize()*(double)PANGO_SCALE);
+	pango_font_description_set_size (pfd, dSize);
 
-	double dSize = pFont->getPointSize()*(double)PANGO_SCALE;
+	// Check if we have already cached a font with this description and size
+	if (m_pAdjustedLayoutPangoFontDescription && pango_font_description_equal(m_pAdjustedLayoutPangoFontDescription, pfd) && m_iAdjustedLayoutPangoFontSize == dSize)
+	{
+		pango_font_description_free(pfd);
+		return m_pAdjustedLayoutPangoFont;
+	}
    
-	xxx_UT_DEBUGMSG(("Setting adjustedLayout point size %f \n",dSize));
-	pango_font_description_set_size (pfd, (gint)dSize);
-
-	/* We cache this font to avoid all this huha if we can */
+	/* Create and cache this font to avoid all this huha if we can */
 	if (m_pAdjustedLayoutPangoFont) 
-	{
 		g_object_unref(m_pAdjustedLayoutPangoFont);
-	}
-	if (m_pAdjustedPangoFont )
-	{
-		g_object_unref(m_pAdjustedPangoFont);
-	}
-	m_pAdjustedLayoutPangoFont = pango_context_load_font(getLayoutContext(), pfd);
-	m_pAdjustedPangoFontSource = pFont;
-
-	dSize =
-		(gint)(dSize* (double)getZoomPercentage() / 100.0);
-	pango_font_description_set_size (pfd, (gint)dSize);
-	m_pAdjustedPangoFont = pango_context_load_font(getContext(), pfd);
-	m_iAdjustedPangoFontZoom = getZoomPercentage();
+	if (m_pAdjustedLayoutPangoFontDescription)
+		pango_font_description_free(m_pAdjustedLayoutPangoFontDescription);
 	
-	pango_font_description_free(pfd);
+	m_pAdjustedLayoutPangoFont = pango_context_load_font(getLayoutContext(), pfd);
+	m_pAdjustedLayoutPangoFontDescription = pfd;
+	m_iAdjustedLayoutPangoFontSize = dSize;
 	
 	return m_pAdjustedLayoutPangoFont;
 }
@@ -1310,31 +1296,49 @@
 		
 		UT_sint32 iOffsetStart
 			= RI.m_iVisDir == UT_BIDI_RTL ?
-			                 RI.m_iCharCount - RI.m_iOffset - 1 : RI.m_iOffset;
+			                 RI.m_iCharCount - RI.m_iOffset - RI.m_iLength : RI.m_iOffset;
+		xxx_UT_DEBUGMSG(("\n\niOffsetStart (in chars): %d\n", iOffsetStart));
 		
 		const char * pUtf8   = utf8.utf8_str();
 		const char * pOffset = g_utf8_offset_to_pointer (pUtf8, iOffsetStart);
 		
 		if (pOffset)
 			iOffsetStart = pOffset - pUtf8;
+		xxx_UT_DEBUGMSG(("iOffsetStart (in bytes): %d\n", iOffsetStart));
 		
 		UT_sint32 iOffsetEnd
 			= RI.m_iVisDir == UT_BIDI_RTL ?
-			                 RI.m_iCharCount - RI.m_iOffset - RI.m_iLength:
-			                 RI.m_iOffset + RI.m_iLength - 1;
+			                 RI.m_iCharCount - RI.m_iOffset:
+			                 RI.m_iOffset + RI.m_iLength;
+		xxx_UT_DEBUGMSG(("iOffsetEnd (in chars): %d\n", iOffsetEnd));
 		
 		pOffset = g_utf8_offset_to_pointer (pUtf8, iOffsetEnd);
-		
+
+		xxx_UT_DEBUGMSG(("RI.m_iCharCount: %d, RI.m_iOffset: %d, RI.m_iLength: %d, rtl: %s\n", RI.m_iCharCount, RI.m_iOffset, RI.m_iLength, RI.m_iVisDir == UT_BIDI_RTL ? "yes" : "no"));
+			
 		if (pOffset)
 			iOffsetEnd = pOffset - pUtf8;
-		
-		// now we need to work out the glyph offsets
+		xxx_UT_DEBUGMSG(("iOffsetEnd (in bytes): %d\n", iOffsetEnd));
+
+		//	
+		// now we need to work out the glyph offsets given the start and end offsets in bytes
+		//
+			
+		// the glyph end offset should point to the offset of the first glyph that is to be rendered
 		UT_sint32 iGlyphsStart = -1;
-		UT_sint32 iGlyphsEnd = -1;
-		
-		i = 0;
+		// the glyph end offset should point to the offset of the first glyph that is NOT to be rendered anymore
+		// (which in the special case of "render everything from iGlyphsStart to the end" for rtl text means
+		// offset -1, as index 0 points the the "last" glyph of the string. For ltr text this simply means 
+		// offset "num_glyphs".
+		UT_sint32 iGlyphsEnd 
+			= RI.m_iVisDir == UT_BIDI_RTL ?
+							-1 : RI.m_pScaledGlyphs->num_glyphs;
+
+		// count downwards for RTL text, so we include the full character clusters
+		i = RI.m_iVisDir == UT_BIDI_RTL ? RI.m_pScaledGlyphs->num_glyphs - 1 : 0;
 		while(i < (UT_uint32)RI.m_pScaledGlyphs->num_glyphs)
 		{
+			xxx_UT_DEBUGMSG(("RI.m_pScaledGlyphs->log_clusters[%d] == %d\n", i, RI.m_pScaledGlyphs->log_clusters[i]));
 			if(iGlyphsStart < 0 && RI.m_pScaledGlyphs->log_clusters[i] == iOffsetStart)
 				iGlyphsStart = i;
 
@@ -1344,19 +1348,37 @@
 				break;
 			}
 			
-			++i;
+			RI.m_iVisDir == UT_BIDI_RTL ? --i : ++i;
+		}
+		if (RI.m_iVisDir == UT_BIDI_RTL)
+		{
+			// Swap the start and end offset for rtl text, so start <= end again.
+			// Note that this means that iGlyphsStart now points to the offset of
+			// the "last  glyph that should not rendered yet". The glyphs starting from
+			// this offset + 1 should be rendered. iGlyphsEnd on the other hand now 
+			// points to the offset of the last glyph that should be rendered.
+			std::swap(iGlyphsStart, iGlyphsEnd);
 		}
 
+		xxx_UT_DEBUGMSG(("iGlyphsStart: %d, iGlyphsEnd: %d\n", iGlyphsStart, iGlyphsEnd));
+		UT_return_if_fail(iGlyphsStart <= iGlyphsEnd);
+
 		// both of these can be 0 (iGlyphsEnd == 0 => only 1 glyph)
-		//	UT_return_if_fail( iGlyphsStart >= 0 && iGlyphsEnd >= 0 );
-		xxx_UT_DEBUGMSG(("Drawing glyph subset from %d to %d (offsets %d, %d)\n",
+		xxx_UT_DEBUGMSG(("Drawing glyph subset from %d to %d (byte offsets %d, %d)\n",
 					 iGlyphsStart, iGlyphsEnd,
 					 iOffsetStart, iOffsetEnd));
 		
-		gs.num_glyphs = iGlyphsEnd - iGlyphsStart + 1; // including the last glyph
-		gs.glyphs = RI.m_pScaledGlyphs->glyphs + iGlyphsStart;
-		gs.log_clusters = RI.m_pGlyphs->log_clusters + iGlyphsStart;
+		gs.num_glyphs = iGlyphsEnd - iGlyphsStart;
+		gs.glyphs
+			= RI.m_iVisDir == UT_BIDI_RTL ?
+				RI.m_pScaledGlyphs->glyphs + iGlyphsStart + 1 :
+				RI.m_pScaledGlyphs->glyphs + iGlyphsStart;
+		gs.log_clusters
+			= RI.m_iVisDir == UT_BIDI_RTL ?
+				RI.m_pGlyphs->log_clusters + iGlyphsStart + 1 :
+				RI.m_pGlyphs->log_clusters + iGlyphsStart;
 
+		// finally we can render the substring
 		cairo_save(m_cr);
 		cairo_translate(m_cr, xoff, yoff);
 		pango_cairo_show_glyph_string(m_cr, pf, &gs);
@@ -1652,14 +1674,22 @@
 		return false;
 
 	UT_TextIterator & text = static_cast<UT_TextIterator &>(*RI.m_pText);
+	UT_uint32 origPos = text.getPosition();
 
 	for(UT_sint32 i = 0; i < RI.m_iLength && text.getStatus() == UTIter_OK;
 		++i, ++text)
 	{
 		UT_UCS4Char c = text.getChar();
 		if(c != ' ' && c<256)
+		{
+			// restore the iterator back to its original position
+			text.setPosition(origPos);
 			return false;
+		}
 	}
+
+	// restore the iterator back to its original position
+	text.setPosition(origPos);
 	return true;
 }
 
diff -Nru abiword-2.8.2/src/af/gr/xp/gr_CairoGraphics.h abiword-2.8.4/src/af/gr/xp/gr_CairoGraphics.h
--- abiword-2.8.2/src/af/gr/xp/gr_CairoGraphics.h	2009-09-02 13:45:19.000000000 +0300
+++ abiword-2.8.4/src/af/gr/xp/gr_CairoGraphics.h	2010-04-15 00:50:09.000000000 +0300
@@ -376,10 +376,15 @@
 	GR_PangoFont* m_pPFont;
 	GR_PangoFont* m_pPFontGUI;
 
+	// adjusted device front caching
 	PangoFont *       m_pAdjustedPangoFont;
+	PangoFontDescription* m_pAdjustedPangoFontDescription;
+	UT_sint32         m_iAdjustedPangoFontSize;
+		
+	// adjusted layout font caching
 	PangoFont *       m_pAdjustedLayoutPangoFont;
-	GR_PangoFont* m_pAdjustedPangoFontSource;
-	UT_uint32         m_iAdjustedPangoFontZoom;
+	PangoFontDescription* m_pAdjustedLayoutPangoFontDescription;
+	UT_sint32         m_iAdjustedLayoutPangoFontSize;
 	
 	UT_uint32         m_iDeviceResolution;
 
diff -Nru abiword-2.8.2/src/af/gr/xp/gr_Graphics.cpp abiword-2.8.4/src/af/gr/xp/gr_Graphics.cpp
--- abiword-2.8.2/src/af/gr/xp/gr_Graphics.cpp	2009-10-13 09:06:16.000000000 +0300
+++ abiword-2.8.4/src/af/gr/xp/gr_Graphics.cpp	2010-04-15 00:50:09.000000000 +0300
@@ -233,6 +233,7 @@
 	  m_iFontAllocNo(0),
 	  m_pRect(NULL),
 	  m_bHave3DColors(false),
+	  m_paintCount(0),
 	  m_pCaret(NULL),
 	  m_bIsPortrait(true),
 	  m_bSpawnedRedraw(false),
@@ -243,7 +244,6 @@
 	  m_iPrevYOffset(0),
 	  m_iPrevXOffset(0),
 	  m_hashFontCache(19),
-	  m_paintCount(0),
 	  m_AllCarets(this,&m_pCaret,&m_vecCarets),
 	  m_bAntiAliasAlways(false)
 {
diff -Nru abiword-2.8.2/src/af/util/xp/ut_xml.cpp abiword-2.8.4/src/af/util/xp/ut_xml.cpp
--- abiword-2.8.2/src/af/util/xp/ut_xml.cpp	2008-05-12 17:50:06.000000000 +0300
+++ abiword-2.8.4/src/af/util/xp/ut_xml.cpp	2010-04-15 00:50:11.000000000 +0300
@@ -115,13 +115,10 @@
   m_pExpertListener(0),
   m_pReader(0)
 {
-	_init();
 }
 
 UT_XML::~UT_XML ()
 {
-  _cleanup();
-
   if (m_chardata_buffer) g_free (m_chardata_buffer);
 
   FREEP (m_namespace);
diff -Nru abiword-2.8.2/src/af/util/xp/ut_xml.h abiword-2.8.4/src/af/util/xp/ut_xml.h
--- abiword-2.8.2/src/af/util/xp/ut_xml.h	2008-05-12 17:50:06.000000000 +0300
+++ abiword-2.8.4/src/af/util/xp/ut_xml.h	2010-04-15 00:50:11.000000000 +0300
@@ -68,9 +68,6 @@
 
   bool grow (char *& buffer, UT_uint32 & length, UT_uint32 & max, UT_uint32 require);
 
-  void _init();
-  void _cleanup();
-
  protected:
   bool reset_all ();
  private:
diff -Nru abiword-2.8.2/src/af/util/xp/ut_xml_libxml2.cpp abiword-2.8.4/src/af/util/xp/ut_xml_libxml2.cpp
--- abiword-2.8.2/src/af/util/xp/ut_xml_libxml2.cpp	2009-06-26 20:44:37.000000000 +0300
+++ abiword-2.8.4/src/af/util/xp/ut_xml_libxml2.cpp	2010-04-15 00:50:11.000000000 +0300
@@ -298,18 +298,3 @@
 
   return ret;
 }
-
-// guardian because (afaik) xmlParserXXX aren't guaranteed to be idempotent
-static volatile int iLibXml2Guardian = 0;
-
-void UT_XML::_init()
-{
-  if(++iLibXml2Guardian == 1)
-    xmlInitParser();
-}
-
-void UT_XML::_cleanup()
-{
-  if(--iLibXml2Guardian == 0)
-    xmlCleanupParser();
-}
diff -Nru abiword-2.8.2/src/text/fmt/xp/fl_BlockLayout.h abiword-2.8.4/src/text/fmt/xp/fl_BlockLayout.h
--- abiword-2.8.2/src/text/fmt/xp/fl_BlockLayout.h	2009-09-24 07:28:25.000000000 +0300
+++ abiword-2.8.4/src/text/fmt/xp/fl_BlockLayout.h	2010-04-15 00:50:09.000000000 +0300
@@ -103,7 +103,7 @@
 
 class SpellChecker;
 class fl_TabStop;
-void buildTabStops(const char* pszTabStops, UT_GenericVector<fl_TabStop*> &m_vecTabs);
+ABI_EXPORT void buildTabStops(const char* pszTabStops, UT_GenericVector<fl_TabStop*> &m_vecTabs);
 
 class ABI_EXPORT fl_BlockLayout : public fl_ContainerLayout
 {
diff -Nru abiword-2.8.2/src/text/fmt/xp/fp_TextRun.cpp abiword-2.8.4/src/text/fmt/xp/fp_TextRun.cpp
--- abiword-2.8.2/src/text/fmt/xp/fp_TextRun.cpp	2010-02-12 00:44:59.000000000 +0200
+++ abiword-2.8.4/src/text/fmt/xp/fp_TextRun.cpp	2010-04-15 00:50:09.000000000 +0300
@@ -3360,7 +3360,7 @@
 	xxx_UT_DEBUGMSG(("sdh %p text->getPosition() %d getLength() %d \n",getBlock()->getStruxDocHandle(),text->getPosition(),getLength()));
 	text->setUpperLimit(text->getPosition() + getLength() - 1);
 	xxx_UT_DEBUGMSG(("text->getUpperLimit() %d \n",text->getUpperLimit()));
-		
+	//	DELETEP(m_pRenderInfo->m_pText);
 	m_pRenderInfo->m_pText = text;
 	m_pRenderInfo->m_iOffset = iDocumentPosition - iRunOffset;
 	m_pRenderInfo->m_iLength = getLength();
@@ -3396,7 +3396,7 @@
 		
 	m_pRenderInfo->m_pText = text;
 	m_pRenderInfo->m_iOffset = iDocumentPosition - iRunOffset;
-	m_pRenderInfo->m_iLength = getLength();
+	m_pRenderInfo->m_iLength = iCount;
 	if(!getGraphics()->needsSpecialCaretPositioning(*m_pRenderInfo))
 	{
 		DELETEP(text);
diff -Nru abiword-2.8.2/src/wp/impexp/xp/ie_exp_AbiWord_1.cpp abiword-2.8.4/src/wp/impexp/xp/ie_exp_AbiWord_1.cpp
--- abiword-2.8.2/src/wp/impexp/xp/ie_exp_AbiWord_1.cpp	2009-07-22 01:29:37.000000000 +0300
+++ abiword-2.8.4/src/wp/impexp/xp/ie_exp_AbiWord_1.cpp	2010-04-15 00:50:13.000000000 +0300
@@ -1525,7 +1525,6 @@
 	      _outputXMLChar ( cursor.key().c_str(), cursor.key().size() ) ;
 	      m_pie->write ( "\">" ) ;
 		  UT_UTF8String esc = *stringval;
-		  esc.escapeXML();
 	      _outputXMLChar ( esc.utf8_str(), esc.byteLength() ) ;
 	      m_pie->write ( "</m>\n" ) ;
 	    }
Binary files /tmp/cVfffhf_tj/abiword-2.8.2/src/wp/main/cocoa/bundle/AbiStops.icns and /tmp/VxvshNfKRb/abiword-2.8.4/src/wp/main/cocoa/bundle/AbiStops.icns differ
Binary files /tmp/cVfffhf_tj/abiword-2.8.2/src/wp/main/cocoa/bundle/abiword_48.tif and /tmp/VxvshNfKRb/abiword-2.8.4/src/wp/main/cocoa/bundle/abiword_48.tif differ
Binary files /tmp/cVfffhf_tj/abiword-2.8.2/src/wp/main/cocoa/bundle/AbiWord.icns and /tmp/VxvshNfKRb/abiword-2.8.4/src/wp/main/cocoa/bundle/AbiWord.icns differ
Binary files /tmp/cVfffhf_tj/abiword-2.8.2/src/wp/main/cocoa/bundle/ABWBackup.icns and /tmp/VxvshNfKRb/abiword-2.8.4/src/wp/main/cocoa/bundle/ABWBackup.icns differ
Binary files /tmp/cVfffhf_tj/abiword-2.8.2/src/wp/main/cocoa/bundle/ABWDocument.icns and /tmp/VxvshNfKRb/abiword-2.8.4/src/wp/main/cocoa/bundle/ABWDocument.icns differ
Binary files /tmp/cVfffhf_tj/abiword-2.8.2/src/wp/main/cocoa/bundle/ABWPlugin.icns and /tmp/VxvshNfKRb/abiword-2.8.4/src/wp/main/cocoa/bundle/ABWPlugin.icns differ
Binary files /tmp/cVfffhf_tj/abiword-2.8.2/src/wp/main/cocoa/bundle/ABWSaved.icns and /tmp/VxvshNfKRb/abiword-2.8.4/src/wp/main/cocoa/bundle/ABWSaved.icns differ
Binary files /tmp/cVfffhf_tj/abiword-2.8.2/src/wp/main/cocoa/bundle/AWDocument.icns and /tmp/VxvshNfKRb/abiword-2.8.4/src/wp/main/cocoa/bundle/AWDocument.icns differ
Binary files /tmp/cVfffhf_tj/abiword-2.8.2/src/wp/main/cocoa/bundle/Blue11x16.png and /tmp/VxvshNfKRb/abiword-2.8.4/src/wp/main/cocoa/bundle/Blue11x16.png differ
Binary files /tmp/cVfffhf_tj/abiword-2.8.2/src/wp/main/cocoa/bundle/Blue16x15.png and /tmp/VxvshNfKRb/abiword-2.8.4/src/wp/main/cocoa/bundle/Blue16x15.png differ
Binary files /tmp/cVfffhf_tj/abiword-2.8.2/src/wp/main/cocoa/bundle/Cursor_Compass.png and /tmp/VxvshNfKRb/abiword-2.8.4/src/wp/main/cocoa/bundle/Cursor_Compass.png differ
Binary files /tmp/cVfffhf_tj/abiword-2.8.2/src/wp/main/cocoa/bundle/Cursor_Crosshair.png and /tmp/VxvshNfKRb/abiword-2.8.4/src/wp/main/cocoa/bundle/Cursor_Crosshair.png differ
Binary files /tmp/cVfffhf_tj/abiword-2.8.2/src/wp/main/cocoa/bundle/Cursor_DownArrow.png and /tmp/VxvshNfKRb/abiword-2.8.4/src/wp/main/cocoa/bundle/Cursor_DownArrow.png differ
Binary files /tmp/cVfffhf_tj/abiword-2.8.2/src/wp/main/cocoa/bundle/Cursor_E.png and /tmp/VxvshNfKRb/abiword-2.8.4/src/wp/main/cocoa/bundle/Cursor_E.png differ
Binary files /tmp/cVfffhf_tj/abiword-2.8.2/src/wp/main/cocoa/bundle/Cursor_Exchange.png and /tmp/VxvshNfKRb/abiword-2.8.4/src/wp/main/cocoa/bundle/Cursor_Exchange.png differ
Binary files /tmp/cVfffhf_tj/abiword-2.8.2/src/wp/main/cocoa/bundle/Cursor_HandPointer.png and /tmp/VxvshNfKRb/abiword-2.8.4/src/wp/main/cocoa/bundle/Cursor_HandPointer.png differ
Binary files /tmp/cVfffhf_tj/abiword-2.8.2/src/wp/main/cocoa/bundle/Cursor_LeftArrow.png and /tmp/VxvshNfKRb/abiword-2.8.4/src/wp/main/cocoa/bundle/Cursor_LeftArrow.png differ
Binary files /tmp/cVfffhf_tj/abiword-2.8.2/src/wp/main/cocoa/bundle/Cursor_NE.png and /tmp/VxvshNfKRb/abiword-2.8.4/src/wp/main/cocoa/bundle/Cursor_NE.png differ
Binary files /tmp/cVfffhf_tj/abiword-2.8.2/src/wp/main/cocoa/bundle/Cursor_N.png and /tmp/VxvshNfKRb/abiword-2.8.4/src/wp/main/cocoa/bundle/Cursor_N.png differ
Binary files /tmp/cVfffhf_tj/abiword-2.8.2/src/wp/main/cocoa/bundle/Cursor_NW.png and /tmp/VxvshNfKRb/abiword-2.8.4/src/wp/main/cocoa/bundle/Cursor_NW.png differ
Binary files /tmp/cVfffhf_tj/abiword-2.8.2/src/wp/main/cocoa/bundle/Cursor_RightArrow.png and /tmp/VxvshNfKRb/abiword-2.8.4/src/wp/main/cocoa/bundle/Cursor_RightArrow.png differ
Binary files /tmp/cVfffhf_tj/abiword-2.8.2/src/wp/main/cocoa/bundle/Cursor_SE.png and /tmp/VxvshNfKRb/abiword-2.8.4/src/wp/main/cocoa/bundle/Cursor_SE.png differ
Binary files /tmp/cVfffhf_tj/abiword-2.8.2/src/wp/main/cocoa/bundle/Cursor_S.png and /tmp/VxvshNfKRb/abiword-2.8.4/src/wp/main/cocoa/bundle/Cursor_S.png differ
Binary files /tmp/cVfffhf_tj/abiword-2.8.2/src/wp/main/cocoa/bundle/Cursor_SW.png and /tmp/VxvshNfKRb/abiword-2.8.4/src/wp/main/cocoa/bundle/Cursor_SW.png differ
Binary files /tmp/cVfffhf_tj/abiword-2.8.2/src/wp/main/cocoa/bundle/Cursor_Wait.png and /tmp/VxvshNfKRb/abiword-2.8.4/src/wp/main/cocoa/bundle/Cursor_Wait.png differ
Binary files /tmp/cVfffhf_tj/abiword-2.8.2/src/wp/main/cocoa/bundle/Cursor_W.png and /tmp/VxvshNfKRb/abiword-2.8.4/src/wp/main/cocoa/bundle/Cursor_W.png differ
Binary files /tmp/cVfffhf_tj/abiword-2.8.2/src/wp/main/cocoa/bundle/DOCDocument.icns and /tmp/VxvshNfKRb/abiword-2.8.4/src/wp/main/cocoa/bundle/DOCDocument.icns differ
Binary files /tmp/cVfffhf_tj/abiword-2.8.2/src/wp/main/cocoa/bundle/Grey11x16.png and /tmp/VxvshNfKRb/abiword-2.8.4/src/wp/main/cocoa/bundle/Grey11x16.png differ
Binary files /tmp/cVfffhf_tj/abiword-2.8.2/src/wp/main/cocoa/bundle/Grey16x15.png and /tmp/VxvshNfKRb/abiword-2.8.4/src/wp/main/cocoa/bundle/Grey16x15.png differ
Binary files /tmp/cVfffhf_tj/abiword-2.8.2/src/wp/main/cocoa/bundle/HTMDocument.icns and /tmp/VxvshNfKRb/abiword-2.8.4/src/wp/main/cocoa/bundle/HTMDocument.icns differ
diff -Nru abiword-2.8.2/src/wp/main/cocoa/bundle/Info.plist abiword-2.8.4/src/wp/main/cocoa/bundle/Info.plist
--- abiword-2.8.2/src/wp/main/cocoa/bundle/Info.plist	1970-01-01 02:00:00.000000000 +0200
+++ abiword-2.8.4/src/wp/main/cocoa/bundle/Info.plist	2010-04-15 00:51:46.000000000 +0300
@@ -0,0 +1,376 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>CFBundleDocumentTypes</key>
+	<array>
+		<dict>
+			<key>CFBundleTypeExtensions</key>
+			<array>
+				<string>abw</string>
+				<string>ABW</string>
+			</array>
+			<key>CFBundleTypeIconFile</key>
+			<string>ABWDocument.icns</string>
+			<key>CFBundleTypeMIMETypes</key>
+			<array>
+				<string>application/x-abiword</string>
+			</array>
+			<key>CFBundleTypeName</key>
+			<string>AbiWord Document</string>
+			<key>CFBundleTypeRole</key>
+			<string>Editor</string>
+			<key>LSIsAppleDefaultForType</key>
+			<true/>
+			<key>LSTypeIsPackage</key>
+			<false/>
+		</dict>
+		<dict>
+			<key>CFBundleTypeExtensions</key>
+			<array>
+				<string>awt</string>
+				<string>AWT</string>
+			</array>
+			<key>CFBundleTypeIconFile</key>
+			<string>ABWDocument.icns</string>
+			<key>CFBundleTypeMIMETypes</key>
+			<array>
+				<string>application/x-abiword</string>
+			</array>
+			<key>CFBundleTypeName</key>
+			<string>AbiWord Template</string>
+			<key>CFBundleTypeRole</key>
+			<string>Editor</string>
+			<key>LSIsAppleDefaultForType</key>
+			<true/>
+			<key>LSTypeIsPackage</key>
+			<false/>
+		</dict>
+		<dict>
+			<key>CFBundleTypeExtensions</key>
+			<array>
+				<string>zabw</string>
+				<string>ZABW</string>
+				<string>bzabw</string>
+				<string>BZABW</string>
+			</array>
+			<key>CFBundleTypeIconFile</key>
+			<string>ABWDocument.icns</string>
+			<key>CFBundleTypeMIMETypes</key>
+			<array>
+				<string>application/x-abiword</string>
+			</array>
+			<key>CFBundleTypeName</key>
+			<string>Compressed AbiWord Document</string>
+			<key>CFBundleTypeRole</key>
+			<string>Editor</string>
+			<key>LSIsAppleDefaultForType</key>
+			<true/>
+			<key>LSTypeIsPackage</key>
+			<false/>
+		</dict>
+		<dict>
+			<key>CFBundleTypeExtensions</key>
+			<array>
+				<string>doc</string>
+				<string>DOC</string>
+				<string>dot</string>
+				<string>DOT</string>
+			</array>
+			<key>CFBundleTypeIconFile</key>
+			<string>DOCDocument.icns</string>
+			<key>CFBundleTypeMIMETypes</key>
+			<array>
+				<string>application/msword</string>
+			</array>
+			<key>CFBundleTypeName</key>
+			<string>Microsoft Word Document</string>
+			<key>CFBundleTypeOSTypes</key>
+			<array>
+				<string>W8BN</string>
+				<string>W6BN</string>
+				<string>WDBN</string>
+				<string>W8TN</string>
+			</array>
+			<key>CFBundleTypeRole</key>
+			<string>Editor</string>
+			<key>LSIsAppleDefaultForType</key>
+			<false/>
+			<key>LSTypeIsPackage</key>
+			<false/>
+		</dict>
+		<dict>
+			<key>CFBundleTypeExtensions</key>
+			<array>
+				<string>WP</string>
+				<string>wp</string>
+				<string>wpd</string>
+				<string>WPD</string>
+			</array>
+			<key>CFBundleTypeIconFile</key>
+			<string>WPDDocument.icns</string>
+			<key>CFBundleTypeMIMETypes</key>
+			<array>
+				<string>application/vnd.wordperfect</string>
+				<string>application/wordperfect5.1</string>
+				<string>application/vnd.wordperfect5.1</string>
+				<string>application/vnd.wordperfect6.1</string>
+			</array>
+			<key>CFBundleTypeName</key>
+			<string>WordPerfect Document</string>
+			<key>CFBundleTypeOSTypes</key>
+			<array>
+				<string>.WP5</string>
+				<string>.WP6</string>
+				<string>WPPC</string>
+				<string>WPD3</string>
+				<string>WPD4</string>
+			</array>
+			<key>CFBundleTypeRole</key>
+			<string>Editor</string>
+			<key>LSIsAppleDefaultForType</key>
+			<false/>
+			<key>LSTypeIsPackage</key>
+			<false/>
+		</dict>
+		<dict>
+			<key>CFBundleTypeExtensions</key>
+			<array>
+				<string>sdw</string>
+				<string>SDW</string>
+			</array>
+			<key>CFBundleTypeIconFile</key>
+			<string>SDWDocument.icns</string>
+			<key>CFBundleTypeMIMETypes</key>
+			<array>
+				<string>application/vnd.stardivision.writer</string>
+				<string>application/vnd.stardivision.writer-global</string>
+				<string>application/x-starwriter</string>
+			</array>
+			<key>CFBundleTypeName</key>
+			<string>StarWriter 1.x-5.x Document</string>
+			<key>CFBundleTypeRole</key>
+			<string>Editor</string>
+			<key>LSIsAppleDefaultForType</key>
+			<false/>
+			<key>LSTypeIsPackage</key>
+			<false/>
+		</dict>
+		<dict>
+			<key>CFBundleTypeExtensions</key>
+			<array>
+				<string>sxw</string>
+				<string>SXW</string>
+			</array>
+			<key>CFBundleTypeIconFile</key>
+			<string>SXWDocument.icns</string>
+			<key>CFBundleTypeMIMETypes</key>
+			<array>
+				<string>application/vnd.sun.xml.writer</string>
+				<string>application/vnd.sun.xml.writer.global</string>
+			</array>
+			<key>CFBundleTypeName</key>
+			<string>OpenOffice.org Writer Document</string>
+			<key>CFBundleTypeRole</key>
+			<string>Editor</string>
+			<key>LSIsAppleDefaultForType</key>
+			<false/>
+			<key>LSTypeIsPackage</key>
+			<false/>
+		</dict>
+		<dict>
+			<key>CFBundleTypeExtensions</key>
+			<array>
+				<string>odt</string>
+				<string>ODT</string>
+			</array>
+			<key>CFBundleTypeIconFile</key>
+			<string>ODTDocument.icns</string>
+			<key>CFBundleTypeMIMETypes</key>
+			<array>
+				<string>application/vnd.oasis.opendocument.text</string>
+			</array>
+			<key>CFBundleTypeName</key>
+			<string>OpenDocument Text</string>
+			<key>CFBundleTypeRole</key>
+			<string>Editor</string>
+			<key>LSIsAppleDefaultForType</key>
+			<false/>
+			<key>LSTypeIsPackage</key>
+			<false/>
+		</dict>
+		<dict>
+			<key>CFBundleTypeExtensions</key>
+			<array>
+				<string>html</string>
+				<string>HTML</string>
+				<string>htm</string>
+				<string>HTM</string>
+				<string>xhtml</string>
+				<string>XHTML</string>
+				<string>xhtm</string>
+				<string>XHTM</string>
+			</array>
+			<key>CFBundleTypeIconFile</key>
+			<string>HTMDocument.icns</string>
+			<key>CFBundleTypeMIMETypes</key>
+			<array>
+				<string>text/html</string>
+				<string>application/xhtml+xml</string>
+				<string>application/xml</string>
+				<string>text/xml</string>
+			</array>
+			<key>CFBundleTypeName</key>
+			<string>(X)HTML Document</string>
+			<key>CFBundleTypeOSTypes</key>
+			<array>
+				<string>TEXT</string>
+			</array>
+			<key>CFBundleTypeRole</key>
+			<string>Editor</string>
+			<key>LSIsAppleDefaultForType</key>
+			<false/>
+			<key>LSTypeIsPackage</key>
+			<false/>
+		</dict>
+		<dict>
+			<key>CFBundleTypeExtensions</key>
+			<array>
+				<string>rtf</string>
+				<string>RTF</string>
+			</array>
+			<key>CFBundleTypeIconFile</key>
+			<string>RTFDocument.icns</string>
+			<key>CFBundleTypeMIMETypes</key>
+			<array>
+				<string>text/rtf</string>
+			</array>
+			<key>CFBundleTypeName</key>
+			<string>Rich Text Format Document</string>
+			<key>CFBundleTypeOSTypes</key>
+			<array>
+				<string>RTF </string>
+			</array>
+			<key>CFBundleTypeRole</key>
+			<string>Editor</string>
+			<key>LSIsAppleDefaultForType</key>
+			<false/>
+			<key>LSTypeIsPackage</key>
+			<false/>
+		</dict>
+		<dict>
+			<key>CFBundleTypeExtensions</key>
+			<array>
+				<string>txt</string>
+				<string>TXT</string>
+				<string>text</string>
+				<string>TEXT</string>
+			</array>
+			<key>CFBundleTypeIconFile</key>
+			<string>TXTDocument.icns</string>
+			<key>CFBundleTypeMIMETypes</key>
+			<array>
+				<string>text/plain</string>
+			</array>
+			<key>CFBundleTypeName</key>
+			<string>Plain Text Document</string>
+			<key>CFBundleTypeOSTypes</key>
+			<array>
+				<string>TEXT</string>
+			</array>
+			<key>CFBundleTypeRole</key>
+			<string>Editor</string>
+			<key>LSIsAppleDefaultForType</key>
+			<false/>
+			<key>LSTypeIsPackage</key>
+			<false/>
+		</dict>
+		<dict>
+			<key>CFBundleTypeExtensions</key>
+			<array>
+				<string>bak~</string>
+			</array>
+			<key>CFBundleTypeIconFile</key>
+			<string>ABWBackup.icns</string>
+			<key>CFBundleTypeMIMETypes</key>
+			<array>
+				<string>application/x-abiword</string>
+			</array>
+			<key>CFBundleTypeName</key>
+			<string>AbiWord Auto-Saved Document</string>
+			<key>CFBundleTypeRole</key>
+			<string>Editor</string>
+			<key>LSIsAppleDefaultForType</key>
+			<true/>
+			<key>LSTypeIsPackage</key>
+			<false/>
+		</dict>
+		<dict>
+			<key>CFBundleTypeExtensions</key>
+			<array>
+				<string>saved</string>
+			</array>
+			<key>CFBundleTypeIconFile</key>
+			<string>ABWSaved.icns</string>
+			<key>CFBundleTypeMIMETypes</key>
+			<array>
+				<string>application/x-abiword</string>
+			</array>
+			<key>CFBundleTypeName</key>
+			<string>AbiWord Crash-Saved Document</string>
+			<key>CFBundleTypeRole</key>
+			<string>Editor</string>
+			<key>LSIsAppleDefaultForType</key>
+			<true/>
+			<key>LSTypeIsPackage</key>
+			<false/>
+		</dict>
+		<dict>
+			<key>CFBundleTypeExtensions</key>
+			<array>
+				<string>so-abi</string>
+			</array>
+			<key>CFBundleTypeIconFile</key>
+			<string>ABWPlugin.icns</string>
+			<key>CFBundleTypeName</key>
+			<string>AbiWord Plugin</string>
+			<key>CFBundleTypeRole</key>
+			<string>None</string>
+			<key>LSTypeIsPackage</key>
+			<false/>
+		</dict>
+		<dict>
+			<key>CFBundleTypeExtensions</key>
+			<array>
+				<string>Abi</string>
+			</array>
+			<key>CFBundleTypeIconFile</key>
+			<string>ABWPlugin.icns</string>
+			<key>CFBundleTypeName</key>
+			<string>Cocoa AbiWord Plugin</string>
+			<key>CFBundleTypeRole</key>
+			<string>None</string>
+		</dict>
+	</array>
+	<key>CFBundleExecutable</key>
+	<string>AbiWord</string>
+	<key>CFBundleGetInfoString</key>
+	<string>AbiWord 2.8.4</string>
+	<key>CFBundleIconFile</key>
+	<string>AbiWord.icns</string>
+	<key>CFBundleIdentifier</key>
+	<string>com.AbiSource.AbiWord</string>
+	<key>CFBundlePackageType</key>
+	<string>APPL</string>
+	<key>CFBundleShortVersionString</key>
+	<string>2.8.4</string>
+	<key>CFBundleSignature</key>
+	<string>ABIW</string>
+	<key>CFBundleVersion</key>
+	<string>2.8.4</string>
+	<key>NSMainNibFile</key>
+	<string>MainMenu</string>
+	<key>NSPrincipalClass</key>
+	<string>XAP_CocoaApplication</string>
+</dict>
+</plist>
Binary files /tmp/cVfffhf_tj/abiword-2.8.2/src/wp/main/cocoa/bundle/ODTDocument.icns and /tmp/VxvshNfKRb/abiword-2.8.4/src/wp/main/cocoa/bundle/ODTDocument.icns differ
diff -Nru abiword-2.8.2/src/wp/main/cocoa/bundle/PkgInfo abiword-2.8.4/src/wp/main/cocoa/bundle/PkgInfo
--- abiword-2.8.2/src/wp/main/cocoa/bundle/PkgInfo	1970-01-01 02:00:00.000000000 +0200
+++ abiword-2.8.4/src/wp/main/cocoa/bundle/PkgInfo	2010-04-15 00:50:14.000000000 +0300
@@ -0,0 +1 @@
+APPLAbiW
\ No newline at end of file
Binary files /tmp/cVfffhf_tj/abiword-2.8.2/src/wp/main/cocoa/bundle/RTFDocument.icns and /tmp/VxvshNfKRb/abiword-2.8.4/src/wp/main/cocoa/bundle/RTFDocument.icns differ
Binary files /tmp/cVfffhf_tj/abiword-2.8.2/src/wp/main/cocoa/bundle/SDWDocument.icns and /tmp/VxvshNfKRb/abiword-2.8.4/src/wp/main/cocoa/bundle/SDWDocument.icns differ
Binary files /tmp/cVfffhf_tj/abiword-2.8.2/src/wp/main/cocoa/bundle/SXWDocument.icns and /tmp/VxvshNfKRb/abiword-2.8.4/src/wp/main/cocoa/bundle/SXWDocument.icns differ
Binary files /tmp/cVfffhf_tj/abiword-2.8.2/src/wp/main/cocoa/bundle/TEXDocument.icns and /tmp/VxvshNfKRb/abiword-2.8.4/src/wp/main/cocoa/bundle/TEXDocument.icns differ
Binary files /tmp/cVfffhf_tj/abiword-2.8.2/src/wp/main/cocoa/bundle/TXTDocument.icns and /tmp/VxvshNfKRb/abiword-2.8.4/src/wp/main/cocoa/bundle/TXTDocument.icns differ
Binary files /tmp/cVfffhf_tj/abiword-2.8.2/src/wp/main/cocoa/bundle/WPDDocument.icns and /tmp/VxvshNfKRb/abiword-2.8.4/src/wp/main/cocoa/bundle/WPDDocument.icns differ
diff -Nru abiword-2.8.2/src/wp/main/cocoa/Makefile.am abiword-2.8.4/src/wp/main/cocoa/Makefile.am
--- abiword-2.8.2/src/wp/main/cocoa/Makefile.am	2009-12-13 22:23:33.000000000 +0200
+++ abiword-2.8.4/src/wp/main/cocoa/Makefile.am	2010-04-15 00:50:14.000000000 +0300
@@ -22,4 +22,4 @@
 resources_DATA = bundle/*.icns bundle/*.tif bundle/*.png
 contents_DATA = bundle/Info.plist bundle/PkgInfo
 
-EXTRA_DIST = MainMenu.nib
+EXTRA_DIST = MainMenu.nib bundle
diff -Nru abiword-2.8.2/src/wp/main/cocoa/Makefile.in abiword-2.8.4/src/wp/main/cocoa/Makefile.in
--- abiword-2.8.2/src/wp/main/cocoa/Makefile.in	2010-02-12 16:12:58.000000000 +0200
+++ abiword-2.8.4/src/wp/main/cocoa/Makefile.in	2010-04-15 00:51:27.000000000 +0300
@@ -374,7 +374,7 @@
 nobase_resources_DATA = MainMenu.nib/*.nib
 resources_DATA = bundle/*.icns bundle/*.tif bundle/*.png
 contents_DATA = bundle/Info.plist bundle/PkgInfo
-EXTRA_DIST = MainMenu.nib
+EXTRA_DIST = MainMenu.nib bundle
 all: all-am
 
 .SUFFIXES:

