summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobody <nobody@gnome.org>2005-10-25 13:01:52 +0000
committernobody <nobody@gnome.org>2005-10-25 13:01:52 +0000
commit0af03e74871c06e6e485ca44f213dba062993915 (patch)
tree8fae4f712ad13f294a5cc3e14a3e0659038bf65b
parent8d719efb6c7ef2bdd1b91f3c57d3f90e893e8a67 (diff)
This commit was manufactured by cvs2svn to create tagNOEL_BEFORE_NAMESPACE_CHANGES
'NOEL_BEFORE_NAMESPACE_CHANGES'.
-rw-r--r--HACKING8
-rw-r--r--MAINTAINERS2
-rw-r--r--Makefile.am29
-rw-r--r--TODO161
-rw-r--r--bonobo/.cvsignore25
-rw-r--r--bonobo/AUTHORS1
-rw-r--r--bonobo/COPYING8
-rw-r--r--bonobo/Makefile.am10
-rw-r--r--bonobo/NEWS0
-rw-r--r--bonobo/README17
-rwxr-xr-xbonobo/autogen.sh130
-rw-r--r--bonobo/configure.ac137
-rw-r--r--bonobo/data/.cvsignore8
-rw-r--r--bonobo/data/GNOME_OpenOfficeOrg.server.in.in62
-rw-r--r--bonobo/data/Makefile.am41
-rw-r--r--bonobo/data/ooo-bonobo-control-ui.xml72
-rw-r--r--bonobo/data/ooo-bonobo-uno-bootstraprc.in2
-rw-r--r--bonobo/data/ooo-bonobo.in4
-rw-r--r--bonobo/intltool-extract.in389
-rw-r--r--bonobo/intltool-merge.in908
-rw-r--r--bonobo/intltool-update.in642
-rwxr-xr-xbonobo/local-build.sh6
-rw-r--r--bonobo/po/.cvsignore6
-rw-r--r--bonobo/po/POTFILES.in3
-rw-r--r--bonobo/po/de.po162
-rw-r--r--bonobo/src/.cvsignore5
-rw-r--r--bonobo/src/Makefile.am31
-rw-r--r--bonobo/src/main.cxx62
-rw-r--r--bonobo/src/ooo-bonobo-control.cxx498
-rw-r--r--bonobo/src/ooo-bonobo-control.h33
-rw-r--r--bonobo/src/remote-uno-helper.cxx126
-rw-r--r--bonobo/src/remote-uno-helper.h9
-rw-r--r--bonobo/src/services.h21
-rw-r--r--bonobo/src/star-frame-widget.cxx256
-rw-r--r--bonobo/src/star-frame-widget.h51
-rw-r--r--bonobo/src/string-macros.h117
-rw-r--r--bonobo/src/test.cxx137
-rwxr-xr-xdownload.in153
-rw-r--r--etc/.cvsignore2
-rwxr-xr-xintltool-merge.in933
-rw-r--r--ooo1.1.spec.in193
-rw-r--r--patches/a11y/.cvsignore2
-rw-r--r--patches/a11y/Makefile.am1
-rw-r--r--patches/a11y/a11y-gtk-frame.diff136
-rw-r--r--patches/a11y/a11y-vcl-prj.diff37
-rw-r--r--patches/a11y/comphelper-a11y-fix.diff20
-rw-r--r--patches/a11y/vcl-unx-gtk-a11y-atkaction-cxx.diff97
-rw-r--r--patches/a11y/vcl-unx-gtk-a11y-atkcomponent-cxx.diff174
-rw-r--r--patches/a11y/vcl-unx-gtk-a11y-atkfactory-cxx.diff73
-rw-r--r--patches/a11y/vcl-unx-gtk-a11y-atklistener-cxx.diff188
-rw-r--r--patches/a11y/vcl-unx-gtk-a11y-atklistener-hxx.diff37
-rw-r--r--patches/a11y/vcl-unx-gtk-a11y-atktext-cxx.diff218
-rw-r--r--patches/a11y/vcl-unx-gtk-a11y-atkvalue-cxx.diff72
-rw-r--r--patches/a11y/vcl-unx-gtk-a11y-atkwrapper-cxx.diff595
-rw-r--r--patches/a11y/vcl-unx-gtk-a11y-atkwrapper-hxx.diff40
-rw-r--r--patches/a11y/vcl-unx-gtk-a11y-makefile-mk.diff111
-rw-r--r--patches/a11y/vcl-unx-gtk-a11y-todo.diff178
-rw-r--r--patches/a11y/vcl-unx-inc-plugins-gtk-atkfactory-hxx.diff11
-rw-r--r--patches/evo2/.cvsignore2
-rw-r--r--patches/evo2/Makefile.am1
-rw-r--r--patches/evo2/dbaccess-evo-changes.diff198
-rw-r--r--patches/evo2/default-evo-column-mapping.diff36
-rw-r--r--patches/evo2/evo-const-crash.diff124
63 files changed, 0 insertions, 7811 deletions
diff --git a/HACKING b/HACKING
deleted file mode 100644
index 722266980..000000000
--- a/HACKING
+++ /dev/null
@@ -1,8 +0,0 @@
-Please do not commit patches here, unless you have signed the JCA:
-
- http://www.openoffice.org/FAQs/faq-licensing.html#usinglicenses
-
-and intend to contribute the code to the OO.o mainline.
-
-These patches are merely in a holding / re-factoring pattern
-before they can be merged into OO.o.
diff --git a/MAINTAINERS b/MAINTAINERS
deleted file mode 100644
index 93c437bf9..000000000
--- a/MAINTAINERS
+++ /dev/null
@@ -1,2 +0,0 @@
-michael@ximian.com
-halls@debian.org
diff --git a/Makefile.am b/Makefile.am
deleted file mode 100644
index 0b0f92c10..000000000
--- a/Makefile.am
+++ /dev/null
@@ -1,29 +0,0 @@
-# if BONOBO
-# MAYBE_BONOBO = bonobo
-# endif
-
-SUBDIRS = po desktop distro-configs bin patches man doc fonts stamp src www $(MAYBE_BONOBO)
-
-include $(top_srcdir)/Makefile.shared
-
-EXTRA_DIST = \
- emacs.el \
- MAINTAINERS \
- HACKING \
- download.in \
- Makefile.shared \
- intltool-merge.in \
- intltool-update.in \
- intltool-extract.in \
- ChangeLog-to-1.3.0
-
-ACLOCAL_AMFLAGS = -I m4
-
-clean-local:
- test -z "$(OOBUILDDIR)" || rm -rf $(OOBUILDDIR)
- for icons in $(OOO_ICONS_VERS) ; do \
- test "$(BUILDDIR)/$$icons" = "/" || rm -rf "$(BUILDDIR)/$$icons" ; \
- done
-
-maintainer-clean-local:
- test -z "$(BUILDDIR)" || rm -rf $(BUILDDIR)
diff --git a/TODO b/TODO
deleted file mode 100644
index 7eec7f5cb..000000000
--- a/TODO
+++ /dev/null
@@ -1,161 +0,0 @@
-+ Tooling issues
- +
-
-
-+ Startup performance
- + OO.o icon cache: 5Mb small
- + open("/home/michael/.OpenOffice.org1.9.milestone/user/config/imagecache_gnome/res_commandimagelist_lc_114", O_RDONLY) = 27
- + should be able to work out of the .zip file
- + font cache trawling / build - highly slow
-+ Misc.
- + Win32
- + ODMA/Win32 bits - re-work & make them fly.
- + Win32 file-bug toolbar icon
- + should point at internal bugzilla.
- [ is there a canonical way to refer to bug
- filing etc. for internal & external ]
-
--------- older things --------
-
-
-
-** Misc. tasks that need doing **
-
-Michael's bits
- + Countif help claims it works with string regexps
- but it just doesn't.
- + shrink-selection ergonomics in spreadsheet.
- + hit 'bullet' - not the right font size - IZ 30960
- + Mine / integrate creative commons clipart.freedesktop.org
- + Workable / usable SDK install
- + Grab the gsi->po translation tool from l10n,
- and get more translations done / a language %
- completion page setup on ooo.x.c.
- + autocorrection bug #25174
- + test multi-screen bits again - pwrt. raise
- + gui-symbol-replace - poke it.
- + http://bugzilla.ximian.com/show_bug.cgi?id=52657
- + make something of sd-export-html-thumbnails.diff
- + HTML export
- + beef up the new patch ...
- + fix +/- issue with frame navigation.
- + work out the story with 'frames' / image links
- + slide designs - store image/link types right ?
- + binary registry cache doesn't do lstats.
- + Documentation
- + png import / render inside xmlhelp
- + mapping / clobbering the icons in pictures.jar
- + more layout research ...
- + respond to feedback
- + UDK installation + pkgconfig file
- + need a 'post-setup-install' shell-script that
- Debian can use as well ...
- + Gnome
- + finish bonoboui/samples/thread-demo
-
-Spare tasks:
- Minor tasks (for idle cycles)
- + MS compatible keyboard shortcuts
- + some work already in patches/..../gui-keybindings.diff
- + needs extending to all common 'standard' shortcuts
- + eg. F3 -> Open File [ everywhere ]
- + people doing work on this in HEAD (apparently)
- query the Sun team about this / chase up the
- check-button .src markup Issue.
- Minor tasks (for idle cycles)
- + impress
- + open existing presentation name presentation
- + http://bugzilla.ximian.com/show_bug.cgi?id=52613
-
- Major task:
- + fixing LXR et. al as per action plan
- Minor tasks (for idle cycles)
- + AutoCapitalization ...
- Tools->AutoCorrect->Correct TWo initial Capitals
- this option is useful for writer, but useless for calc
- need to be able to disable it for oocalc but not write
- currently setting is shared; ie. enter HEllo in writer
- should result in 'Hello' and you should be able to enter
- HEllo into an oocalc cell.
-
-+ Bug fixage
- + Peter Bowen's (internal) spreadsheets need fixing.
- + disable-crash-dialog.diff doesn't: somehow the
- signal setup is really strange / broken in here, needs
- cleanup / comprehensibility.
- + not using autofmt.tbl (according to Jody (?))
- + gccinstlib.pl
- + remove it - unused in HEAD ?
-
-+ New features
- + openoffice-gallery-extra
- + turn all the dia diagram shapes into clipart.
- + re-write i18n stuff
- + using a different configuration key
- + implement a new backend
- + UI loving
- + mail merge window shows (only) ~4 records.
- + scaling issues: - as we increase font point size:
- + 'font style' much too large / bloated
- + 'size' - excessively bloated
- + changing font size:
- + screws up drop-down item count for combos.
- + The 'raise' issue - re-instate gui-appear.diff
- + re-arrange default toolbars X#39088
- + menu shortcut text should be 'Ctrl'+A (not 'Control')
- + changing font size doesn't scale all widgets
- eg. toolbar combo boxes & labels, file selector fields.
- + mark-up all option menus correctly so they don't
- show icons erroneously
- + bin LHS padding on menus with no icons or
- check-boxes, bin RHS padding with no K/B shortuts.
- + use gnome-print dialogs for printer selection
- + toolbar icons move on mouse-over; shouldn't.
- + right click on image -> 'save as'
- + Investigate full fontconfig speedups
- + are we still loading stuff from the OO.o font cache?
- + if so can we bin that; grok ascent/descent stuff.
- + Check our pspfontcache isn't growing [ #9969 ? ]
- - pwrt. PDF printing & fontconfig bits ...
- + session management
- + Automatic font obliquing from Xft2 [?]
- + no in-page search in help
- + automatic gconf HTTP proxy fetch
- + regexp searches in Writer.
- + writer
- + mouse in margins, should trigger new cursor and row
- selection mode
- + mouse above/over table header, should allow col
- selection + cursor
- + encryption: sw/source/core/sw3io/sw3misc.cxx, line 689
- + impress
- + PPT load/save doesn't save slide names [!]
- + grouped PPT presentation transitions are munged
- into many individual interactions on import.
- + sd/source/ui/dlg/*.cxx: improve time handling, for
- sub-1 second durations.
- + drawing view needs LHS panel with scrollable
- slides-view for navigation
- + calc
- + sheet tab font ugly & cramped
- + insert a row group in oocalc
- + 2nd from bottom toolbar icon on LHS
- + expand / collapse button doesn't theme
- + XL encryption: sc/source/filter/excel/impop.cxx (SC_XCL_USEDECR)
- + make -quickstart useful
- + get X session lifecycle right
- + gtk+ mainloop integration possibilities:
- + bonobo integration ? ...
- + mozilla/bonobo integration ? ...
- + native at-spi bridge avoiding java cf. doc/accessibility.txt
- + Mono integration
- + http://udk.openoffice.org/cli/cli-uno.html
- + pwrt. macro implementation.
-
-+ Testing
- + do we need inst-destdir.diff in 1.1
-
-+ Study
- + do we need vcl/source/window/window.cxx (maPaintTimer)
- (30ms)? before re-painting the UI ? can we do it
- cumulatively for instant response 1st time ?
diff --git a/bonobo/.cvsignore b/bonobo/.cvsignore
deleted file mode 100644
index 84c2eea9c..000000000
--- a/bonobo/.cvsignore
+++ /dev/null
@@ -1,25 +0,0 @@
-INSTALL
-Makefile
-Makefile.in
-aclocal.m4
-autom4te.cache
-config.guess
-config.log
-config.status
-config.sub
-configure
-cscope.files
-cscope.out
-depcomp
-install-sh
-intltool-extract
-intltool-extract.in
-intltool-merge
-intltool-merge.in
-intltool-update
-intltool-update.in
-libtool
-ltmain.sh
-missing
-mkinstalldirs
-ooo-bonobo*.tar.*
diff --git a/bonobo/AUTHORS b/bonobo/AUTHORS
deleted file mode 100644
index f409edffb..000000000
--- a/bonobo/AUTHORS
+++ /dev/null
@@ -1 +0,0 @@
-Martin Kretzschmar <martink@ximian.com>
diff --git a/bonobo/COPYING b/bonobo/COPYING
deleted file mode 100644
index 6a6e7f226..000000000
--- a/bonobo/COPYING
+++ /dev/null
@@ -1,8 +0,0 @@
-You may only copy and distribute this program consistent with the
-requirements and distribute this Program consistent with the
-requirements of either the GNU General Public License (GPL) and GNU
-Lesser General Public License (LGPL) or the Sun Industry Standards
-Source License (SISSL), respectively, depending on whether you elected
-to obtain access to this program via the GPL/LGPL Option or the SISSL
-Option. Copies of the GPL, LGPL and SISSL licenses can be found
-http://www.openoffice.org/project/www/license.html
diff --git a/bonobo/Makefile.am b/bonobo/Makefile.am
deleted file mode 100644
index db93e4147..000000000
--- a/bonobo/Makefile.am
+++ /dev/null
@@ -1,10 +0,0 @@
-SUBDIRS=src data po
-
-intltool_extra = intltool-extract.in intltool-merge.in intltool-update.in
-
-EXTRA_DIST= $(intltool_extra)
-
-DISTCLEANFILES = \
- intltool-extract \
- intltool-merge \
- intltool-update
diff --git a/bonobo/NEWS b/bonobo/NEWS
deleted file mode 100644
index e69de29bb..000000000
--- a/bonobo/NEWS
+++ /dev/null
diff --git a/bonobo/README b/bonobo/README
deleted file mode 100644
index a0133f7c6..000000000
--- a/bonobo/README
+++ /dev/null
@@ -1,17 +0,0 @@
-0) Don't read the code and expect anything beautiful.
-
-1) in src/main.cxx change /demo/schmidt.sxw, (any format that OOo can read goes)
-
-2) ./configure --with-ooo-solver-dir=/home/martin/Build/ooo/openoffice.org-1.0.99+1.1rc4/solver/645/unxlngi4.pro --with-ooo-install-dir=/usr/lib/openoffice
-
-3) export LD_LIBRARY_PATH=/usr/lib/ooo-1.1.0/program:$LD_LIBRARY_PATH
-
-4) make; make install; restart bonobo-activation-server
-
-5) (removed)
-
-6) start the bonobo server (we need LD_LIBRARY_PATH): src/ooo-bonobo
-
-7) in nautilus, open your document file with the OpenOffice.org Document viewer
-
-8) (removed)
diff --git a/bonobo/autogen.sh b/bonobo/autogen.sh
deleted file mode 100755
index 63fab0c38..000000000
--- a/bonobo/autogen.sh
+++ /dev/null
@@ -1,130 +0,0 @@
-#!/bin/sh
-# Run this to generate all the initial makefiles, etc.
-
-srcdir=`dirname $0`
-test -z "$srcdir" && srcdir=.
-
-ORIGDIR=`pwd`
-cd $srcdir
-PROJECT=ooo-bonobo
-TEST_TYPE=-d
-FILE=src
-
-DIE=0
-
-if glib-gettextize --version < /dev/null > /dev/null 2>&1 ; then
- gettextize_version=`glib-gettextize --version | sed 's/^[^0-9]*\([0-9.][0-9.]*\).*/\1/'`
- case $gettextize_version in
- 2.*)
- have_gettextize=true
- ;;
- esac
-fi
-if $have_gettextize ; then : ; else
- echo
- echo "You must have glib 2.0 or later installed to compile $PROJECT."
- echo "Install the appropriate package for your distribution,"
- echo "or get the source tarball at ftp://ftp.gnome.org/pub/GNOME/"
- DIE=1
-fi
-
-have_intltoolize=false
-if intltoolize --version < /dev/null > /dev/null 2>&1 ; then
- intltool_version=`intltoolize --version | sed 's/^[^0-9]*\([0-9.][0-9.]*\).*/\1/'`
- case $intltool_version in
- 0.2[56789]*|0.[3456789]*)
- have_intltoolize=true
- ;;
- esac
-fi
-if $have_intltoolize ; then : ; else
- echo
- echo "You must have intltool 0.25 installed to compile $PROJECT."
- echo "Install the appropriate package for your distribution,"
- echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
- DIE=1
-fi
-
-have_autoconf=false
-if autoconf --version < /dev/null > /dev/null 2>&1 ; then
- autoconf_version=`autoconf --version | sed 's/^[^0-9]*\([0-9.][0-9.]*\).*/\1/'`
- case $autoconf_version in
- 2.5*)
- have_autoconf=true
- ;;
- esac
-fi
-if $have_autoconf ; then : ; else
- echo
- echo "You must have autoconf installed to compile $PROJECT."
- echo "libtool the appropriate package for your distribution,"
- echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
- DIE=1
-fi
-
-if automake-1.6 --version < /dev/null > /dev/null 2>&1; then
- AUTOMAKE=automake-1.6
- ACLOCAL=aclocal-1.6
-else
- echo
- echo "You must have automake >= 1.6 installed to compile $PROJECT."
- echo "Get ftp://ftp.gnu.org/pub/gnu/automake/automake-1.6.0.tar.gz"
- echo "(or a newer version if it is available)"
- AUTOMAKE=automake
- ACLOCAL=aclocal
-fi
-
-if test "$DIE" -eq 1; then
- exit 1
-fi
-
-test $TEST_TYPE $FILE || {
- echo "You must run this script in the top-level $PROJECT directory"
- exit 1
-}
-
-if test -z "$AUTOGEN_SUBDIR_MODE"; then
- if test -z "$*"; then
- echo "I am going to run ./configure with no arguments - if you wish "
- echo "to pass any to it, please specify them on the $0 command line."
- fi
-fi
-
-if test -z "$ACLOCAL_FLAGS"; then
-
- acdir=`$ACLOCAL --print-ac-dir`
- m4list="glib-2.0.m4 glib-gettext.m4 gtk-2.0.m4"
-
- for file in $m4list
- do
- if [ ! -f "$acdir/$file" ]; then
- echo "WARNING: aclocal's directory is $acdir, but..."
- echo " no file $acdir/$file"
- echo " You may see fatal macro warnings below."
- echo " If these files are installed in /some/dir, set the ACLOCAL_FLAGS "
- echo " environment variable to \"-I /some/dir\", or install"
- echo " $acdir/$file."
- echo ""
- fi
- done
-fi
-
-$ACLOCAL $ACLOCAL_FLAGS
-
-glib-gettextize --copy --force
-# intltoolize --copy --force --automake
-libtoolize --copy --automake
-
-$AUTOMAKE --add-missing --copy
-autoconf
-
-# optional feature autoheader
-#autoheader
-
-cd $ORIGDIR
-
-if test -z "$AUTOGEN_SUBDIR_MODE"; then
- echo "Running configure..."
- ($srcdir/configure --enable-maintainer-mode "$@" \
- && echo -e "\nNow type 'make' to compile $PROJECT.")
-fi
diff --git a/bonobo/configure.ac b/bonobo/configure.ac
deleted file mode 100644
index dfb2288ca..000000000
--- a/bonobo/configure.ac
+++ /dev/null
@@ -1,137 +0,0 @@
-AC_PREREQ(2.53)
-AC_INIT(src/main.cxx)
-
-AM_INIT_AUTOMAKE(ooo-bonobo, 0.0.1)
-
-AM_MAINTAINER_MODE
-
-AC_ISC_POSIX
-AC_PROG_CC
-AC_PROG_CXX
-AC_STDC_HEADERS
-AM_PROG_LIBTOOL
-
-GETTEXT_PACKAGE=ooo-bonobo
-AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE")
-AC_SUBST(GETTEXT_PACKAGE)
-
-ALL_LINGUAS="de"
-AM_GLIB_GNU_GETTEXT
-AC_PROG_INTLTOOL
-
-AC_ARG_ENABLE(
- [strict-tests],
- AC_HELP_STRING([--enable-strict-tests],
- [check for the presence of headers, binaries, etc.]),,
- [enable_strict_tests="no"])
-
-dnl FIXME
-TAG=`$srcdir/../bin/latest-patchset $srcdir/../patches`;
-BASEDIR=`pwd`/..
-
-AC_ARG_WITH(
- [ooo-builddir],
- AC_HELP_STRING([--with-ooo-builddir],
- [define the directory where openoffice.org will be compiled, e.g. the root of an ooo cvs checkout.]),
- [OOBUILDDIR="${withval}"],
- [if test "z$with_src" = "z"; then
- OOBUILDDIR=$BASEDIR/build/$TAG
- else
- OOBUILDDIR=$with_src/$TAG
- fi])
-
-ac_solver_dir="$OOBUILDDIR/solver/645/unxlngi4.pro"
-
-AC_ARG_WITH(
- [ooo-solver-dir],
- AC_HELP_STRING([--with-ooo-solver-dir=DIR],
- [path to your OpenOffice.org solver]),
- [ac_solver_dir="${withval}"],)
-
-ac_ooodev_bindir="${ac_solver_dir}/bin"
-ac_ooodev_includes="${ac_solver_dir}/inc"
-ac_ooodev_libdir="${ac_solver_dir}/lib"
-
-AC_ARG_WITH(
- [ooo-install-dir],
- AC_HELP_STRING([--with-ooo-install-dir=DIR],
- [path to your OpenOffice.org installation]),
- [OOO_INSTALLDIR=${withval}],
- [OOO_INSTALLDIR=${libdir}/ooo-1.1])
-AC_SUBST(OOO_INSTALLDIR)
-
-PKG_CHECK_MODULES(OOO_BONOBO, gtk+-2.0 libgnome-2.0 libbonoboui-2.0)
-
-ac_cppflags_safe="$CPPFLAGS"
-CPPFLAGS="-I$ac_ooodev_includes"
-AC_CHECK_HEADERS([sal/config.h],
- [],
- test "z$enable_strict_tests" = "zno" || AC_MSG_ERROR([[OpenOffice.org include files not found, try '--with-ooo-solver-dir=/path/to/solver']]))
-OOO_BONOBO_CFLAGS="$OOO_BONOBO_CFLAGS -I$ac_ooodev_includes"
-CPPFLAGS="$ac_cppflags_safe"
-
-AC_PATH_PROG([REGMERGE], [regmerge], [], [$ac_ooodev_bindir:$PATH])
-if test -z "$REGMERGE" ; then
- if test "z$enable_strict_tests" = "zno"; then
- REGMERGE="$ac_ooodev_bindir/regmerge"
- else
- AC_MSG_ERROR([regmerge not found, try '--with-ooo-solver-dir=location_of_ODK'.])
- fi
-fi
-dnl FIXME
-REGMERGE="LD_LIBRARY_PATH=$ac_ooodev_libdir:\$\$LD_LIBRARY_PATH $REGMERGE"
-AC_SUBST(REGMERGE)
-
-AC_PATH_PROG([REGCOMP], [regcomp], [], [$ac_ooodev_bindir:$PATH])
-if test -z "$REGCOMP" ; then
- if test "z$enable_strict_tests" = "zno"; then
- REGCOMP="$ac_ooodev_bindir/regcomp"
- else
- AC_MSG_ERROR([regcomp not found, try '--with-ooo-solver-dir=location_of_ODK'.])
- fi
-fi
-dnl FIXME
-REGCOMP="LD_LIBRARY_PATH=$ac_ooodev_libdir:\$\$LD_LIBRARY_PATH $REGCOMP"
-AC_SUBST(REGCOMP)
-
-if test ! -d "$ac_ooodev_libdir" && test "z$enable_strict_tests" != "zno" ; then
- AC_MSG_ERROR([[OpenOffice.org libraries not found. Please use --with-ooo-solver-dir=/path/to/solver]])
-fi
-OOO_BONOBO_LIBS="$OOO_BONOBO_LIBS -L$ac_ooodev_libdir"
-OOODEV_LIBDIR="$ac_ooodev_libdir"
-AC_SUBST(OOODEV_LIBDIR)
-
-dnl Type Registry (types.rdb = offapi + udkapi)
-AC_CHECK_FILE([$ac_ooodev_bindir/types.rdb],
- [],
- test "z$enable_strict_tests" = "zno" || AC_MSG_ERROR([[udkapi.rdb not found. Please use --with-ooo-install-dir=/path/to/ooo-installation]]))
-
-DKREGISTRYNAME="$ac_ooodev_bindir/types.rdb"
-AC_SUBST(DKREGISTRYNAME)
-
-dnl FIXME
-GUI=UNX
-COM=GCC
-OS=LINUX
-CPPU_ENV=gcc3
-
-OOO_BONOBO_CFLAGS="$OOO_BONOBO_CFLAGS -D$GUI -D$COM -D$OS -DCPPU_ENV=$CPPU_ENV"
-
-dnl FIXME
-CPPUHELPERLIB=-lcppuhelpergcc3
-CPPULIB=-lcppu
-SALHELPERLIB=-lsalhelpergcc3
-SALLIB=-lsal
-STLPORTLIB=-lstlport_gcc
-
-OOO_BONOBO_LIBS="$OOO_BONOBO_LIBS $CPPUHELPERLIB $CPPULIB $SALHELPERLIB $SALLIB $STLPORTLIB"
-
-AC_SUBST(OOO_BONOBO_CFLAGS)
-AC_SUBST(OOO_BONOBO_LIBS)
-
-AC_OUTPUT([
-Makefile
-data/Makefile
-src/Makefile
-po/Makefile.in
-])
diff --git a/bonobo/data/.cvsignore b/bonobo/data/.cvsignore
deleted file mode 100644
index ee971a29a..000000000
--- a/bonobo/data/.cvsignore
+++ /dev/null
@@ -1,8 +0,0 @@
-GNOME_OpenOfficeOrg.server
-GNOME_OpenOfficeOrg.server.in
-Makefile
-Makefile.in
-ooo-bonobo
-ooo-bonobo-uno-bootstrap.ini
-ooo-bonobo-uno-bootstraprc
-ooo-bonobo.rdb
diff --git a/bonobo/data/GNOME_OpenOfficeOrg.server.in.in b/bonobo/data/GNOME_OpenOfficeOrg.server.in.in
deleted file mode 100644
index 89e011e6a..000000000
--- a/bonobo/data/GNOME_OpenOfficeOrg.server.in.in
+++ /dev/null
@@ -1,62 +0,0 @@
-<oaf_info>
-
- <oaf_server iid="OAFIID:GNOME_OpenOfficeOrg_Factory"
- type="exe"
- location="@LIBEXECDIR@/ooo-bonobo">
-
- <oaf_attribute name="repo_ids" type="stringv">
- <item value="IDL:Bonobo/GenericFactory:1.0"/>
- </oaf_attribute>
-
- <oaf_attribute name="name" type="string"
- _value="OpenOffice.org viewer factory"/>
-
- </oaf_server>
-
- <oaf_server iid="OAFIID:GNOME_OpenOfficeOrg_Control"
- type="factory"
- location="OAFIID:GNOME_OpenOfficeOrg_Factory">
-
- <oaf_attribute name="repo_ids" type="stringv">
- <item value="IDL:Bonobo/Control:1.0"/>
- <item value="IDL:Bonobo/PersistFile:1.0"/>
- <item value="IDL:Bonobo/Persist:1.0"/>
- <item value="IDL:Bonobo/Unknown:1.0"/>
- </oaf_attribute>
-
- <oaf_attribute name="name" type="string" _value="OpenOffice.org Viewer"/>
- <oaf_attribute name="bonobo:editable" type="boolean" value="false"/>
- <oaf_attribute name="bonobo:supported_mime_types" type="stringv">
- <item value="application/vnd.sun.xml.writer"/>
- <item value="application/vnd.sun.xml.calc"/>
- <item value="application/vnd.sun.xml.calc.template"/>
- <item value="application/vnd.sun.xml.draw"/>
- <item value="application/vnd.sun.xml.draw.template"/>
- <item value="application/vnd.sun.xml.impress"/>
- <item value="application/vnd.sun.xml.impress.template"/>
- <item value="application/vnd.sun.xml.math"/>
- <item value="application/vnd.sun.xml.writer"/>
- <item value="application/vnd.sun.xml.writer.global"/>
- <item value="application/vnd.sun.xml.writer.template"/>
- <item value="application/vnd.stardivision.calc"/>
- <item value="application/vnd.stardivision.chart"/>
- <item value="application/vnd.stardivision.draw"/>
- <item value="application/vnd.stardivision.impress"/>
- <item value="application/vnd.stardivision.mail"/>
- <item value="application/vnd.stardivision.math"/>
- <item value="application/vnd.stardivision.writer"/>
- <item value="application/msword"/>
- <item value="application/excel"/>
- <item value="application/powerpoint"/>
- <item value="application/rtf"/>
- <item value="application/vnd.ms-excel"/>
- <item value="application/vnd.lotus-1-2-3"/>
- <item value="application/vnd.ms-powerpoint"/>
- </oaf_attribute>
-
- <oaf_attribute name="nautilus:view_as_name" type="string"
- _value="OpenOffice.org Document"/>
-
- </oaf_server>
-
-</oaf_info>
diff --git a/bonobo/data/Makefile.am b/bonobo/data/Makefile.am
deleted file mode 100644
index 3a6f16025..000000000
--- a/bonobo/data/Makefile.am
+++ /dev/null
@@ -1,41 +0,0 @@
-server_in_files = GNOME_OpenOfficeOrg.server.in.in
-
-serverdir = $(libdir)/bonobo/servers
-server_DATA = $(server_in_files:.server.in.in=.server)
-
-%.server.in: %.server.in.in
- sed -e "s|\@LIBEXECDIR\@|$(libexecdir)|" $< > $@
-
-@INTLTOOL_SERVER_RULE@
-
-rdbdir = $(libdir)/ooo-bonobo
-rdb_DATA = ooo-bonobo.rdb
-
-ooo-bonobo.rdb:
- $(REGMERGE) $@.tmp / $(DKREGISTRYNAME)
- $(REGCOMP) -register -r $@.tmp -c $(OOODEV_LIBDIR)/connector.uno$(SHAREDLIBEXT)
- $(REGCOMP) -register -r $@.tmp -c $(OOODEV_LIBDIR)/remotebridge.uno$(SHAREDLIBEXT)
- $(REGCOMP) -register -r $@.tmp -c $(OOODEV_LIBDIR)/bridgefac.uno$(SHAREDLIBEXT)
- $(REGCOMP) -register -r $@.tmp -c $(OOODEV_LIBDIR)/uuresolver.uno$(SHARELIBEXT)
- mv $@.tmp $@
-
-ini_in_files = ooo-bonobo-uno-bootstraprc.in
-inidir = $(datadir)/ooo-bonobo
-ini_DATA = $(ini_in_files:rc.in=rc)
-
-%rc: %rc.in
- sed -e "s|\@RDBDIR\@|$(rdbdir)|" $< > $@
-
-uidir = $(datadir)/gnome-2.0/ui
-ui_DATA = ooo-bonobo-control-ui.xml
-
-libexec_SCRIPTS = ooo-bonobo
-
-ooo-bonobo: ooo-bonobo.in
- sed -e "s|\@LIBEXECDIR\@|$(libexecdir)|" \
- -e "s|\@OOO_LIBDIR\@|$(OOO_INSTALLDIR)/program|" $< > $@
-
-BUILT_SOURCES=$(ini_DATA) $(rdb_DATA) $(server_DATA) $(libexec_SCRIPTS)
-CLEANFILES=$(BUILT_SOURCES)
-
-EXTRA_DIST=$(server_in_files) $(ini_in_files) $(ui_DATA) ooo-bonobo.in
diff --git a/bonobo/data/ooo-bonobo-control-ui.xml b/bonobo/data/ooo-bonobo-control-ui.xml
deleted file mode 100644
index dd1daf567..000000000
--- a/bonobo/data/ooo-bonobo-control-ui.xml
+++ /dev/null
@@ -1,72 +0,0 @@
-<Root>
- <commands>
- <cmd name="FileSaveAs" _label="Save as"
- _tip="Save the current file with a different name"
- accel="*Control**Shift*s"
- pixtype="stock" pixname="Save As"/>
-
- <cmd name="FileExport" _label="Export"
- _tip="Save the current file in a different format"/>
-
- <cmd name="FileExportPDF" _label="Export as PDF"
- _tip="Export the current file as PDF file"/>
-
- <cmd name="FilePrint" _label="Print"
- _tip="Print the current file" accel="*Control*P"
- pixtype="stock" pixname="Print"/>
-
- <cmd name="FileProperties" _label="Properties"
- _tip="View properties of the displayed document"
- pixtype="stock" pixname="Properties"/>
-
- <cmd name="EditCopy" _label="Copy"
- _tip="Copy the selection" pixtype="stock" pixname="Copy"
- accel="*Control*c"/>
-
- <cmd name="ZoomIn" _label="Zoom In"
- _tip="Expand to a larger size" accel="*Control*plus"
- pixtype="stock" pixname="Zoom-In"/>
-
- <cmd name="ZoomOut" _label="Zoom Out"
- _tip="Shrink to a smaller size" accel="*Control*minus"
- pixtype="stock" pixname="Zoom-Out"/>
-
- <cmd name="ZoomNormal" _label="Normal Size"
- _tip="Show the contents at the normal size"
- pixtype="stock" pixname="Zoom-100"/>
-
- <cmd name="ZoomFit" _label="Best Fit"
- _tip="Size to fit the page"
- pixtype="stock" pixname="Zoom-Fit"/>
- </commands>
-
- <menu>
-
- <submenu name="File" _label="_File">
- <placeholder name="Open Placeholder">
- <menuitem name="FileSaveAs" _label="Save _as..." verb=""/>
- <menuitem name="FileExport" _label="E_xport..." verb=""/>
- <menuitem name="FileExportPDF" _label="Export as _PDF..." verb=""/>
- </placeholder>
-
- <placeholder name="File Items Placeholder">
- <menuitem name="FilePrint" _label="_Print..." verb=""/>
- <menuitem name="FileProperties" _label="Proper_ties" verb=""/>
- </placeholder>
- </submenu>
-
- <submenu name="Edit" _label="_Edit">
- <menuitem name="Copy" _label="_Copy" verb="EditCopy"/>
- </submenu>
-
- <submenu name="View" _label="_View">
- <placeholder name="Zoom Items Placeholder">
- <menuitem name="Zoom In" _label="Zoom _In" verb="ZoomIn"/>
- <menuitem name="Zoom Out" _label="Zoom _Out" verb="ZoomOut"/>
- <menuitem name="Zoom Normal" _label="Normal Si_ze" verb="ZoomNormal"/>
- <menuitem name="Zoom Fit" _label="Best _Fit" verb="ZoomFit"/>
- </placeholder>
- </submenu>
-
- </menu>
-</Root>
diff --git a/bonobo/data/ooo-bonobo-uno-bootstraprc.in b/bonobo/data/ooo-bonobo-uno-bootstraprc.in
deleted file mode 100644
index 1a36c386f..000000000
--- a/bonobo/data/ooo-bonobo-uno-bootstraprc.in
+++ /dev/null
@@ -1,2 +0,0 @@
-UNO_TYPES=@RDBDIR@/ooo-bonobo.rdb
-UNO_SERVICES=@RDBDIR@/ooo-bonobo.rdb
diff --git a/bonobo/data/ooo-bonobo.in b/bonobo/data/ooo-bonobo.in
deleted file mode 100644
index 0d145c899..000000000
--- a/bonobo/data/ooo-bonobo.in
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/sh
-LD_LIBRARY_PATH=@OOO_LIBDIR@:$LD_LIBRARY_PATH
-export LD_LIBRARY_PATH
-exec @LIBEXECDIR@/ooo-bonobo.bin "$@"
diff --git a/bonobo/intltool-extract.in b/bonobo/intltool-extract.in
deleted file mode 100644
index d98b2bf29..000000000
--- a/bonobo/intltool-extract.in
+++ /dev/null
@@ -1,389 +0,0 @@
-#!@INTLTOOL_PERL@ -w
-# -*- Mode: perl; indent-tabs-mode: nil; c-basic-offset: 4 -*-
-
-#
-# The Intltool Message Extractor
-#
-# Copyright (C) 2000-2001 Free Software Foundation.
-#
-# Intltool is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License as
-# published by the Free Software Foundation; either version 2 of the
-# License, or (at your option) any later version.
-#
-# Intltool is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-#
-# Authors: Kenneth Christiansen <kenneth@gnu.org>
-# Darin Adler <darin@bentspoon.com>
-#
-
-## Release information
-my $PROGRAM = "intltool-extract";
-my $PACKAGE = "intltool";
-my $VERSION = "0.25";
-
-## Loaded modules
-use strict;
-use File::Basename;
-use Getopt::Long;
-
-## Scalars used by the option stuff
-my $TYPE_ARG = "0";
-my $LOCAL_ARG = "0";
-my $HELP_ARG = "0";
-my $VERSION_ARG = "0";
-my $UPDATE_ARG = "0";
-my $QUIET_ARG = "0";
-
-my $FILE;
-my $OUTFILE;
-
-my $gettext_type = "";
-my $input;
-my %messages = ();
-
-## Use this instead of \w for XML files to handle more possible characters.
-my $w = "[-A-Za-z0-9._:]";
-
-## Always print first
-$| = 1;
-
-## Handle options
-GetOptions (
- "type=s" => \$TYPE_ARG,
- "local|l" => \$LOCAL_ARG,
- "help|h" => \$HELP_ARG,
- "version|v" => \$VERSION_ARG,
- "update" => \$UPDATE_ARG,
- "quiet|q" => \$QUIET_ARG,
- ) or &error;
-
-&split_on_argument;
-
-
-## Check for options.
-## This section will check for the different options.
-
-sub split_on_argument {
-
- if ($VERSION_ARG) {
- &version;
-
- } elsif ($HELP_ARG) {
- &help;
-
- } elsif ($LOCAL_ARG) {
- &place_local;
- &extract;
-
- } elsif ($UPDATE_ARG) {
- &place_normal;
- &extract;
-
- } elsif (@ARGV > 0) {
- &place_normal;
- &message;
- &extract;
-
- } else {
- &help;
-
- }
-}
-
-sub place_normal {
- $FILE = $ARGV[0];
- $OUTFILE = "$FILE.h";
-}
-
-sub place_local {
- $OUTFILE = fileparse($FILE, ());
- if (!-e "tmp/") {
- system("mkdir tmp/");
- }
- $OUTFILE = "./tmp/$OUTFILE.h"
-}
-
-sub determine_type {
- if ($TYPE_ARG =~ /^gettext\/(.*)/) {
- $gettext_type=$1
- }
-}
-
-## Sub for printing release information
-sub version{
- print "${PROGRAM} (${PACKAGE}) $VERSION\n";
- print "Copyright (C) 2000 Free Software Foundation, Inc.\n";
- print "Written by Kenneth Christiansen, 2000.\n\n";
- print "This is free software; see the source for copying conditions. There is NO\n";
- print "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n";
- exit;
-}
-
-## Sub for printing usage information
-sub help{
- print "Usage: ${PROGRAM} [FILENAME] [OPTIONS] ...\n";
- print "Generates a header file from an xml source file.\n\nGrabs all strings ";
- print "between <_translatable_node> and it's end tag,\nwhere tag are all allowed ";
- print "xml tags. Read the docs for more info.\n\n";
- print " -v, --version shows the version\n";
- print " -h, --help shows this help page\n";
- print " -q, --quiet quiet mode\n";
- print "\nReport bugs to <kenneth\@gnu.org>.\n";
- exit;
-}
-
-## Sub for printing error messages
-sub error{
- print "Try `${PROGRAM} --help' for more information.\n";
- exit;
-}
-
-sub message {
- print "Generating C format header file for translation.\n";
-}
-
-sub extract {
- &determine_type;
-
- &convert ($FILE);
-
- open OUT, ">$OUTFILE";
- &msg_write;
- close OUT;
-
- print "Wrote $OUTFILE\n" unless $QUIET_ARG;
-}
-
-sub convert($) {
-
- ## Reading the file
- {
- local (*IN);
- local $/; #slurp mode
- open (IN, "<$FILE") || die "can't open $FILE: $!";
- $input = <IN>;
- }
-
- &type_ini if $gettext_type eq "ini";
- &type_keys if $gettext_type eq "keys";
- &type_xml if $gettext_type eq "xml";
- &type_glade if $gettext_type eq "glade";
- &type_scheme if $gettext_type eq "scheme";
- &type_schemas if $gettext_type eq "schemas";
- &type_rfc822deb if $gettext_type eq "rfc822deb";
-}
-
-sub entity_decode_minimal
-{
- local ($_) = @_;
-
- s/&apos;/'/g; # '
- s/&quot;/"/g; # "
- s/&amp;/&/g;
-
- return $_;
-}
-
-sub entity_decode
-{
- local ($_) = @_;
-
- s/&apos;/'/g; # '
- s/&quot;/"/g; # "
- s/&amp;/&/g;
- s/&lt;/</g;
- s/&gt;/>/g;
-
- return $_;
-}
-
-sub escape_char
-{
- return '\"' if $_ eq '"';
- return '\n' if $_ eq "\n";
- return '\\' if $_ eq '\\';
-
- return $_;
-}
-
-sub escape
-{
- my ($string) = @_;
- return join "", map &escape_char, split //, $string;
-}
-
-sub type_ini {
- ### For generic translatable desktop files ###
- while ($input =~ /^_.*=(.*)$/mg) {
- $messages{$1} = [];
- }
-}
-
-sub type_keys {
- ### For generic translatable mime/keys files ###
- while ($input =~ /^\s*_\w+=(.*)$/mg) {
- $messages{$1} = [];
- }
-}
-
-sub type_xml {
- ### For generic translatable XML files ###
-
- while ($input =~ /\s_$w+=\"([^"]+)\"/sg) { # "
- $messages{entity_decode_minimal($1)} = [];
- }
-
- while ($input =~ /<_($w+)(?: xml:space="($w+)")?>(.+?)<\/_\1>/sg) {
- $_ = $3;
- if (!defined($2) || $2 ne "preserve") {
- s/\s+/ /g;
- s/^ //;
- s/ $//;
- }
- $messages{entity_decode_minimal($_)} = [];
- }
-}
-
-sub type_schemas {
- ### For schemas XML files ###
-
- # FIXME: We should handle escaped < (less than)
- while ($input =~ /
- <locale\ name="C">\s*
- (<default>\s*(.*?)\s*<\/default>\s*)?
- (<short>\s*(.*?)\s*<\/short>\s*)?
- (<long>\s*(.*?)\s*<\/long>\s*)?
- <\/locale>
- /sgx) {
- my @totranslate = ($2,$4,$6);
- foreach (@totranslate) {
- next if !$_;
- s/\s+/ /g;
- $messages{entity_decode_minimal($_)} = [];
- }
- }
-}
-
-sub type_rfc822deb {
- ### For rfc822-style Debian configuration files ###
-
- while ($input =~ /(?:^|\n)_[^:]+:\s*(.*?)(?=\n\S|$)/sg) {
- my @str_list = rfc822deb_split($1);
- for my $str (@str_list) {
- # As rfc822deb is for configuration files, duplicates
- # should never happen. Developers must use the
- # [] construct to make msgid unique, see also intltool-merge
- print STDERR "Warning: msgid multiply defined:\n $str\n"
- if defined($messages{$str});
- $messages{$str} = [];
- }
- }
-}
-
-sub rfc822deb_split {
- # Debian defines a special way to deal with rfc822-style files:
- # when a value contain newlines, it consists of
- # 1. a short form (first line)
- # 2. a long description, all lines begin with a space,
- # and paragraphs are separated by a single dot on a line
- # This routine returns an array of all paragraphs, and reformat
- # them.
- my $text = shift;
- $text =~ s/^ //mg;
- return ($text) if $text !~ /\n/;
-
- $text =~ s/([^\n]*)\n//;
- my @list = ($1);
- my $str = '';
- for my $line (split (/\n/, $text)) {
- chomp $line;
- $line =~ /\s+$/;
- if ($line =~ /^\.$/) {
- # New paragraph
- $str =~ s/\s*$//;
- push(@list, $str);
- $str = '';
- } elsif ($line =~ /^\s/) {
- # Line which must not be reformatted
- $str .= "\n" if length ($str) && $str !~ /\n$/;
- $str .= $line."\n";
- } else {
- # Continuation line, remove newline
- $str .= " " if length ($str) && $str !~ /[\n ]$/;
- $str .= $line;
- }
- }
- $str =~ s/\s*$//;
- push(@list, $str) if length ($str);
- return @list;
-}
-
-sub type_glade {
- ### For translatable Glade XML files ###
-
- my $tags = "label|title|text|format|copyright|comments|preview_text|tooltip|message";
-
- while ($input =~ /<($tags)>([^<]+)<\/($tags)>/sg) {
- # Glade sometimes uses tags that normally mark translatable things for
- # little bits of non-translatable content. We work around this by not
- # translating strings that only includes something like label4 or window1.
- $messages{entity_decode($2)} = [] unless $2 =~ /^(window|label)[0-9]+$/;
- }
-
- while ($input =~ /<items>(..[^<]*)<\/items>/sg) {
- for my $item (split (/\n/, $1)) {
- $messages{entity_decode($item)} = [];
- }
- }
-
- ## handle new glade files
- while ($input =~ /<(property|atkproperty)\s+[^>]*translatable\s*=\s*"yes"[^>]*>([^<]+)<\/\1>/sg) {
- $messages{entity_decode($2)} = [] unless $2 =~ /^(window|label)[0-9]+$/;
- }
- while ($input =~ /<atkaction\s+action_name="([^>]*)"\s+description="([^>]+)"\/>/sg) {
- $messages{entity_decode_minimal($2)} = [];
- }
-}
-
-sub type_scheme {
- while ($input =~ /_\(?"((?:[^"\\]+|\\.)*)"\)?/sg) {
- $messages{$1} = [];
- }
-}
-
-sub msg_write {
- for my $message (sort keys %messages) {
- print OUT "/* xgettext:no-c-format */\n" if $message =~ /%/;
-
- my @lines = split (/\n/, $message, -1);
- for (my $n = 0; $n < @lines; $n++) {
- if ($n == 0) {
- print OUT "char *s = N_(\"";
- } else {
- print OUT " \"";
- }
-
- print OUT escape($lines[$n]);
-
- if ($n < @lines - 1) {
- print OUT "\\n\"\n";
- } else {
- print OUT "\");\n";
- }
- }
- }
-}
-
diff --git a/bonobo/intltool-merge.in b/bonobo/intltool-merge.in
deleted file mode 100644
index f1d53b114..000000000
--- a/bonobo/intltool-merge.in
+++ /dev/null
@@ -1,908 +0,0 @@
-#!@INTLTOOL_PERL@ -w
-
-#
-# The Intltool Message Merger
-#
-# Copyright (C) 2000, 2002 Free Software Foundation.
-# Copyright (C) 2000, 2001 Eazel, Inc
-#
-# Intltool is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# version 2 published by the Free Software Foundation.
-#
-# Intltool is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-#
-# Authors: Maciej Stachowiak <mjs@noisehavoc.org>
-# Kenneth Christiansen <kenneth@gnu.org>
-# Darin Adler <darin@bentspoon.com>
-#
-# Proper XML UTF-8'ification written by Cyrille Chepelov <chepelov@calixo.net>
-#
-
-## Release information
-my $PROGRAM = "intltool-merge";
-my $PACKAGE = "intltool";
-my $VERSION = "0.25";
-
-## Loaded modules
-use strict;
-use Getopt::Long;
-use Text::Wrap;
-
-## Scalars used by the option stuff
-my $HELP_ARG = 0;
-my $VERSION_ARG = 0;
-my $BA_STYLE_ARG = 0;
-my $XML_STYLE_ARG = 0;
-my $KEYS_STYLE_ARG = 0;
-my $DESKTOP_STYLE_ARG = 0;
-my $SCHEMAS_STYLE_ARG = 0;
-my $RFC822DEB_STYLE_ARG = 0;
-my $QUIET_ARG = 0;
-my $PASS_THROUGH_ARG = 0;
-my $UTF8_ARG = 0;
-my $cache_file;
-
-## Handle options
-GetOptions
-(
- "help" => \$HELP_ARG,
- "version" => \$VERSION_ARG,
- "quiet|q" => \$QUIET_ARG,
- "oaf-style|o" => \$BA_STYLE_ARG, ## for compatibility
- "ba-style|b" => \$BA_STYLE_ARG,
- "xml-style|x" => \$XML_STYLE_ARG,
- "keys-style|k" => \$KEYS_STYLE_ARG,
- "desktop-style|d" => \$DESKTOP_STYLE_ARG,
- "schemas-style|s" => \$SCHEMAS_STYLE_ARG,
- "rfc822deb-style|r" => \$RFC822DEB_STYLE_ARG,
- "pass-through|p" => \$PASS_THROUGH_ARG,
- "utf8|u" => \$UTF8_ARG,
- "cache|c=s" => \$cache_file
- ) or &error;
-
-my $PO_DIR;
-my $FILE;
-my $OUTFILE;
-
-my %po_files_by_lang = ();
-my %translations = ();
-
-# Use this instead of \w for XML files to handle more possible characters.
-my $w = "[-A-Za-z0-9._:]";
-
-# XML quoted string contents
-my $q = "[^\\\"]*";
-
-## Check for options.
-
-if ($VERSION_ARG)
-{
- &print_version;
-}
-elsif ($HELP_ARG)
-{
- &print_help;
-}
-elsif ($BA_STYLE_ARG && @ARGV > 2)
-{
- &preparation;
- &print_message;
- &ba_merge_translations;
- &finalize;
-}
-elsif ($XML_STYLE_ARG && @ARGV > 2)
-{
- &utf8_sanity_check;
- &preparation;
- &print_message;
- &xml_merge_translations;
- &finalize;
-}
-elsif ($KEYS_STYLE_ARG && @ARGV > 2)
-{
- &utf8_sanity_check;
- &preparation;
- &print_message;
- &keys_merge_translations;
- &finalize;
-}
-elsif ($DESKTOP_STYLE_ARG && @ARGV > 2)
-{
- &preparation;
- &print_message;
- &desktop_merge_translations;
- &finalize;
-}
-elsif ($SCHEMAS_STYLE_ARG && @ARGV > 2)
-{
- &preparation;
- &print_message;
- &schemas_merge_translations;
- &finalize;
-}
-elsif ($RFC822DEB_STYLE_ARG && @ARGV > 2)
-{
- &preparation;
- &print_message;
- &rfc822deb_merge_translations;
- &finalize;
-}
-else
-{
- &print_help;
-}
-
-exit;
-
-## Sub for printing release information
-sub print_version
-{
- print "${PROGRAM} (${PACKAGE}) ${VERSION}\n";
- print "Written by Maciej Stachowiak, Darin Adler and Kenneth Christiansen.\n\n";
- print "Copyright (C) 2000-2002 Free Software Foundation, Inc.\n";
- print "Copyright (C) 2000-2001 Eazel, Inc.\n";
- print "This is free software; see the source for copying conditions. There is NO\n";
- print "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n";
- exit;
-}
-
-## Sub for printing usage information
-sub print_help
-{
- print "Usage: ${PROGRAM} [OPTIONS] PO_DIRECTORY FILENAME OUTPUT_FILE\n";
- print "Generates an output file that includes translated versions of some attributes,\n";
- print "from an untranslated source and a po directory that includes translations.\n\n";
- print " -b, --ba-style includes translations in the bonobo-activation style\n";
- print " -d, --desktop-style includes translations in the desktop style\n";
- print " -k, --keys-style includes translations in the keys style\n";
- print " -s, --schemas-style includes translations in the schemas style\n";
- print " -r, --rfc822deb-style includes translations in the RFC822 style\n";
- print " -x, --xml-style includes translations in the standard xml style\n";
- print " -u, --utf8 convert all strings to UTF-8 before merging\n";
- print " -p, --pass-through use strings as found in .po files, without\n";
- print " conversion (STRONGLY unrecommended with -x)\n";
- print " -q, --quiet suppress most messages\n";
- print " --help display this help and exit\n";
- print " --version output version information and exit\n";
- print "\nReport bugs to bugzilla.gnome.org, module intltool, or contact us through \n";
- print "<xml-i18n-tools-list\@gnome.org>.\n";
- exit;
-}
-
-
-## Sub for printing error messages
-sub print_error
-{
- print "Try `${PROGRAM} --help' for more information.\n";
- exit;
-}
-
-
-sub print_message
-{
- print "Merging translations into $OUTFILE.\n" unless $QUIET_ARG;
-}
-
-
-sub preparation
-{
- $PO_DIR = $ARGV[0];
- $FILE = $ARGV[1];
- $OUTFILE = $ARGV[2];
-
- &gather_po_files;
- &get_translation_database;
-}
-
-# General-purpose code for looking up translations in .po files
-
-sub po_file2lang
-{
- my ($tmp) = @_;
- $tmp =~ s/^.*\/(.*)\.po$/$1/;
- return $tmp;
-}
-
-sub gather_po_files
-{
- for my $po_file (glob "$PO_DIR/*.po") {
- $po_files_by_lang{po_file2lang($po_file)} = $po_file;
- }
-}
-
-sub get_local_charset
-{
- my ($encoding) = @_;
- my $alias_file = $ENV{"G_CHARSET_ALIAS"} || "/usr/lib/charset.alias";
-
- # seek character encoding aliases in charset.alias (glib)
-
- if (open CHARSET_ALIAS, $alias_file)
- {
- while (<CHARSET_ALIAS>)
- {
- next if /^\#/;
- return $1 if (/^\s*([-._a-zA-Z0-9]+)\s+$encoding\b/i)
- }
-
- close CHARSET_ALIAS;
- }
-
- # if not found, return input string
-
- return $encoding;
-}
-
-sub get_po_encoding
-{
- my ($in_po_file) = @_;
- my $encoding = "";
-
- open IN_PO_FILE, $in_po_file or die;
- while (<IN_PO_FILE>)
- {
- ## example: "Content-Type: text/plain; charset=ISO-8859-1\n"
- if (/Content-Type\:.*charset=([-a-zA-Z0-9]+)\\n/)
- {
- $encoding = $1;
- last;
- }
- }
- close IN_PO_FILE;
-
- if (!$encoding)
- {
- print "Warning: no encoding found in $in_po_file. Assuming ISO-8859-1\n";
- $encoding = "ISO-8859-1";
- }
-
- $encoding = get_local_charset($encoding);
-
- return $encoding
-}
-
-sub utf8_sanity_check
-{
- if (!$UTF8_ARG)
- {
- if (!$PASS_THROUGH_ARG)
- {
- $PASS_THROUGH_ARG="1";
- }
- }
-}
-
-sub get_translation_database
-{
- if ($cache_file) {
- &get_cached_translation_database;
- } else {
- &create_translation_database;
- }
-}
-
-sub get_newest_po_age
-{
- my $newest_age;
-
- foreach my $file (values %po_files_by_lang)
- {
- my $file_age = -M $file;
- $newest_age = $file_age if !$newest_age || $file_age < $newest_age;
- }
-
- return $newest_age;
-}
-
-sub create_cache
-{
- print "Generating and caching the translation database\n" unless $QUIET_ARG;
-
- &create_translation_database;
-
- open CACHE, ">$cache_file" || die;
- print CACHE join "\x01", %translations;
- close CACHE;
-}
-
-sub load_cache
-{
- print "Found cached translation database\n" unless $QUIET_ARG;
-
- my $contents;
- open CACHE, "<$cache_file" || die;
- {
- local $/;
- $contents = <CACHE>;
- }
- close CACHE;
- %translations = split "\x01", $contents;
-}
-
-sub get_cached_translation_database
-{
- my $cache_file_age = -M $cache_file;
- if (defined $cache_file_age)
- {
- if ($cache_file_age <= &get_newest_po_age)
- {
- &load_cache;
- return;
- }
- print "Found too-old cached translation database\n" unless $QUIET_ARG;
- }
-
- &create_cache;
-}
-
-sub create_translation_database
-{
- for my $lang (keys %po_files_by_lang)
- {
- my $po_file = $po_files_by_lang{$lang};
-
- if ($UTF8_ARG)
- {
- my $encoding = get_po_encoding ($po_file);
-
- if (lc $encoding eq "utf-8")
- {
- open PO_FILE, "<$po_file";
- }
- else
- {
- my $iconv = $ENV{"INTLTOOL_ICONV"} || "iconv";
- open PO_FILE, "$iconv -f $encoding -t UTF-8 $po_file|";
- }
- }
- else
- {
- open PO_FILE, "<$po_file";
- }
-
- my $nextfuzzy = 0;
- my $inmsgid = 0;
- my $inmsgstr = 0;
- my $msgid = "";
- my $msgstr = "";
-
- while (<PO_FILE>)
- {
- $nextfuzzy = 1 if /^#, fuzzy/;
-
- if (/^msgid "((\\.|[^\\])*)"/ )
- {
- $translations{$lang, $msgid} = $msgstr if $inmsgstr && $msgid && $msgstr;
- $msgid = "";
- $msgstr = "";
-
- if ($nextfuzzy) {
- $inmsgid = 0;
- } else {
- $msgid = unescape_po_string($1);
- $inmsgid = 1;
- }
- $inmsgstr = 0;
- $nextfuzzy = 0;
- }
-
- if (/^msgstr "((\\.|[^\\])*)"/)
- {
- $msgstr = unescape_po_string($1);
- $inmsgstr = 1;
- $inmsgid = 0;
- }
-
- if (/^"((\\.|[^\\])*)"/)
- {
- $msgid .= unescape_po_string($1) if $inmsgid;
- $msgstr .= unescape_po_string($1) if $inmsgstr;
- }
- }
- $translations{$lang, $msgid} = $msgstr if $inmsgstr && $msgid && $msgstr;
- }
-}
-
-sub finalize
-{
-}
-
-sub unescape_one_sequence
-{
- my ($sequence) = @_;
-
- return "\\" if $sequence eq "\\\\";
- return "\"" if $sequence eq "\\\"";
- return "\n" if $sequence eq "\\n";
-
- # gettext also handles \n, \t, \b, \r, \f, \v, \a, \xxx (octal),
- # \xXX (hex) and has a comment saying they want to handle \u and \U.
-
- return $sequence;
-}
-
-sub unescape_po_string
-{
- my ($string) = @_;
-
- $string =~ s/(\\.)/unescape_one_sequence($1)/eg;
-
- return $string;
-}
-
-## NOTE: deal with < - &lt; but not > - &gt; because it seems its ok to have
-## > in the entity. For further info please look at #84738.
-sub entity_decode
-{
- local ($_) = @_;
-
- s/&apos;/'/g; # '
- s/&quot;/"/g; # "
- s/&amp;/&/g;
- s/&lt;/</g;
-
- return $_;
-}
-
-sub entity_encode
-{
- my ($pre_encoded) = @_;
-
- my @list_of_chars = unpack ('C*', $pre_encoded);
-
- if ($PASS_THROUGH_ARG)
- {
- return join ('', map (&entity_encode_int_even_high_bit, @list_of_chars));
- }
- else
- {
- return join ('', map (&entity_encode_int_minimalist, @list_of_chars));
- }
-}
-
-sub entity_encode_int_minimalist
-{
- return "&quot;" if $_ == 34;
- return "&amp;" if $_ == 38;
- return "&apos;" if $_ == 39;
- return "&lt;" if $_ == 60;
- return chr $_;
-}
-
-sub entity_encode_int_even_high_bit
-{
- if ($_ > 127 || $_ == 34 || $_ == 38 || $_ == 39 || $_ == 60)
- {
- # the ($_ > 127) should probably be removed
- return "&#" . $_ . ";";
- }
- else
- {
- return chr $_;
- }
-}
-
-sub entity_encoded_translation
-{
- my ($lang, $string) = @_;
-
- my $translation = $translations{$lang, $string};
- return $string if !$translation;
- return entity_encode ($translation);
-}
-
-## XML (bonobo-activation specific) merge code
-
-sub ba_merge_translations
-{
- my $source;
-
- {
- local $/; # slurp mode
- open INPUT, "<$FILE" or die "can't open $FILE: $!";
- $source = <INPUT>;
- close INPUT;
- }
-
- open OUTPUT, ">$OUTFILE" or die "can't open $OUTFILE: $!";
-
- while ($source =~ s|^(.*?)([ \t]*<\s*$w+\s+($w+\s*=\s*"$q"\s*)+/?>)([ \t]*\n)?||s)
- {
- print OUTPUT $1;
-
- my $node = $2 . "\n";
-
- my @strings = ();
- $_ = $node;
- while (s/(\s)_($w+\s*=\s*"($q)")/$1$2/s) {
- push @strings, entity_decode($3);
- }
- print OUTPUT;
-
- my %langs;
- for my $string (@strings)
- {
- for my $lang (keys %po_files_by_lang)
- {
- $langs{$lang} = 1 if $translations{$lang, $string};
- }
- }
-
- for my $lang (sort keys %langs)
- {
- $_ = $node;
- s/(\sname\s*=\s*)"($q)"/$1"$2-$lang"/s;
- s/(\s)_($w+\s*=\s*")($q)"/$1 . $2 . entity_encoded_translation($lang, $3) . '"'/seg;
- print OUTPUT;
- }
- }
-
- print OUTPUT $source;
-
- close OUTPUT;
-}
-
-
-## XML (non-bonobo-activation) merge code
-
-sub xml_merge_translations
-{
- my $source;
-
- {
- local $/; # slurp mode
- open INPUT, "<$FILE" or die "can't open $FILE: $!";
- $source = <INPUT>;
- close INPUT;
- }
-
- open OUTPUT, ">$OUTFILE" or die;
-
- # FIXME: support attribute translations
-
- # Empty nodes never need translation, so unmark all of them.
- # For example, <_foo/> is just replaced by <foo/>.
- $source =~ s|<\s*_($w+)\s*/>|<$1/>|g;
-
- # Support for <_foo>blah</_foo> style translations.
- while ($source =~ s|^(.*?)([ \t]*)<\s*_($w+)\s*>(.*?)<\s*/_\3\s*>([ \t]*\n)?||s)
- {
- print OUTPUT $1;
-
- my $spaces = $2;
- my $tag = $3;
- my $string = $4;
-
- print OUTPUT "$spaces<$tag>$string</$tag>\n";
-
- $string =~ s/\s+/ /g;
- $string =~ s/^ //;
- $string =~ s/ $//;
- $string = entity_decode($string);
-
- for my $lang (sort keys %po_files_by_lang)
- {
- my $translation = $translations{$lang, $string};
- next if !$translation;
- $translation = entity_encode($translation);
- print OUTPUT "$spaces<$tag xml:lang=\"$lang\">$translation</$tag>\n";
- }
- }
-
- print OUTPUT $source;
-
- close OUTPUT;
-}
-
-sub keys_merge_translations
-{
- open INPUT, "<${FILE}" or die;
- open OUTPUT, ">${OUTFILE}" or die;
-
- while (<INPUT>)
- {
- if (s/^(\s*)_(\w+=(.*))/$1$2/)
- {
- my $string = $3;
-
- print OUTPUT;
-
- my $non_translated_line = $_;
-
- for my $lang (sort keys %po_files_by_lang)
- {
- my $translation = $translations{$lang, $string};
- next if !$translation;
-
- $_ = $non_translated_line;
- s/(\w+)=.*/[$lang]$1=$translation/;
- print OUTPUT;
- }
- }
- else
- {
- print OUTPUT;
- }
- }
-
- close OUTPUT;
- close INPUT;
-}
-
-sub desktop_merge_translations
-{
- open INPUT, "<${FILE}" or die;
- open OUTPUT, ">${OUTFILE}" or die;
-
- while (<INPUT>)
- {
- if (s/^(\s*)_(\w+=(.*))/$1$2/)
- {
- my $string = $3;
-
- print OUTPUT;
-
- my $non_translated_line = $_;
-
- for my $lang (sort keys %po_files_by_lang)
- {
- my $translation = $translations{$lang, $string};
- next if !$translation;
-
- $_ = $non_translated_line;
- s/(\w+)=.*/${1}[$lang]=$translation/;
- print OUTPUT;
- }
- }
- else
- {
- print OUTPUT;
- }
- }
-
- close OUTPUT;
- close INPUT;
-}
-
-sub schemas_merge_translations
-{
- my $source;
-
- {
- local $/; # slurp mode
- open INPUT, "<$FILE" or die "can't open $FILE: $!";
- $source = <INPUT>;
- close INPUT;
- }
-
- open OUTPUT, ">$OUTFILE" or die;
-
- # FIXME: support attribute translations
-
- # Empty nodes never need translation, so unmark all of them.
- # For example, <_foo/> is just replaced by <foo/>.
- $source =~ s|<\s*_($w+)\s*/>|<$1/>|g;
-
- while ($source =~ s/
- (.*?)
- (\s+)(<locale\ name="C">(\s*)
- (<default>\s*(.*?)\s*<\/default>)?(\s*)
- (<short>\s*(.*?)\s*<\/short>)?(\s*)
- (<long>\s*(.*?)\s*<\/long>)?(\s*)
- <\/locale>)
- //sx)
- {
- print OUTPUT $1;
-
- my $locale_start_spaces = $2 ? $2 : '';
- my $default_spaces = $4 ? $4 : '';
- my $short_spaces = $7 ? $7 : '';
- my $long_spaces = $10 ? $10 : '';
- my $locale_end_spaces = $13 ? $13 : '';
- my $c_default_block = $3 ? $3 : '';
- my $default_string = $6 ? $6 : '';
- my $short_string = $9 ? $9 : '';
- my $long_string = $12 ? $12 : '';
-
- $c_default_block =~ s/default>\[.*?\]/default>/s;
-
- print OUTPUT "$locale_start_spaces$c_default_block";
-
- $default_string =~ s/\s+/ /g;
- $default_string = entity_decode($default_string);
- $short_string =~ s/\s+/ /g;
- $short_string = entity_decode($short_string);
- $long_string =~ s/\s+/ /g;
- $long_string = entity_decode($long_string);
-
- for my $lang (sort keys %po_files_by_lang)
- {
- my $default_translation = $translations{$lang, $default_string};
- my $short_translation = $translations{$lang, $short_string};
- my $long_translation = $translations{$lang, $long_string};
-
- next if (!$default_translation && !$short_translation &&
- !$long_translation);
-
- print OUTPUT "\n$locale_start_spaces<locale name=\"$lang\">";
-
- print OUTPUT "$default_spaces";
-
- if ($default_translation)
- {
- $default_translation = entity_encode($default_translation);
- print OUTPUT "<default>$default_translation</default>";
- }
-
- print OUTPUT "$short_spaces";
-
- if ($short_translation)
- {
- $short_translation = entity_encode($short_translation);
- print OUTPUT "<short>$short_translation</short>";
- }
-
- print OUTPUT "$long_spaces";
-
- if ($long_translation)
- {
- $long_translation = entity_encode($long_translation);
- print OUTPUT "<long>$long_translation</long>";
- }
-
- print OUTPUT "$locale_end_spaces</locale>";
- }
- }
-
- print OUTPUT $source;
-
- close OUTPUT;
-}
-
-sub rfc822deb_merge_translations
-{
- my $source;
-
- $Text::Wrap::huge = 'overflow';
-
- {
- local $/; # slurp mode
- open INPUT, "<$FILE" or die "can't open $FILE: $!";
- $source = <INPUT>;
- close INPUT;
- }
-
- open OUTPUT, ">${OUTFILE}" or die;
-
- while ($source =~ /(^|\n+)(_)?([^:_\n]+)(:\s*)(.*?)(?=\n[\S\n]|$)/sg)
- {
- my $sep = $1;
- my $non_translated_line = $3.$4;
- my $string = $5;
- my $is_translatable = defined($2);
- # Remove [] dummy strings
- $string =~ s/\[\s[^\[\]]*\]$//;
- $non_translated_line .= $string;
-
- print OUTPUT $sep.$non_translated_line;
-
- if ($is_translatable)
- {
- my @str_list = rfc822deb_split($string);
-
- for my $lang (sort keys %po_files_by_lang)
- {
- my $is_translated = 1;
- my $str_translated = '';
- my $first = 1;
-
- for my $str (@str_list)
- {
- my $translation = $translations{$lang, $str};
-
- if (!$translation)
- {
- $is_translated = 0;
- last;
- }
-
- # $translation may also contain [] dummy
- # strings, mostly to indicate an empty string
- $translation =~ s/\[\s[^\[\]]*\]$//;
-
- if ($first)
- {
- $str_translated .=
- Text::Tabs::expand($translation) .
- "\n";
- }
- else
- {
- $str_translated .= Text::Tabs::expand(
- Text::Wrap::wrap(' ', ' ', $translation)) .
- "\n .\n";
- }
- $first = 0;
-
- # To fix some problems with Text::Wrap::wrap
- $str_translated =~ s/(\n )+\n/\n .\n/g;
- }
- next unless $is_translated;
-
- $str_translated =~ s/\n \.\n$//;
- $str_translated =~ s/\s+$//;
-
- $_ = $non_translated_line;
- s/^(\w+):\s*.*/$sep${1}-$lang: $str_translated/s;
- print OUTPUT;
- }
- }
- }
- print OUTPUT "\n";
-
- close OUTPUT;
- close INPUT;
-}
-
-sub rfc822deb_split
-{
- # Debian defines a special way to deal with rfc822-style files:
- # when a value contain newlines, it consists of
- # 1. a short form (first line)
- # 2. a long description, all lines begin with a space,
- # and paragraphs are separated by a single dot on a line
- # This routine returns an array of all paragraphs, and reformat
- # them.
- my $text = shift;
- $text =~ s/^ //mg;
- return ($text) if $text !~ /\n/;
-
- $text =~ s/([^\n]*)\n//;
- my @list = ($1);
- my $str = '';
-
- for my $line (split (/\n/, $text))
- {
- chomp $line;
- $line =~ /\s+$/;
-
- if ($line =~ /^\.$/)
- {
- # New paragraph
- $str =~ s/\s*$//;
- push(@list, $str);
- $str = '';
- }
- elsif ($line =~ /^\s/)
- {
- # Line which must not be reformatted
- $str .= "\n" if length ($str) && $str !~ /\n$/;
- $str .= $line."\n";
- }
- else
- {
- # Continuation line, remove newline
- $str .= " " if length ($str) && $str !~ /[\n ]$/;
- $str .= $line;
- }
- }
-
- $str =~ s/\s*$//;
- push(@list, $str) if length ($str);
-
- return @list;
-}
-
diff --git a/bonobo/intltool-update.in b/bonobo/intltool-update.in
deleted file mode 100644
index 2004a5985..000000000
--- a/bonobo/intltool-update.in
+++ /dev/null
@@ -1,642 +0,0 @@
-#!@INTLTOOL_PERL@ -w
-
-#
-# The Intltool Message Updater
-#
-# Copyright (C) 2000-2002 Free Software Foundation.
-#
-# Intltool is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# version 2 published by the Free Software Foundation.
-#
-# Intltool is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-#
-# Authors: Kenneth Christiansen <kenneth@gnu.org>
-# Maciej Stachowiak
-# Darin Adler <darin@bentspoon.com>
-
-## Release information
-my $PROGRAM = "intltool-update";
-my $VERSION = "0.25";
-my $PACKAGE = "intltool";
-
-## Loaded modules
-use strict;
-use Getopt::Long;
-use Cwd;
-use File::Copy;
-use File::Find;
-
-## Scalars used by the option stuff
-my $HELP_ARG = 0;
-my $VERSION_ARG = 0;
-my $DIST_ARG = 0;
-my $POT_ARG = 0;
-my $HEADERS_ARG = 0;
-my $MAINTAIN_ARG = 0;
-my $REPORT_ARG = 0;
-my $VERBOSE = 0;
-my $GETTEXT_PACKAGE = "";
-
-my @languages;
-my %po_files_by_lang = ();
-
-# Regular expressions to categorize file types.
-# FIXME: Please check if the following is correct
-
-my $xml_extension =
-"xml(\.in)*|". # .in is not required
-"ui|".
-"glade2?(\.in)*|". # .in is not required
-"scm(\.in)*|". # .in is not required
-"oaf(\.in)+|".
-"etspec|".
-"sheet(\.in)+|".
-"schemas(\.in)+|".
-"pong(\.in)+";
-
-my $ini_extension =
-"desktop(\.in)+|".
-"caves(\.in)+|".
-"directory(\.in)+|".
-"soundlist(\.in)+|".
-"keys(\.in)+|".
-"theme(\.in)+|".
-"server(\.in)+";
-
-## Always print as the first thing
-$| = 1;
-
-## Handle options
-GetOptions
-(
- "help" => \$HELP_ARG,
- "version" => \$VERSION_ARG,
- "dist|d" => \$DIST_ARG,
- "pot|p" => \$POT_ARG,
- "headers|s" => \$HEADERS_ARG,
- "maintain|m" => \$MAINTAIN_ARG,
- "report|r" => \$REPORT_ARG,
- "verbose|x" => \$VERBOSE,
- "gettext-package|g=s" => \$GETTEXT_PACKAGE,
- ) or &print_error_invalid_option;
-
-&print_help if $HELP_ARG;
-&print_version if $VERSION_ARG;
-
-my $arg_count = ($DIST_ARG > 0)
- + ($POT_ARG > 0)
- + ($HEADERS_ARG > 0)
- + ($MAINTAIN_ARG > 0)
- + ($REPORT_ARG > 0);
-&print_help if $arg_count > 1;
-
-# --version and --help don't require a module name
-my $MODULE = $GETTEXT_PACKAGE || &find_package_name;
-
-if ($DIST_ARG) {
- if ($ARGV[0] =~ /^[a-z]/){
- &update_po_file ($ARGV[0]);
- &print_status ($ARGV[0]);
- } else {
- &print_help;
- }
-} elsif ($POT_ARG) {
- &generate_headers;
- &generate_po_template;
-} elsif ($HEADERS_ARG) {
- &generate_headers;
-} elsif ($MAINTAIN_ARG) {
- &find_leftout_files;
-} elsif ($REPORT_ARG) {
- &print_report;
-} else {
- if ($ARGV[0] =~ /^[a-z]/) {
- &main ($ARGV[0]);
- } else {
- &print_help;
- }
-}
-
-exit;
-
-#########
-
-sub print_version
-{
- ## Print version information
- print "${PROGRAM} (${PACKAGE}) $VERSION\n";
- print "Written by Kenneth Christiansen, Maciej Stachowiak, and Darin Adler.\n\n";
- print "Copyright (C) 2000-2002 Free Software Foundation, Inc.\n";
- print "This is free software; see the source for copying conditions. There is NO\n";
- print "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n";
- exit;
-}
-
-sub print_help
-{
- ## Print usage information
- print "Usage: ${PROGRAM} [OPTIONS] ...LANGCODE\n";
- print "Updates PO template files and merge them with the translations.\n\n";
- print " -p, --pot generate the PO template only\n";
- print " -s, --headers generate the header files in POTFILES.in\n";
- print " -m, --maintain search for left out files from POTFILES.in\n";
- print " -r, --report display a status report for the module.\n";
- print " -x, --verbose display lots of feedback\n";
- print " --help display this help and exit\n";
- print " --version output version information and exit\n";
- print "\nExamples of use:\n";
- print "${PROGRAM} --pot just creates a new PO template from the source\n";
- print "${PROGRAM} da created new PO template and updated the da.po file\n\n";
- print "Report bugs to bugzilla.gnome.org, module 'intltool'.\n";
- exit;
-}
-
-sub main
-{
- my ($lang) = @_;
-
- ## Report error if the language file supplied
- ## to the command line is non-existent
- &print_error_not_existing("$lang.po") if ! -s "$lang.po";
-
- print "Working, please wait..." unless $VERBOSE;
- &generate_headers;
- &generate_po_template;
- &update_po_file ($lang);
- &print_status ($lang);
-}
-
-sub determine_type ($)
-{
- my $type = $_;
- my $gettext_type;
-
- # FIXME: Use $xml_extentions, and maybe do all this even nicer
- my $xml_regex =
- "(?:xml(\.in)*|ui|oaf(?:\.in)+|server(?:\.in)+|sheet(?:\.in)+|".
- "pong(?:\.in)+|etspec|schemas(?:\.in)+)";
- my $ini_regex =
- "(?:desktop(?:\.in)+|theme(?:\.in)+|caves(?:\.in)+|directory(?:\.in)+|".
- "soundlist(?:\.in)+)";
-
- if ($type =~ /\[type: gettext\/([^\]].*)]/) {
- $gettext_type=$1;
- }
- elsif ($type =~ /schemas(\.in)+$/) {
- $gettext_type="schemas";
- }
- elsif ($type =~ /$xml_regex$/) {
- $gettext_type="xml";
- }
- elsif ($type =~ /glade2?(\.in)*$/) {
- $gettext_type="glade";
- }
- elsif ($type =~ /$ini_regex$/) {
- $gettext_type="ini";
- }
- elsif ($type =~ /scm(\.in)*$/) {
- $gettext_type="scheme";
- }
- elsif ($type =~ /keys(\.in)+$/) {
- $gettext_type="keys";
- }
- else { $gettext_type=""; }
-
- return "gettext\/$gettext_type";
-}
-
-sub find_leftout_files
-{
- my (@buf_i18n_plain,
- @buf_i18n_xml,
- @buf_i18n_xml_unmarked,
- @buf_i18n_ini,
- @buf_potfiles,
- @buf_potfiles_ignore,
- @buf_allfiles,
- @buf_allfiles_sorted,
- @buf_potfiles_sorted
- );
-
- ## Search and find all translatable files
- find sub {
- push @buf_i18n_plain, "$File::Find::name" if /\.(c|y|cc|cpp|c\+\+|h|gob)$/
- }, "..";
- find sub {
- push @buf_i18n_xml, "$File::Find::name" if /\.($xml_extension)$/
- }, "..";
- find sub {
- push @buf_i18n_ini, "$File::Find::name" if /\.($ini_extension)$/
- }, "..";
- find sub {
- push @buf_i18n_xml_unmarked, "$File::Find::name" if /\.(schemas(\.in)+)$/
- }, "..";
-
-
- open POTFILES, "POTFILES.in" or die "$PROGRAM: there's no POTFILES.in!\n";
-
- @buf_potfiles = grep /^[^#]/, <POTFILES>;
- foreach (@buf_potfiles) {
- s/^\[.*]\s*//;
- }
-
- print "Searching for missing translatable files...\n" if $VERBOSE;
-
- ## Check if we should ignore some found files, when
- ## comparing with POTFILES.in
- foreach my $ignore ("POTFILES.skip", "POTFILES.ignore") {
- if (-s $ignore) {
- open FILE, $ignore;
- while (<FILE>) {
- if (/^[^#]/){
- push @buf_potfiles_ignore, $_;
- }
- }
- print "Found $ignore: Ignoring files...\n" if $VERBOSE;
- @buf_potfiles = (@buf_potfiles_ignore, @buf_potfiles);
- }
- }
-
- foreach my $file (@buf_i18n_plain)
- {
- my $in_comment = 0;
- my $in_macro = 0;
-
- open FILE, "<$file";
- while (<FILE>)
- {
- # Handle continued multi-line comment.
- if ($in_comment)
- {
- next unless s-.*\*/--;
- $in_comment = 0;
- }
-
- # Handle continued macro.
- if ($in_macro)
- {
- $in_macro = 0 unless /\\$/;
- next;
- }
-
- # Handle start of macro (or any preprocessor directive).
- if (/^\s*\#/)
- {
- $in_macro = 1 if /^([^\\]|\\.)*\\$/;
- next;
- }
-
- # Handle comments and quoted text.
- while (m-(/\*|//|\'|\")-) # \' and \" keep emacs perl mode happy
- {
- my $match = $1;
- if ($match eq "/*")
- {
- if (!s-/\*.*?\*/--)
- {
- s-/\*.*--;
- $in_comment = 1;
- }
- }
- elsif ($match eq "//")
- {
- s-//.*--;
- }
- else # ' or "
- {
- if (!s-$match([^\\]|\\.)*?$match-QUOTEDTEXT-)
- {
- warn "mismatched quotes at line $. in $file\n";
- s-$match.*--;
- }
- }
- }
-
-
- if (/_\(QUOTEDTEXT/)
- {
- ## Remove the first 3 chars and add newline
- push @buf_allfiles, unpack("x3 A*", $file) . "\n";
- last;
- }
- }
- close FILE;
- }
-
- foreach my $file (@buf_i18n_xml) {
- open FILE, "<$file";
- while (<FILE>) {
- if (/\s_(.*)=\"/ || /translatable=\"yes\"/){
- push @buf_allfiles, unpack("x3 A*", $file) . "\n";
- last;
- }
- }
- }
-
- foreach my $file (@buf_i18n_ini){
- open FILE, "<$file";
- while (<FILE>) {
- if (/_(.*)=/){
- push @buf_allfiles, unpack("x3 A*", $file) . "\n";
- last;
- }
- }
- }
-
- foreach my $file (@buf_i18n_xml_unmarked){
- push @buf_allfiles, unpack("x3 A*", $file) . "\n";
- }
-
-
- @buf_allfiles_sorted = sort (@buf_allfiles);
- @buf_potfiles_sorted = sort (@buf_potfiles);
-
- my %in2;
- foreach (@buf_potfiles_sorted) {
- $in2{$_} = 1;
- }
-
- my @result;
-
- foreach (@buf_allfiles_sorted){
- if (!exists($in2{$_})){
- push @result, $_
- }
- }
-
- ## Save file with information about the files missing
- ## if any, and give information about this procedure.
- if (@result) {
- print "\n" if $VERBOSE;
- open OUT, ">missing";
- print OUT @result;
- print "The following files contain translations and are currently not in use. Please\n";
- print "consider adding these to the POTFILES.in file, located in the po/ directory.\n\n";
- print @result, "\n";
- print "If some of these files are left out on purpose then please add them to\n";
- print "POTFILES.skip instead of POTFILES.in. A file 'missing' containing this list\n";
- print "of left out files has been written in the current directory.\n";
- }
-
- ## If there is nothing to complain about, notify the user
- else {
- print "\nAll files containing translations are present in POTFILES.in.\n";
- }
-}
-
-sub print_error_invalid_option
-{
- ## Handle invalid arguments
- print "Try `${PROGRAM} --help' for more information.\n";
- exit 1;
-}
-
-sub generate_headers
-{
- my $EXTRACT = `which intltool-extract 2>/dev/null`;
- chomp $EXTRACT;
-
- $EXTRACT = $ENV{"INTLTOOL_EXTRACT"} if $ENV{"INTLTOOL_EXTRACT"};
-
- ## Generate the .h header files, so we can allow glade and
- ## xml translation support
- if (! -s $EXTRACT)
- {
- print "\n *** The intltool-extract script wasn't found!"
- ."\n *** Without it, intltool-update can not generate files.\n";
- exit;
- }
- else
- {
- open FILE, "<POTFILES.in";
- while (<FILE>) {
- chomp;
-
- ## Find xml files in POTFILES.in and generate the
- ## files with help from the extract script
-
- my $gettext_type= &determine_type ($1);
-
- if (/\.($xml_extension|$ini_extension)$/ || /^\[/){
- $_ =~ s/^\[[^\[].*]\s*//;
- my $filename = "../$_";
-
- if ($VERBOSE){
- system($EXTRACT, "--update", "--type=$gettext_type", $filename);
- } else {
- system($EXTRACT, "--update", "--type=$gettext_type", "--quiet", $filename);
- }
- }
- }
- close FILE;
- }
-}
-
-sub generate_po_template
-{
- ## Generate the potfiles from the POTFILES.in file
-
- print "Building the $MODULE.pot...\n" if $VERBOSE;
-
- move ("POTFILES.in", "POTFILES.in.old");
-
- open INFILE, "<POTFILES.in.old";
- open OUTFILE, ">POTFILES.in";
- while (<INFILE>) {
- chomp;
- if (/\.($xml_extension|$ini_extension)$/ || /^\[/) {
- s/^\[.*]\s*//;
- print OUTFILE "$_.h\n";
- } else {
- print OUTFILE "$_\n";
- }
- }
- close OUTFILE;
- close INFILE;
-
- system ("xgettext", "--default-domain\=$MODULE",
- "--directory\=\.\.",
- "--add-comments",
- "--keyword\=\_",
- "--keyword\=N\_",
- "--keyword\=U\_",
- "--files-from\=\.\/POTFILES\.in");
-
- move ("POTFILES.in.old", "POTFILES.in");
-
- print "Removing generated header (.h) files..." if $VERBOSE;
-
- open FILE, "<POTFILES.in";
-
- while (<FILE>)
- {
- chomp;
- unlink "../$_.h" if /\.($xml_extension|$ini_extension)$/;
- }
-
- close FILE;
- print "done\n" if $VERBOSE;
-
- if (!-e "$MODULE.po") {
- print "WARNING: It seems that none of the files in POTFILES.in ".
- "contain marked strings\n";
- exit (1);
- }
-
- system ("rm", "-f", "$MODULE.pot");
- move ("$MODULE.po", "$MODULE.pot") or die "$PROGRAM: couldn't move $MODULE.po to $MODULE.pot.\n";
-
- print "Wrote $MODULE.pot\n" if $VERBOSE;
-}
-
-sub update_po_file
-{
- my ($lang) = @_;
-
- print "Merging $lang.po with $MODULE.pot..." if $VERBOSE;
-
- copy ("$lang.po", "$lang.po.old") || die "copy failed: $!";
-
- # Perform merge, remove backup file and the "messages" trash file
- # generated by gettext
- system ("msgmerge", "$lang.po.old", "$MODULE.pot", "-o", "$lang.po");
- unlink "$lang.po.old";
- unlink "messages";
-}
-
-sub print_error_not_existing
-{
- my ($file) = @_;
-
- ## Report error if supplied language file is non-existing
- print "$PROGRAM: $file does not exist!\n";
- print "Try '$PROGRAM --help' for more information.\n";
- exit;
-}
-
-sub gather_po_files
-{
- my @po_files = glob ("./*.po");
-
- @languages = map (&po_file2lang, @po_files);
-
- foreach my $lang (@languages) {
- $po_files_by_lang{$lang} = shift (@po_files);
- }
-}
-
-sub po_file2lang ($)
-{
- my $tmp = $_;
- $tmp =~ s/^.*\/(.*)\.po$/$1/;
- return $tmp;
-}
-
-sub print_status
-{
- my ($lang) = @_;
-
- system ("msgfmt", "--statistics", "$lang.po");
- print "\n";
-}
-
-sub print_report
-{
- &generate_headers;
- &generate_po_template;
- &gather_po_files;
-
- foreach my $lang (@languages) {
- print "$lang: ";
- &update_po_file ($lang);
- }
-
- print "\n\n * Current translation support in $MODULE \n\n";
-
- foreach my $lang (@languages){
- print "$lang: ";
- system ("msgfmt", "--statistics", "$lang.po");
- }
-}
-
-sub find_package_name
-{
- my $base_dirname = getcwd();
- $base_dirname =~ s@.*/@@;
-
- my ($conf_in, $src_dir);
-
- if ($base_dirname =~ /^po(-.+)?$/) {
- if (-f "../configure.in") {
- $conf_in = "../configure.in";
- } elsif (-f "../configure.ac") {
- $conf_in = "../configure.ac";
- } else {
- my $makefile_source;
- local (*IN);
- open IN, "<Makefile" || die "can't open Makefile: $!";
-
- while (<IN>) {
- if (/^top_srcdir[ \t]*=/) {
- $src_dir = $_;
- # print "${src_dir}\n";
-
- $src_dir =~ s/^top_srcdir[ \t]*=[ \t]*([^ \t\n\r]*)/$1/;
- # print "${src_dir}\n";
- chomp $src_dir;
- $conf_in = "$src_dir" . "/configure.in" . "\n";
- last;
- }
- }
- $conf_in || die "Cannot find top_srcdir in Makefile."
- }
-
- my %varhash = ();
- my $conf_source; {
- local (*IN);
- open (IN, "<$conf_in") || die "can't open $conf_in: $!";
- while (<IN>) {
- if (/^(\w+)=(\S+)/) { $varhash{$1} = $2 };
- }
- seek (IN, 0, 0);
- local $/; # slurp mode
- $conf_source = <IN>;
- }
-
- my $name = "";
- $name = $1 if $conf_source =~ /^AM_INIT_AUTOMAKE\([\s\[]*([^,\)\s\]]+)/m;
- if ($conf_source =~ /^AC_INIT\([\s\[]*([^,\)\s\]]+)\]?\s*,/m) {
- $name = $1;
- $varhash{"AC_PACKAGE_NAME"} = $1;
- }
- $name = $1 if $conf_source =~ /^GETTEXT_PACKAGE=\[?([^\s\]]+)/m;
-
- $name = "\$AC_PACKAGE_NAME" if "$name" eq "AC_PACKAGE_NAME";
-
- my $oldname = "";
- while (($name =~ /[\$](\S+)/) && ("$oldname" ne "$name")) {
- $oldname = $name;
- if (exists $varhash{$1}) {
- $name =~ s/[\$](\S+)/$varhash{$1}/;
- }
- }
- return $name if $name;
- }
-
- print "$PROGRAM: Unable to determine package name.\n" .
- "Make sure to run this script inside the po directory.\n";
- exit;
-}
diff --git a/bonobo/local-build.sh b/bonobo/local-build.sh
deleted file mode 100755
index e40e2b2e3..000000000
--- a/bonobo/local-build.sh
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/sh
-
-TAG='OOO_1_1_0'
-CWD=`pwd`;
-./autogen.sh --with-ooo-solver-dir=$CWD/../build/$TAG/solver/645/unxlngi4.pro --with-ooo-install-dir=/usr/lib/ooo-1.1.0 --prefix=/usr --sysconfdir=/etc
-make
diff --git a/bonobo/po/.cvsignore b/bonobo/po/.cvsignore
deleted file mode 100644
index 86f8fefa2..000000000
--- a/bonobo/po/.cvsignore
+++ /dev/null
@@ -1,6 +0,0 @@
-Makefile
-Makefile.in
-Makefile.in.in
-POTFILES
-*.gmo
-ooo-bonobo.pot
diff --git a/bonobo/po/POTFILES.in b/bonobo/po/POTFILES.in
deleted file mode 100644
index ac7b48fe9..000000000
--- a/bonobo/po/POTFILES.in
+++ /dev/null
@@ -1,3 +0,0 @@
-src/main.cxx
-data/GNOME_OpenOfficeOrg.server.in.in
-data/ooo-bonobo-control-ui.xml
diff --git a/bonobo/po/de.po b/bonobo/po/de.po
deleted file mode 100644
index 3f51d9def..000000000
--- a/bonobo/po/de.po
+++ /dev/null
@@ -1,162 +0,0 @@
-# SOME DESCRIPTIVE TITLE.
-# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the PACKAGE package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
-#
-#, fuzzy
-msgid ""
-msgstr ""
-"Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 2003-10-28 18:08+0000\n"
-"PO-Revision-Date: 2003-10-06 13:12+0200\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: LANGUAGE <LL@li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Report-Msgid-Bugs-To: \n"
-
-#. extern "C"
-#: data/GNOME_OpenOfficeOrg.server.in.in.h:1
-msgid "OpenOffice.org Document"
-msgstr "OpenOffice.org-Dokument"
-
-#: data/GNOME_OpenOfficeOrg.server.in.in.h:2
-msgid "OpenOffice.org Viewer"
-msgstr "OpenOffice.org-Ansicht"
-
-#: data/GNOME_OpenOfficeOrg.server.in.in.h:3
-msgid "OpenOffice.org viewer factory"
-msgstr ""
-
-#: data/ooo-bonobo-control-ui.xml.h:1
-msgid "Best Fit"
-msgstr ""
-
-#: data/ooo-bonobo-control-ui.xml.h:2
-msgid "Best _Fit"
-msgstr ""
-
-#: data/ooo-bonobo-control-ui.xml.h:3
-msgid "Copy"
-msgstr ""
-
-#: data/ooo-bonobo-control-ui.xml.h:4
-msgid "Copy the selection"
-msgstr ""
-
-#: data/ooo-bonobo-control-ui.xml.h:5
-msgid "E_xport..."
-msgstr ""
-
-#: data/ooo-bonobo-control-ui.xml.h:6
-msgid "Expand to a larger size"
-msgstr ""
-
-#: data/ooo-bonobo-control-ui.xml.h:7
-msgid "Export"
-msgstr ""
-
-#: data/ooo-bonobo-control-ui.xml.h:8
-msgid "Export as PDF"
-msgstr ""
-
-#: data/ooo-bonobo-control-ui.xml.h:9
-msgid "Export as _PDF..."
-msgstr "Als _PDF exportieren..."
-
-#: data/ooo-bonobo-control-ui.xml.h:10
-msgid "Export the current file as PDF file"
-msgstr ""
-
-#: data/ooo-bonobo-control-ui.xml.h:11
-msgid "Normal Si_ze"
-msgstr ""
-
-#: data/ooo-bonobo-control-ui.xml.h:12
-msgid "Normal Size"
-msgstr ""
-
-#: data/ooo-bonobo-control-ui.xml.h:13
-msgid "Print"
-msgstr ""
-
-#: data/ooo-bonobo-control-ui.xml.h:14
-msgid "Print the current file"
-msgstr ""
-
-#: data/ooo-bonobo-control-ui.xml.h:15
-msgid "Proper_ties"
-msgstr ""
-
-#: data/ooo-bonobo-control-ui.xml.h:16
-msgid "Properties"
-msgstr ""
-
-#: data/ooo-bonobo-control-ui.xml.h:17
-msgid "Save _as..."
-msgstr ""
-
-#: data/ooo-bonobo-control-ui.xml.h:18
-msgid "Save as"
-msgstr ""
-
-#: data/ooo-bonobo-control-ui.xml.h:19
-msgid "Save the current file in a different format"
-msgstr ""
-
-#: data/ooo-bonobo-control-ui.xml.h:20
-msgid "Save the current file with a different name"
-msgstr ""
-
-#: data/ooo-bonobo-control-ui.xml.h:21
-msgid "Show the contents at the normal size"
-msgstr ""
-
-#: data/ooo-bonobo-control-ui.xml.h:22
-msgid "Shrink to a smaller size"
-msgstr ""
-
-#: data/ooo-bonobo-control-ui.xml.h:23
-msgid "Size to fit the page"
-msgstr ""
-
-#: data/ooo-bonobo-control-ui.xml.h:24
-msgid "View properties of the displayed document"
-msgstr ""
-
-#: data/ooo-bonobo-control-ui.xml.h:25
-msgid "Zoom In"
-msgstr ""
-
-#: data/ooo-bonobo-control-ui.xml.h:26
-msgid "Zoom Out"
-msgstr ""
-
-#: data/ooo-bonobo-control-ui.xml.h:27
-msgid "Zoom _In"
-msgstr ""
-
-#: data/ooo-bonobo-control-ui.xml.h:28
-msgid "Zoom _Out"
-msgstr ""
-
-#: data/ooo-bonobo-control-ui.xml.h:29
-msgid "_Copy"
-msgstr "_Kopieren"
-
-#: data/ooo-bonobo-control-ui.xml.h:30
-msgid "_Edit"
-msgstr "_Bearbeiten"
-
-#: data/ooo-bonobo-control-ui.xml.h:31
-msgid "_File"
-msgstr "_Datei"
-
-#: data/ooo-bonobo-control-ui.xml.h:32
-msgid "_Print..."
-msgstr "_Drucken..."
-
-#: data/ooo-bonobo-control-ui.xml.h:33
-msgid "_View"
-msgstr "_Ansicht"
diff --git a/bonobo/src/.cvsignore b/bonobo/src/.cvsignore
deleted file mode 100644
index d9e292d10..000000000
--- a/bonobo/src/.cvsignore
+++ /dev/null
@@ -1,5 +0,0 @@
-Makefile
-Makefile.in
-ooo-bonobo
-ooo-bonobo.bin
-test
diff --git a/bonobo/src/Makefile.am b/bonobo/src/Makefile.am
deleted file mode 100644
index 418a9a611..000000000
--- a/bonobo/src/Makefile.am
+++ /dev/null
@@ -1,31 +0,0 @@
-INCLUDES = \
- -DINIFILE=\"$(datadir)/ooo-bonobo/ooo-bonobo-uno-bootstraprc\" \
- -DDATADIR=\""$(datadir)"\" \
- -DRDBFILE=\""$(libdir)/ooo-bonobo/ooo-bonobo.rdb"\" \
- -DGNOMELOCALEDIR=\""$(datadir)/locale"\" \
- $(OOO_BONOBO_CFLAGS)
-
-LDADD = \
- $(OOO_BONOBO_LIBS)
-
-libexec_PROGRAMS = ooo-bonobo.bin
-
-noinst_PROGRAMS = test
-
-test_SOURCES = \
- remote-uno-helper.cxx \
- remote-uno-helper.h \
- star-frame-widget.cxx \
- star-frame-widget.h \
- test.cxx
-
-ooo_bonobo_bin_SOURCES = \
- ooo-bonobo-control.cxx \
- ooo-bonobo-control.h \
- remote-uno-helper.cxx \
- remote-uno-helper.h \
- services.h \
- star-frame-widget.cxx \
- star-frame-widget.h \
- string-macros.h \
- main.cxx
diff --git a/bonobo/src/main.cxx b/bonobo/src/main.cxx
deleted file mode 100644
index 4bd25ea63..000000000
--- a/bonobo/src/main.cxx
+++ /dev/null
@@ -1,62 +0,0 @@
-#include <string.h>
-#include <gtk/gtk.h>
-#include <libbonoboui.h>
-
-#include <com/sun/star/beans/XPropertySet.hpp>
-#include <com/sun/star/bridge/XUnoUrlResolver.hpp>
-#include <com/sun/star/document/XTypeDetection.hpp>
-#include <com/sun/star/frame/XDispatchProvider.hpp>
-#include <com/sun/star/frame/XDispatch.hpp>
-#include <com/sun/star/frame/XFrame.hpp>
-#include <com/sun/star/frame/XSynchronousFrameLoader.hpp>
-#include <com/sun/star/lang/XMultiComponentFactory.hpp>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#include <com/sun/star/util/URL.hpp>
-#include <com/sun/star/util/XURLTransformer.hpp>
-
-#include "ooo-bonobo-control.h"
-#include "remote-uno-helper.h"
-#include "services.h"
-#include "string-macros.h"
-#include "star-frame-widget.h"
-
-#define OAFIID "OAFIID:GNOME_OpenOfficeOrg_Control"
-
-using namespace com::sun::star;
-using namespace com::sun::star::beans;
-
-using rtl::OUString;
-using com::sun::star::uno::Reference;
-
-extern "C" {
-
-static BonoboObject *
-factory( BonoboGenericFactory *factory,
- const char *component_id,
- gpointer data )
-{
- if( !strcmp( component_id, OAFIID ) )
- {
- Reference< uno::XComponentContext > xRemoteContext = getComponentContext();
- g_assert( xRemoteContext.is() );
-
- BonoboControl *pControl =
- ooo_bonobo_control_new( xRemoteContext );
-
- return BONOBO_OBJECT( pControl );
- }
- return NULL;
-}
-
-int
-main( int argc, char *argv[] )
-{
- bindtextdomain( GETTEXT_PACKAGE, GNOMELOCALEDIR );
- bind_textdomain_codeset( GETTEXT_PACKAGE, "UTF-8" );
- textdomain( GETTEXT_PACKAGE );
-
- BONOBO_FACTORY_INIT( "ooo-bonobo", VERSION, &argc, argv );
- return bonobo_generic_factory_main( "OAFIID:GNOME_OpenOfficeOrg_Factory", factory, NULL );
-}
-
-} // extern "C"
diff --git a/bonobo/src/ooo-bonobo-control.cxx b/bonobo/src/ooo-bonobo-control.cxx
deleted file mode 100644
index 04040dffb..000000000
--- a/bonobo/src/ooo-bonobo-control.cxx
+++ /dev/null
@@ -1,498 +0,0 @@
-#include "ooo-bonobo-control.h"
-
-#include <libbonoboui.h>
-
-#include <com/sun/star/beans/XPropertySet.hpp>
-#include <com/sun/star/bridge/XUnoUrlResolver.hpp>
-#include <com/sun/star/document/XTypeDetection.hpp>
-#include <com/sun/star/frame/XDispatchProvider.hpp>
-#include <com/sun/star/frame/XDispatch.hpp>
-#include <com/sun/star/frame/XFrame.hpp>
-#include <com/sun/star/frame/XSynchronousFrameLoader.hpp>
-#include <com/sun/star/lang/XMultiComponentFactory.hpp>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#include <com/sun/star/util/URL.hpp>
-#include <com/sun/star/util/XURLTransformer.hpp>
-#include <com/sun/star/view/DocumentZoomType.hpp>
-
-#include "services.h"
-#include "star-frame-widget.h"
-
-#define OAFIID "OAFIID:GNOME_OpenOfficeOrg_Control"
-// 16% is the minimum for sc, sw crashes at <5%, sd can go down to 4%
-#define MIN_ZOOM 16
-// 500% is the maximum for sc, sw crashes at 1000%+, sd can go to 3600%
-#define MAX_ZOOM 500
-#define CLAMP_ZOOM(x) CLAMP(x, MIN_ZOOM, MAX_ZOOM)
-
-using namespace com::sun::star;
-using namespace com::sun::star::beans;
-
-using rtl::OUString;
-using com::sun::star::uno::Reference;
-
-struct _OOoBonoboControlPrivate {
- GtkWidget *hbox;
- StarFrameWidget *sfw;
- BonoboZoomable *zoomable;
-
- rtl::OUString uri;
- gboolean pending_load;
-};
-
-BONOBO_CLASS_BOILERPLATE( OOoBonoboControl, ooo_bonobo_control,
- BonoboControl, BONOBO_TYPE_CONTROL);
-
-#define URL_SAVEASDOC DECLARE_ASCII( "slot:5502" )
-#define URL_EXPORTDOC DECLARE_ASCII( "slot:5829" )
-#define URL_EXPORTDOCASPDF DECLARE_ASCII( "slot:6673" )
-#define URL_PRINTDOC DECLARE_ASCII( "slot:5504" )
-#define URL_DOCINFO DECLARE_ASCII( "slot:5535" )
-#define URL_COPY DECLARE_ASCII( "slot:5711" )
-
-static void
-zoomable_report_zoom_level_changed( BonoboZoomable *zoomable,
- Reference< XPropertySet > view_properties )
-{
- sal_Int16 zoom;
- uno::Any a = view_properties->getPropertyValue( DECLARE_ASCII( "ZoomValue" ) );
- a >>= zoom;
-
- CORBA_float zoom_level = zoom / 100.0;
- bonobo_zoomable_report_zoom_level_changed( zoomable, zoom_level, NULL );
-}
-
-static void
-zoomable_set_zoom_level_cb (BonoboZoomable *zoomable,
- CORBA_float new_zoom_level,
- OOoBonoboControl *user_data)
-{
- g_return_if_fail (IS_OOO_BONOBO_CONTROL (user_data));
-
- OOoBonoboControl *control = OOO_BONOBO_CONTROL( user_data );
-
- Reference< XPropertySet > view_properties(
- star_frame_widget_get_view_properties( control->priv->sfw ) );
-
- if( !view_properties.is() )
- return;
-
- view_properties->setPropertyValue(
- DECLARE_ASCII( "ZoomType" ),
- uno::makeAny( (sal_Int16) view::DocumentZoomType::BY_VALUE ));
- view_properties->setPropertyValue(
- DECLARE_ASCII( "ZoomValue" ),
- uno::makeAny( (sal_Int16) ( CLAMP_ZOOM( new_zoom_level * 100 ) ) ) );
-
- zoomable_report_zoom_level_changed( zoomable, view_properties );
-}
-
-static void
-zoom_in_cb (GtkObject *source, gpointer user_data)
-{
- g_return_if_fail (IS_OOO_BONOBO_CONTROL (user_data));
-
- OOoBonoboControl *control = OOO_BONOBO_CONTROL( user_data );
-
- Reference< XPropertySet > view_properties(
- star_frame_widget_get_view_properties( control->priv->sfw ) );
-
- if( !view_properties.is() )
- return;
-
- uno::Any a = view_properties->getPropertyValue( DECLARE_ASCII( "ZoomValue" ) );
- sal_Int16 view_zoom;
- a >>= view_zoom;
-
- view_zoom = ( sal_Int16 )( view_zoom * 1.2 );
- view_zoom = CLAMP_ZOOM( view_zoom );
-
- view_properties->setPropertyValue(
- DECLARE_ASCII( "ZoomType" ),
- uno::makeAny( (sal_Int16) view::DocumentZoomType::BY_VALUE ));
- view_properties->setPropertyValue( DECLARE_ASCII( "ZoomValue" ),
- uno::makeAny( view_zoom ) );
-
- zoomable_report_zoom_level_changed( control->priv->zoomable,
- view_properties );
-}
-
-static void
-zoom_out_cb (GtkObject *source, gpointer user_data)
-{
- g_return_if_fail (IS_OOO_BONOBO_CONTROL (user_data));
-
- OOoBonoboControl *control = OOO_BONOBO_CONTROL( user_data );
-
- Reference< XPropertySet > view_properties(
- star_frame_widget_get_view_properties( control->priv->sfw ) );
-
- if( !view_properties.is() )
- return;
-
- uno::Any a = view_properties->getPropertyValue( DECLARE_ASCII( "ZoomValue" ) );
- sal_Int16 view_zoom;
- a >>= view_zoom;
-
- view_zoom = ( sal_Int16 )( view_zoom / 1.2 );
- view_zoom = CLAMP_ZOOM( view_zoom );
-
- view_properties->setPropertyValue(
- DECLARE_ASCII( "ZoomType" ),
- uno::makeAny( (sal_Int16) view::DocumentZoomType::BY_VALUE ));
- view_properties->setPropertyValue( DECLARE_ASCII( "ZoomValue" ),
- uno::makeAny( view_zoom ) );
-
- zoomable_report_zoom_level_changed( control->priv->zoomable,
- view_properties );
-}
-
-static void
-zoom_to_fit_cb (GtkObject *source, gpointer user_data)
-{
- OOoBonoboControl *control = OOO_BONOBO_CONTROL( user_data );
-
- star_frame_widget_zoom_page_width( control->priv->sfw );
-
- zoomable_report_zoom_level_changed(
- control->priv->zoomable,
- star_frame_widget_get_view_properties( control->priv->sfw ) );
-}
-
-static void
-zoom_to_default_cb (GtkObject *source, gpointer user_data)
-{
- OOoBonoboControl *control = OOO_BONOBO_CONTROL( user_data );
-
- star_frame_widget_zoom_100( control->priv->sfw );
-
- zoomable_report_zoom_level_changed(
- control->priv->zoomable,
- star_frame_widget_get_view_properties( control->priv->sfw ) );
-}
-
-static void
-verb_FileSaveAs_cb( BonoboUIComponent *uic, gpointer user_data, const char *cname)
-{
- OOoBonoboControl *control = OOO_BONOBO_CONTROL( user_data );
-
- util::URL url;
- url.Complete = URL_SAVEASDOC;
-
- star_frame_widget_dispatch_slot_url( control->priv->sfw, url,
- uno::Sequence< PropertyValue >(0) );
-}
-
-static void
-verb_FileExport_cb( BonoboUIComponent *uic, gpointer user_data, const char *cname)
-{
- OOoBonoboControl *control = OOO_BONOBO_CONTROL( user_data );
-
- util::URL url;
- url.Complete = URL_EXPORTDOC;
-
- star_frame_widget_dispatch_slot_url( control->priv->sfw, url,
- uno::Sequence< PropertyValue >(0) );
-}
-
-static void
-verb_FileExportPDF_cb( BonoboUIComponent *uic, gpointer user_data, const char *cname)
-{
- OOoBonoboControl *control = OOO_BONOBO_CONTROL( user_data );
-
- util::URL url;
- url.Complete = URL_EXPORTDOCASPDF;
-
- star_frame_widget_dispatch_slot_url( control->priv->sfw, url,
- uno::Sequence< PropertyValue >(0) );
-}
-
-static void
-verb_FilePrint_cb( BonoboUIComponent *uic, gpointer user_data, const char *cname)
-{
- OOoBonoboControl *control = OOO_BONOBO_CONTROL( user_data );
-
- util::URL url;
- url.Complete = URL_PRINTDOC;
-
- star_frame_widget_dispatch_slot_url( control->priv->sfw, url,
- uno::Sequence< PropertyValue >(0) );
-}
-
-static void
-verb_FileProperties_cb( BonoboUIComponent *uic, gpointer user_data, const char *cname)
-{
- OOoBonoboControl *control = OOO_BONOBO_CONTROL( user_data );
-
- util::URL url;
- url.Complete = URL_DOCINFO;
-
- star_frame_widget_dispatch_slot_url( control->priv->sfw, url,
- uno::Sequence< PropertyValue >(0) );
-}
-
-
-// FIXME make insensitive when selection is empty
-static void
-verb_EditCopy_cb( BonoboUIComponent *uic, gpointer user_data, const char *cname)
-{
- OOoBonoboControl *control = OOO_BONOBO_CONTROL( user_data );
-
- util::URL url;
- url.Complete = URL_COPY;
-
- star_frame_widget_dispatch_slot_url( control->priv->sfw, url,
- uno::Sequence< PropertyValue >(0) );
-}
-
-static void
-verb_ZoomIn_cb( BonoboUIComponent *uic, gpointer user_data, const char *cname)
-{
- zoom_in_cb( NULL, user_data );
-}
-
-static void
-verb_ZoomOut_cb( BonoboUIComponent *uic, gpointer user_data, const char *cname)
-{
- zoom_out_cb( NULL, user_data );
-}
-
-static void
-verb_ZoomNormal_cb( BonoboUIComponent *uic, gpointer user_data, const char *cname)
-{
- zoom_to_default_cb( NULL, user_data );
-}
-
-static void
-verb_ZoomFit_cb( BonoboUIComponent *uic, gpointer user_data, const char *cname)
-{
- OOoBonoboControl *control = OOO_BONOBO_CONTROL( user_data );
-
- star_frame_widget_zoom_page_width( control->priv->sfw );
-}
-
-static void
-FrameLoadFileFromUrl( Reference< frame::XFrame > xFrame,
- Reference< lang::XMultiServiceFactory > xSMgr,
- OUString sUrl )
-{
- Reference< document::XTypeDetection > xTypeDetection(
- xSMgr->createInstance( SERVICENAME_TYPEDETECTION ), uno::UNO_QUERY );
- g_assert( xTypeDetection.is() );
-
- OUString sTypeName( xTypeDetection->queryTypeByURL( sUrl ) );
-
- Reference< lang::XMultiServiceFactory > xFrameLoaderFactory(
- xSMgr->createInstance( SERVICENAME_FRAMELOADERFACTORY ),
- uno::UNO_QUERY );
-
- Reference< frame::XSynchronousFrameLoader > xFrameLoader(
- xFrameLoaderFactory->createInstance( sTypeName ),
- uno::UNO_QUERY );
- g_assert( xFrameLoader.is() );
-
- uno::Sequence< PropertyValue > aProperties( 3 );
-
- aProperties[ 0 ] = PropertyValue( DECLARE_ASCII( "FileName" ),
- 0,
- uno::makeAny( sUrl ),
- PropertyState_DIRECT_VALUE );
-
- aProperties[ 1 ] = PropertyValue( DECLARE_ASCII( "TypeName" ),
- 0,
- uno::makeAny( sTypeName ),
- PropertyState_DIRECT_VALUE );
-
- aProperties[ 2 ] = PropertyValue( DECLARE_ASCII( "ReadOnly" ),
- 0,
- uno::makeAny( sal_True ),
- PropertyState_DIRECT_VALUE );
-
- xFrameLoader->load( aProperties, xFrame );
-}
-
-static int
-load_uri( BonoboPersistFile *pf, const CORBA_char *text_uri,
- CORBA_Environment *ev, gpointer user_data )
-{
- OOoBonoboControl *control = OOO_BONOBO_CONTROL( user_data );
-
- control->priv->uri =
- DECLARE_ASCII( "file://" ) + B2U( rtl::OString( text_uri ) );
- if( GTK_WIDGET_REALIZED( control->priv->sfw ) ) {
- // FIXME implement
- FrameLoadFileFromUrl(
- star_frame_widget_get_frame( control->priv->sfw ),
- control->priv->sfw->service_manager,
- control->priv->uri );
- control->priv->pending_load = FALSE;
- } else {
- control->priv->pending_load = TRUE;
- }
-}
-
-static void
-frame_widget_realize( GtkWidget *widget, gpointer user_data )
-{
- StarFrameWidget *pSocket = STAR_FRAME_WIDGET( widget );
- OOoBonoboControl *control = OOO_BONOBO_CONTROL( user_data );
-
- Reference< frame::XFrame > xFrame(
- star_frame_widget_get_frame( STAR_FRAME_WIDGET( pSocket ) ) );
- g_assert( xFrame.is() );
-
- if( control->priv->pending_load ) {
- FrameLoadFileFromUrl( xFrame, pSocket->service_manager, control->priv->uri );
-
- // change to full screen mode (the frame)
- star_frame_widget_set_fullscreen( pSocket, sal_True );
- control->priv->pending_load = FALSE;
- }
-}
-
-static BonoboUIVerb verbs[] = {
- BONOBO_UI_VERB( "FileSaveAs", verb_FileSaveAs_cb ),
- BONOBO_UI_VERB( "FileExport", verb_FileExport_cb ),
- BONOBO_UI_VERB( "FileExportPDF", verb_FileExportPDF_cb ),
- BONOBO_UI_VERB( "FilePrint", verb_FilePrint_cb ),
- BONOBO_UI_VERB( "FileProperties", verb_FileProperties_cb ),
-
- BONOBO_UI_VERB( "EditCopy", verb_EditCopy_cb ),
-
- BONOBO_UI_VERB( "ZoomIn", verb_ZoomIn_cb ),
- BONOBO_UI_VERB( "ZoomOut", verb_ZoomOut_cb ),
- BONOBO_UI_VERB( "ZoomNormal", verb_ZoomNormal_cb ),
- BONOBO_UI_VERB( "ZoomFit", verb_ZoomFit_cb ),
-
- BONOBO_UI_VERB_END
-};
-
-static void
-ooo_bonobo_control_activate( BonoboControl *control, gboolean activate )
-{
- gtk_widget_show( GTK_WIDGET( OOO_BONOBO_CONTROL( control )->priv->sfw ) );
-
- BonoboUIComponent *ui_component = bonobo_control_get_ui_component( control );
- if( activate ) {
- Bonobo_UIContainer ui_container =
- bonobo_control_get_remote_ui_container( control, NULL );
-
- if( ui_container != CORBA_OBJECT_NIL ) {
- bonobo_ui_component_set_container( ui_component, ui_container, NULL );
- bonobo_ui_component_add_verb_list_with_data(
- ui_component, verbs, control );
- bonobo_ui_util_set_ui( ui_component, DATADIR,
- "ooo-bonobo-control-ui.xml",
- "ooo-bonobo", NULL );
- }
- } else {
- bonobo_ui_component_unset_container( ui_component, NULL );
- }
-
- BONOBO_CALL_PARENT( BONOBO_CONTROL_CLASS, activate, ( control, activate ) );
-}
-
-static void
-ooo_bonobo_control_finalize( GObject *object )
-{
- delete OOO_BONOBO_CONTROL( object )->priv;
- BONOBO_CALL_PARENT( G_OBJECT_CLASS, finalize, ( object ) );
-}
-
-static void
-ooo_bonobo_control_instance_init( OOoBonoboControl *control )
-{
- control->priv = new OOoBonoboControlPrivate;
-}
-
-static void
-ooo_bonobo_control_class_init( OOoBonoboControlClass *klass )
-{
- GObjectClass *object_class = G_OBJECT_CLASS( klass );
-
- object_class->finalize = ooo_bonobo_control_finalize;
-
- BonoboControlClass *control_class = BONOBO_CONTROL_CLASS( klass );
-
- control_class->activate = ooo_bonobo_control_activate;
-}
-
-#define MAGSTEP 1.2
-#define MAGSTEP2 MAGSTEP * MAGSTEP
-#define MAGSTEP4 MAGSTEP2 * MAGSTEP2
-#define IMAGSTEP 0.8333333333
-#define IMAGSTEP2 IMAGSTEP * IMAGSTEP
-#define IMAGSTEP4 IMAGSTEP2 * IMAGSTEP2
-
-static float preferred_zoom_levels [] = {
- IMAGSTEP4 * IMAGSTEP4, IMAGSTEP4 * IMAGSTEP2 * IMAGSTEP,
- IMAGSTEP4 * IMAGSTEP2, IMAGSTEP4 * IMAGSTEP, IMAGSTEP4,
- IMAGSTEP2 * IMAGSTEP, IMAGSTEP2, IMAGSTEP,
- 1.0,
- MAGSTEP, MAGSTEP2, MAGSTEP2 * MAGSTEP, MAGSTEP4,
- MAGSTEP4 * MAGSTEP, MAGSTEP4 * MAGSTEP2, MAGSTEP4 * MAGSTEP2 * MAGSTEP,
- MAGSTEP4 * MAGSTEP4
-};
-
-static const int n_zoom_levels = G_N_ELEMENTS( preferred_zoom_levels );
-
-BonoboControl *
-ooo_bonobo_control_new( Reference< XComponentContext > component_context )
-{
- g_return_val_if_fail( component_context.is(), NULL );
-
- OOoBonoboControl *control =
- OOO_BONOBO_CONTROL( g_object_new( TYPE_OOO_BONOBO_CONTROL, NULL ) );
-
- control->priv->hbox = gtk_hbox_new( FALSE, 0 );
- control->priv->sfw =
- STAR_FRAME_WIDGET( star_frame_widget_new( component_context ) );
- g_signal_connect( control->priv->sfw, "realize",
- G_CALLBACK( frame_widget_realize ), control );
-
- gtk_box_pack_start( GTK_BOX( control->priv->hbox ),
- GTK_WIDGET( control->priv->sfw ), TRUE, TRUE, 0 );
-
- gtk_widget_show( control->priv->hbox );
-
- BonoboPersistFile *persist_file =
- bonobo_persist_file_new( load_uri, NULL, OAFIID, control );
-
- BonoboZoomable *zoomable = bonobo_zoomable_new();
- control->priv->zoomable = zoomable;
-
- g_signal_connect (G_OBJECT (zoomable), "set_zoom_level",
- G_CALLBACK (zoomable_set_zoom_level_cb),
- control);
- g_signal_connect (G_OBJECT (zoomable), "zoom_in",
- G_CALLBACK (zoom_in_cb),
- control);
- g_signal_connect (G_OBJECT (zoomable), "zoom_out",
- G_CALLBACK (zoom_out_cb),
- control);
- g_signal_connect (G_OBJECT (zoomable), "zoom_to_fit",
- G_CALLBACK (zoom_to_fit_cb),
- control);
- g_signal_connect (G_OBJECT (zoomable), "zoom_to_default",
- G_CALLBACK (zoom_to_default_cb),
- control);
-
- bonobo_zoomable_set_parameters_full (
- control->priv->zoomable,
- 1.0,
- preferred_zoom_levels [0],
- preferred_zoom_levels [n_zoom_levels - 1],
- TRUE, TRUE, TRUE,
- preferred_zoom_levels,
- NULL,
- n_zoom_levels);
-
- bonobo_object_add_interface (BONOBO_OBJECT (control),
- BONOBO_OBJECT (zoomable));
-
- bonobo_object_add_interface( BONOBO_OBJECT( control ),
- BONOBO_OBJECT( persist_file ) );
-
- return bonobo_control_construct( BONOBO_CONTROL( control ),
- control->priv->hbox );
-}
diff --git a/bonobo/src/ooo-bonobo-control.h b/bonobo/src/ooo-bonobo-control.h
deleted file mode 100644
index ad9f513a4..000000000
--- a/bonobo/src/ooo-bonobo-control.h
+++ /dev/null
@@ -1,33 +0,0 @@
-#ifndef OOO_BONOBO_CONTROL_H
-#define OOO_BONOBO_CONTROL_H
-
-#include <bonobo/bonobo-control.h>
-
-#include <rtl/ustring.hxx>
-
-#include <com/sun/star/uno/XComponentContext.hpp>
-
-#define TYPE_OOO_BONOBO_CONTROL (ooo_bonobo_control_get_type ())
-#define OOO_BONOBO_CONTROL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_OOO_BONOBO_CONTROL, OOoBonoboControl))
-#define OOO_BONOBO_CONTROL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_OOO_BONOBO_CONTROL, OOoBonoboControlClass))
-#define IS_OOO_BONOBO_CONTROL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_OOO_BONOBO_CONTROL))
-#define IS_OOO_BONOBO_CONTROL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_OOO_BONOBO_CONTROL))
-
-typedef struct _OOoBonoboControl OOoBonoboControl;
-typedef struct _OOoBonoboControlClass OOoBonoboControlClass;
-typedef struct _OOoBonoboControlPrivate OOoBonoboControlPrivate;
-
-struct _OOoBonoboControl {
- BonoboControl parent;
-
- OOoBonoboControlPrivate *priv;
-};
-
-struct _OOoBonoboControlClass {
- BonoboControlClass parent_class;
-};
-
-GType ooo_bonobo_control_get_type ();
-BonoboControl *ooo_bonobo_control_new ( ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > component_context );
-
-#endif // OOO_BONOBO_CONTROL_H
diff --git a/bonobo/src/remote-uno-helper.cxx b/bonobo/src/remote-uno-helper.cxx
deleted file mode 100644
index 39b62873f..000000000
--- a/bonobo/src/remote-uno-helper.cxx
+++ /dev/null
@@ -1,126 +0,0 @@
-#include "remote-uno-helper.h"
-
-#include <unistd.h>
-
-#include <glib.h>
-
-#include <cppuhelper/bootstrap.hxx>
-#include <com/sun/star/bridge/XUnoUrlResolver.hpp>
-#include <com/sun/star/lang/XMultiComponentFactory.hpp>
-
-#include "services.h"
-
-#define UNO_BOOTSTRAP_INI DECLARE_ASCII( "file://" INIFILE )
-
-using namespace com::sun::star;
-using namespace com::sun::star::bridge;
-using namespace com::sun::star::lang;
-using namespace com::sun::star::uno;
-
-using rtl::OUString;
-
-static OUString
-getPipeName()
-{
- return
- OUString::createFromAscii( g_get_user_name() ) +
- DECLARE_ASCII( "_ooo_bonobo" );
-}
-
-static Reference< XComponentContext >
-getRemoteComponentContext( const Reference< XComponentContext >& xComponentContext )
-{
- Reference< XMultiComponentFactory > xLocalSMgr(
- xComponentContext->getServiceManager() );
-
- Reference< XUnoUrlResolver > xUnoUrlResolver(
- xLocalSMgr->createInstanceWithContext( SERVICENAME_UNOURLRESOLVER,
- xComponentContext ),
- UNO_QUERY );
-
- Reference< XInterface > xInterface;
- OUString sConnect( DECLARE_ASCII( "uno:pipe,name=" ) +
- getPipeName() +
- DECLARE_ASCII( ";urp;StarOffice.ComponentContext" ) );
- try {
- xInterface = xUnoUrlResolver->resolve( sConnect );
- } catch( uno::Exception ) {
- g_message( "Trying to start OOo" );
-
- gchar *pArgv[5];
-
- pArgv[ 0 ] = "ooffice";
- pArgv[ 1 ] = g_strconcat( "-accept=pipe,name=",
- U2B( getPipeName() ).pData->buffer,
- ";urp;StarOffice.ComponentContext",
- NULL );
- pArgv[ 2 ] = "-bean";
- pArgv[ 3 ] = "-norestore";
- pArgv[ 4 ] = NULL;
-
- gboolean result = g_spawn_async( NULL, // Working directory
- pArgv, // Child's argv
- NULL, // Child's envp
- G_SPAWN_SEARCH_PATH,
- NULL, // Child setup function
- NULL, // User data for child_setup
- NULL, // &child_pid
- NULL); // GError ** FIXME
-
- g_free( pArgv[ 1 ] );
-
- if( !result ) {
- g_warning( "Unable to start OpenOffice.org" );
- exit(1);
- }
-
- for( int counter = 0; counter < 30; ++counter ) {
- try {
- g_message( "Trying to connect to OOo (%d)", counter + 2 );
- xInterface = xUnoUrlResolver->resolve( sConnect );
- break;
- } catch( uno::Exception ) {
- sleep( 1 );
- }
- }
- }
-
- if( !xInterface.is() ) {
- g_warning( "Unable to connect to OpenOffice.org" );
- exit( 2 );
- }
-
- Reference< XComponentContext > xRemoteComponentContext(
- xInterface, UNO_QUERY );
-
- return xRemoteComponentContext;
-}
-
-::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >
-getComponentContext()
-{
- if( !g_file_test( INIFILE, G_FILE_TEST_EXISTS ) )
- g_error( "Without '%s' installed nothing will work", INIFILE );
-
- if( !g_file_test( RDBFILE, G_FILE_TEST_EXISTS ) )
- g_error( "Without '%s' installed nothing will work", RDBFILE );
-
- Reference< uno::XComponentContext > xComponentContext;
- try {
- xComponentContext =
- ::cppu::defaultBootstrap_InitialComponentContext( UNO_BOOTSTRAP_INI );
- } catch( registry::InvalidRegistryException &ire ) {
- g_error( "InvalidRegistryException."
- " %s is invalid or %s doesn't contain the correct path.",
- RDBFILE, INIFILE );
- }
-
- g_assert( xComponentContext.is() );
-
-
- Reference< lang::XMultiComponentFactory > xMultiComponentFactoryClient(
- xComponentContext->getServiceManager() );
- g_assert( xMultiComponentFactoryClient.is() );
-
- return getRemoteComponentContext( xComponentContext );
-}
diff --git a/bonobo/src/remote-uno-helper.h b/bonobo/src/remote-uno-helper.h
deleted file mode 100644
index 28ac4367a..000000000
--- a/bonobo/src/remote-uno-helper.h
+++ /dev/null
@@ -1,9 +0,0 @@
-#ifndef REMOTE_UNO_HELPER_H
-#define REMOTE_UNO_HELPER_H
-
-#include <com/sun/star/uno/XComponentContext.hpp>
-
-::com::sun::star::uno::Reference<
- ::com::sun::star::uno::XComponentContext > getComponentContext();
-
-#endif
diff --git a/bonobo/src/services.h b/bonobo/src/services.h
deleted file mode 100644
index bad677a23..000000000
--- a/bonobo/src/services.h
+++ /dev/null
@@ -1,21 +0,0 @@
-#ifndef SERVICES_H
-#define SERVICES_H
-
-#include "string-macros.h"
-
-#define SERVICENAME_FRAME \
- DECLARE_ASCII("com.sun.star.frame.Frame" )
-#define SERVICENAME_DESKTOP \
- DECLARE_ASCII("com.sun.star.frame.Desktop" )
-#define SERVICENAME_FRAMELOADERFACTORY \
- DECLARE_ASCII("com.sun.star.frame.FrameLoaderFactory" )
-#define SERVICENAME_TYPEDETECTION \
- DECLARE_ASCII("com.sun.star.document.TypeDetection" )
-#define SERVICENAME_UNOURLRESOLVER \
- DECLARE_ASCII("com.sun.star.bridge.UnoUrlResolver" )
-#define SERVICENAME_URLTRANSFORMER \
- DECLARE_ASCII("com.sun.star.util.URLTransformer" )
-#define SERVICENAME_VCLTOOLKIT \
- DECLARE_ASCII("com.sun.star.awt.Toolkit" )
-
-#endif /* SERVICES_H */
diff --git a/bonobo/src/star-frame-widget.cxx b/bonobo/src/star-frame-widget.cxx
deleted file mode 100644
index 4f33897a8..000000000
--- a/bonobo/src/star-frame-widget.cxx
+++ /dev/null
@@ -1,256 +0,0 @@
-#include <stdio.h>
-#include "star-frame-widget.h"
-
-#include <libgnome/gnome-macros.h>
-
-#include <com/sun/star/awt/XToolkit.hpp>
-#include <com/sun/star/awt/XSystemChildFactory.hpp>
-#include <com/sun/star/frame/XDispatchProvider.hpp>
-#include <com/sun/star/frame/XDispatch.hpp>
-#include <com/sun/star/lang/SystemDependent.hpp>
-#include <com/sun/star/util/URL.hpp>
-#include <com/sun/star/util/XURLTransformer.hpp>
-#include <com/sun/star/view/DocumentZoomType.hpp>
-#include <com/sun/star/view/XViewSettingsSupplier.hpp>
-
-#include "services.h"
-
-using rtl::OUString;
-using namespace com::sun::star::awt;
-using namespace com::sun::star::beans;
-using namespace com::sun::star::frame;
-using namespace com::sun::star::lang;
-using namespace com::sun::star::uno;
-using namespace com::sun::star::util;
-using namespace com::sun::star::view;
-
-#define CLASS_BOILERPLATE(type, type_as_function, \
- parent_type, parent_type_macro) \
- BONOBO_BOILERPLATE(type, type_as_function, type, \
- parent_type, parent_type_macro, \
- REGISTER_TYPE)
-
-#define REGISTER_TYPE(type, type_as_function, corba_type, \
- parent_type, parent_type_macro) \
- g_type_register_static (parent_type_macro, #type, &object_info, \
- (GTypeFlags)0)
-
-
-CLASS_BOILERPLATE( StarFrameWidget, star_frame_widget,
- GtkSocket, GTK_TYPE_SOCKET );
-
-struct _StarFrameWidgetPrivate {
- Reference< XWindowPeer > x_window_peer;
- Reference< XFrame > x_frame;
- Reference< XPropertySet > view_properties;
-};
-
-static void
-star_frame_widget_create_view_properties( StarFrameWidget *sfw )
-{
- if( !sfw->priv->x_frame.is() )
- return;
-
- Reference< XViewSettingsSupplier > xViewSettingsSupplier(
- sfw->priv->x_frame->getController(), UNO_QUERY );
- if( xViewSettingsSupplier.is() )
- sfw->priv->view_properties = xViewSettingsSupplier->getViewSettings();
- else
- sfw->priv->view_properties.set( sfw->priv->x_frame->getController(),
- UNO_QUERY );
-}
-
-Reference< XPropertySet >
-star_frame_widget_get_view_properties( StarFrameWidget *sfw )
-{
- if( !sfw->priv->view_properties.is() )
- star_frame_widget_create_view_properties( sfw );
-
- return sfw->priv->view_properties;
-}
-
-void
-star_frame_widget_zoom_100( StarFrameWidget *sfw )
-{
- if( !sfw->priv->view_properties.is() )
- star_frame_widget_create_view_properties( sfw );
- g_assert( sfw->priv->view_properties.is() );
-
- sfw->priv->view_properties->setPropertyValue(
- DECLARE_ASCII( "ZoomType" ),
- makeAny( ( sal_Int16 ) DocumentZoomType::BY_VALUE ) );
- sfw->priv->view_properties->setPropertyValue(
- DECLARE_ASCII( "ZoomValue" ),
- makeAny( ( sal_Int16 ) 100 ) );
-}
-
-void
-star_frame_widget_zoom_page_width( StarFrameWidget *sfw )
-{
- if( !sfw->priv->view_properties.is() )
- star_frame_widget_create_view_properties( sfw );
- g_assert( sfw->priv->view_properties.is() );
-
- sfw->priv->view_properties->setPropertyValue(
- DECLARE_ASCII( "ZoomType" ),
- makeAny( ( sal_Int16 ) DocumentZoomType::PAGE_WIDTH ) );
-}
-
-static void
-star_frame_widget_create_window_peer( StarFrameWidget *sfw )
-{
- g_assert( sfw->service_manager.is() );
-
- Reference< XSystemChildFactory > xChildFactory(
- sfw->service_manager->createInstance( SERVICENAME_VCLTOOLKIT ),
- UNO_QUERY );
- g_assert( xChildFactory.is() );
-
- sfw->priv->x_window_peer.set(
- xChildFactory->createSystemChild(
- makeAny( (const sal_Int32) gtk_socket_get_id( GTK_SOCKET( sfw ) ) ),
- Sequence< sal_Int8 >(),
- SystemDependent::SYSTEM_XWINDOW ) );
- g_assert( sfw->priv->x_window_peer.is() );
-}
-
-Reference< XFrame >
-star_frame_widget_get_frame( StarFrameWidget *sfw )
-{
- return sfw->priv->x_frame;
-}
-
-void
-star_frame_widget_dispatch_slot_url( StarFrameWidget *sfw, URL url,
- const Sequence< PropertyValue > &properties )
-{
- if( !sfw->priv->x_frame.is() )
- return;
-
- Reference< XURLTransformer > xURLTransformer(
- sfw->service_manager->createInstance( SERVICENAME_URLTRANSFORMER ),
- UNO_QUERY );
-
- xURLTransformer->parseSmart( url, DECLARE_ASCII( "slot" ) );
-
- Reference< XDispatchProvider > xDispProv( sfw->priv->x_frame, UNO_QUERY );
- Reference< XDispatch > xDispatch =
- xDispProv->queryDispatch( url, OUString(), 0);
-
- xDispatch->dispatch( url, properties );
-}
-
-void
-star_frame_widget_set_fullscreen( StarFrameWidget *sfw, sal_Bool fullscreen )
-{
- URL url;
-
- url.Complete = DECLARE_ASCII( "slot:5627" );
-
- Sequence< PropertyValue > properties( 1 );
- properties[ 0 ] = PropertyValue( DECLARE_ASCII( "FullScreen" ),
- 0,
- makeAny( fullscreen ),
- PropertyState_DIRECT_VALUE );
- star_frame_widget_dispatch_slot_url( sfw, url, properties );
-}
-
-static void
-star_frame_widget_create_frame( StarFrameWidget *sfw )
-{
- g_assert( sfw->priv->x_window_peer.is() );
- g_assert( sfw->service_manager.is() );
-
- sfw->priv->x_frame.set(
- sfw->service_manager->createInstance( SERVICENAME_FRAME ),
- UNO_QUERY );
-
- sfw->priv->x_frame->setName( OUString::createFromAscii( "A Frame in GTK+" ) );
-
- Reference< XWindow > xWindow( sfw->priv->x_window_peer, UNO_QUERY );
- sfw->priv->x_frame->initialize( xWindow );
-
- Reference< XFramesSupplier > xTreeRoot(
- sfw->service_manager->createInstance( SERVICENAME_DESKTOP ),
- UNO_QUERY );
- g_assert( xTreeRoot.is() );
-
- Reference< XFrames > xChildContainer = xTreeRoot->getFrames();
- xChildContainer->append( sfw->priv->x_frame );
-
- xWindow->setVisible( sal_True );
-}
-
-static void
-star_frame_widget_realize( GtkWidget *widget )
-{
- BONOBO_CALL_PARENT( GTK_WIDGET_CLASS, realize, ( widget ) );
-
- StarFrameWidget *sfw = STAR_FRAME_WIDGET( widget );
-
- star_frame_widget_create_window_peer( sfw );
- star_frame_widget_create_frame( sfw );
-}
-
-static void
-star_frame_widget_unrealize( GtkWidget *widget )
-{
- star_frame_widget_set_fullscreen( STAR_FRAME_WIDGET( widget ), sal_False );
-
- BONOBO_CALL_PARENT( GTK_WIDGET_CLASS, unrealize, ( widget ) );
-}
-
-static void
-star_frame_widget_dispose( GObject *object )
-{
- StarFrameWidget *sfw = STAR_FRAME_WIDGET( object );
-
- if( sfw->priv->view_properties.is() )
- sfw->priv->view_properties.clear();
-
- if( sfw->priv->x_frame.is() )
- sfw->priv->x_frame.clear();
-
- if( sfw->priv->x_window_peer.is() )
- sfw->priv->x_window_peer.clear();
-
- if( sfw->service_manager.is() )
- sfw->service_manager.clear();
-
- BONOBO_CALL_PARENT( G_OBJECT_CLASS, dispose, ( object ) );
-}
-
-static void
-star_frame_widget_finalize( GObject *object )
-{
- delete STAR_FRAME_WIDGET( object )->priv;
- BONOBO_CALL_PARENT( G_OBJECT_CLASS, finalize, ( object ) );
-}
-
-static void
-star_frame_widget_class_init( StarFrameWidgetClass *klass )
-{
- GObjectClass *object_class = G_OBJECT_CLASS( klass );
-
- object_class->dispose = star_frame_widget_dispose;
- object_class->finalize = star_frame_widget_finalize;
-
- GtkWidgetClass *widget_class = GTK_WIDGET_CLASS( klass );
-
- widget_class->realize = star_frame_widget_realize;
- widget_class->unrealize = star_frame_widget_unrealize;
-}
-
-static void
-star_frame_widget_instance_init( StarFrameWidget *sfw )
-{
- sfw->priv = new StarFrameWidgetPrivate;
-}
-
-GtkWidget *
-star_frame_widget_new ( Reference< XComponentContext > component_context )
-{
- StarFrameWidget *swf = (StarFrameWidget *)g_object_new( TYPE_STAR_FRAME_WIDGET, NULL );
- swf->service_manager = Reference< XMultiServiceFactory >::query( component_context->getServiceManager() );
- return GTK_WIDGET( swf );
-}
diff --git a/bonobo/src/star-frame-widget.h b/bonobo/src/star-frame-widget.h
deleted file mode 100644
index 58d3aa709..000000000
--- a/bonobo/src/star-frame-widget.h
+++ /dev/null
@@ -1,51 +0,0 @@
-#ifndef STAR_FRAME_WIDGET_H
-#define STAR_FRAME_WIDGET_H
-
-#include <gtk/gtksocket.h>
-
-#define TYPE_STAR_FRAME_WIDGET (star_frame_widget_get_type ())
-#define STAR_FRAME_WIDGET(obj) (GTK_CHECK_CAST ((obj), TYPE_STAR_FRAME_WIDGET, StarFrameWidget))
-#define STAR_FRAME_WIDGET_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), TYPE_STAR_FRAME_WIDGET, StarFrameWidgetClass))
-#define IS_STAR_FRAME_WIDGET(obj) (GTK_CHECK_TYPE ((obj), TYPE_STAR_FRAME_WIDGET))
-#define IS_STAR_FRAME_WIDGET_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), TYPE_STAR_FRAME_WIDGET))
-
-typedef struct _StarFrameWidget StarFrameWidget;
-typedef struct _StarFrameWidgetClass StarFrameWidgetClass;
-typedef struct _StarFrameWidgetPrivate StarFrameWidgetPrivate;
-
-#include <com/sun/star/awt/XWindow.hpp>
-#include <com/sun/star/awt/XWindowPeer.hpp>
-#include <com/sun/star/beans/XPropertySet.hpp>
-#include <com/sun/star/frame/XFrame.hpp>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#include <com/sun/star/uno/XComponentContext.hpp>
-#include <com/sun/star/util/URL.hpp>
-#include <com/sun/star/beans/XPropertySet.hpp>
-
-using com::sun::star::uno::Reference;
-using com::sun::star::frame::XFrame;
-using com::sun::star::lang::XMultiServiceFactory;
-using com::sun::star::uno::XComponentContext;
-
-struct _StarFrameWidget {
- GtkSocket parent;
- StarFrameWidgetPrivate *priv;
-
- /* Temporary */
- Reference< XMultiServiceFactory > service_manager;
-};
-
-struct _StarFrameWidgetClass {
- GtkSocketClass parent_class;
-};
-
-GType star_frame_widget_get_type ( void );
-GtkWidget *star_frame_widget_new ( Reference< XComponentContext > component_context );
-
-Reference< XFrame > star_frame_widget_get_frame( StarFrameWidget *sfw );
-void star_frame_widget_dispatch_slot_url( StarFrameWidget *sfw, ::com::sun::star::util::URL url, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > &properties );
-void star_frame_widget_set_fullscreen( StarFrameWidget *sfw, sal_Bool fullscreen );
-void star_frame_widget_zoom_100( StarFrameWidget *sfw );
-void star_frame_widget_zoom_page_width( StarFrameWidget *sfw );
-::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > star_frame_widget_get_view_properties( StarFrameWidget *sfw );
-#endif /* STAR_FRAME_WIDGET_H */
diff --git a/bonobo/src/string-macros.h b/bonobo/src/string-macros.h
deleted file mode 100644
index 60a38500e..000000000
--- a/bonobo/src/string-macros.h
+++ /dev/null
@@ -1,117 +0,0 @@
-/*************************************************************************
- *
- * $RCSfile: generic.hxx,v $
- *
- * $Revision: 1.4 $
- *
- * last change: $Author: as $ $Date: 2001/05/15 05:41:31 $
- *
- * The Contents of this file are made available subject to the terms of
- * either of the following licenses
- *
- * - GNU Lesser General Public License Version 2.1
- * - Sun Industry Standards Source License Version 1.1
- *
- * Sun Microsystems Inc., October, 2000
- *
- * GNU Lesser General Public License Version 2.1
- * =============================================
- * Copyright 2000 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
- *
- *
- * Sun Industry Standards Source License Version 1.1
- * =================================================
- * The contents of this file are subject to the Sun Industry Standards
- * Source License Version 1.1 (the "License"); You may not use this file
- * except in compliance with the License. You may obtain a copy of the
- * License at http://www.openoffice.org/license.html.
- *
- * Software provided under this License is provided on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
- * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
- * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
- * See the License for the specific provisions governing your rights and
- * obligations concerning the Software.
- *
- * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
- *
- * Copyright: 2000 by Sun Microsystems, Inc.
- *
- * All Rights Reserved.
- *
- * Contributor(s): _______________________________________
- *
- *
- ************************************************************************/
-
-#ifndef __FRAMEWORK_MACROS_GENERIC_HXX_
-#define __FRAMEWORK_MACROS_GENERIC_HXX_
-
-//_________________________________________________________________________________________________________________
-// includes
-//_________________________________________________________________________________________________________________
-
-#ifndef _RTL_USTRING_HXX_
-#include <rtl/ustring.hxx>
-#endif
-
-#ifndef _RTL_TEXTENC_H
-#include <rtl/textenc.h>
-#endif
-
-//*****************************************************************************************************************
-// generic macros
-//*****************************************************************************************************************
-
-/*_________________________________________________________________________________________________________________
- DECLARE_ASCII( SASCIIVALUE )
-
- Use it to declare a constant ascii value at compile time in code.
- zB. OUSting sTest = DECLARE_ASCII( "Test" )
-_________________________________________________________________________________________________________________*/
-
-#define DECLARE_ASCII( SASCIIVALUE ) \
- ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SASCIIVALUE ) )
-
-/*_________________________________________________________________________________________________________________
- U2B( SUNICODEVALUE )
- B2U( SASCIIVALUE )
- U2B_ENC( SUNICODEVALUE, AENCODING )
- B2U_ENC( SASCIIVALUE, AENCODING )
-
- Use it to convert unicode strings to ascii values and reverse ...
- We use UTF8 as default textencoding. If you will change this use U2B_ENC and B2U_ENC!
-_________________________________________________________________________________________________________________*/
-
-#define U2B( SUNICODEVALUE ) \
- ::rtl::OUStringToOString( SUNICODEVALUE, RTL_TEXTENCODING_UTF8 )
-
-#define B2U( SASCIIVALUE ) \
- ::rtl::OStringToOUString( SASCIIVALUE, RTL_TEXTENCODING_UTF8 )
-
-#define U2B_ENC( SUNICODEVALUE, AENCODING ) \
- ::rtl::OUStringToOString( SUNICODEVALUE, AENCODING )
-
-#define B2U_ENC( SASCIIVALUE, AENCODING ) \
- ::rtl::OStringToOUString( SASCIIVALUE, AENCODING )
-
-//*****************************************************************************************************************
-// end of file
-//*****************************************************************************************************************
-
-#endif // #ifndef __FRAMEWORK_MACROS_GENERIC_HXX_
diff --git a/bonobo/src/test.cxx b/bonobo/src/test.cxx
deleted file mode 100644
index 1687a3662..000000000
--- a/bonobo/src/test.cxx
+++ /dev/null
@@ -1,137 +0,0 @@
-#include <stdio.h>
-#include <unistd.h>
-#include <string.h>
-
-#include <gdk/gdkx.h>
-#include <gtk/gtk.h>
-
-#include <com/sun/star/document/XTypeDetection.hpp>
-#include <com/sun/star/lang/XMultiComponentFactory.hpp>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#include <com/sun/star/frame/XFrame.hpp>
-#include <com/sun/star/frame/XSynchronousFrameLoader.hpp>
-#include <com/sun/star/beans/XPropertySet.hpp>
-
-#include "remote-uno-helper.h"
-#include "string-macros.h"
-#include "services.h"
-#include "star-frame-widget.h"
-
-using namespace com::sun::star;
-using namespace com::sun::star::beans;
-using namespace com::sun::star::lang;
-using namespace com::sun::star::uno;
-
-using rtl::OUString;
-
-static void
-destroy( GtkWidget *widget, gpointer data )
-{
- gtk_main_quit();
-}
-
-static void
-FrameLoaderLoadFileFromUrl( Reference< frame::XSynchronousFrameLoader > xFrameLoader,
- Reference< frame::XFrame > xFrame,
- OUString sUrl,
- OUString sTypeName)
-{
- uno::Sequence< beans::PropertyValue > aProperties( 3 );
-
- aProperties[ 0 ] = PropertyValue( DECLARE_ASCII( "FileName" ),
- 0,
- uno::makeAny( sUrl ),
- PropertyState_DIRECT_VALUE );
-
- aProperties[ 1 ] = PropertyValue( DECLARE_ASCII( "TypeName" ),
- 0,
- uno::makeAny( sTypeName ),
- PropertyState_DIRECT_VALUE );
-
- aProperties[ 2 ] = PropertyValue( DECLARE_ASCII( "ReadOnly" ),
- 0,
- uno::makeAny( sal_True ),
- PropertyState_DIRECT_VALUE );
-
- xFrameLoader->load( aProperties, xFrame );
-}
-
-int
-main( int argc, char *argv[] )
-{
- if( argc < 2 || !strcmp( argv [1], "--help" ) )
- {
- fprintf( stderr, "Syntax:\n" );
- fprintf( stderr, " test <document-name>\n" );
- exit( 1 );
- }
- const char *pFileName = argv[ argc - 1 ];
- if( strncmp( pFileName, "file:", 5 ) )
- {
- fprintf( stderr, "test prefers URIs\n" );
- pFileName = g_strconcat( "file://", pFileName, NULL );
- }
- OUString aFileName = OUString( pFileName, strlen( pFileName ),
- RTL_TEXTENCODING_UTF8 );
-
- gtk_init( &argc, &argv );
-
- Reference< uno::XComponentContext > xRemoteContext = getComponentContext();
- g_assert( xRemoteContext.is() );
-
- GtkWidget *pWindow = gtk_window_new( GTK_WINDOW_TOPLEVEL );
- g_signal_connect (G_OBJECT (pWindow), "destroy",
- G_CALLBACK (destroy), NULL);
-
- GtkWidget *pVBox = gtk_vbox_new( FALSE, 0 );
- gtk_container_add( GTK_CONTAINER( pWindow ), pVBox );
-
- GtkWidget *pText = gtk_entry_new();
- gtk_box_pack_start( GTK_BOX( pVBox ), pText, FALSE, FALSE, 5 );
-
- GtkWidget *pText2 = gtk_entry_new();
- gtk_box_pack_start( GTK_BOX( pVBox ), pText2, FALSE, FALSE, 5 );
-
- GtkWidget *pSocket = star_frame_widget_new( xRemoteContext );
- gtk_box_pack_start( GTK_BOX( pVBox ), pSocket, TRUE, TRUE, 5 );
-
- gtk_widget_realize( pSocket );
-
- Reference< frame::XFrame > xFrame(
- star_frame_widget_get_frame( STAR_FRAME_WIDGET( pSocket ) ) );
- g_assert( xFrame.is() );
-
- // Loading
- Reference< lang::XMultiServiceFactory > xMultiServiceFactory(
- xRemoteContext->getServiceManager(), uno::UNO_QUERY );
- g_assert (xMultiServiceFactory.is() );
-
- Reference< document::XTypeDetection > xTypeDetection(
- xMultiServiceFactory->createInstance( SERVICENAME_TYPEDETECTION ),
- uno::UNO_QUERY );
- g_assert( xTypeDetection.is() );
-
- Reference< XMultiServiceFactory > xFrameLoaderFactory(
- xMultiServiceFactory->createInstance( SERVICENAME_FRAMELOADERFACTORY ),
- uno::UNO_QUERY );
- g_assert( xFrameLoaderFactory.is() );
-
- OUString sTypeName( xTypeDetection->queryTypeByURL( aFileName ) );
-
- Reference< frame::XSynchronousFrameLoader > xFrameLoader(
- xFrameLoaderFactory->createInstance(sTypeName),
- uno::UNO_QUERY );
- g_assert( xFrameLoader.is() );
-
- FrameLoaderLoadFileFromUrl( xFrameLoader, xFrame, aFileName, sTypeName );
-
- gtk_widget_grab_focus( pSocket );
- gtk_widget_show( pSocket );
- gtk_widget_show( pText );
- gtk_widget_show( pText2 );
- gtk_widget_show( pVBox );
- gtk_widget_show( pWindow );
-
- gtk_main();
- return 0;
-}
diff --git a/download.in b/download.in
deleted file mode 100755
index 04de8f77b..000000000
--- a/download.in
+++ /dev/null
@@ -1,153 +0,0 @@
-#!/usr/bin/perl -w
-
-sub webget($$)
-{
- my ($src, $dest) = @_;
-
- print "Get $src -> $dest\n";
- system ("cd $dest ; $WGET $src") != 0 && die "Failed fetch";
-}
-
-sub usage {
- print STDERR "\ndownload\n";
- print STDERR "Syntax: download [--help] \n\n";
- print STDERR " download's behavior is coded by your configure options eg.\n";
- print STDERR " if you configure with --with-system-gcc it will not download\n";
- print STDERR " gcc & binutils\n";
-};
-
-
-%SRC_URLS = (
- 'binutils-.*' => '@MIRROR@/support',
- 'gcc-.*' => '@MIRROR@/support',
- 'src680-m.*' => '@MIRROR@/SRC680',
- 'ooo680-m.*' => '@MIRROR@/OOO680',
- 'libwpd-snap-.*' => '@MIRROR@',
- 'libwpd-0.*' => '@MIRROR@/libwpd',
- 'images_gnome-.*' => '@MIRROR@/SRC680',
- 'images_kde-.*' => '@MIRROR@/SRC680',
- 'extras-.*' => '@MIRROR@/SRC680',
- 'ooo_custom_images.*' => '@MIRROR@/SRC680',
- 'ooo_crystal_images.*' => '@MIRROR@/SRC680',
- 'cli_types*' => '@MIRROR@/SRC680',
- 'mdbtools*' => '@MIRROR@/SRC680',
- 'libpixman-*' => '@MIRROR@/SRC680',
- 'cairo-*' => '@MIRROR@/SRC680',
- 'glitz-*' => '@MIRROR@/SRC680',
- 'hunspell*' => '@MIRROR@/SRC680',
-# Win32 bits:
- 'unicows\.exe' => 'http://download.microsoft.com/download/b/7/5/b75eace3-00e2-4aa0-9a6f-0b6882c71642',
- # from http://www.microsoft.com/downloads/release.asp?releaseid=30682'
- 'dbghinst\.EXE' => 'http://download.microsoft.com/download/platformsdk/Redist/5.0.2195.1/W9XNT4/EN-US',
- '5_11_98Odma20\.zip' => '@MIRROR@/support',
- 'openclipart-*' => 'http://www.openclipart.org/downloads/@OPENCLIPART_VER@',
-# Win32 ant binaries ...
- 'apache-ant-*' => 'http://apache.mirror.positive-internet.com/ant/binaries',
-# Mozilla source and libraries
- 'mozilla-source-1.7.5*' => 'http://ftp.mozilla.org/pub/mozilla.org/mozilla/releases/mozilla1.7.5/source/',
- 'glib-*' => 'http://ftp.gtk.org/pub/gtk/v1.2/',
- 'libIDL-*' => 'http://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/source/',
- 'wintools.zip' => 'http://ftp.mozilla.org/pub/mozilla.org/mozilla/source/'
-);
-
-$WGET='/usr/bin/wget';
-
-sub download_files($$$)
-{
- my ($files, $locations, $dest) = @_;
-
- for my $file ( @{$files} ) {
- if ( $file ne '' ) {
- if (-f "$dest/$file") {
- print "Skipping $file\n";
- } else {
- print "No file $dest/$file\n";
- my $location = '';
- for $regexp (keys %{$locations}) {
- if ($file =~ m/^$regexp/) {
- $location = $locations->{$regexp};
- last;
- }
- }
- $location eq '' && die "Can't find '$file' to download";
- webget( $location."/$file", $dest );
- }
- }
- }
-}
-
-if (!-d "@SRCDIR@") {
- `mkdir -p @SRCDIR@`;
-}
-
-# Files to download
-@files = ();
-
-while ($arg = shift @ARGV) {
- if ( $arg eq '--help' ) {
- &usage and exit(0);
- }
-}
-
-# Defaults
-$tag = '@CVSTAG@';
-print "Downloading files for $tag\n";
-
--x $WGET || die "Can't find wget - install it and try again\n";
-
-if ('@SYSTEM_GCC@' eq '') {
- push @files, ( 'gcc-3.4.1.tar.bz2', 'gcc-3.4.1-Enums.diff', 'gcc-3.4.1-VisibilityPatch2.diff' );
-}
-
-# Misc. bits for Win32
-if ('@BUILD_WIN32@' ne '')
-{
- push @files, ( 'unicows.exe', 'dbghinst.EXE' );
- push @files, ( "$tag-system.tar.bz2" );
-# push @files, ( '5_11_98Odma20.zip' ); # - ODMA - for when it works.
- push @files, ( "apache-ant-1.6.5-bin.tar.gz" );
- push @files, ( '@BUILD_MOZILLA_SOURCE@' );
- push @files, ( 'glib-1.2.10.tar.gz' );
- push @files, ( 'libIDL-0.6.8.tar.gz' );
-# this contains binaries and source, we just use the source
- push @files, ( 'wintools.zip' );
-}
-else
-{
- if ('@ENABLE_MONO@' ne 'FALSE') {
- push @files, ( 'cli_types.dll' );
- push @files, ( 'cli_types_bridgetest.dll' );
- }
-}
-if ('@CAIRO_ENABLED@' eq 'TRUE' && '@SYSTEM_CAIRO@' ne 'TRUE') {
- push @files, ( 'cairo-@CAIRO_VER@.tar.gz' );
- push @files, ( 'glitz-@GLITZ_VER@.tar.gz' );
-}
-
-if ('@OPENCLIPART_VER@' ne '') {
- push @files, ( 'openclipart-@OPENCLIPART_VER@.tar.bz2' );
-}
-
-if ('@MDBTOOLS_SRC@' ne '') {
- push @files, ( '@MDBTOOLS_SRC@' );
-}
-
-push @files, ( "libwpd-0.8.3.tar.gz" );
-push @files, ( "$tag-core.tar.bz2" );
-push @files, ( '@OOO_CUSTOM_IMAGES@', '@OOO_CRYSTAL_IMAGES@', '@OOO_EXTRA_ARTWORK@' );
-
-if ('@OOO_LANGS@' ne 'en-US' || '@BUILD_WIN32@' ne '' ) {
- push @files, ( "$tag-lang.tar.bz2" );
-}
-
-if ('@HUNSPELL_UNO_SRC@' ne '') {
- push @files, ( '@HUNSPELL_UNO_SRC@' );
-}
-
-if ('@HUNSPELL_LIB_SRC@' ne '') {
- push @files, ( '@HUNSPELL_LIB_SRC@' );
-}
-
-download_files (\@files, \%SRC_URLS, '@SRCDIR@');
-
-print "Done\n";
diff --git a/etc/.cvsignore b/etc/.cvsignore
deleted file mode 100644
index 282522db0..000000000
--- a/etc/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-Makefile
-Makefile.in
diff --git a/intltool-merge.in b/intltool-merge.in
deleted file mode 100755
index 9554a1c2a..000000000
--- a/intltool-merge.in
+++ /dev/null
@@ -1,933 +0,0 @@
-#!@INTLTOOL_PERL@ -w
-
-#
-# The Intltool Message Merger
-#
-# Copyright (C) 2000, 2003 Free Software Foundation.
-# Copyright (C) 2000, 2001 Eazel, Inc
-#
-# Intltool is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# version 2 published by the Free Software Foundation.
-#
-# Intltool is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-#
-# Authors: Maciej Stachowiak <mjs@noisehavoc.org>
-# Kenneth Christiansen <kenneth@gnu.org>
-# Darin Adler <darin@bentspoon.com>
-#
-# Proper XML UTF-8'ification written by Cyrille Chepelov <chepelov@calixo.net>
-#
-
-## Release information
-my $PROGRAM = "intltool-merge";
-my $PACKAGE = "intltool";
-my $VERSION = "0.27.2";
-
-## Loaded modules
-use strict;
-use Getopt::Long;
-use Text::Wrap;
-
-## Scalars used by the option stuff
-my $HELP_ARG = 0;
-my $VERSION_ARG = 0;
-my $BA_STYLE_ARG = 0;
-my $XML_STYLE_ARG = 0;
-my $KEYS_STYLE_ARG = 0;
-my $DESKTOP_STYLE_ARG = 0;
-my $SCHEMAS_STYLE_ARG = 0;
-my $RFC822DEB_STYLE_ARG = 0;
-my $QUIET_ARG = 0;
-my $PASS_THROUGH_ARG = 0;
-my $UTF8_ARG = 0;
-my $cache_file;
-
-## Handle options
-GetOptions
-(
- "help" => \$HELP_ARG,
- "version" => \$VERSION_ARG,
- "quiet|q" => \$QUIET_ARG,
- "oaf-style|o" => \$BA_STYLE_ARG, ## for compatibility
- "ba-style|b" => \$BA_STYLE_ARG,
- "xml-style|x" => \$XML_STYLE_ARG,
- "keys-style|k" => \$KEYS_STYLE_ARG,
- "desktop-style|d" => \$DESKTOP_STYLE_ARG,
- "schemas-style|s" => \$SCHEMAS_STYLE_ARG,
- "rfc822deb-style|r" => \$RFC822DEB_STYLE_ARG,
- "pass-through|p" => \$PASS_THROUGH_ARG,
- "utf8|u" => \$UTF8_ARG,
- "cache|c=s" => \$cache_file
- ) or &error;
-
-my $PO_DIR;
-my $FILE;
-my $OUTFILE;
-
-my %po_files_by_lang = ();
-my %translations = ();
-my $iconv = $ENV{"INTLTOOL_ICONV"} || "iconv";
-
-# Use this instead of \w for XML files to handle more possible characters.
-my $w = "[-A-Za-z0-9._:]";
-
-# XML quoted string contents
-my $q = "[^\\\"]*";
-
-## Check for options.
-
-if ($VERSION_ARG)
-{
- &print_version;
-}
-elsif ($HELP_ARG)
-{
- &print_help;
-}
-elsif ($BA_STYLE_ARG && @ARGV > 2)
-{
- &preparation;
- &print_message;
- &ba_merge_translations;
- &finalize;
-}
-elsif ($XML_STYLE_ARG && @ARGV > 2)
-{
- &utf8_sanity_check;
- &preparation;
- &print_message;
- &xml_merge_translations;
- &finalize;
-}
-elsif ($KEYS_STYLE_ARG && @ARGV > 2)
-{
- &utf8_sanity_check;
- &preparation;
- &print_message;
- &keys_merge_translations;
- &finalize;
-}
-elsif ($DESKTOP_STYLE_ARG && @ARGV > 2)
-{
- &preparation;
- &print_message;
- &desktop_merge_translations;
- &finalize;
-}
-elsif ($SCHEMAS_STYLE_ARG && @ARGV > 2)
-{
- &preparation;
- &print_message;
- &schemas_merge_translations;
- &finalize;
-}
-elsif ($RFC822DEB_STYLE_ARG && @ARGV > 2)
-{
- &preparation;
- &print_message;
- &rfc822deb_merge_translations;
- &finalize;
-}
-else
-{
- &print_help;
-}
-
-exit;
-
-## Sub for printing release information
-sub print_version
-{
- print <<_EOF_;
-${PROGRAM} (${PACKAGE}) ${VERSION}
-Written by Maciej Stachowiak, Darin Adler and Kenneth Christiansen.
-
-Copyright (C) 2000-2003 Free Software Foundation, Inc.
-Copyright (C) 2000-2001 Eazel, Inc.
-This is free software; see the source for copying conditions. There is NO
-warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-_EOF_
- exit;
-}
-
-## Sub for printing usage information
-sub print_help
-{
- print <<_EOF_;
-Usage: ${PROGRAM} [OPTION]... PO_DIRECTORY FILENAME OUTPUT_FILE
-Generates an output file that includes some localized attributes from an
-untranslated source file.
-
-Mandatory options: (exactly one must be specified)
- -b, --ba-style includes translations in the bonobo-activation style
- -d, --desktop-style includes translations in the desktop style
- -k, --keys-style includes translations in the keys style
- -s, --schemas-style includes translations in the schemas style
- -r, --rfc822deb-style includes translations in the RFC822 style
- -x, --xml-style includes translations in the standard xml style
-
-Other options:
- -u, --utf8 convert all strings to UTF-8 before merging
- -p, --pass-through use strings as found in .po files, without
- conversion (STRONGLY unrecommended with -x)
- -c, --cache=FILE specify cache file name
- (usually \$top_builddir/po/.intltool-merge-cache)
- -q, --quiet suppress most messages
- --help display this help and exit
- --version output version information and exit
-
-Report bugs to http://bugzilla.gnome.org/ (product name "$PACKAGE")
-or send email to <xml-i18n-tools\@gnome.org>.
-_EOF_
- exit;
-}
-
-
-## Sub for printing error messages
-sub print_error
-{
- print STDERR "Try `${PROGRAM} --help' for more information.\n";
- exit;
-}
-
-
-sub print_message
-{
- print "Merging translations into $OUTFILE.\n" unless $QUIET_ARG;
-}
-
-
-sub preparation
-{
- $PO_DIR = $ARGV[0];
- $FILE = $ARGV[1];
- $OUTFILE = $ARGV[2];
-
- &gather_po_files;
- &get_translation_database;
-}
-
-# General-purpose code for looking up translations in .po files
-
-sub po_file2lang
-{
- my ($tmp) = @_;
- $tmp =~ s/^.*\/(.*)\.po$/$1/;
- return $tmp;
-}
-
-sub gather_po_files
-{
- for my $po_file (glob "$PO_DIR/*.po") {
- $po_files_by_lang{po_file2lang($po_file)} = $po_file;
- }
-}
-
-sub get_local_charset
-{
- my ($encoding) = @_;
- my $alias_file = $ENV{"G_CHARSET_ALIAS"} || "/usr/lib/charset.alias";
-
- # seek character encoding aliases in charset.alias (glib)
-
- if (open CHARSET_ALIAS, $alias_file)
- {
- while (<CHARSET_ALIAS>)
- {
- next if /^\#/;
- return $1 if (/^\s*([-._a-zA-Z0-9]+)\s+$encoding\b/i)
- }
-
- close CHARSET_ALIAS;
- }
-
- # if not found, return input string
-
- return $encoding;
-}
-
-sub get_po_encoding
-{
- my ($in_po_file) = @_;
- my $encoding = "";
-
- open IN_PO_FILE, $in_po_file or die;
- while (<IN_PO_FILE>)
- {
- ## example: "Content-Type: text/plain; charset=ISO-8859-1\n"
- if (/Content-Type\:.*charset=([-a-zA-Z0-9]+)\\n/)
- {
- $encoding = $1;
- last;
- }
- }
- close IN_PO_FILE;
-
- if (!$encoding)
- {
- print STDERR "Warning: no encoding found in $in_po_file. Assuming ISO-8859-1\n" unless $QUIET_ARG;
- $encoding = "ISO-8859-1";
- }
-
- system ("$iconv -f $encoding -t UTF-8 </dev/null 2>/dev/null");
- if ($?) {
- $encoding = get_local_charset($encoding);
- }
-
- return $encoding
-}
-
-sub utf8_sanity_check
-{
- if (!$UTF8_ARG)
- {
- if (!$PASS_THROUGH_ARG)
- {
- $PASS_THROUGH_ARG="1";
- }
- }
-}
-
-sub get_translation_database
-{
- if ($cache_file) {
- &get_cached_translation_database;
- } else {
- &create_translation_database;
- }
-}
-
-sub get_newest_po_age
-{
- my $newest_age;
-
- foreach my $file (values %po_files_by_lang)
- {
- my $file_age = -M $file;
- $newest_age = $file_age if !$newest_age || $file_age < $newest_age;
- }
-
- $newest_age = 0 if !$newest_age;
-
- return $newest_age;
-}
-
-sub create_cache
-{
- print "Generating and caching the translation database\n" unless $QUIET_ARG;
-
- &create_translation_database;
-
- open CACHE, ">$cache_file" || die;
- print CACHE join "\x01", %translations;
- close CACHE;
-}
-
-sub load_cache
-{
- print "Found cached translation database\n" unless $QUIET_ARG;
-
- my $contents;
- open CACHE, "<$cache_file" || die;
- {
- local $/;
- $contents = <CACHE>;
- }
- close CACHE;
- %translations = split "\x01", $contents;
-}
-
-sub get_cached_translation_database
-{
- my $cache_file_age = -M $cache_file;
- if (defined $cache_file_age)
- {
- if ($cache_file_age <= &get_newest_po_age)
- {
- &load_cache;
- return;
- }
- print "Found too-old cached translation database\n" unless $QUIET_ARG;
- }
-
- &create_cache;
-}
-
-sub create_translation_database
-{
- for my $lang (keys %po_files_by_lang)
- {
- my $po_file = $po_files_by_lang{$lang};
-
- if ($UTF8_ARG)
- {
- my $encoding = get_po_encoding ($po_file);
-
- if (lc $encoding eq "utf-8")
- {
- open PO_FILE, "<$po_file";
- }
- else
- {
- print STDERR "WARNING: $po_file is not in UTF-8 but $encoding, converting...\n" unless $QUIET_ARG;;
-
- open PO_FILE, "$iconv -f $encoding -t UTF-8 $po_file|";
- }
- }
- else
- {
- open PO_FILE, "<$po_file";
- }
-
- my $nextfuzzy = 0;
- my $inmsgid = 0;
- my $inmsgstr = 0;
- my $msgid = "";
- my $msgstr = "";
-
- while (<PO_FILE>)
- {
- $nextfuzzy = 1 if /^#, fuzzy/;
-
- if (/^msgid "((\\.|[^\\])*)"/ )
- {
- $translations{$lang, $msgid} = $msgstr if $inmsgstr && $msgid && $msgstr;
- $msgid = "";
- $msgstr = "";
-
- if ($nextfuzzy) {
- $inmsgid = 0;
- } else {
- $msgid = unescape_po_string($1);
- $inmsgid = 1;
- }
- $inmsgstr = 0;
- $nextfuzzy = 0;
- }
-
- if (/^msgstr "((\\.|[^\\])*)"/)
- {
- $msgstr = unescape_po_string($1);
- $inmsgstr = 1;
- $inmsgid = 0;
- }
-
- if (/^"((\\.|[^\\])*)"/)
- {
- $msgid .= unescape_po_string($1) if $inmsgid;
- $msgstr .= unescape_po_string($1) if $inmsgstr;
- }
- }
- $translations{$lang, $msgid} = $msgstr if $inmsgstr && $msgid && $msgstr;
- }
-}
-
-sub finalize
-{
-}
-
-sub unescape_one_sequence
-{
- my ($sequence) = @_;
-
- return "\\" if $sequence eq "\\\\";
- return "\"" if $sequence eq "\\\"";
- return "\n" if $sequence eq "\\n";
-
- # gettext also handles \n, \t, \b, \r, \f, \v, \a, \xxx (octal),
- # \xXX (hex) and has a comment saying they want to handle \u and \U.
-
- return $sequence;
-}
-
-sub unescape_po_string
-{
- my ($string) = @_;
-
- $string =~ s/(\\.)/unescape_one_sequence($1)/eg;
-
- return $string;
-}
-
-## NOTE: deal with < - &lt; but not > - &gt; because it seems its ok to have
-## > in the entity. For further info please look at #84738.
-sub entity_decode
-{
- local ($_) = @_;
-
- s/&apos;/'/g; # '
- s/&quot;/"/g; # "
- s/&amp;/&/g;
- s/&lt;/</g;
-
- return $_;
-}
-
-# entity_encode: (string)
-#
-# Encode the given string to XML format (encode '<' etc). It also
-# encodes high bit if not in UTF-8 mode.
-
-sub entity_encode
-{
- my ($pre_encoded) = @_;
-
- my @list_of_chars = unpack ('C*', $pre_encoded);
-
- if ($PASS_THROUGH_ARG)
- {
- return join ('', map (&entity_encode_int_even_high_bit, @list_of_chars));
- }
- else
- {
- # with UTF-8 we only encode minimalistic
- return join ('', map (&entity_encode_int_minimalist, @list_of_chars));
- }
-}
-
-sub entity_encode_int_minimalist
-{
- return "&quot;" if $_ == 34;
- return "&amp;" if $_ == 38;
- return "&apos;" if $_ == 39;
- return "&lt;" if $_ == 60;
- return chr $_;
-}
-
-sub entity_encode_int_even_high_bit
-{
- if ($_ > 127 || $_ == 34 || $_ == 38 || $_ == 39 || $_ == 60)
- {
- # the ($_ > 127) should probably be removed
- return "&#" . $_ . ";";
- }
- else
- {
- return chr $_;
- }
-}
-
-sub entity_encoded_translation
-{
- my ($lang, $string) = @_;
-
- my $translation = $translations{$lang, $string};
- return $string if !$translation;
- return entity_encode ($translation);
-}
-
-## XML (bonobo-activation specific) merge code
-
-sub ba_merge_translations
-{
- my $source;
-
- {
- local $/; # slurp mode
- open INPUT, "<$FILE" or die "can't open $FILE: $!";
- $source = <INPUT>;
- close INPUT;
- }
-
- open OUTPUT, ">$OUTFILE" or die "can't open $OUTFILE: $!";
-
- while ($source =~ s|^(.*?)([ \t]*<\s*$w+\s+($w+\s*=\s*"$q"\s*)+/?>)([ \t]*\n)?||s)
- {
- print OUTPUT $1;
-
- my $node = $2 . "\n";
-
- my @strings = ();
- $_ = $node;
- while (s/(\s)_($w+\s*=\s*"($q)")/$1$2/s) {
- push @strings, entity_decode($3);
- }
- print OUTPUT;
-
- my %langs;
- for my $string (@strings)
- {
- for my $lang (keys %po_files_by_lang)
- {
- $langs{$lang} = 1 if $translations{$lang, $string};
- }
- }
-
- for my $lang (sort keys %langs)
- {
- $_ = $node;
- s/(\sname\s*=\s*)"($q)"/$1"$2-$lang"/s;
- s/(\s)_($w+\s*=\s*")($q)"/$1 . $2 . entity_encoded_translation($lang, $3) . '"'/seg;
- print OUTPUT;
- }
- }
-
- print OUTPUT $source;
-
- close OUTPUT;
-}
-
-
-## XML (non-bonobo-activation) merge code
-
-sub xml_merge_translations
-{
- my $source;
-
- {
- local $/; # slurp mode
- open INPUT, "<$FILE" or die "can't open $FILE: $!";
- $source = <INPUT>;
- close INPUT;
- }
-
- open OUTPUT, ">$OUTFILE" or die;
-
- # FIXME: support attribute translations
-
- # Empty nodes never need translation, so unmark all of them.
- # For example, <_foo/> is just replaced by <foo/>.
- $source =~ s|<\s*_($w+)\s*/>|<$1/>|g;
-
- # Support for <_foo>blah</_foo> style translations.
- while ($source =~ s|^(.*?)([ \t]*)<\s*_($w+)\s*>(.*?)<\s*/_\3\s*>([ \t]*\n)?||s)
- {
- print OUTPUT $1;
-
- my $spaces = $2;
- my $tag = $3;
- my $string = $4;
-
- print OUTPUT "$spaces<$tag>$string</$tag>\n";
-
- $string =~ s/\s+/ /g;
- $string =~ s/^ //;
- $string =~ s/ $//;
- $string = entity_decode($string);
-
- for my $lang (sort keys %po_files_by_lang)
- {
- my $translation = $translations{$lang, $string};
- next if !$translation;
- $translation = entity_encode($translation);
- print OUTPUT "$spaces<$tag xml:lang=\"$lang\">$translation</$tag>\n";
- }
- }
-
- print OUTPUT $source;
-
- close OUTPUT;
-}
-
-sub keys_merge_translations
-{
- open INPUT, "<${FILE}" or die;
- open OUTPUT, ">${OUTFILE}" or die;
-
- while (<INPUT>)
- {
- if (s/^(\s*)_(\w+=(.*))/$1$2/)
- {
- my $string = $3;
-
- print OUTPUT;
-
- my $non_translated_line = $_;
-
- for my $lang (sort keys %po_files_by_lang)
- {
- my $translation = $translations{$lang, $string};
- next if !$translation;
-
- $_ = $non_translated_line;
- s/(\w+)=.*/[$lang]$1=$translation/;
- print OUTPUT;
- }
- }
- else
- {
- print OUTPUT;
- }
- }
-
- close OUTPUT;
- close INPUT;
-}
-
-sub desktop_merge_translations
-{
- open INPUT, "<${FILE}" or die;
- open OUTPUT, ">${OUTFILE}" or die;
-
- while (<INPUT>)
- {
- if (s/^(\s*)_(\w+=(.*))/$1$2/)
- {
- my $string = $3;
-
- print OUTPUT;
-
- my $non_translated_line = $_;
-
- for my $lang (sort keys %po_files_by_lang)
- {
- my $translation = $translations{$lang, $string};
- next if !$translation;
-
- $_ = $non_translated_line;
- s/(\w+)=.*/${1}[$lang]=$translation/;
- print OUTPUT;
- }
- }
- else
- {
- print OUTPUT;
- }
- }
-
- close OUTPUT;
- close INPUT;
-}
-
-sub schemas_merge_translations
-{
- my $source;
-
- {
- local $/; # slurp mode
- open INPUT, "<$FILE" or die "can't open $FILE: $!";
- $source = <INPUT>;
- close INPUT;
- }
-
- open OUTPUT, ">$OUTFILE" or die;
-
- # FIXME: support attribute translations
-
- # Empty nodes never need translation, so unmark all of them.
- # For example, <_foo/> is just replaced by <foo/>.
- $source =~ s|<\s*_($w+)\s*/>|<$1/>|g;
-
- while ($source =~ s/
- (.*?)
- (\s+)(<locale\ name="C">(\s*)
- (<default>\s*(.*?)\s*<\/default>)?(\s*)
- (<short>\s*(.*?)\s*<\/short>)?(\s*)
- (<long>\s*(.*?)\s*<\/long>)?(\s*)
- <\/locale>)
- //sx)
- {
- print OUTPUT $1;
-
- my $locale_start_spaces = $2 ? $2 : '';
- my $default_spaces = $4 ? $4 : '';
- my $short_spaces = $7 ? $7 : '';
- my $long_spaces = $10 ? $10 : '';
- my $locale_end_spaces = $13 ? $13 : '';
- my $c_default_block = $3 ? $3 : '';
- my $default_string = $6 ? $6 : '';
- my $short_string = $9 ? $9 : '';
- my $long_string = $12 ? $12 : '';
-
- $c_default_block =~ s/default>\[.*?\]/default>/s;
-
- print OUTPUT "$locale_start_spaces$c_default_block";
-
- $default_string =~ s/\s+/ /g;
- $default_string = entity_decode($default_string);
- $short_string =~ s/\s+/ /g;
- $short_string = entity_decode($short_string);
- $long_string =~ s/\s+/ /g;
- $long_string = entity_decode($long_string);
-
- for my $lang (sort keys %po_files_by_lang)
- {
- my $default_translation = $translations{$lang, $default_string};
- my $short_translation = $translations{$lang, $short_string};
- my $long_translation = $translations{$lang, $long_string};
-
- next if (!$default_translation && !$short_translation &&
- !$long_translation);
-
- print OUTPUT "\n$locale_start_spaces<locale name=\"$lang\">";
-
- print OUTPUT "$default_spaces";
-
- if ($default_translation)
- {
- $default_translation = entity_encode($default_translation);
- print OUTPUT "<default>$default_translation</default>";
- }
-
- print OUTPUT "$short_spaces";
-
- if ($short_translation)
- {
- $short_translation = entity_encode($short_translation);
- print OUTPUT "<short>$short_translation</short>";
- }
-
- print OUTPUT "$long_spaces";
-
- if ($long_translation)
- {
- $long_translation = entity_encode($long_translation);
- print OUTPUT "<long>$long_translation</long>";
- }
-
- print OUTPUT "$locale_end_spaces</locale>";
- }
- }
-
- print OUTPUT $source;
-
- close OUTPUT;
-}
-
-sub rfc822deb_merge_translations
-{
- my $source;
-
- $Text::Wrap::huge = 'overflow';
-
- {
- local $/; # slurp mode
- open INPUT, "<$FILE" or die "can't open $FILE: $!";
- $source = <INPUT>;
- close INPUT;
- }
-
- open OUTPUT, ">${OUTFILE}" or die;
-
- while ($source =~ /(^|\n+)(_)?([^:_\n]+)(:\s*)(.*?)(?=\n[\S\n]|$)/sg)
- {
- my $sep = $1;
- my $non_translated_line = $3.$4;
- my $string = $5;
- my $is_translatable = defined($2);
- # Remove [] dummy strings
- $string =~ s/\[\s[^\[\]]*\]$//;
- $non_translated_line .= $string;
-
- print OUTPUT $sep.$non_translated_line;
-
- if ($is_translatable)
- {
- my @str_list = rfc822deb_split($string);
-
- for my $lang (sort keys %po_files_by_lang)
- {
- my $is_translated = 1;
- my $str_translated = '';
- my $first = 1;
-
- for my $str (@str_list)
- {
- my $translation = $translations{$lang, $str};
-
- if (!$translation)
- {
- $is_translated = 0;
- last;
- }
-
- # $translation may also contain [] dummy
- # strings, mostly to indicate an empty string
- $translation =~ s/\[\s[^\[\]]*\]$//;
-
- if ($first)
- {
- $str_translated .=
- Text::Tabs::expand($translation) .
- "\n";
- }
- else
- {
- $str_translated .= Text::Tabs::expand(
- Text::Wrap::wrap(' ', ' ', $translation)) .
- "\n .\n";
- }
- $first = 0;
-
- # To fix some problems with Text::Wrap::wrap
- $str_translated =~ s/(\n )+\n/\n .\n/g;
- }
- next unless $is_translated;
-
- $str_translated =~ s/\n \.\n$//;
- $str_translated =~ s/\s+$//;
-
- $_ = $non_translated_line;
- s/^(\w+):\s*.*/$sep${1}-$lang: $str_translated/s;
- print OUTPUT;
- }
- }
- }
- print OUTPUT "\n";
-
- close OUTPUT;
- close INPUT;
-}
-
-sub rfc822deb_split
-{
- # Debian defines a special way to deal with rfc822-style files:
- # when a value contain newlines, it consists of
- # 1. a short form (first line)
- # 2. a long description, all lines begin with a space,
- # and paragraphs are separated by a single dot on a line
- # This routine returns an array of all paragraphs, and reformat
- # them.
- my $text = shift;
- $text =~ s/^ //mg;
- return ($text) if $text !~ /\n/;
-
- $text =~ s/([^\n]*)\n//;
- my @list = ($1);
- my $str = '';
-
- for my $line (split (/\n/, $text))
- {
- chomp $line;
- $line =~ /\s+$/;
-
- if ($line =~ /^\.$/)
- {
- # New paragraph
- $str =~ s/\s*$//;
- push(@list, $str);
- $str = '';
- }
- elsif ($line =~ /^\s/)
- {
- # Line which must not be reformatted
- $str .= "\n" if length ($str) && $str !~ /\n$/;
- $str .= $line."\n";
- }
- else
- {
- # Continuation line, remove newline
- $str .= " " if length ($str) && $str !~ /[\n ]$/;
- $str .= $line;
- }
- }
-
- $str =~ s/\s*$//;
- push(@list, $str) if length ($str);
-
- return @list;
-}
-
diff --git a/ooo1.1.spec.in b/ooo1.1.spec.in
deleted file mode 100644
index b73165cd2..000000000
--- a/ooo1.1.spec.in
+++ /dev/null
@@ -1,193 +0,0 @@
-# RPM specfile for ooo1.1 module
-# Generated Fri Aug 8 11:32:32 2003 GMT by Ximian build system
-# $Id: ooo1.1.spec.in,v 1.5 2005/02/06 20:03:46 brosenk Exp $
-# from $Id: ooo1.1.spec.in,v 1.5 2005/02/06 20:03:46 brosenk Exp $
-
-%define _topdir @BASEDIR@
-%define _sourcedir @BASEDIR@/src
-%define _builddir @BASEDIR@/build
-%define buildroot @BASEDIR@/dest
-%define _rpmdir /tmp/michael/built-packages
-%define _srcrpmdir /tmp/michael/built-packages
-%define _install_script_path /usr/bin:/usr/X11R6/bin:/usr/bin:/bin
-%define _rpmfilename %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm
-%define _noPayloadPrefix 1
-%define __check_files /usr/share/ximian-build-system/packsys/rpm/check-files /home/michael/openoffice/bb-snaps/dest
-%define __find_requires @BASEDIR@/bin/nothing
-%define __find_provides @BASEDIR@/bin/nothing
-%define _use_internal_dependency_generator 0
-
-%define nam ooo1.1
-%define ver 1.1
-%define licensedir %{_datadir}/licenses/%{nam}-%{ver}
-%define ximrev 7.@SNAPSHOT_TAG@
-
-Name: ooo1.1
-Version: 1.1
-Release: 0.ximian.6.7.@SNAPSHOT_TAG@
-Vendor: Ximian, Inc.
-Distribution: Ximian GNOME for Red Hat Linux 9 / i386
-License: LGPL
-BuildRoot: /var/tmp/%{nam}-%{ver}-root
-Docdir: /usr/share/doc
-
-URL: http://ooo.ximian.com
-Summary: OpenOffice.org Office Suite
-Group: Applications/Office
-Requires: fontconfig
-Requires: perl-XML-Twig
-Requires: gnome-cups-manager
-Requires: gnome-vfs2
-Requires: ooo-fonts
-Requires: unzip
-Requires: libart_lgpl >= 2.3.13
-Provides: ximian-ooo1.1 = %{?epoch:%{epoch}:}%{version}-%{?ximrev:%{ximrev}}%{!?ximrev:%{release}}
-Obsoletes: openoffice
-Obsoletes: openoffice-skel
-Obsoletes: openoffice-libs
-Obsoletes: ooo-sys
-
-%description
-OpenOffice.org is a Free software, Microsoft Office compatible,
-productivity suite. It is the most powerful office suite
-available on Free platforms.
-
-Usage: Use 'ooffice' to run the suite.
-
-%files
-%defattr(-, root, root)
-/etc/openoffice
-/usr/lib/ooo-1.1/help/en
-/usr/lib/ooo-1.1/help/main_transform.xsl
-/usr/lib/ooo-1.1/LICENSE*
-/usr/lib/ooo-1.1/README*
-/usr/lib/ooo-1.1/install-dict
-/usr/lib/ooo-1.1/program/a*
-/usr/lib/ooo-1.1/program/b*
-/usr/lib/ooo-1.1/program/c*
-/usr/lib/ooo-1.1/program/f*
-/usr/lib/ooo-1.1/program/g*
-/usr/lib/ooo-1.1/program/i*
-/usr/lib/ooo-1.1/program/j*
-/usr/lib/ooo-1.1/program/l*
-/usr/lib/ooo-1.1/program/m*
-/usr/lib/ooo-1.1/program/n*
-/usr/lib/ooo-1.1/program/o*
-/usr/lib/ooo-1.1/program/p*
-/usr/lib/ooo-1.1/program/reg*
-/usr/lib/ooo-1.1/program/rem*
-/usr/lib/ooo-1.1/program/s*
-/usr/lib/ooo-1.1/program/t*
-/usr/lib/ooo-1.1/program/u*
-/usr/lib/ooo-1.1/program/resource/*01.res
-/usr/bin/oo*
-/usr/share/gnome/ximian/applications/*1.1.desktop
-/usr/share/pixmaps/ximian-openoffice*
-/usr/lib/ooo-1.1/user/autocorr
-/usr/lib/ooo-1.1/user/autotext/english
-/usr/lib/ooo-1.1/user/basic
-/usr/lib/ooo-1.1/user/config
-/usr/lib/ooo-1.1/user/database
-/usr/lib/ooo-1.1/user/gallery
-/usr/lib/ooo-1.1/user/plugin
-/usr/lib/ooo-1.1/user/psprint
-/usr/lib/ooo-1.1/user/store
-/usr/lib/ooo-1.1/user/temp
-/usr/lib/ooo-1.1/user/template
-/usr/lib/ooo-1.1/user/uno_packages
-/usr/lib/ooo-1.1/user/wordbook
-/usr/lib/ooo-1.1/share/autocorr
-/usr/lib/ooo-1.1/share/autotext/english
-/usr/lib/ooo-1.1/share/basic
-/usr/lib/ooo-1.1/share/config
-/usr/lib/ooo-1.1/share/dtd
-/usr/lib/ooo-1.1/share/dict
-/usr/lib/ooo-1.1/share/gallery
-/usr/lib/ooo-1.1/share/fonts
-/usr/lib/ooo-1.1/share/psprint
-/usr/lib/ooo-1.1/share/readme
-/usr/lib/ooo-1.1/share/registry
-/usr/lib/ooo-1.1/share/samples
-/usr/lib/ooo-1.1/share/uno_packages
-/usr/lib/ooo-1.1/share/template/english
-/usr/lib/ooo-1.1/share/wordbook/english
-/usr/lib/ooo-1.1/share/xslt
-
-
-# $RPM_COMMAND is an environment variable used by the Ximian build
-# system to control the build process with finer granularity than RPM
-# normally allows. This specfile will function as expected by RPM if
-# $RPM_COMMAND is unset. If you are not the Ximian build system,
-# feel free to ignore it.
-
-%prep
-case "${RPM_COMMAND:-all}" in
-dist)
- ;;
-all)
- ;;
-esac
-case "${RPM_COMMAND:-all}" in
-dist|all)
- ;;
-esac
-
-%build
-MAKE=${MAKE:-make}
-RPM_COMMAND=${RPM_COMMAND:-all}
-DESTDIR=${DESTDIR:-"$RPM_BUILD_ROOT"}
-ARCH=%{_target_platform}
-export MAKE RPM_COMMAND DESTDIR ARCH
-case "$RPM_COMMAND" in
-prepare|all)
- (./configure --prefix=/usr --sysconfdir=/etc)
- ;;
-esac
-case "$RPM_COMMAND" in
-clean|all)
- if [ "/" != "$DESTDIR" ]; then
- rm -rf "$DESTDIR"
- fi
- ;;
-esac
-case "$RPM_COMMAND" in
-build|all)
- (make)
- ;;
-esac
-
-%install
-MAKE=${MAKE:-make}
-DESTDIR=${DESTDIR:-"$RPM_BUILD_ROOT"}
-# export DESTDIR
-case "${RPM_COMMAND:-all}" in
-install|all)
- (make DESTDIR=${DESTDIR} install)
- ;;
-esac
-
-%clean
-DESTDIR=${DESTDIR:-"$RPM_BUILD_ROOT"}
-export DESTDIR
-case "${RPM_COMMAND:-all}" in
-clean|all)
- if [ "/" != "$DESTDIR" ]; then
- rm -rf "$DESTDIR"
- fi
- ;;
-esac
-
-
-%changelog
-* Fri Aug 8 2003 Ximian, Inc.
-
-- Version: 1.1-0.ximian.6.6.RC3_030729.35
-- Summary: New build.
-- New automated build.
-
-* Wed Jun 11 2003 Ximian, Inc.
-
-- Version: [[ooversion]]-0.ximian.6.1
-- Summary: New build.
-- New automated build.
-
diff --git a/patches/a11y/.cvsignore b/patches/a11y/.cvsignore
deleted file mode 100644
index 282522db0..000000000
--- a/patches/a11y/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-Makefile
-Makefile.in
diff --git a/patches/a11y/Makefile.am b/patches/a11y/Makefile.am
deleted file mode 100644
index a41fbfbeb..000000000
--- a/patches/a11y/Makefile.am
+++ /dev/null
@@ -1 +0,0 @@
-EXTRA_DIST = ${wildcard *.diff}
diff --git a/patches/a11y/a11y-gtk-frame.diff b/patches/a11y/a11y-gtk-frame.diff
deleted file mode 100644
index 001066543..000000000
--- a/patches/a11y/a11y-gtk-frame.diff
+++ /dev/null
@@ -1,136 +0,0 @@
-Index: vcl/unx/inc/plugins/gtk/gtkframe.hxx
-===================================================================
-RCS file: /cvs/gsl/vcl/unx/inc/plugins/gtk/gtkframe.hxx,v
-retrieving revision 1.13
-diff -u -r1.13 gtkframe.hxx
---- vcl/unx/inc/plugins/gtk/gtkframe.hxx 30 Mar 2005 09:09:03 -0000 1.13
-+++ vcl/unx/inc/plugins/gtk/gtkframe.hxx 12 Apr 2005 15:53:55 -0000
-@@ -69,6 +69,9 @@
- #include <gdk/gdkkeysyms.h>
- #include <postx.h>
-
-+#include <com/sun/star/uno/Reference.hxx>
-+#include <com/sun/star/accessibility/XAccessible.hdl>
-+
- #ifndef _SV_SALFRAME_HXX
- #include <salframe.hxx>
- #endif
-@@ -355,6 +358,9 @@
- virtual bool SetPluginParent( SystemParentData* pNewParent );
-
- virtual void SetBackgroundBitmap( SalBitmap* );
-+
-+ static GtkSalFrame *getFromWindow( GtkWindow *pWindow );
-+ ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > getAccessible( bool bCreate = true );
- };
-
-
-Index: vcl/unx/gtk/window/gtkframe.cxx
-===================================================================
-RCS file: /cvs/gsl/vcl/unx/gtk/window/gtkframe.cxx,v
-retrieving revision 1.26
-diff -u -r1.26 gtkframe.cxx
---- vcl/unx/gtk/window/gtkframe.cxx 30 Mar 2005 09:11:10 -0000 1.26
-+++ vcl/unx/gtk/window/gtkframe.cxx 12 Apr 2005 15:53:58 -0000
-@@ -63,6 +63,7 @@
- #include <plugins/gtk/gtkdata.hxx>
- #include <plugins/gtk/gtkinst.hxx>
- #include <plugins/gtk/gtkgdi.hxx>
-+#include <plugins/gtk/atkfactory.hxx>
- #include <keycodes.hxx>
- #include <wmadaptor.hxx>
- #include <sm.hxx>
-@@ -71,6 +72,7 @@
- #include <floatwin.hxx>
- #include <salprn.h>
- #include <svapp.hxx>
-+#include <window.hxx>
-
- #include <prex.h>
- #include <X11/Xatom.h>
-@@ -271,7 +273,10 @@
- if( m_pFixedContainer )
- gtk_widget_destroy( GTK_WIDGET(m_pFixedContainer) );
- if( m_pWindow )
-+ {
-+ g_object_set_data( G_OBJECT( m_pWindow ), "SalFrame", NULL );
- gtk_widget_destroy( GTK_WIDGET(m_pWindow) );
-+ }
- if( m_pForeignParent )
- g_object_unref( G_OBJECT(m_pForeignParent) );
- if( m_pForeignTopLevel )
-@@ -485,6 +490,64 @@
- }
- }
-
-+// Always use a sub-class of GtkWindow we can tag for a11yx
-+static GType
-+ooo_window_get_type()
-+{
-+ static GType t = 0;
-+
-+ if (!t) {
-+ static const GTypeInfo tinfo =
-+ {
-+ sizeof( GtkWindowClass ),
-+ NULL, NULL, NULL, NULL, NULL,
-+ sizeof( GtkWindow ), 0, NULL, NULL
-+ };
-+
-+ t = g_type_register_static(
-+ GTK_TYPE_WINDOW, "OOoWindow", &tinfo, (GTypeFlags) 0);
-+ RegisterAtkFactory( t );
-+ }
-+
-+ return t;
-+}
-+
-+static GtkWindow *
-+createWindow( GtkSalFrame *pThis, ULONG nStyle )
-+{
-+ GtkWindow *pWindow;
-+ GtkWindowType eType = ( (nStyle & SAL_FRAME_STYLE_FLOAT) &&
-+ ! (nStyle & SAL_FRAME_STYLE_OWNERDRAWDECORATION) ) ?
-+ GTK_WINDOW_POPUP : GTK_WINDOW_TOPLEVEL;
-+
-+ // FIXME - we should really sub-class instead of doing
-+ // tens of expensive signal connections ... and this:
-+
-+ static int nCount = 0;
-+ if( eType == GTK_WINDOW_TOPLEVEL )
-+ fprintf( stderr, "Create toplevel %d\n", ++nCount );
-+
-+ pWindow = GTK_WINDOW( g_object_new( ooo_window_get_type(),
-+ "type", eType, "visible", FALSE, NULL ) );
-+ g_object_set_data( G_OBJECT( pWindow ), "SalFrame", pThis );
-+
-+ return pWindow;
-+}
-+
-+GtkSalFrame *GtkSalFrame::getFromWindow( GtkWindow *pWindow )
-+{
-+ return (GtkSalFrame *) g_object_get_data( G_OBJECT( pWindow ), "SalFrame" );
-+}
-+
-+::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >
-+GtkSalFrame::getAccessible( bool bCreate )
-+{
-+ // Yes - this is a hack - but: this abstraction seems totally useless to me
-+ Window *pWindow = static_cast<Window *>(GetInstance());
-+ if( pWindow )
-+ return pWindow->GetAccessible( bCreate );
-+}
-+
- void GtkSalFrame::Init( SalFrame* pParent, ULONG nStyle )
- {
- if( nStyle & SAL_FRAME_STYLE_DEFAULT ) // ensure default style
-@@ -493,7 +556,8 @@
- nStyle &= ~SAL_FRAME_STYLE_FLOAT;
- }
-
-- m_pWindow = GTK_WINDOW( gtk_widget_new( GTK_TYPE_WINDOW, "type", ((nStyle & SAL_FRAME_STYLE_FLOAT) && ! (nStyle & SAL_FRAME_STYLE_OWNERDRAWDECORATION)) ? GTK_WINDOW_POPUP : GTK_WINDOW_TOPLEVEL, "visible", FALSE, NULL ) );
-+ m_pWindow = createWindow( this, nStyle );
-+
- m_pParent = static_cast<GtkSalFrame*>(pParent);
- m_pForeignParent = NULL;
- m_aForeignParentWindow = None;
diff --git a/patches/a11y/a11y-vcl-prj.diff b/patches/a11y/a11y-vcl-prj.diff
deleted file mode 100644
index 22fef6cbe..000000000
--- a/patches/a11y/a11y-vcl-prj.diff
+++ /dev/null
@@ -1,37 +0,0 @@
-Index: vcl/prj/build.lst
-===================================================================
-RCS file: /cvs/gsl/vcl/prj/build.lst,v
-retrieving revision 1.41
-diff -u -r1.41 build.lst
---- vcl/prj/build.lst 21 Feb 2005 15:31:01 -0000 1.41
-+++ vcl/prj/build.lst 12 Apr 2005 14:49:05 -0000
-@@ -18,6 +18,7 @@
- vc vcl\unx\source\window nmake - u vc__winu vc_unot NULL
- vc vcl\unx\source\src nmake - u vc__srcu vc_unot NULL
- vc vcl\unx\dummy nmake - u vc__du vc_unot NULL
-+vc vcl\unx\gtk\a11y nmake - u vc__gtky vc_unot NULL
- vc vcl\unx\gtk\app nmake - u vc__gtka vc_unot NULL
- vc vcl\unx\gtk\window nmake - u vc__gtkw vc_unot NULL
- vc vcl\unx\gtk\gdi nmake - u vc__gtkg vc_unot NULL
-@@ -30,5 +31,5 @@
- vc vcl\mac\source\gdi nmake - m vc__gdim vc_unot NULL
- vc vcl\mac\source\window nmake - m vc__winm vc_unot NULL
- vc vcl\mac\source\src nmake - m vc__srcm vc_unot NULL
--vc vcl\util nmake - all vc_util vc__plug.u vc__appa.u vc__appm.m vc__appu.u vc__appw.w vc__gdim.m vc__gdiu.u vc__gdiw.w vc__srcm.m vc__srcu.u vc__srcw.w vc__wina.u vc__winm.m vc__winu.u vc__winw.w vc__du.u vc__gtka.u vc__gtkw.u vc__gtkg.u vc__kde.u vc_app vc_ctrl vc_gdi vc_hlp vc_src vc_win vc_glyphs NULL
-+vc vcl\util nmake - all vc_util vc__plug.u vc__appa.u vc__appm.m vc__appu.u vc__appw.w vc__gdim.m vc__gdiu.u vc__gdiw.w vc__srcm.m vc__srcu.u vc__srcw.w vc__wina.u vc__winm.m vc__winu.u vc__winw.w vc__du.u vc__gtka.u vc__gtky.u vc__gtkw.u vc__gtkg.u vc__kde.u vc_app vc_ctrl vc_gdi vc_hlp vc_src vc_win vc_glyphs NULL
- vc vcl\workben nmake - all vc_wrkb vc_util NULL
-Index: vcl/util/makefile.mk
-===================================================================
-RCS file: /cvs/gsl/vcl/util/makefile.mk,v
-retrieving revision 1.65
-diff -u -r1.65 makefile.mk
---- vcl/util/makefile.mk 13 Jan 2005 18:16:05 -0000 1.65
-+++ vcl/util/makefile.mk 12 Apr 2005 14:49:05 -0000
-@@ -367,6 +367,7 @@
-
- LIB4TARGET=$(SLB)$/igtk_plug_
- LIB4FILES=\
-+ $(SLB)$/gtka11y.lib\
- $(SLB)$/gtkapp.lib\
- $(SLB)$/gtkgdi.lib\
- $(SLB)$/gtkwin.lib
diff --git a/patches/a11y/comphelper-a11y-fix.diff b/patches/a11y/comphelper-a11y-fix.diff
deleted file mode 100644
index 27d66c99f..000000000
--- a/patches/a11y/comphelper-a11y-fix.diff
+++ /dev/null
@@ -1,20 +0,0 @@
-Index: comphelper/source/misc/accessiblewrapper.cxx
-===================================================================
-RCS file: /cvs/util/comphelper/source/misc/accessiblewrapper.cxx,v
-retrieving revision 1.8
-diff -u -r1.8 accessiblewrapper.cxx
---- comphelper/source/misc/accessiblewrapper.cxx 4 Feb 2004 11:26:40 -0000 1.8
-+++ comphelper/source/misc/accessiblewrapper.cxx 19 Apr 2005 14:49:13 -0000
-@@ -177,6 +181,12 @@
- {
- Reference< XAccessible > xValue;
-
-+ if( !_rxKey.is() )
-+ {
-+ fprintf( stderr, "It was this path that was crashing stuff\n" );
-+ return xValue;
-+ }
-+
- // do we have this child in the cahce?
- AccessibleMap::const_iterator aPos = m_aChildrenMap.find( _rxKey );
- if ( m_aChildrenMap.end() != aPos )
diff --git a/patches/a11y/vcl-unx-gtk-a11y-atkaction-cxx.diff b/patches/a11y/vcl-unx-gtk-a11y-atkaction-cxx.diff
deleted file mode 100644
index adcd5f41d..000000000
--- a/patches/a11y/vcl-unx-gtk-a11y-atkaction-cxx.diff
+++ /dev/null
@@ -1,97 +0,0 @@
---- /dev/null
-+++ vcl/unx/gtk/a11y/atkaction.cxx
-@@ -0,0 +1,94 @@
-+#include <com/sun/star/accessibility/XAccessibleKeyBinding.hpp>
-+
-+static uno::Reference< accessibility::XAccessibleAction >
-+ getAction( AtkAction *pAction )
-+{
-+ AtkObjectWrapper *pWrap = ATK_OBJECT_WRAPPER( pAction );
-+ uno::Reference< accessibility::XAccessibleAction > xAction;
-+ xAction = uno::Reference< accessibility::XAccessibleAction >(
-+ pWrap->mpContext, uno::UNO_QUERY );
-+ if( !xAction.is() )
-+ g_error( "%p claimed to have action, but now does not",
-+ pWrap->mpContext );
-+ return xAction;
-+}
-+
-+static gboolean
-+action_wrapper_do_action (AtkAction *action,
-+ gint i)
-+{
-+ TRY_START
-+ return getAction( action )->doAccessibleAction( i );
-+ TRY_END_RETURN( FALSE )
-+}
-+
-+static gint
-+action_wrapper_get_n_actions (AtkAction *action)
-+{
-+ TRY_START
-+ sal_Int32 nActions = 0;
-+ nActions = getAction( action )->getAccessibleActionCount();
-+ fprintf( stderr, "GetnActions returns %d", nActions );
-+ return nActions;
-+ TRY_END_RETURN( 0 )
-+}
-+
-+static G_CONST_RETURN gchar *
-+action_wrapper_get_description (AtkAction *action,
-+ gint i)
-+{
-+ TRY_START
-+ return getAsConst( getAction( action )->getAccessibleActionDescription( i ) );
-+ TRY_END_RETURN( "" )
-+}
-+
-+static G_CONST_RETURN gchar *
-+action_wrapper_get_localized_name (AtkAction *action,
-+ gint i)
-+{
-+ TRY_START
-+// FIXME - at least two of these are wrong
-+ return getAsConst( getAction( action )->getAccessibleActionDescription( i ) );
-+ TRY_END_RETURN( "" )
-+}
-+
-+static G_CONST_RETURN gchar *
-+action_wrapper_get_name (AtkAction *action,
-+ gint i)
-+{
-+ TRY_START
-+// FIXME - at least two of these are wrong
-+ return getAsConst( getAction( action )->getAccessibleActionDescription( i ) );
-+ TRY_END_RETURN( "" )
-+}
-+
-+static G_CONST_RETURN gchar *
-+action_wrapper_get_keybinding (AtkAction *action,
-+ gint i)
-+{
-+// uno::Reference< accessibility::XAccessibleKeyBinding > xBinding;
-+// xBinding = getAction( action )->getAccessibleActionKeyBinding( i );
-+ g_warning( "FIXME: AtkAction::get_keybinding unimplemented" );
-+ return "";
-+}
-+
-+static gboolean
-+action_wrapper_set_description (AtkAction *action,
-+ gint i,
-+ const gchar *desc)
-+{
-+ return FALSE;
-+}
-+
-+static void
-+actionIfaceInit (AtkActionIface *iface)
-+{
-+ g_return_if_fail (iface != NULL);
-+
-+ iface->do_action = action_wrapper_do_action;
-+ iface->get_n_actions = action_wrapper_get_n_actions;
-+ iface->get_description = action_wrapper_get_description;
-+ iface->get_keybinding = action_wrapper_get_keybinding;
-+ iface->get_name = action_wrapper_get_name;
-+ iface->set_description = action_wrapper_set_description;
-+}
diff --git a/patches/a11y/vcl-unx-gtk-a11y-atkcomponent-cxx.diff b/patches/a11y/vcl-unx-gtk-a11y-atkcomponent-cxx.diff
deleted file mode 100644
index 8bc4c5c80..000000000
--- a/patches/a11y/vcl-unx-gtk-a11y-atkcomponent-cxx.diff
+++ /dev/null
@@ -1,174 +0,0 @@
---- /dev/null
-+++ vcl/unx/gtk/a11y/atkcomponent.cxx
-@@ -0,0 +1,171 @@
-+static uno::Reference< accessibility::XAccessibleComponent >
-+ getComponent( AtkComponent *pComponent )
-+{
-+ AtkObjectWrapper *pWrap = ATK_OBJECT_WRAPPER( pComponent );
-+ return uno::Reference< accessibility::XAccessibleComponent >(
-+ pWrap->mpContext, uno::UNO_QUERY );
-+}
-+
-+static awt::Point translatePoint( AtkComponent *component,
-+ gint x, gint y, AtkCoordType t)
-+{
-+ awt::Point aOrigin( 0, 0 );
-+ if( t == ATK_XY_SCREEN )
-+ awt::Point aOrigin = getComponent( component )->getLocationOnScreen();
-+
-+ return awt::Point( x - aOrigin.X, y - aOrigin.Y );
-+}
-+
-+static gboolean
-+component_wrapper_grab_focus (AtkComponent *component)
-+{
-+ gboolean bSuccess = FALSE;
-+ try {
-+ getComponent( component )->grabFocus();
-+ bSuccess = TRUE;
-+ } catch( const uno::Exception &e) { }
-+ return bSuccess;
-+}
-+
-+static gboolean
-+component_wrapper_contains (AtkComponent *component,
-+ gint x,
-+ gint y,
-+ AtkCoordType coord_type)
-+{
-+ return getComponent( component )->containsPoint(
-+ translatePoint( component, x, y, coord_type ) );
-+}
-+
-+static AtkObject *
-+component_wrapper_ref_accessible_at_point (AtkComponent *component,
-+ gint x,
-+ gint y,
-+ AtkCoordType coord_type)
-+{
-+ uno::Reference< accessibility::XAccessible > xAccessible;
-+ xAccessible = getComponent( component )->getAccessibleAtPoint(
-+ translatePoint( component, x, y, coord_type ) );
-+ return atk_wrapper_get( xAccessible );
-+}
-+
-+static void
-+component_wrapper_get_position (AtkComponent *component,
-+ gint *x,
-+ gint *y,
-+ AtkCoordType coord_type)
-+{
-+ awt::Point aPos;
-+ if( coord_type == ATK_XY_SCREEN )
-+ aPos = getComponent( component )->getLocationOnScreen();
-+ else
-+ aPos = getComponent( component )->getLocation();
-+ *x = aPos.X;
-+ *y = aPos.Y;
-+}
-+
-+static void
-+component_wrapper_get_size (AtkComponent *component,
-+ gint *width,
-+ gint *height)
-+{
-+ awt::Size aSize = getComponent( component )->getSize();
-+ *width = aSize.Width;
-+ *height = aSize.Height;
-+}
-+
-+static void
-+component_wrapper_get_extents (AtkComponent *component,
-+ gint *x,
-+ gint *y,
-+ gint *width,
-+ gint *height,
-+ AtkCoordType coord_type)
-+{
-+ component_wrapper_get_position( component, x, y, coord_type );
-+ component_wrapper_get_size( component, width, height );
-+}
-+
-+static gboolean
-+component_wrapper_set_extents (AtkComponent *component,
-+ gint x,
-+ gint y,
-+ gint width,
-+ gint height,
-+ AtkCoordType coord_type)
-+{
-+ g_warning( "AtkComponent::set_extents unimplementable" );
-+ return FALSE;
-+}
-+
-+static gboolean
-+component_wrapper_set_position (AtkComponent *component,
-+ gint x,
-+ gint y,
-+ AtkCoordType coord_type)
-+{
-+ g_warning( "AtkComponent::set_position unimplementable" );
-+ return FALSE;
-+}
-+
-+static gboolean
-+component_wrapper_set_size (AtkComponent *component,
-+ gint width,
-+ gint height)
-+{
-+ g_warning( "AtkComponent::set_size unimplementable" );
-+ return FALSE;
-+}
-+
-+static AtkLayer
-+component_wrapper_get_layer (AtkComponent *component)
-+{
-+/* ATK_LAYER_INVALID,
-+ ATK_LAYER_BACKGROUND,
-+ ATK_LAYER_CANVAS,
-+ ATK_LAYER_WIDGET,
-+ ATK_LAYER_MDI,
-+ ATK_LAYER_POPUP,
-+ ATK_LAYER_OVERLAY,
-+ ATK_LAYER_WINDOW */
-+ g_warning( "FIXME: AtkComponent::get_layer unimplemented" );
-+
-+ return ATK_LAYER_INVALID;
-+}
-+
-+static gint
-+component_wrapper_get_mdi_zorder (AtkComponent *component)
-+{
-+ // FIXME: implement me ?
-+ g_warning( "FIXME: AtkComponent::get_mdi_zorder unimplemented" );
-+ return 0;
-+}
-+
-+// Tougher ...
-+static guint
-+component_wrapper_add_focus_handler (AtkComponent *component,
-+ AtkFocusHandler handler)
-+{
-+ return 0;
-+}
-+static void
-+component_wrapper_remove_focus_handler (AtkComponent *component,
-+ guint handler_id)
-+{
-+}
-+
-+static void
-+componentIfaceInit (AtkComponentIface *iface)
-+{
-+ g_return_if_fail (iface != NULL);
-+
-+ iface->add_focus_handler = component_wrapper_add_focus_handler;
-+ iface->get_extents = component_wrapper_get_extents;
-+ iface->get_size = component_wrapper_get_size;
-+ iface->get_layer = component_wrapper_get_layer;
-+ iface->grab_focus = component_wrapper_grab_focus;
-+ iface->remove_focus_handler = component_wrapper_remove_focus_handler;
-+ iface->set_extents = component_wrapper_set_extents;
-+ iface->set_position = component_wrapper_set_position;
-+ iface->set_size = component_wrapper_set_size;
-+}
diff --git a/patches/a11y/vcl-unx-gtk-a11y-atkfactory-cxx.diff b/patches/a11y/vcl-unx-gtk-a11y-atkfactory-cxx.diff
deleted file mode 100644
index a85e99d8d..000000000
--- a/patches/a11y/vcl-unx-gtk-a11y-atkfactory-cxx.diff
+++ /dev/null
@@ -1,73 +0,0 @@
---- /dev/null
-+++ vcl/unx/gtk/a11y/atkfactory.cxx
-@@ -0,0 +1,70 @@
-+#include <plugins/gtk/atkfactory.hxx>
-+#include <plugins/gtk/gtkframe.hxx>
-+#include "atkwrapper.hxx"
-+
-+extern "C" {
-+
-+static GType
-+wrapper_factory_get_accessible_type(void)
-+{
-+ return atk_object_wrapper_get_type();
-+}
-+
-+static AtkObject*
-+wrapper_factory_create_accessible( GObject *pObj )
-+{
-+ GtkSalFrame *pFrame;
-+
-+ g_message ("wrapper_factory_create_accessible...");
-+
-+ pFrame = GtkSalFrame::getFromWindow( GTK_WINDOW( pObj ) );
-+ g_return_val_if_fail( pFrame != NULL, NULL );
-+
-+ ::com::sun::star::uno::Reference<
-+ ::com::sun::star::accessibility::XAccessible > xAccessible;
-+ xAccessible = pFrame->getAccessible( true );
-+
-+ return atk_wrapper_get( xAccessible );
-+}
-+
-+static void
-+wrapper_factory_class_init( AtkObjectFactoryClass *klass )
-+{
-+ klass->create_accessible = wrapper_factory_create_accessible;
-+ klass->get_accessible_type = wrapper_factory_get_accessible_type;
-+}
-+
-+static GType
-+wrapper_factory_get_type (void)
-+{
-+ static GType t = 0;
-+
-+ if (!t) {
-+ static const GTypeInfo tinfo =
-+ {
-+ sizeof (AtkObjectFactoryClass),
-+ NULL, NULL, (GClassInitFunc) wrapper_factory_class_init,
-+ NULL, NULL, sizeof (AtkObjectFactory), 0, NULL, NULL
-+ };
-+
-+ t = g_type_register_static (
-+ ATK_TYPE_OBJECT_FACTORY, "OOoAtkObjectWrapperFactory",
-+ &tinfo, (GTypeFlags) 0);
-+ }
-+
-+ return t;
-+}
-+
-+}; // extern C
-+
-+void RegisterAtkFactory( GType nWindowType )
-+{
-+ AtkRegistry *pReg = atk_get_default_registry();
-+ if( pReg )
-+ {
-+ g_warning( "Registering factory" );
-+ atk_registry_set_factory_type
-+ ( pReg, nWindowType,
-+ wrapper_factory_get_type() );
-+ }
-+}
diff --git a/patches/a11y/vcl-unx-gtk-a11y-atklistener-cxx.diff b/patches/a11y/vcl-unx-gtk-a11y-atklistener-cxx.diff
deleted file mode 100644
index 419fe13fb..000000000
--- a/patches/a11y/vcl-unx-gtk-a11y-atklistener-cxx.diff
+++ /dev/null
@@ -1,188 +0,0 @@
---- /dev/null
-+++ vcl/unx/gtk/a11y/atklistener.cxx
-@@ -0,0 +1,185 @@
-+#include <cppuhelper/queryinterface.hxx>
-+#include <com/sun/star/accessibility/TextSegment.hpp>
-+#include <com/sun/star/accessibility/AccessibleEventId.hpp>
-+#include <com/sun/star/accessibility/AccessibleStateType.hpp>
-+
-+#include "atklistener.hxx"
-+
-+AtkListener::AtkListener( AtkObject *pObj )
-+{
-+ mnRefCount = 1;
-+ mpAccessible = pObj;
-+}
-+AtkListener::~AtkListener()
-+{
-+}
-+
-+AtkStateType mapState( const uno::Any &rAny )
-+{
-+ sal_Int16 nState = accessibility::AccessibleStateType::INVALID;
-+ rAny >>= nState;
-+ return mapAtkState( nState );
-+}
-+
-+// XInterface implementation
-+uno::Any AtkListener::queryInterface( const uno::Type & rType ) throw (uno::RuntimeException)
-+{
-+ return cppu::queryInterface
-+ (rType,
-+ static_cast< uno::XInterface * >( static_cast< accessibility::XAccessibleEventListener * >( this ) ),
-+ static_cast< accessibility::XAccessibleEventListener * >( this ) );
-+}
-+
-+// XEventListener implementation
-+void AtkListener::disposing( const lang::EventObject& Source ) throw (uno::RuntimeException)
-+{
-+ fprintf( stderr, "disposing\n" );
-+}
-+
-+static AtkObject *getObjFromAny( const uno::Any &rAny )
-+{
-+ uno::Reference< accessibility::XAccessible > xAccessible;
-+ rAny >>= xAccessible;
-+ return xAccessible.is() ? atk_wrapper_get( xAccessible ) : NULL;
-+}
-+
-+// XAccessibleEventListener
-+void AtkListener::notifyEvent( const accessibility::AccessibleEventObject& aEvent ) throw( uno::RuntimeException )
-+{
-+ if( !mpAccessible )
-+ return;
-+
-+ // ::sal_Int16 EventId CPPU_GCC3_ALIGN(::com::sun::star::lang::EventObject);
-+ // ::com::sun::star::uno::Any NewValue;
-+ // ::com::sun::star::uno::Any OldValue;
-+ switch( aEvent.EventId )
-+ {
-+ // AtkObject signals:
-+ // Hierarchy signals
-+ case accessibility::AccessibleEventId::CHILD:
-+ {
-+ AtkObject *pChild;
-+
-+ // TESTME - are these the correct insertion indexes ?
-+ if( ( pChild = getObjFromAny( aEvent.OldValue ) ) )
-+ {
-+ g_signal_emit_by_name( mpAccessible, "children_changed::remove",
-+ atk_object_get_index_in_parent( pChild ), pChild, NULL );
-+ g_object_unref( G_OBJECT( pChild ) );
-+ }
-+ if( ( pChild = getObjFromAny( aEvent.NewValue ) ) )
-+ {
-+ g_signal_emit_by_name( mpAccessible, "children_changed::add",
-+ atk_object_get_index_in_parent( pChild ), pChild, NULL );
-+ g_object_unref( G_OBJECT( pChild ) );
-+ }
-+ break;
-+ }
-+ case accessibility::AccessibleEventId::INVALIDATE_ALL_CHILDREN:
-+ g_warning( "FIXME: invalidate all children signal ?" );
-+ break;
-+ case accessibility::AccessibleEventId::NAME_CHANGED:
-+ g_object_notify( G_OBJECT( mpAccessible ), "accessible-name" );
-+ break;
-+ case accessibility::AccessibleEventId::DESCRIPTION_CHANGED:
-+ g_object_notify( G_OBJECT( mpAccessible ), "accessible-description" );
-+ break;
-+ case accessibility::AccessibleEventId::STATE_CHANGED:
-+ {
-+ AtkStateType eOldState = mapState( aEvent.OldValue );
-+ AtkStateType eNewState = mapState( aEvent.NewValue );
-+
-+ gboolean bState = eNewState != ATK_STATE_INVALID;
-+ AtkStateType eRealState = bState ? eNewState : eOldState;
-+
-+ g_warning( "Test me state changed %d to %s", eRealState, bState ? "set" : "unset" );
-+ atk_object_notify_state_change( mpAccessible, eRealState, bState );
-+ // If this is a focus change should we emit 'focus_event' ?
-+ break;
-+ }
-+ case accessibility::AccessibleEventId::VISIBLE_DATA_CHANGED:
-+ g_signal_emit_by_name( mpAccessible, "visible-data-changed" );
-+ break;
-+ case accessibility::AccessibleEventId::ACTIVE_DESCENDANT_CHANGED:
-+ {
-+ AtkObject *pChild = getObjFromAny( aEvent.NewValue );
-+ g_signal_emit_by_name( mpAccessible, "active-descendant-changed", pChild );
-+ g_object_unref( G_OBJECT( pChild ) );
-+ break;
-+ }
-+
-+ // AtkAction signals ...
-+ case accessibility::AccessibleEventId::ACTION_CHANGED:
-+ // FIXME: nothing to map this to ...
-+ break;
-+
-+ // AtkText
-+ case accessibility::AccessibleEventId::CARET_CHANGED:
-+ {
-+ sal_Int32 nPos;
-+ aEvent.NewValue >>= nPos;
-+ g_signal_emit_by_name( mpAccessible, "text_caret_moved", nPos );
-+ break;
-+ }
-+ case accessibility::AccessibleEventId::TEXT_CHANGED:
-+ {
-+ // TESTME: and remove this comment:
-+ // cf. comphelper/source/misc/accessibletexthelper.cxx (implInitTextChangedEvent)
-+ g_warning( "TESTME: text insertion" );
-+ accessibility::TextSegment aDeletedText;
-+ accessibility::TextSegment aInsertedText;
-+ aEvent.OldValue >>= aDeletedText;
-+ aEvent.NewValue >>= aInsertedText;
-+
-+ if( aDeletedText.SegmentStart > 0 )
-+ g_signal_emit_by_name( mpAccessible, "text_changed::delete",
-+ (gint) aDeletedText.SegmentStart,
-+ (gint)( aDeletedText.SegmentEnd - aDeletedText.SegmentStart ) );
-+ if( aInsertedText.SegmentStart > 0 )
-+ g_signal_emit_by_name( mpAccessible, "text_changed::add",
-+ (gint) aInsertedText.SegmentStart,
-+ (gint)( aInsertedText.SegmentEnd - aInsertedText.SegmentStart ) );
-+ break;
-+ }
-+ case accessibility::AccessibleEventId::TEXT_SELECTION_CHANGED:
-+ { // FIXME: suffers from the same selection problems ...
-+ break;
-+ }
-+ case accessibility::AccessibleEventId::TEXT_ATTRIBUTE_CHANGED:
-+ { // FIXME: implement attribute support
-+ break;
-+ }
-+
-+ // AtkValue
-+ case accessibility::AccessibleEventId::VALUE_CHANGED:
-+ g_object_notify( G_OBJECT( mpAccessible ),
-+ "accessible-value" );
-+ break;
-+
-+ case accessibility::AccessibleEventId::CONTENT_FLOWS_FROM_RELATION_CHANGED:
-+ case accessibility::AccessibleEventId::CONTENT_FLOWS_TO_RELATION_CHANGED:
-+ case accessibility::AccessibleEventId::CONTROLLED_BY_RELATION_CHANGED:
-+ case accessibility::AccessibleEventId::CONTROLLER_FOR_RELATION_CHANGED:
-+ case accessibility::AccessibleEventId::LABEL_FOR_RELATION_CHANGED:
-+ case accessibility::AccessibleEventId::LABELED_BY_RELATION_CHANGED:
-+ case accessibility::AccessibleEventId::MEMBER_OF_RELATION_CHANGED:
-+ case accessibility::AccessibleEventId::SUB_WINDOW_OF_RELATION_CHANGED:
-+ case accessibility::AccessibleEventId::BOUNDRECT_CHANGED:
-+ // FIXME: ask Bill how Atk copes with this little lot ...
-+ break;
-+
-+ case accessibility::AccessibleEventId::SELECTION_CHANGED:
-+ case accessibility::AccessibleEventId::HYPERTEXT_CHANGED:
-+ case accessibility::AccessibleEventId::TABLE_CAPTION_CHANGED:
-+ case accessibility::AccessibleEventId::TABLE_COLUMN_DESCRIPTION_CHANGED:
-+ case accessibility::AccessibleEventId::TABLE_COLUMN_HEADER_CHANGED:
-+ case accessibility::AccessibleEventId::TABLE_MODEL_CHANGED:
-+ case accessibility::AccessibleEventId::TABLE_ROW_DESCRIPTION_CHANGED:
-+ case accessibility::AccessibleEventId::TABLE_ROW_HEADER_CHANGED:
-+ case accessibility::AccessibleEventId::TABLE_SUMMARY_CHANGED:
-+ break;
-+ default:
-+ g_warning( "Unknown event notification" );
-+ break;
-+ }
-+}
diff --git a/patches/a11y/vcl-unx-gtk-a11y-atklistener-hxx.diff b/patches/a11y/vcl-unx-gtk-a11y-atklistener-hxx.diff
deleted file mode 100644
index 5f2cfa108..000000000
--- a/patches/a11y/vcl-unx-gtk-a11y-atklistener-hxx.diff
+++ /dev/null
@@ -1,37 +0,0 @@
---- /dev/null
-+++ vcl/unx/gtk/a11y/atklistener.hxx
-@@ -0,0 +1,34 @@
-+#ifndef _ATK_LISTENER_HXX_
-+#define _ATK_LISTENER_HXX_
-+
-+#include <com/sun/star/accessibility/XAccessibleEventListener.hpp>
-+#include "atkwrapper.hxx"
-+
-+using namespace ::com::sun::star;
-+
-+class AtkListener : public accessibility::XAccessibleEventListener
-+{
-+ // UNO sucks for not providing a sane base-class for this.
-+ sal_Int32 mnRefCount;
-+ AtkObject *mpAccessible;
-+
-+public:
-+ AtkListener( AtkObject *pObj );
-+ virtual ~AtkListener();
-+
-+ void deRegister() { mpAccessible = NULL; }
-+
-+ // XInterface
-+ virtual void acquire() throw () { ++mnRefCount; }
-+ virtual void release() throw () { if (! --mnRefCount) delete this; }
-+ virtual uno::Any queryInterface( const uno::Type & rType ) throw (uno::RuntimeException);
-+
-+ // XEventListener
-+ virtual void disposing( const lang::EventObject& Source ) throw (uno::RuntimeException);
-+
-+ // XAccessibleEventListener
-+ virtual void notifyEvent( const accessibility::AccessibleEventObject& aEvent ) throw( uno::RuntimeException );
-+};
-+
-+#endif /* _ATK_LISTENER_HXX_ */
-+
diff --git a/patches/a11y/vcl-unx-gtk-a11y-atktext-cxx.diff b/patches/a11y/vcl-unx-gtk-a11y-atktext-cxx.diff
deleted file mode 100644
index 16ff3949b..000000000
--- a/patches/a11y/vcl-unx-gtk-a11y-atktext-cxx.diff
+++ /dev/null
@@ -1,218 +0,0 @@
---- /dev/null
-+++ vcl/unx/gtk/a11y/atktext.cxx
-@@ -0,0 +1,215 @@
-+#include <com/sun/star/accessibility/TextSegment.hpp>
-+
-+static uno::Reference< accessibility::XAccessibleText >
-+ getText( AtkText *pText )
-+{
-+ AtkObjectWrapper *pWrap = ATK_OBJECT_WRAPPER( pText );
-+ return uno::Reference< accessibility::XAccessibleText >(
-+ pWrap->mpContext, uno::UNO_QUERY );
-+}
-+
-+static gchar *
-+text_wrapper_get_text (AtkText *text,
-+ gint start_offset,
-+ gint end_offset)
-+{
-+ TRY_START
-+ return mapToGChar( getText( text )->getText() );
-+ TRY_END_RETURN( NULL )
-+}
-+
-+static gchar *
-+text_wrapper_get_text_after_offset (AtkText *text,
-+ gint offset,
-+ AtkTextBoundary boundary_type,
-+ gint *start_offset,
-+ gint *end_offset)
-+{
-+ return g_strdup( "a" ); // FIXME
-+}
-+
-+static gchar *
-+text_wrapper_get_text_at_offset (AtkText *text,
-+ gint offset,
-+ AtkTextBoundary boundary_type,
-+ gint *start_offset,
-+ gint *end_offset)
-+{
-+ return g_strdup( "a" ); // FIXME
-+}
-+
-+static gunichar
-+text_wrapper_get_character_at_offset (AtkText *text,
-+ gint offset)
-+{
-+ return 'a';
-+}
-+
-+static gchar *
-+text_wrapper_get_text_before_offset (AtkText *text,
-+ gint offset,
-+ AtkTextBoundary boundary_type,
-+ gint *start_offset,
-+ gint *end_offset)
-+{
-+ return g_strdup( "" ); // FIXME
-+}
-+
-+static gint
-+text_wrapper_get_caret_offset (AtkText *text)
-+{
-+ TRY_START
-+ return getText( text )->getCaretPosition();
-+ TRY_END_RETURN( FALSE )
-+}
-+
-+static gboolean
-+text_wrapper_set_caret_offset (AtkText *text,
-+ gint offset)
-+{
-+ TRY_START
-+ return getText( text )->setCaretPosition( offset );
-+ TRY_END_RETURN( FALSE )
-+}
-+
-+static AtkAttributeSet *
-+text_wrapper_get_run_attributes (AtkText *text,
-+ gint offset,
-+ gint *start_offset,
-+ gint *end_offset)
-+{
-+ return NULL;
-+}
-+
-+static AtkAttributeSet *
-+text_wrapper_get_default_attributes (AtkText *text)
-+{
-+ return NULL;
-+}
-+
-+static void
-+text_wrapper_get_character_extents (AtkText *text,
-+ gint offset,
-+ gint *x,
-+ gint *y,
-+ gint *width,
-+ gint *height,
-+ AtkCoordType coords)
-+{
-+ g_return_if_fail( (coords != ATK_XY_SCREEN ) ||
-+ ATK_IS_COMPONENT( text ) );
-+
-+ *x = *y = *width = *height = 0;
-+ TRY_START
-+ awt::Rectangle aRect = getText( text )->getCharacterBounds( offset );
-+ if( coords == ATK_XY_SCREEN )
-+ g_warning ("FIXME: implement screen bounds" );
-+ *x = aRect.X;
-+ *y = aRect.Y;
-+ *width = aRect.Width;
-+ *height = aRect.Height;
-+ TRY_END
-+}
-+
-+static gint
-+text_wrapper_get_character_count (AtkText *text)
-+{
-+ TRY_START
-+ return getText( text )->getCharacterCount();
-+ TRY_END_RETURN( 0 )
-+}
-+
-+static gint
-+text_wrapper_get_offset_at_point (AtkText *text,
-+ gint x,
-+ gint y,
-+ AtkCoordType coords)
-+{
-+ g_return_val_if_fail( (coords != ATK_XY_SCREEN ) ||
-+ ATK_IS_COMPONENT( text ), -1 );
-+ TRY_START
-+ return getText( text )->getIndexAtPoint(
-+ translatePoint( ATK_COMPONENT( text ), x, y, coords ) );
-+ TRY_END_RETURN( -1 )
-+}
-+
-+// FIXME: the whole series of selections API is problematic ...
-+
-+static gint
-+text_wrapper_get_n_selections (AtkText *text)
-+{
-+ return 0; // FIXME
-+}
-+
-+static gchar *
-+text_wrapper_get_selection (AtkText *text,
-+ gint selection_num,
-+ gint *start_offset,
-+ gint *end_offset)
-+{
-+ g_return_val_if_fail( selection_num == 0, FALSE );
-+ TRY_START
-+ uno::Reference< accessibility::XAccessibleText > xText = getText( text );
-+
-+ *start_offset = xText->getSelectionStart();
-+ *end_offset = xText->getSelectionEnd();
-+
-+ return mapToGChar( xText->getSelectedText() );
-+ TRY_END_RETURN( NULL )
-+}
-+
-+static gboolean
-+text_wrapper_add_selection (AtkText *text,
-+ gint start_offset,
-+ gint end_offset)
-+{
-+ TRY_START
-+ return getText( text )->setSelection( start_offset, end_offset );
-+ TRY_END_RETURN( FALSE )
-+}
-+
-+static gboolean
-+text_wrapper_remove_selection (AtkText *text,
-+ gint selection_num)
-+{
-+ g_return_val_if_fail( selection_num == 0, FALSE );
-+ TRY_START
-+ return getText( text )->setSelection( 0, 0 ); // ?
-+ TRY_END_RETURN( FALSE )
-+}
-+
-+static gboolean
-+text_wrapper_set_selection (AtkText *text,
-+ gint selection_num,
-+ gint start_offset,
-+ gint end_offset)
-+{
-+ g_return_val_if_fail( selection_num == 0, FALSE );
-+ TRY_START
-+ return getText( text )->setSelection( start_offset, end_offset );
-+ TRY_END_RETURN( FALSE )
-+}
-+
-+static void
-+textIfaceInit (AtkTextIface *iface)
-+{
-+ g_return_if_fail (iface != NULL);
-+
-+ iface->get_text = text_wrapper_get_text;
-+ iface->get_character_at_offset = text_wrapper_get_character_at_offset;
-+ iface->get_text_before_offset = text_wrapper_get_text_before_offset;
-+ iface->get_text_at_offset = text_wrapper_get_text_at_offset;
-+ iface->get_text_after_offset = text_wrapper_get_text_after_offset;
-+ iface->get_caret_offset = text_wrapper_get_caret_offset;
-+ iface->set_caret_offset = text_wrapper_set_caret_offset;
-+ iface->get_character_count = text_wrapper_get_character_count;
-+ iface->get_n_selections = text_wrapper_get_n_selections;
-+ iface->get_selection = text_wrapper_get_selection;
-+ iface->add_selection = text_wrapper_add_selection;
-+ iface->remove_selection = text_wrapper_remove_selection;
-+ iface->set_selection = text_wrapper_set_selection;
-+ iface->get_run_attributes = text_wrapper_get_run_attributes;
-+ iface->get_default_attributes = text_wrapper_get_default_attributes;
-+ iface->get_character_extents = text_wrapper_get_character_extents;
-+ iface->get_offset_at_point = text_wrapper_get_offset_at_point;
-+}
diff --git a/patches/a11y/vcl-unx-gtk-a11y-atkvalue-cxx.diff b/patches/a11y/vcl-unx-gtk-a11y-atkvalue-cxx.diff
deleted file mode 100644
index 8c45e12b1..000000000
--- a/patches/a11y/vcl-unx-gtk-a11y-atkvalue-cxx.diff
+++ /dev/null
@@ -1,72 +0,0 @@
---- /dev/null
-+++ vcl/unx/gtk/a11y/atkvalue.cxx
-@@ -0,0 +1,69 @@
-+static uno::Reference< accessibility::XAccessibleValue >
-+ getValue( AtkValue *pValue )
-+{
-+ AtkObjectWrapper *pWrap = ATK_OBJECT_WRAPPER( pValue );
-+ return uno::Reference< accessibility::XAccessibleValue >(
-+ pWrap->mpContext, uno::UNO_QUERY );
-+}
-+
-+static void anyToGValue( uno::Any aAny, GValue *pValue )
-+{
-+ // FIXME: expand to lots of types etc.
-+ double aDouble;
-+ aAny >>= aDouble;
-+
-+ memset( pValue, 0, sizeof( GValue ) );
-+ g_value_init( pValue, G_TYPE_DOUBLE );
-+ g_value_set_double( pValue, aDouble );
-+}
-+
-+static void
-+value_wrapper_get_current_value( AtkValue *pObj,
-+ GValue *pValue )
-+{
-+ TRY_START
-+ anyToGValue( getValue( pObj )->getCurrentValue(), pValue );;
-+ TRY_END
-+}
-+
-+static void
-+value_wrapper_get_maximum_value( AtkValue *pObj,
-+ GValue *pValue )
-+{
-+ TRY_START
-+ anyToGValue( getValue( pObj )->getMaximumValue(), pValue );
-+ TRY_END
-+}
-+
-+static void
-+value_wrapper_get_minimum_value( AtkValue *pObj,
-+ GValue *pValue )
-+{
-+ TRY_START
-+ anyToGValue( getValue( pObj )->getMinimumValue(), pValue );
-+ TRY_END
-+}
-+
-+static gboolean
-+value_wrapper_set_current_value( AtkValue *pObj,
-+ const GValue *pValue )
-+{
-+ TRY_START
-+ // FIXME - this needs expanding
-+ double aDouble = g_value_get_double( pValue );
-+ uno::Any aAny;
-+ aAny <<= aDouble;
-+ return getValue( pObj )->setCurrentValue( aAny );
-+ TRY_END_RETURN( 0 )
-+}
-+
-+static void
-+valueIfaceInit (AtkValueIface *iface)
-+{
-+ g_return_if_fail (iface != NULL);
-+
-+ iface->get_current_value = value_wrapper_get_current_value;
-+ iface->get_maximum_value = value_wrapper_get_maximum_value;
-+ iface->get_minimum_value = value_wrapper_get_minimum_value;
-+ iface->set_current_value = value_wrapper_set_current_value;
-+}
diff --git a/patches/a11y/vcl-unx-gtk-a11y-atkwrapper-cxx.diff b/patches/a11y/vcl-unx-gtk-a11y-atkwrapper-cxx.diff
deleted file mode 100644
index 9bb883ec6..000000000
--- a/patches/a11y/vcl-unx-gtk-a11y-atkwrapper-cxx.diff
+++ /dev/null
@@ -1,595 +0,0 @@
---- /dev/null
-+++ vcl/unx/gtk/a11y/atkwrapper.cxx
-@@ -0,0 +1,592 @@
-+#include <com/sun/star/uno/Any.hxx>
-+#include <com/sun/star/uno/Type.hxx>
-+#include <com/sun/star/uno/Sequence.hxx>
-+#include <com/sun/star/accessibility/AccessibleRole.hpp>
-+#include <com/sun/star/accessibility/AccessibleRelation.hpp>
-+#include <com/sun/star/accessibility/AccessibleRelationType.hpp>
-+#include <com/sun/star/accessibility/AccessibleStateType.hpp>
-+#include <com/sun/star/accessibility/XAccessible.hpp>
-+#include <com/sun/star/accessibility/XAccessibleText.hpp>
-+#include <com/sun/star/accessibility/XAccessibleValue.hpp>
-+#include <com/sun/star/accessibility/XAccessibleAction.hpp>
-+#include <com/sun/star/accessibility/XAccessibleContext.hpp>
-+#include <com/sun/star/accessibility/XAccessibleComponent.hpp>
-+#include <com/sun/star/accessibility/XAccessibleEventBroadcaster.hpp>
-+#include <com/sun/star/accessibility/XAccessibleStateSet.hpp>
-+#include <com/sun/star/accessibility/XAccessibleRelationSet.hpp>
-+#include <com/sun/star/awt/XExtendedToolkit.hpp>
-+#include <com/sun/star/awt/XTopWindow.hpp>
-+#include <com/sun/star/awt/XTopWindowListener.hpp>
-+#include <com/sun/star/awt/XWindow.hpp>
-+#include <com/sun/star/lang/XComponent.hpp>
-+#include <com/sun/star/lang/XServiceInfo.hpp>
-+#include <com/sun/star/lang/XInitialization.hpp>
-+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-+#include <com/sun/star/lang/XSingleServiceFactory.hpp>
-+#include <com/sun/star/beans/Property.hpp>
-+
-+#include <rtl/ref.hxx>
-+#include <cppuhelper/factory.hxx>
-+#include <cppuhelper/queryinterface.hxx>
-+
-+#include "atkwrapper.hxx"
-+#include "atklistener.hxx"
-+
-+#define ATK_TYPE_OBJECT_WRAPPER atk_object_wrapper_get_type()
-+#define ATK_OBJECT_WRAPPER(obj) \
-+ (G_TYPE_CHECK_INSTANCE_CAST ((obj), ATK_TYPE_OBJECT_WRAPPER, AtkObjectWrapper))
-+
-+static GObjectClass *parent_class = NULL;
-+static GHashTable *uno_to_gobject = NULL;
-+
-+#define TRY_START try {
-+#define TRY_END } catch(const uno::Exception &e) { }
-+#define TRY_END_RETURN(v) } catch(const uno::Exception &e) { return v; }
-+
-+static G_CONST_RETURN gchar *
-+getAsConst( rtl::OUString rString )
-+{
-+ static const int nMax = 10;
-+ static rtl::OString aUgly[nMax];
-+ static int nIdx = 0;
-+ nIdx = (nIdx + 1) % nMax;
-+ aUgly[nIdx] = rtl::OUStringToOString( rString, RTL_TEXTENCODING_UTF8 );
-+ return aUgly[ nIdx ];
-+}
-+
-+static AtkRelationType mapRelationType( sal_Int16 nRelation )
-+{
-+#if 0
-+ static const ::sal_Int16 INVALID = (sal_Int16)0;
-+static const ::sal_Int16 CONTENT_FLOWS_FROM = (sal_Int16)1;
-+static const ::sal_Int16 CONTENT_FLOWS_TO = (sal_Int16)2;
-+static const ::sal_Int16 CONTROLLED_BY = (sal_Int16)3;
-+static const ::sal_Int16 CONTROLLER_FOR = (sal_Int16)4;
-+static const ::sal_Int16 LABEL_FOR = (sal_Int16)5;
-+static const ::sal_Int16 LABELED_BY = (sal_Int16)6;
-+static const ::sal_Int16 MEMBER_OF = (sal_Int16)7;
-+static const ::sal_Int16 SUB_WINDOW_OF = (sal_Int16)8;
-+ ATK_RELATION_NULL = 0,
-+ ATK_RELATION_CONTROLLED_BY,
-+ ATK_RELATION_CONTROLLER_FOR,
-+ ATK_RELATION_LABEL_FOR,
-+ ATK_RELATION_LABELLED_BY,
-+ ATK_RELATION_MEMBER_OF,
-+ ATK_RELATION_NODE_CHILD_OF,
-+ ATK_RELATION_FLOWS_TO,
-+ ATK_RELATION_FLOWS_FROM,
-+ ATK_RELATION_SUBWINDOW_OF,
-+ ATK_RELATION_EMBEDS,
-+ ATK_RELATION_EMBEDDED_BY,
-+ ATK_RELATION_POPUP_FOR,
-+ ATK_RELATION_LAST_DEFINED
-+ AtkRelationType;
-+#endif
-+ return ATK_RELATION_NULL;
-+}
-+
-+AtkStateType mapAtkState( sal_Int16 nState )
-+{
-+ // A perfect / complete mapping ...
-+ switch( nState )
-+ {
-+#define MAP_DIRECT( a ) \
-+ case accessibility::AccessibleStateType::a: \
-+ return ATK_STATE_##a; break
-+
-+ MAP_DIRECT( INVALID );
-+ MAP_DIRECT( ACTIVE );
-+ MAP_DIRECT( ARMED );
-+ MAP_DIRECT( BUSY );
-+ MAP_DIRECT( CHECKED );
-+ MAP_DIRECT( EDITABLE );
-+ MAP_DIRECT( ENABLED );
-+ MAP_DIRECT( EXPANDABLE );
-+ MAP_DIRECT( EXPANDED );
-+ MAP_DIRECT( FOCUSABLE );
-+ MAP_DIRECT( FOCUSED );
-+ MAP_DIRECT( HORIZONTAL );
-+ MAP_DIRECT( ICONIFIED );
-+ MAP_DIRECT( INDETERMINATE );
-+ MAP_DIRECT( MANAGES_DESCENDANTS );
-+ MAP_DIRECT( MODAL );
-+ MAP_DIRECT( MULTI_LINE );
-+ MAP_DIRECT( OPAQUE );
-+ MAP_DIRECT( PRESSED );
-+ MAP_DIRECT( RESIZABLE );
-+ MAP_DIRECT( SELECTABLE );
-+ MAP_DIRECT( SELECTED );
-+ MAP_DIRECT( SENSITIVE );
-+ MAP_DIRECT( SHOWING );
-+ MAP_DIRECT( SINGLE_LINE );
-+ MAP_DIRECT( STALE );
-+ MAP_DIRECT( TRANSIENT );
-+ MAP_DIRECT( VERTICAL );
-+ MAP_DIRECT( VISIBLE );
-+ // a spelling error ...
-+ case accessibility::AccessibleStateType::DEFUNC:
-+ return ATK_STATE_DEFUNCT; break;
-+ case accessibility::AccessibleStateType::MULTI_SELECTABLE:
-+ return ATK_STATE_MULTISELECTABLE; break;
-+ default:
-+ return ATK_STATE_INVALID;
-+ break;
-+ }
-+}
-+
-+static AtkRole mapToAtkRole( sal_Int16 nRole )
-+{
-+ switch( nRole )
-+ {
-+#define MAP(a,b) \
-+ case a: return b; break
-+
-+ MAP( ::accessibility::AccessibleRole::UNKNOWN, ATK_ROLE_UNKNOWN );
-+ MAP( ::accessibility::AccessibleRole::ALERT, ATK_ROLE_ALERT );
-+ MAP( ::accessibility::AccessibleRole::COLUMN_HEADER, ATK_ROLE_COLUMN_HEADER );
-+ MAP( ::accessibility::AccessibleRole::CANVAS, ATK_ROLE_CANVAS );
-+ MAP( ::accessibility::AccessibleRole::CHECK_BOX, ATK_ROLE_CHECK_BOX );
-+ MAP( ::accessibility::AccessibleRole::CHECK_MENU_ITEM, ATK_ROLE_CHECK_MENU_ITEM );
-+ MAP( ::accessibility::AccessibleRole::COLOR_CHOOSER, ATK_ROLE_COLOR_CHOOSER );
-+ MAP( ::accessibility::AccessibleRole::COMBO_BOX, ATK_ROLE_COMBO_BOX );
-+ MAP( ::accessibility::AccessibleRole::DATE_EDITOR, ATK_ROLE_DATE_EDITOR );
-+ MAP( ::accessibility::AccessibleRole::DESKTOP_ICON, ATK_ROLE_DESKTOP_ICON );
-+ MAP( ::accessibility::AccessibleRole::DESKTOP_PANE, ATK_ROLE_DESKTOP_FRAME ); // ? pane
-+ MAP( ::accessibility::AccessibleRole::DIRECTORY_PANE, ATK_ROLE_DIRECTORY_PANE );
-+ MAP( ::accessibility::AccessibleRole::DIALOG, ATK_ROLE_DIALOG );
-+ MAP( ::accessibility::AccessibleRole::DOCUMENT, ATK_ROLE_UNKNOWN ); // - FIXME -
-+ MAP( ::accessibility::AccessibleRole::EMBEDDED_OBJECT, ATK_ROLE_UNKNOWN ); // - FIXME -
-+ MAP( ::accessibility::AccessibleRole::END_NOTE, ATK_ROLE_UNKNOWN ); // - FIXME -
-+ MAP( ::accessibility::AccessibleRole::FILE_CHOOSER, ATK_ROLE_FILE_CHOOSER );
-+ MAP( ::accessibility::AccessibleRole::FILLER, ATK_ROLE_FILLER );
-+ MAP( ::accessibility::AccessibleRole::FONT_CHOOSER, ATK_ROLE_FONT_CHOOSER );
-+ MAP( ::accessibility::AccessibleRole::FOOTER, ATK_ROLE_FOOTER );
-+ MAP( ::accessibility::AccessibleRole::FOOTNOTE, ATK_ROLE_TEXT ); // - FIXME -
-+ MAP( ::accessibility::AccessibleRole::FRAME, ATK_ROLE_FRAME );
-+ MAP( ::accessibility::AccessibleRole::GLASS_PANE, ATK_ROLE_GLASS_PANE );
-+ MAP( ::accessibility::AccessibleRole::GRAPHIC, ATK_ROLE_UNKNOWN ); // - FIXME -
-+ MAP( ::accessibility::AccessibleRole::GROUP_BOX, ATK_ROLE_UNKNOWN ); // - FIXME -
-+ MAP( ::accessibility::AccessibleRole::HEADER, ATK_ROLE_HEADER );
-+ MAP( ::accessibility::AccessibleRole::HEADING, ATK_ROLE_HEADER ); // - FIXME -
-+ MAP( ::accessibility::AccessibleRole::HYPER_LINK, ATK_ROLE_TEXT ); // - FIXME -
-+ MAP( ::accessibility::AccessibleRole::ICON, ATK_ROLE_ICON );
-+ MAP( ::accessibility::AccessibleRole::INTERNAL_FRAME, ATK_ROLE_INTERNAL_FRAME );
-+ MAP( ::accessibility::AccessibleRole::LABEL, ATK_ROLE_LABEL );
-+ MAP( ::accessibility::AccessibleRole::LAYERED_PANE, ATK_ROLE_LAYERED_PANE );
-+ MAP( ::accessibility::AccessibleRole::LIST, ATK_ROLE_LIST );
-+ MAP( ::accessibility::AccessibleRole::LIST_ITEM, ATK_ROLE_LIST_ITEM );
-+ MAP( ::accessibility::AccessibleRole::MENU, ATK_ROLE_MENU );
-+ MAP( ::accessibility::AccessibleRole::MENU_BAR, ATK_ROLE_MENU_BAR );
-+ MAP( ::accessibility::AccessibleRole::MENU_ITEM, ATK_ROLE_MENU_ITEM );
-+ MAP( ::accessibility::AccessibleRole::OPTION_PANE, ATK_ROLE_OPTION_PANE );
-+ MAP( ::accessibility::AccessibleRole::PAGE_TAB, ATK_ROLE_PAGE_TAB );
-+ MAP( ::accessibility::AccessibleRole::PAGE_TAB_LIST, ATK_ROLE_PAGE_TAB_LIST );
-+ MAP( ::accessibility::AccessibleRole::PANEL, ATK_ROLE_PANEL );
-+ MAP( ::accessibility::AccessibleRole::PARAGRAPH, ATK_ROLE_PARAGRAPH );
-+ MAP( ::accessibility::AccessibleRole::PASSWORD_TEXT, ATK_ROLE_PASSWORD_TEXT );
-+ MAP( ::accessibility::AccessibleRole::POPUP_MENU, ATK_ROLE_POPUP_MENU );
-+ MAP( ::accessibility::AccessibleRole::PUSH_BUTTON, ATK_ROLE_PUSH_BUTTON );
-+ MAP( ::accessibility::AccessibleRole::PROGRESS_BAR, ATK_ROLE_PROGRESS_BAR );
-+ MAP( ::accessibility::AccessibleRole::RADIO_BUTTON, ATK_ROLE_RADIO_BUTTON );
-+ MAP( ::accessibility::AccessibleRole::RADIO_MENU_ITEM, ATK_ROLE_RADIO_MENU_ITEM );
-+ MAP( ::accessibility::AccessibleRole::ROW_HEADER, ATK_ROLE_ROW_HEADER );
-+ MAP( ::accessibility::AccessibleRole::ROOT_PANE, ATK_ROLE_ROOT_PANE );
-+ MAP( ::accessibility::AccessibleRole::SCROLL_BAR, ATK_ROLE_SCROLL_BAR );
-+ MAP( ::accessibility::AccessibleRole::SCROLL_PANE, ATK_ROLE_SCROLL_PANE );
-+ MAP( ::accessibility::AccessibleRole::SHAPE, ATK_ROLE_UNKNOWN ); // - FIXME -
-+ MAP( ::accessibility::AccessibleRole::SEPARATOR, ATK_ROLE_SEPARATOR );
-+ MAP( ::accessibility::AccessibleRole::SLIDER, ATK_ROLE_SLIDER );
-+ MAP( ::accessibility::AccessibleRole::SPIN_BOX, ATK_ROLE_SPIN_BUTTON ); // ?
-+ MAP( ::accessibility::AccessibleRole::SPLIT_PANE, ATK_ROLE_SPLIT_PANE );
-+ MAP( ::accessibility::AccessibleRole::STATUS_BAR, ATK_ROLE_STATUSBAR );
-+ MAP( ::accessibility::AccessibleRole::TABLE, ATK_ROLE_TABLE );
-+ MAP( ::accessibility::AccessibleRole::TABLE_CELL, ATK_ROLE_TABLE_CELL );
-+ MAP( ::accessibility::AccessibleRole::TEXT, ATK_ROLE_TEXT );
-+ MAP( ::accessibility::AccessibleRole::TEXT_FRAME, ATK_ROLE_UNKNOWN ); // - FIXME -
-+ MAP( ::accessibility::AccessibleRole::TOGGLE_BUTTON, ATK_ROLE_TOGGLE_BUTTON );
-+ MAP( ::accessibility::AccessibleRole::TOOL_BAR, ATK_ROLE_TOOL_BAR );
-+ MAP( ::accessibility::AccessibleRole::TOOL_TIP, ATK_ROLE_TOOL_TIP );
-+ MAP( ::accessibility::AccessibleRole::TREE, ATK_ROLE_TREE );
-+ MAP( ::accessibility::AccessibleRole::VIEW_PORT, ATK_ROLE_VIEWPORT );
-+ MAP( ::accessibility::AccessibleRole::WINDOW, ATK_ROLE_WINDOW );
-+#undef MAP
-+ }
-+/* Roles unimplemented by OO.o / a11y:
-+ ATK_ROLE_INVALID, ATK_ROLE_ACCEL_LABEL, ATK_ROLE_ANIMATION,
-+ ATK_ROLE_ARROW, ATK_ROLE_CALENDAR, ATK_ROLE_DIAL,
-+ ATK_ROLE_DRAWING_AREA, ATK_ROLE_HTML_CONTAINER, ATK_ROLE_IMAGE,
-+ ATK_ROLE_TABLE_COLUMN_HEADER, ATK_ROLE_TABLE_ROW_HEADER, ATK_ROLE_TEAR_OFF_MENU_ITEM,
-+ ATK_ROLE_TERMINAL, ATK_ROLE_TREE_TABLE, ATK_ROLE_RULER,
-+ ATK_ROLE_APPLICATION, ATK_ROLE_AUTOCOMPLETE, ATK_ROLE_EDITBAR */
-+
-+ return ATK_ROLE_UNKNOWN;
-+}
-+
-+static gchar *
-+mapToGChar( rtl::OUString aString )
-+{
-+ rtl::OString aUtf8 = rtl::OUStringToOString( aString, RTL_TEXTENCODING_UTF8 );
-+ return g_strdup( aUtf8 );
-+}
-+
-+extern "C" {
-+
-+static uno::Reference< accessibility::XAccessibleContext >
-+ getContext( AtkObject *pObject )
-+{
-+ AtkObjectWrapper *pWrap = ATK_OBJECT_WRAPPER( pObject );
-+ return uno::Reference< accessibility::XAccessibleContext >(
-+ pWrap->mpContext, uno::UNO_QUERY );
-+}
-+
-+static G_CONST_RETURN gchar *
-+wrapper_get_name( AtkObject *pObject )
-+{
-+ TRY_START
-+ return getAsConst( getContext( pObject )->getAccessibleName() );
-+ TRY_END_RETURN( NULL )
-+}
-+
-+static G_CONST_RETURN gchar *
-+wrapper_get_description( AtkObject *pObject )
-+{
-+ TRY_START
-+ return getAsConst( getContext( pObject )->getAccessibleDescription() );
-+ TRY_END_RETURN( NULL )
-+}
-+
-+static gint
-+wrapper_get_n_children( AtkObject *pObject )
-+{
-+ TRY_START
-+ return getContext( pObject )->getAccessibleChildCount();
-+ TRY_END_RETURN( 0 )
-+}
-+
-+static AtkObject *
-+wrapper_ref_child( AtkObject *pObject,
-+ gint i )
-+{
-+ TRY_START
-+ return atk_wrapper_get( getContext( pObject )->getAccessibleChild( i ) );
-+ TRY_END_RETURN( NULL )
-+}
-+
-+static gint
-+wrapper_get_index_in_parent( AtkObject *pObject )
-+{
-+ TRY_START
-+ return getContext( pObject )->getAccessibleIndexInParent();
-+ TRY_END_RETURN( 0 )
-+}
-+
-+static AtkRelationSet *
-+wrapper_ref_relation_set( AtkObject *pObject )
-+{
-+ AtkRelationSet *pSet = atk_relation_set_new();
-+ try {
-+ uno::Reference< accessibility::XAccessibleRelationSet > xRelationSet;
-+
-+ xRelationSet = getContext( pObject )->getAccessibleRelationSet();
-+
-+ sal_Int32 nRelations = xRelationSet->getRelationCount();
-+ for( sal_Int32 n = 0; n < nRelations; n++ )
-+ {
-+ accessibility::AccessibleRelation aRelation = xRelationSet->getRelation( n );
-+ sal_uInt32 nTargetCount = aRelation.TargetSet.getLength();
-+ AtkObject *pTargets[ nTargetCount ];
-+
-+ for( sal_uInt32 n = 0; n < nTargetCount; n++ )
-+ {
-+ uno::Reference< accessibility::XAccessible > xAccessible(
-+ aRelation.TargetSet[n], uno::UNO_QUERY );
-+ pTargets[n] = atk_wrapper_get( xAccessible );
-+ }
-+
-+ AtkRelation *pRel = atk_relation_new
-+ ( pTargets, nTargetCount,
-+ mapRelationType( aRelation.RelationType ) );
-+ atk_relation_set_add( pSet, pRel );
-+ g_object_unref( G_OBJECT( pRel ) );
-+ }
-+ }
-+ catch(const uno::Exception &e)
-+ {
-+ g_object_unref( G_OBJECT( pSet ) );
-+ pSet = NULL;
-+ }
-+
-+ return pSet;
-+}
-+
-+static AtkStateSet *
-+wrapper_ref_state_set( AtkObject *pObject )
-+{
-+ TRY_START
-+ uno::Reference< accessibility::XAccessibleStateSet > xStateSet;
-+
-+ xStateSet = getContext( pObject )->getAccessibleStateSet();
-+ AtkStateSet *pSet = atk_state_set_new();
-+
-+ uno::Sequence< sal_Int16 > aStates = xStateSet->getStates();
-+ for( sal_uInt32 n = 0; n < aStates.getLength(); n++ )
-+ atk_state_set_add_state( pSet, mapAtkState( n ) );
-+
-+ return pSet;
-+ TRY_END_RETURN( NULL )
-+}
-+
-+static void
-+atk_object_wrapper_finalize (GObject *obj)
-+{
-+ AtkObjectWrapper *pWrap = ATK_OBJECT_WRAPPER (obj);
-+
-+ if( pWrap->pListener )
-+ {
-+ /* FIXME: shoudl really de-register the listener too:
-+ uno::Reference<accessibility::XAccessibleEventBroadcaster> xBroadcaster
-+ ( xContext, uno::UNO_QUERY );
-+ if( xBroadcaster.is() )
-+ {
-+ pWrap->pListener = new AtkListener( pAObj );
-+ xBroadcaster->removeEventListener( pWrap->pListener );
-+ } */
-+
-+ pWrap->pListener->deRegister();
-+ pWrap->pListener->release();
-+ pWrap->pListener = NULL;
-+ }
-+
-+ if( pWrap->mpAccessible )
-+ {
-+ g_assert( g_hash_table_lookup( uno_to_gobject, pWrap->mpAccessible ) );
-+ g_hash_table_remove( uno_to_gobject, pWrap->mpAccessible );
-+ pWrap->mpAccessible->release();
-+ pWrap->mpAccessible = NULL;
-+ }
-+ if( pWrap->mpContext )
-+ {
-+ pWrap->mpContext->release();
-+ pWrap->mpContext = NULL;
-+ }
-+
-+ parent_class->finalize( obj );
-+}
-+
-+static void
-+atk_object_wrapper_class_init (AtkObjectWrapperClass *klass)
-+{
-+ GObjectClass *gobject_class = G_OBJECT_CLASS( klass );
-+ AtkObjectClass *atk_class = ATK_OBJECT_CLASS( klass );
-+
-+ parent_class = (GObjectClass *) g_type_class_peek_parent (klass);
-+
-+ // GObject methods
-+ gobject_class->finalize = atk_object_wrapper_finalize;
-+
-+ // AtkObject methods
-+ atk_class->get_name = wrapper_get_name;
-+ atk_class->get_description = wrapper_get_description;
-+ atk_class->get_n_children = wrapper_get_n_children;
-+ atk_class->ref_child = wrapper_ref_child;
-+ atk_class->get_index_in_parent = wrapper_get_index_in_parent;
-+ atk_class->ref_relation_set = wrapper_ref_relation_set;
-+ atk_class->ref_state_set = wrapper_ref_state_set;
-+}
-+
-+static void
-+atk_object_wrapper_init (AtkObjectWrapper *pWrap,
-+ AtkObjectWrapperClass *pClass)
-+{
-+}
-+
-+GType
-+atk_object_wrapper_get_type (void)
-+{
-+ static GType type = 0;
-+
-+ if (!type)
-+ {
-+ static const GTypeInfo typeInfo =
-+ {
-+ sizeof (AtkObjectWrapperClass),
-+ (GBaseInitFunc) NULL,
-+ (GBaseFinalizeFunc) NULL,
-+ (GClassInitFunc) atk_object_wrapper_class_init,
-+ (GClassFinalizeFunc) NULL,
-+ NULL,
-+ sizeof (AtkObjectWrapper),
-+ 0,
-+ (GInstanceInitFunc) atk_object_wrapper_init,
-+ } ;
-+ type = g_type_register_static (ATK_TYPE_OBJECT,
-+ "OOoAtkObj",
-+ &typeInfo, (GTypeFlags)0) ;
-+ }
-+ return type;
-+}
-+
-+static bool
-+isOfType( uno::XInterface *pInterface, const uno::Type & rType )
-+{
-+ g_return_val_if_fail( pInterface != NULL, false );
-+
-+ bool bIs = false;
-+ try {
-+ uno::Any aRet = pInterface->queryInterface( rType );
-+
-+ bIs = ( ( typelib_TypeClass_INTERFACE == aRet.pType->eTypeClass ) &&
-+ ( aRet.pReserved != NULL ) );
-+ } catch( const uno::Exception &e) { }
-+
-+ return bIs;
-+}
-+
-+// I suck: bite me.
-+#include "atkcomponent.cxx"
-+#include "atkaction.cxx"
-+#include "atktext.cxx"
-+#include "atkvalue.cxx"
-+
-+const struct {
-+ const char *name;
-+ GInterfaceInitFunc aInit;
-+ GType (*aGetGIfaceType) (void);
-+ const uno::Type & (*aGetUnoType) (void *);
-+} aTypeTable[] = {
-+// re-location heaven:
-+ {
-+ "Comp", (GInterfaceInitFunc) componentIfaceInit,
-+ atk_component_get_type,
-+ accessibility::XAccessibleComponent::static_type
-+ },
-+ {
-+ "Act", (GInterfaceInitFunc) actionIfaceInit,
-+ atk_action_get_type,
-+ accessibility::XAccessibleAction::static_type
-+ },
-+ {
-+ "Txt", (GInterfaceInitFunc) textIfaceInit,
-+ atk_text_get_type,
-+ accessibility::XAccessibleText::static_type
-+ },
-+ {
-+ "Val", (GInterfaceInitFunc) valueIfaceInit,
-+ atk_value_get_type,
-+ accessibility::XAccessibleValue::static_type
-+ }
-+};
-+const int aTypeTableSize = G_N_ELEMENTS( aTypeTable );
-+
-+static GType
-+ensureTypeFor( uno::XInterface *pAccessible )
-+{
-+ int i;
-+ int bTypes[ aTypeTableSize ] = { 0, };
-+ rtl::OString aTypeName( "OOoAtkObj" );
-+
-+ for( i = 0; i < aTypeTableSize; i++ )
-+ {
-+ if( isOfType( pAccessible, aTypeTable[i].aGetUnoType(0) ) )
-+ {
-+ aTypeName += aTypeTable[i].name;
-+ bTypes[i] = TRUE;
-+ }
-+// g_message( "Accessible %p has type '%s' (%d)",
-+// pAccessible, aTypeTable[i].name, bTypes[i] );
-+ }
-+
-+ GType nType = g_type_from_name( aTypeName );
-+ if( nType == G_TYPE_INVALID )
-+ {
-+ GTypeInfo aTypeInfo = {
-+ sizeof( AtkObjectWrapperClass ),
-+ NULL, NULL, NULL, NULL, NULL,
-+ sizeof( AtkObjectWrapper ),
-+ 0, NULL
-+ } ;
-+ nType = g_type_register_static( ATK_TYPE_OBJECT_WRAPPER,
-+ aTypeName, &aTypeInfo, (GTypeFlags)0 ) ;
-+
-+ for( int i = 0; i < aTypeTableSize; i++ )
-+ if( bTypes[i] )
-+ {
-+ GInterfaceInfo aIfaceInfo = { NULL, NULL, NULL };
-+ aIfaceInfo.interface_init = aTypeTable[i].aInit;
-+ g_type_add_interface_static (nType, aTypeTable[i].aGetGIfaceType(),
-+ &aIfaceInfo);
-+ }
-+ }
-+ return nType;
-+}
-+
-+static void initialize( AtkObjectWrapper *pWrap )
-+{
-+ AtkObject *pAObj = ATK_OBJECT( pWrap );
-+
-+ try {
-+ uno::Reference< accessibility::XAccessibleContext > xContext = pWrap->mpContext;
-+
-+ rtl::OString aValue;
-+ atk_object_set_role( pAObj, mapToAtkRole( xContext->getAccessibleRole() ) );
-+
-+ uno::Reference< accessibility::XAccessible > xParent;
-+ xParent = xContext->getAccessibleParent();
-+ if( xParent.is() )
-+ atk_object_set_parent( pAObj, atk_wrapper_get( xParent ) );
-+ else
-+ atk_object_set_parent( pAObj, atk_get_root() );
-+
-+ // Hook up basic events
-+ uno::Reference<accessibility::XAccessibleEventBroadcaster> xBroadcaster
-+ ( xContext, uno::UNO_QUERY );
-+ if( xBroadcaster.is() )
-+ {
-+ pWrap->pListener = new AtkListener( pAObj );
-+ xBroadcaster->addEventListener( pWrap->pListener );
-+ }
-+ } catch (const uno::Exception &e)
-+ {
-+ g_warning( "exception initializing accessible" );
-+ }
-+}
-+
-+AtkObject *
-+atk_wrapper_get( const uno::Reference< accessibility::XAccessible > &rAccessible )
-+{
-+ gpointer cached;
-+ accessibility::XAccessible *pAccessible = rAccessible.get();
-+
-+ g_return_val_if_fail( pAccessible != NULL, NULL );
-+
-+ // We assume direct pointer comparison is sufficient...
-+ if( !uno_to_gobject )
-+ uno_to_gobject = g_hash_table_new (NULL, NULL);
-+
-+ if( (cached = g_hash_table_lookup (uno_to_gobject, (gpointer) pAccessible) ) )
-+ return ATK_OBJECT (g_object_ref (cached));
-+
-+ uno::Reference< accessibility::XAccessibleContext > xContext;
-+ try {
-+ xContext = pAccessible->getAccessibleContext();
-+ } catch(const uno::Exception &e) {}
-+
-+ accessibility::XAccessibleContext *pContext = xContext.get();
-+ g_return_val_if_fail( xContext != NULL, NULL );
-+
-+ GType nType = ensureTypeFor( pContext );
-+ cached = g_object_new( nType, NULL);
-+ g_hash_table_insert( uno_to_gobject, (gpointer) pAccessible, cached );
-+ AtkObjectWrapper *pWrap = ATK_OBJECT_WRAPPER( cached );
-+
-+ pAccessible->acquire();
-+ pWrap->mpAccessible = pAccessible;
-+ pContext->acquire();
-+ pWrap->mpContext = pContext;
-+
-+ initialize( pWrap );
-+
-+ return ATK_OBJECT( pWrap );
-+}
-+
-+}; // extern C
diff --git a/patches/a11y/vcl-unx-gtk-a11y-atkwrapper-hxx.diff b/patches/a11y/vcl-unx-gtk-a11y-atkwrapper-hxx.diff
deleted file mode 100644
index 854ced7b2..000000000
--- a/patches/a11y/vcl-unx-gtk-a11y-atkwrapper-hxx.diff
+++ /dev/null
@@ -1,40 +0,0 @@
---- /dev/null
-+++ vcl/unx/gtk/a11y/atkwrapper.hxx
-@@ -0,0 +1,37 @@
-+#ifndef __ATK_WRAPPER_H__
-+#define __ATK_WRAPPER_H__
-+
-+#include <atk/atk.h>
-+#include <com/sun/star/accessibility/XAccessible.hpp>
-+
-+class AtkListener;
-+
-+using namespace ::com::sun::star;
-+
-+extern "C" {
-+
-+typedef struct _AtkObjectWrapper AtkObjectWrapper;
-+typedef struct _AtkObjectWrapperClass AtkObjectWrapperClass;
-+
-+struct _AtkObjectWrapper
-+{
-+ AtkObject aParent;
-+
-+ AtkListener *pListener;
-+ ::com::sun::star::accessibility::XAccessible *mpAccessible;
-+ ::com::sun::star::accessibility::XAccessibleContext *mpContext;
-+};
-+
-+struct _AtkObjectWrapperClass
-+{
-+ AtkObjectClass aParentClass;
-+};
-+
-+GType atk_object_wrapper_get_type (void) G_GNUC_CONST;
-+AtkObject *atk_wrapper_get(
-+ const uno::Reference< accessibility::XAccessible > &rAccessible );
-+AtkStateType mapAtkState( sal_Int16 nState );
-+
-+}; // extern "C"
-+
-+#endif /* __ATK_WRAPPER_H__ */
diff --git a/patches/a11y/vcl-unx-gtk-a11y-makefile-mk.diff b/patches/a11y/vcl-unx-gtk-a11y-makefile-mk.diff
deleted file mode 100644
index b64e13ae4..000000000
--- a/patches/a11y/vcl-unx-gtk-a11y-makefile-mk.diff
+++ /dev/null
@@ -1,111 +0,0 @@
---- /dev/null
-+++ vcl/unx/gtk/a11y/makefile.mk
-@@ -0,0 +1,108 @@
-+#*************************************************************************
-+#
-+# $RCSfile$
-+#
-+# $Revision$
-+#
-+# last change: $Author$ $Date$
-+#
-+# The Contents of this file are made available subject to the terms of
-+# either of the following licenses
-+#
-+# - GNU Lesser General Public License Version 2.1
-+# - Sun Industry Standards Source License Version 1.1
-+#
-+# Sun Microsystems Inc., October, 2000
-+#
-+# GNU Lesser General Public License Version 2.1
-+# =============================================
-+# Copyright 2000 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
-+#
-+#
-+# Sun Industry Standards Source License Version 1.1
-+# =================================================
-+# The contents of this file are subject to the Sun Industry Standards
-+# Source License Version 1.1 (the "License"); You may not use this file
-+# except in compliance with the License. You may obtain a copy of the
-+# License at http://www.openoffice.org/license.html.
-+#
-+# Software provided under this License is provided on an "AS IS" basis,
-+# WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
-+# WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
-+# MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
-+# See the License for the specific provisions governing your rights and
-+# obligations concerning the Software.
-+#
-+# The Initial Developer of the Original Code is: Sun Microsystems, Inc.
-+#
-+# Copyright: 2000 by Sun Microsystems, Inc.
-+#
-+# All Rights Reserved.
-+#
-+# Contributor(s): _______________________________________
-+#
-+#
-+#
-+#*************************************************************************
-+
-+PRJ=..$/..$/..
-+
-+PRJNAME=vcl
-+TARGET=gtka11y
-+ENABLE_EXCEPTIONS=TRUE
-+
-+.INCLUDE : $(PRJ)$/util$/makefile.pmk
-+
-+# workaround for makedepend hang
-+MKDEPENDSOLVER=
-+
-+# --- Settings -----------------------------------------------------
-+
-+.INCLUDE : settings.mk
-+.INCLUDE : $(PRJ)$/util$/makefile2.pmk
-+
-+# --- Files --------------------------------------------------------
-+
-+.IF "$(GUIBASE)"!="unx"
-+
-+dummy:
-+ @echo "Nothing to build for GUIBASE $(GUIBASE)"
-+
-+.ELSE # "$(GUIBASE)"!="unx"
-+
-+.IF "$(ENABLE_GTK)" != ""
-+
-+PKGCONFIG_MODULES=gtk+-2.0
-+.INCLUDE : pkg_config.mk
-+
-+SLOFILES=\
-+ $(SLO)$/atkfactory.obj \
-+ $(SLO)$/atkwrapper.obj \
-+ $(SLO)$/atklistener.obj
-+.ELSE # "$(ENABLE_GTK)" != ""
-+
-+dummy:
-+ @echo GTK disabled - nothing to build
-+.ENDIF
-+.ENDIF # "$(GUIBASE)"!="unx"
-+
-+# --- Targets ------------------------------------------------------
-+
-+.INCLUDE : target.mk
-+
-+.INCLUDE : $(PRJ)$/util$/target.pmk
diff --git a/patches/a11y/vcl-unx-gtk-a11y-todo.diff b/patches/a11y/vcl-unx-gtk-a11y-todo.diff
deleted file mode 100644
index 0c9429cd0..000000000
--- a/patches/a11y/vcl-unx-gtk-a11y-todo.diff
+++ /dev/null
@@ -1,178 +0,0 @@
---- /dev/null
-+++ vcl/unx/gtk/a11y/TODO
-@@ -0,0 +1,175 @@
-+Crasher:
-+ + Test a11y problem ...
-+
-+ + seems to be on a LIST_ITEM:
-+ + inside the zoom combo box ...
-+ + chase through comphelper (rebuilt with debugging symbols)
-+ + something very odd going on there.
-+
-+The crash is caused by instantiation of:
-+comphelper/source/misc/accessiblewrapper.cxx (OAccessibleWrapper) with a NULL _rxInnerAccessible ...
-+
-+#0 OAccessibleWrapper (this=0x5636b848, _rxORB=@0x56361528, _rxInnerAccessible=@0xbfffe4f0, _rxParentAccessible=@0xbfffe490)
-+ at /opt/OpenOffice/src680-m90/comphelper/source/misc/accessiblewrapper.cxx:349
-+ OAccessibleWrapper::OAccessibleWrapper( const Reference< XMultiServiceFactory >& _rxORB,
-+ const Reference< XAccessible >& _rxInnerAccessible, const Reference< XAccessible >& _rxParentAccessible )
-+
-+#1 0x40d1ccfc in comphelper::OWrappedAccessibleChildrenManager::getAccessibleWrapperFor (this=0x56361510, _rxKey=@0xbfffe4f0,
-+ _bCreate=1 '\001') at /opt/OpenOffice/src680-m90/comphelper/source/misc/accessiblewrapper.cxx:189
-+ // -> new wrapper
-+ xValue = new OAccessibleWrapper( m_xORB, _rxKey, (Reference< XAccessible >)m_aOwningAccessible );
-+
-+#2 0x40d1eebe in comphelper::OAccessibleContextWrapperHelper::getAccessibleChild (this=0x563611bc, i=0)
-+ at /opt/OpenOffice/src680-m90/comphelper/source/misc/accessiblewrapper.cxx:487
-+#3 0x40d1fcf1 in comphelper::OAccessibleContextWrapper::getAccessibleChild (this=0x56361188, i=0)
-+ at /opt/OpenOffice/src680-m90/comphelper/source/misc/accessiblewrapper.cxx:595
-+#4 0x41f2bf84 in wrapper_ref_child (pObject=0x816c738, i=0) at /opt/OpenOffice/src680-m90/vcl/unx/gtk/a11y/atkwrapper.cxx:271
-+#5 0x422f4d91 in atk_object_ref_accessible_child () from /opt/gnome/lib/libatk-1.0.so.0
-+
-+ Possibly no-one ever called:
-+ + setOwningAccessible (?)
-+ + or our weak reference expired here somehow ...
-+
-+ * What is this wrapper good for !?
-+ + apparently sub-classing :-)
-+ + unfortunately ...
-+
-+(gdb) bt
-+#0 OAccessibleWrapper (this=0x56365e70, _rxORB=@0x5635bb50, _rxInnerAccessible=@0xbfffe4e0, _rxParentAccessible=@0xbfffe480)
-+ at /opt/OpenOffice/src680-m90/comphelper/source/misc/accessiblewrapper.cxx:353
-+#1 0x40d1cd54 in comphelper::OWrappedAccessibleChildrenManager::getAccessibleWrapperFor (this=0x5635bb38, _rxKey=@0xbfffe4e0,
-+ _bCreate=1 '\001') at /opt/OpenOffice/src680-m90/comphelper/source/misc/accessiblewrapper.cxx:193
-+#2 0x40d1ef16 in comphelper::OAccessibleContextWrapperHelper::getAccessibleChild (this=0x5635b7e4, i=0)
-+ at /opt/OpenOffice/src680-m90/comphelper/source/misc/accessiblewrapper.cxx:491
-+#3 0x40d1fd49 in comphelper::OAccessibleContextWrapper::getAccessibleChild (this=0x5635b7b0, i=0)
-+ at /opt/OpenOffice/src680-m90/comphelper/source/misc/accessiblewrapper.cxx:599
-+#4 0x41f2bf84 in wrapper_ref_child (pObject=0x81617c0, i=0) at /opt/OpenOffice/src680-m90/vcl/unx/gtk/a11y/atkwrapper.cxx:271
-+#5 0x422f4d91 in atk_object_ref_accessible_child () from /opt/gnome/lib/libatk-1.0.so.0
-+#6 0x428778ff in impl_accessibility_accessible_get_child_at_index () from /opt/gnome/lib/libspi.so.0
-+#7 0x42874321 in _ORBIT_skel_small_Accessibility_Accessible_getChildAtIndex () from /opt/gnome/lib/libspi.so.0
-+#8 0x429297e7 in ORBit_POAObject_invoke () from /opt/gnome/lib/libORBit-2.so.0
-+#9 0x4292ffb5 in ORBit_OAObject_invoke () from /opt/gnome/lib/libORBit-2.so.0
-+#10 0x4291c0fe in ORBit_small_invoke_adaptor () from /opt/gnome/lib/libORBit-2.so.0
-+#11 0x4292daf4 in ORBit_POAObject_handle_request () from /opt/gnome/lib/libORBit-2.so.0
-+#12 0x4292e1c4 in ORBit_POAObject_invoke_incoming_request () from /opt/gnome/lib/libORBit-2.so.0
-+#13 0x4292e38c in ORBit_POA_handle_request () from /opt/gnome/lib/libORBit-2.so.0
-+#14 0x42930156 in ORBit_handle_request () from /opt/gnome/lib/libORBit-2.so.0
-+#15 0x42918869 in giop_connection_handle_input () from /opt/gnome/lib/libORBit-2.so.0
-+#16 0x42936d3b in link_connection_io_handler () from /opt/gnome/lib/libORBit-2.so.0
-+#17 0x42939520 in link_source_dispatch () from /opt/gnome/lib/libORBit-2.so.0
-+#18 0x423c3e87 in g_main_context_dispatch () from /opt/gnome/lib/libglib-2.0.so.0
-+#19 0x423c65c7 in g_main_context_iterate () from /opt/gnome/lib/libglib-2.0.so.0
-+#20 0x423c66c3 in g_main_context_iteration () from /opt/gnome/lib/libglib-2.0.so.0
-+#21 0x41f3372e in GtkXLib::Yield () at /opt/OpenOffice/src680-m90/vcl/unx/gtk/window/gtkframe.cxx:93
-+#22 0x424964ef in X11SalInstance::Yield () from ./libvclplug_gen680li.so
-+#23 0x40174c54 in Application::Yield () from ./libvcl680li.so
-+#24 0x40174b6b in Application::Execute () from ./libvcl680li.so
-+#25 0x0806f1b5 in desktop::Desktop::Main ()
-+#26 0x4017a713 in SVMain () from ./libvcl680li.so
-+#27 0x0806898d in sal_main ()
-+#28 0x0806893c in main ()
-+(gdb) up
-+#1 0x40d1cd54 in comphelper::OWrappedAccessibleChildrenManager::getAccessibleWrapperFor (this=0x5635bb38, _rxKey=@0xbfffe4e0,
-+ _bCreate=1 '\001') at /opt/OpenOffice/src680-m90/comphelper/source/misc/accessiblewrapper.cxx:193
-+193 xValue = new OAccessibleWrapper( m_xORB, _rxKey, (Reference< XAccessible >)m_aOwningAccessible );
-+(gdb) p m_aOwningAccessible
-+$1 = {<com::sun::star::uno::WeakReferenceHelper> = {m_pImpl = 0x5635bbb8}, <No data fields>}
-+(gdb) down
-+#0 OAccessibleWrapper (this=0x56365e70, _rxORB=@0x5635bb50, _rxInnerAccessible=@0xbfffe4e0, _rxParentAccessible=@0xbfffe480)
-+ at /opt/OpenOffice/src680-m90/comphelper/source/misc/accessiblewrapper.cxx:353
-+353 *(int *)0 = 0;
-+(gdb) l
-+348 ,OComponentProxyAggregation( _rxORB, Reference< XComponent >( _rxInnerAccessible, UNO_QUERY ) )
-+349 ,m_xInnerAccessible( _rxInnerAccessible )
-+350 ,m_xParentAccessible( _rxParentAccessible )
-+351 {
-+352 if( !_rxInnerAccessible.is() )
-+353 *(int *)0 = 0;
-+354 }
-+355
-+356 //--------------------------------------------------------------------
-+357 OAccessibleWrapper::~OAccessibleWrapper( )
-+(gdb) p _rxInnerAccessible
-+$2 = (
-+ const com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessible> &) @0xbfffe4e0: {<com::sun::star::uno::BaseReference> = {_pInterface = 0x0}, <No data fields>}
-+(gdb) up
-+#1 0x40d1cd54 in comphelper::OWrappedAccessibleChildrenManager::getAccessibleWrapperFor (this=0x5635bb38, _rxKey=@0xbfffe4e0,
-+ _bCreate=1 '\001') at /opt/OpenOffice/src680-m90/comphelper/source/misc/accessiblewrapper.cxx:193
-+193 xValue = new OAccessibleWrapper( m_xORB, _rxKey, (Reference< XAccessible >)m_aOwningAccessible );
-+(gdb) p m_aOwningAccessible.m_pImpl
-+$3 = (struct OWeakRefListener *) 0x5635bbb8
-+(gdb) p *m_aOwningAccessible.m_pImpl
-+$4 = <incomplete type>
-+(gdb) up
-+#2 0x40d1ef16 in comphelper::OAccessibleContextWrapperHelper::getAccessibleChild (this=0x5635b7e4, i=0)
-+ at /opt/OpenOffice/src680-m90/comphelper/source/misc/accessiblewrapper.cxx:491
-+491 return m_pChildMapper->getAccessibleWrapperFor( xInnerChild );
-+(gdb) p m_xInnerContxt
-+No symbol "m_xInnerContxt" in current context.
-+(gdb) p m_xInnerContext
-+$5 = {<com::sun::star::uno::BaseReference> = {_pInterface = 0x563584cc}, <No data fields>}
-+(gdb) p xInnerChild
-+$6 = {<com::sun::star::uno::BaseReference> = {_pInterface = 0x0}, <No data fields>}
-+(gdb)
-+
-+
-+
-+Serious problems
-+ + Threading/locking:
-+ + incoming CORBA calls & the GDK lock
-+ + how are these being processed & on what thread ?
-+ + are we holding the GDK_THREADS lock ?
-+ + can we even do that ?
-+ + is it really necessary to be thread safe ?
-+ + how does this work in combination with the (unsafe) GAIL code ?
-+ + what should incoming CORBA calls be doing ?
-+ + esp. since we can't tell if they're coming from
-+ in-proc or not either [ though this is unlikely ]
-+
-+Missing features
-+ + notifications when the tree state changes
-+ + works for toplevels - managed by gail ...
-+ + hack in 'atklistener.cxx'
-+ + ... here ...
-+
-+Known bugs:
-+ + finish AtkText (!)
-+ + crashes on 'expand all' with writer open
-+ + tooltips create new toplevels with broken roles.
-+
-+Crasher from here:
-+
-+(gdb) t 1
-+[Switching to thread 1 (process 24740)]#0 0x44fd892c in os::report_fatal_error ()
-+ from /usr/lib/SunJava2-1.4.2/jre/lib/i386/client/libjvm.so
-+(gdb) bt
-+#3 0x44fdbde8 in signalHandler () from /usr/lib/SunJava2-1.4.2/jre/lib/i386/client/libjvm.so
-+#4 <signal handler called>
-+#5 0x40cc2725 in comphelper::AccessibleEventNotifier::addEvent () from ./libcomphelp4gcc3.so
-+#6 0x54715529 in SwAccessibleContext::FireAccessibleEvent () from ./libsw680li.so
-+#7 0x547156ec in SwAccessibleContext::FireStateChangedEvent () from ./libsw680li.so
-+#8 0x547345dd in SwAccessibleParagraph::_InvalidateFocus () from ./libsw680li.so
-+#9 0x54719cb7 in SwAccessibleContext::InvalidateFocus () from ./libsw680li.so
-+#10 0x5472cc39 in SwAccessibleMap::InvalidateFocus () from ./libsw680li.so
-+#11 0x547aa128 in ViewShell::InvalidateAccessibleFocus () from ./libsw680li.so
-+#12 0x54d803ae in SwEditWin::GetFocus () from ./libsw680li.so
-+#13 0x4033c28a in Window::ImplGrabFocus () from ./libvcl680li.so
-+#14 0x403446c1 in Window::GrabFocus () from ./libvcl680li.so
-+#15 0x403523bc in Window::ImplAsyncFocusHdl () from ./libvcl680li.so
-+#16 0x403522d4 in Window::LinkStubImplAsyncFocusHdl () from ./libvcl680li.so
-+#17 0x40352978 in ImplHandleUserEvent () from ./libvcl680li.so
-+#18 0x40353499 in ImplWindowFrameProc () from ./libvcl680li.so
-+#19 0x42419ff9 in SalDisplay::DispatchInternalEvent () from ./libvclplug_gen680li.so
-+#20 0x41ebc95e in GtkXLib::userEventFn () at /opt/OpenOffice/src680-m90/vcl/unx/gtk/window/gtkframe.cxx:93
-+#21 0x4234a221 in g_idle_dispatch () from /opt/gnome/lib/libglib-2.0.so.0
-+#22 0x4234be87 in g_main_context_dispatch () from /opt/gnome/lib/libglib-2.0.so.0
-+#23 0x4234e5c7 in g_main_context_iterate () from /opt/gnome/lib/libglib-2.0.so.0
-+#24 0x4234e6c3 in g_main_context_iteration () from /opt/gnome/lib/libglib-2.0.so.0
-+#25 0x41ebcaee in GtkXLib::Yield () at /opt/OpenOffice/src680-m90/vcl/unx/gtk/window/gtkframe.cxx:93
-+#26 0x4241e4ef in X11SalInstance::Yield () from ./libvclplug_gen680li.so
-+#27 0x40174c54 in Application::Yield () from ./libvcl680li.so
-+#28 0x40174b6b in Application::Execute () from ./libvcl680li.so
-+#29 0x0806f1b5 in desktop::Desktop::Main ()
-+#30 0x4017a713 in SVMain () from ./libvcl680li.so
-+#31 0x0806898d in sal_main ()
-+#32 0x0806893c in main ()
diff --git a/patches/a11y/vcl-unx-inc-plugins-gtk-atkfactory-hxx.diff b/patches/a11y/vcl-unx-inc-plugins-gtk-atkfactory-hxx.diff
deleted file mode 100644
index b32a4e9b4..000000000
--- a/patches/a11y/vcl-unx-inc-plugins-gtk-atkfactory-hxx.diff
+++ /dev/null
@@ -1,11 +0,0 @@
---- /dev/null
-+++ vcl/unx/inc/plugins/gtk/atkfactory.hxx
-@@ -0,0 +1,8 @@
-+#ifndef __ATK_FACTORY_H__
-+#define __ATK_FACTORY_H__
-+
-+#include <atk/atk.h>
-+
-+void RegisterAtkFactory( GType nWindowType );
-+
-+#endif
diff --git a/patches/evo2/.cvsignore b/patches/evo2/.cvsignore
deleted file mode 100644
index 282522db0..000000000
--- a/patches/evo2/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-Makefile
-Makefile.in
diff --git a/patches/evo2/Makefile.am b/patches/evo2/Makefile.am
deleted file mode 100644
index 0b280d2c7..000000000
--- a/patches/evo2/Makefile.am
+++ /dev/null
@@ -1 +0,0 @@
-EXTRA_DIST = $(wildcard *.diff)
diff --git a/patches/evo2/dbaccess-evo-changes.diff b/patches/evo2/dbaccess-evo-changes.diff
deleted file mode 100644
index ede1bbc23..000000000
--- a/patches/evo2/dbaccess-evo-changes.diff
+++ /dev/null
@@ -1,198 +0,0 @@
---- dbaccess/source/ui/dlg/dbwizsetup.cxx.bakj 2005-04-06 18:15:46.000000000 +0530
-+++ dbaccess/source/ui/dlg/dbwizsetup.cxx 2005-04-06 18:21:11.000000000 +0530
-@@ -268,11 +268,12 @@
- #define OUTLOOK_PATH 14
- #define MOZILLA_PATH 15
- #define EVOLUTION_PATH 16
--#define KAB_PATH 17
--#define THUNDERBIRD_PATH 18
--#define CREATENEW_PATH 19
--#define USERDEFINED_PATH 20
--#define OPEN_DOC_PATH 21
-+#define EVOLUTION_PATH_LOCAL 17
-+#define KAB_PATH 18
-+#define THUNDERBIRD_PATH 19
-+#define CREATENEW_PATH 20
-+#define USERDEFINED_PATH 21
-+#define OPEN_DOC_PATH 22
-
- OFinalDBPageSetup* pFinalPage;
-
-@@ -411,6 +412,14 @@
- else
- declarePath( THUNDERBIRD_PATH, PAGE_DBSETUPWIZARD_INTRO, PAGE_DBSETUPWIZARD_FINAL, WZS_INVALID_STATE);
-
-+if ( m_pCollection->hasAuthentication(DST_EVOLUTION_LOCAL))
-+ declarePath( EVOLUTION_PATH, PAGE_DBSETUPWIZARD_INTRO, PAGE_DBSETUPWIZARD_AUTHENTIFICATION, PAGE_DBSETUPWIZARD_FINAL, WZS_INVALID_STATE);
-+ else
-+ declarePath( EVOLUTION_PATH_LOCAL, PAGE_DBSETUPWIZARD_INTRO, PAGE_DBSETUPWIZARD_FINAL, WZS_INVALID_STATE);
-+ if ( m_pCollection->hasAuthentication(DST_EVOLUTION_LDAP))
-+ declarePath( EVOLUTION_PATH, PAGE_DBSETUPWIZARD_INTRO, PAGE_DBSETUPWIZARD_AUTHENTIFICATION, PAGE_DBSETUPWIZARD_FINAL, WZS_INVALID_STATE);
-+ else
-+ declarePath( EVOLUTION_PATH, PAGE_DBSETUPWIZARD_INTRO, PAGE_DBSETUPWIZARD_FINAL, WZS_INVALID_STATE);
- if ( m_pCollection->hasAuthentication(DST_EVOLUTION))
- declarePath( EVOLUTION_PATH, PAGE_DBSETUPWIZARD_INTRO, PAGE_DBSETUPWIZARD_AUTHENTIFICATION, PAGE_DBSETUPWIZARD_FINAL, WZS_INVALID_STATE);
- else
-@@ -566,6 +566,8 @@ void ODbTypeWizDialogSetup::activateData
- { DST_MOZILLA, MOZILLA_PATH },
- { DST_THUNDERBIRD, THUNDERBIRD_PATH },
- { DST_EVOLUTION, EVOLUTION_PATH },
-+ { DST_EVOLUTION_LOCAL, EVOLUTION_PATH_LOCAL },
-+ { DST_EVOLUTION_LDAP, EVOLUTION_PATH },
- { DST_KAB, KAB_PATH },
- { DST_USERDEFINE1, USERDEFINED_PATH },
- { DST_USERDEFINE2, USERDEFINED_PATH },
-@@ -639,6 +639,8 @@
- {
- case DST_KAB:
- case DST_EVOLUTION:
-+ case DST_EVOLUTION_LOCAL:
-+ case DST_EVOLUTION_LDAP:
- case DST_OUTLOOK:
- case DST_OUTLOOKEXP:
- case DST_MOZILLA:
---- dbaccess/source/ui/inc/dsntypes.hxx.bakj 2005-04-06 18:05:46.000000000 +0530
-+++ dbaccess/source/ui/inc/dsntypes.hxx 2005-04-06 18:07:10.000000000 +0530
-@@ -101,9 +101,11 @@
- DST_OUTLOOK = 14,
- DST_OUTLOOKEXP = 15,
- DST_EVOLUTION = 16,
-- DST_KAB = 17,
-- DST_EMBEDDED = 18,
-- DST_THUNDERBIRD = 19,
-+ DST_EVOLUTION_LOCAL = 17,
-+ DST_EVOLUTION_LDAP = 18,
-+ DST_KAB = 19,
-+ DST_EMBEDDED = 20,
-+ DST_THUNDERBIRD = 21,
-
- DST_USERDEFINE1, /// first user defined driver
- DST_USERDEFINE2,
---- dbaccess/source/ui/misc/dsntypes.cxx.bakj 2005-04-06 17:57:59.000000000 +0530
-+++ dbaccess/source/ui/misc/dsntypes.cxx 2005-04-06 18:05:24.000000000 +0530
-@@ -412,8 +412,10 @@
- case DST_OUTLOOK:
- case DST_OUTLOOKEXP:
- case DST_FLAT:
-- case DST_EVOLUTION:
-- case DST_KAB:
-+ case DST_EVOLUTION:
-+ case DST_EVOLUTION_LOCAL:
-+ case DST_EVOLUTION_LDAP:
-+ case DST_KAB:
- case DST_THUNDERBIRD:
- case DST_CALC:
- bSupportsTableCreation = FALSE;
-@@ -458,8 +458,10 @@
- case DST_OUTLOOK:
- case DST_OUTLOOKEXP:
- case DST_JDBC:
-- case DST_EVOLUTION:
-- case DST_KAB:
-+ case DST_EVOLUTION:
-+ case DST_EVOLUTION_LOCAL:
-+ case DST_EVOLUTION_LDAP:
-+ case DST_KAB:
- bEnableBrowseButton = FALSE;
- break;
- default:
-@@ -493,12 +493,14 @@
- case DST_ADO:
- case DST_LDAP:
- case DST_CALC:
-+ case DST_EVOLUTION_LDAP:
-+ case DST_EVOLUTION:
- return sal_True;
- break;
- case DST_MSACCESS:
- case DST_MOZILLA:
- case DST_THUNDERBIRD:
-- case DST_EVOLUTION:
-+ case DST_EVOLUTION_LOCAL:
- case DST_KAB:
- case DST_OUTLOOK:
- case DST_OUTLOOKEXP: //????
-@@ -577,8 +577,12 @@
- return DST_OUTLOOK;
- if (_rDsn.EqualsIgnoreCaseAscii("outlookexp", nSeparator,_rDsn.Len() - nSeparator))
- return DST_OUTLOOKEXP;
-- if (_rDsn.EqualsIgnoreCaseAscii("evolution", nSeparator,_rDsn.Len() - nSeparator))
-- return DST_EVOLUTION;
-+ if (_rDsn.EqualsIgnoreCaseAscii("evolution:ldap", nSeparator,_rDsn.Len() - nSeparator))
-+ return DST_EVOLUTION_LDAP;
-+ if (_rDsn.EqualsIgnoreCaseAscii("evolution:groupwise", nSeparator,_rDsn.Len() - nSeparator))
-+ return DST_EVOLUTION;
-+ if (_rDsn.EqualsIgnoreCaseAscii("evolution:local", nSeparator,_rDsn.Len() - nSeparator))
-+ return DST_EVOLUTION_LOCAL;
- if (_rDsn.EqualsIgnoreCaseAscii("kab", nSeparator,_rDsn.Len() - nSeparator))
- return DST_KAB;
- }
---- dbaccess/source/ui/misc/dbumiscres.src.bakj 2005-04-06 18:11:26.000000000 +0530
-+++ dbaccess/source/ui/misc/dbumiscres.src 2005-04-06 18:15:20.000000000 +0530
-@@ -133,9 +133,17 @@
- {
- Text ="sdbc:address:outlookexp";
- };
-- String STR_EVOLUTION
-- {
-- Text ="sdbc:address:evolution";
-+ String STR_EVOLUTION_LOCAL
-+ {
-+ Text ="sdbc:address:evolution:local";
-+ };
-+ String STR_EVOLUTION_LDAP
-+ {
-+ Text ="sdbc:address:evolution:ldap";
-+ };
-+ String STR_EVOLUTION_GROUPWISE
-+ {
-+ Text ="sdbc:address:evolution:groupwise";
- };
- String STR_KAB
- {
-@@ -221,11 +229,21 @@
- Text [ de ] = "Microsoft Windows Adressbuch";
- Text[ en-US ] = "Microsoft Windows Address Book";
- };
-- String STR_EVOLUTION
-- {
-- Text [ de ] = "Evolution Adressbuch";
-- Text[ en-US ] = "Evolution Address Book";
-- };
-+ String STR_EVOLUTION_LOCAL
-+ {
-+ Text [ de ] = "Evolution Local Adressbuch";
-+ Text[ en-US ] = "Evolution Local";
-+ };
-+ String STR_EVOLUTION_LDAP
-+ {
-+ Text [ de ] = "Evolution LDAP Adressbuch";
-+ Text[ en-US ] = "Evolution LDAP";
-+ };
-+ String STR_EVOLUTION_GROUPWISE
-+ {
-+ Text [ de ] = "Groupwise Adressbuch";
-+ Text[ en-US ] = "Groupwise";
-+ };
- String STR_KAB
- {
- Text [ de ] = "KDE Adressbuch";
---- dbaccess/source/ui/misc/dbumiscres.hrc.bakj 2005-04-06 18:07:39.000000000 +0530
-+++ dbaccess/source/ui/misc/dbumiscres.hrc 2005-04-06 18:11:00.000000000 +0530
-@@ -80,10 +80,12 @@
- #define STR_LDAP 13
- #define STR_OUTLOOK 14
- #define STR_OUTLOOKEXP 15
--#define STR_EVOLUTION 16
--#define STR_KAB 17
--#define STR_EMBEDDED 18
--#define STR_THUNDERBIRD 19
-+#define STR_EVOLUTION_GROUPWISE 16
-+#define STR_EVOLUTION_LOCAL 17
-+#define STR_EVOLUTION_LDAP 18
-+#define STR_KAB 19
-+#define STR_EMBEDDED 20
-+#define STR_THUNDERBIRD 21
-
- #define STR_END STR_THUNDERBIRD + 1
-
diff --git a/patches/evo2/default-evo-column-mapping.diff b/patches/evo2/default-evo-column-mapping.diff
deleted file mode 100644
index 446ab07db..000000000
--- a/patches/evo2/default-evo-column-mapping.diff
+++ /dev/null
@@ -1,36 +0,0 @@
---- officecfg/registry/data/org/openoffice/Office/Writer.xcu.orig 2005-04-18 20:39:35.000000000 +0530
-+++ officecfg/registry/data/org/openoffice/Office/Writer.xcu 2005-05-10 17:30:14.000000000 +0530
-@@ -74,6 +74,33 @@
- <value xml:lang="en-US" oor:separator=";">To whom it may concern,;Dear Friends,;Dear Sir or Madam,;Hello,</value>
- <value xml:lang="de" oor:separator=";">Sehr geehrte Damen und Herren,;Liebe Freunde,;Liebe Vereinsmitglieder,;Hallo,</value>
- </prop>
-+ <node oor:name="DataSource">
-+ <prop oor:name="DataSourceName" oor:type="xs:string">
-+ <value>EvolutionLocal</value>
-+ </prop>
-+ <prop oor:name="DataTableName" oor:type="xs:string">
-+ <value>Personal</value>
-+ </prop>
-+ </node>
-+ <node oor:name="AddressDataAssignments">
-+ <node oor:name="_0" oor:op="replace">
-+ <prop oor:name="DBColumnAssignments" oor:type="oor:string-list">
-+ <value oor:separator=",">title,full_name,family_name,org,addr_line1,addr_line2,city,state,zip,country,home_phone,business_phone,email_1,</value>
-+ </prop>
-+ <node oor:name="DataSource">
-+ <prop oor:name="DataCommandType" oor:type="xs:short">
-+ <value>0</value>
-+ </prop>
-+ <prop oor:name="DataSourceName" oor:type="xs:string">
-+ <value>EvolutionLocal</value>
-+ </prop>
-+ <prop oor:name="DataTableName" oor:type="xs:string">
-+ <value>Personal</value>
-+ </prop>
-+ </node>
-+ </node>
-+</node>
-+
- <prop oor:name="EMailSupported" install:module="javamail">
- <value>true</value>
- </prop>
diff --git a/patches/evo2/evo-const-crash.diff b/patches/evo2/evo-const-crash.diff
deleted file mode 100644
index e685c56c8..000000000
--- a/patches/evo2/evo-const-crash.diff
+++ /dev/null
@@ -1,124 +0,0 @@
---- connectivity/source/drivers/evoab2/NStatement.cxx.bakj 2005-08-16 18:07:32.000000000 +0530
-+++ connectivity/source/drivers/evoab2/NStatement.cxx 2005-08-16 21:41:40.000000000 +0530
-@@ -221,8 +221,7 @@
- EBookQuery *
- OStatement_Base::createTrue()
- { // Not the world's most efficient unconditional true but ...
--//FIXME: make enum hack to make it gud integer (E_CONTACT_FULL_NAME);
--return e_book_query_field_exists (3);
-+ return e_book_query_from_string("(exists \"full_name\")");
- }
-
- EBookQuery *
---- connectivity/source/drivers/evoab2/NResultSet.cxx.bakj 2005-08-16 21:24:53.000000000 +0530
-+++ connectivity/source/drivers/evoab2/NResultSet.cxx 2005-08-17 18:29:50.000000000 +0530
-@@ -347,23 +347,29 @@
- case HOME_CITY:
- case HOME_STATE:
- case HOME_COUNTRY:
-- case HOME_ZIP:
-- bIsEVO_2_2 ? fieldEnum=89:fieldEnum=88/*E_CONTACT_ADDRESS_HOME*/;break;
-+ case HOME_ZIP:
-+ fieldEnum = e_contact_field_id("address_home");
-+ break;
-+
- case WORK_ADDR_LINE1:
- case WORK_ADDR_LINE2:
- case WORK_CITY:
- case WORK_STATE:
- case WORK_COUNTRY:
- case WORK_ZIP:
-- bIsEVO_2_2 ? fieldEnum = 90:fieldEnum=89/*E_CONTACT_ADDRESS_WORK*/;break;
-+ fieldEnum = e_contact_field_id("address_work");
-+ break;
-+
- case OTHER_ADDR_LINE1:
- case OTHER_ADDR_LINE2:
- case OTHER_CITY:
- case OTHER_STATE:
- case OTHER_COUNTRY:
-- case OTHER_ZIP:
-- bIsEVO_2_2 ? fieldEnum=91:fieldEnum= 90/*E_ CONTACT_ADDRESS_OTHER*/; break;
-- default: fieldEnum=89;
-+ case OTHER_ZIP:
-+ fieldEnum = e_contact_field_id("address_other");
-+ break;
-+
-+ default: fieldEnum = e_contact_field_id("address_home");
- }
- return fieldEnum;
- }
---- connectivity/source/drivers/evoab2/EApi.h.bakj 2005-08-16 21:22:38.000000000 +0530
-+++ connectivity/source/drivers/evoab2/EApi.h 2005-08-17 19:04:14.000000000 +0530
-@@ -84,7 +84,6 @@
- #endif
-
-
--EAPI_EXTERN bool bIsEVO_2_2;
- typedef void EContact;
- #define E_CONTACT(a) ((EContact *)(a))
- #define E_TYPE_CONTACT (e_contact_get_type())
-@@ -158,6 +157,7 @@
- EAPI_EXTERN EBookQuery* (*e_book_query_not) (EBookQuery *q, gboolean unref);
- EAPI_EXTERN void (*e_book_query_unref) (EBookQuery *q);
- EAPI_EXTERN char* (*e_book_query_to_string) (EBookQuery *q);
-+EAPI_EXTERN EBookQuery* (*e_book_query_from_string) (const char *query_string);
-
- typedef struct {
- char *address_format; /* the two letter country code that
---- connectivity/source/drivers/evoab2/EApi.cxx.bakj 2005-08-16 18:14:53.000000000 +0530
-+++ connectivity/source/drivers/evoab2/EApi.cxx 2005-08-19 14:50:11.000000000 +0530
-@@ -68,7 +68,8 @@
- #endif
- static char *eBookLibNames[] = {
- "libebook.so.8", // evolution-2.0
-- "libebook-1.2.so.3" // evolution-2.2
-+ "libebook-1.2.so.3", // evolution-2.2
-+ "libebook-1.2.so.5" // evolution-2.4
- // FIXME: ask JPR about ABI compatibility going forwards
- // "libebook-1.3.so.0",
- // "libebook-1.4.so.0",
-@@ -102,6 +103,7 @@
- SYM_MAP( e_book_query_or ),
- SYM_MAP( e_book_query_not ),
- SYM_MAP( e_book_query_unref ),
-+ SYM_MAP( e_book_query_from_string ),
- SYM_MAP( e_book_query_to_string ),
- SYM_MAP( e_book_query_field_exists ),
- SYM_MAP( e_source_group_peek_base_uri)
-@@ -139,7 +141,6 @@
- if( aModule)
- {
- if ( tryLink( aModule, eBookLibNames[ j ] ) ) {
-- if (j==1) bIsEVO_2_2 = true;
- return true;
- }
- osl_unloadModule( aModule );
---- connectivity/source/drivers/evoab2/NConnection.hxx.bakj 2005-08-16 18:03:51.000000000 +0530
-+++ connectivity/source/drivers/evoab2/NConnection.hxx 2005-08-16 18:04:24.000000000 +0530
-@@ -143,7 +143,7 @@
- inline const OEvoabDriver* getDriver() const { return static_cast< const OEvoabDriver* >( m_pDriver ); }
-
- SDBCAddress::sdbc_address_type getSDBCAddressType() const { return m_eSDBCAddressType;}
-- SDBCAddress::sdbc_address_type setSDBCAddressType(SDBCAddress::sdbc_address_type _eSDBCAddressType) {m_eSDBCAddressType = _eSDBCAddressType;}
-+ void setSDBCAddressType(SDBCAddress::sdbc_address_type _eSDBCAddressType) {m_eSDBCAddressType = _eSDBCAddressType;}
-
- // OComponentHelper
- virtual void SAL_CALL disposing(void);
---- connectivity/source/drivers/evoab2/NDatabaseMetaData.hxx.bakj 2005-08-16 17:59:59.000000000 +0530
-+++ connectivity/source/drivers/evoab2/NDatabaseMetaData.hxx 2005-08-16 19:46:37.000000000 +0530
-@@ -111,10 +111,10 @@
- };
-
- const ColumnProperty *getField(guint n);
-- guint getFieldCount() G_GNUC_CONST;
-- sal_Int32 getFieldType(sal_Int32 nCol) G_GNUC_CONST;
-- rtl::OUString getFieldTypeName(sal_Int32 nCol) G_GNUC_CONST;
-- rtl::OUString getFieldName(sal_Int32 nCol) G_GNUC_CONST;
-+ guint getFieldCount() ;
-+ sal_Int32 getFieldType(sal_Int32 nCol) ;
-+ rtl::OUString getFieldTypeName(sal_Int32 nCol) ;
-+ rtl::OUString getFieldName(sal_Int32 nCol) ;
-
- void free_column_resources();
- class OEvoabDatabaseMetaData : public ODatabaseMetaDataBase