diff --git a/.gitignore b/.gitignore
index e69de29..94338c8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1,30 @@
+/18f577b374d60b3c760a3a3350407632-STLport-4.5.tar.gz
+/1f24ab1d39f4a51faf22244c94a6203f-xmlsec1-1.2.14.tar.gz
+/35c94d2df8893241173de1d16b6034c0-swingExSrc.zip
+/798b2ffdc8bcfe7bca2cf92b62caf685-rhino1_5R5.zip
+/a7983f859eafb2677d7ff386a023bc40-xsltml_2.1.2.zip
+/acor_lt.zip
+/ada24d37d8d638b3d8a9985e80bc2978-source-9.0.0.7-bj.zip
+/fdb27bfe2dbe2e7b57ae194d9bf36bab-SampleICC-1.3.2.tar.gz
+/libreoffice-artwork-3.2.99.1.tar.bz2
+/libreoffice-base-3.2.99.1.tar.bz2
+/libreoffice-bootstrap-3.2.99.1.tar.bz2
+/libreoffice-calc-3.2.99.1.tar.bz2
+/libreoffice-components-3.2.99.1.tar.bz2
+/libreoffice-extensions-3.2.99.1.tar.bz2
+/libreoffice-extras-3.2.99.1.tar.bz2
+/libreoffice-filters-3.2.99.1.tar.bz2
+/libreoffice-help-3.2.99.1.tar.bz2
+/libreoffice-impress-3.2.99.1.tar.bz2
+/libreoffice-l10n-3.2.99.1.tar.bz2
+/libreoffice-libs-core-3.2.99.1.tar.bz2
+/libreoffice-libs-extern-3.2.99.1.tar.bz2
+/libreoffice-libs-extern-sys-3.2.99.1.tar.bz2
+/libreoffice-libs-gui-3.2.99.1.tar.bz2
+/libreoffice-postprocess-3.2.99.1.tar.bz2
+/libreoffice-sdk-3.2.99.1.tar.bz2
+/libreoffice-testing-3.2.99.1.tar.bz2
+/libreoffice-ure-3.2.99.1.tar.bz2
+/libreoffice-writer-3.2.99.1.tar.bz2
+/redhat-langpacks.tar.gz
+/redhat-registry.tar.gz
diff --git a/description.xml b/description.xml
new file mode 100644
index 0000000..6db9ac6
--- /dev/null
+++ b/description.xml
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
+
+
+
+
+ OpenOffice.org
+
+
+
+ @display-name@
+
+
+
diff --git a/evolocal.odb b/evolocal.odb
new file mode 100644
index 0000000..82f486a
Binary files /dev/null and b/evolocal.odb differ
diff --git a/libreoffice-buildfix.patch b/libreoffice-buildfix.patch
new file mode 100644
index 0000000..d59bff9
--- /dev/null
+++ b/libreoffice-buildfix.patch
@@ -0,0 +1,113 @@
+--- a/sysui/util/checksize.pl 2010-09-24 16:35:55.000000000 +0100
++++ b/sysui/util/checksize.pl 2010-09-24 16:35:55.000000000 +0100
+@@ -79,7 +79,7 @@
+ my $file = shift;
+ print "$path$file\n" if ((-e "$path$file") && $is_debug);
+ # don't check dpc,flag,rpmflag,sdf [obj for UNX] files, or etc subdirectory
+- return if ( ($file =~ /.+\.(dpc|\w*?flag)/) || ($file =~ /.+\.obj/ && $ENV{GUI} eq 'UNX') || ($path =~ /.+etc/) || ($path =~ /.+logs/) || ($path =~ /.+sdf/) );
++ return if ( ($file =~ /.+\.(dpc|\w*?flag)/) || ($file =~ /.+\.obj/ && $ENV{GUI} eq 'UNX') || ($path =~ /.+etc/) || ($path =~ /.+logs/) || ($file =~ /.+sdf/) );
+ if ( -z "$path$file" ) {
+ print "Error: $path$file 0 Bytes!\n";
+ $err++;
+--- a/solenv/inc/postset.mk 2010-09-29 12:55:57.000000000 +0100
++++ b/solenv/inc/postset.mk 2010-09-29 12:58:29.000000000 +0100
+@@ -33,15 +33,13 @@
+ # Complete list of all supported ISO codes
+ completelangiso=af \
+ ar \
+-as-IN \
++as \
+ be-BY \
+ bo \
+ bg \
+ br \
+ brx \
+ bn \
+-bn-BD \
+-bn-IN \
+ bs \
+ by \
+ ca \
+@@ -66,9 +64,8 @@
+ gd \
+ gl \
+ gu \
+-gu-IN \
+ he \
+-hi-IN \
++hi \
+ hr \
+ hu \
+ is \
+@@ -92,8 +89,8 @@
+ mn \
+ mni \
+ ms \
+-ml-IN \
+-mr-IN \
++ml \
++mr \
+ my \
+ ne \
+ nb \
+@@ -103,7 +100,7 @@
+ ns \
+ om \
+ oc \
+-or-IN \
++or \
+ pap \
+ pa-IN \
+ pl \
+@@ -127,16 +124,16 @@
+ sv \
+ sw \
+ sw-TZ \
+-te-IN \
+-ti-ER \
+-ta-IN \
++te \
++ti \
++ta \
+ th \
+ tn \
+ tr \
+ ts \
+ tg \
+ ug \
+-ur-IN \
++ur \
+ uk \
+ uz \
+ ve \
+--- a/configure.in Thu Sep 30 12:57:20 2010 +0200
++++ a/configure.in Wed Oct 06 09:59:39 2010 +0200
+@@ -5077,6 +5077,7 @@
+ SYSTEM_REDLAND=NO
+ fi
+ AC_SUBST(SYSTEM_REDLAND)
++AC_SUBST(REDLAND_CFLAGS)
+ AC_SUBST(REDLAND_LIBS)
+
+ dnl ===================================================================
+--- a/set_soenv.in Thu Sep 30 12:57:20 2010 +0200
++++ a/set_soenv.in Wed Oct 06 09:59:39 2010 +0200
+@@ -1917,6 +1917,7 @@
+ ToFile( "USE_XINERAMA", "@USE_XINERAMA@", "e" );
+ ToFile( "XINERAMA_LINK", "@XINERAMA_LINK@", "e" );
+ ToFile( "SYSTEM_REDLAND", "@SYSTEM_REDLAND@", "e" );
++ToFile( "REDLAND_CFLAGS", "@REDLAND_CFLAGS@", "e" );
+ ToFile( "REDLAND_LIBS", "@REDLAND_LIBS@", "e" );
+ ToFile( "SYSTEM_HUNSPELL", "@SYSTEM_HUNSPELL@", "e" );
+ ToFile( "HUNSPELL_CFLAGS", "@HUNSPELL_CFLAGS@", "e" );
+--- a/unoxml/source/rdf/librdf_repository.cxx Thu Sep 30 12:57:20 2010 +0200
++++ a/unoxml/source/rdf/librdf_repository.cxx Wed Oct 06 09:59:39 2010 +0200
+@@ -39,7 +39,7 @@
+ #include
+ #include
+
+-#include
++#include
+
+ #include
+ #include
diff --git a/libreoffice-multiliblauncher.sh b/libreoffice-multiliblauncher.sh
new file mode 100644
index 0000000..7c416af
--- /dev/null
+++ b/libreoffice-multiliblauncher.sh
@@ -0,0 +1,16 @@
+#!/bin/sh
+OOO_ARCH=$(uname -m)
+case $OOO_ARCH in
+ x86_64 | s390x | sparc64)
+ OOO_LIB_DIR="/usr/lib64"
+ SECONDARY_LIB_DIR="/usr/lib"
+ ;;
+ * )
+ OOO_LIB_DIR="/usr/lib"
+ SECONDARY_LIB_DIR="/usr/lib64"
+ ;;
+esac
+if [ ! -x $OOO_LIB_DIR/BRAND/program/LAUNCHER ]; then
+ OOO_LIB_DIR="$SECONDARY_LIB_DIR"
+fi
+exec $OOO_LIB_DIR/BRAND/program/LAUNCHER "$@"
diff --git a/libreoffice.spec b/libreoffice.spec
new file mode 100644
index 0000000..d4df772
--- /dev/null
+++ b/libreoffice.spec
@@ -0,0 +1,3202 @@
+# rhbz#465664 jar-repacking breaks help by reordering META-INF/MANIFEST.MF
+%define __jar_repack %{nil}
+# don't worry about whitespace for now
+%define _default_patch_flags -s -l
+# undef to get english only and no-langpacks for a faster smoketest build
+%define langpacks 1
+# whether to use stlport or gcc's stl, we're basically locked to stlport for
+# i386 to support third party uno components and add-ons designed to work with
+# vanilla OOo.
+%ifarch %{ix86}
+%define stlport_abi_lockin 1
+%else
+%define stlport_abi_lockin 0
+%endif
+
+%if %{stlport_abi_lockin}
+%define stlflags --with-stlport
+%else
+%define stlflags --without-stlport
+%endif
+
+%if %{langpacks}
+%define langpack_langs af ar bg bn ca cs cy da de dz el en-US es et eu fi fr ga gl gu pa-IN he hi hu hr it ja ko lt ms nb nl nn nr pl pt pt-BR ru sh sk sl sr ss st sv ta th tr ve xh zh-CN zh-TW zu ns tn ts as mr ml or te ur kn uk mai ro
+%else
+%define langpack_langs en-US
+%endif
+
+Summary: Free Software Productivity Suite
+Name: libreoffice
+Version: 3.2.99.1
+Release: 2%{?dist}
+License: LGPLv3 and LGPLv2+ and BSD and (MPLv1.1 or GPLv2 or LGPLv2 or Netscape) and (CDDL or GPLv2) and Public Domain
+Group: Applications/Productivity
+URL: http://www.documentfoundation.org/develop
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+Source0: http://download.documentfoundation.org/libreoffice/src/libreoffice-artwork-3.2.99.1.tar.bz2
+Source1: http://download.documentfoundation.org/libreoffice/src/libreoffice-base-3.2.99.1.tar.bz2
+Source2: http://download.documentfoundation.org/libreoffice/src/libreoffice-bootstrap-3.2.99.1.tar.bz2
+Source3: http://download.documentfoundation.org/libreoffice/src/libreoffice-calc-3.2.99.1.tar.bz2
+Source4: http://download.documentfoundation.org/libreoffice/src/libreoffice-components-3.2.99.1.tar.bz2
+Source5: http://download.documentfoundation.org/libreoffice/src/libreoffice-extensions-3.2.99.1.tar.bz2
+Source6: http://download.documentfoundation.org/libreoffice/src/libreoffice-extras-3.2.99.1.tar.bz2
+Source7: http://download.documentfoundation.org/libreoffice/src/libreoffice-filters-3.2.99.1.tar.bz2
+Source8: http://download.documentfoundation.org/libreoffice/src/libreoffice-help-3.2.99.1.tar.bz2
+Source9: http://download.documentfoundation.org/libreoffice/src/libreoffice-impress-3.2.99.1.tar.bz2
+Source10: http://download.documentfoundation.org/libreoffice/src/libreoffice-libs-core-3.2.99.1.tar.bz2
+Source11: http://download.documentfoundation.org/libreoffice/src/libreoffice-libs-extern-3.2.99.1.tar.bz2
+Source12: http://download.documentfoundation.org/libreoffice/src/libreoffice-libs-extern-sys-3.2.99.1.tar.bz2
+Source13: http://download.documentfoundation.org/libreoffice/src/libreoffice-libs-gui-3.2.99.1.tar.bz2
+Source14: http://download.documentfoundation.org/libreoffice/src/libreoffice-postprocess-3.2.99.1.tar.bz2
+Source15: http://download.documentfoundation.org/libreoffice/src/libreoffice-sdk-3.2.99.1.tar.bz2
+Source16: http://download.documentfoundation.org/libreoffice/src/libreoffice-testing-3.2.99.1.tar.bz2
+Source17: http://download.documentfoundation.org/libreoffice/src/libreoffice-ure-3.2.99.1.tar.bz2
+Source18: http://download.documentfoundation.org/libreoffice/src/libreoffice-writer-3.2.99.1.tar.bz2
+Source19: http://cgit.freedesktop.org/ooo-build/ooo-build/plain/src/evolocal.odb
+Source20: http://tools.openoffice.org/unowinreg_prebuild/680/unowinreg.dll
+Source21: redhat-registry.tar.gz
+Source22: redhat-langpacks.tar.gz
+Source23: redhat-agreement.xsl
+Source24: http://www.openoffice.org/nonav/issues/showattachment.cgi/66959/acor_lt.zip
+Source25: libreoffice-multiliblauncher.sh
+Source26: http://hg.services.openoffice.org/binaries/fdb27bfe2dbe2e7b57ae194d9bf36bab-SampleICC-1.3.2.tar.gz
+Source27: http://hg.services.openoffice.org/binaries/a7983f859eafb2677d7ff386a023bc40-xsltml_2.1.2.zip
+Source28: http://hg.services.openoffice.org/binaries/1f24ab1d39f4a51faf22244c94a6203f-xmlsec1-1.2.14.tar.gz
+Source29: http://hg.services.openoffice.org/binaries/798b2ffdc8bcfe7bca2cf92b62caf685-rhino1_5R5.zip
+Source30: http://hg.services.openoffice.org/binaries/35c94d2df8893241173de1d16b6034c0-swingExSrc.zip
+Source31: http://hg.services.openoffice.org/binaries/ada24d37d8d638b3d8a9985e80bc2978-source-9.0.0.7-bj.zip
+Source32: http://hg.services.openoffice.org/binaries/18f577b374d60b3c760a3a3350407632-STLport-4.5.tar.gz
+Source33: description.xml
+Source34: manifest.xml
+Source35: http://download.documentfoundation.org/libreoffice/src/libreoffice-l10n-3.2.99.1.tar.bz2
+BuildRequires: zip, findutils, autoconf, flex, bison, icu, gperf, gcc-c++
+BuildRequires: binutils, java-devel >= 1.6.0, boost-devel, zlib-devel
+BuildRequires: python-devel, expat-devel, libxml2-devel, libxslt-devel, bc
+BuildRequires: neon-devel, libcurl-devel, libidn-devel, pam-devel, cups-devel
+BuildRequires: libXext-devel, libXt-devel, libICE-devel, libjpeg-devel, make
+BuildRequires: gecko-devel, libwpd-devel, hunspell-devel, unixODBC-devel
+BuildRequires: db4-devel, sane-backends-devel, libicu-devel, perl-Archive-Zip
+BuildRequires: freetype-devel, gtk2-devel, desktop-file-utils, hyphen-devel
+BuildRequires: evolution-data-server-devel, libtextcat-devel, nss-devel
+BuildRequires: gstreamer-devel, gstreamer-plugins-base-devel, openssl-devel
+BuildRequires: mdds-devel, lpsolve-devel, hsqldb, bsh, lucene, lucene-contrib
+BuildRequires: mesa-libGLU-devel, redland-devel, ant, ant-apache-regexp
+BuildRequires: jakarta-commons-codec, jakarta-commons-httpclient, cppunit-devel
+BuildRequires: jakarta-commons-lang, poppler-devel, fontpackages-devel, junit4
+BuildRequires: pentaho-reporting-flow-engine, libXinerama-devel, mythes-devel
+BuildRequires: silgraphite-devel, libwpg-devel, libwps-devel, vigra-devel
+
+Patch1: openoffice.org-2.0.1.rhXXXXXX.extensions.defaulttoevo2.patch
+Patch2: openoffice.org-1.9.123.ooo53397.prelinkoptimize.desktop.patch
+Patch3: openoffice.org-2.0.2.rh188467.printingdefaults.patch
+Patch4: openoffice.org-2.2.1.ooo7065.sw.titlepagedialog.patch
+Patch5: openoffice.org-2.3.0.ooo76649.httpencoding.patch
+Patch6: openoffice.org-2.4.0.ooo86080.unopkg.bodge.patch
+Patch7: openoffice.org-3.0.0.ooo88341.sc.verticalboxes.patch
+Patch8: workspace.dtardon03.patch
+Patch9: openoffice.org-2.2.0.gccXXXXX.solenv.javaregistration.patch
+Patch10: openoffice.org-3.1.0.oooXXXXX.solenv.allowmissing.patch
+Patch11: openoffice.org-3.1.0.ooo61927.sw.ww6.unicodefontencoding.patch
+Patch12: openoffice.org-3.1.0.ooo101274.opening-a-directory.patch
+Patch13: openoffice.org-3.1.0.ooo102061.sc.cellanchoring.patch
+Patch14: workspace.impress195.patch
+Patch15: openoffice.org-3.1.1.ooo105784.vcl.sniffscriptforsubs.patch
+Patch16: workspace.srb1.patch
+Patch17: openoffice.org-3.2.0.ooo106502.svx.fixspelltimer.patch
+Patch18: openoffice.org-3.3.0.ooo108246.svx.hide-sql-group-when-inactive.patch
+Patch19: openoffice.org-3.3.0.ooo108637.sfx2.uisavedir.patch
+Patch20: openoffice.org-3.2.0.ooo108846.sfx2.qstartfixes.patch
+Patch21: openoffice.org-3.2.0.ooo95369.sw.sortedobjs.patch
+Patch22: openoffice.org-3.2.0.ooo110142.svx.safercolornames.patch
+Patch23: openoffice.org-3.3.0.ooo111758.sd.xerror.patch
+Patch24: openoffice.org-3.2.0.ooo111741.extras.malformed-xml-file.patch
+Patch25: openoffice.org-3.3.0.ooo112059.sw.avoid-null-ptr-deref.patch
+Patch26: openoffice.org-3.3.0.ooo107490.cppu.lifecycle.patch
+Patch27: openoffice.org-3.3.0.ooo100686.wizards.types.not.mediatypes.patch
+Patch28: workspace.vcl113.patch
+Patch29: openoffice.org-3.3.0.ooo112384.sw.export.doc.styledoesntexist.patch
+Patch30: workspace.gtk3.patch
+Patch31: workspace.cmcfixes77.patch
+Patch32: workspace.vcl114.patch
+Patch33: openoffice.org-3.3.0.ooo113273.desktop.resolvelinks.patch
+Patch34: openoffice.org-3.3.0.ooo106591.sal.tradcopy.patch
+Patch35: workspace.vcl115.patch
+Patch36: workspace.cmcfixes78.patch
+Patch37: openoffice.org-3.3.0.ooo114012.sd.bada11ychain.patch
+Patch38: workspace.cmcfixes79.patch
+Patch39: openoffice.org-3.3.0.ooo114703.vcl.betterlocalize.font.patch
+Patch40: openoffice.org-3.3.0.rh637738.libgcrypt.addmutex.patch
+Patch41: openoffice.org-3.3.0.rh638185.editeng.cjkctlhtmlsizes.patch
+Patch42: openoffice.org-3.2.0.rh632236.writerfilter.cleanup-cell-props.patch
+Patch43: libreoffice-buildfix.patch
+
+%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
+%define instdir %{_libdir}
+%define baseinstdir %{instdir}/libreoffice
+%define ureinstdir %{baseinstdir}/ure
+%define basisinstdir %{baseinstdir}/basis3.3
+%define sdkinstdir %{baseinstdir}/basis3.3/sdk
+%define fontname opensymbol
+%define OFFICEUPD 330
+%define SOPOST l*
+
+%description
+LibreOffice is an Open Source, community-developed, office productivity suite.
+It includes the key desktop applications, such as a word processor,
+spreadsheet, presentation manager, formula editor and drawing program, with a
+user interface and feature set similar to other office suites. Sophisticated
+and flexible, LibreOffice also works transparently with a variety of file
+formats, including Microsoft Office File Formats.
+
+%package core
+Summary: Core modules for LibreOffice
+Group: Applications/Productivity
+Requires: %{name}-%{fontname}-fonts = %{version}-%{release}
+Requires: %{name}-ure = %{version}-%{release}
+Requires: liberation-sans-fonts >= 1.0, liberation-serif-fonts >= 1.0, liberation-mono-fonts >= 1.0
+Requires: dejavu-sans-fonts, dejavu-serif-fonts, dejavu-sans-mono-fonts
+Requires: hunspell-en, hyphen-en, hyphen >= 2.4, autocorr-en
+Requires: lucene
+Requires(pre): gtk2 >= 2.9.4
+Requires(post): gtk2 >= 2.9.4
+Requires(preun): gtk2 >= 2.9.4
+Requires(postun): gtk2 >= 2.9.4
+Obsoletes: openoffice.org-core < 1:3.3.1
+Obsoletes: openoffice.org-brand < 1:3.3.1, broffice.org-brand < 1:3.3.1
+
+%description core
+The shared core libraries and support files for LibreOffice.
+
+%package pyuno
+Summary: Python support for LibreOffice
+Group: Development/Libraries
+Requires: %{name}-core = %{version}-%{release}
+Requires: %{name}-ure = %{version}-%{release}
+Requires: python
+Requires(pre): %{name}-core
+Requires(post): %{name}-core
+Requires(preun): %{name}-core
+Requires(postun): %{name}-core
+Obsoletes: openoffice.org-pyuno < 1:3.3.1
+
+%description pyuno
+Python bindings for the LibreOffice UNO component model. Allows scripts both
+external to LibreOffice and within the internal LibreOffice scripting framework
+to be written in python.
+
+%package base
+Summary: Database front-end for LibreOffice
+Group: Applications/Productivity
+Requires: hsqldb, postgresql-jdbc
+Requires: %{name}-ure = %{version}-%{release}
+Requires: %{name}-core = %{version}-%{release}
+Requires: %{name}-calc = %{version}-%{release}
+Obsoletes: openoffice.org-base-core < 1:3.3.1
+Obsoletes: openoffice.org-base < 1:3.3.1, broffice.org-base < 1:3.3.1
+
+%description base
+GUI database front-end for LibreOffice. Allows creation and management of
+databases through a GUI.
+
+%package report-builder
+Summary: Create database reports from LibreOffice
+Group: Applications/Productivity
+Requires: pentaho-reporting-flow-engine
+Requires: %{name}-base = %{version}-%{release}
+Requires(pre): %{name}-core
+Requires(post): %{name}-core
+Requires(preun): %{name}-core
+Requires(postun): %{name}-core
+Obsoletes: openoffice.org-report-builder < 1:3.3.1
+
+%description report-builder
+Creates database reports from LibreOffice databases. The report builder can
+define group and page headers as well as group, page footers and calculation
+fields to accomplish complex database reports.
+
+%package bsh
+Summary: BeanShell support for LibreOffice
+Group: Development/Libraries
+Requires: bsh
+Requires: %{name}-core = %{version}-%{release}
+Requires(pre): %{name}-core
+Requires(post): %{name}-core
+Requires(preun): %{name}-core
+Requires(postun): %{name}-core
+Obsoletes: openoffice.org-bsh < 1:3.3.1
+
+%description bsh
+Support BeanShell scripts in LibreOffice.
+
+%package rhino
+Summary: JavaScript support for LibreOffice
+Group: Development/Libraries
+Requires: %{name}-core = %{version}-%{release}
+Requires(pre): %{name}-core
+Requires(post): %{name}-core
+Requires(preun): %{name}-core
+Requires(postun): %{name}-core
+Obsoletes: openoffice.org-rhino < 1:3.3.1
+
+%description rhino
+Support JavaScript scripts in LibreOffice.
+
+%package wiki-publisher
+Summary: Create Wiki articles on MediaWiki servers with LibreOffice
+Group: Applications/Productivity
+Requires: jakarta-commons-codec, jakarta-commons-httpclient
+Requires: jakarta-commons-lang, jakarta-commons-logging
+Requires: %{name}-writer = %{version}-%{release}
+Requires(pre): %{name}-core
+Requires(post): %{name}-core
+Requires(preun): %{name}-core
+Requires(postun): %{name}-core
+Obsoletes: openoffice.org-wiki-publisher < 1:3.3.1
+
+%description wiki-publisher
+The Wiki Publisher enables you to create Wiki articles on MediaWiki servers
+without having to know the syntax of the MediaWiki markup language. Publish
+your new and existing documents transparently with writer to a wiki page.
+
+%package ogltrans
+Summary: 3D OpenGL slide transitions for LibreOffice
+Group: Applications/Productivity
+Requires: %{name}-impress = %{version}-%{release}
+Requires(pre): %{name}-core
+Obsoletes: openoffice.org-ogltrans < 1:3.3.1
+
+%description ogltrans
+OpenGL Transitions enable 3D slide transitions to be used in LibreOffice.
+Requires good quality 3D support for your graphics card for best experience.
+
+%package presentation-minimizer
+Summary: Shrink LibreOffice presentations
+Group: Applications/Productivity
+Requires: %{name}-impress = %{version}-%{release}
+Requires(pre): %{name}-core
+Requires(post): %{name}-core
+Requires(preun): %{name}-core
+Requires(postun): %{name}-core
+Obsoletes: openoffice.org-presentation-minimizer < 1:3.3.1
+
+%description presentation-minimizer
+The Presentation Minimizer is used to reduce the file size of the current
+presentation. Images will be compressed, and data that is no longer needed will
+be removed.
+
+%package presenter-screen
+Summary: Presenter Screen for LibreOffice Presentations
+Group: Applications/Productivity
+Requires: %{name}-impress = %{version}-%{release}
+Requires(pre): %{name}-core
+Requires(post): %{name}-core
+Requires(preun): %{name}-core
+Requires(postun): %{name}-core
+Obsoletes: openoffice.org-presenter-screen < 1:3.3.1
+
+%description presenter-screen
+The Presenter Screen is used to provides information on a second screen, that
+typically is not visible to the audience when delivering a presentation. e.g.
+slide notes.
+
+%package pdfimport
+Summary: PDF Importer for LibreOffice Draw
+Group: Applications/Productivity
+Requires: %{name}-draw = %{version}-%{release}
+Requires(pre): %{name}-core
+Requires(post): %{name}-core
+Requires(preun): %{name}-core
+Requires(postun): %{name}-core
+Obsoletes: openoffice.org-pdfimport < 1:3.3.1
+
+%description pdfimport
+The PDF Importer imports PDF into drawing documents to preserve layout
+and enable basic editing of PDF documents.
+
+%package %{fontname}-fonts
+Summary: LibreOffice dingbats font
+Group: User Interface/X
+Requires: fontpackages-filesystem
+Obsoletes: openoffice.org-fonts < 1:3.3.1
+BuildArch: noarch
+
+%description %{fontname}-fonts
+A dingbats font, OpenSymbol, suitable for use by LibreOffice for bullets and
+mathematical symbols.
+
+%package writer
+Summary: LibreOffice Word Processor Application
+Group: Applications/Productivity
+Requires: %{name}-core = %{version}-%{release}
+Requires: %{name}-ure = %{version}-%{release}
+Obsoletes: openoffice.org-writer-core < 1:3.3.1
+Obsoletes: openoffice.org-writer < 1:3.3.1, broffice.org-writer < 1:3.3.1
+
+%description writer
+The LibreOffice Word Processor application.
+
+%package emailmerge
+Summary: Email mail-merge component for LibreOffice
+Group: Applications/Productivity
+Requires: %{name}-writer = %{version}-%{release}
+Requires: %{name}-pyuno = %{version}-%{release}
+Obsoletes: openoffice.org-emailmerge < 1:3.3.1
+
+%description emailmerge
+Enables the LibreOffice writer module to mail-merge to email.
+
+%package calc
+Summary: LibreOffice Spreadsheet Application
+Group: Applications/Productivity
+Requires: %{name}-core = %{version}-%{release}
+Requires: %{name}-ure = %{version}-%{release}
+Obsoletes: openoffice.org-calc-core < 1:3.3.1
+Obsoletes: openoffice.org-calc < 1:3.3.1, broffice.org-calc < 1:3.3.1
+
+%description calc
+The LibreOffice Spreadsheet application.
+
+%package draw
+Summary: LibreOffice Drawing Application
+Group: Applications/Productivity
+Requires: %{name}-core = %{version}-%{release}
+Requires: %{name}-ure = %{version}-%{release}
+Requires: %{name}-pdfimport = %{version}-%{release}
+Requires: %{name}-graphicfilter = %{version}-%{release}
+Obsoletes: openoffice.org-draw-core < 1:3.3.1
+Obsoletes: openoffice.org-draw < 1:3.3.1, broffice.org-draw < 1:3.3.1
+
+%description draw
+The LibreOffice Drawing Application.
+
+%package impress
+Summary: LibreOffice Presentation Application
+Group: Applications/Productivity
+Requires: %{name}-core = %{version}-%{release}
+Requires: %{name}-ure = %{version}-%{release}
+Requires: %{name}-presenter-screen = %{version}-%{release}
+Obsoletes: openoffice.org-impress-core < 1:3.3.1
+Obsoletes: openoffice.org-impress < 1:3.3.1, broffice.org-impress < 1:3.3.1
+
+%description impress
+The LibreOffice Presentation Application.
+
+%package math
+Summary: LibreOffice Equation Editor Application
+Group: Applications/Productivity
+Requires: %{name}-core = %{version}-%{release}
+Requires: %{name}-ure = %{version}-%{release}
+Obsoletes: openoffice.org-math-core < 1:3.3.1
+Obsoletes: openoffice.org-math < 1:3.3.1, broffice.org-math < 1:3.3.1
+
+%description math
+The LibreOffice Equation Editor Application.
+
+%package graphicfilter
+Summary: LibreOffice Extra Graphic filters
+Group: Applications/Productivity
+Requires: %{name}-ure = %{version}-%{release}
+Requires: %{name}-core = %{version}-%{release}
+Obsoletes: openoffice.org-graphicfilter < 1:3.3.1
+
+%description graphicfilter
+The graphicfilter module for LibreOffice provides graphic filters, e.g. svg and
+flash filters.
+
+%package xsltfilter
+Summary: Optional xsltfilter module for LibreOffice
+Group: Applications/Productivity
+Requires: %{name}-core = %{version}-%{release}
+Obsoletes: openoffice.org-xsltfilter < 1:3.3.1
+
+%description xsltfilter
+The xsltfilter module for LibreOffice, provides additional docbook and
+xhtml export transforms. Install this to enable docbook export.
+
+%package javafilter
+Summary: Optional javafilter module for LibreOffice
+Group: Applications/Productivity
+Requires: %{name}-core = %{version}-%{release}
+Obsoletes: openoffice.org-javafilter < 1:3.3.1
+
+%description javafilter
+The javafilter module for LibreOffice, provides additional AportisDoc,
+Pocket Excel and Pocket Word import filters.
+
+%post javafilter
+update-desktop-database %{_datadir}/applications &> /dev/null || :
+
+%postun javafilter
+update-desktop-database %{_datadir}/applications &> /dev/null || :
+
+%package testtools
+Summary: Testtools for LibreOffice
+Group: Development/Libraries
+Requires: %{name}-ure = %{version}-%{release}
+Requires: %{name}-core = %{version}-%{release}
+Requires: %{name}-writer = %{version}-%{release}
+Requires: %{name}-calc = %{version}-%{release}
+Requires: %{name}-draw = %{version}-%{release}
+Requires: %{name}-impress = %{version}-%{release}
+Requires: %{name}-base = %{version}-%{release}
+Requires: %{name}-math = %{version}-%{release}
+Requires: %{name}-bsh = %{version}-%{release}
+Requires: %{name}-rhino = %{version}-%{release}
+Obsoletes: openoffice.org-testtools < 1:3.3.1
+
+%description testtools
+QA tools for LibreOffice, enables automated testing.
+
+%package ure
+Summary: UNO Runtime Environment
+Group: Development/Libraries
+Requires: unzip, jre >= 1.5.0
+Obsoletes: openoffice.org-ure < 1:3.3.1
+
+%description ure
+UNO is the component model of LibreOffice. UNO offers interoperability between
+programming languages, other components models and hardware architectures,
+either in process or over process boundaries, in the Intranet as well as in the
+Internet. UNO components may be implemented in and accessed from any
+programming language for which a UNO implementation (AKA language binding) and
+an appropriate bridge or adapter exists
+
+%package sdk
+Summary: Software Development Kit for LibreOffice
+Group: Development/Libraries
+Requires: %{name}-ure = %{version}-%{release}
+Requires: %{name}-core = %{version}-%{release}
+Requires: unzip, java-devel
+Obsoletes: openoffice.org-sdk < 1:3.3.1, openoffice.org-devel < 1:3.3.1
+
+%description sdk
+The LibreOffice SDK is an add-on for the LibreOffice office suite. It provides
+the necessary tools for programming using the LibreOffice APIs and for creating
+extensions (UNO components) for LibreOffice. To set the build environment for
+building against the sdk use %{sdkinstdir}/setsdkenv_unix.sh.
+
+%package sdk-doc
+Summary: Software Development Kit documentation for LibreOffice
+Group: Documentation
+Requires: %{name}-sdk = %{version}-%{release}
+Obsoletes: openoffice.org-sdk-doc < 1:3.3.1
+
+%description sdk-doc
+This provides documentation for programming using the LibreOffice APIs
+and examples of creating extensions (UNO components) for LibreOffice.
+
+%package headless
+Summary: LibreOffice Headless plug-in
+Group: Development/Libraries
+Requires: %{name}-ure = %{version}-%{release}
+Requires: %{name}-core = %{version}-%{release}
+Obsoletes: openoffice.org-headless < 1:3.3.1
+
+%description headless
+A plug-in for LibreOffice that enables it to function without an X server.
+It implements the -headless command line option and allows LibreOffice to be
+used as a backend server for e.g. document conversion.
+
+%package langpack-af
+Summary: Afrikaans language pack for LibreOffice
+Group: Applications/Productivity
+Requires: %{name}-core = %{version}-%{release}
+Requires: font(:lang=af), hunspell-af, hyphen-af, autocorr-af
+Obsoletes: openoffice.org-langpack-af_ZA < 1:3.3.1
+
+%description langpack-af
+Provides additional Afrikaans translations and resources for LibreOffice.
+
+%package langpack-ar
+Summary: Arabic language pack for LibreOffice
+Group: Applications/Productivity
+Requires: font(:lang=ar), hunspell-ar
+Requires: %{name}-core = %{version}-%{release}
+Obsoletes: openoffice.org-langpack-ar < 1:3.3.1
+
+%description langpack-ar
+Provides additional Arabic translations and resources for LibreOffice.
+
+%package langpack-bg
+Summary: Bulgarian language pack for LibreOffice
+Group: Applications/Productivity
+Requires: %{name}-core = %{version}-%{release}
+Requires: font(:lang=bg), hunspell-bg, hyphen-bg, mythes-bg, autocorr-bg
+Obsoletes: openoffice.org-langpack-bg_BG < 1:3.3.1
+
+%description langpack-bg
+Provides additional Bulgarian translations and resources for LibreOffice.
+
+%package langpack-bn
+Summary: Bengali language pack for LibreOffice
+Group: Applications/Productivity
+Requires: %{name}-core = %{version}-%{release}
+Requires: font(:lang=bn), hunspell-bn, hyphen-bn
+Obsoletes: openoffice.org-langpack-bn < 1:3.3.1
+
+%description langpack-bn
+Provides additional Bengali translations and resources for LibreOffice.
+
+%package langpack-ca
+Summary: Catalan language pack for LibreOffice
+Group: Applications/Productivity
+Requires: %{name}-core = %{version}-%{release}
+Requires: font(:lang=ca), hunspell-ca, hyphen-ca, mythes-ca
+Obsoletes: openoffice.org-langpack-ca_ES < 1:3.3.1
+
+%description langpack-ca
+Provides additional Catalan translations and resources for LibreOffice.
+
+%package langpack-cs
+Summary: Czech language pack for LibreOffice
+Group: Applications/Productivity
+Requires: %{name}-core = %{version}-%{release}
+Requires: font(:lang=cs), hunspell-cs, hyphen-cs, mythes-cs, autocorr-cs
+Obsoletes: openoffice.org-langpack-cs_CZ < 1:3.3.1
+
+%description langpack-cs
+Provides additional Czech translations and resources for LibreOffice.
+
+%package langpack-cy
+Summary: Welsh language pack for LibreOffice
+Group: Applications/Productivity
+Requires: %{name}-core = %{version}-%{release}
+Requires: font(:lang=cy), hunspell-cy, hyphen-cy
+Obsoletes: openoffice.org-langpack-cy_GB < 1:3.3.1
+
+%description langpack-cy
+Provides additional Welsh translations and resources for LibreOffice.
+
+%package langpack-da
+Summary: Danish language pack for LibreOffice
+Group: Applications/Productivity
+Requires: %{name}-core = %{version}-%{release}
+Requires: font(:lang=da), hunspell-da, hyphen-da, mythes-da, autocorr-da
+Obsoletes: openoffice.org-langpack-da_DK < 1:3.3.1
+
+%description langpack-da
+Provides additional Danish translations and resources for LibreOffice.
+
+%package langpack-de
+Summary: German language pack for LibreOffice
+Group: Applications/Productivity
+Requires: %{name}-core = %{version}-%{release}
+Requires: font(:lang=de), hunspell-de, hyphen-de, mythes-de, autocorr-de
+Obsoletes: openoffice.org-langpack-de < 1:3.3.1
+
+%description langpack-de
+Provides additional German translations and resources for LibreOffice.
+
+%package langpack-el
+Summary: Greek language pack for LibreOffice
+Group: Applications/Productivity
+Requires: %{name}-core = %{version}-%{release}
+Requires: font(:lang=el), hunspell-el, hyphen-el, mythes-el
+Obsoletes: openoffice.org-langpack-el_GR < 1:3.3.1
+
+%description langpack-el
+Provides additional Greek translations and resources for LibreOffice.
+
+%package langpack-en
+Summary: English language pack for LibreOffice
+Group: Applications/Productivity
+Requires: %{name}-core = %{version}-%{release}
+Requires: mythes-en
+Obsoletes: openoffice.org-langpack-en < 1:3.3.1
+
+%description langpack-en
+English thesaurus for LibreOffice.
+
+%package langpack-es
+Summary: Spanish language pack for LibreOffice
+Group: Applications/Productivity
+Requires: %{name}-core = %{version}-%{release}
+Requires: font(:lang=es), hunspell-es, hyphen-es, mythes-es, autocorr-es
+Obsoletes: openoffice.org-langpack-es < 1:3.3.1
+
+%description langpack-es
+Provides additional Spanish translations and resources for LibreOffice.
+
+%package langpack-et
+Summary: Estonian language pack for LibreOffice
+Group: Applications/Productivity
+Requires: %{name}-core = %{version}-%{release}
+Requires: font(:lang=et), hunspell-et, hyphen-et
+Obsoletes: openoffice.org-langpack-et_EE < 1:3.3.1
+
+%description langpack-et
+Provides additional Estonian translations and resources for LibreOffice.
+
+%package langpack-eu
+Summary: Basque language pack for LibreOffice
+Group: Applications/Productivity
+Requires: %{name}-core = %{version}-%{release}
+Requires: font(:lang=eu), hunspell-eu, hyphen-eu, autocorr-eu
+Obsoletes: openoffice.org-langpack-eu_ES < 1:3.3.1
+
+%description langpack-eu
+Provides additional Basque translations and resources for LibreOffice.
+
+%package langpack-fi
+Summary: Finnish language pack for LibreOffice
+Group: Applications/Productivity
+Requires: %{name}-core = %{version}-%{release}
+Requires: font(:lang=fi), openoffice.org-voikko, autocorr-fi
+Obsoletes: openoffice.org-langpack-fi_FI < 1:3.3.1
+
+%description langpack-fi
+Provides additional Finnish translations and resources for LibreOffice.
+
+%package langpack-fr
+Summary: French language pack for LibreOffice
+Group: Applications/Productivity
+Requires: %{name}-core = %{version}-%{release}
+Requires: font(:lang=fr), hunspell-fr, hyphen-fr, mythes-fr, autocorr-fr
+Obsoletes: openoffice.org-langpack-fr < 1:3.3.1
+
+%description langpack-fr
+Provides additional French translations and resources for LibreOffice.
+
+%package langpack-ga
+Summary: Irish language pack for LibreOffice
+Group: Applications/Productivity
+Requires: %{name}-core = %{version}-%{release}
+Requires: font(:lang=ga), hunspell-ga, hyphen-ga, mythes-ga, autocorr-ga
+Obsoletes: openoffice.org-langpack-ga_IE < 1:3.3.1
+
+%description langpack-ga
+Provides additional Irish translations and resources for LibreOffice.
+
+%package langpack-gl
+Summary: Galician language pack for LibreOffice
+Group: Applications/Productivity
+Requires: %{name}-core = %{version}-%{release}
+Requires: font(:lang=gl), hunspell-gl, hyphen-gl
+Obsoletes: openoffice.org-langpack-gl_ES < 1:3.3.1
+
+%description langpack-gl
+Provides additional Galician translations and resources for LibreOffice.
+
+%package langpack-gu
+Summary: Gujarati language pack for LibreOffice
+Group: Applications/Productivity
+Requires: %{name}-core = %{version}-%{release}
+Requires: font(:lang=gu), hunspell-gu, hyphen-gu
+Obsoletes: openoffice.org-langpack-gu_IN < 1:3.3.1
+
+%description langpack-gu
+Provides additional Gujarati translations and resources for OpenOffice.or.
+
+%package langpack-pa
+Summary: Punjabi language pack for LibreOffice
+Group: Applications/Productivity
+Requires: %{name}-core = %{version}-%{release}
+Requires: font(:lang=pa), hunspell-pa, hyphen-pa
+Obsoletes: openoffice.org-langpack-pa < 1:3.3.1
+
+%description langpack-pa
+Provides additional Punjabi translations and resources for LibreOffice.
+
+%package langpack-he
+Summary: Hebrew language pack for LibreOffice
+Group: Applications/Productivity
+Requires: %{name}-core = %{version}-%{release}
+Requires: font(:lang=he), hunspell-he
+Obsoletes: openoffice.org-langpack-he_IL < 1:3.3.1
+
+%description langpack-he
+Provides additional Hebrew translations and resources for LibreOffice.
+
+%package langpack-hi
+Summary: Hindi language pack for LibreOffice
+Group: Applications/Productivity
+Requires: %{name}-core = %{version}-%{release}
+Requires: font(:lang=hi), hunspell-hi, hyphen-hi
+Obsoletes: openoffice.org-langpack-hi_IN < 1:3.3.1
+
+%description langpack-hi
+Provides additional Hindi translations and resources for LibreOffice.
+
+%package langpack-hu
+Summary: Hungarian language pack for LibreOffice
+Group: Applications/Productivity
+Requires: %{name}-core = %{version}-%{release}
+Requires: font(:lang=hu), hunspell-hu, hyphen-hu, mythes-hu, autocorr-hu
+Obsoletes: openoffice.org-langpack-hu_HU < 1:3.3.1
+
+%description langpack-hu
+Provides additional Hungarian translations and resources for LibreOffice.
+
+%package langpack-hr
+Summary: Croatian language pack for LibreOffice
+Group: Applications/Productivity
+Requires: %{name}-core = %{version}-%{release}
+Requires: font(:lang=hr), hunspell-hr, hyphen-hr
+Obsoletes: openoffice.org-langpack-hr_HR < 1:3.3.1
+
+%description langpack-hr
+Provides additional Croatian translations and resources for LibreOffice.
+
+%package langpack-it
+Summary: Italian language pack for LibreOffice
+Group: Applications/Productivity
+Requires: %{name}-core = %{version}-%{release}
+Requires: font(:lang=it), hunspell-it, hyphen-it, mythes-it, autocorr-it
+Obsoletes: openoffice.org-langpack-it < 1:3.3.1
+
+%description langpack-it
+Provides additional Italian translations and resources for LibreOffice.
+
+%package langpack-ja
+Summary: Japanese language pack for LibreOffice
+Group: Applications/Productivity
+Requires: %{name}-core = %{version}-%{release}
+Requires: font(:lang=ja), autocorr-ja
+Obsoletes: openoffice.org-langpack-ja_JP < 1:3.3.1
+
+%description langpack-ja
+Provides additional Japanese translations and resources for LibreOffice.
+
+%package langpack-ko
+Summary: Korean language pack for LibreOffice
+Group: Applications/Productivity
+Requires: %{name}-core = %{version}-%{release}
+Requires: font(:lang=ko), hunspell-ko, autocorr-ko
+Obsoletes: openoffice.org-langpack-ko_KR < 1:3.3.1
+
+%description langpack-ko
+Provides additional Korean translations and resources for LibreOffice.
+
+%package langpack-lt
+Summary: Lithuanian language pack for LibreOffice
+Group: Applications/Productivity
+Requires: %{name}-core = %{version}-%{release}
+Requires: font(:lang=lt), hunspell-lt, hyphen-lt, autocorr-lt
+Obsoletes: openoffice.org-langpack-lt_LT < 1:3.3.1
+
+%description langpack-lt
+Provides additional Lithuanian translations and resources for LibreOffice.
+
+%package langpack-ms
+Summary: Malay language pack for LibreOffice
+Group: Applications/Productivity
+Requires: %{name}-core = %{version}-%{release}
+Requires: font(:lang=ms), hunspell-ms
+Obsoletes: openoffice.org-langpack-ms_MY < 1:3.3.1
+
+%description langpack-ms
+Provides additional Malay translations and resources for LibreOffice.
+
+%package langpack-nb
+Summary: Bokmal language pack for LibreOffice
+Group: Applications/Productivity
+Requires: %{name}-core = %{version}-%{release}
+Requires: font(:lang=nb), hunspell-nb, hyphen-nb, mythes-nb
+Obsoletes: openoffice.org-langpack-nb_NO < 1:3.3.1
+
+%description langpack-nb
+Provides additional Bokmal translations and resources for LibreOffice.
+
+%package langpack-nl
+Summary: Dutch language pack for LibreOffice
+Group: Applications/Productivity
+Requires: %{name}-core = %{version}-%{release}
+Requires: font(:lang=nl), hunspell-nl, hyphen-nl, mythes-nl, autocorr-nl
+Obsoletes: openoffice.org-langpack-nl < 1:3.3.1
+
+%description langpack-nl
+Provides additional Dutch translations and resources for LibreOffice.
+
+%package langpack-nn
+Summary: Nynorsk language pack for LibreOffice
+Group: Applications/Productivity
+Requires: %{name}-core = %{version}-%{release}
+Requires: font(:lang=nn), hunspell-nn, hyphen-nn, mythes-nn
+Obsoletes: openoffice.org-langpack-nn_NO < 1:3.3.1
+
+%description langpack-nn
+Provides additional Nynorsk translations and resources for LibreOffice.
+
+%package langpack-nr
+Summary: Southern Ndebele language pack for LibreOffice
+Group: Applications/Productivity
+Requires: %{name}-core = %{version}-%{release}
+Requires: font(:lang=nr), hunspell-nr
+Obsoletes: openoffice.org-langpack-nr_ZA < 1:3.3.1
+
+%description langpack-nr
+Provides additional Southern Ndebele translations and resources for
+LibreOffice.
+
+%package langpack-pl
+Summary: Polish language pack for LibreOffice
+Group: Applications/Productivity
+Requires: %{name}-core = %{version}-%{release}
+Requires: font(:lang=pl), hunspell-pl, hyphen-pl, mythes-pl, autocorr-pl
+Obsoletes: openoffice.org-langpack-pl_PL < 1:3.3.1
+
+%description langpack-pl
+Provides additional Polish translations and resources for LibreOffice.
+
+%package langpack-pt-PT
+Summary: Portuguese language pack for LibreOffice
+Group: Applications/Productivity
+Requires: %{name}-core = %{version}-%{release}
+Requires: font(:lang=pt), hunspell-pt, hyphen-pt, mythes-pt, autocorr-pt
+Obsoletes: openoffice.org-langpack-pt_PT < 1:3.3.1
+
+%description langpack-pt-PT
+Provides additional Portuguese translations and resources for LibreOffice.
+
+%package langpack-pt-BR
+Summary: Brazilian Portuguese language pack for LibreOffice
+Group: Applications/Productivity
+Requires: %{name}-core = %{version}-%{release}
+Requires: font(:lang=pt), hunspell-pt, hyphen-pt, mythes-pt, autocorr-pt
+Obsoletes: openoffice.org-langpack-pt_BR < 1:3.3.1
+
+%description langpack-pt-BR
+Provides additional Brazilian Portuguese translations and resources for
+LibreOffice.
+
+%package langpack-ru
+Summary: Russian language pack for LibreOffice
+Group: Applications/Productivity
+Requires: %{name}-core = %{version}-%{release}
+Requires: font(:lang=ru), hunspell-ru, hyphen-ru, mythes-ru, autocorr-ru
+Obsoletes: openoffice.org-langpack-ru < 1:3.3.1
+
+%description langpack-ru
+Provides additional Russian translations and resources for LibreOffice.
+
+%package langpack-sk
+Summary: Slovak language pack for LibreOffice
+Group: Applications/Productivity
+Requires: %{name}-core = %{version}-%{release}
+Requires: font(:lang=sk), hunspell-sk, hyphen-sk, mythes-sk, autocorr-sk
+Obsoletes: openoffice.org-langpack-sk_SK < 1:3.3.1
+
+%description langpack-sk
+Provides additional Slovak translations and resources for LibreOffice.
+
+%package langpack-sl
+Summary: Slovenian language pack for LibreOffice
+Group: Applications/Productivity
+Requires: %{name}-core = %{version}-%{release}
+Requires: font(:lang=sl), hunspell-sl, hyphen-sl, mythes-sl, autocorr-sl
+Obsoletes: openoffice.org-langpack-sl_SI < 1:3.3.1
+
+%description langpack-sl
+Provides additional Slovenian translations and resources for LibreOffice.
+
+%package langpack-sr
+Summary: Serbian language pack for LibreOffice
+Group: Applications/Productivity
+Requires: %{name}-core = %{version}-%{release}
+Requires: font(:lang=sr), hunspell-sr, hyphen-sr, autocorr-sr
+Obsoletes: openoffice.org-langpack-sr < 1:3.3.1
+
+%description langpack-sr
+Provides additional Serbian translations and resources for LibreOffice.
+
+%package langpack-ss
+Summary: Swati language pack for LibreOffice
+Group: Applications/Productivity
+Requires: %{name}-core = %{version}-%{release}
+Requires: font(:lang=ss), hunspell-ss
+Obsoletes: openoffice.org-langpack-ss_ZA < 1:3.3.1
+
+%description langpack-ss
+Provides additional Swati translations and resources for LibreOffice.
+
+%package langpack-st
+Summary: Southern Sotho language pack for LibreOffice
+Group: Applications/Productivity
+Requires: %{name}-core = %{version}-%{release}
+Requires: font(:lang=st), hunspell-st
+Obsoletes: openoffice.org-langpack-st_ZA < 1:3.3.1
+
+%description langpack-st
+Provides additional Southern Sotho translations and resources for
+LibreOffice.
+
+%package langpack-sv
+Summary: Swedish language pack for LibreOffice
+Group: Applications/Productivity
+Requires: %{name}-core = %{version}-%{release}
+Requires: font(:lang=sv), hunspell-sv, hyphen-sv, mythes-sv, autocorr-sv
+Obsoletes: openoffice.org-langpack-sv < 1:3.3.1
+
+%description langpack-sv
+Provides additional Swedish translations and resources for LibreOffice.
+
+%package langpack-ta
+Summary: Tamil language pack for LibreOffice
+Group: Applications/Productivity
+Requires: %{name}-core = %{version}-%{release}
+Requires: font(:lang=ta), hunspell-ta, hyphen-ta
+Obsoletes: openoffice.org-langpack-ta_IN < 1:3.3.1
+
+%description langpack-ta
+Provides additional Tamil translations and resources for LibreOffice.
+
+%package langpack-th
+Summary: Thai language pack for LibreOffice
+Group: Applications/Productivity
+Requires: %{name}-core = %{version}-%{release}
+Requires: font(:lang=th), hunspell-th
+Obsoletes: openoffice.org-langpack-th_TH < 1:3.3.1
+
+%description langpack-th
+Provides additional Thai translations and resources for LibreOffice.
+
+%package langpack-nso
+Summary: Northern Sotho language pack for LibreOffice
+Group: Applications/Productivity
+Requires: %{name}-core = %{version}-%{release}
+Requires: font(:lang=nso), hunspell-nso
+Obsoletes: openoffice.org-langpack-nso_ZA < 1:3.3.1
+
+%description langpack-nso
+Provides additional Northern Sotho translations and resources for
+LibreOffice.
+
+%package langpack-tn
+Summary: Tswana language pack for LibreOffice
+Group: Applications/Productivity
+Requires: %{name}-core = %{version}-%{release}
+Requires: font(:lang=tn), hunspell-tn
+Obsoletes: openoffice.org-langpack-tn_ZA < 1:3.3.1
+
+%description langpack-tn
+Provides additional Tswana translations and resources for LibreOffice.
+
+%package langpack-ts
+Summary: Tsonga language pack for LibreOffice
+Group: Applications/Productivity
+Requires: %{name}-core = %{version}-%{release}
+Requires: font(:lang=ts), hunspell-ts
+Obsoletes: openoffice.org-langpack-ts_ZA < 1:3.3.1
+
+%description langpack-ts
+Provides additional Tsonga translations and resources for LibreOffice.
+
+%package langpack-tr
+Summary: Turkish language pack for LibreOffice
+Group: Applications/Productivity
+Requires: %{name}-core = %{version}-%{release}
+Requires: font(:lang=tr), autocorr-tr
+Obsoletes: openoffice.org-langpack-tr_TR < 1:3.3.1
+
+%description langpack-tr
+Provides additional Turkish translations and resources for LibreOffice.
+
+%package langpack-ve
+Summary: Venda language pack for LibreOffice
+Group: Applications/Productivity
+Requires: %{name}-core = %{version}-%{release}
+Requires: font(:lang=ve), hunspell-ve
+Obsoletes: openoffice.org-langpack-ve_ZA < 1:3.3.1
+
+%description langpack-ve
+Provides additional Venda translations and resources for LibreOffice.
+
+%package langpack-xh
+Summary: Xhosa language pack for LibreOffice
+Group: Applications/Productivity
+Requires: %{name}-core = %{version}-%{release}
+Requires: font(:lang=xh), hunspell-xh
+Obsoletes: openoffice.org-langpack-xh_ZA < 1:3.3.1
+
+%description langpack-xh
+Provides additional Xhosa translations and resources for LibreOffice.
+
+%package langpack-zh-Hans
+Summary: Simplified Chinese language pack for LibreOffice
+Group: Applications/Productivity
+Requires: %{name}-core = %{version}-%{release}
+Requires: font(:lang=zh-cn), autocorr-zh
+Obsoletes: openoffice.org-langpack-zh_CN < 1:3.3.1
+
+%description langpack-zh-Hans
+Provides additional Simplified Chinese translations and resources for
+LibreOffice.
+
+%package langpack-zh-Hant
+Summary: Traditional Chinese language pack for LibreOffice
+Group: Applications/Productivity
+Requires: %{name}-core = %{version}-%{release}
+Requires: font(:lang=zh-tw), autocorr-zh
+Obsoletes: openoffice.org-langpack-zh_TW < 1:3.3.1
+
+%description langpack-zh-Hant
+Provides additional Traditional Chinese translations and resources for
+LibreOffice.
+
+%package langpack-zu
+Summary: Zulu language pack for LibreOffice
+Group: Applications/Productivity
+Requires: %{name}-core = %{version}-%{release}
+Requires: font(:lang=zu), hunspell-zu, hyphen-zu
+Obsoletes: openoffice.org-langpack-zu_ZA < 1:3.3.1
+
+%description langpack-zu
+Provides additional Zulu translations and resources for LibreOffice.
+
+%package langpack-as
+Summary: Assamese language pack for LibreOffice
+Group: Applications/Productivity
+Requires: %{name}-core = %{version}-%{release}
+Requires: font(:lang=as), hunspell-as, hyphen-as
+Obsoletes: openoffice.org-langpack-as_IN < 1:3.3.1
+
+%description langpack-as
+Provides additional Assamese translations and resources for LibreOffice.
+
+%package langpack-mr
+Summary: Marathi language pack for LibreOffice
+Group: Applications/Productivity
+Requires: %{name}-core = %{version}-%{release}
+Requires: font(:lang=mr), hunspell-mr, hyphen-mr
+Obsoletes: openoffice.org-langpack-mr_IN < 1:3.3.1
+
+%description langpack-mr
+Provides additional Marathi translations and resources for LibreOffice.
+
+%package langpack-ml
+Summary: Malayalam language pack for LibreOffice
+Group: Applications/Productivity
+Requires: %{name}-core = %{version}-%{release}
+Requires: font(:lang=ml), hunspell-ml, hyphen-ml
+Obsoletes: openoffice.org-langpack-ml_IN < 1:3.3.1
+
+%description langpack-ml
+Provides additional Malayalam translations and resources for LibreOffice.
+
+%package langpack-or
+Summary: Oriya language pack for LibreOffice
+Group: Applications/Productivity
+Requires: %{name}-core = %{version}-%{release}
+Requires: font(:lang=or), hunspell-or, hyphen-or
+Obsoletes: openoffice.org-langpack-or_IN < 1:3.3.1
+
+%description langpack-or
+Provides additional Oriya translations and resources for LibreOffice.
+
+%package langpack-te
+Summary: Telugu language pack for LibreOffice
+Group: Applications/Productivity
+Requires: %{name}-core = %{version}-%{release}
+Requires: font(:lang=te), hunspell-te, hyphen-te
+Obsoletes: openoffice.org-langpack-te_IN < 1:3.3.1
+
+%description langpack-te
+Provides additional Telugu translations and resources for LibreOffice.
+
+%package langpack-ur
+Summary: Urdu language pack for LibreOffice
+Group: Applications/Productivity
+Requires: %{name}-core = %{version}-%{release}
+Requires: font(:lang=ur), hunspell-ur
+Obsoletes: openoffice.org-langpack-ur < 1:3.3.1
+
+%description langpack-ur
+Provides additional Urdu translations and resources for LibreOffice.
+
+%package langpack-kn
+Summary: Kannada language pack for LibreOffice
+Group: Applications/Productivity
+Requires: %{name}-core = %{version}-%{release}
+Requires: font(:lang=kn), hunspell-kn, hyphen-kn
+Obsoletes: openoffice.org-langpack-kn_IN < 1:3.3.1
+
+%description langpack-kn
+Provides additional Kannada translations and resources for LibreOffice.
+
+%package langpack-dz
+Summary: Dzongkha language pack for LibreOffice
+Group: Applications/Productivity
+Requires: %{name}-core = %{version}-%{release}
+Requires: font(:lang=dz)
+Obsoletes: openoffice.org-langpack-dz < 1:3.3.1
+
+%description langpack-dz
+Provides additional Dzongkha translations and resources for LibreOffice.
+
+%package langpack-uk
+Summary: Ukrainian language pack for LibreOffice
+Group: Applications/Productivity
+Requires: %{name}-core = %{version}-%{release}
+Requires: font(:lang=uk), hunspell-uk, hyphen-uk, mythes-uk
+Obsoletes: openoffice.org-langpack-uk < 1:3.3.1
+
+%description langpack-uk
+Provides additional Ukrainian translations and resources for LibreOffice.
+
+%package langpack-mai
+Summary: Maithili language pack for LibreOffice
+Group: Applications/Productivity
+Requires: %{name}-core = %{version}-%{release}
+Requires: font(:lang=mai)
+Obsoletes: openoffice.org-langpack-mai_IN < 1:3.3.1
+
+%description langpack-mai
+Provides additional Maithili translations and resources for LibreOffice.
+
+%package langpack-ro
+Summary: Romanian language pack for LibreOffice
+Group: Applications/Productivity
+Requires: %{name}-core = %{version}-%{release}
+Requires: font(:lang=ro), hunspell-ro, hyphen-ro, mythes-ro
+Obsoletes: openoffice.org-langpack-ro < 1:3.3.1
+
+%description langpack-ro
+Provides additional Romanian translations and resources for LibreOffice.
+
+%package -n autocorr-en
+Summary: English auto-correction rules
+Group: Applications/Text
+BuildArch: noarch
+
+%description -n autocorr-en
+Rules for auto-correcting common English typing errors.
+
+%package -n autocorr-af
+Summary: Afrikaans auto-correction rules
+Group: Applications/Text
+BuildArch: noarch
+
+%description -n autocorr-af
+Rules for auto-correcting common Afrikaans typing errors.
+
+%package -n autocorr-bg
+Summary: Bulgarian auto-correction rules
+Group: Applications/Text
+BuildArch: noarch
+
+%description -n autocorr-bg
+Rules for auto-correcting common Bulgarian typing errors.
+
+%package -n autocorr-cs
+Summary: Czech auto-correction rules
+Group: Applications/Text
+BuildArch: noarch
+
+%description -n autocorr-cs
+Rules for auto-correcting common Czech typing errors.
+
+%package -n autocorr-da
+Summary: Danish auto-correction rules
+Group: Applications/Text
+BuildArch: noarch
+
+%description -n autocorr-da
+Rules for auto-correcting common Danish typing error.
+
+%package -n autocorr-de
+Summary: German auto-correction rules
+Group: Applications/Text
+BuildArch: noarch
+
+%description -n autocorr-de
+Rules for auto-correcting common German typing errors.
+
+%package -n autocorr-es
+Summary: Spanish auto-correction rules
+Group: Applications/Text
+BuildArch: noarch
+
+%description -n autocorr-es
+Rules for auto-correcting common Spanish typing errors.
+
+%package -n autocorr-eu
+Summary: Basque auto-correction rules
+Group: Applications/Text
+BuildArch: noarch
+
+%description -n autocorr-eu
+Rules for auto-correcting common Basque typing errors.
+
+%package -n autocorr-fa
+Summary: Farsi auto-correction rules
+Group: Applications/Text
+BuildArch: noarch
+
+%description -n autocorr-fa
+Rules for auto-correcting common Farsi typing errors.
+
+%package -n autocorr-fi
+Summary: Finnish auto-correction rules
+Group: Applications/Text
+BuildArch: noarch
+
+%description -n autocorr-fi
+Rules for auto-correcting common Finnish typing errors.
+
+%package -n autocorr-fr
+Summary: French auto-correction rules
+Group: Applications/Text
+BuildArch: noarch
+
+%description -n autocorr-fr
+Rules for auto-correcting common French typing errors.
+
+%package -n autocorr-ga
+Summary: Irish auto-correction rules
+Group: Applications/Text
+BuildArch: noarch
+
+%description -n autocorr-ga
+Rules for auto-correcting common Irish typing errors.
+
+%package -n autocorr-hu
+Summary: Hungarian auto-correction rules
+Group: Applications/Text
+BuildArch: noarch
+
+%description -n autocorr-hu
+Rules for auto-correcting common Hungarian typing errors.
+
+%package -n autocorr-it
+Summary: Italian auto-correction rules
+Group: Applications/Text
+BuildArch: noarch
+
+%description -n autocorr-it
+Rules for auto-correcting common Italian typing errors.
+
+%package -n autocorr-ja
+Summary: Japanese auto-correction rules
+Group: Applications/Text
+BuildArch: noarch
+
+%description -n autocorr-ja
+Rules for auto-correcting common Japanese typing errors.
+
+%package -n autocorr-ko
+Summary: Korean auto-correction rules
+Group: Applications/Text
+BuildArch: noarch
+
+%description -n autocorr-ko
+Rules for auto-correcting common Korean typing errors.
+
+%package -n autocorr-lb
+Summary: Luxembourgish auto-correction rules
+Group: Applications/Text
+BuildArch: noarch
+
+%description -n autocorr-lb
+Rules for auto-correcting common Luxembourgish typing errors.
+
+%package -n autocorr-lt
+Summary: Lithuanian auto-correction rules
+Group: Applications/Text
+BuildArch: noarch
+
+%description -n autocorr-lt
+Rules for auto-correcting common Lithuanian typing errors.
+
+%package -n autocorr-mn
+Summary: Mongolian auto-correction rules
+Group: Applications/Text
+BuildArch: noarch
+
+%description -n autocorr-mn
+Rules for auto-correcting common Mongolian typing errors.
+
+%package -n autocorr-nl
+Summary: Dutch auto-correction rules
+Group: Applications/Text
+BuildArch: noarch
+
+%description -n autocorr-nl
+Rules for auto-correcting common Dutch typing errors.
+
+%package -n autocorr-pl
+Summary: Polish auto-correction rules
+Group: Applications/Text
+BuildArch: noarch
+
+%description -n autocorr-pl
+Rules for auto-correcting common Polish typing errors.
+
+%package -n autocorr-pt
+Summary: Portuguese auto-correction rules
+Group: Applications/Text
+BuildArch: noarch
+
+%description -n autocorr-pt
+Rules for auto-correcting common Portuguese typing errors.
+
+%package -n autocorr-ru
+Summary: Russian auto-correction rules
+Group: Applications/Text
+BuildArch: noarch
+
+%description -n autocorr-ru
+Rules for auto-correcting common Russian typing errors.
+
+%package -n autocorr-sk
+Summary: Slovak auto-correction rules
+Group: Applications/Text
+BuildArch: noarch
+
+%description -n autocorr-sk
+Rules for auto-correcting common Slovak typing errors.
+
+%package -n autocorr-sl
+Summary: Slovenian auto-correction rules
+Group: Applications/Text
+BuildArch: noarch
+
+%description -n autocorr-sl
+Rules for auto-correcting common Slovenian typing errors.
+
+%package -n autocorr-sr
+Summary: Serbian auto-correction rules
+Group: Applications/Text
+BuildArch: noarch
+
+%description -n autocorr-sr
+Rules for auto-correcting common Serbian typing errors.
+
+%package -n autocorr-sv
+Summary: Swedish auto-correction rules
+Group: Applications/Text
+BuildArch: noarch
+
+%description -n autocorr-sv
+Rules for auto-correcting common Swedish typing errors.
+
+%package -n autocorr-tr
+Summary: Turkish auto-correction rules
+Group: Applications/Text
+BuildArch: noarch
+
+%description -n autocorr-tr
+Rules for auto-correcting common Turkish typing errors.
+
+%package -n autocorr-vi
+Summary: Vietnamese auto-correction rules
+Group: Applications/Text
+BuildArch: noarch
+
+%description -n autocorr-vi
+Rules for auto-correcting common Vietnamese typing errors.
+
+%package -n autocorr-zh
+Summary: Chinese auto-correction rules
+Group: Applications/Text
+BuildArch: noarch
+
+%description -n autocorr-zh
+Rules for auto-correcting common Chinese typing errors.
+
+%prep
+%setup -q -c -a 1 -a 2 -a 3 -a 4 -a 5 -a 6 -a 7 -a 8 -a 9 -a 10 -a 11 -a 12 -a 13 -a 14 -a 15 -a 16 -a 17 -a 18 -a 35
+for a in */*; do mv `pwd`/$a .; done
+#remove "debugging" translations
+rm -rf l10n/source/kid
+#Customize Palette to remove Sun colours and add Red Hat colours
+(head -n -1 extras/source/palettes/standard.soc && \
+ echo -e '
+
+
+
+ ' && \
+ tail -n 1 extras/source/palettes/standard.soc) > redhat.soc
+mv -f redhat.soc extras/source/palettes/standard.soc
+cp -p %{SOURCE19} extras/source/database/evolocal.odb
+cp -p %{SOURCE20} external/unowinreg/unowinreg.dll
+%patch1 -p1 -b .rhXXXXXX.extensions.defaulttoevo2.patch
+%patch2 -p1 -b .ooo53397.prelinkoptimize.desktop.patch
+%patch3 -p1
+%patch4 -p1 -b .ooo7065.sw.titlepagedialog.patch
+%patch5 -p0 -b .ooo76649.httpencoding.patch
+%patch6 -p1 -b .ooo86080.unopkg.bodge.patch
+%patch7 -p1 -b .ooo88341.sc.verticalboxes.patch
+%patch8 -p0 -b .workspace.dtardon03.patch
+%patch9 -p0 -b .gccXXXXX.solenv.javaregistration.patch
+%patch10 -p1 -b .oooXXXXX.solenv.allowmissing.patch
+%patch11 -p1 -b .ooo61927.sw.ww6.unicodefontencoding.patch
+%patch12 -p0 -b .ooo101274.opening-a-directory.patch
+%patch13 -p0 -b .ooo102061.sc.cellanchoring.patch
+%patch14 -p0 -b .workspace.impress195.patch
+%patch15 -p0 -b .ooo105784.vcl.sniffscriptforsubs.patch
+%patch16 -p1 -b .workspace.srb1.patch
+%patch17 -p1 -b .ooo106502.svx.fixspelltimer.patch
+%patch18 -p1 -b .ooo108246.svx.hide-sql-group-when-inactive.patch
+%patch19 -p1 -b .ooo108637.sfx2.uisavedir.patch
+%patch20 -p1 -b .ooo108846.sfx2.qstartfixes.patch
+%patch21 -p1 -b .ooo95369.sw.sortedobjs.patch
+%patch22 -p0 -b .ooo110142.svx.safercolornames.patch
+%patch23 -p0 -b .ooo111758.sd.xerror.patch
+%patch24 -p1 -b .ooo111741.extras.malformed-xml-file.patch
+%patch25 -p1 -b .ooo112059.sw.avoid-null-ptr-deref.patch
+%patch26 -p0 -b .ooo107490.cppu.lifecycle.patch
+%patch27 -p0 -b .ooo100686.wizards.types.not.mediatypes.patch
+%patch28 -p0 -b .workspace.vcl113.patch
+%patch29 -p0 -b .ooo112384.sw.export.doc.styledoesntexist.patch
+%patch30 -p0 -b .workspace.gtk3.patch
+%patch31 -p1 -b .workspace.cmcfixes77.patch
+%patch32 -p0 -b .workspace.vcl114.patch
+%patch33 -p0 -b .ooo113273.desktop.resolvelinks.patch
+%patch34 -p0 -b .ooo106591.sal.tradcopy.patch
+%patch35 -p1 -b .workspace.vcl115.patch
+%patch36 -p1 -b .workspace.cmcfixes78.patch
+%patch37 -p0 -b .ooo114012.sd.bada11ychain.patch
+%patch38 -p1 -b .workspace.cmcfixes79.patch
+%patch39 -p1 -b .ooo114703.vcl.betterlocalize.font.patch
+%patch40 -p0 -b .rh637738.libgcrypt.addmutex.patch
+%patch41 -p1 -b .rh638185.editeng.cjkctlhtmlsizes.patch
+%patch42 -p1 -b .rh632236.writerfilter.cleanup-cell-props.patch
+%patch43 -p1 -b .libreoffice-buildfix.patch
+
+%build
+echo build start time is `date`, diskspace: `df -h . | tail -n 1`
+#don't build localized helps which are poorly translated
+POORHELPS=`find l10n/source -name localize.sdf -exec grep 'helpcontent2.*main.*Working With %PRODUCTNAME' {} \; | cut -f 10 | grep -v en-US | xargs`
+#convert _smp_mflags to dmake equivalent
+SMP_MFLAGS=%{?_smp_mflags}
+SMP_MFLAGS=$[${SMP_MFLAGS/-j/}]
+if [ $SMP_MFLAGS -lt 2 ]; then SMP_MFLAGS=2; fi
+NDMAKES=`dc -e "$SMP_MFLAGS v p"`
+NBUILDS=`dc -e "$SMP_MFLAGS $NDMAKES / p"`
+
+autoconf
+%configure \
+ --with-vendor="Red Hat, Inc." --with-num-cpus=$NBUILDS --with-max-jobs=$NDMAKES \
+ --with-build-version="Ver: %{version}-%{release}" --with-unix-wrapper=%{name} \
+ --enable-symbols --disable-ldap --disable-epm --disable-mathmldtd \
+ --disable-Xaw --disable-gnome-vfs --enable-gio --enable-symbols \
+ --enable-lockdown --enable-evolution2 --enable-cairo --enable-dbus \
+ --enable-opengl --enable-vba --enable-minimizer --enable-presenter-console \
+ --enable-pdfimport --enable-wiki-publisher --enable-report-builder \
+ --with-system-jfreereport --with-vba-package-format="builtin" \
+ --with-system-libs --with-system-headers --with-system-mozilla \
+ --with-system-mythes --with-system-dicts --with-system-apache-commons \
+ --with-system-libtextcat --with-system-libtextcat-data --without-system-saxon \
+ --with-external-dict-dir=/usr/share/myspell --without-myspell-dicts \
+ --without-fonts --without-agg --without-ppds --without-afms %{stlflags} \
+ --with-lang="%{langpack_langs}" --with-poor-help-localizations="$POORHELPS" \
+ --with-external-tar=`pwd`/ext_sources --with-java-target-version=1.5
+
+mkdir -p ext_sources
+cp %{SOURCE20} ext_sources/185d60944ea767075d27247c3162b3bc-unowinreg.dll
+cp %{SOURCE26} ext_sources
+cp %{SOURCE27} ext_sources
+cp %{SOURCE28} ext_sources
+cp %{SOURCE29} ext_sources
+cp %{SOURCE30} ext_sources
+cp %{SOURCE31} ext_sources
+cp %{SOURCE32} ext_sources
+
+#use the RPM_OPT_FLAGS but remove the OOo overridden ones
+for i in $RPM_OPT_FLAGS; do
+ case "$i" in
+ -O?|-pipe|-Wall|-g|-fexceptions) continue;;
+ esac
+ ARCH_FLAGS="$ARCH_FLAGS $i"
+done
+export ARCH_FLAGS
+
+. ./*[Ee]nv.[Ss]et.sh
+./bootstrap
+cd instsetoo_native
+if ! VERBOSE=false build --dlv_switch -link -P$NBUILDS --all -- -P$NDMAKES -s; then
+ build --dlv_switch -link --all
+fi
+
+#generate the icons and mime type stuff
+export DESTDIR=../../../output
+export KDEMAINDIR=/usr
+export GNOMEDIR=/usr
+export GNOME_MIME_THEME=hicolor
+cd ../sysui
+cd unxlng*/misc/libreoffice
+./create_tree.sh
+
+echo build end time is `date`, diskspace: `df -h . | tail -n 1`
+
+%install
+rm -rf $RPM_BUILD_ROOT
+source ./Linux*Env.Set.sh
+#figure out the icon version
+export `grep "^PRODUCTVERSIONSHORT =" sysui/desktop/productversion.mk | sed -e "s/ //g"`
+export `grep "PRODUCTVERSION[ ]*=[ ]*" sysui/desktop/productversion.mk | sed -e "s/ //g"`
+#install
+cd instsetoo_native/util
+#direct install
+mkdir -p $RPM_BUILD_ROOT/%{instdir}
+export PKGFORMAT=installed
+#don't duplicate english helpcontent about the place
+unset DEFAULT_TO_ENGLISH_FOR_PACKING
+if dmake openoffice_en-US; then
+ ok=true
+ break
+else
+ echo - ---dump log start---
+ cat ../unx*.pro/OpenOffice/installed/logging/en-US/log_*_en-US.log
+ echo - ---dump log end---
+ ok=false
+fi
+if [ $ok == "false" ]; then
+ exit 1
+fi
+mkdir -p $RPM_BUILD_ROOT/%{baseinstdir}
+mv ../unxlng*.pro/OpenOffice/installed/install/en-US/* $RPM_BUILD_ROOT/%{baseinstdir}
+chmod -R +w $RPM_BUILD_ROOT/%{baseinstdir}
+%if %{langpacks}
+dmake ooolanguagepack
+rm -rf ../unxlng*.pro/OpenOffice_languagepack/installed/install/log
+for langpack in ../unxlng*.pro/OpenOffice_languagepack/installed/install/*; do
+cp -rp $langpack/* $RPM_BUILD_ROOT/%{baseinstdir}
+rm -rf $langpack
+done
+%endif
+for file in swriter scalc simpress sdraw ; do
+ cp -f ../../desktop/$OUTPATH.pro/bin/$file $RPM_BUILD_ROOT/%{baseinstdir}/program/$file.bin
+done
+rm -rf $RPM_BUILD_ROOT/%{baseinstdir}/share/prereg
+#give a consistent javasettingsunopkginstall.xml
+$RPM_BUILD_ROOT/%{baseinstdir}/program/unopkg list --bundled || :
+export WITH_LANG="en-US"
+dmake sdkoo
+mv ../unxlng*.pro/OpenOffice_SDK/installed/install/en-US/*/sdk $RPM_BUILD_ROOT/%{sdkinstdir}
+cd ../../
+
+# revoke ScriptProviders and make into extensions
+pushd $RPM_BUILD_ROOT/%{basisinstdir}/program
+
+# BeanShell
+../ure-link/bin/regcomp -revoke -r services.rdb -br services.rdb -c "vnd.sun.star.expand:\$OOO_BASE_DIR/program/classes/ScriptProviderForBeanShell.jar"
+mkdir $RPM_BUILD_ROOT%{baseinstdir}/share/extensions/ScriptProviderForBeanShell.oxt \
+ $RPM_BUILD_ROOT%{baseinstdir}/share/extensions/ScriptProviderForBeanShell.oxt/META-INF
+mv classes/ScriptProviderForBeanShell.jar $RPM_BUILD_ROOT%{baseinstdir}/share/extensions/ScriptProviderForBeanShell.oxt
+cp %{SOURCE33} $RPM_BUILD_ROOT%{baseinstdir}/share/extensions/ScriptProviderForBeanShell.oxt
+cp %{SOURCE34} $RPM_BUILD_ROOT%{baseinstdir}/share/extensions/ScriptProviderForBeanShell.oxt/META-INF
+sed -i -e 's/@display-name@/Script provider for BeanShell/' \
+ -e 's/@version@/%{version}/' \
+ -e 's/@id@/com.sun.star.script.provider.ScriptProviderForBeanShell/' \
+ $RPM_BUILD_ROOT%{baseinstdir}/share/extensions/ScriptProviderForBeanShell.oxt/description.xml
+sed -i -e 's/@type@/java/' -e 's/@path@/ScriptProviderForBeanShell.jar/' \
+ $RPM_BUILD_ROOT%{baseinstdir}/share/extensions/ScriptProviderForBeanShell.oxt/META-INF/manifest.xml
+
+# JavaScript
+../ure-link/bin/regcomp -revoke -r services.rdb -br services.rdb -c "vnd.sun.star.expand:\$OOO_BASE_DIR/program/classes/ScriptProviderForJavaScript.jar"
+mkdir $RPM_BUILD_ROOT%{baseinstdir}/share/extensions/ScriptProviderForJavaScript.oxt \
+ $RPM_BUILD_ROOT%{baseinstdir}/share/extensions/ScriptProviderForJavaScript.oxt/META-INF
+mv classes/ScriptProviderForJavaScript.jar $RPM_BUILD_ROOT%{baseinstdir}/share/extensions/ScriptProviderForJavaScript.oxt
+cp %{SOURCE33} $RPM_BUILD_ROOT%{baseinstdir}/share/extensions/ScriptProviderForJavaScript.oxt
+cp %{SOURCE34} $RPM_BUILD_ROOT%{baseinstdir}/share/extensions/ScriptProviderForJavaScript.oxt/META-INF
+sed -i -e 's/@display-name@/Script provider for JavaScript/' \
+ -e 's/@version@/%{version}/' \
+ -e 's/@id@/com.sun.star.script.provider.ScriptProviderForJavaScript/' \
+ $RPM_BUILD_ROOT%{baseinstdir}/share/extensions/ScriptProviderForJavaScript.oxt/description.xml
+sed -i -e 's/@type@/java/' -e 's/@path@/ScriptProviderForJavaScript.jar/' \
+ $RPM_BUILD_ROOT%{baseinstdir}/share/extensions/ScriptProviderForJavaScript.oxt/META-INF/manifest.xml
+
+# Python
+../ure-link/bin/regcomp -revoke -r services.rdb -br services.rdb -c vnd.openoffice.pymodule:pythonscript
+mkdir $RPM_BUILD_ROOT%{baseinstdir}/share/extensions/ScriptProviderForPython.oxt \
+ $RPM_BUILD_ROOT%{baseinstdir}/share/extensions/ScriptProviderForPython.oxt/META-INF
+mv pythonscript.py $RPM_BUILD_ROOT%{baseinstdir}/share/extensions/ScriptProviderForPython.oxt
+cp %{SOURCE33} $RPM_BUILD_ROOT%{baseinstdir}/share/extensions/ScriptProviderForPython.oxt
+cp %{SOURCE34} $RPM_BUILD_ROOT%{baseinstdir}/share/extensions/ScriptProviderForPython.oxt/META-INF
+sed -i -e 's/@display-name@/Script provider for Python/' \
+ -e 's/@version@/%{version}/' \
+ -e 's/@id@/com.sun.star.script.provider.ScriptProviderForPython/' \
+ $RPM_BUILD_ROOT%{baseinstdir}/share/extensions/ScriptProviderForPython.oxt/description.xml
+sed -i -e 's/@type@/python/' -e 's/@path@/pythonscript.py/' \
+ $RPM_BUILD_ROOT%{baseinstdir}/share/extensions/ScriptProviderForPython.oxt/META-INF/manifest.xml
+
+popd
+
+#configure sdk
+pushd $RPM_BUILD_ROOT/%{sdkinstdir}
+ for file in setsdkenv_unix.csh setsdkenv_unix.sh ; do
+ sed -e "s,@OO_SDK_NAME@,sdk," \
+ -e "s,@OO_SDK_HOME@,%{sdkinstdir}," \
+ -e "s,@OFFICE_HOME@,%{baseinstdir}," \
+ -e "s,@OFFICE_BASE_HOME@,%{basisinstdir}," \
+ -e "s,@OO_SDK_URE_HOME@,%{ureinstdir}," \
+ -e "s,@OO_SDK_MAKE_HOME@,/usr/bin," \
+ -e "s,@OO_SDK_ZIP_HOME@,/usr/bin," \
+ -e "s,@OO_SDK_CPP_HOME@,/usr/bin," \
+ -e "s,@OO_SDK_CC_55_OR_HIGHER@,," \
+ -e "s,@OO_SDK_JAVA_HOME@,$JAVA_HOME," \
+ -e "s,@OO_SDK_OUTPUT_DIR@,\$HOME," \
+ -e "s,@SDK_AUTO_DEPLOYMENT@,NO," \
+ $file.in > $file
+ chmod 755 $file
+ done
+#fix permissions
+ find examples -type f -exec chmod -x {} \;
+popd
+
+#add our custom configuration options
+#enable gtk file dialog as the default
+rm -rf $RPM_BUILD_ROOT/%{basisinstdir}/share/registry/modules/org/openoffice/Office/Common/Common-UseOOoFileDialogs.xcu
+#default autorecovery settings
+#system libtextcat fingerprint location
+#rhbz#484055 system autocorr location
+#rhbz#451512 set better math print options
+tar xzf %{SOURCE21} -C $RPM_BUILD_ROOT/%{basisinstdir}/share
+
+#add the debugging libsalalloc_malloc.so.3 library
+cp -f solver/%{OFFICEUPD}/unxlng*.pro/lib/libsalalloc_malloc.so.3 $RPM_BUILD_ROOT/%{ureinstdir}/lib
+chmod -x $RPM_BUILD_ROOT/%{basisinstdir}/program/testtoolrc
+chmod -x $RPM_BUILD_ROOT/%{basisinstdir}/program/hid.lst
+
+#remove spurious exec bits
+chmod -x $RPM_BUILD_ROOT/%{basisinstdir}/program/gengalrc
+
+#We don't need to carry around all the letter templates for all the languages
+#in each langpack! In addition, all the bitmaps are the same!
+pushd $RPM_BUILD_ROOT/%{basisinstdir}/share/template
+mkdir -p wizard
+for I in %{langpack_langs}; do
+ if [ -d $I/wizard/bitmap ]; then
+ cp -afl $I/wizard/bitmap wizard/
+ rm -rf $I/wizard/bitmap
+ ln -sf ../../wizard/bitmap $I/wizard/bitmap
+ fi
+
+ if [ -d $I/wizard/letter/$I ]; then
+ mv -f $I/wizard/letter/$I ${I}_wizard_letter_${I}
+ rm -rf $I/wizard/letter/*
+ mv -f ${I}_wizard_letter_${I} $I/wizard/letter/$I
+ else
+ rm -rf $I/wizard/letter/*
+ fi
+done
+popd
+
+#Set some aliases to canonical autocorrect language files for locales with matching languages
+pushd $RPM_BUILD_ROOT/%{basisinstdir}/share/autocorr
+
+# ooo#108049
+cp -p %{SOURCE24} acor_lt-LT.dat
+
+#en-ZA exists and has a good autocorrect file with two or three extras that make sense for South Africa
+en_GB_aliases="en-AG en-AU en-BS en-BW en-BZ en-CA en-DK en-GH en-HK en-IE en-IN en-JM en-NG en-NZ en-SG en-TT"
+for lang in $en_GB_aliases; do
+ ln -sf acor_en-GB.dat acor_$lang.dat
+done
+en_US_aliases="en-PH"
+for lang in $en_US_aliases; do
+ ln -sf acor_en-US.dat acor_$lang.dat
+done
+en_ZA_aliases="en-NA en-ZW"
+for lang in $en_ZA_aliases; do
+ ln -sf acor_en-ZA.dat acor_$lang.dat
+done
+%if %{langpacks}
+af_ZA_aliases="af-NA"
+for lang in $af_ZA_aliases; do
+ ln -sf acor_af-ZA.dat acor_$lang.dat
+done
+de_DE_aliases="de-AT de-BE de-CH de-LI de-LU"
+for lang in $de_DE_aliases; do
+ ln -sf acor_de-DE.dat acor_$lang.dat
+done
+es_ES_aliases="es-AR es-BO es-CL es-CO es-CR es-CU es-DO es-EC es-GT es-HN es-MX es-NI es-PA es-PE es-PR es-PY es-SV es-US es-UY es-VE"
+for lang in $es_ES_aliases; do
+ ln -sf acor_es-ES.dat acor_$lang.dat
+done
+fr_FR_aliases="fr-BE fr-CA fr-CH fr-LU fr-MC"
+for lang in $fr_FR_aliases; do
+ ln -sf acor_fr-FR.dat acor_$lang.dat
+done
+it_IT_aliases="it-CH"
+for lang in $it_IT_aliases; do
+ ln -sf acor_it-IT.dat acor_$lang.dat
+done
+nl_NL_aliases="nl-AW nl-BE"
+for lang in $nl_NL_aliases; do
+ ln -s acor_nl-NL.dat acor_$lang.dat
+done
+sv_SE_aliases="sv-FI"
+for lang in $sv_SE_aliases; do
+ ln -s acor_sv-SE.dat acor_$lang.dat
+done
+%else
+rm -f acor_[a-df-z]*.dat acor_e[su]*.dat
+%endif
+popd
+#rhbz#484055 make these shared across multiple applications
+mkdir -p $RPM_BUILD_ROOT/%{_datadir}
+mv -f $RPM_BUILD_ROOT/%{basisinstdir}/share/autocorr $RPM_BUILD_ROOT/%{_datadir}/autocorr
+chmod 755 $RPM_BUILD_ROOT/%{_datadir}/autocorr
+
+%if %{langpacks}
+
+#auto generate the langpack file lists, format is...
+#langpack id, has help or not, autocorrection glob, script classification
+langpackdetails=\
+(\
+af help western ar help ctl \
+bg help western bn help western \
+ca help western cs help western \
+cy nohelp western da help western \
+de help western el help western \
+es help western et help western \
+eu help western fi help western \
+fr help western ga nohelp western \
+gl help western gu nohelp ctl \
+pa-IN help ctl he nohelp ctl \
+hi help ctl hu help western \
+hr nohelp western it help western \
+ja help cjk ko help cjk \
+lt help western ms nohelp western \
+nb help western nl help western \
+nn help western pl help western \
+pt help western pt-BR help western \
+ru help western sk help western \
+sl help western sr help western \
+sv help western ta help ctl \
+th help ctlseqcheck tr help western \
+zh-CN help cjk zh-TW help cjk \
+zu help western tn help western \
+ts help western as nohelp western \
+mr nohelp western ml nohelp western \
+or nohelp ctl te nohelp western \
+ur nohelp western kn nohelp western \
+xh help western ve help western \
+st help western ss help western \
+nr help western ns help western \
+dz help ctl uk help western \
+sh help western mai help western \
+ro nohelp western
+)
+
+tar xzf %{SOURCE22}
+
+i=0
+while [ $i -lt ${#langpackdetails[@]} ]; do
+ lang=${langpackdetails[$i]}
+ sed -e "s/LANG/$lang/g" langpacks/libreoffice.langpack-common.template > $lang.filelist
+ i=$[i+1]
+ help=${langpackdetails[$i]}
+ if [ "$help" = "help" ]; then
+ sed -e "s/LANG/$lang/g" langpacks/libreoffice.langpack-help.template >> $lang.filelist
+ fi
+ i=$[i+1]
+ type=${langpackdetails[$i]}
+ if [ "$type" = "cjk" ]; then
+ sed -e "s/LANG/$lang/g" langpacks/libreoffice.langpack-cjk.template >> $lang.filelist
+ fi
+ #rh217269 upstream made a decision to sequence check all ctl languages
+ #I think this is wrong, and only Thai should be sequence checked
+ if [ "$type" = "ctlseqcheck" ]; then
+ sed -e "s/LANG/$lang/g" langpacks/libreoffice.langpack-ctl.template >> $lang.filelist
+ fi
+ if [ "$type" = "ctl" ]; then
+ rm -f $RPM_BUILD_ROOT/%{basisinstdir}/share/registry/ctl_$lang.xcd
+ fi
+ i=$[i+1]
+done
+
+#rhbz#452379 clump serbian translations together
+cat sh.filelist >> sr.filelist
+
+%endif
+
+#remove it in case we didn't build with gcj
+rm -f $RPM_BUILD_ROOT/%{basisinstdir}/program/classes/sandbox.jar
+
+#remove pagein stuff
+rm -f $RPM_BUILD_ROOT/%{basisinstdir}/program/pagein*
+
+#remove dummy .dat files
+rm -f $RPM_BUILD_ROOT/%{basisinstdir}/program/root?.dat
+
+#set standard permissions for rpmlint
+find $RPM_BUILD_ROOT/%{baseinstdir} -exec chmod +w {} \;
+find $RPM_BUILD_ROOT/%{baseinstdir} -type d -exec chmod 0755 {} \;
+
+# move python bits into site-packages
+mkdir -p $RPM_BUILD_ROOT/%{python_sitearch}
+pushd $RPM_BUILD_ROOT/%{python_sitearch}
+echo "import sys, os" > uno.py
+echo "sys.path.append('%{basisinstdir}/program')" >> uno.py
+echo "os.putenv('URE_BOOTSTRAP', 'vnd.sun.star.pathname:%{baseinstdir}/program/fundamentalrc')" >> uno.py
+cat $RPM_BUILD_ROOT/%{basisinstdir}/program/uno.py >> uno.py
+rm -f $RPM_BUILD_ROOT/%{basisinstdir}/program/uno.py*
+mv -f $RPM_BUILD_ROOT/%{basisinstdir}/program/unohelper.py* .
+popd
+
+# rhbz#477435 package opensymbol separately
+pushd $RPM_BUILD_ROOT/%{basisinstdir}/share/fonts/truetype
+install -d -m 0755 %{buildroot}%{_fontdir}
+install -p -m 0644 *.ttf %{buildroot}%{_fontdir}
+popd
+rm -rf $RPM_BUILD_ROOT/%{basisinstdir}/share/fonts
+
+#ensure that no sneaky un-prelinkable, un-fpic or non executable shared libs
+#have snuck through
+pic=0
+executable=0
+for foo in `find $RPM_BUILD_ROOT/%{instdir} -name "*" -exec file {} \;| grep ": ELF" | cut -d: -f 1` ; do
+ chmod +wx $foo
+ ls -asl $foo
+ result=`readelf -d $foo | grep TEXTREL` || true
+ if [ "$result" != "" ]; then
+ echo "TEXTREL Warning: $foo is b0rked (-fpic missing)"
+ pic=1
+ fi
+ result=`readelf -l $foo | grep GNU_STACK | grep RWE` || true
+ if [ "$result" != "" ]; then
+ echo "GNU_STACK Warning: $foo is b0rked (-noexecstack missing)"
+ executable=1
+ fi
+done
+if [ $pic == 1 ]; then false; fi
+if [ $executable == 1 ]; then false; fi
+
+#make up some /usr/bin scripts
+mkdir -p $RPM_BUILD_ROOT/%{_bindir}
+
+echo \#\!/bin/sh > $RPM_BUILD_ROOT/%{_bindir}/ooffice
+echo exec libreoffice \"\$@\" >> $RPM_BUILD_ROOT/%{_bindir}/ooffice
+chmod a+x $RPM_BUILD_ROOT/%{_bindir}/ooffice
+
+echo \#\!/bin/sh > $RPM_BUILD_ROOT/%{_bindir}/ooviewdoc
+echo exec libreoffice -view \"\$@\" >> $RPM_BUILD_ROOT/%{_bindir}/ooviewdoc
+chmod a+x $RPM_BUILD_ROOT/%{_bindir}/ooviewdoc
+
+echo \#\!/bin/sh > $RPM_BUILD_ROOT/%{_bindir}/oowriter
+echo exec libreoffice -writer \"\$@\" >> $RPM_BUILD_ROOT/%{_bindir}/oowriter
+chmod a+x $RPM_BUILD_ROOT/%{_bindir}/oowriter
+
+echo \#\!/bin/sh > $RPM_BUILD_ROOT/%{_bindir}/oocalc
+echo exec libreoffice -calc \"\$@\" >> $RPM_BUILD_ROOT/%{_bindir}/oocalc
+chmod a+x $RPM_BUILD_ROOT/%{_bindir}/oocalc
+
+echo \#\!/bin/sh > $RPM_BUILD_ROOT/%{_bindir}/ooimpress
+echo exec libreoffice -impress \"\$@\" >> $RPM_BUILD_ROOT/%{_bindir}/ooimpress
+chmod a+x $RPM_BUILD_ROOT/%{_bindir}/ooimpress
+
+echo \#\!/bin/sh > $RPM_BUILD_ROOT/%{_bindir}/oodraw
+echo exec libreoffice -draw \"\$@\" >> $RPM_BUILD_ROOT/%{_bindir}/oodraw
+chmod a+x $RPM_BUILD_ROOT/%{_bindir}/oodraw
+
+echo \#\!/bin/sh > $RPM_BUILD_ROOT/%{_bindir}/oomath
+echo exec libreoffice -math \"\$@\" >> $RPM_BUILD_ROOT/%{_bindir}/oomath
+chmod a+x $RPM_BUILD_ROOT/%{_bindir}/oomath
+
+echo \#\!/bin/sh > $RPM_BUILD_ROOT/%{_bindir}/oobase
+echo exec libreoffice -base \"\$@\" >> $RPM_BUILD_ROOT/%{_bindir}/oobase
+chmod a+x $RPM_BUILD_ROOT/%{_bindir}/oobase
+
+cp -f %{SOURCE25} $RPM_BUILD_ROOT/%{_bindir}/unopkg
+sed -i -e "s/LAUNCHER/unopkg/g" $RPM_BUILD_ROOT/%{_bindir}/unopkg
+sed -i -e "s/BRAND/libreoffice/g" $RPM_BUILD_ROOT/%{_bindir}/unopkg
+chmod a+x $RPM_BUILD_ROOT/%{_bindir}/unopkg
+
+cp -f %{SOURCE25} $RPM_BUILD_ROOT/%{_bindir}/libreoffice
+sed -i -e "s/LAUNCHER/soffice/g" $RPM_BUILD_ROOT/%{_bindir}/libreoffice
+sed -i -e "s/BRAND/libreoffice/g" $RPM_BUILD_ROOT/%{_bindir}/libreoffice
+chmod a+x $RPM_BUILD_ROOT/%{_bindir}/libreoffice
+
+pushd $RPM_BUILD_ROOT/%{_bindir}
+# rhbz#499474 provide a /usr/bin/soffice for .recently-used.xbel
+ln -s %{baseinstdir}/program/soffice soffice
+# rhbz#499474 provide a /usr/bin/openoffice.org for backwards compat
+ln -s %{baseinstdir}/program/libreoffice openoffice.org
+popd
+
+pushd $RPM_BUILD_ROOT/%{baseinstdir}/share/xdg/
+chmod u+w *.desktop
+rm -rf printeradmin.desktop
+for file in *.desktop; do
+ # rhbz#156677 remove the version from Name=
+ sed -i -e "s/$PRODUCTVERSION //g" $file
+ # rhbz#156067 don't version the icons
+ sed -i -e "s/$PRODUCTVERSIONSHORT//g" $file
+ # add X-GIO-NoFuse so we get url:// instead of file://~.gvfs/
+ echo X-GIO-NoFuse=true >> $file
+done
+echo "StartupNotify=true" >> base.desktop
+echo "StartupNotify=true" >> calc.desktop
+echo "StartupNotify=true" >> impress.desktop
+echo "StartupNotify=true" >> writer.desktop
+echo "StartupNotify=true" >> math.desktop
+echo "StartupNotify=true" >> draw.desktop
+echo "TryExec=oobase" >> base.desktop
+echo "TryExec=oocalc" >> calc.desktop
+echo "TryExec=ooimpress" >> impress.desktop
+echo "TryExec=oowriter" >> writer.desktop
+echo "TryExec=oomath" >> math.desktop
+echo "TryExec=oodraw" >> draw.desktop
+# rhbz#156677# / rhbz#186515#
+echo "NoDisplay=true" >> math.desktop
+echo "NoDisplay=true" >> startcenter.desktop
+# rhbz#491159 temporarily remove NoDisplay=true from qstart.desktop
+sed -i -e "/NoDisplay=true/d" qstart.desktop
+# relocate the .desktop and icon files
+mkdir -p $RPM_BUILD_ROOT/%{_datadir}/applications
+cp -p base.desktop $RPM_BUILD_ROOT/%{_datadir}/applications/libreoffice-base.desktop
+cp -p calc.desktop $RPM_BUILD_ROOT/%{_datadir}/applications/libreoffice-calc.desktop
+cp -p impress.desktop $RPM_BUILD_ROOT/%{_datadir}/applications/libreoffice-impress.desktop
+cp -p writer.desktop $RPM_BUILD_ROOT/%{_datadir}/applications/libreoffice-writer.desktop
+cp -p math.desktop $RPM_BUILD_ROOT/%{_datadir}/applications/libreoffice-math.desktop
+cp -p draw.desktop $RPM_BUILD_ROOT/%{_datadir}/applications/libreoffice-draw.desktop
+cp -p javafilter.desktop $RPM_BUILD_ROOT/%{_datadir}/applications/libreoffice-javafilter.desktop
+cp -p startcenter.desktop $RPM_BUILD_ROOT/%{_datadir}/applications/libreoffice-startcenter.desktop
+for desktop in *.desktop; do
+ desktop-file-validate $desktop
+done
+popd
+
+pushd sysui/output/usr/share/
+#get rid of the gnome icons and other unneeded files
+rm -rf icons/gnome applications application-registry
+# rhbz#156067 don't version the icons
+find . -name "*.desktop" -exec sed -i -e s/$PRODUCTVERSIONSHORT//g {} \;
+find . -name "*libreoffice$PRODUCTVERSIONSHORT*" -print \
+ | while read path; do
+ mv $path `echo $path | sed s/libreoffice$PRODUCTVERSIONSHORT/libreoffice/`
+ done
+find . -type l -print \
+ | while read path; do
+ target=`readlink $path`
+ new_target=`echo $target | sed -e s/$PRODUCTVERSIONSHORT//g`
+ if [ "$target" != "$new_target" ]; then
+ ln -sf $new_target $path
+ fi
+ done
+
+sed -i -e s/libreoffice$PRODUCTVERSIONSHORT/libreoffice/g \
+ ./mime-info/libreoffice.keys
+#relocate the rest of them
+cp -r icons $RPM_BUILD_ROOT/%{_datadir}
+cp -r mime-info $RPM_BUILD_ROOT/%{_datadir}
+#add our mime-types, e.g. for .oxt extensions
+mkdir -p $RPM_BUILD_ROOT/%{_datadir}/mime/packages
+cp -p mime/packages/libreoffice.xml $RPM_BUILD_ROOT/%{_datadir}/mime/packages
+popd
+
+rm -rf $RPM_BUILD_ROOT/%{baseinstdir}/readmes
+rm -rf $RPM_BUILD_ROOT/%{baseinstdir}/licenses
+
+mkdir -p $RPM_BUILD_ROOT/%{basisinstdir}/share/psprint/driver
+cp -r psprint_config/configuration/ppds/SGENPRT.PS $RPM_BUILD_ROOT/%{basisinstdir}/share/psprint/driver/SGENPRT.PS
+
+# rhbz#452385 to auto have postgres in classpath if subsequently installed
+# rhbz#465664 to get lucene working for functional help
+sed -i -e "s#URE_MORE_JAVA_CLASSPATH_URLS.*#& file:///usr/share/java/lucene.jar file:///usr/share/java/lucene-contrib/lucene-analyzers.jar file:///usr/share/java/postgresql-jdbc.jar#" $RPM_BUILD_ROOT/%{basisinstdir}/program/fundamentalbasisrc
+
+%check
+source ./Linux*Env.Set.sh
+cd test
+build && deliver -link
+cd ../smoketestoo_native
+#JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY="1" works around flawed accessibility check
+#SAL_USE_VCLPLUGIN="svp" uses the headless plugin for these tests
+JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY="1" SAL_USE_VCLPLUGIN="svp" timeout -k 2m 2h build.pl
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%if %{langpacks}
+%files langpack-af -f af.filelist
+%defattr(-,root,root,-)
+
+%files langpack-ar -f ar.filelist
+%defattr(-,root,root,-)
+
+%files langpack-bg -f bg.filelist
+%defattr(-,root,root,-)
+
+%files langpack-bn -f bn.filelist
+%defattr(-,root,root,-)
+
+%files langpack-ca -f ca.filelist
+%defattr(-,root,root,-)
+
+%files langpack-cs -f cs.filelist
+%defattr(-,root,root,-)
+
+%files langpack-cy -f cy.filelist
+%defattr(-,root,root,-)
+
+%files langpack-da -f da.filelist
+%defattr(-,root,root,-)
+
+%files langpack-de -f de.filelist
+%defattr(-,root,root,-)
+
+%files langpack-el -f el.filelist
+%defattr(-,root,root,-)
+
+%files langpack-en
+%defattr(-,root,root,-)
+
+%files langpack-es -f es.filelist
+%defattr(-,root,root,-)
+
+%files langpack-et -f et.filelist
+%defattr(-,root,root,-)
+
+%files langpack-eu -f eu.filelist
+%defattr(-,root,root,-)
+
+%files langpack-fi -f fi.filelist
+%defattr(-,root,root,-)
+
+%files langpack-fr -f fr.filelist
+%defattr(-,root,root,-)
+
+%files langpack-ga -f ga.filelist
+%defattr(-,root,root,-)
+
+%files langpack-gl -f gl.filelist
+%defattr(-,root,root,-)
+
+%files langpack-gu -f gu.filelist
+%defattr(-,root,root,-)
+
+%files langpack-pa -f pa-IN.filelist
+%defattr(-,root,root,-)
+
+%files langpack-he -f he.filelist
+%defattr(-,root,root,-)
+
+%files langpack-hi -f hi.filelist
+%defattr(-,root,root,-)
+
+%files langpack-hu -f hu.filelist
+%defattr(-,root,root,-)
+
+%files langpack-hr -f hr.filelist
+%defattr(-,root,root,-)
+
+%files langpack-it -f it.filelist
+%defattr(-,root,root,-)
+
+%files langpack-ja -f ja.filelist
+%defattr(-,root,root,-)
+
+%files langpack-ko -f ko.filelist
+%defattr(-,root,root,-)
+%{baseinstdir}/share/registry/korea.xcd
+
+%files langpack-lt -f lt.filelist
+%defattr(-,root,root,-)
+
+%files langpack-ms -f ms.filelist
+%defattr(-,root,root,-)
+
+%files langpack-nb -f nb.filelist
+%defattr(-,root,root,-)
+
+%files langpack-nl -f nl.filelist
+%defattr(-,root,root,-)
+
+%files langpack-nn -f nn.filelist
+%defattr(-,root,root,-)
+
+%files langpack-pl -f pl.filelist
+%defattr(-,root,root,-)
+
+%files langpack-pt-PT -f pt.filelist
+%defattr(-,root,root,-)
+
+%files langpack-pt-BR -f pt-BR.filelist
+%defattr(-,root,root,-)
+
+%files langpack-ru -f ru.filelist
+%defattr(-,root,root,-)
+
+%files langpack-sk -f sk.filelist
+%defattr(-,root,root,-)
+
+%files langpack-sl -f sl.filelist
+%defattr(-,root,root,-)
+
+%files langpack-sr -f sr.filelist
+%defattr(-,root,root,-)
+
+%files langpack-sv -f sv.filelist
+%defattr(-,root,root,-)
+
+%files langpack-ta -f ta.filelist
+%defattr(-,root,root,-)
+
+%files langpack-th -f th.filelist
+%defattr(-,root,root,-)
+
+%files langpack-tr -f tr.filelist
+%defattr(-,root,root,-)
+
+%files langpack-zh-Hans -f zh-CN.filelist
+%defattr(-,root,root,-)
+
+%files langpack-zh-Hant -f zh-TW.filelist
+%defattr(-,root,root,-)
+
+%files langpack-zu -f zu.filelist
+%defattr(-,root,root,-)
+
+%files langpack-tn -f tn.filelist
+%defattr(-,root,root,-)
+
+%files langpack-ts -f ts.filelist
+%defattr(-,root,root,-)
+
+%files langpack-nso -f ns.filelist
+%defattr(-,root,root,-)
+
+%files langpack-nr -f nr.filelist
+%defattr(-,root,root,-)
+
+%files langpack-ss -f ss.filelist
+%defattr(-,root,root,-)
+
+%files langpack-st -f st.filelist
+%defattr(-,root,root,-)
+
+%files langpack-ve -f ve.filelist
+%defattr(-,root,root,-)
+
+%files langpack-xh -f xh.filelist
+%defattr(-,root,root,-)
+
+%files langpack-as -f as.filelist
+%defattr(-,root,root,-)
+
+%files langpack-mr -f mr.filelist
+%defattr(-,root,root,-)
+
+%files langpack-ml -f ml.filelist
+%defattr(-,root,root,-)
+
+%files langpack-or -f or.filelist
+%defattr(-,root,root,-)
+
+%files langpack-te -f te.filelist
+%defattr(-,root,root,-)
+
+%files langpack-ur -f ur.filelist
+%defattr(-,root,root,-)
+
+%files langpack-kn -f kn.filelist
+%defattr(-,root,root,-)
+
+%files langpack-dz -f dz.filelist
+%defattr(-,root,root,-)
+
+%files langpack-uk -f uk.filelist
+%defattr(-,root,root,-)
+
+%files langpack-mai -f mai.filelist
+%defattr(-,root,root,-)
+
+%files langpack-ro -f ro.filelist
+%defattr(-,root,root,-)
+%endif
+
+%files core
+%defattr(-,root,root,-)
+%dir %{basisinstdir}
+%dir %{basisinstdir}/help
+%docdir %{basisinstdir}/help/en
+%dir %{basisinstdir}/help/en
+%{basisinstdir}/help/en/default.css
+%{basisinstdir}/help/en/err.html
+%{basisinstdir}/help/en/highcontrast1.css
+%{basisinstdir}/help/en/highcontrast2.css
+%{basisinstdir}/help/en/highcontrastblack.css
+%{basisinstdir}/help/en/highcontrastwhite.css
+%{basisinstdir}/help/en/sbasic.*
+%{basisinstdir}/help/en/schart.*
+%{basisinstdir}/help/en/shared.*
+%{basisinstdir}/help/idxcaption.xsl
+%{basisinstdir}/help/idxcontent.xsl
+%{basisinstdir}/help/main_transform.xsl
+%{basisinstdir}/presets
+%dir %{basisinstdir}/program
+%{basisinstdir}/program/addin
+%{basisinstdir}/program/basprov%{SOPOST}.uno.so
+%{basisinstdir}/program/canvasfactory.uno.so
+%{basisinstdir}/program/cde-open-url
+%dir %{basisinstdir}/program/classes
+%{basisinstdir}/program/classes/agenda.jar
+%{basisinstdir}/program/classes/commonwizards.jar
+%{basisinstdir}/program/classes/fax.jar
+%{basisinstdir}/program/classes/form.jar
+%{basisinstdir}/program/classes/query.jar
+%{basisinstdir}/program/classes/letter.jar
+%{basisinstdir}/program/classes/LuceneHelpWrapper.jar
+%{basisinstdir}/program/classes/officebean.jar
+%{basisinstdir}/program/classes/report.jar
+%{basisinstdir}/program/classes/saxon9.jar
+%{basisinstdir}/program/classes/ScriptFramework.jar
+%{basisinstdir}/program/classes/ScriptProviderForJava.jar
+%{basisinstdir}/program/classes/table.jar
+%{basisinstdir}/program/classes/unoil.jar
+%{basisinstdir}/program/classes/web.jar
+%{basisinstdir}/program/classes/XMergeBridge.jar
+%{basisinstdir}/program/classes/xmerge.jar
+%{basisinstdir}/program/classes/XSLTFilter.jar
+%{basisinstdir}/program/classes/XSLTValidate.jar
+%{basisinstdir}/program/cmdmail.uno.so
+%{basisinstdir}/program/deployment%{SOPOST}.uno.so
+%{basisinstdir}/program/deploymentgui%{SOPOST}.uno.so
+%{basisinstdir}/program/dlgprov%{SOPOST}.uno.so
+%{basisinstdir}/program/fastsax.uno.so
+%{basisinstdir}/program/fpicker.uno.so
+%{basisinstdir}/program/fps_gnome.uno.so
+%{basisinstdir}/program/fps_office.uno.so
+%{basisinstdir}/program/fundamentalbasisrc
+%{basisinstdir}/program/gengal*
+%{basisinstdir}/program/gnome-open-url
+%{basisinstdir}/program/gnome-open-url.bin
+%{basisinstdir}/program/hatchwindowfactory.uno.so
+%{basisinstdir}/program/i18nsearch.uno.so
+%{basisinstdir}/program/kde-open-url
+%{basisinstdir}/program/legacy_binfilters.rdb
+%{basisinstdir}/program/libacc%{SOPOST}.so
+%{basisinstdir}/program/libadabas%{SOPOST}.so
+%{basisinstdir}/program/libavmedia*.so
+%{basisinstdir}/program/libbasctl%{SOPOST}.so
+%{basisinstdir}/program/libbf_sb%{SOPOST}.so
+%{basisinstdir}/program/libbf_frm%{SOPOST}.so
+%{basisinstdir}/program/libbf_go%{SOPOST}.so
+%{basisinstdir}/program/libbf_migratefilter%{SOPOST}.so
+%{basisinstdir}/program/libbf_ofa%{SOPOST}.so
+%{basisinstdir}/program/libbf_sch%{SOPOST}.so
+%{basisinstdir}/program/libbf_sd%{SOPOST}.so
+%{basisinstdir}/program/libbf_so%{SOPOST}.so
+%{basisinstdir}/program/libbf_svt%{SOPOST}.so
+%{basisinstdir}/program/libbf_svx%{SOPOST}.so
+%{basisinstdir}/program/libbf_wrapper%{SOPOST}.so
+%{basisinstdir}/program/libbf_xo%{SOPOST}.so
+%{basisinstdir}/program/libbib%{SOPOST}.so
+%{basisinstdir}/program/libbindet%{SOPOST}.so
+%{basisinstdir}/program/libcached1.so
+%{basisinstdir}/program/libcanvastools%{SOPOST}.so
+%{basisinstdir}/program/libchart*%{SOPOST}.so
+%{basisinstdir}/program/libcollator_data.so
+%{basisinstdir}/program/libcppcanvas%{SOPOST}.so
+%{basisinstdir}/program/libctl%{SOPOST}.so
+%{basisinstdir}/program/libcui%{SOPOST}.so
+%{basisinstdir}/program/libdba%{SOPOST}.so
+%{basisinstdir}/program/libdbacfg%{SOPOST}.so
+%{basisinstdir}/program/libdbase%{SOPOST}.so
+%{basisinstdir}/program/libdbaxml%{SOPOST}.so
+%{basisinstdir}/program/libdbmm%{SOPOST}.so
+%{basisinstdir}/program/libdbpool2.so
+%{basisinstdir}/program/libdbtools%{SOPOST}.so
+%{basisinstdir}/program/libdbu%{SOPOST}.so
+%{basisinstdir}/program/libdeploymentmisc%{SOPOST}.so
+%{basisinstdir}/program/libdesktop_detector%{SOPOST}.so
+%{basisinstdir}/program/libdict_ja.so
+%{basisinstdir}/program/libdict_zh.so
+%{basisinstdir}/program/libdrawinglayer%{SOPOST}.so
+%{basisinstdir}/program/libediteng%{SOPOST}.so
+%{basisinstdir}/program/libeggtray%{SOPOST}.so
+%{basisinstdir}/program/libembobj.so
+%{basisinstdir}/program/libemboleobj.so
+%{basisinstdir}/program/libevoab*.so
+%{basisinstdir}/program/libevtatt.so
+%{basisinstdir}/program/libegi%{SOPOST}.so
+%{basisinstdir}/program/libeme%{SOPOST}.so
+%{basisinstdir}/program/libepb%{SOPOST}.so
+%{basisinstdir}/program/libepg%{SOPOST}.so
+%{basisinstdir}/program/libepp%{SOPOST}.so
+%{basisinstdir}/program/libeps%{SOPOST}.so
+%{basisinstdir}/program/libept%{SOPOST}.so
+%{basisinstdir}/program/libera%{SOPOST}.so
+%{basisinstdir}/program/libeti%{SOPOST}.so
+%{basisinstdir}/program/libexp%{SOPOST}.so
+%{basisinstdir}/program/libicd%{SOPOST}.so
+%{basisinstdir}/program/libicg%{SOPOST}.so
+%{basisinstdir}/program/libidx%{SOPOST}.so
+%{basisinstdir}/program/libime%{SOPOST}.so
+%{basisinstdir}/program/libindex_data.so
+%{basisinstdir}/program/libipb%{SOPOST}.so
+%{basisinstdir}/program/libipd%{SOPOST}.so
+%{basisinstdir}/program/libips%{SOPOST}.so
+%{basisinstdir}/program/libipt%{SOPOST}.so
+%{basisinstdir}/program/libipx%{SOPOST}.so
+%{basisinstdir}/program/libira%{SOPOST}.so
+%{basisinstdir}/program/libitg%{SOPOST}.so
+%{basisinstdir}/program/libiti%{SOPOST}.so
+%{basisinstdir}/program/libofficebean.so
+%{basisinstdir}/program/liboooimprovecore%{SOPOST}.so
+%{basisinstdir}/program/libfile%{SOPOST}.so
+%{basisinstdir}/program/libfilterconfig1.so
+%{basisinstdir}/program/libflat%{SOPOST}.so
+%{basisinstdir}/program/libfrm%{SOPOST}.so
+%{basisinstdir}/program/libguesslang%{SOPOST}.so
+%{basisinstdir}/program/libhelplinker%{SOPOST}.so
+%{basisinstdir}/program/libhyphen%{SOPOST}.so
+%{basisinstdir}/program/libi18nregexpgcc3.so
+%{basisinstdir}/program/libjdbc%{SOPOST}.so
+%{basisinstdir}/program/liblegacy_binfilters%{SOPOST}.so
+%{basisinstdir}/program/liblng%{SOPOST}.so
+%{basisinstdir}/program/liblog%{SOPOST}.so
+%{basisinstdir}/program/liblocaledata_en.so
+%{basisinstdir}/program/liblocaledata_es.so
+%{basisinstdir}/program/liblocaledata_euro.so
+%{basisinstdir}/program/liblocaledata_others.so
+%{basisinstdir}/program/libmcnttype.so
+%{basisinstdir}/program/libmozbootstrap.so
+%{basisinstdir}/program/libmsfilter%{SOPOST}.so
+%{basisinstdir}/program/libmsforms%{SOPOST}.uno.so
+%{basisinstdir}/program/libmtfrenderer.uno.so
+%{basisinstdir}/program/libmysql%{SOPOST}.so
+%{basisinstdir}/program/libodbc%{SOPOST}.so
+%{basisinstdir}/program/libodbcbase%{SOPOST}.so
+%{basisinstdir}/program/liboffacc%{SOPOST}.so
+%{basisinstdir}/program/liboox%{SOPOST}.so
+%{basisinstdir}/program/libpcr%{SOPOST}.so
+%{basisinstdir}/program/libpdffilter%{SOPOST}.so
+%{basisinstdir}/program/libpl%{SOPOST}.so
+%{basisinstdir}/program/libpreload%{SOPOST}.so
+%{basisinstdir}/program/libprotocolhandler%{SOPOST}.so
+%{basisinstdir}/program/libqstart_gtk%{SOPOST}.so
+%{basisinstdir}/program/librecentfile.so
+%{basisinstdir}/program/libres%{SOPOST}.so
+%{basisinstdir}/program/libsax%{SOPOST}.so
+%{basisinstdir}/program/libscn%{SOPOST}.so
+%{basisinstdir}/program/libscriptframe.so
+%{basisinstdir}/program/libsd%{SOPOST}.so
+%{basisinstdir}/program/libsdfilt%{SOPOST}.so
+%{basisinstdir}/program/libsdbc2.so
+%{basisinstdir}/program/libsdbt%{SOPOST}so
+%{basisinstdir}/program/libsdd%{SOPOST}.so
+%{basisinstdir}/program/libsdui%{SOPOST}.so
+%{basisinstdir}/program/libspa%{SOPOST}.so
+%{basisinstdir}/program/libspell%{SOPOST}.so
+%{basisinstdir}/program/libsrtrs1.so
+%{basisinstdir}/program/libsts%{SOPOST}.so
+%{basisinstdir}/program/libsvx%{SOPOST}.so
+%{basisinstdir}/program/libsvxcore%{SOPOST}.so
+%{basisinstdir}/program/libsw%{SOPOST}.so
+%{basisinstdir}/program/libtextconv_dict.so
+%{basisinstdir}/program/libtextconversiondlgs%{SOPOST}.so
+%{basisinstdir}/program/libtvhlp1.so
+%{basisinstdir}/program/libucbhelper4gcc3.so
+%{basisinstdir}/program/libucpchelp1.so
+%{basisinstdir}/program/libucpdav1.so
+%{basisinstdir}/program/libucpftp1.so
+%{basisinstdir}/program/libucphier1.so
+%{basisinstdir}/program/libucppkg1.so
+%{basisinstdir}/program/libunordf%{SOPOST}.so
+%{basisinstdir}/program/libunopkgapp.so
+%{basisinstdir}/program/libunoxml%{SOPOST}.so
+%{basisinstdir}/program/libupdchk%{SOPOST}.so
+%{basisinstdir}/program/libuui%{SOPOST}.so
+%{basisinstdir}/program/libvbahelper%{SOPOST}.so
+%{basisinstdir}/program/libvclplug_gen%{SOPOST}.so
+%{basisinstdir}/program/libvclplug_gtk%{SOPOST}.so
+%{basisinstdir}/program/libwpgimport%{SOPOST}.so
+%{basisinstdir}/program/libxmlfa%{SOPOST}.so
+%{basisinstdir}/program/libxmlfd%{SOPOST}.so
+%{basisinstdir}/program/libxmx%{SOPOST}.so
+%{basisinstdir}/program/libxof%{SOPOST}.so
+%{basisinstdir}/program/libxsec_fw.so
+%{basisinstdir}/program/libxsec_xmlsec.so
+%{basisinstdir}/program/libxsltdlg%{SOPOST}.so
+%{basisinstdir}/program/libxsltfilter%{SOPOST}.so
+%{basisinstdir}/program/libxstor.so
+%{basisinstdir}/program/migrationoo2.uno.so
+%{basisinstdir}/program/nsplugin
+%{basisinstdir}/program/open-url
+%{basisinstdir}/program/offapi.rdb
+%{basisinstdir}/program/passwordcontainer.uno.so
+%{basisinstdir}/program/plugin
+%{basisinstdir}/program/pluginapp.bin
+%{basisinstdir}/program/productregistration.uno.so
+%dir %{basisinstdir}/program/resource
+%{basisinstdir}/program/resource/avmediaen-US.res
+%{basisinstdir}/program/resource/accen-US.res
+%{basisinstdir}/program/resource/basctlen-US.res
+%{basisinstdir}/program/resource/bf_frmen-US.res
+%{basisinstdir}/program/resource/bf_ofaen-US.res
+%{basisinstdir}/program/resource/bf_schen-US.res
+%{basisinstdir}/program/resource/bf_sden-US.res
+%{basisinstdir}/program/resource/bf_svten-US.res
+%{basisinstdir}/program/resource/bf_svxen-US.res
+%{basisinstdir}/program/resource/biben-US.res
+%{basisinstdir}/program/resource/calen-US.res
+%{basisinstdir}/program/resource/chartcontrolleren-US.res
+%{basisinstdir}/program/resource/cuien-US.res
+%{basisinstdir}/program/resource/dbaen-US.res
+%{basisinstdir}/program/resource/dbmmen-US.res
+%{basisinstdir}/program/resource/dbuen-US.res
+%{basisinstdir}/program/resource/dbwen-US.res
+%{basisinstdir}/program/resource/deploymenten-US.res
+%{basisinstdir}/program/resource/deploymentguien-US.res
+%{basisinstdir}/program/resource/dkten-US.res
+%{basisinstdir}/program/resource/editengen-US.res
+%{basisinstdir}/program/resource/egien-US.res
+%{basisinstdir}/program/resource/emeen-US.res
+%{basisinstdir}/program/resource/epben-US.res
+%{basisinstdir}/program/resource/epgen-US.res
+%{basisinstdir}/program/resource/eppen-US.res
+%{basisinstdir}/program/resource/epsen-US.res
+%{basisinstdir}/program/resource/epten-US.res
+%{basisinstdir}/program/resource/euren-US.res
+%{basisinstdir}/program/resource/fps_officeen-US.res
+%{basisinstdir}/program/resource/frmen-US.res
+%{basisinstdir}/program/resource/fween-US.res
+%{basisinstdir}/program/resource/galen-US.res
+%{basisinstdir}/program/resource/impen-US.res
+%{basisinstdir}/program/resource/ofaen-US.res
+%{basisinstdir}/program/resource/pcren-US.res
+%{basisinstdir}/program/resource/pdffilteren-US.res
+%{basisinstdir}/program/resource/preloaden-US.res
+%{basisinstdir}/program/resource/productregistrationen-US.res
+%{basisinstdir}/program/resource/sanen-US.res
+%{basisinstdir}/program/resource/sben-US.res
+%{basisinstdir}/program/resource/sden-US.res
+%{basisinstdir}/program/resource/sfxen-US.res
+%{basisinstdir}/program/resource/spaen-US.res
+%{basisinstdir}/program/resource/sdbten-US.res
+%{basisinstdir}/program/resource/svsen-US.res
+%{basisinstdir}/program/resource/svten-US.res
+%{basisinstdir}/program/resource/svxen-US.res
+%{basisinstdir}/program/resource/swen-US.res
+%{basisinstdir}/program/resource/textconversiondlgsen-US.res
+%{basisinstdir}/program/resource/tken-US.res
+%{basisinstdir}/program/resource/tplen-US.res
+%{basisinstdir}/program/resource/uuien-US.res
+%{basisinstdir}/program/resource/updchken-US.res
+%{basisinstdir}/program/resource/upden-US.res
+%{basisinstdir}/program/resource/vclen-US.res
+%{basisinstdir}/program/resource/wzien-US.res
+%{basisinstdir}/program/resource/xmlsecen-US.res
+%{basisinstdir}/program/resource/xsltdlgen-US.res
+%{basisinstdir}/program/sax.uno.so
+%{basisinstdir}/program/senddoc
+%{basisinstdir}/program/services.rdb
+%{basisinstdir}/program/simplecanvas.uno.so
+%{basisinstdir}/program/slideshow.uno.so
+%{basisinstdir}/program/libsofficeapp.so
+%{basisinstdir}/program/spadmin.bin
+%{basisinstdir}/program/stringresource%{SOPOST}.uno.so
+%{basisinstdir}/program/syssh.uno.so
+%{basisinstdir}/program/ucpexpand1.uno.so
+%{basisinstdir}/program/ucpext.uno.so
+%{basisinstdir}/program/ucptdoc1.uno.so
+%{basisinstdir}/program/unorc
+%{basisinstdir}/program/updatefeed.uno.so
+%{basisinstdir}/ure-link
+%{basisinstdir}/program/uri-encode
+%{basisinstdir}/program/vbaevents%{SOPOST}.uno.so
+%{basisinstdir}/program/vclcanvas.uno.so
+%{basisinstdir}/program/versionrc
+%{basisinstdir}/program/cairocanvas.uno.so
+%dir %{basisinstdir}/share
+%dir %{basisinstdir}/share/Scripts
+%{basisinstdir}/share/Scripts/java
+%{basisinstdir}/share/autotext
+%{basisinstdir}/share/basic
+%dir %{basisinstdir}/share/config
+%{basisinstdir}/share/config/images.zip
+%{basisinstdir}/share/config/images_classic.zip
+%{basisinstdir}/share/config/images_crystal.zip
+%{basisinstdir}/share/config/images_hicontrast.zip
+%{basisinstdir}/share/config/images_oxygen.zip
+%{basisinstdir}/share/config/images_tango.zip
+%{basisinstdir}/share/config/javasettingsunopkginstall.xml
+%{basisinstdir}/share/config/psetup.xpm
+%{basisinstdir}/share/config/psetupl.xpm
+%dir %{basisinstdir}/share/config/soffice.cfg
+%{basisinstdir}/share/config/soffice.cfg/modules
+%{basisinstdir}/share/config/symbol
+%{basisinstdir}/share/config/webcast
+%{basisinstdir}/share/config/wizard
+%dir %{basisinstdir}/share/dtd
+%{basisinstdir}/share/dtd/officedocument
+%{basisinstdir}/share/gallery
+%dir %{basisinstdir}/share/psprint
+%config %{basisinstdir}/share/psprint/psprint.conf
+%{basisinstdir}/share/psprint/driver
+%dir %{basisinstdir}/share/registry
+%{basisinstdir}/share/registry/binfilter.xcd
+%{basisinstdir}/share/registry/gnome.xcd
+%{basisinstdir}/share/registry/lingucomponent.xcd
+%{basisinstdir}/share/registry/main.xcd
+%{basisinstdir}/share/registry/oo-ad-ldap.xcd.sample
+%{basisinstdir}/share/registry/oo-ldap.xcd.sample
+%{basisinstdir}/share/registry/Langpack-en-US.xcd
+%dir %{basisinstdir}/share/registry/modules
+%dir %{basisinstdir}/share/registry/modules/org
+%dir %{basisinstdir}/share/registry/modules/org/openoffice
+%dir %{basisinstdir}/share/registry/modules/org/openoffice/Office
+%dir %{basisinstdir}/share/registry/modules/org/openoffice/Office/Paths
+%{basisinstdir}/share/registry/modules/org/openoffice/Office/Paths/SystemAutoCorrect.xcu
+%dir %{basisinstdir}/share/registry/modules/org/openoffice/Office/Recovery
+%{basisinstdir}/share/registry/modules/org/openoffice/Office/Recovery/AutoSaveRecovery.xcu
+%dir %{basisinstdir}/share/registry/res
+%{basisinstdir}/share/registry/res/fcfg_langpack_en-US.xcd
+%dir %{basisinstdir}/share/samples
+%{basisinstdir}/share/samples/en-US
+%dir %{basisinstdir}/share/template
+%{basisinstdir}/share/template/en-US
+%{basisinstdir}/share/template/wizard
+%dir %{basisinstdir}/share/wordbook
+%{basisinstdir}/share/wordbook/en-US
+%dir %{basisinstdir}/share/xslt
+%{basisinstdir}/share/xslt/common
+%dir %{basisinstdir}/share/xslt/export
+%{basisinstdir}/share/xslt/export/common
+%{basisinstdir}/share/xslt/export/spreadsheetml
+%{basisinstdir}/share/xslt/export/wordml
+%dir %{basisinstdir}/share/xslt/import
+%{basisinstdir}/share/xslt/import/common
+%{basisinstdir}/share/xslt/import/spreadsheetml
+%{basisinstdir}/share/xslt/import/wordml
+%{basisinstdir}/program/liblnth%{SOPOST}.so
+%{_bindir}/unopkg
+#icons and mime
+%{_datadir}/icons/*/*/*/gnome*
+%{_datadir}/icons/*/*/*/libreoffice*
+%{_datadir}/mime-info/libreoffice.*
+%{basisinstdir}/program/libxmlsecurity.so
+%{_datadir}/mime/packages/libreoffice.xml
+%{basisinstdir}/program/configmgr.uno.so
+%{basisinstdir}/program/desktopbe1.uno.so
+%{basisinstdir}/program/fsstorage.uno.so
+%{basisinstdir}/program/gconfbe1.uno.so
+%{basisinstdir}/program/i18npool.uno.so
+%{basisinstdir}/program/libbasegfx%{SOPOST}.so
+%{basisinstdir}/program/libcomphelp4gcc3.so
+%{basisinstdir}/program/libfileacc.so
+%{basisinstdir}/program/libfwe%{SOPOST}.so
+%{basisinstdir}/program/libfwi%{SOPOST}.so
+%{basisinstdir}/program/libfwk%{SOPOST}.so
+%{basisinstdir}/program/libfwl%{SOPOST}.so
+%{basisinstdir}/program/libfwm%{SOPOST}.so
+%{basisinstdir}/program/libi18nisolang*.so
+%{basisinstdir}/program/libi18npaper*.so
+%{basisinstdir}/program/libi18nutilgcc3.so
+%{basisinstdir}/program/libpackage2.so
+%{basisinstdir}/program/libsb%{SOPOST}.so
+%{basisinstdir}/program/libsfx%{SOPOST}.so
+%{basisinstdir}/program/libsot%{SOPOST}.so
+%{basisinstdir}/program/libspl%{SOPOST}.so
+%{basisinstdir}/program/libsvl%{SOPOST}.so
+%{basisinstdir}/program/libsvt%{SOPOST}.so
+%{basisinstdir}/program/libtk%{SOPOST}.so
+%{basisinstdir}/program/libtl%{SOPOST}.so
+%{basisinstdir}/program/libucb1.so
+%{basisinstdir}/program/libucpfile1.so
+%{basisinstdir}/program/libutl%{SOPOST}.so
+%{basisinstdir}/program/libvcl%{SOPOST}.so
+%{basisinstdir}/program/libvos3gcc3.so
+%{basisinstdir}/program/libxcr%{SOPOST}.so
+%{basisinstdir}/program/libxo%{SOPOST}.so
+%{basisinstdir}/program/localebe1.uno.so
+%{basisinstdir}/program/ucpgio1.uno.so
+%{basisinstdir}/program/oovbaapi.rdb
+#share unopkg
+%dir %{baseinstdir}
+%{baseinstdir}/basis-link
+%dir %{baseinstdir}/share
+%dir %{baseinstdir}/share/extensions
+%{baseinstdir}/share/extensions/package.txt
+%dir %{baseinstdir}/program
+%{baseinstdir}/program/unopkg
+%{baseinstdir}/program/unopkg.bin
+%{baseinstdir}/program/bootstraprc
+%{baseinstdir}/program/fundamentalrc
+%{baseinstdir}/program/setuprc
+%{baseinstdir}/program/versionrc
+%doc %{baseinstdir}/LICENSE
+%doc %{baseinstdir}/LICENSE.html
+%doc %{baseinstdir}/LICENSE.odt
+%doc %{baseinstdir}/README
+%doc %{baseinstdir}/README.html
+%doc %{baseinstdir}/THIRDPARTYLICENSEREADME.html
+%dir %{baseinstdir}/program
+%{baseinstdir}/program/about.*
+%{baseinstdir}/program/intro.*
+%dir %{baseinstdir}/program/resource
+%{baseinstdir}/program/resource/oooen-US.res
+%{baseinstdir}/program/soffice
+%{baseinstdir}/program/soffice.bin
+%{baseinstdir}/program/sofficerc
+%{baseinstdir}/program/spadmin
+%{baseinstdir}/program/unoinfo
+%{baseinstdir}/program/libnpsoplugin.so
+%dir %{baseinstdir}/share
+%dir %{baseinstdir}/share/config
+%{baseinstdir}/share/config/images_brand.zip
+%docdir %{baseinstdir}/share/readme
+%dir %{baseinstdir}/share/readme
+%{baseinstdir}/share/readme/LICENSE_en-US
+%{baseinstdir}/share/readme/LICENSE_en-US.html
+%{baseinstdir}/share/readme/README_en-US
+%{baseinstdir}/share/readme/README_en-US.html
+%dir %{baseinstdir}/share/registry
+%{baseinstdir}/share/registry/brand.xcd
+%{baseinstdir}/share/xdg/
+%{baseinstdir}/program/redirectrc
+%{_datadir}/applications/libreoffice-startcenter.desktop
+#launchers
+%{_bindir}/libreoffice
+%{_bindir}/openoffice.org
+%{_bindir}/soffice
+%{_bindir}/ooffice
+%{_bindir}/ooviewdoc
+
+%post core
+update-mime-database %{_datadir}/mime &> /dev/null || :
+update-desktop-database %{_datadir}/applications &> /dev/null || :
+if [ -x /usr/bin/gtk-update-icon-cache ]; then
+ for theme in hicolor locolor; do
+ if test -d "%{_datadir}/icons/$theme"; then
+ if test -f "%{_datadir}/icons/$theme/index.theme"; then
+ touch --no-create %{_datadir}/icons/$theme
+ gtk-update-icon-cache -q %{_datadir}/icons/$theme
+ fi
+ fi
+ done
+fi
+
+%postun core
+update-mime-database %{_datadir}/mime &> /dev/null || :
+update-desktop-database %{_datadir}/applications &> /dev/null || :
+if [ -x /usr/bin/gtk-update-icon-cache ]; then
+ for theme in hicolor locolor; do
+ if test -d "%{_datadir}/icons/$theme"; then
+ if test -f "%{_datadir}/icons/$theme/index.theme"; then
+ touch --no-create %{_datadir}/icons/$theme
+ gtk-update-icon-cache -q %{_datadir}/icons/$theme
+ fi
+ fi
+ done
+fi
+
+%files base
+%defattr(-,root,root,-)
+%dir %{basisinstdir}
+%{basisinstdir}/help/en/sdatabase.*
+%dir %{basisinstdir}/program
+%dir %{basisinstdir}/program/classes
+%{basisinstdir}/program/classes/sdbc_hsqldb.jar
+%{basisinstdir}/program/libabp%{SOPOST}.so
+%{basisinstdir}/program/libadabasui%{SOPOST}.so
+%{basisinstdir}/program/libdbp%{SOPOST}.so
+%{basisinstdir}/program/libhsqldb.so
+%{basisinstdir}/program/librpt*%{SOPOST}.so
+%dir %{basisinstdir}/program/resource
+%{basisinstdir}/program/resource/abpen-US.res
+%{basisinstdir}/program/resource/adabasuien-US.res
+%{basisinstdir}/program/resource/cnren-US.res
+%{basisinstdir}/program/resource/dbpen-US.res
+%{basisinstdir}/program/resource/rpten-US.res
+%{basisinstdir}/program/resource/rptuien-US.res
+%{basisinstdir}/program/resource/sdbclen-US.res
+%{basisinstdir}/program/resource/sdberren-US.res
+%{basisinstdir}/share/registry/base.xcd
+%dir %{baseinstdir}
+%dir %{baseinstdir}/program
+%{baseinstdir}/program/sbase
+%{_datadir}/applications/libreoffice-base.desktop
+%{_bindir}/oobase
+
+%post base
+update-desktop-database %{_datadir}/applications &> /dev/null || :
+
+%postun base
+update-desktop-database %{_datadir}/applications &> /dev/null || :
+
+%files report-builder
+%defattr(-,root,root,-)
+%docdir %{baseinstdir}/share/extensions/report-builder/help
+%{baseinstdir}/share/extensions/report-builder
+
+%files bsh
+%defattr(-,root,root,-)
+%{basisinstdir}/share/Scripts/beanshell
+%{baseinstdir}/share/extensions/ScriptProviderForBeanShell.oxt
+
+%files rhino
+%defattr(-,root,root,-)
+%{basisinstdir}/program/classes/js.jar
+%{basisinstdir}/share/Scripts/javascript
+%{baseinstdir}/share/extensions/ScriptProviderForJavaScript.oxt
+
+%files wiki-publisher
+%defattr(-,root,root,-)
+%docdir %{baseinstdir}/share/extensions/wiki-publisher/license
+%{baseinstdir}/share/extensions/wiki-publisher
+
+%files ogltrans
+%defattr(-,root,root,-)
+%dir %{baseinstdir}
+%dir %{basisinstdir}/program
+%{basisinstdir}/program/OGLTrans.uno.so
+%dir %{basisinstdir}/share/config
+%dir %{basisinstdir}/share/config/soffice.cfg
+%dir %{basisinstdir}/share/config/soffice.cfg/simpress
+%{basisinstdir}/share/config/soffice.cfg/simpress/transitions-ogl.xml
+%{basisinstdir}/share/registry/ogltrans.xcd
+
+%files presentation-minimizer
+%defattr(-,root,root,-)
+%docdir %{baseinstdir}/share/extensions/presentation-minimizer/help
+%{baseinstdir}/share/extensions/presentation-minimizer
+
+%files presenter-screen
+%defattr(-,root,root,-)
+%docdir %{baseinstdir}/share/extensions/presenter-screen/help
+%{baseinstdir}/share/extensions/presenter-screen
+
+%files pdfimport
+%defattr(-,root,root,-)
+%docdir %{baseinstdir}/share/extensions/pdfimport/help
+%{baseinstdir}/share/extensions/pdfimport
+
+%_font_pkg -n %{fontname} opens___.ttf
+%doc solver/%{OFFICEUPD}/unxlng*/bin/ure/LICENSE
+%dir %{_fontdir}
+
+%files calc
+%defattr(-,root,root,-)
+%dir %{basisinstdir}
+%{basisinstdir}/help/en/scalc.*
+%dir %{basisinstdir}/program
+%{basisinstdir}/program/libanalysis%{SOPOST}.so
+%{basisinstdir}/program/libbf_sc%{SOPOST}.so
+%{basisinstdir}/program/libcalc%{SOPOST}.so
+%{basisinstdir}/program/libdate%{SOPOST}.so
+%{basisinstdir}/program/libfor%{SOPOST}.so
+%{basisinstdir}/program/libforui%{SOPOST}.so
+%{basisinstdir}/program/libsc%{SOPOST}.so
+%{basisinstdir}/program/libscd%{SOPOST}.so
+%{basisinstdir}/program/libscfilt%{SOPOST}.so
+%{basisinstdir}/program/libscui%{SOPOST}.so
+%{basisinstdir}/program/libsolver%{SOPOST}.so
+%dir %{basisinstdir}/program/resource
+%{basisinstdir}/program/resource/analysisen-US.res
+%{basisinstdir}/program/resource/bf_scen-US.res
+%{basisinstdir}/program/resource/dateen-US.res
+%{basisinstdir}/program/resource/foren-US.res
+%{basisinstdir}/program/resource/foruien-US.res
+%{basisinstdir}/program/resource/scen-US.res
+%{basisinstdir}/program/resource/solveren-US.res
+%{basisinstdir}/program/libvbaobj%{SOPOST}.uno.so
+%{basisinstdir}/share/registry/calc.xcd
+%dir %{baseinstdir}
+%dir %{baseinstdir}/program
+%{baseinstdir}/program/scalc
+%{baseinstdir}/program/scalc.bin
+%{_datadir}/applications/libreoffice-calc.desktop
+%{_bindir}/oocalc
+
+%post calc
+update-desktop-database %{_datadir}/applications &> /dev/null || :
+
+%postun calc
+update-desktop-database %{_datadir}/applications &> /dev/null || :
+
+%files draw
+%defattr(-,root,root,-)
+%dir %{basisinstdir}
+%{basisinstdir}/help/en/sdraw.*
+%{basisinstdir}/share/registry/draw.xcd
+%dir %{baseinstdir}
+%dir %{baseinstdir}/program
+%{baseinstdir}/program/sdraw
+%{baseinstdir}/program/sdraw.bin
+%{_datadir}/applications/libreoffice-draw.desktop
+%{_bindir}/oodraw
+
+%post draw
+update-desktop-database %{_datadir}/applications &> /dev/null || :
+
+%postun draw
+update-desktop-database %{_datadir}/applications &> /dev/null || :
+
+%files emailmerge
+%defattr(-,root,root,-)
+%dir %{basisinstdir}
+%dir %{basisinstdir}/program
+%{basisinstdir}/program/mailmerge.py*
+
+%files writer
+%defattr(-,root,root,-)
+%dir %{basisinstdir}
+%{basisinstdir}/help/en/swriter.*
+%dir %{basisinstdir}/program
+%{basisinstdir}/program/libbf_sw%{SOPOST}.so
+%{basisinstdir}/program/libhwp.so
+%{basisinstdir}/program/libmsword%{SOPOST}.so
+%{basisinstdir}/program/libmsworks%{SOPOST}.so
+%{basisinstdir}/program/libswd%{SOPOST}.so
+%{basisinstdir}/program/libswui%{SOPOST}.so
+%{basisinstdir}/program/libt602filter%{SOPOST}.so
+%{basisinstdir}/program/libwpft%{SOPOST}.so
+%{basisinstdir}/program/libwriterfilter%{SOPOST}.so
+%{basisinstdir}/program/libvbaswobj%{SOPOST}.uno.so
+%dir %{basisinstdir}/program/resource
+%{basisinstdir}/program/resource/bf_swen-US.res
+%{basisinstdir}/program/resource/t602filteren-US.res
+%dir %{basisinstdir}/share/registry/modules
+%dir %{basisinstdir}/share/registry/modules/org
+%dir %{basisinstdir}/share/registry/modules/org/openoffice
+%dir %{basisinstdir}/share/registry/modules/org/openoffice/Office
+%dir %{basisinstdir}/share/registry/modules/org/openoffice/Office/Writer
+%{basisinstdir}/share/registry/modules/org/openoffice/Office/Writer/TableNumberRecognition.xcu
+%{basisinstdir}/share/registry/writer.xcd
+%dir %{baseinstdir}
+%dir %{baseinstdir}/program
+%{baseinstdir}/program/swriter
+%{baseinstdir}/program/swriter.bin
+%{_datadir}/applications/libreoffice-writer.desktop
+%{_bindir}/oowriter
+
+%post writer
+update-desktop-database %{_datadir}/applications &> /dev/null || :
+
+%postun writer
+update-desktop-database %{_datadir}/applications &> /dev/null || :
+
+%files impress
+%defattr(-,root,root,-)
+%dir %{basisinstdir}
+%{basisinstdir}/help/en/simpress.*
+%dir %{basisinstdir}/program
+%{basisinstdir}/program/libanimcore.so
+%{basisinstdir}/program/libplaceware*.so
+%dir %{basisinstdir}/share/config
+%dir %{basisinstdir}/share/config/soffice.cfg
+%dir %{basisinstdir}/share/config/soffice.cfg/simpress
+%{basisinstdir}/share/config/soffice.cfg/simpress/effects.xml
+%{basisinstdir}/share/config/soffice.cfg/simpress/transitions.xml
+%{basisinstdir}/share/registry/impress.xcd
+%dir %{baseinstdir}
+%dir %{baseinstdir}/program
+%{baseinstdir}/program/simpress
+%{baseinstdir}/program/simpress.bin
+%{_datadir}/applications/libreoffice-impress.desktop
+%{_bindir}/ooimpress
+
+%post impress
+update-desktop-database %{_datadir}/applications &> /dev/null || :
+
+%postun impress
+update-desktop-database %{_datadir}/applications &> /dev/null || :
+
+%files math
+%defattr(-,root,root,-)
+%dir %{basisinstdir}
+%{basisinstdir}/help/en/smath.*
+%dir %{basisinstdir}/program
+%{basisinstdir}/program/libbf_sm%{SOPOST}.so
+%{basisinstdir}/program/libsm%{SOPOST}.so
+%{basisinstdir}/program/libsmd%{SOPOST}.so
+%dir %{basisinstdir}/program/resource
+%{basisinstdir}/program/resource/bf_smen-US.res
+%{basisinstdir}/program/resource/smen-US.res
+%dir %{basisinstdir}/share/registry/modules
+%dir %{basisinstdir}/share/registry/modules/org
+%dir %{basisinstdir}/share/registry/modules/org/openoffice
+%dir %{basisinstdir}/share/registry/modules/org/openoffice/Office
+%dir %{basisinstdir}/share/registry/modules/org/openoffice/Office/Math
+%{basisinstdir}/share/registry/modules/org/openoffice/Office/Math/MathPrintOptions.xcu
+%{basisinstdir}/share/registry/math.xcd
+%dir %{baseinstdir}
+%dir %{baseinstdir}/program
+%{baseinstdir}/program/smath
+%{_datadir}/applications/libreoffice-math.desktop
+%{_bindir}/oomath
+
+%post math
+update-desktop-database %{_datadir}/applications &> /dev/null || :
+
+%postun math
+update-desktop-database %{_datadir}/applications &> /dev/null || :
+
+%files graphicfilter
+%defattr(-,root,root,-)
+%dir %{basisinstdir}
+%dir %{basisinstdir}/program
+%{basisinstdir}/program/libflash%{SOPOST}.so
+%{basisinstdir}/program/libsvgfilter%{SOPOST}.so
+%{basisinstdir}/share/registry/graphicfilter.xcd
+
+%files xsltfilter
+%defattr(-,root,root,-)
+%dir %{basisinstdir}
+%dir %{basisinstdir}/share/xslt
+%{basisinstdir}/share/xslt/docbook
+%dir %{basisinstdir}/share/xslt/export
+%{basisinstdir}/share/xslt/export/uof
+%{basisinstdir}/share/xslt/export/xhtml
+%dir %{basisinstdir}/share/xslt/import
+%{basisinstdir}/share/xslt/import/uof
+%{basisinstdir}/share/registry/xsltfilter.xcd
+
+%files javafilter
+%defattr(-,root,root,-)
+%dir %{basisinstdir}
+%dir %{basisinstdir}/program
+%dir %{basisinstdir}/program/classes
+%{basisinstdir}/program/classes/aportisdoc.jar
+%{basisinstdir}/program/classes/pexcel.jar
+%{basisinstdir}/program/classes/pocketword.jar
+%{_datadir}/applications/libreoffice-javafilter.desktop
+%{basisinstdir}/share/registry/palm.xcd
+%{basisinstdir}/share/registry/pocketexcel.xcd
+%{basisinstdir}/share/registry/pocketword.xcd
+
+%files testtools
+%defattr(-,root,root,-)
+%dir %{basisinstdir}
+%dir %{basisinstdir}/program
+%{basisinstdir}/program/hid.lst
+%{basisinstdir}/program/libcommuni%{SOPOST}.so
+%{ureinstdir}/lib/libsalalloc_malloc.so.3
+%{basisinstdir}/program/libsimplecm%{SOPOST}.so
+%{basisinstdir}/program/testtoolrc
+%{basisinstdir}/program/testtool.bin
+%dir %{basisinstdir}/program/resource
+%{basisinstdir}/program/resource/stten-US.res
+
+%files ure
+%defattr(-,root,root,-)
+%doc solver/%{OFFICEUPD}/unxlng*/bin/ure/LICENSE
+%dir %{baseinstdir}
+%{ureinstdir}
+%exclude %{ureinstdir}/lib/libsalalloc_malloc.so.3
+
+%files sdk
+%defattr(-,root,root,-)
+%{sdkinstdir}/
+%exclude %{sdkinstdir}/docs/
+%exclude %{sdkinstdir}/examples/
+
+%files sdk-doc
+%defattr(-,root,root,-)
+%docdir %{sdkinstdir}/docs
+%{sdkinstdir}/docs/
+%{sdkinstdir}/examples/
+
+%files headless
+%defattr(-,root,root,-)
+%dir %{basisinstdir}
+%dir %{basisinstdir}/program
+%{basisinstdir}/program/libbasebmp%{SOPOST}.so
+%{basisinstdir}/program/libvclplug_svp%{SOPOST}.so
+
+%files pyuno
+%defattr(-,root,root,-)
+%dir %{basisinstdir}
+%dir %{basisinstdir}/program
+%{basisinstdir}/program/libpyuno.so
+%{basisinstdir}/program/officehelper.py*
+%{basisinstdir}/program/pythonloader.py*
+%{basisinstdir}/program/pythonloader.uno.so
+%{basisinstdir}/program/pythonloader.unorc
+%{basisinstdir}/program/pyuno.so
+%dir %{basisinstdir}/share/Scripts
+%{basisinstdir}/share/Scripts/python
+%{python_sitearch}/uno.py*
+%{python_sitearch}/unohelper.py*
+%{baseinstdir}/share/extensions/ScriptProviderForPython.oxt
+%{basisinstdir}/share/registry/pyuno.xcd
+
+%files -n autocorr-en
+%defattr(-,root,root,-)
+%doc solver/%{OFFICEUPD}/unxlng*/bin/ure/LICENSE
+%dir %{_datadir}/autocorr
+%{_datadir}/autocorr/acor_en-*
+
+%if %{langpacks}
+
+%files -n autocorr-af
+%defattr(-,root,root,-)
+%doc solver/%{OFFICEUPD}/unxlng*/bin/ure/LICENSE
+%dir %{_datadir}/autocorr
+%{_datadir}/autocorr/acor_af-*
+
+%files -n autocorr-bg
+%defattr(-,root,root,-)
+%doc solver/%{OFFICEUPD}/unxlng*/bin/ure/LICENSE
+%dir %{_datadir}/autocorr
+%{_datadir}/autocorr/acor_bg-*
+
+%files -n autocorr-cs
+%defattr(-,root,root,-)
+%doc solver/%{OFFICEUPD}/unxlng*/bin/ure/LICENSE
+%dir %{_datadir}/autocorr
+%{_datadir}/autocorr/acor_cs-*
+
+%files -n autocorr-da
+%defattr(-,root,root,-)
+%doc solver/%{OFFICEUPD}/unxlng*/bin/ure/LICENSE
+%dir %{_datadir}/autocorr
+%{_datadir}/autocorr/acor_da-*
+
+%files -n autocorr-de
+%defattr(-,root,root,-)
+%doc solver/%{OFFICEUPD}/unxlng*/bin/ure/LICENSE
+%dir %{_datadir}/autocorr
+%{_datadir}/autocorr/acor_de-*
+
+%files -n autocorr-es
+%defattr(-,root,root,-)
+%doc solver/%{OFFICEUPD}/unxlng*/bin/ure/LICENSE
+%dir %{_datadir}/autocorr
+%{_datadir}/autocorr/acor_es-*
+
+%files -n autocorr-eu
+%defattr(-,root,root,-)
+%doc solver/%{OFFICEUPD}/unxlng*/bin/ure/LICENSE
+%dir %{_datadir}/autocorr
+%{_datadir}/autocorr/acor_eu.dat
+
+%files -n autocorr-fa
+%defattr(-,root,root,-)
+%doc solver/%{OFFICEUPD}/unxlng*/bin/ure/LICENSE
+%dir %{_datadir}/autocorr
+%{_datadir}/autocorr/acor_fa-*
+
+%files -n autocorr-fi
+%defattr(-,root,root,-)
+%doc solver/%{OFFICEUPD}/unxlng*/bin/ure/LICENSE
+%dir %{_datadir}/autocorr
+%{_datadir}/autocorr/acor_fi-*
+
+%files -n autocorr-fr
+%defattr(-,root,root,-)
+%doc solver/%{OFFICEUPD}/unxlng*/bin/ure/LICENSE
+%dir %{_datadir}/autocorr
+%{_datadir}/autocorr/acor_fr-*
+
+%files -n autocorr-ga
+%defattr(-,root,root,-)
+%doc solver/%{OFFICEUPD}/unxlng*/bin/ure/LICENSE
+%dir %{_datadir}/autocorr
+%{_datadir}/autocorr/acor_ga-*
+
+%files -n autocorr-hu
+%defattr(-,root,root,-)
+%doc solver/%{OFFICEUPD}/unxlng*/bin/ure/LICENSE
+%dir %{_datadir}/autocorr
+%{_datadir}/autocorr/acor_hu-*
+
+%files -n autocorr-it
+%defattr(-,root,root,-)
+%doc solver/%{OFFICEUPD}/unxlng*/bin/ure/LICENSE
+%dir %{_datadir}/autocorr
+%{_datadir}/autocorr/acor_it-*
+
+%files -n autocorr-ja
+%defattr(-,root,root,-)
+%doc solver/%{OFFICEUPD}/unxlng*/bin/ure/LICENSE
+%dir %{_datadir}/autocorr
+%{_datadir}/autocorr/acor_ja-*
+
+%files -n autocorr-ko
+%defattr(-,root,root,-)
+%doc solver/%{OFFICEUPD}/unxlng*/bin/ure/LICENSE
+%dir %{_datadir}/autocorr
+%{_datadir}/autocorr/acor_ko-*
+
+%files -n autocorr-lb
+%defattr(-,root,root,-)
+%doc solver/%{OFFICEUPD}/unxlng*/bin/ure/LICENSE
+%dir %{_datadir}/autocorr
+%{_datadir}/autocorr/acor_lb-*
+
+%files -n autocorr-lt
+%defattr(-,root,root,-)
+%doc solver/%{OFFICEUPD}/unxlng*/bin/ure/LICENSE
+%dir %{_datadir}/autocorr
+%{_datadir}/autocorr/acor_lt-*
+
+%files -n autocorr-nl
+%defattr(-,root,root,-)
+%doc solver/%{OFFICEUPD}/unxlng*/bin/ure/LICENSE
+%dir %{_datadir}/autocorr
+%{_datadir}/autocorr/acor_nl-*
+
+%files -n autocorr-mn
+%defattr(-,root,root,-)
+%doc solver/%{OFFICEUPD}/unxlng*/bin/ure/LICENSE
+%dir %{_datadir}/autocorr
+%{_datadir}/autocorr/acor_mn-*
+
+%files -n autocorr-pl
+%defattr(-,root,root,-)
+%doc solver/%{OFFICEUPD}/unxlng*/bin/ure/LICENSE
+%dir %{_datadir}/autocorr
+%{_datadir}/autocorr/acor_pl-*
+
+%files -n autocorr-pt
+%defattr(-,root,root,-)
+%doc solver/%{OFFICEUPD}/unxlng*/bin/ure/LICENSE
+%dir %{_datadir}/autocorr
+%{_datadir}/autocorr/acor_pt-*
+
+%files -n autocorr-ru
+%defattr(-,root,root,-)
+%doc solver/%{OFFICEUPD}/unxlng*/bin/ure/LICENSE
+%dir %{_datadir}/autocorr
+%{_datadir}/autocorr/acor_ru-*
+
+%files -n autocorr-sk
+%defattr(-,root,root,-)
+%doc solver/%{OFFICEUPD}/unxlng*/bin/ure/LICENSE
+%dir %{_datadir}/autocorr
+%{_datadir}/autocorr/acor_sk-*
+
+%files -n autocorr-sl
+%defattr(-,root,root,-)
+%doc solver/%{OFFICEUPD}/unxlng*/bin/ure/LICENSE
+%dir %{_datadir}/autocorr
+%{_datadir}/autocorr/acor_sl-*
+
+%files -n autocorr-sr
+%defattr(-,root,root,-)
+%doc solver/%{OFFICEUPD}/unxlng*/bin/ure/LICENSE
+%dir %{_datadir}/autocorr
+%{_datadir}/autocorr/acor_sr-*
+%{_datadir}/autocorr/acor_sh-*
+
+%files -n autocorr-sv
+%defattr(-,root,root,-)
+%doc solver/%{OFFICEUPD}/unxlng*/bin/ure/LICENSE
+%dir %{_datadir}/autocorr
+%{_datadir}/autocorr/acor_sv-*
+
+%files -n autocorr-tr
+%defattr(-,root,root,-)
+%doc solver/%{OFFICEUPD}/unxlng*/bin/ure/LICENSE
+%dir %{_datadir}/autocorr
+%{_datadir}/autocorr/acor_tr-*
+
+%files -n autocorr-vi
+%defattr(-,root,root,-)
+%doc solver/%{OFFICEUPD}/unxlng*/bin/ure/LICENSE
+%dir %{_datadir}/autocorr
+%{_datadir}/autocorr/acor_vi-*
+
+%files -n autocorr-zh
+%defattr(-,root,root,-)
+%doc solver/%{OFFICEUPD}/unxlng*/bin/ure/LICENSE
+%dir %{_datadir}/autocorr
+%{_datadir}/autocorr/acor_zh-*
+
+%endif
+
+%changelog
+* Wed Oct 06 2010 Caolán McNamara 3.2.99.1-2
+- Related: rhbz#639945 pull in review changes
+ + redland build-fix
+ + replace awk script
+ + validate .destop files
+
+* Wed Sep 29 2010 Caolán McNamara 3.2.99.1-1
+- initial import of the leviathan
diff --git a/manifest.xml b/manifest.xml
new file mode 100644
index 0000000..280b1a5
--- /dev/null
+++ b/manifest.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
diff --git a/openoffice.org-1.9.123.ooo53397.prelinkoptimize.desktop.patch b/openoffice.org-1.9.123.ooo53397.prelinkoptimize.desktop.patch
new file mode 100644
index 0000000..b10bc6f
--- /dev/null
+++ b/openoffice.org-1.9.123.ooo53397.prelinkoptimize.desktop.patch
@@ -0,0 +1,111 @@
+diff -r a92d0bd6747b desktop/prj/build.lst
+--- a/desktop/prj/build.lst Mon Dec 28 16:11:17 2009 +0100
++++ b/desktop/prj/build.lst Wed Dec 30 09:34:10 2009 +0100
+@@ -1,4 +1,4 @@
+-dt desktop : l10n sfx2 stoc BERKELEYDB:berkeleydb sysui SO:sysui_so BOOST:boost svx xmlhelp sal unoil officecfg offuh NULL
++dt desktop : l10n sfx2 stoc BERKELEYDB:berkeleydb sysui SO:sysui_so BOOST:boost svx xmlhelp sal unoil officecfg offuh sc sd sw NULL
+ dt desktop usr1 - all dt_mkout NULL
+ dt desktop\inc nmake - all dt_inc NULL
+ dt desktop\prj get - all dt_prj NULL
+diff -r a92d0bd6747b desktop/scripts/soffice.sh
+--- a/desktop/scripts/soffice.sh Mon Dec 28 16:11:17 2009 +0100
++++ b/desktop/scripts/soffice.sh Wed Dec 30 09:34:10 2009 +0100
+@@ -73,30 +73,26 @@
+ esac
+ done
+
+-# pagein
+-sd_pagein_args=@pagein-common
+ for sd_arg in "$@"; do
+ case ${sd_arg} in
+ -calc)
+- sd_pagein_args="${sd_pagein_args} @pagein-calc"
++ sd_binary="scalc.bin"
+ break;
+ ;;
+ -draw)
+- sd_pagein_args="${sd_pagein_args} @pagein-draw"
++ sd_binary="sdraw.bin"
+ break;
+ ;;
+ -impress)
+- sd_pagein_args="${sd_pagein_args} @pagein-impress"
++ sd_binary="simpress.bin"
+ break;
+ ;;
+ -writer)
+- sd_pagein_args="${sd_pagein_args} @pagein-writer"
++ sd_binary="swriter.bin"
+ break;
+ ;;
+ esac
+ done
+-"$sd_prog/../basis-link/program/pagein" -L"$sd_prog/../basis-link/program" \
+- ${sd_pagein_args}
+
+ # extend the ld_library_path for java: javaldx checks the sofficerc for us
+ if [ -x "$sd_prog/../basis-link/ure-link/bin/javaldx" ] ; then
+diff -r a92d0bd6747b desktop/util/makefile.mk
+--- a/desktop/util/makefile.mk Mon Dec 28 16:11:17 2009 +0100
++++ b/desktop/util/makefile.mk Wed Dec 30 09:34:10 2009 +0100
+@@ -192,6 +192,60 @@
+ APP5DEPN= $(APP1TARGETN) $(APP5RES) ooverinfo.rc
+ APP5DEF= $(MISCX)$/$(TARGET).def
+
++.IF "$(OS)" == "LINUX"
++PRELINKLIBS=$(APP5STDLIBS)
++PRELINKLIBS+= \
++ $(SVXLIB) \
++ $(SVXCORELIB) \
++ $(XMLOFFLIB) \
++ -lfwl$(DLLPOSTFIX) \
++ -lpackage2 \
++ -lucpfile1 \
++ -lucb1 \
++ $(STORELIB) \
++ $(REGLIB) \
++ -lvclplug_gtk$(DLLPOSTFIX) \
++ -lvclplug_gen$(DLLPOSTFIX) \
++ $(LNGLIB) \
++ $(ICUINLIB)
++
++APP6TARGET=swriter
++APP6NOSAL=TRUE
++APP6RPATH=BRAND
++APP6OBJS=$(APP5OBJS)
++APP6STDLIBS=$(PRELINKLIBS) \
++ $(ISWLIB)
++APP6DEPN=$(APP5DEPN)
++APP6DEF=$(MISCX)$/$(TARGET).def
++
++APP7TARGET=scalc
++APP7NOSAL=TRUE
++APP7RPATH=BRAND
++APP7OBJS=$(APP5OBJS)
++APP7STDLIBS=$(PRELINKLIBS) \
++ $(ISCLIB)
++APP7DEPN=$(APP5DEPN)
++APP7DEF=$(MISCX)$/$(TARGET).def
++
++APP8TARGET=sdraw
++APP8NOSAL=TRUE
++APP8RPATH=BRAND
++APP8OBJS=$(APP5OBJS)
++APP8STDLIBS=$(PRELINKLIBS) \
++ $(ISDLIB)
++APP8DEPN=$(APP5DEPN)
++APP8DEF=$(MISCX)$/$(TARGET).def
++
++APP9TARGET=simpress
++APP9NOSAL=TRUE
++APP9RPATH=BRAND
++APP9OBJS=$(APP5OBJS)
++APP9STDLIBS=$(PRELINKLIBS) \
++ $(ISDLIB)
++APP9DEPN=$(APP5DEPN)
++APP9DEF=$(MISCX)$/$(TARGET).def
++.ENDIF
++
+ .IF "$(GUI)" == "WNT"
+ APP5RES= $(RES)$/oodesktop.res
+ APP5ICON=$(SOLARRESDIR)$/icons/ooo3_main_app.ico
diff --git a/openoffice.org-2.0.1.rhXXXXXX.extensions.defaulttoevo2.patch b/openoffice.org-2.0.1.rhXXXXXX.extensions.defaulttoevo2.patch
new file mode 100644
index 0000000..313c839
--- /dev/null
+++ b/openoffice.org-2.0.1.rhXXXXXX.extensions.defaulttoevo2.patch
@@ -0,0 +1,82 @@
+--- openoffice.org/officecfg/registry/data/org/openoffice/Office/Writer.xcu.orig 2005-04-18 20:39:35.000000000 +0530
++++ openoffice.org/officecfg/registry/data/org/openoffice/Office/Writer.xcu 2005-05-10 17:30:14.000000000 +0530
+@@ -40,6 +40,32 @@
+
+ true
+
++
++
++ EvolutionLocal
++
++
++ Personal
++
++
++
++
++
++ title,full_name,family_name,org,addr_line1,addr_line2,city,state,zip,country,home_phone,business_phone,email_1,
++
++
++
++ 0
++
++
++ EvolutionLocal
++
++
++ Personal
++
++
++
++
+
+ true
+
+--- openoffice.org/extras/source/database/makefile.mk.bakj 2005-03-16 18:49:33.251075928 +0530
++++ openoffice.org/extras/source/database/makefile.mk 2005-03-16 18:50:38.651285353 +0530
+@@ -72,8 +72,8 @@
+
+ ZIP1TARGET = $(DATABASE_USER_TARGET)
+
+-ZIP1LIST = biblio.odb
+-
++ZIP1LIST = biblio.odb \
++ evolocal.odb
+ ZIP2TARGET = $(DATABASE_USER_BIBLIO_TARGET)
+
+ ZIP2LIST = biblio.dbf biblio.dbt
+--- openoffice.org/officecfg/registry/data/org/openoffice/Office/DataAccess.xcu.bakj 2005-03-16 18:51:43.777536725 +0530
++++ openoffice.org/officecfg/registry/data/org/openoffice/Office/DataAccess.xcu 2005-03-16 18:52:51.471404727 +0530
+@@ -161,6 +161,14 @@
+ Bibliography
+
+
++
++
++ $(userurl)/database/evolocal.odb
++
++
++ EvolutionLocal
++
++
+
+
+
+--- openoffice.org.orig/extensions/source/abpilot/abspilot.cxx 19 Dec 2005 17:26:24 -0000 1.13
++++ openoffice.org/extensions/source/abpilot/abspilot.cxx 16 Feb 2006 12:45:38 -0000
+@@ -124,12 +124,8 @@
+ // some initial settings
+ #ifdef MACOSX
+ m_aSettings.eType = AST_MACAB;
+-#elif WITH_MOZILLA
+-#ifdef UNX
+- m_aSettings.eType = AST_MORK;
+-#else
+- m_aSettings.eType = AST_OE;
+-#endif
++#elif UNX
++ m_aSettings.eType = AST_EVOLUTION;
+ #else
+ m_aSettings.eType = AST_OTHER;
+ #endif
diff --git a/openoffice.org-2.0.2.rh188467.printingdefaults.patch b/openoffice.org-2.0.2.rh188467.printingdefaults.patch
new file mode 100644
index 0000000..45c40aa
--- /dev/null
+++ b/openoffice.org-2.0.2.rh188467.printingdefaults.patch
@@ -0,0 +1,15 @@
+Index: configuration/ppds/SGENPRT.PS
+===================================================================
+RCS file: /cvs/external/psprint_config/configuration/ppds/SGENPRT.PS,v
+retrieving revision 1.3
+diff -u -p -u -r1.3 SGENPRT.PS
+--- openoffice.org.orig/psprint_config/configuration/ppds/SGENPRT.PS 26 Nov 2004 16:10:35 -0000 1.3
++++ openoffice.org/psprint_config/configuration/ppds/SGENPRT.PS 30 Aug 2005 11:17:51 -0000
+@@ -58,6 +58,7 @@
+ *ColorDevice: True
+ *DefaultColorSpace: RGB
+ *LanguageLevel: "2"
++*TTRasterizer: Type42
+
+ *% --- For None Color or old PostScript(R) printers use following lines ---
+ *% *ColorDevice: False
diff --git a/openoffice.org-2.2.0.gccXXXXX.solenv.javaregistration.patch b/openoffice.org-2.2.0.gccXXXXX.solenv.javaregistration.patch
new file mode 100644
index 0000000..0deea14
--- /dev/null
+++ b/openoffice.org-2.2.0.gccXXXXX.solenv.javaregistration.patch
@@ -0,0 +1,53 @@
+--- solenv/bin/modules/installer/globals.pm 2010-05-25 21:01:11.000000000 +0100
++++ solenv/bin/modules/installer/globals.pm 2010-05-27 08:01:11.000000000 +0100
+@@ -404,8 +404,8 @@
+ %usedtreeconditions = ();
+ %moduledestination = ();
+
+- $unomaxservices = 1800; # regcomp -c argument length
+- $javamaxservices = 15;
++ $unomaxservices = 1; # regcomp -c argument length
++ $javamaxservices = 1;
+
+ $one_cab_file = 0;
+ $fix_number_of_cab_files = 1;
+--- solenv/bin/modules/installer/servicesfile.pm 2010-05-25 21:01:11.000000000 +0100
++++ solenv/bin/modules/installer/servicesfile.pm 2010-06-10 09:07:46.000000000 +0100
+@@ -222,17 +231,31 @@
+ if ( $i % $installer::globals::javamaxservices == 0 || $i > $#{$javacomponents} ) # limiting to $installer::globals::maxservices files
+ {
+ my @regcompoutput = ();
++ my @throwregcompoutput = ();
+
+ my $systemcall = "$installer::globals::wrapcmd $$regcompfileref -register -br ".fix_cygwin_path($regcomprdb)." -r ".fix_cygwin_path($servicesfile)." -c " . $installer::globals::quote . $filestring . $installer::globals::quote . " -l com.sun.star.loader.Java2 -wop=" . $installer::globals::quote . $javaservicesurlprefix . $installer::globals::quote ." -env:URE_INTERNAL_JAVA_DIR=" . $installer::globals::quote . make_file_url($$ure_internal_java_dir_ref) . $installer::globals::quote . " 2\>\&1 |";
+
+- open (REG, "$systemcall");
+- while () {push(@regcompoutput, $_); }
+- close (REG);
++ my $returnvalue = 1;
++ my $infoline = "Systemcall: $systemcall\n";
+
+- my $returnvalue = $?; # $? contains the return value of the systemcall
++ for ( my $j = 0; $j <= 10; $j++) {
++ open (REG, "$systemcall");
++ while () {push(@throwregcompoutput, $_); }
++ close (REG);
++
++ $returnvalue = $?; # $? contains the return value of the systemcall
+
+- my $infoline = "Systemcall: $systemcall\n";
+- push( @installer::globals::logfileinfo, $infoline);
++ push( @installer::globals::logfileinfo, $infoline);
++
++ if ($returnvalue == 0) {
++ last;
++ }
++
++ $infoline = "RATS: attempt $j: $systemcall\n";
++ push( @installer::globals::logfileinfo, $infoline);
++ }
++
++ $regcompoutput = $throwregcompoutput;
+
+ for ( my $k = 0; $k <= $#regcompoutput; $k++ ) { push( @installer::globals::logfileinfo, "$regcompoutput[$k]"); }
+
diff --git a/openoffice.org-2.2.1.ooo7065.sw.titlepagedialog.patch b/openoffice.org-2.2.1.ooo7065.sw.titlepagedialog.patch
new file mode 100644
index 0000000..24fd96d
--- /dev/null
+++ b/openoffice.org-2.2.1.ooo7065.sw.titlepagedialog.patch
@@ -0,0 +1,1136 @@
+Index: inc/cmdid.h
+===================================================================
+RCS file: /cvs/sw/sw/inc/cmdid.h,v
+retrieving revision 1.72
+diff -u -r1.72 cmdid.h
+--- openoffice.org.orig/sw/inc/cmdid.h 27 Jun 2007 13:12:47 -0000 1.72
++++ openoffice.org/sw/inc/cmdid.h 10 Jul 2007 12:54:59 -0000
+@@ -539,6 +539,8 @@
+
+ #define FN_SET_PAGE_STYLE (FN_FORMAT + 93) /* Anwenden Seitenv. */
+
++#define FN_FORMAT_TITLEPAGE_DLG (FN_FORMAT + 98) /* Title Page */
++
+
+ #define FN_TABLE_REP (FN_FORMAT + 99) /* TableRepresentation */
+ #define FN_CONVERT_TEXT_TABLE (FN_FORMAT + 100) /* Konvertierung Text <-> Tabelle */
+Index: inc/globals.hrc
+===================================================================
+RCS file: /cvs/sw/sw/inc/globals.hrc,v
+retrieving revision 1.16
+diff -u -r1.16 globals.hrc
+--- openoffice.org.orig/sw/inc/globals.hrc 2 May 2006 15:13:43 -0000 1.16
++++ openoffice.org/sw/inc/globals.hrc 10 Jul 2007 12:55:08 -0000
+@@ -282,7 +282,9 @@
+ #define TP_SECTION_INDENTS (RC_GLOBALS_BEGIN + 102)
+ #define TP_OPTCOMPATIBILITY_PAGE (RC_GLOBALS_BEGIN + 103)
+ #define TP_MAILCONFIG (RC_GLOBALS_BEGIN + 104)
+-//maximum: RC_GLOBALS_BEGIN + 119
++#define TP_TITLEPAGE (RC_GLOBALS_BEGIN + 105)
++//maximum: RC_GLOBALS_BEGIN + 120
++
+
+ #if STR_DOC_STAT > RC_GLOBALS_END
+ #error Resource-Id Ueberlauf in #file, #line
+@@ -294,4 +296,5 @@
+ #define SID_WRT_SHELL (RC_GLOBALS_BEGIN + 117)
+
+ #define DLG_LINE_NUMBERING (RC_GLOBALS_BEGIN + 118)
++#define DLG_TITLEPAGE (RC_GLOBALS_BEGIN + 119)
+ #endif // _GLOBALS_HRC
+Index: inc/helpid.h
+===================================================================
+RCS file: /cvs/sw/sw/inc/helpid.h,v
+retrieving revision 1.30
+diff -u -r1.30 helpid.h
+--- openoffice.org.orig/sw/inc/helpid.h 2 Jan 2007 16:45:16 -0000 1.30
++++ openoffice.org/sw/inc/helpid.h 10 Jul 2007 12:55:09 -0000
+@@ -986,3 +986,4 @@
+ #define HID_MM_HEADER_12 (HID_BASE + 2279)
+ #define HID_MM_HEADER_13 (HID_BASE + 2280)
+
++#define HID_TITLEPAGE (HID_BASE + 2281)
+Index: inc/rcid.hrc
+===================================================================
+RCS file: /cvs/sw/sw/inc/rcid.hrc,v
+retrieving revision 1.12
+diff -u -r1.12 rcid.hrc
+--- openoffice.org.orig/sw/inc/rcid.hrc 22 May 2007 16:20:20 -0000 1.12
++++ openoffice.org/sw/inc/rcid.hrc 10 Jul 2007 12:55:14 -0000
+@@ -135,7 +135,7 @@
+
+ // globale Ressourcen
+ #define RC_GLOBALS_BEGIN RC_GLOBALS
+-#define RC_GLOBALS_END (RC_GLOBALS_BEGIN + 119)
++#define RC_GLOBALS_END (RC_GLOBALS_BEGIN + 120)
+
+ // Format-Vorlagen
+ #define RC_FMTUI_BEGIN RC_FMTUI
+Index: inc/swabstdlg.hxx
+===================================================================
+RCS file: /cvs/sw/sw/inc/swabstdlg.hxx,v
+retrieving revision 1.13
+diff -u -r1.13 swabstdlg.hxx
+--- openoffice.org.orig/sw/inc/swabstdlg.hxx 26 Apr 2007 08:48:16 -0000 1.13
++++ openoffice.org/sw/inc/swabstdlg.hxx 10 Jul 2007 12:55:16 -0000
+@@ -477,6 +477,7 @@
+ SwField* pField, BOOL bNextButton = FALSE ) = 0; //add for SwFldInputDlg
+ virtual AbstractInsFootNoteDlg* CreateInsFootNoteDlg( int nResId,
+ Window * pParent, SwWrtShell &rSh, BOOL bEd = FALSE) = 0; //add for SwInsFootNoteDlg
++ virtual VclAbstractDialog* CreateTitlePageDlg ( Window * pParent ) = 0;
+ virtual VclAbstractDialog * CreateVclSwViewDialog( int nResId,
+ SwView& rView, BOOL bCol = FALSE ) = 0; //add for SwInsRowColDlg, SwLineNumberingDlg
+ virtual AbstractInsertGrfRulerDlg* CreateInsertGrfRulerDlg( int nResId,
+Index: sdi/_basesh.sdi
+===================================================================
+RCS file: /cvs/sw/sw/sdi/_basesh.sdi,v
+retrieving revision 1.16
+diff -u -r1.16 _basesh.sdi
+--- openoffice.org.orig/sw/sdi/_basesh.sdi 2 May 2006 15:13:56 -0000 1.16
++++ openoffice.org/sw/sdi/_basesh.sdi 10 Jul 2007 12:55:36 -0000
+@@ -250,6 +250,12 @@
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
++ FN_FORMAT_TITLEPAGE_DLG // status(final|play)
++ [
++ ExecMethod = ExecDlg ;
++ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
++ ]
++
+ FN_FORMAT_PAGE_COLUMN_DLG // status(final|play)
+ [
+ ExecMethod = ExecDlg ;
+Index: sdi/swriter.sdi
+===================================================================
+RCS file: /cvs/sw/sw/sdi/swriter.sdi,v
+retrieving revision 1.66
+diff -u -r1.66 swriter.sdi
+--- openoffice.org.orig/sw/sdi/swriter.sdi 27 Jun 2007 13:16:04 -0000 1.66
++++ openoffice.org/sw/sdi/swriter.sdi 10 Jul 2007 12:57:02 -0000
+@@ -6330,6 +6330,31 @@
+ ]
+
+ //--------------------------------------------------------------------------
++SfxVoidItem TitlePageDialog FN_FORMAT_TITLEPAGE_DLG
++()
++[
++ /* flags: */
++ AutoUpdate = FALSE,
++ Cachable = Cachable,
++ FastCall = FALSE,
++ HasCoreId = FALSE,
++ HasDialog = TRUE,
++ ReadOnlyDoc = FALSE,
++ Toggle = FALSE,
++ Container = FALSE,
++ RecordAbsolute = FALSE,
++ RecordPerItem;
++ Asynchron;
++
++ /* config: */
++ AccelConfig = TRUE,
++ MenuConfig = TRUE,
++ StatusBarConfig = FALSE,
++ ToolBoxConfig = TRUE,
++ GroupId = GID_FORMAT;
++]
++
++//--------------------------------------------------------------------------
+ SfxVoidItem PageDown FN_PAGEDOWN
+ ()
+ [
+Index: source/ui/dialog/swdlgfact.cxx
+===================================================================
+RCS file: /cvs/sw/sw/source/ui/dialog/swdlgfact.cxx,v
+retrieving revision 1.13
+diff -u -r1.13 swdlgfact.cxx
+--- openoffice.org.orig/sw/source/ui/dialog/swdlgfact.cxx 26 Apr 2007 09:06:20 -0000 1.13
++++ openoffice.org/sw/source/ui/dialog/swdlgfact.cxx 10 Jul 2007 13:05:50 -0000
+@@ -97,6 +97,7 @@
+ #include //add for SwInsTableDlg
+ #include //add for SwJavaEditDialog
+ #include //add for SwLineNumberingDlg
++#include //add for SwTitlePageDlg
+ #include //add for SwMailMergeDlg, SwMailMergeCreateFromDlg, SwMailMergeFieldConnectionsDlg
+ #include //add for SwMergeTblDlg
+ #include //add for SwMultiTOXMarkDlg
+@@ -1357,6 +1358,14 @@
+ return 0;
+ }
+
++VclAbstractDialog * SwAbstractDialogFactory_Impl::CreateTitlePageDlg ( Window *pParent )
++{
++ Dialog* pDlg = new SwTitlePageDlg( pParent );
++ if ( pDlg )
++ return new VclAbstractDialog_Impl( pDlg );
++ return 0;
++}
++
+ VclAbstractDialog * SwAbstractDialogFactory_Impl::CreateVclSwViewDialog( int nResId,
+ SwView& rView, BOOL /*bCol*/ ) //add for SwInsRowColDlg, SwLineNumberingDlg
+ {
+Index: source/ui/dialog/swdlgfact.hxx
+===================================================================
+RCS file: /cvs/sw/sw/source/ui/dialog/swdlgfact.hxx,v
+retrieving revision 1.9
+diff -u -r1.9 swdlgfact.hxx
+--- openoffice.org.orig/sw/source/ui/dialog/swdlgfact.hxx 26 Apr 2007 09:06:34 -0000 1.9
++++ openoffice.org/sw/source/ui/dialog/swdlgfact.hxx 10 Jul 2007 13:05:50 -0000
+@@ -532,6 +532,7 @@
+ SwField* pField, BOOL bNextButton = FALSE ); //add for SwFldInputDlg
+ virtual AbstractInsFootNoteDlg* CreateInsFootNoteDlg( int nResId,
+ Window * pParent, SwWrtShell &rSh, BOOL bEd = FALSE); //add for SwInsFootNoteDlg
++ virtual VclAbstractDialog * CreateTitlePageDlg ( Window * pParent );
+ virtual VclAbstractDialog * CreateVclSwViewDialog( int nResId,
+ SwView& rView, BOOL bCol = FALSE ); //add for SwInsRowColDlg, SwLineNumberingDlg
+ virtual AbstractInsertGrfRulerDlg* CreateInsertGrfRulerDlg( int nResId,
+Index: source/ui/inc/swmn_tmpl.hrc
+===================================================================
+RCS file: /cvs/sw/sw/source/ui/inc/swmn_tmpl.hrc,v
+retrieving revision 1.13
+diff -u -r1.13 swmn_tmpl.hrc
+--- openoffice.org.orig/sw/source/ui/inc/swmn_tmpl.hrc 27 Jun 2007 13:25:09 -0000 1.13
++++ openoffice.org/sw/source/ui/inc/swmn_tmpl.hrc 10 Jul 2007 13:08:19 -0000
+@@ -67,8 +67,13 @@
+ Identifier = FN_FORMAT_PAGE_DLG ; \
+ HelpID = FN_FORMAT_PAGE_DLG ; \
+ Text [ en-US ] = "Pa~ge..." ; \
+- };
+-
++ };\
++ MenuItem\
++ {\
++ Identifier = FN_FORMAT_TITLEPAGE_DLG ; \
++ HelpID = FN_FORMAT_TITLEPAGE_DLG ; \
++ Text [ en-US ] = "~Title Page..." ; \
++ };
+
+ #define MN_TEXT_ATTR\
+ MenuItem\
+Index: source/ui/misc/makefile.mk
+===================================================================
+RCS file: /cvs/sw/sw/source/ui/misc/makefile.mk,v
+retrieving revision 1.12
+diff -u -r1.12 makefile.mk
+--- openoffice.org.orig/sw/source/ui/misc/makefile.mk 9 Sep 2005 10:35:47 -0000 1.12
++++ openoffice.org/sw/source/ui/misc/makefile.mk 10 Jul 2007 13:09:42 -0000
+@@ -56,7 +56,8 @@
+ pgfnote.src \
+ pggrid.src \
+ redlndlg.src \
+- srtdlg.src
++ srtdlg.src \
++ titlepage.src
+
+ EXCEPTIONSFILES = \
+ $(SLO)$/glossary.obj \
+@@ -76,6 +77,7 @@
+ $(SLO)$/insfnote.obj \
+ $(SLO)$/insrule.obj \
+ $(SLO)$/linenum.obj \
++ $(SLO)$/titlepage.obj \
+ $(SLO)$/num.obj \
+ $(SLO)$/numberingtypelistbox.obj \
+ $(SLO)$/outline.obj \
+Index: source/ui/shells/basesh.cxx
+===================================================================
+RCS file: /cvs/sw/sw/source/ui/shells/basesh.cxx,v
+retrieving revision 1.81
+diff -u -r1.81 basesh.cxx
+--- openoffice.org.orig/sw/source/ui/shells/basesh.cxx 10 May 2007 16:22:02 -0000 1.81
++++ openoffice.org/sw/source/ui/shells/basesh.cxx 10 Jul 2007 13:10:07 -0000
+@@ -2546,6 +2546,14 @@
+
+ switch ( nSlot )
+ {
++ case FN_FORMAT_TITLEPAGE_DLG:
++ {
++ SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
++ VclAbstractDialog* pDlg = pFact->CreateTitlePageDlg( pMDI );
++ pDlg->Execute();
++ delete pDlg;
++ }
++ break;
+ case FN_FORMAT_PAGE_COLUMN_DLG:
+ case FN_FORMAT_PAGE_DLG:
+ {
+Index: uiconfig/swriter/menubar/menubar.xml
+===================================================================
+RCS file: /cvs/sw/sw/uiconfig/swriter/menubar/menubar.xml,v
+retrieving revision 1.28
+diff -u -r1.28 menubar.xml
+--- openoffice.org.orig/sw/uiconfig/swriter/menubar/menubar.xml 29 May 2007 14:49:53 -0000 1.28
++++ openoffice.org/sw/uiconfig/swriter/menubar/menubar.xml 10 Jul 2007 13:13:00 -0000
+@@ -217,6 +217,7 @@
+
+
+
++
+
+
+
+Index: util/makefile.mk
+===================================================================
+RCS file: /cvs/sw/sw/util/makefile.mk,v
+retrieving revision 1.61
+diff -u -r1.61 makefile.mk
+--- openoffice.org.orig/sw/util/makefile.mk 22 May 2007 16:41:25 -0000 1.61
++++ openoffice.org/sw/util/makefile.mk 10 Jul 2007 13:13:05 -0000
+@@ -263,6 +263,7 @@
+ $(SLO)$/instable.obj \
+ $(SLO)$/insrule.obj \
+ $(SLO)$/javaedit.obj \
++ $(SLO)$/titlepage.obj \
+ $(SLO)$/linenum.obj \
+ $(SLO)$/mailmrge.obj \
+ $(SLO)$/multmrk.obj \
+diff -ru openoffice.org/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu openoffice.org/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu
+--- openoffice.org.orig/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu 2007-07-10 14:35:38.000000000 +0100
++++ openoffice.org/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu 2007-07-09 12:03:44.000000000 +0100
+@@ -802,6 +802,11 @@
+ ~Page...
+
+
++
++
++ Title Page...
++
++
+
+
+ Co~lumns...
+--- /dev/null 2008-10-28 16:28:18.200260089 +0000
++++ openoffice.org.orig/sw/source/ui/inc/titlepage.hxx 2008-11-13 12:48:59.000000000 +0000
+@@ -0,0 +1,129 @@
++/*************************************************************************
++ *
++ * OpenOffice.org - a multi-platform office productivity suite
++ *
++ * $RCSfile$
++ *
++ * $Revision$
++ *
++ * last change: $Author$ $Date$
++ *
++ * The Contents of this file are made available subject to
++ * the terms of GNU Lesser General Public License Version 2.1.
++ *
++ *
++ * GNU Lesser General Public License Version 2.1
++ * =============================================
++ * Copyright 2005 by Sun Microsystems, Inc.
++ * 901 San Antonio Road, Palo Alto, CA 94303, USA
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License version 2.1, as published by the Free Software Foundation.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
++ * MA 02111-1307 USA
++ *
++ ************************************************************************/
++#ifndef _SWTITLEPAGE_HXX
++#define _SWTITLEPAGE_HXX
++
++#ifndef _BASEDLGS_HXX //autogen
++#include
++#endif
++
++#ifndef _SFXTABDLG_HXX //autogen
++#include
++#endif
++
++#ifndef _SV_FIXED_HXX //autogen
++#include
++#endif
++
++#ifndef _SV_FIELD_HXX //autogen
++#include
++#endif
++#ifndef _NUMBERINGTYPELISTBOX_HXX
++#include
++#endif
++
++#ifndef _LSTBOX_HXX //autogen
++#include
++#endif
++
++class Window;
++class SfxItemSet;
++class SwView;
++class SwWrtShell;
++class SwPageDesc;
++
++/*--------------------------------------------------------------------
++ Beschreibung: SingleTabDialog
++ --------------------------------------------------------------------*/
++
++class SwTitlePageDlg : public SfxModalDialog
++{
++private:
++ FixedLine aMakeInsertFL;
++ RadioButton aUseExistingPagesRB;
++ RadioButton aInsertNewPagesRB;
++ FixedText aPageCountFT;
++ NumericField aPageCountNF;
++ FixedText aPagePagesFT;
++
++ FixedText aPageStartFT;
++ RadioButton aDocumentStartRB;
++ RadioButton aPageStartRB;
++ NumericField aPageStartNF;
++
++ FixedLine aNumberingFL;
++ CheckBox aRestartNumberingCB;
++ FixedText aRestartNumberingFT;
++ NumericField aRestartNumberingNF;
++ CheckBox aSetPageNumberCB;
++ FixedText aSetPageNumberFT;
++ NumericField aSetPageNumberNF;
++
++ FixedLine aPagePropertiesFL;
++ ListBox aPagePropertiesLB;
++ PushButton aPagePropertiesPB;
++
++ FixedLine aBottomFL;
++ OKButton aOkPB;
++ CancelButton aCancelPB;
++ HelpButton aHelpPB;
++
++ SwWrtShell *mpSh;
++
++ const SwFmtPageDesc *mpPageFmtDesc;
++
++ SwPageDesc *mpTitleDesc;
++ const SwPageDesc *mpIndexDesc;
++ const SwPageDesc *mpNormalDesc;
++
++ void FillList();
++
++ USHORT GetInsertPosition() const;
++
++ DECL_LINK( OKHdl, Button * );
++ DECL_LINK( EditHdl, Button * );
++ DECL_LINK( RestartNumberingHdl, CheckBox* );
++ DECL_LINK( SetPageNumberHdl, CheckBox* );
++ DECL_LINK( UpHdl, NumericField * );
++ DECL_LINK( DownHdl, NumericField * );
++ DECL_LINK( StartPageHdl, RadioButton * );
++public:
++ SwTitlePageDlg( Window *pParent );
++ ~SwTitlePageDlg();
++};
++
++#endif
++
++/* vi:set tabstop=4 shiftwidth=4 expandtab: */
+--- /dev/null 2008-10-28 16:28:18.200260089 +0000
++++ openoffice.org/sw/source/ui/misc/titlepage.src 2008-11-13 12:03:28.000000000 +0000
+@@ -0,0 +1,260 @@
++/*************************************************************************
++ *
++ * OpenOffice.org - a multi-platform office productivity suite
++ *
++ * $RCSfile$
++ *
++ * $Revision$
++ *
++ * last change: $Author$ $Date$
++ *
++ * The Contents of this file are made available subject to
++ * the terms of GNU Lesser General Public License Version 2.1.
++ *
++ *
++ * GNU Lesser General Public License Version 2.1
++ * =============================================
++ * Copyright 2005 by Sun Microsystems, Inc.
++ * 901 San Antonio Road, Palo Alto, CA 94303, USA
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License version 2.1, as published by the Free Software Foundation.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
++ * MA 02111-1307 USA
++ *
++ ************************************************************************/
++/* StarView ressource file */
++
++#ifndef _SFX_HRC
++#include
++#endif
++#ifndef _SVX_DIALOGS_HRC
++#include
++#endif
++#include "globals.hrc"
++#include "misc.hrc"
++#include "titlepage.hrc"
++#include "helpid.h"
++/**************************************************************************/
++/* */
++/**************************************************************************/
++ModalDialog DLG_TITLEPAGE
++{
++ HelpID = HID_TITLEPAGE ;
++ OutputSize = TRUE ;
++ SVLook = TRUE ;
++ Size = MAP_APPFONT ( 216 , 201 ) ;
++ Text [ en-US ] = "Title Pages" ;
++ Moveable = TRUE ;
++
++ FixedLine FL_MAKEINSERT
++ {
++ Pos = MAP_APPFONT ( 6 , 5 ) ;
++ Size = MAP_APPFONT ( 204 , 8 ) ;
++ Text [ en-US ] = "Make Title Pages" ;
++ Text [ x-comment ] = " ";
++ };
++ RadioButton RB_USE_EXISTING_PAGES
++ {
++ Pos = MAP_APPFONT ( 12 , 18 ) ;
++ Size = MAP_APPFONT ( 150 , 10 ) ;
++ Text [ en-US ] = "Convert existing pages to title pages" ;
++ TabStop = TRUE ;
++ Check = TRUE ;
++ Text [ x-comment ] = " ";
++ };
++ RadioButton RB_INSERT_NEW_PAGES
++ {
++ Pos = MAP_APPFONT ( 12 , 34 ) ;
++ Size = MAP_APPFONT ( 150 , 10 ) ;
++ Text [ en-US ] = "Insert new title pages" ;
++ Text [ x-comment ] = " ";
++ };
++ FixedText FT_PAGE_COUNT
++ {
++ Pos = MAP_APPFONT ( 12 , 50 ) ;
++ Size = MAP_APPFONT ( 80 , 8 ) ;
++ Text [ en-US ] = "Number of title pages" ;
++ Text [ x-comment ] = " ";
++ };
++ NumericField NF_PAGE_COUNT
++ {
++ Pos = MAP_APPFONT ( 80 , 50 ) ;
++ Size = MAP_APPFONT ( 30 , 12 ) ;
++ Border = TRUE ;
++ TabStop = TRUE ;
++ Left = TRUE ;
++ Repeat = TRUE ;
++ Spin = TRUE ;
++ Minimum = 1 ;
++ Maximum = 65535;
++ First = 1 ;
++ Last = 65535;
++ SpinSize = 1 ;
++ };
++ FixedText FT_PAGE_PAGES
++ {
++ Pos = MAP_APPFONT ( 116 , 50 ) ;
++ Size = MAP_APPFONT ( 80 , 10 ) ;
++ Text [ en-US ] = "pages" ;
++ Text [ x-comment ] = " ";
++ };
++ FixedText FT_PAGE_START
++ {
++ Pos = MAP_APPFONT ( 12 , 66 ) ;
++ Size = MAP_APPFONT ( 58 , 8 ) ;
++ Text [ en-US ] = "Place title pages at" ;
++ Text [ x-comment ] = " ";
++ };
++ RadioButton RB_DOCUMENT_START
++ {
++ Pos = MAP_APPFONT ( 70 , 66 ) ;
++ Size = MAP_APPFONT ( 80 , 10 ) ;
++ Text [ en-US ] = "Document Start" ;
++ TabStop = TRUE ;
++ Check = TRUE ;
++ Text [ x-comment ] = " ";
++ };
++ RadioButton RB_PAGE_START
++ {
++ Pos = MAP_APPFONT ( 70 , 78 ) ;
++ Size = MAP_APPFONT ( 30 , 10 ) ;
++ Text [ en-US ] = "Page" ;
++ Text [ x-comment ] = " ";
++ };
++ NumericField NF_PAGE_START
++ {
++ Pos = MAP_APPFONT ( 95 , 78 ) ;
++ Size = MAP_APPFONT ( 30 , 12 ) ;
++ Border = TRUE ;
++ TabStop = TRUE ;
++ Left = TRUE ;
++ Repeat = TRUE ;
++ Spin = TRUE ;
++ Minimum = 1 ;
++ Maximum = 65535;
++ First = 1 ;
++ Last = 65535;
++ SpinSize = 1 ;
++ };
++ FixedLine FL_NUMBERING
++ {
++ Pos = MAP_APPFONT ( 6 , 98 ) ;
++ Size = MAP_APPFONT ( 204 , 8 ) ;
++ Text [ en-US ] = "Page Numbering" ;
++ Text [ x-comment ] = " ";
++ };
++ CheckBox CB_RESTART_NUMBERING
++ {
++ Pos = MAP_APPFONT ( 12, 111 ) ;
++ Size = MAP_APPFONT ( 150 , 10 ) ;
++ TabStop = TRUE ;
++ Text [ en-US ] = "Reset Page Numbering after title pages" ;
++ Text [ x-comment ] = " ";
++ };
++ FixedText FT_RESTART_NUMBERING
++ {
++ Pos = MAP_APPFONT ( 140 , 111 ) ;
++ Size = MAP_APPFONT ( 50 , 10 ) ;
++ Text [ en-US ] = "Page Number" ;
++ Text [ x-comment ] = " ";
++ };
++ NumericField NF_RESTART_NUMBERING
++ {
++ Pos = MAP_APPFONT ( 180 , 111 ) ;
++ Size = MAP_APPFONT ( 30 , 12 ) ;
++ Border = TRUE ;
++ TabStop = TRUE ;
++ Left = TRUE ;
++ Repeat = TRUE ;
++ Spin = TRUE ;
++ Minimum = 1 ;
++ Maximum = 65535;
++ First = 1 ;
++ Last = 65535;
++ SpinSize = 1 ;
++ };
++ CheckBox CB_SET_PAGE_NUMBER
++ {
++ Pos = MAP_APPFONT ( 12 , 125 ) ;
++ Size = MAP_APPFONT ( 150 , 10 ) ;
++ TabStop = TRUE ;
++ Text [ en-US ] = "Set Page Number for first title page" ;
++ Text [ x-comment ] = " ";
++ };
++ FixedText FT_SET_PAGE_NUMBER
++ {
++ Pos = MAP_APPFONT ( 140 , 125 ) ;
++ Size = MAP_APPFONT ( 50 , 10 ) ;
++ Text [ en-US ] = "Page Number" ;
++ Text [ x-comment ] = " ";
++ };
++ NumericField NF_SET_PAGE_NUMBER
++ {
++ Pos = MAP_APPFONT ( 180 , 125 ) ;
++ Size = MAP_APPFONT ( 30 , 12 ) ;
++ Border = TRUE ;
++ TabStop = TRUE ;
++ Left = TRUE ;
++ Repeat = TRUE ;
++ Spin = TRUE ;
++ Minimum = 1 ;
++ Maximum = 65535;
++ First = 1 ;
++ Last = 65535;
++ SpinSize = 1 ;
++ };
++ FixedLine FL_PAGE_PROPERTIES
++ {
++ Pos = MAP_APPFONT ( 6 , 141 ) ;
++ Size = MAP_APPFONT ( 204 , 8 ) ;
++ Text [ en-US ] = "Edit Page Properties" ;
++ Text [ x-comment ] = " ";
++ };
++ ListBox LB_PAGE_PROPERTIES
++ {
++ Border = TRUE ;
++ Pos = MAP_APPFONT ( 12 , 154 ) ;
++ Size = MAP_APPFONT ( 150 , 80 ) ;
++ TabStop = TRUE ;
++ DropDown = TRUE ;
++ CurPos = 0 ;
++ };
++ PushButton PB_PAGE_PROPERTIES
++ {
++ Pos = MAP_APPFONT ( 170 , 154 ) ;
++ Size = MAP_APPFONT ( 30 , 12 ) ;
++ Text [ en-US ] = "Edit..." ;
++ };
++ FixedLine FL_BOTTOM
++ {
++ Pos = MAP_APPFONT ( 6 , 170 ) ;
++ Size = MAP_APPFONT ( 204 , 8 ) ;
++ };
++ OKButton PB_OK
++ {
++ Pos = MAP_APPFONT ( 54 , 181 ) ;
++ Size = MAP_APPFONT ( 50 , 14 ) ;
++ DefButton = TRUE ;
++ };
++ CancelButton PB_CANCEL
++ {
++ Pos = MAP_APPFONT ( 107 , 181 ) ;
++ Size = MAP_APPFONT ( 50 , 14 ) ;
++ DefButton = TRUE ;
++ };
++ HelpButton PB_HELP
++ {
++ Pos = MAP_APPFONT ( 160 , 181 ) ;
++ Size = MAP_APPFONT ( 50 , 14 ) ;
++ };
++};
+--- /dev/null 2008-10-28 16:28:18.200260089 +0000
++++ openoffice.org/sw/source/ui/misc/titlepage.cxx 2008-11-13 12:58:11.000000000 +0000
+@@ -0,0 +1,375 @@
++/*************************************************************************
++ *
++ * OpenOffice.org - a multi-platform office productivity suite
++ *
++ * $RCSfile$
++ *
++ * $Revision$
++ *
++ * last change: $Author$ $Date$
++ *
++ * The Contents of this file are made available subject to
++ * the terms of GNU Lesser General Public License Version 2.1.
++ *
++ *
++ * GNU Lesser General Public License Version 2.1
++ * =============================================
++ * Copyright 2005 by Sun Microsystems, Inc.
++ * 901 San Antonio Road, Palo Alto, CA 94303, USA
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License version 2.1, as published by the Free Software Foundation.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
++ * MA 02111-1307 USA
++ *
++ ************************************************************************/
++
++// MARKER(update_precomp.py): autogen include statement, do not remove
++#include "precompiled_sw.hxx"
++
++#ifdef SW_DLLIMPLEMENTATION
++#undef SW_DLLIMPLEMENTATION
++#endif
++
++#include
++#include
++#include
++#include
++#include
++#include
++#include
++#include
++#include
++
++#include "fldbas.hxx"
++#include "lineinfo.hxx"
++#include "globals.hrc"
++#include "titlepage.hrc"
++#include "titlepage.hxx"
++#include "uitool.hxx"
++#include "fmtpdsc.hxx"
++#include "pagedesc.hxx"
++
++#include
++
++namespace
++{
++ bool lcl_GetPageDesc(SwWrtShell *pSh, USHORT &rPageNo, const SwFmtPageDesc **ppPageFmtDesc)
++ {
++ bool bRet = false;
++ SfxItemSet aSet( pSh->GetAttrPool(), RES_PAGEDESC, RES_PAGEDESC );
++ if (pSh->GetCurAttr( aSet ))
++ {
++ const SfxPoolItem* pItem(0);
++ if (SFX_ITEM_SET == aSet.GetItemState( RES_PAGEDESC, TRUE, &pItem ) && pItem)
++ {
++ rPageNo = ((const SwFmtPageDesc *)pItem)->GetNumOffset();
++ if (ppPageFmtDesc)
++ (*ppPageFmtDesc) = (const SwFmtPageDesc *)(pItem->Clone());
++ bRet = true;
++ }
++ }
++ return bRet;
++ }
++
++ bool lcl_SkipNPages(SwWrtShell *pSh, USHORT nNoPages)
++ {
++ bool bAllOk = true;
++ for (USHORT nI = 0; nI < nNoPages && bAllOk; ++nI)
++ bAllOk = pSh->SttNxtPg();
++ return bAllOk;
++ }
++
++ void lcl_ChangePage(SwWrtShell *pSh, USHORT nNewNumber,
++ const SwPageDesc *pNewDesc)
++ {
++ const USHORT nCurIdx = pSh->GetCurPageDesc();
++ const SwPageDesc &rCurrentDesc = pSh->GetPageDesc( nCurIdx );
++
++ const SwFmtPageDesc *pPageFmtDesc(0);
++ USHORT nDontCare;
++ lcl_GetPageDesc(pSh, nDontCare, &pPageFmtDesc);
++
++ //If we want a new number then set it, otherwise reuse the existing one
++ USHORT nPgNo = nNewNumber ?
++ nNewNumber : ( pPageFmtDesc ? pPageFmtDesc->GetNumOffset() : 0 );
++
++ //If we want a new descriptior then set it, otherwise reuse the existing one
++ if (!pNewDesc)
++ {
++ SwFmtPageDesc aPageFmtDesc(pPageFmtDesc ? *pPageFmtDesc : &rCurrentDesc);
++ if (nPgNo) aPageFmtDesc.SetNumOffset(nPgNo);
++ pSh->SetAttr(aPageFmtDesc);
++ }
++ else
++ {
++ SwFmtPageDesc aPageFmtDesc(pNewDesc);
++ if (nPgNo) aPageFmtDesc.SetNumOffset(nPgNo);
++ pSh->SetAttr(aPageFmtDesc);
++ }
++
++ delete pPageFmtDesc;
++ }
++
++ void lcl_PushCursor(SwWrtShell *pSh)
++ {
++ pSh->LockView( TRUE );
++ pSh->StartAllAction();
++ pSh->SwCrsrShell::Push();
++ }
++
++ void lcl_PopCursor(SwWrtShell *pSh)
++ {
++ pSh->SwCrsrShell::Pop( FALSE );
++ pSh->EndAllAction();
++ pSh->LockView( FALSE );
++ }
++
++ USHORT lcl_GetCurrentPage(SwWrtShell *pSh)
++ {
++ String sDummy;
++ USHORT nPhyNum=1, nVirtNum=1;
++ pSh->GetPageNumber(0, true, nPhyNum, nVirtNum, sDummy);
++ return nPhyNum;
++ }
++}
++
++/*
++ * Only include the Index page in the list if the page count implies one
++ * to reduce confusing things
++ */
++void SwTitlePageDlg::FillList()
++{
++ USHORT nTitlePages = aPageCountNF.GetValue();
++ aPagePropertiesLB.Clear();
++ if (mpTitleDesc)
++ aPagePropertiesLB.InsertEntry(mpTitleDesc->GetName());
++ if (nTitlePages > 1 && mpIndexDesc)
++ aPagePropertiesLB.InsertEntry(mpIndexDesc->GetName());
++ if (mpNormalDesc)
++ aPagePropertiesLB.InsertEntry(mpNormalDesc->GetName());
++ aPagePropertiesLB.SelectEntryPos(0);
++}
++
++/*--------------------------------------------------------------------
++ Beschreibung:
++ --------------------------------------------------------------------*/
++
++USHORT SwTitlePageDlg::GetInsertPosition() const
++{
++ USHORT nPage = 1;
++ if (aPageStartNF.IsEnabled())
++ nPage = aPageStartNF.GetValue();
++ return nPage;
++}
++
++SwTitlePageDlg::SwTitlePageDlg( Window *pParent ) :
++ SfxModalDialog( pParent, SW_RES(DLG_TITLEPAGE) ),
++#pragma warning (disable : 4355)
++ aMakeInsertFL ( this, SW_RES( FL_MAKEINSERT )),
++ aUseExistingPagesRB ( this, SW_RES( RB_USE_EXISTING_PAGES )),
++ aInsertNewPagesRB ( this, SW_RES( RB_INSERT_NEW_PAGES )),
++ aPageCountFT ( this, SW_RES( FT_PAGE_COUNT )),
++ aPageCountNF ( this, SW_RES( NF_PAGE_COUNT )),
++ aPagePagesFT ( this, SW_RES( FT_PAGE_PAGES )),
++ aPageStartFT ( this, SW_RES( FT_PAGE_START )),
++ aDocumentStartRB ( this, SW_RES( RB_DOCUMENT_START )),
++ aPageStartRB ( this, SW_RES( RB_PAGE_START )),
++ aPageStartNF ( this, SW_RES( NF_PAGE_START )),
++ aNumberingFL ( this, SW_RES( FL_NUMBERING )),
++ aRestartNumberingCB ( this, SW_RES( CB_RESTART_NUMBERING )),
++ aRestartNumberingFT ( this, SW_RES( FT_RESTART_NUMBERING )),
++ aRestartNumberingNF ( this, SW_RES( NF_RESTART_NUMBERING )),
++ aSetPageNumberCB ( this, SW_RES( CB_SET_PAGE_NUMBER )),
++ aSetPageNumberFT ( this, SW_RES( FT_SET_PAGE_NUMBER )),
++ aSetPageNumberNF ( this, SW_RES( NF_SET_PAGE_NUMBER )),
++ aPagePropertiesFL ( this, SW_RES( FL_PAGE_PROPERTIES )),
++ aPagePropertiesLB ( this, SW_RES( LB_PAGE_PROPERTIES )),
++ aPagePropertiesPB ( this, SW_RES( PB_PAGE_PROPERTIES )),
++ aBottomFL ( this, SW_RES( FL_BOTTOM )),
++ aOkPB ( this, SW_RES( PB_OK )),
++ aCancelPB ( this, SW_RES( PB_CANCEL )),
++ aHelpPB ( this, SW_RES( PB_HELP )),
++ mpPageFmtDesc (0)
++#pragma warning (default : 4355)
++{
++ FreeResource();
++
++ aOkPB.SetClickHdl(LINK(this, SwTitlePageDlg, OKHdl));
++ aRestartNumberingCB.SetClickHdl(LINK(this, SwTitlePageDlg, RestartNumberingHdl));
++ aSetPageNumberCB.SetClickHdl(LINK(this, SwTitlePageDlg, SetPageNumberHdl));
++
++ USHORT nSetPage = 1;
++ USHORT nResetPage = 1;
++ USHORT nTitlePages = 1;
++ mpSh = ::GetActiveView()->GetWrtShellPtr();
++ lcl_PushCursor(mpSh);
++
++ SwView& rView = mpSh->GetView();
++ rView.InvalidateRulerPos();
++
++ bool bMaybeResetNumbering = false;
++
++ mpTitleDesc = mpSh->GetPageDescFromPool(RES_POOLPAGE_FIRST);
++ mpIndexDesc = mpSh->GetPageDescFromPool(RES_POOLPAGE_REGISTER);
++ mpNormalDesc = mpSh->GetPageDescFromPool(RES_POOLPAGE_STANDARD);
++
++ mpSh->SttDoc();
++ if (lcl_GetPageDesc( mpSh, nSetPage, &mpPageFmtDesc ))
++ {
++ if (mpPageFmtDesc->GetPageDesc() == mpTitleDesc)
++ {
++ while (mpSh->SttNxtPg())
++ {
++ const USHORT nCurIdx = mpSh->GetCurPageDesc();
++ const SwPageDesc &rPageDesc = mpSh->GetPageDesc( nCurIdx );
++
++ if (mpIndexDesc != &rPageDesc)
++ {
++ mpNormalDesc = &rPageDesc;
++ bMaybeResetNumbering = lcl_GetPageDesc(mpSh, nResetPage, NULL);
++ break;
++ }
++ ++nTitlePages;
++ }
++ }
++ }
++ lcl_PopCursor(mpSh);
++
++ aUseExistingPagesRB.Check();
++ aPageCountNF.SetValue(nTitlePages);
++ aPageCountNF.SetUpHdl(LINK(this, SwTitlePageDlg, UpHdl));
++ aPageCountNF.SetDownHdl(LINK(this, SwTitlePageDlg, DownHdl));
++
++ aDocumentStartRB.Check();
++ aPageStartNF.Enable(false);
++ aPageStartNF.SetValue(lcl_GetCurrentPage(mpSh));
++ Link aStartPageHdl = LINK(this, SwTitlePageDlg, StartPageHdl);
++ aDocumentStartRB.SetClickHdl(aStartPageHdl);
++ aPageStartRB.SetClickHdl(aStartPageHdl);
++
++ if (bMaybeResetNumbering && nResetPage > 0)
++ {
++ aRestartNumberingCB.Check();
++ aRestartNumberingNF.SetValue(nResetPage);
++ }
++ aRestartNumberingNF.Enable(aRestartNumberingCB.IsChecked());
++
++ aSetPageNumberNF.SetValue(nSetPage);
++ if (nSetPage > 1)
++ aSetPageNumberCB.Check();
++ aSetPageNumberNF.Enable(aSetPageNumberCB.IsChecked());
++
++ FillList();
++ aPagePropertiesPB.SetClickHdl(LINK(this, SwTitlePageDlg, EditHdl));
++}
++
++IMPL_LINK(SwTitlePageDlg, UpHdl, NumericField *, EMPTYARG)
++{
++ if (aPageCountNF.GetValue() == 2)
++ FillList();
++ return 0;
++}
++
++IMPL_LINK(SwTitlePageDlg, DownHdl, NumericField *, EMPTYARG)
++{
++ if (aPageCountNF.GetValue() == 1)
++ FillList();
++ return 0;
++}
++
++IMPL_LINK(SwTitlePageDlg, RestartNumberingHdl, CheckBox*, EMPTYARG)
++{
++ aRestartNumberingNF.Enable(aRestartNumberingCB.IsChecked());
++ return 0;
++}
++
++IMPL_LINK(SwTitlePageDlg, SetPageNumberHdl, CheckBox*, EMPTYARG)
++{
++ aSetPageNumberNF.Enable(aSetPageNumberCB.IsChecked());
++ return 0;
++}
++
++IMPL_LINK(SwTitlePageDlg, StartPageHdl, RadioButton*, EMPTYARG)
++{
++ aPageStartNF.Enable(aPageStartRB.IsChecked());
++ return 0;
++}
++
++__EXPORT SwTitlePageDlg::~SwTitlePageDlg()
++{
++ delete mpPageFmtDesc;
++}
++
++IMPL_LINK( SwTitlePageDlg, EditHdl, Button *, /*pBtn*/ )
++{
++ SwView& rView = mpSh->GetView();
++ rView.GetDocShell()->FormatPage(aPagePropertiesLB.GetSelectEntry(), false, mpSh);
++ rView.InvalidateRulerPos();
++
++ return 0;
++}
++
++IMPL_LINK( SwTitlePageDlg, OKHdl, Button *, /*pBtn*/ )
++{
++ lcl_PushCursor(mpSh);
++
++ mpSh->StartUndo();
++
++ SwFmtPageDesc aTitleDesc(mpTitleDesc);
++
++ if (aSetPageNumberCB.IsChecked())
++ aTitleDesc.SetNumOffset(aSetPageNumberNF.GetValue());
++ else if (mpPageFmtDesc)
++ aTitleDesc.SetNumOffset(mpPageFmtDesc->GetNumOffset());
++
++ USHORT nNoPages = aPageCountNF.GetValue();
++ if (!aUseExistingPagesRB.IsChecked())
++ {
++ mpSh->GotoPage(GetInsertPosition(), false);
++ for (USHORT nI=0; nI < nNoPages; ++nI)
++ mpSh->InsertPageBreak();
++ }
++
++ mpSh->GotoPage(GetInsertPosition(), false);
++ for (USHORT nI=1; nI < nNoPages; ++nI)
++ {
++ if (mpSh->SttNxtPg())
++ lcl_ChangePage(mpSh, 0, mpIndexDesc);
++ }
++
++ mpSh->GotoPage(GetInsertPosition(), false);
++ mpSh->SetAttr(aTitleDesc);
++
++ if (nNoPages > 1 && mpSh->GotoPage(GetInsertPosition() + nNoPages, false))
++ {
++ SwFmtPageDesc aPageFmtDesc(mpNormalDesc);
++ mpSh->SetAttr(aPageFmtDesc);
++ }
++
++ if (aRestartNumberingCB.IsChecked() || nNoPages > 1)
++ {
++ USHORT nPgNo = aRestartNumberingCB.IsChecked() ? aRestartNumberingNF.GetValue() : 0;
++ const SwPageDesc *pNewDesc = nNoPages > 1 ? mpNormalDesc : 0;
++ mpSh->GotoPage(GetInsertPosition() + nNoPages, false);
++ lcl_ChangePage(mpSh, nPgNo, pNewDesc);
++ }
++
++ mpSh->EndUndo();
++ lcl_PopCursor(mpSh);
++ if (!aUseExistingPagesRB.IsChecked())
++ mpSh->GotoPage(GetInsertPosition(), false);
++ EndDialog( RET_OK );
++ return 0;
++}
++
++/* vi:set tabstop=4 shiftwidth=4 expandtab: */
+--- /dev/null 2008-10-28 16:28:18.200260089 +0000
++++ openoffice.org/sw/source/ui/misc/titlepage.hrc 2008-11-13 10:21:32.000000000 +0000
+@@ -0,0 +1,58 @@
++/*************************************************************************
++ *
++ * OpenOffice.org - a multi-platform office productivity suite
++ *
++ * $RCSfile$
++ *
++ * $Revision$
++ *
++ * last change: $Author$ $Date$
++ *
++ * The Contents of this file are made available subject to
++ * the terms of GNU Lesser General Public License Version 2.1.
++ *
++ *
++ * GNU Lesser General Public License Version 2.1
++ * =============================================
++ * Copyright 2005 by Sun Microsystems, Inc.
++ * 901 San Antonio Road, Palo Alto, CA 94303, USA
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License version 2.1, as published by the Free Software Foundation.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
++ * MA 02111-1307 USA
++ *
++ ************************************************************************/
++#define FL_MAKEINSERT 1
++#define RB_USE_EXISTING_PAGES 2
++#define RB_INSERT_NEW_PAGES 3
++#define FT_PAGE_COUNT 4
++#define NF_PAGE_COUNT 5
++#define FT_PAGE_PAGES 6
++#define FT_PAGE_START 7
++#define RB_DOCUMENT_START 8
++#define RB_PAGE_START 9
++#define NF_PAGE_START 10
++#define FL_NUMBERING 11
++#define CB_RESTART_NUMBERING 12
++#define FT_RESTART_NUMBERING 13
++#define NF_RESTART_NUMBERING 14
++#define CB_SET_PAGE_NUMBER 15
++#define FT_SET_PAGE_NUMBER 16
++#define NF_SET_PAGE_NUMBER 17
++#define FL_PAGE_PROPERTIES 18
++#define LB_PAGE_PROPERTIES 19
++#define PB_PAGE_PROPERTIES 20
++#define FL_BOTTOM 21
++#define PB_OK 22
++#define PB_CANCEL 23
++#define PB_HELP 24
diff --git a/openoffice.org-2.3.0.ooo76649.httpencoding.patch b/openoffice.org-2.3.0.ooo76649.httpencoding.patch
new file mode 100644
index 0000000..3125263
--- /dev/null
+++ b/openoffice.org-2.3.0.ooo76649.httpencoding.patch
@@ -0,0 +1,13 @@
+diff -ru svtools.orig/source/svhtml/parhtml.cxx svtools/source/svhtml/parhtml.cxx
+--- svtools.orig/source/svhtml/parhtml.cxx 2010-07-14 11:11:17.000000000 +0100
++++ svtools/source/svhtml/parhtml.cxx 2010-07-14 11:16:29.000000000 +0100
+@@ -323,6 +323,9 @@
+ bReadComment = FALSE;
+ bIsInHeader = TRUE;
+ pOptions = new HTMLOptions;
++
++ //#i76649, default to UTF-8 for HTML unless we know differently
++ SetSrcEncoding(RTL_TEXTENCODING_UTF8);
+ }
+
+ HTMLParser::~HTMLParser()
diff --git a/openoffice.org-2.4.0.ooo86080.unopkg.bodge.patch b/openoffice.org-2.4.0.ooo86080.unopkg.bodge.patch
new file mode 100644
index 0000000..a12639c
--- /dev/null
+++ b/openoffice.org-2.4.0.ooo86080.unopkg.bodge.patch
@@ -0,0 +1,47 @@
+--- openoffice.org.orig/desktop/scripts/unopkg.sh 2008-01-14 15:55:26.000000000 +0000
++++ openoffice.org/desktop/scripts/unopkg.sh 2008-02-14 10:52:10.000000000 +0000
+@@ -43,6 +43,33 @@
+ sd_prog=`pwd`
+ cd "$sd_cwd"
+
++isshared=0
++for arg in $@
++do
++if [ "$arg" = "--shared" ]; then
++ isshared=1
++fi
++done
++if [ $isshared -eq 1 ]; then
++ echo $@ | grep -q env:JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY
++ if [ $? -ne 0 ]; then
++ set -- $@ '-env:JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY=1'
++ fi
++ echo $@ | grep -q env:UNO_JAVA_JFW_INSTALL_DATA
++ if [ $? -ne 0 -a -w $sd_prog/../share/config/javasettingsunopkginstall.xml ]; then
++ set -- $@ '-env:UNO_JAVA_JFW_INSTALL_DATA=$$ORIGIN/../share/config/javasettingsunopkginstall.xml'
++ fi
++ echo $@ | grep -q env:UserInstallation
++ if [ $? -ne 0 ]; then
++ INSTDIR=`/bin/mktemp -d --tmpdir unoinstall.XXXXXX`
++ if [ $? -ne 0 ]; then
++ echo "Could not create tmp dir" >&2
++ exit 1
++ fi
++ set -- $@ '-env:UserInstallation=file://'$INSTDIR
++ fi
++fi
++
+ #collect all bootstrap variables specified on the command line
+ #so that they can be passed as arguments to javaldx later on
+ for arg in $@
+@@ -71,6 +98,8 @@
+ # SAL_NO_XINITTHREADS=true; export SAL_NO_XINITTHREADS
+
+ # execute binary
+-exec "$sd_prog/unopkg.bin" "$@" \
++"$sd_prog/unopkg.bin" "$@" \
+ "-env:INIFILENAME=vnd.sun.star.pathname:$sd_prog/redirectrc"
+-
++if [ -n "$INSTDIR" ]; then
++ rm -rf $INSTDIR
++fi
diff --git a/openoffice.org-3.0.0.ooo88341.sc.verticalboxes.patch b/openoffice.org-3.0.0.ooo88341.sc.verticalboxes.patch
new file mode 100644
index 0000000..72369d8
--- /dev/null
+++ b/openoffice.org-3.0.0.ooo88341.sc.verticalboxes.patch
@@ -0,0 +1,102 @@
+Index: source/ui/inc/output.hxx
+===================================================================
+RCS file: /cvs/sc/sc/source/ui/inc/output.hxx,v
+retrieving revision 1.19
+diff -u -r1.19 output.hxx
+--- openoffice.org.orig/sc/source/ui/inc/output.hxx 26 Jun 2007 11:50:45 -0000 1.19
++++ openoffice.org/sc/source/ui/inc/output.hxx 16 Apr 2008 12:05:59 -0000
+@@ -242,6 +242,7 @@
+ void DrawExtraShadow(BOOL bLeft, BOOL bTop, BOOL bRight, BOOL bBottom);
+ void DrawFrame();
+
++ bool UseNormalClip(SCROW nCellY, const SfxItemSet* pCondSet);
+ // with logic MapMode set!
+ void DrawEdit(BOOL bPixelToLogic);
+
+Index: source/ui/view/output2.cxx
+===================================================================
+RCS file: /cvs/sc/sc/source/ui/view/output2.cxx,v
+retrieving revision 1.54.216.1
+diff -u -r1.54.216.1 output2.cxx
+--- openoffice.org.orig/sc/source/ui/view/output2.cxx 18 Jan 2008 12:02:36 -0000 1.54.216.1
++++ openoffice.org/sc/source/ui/view/output2.cxx 16 Apr 2008 12:19:34 -0000
+@@ -1907,6 +1907,21 @@
+ }
+ }
+
++bool ScOutputData::UseNormalClip(SCROW nCellY, const SfxItemSet* pCondSet)
++{
++ bool bNormalClip = false;
++ // Don't clip for text height when printing rows with optimal height,
++ // except when font size is from conditional formatting.
++ //! Allow clipping when vertically merged?
++ if ( eType != OUTTYPE_PRINTER ||
++ ( pDoc->GetRowFlags( nCellY, nTab ) & CR_MANUALSIZE ) ||
++ ( pCondSet && SFX_ITEM_SET ==
++ pCondSet->GetItemState(ATTR_FONT_HEIGHT, TRUE) ) )
++ bNormalClip = TRUE;
++ return bNormalClip;
++}
++
++
+ void ScOutputData::DrawEdit(BOOL bPixelToLogic)
+ {
+ vcl::PDFExtOutDevData* pPDFData = PTR_CAST( vcl::PDFExtOutDevData, pDev->GetExtOutDevData() );
+@@ -2524,13 +2539,8 @@
+ (ScMergeAttr*)&pPattern->GetItem(ATTR_MERGE);
+ BOOL bMerged = pMerge->GetColMerge() > 1 || pMerge->GetRowMerge() > 1;
+
+- // Don't clip for text height when printing rows with optimal height,
+- // except when font size is from conditional formatting.
+- //! Allow clipping when vertically merged?
+- if ( eType != OUTTYPE_PRINTER ||
+- ( pDoc->GetRowFlags( nCellY, nTab ) & CR_MANUALSIZE ) ||
+- ( pCondSet && SFX_ITEM_SET ==
+- pCondSet->GetItemState(ATTR_FONT_HEIGHT, TRUE) ) )
++
++ if (UseNormalClip(nCellY, pCondSet))
+ bClip = TRUE;
+ else
+ bSimClip = TRUE;
+@@ -2580,6 +2590,18 @@
+ #endif
+
+ Rectangle aLogicClip;
++ if (
++ ((nAttrRotate == 9000) || (nAttrRotate == 27000)) &&
++ (!(eOrient==SVX_ORIENTATION_STANDARD && !bAsianVertical)) &&
++ (!(bClip || bSimClip))
++ )
++ {
++ if (UseNormalClip(nCellY, pCondSet))
++ bClip = TRUE;
++ else
++ bSimClip = TRUE;
++ }
++
+ if (bClip || bSimClip)
+ {
+ // Clip marks are already handled in GetOutputArea
+@@ -2635,10 +2657,20 @@
+ }
+ else
+ {
++ long nDiff = 0;
+ if (eHorJust==SVX_HOR_JUSTIFY_RIGHT)
+- aLogicStart.X() += nAvailWidth - nEngineWidth;
++ nDiff = nAvailWidth - nEngineWidth;
+ else if (eHorJust==SVX_HOR_JUSTIFY_CENTER)
+- aLogicStart.X() += (nAvailWidth - nEngineWidth) / 2;
++ nDiff = (nAvailWidth - nEngineWidth) / 2;
++
++ if (nEngineWidth > nAvailWidth)
++ {
++ if (nAttrRotate == 9000)
++ nDiff = 0;
++ else if (nAttrRotate == 27000)
++ nDiff = nAvailWidth - nEngineWidth;
++ }
++ aLogicStart.X() += nDiff;
+ }
+ }
+
diff --git a/openoffice.org-3.1.0.ooo101274.opening-a-directory.patch b/openoffice.org-3.1.0.ooo101274.opening-a-directory.patch
new file mode 100644
index 0000000..8475362
--- /dev/null
+++ b/openoffice.org-3.1.0.ooo101274.opening-a-directory.patch
@@ -0,0 +1,174 @@
+Index: ucbhelper/source/client/content.cxx
+===================================================================
+--- ucbhelper/source/client/content.cxx (revision 270567)
++++ ucbhelper/source/client/content.cxx (working copy)
+@@ -39,6 +39,7 @@
+ #include
+
+ #include
++#include
+ #include
+ #include
+ #include
+@@ -48,6 +49,8 @@
+ #include
+ #include
+ #include
++#include
++#include
+ #include
+ #include
+ #include
+@@ -65,6 +68,8 @@
+ #include
+ #include
+ #include
++#include
++
+ #include
+ #include
+ #include
+@@ -72,6 +77,10 @@
+ #include
+ #include
+ #include
++#include
++#include
++
++#include
+
+ using namespace com::sun::star::container;
+ using namespace com::sun::star::beans;
+@@ -375,6 +384,54 @@
+ return Reference< XContent >();
+ }
+
++namespace
++{
++
++void
++lcl_displayMessage(
++ const Reference& rEnvironment,
++ const rtl::OUString& rUri)
++{
++ // Create exception
++ const Reference xCPM(
++ getContentBroker(true)->getContentProviderManagerInterface());
++ const PropertyValue aUriProperty(
++ rtl::OUString::createFromAscii("Uri"),
++ -1,
++ makeAny(getSystemPathFromFileURL(xCPM, rUri)),
++ PropertyState_DIRECT_VALUE)
++ ;
++ Sequence lArguments(1);
++ lArguments[0] <<= aUriProperty;
++ const InteractiveAugmentedIOException xError(
++ rtl::OUString(),
++ 0,
++ InteractionClassification_ERROR,
++ IOErrorCode_NO_FILE,
++ lArguments)
++ ;
++
++ // Create interaction request
++ std::auto_ptr aRequest(
++ new ucbhelper::SimpleInteractionRequest(makeAny(xError), CONTINUATION_APPROVE));
++ {
++ Reference xContinuation(
++ new ::ucbhelper::InteractionApprove(aRequest.get()));
++ Sequence > lContinuations(1);
++ lContinuations[0].set(xContinuation);
++ aRequest->setContinuations(lContinuations);
++ }
++
++ Reference xInteraction(rEnvironment->getInteractionHandler());
++ if (xInteraction.is())
++ {
++ Reference xRequest(aRequest.release());
++ xInteraction->handle(xRequest);
++ }
++}
++
++}
++
+ //=========================================================================
+ //=========================================================================
+ //
+@@ -1186,7 +1243,10 @@
+ throw( CommandAbortedException, RuntimeException, Exception )
+ {
+ if ( !isDocument() )
++ {
++ lcl_displayMessage(m_xImpl->getEnvironment(), getURL());
+ return Reference< XInputStream >();
++ }
+
+ Reference< XActiveDataSink > xSink = new ActiveDataSink;
+
+@@ -1211,7 +1271,10 @@
+ throw( CommandAbortedException, RuntimeException, Exception )
+ {
+ if ( !isDocument() )
++ {
++ lcl_displayMessage(m_xImpl->getEnvironment(), getURL());
+ return Reference< XInputStream >();
++ }
+
+ Reference< XActiveDataSink > xSink = new ActiveDataSink;
+
+@@ -1236,7 +1299,10 @@
+ throw( CommandAbortedException, RuntimeException, Exception )
+ {
+ if ( !isDocument() )
++ {
++ lcl_displayMessage(m_xImpl->getEnvironment(), getURL());
+ return Reference< XStream >();
++ }
+
+ Reference< XActiveDataStreamer > xStreamer = new ActiveDataStreamer;
+
+@@ -1261,7 +1327,10 @@
+ throw( CommandAbortedException, RuntimeException, Exception )
+ {
+ if ( !isDocument() )
++ {
++ lcl_displayMessage(m_xImpl->getEnvironment(), getURL());
+ return Reference< XStream >();
++ }
+
+ Reference< XActiveDataStreamer > xStreamer = new ActiveDataStreamer;
+
+@@ -1286,7 +1355,10 @@
+ throw( CommandAbortedException, RuntimeException, Exception )
+ {
+ if ( !isDocument() )
++ {
++ lcl_displayMessage(m_xImpl->getEnvironment(), getURL());
+ return sal_False;
++ }
+
+ OpenCommandArgument2 aArg;
+ aArg.Mode = OpenMode::DOCUMENT;
+@@ -1309,7 +1381,10 @@
+ throw( CommandAbortedException, RuntimeException, Exception )
+ {
+ if ( !isDocument() )
++ {
++ lcl_displayMessage(m_xImpl->getEnvironment(), getURL());
+ return sal_False;
++ }
+
+ OpenCommandArgument2 aArg;
+ aArg.Mode = OpenMode::DOCUMENT;
+Index: comphelper/source/misc/mediadescriptor.cxx
+===================================================================
+--- comphelper/source/misc/stillreadwriteinteraction.cxx 2010-07-06 15:32:02.000000000 +0100
++++ comphelper/source/misc/stillreadwriteinteraction.cxx 2010-07-06 15:32:31.000000000 +0100
+@@ -103,6 +103,7 @@
+ bAbort = (
+ (exIO.Code == css::ucb::IOErrorCode_ACCESS_DENIED )
+ || (exIO.Code == css::ucb::IOErrorCode_LOCKING_VIOLATION )
++ || (exIO.Code == css::ucb::IOErrorCode_NO_FILE )
+ || (exIO.Code == css::ucb::IOErrorCode_NOT_EXISTING )
+ #ifdef MACOSX
+ // this is a workaround for MAC, on this platform if the file is locked
diff --git a/openoffice.org-3.1.0.ooo102061.sc.cellanchoring.patch b/openoffice.org-3.1.0.ooo102061.sc.cellanchoring.patch
new file mode 100644
index 0000000..1f781a4
--- /dev/null
+++ b/openoffice.org-3.1.0.ooo102061.sc.cellanchoring.patch
@@ -0,0 +1,1751 @@
+diff -ru sc.orig/inc/document.hxx sc/inc/document.hxx
+--- sc.orig/inc/document.hxx 2009-06-04 12:39:48.000000000 +0100
++++ sc/inc/document.hxx 2009-06-04 12:40:23.000000000 +0100
+@@ -1319,8 +1319,8 @@
+ void RestorePrintRanges( const ScPrintRangeSaver& rSaver );
+
+ SC_DLLPUBLIC Rectangle GetMMRect( SCCOL nStartCol, SCROW nStartRow,
+- SCCOL nEndCol, SCROW nEndRow, SCTAB nTab );
+- SC_DLLPUBLIC ScRange GetRange( SCTAB nTab, const Rectangle& rMMRect );
++ SCCOL nEndCol, SCROW nEndRow, SCTAB nTab ) const;
++ SC_DLLPUBLIC ScRange GetRange( SCTAB nTab, const Rectangle& rMMRect ) const;
+
+ void UpdStlShtPtrsFrmNms();
+ void StylesToNames();
+diff -ru sc.orig/inc/drwlayer.hxx sc/inc/drwlayer.hxx
+--- sc.orig/inc/drwlayer.hxx 2009-06-04 12:39:49.000000000 +0100
++++ sc/inc/drwlayer.hxx 2009-06-04 12:40:23.000000000 +0100
+@@ -107,12 +107,10 @@
+ BOOL bHyphenatorSet;
+
+ private:
+- void MoveAreaTwips( SCTAB nTab, const Rectangle& rArea, const Point& rMove,
+- const Point& rTopLeft );
+ void MoveCells( SCTAB nTab, SCCOL nCol1,SCROW nRow1, SCCOL nCol2,SCROW nRow2,
+ SCsCOL nDx,SCsROW nDy, bool bUpdateNoteCaptionPos );
+
+- void RecalcPos( SdrObject* pObj, const ScDrawObjData& rData, bool bNegativePage, bool bUpdateNoteCaptionPos );
++ void RecalcPos( SdrObject* pObj, ScDrawObjData& rData, bool bNegativePage, bool bUpdateNoteCaptionPos );
+
+ public:
+ ScDrawLayer( ScDocument* pDocument, const String& rName );
+@@ -194,8 +192,11 @@
+ void EnsureGraphicNames();
+
+ // Verankerung setzen und ermitteln
+- static void SetAnchor( SdrObject*, ScAnchorType );
+- static ScAnchorType GetAnchor( const SdrObject* );
++ static void SetPageAnchored( SdrObject& );
++ static void SetCellAnchored( SdrObject&, const ScDrawObjData &rAnchor );
++ static void SetCellAnchoredFromPosition( SdrObject &rObj, const ScDocument &rDoc, SCTAB nTab );
++ static void UpdateCellAnchorFromPositionEnd( SdrObject &rObj, const ScDocument &rDoc, SCTAB nTab );
++ static ScAnchorType GetAnchorType( const SdrObject& );
+
+ // Positionen fuer Detektivlinien
+ static ScDrawObjData* GetObjData( SdrObject* pObj, BOOL bCreate=FALSE );
+diff -ru sc.orig/inc/userdat.hxx sc/inc/userdat.hxx
+--- sc.orig/inc/userdat.hxx 2009-06-04 12:39:49.000000000 +0100
++++ sc/inc/userdat.hxx 2009-06-04 12:40:23.000000000 +0100
+@@ -63,12 +63,15 @@
+ public:
+ ScAddress maStart;
+ ScAddress maEnd;
++ Point maStartOffset;
++ Point maEndOffset;
+ bool mbNote;
++ Rectangle maLastRect;
+
+ explicit ScDrawObjData();
+
+ private:
+- virtual ScDrawObjData* Clone( SdrObject* pObj ) const;
++ virtual ScDrawObjData* Clone( SdrObject* pObj ) const;
+ };
+
+ //-------------------------------------------------------------------------
+diff -ru sc.orig/source/core/data/documen3.cxx sc/source/core/data/documen3.cxx
+--- sc.orig/source/core/data/documen3.cxx 2009-06-04 12:39:09.000000000 +0100
++++ sc/source/core/data/documen3.cxx 2009-06-04 12:40:23.000000000 +0100
+@@ -1605,7 +1605,7 @@
+ return bAdded;
+ }
+
+-ScRange ScDocument::GetRange( SCTAB nTab, const Rectangle& rMMRect )
++ScRange ScDocument::GetRange( SCTAB nTab, const Rectangle& rMMRect ) const
+ {
+ ScTable* pTable = pTab[nTab];
+ if (!pTable)
+@@ -1879,7 +1879,7 @@
+ }
+
+ Rectangle ScDocument::GetMMRect( SCCOL nStartCol, SCROW nStartRow,
+- SCCOL nEndCol, SCROW nEndRow, SCTAB nTab )
++ SCCOL nEndCol, SCROW nEndRow, SCTAB nTab ) const
+ {
+ if (!ValidTab(nTab) || !pTab[nTab])
+ {
+diff -ru sc.orig/source/core/data/drwlayer.cxx sc/source/core/data/drwlayer.cxx
+--- sc.orig/source/core/data/drwlayer.cxx 2009-06-04 12:39:09.000000000 +0100
++++ sc/source/core/data/drwlayer.cxx 2009-06-05 12:28:12.000000000 +0100
+@@ -68,6 +68,9 @@
+ #include
+ #include
+
++#include
++#include
++
+ #include "drwlayer.hxx"
+ #include "drawpage.hxx"
+ #include "global.hxx"
+@@ -526,7 +529,41 @@
+ }
+ }
+
+-void ScDrawLayer::RecalcPos( SdrObject* pObj, const ScDrawObjData& rData, bool bNegativePage, bool bUpdateNoteCaptionPos )
++namespace
++{
++ //Can't have a zero width dimension
++ Rectangle lcl_makeSafeRectangle(const Rectangle &rNew)
++ {
++ Rectangle aRect = rNew;
++ if (aRect.Bottom() == aRect.Top())
++ aRect.Bottom() = aRect.Top()+1;
++ if (aRect.Right() == aRect.Left())
++ aRect.Right() = aRect.Left()+1;
++ return aRect;
++ }
++
++ Point lcl_calcAvailableDiff(ScDocument &rDoc, SCCOL nCol, SCROW nRow, SCTAB nTab, const Point &aWantedDiff)
++ {
++ Point aAvailableDiff(aWantedDiff);
++ long nHeight = rDoc.GetRowHeight( nRow, nTab ) * HMM_PER_TWIPS;
++ long nWidth = rDoc.GetColWidth( nCol, nTab ) * HMM_PER_TWIPS;
++ if (aAvailableDiff.Y() > nHeight)
++ aAvailableDiff.Y() = nHeight;
++ if (aAvailableDiff.X() > nWidth)
++ aAvailableDiff.X() = nWidth;
++ return aAvailableDiff;
++ }
++
++ Rectangle lcl_UpdateCalcPoly(basegfx::B2DPolygon &rCalcPoly, int nWhichPoint, const Point &rPos)
++ {
++ rCalcPoly.setB2DPoint(nWhichPoint, basegfx::B2DPoint(rPos.X(), rPos.Y()));
++ basegfx::B2DRange aRange(basegfx::tools::getRange(rCalcPoly));
++ return Rectangle(aRange.getMinX(), aRange.getMinY(),
++ aRange.getMaxX(), aRange.getMaxY());
++ }
++}
++
++void ScDrawLayer::RecalcPos( SdrObject* pObj, ScDrawObjData& rData, bool bNegativePage, bool bUpdateNoteCaptionPos )
+ {
+ DBG_ASSERT( pDoc, "ScDrawLayer::RecalcPos - missing document" );
+ if( !pDoc )
+@@ -565,6 +602,8 @@
+
+ if( bCircle )
+ {
++ rData.maLastRect = pObj->GetLogicRect();
++
+ Point aPos( pDoc->GetColOffset( nCol1, nTab1 ), pDoc->GetRowOffset( nRow1, nTab1 ) );
+ TwipsToMM( aPos.X() );
+ TwipsToMM( aPos.Y() );
+@@ -585,11 +624,18 @@
+ {
+ if (bRecording)
+ AddCalcUndo( new SdrUndoGeoObj( *pObj ) );
+- pObj->SetLogicRect(aRect);
++ rData.maLastRect = lcl_makeSafeRectangle(aRect);
++ pObj->SetLogicRect(rData.maLastRect);
+ }
+ }
+ else if( bArrow )
+ {
++ rData.maLastRect = pObj->GetLogicRect();
++ basegfx::B2DPolygon aCalcPoly;
++ Point aOrigStartPos(pObj->GetPoint(0));
++ Point aOrigEndPos(pObj->GetPoint(1));
++ aCalcPoly.append(basegfx::B2DPoint(aOrigStartPos.X(), aOrigStartPos.Y()));
++ aCalcPoly.append(basegfx::B2DPoint(aOrigEndPos.X(), aOrigEndPos.Y()));
+ //! nicht mehrere Undos fuer ein Objekt erzeugen (hinteres kann dann weggelassen werden)
+
+ SCCOL nLastCol;
+@@ -610,6 +656,8 @@
+ {
+ if (bRecording)
+ AddCalcUndo( new SdrUndoGeoObj( *pObj ) );
++
++ rData.maLastRect = lcl_UpdateCalcPoly(aCalcPoly, 0, aStartPos);
+ pObj->SetPoint( aStartPos, 0 );
+ }
+
+@@ -624,6 +672,8 @@
+ {
+ if (bRecording)
+ AddCalcUndo( new SdrUndoGeoObj( *pObj ) );
++
++ rData.maLastRect = lcl_UpdateCalcPoly(aCalcPoly, 1, aEndPos);
+ pObj->SetPoint( aEndPos, 1 );
+ }
+ }
+@@ -644,6 +694,8 @@
+ {
+ if (bRecording)
+ AddCalcUndo( new SdrUndoGeoObj( *pObj ) );
++
++ rData.maLastRect = lcl_UpdateCalcPoly(aCalcPoly, 1, aEndPos);
+ pObj->SetPoint( aEndPos, 1 );
+ }
+
+@@ -660,45 +712,68 @@
+ {
+ if (bRecording)
+ AddCalcUndo( new SdrUndoGeoObj( *pObj ) );
++
++ rData.maLastRect = lcl_UpdateCalcPoly(aCalcPoly, 0, aStartPos);
+ pObj->SetPoint( aStartPos, 0 );
+ }
+ }
+ }
+ }
+- else // Referenz-Rahmen
++ else
+ {
++ bool bCanResize = bValid2 && !pObj->IsResizeProtect();
++
++ //First time positioning, must be able to at least move it
++ if (rData.maLastRect.IsEmpty())
++ rData.maLastRect = pObj->GetLogicRect();
++
+ DBG_ASSERT( bValid1, "ScDrawLayer::RecalcPos - invalid start position" );
+ Point aPos( pDoc->GetColOffset( nCol1, nTab1 ), pDoc->GetRowOffset( nRow1, nTab1 ) );
+ TwipsToMM( aPos.X() );
+ TwipsToMM( aPos.Y() );
++ aPos += lcl_calcAvailableDiff(*pDoc, nCol1, nRow1, nTab1, rData.maStartOffset);
+
+- if( bValid2 )
++ if( bCanResize )
+ {
+- Point aEnd( pDoc->GetColOffset( nCol2 + 1, nTab2 ), pDoc->GetRowOffset( nRow2 + 1, nTab2 ) );
++ Point aEnd( pDoc->GetColOffset( nCol2, nTab2 ), pDoc->GetRowOffset( nRow2, nTab2 ) );
+ TwipsToMM( aEnd.X() );
+ TwipsToMM( aEnd.Y() );
++ aEnd += lcl_calcAvailableDiff(*pDoc, nCol2, nRow2, nTab2, rData.maEndOffset);
+
+ Rectangle aNew( aPos, aEnd );
+ if ( bNegativePage )
+ MirrorRectRTL( aNew );
+ if ( pObj->GetLogicRect() != aNew )
+ {
++ Rectangle aOld(pObj->GetLogicRect());
++
+ if (bRecording)
+ AddCalcUndo( new SdrUndoGeoObj( *pObj ) );
+- pObj->SetLogicRect(aNew);
++ rData.maLastRect = lcl_makeSafeRectangle(aNew);
++ pObj->SetLogicRect(rData.maLastRect);
+ }
+ }
+ else
+ {
+ if ( bNegativePage )
+- aPos.X() = -aPos.X();
++ aPos.X() = -aPos.X() - rData.maLastRect.GetWidth();
+ if ( pObj->GetRelativePos() != aPos )
+ {
+ if (bRecording)
+ AddCalcUndo( new SdrUndoGeoObj( *pObj ) );
++ rData.maLastRect.SetPos( aPos );
+ pObj->SetRelativePos( aPos );
+ }
+ }
++
++ /*
++ * If we were not allowed resize the object, then the end cell anchor
++ * is possibly incorrect now, and if the object has no end-cell (e.g.
++ * missing in original .xml) we are also forced to generate one
++ */
++ bool bEndAnchorIsBad = !bValid2 || pObj->IsResizeProtect();
++ if (bEndAnchorIsBad)
++ ScDrawLayer::UpdateCellAnchorFromPositionEnd(*pObj, *pDoc, nTab1);
+ }
+ }
+
+@@ -873,151 +948,6 @@
+ return pRet;
+ }
+
+-// MoveAreaTwips: all measures are kept in twips
+-void ScDrawLayer::MoveAreaTwips( SCTAB nTab, const Rectangle& rArea,
+- const Point& rMove, const Point& rTopLeft )
+-{
+- if (!rMove.X() && !rMove.Y())
+- return; // nix
+-
+- SdrPage* pPage = GetPage(static_cast(nTab));
+- DBG_ASSERT(pPage,"Page nicht gefunden");
+- if (!pPage)
+- return;
+-
+- BOOL bNegativePage = pDoc && pDoc->IsNegativePage( nTab );
+-
+- // fuer Shrinking!
+- Rectangle aNew( rArea );
+- BOOL bShrink = FALSE;
+- if ( rMove.X() < 0 || rMove.Y() < 0 ) // verkleinern
+- {
+- if ( rTopLeft != rArea.TopLeft() ) // sind gleich beim Verschieben von Zellen
+- {
+- bShrink = TRUE;
+- aNew.Left() = rTopLeft.X();
+- aNew.Top() = rTopLeft.Y();
+- }
+- }
+- SdrObjListIter aIter( *pPage, IM_FLAT );
+- SdrObject* pObject = aIter.Next();
+- while (pObject)
+- {
+- if( GetAnchor( pObject ) == SCA_CELL )
+- {
+- if ( GetObjData( pObject ) ) // Detektiv-Pfeil ?
+- {
+- // hier nichts
+- }
+- else if ( pObject->ISA( SdrEdgeObj ) ) // Verbinder?
+- {
+- // hier auch nichts
+- //! nicht verbundene Enden wie bei Linien (s.u.) behandeln?
+- }
+- else if ( pObject->IsPolyObj() && pObject->GetPointCount()==2 )
+- {
+- for (USHORT i=0; i<2; i++)
+- {
+- BOOL bMoved = FALSE;
+- Point aPoint = pObject->GetPoint(i);
+- lcl_ReverseTwipsToMM( aPoint );
+- if (rArea.IsInside(aPoint))
+- {
+- aPoint += rMove; bMoved = TRUE;
+- }
+- else if (bShrink && aNew.IsInside(aPoint))
+- {
+- // Punkt ist in betroffener Zelle - Test auf geloeschten Bereich
+- if ( rMove.X() && aPoint.X() >= rArea.Left() + rMove.X() )
+- {
+- aPoint.X() = rArea.Left() + rMove.X() - SHRINK_DIST_TWIPS;
+- if ( aPoint.X() < 0 ) aPoint.X() = 0;
+- bMoved = TRUE;
+- }
+- if ( rMove.Y() && aPoint.Y() >= rArea.Top() + rMove.Y() )
+- {
+- aPoint.Y() = rArea.Top() + rMove.Y() - SHRINK_DIST_TWIPS;
+- if ( aPoint.Y() < 0 ) aPoint.Y() = 0;
+- bMoved = TRUE;
+- }
+- }
+- if( bMoved )
+- {
+- AddCalcUndo( new SdrUndoGeoObj( *pObject ) );
+- lcl_TwipsToMM( aPoint );
+- pObject->SetPoint( aPoint, i );
+- }
+- }
+- }
+- else
+- {
+- Rectangle aObjRect = pObject->GetLogicRect();
+- // aOldMMPos: not converted, millimeters
+- Point aOldMMPos = bNegativePage ? aObjRect.TopRight() : aObjRect.TopLeft();
+- lcl_ReverseTwipsToMM( aObjRect );
+- Point aTopLeft = bNegativePage ? aObjRect.TopRight() : aObjRect.TopLeft(); // logical left
+- Size aMoveSize;
+- BOOL bDoMove = FALSE;
+- if (rArea.IsInside(aTopLeft))
+- {
+- aMoveSize = Size(rMove.X(),rMove.Y());
+- bDoMove = TRUE;
+- }
+- else if (bShrink && aNew.IsInside(aTopLeft))
+- {
+- // Position ist in betroffener Zelle - Test auf geloeschten Bereich
+- if ( rMove.X() && aTopLeft.X() >= rArea.Left() + rMove.X() )
+- {
+- aMoveSize.Width() = rArea.Left() + rMove.X() - SHRINK_DIST - aTopLeft.X();
+- bDoMove = TRUE;
+- }
+- if ( rMove.Y() && aTopLeft.Y() >= rArea.Top() + rMove.Y() )
+- {
+- aMoveSize.Height() = rArea.Top() + rMove.Y() - SHRINK_DIST - aTopLeft.Y();
+- bDoMove = TRUE;
+- }
+- }
+- if ( bDoMove )
+- {
+- if ( bNegativePage )
+- {
+- if ( aTopLeft.X() + aMoveSize.Width() > 0 )
+- aMoveSize.Width() = -aTopLeft.X();
+- }
+- else
+- {
+- if ( aTopLeft.X() + aMoveSize.Width() < 0 )
+- aMoveSize.Width() = -aTopLeft.X();
+- }
+- if ( aTopLeft.Y() + aMoveSize.Height() < 0 )
+- aMoveSize.Height() = -aTopLeft.Y();
+-
+- // get corresponding move size in millimeters:
+- Point aNewPos( aTopLeft.X() + aMoveSize.Width(), aTopLeft.Y() + aMoveSize.Height() );
+- lcl_TwipsToMM( aNewPos );
+- aMoveSize = Size( aNewPos.X() - aOldMMPos.X(), aNewPos.Y() - aOldMMPos.Y() ); // millimeters
+-
+- AddCalcUndo( new SdrUndoMoveObj( *pObject, aMoveSize ) );
+- pObject->Move( aMoveSize );
+- }
+- else if ( rArea.IsInside( bNegativePage ? aObjRect.BottomLeft() : aObjRect.BottomRight() ) &&
+- !pObject->IsResizeProtect() )
+- {
+- // geschuetzte Groessen werden nicht veraendert
+- // (Positionen schon, weil sie ja an der Zelle "verankert" sind)
+- AddCalcUndo( new SdrUndoGeoObj( *pObject ) );
+- long nOldSizeX = aObjRect.Right() - aObjRect.Left() + 1;
+- long nOldSizeY = aObjRect.Bottom() - aObjRect.Top() + 1;
+- long nLogMoveX = rMove.X() * ( bNegativePage ? -1 : 1 ); // logical direction
+- pObject->Resize( aOldMMPos, Fraction( nOldSizeX+nLogMoveX, nOldSizeX ),
+- Fraction( nOldSizeY+rMove.Y(), nOldSizeY ) );
+- }
+- }
+- }
+- pObject = aIter.Next();
+- }
+-}
+-
+ void ScDrawLayer::MoveArea( SCTAB nTab, SCCOL nCol1,SCROW nRow1, SCCOL nCol2,SCROW nRow2,
+ SCsCOL nDx,SCsROW nDy, BOOL bInsDel, bool bUpdateNoteCaptionPos )
+ {
+@@ -1059,11 +989,6 @@
+ aTopLeft.Y() += aMove.Y();
+ }
+
+- // drawing objects are now directly included in cut&paste
+- // -> only update references when inserting/deleting (or changing widths or heights)
+- if ( bInsDel )
+- MoveAreaTwips( nTab, aRect, aMove, aTopLeft );
+-
+ //
+ // Detektiv-Pfeile: Zellpositionen anpassen
+ //
+@@ -1101,8 +1026,6 @@
+ aTopLeft.X() = -aTopLeft.X();
+ nDifTwips = -nDifTwips;
+ }
+-
+- MoveAreaTwips( nTab, aRect, Point( nDifTwips,0 ), aTopLeft );
+ }
+
+ void ScDrawLayer::HeightChanged( SCTAB nTab, SCROW nRow, long nDifTwips )
+@@ -1133,8 +1056,6 @@
+ MirrorRectRTL( aRect );
+ aTopLeft.X() = -aTopLeft.X();
+ }
+-
+- MoveAreaTwips( nTab, aRect, Point( 0,nDifTwips ), aTopLeft );
+ }
+
+ BOOL ScDrawLayer::HasObjectsInRows( SCTAB nTab, SCROW nStartRow, SCROW nEndRow )
+@@ -1846,35 +1767,105 @@
+ }
+ }
+
+-void ScDrawLayer::SetAnchor( SdrObject* pObj, ScAnchorType eType )
++namespace
++{
++ SdrObjUserData* GetFirstUserDataOfType(const SdrObject *pObj, UINT16 nId)
++ {
++ USHORT nCount = pObj ? pObj->GetUserDataCount() : 0;
++ for( USHORT i = 0; i < nCount; i++ )
++ {
++ SdrObjUserData* pData = pObj->GetUserData( i );
++ if( pData && pData->GetInventor() == SC_DRAWLAYER && pData->GetId() == nId )
++ return pData;
++ }
++ return NULL;
++ }
++
++ void DeleteFirstUserDataOfType(SdrObject *pObj, UINT16 nId)
++ {
++ USHORT nCount = pObj ? pObj->GetUserDataCount() : 0;
++ for( USHORT i = nCount; i > 0; i-- )
++ {
++ SdrObjUserData* pData = pObj->GetUserData( i-1 );
++ if( pData && pData->GetInventor() == SC_DRAWLAYER && pData->GetId() == nId )
++ pObj->DeleteUserData(i-1);
++ }
++ }
++}
++
++void ScDrawLayer::SetCellAnchored( SdrObject &rObj, const ScDrawObjData &rAnchor )
++{
++ ScDrawObjData* pAnchor = GetObjData( &rObj, true );
++ pAnchor->maStart = rAnchor.maStart;
++ pAnchor->maEnd = rAnchor.maEnd;
++ pAnchor->maStartOffset = rAnchor.maStartOffset;
++ pAnchor->maEndOffset = rAnchor.maEndOffset;
++}
++
++void ScDrawLayer::SetCellAnchoredFromPosition( SdrObject &rObj, const ScDocument &rDoc, SCTAB nTab )
++{
++ Rectangle aObjRect(rObj.GetLogicRect());
++ ScRange aRange = rDoc.GetRange( nTab, aObjRect );
++
++ Rectangle aCellRect;
++
++ ScDrawObjData aAnchor;
++ aAnchor.maStart = aRange.aStart;
++ aCellRect = rDoc.GetMMRect( aRange.aStart.Col(), aRange.aStart.Row(),
++ aRange.aStart.Col(), aRange.aStart.Row(), aRange.aStart.Tab() );
++ aAnchor.maStartOffset.Y() = aObjRect.Top()-aCellRect.Top();
++ if (!rDoc.IsNegativePage(nTab))
++ aAnchor.maStartOffset.X() = aObjRect.Left()-aCellRect.Left();
++ else
++ aAnchor.maStartOffset.X() = aCellRect.Right()-aObjRect.Right();
++
++ aAnchor.maEnd = aRange.aEnd;
++ aCellRect = rDoc.GetMMRect( aRange.aEnd.Col(), aRange.aEnd.Row(),
++ aRange.aEnd.Col(), aRange.aEnd.Row(), aRange.aEnd.Tab() );
++ aAnchor.maEndOffset.Y() = aObjRect.Bottom()-aCellRect.Top();
++ if (!rDoc.IsNegativePage(nTab))
++ aAnchor.maEndOffset.X() = aObjRect.Right()-aCellRect.Left();
++ else
++ aAnchor.maEndOffset.X() = aCellRect.Right()-aObjRect.Left();
++
++ SetCellAnchored( rObj, aAnchor );
++}
++
++void ScDrawLayer::UpdateCellAnchorFromPositionEnd( SdrObject &rObj, const ScDocument &rDoc, SCTAB nTab )
+ {
+- ScAnchorType eOldAnchorType = GetAnchor( pObj );
++ Rectangle aObjRect(rObj.GetLogicRect());
++ ScRange aRange = rDoc.GetRange( nTab, aObjRect );
+
+- // Ein an der Seite verankertes Objekt zeichnet sich durch eine Anker-Pos
+- // von (0,1) aus. Das ist ein shabby Trick, der aber funktioniert!
+- Point aAnchor( 0, eType == SCA_PAGE ? 1 : 0 );
+- pObj->SetAnchorPos( aAnchor );
++ ScDrawObjData* pAnchor = GetObjData( &rObj, true );
++ pAnchor->maEnd = aRange.aEnd;
++
++ Rectangle aCellRect;
++ aCellRect = rDoc.GetMMRect( aRange.aEnd.Col(), aRange.aEnd.Row(),
++ aRange.aEnd.Col(), aRange.aEnd.Row(), aRange.aEnd.Tab() );
++ pAnchor->maEndOffset.Y() = aObjRect.Bottom()-aCellRect.Top();
++ if (!rDoc.IsNegativePage(nTab))
++ pAnchor->maEndOffset.X() = aObjRect.Right()-aCellRect.Left();
++ else
++ pAnchor->maEndOffset.X() = aCellRect.Right()-aObjRect.Left();
++}
+
+- if ( eOldAnchorType != eType )
+- pObj->notifyShapePropertyChange( ::svx::eSpreadsheetAnchor );
++void ScDrawLayer::SetPageAnchored( SdrObject &rObj )
++{
++ DeleteFirstUserDataOfType(&rObj, SC_UD_OBJDATA);
+ }
+
+-ScAnchorType ScDrawLayer::GetAnchor( const SdrObject* pObj )
++ScAnchorType ScDrawLayer::GetAnchorType( const SdrObject &rObj )
+ {
+- Point aAnchor( pObj->GetAnchorPos() );
+- return ( aAnchor.Y() != 0 ) ? SCA_PAGE : SCA_CELL;
++ //If this object has a cell anchor associated with it
++ //then its cell-anchored, otherwise its page-anchored
++ return ScDrawLayer::GetObjData(const_cast(&rObj)) ? SCA_CELL : SCA_PAGE;
+ }
+
+ ScDrawObjData* ScDrawLayer::GetObjData( SdrObject* pObj, BOOL bCreate ) // static
+ {
+- USHORT nCount = pObj ? pObj->GetUserDataCount() : 0;
+- for( USHORT i = 0; i < nCount; i++ )
+- {
+- SdrObjUserData* pData = pObj->GetUserData( i );
+- if( pData && pData->GetInventor() == SC_DRAWLAYER
+- && pData->GetId() == SC_UD_OBJDATA )
+- return (ScDrawObjData*) pData;
+- }
++ if (SdrObjUserData *pData = GetFirstUserDataOfType(pObj, SC_UD_OBJDATA))
++ return (ScDrawObjData*) pData;
++
+ if( pObj && bCreate )
+ {
+ ScDrawObjData* pData = new ScDrawObjData;
+@@ -1911,15 +1902,7 @@
+
+ ScIMapInfo* ScDrawLayer::GetIMapInfo( SdrObject* pObj ) // static
+ {
+- USHORT nCount = pObj->GetUserDataCount();
+- for( USHORT i = 0; i < nCount; i++ )
+- {
+- SdrObjUserData* pData = pObj->GetUserData( i );
+- if( pData && pData->GetInventor() == SC_DRAWLAYER
+- && pData->GetId() == SC_UD_IMAPDATA )
+- return (ScIMapInfo*) pData;
+- }
+- return NULL;
++ return (ScIMapInfo*)GetFirstUserDataOfType(pObj, SC_UD_IMAPDATA);
+ }
+
+ // static:
+@@ -1972,7 +1955,7 @@
+ else if ( pObj->ISA( SdrOle2Obj ) ) // OLE-Objekt
+ {
+ // TODO/LEAN: working with visual area needs running state
+- aGraphSize = ((SdrOle2Obj*)pObj)->GetOrigObjSize();
++ aGraphSize = ((const SdrOle2Obj*)pObj)->GetOrigObjSize();
+ bObjSupported = TRUE;
+ }
+
+@@ -1990,14 +1973,9 @@
+
+ ScMacroInfo* ScDrawLayer::GetMacroInfo( SdrObject* pObj, BOOL bCreate ) // static
+ {
+- USHORT nCount = pObj->GetUserDataCount();
+- for( USHORT i = 0; i < nCount; i++ )
+- {
+- SdrObjUserData* pData = pObj->GetUserData( i );
+- if( pData && pData->GetInventor() == SC_DRAWLAYER
+- && pData->GetId() == SC_UD_MACRODATA )
+- return (ScMacroInfo*) pData;
+- }
++ if (SdrObjUserData *pData = GetFirstUserDataOfType(pObj, SC_UD_MACRODATA))
++ return (ScMacroInfo*) pData;
++
+ if ( bCreate )
+ {
+ ScMacroInfo* pData = new ScMacroInfo;
+diff -ru sc.orig/source/core/data/postit.cxx sc/source/core/data/postit.cxx
+--- sc.orig/source/core/data/postit.cxx 2009-06-04 12:39:10.000000000 +0100
++++ sc/source/core/data/postit.cxx 2009-06-04 12:40:23.000000000 +0100
+@@ -102,7 +102,6 @@
+
+ void ScCaptionUtil::SetBasicCaptionSettings( SdrCaptionObj& rCaption, bool bShown )
+ {
+- ScDrawLayer::SetAnchor( &rCaption, SCA_PAGE );
+ SetCaptionLayer( rCaption, bShown );
+ rCaption.SetFixedTail();
+ rCaption.SetSpecialTextBoxShadow();
+diff -ru sc.orig/source/core/tool/detfunc.cxx sc/source/core/tool/detfunc.cxx
+--- sc.orig/source/core/tool/detfunc.cxx 2009-06-04 12:39:11.000000000 +0100
++++ sc/source/core/tool/detfunc.cxx 2009-06-04 12:40:23.000000000 +0100
+@@ -492,7 +492,6 @@
+
+ pBox->SetMergedItemSetAndBroadcast(rData.GetBoxSet());
+
+- ScDrawLayer::SetAnchor( pBox, SCA_CELL );
+ pBox->SetLayer( SC_LAYER_INTERN );
+ pPage->InsertObject( pBox );
+ pModel->AddCalcUndo( new SdrUndoInsertObj( *pBox ) );
+@@ -534,7 +533,6 @@
+ pArrow->NbcSetLogicRect(Rectangle(aStartPos,aEndPos)); //! noetig ???
+ pArrow->SetMergedItemSetAndBroadcast(rAttrSet);
+
+- ScDrawLayer::SetAnchor( pArrow, SCA_CELL );
+ pArrow->SetLayer( SC_LAYER_INTERN );
+ pPage->InsertObject( pArrow );
+ pModel->AddCalcUndo( new SdrUndoInsertObj( *pArrow ) );
+@@ -565,7 +563,6 @@
+
+ pBox->SetMergedItemSetAndBroadcast(rData.GetBoxSet());
+
+- ScDrawLayer::SetAnchor( pBox, SCA_CELL );
+ pBox->SetLayer( SC_LAYER_INTERN );
+ pPage->InsertObject( pBox );
+ pModel->AddCalcUndo( new SdrUndoInsertObj( *pBox ) );
+@@ -600,7 +597,6 @@
+
+ pArrow->SetMergedItemSetAndBroadcast(rAttrSet);
+
+- ScDrawLayer::SetAnchor( pArrow, SCA_CELL );
+ pArrow->SetLayer( SC_LAYER_INTERN );
+ pPage->InsertObject( pArrow );
+ pModel->AddCalcUndo( new SdrUndoInsertObj( *pArrow ) );
+@@ -668,7 +664,6 @@
+
+ pCircle->SetMergedItemSetAndBroadcast(rAttrSet);
+
+- ScDrawLayer::SetAnchor( pCircle, SCA_CELL );
+ pCircle->SetLayer( SC_LAYER_INTERN );
+ pPage->InsertObject( pCircle );
+ pModel->AddCalcUndo( new SdrUndoInsertObj( *pCircle ) );
+diff -ru sc.orig/source/filter/xml/XMLExportIterator.hxx sc/source/filter/xml/XMLExportIterator.hxx
+--- sc.orig/source/filter/xml/XMLExportIterator.hxx 2009-06-04 12:39:13.000000000 +0100
++++ sc/source/filter/xml/XMLExportIterator.hxx 2009-06-04 12:40:23.000000000 +0100
+@@ -72,6 +72,8 @@
+ {
+ ScAddress aAddress;
+ ScAddress aEndAddress;
++ sal_Int32 nEndX;
++ sal_Int32 nEndY;
+ com::sun::star::uno::Reference xShape;
+
+ sal_Bool operator<(const ScMyShape& aShape) const;
+diff -ru sc.orig/source/filter/xml/xmlexprt.cxx sc/source/filter/xml/xmlexprt.cxx
+--- sc.orig/source/filter/xml/xmlexprt.cxx 2009-06-04 12:39:13.000000000 +0100
++++ sc/source/filter/xml/xmlexprt.cxx 2009-06-04 12:51:46.000000000 +0100
+@@ -599,39 +599,21 @@
+ else
+ {
+ ++nShapesCount;
+- SvxShape* pShapeImp(SvxShape::getImplementation(xShape));
+- if (pShapeImp)
++ if (SvxShape* pShapeImp = SvxShape::getImplementation(xShape))
+ {
+- SdrObject *pSdrObj(pShapeImp->GetSdrObject());
+- if (pSdrObj)
++ if (SdrObject *pSdrObj = pShapeImp->GetSdrObject())
+ {
+- if (ScDrawLayer::GetAnchor(pSdrObj) == SCA_CELL)
++ if (ScDrawObjData *pAnchor = ScDrawLayer::GetObjData( pSdrObj ))
+ {
+- if (pDoc)
+- {
+-
+- awt::Point aPoint(xShape->getPosition());
+- awt::Size aSize(xShape->getSize());
+- rtl::OUString sType(xShape->getShapeType());
+- Rectangle aRectangle(aPoint.X, aPoint.Y, aPoint.X + aSize.Width, aPoint.Y + aSize.Height);
+- if ( sType.equals(sCaptionShape) )
+- {
+- awt::Point aRelativeCaptionPoint;
+- xShapeProp->getPropertyValue( sCaptionPoint ) >>= aRelativeCaptionPoint;
+- Point aCoreRelativeCaptionPoint(aRelativeCaptionPoint.X, aRelativeCaptionPoint.Y);
+- Point aCoreAbsoluteCaptionPoint(aPoint.X, aPoint.Y);
+- aCoreAbsoluteCaptionPoint += aCoreRelativeCaptionPoint;
+- aRectangle.Union(Rectangle(aCoreAbsoluteCaptionPoint, aCoreAbsoluteCaptionPoint));
+- }
+- ScRange aRange(pDoc->GetRange(static_cast(nTable), aRectangle));
+- ScMyShape aMyShape;
+- aMyShape.aAddress = aRange.aStart;
+- aMyShape.aEndAddress = aRange.aEnd;
+- aMyShape.xShape = xShape;
+- pSharedData->AddNewShape(aMyShape);
+- pSharedData->SetLastColumn(nTable, aRange.aStart.Col());
+- pSharedData->SetLastRow(nTable, aRange.aStart.Row());
+- }
++ ScMyShape aMyShape;
++ aMyShape.aAddress = pAnchor->maStart;
++ aMyShape.aEndAddress = pAnchor->maEnd;
++ aMyShape.nEndX = pAnchor->maEndOffset.X();
++ aMyShape.nEndY = pAnchor->maEndOffset.Y();
++ aMyShape.xShape = xShape;
++ pSharedData->AddNewShape(aMyShape);
++ pSharedData->SetLastColumn(nTable, pAnchor->maStart.Col());
++ pSharedData->SetLastRow(nTable, pAnchor->maStart.Row());
+ }
+ else
+ pSharedData->AddTableShape(nTable, xShape);
+@@ -2585,29 +2567,15 @@
+ aPoint.X = 2 * aItr->xShape->getPosition().X + aItr->xShape->getSize().Width - aPoint.X;
+ if ( !aItr->xShape->getShapeType().equals(sCaptionShape) )
+ {
+- awt::Point aEndPoint;
+ Rectangle aEndRec(pDoc->GetMMRect(aItr->aEndAddress.Col(), aItr->aEndAddress.Row(),
+ aItr->aEndAddress.Col(), aItr->aEndAddress.Row(), aItr->aEndAddress.Tab()));
+ rtl::OUString sEndAddress;
+ ScRangeStringConverter::GetStringFromAddress(sEndAddress, aItr->aEndAddress, pDoc, FormulaGrammar::CONV_OOO);
+ AddAttribute(XML_NAMESPACE_TABLE, XML_END_CELL_ADDRESS, sEndAddress);
+- if (bNegativePage)
+- aEndPoint.X = -aEndRec.Right();
+- else
+- aEndPoint.X = aEndRec.Left();
+- aEndPoint.Y = aEndRec.Top();
+- awt::Point aStartPoint(aItr->xShape->getPosition());
+- awt::Size aSize(aItr->xShape->getSize());
+- sal_Int32 nEndX;
+- if (bNegativePage)
+- nEndX = -aStartPoint.X - aEndPoint.X;
+- else
+- nEndX = aStartPoint.X + aSize.Width - aEndPoint.X;
+- sal_Int32 nEndY(aStartPoint.Y + aSize.Height - aEndPoint.Y);
+ rtl::OUStringBuffer sBuffer;
+- GetMM100UnitConverter().convertMeasure(sBuffer, nEndX);
++ GetMM100UnitConverter().convertMeasure(sBuffer, aItr->nEndX);
+ AddAttribute(XML_NAMESPACE_TABLE, XML_END_X, sBuffer.makeStringAndClear());
+- GetMM100UnitConverter().convertMeasure(sBuffer, nEndY);
++ GetMM100UnitConverter().convertMeasure(sBuffer, aItr->nEndY);
+ AddAttribute(XML_NAMESPACE_TABLE, XML_END_Y, sBuffer.makeStringAndClear());
+ }
+ ExportShape(aItr->xShape, &aPoint);
+diff -ru sc.orig/source/filter/xml/xmlimprt.cxx sc/source/filter/xml/xmlimprt.cxx
+--- sc.orig/source/filter/xml/xmlimprt.cxx 2009-06-04 12:39:13.000000000 +0100
++++ sc/source/filter/xml/xmlimprt.cxx 2009-06-04 15:23:47.000000000 +0100
+@@ -2813,7 +2813,7 @@
+ }
+
+ aTables.UpdateRowHeights();
+- aTables.ResizeShapes();
++ aTables.FixupOLEs();
+ }
+ if (GetModel().is())
+ {
+diff -ru sc.orig/source/filter/xml/xmlsubti.cxx sc/source/filter/xml/xmlsubti.cxx
+--- sc.orig/source/filter/xml/xmlsubti.cxx 2009-06-04 12:39:13.000000000 +0100
++++ sc/source/filter/xml/xmlsubti.cxx 2009-06-04 15:17:25.000000000 +0100
+@@ -153,7 +153,7 @@
+
+ ScMyTables::ScMyTables(ScXMLImport& rTempImport)
+ : rImport(rTempImport),
+- aResizeShapes(rTempImport),
++ aFixupOLEs(rTempImport),
+ nCurrentColStylePos(0),
+ nCurrentDrawPage( -1 ),
+ nCurrentXShapes( -1 ),
+@@ -757,12 +757,10 @@
+ return !((nCurrentSheet != nCurrentXShapes) || !xShapes.is());
+ }
+
+-void ScMyTables::AddShape(uno::Reference & rShape,
+- rtl::OUString* pRangeList,
+- table::CellAddress& rStartAddress, table::CellAddress& rEndAddress,
+- sal_Int32 nEndX, sal_Int32 nEndY)
++void ScMyTables::AddOLE(uno::Reference & rShape,
++ const rtl::OUString &rRangeList)
+ {
+- aResizeShapes.AddShape(rShape, pRangeList, rStartAddress, rEndAddress, nEndX, nEndY);
++ aFixupOLEs.AddOLE(rShape, rRangeList);
+ }
+
+ void ScMyTables::AddMatrixRange(
+diff -ru sc.orig/source/filter/xml/xmlsubti.hxx sc/source/filter/xml/xmlsubti.hxx
+--- sc.orig/source/filter/xml/xmlsubti.hxx 2009-06-04 12:39:13.000000000 +0100
++++ sc/source/filter/xml/xmlsubti.hxx 2009-06-04 15:23:00.000000000 +0100
+@@ -114,7 +114,7 @@
+
+ ScXMLImport& rImport;
+
+- ScMyShapeResizer aResizeShapes;
++ ScMyOLEFixer aFixupOLEs;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XSpreadsheet > xCurrentSheet;
+ ::com::sun::star::uno::Reference< ::com::sun::star::table::XCellRange > xCurrentCellRange;
+@@ -151,7 +151,9 @@
+ void AddColumn(sal_Bool bIsCovered);
+ void NewTable(sal_Int32 nTempSpannedCols);
+ void UpdateRowHeights();
+- void ResizeShapes() { aResizeShapes.ResizeShapes(); }
++ void FixupOLEs() { aFixupOLEs.FixupOLEs(); }
++ sal_Bool IsOLE(com::sun::star::uno::Reference< com::sun::star::drawing::XShape >& rShape) const
++ { return ScMyOLEFixer::IsOLE(rShape); }
+ void DeleteTable();
+ com::sun::star::table::CellAddress GetRealCellPos();
+ void AddColCount(sal_Int32 nTempColCount);
+@@ -170,11 +172,8 @@
+ GetCurrentXShapes();
+ sal_Bool HasDrawPage();
+ sal_Bool HasXShapes();
+- void AddShape(com::sun::star::uno::Reference & rShape,
+- rtl::OUString* pRangeList,
+- com::sun::star::table::CellAddress& rStartAddress,
+- com::sun::star::table::CellAddress& rEndAddress,
+- sal_Int32 nEndX, sal_Int32 nEndY);
++ void AddOLE(com::sun::star::uno::Reference & rShape,
++ const rtl::OUString &rRangeList);
+
+ void AddMatrixRange( sal_Int32 nStartColumn,
+ sal_Int32 nStartRow,
+diff -ru sc.orig/source/filter/xml/XMLTableShapeImportHelper.cxx sc/source/filter/xml/XMLTableShapeImportHelper.cxx
+--- sc.orig/source/filter/xml/XMLTableShapeImportHelper.cxx 2009-06-04 12:39:13.000000000 +0100
++++ sc/source/filter/xml/XMLTableShapeImportHelper.cxx 2009-06-04 15:17:38.000000000 +0100
+@@ -36,6 +36,7 @@
+ #include "drwlayer.hxx"
+ #include "xmlannoi.hxx"
+ #include "rangeutl.hxx"
++#include "userdat.hxx"
+ #include "docuno.hxx"
+ #include "sheetdata.hxx"
+ #include
+@@ -90,6 +91,11 @@
+ {
+ if (!pAnnotationContext)
+ {
++ ScDrawObjData aAnchor;
++ aAnchor.maStart = ScAddress(aStartCell.Column, aStartCell.Row, aStartCell.Sheet);
++ awt::Point aStartPoint(rShape->getPosition());
++ aAnchor.maStartOffset = Point(aStartPoint.X, aStartPoint.Y);
++
+ sal_Int32 nEndX(-1);
+ sal_Int32 nEndY(-1);
+ sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
+@@ -111,11 +117,18 @@
+ {
+ sal_Int32 nOffset(0);
+ ScRangeStringConverter::GetAddressFromString(aEndCell, rValue, static_cast(mrImporter).GetDocument(), ::formula::FormulaGrammar::CONV_OOO, nOffset);
++ aAnchor.maEnd = ScAddress(aEndCell.Column, aEndCell.Row, aEndCell.Sheet);
+ }
+ else if (IsXMLToken(aLocalName, XML_END_X))
++ {
+ static_cast(mrImporter).GetMM100UnitConverter().convertMeasure(nEndX, rValue);
++ aAnchor.maEndOffset.X() = nEndX;
++ }
+ else if (IsXMLToken(aLocalName, XML_END_Y))
++ {
+ static_cast(mrImporter).GetMM100UnitConverter().convertMeasure(nEndY, rValue);
++ aAnchor.maEndOffset.Y() = nEndY;
++ }
+ else if (IsXMLToken(aLocalName, XML_TABLE_BACKGROUND))
+ if (IsXMLToken(rValue, XML_TRUE))
+ nLayerID = SC_LAYER_BACK;
+@@ -128,39 +141,28 @@
+ }
+ SetLayer(rShape, nLayerID, rShape->getShapeType());
+
+- if (!bOnTable)
++ if (SvxShape* pShapeImp = SvxShape::getImplementation(rShape))
+ {
+- rTables.AddShape(rShape,
+- pRangeList, aStartCell, aEndCell, nEndX, nEndY);
+- SvxShape* pShapeImp = SvxShape::getImplementation(rShape);
+- if (pShapeImp)
+- {
+- SdrObject *pSdrObj = pShapeImp->GetSdrObject();
+- if (pSdrObj)
+- ScDrawLayer::SetAnchor(pSdrObj, SCA_CELL);
+- }
++ if (SdrObject *pSdrObj = pShapeImp->GetSdrObject())
++ {
++ if (!bOnTable)
++ ScDrawLayer::SetCellAnchored(*pSdrObj, aAnchor);
++ else
++ ScDrawLayer::SetPageAnchored(*pSdrObj);
++ }
+ }
+- else
+- {
+- if ( pRangeList )
+- {
+- // #i78086# If there are notification ranges, the ChartListener must be created
+- // also when anchored to the sheet
+- // -> call AddShape with invalid cell position (checked in ScMyShapeResizer::ResizeShapes)
+-
+- table::CellAddress aInvalidPos( -1, -1, -1 );
+- rTables.AddShape(rShape,
+- pRangeList, aInvalidPos, aInvalidPos, 0, 0);
+- }
+
+- SvxShape* pShapeImp = SvxShape::getImplementation(rShape);
+- if (pShapeImp)
+- {
+- SdrObject *pSdrObj = pShapeImp->GetSdrObject();
+- if (pSdrObj)
+- ScDrawLayer::SetAnchor(pSdrObj, SCA_PAGE);
+- }
+- }
++ if ( bOnTable && pRangeList )
++ {
++ // #i78086# If there are notification ranges, the ChartListener must be created
++ // also when anchored to the sheet
++ // -> call AddOLE with invalid cell position (checked in ScMyShapeResizer::ResizeShapes)
++
++ if (rTables.IsOLE(rShape))
++ rTables.AddOLE(rShape, *pRangeList);
++ }
++
++ delete pRangeList;
+ }
+ else // shape is annotation
+ {
+diff -ru sc.orig/source/filter/xml/XMLTableShapeResizer.cxx sc/source/filter/xml/XMLTableShapeResizer.cxx
+--- sc.orig/source/filter/xml/XMLTableShapeResizer.cxx 2009-06-04 12:39:13.000000000 +0100
++++ sc/source/filter/xml/XMLTableShapeResizer.cxx 2009-06-04 15:27:39.000000000 +0100
+@@ -51,38 +51,38 @@
+ using ::std::vector;
+ using ::rtl::OUString;
+
+-ScMyShapeResizer::ScMyShapeResizer(ScXMLImport& rTempImport)
++ScMyOLEFixer::ScMyOLEFixer(ScXMLImport& rTempImport)
+ : rImport(rTempImport),
+ aShapes(),
+ pCollection(NULL)
+ {
+ }
+
+-ScMyShapeResizer::~ScMyShapeResizer()
++ScMyOLEFixer::~ScMyOLEFixer()
+ {
+ }
+
+-sal_Bool ScMyShapeResizer::IsOLE(uno::Reference< drawing::XShape >& rShape) const
++sal_Bool ScMyOLEFixer::IsOLE(uno::Reference< drawing::XShape >& rShape)
+ {
+ return rShape->getShapeType().equals(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.OLE2Shape")));
+ }
+
+-void ScMyShapeResizer::CreateChartListener(ScDocument* pDoc,
++void ScMyOLEFixer::CreateChartListener(ScDocument* pDoc,
+ const rtl::OUString& rName,
+- const rtl::OUString* pRangeList)
++ const rtl::OUString& rRangeList)
+ {
+- if (!pDoc || !pRangeList)
+- // These are minimum required.
++ // This is the minimum required.
++ if (!pDoc)
+ return;
+
+- if (!pRangeList->getLength())
++ if (!rRangeList.getLength())
+ {
+ pDoc->AddOLEObjectToCollection(rName);
+ return;
+ }
+
+ OUString aRangeStr;
+- ScRangeStringConverter::GetStringFromXMLRangeString(aRangeStr, *pRangeList, pDoc);
++ ScRangeStringConverter::GetStringFromXMLRangeString(aRangeStr, rRangeList, pDoc);
+ if (!aRangeStr.getLength())
+ {
+ pDoc->AddOLEObjectToCollection(rName);
+@@ -112,271 +112,45 @@
+ }
+ }
+
+-void ScMyShapeResizer::AddShape(uno::Reference & rShape,
+- rtl::OUString* pRangeList,
+- table::CellAddress& rStartAddress, table::CellAddress& rEndAddress,
+- sal_Int32 nEndX, sal_Int32 nEndY)
++void ScMyOLEFixer::AddOLE(uno::Reference & rShape,
++ const rtl::OUString &rRangeList)
+ {
+- ScMyToResizeShape aShape;
++ ScMyToFixupOLE aShape;
+ aShape.xShape.set(rShape);
+- aShape.pRangeList = pRangeList;
+- aShape.aEndCell = rEndAddress;
+- aShape.aStartCell = rStartAddress;
+- aShape.nEndY = nEndY;
+- aShape.nEndX = nEndX;
++ aShape.sRangeList = rRangeList;
+ aShapes.push_back(aShape);
+ }
+
+-void ScMyShapeResizer::GetNewShapeSizePos(ScDocument* pDoc, const Rectangle& rStartRect,
+- const table::CellAddress& rEndCell,
+- awt::Point& rPoint, awt::Size& rSize,
+- sal_Int32& rEndX, sal_Int32& rEndY) const
+-{
+- awt::Point aRefPoint;
+- BOOL bNegativePage(pDoc->IsNegativePage(rEndCell.Sheet));
+- if (bNegativePage)
+- aRefPoint.X = rStartRect.Right();
+- else
+- aRefPoint.X = rStartRect.Left();
+- aRefPoint.Y = rStartRect.Top();
+- Rectangle aRect(pDoc->GetMMRect(
+- static_cast(rEndCell.Column), static_cast(rEndCell.Row),
+- static_cast(rEndCell.Column), static_cast(rEndCell.Row), rEndCell.Sheet ));
+- if (bNegativePage)
+- rEndX = -rEndX + aRect.Right();
+- else
+- rEndX += aRect.Left();
+- rEndY += aRect.Top();
+- rPoint.X += aRefPoint.X;
+- if (bNegativePage)
+- {
+- if (rPoint.X < rStartRect.Left())
+- rPoint.X = rStartRect.Left() + 2; // increment by 2 100th_mm because the cellwidth is internal in twips
+- }
+- else
+- {
+- if (rPoint.X > rStartRect.Right())
+- rPoint.X = rStartRect.Right() - 2; // decrement by 2 100th_mm because the cellwidth is internal in twips
+- }
+- rPoint.Y += aRefPoint.Y;
+- if (rPoint.Y > rStartRect.Bottom())
+- rPoint.Y = rStartRect.Bottom() - 2; // decrement by 2 100th_mm because the cellheight is internal in twips
+- if (bNegativePage)
+- {
+- rSize.Width = -(rEndX - rPoint.X);
+- }
+- else
+- rSize.Width = rEndX - rPoint.X;
+- rSize.Height = rEndY - rPoint.Y;
+-}
+-
+-void ScMyShapeResizer::ResizeShapes()
++void ScMyOLEFixer::FixupOLEs()
+ {
+ if (!aShapes.empty() && rImport.GetModel().is())
+ {
+- rtl::OUString sRowHeight(RTL_CONSTASCII_USTRINGPARAM(SC_UNONAME_CELLHGT));
+ rtl::OUString sPersistName (RTL_CONSTASCII_USTRINGPARAM("PersistName"));
+- rtl::OUString sCaptionPoint( RTL_CONSTASCII_USTRINGPARAM( "CaptionPoint" ));
+- rtl::OUString sConnectorShape( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.ConnectorShape") );
+- rtl::OUString sCaptionShape( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.CaptionShape") );
+- rtl::OUString sStartShape(RTL_CONSTASCII_USTRINGPARAM("StartShape"));
+- rtl::OUString sEndShape(RTL_CONSTASCII_USTRINGPARAM("EndShape"));
+- rtl::OUString sStartPosition(RTL_CONSTASCII_USTRINGPARAM("StartPosition"));
+- rtl::OUString sEndPosition(RTL_CONSTASCII_USTRINGPARAM("EndPosition"));
+- uno::Reference xTableRow;
+- uno::Reference xSheet;
+- uno::Reference xTableRows;
+- sal_Int32 nOldRow(-1);
+- sal_Int32 nOldSheet(-1);
+- ScMyToResizeShapes::iterator aItr(aShapes.begin());
+- ScMyToResizeShapes::iterator aEndItr(aShapes.end());
+- uno::Reference xSpreadDoc( rImport.GetModel(), uno::UNO_QUERY );
+- if ( xSpreadDoc.is() )
++ ScMyToFixupOLEs::iterator aItr(aShapes.begin());
++ ScMyToFixupOLEs::iterator aEndItr(aShapes.end());
++ ScDocument* pDoc(rImport.GetDocument());
++
++ rImport.LockSolarMutex();
++
++ while (aItr != aEndItr)
+ {
+- uno::Reference xIndex( xSpreadDoc->getSheets(), uno::UNO_QUERY );
+- ScDocument* pDoc(rImport.GetDocument());
+- if ( pDoc && xIndex.is() )
++ // #i78086# also call CreateChartListener for invalid position (anchored to sheet)
++ if (!IsOLE(aItr->xShape))
++ DBG_ERROR("Only OLEs should be in here now");
++
++ if (IsOLE(aItr->xShape))
+ {
+- rImport.LockSolarMutex();
+- while (aItr != aEndItr)
+- {
+- // #i78086# invalid cell position is used to call CreateChartListener only
+- if ( aItr->aEndCell.Sheet >= 0 )
+- {
+- if ((nOldSheet != aItr->aEndCell.Sheet) || !xSheet.is())
+- {
+- nOldSheet = aItr->aEndCell.Sheet;
+- xSheet.set(xIndex->getByIndex(nOldSheet), uno::UNO_QUERY);
+- if (xSheet.is())
+- {
+- uno::Reference xColumnRowRange (xSheet, uno::UNO_QUERY);
+- if (xColumnRowRange.is())
+- xTableRows = xColumnRowRange->getRows();
+- }
+- }
+- if (xTableRows.is())
+- {
+- if (nOldRow != aItr->aEndCell.Row || !xTableRow.is())
+- {
+- nOldRow = aItr->aEndCell.Row;
+- xTableRows->getByIndex(nOldRow) >>= xTableRow;
+- }
+- if (xTableRow.is())
+- {
+- uno::Reference xRowProperties(xTableRow, uno::UNO_QUERY);
+- if (xRowProperties.is())
+- {
+- sal_Int32 nHeight;
+- if (xRowProperties->getPropertyValue(sRowHeight) >>= nHeight)
+- {
+- Rectangle aRec = pDoc->GetMMRect(static_cast(aItr->aStartCell.Column), static_cast(aItr->aStartCell.Row),
+- static_cast(aItr->aStartCell.Column), static_cast(aItr->aStartCell.Row), aItr->aStartCell.Sheet);
+- awt::Point aPoint(aItr->xShape->getPosition());
+- awt::Size aSize(aItr->xShape->getSize());
+- if (pDoc->IsNegativePage(static_cast(nOldSheet)))
+- aPoint.X += aSize.Width;
+- if (aItr->nEndY >= 0 && aItr->nEndX >= 0)
+- {
+- if (aItr->xShape->getShapeType().equals(sConnectorShape))
+- {
+- //#103122#; handle connected Connectorshapes
+- uno::Reference xShapeProps (aItr->xShape, uno::UNO_QUERY);
+- if(xShapeProps.is())
+- {
+- uno::Reference xStartShape(xShapeProps->getPropertyValue( sStartShape ), uno::UNO_QUERY);
+- uno::Reference xEndShape(xShapeProps->getPropertyValue( sEndShape ), uno::UNO_QUERY);
+- if (!xStartShape.is() && !xEndShape.is())
+- {
+- awt::Size aOldSize(aSize);
+- GetNewShapeSizePos(pDoc, aRec, aItr->aEndCell, aPoint, aSize, aItr->nEndX, aItr->nEndY);
+- aItr->xShape->setPosition(aPoint);
+- if( (aSize.Width != aOldSize.Width) ||
+- (aSize.Height != aOldSize.Height) )
+- aItr->xShape->setSize(aSize);
+- }
+- else if (xStartShape.is() && xEndShape.is())
+- {
+- // do nothing, because they are connected
+- }
+- else
+- {
+- // only one point is connected, the other should be moved
+-
+- rtl::OUString sProperty;
+- if (xStartShape.is())
+- {
+- awt::Point aEndPoint;
+- xShapeProps->getPropertyValue(sEndPosition) >>= aEndPoint;
+- aPoint.X = aRec.Left() + aEndPoint.X;
+- aPoint.Y = aRec.Top() + aEndPoint.Y;
+- sProperty = sEndPosition;
+- }
+- else
+- {
+- awt::Point aStartPoint;
+- xShapeProps->getPropertyValue(sStartPosition) >>= aStartPoint;
+- aPoint.X = aRec.Left() + aStartPoint.X;
+- aPoint.Y = aRec.Top() + aStartPoint.Y;
+- sProperty = sStartPosition;
+- }
+- xShapeProps->setPropertyValue(sProperty, uno::makeAny(aPoint));
+- }
+- }
+- }
+- else
+- {
+- awt::Size aOldSize(aSize);
+- GetNewShapeSizePos(pDoc, aRec, aItr->aEndCell, aPoint, aSize, aItr->nEndX, aItr->nEndY);
+- if (pDoc->IsNegativePage(static_cast(nOldSheet)))
+- aPoint.X -= aSize.Width;
+- aItr->xShape->setPosition(aPoint);
+- if( (aSize.Width != aOldSize.Width) ||
+- (aSize.Height != aOldSize.Height) )
+- aItr->xShape->setSize(aSize);
+- }
+- }
+- else
+- {
+- if (aItr->xShape->getShapeType().equals(sCaptionShape))
+- {
+- Rectangle aRectangle(aPoint.X, aPoint.Y, aPoint.X + aSize.Width, aPoint.Y + aSize.Height);
+-
+- awt::Point aCaptionPoint;
+- uno::Reference< beans::XPropertySet > xShapeProps(aItr->xShape, uno::UNO_QUERY);
+- if (xShapeProps.is())
+- {
+- try
+- {
+- xShapeProps->getPropertyValue( sCaptionPoint ) >>= aCaptionPoint;
+- }
+- catch ( uno::Exception& )
+- {
+- DBG_ERROR("This Captionshape has no CaptionPoint property.");
+- }
+- }
+- Point aCorePoint(aPoint.X, aPoint.Y);
+- Point aCoreCaptionPoint(aCaptionPoint.X, aCaptionPoint.Y);
+- aCoreCaptionPoint += aCorePoint;
+- aRectangle.Union(Rectangle(aCoreCaptionPoint, aCoreCaptionPoint));
+-
+- Point aBeforeRightBottomPoint(aRectangle.BottomRight());
+-
+- aRectangle += aRec.TopLeft();
+- if (aRectangle.Left() > aRec.Right())
+- aRectangle -= (Point(aRectangle.Left() - aRec.Right() + 2, 0));
+- if (aRectangle.Top() > aRec.Bottom())
+- aRectangle -= (Point(0, aRectangle.Top() - aRec.Bottom() + 2));
+-
+- Point aDifferencePoint(aRectangle.BottomRight() - aBeforeRightBottomPoint);
+- aPoint.X += aDifferencePoint.X();
+- aPoint.Y += aDifferencePoint.Y();
+-
+- aItr->xShape->setPosition(aPoint);
+- }
+- else
+- {
+- // #96159# it is possible, that shapes have a negative position
+- // this is now handled here
+- DBG_ERROR("no or negative end address of this shape");
+- awt::Point aRefPoint;
+- aRefPoint.X = aRec.Left();
+- aRefPoint.Y = aRec.Top();
+- aPoint.X += aRefPoint.X;
+- if (aPoint.X > aRec.Right())
+- aPoint.X = aRec.Right() - 2; // decrement by 2 100th_mm because the cellheight is internal in twips
+- aPoint.Y += aRefPoint.Y;
+- if (aPoint.Y > aRec.Bottom())
+- aPoint.Y = aRec.Bottom() - 2; // decrement by 2 100th_mm because the cellheight is internal in twips
+- aItr->xShape->setPosition(aPoint);
+- }
+- }
+- }
+- }
+- }
+- }
+- else
+- {
+- DBG_ERROR("something wents wrong");
+- }
+- }
+- // #i78086# call CreateChartListener also for invalid position (anchored to sheet)
+- if (IsOLE(aItr->xShape))
+- {
+- uno::Reference < beans::XPropertySet > xShapeProps ( aItr->xShape, uno::UNO_QUERY );
+- uno::Reference < beans::XPropertySetInfo > xShapeInfo(xShapeProps->getPropertySetInfo());
+- rtl::OUString sName;
+- if (xShapeProps.is() && xShapeInfo.is() && xShapeInfo->hasPropertyByName(sPersistName) &&
+- (xShapeProps->getPropertyValue(sPersistName) >>= sName))
+- CreateChartListener(pDoc, sName, aItr->pRangeList);
+- }
+- if (aItr->pRangeList)
+- delete aItr->pRangeList;
+- aItr = aShapes.erase(aItr);
+- }
+- rImport.UnlockSolarMutex();
+-// if (pCollection)
+-// pDoc->SetChartListenerCollection(pCollection);
++ uno::Reference < beans::XPropertySet > xShapeProps ( aItr->xShape, uno::UNO_QUERY );
++ uno::Reference < beans::XPropertySetInfo > xShapeInfo(xShapeProps->getPropertySetInfo());
++ rtl::OUString sName;
++
++ if (pDoc && xShapeProps.is() && xShapeInfo.is() && xShapeInfo->hasPropertyByName(sPersistName) &&
++ (xShapeProps->getPropertyValue(sPersistName) >>= sName))
++ CreateChartListener(pDoc, sName, aItr->sRangeList);
+ }
++ aItr = aShapes.erase(aItr);
+ }
++
++ rImport.UnlockSolarMutex();
+ }
+ }
+diff -ru sc.orig/source/filter/xml/XMLTableShapeResizer.hxx sc/source/filter/xml/XMLTableShapeResizer.hxx
+--- sc.orig/source/filter/xml/XMLTableShapeResizer.hxx 2009-06-04 12:39:13.000000000 +0100
++++ sc/source/filter/xml/XMLTableShapeResizer.hxx 2009-06-04 15:22:38.000000000 +0100
+@@ -41,44 +41,31 @@
+ class ScDocument;
+ class Rectangle;
+
+-struct ScMyToResizeShape
++struct ScMyToFixupOLE
+ {
+ com::sun::star::uno::Reference xShape;
+- rtl::OUString* pRangeList;
+- com::sun::star::table::CellAddress aEndCell;
+- com::sun::star::table::CellAddress aStartCell;
+- sal_Int32 nEndX;
+- sal_Int32 nEndY;
+-
+- ScMyToResizeShape() : pRangeList(NULL) {}
++ rtl::OUString sRangeList;
+ };
+
+-typedef std::list ScMyToResizeShapes;
++typedef std::list ScMyToFixupOLEs;
+
+-class ScMyShapeResizer
++class ScMyOLEFixer
+ {
+ ScXMLImport& rImport;
+- ScMyToResizeShapes aShapes;
++ ScMyToFixupOLEs aShapes;
+ ScChartListenerCollection* pCollection;
+
+- sal_Bool IsOLE(com::sun::star::uno::Reference< com::sun::star::drawing::XShape >& rShape) const;
+ void CreateChartListener(ScDocument* pDoc,
+ const rtl::OUString& rName,
+- const rtl::OUString* pRangeList);
+- void GetNewShapeSizePos(ScDocument* pDoc, const Rectangle& rStartRect,
+- const com::sun::star::table::CellAddress& rEndCell,
+- com::sun::star::awt::Point& rPoint, com::sun::star::awt::Size& rSize,
+- sal_Int32& rEndX, sal_Int32& rEndY) const;
++ const rtl::OUString& rRangeList);
+ public:
+- ScMyShapeResizer(ScXMLImport& rImport);
+- ~ScMyShapeResizer();
++ ScMyOLEFixer(ScXMLImport& rImport);
++ ~ScMyOLEFixer();
+
+- void AddShape(com::sun::star::uno::Reference & rShape,
+- rtl::OUString* pRangeList,
+- com::sun::star::table::CellAddress& rStartAddress,
+- com::sun::star::table::CellAddress& rEndAddress,
+- sal_Int32 nEndX, sal_Int32 nEndY);
+- void ResizeShapes();
++ static sal_Bool IsOLE(com::sun::star::uno::Reference< com::sun::star::drawing::XShape >& rShape);
++ void AddOLE(com::sun::star::uno::Reference & rShape,
++ const rtl::OUString &rRangeList);
++ void FixupOLEs();
+ };
+
+ #endif
+diff -ru sc.orig/source/ui/Accessibility/AccessibleDocument.cxx sc/source/ui/Accessibility/AccessibleDocument.cxx
+--- sc.orig/source/ui/Accessibility/AccessibleDocument.cxx 2009-06-04 12:39:41.000000000 +0100
++++ sc/source/ui/Accessibility/AccessibleDocument.cxx 2009-06-04 12:40:23.000000000 +0100
+@@ -44,6 +44,7 @@
+ #include "drawview.hxx"
+ #include "gridwin.hxx"
+ #include "AccessibleEditObject.hxx"
++#include "userdat.hxx"
+ #include "scresid.hxx"
+ #ifndef SC_SC_HRC
+ #include "sc.hrc"
+@@ -1017,35 +1018,10 @@
+ uno::Reference xShapeProp(xShape, uno::UNO_QUERY);
+ if (pShapeImp && xShapeProp.is())
+ {
+- SdrObject *pSdrObj = pShapeImp->GetSdrObject();
+- if (pSdrObj)
++ if (SdrObject *pSdrObj = pShapeImp->GetSdrObject())
+ {
+- if (ScDrawLayer::GetAnchor(pSdrObj) == SCA_CELL)
+- {
+- ScDocument* pDoc = mpViewShell->GetViewData()->GetDocument();
+- if (pDoc)
+- {
+- rtl::OUString sCaptionShape(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.CaptionShape"));
+- awt::Point aPoint(xShape->getPosition());
+- awt::Size aSize(xShape->getSize());
+- rtl::OUString sType(xShape->getShapeType());
+- Rectangle aRectangle(aPoint.X, aPoint.Y, aPoint.X + aSize.Width, aPoint.Y + aSize.Height);
+- if ( sType.equals(sCaptionShape) )
+- {
+- awt::Point aRelativeCaptionPoint;
+- rtl::OUString sCaptionPoint( RTL_CONSTASCII_USTRINGPARAM( "CaptionPoint" ));
+- xShapeProp->getPropertyValue( sCaptionPoint ) >>= aRelativeCaptionPoint;
+- Point aCoreRelativeCaptionPoint(aRelativeCaptionPoint.X, aRelativeCaptionPoint.Y);
+- Point aCoreAbsoluteCaptionPoint(aPoint.X, aPoint.Y);
+- aCoreAbsoluteCaptionPoint += aCoreRelativeCaptionPoint;
+- aRectangle.Union(Rectangle(aCoreAbsoluteCaptionPoint, aCoreAbsoluteCaptionPoint));
+- }
+- ScRange aRange = pDoc->GetRange(mpAccessibleDocument->getVisibleTable(), aRectangle);
+- pAddress = new ScAddress(aRange.aStart);
+- }
+- }
+-// else
+-// do nothing, because it is always a NULL Pointer
++ if (ScDrawObjData *pAnchor = ScDrawLayer::GetObjData(pSdrObj))
++ return new ScAddress(pAnchor->maStart);
+ }
+ }
+ }
+diff -ru sc.orig/source/ui/drawfunc/drawsh2.cxx sc/source/ui/drawfunc/drawsh2.cxx
+--- sc.orig/source/ui/drawfunc/drawsh2.cxx 2009-06-04 12:39:40.000000000 +0100
++++ sc/source/ui/drawfunc/drawsh2.cxx 2009-06-04 12:40:23.000000000 +0100
+@@ -115,7 +115,7 @@
+
+ if ( !bDisableAnchor )
+ {
+- switch( pView->GetAnchor() )
++ switch( pView->GetAnchorType() )
+ {
+ case SCA_PAGE:
+ rSet.Put( SfxBoolItem( SID_ANCHOR_PAGE, TRUE ) );
+diff -ru sc.orig/source/ui/drawfunc/drawsh5.cxx sc/source/ui/drawfunc/drawsh5.cxx
+--- sc.orig/source/ui/drawfunc/drawsh5.cxx 2009-06-04 12:39:40.000000000 +0100
++++ sc/source/ui/drawfunc/drawsh5.cxx 2009-06-04 12:40:23.000000000 +0100
+@@ -397,26 +397,26 @@
+ break;
+
+ case SID_ANCHOR_PAGE:
+- pView->SetAnchor( SCA_PAGE );
++ pView->SetPageAnchored();
+ rBindings.Invalidate( SID_ANCHOR_PAGE );
+ rBindings.Invalidate( SID_ANCHOR_CELL );
+ break;
+
+ case SID_ANCHOR_CELL:
+- pView->SetAnchor( SCA_CELL );
++ pView->SetCellAnchored();
+ rBindings.Invalidate( SID_ANCHOR_PAGE );
+ rBindings.Invalidate( SID_ANCHOR_CELL );
+ break;
+
+ case SID_ANCHOR_TOGGLE:
+ {
+- switch( pView->GetAnchor() )
++ switch( pView->GetAnchorType() )
+ {
+ case SCA_CELL:
+- pView->SetAnchor( SCA_PAGE );
++ pView->SetPageAnchored();
+ break;
+ default:
+- pView->SetAnchor( SCA_CELL );
++ pView->SetCellAnchored();
+ break;
+ }
+ }
+diff -ru sc.orig/source/ui/inc/drawview.hxx sc/source/ui/inc/drawview.hxx
+--- sc.orig/source/ui/inc/drawview.hxx 2009-06-04 12:39:46.000000000 +0100
++++ sc/source/ui/inc/drawview.hxx 2009-06-04 12:40:23.000000000 +0100
+@@ -100,8 +100,9 @@
+
+ void CalcNormScale( Fraction& rFractX, Fraction& rFractY ) const;
+
+- void SetAnchor( ScAnchorType );
+- ScAnchorType GetAnchor() const;
++ void SetPageAnchored();
++ void SetCellAnchored();
++ ScAnchorType GetAnchorType() const;
+
+ void VCAddWin( Window* pWin );
+ void VCRemoveWin( Window* pWin );
+diff -ru sc.orig/source/ui/unoobj/shapeuno.cxx sc/source/ui/unoobj/shapeuno.cxx
+--- sc.orig/source/ui/unoobj/shapeuno.cxx 2009-06-04 12:39:29.000000000 +0100
++++ sc/source/ui/unoobj/shapeuno.cxx 2009-06-04 12:40:23.000000000 +0100
+@@ -365,20 +365,9 @@
+ table::CellRangeAddress aAddress = xRangeAdd->getRangeAddress();
+ if (nTab == aAddress.Sheet)
+ {
+- if (aAddress.StartRow != aAddress.EndRow) //should be a Spreadsheet
+- {
+- DBG_ASSERT(aAddress.StartRow == 0 && aAddress.EndRow == MAXROW &&
+- aAddress.StartColumn == 0 && aAddress.EndColumn == MAXCOL, "here should be a XSpreadsheet");
+- ScDrawLayer::SetAnchor(pObj, SCA_PAGE);
+- }
+- else
+- {
+- DBG_ASSERT(aAddress.StartRow == aAddress.EndRow &&
+- aAddress.StartColumn == aAddress.EndColumn, "here should be a XCell");
+- ScDrawLayer::SetAnchor(pObj, SCA_CELL);
+- }
+ Rectangle aRect(pDoc->GetMMRect( static_cast(aAddress.StartColumn), static_cast(aAddress.StartRow),
+ static_cast(aAddress.EndColumn), static_cast(aAddress.EndRow), aAddress.Sheet ));
++ awt::Point aRelPoint;
+ uno::Reference xShape( mxShapeAgg, uno::UNO_QUERY );
+ if (xShape.is())
+ {
+@@ -397,7 +386,8 @@
+ awt::Size aUnoSize;
+ awt::Point aCaptionPoint;
+ ScRange aRange;
+- awt::Point aUnoPoint(lcl_GetRelativePos( xShape, pDoc, nTab, aRange, aUnoSize, aCaptionPoint ));
++ aRelPoint = lcl_GetRelativePos( xShape, pDoc, nTab, aRange, aUnoSize, aCaptionPoint );
++ awt::Point aUnoPoint(aRelPoint);
+
+ aUnoPoint.X += aPoint.X();
+ aUnoPoint.Y += aPoint.Y();
+@@ -426,6 +416,24 @@
+ xShape->setPosition(aUnoPoint);
+ pDocSh->SetModified();
+ }
++
++ if (aAddress.StartRow != aAddress.EndRow) //should be a Spreadsheet
++ {
++ DBG_ASSERT(aAddress.StartRow == 0 && aAddress.EndRow == MAXROW &&
++ aAddress.StartColumn == 0 && aAddress.EndColumn == MAXCOL, "here should be a XSpreadsheet");
++ ScDrawLayer::SetPageAnchored(*pObj);
++ }
++ else
++ {
++ DBG_ASSERT(aAddress.StartRow == aAddress.EndRow &&
++ aAddress.StartColumn == aAddress.EndColumn, "here should be a XCell");
++ ScDrawObjData aAnchor;
++ aAnchor.maStart = ScAddress(aAddress.StartColumn, aAddress.StartRow, aAddress.Sheet);
++ aAnchor.maStartOffset = Point(aRelPoint.X, aRelPoint.Y);
++ ScDrawLayer::SetCellAnchored(*pObj, aAnchor);
++ //Currently we've only got a start anchor, not an end-anchor, so generate that now
++ ScDrawLayer::UpdateCellAnchorFromPositionEnd(*pObj, *pDoc, aAddress.Sheet);
++ }
+ }
+ }
+ }
+@@ -485,7 +493,7 @@
+ uno::Reference xShape( mxShapeAgg, uno::UNO_QUERY );
+ if (xShape.is())
+ {
+- if (ScDrawLayer::GetAnchor(pObj) == SCA_PAGE)
++ if (ScDrawLayer::GetAnchorType(*pObj) == SCA_PAGE)
+ {
+ awt::Point aPoint(xShape->getPosition());
+ awt::Size aSize(xShape->getSize());
+@@ -512,7 +520,7 @@
+ xShape->setPosition(aPoint);
+ pDocSh->SetModified();
+ }
+- else if (ScDrawLayer::GetAnchor(pObj) == SCA_CELL)
++ else if (ScDrawLayer::GetAnchorType(*pObj) == SCA_CELL)
+ {
+ awt::Size aUnoSize;
+ awt::Point aCaptionPoint;
+@@ -583,7 +591,7 @@
+ uno::Reference xShape( mxShapeAgg, uno::UNO_QUERY );
+ if (xShape.is())
+ {
+- if (ScDrawLayer::GetAnchor(pObj) == SCA_PAGE)
++ if (ScDrawLayer::GetAnchorType(*pObj) == SCA_PAGE)
+ {
+ awt::Point aPoint = xShape->getPosition();
+ awt::Point aCaptionPoint;
+@@ -596,7 +604,7 @@
+ xShape->setPosition(aPoint);
+ pDocSh->SetModified();
+ }
+- else if (ScDrawLayer::GetAnchor(pObj) == SCA_CELL)
++ else if (ScDrawLayer::GetAnchorType(*pObj) == SCA_CELL)
+ {
+ awt::Size aUnoSize;
+ awt::Point aCaptionPoint;
+@@ -663,23 +671,10 @@
+ {
+ ScDocShell* pDocSh = (ScDocShell*)pObjSh;
+ uno::Reference< uno::XInterface > xAnchor;
+- if (ScDrawLayer::GetAnchor(pObj) == SCA_CELL)
+- {
+- uno::Reference xShape( mxShapeAgg, uno::UNO_QUERY );
+- if (xShape.is())
+- {
+- awt::Size aUnoSize;
+- awt::Point aCaptionPoint;
+- ScRange aRange;
+- awt::Point aUnoPoint(lcl_GetRelativePos( xShape, pDoc, nTab, aRange, aUnoSize, aCaptionPoint ));
+-
+- xAnchor.set(static_cast(new ScCellObj( pDocSh, aRange.aStart )));
+- }
+- }
++ if (ScDrawObjData *pAnchor = ScDrawLayer::GetObjDataTab(pObj, nTab))
++ xAnchor.set(static_cast(new ScCellObj( pDocSh, pAnchor->maStart)));
+ else
+- {
+ xAnchor.set(static_cast(new ScTableSheetObj( pDocSh, nTab )));
+- }
+ aAny <<= xAnchor;
+ }
+ }
+@@ -722,7 +717,7 @@
+ uno::Reference xShape( mxShapeAgg, uno::UNO_QUERY );
+ if (xShape.is())
+ {
+- if (ScDrawLayer::GetAnchor(pObj) == SCA_CELL)
++ if (ScDrawLayer::GetAnchorType(*pObj) == SCA_CELL)
+ {
+ awt::Size aUnoSize;
+ awt::Point aCaptionPoint;
+@@ -782,7 +777,7 @@
+ if (xShape.is())
+ {
+ uno::Reference< uno::XInterface > xAnchor;
+- if (ScDrawLayer::GetAnchor(pObj) == SCA_CELL)
++ if (ScDrawLayer::GetAnchorType(*pObj) == SCA_CELL)
+ {
+ awt::Size aUnoSize;
+ awt::Point aCaptionPoint;
+diff -ru sc.orig/source/ui/view/drawvie3.cxx sc/source/ui/view/drawvie3.cxx
+--- sc.orig/source/ui/view/drawvie3.cxx 2009-06-04 12:39:42.000000000 +0100
++++ sc/source/ui/view/drawvie3.cxx 2009-06-05 08:47:05.000000000 +0100
+@@ -77,7 +77,7 @@
+
+ // Verankerung setzen
+
+-void ScDrawView::SetAnchor( ScAnchorType eType )
++void ScDrawView::SetPageAnchored()
+ {
+ SdrObject* pObj = NULL;
+ if( AreObjectsMarked() )
+@@ -87,7 +87,7 @@
+ for( ULONG i=0; iGetMark(i)->GetMarkedSdrObj();
+- ScDrawLayer::SetAnchor( pObj, eType );
++ ScDrawLayer::SetPageAnchored( *pObj );
+ }
+
+ if ( pViewData )
+@@ -95,7 +95,28 @@
+ }
+ }
+
+-ScAnchorType ScDrawView::GetAnchor() const
++void ScDrawView::SetCellAnchored()
++{
++ if (!pDoc)
++ return;
++
++ SdrObject* pObj = NULL;
++ if( AreObjectsMarked() )
++ {
++ const SdrMarkList* pMark = &GetMarkedObjectList();
++ ULONG nCount = pMark->GetMarkCount();
++ for( ULONG i=0; iGetMark(i)->GetMarkedSdrObj();
++ ScDrawLayer::SetCellAnchoredFromPosition(*pObj, *pDoc, nTab);
++ }
++
++ if ( pViewData )
++ pViewData->GetDocShell()->SetDrawModified();
++ }
++}
++
++ScAnchorType ScDrawView::GetAnchorType() const
+ {
+ BOOL bPage = FALSE;
+ BOOL bCell = FALSE;
+@@ -108,7 +129,7 @@
+ for( ULONG i=0; iGetMark(i)->GetMarkedSdrObj();
+- if( ScDrawLayer::GetAnchor( pObj ) == SCA_CELL )
++ if( ScDrawLayer::GetAnchorType( *pObj ) == SCA_CELL )
+ bCell =TRUE;
+ else
+ bPage = TRUE;
+@@ -138,6 +159,20 @@
+ if ( nTab == ((ScTabSizeChangedHint&)rHint).GetTab() )
+ UpdateWorkArea();
+ }
++ else if ( rHint.ISA( SdrHint ) )
++ {
++ if (const SdrHint* pSdrHint = PTR_CAST( SdrHint, &rHint ))
++ {
++ //Update the anchors of any non note object that is cell anchored which has
++ //been moved since the last anchors for its position was calculated
++ if (pSdrHint->GetKind() == HINT_OBJCHG || pSdrHint->GetKind() == HINT_OBJINSERTED)
++ if (SdrObject* pObj = const_cast(pSdrHint->GetObject()))
++ if (ScDrawObjData *pAnchor = ScDrawLayer::GetObjData(pObj))
++ if (!pAnchor->mbNote && pAnchor->maLastRect != pObj->GetLogicRect())
++ ScDrawLayer::SetCellAnchoredFromPosition(*pObj, *pDoc, nTab);
++ }
++ FmFormView::Notify( rBC,rHint );
++ }
+ else
+ FmFormView::Notify( rBC,rHint );
+ }
+diff -ru sc.orig/source/ui/view/drawview.cxx sc/source/ui/view/drawview.cxx
+--- sc.orig/source/ui/view/drawview.cxx 2009-06-04 12:39:41.000000000 +0100
++++ sc/source/ui/view/drawview.cxx 2009-06-04 12:40:23.000000000 +0100
+@@ -155,46 +155,15 @@
+
+ void ScDrawView::AddCustomHdl()
+ {
+- BOOL bNegativePage = pDoc->IsNegativePage( nTab );
+-
+ const SdrMarkList &rMrkList = GetMarkedObjectList();
+ UINT32 nCount = rMrkList.GetMarkCount();
+ for(UINT32 nPos=0; nPosGetMarkedSdrObj();
+- if(ScDrawLayer::GetAnchor(pObj) == SCA_CELL)
++ SdrObject* pObj = rMrkList.GetMark(nPos)->GetMarkedSdrObj();
++ if (ScDrawObjData *pAnchor = ScDrawLayer::GetObjDataTab(pObj, nTab))
+ {
+- const INT32 nDelta = 1;
+-
+- Rectangle aBoundRect = pObj->GetCurrentBoundRect();
+- Point aPos;
+- if (bNegativePage)
+- {
+- aPos = aBoundRect.TopRight();
+- aPos.X() = -aPos.X(); // so the loop below is the same
+- }
+- else
+- aPos = aBoundRect.TopLeft();
+- long nPosX = (long) (aPos.X() / HMM_PER_TWIPS) + nDelta;
+- long nPosY = (long) (aPos.Y() / HMM_PER_TWIPS) + nDelta;
+-
+- SCCOL nCol;
+- INT32 nWidth = 0;
+-
+- for(nCol=0; nCol<=MAXCOL && nWidth<=nPosX; nCol++)
+- nWidth += pDoc->GetColWidth(nCol,nTab);
+-
+- if(nCol > 0)
+- --nCol;
+-
+- SCROW nRow = nPosY <= 0 ? 0 : pDoc->GetRowForHeight( nTab,
+- (ULONG) nPosY);
+- if(nRow > 0)
+- --nRow;
+-
+- ScTabView* pView = pViewData->GetView();
+- ScAddress aScAddress(nCol, nRow, nTab);
+- pView->CreateAnchorHandles(aHdl, aScAddress);
++ if (ScTabView* pView = pViewData->GetView())
++ pView->CreateAnchorHandles(aHdl, pAnchor->maStart);
+ }
+ }
+ }
diff --git a/openoffice.org-3.1.0.ooo61927.sw.ww6.unicodefontencoding.patch b/openoffice.org-3.1.0.ooo61927.sw.ww6.unicodefontencoding.patch
new file mode 100644
index 0000000..5979187
--- /dev/null
+++ b/openoffice.org-3.1.0.ooo61927.sw.ww6.unicodefontencoding.patch
@@ -0,0 +1,23 @@
+Index: source/filter/ww8/wrtw8sty.cxx
+===================================================================
+RCS file: /cvs/sw/sw/source/filter/ww8/wrtw8sty.cxx,v
+retrieving revision 1.49.44.2
+diff -u -r1.49.44.2 wrtw8sty.cxx
+--- openoffice.org.orig/sw/source/filter/ww8/wrtw8sty.cxx 12 Dec 2008 11:11:33 -0000 1.49.44.2
++++ openoffice.org/sw/source/filter/ww8/wrtw8sty.cxx 9 Apr 2009 12:02:50 -0000
+@@ -621,7 +621,14 @@
+
+ ShortToSVBT16( 400, &maWW8_FFN[2] ); // weiss ich nicht besser
+ // 400 == FW_NORMAL (windows.h)
+- maWW8_FFN[4] = sw::ms::rtl_TextEncodingToWinCharset(eChrSet);
++ //
++ //#i61927# For unicode fonts like Arial Unicode, Word 97+ sets the chs
++ //to SHIFTJIS presumably to capture that it's a multi-byte encoding font
++ //but Word95 doesn't do this, and sets it to 0 (ANSI), so we should do the
++ //same
++ maWW8_FFN[4] = bWrtWW8 ?
++ sw::ms::rtl_TextEncodingToWinCharset(eChrSet) :
++ rtl_getBestWindowsCharsetFromTextEncoding(eChrSet);
+
+ if (mbAlt)
+ maWW8_FFN[5] = static_cast< BYTE >(msFamilyNm.Len() + 1);
diff --git a/openoffice.org-3.1.0.oooXXXXX.solenv.allowmissing.patch b/openoffice.org-3.1.0.oooXXXXX.solenv.allowmissing.patch
new file mode 100644
index 0000000..1676e40
--- /dev/null
+++ b/openoffice.org-3.1.0.oooXXXXX.solenv.allowmissing.patch
@@ -0,0 +1,64 @@
+Index: bin/modules/installer/scriptitems.pm
+===================================================================
+RCS file: /cvs/tools/solenv/bin/modules/installer/scriptitems.pm,v
+retrieving revision 1.17
+diff -u -p -r1.17 scriptitems.pm
+--- openoffice.org.orig/solenv/bin/modules/installer/scriptitems.pm 24 Feb 2005 16:21:15 -0000 1.17
++++ openoffice.org/solenv/bin/modules/installer/scriptitems.pm 18 Mar 2005 22:39:42 -0000
+@@ -1077,7 +1077,7 @@
+ }
+ else
+ {
+- $infoline = "ERROR: Source for $$searchfilenameref not found!\n"; # Important message in log file
++ $infoline = "WARNING: Source for $$searchfilenameref not found!\n"; # Important message in log file
+ }
+
+ push( @installer::globals::logfileinfo, $infoline);
+@@ -1155,7 +1155,7 @@
+ }
+ else
+ {
+- $infoline = "ERROR: Source for $$searchfilenameref not found!\n"; # Important message in log file
++ $infoline = "WARNING: Source for $$searchfilenameref not found!\n"; # Important message in log file
+ }
+
+ push( @installer::globals::logfileinfo, $infoline);
+@@ -1371,11 +1371,10 @@
+
+ if ( ! $installer::globals::languagepack )
+ {
+- $infoline = "ERROR: Removing file $filename from file list.\n";
++ $infoline = "WARNING: Removing file $filename from file list.\n";
+ push( @installer::globals::logfileinfo, $infoline);
+
+- push(@missingfiles, "ERROR: File not found: $filename\n");
+- $error_occured = 1;
++ push(@missingfiles, "WARNING: File not found: $filename\n");
+
+ next; # removing this file from list, if sourcepath is empty
+ }
+@@ -1383,11 +1382,10 @@
+ {
+ if (( $onefile->{'ismultilingual'} ) || ( $styles =~ /\bFORCELANGUAGEPACK\b/ ))
+ {
+- $infoline = "ERROR: Removing file $filename from file list.\n";
++ $infoline = "WARNING: Removing file $filename from file list.\n";
+ push( @installer::globals::logfileinfo, $infoline);
+
+- push(@missingfiles, "ERROR: File not found: $filename\n");
+- $error_occured = 1;
++ push(@missingfiles, "WARNING: File not found: $filename\n");
+
+ next; # removing this file from list, if sourcepath is empty
+ }
+--- openoffice.org.orig/solenv/bin/modules/installer/simplepackage.pm 2010-07-12 10:27:26.000000000 +0100
++++ openoffice.org/solenv/bin/modules/installer/simplepackage.pm 2010-07-12 10:27:54.000000000 +0100
+@@ -53,7 +53,7 @@
+ ( $installer::globals::packageformat eq "archive" ))
+ {
+ $installer::globals::is_simple_packager_project = 1;
+- $installer::globals::patch_user_dir = 1;
++ $installer::globals::patch_user_dir = 0;
+ }
+ elsif( $installer::globals::packageformat eq "dmg" )
+ {
diff --git a/openoffice.org-3.1.1.ooo105784.vcl.sniffscriptforsubs.patch b/openoffice.org-3.1.1.ooo105784.vcl.sniffscriptforsubs.patch
new file mode 100644
index 0000000..4555983
--- /dev/null
+++ b/openoffice.org-3.1.1.ooo105784.vcl.sniffscriptforsubs.patch
@@ -0,0 +1,189 @@
+diff -ru vcl.orig/unx/source/fontmanager/fontconfig.cxx vcl/unx/source/fontmanager/fontconfig.cxx
+--- vcl.orig/unx/source/fontmanager/fontconfig.cxx 2009-10-08 13:25:00.000000000 +0100
++++ vcl/unx/source/fontmanager/fontconfig.cxx 2009-10-08 13:51:51.000000000 +0100
+@@ -80,6 +80,9 @@
+
+ #include "sal/alloca.h"
+
++#include //unicode::getUnicodeScriptType
++#include //ScriptType
++
+ #include
+ #include
+
+@@ -907,6 +910,138 @@
+ }
+ }
+
++static const char* pick_sample_language(const sal_uInt32 cCode)
++{
++ using namespace ::com::sun::star::i18n;
++
++ static ScriptTypeList aScripts[] =
++ {
++ { UnicodeScript_kBasicLatin, UnicodeScript_kBasicLatin, UnicodeScript_kBasicLatin },
++ { UnicodeScript_kLatin1Supplement, UnicodeScript_kLatin1Supplement, UnicodeScript_kLatin1Supplement },
++ { UnicodeScript_kLatinExtendedA, UnicodeScript_kLatinExtendedA, UnicodeScript_kLatinExtendedA },
++ { UnicodeScript_kLatinExtendedB, UnicodeScript_kLatinExtendedB, UnicodeScript_kLatinExtendedB },
++ { UnicodeScript_kGreek, UnicodeScript_kGreek, UnicodeScript_kGreek },
++ { UnicodeScript_kCyrillic, UnicodeScript_kCyrillic, UnicodeScript_kCyrillic },
++ { UnicodeScript_kArmenian, UnicodeScript_kArmenian, UnicodeScript_kArmenian },
++ { UnicodeScript_kHebrew, UnicodeScript_kHebrew, UnicodeScript_kHebrew },
++ { UnicodeScript_kArabic, UnicodeScript_kArabic, UnicodeScript_kArabic },
++ { UnicodeScript_kSyriac, UnicodeScript_kSyriac, UnicodeScript_kSyriac },
++ { UnicodeScript_kThaana, UnicodeScript_kThaana, UnicodeScript_kThaana },
++ { UnicodeScript_kDevanagari, UnicodeScript_kDevanagari, UnicodeScript_kDevanagari },
++ { UnicodeScript_kBengali, UnicodeScript_kBengali, UnicodeScript_kBengali },
++ { UnicodeScript_kGurmukhi, UnicodeScript_kGurmukhi, UnicodeScript_kGurmukhi },
++ { UnicodeScript_kGujarati, UnicodeScript_kGujarati, UnicodeScript_kGujarati },
++ { UnicodeScript_kOriya, UnicodeScript_kOriya, UnicodeScript_kOriya },
++ { UnicodeScript_kTamil, UnicodeScript_kTamil, UnicodeScript_kTamil },
++ { UnicodeScript_kTelugu, UnicodeScript_kTelugu, UnicodeScript_kTelugu },
++ { UnicodeScript_kKannada, UnicodeScript_kKannada, UnicodeScript_kKannada },
++ { UnicodeScript_kMalayalam, UnicodeScript_kMalayalam, UnicodeScript_kMalayalam },
++ { UnicodeScript_kSinhala, UnicodeScript_kSinhala, UnicodeScript_kSinhala },
++ { UnicodeScript_kThai, UnicodeScript_kThai, UnicodeScript_kThai },
++ { UnicodeScript_kLao, UnicodeScript_kLao, UnicodeScript_kLao },
++ { UnicodeScript_kTibetan, UnicodeScript_kTibetan, UnicodeScript_kTibetan },
++ { UnicodeScript_kMyanmar, UnicodeScript_kMyanmar, UnicodeScript_kMyanmar },
++ { UnicodeScript_kGeorgian, UnicodeScript_kGeorgian, UnicodeScript_kGeorgian },
++ { UnicodeScript_kHangulJamo, UnicodeScript_kHangulJamo, UnicodeScript_kHangulJamo },
++ { UnicodeScript_kEthiopic, UnicodeScript_kEthiopic, UnicodeScript_kEthiopic },
++ { UnicodeScript_kCherokee, UnicodeScript_kCherokee, UnicodeScript_kCherokee },
++ { UnicodeScript_kUnifiedCanadianAboriginalSyllabics,
++ UnicodeScript_kUnifiedCanadianAboriginalSyllabics,
++ UnicodeScript_kUnifiedCanadianAboriginalSyllabics },
++ { UnicodeScript_kKhmer, UnicodeScript_kKhmer, UnicodeScript_kKhmer },
++ { UnicodeScript_kMongolian, UnicodeScript_kMongolian, UnicodeScript_kMongolian },
++ { UnicodeScript_kLatinExtendedAdditional, UnicodeScript_kLatinExtendedAdditional,
++ UnicodeScript_kLatinExtendedAdditional },
++ { UnicodeScript_kGreekExtended, UnicodeScript_kGreekExtended, UnicodeScript_kGreekExtended },
++ { UnicodeScript_kHiragana, UnicodeScript_kHiragana, UnicodeScript_kHiragana },
++ { UnicodeScript_kKatakana, UnicodeScript_kKatakana, UnicodeScript_kKatakana },
++ { UnicodeScript_kHangulCompatibilityJamo, UnicodeScript_kHangulCompatibilityJamo,
++ UnicodeScript_kHangulCompatibilityJamo },
++ { UnicodeScript_kHangulSyllable, UnicodeScript_kHangulSyllable,
++ UnicodeScript_kHangulSyllable },
++ { UnicodeScript_kArabicPresentationB, UnicodeScript_kArabicPresentationB,
++ UnicodeScript_kArabicPresentationB },
++ { UnicodeScript_kScriptCount, UnicodeScript_kScriptCount, UnicodeScript_kScriptCount }
++ };
++
++ switch (unicode::getUnicodeScriptType(cCode, aScripts, UnicodeScript_kScriptCount))
++ {
++ case UnicodeScript_kBasicLatin:
++ case UnicodeScript_kLatin1Supplement:
++ case UnicodeScript_kLatinExtendedA:
++ case UnicodeScript_kLatinExtendedB:
++ case UnicodeScript_kLatinExtendedAdditional:
++ return "en";
++ case UnicodeScript_kGreek:
++ case UnicodeScript_kGreekExtended:
++ return "el";
++ case UnicodeScript_kCyrillic:
++ return "ru";
++ case UnicodeScript_kArmenian:
++ return "hy";
++ case UnicodeScript_kHebrew:
++ return "he";
++ case UnicodeScript_kArabic:
++ case UnicodeScript_kArabicPresentationB:
++ return "ar";
++ case UnicodeScript_kSyriac:
++ return "syr";
++ case UnicodeScript_kThaana:
++ return "dv";
++ case UnicodeScript_kDevanagari:
++ return "hi";
++ case UnicodeScript_kBengali:
++ return "bn";
++ case UnicodeScript_kGurmukhi:
++ return "pa";
++ case UnicodeScript_kGujarati:
++ return "gu";
++ case UnicodeScript_kOriya:
++ return "or";
++ case UnicodeScript_kTamil:
++ return "ta";
++ case UnicodeScript_kTelugu:
++ return "te";
++ case UnicodeScript_kKannada:
++ return "ka";
++ case UnicodeScript_kMalayalam:
++ return "ml";
++ case UnicodeScript_kSinhala:
++ return "si";
++ case UnicodeScript_kThai:
++ return "th";
++ case UnicodeScript_kLao:
++ return "lo";
++ case UnicodeScript_kTibetan:
++ return "bo";
++ case UnicodeScript_kMyanmar:
++ return "my";
++ case UnicodeScript_kGeorgian:
++ return "ka";
++ case UnicodeScript_kHangulJamo:
++ case UnicodeScript_kHangulCompatibilityJamo:
++ case UnicodeScript_kHangulSyllable:
++ return "ko";
++ case UnicodeScript_kEthiopic:
++ return "am";
++ case UnicodeScript_kCherokee:
++ return "chr";
++ case UnicodeScript_kUnifiedCanadianAboriginalSyllabics:
++ return "ui";
++ case UnicodeScript_kKhmer:
++ return "km";
++ case UnicodeScript_kMongolian:
++ return "mn";
++ case UnicodeScript_kHiragana:
++ case UnicodeScript_kKatakana:
++ return "ja";
++ default:
++ break;
++ }
++
++ return NULL;
++}
++
+ rtl::OUString PrintFontManager::Substitute(const rtl::OUString& rFontName,
+ rtl::OUString& rMissingCodes, const rtl::OString &rLangAttrib,
+ italic::type &rItalic, weight::type &rWeight,
+@@ -928,8 +1063,6 @@
+ rWrapper.FcPatternAddString( pPattern, FC_FAMILY, pTargetNameUtf8 );
+
+ const FcChar8* pLangAttribUtf8 = (FcChar8*)rLangAttrib.getStr();
+- if( rLangAttrib.getLength() )
+- rWrapper.FcPatternAddString( pPattern, FC_LANG, pLangAttribUtf8 );
+
+ // Add required Unicode characters, if any
+ if ( rMissingCodes.getLength() )
+@@ -940,11 +1073,16 @@
+ // also handle unicode surrogates
+ const sal_uInt32 nCode = rMissingCodes.iterateCodePoints( &nStrIndex );
+ rWrapper.FcCharSetAddChar( unicodes, nCode );
++ if (!pLangAttribUtf8)
++ pLangAttribUtf8 = (const FcChar8*)pick_sample_language(nCode);
+ }
+ rWrapper.FcPatternAddCharSet( pPattern, FC_CHARSET, unicodes);
+ rWrapper.FcCharSetDestroy( unicodes );
+ }
+
++ if( pLangAttribUtf8 )
++ rWrapper.FcPatternAddString( pPattern, FC_LANG, pLangAttribUtf8 );
++
+ addtopattern(rWrapper, pPattern, rItalic, rWeight, rWidth, rPitch);
+
+ // query fontconfig for a substitute
+diff -ru vcl.orig/util/makefile.mk vcl/util/makefile.mk
+--- vcl.orig/util/makefile.mk 2009-10-08 13:25:00.000000000 +0100
++++ vcl/util/makefile.mk 2009-10-08 13:25:09.000000000 +0100
+@@ -298,6 +298,7 @@
+ # libs for generic plugin
+ SHL2STDLIBS=\
+ $(VCLLIB)\
++ $(I18NUTILLIB) \
+ $(I18NPAPERLIB) \
+ $(I18NISOLANGLIB) \
+ $(TOOLSLIB) \
diff --git a/openoffice.org-3.2.0.ooo106502.svx.fixspelltimer.patch b/openoffice.org-3.2.0.ooo106502.svx.fixspelltimer.patch
new file mode 100644
index 0000000..ed7fe4d
--- /dev/null
+++ b/openoffice.org-3.2.0.ooo106502.svx.fixspelltimer.patch
@@ -0,0 +1,13 @@
+diff -r 3ee4cb3a17dd svx/source/editeng/editeng.cxx
+--- a/editeng/source/editeng/editeng.cxx Fri Oct 30 09:44:02 2009 +0000
++++ b/editeng/source/editeng/editeng.cxx Fri Oct 30 17:46:26 2009 +0000
+@@ -1783,7 +1783,8 @@
+ ContentNode* pNode = pImpEditEngine->GetEditDoc().GetObject( n );
+ pNode->CreateWrongList();
+ }
+- pImpEditEngine->StartOnlineSpellTimer();
++ if (pImpEditEngine->IsFormatted())
++ pImpEditEngine->StartOnlineSpellTimer();
+ }
+ else
+ {
diff --git a/openoffice.org-3.2.0.ooo108846.sfx2.qstartfixes.patch b/openoffice.org-3.2.0.ooo108846.sfx2.qstartfixes.patch
new file mode 100644
index 0000000..c455b03
--- /dev/null
+++ b/openoffice.org-3.2.0.ooo108846.sfx2.qstartfixes.patch
@@ -0,0 +1,87 @@
+diff -r 3c24aa9a7810 desktop/source/app/cmdlineargs.cxx
+--- a/desktop/source/app/cmdlineargs.cxx Sat Jan 23 16:31:03 2010 +0000
++++ b/desktop/source/app/cmdlineargs.cxx Tue Feb 02 13:59:39 2010 +0000
+@@ -396,7 +396,7 @@
+ }
+ else if ( aArg.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "-quickstart" )) == sal_True )
+ {
+-#if defined(WNT) || defined(OS2) || defined(QUARTZ)
++#if defined(ENABLE_QUICKSTART_APPLET)
+ SetBoolParam_Impl( CMD_BOOLPARAM_QUICKSTART, sal_True );
+ #endif
+ SetBoolParam_Impl( CMD_BOOLPARAM_NOQUICKSTART, sal_False );
+diff -r 3c24aa9a7810 desktop/source/app/makefile.mk
+--- a/desktop/source/app/makefile.mk Sat Jan 23 16:31:03 2010 +0000
++++ b/desktop/source/app/makefile.mk Tue Feb 02 13:59:39 2010 +0000
+@@ -53,6 +53,10 @@
+ # DEPLOYMENTMISCLIB = -ldeploymentmisc$(DLLPOSTFIX)
+ # .ENDIF
+
++.IF "$(GUI)"=="WNT" || "$(GUI)"=="OS2" || "$(GUIBASE)"=="aqua" || "$(ENABLE_SYSTRAY_GTK)"=="TRUE"
++CFLAGS+=-DENABLE_QUICKSTART_APPLET
++.ENDIF
++
+ SHL1TARGET = sofficeapp
+ SHL1OBJS = \
+ $(SLO)$/app.obj \
+diff -r 3c24aa9a7810 sfx2/source/appl/shutdownicon.cxx
+--- a/sfx2/source/appl/shutdownicon.cxx Sat Jan 23 16:31:03 2010 +0000
++++ b/sfx2/source/appl/shutdownicon.cxx Tue Feb 02 13:59:39 2010 +0000
+@@ -555,8 +555,8 @@
+ return;
+
+ // always remove ourselves as listener
++ pInst->m_bListenForTermination = true;
+ xDesktop->removeTerminateListener( pInst );
+- pInst->m_bListenForTermination = true;
+
+ // terminate desktop only if no tasks exist
+ Reference< XFramesSupplier > xSupplier( xDesktop, UNO_QUERY );
+diff -r 3c24aa9a7810 sfx2/source/appl/shutdowniconunx.cxx
+--- a/sfx2/source/appl/shutdowniconunx.cxx Sat Jan 23 16:31:03 2010 +0000
++++ b/sfx2/source/appl/shutdowniconunx.cxx Tue Feb 02 13:59:39 2010 +0000
+@@ -39,6 +39,7 @@
+ static EggTrayIcon *pTrayIcon;
+ static GtkWidget *pExitMenuItem = NULL;
+ static GtkWidget *pOpenMenuItem = NULL;
++static GtkWidget *pDisableMenuItem = NULL;
+
+ static void open_url_cb( GtkWidget *, gpointer data )
+ {
+@@ -67,8 +68,10 @@
+ static void exit_quickstarter_cb( GtkWidget * )
+ {
+ egg_tray_icon_cancel_message (pTrayIcon, 1 );
+- ShutdownIcon::getInstance()->terminateDesktop();
+ plugin_shutdown_sys_tray();
++ //terminate may cause this .so to be unloaded. So we must be hands off
++ //all calls into this .so after this call
++ ShutdownIcon::terminateDesktop();
+ }
+
+ static void menu_deactivate_cb( GtkWidget *pMenu )
+@@ -265,7 +268,7 @@
+ pMenuItem = gtk_separator_menu_item_new();
+ gtk_menu_shell_append( pMenuShell, pMenuItem );
+
+- (void) add_image_menu_item
++ pDisableMenuItem = add_image_menu_item
+ ( pMenuShell, GTK_STOCK_CLOSE,
+ pShutdownIcon->GetResString( STR_QUICKSTART_PRELAUNCH_UNX ),
+ G_CALLBACK( systray_disable_cb ) );
+@@ -289,6 +292,7 @@
+ bool bModal = ShutdownIcon::bModalMode;
+ gtk_widget_set_sensitive( pExitMenuItem, !bModal);
+ gtk_widget_set_sensitive( pOpenMenuItem, !bModal);
++ gtk_widget_set_sensitive( pDisableMenuItem, !bModal);
+ }
+
+ extern "C" {
+@@ -404,6 +409,7 @@
+ pTrayIcon = NULL;
+ pExitMenuItem = NULL;
+ pOpenMenuItem = NULL;
++ pDisableMenuItem = NULL;
+ }
+
+ #endif // ENABLE_QUICKSTART_APPLET
diff --git a/openoffice.org-3.2.0.ooo110142.svx.safercolornames.patch b/openoffice.org-3.2.0.ooo110142.svx.safercolornames.patch
new file mode 100644
index 0000000..c316687
--- /dev/null
+++ b/openoffice.org-3.2.0.ooo110142.svx.safercolornames.patch
@@ -0,0 +1,31 @@
+diff -ru svx.orig/source/unodraw/unoprov.cxx svx/source/unodraw/unoprov.cxx
+--- svx.orig/source/unodraw/unoprov.cxx 2010-03-15 14:31:21.000000000 +0000
++++ svx/source/unodraw/unoprov.cxx 2010-03-15 15:17:05.000000000 +0000
+@@ -1368,12 +1370,24 @@
+
+ bool SvxUnoConvertResourceString( USHORT* pSourceResIds, USHORT* pDestResIds, int nCount, String& rString ) throw()
+ {
+- int i = 0;
++ //We replace e.g. "Gray 10%" with the translation of Gray, but we shouldn't
++ //replace "Red Hat 1" with the translation of Red :-)
++ rtl::OUString sStr(rString);
++ const sal_Unicode *pStr = sStr.getStr();
++ sal_Int32 nLength = sStr.getLength();
++ while( nLength > 0 )
++ {
++ const sal_Unicode nChar = pStr[nLength-1];
++ if (nChar != '%' && (nChar < '0' || nChar > '9'))
++ break;
++ nLength--;
++ }
++ sStr = rtl::OUString(pStr, nLength).trim();
+
+- for( i = 0; i < nCount; i++ )
++ for(int i = 0; i < nCount; ++i )
+ {
+ String aStrDefName = SVX_RESSTR( pSourceResIds[i] );
+- if( rString.Search( aStrDefName ) == 0 )
++ if( sStr.equals( aStrDefName ) )
+ {
+ String aReplace = SVX_RESSTR( pDestResIds[i] );
+ rString.Replace( 0, aStrDefName.Len(), aReplace );
diff --git a/openoffice.org-3.2.0.ooo111741.extras.malformed-xml-file.patch b/openoffice.org-3.2.0.ooo111741.extras.malformed-xml-file.patch
new file mode 100644
index 0000000..827fa5c
--- /dev/null
+++ b/openoffice.org-3.2.0.ooo111741.extras.malformed-xml-file.patch
@@ -0,0 +1,24 @@
+# HG changeset patch
+# Parent 34e231cc7773ab82fa170edf12e1e6082e5fa50b
+#i111741# fix malformed XML
+
+diff -r 34e231cc7773 extras/source/palettes/lang/pt-BR/classic_pt-BR.sog
+--- a/extras/source/palettes/lang/pt-BR/classic_pt-BR.sog Fri May 21 08:28:32 2010 +0200
++++ b/extras/source/palettes/lang/pt-BR/classic_pt-BR.sog Fri May 21 09:31:48 2010 +0200
+@@ -17,15 +17,4 @@
+
+
+
+-
++
diff --git a/openoffice.org-3.2.0.ooo95369.sw.sortedobjs.patch b/openoffice.org-3.2.0.ooo95369.sw.sortedobjs.patch
new file mode 100644
index 0000000..847fd89
--- /dev/null
+++ b/openoffice.org-3.2.0.ooo95369.sw.sortedobjs.patch
@@ -0,0 +1,17 @@
+diff -r 2da10c20ba01 sw/source/core/layout/trvlfrm.cxx
+--- a/sw/source/core/layout/trvlfrm.cxx Mon Feb 08 10:49:42 2010 +0000
++++ b/sw/source/core/layout/trvlfrm.cxx Tue Feb 16 10:35:18 2010 +0000
+@@ -2064,9 +2064,11 @@
+ if ( pStartFrm->IsInFly() )
+ {
+ const SwAnchoredObject* pObj = pStartFrm->FindFlyFrm();
+- aSortObjs.Insert( *(const_cast(pObj)) );
++ ASSERT( pObj, "No Start Object." );
++ if (pObj) aSortObjs.Insert( *(const_cast(pObj)) );
+ const SwAnchoredObject* pObj2 = pEndFrm->FindFlyFrm();
+- aSortObjs.Insert( *(const_cast(pObj2)) );
++ ASSERT( pObj2, "No Start Object." );
++ if (pObj2) aSortObjs.Insert( *(const_cast(pObj2)) );
+ }
+
+ //Fall 4: Tabellenselection
diff --git a/openoffice.org-3.2.0.rh632236.writerfilter.cleanup-cell-props.patch b/openoffice.org-3.2.0.rh632236.writerfilter.cleanup-cell-props.patch
new file mode 100644
index 0000000..0c237dd
--- /dev/null
+++ b/openoffice.org-3.2.0.rh632236.writerfilter.cleanup-cell-props.patch
@@ -0,0 +1,37 @@
+# HG changeset patch
+# Parent 95fe59fa4df8614a0bf6b0f5b7c7114e98a28f8d
+rhbz#632236: [abrt] [docx] _Construct crash
+
+diff -r 95fe59fa4df8 writerfilter/source/dmapper/DomainMapperTableHandler.cxx
+--- a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx Wed Sep 29 09:32:54 2010 +0200
++++ b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx Wed Sep 29 09:59:15 2010 +0200
+@@ -492,13 +492,6 @@
+ if( aRepeatIter == m_aTableProperties->end() )
+ m_aTableProperties->Insert( PROP_HEADER_ROW_COUNT, false, uno::makeAny( (sal_Int32)0 ));
+
+- // Remove the PROP_HEADER_ROW_COUNT from the table default to avoid
+- // propagating it to the cells
+- PropertyMap::iterator aDefaultRepeatIt =
+- rInfo.pTableDefaults->find( PropertyDefinition( PROP_HEADER_ROW_COUNT, false ) );
+- if ( aDefaultRepeatIt != rInfo.pTableDefaults->end( ) )
+- rInfo.pTableDefaults->erase( aDefaultRepeatIt );
+-
+ rInfo.aTableProperties = m_aTableProperties->GetPropertyValues();
+
+ #ifdef DEBUG_DOMAINMAPPER
+@@ -588,7 +581,14 @@
+ PropertyMapPtr pStyleProps = rInfo.pTableStyle->GetProperties( nCellStyleMask + nRowStyleMask );
+ pAllCellProps->insert( pStyleProps );
+ }
+-
++
++ // Remove properties from style/row that aren't allowed in cells
++ const PropertyMap::iterator aDefaultRepeatIt =
++ pAllCellProps->find(
++ PropertyDefinition( PROP_HEADER_ROW_COUNT, false ) );
++ if ( aDefaultRepeatIt != pAllCellProps->end( ) )
++ pAllCellProps->erase( aDefaultRepeatIt );
++
+ // Then add the cell properties
+ pAllCellProps->insert( *aCellIterator );
+ aCellIterator->get( )->swap( *pAllCellProps.get( ) );
diff --git a/openoffice.org-3.3.0.ooo100686.wizards.types.not.mediatypes.patch b/openoffice.org-3.3.0.ooo100686.wizards.types.not.mediatypes.patch
new file mode 100644
index 0000000..63c4839
--- /dev/null
+++ b/openoffice.org-3.3.0.ooo100686.wizards.types.not.mediatypes.patch
@@ -0,0 +1,49 @@
+--- wizards/source/euro/AutoPilotRun.xba 2010-06-08 11:34:12.000000000 +0100
++++ wizards/source/euro/AutoPilotRun.xba 2010-06-08 12:54:34.000000000 +0100
+@@ -11,7 +11,7 @@
+ Public SubstFile as String
+ Public SubstDir as String
+ Public NoArgs()
+-Public FilterList(9) as String
++Public TypeList(14) as String
+ Public GoOn as Boolean
+ Public DoUnprotect as Integer
+ Public Password as String
+@@ -55,20 +55,25 @@
+ Else
+ SourceDir = Source
+ TargetStemDir = TargetDir
+- FilterList(0) = "application/x-starcalc"
+- FilterList(1) = "application/vnd.stardivision.calc"
+- FilterList(2) = "application/vnd.sun.xml.calc"
+- FilterList(3) = "application/vnd.oasis.opendocument.spreadsheet"
++ TypeList(0) = "calc8"
++ TypeList(1) = "calc_StarOffice_XML_Calc"
++ TypeList(2) = "calc_StarCalc_30"
++ TypeList(3) = "calc_StarCalc_40"
++ TypeList(4) = "calc_StarCalc_50"
+ If DialogModel.chkTextDocuments.State = 1 Then
+- ReDim Preserve FilterList(8) as String
+-
+- FilterList(4) = "application/x-starwriter"
+- FilterList(5) = "application/vnd.stardivision.writer"
+- FilterList(6) = "application/vnd.stardivision.writer/web"
+- FilterList(7) = "application/vnd.sun.xml.writer"
+- FilterList(8) = "application/vnd.oasis.opendocument.text"
++ ReDim Preserve TypeList(13) as String
++
++ TypeList(5) = "writer8"
++ TypeList(6) = "writerglobal8"
++ TypeList(7) = "writer_StarOffice_XML_Writer"
++ TypeList(8) = "writer_globaldocument_StarOffice_XML_Writer_GlobalDocument"
++ TypeList(9) = "writer_StarWriter_30"
++ TypeList(10) = "writer_StarWriter_40"
++ TypeList(11) = "writer_globaldocument_StarWriter_40GlobalDocument"
++ TypeList(12) = "writer_StarWriter_50"
++ TypeList(13) = "writer_globaldocument_StarWriter_50GlobalDocument"
+ End If
+- FilesList() = ReadDirectories(SourceDir, bRecursive, True, False, FilterList())
++ FilesList() = ReadDirectories(SourceDir, bRecursive, True, False, TypeList())
+ TotDocCount = Ubound(FilesList(),1) + 1
+ End If
+ InitializeProgressPage(DialogModel)
diff --git a/openoffice.org-3.3.0.ooo106591.sal.tradcopy.patch b/openoffice.org-3.3.0.ooo106591.sal.tradcopy.patch
new file mode 100644
index 0000000..6e85962
--- /dev/null
+++ b/openoffice.org-3.3.0.ooo106591.sal.tradcopy.patch
@@ -0,0 +1,83 @@
+diff -ru sal.orig/osl/unx/file_misc.cxx sal/osl/unx/file_misc.cxx
+--- sal.orig/osl/unx/file_misc.cxx 2010-08-09 09:13:30.000000000 +0100
++++ sal/osl/unx/file_misc.cxx 2010-08-09 09:21:21.000000000 +0100
+@@ -1022,66 +1022,29 @@
+ return nRet;
+ }
+
+- /* HACK: because memory mapping fails on various
+- platforms if the size of the source file is 0 byte */
+- if (0 == nSourceSize)
+- {
+- close(SourceFileFD);
+- close(DestFileFD);
+- return 0;
+- }
+-
+- // read and lseek are used to check the possibility to access the data
+- // not a nice solution, but it allows to avoid a crash in case it is an opened samba file
+- // generally, reading of one byte should not affect the performance
+- char nCh;
+- if ( 1 != read( SourceFileFD, &nCh, 1 )
+- || -1 == lseek( SourceFileFD, 0, SEEK_SET ) )
+- {
+- nRet = errno;
+- close( SourceFileFD );
+- close( DestFileFD );
+- return nRet;
+- }
+-
+ size_t nWritten = 0;
+ size_t nRemains = nSourceSize;
+
+- /* mmap file -- open dest file -- write -- fsync it at the end */
+- void* pSourceFile = mmap( 0, nSourceSize, PROT_READ, MAP_SHARED, SourceFileFD, 0 );
+- if ( pSourceFile != MAP_FAILED )
+- {
+- nWritten = write( DestFileFD, pSourceFile, nSourceSize );
+- nRemains -= nWritten;
+- munmap( (char*)pSourceFile, nSourceSize );
+- }
+-
+ if ( nRemains )
+ {
+ /* mmap has problems, try the direct streaming */
+- char pBuffer[32000];
++ char pBuffer[0x7FFF];
+ size_t nRead = 0;
+
+- nRemains = nSourceSize;
+-
+- if ( -1 != lseek( SourceFileFD, 0, SEEK_SET )
+- && -1 != lseek( DestFileFD, 0, SEEK_SET ) )
++ do
+ {
+- do
+- {
+- nRead = 0;
+- nWritten = 0;
+-
+- size_t nToRead = std::min( (size_t)32000, nRemains );
+- nRead = read( SourceFileFD, pBuffer, nToRead );
+- if ( (size_t)-1 != nRead )
+- nWritten = write( DestFileFD, pBuffer, nRead );
+-
+- if ( (size_t)-1 != nWritten )
+- nRemains -= nWritten;
+- }
+- while( nRemains && (size_t)-1 != nRead && nRead == nWritten );
++ nRead = 0;
++ nWritten = 0;
++
++ size_t nToRead = std::min( sizeof(pBuffer), nRemains );
++ nRead = read( SourceFileFD, pBuffer, nToRead );
++ if ( (size_t)-1 != nRead )
++ nWritten = write( DestFileFD, pBuffer, nRead );
++
++ if ( (size_t)-1 != nWritten )
++ nRemains -= nWritten;
+ }
++ while( nRemains && (size_t)-1 != nRead && nRead == nWritten );
+ }
+
+ if ( nRemains )
diff --git a/openoffice.org-3.3.0.ooo107490.cppu.lifecycle.patch b/openoffice.org-3.3.0.ooo107490.cppu.lifecycle.patch
new file mode 100644
index 0000000..960dc32
--- /dev/null
+++ b/openoffice.org-3.3.0.ooo107490.cppu.lifecycle.patch
@@ -0,0 +1,852 @@
+--- cppu/source/threadpool/jobqueue.cxx 2008-04-11 11:33:02.000000000 +0100
++++ cppu/source/threadpool/jobqueue.cxx 2009-12-02 16:14:26.000000000 +0000
+@@ -45,6 +45,7 @@
+ m_cndWait( osl_createCondition() )
+ {
+ osl_resetCondition( m_cndWait );
++ m_DisposedCallerAdmin = DisposedCallerAdmin::getInstance();
+ }
+
+ JobQueue::~JobQueue()
+@@ -71,7 +72,7 @@
+ {
+ // synchronize with the dispose calls
+ MutexGuard guard( m_mutex );
+- if( DisposedCallerAdmin::getInstance()->isDisposed( nDisposeId ) )
++ if( m_DisposedCallerAdmin->isDisposed( nDisposeId ) )
+ {
+ return 0;
+ }
+--- cppu/source/threadpool/jobqueue.hxx 2008-04-11 11:33:18.000000000 +0100
++++ cppu/source/threadpool/jobqueue.hxx 2009-12-02 16:15:49.000000000 +0000
+@@ -37,6 +37,8 @@
+ #include
+ #include
+
++#include
++
+ namespace cppu_threadpool
+ {
+ extern "C" typedef void (SAL_CALL RequestFun)(void *);
+@@ -51,6 +53,9 @@
+
+ typedef ::std::list < sal_Int64 > CallStackList;
+
++ class DisposedCallerAdmin;
++ typedef boost::shared_ptr DisposedCallerAdminHolder;
++
+ class JobQueue
+ {
+ public:
+@@ -76,6 +81,7 @@
+ sal_Int32 m_nToDo;
+ sal_Bool m_bSuspended;
+ oslCondition m_cndWait;
++ DisposedCallerAdminHolder m_DisposedCallerAdmin;
+ };
+ }
+
+--- cppu/source/threadpool/thread.cxx 2008-04-11 11:34:00.000000000 +0100
++++ cppu/source/threadpool/thread.cxx 2009-12-03 16:15:02.000000000 +0000
+@@ -31,6 +31,8 @@
+ #include
+ #include
+
++#include
++
+ #include "thread.hxx"
+ #include "jobqueue.hxx"
+ #include "threadpool.hxx"
+@@ -98,20 +100,17 @@
+ } while( pCurrent );
+ }
+
+- ThreadAdmin* ThreadAdmin::getInstance()
++ struct theThreadAdmin : public rtl::StaticWithInit< ThreadAdminHolder, theThreadAdmin >
+ {
+- static ThreadAdmin *pThreadAdmin = 0;
+- if( ! pThreadAdmin )
+- {
+- MutexGuard guard( Mutex::getGlobalMutex() );
+- if( ! pThreadAdmin )
+- {
+- static ThreadAdmin admin;
+- pThreadAdmin = &admin;
+- }
++ ThreadAdminHolder operator () () {
++ ThreadAdminHolder aRet(new ThreadAdmin());
++ return aRet;
+ }
+- return pThreadAdmin;
++ };
+
++ ThreadAdminHolder& ThreadAdmin::getInstance()
++ {
++ return theThreadAdmin::get();
+ }
+
+ // ----------------------------------------------------------------------------------
+@@ -119,12 +118,13 @@
+ const ByteSequence &aThreadId,
+ sal_Bool bAsynchron )
+ : m_thread( 0 )
++ , m_aThreadAdmin( ThreadAdmin::getInstance() )
+ , m_pQueue( pQueue )
+ , m_aThreadId( aThreadId )
+ , m_bAsynchron( bAsynchron )
+ , m_bDeleteSelf( sal_True )
+ {
+- ThreadAdmin::getInstance()->add( this );
++ m_aThreadAdmin->add( this );
+ }
+
+
+@@ -166,7 +166,7 @@
+
+ void ORequestThread::onTerminated()
+ {
+- ThreadAdmin::getInstance()->remove( this );
++ m_aThreadAdmin->remove( this );
+ if( m_bDeleteSelf )
+ {
+ delete this;
+@@ -175,6 +175,8 @@
+
+ void ORequestThread::run()
+ {
++ ThreadPoolHolder theThreadPool = cppu_threadpool::ThreadPool::getInstance();
++
+ while ( m_pQueue )
+ {
+ if( ! m_bAsynchron )
+@@ -197,7 +199,7 @@
+
+ if( m_pQueue->isEmpty() )
+ {
+- ThreadPool::getInstance()->revokeQueue( m_aThreadId , m_bAsynchron );
++ theThreadPool->revokeQueue( m_aThreadId , m_bAsynchron );
+ // Note : revokeQueue might have failed because m_pQueue.isEmpty()
+ // may be false (race).
+ }
+@@ -211,7 +213,7 @@
+ uno_releaseIdFromCurrentThread();
+ }
+
+- cppu_threadpool::ThreadPool::getInstance()->waitInPool( this );
++ theThreadPool->waitInPool( this );
+ }
+ }
+ }
+--- cppu/source/threadpool/thread.hxx 2008-04-11 11:34:18.000000000 +0100
++++ cppu/source/threadpool/thread.hxx 2009-12-02 15:58:34.000000000 +0000
+@@ -37,6 +37,8 @@
+ namespace cppu_threadpool {
+
+ class JobQueue;
++ class ThreadAdmin;
++ typedef boost::shared_ptr ThreadAdminHolder;
+
+ //-----------------------------------------
+ // private thread class for the threadpool
+@@ -61,6 +63,7 @@
+
+ private:
+ oslThread m_thread;
++ ThreadAdminHolder m_aThreadAdmin;
+ JobQueue *m_pQueue;
+ ::rtl::ByteSequence m_aThreadId;
+ sal_Bool m_bAsynchron;
+@@ -71,7 +74,7 @@
+ {
+ public:
+ ~ThreadAdmin ();
+- static ThreadAdmin *getInstance();
++ static ThreadAdminHolder &getInstance();
+ void add( ORequestThread * );
+ void remove( ORequestThread * );
+ void join();
+--- cppu/source/threadpool/threadpool.cxx 2008-04-11 11:34:54.000000000 +0100
++++ cppu/source/threadpool/threadpool.cxx 2009-12-03 16:14:56.000000000 +0000
+@@ -33,6 +33,7 @@
+ #include
+ #include
+ #include
++#include
+
+ #include
+
+@@ -44,19 +45,17 @@
+
+ namespace cppu_threadpool
+ {
+- DisposedCallerAdmin *DisposedCallerAdmin::getInstance()
++ struct theDisposedCallerAdmin :
++ public rtl::StaticWithInit< DisposedCallerAdminHolder, theDisposedCallerAdmin >
+ {
+- static DisposedCallerAdmin *pDisposedCallerAdmin = 0;
+- if( ! pDisposedCallerAdmin )
+- {
+- MutexGuard guard( Mutex::getGlobalMutex() );
+- if( ! pDisposedCallerAdmin )
+- {
+- static DisposedCallerAdmin admin;
+- pDisposedCallerAdmin = &admin;
+- }
++ DisposedCallerAdminHolder operator () () {
++ return DisposedCallerAdminHolder(new DisposedCallerAdmin());
+ }
+- return pDisposedCallerAdmin;
++ };
++
++ DisposedCallerAdminHolder DisposedCallerAdmin::getInstance()
++ {
++ return theDisposedCallerAdmin::get();
+ }
+
+ DisposedCallerAdmin::~DisposedCallerAdmin()
+@@ -107,6 +106,21 @@
+
+
+ //-------------------------------------------------------------------------------
++
++ struct theThreadPool :
++ public rtl::StaticWithInit< ThreadPoolHolder, theThreadPool >
++ {
++ ThreadPoolHolder operator () () {
++ ThreadPoolHolder aRet(new ThreadPool());
++ return aRet;
++ }
++ };
++
++ ThreadPool::ThreadPool()
++ {
++ m_DisposedCallerAdmin = DisposedCallerAdmin::getInstance();
++ }
++
+ ThreadPool::~ThreadPool()
+ {
+ #if OSL_DEBUG_LEVEL > 1
+@@ -116,19 +130,9 @@
+ }
+ #endif
+ }
+- ThreadPool *ThreadPool::getInstance()
++ ThreadPoolHolder ThreadPool::getInstance()
+ {
+- static ThreadPool *pThreadPool = 0;
+- if( ! pThreadPool )
+- {
+- MutexGuard guard( Mutex::getGlobalMutex() );
+- if( ! pThreadPool )
+- {
+- static ThreadPool pool;
+- pThreadPool = &pool;
+- }
+- }
+- return pThreadPool;
++ return theThreadPool::get();
+ }
+
+
+@@ -136,7 +140,7 @@
+ {
+ if( nDisposeId )
+ {
+- DisposedCallerAdmin::getInstance()->dispose( nDisposeId );
++ m_DisposedCallerAdmin->dispose( nDisposeId );
+
+ MutexGuard guard( m_mutex );
+ for( ThreadIdHashMap::iterator ii = m_mapQueue.begin() ;
+@@ -171,7 +175,7 @@
+
+ void ThreadPool::stopDisposing( sal_Int64 nDisposeId )
+ {
+- DisposedCallerAdmin::getInstance()->stopDisposing( nDisposeId );
++ m_DisposedCallerAdmin->stopDisposing( nDisposeId );
+ }
+
+ /******************
+@@ -400,7 +404,7 @@
+
+
+
+-typedef ::std::hash_set< uno_ThreadPool, uno_ThreadPool_Hash, uno_ThreadPool_Equal > ThreadpoolHashSet;
++typedef ::std::hash_map< uno_ThreadPool, ThreadPoolHolder, uno_ThreadPool_Hash, uno_ThreadPool_Equal > ThreadpoolHashSet;
+
+ static ThreadpoolHashSet *g_pThreadpoolHashSet;
+
+@@ -420,7 +424,7 @@
+
+ // Just ensure that the handle is unique in the process (via heap)
+ uno_ThreadPool h = new struct _uno_ThreadPool;
+- g_pThreadpoolHashSet->insert( h );
++ g_pThreadpoolHashSet->insert( ThreadpoolHashSet::value_type(h, ThreadPool::getInstance()) );
+ return h;
+ }
+
+--- cppu/source/threadpool/threadpool.hxx 2008-04-11 11:35:13.000000000 +0100
++++ cppu/source/threadpool/threadpool.hxx 2009-12-02 16:12:13.000000000 +0000
+@@ -33,6 +33,8 @@
+
+ #include
+
++#include
++
+ #include "jobqueue.hxx"
+
+
+@@ -78,13 +80,16 @@
+ };
+
+ typedef ::std::list < struct ::cppu_threadpool::WaitingThread * > WaitingThreadList;
++
++ class DisposedCallerAdmin;
++ typedef boost::shared_ptr DisposedCallerAdminHolder;
+
+ class DisposedCallerAdmin
+ {
+ public:
+ ~DisposedCallerAdmin();
+
+- static DisposedCallerAdmin *getInstance();
++ static DisposedCallerAdminHolder getInstance();
+
+ void dispose( sal_Int64 nDisposeId );
+ void stopDisposing( sal_Int64 nDisposeId );
+@@ -95,11 +100,15 @@
+ DisposedCallerList m_lst;
+ };
+
++ class ThreadPool;
++ typedef boost::shared_ptr ThreadPoolHolder;
++
+ class ThreadPool
+ {
+ public:
++ ThreadPool();
+ ~ThreadPool();
+- static ThreadPool *getInstance();
++ static ThreadPoolHolder getInstance();
+
+ void dispose( sal_Int64 nDisposeId );
+ void stopDisposing( sal_Int64 nDisposeId );
+@@ -127,6 +136,8 @@
+
+ ::osl::Mutex m_mutexWaitingThreadList;
+ WaitingThreadList m_lstThreads;
++
++ DisposedCallerAdminHolder m_DisposedCallerAdmin;
+ };
+
+ } // end namespace cppu_threadpool
+--- cppu/source/uno/lbenv.cxx 2009-02-12 10:18:09.000000000 +0000
++++ cppu/source/uno/lbenv.cxx 2009-12-03 16:14:26.000000000 +0000
+@@ -142,6 +142,7 @@
+ ::osl::Mutex mutex;
+ OUString2EnvironmentMap aName2EnvMap;
+
++ EnvironmentsData() : isDisposing(false) {}
+ ~EnvironmentsData();
+
+ inline void getEnvironment(
+@@ -150,6 +151,8 @@
+ inline void getRegisteredEnvironments(
+ uno_Environment *** pppEnvs, sal_Int32 * pnLen,
+ uno_memAlloc memAlloc, const OUString & rEnvDcp );
++
++ bool isDisposing;
+ };
+
+ namespace
+@@ -598,9 +601,14 @@
+ *ppHardEnv = 0;
+ }
+
++ EnvironmentsData & rData = theEnvironmentsData::get();
++
++ if (rData.isDisposing)
++ return;
++
+ uno_DefaultEnvironment * that = (uno_DefaultEnvironment *)pEnv;
+ {
+- ::osl::MutexGuard guard( theEnvironmentsData::get().mutex );
++ ::osl::MutexGuard guard( rData.mutex );
+ if (1 == ::osl_incrementInterlockedCount( &that->nRef )) // is dead
+ {
+ that->nRef = 0;
+@@ -917,6 +925,7 @@
+ EnvironmentsData::~EnvironmentsData()
+ {
+ ::osl::MutexGuard guard( mutex );
++ isDisposing = true;
+
+ for ( OUString2EnvironmentMap::const_iterator iPos( aName2EnvMap.begin() );
+ iPos != aName2EnvMap.end(); ++iPos )
+--- cppu/util/target.pmk 2008-04-11 12:07:15.000000000 +0100
++++ cppu/util/target.pmk 2009-12-02 15:50:08.000000000 +0000
+@@ -55,12 +55,3 @@
+ .ENDIF
+
+ .ENDIF
+-
+-# other stuff
+-
+-.IF "$(cppu_no_leak)" == ""
+-.IF "$(bndchk)" == ""
+-CFLAGS += -DCPPU_LEAK_STATIC_DATA
+-.ENDIF
+-.ENDIF
+-
+--- sax/source/tools/fastserializer.cxx 2010-06-22 12:54:56.000000000 +0100
++++ sax/source/tools/fastserializer.cxx 2010-06-22 13:14:30.000000000 +0100
+@@ -27,6 +27,7 @@
+
+ #include "fastserializer.hxx"
+ #include
++#include
+
+ #include
+ #include
+@@ -41,6 +42,7 @@
+ using ::com::sun::star::uno::Reference;
+ using ::com::sun::star::uno::RuntimeException;
+ using ::com::sun::star::uno::Sequence;
++using ::com::sun::star::uno::toUnoSequence;
+ using ::com::sun::star::xml::FastAttribute;
+ using ::com::sun::star::xml::Attribute;
+ using ::com::sun::star::xml::sax::SAXException;
+@@ -52,15 +54,15 @@
+ using ::com::sun::star::io::IOException;
+ using ::com::sun::star::io::BufferSizeExceededException;
+
+-static Sequence< sal_Int8 > aClosingBracket((sal_Int8 *)">", 1);
+-static Sequence< sal_Int8 > aSlashAndClosingBracket((sal_Int8 *)"/>", 2);
+-static Sequence< sal_Int8 > aColon((sal_Int8 *)":", 1);
+-static Sequence< sal_Int8 > aOpeningBracket((sal_Int8 *)"<", 1);
+-static Sequence< sal_Int8 > aOpeningBracketAndSlash((sal_Int8 *)"", 2);
+-static Sequence< sal_Int8 > aQuote((sal_Int8 *)"\"", 1);
+-static Sequence< sal_Int8 > aEqualSignAndQuote((sal_Int8 *)"=\"", 2);
+-static Sequence< sal_Int8 > aSpace((sal_Int8 *)" ", 1);
+-static Sequence< sal_Int8 > aXmlHeader((sal_Int8*) "\n", 56);
++static rtl::ByteSequence aClosingBracket((const sal_Int8 *)">", 1);
++static rtl::ByteSequence aSlashAndClosingBracket((const sal_Int8 *)"/>", 2);
++static rtl::ByteSequence aColon((const sal_Int8 *)":", 1);
++static rtl::ByteSequence aOpeningBracket((const sal_Int8 *)"<", 1);
++static rtl::ByteSequence aOpeningBracketAndSlash((const sal_Int8 *)"", 2);
++static rtl::ByteSequence aQuote((const sal_Int8 *)"\"", 1);
++static rtl::ByteSequence aEqualSignAndQuote((const sal_Int8 *)"=\"", 2);
++static rtl::ByteSequence aSpace((const sal_Int8 *)" ", 1);
++static rtl::ByteSequence aXmlHeader((const sal_Int8*) "\n", 56);
+
+ #define HAS_NAMESPACE(x) ((x & 0xffff0000) != 0)
+ #define NAMESPACE(x) (x >> 16)
+@@ -74,7 +76,7 @@
+ {
+ if (!mxOutputStream.is())
+ return;
+- writeBytes(aXmlHeader);
++ writeBytes(toUnoSequence(aXmlHeader));
+ }
+
+ OUString FastSaxSerializer::escapeXml( const OUString& s )
+@@ -116,7 +118,7 @@
+ {
+ if( HAS_NAMESPACE( nElement ) ) {
+ writeBytes(mxFastTokenHandler->getUTF8Identifier(NAMESPACE(nElement)));
+- writeBytes(aColon);
++ writeBytes(toUnoSequence(aColon));
+ writeBytes(mxFastTokenHandler->getUTF8Identifier(TOKEN(nElement)));
+ } else
+ writeBytes(mxFastTokenHandler->getUTF8Identifier(nElement));
+@@ -128,12 +130,12 @@
+ if (!mxOutputStream.is())
+ return;
+
+- writeBytes(aOpeningBracket);
++ writeBytes(toUnoSequence(aOpeningBracket));
+
+ writeId(Element);
+ writeFastAttributeList(Attribs);
+
+- writeBytes(aClosingBracket);
++ writeBytes(toUnoSequence(aClosingBracket));
+ }
+
+ void SAL_CALL FastSaxSerializer::startUnknownElement( const OUString& Namespace, const OUString& Name, const Reference< XFastAttributeList >& Attribs )
+@@ -142,19 +144,19 @@
+ if (!mxOutputStream.is())
+ return;
+
+- writeBytes(aOpeningBracket);
++ writeBytes(toUnoSequence(aOpeningBracket));
+
+ if (Namespace.getLength())
+ {
+ write(Namespace);
+- writeBytes(aColon);
++ writeBytes(toUnoSequence(aColon));
+ }
+
+ write(Name);
+
+ writeFastAttributeList(Attribs);
+
+- writeBytes(aClosingBracket);
++ writeBytes(toUnoSequence(aClosingBracket));
+ }
+
+ void SAL_CALL FastSaxSerializer::endFastElement( ::sal_Int32 Element )
+@@ -163,11 +165,11 @@
+ if (!mxOutputStream.is())
+ return;
+
+- writeBytes(aOpeningBracketAndSlash);
++ writeBytes(toUnoSequence(aOpeningBracketAndSlash));
+
+ writeId(Element);
+
+- writeBytes(aClosingBracket);
++ writeBytes(toUnoSequence(aClosingBracket));
+ }
+
+ void SAL_CALL FastSaxSerializer::endUnknownElement( const OUString& Namespace, const OUString& Name )
+@@ -176,17 +178,17 @@
+ if (!mxOutputStream.is())
+ return;
+
+- writeBytes(aOpeningBracketAndSlash);
++ writeBytes(toUnoSequence(aOpeningBracketAndSlash));
+
+ if (Namespace.getLength())
+ {
+ write(Namespace);
+- writeBytes(aColon);
++ writeBytes(toUnoSequence(aColon));
+ }
+
+ write(Name);
+
+- writeBytes(aClosingBracket);
++ writeBytes(toUnoSequence(aClosingBracket));
+ }
+
+ void SAL_CALL FastSaxSerializer::singleFastElement( ::sal_Int32 Element, const Reference< XFastAttributeList >& Attribs )
+@@ -195,12 +197,12 @@
+ if (!mxOutputStream.is())
+ return;
+
+- writeBytes(aOpeningBracket);
++ writeBytes(toUnoSequence(aOpeningBracket));
+
+ writeId(Element);
+ writeFastAttributeList(Attribs);
+
+- writeBytes(aSlashAndClosingBracket);
++ writeBytes(toUnoSequence(aSlashAndClosingBracket));
+ }
+
+ void SAL_CALL FastSaxSerializer::singleUnknownElement( const OUString& Namespace, const OUString& Name, const Reference< XFastAttributeList >& Attribs )
+@@ -209,19 +211,19 @@
+ if (!mxOutputStream.is())
+ return;
+
+- writeBytes(aOpeningBracket);
++ writeBytes(toUnoSequence(aOpeningBracket));
+
+ if (Namespace.getLength())
+ {
+ write(Namespace);
+- writeBytes(aColon);
++ writeBytes(toUnoSequence(aColon));
+ }
+
+ write(Name);
+
+ writeFastAttributeList(Attribs);
+
+- writeBytes(aSlashAndClosingBracket);
++ writeBytes(toUnoSequence(aSlashAndClosingBracket));
+ }
+
+ void SAL_CALL FastSaxSerializer::characters( const OUString& aChars )
+@@ -251,12 +253,12 @@
+ sal_Int32 nAttrLength = aAttrSeq.getLength();
+ for (sal_Int32 i = 0; i < nAttrLength; i++)
+ {
+- writeBytes(aSpace);
++ writeBytes(toUnoSequence(aSpace));
+
+ write(pAttr[i].Name);
+- writeBytes(aEqualSignAndQuote);
++ writeBytes(toUnoSequence(aEqualSignAndQuote));
+ write(escapeXml(pAttr[i].Value));
+- writeBytes(aQuote);
++ writeBytes(toUnoSequence(aQuote));
+ }
+
+ Sequence< FastAttribute > aFastAttrSeq = Attribs->getFastAttributes();
+@@ -264,16 +266,16 @@
+ sal_Int32 nFastAttrLength = aFastAttrSeq.getLength();
+ for (sal_Int32 j = 0; j < nFastAttrLength; j++)
+ {
+- writeBytes(aSpace);
++ writeBytes(toUnoSequence(aSpace));
+
+ sal_Int32 nToken = pFastAttr[j].Token;
+ writeId(nToken);
+
+- writeBytes(aEqualSignAndQuote);
++ writeBytes(toUnoSequence(aEqualSignAndQuote));
+
+ write(escapeXml(Attribs->getValue(pFastAttr[j].Token)));
+
+- writeBytes(aQuote);
++ writeBytes(toUnoSequence(aQuote));
+ }
+ }
+
+--- package/inc/ZipPackageFolder.hxx 2010-06-22 11:49:17.000000000 +0100
++++ package/inc/ZipPackageFolder.hxx 2010-06-22 12:50:26.000000000 +0100
+@@ -53,8 +53,6 @@
+ ::com::sun::star::container::XEnumerationAccess
+ >
+ {
+- static com::sun::star::uno::Sequence < sal_Int8 > aImplementationId;
+-
+ protected:
+ ContentHash maContents;
+ const ::com::sun::star::uno::Reference < com::sun::star::lang::XMultiServiceFactory > m_xFactory;
+@@ -82,10 +80,7 @@
+ throw(::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+
+ static void copyZipEntry( ZipEntry &rDest, const ZipEntry &rSource);
+- static ::com::sun::star::uno::Sequence < sal_Int8 > static_getImplementationId()
+- {
+- return aImplementationId;
+- }
++ static const ::com::sun::star::uno::Sequence < sal_Int8 >& static_getImplementationId();
+
+ void setPackageFormat_Impl( sal_Int32 nFormat ) { m_nFormat = nFormat; }
+ void setRemoveOnInsertMode_Impl( sal_Bool bRemove ) { this->mbAllowRemoveOnInsert = bRemove; }
+--- package/source/xstor/owriteablestream.cxx 2010-06-22 11:49:15.000000000 +0100
++++ package/source/xstor/owriteablestream.cxx 2010-06-22 12:13:20.000000000 +0100
+@@ -53,6 +53,7 @@
+
+ #include
+ #include
++#include
+
+ // since the copying uses 32000 blocks usually, it makes sense to have a smaller size
+ #define MAX_STORCACHE_SIZE 30000
+@@ -2169,25 +2170,14 @@
+ return m_pData->m_pTypeCollection->getTypes() ;
+ }
+
++namespace { struct lcl_ImplId : public rtl::Static< ::cppu::OImplementationId, lcl_ImplId > {}; }
++
+ //-----------------------------------------------
+ uno::Sequence< sal_Int8 > SAL_CALL OWriteStream::getImplementationId()
+ throw( uno::RuntimeException )
+ {
+- static ::cppu::OImplementationId* pID = NULL ;
+-
+- if ( pID == NULL )
+- {
+- ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ) ;
+-
+- if ( pID == NULL )
+- {
+- static ::cppu::OImplementationId aID( sal_False ) ;
+- pID = &aID ;
+- }
+- }
+-
+- return pID->getImplementationId() ;
+-
++ ::cppu::OImplementationId &rId = lcl_ImplId::get();
++ return rId.getImplementationId();
+ }
+
+ //-----------------------------------------------
+--- package/source/xstor/xstorage.cxx 2010-06-22 11:49:15.000000000 +0100
++++ package/source/xstor/xstorage.cxx 2010-06-22 12:11:45.000000000 +0100
+@@ -48,6 +48,7 @@
+ #include
+ #include
+ #include
++#include
+
+ #include
+ #include
+@@ -2367,25 +2368,14 @@
+ return m_pData->m_pTypeCollection->getTypes() ;
+ }
+
++namespace { struct lcl_ImplId : public rtl::Static< ::cppu::OImplementationId, lcl_ImplId > {}; }
++
+ //-----------------------------------------------
+ uno::Sequence< sal_Int8 > SAL_CALL OStorage::getImplementationId()
+ throw( uno::RuntimeException )
+ {
+- static ::cppu::OImplementationId* pID = NULL ;
+-
+- if ( pID == NULL )
+- {
+- ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ) ;
+-
+- if ( pID == NULL )
+- {
+- static ::cppu::OImplementationId aID( sal_False ) ;
+- pID = &aID ;
+- }
+- }
+-
+- return pID->getImplementationId() ;
+-
++ ::cppu::OImplementationId &rID = lcl_ImplId::get();
++ return rID.getImplementationId();
+ }
+
+ //____________________________________________________________________________________________________
+--- package/source/zippackage/ZipPackage.cxx 2010-06-22 11:49:16.000000000 +0100
++++ package/source/zippackage/ZipPackage.cxx 2010-06-22 12:12:00.000000000 +0100
+@@ -68,6 +68,7 @@
+ #include
+ #include
+ #include
++#include
+ #include
+ #include
+ #include "com/sun/star/io/XAsyncOutputMonitor.hpp"
+@@ -1585,21 +1586,14 @@
+ static_getSupportedServiceNames());
+ }
+
++namespace { struct lcl_ImplId : public rtl::Static< ::cppu::OImplementationId, lcl_ImplId > {}; }
++
+ // XUnoTunnel
+ Sequence< sal_Int8 > ZipPackage::getUnoTunnelImplementationId( void )
+ throw (RuntimeException)
+ {
+- static ::cppu::OImplementationId * pId = 0;
+- if (! pId)
+- {
+- ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
+- if (! pId)
+- {
+- static ::cppu::OImplementationId aId;
+- pId = &aId;
+- }
+- }
+- return pId->getImplementationId();
++ ::cppu::OImplementationId &rId = lcl_ImplId::get();
++ return rId.getImplementationId();
+ }
+
+ sal_Int64 SAL_CALL ZipPackage::getSomething( const Sequence< sal_Int8 >& aIdentifier )
+--- package/source/zippackage/ZipPackageFolder.cxx 2010-06-22 11:49:16.000000000 +0100
++++ package/source/zippackage/ZipPackageFolder.cxx 2010-06-22 12:50:00.000000000 +0100
+@@ -43,6 +43,7 @@
+ #include
+ #include
+ #include
++#include
+ #include
+
+ using namespace com::sun::star::packages::zip::ZipConstants;
+@@ -59,7 +60,7 @@
+ using namespace ::com::sun::star;
+ using vos::ORef;
+
+-Sequence < sal_Int8 > ZipPackageFolder::aImplementationId = Sequence < sal_Int8 > ();
++namespace { struct lcl_CachedImplId : public rtl::Static< Sequence < sal_Int8 >, lcl_CachedImplId > {}; }
+
+ ZipPackageFolder::ZipPackageFolder ( const Reference< XMultiServiceFactory >& xFactory,
+ sal_Int32 nFormat,
+@@ -80,10 +81,9 @@
+ aEntry.nCompressedSize = 0;
+ aEntry.nSize = 0;
+ aEntry.nOffset = -1;
+- if ( !aImplementationId.getLength() )
+- {
+- aImplementationId = getImplementationId();
+- }
++ Sequence < sal_Int8 > &rCachedImplId = lcl_CachedImplId::get();
++ if ( !rCachedImplId.getLength() )
++ rCachedImplId = getImplementationId();
+ }
+
+
+@@ -187,6 +187,11 @@
+ rDest.nExtraLen = rSource.nExtraLen;
+ }
+
++const ::com::sun::star::uno::Sequence < sal_Int8 >& ZipPackageFolder::static_getImplementationId()
++{
++ return lcl_CachedImplId::get();
++}
++
+ // XNameContainer
+ void SAL_CALL ZipPackageFolder::insertByName( const OUString& aName, const Any& aElement )
+ throw(IllegalArgumentException, ElementExistException, WrappedTargetException, RuntimeException)
+--- package/source/zippackage/ZipPackageStream.cxx 2010-06-22 11:49:16.000000000 +0100
++++ package/source/zippackage/ZipPackageStream.cxx 2010-06-22 12:53:32.000000000 +0100
+@@ -45,6 +45,8 @@
+ #include
+ #include
+
++#include
++
+ #include
+
+ using namespace com::sun::star::packages::zip::ZipConstants;
+@@ -55,8 +57,12 @@
+ using namespace cppu;
+ using namespace rtl;
+
+-Sequence < sal_Int8 > ZipPackageStream::aImplementationId = Sequence < sal_Int8 > ();
++namespace { struct lcl_CachedImplId : public rtl::Static< Sequence < sal_Int8 >, lcl_CachedImplId > {}; }
+
++const ::com::sun::star::uno::Sequence < sal_Int8 >& ZipPackageStream::static_getImplementationId()
++{
++ return lcl_CachedImplId::get();
++}
+
+ ZipPackageStream::ZipPackageStream ( ZipPackage & rNewPackage,
+ const Reference< XMultiServiceFactory >& xFactory,
+@@ -91,10 +97,9 @@
+ aEntry.nPathLen = -1;
+ aEntry.nExtraLen = -1;
+
+- if ( !aImplementationId.getLength() )
+- {
+- aImplementationId = getImplementationId();
+- }
++ Sequence < sal_Int8 > &rCachedImplId = lcl_CachedImplId::get();
++ if ( !rCachedImplId.getLength() )
++ rCachedImplId = getImplementationId();
+ }
+
+ ZipPackageStream::~ZipPackageStream( void )
+--- package/source/zippackage/ZipPackageStream.hxx 2010-06-22 11:49:16.000000000 +0100
++++ package/source/zippackage/ZipPackageStream.hxx 2010-06-22 12:51:18.000000000 +0100
+@@ -55,7 +55,6 @@
+ ::com::sun::star::packages::XDataSinkEncrSupport
+ >
+ {
+- static com::sun::star::uno::Sequence < sal_Int8 > aImplementationId;
+ protected:
+ com::sun::star::uno::Reference < com::sun::star::io::XInputStream > xStream;
+ const ::com::sun::star::uno::Reference < com::sun::star::lang::XMultiServiceFactory > m_xFactory;
+@@ -146,10 +145,7 @@
+ ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > SAL_CALL getRawData()
+ throw(::com::sun::star::uno::RuntimeException);
+
+- static ::com::sun::star::uno::Sequence < sal_Int8 >& static_getImplementationId()
+- {
+- return aImplementationId;
+- }
++ static const ::com::sun::star::uno::Sequence < sal_Int8 >& static_getImplementationId();
+
+ // XActiveDataSink
+ virtual void SAL_CALL setInputStream( const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& aStream )
diff --git a/openoffice.org-3.3.0.ooo108246.svx.hide-sql-group-when-inactive.patch b/openoffice.org-3.3.0.ooo108246.svx.hide-sql-group-when-inactive.patch
new file mode 100644
index 0000000..4862e4b
--- /dev/null
+++ b/openoffice.org-3.3.0.ooo108246.svx.hide-sql-group-when-inactive.patch
@@ -0,0 +1,97 @@
+diff -r aa65062d8d37 svx/source/cui/optcolor.cxx
+--- a/cui/source/options/optcolor.cxx Mon Jan 11 19:41:39 2010 +0100
++++ b/cui/source/options/optcolor.cxx Sat Jan 16 10:03:24 2010 +0100
+@@ -261,6 +261,9 @@
+ virtual void Command( const CommandEvent& rCEvt );
+ virtual void DataChanged( const DataChangedEvent& rDCEvt );
+
++ // calculate position behind last chapter
++ sal_Int32 impl_getPosBehindLastChapter() const;
++
+ public:
+ ColorConfigWindow_Impl(Window* pParent, const ResId& rResId);
+ ~ColorConfigWindow_Impl();
+@@ -398,7 +401,7 @@
+
+ /* -----------------------------25.03.2002 17:05------------------------------
+
+- ---------------------------------------------------------------------------*/
++---------------------------------------------------------------------------*/
+ ColorConfigWindow_Impl::ColorConfigWindow_Impl(Window* pParent, const ResId& rResId) :
+ Window(pParent, rResId),
+ aGeneralBackWN(this),
+@@ -709,14 +712,14 @@
+ aChapters[GROUP_CALC ]->SetGroupHeight( aChapters[GROUP_DRAW]->GetPosPixel().Y() - aChapters[GROUP_CALC]->GetPosPixel().Y() );
+ aChapters[GROUP_DRAW ]->SetGroupHeight( aChapters[GROUP_BASIC]->GetPosPixel().Y() - aChapters[GROUP_DRAW]->GetPosPixel().Y() );
+ aChapters[GROUP_BASIC ]->SetGroupHeight( aChapters[GROUP_SQL]->GetPosPixel().Y() - aChapters[GROUP_BASIC]->GetPosPixel().Y() );
++ aChapters[GROUP_SQL]->SetGroupHeight(impl_getPosBehindLastChapter()
++ - aChapters[GROUP_SQL]->GetPosPixel().Y());
+
+ ExtendedColorConfig aExtConfig;
+ sal_Int32 nExtCount = aExtConfig.GetComponentCount();
+ if ( nExtCount )
+ {
+- // calculate position behind last chapter
+- sal_Int32 nLastY = aSQLCommentWN.GetPosPixel().Y() + aSQLCommentWN.GetSizePixel().Height();
+- nLastY = nLastY + LogicToPixel( Size( 0, 3 ), MAP_APPFONT ).Height();
++ const sal_Int32 nLastY(impl_getPosBehindLastChapter());
+ // to calculate the number of lines
+ sal_Int32 nHeight = LogicToPixel( Size( 0, _LINE_HEIGHT ), MAP_APPFONT ).Height();
+ sal_Int32 nLineNum = nLastY / nHeight;
+@@ -898,6 +901,15 @@
+ aChapterWins.clear();
+ ::std::vector< Window*>().swap(aChapterWins);
+ }
++
++sal_Int32
++ColorConfigWindow_Impl::impl_getPosBehindLastChapter() const
++{
++ sal_Int32 nLastY = aSQLCommentWN.GetPosPixel().Y() + aSQLCommentWN.GetSizePixel().Height();
++ nLastY = nLastY + LogicToPixel( Size( 0, 3 ), MAP_APPFONT ).Height();
++ return nLastY;
++}
++
+ /* -----------------------------2002/06/20 12:48------------------------------
+
+ ---------------------------------------------------------------------------*/
+@@ -1175,9 +1187,9 @@
+ /* -----------------------------26.03.2002 12:55------------------------------
+
+ ---------------------------------------------------------------------------*/
+-sal_Bool lcl_MoveAndShow(Window* pWindow, long nOffset, long nMaxVisible, bool _bShow)
++sal_Bool lcl_MoveAndShow(Window* pWindow, long nOffset, long nMaxVisible, sal_Bool _bShow)
+ {
+- BOOL bHide = TRUE;
++ sal_Bool bHide = TRUE;
+ if(pWindow)
+ {
+ Point aPos = pWindow->GetPosPixel();
+@@ -1206,12 +1218,14 @@
+ continue;
+ Point aPos;
+ //controls outside of the view need to be hidden to speed up accessibility tools
+- bool bShowCtrl = ( lcl_isGroupVisible(
++ sal_Bool bShowCtrl = ( lcl_isGroupVisible(
+ lcl_getGroup(i), aScrollWindow.GetModuleOptions() ) != sal_False );
+- lcl_MoveAndShow(aScrollWindow.aCheckBoxes[i], nOffset, nWindowHeight, bShowCtrl);
+- lcl_MoveAndShow(aScrollWindow.aFixedTexts[i], nOffset, nWindowHeight, bShowCtrl);
+- lcl_MoveAndShow(aScrollWindow.aWindows[i] , nOffset, nWindowHeight, bShowCtrl);
+- BOOL bShow = lcl_MoveAndShow(aScrollWindow.aColorBoxes[i], nOffset, nWindowHeight, bShowCtrl);
++ // if any of the items on the current line is visible, the
++ // whole line should be visible
++ sal_Bool bShow(lcl_MoveAndShow(aScrollWindow.aCheckBoxes[i], nOffset, nWindowHeight, bShowCtrl));
++ bShow = lcl_MoveAndShow(aScrollWindow.aFixedTexts[i], nOffset, nWindowHeight, bShowCtrl) || bShow;
++ bShow = lcl_MoveAndShow(aScrollWindow.aWindows[i] , nOffset, nWindowHeight, bShowCtrl) || bShow;
++ bShow = lcl_MoveAndShow(aScrollWindow.aColorBoxes[i], nOffset, nWindowHeight, bShowCtrl) || bShow;
+ if(bShow)
+ {
+ if(nFirstVisible == -1)
+@@ -1223,7 +1237,7 @@
+ //show the one prior to the first visible and the first after the last visble control
+ //to enable KEY_TAB travelling
+
+- if(nFirstVisible)
++ if(nFirstVisible > 0)
+ {
+ //skip gaps where no controls exist for the related ColorConfigEntry
+ do
diff --git a/openoffice.org-3.3.0.ooo108637.sfx2.uisavedir.patch b/openoffice.org-3.3.0.ooo108637.sfx2.uisavedir.patch
new file mode 100644
index 0000000..6ea6c1d
--- /dev/null
+++ b/openoffice.org-3.3.0.ooo108637.sfx2.uisavedir.patch
@@ -0,0 +1,41 @@
+diff -r 3c24aa9a7810 sfx2/source/doc/guisaveas.cxx
+--- a/sfx2/source/doc/guisaveas.cxx Sat Jan 23 16:31:03 2010 +0000
++++ b/sfx2/source/doc/guisaveas.cxx Sun Jan 24 17:16:37 2010 +0000
+@@ -231,7 +231,7 @@
+ sal_Bool bSetStandardName,
+ ::rtl::OUString& aSuggestedName,
+ sal_Bool bPreselectPassword,
+- const ::rtl::OUString& aSuggestedDir,
++ ::rtl::OUString& aSuggestedDir,
+ sal_Int16 nDialog,
+ const ::rtl::OUString& rStandardDir,
+ const ::com::sun::star::uno::Sequence< ::rtl::OUString >& rBlackList
+@@ -731,7 +731,7 @@
+ sal_Bool bSetStandardName,
+ ::rtl::OUString& aSuggestedName,
+ sal_Bool bPreselectPassword,
+- const ::rtl::OUString& aSuggestedDir,
++ ::rtl::OUString& aSuggestedDir,
+ sal_Int16 nDialog,
+ const ::rtl::OUString& rStandardDir,
+ const ::com::sun::star::uno::Sequence< ::rtl::OUString >& rBlackList)
+@@ -927,6 +927,7 @@
+ INetURLObject aURL( pFileDlg->GetPath() );
+ // the path should be provided outside since it might be used for further calls to the dialog
+ aSuggestedName = aURL.GetName( INetURLObject::DECODE_WITH_CHARSET );
++ aSuggestedDir = pFileDlg->GetDisplayDirectory();
+
+ // old filter options should be cleared in case different filter is used
+
+@@ -1412,10 +1413,8 @@
+ sal_Bool bExit = sal_False;
+ while ( !bExit )
+ {
++ // in case the dialog is opened a second time the folder should be the same as previously navigated to by the user, not what was handed over by initial parameters
+ bUseFilterOptions = aModelData.OutputFileDialog( nStoreMode, aFilterProps, bSetStandardName, aSuggestedName, bPreselectPassword, aSuggestedDir, nDialog, sStandardDir, aBlackList );
+-
+- // in case the dialog is opend a second time the folder should be the same as before, not what was handed over by parameters
+- aSuggestedDir = ::rtl::OUString();
+ if ( nStoreMode == SAVEAS_REQUESTED )
+ {
+ // in case of saving check filter for possible alien warning
diff --git a/openoffice.org-3.3.0.ooo111758.sd.xerror.patch b/openoffice.org-3.3.0.ooo111758.sd.xerror.patch
new file mode 100644
index 0000000..4d7973d
--- /dev/null
+++ b/openoffice.org-3.3.0.ooo111758.sd.xerror.patch
@@ -0,0 +1,21 @@
+diff -ru sd.orig/source/ui/slideshow/slideshow.cxx sd/source/ui/slideshow/slideshow.cxx
+--- sd.orig/source/ui/slideshow/slideshow.cxx 2010-05-21 15:44:15.000000000 +0100
++++ sd/source/ui/slideshow/slideshow.cxx 2010-05-21 15:45:57.000000000 +0100
+@@ -699,6 +699,8 @@
+ ViewShellBase* pFullScreenViewShellBase = mpFullScreenViewShellBase;
+ mpFullScreenViewShellBase = 0;
+
++ xController->dispose();
++
+ if( pFullScreenViewShellBase )
+ {
+ PresentationViewShell* pShell = dynamic_cast(pFullScreenViewShellBase->GetMainViewShell().get());
+@@ -713,8 +715,6 @@
+ }
+ }
+
+- xController->dispose();
+-
+ if( pFullScreenViewShellBase )
+ {
+ PresentationViewShell* pShell = NULL;
diff --git a/openoffice.org-3.3.0.ooo112059.sw.avoid-null-ptr-deref.patch b/openoffice.org-3.3.0.ooo112059.sw.avoid-null-ptr-deref.patch
new file mode 100644
index 0000000..6bc8ef5
--- /dev/null
+++ b/openoffice.org-3.3.0.ooo112059.sw.avoid-null-ptr-deref.patch
@@ -0,0 +1,16 @@
+# HG changeset patch
+# Parent 25cb853961c8c5bcbe8833e2cd2323707a3d204b
+#i112059# avoid possible null pointer dereference
+
+diff -r 25cb853961c8 sw/source/filter/ww8/ww8graf.cxx
+--- a/sw/source/filter/ww8/ww8graf.cxx Tue Jun 01 06:52:22 2010 +0200
++++ b/sw/source/filter/ww8/ww8graf.cxx Thu Jun 03 08:30:49 2010 +0200
+@@ -2833,7 +2833,7 @@
+ MapWrapIntoFlyFmt(pRecord, pRetFrmFmt);
+
+ // Set frame name with object name
+- if( aObjName.Len() )
++ if( pRetFrmFmt /*#i52825# */ && aObjName.Len() )
+ pRetFrmFmt->SetName( aObjName );
+ return AddAutoAnchor(pRetFrmFmt);
+ }
diff --git a/openoffice.org-3.3.0.ooo112384.sw.export.doc.styledoesntexist.patch b/openoffice.org-3.3.0.ooo112384.sw.export.doc.styledoesntexist.patch
new file mode 100644
index 0000000..08a9b2a
--- /dev/null
+++ b/openoffice.org-3.3.0.ooo112384.sw.export.doc.styledoesntexist.patch
@@ -0,0 +1,11 @@
+--- sw/source/filter/ww8/ww8atr.cxx 2010-06-14 14:19:56.000000000 +0100
++++ sw/source/filter/ww8/ww8atr.cxx 2010-06-14 14:20:18.000000000 +0100
+@@ -2298,7 +2298,7 @@
+ if( sStyle.Len() )
+ {
+ SwTxtFmtColl* pColl = GetExport().pDoc->FindTxtFmtCollByName(sStyle);
+- if (!pColl->IsAssignedToListLevelOfOutlineStyle() || pColl->GetAssignedOutlineStyleLevel() < nTOXLvl)
++ if (!pColl || !pColl->IsAssignedToListLevelOfOutlineStyle() || pColl->GetAssignedOutlineStyleLevel() < nTOXLvl)
+ {
+ if( sTOption.Len() )
+ sTOption += ',';
diff --git a/openoffice.org-3.3.0.ooo113273.desktop.resolvelinks.patch b/openoffice.org-3.3.0.ooo113273.desktop.resolvelinks.patch
new file mode 100644
index 0000000..ca76130
--- /dev/null
+++ b/openoffice.org-3.3.0.ooo113273.desktop.resolvelinks.patch
@@ -0,0 +1,55 @@
+diff -ru desktop.orig/source/deployment/misc/dp_misc.cxx desktop/source/deployment/misc/dp_misc.cxx
+--- desktop.orig/source/deployment/misc/dp_misc.cxx 2010-07-20 08:31:24.000000000 +0100
++++ desktop/source/deployment/misc/dp_misc.cxx 2010-07-20 09:12:23.000000000 +0100
+@@ -143,6 +143,23 @@
+ return pipe.is();
+ }
+
++//get modification time
++static bool getModifyTimeTargetFile(const OUString &rFileURL, TimeValue &rTime)
++{
++ ::osl::DirectoryItem item;
++ if (::osl::DirectoryItem::get(rFileURL, item) != ::osl::File::E_None)
++ return false;
++
++ ::osl::FileStatus stat(FileStatusMask_ModifyTime|FileStatusMask_Type|FileStatusMask_LinkTargetURL);
++ if (item.getFileStatus(stat) != ::osl::File::E_None)
++ return false;
++
++ if( stat.getFileType() == ::osl::FileStatus::Link )
++ return getModifyTimeTargetFile(stat.getLinkTargetURL(), rTime);
++
++ rTime = stat.getModifyTime();
++ return true;
++}
+
+ //Returns true if the Folder was more recently modified then
+ //the lastsynchronized file. That is the repository needs to
+@@ -181,15 +198,12 @@
+
+ //compare the modification time of the extension folder and the last
+ //modified file
+- ::osl::FileStatus statFolder(FileStatusMask_ModifyTime);
+- ::osl::FileStatus statFile(FileStatusMask_ModifyTime);
+- if (itemExtFolder.getFileStatus(statFolder) == ::osl::File::E_None)
++ TimeValue timeFolder;
++ if (getModifyTimeTargetFile(folderURL, timeFolder))
+ {
+- if (itemFile.getFileStatus(statFile) == ::osl::File::E_None)
++ TimeValue timeFile;
++ if (getModifyTimeTargetFile(fileURL, timeFile))
+ {
+- TimeValue timeFolder = statFolder.getModifyTime();
+- TimeValue timeFile = statFile.getModifyTime();
+-
+ if (timeFile.Seconds < timeFolder.Seconds)
+ bNeedsSync = true;
+ }
+@@ -204,6 +218,7 @@
+ OSL_ASSERT(0);
+ bNeedsSync = true;
+ }
++
+ return bNeedsSync;
+ }
+
diff --git a/openoffice.org-3.3.0.ooo114012.sd.bada11ychain.patch b/openoffice.org-3.3.0.ooo114012.sd.bada11ychain.patch
new file mode 100644
index 0000000..39a148d
--- /dev/null
+++ b/openoffice.org-3.3.0.ooo114012.sd.bada11ychain.patch
@@ -0,0 +1,66 @@
+--- sd/source/ui/accessibility/AccessibleSlideSorterView.cxx 2010-08-27 13:38:58.000000000 +0100
++++ sd/source/ui/accessibility/AccessibleSlideSorterView.cxx 2010-08-27 13:34:27.000000000 +0100
+@@ -109,7 +109,6 @@
+ const Reference& rxParent,
+ ::Window* pContentWindow)
+ : AccessibleSlideSorterViewBase(MutexOwner::maMutex),
+- mpImpl(new Implementation(*this,rSlideSorter,pContentWindow)),
+ mrSlideSorter(rSlideSorter),
+ mxParent(rxParent),
+ mnClientId(0),
+@@ -121,6 +120,16 @@
+
+
+
++
++void AccessibleSlideSorterView::Init()
++{
++ mpImpl.reset(new Implementation(*this,mrSlideSorter,mpContentWindow));
++}
++
++
++
++
++
+ AccessibleSlideSorterView::~AccessibleSlideSorterView (void)
+ {
+ Destroyed ();
+--- sd/source/ui/inc/AccessibleSlideSorterView.hxx 2010-08-27 13:01:53.000000000 +0100
++++ sd/source/ui/inc/AccessibleSlideSorterView.hxx 2010-08-27 13:30:28.000000000 +0100
+@@ -76,6 +76,8 @@
+ ::sd::slidesorter::SlideSorter& rSlideSorter,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible> & rxParent,
+ ::Window* pParentWindow);
++
++ void Init();
+
+ virtual ~AccessibleSlideSorterView (void);
+
+--- sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx 2010-08-27 13:01:53.000000000 +0100
++++ sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx 2010-08-27 13:41:43.000000000 +0100
+@@ -273,16 +273,22 @@
+ SlideSorterViewShell::CreateAccessibleDocumentView (::sd::Window* pWindow)
+ {
+ OSL_ASSERT(mpSlideSorter.get()!=NULL);
+-
+ // When the view is not set then the initialization is not yet complete
+ // and we can not yet provide an accessibility object.
+- if (mpView == NULL)
++ if (mpView == NULL || mpSlideSorter.get() == NULL)
+ return NULL;
+
+- return new ::accessibility::AccessibleSlideSorterView (
++ ::accessibility::AccessibleSlideSorterView *pAccessibleView =
++ new ::accessibility::AccessibleSlideSorterView(
+ *mpSlideSorter.get(),
+ pWindow->GetAccessibleParentWindow()->GetAccessible(),
+ pWindow);
++
++ ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible> xRet(pAccessibleView);
++
++ pAccessibleView->Init();
++
++ return xRet;
+ }
+
+
diff --git a/openoffice.org-3.3.0.ooo114703.vcl.betterlocalize.font.patch b/openoffice.org-3.3.0.ooo114703.vcl.betterlocalize.font.patch
new file mode 100644
index 0000000..e6d7a4b
--- /dev/null
+++ b/openoffice.org-3.3.0.ooo114703.vcl.betterlocalize.font.patch
@@ -0,0 +1,30 @@
+diff -r 1ddfe565e084 vcl/unx/source/fontmanager/fontconfig.cxx
+--- a/vcl/unx/source/fontmanager/fontconfig.cxx Thu Sep 23 09:39:43 2010 +0100
++++ b/vcl/unx/source/fontmanager/fontconfig.cxx Thu Sep 23 14:13:17 2010 +0100
+@@ -512,19 +512,24 @@
+ for (std::vector::const_iterator aIter = families.begin(); aIter != aEnd; ++aIter)
+ {
+ const char *pLang = (const char*)aIter->first;
+- //perfect
+ if( rtl_str_compare(pLang,sFullMatch.getStr() ) == 0)
+ {
++ //perfect match
+ candidate = aIter->second;
+ break;
+ }
+ else if( (rtl_str_compare(pLang,sLangMatch.getStr()) == 0) && (!alreadyclosematch))
+ {
++ //fairly close
+ candidate = aIter->second;
+ alreadyclosematch = true;
+ }
++ else if( (rtl_str_compare(pLang,"en") == 0) && (!alreadyclosematch) )
++ {
++ //english name
++ candidate = aIter->second;
++ }
+ }
+-
+ return candidate;
+ }
+ }
diff --git a/openoffice.org-3.3.0.rh637738.libgcrypt.addmutex.patch b/openoffice.org-3.3.0.rh637738.libgcrypt.addmutex.patch
new file mode 100644
index 0000000..7fc97cb
--- /dev/null
+++ b/openoffice.org-3.3.0.rh637738.libgcrypt.addmutex.patch
@@ -0,0 +1,167 @@
+diff -ru ucb.orig/source/ucp/webdav/NeonHeadRequest.cxx ucb/source/ucp/webdav/NeonHeadRequest.cxx
+--- ucb.orig/source/ucp/webdav/NeonHeadRequest.cxx 2010-09-27 11:08:46.000000000 +0100
++++ ucb/source/ucp/webdav/NeonHeadRequest.cxx 2010-09-27 13:21:17.000000000 +0100
+@@ -156,6 +156,8 @@
+ // Constructor
+ // -------------------------------------------------------------------
+
++extern osl::Mutex aGlobalNeonMutex;
++
+ NeonHeadRequest::NeonHeadRequest( HttpSession* inSession,
+ const rtl::OUString & inPath,
+ const std::vector< ::rtl::OUString > &
+@@ -179,7 +181,10 @@
+ ne_add_response_header_catcher( req, NHR_ResponseHeaderCatcher, &aCtx );
+ #endif
+
+- nError = ne_request_dispatch( req );
++ {
++ osl::Guard< osl::Mutex > theGlobalGuard( aGlobalNeonMutex );
++ nError = ne_request_dispatch( req );
++ }
+
+ #if NEON_VERSION >= 0x0250
+ process_headers(req, ioResource, inHeaderNames);
+diff -ru ucb.orig/source/ucp/webdav/NeonSession.cxx ucb/source/ucp/webdav/NeonSession.cxx
+--- ucb.orig/source/ucp/webdav/NeonSession.cxx 2010-09-27 11:08:46.000000000 +0100
++++ ucb/source/ucp/webdav/NeonSession.cxx 2010-09-27 13:26:01.000000000 +0100
+@@ -618,7 +618,12 @@
+ // -------------------------------------------------------------------
+ // static members!
+ bool NeonSession::m_bGlobalsInited = false;
+-osl::Mutex NeonSession::m_aGlobalMutex;
++//See https://bugzilla.redhat.com/show_bug.cgi?id=544619#c4
++//neon is threadsafe, but uses gnutls which is only thread-safe
++//if initialized to be thread-safe. cups, unfortunately, generally
++//initializes it first, and as non-thread-safe, leaving the entire
++//stack unsafe
++osl::Mutex aGlobalNeonMutex;
+ NeonLockStore NeonSession::m_aNeonLockStore;
+
+ // -------------------------------------------------------------------
+@@ -647,7 +652,10 @@
+ {
+ if ( m_pHttpSession )
+ {
+- ne_session_destroy( m_pHttpSession );
++ {
++ osl::Guard< osl::Mutex > theGlobalGuard( aGlobalNeonMutex );
++ ne_session_destroy( m_pHttpSession );
++ }
+ m_pHttpSession = 0;
+ }
+ delete static_cast< RequestDataMap * >( m_pRequestData );
+@@ -673,11 +681,7 @@
+ if ( m_pHttpSession == 0 )
+ {
+ // Ensure that Neon sockets are initialized
+-
+- // --> tkr #151111# crashed if copy and pasted pictures from the internet
+- // ne_sock_init() was executed by two threads at the same time.
+- osl::Guard< osl::Mutex > theGlobalGuard( m_aGlobalMutex );
+- // <--
++ osl::Guard< osl::Mutex > theGlobalGuard( aGlobalNeonMutex );
+ if ( !m_bGlobalsInited )
+ {
+ if ( ne_sock_init() != 0 )
+@@ -726,7 +730,10 @@
+ m_nProxyPort = rProxyCfg.nPort;
+
+ // new session needed, destroy old first
+- ne_session_destroy( m_pHttpSession );
++ {
++ osl::Guard< osl::Mutex > theGlobalGuard( aGlobalNeonMutex );
++ ne_session_destroy( m_pHttpSession );
++ }
+ m_pHttpSession = 0;
+ bCreateNewSession = true;
+ }
+@@ -739,14 +746,15 @@
+ // currently (0.22.0) neon does not allow to pass the user info
+ // to the session
+
+- m_pHttpSession = ne_session_create(
+- rtl::OUStringToOString( m_aScheme,
+- RTL_TEXTENCODING_UTF8 ).getStr(),
+- /* theUri.GetUserInfo(),
+- @@@ for FTP via HTTP proxy, but not supported by Neon */
+- rtl::OUStringToOString( m_aHostName,
+- RTL_TEXTENCODING_UTF8 ).getStr(),
+- m_nPort );
++ {
++ osl::Guard< osl::Mutex > theGlobalGuard( aGlobalNeonMutex );
++ m_pHttpSession = ne_session_create(
++ rtl::OUStringToOString( m_aScheme, RTL_TEXTENCODING_UTF8 ).getStr(),
++ /* theUri.GetUserInfo(),
++ @@@ for FTP via HTTP proxy, but not supported by Neon */
++ rtl::OUStringToOString( m_aHostName, RTL_TEXTENCODING_UTF8 ).getStr(),
++ m_nPort );
++ }
+
+ if ( m_pHttpSession == 0 )
+ throw DAVException( DAVException::DAV_SESSION_CREATE,
+@@ -1638,12 +1646,11 @@
+ void NeonSession::abort()
+ throw ( DAVException )
+ {
+- // 11.11.09 (tkr): The following code lines causing crashes if
+- // closing a ongoing connection. It turned out that this existing
+- // solution doesn't work in multi-threading environments.
+- // So I disabled them in 3.2. . Issue #73893# should fix it in OOo 3.3.
+- //if ( m_pHttpSession )
+- // ne_close_connection( m_pHttpSession );
++ if ( m_pHttpSession )
++ {
++ osl::Guard< osl::Mutex > theGlobalGuard( aGlobalNeonMutex );
++ ne_close_connection( m_pHttpSession );
++ }
+ }
+
+ // -------------------------------------------------------------------
+@@ -1934,7 +1941,10 @@
+ ne_decompress * dc
+ = ne_decompress_reader( req, ne_accept_2xx, reader, userdata );
+
+- ret = ne_request_dispatch( req );
++ {
++ osl::Guard< osl::Mutex > theGlobalGuard( aGlobalNeonMutex );
++ ret = ne_request_dispatch( req );
++ }
+
+ #if NEON_VERSION >= 0x0250
+ if ( getheaders )
+@@ -1974,7 +1984,10 @@
+
+ ne_set_request_body_buffer( req, buffer, size );
+
+- ret = ne_request_dispatch( req );
++ {
++ osl::Guard< osl::Mutex > theGlobalGuard( aGlobalNeonMutex );
++ ret = ne_request_dispatch( req );
++ }
+
+ if ( ret == NE_OK && ne_get_status( req )->klass != 2 )
+ ret = NE_ERROR;
+@@ -2019,7 +2032,10 @@
+
+ ne_set_request_body_buffer( req, buffer, strlen( buffer ) );
+
+- ret = ne_request_dispatch( req );
++ {
++ osl::Guard< osl::Mutex > theGlobalGuard( aGlobalNeonMutex );
++ ret = ne_request_dispatch( req );
++ }
+
+ //if ( ctx.error )
+ // ret = NE_ERROR;
+diff -ru ucb.orig/source/ucp/webdav/NeonSession.hxx ucb/source/ucp/webdav/NeonSession.hxx
+--- ucb.orig/source/ucp/webdav/NeonSession.hxx 2010-09-27 11:08:46.000000000 +0100
++++ ucb/source/ucp/webdav/NeonSession.hxx 2010-09-27 13:06:43.000000000 +0100
+@@ -66,7 +66,6 @@
+ DAVRequestEnvironment m_aEnv;
+
+ static bool m_bGlobalsInited;
+- static osl::Mutex m_aGlobalMutex;
+ static NeonLockStore m_aNeonLockStore;
+
+ protected:
diff --git a/openoffice.org-3.3.0.rh638185.editeng.cjkctlhtmlsizes.patch b/openoffice.org-3.3.0.rh638185.editeng.cjkctlhtmlsizes.patch
new file mode 100644
index 0000000..209c7cd
--- /dev/null
+++ b/openoffice.org-3.3.0.rh638185.editeng.cjkctlhtmlsizes.patch
@@ -0,0 +1,64 @@
+diff -r 5f77587494c6 editeng/source/editeng/eehtml.cxx
+--- a/editeng/source/editeng/eehtml.cxx Mon Sep 27 20:33:10 2010 +0100
++++ b/editeng/source/editeng/eehtml.cxx Tue Sep 28 16:23:00 2010 +0100
+@@ -633,15 +633,30 @@
+ SfxItemSet aItems( aCurSel.Max().GetNode()->GetContentAttribs().GetItems() );
+
+ aItems.ClearItem( EE_PARA_ULSPACE );
++
+ aItems.ClearItem( EE_CHAR_FONTHEIGHT );
+ aItems.ClearItem( EE_CHAR_FONTINFO );
+ aItems.ClearItem( EE_CHAR_WEIGHT );
+
++ aItems.ClearItem( EE_CHAR_FONTHEIGHT_CJK );
++ aItems.ClearItem( EE_CHAR_FONTINFO_CJK );
++ aItems.ClearItem( EE_CHAR_WEIGHT_CJK );
++
++ aItems.ClearItem( EE_CHAR_FONTHEIGHT_CTL );
++ aItems.ClearItem( EE_CHAR_FONTINFO_CTL );
++ aItems.ClearItem( EE_CHAR_WEIGHT_CTL );
++
+ // Fett in den ersten 3 Headings
+ if ( ( nHLevel >= 1 ) && ( nHLevel <= 3 ) )
+ {
+ SvxWeightItem aWeightItem( WEIGHT_BOLD, EE_CHAR_WEIGHT );
+ aItems.Put( aWeightItem );
++
++ SvxWeightItem aWeightItemCJK( WEIGHT_BOLD, EE_CHAR_WEIGHT_CJK );
++ aItems.Put( aWeightItem );
++
++ SvxWeightItem aWeightItemCTL( WEIGHT_BOLD, EE_CHAR_WEIGHT_CTL );
++ aItems.Put( aWeightItem );
+ }
+
+ // Fonthoehe und Abstaende, wenn LogicToLogic moeglich:
+@@ -660,9 +675,16 @@
+ nPoints = 11;
+
+ nPoints = OutputDevice::LogicToLogic( nPoints, MAP_POINT, eUnit );
++
+ SvxFontHeightItem aHeightItem( nPoints, 100, EE_CHAR_FONTHEIGHT );
+ aItems.Put( aHeightItem );
+
++ SvxFontHeightItem aHeightItemCJK( nPoints, 100, EE_CHAR_FONTHEIGHT_CJK );
++ aItems.Put( aHeightItemCJK );
++
++ SvxFontHeightItem aHeightItemCTL( nPoints, 100, EE_CHAR_FONTHEIGHT_CTL );
++ aItems.Put( aHeightItemCTL );
++
+ // Absatzabstaende, wenn Heading:
+ if ( !nHLevel || ((nHLevel >= 1) && (nHLevel <= 6)) )
+ {
+@@ -679,6 +701,12 @@
+ Font aFont = OutputDevice::GetDefaultFont( DEFAULTFONT_FIXED, LANGUAGE_SYSTEM, 0 );
+ SvxFontItem aFontItem( aFont.GetFamily(), aFont.GetName(), XubString(), aFont.GetPitch(), aFont.GetCharSet(), EE_CHAR_FONTINFO );
+ aItems.Put( aFontItem );
++
++ SvxFontItem aFontItemCJK( aFont.GetFamily(), aFont.GetName(), XubString(), aFont.GetPitch(), aFont.GetCharSet(), EE_CHAR_FONTINFO_CJK );
++ aItems.Put( aFontItemCJK );
++
++ SvxFontItem aFontItemCTL( aFont.GetFamily(), aFont.GetName(), XubString(), aFont.GetPitch(), aFont.GetCharSet(), EE_CHAR_FONTINFO_CTL );
++ aItems.Put( aFontItemCTL );
+ }
+
+ pImpEditEngine->SetParaAttribs( nNode, aItems );
diff --git a/redhat-agreement.xsl b/redhat-agreement.xsl
new file mode 100644
index 0000000..76e96a4
--- /dev/null
+++ b/redhat-agreement.xsl
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/sources b/sources
index e69de29..148d246 100644
--- a/sources
+++ b/sources
@@ -0,0 +1,30 @@
+18f577b374d60b3c760a3a3350407632 18f577b374d60b3c760a3a3350407632-STLport-4.5.tar.gz
+1f24ab1d39f4a51faf22244c94a6203f 1f24ab1d39f4a51faf22244c94a6203f-xmlsec1-1.2.14.tar.gz
+35c94d2df8893241173de1d16b6034c0 35c94d2df8893241173de1d16b6034c0-swingExSrc.zip
+798b2ffdc8bcfe7bca2cf92b62caf685 798b2ffdc8bcfe7bca2cf92b62caf685-rhino1_5R5.zip
+a7983f859eafb2677d7ff386a023bc40 a7983f859eafb2677d7ff386a023bc40-xsltml_2.1.2.zip
+8c994b7e7873b30d70dccc3918cdfbc0 acor_lt.zip
+ada24d37d8d638b3d8a9985e80bc2978 ada24d37d8d638b3d8a9985e80bc2978-source-9.0.0.7-bj.zip
+fdb27bfe2dbe2e7b57ae194d9bf36bab fdb27bfe2dbe2e7b57ae194d9bf36bab-SampleICC-1.3.2.tar.gz
+5340511b6bc2043f642be4ee1e8bf3a7 libreoffice-artwork-3.2.99.1.tar.bz2
+6ef55d438e487e243f96e5c7ce3fe6ec libreoffice-base-3.2.99.1.tar.bz2
+57b68ba83440a900533b40063191cfa5 libreoffice-bootstrap-3.2.99.1.tar.bz2
+daa04e0294bee6c285f004896aa609c8 libreoffice-calc-3.2.99.1.tar.bz2
+8a9393624078d473ac4480cb6b549c20 libreoffice-components-3.2.99.1.tar.bz2
+271da86a068de92d57e4f9c65d512cc5 libreoffice-extensions-3.2.99.1.tar.bz2
+436f19879bd561eef407ce74a3e9f18e libreoffice-extras-3.2.99.1.tar.bz2
+42332f99506dff9780ebcd5d65b60034 libreoffice-filters-3.2.99.1.tar.bz2
+fe17733e7afa553d25b57fb9c7dcfa2c libreoffice-help-3.2.99.1.tar.bz2
+d6dc499bc930629304b1aa3abdfada76 libreoffice-impress-3.2.99.1.tar.bz2
+921f6e161f33b66fbc7c550bfeb74e6f libreoffice-l10n-3.2.99.1.tar.bz2
+9c5bdbb9aac46518aeb033e3a63184e2 libreoffice-libs-core-3.2.99.1.tar.bz2
+5299b08196e521e1fcd4f7665ab0aea9 libreoffice-libs-extern-3.2.99.1.tar.bz2
+d9d45344146d591c51f944fcdc62ee6c libreoffice-libs-extern-sys-3.2.99.1.tar.bz2
+f8638cdfbd58b2a367cf3fe70b4b0c44 libreoffice-libs-gui-3.2.99.1.tar.bz2
+9df015c8299af8bf8b88d5b6288fd6fa libreoffice-postprocess-3.2.99.1.tar.bz2
+acbc48dba8bff10b1b5cf46f57597549 libreoffice-sdk-3.2.99.1.tar.bz2
+2cf115243dcfa686868e49927437d61f libreoffice-testing-3.2.99.1.tar.bz2
+310bf13fb37477cb0b533e92596c4c23 libreoffice-ure-3.2.99.1.tar.bz2
+1fb344dd20334f42d7632e2f76ffb54c libreoffice-writer-3.2.99.1.tar.bz2
+7d38610a11453ee5d12aefe7abda7e91 redhat-langpacks.tar.gz
+f7d976ca8f993913c7b20d88f9961082 redhat-registry.tar.gz
diff --git a/unowinreg.dll b/unowinreg.dll
new file mode 100644
index 0000000..d78bb55
Binary files /dev/null and b/unowinreg.dll differ
diff --git a/workspace.cmcfixes77.patch b/workspace.cmcfixes77.patch
new file mode 100644
index 0000000..abac5d9
--- /dev/null
+++ b/workspace.cmcfixes77.patch
@@ -0,0 +1,1378 @@
+diff -r 85e7cfbbb08a configure.in
+--- a/configure.in Tue Jun 29 15:31:44 2010 +0200
++++ b/configure.in Tue Jul 20 09:57:11 2010 +0100
+@@ -546,6 +546,12 @@
+ AC_ARG_WITH(system-lpsolve,
+ [ --with-system-lpsolve Use lpsolve already on system
+ ],,)
++AC_ARG_WITH(system-libtextcat,
++[ --with-system-libtextcat Use libtextcat already on system
++],,)
++AC_ARG_WITH(system-libtextcat-data,
++[ --with-system-libtextcat-data Use libtextcat data already on system
++],,)
+ AC_ARG_WITH(system-cppunit,
+ [ --with-system-cppunit Use cppunit already on system
+ ],,)
+@@ -5142,6 +5148,38 @@
+ fi
+ AC_SUBST(SYSTEM_LPSOLVE)
+
++dnl ===================================================================
++dnl Checking for libtextcat
++dnl ===================================================================
++AC_MSG_CHECKING([which libtextcat to use])
++if test -n "$with_system_libtextcat" && test "$with_system_libtextcat" != "no"; then
++ AC_MSG_RESULT([external])
++ SYSTEM_LIBTEXTCAT=YES
++ AC_CHECK_HEADER(libtextcat/textcat.h, [],
++ [ AC_MSG_ERROR(libtextcat headers not found.)], [])
++ AC_CHECK_LIB(textcat, special_textcat_Init, ,
++ [ AC_MSG_ERROR(libtextcat library not found or not suitable. libtextcat typically needs to be patched)], [])
++else
++ AC_MSG_RESULT([internal])
++ SYSTEM_LIBTEXTCAT=NO
++ BUILD_TYPE="$BUILD_TYPE LIBTEXTCAT"
++fi
++AC_SUBST(SYSTEM_LIBTEXTCAT)
++
++AC_MSG_CHECKING([which libtextcat data directory to use])
++if test -n "$with_system_libtextcat_data" && test "$with_system_libtextcat_data" != "no"; then
++ if test "$with_system_libtextcat_data" = "yes"; then
++ SYSTEM_LIBTEXTCAT_DATA=file:///usr/share/libtextcat
++ else
++ SYSTEM_LIBTEXTCAT_DATA=file://$with_system_libtextcat_data
++ fi
++ AC_MSG_RESULT([$SYSTEM_LIBTEXTCAT_DATA])
++else
++ AC_MSG_RESULT([internal])
++ BUILD_TYPE="$BUILD_TYPE LIBTEXTCATDATA"
++fi
++AC_SUBST(SYSTEM_LIBTEXTCAT_DATA)
++
+ dnl ***************************************
+ dnl testing libc version for Linux...
+ dnl ***************************************
+@@ -6504,6 +6542,7 @@
+ AC_MSG_CHECKING([whether to include AFMs])
+ if test "$with_afms" != "no"; then
+ AC_MSG_RESULT([yes])
++ BUILD_TYPE="$BUILD_TYPE AFMS"
+ else
+ AC_MSG_RESULT([no])
+ WITHOUT_AFMS=YES
+diff -r 85e7cfbbb08a libtextcat/makefile.mk
+--- a/libtextcat/makefile.mk Tue Jun 29 15:31:44 2010 +0200
++++ b/libtextcat/makefile.mk Tue Jul 20 09:57:11 2010 +0100
+@@ -30,6 +30,12 @@
+ PRJNAME=libtextcat
+ TARGET=libtextcat
+
++.IF "$(SYSTEM_LIBTEXTCAT)" == "YES"
++all:
++ @echo "An already available installation of libtextcat should exist on your system."
++ @echo "Therefore the version provided here does not need to be built in addition."
++.ENDIF
++
+ # --- Settings -----------------------------------------------------
+
+ .INCLUDE : settings.mk
+diff -r 85e7cfbbb08a lingucomponent/prj/build.lst
+--- a/lingucomponent/prj/build.lst Tue Jun 29 15:31:44 2010 +0200
++++ b/lingucomponent/prj/build.lst Tue Jul 20 09:57:11 2010 +0100
+@@ -1,4 +1,4 @@
+-lc lingucomponent : linguistic libtextcat svl HYPHEN:hyphen HUNSPELL:hunspell MYTHES:mythes NULL
++lc lingucomponent : linguistic LIBTEXTCAT:libtextcat LIBTEXTCATDATA:libtextcat svl HYPHEN:hyphen HUNSPELL:hunspell MYTHES:mythes NULL
+ lc lingucomponent usr1 - all lc_mkout NULL
+ lc lingucomponent\inc nmake - all lc_inc NULL
+ lc lingucomponent\source\lingutil nmake - all lc_util lc_inc NULL
+diff -r 85e7cfbbb08a officecfg/registry/data/org/openoffice/Office/Paths.xcu
+--- a/officecfg/registry/data/org/openoffice/Office/Paths.xcu Tue Jun 29 15:31:44 2010 +0200
++++ b/officecfg/registry/data/org/openoffice/Office/Paths.xcu Tue Jul 20 09:57:11 2010 +0100
+@@ -169,7 +169,8 @@
+
+
+
+-
++
++
+
+
+
+diff -r 85e7cfbbb08a officecfg/registry/data/org/openoffice/Office/makefile.mk
+--- a/officecfg/registry/data/org/openoffice/Office/makefile.mk Tue Jun 29 15:31:44 2010 +0200
++++ b/officecfg/registry/data/org/openoffice/Office/makefile.mk Tue Jul 20 09:57:11 2010 +0100
+@@ -87,6 +87,8 @@
+ Paths-macosx.xcu \
+ Paths-unxwnt.xcu \
+ Paths-unixdesktop.xcu \
++ Paths-internallibtextcatdata.xcu \
++ Paths-externallibtextcatdata.xcu \
+ Writer-cjk.xcu \
+ Impress-ogltrans.xcu \
+ Embedding-calc.xcu \
+diff -r 85e7cfbbb08a postprocess/packregistry/makefile.mk
+--- a/postprocess/packregistry/makefile.mk Tue Jun 29 15:31:44 2010 +0200
++++ b/postprocess/packregistry/makefile.mk Tue Jul 20 09:57:11 2010 +0100
+@@ -343,6 +343,11 @@
+ MY_FILES_main += $(MY_MOD)/DataAccess/mozab2.xcu
+ .END
+ .END
++.IF "$(SYSTEM_LIBTEXTCAT_DATA)" != ""
++MY_FILES_main += $(MY_MOD)/org/openoffice/Office/Paths-externallibtextcatdata.xcu
++.ELSE
++MY_FILES_main += $(MY_MOD)/org/openoffice/Office/Paths-internallibtextcatdata.xcu
++.END
+
+ MY_DEPS_math = main
+ MY_FILES_math = \
+diff -r 85e7cfbbb08a psprint_config/prj/build.lst
+--- a/psprint_config/prj/build.lst Tue Jun 29 15:31:44 2010 +0200
++++ b/psprint_config/prj/build.lst Tue Jul 20 09:57:11 2010 +0100
+@@ -1,4 +1,4 @@
+-pc psprint_config : soltools afms NULL
++pc psprint_config : soltools AFMS:afms NULL
+ pc psprint_config usr1 - all pc_mkout NULL
+ pc psprint_config\configuration nmake - u pc_conf NULL
+ pc psprint_config\configuration\ppds nmake - u pc_ppds NULL
+diff -r 85e7cfbbb08a scp2/source/ooo/file_library_ooo.scp
+--- a/scp2/source/ooo/file_library_ooo.scp Tue Jun 29 15:31:44 2010 +0200
++++ b/scp2/source/ooo/file_library_ooo.scp Tue Jul 20 09:57:11 2010 +0100
+@@ -1669,6 +1669,7 @@
+ #endif
+ End
+
++#ifndef SYSTEM_LIBTEXTCAT
+ File gid_File_Lib_Libtextcat
+ TXT_FILE_BODY;
+ Styles = (PACKED);
+@@ -1679,6 +1680,7 @@
+ Name = "libtextcat.dll";
+ #endif
+ End
++#endif
+
+ STD_UNO_LIB_FILE( gid_File_Lib_Guesslang, guesslang )
+
+diff -r 85e7cfbbb08a scp2/source/ooo/file_ooo.scp
+--- a/scp2/source/ooo/file_ooo.scp Tue Jun 29 15:31:44 2010 +0200
++++ b/scp2/source/ooo/file_ooo.scp Tue Jul 20 09:57:11 2010 +0100
+@@ -523,6 +523,7 @@
+ #endif
+ #endif
+
++#ifndef SYSTEM_LIBTEXTCAT_DATA
+ // fingerprint files (lm)
+
+ File gid_File_Conf_Fpdb
+@@ -1036,7 +1037,7 @@
+ Dir = gid_Dir_Share_Fingerprint;
+ Styles = (PACKED);
+ End
+-
++#endif
+
+
+ // mod files
+diff -r 85e7cfbbb08a scp2/source/ooo/makefile.mk
+--- a/scp2/source/ooo/makefile.mk Tue Jun 29 15:31:44 2010 +0200
++++ b/scp2/source/ooo/makefile.mk Tue Jul 20 09:57:11 2010 +0100
+@@ -233,6 +233,14 @@
+ SCPDEFS+=-DSYSTEM_PYTHON
+ .ENDIF
+
++.IF "$(SYSTEM_LIBTEXTCAT)" == "YES"
++SCPDEFS+=-DSYSTEM_LIBTEXTCAT
++.ENDIF
++
++.IF "$(SYSTEM_LIBTEXTCAT_DATA)" != ""
++SCPDEFS+=-DSYSTEM_LIBTEXTCAT_DATA
++.ENDIF
++
+ .IF "$(ENABLE_SVCTAGS)" == "YES"
+ SCPDEFS+=-DENABLE_SVCTAGS
+ .ENDIF
+diff -r 85e7cfbbb08a set_soenv.in
+--- a/set_soenv.in Tue Jun 29 15:31:44 2010 +0200
++++ b/set_soenv.in Tue Jul 20 09:57:11 2010 +0100
+@@ -1926,6 +1926,8 @@
+ ToFile( "SYSTEM_MYTHES", "@SYSTEM_MYTHES@", "e" );
+ ToFile( "MYTHES_CFLAGS", "@MYTHES_CFLAGS@", "e" );
+ ToFile( "MYTHES_LIBS", "@MYTHES_LIBS@", "e" );
++ToFile( "SYSTEM_LIBTEXTCAT", "@SYSTEM_LIBTEXTCAT@","e" );
++ToFile( "SYSTEM_LIBTEXTCAT_DATA","@SYSTEM_LIBTEXTCAT_DATA@","e" );
+ ToFile( "PAM", "@PAM@", "e" );
+ ToFile( "NEW_SHADOW_API", "@NEW_SHADOW_API@", "e" );
+ ToFile( "PAM_LINK", "@PAM_LINK@", "e" );
+diff -r 85e7cfbbb08a solenv/bin/modules/installer/ziplist.pm
+--- a/solenv/bin/modules/installer/ziplist.pm Tue Jun 29 15:31:44 2010 +0200
++++ b/solenv/bin/modules/installer/ziplist.pm Tue Jul 20 09:57:11 2010 +0100
+@@ -806,6 +806,7 @@
+ $variableshashref->{'PRODUCTMINOR'} = $localminor;
+
+ $variableshashref->{'PRODUCTBUILDID'} = $installer::globals::buildid;
++ $variableshashref->{'SYSTEM_LIBTEXTCAT_DATA'} = $ENV{'SYSTEM_LIBTEXTCAT_DATA'} , if( defined $ENV{'SYSTEM_LIBTEXTCAT_DATA'} && $ENV{'SYSTEM_LIBTEXTCAT_DATA'} ne "" );
+ }
+
+ 1;
+diff -r 85e7cfbbb08a solenv/config/sooo330.ini
+--- a/solenv/config/sooo330.ini Tue Jun 29 15:31:44 2010 +0200
++++ b/solenv/config/sooo330.ini Tue Jul 20 09:57:11 2010 +0100
+@@ -9,7 +9,7 @@
+ BMP_WRITES_FLAG TRUE
+ BUILD_SPECIAL TRUE
+ BUILD_STAX YES
+- BUILD_TYPE SO OOo EXT BINFILTER MORE_FONTS BSH CURL DICTIONARIES HSQLDB HUNSPELL HYPHEN MYTHES JPEG LIBXML2 LIBXMLSEC LPSOLVE MOZ NEON TWAIN PYTHON ZLIB SANE UNIXODBC X11_EXTENSIONS LIBWPD EPM ODK MSFONTEXTRACT MATHMLDTD BOOST MDDS EXPAT CRASHREP BERKELEYDB LIBXSLT SUN AGG GTK ICU SYSTRAY_GTK JAVAINSTALLER2 VIGRA OPENSSL JFREEREPORT APACHE_COMMONS TOMCAT REPORTBUILDER SDEXT SWEXT XPDF LUCENE REDLAND SAXON WRITER2LATEX NSS L10N GRAPHITE MYSQLCPPCONN MYSQLC CPPUNIT
++ BUILD_TYPE SO OOo EXT BINFILTER MORE_FONTS BSH CURL DICTIONARIES HSQLDB HUNSPELL HYPHEN MYTHES JPEG LIBXML2 LIBXMLSEC LPSOLVE MOZ NEON TWAIN PYTHON ZLIB SANE UNIXODBC X11_EXTENSIONS LIBWPD EPM ODK MSFONTEXTRACT MATHMLDTD BOOST MDDS EXPAT CRASHREP BERKELEYDB LIBXSLT SUN AGG GTK ICU SYSTRAY_GTK JAVAINSTALLER2 VIGRA OPENSSL JFREEREPORT APACHE_COMMONS TOMCAT REPORTBUILDER SDEXT SWEXT XPDF LUCENE REDLAND SAXON WRITER2LATEX NSS L10N GRAPHITE MYSQLCPPCONN MYSQLC CPPUNIT LIBTEXTCAT LIBTEXTCATDATA AFMS
+ common_build TRUE
+ COMMON_OUTDIR common
+ CONFIG_PROJECT config_office
+--- a/configure.in 2010-07-07 12:32:33.000000000 +0100
++++ b/configure.in 2010-07-07 12:33:27.000000000 +0100
+@@ -3853,7 +3856,11 @@
+ [
+ AC_CHECK_FILE(/usr/share/java/lucene-core.jar,
+ [ LUCENE_CORE_JAR=/usr/share/java/lucene-core.jar ],
+- [ AC_MSG_ERROR(lucene-core.jar replacement not found)]
++ [ AC_CHECK_FILE(/usr/share/java/lucene.jar,
++ [ LUCENE_CORE_JAR=/usr/share/java/lucene.jar ],
++ [ AC_MSG_ERROR(lucene-core.jar replacement not found)]
++ )
++ ]
+ )
+ ]
+ )
+@@ -3876,22 +3883,6 @@
+ AC_CHECK_FILE($LUCENE_CORE_JAR, [],
+ [ AC_MSG_ERROR(lucene-analyzers.jar not found.)], [])
+ fi
+- AC_MSG_CHECKING([whether lucene is version 2.x])
+- export LUCENE_CORE_JAR
+- if $PERL -e 'use Archive::Zip;
+- my $file = "$ENV{'LUCENE_CORE_JAR'}";
+- my $zip = Archive::Zip->new( $file );
+- my $mf = $zip->contents ( "META-INF/MANIFEST.MF" );
+- if ( $mf =~ m/Specification-Version: 2.*/ ) {
+- exit 0;
+- } else {
+- exit 1;
+- }'; then
+- AC_MSG_RESULT([yes])
+- else
+- AC_MSG_ERROR([no, you need lucene 2])
+- fi
+-
+ else
+ AC_MSG_RESULT([internal])
+ SYSTEM_LUCENE=NO
+--- a/svtools/source/config/menuoptions.cxx 2010-07-30 12:52:42.000000000 +0100
++++ b/svtools/source/config/menuoptions.cxx 2010-07-30 12:52:53.000000000 +0100
+@@ -245,8 +245,15 @@
+ // Follow assignment use order of values in relation to our list of key names!
+ DBG_ASSERT( !(seqNames.getLength()!=seqValues.getLength()), "SvtMenuOptions_Impl::SvtMenuOptions_Impl()\nI miss some values of configuration keys!\n" );
+
+- sal_Bool bMenuIcons = true;
+- sal_Bool bSystemMenuIcons = true;
++ sal_Bool bMenuIcons = sal_True;
++ sal_Bool bSystemMenuIcons = sal_True;
++ if (m_nMenuIcons == 2)
++ bMenuIcons = (sal_Bool)(Application::GetSettings().GetStyleSettings().GetUseImagesInMenus());
++ else
++ {
++ bSystemMenuIcons = sal_False;
++ bMenuIcons = m_nMenuIcons ? sal_True : sal_False;
++ }
+
+ // Copy values from list in right order to ouer internal member.
+ sal_Int32 nPropertyCount = seqValues.getLength() ;
+diff -r a1a3b75faa8a basebmp/test/basictest.cxx
+--- a/basebmp/test/basictest.cxx Fri Jul 30 12:58:40 2010 +0100
++++ b/basebmp/test/basictest.cxx Fri Jul 30 13:40:34 2010 +0100
+@@ -27,10 +27,12 @@
+
+ // autogenerated file with codegen.pl
+
++#include "preextstl.h"
+ #include "cppunit/TestAssert.h"
+ #include "cppunit/TestFixture.h"
+ #include "cppunit/extensions/HelperMacros.h"
+ #include "cppunit/plugin/TestPlugIn.h"
++#include "postextstl.h"
+
+ #include
+ #include
+diff -r a1a3b75faa8a basebmp/test/bmpmasktest.cxx
+--- a/basebmp/test/bmpmasktest.cxx Fri Jul 30 12:58:40 2010 +0100
++++ b/basebmp/test/bmpmasktest.cxx Fri Jul 30 13:40:34 2010 +0100
+@@ -27,9 +27,11 @@
+
+ // autogenerated file with codegen.pl
+
++#include "preextstl.h"
+ #include "cppunit/TestAssert.h"
+ #include "cppunit/TestFixture.h"
+ #include "cppunit/extensions/HelperMacros.h"
++#include "postextstl.h"
+
+ #include
+ #include
+diff -r a1a3b75faa8a basebmp/test/bmptest.cxx
+--- a/basebmp/test/bmptest.cxx Fri Jul 30 12:58:40 2010 +0100
++++ b/basebmp/test/bmptest.cxx Fri Jul 30 13:40:34 2010 +0100
+@@ -27,9 +27,11 @@
+
+ // autogenerated file with codegen.pl
+
++#include "preextstl.h"
+ #include "cppunit/TestAssert.h"
+ #include "cppunit/TestFixture.h"
+ #include "cppunit/extensions/HelperMacros.h"
++#include "postextstl.h"
+
+ #include
+ #include
+diff -r a1a3b75faa8a basebmp/test/cliptest.cxx
+--- a/basebmp/test/cliptest.cxx Fri Jul 30 12:58:40 2010 +0100
++++ b/basebmp/test/cliptest.cxx Fri Jul 30 13:40:34 2010 +0100
+@@ -27,9 +27,11 @@
+
+ // autogenerated file with codegen.pl
+
++#include "preextstl.h"
+ #include "cppunit/TestAssert.h"
+ #include "cppunit/TestFixture.h"
+ #include "cppunit/extensions/HelperMacros.h"
++#include "postextstl.h"
+
+ #include
+ #include
+diff -r a1a3b75faa8a basebmp/test/filltest.cxx
+--- a/basebmp/test/filltest.cxx Fri Jul 30 12:58:40 2010 +0100
++++ b/basebmp/test/filltest.cxx Fri Jul 30 13:40:34 2010 +0100
+@@ -27,9 +27,11 @@
+
+ // autogenerated file with codegen.pl
+
++#include "preextstl.h"
+ #include "cppunit/TestAssert.h"
+ #include "cppunit/TestFixture.h"
+ #include "cppunit/extensions/HelperMacros.h"
++#include "postextstl.h"
+
+ #include
+ #include
+diff -r a1a3b75faa8a basebmp/test/linetest.cxx
+--- a/basebmp/test/linetest.cxx Fri Jul 30 12:58:40 2010 +0100
++++ b/basebmp/test/linetest.cxx Fri Jul 30 13:40:34 2010 +0100
+@@ -27,9 +27,11 @@
+
+ // autogenerated file with codegen.pl
+
++#include "preextstl.h"
+ #include "cppunit/TestAssert.h"
+ #include "cppunit/TestFixture.h"
+ #include "cppunit/extensions/HelperMacros.h"
++#include "postextstl.h"
+
+ #include
+ #include
+diff -r a1a3b75faa8a basebmp/test/makefile.mk
+--- a/basebmp/test/makefile.mk Fri Jul 30 12:58:40 2010 +0100
++++ b/basebmp/test/makefile.mk Fri Jul 30 13:40:34 2010 +0100
+@@ -60,6 +60,13 @@
+ .ENDIF
+ .ENDIF
+
++#building with stlport, but cppunit was not built with stlport
++.IF "$(USE_SYSTEM_STL)"!="YES"
++.IF "$(SYSTEM_CPPUNIT)"=="YES"
++CFLAGSCXX+=-DADAPT_EXT_STL
++.ENDIF
++.ENDIF
++
+ CFLAGSCXX += $(CPPUNIT_CFLAGS)
+
+ # --- Common ----------------------------------------------------------
+diff -r a1a3b75faa8a basebmp/test/masktest.cxx
+--- a/basebmp/test/masktest.cxx Fri Jul 30 12:58:40 2010 +0100
++++ b/basebmp/test/masktest.cxx Fri Jul 30 13:40:34 2010 +0100
+@@ -27,9 +27,11 @@
+
+ // autogenerated file with codegen.pl
+
++#include "preextstl.h"
+ #include "cppunit/TestAssert.h"
+ #include "cppunit/TestFixture.h"
+ #include "cppunit/extensions/HelperMacros.h"
++#include "postextstl.h"
+
+ #include
+ #include
+diff -r a1a3b75faa8a basebmp/test/polytest.cxx
+--- a/basebmp/test/polytest.cxx Fri Jul 30 12:58:40 2010 +0100
++++ b/basebmp/test/polytest.cxx Fri Jul 30 13:40:34 2010 +0100
+@@ -27,9 +27,11 @@
+
+ // autogenerated file with codegen.pl
+
++#include "preextstl.h"
+ #include "cppunit/TestAssert.h"
+ #include "cppunit/TestFixture.h"
+ #include "cppunit/extensions/HelperMacros.h"
++#include "postextstl.h"
+
+ #include
+ #include
+diff -r a1a3b75faa8a basegfx/test/basegfx1d.cxx
+--- a/basegfx/test/basegfx1d.cxx Fri Jul 30 12:58:40 2010 +0100
++++ b/basegfx/test/basegfx1d.cxx Fri Jul 30 13:40:34 2010 +0100
+@@ -30,10 +30,12 @@
+ #include "precompiled_basegfx.hxx"
+ // autogenerated file with codegen.pl
+
++#include "preextstl.h"
+ #include "cppunit/TestAssert.h"
+ #include "cppunit/TestFixture.h"
+ #include "cppunit/extensions/HelperMacros.h"
+ #include "cppunit/plugin/TestPlugIn.h"
++#include "postextstl.h"
+
+ namespace basegfx1d
+ {
+diff -r a1a3b75faa8a basegfx/test/basegfx2d.cxx
+--- a/basegfx/test/basegfx2d.cxx Fri Jul 30 12:58:40 2010 +0100
++++ b/basegfx/test/basegfx2d.cxx Fri Jul 30 13:40:34 2010 +0100
+@@ -30,9 +30,11 @@
+ #include "precompiled_basegfx.hxx"
+ // autogenerated file with codegen.pl
+
++#include "preextstl.h"
+ #include "cppunit/TestAssert.h"
+ #include "cppunit/TestFixture.h"
+ #include "cppunit/extensions/HelperMacros.h"
++#include "postextstl.h"
+
+ #include
+ #include
+diff -r a1a3b75faa8a basegfx/test/basegfx3d.cxx
+--- a/basegfx/test/basegfx3d.cxx Fri Jul 30 12:58:40 2010 +0100
++++ b/basegfx/test/basegfx3d.cxx Fri Jul 30 13:40:34 2010 +0100
+@@ -30,9 +30,11 @@
+ #include "precompiled_basegfx.hxx"
+ // autogenerated file with codegen.pl
+
++#include "preextstl.h"
+ #include "cppunit/TestAssert.h"
+ #include "cppunit/TestFixture.h"
+ #include "cppunit/extensions/HelperMacros.h"
++#include "postextstl.h"
+
+ namespace basegfx3d
+ {
+diff -r a1a3b75faa8a basegfx/test/basegfxtools.cxx
+--- a/basegfx/test/basegfxtools.cxx Fri Jul 30 12:58:40 2010 +0100
++++ b/basegfx/test/basegfxtools.cxx Fri Jul 30 13:40:34 2010 +0100
+@@ -30,9 +30,11 @@
+ #include "precompiled_basegfx.hxx"
+ // autogenerated file with codegen.pl
+
++#include "preextstl.h"
+ #include "cppunit/TestAssert.h"
+ #include "cppunit/TestFixture.h"
+ #include "cppunit/extensions/HelperMacros.h"
++#include "postextstl.h"
+
+ #include
+ #include
+diff -r a1a3b75faa8a basegfx/test/boxclipper.cxx
+--- a/basegfx/test/boxclipper.cxx Fri Jul 30 12:58:40 2010 +0100
++++ b/basegfx/test/boxclipper.cxx Fri Jul 30 13:40:34 2010 +0100
+@@ -30,9 +30,11 @@
+ #include "precompiled_basegfx.hxx"
+ // autogenerated file with codegen.pl
+
++#include "preextstl.h"
+ #include "cppunit/TestAssert.h"
+ #include "cppunit/TestFixture.h"
+ #include "cppunit/extensions/HelperMacros.h"
++#include "postextstl.h"
+
+ #include
+ #include
+diff -r a1a3b75faa8a basegfx/test/clipstate.cxx
+--- a/basegfx/test/clipstate.cxx Fri Jul 30 12:58:40 2010 +0100
++++ b/basegfx/test/clipstate.cxx Fri Jul 30 13:40:34 2010 +0100
+@@ -30,9 +30,11 @@
+ #include "precompiled_basegfx.hxx"
+ // autogenerated file with codegen.pl
+
++#include "preextstl.h"
+ #include "cppunit/TestAssert.h"
+ #include "cppunit/TestFixture.h"
+ #include "cppunit/extensions/HelperMacros.h"
++#include "postextstl.h"
+
+ #include
+ #include
+diff -r a1a3b75faa8a basegfx/test/genericclipper.cxx
+--- a/basegfx/test/genericclipper.cxx Fri Jul 30 12:58:40 2010 +0100
++++ b/basegfx/test/genericclipper.cxx Fri Jul 30 13:40:34 2010 +0100
+@@ -30,9 +30,11 @@
+ #include "precompiled_basegfx.hxx"
+ // autogenerated file with codegen.pl
+
++#include "preextstl.h"
+ #include "cppunit/TestAssert.h"
+ #include "cppunit/TestFixture.h"
+ #include "cppunit/extensions/HelperMacros.h"
++#include "postextstl.h"
+
+ #include
+ #include
+diff -r a1a3b75faa8a basegfx/test/makefile.mk
+--- a/basegfx/test/makefile.mk Fri Jul 30 12:58:40 2010 +0100
++++ b/basegfx/test/makefile.mk Fri Jul 30 13:40:34 2010 +0100
+@@ -36,6 +36,13 @@
+
+ .INCLUDE : settings.mk
+
++#building with stlport, but cppunit was not built with stlport
++.IF "$(USE_SYSTEM_STL)"!="YES"
++.IF "$(SYSTEM_CPPUNIT)"=="YES"
++CFLAGSCXX+=-DADAPT_EXT_STL
++.ENDIF
++.ENDIF
++
+ CFLAGSCXX += $(CPPUNIT_CFLAGS)
+
+ # --- Common ----------------------------------------------------------
+diff -r a1a3b75faa8a configure.in
+--- a/configure.in Fri Jul 30 12:58:40 2010 +0100
++++ b/configure.in Fri Jul 30 13:40:34 2010 +0100
+@@ -3613,12 +3613,6 @@
+ # a system-cppunit before the first version using a proper cppunit
+ # (and that being 1.12.1) anyway
+ PKG_CHECK_MODULES( CPPUNIT, cppunit >= 1.12.1 )
+- AC_MSG_CHECKING([STL compatibility])
+- if test "$WITH_STLPORT" != "no"; then
+- AC_MSG_ERROR([to use system cppunit you need to use --without-stlport])
+- else
+- AC_MSG_RESULT([OK])
+- fi
+ else
+ AC_MSG_RESULT([internal])
+ SYSTEM_CPPUNIT=NO
+diff -r a1a3b75faa8a mysqlc/source/mysqlc_connection.cxx
+--- a/mysqlc/source/mysqlc_connection.cxx Fri Jul 30 12:58:40 2010 +0100
++++ b/mysqlc/source/mysqlc_connection.cxx Fri Jul 30 13:40:34 2010 +0100
+@@ -35,13 +35,13 @@
+ #include "mysqlc_preparedstatement.hxx"
+ #include "mysqlc_general.hxx"
+
+-#include
++#include
+ #include
+ #include
+ #include
+ #include
+ #include
+-#include
++#include
+
+ #include
+ #include
+diff -r a1a3b75faa8a mysqlc/source/mysqlc_connection.hxx
+--- a/mysqlc/source/mysqlc_connection.hxx Fri Jul 30 12:58:40 2010 +0100
++++ b/mysqlc/source/mysqlc_connection.hxx Fri Jul 30 13:40:34 2010 +0100
+@@ -46,9 +46,9 @@
+ #include
+ #include
+
+-#include
++#include
+ #include
+-#include
++#include
+ #include
+ #include
+ #include
+diff -r a1a3b75faa8a mysqlc/source/mysqlc_databasemetadata.cxx
+--- a/mysqlc/source/mysqlc_databasemetadata.cxx Fri Jul 30 12:58:40 2010 +0100
++++ b/mysqlc/source/mysqlc_databasemetadata.cxx Fri Jul 30 13:40:34 2010 +0100
+@@ -54,13 +54,13 @@
+ using ::rtl::OUString;
+ using mysqlc_sdbc_driver::getStringFromAny;
+
+-#include
++#include
+ #include
+ #include
+ #include
+ #include
+ #include
+-#include
++#include
+
+ static ext_std::string wild("%");
+
+diff -r a1a3b75faa8a mysqlc/source/mysqlc_databasemetadata.hxx
+--- a/mysqlc/source/mysqlc_databasemetadata.hxx Fri Jul 30 12:58:40 2010 +0100
++++ b/mysqlc/source/mysqlc_databasemetadata.hxx Fri Jul 30 13:40:34 2010 +0100
+@@ -39,9 +39,9 @@
+ #include
+ #endif
+
+-#include
++#include
+ #include
+-#include
++#include
+
+ namespace connectivity
+ {
+diff -r a1a3b75faa8a mysqlc/source/mysqlc_driver.cxx
+--- a/mysqlc/source/mysqlc_driver.cxx Fri Jul 30 12:58:40 2010 +0100
++++ b/mysqlc/source/mysqlc_driver.cxx Fri Jul 30 13:40:34 2010 +0100
+@@ -38,13 +38,12 @@
+ using ::rtl::OUString;
+ #include
+
+-#include
++#include
+ #include
+-
+ #ifdef SYSTEM_MYSQL_CPPCONN
+ #include
+ #endif
+-#include
++#include
+
+
+ /* {{{ MysqlCDriver::MysqlCDriver() -I- */
+diff -r a1a3b75faa8a mysqlc/source/mysqlc_driver.hxx
+--- a/mysqlc/source/mysqlc_driver.hxx Fri Jul 30 12:58:40 2010 +0100
++++ b/mysqlc/source/mysqlc_driver.hxx Fri Jul 30 13:40:34 2010 +0100
+@@ -36,9 +36,9 @@
+ #include
+
+ #include
+-#include
++#include