--- trunk/openoffice/ooffice-wrapper 2010/03/08 18:49:10 1013 +++ trunk/openoffice/ooffice-wrapper 2010/03/10 23:58:23 1014 @@ -1,67 +1,11 @@ #!/bin/sh -# # Wrapper script for openoffice -# -# (C) Peter 'Nidd' Novodvorsky, 2001,2002 -# (C) Martin 'empty' Quinson, 2002. -# Modifications by Chris Halls -# Modifications by Lucien Saviot -# Modifications by Niels Rogalla -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +OO_PVER= +OO_HOME="/opt/openoffice-${OO_PVER}" -# For OpenOffice-2.2 -PV= -OOHOME="/opt/openoffice-${PV}" - -## -## Add /usr/share/fonts to font search path -## - -# Default font path. This is used if SAL_FONTPATH_PRIVATE is not defined. - -LOCAL_FONTPATH="" -for i in $(find /usr/share/fonts -maxdepth 1 -mindepth 1 -type d) -do - LOCAL_FONTPATH="${LOCAL_FONTPATH};${i}" -done - -SAL_FONTPATH_PRIVATE=${SAL_FONTPATH_PRIVATE:-"${LOCAL_FONTPATH}"} -export SAL_FONTPATH_PRIVATE - -## search LOCALE -if [[ -n $LC_ALL ]] -then - LOCALE="$LC_ALL" - # OOo doesn't understand LC_ALL, so set LANG - LANG="$LC_ALL" -elif [[ -n ${LANG} ]] -then - LOCALE="${LANG}" -elif [[ -n $LC_MESSAGES ]] -then - LOCALE="$LC_MESSAGES" - LANG="$LC_MESSAGES" -else - LOCALE="en_US" -fi - -# Set locale to en_US if locale is C -[[ x${LOCALE} = xC ]] && LOCALE="en_US" - -LOCALEOO="${LOCALE/_/-}" +export OOO_EXTRA_ARG='' +unset PYTHONPATH ## ## If no file is specified on the command line, which application to start? @@ -70,21 +14,17 @@ if [ $# = 0 ] then case $(basename $0) in - oocalc) set -- private:factory/scalc ;; - oodraw) set -- private:factory/sdraw ;; - ooimpress) set -- private:factory/simpress ;; - oomath) set -- private:factory/smath ;; - ooweb) set -- private:factory/swriter/web ;; - oowriter) set -- private:factory/swriter ;; + oobase) set -- -base ;; + oocalc) set -- -calc ;; + oodraw) set -- -draw ;; + ooimpress) set -- -impress ;; + oomath) set -- -math ;; + ooweb) set -- -web ;; + oowriter) set -- -writer ;; esac fi -## -## That's it. Launch the beast (with the given args) -## -LANG=${LOCALE} -export LANG case $(basename $0) in - oopadmin) exec "${OOHOME}/program/spadmin" ;; - *) exec "${OOHOME}/program/soffice" "$@" ;; + oopadmin) exec "${OO_HOME}/program/spadmin" ;; + *) exec "${OO_HOME}/program/soffice" "$@" ;; esac