summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.in16
-rw-r--r--avmedia/source/gstreamer/gstplayer.cxx2
-rw-r--r--bin/bash-completion.in90
-rwxr-xr-xbin/distro-install-clean-up89
-rwxr-xr-xbin/distro-install-desktop-integration180
-rwxr-xr-xbin/distro-install-file-lists555
-rwxr-xr-xbin/distro-install-sdk86
-rwxr-xr-xbin/generate-bash-completion234
-rw-r--r--bin/java-set-classpath.in64
-rwxr-xr-xbin/unpack-sources105
-rw-r--r--bootstrap.12
-rw-r--r--canvas/source/cairo/cairo_canvashelper.cxx10
-rw-r--r--canvas/source/cairo/cairo_spritecanvashelper.cxx4
-rwxr-xr-xconfigure.in129
-rw-r--r--cui/source/customize/acccfg.cxx2
-rw-r--r--cui/source/options/optchart.cxx2
-rw-r--r--dbaccess/source/ui/app/AppController.cxx3
-rw-r--r--desktop/source/app/app.cxx2
-rw-r--r--desktop/source/app/dispatchwatcher.cxx11
-rw-r--r--distro-configs/LibreOfficeMacOSX.conf1
-rw-r--r--distro-configs/LibreOfficeOpenBSD.conf5
-rw-r--r--distro-configs/LibreOfficeWin32.conf1
-rwxr-xr-xdownload9
-rw-r--r--extensions/source/update/check/Jobs.xcu2
-rw-r--r--filter/source/msfilter/msdffimp.cxx4
-rw-r--r--filter/source/msfilter/mstoolbar.cxx2
-rw-r--r--formula/inc/formula/token.hxx10
-rw-r--r--formula/source/core/api/token.cxx3
-rw-r--r--instsetoo_native/util/makefile.mk8
-rw-r--r--instsetoo_native/util/openoffice.lst28
-rw-r--r--lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.cxx2
-rw-r--r--odk/settings/settings.mk6
-rw-r--r--odk/settings/stdtarget.mk9
-rw-r--r--offapi/com/sun/star/sheet/NameToken.idl53
-rw-r--r--offapi/com/sun/star/sheet/makefile.mk1
-rw-r--r--oox/inc/oox/core/filterdetect.hxx5
-rw-r--r--oox/source/core/filterdetect.cxx28
-rw-r--r--oox/source/drawingml/chart/axisconverter.cxx4
-rw-r--r--oox/source/drawingml/chart/chartconverter.cxx6
-rw-r--r--oox/source/drawingml/chart/objectformatter.cxx14
-rw-r--r--oox/source/drawingml/chart/seriesconverter.cxx45
-rw-r--r--oox/source/xls/formulaparser.cxx6
-rw-r--r--sc/source/core/data/dpobject.cxx3
-rw-r--r--sc/source/core/data/table1.cxx17
-rw-r--r--sc/source/core/tool/address.cxx2
-rw-r--r--sc/source/core/tool/compiler.cxx11
-rw-r--r--sc/source/core/tool/scmatrix.cxx13
-rw-r--r--sc/source/core/tool/token.cxx8
-rw-r--r--sc/source/filter/excel/xepage.cxx8
-rw-r--r--sc/source/filter/excel/xiname.cxx2
-rw-r--r--sc/source/filter/html/htmlpars.cxx4
-rw-r--r--sc/source/ui/app/inputhdl.cxx5
-rw-r--r--sc/source/ui/app/inputwin.cxx2
-rw-r--r--sc/source/ui/unoobj/tokenuno.cxx8
-rw-r--r--sc/source/ui/view/drawview.cxx2
-rw-r--r--sc/source/ui/view/output.cxx11
-rw-r--r--scp2/source/ooo/common_brand.scp2
-rw-r--r--scp2/source/ooo/makefile.mk4
-rw-r--r--scp2/util/makefile.mk4
-rw-r--r--sd/source/ui/func/futext.cxx7
-rw-r--r--sd/source/ui/inc/futext.hxx1
-rw-r--r--sdext/source/presenter/makefile.mk7
-rwxr-xr-xset_soenv.in25
-rwxr-xr-xsfx2/Library_qstart.mk7
-rwxr-xr-xsfx2/Library_sfx.mk9
-rw-r--r--sfx2/source/appl/shutdownicon.cxx2
-rw-r--r--sfx2/source/bastyp/fltfnc.cxx4
-rw-r--r--sfx2/source/dialog/passwd.cxx1
-rw-r--r--sfx2/source/dialog/templdlg.cxx64
-rw-r--r--sfx2/source/doc/docfile.cxx11
-rw-r--r--sfx2/source/doc/objstor.cxx2
-rw-r--r--sfx2/source/doc/oleprops.cxx2
-rw-r--r--sfx2/source/inc/templdgi.hxx16
-rw-r--r--solenv/bin/modules/installer/windows/feature.pm39
-rw-r--r--solenv/inc/minor.mk4
-rw-r--r--sot/source/sdstor/stgdir.cxx5
-rw-r--r--sot/source/sdstor/stgstrms.cxx2
-rw-r--r--starmath/source/mathtype.hxx6
-rw-r--r--svl/source/numbers/zforlist.cxx59
-rw-r--r--svtools/source/filter.vcl/wmf/enhwmf.cxx35
-rw-r--r--sw/qa/core/data/ww8/pass/CVE-2006-3493-1.docbin0 -> 48128 bytes
-rw-r--r--sw/qa/core/data/ww8/pass/CVE-2006-6628-1.docbin0 -> 26624 bytes
-rw-r--r--sw/qa/core/data/ww8/pass/CVE-2007-1347-1.docbin0 -> 24064 bytes
-rw-r--r--sw/qa/core/data/ww8/pass/CVE-2008-2752-1.docbin0 -> 25088 bytes
-rw-r--r--sw/qa/core/data/ww8/pass/CVE-2008-2752-2.docbin0 -> 24576 bytes
-rw-r--r--sw/qa/core/data/ww8/pass/CVE-2008-2752-3.docbin0 -> 22528 bytes
-rw-r--r--sw/qa/core/data/ww8/pass/CVE-2008-2752-4.docbin0 -> 23040 bytes
l---------sw/qa/core/data/ww8/pass/CVE-2008-4841-1.doc1
-rw-r--r--sw/qa/core/data/ww8/pass/CVE-2009-0259-1.docbin0 -> 101888 bytes
-rw-r--r--sw/qa/core/data/ww8/pass/CVE-2010-3200-1.docbin0 -> 48128 bytes
-rw-r--r--sw/source/core/doc/docnew.cxx59
-rw-r--r--sw/source/core/doc/notxtfrm.cxx31
-rw-r--r--sw/source/core/docnode/ndcopy.cxx13
-rw-r--r--sw/source/core/layout/ftnfrm.cxx2
-rw-r--r--sw/source/filter/rtf/swparrtf.cxx14
-rw-r--r--sw/source/filter/ww8/attributeoutputbase.hxx3
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.cxx17
-rw-r--r--sw/source/filter/ww8/wrtw8nds.cxx6
-rw-r--r--sw/source/filter/ww8/ww8atr.cxx47
-rw-r--r--sw/source/filter/ww8/ww8par.cxx109
-rw-r--r--sw/source/filter/ww8/ww8par.hxx147
-rw-r--r--sw/source/filter/ww8/ww8par2.cxx99
-rw-r--r--sw/source/filter/ww8/ww8par2.hxx121
-rw-r--r--sw/source/filter/ww8/ww8par3.cxx38
-rw-r--r--sw/source/filter/ww8/ww8par5.cxx8
-rw-r--r--sw/source/filter/ww8/ww8par6.cxx105
-rw-r--r--sw/source/filter/ww8/ww8scan.cxx21
-rw-r--r--sw/source/filter/ww8/ww8scan.hxx5
-rw-r--r--sw/source/filter/ww8/ww8toolbar.cxx6
-rw-r--r--sysui/desktop/man/README1
-rw-r--r--sysui/desktop/man/libreoffice.1246
-rw-r--r--sysui/desktop/man/unopkg.180
-rwxr-xr-xsysui/desktop/share/create_tree.sh2
-rw-r--r--tools/source/ref/globname.cxx4
-rw-r--r--vcl/aqua/source/a11y/aqua11yrolehelper.mm4
-rw-r--r--vcl/source/window/floatwin.cxx17
-rw-r--r--vcl/unx/gtk/window/gtkframe.cxx11
-rw-r--r--writerfilter/source/ooxml/OOXMLStreamImpl.cxx18
118 files changed, 2870 insertions, 617 deletions
diff --git a/Makefile.in b/Makefile.in
index 37c138982756..128b2d6e88a0 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -20,11 +20,17 @@ all: Makefile dmake/dmake@EXEEXT@ src.downloaded
install:
@. ./*[Ee]nv.[Ss]et.sh && \
- echo "Installing in $${libdir:-@libdir@}/@INSTALL_DIRNAME@..." && \
- ooinstall "$${libdir:-@libdir@}/@INSTALL_DIRNAME@" && \
+ echo "Installing in @INSTALLDIR@..." && \
+ ooinstall "@INSTALLDIR@" && \
echo "" && \
echo "Installation finished, you can now execute:" && \
- echo "$${libdir:-@libdir@}/@INSTALL_DIRNAME@/program/soffice"
+ echo "@INSTALLDIR@/program/soffice"
+
+distro-pack-install: install
+ ./bin/distro-install-clean-up
+ ./bin/distro-install-desktop-integration
+ ./bin/distro-install-sdk
+ ./bin/distro-install-file-lists
dev-install:
@. ./*[Ee]nv.[Ss]et.sh && \
@@ -47,8 +53,12 @@ dmake/dmake@EXEEXT@:
./bootstrap
src.downloaded: ooo.lst download
+ifeq (@DO_FETCH_TARBALLS@,YES)
@. ./*[Ee]nv.[Ss]et.sh && \
$$SRC_ROOT/download $$SRC_ROOT/ooo.lst && touch $@
+else
+ @echo "Automatic fetching of external tarballs is disabled."
+endif
fetch: src.downloaded
diff --git a/avmedia/source/gstreamer/gstplayer.cxx b/avmedia/source/gstreamer/gstplayer.cxx
index 1e2d0b70800e..222fbc399ea8 100644
--- a/avmedia/source/gstreamer/gstplayer.cxx
+++ b/avmedia/source/gstreamer/gstplayer.cxx
@@ -270,7 +270,7 @@ void Player::preparePlaybin( const ::rtl::OUString& rURL, bool bFakeVideo )
mbFakeVideo = bFakeVideo;
- rtl::OString ascURL = OUStringToOString( rURL, RTL_TEXTENCODING_ASCII_US );
+ rtl::OString ascURL = OUStringToOString( rURL, RTL_TEXTENCODING_UTF8 );
g_object_set( G_OBJECT( mpPlaybin ), "uri", ascURL.getStr() , NULL );
pBus = gst_element_get_bus( mpPlaybin );
diff --git a/bin/bash-completion.in b/bin/bash-completion.in
new file mode 100644
index 000000000000..77087c59316c
--- /dev/null
+++ b/bin/bash-completion.in
@@ -0,0 +1,90 @@
+# Programmable bash_completion file for the main office applications
+# It is based on /etc/profile.d/complete.bash from SUSE Linux 10.1
+
+_def=; _dir=; _file=; _nosp=
+if complete -o default _nullcommand &> /dev/null ; then
+ _def="-o default"
+ _dir="-o dirnames"
+ _file="-o filenames"
+fi
+_minusdd="-d ${_dir}"
+_minusdf="-d ${_file}"
+if complete -o nospace _nullcommand &> /dev/null ; then
+ _nosp="-o nospace"
+ _minusdd="${_nosp} ${_dir}"
+ _minusdf="${_nosp} ${_dir}"
+fi
+complete -r _nullcommand &> /dev/null
+
+# General expanding shell function
+@OFFICE_SHELL_FUNCTION@ ()
+{
+ # bash `complete' is broken because you can not combine
+ # -d, -f, and -X pattern without missing directories.
+ local c=${COMP_WORDS[COMP_CWORD]}
+ local a="${COMP_LINE}"
+ local e s g=0 cd dc t=""
+ local IFS
+
+ shopt -q extglob && g=1
+ test $g -eq 0 && shopt -s extglob
+ # Don't be fooled by the bash parser if extglob is off by default
+ cd='*-?(c)d*'
+ dc='*-d?(c)*'
+
+ case "${1##*/}" in
+@BASH_COMPLETION_SUFFIXES_CHECKS@
+ *) e='!*'
+ esac
+
+ case "$(complete -p ${1##*/} 2> /dev/null)" in
+ *-d*) ;;
+ *) s="-S/"
+ esac
+
+ IFS='
+'
+ case "$c" in
+ \$\(*\)) eval COMPREPLY=\(${c}\) ;;
+ \$\(*) COMPREPLY=($(compgen -c -P '$(' -S ')' -- ${c#??})) ;;
+ \`*\`) eval COMPREPLY=\(${c}\) ;;
+ \`*) COMPREPLY=($(compgen -c -P '\`' -S '\`' -- ${c#?})) ;;
+ \$\{*\}) eval COMPREPLY=\(${c}\) ;;
+ \$\{*) COMPREPLY=($(compgen -v -P '${' -S '}' -- ${c#??})) ;;
+ \$*) COMPREPLY=($(compgen -v -P '$' -- ${c#?})) ;;
+ \~*/*) COMPREPLY=($(compgen -f -X "$e" -- ${c})) ;;
+ \~*) COMPREPLY=($(compgen -u ${s} -- ${c})) ;;
+ *@*) COMPREPLY=($(compgen -A hostname -P '@' -S ':' -- ${c#*@})) ;;
+ *[*?[]*) COMPREPLY=($(compgen -G "${c}")) ;;
+ *[?*+\!@]\(*\)*)
+ if test $g -eq 0 ; then
+ COMPREPLY=($(compgen -f -X "$e" -- $c))
+ test $g -eq 0 && shopt -u extglob
+ return
+ fi
+ COMPREPLY=($(compgen -G "${c}")) ;;
+ *)
+ if test "$c" = ".." ; then
+ COMPREPLY=($(compgen -d -X "$e" -S / ${_nosp} -- $c))
+ else
+ for s in $(compgen -f -X "$e" -- $c) ; do
+ if test -d $s ; then
+ COMPREPLY=(${COMPREPLY[@]} $(compgen -f -X "$e" -S / -- $s))
+ elif test -z "$t" ; then
+ COMPREPLY=(${COMPREPLY[@]} $s)
+ else
+ case "$(file -b $s 2> /dev/null)" in
+ $t) COMPREPLY=(${COMPREPLY[@]} $s) ;;
+ esac
+ fi
+ done
+ fi ;;
+ esac
+ test $g -eq 0 && shopt -u extglob
+}
+
+
+complete -d -X '.[^./]*' -F @OFFICE_SHELL_FUNCTION@ ${_file} \
+@BASH_COMPLETION_OOO_APPS@
+
+unset _def _dir _file _nosp _minusdd _minusdf
diff --git a/bin/distro-install-clean-up b/bin/distro-install-clean-up
new file mode 100755
index 000000000000..7283bb9dcf2c
--- /dev/null
+++ b/bin/distro-install-clean-up
@@ -0,0 +1,89 @@
+#!/bin/sh
+
+. ./*[Ee]nv.[Ss]et.sh
+
+echo "Cleaning up ...";
+
+remove_help_localization()
+{
+ lang=$1
+
+ # nothing to be done if the localization is en-US if it does not exist
+ # or if it is already removed
+ test "$lang" = "en-US" -o \
+ ! -e $DESTDIR$INSTALLDIR/help/$lang -o \
+ -L $DESTDIR$INSTALLDIR/help/$lang && return;
+
+ echo "... remove \"$lang\""
+
+ rm -rf $DESTDIR$INSTALLDIR/help/$lang
+ grep -v "$INSTALLDIR/help/$lang" $DESTDIR/gid_Module_Root.$lang >$DESTDIR/gid_Module_Root.$lang.new
+ mv -f $DESTDIR/gid_Module_Root.$lang.new $DESTDIR/gid_Module_Root.$lang
+ # FIXME: the following code could be used without the condition
+ # and should replace the lines above after only the milestones
+ # providing gid_Module_Helppack_Help and fixed gid_Module_Root.$lang
+ # are supported
+ # Note: The problem with gid_Module_Root.$lang is that it still includes
+ # %dir */help/* entries.
+ # Note: It was still necessary on ppc with gcj (OOo-2.0.2). Strange. Have to
+ # investigate it later.
+ if test -f $DESTDIR/gid_Module_Helppack_Help.$lang ; then
+ grep -v "$INSTALLDIR/help/$lang" $DESTDIR/gid_Module_Helppack_Help.$lang >$DESTDIR/gid_Module_Helppack_Help.$lang.new
+ mv -f $DESTDIR/gid_Module_Helppack_Help.$lang.new $DESTDIR/gid_Module_Helppack_Help.$lang
+ fi
+
+ # Note: We created a compat symlink in the past. It is no longer necessary.
+ # We do not want it because RPM has problems with update when we remove
+ # poor localizations in never packages
+}
+
+# Check if the English help is installed and is in the main package (is first on the list)
+# Note that Java-disabled builds do not create help at all.
+if test -f $DESTDIR$INSTALLDIR/help/en/sbasic.cfg -a \
+ "`for lang in $WITH_LANG_LIST ; do echo $lang ; break ; done`" = "en-US" ; then
+
+ echo "Removing duplicated English help..."
+
+ for lang in $WITH_LANG_LIST ; do
+ test ! -f $DESTDIR$INSTALLDIR/help/en/sbasic.cfg -o ! -f $DESTDIR$INSTALLDIR/help/$lang/sbasic.cfg && continue;
+ if diff $DESTDIR$INSTALLDIR/help/en/sbasic.cfg $DESTDIR$INSTALLDIR/help/$lang/sbasic.cfg >/dev/null 2>&1 ; then
+ remove_help_localization $lang
+ fi
+ done
+
+ echo "Removing poor help localizations..."
+
+ for lang in $WITH_POOR_HELP_LOCALIZATIONS ; do
+ remove_help_localization $lang
+ done
+fi
+
+echo "Fixing permissions..."
+for dir in $DOCDIR $DESTDIR$INSTALLDIR/basis$PRODUCTVERSION/sdk/examples ; do
+ if test -d $dir -a -w $dir ; then
+ find "$dir" -type f \( -name "*.txt" -o -name "*.java" -o -name "*.xml" -o \
+ -name "*.xcu" -o -name "*.xcs" -o -name "*.html" -o \
+ -name "*.pdf" -o -name "*.ps" -o -name "*.gif" -o \
+ -name "*.png" -o -name "*.jpg" -o -name "Makefile" -o \
+ -name "manifest.mf" \) -exec chmod 644 {} \;
+ fi
+done
+
+if test "z$DESTDIR" != "z" ; then
+ echo "Checking for DESTDIR inside installed files..."
+ found_destdir=
+ for file in `find $DESTDIR -type f` ; do
+ grep -q "$DESTDIR" $file && echo "$file: includes the string \"$DESTDIR\"" && found_destdir=1
+ done
+ if test "z$found_destdir" != "z" ; then
+ echo "!!!!!!!!!!!!!!!!!!!!!! WARNING !!!!!!!!!!!!!!!!!!!!!!"
+ echo "The path DESTDIR:$DESTDIR was found inside some"
+ echo "installed files. It is probably a bug."
+ echo
+ echo "Especially, if the DESTDIR is set to \$RPM_BUILD_ROOT"
+ echo "when creating RPM packages. Even it could be a security hole"
+ echo "if the application searches /var/tmp for binaries or"
+ echo "config files because the directory is world-writable."
+ echo "!!!!!!!!!!!!!!!!!!!!!! WARNING !!!!!!!!!!!!!!!!!!!!!!"
+ fi
+fi
diff --git a/bin/distro-install-desktop-integration b/bin/distro-install-desktop-integration
new file mode 100755
index 000000000000..c00c8c6754fb
--- /dev/null
+++ b/bin/distro-install-desktop-integration
@@ -0,0 +1,180 @@
+#!/bin/sh
+
+. ./*[Ee]nv.[Ss]et.sh
+
+PRODUCTVERSION_NODOT=`echo $PRODUCTVERSION | sed -e "s/\.//"`
+
+mkdir -p $DESTDIR$PREFIXDIR/bin
+
+
+create_wrapper()
+{
+ echo "Install $PREFIXDIR/bin/$1"
+
+ mkdir -p $DESTDIR$PREFIXDIR/bin
+ cat <<EOT >$DESTDIR$PREFIXDIR/bin/$1
+#!/bin/sh
+$INSTALLDIR/program/$2 $3 "\$@"
+EOT
+ chmod 755 $DESTDIR$PREFIXDIR/bin/$1
+ # put into file list
+ test -f "$DESTDIR/$4" && echo "$PREFIXDIR/bin/$1" >>$DESTDIR/$4
+}
+
+create_man_link()
+{
+ echo "Install $MANDIR/man1/$1.1.gz"
+
+ mkdir -p $DESTDIR$MANDIR/man1
+ echo ".so man1/$2.1" >| $DESTDIR$MANDIR/man1/$1.1
+ gzip -f $DESTDIR$MANDIR/man1/$1.1
+ test -f "$DESTDIR/$3" && echo "$MANDIR/man1/$1.1.gz" >>"$DESTDIR/$3"
+}
+
+install_man()
+{
+ echo "Install $MANDIR/man1/$1.1.gz"
+
+ mkdir -p $DESTDIR$MANDIR/man1
+ cp sysui/desktop/man/$1.1 $DESTDIR$MANDIR/man1 || exit 1;
+ gzip -f $DESTDIR$MANDIR/man1/$1.1
+ test -f "$DESTDIR/$2" && echo "$MANDIR/man1/$1.1.gz" >>"$DESTDIR/$2"
+}
+
+
+add_wrapper()
+{
+ lowrapper_name="$1"
+ target_binary="$2"
+ target_option_1="$3"
+ used_man_page="$4"
+ desktop_file="$5"
+ file_list="$6"
+
+ # do we want compat oowrapper?
+ oowrapper_name=""
+ if test "$WITH_COMPAT_OOWRAPPERS" == 'YES' ; then
+ oowrapper_name=`echo "$lowrapper_name" | sed -e "s/^lo/oo/"`
+ # "oo" prefix only for wrappers stating with "lo" prefix
+ test "$oowrapper_name" = "$lowrapper_name" && oowrapper_name=
+ fi
+
+ # wrappers
+ create_wrapper "$lowrapper_name" "$target_binary" "$target_option_1" "$file_list"
+ test -n "$oowrapper_name" && create_wrapper "$oowrapper_name" "$target_binary" "$target_option_1" "$file_list"
+
+ # man pages
+ if test "$used_man_page" = "$lowrapper_name" ; then
+ # need to install the manual page
+ install_man "$lowrapper_name" "$file_list"
+ else
+ # just link the manual page
+ create_man_link "$lowrapper_name" "$used_man_page" "$file_list"
+ fi
+ test -n "$oowrapper_name" && create_man_link "$oowrapper_name" "$used_man_page" "$file_list"
+
+ # add desktop file to the right file list
+ test -n "$desktop_file" -a -f "$DESTDIR/$file_list" && echo "/usr/share/applications/$desktop_file" >>"$DESTDIR/$file_list"
+}
+
+# install desktop integration from plain packages
+sysui_temp=`mktemp -d /tmp/distro-pack-desktop-integration-XXXXXX`
+cp -a sysui/unxlng*/misc/libreoffice/* "$sysui_temp"
+cp -a sysui/desktop/share/create_tree.sh "$sysui_temp"
+builddir=`pwd`
+cd $sysui_temp
+# we want non-versioned stuff in the distro packages
+for file in * ; do
+ sed -e "s/\($INSTALLDIRNAME\)$PRODUCTVERSION_NODOT/\1/" \
+ -e "s/\($INSTALLDIRNAME\)$PRODUCTVERSION/\1/" \
+ -e "s/\($PRODUCTNAME\) $PRODUCTVERSION/\1/" \
+ "$file" >"$file.new"
+ mv "$file.new" "$file"
+done
+# call in subshell to do not malfrom PRODUCTVERSION, ...
+(
+ export OFFICE_PREFIX=$LIBDIR
+ export PREFIX=$INSTALLDIRNAME
+ export ICON_PREFIX=$INSTALLDIRNAME
+ export ICON_SOURCE_DIR=$builddir/sysui/desktop/icons
+ export PRODUCTVERSION=
+ export KDEMAINDIR=/usr
+ export GNOMEDIR=/usr
+ export GNOME_MIME_THEME=hicolor
+ /bin/bash ./create_tree.sh
+)
+cd -
+rm -rf $sysui_temp
+
+# we do not want some stuff from the plain packages
+rm -f $DESTDIR/$PREFIXDIR/bin/$INSTALLDIRNAME*
+rm -f $DESTDIR/usr/share/applications/libreoffice-javafilter.desktop
+rm -f $DESTDIR/usr/share/applications/libreoffice-printeradmin.desktop
+if test -d $DESTDIR/opt ; then
+ rm -f $DESTDIR/opt/$INSTALLDIRNAME
+ rmdir --ignore-fail-on-non-empty $DESTDIR/opt
+fi
+
+# we want non-versioned desktop files
+cd $DESTDIR/$INSTALLDIR/share/xdg
+# we want non-versioned stuff in the distro packages
+for file in *.desktop ; do
+ sed -e "s/\($INSTALLDIRNAME\)$PRODUCTVERSION_NODOT/\1/" \
+ -e "s/\($INSTALLDIRNAME\)$PRODUCTVERSION/\1/" \
+ -e "s/\($PRODUCTNAME\) $PRODUCTVERSION/\1/" \
+ "$file" >"$file.new"
+ mv "$file.new" "$file"
+done
+cd -
+
+# put the stuff installed by create_tree.sh into the right file lists
+# desktop files will be added by the corresponding add_wrapper command
+if test -f $DESTDIR/gid_Module_Root_Brand ; then
+ for dir in /usr/share/application-registry \
+ /usr/share/mimelnk/application \
+ /usr/share/mime/packages \
+ /usr/share/mime-info \
+ /usr/share/icons ; do
+ find "$DESTDIR$dir" \( -type f -o -type l \) -printf "$dir/%P\n" >>$DESTDIR/gid_Module_Root_Brand
+ done
+fi
+
+# wrappers and man pages
+# FIXME: do not have desktop file and MIME icon for unopkg
+add_wrapper lobase soffice "--base" "libreoffice" "libreoffice-base.desktop" "gid_Module_Brand_Prg_Base"
+add_wrapper localc soffice "--calc" "libreoffice" "libreoffice-calc.desktop" "gid_Module_Brand_Prg_Calc"
+add_wrapper lodraw soffice "--draw" "libreoffice" "libreoffice-draw.desktop" "gid_Module_Brand_Prg_Draw"
+add_wrapper lomath soffice "--math" "libreoffice" "libreoffice-math.desktop" "gid_Module_Brand_Prg_Math"
+add_wrapper loimpress soffice "--impress" "libreoffice" "libreoffice-impress.desktop" "gid_Module_Brand_Prg_Impress"
+add_wrapper loweb soffice "--web" "libreoffice" "" "gid_Module_Brand_Prg_Wrt"
+add_wrapper lowriter soffice "--writer" "libreoffice" "libreoffice-writer.desktop" "gid_Module_Brand_Prg_Wrt"
+add_wrapper lofromtemplate soffice ".uno:NewDoc" "libreoffice" "libreoffice-base.desktop" "gid_Module_Root_Brand"
+add_wrapper libreoffice soffice "" "libreoffice" "libreoffice-startcenter.desktop" "gid_Module_Root_Brand"
+add_wrapper loffice soffice "" "libreoffice" "" "gid_Module_Root_Brand"
+add_wrapper unopkg unopkg "" "unopkg" "" "gid_Module_Root_Brand"
+
+# /usr/bin/ooffice symlink is necessary by java UNO components to find
+# the UNO installation using $PATH, see
+# http://udk.openoffice.org/common/man/spec/transparentofficecomponents.html
+# Note: if you want to support parallel installation of more OOo versions
+# you cannot include this link directly into the package
+# For example, the Novell package mark this symlink as %ghost
+# and update it in %post and %postun
+ln -sf $INSTALLDIR/program/soffice $PREFIXDIR/bin/soffice
+
+# create bash completion
+mkdir -p $DESTDIR/etc/bash_completion.d
+./bin/generate-bash-completion bin/bash-completion.in $DESTDIR/etc/bash_completion.d/$INSTALLDIRNAME.sh
+test -f $DESTDIR/gid_Module_Root_Brand && echo "/etc/bash_completion.d/$INSTALLDIRNAME.sh" >>$DESTDIR/gid_Module_Root_Brand
+if test "$WITH_COMPAT_OOWRAPPERS" = "YES" ; then
+ ./bin/generate-bash-completion --compat-oowrappers bin/bash-completion.in $DESTDIR/etc/bash_completion.d/ooffice.sh
+ test -f $DESTDIR/gid_Module_Root_Brand && echo "/etc/bash_completion.d/ooffice.sh" >>$DESTDIR/gid_Module_Root_Brand
+fi
+
+echo "Install $OOINSTDIR/basis$VERSION/program/java-set-classpath";
+mkdir -p $DESTDIR$INSTALLDIR/basis$PRODUCTVERSION/program
+sed -e "s|@INSTALLDIR@|$INSTALLDIR|g" bin/java-set-classpath.in >| "$DESTDIR$INSTALLDIR/basis$PRODUCTVERSION/program/java-set-classpath" || exit 1;
+chmod 755 "$DESTDIR$INSTALLDIR/basis$PRODUCTVERSION/program/java-set-classpath"
+test -f $DESTDIR/gid_Module_Root_Brand && echo "$INSTALLDIR/basis$PRODUCTVERSION/program/java-set-classpath" >>$DESTDIR/gid_Module_Root_Brand
+
+exit 0 \ No newline at end of file
diff --git a/bin/distro-install-file-lists b/bin/distro-install-file-lists
new file mode 100755
index 000000000000..fbd4d1c67005
--- /dev/null
+++ b/bin/distro-install-file-lists
@@ -0,0 +1,555 @@
+#!/bin/sh
+
+. ./*[Ee]nv.[Ss]et.sh
+
+BUILDDIR=`pwd`
+FILELISTSDIR="$BUILDDIR/file-lists"
+
+# remove installed file even from the file list
+# Params: file_list file_to_remove
+remove_file()
+{
+ rm -f "$DESTDIR/$2"
+ perl -pi -e "s|^$2$||" "$1"
+}
+
+# move one file from one list of files to a second one
+# Params: target_file_list source_file_list file_to_move
+mv_file_between_flists()
+{
+ if grep "^$3\$" $2 >/dev/null 2>&1 ; then
+ # \$3 can be regular expression
+ grep "^$3\$" $2 >>$1
+ perl -pi -e "s|^$3$||" $2
+ fi
+}
+# add the directories from the source list of files to the target list of
+# file which are used in the target list of files but are missing there
+# Params: target_file_list source_file_list
+add_used_directories()
+{
+ sort -u -r $2 | sed -n "s|^%dir \(.*\)\$|s%^\\\\(\1\\\\).*%\\\\1%p|p" >$2.pattern
+ sed -n -f $2.pattern $1 | sort -u | sed "s|^|%dir |" >>$1
+ rm $2.pattern
+ sort -u $1 >$1.unique
+ mv $1.unique $1
+}
+
+# remove a duplicity between two filelist
+# Params: filelist_with_original filelist_with_duplicity duplicit_path
+remove_duplicity_from_flists()
+{
+ if grep "$3" "$1" >/dev/null 2>&1 && \
+ grep "$3" "$2" >/dev/null 2>&1 ; then
+ perl -pi -e "s|^$3$||" $2
+ fi
+}
+
+# merges one file list into another one
+# Params: source_filelist dest_filelist replace_dest
+merge_flists()
+{
+ if test -f "$1" ; then
+ cat "$1" >>"$2"
+ sort -u "$2" >"$2".sorted
+ mv "$2".sorted "$2"
+ fi
+}
+
+if ! test -f $DESTDIR/gid_Module_Root; then
+ echo "Error: Failed to generate package file lists";
+ echo " Have you defined DESTDIR?"
+ exit 1;
+fi
+
+
+rm -rf "$FILELISTSDIR"
+mkdir -p "$FILELISTSDIR"
+
+cd $DESTDIR
+
+if test "z$OOO_VENDOR" != "zDebian" ; then
+
+ echo "Generating package file lists for $OOO_VENDOR..."
+
+ rm -f common_list.txt
+ for module in gid_Module_Root gid_Module_Root_Brand \
+ gid_Module_Root_Files_Images \
+ gid_Module_Root_Files_[0-9] \
+ gid_Module_Root_Hack \
+ gid_Module_Oo_Linguistic \
+ gid_Module_Root_Ure_Hidden ; do
+ merge_flists $module $FILELISTSDIR/common_list.txt
+ done
+
+ if test "$SPLIT_APP_MODULES" = "YES" ; then
+ merge_flists gid_Module_Prg_Base_Bin $FILELISTSDIR/base_list.txt
+ merge_flists gid_Module_Prg_Calc_Bin $FILELISTSDIR/calc_list.txt
+ merge_flists gid_Module_Prg_Draw_Bin $FILELISTSDIR/draw_list.txt
+ merge_flists gid_Module_Prg_Math_Bin $FILELISTSDIR/math_list.txt
+ merge_flists gid_Module_Prg_Impress_Bin $FILELISTSDIR/impress_list.txt
+ merge_flists gid_Module_Prg_Wrt_Bin $FILELISTSDIR/writer_list.txt
+ merge_flists gid_Module_Brand_Prg_Base $FILELISTSDIR/base_list.txt
+ merge_flists gid_Module_Brand_Prg_Calc $FILELISTSDIR/calc_list.txt
+ merge_flists gid_Module_Brand_Prg_Draw $FILELISTSDIR/draw_list.txt
+ merge_flists gid_Module_Brand_Prg_Math $FILELISTSDIR/math_list.txt
+ merge_flists gid_Module_Brand_Prg_Impress $FILELISTSDIR/impress_list.txt
+ merge_flists gid_Module_Brand_Prg_Wrt $FILELISTSDIR/writer_list.txt
+ # FIXME: small; low dependencies; why optional module?
+ merge_flists gid_Module_Optional_OGLTrans $FILELISTSDIR/impress_list.txt
+ else
+ merge_flists gid_Module_Prg_Base_Bin $FILELISTSDIR/common_list.txt
+ merge_flists gid_Module_Prg_Calc_Bin $FILELISTSDIR/common_list.txt
+ merge_flists gid_Module_Prg_Draw_Bin $FILELISTSDIR/common_list.txt
+ merge_flists gid_Module_Prg_Math_Bin $FILELISTSDIR/common_list.txt
+ merge_flists gid_Module_Prg_Impress_Bin $FILELISTSDIR/common_list.txt
+ merge_flists gid_Module_Prg_Wrt_Bin $FILELISTSDIR/common_list.txt
+ merge_flists gid_Module_Brand_Prg_Base $FILELISTSDIR/common_list.txt
+ merge_flists gid_Module_Brand_Prg_Calc $FILELISTSDIR/common_list.txt
+ merge_flists gid_Module_Brand_Prg_Draw $FILELISTSDIR/common_list.txt
+ merge_flists gid_Module_Brand_Prg_Math $FILELISTSDIR/common_list.txt
+ merge_flists gid_Module_Brand_Prg_Impress $FILELISTSDIR/common_list.txt
+ merge_flists gid_Module_Brand_Prg_Wrt $FILELISTSDIR/common_list.txt
+ # FIXME: small; low dependencies; why optional module?
+ merge_flists gid_Module_Optional_OGLTrans $FILELISTSDIR/common_list.txt
+ fi
+
+ if test "$SPLIT_OPT_FEATURES" = "YES" ; then
+ if test "z$OOO_VENDOR" = "zMandriva" ; then
+ merge_flists gid_Module_Optional_Binfilter $FILELISTSDIR/filter-binfilter_list.txt
+ merge_flists gid_Module_Langpack_Binfilter_en_US $FILELISTSDIR/filter-binfilter_list.txt
+ merge_flists gid_Module_Optional_Grfflt $FILELISTSDIR/draw_list.txt
+ merge_flists gid_Module_Optional_Headless $FILELISTSDIR/common_list.txt
+ merge_flists gid_Module_Optional_Javafilter $FILELISTSDIR/common_list.txt
+ merge_flists gid_Module_Optional_Pymailmerge $FILELISTSDIR/pyuno_list.txt
+ merge_flists gid_Module_Optional_Pyuno $FILELISTSDIR/pyuno_list.txt
+ merge_flists gid_Module_Optional_Testtool $FILELISTSDIR/testtool_list.txt
+ merge_flists gid_Module_Optional_Xsltfiltersamples $FILELISTSDIR/common_list.txt
+ else
+ merge_flists gid_Module_Optional_Binfilter $FILELISTSDIR/filters_list.txt
+ merge_flists gid_Module_Optional_Grfflt $FILELISTSDIR/common_list.txt
+ merge_flists gid_Module_Optional_Headless $FILELISTSDIR/common_list.txt
+ merge_flists gid_Module_Optional_Javafilter $FILELISTSDIR/filters_list.txt
+ merge_flists gid_Module_Optional_Pymailmerge $FILELISTSDIR/mailmerge_list.txt
+ merge_flists gid_Module_Optional_Pyuno $FILELISTSDIR/pyuno_list.txt
+ merge_flists gid_Module_Optional_Testtool $FILELISTSDIR/testtool_list.txt
+ merge_flists gid_Module_Optional_Xsltfiltersamples $FILELISTSDIR/filters_list.txt
+ fi
+ else
+ merge_flists gid_Module_Optional_Binfilter $FILELISTSDIR/common_list.txt
+ merge_flists gid_Module_Langpack_Binfilter $FILELISTSDIR/common_list.txt
+ merge_flists gid_Module_Optional_Grfflt $FILELISTSDIR/common_list.txt
+ merge_flists gid_Module_Optional_Headless $FILELISTSDIR/common_list.txt
+ merge_flists gid_Module_Optional_Javafilter $FILELISTSDIR/common_list.txt
+ merge_flists gid_Module_Optional_Pymailmerge $FILELISTSDIR/common_list.txt
+ merge_flists gid_Module_Optional_Pyuno $FILELISTSDIR/common_list.txt
+ merge_flists gid_Module_Optional_Testtool $FILELISTSDIR/common_list.txt
+ merge_flists gid_Module_Optional_Xsltfiltersamples $FILELISTSDIR/common_list.txt
+ fi
+
+ # lang packs
+ for lang in `echo $WITH_LANG_LIST | sed -e s/-/_/g`; do
+ lang_lists=
+ if test "$OOO_VENDOR" = "Mandriva" -o \( "$OOO_VENDOR" = "Novell, Inc." -a "$SPLIT_APP_MODULES" = "YES" \) ; then
+ test -f gid_Module_Langpack_Basis_$lang && lang_lists="$lang_lists gid_Module_Langpack_Basis_$lang" || :
+ test -f gid_Module_Langpack_Brand_$lang && lang_lists="$lang_lists gid_Module_Langpack_Brand_$lang" || :
+ test -f gid_Module_Langpack_Resource_$lang && lang_lists="$lang_lists gid_Module_Langpack_Resource_$lang" || :
+ test -f gid_Module_Langpack_Impress_$lang && lang_lists="$lang_lists gid_Module_Langpack_Impress_$lang" || :
+ test -f gid_Module_Langpack_Draw_$lang && lang_lists="$lang_lists gid_Module_Langpack_Draw_$lang" || :
+ test -f gid_Module_Langpack_Math_$lang && lang_lists="$lang_lists gid_Module_Langpack_Math_$lang" || :
+ test -f gid_Module_Langpack_Calc_$lang && lang_lists="$lang_lists gid_Module_Langpack_Calc_$lang" || :
+ test -f gid_Module_Langpack_Base_$lang && lang_lists="$lang_lists gid_Module_Langpack_Base_$lang" || :
+ test -f gid_Module_Langpack_Writer_$lang && lang_lists="$lang_lists gid_Module_Langpack_Writer_$lang" || :
+ test -f gid_Module_Langpack_Binfilter_$lang && lang_lists="$lang_lists gid_Module_Langpack_Binfilter_$lang" || :
+ # Place helps on dedicated packages.
+ test -f gid_Module_Helppack_Help_$lang && sort -u gid_Module_Helppack_Help_$lang > $FILELISTSDIR/help_${lang}_list.txt || :
+ else
+ test -f gid_Module_Langpack_Basis_$lang && lang_lists="$lang_lists gid_Module_Langpack_Basis_$lang" || :
+ test -f gid_Module_Langpack_Brand_$lang && lang_lists="$lang_lists gid_Module_Langpack_Brand_$lang" || :
+ test -f gid_Module_Langpack_Resource_$lang && lang_lists="$lang_lists gid_Module_Langpack_Resource_$lang" || :
+ test -f gid_Module_Langpack_Impress_$lang && lang_lists="$lang_lists gid_Module_Langpack_Impress_$lang" || :
+ test -f gid_Module_Langpack_Draw_$lang && lang_lists="$lang_lists gid_Module_Langpack_Draw_$lang" || :
+ test -f gid_Module_Langpack_Math_$lang && lang_lists="$lang_lists gid_Module_Langpack_Math_$lang" || :
+ test -f gid_Module_Langpack_Calc_$lang && lang_lists="$lang_lists gid_Module_Langpack_Calc_$lang" || :
+ test -f gid_Module_Langpack_Base_$lang && lang_lists="$lang_lists gid_Module_Langpack_Base_$lang" || :
+ test -f gid_Module_Langpack_Writer_$lang && lang_lists="$lang_lists gid_Module_Langpack_Writer_$lang" || :
+ test -f gid_Module_Langpack_Binfilter_$lang && lang_lists="$lang_lists gid_Module_Langpack_Binfilter_$lang" || :
+ test -f gid_Module_Helppack_Help_$lang && lang_lists="$lang_lists gid_Module_Helppack_Help_$lang" || :
+ fi
+ if test -n "$lang_lists" ; then
+ # all files are installed below $INSTALLDIR/basis; we want to own also $INSTALLDIR
+ echo "%dir $INSTALLDIR" >$FILELISTSDIR/lang_${lang}_list.txt
+ cat $lang_lists | sort -u >>$FILELISTSDIR/lang_${lang}_list.txt
+ fi
+ # some help files are in _Langpack_{Writer,Impress,...}_<lang>
+ # move them from -l10n to -help
+ if test "$OOO_VENDOR" = "Mandriva" -o \( "$OOO_VENDOR" = "Novell, Inc." -a "$SPLIT_APP_MODULES" = "YES" \) ; then
+ for lang in `echo $WITH_LANG_LIST | sed -e s/-/_/g`; do
+ test -f $FILELISTSDIR/help_${lang}_list.txt || continue;
+ mv_file_between_flists $FILELISTSDIR/help_${lang}_list.txt $FILELISTSDIR/lang_${lang}_list.txt $INSTALLDIR/basis$PRODUCTVERSION/help/.*
+ add_used_directories $FILELISTSDIR/help_${lang}_list.txt $FILELISTSDIR/lang_${lang}_list.txt
+ done
+ fi
+ done
+
+ if test -f $FILELISTSDIR/lang_en_US_list.txt -a "$OOO_VENDOR" = "Novell, Inc." -a "$SPLIT_APP_MODULES" != "YES" ; then
+ cat $FILELISTSDIR/lang_en_US_list.txt >>$FILELISTSDIR/common_list.txt
+ rm $FILELISTSDIR/lang_en_US_list.txt
+ fi
+
+ if test -f gid_Module_Root_SDK ; then
+ cp gid_Module_Root_SDK $FILELISTSDIR/sdk_list.txt
+ fi
+
+ cd $FILELISTSDIR
+
+ # kde subpackage
+ test -f $DESTDIR/gid_Module_Optional_Kde && cp $DESTDIR/gid_Module_Optional_Kde kde_list.txt || :
+ mv_file_between_flists kde_list.txt common_list.txt $INSTALLDIR/program/kdefilepicker
+ mv_file_between_flists kde_list.txt common_list.txt $INSTALLDIR/basis$PRODUCTVERSION/program/fps_kde.uno.so
+ mv_file_between_flists kde_list.txt common_list.txt $INSTALLDIR/basis$PRODUCTVERSION/program/libvclplug_kdel..so
+ mv_file_between_flists kde_list.txt common_list.txt $INSTALLDIR/basis$PRODUCTVERSION/program/libkabdrv1.so
+ add_used_directories kde_list.txt common_list.txt
+
+ # create kde4 subpackage
+ mv_file_between_flists kde4_list.txt kde_list.txt $INSTALLDIR/basis$PRODUCTVERSION/program/kde4be1.uno.so
+ mv_file_between_flists kde4_list.txt common_list.txt $INSTALLDIR/basis$PRODUCTVERSION/program/libvclplug_kde4l..so
+ mv_file_between_flists kde4_list.txt common_list.txt $INSTALLDIR/basis$PRODUCTVERSION/program/fps_kde4.uno.so
+ add_used_directories kde4_list.txt common_list.txt
+
+ # gnome subpackage
+ test -f $DESTDIR/gid_Module_Optional_Gnome && cp $DESTDIR/gid_Module_Optional_Gnome gnome_list.txt || :
+ mv_file_between_flists gnome_list.txt common_list.txt $INSTALLDIR/basis$PRODUCTVERSION/program/libevoab2.so
+ mv_file_between_flists gnome_list.txt common_list.txt $INSTALLDIR/basis$PRODUCTVERSION/program/fps_gnome.uno.so
+ mv_file_between_flists gnome_list.txt common_list.txt $INSTALLDIR/basis$PRODUCTVERSION/program/libvclplug_gtk[0-9]*l..so
+ mv_file_between_flists common_list.txt gnome_list.txt $INSTALLDIR/basis$PRODUCTVERSION/program/ucpgvfs1.uno.so
+ add_used_directories gnome_list.txt common_list.txt
+
+ # mono subpackage
+ mv_file_between_flists mono_list.txt common_list.txt $INSTALLDIR/basis$PRODUCTVERSION/program/cli_.*.dll
+ mv_file_between_flists mono_list.txt common_list.txt $INSTALLDIR/basis$PRODUCTVERSION/program/cli_.*.dll.config
+ mv_file_between_flists mono_list.txt common_list.txt $INSTALLDIR/basis$PRODUCTVERSION/program/policy.*.cli_.*.dll
+ mv_file_between_flists mono_list.txt common_list.txt $INSTALLDIR/ure/lib/cli_.*.dll
+ mv_file_between_flists mono_list.txt common_list.txt $INSTALLDIR/ure/lib/cli_.*.dll.config
+ mv_file_between_flists mono_list.txt common_list.txt $INSTALLDIR/ure/lib/policy.*.cli_.*.dll
+ mv_file_between_flists mono_list.txt common_list.txt $INSTALLDIR/ure/lib/libcli_.*.so
+ add_used_directories mono_list.txt common_list.txt
+ # add the files from GAC if it was installed
+ test -f mono_gac && cat mono_gac >>mono_list.txt
+
+ # mailmerge
+ if test "$SPLIT_OPT_FEATURES" = "YES" ; then
+ if test "z$OOO_VENDOR" = "zMandriva" ; then
+ flist=pyuno_list.txt
+ else
+ flist=mailmerge_list.txt
+ fi
+ mv_file_between_flists $flist common_list.txt $INSTALLDIR/basis$PRODUCTVERSION/program/mailmerge.py
+ add_used_directories $flist common_list.txt
+ fi
+
+ if test "z$OOO_VENDOR" = "zNovell" ; then
+ # officebean subpackage
+ mv_file_between_flists officebean_list.txt common_list.txt $INSTALLDIR/basis$PRODUCTVERSION/program/classes/officebean.jar
+ mv_file_between_flists officebean_list.txt common_list.txt $INSTALLDIR/basis$PRODUCTVERSION/program/libofficebean.so
+ add_used_directories officebean_list.txt common_list.txt
+ fi
+
+ if test -f sdk_list.txt ; then
+ # in this case we move all entries including directories
+ mv_file_between_flists sdk_doc_list.txt sdk_list.txt "%dir $DOCDIRBASE/sdk/docs.*"
+ mv_file_between_flists sdk_doc_list.txt sdk_list.txt "$DOCDIRBASE/sdk/docs.*"
+ mv_file_between_flists sdk_doc_list.txt sdk_list.txt "$DOCDIRBASE/sdk/examples"
+ mv_file_between_flists sdk_doc_list.txt sdk_list.txt "$DOCDIRBASE/sdk/index.html"
+ mv_file_between_flists sdk_doc_list.txt sdk_list.txt "%dir $INSTALLDIR/basis$PRODUCTVERSION/sdk/examples.*"
+ mv_file_between_flists sdk_doc_list.txt sdk_list.txt "$INSTALLDIR/basis$PRODUCTVERSION/sdk/docs"
+ mv_file_between_flists sdk_doc_list.txt sdk_list.txt "$INSTALLDIR/basis$PRODUCTVERSION/sdk/examples.*"
+ mv_file_between_flists sdk_doc_list.txt sdk_list.txt "$INSTALLDIR/basis$PRODUCTVERSION/sdk/index.html"
+ add_used_directories sdk_doc_list.txt sdk_list.txt
+ fi
+
+ if test "$OOO_VENDOR" = "Novell, Inc." -a "$SPLIT_APP_MODULES" = "YES" ; then
+ # move the prebuilt icons into a hacky temporary package
+ # we want to repack them into a noarch package as soon as possible
+ # without the build dependency on the huge devel package
+ mv_file_between_flists icon_themes_prebuilt.txt common_list.txt $INSTALLDIR/basis$PRODUCTVERSION/share/config/images_classic8.zip
+ mv_file_between_flists icon_themes_prebuilt.txt common_list.txt $INSTALLDIR/basis$PRODUCTVERSION/share/config/images_crystal.zip
+ mv_file_between_flists icon_themes_prebuilt.txt common_list.txt $INSTALLDIR/basis$PRODUCTVERSION/share/config/images_hicontrast.zip
+ mv_file_between_flists icon_themes_prebuilt.txt common_list.txt $INSTALLDIR/basis$PRODUCTVERSION/share/config/images_industrial.zip
+ mv_file_between_flists icon_themes_prebuilt.txt common_list.txt $INSTALLDIR/basis$PRODUCTVERSION/share/config/images_tango.zip
+ mv_file_between_flists icon_themes_prebuilt.txt common_list.txt $INSTALLDIR/basis$PRODUCTVERSION/share/config/images.zip
+ fi
+
+ # Mandriva packaging
+ if test "$OOO_VENDOR" = "Mandriva"; then
+ # Not used
+ remove_file common_list.txt $INSTALLDIR/share/gallery/htmltheme.orig
+ remove_file common_list.txt $INSTALLDIR/share/dict/ooo/dictionary.lst
+
+ # And these are in -draw package
+ mv_file_between_flists draw_list.txt common_list.txt $INSTALLDIR/basis$PRODUCTVERSION/share/registry/modules/org/openoffice/TypeDetection/Filter/fcfg_drawgraphics_filters.xcu
+ mv_file_between_flists draw_list.txt common_list.txt $INSTALLDIR/basis$PRODUCTVERSION/share/registry/modules/org/openoffice/TypeDetection/Filter/fcfg_drawgraphics_types.xcu
+
+ # And these are in -impress package
+ mv_file_between_flists impress_list.txt common_list.txt $INSTALLDIR/basis$PRODUCTVERSION/share/registry/modules/org/openoffice/TypeDetection/Filter/fcfg_impressgraphics_filters.xcu
+ mv_file_between_flists impress_list.txt common_list.txt $INSTALLDIR/basis$PRODUCTVERSION/share/registry/modules/org/openoffice/TypeDetection/Types/fcfg_impressgraphics_types.xcu
+
+ # Split out the gallery
+ mv_file_between_flists gallery_list.txt common_list.txt "$INSTALLDIR/basis$PRODUCTVERSION/share/gallery.*"
+ test -r galleries.txt && cat galleries.txt >> gallery_list.txt
+
+ # Split out dtd-officedocument1.0
+ mv_file_between_flists dtd_list.txt common_list.txt "$INSTALLDIR/share/dtd/officedocument.*"
+
+ # Split out java stuff
+ mv_file_between_flists java_common_list.txt common_list.txt $INSTALLDIR/basis$PRODUCTVERSION/program/JREProperties.class
+ mv_file_between_flists java_common_list.txt common_list.txt "$INSTALLDIR/basis$PRODUCTVERSION/program/classes.*"
+ mv_file_between_flists java_common_list.txt common_list.txt $INSTALLDIR/basis$PRODUCTVERSION/program/libofficebean.so
+ mv_file_between_flists java_common_list.txt common_list.txt "$INSTALLDIR/basis$PRODUCTVERSION/share/Scripts/java.*"
+ mv_file_between_flists java_common_list.txt filter-binfilter_list.txt $INSTALLDIR/basis$PRODUCTVERSION/program/classes/aportisdoc.jar
+ mv_file_between_flists java_common_list.txt filter-binfilter_list.txt $INSTALLDIR/basis$PRODUCTVERSION/program/classes/pocketword.jar
+ mv_file_between_flists java_common_list.txt filter-binfilter_list.txt $INSTALLDIR/basis$PRODUCTVERSION/program/classes/pexcel.jar
+ mv_file_between_flists java_common_list.txt writer_list.txt $INSTALLDIR/basis$PRODUCTVERSION/program/classes/writer2latex.jar
+
+ # Move arch-dependent/dup files from common to core
+ for f in \
+ ".*\.so" \
+ ".*\.so\..*" \
+ "program/.*\.rdb" \
+ program/configimport.bin \
+ program/javaldx \
+ program/msfontextract \
+ program/nsplugin \
+ program/oosplash.bin \
+ program/pagein \
+ program/pagein-calc \
+ program/pagein-common \
+ program/pagein-draw \
+ program/pagein-impress \
+ program/pagein-writer \
+ program/pkgchk.bin \
+ program/pluginapp.bin \
+ program/setofficelang.bin \
+ program/soffice.bin \
+ program/spadmin.bin \
+ program/uno.bin \
+ program/unopkg.bin \
+ program/uri-encode
+ do
+ mv_file_between_flists core_list.txt common_list.txt "$INSTALLDIR/basis$PRODUCTVERSION/$f"
+ done
+
+ # Put gtk/gnome stuff into gnome package
+ mv_file_between_flists gnome_list.txt core_list.txt $INSTALLDIR/basis$PRODUCTVERSION/program/gnome-open-url.bin
+ mv_file_between_flists gnome_list.txt core_list.txt $INSTALLDIR/basis$PRODUCTVERSION/program/fps_gnome.uno.so
+ mv_file_between_flists gnome_list.txt core_list.txt $INSTALLDIR/basis$PRODUCTVERSION/program/ucpgvfs1.uno.so
+ mv_file_between_flists gnome_list.txt core_list.txt $INSTALLDIR/basis$PRODUCTVERSION/program/libeggtray680li.so
+
+ # Ship ooqstart for gnome in gnome package
+ mv_file_between_flists gnome_list.txt core_list.txt "$INSTALLDIR/program/libqstart_gtk680.*"
+
+ # themes are included in other packages
+ # don't use remove_file as we don't want them removed from the buildroot.
+ mv_file_between_flists /dev/null common_list.txt $INSTALLDIR/basis$PRODUCTVERSION/share/config/images_crystal.zip
+ mv_file_between_flists /dev/null common_list.txt $INSTALLDIR/basis$PRODUCTVERSION/share/config/images_hicontrast.zip
+ mv_file_between_flists /dev/null common_list.txt $INSTALLDIR/basis$PRODUCTVERSION/share/config/images_industrial.zip
+ mv_file_between_flists /dev/null common_list.txt $INSTALLDIR/basis$PRODUCTVERSION/share/config/images_tango.zip
+ mv_file_between_flists /dev/null common_list.txt $INSTALLDIR/basis$PRODUCTVERSION/share/config/images.zip
+ fi
+
+ # remove known duplicities to do not have files packaged in two packages
+ # the Bulgarian fixes can be removed after the issue #54110 is fixed
+ remove_duplicity_from_flists common_list.txt lang_bg_list.txt $INSTALLDIR/basis$PRODUCTVERSION/presets/config/arrowhd.soe
+ remove_duplicity_from_flists common_list.txt lang_bg_list.txt $INSTALLDIR/basis$PRODUCTVERSION/presets/config/classic.sog
+ remove_duplicity_from_flists common_list.txt lang_bg_list.txt $INSTALLDIR/basis$PRODUCTVERSION/presets/config/hatching.soh
+ remove_duplicity_from_flists common_list.txt lang_bg_list.txt $INSTALLDIR/basis$PRODUCTVERSION/presets/config/modern.sog
+ remove_duplicity_from_flists common_list.txt lang_bg_list.txt $INSTALLDIR/basis$PRODUCTVERSION/presets/config/palette.soc
+ remove_duplicity_from_flists common_list.txt lang_bg_list.txt $INSTALLDIR/basis$PRODUCTVERSION/presets/config/styles.sod
+ # the British fixes can be removed after the issue #54113 is fixed
+ remove_duplicity_from_flists common_list.txt lang_en-GB_list.txt $INSTALLDIR/basis$PRODUCTVERSION/presets/config/standard.sog
+
+else
+
+ echo "Creating package directories..."
+
+ test -d pkg && rm -r pkg || :
+
+ # Create package tree (needed by Debian's dpkg)
+ # create_package_directory <list_file> <directory_name>
+ create_package_directory()
+ {
+ listfile=$1
+ directory="$2"
+ perl -nl \
+ -e " if(/^%dir (.*)/)
+ {system('mkdir', '-p', '-m', '755', \"$directory\".\$1);}
+ else
+ {rename('./'.\$_, \"$directory\".\$_);}
+ " \
+ $listfile
+ }
+
+ create_package_directory gid_Module_Root_Ure_Hidden pkg/ure
+
+ create_package_directory gid_Module_Root pkg/libreoffice-common
+ create_package_directory gid_Module_Root_Brand pkg/libreoffice-common
+ create_package_directory gid_Module_Root_Files_Images pkg/libreoffice-common
+ create_package_directory gid_Module_Oo_Linguistic pkg/libreoffice-common
+ create_package_directory gid_Module_Optional_Xsltfiltersamples pkg/libreoffice-common
+ create_package_directory gid_Module_Optional_Javafilter pkg/libreoffice-common
+ if [ -f gid_Module_Optional_Binfilter ]; then
+ create_package_directory gid_Module_Optional_Binfilter pkg/libreoffice-filter-binfilter
+ fi
+ create_package_directory gid_Module_Optional_Grfflt pkg/libreoffice-draw
+ create_package_directory gid_Module_Prg_Calc_Bin pkg/libreoffice-calc
+ create_package_directory gid_Module_Prg_Math_Bin pkg/libreoffice-math
+ create_package_directory gid_Module_Prg_Draw_Bin pkg/libreoffice-draw
+ create_package_directory gid_Module_Prg_Wrt_Bin pkg/libreoffice-writer
+ create_package_directory gid_Module_Prg_Impress_Bin pkg/libreoffice-impress
+ create_package_directory gid_Module_Prg_Base_Bin pkg/libreoffice-base
+ create_package_directory gid_Module_Brand_Prg_Calc pkg/libreoffice-calc
+ create_package_directory gid_Module_Brand_Prg_Math pkg/libreoffice-math
+ create_package_directory gid_Module_Brand_Prg_Draw pkg/libreoffice-draw
+ create_package_directory gid_Module_Brand_Prg_Wrt pkg/libreoffice-writer
+ create_package_directory gid_Module_Brand_Prg_Impress pkg/libreoffice-impress
+ create_package_directory gid_Module_Brand_Prg_Base pkg/libreoffice-base
+ create_package_directory gid_Module_Optional_Pyuno pkg/python-uno
+ create_package_directory gid_Module_Optional_Gnome pkg/libreoffice-gnome
+ create_package_directory gid_Module_Optional_Kde pkg/libreoffice-kde
+
+ create_package_directory gid_Module_Root_Files_2 pkg/libreoffice-common
+ create_package_directory gid_Module_Root_Files_3 pkg/libreoffice-common
+ create_package_directory gid_Module_Root_Files_4 pkg/libreoffice-common
+ create_package_directory gid_Module_Root_Files_5 pkg/libreoffice-common
+ create_package_directory gid_Module_Root_Files_6 pkg/libreoffice-common
+ create_package_directory gid_Module_Root_Files_7 pkg/libreoffice-common
+ create_package_directory gid_Module_Optional_Testtool pkg/libreoffice-qa-tools
+ if [ -e gid_Module_Optional_Pymailmerge ]; then
+ create_package_directory gid_Module_Optional_Pymailmerge pkg/libreoffice-emailmerge
+ else # post m26
+ mkdir -p pkg/libreoffice-emailmerge/$INSTALLDIR/basis$PRODUCTVERSION/program
+ mv pkg/libreoffice-common/$INSTALLDIR/basis$PRODUCTVERSION/program/mailmerge.py \
+ pkg/libreoffice-emailmerge/$INSTALLDIR/basis$PRODUCTVERSION/program/mailmerge.py
+ fi
+ create_package_directory gid_Module_Optional_OGLTrans pkg/libreoffice-ogltrans
+
+ create_package_directory gid_Module_Root_SDK pkg/libreoffice-dev
+
+ for l in `echo $WITH_LANG_LIST`; do
+ for p in Impress Draw Math Calc Base Writer; do
+ create_package_directory gid_Module_Langpack_${p}_`echo $l | sed -e s/-/_/g` pkg/libreoffice-l10n-$l
+ done
+ create_package_directory gid_Module_Langpack_Basis_`echo $l | sed -e s/-/_/g` pkg/libreoffice-l10n-$l
+ create_package_directory gid_Module_Langpack_Brand_`echo $l | sed -e s/-/_/g` pkg/libreoffice-l10n-$l
+ create_package_directory gid_Module_Langpack_Resource_`echo $l | sed -e s/-/_/g` pkg/libreoffice-l10n-$l
+ create_package_directory gid_Module_Helppack_Help_`echo $l | sed -e s/-/_/g` pkg/libreoffice-help-$l
+ if [ -f gid_Module_Optional_Binfilter ]; then
+ if [ "$l" = "en-US" ]; then
+ create_package_directory gid_Module_Langpack_Binfilter_en_US pkg/libreoffice-filter-binfilter
+ else
+ create_package_directory gid_Module_Langpack_Binfilter_`echo $l | sed -e s/-/_/g` pkg/libreoffice-l10n-$l
+ fi
+ fi
+ # some help files are in _Langpack_{Writer,Impress,...}_<lang>
+ # move them from -l10n to -help
+ if [ "$l" = "en-US" ]; then d=en; else d=$l; fi
+ mv pkg/libreoffice-l10n-$l/$INSTALLDIR/basis$PRODUCTVERSION/help/$d/* \
+ pkg/libreoffice-help-$l/$INSTALLDIR/basis$PRODUCTVERSION/help/$d && \
+ rmdir pkg/libreoffice-l10n-$l/$INSTALLDIR/basis$PRODUCTVERSION/help/$d
+ done
+
+ # move_wrappers <directory_name> <name> [...]
+ move_wrappers()
+ {
+ directory=$1
+ shift
+ mkdir -m755 -p "$directory"/usr/bin
+ while test -n "$1"; do
+ mv usr/*bin/"$1$BINSUFFIX" "$directory"/usr/bin
+ shift
+ done
+ }
+ move_wrappers pkg/libreoffice-common soffice unopkg
+ if test "$COMPAT_OOWRAPPERS" = "YES" ; then
+ move_wrappers pkg/libreoffice-common ooffice oofromtemplate
+ move_wrappers pkg/libreoffice-base oobase
+ move_wrappers pkg/libreoffice-writer oowriter ooweb
+ move_wrappers pkg/libreoffice-calc oocalc
+ move_wrappers pkg/libreoffice-impress ooimpress
+ move_wrappers pkg/libreoffice-math oomath
+ move_wrappers pkg/libreoffice-draw oodraw
+ fi
+ move_wrappers pkg/libreoffice-common libreoffice lofromtemplate
+ move_wrappers pkg/libreoffice-base lobase
+ move_wrappers pkg/libreoffice-writer lowriter loweb
+ move_wrappers pkg/libreoffice-calc localc
+ move_wrappers pkg/libreoffice-impress loimpress
+ move_wrappers pkg/libreoffice-math lomath
+ move_wrappers pkg/libreoffice-draw lodraw
+
+ # Move all libraries, binaries, *.rdb from -common to -core
+ for d in $INSTALLDIR/basis$PRODUCTVERSION/program $INSTALLDIR/program; do \
+ if [ ! -d $DESTDIR/pkg/libreoffice-core/$d ]; then \
+ mkdir -p $DESTDIR/pkg/libreoffice-core/$d; \
+ fi &&
+ ( cd pkg/libreoffice-common/$d
+ find -maxdepth 1 \
+ -regex '\./\(.*\.so.*\|.*\.bin\|pagein\|nsplugin\|kdefilepicker\|msfontextract\|.*\.rdb\|javaldx\|uri-encode\)' \
+ -exec mv {} $DESTDIR/pkg/libreoffice-core/$d \;
+ ); \
+ done
+
+ # install additional ooo-build scripts & misc stuff
+ mkdir -p pkg/libreoffice-common/usr/share/man/man1
+ if test "$COMPAT_OOWRAPPERS" = "YES" ; then
+ mv usr/share/man/man1/openoffice$BINSUFFIX.1 \
+ pkg/libreoffice-common/usr/share/man/man1
+ fi
+ mv usr/share/man/man1/libreoffice$BINSUFFIX.1 \
+ pkg/libreoffice-common/usr/share/man/man1
+ mkdir -p pkg/libreoffice-common/etc/bash_completion.d
+ if test "$COMPAT_OOWRAPPERS" = "YES" ; then
+ mv etc/bash_completion.d/ooffice$BINSUFFIX.sh \
+ pkg/libreoffice-common/etc/bash_completion.d
+ fi
+ mv etc/bash_completion.d/libreoffice$BINSUFFIX.sh \
+ pkg/libreoffice-common/etc/bash_completion.d
+ mv .$INSTALLDIR/basis$PRODUCTVERSION/program/java-set-classpath \
+ pkg/libreoffice-common/$INSTALLDIR/program
+ if echo $WITH_LANG_LIST | grep -q en-US; then
+ for i in forms/resume.ott officorr/project-proposal.ott; do \
+ mkdir -p pkg/libreoffice-common/$INSTALLDIR/basis$PRODUCTVERSION/share/template/en-US/`dirname $i`; \
+ mv .$INSTALLDIR/basis$PRODUCTVERSION/share/template/en-US/$i \
+ pkg/libreoffice-common/$INSTALLDIR/basis$PRODUCTVERSION/share/template/en-US/$i; \
+ done; \
+ fi
+ # Warn for any remaining files
+ find . -path './pkg' -prune -o -not -name 'gid_Module_*' -not -type d -exec echo "File not packaged: {}" \;
+fi
+
+# mark the config files
+RPM_CONFIG_FILE_TAGS=
+if test "$OOO_VENDOR" = "Novell, Inc." -o "$OOO_VENDOR" = "RedHat"; then
+ RPM_CONFIG_FILE_TAGS="%config"
+elif test "$OOO_VENDOR" = "PLD" ; then
+ RPM_CONFIG_FILE_TAGS="%config(noreplace) %verify(not md5 size mtime)"
+fi
+
+if test "z$RPM_CONFIG_FILE_TAGS" != "z" ; then
+ cd $FILELISTSDIR
+ perl -pi -e "s|^($INSTALLDIR/help/.*\.xsl)\$|$RPM_CONFIG_FILE_TAGS \\1|;" \
+ -e "s|^($INSTALLDIR/help/.*\.css)\$|$RPM_CONFIG_FILE_TAGS \\1|;" \
+ -e "s|^($INSTALLDIR/program/[a-zA-Z0-9_\.]*rc)\$|$RPM_CONFIG_FILE_TAGS \\1|;" \
+ -e "s|^($INSTALLDIR/program/.*\.xsl)\$|$RPM_CONFIG_FILE_TAGS \\1|;" \
+ -e "s|^($INSTALLDIR/share/config/[a-zA-Z0-9]*rc)\$|$RPM_CONFIG_FILE_TAGS \\1|;" \
+ -e "s|^($INSTALLDIR/share/dict/ooo/.*\.lst)\$|$RPM_CONFIG_FILE_TAGS \\1|;" \
+ -e "s|^($INSTALLDIR/share/psprint/.*\.conf)\$|$RPM_CONFIG_FILE_TAGS \\1|;" \
+ -e "s|^($INSTALLDIR/share/registry/.*\.xcu)\$|$RPM_CONFIG_FILE_TAGS \\1|;" \
+ -e "s|^($INSTALLDIR/share/registry/.*\.properties)\$|$RPM_CONFIG_FILE_TAGS \\1|;" \
+ -e "s|^($INSTALLDIR/share/registry/.*\.xcs)\$|$RPM_CONFIG_FILE_TAGS \\1|;" \
+ -e "s|^($INSTALLDIR/user/config/.*\.so.)\$|$RPM_CONFIG_FILE_TAGS \\1|;" \
+ *_list.txt
+fi
+
+mkdir -p $FILELISTSDIR/orig
+mv -f $DESTDIR/gid_Module_* $FILELISTSDIR/orig
diff --git a/bin/distro-install-sdk b/bin/distro-install-sdk
new file mode 100755
index 000000000000..b147b4522d2f
--- /dev/null
+++ b/bin/distro-install-sdk
@@ -0,0 +1,86 @@
+#!/bin/sh
+
+. ./*[Ee]nv.[Ss]et.sh
+
+if test -d $DESTDIR$INSTALLDIR/basis$PRODUCTVERSION/sdk ; then
+
+ echo "SDK installation clean up"
+
+ # bin potential .orig files
+ find $DESTDIR$INSTALLDIR/basis$PRODUCTVERSION/sdk -name "*.orig" -exec rm -f {} \;
+
+ # move some SDK directories to the right place according to FHS
+ # note that examples must stay in $DESTDIR$INSTALLDIR/basis$PRODUCTVERSION/sdk because there are used
+ # relative paths to $DESTDIR$INSTALLDIR/basis$PRODUCTVERSION/sdk/setting and it does not work via
+ # a symlink
+ mkdir -p $DESTDIR$PREFIXDIR/include
+ mkdir -p $DESTDIR$DATADIR/idl
+ mkdir -p $DESTDIR$DATADIR/$INSTALLDIRNAME/sdk
+ mkdir -p $DESTDIR$DOCDIR/sdk
+ mv $DESTDIR$INSTALLDIR/basis$PRODUCTVERSION/sdk/include $DESTDIR$PREFIXDIR/include/$INSTALLDIRNAME
+ if [ -d $DESTDIR$INSTALLDIR/basis$PRODUCTVERSION/sdk/classes ]; then
+ mv $DESTDIR$INSTALLDIR/basis$PRODUCTVERSION/sdk/classes $DESTDIR$DATADIR/$INSTALLDIRNAME/sdk/classes
+ fi
+ mv $DESTDIR$INSTALLDIR/basis$PRODUCTVERSION/sdk/idl $DESTDIR$DATADIR/idl/$INSTALLDIRNAME
+ mv $DESTDIR$INSTALLDIR/basis$PRODUCTVERSION/sdk/docs $DESTDIR$DOCDIR/sdk
+ mv $DESTDIR$INSTALLDIR/basis$PRODUCTVERSION/sdk/share/readme $DESTDIR$DOCDIR/sdk/readme
+ mv $DESTDIR$INSTALLDIR/basis$PRODUCTVERSION/sdk/index.html $DESTDIR$DOCDIR/sdk
+
+ # compat symlinks
+ ln -sf $PREFIXDIR/include/$INSTALLDIRNAME $DESTDIR$INSTALLDIR/basis$PRODUCTVERSION/sdk/include
+ ln -sf $DATADIR/$INSTALLDIRNAME/sdk/classes $DESTDIR$INSTALLDIR/basis$PRODUCTVERSION/sdk/classes
+ ln -sf $DATADIR/idl/$INSTALLDIRNAME $DESTDIR$INSTALLDIR/basis$PRODUCTVERSION/sdk/idl
+ ln -sf $DOCDIR/sdk/docs $DESTDIR$INSTALLDIR/basis$PRODUCTVERSION/sdk/
+ ln -sf $DOCDIR/sdk/index.html $DESTDIR$INSTALLDIR/basis$PRODUCTVERSION/sdk/index.html
+ ln -sf $INSTALLDIR/basis$PRODUCTVERSION/sdk/examples $DESTDIR$DOCDIR/sdk/examples
+
+ # fix file list
+ sed -e "s|^\(%dir \)\?$INSTALLDIR/basis$PRODUCTVERSION/sdk/include|\1$PREFIXDIR/include/$INSTALLDIRNAME|" \
+ -e "s|^\(%dir \)\?$INSTALLDIR/basis$PRODUCTVERSION/sdk/classes|\1$DATADIR/$INSTALLDIRNAME/sdk/classes|" \
+ -e "s|^\(%dir \)\?$INSTALLDIR/basis$PRODUCTVERSION/sdk/idl|\1$DATADIR/idl/$INSTALLDIRNAME|" \
+ -e "s|^\(%dir \)\?$INSTALLDIR/basis$PRODUCTVERSION/sdk/docs|\1$DOCDIR/sdk/docs|" \
+ -e "s|^\(%dir \)\?$INSTALLDIR/basis$PRODUCTVERSION/sdk/share/readme|\1$DOCDIR/sdk/readme|" \
+ -e "s|^$INSTALLDIR/basis$PRODUCTVERSION/sdk/index.html$|$DOCDIR/sdk/index.html|" \
+ -e "s|^\(%dir \)\?$INSTALLDIR/basis$PRODUCTVERSION/sdk/share.*$||" \
+ -e "/\.orig$/D" \
+ -e "/^$/D" \
+ $DESTDIR/gid_Module_Root_SDK | sort -u \
+ >$DESTDIR/gid_Module_Root_SDK.new
+ mv $DESTDIR/gid_Module_Root_SDK.new $DESTDIR/gid_Module_Root_SDK
+ #
+ echo "%dir $DATADIR/$INSTALLDIRNAME/sdk" >>$DESTDIR/gid_Module_Root_SDK
+ echo "%dir $DATADIR/$INSTALLDIRNAME" >>$DESTDIR/gid_Module_Root_SDK
+ echo "%dir $DATADIR/idl" >>$DESTDIR/gid_Module_Root_SDK
+ echo "%dir $DOCDIR/sdk/docs" >>$DESTDIR/gid_Module_Root_SDK
+ echo "%dir $DOCDIR/sdk" >>$DESTDIR/gid_Module_Root_SDK
+ echo "%dir $DOCDIR" >>$DESTDIR/gid_Module_Root_SDK
+ echo "$INSTALLDIR/basis$PRODUCTVERSION/sdk/include" >>$DESTDIR/gid_Module_Root_SDK
+ echo "$INSTALLDIR/basis$PRODUCTVERSION/sdk/classes" >>$DESTDIR/gid_Module_Root_SDK
+ echo "$INSTALLDIR/basis$PRODUCTVERSION/sdk/idl" >>$DESTDIR/gid_Module_Root_SDK
+ echo "$INSTALLDIR/basis$PRODUCTVERSION/sdk/docs" >>$DESTDIR/gid_Module_Root_SDK
+ echo "$INSTALLDIR/basis$PRODUCTVERSION/sdk/index.html" >>$DESTDIR/gid_Module_Root_SDK
+ echo "$DOCDIR/sdk/examples" >>$DESTDIR/gid_Module_Root_SDK
+
+ # generate default profiles
+ for file in setsdkenv_unix.csh setsdkenv_unix.sh ; do
+ sed -e "s,@OO_SDK_NAME@,openoffice.org${PRODUCTVERSION}_sdk," \
+ -e "s,@OO_SDK_HOME@,$INSTALLDIR/basis$PRODUCTVERSION/sdk," \
+ -e "s,@OFFICE_HOME@,$INSTALLDIR," \
+ -e "s,@OFFICE_BASE_HOME@,$INSTALLDIR/basis$PRODUCTVERSION," \
+ -e "s,@OO_SDK_URE_HOME@,$INSTALLDIR/basis$PRODUCTVERSION/ure-link," \
+ -e "s,@OO_SDK_MAKE_HOME@,/usr/bin," \
+ -e "s,@OO_SDK_ZIP_HOME@,/usr/bin," \
+ -e "s,@OO_SDK_CPP_HOME@,/usr/bin," \
+ -e "s,@OO_SDK_CC_55_OR_HIGHER@,," \
+ -e "s,@OO_SDK_JAVA_HOME@,$JAVA_HOME," \
+ -e "s,@OO_SDK_OUTPUT_DIR@,\$HOME," \
+ -e "s,@SDK_AUTO_DEPLOYMENT@,NO," \
+ $DESTDIR$INSTALLDIR/basis$PRODUCTVERSION/sdk/$file.in \
+ > $DESTDIR$INSTALLDIR/basis$PRODUCTVERSION/sdk/$file
+ chmod 755 $DESTDIR$INSTALLDIR/basis$PRODUCTVERSION/sdk/$file
+ echo $INSTALLDIR/basis$PRODUCTVERSION/sdk/$file >>$DESTDIR/gid_Module_Root_SDK
+ done
+
+ # FIXME: I rather set this file to be non-world-writttable for now, i#64812
+ chmod go-w $DESTDIR$INSTALLDIR/basis$PRODUCTVERSION/sdk/settings/component.uno.map
+fi
diff --git a/bin/generate-bash-completion b/bin/generate-bash-completion
new file mode 100755
index 000000000000..dafe413cbbc9
--- /dev/null
+++ b/bin/generate-bash-completion
@@ -0,0 +1,234 @@
+#!/usr/bin/env perl
+# script to generate LibreOffice bash_completion file for the main applications
+# written by Rene Engelhard <rene@debian.org>, Public Domain
+# updated for libreoffice-build by Petr Mladek <pmladek@suse.cz>, Public Domain
+# yes, this script probably is not real good code :) but still easier
+# to maintain than adding those entries statically many times in
+# a file...
+
+use strict;
+
+my @DRAWDOCS=("sxd", "std", "dxf", "emf", "eps", "met", "pct", "sgf", "sgv", "sda",
+ "sdd", "vor", "svm", "wmf", "bmp", "gif", "jpg", "jpeg", "jfif", "fif",
+ "jpe", "pcd", "pcx", "pgm", "png", "ppm", "psd", "ras", "tga", "tif",
+ "tiff", "xbm", "xpm", "odg", "otg", "fodg", "odc", "odi", "sds",
+ "wpg", "svg");
+
+my @IMPRESSDOCS=("sxi", "sti", "ppt", "pps", "pot", "sxd", "sda", "sdd", "sdp",
+ "vor", "cgm", "odp", "otp", "fodp", "ppsm", "ppsx", "pptm", "pptx",
+ "potm", "potx");
+
+my @TEMPLATES=("stw", "dot", "vor", "stc", "xlt", "sti", "pot", "std", "stw",
+ "dotm", "dotx", "potm", "potx", "xltm", "xltx");
+
+my @MATHDOCS=("sxm", "smf", "mml", "odf");
+
+my @MASTERDOCS=("sxg", "odm", "sgl");
+
+my @WRITERDOCS=("doc", "dot", "rtf", "sxw", "stw", "sdw", "vor", "txt", "htm?",
+ "xml", "wp", "wpd", "wps", "odt", "ott", "fodt", "docm", "docx",
+ "dotm", "dotx");
+
+my @WEBDOCS=("htm", "html", "stw", "txt", "vor", "oth");
+
+my @BASEDOCS=("odb");
+
+my @CALCDOCS=("sxc", "stc", "dif", "dbf", "xls", "xlw", "xlt", "rtf", "sdc", "vor",
+ "slk", "txt", "htm", "html", "wk1", "wks", "123", "xml", "ods", "ots",
+ "fods", "csv", "xlsb", "xlsm", "xlsx", "xltm", "xltx");
+
+my @EXTENSIONS=("oxt");
+
+# default names of lowrappers
+# use "" if you want to disable any wrapper
+my %APPS = (
+ office => "libreoffice",
+ master => "",
+ base => "lobase",
+ calc => "localc",
+ draw => "lodraw",
+ impress => "loimpress",
+ math => "lomath",
+ template => "lofromtemplate",
+ unopkg => "unopkg",
+ web => "loweb",
+ writer => "lowriter",
+);
+
+my $office_shell_function = "_loexp_";
+
+sub usage()
+{
+ print "Script to Generate bash completion for LO wrappers\n\n";
+
+ print "Usage: $0 --help\n";
+ print " $0 [--binsuffix=suffix]\n";
+ print "\t\t[--compat-oowrappers]\n";
+ print "\t\t[--office=wrapper_name]\n";
+ print "\t\t[--master=wrapper_name]\n";
+ print "\t\t[--base=wrapper_name]\n";
+ print "\t\t[--calc=wrapper_name]\n";
+ print "\t\t[--draw=wrapper_name]\n";
+ print "\t\t[--impress=wrapper_name]\n";
+ print "\t\t[--math=wrapper_name]\n";
+ print "\t\t[--template=wrapper_name]\n";
+ print "\t\t[--unopkg=wrapper_name]\n";
+ print "\t\t[--web=wrapper_name]\n";
+ print "\t\t[--writer=wrapper_name]\n";
+ print "\t\tinput_file\n";
+ print "\t\toutput_file\n\n";
+
+ print "Options:\n";
+ print "\t--help\t\tprint this help\n";
+ print "\t--binsuffix\tdefines a suffix that is added after each wrapper\n";
+ print "\t--compat-oowrappers\tset wrapper names to the old default oo* wrapper names\n";
+
+ print "The other options allows to redefine the wrapper names.\n";
+ print "The value \"\" can be used to disable any wrapper.\n\n";
+}
+
+my $infilename;
+my $outfilename;
+my $binsuffix = '';
+
+my $opt;
+foreach my $arg (@ARGV) {
+ if ( $arg =~ /--help/ ) {
+ usage();
+ exit 0;
+ } elsif ( $arg =~ /--compat-oowrappers/ ) {
+ $APPS{'office'} = "ooffice";
+ $APPS{'master'} = "";
+ $APPS{'base'} = "oobase";
+ $APPS{'calc'} = "oocalc";
+ $APPS{'draw'} = "oodraw";
+ $APPS{'impress'} = "ooimpress";
+ $APPS{'math'} = "oomath";
+ $APPS{'template'} = "oofromtemplate";
+ $APPS{'unopkg'} = "unopkg";
+ $APPS{'web'} = "ooweb";
+ $APPS{'writer'} = "oowriter";
+ $office_shell_function = "_ooexp_";
+ } elsif ( $arg =~ /--binsuffix=(.*)/ ) {
+ $binsuffix = "$1";
+ } elsif ( $arg =~ /--office=(.*)/ ) {
+ $APPS{'office'} = "$1";
+ } elsif ( $arg =~ /--master=(.*)/ ) {
+ $APPS{'master'} = "$1";
+ } elsif ( $arg =~ /--base=(.*)/ ) {
+ $APPS{'base'} = "$1";
+ } elsif ( $arg =~ /--calc=(.*)/ ) {
+ $APPS{'calc'} = "$1";
+ } elsif ( $arg =~ /--draw=(.*)/ ) {
+ $APPS{'draw'} = "$1";
+ } elsif ( $arg =~ /--impress=(.*)/ ) {
+ $APPS{'impress'} = "$1"
+ } elsif ( $arg =~ /--math=(.*)/ ) {
+ $APPS{'math'} = "$1";
+ } elsif ( $arg =~ /--template=(.*)/ ) {
+ $APPS{'template'} = "$1";
+ } elsif ( $arg =~ /--unopkg=(.*)/ ) {
+ $APPS{'unopkg'} = "$1";
+ } elsif ( $arg =~ /--web=(.*)/ ) {
+ $APPS{'web'} = "$1";
+ } elsif ( $arg =~ /--writer=(.*)/ ) {
+ $APPS{'writer'} = "$1"
+ } elsif ( $arg =~ /^-.*/ ) {
+ printf STDERR "Error: invalid option \"$arg\", try --help\n";
+ exit 1;
+ } elsif ( $outfilename ) {
+ printf STDERR "Error: too much arguments, try --help\n";
+ exit 1;
+ } else {
+ if ($infilename) {
+ $outfilename = "$arg";
+ } else {
+ $infilename = "$arg";
+ }
+ }
+}
+
+unless ( $infilename ) {
+ printf STDERR "Error: undefined input file, try --help\n";
+ exit 1;
+}
+
+unless ( $outfilename ) {
+ printf STDERR "Error: undefined output file, try --help\n";
+ exit 1;
+}
+
+#add binsuffix
+foreach my $app (keys %APPS) {
+ $APPS{$app} .= "$binsuffix" unless ( "$APPS{$app}" eq "" );
+}
+
+sub print_suffixes_check {
+ my $app = shift(@_);
+ my $first_suffix = shift(@_);
+
+ ($first_suffix) || die "Error: No suffix defined for $app\n";
+
+ print BCOUTFILE " $app)\t\te=\'!*.+(" . $first_suffix . "|" . uc($first_suffix);
+ foreach my $suffix (@_) {
+ print BCOUTFILE "|" . $suffix;
+ print BCOUTFILE "|" . uc($suffix);
+ }
+ print BCOUTFILE ")\' ;;\n";
+}
+
+sub print_suffixes_checks {
+ foreach my $app (keys %APPS) {
+ # skip the disabled wrapper
+ next if ( $APPS{$app} eq "" );
+
+ if ($app eq "draw" ) { print_suffixes_check ($APPS{$app}, @DRAWDOCS); }
+ if ($app eq "writer") { print_suffixes_check ($APPS{$app}, @WRITERDOCS, @MASTERDOCS); }
+ if ($app eq "web") { print_suffixes_check ($APPS{$app}, @WEBDOCS); }
+ if ($app eq "math") { print_suffixes_check ($APPS{$app}, @MATHDOCS); }
+ if ($app eq "impress") { print_suffixes_check ($APPS{$app}, @IMPRESSDOCS); }
+ if ($app eq "base") { print_suffixes_check ($APPS{$app}, @BASEDOCS); }
+ if ($app eq "calc") { print_suffixes_check ($APPS{$app}, @CALCDOCS); }
+ if ($app eq "master") { print_suffixes_check ($APPS{$app}, @MASTERDOCS); }
+ if ($app eq "template") { print_suffixes_check ($APPS{$app}, @TEMPLATES); }
+ # libreoffice should contain all...
+ if ($app eq "office") { print_suffixes_check ($APPS{$app}, @DRAWDOCS, @WRITERDOCS, @MATHDOCS, @IMPRESSDOCS, @BASEDOCS, @CALCDOCS, @MASTERDOCS, @TEMPLATES, @WEBDOCS); }
+ # unopkg is a standalone tool
+ if ($app eq "unopkg") { print_suffixes_check ($APPS{$app}, @EXTENSIONS); }
+ }
+}
+
+sub print_apps {
+ my $app_to_print;
+ foreach my $app (keys %APPS) {
+ # skip the disabled wrapper
+ next if ( $APPS{$app} eq "" );
+
+ print BCOUTFILE "\t\t\t\t\t$app_to_print \\\n" if ($app_to_print);
+ $app_to_print = $APPS{$app};
+ }
+ # the last app will be printed without the final backslash
+ ($app_to_print) || die "Error: No LO wrapper was selected\n";
+ print BCOUTFILE "\t\t\t\t\t$app_to_print\n";
+}
+
+
+open (BCINFILE, "$infilename") || die "Error: can't open $infilename for reading: $!\n";
+open (BCOUTFILE, "> $outfilename") || die "Error: can't open $outfilename for writing: $!\n";
+
+while (my $line = <BCINFILE>) {
+ chomp $line;
+
+ $line =~ s/\@OFFICE_SHELL_FUNCTION\@/$office_shell_function/;
+
+ if ($line =~ m/\@BASH_COMPLETION_SUFFIXES_CHECKS\@/) {
+ print_suffixes_checks();
+ } elsif ($line =~ m/\@BASH_COMPLETION_OOO_APPS\@/) {
+ print_apps();
+ } else {
+ print BCOUTFILE "$line\n";
+ }
+}
+
+close (BCINFILE);
+close (BCOUTFILE);
diff --git a/bin/java-set-classpath.in b/bin/java-set-classpath.in
new file mode 100644
index 000000000000..539e8592fa39
--- /dev/null
+++ b/bin/java-set-classpath.in
@@ -0,0 +1,64 @@
+#!/bin/sh
+
+#*****************************************************************************
+#
+# java-set-classpath - Utility to update the default CLASSPATH for OpenOffice.org
+#
+# Initial version by: Petr Mladek <pmladek@suse.cz>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License version 2, as
+# published by the Free Software Foundation.
+#
+# 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.
+#
+#*****************************************************************************
+
+if test "z$1" = "z" ; then
+ echo "Update the default CLASSPATH for OpenOffice.org"
+ echo ""
+ echo "Usage: $0 [dir|jar]..."
+ echo ""
+ echo "The utility updates the OpenOffice.org system setting. It adds or removes"
+ echo "the given directories and jar-files to or from the default CLASSPATH"
+ echo "depending on if they are available on the system or not."
+ echo ""
+ echo "Parameters:"
+ echo " dir - absolute path to a directory"
+ echo " jar - absolute path to a jar-file"
+ exit 0;
+fi
+
+JVM_CONFIG_FILE=@OOINSTBASE@/basis-link/program/fundamentalbasisrc
+
+for path in $@ ; do
+ if test "z${path%%/*}" != "z" ; then
+ echo "Warning: the path "$path" is not absolute and will be ignored"
+ continue
+ fi
+ if test -e $path ; then
+ # the file exist
+ grep "URE_MORE_JAVA_CLASSPATH_URLS.*file:/*$path\([[:space:]].*\)\?$" $JVM_CONFIG_FILE >/dev/null && continue
+ # it is not registered
+ TMP_FILE=`mktemp /tmp/ooset-java-class.XXXXXXXXXX` || exit 1
+ sed -e "s|^\(.*URE_MORE_JAVA_CLASSPATH_URLS.*\)$|\1 file://$path|" $JVM_CONFIG_FILE >$TMP_FILE
+ mv -f $TMP_FILE $JVM_CONFIG_FILE
+ chmod 644 $JVM_CONFIG_FILE
+ else
+ # the file does not exist, remove it from the configuration
+ TMP_FILE=`mktemp /tmp/ooset-java-class.XXXXXXXXXX` || exit 1;
+ sed -e "s|^\(.*URE_MORE_JAVA_CLASSPATH_URLS.*\)file:/*$path\([[:space:]].*\)\?$|\1\2|" \
+ -e "s/\(URE_MORE_JAVA_CLASSPATH_URLS=\)[[:space:]]\+/\1/" \
+ -e "/^.*URE_MORE_JAVA_CLASSPATH_URLS/s/[[:space:]]\+/ /g" \
+ -e "/^.*URE_MORE_JAVA_CLASSPATH_URLS/s/[[:space:]]*$//" $JVM_CONFIG_FILE >$TMP_FILE
+ mv -f $TMP_FILE $JVM_CONFIG_FILE
+ chmod 644 $JVM_CONFIG_FILE
+ fi
+done
diff --git a/bin/unpack-sources b/bin/unpack-sources
new file mode 100755
index 000000000000..153b3ecf3593
--- /dev/null
+++ b/bin/unpack-sources
@@ -0,0 +1,105 @@
+#!/usr/bin/env bash
+
+# Version: MPL 1.1 / GPLv3+ / LGPLv3+
+#
+# The contents of this file are subject to the Mozilla Public License Version
+# 1.1 (the "License"); you may not use this file except in compliance with
+# the License or as specified alternatively below. You may obtain a copy of
+# the License at http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+# for the specific language governing rights and limitations under the
+# License.
+#
+# The Initial Developer of the Original Code is
+# Petr Mladek <pmladek@suse.cz>
+# Portions created by the Initial Developer are Copyright (C) 2011 the
+# Initial Developer. All Rights Reserved.
+#
+# Major Contributor(s):
+# Ted <ted@bear.com>
+# Portions created by the Ted are Copyright (C) 2010 Ted. All Rights Reserved.
+#
+# For minor contributions see the git repository.
+#
+# Alternatively, the contents of this file may be used under the terms of
+# either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+# instead of those above.
+
+usage()
+{
+ echo "Helper script to unpack the LO source tarbals"
+ echo
+ echo "Usage: ${0##*/} [--help] start-dir tarball..."
+ echo
+ echo "Options:"
+ echo
+ echo " --help this help"
+ echo " start-dir path where the sources are unpacked (bootstrap directory)"
+ echo " tarball list of LO source tarball that need to be unpacked"
+}
+
+start_dir=
+tarballs=
+
+while test -n "$1" ; do
+ case "$1" in
+ --help)
+ usage
+ exit 0;
+ ;;
+ --download)
+ download="yes"
+ ;;
+ -*)
+ echo "Error: unknown option: $1"
+ exit 1;
+ ;;
+ *)
+ if test -z "$start_dir" ; then
+ start_dir="$1"
+ else
+ tarballs="$tarballs $1"
+ fi
+ ;;
+ esac
+ shift
+done
+
+if test -z "$start_dir" ; then
+ echo "Error: Please, define where to unpack sources, try --help"
+fi
+
+if ! test -d $start_dir/src -a -f $start_dir/solenv/inc/target.mk ; then
+ echo "Error: $start_dir is not a valid bootstrap directory"
+ exit 1;
+fi
+
+if test ! -f $start_dir/bootstrap.ver -o -d $start_dir/.git ; then
+ echo "Warning: bootstrap sources are from git and not from tarball"
+ echo " Do nothing."
+ exit 0;
+fi
+
+source $start_dir/bootstrap.ver
+lo_src_dir="$start_dir/src"
+mkdir -p "$lo_src_dir"
+
+for tarball in $tarballs ; do
+ tarname=`basename $tarball | sed -e "s/.tar.bz2//"`
+ if test -d $lo_src_dir/$tarname ; then
+ echo "Warning: $lo_src_dir/$tarname already exists => skipping"
+ continue;
+ fi
+
+ echo "Unpacking $tarname..."
+ tar -xjf "$tarball" -C "$lo_src_dir"
+
+ # create symlinks
+ for dir in `find "$lo_src_dir/$tarname" -mindepth 1 -maxdepth 1 -type d -printf "$tarname/%f\n"` ; do
+ ln -sf "src/$dir" "$start_dir"
+ done
+done
diff --git a/bootstrap.1 b/bootstrap.1
index 3daa1e25321c..dcee0781f8f5 100644
--- a/bootstrap.1
+++ b/bootstrap.1
@@ -75,6 +75,6 @@ chmod +x "$SRC_ROOT/solenv/bin/gccinstlib.pl"
if [ ! -d $SRC_ROOT/src ] ; then
mkdir $SRC_ROOT/src
fi
-if [ "$DO_FETCH_TARBALLS" = "yes" ]; then
+if [ "$DO_FETCH_TARBALLS" = "YES" ]; then
$SRC_ROOT/download $SRC_ROOT/ooo.lst
fi
diff --git a/canvas/source/cairo/cairo_canvashelper.cxx b/canvas/source/cairo/cairo_canvashelper.cxx
index 2f1e39b8a19e..ebf0e1aac3e4 100644
--- a/canvas/source/cairo/cairo_canvashelper.cxx
+++ b/canvas/source/cairo/cairo_canvashelper.cxx
@@ -128,13 +128,11 @@ namespace cairocanvas
{
if( rColor.getLength() > 3 )
{
- const double alpha = rColor[3];
-
cairo_set_source_rgba( pCairo,
- alpha*rColor[0],
- alpha*rColor[1],
- alpha*rColor[2],
- alpha );
+ rColor[0],
+ rColor[1],
+ rColor[2],
+ rColor[3] );
}
else if( rColor.getLength() == 3 )
cairo_set_source_rgb( pCairo,
diff --git a/canvas/source/cairo/cairo_spritecanvashelper.cxx b/canvas/source/cairo/cairo_spritecanvashelper.cxx
index cdac16cbf8b7..75a8884df252 100644
--- a/canvas/source/cairo/cairo_spritecanvashelper.cxx
+++ b/canvas/source/cairo/cairo_spritecanvashelper.cxx
@@ -524,8 +524,8 @@ namespace cairocanvas
::cairo::SurfaceSharedPtr SpriteCanvasHelper::getCompositingSurface( const ::basegfx::B2ISize& rNeededSize )
{
- if( rNeededSize.getX() < maCompositingSurfaceSize.getX() ||
- rNeededSize.getY() < maCompositingSurfaceSize.getY() )
+ if( rNeededSize.getX() > maCompositingSurfaceSize.getX() ||
+ rNeededSize.getY() > maCompositingSurfaceSize.getY() )
{
// need to give buffer more size
mpCompositingSurface.reset();
diff --git a/configure.in b/configure.in
index 325766885a1e..18f93d270834 100755
--- a/configure.in
+++ b/configure.in
@@ -276,6 +276,18 @@ AC_ARG_ENABLE(broffice,
locale is removed, giving uniform branding.]),
,enable_broffice=no)
+AC_ARG_ENABLE(split-app-modules,
+ AS_HELP_STRING([--enable-split-app-modules],
+ [Split file lists for app modules, e.g. base, calc.
+ Has effect only with make distro-pack-install]),
+,)
+
+AC_ARG_ENABLE(split-opt-features,
+ AS_HELP_STRING([--enable-split-opt-features],
+ [Split file lists for some optional features, .e.g. pyuno, testtool.
+ Has effect only with make distro-pack-install]),
+,)
+
AC_ARG_ENABLE(cairo,
AS_HELP_STRING([--disable-cairo],
[Determines whether to use Cairo library on platforms where Cairo is
@@ -475,6 +487,12 @@ AC_ARG_ENABLE(lomenubar,
[Enable global menu support.]),
,)
+AC_ARG_ENABLE(online-update,
+ AS_HELP_STRING([--enable-online-update],
+ [Enable the online update service that will check for new versions of
+ LibreOffice. By default, it is on on Windows and Mac, and off on Linux.]),
+,)
+
dnl ===================================================================
dnl Optional Packages (--with/without-)
dnl ===================================================================
@@ -1224,6 +1242,13 @@ AC_ARG_WITH(unix-wrapper,
],
,)
+AC_ARG_WITH(compat-oowrappers,
+ AS_HELP_STRING([--with-compat-oowrappers],
+ [Install oo* wrappers in parallel with
+ lo* ones to keep backward compatibility.
+ Has effect only with make distro-pack-install]),
+,)
+
AC_ARG_WITH(asm-home,
AS_HELP_STRING([--with-asm-home],
[For Windows, please supply the path for the ml.exe or ml64.exe assembler.])
@@ -1729,7 +1754,7 @@ AC_SUBST(TARFILE_LOCATION)
if test "z$enable_fetch_external" != "zno" \
&& test -z "$with_system_libs" -a "$with_system_jars" != "no"; then
- DO_FETCH_TARBALLS="yes"
+ DO_FETCH_TARBALLS="YES"
fi
AC_SUBST(DO_FETCH_TARBALLS)
@@ -3860,7 +3885,7 @@ if test "z$enable_odk" = "z" -o "$enable_odk" != "no"; then
if echo "$WITH_MINGW" | $EGREP -q "/"; then
if ! test -x "`echo $WITH_MINGW | $SED -e s/[cg]++/strip/`"; then MINGWSTRIP=false; else MINGWSTRIP=$(basename $(echo $WITH_MINGW | $SED -e s/[cg]++/strip/)); fi
else
- AC_CHECK_TOOL(MINGWSTRIP, `echo $WITH_MINGW | $SED -e s/[cg]++/strip/`, false)
+ AC_CHECK_TOOL(MINGWSTRIP, `echo $WITH_MINGW | $SED -e s/[[[cg]]]++/strip/`, false)
fi
if test "$MINGWSTRIP" = "false"; then
AC_MSG_ERROR(MinGW32 binutils needed. Install them.)
@@ -6166,6 +6191,18 @@ else
fi
AC_SUBST(ENABLE_BROFFICE)
+SPLIT_APP_MODULES=""
+if test "$enable_split_app_modules" = "yes"; then
+ SPLIT_APP_MODULES="YES"
+fi
+AC_SUBST(SPLIT_APP_MODULES)
+
+SPLIT_OPT_FEATURES=""
+if test "$enable_split_opt_features" = "yes"; then
+ SPLIT_OPT_FEATURES="YES"
+fi
+AC_SUBST(SPLIT_OPT_FEATURES)
+
dnl ===================================================================
dnl Check whether the Cairo libraries are available.
dnl ===================================================================
@@ -7502,6 +7539,28 @@ fi
AC_SUBST(ENABLE_LOMENUBAR)
dnl ===================================================================
+dnl Test whether to enable online update service
+dnl ===================================================================
+AC_MSG_CHECKING([whether to enable online update])
+ENABLE_ONLINE_UPDATE=
+if test "z$enable_online_update" = "z" ; then
+ if test "$_os" = "WINNT" -o "$_os" = "Darwin" ; then
+ AC_MSG_RESULT([yes])
+ ENABLE_ONLINE_UPDATE="TRUE"
+ else
+ AC_MSG_RESULT([no])
+ fi
+else
+ if test "z$enable_online_update" = "zyes" ; then
+ AC_MSG_RESULT([yes])
+ ENABLE_ONLINE_UPDATE="TRUE"
+ else
+ AC_MSG_RESULT([no])
+ fi
+fi
+AC_SUBST(ENABLE_ONLINE_UPDATE)
+
+dnl ===================================================================
dnl Test whether to enable ActiveX embedding
dnl ===================================================================
if test "$_os" = "WINNT"; then
@@ -7806,6 +7865,14 @@ fi
AC_SUBST(OOO_JUNIT_JAR)
dnl ===================================================================
+dnl Product version
+dnl ===================================================================
+AC_MSG_CHECKING([for product version])
+[eval $(sed -n -e 's/ //g' -e '/PRODUCTVERSION=/p' solenv/inc/productversion.mk)]
+AC_MSG_RESULT([$PRODUCTVERSION])
+AC_SUBST(PRODUCTVERSION)
+
+dnl ===================================================================
dnl Dealing with l10n options
dnl ===================================================================
GIT_REPO_NAMES="artwork base calc components extensions extras filters help impress libs-core libs-extern libs-extern-sys libs-gui postprocess sdk testing ure writer"
@@ -7837,8 +7904,11 @@ for lang in $WITH_LANG ; do
test `echo "$all_langs" | sed "s|.* $lang .*|found|"` = "found" && continue;
AC_MSG_ERROR([invalid language: $lang; supported languages are: $ALL_LANGS])
done
+# list with substituted ALL
+WITH_LANG_LIST=`echo $WITH_LANG | sed "s/ALL/$ALL_LANGS/"`
AC_SUBST(ALL_LANGS)
AC_SUBST(WITH_LANG)
+AC_SUBST(WITH_LANG_LIST)
AC_SUBST(GIT_REPO_NAMES)
AC_MSG_CHECKING([for another 'intro' bitmap])
@@ -7889,13 +7959,58 @@ else
fi
AC_SUBST(UNIXWRAPPERNAME)
-INSTALL_DIRNAME=`echo AC_PACKAGE_NAME | tr [[:upper:]] [[:lower:]]`
+AC_MSG_CHECKING([whether to install the compat oo* wrappers])
+if test "$with_compat_oowrappers" = "yes" ; then
+ WITH_COMPAT_OOWRAPPERS=YES
+ AC_MSG_RESULT(yes)
+else
+ WITH_COMPAT_OOWRAPPERS=
+ AC_MSG_RESULT(no)
+fi
+AC_SUBST(WITH_COMPAT_OOWRAPPERS)
+
+AC_MSG_CHECKING([for product name])
+PRODUCTNAME=AC_PACKAGE_NAME
+AC_MSG_RESULT([$PRODUCTNAME])
+AC_SUBST(PRODUCTNAME)
+
+INSTALLDIRNAME=`echo AC_PACKAGE_NAME | tr [[:upper:]] [[:lower:]]`
AC_MSG_CHECKING([for install dirname])
if test -n "$with_install_dirname" -a "$with_install_dirname" != "no" -a "$with_install_dirname" != "yes" ; then
- INSTALL_DIRNAME="$with_install_dirname"
-fi
-AC_MSG_RESULT([$INSTALL_DIRNAME])
-AC_SUBST(INSTALL_DIRNAME)
+ INSTALLDIRNAME="$with_install_dirname"
+fi
+AC_MSG_RESULT([$INSTALLDIRNAME])
+AC_SUBST(INSTALLDIRNAME)
+
+AC_MSG_CHECKING([for prefix])
+PREFIXDIR="$prefix"
+AC_MSG_RESULT([$PREFIXDIR])
+AC_SUBST(PREFIXDIR)
+
+AC_MSG_CHECKING([for libdir])
+LIBDIR=[$(eval echo $(eval echo $libdir))]
+AC_MSG_RESULT([$LIBDIR])
+AC_SUBST(LIBDIR)
+
+AC_MSG_CHECKING([for data dir])
+DATADIR=[$(eval echo $(eval echo $datadir))]
+AC_MSG_RESULT([$DATADIR])
+AC_SUBST(DATADIR)
+
+AC_MSG_CHECKING([for man dir])
+MANDIR=[$(eval echo $(eval echo $mandir))]
+AC_MSG_RESULT([$MANDIR])
+AC_SUBST(MANDIR)
+
+AC_MSG_CHECKING([for doc dir])
+DOCDIR=[$(eval echo $(eval echo $docdir))]
+AC_MSG_RESULT([$DOCDIR])
+AC_SUBST(DOCDIR)
+
+AC_MSG_CHECKING([for install dir])
+INSTALLDIR="$LIBDIR/$INSTALLDIRNAME"
+AC_MSG_RESULT([$INSTALLDIR])
+AC_SUBST(INSTALLDIR)
AC_MSG_CHECKING([whether to statically link to Gtk])
if test -n "$enable_static_gtk" && test "$enable_static_gtk" != "no"; then
diff --git a/cui/source/customize/acccfg.cxx b/cui/source/customize/acccfg.cxx
index 4b955b653cd4..9436944924eb 100644
--- a/cui/source/customize/acccfg.cxx
+++ b/cui/source/customize/acccfg.cxx
@@ -1041,7 +1041,7 @@ IMPL_LINK( SfxAcceleratorConfigPage, Load, Button*, EMPTYARG )
//-----------------------------------------------
IMPL_LINK( SfxAcceleratorConfigPage, Save, Button*, EMPTYARG )
{
- StartFileDialog( WB_SAVEAS | WB_STDMODAL | WB_3DLOOK, aLoadAccelConfigStr );
+ StartFileDialog( WB_SAVEAS | WB_STDMODAL | WB_3DLOOK, aSaveAccelConfigStr );
return 0;
}
diff --git a/cui/source/options/optchart.cxx b/cui/source/options/optchart.cxx
index 177db9a414c3..13b861f07187 100644
--- a/cui/source/options/optchart.cxx
+++ b/cui/source/options/optchart.cxx
@@ -234,7 +234,7 @@ IMPL_LINK( SvxDefaultColorOptPage, RemoveChartColor, PushButton*, pButton )
if( pColorConfig )
{
- DBG_ASSERT(pColorConfig.size() > 1, "don't delete the last chart color");
+ OSL_ENSURE(pColorConfig->GetColorTable().size() > 1, "don't delete the last chart color");
QueryBox aQuery(pButton, CUI_RES(RID_OPTQB_COLOR_CHART_DELETE));
aQuery.SetText(String(CUI_RES(RID_OPTSTR_COLOR_CHART_DELETE)));
if(RET_YES == aQuery.Execute())
diff --git a/dbaccess/source/ui/app/AppController.cxx b/dbaccess/source/ui/app/AppController.cxx
index ee242ea29d33..98852706f5d1 100644
--- a/dbaccess/source/ui/app/AppController.cxx
+++ b/dbaccess/source/ui/app/AppController.cxx
@@ -1936,7 +1936,8 @@ Reference< XComponent > OApplicationController::openElementWithArguments( const
IMPL_LINK( OApplicationController, OnSelectContainer, void*, _pType )
{
ElementType eType = (ElementType)reinterpret_cast< sal_IntPtr >( _pType );
- getContainer()->selectContainer(eType);
+ if (getContainer())
+ getContainer()->selectContainer(eType);
return 0L;
}
// -----------------------------------------------------------------------------
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index 22ac1988636b..21332440c33d 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -1767,7 +1767,7 @@ int Desktop::Main()
if ( !pExecGlobals->bRestartRequested )
{
- if ((!pCmdLineArgs->WantsToLoadDocument() && !pCmdLineArgs->IsInvisible() && !pCmdLineArgs->IsHeadless() ) &&
+ if ((!pCmdLineArgs->WantsToLoadDocument() && !pCmdLineArgs->IsInvisible() && !pCmdLineArgs->IsHeadless() && !pCmdLineArgs->IsQuickstart()) &&
(SvtModuleOptions().IsModuleInstalled(SvtModuleOptions::E_SSTARTMODULE)) &&
(!bExistsRecoveryData ) &&
(!bExistsSessionData ) &&
diff --git a/desktop/source/app/dispatchwatcher.cxx b/desktop/source/app/dispatchwatcher.cxx
index e575ea8f3727..aff73d0984e3 100644
--- a/desktop/source/app/dispatchwatcher.cxx
+++ b/desktop/source/app/dispatchwatcher.cxx
@@ -33,6 +33,7 @@
#include <sfx2/docfilt.hxx>
#include <sfx2/fcontnr.hxx>
#include "osl/file.hxx"
+#include "sfx2/app.hxx"
#include <svl/fstathelper.hxx>
#include "dispatchwatcher.hxx"
@@ -96,10 +97,14 @@ static String impl_GetFilterFromExt( OUString aUrl, SfxFilterFlags nFlags,
SfxMedium* pMedium = new SfxMedium( aUrl,
STREAM_STD_READ, sal_False );
const SfxFilter *pSfxFilter = NULL;
- SfxFilterMatcher aMatcher;
if( nFlags == SFX_FILTER_EXPORT )
- aMatcher = SfxFilterMatcher( aAppl );
- aMatcher.GuessFilterIgnoringContent( *pMedium, &pSfxFilter, nFlags, 0 );
+ {
+ SfxFilterMatcher( aAppl ).GuessFilterIgnoringContent( *pMedium, &pSfxFilter, nFlags, 0 );
+ }
+ else
+ {
+ SFX_APP()->GetFilterMatcher().GuessFilter( *pMedium, &pSfxFilter, nFlags, 0 );
+ }
if( pSfxFilter )
aFilter = ( nFlags == SFX_FILTER_EXPORT ) ? pSfxFilter->GetFilterName() :
pSfxFilter->GetServiceName();
diff --git a/distro-configs/LibreOfficeMacOSX.conf b/distro-configs/LibreOfficeMacOSX.conf
index 1fb7e4ed54e0..67bf7c2f9138 100644
--- a/distro-configs/LibreOfficeMacOSX.conf
+++ b/distro-configs/LibreOfficeMacOSX.conf
@@ -2,6 +2,7 @@
--enable-epm
--enable-binfilter
--with-java-target-version=1.5
+--disable-online-update
--enable-ext-presenter-minimizer
--enable-ext-presenter-console
--enable-ext-pdfimport
diff --git a/distro-configs/LibreOfficeOpenBSD.conf b/distro-configs/LibreOfficeOpenBSD.conf
index 6e28d69983a3..910214ee6ba8 100644
--- a/distro-configs/LibreOfficeOpenBSD.conf
+++ b/distro-configs/LibreOfficeOpenBSD.conf
@@ -1,6 +1,7 @@
--disable-build-mozilla
--disable-dbus
--disable-epm
+--disable-gnome-vfs
--disable-kde
--disable-kde4
--disable-mozilla
@@ -11,8 +12,6 @@
--disable-unix-qstart-libpng
--disable-xrender-link
--enable-binfilter
---enable-cairo
---enable-gnome-vfs
--enable-gstreamer
--enable-lockdown
--enable-ext-presenter-minimizer
@@ -20,6 +19,7 @@
--enable-ext-presenter-console
--enable-ext-report-builder
--enable-ext-wiki-publisher
+--enable-python=system
--with-alloc=system
--with-ant-home=/usr/local/ant
--with-extension-integration
@@ -45,7 +45,6 @@
--with-system-neon
--with-system-openssl
--with-system-poppler
---with-system-python
--with-system-redland
--with-system-stdlibs
--with-system-xrender-headers
diff --git a/distro-configs/LibreOfficeWin32.conf b/distro-configs/LibreOfficeWin32.conf
index acc632080365..4ce461c7e98c 100644
--- a/distro-configs/LibreOfficeWin32.conf
+++ b/distro-configs/LibreOfficeWin32.conf
@@ -7,6 +7,7 @@
--with-java-target-version=1.5
--disable-xrender-link
--disable-activex-component
+--disable-online-update
--enable-binfilter
--enable-ext-scripting-beanshell
--enable-ext-scripting-javascript
diff --git a/download b/download
index e2c209ef18d7..a322936a774b 100755
--- a/download
+++ b/download
@@ -212,14 +212,7 @@ if [ -f $start_dir/bootstrap.ver -a ! -d $start_dir/.git ] ; then
if [ ! -f "$TARFILE_LOCATION/$tarname.tar.bz2" ] ; then
downloaditem "http://download.documentfoundation.org/libreoffice/src/" "$tarname.tar.bz2" ""
fi
- if [ ! -d $lo_src_dir/$tarname ] ; then
- echo "Unpacking $tarname.tar.bz2..."
- tar -xf "$TARFILE_LOCATION/$tarname.tar.bz2" -C "$lo_src_dir"
- fi
- # create symlinks
- for dir in `find "$lo_src_dir/$tarname" -mindepth 1 -maxdepth 1 -type d` ; do
- ln -sf "$dir" "$start_dir"
- done
+ $start_dir/bin/unpack-sources $start_dir $TARFILE_LOCATION/$tarname.tar.bz2
done
fi
diff --git a/extensions/source/update/check/Jobs.xcu b/extensions/source/update/check/Jobs.xcu
index ed324650c66f..840d630698cb 100644
--- a/extensions/source/update/check/Jobs.xcu
+++ b/extensions/source/update/check/Jobs.xcu
@@ -8,7 +8,7 @@
</prop>
<node oor:name="Arguments">
<prop oor:name="AutoCheckEnabled" oor:type="xs:boolean" oor:op="replace">
- <value>false</value>
+ <value>true</value>
</prop>
<prop oor:name="LastCheck" oor:type="xs:long" oor:op="replace">
<value>0</value>
diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx
index d9bf8632abe9..790f95055541 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -4672,7 +4672,7 @@ SdrObject* SvxMSDffManager::ImportGroup( const DffRecordHeader& rHd, SvStream& r
aRecHd2.SeekToBegOfRecord( rSt );
sal_Int32 nShapeId;
SdrObject* pTmp = ImportGroup( aRecHd2, rSt, pClientData, aGroupClientAnchor, aGroupChildAnchor, nCalledByGroup + 1, &nShapeId );
- if ( pTmp )
+ if ( pTmp && pRet && ((SdrObjGroup*)pRet)->GetSubList() )
{
((SdrObjGroup*)pRet)->GetSubList()->NbcInsertObject( pTmp );
if( nShapeId )
@@ -4684,7 +4684,7 @@ SdrObject* SvxMSDffManager::ImportGroup( const DffRecordHeader& rHd, SvStream& r
aRecHd2.SeekToBegOfRecord( rSt );
sal_Int32 nShapeId;
SdrObject* pTmp = ImportShape( aRecHd2, rSt, pClientData, aClientRect, aGlobalChildRect, nCalledByGroup + 1, &nShapeId );
- if ( pTmp )
+ if ( pTmp && pRet && ((SdrObjGroup*)pRet)->GetSubList())
{
((SdrObjGroup*)pRet)->GetSubList()->NbcInsertObject( pTmp );
if( nShapeId )
diff --git a/filter/source/msfilter/mstoolbar.cxx b/filter/source/msfilter/mstoolbar.cxx
index 43e37650dbdd..398d281088f5 100644
--- a/filter/source/msfilter/mstoolbar.cxx
+++ b/filter/source/msfilter/mstoolbar.cxx
@@ -421,7 +421,7 @@ WString::Read( SvStream *pS )
{
OSL_TRACE("WString::Read() stream pos 0x%x", pS->Tell() );
nOffSet = pS->Tell();
- sal_Int8 nChars = 0;
+ sal_uInt8 nChars = 0;
*pS >> nChars;
sString = readUnicodeString( pS, nChars );
return true;
diff --git a/formula/inc/formula/token.hxx b/formula/inc/formula/token.hxx
index b47147d833e8..c859a9bde7fc 100644
--- a/formula/inc/formula/token.hxx
+++ b/formula/inc/formula/token.hxx
@@ -299,14 +299,16 @@ class FORMULA_DLLPUBLIC FormulaIndexToken : public FormulaToken
{
private:
sal_uInt16 nIndex;
+ bool mbGlobal;
public:
- FormulaIndexToken( OpCode e, sal_uInt16 n ) :
- FormulaToken( svIndex, e ), nIndex( n ) {}
+ FormulaIndexToken( OpCode e, sal_uInt16 n, bool bGlobal = true ) :
+ FormulaToken( svIndex, e ), nIndex( n ), mbGlobal( bGlobal ) {}
FormulaIndexToken( const FormulaIndexToken& r ) :
- FormulaToken( r ), nIndex( r.nIndex ) {}
+ FormulaToken( r ), nIndex( r.nIndex ), mbGlobal( r.mbGlobal ) {}
virtual FormulaToken* Clone() const { return new FormulaIndexToken(*this); }
- virtual sal_uInt16 GetIndex() const;
+ virtual sal_uInt16 GetIndex() const;
+ virtual sal_uInt8 GetByte() const;
virtual void SetIndex( sal_uInt16 n );
virtual bool operator==( const FormulaToken& rToken ) const;
};
diff --git a/formula/source/core/api/token.cxx b/formula/source/core/api/token.cxx
index cec4f58ee9dd..5012c57e089a 100644
--- a/formula/source/core/api/token.cxx
+++ b/formula/source/core/api/token.cxx
@@ -298,7 +298,7 @@ bool FormulaTokenArray::AddFormulaToken(const sheet::FormulaToken& _aToken,Exter
{
// long is svIndex, used for name / database area, or "byte" for spaces
sal_Int32 nValue = _aToken.Data.get<sal_Int32>();
- if ( eOpCode == ocName || eOpCode == ocDBArea )
+ if ( eOpCode == ocDBArea )
AddToken( formula::FormulaIndexToken( eOpCode, static_cast<sal_uInt16>(nValue) ) );
else if ( eOpCode == ocSpaces )
AddToken( formula::FormulaByteToken( ocSpaces, static_cast<sal_uInt8>(nValue) ) );
@@ -1326,6 +1326,7 @@ bool FormulaStringOpToken::operator==( const FormulaToken& r ) const
}
sal_uInt16 FormulaIndexToken::GetIndex() const { return nIndex; }
+sal_uInt8 FormulaIndexToken::GetByte() const {return static_cast<sal_uInt8>(mbGlobal); }
void FormulaIndexToken::SetIndex( sal_uInt16 n ) { nIndex = n; }
bool FormulaIndexToken::operator==( const FormulaToken& r ) const
{
diff --git a/instsetoo_native/util/makefile.mk b/instsetoo_native/util/makefile.mk
index d4fa58a1698b..2f0dd9e37dea 100644
--- a/instsetoo_native/util/makefile.mk
+++ b/instsetoo_native/util/makefile.mk
@@ -89,10 +89,18 @@ ALLTAR : $(LOCALPYFILES)
.ELSE # "$(GUI)"!="WNT" && "$(EPM)"=="NO" && "$(USE_PACKAGER)"==""
.IF "$(UPDATER)"=="" || "$(USE_PACKAGER)"==""
.IF "$(BUILD_TYPE)"=="$(BUILD_TYPE:s/ODK//)"
+.IF "$(GUI)"=="WNT"
+ALLTAR : openofficeall ooohelppack
+.ELSE
ALLTAR : openoffice_$(defaultlangiso) ooolanguagepack $(eq,$(OS),MACOSX $(NULL) ooohelppack)
+.ENDIF
+.ELSE
+.IF "$(GUI)"=="WNT"
+ALLTAR : openofficeall ooohelppack sdkooall
.ELSE
ALLTAR : openoffice_$(defaultlangiso) ooolanguagepack $(eq,$(OS),MACOSX $(NULL) ooohelppack) sdkoo_en-US ure_en-US
.ENDIF
+.ENDIF
.ELSE # "$(UPDATER)"=="" || "$(USE_PACKAGER)"==""
ALLTAR : updatepack
.ENDIF # "$(UPDATER)"=="" || "$(USE_PACKAGER)"==""
diff --git a/instsetoo_native/util/openoffice.lst b/instsetoo_native/util/openoffice.lst
index 67b8b8ab9764..44fc23c2c2cb 100644
--- a/instsetoo_native/util/openoffice.lst
+++ b/instsetoo_native/util/openoffice.lst
@@ -5,8 +5,8 @@ Globals
variables
{
OOOBASEVERSION 3.4
- OOOPACKAGEVERSION 3.4.1
- UREPACKAGEVERSION 3.4.1
+ OOOPACKAGEVERSION 3.4.2
+ UREPACKAGEVERSION 3.4.2
URELAYERVERSION 1
BASISROOTNAME LibreOffice
UNIXBASISROOTNAME libreoffice3.4
@@ -62,7 +62,7 @@ LibreOffice
POSTVERSIONEXTENSIONUNIX
BRANDPACKAGEVERSION 3.4
USERDIRPRODUCTVERSION 3
- ABOUTBOXPRODUCTVERSION 3.4.1
+ ABOUTBOXPRODUCTVERSION 3.4.2
BASEPRODUCTVERSION 3.4
PCPFILENAME openoffice.pcp
UPDATEURL http://update.libreoffice.org/ProductUpdateService/check.Update
@@ -74,7 +74,7 @@ LibreOffice
FILEFORMATNAME OpenOffice.org
FILEFORMATVERSION 1.0
WRITERCOMPATIBILITYVERSIONOOO11 OpenOffice.org 1.1
- PACKAGEVERSION 3.4.1
+ PACKAGEVERSION 3.4.2
PACKAGEREVISION {buildid}
LICENSENAME LGPL
GLOBALFILEGID gid_File_Lib_Vcl
@@ -130,7 +130,7 @@ LibreOffice_wJRE
POSTVERSIONEXTENSIONUNIX
BRANDPACKAGEVERSION 3.4
USERDIRPRODUCTVERSION 3
- ABOUTBOXPRODUCTVERSION 3.4.1
+ ABOUTBOXPRODUCTVERSION 3.4.2
BASEPRODUCTVERSION 3.4
UPDATEURL http://update.libreoffice.org/ProductUpdateService/check.Update
ODFNOTIFYURL http://odfnotify.libreoffice.org/OOo3.0/notification.jsp?version=ODF
@@ -141,7 +141,7 @@ LibreOffice_wJRE
FILEFORMATNAME OpenOffice.org
FILEFORMATVERSION 1.0
WRITERCOMPATIBILITYVERSIONOOO11 OpenOffice.org 1.1
- PACKAGEVERSION 3.4.1
+ PACKAGEVERSION 3.4.2
PACKAGEREVISION {buildid}
LICENSENAME LGPL
WITHJREPRODUCT 1
@@ -196,7 +196,7 @@ LibreOffice_Dev
POSTVERSIONEXTENSIONUNIX
BRANDPACKAGEVERSION 3.4
USERDIRPRODUCTVERSION 3
- ABOUTBOXPRODUCTVERSION 3.4.1
+ ABOUTBOXPRODUCTVERSION 3.4.2
BASEPRODUCTVERSION 3.4
DEVELOPMENTPRODUCT 1
BASISPACKAGEPREFIX libobasis-dev
@@ -211,7 +211,7 @@ LibreOffice_Dev
FILEFORMATNAME OpenOffice.org
FILEFORMATVERSION 1.0
WRITERCOMPATIBILITYVERSIONOOO11 OpenOffice.org 1.1
- PACKAGEVERSION 3.4.1
+ PACKAGEVERSION 3.4.2
PACKAGEREVISION {buildid}
LICENSENAME LGPL
GLOBALFILEGID gid_File_Lib_Vcl
@@ -309,7 +309,7 @@ LibreOffice_SDK
POSTVERSIONEXTENSION SDK
POSTVERSIONEXTENSIONUNIX sdk
BRANDPACKAGEVERSION 3.4
- PACKAGEVERSION 3.4.1
+ PACKAGEVERSION 3.4.2
PACKAGEREVISION {buildid}
PACK_INSTALLED 1
POOLPRODUCT 0
@@ -357,7 +357,7 @@ LibreOffice_Dev_SDK
POSTVERSIONEXTENSION SDK
POSTVERSIONEXTENSIONUNIX sdk
BRANDPACKAGEVERSION 3.4
- PACKAGEVERSION 3.4.1
+ PACKAGEVERSION 3.4.2
PACKAGEREVISION {buildid}
BASISPACKAGEPREFIX libobasis-dev
UREPACKAGEPREFIX lodev
@@ -408,7 +408,7 @@ OxygenOffice
POSTVERSIONEXTENSIONUNIX
BRANDPACKAGEVERSION 3.4
USERDIRPRODUCTVERSION 3
- ABOUTBOXPRODUCTVERSION 3.4.1
+ ABOUTBOXPRODUCTVERSION 3.4.2
BASEPRODUCTVERSION 3.4
PCPFILENAME openoffice.pcp
UPDATEURL http://update.libreoffice.org/ProductUpdateService/check.Update
@@ -420,7 +420,7 @@ OxygenOffice
FILEFORMATNAME OpenOffice.org
FILEFORMATVERSION 1.0
WRITERCOMPATIBILITYVERSIONOOO11 OpenOffice.org 1.1
- PACKAGEVERSION 3.4.1
+ PACKAGEVERSION 3.4.2
PACKAGEREVISION {buildid}
LICENSENAME LGPL
SERVICESPROJEKT 1
@@ -478,7 +478,7 @@ OxygenOffice_wJRE
POSTVERSIONEXTENSIONUNIX
BRANDPACKAGEVERSION 3.4
USERDIRPRODUCTVERSION 3
- ABOUTBOXPRODUCTVERSION 3.4.1
+ ABOUTBOXPRODUCTVERSION 3.4.2
BASEPRODUCTVERSION 3.4
UPDATEURL http://update.libreoffice.org/ProductUpdateService/check.Update
ODFNOTIFYURL http://odfnotify.libreoffice.org/OOo3.0/notification.jsp?version=ODF
@@ -489,7 +489,7 @@ OxygenOffice_wJRE
FILEFORMATNAME OpenOffice.org
FILEFORMATVERSION 1.0
WRITERCOMPATIBILITYVERSIONOOO11 OpenOffice.org 1.1
- PACKAGEVERSION 3.4.1
+ PACKAGEVERSION 3.4.2
PACKAGEREVISION {buildid}
LICENSENAME LGPL
SERVICESPROJEKT 1
diff --git a/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.cxx b/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.cxx
index 8324c4fcba0b..2e01a350822f 100644
--- a/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.cxx
+++ b/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.cxx
@@ -487,7 +487,7 @@ Reference< XHyphenatedWord > SAL_CALL Hyphenator::hyphenate( const ::rtl::OUStri
}
case CAPTYPE_INITCAP:
{
- if (nHyphenationPosAlt == 0)
+ if (nHyphenationPosAlt == -1)
repHyph = makeInitCap(repHyphlow, pCC);
else
repHyph = repHyphlow;
diff --git a/odk/settings/settings.mk b/odk/settings/settings.mk
index bbd18eeeef4a..e4fc05ada699 100644
--- a/odk/settings/settings.mk
+++ b/odk/settings/settings.mk
@@ -502,11 +502,9 @@ PLATFORM=kfreebsd
ifeq "$(PROCTYPE)" "x86_64"
PACKAGE_LIB_DIR=kfreebsd_x86_64.plt
UNOPKG_PLATFORM=kFreeBSD_x86_64
-STLPORT=no
else
PACKAGE_LIB_DIR=kfreebsd_x86.plt
UNOPKG_PLATFORM=kFreeBSD_x86
-STLPORT=no
endif
else
PLATFORM=freebsd
@@ -570,10 +568,6 @@ CPPUHELPERLIB=-luno_cppuhelper$(COMID)
SALHELPERLIB=-luno_salhelper$(COMID)
REGLIB=-lreg
STORELIB=-lstore
-ifeq "$(STLPORT)" "yes"
-endif
-else
-STLPORTLIB=
EMPTYSTRING=
PATH_SEPARATOR=:
diff --git a/odk/settings/stdtarget.mk b/odk/settings/stdtarget.mk
index ba99722d11fe..938ab34212fc 100644
--- a/odk/settings/stdtarget.mk
+++ b/odk/settings/stdtarget.mk
@@ -10,7 +10,8 @@ endif
install: $(REGISTERFLAG)
$(SDKTYPEFLAG): #$(URE_TYPES) $(OFFICE_TYPES)
- -$(MKDIR) $(subst /,$(PS),$(@D))
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$(SDKTYPEFLAG)))
- $(CPPUMAKER) -Gc -BUCR -O$(OUT_INC) $(URE_TYPES) $(OFFICE_TYPES)
- echo flagged > $@
+# This is a makefile for a standard Make, so must be TABs below
+ -$(MKDIR) $(subst /,$(PS),$(@D))
+ -$(DEL) $(subst \\,\,$(subst /,$(PS),$(SDKTYPEFLAG)))
+ $(CPPUMAKER) -Gc -BUCR -O$(OUT_INC) $(URE_TYPES) $(OFFICE_TYPES)
+ echo flagged > $@
diff --git a/offapi/com/sun/star/sheet/NameToken.idl b/offapi/com/sun/star/sheet/NameToken.idl
new file mode 100644
index 000000000000..5bd57d66f40f
--- /dev/null
+++ b/offapi/com/sun/star/sheet/NameToken.idl
@@ -0,0 +1,53 @@
+/*
+ * Version: MPL 1.1 / GPLv3+ / LGPLv3+
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License or as specified alternatively below. You may obtain a copy of
+ * the License at http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Initial Developer of the Original Code is
+ * Markus Mohrhard <markus.mohrhard@googlemail.com>
+ * Portions created by the Initial Developer are Copyright (C) 2010 the
+ * Initial Developer. All Rights Reserved.
+ *
+ * Major Contributor(s):
+ *
+ * For minor contributions see the git repository.
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+ * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+ * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+ * instead of those above.
+ */
+
+#ifndef __com_sun_star_sheet_NameToken_idl__
+#define __com_sun_star_sheet_NameToken_idl__
+
+//=============================================================================
+
+module com { module sun { module star { module sheet {
+
+//=============================================================================
+
+/** contains the information regarding named tokens
+ */
+struct NameToken
+{
+ long Index;
+
+ boolean Global;
+};
+
+//=============================================================================
+
+}; }; }; };
+
+#endif
+
diff --git a/offapi/com/sun/star/sheet/makefile.mk b/offapi/com/sun/star/sheet/makefile.mk
index 10bb43d23173..26901cb64b22 100644
--- a/offapi/com/sun/star/sheet/makefile.mk
+++ b/offapi/com/sun/star/sheet/makefile.mk
@@ -166,6 +166,7 @@ IDLFILES=\
NamedRangeFlag.idl\
NamedRanges.idl\
NamedRangesEnumeration.idl\
+ NameToken.idl\
NoConvergenceException.idl\
PasteOperation.idl\
RangeSelectionArguments.idl\
diff --git a/oox/inc/oox/core/filterdetect.hxx b/oox/inc/oox/core/filterdetect.hxx
index f28af86eea37..39b8abe8efb9 100644
--- a/oox/inc/oox/core/filterdetect.hxx
+++ b/oox/inc/oox/core/filterdetect.hxx
@@ -59,7 +59,7 @@ namespace core {
class FilterDetectDocHandler : public ::cppu::WeakImplHelper1< ::com::sun::star::xml::sax::XFastDocumentHandler >
{
public:
- explicit FilterDetectDocHandler( ::rtl::OUString& rFilter );
+ explicit FilterDetectDocHandler( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext, ::rtl::OUString& rFilter );
virtual ~FilterDetectDocHandler();
// XFastDocumentHandler
@@ -91,6 +91,7 @@ private:
::rtl::OUString& mrFilterName;
ContextVector maContextStack;
::rtl::OUString maTargetPath;
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > mxContext;
};
// ============================================================================
@@ -167,4 +168,4 @@ private:
#endif
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ \ No newline at end of file
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/core/filterdetect.cxx b/oox/source/core/filterdetect.cxx
index c15c9f8db410..46885bdb3a4a 100644
--- a/oox/source/core/filterdetect.cxx
+++ b/oox/source/core/filterdetect.cxx
@@ -39,6 +39,7 @@
#include "oox/helper/binaryoutputstream.hxx"
#include "oox/helper/zipstorage.hxx"
#include "oox/ole/olestorage.hxx"
+#include <com/sun/star/uri/UriReferenceFactory.hpp>
namespace oox {
namespace core {
@@ -57,8 +58,8 @@ using ::rtl::OUString;
// ============================================================================
-FilterDetectDocHandler::FilterDetectDocHandler( OUString& rFilterName ) :
- mrFilterName( rFilterName )
+FilterDetectDocHandler::FilterDetectDocHandler( const Reference< XComponentContext >& rxContext, OUString& rFilterName ) :
+ mrFilterName( rFilterName ), mxContext( rxContext )
{
maContextStack.reserve( 2 );
}
@@ -163,7 +164,24 @@ void FilterDetectDocHandler::parseRelationship( const AttributeList& rAttribs )
{
OUString aType = rAttribs.getString( XML_Type, OUString() );
if( aType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" ) ) )
- maTargetPath = OUString( sal_Unicode( '/' ) ) + rAttribs.getString( XML_Target, OUString() );
+ {
+ Reference< com::sun::star::uri::XUriReferenceFactory > xFac = com::sun::star::uri::UriReferenceFactory::create( mxContext );
+ try
+ {
+ // use '/' to representent the root of the zip package ( and provide a 'file' scheme to
+ // keep the XUriReference implementation happy )
+ Reference< com::sun::star::uri::XUriReference > xBase = xFac->parse( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("file:///" ) ) );
+
+ Reference< com::sun::star::uri::XUriReference > xPart = xFac->parse( rAttribs.getString( XML_Target, OUString() ) );
+ Reference< com::sun::star::uri::XUriReference > xAbs = xFac->makeAbsolute( xBase, xPart, sal_True, com::sun::star::uri::RelativeUriExcessParentSegments_RETAIN );
+
+ if ( xAbs.is() )
+ maTargetPath = xAbs->getPath();
+ }
+ catch( Exception& e)
+ {
+ }
+ }
}
OUString FilterDetectDocHandler::getFilterNameFromContentType( const OUString& rContentType ) const
@@ -663,7 +681,7 @@ OUString SAL_CALL FilterDetect::detect( Sequence< PropertyValue >& rMediaDescSeq
aParser.registerNamespace( NMSP_packageRel );
aParser.registerNamespace( NMSP_officeRel );
aParser.registerNamespace( NMSP_packageContentTypes );
- aParser.setDocumentHandler( new FilterDetectDocHandler( aFilterName ) );
+ aParser.setDocumentHandler( new FilterDetectDocHandler( mxContext, aFilterName ) );
/* Parse '_rels/.rels' to get the target path and '[Content_Types].xml'
to determine the content type of the part at the target path. */
@@ -671,7 +689,7 @@ OUString SAL_CALL FilterDetect::detect( Sequence< PropertyValue >& rMediaDescSeq
aParser.parseStream( aZipStorage, CREATE_OUSTRING( "[Content_Types].xml" ) );
}
}
- catch( Exception& )
+ catch( Exception& e )
{
}
diff --git a/oox/source/drawingml/chart/axisconverter.cxx b/oox/source/drawingml/chart/axisconverter.cxx
index 2225d7f5ae27..d07d28c79ae8 100644
--- a/oox/source/drawingml/chart/axisconverter.cxx
+++ b/oox/source/drawingml/chart/axisconverter.cxx
@@ -315,7 +315,11 @@ void AxisConverter::convertFromModel( const Reference< XCoordinateSystem >& rxCo
// number format ------------------------------------------------------
if( (aScaleData.AxisType == cssc2::AxisType::REALNUMBER) || (aScaleData.AxisType == cssc2::AxisType::PERCENT) )
+ {
+ if( mrModel.maNumberFormat.maFormatCode.indexOfAsciiL("%",1) >= 0)
+ mrModel.maNumberFormat.mbSourceLinked = false;
getFormatter().convertNumberFormat( aAxisProp, mrModel.maNumberFormat );
+ }
// position of crossing axis ------------------------------------------
diff --git a/oox/source/drawingml/chart/chartconverter.cxx b/oox/source/drawingml/chart/chartconverter.cxx
index e66eca6bc0e2..261494327efd 100644
--- a/oox/source/drawingml/chart/chartconverter.cxx
+++ b/oox/source/drawingml/chart/chartconverter.cxx
@@ -59,7 +59,7 @@ static const sal_Unicode API_TOKEN_ARRAY_CLOSE = '}';
static const sal_Unicode API_TOKEN_ARRAY_ROWSEP = '|';
static const sal_Unicode API_TOKEN_ARRAY_COLSEP = ';';
-// Code similar to oox/source/xls/FormulaParser.cxx
+// Code similar to oox/source/xls/formulabase.cxx
static OUString lclGenerateApiString( const OUString& rString )
{
OUString aRetString = rString;
@@ -69,7 +69,7 @@ static OUString lclGenerateApiString( const OUString& rString )
return OUStringBuffer().append( sal_Unicode( '"' ) ).append( aRetString ).append( sal_Unicode( '"' ) ).makeStringAndClear();
}
- static ::rtl::OUString lclGenerateApiArray( const Matrix< Any >& rMatrix )
+static ::rtl::OUString lclGenerateApiArray( const Matrix< Any >& rMatrix )
{
OSL_ENSURE( !rMatrix.empty(), "ChartConverter::lclGenerateApiArray - missing matrix values" );
OUStringBuffer aBuffer;
@@ -156,7 +156,7 @@ Reference< XDataSequence > ChartConverter::createDataSequence( const Reference<
}
catch( Exception& )
{
- OSL_FAIL( "ExcelChartConverter::createDataSequence - cannot create data sequence" );
+ OSL_FAIL( "ChartConverter::createDataSequence - cannot create data sequence" );
}
}
diff --git a/oox/source/drawingml/chart/objectformatter.cxx b/oox/source/drawingml/chart/objectformatter.cxx
index af633dcfd0fa..714c26392d7d 100644
--- a/oox/source/drawingml/chart/objectformatter.cxx
+++ b/oox/source/drawingml/chart/objectformatter.cxx
@@ -190,7 +190,7 @@ static const AutoFormatEntry spNoFormats[] =
AUTOFORMAT_END()
};
-static const AutoFormatEntry spChartSpaceLines[] =
+static const AutoFormatEntry spDataTableLines[] =
{
AUTOFORMAT_COLORMOD( 1, 32, THEMED_STYLE_SUBTLE, XML_tx1, XML_tint, 75000 ),
AUTOFORMAT_COLORMOD( 33, 40, THEMED_STYLE_SUBTLE, XML_dk1, XML_tint, 75000 ),
@@ -198,14 +198,6 @@ static const AutoFormatEntry spChartSpaceLines[] =
AUTOFORMAT_END()
};
-static const AutoFormatEntry spChartSpaceFills[] =
-{
- AUTOFORMAT_COLOR( 1, 32, THEMED_STYLE_SUBTLE, XML_bg1 ),
- AUTOFORMAT_COLOR( 33, 40, THEMED_STYLE_SUBTLE, XML_lt1 ),
- AUTOFORMAT_COLOR( 41, 48, THEMED_STYLE_SUBTLE, XML_dk1 ),
- AUTOFORMAT_END()
-};
-
static const AutoFormatEntry spPlotArea2dFills[] =
{
AUTOFORMAT_COLOR( 1, 32, THEMED_STYLE_SUBTLE, XML_bg1 ),
@@ -519,7 +511,7 @@ struct ObjectTypeFormatEntry
static const ObjectTypeFormatEntry spObjTypeFormatEntries[] =
{
// object type property type auto text auto line auto fill auto effect
- TYPEFORMAT_FRAME( OBJECTTYPE_CHARTSPACE, PROPERTYTYPE_COMMON, 0, spChartSpaceLines, spChartSpaceFills, 0 /* eq to Ch2 */ ),
+ TYPEFORMAT_FRAME( OBJECTTYPE_CHARTSPACE, PROPERTYTYPE_COMMON, 0, spNoFormats, spNoFormats, 0 /* eq to Ch2 */ ),
TYPEFORMAT_FRAME( OBJECTTYPE_CHARTTITLE, PROPERTYTYPE_COMMON, spChartTitleTexts, 0 /* eq to Ch2 */, 0 /* eq to Ch2 */, 0 /* eq to Ch2 */ ),
TYPEFORMAT_FRAME( OBJECTTYPE_LEGEND, PROPERTYTYPE_COMMON, spOtherTexts, spNoFormats, spNoFormats, 0 /* eq to Ch2 */ ),
TYPEFORMAT_FRAME( OBJECTTYPE_PLOTAREA2D, PROPERTYTYPE_COMMON, 0, 0 /* eq to Ch2 */, spPlotArea2dFills, 0 /* eq to Ch2 */ ),
@@ -544,7 +536,7 @@ static const ObjectTypeFormatEntry spObjTypeFormatEntries[] =
TYPEFORMAT_LINE( OBJECTTYPE_HILOLINE, PROPERTYTYPE_LINEARSERIES, 0, spOtherLines ),
TYPEFORMAT_FRAME( OBJECTTYPE_UPBAR, PROPERTYTYPE_COMMON, 0, spUpDownBarLines, spUpBarFills, spUpDownBarEffects ),
TYPEFORMAT_FRAME( OBJECTTYPE_DOWNBAR, PROPERTYTYPE_COMMON, 0, spUpDownBarLines, spDownBarFills, spUpDownBarEffects ),
- TYPEFORMAT_LINE( OBJECTTYPE_DATATABLE, PROPERTYTYPE_COMMON, spOtherTexts, spChartSpaceLines )
+ TYPEFORMAT_LINE( OBJECTTYPE_DATATABLE, PROPERTYTYPE_COMMON, spOtherTexts, spDataTableLines )
};
#undef TYPEFORMAT_FRAME
diff --git a/oox/source/drawingml/chart/seriesconverter.cxx b/oox/source/drawingml/chart/seriesconverter.cxx
index f6f1ad8523ec..8a98471abca9 100644
--- a/oox/source/drawingml/chart/seriesconverter.cxx
+++ b/oox/source/drawingml/chart/seriesconverter.cxx
@@ -35,6 +35,7 @@
#include <com/sun/star/chart2/XRegressionCurve.hpp>
#include <com/sun/star/chart2/XRegressionCurveContainer.hpp>
#include <com/sun/star/chart2/data/XDataSink.hpp>
+#include <basegfx/numeric/ftools.hxx>
#include "oox/drawingml/chart/datasourceconverter.hxx"
#include "oox/drawingml/chart/seriesmodel.hxx"
#include "oox/drawingml/chart/titleconverter.hxx"
@@ -59,6 +60,15 @@ using ::rtl::OUString;
namespace {
+/** nastied-up sgn function - employs some gratuity around 0 - values
+ smaller than 0.33 are clamped to 0
+ */
+int lclSgn( double nVal )
+{
+ const int intVal=nVal*3;
+ return intVal == 0 ? 0 : (intVal < 0 ? -1 : 1);
+}
+
Reference< XLabeledDataSequence > lclCreateLabeledDataSequence(
const ConverterRoot& rParent,
DataSourceModel* pValues, const OUString& rRole,
@@ -114,6 +124,13 @@ void lclConvertLabelFormatting( PropertySet& rPropSet, ObjectFormatter& rFormatt
bool bShowValue = !rDataLabel.mbDeleted && rDataLabel.mobShowVal.get( false );
bool bShowPercent = !rDataLabel.mbDeleted && rDataLabel.mobShowPercent.get( false ) && (rTypeInfo.meTypeCategory == TYPECATEGORY_PIE);
+ if( bShowValue &&
+ !bShowPercent && rTypeInfo.meTypeCategory == TYPECATEGORY_PIE &&
+ rDataLabel.maNumberFormat.maFormatCode.indexOfAsciiL("%", 1) >= 0 )
+ {
+ bShowValue = false;
+ bShowPercent = true;
+ }
bool bShowCateg = !rDataLabel.mbDeleted && rDataLabel.mobShowCatName.get( false );
bool bShowSymbol = !rDataLabel.mbDeleted && rDataLabel.mobShowLegendKey.get( false );
@@ -178,6 +195,27 @@ void DataLabelConverter::convertFromModel( const Reference< XDataSeries >& rxDat
{
PropertySet aPropSet( rxDataSeries->getDataPointByIndex( mrModel.mnIndex ) );
lclConvertLabelFormatting( aPropSet, getFormatter(), mrModel, rTypeGroup, false );
+
+ if( !mrModel.mxLayout->mbAutoLayout )
+ {
+ // bnc#694340 - nasty hack - chart2 cannot individually
+ // place data labels, let's try to find a useful
+ // compromise instead
+ namespace csscd = ::com::sun::star::chart::DataLabelPlacement;
+ const sal_Int32 aPositionsLookupTable[] =
+ {
+ csscd::TOP_LEFT, csscd::TOP, csscd::TOP_RIGHT,
+ csscd::LEFT, csscd::CENTER, csscd::RIGHT,
+ csscd::BOTTOM_LEFT, csscd::BOTTOM, csscd::BOTTOM_RIGHT
+ };
+ const double nMax=std::max(
+ fabs(mrModel.mxLayout->mfX),
+ fabs(mrModel.mxLayout->mfY));
+ const int simplifiedX=lclSgn(mrModel.mxLayout->mfX/nMax);
+ const int simplifiedY=lclSgn(mrModel.mxLayout->mfY/nMax);
+ aPropSet.setProperty( PROP_LabelPlacement,
+ aPositionsLookupTable[ simplifiedX+1 + 3*(simplifiedY+1) ] );
+ }
}
catch( Exception& )
{
@@ -206,6 +244,7 @@ void DataLabelsConverter::convertFromModel( const Reference< XDataSeries >& rxDa
// data point label settings
for( DataLabelsModel::DataLabelVector::iterator aIt = mrModel.maPointLabels.begin(), aEnd = mrModel.maPointLabels.end(); aIt != aEnd; ++aIt )
{
+ (*aIt)->maNumberFormat.maFormatCode = mrModel.maNumberFormat.maFormatCode;
DataLabelConverter aLabelConv( *this, **aIt );
aLabelConv.convertFromModel( rxDataSeries, rTypeGroup );
}
@@ -596,6 +635,12 @@ Reference< XDataSeries > SeriesConverter::createDataSeries( const TypeGroupConve
ModelRef< DataLabelsModel > xLabels = mrModel.mxLabels.is() ? mrModel.mxLabels : rTypeGroup.getModel().mxLabels;
if( xLabels.is() )
{
+ if( xLabels->maNumberFormat.maFormatCode.isEmpty() )
+ {
+ // Use number format code from Value series
+ DataSourceModel* pValues = mrModel.maSources.get( SeriesModel::VALUES ).get();
+ xLabels->maNumberFormat.maFormatCode = pValues->mxDataSeq->maFormatCode;
+ }
DataLabelsConverter aLabelsConv( *this, *xLabels );
aLabelsConv.convertFromModel( xDataSeries, rTypeGroup );
}
diff --git a/oox/source/xls/formulaparser.cxx b/oox/source/xls/formulaparser.cxx
index 2543ef6dc910..fb7b5d37e473 100644
--- a/oox/source/xls/formulaparser.cxx
+++ b/oox/source/xls/formulaparser.cxx
@@ -32,6 +32,7 @@
#include <com/sun/star/sheet/ComplexReference.hpp>
#include <com/sun/star/sheet/ExternalReference.hpp>
#include <com/sun/star/sheet/FormulaToken.hpp>
+#include <com/sun/star/sheet/NameToken.hpp>
#include <com/sun/star/sheet/ReferenceFlags.hpp>
#include <com/sun/star/sheet/SingleReference.hpp>
#include "oox/core/filterbase.hxx"
@@ -2798,7 +2799,10 @@ void FormulaParser::convertNameToFormula( FormulaContext& rContext, sal_Int32 nT
{
ApiTokenSequence aTokens( 1 );
aTokens[ 0 ].OpCode = OPCODE_NAME;
- aTokens[ 0 ].Data <<= nTokenIndex;
+ NameToken aNameTokenData;
+ aNameTokenData.Global = sal_True;
+ aNameTokenData.Index= nTokenIndex;
+ aTokens[ 0 ].Data <<= aNameTokenData;
mxImpl->setFormula( rContext, aTokens );
}
else
diff --git a/sc/source/core/data/dpobject.cxx b/sc/source/core/data/dpobject.cxx
index 25864796da44..8e8ded033933 100644
--- a/sc/source/core/data/dpobject.cxx
+++ b/sc/source/core/data/dpobject.cxx
@@ -1860,9 +1860,6 @@ sal_Bool ScDPObject::FillOldParam(ScPivotParam& rParam) const
// ppLabelArr / nLabels is not changed
SCCOL nSrcColOffset = 0;
- if (IsSheetData())
- // source data column offset is only for internal sheet source.
- nSrcColOffset = pSheetDesc->GetSourceRange().aStart.Col();
bool bAddData = ( lcl_GetDataGetOrientation( xSource ) == sheet::DataPilotFieldOrientation_HIDDEN );
lcl_FillOldFields(
diff --git a/sc/source/core/data/table1.cxx b/sc/source/core/data/table1.cxx
index 3130ee05ba8d..f120b9011c34 100644
--- a/sc/source/core/data/table1.cxx
+++ b/sc/source/core/data/table1.cxx
@@ -1303,6 +1303,12 @@ void ScTable::UpdateReference( UpdateRefMode eUpdateRefMode, SCCOL nCol1, SCROW
bUpdated |= aCol[i].UpdateReference(
eUpdateRefMode, nCol1, nRow1, nTab1, nCol2, nRow2, nTab2, nDx, nDy, nDz, pUndoDoc );
+ if (mpRangeName)
+ {
+ ScRange aRange( nCol1, nRow1, nTab1, nCol2, nRow2, nTab2 );;
+ mpRangeName->UpdateReference( eUpdateRefMode, aRange, nDx, nDy, nDz );
+ }
+
if ( bIncludeDraw )
UpdateDrawRef( eUpdateRefMode, nCol1, nRow1, nTab1, nCol2, nRow2, nTab2, nDx, nDy, nDz, bUpdateNoteCaptionPos );
@@ -1410,6 +1416,9 @@ void ScTable::UpdateInsertTab(SCTAB nTable)
}
for (SCCOL i=0; i <= MAXCOL; i++) aCol[i].UpdateInsertTab(nTable);
+ if (mpRangeName)
+ mpRangeName->UpdateTabRef( nTable, 1);
+
if (IsStreamValid())
SetStreamValid(false);
}
@@ -1429,6 +1438,11 @@ void ScTable::UpdateDeleteTab( SCTAB nTable, sal_Bool bIsMove, ScTable* pRefUndo
else
for (i=0; i <= MAXCOL; i++) aCol[i].UpdateDeleteTab(nTable, bIsMove, NULL);
+ if (mpRangeName)
+ {
+ mpRangeName->UpdateTabRef( nTable, 2 );
+ }
+
if (IsStreamValid())
SetStreamValid(false);
}
@@ -1443,6 +1457,9 @@ void ScTable::UpdateMoveTab( SCTAB nOldPos, SCTAB nNewPos, SCTAB nTabNo,
rProgress.SetState( rProgress.GetState() + aCol[i].GetCodeCount() );
}
+ if (mpRangeName)
+ mpRangeName->UpdateTabRef(nOldPos, 3, nNewPos);
+
if (IsStreamValid())
SetStreamValid(false);
if (pDBDataNoName)
diff --git a/sc/source/core/tool/address.cxx b/sc/source/core/tool/address.cxx
index 13101cc0a921..16b821a28738 100644
--- a/sc/source/core/tool/address.cxx
+++ b/sc/source/core/tool/address.cxx
@@ -1420,7 +1420,7 @@ sal_uInt16 ScRange::ParseAny( const String& r, ScDocument* pDoc,
if ( (nRet & nValid) != nValid )
{
- ScAddress aAdr;
+ ScAddress aAdr(aStart);//initialize with currentPos as fallback for table number
nRet = aAdr.Parse( r, pDoc, rDetails );
if ( nRet & SCA_VALID )
aStart = aEnd = aAdr;
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index ad3052585784..e4eab3fa510f 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -2892,18 +2892,17 @@ sal_Bool ScCompiler::IsNamedRange( const String& rUpperName )
{
// IsNamedRange is called only from NextNewToken, with an upper-case string
- // Try global named ranges first, then sheet local next. BTW does this
- // order matter?
- bool bGlobal = true;
- ScRangeName* pRangeName = pDoc->GetRangeName();
+ // try local names first
+ bool bGlobal = false;
+ ScRangeName* pRangeName = pDoc->GetRangeName(aPos.Tab());
const ScRangeData* pData = pRangeName->findByUpperName(rUpperName);
if (!pData)
{
- pRangeName = pDoc->GetRangeName(aPos.Tab());
+ pRangeName = pDoc->GetRangeName();
if (pRangeName)
pData = pRangeName->findByUpperName(rUpperName);
if (pData)
- bGlobal = false;
+ bGlobal = true;
}
if (pData)
diff --git a/sc/source/core/tool/scmatrix.cxx b/sc/source/core/tool/scmatrix.cxx
index 9add45e417ec..7b1a3b447665 100644
--- a/sc/source/core/tool/scmatrix.cxx
+++ b/sc/source/core/tool/scmatrix.cxx
@@ -463,12 +463,15 @@ const String& ScMatrixImpl::GetString(SCSIZE nC, SCSIZE nR) const
{
if (ValidColRowOrReplicated( nC, nR ))
{
- if (maMat.get_type(nR, nC) == ::mdds::element_string)
- return *maMat.get_string(nR, nC);
- else
+ switch (maMat.get_type(nR, nC))
{
- SetErrorAtInterpreter( GetError(nC, nR));
- DBG_ERRORFILE("ScMatrixImpl::GetString: access error, no string");
+ case ::mdds::element_string:
+ return *maMat.get_string(nR, nC);
+ case ::mdds::element_empty:
+ return ScGlobal::GetEmptyString();
+ default:
+ SetErrorAtInterpreter( GetError(nC, nR));
+ OSL_FAIL("ScMatrixImpl::GetString: access error, no string");
}
}
else
diff --git a/sc/source/core/tool/token.cxx b/sc/source/core/tool/token.cxx
index 95f44a3f19d0..4dacebe5909d 100644
--- a/sc/source/core/tool/token.cxx
+++ b/sc/source/core/tool/token.cxx
@@ -57,6 +57,7 @@ using ::std::vector;
#include <com/sun/star/sheet/ComplexReference.hpp>
#include <com/sun/star/sheet/ExternalReference.hpp>
#include <com/sun/star/sheet/ReferenceFlags.hpp>
+#include <com/sun/star/sheet/NameToken.hpp>
using namespace formula;
using namespace com::sun::star;
@@ -1175,6 +1176,13 @@ bool ScTokenArray::AddFormulaToken(const com::sun::star::sheet::FormulaToken& _a
else
bError = true;
}
+ else if ( aType.equals( cppu::UnoType<sheet::NameToken>::get() ) )
+ {
+ sheet::NameToken aTokenData;
+ _aToken.Data >>= aTokenData;
+ if ( eOpCode == ocName )
+ AddRangeName(aTokenData.Index, aTokenData.Global);
+ }
else if ( aType.equals( cppu::UnoType<sheet::ExternalReference>::get() ) )
{
sheet::ExternalReference aApiExtRef;
diff --git a/sc/source/filter/excel/xepage.cxx b/sc/source/filter/excel/xepage.cxx
index 47396d620e41..3831bc7822ac 100644
--- a/sc/source/filter/excel/xepage.cxx
+++ b/sc/source/filter/excel/xepage.cxx
@@ -330,6 +330,14 @@ XclExpPageSettings::XclExpPageSettings( const XclExpRoot& rRoot ) :
maData.maHorPageBreaks.push_back(nRow);
}
+ if (maData.maHorPageBreaks.size() > 1026)
+ {
+ // Excel allows only up to 1026 page breaks. Trim any excess page breaks.
+ ScfUInt16Vec::iterator itr = maData.maHorPageBreaks.begin();
+ ::std::advance(itr, 1026);
+ maData.maHorPageBreaks.erase(itr, maData.maHorPageBreaks.end());
+ }
+
set<SCCOL> aColBreaks;
rDoc.GetAllColBreaks(aColBreaks, nScTab, false, true);
for (set<SCCOL>::const_iterator itr = aColBreaks.begin(), itrEnd = aColBreaks.end(); itr != itrEnd; ++itr)
diff --git a/sc/source/filter/excel/xiname.cxx b/sc/source/filter/excel/xiname.cxx
index 90be4dc022ec..8a80f5217dc1 100644
--- a/sc/source/filter/excel/xiname.cxx
+++ b/sc/source/filter/excel/xiname.cxx
@@ -271,7 +271,7 @@ const XclImpName* XclImpNameManager::FindName( const String& rXclName, SCTAB nSc
const XclImpName* XclImpNameManager::GetName( sal_uInt16 nXclNameIdx ) const
{
DBG_ASSERT( nXclNameIdx > 0, "XclImpNameManager::GetName - index must be >0" );
- return ( nXclNameIdx >= maNameList.size() ) ? NULL : &(maNameList.at( nXclNameIdx - 1 ));
+ return ( nXclNameIdx > maNameList.size() ) ? NULL : &(maNameList.at( nXclNameIdx - 1 ));
}
// ============================================================================
diff --git a/sc/source/filter/html/htmlpars.cxx b/sc/source/filter/html/htmlpars.cxx
index c7a79a164de5..10c4a5b83684 100644
--- a/sc/source/filter/html/htmlpars.cxx
+++ b/sc/source/filter/html/htmlpars.cxx
@@ -1012,7 +1012,9 @@ void ScHTMLLayoutParser::TableOn( ImportInfo* pInfo )
nColOffsetStart = nColOffset;
}
- ScEEParseEntry* pE = maList.back();
+ ScEEParseEntry* pE = NULL;
+ if (maList.size())
+ pE = maList.back();
NewActEntry( pE ); // neuer freifliegender pActEntry
xLockedList = new ScRangeList;
}
diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index 60f7c051dd36..968b38a25711 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -2066,7 +2066,8 @@ IMPL_LINK( ScInputHandler, ModifyHdl, void *, EMPTYARG )
sal_Bool ScInputHandler::DataChanging( sal_Unicode cTyped, sal_Bool bFromCommand ) // return sal_True = new view created
{
- pActiveViewSh->GetViewData()->SetPasteMode( SC_PASTE_NONE );
+ if (pActiveViewSh)
+ pActiveViewSh->GetViewData()->SetPasteMode( SC_PASTE_NONE );
bInOwnChange = true; // disable ModifyHdl (reset in DataChanged)
if ( eMode == SC_INPUT_NONE )
@@ -2283,7 +2284,7 @@ void ScInputHandler::SetMode( ScInputMode eNewMode )
return;
}
- if (eNewMode != SC_INPUT_NONE)
+ if (eNewMode != SC_INPUT_NONE && pActiveViewSh)
// Disable paste mode when edit mode starts.
pActiveViewSh->GetViewData()->SetPasteMode( SC_PASTE_NONE );
diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index 8cb3d6e136e8..8f95c3e5e304 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -1701,7 +1701,7 @@ void ScPosWnd::DoEnter()
{
// Note that SID_CURRENTCELL always expects address to
// be in Calc A1 format. Convert the text.
- ScRange aRange;
+ ScRange aRange(0,0,pViewData->GetTabNo());
aRange.ParseAny(aText, pDoc, pDoc->GetAddressConvention());
aRange.Format(aText, SCR_ABS_3D, pDoc, ::formula::FormulaGrammar::CONV_OOO);
}
diff --git a/sc/source/ui/unoobj/tokenuno.cxx b/sc/source/ui/unoobj/tokenuno.cxx
index 8c48f46a3f7d..2e6658b2b57f 100644
--- a/sc/source/ui/unoobj/tokenuno.cxx
+++ b/sc/source/ui/unoobj/tokenuno.cxx
@@ -37,6 +37,7 @@
#include <com/sun/star/sheet/ExternalReference.hpp>
#include <com/sun/star/sheet/ReferenceFlags.hpp>
#include <com/sun/star/sheet/AddressConvention.hpp>
+#include <com/sun/star/sheet/NameToken.hpp>
#include <com/sun/star/table/CellAddress.hpp>
#include <svl/itemprop.hxx>
@@ -395,7 +396,12 @@ bool ScTokenConversion::ConvertToTokenSequence( ScDocument& rDoc,
}
break;
case svIndex:
- rAPI.Data <<= static_cast<sal_Int32>( rToken.GetIndex() );
+ {
+ sheet::NameToken aNameToken;
+ aNameToken.Index = static_cast<sal_Int32>( rToken.GetIndex() );
+ aNameToken.Global = static_cast<sal_Bool>( rToken.GetByte() );
+ rAPI.Data <<= aNameToken;
+ }
break;
case svMatrix:
if (!ScRangeToSequence::FillMixedArray( rAPI.Data, static_cast<const ScToken&>(rToken).GetMatrix(), true))
diff --git a/sc/source/ui/view/drawview.cxx b/sc/source/ui/view/drawview.cxx
index e8867653be13..9c2bb98e1321 100644
--- a/sc/source/ui/view/drawview.cxx
+++ b/sc/source/ui/view/drawview.cxx
@@ -487,7 +487,7 @@ void ScDrawView::MarkListHasChanged()
uno::Reference < embed::XEmbeddedObject > xObj = pOle2Obj->GetObjRef();
DBG_ASSERT( xObj.is(), "SdrOle2Obj ohne ObjRef" );
if (xObj.is())
- xObj->getSupportedVerbs();
+ aVerbs = xObj->getSupportedVerbs();
}
pViewSh->SetVerbs( aVerbs );
diff --git a/sc/source/ui/view/output.cxx b/sc/source/ui/view/output.cxx
index c1866a5be0a9..b69f2ace659a 100644
--- a/sc/source/ui/view/output.cxx
+++ b/sc/source/ui/view/output.cxx
@@ -52,7 +52,6 @@
#include <basegfx/matrix/b2dhommatrix.hxx>
#include <svx/sdr/contact/objectcontacttools.hxx>
#include <svx/unoapi.hxx>
-#include <svx/svdpage.hxx>
#include "output.hxx"
#include "document.hxx"
@@ -1635,19 +1634,17 @@ void ScOutputData::DrawRotatedFrame( const Color* pForceColor )
drawinglayer::processor2d::BaseProcessor2D* ScOutputData::CreateProcessor2D( )
{
- SdrModel aModel;
- SdrPage aSdrPage( aModel );
-
ScDrawLayer* pDrawLayer = pDoc->GetDrawLayer();
- if ( pDrawLayer )
- aSdrPage = *pDrawLayer->GetPage( static_cast< sal_uInt16 >( nTab ) );
+ if (!pDrawLayer)
+ return NULL;
basegfx::B2DRange aViewRange;
+ SdrPage *pDrawPage = pDrawLayer->GetPage( static_cast< sal_uInt16 >( nTab ) );
const drawinglayer::geometry::ViewInformation2D aNewViewInfos(
basegfx::B2DHomMatrix( ),
pDev->GetViewTransformation(),
aViewRange,
- GetXDrawPageForSdrPage( &aSdrPage ),
+ GetXDrawPageForSdrPage( pDrawPage ),
0.0,
uno::Sequence< beans::PropertyValue >() );
diff --git a/scp2/source/ooo/common_brand.scp b/scp2/source/ooo/common_brand.scp
index 47e5f9f542a6..2557f0d6f421 100644
--- a/scp2/source/ooo/common_brand.scp
+++ b/scp2/source/ooo/common_brand.scp
@@ -1152,7 +1152,7 @@ ProfileItem gid_Brand_Profileitem_Version_Updateurl
Section = "Version";
Order = 15;
Key = "UpdateURL";
- #if defined(BUILD_SPECIAL)
+ #if defined(ENABLE_ONLINE_UPDATE)
#ifdef WNT
Value = "${UPDATEURL}";
#else // defined WNT
diff --git a/scp2/source/ooo/makefile.mk b/scp2/source/ooo/makefile.mk
index 86ef48cc2667..e553440d5549 100644
--- a/scp2/source/ooo/makefile.mk
+++ b/scp2/source/ooo/makefile.mk
@@ -45,6 +45,10 @@ SCPDEFS+=-D_MSC
SCPDEFS+=-DBUILD_SPECIAL
.ENDIF
+.IF "$(ENABLE_ONLINE_UPDATE)"!=""
+SCPDEFS+=-DENABLE_ONLINE_UPDATE
+.ENDIF
+
.IF "$(BUILD_X64)"!=""
SCPDEFS+=-DBUILD_X64
.ENDIF
diff --git a/scp2/util/makefile.mk b/scp2/util/makefile.mk
index a7873d180bbf..90306993b11f 100644
--- a/scp2/util/makefile.mk
+++ b/scp2/util/makefile.mk
@@ -215,7 +215,7 @@ SCP1FILES += cairocanvas.par
SCP1FILES += layout.par
.ENDIF # ENABLE_LAYOUT == TRUE
-.IF "$(BUILD_SPECIAL)"!=""
+.IF "$(ENABLE_ONLINE_UPDATE)"!=""
SCP1FILES += \
module_onlineupdate.par \
file_onlineupdate.par
@@ -392,7 +392,7 @@ SCP2FILES += \
SCP2FILES += layout.par
.ENDIF # ENABLE_LAYOUT == TRUE
-.IF "$(BUILD_SPECIAL)"!=""
+.IF "$(ENABLE_ONLINE_UPDATE)"!=""
SCP2FILES += \
module_onlineupdate.par \
file_onlineupdate.par
diff --git a/sd/source/ui/func/futext.cxx b/sd/source/ui/func/futext.cxx
index 05ae15a565a3..a6a3664f5785 100644
--- a/sd/source/ui/func/futext.cxx
+++ b/sd/source/ui/func/futext.cxx
@@ -140,6 +140,7 @@ static sal_Bool bTestText = 0;
FuText::FuText( ViewShell* pViewSh, ::sd::Window* pWin, ::sd::View* pView, SdDrawDocument* pDoc, SfxRequest& rReq )
: FuConstruct(pViewSh, pWin, pView, pDoc, rReq)
, bFirstObjCreated(sal_False)
+, bJustEndedEdit(false)
, rRequest (rReq)
{
}
@@ -400,6 +401,7 @@ sal_Bool FuText::MouseButtonDown(const MouseEvent& rMEvt)
if( mpView->IsTextEdit() )
{
mpView->SdrEndTextEdit();
+ bJustEndedEdit = true;
if(aVEvt.pHdl)
{
@@ -682,7 +684,7 @@ sal_Bool FuText::MouseButtonUp(const MouseEvent& rMEvt)
sal_uInt16 nDrgLog = sal_uInt16 ( mpWindow->PixelToLogic(Size(DRGPIX,0)).Width() );
- if ( mpView->IsRotateAllowed() && mpViewShell->GetFrameView()->IsClickChangeRotation() && (rMEvt.GetClicks() != 2) &&
+ if ( mpView->IsRotateAllowed() && mpViewShell->GetFrameView()->IsClickChangeRotation() && (rMEvt.GetClicks() != 2) && !bJustEndedEdit &&
!rMEvt.IsShift() && !rMEvt.IsMod1() && !rMEvt.IsMod2() && !rMEvt.IsRight() &&
Abs(aPnt.X() - aMDPos.X()) < nDrgLog &&
Abs(aPnt.Y() - aMDPos.Y()) < nDrgLog)
@@ -690,6 +692,9 @@ sal_Bool FuText::MouseButtonUp(const MouseEvent& rMEvt)
// toggle to rotation mode
mpViewShell->GetViewFrame()->GetDispatcher()->Execute( SID_OBJECT_ROTATE, SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD );
}
+
+ if( bJustEndedEdit )
+ bJustEndedEdit = false;
}
else if( mpView && mpView->IsCreateObj() && rMEvt.IsLeft())
{
diff --git a/sd/source/ui/inc/futext.hxx b/sd/source/ui/inc/futext.hxx
index f68c9bece7c1..bcffd4fa12d8 100644
--- a/sd/source/ui/inc/futext.hxx
+++ b/sd/source/ui/inc/futext.hxx
@@ -98,6 +98,7 @@ protected:
SdrObjectWeakRef mxTextObj;
Link aOldLink;
sal_Bool bFirstObjCreated;
+ bool bJustEndedEdit;
SfxRequest& rRequest;
diff --git a/sdext/source/presenter/makefile.mk b/sdext/source/presenter/makefile.mk
index 3c93866a731b..1a3c052f8095 100644
--- a/sdext/source/presenter/makefile.mk
+++ b/sdext/source/presenter/makefile.mk
@@ -370,6 +370,13 @@ $(DESCRIPTION) $(PHONYDESC) : $$(@:f)
@echo LAST_WITH_LANG=$(WITH_LANG) > $(ZIP1DIR)_lang_track.mk
$(TYPE) description.xml | sed s/UPDATED_PLATFORM/$(PLATFORMID)/ > $@
+ALLTAR: $(MISC)/../bin/presenter-screen.oxt
+# hotfix to missing localizations
+.IF "$(WITH_LANG)"!=""
+ $(COPY) $(ZIP1DIR)_in/merge/org/openoffice/Office/extension/PresenterScreen.xcu $(ZIP1DIR)/registry/data/org/openoffice/Office/extension/
+ cd $(ZIP1DIR);zip -r -u ../../bin/presenter-screen.oxt registry/data/org/openoffice/Office/extension/PresenterScreen.xcu
+.ENDIF
+
.ELSE
ivo:
$(ECHO)
diff --git a/set_soenv.in b/set_soenv.in
index 414dae21a1cb..4c047b6d42ba 100755
--- a/set_soenv.in
+++ b/set_soenv.in
@@ -1068,9 +1068,11 @@ $XCLASSPATH = '$JAVA_HOME'.$ds.'jre'.$LIB.$ds."rt.jar".$wps.'.';
$L10N_MODULE = PathFormat($SRC_ROOT."/translations");
# Check for poor help localizations, i.e. no help translation at all...
-opendir(DIR,$L10N_MODULE . "/source");
-@languages = readdir(DIR);
-closedir(DIR);
+@languages=();
+if (opendir(DIR,$L10N_MODULE . "/source"))
+{ @languages = readdir(DIR);
+ closedir(DIR);
+}
$WITH_POOR_HELP_LOCALIZATIONS = "";
foreach $language (@languages)
@@ -1590,10 +1592,12 @@ ToFile( "Empty", $empty, "n" );
ToFile( "Platform independent constant values.", $empty, "c" );
# Languages
ToFile( "WITH_LANG", "@WITH_LANG@", "e" );
+ToFile( "WITH_LANG_LIST", "@WITH_LANG_LIST@", "e" );
ToFile( "INTRO_BITMAP", "@INTRO_BITMAP@", "e" );
ToFile( "ABOUT_BITMAP", "@ABOUT_BITMAP@", "e" );
ToFile( "OOO_VENDOR", "@OOO_VENDOR@", "e" );
ToFile( "OOODMAKEMODE", "YES", "e" );
+ToFile( "PRODUCTVERSION", "@PRODUCTVERSION@", "e" );
ToFile( "WITH_POOR_HELP_LOCALIZATIONS", $WITH_POOR_HELP_LOCALIZATIONS, "e" );
ToFile( "CALL_CDECL", $CALL_CDECL, "e" );
@@ -1620,8 +1624,17 @@ ToFile( "EXTERNAL_WARNINGS_NOT_ERRORS", "TRUE", "e" );
ToFile( "PRODUCT", "@PRODUCT@", "e" );
ToFile( "PROFULLSWITCH", "@PROFULLSWITCH@", "e" );
ToFile( "PROEXT", $PROEXT, "e" );
-ToFile( "VALGRIND_CFLAGS", "@VALGRIND_CFLAGS@", "e" );
+ToFile( "VALGRIND_CFLAGS", "@VALGRIND_CFLAGS@","e" );
+ToFile( "WITH_COMPAT_OOWRAPPERS", "@WITH_COMPAT_OOWRAPPERS@", "e" );
ToFile( "UNIXWRAPPERNAME", "@UNIXWRAPPERNAME@","e" );
+ToFile( "PRODUCTNAME", "@PRODUCTNAME@", "e" );
+ToFile( "INSTALLDIRNAME", "@INSTALLDIRNAME@", "e" );
+ToFile( "PREFIXDIR", "@PREFIXDIR@", "e" );
+ToFile( "INSTALLDIR", "@INSTALLDIR@", "e" );
+ToFile( "LIBDIR", "@LIBDIR@", "e" );
+ToFile( "DATADIR", "@DATADIR@", "e" );
+ToFile( "MANDIR", "@MANDIR@", "e" );
+ToFile( "DOCDIR", "@DOCDIR@", "e" );
ToFile( "BUILD_MOZAB", "@BUILD_MOZAB@", "e" );
ToFile( "PREBUILD_MOZAB", $PREBUILD_MOZAB, "e" );
ToFile( "MOZILLA_VERSION", $MOZILLA_VERSION, "e" );
@@ -1640,6 +1653,8 @@ ToFile( "ENABLE_SYSTRAY_GTK", "@ENABLE_SYSTRAY_GTK@", "e" );
ToFile( "ENABLE_STATIC_GTK", "@ENABLE_STATIC_GTK@", "e" );
ToFile( "ENABLE_CAIRO", "@ENABLE_CAIRO@", "e" );
ToFile( "ENABLE_BROFFICE", "@ENABLE_BROFFICE@", "e" );
+ToFile( "SPLIT_APP_MODULES", "@SPLIT_APP_MODULES@","e" );
+ToFile( "SPLIT_OPT_FEATURES","@SPLIT_OPT_FEATURES@","e" );
ToFile( "ENABLE_OPENGL", "@ENABLE_OPENGL@", "e" );
ToFile( "ENABLE_PDFIMPORT", "@ENABLE_PDFIMPORT@", "e" );
ToFile( "ENABLE_MINIMIZER", "@ENABLE_MINIMIZER@","e" );
@@ -1694,7 +1709,6 @@ ToFile( "PSPRINT", "TRUE", "e" );
ToFile( "MKDEPENDSOLVER", "TRUE", "e" );
ToFile( "nodep", "@nodep@", "e" );
ToFile( "TARFILE_LOCATION", $TARFILE_LOCATION, "e" );
-ToFile( "DO_FETCH_TARBALLS", "@DO_FETCH_TARBALLS@", "e" );
ToFile( "GIT_LINK_SRC", "@GIT_LINK_SRC@", "e" );
ToFile( "GIT_REPO_NAMES", "@GIT_REPO_NAMES@", "e" );
@@ -1984,6 +1998,7 @@ ToFile( "DB_CPPLIB", "@DB_CPPLIB@", "e" );
ToFile( "DB_INCLUDES", "@DB_INCLUDES@", "e" );
ToFile( "ENABLE_MYSQLC", "@ENABLE_MYSQLC@", "e" );
ToFile( "ENABLE_LOMENUBAR", "@ENABLE_LOMENUBAR@", "e" );
+ToFile( "ENABLE_ONLINE_UPDATE","@ENABLE_ONLINE_UPDATE@", "e" );
ToFile( "SYSTEM_MYSQL", "@SYSTEM_MYSQL@", "e" );
ToFile( "SYSTEM_MYSQL_CPPCONN","@SYSTEM_MYSQL_CPPCONN@","e" );
ToFile( "MYSQL_INC", "@MYSQL_INC@", "e" );
diff --git a/sfx2/Library_qstart.mk b/sfx2/Library_qstart.mk
index 0709f60ba5fa..e46a58163134 100755
--- a/sfx2/Library_qstart.mk
+++ b/sfx2/Library_qstart.mk
@@ -44,6 +44,13 @@ $(eval $(call gb_Library_set_defs,qstart_gtk,\
-DENABLE_QUICKSTART_APPLET \
))
+ifeq ($(ENABLE_SYSTRAY_GTK),TRUE)
+$(eval $(call gb_Library_set_defs,qstart_gtk,\
+ $$(DEFS) \
+ -DENABLE_SYSTRAY_GTK \
+))
+endif
+
$(eval $(call gb_Library_set_cflags,qstart_gtk,\
$$(CFLAGS) \
$(filter-out -I%,$(GTK_CFLAGS)) \
diff --git a/sfx2/Library_sfx.mk b/sfx2/Library_sfx.mk
index 4d2396bf069c..c9ec52c7ab1f 100755
--- a/sfx2/Library_sfx.mk
+++ b/sfx2/Library_sfx.mk
@@ -56,6 +56,15 @@ $(eval $(call gb_Library_set_defs,sfx,\
-DSFX2_DLLIMPLEMENTATION \
))
+ifeq ($(ENABLE_SYSTRAY_GTK),TRUE)
+$(eval $(call gb_Library_set_defs,sfx,\
+ $$(DEFS) \
+ -DENABLE_QUICKSTART_APPLET \
+ -DENABLE_SYSTRAY_GTK \
+ -DPLUGIN_NAME=libqstart_gtk$(gb_Library_OOOEXT) \
+))
+endif
+
$(eval $(call gb_Library_add_linked_libs,sfx,\
comphelper \
cppu \
diff --git a/sfx2/source/appl/shutdownicon.cxx b/sfx2/source/appl/shutdownicon.cxx
index abbcc16e388f..71977cdd8808 100644
--- a/sfx2/source/appl/shutdownicon.cxx
+++ b/sfx2/source/appl/shutdownicon.cxx
@@ -90,7 +90,7 @@ extern "C" { static void SAL_CALL thisModule() {} }
# endif
#endif
-#if defined(UNX) && defined(ENABLE_SYSTRAY_GTK)
+#if defined(UNX) && defined(ENABLE_SYSTRAY_GTK) && !defined(PLUGIN_NAME)
#define PLUGIN_NAME "libqstart_gtkli.so"
#endif
diff --git a/sfx2/source/bastyp/fltfnc.cxx b/sfx2/source/bastyp/fltfnc.cxx
index 533320e64acd..47ff3746be87 100644
--- a/sfx2/source/bastyp/fltfnc.cxx
+++ b/sfx2/source/bastyp/fltfnc.cxx
@@ -302,8 +302,12 @@ SfxFilterMatcher::SfxFilterMatcher()
SfxFilterMatcher::~SfxFilterMatcher()
{
if ( !pImpl->aName.getLength() )
+ {
// only the global Matcher owns his ImplData
+ if( pImplArr )
+ pImplArr->Remove( pImpl );
delete pImpl;
+ }
}
void SfxFilterMatcher_Impl::Update()
diff --git a/sfx2/source/dialog/passwd.cxx b/sfx2/source/dialog/passwd.cxx
index 41a5de5650f1..87db172258f2 100644
--- a/sfx2/source/dialog/passwd.cxx
+++ b/sfx2/source/dialog/passwd.cxx
@@ -124,6 +124,7 @@ SfxPasswordDialog::SfxPasswordDialog( Window* pParent, const String* pGroupText
maMinLenPwdStr ( SfxResId( STR_PASSWD_MIN_LEN ) ),
maEmptyPwdStr ( SfxResId( STR_PASSWD_EMPTY ) ),
maMainPwdStr ( ),
+ mnMinLen ( 5 ),
mnExtras ( 0 ),
mbAsciiOnly ( false )
diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx
index 21ca852d547e..625674af4c66 100644
--- a/sfx2/source/dialog/templdlg.cxx
+++ b/sfx2/source/dialog/templdlg.cxx
@@ -29,6 +29,9 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sfx2.hxx"
+#include <boost/noncopyable.hpp>
+#include <boost/scoped_ptr.hpp>
+
#include <vcl/menu.hxx>
#include <svl/intitem.hxx>
#include <svl/stritem.hxx>
@@ -116,6 +119,39 @@ SFX_IMPL_DOCKINGWINDOW(SfxTemplateDialogWrapper, SID_STYLE_DESIGNER)
//-------------------------------------------------------------------------
+class SfxCommonTemplateDialog_Impl::DeletionWatcher : private boost::noncopyable
+{
+ typedef void (DeletionWatcher::* bool_type)();
+
+public:
+ explicit DeletionWatcher(SfxCommonTemplateDialog_Impl& rDialog)
+ : m_pDialog(&rDialog)
+ {
+ m_pDialog->impl_setDeletionWatcher(this);
+ }
+
+ ~DeletionWatcher()
+ {
+ if (m_pDialog)
+ m_pDialog->impl_setDeletionWatcher(0);
+ }
+
+ // Signal that the dialog was deleted
+ void signal()
+ {
+ m_pDialog = 0;
+ }
+
+ // Return true if the dialog was deleted
+ operator bool_type() const
+ {
+ return m_pDialog ? 0 : &DeletionWatcher::signal;
+ }
+
+private:
+ SfxCommonTemplateDialog_Impl* m_pDialog;
+};
+
// Re-direct functions
SfxTemplateDialog::SfxTemplateDialog
@@ -741,7 +777,7 @@ SfxCommonTemplateDialog_Impl::SfxCommonTemplateDialog_Impl( SfxBindings* pB, Sfx
pCurObjShell ( NULL ),
xModuleManager ( ::comphelper::getProcessServiceFactory()->createInstance(
DEFINE_CONST_UNICODE("com.sun.star.frame.ModuleManager") ), UNO_QUERY ),
- pbDeleted ( NULL ),
+ m_pDeletionWatcher ( NULL ),
aFmtLb ( this, WB_BORDER | WB_TABSTOP | WB_SORT | WB_QUICK_SEARCH ),
aFilterLb ( pW, WB_BORDER | WB_DROPDOWN | WB_TABSTOP ),
@@ -786,7 +822,7 @@ SfxCommonTemplateDialog_Impl::SfxCommonTemplateDialog_Impl( SfxBindings* pB, Mod
pStyleSheetPool ( NULL ),
pTreeBox ( NULL ),
pCurObjShell ( NULL ),
- pbDeleted ( NULL ),
+ m_pDeletionWatcher ( NULL ),
aFmtLb ( this, SfxResId( BT_VLIST ) ),
aFilterLb ( pW, SfxResId( BT_FLIST ) ),
@@ -959,6 +995,11 @@ void SfxCommonTemplateDialog_Impl::ClearResource()
DELETEZ( m_pStyleFamiliesId );
}
+void SfxCommonTemplateDialog_Impl::impl_setDeletionWatcher(DeletionWatcher* pNewWatcher)
+{
+ m_pDeletionWatcher = pNewWatcher;
+}
+
//-------------------------------------------------------------------------
void SfxCommonTemplateDialog_Impl::Initialize()
@@ -997,11 +1038,8 @@ SfxCommonTemplateDialog_Impl::~SfxCommonTemplateDialog_Impl()
pStyleSheetPool = NULL;
delete pTreeBox;
delete pTimer;
- if ( pbDeleted )
- {
- pbDeleted->bDead = true;
- pbDeleted = NULL;
- }
+ if ( m_pDeletionWatcher )
+ m_pDeletionWatcher->signal();
}
//-------------------------------------------------------------------------
@@ -1695,15 +1733,15 @@ sal_Bool SfxCommonTemplateDialog_Impl::Execute_Impl(
pItems[ nCount++ ] = 0;
- Deleted aDeleted;
- pbDeleted = &aDeleted;
+ DeletionWatcher aDeleted(*this);
sal_uInt16 nModi = pModifier ? *pModifier : 0;
const SfxPoolItem* pItem = rDispatcher.Execute(
nId, SFX_CALLMODE_SYNCHRON | SFX_CALLMODE_RECORD | SFX_CALLMODE_MODAL,
pItems, nModi );
- // FIXME: Dialog can be destroyed while in Execute() check stack variable for dtor flag!
- if ( !pItem || aDeleted() )
+ // Dialog can be destroyed while in Execute() because started
+ // subdialogs are not modal to it (#i97888#).
+ if ( !pItem || aDeleted )
return sal_False;
if ( nId == SID_STYLE_NEW || SID_STYLE_EDIT == nId )
@@ -1725,10 +1763,6 @@ sal_Bool SfxCommonTemplateDialog_Impl::Execute_Impl(
}
}
- // Reset destroyed flag otherwise we use the pointer in the dtor
- // where the local stack object is already destroyed. This would
- // overwrite objects on the stack!! See #i100110
- pbDeleted = NULL;
return sal_True;
}
diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx
index e5c575298a87..575e32e22ca5 100644
--- a/sfx2/source/doc/docfile.cxx
+++ b/sfx2/source/doc/docfile.cxx
@@ -3330,11 +3330,12 @@ sal_Bool SfxMedium::SetWritableForUserOnly( const ::rtl::OUString& aURL )
{
sal_uInt64 nAttributes = aFileStatus.getAttributes();
- nAttributes &= ~(Attribute_OwnWrite |
- Attribute_GrpWrite |
- Attribute_OthWrite |
- Attribute_ReadOnly);
- nAttributes |= Attribute_OwnWrite;
+ nAttributes &= ~(osl_File_Attribute_OwnWrite |
+ osl_File_Attribute_GrpWrite |
+ osl_File_Attribute_OthWrite |
+ osl_File_Attribute_ReadOnly);
+ nAttributes |= (osl_File_Attribute_OwnWrite |
+ osl_File_Attribute_OwnRead);
bResult = ( osl::File::setAttributes( aURL, nAttributes ) == ::osl::FileBase::E_None );
}
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index 954df88eb949..76c8cfac2bd6 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -2811,7 +2811,7 @@ sal_Bool SfxObjectShell::PreDoSaveAs_Impl
// in "SaveAs" title and password will be cleared ( maybe the new itemset contains new values, otherwise they will be empty )
pMergedParams->ClearItem( SID_PASSWORD );
pMergedParams->ClearItem( SID_DOCINFO_TITLE );
-
+ pMergedParams->ClearItem( SID_ENCRYPTIONDATA );
pMergedParams->ClearItem( SID_INPUTSTREAM );
pMergedParams->ClearItem( SID_STREAM );
pMergedParams->ClearItem( SID_CONTENT );
diff --git a/sfx2/source/doc/oleprops.cxx b/sfx2/source/doc/oleprops.cxx
index 0e6113f94f99..e250687c6fef 100644
--- a/sfx2/source/doc/oleprops.cxx
+++ b/sfx2/source/doc/oleprops.cxx
@@ -1156,7 +1156,7 @@ void SfxOlePropertySet::ImplLoad( SvStream& rStrm )
sal_uInt16 nOsMinor;
sal_uInt16 nOsType;
SvGlobalName aGuid;
- sal_Int32 nSectCount;
+ sal_Int32 nSectCount(0);
rStrm >> nByteOrder >> nVersion >> nOsMinor >> nOsType >> aGuid >> nSectCount;
// read sections
diff --git a/sfx2/source/inc/templdgi.hxx b/sfx2/source/inc/templdgi.hxx
index c7d4e94d7f19..464a0af94b3d 100644
--- a/sfx2/source/inc/templdgi.hxx
+++ b/sfx2/source/inc/templdgi.hxx
@@ -102,18 +102,12 @@ public:
// class SfxCommonTemplateDialog_Impl ------------------------------------
-struct Deleted
-{
- bool bDead;
-
- Deleted() : bDead(false) {}
-
- inline bool operator()() { return bDead; }
-};
-
class SfxCommonTemplateDialog_Impl : public SfxListener
{
private:
+ class DeletionWatcher;
+ friend class DeletionWatcher;
+
class ISfxTemplateCommon_Impl : public ISfxTemplateCommon
{
private:
@@ -129,6 +123,8 @@ private:
void ReadResource();
void ClearResource();
+ void impl_setDeletionWatcher(DeletionWatcher* pNewWatcher);
+
protected:
#define MAX_FAMILIES 5
#define COUNT_BOUND_FUNC 13
@@ -155,7 +151,7 @@ protected:
SfxObjectShell* pCurObjShell;
::com::sun::star::uno::Reference< ::com::sun::star::frame::XModuleManager >
xModuleManager;
- Deleted* pbDeleted;
+ DeletionWatcher* m_pDeletionWatcher;
SfxActionListBox aFmtLb;
ListBox aFilterLb;
diff --git a/solenv/bin/modules/installer/windows/feature.pm b/solenv/bin/modules/installer/windows/feature.pm
index e5aa5f5a3fdc..fa8ebd2cae1a 100644
--- a/solenv/bin/modules/installer/windows/feature.pm
+++ b/solenv/bin/modules/installer/windows/feature.pm
@@ -432,6 +432,45 @@ sub create_feature_table
}
}
+ # Sorting names of language packs and dictionaries
+ my @tempfeaturetable;
+ my @langlist;
+ my @langpack;
+ my @dictlist;
+ my @sorteddictlist;
+ my @sortedlanglist;
+
+ foreach (@featuretable) {
+ if (/^gm_r_Extension_Dictionary_/) {
+ push (@dictlist, $_);
+ }
+ elsif (/^gm_Langpack_r_/) {
+ push (@langlist, $_);
+ }
+ elsif (/\tgm_Langpack_r_/) {
+ push (@langpack, $_);
+ }
+ else {
+ push (@tempfeaturetable, $_);
+ }
+ }
+
+ @sorteddictlist = sort { (split(/\t/, $a))[2] cmp (split(/\t/, $b))[2] } @dictlist;
+ @sortedlanglist = sort { (split(/\t/, $a))[2] cmp (split(/\t/, $b))[2] } @langlist;
+
+ @featuretable = (@tempfeaturetable, @sorteddictlist);
+
+ foreach (@sortedlanglist) {
+ my $sortedlanglistline = $_;
+ push (@featuretable, $sortedlanglistline);
+ foreach (@langpack) {
+ my $langpackline = $_;
+ if ( (split(/\t/, $langpackline))[1] eq (split(/\t/, $sortedlanglistline))[0] ) {
+ push (@featuretable, $langpackline);
+ }
+ }
+ }
+
# Saving the file
my $featuretablename = $basedir . $installer::globals::separator . "Feature.idt" . "." . $onelanguage;
diff --git a/solenv/inc/minor.mk b/solenv/inc/minor.mk
index 711b66fd99ea..83e82927e821 100644
--- a/solenv/inc/minor.mk
+++ b/solenv/inc/minor.mk
@@ -1,5 +1,5 @@
RSCVERSION=340
-RSCREVISION=340m1(Build:101)
-BUILD=101
+RSCREVISION=340m1(Build:201)
+BUILD=201
LAST_MINOR=m1
SOURCEVERSION=OOO340
diff --git a/sot/source/sdstor/stgdir.cxx b/sot/source/sdstor/stgdir.cxx
index 4951daa70a6c..fc9610a6af3b 100644
--- a/sot/source/sdstor/stgdir.cxx
+++ b/sot/source/sdstor/stgdir.cxx
@@ -853,7 +853,10 @@ void StgDirStrm::SetupEntry( sal_Int32 n, StgDirEntry* pUpper )
}
else
{
- rIo.SetError( SVSTREAM_CANNOT_MAKE );
+ // bnc#682484: There are some really broken docs out there
+ // that contain duplicate entries in 'Directory' section
+ // so don't set the error flag here and just skip those
+ // (was: rIo.SetError( SVSTREAM_CANNOT_MAKE );)
delete pCur; pCur = NULL;
return;
}
diff --git a/sot/source/sdstor/stgstrms.cxx b/sot/source/sdstor/stgstrms.cxx
index fe40be155b9e..48e8de3ede6d 100644
--- a/sot/source/sdstor/stgstrms.cxx
+++ b/sot/source/sdstor/stgstrms.cxx
@@ -798,7 +798,7 @@ void* StgDataStrm::GetPtr( sal_Int32 Pos, sal_Bool bForce, sal_Bool bDirty )
if( Pos2Page( Pos ) )
{
StgPage* pPg = rIo.Get( nPage, bForce );
- if( pPg )
+ if (pPg && nOffset < pPg->GetSize())
{
pPg->SetOwner( pEntry );
if( bDirty )
diff --git a/starmath/source/mathtype.hxx b/starmath/source/mathtype.hxx
index cfacad560290..e37d388f8e8a 100644
--- a/starmath/source/mathtype.hxx
+++ b/starmath/source/mathtype.hxx
@@ -64,14 +64,16 @@ class MathType
public:
MathType(String &rIn) :
rRet(rIn), nHAlign(0), nVAlign(0), nDefaultSize(12),
- nLSize(0), nDSize(0), nCurSize(0), nLastSize(0), bIsSilent(sal_False)
+ nLSize(0), nDSize(0), nCurSize(0), nLastSize(0), bIsSilent(sal_False),
+ nTypeFace(0)
{
Init();
}
MathType(String &rIn,SmNode *pIn) :
rRet(rIn), pTree(pIn), nHAlign(2), nVAlign(0), nInsertion(0), nDefaultSize(12),
- nLSize(0), nDSize(0), nCurSize(0), nLastSize(0), nSpec(0), bIsSilent(sal_False)
+ nLSize(0), nDSize(0), nCurSize(0), nLastSize(0), nSpec(0), bIsSilent(sal_False),
+ nTypeFace(0)
{
Init();
}
diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx
index 9a159c2818f1..2102c451e6ce 100644
--- a/svl/source/numbers/zforlist.cxx
+++ b/svl/source/numbers/zforlist.cxx
@@ -2749,7 +2749,6 @@ void SvNumberFormatter::GenerateFormat(String& sString,
const String& rThSep = GetNumThousandSep();
SvNumberformat* pFormat = (SvNumberformat*) aFTable.Get(nIndex);
- sal_Bool insertBrackets = pFormat->IsNegativeInBracket();
if (nAnzLeading == 0)
{
@@ -2843,36 +2842,42 @@ void SvNumberFormatter::GenerateFormat(String& sString,
sString += ';';
sString += sNegStr;
}
- if ( (IsRed || insertBrackets ) && eType != NUMBERFORMAT_CURRENCY)
+ if (eType != NUMBERFORMAT_CURRENCY)
{
- String sTmpStr = sString;
-
- if ( pFormat->HasPositiveBracketPlaceholder() )
+ bool insertBrackets = false;
+ if ( eType != NUMBERFORMAT_UNDEFINED)
+ insertBrackets = pFormat->IsNegativeInBracket();
+ if (IsRed || insertBrackets)
{
- sTmpStr += '_';
- sTmpStr += ')';
- }
- sTmpStr += ';';
+ String sTmpStr = sString;
- if (IsRed)
- {
- sTmpStr += '[';
- sTmpStr += pFormatScanner->GetRedString();
- sTmpStr += ']';
- }
+ if ( pFormat->HasPositiveBracketPlaceholder() )
+ {
+ sTmpStr += '_';
+ sTmpStr += ')';
+ }
+ sTmpStr += ';';
- if (insertBrackets)
- {
- sTmpStr += '(';
- sTmpStr += sString;
- sTmpStr += ')';
- }
- else
- {
- sTmpStr += '-';
- sTmpStr +=sString;
- }
- sString = sTmpStr;
+ if (IsRed)
+ {
+ sTmpStr += '[';
+ sTmpStr += pFormatScanner->GetRedString();
+ sTmpStr += ']';
+ }
+
+ if (insertBrackets)
+ {
+ sTmpStr += '(';
+ sTmpStr += sString;
+ sTmpStr += ')';
+ }
+ else
+ {
+ sTmpStr += '-';
+ sTmpStr +=sString;
+ }
+ sString = sTmpStr;
+ }
}
}
diff --git a/svtools/source/filter.vcl/wmf/enhwmf.cxx b/svtools/source/filter.vcl/wmf/enhwmf.cxx
index 91cabcf430a3..3f83a3c0daab 100644
--- a/svtools/source/filter.vcl/wmf/enhwmf.cxx
+++ b/svtools/source/filter.vcl/wmf/enhwmf.cxx
@@ -261,22 +261,27 @@ void EnhWMFReader::ReadEMFPlusComment(sal_uInt32 length, sal_Bool& bHaveDC)
}
bEMFPlus = true;
+ sal_Size pos = pWMF->Tell();
void *buffer = malloc( length );
-
- int pos = pWMF->Tell();
pOut->PassEMFPlus( buffer, pWMF->Read( buffer, length ) );
+ free( buffer );
pWMF->Seek( pos );
bHaveDC = false;
- length -= 4;
+ OSL_ASSERT(length >= 4);
+ //reduce by 32bit length itself, skip in SeekRel if
+ //impossibly unavailble
+ sal_uInt32 nRemainder = length >= 4 ? length-4 : length;
- while (length > 0) {
- sal_uInt16 type, flags;
- sal_uInt32 size, dataSize;
- sal_uInt32 next;
+ const size_t nRequiredHeaderSize = 12;
+ while (nRemainder > nRequiredHeaderSize)
+ {
+ sal_uInt16 type(0), flags(0);
+ sal_uInt32 size(0), dataSize(0);
*pWMF >> type >> flags >> size >> dataSize;
+ nRemainder -= nRequiredHeaderSize;
EMFP_DEBUG(printf ("\t\tEMF+ record type: %d\n", type));
@@ -286,14 +291,16 @@ void EnhWMFReader::ReadEMFPlusComment(sal_uInt32 length, sal_Bool& bHaveDC)
EMFP_DEBUG(printf ("\t\tEMF+ lock DC (device context)\n", type));
}
- next = pWMF->Tell() + ( size - 12 );
-
- length -= size;
-
- pWMF->Seek( next );
+ //Get the length of the remaining data of this record based
+ //on the alleged size
+ sal_uInt32 nRemainingRecordData = size >= nRequiredHeaderSize ?
+ size-nRequiredHeaderSize : 0;
+ //clip to available size
+ nRemainingRecordData = std::min(nRemainingRecordData, nRemainder);
+ pWMF->SeekRel(nRemainingRecordData);
+ nRemainder -= nRemainingRecordData;
}
-
- free( buffer );
+ pWMF->SeekRel(nRemainder);
}
void EnhWMFReader::ReadGDIComment()
diff --git a/sw/qa/core/data/ww8/pass/CVE-2006-3493-1.doc b/sw/qa/core/data/ww8/pass/CVE-2006-3493-1.doc
new file mode 100644
index 000000000000..af452ddc0e5f
--- /dev/null
+++ b/sw/qa/core/data/ww8/pass/CVE-2006-3493-1.doc
Binary files differ
diff --git a/sw/qa/core/data/ww8/pass/CVE-2006-6628-1.doc b/sw/qa/core/data/ww8/pass/CVE-2006-6628-1.doc
new file mode 100644
index 000000000000..240ea77bca12
--- /dev/null
+++ b/sw/qa/core/data/ww8/pass/CVE-2006-6628-1.doc
Binary files differ
diff --git a/sw/qa/core/data/ww8/pass/CVE-2007-1347-1.doc b/sw/qa/core/data/ww8/pass/CVE-2007-1347-1.doc
new file mode 100644
index 000000000000..d25e62ab2416
--- /dev/null
+++ b/sw/qa/core/data/ww8/pass/CVE-2007-1347-1.doc
Binary files differ
diff --git a/sw/qa/core/data/ww8/pass/CVE-2008-2752-1.doc b/sw/qa/core/data/ww8/pass/CVE-2008-2752-1.doc
new file mode 100644
index 000000000000..f51fa8fe9b2e
--- /dev/null
+++ b/sw/qa/core/data/ww8/pass/CVE-2008-2752-1.doc
Binary files differ
diff --git a/sw/qa/core/data/ww8/pass/CVE-2008-2752-2.doc b/sw/qa/core/data/ww8/pass/CVE-2008-2752-2.doc
new file mode 100644
index 000000000000..7ce7a07bb6e2
--- /dev/null
+++ b/sw/qa/core/data/ww8/pass/CVE-2008-2752-2.doc
Binary files differ
diff --git a/sw/qa/core/data/ww8/pass/CVE-2008-2752-3.doc b/sw/qa/core/data/ww8/pass/CVE-2008-2752-3.doc
new file mode 100644
index 000000000000..8b04872af739
--- /dev/null
+++ b/sw/qa/core/data/ww8/pass/CVE-2008-2752-3.doc
Binary files differ
diff --git a/sw/qa/core/data/ww8/pass/CVE-2008-2752-4.doc b/sw/qa/core/data/ww8/pass/CVE-2008-2752-4.doc
new file mode 100644
index 000000000000..148a30d4ab35
--- /dev/null
+++ b/sw/qa/core/data/ww8/pass/CVE-2008-2752-4.doc
Binary files differ
diff --git a/sw/qa/core/data/ww8/pass/CVE-2008-4841-1.doc b/sw/qa/core/data/ww8/pass/CVE-2008-4841-1.doc
new file mode 120000
index 000000000000..f099938bc1a8
--- /dev/null
+++ b/sw/qa/core/data/ww8/pass/CVE-2008-4841-1.doc
@@ -0,0 +1 @@
+CVE-2009-0259-1.doc \ No newline at end of file
diff --git a/sw/qa/core/data/ww8/pass/CVE-2009-0259-1.doc b/sw/qa/core/data/ww8/pass/CVE-2009-0259-1.doc
new file mode 100644
index 000000000000..0942b6d8d466
--- /dev/null
+++ b/sw/qa/core/data/ww8/pass/CVE-2009-0259-1.doc
Binary files differ
diff --git a/sw/qa/core/data/ww8/pass/CVE-2010-3200-1.doc b/sw/qa/core/data/ww8/pass/CVE-2010-3200-1.doc
new file mode 100644
index 000000000000..596aec93bd60
--- /dev/null
+++ b/sw/qa/core/data/ww8/pass/CVE-2010-3200-1.doc
Binary files differ
diff --git a/sw/source/core/doc/docnew.cxx b/sw/source/core/doc/docnew.cxx
index 85f3b33ae9c9..a7a9a6e0b94b 100644
--- a/sw/source/core/doc/docnew.cxx
+++ b/sw/source/core/doc/docnew.cxx
@@ -909,39 +909,40 @@ void SwDoc::UpdateLinks( sal_Bool bUI )
{
SfxObjectCreateMode eMode;
sal_uInt16 nLinkMode = getLinkUpdateMode( true );
- sal_uInt16 nUpdateDocMode = GetDocShell()->GetUpdateDocMode();
- if( GetDocShell() &&
- (nLinkMode != NEVER || document::UpdateDocMode::FULL_UPDATE == nUpdateDocMode) &&
- GetLinkManager().GetLinks().Count() &&
- SFX_CREATE_MODE_INTERNAL !=
- ( eMode = GetDocShell()->GetCreateMode()) &&
- SFX_CREATE_MODE_ORGANIZER != eMode &&
- SFX_CREATE_MODE_PREVIEW != eMode &&
- !GetDocShell()->IsPreview() )
- {
- ViewShell* pVSh = 0;
- sal_Bool bAskUpdate = nLinkMode == MANUAL;
- sal_Bool bUpdate = sal_True;
- switch(nUpdateDocMode)
- {
- case document::UpdateDocMode::NO_UPDATE: bUpdate = sal_False;break;
- case document::UpdateDocMode::QUIET_UPDATE:bAskUpdate = sal_False; break;
- case document::UpdateDocMode::FULL_UPDATE: bAskUpdate = sal_True; break;
- }
- if( bUpdate && (bUI || !bAskUpdate) )
+ if ( GetDocShell()) {
+ sal_uInt16 nUpdateDocMode = GetDocShell()->GetUpdateDocMode();
+ if( (nLinkMode != NEVER || document::UpdateDocMode::FULL_UPDATE == nUpdateDocMode) &&
+ GetLinkManager().GetLinks().Count() &&
+ SFX_CREATE_MODE_INTERNAL !=
+ ( eMode = GetDocShell()->GetCreateMode()) &&
+ SFX_CREATE_MODE_ORGANIZER != eMode &&
+ SFX_CREATE_MODE_PREVIEW != eMode &&
+ !GetDocShell()->IsPreview() )
{
- SfxMedium* pMedium = GetDocShell()->GetMedium();
- SfxFrame* pFrm = pMedium ? pMedium->GetLoadTargetFrame() : 0;
- Window* pDlgParent = pFrm ? &pFrm->GetWindow() : 0;
- if( GetCurrentViewShell() && !GetEditShell( &pVSh ) && !pVSh ) //swmod 071108//swmod 071225
+ ViewShell* pVSh = 0;
+ sal_Bool bAskUpdate = nLinkMode == MANUAL;
+ sal_Bool bUpdate = sal_True;
+ switch(nUpdateDocMode)
{
- ViewShell aVSh( *this, 0, 0 );
+ case document::UpdateDocMode::NO_UPDATE: bUpdate = sal_False;break;
+ case document::UpdateDocMode::QUIET_UPDATE:bAskUpdate = sal_False; break;
+ case document::UpdateDocMode::FULL_UPDATE: bAskUpdate = sal_True; break;
+ }
+ if( bUpdate && (bUI || !bAskUpdate) )
+ {
+ SfxMedium* pMedium = GetDocShell()->GetMedium();
+ SfxFrame* pFrm = pMedium ? pMedium->GetLoadTargetFrame() : 0;
+ Window* pDlgParent = pFrm ? &pFrm->GetWindow() : 0;
+ if( GetCurrentViewShell() && !GetEditShell( &pVSh ) && !pVSh ) //swmod 071108//swmod 071225
+ {
+ ViewShell aVSh( *this, 0, 0 );
- SET_CURR_SHELL( &aVSh );
- GetLinkManager().UpdateAllLinks( bAskUpdate , sal_True, sal_False, pDlgParent );
+ SET_CURR_SHELL( &aVSh );
+ GetLinkManager().UpdateAllLinks( bAskUpdate , sal_True, sal_False, pDlgParent );
+ }
+ else
+ GetLinkManager().UpdateAllLinks( bAskUpdate, sal_True, sal_False, pDlgParent );
}
- else
- GetLinkManager().UpdateAllLinks( bAskUpdate, sal_True, sal_False, pDlgParent );
}
}
diff --git a/sw/source/core/doc/notxtfrm.cxx b/sw/source/core/doc/notxtfrm.cxx
index fb8355880843..4d707dfd7f4f 100644
--- a/sw/source/core/doc/notxtfrm.cxx
+++ b/sw/source/core/doc/notxtfrm.cxx
@@ -819,9 +819,10 @@ void SwNoTxtFrm::PaintPicture( OutputDevice* pOut, const SwRect &rGrfArea ) cons
if( pGrfNd )
{
// Fix for bug fdo#33781
+ const sal_uInt16 nFormerAntialiasingAtOutput( pOut->GetAntialiasing() );
if (pShell->Imp()->GetDrawView()->IsAntiAliasing())
{
- pOut->SetAntialiasing( ANTIALIASING_ENABLE_B2DDRAW );
+ pOut->SetAntialiasing( nFormerAntialiasingAtOutput | ANTIALIASING_ENABLE_B2DDRAW );
}
sal_Bool bForceSwap = sal_False, bContinue = sal_True;
@@ -938,8 +939,12 @@ void SwNoTxtFrm::PaintPicture( OutputDevice* pOut, const SwRect &rGrfArea ) cons
if( bSwapped && bPrn )
bForceSwap = sal_True;
}
+
if( bForceSwap )
pGrfNd->SwapOut();
+
+ if ( pShell->Imp()->GetDrawView()->IsAntiAliasing() )
+ pOut->SetAntialiasing( nFormerAntialiasingAtOutput );
}
else if( bIsChart
//charts must be painted resolution dependent!! #i82893#, #i75867#
@@ -952,15 +957,18 @@ void SwNoTxtFrm::PaintPicture( OutputDevice* pOut, const SwRect &rGrfArea ) cons
}
else if( pOLENd )
{
- // #i99665#
- // Adjust AntiAliasing mode at output device for chart OLE
+ // Fix for bug fdo#33781
const sal_uInt16 nFormerAntialiasingAtOutput( pOut->GetAntialiasing() );
- if ( pOLENd->IsChart() &&
- pShell->Imp()->GetDrawView()->IsAntiAliasing() )
+ if (pShell->Imp()->GetDrawView()->IsAntiAliasing())
{
- const sal_uInt16 nAntialiasingForChartOLE =
- nFormerAntialiasingAtOutput | ANTIALIASING_PIXELSNAPHAIRLINE;
- pOut->SetAntialiasing( nAntialiasingForChartOLE );
+ sal_uInt16 nNewAntialiasingAtOutput = nFormerAntialiasingAtOutput | ANTIALIASING_ENABLE_B2DDRAW;
+
+ // #i99665#
+ // Adjust AntiAliasing mode at output device for chart OLE
+ if ( pOLENd->IsChart() )
+ nNewAntialiasingAtOutput |= ANTIALIASING_PIXELSNAPHAIRLINE;
+
+ pOut->SetAntialiasing( nNewAntialiasingAtOutput );
}
// <--
@@ -1006,13 +1014,8 @@ void SwNoTxtFrm::PaintPicture( OutputDevice* pOut, const SwRect &rGrfArea ) cons
((SwFEShell*)pShell)->ConnectObj( pOLENd->GetOLEObj().GetObject(), pFly->Prt(), pFly->Frm());
}
- // #i99665#
- if ( pOLENd->IsChart() &&
- pShell->Imp()->GetDrawView()->IsAntiAliasing() )
- {
+ if ( pShell->Imp()->GetDrawView()->IsAntiAliasing() )
pOut->SetAntialiasing( nFormerAntialiasingAtOutput );
- }
- // <--
}
}
diff --git a/sw/source/core/docnode/ndcopy.cxx b/sw/source/core/docnode/ndcopy.cxx
index 090c9654b501..d9e9a4977794 100644
--- a/sw/source/core/docnode/ndcopy.cxx
+++ b/sw/source/core/docnode/ndcopy.cxx
@@ -186,14 +186,25 @@ namespace
// Explicitly try to get exactly the same name as in the source
// because NavigatorReminders, DdeBookmarks etc. ignore the proposed name
pDestDoc->getIDocumentMarkAccess()->renameMark(pNewMark, pMark->GetName());
+
+ // copying additional attributes for bookmarks or fieldmarks
::sw::mark::IBookmark* const pNewBookmark =
dynamic_cast< ::sw::mark::IBookmark* const >(pNewMark);
- if(pNewBookmark) /* copying additional attributes for bookmarks */
+ if(pNewBookmark)
{
const ::sw::mark::IBookmark* const pOldBookmark = dynamic_cast< const ::sw::mark::IBookmark* >(pMark);
pNewBookmark->SetKeyCode(pOldBookmark->GetKeyCode());
pNewBookmark->SetShortName(pOldBookmark->GetShortName());
}
+ ::sw::mark::IFieldmark* const pNewFieldmark =
+ dynamic_cast< ::sw::mark::IFieldmark* const >(pNewMark);
+ if(pNewFieldmark)
+ {
+ const ::sw::mark::IFieldmark* const pOldFieldmark = dynamic_cast< const ::sw::mark::IFieldmark* >(pMark);
+ pNewFieldmark->SetFieldname(pOldFieldmark->GetFieldname());
+ pNewFieldmark->SetFieldHelptext(pOldFieldmark->GetFieldHelptext());
+ }
+
::sfx2::Metadatable const*const pMetadatable(
dynamic_cast< ::sfx2::Metadatable const* >(pMark));
::sfx2::Metadatable *const pNewMetadatable(
diff --git a/sw/source/core/layout/ftnfrm.cxx b/sw/source/core/layout/ftnfrm.cxx
index 608ecb57ddd5..61b3a0504a96 100644
--- a/sw/source/core/layout/ftnfrm.cxx
+++ b/sw/source/core/layout/ftnfrm.cxx
@@ -2701,7 +2701,7 @@ void SwPageFrm::UpdateFtnNum()
SwPageFrm* pPage = pTmpBoss->FindPageFrm();
pFtn = NULL;
lcl_NextFtnBoss( pTmpBoss, pPage, sal_False );
- SwFtnContFrm *pCont = pTmpBoss->FindNearestFtnCont();
+ SwFtnContFrm *pCont = pTmpBoss ? pTmpBoss->FindNearestFtnCont() : NULL;
if ( pCont )
pFtn = (SwFtnFrm*)pCont->Lower();
}
diff --git a/sw/source/filter/rtf/swparrtf.cxx b/sw/source/filter/rtf/swparrtf.cxx
index 56df822e16dd..81ab404cd353 100644
--- a/sw/source/filter/rtf/swparrtf.cxx
+++ b/sw/source/filter/rtf/swparrtf.cxx
@@ -1173,7 +1173,7 @@ void SwRTFParser::ReadShpTxt(String& s)
}
/*
- * Very basic support for the "Buchhalternase".
+ * Very basic support for the Z-line.
*/
void SwRTFParser::ReadDrawingObject()
{
@@ -1185,6 +1185,9 @@ void SwRTFParser::ReadDrawingObject()
::basegfx::B2DPoint aPoint;
bool bPolygonActive(false);
+ SwFmtHoriOrient aHori( 0, text::HoriOrientation::NONE, text::RelOrientation::PAGE_FRAME );
+ SwFmtVertOrient aVert( 0, text::VertOrientation::NONE, text::RelOrientation::PAGE_FRAME );
+
while (level>0 && IsParserWorking())
{
nToken = GetNextToken();
@@ -1196,6 +1199,12 @@ void SwRTFParser::ReadDrawingObject()
case '{':
level++;
break;
+ case RTF_DOBXMARGIN:
+ aHori.SetRelationOrient( text::RelOrientation::PAGE_PRINT_AREA );
+ break;
+ case RTF_DOBYMARGIN:
+ aVert.SetRelationOrient( text::RelOrientation::PAGE_PRINT_AREA );
+ break;
case RTF_DPX:
aRect.setX(nTokenValue);
break;
@@ -1208,6 +1217,7 @@ void SwRTFParser::ReadDrawingObject()
case RTF_DPYSIZE:
aRect.setHeight(nTokenValue);
break;
+ case RTF_DPLINE:
case RTF_DPPOLYCOUNT:
bPolygonActive = true;
break;
@@ -1244,9 +1254,7 @@ void SwRTFParser::ReadDrawingObject()
aAnchor.SetAnchor( pPam->GetPoint() );
aFlySet.Put( aAnchor );
- SwFmtHoriOrient aHori( 0, text::HoriOrientation::NONE, text::RelOrientation::PAGE_FRAME );
aFlySet.Put( aHori );
- SwFmtVertOrient aVert( 0, text::VertOrientation::NONE, text::RelOrientation::PAGE_FRAME );
aFlySet.Put( aVert );
pDoc->GetOrCreateDrawModel();
diff --git a/sw/source/filter/ww8/attributeoutputbase.hxx b/sw/source/filter/ww8/attributeoutputbase.hxx
index 25fc96566def..84e58f7ad0cf 100644
--- a/sw/source/filter/ww8/attributeoutputbase.hxx
+++ b/sw/source/filter/ww8/attributeoutputbase.hxx
@@ -539,6 +539,9 @@ protected:
/// Sfx item RES_KEEP
virtual void FormatKeep( const SvxFmtKeepItem& ) = 0;
+ /// Compute the grid character pitch
+ sal_uInt32 GridCharacterPitch( const SwTextGridItem& rGrid ) const;
+
/// Sfx item RES_TEXTGRID
virtual void FormatTextGrid( const SwTextGridItem& ) = 0;
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index 497f8bc4f07b..1e257b16b819 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -4041,23 +4041,8 @@ void DocxAttributeOutput::FormatTextGrid( const SwTextGridItem& rGrid )
pGridAttrList->add( FSNS( XML_w, XML_linePitch ),
OString::valueOf( sal_Int32( nHeight ) ).getStr( ) );
- MSWordStyles * pStyles = m_rExport.pStyles;
- SwFmt * pSwFmt = pStyles->GetSwFmt();
-
- sal_uInt32 nPageCharSize = 0;
-
- if (pSwFmt != NULL)
- {
- nPageCharSize = ItemGet<SvxFontHeightItem>
- (*pSwFmt, RES_CHRATR_FONTSIZE).GetHeight();
- }
-
- sal_uInt16 nPitch = rGrid.IsSquaredMode() ? rGrid.GetBaseHeight() :
- rGrid.GetBaseWidth( );
- sal_Int32 nCharSpace = ( nPitch - nPageCharSize ) * 4096 / 20;
-
pGridAttrList->add( FSNS( XML_w, XML_charSpace ),
- OString::valueOf( sal_Int32( nCharSpace ) ).getStr( ) );
+ OString::valueOf( sal_Int32( GridCharacterPitch( rGrid ) ) ).getStr( ) );
m_pSerializer->singleElementNS( XML_w, XML_docGrid, pGridAttrList );
}
diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx
index 9d5a6f9cf879..7a4540007db5 100644
--- a/sw/source/filter/ww8/wrtw8nds.cxx
+++ b/sw/source/filter/ww8/wrtw8nds.cxx
@@ -1622,7 +1622,7 @@ xub_StrLen MSWordExportBase::GetNextPos( SwWW8AttrIter* aAttrIter, const SwTxtNo
xub_StrLen nNextPos = aAttrIter->WhereNext();
xub_StrLen nNextBookmark = nNextPos;
- if( nNextBookmark > nAktPos )//no need to search for bookmarks otherwise
+ if( nNextBookmark > nAktPos ) //no need to search for bookmarks otherwise (checked in UpdatePosition())
{
GetSortedBookmarks( rNode, nAktPos, nNextBookmark - nAktPos );
NearestBookmark( nNextBookmark, nAktPos, false );
@@ -1634,9 +1634,9 @@ void MSWordExportBase::UpdatePosition( SwWW8AttrIter* aAttrIter, xub_StrLen nAkt
{
xub_StrLen nNextPos;
- // go to next attribute if no bookmark is found and if the next attribute position if at the current position
+ // go to next attribute if no bookmark is found or if the bookmark is behind the next attribute position
bool bNextBookmark = NearestBookmark( nNextPos, nAktPos, true );
- if( !bNextBookmark && nAktPos >= aAttrIter->WhereNext() )
+ if( !bNextBookmark || nNextPos > aAttrIter->WhereNext() )
aAttrIter->NextPos();
}
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index 63ee393bb83a..6e6164172110 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -3641,6 +3641,37 @@ void WW8AttributeOutput::SectionBreak( sal_uInt8 nC, const WW8_SepInfo* /*pSecti
m_rWW8Export.ReplaceCr( nC );
}
+sal_uInt32 AttributeOutputBase::GridCharacterPitch( const SwTextGridItem& rGrid ) const
+{
+ MSWordStyles * pStyles = GetExport().pStyles;
+ SwFmt * pSwFmt = pStyles->GetSwFmt();
+
+ sal_uInt32 nPageCharSize = 0;
+
+ if (pSwFmt != NULL)
+ {
+ nPageCharSize = ItemGet<SvxFontHeightItem>
+ (*pSwFmt, RES_CHRATR_FONTSIZE).GetHeight();
+ }
+ sal_uInt16 nPitch = rGrid.IsSquaredMode() ? rGrid.GetBaseHeight() :
+ rGrid.GetBaseWidth( );
+
+ sal_Int32 nCharWidth = nPitch - nPageCharSize;
+ sal_Int32 nFraction = nCharWidth % 20;
+ if ( nCharWidth < 0 )
+ nFraction = 20 + nFraction;
+ nFraction = ( nFraction * 0xFFF ) / 20;
+ nFraction = ( nFraction & 0x00000FFF );
+
+ sal_Int32 nMain = nCharWidth / 20;
+ if ( nCharWidth < 0 )
+ nMain -= 1;
+ nMain = nMain * 0x1000;
+ nMain = ( nMain & 0xFFFFF000 );
+
+ return sal_uInt32( nFraction + nMain );
+}
+
void WW8AttributeOutput::FormatTextGrid( const SwTextGridItem& rGrid )
{
if ( m_rWW8Export.bOutPageDescs && m_rWW8Export.bWrtWW8 )
@@ -3670,22 +3701,8 @@ void WW8AttributeOutput::FormatTextGrid( const SwTextGridItem& rGrid )
m_rWW8Export.InsUInt16( NS_sprm::LN_SDyaLinePitch );
m_rWW8Export.InsUInt16( nHeight );
- MSWordStyles * pStyles = m_rWW8Export.pStyles;
- SwFmt * pSwFmt = pStyles->GetSwFmt();
-
- sal_uInt32 nPageCharSize = 0;
-
- if (pSwFmt != NULL)
- {
- nPageCharSize = ItemGet<SvxFontHeightItem>
- (*pSwFmt, RES_CHRATR_FONTSIZE).GetHeight();
- }
- sal_uInt16 nPitch = rGrid.IsSquaredMode() ? rGrid.GetBaseHeight() :
- rGrid.GetBaseWidth( );
- sal_Int32 nCharSpace = ( nPitch - nPageCharSize ) * 4096 / 20;
-
m_rWW8Export.InsUInt16( NS_sprm::LN_SDxtCharSpace );
- m_rWW8Export.InsUInt32( nCharSpace );
+ m_rWW8Export.InsUInt32( GridCharacterPitch( rGrid ) );
}
}
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index fd05e95c58b6..e0459945ecf3 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -958,9 +958,9 @@ void SwWW8ImplReader::Read_StyleCode( sal_uInt16, const sal_uInt8* pData, short
nColl = *pData;
else
nColl = SVBT16ToShort(pData);
- if (nColl < nColls)
+ if (nColl < vColl.size())
{
- SetTxtFmtCollAndListLevel( *pPaM, pCollA[nColl] );
+ SetTxtFmtCollAndListLevel( *pPaM, vColl[nColl] );
bCpxStyle = true;
}
}
@@ -1210,8 +1210,8 @@ const SfxPoolItem* SwWW8FltControlStack::GetFmtAttr(const SwPosition& rPos,
SfxItemState eState = SFX_ITEM_DEFAULT;
if (const SfxItemSet *pSet = pNd->GetpSwAttrSet())
eState = pSet->GetItemState(RES_LR_SPACE, false);
- if (eState != SFX_ITEM_SET && rReader.pCollA != NULL)
- pItem = &(rReader.pCollA[rReader.nAktColl].maWordLR);
+ if (eState != SFX_ITEM_SET && !rReader.vColl.empty() && rReader.nAktColl < rReader.vColl.size())
+ pItem = &(rReader.vColl[rReader.nAktColl].maWordLR);
}
/*
@@ -1371,16 +1371,18 @@ void SwWW8ImplReader::Read_Tab(sal_uInt16 , const sal_uInt8* pData, short nLen)
const SwTxtFmtColl* pSty = 0;
sal_uInt16 nTabBase;
- if (pAktColl) // StyleDef
+ if (pAktColl && nAktColl < vColl.size()) // StyleDef
{
- nTabBase = pCollA[nAktColl].nBase;
- if (nTabBase < nColls) // Based On
- pSty = (const SwTxtFmtColl*)pCollA[nTabBase].pFmt;
+ nTabBase = vColl[nAktColl].nBase;
+ if (nTabBase < vColl.size()) // Based On
+ pSty = (const SwTxtFmtColl*)vColl[nTabBase].pFmt;
}
else
{ // Text
nTabBase = nAktColl;
- pSty = (const SwTxtFmtColl*)pCollA[nAktColl].pFmt;
+ if (nAktColl < vColl.size())
+ pSty = (const SwTxtFmtColl*)vColl[nAktColl].pFmt;
+ //TODO figure else here
}
bool bFound = false;
@@ -1397,11 +1399,11 @@ void SwWW8ImplReader::Read_Tab(sal_uInt16 , const sal_uInt8* pData, short nLen)
sal_uInt16 nOldTabBase = nTabBase;
// If based on another
- if (nTabBase < nColls)
- nTabBase = pCollA[nTabBase].nBase;
+ if (nTabBase < vColl.size())
+ nTabBase = vColl[nTabBase].nBase;
if (
- nTabBase < nColls &&
+ nTabBase < vColl.size() &&
nOldTabBase != nTabBase &&
nTabBase != ww::stiNil
)
@@ -1409,7 +1411,9 @@ void SwWW8ImplReader::Read_Tab(sal_uInt16 , const sal_uInt8* pData, short nLen)
// #i61789: Stop searching when next style is the same as the
// current one (prevent loop)
aLoopWatch.insert(reinterpret_cast<size_t>(pSty));
- pSty = (const SwTxtFmtColl*)pCollA[nTabBase].pFmt;
+ if (nTabBase < vColl.size())
+ pSty = (const SwTxtFmtColl*)vColl[nTabBase].pFmt;
+ //TODO figure out the else branch
if (aLoopWatch.find(reinterpret_cast<size_t>(pSty)) !=
aLoopWatch.end())
@@ -2393,10 +2397,10 @@ CharSet SwWW8ImplReader::GetCurrentCharSet()
{
if (!maFontSrcCharSets.empty())
eSrcCharSet = maFontSrcCharSets.top();
- if ((eSrcCharSet == RTL_TEXTENCODING_DONTKNOW) && (nCharFmt != -1))
- eSrcCharSet = pCollA[nCharFmt].GetCharSet();
- if ((eSrcCharSet == RTL_TEXTENCODING_DONTKNOW) && StyleExists(nAktColl))
- eSrcCharSet = pCollA[nAktColl].GetCharSet();
+ if ((eSrcCharSet == RTL_TEXTENCODING_DONTKNOW) && (nCharFmt != -1) && nCharFmt >= 0 && (size_t)nCharFmt < vColl.size() )
+ eSrcCharSet = vColl[nCharFmt].GetCharSet();
+ if ((eSrcCharSet == RTL_TEXTENCODING_DONTKNOW) && StyleExists(nAktColl) && nAktColl < vColl.size())
+ eSrcCharSet = vColl[nAktColl].GetCharSet();
if (eSrcCharSet == RTL_TEXTENCODING_DONTKNOW)
{ // patch from cmc for #i52786#
/*
@@ -2453,12 +2457,12 @@ CharSet SwWW8ImplReader::GetCurrentCJKCharSet()
{
if (!maFontSrcCJKCharSets.empty())
eSrcCharSet = maFontSrcCJKCharSets.top();
- if (pCollA != NULL)
+ if (!vColl.empty())
{
- if ((eSrcCharSet == RTL_TEXTENCODING_DONTKNOW) && (nCharFmt != -1))
- eSrcCharSet = pCollA[nCharFmt].GetCJKCharSet();
- if (eSrcCharSet == RTL_TEXTENCODING_DONTKNOW)
- eSrcCharSet = pCollA[nAktColl].GetCJKCharSet();
+ if ((eSrcCharSet == RTL_TEXTENCODING_DONTKNOW) && (nCharFmt != -1) && nCharFmt >= 0 && (size_t)nCharFmt < vColl.size() )
+ eSrcCharSet = vColl[nCharFmt].GetCJKCharSet();
+ if (eSrcCharSet == RTL_TEXTENCODING_DONTKNOW && nAktColl < vColl.size())
+ eSrcCharSet = vColl[nAktColl].GetCJKCharSet();
}
if (eSrcCharSet == RTL_TEXTENCODING_DONTKNOW)
{ // patch from cmc for #i52786#
@@ -2623,9 +2627,6 @@ bool SwWW8ImplReader::ReadPlainChars(WW8_CP& rPos, long nEnd, long nCpOfs)
// Unicode-Flag neu setzen und notfalls File-Pos korrigieren
// merke: Seek kostet nicht viel, da inline geprueft wird,
// ob die korrekte FilePos nicht schon erreicht ist.
- WW8_FC nStreamPos = pSBase->WW8Cp2Fc(nCpOfs+rPos, &bIsUnicode);
- pStrm->Seek( nStreamPos );
-
xub_StrLen nLen;
if (nEnd - rPos <= (STRING_MAXLEN-1))
nLen = writer_cast<xub_StrLen>(nEnd - rPos);
@@ -2635,6 +2636,16 @@ bool SwWW8ImplReader::ReadPlainChars(WW8_CP& rPos, long nEnd, long nCpOfs)
if (!nLen)
return true;
+ sal_Size nRequestedPos = pSBase->WW8Cp2Fc(nCpOfs+rPos, &bIsUnicode);
+ sal_Size nSeekedPos = pStrm->Seek(nRequestedPos);
+ OSL_ENSURE(nRequestedPos == nSeekedPos, "Document claimed to have more text than available");
+ if (nRequestedPos != nSeekedPos)
+ {
+ //Swallow missing range, e.g. #i95550#
+ rPos+=nLen;
+ return true;
+ }
+
const CharSet eSrcCharSet = bVer67 ? GetCurrentCharSet() :
RTL_TEXTENCODING_MS_1252;
const CharSet eSrcCJKCharSet = bVer67 ? GetCurrentCJKCharSet() :
@@ -3179,7 +3190,7 @@ void SwWW8ImplReader::ProcessAktCollChange(WW8PLCFManResult& rRes,
nAktColl = pPlcxMan->GetColl();
// Invalid Style-Id
- if (nAktColl >= nColls || !pCollA[nAktColl].pFmt || !pCollA[nAktColl].bColl)
+ if (nAktColl >= vColl.size() || !vColl[nAktColl].pFmt || !vColl[nAktColl].bColl)
{
nAktColl = 0;
bParaAutoBefore = false;
@@ -3187,10 +3198,13 @@ void SwWW8ImplReader::ProcessAktCollChange(WW8PLCFManResult& rRes,
}
else
{
- bParaAutoBefore = pCollA[nAktColl].bParaAutoBefore;
- bParaAutoAfter = pCollA[nAktColl].bParaAutoAfter;
+ bParaAutoBefore = vColl[nAktColl].bParaAutoBefore;
+ bParaAutoAfter = vColl[nAktColl].bParaAutoAfter;
}
+ if (nOldColl >= vColl.size())
+ nOldColl = 0; //guess! TODO make sure this is what we want
+
bool bTabRowEnd = false;
if( pStartAttr && bCallProcessSpecial && !bInHyperlink )
{
@@ -3203,10 +3217,10 @@ void SwWW8ImplReader::ProcessAktCollChange(WW8PLCFManResult& rRes,
if (!bTabRowEnd && StyleExists(nAktColl))
{
- SetTxtFmtCollAndListLevel( *pPaM, pCollA[ nAktColl ]);
- ChkToggleAttr(pCollA[ nOldColl ].n81Flags, pCollA[ nAktColl ].n81Flags);
- ChkToggleBiDiAttr(pCollA[nOldColl].n81BiDiFlags,
- pCollA[nAktColl].n81BiDiFlags);
+ SetTxtFmtCollAndListLevel( *pPaM, vColl[ nAktColl ]);
+ ChkToggleAttr(vColl[ nOldColl ].n81Flags, vColl[ nAktColl ].n81Flags);
+ ChkToggleBiDiAttr(vColl[nOldColl].n81BiDiFlags,
+ vColl[nAktColl].n81BiDiFlags);
}
}
@@ -3342,8 +3356,8 @@ void SwWW8ImplReader::ReadAttrs(WW8_CP& rNext, WW8_CP& rTxtPos, bool& rbStartLin
// nicht im Plcx.Fkp.papx eingetragen, d.h. ( nFlags & MAN_MASK_NEW_PAP )
// ist false. Deshalb muss als Sonderbehandlung hier die Vorlage gesetzt
// werden.
- if (!bCpxStyle && nAktColl < nColls)
- SetTxtFmtCollAndListLevel(*pPaM, pCollA[nAktColl]);
+ if (!bCpxStyle && nAktColl < vColl.size())
+ SetTxtFmtCollAndListLevel(*pPaM, vColl[nAktColl]);
rbStartLine = false;
}
}
@@ -3598,7 +3612,6 @@ SwWW8ImplReader::SwWW8ImplReader(sal_uInt8 nVersionPara, SvStorage* pStorage,
pAktColl = 0;
pLstManager = 0;
pAktItemSet = 0;
- pCollA = 0;
pDfltTxtFmtColl = 0;
pStandardFmtColl = 0;
pHdFt = 0;
@@ -3608,7 +3621,7 @@ SwWW8ImplReader::SwWW8ImplReader(sal_uInt8 nVersionPara, SvStorage* pStorage,
pFmtOfJustInsertedApo = 0;
pPreviousNumPaM = 0;
pPrevNumRule = 0;
- nColls = nAktColl = 0;
+ nAktColl = 0;
nObjLocFc = nPicLocFc = 0;
nInTable=0;
bReadNoTbl = bPgSecBreak = bSpec = bObj = bTxbxFlySection
@@ -4427,7 +4440,7 @@ sal_uLong SwWW8ImplReader::CoreLoad(WW8Glossary *pGloss, const SwPosition &rPos)
::SetProgressState(nProgress, mpDocShell); // Update
pStyles->PostProcessStyles();
- if (pCollA)
+ if (!vColl.empty())
SetOutLineStyles();
pSBase = new WW8ScannerBase(pStrm,pTableStream,pDataStream,pWwFib);
@@ -4654,8 +4667,7 @@ sal_uLong SwWW8ImplReader::CoreLoad(WW8Glossary *pGloss, const SwPosition &rPos)
maInsertedTables.DelAndMakeTblFrms();
maSectionManager.InsertSegments();
- if (pCollA)
- delete[] pCollA;
+ vColl.clear();
DELETEZ( pStyles );
@@ -5149,16 +5161,16 @@ void SwWW8ImplReader::SetOutLineStyles()
pick the one that affects most styles. If we're not importing a new
document, we got to stick with what is already there.
*/
- // use index in text format collection array <pCollA>
+ // use index in text format collection array <vColl>
// as key of the outline numbering map <aRuleMap>
// instead of the memory pointer of the outline numbering rule
// to assure that, if two outline numbering rule affect the same
// count of text formats, always the same outline numbering rule is chosen.
std::map<sal_uInt16, int>aRuleMap;
typedef std::map<sal_uInt16, int>::iterator myIter;
- for (sal_uInt16 nI = 0; nI < nColls; ++nI)
+ for (sal_uInt16 nI = 0; nI < vColl.size(); ++nI)
{
- SwWW8StyInf& rSI = pCollA[ nI ];
+ SwWW8StyInf& rSI = vColl[ nI ];
if (
(MAXLEVEL > rSI.nOutlineLevel) && rSI.pOutlineNumrule &&
rSI.pFmt
@@ -5181,7 +5193,10 @@ void SwWW8ImplReader::SetOutLineStyles()
if (aIter->second > nMax)
{
nMax = aIter->second;
- mpChosenOutlineNumRule = pCollA[ aIter->first ].pOutlineNumrule;
+ if(aIter->first < vColl.size())
+ mpChosenOutlineNumRule = vColl[ aIter->first ].pOutlineNumrule;
+ else
+ mpChosenOutlineNumRule = 0; //TODO make sure this is what we want
}
}
// <--
@@ -5208,9 +5223,9 @@ void SwWW8ImplReader::SetOutLineStyles()
sal_uInt16 nOldFlags = nFlagsStyleOutlLevel;
- for (sal_uInt16 nI = 0; nI < nColls; ++nI)
+ for (sal_uInt16 nI = 0; nI < vColl.size(); ++nI)
{
- SwWW8StyInf& rSI = pCollA[nI];
+ SwWW8StyInf& rSI = vColl[nI];
if (rSI.IsOutlineNumbered())
{
@@ -5350,7 +5365,7 @@ sal_uLong SwWW8ImplReader::LoadDoc( SwPaM& rPaM,WW8Glossary *pGloss)
m_bRegardHindiDigits = aVal[ 12 ] > 0;
}
- sal_uInt16 nMagic;
+ sal_uInt16 nMagic(0);
*pStrm >> nMagic;
// beachte: 6 steht fuer "6 ODER 7", 7 steht fuer "NUR 7"
@@ -5646,6 +5661,8 @@ bool SwWW8ImplReader::InEqualApo(int nLvl) const
//the table.
if (nLvl)
--nLvl;
+ if (nLvl < 0 || static_cast<size_t>(nLvl) >= maApos.size())
+ return false;
return maApos[nLvl];
}
diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx
index 2851b8860a3a..97e218cf0192 100644
--- a/sw/source/filter/ww8/ww8par.hxx
+++ b/sw/source/filter/ww8/ww8par.hxx
@@ -50,6 +50,12 @@
#include <xmloff/odffields.hxx>
#include <IMark.hxx>
+#include <swtypes.hxx> // enum RndStdIds
+#include <fmtfsize.hxx>
+#include <fmtornt.hxx>
+#include <fmtsrnd.hxx>
+#include <editeng/lrspitem.hxx>
+
class SwDoc;
class SwPaM;
class SfxPoolItem;
@@ -64,7 +70,6 @@ class SwNumRule;
class SwFrmFmt;
class Writer;
class SwFmtFld;
-class SwWW8StyInf;
class WW8Fib;
class WW8PLCFMan;
struct WW8PLCFManResult;
@@ -177,6 +182,7 @@ struct WW8OleMap
}
};
+
class SwWW8ImplReader;
struct WW8LSTInfo;
class WW8ListManager
@@ -223,6 +229,127 @@ private:
sal_uInt16 nLastLFOPosition;
};
+struct WW8FlyPara
+{ // WinWord-Attribute
+ // Achtung: *Nicht* umsortieren, da Teile mit
+ // memcmp verglichen werden
+ bool bVer67;
+ sal_Int16 nSp26, nSp27; // rohe Position
+ sal_Int16 nSp45, nSp28; // Breite / Hoehe
+ sal_Int16 nLeMgn, nRiMgn, nUpMgn, nLoMgn; // Raender
+ sal_uInt8 nSp29; // rohe Bindung + Alignment
+ sal_uInt8 nSp37; // Wrap-Mode ( 1 / 2; 0 = no Apo ? )
+ WW8_BRC5 brc; // Umrandung Top, Left, Bottom, Right, Between
+ bool bBorderLines; // Umrandungslinien
+ bool bGrafApo; // true: Dieser Rahmen dient allein dazu, die
+ // enthaltene Grafik anders als zeichengebunden
+ // zu positionieren
+ bool mbVertSet; // true if vertical positioning has been set
+
+ WW8FlyPara(bool bIsVer67, const WW8FlyPara* pSrc = 0);
+ bool operator==(const WW8FlyPara& rSrc) const;
+ void Read(sal_uInt8 nSprm29, WW8PLCFx_Cp_FKP* pPap);
+ void ReadFull(sal_uInt8 nSprm29, SwWW8ImplReader* pIo);
+ void Read(sal_uInt8 nSprm29, WW8RStyle* pStyle);
+ void ApplyTabPos(const WW8_TablePos *pTabPos);
+ bool IsEmpty() const;
+};
+
+class SwWW8StyInf
+{
+ String sWWStyleName;
+ sal_uInt16 nWWStyleId;
+public:
+ rtl_TextEncoding eLTRFontSrcCharSet; // rtl_TextEncoding fuer den Font
+ rtl_TextEncoding eRTLFontSrcCharSet; // rtl_TextEncoding fuer den Font
+ rtl_TextEncoding eCJKFontSrcCharSet; // rtl_TextEncoding fuer den Font
+ SwFmt* pFmt;
+ WW8FlyPara* pWWFly;
+ SwNumRule* pOutlineNumrule;
+ long nFilePos;
+ sal_uInt16 nBase;
+ sal_uInt16 nFollow;
+ sal_uInt16 nLFOIndex;
+ sal_uInt8 nListLevel;
+ sal_uInt8 nOutlineLevel; // falls Gliederungs-Style
+ sal_uInt16 n81Flags; // Fuer Bold, Italic, ...
+ sal_uInt16 n81BiDiFlags; // Fuer Bold, Italic, ...
+ SvxLRSpaceItem maWordLR;
+ bool bValid; // leer oder Valid
+ bool bImported; // fuers rekursive Importieren
+ bool bColl; // true-> pFmt ist SwTxtFmtColl
+ bool bImportSkipped; // nur true bei !bNewDoc && vorh. Style
+ bool bHasStyNumRule; // true-> Benannter NumRule in Style
+ bool bHasBrokenWW6List; // true-> WW8+ style has a WW7- list
+ bool bListReleventIndentSet; //true if this style's indent has
+ //been explicitly set, it's set to the value
+ //of pFmt->GetItemState(RES_LR_SPACE, false)
+ //if it was possible to get the ItemState
+ //for L of the LR space independantly
+ bool bParaAutoBefore; // For Auto spacing before a paragraph
+ bool bParaAutoAfter; // For Auto Spacing after a paragraph
+
+ SwWW8StyInf() :
+ sWWStyleName( aEmptyStr ),
+ nWWStyleId( 0 ),
+ eLTRFontSrcCharSet(0),
+ eRTLFontSrcCharSet(0),
+ eCJKFontSrcCharSet(0),
+ pFmt( 0 ),
+ pWWFly( 0 ),
+ pOutlineNumrule( 0 ),
+ nFilePos( 0 ),
+ nBase( 0 ),
+ nFollow( 0 ),
+ nLFOIndex( USHRT_MAX ),
+ nListLevel(WW8ListManager::nMaxLevel),
+ nOutlineLevel( MAXLEVEL ),
+ n81Flags( 0 ),
+ n81BiDiFlags(0),
+ maWordLR( RES_LR_SPACE ),
+ bValid(false),
+ bImported(false),
+ bColl(false),
+ bImportSkipped(false),
+ bHasStyNumRule(false),
+ bHasBrokenWW6List(false),
+ bListReleventIndentSet(false),
+ bParaAutoBefore(false),
+ bParaAutoAfter(false)
+
+ {}
+
+ ~SwWW8StyInf()
+ {
+ delete pWWFly;
+ }
+
+ void SetOrgWWIdent( const String& rName, const sal_uInt16 nId )
+ {
+ sWWStyleName = rName;
+ nWWStyleId = nId;
+ }
+ sal_uInt16 GetWWStyleId() const { return nWWStyleId; }
+ const String& GetOrgWWName() const
+ {
+ return sWWStyleName;
+ }
+ bool IsOutline() const
+ {
+ return (pFmt && (MAXLEVEL > nOutlineLevel));
+ }
+ bool IsOutlineNumbered() const
+ {
+ return pOutlineNumrule && IsOutline();
+ }
+ const SwNumRule* GetOutlineNumrule() const
+ {
+ return pOutlineNumrule;
+ }
+ CharSet GetCharSet() const;
+ CharSet GetCJKCharSet() const;
+};
+
//-----------------------------------------
// Stack
//-----------------------------------------
@@ -752,14 +879,15 @@ struct ApoTestResults
{
bool mbStartApo;
bool mbStopApo;
- const sal_uInt8* mpSprm37;
- const sal_uInt8* mpSprm29;
+ bool m_bHasSprm37;
+ bool m_bHasSprm29;
+ sal_uInt8 m_nSprm29;
WW8FlyPara* mpStyleApo;
- ApoTestResults() :
- mbStartApo(false), mbStopApo(false), mpSprm37(0), mpSprm29(0),
- mpStyleApo(0) {}
+ ApoTestResults()
+ : mbStartApo(false), mbStopApo(false), m_bHasSprm37(false)
+ , m_bHasSprm29(false), m_nSprm29(0), mpStyleApo(0) {}
bool HasStartStop() const { return (mbStartApo || mbStopApo); }
- bool HasFrame() const { return (mpSprm29 || mpSprm37 || mpStyleApo); }
+ bool HasFrame() const { return (m_bHasSprm29 || m_bHasSprm37 || mpStyleApo); }
};
struct ANLDRuleMap
@@ -948,7 +1076,7 @@ private:
// ( ist ausserhalb einer Style-Def immer 0 )
SfxItemSet* pAktItemSet;// gerade einzulesende Zeichenattribute
// (ausserhalb des WW8ListManager Ctor's immer 0)
- SwWW8StyInf* pCollA; // UEbersetzungs-Array der Styles
+ std::vector<SwWW8StyInf> vColl;
const SwTxtFmtColl* pDfltTxtFmtColl; // Default
SwFmt* pStandardFmtColl;// "Standard"
@@ -1000,7 +1128,6 @@ private:
rtl_TextEncoding eStructCharSet; // rtl_TextEncoding for structures
rtl_TextEncoding eHardCharSet; // Hard rtl_TextEncoding-Attribute
sal_uInt16 nProgress; // %-Angabe fuer Progressbar
- sal_uInt16 nColls; // Groesse des Arrays
sal_uInt16 nAktColl; // gemaess WW-Zaehlung
sal_uInt16 nFldNum; // laufende Nummer dafuer
sal_uInt16 nLFOPosition;
@@ -1089,7 +1216,7 @@ private:
const SprmReadInfo& GetSprmReadInfo(sal_uInt16 nId) const;
- bool StyleExists(int nColl) const { return (nColl < nColls); }
+ bool StyleExists(unsigned int nColl) const { return (nColl < vColl.size()); }
SwWW8StyInf *GetStyle(sal_uInt16 nColl) const;
void AppendTxtNode(SwPosition& rPos);
diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx
index 7df5e5fa1a2c..2677a1d92336 100644
--- a/sw/source/filter/ww8/ww8par2.cxx
+++ b/sw/source/filter/ww8/ww8par2.cxx
@@ -526,8 +526,8 @@ ApoTestResults SwWW8ImplReader::TestApo(int nCellLevel, bool bTableRowEnd,
ApoTestResults aRet;
// Frame in Style Definition (word appears to ignore them if inside an
// text autoshape)
- if (!bTxbxFlySection)
- aRet.mpStyleApo = StyleExists(nAktColl) ? pCollA[nAktColl].pWWFly : 0;
+ if (!bTxbxFlySection && nAktColl < vColl.size())
+ aRet.mpStyleApo = StyleExists(nAktColl) ? vColl[nAktColl].pWWFly : 0;
/*
#i1140#
@@ -549,8 +549,10 @@ ApoTestResults SwWW8ImplReader::TestApo(int nCellLevel, bool bTableRowEnd,
to see if we are still in that frame.
*/
- aRet.mpSprm37 = pPlcxMan->HasParaSprm( bVer67 ? 37 : 0x2423 );
- aRet.mpSprm29 = pPlcxMan->HasParaSprm( bVer67 ? 29 : 0x261B );
+ aRet.m_bHasSprm37 = pPlcxMan->HasParaSprm( bVer67 ? 37 : 0x2423 );
+ const sal_uInt8 *pSrpm29 = pPlcxMan->HasParaSprm( bVer67 ? 29 : 0x261B );
+ aRet.m_bHasSprm29 = pSrpm29 != NULL;
+ aRet.m_nSprm29 = pSrpm29 ? *pSrpm29 : 0;
// Is there some frame data here
bool bNowApo = aRet.HasFrame() || pTopLevelTable;
@@ -3664,11 +3666,11 @@ bool SwWW8ImplReader::IsInvalidOrToBeMergedTabCell() const
sal_uInt16 SwWW8ImplReader::StyleUsingLFO( sal_uInt16 nLFOIndex ) const
{
sal_uInt16 nRes = USHRT_MAX;
- if( pCollA )
+ if( !vColl.empty() )
{
for(sal_uInt16 nI = 0; nI < pStyles->GetCount(); nI++ )
- if( pCollA[ nI ].bValid
- && (nLFOIndex == pCollA[ nI ].nLFOIndex) )
+ if( vColl[ nI ].bValid
+ && (nLFOIndex == vColl[ nI ].nLFOIndex) )
nRes = nI;
}
return nRes;
@@ -3677,13 +3679,13 @@ sal_uInt16 SwWW8ImplReader::StyleUsingLFO( sal_uInt16 nLFOIndex ) const
const SwFmt* SwWW8ImplReader::GetStyleWithOrgWWName( String& rName ) const
{
SwFmt* pRet = 0;
- if( pCollA )
+ if( !vColl.empty() )
{
for(sal_uInt16 nI = 0; nI < pStyles->GetCount(); nI++ )
- if( pCollA[ nI ].bValid
- && (rName.Equals( pCollA[ nI ].GetOrgWWName())) )
+ if( vColl[ nI ].bValid
+ && (rName.Equals( vColl[ nI ].GetOrgWWName())) )
{
- pRet = pCollA[ nI ].pFmt;
+ pRet = vColl[ nI ].pFmt;
break;
}
}
@@ -3699,21 +3701,7 @@ const sal_uInt8* WW8RStyle::HasParaSprm( sal_uInt16 nId ) const
if( !pParaSprms || !nSprmsLen )
return 0;
- const sal_uInt8* pSprms = pParaSprms;
- sal_uInt16 i, x;
-
- for( i=0; i < nSprmsLen; )
- {
- sal_uInt16 nAktId = maSprmParser.GetSprmId(pSprms);
- // Sprm found ?
- if( nAktId == nId )
- return pSprms + maSprmParser.DistanceToData(nId);
-
- x = maSprmParser.GetSprmSize(nAktId, pSprms);
- i = i + x;
- pSprms += x;
- }
- return 0; // Sprm not found
+ return maSprmParser.findSprmData(nId, pParaSprms, nSprmsLen);
}
void WW8RStyle::ImportSprms(sal_uInt8 *pSprms, short nLen, bool bPap)
@@ -3727,11 +3715,11 @@ void WW8RStyle::ImportSprms(sal_uInt8 *pSprms, short nLen, bool bPap)
nSprmsLen = nLen;
}
- while ( nLen > 0 )
+ WW8SprmIter aSprmIter(pSprms, nLen, maSprmParser);
+ while (const sal_uInt8* pSprm = aSprmIter.GetSprms())
{
- sal_uInt16 nL1 = pIo->ImportSprm(pSprms);
- nLen = nLen - nL1;
- pSprms += nL1;
+ pIo->ImportSprm(pSprm);
+ aSprmIter.advance();
}
pParaSprms = 0;
@@ -3838,8 +3826,7 @@ WW8RStyle::WW8RStyle(WW8Fib& _rFib, SwWW8ImplReader* pI)
: WW8Style(*pI->pTableStream, _rFib), maSprmParser(_rFib.GetFIBVersion()),
pIo(pI), pStStrm(pI->pTableStream), pStyRule(0), nWwNumLevel(0)
{
- pIo->nColls = cstd;
- pIo->pCollA = cstd ? new SwWW8StyInf[ cstd ] : NULL; // Style-UEbersetzung WW->SW
+ pIo->vColl.resize(cstd);
}
void WW8RStyle::Set1StyleDefaults()
@@ -3931,7 +3918,7 @@ bool WW8RStyle::PrepareStyle(SwWW8StyInf &rSI, ww::sti eSti, sal_uInt16 nThisSty
sal_uInt16 j = rSI.nBase;
if (j != nThisStyle && j < cstd )
{
- SwWW8StyInf* pj = &pIo->pCollA[j];
+ SwWW8StyInf* pj = &pIo->vColl[j];
if (rSI.pFmt && pj->pFmt && rSI.bColl == pj->bColl)
{
rSI.pFmt->SetDerivedFrom( pj->pFmt ); // ok, Based on eintragen
@@ -3971,7 +3958,7 @@ void WW8RStyle::PostStyle(SwWW8StyInf &rSI, bool bOldNoImp)
pIo->nCharFmt = -1;
// If Style basiert auf Nichts oder Basis ignoriert
- if ((rSI.nBase >= cstd || pIo->pCollA[rSI.nBase].bImportSkipped) && rSI.bColl)
+ if ((rSI.nBase >= cstd || pIo->vColl[rSI.nBase].bImportSkipped) && rSI.bColl)
{
//! Char-Styles funktionieren aus
// unerfindlichen Gruenden nicht
@@ -3992,7 +3979,10 @@ void WW8RStyle::PostStyle(SwWW8StyInf &rSI, bool bOldNoImp)
void WW8RStyle::Import1Style( sal_uInt16 nNr )
{
- SwWW8StyInf &rSI = pIo->pCollA[nNr];
+ if (nNr >= pIo->vColl.size())
+ return;
+
+ SwWW8StyInf &rSI = pIo->vColl[nNr];
if( rSI.bImported || !rSI.bValid )
return;
@@ -4002,7 +3992,7 @@ void WW8RStyle::Import1Style( sal_uInt16 nNr )
//
// gueltig und nicht NIL und noch nicht Importiert
- if( rSI.nBase < cstd && !pIo->pCollA[rSI.nBase].bImported )
+ if( rSI.nBase < cstd && !pIo->vColl[rSI.nBase].bImported )
Import1Style( rSI.nBase );
pStStrm->Seek( rSI.nFilePos );
@@ -4045,13 +4035,16 @@ void WW8RStyle::Import1Style( sal_uInt16 nNr )
void WW8RStyle::RecursiveReg(sal_uInt16 nNr)
{
- SwWW8StyInf &rSI = pIo->pCollA[nNr];
+ if (nNr >= pIo->vColl.size())
+ return;
+
+ SwWW8StyInf &rSI = pIo->vColl[nNr];
if( rSI.bImported || !rSI.bValid )
return;
rSI.bImported = true;
- if( rSI.nBase < cstd && !pIo->pCollA[rSI.nBase].bImported )
+ if( rSI.nBase < cstd && !pIo->vColl[rSI.nBase].bImported )
RecursiveReg(rSI.nBase);
pIo->RegisterNumFmtOnStyle(nNr);
@@ -4071,7 +4064,7 @@ void WW8RStyle::PostProcessStyles()
formats and use it to mark handled ones
*/
for (i=0; i < cstd; ++i)
- pIo->pCollA[i].bImported = false;
+ pIo->vColl[i].bImported = false;
/*
Register the num formats and tabstop changes on the styles recursively.
@@ -4086,7 +4079,7 @@ void WW8RStyle::PostProcessStyles()
*/
for (i=0; i < cstd; ++i)
{
- if (pIo->pCollA[i].bValid)
+ if (pIo->vColl[i].bValid)
{
RecursiveReg(i);
}
@@ -4098,7 +4091,7 @@ void WW8RStyle::ScanStyles() // untersucht Style-Abhaengigkeiten
for (sal_uInt16 i = 0; i < cstd; ++i)
{
short nSkip;
- SwWW8StyInf &rSI = pIo->pCollA[i];
+ SwWW8StyInf &rSI = pIo->vColl[i];
rSI.nFilePos = pStStrm->Tell(); // merke FilePos
WW8_STD* pStd = Read1Style( nSkip, 0, 0 ); // read STD
@@ -4355,9 +4348,9 @@ void WW8RStyle::ImportOldFormatStyles()
{
for (sal_uInt16 i=0; i < cstd; ++i)
{
- pIo->pCollA[i].bColl = true;
+ pIo->vColl[i].bColl = true;
//every chain must end eventually at the null style (style code 222)
- pIo->pCollA[i].nBase = 222;
+ pIo->vColl[i].nBase = 222;
}
rtl_TextEncoding eStructChrSet = WW8Fib::GetFIBCharset(
@@ -4377,7 +4370,10 @@ void WW8RStyle::ImportOldFormatStyles()
nByteCount++;
sal_uInt8 stc = static_cast< sal_uInt8 >((stcp - cstcStd) & 255);
- SwWW8StyInf &rSI = pIo->pCollA[stc];
+ if (stc >=pIo->vColl.size())
+ continue;
+
+ SwWW8StyInf &rSI = pIo->vColl[stc];
if (nCount != 0xFF) // undefined style
{
String sName;
@@ -4507,7 +4503,7 @@ void WW8RStyle::ImportOldFormatStyles()
if (stc == stcBase)
stcBase = 222;
- SwWW8StyInf &rSI = pIo->pCollA[stc];
+ SwWW8StyInf &rSI = pIo->vColl[stc];
rSI.nBase = stcBase;
ww::sti eSti = ww::GetCanonicalStiFromStc(stc);
@@ -4518,7 +4514,7 @@ void WW8RStyle::ImportOldFormatStyles()
rSI.bValid = true;
if (ww::StandardStiIsCharStyle(eSti) && !aPAPXOffsets[stcp].mnSize)
- pIo->pCollA[stc].bColl = false;
+ pIo->vColl[stc].bColl = false;
bool bOldNoImp = PrepareStyle(rSI, eSti, stc, stcNext);
@@ -4539,7 +4535,7 @@ void WW8RStyle::ImportNewFormatStyles()
ScanStyles(); // Scanne Based On
for (sal_uInt16 i = 0; i < cstd; ++i) // import Styles
- if (pIo->pCollA[i].bValid)
+ if (pIo->vColl[i].bValid)
Import1Style( i );
}
@@ -4565,11 +4561,11 @@ void WW8RStyle::Import()
for (sal_uInt16 i = 0; i < cstd; ++i)
{
// Follow chain
- SwWW8StyInf* pi = &pIo->pCollA[i];
+ SwWW8StyInf* pi = &pIo->vColl[i];
sal_uInt16 j = pi->nFollow;
if( j < cstd )
{
- SwWW8StyInf* pj = &pIo->pCollA[j];
+ SwWW8StyInf* pj = &pIo->vColl[j];
if ( j != i // sinnvoller Index ?
&& pi->pFmt // Format ok ?
&& pj->pFmt // Derived-Format ok ?
@@ -4589,8 +4585,9 @@ void WW8RStyle::Import()
//
// fuer z.B. Tabellen wird ein immer gueltiger Std-Style gebraucht
- if( pIo->StyleExists(0) && pIo->pCollA[0].pFmt && pIo->pCollA[0].bColl && pIo->pCollA[0].bValid )
- pIo->pDfltTxtFmtColl = (SwTxtFmtColl*)pIo->pCollA[0].pFmt;
+ if( pIo->StyleExists(0) && !pIo->vColl.empty() &&
+ pIo->vColl[0].pFmt && pIo->vColl[0].bColl && pIo->vColl[0].bValid )
+ pIo->pDfltTxtFmtColl = (SwTxtFmtColl*)pIo->vColl[0].pFmt;
else
pIo->pDfltTxtFmtColl = pIo->rDoc.GetDfltTxtFmtColl();
diff --git a/sw/source/filter/ww8/ww8par2.hxx b/sw/source/filter/ww8/ww8par2.hxx
index 5e3e2a8cff10..1a837643446a 100644
--- a/sw/source/filter/ww8/ww8par2.hxx
+++ b/sw/source/filter/ww8/ww8par2.hxx
@@ -53,32 +53,6 @@ private:
SfxItemSet aChrSet,aParSet;
};
-struct WW8FlyPara
-{ // WinWord-Attribute
- // Achtung: *Nicht* umsortieren, da Teile mit
- // memcmp verglichen werden
- bool bVer67;
- sal_Int16 nSp26, nSp27; // rohe Position
- sal_Int16 nSp45, nSp28; // Breite / Hoehe
- sal_Int16 nLeMgn, nRiMgn, nUpMgn, nLoMgn; // Raender
- sal_uInt8 nSp29; // rohe Bindung + Alignment
- sal_uInt8 nSp37; // Wrap-Mode ( 1 / 2; 0 = no Apo ? )
- WW8_BRC5 brc; // Umrandung Top, Left, Bottom, Right, Between
- bool bBorderLines; // Umrandungslinien
- bool bGrafApo; // true: Dieser Rahmen dient allein dazu, die
- // enthaltene Grafik anders als zeichengebunden
- // zu positionieren
- bool mbVertSet; // true if vertical positioning has been set
- sal_uInt8 nOrigSp29;
-
- WW8FlyPara(bool bIsVer67, const WW8FlyPara* pSrc = 0);
- bool operator==(const WW8FlyPara& rSrc) const;
- void Read(const sal_uInt8* pSprm29, WW8PLCFx_Cp_FKP* pPap);
- void ReadFull(const sal_uInt8* pSprm29, SwWW8ImplReader* pIo);
- void Read(const sal_uInt8* pSprm29, WW8RStyle* pStyle);
- void ApplyTabPos(const WW8_TablePos *pTabPos);
- bool IsEmpty() const;
-};
struct WW8SwFlyPara
{
@@ -122,101 +96,6 @@ struct WW8SwFlyPara
SwWW8FltAnchorStack *pOldAnchorStck;
};
-class SwWW8StyInf
-{
- String sWWStyleName;
- sal_uInt16 nWWStyleId;
-public:
- rtl_TextEncoding eLTRFontSrcCharSet; // rtl_TextEncoding fuer den Font
- rtl_TextEncoding eRTLFontSrcCharSet; // rtl_TextEncoding fuer den Font
- rtl_TextEncoding eCJKFontSrcCharSet; // rtl_TextEncoding fuer den Font
- SwFmt* pFmt;
- WW8FlyPara* pWWFly;
- SwNumRule* pOutlineNumrule;
- long nFilePos;
- sal_uInt16 nBase;
- sal_uInt16 nFollow;
- sal_uInt16 nLFOIndex;
- sal_uInt8 nListLevel;
- sal_uInt8 nOutlineLevel; // falls Gliederungs-Style
- sal_uInt16 n81Flags; // Fuer Bold, Italic, ...
- sal_uInt16 n81BiDiFlags; // Fuer Bold, Italic, ...
- SvxLRSpaceItem maWordLR;
- bool bValid; // leer oder Valid
- bool bImported; // fuers rekursive Importieren
- bool bColl; // true-> pFmt ist SwTxtFmtColl
- bool bImportSkipped; // nur true bei !bNewDoc && vorh. Style
- bool bHasStyNumRule; // true-> Benannter NumRule in Style
- bool bHasBrokenWW6List; // true-> WW8+ style has a WW7- list
- bool bListReleventIndentSet; //true if this style's indent has
- //been explicitly set, it's set to the value
- //of pFmt->GetItemState(RES_LR_SPACE, false)
- //if it was possible to get the ItemState
- //for L of the LR space independantly
- bool bParaAutoBefore; // For Auto spacing before a paragraph
- bool bParaAutoAfter; // For Auto Spacing after a paragraph
-
- SwWW8StyInf() :
- sWWStyleName( aEmptyStr ),
- nWWStyleId( 0 ),
- eLTRFontSrcCharSet(0),
- eRTLFontSrcCharSet(0),
- eCJKFontSrcCharSet(0),
- pFmt( 0 ),
- pWWFly( 0 ),
- pOutlineNumrule( 0 ),
- nFilePos( 0 ),
- nBase( 0 ),
- nFollow( 0 ),
- nLFOIndex( USHRT_MAX ),
- nListLevel(WW8ListManager::nMaxLevel),
- nOutlineLevel( MAXLEVEL ),
- n81Flags( 0 ),
- n81BiDiFlags(0),
- maWordLR( RES_LR_SPACE ),
- bValid(false),
- bImported(false),
- bColl(false),
- bImportSkipped(false),
- bHasStyNumRule(false),
- bHasBrokenWW6List(false),
- bListReleventIndentSet(false),
- bParaAutoBefore(false),
- bParaAutoAfter(false)
-
- {}
-
- ~SwWW8StyInf()
- {
- delete pWWFly;
- }
-
- void SetOrgWWIdent( const String& rName, const sal_uInt16 nId )
- {
- sWWStyleName = rName;
- nWWStyleId = nId;
- }
- sal_uInt16 GetWWStyleId() const { return nWWStyleId; }
- const String& GetOrgWWName() const
- {
- return sWWStyleName;
- }
- bool IsOutline() const
- {
- return (pFmt && (MAXLEVEL > nOutlineLevel));
- }
- bool IsOutlineNumbered() const
- {
- return pOutlineNumrule && IsOutline();
- }
- const SwNumRule* GetOutlineNumrule() const
- {
- return pOutlineNumrule;
- }
- CharSet GetCharSet() const;
- CharSet GetCJKCharSet() const;
-};
-
class WW8RStyle: public WW8Style
{
friend class SwWW8ImplReader;
diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx
index 45cc68c4cdfc..cf7ca73e4121 100644
--- a/sw/source/filter/ww8/ww8par3.cxx
+++ b/sw/source/filter/ww8/ww8par3.cxx
@@ -470,20 +470,7 @@ SV_IMPL_PTRARR( WW8LFOInfos, WW8LFOInfo_Ptr );
sal_uInt8* WW8ListManager::GrpprlHasSprm(sal_uInt16 nId, sal_uInt8& rSprms,
sal_uInt8 nLen)
{
- sal_uInt8* pSprms = &rSprms;
- sal_uInt16 nRemLen=nLen;
- while (nRemLen > (maSprmParser.getVersion()?1:0))
- {
- sal_uInt16 nAktId = maSprmParser.GetSprmId(pSprms);
- if( nAktId == nId ) // Sprm found
- return pSprms + maSprmParser.DistanceToData(nId);
-
- // gib Zeiger auf Daten
- sal_uInt16 nSize = maSprmParser.GetSprmSize(nAktId, pSprms);
- pSprms += nSize;
- nRemLen -= nSize;
- }
- return 0; // Sprm not found
+ return maSprmParser.findSprmData(nId, &rSprms, nLen);
}
class ListWithId : public std::unary_function<const WW8LSTInfo *, bool>
@@ -775,7 +762,7 @@ bool WW8ListManager::ReadLVL(SwNumFmt& rNumFmt, SfxItemSet*& rpItemSet,
for(nLevelB = 0; nLevelB <= nLevel; ++nLevelB)
{
sal_uInt8 nPos = aOfsNumsXCH[nLevelB];
- if (nPos && sNumString.GetChar(nPos-1) < nMaxLevel)
+ if (nPos && nPos < sNumString.Len() && sNumString.GetChar(nPos-1) < nMaxLevel)
{
if (rNotReallyThere[nLevelB])
aOfsNumsXCH[nLevelB] = 0;
@@ -1702,7 +1689,10 @@ void SetStyleIndent(SwWW8StyInf &rStyle, const SwNumFmt &rFmt)
void SwWW8ImplReader::SetStylesList(sal_uInt16 nStyle, sal_uInt16 nActLFO,
sal_uInt8 nActLevel)
{
- SwWW8StyInf &rStyleInf = pCollA[nStyle];
+ if (nStyle >= vColl.size())
+ return;
+
+ SwWW8StyInf &rStyleInf = vColl[nStyle];
if (rStyleInf.bValid)
{
OSL_ENSURE(pAktColl, "Cannot be called outside of style import");
@@ -1738,7 +1728,11 @@ void SwWW8ImplReader::SetStylesList(sal_uInt16 nStyle, sal_uInt16 nActLFO,
void SwWW8ImplReader::RegisterNumFmtOnStyle(sal_uInt16 nStyle)
{
- SwWW8StyInf &rStyleInf = pCollA[nStyle];
+
+ if (nStyle >= vColl.size())
+ return;
+
+ SwWW8StyInf &rStyleInf = vColl[nStyle];
if (rStyleInf.bValid && rStyleInf.pFmt)
{
//Save old pre-list modified indent, which are the word indent values
@@ -1786,10 +1780,12 @@ void SwWW8ImplReader::RegisterNumFmtOnTxtNode(sal_uInt16 nActLFO,
if (pLstManager) // sind die Listendeklarationen gelesen?
{
- std::vector<sal_uInt8> aParaSprms;
SwTxtNode* pTxtNd = pPaM->GetNode()->GetTxtNode();
- OSL_ENSURE(pTxtNd, "Kein Text-Node an PaM-Position");
+ OSL_ENSURE(pTxtNd, "No Text-Node at PaM-Position");
+ if (!pTxtNd)
+ return;
+ std::vector<sal_uInt8> aParaSprms;
const SwNumRule* pRule = bSetAttr ?
pLstManager->GetNumRuleForActivation( nActLFO, nActLevel,
aParaSprms, pTxtNd) : 0;
@@ -2033,8 +2029,8 @@ void SwWW8ImplReader::Read_LFOPosition(sal_uInt16, const sal_uInt8* pData,
indentation. Setting this flag will allow us to recover from this
braindeadness
*/
- if (pAktColl && (nLFOPosition == 2047-1))
- pCollA[nAktColl].bHasBrokenWW6List = true;
+ if (pAktColl && (nLFOPosition == 2047-1) && nAktColl < vColl.size())
+ vColl[nAktColl].bHasBrokenWW6List = true;
// die Streamdaten sind hier 1 basiert, wir ziehen EINS ab
if (USHRT_MAX > nLFOPosition)
diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx
index e8a1d22f06ce..526b829863aa 100644
--- a/sw/source/filter/ww8/ww8par5.cxx
+++ b/sw/source/filter/ww8/ww8par5.cxx
@@ -2777,9 +2777,9 @@ bool SwWW8ImplReader::AddExtraOutlinesAsExtraStyles(SwTOXBase& rBase)
bool bExtras = false;
//This is the case if the winword outline numbering is set while the
//writer one is not
- for (sal_uInt16 nI = 0; nI < nColls; ++nI)
+ for (sal_uInt16 nI = 0; nI < vColl.size(); ++nI)
{
- SwWW8StyInf& rSI = pCollA[nI];
+ SwWW8StyInf& rSI = vColl[nI];
if (rSI.IsOutline())
{
const SwTxtFmtColl *pFmt = (const SwTxtFmtColl*)(rSI.pFmt);
@@ -3284,9 +3284,9 @@ eF_ResT SwWW8ImplReader::Read_F_Tox( WW8FieldDesc* pF, String& rStr )
// the entry correctly, but I currently have no clue how to obtain
// the tab stop position. It is _not_ set at the paragraph style.
SwForm* pForm = 0;
- for (sal_uInt16 nI = 0; nI < nColls; ++nI)
+ for (sal_uInt16 nI = 0; nI < vColl.size(); ++nI)
{
- const SwWW8StyInf& rSI = pCollA[nI];
+ const SwWW8StyInf& rSI = vColl[nI];
if (rSI.IsOutlineNumbered())
{
sal_uInt16 nStyleLevel = rSI.nOutlineLevel;
diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx
index 8f6ad9f2f439..17002a8f4923 100644
--- a/sw/source/filter/ww8/ww8par6.cxx
+++ b/sw/source/filter/ww8/ww8par6.cxx
@@ -284,10 +284,10 @@ void SwWW8ImplReader::SetDocumentGrid(SwFrmFmt &rFmt, const wwSection &rSection)
sal_uInt32 nCharWidth=240;
for (sal_uInt16 nI = 0; nI < pStyles->GetCount(); ++nI)
{
- if (pCollA[nI].bValid && pCollA[nI].pFmt &&
- pCollA[nI].GetWWStyleId() == 0)
+ if (vColl[nI].bValid && vColl[nI].pFmt &&
+ vColl[nI].GetWWStyleId() == 0)
{
- nCharWidth = ItemGet<SvxFontHeightItem>(*(pCollA[nI].pFmt),
+ nCharWidth = ItemGet<SvxFontHeightItem>(*(vColl[nI].pFmt),
RES_CHRATR_CJK_FONTSIZE).GetHeight();
break;
}
@@ -917,6 +917,7 @@ void wwSectionManager::CreateSep(const long nTxtPos, bool /*bMustHaveBreak*/)
aNewSection.maSep.fEvenlySpaced =
ReadBSprm(pSep, (eVer <= ww::eWW7 ? 138 : 0x3005), 1) ? true : false;
+ const sal_uInt8 numrgda = SAL_N_ELEMENTS(aNewSection.maSep.rgdxaColumnWidthSpacing);
if (aNewSection.maSep.ccolM1 > 0 && !aNewSection.maSep.fEvenlySpaced)
{
aNewSection.maSep.rgdxaColumnWidthSpacing[0] = 0;
@@ -930,7 +931,8 @@ void wwSectionManager::CreateSep(const long nTxtPos, bool /*bMustHaveBreak*/)
OSL_ENSURE( pSW, "+Sprm 136 (bzw. 0xF203) (ColWidth) fehlt" );
sal_uInt16 nWidth = pSW ? SVBT16ToShort(pSW + 1) : 1440;
- aNewSection.maSep.rgdxaColumnWidthSpacing[++nIdx] = nWidth;
+ if (++nIdx < numrgda)
+ aNewSection.maSep.rgdxaColumnWidthSpacing[nIdx] = nWidth;
if (i < nCols-1)
{
@@ -941,7 +943,8 @@ void wwSectionManager::CreateSep(const long nTxtPos, bool /*bMustHaveBreak*/)
if( pSD )
{
nWidth = SVBT16ToShort(pSD + 1);
- aNewSection.maSep.rgdxaColumnWidthSpacing[++nIdx] = nWidth;
+ if (++nIdx < numrgda)
+ aNewSection.maSep.rgdxaColumnWidthSpacing[nIdx] = nWidth;
}
}
}
@@ -1616,11 +1619,8 @@ bool WW8FlyPara::operator==(const WW8FlyPara& rSrc) const
}
// Read fuer normalen Text
-void WW8FlyPara::Read(const sal_uInt8* pSprm29, WW8PLCFx_Cp_FKP* pPap)
+void WW8FlyPara::Read(sal_uInt8 nOrigSp29, WW8PLCFx_Cp_FKP* pPap)
{
- if (pSprm29)
- nOrigSp29 = *pSprm29; // PPC ( Bindung )
-
const sal_uInt8* pS = 0;
if( bVer67 )
{
@@ -1671,12 +1671,12 @@ void WW8FlyPara::Read(const sal_uInt8* pSprm29, WW8PLCFx_Cp_FKP* pPap)
nSp29 = nOrigSp29;
}
-void WW8FlyPara::ReadFull(const sal_uInt8* pSprm29, SwWW8ImplReader* pIo)
+void WW8FlyPara::ReadFull(sal_uInt8 nOrigSp29, SwWW8ImplReader* pIo)
{
WW8PLCFMan* pPlcxMan = pIo->pPlcxMan;
WW8PLCFx_Cp_FKP* pPap = pPlcxMan->GetPapPLCF();
- Read(pSprm29, pPap); // Lies Apo-Parameter
+ Read(nOrigSp29, pPap); // Lies Apo-Parameter
do{ // Block zum rausspringen
if( nSp45 != 0 /* || nSp28 != 0 */ )
@@ -1714,15 +1714,15 @@ void WW8FlyPara::ReadFull(const sal_uInt8* pSprm29, SwWW8ImplReader* pIo)
WW8FlyPara *pNowStyleApo=0;
sal_uInt16 nColl = pPap->GetIstd();
ww::sti eSti = eVer < ww::eWW6 ? ww::GetCanonicalStiFromStc( static_cast< sal_uInt8 >(nColl) ) : static_cast<ww::sti>(nColl);
- while (eSti != ww::stiNil && 0 == (pNowStyleApo = pIo->pCollA[nColl].pWWFly))
+ while (eSti != ww::stiNil && nColl < pIo->vColl.size() && 0 == (pNowStyleApo = pIo->vColl[nColl].pWWFly))
{
- nColl = pIo->pCollA[nColl].nBase;
+ nColl = pIo->vColl[nColl].nBase;
eSti = eVer < ww::eWW6 ? ww::GetCanonicalStiFromStc( static_cast< sal_uInt8 >(nColl) ) : static_cast<ww::sti>(nColl);
}
WW8FlyPara aF(bVer67, pNowStyleApo);
// Neuer FlaPara zum Vergleich
- aF.Read( pS, pPap ); // WWPara fuer neuen Para
+ aF.Read( *pS, pPap ); // WWPara fuer neuen Para
if( !( aF == *this ) ) // selber APO ? ( oder neuer ? )
bGrafApo = true; // nein -> 1-zeiliger APO
// -> Grafik-APO
@@ -1736,11 +1736,8 @@ void WW8FlyPara::ReadFull(const sal_uInt8* pSprm29, SwWW8ImplReader* pIo)
// Read fuer Apo-Defs in Styledefs
-void WW8FlyPara::Read(const sal_uInt8* pSprm29, WW8RStyle* pStyle)
+void WW8FlyPara::Read(sal_uInt8 nOrigSp29, WW8RStyle* pStyle)
{
- if (pSprm29)
- nOrigSp29 = *pSprm29; // PPC ( Bindung )
-
const sal_uInt8* pS = 0;
if (bVer67)
{
@@ -2315,7 +2312,7 @@ WW8FlyPara *SwWW8ImplReader::ConstructApo(const ApoTestResults &rApo,
// APO-Parameter ermitteln und Test auf bGrafApo
if (rApo.HasFrame())
- pRet->ReadFull(rApo.mpSprm29, this);
+ pRet->ReadFull(rApo.m_nSprm29, this);
pRet->ApplyTabPos(pTabPos);
@@ -2592,7 +2589,7 @@ bool SwWW8ImplReader::TestSameApo(const ApoTestResults &rApo,
WW8FlyPara aF(bVer67, rApo.mpStyleApo);
// WWPara fuer akt. Para
if (rApo.HasFrame())
- aF.Read(rApo.mpSprm29, pPlcxMan->GetPapPLCF());
+ aF.Read(rApo.m_nSprm29, pPlcxMan->GetPapPLCF());
aF.ApplyTabPos(pTabPos);
return aF == *pWFlyPara;
@@ -2664,10 +2661,10 @@ const SfxPoolItem* SwWW8ImplReader::GetFmtAttr( sal_uInt16 nWhich )
pRet = pCtrlStck->GetStackAttr(*pPaM->GetPoint(), nWhich);
if (!pRet)
{
- if (nAktColl < nColls && pCollA[nAktColl].pFmt &&
- pCollA[nAktColl].bColl)
+ if (nAktColl < vColl.size() && vColl[nAktColl].pFmt &&
+ vColl[nAktColl].bColl)
{
- pRet = &(pCollA[nAktColl].pFmt->GetFmtAttr(nWhich));
+ pRet = &(vColl[nAktColl].pFmt->GetFmtAttr(nWhich));
}
}
if (!pRet)
@@ -2790,7 +2787,7 @@ void SwWW8ImplReader::Read_Symbol(sal_uInt16, const sal_uInt8* pData, short nLen
SwWW8StyInf *SwWW8ImplReader::GetStyle(sal_uInt16 nColl) const
{
- return nColl < nColls ? &pCollA[nColl] : 0;
+ return const_cast<SwWW8StyInf *>(nColl < vColl.size() ? &vColl[nColl] : 0);
}
/***************************************************************************
@@ -2874,8 +2871,8 @@ void SwWW8ImplReader::Read_BoldUsw( sal_uInt16 nId, const sal_uInt8* pData, shor
{
// The style based on has Bit 7 set ?
if (
- pSI->nBase < nColls && (*pData & 0x80) &&
- (pCollA[pSI->nBase].n81Flags & nMask)
+ pSI->nBase < vColl.size() && (*pData & 0x80) &&
+ (vColl[pSI->nBase].n81Flags & nMask)
)
{
bOn = !bOn; // umdrehen
@@ -2955,9 +2952,9 @@ void SwWW8ImplReader::Read_BoldBiDiUsw(sal_uInt16 nId, const sal_uInt8* pData,
{
if (pSI)
{
- if( pSI->nBase < nColls // Style Based on
+ if( pSI->nBase < vColl.size() // Style Based on
&& ( *pData & 0x80 ) // Bit 7 gesetzt ?
- && ( pCollA[pSI->nBase].n81BiDiFlags & nMask ) ) // BasisMaske ?
+ && ( vColl[pSI->nBase].n81BiDiFlags & nMask ) ) // BasisMaske ?
bOn = !bOn; // umdrehen
if( bOn )
@@ -3522,19 +3519,19 @@ bool SwWW8ImplReader::SetNewFontAttr(sal_uInt16 nFCode, bool bSetEnums,
if( bSetEnums )
{
- if( pAktColl ) // StyleDef
+ if( pAktColl && nAktColl < vColl.size() ) // StyleDef
{
switch(nWhich)
{
default:
case RES_CHRATR_FONT:
- pCollA[nAktColl].eLTRFontSrcCharSet = eSrcCharSet;
+ vColl[nAktColl].eLTRFontSrcCharSet = eSrcCharSet;
break;
case RES_CHRATR_CTL_FONT:
- pCollA[nAktColl].eRTLFontSrcCharSet = eSrcCharSet;
+ vColl[nAktColl].eRTLFontSrcCharSet = eSrcCharSet;
break;
case RES_CHRATR_CJK_FONT:
- pCollA[nAktColl].eCJKFontSrcCharSet = eSrcCharSet;
+ vColl[nAktColl].eCJKFontSrcCharSet = eSrcCharSet;
break;
}
}
@@ -3762,11 +3759,11 @@ void SwWW8ImplReader::Read_CColl( sal_uInt16, const sal_uInt8* pData, short nLen
}
sal_uInt16 nId = SVBT16ToShort( pData ); // Style-Id (NICHT Sprm-Id!)
- if( nId >= nColls || !pCollA[nId].pFmt // ungueltige Id ?
- || pCollA[nId].bColl ) // oder Para-Style ?
+ if( nId >= vColl.size() || !vColl[nId].pFmt // ungueltige Id ?
+ || vColl[nId].bColl ) // oder Para-Style ?
return; // dann ignorieren
- NewAttr( SwFmtCharFmt( (SwCharFmt*)pCollA[nId].pFmt ) );
+ NewAttr( SwFmtCharFmt( (SwCharFmt*)vColl[nId].pFmt ) );
nCharFmt = (short) nId;
}
@@ -3961,9 +3958,9 @@ void SwWW8ImplReader::Read_LR( sal_uInt16 nId, const sal_uInt8* pData, short nLe
case 0x840F:
case 0x845E:
aLR.SetTxtLeft( nPara );
- if (pAktColl)
+ if (pAktColl && nAktColl < vColl.size())
{
- pCollA[nAktColl].bListReleventIndentSet = true;
+ vColl[nAktColl].bListReleventIndentSet = true;
}
bLeftIndentSet = true; // #i105414#
break;
@@ -3982,22 +3979,22 @@ void SwWW8ImplReader::Read_LR( sal_uInt16 nId, const sal_uInt8* pData, short nLe
been removed then we will factor the original list applied hanging
into our calculation.
*/
- if (pPlcxMan && pCollA[nAktColl].bHasBrokenWW6List)
+ if (pPlcxMan && nAktColl < vColl.size() && vColl[nAktColl].bHasBrokenWW6List)
{
const sal_uInt8 *pIsZeroed = pPlcxMan->GetPapPLCF()->HasSprm(0x460B);
if (pIsZeroed && *pIsZeroed == 0)
{
const SvxLRSpaceItem &rLR =
- ItemGet<SvxLRSpaceItem>(*(pCollA[nAktColl].pFmt),
+ ItemGet<SvxLRSpaceItem>(*(vColl[nAktColl].pFmt),
RES_LR_SPACE);
nPara = nPara - rLR.GetTxtFirstLineOfst();
}
}
aLR.SetTxtFirstLineOfst(nPara);
- if (pAktColl)
+ if (pAktColl && nAktColl < vColl.size())
{
- pCollA[nAktColl].bListReleventIndentSet = true;
+ vColl[nAktColl].bListReleventIndentSet = true;
}
bFirstLinOfstSet = true; // #i103711#
break;
@@ -4110,15 +4107,15 @@ void SwWW8ImplReader::Read_ParaAutoBefore(sal_uInt16, const sal_uInt8 *pData, sh
SvxULSpaceItem aUL(*(const SvxULSpaceItem*)GetFmtAttr(RES_UL_SPACE));
aUL.SetUpper(GetParagraphAutoSpace(pWDop->fDontUseHTMLAutoSpacing));
NewAttr(aUL);
- if (pAktColl)
- pCollA[nAktColl].bParaAutoBefore = true;
+ if (pAktColl && nAktColl < vColl.size())
+ vColl[nAktColl].bParaAutoBefore = true;
else
bParaAutoBefore = true;
}
else
{
- if (pAktColl)
- pCollA[nAktColl].bParaAutoBefore = false;
+ if (pAktColl && nAktColl < vColl.size())
+ vColl[nAktColl].bParaAutoBefore = false;
else
bParaAutoBefore = false;
}
@@ -4137,15 +4134,15 @@ void SwWW8ImplReader::Read_ParaAutoAfter(sal_uInt16, const sal_uInt8 *pData, sho
SvxULSpaceItem aUL(*(const SvxULSpaceItem*)GetFmtAttr(RES_UL_SPACE));
aUL.SetLower(GetParagraphAutoSpace(pWDop->fDontUseHTMLAutoSpacing));
NewAttr(aUL);
- if (pAktColl)
- pCollA[nAktColl].bParaAutoAfter = true;
+ if (pAktColl && nAktColl < vColl.size())
+ vColl[nAktColl].bParaAutoAfter = true;
else
bParaAutoAfter = true;
}
else
{
- if (pAktColl)
- pCollA[nAktColl].bParaAutoAfter = false;
+ if (pAktColl && nAktColl < vColl.size())
+ vColl[nAktColl].bParaAutoAfter = false;
else
bParaAutoAfter = false;
}
@@ -4862,14 +4859,14 @@ void SwWW8ImplReader::Read_BreakBefore( sal_uInt16, const sal_uInt8* pData, shor
void SwWW8ImplReader::Read_ApoPPC( sal_uInt16, const sal_uInt8* pData, short )
{
- if (pAktColl) // only for Styledef, sonst anders geloest
+ if (pAktColl && nAktColl < vColl.size()) // only for Styledef, sonst anders geloest
{
- SwWW8StyInf& rSI = pCollA[nAktColl];
+ SwWW8StyInf& rSI = vColl[nAktColl];
WW8FlyPara* pFly = rSI.pWWFly ? rSI.pWWFly : new WW8FlyPara(bVer67);
- pCollA[nAktColl].pWWFly = pFly;
- pFly->Read(pData, pStyles);
+ vColl[nAktColl].pWWFly = pFly;
+ pFly->Read(*pData, pStyles);
if (pFly->IsEmpty())
- delete pCollA[nAktColl].pWWFly, pCollA[nAktColl].pWWFly = 0;
+ delete vColl[nAktColl].pWWFly, vColl[nAktColl].pWWFly = 0;
}
}
diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx
index 0c3d3bef395c..fa37caeb9623 100644
--- a/sw/source/filter/ww8/ww8scan.cxx
+++ b/sw/source/filter/ww8/ww8scan.cxx
@@ -7280,6 +7280,27 @@ sal_uInt16 wwSprmParser::DistanceToData(sal_uInt16 nId) const
return 1 + mnDelta + SprmDataOfs(nId);
}
+sal_uInt8* wwSprmParser::findSprmData(sal_uInt16 nId, sal_uInt8* pSprms,
+ sal_uInt16 nLen) const
+{
+ while (nLen > (getVersion()?1:0))
+ {
+ sal_uInt16 nAktId = GetSprmId(pSprms);
+ if (nAktId == nId) // Sprm found
+ return pSprms + DistanceToData(nId);
+
+ // gib Zeiger auf Daten
+ sal_uInt16 nSize = GetSprmSize(nAktId, pSprms);
+ OSL_ENSURE(nSize <= nLen, "sprm longer than remaining bytes");
+ //Clip to available size if wrong
+ nSize = std::min(nSize, nLen);
+ pSprms += nSize;
+ nLen -= nSize;
+ }
+ // Sprm not found
+ return 0;
+}
+
SEPr::SEPr() :
bkc(2), fTitlePage(0), fAutoPgn(0), nfcPgn(0), fUnlocked(0), cnsPgn(0),
fPgnRestart(0), fEndNote(1), lnc(0), grpfIhdt(0), nLnnMod(0), dxaLnn(0),
diff --git a/sw/source/filter/ww8/ww8scan.hxx b/sw/source/filter/ww8/ww8scan.hxx
index 96300f4fbe5a..f83b428b111b 100644
--- a/sw/source/filter/ww8/ww8scan.hxx
+++ b/sw/source/filter/ww8/ww8scan.hxx
@@ -145,6 +145,11 @@ public:
/// The minimum acceptable sprm len possible for this type of parser
int MinSprmLen() const { return (IsSevenMinus(meVersion)) ? 2 : 3; }
+ /// Returns the offset to data of the first sprm of id nId, 0
+ // if not found. nLen must be the <= length of pSprms
+ sal_uInt8* findSprmData(sal_uInt16 nId, sal_uInt8* pSprms, sal_uInt16 nLen)
+ const;
+
inline int getVersion() const { return meVersion; } //cmc, I'm dubious about the usage of this, how can it be 0
};
diff --git a/sw/source/filter/ww8/ww8toolbar.cxx b/sw/source/filter/ww8/ww8toolbar.cxx
index 0f4a644989e8..20bfcf380edb 100644
--- a/sw/source/filter/ww8/ww8toolbar.cxx
+++ b/sw/source/filter/ww8/ww8toolbar.cxx
@@ -906,12 +906,13 @@ bool Tcg255::Read(SvStream *pS)
{
OSL_TRACE("Tcg255::Read() stream pos 0x%x", pS->Tell() );
nOffSet = pS->Tell();
- sal_uInt8 nId = 0; //
+ sal_uInt8 nId = 0x40;
*pS >> nId;
while ( nId != 0x40 )
{
if ( !processSubStruct( nId, pS ) )
return false;
+ nId = 0x40;
*pS >> nId;
}
return true;
@@ -948,9 +949,10 @@ bool Tcg255SubStruct::Read(SvStream *pS)
return true;
}
-PlfMcd::PlfMcd( bool bReadId ): Tcg255SubStruct( bReadId ), rgmcd( NULL )
+PlfMcd::PlfMcd( bool bReadId ): Tcg255SubStruct( bReadId ), iMac(0), rgmcd( NULL )
{
}
+
PlfMcd::~PlfMcd()
{
if ( rgmcd )
diff --git a/sysui/desktop/man/README b/sysui/desktop/man/README
new file mode 100644
index 000000000000..1536ae5cb9da
--- /dev/null
+++ b/sysui/desktop/man/README
@@ -0,0 +1 @@
+FIXME: These man pages are used for distro packaging using "make distro-pack-install"
diff --git a/sysui/desktop/man/libreoffice.1 b/sysui/desktop/man/libreoffice.1
new file mode 100644
index 000000000000..ee814cf3ca28
--- /dev/null
+++ b/sysui/desktop/man/libreoffice.1
@@ -0,0 +1,246 @@
+.TH libreoffice "1" "2010-12-18" "LibreOffice" "User Commands"
+.SH Name
+libreoffice \- LibreOffice office suite
+
+.SH SYNOPSIS
+.B libreoffice
+[\fB\-accept\=\fIaccept\-string\fR] [\fB\-base\fR] [\fB\-calc\fR]
+[\fB\-convert\-to\fR output_file_extension[:output_filter_name] [\-outdir output_dir] \fIfile\fR]...
+[\fB\-display \fIdisplay\fR] [\fB\-draw\fR] [\fB\-global\fR] [\fB\-headless\fR]
+[\fB\-help\fR|\fB\-h\fR|\fB\-?\fR] [\fB\-impress\fR] [\fB\-invisible\fR] [\fB\-infilter="<filter>"\fR]
+[\fB\-math\fR] [\fB\-minimized\fR] [\fB\-n \fIfile\fR]... [\fB\-nodefault\fR]
+[\fB\-nolockcheck\fR] [\fB\-nologo\fR] [\fB\-norestore\fR]
+[\fB\-o \fIfile\fR]... [\fB\-p \fIfile\fR...]
+[\fB\-print\-to\-file [\-printer\-name printer_name] [\-outdir output_dir] file]...
+[\fB\-pt \fIprintername\fR \fIfile\fR...]
+[\fB\-show \fIImpress file\fR]... [\fB\-unaccept=\fIaccept\-string\fR]
+[\fB\-terminate_after_init\fR] [\fB\-view \fIfile\fR]... [\fB\-web\fR]
+[\fB\-writer\fR] [\fIfile\fR...]
+.br
+.B lobase
+.br
+.B localc
+.br
+.B lodraw
+.br
+.B lofromtemplate
+.br
+.B loimpress
+.br
+.B lomath
+.br
+.B loweb
+.br
+.B lowriter
+.br
+
+.SH DESCRIPTION
+LibreOffice (LO for short) is a multi-platform office productivity suite.
+It was derived from OpenOffice.org 3.3 Beta on September 28, 2010.
+
+\fBlibreoffice\fR is a shell script that sets up the environment and
+passes the command line arguments to the \fBsoffice.bin\fR binary.
+
+Alternatively, the following helper scripts start the respective module:
+
+sbase, scalc, sdraw, simpress, smath, sofficerc, spadmin, swriter
+
+.SH OPTIONS
+.TP
+\fB\-accept=\fIaccept\-string\fR
+Specify a UNO connect-string to create a UNO acceptor through which other
+programs can connect to access the API.
+
+.TP
+\fB\-base\fR
+Starts the wizard for a new Base document.
+
+.TP
+\fB\-calc\fR
+Starts with a new Calc document.
+
+.TP
+\fB\-convert\-to\fR output_file_extension[:output_filter_name] [\-outdir output_dir] \fIfile\fR...
+Batch converts files.
+If \fI-outdir\fR is not specified then the current working directory is used as the output directory
+for the converted files.
+
+Examples:
+
+\fB\-convert\-to\fR pdf *.doc
+
+Converts all .doc files to PDFs.
+
+\fB\-convert\-to\fR pdf:writer_pdf_Export \-outdir /home/user *.doc
+
+Converts all .doc files to PDFs using the settings in the Writer PDF export dialog and saving them
+in /home/user.
+
+.TP
+\fB\-display \fIdisplay\fR
+This option specifies the X server to use; see \fBX\fR(7)
+
+.TP
+\fB\-draw\fR
+Starts with a new Draw document.
+
+.TP
+\fB\-global\fR
+Starts with a new Global document.
+
+.TP
+\fB\-headless\fR
+Starts in "headless mode", which allows using the application without user a
+interface.
+
+This special mode can be used when the application is controlled by external
+clients via the API.
+
+It implies \-invisible and strictly ignores any GUI environment.
+\-quickstart does not work with this parameter.
+
+.TP
+\fB\-help\fR|\fB\-h\fR|\fB\-?\fR
+Lists LibreOffice command line parameters.
+
+.TP
+\fB\-impress\fR
+Starts with a new Impress document.
+
+.TP
+\fB\-invisible\fR
+Starts in invisible mode.
+
+Neither the start\-up logo nor the initial program window will be visible.
+LO can be controlled and documents and dialogs can be opened via the API.
+
+When started with this parameter, it can only be quit using the taskmanager (Windows)
+or the kill command (UNIX based systems).
+
+\-quickstart does not work with this parameter.
+
+.TP
+\fB\-infilter="<filter>"\fR
+Force an input filter type if possible.
+For example -infilter="Calc Office Open XML" only
+
+.TP
+\fB\-math\fR
+Starts with a new Math document.
+
+.TP
+\fB\-minimized\fR
+Keeps the splash screen minimized.
+
+.TP
+\fB\-n \fItemplate\fR...
+Creates the a new document from the given templates.
+
+.TP
+\fB\-nodefault\fR
+Starts LO without creating an new document.
+The next time you start LO, the welcome screen is show.
+
+It's used together with \fB\-nologo\fR by quick starters. Note that \fB\-quickstart\fR
+has no longer been supported since OpenOffice.org 2.0.0.
+
+.TP
+\fB\-nolockcheck\fR
+Disables the check for remote instances using the installation.
+
+.TP
+\fB\-nologo\fR
+Disables the splash screen at program start.
+
+.TP
+\fB\-norestore\fR
+Disables restart and file recovery after a system crash. It is possible that LO
+will try to restore a file it keeps crashing on, if that happens \fB\-norestore\fR
+is the only way to start LO.
+
+.TP
+\fB\-nosplash\fR
+Disables the splash screen at program start.
+
+.TP
+\fB\-o \fIfile\fR...
+Opens the given files for editing, even templates.
+
+Without \fb\-o\fR a template file would create a new document derived from that template.
+
+.TP
+\fB\-p \fIfile\fR...
+Prints the given files to the default printer and ends. The splash screen
+does not appear.
+
+If the file name contains spaces, then it must be enclosed in quotation marks.
+
+.TP
+\fB\-print\-to\-file [\-printer\-name printer_name] [\-outdir output_dir] file...
+Batch print files to file.
+If \-printer\-name is not specified the default printer is used.
+If \-outdir is not specified then the current working directory is used as the output directory
+for the converted files.
+
+Examples:
+
+\-print\-to\-file *.doc
+
+Prints all .doc files to the current working directory using the default printer.
+
+\-print\-to\-file \-printer\-name nasty_lowres_printer \-outdir /home/user *.doc
+
+Prints all .doc files to /home/user directory using the nasty_lowres_printer.
+
+.TP
+\fB\-pt \fIprintername\fR \fIfile\fR...
+Prints the given files to the printer \fIprintername\fR and ends. The splash
+screen does not appear.
+
+If a file name contains spaces, then it must be enclosed in quotation marks.
+
+.TP
+\fB\-quickstart \fB\-quickstart=no
+Starts LO with it's quick starter.
+\fB\-quickstart disable the quick starter.
+
+Does not work with \-invisible or \-headless.
+
+.TP
+\fB\-show \fIImpress file\fR...
+Opens the given Impress files, starts the presentation and quits after they have finished.
+
+.TP
+\fB\-unaccept=\fIaccept\-string\fR
+Closes an acceptor that was created with \fB\-accept\fR option.
+
+Use \fB\-unaccept\fR=\fIall\fR to close all open acceptors.
+
+.TP
+\fB\-terminate_after_init\fR
+Starts LO and terminates after it registers some UNO services.
+Doesn't show the splash during startup.
+
+.TP
+\fB\-view \fIfile\fR...
+Opens the given files read-only creating a temporary copy of them at $TMPDIR.
+
+.TP
+\fB\-web\fR
+Starts with a new HTML document.
+
+.TP
+\fB\-writer\fR
+Starts with a new Writer document.
+
+.SH TROUBLESHOOTING PROBLEMS
+See \fBhttp://wiki.documentfoundation.org/BugReport\fR for more details on how to report
+bugs in LibreOffice.
+.SH SEE ALSO
+.BR http://www.documentfoundation.org/
+
+.SH AUTHOR
+This manual page was created by Rene Engelhard <rene@debian.org> for
+the Debian GNU/Linux Distribution, because the original package does not have
+one. It was updated for Novell by Petr Mladek <petr.mladek@novell.com> and
+adapted for LibreOffice by Philipp Weissenbacher <philipp.weissenbacher@gmail.com>.
diff --git a/sysui/desktop/man/unopkg.1 b/sysui/desktop/man/unopkg.1
new file mode 100644
index 000000000000..b98a30d5f5ea
--- /dev/null
+++ b/sysui/desktop/man/unopkg.1
@@ -0,0 +1,80 @@
+.TH unopkg "1" "2008-03-18" "LibreOffice Extension Manager" "User Command"
+.SH "Name"
+unopkg \- LibreOffice Extension Manager
+.SH SYNOPSIS
+.B unopkg
+[\fBadd\fR] <\fIoptions\fR> \fIextension-path...\fR
+.br
+.B unopkg
+[\fBremove\fR] <\fIoptions\fR> \fIextension-identifier...\fR
+.br
+.B unopkg
+[\fBlist\fR] <\fIoptions\fR> \fIextension-identifier...\fR
+.br
+.B unopkg
+[\fBreinstall\fR] <\fIoptions\fR>
+.br
+.B unopkg
+[\fBgui\fR]
+.br
+.B unopkg
+[\fB--help\fR|\fB-h\fR]
+
+.SH DESCRIPTION
+LibreOffice is a fully featured office suite for the daily use with all
+features you would normally expect in an office suite.
+
+There exists many LibreOffice extensions all over the word. For example, see
+\fBhttp://extensions.services.openoffice.org/\fR
+
+This tool allows to manage the extensions from the command line.
+
+.SH SUB\-COMMANDS
+.TP
+\fBadd\fR
+add the given extensions
+.TP
+\fBremove\fR
+remove extensions by the given identifiers
+.TP
+\fBreinstall\fR
+reinstall all deployed extensions (only for experts)
+.TP
+\fBlist\fR
+list information about the deployed extensions
+.TP
+\fBgui\fR
+raise Extension Manager Graphical User Interface (GUI)
+
+.SH OPTIONS
+.TP
+\fB\-\-help\fR|\fB\-h\fR
+display help and exit
+.TP
+\fB\-\-version\fR|\fB\-V\fR
+output version information and exit
+.TP
+\fB--verbose\fR|\fB\-v\fR
+verbose output
+.TP
+\fB\-\-force\fR|\fB\-f\fR
+force overwriting existing extensions
+.TP
+\fB\-\-log\-file\fR <\fIfile\fR>
+custom log file; the default one is <cache-dir>/log.txt
+.TP
+\fB\-\-shared\fR|\fB\-f\fR
+operate on the system installation deployment context; use only when no
+concurrent Office process(es) are running! (only for experts)
+.TP
+\fB\-\-deployment\-context\fR <\fIcontext\fR>
+operate on explicit deployment context (only for experts)
+
+
+.SH TROUBLESHOOTING PROBLEMS
+See \fBhttp://wiki.documentfoundation.org/BugReport\fR for more details about how to report
+bugs in LibreOffice.
+.SH SEE ALSO
+.BR http://www.documentfoundation.org/
+.SH AUTHOR
+This manual page was created by Petr Mladek <pmladek@suse.cz>.
diff --git a/sysui/desktop/share/create_tree.sh b/sysui/desktop/share/create_tree.sh
index d0c4e7621d9d..2a5b26a2f2ed 100755
--- a/sysui/desktop/share/create_tree.sh
+++ b/sysui/desktop/share/create_tree.sh
@@ -43,7 +43,7 @@ fi
mkdir -p ${DESTDIR}/usr/bin
-office_prefix=/opt
+test -n "$OFFICE_PREFIX" && office_prefix="$OFFICE_PREFIX" || office_prefix=/opt
office_root=${office_prefix}/${PREFIX}
#this symlink is needed to have the API boostrap functions running right
diff --git a/tools/source/ref/globname.cxx b/tools/source/ref/globname.cxx
index 05c7709931e6..a399f1107d3e 100644
--- a/tools/source/ref/globname.cxx
+++ b/tools/source/ref/globname.cxx
@@ -208,10 +208,10 @@ sal_Bool SvGlobalName::operator < ( const SvGlobalName & rObj ) const
else if( Data2_a == Data2_b )
{
sal_uInt32 Data1_a;
- memcpy(&Data1_a, pImp->szData+4, sizeof(sal_uInt32));
+ memcpy(&Data1_a, pImp->szData, sizeof(sal_uInt32));
sal_uInt32 Data1_b;
- memcpy(&Data1_b, rObj.pImp->szData+4, sizeof(sal_uInt32));
+ memcpy(&Data1_b, rObj.pImp->szData, sizeof(sal_uInt32));
return Data1_a < Data1_b;
}
diff --git a/vcl/aqua/source/a11y/aqua11yrolehelper.mm b/vcl/aqua/source/a11y/aqua11yrolehelper.mm
index b8ebdb08c3df..55161bdcf79b 100644
--- a/vcl/aqua/source/a11y/aqua11yrolehelper.mm
+++ b/vcl/aqua/source/a11y/aqua11yrolehelper.mm
@@ -40,6 +40,10 @@ using namespace ::com::sun::star::uno;
+(id)simpleMapNativeRoleFrom: (XAccessibleContext *) accessibleContext {
id nativeRole = nil;
+
+ if (accessibleContext == NULL)
+ return nativeRole;
+
switch( accessibleContext -> getAccessibleRole() ) {
#define MAP(a,b) \
case a: nativeRole = b; break
diff --git a/vcl/source/window/floatwin.cxx b/vcl/source/window/floatwin.cxx
index 2c21ec7a83d1..c7ca2917370f 100644
--- a/vcl/source/window/floatwin.cxx
+++ b/vcl/source/window/floatwin.cxx
@@ -696,13 +696,22 @@ void FloatingWindow::StartPopupMode( const Rectangle& rRect, sal_uLong nFlags )
// so they can be compared across different frames
// !!! rRect is expected to be in screen coordinates of the parent frame window !!!
maFloatRect = rRect;
- if( GetParent()->ImplHasMirroredGraphics() )
+
+ Window *pReference = GetParent();
+
+ // compare coordinates in absolute screen coordinates
+ // Keep in sync with FloatingWindow::ImplFloatHitTest, e.g. fdo#33509
+ if( pReference->ImplHasMirroredGraphics() )
{
- maFloatRect.SetPos( GetParent()->ScreenToOutputPixel( rRect.TopLeft() ) );
- maFloatRect = GetParent()->ImplOutputToUnmirroredAbsoluteScreenPixel( maFloatRect );
+ if(!pReference->IsRTLEnabled() )
+ // --- RTL --- re-mirror back to get device coordiantes
+ pReference->ImplReMirror(maFloatRect);
+
+ maFloatRect.SetPos(pReference->ScreenToOutputPixel(maFloatRect.TopLeft()));
+ maFloatRect = pReference->ImplOutputToUnmirroredAbsoluteScreenPixel(maFloatRect);
}
else
- maFloatRect.SetPos( GetParent()->OutputToAbsoluteScreenPixel( GetParent()->ScreenToOutputPixel( rRect.TopLeft() ) ) );
+ maFloatRect.SetPos(pReference->OutputToAbsoluteScreenPixel(pReference->ScreenToOutputPixel(rRect.TopLeft())));
maFloatRect.Left() -= 2;
maFloatRect.Top() -= 2;
diff --git a/vcl/unx/gtk/window/gtkframe.cxx b/vcl/unx/gtk/window/gtkframe.cxx
index 2ae761aaa1a4..46bbe64eeb19 100644
--- a/vcl/unx/gtk/window/gtkframe.cxx
+++ b/vcl/unx/gtk/window/gtkframe.cxx
@@ -1405,7 +1405,7 @@ void GtkSalFrame::setMinMaxSize()
int aHints = 0;
if( m_nStyle & SAL_FRAME_STYLE_SIZEABLE )
{
- if( m_aMinSize.Width() && m_aMinSize.Height() )
+ if( m_aMinSize.Width() && m_aMinSize.Height() && ! m_bFullscreen )
{
aGeo.min_width = m_aMinSize.Width()+CONTAINER_ADJUSTMENT;
aGeo.min_height = m_aMinSize.Height()+CONTAINER_ADJUSTMENT;
@@ -1420,11 +1420,12 @@ void GtkSalFrame::setMinMaxSize()
}
else
{
- aGeo.min_width = maGeometry.nWidth;
- aGeo.min_height = maGeometry.nHeight;
- aHints |= GDK_HINT_MIN_SIZE;
if( ! m_bFullscreen )
{
+ aGeo.min_width = maGeometry.nWidth;
+ aGeo.min_height = maGeometry.nHeight;
+ aHints |= GDK_HINT_MIN_SIZE;
+
aGeo.max_width = maGeometry.nWidth;
aGeo.max_height = maGeometry.nHeight;
aHints |= GDK_HINT_MAX_SIZE;
@@ -3001,7 +3002,7 @@ gboolean GtkSalFrame::signalConfigure( GtkWidget*, GdkEventConfigure* pEvent, gp
* - which is not good since the window manager will now size the window back to this
* wrong size at some point.
*/
- if( (pThis->m_nStyle & (SAL_FRAME_STYLE_SIZEABLE | SAL_FRAME_STYLE_PLUG)) == SAL_FRAME_STYLE_SIZEABLE )
+ if( pThis->m_bFullscreen || (pThis->m_nStyle & (SAL_FRAME_STYLE_SIZEABLE | SAL_FRAME_STYLE_PLUG)) == SAL_FRAME_STYLE_SIZEABLE )
{
if( pEvent->width != (int)pThis->maGeometry.nWidth || pEvent->height != (int)pThis->maGeometry.nHeight )
{
diff --git a/writerfilter/source/ooxml/OOXMLStreamImpl.cxx b/writerfilter/source/ooxml/OOXMLStreamImpl.cxx
index 2cb058ea65d4..e96ab69d6c77 100644
--- a/writerfilter/source/ooxml/OOXMLStreamImpl.cxx
+++ b/writerfilter/source/ooxml/OOXMLStreamImpl.cxx
@@ -32,6 +32,7 @@
#include <iostream>
#include <com/sun/star/embed/XHierarchicalStorageAccess.hpp>
+#include <com/sun/star/uri/UriReferenceFactory.hpp>
//#define DEBUG_STREAM
@@ -100,6 +101,11 @@ bool OOXMLStreamImpl::lcl_getTarget(uno::Reference<embed::XRelationshipAccess>
::rtl::OUString & rDocumentTarget)
{
bool bFound = false;
+ static uno::Reference< com::sun::star::uri::XUriReferenceFactory > xFac = ::com::sun::star::uri::UriReferenceFactory::create( mxContext );
+ // use '/' to representent the root of the zip package ( and provide a 'file' scheme to
+ // keep the XUriReference implementation happy )
+ // add mspath to represent the 'source' of this stream
+ uno::Reference< com::sun::star::uri::XUriReference > xBase = xFac->parse( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("file:///" ) ) + msPath );
static rtl::OUString sType(RTL_CONSTASCII_USTRINGPARAM("Type"));
static rtl::OUString sId(RTL_CONSTASCII_USTRINGPARAM("Id"));
@@ -190,8 +196,16 @@ bool OOXMLStreamImpl::lcl_getTarget(uno::Reference<embed::XRelationshipAccess>
rDocumentTarget = sMyTarget;
else
{
- rDocumentTarget = msPath;
- rDocumentTarget += sMyTarget;
+ // 'Target' is a relative Uri, so a 'Target=/path'
+ // with a base Uri of file://base/foo will resolve to
+ // file://base/word. We need something more than some
+ // simple string concatination here to handle that.
+ uno::Reference< com::sun::star::uri::XUriReference > xPart = xFac->parse( sMyTarget );
+ uno::Reference< com::sun::star::uri::XUriReference > xAbs = xFac->makeAbsolute( xBase, xPart, sal_True, com::sun::star::uri::RelativeUriExcessParentSegments_RETAIN );
+ rDocumentTarget = xAbs->getPath();
+ // path will start with the fragment separator. need to
+ // remove that
+ rDocumentTarget = rDocumentTarget.copy( 1 );
}
break;