#!/bin/sh

# this script changes the default formats to .doc/.xls/.ppt rather than the
# native OpenOffice.org formats. Yes, that's ugly - but it makes a huge
# difference in the integration of OOo into MS dominate environments.


BASE=/usr/lib/openoffice.org2.0/share/registry/modules/org/openoffice/Setup
PATCHES=/opt/ltsp/templates/k12linux/patches

if [ -f $BASE/Setup-calc.xcu -a -f $PATCHES/oo-calc-xls.patch ]
then
	patch -p0 -s -N < $PATCHES/oo-calc-xls.patch &> /dev/null
fi

if [ -f $BASE/Setup-impress.xcu -a -f $PATCHES/oo-impress-ppt.patch ]
then
	patch -p0 -s -N < $PATCHES/oo-impress-ppt.patch &> /dev/null
fi

if [ -f $BASE/Setup-writer.xcu -a -f $PATCHES/oo-writer-doc.patch ]
then
	patch -p0 -s -N < $PATCHES/oo-writer-doc.patch &> /dev/null
fi

