diff options
author | nobody <nobody@gnome.org> | 2006-05-19 16:48:33 +0000 |
---|---|---|
committer | nobody <nobody@gnome.org> | 2006-05-19 16:48:33 +0000 |
commit | f097d3643c1e68ecd263b2480cf2b73f5a125dc0 (patch) | |
tree | 8680a78beb76079d5e8af6b0886a1b2c68c98720 | |
parent | 07c95e987e51a5feaf05b4f3fa72fb6eb388b68e (diff) |
This commit was manufactured by cvs2svn to create tagOOO_BUILD_2_0_2_11
'OOO_BUILD_2_0_2_11'.
82 files changed, 7199 insertions, 427 deletions
@@ -1,4 +1,4 @@ -Michael Meeks <michael@ximian.com> +Michael Meeks <michael.meeks@novell.com> Chris Halls <halls@debian.org> Federico Mena <federico@ximian.com> Martin Kretzschmar <martink@ximian.com> @@ -1,6 +1,116 @@ -ooo-build-2.0.2.1 +ooo-build-2.0.2.11 + + + bug fixes: + + context menu behavior fix (Michael) + + large pivot tables were unusable slow (Jody) + + build bits: + + build of VBAObjects under Win32 (Tor,Noel) + +ooo-build-2.0.2.10 + + + features: + + more i18n support (Michael) + + bug fixes: + + better fake bold for big cjk fonts (Jian, Noel) + + some new font attributes for the VBA stuff (Maho) + + some more fixes for the VBA stuff (Novel) + + using any filter when browsing samba shares (Noel) + + missing strlen check (Noel) + + build bits: + + sort-order of files in extra galleries (Petr) + + build with the shell sh (Maho, Rene) + + updated Debian bits (Rene) + +ooo-build-2.0.2.9 + + + features: + + more i18n support (Michael) + + bug fixes: + + typo in gcj 32-bit run time paths (Matthias) + + disable ActiveX more thoroughly (Tor) + + lots fixes in the VBA stuff (Noel) + + build bits: + + timestamp to the build version for Win32 (Tor) + + support to remove poor help localizations (Petr) + + updated Debian bits (Rene) + +ooo-build-2.0.2.8 + features: + + support for OOo SDK packaging (Petr) + + optimization / speedup: + + optimization for loading large pivot tables from xls (Jody) + + bug fixes: + + crash in fileview (Jian) + + layout hang (Jian) + + attempting to access current document fails in VBA (Noel) + + default Greek fonts definition (Petr) + + small problems with preferred font order (Petr) + + missing minor version number in versionrc (Petr) + + synced atkbridge fixes with CWS (Michael) + + Writer/Web desktop category (Petr) + + build bits: + + know more languages (Matthias) + + helper script for removing win32 specific crud from patches (Michael) + + updated Debian, Ubuntu bits (Matthias) + +ooo-build-2.0.2.7 + + + bug fixes: + + crash when selecting email application (Giuseppe) + + build bits: + + problems with checkdll.sh (Petr, Andreas) + +ooo-build-2.0.2.6 + + + bug fixes: + + crash when selecting email application (Martin) + + allow right-click if focus is set to mouse in Metacity (Matthias) + + prefer Calc over Gnumeric in KDE (Petr) + + enable Math MIME type setting (Petr) + + crash with a11y (Michael) + + -display and other options with ooqstart (Jan) + + expression evaluation changed between 1.x and 2.0 (Jody) + + disable use of fontconfig to enable/disable bitmaps again (Petr) + +ooo-build-2.0.2.5 + + + bug fixes: + + use fontconfig to enable/disable bitmaps (Michael) + + pressing escape when context menu is displayed crasher (Noel) + + build bits: + + updated Debian bits (Rene) + + pending: + + linking speedup (Michael) + +ooo-build-2.0.2.4 + + + bug fixes: + + import of VBA stream hangup (Noel) + + lots new constants for VBA excel (Noel) + + lots fixes in Atk bridge (Michael) + + i18n support within pasting to Calc (Michael) + + workaround a nasty problem with IE on Win32 (Tor) + + build bits: + + build with the older atk-1.6 (Petr) + + build without java fix (Andreas) + + updated Frugalware, Gentoo, Novell bits (Miklos, Andreas, Petr, Tor) + +ooo-build-2.0.2.3 + + + build bits: + + updated Novell bits (Petr) + +ooo-build-2.0.2.2 + + + bug fixes: + + more VBA fixes (Noel, Maho) + + markup the menu items correctly (Michael) + + build bits: + + updated Mandriva, Novell bits (Giuseppe, Petr) + +ooo-build-2.0.2.1 + + bug fixes: + 'Ctrl' instead of 'Control' in menus (Jan) + more VBA fixes (Noel) diff --git a/bin/build-galleries b/bin/build-galleries index 65072bc81..a0feb0d71 100755 --- a/bin/build-galleries +++ b/bin/build-galleries @@ -174,7 +174,7 @@ if test "$BUILD_OOO_GAL_FROM_OPENCLIPART" = "yes" ; then echo "Doing gallery $gal_name..." # xargs is necessary because I - find $dir -name "*.png" -print0 | { xargs -0 $GAL_BIN --name "$gal_name" --path "$GAL_DIR" --destdir "$OODESTDIR" --number-from "$GAL_NUMBER_FROM" || exit 1; } + find $dir -name "*.png" -print0 | LC_CTYPE=C sort -z | { xargs -0 $GAL_BIN --name "$gal_name" --path "$GAL_DIR" --destdir "$OODESTDIR" --number-from "$GAL_NUMBER_FROM" || exit 1; } done fi diff --git a/bin/font-munge b/bin/font-munge index 9244aa796..7617da542 100755 --- a/bin/font-munge +++ b/bin/font-munge @@ -15,30 +15,99 @@ BEGIN { $ENV{OOO_VENDOR} ||= "unknown"; $uisans = 0; $uifixed = 0; } s/(Bitstream Vera Serif;.*)Thorndale;/Thorndale;$1/; s/(Bitstream Vera Serif;.*)Times New Roman;/Times New Roman;$1/; + # add Albany, Cumberland, and Thorndale + (m/Albany;/) || s/Arial;/Albany;Arial;/g; + (m/albany;/) || s/arial;/albany;arial;/g; + (m/Thorndale;/) || s/Times New Roman;/Thorndale;Times New Roman;/g; + (m/thorndale;/) || s/timesnewroman;/thorndale;timesnewroman;/g; + (m/Cumberland;/) || s/Courier New;/Cumberland;Courier New;/g; + (m/cumberland;/) || s/couriernew;/cumberland;couriernew;/g; + # add AMT fonts - s/Albany;/Albany AMT;Albany;/g; - s/albany;/albanyamt;albany;/g; - s/Thorndale;/Thorndale AMT;Thorndale;/g; - s/thorndale;/thorndaleamt;thorndale;/g; - s/Cumberland;/Cumberland AMT;Cumberland;/g; - s/cumberland;/cumberlandamt;cumberland;/g; - s/comicsansms;/andymt;comicsansms;/g; - s/kidprint;/andy;kidprint;/g; + (m/Albany AMT;/) || s/Albany;/Albany AMT;Albany;/g; + (m/albanyamt;/) || s/albany;/albanyamt;albany;/g; + (m/Thorndale AMT;/) || s/Thorndale;/Thorndale AMT;Thorndale;/g; + (m/thorndaleamt;/) || s/thorndale;/thorndaleamt;thorndale;/g; + (m/Cumberland AMT;/) || s/Cumberland;/Cumberland AMT;Cumberland;/g; + (m/cumberlandamt;/) || s/cumberland;/cumberlandamt;cumberland;/g; + (m/andymt;/) || s/comicsansms;/andymt;comicsansms;/g; + (m/andy;/) || s/kidprint;/andy;kidprint;/g; # New bits from SUSE: # add Nimbus fonts - s/Arial;/Arial;Nimbus Sans L;/g; - s/arial;/arial;nimbussansl;/g; - s/Times New Roman;/Times New Roman;Nimbus Roman No9 L;/g; - s/timesnewroman;/timesnewroman;nimbusromanno9l;/g; - s/Courier New;/Courier New;Nimbus Mono L;/g; - s/couriernew;/couriernew;nimbusmonol;/g; - - # prune duplicates - s/nimbussansl;\(.*\)nimbussansl;/nimbussansl;$1/; - s/nimbusmonol;\(.*\)nimbusmonol;/nimbusmonol;$1/; - s/nimbusromanno9l;\(.*\)nimbusromanno9l;/nimbusromanno9l;$1/; + (m/Nimbus Sans L;/) || s/Arial;/Arial;Nimbus Sans L;/g; + (m/nimbussansl;/) || s/arial;/arial;nimbussansl;/g; + (m/Nimbus Roman No9 L;/) || s/Times New Roman;/Times New Roman;Nimbus Roman No9 L;/g; + (m/nimbusromanno9l;/) || s/timesnewroman;/timesnewroman;nimbusromanno9l;/g; + (m/Nimbus Mono L;/) || s/Courier New;/Courier New;Nimbus Mono L;/g; + (m/nimbusmonol;/) || s/couriernew;/couriernew;nimbusmonol;/g; + + +# prune duplicates + + s/Albany AMT;(.*)Albany AMT;/Albany AMT;$1/; + s/Albany;(.*)Albany;/Albany;$1/; + s/Arial;(.*)Arial;/Arial;$1/; + s/Nimbus Sans L;(.*)Nimbus Sans L;/Nimbus Sans L;$1/; + + s/albanyamt;(.*)albanyamt;/albanyamt;$1/; + s/albany;(.*)albany;/albany;$1/; + s/arial;(.*)arial;/arial;$1/; + s/nimbussansl;(.*)nimbussansl;/nimbussansl;$1/; + + s/Thorndale AMT;(.*)Thorndale AMT;/Thorndale AMT;$1/; + s/Thorndale;(.*)Thorndale;/Thorndale;$1/; + s/Times New Roman;(.*)Times New Roman;/Times New Roman;$1/; + s/Nimbus Roman No9 L;(.*)Nimbus Roman No9 L;/Nimbus Roman No9 L;$1/; + + s/thorndaleamt;(.*)thorndaleamt;/thorndaleamt;$1/; + s/thorndale;(.*)thorndale;/thorndale;$1/; + s/timesnewroman;(.*)timesnewroman;/timesnewroman;$1/; + s/nimbusromanno9l;(.*)nimbusromanno9l;/nimbusromanno9l;$1/; + + s/Cumberland AMT;(.*)Cumberland AMT;/Cumberland AMT;$1/; + s/Cumberland;(.*)Cumberland;/Cumberland;$1/; + s/Courier New;(.*)Courier New;/Courier New;$1/; + s/Nimbus Mono L;(.*)Nimbus Mono L;/Nimbus Mono L;$1/; + + s/cumberlandamt;(.*)cumberlandamt;/cumberlandamt;$1/; + s/cumberland;(.*)cumberland;/cumberland;$1/; + s/couriernew;(.*)couriernew;/couriernew;$1/; + s/nimbusmonol;(.*)nimbusmonol;/nimbusmonol;$1/; + + + # sort fonts AMT over Albany... over MS over Nimbus over bitmap + + s/(Helvetica;.*)Nimbus Sans L;/Nimbus Sans L;$1/; + s/(Nimbus Sans L;.*)Arial;/Arial;$1/; + s/(Arial;.*)Albany;/Albany;$1/; + s/(Albany;.*)Albany AMT;/Albany AMT;$1/; + + s/(helvetica;.*)nimbussansl;/nimbussansl;$1/; + s/(nimbussansl;.*)arial;/arial;$1/; + s/(arial;.*)albany;/albany;$1/; + s/(albany;.*)albanyamt;/albanyamt;$1/; + + s/(Times;.*)Nimbus Roman No9 L;/Nimbus Roman No9 L;$1/; + s/(Nimbus Roman No9 L;.*)Times New Roman;/Times New Roman;$1/; + s/(Times New Roman;.*)Thorndale;/Thorndale;$1/; + s/(Thorndale;.*)Thorndale AMT;/Thorndale AMT;$1/; + + s/(times;.*)nimbusromanno9l;/nimbusromanno9l;$1/; + s/(nimbusromanno9l;.*)timesnewroman;/timesnewroman;$1/; + s/(timesnewroman;.*)thorndale;/thorndale;$1/; + s/(thorndale;.*)thorndaleamt;/thorndaleamt;$1/; + + s/(Courier;.*)Nimbus Mono L;/Nimbus Mono L;$1/; + s/(Nimbus Mono L;.*)Courier New;/Courier New;$1/; + s/(Courier New;.*)Cumberland;/Cumberland;$1/; + s/(Cumberland;.*)Cumberland AMT;/Cumberland AMT;$1/; + + s/(courier;.*)nimbusmonol;/nimbusmonol;$1/; + s/(nimbusmonol;.*)couriernew;/couriernew;$1/; + s/(couriernew;.*)cumberland;/cumberland;$1/; + s/(cumberland;.*)cumberlandamt;/cumberlandamt;$1/; # Some RedHat CJK bits diff --git a/bin/help-font-munge b/bin/help-font-munge index e688d1aa8..96da61323 100755 --- a/bin/help-font-munge +++ b/bin/help-font-munge @@ -5,25 +5,6 @@ BEGIN { $ENV{OOO_VENDOR} ||= "unknown"; $helpsans = 0; $helpfixed = 0; } # This does a partial substitution of the really # mechanical bits of our fonts in help content. - # add URW fonts - s/Arial,/Arial,\"Nimbus Sans L\",/g; - s/\"Courier New\",/\"Courier New\",\"Nimbus Mono L\",/g; - s/\"Times New Roman\",/\"Times New Roman\",\"Nimbus Roman No9 L\",/g; - - # make sure Albany, Cumberland, and Thorndale are there - s/Arial,/Albany,Arial,/g; - s/\"Courier New\",/Cumberland,\"Courier New\",/g; - s/\"Times New Roman\",/Thorndale,\"Times New Roman\",/g; - - # make sure that Albany and Arial are preferred over Helvetica - s/(Helvetica\,.*)Albany\,/Albany\,$1/; - s/(Helvetica\,.*)Arial\,/Arial\,$1/; - - # add AMT fonts - s/Albany,/\"Albany AMT\",Albany,/g; - s/Cumberland,/\"Cumberland AMT\",Cumberland,/g; - s/Thorndale,/\"Thorndale AMT\",Thorndale,/g; - # move Bitstream Vera fonts after better fonts s/\"Bitstream Vera Sans\"\,(.*Albany\,)/$1\"Bitstream Vera Sans\"\,/; s/\"Bitstream Vera Sans\"\,(.*\"Albany AMT\"\,)/$1\"Bitstream Vera Sans\"\,/; @@ -40,6 +21,21 @@ BEGIN { $ENV{OOO_VENDOR} ||= "unknown"; $helpsans = 0; $helpfixed = 0; } s/\"Bitstream Vera Serif\"\,(.*\"Times New Roman\"\,)/$1\"Bitstream Vera Serif\"\,/; s/\"Bitstream Vera Serif\"\,(.*\"Nimbus Roman No9 L\"\,)/$1\"Bitstream Vera Serif\"\,/; + # make sure Albany, Cumberland, and Thorndale are there + (m/Albany,/) || s/Arial,/Albany,Arial,/g; + (m/Cumberland,/) || s/\"Courier New\",/Cumberland,\"Courier New\",/g; + (m/Thorndale,/) || s/\"Times New Roman\",/Thorndale,\"Times New Roman\",/g; + + # add AMT fonts + (m/\"Albany AMT\",/) || s/Albany,/\"Albany AMT\",Albany,/g; + (m/\"Cumberland AMT\",/) || s/Cumberland,/\"Cumberland AMT\",Cumberland,/g; + (m/\"Thorndale AMT\",/) || s/Thorndale,/\"Thorndale AMT\",Thorndale,/g; + + # add URW fonts + (m/\"Nimbus Sans L\",/) || s/Arial,/Arial,\"Nimbus Sans L\",/g; + (m/\"Nimbus Mono L\",/) || s/\"Courier New\",/\"Courier New\",\"Nimbus Mono L\",/g; + (m/\"Nimbus Roman No9 L\",/) || s/\"Times New Roman\",/\"Times New Roman\",\"Nimbus Roman No9 L\",/g; + # prune duplicates s/Albany,(.*)Albany,/Albany,$1/; s/Cumberland,(.*)Cumberland,/Cumberland,$1/; @@ -53,6 +49,22 @@ BEGIN { $ENV{OOO_VENDOR} ||= "unknown"; $helpsans = 0; $helpfixed = 0; } s/\"Nimbus Mono L\",(.*)\"Nimbus Mono L\",/\"Nimbus Mono L\",$1/; s/\"Nimbus Roman No9 L\",(.*)\"Nimbus Roman No9 L\",/\"Nimbus Roman No9 L\",$1/; + # sort fonts AMT over Albany... over MS over Nimbus over bitmap + s/(Helvetica\,.*)\"Nimbus Sans L\"\,/\"Nimbus Sans L\"\,$1/; + s/(\"Nimbus Sans L\"\,.*)Arial\,/Arial\,$1/; + s/(Arial\,.*)Albany\,/Albany\,$1/; + s/(Albany\,.*)\"Albany AMT\"\,/\"Albany AMT\"\,$1/; + + s/(Times\,.*)\"Nimbus Roman No9 L\"\,/\"Nimbus Roman No9 L\"\,$1/; + s/(\"Nimbus Roman No9 L\"\,.*)\"Times New Roman\"\,/\"Times New Roman\"\,$1/; + s/(\"Times New Roman\"\,.*)Thorndale\,/Thorndale\,$1/; + s/(Thorndale\,.*)\"Thorndale AMT\"\,/\"Thorndale AMT\"\,$1/; + + s/(Courier\,.*)\"Nimbus Mono L\"\,/\"Nimbus Mono L\"\,$1/; + s/(\"Nimbus Mono L\"\,.*)\"Courier New\"\,/\"Courier New\"\,$1/; + s/(\"Courier New\"\,.*)Cumberland\,/Cumberland\,$1/; + s/(Cumberland\,.*)\"Cumberland AMT\"\,/\"Cumberland AMT\"\,$1/; + # push SansSerif to the end of the list, some Tamil fonts don't # have all ISO-8859-1 characters defined s/sans-serif,(.*);/$1,sans-serif;/; diff --git a/bin/ooinstall b/bin/ooinstall index e5e62d052..c8d134d6b 100755 --- a/bin/ooinstall +++ b/bin/ooinstall @@ -88,15 +88,17 @@ print "Setting up environment\n"; for $a (keys %configure_vars) { $ENV{$a} = $configure_vars{$a}; } -$BUILD=undef; +my $BUILD=undef; +my $LAST_MINOR=undef; open MINORMK, "$ENV{'SOLARENV'}/inc/minor.mk"; while (<MINORMK>) { my $t = "\$" . $_; - if(/^BUILD/) { + if(/^BUILD/ || /^LAST_MINOR/) { eval $t; } } -close MINORMK; +close MINORMK; +$ENV{LAST_MINOR} = $LAST_MINOR; $ENV{OUT} = "../$configure_vars{'INPATH'}"; $ENV{LOCAL_OUT} = $ENV{OUT}; $ENV{LOCAL_COMMON_OUT} = $ENV{OUT}; @@ -132,6 +134,16 @@ system ("cd $setup_vars{OOBUILDDIR}/instsetoo_native/util ; " . "-buildid $BUILD $destdir $strip " . "-simple $path") && die "Failed to install: $!"; +if (($setup_vars{'VENDORNAME'} eq 'Novell' || $setup_vars{'VENDORNAME'} eq 'Debian' ) && $configure_vars{BUILD_TYPE} =~ m/ODK/) { +print "Running SDK installer\n"; +system ("cd $setup_vars{OOBUILDDIR}/instsetoo_native/util ; " . + "perl -w $configure_vars{SOLARENV}/bin/make_installer.pl " . + "-f openoffice.lst -l $langs -p OpenOffice_SDK " . + "-packagelist ../inc_sdkoo/unix/packagelist.txt " . + "-buildid $BUILD $destdir $strip " . + "-simple $path/sdk") && die "Failed to install: $!"; +} + print "Installer finished\n"; if ($do_link) { diff --git a/bin/package-ooo b/bin/package-ooo index 6fc872b17..aa1c960ac 100755 --- a/bin/package-ooo +++ b/bin/package-ooo @@ -90,6 +90,12 @@ else done create_qstart_wrapper "$PREFIX/bin/oofromtemplate${BINSUFFIX}" "" "slot:5500" || exit 1; create_qstart_wrapper "$PREFIX/bin/ooffice${BINSUFFIX}" "" "" || exit 1; + if test "z$VENDORNAME" = "zNovell" -o "z$VENDORNAME" = "zPLD" \ + -o "z$VENDORNAME" = "zDebian"; then + for app in calc draw impress math web writer base fromtemplate ffice ; do + echo ".so man1/openoffice$BINSUFFIX.1" >| $MANDIR/man1/oo${app}$BINSUFFIX.1; + done + fi fi # no man-page so ... @@ -112,8 +118,8 @@ if test "z$VENDORNAME" != "zRedHat"; then echo "Generating man page ..."; man_page_in=$TOOLSDIR/man/openoffice.1.in # use the distro specific man page if available - if test -f $TOOLSDIR/man/openoffice.1_$DISTRO.in ; then - man_page_in=$TOOLSDIR/man/openoffice.1_$DISTRO.in + if test -f $TOOLSDIR/man/openoffice.1_${DISTRO%%-*}.in ; then + man_page_in=$TOOLSDIR/man/openoffice.1_${DISTRO%%-*}.in fi sed -e "s|@BINSUFFIX@|$BINSUFFIX|g" $man_page_in \ >| "$OOBUILDDIR/openoffice$BINSUFFIX.1" || exit 1; @@ -276,43 +282,148 @@ rm -Rf $OOINSTDIR/share/uno_packages/cache/* echo "Done"; +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 $OOINSTDIR/help/$lang -o \ + -L $OOINSTDIR/help/$lang && return; + + echo "... remove \"$lang\"" + + rm -rf $OOINSTDIR/help/$lang + grep -v "$OOINSTBASE/help/$lang" $OODESTDIR/gid_Module_Root.$lang >$OODESTDIR/gid_Module_Root.$lang.new + mv -f $OODESTDIR/gid_Module_Root.$lang.new $OODESTDIR/gid_Module_Root.$lang + grep -v "$OOINSTBASE/help/$lang" $OODESTDIR/gid_Module_Langpack_Help.$lang >$OODESTDIR/gid_Module_Langpack_Help.$lang.new + mv -f $OODESTDIR/gid_Module_Langpack_Help.$lang.new $OODESTDIR/gid_Module_Langpack_Help.$lang + + # 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 $OOINSTDIR/help/en/sbasic.cfg -a \ "`for lang in $OOO_LANGS_LIST ; do echo $lang ; break ; done`" = "en-US" ; then + echo "Removing duplicated English help..." for lang in $OOO_LANGS_LIST ; do - test "$lang" = "en-US" && continue || :; test ! -f $OOINSTDIR/help/en/sbasic.cfg -o ! -f $OOINSTDIR/help/$lang/sbasic.cfg && continue; if diff $OOINSTDIR/help/en/sbasic.cfg $OOINSTDIR/help/$lang/sbasic.cfg >/dev/null 2>&1 ; then - echo "... remove \"$lang\"" - rm -rf $OOINSTDIR/help/$lang - grep -v "$OOINSTBASE/help/$lang" $OODESTDIR/gid_Module_Root.$lang >$OODESTDIR/gid_Module_Root.$lang.new - mv -f $OODESTDIR/gid_Module_Root.$lang.new $OODESTDIR/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_Langpack_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. - if test -f $OODESTDIR/gid_Module_Langpack_Help.$lang ; then - grep -v "$OOINSTBASE/help/$lang" $OODESTDIR/gid_Module_Langpack_Help.$lang >$OODESTDIR/gid_Module_Langpack_Help.$lang.new - mv -f $OODESTDIR/gid_Module_Langpack_Help.$lang.new $OODESTDIR/gid_Module_Langpack_Help.$lang - fi - echo "... link \"$lang\" to \"en\"" - ln -sf en $OOINSTDIR/help/$lang - echo "$OOINSTBASE/help/$lang" >>$OODESTDIR/gid_Module_Root.$lang - # FIXME: the following code could be used without the condition - # and should replace the line above after only the milestones - # providing gid_Module_Langpack_Help are supported - if test -f $OODESTDIR/gid_Module_Langpack_Help.$lang ; then - echo "$OOINSTBASE/help/$lang" >>$OODESTDIR/gid_Module_Langpack_Help.$lang - fi + remove_help_localization $lang fi done + + echo "Removing poor help localizations..." + + # FIXME: Should be configurable via a configure switch + OOO_POOR_HELP_LOCALIZATIONS= + if test "$VENDORNAME" = "Novell" ; then + # These are the localizations with less than 50% of localized string + # The list is generated by bin/stat-localizations + # See also doc/stat-localizations.txt + OOO_POOR_HELP_LOCALIZATIONS="af be-BY ca cy fi hi-IN lt nb nn st ts xh zu sr-CS vi rw tr el hr mk sk sl bg" + fi + for lang in $OOO_POOR_HELP_LOCALIZATIONS ; do + remove_help_localization $lang + done fi +if test -d $OOINSTDIR/sdk ; then + # bin potential .orig files + find $OOINSTDIR/sdk -name "*.orig" -exec rm -f {} \; + + # move some SDK directories to the right place according to FHS + # note that examples must stay in $OOINSTDIR/sdk because there are used + # relative paths to $OOINSTDIR/sdk/setting and it does not work via + # a symlink + mkdir -p $PREFIX/include + mkdir -p $DATADIR/idl + mkdir -p $DATADIR/xml + mkdir -p $DATADIR/$OOOINSTALLDIRNAME/sdk + mkdir -p $DOCDIR/sdk + mv $OOINSTDIR/sdk/include $PREFIX/include/$OOOINSTALLDIRNAME + mv $OOINSTDIR/sdk/classes $DATADIR/$OOOINSTALLDIRNAME/sdk/classes + mv $OOINSTDIR/sdk/idl $DATADIR/idl/$OOOINSTALLDIRNAME + mv $OOINSTDIR/sdk/xml $DATADIR/xml/$OOOINSTALLDIRNAME + mv $OOINSTDIR/sdk/docs $DOCDIR/sdk + mv $OOINSTDIR/sdk/share/readme $DOCDIR/sdk + mv $OOINSTDIR/sdk/LICENSE* $DOCDIR/sdk + mv $OOINSTDIR/sdk/README* $DOCDIR/sdk + mv $OOINSTDIR/sdk/index.html $DOCDIR/sdk + + # bin empty directories + rmdir $OOINSTDIR/sdk/share/ + + # compat symlinks + ln -sf $PREFIXBASE/include/$OOOINSTALLDIRNAME $OOINSTDIR/sdk/include + ln -sf $DATADIRBASE/$OOOINSTALLDIRNAME/sdk/classes $OOINSTDIR/sdk/classes + ln -sf $DATADIRBASE/idl/$OOOINSTALLDIRNAME $OOINSTDIR/sdk/idl + ln -sf $DATADIRBASE/xml/$OOOINSTALLDIRNAME $OOINSTDIR/sdk/xml + ln -sf $DOCDIRBASE/sdk/docs $OOINSTDIR/sdk/ + ln -sf $DOCDIRBASE/sdk/index.html $OOINSTDIR/sdk/index.html + ln -sf $OOINSTBASE/sdk/examples $DOCDIR/sdk/examples + + # fix file list + sed -e "s|^\(%dir \)\?$OOINSTBASE/sdk/include|\1$PREFIXBASE/include/$OOOINSTALLDIRNAME|" \ + -e "s|^\(%dir \)\?$OOINSTBASE/sdk/classes|\1$DATADIRBASE/$OOOINSTALLDIRNAME/sdk/classes|" \ + -e "s|^\(%dir \)\?$OOINSTBASE/sdk/idl|\1$DATADIRBASE/idl/$OOOINSTALLDIRNAME|" \ + -e "s|^\(%dir \)\?$OOINSTBASE/sdk/xml|\1$DATADIRBASE/xml/$OOOINSTALLDIRNAME|" \ + -e "s|^\(%dir \)\?$OOINSTBASE/sdk/docs|\1$DOCDIRBASE/sdk/docs|" \ + -e "s|^\(%dir \)\?$OOINSTBASE/sdk/share/readme|\1$DOCDIRBASE/sdk/readme|" \ + -e "s|^$OOINSTBASE/sdk/LICENSE\(.*\)$|$DOCDIRBASE/sdk/LICENSE\1|" \ + -e "s|^$OOINSTBASE/sdk/README\(.*\)$|$DOCDIRBASE/sdk/README\1|" \ + -e "s|^$OOINSTBASE/sdk/index.html$|$DOCDIRBASE/sdk/index.html|" \ + -e "s|^\(%dir \)\?$OOINSTBASE/sdk/share.*$||" \ + -e "/\.orig$/D" \ + -e "/^$/D" \ + $OODESTDIR/gid_Module_Root_SDK \ + >$OODESTDIR/gid_Module_Root_SDK.new + mv $OODESTDIR/gid_Module_Root_SDK.new $OODESTDIR/gid_Module_Root_SDK + # + echo "%dir $DATADIRBASE/$OOOINSTALLDIRNAME/sdk" >>$OODESTDIR/gid_Module_Root_SDK + echo "%dir $DATADIRBASE/$OOOINSTALLDIRNAME" >>$OODESTDIR/gid_Module_Root_SDK + echo "%dir $DATADIRBASE/idl" >>$OODESTDIR/gid_Module_Root_SDK + echo "%dir $DATADIRBASE/xml" >>$OODESTDIR/gid_Module_Root_SDK + echo "%dir $DOCDIRBASE/sdk/docs" >>$OODESTDIR/gid_Module_Root_SDK + echo "%dir $DOCDIRBASE/sdk" >>$OODESTDIR/gid_Module_Root_SDK + echo "%dir $DOCDIRBASE" >>$OODESTDIR/gid_Module_Root_SDK + echo "$OOINSTBASE/sdk/include" >>$OODESTDIR/gid_Module_Root_SDK + echo "$OOINSTBASE/sdk/classes" >>$OODESTDIR/gid_Module_Root_SDK + echo "$OOINSTBASE/sdk/idl" >>$OODESTDIR/gid_Module_Root_SDK + echo "$OOINSTBASE/sdk/xml" >>$OODESTDIR/gid_Module_Root_SDK + echo "$OOINSTBASE/sdk/docs" >>$OODESTDIR/gid_Module_Root_SDK + echo "$OOINSTBASE/sdk/index.html" >>$OODESTDIR/gid_Module_Root_SDK + echo "$DOCDIRBASE/sdk/examples" >>$OODESTDIR/gid_Module_Root_SDK + + # generate default profiles + for file in setsdkenv_unix.csh setsdkenv_unix.sh ; do + sed -e "s,@OO_SDK_NAME@,OpenOffice.org2.0_SDK," \ + -e "s,@OO_SDK_HOME@,$OOINSTBASE/sdk," \ + -e "s,@OFFICE_HOME@,$OOINSTBASE," \ + -e "s,@OO_SDK_URE_HOME@,," \ + -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," \ + $OOINSTDIR/sdk/$file.in \ + > $OOINSTDIR/sdk/$file + chmod 755 $OOINSTDIR/sdk/$file + echo $OOINSTBASE/sdk/$file >>$OODESTDIR/gid_Module_Root_SDK + done + + # FIXME: I rather set this file to be non-world-writttable for now, i#64812 + chmod go-w $OOINSTDIR/sdk/settings/component.uno.map +fi + # 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() @@ -353,7 +464,7 @@ fi cd $OODESTDIR if test -f gid_Module_Root_Files_2; then - GID_MODULE_ROOT_FILES_LISTS="gid_Module_Root_Files_*" + GID_MODULE_ROOT_FILES_LISTS="gid_Module_Root_Files_[0-9]" else GID_MODULE_ROOT_FILES_LISTS="" fi @@ -407,6 +518,10 @@ if test "z$VENDORNAME" != "zDebian" ; then test -f gid_Module_Langpack_Resource.$lang && lang_lists="$lang_lists gid_Module_Langpack_Resource.$lang" || : test -n "$lang_lists" && cat $lang_lists | sort -u >$BUILDDIR/lang_${lang}_list.txt || : done + + if test -f gid_Module_Root_SDK ; then + cp gid_Module_Root_SDK $BUILDDIR/sdk_list.txt + fi # sort && uniq suck but eg. gid_Module_Optional_Draw & Impress have substantial overlap @@ -459,6 +574,20 @@ if test "z$VENDORNAME" != "zDebian" ; then add_used_directories officebean_list.txt common_list.txt fi + if test -f sdk_list.txt ; then + rm -f sdk_doc_list.txt + # 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 $OOINSTBASE/sdk/examples.*" + mv_file_between_flists sdk_doc_list.txt sdk_list.txt "$OOINSTBASE/sdk/docs" + mv_file_between_flists sdk_doc_list.txt sdk_list.txt "$OOINSTBASE/sdk/examples.*" + mv_file_between_flists sdk_doc_list.txt sdk_list.txt "$OOINSTBASE/sdk/index.html" + add_used_directories sdk_doc_list.txt sdk_list.txt + 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 $OOINSTBASE/presets/config/arrowhd.soe @@ -518,6 +647,8 @@ else create_package_directory gid_Module_Optional_Testtool pkg/openoffice.org-common fi + create_package_directory gid_Module_Root_SDK pkg/openoffice.org-dev + for l in `echo $OOO_LANGS_LIST | sed -e s/en-US//`; do \ create_package_directory gid_Module_Root.$l pkg/openoffice.org-l10n-$l; \ create_package_directory gid_Module_Langpack_Resource.$l pkg/openoffice.org-l10n-$l; \ diff --git a/bin/patch-remove b/bin/patch-remove new file mode 100755 index 000000000..9deeb3e14 --- /dev/null +++ b/bin/patch-remove @@ -0,0 +1,22 @@ +#!/usr/bin/perl -w + +my $pattern = shift (@ARGV); +$pattern = 'util/defs/wntmsci' if (!defined $pattern); + +# removes crud from diffs +my $filter = 0; + +while (<>) { + my $line = $_; + if ($line =~ m/^--- ([^ \t]*)/) { # spaces in fname ? + my $path = $1; + if ($path =~ m/$pattern/) { + $filter = 1; + print STDERR "Prune $path section\n"; + } else { + $filter = 0; +# print STDERR "Preserve $path section\n"; + } + } + print $line if (!$filter); +} diff --git a/bin/potores b/bin/potores new file mode 100644 index 000000000..a24e6fa89 --- /dev/null +++ b/bin/potores @@ -0,0 +1,88 @@ +#!/usr/bin/perl -w + +use strict; + +# there is prolly a much much better way to do this, but the docs +# were not findable, and or that helpful & parsing .po is easy +# +# This tool expects a tree of .po files, 1 per ISO lang: +# {prefix}/ +# de/ +# fr/ +# ... +# +# inside each dir this filename is used: +my $pofilename = 'totranslate.po'; +my $path = shift @ARGV; + +sub insert($$$$) +{ + my ($lang_hash, $lang, $msgid, $msgstr) = @_; + + if (!defined $lang_hash->{$msgid}) { + my %tmphash; + $lang_hash->{$msgid} = \%tmphash; + } + my $thismsg = $lang_hash->{$msgid}; + $thismsg->{$lang} = $msgstr; +# print "Insert '$msgid' [$lang] '" . $thismsg->{$lang} . "'\n"; +} + +sub slurp_pofile($$$) +{ + my ($lang_hash, $lang, $po_file) = @_; + my $fileh; + my $msgid = '<error>'; + + open ($fileh, "$po_file") || die "Can't open $po_file: $!"; + while (<$fileh>) { + my $line = $_; + $line =~ /^\#/ && next; + $line =~ /^\s*$/ && next; + if ($line =~ m/^"(.*)"\s*$/) { + my $attr = $1; + if ($attr =~ m/Content-Type: .*charset=(.*)/) { + my $charset = $1; + $charset =~ m/utf-8/i || die "Invalid charset $charset"; + } + next; # skip headers + } + if ($line =~ /^msg(id|str)\s*"([^\"]*)"/) { + $msgid = $2 if ($1 eq 'id'); + insert ($lang_hash, $lang, $msgid, $2) if ($1 eq 'str'); + } else { + print "Unpleasant .po file line '$line'\n"; + } + } + close ($fileh); +} + +print STDERR "Reading translations at $path\n"; + +my $dirh; +my %langs; +opendir ($dirh, $path) || die "Can't open $path: $!"; +while (my $lang = readdir ($dirh)) { + $lang =~ /^\./ && next; + printf STDERR "$lang "; + slurp_pofile (\%langs, $lang, "$path/$lang/$pofilename"); +} +printf STDERR "\n"; +closedir ($dirh); + +sub printstr($$) +{ + my ($lang, $str) = @_; + $lang =~ s/_/-/g; + print "+\t\tText[ $lang ] = \"$str\";\n"; +} + +for my $msgid ( sort keys %langs ) { + print "SID_\n"; +# print "msgid $msgid\n"; + my $thismsg = $langs{$msgid}; + printstr("en-US", $msgid); + for my $lang ( sort keys %{$thismsg} ) { + printstr($lang, $thismsg->{$lang}); + } +} diff --git a/bin/stat-localizations b/bin/stat-localizations new file mode 100755 index 000000000..ddd9e842c --- /dev/null +++ b/bin/stat-localizations @@ -0,0 +1,92 @@ +#! /bin/sh + +usage() +{ + echo "This script counts how many strings of the given localization differs from" + echo "the English(US) localization" + echo + echo "Usage:" ${0##*/} locale ... + echo + echo "Presumptions:" + echo " - the module transex3 is built" + echo " - the profile *Env.Set* is sourced" + echo + echo "Note that the script is quite slow. It takes some minutes to extract strings" + echo "for one localization..." +} + +if test -z "$1" -o "$1" = "--help" ; then + usage && exit 1; +fi + +if ! which localize >/dev/null 2>&1 ; then + echo "Error: Unable to find the script \"localize\". Please, build and deliver" + echo " the module transex3 and keep the \*Env.Set\* sourced." + exit 1; +fi + +extract_gsi() +{ + echo "Extracting $1 strings..." + localize -e -f "$2" -l "$1" >/dev/null 2>&1 +} + +final_stat=`mktemp /tmp/ooo-stat-localizationse.XXXXXXXX` + +primary_lang="en-US" + +primary_gsi=`mktemp /tmp/ooo-stat-localizationse.XXXXXXXX` +extract_gsi $primary_lang $primary_gsi +primary_strings=`mktemp /tmp/ooo-stat-localizationse.XXXXXXXX` +cat $primary_gsi | cut -f 1,11 >$primary_strings + +primary_single_num=`grep -v "^helpcontent2" $primary_strings | sort -u | wc -l` +primary_single_num_help=`grep "^helpcontent2" $primary_strings | sort -u | wc -l` + + +for secondary_lang in $* ; do + + secondary_gsi=`mktemp /tmp/ooo-stat-localizationse.XXXXXXXX` + extract_gsi $secondary_lang $secondary_gsi + secondary_strings=`mktemp /tmp/ooo-stat-localizationse.XXXXXXXX` + cat $secondary_gsi | cut -f 1,11 >$secondary_strings + + echo "Counting $secondary_lang strings..." + + single_num=`grep -h -v "^helpcontent2" $primary_strings $secondary_strings | sort -u | wc -l` + secondary_single_num=`grep -v "^helpcontent2" $secondary_strings | sort -u | wc -l` + single_num_help=`grep -h "^helpcontent2" $primary_strings $secondary_strings | sort -u | wc -l` + secondary_single_num_help=`grep "^helpcontent2" $secondary_strings | sort -u | wc -l` + + #echo single_num=$single_num + #echo primary_single_num=$primary_single_num + #echo secondary_single_num=$secondary_single_num + + #echo single_num_help=$single_num_help + #echo primary_single_num_help=$primary_single_num_help + #echo secondary_single_num_help=$secondary_single_num_help + + localized=$((($single_num-$primary_single_num) * 100 / $primary_single_num)) + localized_help=$((($single_num_help-$primary_single_num_help) * 100 / $primary_single_num_help)) + + echo + echo "Locale:$secondary_lang ui:${localized}% help:${localized_help}%" + echo + + # + echo "Locale:$secondary_lang ui:${localized}% help:${localized_help}%" >>$final_stat + + rm $secondary_strings + rm $secondary_gsi +done + +rm $primary_strings +rm $primary_gsi + +echo +echo "===============================================================" +echo "Status of localizations" +echo "===============================================================" +sort -n -t':' --key=4 $final_stat + +rm $final_stat diff --git a/bin/test-ooo b/bin/test-ooo index f28039d7c..ba82ac77e 100755 --- a/bin/test-ooo +++ b/bin/test-ooo @@ -240,6 +240,11 @@ testList=(" echo "Switching to en_US.UTF-8 locales!!!" export LANG=en_US.UTF-8 +echo "Exporting OOO_FORCE_SYSALLOC=1" +export OOO_FORCE_SYSALLOC=1 +echo "Exporting MALLOC_CHECK_=2" +export MALLOC_CHECK_=2 + is_blacklisted() { for t in $testBlackList ; do diff --git a/bin/unpack b/bin/unpack index 056553e49..95e508ccd 100755 --- a/bin/unpack +++ b/bin/unpack @@ -70,6 +70,7 @@ if test "z$SYSTEM_GCC" = "z"; then fi echo "Unpacking OO.o build tree - [ go make some tea ] ..." +echo "Unpacking $OOO_TARBALL..." tar $OOO_UNTAR_OPTIONS $SRCDIR/$OOO_TARBALL || exit 1 echo "Fixing unfortunate snafus" @@ -105,18 +106,22 @@ chmod a+x $OOBUILDDIR/config_office/oowintool # -system source if test -f $SRCDIR/$OOO_SYSTEM_TARBALL; then # System is optional, but parts of it are useful + echo "Unpacking $OOO_SYSTEM_TARBALL..." tar $OOO_UNTAR_OPTIONS $SRCDIR/$OOO_SYSTEM_TARBALL fi # -binfilter source if test -f $SRCDIR/$OOO_BINFILTER_TARBALL; then + echo "Unpacking $OOO_BINFILTER_TARBALL..." tar $OOO_UNTAR_OPTIONS $SRCDIR/$OOO_BINFILTER_TARBALL fi # -lang source if test -f $SRCDIR/$OOO_LANG_TARBALL; then + echo "Unpacking $OOO_LANG_TARBALL..." tar $OOO_UNTAR_OPTIONS $SRCDIR/$OOO_LANG_TARBALL fi # -sdk_oo source if test -f $SRCDIR/$OOO_SDK_OO_TARBALL; then + echo "Unpacking $OOO_SDK_OO_TARBALL" tar $OOO_UNTAR_OPTIONS $SRCDIR/$OOO_SDK_OO_TARBALL fi diff --git a/desktop/calc.desktop.in b/desktop/calc.desktop.in index 2c9506bdf..f1b5a3934 100644 --- a/desktop/calc.desktop.in +++ b/desktop/calc.desktop.in @@ -6,6 +6,7 @@ TryExec=oocalc@BINSUFFIX@ Exec=oocalc@BINSUFFIX@ %U Icon=ooo-calc@BINSUFFIX@.png Type=Application +InitialPreference=6 Categories=Office;Spreadsheet StartupNotify=@STARTUPNOTIFY@ MimeType=application/vnd.oasis.opendocument.spreadsheet;application/vnd.oasis.opendocument.spreadsheet-template;application/vnd.sun.xml.calc;application/vnd.sun.xml.calc.template;application/vnd.stardivision.calc;application/vnd.stardivision.chart;application/msexcel;application/vnd.ms-excel;text/x-comma-separated-values;text/x-csv;application/vnd.lotus-1-2-3;text/spreadsheet;application/excel;application/x-excel;application/x-ms-excel;application/x-msexcel;application/x-sylk;application/x-xls;application/xls diff --git a/desktop/web.desktop.in b/desktop/web.desktop.in index 6fb0dbb16..88ccddabe 100644 --- a/desktop/web.desktop.in +++ b/desktop/web.desktop.in @@ -6,7 +6,7 @@ TryExec=ooweb@BINSUFFIX@ Exec=ooweb@BINSUFFIX@ %U Icon=ooo-web@BINSUFFIX@.png Type=Application -Categories=Office;WebDevelopment +Categories=Network;WebDevelopment StartupNotify=@STARTUPNOTIFY@ MimeType=application/vnd.oasis.opendocument.text-web _Name=OpenOffice.org Writer/Web diff --git a/distro-configs/Gentoo.conf.in b/distro-configs/Gentoo.conf.in index 39cf885ad..8c3d0e91e 100644 --- a/distro-configs/Gentoo.conf.in +++ b/distro-configs/Gentoo.conf.in @@ -1,6 +1,7 @@ --disable-fontooo --disable-odk --enable-libsn +--with-system-curl --with-system-expat --with-system-stdlibs --with-system-xrender-headers diff --git a/distro-configs/SUSE-9.1.conf.in b/distro-configs/SUSE-9.1.conf.in index d733c87d3..2e9eb5084 100644 --- a/distro-configs/SUSE-9.1.conf.in +++ b/distro-configs/SUSE-9.1.conf.in @@ -1,4 +1,5 @@ --disable-access +--disable-cairo --disable-odk --enable-gnome-vfs --enable-libsn diff --git a/doc/local.txt b/doc/local.txt index 727cc40b0..9a1581494 100644 --- a/doc/local.txt +++ b/doc/local.txt @@ -1,6 +1,14 @@ Local linking notes ... TODO: + + cppu::loadSharedLibComponentFactory + + this is what loads the libs ... + +** Resolved: + + trying to share stuff just doesn't work + + instead just throw/catch exceptions in a standalone lib. + + + Need different guards in .hpp & .hppi files + and no redundancy [!] + [ since .hppi files cascade include .hpp ] diff --git a/doc/stat-localizations.txt b/doc/stat-localizations.txt new file mode 100644 index 000000000..7f4dfee05 --- /dev/null +++ b/doc/stat-localizations.txt @@ -0,0 +1,65 @@ +The script bin/stat-localizations tries to find some poor localizations. + +The numbers show how many strings differ from the English localization. That's +why the en-US localization has 0% and and en-GB has 7% resp. 10%. + +Note that there is no localizations with 100%. There are many international +strings that are not translated. Then again some things marked translatable +are really not eg.'#VALUE!' in Calc. + + +Here is the statistic taken from Novell build (2 May, 2006): + +Locale:af ui:92% help:0% +Locale:ar ui:85% help:0% +Locale:be-BY ui:85% help:0% +Locale:ca ui:91% help:0% +Locale:cy ui:88% help:0% +Locale:en-US ui:0% help:0% +Locale:fi ui:92% help:0% +Locale:gu-IN ui:60% help:0% +Locale:hi-IN ui:56% help:0% +Locale:lt ui:93% help:0% +Locale:nb ui:92% help:0% +Locale:nn ui:91% help:0% +Locale:pa-IN ui:58% help:0% +Locale:pt ui:59% help:0% +Locale:st ui:96% help:0% +Locale:ts ui:96% help:0% +Locale:xh ui:96% help:0% +Locale:zu ui:93% help:0% +Locale:sr-CS ui:92% help:2% +Locale:vi ui:86% help:2% +Locale:en-GB ui:7% help:10% +Locale:rw ui:88% help:11% +Locale:tr ui:95% help:11% +Locale:el ui:90% help:12% +Locale:hr ui:88% help:14% +Locale:mk ui:94% help:24% +Locale:sk ui:91% help:28% +Locale:sl ui:93% help:31% +Locale:bg ui:91% help:32% +Locale:zh-CN ui:31% help:64% +Locale:zh-TW ui:31% help:65% +Locale:et ui:92% help:66% +Locale:km ui:39% help:74% +Locale:ko ui:45% help:75% +Locale:ja ui:72% help:86% +Locale:cs ui:87% help:91% +Locale:hu ui:92% help:91% +Locale:pl ui:92% help:92% +Locale:ru ui:89% help:92% +Locale:da ui:91% help:93% +Locale:fr ui:90% help:93% +Locale:pt-BR ui:94% help:93% +Locale:sv ui:93% help:93% +Locale:de ui:93% help:94% +Locale:nl ui:93% help:94% +Locale:it ui:92% help:95% +Locale:es ui:95% help:96% + + +Note that many localizations were updated from the GSI sources that can be +found at +ftp://ftp.linux.cz/pub/localization/OpenOffice.org/devel/build/Files/OOB680 +The statistic is based on GSI files grabbed at 20 January, 2006. diff --git a/man/openoffice.1_SUSE.in b/man/openoffice.1_SUSE.in index b5849f662..bd11e0e91 100644 --- a/man/openoffice.1_SUSE.in +++ b/man/openoffice.1_SUSE.in @@ -1,9 +1,8 @@ -.TH ooffice "1" "2005-10-25" "OpenOffice.org 2.0.0" "User Commands" +.TH ooffice "1" "2006-03-23" "OpenOffice.org 2.0" "User Commands" .SH "Name" ooffice@BINSUFFIX@ \- OpenOffice.org office suite .SH SYNOPSIS .B ooffice@BINSUFFIX@ -[\fB\-\-version\fR] [\fB\-\-widgets\-set\fI widgetsset\fR] [\fB\-accept\=\fIaccept\-string\fR] [\fB\-calc\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] @@ -40,18 +39,18 @@ Obsolete: .br .B OOo\-calc@BINSUFFIX@ .br +.B OOo\-draw@BINSUFFIX@ +.br .B OOo\-impress@BINSUFFIX@ .br .B OOo\-math@BINSUFFIX@ .br -.B OOo\-padmin@BINSUFFIX@ -.br -.B OOo\-setup@BINSUFFIX@ -.br .B OOo\-template@BINSUFFIX@ .br .B OOo\-web@BINSUFFIX@ .br +.B OOo\-writer@BINSUFFIX@ +.br .SH DESCRIPTION OpenOffice.org is a fully featured office suite for the daily use with all features you would normally expect in a office suite. @@ -65,20 +64,6 @@ Do not use the obsolete wrappers, please. They will be removed in a future relea of the product. .SH OPTIONS -These arguments are processed by the wrapper itself. -.TP -\fB\-\-version\fR -This option displays the version of this OpenOffice.org build. -.TP -\fB\-\-widgets\-set \fIwidgetsset\fR -This option allows to start the application with an other widgets set. -Note that the support for \fIgtk\fR resp. \fIkde\fR widgets set is -included in the package \fIOpenOffice_org\-gnome\fR resp. -\fIOpenOffice_org\-kde\fR. -.TP - -These arguments are passed directly to the real start binary by the wrapper. -.TP \fIfilename\fR... Files to operate on. Opening them is the default behavior, which can be influenced by command line arguments. \fB\-p\fR will print the files instead. diff --git a/patches/evo2/dbaccess-evo-changes.diff b/patches/evo2/dbaccess-evo-changes.diff index 51ecc4f1c..e63b0ed5b 100644 --- a/patches/evo2/dbaccess-evo-changes.diff +++ b/patches/evo2/dbaccess-evo-changes.diff @@ -148,7 +148,7 @@ }; String STR_KAB { -@@ -221,11 +229,21 @@ +@@ -221,10 +229,41 @@ Text [ de ] = "Microsoft Windows Adressbuch"; Text[ en-US ] = "Microsoft Windows Address Book"; }; @@ -159,18 +159,39 @@ - }; + String STR_EVOLUTION_LOCAL + { -+ Text [ de ] = "Evolution Local Adressbuch"; + Text[ en-US ] = "Evolution Local"; ++ Text[ de ] = "Lokales Evolution-Adressbuch"; ++ Text[ es ] = "Libreta de direcciones local de Evolution"; ++ Text[ fr ] = "Carnet d'adresses Evolution local"; ++ Text[ it ] = "Rubrica locale di Evolution"; ++ Text[ ja ] = "Evolutionãƒãƒ¼ã‚«ãƒ«Addressbook "; ++ Text[ pt-BR ] = "Bloco de Endereços Local do Evolution"; ++ Text[ zh-CN ] = "Evolution 本地地å€ç°¿"; ++ Text[ zh-TW ] = "Evolution Local 通訊錄"; + }; + String STR_EVOLUTION_LDAP + { -+ Text [ de ] = "Evolution LDAP Adressbuch"; + Text[ en-US ] = "Evolution LDAP"; ++ Text[ de ] = "Evolution-LDAP-Adressbuch"; ++ Text[ es ] = "Libreta de direcciones LDAP de Evolution"; ++ Text[ fr ] = "Carnet d'adresses Evolution LDAP"; ++ Text[ it ] = "Rubrica LDAP di Evolution"; ++ Text[ ja ] = "Evolution LDAP Addressbook `"; ++ Text[ pt-BR ] = "Bloco de Endereços LDAP do Evolution"; ++ Text[ zh-CN ] = "Evolution LDAP 地å€ç°¿"; ++ Text[ zh-TW ] = "Evolution LDAP 通訊錄"; + }; + String STR_EVOLUTION_GROUPWISE + { -+ Text [ de ] = "Groupwise Adressbuch"; + Text[ en-US ] = "Groupwise"; ++ Text[ de ] = "Evolution-Groupwise-Adressbuch"; ++ Text[ es ] = "Libreta de direcciones de GroupWise de Evolution"; ++ Text[ fr ] = "Carnet d'adresses Evolution Groupwise"; ++ Text[ it ] = "Rubrica Groupwise di Evolution"; ++ Text[ ja ] = "Evolution Groupwise Addressbook "; ++ Text[ pt-BR ] = "Bloco de Endereços Groupwise do Evolution"; ++ Text[ zh-CN ] = "Evolution Groupwise 地å€ç°¿"; ++ Text[ zh-TW ] = "Evolution Groupwise 通訊錄"; + }; String STR_KAB { diff --git a/patches/src680/apply b/patches/src680/apply index 1cbba468e..fd2ec18cb 100644 --- a/patches/src680/apply +++ b/patches/src680/apply @@ -32,16 +32,17 @@ SUSE-9.1 : NovellBase SUSE-9.2 : NovellBase SUSE-9.3 : NovellBase SUSE-10.0 : NovellBase +SUSE-10.1 : NovellBase, BerkeleyDB43 SUSE : NovellBase, BerkeleyDB43 -SUSE-PPC : NovellBase, BerkeleyDB43, GCJExperimental, SystemJavaBits, SUSEPPCOnly +SUSE-PPC : NovellBase, BerkeleyDB43, GCJExperimental, SystemJavaBits SUSE-64 : NovellBase, BerkeleyDB43, 64bit # Debian -DebianBase : LinuxCommon, DebianBaseOnly, GCJExperimental, SystemJavaBits, AtkBridge, CalcSolver +DebianBase : LinuxCommon, DebianBaseOnly, GCJExperimental, SystemJavaBits, AtkBridge, CalcSolver, Lockdown Debian : DebianBase, DebianOnly, DebianSidOnly DebianSarge : DebianBase, DebianOnly, DebianSargeOnly Debian64 : DebianBase, DebianOnly, DebianSidOnly, 64bit # Ubuntu -UbuntuBased : DebianBase, UbuntuOnly, GCJExperimental, BerkeleyDB43, Lockdown +UbuntuBased : DebianBase, UbuntuOnly, BerkeleyDB43 Ubuntu : UbuntuBased, DebianBaseNoHelpContent UbuntuL10n : UbuntuBased, UbuntuL10nOnly Ubuntu64 : UbuntuBased, 64bit @@ -119,6 +120,10 @@ buildfix-ucb-xml-cflags.diff # possible up-stream are re-writing this completely so ... speed-2nd-start.diff +# accelerate linking, by extreme cunning i#63927 +# speed-local-link-except.diff +# speed-local-link.diff + # Don't refcount the empty string strtmpl.diff @@ -155,6 +160,12 @@ buildfix-without-mozilla.diff # workaround parallel build in cli_ure #62624 buildfix-parallel-cli_ure.diff +# Fix build without java, again, i#62716 +buildfix-no-java.diff + +# Fix crash in fileview i#64609, n#168097 +fix-fileview-search.diff + [ GCJ ] # work around missing symbol in libgcj... @@ -177,6 +188,8 @@ gui-sw-scroll.diff [ Fixes ] # fix check box rendering issue - n#80447 check-buttons-rendering-fix.diff +# fix gtk+ context menu behavior - i#65578 +gui-gtk-contextmenu.diff # Fix default Writer bullets not exporting to MS format intact n#10555 sw-bullet-interop-fix.diff # Fix NFS / flock issue n#104655, i#53682 @@ -247,6 +260,8 @@ warning-uninitialized-variables-vcl.diff gtk-kde-fix.diff # run crash_report only when it is built, i#54121 sal-when-to-run-crash-report.diff +# use fontconfig to enable/disable bitmaps i#61841, n#16082 +#vcl-fontconfig-hints.diff # Fix the print error dialog and pop-up when unable to print. BINC 64010 Issue 44695 print-error.diff @@ -319,6 +334,36 @@ shell-safer-recently-used-perm.diff # validator.w3.org; Ubuntu 20294, i#63081 sw-html-export-style-type.diff +# fix problems with styles containing dashes i#63107, https://bugzilla.novell.com/show_bug.cgi?id=160120 +styles-dash.diff + +# i#63766 hang on import of ms doc with vba +# containing the characters "Attribute" +svx-vbaimport-basic-hang.diff + +# i#64301, n#162979 fix hang on import +hang-sw-layout.diff + +# outsmart Metacity's "focus:mouse" mode, i#63086 +vcl-metacity-focus.diff + +# fix crash when selecting email application, Ubuntu #33767 +fix_filedlghelper.diff + +# Greek font setting, i#64578, i#64577, n#166267 +helpcontent2-greek-fonts.diff +office-cfg-vcl-greek-fonts.diff + +# fixes from cws ab19 +cws-ab19.diff +# fixes from cws npower1 +cws-npower1.diff + +# Using any filter when browsing samba shares results in no files displayed +# n#167900, noelpwer +filechooser-samba-problem.diff + + [ Leaks ] # silly leaks around the place i#50726 leak-sal-file.diff @@ -340,6 +385,8 @@ size-strip.diff speed-quickstart.diff # An improved built-in quick-starter applet / systray thing. i#57872 speed-quickstart-eggtray.diff +# i18n for quickstarter +speed-quickstart-i18n.diff # 2nd time accelerator i#60696 speed-ooqstart.diff # Handle slot:XYZ correctly n#157583 @@ -353,6 +400,8 @@ speed-ooqstart-hide-asap.diff speed-ooqstart-more-steps.diff # Make it X11+glib-only speed-ooqstart-x11-only.diff +# Fix -display and other options, n#160296 +speed-ooqstart-options.diff # make the office socket name more predictable for external re-use @@ -393,7 +442,10 @@ sc-get-pivot-data.diff sc-seriessum.diff # Return =value() of an empty cell as 0 - i#35483 sc-valuefunc.diff - +# optimization for loading large pivot tables from xls - i#63686 +sc-xls-pivot-optimization.diff +# hash item collections, i#TODO, jody +sc-dp-hash-items.diff # div/0 error export by other functions - i47724 sc-div-errs.diff @@ -452,6 +504,9 @@ sd-slideshow-cursor-hide.diff # Make the linguistic simple dictionary stuff more pleasant i#60698 linguistic-rework.diff +# fall back to the English help even without the symlink, rh#151357 +sfx2-fallback-to-en-help.diff + [ Egg ] # go-oo.org people active in this release go-oo-team.diff @@ -468,6 +523,8 @@ default-system-fpicker.diff default-no-install-wizards.diff # more intelligent nsplugin seeking, i#49590 nsplugin-path.diff +# use freetype embolden method instead of bold emulation n#176701. i65520, foa +vcl-glyphs-cjk-embolden.diff [ DebianBaseOnly ] odk-remove-non-free.diff @@ -535,7 +592,6 @@ gui-font-paranoid-fallback.diff [ NovellOnlyWin32 ] -filebug-support.diff novell-win32-agfa-monotype-fonts.diff novell-win32-installer-branding.diff novell-win32-odma.diff @@ -550,6 +606,8 @@ translate-org-za-splash.diff [ FrugalwareOnly ] frugalware.diff +xmlhelp-port-to-db-4.4.diff +store-drop-gcc-libs-on-linking.diff [ Frugalware64Only ] frugalware64.diff @@ -606,7 +664,7 @@ sd-save-image-context-menu.diff [ SDFPatches ] sd-save-image-context-menu-localize.diff - +sc-standard-filter-options-i18n.diff [ Features ] # Make cut and paste nicer i#15509 @@ -671,6 +729,12 @@ buildfix-connectivity-kab-stdio.diff # do not pack any potential .orig files with ppds psprint_config-no-orig.diff +# changes the SDK gid module name to gid_Module_Root_SDK, so the generated list +# of files does not conflict with the main package, i#64802 +sdk-gid-module-name.diff +# allows to install SDK that includes file names with $ (classes), i#64801 +sdk-filenames-with-dollar.diff + [ BuildBits == oob680-m5 != OOO_2_0_2 ] # install ppd and afm again by default, added as master fix to oob680-m5, i#62068 buildfix-ppd-afm-check-62068.diff @@ -779,8 +843,9 @@ cws-dmake43p01-20060131.diff no-splash-takeover.diff # Ensure window title is "OpenOffice.org..." rather than "Untitled window" #rh120696# splash-title.diff -# Use nwf for menu item check boxes instead of ugly symbols #48965 +# Use nwf for menu item check boxes instead of ugly symbols i#48965 vcl-nwf-menu-checkmarks.diff +framework-check-items.diff # Better fallback when some of the plugins are not available i#50857 vcl-better-fallback.diff @@ -809,8 +874,7 @@ xmlsecurity_source_xmlsec_nss_gcc4_compile_fix.diff [ AtkBridge ] # iz#47890 iz#25402 iz#22097 - Direct atk-bridge for GNOME accessibility -cws-atkbridge-20060306.diff - +cws-atkbridge-20060425.diff [ Icons ] # Make insensitive toolbar icons look far nicer i#35555 @@ -898,14 +962,14 @@ win32-gw-send-mail.diff win32-msvs-2003-configure.diff # Minor build fixes for win32 win32-build-fixes.diff +# This is a pretty nasty IE problem i#19510 +win32-activex-disable.diff # This enables building libIDL, glib and buildtools for mozilla from source mozilla-buildlibs-win32.diff # This enables building scsolver on Win32 boost-patch.diff [ VBABits ] -# Prefer interoperability over marginal compatibility i#49495 -default-vba-compatible.diff vba-not-comments.diff # Parse (& ignore) 'Attribute' statements i#37347 vba-attribute.diff @@ -947,7 +1011,8 @@ omit-fp-workaround.diff system-db-4.3-use-lpthread.diff # iz#58474 - build this part with db 4.2/4.3/4.4 xmlhelp-port-to-db-4.4.diff - +# system neon 0.26.x compile fixes, i#64798 +system-neon-0.26.diff [ GentooOnly ] version-2-0-pre.diff @@ -968,8 +1033,6 @@ gentoo-gcc-naming-and-versioning.diff gentoo-xmlsecurity-system-nss.diff # hack: drop gcc libs store-drop-gcc-libs-on-linking.diff -# Fix build without java, again, i#62716 -buildfix-no-java.diff # # NOTE: 64 bit OOo is work in progress! @@ -1115,8 +1178,9 @@ buildfix-64bit-system-jpeg.diff #disable-xmlsearch-and-xmlhelp-jar.diff dont-build-cfgimport-jar.diff dont-copy-and-install-stlport.diff -# Fix build without java, again, i#62716 -buildfix-no-java.diff +# system neon 0.26.x compile fixes, i#64798 +system-neon-0.26.diff +help-msg-add-package-info.diff [ DebianBaseNoHelpContent ] disable-helpcontent2.diff @@ -1127,7 +1191,6 @@ static-libs-use-_pic.diff [ UbuntuOnly ] ubuntu-splash.diff -ubuntu-no-help-msg.diff ubuntu-lpi.diff static-libs-use-_pic.diff default-system-fpicker.diff @@ -1202,6 +1265,8 @@ offapi-org-openoffice-vba-xpivottable-idl.diff offapi-org-openoffice-vba-xpivottables-idl.diff offapi-org-openoffice-vba-xcomment-idl.diff offapi-org-openoffice-vba-xcomments-idl.diff +offapi-org-openoffice-vba-xwindows-idl.diff +offapi-org-openoffice-vba-xcharacters-idl.diff offapi-org-openoffice-vba-excel-xlcommentdisplaymode-idl.diff offapi-org-openoffice-vba-excel-xlcreator-idl.diff offapi-org-openoffice-vba-excel-xldirection-idl.diff @@ -1212,10 +1277,184 @@ offapi-org-openoffice-vba-excel-xlsortorder-idl.diff offapi-org-openoffice-vba-excel-xlsortorientation-idl.diff offapi-org-openoffice-vba-excel-xlyesnoguess-idl.diff offapi-org-openoffice-vba-excel-xlsortdataoption-idl.diff -offapi-org-openoffice-vba-xwindows-idl.diff offapi-org-openoffice-vba-excel-xldeleteshiftdirection-idl.diff -offapi-org-openoffice-vba-xcharacters-idl.diff offapi-org-openoffice-vba-excel-xlautofilltype-idl.diff +offapi-org-openoffice-vba-excel-xllistconflict-idl.diff +offapi-org-openoffice-vba-excel-xllistdatatype-idl.diff +offapi-org-openoffice-vba-excel-xllistobjectsourcetype-idl.diff +offapi-org-openoffice-vba-excel-xllocationintable-idl.diff +offapi-org-openoffice-vba-excel-xlmailsystem-idl.diff +offapi-org-openoffice-vba-excel-xlmarkerstyle-idl.diff +offapi-org-openoffice-vba-excel-xlmousebutton-idl.diff +offapi-org-openoffice-vba-excel-xlmousepointer-idl.diff +offapi-org-openoffice-vba-excel-xlmsapplication-idl.diff +offapi-org-openoffice-vba-excel-xlobjectsize-idl.diff +offapi-org-openoffice-vba-excel-xloletype-idl.diff +offapi-org-openoffice-vba-excel-xloleverb-idl.diff +offapi-org-openoffice-vba-excel-xlorder-idl.diff +offapi-org-openoffice-vba-excel-xlorientation-idl.diff +offapi-org-openoffice-vba-excel-xlpagebreak-idl.diff +offapi-org-openoffice-vba-excel-xlpagebreakextent-idl.diff +offapi-org-openoffice-vba-excel-xlpageorientation-idl.diff +offapi-org-openoffice-vba-excel-xlpapersize-idl.diff +offapi-org-openoffice-vba-excel-xlparameterdatatype-idl.diff +offapi-org-openoffice-vba-excel-xlparametertype-idl.diff +offapi-org-openoffice-vba-excel-xlpastespecialoperation-idl.diff +offapi-org-openoffice-vba-excel-xlpastetype-idl.diff +offapi-org-openoffice-vba-excel-xlpattern-idl.diff +offapi-org-openoffice-vba-excel-xlphoneticalignment-idl.diff +offapi-org-openoffice-vba-excel-xlpictureappearance-idl.diff +offapi-org-openoffice-vba-excel-xlpictureconvertortype-idl.diff +offapi-org-openoffice-vba-excel-xlpivotcelltype-idl.diff +offapi-org-openoffice-vba-excel-xlpivotfieldcalculation-idl.diff +offapi-org-openoffice-vba-excel-xlpivotfielddatatype-idl.diff +offapi-org-openoffice-vba-excel-xlpivotfieldorientation-idl.diff +offapi-org-openoffice-vba-excel-xlpivotformattype-idl.diff +offapi-org-openoffice-vba-excel-xlpivottablemissingitems-idl.diff +offapi-org-openoffice-vba-excel-xlpivottablesourcetype-idl.diff +offapi-org-openoffice-vba-excel-xlpivottableversionlist-idl.diff +offapi-org-openoffice-vba-excel-xlplacement-idl.diff +offapi-org-openoffice-vba-excel-xlplatform-idl.diff +offapi-org-openoffice-vba-excel-xlprinterrors-idl.diff +offapi-org-openoffice-vba-excel-xlprintlocation-idl.diff +offapi-org-openoffice-vba-excel-xlpriority-idl.diff +offapi-org-openoffice-vba-excel-xlptselectionmode-idl.diff +offapi-org-openoffice-vba-excel-xlquerytype-idl.diff +offapi-org-openoffice-vba-excel-xlrangeautoformat-idl.diff +offapi-org-openoffice-vba-excel-xlrangevaluedatatype-idl.diff +offapi-org-openoffice-vba-excel-xlreferencestyle-idl.diff +offapi-org-openoffice-vba-excel-xlreferencetype-idl.diff +offapi-org-openoffice-vba-excel-xlrobustconnect-idl.diff +offapi-org-openoffice-vba-excel-xlroutingslipdelivery-idl.diff +offapi-org-openoffice-vba-excel-xlroutingslipstatus-idl.diff +offapi-org-openoffice-vba-excel-xlrowcol-idl.diff +offapi-org-openoffice-vba-excel-xlrunautomacro-idl.diff +offapi-org-openoffice-vba-excel-xlsaveaction-idl.diff +offapi-org-openoffice-vba-excel-xlsaveasaccessmode-idl.diff +offapi-org-openoffice-vba-excel-xlsaveconflictresolution-idl.diff +offapi-org-openoffice-vba-excel-xlscaletype-idl.diff +offapi-org-openoffice-vba-excel-xlsearchdirection-idl.diff +offapi-org-openoffice-vba-excel-xlsearchwithin-idl.diff +offapi-org-openoffice-vba-excel-xlsheettype-idl.diff +offapi-org-openoffice-vba-excel-xlsheetvisibility-idl.diff +offapi-org-openoffice-vba-excel-xlsizerepresents-idl.diff +offapi-org-openoffice-vba-excel-xlsmarttagcontroltype-idl.diff +offapi-org-openoffice-vba-excel-xlsmarttagdisplaymode-idl.diff +offapi-org-openoffice-vba-excel-xlsortmethodold-idl.diff +offapi-org-openoffice-vba-excel-xlsorttype-idl.diff +offapi-org-openoffice-vba-excel-xlsourcetype-idl.diff +offapi-org-openoffice-vba-excel-xlspeakdirection-idl.diff +offapi-org-openoffice-vba-excel-xlspecialcellsvalue-idl.diff +offapi-org-openoffice-vba-excel-xlsubscribetoformat-idl.diff +offapi-org-openoffice-vba-excel-xlsubtototallocationtype-idl.diff +offapi-org-openoffice-vba-excel-xlsummarycolumn-idl.diff +offapi-org-openoffice-vba-excel-xlsummaryreporttype-idl.diff +offapi-org-openoffice-vba-excel-xlsummaryrow-idl.diff +offapi-org-openoffice-vba-excel-xltabposition-idl.diff +offapi-org-openoffice-vba-excel-xltextparsingtype-idl.diff +offapi-org-openoffice-vba-excel-xltextqualifier-idl.diff +offapi-org-openoffice-vba-excel-xltextvisuallayouttype-idl.diff +offapi-org-openoffice-vba-excel-xlticklabelorientation-idl.diff +offapi-org-openoffice-vba-excel-xlticklabelposition-idl.diff +offapi-org-openoffice-vba-excel-xltimemark-idl.diff +offapi-org-openoffice-vba-excel-xltimeunit-idl.diff +offapi-org-openoffice-vba-excel-xltoolbarprotection-idl.diff +offapi-org-openoffice-vba-excel-xltotalscalculation-idl.diff +offapi-org-openoffice-vba-excel-xltrendlinetype-idl.diff +offapi-org-openoffice-vba-excel-xlunderlinestyle-idl.diff +offapi-org-openoffice-vba-excel-xlupdatelinks-idl.diff +offapi-org-openoffice-vba-excel-xlvalign-idl.diff +offapi-org-openoffice-vba-excel-xlwbatemplate-idl.diff +offapi-org-openoffice-vba-excel-xlwebformatting-idl.diff +offapi-org-openoffice-vba-excel-xlwebsectiontype-idl.diff +offapi-org-openoffice-vba-excel-xlwindowstate-idl.diff +offapi-org-openoffice-vba-excel-xlwindowtype-idl.diff +offapi-org-openoffice-vba-excel-xlwindowview-idl.diff +offapi-org-openoffice-vba-excel-xlxlmmacrotype-idl.diff +offapi-org-openoffice-vba-excel-xlxmlexportresult-idl.diff +offapi-org-openoffice-vba-excel-xlxmlimportresult-idl.diff +offapi-org-openoffice-vba-excel-xlxmlloadoption-idl.diff +offapi-org-openoffice-vba-excel-xlapplicationinternational-idl.diff +offapi-org-openoffice-vba-excel-xlapplynamesorder-idl.diff +offapi-org-openoffice-vba-excel-xlarabicmodes-idl.diff +offapi-org-openoffice-vba-excel-xlarrangestyle-idl.diff +offapi-org-openoffice-vba-excel-xlarrowheadlength-idl.diff +offapi-org-openoffice-vba-excel-xlarrowheadstyle-idl.diff +offapi-org-openoffice-vba-excel-xlarrowheadwidth-idl.diff +offapi-org-openoffice-vba-excel-xlautofilteroperator-idl.diff +offapi-org-openoffice-vba-excel-xlaxiscrosses-idl.diff +offapi-org-openoffice-vba-excel-xlaxisgroup-idl.diff +offapi-org-openoffice-vba-excel-xlaxistype-idl.diff +offapi-org-openoffice-vba-excel-xlbackground-idl.diff +offapi-org-openoffice-vba-excel-xlbarshape-idl.diff +offapi-org-openoffice-vba-excel-xlbordersindex-idl.diff +offapi-org-openoffice-vba-excel-xlbuildindialog-idl.diff +offapi-org-openoffice-vba-excel-xlcalculatedmembertype-idl.diff +offapi-org-openoffice-vba-excel-xlcalculationinterruptkey-idl.diff +offapi-org-openoffice-vba-excel-xlcalculationstate-idl.diff +offapi-org-openoffice-vba-excel-xlcategorytype-idl.diff +offapi-org-openoffice-vba-excel-xlcellinsertionmode-idl.diff +offapi-org-openoffice-vba-excel-xlchartgallery-idl.diff +offapi-org-openoffice-vba-excel-xlchartitem-idl.diff +offapi-org-openoffice-vba-excel-xlchartlocation-idl.diff +offapi-org-openoffice-vba-excel-xlchartpictureplacement-idl.diff +offapi-org-openoffice-vba-excel-xlchartpicturetype-idl.diff +offapi-org-openoffice-vba-excel-xlchartsplittype-idl.diff +offapi-org-openoffice-vba-excel-xlcharttype-idl.diff +offapi-org-openoffice-vba-excel-xlclipboardformat-idl.diff +offapi-org-openoffice-vba-excel-xlcmdtype-idl.diff +offapi-org-openoffice-vba-excel-xlcolorindex-idl.diff +offapi-org-openoffice-vba-excel-xlcolumndatatype-idl.diff +offapi-org-openoffice-vba-excel-xlcommandunderlines-idl.diff +offapi-org-openoffice-vba-excel-xlconsolidationfunction-idl.diff +offapi-org-openoffice-vba-excel-xlcopypictureformat-idl.diff +offapi-org-openoffice-vba-excel-xlcorruptload-idl.diff +offapi-org-openoffice-vba-excel-xlcubefieldtype-idl.diff +offapi-org-openoffice-vba-excel-xlcverror-idl.diff +offapi-org-openoffice-vba-excel-xldatalabelposition-idl.diff +offapi-org-openoffice-vba-excel-xldatalabelseparator-idl.diff +offapi-org-openoffice-vba-excel-xldatalabelstype-idl.diff +offapi-org-openoffice-vba-excel-xldataseriesdate-idl.diff +offapi-org-openoffice-vba-excel-xldataseriestype-idl.diff +offapi-org-openoffice-vba-excel-xldisplayblanksas-idl.diff +offapi-org-openoffice-vba-excel-xldisplaydrawingobjects-idl.diff +offapi-org-openoffice-vba-excel-xldisplayunit-idl.diff +offapi-org-openoffice-vba-excel-xldvalterstyle-idl.diff +offapi-org-openoffice-vba-excel-xldvtype-idl.diff +offapi-org-openoffice-vba-excel-xleditionformat-idl.diff +offapi-org-openoffice-vba-excel-xleditionoptionsoption-idl.diff +offapi-org-openoffice-vba-excel-xleditiontype-idl.diff +offapi-org-openoffice-vba-excel-xlenablecancelkey-idl.diff +offapi-org-openoffice-vba-excel-xlenableselection-idl.diff +offapi-org-openoffice-vba-excel-xlendstylecap-idl.diff +offapi-org-openoffice-vba-excel-xlerrorbardirection-idl.diff +offapi-org-openoffice-vba-excel-xlerrorbarinclude-idl.diff +offapi-org-openoffice-vba-excel-xlerrorbartype-idl.diff +offapi-org-openoffice-vba-excel-xlerrorchecks-idl.diff +offapi-org-openoffice-vba-excel-xlfileaccess-idl.diff +offapi-org-openoffice-vba-excel-xlfileformat-idl.diff +offapi-org-openoffice-vba-excel-xlfillwith-idl.diff +offapi-org-openoffice-vba-excel-xlfilteraction-idl.diff +offapi-org-openoffice-vba-excel-xlformatconditionoperator-idl.diff +offapi-org-openoffice-vba-excel-xlformatconditiontype-idl.diff +offapi-org-openoffice-vba-excel-xlformcontrol-idl.diff +offapi-org-openoffice-vba-excel-xlformulalabel-idl.diff +offapi-org-openoffice-vba-excel-xlhalign-idl.diff +offapi-org-openoffice-vba-excel-xlhebrewmodes-idl.diff +offapi-org-openoffice-vba-excel-xlhighlightchangestime-idl.diff +offapi-org-openoffice-vba-excel-xlhtmltype-idl.diff +offapi-org-openoffice-vba-excel-xlimemode-idl.diff +offapi-org-openoffice-vba-excel-xlimportdataas-idl.diff +offapi-org-openoffice-vba-excel-xlinsertformatorigin-idl.diff +offapi-org-openoffice-vba-excel-xlinsertshiftdirection-idl.diff +offapi-org-openoffice-vba-excel-xllayoutformtype-idl.diff +offapi-org-openoffice-vba-excel-xllegendposition-idl.diff +offapi-org-openoffice-vba-excel-xllinestyle-idl.diff +offapi-org-openoffice-vba-excel-xllink-idl.diff +offapi-org-openoffice-vba-excel-xllinkinfo-idl.diff +offapi-org-openoffice-vba-excel-xllinkinfotype-idl.diff +offapi-org-openoffice-vba-excel-xllinkstatus-idl.diff +offapi-org-openoffice-vba-excel-xllinktype-idl.diff scp_vba_uno_service.diff sc-source-ui-vba-makefile-mk.diff @@ -1277,13 +1516,13 @@ sc-source-ui-vba-vbawindows-cxx.diff sc-source-ui-vba-vbawindows-hxx.diff sc-source-ui-vba-vbacharacters-cxx.diff sc-source-ui-vba-vbacharacters-hxx.diff +sc-source-ui-vba-vbapalette-cxx.diff +sc-source-ui-vba-vbapalette-hxx.diff vba-basic-globals.diff vba-build.diff -vba-basic-collection.diff - sc-vba-build-lst.diff sc-source-ui-vba-vbahelper-cxx.diff @@ -1299,9 +1538,6 @@ extensions-source-propctrlr-makefile-mk.diff extensions-source-propctrlr-formcontroller-cxx.diff vbaevents-services-build.diff vbaevents-services-sources.diff -vba-basic-multidim-uno-arraywrap.diff -vba-optionbasesupport.diff -vba-runtime-vba-enabled.diff vba-dim-and-constants-patch.diff vba-evaluate-support.diff vba-support-stoc-typeprovider-xexactname.diff @@ -1312,7 +1548,7 @@ vba-support-export-palette.diff vba-sc-docuno-hook.diff sc-sort-replace-support.diff - +vba-tokennames-as-defaultparams.diff [ VBAUntested ] basic-source-classes-eventatt-cxx.diff @@ -1462,7 +1698,8 @@ config_office-hsqldb-no-java.diff gentoo-system-xalan.diff # iz#30380 - use libxslt from system for xmlhelp / disable sablot xmlhelp-use-libxslt-from-system.diff - +# system neon 0.26.x compile fixes, i#64798 +system-neon-0.26.diff # Ark Linux used to split Qt into qt-mt and qt-base-mt so text mode apps etc. # can use Qt base functionality without linking in the whole GUI - this @@ -1582,11 +1819,10 @@ ark-default-ExternalMailer.diff disable-rhino.diff # iz#19976 - don't steal the focus, when opening windows. framework-nofocussteal.diff +# iz#54603 - use fontconfig for font fallback +fontconfig-substitute.diff + +[ DebianOnly ] +ooqstart-honour-sofficerc.diff +debian-dictionary.diff -[ SUSEPPCOnly ] -# allows to really disable on ppc, i#62716 -buildfix-no-java-ppc.diff -# an ugly hack to enable build on ppc, it is based on the Bernards hack -buildfix-tg-config-gij-ppc-hack.diff -# another ugly hack, skip testtol module on ppc -buildfix-testtool-skip-gij-ppc-hack.diff diff --git a/patches/src680/automation-testtool-oobuildfix.diff b/patches/src680/automation-testtool-oobuildfix.diff index bb73a8559..4a3505d52 100644 --- a/patches/src680/automation-testtool-oobuildfix.diff +++ b/patches/src680/automation-testtool-oobuildfix.diff @@ -1,21 +1,3 @@ -Index: automation/source/app/testbasi.cxx -=================================================================== -RCS file: /cvs/util/automation/source/app/testbasi.cxx,v -retrieving revision 1.5 -diff -u -p -r1.5 testbasi.cxx ---- automation/source/app/testbasi.cxx 7 Sep 2005 19:15:51 -0000 1.5 -+++ automation/source/app/testbasi.cxx 3 Feb 2006 17:40:28 -0000 -@@ -128,6 +128,10 @@ IMPL_LINK( TTBasic, CErrorImpl, ErrorEnt - BOOL TTBasic::Compile( SbModule* p ) - { - p->SetComment( ((TestToolObj*)pTestObject)->GetRevision(p->GetSource()) ); -+ // the default ooo-build compatibilty options stuff -+ // up the testtool make sure they are false -+ p->SetCompatibleMode( false ); -+ - SbModule* pOldModule = GetCompileModule(); - SetCompileModule( p ); - p->SetSource( ((TestToolObj*)pTestObject)->PreCompile(p->GetSource()) ); Index: automation/source/testtool/objtest.cxx =================================================================== RCS file: /cvs/util/automation/source/testtool/objtest.cxx,v @@ -23,17 +5,6 @@ retrieving revision 1.20 diff -u -p -r1.20 objtest.cxx --- automation/source/testtool/objtest.cxx 6 Oct 2005 12:37:43 -0000 1.20 +++ automation/source/testtool/objtest.cxx 3 Feb 2006 17:40:30 -0000 -@@ -1849,6 +1849,10 @@ void TestToolObj::SFX_NOTIFY( SfxBroadca - { - SbModule *pMod; - pMod = pBasic->MakeModule( CUniString("--"), String() ); -+ if ( pMod ) -+ // the default ooo-build compatibilty options stuff -+ // up the testtool -+ pMod->SetCompatibleMode( false ); - pMod->Clear(); - if ( Load( aFullPathname, pMod ) ) - { @@ -2715,7 +2719,8 @@ void TestToolObj::DebugFindNoErrors( BOO SbxVariable* TestToolObj::Find( const String& Str, SbxClassType Type) diff --git a/patches/src680/buildfix-no-java-ppc.diff b/patches/src680/buildfix-no-java-ppc.diff deleted file mode 100644 index d02e4a632..000000000 --- a/patches/src680/buildfix-no-java-ppc.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- solenv/inc/unxlngppc4.mk.old 2006-01-20 11:50:50.000000000 +0100 -+++ solenv/inc/unxlngppc4.mk 2006-02-28 15:06:48.000000000 +0100 -@@ -36,7 +36,7 @@ - ASM= - AFLAGS= - --SOLAR_JAVA*=TRUE -+SOLAR_JAVA*= - JAVAFLAGSDEBUG=-g - - # filter for supressing verbose messages from linker diff --git a/patches/src680/buildfix-testtool-skip-gij-ppc-hack.diff b/patches/src680/buildfix-testtool-skip-gij-ppc-hack.diff deleted file mode 100644 index 022b23601..000000000 --- a/patches/src680/buildfix-testtool-skip-gij-ppc-hack.diff +++ /dev/null @@ -1,9 +0,0 @@ ---- testtools/prj/build.lst.orig 2004-12-10 17:48:26.000000000 +0100 -+++ testtools/prj/build.lst 2006-02-22 12:00:54.000000000 +0100 -@@ -1,6 +1 @@ - tt testtools : cpputools io remotebridges stoc javaunohelper pyuno NULL --tt testtools\source\bridgetest nmake - all tt_bridgetest tt_bridgetest_idl tt_javaTestObjs NULL --tt testtools\source\bridgetest\cli nmake - w,vc7 tt_cli tt_bridgetest tt_bridgetest_idl NULL --tt testtools\source\bridgetest\idl nmake - all tt_bridgetest_idl NULL --tt testtools\com\sun\star\comp\bridge nmake - all tt_javaTestObjs tt_bridgetest_idl NULL --tt testtools\source\bridgetest\pyuno nmake - all tt_pyuno tt_bridgetest NULL diff --git a/patches/src680/cws-ab19.diff b/patches/src680/cws-ab19.diff new file mode 100644 index 000000000..b78564b35 --- /dev/null +++ b/patches/src680/cws-ab19.diff @@ -0,0 +1,411 @@ +Index: basic/source/classes/sb.cxx +=================================================================== +RCS file: /cvs/script/basic/source/classes/sb.cxx,v +retrieving revision 1.26 +retrieving revision 1.23.40.3 +diff -u -p -r1.26 -r1.23.40.3 +--- basic/source/classes/sb.cxx 29 Sep 2005 16:10:50 -0000 1.26 ++++ basic/source/classes/sb.cxx 21 Mar 2006 12:55:13 -0000 1.23.40.3 +@@ -1243,13 +1243,15 @@ void StarBASIC::MakeErrorText( SbError n + } + GetSbData()->aErrMsg = aMsg1; + } +- else ++ else if( nOldID != 0 ) + { + String aStdMsg( RTL_CONSTASCII_USTRINGPARAM("Fehler ") ); + aStdMsg += String::CreateFromInt32( nOldID); + aStdMsg += String( RTL_CONSTASCII_USTRINGPARAM(": Kein Fehlertext verfuegbar!") ); + GetSbData()->aErrMsg = aStdMsg; + } ++ else ++ GetSbData()->aErrMsg = String::EmptyString(); + } + + BOOL StarBASIC::CError +Index: basic/source/classes/sbxmod.cxx +=================================================================== +RCS file: /cvs/script/basic/source/classes/sbxmod.cxx,v +retrieving revision 1.27 +retrieving revision 1.22.40.3 +diff -u -p -r1.27 -r1.22.40.3 +--- basic/source/classes/sbxmod.cxx 29 Sep 2005 18:38:55 -0000 1.27 ++++ basic/source/classes/sbxmod.cxx 3 Mar 2006 10:37:39 -0000 1.22.40.3 +@@ -1441,6 +1441,8 @@ BOOL SimpleTokenizer_Impl::getNextToken( + // Zahl? + else if( testCharFlags( c, CHAR_START_NUMBER ) == TRUE ) + { ++ reType = TT_NUMBER; ++ + // Buffer-Position initialisieren + int nPos = 0; + +@@ -1448,22 +1450,21 @@ BOOL SimpleTokenizer_Impl::getNextToken( + int nRadix = 10; + + // Ist es eine Hex- oder Oct-Zahl? +- if( c == '0' ) ++ if( c == '&' ) + { + // Octal? +- // Java-Script geht von einem Octal-Wert aus, wenn nach 0 eine +- // Ziffer im oktalen Ziffernbereich folgt +- if( testCharFlags( peekChar(), CHAR_IN_OCT_NUMBER ) ) ++ if( peekChar() == 'o' || peekChar() == 'O' ) + { ++ // o entfernen ++ getChar(); + nRadix = 8; // Octal-Basis + + // Alle Ziffern einlesen + while( testCharFlags( peekChar(), CHAR_IN_OCT_NUMBER ) ) + c = getChar(); + } +- +- // Dementsprechend wird bei 0x Hex geparsed +- else if( peekChar() == 'x' || peekChar() == 'X' ) ++ // Hex? ++ else if( peekChar() == 'h' || peekChar() == 'H' ) + { + // x entfernen + getChar(); +@@ -1473,10 +1474,14 @@ BOOL SimpleTokenizer_Impl::getNextToken( + while( testCharFlags( peekChar(), CHAR_IN_HEX_NUMBER ) ) + c = getChar(); + } ++ else ++ { ++ reType = TT_OPERATOR; ++ } + } + + // Wenn nicht Oct oder Hex als double ansehen +- if( nRadix == 10 ) ++ if( reType == TT_NUMBER && nRadix == 10 ) + { + // Flag, ob das letzte Zeichen ein Exponent war + BOOL bAfterExpChar = FALSE; +@@ -1492,7 +1497,7 @@ BOOL SimpleTokenizer_Impl::getNextToken( + } + } + +- reType = TT_NUMBER; ++ // reType = TT_NUMBER; + } + + // String? +@@ -1500,6 +1505,8 @@ BOOL SimpleTokenizer_Impl::getNextToken( + { + // Merken, welches Zeichen den String eroeffnet hat + sal_Unicode cEndString = c; ++ if( c == '[' ) ++ cEndString = ']'; + + // Alle Ziffern einlesen und puffern + while( peekChar() != cEndString ) +@@ -1524,7 +1531,10 @@ BOOL SimpleTokenizer_Impl::getNextToken( + if( reType != TT_ERROR ) + { + getChar(); +- reType = TT_STRING; ++ if( cEndString == ']' ) ++ reType = TT_IDENTIFIER; ++ else ++ reType = TT_STRING; + } + } + +@@ -1610,9 +1620,10 @@ SimpleTokenizer_Impl::SimpleTokenizer_Im + aCharTypeTab[i] |= nHelpMask; + + // e und E sowie . von Hand ergaenzen +- aCharTypeTab['e'] |= CHAR_IN_NUMBER; +- aCharTypeTab['E'] |= CHAR_IN_NUMBER; +- aCharTypeTab['.'] |= (USHORT)( CHAR_IN_NUMBER | CHAR_START_NUMBER ); ++ aCharTypeTab['e'] |= CHAR_IN_NUMBER; ++ aCharTypeTab['E'] |= CHAR_IN_NUMBER; ++ aCharTypeTab['.'] |= (USHORT)( CHAR_IN_NUMBER | CHAR_START_NUMBER ); ++ aCharTypeTab['&'] |= CHAR_START_NUMBER; + + // Hex-Ziffern + for( i = 'a' ; i <= 'f' ; i++ ) +@@ -1627,11 +1638,12 @@ SimpleTokenizer_Impl::SimpleTokenizer_Im + // String-Beginn/End-Zeichen + aCharTypeTab['\''] |= CHAR_START_STRING; + aCharTypeTab['\"'] |= CHAR_START_STRING; ++ aCharTypeTab['['] |= CHAR_START_STRING; + + // Operator-Zeichen + aCharTypeTab['!'] |= CHAR_OPERATOR; + aCharTypeTab['%'] |= CHAR_OPERATOR; +- aCharTypeTab['&'] |= CHAR_OPERATOR; ++ // aCharTypeTab['&'] |= CHAR_OPERATOR; Removed because of #i14140 + aCharTypeTab['('] |= CHAR_OPERATOR; + aCharTypeTab[')'] |= CHAR_OPERATOR; + aCharTypeTab['*'] |= CHAR_OPERATOR; +@@ -1649,7 +1661,7 @@ SimpleTokenizer_Impl::SimpleTokenizer_Im + aCharTypeTab['~'] |= CHAR_OPERATOR; + aCharTypeTab['{'] |= CHAR_OPERATOR; + aCharTypeTab['}'] |= CHAR_OPERATOR; +- aCharTypeTab['['] |= CHAR_OPERATOR; ++ // aCharTypeTab['['] |= CHAR_OPERATOR; Removed because of #i17826 + aCharTypeTab[']'] |= CHAR_OPERATOR; + aCharTypeTab[';'] |= CHAR_OPERATOR; + +cvs diff: Diffing basic/source/comp +Index: basic/source/comp/exprtree.cxx +=================================================================== +RCS file: /cvs/script/basic/source/comp/exprtree.cxx,v +retrieving revision 1.12 +retrieving revision 1.7.40.2 +diff -u -p -r1.12 -r1.7.40.2 +--- basic/source/comp/exprtree.cxx 9 Feb 2006 12:47:18 -0000 1.12 ++++ basic/source/comp/exprtree.cxx 3 Mar 2006 10:38:37 -0000 1.7.40.2 +@@ -284,8 +284,7 @@ SbiExprNode* SbiExpression::Term() + // (Wobei 0 Parameter () entsprechen) + if( pDef->GetDims() ) + { +- if( !pPar +- || ( pPar->GetSize() && pPar->GetSize() != pDef->GetDims() ) ) ++ if( pPar && pPar->GetSize() && pPar->GetSize() != pDef->GetDims() ) + pParser->Error( SbERR_WRONG_DIMS ); + } + if( pDef->IsDefinedAs() ) +Index: basic/source/comp/loops.cxx +=================================================================== +RCS file: /cvs/script/basic/source/comp/loops.cxx,v +retrieving revision 1.7 +retrieving revision 1.3.48.3 +diff -u -p -r1.7 -r1.3.48.3 +--- basic/source/comp/loops.cxx 29 Sep 2005 18:40:22 -0000 1.7 ++++ basic/source/comp/loops.cxx 3 Mar 2006 10:38:53 -0000 1.3.48.3 +@@ -57,11 +57,11 @@ void SbiParser::If() + + // multiline IF + nEndLbl = aGen.Gen( _JUMPF, 0 ); +- while( !bAbort && Parse() ) ++ eTok = Peek(); ++ while( !( eTok == ELSEIF || eTok == ELSE || eTok == ENDIF ) && ++ !bAbort && Parse() ) + { + eTok = Peek(); +- if( eTok == ELSEIF || eTok == ELSE || eTok == ENDIF ) +- break; + if( IsEof() ) + { + Error( SbERR_BAD_BLOCK, IF ); bAbort = TRUE; return; +@@ -79,16 +79,18 @@ void SbiParser::If() + + Next(); + aGen.BackChain( nEndLbl ); ++ ++ aGen.Statement(); + SbiExpression* pCond = new SbiExpression( this ); + pCond->Gen(); + nEndLbl = aGen.Gen( _JUMPF, 0 ); + delete pCond; + TestToken( THEN ); +- while( !bAbort && Parse() ) ++ eTok = Peek(); ++ while( !( eTok == ELSEIF || eTok == ELSE || eTok == ENDIF ) && ++ !bAbort && Parse() ) + { + eTok = Peek(); +- if( eTok == ELSEIF || eTok == ELSE || eTok == ENDIF ) +- break; + if( IsEof() ) + { + Error( SbERR_BAD_BLOCK, ELSEIF ); bAbort = TRUE; return; +@@ -101,6 +103,8 @@ void SbiParser::If() + USHORT nElseLbl = nEndLbl; + nEndLbl = aGen.Gen( _JUMP, 0 ); + aGen.BackChain( nElseLbl ); ++ ++ aGen.Statement(); + StmntBlock( ENDIF ); + } + else if( eTok == ENDIF ) +Index: basic/source/comp/scanner.cxx +=================================================================== +RCS file: /cvs/script/basic/source/comp/scanner.cxx,v +retrieving revision 1.17 +retrieving revision 1.11.82.2 +diff -u -p -r1.17 -r1.11.82.2 +--- basic/source/comp/scanner.cxx 31 Jan 2006 18:30:17 -0000 1.17 ++++ basic/source/comp/scanner.cxx 3 Mar 2006 10:39:30 -0000 1.11.82.2 +@@ -238,7 +238,10 @@ BOOL SbiScanner::NextSym() + // Abschliessendes '_' durch Space ersetzen, wenn Zeilenende folgt + // (sonst falsche Zeilenfortsetzung) + if( !bUsedForHilite && !*pLine && *(pLine-1) == '_' ) ++ { ++ aSym.GetBufferAccess(); // #109693 force copy if necessary + *((sal_Unicode*)(pLine-1)) = ' '; // cast wegen const ++ } + // Typkennung? + // Das Ausrufezeichen bitte nicht testen, wenn + // danach noch ein Symbol anschliesst +Index: basic/source/runtime/inputbox.cxx +=================================================================== +RCS file: /cvs/script/basic/source/runtime/inputbox.cxx,v +retrieving revision 1.6 +retrieving revision 1.5.40.2 +diff -u -p -r1.6 -r1.5.40.2 +--- basic/source/runtime/inputbox.cxx 7 Sep 2005 21:39:07 -0000 1.6 ++++ basic/source/runtime/inputbox.cxx 3 Mar 2006 10:45:10 -0000 1.5.40.2 +@@ -179,9 +179,9 @@ RTLFUNC(InputBox) + String aDefault; + INT32 nX = -1, nY = -1; // zentrieren + const String& rPrompt = rPar.Get(1)->GetString(); +- if ( nArgCount > 2 ) ++ if ( nArgCount > 2 && !rPar.Get(2)->IsErr() ) + aTitle = rPar.Get(2)->GetString(); +- if ( nArgCount > 3 ) ++ if ( nArgCount > 3 && !rPar.Get(3)->IsErr() ) + aDefault = rPar.Get(3)->GetString(); + if ( nArgCount > 4 ) + { +Index: basic/source/runtime/methods.cxx +=================================================================== +RCS file: /cvs/script/basic/source/runtime/methods.cxx,v +retrieving revision 1.64 +retrieving revision 1.61.38.2 +diff -u -p -r1.64 -r1.61.38.2 +--- basic/source/runtime/methods.cxx 14 Dec 2005 14:35:50 -0000 1.64 ++++ basic/source/runtime/methods.cxx 3 Mar 2006 10:45:40 -0000 1.61.38.2 +@@ -3548,18 +3548,39 @@ RTLFUNC(RGB) + + RTLFUNC(QBColor) + { ++ static const INT32 pRGB[] = ++ { ++ 0x000000, ++ 0x800000, ++ 0x008000, ++ 0x808000, ++ 0x000080, ++ 0x800080, ++ 0x008080, ++ 0xC0C0C0, ++ 0x808080, ++ 0xFF0000, ++ 0x00FF00, ++ 0xFFFF00, ++ 0x0000FF, ++ 0xFF00FF, ++ 0x00FFFF, ++ 0xFFFFFF, ++ }; ++ + if ( rPar.Count() != 2 ) + { + StarBASIC::Error( SbERR_BAD_ARGUMENT ); + return; + } +- +- Color aCol( (ColorData)rPar.Get(1)->GetInteger() ); +- +- ULONG nRed = aCol.GetRed() >> 8; +- ULONG nGreen = aCol.GetGreen() >> 8; +- ULONG nBlue = aCol.GetBlue() >> 8; +- ULONG nRGB = (nRed << 16) | (nGreen << 8) | nBlue; ++ ++ INT16 nCol = rPar.Get(1)->GetInteger(); ++ if( nCol < 0 || nCol > 15 ) ++ { ++ StarBASIC::Error( SbERR_BAD_ARGUMENT ); ++ return; ++ } ++ INT32 nRGB = pRGB[ nCol ]; + rPar.Get(0)->PutLong( nRGB ); + } + +Index: basic/source/runtime/methods1.cxx +=================================================================== +RCS file: /cvs/script/basic/source/runtime/methods1.cxx,v +retrieving revision 1.24 +retrieving revision 1.22.40.3 +diff -u -p -r1.24 -r1.22.40.3 +--- basic/source/runtime/methods1.cxx 14 Dec 2005 14:36:04 -0000 1.24 ++++ basic/source/runtime/methods1.cxx 3 Mar 2006 10:45:48 -0000 1.22.40.3 +@@ -604,7 +604,12 @@ RTLFUNC(Array) + + // Parameter ins Array uebernehmen + for( short i = 0 ; i < nArraySize ; i++ ) +- pArray->Put( rPar.Get(i+1), &i ); ++ { ++ SbxVariable* pVar = rPar.Get(i+1); ++ SbxVariable* pNew = new SbxVariable( *pVar ); ++ pNew->SetFlag( SBX_WRITE ); ++ pArray->Put( pNew, &i ); ++ } + + // Array zurueckliefern + SbxVariableRef refVar = rPar.Get(0); +@@ -1473,6 +1478,7 @@ RTLFUNC(Split) + else + { + vRet.push_back( aExpression ); ++ nArraySize = 1; + } + } + +Index: basic/source/runtime/step2.cxx +=================================================================== +RCS file: /cvs/script/basic/source/runtime/step2.cxx,v +retrieving revision 1.18 +retrieving revision 1.17.40.2 +diff -u -p -r1.18 -r1.17.40.2 +--- basic/source/runtime/step2.cxx 7 Sep 2005 21:42:41 -0000 1.18 ++++ basic/source/runtime/step2.cxx 3 Mar 2006 10:47:14 -0000 1.17.40.2 +@@ -579,17 +579,19 @@ void SbiRuntime::StepPARAM( USHORT nOp1, + + // #57915 Missing sauberer loesen + USHORT nParamCount = refParams->Count(); +- // Wurden ueberhaupt genug Parameter uebergeben + if( i >= nParamCount ) + { +- p = new SbxVariable(); +- p->PutErr( 448 ); // Wie in VB: Error-Code 448 (SbERR_NAMED_NOT_FOUND) +- refParams->Put( p, i ); +- } +- else +- { +- p = refParams->Get( i ); ++ INT16 iLoop = i; ++ while( iLoop >= nParamCount ) ++ { ++ p = new SbxVariable(); ++ p->PutErr( 448 ); // Wie in VB: Error-Code 448 (SbERR_NAMED_NOT_FOUND) ++ refParams->Put( p, iLoop ); ++ iLoop--; ++ } + } ++ p = refParams->Get( i ); ++ + if( p->GetType() == SbxERROR && ( i ) ) + //if( p->GetType() == SbxEMPTY && ( i ) ) + { +Index: basctl/source/basicide/baside2b.cxx +=================================================================== +RCS file: /cvs/script/basctl/source/basicide/baside2b.cxx,v +retrieving revision 1.51 +retrieving revision 1.48.30.2 +diff -u -p -r1.51 -r1.48.30.2 +--- basctl/source/basicide/baside2b.cxx 31 Jan 2006 18:32:49 -0000 1.51 ++++ basctl/source/basicide/baside2b.cxx 3 Mar 2006 10:58:52 -0000 1.48.30.2 +@@ -1861,7 +1861,6 @@ void WatchTreeListBox::RequestingChilds( + WatchItem* pChildItem = new WatchItem(); + pChildItem->maName = aName; + pChildEntry->SetUserData( pChildItem ); +- MakeVisible( pChildEntry ); + } + if( nPropCount > 0 ) + { +@@ -1914,7 +1913,6 @@ void WatchTreeListBox::RequestingChilds( + SvLBoxEntry* pChildEntry = SvTreeListBox::InsertEntry( aDisplayName, pEntry ); + nElementCount++; + pChildEntry->SetUserData( pChildItem ); +- MakeVisible( pChildEntry ); + } + if( nElementCount > 0 ) + { diff --git a/patches/src680/debian-dictionary.diff b/patches/src680/debian-dictionary.diff new file mode 100644 index 000000000..9138d7db9 --- /dev/null +++ b/patches/src680/debian-dictionary.diff @@ -0,0 +1,22 @@ +--- extras/source/wordbook/makefile.mk~ 2006-03-13 13:44:07.259949000 +0100 ++++ extras/source/wordbook/makefile.mk 2006-03-14 00:07:22.129949000 +0100 +@@ -47,7 +47,7 @@ + + ZIP1TARGET = $(WORDBOOK_ALL_TARGET) + +-ZIP1LIST = sun.dic Novell.dic ++ZIP1LIST = Debian.dic + + + ZIP2TARGET = $(WORDBOOK_USER_TARGET) +--- officecfg/registry/schema/org/openoffice/Office/Linguistic.xcs~ 2006-03-13 13:44:07.259949000 +0100 ++++ officecfg/registry/schema/org/openoffice/Office/Linguistic.xcs 2006-03-14 00:08:10.669949000 +0100 +@@ -118,7 +118,7 @@ + <desc>Specifies the custom dictionaries to be used. The Ignore list (IgnoreAllList (All)) is administered in the RAM only for the current spellcheck.</desc> + <label>Custom dictionaries</label> + </info> +- <value oor:separator=";">IgnoreAllList;soffice.dic;standard.dic;Novell.dic;sun.dic;corporate.dic</value> ++ <value oor:separator=";">IgnoreAllList;soffice.dic;standard.dic;Debian.dic;corporate.dic</value> + </prop> + <prop oor:name="IsUseDictionaryList" oor:type="xs:boolean"> + <!-- OldLocation: NEW --> diff --git a/patches/src680/filechooser-samba-problem.diff b/patches/src680/filechooser-samba-problem.diff new file mode 100644 index 000000000..b2183133c --- /dev/null +++ b/patches/src680/filechooser-samba-problem.diff @@ -0,0 +1,29 @@ +Index: fpicker/source/unx/gnome/SalGtkFilePicker.cxx +=================================================================== +RCS file: /cvs/gsl/fpicker/source/unx/gnome/SalGtkFilePicker.cxx,v +retrieving revision 1.11 +diff -u -p -r1.11 SalGtkFilePicker.cxx +--- fpicker/source/unx/gnome/SalGtkFilePicker.cxx 29 Mar 2006 07:41:24 -0000 1.11 ++++ fpicker/source/unx/gnome/SalGtkFilePicker.cxx 12 May 2006 11:28:22 -0000 +@@ -1864,10 +1864,10 @@ case_insensitive_filter (const GtkFileFi + g_return_val_if_fail( data != NULL, FALSE ); + g_return_val_if_fail( filter_info != NULL, FALSE ); + +- if( !filter_info->filename ) ++ if( !filter_info->uri ) + return FALSE; + +- const char *pExtn = strrchr( filter_info->filename, '.' ); ++ const char *pExtn = strrchr( filter_info->uri, '.' ); + if( !pExtn ) + return FALSE; + pExtn++; +@@ -1911,7 +1914,7 @@ int SalGtkFilePicker::implAddFilter( con + if (aTokens.getLength()) + aTokens += OUString::createFromAscii(","); + aTokens = aTokens += aToken; +- gtk_file_filter_add_custom (filter, GTK_FILE_FILTER_FILENAME, ++ gtk_file_filter_add_custom (filter, GTK_FILE_FILTER_URI, + case_insensitive_filter, + g_strdup( rtl::OUStringToOString( aToken, RTL_TEXTENCODING_UTF8 ) ), + (GDestroyNotify) g_free ); diff --git a/patches/src680/fix-fileview-search.diff b/patches/src680/fix-fileview-search.diff new file mode 100644 index 000000000..2af3018b9 --- /dev/null +++ b/patches/src680/fix-fileview-search.diff @@ -0,0 +1,20 @@ +--- svtools/source/contnr/fileview.cxx.m163 2006-04-21 00:53:00.000000000 +0800 ++++ svtools/source/contnr/fileview.cxx 2006-04-21 15:08:15.000000000 +0800 +@@ -1105,10 +1105,13 @@ + if ( bFound ) + { + SvLBoxEntry* pEntry = GetEntry( mnSearchIndex ); +- SelectAll( FALSE ); +- Select( pEntry ); +- SetCurEntry( pEntry ); +- MakeVisible( pEntry ); ++ if( pEntry != NULL ) ++ { ++ SelectAll( FALSE ); ++ Select( pEntry ); ++ SetCurEntry( pEntry ); ++ MakeVisible( pEntry ); ++ } + } + else + Sound::Beep(); diff --git a/patches/src680/fontconfig-substitute.diff b/patches/src680/fontconfig-substitute.diff new file mode 100644 index 000000000..0adb7b449 --- /dev/null +++ b/patches/src680/fontconfig-substitute.diff @@ -0,0 +1,1080 @@ +diff -ru vcl.preconfig/inc/outdev.h vcl/inc/outdev.h +--- openoffice.org.orig/vcl/inc/outdev.h 2005-09-12 13:37:38.000000000 +0100 ++++ vcl/inc/outdev.h 2005-09-12 14:10:15.000000000 +0100 +@@ -239,7 +239,8 @@ + const Font& rFont, const Size& rSize, ImplFontSubstEntry* pDevSpecific ); + ImplFontEntry* GetFallback( ImplDevFontList* pFontList, + const Font& rFont, const Size& rSize, +- int nFallbackLevel ); ++ int nFallbackLevel, sal_Unicode *pMissingUnicodes, ++ int nMissingUnicodes ); + void Release( ImplFontEntry* ); + void Invalidate(); + }; +diff -ru vcl.preconfig/inc/outfont.hxx vcl/inc/outfont.hxx +--- openoffice.org.orig/vcl/inc/outfont.hxx 2005-09-12 13:37:38.000000000 +0100 ++++ vcl/inc/outfont.hxx 2005-09-12 14:48:01.000000000 +0100 +@@ -252,6 +252,7 @@ + ImplDevFontListData* FindFontFamily( const String& rFontName ) const; + ImplDevFontListData* ImplFindByFont( ImplFontSelectData&, bool bPrinter, ImplFontSubstEntry* pDevSpecificSubst ) const; + ImplDevFontListData* ImplFindBySearchName( const String& ) const; ++ ImplDevFontListData* ImplGetFontconfigSubstitute( ImplFontSelectData &rFontSelData, ImplFontSubstEntry* pDevSpecific ); + + bool HasFallbacks() const; + void SetFallbacks( ImplDevFontListData**, int nCount ); +@@ -354,6 +355,10 @@ + ImplFontEntry( const ImplFontSelectData& ); + virtual ~ImplFontEntry() {} + ++ // cache of Unicode characters and replacement font names ++ typedef ::std::hash_map<sal_Unicode,String> UnicodeFallbackList; ++ UnicodeFallbackList maUnicodeFallbackList; ++ + public: // TODO: make data members private + ImplFontSelectData maFontSelData; // FontSelectionData + ImplFontMetricData maMetric; // Font Metric +@@ -364,6 +369,16 @@ + short mnOwnOrientation; // text angle if lower layers don't rotate text themselves + short mnOrientation; // text angle in 3600 system + bool mbInit; // true if maMetric member is valid ++ ++ void AddFallbackForUnicode( sal_Unicode ch, String fallback ) ++ { maUnicodeFallbackList[ch] = fallback; } ++ String GetFallbackForUnicode( sal_Unicode ch ) ++ { ++ UnicodeFallbackList::const_iterator it = maUnicodeFallbackList.find( ch ); ++ if ( it != maUnicodeFallbackList.end() ) ++ return (*it).second; ++ return String(); ++ } + }; + + +diff -ru vcl.preconfig/source/gdi/outdev3.cxx vcl/source/gdi/outdev3.cxx +--- openoffice.org.orig/vcl/source/gdi/outdev3.cxx 2005-09-12 13:37:04.000000000 +0100 ++++ vcl/source/gdi/outdev3.cxx 2005-09-12 15:26:08.000000000 +0100 +@@ -168,6 +168,9 @@ + #include <memory> + #include <algorithm> + ++#include <psprint/fontmanager.hxx> ++#include <tools/isolang.hxx> ++ + // ======================================================================= + + DBG_NAMEEX( OutputDevice ); +@@ -2656,6 +2659,124 @@ ImplFontCache::~ImplFontCache() + } + } + ++ ++// ----------------------------------------------------------------------- ++ ++String GetFcSubstitute(const ImplFontSelectData &rFontSelData, sal_Unicode *pMissingGlyphs=0, int nMissingGlyphs=0) ++{ ++ std::vector<String> aNames; ++ if( rFontSelData.GetFamilyName().Len() ) ++ { ++ sal_uInt16 nIndex = 0; ++ String aTempName; ++ do ++ { ++ aTempName = GetNextFontToken(rFontSelData.GetFamilyName(), nIndex); ++ aNames.push_back(aTempName); ++ } ++ while (nIndex != STRING_NOTFOUND); ++ } ++ ++ std::vector<sal_Unicode> aGlyphs; ++ for (int i=0; i < nMissingGlyphs; ++i) ++ aGlyphs.push_back(pMissingGlyphs[i]); ++ ++ ByteString aLangAttrib = ConvertLanguageToIsoByteString( rFontSelData.meLanguage ); ++ ++ psp::italic::type eItalic = psp::italic::Unknown; ++ if( rFontSelData.GetSlant() != ITALIC_DONTKNOW ) ++ { ++ switch( rFontSelData.GetSlant() ) ++ { ++ case ITALIC_NORMAL: eItalic = psp::italic::Italic; break; ++ case ITALIC_OBLIQUE: eItalic = psp::italic::Oblique; break; ++ default: ++ break; ++ } ++ } ++ ++ psp::weight::type eWeight = psp::weight::Unknown; ++ if( rFontSelData.GetWeight() != WEIGHT_DONTKNOW ) ++ { ++ switch( rFontSelData.GetWeight() ) ++ { ++ case WEIGHT_THIN: eWeight = psp::weight::Thin; break; ++ case WEIGHT_ULTRALIGHT: eWeight = psp::weight::UltraLight; break; ++ case WEIGHT_LIGHT: eWeight = psp::weight::Light; break; ++ case WEIGHT_SEMILIGHT: eWeight = psp::weight::SemiLight; break; ++ case WEIGHT_NORMAL: eWeight = psp::weight::Normal; break; ++ case WEIGHT_MEDIUM: eWeight = psp::weight::Medium; break; ++ case WEIGHT_SEMIBOLD: eWeight = psp::weight::SemiBold; break; ++ case WEIGHT_BOLD: eWeight = psp::weight::Bold; break; ++ case WEIGHT_ULTRABOLD: eWeight = psp::weight::UltraBold; break; ++ case WEIGHT_BLACK: eWeight = psp::weight::Black; break; ++ default: ++ break; ++ } ++ } ++ ++ psp::width::type eWidth = psp::width::Unknown; ++ if( rFontSelData.GetWidthType() != WIDTH_DONTKNOW ) ++ { ++ switch( rFontSelData.GetWidthType() ) ++ { ++ case WIDTH_ULTRA_CONDENSED: eWidth = psp::width::UltraCondensed; break; ++ case WIDTH_EXTRA_CONDENSED: eWidth = psp::width::ExtraCondensed; break; ++ case WIDTH_CONDENSED: eWidth = psp::width::Condensed; break; ++ case WIDTH_SEMI_CONDENSED: eWidth = psp::width::SemiCondensed; break; ++ case WIDTH_NORMAL: eWidth = psp::width::Normal; break; ++ case WIDTH_SEMI_EXPANDED: eWidth = psp::width::SemiExpanded; break; ++ case WIDTH_EXPANDED: eWidth = psp::width::Expanded; break; ++ case WIDTH_EXTRA_EXPANDED: eWidth = psp::width::ExtraExpanded; break; ++ case WIDTH_ULTRA_EXPANDED: eWidth = psp::width::UltraExpanded; break; ++ default: ++ break; ++ } ++ } ++ ++ psp::pitch::type ePitch = psp::pitch::Unknown; ++ if( rFontSelData.GetPitch() != PITCH_DONTKNOW ) ++ { ++ switch( rFontSelData.GetPitch() ) ++ { ++ case PITCH_FIXED: ePitch=psp::pitch::Fixed; break; ++ case PITCH_VARIABLE: ePitch=psp::pitch::Variable; break; ++ default: ++ break; ++ } ++ } ++ ++ const psp::PrintFontManager& rMgr = psp::PrintFontManager::get(); ++ return rMgr.Substitute(aNames, aGlyphs, aLangAttrib, eItalic, eWeight, eWidth, ePitch); ++} ++ ++// ----------------------------------------------------------------------- ++ ++ImplDevFontListData *ImplDevFontList::ImplGetFontconfigSubstitute( ImplFontSelectData &rFontSelData, ImplFontSubstEntry* pDevSpecific ) ++{ ++ // We dont' actually want to talk to Fontconfig at all for symbol fonts ++ if (rFontSelData.IsSymbolFont()) ++ return 0; ++ // StarSymbol is a unicode font, but it still deserves the symbol flag ++ if( 0 == rFontSelData.maSearchName.CompareIgnoreCaseToAscii( "starsymbol", 10) ++ || 0 == rFontSelData.maSearchName.CompareIgnoreCaseToAscii( "opensymbol", 10) ) ++ return 0; ++ ++ String aName(GetFcSubstitute(rFontSelData)); ++ if (!aName.Len()) ++ return 0; ++ ++ String aUserName(aName); ++ ImplGetEnglishSearchFontName( aName ); ++ ImplFontSubstitute( aName, FONT_SUBSTITUTE_ALWAYS, pDevSpecific ); ++ ImplDevFontListData *pFontFamily = ImplFindBySearchName( aName ); ++ if (pFontFamily) ++ rFontSelData.maTargetName = aUserName; ++ ++ return pFontFamily; ++} ++ ++ + // ----------------------------------------------------------------------- + + ImplFontEntry* ImplFontCache::Get( ImplDevFontList* pFontList, +@@ -2693,8 +2814,12 @@ ImplFontEntry* ImplFontCache::Get( ImplD + + if( !pEntry ) // no direct cache hit + { +- // find the best matching logical font family and update font selector accordingly +- pFontFamily = pFontList->ImplFindByFont( aFontSelData, mbPrinter, pDevSpecific ); ++ pFontFamily = pFontList->ImplGetFontconfigSubstitute( aFontSelData, pDevSpecific ); ++ if (!pFontFamily) ++ { ++ // find the best matching logical font family and update font selector accordingly ++ pFontFamily = pFontList->ImplFindByFont( aFontSelData, mbPrinter, pDevSpecific ); ++ } + DBG_ASSERT( (pFontFamily != NULL), "ImplFontCache::Get() No logical font found!" ); + aFontSelData.maSearchName = pFontFamily->GetSearchName(); + +@@ -3014,116 +3139,101 @@ ImplDevFontListData* ImplDevFontList::Im + // ----------------------------------------------------------------------- + + ImplFontEntry* ImplFontCache::GetFallback( ImplDevFontList* pFontList, +- const Font& rOrigFont, const Size& rSize, int nFallbackLevel ) ++ const Font& rOrigFont, const Size& rSize, int nFallbackLevel, ++ sal_Unicode *pMissingUnicodes, int nMissingUnicodes ) + { +- // make sure the fontlist knows it's fallbacks +- if( !pFontList->HasFallbacks() ) ++ ImplFontEntry* pFallbackFont = NULL; ++ bool cached = false; ++ bool new_entry = false; ++ bool symbolFont = false; ++ ImplFontEntry* pOrigFontEntry = Get( pFontList, rOrigFont, rSize, NULL ); ++ ImplFontSelectData aSelData( rOrigFont, rOrigFont.GetName(), rSize ); ++ sal_uInt16 nToken = 0; ++ String aOrigFontName( GetNextFontToken(rOrigFont.GetName(), nToken) ); ++ ++ const FontSubstConfigItem& rFontSubst = *FontSubstConfigItem::get(); ++ const FontNameAttr* fontAttr = rFontSubst.getSubstInfo( aOrigFontName ); ++ ++ // We dont' actually want to talk to Fontconfig at all for symbol fonts ++ if ( pFontList && fontAttr && (fontAttr->Type & IMPL_FONT_ATTR_SYMBOL) ) + { +- // normalized family names of fonts suited for glyph fallback +- // if a font is available related fonts can be ignored +- // TODO: implement dynamic lists +- static const char* aGlyphFallbackList[] = { +- // empty strings separate the names of unrelated fonts +- "eudc", "", +- "arialunicodems", "cyberbit", "code2000", "", +- "andalesansui", "", +- "starsymbol", "opensymbol", "", +- "msmincho", "fzmingti", "fzheiti", "ipamincho", "sazanamimincho", "kochimincho", "", +- "sunbatang", "sundotum", "baekmukdotum", "gulim", "batang", "dotum", "", +- "hgmincholightj", "msunglightsc", "msunglighttc", "hymyeongjolightk", "", +- "tahoma", "timesnewroman", "lucidatypewriter", "lucidasans", "nimbussansl", "", +- "shree", "mangal", "raavi", "shruti", "tunga", "latha", "", +- "shayyalmt", "naskmt", "", +- "david", "nachlieli", "lucidagrande", "", +- "norasi", "angsanaupc", "", +- "khmerossystem", "", +- "phetsarathot", "", +- 0 +- }; +- +- bool bHasEudc = false; +- int nMaxLevel = 0; +- int nBestQuality = 0; +- ImplDevFontListData** pFallbackList = NULL; +- for( const char** ppNames = &aGlyphFallbackList[0];; ++ppNames ) ++ if ( fontAttr->Substitutions.size() ) + { +- // advance to next sub-list when end-of-sublist marker +- if( !**ppNames ) // #i46456# check for empty string, i.e., deref string itself not only ptr to it ++ ::std::vector< String >::const_iterator it = fontAttr->Substitutions.begin(); ++ while ( it != fontAttr->Substitutions.end() ) + { +- if( nBestQuality > 0 ) +- if( ++nMaxLevel >= MAX_FALLBACK ) +- break; +- if( !ppNames[1] ) ++ // Since *it is the "search name" like "standardsymbolsl" ++ // we have to find the Family Name (Standard Symbols L) for Fontconfig ++ ImplDevFontListData* pFontFamily = pFontList->FindFontFamily( *it ); ++ if (pFontFamily) ++ { ++ aSelData.maSearchName = pFontFamily->GetFamilyName(); + break; +- nBestQuality = 0; +- continue; ++ } ++ ++it; + } ++ } ++ symbolFont = true; ++ cached = true; ++ } + +- // test if the glyph fallback candidate font is available and scalable +- String aTokenName( *ppNames, RTL_TEXTENCODING_UTF8 ); +- ImplDevFontListData* pFallbackFont = pFontList->FindFontFamily( aTokenName ); +- if( !pFallbackFont ) +- continue; +- if( !pFallbackFont->IsScalable() ) +- continue; ++ // Try cached fallbacks first ++ if ( !symbolFont && (nMissingUnicodes > 0) ) ++ { ++ aSelData.maSearchName = pOrigFontEntry->GetFallbackForUnicode( pMissingUnicodes[0] ); ++ if ( aSelData.maSearchName.Len() ) ++ cached = true; ++ } + +- // keep the best font of the glyph fallback sub-list +- if( nBestQuality < pFallbackFont->GetMinQuality() ) +- { +- nBestQuality = pFallbackFont->GetMinQuality(); +- // store available glyph fallback fonts +- if( !pFallbackList ) +- pFallbackList = new ImplDevFontListData*[ MAX_FALLBACK ]; +- pFallbackList[ nMaxLevel ] = pFallbackFont; +- if( !bHasEudc && !nMaxLevel ) +- bHasEudc = (0 == strncmp( *ppNames, "eudc", 5 )); +- } +- } ++ if ( !cached ) ++ { ++ String aName(GetFcSubstitute( aSelData, pMissingUnicodes, nMissingUnicodes )); ++ if (aName.Len()) ++ aSelData.maSearchName = aName; ++ } + +- // sort the list of fonts for glyph fallback by quality (highest first) +- // #i33947# keep the EUDC font at the front of the list +- // an insertion sort is good enough for this short list +- const int nSortStart = bHasEudc ? 1 : 0; +- for( int i = nSortStart+1, j; i < nMaxLevel; ++i ) +- { +- ImplDevFontListData* pTestFont = pFallbackList[ i ]; +- int nTestQuality = pTestFont->GetMinQuality(); +- for( j = i; --j >= nSortStart; ) +- if( nTestQuality > pFallbackList[j]->GetMinQuality() ) +- pFallbackList[ j+1 ] = pFallbackList[ j ]; +- else +- break; +- pFallbackList[ j+1 ] = pTestFont; +- } ++ // Check our font instance cache first, if not found then ++ // add this ImplFontSelectData to the cache along with its ImplFontEntry ++ FontInstanceList::const_iterator it = maFontInstanceList.find( aSelData ); ++ if (it != maFontInstanceList.end()) ++ pFallbackFont = (*it).second; ++ else ++ { ++ // find the best matching physical font face ++ ImplDevFontListData* pFontFamily = pFontList->FindFontFamily( aSelData.maSearchName ); ++ if (pFontFamily) ++ { ++ ImplFontData* pFontData = pFontFamily->FindBestFontFace( aSelData ); + +-#if defined(HDU_DEBUG) +- for( int i = 0; i < nMaxLevel; ++i ) ++ // create a new logical font instance from this physical font face ++ aSelData.mpFontData = pFontData; ++ pFallbackFont = pFontData->CreateFontInstance( aSelData ); ++ ++ // if we found a different symbol font we need a symbol conversion table ++ if( pFontData->IsSymbolFont() ) ++ if( aSelData.maTargetName != aSelData.maSearchName ) ++ pFallbackFont->mpConversion = ImplGetRecodeData( aSelData.maTargetName, aSelData.maSearchName ); ++ // add the new entry to the cache ++ maFontInstanceList[ aSelData ] = pFallbackFont; ++ new_entry = true; ++ } ++ else + { +- ImplDevFontListData* pFont = pFallbackList[ i ]; +- ByteString aFontName( pFont->GetFamilyName(), RTL_TEXTENCODING_UTF8 ); +- fprintf( stderr, "GlyphFallbackFont[%d] (quality=%05d): \"%s\"\n", +- i, pFont->GetMinQuality(), aFontName.GetBuffer() ); ++ ByteString l( aSelData.maSearchName, RTL_TEXTENCODING_UTF8 ); ++ //fprintf (stderr, "--- Couldn't get FontFamily for '%s'\n", l.GetBuffer()); + } +-#endif +- +- pFontList->SetFallbacks( pFallbackList, nMaxLevel ); + } + +- Font aFallbackFont = rOrigFont; +- +- // nFallbackLevel==0 => original font without device specific substitution +- // nFallbackLevel>=1 => use a font from the glyph fallback font list +- if( nFallbackLevel>=1 ) ++ // Cache the fallback font for each of the missing Unicode chars ++ if ( !symbolFont && aSelData.maSearchName.Len() ) + { +- ImplDevFontListData* pFallbackData = pFontList->GetFallback( nFallbackLevel-1 ); +- if( !pFallbackData ) +- return NULL; +- +- aFallbackFont.SetName( pFallbackData->GetSearchName() ); ++ for ( int i = 0; i < nMissingUnicodes; i++ ) ++ { ++ if ( ! pOrigFontEntry->GetFallbackForUnicode(pMissingUnicodes[i]).Len() ) ++ pOrigFontEntry->AddFallbackForUnicode( pMissingUnicodes[i], aSelData.maSearchName ); ++ } + } + +- ImplFontEntry* pFallbackFont = Get( pFontList, aFallbackFont, rSize, NULL ); +- + if( pFallbackFont && !pFallbackFont->mbInit ) + { + // HACK: maMetrics are irrelevant for fallback fonts, but +@@ -3131,6 +3242,27 @@ ImplFontEntry* ImplFontCache::GetFallbac + pFallbackFont->maMetric.maStyleName = String(); + } + ++ if ( pFallbackFont && !new_entry ) ++ { ++ // increase the font instance's reference count ++ if( !pFallbackFont->mnRefCount++ ) ++ --mnRef0Count; ++ } ++ ++#if 0 ++ sal_uInt16 nTok = 0; ++ ByteString n( GetNextFontToken(rOrigFont.GetName(), nTok), RTL_TEXTENCODING_UTF8); ++ ByteString m; ++ if (pFallbackFont) ++ { ++ nTok = 0; ++ ByteString tS( GetNextFontToken(pFallbackFont->maFontSelData.mpFontData->GetFamilyName(), nTok), RTL_TEXTENCODING_UTF8 ); ++ m.Assign( tS ); ++ } ++ fprintf (stderr, "Glyph fallback '%s'->'%s' %s\n", n.GetBuffer(), pFallbackFont ? m.GetBuffer() : "none", ++ new_entry ? "(new)" : "(cached)"); ++#endif ++ + return pFallbackFont; + } + +@@ -6097,7 +6229,7 @@ SalLayout* OutputDevice::ImplLayout( con + // do glyph fallback if needed + // #105768# avoid fallback for very small font sizes + if( aLayoutArgs.NeedFallback() ) +- if( mpFontEntry && (mpFontEntry->maFontSelData.mnHeight >= 6) ) ++ if( mpFontEntry && (mpFontEntry->maFontSelData.mnHeight >= 3) ) + pSalLayout = ImplGlyphFallbackLayout( pSalLayout, aLayoutArgs ); + + // position, justify, etc. the layout +@@ -6141,6 +6273,17 @@ SalLayout* OutputDevice::ImplGlyphFallba + rLayoutArgs.ResetPos(); + } + #endif ++ int nCharPos = -1; ++ bool bRTL = false; ++ sal_Unicode *pMissingUnicodes = new sal_Unicode[8]; ++ int nMissingUnicodes = 0; ++ ++ for( int i=0; i<8 && rLayoutArgs.GetNextPos( &nCharPos, &bRTL); ++i ) ++ { ++ pMissingUnicodes[i] = rLayoutArgs.mpStr[ nCharPos ]; ++ nMissingUnicodes++; ++ } ++ rLayoutArgs.ResetPos(); + + ImplFontSelectData aFontSelData = mpFontEntry->maFontSelData; + Size aFontSize( aFontSelData.mnWidth, aFontSelData.mnHeight ); +@@ -6157,7 +6300,8 @@ SalLayout* OutputDevice::ImplGlyphFallba + { + // find a font family suited for glyph fallback + ImplFontEntry* pFallbackFont = mpFontCache->GetFallback( mpFontList, +- maFont, aFontSize, nFallbackLevel-nDevSpecificFallback ); ++ maFont, aFontSize, nFallbackLevel-nDevSpecificFallback, ++ (nMissingUnicodes ? pMissingUnicodes : NULL), nMissingUnicodes ); + if( !pFallbackFont ) + break; + +@@ -6208,6 +6352,8 @@ SalLayout* OutputDevice::ImplGlyphFallba + if( !rLayoutArgs.PrepareFallback() ) + break; + } ++ ++ delete[] pMissingUnicodes; + + if( pMultiSalLayout && pMultiSalLayout->LayoutText( rLayoutArgs ) ) + pSalLayout = pMultiSalLayout; +diff -ru vcl.preconfig/source/window/window.cxx vcl/source/window/window.cxx +--- openoffice.org.orig/vcl/source/window/window.cxx 2005-09-12 13:37:04.000000000 +0100 ++++ vcl/source/window/window.cxx 2005-09-12 16:18:20.000000000 +0100 +@@ -212,6 +212,7 @@ + #endif + + #include <pdfextoutdevdata.hxx> ++#include <psprint/fontmanager.hxx> + + using namespace rtl; + using namespace ::com::sun::star::uno; +@@ -350,6 +351,10 @@ + { + ImplInitFontList(); + ++ const psp::PrintFontManager& rMgr = psp::PrintFontManager::get(); ++ if (rMgr.hasFontconfig()) ++ return true; ++ + String aTestText; + aTestText.Append( Button::GetStandardText( BUTTON_OK ) ); + aTestText.Append( Button::GetStandardText( BUTTON_CANCEL ) ); +diff -ru vcl.preconfig/util/makefile.mk vcl/util/makefile.mk +--- openoffice.org.orig/vcl/util/makefile.mk 2005-09-12 13:37:38.000000000 +0100 ++++ vcl/util/makefile.mk 2005-09-12 14:55:10.000000000 +0100 +@@ -265,7 +265,7 @@ + .ENDIF + + +-SHL1STDLIBS += -lX11 ++SHL1STDLIBS += -lX11 -lpsp$(VERSION)$(DLLPOSTFIX) + + .ENDIF # "$(GUI)"=="UNX" + +Index: inc/psprint/fontmanager.hxx +=================================================================== +RCS file: /cvs/gsl/psprint/inc/psprint/fontmanager.hxx,v +retrieving revision 1.24 +diff -u -r1.24 fontmanager.hxx +--- openoffice.org.orig/psprint/uinc/psprint/fontmanager.hxx 5 Aug 2005 13:21:02 -0000 1.24 ++++ psprint/inc/psprint/fontmanager.hxx 12 Sep 2005 16:21:13 -0000 +@@ -75,6 +75,9 @@ + #ifndef _PSPRINT_HELPER_HXX_ + #include <psprint/helper.hxx> + #endif ++#ifndef _STRING_HXX ++#include <tools/string.hxx> ++#endif + + #ifndef _COM_SUN_STAR_LANG_LOCALE_HPP_ + #include <com/sun/star/lang/Locale.hpp> +@@ -419,6 +422,7 @@ + std::hash_multimap< sal_uInt8, sal_Unicode > m_aAdobecodeToUnicode; + + mutable FontCache* m_pFontCache; ++ bool m_bFontconfigSuccess; + + rtl::OString getAfmFile( PrintFont* pFont ) const; + rtl::OString getFontFile( PrintFont* pFont ) const; +@@ -729,6 +733,11 @@ + false else + */ + bool matchFont( FastPrintFontInfo& rInfo, const com::sun::star::lang::Locale& rLocale ); ++ ++ String Substitute(const std::vector<String> &rNames, const std::vector<sal_Unicode> &rGlyphs, ++ const ByteString &rLangAttrib, italic::type eItalic, weight::type eWeight, ++ width::type eWidth, pitch::type ePitch) const; ++ bool hasFontconfig() const { return m_bFontconfigSuccess; } + }; + + } // namespace +Index: source/fontmanager/fontcache.cxx +=================================================================== +RCS file: /cvs/gsl/psprint/source/fontmanager/fontcache.cxx,v +retrieving revision 1.14 +diff -u -r1.14 fontcache.cxx +--- openoffice.org.orig/psprint/usource/fontmanager/fontcache.cxx 9 Aug 2005 10:59:38 -0000 1.14 ++++ psprint/source/fontmanager/fontcache.cxx 12 Sep 2005 16:21:13 -0000 +@@ -688,9 +688,9 @@ + FontDirMap::const_iterator entry = dir->second.m_aEntries.find( rFile ); + if( entry != dir->second.m_aEntries.end() ) + { +- bSuccess = true; + for( FontCacheEntry::const_iterator font = entry->second.m_aEntry.begin(); font != entry->second.m_aEntry.end(); ++font ) + { ++ bSuccess = true; + PrintFontManager::PrintFont* pFont = clonePrintFont( *font ); + rNewFonts.push_back( pFont ); + } +Index: source/fontmanager/fontmanager.cxx +=================================================================== +RCS file: /cvs/gsl/psprint/source/fontmanager/fontmanager.cxx,v +retrieving revision 1.59 +diff -u -r1.59 fontmanager.cxx +--- openoffice.org.orig/psprint/usource/fontmanager/fontmanager.cxx 5 Aug 2005 12:53:31 -0000 1.59 ++++ psprint/source/fontmanager/fontmanager.cxx 12 Sep 2005 16:21:14 -0000 +@@ -1155,7 +1155,8 @@ PrintFontManager::PrintFontManager() : + m_nNextFontID( 1 ), + m_pAtoms( new MultiAtomProvider() ), + m_nNextDirAtom( 1 ), +- m_pFontCache( NULL ) ++ m_pFontCache( NULL ), ++ m_bFontconfigSuccess(false) + { + for( unsigned int i = 0; i < sizeof( aAdobeCodes )/sizeof( aAdobeCodes[0] ); i++ ) + { +@@ -2109,7 +2110,7 @@ void PrintFontManager::initialize( void* + #endif + + // first try fontconfig +- bool bFontconfigSuccess = initFontconfig(); ++ m_bFontconfigSuccess = initFontconfig(); + + // part one - look for downloadable fonts + rtl_TextEncoding aEncoding = osl_getThreadTextEncoding(); +@@ -2131,7 +2132,7 @@ void PrintFontManager::initialize( void* + } + + // don't search through many directories fontconfig already told us about +- if( ! bFontconfigSuccess ) ++ if( ! m_bFontconfigSuccess ) + { + Display *pDisplay = (Display*)pInitDisplay; + +@@ -2209,7 +2210,7 @@ void PrintFontManager::initialize( void* + } + } + #endif /* SOLARIS */ +- } // ! bFontconfigSuccess ++ } // ! m_bFontconfigSuccess + + // fill XLFD aliases from fonts.alias files + initFontsAlias(); +Index: source/fontmanager/fontconfig.cxx +=================================================================== +RCS file: /cvs/gsl/psprint/source/fontmanager/fontconfig.cxx,v +retrieving revision 1.14 +diff -u -p -u -r1.14 fontconfig.cxx +--- openoffice.org.orig/psprint/source/fontmanager/fontconfig.cxx 27 Oct 2005 07:55:13 -0000 1.14 ++++ psprint/source/fontmanager/fontconfig.cxx 5 Nov 2005 11:22:58 -0000 +@@ -44,10 +44,12 @@ typedef void FcConfig; + typedef void FcObjectSet; + typedef void FcPattern; + typedef void FcFontSet; ++typedef void FcCharSet; + typedef int FcResult; + typedef int FcBool; + typedef int FcMatchKind; + typedef char FcChar8; ++typedef sal_Int32 FcChar32; + #endif + + #include <cstdio> +@@ -80,6 +82,7 @@ class FontCfgWrapper + { + void* m_pLib; + FcConfig* m_pDefConfig; ++ FcFontSet* m_pOutlineSet; + + FcBool (*m_pFcInit)(); + FcConfig* (*m_pFcConfigGetCurrent)(); +@@ -88,17 +91,23 @@ class FontCfgWrapper + FcPattern* (*m_pFcPatternCreate)(); + void (*m_pFcPatternDestroy)(FcPattern*); + FcFontSet* (*m_pFcFontList)(FcConfig*,FcPattern*,FcObjectSet*); ++ FcFontSet* (*m_pFcConfigGetFonts)(FcConfig*,FcSetName); + FcFontSet* (*m_pFcFontSetCreate)(); ++ FcCharSet* (*m_pFcCharSetCreate)(); ++ FcBool (*m_pFcCharSetAddChar)(FcCharSet *, FcChar32); + void (*m_pFcFontSetDestroy)(FcFontSet*); + FcBool (*m_pFcFontSetAdd)(FcFontSet*,FcPattern*); ++ void (*m_pFcPatternReference)(FcPattern*); + FcResult (*m_pFcPatternGetString)(const FcPattern*,const char*,int,FcChar8**); + FcResult (*m_pFcPatternGetInteger)(const FcPattern*,const char*,int,int*); + FcResult (*m_pFcPatternGetDouble)(const FcPattern*,const char*,int,double*); + FcResult (*m_pFcPatternGetBool)(const FcPattern*,const char*,int,FcBool*); + void (*m_pFcDefaultSubstitute)(FcPattern *); +- FcPattern* (*m_pFcFontMatch)(FcConfig*,FcPattern*,FcResult*); ++ FcPattern* (*m_pFcFontSetMatch)(FcConfig*,FcFontSet**, int, FcPattern*,FcResult*); + FcBool (*m_pFcConfigSubstitute)(FcConfig*,FcPattern*,FcMatchKind); + FcBool (*m_pFcPatternAddInteger)(FcPattern*,const char*,int); ++ FcBool (*m_pFcPatternAddBool)(FcPattern*,const char*,FcBool); ++ FcBool (*m_pFcPatternAddCharSet)(FcPattern*,const char*,const FcCharSet*); + FcBool (*m_pFcPatternAddString)(FcPattern*,const char*,const FcChar8*); + + void* loadSymbol( const char* ); +@@ -114,6 +123,7 @@ public: + { return m_pLib != NULL;} + + FcConfig* getDefConfig() { return m_pDefConfig; } ++ FcFontSet* getFontSet() { return m_pOutlineSet; } + + FcBool FcInit() + { return m_pFcInit(); } +@@ -143,14 +153,28 @@ public: + + FcFontSet* FcFontList( FcConfig* pConfig, FcPattern* pPattern, FcObjectSet* pSet ) + { return m_pFcFontList( pConfig, pPattern, pSet ); } +- ++ ++ FcFontSet* FcConfigGetFonts( FcConfig* pConfig, FcSetName eSet) ++ { return m_pFcConfigGetFonts( pConfig, eSet ); } ++ + FcFontSet* FcFontSetCreate() + { return m_pFcFontSetCreate(); } ++ ++ FcCharSet* FcCharSetCreate() ++ { return m_pFcCharSetCreate(); } ++ ++ FcBool FcCharSetAddChar(FcCharSet *fcs, FcChar32 ucs4) ++ { return m_pFcCharSetAddChar(fcs, ucs4); } ++ + void FcFontSetDestroy( FcFontSet* pSet ) + { m_pFcFontSetDestroy( pSet );} ++ + FcBool FcFontSetAdd( FcFontSet* pSet, FcPattern* pPattern ) + { return m_pFcFontSetAdd( pSet, pPattern ); } + ++ void FcPatternReference( FcPattern* pPattern ) ++ { m_pFcPatternReference( pPattern ); } ++ + FcResult FcPatternGetString( const FcPattern* pPattern, const char* object, int n, FcChar8** s ) + { return m_pFcPatternGetString( pPattern, object, n, s ); } + +@@ -164,12 +188,16 @@ public: + { return m_pFcPatternGetBool( pPattern, object, n, s ); } + void FcDefaultSubstitute( FcPattern* pPattern ) + { m_pFcDefaultSubstitute( pPattern ); } +- FcPattern* FcFontMatch( FcConfig* pConfig, FcPattern* pPattern, FcResult* pResult ) +- { return m_pFcFontMatch( pConfig, pPattern, pResult ); } ++ FcPattern* FcFontSetMatch(FcConfig* pConfig, FcFontSet** ppFontSet, int nset, FcPattern *pPattern, FcResult *pResult) ++ { return m_pFcFontSetMatch( pConfig, ppFontSet, nset, pPattern, pResult ); } + FcBool FcConfigSubstitute( FcConfig* pConfig, FcPattern* pPattern, FcMatchKind eKind ) + { return m_pFcConfigSubstitute( pConfig, pPattern, eKind ); } + FcBool FcPatternAddInteger( FcPattern* pPattern, const char* pObject, int nValue ) + { return m_pFcPatternAddInteger( pPattern, pObject, nValue ); } ++ FcBool FcPatternAddBool( FcPattern* pPattern, const char* pObject, FcBool b ) ++ { return m_pFcPatternAddBool( pPattern, pObject, b ); } ++ FcBool FcPatternAddCharSet( FcPattern* pPattern, const char* pObject, const FcCharSet *c) ++ { return m_pFcPatternAddCharSet( pPattern, pObject, c ); } + FcBool FcPatternAddString( FcPattern* pPattern, const char* pObject, const FcChar8* pString ) + { return m_pFcPatternAddString( pPattern, pObject, pString ); } + }; +@@ -186,7 +214,8 @@ void* FontCfgWrapper::loadSymbol( const + + FontCfgWrapper::FontCfgWrapper() + : m_pLib( NULL ), +- m_pDefConfig( NULL ) ++ m_pDefConfig( NULL ), ++ m_pOutlineSet( NULL ) + { + #ifdef ENABLE_FONTCONFIG + OUString aLib( RTL_CONSTASCII_USTRINGPARAM( "libfontconfig.so.1" ) ); +@@ -220,12 +249,20 @@ FontCfgWrapper::FontCfgWrapper() + loadSymbol( "FcPatternDestroy" ); + m_pFcFontList = (FcFontSet*(*)(FcConfig*,FcPattern*,FcObjectSet*)) + loadSymbol( "FcFontList" ); ++ m_pFcConfigGetFonts = (FcFontSet*(*)(FcConfig*,FcSetName)) ++ loadSymbol( "FcConfigGetFonts" ); + m_pFcFontSetCreate = (FcFontSet*(*)()) + loadSymbol( "FcFontSetCreate" ); ++ m_pFcCharSetCreate = (FcCharSet*(*)()) ++ loadSymbol( "FcCharSetCreate" ); ++ m_pFcCharSetAddChar = (FcBool(*)(FcCharSet*, FcChar32)) ++ loadSymbol( "FcCharSetAddChar" ); + m_pFcFontSetDestroy = (void(*)(FcFontSet*)) + loadSymbol( "FcFontSetDestroy" ); + m_pFcFontSetAdd = (FcBool(*)(FcFontSet*,FcPattern*)) + loadSymbol( "FcFontSetAdd" ); ++ m_pFcPatternReference = (void(*)(FcPattern*)) ++ loadSymbol( "FcPatternReference" ); + m_pFcPatternGetString = (FcResult(*)(const FcPattern*,const char*,int,FcChar8**)) + loadSymbol( "FcPatternGetString" ); + m_pFcPatternGetInteger = (FcResult(*)(const FcPattern*,const char*,int,int*)) +@@ -236,12 +273,16 @@ FontCfgWrapper::FontCfgWrapper() + loadSymbol( "FcPatternGetBool" ); + m_pFcDefaultSubstitute = (void(*)(FcPattern *)) + loadSymbol( "FcDefaultSubstitute" ); +- m_pFcFontMatch = (FcPattern*(*)(FcConfig*,FcPattern*,FcResult*)) +- loadSymbol( "FcFontMatch" ); ++ m_pFcFontSetMatch = (FcPattern*(*)(FcConfig*,FcFontSet**, int, FcPattern*,FcResult*)) ++ loadSymbol( "FcFontSetMatch" ); + m_pFcConfigSubstitute = (FcBool(*)(FcConfig*,FcPattern*,FcMatchKind)) + loadSymbol( "FcConfigSubstitute" ); + m_pFcPatternAddInteger = (FcBool(*)(FcPattern*,const char*,int)) + loadSymbol( "FcPatternAddInteger" ); ++ m_pFcPatternAddBool = (FcBool(*)(FcPattern*,const char*,FcBool)) ++ loadSymbol( "FcPatternAddBool" ); ++ m_pFcPatternAddCharSet = (FcBool(*)(FcPattern*,const char*,const FcCharSet *)) ++ loadSymbol( "FcPatternAddCharSet" ); + m_pFcPatternAddString = (FcBool(*)(FcPattern*,const char*,const FcChar8*)) + loadSymbol( "FcPatternAddString" ); + +@@ -253,17 +294,23 @@ FontCfgWrapper::FontCfgWrapper() + m_pFcPatternCreate && + m_pFcPatternDestroy && + m_pFcFontList && ++ m_pFcConfigGetFonts && + m_pFcFontSetCreate && ++ m_pFcCharSetCreate && ++ m_pFcCharSetAddChar && + m_pFcFontSetDestroy && + m_pFcFontSetAdd && ++ m_pFcPatternReference && + m_pFcPatternGetString && + m_pFcPatternGetInteger && + m_pFcPatternGetDouble && + m_pFcPatternGetBool && + m_pFcDefaultSubstitute && +- m_pFcFontMatch && ++ m_pFcFontSetMatch && + m_pFcConfigSubstitute && + m_pFcPatternAddInteger && ++ m_pFcPatternAddCharSet && ++ m_pFcPatternAddBool && + m_pFcPatternAddString + ) ) + { +@@ -281,10 +328,35 @@ FontCfgWrapper::FontCfgWrapper() + osl_unloadModule( (oslModule)m_pLib ); + m_pLib = NULL; + } ++ ++ m_pOutlineSet = FcFontSetCreate(); ++ ++ /* ++ add only acceptable outlined fonts to our config, ++ for future fontconfig use ++ */ ++ FcFontSet *pOrig = FcConfigGetFonts(NULL, FcSetSystem); ++ ++ if (!pOrig) ++ return; ++ ++ for( int i = 0; i < pOrig->nfont; ++i ) ++ { ++ FcBool outline = false; ++ FcPattern *pOutlinePattern = pOrig->fonts[i]; ++ FcResult eOutRes = ++ FcPatternGetBool( pOutlinePattern, FC_OUTLINE, 0, &outline ); ++ if (eOutRes == FcResultMatch && !outline) ++ continue; ++ FcPatternReference(pOutlinePattern); ++ FcFontSetAdd(m_pOutlineSet, pOutlinePattern); ++ } + } + + FontCfgWrapper::~FontCfgWrapper() + { ++ if( m_pOutlineSet ) ++ FcFontSetDestroy( m_pOutlineSet ); + if( m_pLib ) + osl_unloadModule( (oslModule)m_pLib ); + } +@@ -319,18 +391,7 @@ bool PrintFontManager::initFontconfig() + if( ! rWrapper.isValid() ) + return false; + +- FcConfig* pConfig = rWrapper.getDefConfig(); +- FcObjectSet* pOSet = rWrapper.FcObjectSetBuild( FC_FAMILY, +- FC_STYLE, +- FC_SLANT, +- FC_WEIGHT, +- FC_SPACING, +- FC_FILE, +- FC_OUTLINE, +- FC_INDEX, +- (void *) NULL ); +- FcPattern* pPattern = rWrapper.FcPatternCreate(); +- FcFontSet* pFSet = rWrapper.FcFontList( pConfig, pPattern, pOSet ); ++ FcFontSet* pFSet = rWrapper.getFontSet(); + + if( pFSet ) + { +@@ -373,6 +434,8 @@ bool PrintFontManager::initFontconfig() + ); + #endif + ++ OSL_ASSERT(eOutRes != FcResultMatch || outline); ++ + // only outline fonts are usable to psprint anyway + if( eOutRes == FcResultMatch && ! outline ) + continue; +@@ -515,14 +578,6 @@ bool PrintFontManager::initFontconfig() + } + } + +- // cleanup +- if( pPattern ) +- rWrapper.FcPatternDestroy( pPattern ); +- if( pFSet ) +- rWrapper.FcFontSetDestroy( pFSet ); +- if( pOSet ) +- rWrapper.FcObjectSetDestroy( pOSet ); +- + // how does one get rid of the config ? + #if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "inserted %d fonts from fontconfig\n", nFonts ); +@@ -536,39 +591,14 @@ void PrintFontManager::deinitFontconfig( + FontCfgWrapper::release(); + } + +-bool PrintFontManager::matchFont( FastPrintFontInfo& rInfo, const com::sun::star::lang::Locale& rLocale ) ++static void addtopattern(FontCfgWrapper& rWrapper, FcPattern *pPattern, ++ italic::type eItalic, weight::type eWeight, width::type eWidth, pitch::type ePitch) + { + #ifdef ENABLE_FONTCONFIG +- FontCfgWrapper& rWrapper = FontCfgWrapper::get(); +- if( ! rWrapper.isValid() ) +- return false; +- +- FcConfig* pConfig = rWrapper.getDefConfig(); +- FcPattern* pPattern = rWrapper.FcPatternCreate(); +- +- OString aLangAttrib; +- // populate pattern with font characteristics +- if( rLocale.Language.getLength() ) +- { +- OUStringBuffer aLang(6); +- aLang.append( rLocale.Language ); +- if( rLocale.Country.getLength() ) +- { +- aLang.append( sal_Unicode('-') ); +- aLang.append( rLocale.Country ); +- } +- aLangAttrib = OUStringToOString( aLang.makeStringAndClear(), RTL_TEXTENCODING_UTF8 ); +- } +- if( aLangAttrib.getLength() ) +- rWrapper.FcPatternAddString( pPattern, FC_LANG, (FcChar8*)aLangAttrib.getStr() ); +- +- OString aFamily = OUStringToOString( rInfo.m_aFamilyName, RTL_TEXTENCODING_UTF8 ); +- if( aFamily.getLength() ) +- rWrapper.FcPatternAddString( pPattern, FC_FAMILY, (FcChar8*)aFamily.getStr() ); +- if( rInfo.m_eItalic != italic::Unknown ) ++ if( eItalic != italic::Unknown ) + { + int nSlant = FC_SLANT_ROMAN; +- switch( rInfo.m_eItalic ) ++ switch( eItalic ) + { + case italic::Italic: nSlant = FC_SLANT_ITALIC;break; + case italic::Oblique: nSlant = FC_SLANT_OBLIQUE;break; +@@ -577,10 +607,10 @@ bool PrintFontManager::matchFont( FastPr + } + rWrapper.FcPatternAddInteger( pPattern, FC_SLANT, nSlant ); + } +- if( rInfo.m_eWeight != weight::Unknown ) ++ if( eWeight != weight::Unknown ) + { + int nWeight = FC_WEIGHT_NORMAL; +- switch( rInfo.m_eWeight ) ++ switch( eWeight ) + { + case weight::Thin: nWeight = FC_WEIGHT_THIN;break; + case weight::UltraLight: nWeight = FC_WEIGHT_ULTRALIGHT;break; +@@ -597,10 +627,10 @@ bool PrintFontManager::matchFont( FastPr + } + rWrapper.FcPatternAddInteger( pPattern, FC_WEIGHT, nWeight ); + } +- if( rInfo.m_eWidth != width::Unknown ) ++ if( eWidth != width::Unknown ) + { + int nWidth = FC_WIDTH_NORMAL; +- switch( rInfo.m_eWidth ) ++ switch( eWidth ) + { + case width::UltraCondensed: nWidth = FC_WIDTH_ULTRACONDENSED;break; + case width::ExtraCondensed: nWidth = FC_WIDTH_EXTRACONDENSED;break; +@@ -616,10 +646,10 @@ bool PrintFontManager::matchFont( FastPr + } + rWrapper.FcPatternAddInteger( pPattern, FC_WIDTH, nWidth ); + } +- if( rInfo.m_ePitch != pitch::Unknown ) ++ if( ePitch != pitch::Unknown ) + { + int nSpacing = FC_PROPORTIONAL; +- switch( rInfo.m_ePitch ) ++ switch( ePitch ) + { + case pitch::Fixed: nSpacing = FC_MONO;break; + case pitch::Variable: nSpacing = FC_PROPORTIONAL;break; +@@ -627,12 +657,123 @@ bool PrintFontManager::matchFont( FastPr + break; + } + rWrapper.FcPatternAddInteger( pPattern, FC_SPACING, nSpacing ); ++ if (nSpacing == FC_MONO) ++ rWrapper.FcPatternAddString( pPattern, FC_FAMILY, (FcChar8*)"monospace"); ++ } ++#endif ++} ++ ++String PrintFontManager::Substitute(const std::vector<String> &rNames, const std::vector<sal_Unicode> &rGlyphs, ++ const ByteString &rLangAttrib, italic::type eItalic, weight::type eWeight, ++ width::type eWidth, pitch::type ePitch) const ++{ ++ String aName; ++#ifdef ENABLE_FONTCONFIG ++ FontCfgWrapper& rWrapper = FontCfgWrapper::get(); ++ if( ! rWrapper.isValid() ) ++ return aName; ++ ++ FcFontSet* pSet = NULL; ++ FcPattern* pPattern = rWrapper.FcPatternCreate(); ++ ++ // Prefer scalable fonts ++ rWrapper.FcPatternAddBool( pPattern, FC_SCALABLE, 1 ); ++ ++ std::vector<String>::const_iterator aEnd = rNames.end(); ++ for (std::vector<String>::const_iterator aIter = rNames.begin(); aIter != aEnd; ++aIter) ++ { ++ OString maTargetName = OUStringToOString(*aIter, RTL_TEXTENCODING_UTF8); ++ rWrapper.FcPatternAddString(pPattern, FC_FAMILY, (FcChar8*)maTargetName.getStr()); ++ break; ++ } ++ ++ if( rLangAttrib.Len() ) ++ rWrapper.FcPatternAddString(pPattern, FC_LANG, (FcChar8*)rLangAttrib.GetBuffer()); ++ ++ // Add required Unicode characters, if any ++ FcCharSet *unicodes = NULL; ++ if (! rGlyphs.empty() ) ++ { ++ unicodes = rWrapper.FcCharSetCreate(); ++ std::vector<sal_Unicode>::const_iterator aGlyphEnd = rGlyphs.end(); ++ for (std::vector<sal_Unicode>::const_iterator aGlyphIter = rGlyphs.begin(); ++ aGlyphIter != aGlyphEnd; ++aGlyphIter) ++ { ++ rWrapper.FcCharSetAddChar( unicodes, (FcChar32)*aGlyphIter ); ++ } ++ rWrapper.FcPatternAddCharSet( pPattern, FC_CHARSET, unicodes); ++ } ++ ++ addtopattern(rWrapper, pPattern, eItalic, eWeight, eWidth, ePitch); ++ ++ rWrapper.FcConfigSubstitute( NULL, pPattern, FcMatchPattern ); ++ rWrapper.FcDefaultSubstitute( pPattern ); ++ FcResult eResult = FcResultNoMatch; ++ FcFontSet *pFontSet = rWrapper.getFontSet(); ++ FcPattern* pResult = rWrapper.FcFontSetMatch( NULL, &pFontSet, 1, pPattern, &eResult ); ++ rWrapper.FcPatternDestroy( pPattern ); ++ ++ if( pResult ) ++ { ++ pSet = rWrapper.FcFontSetCreate(); ++ // info: destroying the pSet destroys pResult implicitly ++ // since pResult was "added" to pSet ++ rWrapper.FcFontSetAdd( pSet, pResult ); + } + ++ if( pSet ) ++ { ++ if( pSet->nfont > 0 ) ++ { ++ //extract the closest match ++ FcChar8* family = NULL; ++ FcResult eFileRes = rWrapper.FcPatternGetString( pSet->fonts[0], FC_FAMILY, 0, &family ); ++ if( eFileRes == FcResultMatch ) ++ aName = String( (sal_Char*)family, RTL_TEXTENCODING_UTF8 ); ++ } ++ } ++ rWrapper.FcFontSetDestroy( pSet ); ++#endif ++ return aName; ++} ++ ++bool PrintFontManager::matchFont( FastPrintFontInfo& rInfo, const com::sun::star::lang::Locale& rLocale ) ++{ ++#ifdef ENABLE_FONTCONFIG ++ FontCfgWrapper& rWrapper = FontCfgWrapper::get(); ++ if( ! rWrapper.isValid() ) ++ return false; ++ ++ FcConfig* pConfig = rWrapper.getDefConfig(); ++ FcPattern* pPattern = rWrapper.FcPatternCreate(); ++ ++ OString aLangAttrib; ++ // populate pattern with font characteristics ++ if( rLocale.Language.getLength() ) ++ { ++ OUStringBuffer aLang(6); ++ aLang.append( rLocale.Language ); ++ if( rLocale.Country.getLength() ) ++ { ++ aLang.append( sal_Unicode('-') ); ++ aLang.append( rLocale.Country ); ++ } ++ aLangAttrib = OUStringToOString( aLang.makeStringAndClear(), RTL_TEXTENCODING_UTF8 ); ++ } ++ if( aLangAttrib.getLength() ) ++ rWrapper.FcPatternAddString( pPattern, FC_LANG, (FcChar8*)aLangAttrib.getStr() ); ++ ++ OString aFamily = OUStringToOString( rInfo.m_aFamilyName, RTL_TEXTENCODING_UTF8 ); ++ if( aFamily.getLength() ) ++ rWrapper.FcPatternAddString( pPattern, FC_FAMILY, (FcChar8*)aFamily.getStr() ); ++ ++ addtopattern(rWrapper, pPattern, rInfo.m_eItalic, rInfo.m_eWeight, rInfo.m_eWidth, rInfo.m_ePitch); ++ + rWrapper.FcConfigSubstitute( pConfig, pPattern, FcMatchPattern ); + rWrapper.FcDefaultSubstitute( pPattern ); + FcResult eResult = FcResultNoMatch; +- FcPattern* pResult = rWrapper.FcFontMatch( pConfig, pPattern, &eResult ); ++ FcFontSet *pFontSet = rWrapper.getFontSet(); ++ FcPattern* pResult = rWrapper.FcFontSetMatch( pConfig, &pFontSet, 1, pPattern, &eResult ); + bool bSuccess = false; + if( pResult ) + { diff --git a/patches/src680/framework-check-items.diff b/patches/src680/framework-check-items.diff new file mode 100644 index 000000000..9a2639289 --- /dev/null +++ b/patches/src680/framework-check-items.diff @@ -0,0 +1,16 @@ +Index: framework/source/uielement/menubarmanager.cxx +=================================================================== +RCS file: /cvs/framework/framework/source/uielement/menubarmanager.cxx,v +retrieving revision 1.30 +diff -u -r1.30 menubarmanager.cxx +--- framework/source/uielement/menubarmanager.cxx 5 Jan 2006 18:11:17 -0000 1.30 ++++ framework/source/uielement/menubarmanager.cxx 21 Mar 2006 13:05:54 -0000 +@@ -733,6 +733,8 @@ + // Checkmark + m_pVCLMenu->ShowItem( pMenuItemHandler->nItemId, TRUE ); + m_pVCLMenu->CheckItem( pMenuItemHandler->nItemId, bCheckmark ); ++ m_pVCLMenu->SetItemBits( pMenuItemHandler->nItemId, ++ m_pVCLMenu->GetItemBits( pMenuItemHandler->nItemId ) | MIB_CHECKABLE ); + } + else if ( Event.State >>= aItemText ) + { diff --git a/patches/src680/frugalware.diff b/patches/src680/frugalware.diff index 675af7650..f1a9fa990 100644 --- a/patches/src680/frugalware.diff +++ b/patches/src680/frugalware.diff @@ -1,11 +1,6 @@ -Index: svx/prj/d.lst -=================================================================== -RCS file: /cvs/graphics/svx/prj/d.lst,v -retrieving revision 1.108 -diff -u -r1.108 d.lst ---- svx/prj/d.lst 9 Dec 2004 16:36:45 -0000 1.108 -+++ svx/prj/d.lst 16 Dec 2004 12:43:47 -0000 -@@ -55,7 +55,7 @@ +--- svx/prj/d.lst.fw 2005-12-30 20:32:26.000000000 +0100 ++++ svx/prj/d.lst 2005-12-31 10:56:02.000000000 +0100 +@@ -43,7 +43,7 @@ ..\res\cjkintro.bmp %COMMON_DEST%\pck%_EXT%\starsuite_bitmap\intro.bmp ..\res\ofaabout.bmp %COMMON_DEST%\pck%_EXT%\staroffice_bitmap\about.bmp ..\res\soffice.bmp %COMMON_DEST%\pck%_EXT%\staroffice_bitmap\intro.bmp @@ -14,26 +9,14 @@ diff -u -r1.108 d.lst ..\res\ooonologointro.bmp %COMMON_DEST%\pck%_EXT%\openoffice\nologointro.bmp mkdir: %_DEST%\inc%_EXT%\svx -Index: svx/source/intro/ooo.src -=================================================================== -RCS file: /cvs/graphics/svx/source/intro/ooo.src,v -retrieving revision 1.11 -diff -u -r1.11 ooo.src ---- svx/source/intro/ooo.src 7 Jan 2005 09:49:30 -0000 1.11 -+++ svx/source/intro/ooo.src 1 Feb 2005 16:48:49 -0000 -@@ -48,8 +48,8 @@ +--- svx/source/intro/ooo.src.fw 2005-12-14 16:16:29.000000000 +0100 ++++ svx/source/intro/ooo.src 2005-12-31 11:26:42.000000000 +0100 +@@ -48,9 +48,11 @@ #include "svxids.hrc" #include "intro.hrc" --#ifdef BUILD_SPECIAL --#define OOO_VENDOR "Sun Microsystems Inc." -+#if 1 +#define OOO_VENDOR "Frugalware Linux i686 Edition" - #else - //#define OOO_VENDOR "my company" - #endif -@@ -56,7 +56,7 @@ - ++ Bitmap RID_DEFAULT_ABOUT_BMP_LOGO { - File = "openabout.bmp" ; diff --git a/patches/src680/gcj-32bit-runtime-path.diff b/patches/src680/gcj-32bit-runtime-path.diff index 7ec9ab58f..8a29e517c 100644 --- a/patches/src680/gcj-32bit-runtime-path.diff +++ b/patches/src680/gcj-32bit-runtime-path.diff @@ -1,5 +1,5 @@ ---- jvmfwk/plugins/sunmajor/pluginlib/gnujre.cxx.old 2006-03-13 12:11:30.359949000 +0000 -+++ jvmfwk/plugins/sunmajor/pluginlib/gnujre.cxx 2006-03-13 12:13:00.779949000 +0000 +--- jvmfwk/plugins/sunmajor/pluginlib/gnujre.cxx.old 2006-04-30 11:46:38.090510000 +0000 ++++ jvmfwk/plugins/sunmajor/pluginlib/gnujre.cxx 2006-04-30 11:50:39.530510000 +0000 @@ -37,6 +37,11 @@ #include "osl/thread.h" #include "gnujre.hxx" @@ -12,21 +12,15 @@ using namespace rtl; using namespace std; -@@ -53,10 +58,12 @@ - char const* const* GnuInfo::getJavaExePaths(int * size) - { +@@ -55,6 +60,8 @@ static char const * ar[] = { -- "gij", -- "bin/gij", + "gij", + "bin/gij", + "gij-4.1", -+ "bin/gij-4.1" ++ "bin/gij-4.1", "gij-4.0", "bin/gij-4.0" -+ "gij", -+ "bin/gij", }; - *size = sizeof (ar) / sizeof (char*); - return ar; @@ -72,8 +79,27 @@ , "/lib/libgcj.so.4" #endif @@ -34,7 +28,7 @@ +#if defined(__linux__) && defined (__i386__) + struct utsname uts; + static char const* ar64[]= { -+ "/lib32/libgcj.so.7" ++ "/lib32/libgcj.so.7", + "/lib32/libgcj.so.6" + }; + uname(&uts); diff --git a/patches/src680/gui-gtk-contextmenu.diff b/patches/src680/gui-gtk-contextmenu.diff new file mode 100644 index 000000000..afd77366a --- /dev/null +++ b/patches/src680/gui-gtk-contextmenu.diff @@ -0,0 +1,16 @@ +Index: vcl/unx/gtk/window/gtkframe.cxx +=================================================================== +RCS file: /cvs/gsl/vcl/unx/gtk/window/gtkframe.cxx,v +retrieving revision 1.47 +diff -u -p -u -r1.47 gtkframe.cxx +--- vcl/unx/gtk/window/gtkframe.cxx 5 May 2006 11:01:02 -0000 1.47 ++++ vcl/unx/gtk/window/gtkframe.cxx 19 May 2006 09:03:56 -0000 +@@ -190,7 +190,7 @@ static USHORT GetKeyCode( guint keyval ) + case GDK_KP_Equal: + case GDK_equal: nCode = KEY_EQUAL; break; + case GDK_Find: nCode = KEY_FIND; break; +- case GDK_Menu: nCode = KEY_MENU; break; ++ case GDK_Menu: nCode = KEY_CONTEXTMENU;break; + case GDK_Help: nCode = KEY_HELP; break; + case GDK_Undo: nCode = KEY_UNDO; break; + case GDK_Redo: nCode = KEY_REPEAT; break; diff --git a/patches/src680/hang-sw-layout.diff b/patches/src680/hang-sw-layout.diff new file mode 100644 index 000000000..6d7e858a2 --- /dev/null +++ b/patches/src680/hang-sw-layout.diff @@ -0,0 +1,32 @@ +--- sw/source/core/layout/layact.cxx ++++ sw/source/core/layout/layact.cxx +@@ -2266,6 +2266,7 @@ + ( !bBrowse && pPage->IsInvalidLayout() ) || + // OD 07.05.2003 #109435# - consider interrupt formatting + ( IS_FLYS && IS_INVAFLY && !mbFormatCntntOnInterrupt ) ++ && pCntnt->GetNextCntntFrm() + ) + return FALSE; + } + +--- sw/source/core/layout/wsfrm.cxx ++++ sw/source/core/layout/wsfrm.cxx +@@ -517,6 +517,18 @@ + return; + + SwRootFrm *pRoot = (SwRootFrm*)pPage->GetUpper(); ++ const SwFrm* pFrm = FindFooterOrHeader(); ++ if ( IsHeaderFrm() || IsFooterFrm() ) ++ { ++ if ( pFrm->GetDrawObjs() ) ++ pPage->InvalidateCntnt(); ++ if ( this == pFrm ) ++ { ++ pRoot->SetIdleFlags(); ++ return; ++ } ++ } ++ + const SwFlyFrm *pFly = FindFlyFrm(); + if ( IsCntntFrm() ) + { diff --git a/patches/src680/helpcontent2-greek-fonts.diff b/patches/src680/helpcontent2-greek-fonts.diff new file mode 100644 index 000000000..817f65598 --- /dev/null +++ b/patches/src680/helpcontent2-greek-fonts.diff @@ -0,0 +1,75 @@ +--- helpcontent2/source/auxiliary/el.old/default.css 2005-09-05 13:44:11.000000000 +0200 ++++ helpcontent2/source/auxiliary/el/default.css 2006-04-20 12:02:35.000000000 +0200 +@@ -10,10 +10,10 @@ + + + body, p, h1, h2, h3, h4, h5, h6, .listitem, .listitemintable, .tablecontent, .tablecontentintable +- { font-family: "Bitstream Vera Sans",Arial,Helvetica,Lucida,Geneva,Helmet,sans-serif,"Andale Sans UI","Arial Unicode MS","Lucida Sans Unicode",Tahoma; } ++ { font-family: "Albany AMT",Albany,Arial,"DejaVu Sans","CMU Sans Serif","FreeSans","Nimbus Sans L","Bitstream Vera Sans",Helvetica,Lucida,Geneva,Helmet,"Andale Sans UI","Arial Unicode MS","Lucida Sans Unicode",Tahoma,sans-serif; } + + .code, .codeintable, .example, .exampleintable, .literal, .literalintable, .path, .pathintable +- { font-family: "Bitstream Vera Sans Mono",Cumberland,"Courier New",Courier,"Lucida Sans Typewriter","Lucida Typewriter",Monaco,Monospaced; margin-top: 1pt; margin-bottom: 1pt;} ++ { font-family: "Cumberland AMT",Cumberland,"Courier New","DejaVu Sans Mono","CMU Typewriter Text","FreeMono","Nimbus Mono L","Bitstream Vera Sans Mono",Courier,"Lucida Sans Typewriter","Lucida Typewriter",Monaco,Monospaced; margin-top: 1pt; margin-bottom: 1pt;} + + .acronym + { font-weight: bold; } +--- helpcontent2/source/auxiliary/el.old/highcontrastblack.css 2005-09-05 13:44:54.000000000 +0200 ++++ helpcontent2/source/auxiliary/el/highcontrastblack.css 2006-04-20 12:15:35.000000000 +0200 +@@ -10,10 +10,10 @@ + + + body, p, h1, h2, h3, h4, h5, h6, .listitem, .listitemintable, .tablecontent, .tablecontentintable +- { font-family: "Bitstream Vera Sans",Arial,Helvetica,Lucida,Geneva,Helmet,sans-serif,"Andale Sans UI","Arial Unicode MS","Lucida Sans Unicode",Tahoma; } ++ { font-family: "Albany AMT",Albany,Arial,"DejaVu Sans","CMU Sans Serif","FreeSans","Nimbus Sans L","Bitstream Vera Sans",Helvetica,Lucida,Geneva,Helmet,"Andale Sans UI","Arial Unicode MS","Lucida Sans Unicode",Tahoma,sans-serif; } + + .code, .codeintable, .example, .exampleintable, .literal, .literalintable, .path, .pathintable +- { font-family: "Bitstream Vera Sans Mono",Cumberland,"Courier New",Courier,"Lucida Sans Typewriter","Lucida Typewriter",Monaco,Monospaced; margin-top: 1pt; margin-bottom: 1pt;} ++ { font-family: "Cumberland AMT",Cumberland,"Courier New","DejaVu Sans Mono","CMU Typewriter Text","FreeMono","Nimbus Mono L","Bitstream Vera Sans Mono",Courier,"Lucida Sans Typewriter","Lucida Typewriter",Monaco,Monospaced; margin-top: 1pt; margin-bottom: 1pt;} + + .acronym + { font-weight: bold;} +--- helpcontent2/source/auxiliary/el.old/highcontrastwhite.css 2005-09-05 13:45:19.000000000 +0200 ++++ helpcontent2/source/auxiliary/el/highcontrastwhite.css 2006-04-20 12:15:50.000000000 +0200 +@@ -10,10 +10,10 @@ + + + body, p, h1, h2, h3, h4, h5, h6, .listitem, .listitemintable, .tablecontent, .tablecontentintable +- { font-family: "Bitstream Vera Sans",Arial,Helvetica,Lucida,Geneva,Helmet,sans-serif,"Andale Sans UI","Arial Unicode MS","Lucida Sans Unicode",Tahoma; } ++ { font-family: "Albany AMT",Albany,Arial,"DejaVu Sans","CMU Sans Serif","FreeSans","Nimbus Sans L","Bitstream Vera Sans",Helvetica,Lucida,Geneva,Helmet,"Andale Sans UI","Arial Unicode MS","Lucida Sans Unicode",Tahoma,sans-serif; } + + .code, .codeintable, .example, .exampleintable, .literal, .literalintable, .path, .pathintable +- { font-family: "Bitstream Vera Sans Mono",Cumberland,"Courier New",Courier,"Lucida Sans Typewriter","Lucida Typewriter",Monaco,Monospaced; margin-top: 1pt; margin-bottom: 1pt;} ++ { font-family: "Cumberland AMT",Cumberland,"Courier New","DejaVu Sans Mono","CMU Typewriter Text","FreeMono","Nimbus Mono L","Bitstream Vera Sans Mono",Courier,"Lucida Sans Typewriter","Lucida Typewriter",Monaco,Monospaced; margin-top: 1pt; margin-bottom: 1pt;} + + .acronym + { font-weight: bold;} +--- helpcontent2/source/auxiliary/el.old/highcontrast1.css 2005-09-05 13:44:26.000000000 +0200 ++++ helpcontent2/source/auxiliary/el/highcontrast1.css 2006-04-20 12:14:48.000000000 +0200 +@@ -10,10 +10,10 @@ + + + body, p, h1, h2, h3, h4, h5, h6, .listitem, .listitemintable, .tablecontent, .tablecontentintable +- { font-family: "Bitstream Vera Sans",Arial,Helvetica,Lucida,Geneva,Helmet,sans-serif,"Andale Sans UI","Arial Unicode MS","Lucida Sans Unicode",Tahoma; } ++ { font-family: "Albany AMT",Albany,Arial,"DejaVu Sans","CMU Sans Serif","FreeSans","Nimbus Sans L","Bitstream Vera Sans",Helvetica,Lucida,Geneva,Helmet,"Andale Sans UI","Arial Unicode MS","Lucida Sans Unicode",Tahoma,sans-serif; } + + .code, .codeintable, .example, .exampleintable, .literal, .literalintable, .path, .pathintable +- { font-family: "Bitstream Vera Sans Mono",Cumberland,"Courier New",Courier,"Lucida Sans Typewriter","Lucida Typewriter",Monaco,Monospaced; margin-top: 1pt; margin-bottom: 1pt;} ++ { font-family: "Cumberland AMT",Cumberland,"Courier New","DejaVu Sans Mono","CMU Typewriter Text","FreeMono","Nimbus Mono L","Bitstream Vera Sans Mono",Courier,"Lucida Sans Typewriter","Lucida Typewriter",Monaco,Monospaced; margin-top: 1pt; margin-bottom: 1pt;} + + .acronym + { font-weight: bold;} +--- helpcontent2/source/auxiliary/el.old/highcontrast2.css 2005-09-05 13:44:40.000000000 +0200 ++++ helpcontent2/source/auxiliary/el/highcontrast2.css 2006-04-20 12:15:10.000000000 +0200 +@@ -10,10 +10,10 @@ + + + body, p, h1, h2, h3, h4, h5, h6, .listitem, .listitemintable, .tablecontent, .tablecontentintable +- { font-family: "Bitstream Vera Sans",Arial,Helvetica,Lucida,Geneva,Helmet,sans-serif,"Andale Sans UI","Arial Unicode MS","Lucida Sans Unicode",Tahoma; } ++ { font-family: "Albany AMT",Albany,Arial,"DejaVu Sans","CMU Sans Serif","FreeSans","Nimbus Sans L","Bitstream Vera Sans",Helvetica,Lucida,Geneva,Helmet,"Andale Sans UI","Arial Unicode MS","Lucida Sans Unicode",Tahoma,sans-serif; } + + .code, .codeintable, .example, .exampleintable, .literal, .literalintable, .path, .pathintable +- { font-family: "Bitstream Vera Sans Mono",Cumberland,"Courier New",Courier,"Lucida Sans Typewriter","Lucida Typewriter",Monaco,Monospaced; margin-top: 1pt; margin-bottom: 1pt;} ++ { font-family: "Cumberland AMT",Cumberland,"Courier New","DejaVu Sans Mono","CMU Typewriter Text","FreeMono","Nimbus Mono L","Bitstream Vera Sans Mono",Courier,"Lucida Sans Typewriter","Lucida Typewriter",Monaco,Monospaced; margin-top: 1pt; margin-bottom: 1pt;} + + .acronym + { font-weight: bold;} diff --git a/patches/src680/ms-interoperability-email-attachment-as-doc-xls-ppt-m99.diff b/patches/src680/ms-interoperability-email-attachment-as-doc-xls-ppt-m99.diff index 8f426b39b..478909f15 100644 --- a/patches/src680/ms-interoperability-email-attachment-as-doc-xls-ppt-m99.diff +++ b/patches/src680/ms-interoperability-email-attachment-as-doc-xls-ppt-m99.diff @@ -239,7 +239,7 @@ <menu:menuitem menu:id=".uno:NewHtmlDoc" menu:helpid="20040" menu:label="" /> --- sd/uiconfig/simpress/menubar/menubar.xml.bakj 2005-02-18 16:44:27.103479847 +0530 +++ sd/uiconfig/simpress/menubar/menubar.xml 2005-02-18 16:47:02.584344135 +0530 -@@ -22,6 +22,7 @@ +@@ -22,7 +22,8 @@ <menu:menupopup> <menu:menuitem menu:id=".uno:SendMail" menu:helpid="5331" menu:label="" /> <menu:menuitem menu:id=".uno:SendMailDocAsPDF" menu:helpid="6672" menu:label="" /> @@ -247,34 +247,54 @@ </menu:menupopup> </menu:menu> <menu:menuseparator/> ---- officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu.bakj 2005-02-18 16:55:18.659537625 +0530 -+++ officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu 2005-02-18 17:00:20.837598320 +0530 -@@ -809,6 +809,11 @@ + +--- officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu ++++ officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu +@@ -809,6 +809,19 @@ <value>1</value> </prop> </node> + <node oor:name=".uno:SendMailDocAsMSDoc" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + <value xml:lang="en-US">Document as MS-~Doc Attachment...</value> ++ <value xml:lang="de">Dokument als Microsoft Word-Anlage</value> ++ <value xml:lang="es">Documento como archivo adjunto de Microsoft Word</value> ++ <value xml:lang="fr">Document en tant que pièce jointe Microsoft Word</value> ++ <value xml:lang="it">Documento come allegato di Microsoft Word</value> ++ <value xml:lang="ja">Microsoft WordãŒæ·»ä»˜ã•ã‚Œã¦ã„るドã‚ュメント</value> ++ <value xml:lang="pt-BR">Documentar como Anexo do Microsoft Word</value> ++ <value xml:lang="zh-CN">作为 Microsoft Word 附件的文档</value> ++ <value xml:lang="zh-TW">當作 Microsoft Word 附件文件處ç†</value> + </prop> + </node> <node oor:name=".uno:SendOutlineToClipboard" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> <value xml:lang="de">Gliederung zur Zwis~chenablage</value> + --- officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu.bakj 2005-02-18 16:58:17.271973105 +0530 +++ officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu 2005-02-18 16:59:43.010223193 +0530 -@@ -1731,6 +1731,11 @@ +@@ -1731,6 +1731,19 @@ <value xml:lang="en-US">Sen~d</value> </prop> </node> + <node oor:name=".uno:SendMailDocAsMSPowerPoint" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + <value xml:lang="en-US">Document as MS-~PPT Attachment...</value> ++ <value xml:lang="de">Dokument als Microsoft PowerPoint-Anlage</value> ++ <value xml:lang="es">Documento como archivo adjunto de Microsoft PowerPoint</value> ++ <value xml:lang="fr">Document en tant que pièce jointe Microsoft PowerPoint</value> ++ <value xml:lang="it">Documento come allegato di Microsoft PowerPoint</value> ++ <value xml:lang="ja">Microsoft PowerPointãŒæ·»ä»˜ã•ã‚Œã¦ã„るドã‚ュメント</value> ++ <value xml:lang="pt-BR">Documentar como Anexo do Microsoft PowerPoint</value> ++ <value xml:lang="zh-CN">作为 Microsoft PowerPoint 附件的文档</value> ++ <value xml:lang="zh-TW">當作 Microsoft PowerPoint 附件文件處ç†</value> + </prop> + </node> <node oor:name=".uno:TemplatesMenu" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> <value xml:lang="de">~Vorlagen</value> + + --- svx/inc/globlmn_tmpl.hrc.bakj 2005-02-18 18:05:06.196343865 +0530 +++ svx/inc/globlmn_tmpl.hrc 2005-02-18 18:07:51.216700899 +0530 @@ -588,6 +588,24 @@ @@ -398,15 +418,25 @@ { --- officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu.bakj 2005-05-10 13:59:29.000000000 +0530 +++ officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu 2005-05-10 14:00:12.000000000 +0530 -@@ -1498,6 +1498,11 @@ +@@ -1498,6 +1498,19 @@ <value xml:lang="en-US">Sen~d</value> </prop> </node> + <node oor:name=".uno:SendMailDocAsMSExcel" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + <value xml:lang="en-US">Document as MS-E~xcel Attachment...</value> ++ <value xml:lang="de">Dokument als Microsoft Excel-Anlage</value> ++ <value xml:lang="es">Documento como archivo adjunto de Microsoft Excel</value> ++ <value xml:lang="fr">Document en tant que pièce jointe Microsoft Excel</value> ++ <value xml:lang="it">Documento come allegato di Microsoft Excel</value> ++ <value xml:lang="ja">Microsoft ExcelãŒæ·»ä»˜ã•ã‚Œã¦ã„るドã‚ュメント</value> ++ <value xml:lang="pt-BR">Documentar como Anexo do Microsoft Excel</value> ++ <value xml:lang="zh-CN">作为 Microsoft Excel 附件的文档</value> ++ <value xml:lang="zh-TW">當作 Microsoft Excel 附件文件處ç†</value> + </prop> + </node> <node oor:name=".uno:ProtectMenu" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> <value xml:lang="de">Dokument sch~ützen</value> + + diff --git a/patches/src680/office-cfg-vcl-greek-fonts.diff b/patches/src680/office-cfg-vcl-greek-fonts.diff new file mode 100644 index 000000000..ddc8f1134 --- /dev/null +++ b/patches/src680/office-cfg-vcl-greek-fonts.diff @@ -0,0 +1,272 @@ +--- officecfg/registry/data/org/openoffice/VCL.xcu.old 2006-02-03 18:13:21.000000000 +0100 ++++ officecfg/registry/data/org/openoffice/VCL.xcu 2006-04-20 16:04:09.000000000 +0200 +@@ -160,6 +160,41 @@ + <value>Andale Sans UI;Arial Unicode MS;Lucida Sans Unicode;Tahoma;Luxi Sans;Interface User;WarpSans;Geneva;Tahoma;MS Sans Serif;Helv;Dialog;Albany;Lucida;Helvetica;Charcoal;Chicago;Arial;Helmet;Interface System;Sans Serif</value> + </prop> + </node> ++ <node oor:name="el" oor:op="replace"> ++ <prop oor:name="LATIN_DISPLAY" oor:type="xs:string" oor:op="replace"> ++ <value>Albany AMT;Albany;Arial;DejaVu Sans;CMU Sans Serif;FreeSans;Nimbus Sans L;Helvetica;Lucida;Geneva;Helmet;Andale Sans UI;Arial Unicode MS;Lucida Sans Unicode;Tahoma</value> ++ </prop> ++ <prop oor:name="LATIN_HEADING" oor:type="xs:string" oor:op="replace"> ++ <value>Albany AMT;Albany;Arial;DejaVu Sans;CMU Sans Serif;FreeSans;Nimbus Sans L;Helvetica;Lucida;Geneva;Helmet;Andale Sans UI;Arial Unicode MS;Lucida Sans Unicode;Tahoma</value> ++ </prop> ++ <prop oor:name="LATIN_FIXED" oor:type="xs:string" oor:op="replace"> ++ <value>Cumberland AMT;Cumberland;Courier New;DejaVu Sans Mono;CMU Typewriter Text;FreeMono;Nimbus Mono L;Courier;Lucida Sans Typewriter;Lucida Typewriter;Monaco;Monospaced</value> ++ </prop> ++ <prop oor:name="LATIN_PRESENTATION" oor:type="xs:string" oor:op="replace"> ++ <value>Albany AMT;Albany;Arial;DejaVu Sans;CMU Sans Serif;FreeSans;Nimbus Sans L;Helvetica;Lucida;Geneva;Helmet;Andale Sans UI;Arial Unicode MS;Lucida Sans Unicode;Tahoma</value> ++ </prop> ++ <prop oor:name="LATIN_SPREADSHEET" oor:type="xs:string" oor:op="replace"> ++ <value>Albany AMT;Albany;Arial;DejaVu Sans;CMU Sans Serif;FreeSans;Nimbus Sans L;Helvetica;Lucida;Geneva;Helmet;Andale Sans UI;Arial Unicode MS;Lucida Sans Unicode;Tahoma</value> ++ </prop> ++ <prop oor:name="LATIN_TEXT" oor:type="xs:string" oor:op="replace"> ++ <value>Thorndale AMT;Thorndale;Times New Roman;DejaVu Serif;CMU Serif;FreeSerif;Nimbus Roman No9 L;Luxi Serif;Times;Lucida Serif;Lucida Bright;Timmons;New York;Serif</value> ++ </prop> ++ <prop oor:name="SANS" oor:type="xs:string" oor:op="replace"> ++ <value>Albany AMT;Albany;Arial;DejaVu Sans;CMU Sans Serif;FreeSans;Nimbus Sans L;Helvetica;Lucida;Geneva;Helmet;Andale Sans UI;Arial Unicode MS;Lucida Sans Unicode;Tahoma</value> ++ </prop> ++ <prop oor:name="SERIF" oor:type="xs:string" oor:op="replace"> ++ <value>Thorndale AMT;Thorndale;Times New Roman;DejaVu Serif;CMU Serif;FreeSerif;Nimbus Roman No9 L;Luxi Serif;Times;Lucida Serif;Lucida Bright;Timmons;New York;Serif</value> ++ </prop> ++ <prop oor:name="UI_FIXED" oor:type="xs:string" oor:op="replace"> ++ <value>Cumberland AMT;Cumberland;Courier New;DejaVu Sans Mono;CMU Typewriter Text;FreeMono;Nimbus Mono L;Courier;Lucida Sans Typewriter;Lucida Typewriter;Monaco;Monospaced</value> ++ </prop> ++ <prop oor:name="FIXED" oor:type="xs:string" oor:op="replace"> ++ <value>Cumberland AMT;Cumberland;Courier New;DejaVu Sans Mono;CMU Typewriter Text;FreeMono;Nimbus Mono L;Courier;Lucida Sans Typewriter;Lucida Typewriter;Monaco;Monospaced</value> ++ </prop> ++ <prop oor:name="UI_SANS" oor:type="xs:string" oor:op="replace"> ++ <value>Albany AMT;Albany;Arial;DejaVu Sans;CMU Sans Serif;FreeSans;Nimbus Sans L;Helvetica;Lucida;Geneva;Helmet;Andale Sans UI;Arial Unicode MS;Lucida Sans Unicode;Tahoma</value> ++ </prop> ++ </node> + <node oor:name="hr-HR" oor:op="replace"> + <prop oor:name="LATIN_DISPLAY" oor:type="xs:string" oor:op="replace"> + <value>Albany;Arial;Luxi Serif;Helvetica;Lucida;Geneva;Helmet;SansSerif;Andale Sans UI;Arial Unicode MS;Lucida Sans Unicode;Tahoma</value> +@@ -1749,6 +1784,75 @@ + <value>Special,Italic,Script</value> + </prop> + </node> ++ <node oor:name="cmusansserif" oor:op="replace"> ++ <prop oor:name="SubstFonts"> ++ <value>albanyamt;albany;arial;dejavusans;cmusansserif;freesans;nimbussansl;helvetica;lucida;geneva;helmet;andalesansui;arialunicodems;lucidasansunicode;tahoma</value> ++ </prop> ++ <prop oor:name="SubstFontsMS"> ++ <value></value> ++ </prop> ++ <prop oor:name="SubstFontsPS"> ++ <value></value> ++ </prop> ++ <prop oor:name="SubstFontsHTML"> ++ <value></value> ++ </prop> ++ <prop oor:name="FontWeight"> ++ <value>Normal</value> ++ </prop> ++ <prop oor:name="FontWidth"> ++ <value>Normal</value> ++ </prop> ++ <prop oor:name="FontType"> ++ <value>Standard,Normal,SansSerif</value> ++ </prop> ++ </node> ++ <node oor:name="cmuserif" oor:op="replace"> ++ <prop oor:name="SubstFonts"> ++ <value>thorndaleamt;thorndale;timesnewroman;dejavuserif;cmuserif;freeserif;nimbusromanno9l;luxiserif;times;lucidaserif;lucidabright;timmons;newyork;serif</value> ++ </prop> ++ <prop oor:name="SubstFontsMS"> ++ <value></value> ++ </prop> ++ <prop oor:name="SubstFontsPS"> ++ <value></value> ++ </prop> ++ <prop oor:name="SubstFontsHTML"> ++ <value></value> ++ </prop> ++ <prop oor:name="FontWeight"> ++ <value>Normal</value> ++ </prop> ++ <prop oor:name="FontWidth"> ++ <value>Normal</value> ++ </prop> ++ <prop oor:name="FontType"> ++ <value>Standard,Normal,Serif</value> ++ </prop> ++ </node> ++ <node oor:name="cmutypewritertext" oor:op="replace"> ++ <prop oor:name="SubstFonts"> ++ <value>cumberlandamt;cumberland;couriernew;dejavusansmono;cmutypewritertext;freemono;nimbusmonol;courier;lucidasanstypewriter;lucidatypewriter;monaco;monospaced</value> ++ </prop> ++ <prop oor:name="SubstFontsMS"> ++ <value></value> ++ </prop> ++ <prop oor:name="SubstFontsPS"> ++ <value></value> ++ </prop> ++ <prop oor:name="SubstFontsHTML"> ++ <value></value> ++ </prop> ++ <prop oor:name="FontWeight"> ++ <value>Normal</value> ++ </prop> ++ <prop oor:name="FontWidth"> ++ <value>Normal</value> ++ </prop> ++ <prop oor:name="FontType"> ++ <value>Standard,Normal,Fixed,Typewriter</value> ++ </prop> ++ </node> + <node oor:name="colonna" oor:op="replace"> + <prop oor:name="SubstFonts"> + <value>monotypeoldstyleboldoutline;monotypeoldstyleoutline;chevaraoutline;imprintmtshadow;imprintshadow;imprint;colonnamt;castellar;imprintmtshadow;imprintshadow;imprint;chevaraoutline;chevara;gallia;colonnamt;algerian;castellar;imprintmtshadow;imprintshadow;imprint;chevara;gallia;algerian</value> +@@ -1978,6 +2082,75 @@ + <value>Italic,Script</value> + </prop> + </node> ++ <node oor:name="dejavusans" oor:op="replace"> ++ <prop oor:name="SubstFonts"> ++ <value>albanyamt;albany;arial;dejavusans;cmusansserif;freesans;nimbussansl;helvetica;lucida;geneva;helmet;andalesansui;arialunicodems;lucidasansunicode;tahoma</value> ++ </prop> ++ <prop oor:name="SubstFontsMS"> ++ <value></value> ++ </prop> ++ <prop oor:name="SubstFontsPS"> ++ <value></value> ++ </prop> ++ <prop oor:name="SubstFontsHTML"> ++ <value></value> ++ </prop> ++ <prop oor:name="FontWeight"> ++ <value>Normal</value> ++ </prop> ++ <prop oor:name="FontWidth"> ++ <value>Normal</value> ++ </prop> ++ <prop oor:name="FontType"> ++ <value>Standard,Normal,SansSerif</value> ++ </prop> ++ </node> ++ <node oor:name="dejavusansmono" oor:op="replace"> ++ <prop oor:name="SubstFonts"> ++ <value>cumberlandamt;cumberland;couriernew;dejavusansmono;cmutypewritertext;freemono;nimbusmonol;courier;lucidasanstypewriter;lucidatypewriter;monaco;monospaced</value> ++ </prop> ++ <prop oor:name="SubstFontsMS"> ++ <value></value> ++ </prop> ++ <prop oor:name="SubstFontsPS"> ++ <value></value> ++ </prop> ++ <prop oor:name="SubstFontsHTML"> ++ <value></value> ++ </prop> ++ <prop oor:name="FontWeight"> ++ <value>Normal</value> ++ </prop> ++ <prop oor:name="FontWidth"> ++ <value>Normal</value> ++ </prop> ++ <prop oor:name="FontType"> ++ <value>Standard,Normal,Fixed,Typewriter</value> ++ </prop> ++ </node> ++ <node oor:name="dejavuserif" oor:op="replace"> ++ <prop oor:name="SubstFonts"> ++ <value>thorndaleamt;thorndale;timesnewroman;dejavuserif;cmuserif;freeserif;nimbusromanno9l;luxiserif;times;lucidaserif;lucidabright;timmons;newyork;serif</value> ++ </prop> ++ <prop oor:name="SubstFontsMS"> ++ <value></value> ++ </prop> ++ <prop oor:name="SubstFontsPS"> ++ <value></value> ++ </prop> ++ <prop oor:name="SubstFontsHTML"> ++ <value></value> ++ </prop> ++ <prop oor:name="FontWeight"> ++ <value>Normal</value> ++ </prop> ++ <prop oor:name="FontWidth"> ++ <value>Normal</value> ++ </prop> ++ <prop oor:name="FontType"> ++ <value>Standard,Normal,Serif</value> ++ </prop> ++ </node> + <node oor:name="din" oor:op="replace"> + <prop oor:name="SubstFonts"> + <value>albany;arial;helvetica;lucidasans;lucida;geneva;helmet;sansserif;nimbussansl;nimbussans;andalesansui;arialunicodems;lucidaunicode</value> +@@ -2392,6 +2565,75 @@ + <value>Decorative,Italic,Script,Comic</value> + </prop> + </node> ++ <node oor:name="freemono" oor:op="replace"> ++ <prop oor:name="SubstFonts"> ++ <value>cumberlandamt;cumberland;couriernew;dejavusansmono;cmutypewritertext;freemono;nimbusmonol;courier;lucidasanstypewriter;lucidatypewriter;monaco;monospaced</value> ++ </prop> ++ <prop oor:name="SubstFontsMS"> ++ <value></value> ++ </prop> ++ <prop oor:name="SubstFontsPS"> ++ <value></value> ++ </prop> ++ <prop oor:name="SubstFontsHTML"> ++ <value></value> ++ </prop> ++ <prop oor:name="FontWeight"> ++ <value>Normal</value> ++ </prop> ++ <prop oor:name="FontWidth"> ++ <value>Normal</value> ++ </prop> ++ <prop oor:name="FontType"> ++ <value>Standard,Normal,Fixed,Typewriter</value> ++ </prop> ++ </node> ++ <node oor:name="freesans" oor:op="replace"> ++ <prop oor:name="SubstFonts"> ++ <value>albanyamt;albany;arial;dejavusans;cmusansserif;freesans;nimbussansl;helvetica;lucida;geneva;helmet;andalesansui;arialunicodems;lucidasansunicode;tahoma</value> ++ </prop> ++ <prop oor:name="SubstFontsMS"> ++ <value></value> ++ </prop> ++ <prop oor:name="SubstFontsPS"> ++ <value></value> ++ </prop> ++ <prop oor:name="SubstFontsHTML"> ++ <value></value> ++ </prop> ++ <prop oor:name="FontWeight"> ++ <value>Normal</value> ++ </prop> ++ <prop oor:name="FontWidth"> ++ <value>Normal</value> ++ </prop> ++ <prop oor:name="FontType"> ++ <value>Standard,Normal,SansSerif</value> ++ </prop> ++ </node> ++ <node oor:name="freeserif" oor:op="replace"> ++ <prop oor:name="SubstFonts"> ++ <value>thorndaleamt;thorndale;timesnewroman;dejavuserif;cmuserif;freeserif;nimbusromanno9l;luxiserif;times;lucidaserif;lucidabright;timmons;newyork;serif</value> ++ </prop> ++ <prop oor:name="SubstFontsMS"> ++ <value></value> ++ </prop> ++ <prop oor:name="SubstFontsPS"> ++ <value></value> ++ </prop> ++ <prop oor:name="SubstFontsHTML"> ++ <value></value> ++ </prop> ++ <prop oor:name="FontWeight"> ++ <value>Normal</value> ++ </prop> ++ <prop oor:name="FontWidth"> ++ <value>Normal</value> ++ </prop> ++ <prop oor:name="FontType"> ++ <value>Standard,Normal,Serif</value> ++ </prop> ++ </node> + <node oor:name="frenchscript" oor:op="replace"> + <prop oor:name="SubstFonts"> + <value>palacescript;palacescriptmt;arioso;shelley;zapfchancery;itczapfchancery;monotypecorsiva;corsiva;chancery;chanceryl;lucidacalligraphy;lucidahandwriting;comicsansms;kidprint;</value> diff --git a/patches/src680/ooqstart-honour-sofficerc.diff b/patches/src680/ooqstart-honour-sofficerc.diff new file mode 100644 index 000000000..d8215e207 --- /dev/null +++ b/patches/src680/ooqstart-honour-sofficerc.diff @@ -0,0 +1,49 @@ +--- desktop/unx/source/start.c-old 2006-03-19 15:07:26.000000000 +0100 ++++ desktop/unx/source/start.c 2006-03-19 15:44:15.000000000 +0100 +@@ -395,8 +395,6 @@ + gboolean next_arg_not_filename = FALSE; + GPtrArray *args = g_ptr_array_sized_new (argc + 8); + +- *inhibit_splash = FALSE; +- + for (i = 0; i < argc; i++) + { + char *converted; +@@ -438,7 +436,7 @@ + int main (int argc, char **argv) + { + int fd; +- gboolean inhibit_splash; ++ gboolean inhibit_splash = FALSE; + GIOChannel *status_channel = NULL; + gboolean sent_args = FALSE; + char *app_path, *pipe_path; +@@ -451,6 +449,28 @@ + g_error ("can't get cwd"); + cwd_str[sizeof(cwd_str)-1] = '\0'; + ++ FILE *sofficerc; ++ char* buf = malloc(80*sizeof(char)); ++ sofficerc = fopen("/etc/openoffice/sofficerc", "r"); ++ if (sofficerc != NULL) { ++ while(!feof(sofficerc)) { ++ fgets(buf, 80, sofficerc); ++#ifdef DEBUG ++ fprintf(stderr,buf); ++#endif ++ if(strncmp("Logo=0",buf,6) == 0) { ++#ifdef DEBUG ++ fprintf(stderr, "Disabling Logo..\n"); ++#endif ++ inhibit_splash = TRUE; ++ } ++ } ++ } else { ++ perror("fopen() failed."); ++ } ++ fclose(sofficerc); ++ free(buf); ++ + args = setup_args (argc, argv, cwd_str, &inhibit_splash); + + app_path = get_app_path (argv[0]); diff --git a/patches/src680/sc-csvfix-ui.diff b/patches/src680/sc-csvfix-ui.diff index 39a739602..7a9429466 100644 --- a/patches/src680/sc-csvfix-ui.diff +++ b/patches/src680/sc-csvfix-ui.diff @@ -177,7 +177,7 @@ ScDelimiterTable* pTextSepTab; --- sc/source/ui/dbgui/imoptdlg.src 2005-08-09 20:17:17.000000000 +0530 +++ sc/source/ui/dbgui/imoptdlg.src 2005-08-31 07:48:22.000000000 +0530 -@@ -134,12 +134,22 @@ ModalDialog RID_SCDLG_IMPORTOPT +@@ -134,12 +134,30 @@ ModalDialog RID_SCDLG_IMPORTOPT }; CheckBox CB_FIXEDWIDTH { @@ -197,6 +197,14 @@ + Text [ de ] = " "; + Text [ en-US ] = "Save as ~Rendered"; + Text [ x-comment ] = " "; ++ Text[ de ] = "Als ~gerendert speichern"; ++ Text[ es ] = "Guardar como ~procesado"; ++ Text[ fr ] = "Enregistrer en tant que ~rendu"; ++ Text[ it ] = "Salva come documento renderizzato"; ++ Text[ ja ] = "åå‰ã‚’付ã‘ã¦ä¿å˜~表示"; ++ Text[ pt-BR ] = "Gravar como ~Renderizado"; ++ Text[ zh-CN ] = "å¦å˜ä¸ºå·²æ˜¾ç¤º(~R)"; ++ Text[ zh-TW ] = "隨機儲å˜(~R)"; + }; OKButton BTN_OK { diff --git a/patches/src680/sc-datapilot-dynamic-range.diff b/patches/src680/sc-datapilot-dynamic-range.diff index cc912b7b4..cc7d3e853 100644 --- a/patches/src680/sc-datapilot-dynamic-range.diff +++ b/patches/src680/sc-datapilot-dynamic-range.diff @@ -21,7 +21,7 @@ diff -u -r ../../../sc.bak/source/ui/dbgui/pivot.src sc/source/ui/dbgui/pivot.sr Hide = TRUE ; SVLook = TRUE ; Moveable = TRUE ; -@@ -161,6 +161,32 @@ +@@ -161,6 +161,47 @@ Text [ de ] = "Layout" ; Text [ en-US ] = "Layout"; }; @@ -32,6 +32,14 @@ diff -u -r ../../../sc.bak/source/ui/dbgui/pivot.src sc/source/ui/dbgui/pivot.sr + Size = MAP_APPFONT ( 59 , 8 ) ; + Hide = FALSE ; + Text [ en-US ] = "Selection from" ; ++ Text[ de ] = "Auswahl aus"; ++ Text[ es ] = "Selección de"; ++ Text[ fr ] = "Sélection à partir de"; ++ Text[ it ] = "Seleziona da"; ++ Text[ ja ] = "é¸æŠžå…ƒ"; ++ Text[ pt-BR ] = "Seleção de "; ++ Text[ zh-CN ] = "选择范围"; ++ Text[ zh-TW ] = "é¸é …來æº"; + }; + + Edit ED_INAREA @@ -50,6 +58,13 @@ diff -u -r ../../../sc.bak/source/ui/dbgui/pivot.src sc/source/ui/dbgui/pivot.sr + Hide = FALSE ; + QuickHelpText = "Verkleinern" ; + QuickHelpText [ en-US ] = "Shrink" ; ++ QuickHelpText[ es ] = "Reducir"; ++ QuickHelpText[ fr ] = "Comprimer"; ++ QuickHelpText[ it ] = "Comprimi"; ++ QuickHelpText[ ja ] = "縮å°"; ++ QuickHelpText[ pt-BR ] = "Diminuir"; ++ QuickHelpText[ zh-CN ] = "收缩"; ++ QuickHelpText[ zh-TW ] = "縮å°"; + }; OKButton BTN_OK { diff --git a/patches/src680/sc-dp-hash-items.diff b/patches/src680/sc-dp-hash-items.diff new file mode 100644 index 000000000..8988bf35f --- /dev/null +++ b/patches/src680/sc-dp-hash-items.diff @@ -0,0 +1,950 @@ +Index: sc/inc/dptabdat.hxx +=================================================================== +RCS file: /cvs/sc/sc/inc/dptabdat.hxx,v +retrieving revision 1.5 +diff -u -w -p -r1.5 dptabdat.hxx +--- sc/inc/dptabdat.hxx 8 Sep 2005 17:36:18 -0000 1.5 ++++ sc/inc/dptabdat.hxx 19 May 2006 14:50:21 -0000 +@@ -82,8 +82,14 @@ struct ScDPItemData + aString(rS), fValue(fV), bHasValue( bHV ) {} + + void SetString( const String& rS ) { aString = rS; bHasValue = FALSE; } +- + BOOL IsCaseInsEqual( const ScDPItemData& r ) const; ++ ++ size_t Hash() const; ++ ++ // exact equality ++ BOOL operator==( const ScDPItemData& r ) const; ++ // case insensitive equality ++ static sal_Int32 Compare( const ScDPItemData& rA, const ScDPItemData& rB ); + }; + + #define SC_VALTYPE_EMPTY 0 +Index: sc/inc/dptabres.hxx +=================================================================== +RCS file: /cvs/sc/sc/inc/dptabres.hxx,v +retrieving revision 1.5 +diff -u -w -p -r1.5 dptabres.hxx +--- sc/inc/dptabres.hxx 8 Sep 2005 17:36:34 -0000 1.5 ++++ sc/inc/dptabres.hxx 19 May 2006 14:50:22 -0000 +@@ -59,6 +59,8 @@ + #ifndef SC_SCGLOB_HXX + #include "global.hxx" // enum ScSubTotalFunc + #endif ++#include <hash_map> ++#include <vector> + + namespace com { namespace sun { namespace star { namespace sheet { + struct DataPilotFieldReference; +@@ -309,7 +311,7 @@ private: + ScDPResultData* pResultData; + ScDPDimension* pParentDim; //! Ref + ScDPLevel* pParentLevel; //! Ref +- ScDPMember* pMemberDesc; //! Ref ++ const ScDPMember* pMemberDesc; //! Ref + ScDPResultDimension* pChildDimension; + ScDPDataMember* pDataRoot; + BOOL bHasElements; +@@ -341,6 +343,7 @@ public: + long GetSubTotalCount( long* pUserSubStart = NULL ) const; + + BOOL IsNamedItem( const ScDPItemData& r ) const; ++ BOOL IsValidEntry( const ScDPItemData* pMembers ) const; + + void SetHasElements() { bHasElements = TRUE; } + void SetAutoHidden() { bAutoHidden = TRUE; } +@@ -379,8 +382,8 @@ public: + + ScDPDataMember* GetDataRoot() const { return pDataRoot; } + +- ScDPDimension* GetParentDim() { return pParentDim; } //! Ref +- ScDPLevel* GetParentLevel() { return pParentLevel; } //! Ref ++ const ScDPDimension* GetParentDim() const { return pParentDim; } //! Ref ++ const ScDPLevel* GetParentLevel() const { return pParentLevel; } //! Ref + + ScDPAggData* GetColTotal( long nMeasure ) const; + }; +@@ -389,17 +392,17 @@ class ScDPDataMember + { + private: + ScDPResultData* pResultData; +- ScDPResultMember* pResultMember; //! Ref? ++ const ScDPResultMember* pResultMember; //! Ref? + ScDPDataDimension* pChildDimension; + ScDPAggData aAggregate; + + void UpdateValues( const ScDPValueData* pValues, const ScDPSubTotalState& rSubState ); + + public: +- ScDPDataMember( ScDPResultData* pData, ScDPResultMember* pRes ); ++ ScDPDataMember( ScDPResultData* pData, const ScDPResultMember* pRes ); + ~ScDPDataMember(); + +- void InitFrom( ScDPResultDimension* pDim ); ++ void InitFrom( const ScDPResultDimension* pDim ); + + String GetName() const; + BOOL IsVisible() const; +@@ -453,9 +456,18 @@ SV_DECL_PTRARR_DEL(ScDPDataMembers, ScDP + + class ScDPResultDimension + { ++public : ++ struct MemberHashFunc : public std::unary_function< const ScDPItemData &, size_t > ++ { ++ size_t operator() (const ScDPItemData &rData) const { return rData.Hash(); } ++ }; ++ typedef std::vector <ScDPResultMember *> MemberArray; ++ typedef std::hash_map <ScDPItemData, ScDPResultMember *, MemberHashFunc> MemberHash; ++ + private: + ScDPResultData* pResultData; +- ScDPResultMembers aMembers; ++ MemberArray maMemberArray; ++ MemberHash maMemberHash; + BOOL bInitialized; + String aDimensionName; //! or ptr to IntDimension? + BOOL bIsDataLayout; //! or ptr to IntDimension? +@@ -468,6 +480,7 @@ private: + long nAutoMeasure; + long nAutoCount; + ++ ScDPResultMember* FindMember( const ScDPItemData& rData ) const; + public: + ScDPResultDimension( ScDPResultData* pData ); + ~ScDPResultDimension(); +@@ -520,7 +533,8 @@ public: + + // for ScDPDataDimension::InitFrom + long GetMemberCount() const; +- ScDPResultMember* GetMember(long n) const; ++ const ScDPResultMember* GetMember(long n) const; ++ ScDPResultMember* GetMember(long n); + + const ScMemberSortOrder& GetMemberOrder() const { return aMemberOrder; } + ScMemberSortOrder& GetMemberOrder() { return aMemberOrder; } +@@ -544,7 +558,7 @@ class ScDPDataDimension + { + private: + ScDPResultData* pResultData; +- ScDPResultDimension* pResultDimension; // column ++ const ScDPResultDimension* pResultDimension; // column + ScDPDataMembers aMembers; + BOOL bIsDataLayout; //! or ptr to IntDimension? + +@@ -552,7 +566,7 @@ public: + ScDPDataDimension( ScDPResultData* pData ); + ~ScDPDataDimension(); + +- void InitFrom( ScDPResultDimension* pDim ); // recursive ++ void InitFrom( const ScDPResultDimension* pDim ); // recursive + void ProcessData( const ScDPItemData* pDataMembers, const ScDPValueData* pValues, + const ScDPSubTotalState& rSubState ); + +Index: sc/inc/dptabsrc.hxx +=================================================================== +RCS file: /cvs/sc/sc/inc/dptabsrc.hxx,v +retrieving revision 1.7 +diff -u -w -p -r1.7 dptabsrc.hxx +--- sc/inc/dptabsrc.hxx 8 Sep 2005 17:36:50 -0000 1.7 ++++ sc/inc/dptabsrc.hxx 19 May 2006 14:50:22 -0000 +@@ -116,6 +116,9 @@ + #include <cppuhelper/implbase5.hxx> + #endif + ++#ifndef SC_DPTABDAT_HXX ++#include "dptabdat.hxx" ++#endif + + class ScDPResultMember; + class ScDPResultData; +@@ -762,10 +765,8 @@ private: + long nHier; + long nLev; + +- String aName; // name for api etc. ++ ScDPItemData maData; + // String aCaption; // visible name (changeable by user) +- double fValue; // used internally for matching +- BOOL bHasValue; // TRUE if this is a value + + BOOL bVisible; + BOOL bShowDet; +Index: sc/source/core/data/dptabdat.cxx +=================================================================== +RCS file: /cvs/sc/sc/source/core/data/dptabdat.cxx,v +retrieving revision 1.9 +diff -u -w -p -r1.9 dptabdat.cxx +--- sc/source/core/data/dptabdat.cxx 8 Sep 2005 18:24:11 -0000 1.9 ++++ sc/source/core/data/dptabdat.cxx 19 May 2006 14:50:23 -0000 +@@ -47,6 +47,9 @@ + #ifndef _UNOTOOLS_TRANSLITERATIONWRAPPER_HXX + #include <unotools/transliterationwrapper.hxx> + #endif ++#ifndef _UNOTOOLS_COLLATORWRAPPER_HXX ++#include <unotools/collatorwrapper.hxx> ++#endif + + #include "dptabdat.hxx" + #include "global.hxx" +@@ -60,6 +63,55 @@ BOOL ScDPItemData::IsCaseInsEqual( const + return bHasValue ? ( r.bHasValue && rtl::math::approxEqual( fValue, r.fValue ) ) : + ( !r.bHasValue && + ScGlobal::pTransliteration->isEqual( aString, r.aString ) ); ++} ++ ++size_t ScDPItemData::Hash() const ++{ ++ if ( bHasValue ) ++ return (size_t) rtl::math::approxFloor( fValue ); ++ else ++ // If we do unicode safe case insensitive hash we can drop ++ // ScDPItemData::operator== and use ::IsCasInsEqual ++ return rtl_ustr_hashCode_WithLength( aString.GetBuffer(), aString.Len() ); ++} ++ ++BOOL ScDPItemData::operator==( const ScDPItemData& r ) const ++{ ++ if ( bHasValue ) ++ { ++ if ( r.bHasValue ) ++ return rtl::math::approxEqual( fValue, r.fValue ); ++ else ++ return FALSE; ++ } ++ else if ( bHasValue ) ++ return FALSE; ++ else ++ // need exact equality until we have a safe case insensitive string hash ++ return aString == r.aString; ++} ++ ++sal_Int32 ScDPItemData::Compare( const ScDPItemData& rA, ++ const ScDPItemData& rB ) ++{ ++ if ( rA.bHasValue ) ++ { ++ if ( rB.bHasValue ) ++ { ++ if ( rtl::math::approxEqual( rA.fValue, rB.fValue ) ) ++ return 0; ++ else if ( rA.fValue < rB.fValue ) ++ return -1; ++ else ++ return 1; ++ } ++ else ++ return -1; // values first ++ } ++ else if ( rB.bHasValue ) ++ return 1; // values first ++ else ++ return ScGlobal::pCollator->compareString( rA.aString, rB.aString ); + } + + // ----------------------------------------------------------------------- +Index: sc/source/core/data/dptabres.cxx +=================================================================== +RCS file: /cvs/sc/sc/source/core/data/dptabres.cxx,v +retrieving revision 1.7 +diff -u -w -p -r1.7 dptabres.cxx +--- sc/source/core/data/dptabres.cxx 8 Sep 2005 18:24:27 -0000 1.7 ++++ sc/source/core/data/dptabres.cxx 19 May 2006 14:50:23 -0000 +@@ -48,9 +48,9 @@ + + #include <algorithm> + ++#include "dptabdat.hxx" + #include "dptabres.hxx" + #include "dptabsrc.hxx" +-#include "dptabdat.hxx" + #include "global.hxx" + #include "subtotal.hxx" + #include "globstr.hrc" +@@ -131,7 +131,7 @@ public: + BOOL operator()( sal_Int32 nIndex1, sal_Int32 nIndex2 ) const; + }; + +-BOOL lcl_IsLess( ScDPDataMember* pDataMember1, ScDPDataMember* pDataMember2, long nMeasure, BOOL bAscending ) ++static BOOL lcl_IsLess( const ScDPDataMember* pDataMember1, const ScDPDataMember* pDataMember2, long nMeasure, BOOL bAscending ) + { + // members can be NULL if used for rows + +@@ -162,7 +162,7 @@ BOOL lcl_IsLess( ScDPDataMember* pDataMe + } + } + +-BOOL lcl_IsEqual( ScDPDataMember* pDataMember1, ScDPDataMember* pDataMember2, long nMeasure ) ++static BOOL lcl_IsEqual( const ScDPDataMember* pDataMember1, const ScDPDataMember* pDataMember2, long nMeasure ) + { + // members can be NULL if used for rows + +@@ -195,13 +195,13 @@ BOOL lcl_IsEqual( ScDPDataMember* pDataM + + BOOL ScDPRowMembersOrder::operator()( sal_Int32 nIndex1, sal_Int32 nIndex2 ) const + { +- ScDPResultMember* pMember1 = rDimension.GetMember(nIndex1); +- ScDPResultMember* pMember2 = rDimension.GetMember(nIndex2); ++ const ScDPResultMember* pMember1 = rDimension.GetMember(nIndex1); ++ const ScDPResultMember* pMember2 = rDimension.GetMember(nIndex2); + + // GetDataRoot can be NULL if there was no data. + // IsVisible == FALSE can happen after AutoShow. +- ScDPDataMember* pDataMember1 = pMember1->IsVisible() ? pMember1->GetDataRoot() : NULL; +- ScDPDataMember* pDataMember2 = pMember2->IsVisible() ? pMember2->GetDataRoot() : NULL; ++ const ScDPDataMember* pDataMember1 = pMember1->IsVisible() ? pMember1->GetDataRoot() : NULL; ++ const ScDPDataMember* pDataMember2 = pMember2->IsVisible() ? pMember2->GetDataRoot() : NULL; + + return lcl_IsLess( pDataMember1, pDataMember2, nMeasure, bAscending ); + } +@@ -692,7 +692,7 @@ ScDPAggData* ScDPRowTotals::GetGrandTota + + // ----------------------------------------------------------------------- + +-ScSubTotalFunc lcl_GetForceFunc( ScDPLevel* pLevel, long nFuncNo ) ++static ScSubTotalFunc lcl_GetForceFunc( const ScDPLevel* pLevel, long nFuncNo ) + { + ScSubTotalFunc eRet = SUBTOTAL_FUNC_NONE; + if ( pLevel ) +@@ -943,6 +943,17 @@ BOOL ScDPResultMember::IsNamedItem( cons + return ((ScDPMember*)pMemberDesc)->IsNamedItem( r ); + return FALSE; + } ++BOOL ScDPResultMember::IsValidEntry( const ScDPItemData* pMembers ) const ++{ ++ if ( !IsValid() ) ++ return FALSE; ++ ++ const ScDPResultDimension* pChildDim = GetChildDimension(); ++ if (pChildDim) ++ return pChildDim->IsValidEntry( pMembers + 1 ); ++ else ++ return TRUE; ++} + + void ScDPResultMember::InitFrom( ScDPDimension** ppDim, ScDPLevel** ppLev, ScDPInitState& rInitState ) + { +@@ -1561,7 +1572,7 @@ ScDPAggData* ScDPResultMember::GetColTot + + // ----------------------------------------------------------------------- + +-ScDPDataMember::ScDPDataMember( ScDPResultData* pData, ScDPResultMember* pRes ) : ++ScDPDataMember::ScDPDataMember( ScDPResultData* pData, const ScDPResultMember* pRes ) : + pResultData( pData ), + pResultMember( pRes ), + pChildDimension( NULL ) +@@ -1606,7 +1617,7 @@ BOOL ScDPDataMember::HasHiddenDetails() + return FALSE; + } + +-void ScDPDataMember::InitFrom( ScDPResultDimension* pDim ) ++void ScDPDataMember::InitFrom( const ScDPResultDimension* pDim ) + { + if ( !pChildDimension ) + pChildDimension = new ScDPDataDimension(pResultData); +@@ -1671,7 +1682,7 @@ void ScDPDataMember::ProcessData( const + { + if ( pChildDimension ) + { +- ScDPLevel* pForceLevel = pResultMember ? pResultMember->GetParentLevel() : NULL; ++ const ScDPLevel* pForceLevel = pResultMember ? pResultMember->GetParentLevel() : NULL; + aLocalSubState.nColSubTotalFunc = nUserPos; + aLocalSubState.eColForce = lcl_GetForceFunc( pForceLevel, nUserPos ); + } +@@ -1828,7 +1839,7 @@ void ScDPDataMember::FillDataRow( const + { + if ( pChildDimension ) + { +- ScDPLevel* pForceLevel = pResultMember ? pResultMember->GetParentLevel() : NULL; ++ const ScDPLevel* pForceLevel = pResultMember ? pResultMember->GetParentLevel() : NULL; + aLocalSubState.nColSubTotalFunc = nUserPos; + aLocalSubState.eColForce = lcl_GetForceFunc( pForceLevel, nUserPos ); + } +@@ -1904,7 +1915,7 @@ void ScDPDataMember::UpdateDataRow( cons + { + if ( pChildDimension ) + { +- ScDPLevel* pForceLevel = pResultMember ? pResultMember->GetParentLevel() : NULL; ++ const ScDPLevel* pForceLevel = pResultMember ? pResultMember->GetParentLevel() : NULL; + aLocalSubState.nColSubTotalFunc = nUserPos; + aLocalSubState.eColForce = lcl_GetForceFunc( pForceLevel, nUserPos ); + } +@@ -2016,7 +2027,7 @@ void ScDPDataMember::UpdateRunningTotals + { + if ( pChildDimension ) + { +- ScDPLevel* pForceLevel = pResultMember ? pResultMember->GetParentLevel() : NULL; ++ const ScDPLevel* pForceLevel = pResultMember ? pResultMember->GetParentLevel() : NULL; + aLocalSubState.nColSubTotalFunc = nUserPos; + aLocalSubState.eColForce = lcl_GetForceFunc( pForceLevel, nUserPos ); + } +@@ -2057,7 +2068,7 @@ void ScDPDataMember::UpdateRunningTotals + BOOL bRefDimInCol = ( nRefOrient == sheet::DataPilotFieldOrientation_COLUMN ); + BOOL bRefDimInRow = ( nRefOrient == sheet::DataPilotFieldOrientation_ROW ); + +- ScDPResultDimension* pSelectDim = NULL; ++ const ScDPResultDimension* pSelectDim = NULL; + long nRowPos = 0; + long nColPos = 0; + +@@ -2110,7 +2121,7 @@ void ScDPDataMember::UpdateRunningTotals + long nMyIndex = bRefDimInCol ? pColIndexes[nColPos] : pRowIndexes[nRowPos]; + if ( nMyIndex >= 0 && nMyIndex < pSelectDim->GetMemberCount() ) + { +- ScDPResultMember* pMyRefMember = pSelectDim->GetMember(nMyIndex); ++ const ScDPResultMember* pMyRefMember = pSelectDim->GetMember(nMyIndex); + if ( pMyRefMember && pMyRefMember->HasHiddenDetails() ) + { + pSelectDim = NULL; // don't calculate +@@ -2485,6 +2496,28 @@ ScDPResultDimension::ScDPResultDimension + + ScDPResultDimension::~ScDPResultDimension() + { ++ for( int i = maMemberArray.size () ; i-- > 0 ; ) ++ delete maMemberArray[i]; ++} ++ ++ScDPResultMember *ScDPResultDimension::FindMember( const ScDPItemData& rData ) const ++{ ++ if( bIsDataLayout ) ++ return maMemberArray[0]; ++ MemberHash::const_iterator aRes = maMemberHash.find( rData ); ++ if( aRes != maMemberHash.end() ) ++ return aRes->second; ++ ++ unsigned int i; ++ unsigned int nCount = maMemberArray.size(); ++ ScDPResultMember* pResultMember; ++ for( i = 0; i < nCount ; i++ ) ++ { ++ pResultMember = maMemberArray[i]; ++ if ( pResultMember->IsNamedItem( rData ) ) ++ return pResultMember; ++ } ++ return NULL; + } + + void ScDPResultDimension::InitFrom( ScDPDimension** ppDim, ScDPLevel** ppLev, ScDPInitState& rInitState ) +@@ -2531,14 +2564,20 @@ void ScDPResultDimension::InitFrom( ScDP + ScDPMember* pMember = pMembers->getByIndex(nSorted); + if ( aCompare.IsIncluded( *pMember ) ) + { +- ScDPResultMember* pNew = new ScDPResultMember( pResultData, pThisDim, ++ std::pair< ScDPItemData, ScDPResultMember *> key; ++ ++ key.second = new ScDPResultMember( pResultData, pThisDim, + pThisLevel, pMember, FALSE ); +- aMembers.Insert( pNew, aMembers.Count() ); ++ maMemberArray.push_back( key.second ); + +- ScDPItemData aMemberData; +- pMember->FillItemData( aMemberData ); +- rInitState.AddMember( nDimSource, ScDPItemData( aMemberData ) ); +- pNew->InitFrom( ppChildDim, ppChildLev, rInitState ); ++ // honour order of maMemberArray and only insert if it does not ++ // already exist ++ pMember->FillItemData( key.first ); ++ if ( maMemberHash.end() == maMemberHash.find( key.first ) ) ++ maMemberHash.insert ( key ); ++ ++ rInitState.AddMember( nDimSource, key.first ); ++ key.second->InitFrom( ppChildDim, ppChildLev, rInitState ); + rInitState.RemoveMember(); + } + } +@@ -2598,9 +2637,17 @@ void ScDPResultDimension::LateInitFrom( + ScDPMember* pMember = pMembers->getByIndex(nSorted); + if ( aCompare.IsIncluded( *pMember ) ) + { +- ScDPResultMember* pNew = new ScDPResultMember( pResultData, pThisDim, ++ std::pair< ScDPItemData, ScDPResultMember *> key; ++ ++ key.second = new ScDPResultMember( pResultData, pThisDim, + pThisLevel, pMember, FALSE ); +- aMembers.Insert( pNew, aMembers.Count() ); ++ maMemberArray.push_back( key.second ); ++ ++ // honour order of maMemberArray and only insert if it does not ++ // already exist ++ pMember->FillItemData( key.first ); ++ if ( maMemberHash.end() == maMemberHash.find( key.first ) ) ++ maMemberHash.insert ( key ); + } + } + bInitialized = TRUE; // don't call again, even if no members were included +@@ -2609,20 +2656,29 @@ void ScDPResultDimension::LateInitFrom( + // initialize only specific member (or all if "show empty" flag is set) + + BOOL bShowEmpty = pThisLevel->getShowEmpty(); +- long nCount = aMembers.Count(); ++ if ( bIsDataLayout || bShowEmpty ) ++ { ++ long nCount = maMemberArray.size(); + for (long i=0; i<nCount; i++) + { +- ScDPResultMember* pResultMember = aMembers[(USHORT)i]; +- if ( bIsDataLayout || bShowEmpty || pResultMember->IsNamedItem( rThisData ) ) ++ ScDPResultMember* pResultMember = maMemberArray[i]; ++ ScDPItemData aMemberData; ++ pResultMember->FillItemData( aMemberData ); ++ rInitState.AddMember( nDimSource, aMemberData ); ++ pResultMember->LateInitFrom( ppChildDim, ppChildLev, pChildData, rInitState ); ++ rInitState.RemoveMember(); ++ } ++ } ++ else ++ { ++ ScDPResultMember* pResultMember = FindMember( rThisData ); ++ if( NULL != pResultMember ) + { + ScDPItemData aMemberData; + pResultMember->FillItemData( aMemberData ); + rInitState.AddMember( nDimSource, aMemberData ); + pResultMember->LateInitFrom( ppChildDim, ppChildLev, pChildData, rInitState ); + rInitState.RemoveMember(); +- +- if ( !bIsDataLayout && !bShowEmpty ) +- break; + } + } + } +@@ -2631,19 +2687,19 @@ void ScDPResultDimension::LateInitFrom( + long ScDPResultDimension::GetSize(long nMeasure) const + { + long nTotal = 0; +- long nMemberCount = aMembers.Count(); ++ long nMemberCount = maMemberArray.size(); + if (bIsDataLayout) + { + DBG_ASSERT(nMeasure == SC_DPMEASURE_ALL || pResultData->GetMeasureCount() == 1, + "DataLayout dimension twice?"); + // repeat first member... +- nTotal = nMemberCount * aMembers[0]->GetSize(0); // all measures have equal size ++ nTotal = nMemberCount * maMemberArray[0]->GetSize(0); // all measures have equal size + } + else + { + // add all members + for (long nMem=0; nMem<nMemberCount; nMem++) +- nTotal += aMembers[(USHORT)nMem]->GetSize(nMeasure); ++ nTotal += maMemberArray[nMem]->GetSize(nMeasure); + } + return nTotal; + } +@@ -2651,23 +2707,9 @@ long ScDPResultDimension::GetSize(long n + BOOL ScDPResultDimension::IsValidEntry( const ScDPItemData* pMembers ) const + { + // the ScDPItemData array must contain enough entries for all dimensions - this isn't checked +- +- long nCount = aMembers.Count(); +- for (long i=0; i<nCount; i++) +- { +- ScDPResultMember* pMember = aMembers[(USHORT)i]; +- if ( bIsDataLayout || pMember->IsNamedItem( *pMembers ) ) +- { +- if ( !pMember->IsValid() ) +- return FALSE; +- +- ScDPResultDimension* pChildDim = pMember->GetChildDimension(); +- if (pChildDim) +- return pChildDim->IsValidEntry( pMembers + 1 ); +- else +- return TRUE; +- } +- } ++ const ScDPResultMember* pMember = FindMember( *pMembers ); ++ if( NULL != pMember ) ++ return pMember->IsValidEntry( pMembers ); + + DBG_ERROR("IsValidEntry: Member not found"); + return FALSE; +@@ -2678,19 +2720,12 @@ void ScDPResultDimension::ProcessData( c + const ScDPValueData* pValues ) + { + // the ScDPItemData array must contain enough entries for all dimensions - this isn't checked +- +- long nCount = aMembers.Count(); +- for (long i=0; i<nCount; i++) +- { +- ScDPResultMember* pMember = aMembers[(USHORT)i]; +- +- // always first member for data layout dim +- if ( bIsDataLayout || pMember->IsNamedItem( *pMembers ) ) ++ ScDPResultMember* pMember = FindMember( *pMembers ); ++ if( NULL != pMember ) + { + pMember->ProcessData( pMembers + 1, pDataDim, pDataMembers, pValues ); + return; + } +- } + + DBG_ERROR("ProcessData: Member not found"); + } +@@ -2699,19 +2734,19 @@ void ScDPResultDimension::FillMemberResu + long nStart, long nMeasure ) + { + long nPos = nStart; +- long nCount = aMembers.Count(); ++ long nCount = maMemberArray.size(); + + for (long i=0; i<nCount; i++) + { + long nSorted = aMemberOrder.empty() ? i : aMemberOrder[i]; + +- ScDPResultMember* pMember = aMembers[(USHORT)nSorted]; ++ ScDPResultMember* pMember = maMemberArray[nSorted]; + // in data layout dimension, use first member with different measures/names + if ( bIsDataLayout ) + { + String aMbrName = pResultData->GetMeasureDimensionName( nSorted ); + String aMbrCapt = pResultData->GetMeasureString( nSorted, FALSE, SUBTOTAL_FUNC_NONE ); +- aMembers[0]->FillMemberResults( pSequences, nPos, nSorted, FALSE, &aMbrName, &aMbrCapt ); ++ maMemberArray[0]->FillMemberResults( pSequences, nPos, nSorted, FALSE, &aMbrName, &aMbrCapt ); + } + else if ( pMember->IsVisible() ) + pMember->FillMemberResults( pSequences, nPos, nMeasure, FALSE, NULL, NULL ); +@@ -2725,7 +2760,7 @@ void ScDPResultDimension::FillDataResult + { + long nMemberRow = nRow; + long nMemberMeasure = nMeasure; +- long nCount = aMembers.Count(); ++ long nCount = maMemberArray.size(); + for (long i=0; i<nCount; i++) + { + long nSorted = aMemberOrder.empty() ? i : aMemberOrder[i]; +@@ -2735,11 +2770,11 @@ void ScDPResultDimension::FillDataResult + { + DBG_ASSERT(nMeasure == SC_DPMEASURE_ALL || pResultData->GetMeasureCount() == 1, + "DataLayout dimension twice?"); +- pMember = aMembers[0]; ++ pMember = maMemberArray[0]; + nMemberMeasure = nSorted; + } + else +- pMember = aMembers[(USHORT)nSorted]; ++ pMember = maMemberArray[nSorted]; + + if ( pMember->IsVisible() ) + pMember->FillDataResults( pRefMember, rSequence, nMemberRow, nMemberMeasure ); +@@ -2750,7 +2785,7 @@ void ScDPResultDimension::FillDataResult + void ScDPResultDimension::UpdateDataResults( const ScDPResultMember* pRefMember, long nMeasure ) const + { + long nMemberMeasure = nMeasure; +- long nCount = aMembers.Count(); ++ long nCount = maMemberArray.size(); + for (long i=0; i<nCount; i++) + { + const ScDPResultMember* pMember; +@@ -2758,11 +2793,11 @@ void ScDPResultDimension::UpdateDataResu + { + DBG_ASSERT(nMeasure == SC_DPMEASURE_ALL || pResultData->GetMeasureCount() == 1, + "DataLayout dimension twice?"); +- pMember = aMembers[0]; ++ pMember = maMemberArray[0]; + nMemberMeasure = i; + } + else +- pMember = aMembers[(USHORT)i]; ++ pMember = maMemberArray[i]; + + if ( pMember->IsVisible() ) + pMember->UpdateDataResults( pRefMember, nMemberMeasure ); +@@ -2771,7 +2806,7 @@ void ScDPResultDimension::UpdateDataResu + + void ScDPResultDimension::SortMembers( ScDPResultMember* pRefMember ) + { +- long nCount = aMembers.Count(); ++ long nCount = maMemberArray.size(); + + if ( bSortByData ) + { +@@ -2792,7 +2827,7 @@ void ScDPResultDimension::SortMembers( S + long nLoopCount = bIsDataLayout ? 1 : nCount; + for (long i=0; i<nLoopCount; i++) + { +- ScDPResultMember* pMember = aMembers[(USHORT)i]; ++ ScDPResultMember* pMember = maMemberArray[i]; + if ( pMember->IsVisible() ) + pMember->SortMembers( pRefMember ); + } +@@ -2800,7 +2835,7 @@ void ScDPResultDimension::SortMembers( S + + void ScDPResultDimension::DoAutoShow( ScDPResultMember* pRefMember ) + { +- long nCount = aMembers.Count(); ++ long nCount = maMemberArray.size(); + + // handle children first, before changing the visible state + +@@ -2808,7 +2843,7 @@ void ScDPResultDimension::DoAutoShow( Sc + long nLoopCount = bIsDataLayout ? 1 : nCount; + for (long i=0; i<nLoopCount; i++) + { +- ScDPResultMember* pMember = aMembers[(USHORT)i]; ++ ScDPResultMember* pMember = maMemberArray[i]; + if ( pMember->IsVisible() ) + pMember->DoAutoShow( pRefMember ); + } +@@ -2829,16 +2864,16 @@ void ScDPResultDimension::DoAutoShow( Sc + // look for equal values to the last included one + + long nIncluded = nAutoCount; +- ScDPResultMember* pMember1 = aMembers[(USHORT)aAutoOrder[nIncluded - 1]]; +- ScDPDataMember* pDataMember1 = pMember1->IsVisible() ? pMember1->GetDataRoot() : NULL; ++ const ScDPResultMember* pMember1 = maMemberArray[aAutoOrder[nIncluded - 1]]; ++ const ScDPDataMember* pDataMember1 = pMember1->IsVisible() ? pMember1->GetDataRoot() : NULL; + BOOL bContinue = TRUE; + while ( bContinue ) + { + bContinue = FALSE; + if ( nIncluded < nCount ) + { +- ScDPResultMember* pMember2 = aMembers[(USHORT)aAutoOrder[nIncluded]]; +- ScDPDataMember* pDataMember2 = pMember2->IsVisible() ? pMember2->GetDataRoot() : NULL; ++ const ScDPResultMember* pMember2 = maMemberArray[aAutoOrder[nIncluded]]; ++ const ScDPDataMember* pDataMember2 = pMember2->IsVisible() ? pMember2->GetDataRoot() : NULL; + + if ( lcl_IsEqual( pDataMember1, pDataMember2, nAutoMeasure ) ) + { +@@ -2852,7 +2887,7 @@ void ScDPResultDimension::DoAutoShow( Sc + + for (nPos = nIncluded; nPos < nCount; nPos++) + { +- ScDPResultMember* pMember = aMembers[(USHORT)aAutoOrder[nPos]]; ++ ScDPResultMember* pMember = maMemberArray[aAutoOrder[nPos]]; + pMember->SetAutoHidden(); + } + } +@@ -2860,11 +2895,11 @@ void ScDPResultDimension::DoAutoShow( Sc + + void ScDPResultDimension::ResetResults() + { +- long nCount = aMembers.Count(); ++ long nCount = maMemberArray.size(); + for (long i=0; i<nCount; i++) + { + // sort order doesn't matter +- ScDPResultMember* pMember = aMembers[(USHORT)( bIsDataLayout ? 0 : i )]; ++ ScDPResultMember* pMember = maMemberArray[bIsDataLayout ? 0 : i]; + pMember->ResetResults( FALSE ); + } + } +@@ -2877,22 +2912,22 @@ long ScDPResultDimension::GetSortedIndex + void ScDPResultDimension::UpdateRunningTotals( const ScDPResultMember* pRefMember, long nMeasure, + ScDPRunningTotalState& rRunning, ScDPRowTotals& rTotals ) const + { ++ const ScDPResultMember* pMember; + long nMemberMeasure = nMeasure; +- long nCount = aMembers.Count(); ++ long nCount = maMemberArray.size(); + for (long i=0; i<nCount; i++) + { + long nSorted = aMemberOrder.empty() ? i : aMemberOrder[i]; + +- const ScDPResultMember* pMember; + if (bIsDataLayout) + { + DBG_ASSERT(nMeasure == SC_DPMEASURE_ALL || pResultData->GetMeasureCount() == 1, + "DataLayout dimension twice?"); +- pMember = aMembers[0]; ++ pMember = maMemberArray[0]; + nMemberMeasure = nSorted; + } + else +- pMember = aMembers[(USHORT)nSorted]; ++ pMember = maMemberArray[nSorted]; + + if ( pMember->IsVisible() ) + { +@@ -2916,7 +2951,7 @@ ScDPDataMember* ScDPResultDimension::Get + ScDPDataMember* pColMember = NULL; + + BOOL bFirstExisting = ( pRelativePos == NULL && pName == NULL ); +- long nMemberCount = aMembers.Count(); ++ long nMemberCount = maMemberArray.size(); + long nMemberIndex = 0; // unsorted + long nDirection = 1; // forward if no relative position is used + if ( pRelativePos ) +@@ -2930,14 +2965,14 @@ ScDPDataMember* ScDPResultDimension::Get + { + // search for named member + +- ScDPResultMember* pRowMember = aMembers[(USHORT)GetSortedIndex(nMemberIndex)]; ++ const ScDPResultMember* pRowMember = maMemberArray[GetSortedIndex(nMemberIndex)]; + + //! use ScDPItemData, as in ScDPDimension::IsValidPage? + while ( pRowMember && pRowMember->GetName() != *pName ) + { + ++nMemberIndex; + if ( nMemberIndex < nMemberCount ) +- pRowMember = aMembers[(USHORT)GetSortedIndex(nMemberIndex)]; ++ pRowMember = maMemberArray[GetSortedIndex(nMemberIndex)]; + else + pRowMember = NULL; + } +@@ -2946,7 +2981,7 @@ ScDPDataMember* ScDPResultDimension::Get + BOOL bContinue = TRUE; + while ( bContinue && nMemberIndex >= 0 && nMemberIndex < nMemberCount ) + { +- ScDPResultMember* pRowMember = aMembers[(USHORT)GetSortedIndex(nMemberIndex)]; ++ const ScDPResultMember* pRowMember = maMemberArray[GetSortedIndex(nMemberIndex)]; + + // get child members by given indexes + +@@ -3006,7 +3041,7 @@ ScDPDataMember* ScDPResultDimension::Get + + // get own row member using all indexes + +- ScDPResultMember* pRowMember = rRunning.GetRowResRoot(); ++ const ScDPResultMember* pRowMember = rRunning.GetRowResRoot(); + ScDPDataMember* pColMember = NULL; + + const long* pNextRowIndex = pRowIndexes; +@@ -3123,10 +3158,10 @@ void ScDPResultDimension::DumpState( con + + SCROW nStartRow = rPos.Row(); + +- long nCount = bIsDataLayout ? 1 : aMembers.Count(); ++ long nCount = bIsDataLayout ? 1 : maMemberArray.size(); + for (long i=0; i<nCount; i++) + { +- const ScDPResultMember* pMember = aMembers[(USHORT)i]; ++ const ScDPResultMember* pMember = maMemberArray[i]; + pMember->DumpState( pRefMember, pDoc, rPos ); + } + +@@ -3135,18 +3170,22 @@ void ScDPResultDimension::DumpState( con + + long ScDPResultDimension::GetMemberCount() const + { +- return aMembers.Count(); ++ return maMemberArray.size(); + } + +-ScDPResultMember* ScDPResultDimension::GetMember(long n) const ++const ScDPResultMember* ScDPResultDimension::GetMember(long n) const ++{ ++ return maMemberArray[n]; ++} ++ScDPResultMember* ScDPResultDimension::GetMember(long n) + { +- return aMembers[(USHORT)n]; ++ return maMemberArray[n]; + } + + ScDPResultDimension* ScDPResultDimension::GetFirstChildDimension() const + { +- if ( aMembers.Count() > 0 ) +- return aMembers[0]->GetChildDimension(); ++ if ( maMemberArray.size() > 0 ) ++ return maMemberArray[0]->GetChildDimension(); + else + return NULL; + } +@@ -3164,7 +3203,7 @@ ScDPDataDimension::~ScDPDataDimension() + { + } + +-void ScDPDataDimension::InitFrom( ScDPResultDimension* pDim ) ++void ScDPDataDimension::InitFrom( const ScDPResultDimension* pDim ) + { + if (!pDim) + return; +@@ -3175,7 +3214,7 @@ void ScDPDataDimension::InitFrom( ScDPRe + long nCount = pDim->GetMemberCount(); + for (long i=0; i<nCount; i++) + { +- ScDPResultMember* pResMem = pDim->GetMember(i); ++ const ScDPResultMember* pResMem = pDim->GetMember(i); + + ScDPDataMember* pNew = new ScDPDataMember( pResultData, pResMem ); + aMembers.Insert( pNew, aMembers.Count() ); +@@ -3185,7 +3224,7 @@ void ScDPDataDimension::InitFrom( ScDPRe + // with LateInit, pResMem hasn't necessarily been initialized yet, + // so InitFrom for the new result member is called from its ProcessData method + +- ScDPResultDimension* pChildDim = pResMem->GetChildDimension(); ++ const ScDPResultDimension* pChildDim = pResMem->GetChildDimension(); + if ( pChildDim ) + pNew->InitFrom( pChildDim ); + } +Index: sc/source/core/data/dptabsrc.cxx +=================================================================== +RCS file: /cvs/sc/sc/source/core/data/dptabsrc.cxx,v +retrieving revision 1.14 +diff -u -w -p -r1.14 dptabsrc.cxx +--- sc/source/core/data/dptabsrc.cxx 7 Nov 2005 14:41:01 -0000 1.14 ++++ sc/source/core/data/dptabsrc.cxx 19 May 2006 14:50:24 -0000 +@@ -2399,9 +2399,7 @@ ScDPMember::ScDPMember( ScDPSource* pSrc + nDim( nD ), + nHier( nH ), + nLev( nL ), +- aName( rN ), +- fValue( fV ), +- bHasValue( bHV ), ++ maData( rN, fV, bHV ), + bVisible( TRUE ), + bShowDet( TRUE ) + { +@@ -2423,54 +2421,32 @@ BOOL ScDPMember::IsNamedItem( const ScDP + nHier, nLev ); + + // fValue is converted from integer, so simple comparison works +- return nComp == fValue; ++ return nComp == maData.fValue; + } + +- return r.IsCaseInsEqual( ScDPItemData( aName, fValue, bHasValue ) ); ++ return r.IsCaseInsEqual( maData ); + } + + sal_Int32 ScDPMember::Compare( const ScDPMember& rOther ) const + { +- sal_Int32 nResult; +- if ( bHasValue ) +- { +- if ( rOther.bHasValue ) +- { +- if ( rtl::math::approxEqual( fValue, rOther.fValue ) ) +- nResult = 0; +- else if ( fValue < rOther.fValue ) +- nResult = -1; +- else +- nResult = 1; +- } +- else +- nResult = -1; // values first +- } +- else if ( rOther.bHasValue ) +- nResult = 1; // values first +- else +- nResult = ScGlobal::pCollator->compareString( aName, rOther.aName ); +- +- return nResult; ++ return ScDPItemData::Compare( maData, rOther.maData ); + } + + void ScDPMember::FillItemData( ScDPItemData& rData ) const + { + //! handle date hierarchy... + +- rData.aString = aName; +- rData.fValue = fValue; +- rData.bHasValue = bHasValue; ++ rData = maData; + } + + String ScDPMember::GetNameStr() const + { +- return aName; ++ return maData.aString; + } + + ::rtl::OUString SAL_CALL ScDPMember::getName() throw(uno::RuntimeException) + { +- return aName; ++ return maData.aString; + } + + void SAL_CALL ScDPMember::setName( const ::rtl::OUString& rNewName ) throw(uno::RuntimeException) diff --git a/patches/src680/sc-info-func.diff b/patches/src680/sc-info-func.diff index 41fb15c07..fe32c6bdf 100644 --- a/patches/src680/sc-info-func.diff +++ b/patches/src680/sc-info-func.diff @@ -43,8 +43,9 @@ #endif ---- sc/source/ui/src/globstr.src 2005-04-19 09:07:50.000000000 +0530 -+++ sc/source/ui/src/globstr.src 2005-04-22 11:54:35.034247769 +0530 + +--- sc/source/ui/src/globstr.src ++++ sc/source/ui/src/globstr.src @@ -2065,8 +2065,8 @@ Resource RID_GLOBSTR }; String STR_SCATTR_PAGE_SCALE_AUTO @@ -56,18 +57,26 @@ }; String STR_DOC_STAT { -@@ -2611,5 +2611,11 @@ Resource RID_GLOBSTR +@@ -2611,5 +2611,18 @@ Resource RID_GLOBSTR Text [ en-US ] = "#NULL!" ; Text [ x-comment ] = " "; }; + String STR_MANUAL + { -+ Text [ de ] = " Manual "; + Text [ en-US ] = " Manual "; ++ Text[ de ] = "Manuell"; ++ Text[ es ] = "Manual"; ++ Text[ fr ] = "Manuel"; ++ Text[ it ] = "Manuale"; ++ Text[ ja ] = "手動"; ++ Text[ pt-BR ] = "Manual"; ++ Text[ zh-CN ] = "手册"; ++ Text[ zh-TW ] = "手動"; + Text [ x-comment ] = " "; + }; }; + --- sc/util/hidother.src 2005-04-14 09:49:51.000000000 +0530 +++ sc/util/hidother.src 2005-04-19 10:55:06.808990934 +0530 @@ -410,6 +410,7 @@ @@ -159,7 +168,7 @@ ocArcTan2 = SC_OPCODE_ARC_TAN_2, --- sc/source/ui/src/scfuncs.src 2005-04-14 09:49:55.000000000 +0530 +++ sc/source/ui/src/scfuncs.src 2005-04-22 11:54:44.487950093 +0530 -@@ -11027,6 +11027,31 @@ Resource RID_SC_FUNCTION_DESCRIPTIONS2 +@@ -11027,6 +11027,45 @@ Resource RID_SC_FUNCTION_DESCRIPTIONS2 Text [ en-US ] = "The text that represents a Roman numeral."; }; }; @@ -169,6 +178,14 @@ + { + Text [ de ] = " "; + Text [ en-US ] = "Gives some information about the environment"; ++ Text[ de ] = "Einige Informationen zur Umgebung"; ++ Text[ es ] = "Proporciona información sobre el entorno"; ++ Text[ fr ] = "Donne quelques informations sur l'environnement"; ++ Text[ it ] = "Include alcune informazioni sull'ambiente"; ++ Text[ ja ] = "環境ã«ã¤ã„ã¦èª¬æ˜Žã—ã¾ã™"; ++ Text[ pt-BR ] = "Fornece algumas informações sobre o ambiente"; ++ Text[ zh-CN ] = "æ供一些关于环境的信æ¯"; ++ Text[ zh-TW ] = "æ供一些有關環境的資訊。"; + }; + ExtraData = + { @@ -183,14 +200,22 @@ + }; + String 3 + { -+ Text [ de ] = " "; + Text [ en-US ] = "Can be 'osversion', 'system', 'release', 'arch', 'gui', 'numfile' and 'recalc'."; ++ Text[ de ] = "Kann 'osversion', 'system', 'release', 'arch', 'gui', 'numfile' und 'recalc' sein."; ++ Text[ fr ] = "Peut être 'osversion', 'system', 'release', 'arch', 'gui', 'numfile' et 'recalc'."; ++ Text[ it ] = "Può corrispondere a 'osversion', 'system', 'release', 'arch', 'gui', 'numfile' e 'recalc'."; ++ Text[ ja ] = "「osversionã€ã€ã€Œsystemã€ã€ã€Œreleaseã€ã€ã€Œarchã€ã€ã€Œguiã€ã€ã€Œnumfileã€ã€ã€Œrecalcã€ã«ãªã‚Šã¾ã™ã€‚"; ++ Text[ pt-BR ] = "Pode ser 'osversion', 'system', 'release', 'arch', 'gui', 'numfile' e 'recalc'."; ++ Text[ zh-CN ] = "å¯ä»¥æ˜¯ 'osversion'ã€'system'ã€'release'ã€'arch', 'gui'ã€'numfile' å’Œ 'recalc'。"; ++ Text[ zh-TW ] = "å¯ä»¥æ˜¯ 'osversion'ã€'system'ã€'release'ã€'arch', 'gui'ã€'numfile' å’Œ 'recalc'。"; + Text [ x-comment ] = " Donot translate quoted text. "; + }; + }; }; #if defined(U2S) + + --- solenv/inc/settings.mk 2005-04-14 10:17:33.000000000 +0530 +++ solenv/inc/settings.mk 2005-04-21 12:27:59.783874767 +0530 @@ -1393,6 +1393,12 @@ diff --git a/patches/src680/sc-insert-note-on-right-click.diff b/patches/src680/sc-insert-note-on-right-click.diff index b71a488bc..32156a864 100644 --- a/patches/src680/sc-insert-note-on-right-click.diff +++ b/patches/src680/sc-insert-note-on-right-click.diff @@ -1,12 +1,20 @@ ---- sc/source/ui/src/popup.src.back 2005-02-15 10:55:00.000000000 +0530 -+++ sc/source/ui/src/popup.src 2005-03-26 12:06:20.000000000 +0530 -@@ -165,6 +165,13 @@ +--- sc/source/ui/src/popup.src ++++ sc/source/ui/src/popup.src +@@ -142,6 +142,21 @@ //------------------------------ MenuItem { + Identifier = SID_INSERT_POSTIT ; + HelpId = SID_INSERT_POSTIT ; + Text [ en-US ] = "Insert Not~e" ; ++ Text[ de ] = "Hinw~eis einfügen"; ++ Text[ es ] = "Insertar Not~a"; ++ Text[ fr ] = "Insérer une not~e"; ++ Text[ it ] = "Inserisci nota"; ++ Text[ ja ] = "Not~eを挿入"; ++ Text[ pt-BR ] = "Inserir Observaçã~o"; ++ Text[ zh-CN ] = "æ’入注释(~E)"; ++ Text[ zh-TW ] = "æ’入記事(~E)"; + Text [ x-comment ] = " "; + }; + MenuItem @@ -14,8 +22,10 @@ Identifier = FID_NOTE_VISIBLE ; HelpId = FID_NOTE_VISIBLE ; Text [ de ] = "~Notiz anzeigen" ; ---- sc/source/ui/view/cellsh.cxx.back1 2005-11-17 18:58:00.000000000 +0530 -+++ sc/source/ui/view/cellsh.cxx 2005-03-30 10:40:14.000000000 +0530 + + +--- sc/source/ui/view/cellsh.cxx ++++ sc/source/ui/view/cellsh.cxx @@ -308,6 +308,14 @@ } } diff --git a/patches/src680/sc-standard-filter-options.diff b/patches/src680/sc-standard-filter-options.diff index f64d682b4..a44996aa9 100644 --- a/patches/src680/sc-standard-filter-options.diff +++ b/patches/src680/sc-standard-filter-options.diff @@ -36,7 +36,7 @@ diff -u -p -u -r1.54 filter.src < "<=" ; Default ; > ; < ">=" ; Default ; > ; - < "<>" ; Default ; > ; -+ < "Not equals" ; Default ; > ; ++ < "Not equal" ; Default ; > ; < "Largest" ; Default ; > ; < "Smallest" ; Default ; > ; < "Largest %" ; Default ; > ; diff --git a/patches/src680/sc-string-arg.diff b/patches/src680/sc-string-arg.diff index 0fcdcff67..52a5b16a7 100644 --- a/patches/src680/sc-string-arg.diff +++ b/patches/src680/sc-string-arg.diff @@ -1,22 +1,23 @@ --- sc/source/core/tool/interpr4.cxx 2005-04-14 09:50:06.000000000 +0530 +++ sc/source/core/tool/interpr4.cxx 2005-04-19 13:12:20.678272373 +0530 -@@ -283,8 +283,6 @@ double ScInterpreter::GetCellValueOrZero +@@ -257,7 +257,7 @@ double ScInterpreter::GetCellValueOrZero break; case CELLTYPE_STRING: case CELLTYPE_EDIT: -#if 0 --// Xcl does it, but SUM(A1:A2) differs from A1+A2. No good. ++#if 1 /* JEG : re-enable because compatibility is more important than consistency for this */ + // Xcl does it, but SUM(A1:A2) differs from A1+A2. No good. { String aStr; - if ( eType == CELLTYPE_STRING ) -@@ -299,7 +297,6 @@ double ScInterpreter::GetCellValueOrZero +@@ -268,7 +268,7 @@ double ScInterpreter::GetCellValueOrZero + sal_uInt32 nFIndex = 0; // damit default Land/Spr. + if ( !pFormatter->IsNumberFormat( aStr, nFIndex, fValue ) ) + { +- SetError(errNoValue); ++ SetError(errCellNoValue); /* CellNoValue is not really an error */ + fValue = 0.0; } } - break; --#endif - default: - SetError(errCellNoValue); - fValue = 0.0; --- sc/source/core/tool/interpr1.cxx 2005-04-14 09:50:06.000000000 +0530 +++ sc/source/core/tool/interpr1.cxx 2005-04-19 12:08:07.486080311 +0530 @@ -2685,12 +2685,13 @@ double ScInterpreter::IterateParameters( diff --git a/patches/src680/sc-xl-errors.diff b/patches/src680/sc-xl-errors.diff index e586e2cb6..1144ff9eb 100644 --- a/patches/src680/sc-xl-errors.diff +++ b/patches/src680/sc-xl-errors.diff @@ -68,8 +68,8 @@ retrieving revision 1.61 diff -u -p -u -r1.61 globstr.src --- sc/source/ui/src/globstr.src 14 Jan 2005 12:15:01 -0000 1.61 +++ sc/source/ui/src/globstr.src 18 Apr 2005 11:26:48 -0000 -@@ -2587,6 +2588,29 @@ Resource RID_GLOBSTR - Text [ de ] = "Sie können diesen Teil der Datenpilot-Tabelle nicht ändern."; +@@ -2587,6 +2588,37 @@ Resource RID_GLOBSTR + Text [ de ] = "Sie können diesen Teil der Datenpilot-Tabelle nicht ändern."; Text[ en-US ] = "You cannot change this part of the DataPilot table."; }; - @@ -83,6 +83,14 @@ diff -u -p -u -r1.61 globstr.src + { + Text [ de ] = "Division by zero" ; + Text [ en-US ] = "Division by zero" ; ++ Text[ de ] = "Division durch null"; ++ Text[ es ] = "División por cero"; ++ Text[ fr ] = "Division par zéro"; ++ Text[ it ] = "Divisione per zero"; ++ Text[ ja ] = "0ã«ã‚ˆã‚‹åˆ†å‰²"; ++ Text[ pt-BR ] = "Divisão por zero"; ++ Text[ zh-CN ] = "除以零"; ++ Text[ zh-TW ] = "除數為零"; + Text [ x-comment ] = " "; + }; + String STR_NUM_ERROR diff --git a/patches/src680/sc-xls-pivot-optimization.diff b/patches/src680/sc-xls-pivot-optimization.diff new file mode 100644 index 000000000..ed27d3568 --- /dev/null +++ b/patches/src680/sc-xls-pivot-optimization.diff @@ -0,0 +1,256 @@ +Index: sc/inc/dpsave.hxx +=================================================================== +RCS file: /cvs/sc/sc/inc/dpsave.hxx,v +retrieving revision 1.8 +diff -u -w -p -r1.8 dpsave.hxx +--- sc/inc/dpsave.hxx 8 Sep 2005 17:35:34 -0000 1.8 ++++ sc/inc/dpsave.hxx 27 Mar 2006 16:39:40 -0000 +@@ -51,6 +51,7 @@ + #ifndef INCLUDED_SCDLLAPI_H + #include "scdllapi.h" + #endif ++#include <hash_map> + + namespace com { namespace sun { namespace star { namespace sheet { + struct DataPilotFieldReference; +@@ -119,8 +120,15 @@ private: + ::com::sun::star::sheet::DataPilotFieldSortInfo* pSortInfo; // (level) + ::com::sun::star::sheet::DataPilotFieldAutoShowInfo* pAutoShowInfo; // (level) + ::com::sun::star::sheet::DataPilotFieldLayoutInfo* pLayoutInfo; // (level) +- List aMemberList; + ++ struct MemberHashFunc : public std::unary_function< const String &, size_t > ++ { ++ size_t operator() (const String &member_name) const; ++ }; ++public : ++ typedef std::hash_map <String, ScDPSaveMember *, MemberHashFunc> MemberHash; ++private : ++ MemberHash aMembers; + public: + ScDPSaveDimension(const String& rName, BOOL bDataLayout); + ScDPSaveDimension(const ScDPSaveDimension& r); +@@ -129,8 +137,8 @@ public: + + BOOL operator== ( const ScDPSaveDimension& r ) const; + +- const List& GetMembers() const { return aMemberList; } +- void AddMember(ScDPSaveMember* pMember) { aMemberList.Insert(pMember, LIST_APPEND); }; ++ const MemberHash& GetMembers() const { return aMembers; } ++ void AddMember(ScDPSaveMember* pMember) { aMembers[pMember->GetName()] = pMember; } + + void SetDupFlag(BOOL bSet) { bDupFlag = bSet; } + BOOL GetDupFlag() const { return bDupFlag; } +Index: sc/source/core/data/dpsave.cxx +=================================================================== +RCS file: /cvs/sc/sc/source/core/data/dpsave.cxx,v +retrieving revision 1.8 +diff -u -w -p -r1.8 dpsave.cxx +--- sc/source/core/data/dpsave.cxx 8 Sep 2005 18:23:28 -0000 1.8 ++++ sc/source/core/data/dpsave.cxx 27 Mar 2006 16:39:41 -0000 +@@ -214,6 +214,11 @@ void ScDPSaveMember::WriteToSource( cons + + // ----------------------------------------------------------------------- + ++size_t ScDPSaveDimension::MemberHashFunc::operator()(const String & member_name) const ++{ ++ return rtl_ustr_hashCode_WithLength( member_name.GetBuffer(), member_name.Len() ); ++} ++ + ScDPSaveDimension::ScDPSaveDimension(const String& rName, BOOL bDataLayout) : + aName( rName ), + bIsDataLayout( bDataLayout ), +@@ -253,11 +258,10 @@ ScDPSaveDimension::ScDPSaveDimension(con + pSubTotalFuncs[nSub] = r.pSubTotalFuncs[nSub]; + } + +- long nCount = r.aMemberList.Count(); +- for (long i=0; i<nCount; i++) ++ for (MemberHash::const_iterator i=r.aMembers.begin(); i != r.aMembers.end() ; i++) + { +- ScDPSaveMember* pNew = new ScDPSaveMember( *(ScDPSaveMember*)r.aMemberList.GetObject(i) ); +- aMemberList.Insert( pNew, LIST_APPEND ); ++ ScDPSaveMember* pNew = new ScDPSaveMember( *i->second ); ++ aMembers[pNew->GetName()] = pNew; + } + if (r.pReferenceValue) + pReferenceValue = new sheet::DataPilotFieldReference( *(r.pReferenceValue) ); +@@ -318,7 +322,7 @@ ScDPSaveDimension::ScDPSaveDimension(SvS + for (i=0; i<nNewCount; i++) + { + ScDPSaveMember* pNew = new ScDPSaveMember( rStream ); +- aMemberList.Insert( pNew, LIST_APPEND ); ++ aMembers[pNew->GetName()] = pNew; + } + pReferenceValue = NULL; + pSortInfo = NULL; +@@ -352,21 +356,16 @@ void ScDPSaveDimension::Store( SvStream& + + rStream << (USHORT) 0; // nExtra + +- long nCount = aMemberList.Count(); ++ long nCount = aMembers.size(); + rStream << nCount; +- for (i=0; i<nCount; i++) +- { +- const ScDPSaveMember* pMember = (const ScDPSaveMember*)aMemberList.GetObject(i); +- pMember->Store( rStream ); +- } ++ for (MemberHash::const_iterator i=aMembers.begin(); i != aMembers.end() ; i++) ++ i->second->Store( rStream ); + } + + ScDPSaveDimension::~ScDPSaveDimension() + { +- long nCount = aMemberList.Count(); +- for (long i=0; i<nCount; i++) +- delete (ScDPSaveMember*)aMemberList.GetObject(i); +- aMemberList.Clear(); ++ for (MemberHash::const_iterator i=aMembers.begin(); i != aMembers.end() ; i++) ++ delete i->second; + delete pReferenceValue; + delete pSortInfo; + delete pAutoShowInfo; +@@ -397,13 +396,13 @@ BOOL ScDPSaveDimension::operator== ( con + if ( pSubTotalFuncs[i] != r.pSubTotalFuncs[i] ) + return FALSE; + +- long nCount = aMemberList.Count(); +- if ( nCount != r.aMemberList.Count() ) ++ if (aMembers.size() != r.aMembers.size() ) + return FALSE; + +- for (i=0; i<nCount; i++) +- if ( !( *(ScDPSaveMember*)aMemberList.GetObject(i) == +- *(ScDPSaveMember*)r.aMemberList.GetObject(i) ) ) ++ MemberHash::const_iterator a=aMembers.begin(); ++ MemberHash::const_iterator b=r.aMembers.begin(); ++ for (; a != aMembers.end() ; ++a, ++b) ++ if (!(*(a->second) == *(b->second))) + return FALSE; + + return TRUE; +@@ -551,26 +550,21 @@ const String& ScDPSaveDimension::GetCurr + + ScDPSaveMember* ScDPSaveDimension::GetExistingMemberByName(const String& rName) + { +- long nCount = aMemberList.Count(); +- for (long i=0; i<nCount; i++) +- { +- ScDPSaveMember* pMember = (ScDPSaveMember*)aMemberList.GetObject(i); +- if ( pMember->GetName() == rName ) +- return pMember; +- } ++ MemberHash::const_iterator res = aMembers.find (rName); ++ if (res != aMembers.end()) ++ return res->second; + return NULL; + } + + + ScDPSaveMember* ScDPSaveDimension::GetMemberByName(const String& rName) + { +- long nCount = aMemberList.Count(); + ScDPSaveMember* pMember = GetExistingMemberByName(rName); + if (pMember) + return pMember; + + ScDPSaveMember* pNew = new ScDPSaveMember( rName ); +- aMemberList.Insert( pNew, LIST_APPEND ); ++ aMembers[rName] = pNew; + return pNew; + } + +@@ -624,10 +618,10 @@ void ScDPSaveDimension::WriteToSource( c + } + } + +- // Level loop outside of aMemberList loop ++ // Level loop outside of aMembers loop + // because SubTotals have to be set independently of known members + +- long nCount = aMemberList.Count(); ++ long nCount = aMembers.size(); + + long nHierCount = 0; + uno::Reference<container::XIndexAccess> xHiers; +@@ -725,15 +719,14 @@ void ScDPSaveDimension::WriteToSource( c + uno::Reference<container::XNameAccess> xMembers = xMembSupp->getMembers(); + if ( xMembers.is() ) + { +- for (long i=0; i<nCount; i++) ++ for (MemberHash::const_iterator i=aMembers.begin(); i != aMembers.end() ; i++) + { +- ScDPSaveMember* pMember = (ScDPSaveMember*)aMemberList.GetObject(i); +- rtl::OUString aName = pMember->GetName(); ++ rtl::OUString aName = i->second->GetName(); + if ( xMembers->hasByName( aName ) ) + { + uno::Reference<uno::XInterface> xMemberInt = ScUnoHelpFunctions::AnyToInterface( + xMembers->getByName( aName ) ); +- pMember->WriteToSource( xMemberInt ); ++ i->second->WriteToSource( xMemberInt ); + } + // missing member is no error + } +Index: sc/source/filter/excel/xepivot.cxx +=================================================================== +RCS file: /cvs/sc/sc/source/filter/excel/xepivot.cxx,v +retrieving revision 1.11 +diff -u -w -p -r1.11 xepivot.cxx +--- sc/source/filter/excel/xepivot.cxx 8 Sep 2005 19:01:27 -0000 1.11 ++++ sc/source/filter/excel/xepivot.cxx 27 Mar 2006 16:39:43 -0000 +@@ -1126,16 +1126,10 @@ void XclExpPTField::SetPropertiesFromDim + } + + // item properties +- const List& rMemList = rSaveDim.GetMembers(); +- for( ULONG nMemIdx = 0, nMemCount = rMemList.Count(); nMemIdx < nMemCount; ++nMemIdx ) +- { +- if( const ScDPSaveMember* pSaveMem = static_cast< const ScDPSaveMember* >( rMemList.GetObject( nMemIdx ) ) ) +- { +- +- if( XclExpPTItem* pItem = GetItemAcc( pSaveMem->GetName() ) ) +- pItem->SetPropertiesFromMember( *pSaveMem ); +- } +- } ++ const ScDPSaveDimension::MemberHash &rMembers = rSaveDim.GetMembers(); ++ for (ScDPSaveDimension::MemberHash::const_iterator i=rMembers.begin(); i != rMembers.end() ; i++) ++ if( XclExpPTItem* pItem = GetItemAcc( i->second->GetName() ) ) ++ pItem->SetPropertiesFromMember( *(i->second) ); + } + + void XclExpPTField::SetDataPropertiesFromDim( const ScDPSaveDimension& rSaveDim ) +Index: sc/source/filter/xml/XMLExportDataPilot.cxx +=================================================================== +RCS file: /cvs/sc/sc/source/filter/xml/XMLExportDataPilot.cxx,v +retrieving revision 1.22 +diff -u -w -p -r1.22 XMLExportDataPilot.cxx +--- sc/source/filter/xml/XMLExportDataPilot.cxx 8 Sep 2005 19:54:20 -0000 1.22 ++++ sc/source/filter/xml/XMLExportDataPilot.cxx 27 Mar 2006 16:39:44 -0000 +@@ -544,19 +544,18 @@ void ScXMLExportDataPilot::WriteSubTotal + + void ScXMLExportDataPilot::WriteMembers(ScDPSaveDimension* pDim) + { +- List aMembers = pDim->GetMembers(); +- sal_Int32 nMemberCount = aMembers.Count(); +- if (nMemberCount > 0) ++ const ScDPSaveDimension::MemberHash &rMembers = pDim->GetMembers(); ++ if (rMembers.size() > 0) + { + SvXMLElementExport aElemDPMs(rExport, XML_NAMESPACE_TABLE, XML_DATA_PILOT_MEMBERS, sal_True, sal_True); + rExport.CheckAttrList(); +- for (sal_Int32 nMember = 0; nMember < nMemberCount; nMember++) ++ for (ScDPSaveDimension::MemberHash::const_iterator i=rMembers.begin(); i != rMembers.end() ; i++) + { +- rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_NAME, rtl::OUString(((ScDPSaveMember*)aMembers.GetObject(nMember))->GetName())); ++ rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_NAME, rtl::OUString(i->second->GetName())); + rtl::OUStringBuffer sBuffer; +- SvXMLUnitConverter::convertBool(sBuffer, ((ScDPSaveMember*)aMembers.GetObject(nMember))->GetIsVisible()); ++ SvXMLUnitConverter::convertBool(sBuffer, i->second->GetIsVisible()); + rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_DISPLAY, sBuffer.makeStringAndClear()); +- SvXMLUnitConverter::convertBool(sBuffer, ((ScDPSaveMember*)aMembers.GetObject(nMember))->GetShowDetails()); ++ SvXMLUnitConverter::convertBool(sBuffer, i->second->GetShowDetails()); + rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_SHOW_DETAILS, sBuffer.makeStringAndClear()); + SvXMLElementExport aElemDPM(rExport, XML_NAMESPACE_TABLE, XML_DATA_PILOT_MEMBER, sal_True, sal_True); + rExport.CheckAttrList(); diff --git a/patches/src680/sdk-filenames-with-dollar.diff b/patches/src680/sdk-filenames-with-dollar.diff new file mode 100644 index 000000000..5a6d9ea50 --- /dev/null +++ b/patches/src680/sdk-filenames-with-dollar.diff @@ -0,0 +1,15 @@ +--- solenv/bin/modules/installer/worker.pm.old 2006-02-06 11:52:50.000000000 +0100 ++++ solenv/bin/modules/installer/worker.pm 2006-04-25 19:57:02.000000000 +0200 +@@ -711,6 +711,12 @@ + my $destination = $onefile->{'destination'}; + my $sourcepath = $onefile->{'sourcepath'}; + ++ # This is necessary to install SDK that includes files with $ in its name ++ # Otherwise, the following shell commands does not work and the file list ++ # is not correct ++ $destination =~ s/\$\$/\$/; ++ $sourcepath =~ s/\$\$/\$/; ++ + # printf "mv $sourcepath $destdir$destination\n"; + `cp -af '$sourcepath' '$destdir$destination'`; + `chmod $unixrights '$destdir$destination'`; diff --git a/patches/src680/sensible-browser.diff b/patches/src680/sensible-browser.diff index 7aa33f7db..2e6cc957c 100644 --- a/patches/src680/sensible-browser.diff +++ b/patches/src680/sensible-browser.diff @@ -31,10 +31,10 @@ diff -u -u -r1.2 kde-open-url.sh # special handling for mailto: uris if echo $1 | grep '^mailto:' > /dev/null; then - kmailservice $1 & -+ sensible-ooomua $1 ++ sensible-ooomua $1 & else - kfmclient openURL $1 & -+ sensible-browser $1 ++ sensible-browser $1 & fi exit 0 diff --git a/patches/src680/sfx2-fallback-to-en-help.diff b/patches/src680/sfx2-fallback-to-en-help.diff new file mode 100644 index 000000000..2a47acad0 --- /dev/null +++ b/patches/src680/sfx2-fallback-to-en-help.diff @@ -0,0 +1,124 @@ +diff -u -r1.68 sfxhelp.cxx +--- sfx2/source/appl/sfxhelp.cxx 7 Feb 2006 10:29:33 -0000 1.68 ++++ sfx2/source/appl/sfxhelp.cxx 28 Mar 2006 13:12:14 -0000 +@@ -99,6 +99,9 @@ + #ifndef _URLOBJ_HXX + #include <tools/urlobj.hxx> + #endif ++#ifndef _ISOLANG_HXX ++#include <tools/isolang.hxx> ++#endif + #ifndef _UTL_CONFIGMGR_HXX_ + #include <unotools/configmgr.hxx> + #endif +@@ -109,6 +112,11 @@ + #include <svtools/pathoptions.hxx> + #include <rtl/ustring.hxx> + #include <osl/process.h> ++#include <osl/file.hxx> ++#ifndef _UTL_BOOTSTRAP_HXX ++#include <unotools/bootstrap.hxx> ++#endif ++ + #include <rtl/uri.hxx> + #include <vcl/msgbox.hxx> + #include <svtools/ehdl.hxx> +@@ -165,16 +173,53 @@ + + #define STARTERLIST 0 + ++rtl::OUString HelpLocaleString() ++{ ++ static rtl::OUString aLocaleStr; ++ if (!aLocaleStr.getLength()) ++ { ++ // detect installed locale ++ Any aLocale = ++ ::utl::ConfigManager::GetConfigManager()->GetDirectConfigProperty( ++ ::utl::ConfigManager::LOCALE ); ++ bool bOk = (aLocale >>= aLocaleStr); ++ if ( bOk ) ++ { ++ rtl::OUString aBaseInstallPath; ++ utl::Bootstrap::PathStatus aBaseLocateResult = ++ utl::Bootstrap::locateBaseInstallation(aBaseInstallPath); ++ static const char *szHelpPath = "/help/"; ++ ++ rtl::OUString sHelpPath = aBaseInstallPath + ++ rtl::OUString::createFromAscii(szHelpPath) + aLocaleStr; ++ osl::DirectoryItem aDirItem; ++ ++ if (!osl::DirectoryItem::get(sHelpPath, aDirItem) == osl::FileBase::E_None) ++ { ++ bOk = false; ++ String sLang(aLocaleStr); ++ xub_StrLen nSepPos = sLang.Search( '-' ); ++ if (nSepPos != STRING_NOTFOUND) ++ { ++ bOk = true; ++ sLang = sLang.Copy( 0, nSepPos ); ++ sHelpPath = aBaseInstallPath + ++ rtl::OUString::createFromAscii(szHelpPath) + sLang; ++ if (!osl::DirectoryItem::get(sHelpPath, aDirItem) == osl::FileBase::E_None) ++ bOk = false; ++ } ++ } ++ } ++ if (!bOk) ++ aLocaleStr = rtl::OUString( DEFINE_CONST_UNICODE("en") ); ++ } ++ return aLocaleStr; ++} ++ ++ + void AppendConfigToken_Impl( String& rURL, sal_Bool bQuestionMark ) + { +- // this completes a help url with the system parameters "Language" and "System" +- // detect installed locale +- Any aLocale = +- ::utl::ConfigManager::GetConfigManager()->GetDirectConfigProperty( ::utl::ConfigManager::LOCALE ); +- ::rtl::OUString aLocaleStr; +- if ( !( aLocale >>= aLocaleStr ) ) +- // fallback is english +- aLocaleStr = ::rtl::OUString( DEFINE_CONST_UNICODE("en") ); ++ ::rtl::OUString aLocaleStr(HelpLocaleString()); + + // query part exists? + if ( bQuestionMark ) +@@ -189,6 +234,7 @@ + rURL += String( aLocaleStr ); + rURL += DEFINE_CONST_UNICODE("&System="); + rURL += SvtHelpOptions().GetSystem(); ++ + } + + // ----------------------------------------------------------------------- +@@ -426,11 +472,8 @@ + + pImp = new SfxHelp_Impl( bIsDebug ); + +- Any aLocale = +- ::utl::ConfigManager::GetConfigManager()->GetDirectConfigProperty( ::utl::ConfigManager::LOCALE ); +- ::rtl::OUString aLocaleStr; +- if ( !( aLocale >>= aLocaleStr ) ) +- aLocaleStr = ::rtl::OUString( DEFINE_CONST_UNICODE("en") ); ++ ::rtl::OUString aLocaleStr = HelpLocaleString(); ++ + sal_Int32 nSepPos = aLocaleStr.indexOf( '_' ); + if ( nSepPos != -1 ) + { +--- xmlhelp/source/treeview/tvread.cxx 23 Mar 2005 13:04:52 -0000 1.16 ++++ xmlhelp/source/treeview/tvread.cxx 24 Oct 2005 11:15:48 -0000 +@@ -701,7 +701,11 @@ ConfigData TVChildTarget::init( const Re + osl::FileBase::E_None == osl::DirectoryItem::get( url + locale.copy( 0,idx ), + aDirItem ) ) + ret = locale.copy( 0,idx ); +- ++ else ++ { ++ locale = rtl::OUString::createFromAscii( "en-US" ); ++ ret = rtl::OUString::createFromAscii("en"); ++ } + url = url + ret; + + // first of all, try do determine whether there are any *.tree files present diff --git a/patches/src680/speed-local-link.diff b/patches/src680/speed-local-link.diff new file mode 100644 index 000000000..690e1c84a --- /dev/null +++ b/patches/src680/speed-local-link.diff @@ -0,0 +1,142 @@ +Index: cppuhelper/source/shlib.cxx +=================================================================== +RCS file: /cvs/udk/cppuhelper/source/shlib.cxx,v +retrieving revision 1.22 +diff -u -p -u -r1.22 shlib.cxx +--- cppuhelper/source/shlib.cxx 8 Sep 2005 09:29:11 -0000 1.22 ++++ cppuhelper/source/shlib.cxx 3 Apr 2006 09:50:34 -0000 +@@ -272,6 +272,114 @@ static OUString makeComponentPath( + return out; + } + ++#ifdef LINUX ++static bool ++lcl_isWellKnownInternal(const OString &rLibName) ++{ ++ // These are loaded at startup ... ++ static const char *pLookup[] = { ++ "behelper.uno.so", ++ "configmgr2.uno.so", ++ "fsstorage.uno.so", ++ "gconfbe1.uno.so", ++ "i18npool.uno.so", ++ "introspection.uno.so", ++ "libanimcore.so", ++ "libevtatt.so", ++ "libfileacc.so", ++ "libgcc3_uno.so", ++ "liblocaledata_en.so", ++ "liblocaledata_es.so", ++ "liblocaledata_euro.so", ++ "liblocaledata_others.so", ++ "libmcnttype.so", ++ "libpackage2.so", ++ "libreg.so.3", ++ "libsrtrs1.so", ++ "libucb1.so", ++ "libucpfile1.so", ++ "libxstor.so", ++ "localebe1.uno.so", ++ "implreg.uno.so", ++ "nestedreg.uno.so", ++ "regtypeprov.uno.so", ++ "security.uno.so", ++ "servicemgr.uno.so", ++ "shlibloader.uno.so", ++ "simplereg.uno.so", ++ "typemgr.uno.so", ++ "reflection.uno.so", ++ "sax.uno.so", ++ "streams.uno.so", ++ "sysmgr1.uno.so", ++ "typeconverter.uno.so", ++ "ucpgvfs1.uno.so", ++ "uriproc.uno.so", ++ NULL ++ }; ++ ++ // Perhaps do some cunning binary search ? ++ for (int i = 0; pLookup[i] != NULL; i++) ++ if (!rLibName.match (pLookup[i])) ++ return true; ++ ++ return false; ++} ++ ++// bootstrap.cxx ++OUString const & get_this_libpath(); ++ ++// Amusing hack to get 40% win on linking / startup speedup: ++// Rational: we load all of OO.o's exception symbols in a signal, global ++// shlib once first of all (RTLD_GLOBAL). This allows us to load all ++// subsequent components RTLD_LOCAL, their vague linkage symbols will ++// resolve in the global scope. ++static bool ++lcl_isInternalLibrary(OUString const & rLibName, OUString const & rPath) ++{ ++ if (getenv ("OOO_DISABLE_INTERNAL")) ++ return false; ++ ++ bool bIsInternal = false; ++ ++ // Is this an internal library ? ++ if (rPath.getLength() > 0 && rPath != get_this_libpath()) ++ { ++ // fprintf (stderr, "Lib path '%s' - not internal!\n", ++ // (const sal_Char *)rtl::OUStringToOString(rPath, RTL_TEXTENCODING_ASCII_US)); ++ return false; ++ } ++ ++ sal_Int32 nUpd = SUPD; ++ OUString aIntSuffix = OUString::valueOf(nUpd) + OUSTR("li.so"); ++ if (rLibName.match (aIntSuffix)) ++ bIsInternal = true; ++ ++ if (!bIsInternal) ++ bIsInternal = lcl_isWellKnownInternal( ++ OUStringToOString(rLibName, RTL_TEXTENCODING_UTF8)); ++ ++ // If internal - load the exception type library RTLD_GLOBAL first ++ static bool bHaveLoadedExcepts = false; ++ if (bIsInternal && !bHaveLoadedExcepts) ++ { ++ rtl::OUString aExceptName = rtl::OUString::createFromAscii("libexlink") + aIntSuffix; ++ oslModule nExceptLib = osl_loadModule(aExceptName.pData, ++ SAL_LOADMODULE_LAZY | SAL_LOADMODULE_GLOBAL); ++ if (nExceptLib != NULL) ++ bHaveLoadedExcepts = true; ++ else ++ bIsInternal = false; ++ } ++ ++// fprintf (stderr, "Lib name '%s' %d %d\n", ++// (const sal_Char *)rtl::OUStringToOString(rLibName, RTL_TEXTENCODING_ASCII_US), ++// bIsInternal, bHaveLoadedExcepts); ++ ++ return bIsInternal; ++} ++#endif ++ + //============================================================================== + Reference< XInterface > SAL_CALL loadSharedLibComponentFactory( + OUString const & rLibName, OUString const & rPath, +@@ -288,9 +396,17 @@ Reference< XInterface > SAL_CALL loadSha + aModulePath, + Reference< XInterface >() ); + } ++ ++ sal_Int32 nFlags = SAL_LOADMODULE_LAZY; ++#ifdef LINUX ++ if (!lcl_isInternalLibrary (rLibName, rPath)) ++ nFlags |= SAL_LOADMODULE_GLOBAL; ++// else - faster local only binding ++#else ++ nFlags |= SAL_LOADMODULE_GLOBAL; ++#endif + +- oslModule lib = osl_loadModule( +- aModulePath.pData, SAL_LOADMODULE_LAZY | SAL_LOADMODULE_GLOBAL ); ++ oslModule lib = osl_loadModule(aModulePath.pData, nFlags); + if (! lib) + { + throw loader::CannotActivateFactoryException( diff --git a/patches/src680/speed-quickstart-i18n.diff b/patches/src680/speed-quickstart-i18n.diff new file mode 100644 index 000000000..489906c14 --- /dev/null +++ b/patches/src680/speed-quickstart-i18n.diff @@ -0,0 +1,97 @@ +Index: svx/source/dialog/optmemory.cxx +=================================================================== +RCS file: /cvs/graphics/svx/source/dialog/optmemory.cxx,v +retrieving revision 1.8 +diff -u -p -u -r1.8 optmemory.cxx +--- svx/source/dialog/optmemory.cxx 8 Sep 2005 21:47:15 -0000 1.8 ++++ svx/source/dialog/optmemory.cxx 4 May 2006 10:48:18 -0000 +@@ -233,6 +233,9 @@ OfaMemoryOptionsPage::OfaMemoryOptionsPa + aQuickLaunchFL.Hide(); + aQuickLaunchCB.Hide(); + #endif ++#if defined(UNX) ++ aQuickLaunchCB.SetText( ResId( STR_QUICKLAUNCH_UNX ) ); ++#endif + + aTfGraphicObjectTime.SetExtFormat( EXTTIMEF_24H_SHORT ); + + +Index: svx/source/dialog/optmemory.hrc +=================================================================== +RCS file: /cvs/graphics/svx/source/dialog/optmemory.hrc,v +retrieving revision 1.4 +diff -u -p -u -r1.4 optmemory.hrc +--- svx/source/dialog/optmemory.hrc 8 Sep 2005 21:47:30 -0000 1.4 ++++ svx/source/dialog/optmemory.hrc 4 May 2006 10:48:18 -0000 +@@ -35,6 +35,7 @@ + #ifndef _OFA_OPTMEMORY_HRC + #define _OFA_OPTMEMORY_HRC + ++#include <dialogs.hrc> + #include <svtools/controldims.hrc> + + // defines for positions and sizes --------------------------------------- +@@ -88,6 +89,10 @@ + #define NF_OLECACHE 25 + #define FL_QUICKLAUNCH 26 + #define CB_QUICKLAUNCH 27 ++#define CB_QUICKLAUNCH_UNX 28 ++ ++// Yes - this is evil - but I'm not touching dialogs.hrc ++#define STR_QUICKLAUNCH_UNX (RID_SVX_CONTOUR_START + 8) + + #endif // #ifndef _OFA_OPTMEMORY_HRC + + +Index: svx/source/dialog/optmemory.src +=================================================================== +RCS file: /cvs/graphics/svx/source/dialog/optmemory.src,v +retrieving revision 1.6 +diff -u -p -u -r1.6 optmemory.src +--- svx/source/dialog/optmemory.src 23 Sep 2005 13:45:16 -0000 1.6 ++++ svx/source/dialog/optmemory.src 4 May 2006 10:48:18 -0000 +@@ -222,31 +222,16 @@ TabPage OFA_TP_MEMORY + }; + }; + +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- ++String STR_QUICKLAUNCH_UNX ++{ ++ Text[ en-US ] = "enable systray quickstarter"; ++ Text[ de ] = "Schnellstart des Systemabschnitts der Kontrollleiste aktivieren"; ++ Text[ es ] = "habilitar Quickstarter en bandeja del sistema"; ++ Text[ fr ] = "activer systray quickstarter"; ++ Text[ it ] = "Abilita quickstarter systray"; ++ Text[ ja ] = "systray quickstarterã®æœ‰åŠ¹åŒ–"; ++ Text[ pt-BR ] = "habilitar quickstarter de systray"; ++ Text[ zh-CN ] = "å¯ç”¨ç³»ç»Ÿç›˜å¿«é€Ÿå¯åŠ¨ç¨‹åº"; ++ Text[ zh-TW ] = "啟用 systray quickstarter"; ++ Text [ x-comment ] = " "; ++}; diff --git a/patches/src680/styles-dash.diff b/patches/src680/styles-dash.diff new file mode 100644 index 000000000..c51ca9999 --- /dev/null +++ b/patches/src680/styles-dash.diff @@ -0,0 +1,273 @@ +Index: xmloff/source/draw/ximpstyl.cxx +=================================================================== +RCS file: /cvs/xml/xmloff/source/draw/ximpstyl.cxx,v +retrieving revision 1.46 +retrieving revision 1.46.100.1 +diff -u -p -r1.46 -r1.46.100.1 +--- xmloff/source/draw/ximpstyl.cxx 9 Sep 2005 14:02:13 -0000 1.46 ++++ xmloff/source/draw/ximpstyl.cxx 3 Apr 2006 12:24:56 -0000 1.46.100.1 +@@ -208,8 +208,7 @@ SvXMLImportContext *SdXMLDrawingPageProp + + if( (nPrefix == XML_NAMESPACE_XLINK) && IsXMLToken( aLocalName, XML_HREF ) ) + { +- uno::Any aAny; +- aAny <<= GetImport().GetAbsoluteReference( xAttrList->getValueByIndex(i) ); ++ uno::Any aAny( GetImport().GetAbsoluteReference( xAttrList->getValueByIndex(i) ) ); + XMLPropertyState aPropState( rProp.mnIndex, aAny ); + rProperties.push_back( aPropState ); + } +@@ -392,10 +391,7 @@ void SdXMLDrawingPageStyleContext::FillP + xInfo = rPropSet->getPropertySetInfo(); + if ( xInfo->hasPropertyByName( rPropertyName ) ) + { +- Any aAny; +- aAny <<= sStyleName; +- +- rPropSet->setPropertyValue( rPropertyName, aAny ); ++ rPropSet->setPropertyValue( rPropertyName, Any( sStyleName ) ); + } + } + } +@@ -1336,10 +1332,7 @@ void SdXMLStylesContext::SetMasterPageSt + + if(GetSdImport().GetLocalDocStyleFamilies().is() && GetSdImport().GetLocalDocStyleFamilies()->hasByName(rMaster.GetDisplayName())) + { +- uno::Any aAny(GetSdImport().GetLocalDocStyleFamilies()->getByName(rMaster.GetDisplayName())); +- uno::Reference< container::XNameAccess > xMasterPageStyles; +- aAny >>= xMasterPageStyles; +- ++ uno::Reference< container::XNameAccess > xMasterPageStyles( GetSdImport().GetLocalDocStyleFamilies()->getByName(rMaster.GetDisplayName()), UNO_QUERY ); + if(xMasterPageStyles.is()) + { + ImpSetGraphicStyles(xMasterPageStyles, XML_STYLE_FAMILY_SD_PRESENTATION_ID, sPrefix); +@@ -1385,7 +1378,6 @@ void SdXMLStylesContext::ImpSetGraphicSt + const UniString& rPrefix) const + { + xub_StrLen nPrefLen(rPrefix.Len()); +- uno::Any aAny; + + sal_uInt32 a; + +@@ -1408,88 +1400,85 @@ void SdXMLStylesContext::ImpSetGraphicSt + const SvXMLStyleContext* pStyle = GetStyle(a); + if(nFamily == pStyle->GetFamily() && !pStyle->IsDefaultStyle()) + { +- const UniString aStyleName(pStyle->GetDisplayName(), (sal_uInt16)pStyle->GetDisplayName().getLength()); +- sal_uInt16 nStylePrefLen = aStyleName.SearchBackward( sal_Unicode('-') ) + 1; +- +- if(!nPrefLen || ((nPrefLen == nStylePrefLen) && aStyleName.Equals(rPrefix, 0, nPrefLen))) ++ OUString aStyleName(pStyle->GetDisplayName()); ++ if( nPrefLen ) + { +- uno::Reference< style::XStyle > xStyle; +- const OUString aPureStyleName = nStylePrefLen ? +- pStyle->GetDisplayName().copy((sal_Int32)nStylePrefLen) : pStyle->GetDisplayName(); +- +- if(xPageStyles->hasByName(aPureStyleName)) +- { +- aAny = xPageStyles->getByName(aPureStyleName); +- aAny >>= xStyle; ++ sal_Int32 nStylePrefLen = aStyleName.lastIndexOf( sal_Unicode('-') ) + 1; ++ if( (nPrefLen != nStylePrefLen) || (aStyleName.compareTo( rPrefix, nPrefLen ) != 0) ) ++ continue; + +- // set properties of existing styles to default +- uno::Reference< beans::XPropertySet > xPropSet( xStyle, uno::UNO_QUERY ); +- uno::Reference< beans::XPropertySetInfo > xPropSetInfo; +- if( xPropSet.is() ) +- xPropSetInfo = xPropSet->getPropertySetInfo(); ++ aStyleName = aStyleName.copy( nPrefLen ); ++ } + +- uno::Reference< beans::XPropertyState > xPropState( xStyle, uno::UNO_QUERY ); ++ uno::Reference< style::XStyle > xStyle; ++ if(xPageStyles->hasByName(aStyleName)) ++ { ++ xPageStyles->getByName(aStyleName) >>= xStyle; + +- if( xPropState.is() ) ++ // set properties of existing styles to default ++ uno::Reference< beans::XPropertySet > xPropSet( xStyle, uno::UNO_QUERY ); ++ uno::Reference< beans::XPropertySetInfo > xPropSetInfo; ++ if( xPropSet.is() ) ++ xPropSetInfo = xPropSet->getPropertySetInfo(); ++ ++ uno::Reference< beans::XPropertyState > xPropState( xStyle, uno::UNO_QUERY ); ++ ++ if( xPropState.is() ) ++ { ++ UniReference < XMLPropertySetMapper > xPrMap; ++ UniReference < SvXMLImportPropertyMapper > xImpPrMap = GetImportPropertyMapper( nFamily ); ++ DBG_ASSERT( xImpPrMap.is(), "There is the import prop mapper" ); ++ if( xImpPrMap.is() ) ++ xPrMap = xImpPrMap->getPropertySetMapper(); ++ if( xPrMap.is() ) + { +- UniReference < XMLPropertySetMapper > xPrMap; +- UniReference < SvXMLImportPropertyMapper > xImpPrMap = GetImportPropertyMapper( nFamily ); +- DBG_ASSERT( xImpPrMap.is(), "There is the import prop mapper" ); +- if( xImpPrMap.is() ) +- xPrMap = xImpPrMap->getPropertySetMapper(); +- if( xPrMap.is() ) ++ const sal_Int32 nCount = xPrMap->GetEntryCount(); ++ for( sal_Int32 i = 0; i < nCount; i++ ) + { +- const sal_Int32 nCount = xPrMap->GetEntryCount(); +- for( sal_Int32 i = 0; i < nCount; i++ ) ++ const OUString& rName = xPrMap->GetEntryAPIName( i ); ++ if( xPropSetInfo->hasPropertyByName( rName ) && beans::PropertyState_DIRECT_VALUE == xPropState->getPropertyState( rName ) ) + { +- const OUString& rName = xPrMap->GetEntryAPIName( i ); +- if( xPropSetInfo->hasPropertyByName( rName ) && beans::PropertyState_DIRECT_VALUE == xPropState->getPropertyState( rName ) ) +- { +- xPropState->setPropertyToDefault( rName ); +- } ++ xPropState->setPropertyToDefault( rName ); + } + } + } + } +- else +- { +- // graphics style does not exist, create and add it +- uno::Reference< lang::XMultiServiceFactory > xServiceFact(GetSdImport().GetModel(), uno::UNO_QUERY); +- if(xServiceFact.is()) +- { +- uno::Reference< style::XStyle > xNewStyle( +- xServiceFact->createInstance( +- OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.style.Style"))), +- uno::UNO_QUERY); ++ } ++ else ++ { ++ // graphics style does not exist, create and add it ++ uno::Reference< lang::XMultiServiceFactory > xServiceFact(GetSdImport().GetModel(), uno::UNO_QUERY); ++ if(xServiceFact.is()) ++ { ++ uno::Reference< style::XStyle > xNewStyle( ++ xServiceFact->createInstance( ++ OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.style.Style"))), ++ uno::UNO_QUERY); + +- if(xNewStyle.is()) +- { +- // remember style +- xStyle = xNewStyle; ++ if(xNewStyle.is()) ++ { ++ // remember style ++ xStyle = xNewStyle; + +- // add new style to graphics style pool +- uno::Reference< container::XNameContainer > xInsertContainer(xPageStyles, uno::UNO_QUERY); +- if(xInsertContainer.is()) +- { +- aAny <<= xStyle; +- xInsertContainer->insertByName(aPureStyleName, aAny); +- } +- } ++ // add new style to graphics style pool ++ uno::Reference< container::XNameContainer > xInsertContainer(xPageStyles, uno::UNO_QUERY); ++ if(xInsertContainer.is()) ++ xInsertContainer->insertByName(aStyleName, uno::Any( xStyle ) ); + } + } ++ } + +- if(xStyle.is()) +- { +- // set properties at style +- XMLShapeStyleContext* pPropStyle = +- (pStyle->ISA(XMLShapeStyleContext)) ? (XMLShapeStyleContext*)pStyle : 0L; +- uno::Reference< beans::XPropertySet > xPropSet(xStyle, uno::UNO_QUERY); ++ if(xStyle.is()) ++ { ++ // set properties at style ++ XMLShapeStyleContext* pPropStyle = ++ (pStyle->ISA(XMLShapeStyleContext)) ? (XMLShapeStyleContext*)pStyle : 0L; ++ uno::Reference< beans::XPropertySet > xPropSet(xStyle, uno::UNO_QUERY); + +- if(xPropSet.is() && pPropStyle) +- { +- pPropStyle->FillPropertySet(xPropSet); +- pPropStyle->SetStyle(xStyle); +- } ++ if(xPropSet.is() && pPropStyle) ++ { ++ pPropStyle->FillPropertySet(xPropSet); ++ pPropStyle->SetStyle(xStyle); + } + } + } +@@ -1507,35 +1496,40 @@ void SdXMLStylesContext::ImpSetGraphicSt + { + const SvXMLStyleContext* pStyle = GetStyle(a); + +- if(pStyle && nFamily == pStyle->GetFamily()) ++ if(pStyle && pStyle->GetName().getLength() && (nFamily == pStyle->GetFamily())) try + { +- const UniString aStyleName(pStyle->GetDisplayName(), (sal_uInt16)pStyle->GetDisplayName().getLength()); +- sal_uInt16 nStylePrefLen = aStyleName.SearchBackward( sal_Unicode('-') ) + 1; +- +- if(pStyle->GetName().getLength() && (!nPrefLen || ((nPrefLen == nStylePrefLen) && aStyleName.Equals(rPrefix, 0, nPrefLen)))) ++ OUString aStyleName(pStyle->GetDisplayName()); ++ if( nPrefLen ) + { +- try +- { ++ sal_Int32 nStylePrefLen = aStyleName.lastIndexOf( sal_Unicode('-') ) + 1; ++ if( (nPrefLen != nStylePrefLen) || (aStyleName.compareTo( rPrefix, nPrefLen ) != 0) ) ++ continue; + +- uno::Reference< style::XStyle > xStyle; +- const OUString aPureStyleName = nPrefLen ? pStyle->GetDisplayName().copy((sal_Int32)nPrefLen) : pStyle->GetDisplayName(); +- xPageStyles->getByName(aPureStyleName) >>= xStyle; ++ aStyleName = aStyleName.copy( nPrefLen ); ++ } + +- if(xStyle.is()) +- { +- // set parent style name +- ::rtl::OUString sParentStyleDisplayName = const_cast< SvXMLImport& >( GetImport() ).GetStyleDisplayName( pStyle->GetFamily(), pStyle->GetParentName() ); +- xStyle->setParentStyle( sParentStyleDisplayName ); +- } +- } +- catch( Exception& e ) ++ uno::Reference< style::XStyle > xStyle( xPageStyles->getByName(aStyleName), UNO_QUERY ); ++ if(xStyle.is()) ++ { ++ // set parent style name ++ ::rtl::OUString sParentStyleDisplayName( const_cast< SvXMLImport& >( GetImport() ).GetStyleDisplayName( pStyle->GetFamily(), pStyle->GetParentName() ) ); ++ if( nPrefLen ) + { +- (void)e; +- uno::Sequence<OUString> aSeq(0); +- const_cast<SdXMLImport*>(&GetSdImport())->SetError( XMLERROR_FLAG_WARNING | XMLERROR_API, aSeq, e.Message, NULL ); ++ sal_Int32 nStylePrefLen = sParentStyleDisplayName.lastIndexOf( sal_Unicode('-') ) + 1; ++ if( (nPrefLen != nStylePrefLen) || (sParentStyleDisplayName.compareTo( rPrefix, nPrefLen ) != 0) ) ++ continue; ++ ++ sParentStyleDisplayName = sParentStyleDisplayName.copy( nPrefLen ); + } ++ xStyle->setParentStyle( sParentStyleDisplayName ); + } + } ++ catch( Exception& e ) ++ { ++ (void)e; ++ uno::Sequence<OUString> aSeq(0); ++ const_cast<SdXMLImport*>(&GetSdImport())->SetError( XMLERROR_FLAG_WARNING | XMLERROR_API, aSeq, e.Message, NULL ); ++ } + } + } + +@@ -1603,8 +1597,7 @@ SvXMLImportContext* SdXMLMasterStylesCon + else + { + // existing page, use it +- uno::Any aAny(xMasterPages->getByIndex(GetSdImport().GetNewMasterPageCount())); +- aAny >>= xNewMasterPage; ++ xMasterPages->getByIndex(GetSdImport().GetNewMasterPageCount()) >>= xNewMasterPage; + } + + // increment global import page counter diff --git a/patches/src680/svx-vbaimport-basic-hang.diff b/patches/src680/svx-vbaimport-basic-hang.diff new file mode 100644 index 000000000..3ec3995ca --- /dev/null +++ b/patches/src680/svx-vbaimport-basic-hang.diff @@ -0,0 +1,25 @@ +Index: svx/source/msfilter/svxmsbas.cxx +=================================================================== +RCS file: /cvs/graphics/svx/source/msfilter/svxmsbas.cxx,v +retrieving revision 1.15 +diff -u -p -r1.15 svxmsbas.cxx +--- svx/source/msfilter/svxmsbas.cxx 3 Feb 2006 18:30:38 -0000 1.15 ++++ svx/source/msfilter/svxmsbas.cxx 29 Mar 2006 14:34:21 -0000 +@@ -375,10 +379,16 @@ BOOL SvxImportMSVBasic::ImportCode_Impl( + const char cLineEnd = bMac ? '\x0D' : '\x0A'; + const String sAttribute(String::CreateFromAscii( + bAsComment ? "Rem Attribute" : "Attribute")); +- while (STRING_NOTFOUND != (nBegin = pStr->Search(sAttribute))) ++ nBegin = 0; ++ while (STRING_NOTFOUND != (nBegin = pStr->Search(sAttribute, nBegin))) + { + if ((nBegin) && pStr->GetChar(nBegin-1) != cLineEnd) ++ { ++ // Need to skip instances of Attribute ++ // that are NOT Attribute statements ++ nBegin += sAttribute.Len(); + continue; ++ } + xub_StrLen nEnd = pStr->Search(cLineEnd ,nBegin); + // DR #i26521# catch STRING_NOTFOUND, will loop endless otherwise + if( nEnd == STRING_NOTFOUND ) diff --git a/patches/src680/system-neon-0.26.diff b/patches/src680/system-neon-0.26.diff new file mode 100644 index 000000000..ac2c72fb7 --- /dev/null +++ b/patches/src680/system-neon-0.26.diff @@ -0,0 +1,278 @@ +--- config_office/configure.in.orig 2006-04-26 22:44:35.000000000 +0200 ++++ config_office/configure.in 2006-04-26 23:04:34.000000000 +0200 +@@ -3723,7 +3723,8 @@ + test "$with_system_neon" != "no"; then + AC_MSG_RESULT([external]) + PKG_CHECK_MODULES(NEON, neon >= 0.24.0) +- PKG_CHECK_MODULES(NEON, neon < 0.26.0, , AC_MSG_ERROR([you need neon 0.24.x or 0.25.x for system-neon])) ++ PKG_CHECK_MODULES(NEON, neon < 0.27.0, , AC_MSG_ERROR([you need neon 0.24.x to 0.26.x for system-neon])) ++ NEON_VERSION="`$PKG_CONFIG --modversion neon | $SED 's/\.//g'`" + NEON_CFLAGS="$NEON_CFLAGS -DSYSTEM_NEON -DUSE_DAV_LOCKS=1" + SYSTEM_NEON=YES + else +@@ -3731,9 +3732,11 @@ + SYSTEM_NEON=NO + NEON_LIBS=-lneon + NEON_CFLAGS= ++ NEON_VERSION=0247 + BUILD_TYPE="$BUILD_TYPE NEON" + fi + AC_SUBST(SYSTEM_NEON) ++AC_SUBST(NEON_VERSION) + AC_SUBST(NEON_LIBS) + AC_SUBST(NEON_CFLAGS) + fi +--- config_office/set_soenv.in.orig 2006-04-26 22:52:38.000000000 +0200 ++++ config_office/set_soenv.in 2006-04-26 22:53:15.000000000 +0200 +@@ -1804,6 +1804,7 @@ + ToFile( "SYSTEM_SNDFILE", "@SYSTEM_SNDFILE@", "e" ); + ToFile( "SYSTEM_PORTAUDIO", "@SYSTEM_PORTAUDIO@", "e" ); + ToFile( "SYSTEM_NEON", "@SYSTEM_NEON@", "e" ); ++ToFile( "NEON_VERSION", "@NEON_VERSION@", "e" ); + ToFile( "NEON_LIBS", "@NEON_LIBS@", "e" ); + ToFile( "NEON_CFLAGS", "@NEON_CFLAGS@", "e" ); + ToFile( "DISABLE_NEON", "@DISABLE_NEON@", "e" ); +diff -Nur ucb.orig/source/ucp/webdav/LinkSequence.cxx ucb/source/ucp/webdav/LinkSequence.cxx +--- ucb.orig/source/ucp/webdav/LinkSequence.cxx 2006-04-26 22:46:11.000000000 +0200 ++++ ucb/source/ucp/webdav/LinkSequence.cxx 2006-04-26 23:00:53.000000000 +0200 +@@ -177,7 +177,7 @@ + rInData.getStr() + nStart, + nEnd - nStart + TOKEN_LENGTH ); + +-#ifdef NEONTWOFIVE ++#if NEON_VERSION >= 0250 + success = !ne_xml_failed( parser ); + #else + success = !!ne_xml_valid( parser ); +diff -Nur ucb.orig/source/ucp/webdav/LockEntrySequence.cxx ucb/source/ucp/webdav/LockEntrySequence.cxx +--- ucb.orig/source/ucp/webdav/LockEntrySequence.cxx 2006-04-26 22:46:11.000000000 +0200 ++++ ucb/source/ucp/webdav/LockEntrySequence.cxx 2006-04-26 23:00:53.000000000 +0200 +@@ -202,7 +202,7 @@ + rInData.getStr() + nStart, + nEnd - nStart + TOKEN_LENGTH ); + +-#ifdef NEONTWOFIVE ++#if NEON_VERSION >= 0250 + success = !ne_xml_failed( parser ); + #else + success = !!ne_xml_valid( parser ); +diff -Nur ucb.orig/source/ucp/webdav/LockSequence.cxx ucb/source/ucp/webdav/LockSequence.cxx +--- ucb.orig/source/ucp/webdav/LockSequence.cxx 2006-04-26 22:46:11.000000000 +0200 ++++ ucb/source/ucp/webdav/LockSequence.cxx 2006-04-26 23:00:53.000000000 +0200 +@@ -335,7 +335,7 @@ + rInData.getStr() + nStart, + nEnd - nStart + TOKEN_LENGTH ); + +-#ifdef NEONTWOFIVE ++#if NEON_VERSION >= 0250 + success = !ne_xml_failed( parser ); + #else + success = !!ne_xml_valid( parser ); +diff -Nur ucb.orig/source/ucp/webdav/makefile.mk ucb/source/ucp/webdav/makefile.mk +--- ucb.orig/source/ucp/webdav/makefile.mk 2006-04-26 22:46:11.000000000 +0200 ++++ ucb/source/ucp/webdav/makefile.mk 2006-04-26 22:56:47.000000000 +0200 +@@ -61,12 +61,9 @@ + CFLAGS+= $(LIBXML_CFLAGS) + .ENDIF + ++CFLAGS+= -DNEON_VERSION=$(NEON_VERSION) + .IF "$(SYSTEM_NEON)" == "YES" + CFLAGS+= $(NEON_CFLAGS) +-TWOFIVE:=$(shell pkg-config --atleast-version=0.25.0 neon && echo YES || echo NO) +-.IF "$(TWOFIVE)" == "YES" +-CFLAGS+=-DNEONTWOFIVE +-.ENDIF + .ELSE + NEONINCDIR=external$/neon + CFLAGS+= -I$(SOLARINCDIR)$/$(NEONINCDIR) +diff -Nur ucb.orig/source/ucp/webdav/NeonHeadRequest.cxx ucb/source/ucp/webdav/NeonHeadRequest.cxx +--- ucb.orig/source/ucp/webdav/NeonHeadRequest.cxx 2006-04-26 22:46:11.000000000 +0200 ++++ ucb/source/ucp/webdav/NeonHeadRequest.cxx 2006-04-26 23:00:53.000000000 +0200 +@@ -51,7 +51,7 @@ + using namespace webdav_ucp; + using namespace com::sun::star; + +-#ifdef NEONTWOFIVE ++#if NEON_VERSION >= 0250 + static void process_headers(ne_request *req, + DAVResource &rResource, + const std::vector< ::rtl::OUString > &rHeaderNames) +@@ -190,14 +190,14 @@ + inPath, + RTL_TEXTENCODING_UTF8 ) ); + +-#ifndef NEONTWOFIVE ++#if NEON_VERSION < 0250 + NeonHeadRequestContext aCtx( &ioResource, &inHeaderNames ); + ne_add_response_header_catcher( req, NHR_ResponseHeaderCatcher, &aCtx ); + #endif + + nError = ne_request_dispatch( req ); + +-#ifdef NEONTWOFIVE ++#if NEON_VERSION >= 0250 + process_headers(req, ioResource, inHeaderNames); + #endif + +diff -Nur ucb.orig/source/ucp/webdav/NeonPropFindRequest.cxx ucb/source/ucp/webdav/NeonPropFindRequest.cxx +--- ucb.orig/source/ucp/webdav/NeonPropFindRequest.cxx 2006-04-26 22:46:11.000000000 +0200 ++++ ucb/source/ucp/webdav/NeonPropFindRequest.cxx 2006-04-26 23:08:37.000000000 +0200 +@@ -175,11 +175,19 @@ + + // ------------------------------------------------------------------- + extern "C" void NPFR_propfind_results( void* userdata, ++#if NEON_VERSION >= 0260 ++ const ne_uri* href_uri, ++#else + const char* href, ++#endif + const NeonPropFindResultSet* set ) + { + // @@@ href is not the uri! DAVResource ctor wants uri! + ++#if NEON_VERSION >= 0260 ++ // href should be free'd? says header ... ++ char* href = ne_uri_unparse(href_uri); ++#endif + DAVResource theResource( + OStringToOUString( href, RTL_TEXTENCODING_UTF8 ) ); + +@@ -209,11 +217,19 @@ + + // ------------------------------------------------------------------- + extern "C" void NPFR_propnames_results( void* userdata, ++#if NEON_VERSION >= 0260 ++ const ne_uri* href_uri, ++#else + const char* href, ++#endif + const NeonPropFindResultSet* results ) + { + // @@@ href is not the uri! DAVResourceInfo ctor wants uri! + ++#if NEON_VERSION >= 0260 ++ // href should be free'd? says header ... ++ char* href = ne_uri_unparse(href_uri); ++#endif + // Create entry for the resource. + DAVResourceInfo theResource( + OStringToOUString( href, RTL_TEXTENCODING_UTF8 ) ); +diff -Nur ucb.orig/source/ucp/webdav/NeonSession.cxx ucb/source/ucp/webdav/NeonSession.cxx +--- ucb.orig/source/ucp/webdav/NeonSession.cxx 2006-04-26 22:46:11.000000000 +0200 ++++ ucb/source/ucp/webdav/NeonSession.cxx 2006-04-26 23:00:53.000000000 +0200 +@@ -221,7 +221,7 @@ + // ResponseBlockReader + // A simple Neon response_block_reader for use with an XInputStream + // ------------------------------------------------------------------- +-#ifdef NEONTWOFIVE ++#if NEON_VERSION >= 0250 + extern "C" int NeonSession_ResponseBlockReader + #else + extern "C" void NeonSession_ResponseBlockReader +@@ -244,7 +244,7 @@ + xInputStream->AddToStream( inBuf, inLen ); + } + } +-#ifdef NEONTWOFIVE ++#if NEON_VERSION >= 0250 + return 0; + #endif + } +@@ -253,7 +253,7 @@ + // ResponseBlockWriter + // A simple Neon response_block_reader for use with an XOutputStream + // ------------------------------------------------------------------- +-#ifdef NEONTWOFIVE ++#if NEON_VERSION >= 0250 + extern "C" int NeonSession_ResponseBlockWriter + #else + extern "C" void NeonSession_ResponseBlockWriter +@@ -273,7 +273,7 @@ + xOutputStream->writeBytes( aSeq ); + } + } +-#ifdef NEONTWOFIVE ++#if NEON_VERSION >= 0250 + return 0; + #endif + } +@@ -1538,7 +1538,7 @@ + } + */ + +-#ifdef NEONTWOFIVE ++#if NEON_VERSION >= 0250 + static void run_header_handler(ne_request *req, ne_header_handler handler, void *userdata) + { + void *cursor = NULL; +@@ -1566,13 +1566,13 @@ + //struct get_context ctx; + ne_request * req = ne_request_create( sess, "GET", uri ); + int ret; +-#ifndef NEONTWOFIVE ++#if NEON_VERSION < 0250 + ne_add_response_header_catcher( req, handler, userdata ); + #endif + ne_add_response_body_reader( req, ne_accept_2xx, reader, userdata ); + + ret = ne_request_dispatch( req ); +-#ifdef NEONTWOFIVE ++#if NEON_VERSION >= 0250 + run_header_handler(req, handler, userdata); + #endif + +diff -Nur ucb.orig/source/ucp/webdav/NeonSession.hxx ucb/source/ucp/webdav/NeonSession.hxx +--- ucb.orig/source/ucp/webdav/NeonSession.hxx 2006-04-26 22:46:11.000000000 +0200 ++++ ucb/source/ucp/webdav/NeonSession.hxx 2006-04-26 22:59:20.000000000 +0200 +@@ -49,7 +49,7 @@ + #include "NeonTypes.hxx" + #endif + +-#ifdef NEONTWOFIVE ++#if NEON_VERSION >= 0250 + typedef void (*ne_header_handler)(void *userdata, const char *value); + #endif + +diff -Nur ucb.orig/source/ucp/webdav/NeonUri.cxx ucb/source/ucp/webdav/NeonUri.cxx +--- ucb.orig/source/ucp/webdav/NeonUri.cxx 2006-04-26 22:46:11.000000000 +0200 ++++ ucb/source/ucp/webdav/NeonUri.cxx 2006-04-26 23:08:37.000000000 +0200 +@@ -54,9 +54,15 @@ + + using namespace webdav_ucp; + ++#if NEON_VERSION >= 0260 ++ne_uri NeonUri::sUriDefaultsHTTP = { "http", NULL, NULL, DEFAULT_HTTP_PORT }; ++ne_uri NeonUri::sUriDefaultsHTTPS = { "https", NULL, NULL, DEFAULT_HTTPS_PORT }; ++ne_uri NeonUri::sUriDefaultsFTP = { "ftp", NULL, NULL, DEFAULT_FTP_PORT }; ++#else + ne_uri NeonUri::sUriDefaultsHTTP = { "http", NULL, DEFAULT_HTTP_PORT, NULL }; + ne_uri NeonUri::sUriDefaultsHTTPS = { "https", NULL, DEFAULT_HTTPS_PORT, NULL }; + ne_uri NeonUri::sUriDefaultsFTP = { "ftp", NULL, DEFAULT_FTP_PORT, NULL }; ++#endif + + // ------------------------------------------------------------------- + // Constructor +@@ -132,7 +138,11 @@ + pUri->scheme ? pUri->scheme : pUriDefs->scheme, + RTL_TEXTENCODING_UTF8 ); + mUserInfo = rtl::OStringToOUString( ++#if NEON_VERSION >= 0260 ++ pUri->userinfo ? pUri->userinfo : pUriDefs->userinfo, ++#else + pUri->authinfo ? pUri->authinfo : pUriDefs->authinfo, ++#endif + RTL_TEXTENCODING_UTF8 ); + mHostName = rtl::OStringToOUString( + pUri->host ? pUri->host : pUriDefs->host, +diff -Nur ucb.orig/source/ucp/webdav/UCBDeadPropertyValue.cxx ucb/source/ucp/webdav/UCBDeadPropertyValue.cxx +--- ucb.orig/source/ucp/webdav/UCBDeadPropertyValue.cxx 2006-04-26 22:46:11.000000000 +0200 ++++ ucb/source/ucp/webdav/UCBDeadPropertyValue.cxx 2006-04-26 23:00:53.000000000 +0200 +@@ -390,7 +390,7 @@ + + ne_xml_parse( parser, rInData.getStr(), rInData.getLength() ); + +-#ifdef NEONTWOFIVE ++#if NEON_VERSION >= 0250 + success = !ne_xml_failed( parser ); + #else + success = !!ne_xml_valid( parser ); diff --git a/patches/src680/ubuntu-no-help-msg.diff b/patches/src680/ubuntu-no-help-msg.diff deleted file mode 100644 index 510cf0054..000000000 --- a/patches/src680/ubuntu-no-help-msg.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- sfx2/source/appl/sfxhelp.cxx~ 2006-02-15 02:53:15.839949000 +0100 -+++ sfx2/source/appl/sfxhelp.cxx 2006-02-15 02:55:01.389949000 +0100 -@@ -151,7 +151,7 @@ - - NoHelpErrorBox::NoHelpErrorBox( Window* _pParent ) : - -- ErrorBox( _pParent, WB_OK, String( SfxResId( RID_STR_HLPFILENOTEXIST ) ) ) -+ ErrorBox( _pParent, WB_OK, String( SfxResId( RID_STR_HLPFILENOTEXIST ) ).Append(String(DEFINE_CONST_UNICODE(".\nPlease install the openoffice.org-help-en-us package or the locale specific help package openoffice.org-help-<language-code>."))) ) - { - // Error message: "No help available" - } diff --git a/patches/src680/vcl-fontconfig-hints.diff b/patches/src680/vcl-fontconfig-hints.diff new file mode 100644 index 000000000..a8628274c --- /dev/null +++ b/patches/src680/vcl-fontconfig-hints.diff @@ -0,0 +1,618 @@ +Index: psprint/inc/psprint/fontmanager.hxx +=================================================================== +RCS file: /cvs/gsl/psprint/inc/psprint/fontmanager.hxx,v +retrieving revision 1.28 +retrieving revision 1.28.4.1 +diff -u -p -r1.28 -r1.28.4.1 +--- psprint/inc/psprint/fontmanager.hxx 19 Jan 2006 17:36:34 -0000 1.28 ++++ psprint/inc/psprint/fontmanager.hxx 16 Feb 2006 13:23:58 -0000 1.28.4.1 +@@ -143,6 +143,15 @@ enum type { + }; + } + ++namespace fcstatus ++{ ++enum type { ++ istrue, ++ isunset, ++ isfalse ++}; ++} ++ + /* + * the difference between FastPrintFontInfo and PrintFontInfo + * is that the information in FastPrintFontInfo can usually +@@ -168,6 +177,8 @@ struct FastPrintFontInfo + weight::type m_eWeight; + pitch::type m_ePitch; + rtl_TextEncoding m_aEncoding; ++ fcstatus::type m_eEmbeddedbitmap; ++ fcstatus::type m_eAntialias; + + FastPrintFontInfo() : + m_nID( 0 ), +@@ -177,7 +188,9 @@ struct FastPrintFontInfo + m_eWidth( width::Unknown ), + m_eWeight( weight::Unknown ), + m_ePitch( pitch::Unknown ), +- m_aEncoding( RTL_TEXTENCODING_DONTKNOW ) ++ m_aEncoding( RTL_TEXTENCODING_DONTKNOW ), ++ m_eEmbeddedbitmap( fcstatus::isunset ), ++ m_eAntialias( fcstatus::isunset ) + {} + }; + +@@ -291,6 +304,10 @@ class PrintFontManager + int m_nYMax; + bool m_bHaveVerticalSubstitutedGlyphs; + bool m_bUserOverride; ++ ++ fcstatus::type m_eEmbeddedbitmap; ++ fcstatus::type m_eAntialias; ++ + std::map< sal_Unicode, sal_Int32 > m_aEncodingVector; + std::map< sal_Unicode, rtl::OString > m_aNonEncoded; + +cvs diff: Diffing psprint/prj +cvs diff: Diffing psprint/source +cvs diff: Diffing psprint/source/fontmanager +Index: psprint/source/fontmanager/fontcache.cxx +=================================================================== +RCS file: /cvs/gsl/psprint/source/fontmanager/fontcache.cxx,v +retrieving revision 1.19 +retrieving revision 1.18.14.2 +diff -u -p -r1.19 -r1.18.14.2 +--- psprint/source/fontmanager/fontcache.cxx 9 Feb 2006 12:33:17 -0000 1.19 ++++ psprint/source/fontmanager/fontcache.cxx 16 Feb 2006 13:23:32 -0000 1.18.14.2 +@@ -55,7 +55,7 @@ + #endif + + #define FONTCACHEFILE "/user/psprint/pspfontcache" +-#define CACHE_MAGIC "PspFontCacheFile format 2" ++#define CACHE_MAGIC "PspFontCacheFile format 3" + + using namespace std; + using namespace rtl; +@@ -168,7 +168,7 @@ void FontCache::flush() + /* + * for each font entry write: + * name[;name[;name]] +- * fontnr;PSName;italic;weight;width;pitch;encoding;ascend;descend;leading;vsubst;gxw;gxh;gyw;gyh;useroverrride[;{metricfile,typeflags}][;stylename] ++ * fontnr;PSName;italic;weight;width;pitch;encoding;ascend;descend;leading;vsubst;gxw;gxh;gyw;gyh;useroverrride;embed;antialias[;{metricfile,typeflags}][;stylename] + */ + if( nEntrySize > 1 ) + nSubEntry = static_cast<const PrintFontManager::TrueTypeFontFile*>(*it)->m_nCollectionEntry; +@@ -219,6 +219,10 @@ void FontCache::flush() + aLine.Append( ByteString::CreateFromInt32( (*it)->m_aGlobalMetricY.height ) ); + aLine.Append( ';' ); + aLine.Append( (*it)->m_bUserOverride ? "1" : "0" ); ++ aLine.Append( ';' ); ++ aLine.Append( ByteString::CreateFromInt32( (*it)->m_eEmbeddedbitmap ) ); ++ aLine.Append( ';' ); ++ aLine.Append( ByteString::CreateFromInt32( (*it)->m_eAntialias ) ); + + switch( (*it)->m_eType ) + { +@@ -387,8 +391,8 @@ void FontCache::read() + pLine = aLine.GetBuffer(); + nLen = aLine.Len(); + +- // get up to 18 token positions +- const int nMaxTokens = 18; ++ // get up to 20 token positions ++ const int nMaxTokens = 20; + int nTokenPos[nMaxTokens]; + nTokenPos[0] = 0; + int nTokens = 1; +@@ -401,7 +405,7 @@ void FontCache::read() + break; + } + } +- if( nTokens < 16 ) ++ if( nTokens < 18 ) + { + delete pFont; + continue; +@@ -428,11 +432,14 @@ void FontCache::read() + = atoi( pLine + nTokenPos[14] ); + pFont->m_bUserOverride + = (atoi( pLine + nTokenPos[15] ) != 0); +- int nStyleTokenNr = 16; ++ pFont->m_eEmbeddedbitmap ++ = (fcstatus::type)atoi(pLine+nTokenPos[16]); ++ pFont->m_eAntialias = (fcstatus::type)atoi(pLine+nTokenPos[17]); ++ int nStyleTokenNr = 18; + switch( eType ) + { + case fonttype::TrueType: +- static_cast<PrintFontManager::TrueTypeFontFile*>(pFont)->m_nTypeFlags = atoi( pLine + nTokenPos[16] ); ++ static_cast<PrintFontManager::TrueTypeFontFile*>(pFont)->m_nTypeFlags = atoi( pLine + nTokenPos[18] ); + static_cast<PrintFontManager::TrueTypeFontFile*>(pFont)->m_nCollectionEntry = nCollEntry; + static_cast<PrintFontManager::TrueTypeFontFile*>(pFont)->m_nDirectory = nDir; + static_cast<PrintFontManager::TrueTypeFontFile*>(pFont)->m_aFontFile = aFile; +@@ -440,7 +447,7 @@ void FontCache::read() + break; + case fonttype::Type1: + { +- int nTokLen = (nTokens > 17 ) ? nTokenPos[17]-nTokenPos[16]-1 : nLen - nTokenPos[16]; ++ int nTokLen = (nTokens > 19 ) ? nTokenPos[19]-nTokenPos[18]-1 : nLen - nTokenPos[18]; + static_cast<PrintFontManager::Type1FontFile*>(pFont)->m_aMetricFile = OString( pLine + nTokenPos[16], nTokLen ); + static_cast<PrintFontManager::Type1FontFile*>(pFont)->m_nDirectory = nDir; + static_cast<PrintFontManager::Type1FontFile*>(pFont)->m_aFontFile = aFile; +@@ -557,6 +564,8 @@ void FontCache::copyPrintFont( const Pri + pTo->m_nYMax = pFrom->m_nYMax; + pTo->m_bHaveVerticalSubstitutedGlyphs = pFrom->m_bHaveVerticalSubstitutedGlyphs; + pTo->m_bUserOverride = pFrom->m_bUserOverride; ++ pTo->m_eEmbeddedbitmap = pFrom->m_eEmbeddedbitmap; ++ pTo->m_eAntialias = pFrom->m_eAntialias; + } + + /* +@@ -618,7 +627,9 @@ bool FontCache::equalsPrintFont( const P + pRight->m_nXMax != pLeft->m_nXMax || + pRight->m_nYMax != pLeft->m_nYMax || + pRight->m_bHaveVerticalSubstitutedGlyphs != pLeft->m_bHaveVerticalSubstitutedGlyphs || +- pRight->m_bUserOverride != pLeft->m_bUserOverride ++ pRight->m_bUserOverride != pLeft->m_bUserOverride || ++ pRight->m_eEmbeddedbitmap != pLeft->m_eEmbeddedbitmap || ++ pRight->m_eAntialias != pLeft->m_eAntialias + ) + return false; + std::list< int >::const_iterator lit, rit; +Index: psprint/source/fontmanager/fontconfig.cxx +=================================================================== +RCS file: /cvs/gsl/psprint/source/fontmanager/fontconfig.cxx,v +retrieving revision 1.16 +retrieving revision 1.16.2.1 +diff -u -p -r1.16 -r1.16.2.1 +--- psprint/source/fontmanager/fontconfig.cxx 25 Jan 2006 11:35:42 -0000 1.16 ++++ psprint/source/fontmanager/fontconfig.cxx 16 Feb 2006 13:23:32 -0000 1.16.2.1 +@@ -97,6 +97,7 @@ class FontCfgWrapper + FcResult (*m_pFcPatternGetBool)(const FcPattern*,const char*,int,FcBool*); + void (*m_pFcDefaultSubstitute)(FcPattern *); + FcPattern* (*m_pFcFontMatch)(FcConfig*,FcPattern*,FcResult*); ++ FcPattern* (*m_pFcFontSetMatch)(FcConfig*,FcFontSet**, int, FcPattern*,FcResult*); + FcBool (*m_pFcConfigSubstitute)(FcConfig*,FcPattern*,FcMatchKind); + FcBool (*m_pFcPatternAddInteger)(FcPattern*,const char*,int); + FcBool (*m_pFcPatternAddString)(FcPattern*,const char*,const FcChar8*); +@@ -166,6 +167,8 @@ public: + { m_pFcDefaultSubstitute( pPattern ); } + FcPattern* FcFontMatch( FcConfig* pConfig, FcPattern* pPattern, FcResult* pResult ) + { return m_pFcFontMatch( pConfig, pPattern, pResult ); } ++ FcPattern* FcFontSetMatch( FcConfig* pConfig, FcFontSet **ppFontSet, int nset, FcPattern* pPattern, FcResult* pResult ) ++ { return m_pFcFontSetMatch ? m_pFcFontSetMatch( pConfig, ppFontSet, nset, pPattern, pResult ) : 0; } + FcBool FcConfigSubstitute( FcConfig* pConfig, FcPattern* pPattern, FcMatchKind eKind ) + { return m_pFcConfigSubstitute( pConfig, pPattern, eKind ); } + FcBool FcPatternAddInteger( FcPattern* pPattern, const char* pObject, int nValue ) +@@ -238,6 +241,8 @@ FontCfgWrapper::FontCfgWrapper() + loadSymbol( "FcDefaultSubstitute" ); + m_pFcFontMatch = (FcPattern*(*)(FcConfig*,FcPattern*,FcResult*)) + loadSymbol( "FcFontMatch" ); ++ m_pFcFontSetMatch = (FcPattern*(*)(FcConfig*,FcFontSet**,int,FcPattern*,FcResult*)) ++ loadSymbol( "FcFontSetMatch" ); + m_pFcConfigSubstitute = (FcBool(*)(FcConfig*,FcPattern*,FcMatchKind)) + loadSymbol( "FcConfigSubstitute" ); + m_pFcPatternAddInteger = (FcBool(*)(FcPattern*,const char*,int)) +@@ -307,6 +312,10 @@ void FontCfgWrapper::release() + } + } + ++#ifndef FC_EMBEDDED_BITMAP ++#define FC_EMBEDDED_BITMAP "embeddedbitmap" ++#endif ++ + /* + * PrintFontManager::initFontconfig + */ +@@ -346,7 +355,7 @@ bool PrintFontManager::initFontconfig() + int weight = 0; + int spacing = 0; + int nCollectionEntry = -1; +- FcBool outline = false; ++ FcBool outline = false, embitmap = true, antialias = true; + + FcResult eFileRes = rWrapper.FcPatternGetString( pFSet->fonts[i], FC_FILE, 0, &file ); + FcResult eFamilyRes = rWrapper.FcPatternGetString( pFSet->fonts[i], FC_FAMILY, 0, &family ); +@@ -356,6 +365,24 @@ bool PrintFontManager::initFontconfig() + FcResult eSpacRes = rWrapper.FcPatternGetInteger( pFSet->fonts[i], FC_SPACING, 0, &spacing ); + FcResult eOutRes = rWrapper.FcPatternGetBool( pFSet->fonts[i], FC_OUTLINE, 0, &outline ); + FcResult eIndexRes = rWrapper.FcPatternGetInteger( pFSet->fonts[i], FC_INDEX, 0, &nCollectionEntry ); ++ ++ FcResult eEmbeddedBitmap = FcResultNoMatch; ++ FcResult eAntialias = FcResultNoMatch; ++ ++ if (eFamilyRes == FcResultMatch) ++ { ++ FcPattern *pMatch = rWrapper.FcPatternCreate(); ++ rWrapper.FcPatternAddString(pMatch, FC_FAMILY, family); ++ rWrapper.FcConfigSubstitute( NULL, pMatch, FcMatchPattern ); ++ FcResult eResult; ++ if (FcPattern* pResult = rWrapper.FcFontSetMatch( NULL, &pFSet, 1, pMatch, &eResult )) ++ { ++ eEmbeddedBitmap = rWrapper.FcPatternGetBool( pResult, FC_EMBEDDED_BITMAP, 0, &embitmap ); ++ eAntialias = rWrapper.FcPatternGetBool( pResult, FC_ANTIALIAS, 0, &antialias ); ++ rWrapper.FcPatternDestroy(pResult); ++ } ++ rWrapper.FcPatternDestroy(pMatch); ++ } + + if( eFileRes != FcResultMatch || eFamilyRes != FcResultMatch || eOutRes != FcResultMatch ) + continue; +@@ -491,6 +518,15 @@ bool PrintFontManager::initFontconfig() + { + pUpdate->m_aStyleName = OStringToOUString( OString( (sal_Char*)style ), RTL_TEXTENCODING_UTF8 ); + } ++ if( eEmbeddedBitmap == FcResultMatch ) ++ { ++ pUpdate->m_eEmbeddedbitmap = embitmap ? fcstatus::istrue : fcstatus::isfalse; ++ } ++ if( eAntialias == FcResultMatch ) ++ { ++ pUpdate->m_eAntialias = antialias ? fcstatus::istrue : fcstatus::isfalse; ++ } ++ + + // update font cache + m_pFontCache->updateFontCacheEntry( pUpdate, false ); +Index: psprint/source/fontmanager/fontmanager.cxx +=================================================================== +RCS file: /cvs/gsl/psprint/source/fontmanager/fontmanager.cxx,v +retrieving revision 1.64 +retrieving revision 1.64.6.1 +diff -u -p -r1.64 -r1.64.6.1 +--- psprint/source/fontmanager/fontmanager.cxx 16 Jan 2006 12:54:13 -0000 1.64 ++++ psprint/source/fontmanager/fontmanager.cxx 16 Feb 2006 13:23:33 -0000 1.64.6.1 +@@ -379,7 +379,9 @@ PrintFontManager::PrintFont::PrintFont( + m_nXMax( 0 ), + m_nYMax( 0 ), + m_bHaveVerticalSubstitutedGlyphs( false ), +- m_bUserOverride( false ) ++ m_bUserOverride( false ), ++ m_eEmbeddedbitmap( fcstatus::isunset ), ++ m_eAntialias( fcstatus::isunset ) + { + } + +@@ -2591,6 +2593,8 @@ void PrintFontManager::fillPrintFontInfo + rInfo.m_eWeight = pFont->m_eWeight; + rInfo.m_ePitch = pFont->m_ePitch; + rInfo.m_aEncoding = pFont->m_aEncoding; ++ rInfo.m_eEmbeddedbitmap = pFont->m_eEmbeddedbitmap; ++ rInfo.m_eAntialias = pFont->m_eAntialias; + rInfo.m_aAliases.clear(); + for( ::std::list< int >::iterator it = pFont->m_aAliases.begin(); it != pFont->m_aAliases.end(); ++it ) + rInfo.m_aAliases.push_back( m_pAtoms->getString( ATOM_FAMILYNAME, *it ) ); +Index: vcl/inc/outfont.hxx +=================================================================== +RCS file: /cvs/gsl/vcl/inc/outfont.hxx,v +retrieving revision 1.19 +retrieving revision 1.19.108.1 +diff -u -p -r1.19 -r1.19.108.1 +--- vcl/inc/outfont.hxx 17 Oct 2005 14:49:15 -0000 1.19 ++++ vcl/inc/outfont.hxx 16 Feb 2006 13:28:40 -0000 1.19.108.1 +@@ -112,20 +112,24 @@ public: // TODO: hide members behind acc + class ImplDevFontAttributes : public ImplFontAttributes + { + public: // TODO: create matching interface class +- const String& GetAliasNames() const { return maMapNames; } +- int GetQuality() const { return mnQuality; } +- bool IsRotatable() const { return mbOrientation; } +- bool IsDeviceFont() const { return mbDevice; } +- bool IsEmbeddable() const { return mbEmbeddable; } +- bool IsSubsettable() const { return mbSubsettable; } ++ const String& GetAliasNames() const { return maMapNames; } ++ int GetQuality() const { return mnQuality; } ++ bool IsRotatable() const { return mbOrientation; } ++ bool IsDeviceFont() const { return mbDevice; } ++ bool IsEmbeddable() const { return mbEmbeddable; } ++ bool IsSubsettable() const { return mbSubsettable; } ++ FontEmbeddedBitmap UseEmbeddedBitmap() const { return meEmbeddedBitmap; } ++ FontAntiAlias UseAntiAlias() const { return meAntiAlias; } + + public: // TODO: hide members behind accessor methods +- String maMapNames; // List of family name aliass separated with ';' +- int mnQuality; // Quality (used when similar fonts compete) +- bool mbOrientation; // true: physical font can be rotated +- bool mbDevice; // true: built in font +- bool mbSubsettable; // true: a subset of the font can be created +- bool mbEmbeddable; // true: the font can be embedded ++ String maMapNames; // List of family name aliass separated with ';' ++ int mnQuality; // Quality (used when similar fonts compete) ++ bool mbOrientation; // true: physical font can be rotated ++ bool mbDevice; // true: built in font ++ bool mbSubsettable; // true: a subset of the font can be created ++ bool mbEmbeddable; // true: the font can be embedded ++ FontEmbeddedBitmap meEmbeddedBitmap; // whether the embedded bitmaps should be used ++ FontAntiAlias meAntiAlias; // whether the font should be antialiased + }; + + // ---------------- +Index: vcl/inc/vclenum.hxx +=================================================================== +RCS file: /cvs/gsl/vcl/inc/vclenum.hxx,v +retrieving revision 1.6 +retrieving revision 1.6.156.1 +diff -u -p -r1.6 -r1.6.156.1 +--- vcl/inc/vclenum.hxx 9 Sep 2005 11:34:53 -0000 1.6 ++++ vcl/inc/vclenum.hxx 16 Feb 2006 13:28:41 -0000 1.6.156.1 +@@ -275,6 +275,20 @@ enum FontType { TYPE_DONTKNOW, TYPE_RAST + + #endif + ++#ifndef ENUM_FONTEMBEDDEDBITMAP_DECLARED ++#define ENUM_FONTEMBEDDEDBITMAP_DECLARED ++ ++enum FontEmbeddedBitmap { EMBEDDEDBITMAP_DONTKNOW, EMBEDDEDBITMAP_FALSE, EMBEDDEDBITMAP_TRUE }; ++ ++#endif ++ ++#ifndef ENUM_FONTANTIALIAS_DECLARED ++#define ENUM_FONTANTIALIAS_DECLARED ++ ++enum FontAntiAlias { ANTIALIAS_DONTKNOW, ANTIALIAS_FALSE, ANTIALIAS_TRUE }; ++ ++#endif ++ + // ------------------------------------------------------------ + + #ifndef ENUM_KEYFUNCTYPE_DECLARED + + +Index: vcl/source/glyphs/gcach_ftyp.cxx +=================================================================== +RCS file: /cvs/gsl/vcl/source/glyphs/gcach_ftyp.cxx,v +retrieving revision 1.119 +retrieving revision 1.119.26.1 +diff -u -p -r1.119 -r1.119.26.1 +--- vcl/source/glyphs/gcach_ftyp.cxx 25 Jan 2006 11:39:36 -0000 1.119 ++++ vcl/source/glyphs/gcach_ftyp.cxx 16 Feb 2006 13:28:41 -0000 1.119.26.1 +@@ -153,9 +153,9 @@ namespace { struct vclFontFileList : pub + // if (AA prio <= AH prio) => antialias + autohint + // if (AH<AA) => do not autohint when antialiasing + // if (EB<AH) => do not autohint for monochrome +-static int nPrioEmbedded = 2; +-static int nPrioAutoHint = 1; +-static int nPrioAntiAlias = 1; ++static int nDefaultPrioEmbedded = 2; ++static int nDefaultPrioAutoHint = 1; ++static int nDefaultPrioAntiAlias = 1; + + // ======================================================================= + // FreetypeManager +@@ -470,7 +470,7 @@ FreetypeManager::FreetypeManager() + // requested by env var below because it crashes StarOffice on RH9 + // TODO: investigate + if( nFTVERSION == 2103 ) +- nPrioEmbedded = 0; ++ nDefaultPrioEmbedded = 0; + + #else // RTLD_DEFAULT + // assume systems where dlsym is not possible use supplied library +@@ -481,13 +481,13 @@ FreetypeManager::FreetypeManager() + char* pEnv; + pEnv = ::getenv( "SAL_EMBEDDED_BITMAP_PRIORITY" ); + if( pEnv ) +- nPrioEmbedded = pEnv[0] - '0'; ++ nDefaultPrioEmbedded = pEnv[0] - '0'; + pEnv = ::getenv( "SAL_ANTIALIASED_TEXT_PRIORITY" ); + if( pEnv ) +- nPrioAntiAlias = pEnv[0] - '0'; ++ nDefaultPrioAntiAlias = pEnv[0] - '0'; + pEnv = ::getenv( "SAL_AUTOHINTING_PRIORITY" ); + if( pEnv ) +- nPrioAutoHint = pEnv[0] - '0'; ++ nDefaultPrioAutoHint = pEnv[0] - '0'; + + InitGammaTable(); + } +@@ -593,6 +593,9 @@ long FreetypeManager::AddFontDir( const + aDFA.mbSubsettable= false; + aDFA.mbEmbeddable = false; + ++ aDFA.meEmbeddedBitmap = EMBEDDEDBITMAP_DONTKNOW; ++ aDFA.meAntiAlias = ANTIALIAS_DONTKNOW; ++ + FT_Done_Face( aFaceFT ); + AddFontFile( aCFileName, nFaceNum, ++mnNextFontId, aDFA, NULL ); + ++nCount; +@@ -687,6 +690,7 @@ ImplFontEntry* ImplFTSFontData::CreateFo + + FreetypeServerFont::FreetypeServerFont( const ImplFontSelectData& rFSD, FtFontInfo* pFI ) + : ServerFont( rFSD ), ++ mnPrioEmbedded(nDefaultPrioEmbedded), mnPrioAntiAlias(nDefaultPrioAntiAlias), + mpFontInfo( pFI ), + maFaceFT( NULL ), + maSizeFT( NULL ), +@@ -831,8 +835,13 @@ FreetypeServerFont::FreetypeServerFont( + mnLoadFlags |= FT_LOAD_NO_HINTING; + mnLoadFlags |= FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH; //#88334# + ++ if (mpFontInfo->DontUseAntiAlias()) ++ mnPrioAntiAlias = 0; ++ if (mpFontInfo->DontUseEmbeddedBitmaps()) ++ mnPrioEmbedded = 0; ++ + #if (FTVERSION >= 2005) || defined(TT_CONFIG_OPTION_BYTECODE_INTERPRETER) +- if( nPrioAutoHint <= 0 ) ++ if( nDefaultPrioAutoHint <= 0 ) + #endif + mnLoadFlags |= FT_LOAD_NO_HINTING; + +@@ -842,7 +851,7 @@ FreetypeServerFont::FreetypeServerFont( + mnLoadFlags |= FT_LOAD_TARGET_LIGHT; + #endif + +- if( ((mnCos != 0) && (mnSin != 0)) || (nPrioEmbedded <= 0) ) ++ if( ((mnCos != 0) && (mnSin != 0)) || (mnPrioEmbedded <= 0) ) + mnLoadFlags |= FT_LOAD_NO_BITMAP; + } + +@@ -1273,7 +1282,7 @@ void FreetypeServerFont::InitGlyphData( + + bool FreetypeServerFont::GetAntialiasAdvice( void ) const + { +- if( GetFontSelData().mbNonAntialiased || (nPrioAntiAlias<=0) ) ++ if( GetFontSelData().mbNonAntialiased || (mnPrioAntiAlias<=0) ) + return false; + bool bAdviseAA = true; + // TODO: also use GASP info +@@ -1298,11 +1307,11 @@ bool FreetypeServerFont::GetGlyphBitmap1 + #if (FTVERSION >= 2002) + // for 0/90/180/270 degree fonts enable autohinting even if not advisable + // non-hinted and non-antialiased bitmaps just look too ugly +- if( (mnCos==0 || mnSin==0) && (nPrioAutoHint > 0) ) ++ if( (mnCos==0 || mnSin==0) && (nDefaultPrioAutoHint > 0) ) + nLoadFlags &= ~FT_LOAD_NO_HINTING; + #endif + +- if( nPrioEmbedded <= nPrioAutoHint ) ++ if( mnPrioEmbedded <= nDefaultPrioAutoHint ) + nLoadFlags |= FT_LOAD_NO_BITMAP; + + FT_Error rc = -1; +@@ -1449,11 +1458,11 @@ bool FreetypeServerFont::GetGlyphBitmap8 + // autohinting in FT<=2.0.4 makes antialiased glyphs look worse + nLoadFlags |= FT_LOAD_NO_HINTING; + #else +- if( (nGlyphFlags & GF_UNHINTED) || (nPrioAutoHint < nPrioAntiAlias) ) ++ if( (nGlyphFlags & GF_UNHINTED) || (nDefaultPrioAutoHint < mnPrioAntiAlias) ) + nLoadFlags |= FT_LOAD_NO_HINTING; + #endif + +- if( nPrioEmbedded <= nPrioAntiAlias ) ++ if( mnPrioEmbedded <= mnPrioAntiAlias ) + nLoadFlags |= FT_LOAD_NO_BITMAP; + + FT_Error rc = -1; +Index: vcl/source/glyphs/gcach_ftyp.hxx +=================================================================== +RCS file: /cvs/gsl/vcl/source/glyphs/gcach_ftyp.hxx,v +retrieving revision 1.33 +retrieving revision 1.33.38.1 +diff -u -p -r1.33 -r1.33.38.1 +--- vcl/source/glyphs/gcach_ftyp.hxx 14 Dec 2005 09:12:02 -0000 1.33 ++++ vcl/source/glyphs/gcach_ftyp.hxx 16 Feb 2006 13:28:42 -0000 1.33.38.1 +@@ -93,7 +93,10 @@ public: + int GetFaceNum() const { return mnFaceNum; } + int GetSynthetic() const { return mnSynthetic; } + int GetFontId() const { return mnFontId; } +- ++ bool DontUseAntiAlias() const ++ { return maDevFontAttributes.UseAntiAlias() == ANTIALIAS_FALSE; } ++ bool DontUseEmbeddedBitmaps() const ++ { return maDevFontAttributes.UseEmbeddedBitmap() == EMBEDDEDBITMAP_FALSE; } + bool IsSymbolFont() const { return maDevFontAttributes.IsSymbolFont(); } + const ImplFontAttributes& GetFontAttributes() const { return maDevFontAttributes; } + +@@ -207,6 +210,8 @@ protected: + + private: + int mnWidth; ++ int mnPrioEmbedded; ++ int mnPrioAntiAlias; + FtFontInfo* mpFontInfo; + FT_Int mnLoadFlags; + double mfStretch; + +Index: vcl/unx/source/gdi/pspgraphics.cxx +=================================================================== +RCS file: /cvs/gsl/vcl/unx/source/gdi/pspgraphics.cxx,v +retrieving revision 1.13 +retrieving revision 1.13.88.1 +diff -u -p -r1.13 -r1.13.88.1 +--- vcl/unx/source/gdi/pspgraphics.cxx 2 Nov 2005 13:34:27 -0000 1.13 ++++ vcl/unx/source/gdi/pspgraphics.cxx 16 Feb 2006 13:28:43 -0000 1.13.88.1 +@@ -1226,6 +1226,32 @@ ImplDevFontAttributes PspGraphics::Info2 + aDFA.mePitch = ToFontPitch (rInfo.m_ePitch); + aDFA.mbSymbolFlag = (rInfo.m_aEncoding == RTL_TEXTENCODING_SYMBOL); + ++ switch (rInfo.m_eEmbeddedbitmap) ++ { ++ default: ++ aDFA.meEmbeddedBitmap = EMBEDDEDBITMAP_DONTKNOW; ++ break; ++ case psp::fcstatus::istrue: ++ aDFA.meEmbeddedBitmap = EMBEDDEDBITMAP_TRUE; ++ break; ++ case psp::fcstatus::isfalse: ++ aDFA.meEmbeddedBitmap = EMBEDDEDBITMAP_FALSE; ++ break; ++ } ++ ++ switch (rInfo.m_eAntialias) ++ { ++ default: ++ aDFA.meAntiAlias = ANTIALIAS_DONTKNOW; ++ break; ++ case psp::fcstatus::istrue: ++ aDFA.meAntiAlias = ANTIALIAS_TRUE; ++ break; ++ case psp::fcstatus::isfalse: ++ aDFA.meAntiAlias = ANTIALIAS_FALSE; ++ break; ++ } ++ + // special case for the ghostscript fonts + if( aDFA.maName.CompareIgnoreCaseToAscii( "itc ", 4 ) == COMPARE_EQUAL ) + aDFA.maName = aDFA.maName.Copy( 4 ); + + + +Index: vcl/unx/source/gdi/xlfd_extd.cxx +=================================================================== +RCS file: /cvs/gsl/vcl/unx/source/gdi/xlfd_extd.cxx,v +retrieving revision 1.25 +retrieving revision 1.25.90.1 +diff -u -p -r1.25 -r1.25.90.1 +--- vcl/unx/source/gdi/xlfd_extd.cxx 1 Nov 2005 10:40:06 -0000 1.25 ++++ vcl/unx/source/gdi/xlfd_extd.cxx 16 Feb 2006 13:28:44 -0000 1.25.90.1 +@@ -113,6 +113,10 @@ ExtendedXlfd::ExtendedXlfd( bool bScalab + mbDevice = false; + mbSubsettable = false; + mbEmbeddable = false; ++ ++ meEmbeddedBitmap = EMBEDDEDBITMAP_DONTKNOW; ++ meAntiAlias = ANTIALIAS_DONTKNOW; ++ + mnQuality = -1; + } + +Index: vcl/win/source/gdi/salgdi3.cxx +=================================================================== +RCS file: /cvs/gsl/vcl/win/source/gdi/salgdi3.cxx,v +retrieving revision 1.75 +retrieving revision 1.75.10.1 +diff -u -p -r1.75 -r1.75.10.1 +--- vcl/win/source/gdi/salgdi3.cxx 27 Jan 2006 13:50:33 -0000 1.75 ++++ vcl/win/source/gdi/salgdi3.cxx 16 Feb 2006 13:28:45 -0000 1.75.10.1 +@@ -407,7 +407,10 @@ static ImplDevFontAttributes WinFont2Dev + || aDFA.maName.EqualsAscii( "ZapfChancery" ) + || aDFA.maName.EqualsAscii( "ZapfDingbats" ) ) + aDFA.mnQuality += 500; +- } ++ } ++ ++ aDFA.meEmbeddedBitmap = EMBEDDEDBITMAP_DONTKNOW; ++ aDFA.meAntiAlias = ANTIALIAS_DONTKNOW; + + // TODO: add alias names + +@@ -488,6 +491,9 @@ static ImplDevFontAttributes WinFont2Dev + aDFA.mnQuality += 500; + } + ++ aDFA.meEmbeddedBitmap = EMBEDDEDBITMAP_DONTKNOW; ++ aDFA.meAntiAlias = ANTIALIAS_DONTKNOW; ++ + // TODO: add alias names + return aDFA; + } +@@ -1870,6 +1876,8 @@ bool WinSalGraphics::AddTempDevFont( Imp + aDFA.mePitch = PITCH_DONTKNOW;; + aDFA.mbSubsettable= false; + aDFA.mbEmbeddable = false; ++ aDFA.meEmbeddedBitmap = EMBEDDEDBITMAP_DONTKNOW; ++ aDFA.meAntiAlias = ANTIALIAS_DONTKNOW; + + /* + // TODO: improve ImplDevFontAttributes using "FONTRES:" from *.fot file diff --git a/patches/src680/vcl-metacity-focus.diff b/patches/src680/vcl-metacity-focus.diff new file mode 100644 index 000000000..f6485c9a9 --- /dev/null +++ b/patches/src680/vcl-metacity-focus.diff @@ -0,0 +1,51 @@ +From: pl@openoffice.org +To: cvs@gsl.openoffice.org +Subject: [gsl-cvs] CVS update [cws_src680_vcl56]: /gsl/vcl/unx/gtk/window/ + +Tag: cws_src680_vcl56 +User: pl +Date: 06/03/16 04:28:11 + +Modified: + /gsl/vcl/unx/gtk/window/ + gtkframe.cxx + +Log: + #i63086# workaround another metacity bug + +File Changes: + +Directory: /gsl/vcl/unx/gtk/window/ +=================================== + +File [changed]: gtkframe.cxx +Url: http://gsl.openoffice.org/source/browse/gsl/vcl/unx/gtk/window/gtkframe.cxx?r1=1.42&r2=1.42.88.1 +Delta lines: +17 -3 +-------------------- +--- vcl/unx/gtk/window/gtkframe.cxx 25 Jan 2006 11:40:22 -0000 1.42 ++++ vcl/unx/gtk/window/gtkframe.cxx 16 Mar 2006 12:28:08 -0000 1.42.88.1 +@@ -1005,6 +1005,20 @@ + if( m_pParent && m_pParent->m_nWorkArea != m_nWorkArea ) + getDisplay()->getWMAdaptor()->switchToWorkArea( m_pParent->m_nWorkArea ); + ++ if( isFloatGrabWindow() && ++ m_pParent && ++ m_nFloats == 0 && ++ ! getDisplay()->GetCaptureFrame() ) ++ { ++ /* #i63086# ++ * outsmart Metacity's "focus:mouse" mode ++ * which insists on taking the focus from the document ++ * to the new float. Grab focus to parent frame BEFORE ++ * showing the float (cannot grab it to the float ++ * before show). ++ */ ++ m_pParent->grabPointer( TRUE, TRUE ); ++ } + gtk_widget_show( GTK_WIDGET(m_pWindow) ); + if( isFloatGrabWindow() ) + { + + + + diff --git a/patches/src680/win32-activex-disable.diff b/patches/src680/win32-activex-disable.diff new file mode 100644 index 000000000..a7de1f1ee --- /dev/null +++ b/patches/src680/win32-activex-disable.diff @@ -0,0 +1,278 @@ +--- config_office/configure.in Wed May 3 15:15:00 2006 ++++ /mnt/pippi/src/2.0.2/build/OOO_2_0_2/config_office/configure.in Wed May 3 14:38:03 2006 +@@ -74,4 +74,8 @@ + set. + ],,with_agfa_monotype_fonts="yes") ++AC_ARG_ENABLE(activex, ++[ --disable-activex Remove support for ActiveX embedding of ++ OOo components ++],,enable_activex=yes) + AC_ARG_ENABLE(epm, + [ --disable-epm OO.o includes self-packaging code, that requires +@@ -4268,6 +4272,19 @@ + fi + AC_SUBST(WITH_AGFA_MONOTYPE_FONTS) +- + AC_SUBST(SCPDEFS) ++ ++if test "$_os" = "WINNT"; then ++ AC_MSG_CHECKING([whether to enable ActiveX embedding of OOo components]) ++ if test "$enable_activex" = "yes" -o "$enable_activex" = "TRUE" -o "$enable_activex" = ""; then ++ ENABLE_ACTIVEX="TRUE" ++ AC_MSG_RESULT([yes]) ++ SCPDEFS="$SCPDEFS -DWITH_ACTIVEX" ++ else ++ ENABLE_ACTIVEX="" ++ AC_MSG_RESULT([no]) ++ fi ++ AC_SUBST(ENABLE_ACTIVEX) ++ AC_SUBST(SCPDEFS) ++fi + + AC_MSG_CHECKING([whether to include PPDs]) +--- scp2/source/activex/file_activex.scp Thu Oct 27 17:08:13 2005 ++++ /mnt/pippi/src/2.0.2/build/OOO_2_0_2/scp2/source/activex/file_activex.scp Wed May 3 14:24:12 2006 +@@ -36,4 +36,6 @@ + #include "macros.inc" + ++#ifdef WITH_ACTIVEX ++ + File gid_File_Lib_Soactivex + TXT_FILE_BODY; +@@ -50,2 +52,3 @@ + End + ++#endif // WITH_ACTIVEX +--- scp2/source/activex/module_activex.scp Fri Sep 9 04:17:32 2005 ++++ /mnt/pippi/src/2.0.2/build/OOO_2_0_2/scp2/source/activex/module_activex.scp Wed May 3 14:24:29 2006 +@@ -36,4 +36,6 @@ + #include "macros.inc" + ++#ifdef WITH_ACTIVEX ++ + Module gid_Module_Optional_Activexcontrol + MOD_NAME_DESC ( MODULE_OPTIONAL_ACTIVEXCONTROL ); +@@ -43,2 +45,4 @@ + Files = (gid_File_Lib_Soactivex, gid_File_Lib_Regactivex_Msi); + End ++ ++#endif // WITH_ACTIVEX +--- scp2/source/calc/registryitem_calc.scp Thu Nov 10 18:18:08 2005 ++++ /mnt/pippi/src/2.0.2/build/OOO_2_0_2/scp2/source/calc/registryitem_calc.scp Wed May 3 14:25:20 2006 +@@ -36,4 +36,6 @@ + #include "macros.inc" + ++#ifdef WITH_ACTIVEX ++ + // MSOLE embedded object in SO7 file format + RegistryItem gid_Regitem_Clsid__7b342dc4_139a_4a46_8a93_Db0827ccee9c_ +@@ -272,4 +274,6 @@ + End + ++#endif // WITH_ACTIVEX ++ + RegistryItem gid_Regitem_Sdc_Contenttype + ParentID = PREDEFINED_HKEY_CLASSES_ROOT; +@@ -359,4 +363,6 @@ + End + ++#ifdef WITH_ACTIVEX ++ + RegistryItem gid_Regitem_Soffice_Starcalcdocument_6_Clsid + ParentID = PREDEFINED_HKEY_CLASSES_ROOT; +@@ -366,4 +372,6 @@ + End + ++#endif // WITH_ACTIVEX ++ + RegistryItem gid_Regitem_Soffice_Starcalcdocument_6_Defaulticon + ParentID = PREDEFINED_HKEY_CLASSES_ROOT; +@@ -688,4 +696,6 @@ + End + ++#ifdef WITH_ACTIVEX ++ + RegistryItem gid_Regitem_Openoffice_Calcdocument_1_Clsid + ParentID = PREDEFINED_HKEY_CLASSES_ROOT; +@@ -694,4 +704,6 @@ + Value = "{7FA8AE11-B3E3-4D88-AABF-255526CD1CE8}"; + End ++ ++#endif // WITH_ACTIVEX + + RegistryItem gid_Regitem_Openoffice_Calcdocument_1_Defaulticon +--- scp2/source/draw/registryitem_draw.scp Thu Nov 10 18:18:21 2005 ++++ /mnt/pippi/src/2.0.2/build/OOO_2_0_2/scp2/source/draw/registryitem_draw.scp Wed May 3 14:25:46 2006 +@@ -36,4 +36,6 @@ + #include "macros.inc" + ++#ifdef WITH_ACTIVEX ++ + // MSOLE embedded object in SO7 file format + RegistryItem gid_Regitem_Clsid__41662fc2_0d57_4aff_Ab27_Ad2e12e7c273_ +@@ -272,5 +274,5 @@ + End + +- ++#endif // WITH_ACTIVEX + + RegistryItem gid_Regitem_Sda_Contenttype +@@ -361,4 +363,6 @@ + End + ++#ifdef WITH_ACTIVEX ++ + RegistryItem gid_Regitem_Soffice_Stardrawdocument_6_Clsid + ParentID = PREDEFINED_HKEY_CLASSES_ROOT; +@@ -368,4 +372,6 @@ + End + ++#endif // WITH_ACTIVEX ++ + RegistryItem gid_Regitem_Soffice_Stardrawdocument_6_Defaulticon + ParentID = PREDEFINED_HKEY_CLASSES_ROOT; +@@ -690,4 +696,6 @@ + End + ++#ifdef WITH_ACTIVEX ++ + RegistryItem gid_Regitem_Openoffice_Drawdocument_1_Clsid + ParentID = PREDEFINED_HKEY_CLASSES_ROOT; +@@ -696,4 +704,6 @@ + Value = "{448BB771-CFE2-47C4-BCDF-1FBF378E202C}"; + End ++ ++#endif // WITH_ACTIVEX + + RegistryItem gid_Regitem_Openoffice_Drawdocument_1_Defaulticon +--- scp2/source/impress/registryitem_impress.scp Thu Nov 10 18:18:33 2005 ++++ /mnt/pippi/src/2.0.2/build/OOO_2_0_2/scp2/source/impress/registryitem_impress.scp Wed May 3 14:26:13 2006 +@@ -36,4 +36,6 @@ + #include "macros.inc" + ++#ifdef WITH_ACTIVEX ++ + // MSOLE embedded object in SO7 file format + RegistryItem gid_Regitem_Clsid__E5a0b632_Dfba_4549_9346_E414da06e6f8_ +@@ -272,5 +274,5 @@ + End + +- ++#endif // WITH_ACTIVEX + + RegistryItem gid_Regitem_Sdd_Contenttype +@@ -377,4 +379,6 @@ + End + ++#ifdef WITH_ACTIVEX ++ + RegistryItem gid_Regitem_Soffice_Starimpressdocument_6_Clsid + ParentID = PREDEFINED_HKEY_CLASSES_ROOT; +@@ -384,4 +388,6 @@ + End + ++#endif // WITH_ACTIVEX ++ + RegistryItem gid_Regitem_Soffice_Starimpressdocument_6_Defaulticon + ParentID = PREDEFINED_HKEY_CLASSES_ROOT; +@@ -727,4 +733,6 @@ + End + ++#ifdef WITH_ACTIVEX ++ + RegistryItem gid_Regitem_Openoffice_Impressdocument_1_Clsid + ParentID = PREDEFINED_HKEY_CLASSES_ROOT; +@@ -733,4 +741,6 @@ + Value = "{EE5D1EA4-D445-4289-B2FC-55FC93693917}"; + End ++ ++#endif // WITH_ACTIVEX + + RegistryItem gid_Regitem_Openoffice_Impressdocument_1_Defaulticon +--- scp2/source/math/registryitem_math.scp Thu Nov 10 18:18:46 2005 ++++ /mnt/pippi/src/2.0.2/build/OOO_2_0_2/scp2/source/math/registryitem_math.scp Wed May 3 14:26:36 2006 +@@ -35,4 +35,6 @@ + #include "macros.inc" + ++#ifdef WITH_ACTIVEX ++ + // MSOLE embedded object in SO7 file format + RegistryItem gid_Regitem_Clsid__D0484de6_Aaee_468a_991f_8d4b0737b57a_ +@@ -271,5 +273,5 @@ + End + +- ++#endif // WITH_ACTIVEX + + RegistryItem gid_Regitem_Smf_Contenttype +@@ -360,4 +362,6 @@ + End + ++#ifdef WITH_ACTIVEX ++ + RegistryItem gid_Regitem_Soffice_Starmathdocument_6_Clsid + ParentID = PREDEFINED_HKEY_CLASSES_ROOT; +@@ -367,4 +371,6 @@ + End + ++#endif // WITH_ACTIVEX ++ + RegistryItem gid_Regitem_Soffice_Starmathdocument_6_Defaulticon + ParentID = PREDEFINED_HKEY_CLASSES_ROOT; +@@ -582,4 +588,6 @@ + End + ++#ifdef WITH_ACTIVEX ++ + RegistryItem gid_Regitem_Openoffice_Mathdocument_1_Clsid + ParentID = PREDEFINED_HKEY_CLASSES_ROOT; +@@ -588,4 +596,6 @@ + Value = "{D2D59CD1-0A6A-4D36-AE20-47817077D57C}"; + End ++ ++#endif // WITH_ACTIVEX + + RegistryItem gid_Regitem_Openoffice_Mathdocument_1_Defaulticon +--- scp2/source/writer/registryitem_writer.scp Thu Nov 10 18:19:00 2005 ++++ /mnt/pippi/src/2.0.2/build/OOO_2_0_2/scp2/source/writer/registryitem_writer.scp Wed May 3 14:27:50 2006 +@@ -36,4 +36,6 @@ + #include "macros.inc" + ++#ifdef WITH_ACTIVEX ++ + // MSOLE embedded object in SO7 file format + RegistryItem gid_Regitem_Clsid__30a2652a_Ddf7_45e7_Aca6_3eab26fc8a4e_ +@@ -272,4 +274,5 @@ + End + ++#endif // WITH_ACTIVEX + + RegistryItem gid_Regitem_Sdw_Contenttype +@@ -376,4 +379,6 @@ + End + ++#ifdef WITH_ACTIVEX ++ + RegistryItem gid_Regitem_Soffice_Starwriterdocument_6_Clsid + ParentID = PREDEFINED_HKEY_CLASSES_ROOT; +@@ -383,4 +388,6 @@ + End + ++#endif // WITH_ACTIVEX ++ + RegistryItem gid_Regitem_Soffice_Starwriterdocument_6_Defaulticon + ParentID = PREDEFINED_HKEY_CLASSES_ROOT; +@@ -882,4 +889,6 @@ + End + ++#ifdef WITH_ACTIVEX ++ + RegistryItem gid_Regitem_Openoffice_Writerdocument_1_Clsid + ParentID = PREDEFINED_HKEY_CLASSES_ROOT; +@@ -888,4 +897,6 @@ + Value = "{F616B81F-7BB8-4F22-B8A5-47428D59F8AD}"; + End ++ ++#endif // WITH_ACTIVEX + + RegistryItem gid_Regitem_Openoffice_Writerdocument_1_Defaulticon diff --git a/patches/src680/wizard-evo-local.diff b/patches/src680/wizard-evo-local.diff index 6b03892c6..f66b301e3 100644 --- a/patches/src680/wizard-evo-local.diff +++ b/patches/src680/wizard-evo-local.diff @@ -66,7 +66,7 @@ diff -u -p -u -r1.54 abspilot.src RadioButton RB_THUNDERBIRD { Pos = MAP_APPFONT ( 15, 79 ) ; -@@ -145,6 +146,22 @@ TabPage RID_PAGE_SELECTABTYPE +@@ -145,6 +146,29 @@ TabPage RID_PAGE_SELECTABTYPE Text [ de ] = "Evolution"; Text [ en-US ] = "Evolution"; }; @@ -83,8 +83,15 @@ diff -u -p -u -r1.54 abspilot.src + Pos = MAP_APPFONT ( 15, 90 ) ; + Size = MAP_APPFONT ( WINDOW_SIZE_X - 30, 8 ) ; + -+ Text [ de ] = "Evolution LDAP"; + Text [ en-US ] = "Evolution LDAP"; ++ Text[ de ] = "Evolution: LDAP"; ++ Text[ es ] = "LDAP de Evolution"; ++ Text[ fr ] = "LDAP Evolution"; ++ Text[ it ] = "LDAP Evolution"; ++ Text[ ja ] = "Evolution LDAP "; ++ Text[ pt-BR ] = "LDAP do Evolution"; ++ Text[ zh-CN ] = "Evolution LDAP"; ++ Text[ zh-TW ] = "Evolution LDAP"; + }; RadioButton RB_KAB { diff --git a/patches/test/ooxml-filter.diff b/patches/test/ooxml-filter.diff new file mode 100644 index 000000000..8406c0889 --- /dev/null +++ b/patches/test/ooxml-filter.diff @@ -0,0 +1,61 @@ +--- /dev/null 2006-04-07 20:25:18.000000000 +0100 ++++ filter/source/config/fragments/filters/OfficeOpen.xcu 2006-04-19 13:57:17.000000000 +0100 +@@ -0,0 +1,13 @@ ++ <node oor:name="Office Open XML" oor:op="replace"> ++ <prop oor:name="Flags"><value>IMPORT EXPORT TEMPLATE</value></prop> ++ <prop oor:name="UIComponent"/> ++ <prop oor:name="FilterService"/> ++ <prop oor:name="UserData"><value></value></prop> ++ <prop oor:name="FileFormatVersion"><value>6800</value></prop> ++ <prop oor:name="Type"><value>calc_OfficeOpen</value></prop> ++ <prop oor:name="TemplateName"/> ++ <prop oor:name="DocumentService"><value>com.sun.star.sheet.SpreadsheetDocument</value></prop> ++ <prop oor:name="UIName"> ++ <value xml:lang="x-default">ECMA Office Open</value> ++ </prop> ++ </node> +--- /dev/null 2006-04-07 20:25:18.000000000 +0100 ++++ filter/source/config/fragments/types/calc_OfficeOpen.xcu 2006-04-19 13:55:29.000000000 +0100 +@@ -0,0 +1,12 @@ ++ <node oor:name="calc_OfficeOpen" oor:op="replace"> ++ <prop oor:name="DetectService"><value>com.sun.star.comp.calc.FormatDetector</value></prop> ++ <prop oor:name="URLPattern"/> ++ <prop oor:name="Extensions"><value>xlsx</value></prop> ++ <prop oor:name="MediaType"><value>application/vnd.ms-excel-FIXME</value></prop> ++ <prop oor:name="Preferred"><value>false</value></prop> ++ <prop oor:name="PreferredFilter"><value>Office Open XML</value></prop> ++ <prop oor:name="UIName"> ++ <value>ECMA Office Open</value> ++ </prop> ++ <prop oor:name="ClipboardFormat"><value>OfficeOpen</value></prop> ++ </node> +Index: sc/source/ui/docshell/docsh.cxx +=================================================================== +RCS file: /cvs/sc/sc/source/ui/docshell/docsh.cxx,v +retrieving revision 1.83 +diff -u -p -u -r1.83 docsh.cxx +--- sc/source/ui/docshell/docsh.cxx 27 Jan 2006 15:51:57 -0000 1.83 ++++ sc/source/ui/docshell/docsh.cxx 20 Apr 2006 10:51:09 -0000 +@@ -185,6 +185,7 @@ static const sal_Char __FAR_DATA pFilter + static const sal_Char __FAR_DATA pFilterHtml[] = "HTML (StarCalc)"; + static const sal_Char __FAR_DATA pFilterHtmlWebQ[] = "calc_HTML_WebQuery"; + static const sal_Char __FAR_DATA pFilterRtf[] = "Rich Text Format (StarCalc)"; ++static const sal_Char __FAR_DATA pFilterOOXml[] = "ooxml"; + + //---------------------------------------------------------------------- + +@@ -886,6 +888,14 @@ BOOL __EXPORT ScDocShell::ConvertFrom( S + bSetColWidths = TRUE; + bSetRowHeights = TRUE; + } ++ else if (aFltName.EqualsAscii(pFilterOOXml)) ++ { ++ fprintf (stderr, "Load OO.o XML\n"); ++ ScColumn::bDoubleAlloc = TRUE; ++ FltError eError = ScImportECMA( rMedium, &aDocument); ++ ScColumn::bDoubleAlloc = FALSE; ++ bRet = TRUE; ++ } + else if ( aFltName.EqualsAscii(pFilterExcel4) || aFltName.EqualsAscii(pFilterExcel5) || + aFltName.EqualsAscii(pFilterExcel95) || aFltName.EqualsAscii(pFilterExcel97) || + aFltName.EqualsAscii(pFilterEx4Temp) || aFltName.EqualsAscii(pFilterEx5Temp) || diff --git a/patches/test/ooxml-sc-build.diff b/patches/test/ooxml-sc-build.diff new file mode 100644 index 000000000..a3f53f4e3 --- /dev/null +++ b/patches/test/ooxml-sc-build.diff @@ -0,0 +1,38 @@ +Index: sc/util/makefile.mk +=================================================================== +RCS file: /cvs/sc/sc/util/makefile.mk,v +retrieving revision 1.33 +diff -u -p -u -r1.33 makefile.mk +--- sc/util/makefile.mk 27 Jan 2006 15:52:35 -0000 1.33 ++++ sc/util/makefile.mk 19 Apr 2006 13:08:14 -0000 +@@ -182,6 +182,7 @@ LIB4FILES= \ + $(SLB)$/html.lib \ + $(SLB)$/lotus.lib \ + $(SLB)$/qpro.lib\ ++ $(SLB)$/ecma.lib\ + $(SLB)$/rtf.lib \ + $(SLB)$/xml.lib \ + $(SLB)$/accessibility.lib \ + + +Index: sc/prj/build.lst +=================================================================== +RCS file: /cvs/sc/sc/prj/build.lst,v +retrieving revision 1.11 +diff -u -p -u -r1.11 build.lst +--- sc/prj/build.lst 27 Jan 2006 15:49:40 -0000 1.11 ++++ sc/prj/build.lst 19 Apr 2006 13:08:47 -0000 +@@ -39,6 +40,7 @@ sc sc\source\filter\pch get - all s + sc sc\source\filter\excel nmake - all sc_excel sc_sdi NULL + sc sc\source\filter\lotus nmake - all sc_lotus sc_sdi NULL + sc sc\source\filter\qpro nmake - all sc_qpro sc_sdi NULL ++sc sc\source\filter\ecma nmake - all sc_ecma sc_sdi NULL + sc sc\source\filter\starcalc nmake - all sc_scalc sc_sdi NULL + sc sc\source\filter\dif nmake - all sc_dif sc_sdi NULL + sc sc\source\filter\rtf nmake - all sc_rtf sc_sdi NULL +@@ -48,4 +50,4 @@ sc sc\source\filter\xcl97 nmake - al + sc sc\addin\datefunc nmake - all sc_addfu sc_sdi NULL + sc sc\addin\rot13 nmake - all sc_adrot sc_sdi NULL + sc sc\addin\util nmake - all sc_adutil sc_addfu sc_adrot sc_sdi NULL +-sc sc\util nmake - all sc_util sc_addfu sc_adrot sc_adutil sc_app sc_attr sc_cctrl sc_cosrc sc_data sc_dbgui sc_dif sc_docsh sc_drfnc sc_excel sc_form sc_html sc_lotus sc_qpro sc_misc sc_name sc_nvipi sc_opt sc_page sc_rtf sc_scalc sc_style sc_tool sc_uisrc sc_undo sc_unobj sc_view sc_xcl97 sc_xml sc_acc sc_ftools sc_vba NULL ++sc sc\util nmake - all sc_util sc_addfu sc_adrot sc_adutil sc_app sc_attr sc_cctrl sc_cosrc sc_data sc_dbgui sc_dif sc_docsh sc_drfnc sc_excel sc_form sc_html sc_lotus sc_ecma sc_qpro sc_misc sc_name sc_nvipi sc_opt sc_page sc_rtf sc_scalc sc_style sc_tool sc_uisrc sc_undo sc_unobj sc_view sc_xcl97 sc_xml sc_acc sc_ftools sc_vba NULL diff --git a/patches/test/sc-source-filter-ecma-makefile-mk.diff b/patches/test/sc-source-filter-ecma-makefile-mk.diff new file mode 100644 index 000000000..1ddf69f84 --- /dev/null +++ b/patches/test/sc-source-filter-ecma-makefile-mk.diff @@ -0,0 +1,71 @@ +--- /dev/null ++++ sc/source/filter/ecma/makefile.mk +@@ -0,0 +1,68 @@ ++#************************************************************************* ++# ++# OpenOffice.org - a multi-platform office productivity suite ++# ++# $RCSfile$ ++# ++# $Revision$ ++# ++# last change: $Author$ $Date$ ++# ++# The Contents of this file are made available subject to ++# the terms of GNU Lesser General Public License Version 2.1. ++# ++# ++# GNU Lesser General Public License Version 2.1 ++# ============================================= ++# Copyright 2005 by Sun Microsystems, Inc. ++# 901 San Antonio Road, Palo Alto, CA 94303, USA ++# ++# This library is free software; you can redistribute it and/or ++# modify it under the terms of the GNU Lesser General Public ++# License version 2.1, as published by the Free Software Foundation. ++# ++# This library is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++# Lesser General Public License for more details. ++# ++# You should have received a copy of the GNU Lesser General Public ++# License along with this library; if not, write to the Free Software ++# Foundation, Inc., 59 Temple Place, Suite 330, Boston, ++# MA 02111-1307 USA ++# ++#************************************************************************* ++ ++PRJ=..$/..$/.. ++ ++PRJNAME=sc ++TARGET=ecma ++ ++PROJECTPCH4DLL=TRUE ++PROJECTPCH=filt_pch ++PROJECTPCHSOURCE=..\pch\filt_pch ++ ++AUTOSEG=true ++ ++ ++# --- Settings ----------------------------------------------------- ++ ++.INCLUDE : scpre.mk ++.INCLUDE : settings.mk ++.INCLUDE : sc.mk ++.INCLUDE : $(PRJ)$/util$/makefile.pmk ++ ++# --- Files -------------------------------------------------------- ++ ++CXXFILES = ecma.cxx ++ ++SLOFILES = \ ++ $(SLO)$/ecma.obj \ ++ $(SLO)$/parsebase.obj ++ ++EXCEPTIONSFILES = $(SLOFILES) ++ ++# --- Tagets ------------------------------------------------------- ++ ++.INCLUDE : target.mk ++ diff --git a/patches/test/sc-source-filter-ecma-parsebase-cxx.diff b/patches/test/sc-source-filter-ecma-parsebase-cxx.diff new file mode 100644 index 000000000..6f0f1767e --- /dev/null +++ b/patches/test/sc-source-filter-ecma-parsebase-cxx.diff @@ -0,0 +1,113 @@ +--- /dev/null ++++ sc/source/filter/ecma/parsebase.cxx +@@ -0,0 +1,110 @@ ++#include <stdio.h> ++#include <list> ++#include <com/sun/star/xml/sax/XParser.hpp> ++#include <com/sun/star/xml/sax/InputSource.hpp> ++#include <com/sun/star/xml/sax/SAXParseException.hpp> ++#include <com/sun/star/embed/ElementModes.hpp> ++#include <com/sun/star/embed/XStorage.hpp> ++#include <parsebase.hxx> ++#include <unotools/streamwrap.hxx> ++ ++using namespace com::sun::star; ++ ++class ScPathRefHolder ++{ ++ std::list< uno::Reference<embed::XStorage> > m_aUgly; ++ uno::Reference<io::XStream> m_xRef; ++ public: ++ ScPathRefHolder(uno::Reference<embed::XStorage> xStorage, ++ rtl::OUString aPath, long nOpenMode) ++ { ++ rtl::OUString aTok; ++ sal_Int32 nIdx = 0; ++ uno::Reference<io::XStream> xStream; ++ if (aPath[0] == sal_Unicode('/')) ++ nIdx++; ++ do ++ { ++ m_aUgly.push_back (xStorage); ++ aTok = aPath.getToken (0, sal_Unicode('/'), nIdx); ++// fprintf (stderr, "Tok '%s' (%d)\n", ++// rtl::OUStringToOString (aTok, RTL_TEXTENCODING_UTF8).getStr(), ++// nIdx); ++ if (nIdx >= 0) ++ xStorage = xStorage->openStorageElement (aTok, nOpenMode); ++ else ++ m_xRef = xStorage->openStreamElement (aTok, nOpenMode); ++ } ++ while (nIdx >= 0); ++ } ++ uno::Reference<io::XStream> get() ++ { ++ return m_xRef; ++ } ++}; ++ ++ScECMAParseBase::~ScECMAParseBase() ++{ ++ if (m_pPath) ++ delete m_pPath; ++} ++ ++FltError ++ScECMAParseBase::doParse(const uno::Reference<lang::XMultiServiceFactory> &xServiceFactory, ++ const uno::Reference<embed::XStorage> &xStorage, ++ const rtl::OUString &rStreamPath) ++{ ++ // get parser ++ uno::Reference<xml::sax::XParser> xParser ( ++ xServiceFactory->createInstance( ++ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.xml.sax.Parser" )) ), ++ uno::UNO_QUERY); ++ if (!xParser.is()) ++ return eERR_OPEN; ++ ++ xParser->setDocumentHandler (this); ++ ++ xml::sax::InputSource aParserInput; ++ ++ m_pPath = new ScPathRefHolder(xStorage, rStreamPath, ++ embed::ElementModes::READ); ++ ++ uno::Reference<io::XStream> xDocStream = m_pPath->get(); ++ if (!xDocStream.is()) ++ fprintf (stderr, "Foo\n"); ++ else ++ aParserInput.aInputStream = xDocStream->getInputStream(); ++ ++ aParserInput.sSystemId = rtl::OUString(); // hmm ? ++ ++ try ++ { ++ fprintf (stderr, "Do Parse\n"); ++ xParser->parseStream( aParserInput ); ++ } ++ catch( xml::sax::SAXParseException& r ) ++ { ++ fprintf (stderr, "SAX parse exception '%s'\n", ++ rtl::OUStringToOString (r.Message, RTL_TEXTENCODING_UTF8).getStr()); ++ } ++#if 0 ++ catch( packages::WrongPasswordException& ) ++ { ++ } ++ catch( packages::zip::ZipIOException& ) ++ { ++ } ++ catch( uno::Exception& ) ++ { ++ } ++#endif ++ return eERR_OK; ++} ++ ++void SAL_CALL ++ScECMAParseBase::startElement(const ::rtl::OUString& aName, ++ const css::uno::Reference< css::xml::sax::XAttributeList > & xAttribs) ++ throw( css::xml::sax::SAXException, css::uno::RuntimeException ) ++{ ++ fprintf (stderr, "startElement '%s'\n", rtl::OUStringToOString(aName, RTL_TEXTENCODING_UTF8).getStr()); ++} diff --git a/patches/test/sc-source-filter-ecma-parsebase-hxx.diff b/patches/test/sc-source-filter-ecma-parsebase-hxx.diff new file mode 100644 index 000000000..80b184f63 --- /dev/null +++ b/patches/test/sc-source-filter-ecma-parsebase-hxx.diff @@ -0,0 +1,50 @@ +--- /dev/null ++++ sc/source/filter/ecma/parsebase.hxx +@@ -0,0 +1,47 @@ ++#ifndef SC_ECMA_PARSEBASE_HXX ++#define SC_ECMA_PARSEBASE_HXX ++ ++#include "filter.hxx" ++#include "scerrors.hxx" ++#include <cppuhelper/implbase1.hxx> ++#include <com/sun/star/xml/sax/XDocumentHandler.hpp> ++ ++#define css ::com::sun::star ++ ++class ScPathRefHolder; ++ ++class ScECMAParseBase : public ::cppu::WeakImplHelper1< ++ css::xml::sax::XDocumentHandler > ++{ ++ private: ++ ScPathRefHolder *m_pPath; ++ public: ++ ScECMAParseBase() : m_pPath(NULL) {} ++ virtual ~ScECMAParseBase(); ++ ++ FltError doParse(const css::uno::Reference<css::lang::XMultiServiceFactory> &xServiceFactory, ++ const css::uno::Reference<css::embed::XStorage> &xStorage, ++ const rtl::OUString &rStreamPath); ++ ++ // css::xml::sax::XDocumentHandler ++ virtual void SAL_CALL startDocument(void) ++ throw( css::xml::sax::SAXException, css::uno::RuntimeException ) {} ++ virtual void SAL_CALL endDocument(void) ++ throw( css::xml::sax::SAXException, css::uno::RuntimeException ) {} ++ virtual void SAL_CALL startElement(const ::rtl::OUString& aName, ++ const css::uno::Reference< css::xml::sax::XAttributeList > & xAttribs) ++ throw( css::xml::sax::SAXException, css::uno::RuntimeException ); ++ virtual void SAL_CALL endElement(const ::rtl::OUString& aName) ++ throw( css::xml::sax::SAXException, css::uno::RuntimeException ) {} ++ virtual void SAL_CALL characters(const ::rtl::OUString& aChars) ++ throw( css::xml::sax::SAXException, css::uno::RuntimeException ) {} ++ virtual void SAL_CALL ignorableWhitespace(const ::rtl::OUString& aWhitespaces) ++ throw( css::xml::sax::SAXException, css::uno::RuntimeException ) {} ++ virtual void SAL_CALL processingInstruction(const ::rtl::OUString& aTarget, ++ const ::rtl::OUString& aData) ++ throw( css::xml::sax::SAXException, css::uno::RuntimeException ) {} ++ virtual void SAL_CALL setDocumentLocator(const css::uno::Reference< css::xml::sax::XLocator > & xLocator) ++ throw( css::xml::sax::SAXException, css::uno::RuntimeException ) {} ++}; ++ ++#endif // SC_ECMA_PARSEBASE_HXX diff --git a/scratch/sc-vba/vbaapplication.hxx b/scratch/sc-vba/vbaapplication.hxx index bb9e61061..c332fabb6 100644 --- a/scratch/sc-vba/vbaapplication.hxx +++ b/scratch/sc-vba/vbaapplication.hxx @@ -23,12 +23,12 @@ public: // XApplication virtual ::sal_Int32 SAL_CALL getCalculation() throw (css::uno::RuntimeException); virtual void SAL_CALL setCalculation( ::sal_Int32 _calculation ) throw (css::uno::RuntimeException); - virtual css::uno::Reference< oo::vba::XRange > getSelection() throw (css::uno::RuntimeException); - virtual css::uno::Reference< oo::vba::XWorkbook > getActiveWorkbook() throw (css::uno::RuntimeException); - virtual css::uno::Reference< oo::vba::XRange > getActiveCell() throw ( css::uno::RuntimeException); + virtual css::uno::Reference< oo::vba::XRange > SAL_CALL getSelection() throw (css::uno::RuntimeException); + virtual css::uno::Reference< oo::vba::XWorkbook > SAL_CALL getActiveWorkbook() throw (css::uno::RuntimeException); + virtual css::uno::Reference< oo::vba::XRange > SAL_CALL getActiveCell() throw ( css::uno::RuntimeException); virtual css::uno::Reference< oo::vba::XWindow > SAL_CALL getActiveWindow() throw (::com::sun::star::uno::RuntimeException); - virtual sal_Bool getScreenUpdating() throw (css::uno::RuntimeException); - virtual void setScreenUpdating(sal_Bool bUpdate) throw (css::uno::RuntimeException); + virtual sal_Bool SAL_CALL getScreenUpdating() throw (css::uno::RuntimeException); + virtual void SAL_CALL setScreenUpdating(sal_Bool bUpdate) throw (css::uno::RuntimeException); virtual css::uno::Reference< oo::vba::XWorkbook > SAL_CALL getThisWorkbook() throw (css::uno::RuntimeException); virtual css::uno::Any SAL_CALL Workbooks( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException); virtual css::uno::Any SAL_CALL WorksheetFunction( ) throw (css::uno::RuntimeException); diff --git a/scratch/sc-vba/vbacharacters.cxx b/scratch/sc-vba/vbacharacters.cxx index b9627099d..d4b3234e7 100644 --- a/scratch/sc-vba/vbacharacters.cxx +++ b/scratch/sc-vba/vbacharacters.cxx @@ -7,7 +7,7 @@ using namespace ::org::openoffice; using namespace ::com::sun::star; -ScVbaCharacters::ScVbaCharacters( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< text::XSimpleText>& xRange,const css::uno::Any& Start, const css::uno::Any& Length ) throw ( css::lang::IllegalArgumentException ) : m_xContext( xContext ), m_xSimpleText(xRange), nLength(-1), nStart(1) +ScVbaCharacters::ScVbaCharacters( const uno::Reference< uno::XComponentContext >& xContext, const ScVbaPalette& dPalette, const uno::Reference< text::XSimpleText>& xRange,const css::uno::Any& Start, const css::uno::Any& Length ) throw ( css::lang::IllegalArgumentException ) : m_xContext( xContext ), m_aPalette( dPalette), m_xSimpleText(xRange), nLength(-1), nStart(1) { Start >>= nStart; if ( nStart < 1 ) @@ -23,6 +23,7 @@ ScVbaCharacters::ScVbaCharacters( const uno::Reference< uno::XComponentContext > else xTextCursor->goRight( nLength, sal_True ); m_xTextRange.set( xTextCursor, uno::UNO_QUERY_THROW ); + } ::rtl::OUString SAL_CALL @@ -57,7 +58,7 @@ uno::Reference< vba::XFont > SAL_CALL ScVbaCharacters::getFont() throw (css::uno::RuntimeException) { uno::Reference< beans::XPropertySet > xProps( m_xTextRange, uno::UNO_QUERY_THROW ); - return uno::Reference< vba::XFont >( new ScVbaFont( xProps ) ); + return uno::Reference< vba::XFont >( new ScVbaFont( m_aPalette, xProps ) ); } void SAL_CALL ScVbaCharacters::setFont( const uno::Reference< vba::XFont >& _font ) throw (css::uno::RuntimeException) diff --git a/scratch/sc-vba/vbacharacters.hxx b/scratch/sc-vba/vbacharacters.hxx index a6f32dc8b..3cefbc856 100644 --- a/scratch/sc-vba/vbacharacters.hxx +++ b/scratch/sc-vba/vbacharacters.hxx @@ -8,7 +8,7 @@ #include <com/sun/star/text/XSimpleText.hpp> #include "vbahelper.hxx" - +#include "vbapalette.hxx" typedef ::cppu::WeakImplHelper1< oo::vba::XCharacters > ScVbaCharacters_BASE; class ScVbaCharacters : public ScVbaCharacters_BASE @@ -17,10 +17,11 @@ private: css::uno::Reference< css::text::XTextRange > m_xTextRange; css::uno::Reference< css::text::XSimpleText > m_xSimpleText; css::uno::Reference< css::uno::XComponentContext > m_xContext; + ScVbaPalette m_aPalette; sal_Int32 nLength; sal_Int32 nStart; public: - ScVbaCharacters( const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::text::XSimpleText >& xRange, const css::uno::Any& Start, const css::uno::Any& Length ) throw ( css::lang::IllegalArgumentException ); + ScVbaCharacters( const css::uno::Reference< css::uno::XComponentContext >& xContext, const ScVbaPalette& dPalette, const css::uno::Reference< css::text::XSimpleText >& xRange, const css::uno::Any& Start, const css::uno::Any& Length ) throw ( css::lang::IllegalArgumentException ); virtual ~ScVbaCharacters() {} // Attributes diff --git a/scratch/sc-vba/vbachart.hxx b/scratch/sc-vba/vbachart.hxx index 56a1c432b..b9ca0c4f7 100644 --- a/scratch/sc-vba/vbachart.hxx +++ b/scratch/sc-vba/vbachart.hxx @@ -16,7 +16,7 @@ class ScVbaChart : public ChartImpl_BASE public: ScVbaChart( const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::chart::XChartDocument >& xChartDoc ) : m_xContext(xContext), m_xChartDoc( xChartDoc ) {} virtual ::rtl::OUString SAL_CALL getName() throw (css::uno::RuntimeException); - virtual css::uno::Any SeriesCollection(const css::uno::Any&) throw (css::uno::RuntimeException); + virtual css::uno::Any SAL_CALL SeriesCollection(const css::uno::Any&) throw (css::uno::RuntimeException); }; diff --git a/scratch/sc-vba/vbacollectionimpl.cxx b/scratch/sc-vba/vbacollectionimpl.cxx index cfae261f0..6ec611511 100644 --- a/scratch/sc-vba/vbacollectionimpl.cxx +++ b/scratch/sc-vba/vbacollectionimpl.cxx @@ -89,13 +89,13 @@ uno::Any SAL_CALL ScVbaCollectionBaseImpl::Item( const uno::Any& aIndex ) throw return getItemByStringIndex( aStringSheet ); } -/* - // XEnumerationAccess -uno::Reference< container::XEnumeration > SAL_CALL ScVbaCollectionBaseImpl::createEnumeration() throw (uno::RuntimeException) +::rtl::OUString SAL_CALL +ScVbaCollectionBaseImpl::getName( ) throw (css::uno::RuntimeException) { - return uno::Reference< container::XEnumeration > (); + const static rtl::OUString sName( RTL_CONSTASCII_USTRINGPARAM("Item") ); + return sName; } -*/ + // XElementAccess ::sal_Bool SAL_CALL ScVbaCollectionBaseImpl::hasElements() throw (uno::RuntimeException) diff --git a/scratch/sc-vba/vbacollectionimpl.hxx b/scratch/sc-vba/vbacollectionimpl.hxx index 43269eeff..312da0db0 100644 --- a/scratch/sc-vba/vbacollectionimpl.hxx +++ b/scratch/sc-vba/vbacollectionimpl.hxx @@ -4,9 +4,11 @@ #include <org/openoffice/vba/XCollection.hpp> #include <com/sun/star/container/XEnumerationAccess.hpp> #include <com/sun/star/uno/XComponentContext.hpp> +#include <com/sun/star/script/XDefaultMethod.hpp> #include <com/sun/star/container/XIndexAccess.hpp> #include <com/sun/star/container/XNameAccess.hpp> +#include <cppuhelper/implbase3.hxx> #include <cppuhelper/implbase2.hxx> #include <cppuhelper/implbase1.hxx> @@ -29,8 +31,8 @@ public: -typedef ::cppu::WeakImplHelper2<oo::vba::XCollection, -css::container::XEnumerationAccess > XCollection_BASE; +typedef ::cppu::WeakImplHelper3<oo::vba::XCollection, +css::container::XEnumerationAccess, css::script::XDefaultMethod > XCollection_BASE; class ScVbaCollectionBaseImpl : public XCollection_BASE { @@ -53,6 +55,8 @@ public: virtual css::uno::Reference< oo::vba::XApplication > SAL_CALL getApplication() throw (css::uno::RuntimeException); virtual css::uno::Any SAL_CALL Item( const css::uno::Any& Index ) throw (css::uno::RuntimeException); + // XDefaultMethod + ::rtl::OUString SAL_CALL getName( ) throw (css::uno::RuntimeException); // XEnumerationAccess virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() throw (css::uno::RuntimeException) = 0; diff --git a/scratch/sc-vba/vbacomments.cxx b/scratch/sc-vba/vbacomments.cxx index a10f4084b..3fdc0d604 100644 --- a/scratch/sc-vba/vbacomments.cxx +++ b/scratch/sc-vba/vbacomments.cxx @@ -14,7 +14,7 @@ uno::Any AnnotationToComment( const uno::Any& aSource, uno::Reference< uno::XCom uno::Reference< container::XChild > xChild( xAnno, uno::UNO_QUERY_THROW ); uno::Reference< table::XCellRange > xCellRange( xChild->getParent(), uno::UNO_QUERY_THROW ); - return makeAny( uno::Reference< vba::XComment > ( new ScVbaComment( xContext, xCellRange ) ) ); + return uno::makeAny( uno::Reference< vba::XComment > ( new ScVbaComment( xContext, xCellRange ) ) ); } class CommentEnumeration : public EnumerationHelperImpl diff --git a/scratch/sc-vba/vbafont.cxx b/scratch/sc-vba/vbafont.cxx index a55030640..733a4fb6e 100644 --- a/scratch/sc-vba/vbafont.cxx +++ b/scratch/sc-vba/vbafont.cxx @@ -3,11 +3,188 @@ #include <com/sun/star/awt/FontUnderline.hpp> #include <com/sun/star/awt/FontStrikeout.hpp> #include <com/sun/star/awt/FontSlant.hpp> +#include <org/openoffice/vba/Excel/Constants.hpp> +#include <org/openoffice/vba/Excel/XlUnderlineStyle.hpp> #include "vbafont.hxx" using namespace ::org::openoffice; using namespace ::com::sun::star; +// use local constants there is no need to expose these constants +// externally. Looking at the Format->Character dialog it seem that +// these may infact be even be calculated. Leave hardcoded for now +// #FIXEME #TBD investigate the code for dialog mentioned above + +// The font baseline is not specified. +const short NORMAL = 0; + +// specifies a superscripted. +const short SUPERSCRIPT = 33; + +// specifies a subscripted. +const short SUBSCRIPT = -33; + +// specifies a hight of superscripted font + const sal_Int8 SUPERSCRIPTHEIGHT = 58; + +// specifies a hight of subscripted font +const sal_Int8 SUBSCRIPTHEIGHT = 58; + +// specifies a hight of normal font +const short NORMALHEIGHT = 100; + +void +ScVbaFont::setSuperscript( sal_Bool bValue ) throw ( uno::RuntimeException ) +{ + sal_Int16 nValue = NORMAL; + sal_Int8 nValue2 = NORMALHEIGHT; + + if( bValue ) + { + nValue = SUPERSCRIPT; + nValue2 = SUPERSCRIPTHEIGHT; + } + mxFont->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharEscapement" ) ), ( uno::Any )nValue ); + mxFont->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharEscapementHeight" ) ), ( uno::Any )nValue2 ); +} + +sal_Bool +ScVbaFont::getSuperscript() throw ( uno::RuntimeException ) +{ + short nValue = 0; + mxFont->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharEscapement" ) ) ) >>= nValue; + return( nValue == SUPERSCRIPT ); +} + +void +ScVbaFont::setSubscript( sal_Bool bValue ) throw ( uno::RuntimeException ) +{ + sal_Int16 nValue = NORMAL; + sal_Int8 nValue2 = NORMALHEIGHT; + + if( bValue ) + { + nValue= SUBSCRIPT; + nValue2 = SUBSCRIPTHEIGHT; + } + + mxFont->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharEscapementHeight" ) ), ( uno::Any )nValue2 ); + mxFont->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharEscapement" ) ), ( uno::Any )nValue ); + +} + +sal_Bool +ScVbaFont::getSubscript() throw ( uno::RuntimeException ) +{ + short nValue = NORMAL; + mxFont->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharEscapement" ) ) ) >>= nValue; + return( nValue == SUBSCRIPT ); +} + +void +ScVbaFont::setSize( float fValue ) throw( uno::RuntimeException ) +{ + mxFont->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharHeight" ) ), ( uno::Any )fValue ); +} + +float +ScVbaFont::getSize() throw ( uno::RuntimeException ) +{ + float fValue = 0.0; + mxFont->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharHeight" ) ) ) >>= fValue; + return fValue; +} + +void +ScVbaFont::setColorIndex( sal_Int32 lValue ) throw( uno::RuntimeException ) +{ + // #TODO #FIXME is behavior random or just default, maybe it depends + // on the parent object ( which we don't really take care of right now + if ( lValue == vba::Excel::Constants::xlColorIndexAutomatic ) + lValue = 0; + mxFont->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharColor" ) ), ( uno::Any )mPalette.getPalette()->getByIndex( --lValue ) ); +} + + +sal_Int32 +ScVbaFont::getColorIndex() throw ( uno::RuntimeException ) +{ +//XXX + sal_Int32 nColor = -1; + uno::Any aValue= mxFont->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharColor" ) ) ); + aValue >>= nColor; + uno::Reference< container::XIndexAccess > xIndex = mPalette.getPalette(); + sal_Int32 nElems = xIndex->getCount(); + sal_Int32 nIndex = -1; + for ( sal_Int32 count=0; count<nElems; ++count ) + { + sal_Int32 nPaletteColor; + xIndex->getByIndex( count ) >>= nPaletteColor; + if ( nPaletteColor == nColor ) + { + nIndex = count + 1; // 1 based + break; + } + } + return nIndex; +} + +////////////////////////////////////////////////////////////////////////////////////////// +void +ScVbaFont::setStandardFontSize( float fValue ) throw( uno::RuntimeException ) +{ +//XXX + //mxFont->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharSize" ) ), ( uno::Any )fValue ); + throw uno::RuntimeException( + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("setStandardFontSize not supported") ), uno::Reference< uno::XInterface >() ); +} + + +float +ScVbaFont::getStandardFontSize() throw ( uno::RuntimeException ) +{ +//XXX + throw uno::RuntimeException( + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("getStandardFontSize not supported") ), uno::Reference< uno::XInterface >() ); +} + + +void +ScVbaFont::setStandardFont( const ::rtl::OUString &rString ) throw( uno::RuntimeException ) +{ +//XXX + //mxFont->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharSize" ) ), ( uno::Any )aValue ); + throw uno::RuntimeException( + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("setStandardFont not supported") ), uno::Reference< uno::XInterface >() ); +} + + +::rtl::OUString +ScVbaFont::getStandardFont() throw ( uno::RuntimeException ) +{ +//XXX + throw uno::RuntimeException( + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("getStandardFont not supported") ), uno::Reference< uno::XInterface >() ); +} + +void +ScVbaFont::setFontStyle( const ::rtl::OUString &rString ) throw( uno::RuntimeException ) +{ +//XXX + //mxFont->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharSize" ) ), ( uno::Any )aValue ); + throw uno::RuntimeException( + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("setFontStyle not supported") ), uno::Reference< uno::XInterface >() ); +} + + +::rtl::OUString +ScVbaFont::getFontStyle() throw ( uno::RuntimeException ) +{ +//XXX + throw uno::RuntimeException( + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("getFontStyle not supported") ), uno::Reference< uno::XInterface >() ); +} + void ScVbaFont::setBold( sal_Bool bValue ) throw( uno::RuntimeException ) { @@ -22,27 +199,65 @@ sal_Bool ScVbaFont::getBold() throw ( uno::RuntimeException ) { double fValue; - uno::Any aValue = mxFont->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharWeight" ) ) ); - aValue >>= fValue; + mxFont->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharWeight" ) ) ) >>= fValue; return( fValue == awt::FontWeight::BOLD ); } void -ScVbaFont::setUnderline( sal_Bool bValue ) throw ( uno::RuntimeException ) +ScVbaFont::setUnderline( const uno::Any& aValue ) throw ( uno::RuntimeException ) { - short nValue = awt::FontUnderline::NONE; - if( bValue ) - nValue = awt::FontUnderline::SINGLE; + // default + sal_Int32 nValue = vba::Excel::XlUnderlineStyle::xlUnderlineStyleNone; + aValue >>= nValue; + switch ( nValue ) + { +// NOTE:: #TODO #FIMXE +// xlUnderlineStyleDoubleAccounting & xlUnderlineStyleSingleAccounting +// don't seem to be supported in Openoffice. +// The import filter converts them to single or double underlines as appropriate +// So, here at the moment we are similarly silently converting +// xlUnderlineStyleSingleAccounting to xlUnderlineStyleSingle. + + case vba::Excel::XlUnderlineStyle::xlUnderlineStyleNone: + nValue = awt::FontUnderline::NONE; + break; + case vba::Excel::XlUnderlineStyle::xlUnderlineStyleSingle: + case vba::Excel::XlUnderlineStyle::xlUnderlineStyleSingleAccounting: + nValue = awt::FontUnderline::SINGLE; + break; + case vba::Excel::XlUnderlineStyle::xlUnderlineStyleDouble: + case vba::Excel::XlUnderlineStyle::xlUnderlineStyleDoubleAccounting: + nValue = awt::FontUnderline::DOUBLE; + break; + default: + throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Unknown value for Underline")), uno::Reference< uno::XInterface >() ); + } + mxFont->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharUnderline" ) ), ( uno::Any )nValue ); + } -sal_Bool +uno::Any ScVbaFont::getUnderline() throw ( uno::RuntimeException ) { - short nValue = 0; - uno::Any aValue = mxFont->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharUnderline" ) ) ); - aValue >>= nValue; - return( nValue == awt::FontUnderline::SINGLE ); + sal_Int32 nValue = awt::FontUnderline::NONE; + mxFont->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharUnderline" ) ) ) >>= nValue; + switch ( nValue ) + { + case awt::FontUnderline::DOUBLE: + nValue = vba::Excel::XlUnderlineStyle::xlUnderlineStyleDouble; + break; + case awt::FontUnderline::SINGLE: + nValue = vba::Excel::XlUnderlineStyle::xlUnderlineStyleSingle; + break; + case awt::FontUnderline::NONE: + nValue = vba::Excel::XlUnderlineStyle::xlUnderlineStyleNone; + break; + default: + throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Unknown value retrieved for Underline") ), uno::Reference< uno::XInterface >() ); + + } + return uno::makeAny( nValue ); } void @@ -58,9 +273,8 @@ sal_Bool ScVbaFont::getStrikethrough() throw ( uno::RuntimeException ) { short nValue = 0; - uno::Any aValue = mxFont->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharStrikeout" ) ) ); - aValue >>= nValue; - return( nValue == awt::FontStrikeout::SINGLE ); + mxFont->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharStrikeout" ) ) ) >>= nValue; + return( nValue == awt::FontStrikeout::SINGLE ); } void @@ -73,8 +287,7 @@ sal_Bool ScVbaFont::getShadow() throw (uno::RuntimeException) { sal_Bool bValue = false; - uno::Any aValue = mxFont->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharShadowed" ) ) ); - aValue >>= bValue; + mxFont->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharShadowed" ) ) ) >>= bValue; return bValue; } @@ -91,8 +304,7 @@ sal_Bool ScVbaFont::getItalic() throw ( uno::RuntimeException ) { short nValue = 0; - uno::Any aValue = mxFont->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharPosture" ) ) ); - aValue >>= nValue; + mxFont->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharPosture" ) ) ) >>= nValue; return( nValue == awt::FontSlant_ITALIC ); } @@ -106,7 +318,6 @@ ScVbaFont::setName( const ::rtl::OUString &rString ) throw ( uno::RuntimeExcepti ScVbaFont::getName() throw ( uno::RuntimeException ) { ::rtl::OUString rString; - uno::Any aValue = mxFont->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharFontName" ) ) ); - aValue >>= rString; + mxFont->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharFontName" ) ) ) >>= rString; return rString; } diff --git a/scratch/sc-vba/vbafont.hxx b/scratch/sc-vba/vbafont.hxx index 2444908b4..b3698417e 100644 --- a/scratch/sc-vba/vbafont.hxx +++ b/scratch/sc-vba/vbafont.hxx @@ -6,6 +6,7 @@ #include <org/openoffice/vba/XFont.hpp> #include <com/sun/star/beans/XPropertySet.hpp> #include "vbahelper.hxx" +#include "vbapalette.hxx" class ScTableSheetsObj; @@ -14,16 +15,16 @@ typedef ::cppu::WeakImplHelper1< oo::vba::XFont > ScVbaFont_BASE; class ScVbaFont : public ScVbaFont_BASE { css::uno::Reference< css::beans::XPropertySet > mxFont; + ScVbaPalette mPalette; public: - ScVbaFont( css::uno::Reference< css::beans::XPropertySet > xPropertySet ) throw ( css::uno::RuntimeException ) : - mxFont( xPropertySet, css::uno::UNO_QUERY_THROW ){} + ScVbaFont( const ScVbaPalette& dPalette, css::uno::Reference< css::beans::XPropertySet > xPropertySet ) throw ( css::uno::RuntimeException ) : mPalette( dPalette ), mxFont( xPropertySet, css::uno::UNO_QUERY_THROW ){} virtual ~ScVbaFont() {} // Attributes virtual void SAL_CALL setBold( sal_Bool bValue ) throw (css::uno::RuntimeException); virtual sal_Bool SAL_CALL getBold() throw (css::uno::RuntimeException); - virtual void SAL_CALL setUnderline( sal_Bool bValue ) throw (css::uno::RuntimeException); - virtual sal_Bool SAL_CALL getUnderline() throw (css::uno::RuntimeException); + virtual void SAL_CALL setUnderline( const css::uno::Any& aValue ) throw (css::uno::RuntimeException); + virtual css::uno::Any SAL_CALL getUnderline() throw (css::uno::RuntimeException); virtual void SAL_CALL setStrikethrough( sal_Bool bValue ) throw (css::uno::RuntimeException); virtual sal_Bool SAL_CALL getStrikethrough() throw (css::uno::RuntimeException); virtual void SAL_CALL setShadow( sal_Bool bValue ) throw (css::uno::RuntimeException); @@ -31,8 +32,25 @@ public: virtual void SAL_CALL setItalic( sal_Bool bValue ) throw (css::uno::RuntimeException); virtual sal_Bool SAL_CALL getItalic() throw (css::uno::RuntimeException); virtual void SAL_CALL setName( const ::rtl::OUString &rString ) throw (css::uno::RuntimeException); - virtual ::rtl::OUString getName() throw (css::uno::RuntimeException); + virtual ::rtl::OUString SAL_CALL getName() throw (css::uno::RuntimeException); + virtual void SAL_CALL setSubscript( sal_Bool bValue ) throw (css::uno::RuntimeException); + virtual sal_Bool SAL_CALL getSubscript() throw (css::uno::RuntimeException); + virtual void SAL_CALL setSuperscript( sal_Bool bValue ) throw (css::uno::RuntimeException); + virtual sal_Bool SAL_CALL getSuperscript() throw (css::uno::RuntimeException); + virtual void SAL_CALL setStandardFontSize( float dValue ) throw (css::uno::RuntimeException); + virtual float SAL_CALL getStandardFontSize() throw (css::uno::RuntimeException); + virtual void SAL_CALL setStandardFont( const ::rtl::OUString &rString ) throw (css::uno::RuntimeException); + virtual ::rtl::OUString SAL_CALL getStandardFont() throw (css::uno::RuntimeException); + virtual void SAL_CALL setColorIndex( sal_Int32 bValue ) throw (css::uno::RuntimeException); + virtual sal_Int32 SAL_CALL getColorIndex() throw (css::uno::RuntimeException); + virtual void SAL_CALL setSize( float fValue ) throw (css::uno::RuntimeException); + virtual float SAL_CALL getSize() throw (css::uno::RuntimeException); + virtual void SAL_CALL setFontStyle( const ::rtl::OUString &rString ) throw (css::uno::RuntimeException); + virtual ::rtl::OUString SAL_CALL getFontStyle() throw (css::uno::RuntimeException); + }; + + #endif /* SC_VBA_FONT_HXX */ diff --git a/scratch/sc-vba/vbainterior.cxx b/scratch/sc-vba/vbainterior.cxx index aa3b31314..8f44019ea 100644 --- a/scratch/sc-vba/vbainterior.cxx +++ b/scratch/sc-vba/vbainterior.cxx @@ -12,62 +12,12 @@ #include <cppuhelper/queryinterface.hxx> #include <svx/xtable.hxx> -#include <document.hxx> #include "vbainterior.hxx" +#include "vbapalette.hxx" using namespace ::com::sun::star; using namespace ::org::openoffice; static const rtl::OUString BACKCOLOR( RTL_CONSTASCII_USTRINGPARAM( "CellBackColor" ) ); -/** Standard EGA colors, bright. */ -#define EXC_PALETTE_EGA_COLORS_LIGHT \ - 0x000000, 0xFFFFFF, 0xFF0000, 0x00FF00, 0x0000FF, 0xFFFF00, 0xFF00FF, 0x00FFFF -/** Standard EGA colors, dark. */ -#define EXC_PALETTE_EGA_COLORS_DARK \ - 0x800000, 0x008000, 0x000080, 0x808000, 0x800080, 0x008080, 0xC0C0C0, 0x808080 - -static const ColorData spnDefColorTable8[] = -{ -/* 8 */ EXC_PALETTE_EGA_COLORS_LIGHT, -/* 16 */ EXC_PALETTE_EGA_COLORS_DARK, -/* 24 */ 0x9999FF, 0x993366, 0xFFFFCC, 0xCCFFFF, 0x660066, 0xFF8080, 0x0066CC, 0xCCCCFF, -/* 32 */ 0x000080, 0xFF00FF, 0xFFFF00, 0x00FFFF, 0x800080, 0x800000, 0x008080, 0x0000FF, -/* 40 */ 0x00CCFF, 0xCCFFFF, 0xCCFFCC, 0xFFFF99, 0x99CCFF, 0xFF99CC, 0xCC99FF, 0xFFCC99, -/* 48 */ 0x3366FF, 0x33CCCC, 0x99CC00, 0xFFCC00, 0xFF9900, 0xFF6600, 0x666699, 0x969696, -/* 56 */ 0x003366, 0x339966, 0x003300, 0x333300, 0x993300, 0x993366, 0x333399, 0x333333 -}; - -typedef ::cppu::WeakImplHelper1< container::XIndexAccess > XIndexAccess_BASE; - -class DefaultPalette : public XIndexAccess_BASE -{ -public: - DefaultPalette(){} - - // Methods XIndexAccess - virtual ::sal_Int32 SAL_CALL getCount() throw (uno::RuntimeException) - { - return sizeof(spnDefColorTable8) / sizeof(spnDefColorTable8[0]); - } - - virtual uno::Any SAL_CALL getByIndex( ::sal_Int32 Index ) throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException) - { - if ( Index < 0 || Index >= getCount() ) - throw lang::IndexOutOfBoundsException(); - return uno::makeAny( sal_Int32( spnDefColorTable8[ Index ] ) ); - } - - // Methods XElementAcess - virtual uno::Type SAL_CALL getElementType() throw (uno::RuntimeException) - { - return ::getCppuType( (sal_Int32*)0 ); - } - virtual ::sal_Bool SAL_CALL hasElements() throw (uno::RuntimeException) - { - return sal_True; - } - -}; - ScVbaInterior::ScVbaInterior( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< beans::XPropertySet >& xProps, ScDocument* pScDoc ) throw ( lang::IllegalArgumentException) : m_xContext(xContext),m_xProps(xProps), m_pScDoc( pScDoc ) { @@ -94,17 +44,9 @@ ScVbaInterior::setColor( const uno::Any& _color ) throw (uno::RuntimeException) uno::Reference< container::XIndexAccess > ScVbaInterior::getPalette() { - uno::Reference< container::XIndexAccess > xIndex; SfxObjectShell* pShell = m_pScDoc->GetDocumentShell(); - uno::Reference< beans::XPropertySet > xProps; - if ( pShell ) - xProps.set( pShell->GetModel(), uno::UNO_QUERY_THROW ); - else - throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Can't extract palette, no doc shell" ) ), uno::Reference< uno::XInterface >() ); - xIndex.set( xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ColorPalette") ) ), uno::UNO_QUERY ); - if ( !xIndex.is() ) - return new DefaultPalette(); - return xIndex; + ScVbaPalette aPalette( pShell ); + return aPalette.getPalette(); } void SAL_CALL @@ -112,6 +54,9 @@ ScVbaInterior::setColorIndex( const css::uno::Any& _colorindex ) throw (css::uno { sal_Int32 nIndex = 0; _colorindex >>= nIndex; + // #FIXME xlColorIndexAutomatic & xlColorIndexNone are not really + // handled properly here + if ( nIndex && ( ( nIndex == vba::Excel::Constants::xlColorIndexAutomatic ) || ( nIndex == vba::Excel::Constants::xlColorIndexNone ) ) ) { setColor( uno::makeAny( (sal_Int32)-1 ) ); // default diff --git a/scratch/sc-vba/vbapalette.cxx b/scratch/sc-vba/vbapalette.cxx new file mode 100644 index 000000000..f8ea1058a --- /dev/null +++ b/scratch/sc-vba/vbapalette.cxx @@ -0,0 +1,72 @@ +#include "vbapalette.hxx" +#include <cppuhelper/implbase1.hxx> +#include <com/sun/star/beans/XPropertySet.hpp> + + +using namespace ::com::sun::star; +using namespace ::org::openoffice; + +/** Standard EGA colors, bright. */ +#define EXC_PALETTE_EGA_COLORS_LIGHT \ + 0x000000, 0xFFFFFF, 0xFF0000, 0x00FF00, 0x0000FF, 0xFFFF00, 0xFF00FF, 0x00FFFF +/** Standard EGA colors, dark. */ +#define EXC_PALETTE_EGA_COLORS_DARK \ + 0x800000, 0x008000, 0x000080, 0x808000, 0x800080, 0x008080, 0xC0C0C0, 0x808080 + +static const ColorData spnDefColorTable8[] = +{ +/* 8 */ EXC_PALETTE_EGA_COLORS_LIGHT, +/* 16 */ EXC_PALETTE_EGA_COLORS_DARK, +/* 24 */ 0x9999FF, 0x993366, 0xFFFFCC, 0xCCFFFF, 0x660066, 0xFF8080, 0x0066CC, 0xCCCCFF, +/* 32 */ 0x000080, 0xFF00FF, 0xFFFF00, 0x00FFFF, 0x800080, 0x800000, 0x008080, 0x0000FF, +/* 40 */ 0x00CCFF, 0xCCFFFF, 0xCCFFCC, 0xFFFF99, 0x99CCFF, 0xFF99CC, 0xCC99FF, 0xFFCC99, +/* 48 */ 0x3366FF, 0x33CCCC, 0x99CC00, 0xFFCC00, 0xFF9900, 0xFF6600, 0x666699, 0x969696, +/* 56 */ 0x003366, 0x339966, 0x003300, 0x333300, 0x993300, 0x993366, 0x333399, 0x333333 +}; + +typedef ::cppu::WeakImplHelper1< container::XIndexAccess > XIndexAccess_BASE; + +class DefaultPalette : public XIndexAccess_BASE +{ +public: + DefaultPalette(){} + + // Methods XIndexAccess + virtual ::sal_Int32 SAL_CALL getCount() throw (uno::RuntimeException) + { + return sizeof(spnDefColorTable8) / sizeof(spnDefColorTable8[0]); + } + + virtual uno::Any SAL_CALL getByIndex( ::sal_Int32 Index ) throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException) + { + if ( Index < 0 || Index >= getCount() ) + throw lang::IndexOutOfBoundsException(); + return uno::makeAny( sal_Int32( spnDefColorTable8[ Index ] ) ); + } + + // Methods XElementAcess + virtual uno::Type SAL_CALL getElementType() throw (uno::RuntimeException) + { + return ::getCppuType( (sal_Int32*)0 ); + } + virtual ::sal_Bool SAL_CALL hasElements() throw (uno::RuntimeException) + { + return sal_True; + } + +}; + +uno::Reference< container::XIndexAccess > +ScVbaPalette::getPalette() +{ + uno::Reference< container::XIndexAccess > xIndex; + uno::Reference< beans::XPropertySet > xProps; + if ( m_pShell ) + xProps.set( m_pShell->GetModel(), uno::UNO_QUERY_THROW ); + else + throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Can't extract palette, no doc shell" ) ), uno::Reference< uno::XInterface >() ); + xIndex.set( xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ColorPalette") ) ), uno::UNO_QUERY ); + if ( !xIndex.is() ) + return new DefaultPalette(); + return xIndex; +} diff --git a/scratch/sc-vba/vbapivottables.cxx b/scratch/sc-vba/vbapivottables.cxx index 01bf07f47..efe2a3269 100644 --- a/scratch/sc-vba/vbapivottables.cxx +++ b/scratch/sc-vba/vbapivottables.cxx @@ -10,7 +10,7 @@ using namespace ::org::openoffice; uno::Any DataPilotToPivotTable( const uno::Any& aSource, uno::Reference< uno::XComponentContext > & xContext ) { uno::Reference< sheet::XDataPilotTable > xTable( aSource, uno::UNO_QUERY_THROW ); - return makeAny( uno::Reference< vba::XPivotTable > ( new ScVbaPivotTable( xContext, xTable ) ) ); + return uno::makeAny( uno::Reference< vba::XPivotTable > ( new ScVbaPivotTable( xContext, xTable ) ) ); } class PivotTableEnumeration : public EnumerationHelperImpl diff --git a/scratch/sc-vba/vbarange.cxx b/scratch/sc-vba/vbarange.cxx index 5921ff01d..9d8f15f90 100644 --- a/scratch/sc-vba/vbarange.cxx +++ b/scratch/sc-vba/vbarange.cxx @@ -1,6 +1,7 @@ #include <comphelper/processfactory.hxx> #include <sfx2/objsh.hxx> +#include <com/sun/star/script/ArrayWrapper.hpp> #include <com/sun/star/sheet/XSheetOperation.hpp> #include <com/sun/star/sheet/CellFlags.hpp> #include <com/sun/star/table/XColumnRowRange.hpp> @@ -34,6 +35,10 @@ #include <com/sun/star/util/XSortable.hpp> #include <com/sun/star/sheet/XCellRangeMovement.hpp> #include <com/sun/star/sheet/XCellRangeData.hpp> + +#include <com/sun/star/style/XStyleFamiliesSupplier.hpp> +#include <com/sun/star/awt/XDevice.hpp> + //#include <com/sun/star/sheet/CellDeleteMode.hpp> #include <com/sun/star/sheet/XCellRangeMovement.hpp> @@ -70,7 +75,6 @@ #include "vbafont.hxx" #include "vbacomment.hxx" #include "vbainterior.hxx" -#include "vbaarraywrapper.hxx" #include "vbacharacters.hxx" #include <comphelper/anytostring.hxx> @@ -206,7 +210,7 @@ public: throw container::NoSuchElementException(); CellPos aPos = *(m_it)++; uno::Reference< table::XCellRange > xCellRange( m_xRange->getCellByPosition( aPos.m_nCol, aPos.m_nRow ), uno::UNO_QUERY_THROW ); - return makeAny( uno::Reference< vba::XRange >( new ScVbaRange( m_xContext, xCellRange ) ) ); + return uno::makeAny( uno::Reference< vba::XRange >( new ScVbaRange( m_xContext, xCellRange ) ) ); } }; @@ -216,6 +220,7 @@ const sal_Int32 RANGE_PROPERTY_ID_DFLT=1; // another property/method of the same name const ::rtl::OUString RANGE_PROPERTY_DFLT( RTL_CONSTASCII_USTRINGPARAM( "_$DefaultProp" ) ); const ::rtl::OUString ISVISIBLE( RTL_CONSTASCII_USTRINGPARAM( "IsVisible")); +const ::rtl::OUString WIDTH( RTL_CONSTASCII_USTRINGPARAM( "Width")); class CellValueSetter : public ArrayVisitor { @@ -454,6 +459,35 @@ public: }; +table::CellRangeAddress getCellRangeAddress( const uno::Any& aParam, +const uno::Reference< table::XCellRange >& xRanges ) +{ + uno::Reference< table::XCellRange > xRangeParam; + switch ( aParam.getValueTypeClass() ) + { + case uno::TypeClass_STRING: + { + rtl::OUString rString; + aParam >>= rString; + xRangeParam = xRanges->getCellRangeByName( rString ); + break; + } + case uno::TypeClass_INTERFACE: + { + uno::Reference< vba::XRange > xRange; + aParam >>= xRange; + if ( xRange.is() ) + xRange->getCellRange() >>= xRangeParam; + break; + } + default: + throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Can't extact CellRangeAddress from type" ) ), uno::Reference< uno::XInterface >() ); + } + uno::Reference< sheet::XCellRangeAddressable > xAddressable( xRangeParam, uno::UNO_QUERY_THROW ); + return xAddressable->getRangeAddress(); +} + + ScVbaRange::ScVbaRange( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< table::XCellRange >& xRange, sal_Bool bIsRows, sal_Bool bIsColumns ) throw( lang::IllegalArgumentException ) :OPropertyContainer(GetBroadcastHelper()) ,mxRange( xRange ), @@ -517,7 +551,7 @@ ScVbaRange::getValue() throw (uno::RuntimeException) // multi cell range ( return array ) Dim2ArrayValueGetter getter( nRowCount, nColCount ); visitArray( getter ); - return makeAny( uno::Reference< vba::XArrayWrapper >( new ScArrayWrapper( getter.getValue(), sal_False ) ) ); + return uno::makeAny( script::ArrayWrapper( sal_False, getter.getValue() ) ); } @@ -812,7 +846,12 @@ uno::Reference < vba::XFont > ScVbaRange::Font() throw (uno::RuntimeException) { uno::Reference< beans::XPropertySet > xProps(mxRange, ::uno::UNO_QUERY ); - return uno::Reference< vba::XFont >( new ScVbaFont( xProps ) ); + ScDocument* pDoc = getDocumentFromRange(mxRange); + if ( !pDoc ) + throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Failed to access document from shell" ) ), uno::Reference< uno::XInterface >() ); + + ScVbaPalette aPalette( pDoc->GetDocumentShell() ); + return uno::Reference< vba::XFont >( new ScVbaFont( aPalette, xProps ) ); } uno::Reference< vba::XRange > @@ -884,20 +923,35 @@ ScVbaRange::Rows(const uno::Any& aIndex ) throw (uno::RuntimeException) uno::Reference< vba::XRange > ScVbaRange::Columns( const uno::Any& aIndex ) throw (uno::RuntimeException) { - sal_Int32 nValue; - if( !aIndex.hasValue() ) - return uno::Reference< vba::XRange >( new ScVbaRange( m_xContext, mxRange, false, true ) ); - if( aIndex >>= nValue ) + if ( aIndex.hasValue() ) { - uno::Reference< sheet::XCellRangeAddressable > xAddressable( mxRange, uno::UNO_QUERY_THROW ); - --nValue; - return uno::Reference< vba::XRange >( new ScVbaRange( m_xContext, mxRange->getCellRangeByPosition( - nValue, xAddressable->getRangeAddress().StartRow, - nValue, xAddressable->getRangeAddress().EndRow ), false, true ) ); + uno::Reference< vba::XRange > xRange; + sal_Int32 nValue; + RangeHelper thisRange( mxRange ); + uno::Reference< sheet::XCellRangeAddressable > xThisRangeAddress = thisRange.getCellRangeAddressable(); + uno::Reference< table::XCellRange > xRanges = thisRange.getCellRangeFromSheet(); + table::CellRangeAddress thisRangeAddress = xThisRangeAddress->getRangeAddress(); + uno::Reference< table::XCellRange > xReferrer = xRanges->getCellRangeByPosition( thisRangeAddress.StartColumn, thisRangeAddress.StartRow, MAXCOL, thisRangeAddress.EndRow ); + + if ( aIndex >>= nValue ) + { + --nValue; + // col value can expand outside this range + // rows however cannot + + thisRangeAddress.StartColumn = nValue; + thisRangeAddress.EndColumn = nValue; + } + else + { + table::CellRangeAddress relAddress = getCellRangeAddress( aIndex, xRanges ); + thisRangeAddress.StartColumn = relAddress.StartColumn; + thisRangeAddress.EndColumn = relAddress.EndColumn; + } + return uno::Reference< vba::XRange >( new ScVbaRange( m_xContext, xReferrer->getCellRangeByPosition( thisRangeAddress.StartColumn, thisRangeAddress.StartRow, thisRangeAddress.EndColumn, thisRangeAddress.EndRow ), false, true ) ); } - // Questionable return, I'm just copying the invalid Any::value path - // above. Would seem to me that this is an internal error and - // warrants an exception thrown + // otherwise return this object ( e.g for columns property with no + // params return uno::Reference< vba::XRange >( new ScVbaRange( m_xContext, mxRange, false, true ) ); } @@ -1029,34 +1083,6 @@ uno::Reference< vba::XInterior > ScVbaRange::Interior( ) throw (uno::RuntimeExce uno::Reference< beans::XPropertySet > xProps( mxRange, uno::UNO_QUERY_THROW ); return uno::Reference<vba::XInterior> (new ScVbaInterior ( m_xContext, xProps, getDocumentFromRange( mxRange ) )); } -table::CellRangeAddress getCellRangeAddress( const uno::Any& aParam, -const uno::Reference< table::XCellRange >& xRanges ) -{ - uno::Reference< table::XCellRange > xRangeParam; - switch ( aParam.getValueTypeClass() ) - { - case uno::TypeClass_STRING: - { - rtl::OUString rString; - aParam >>= rString; - xRangeParam = xRanges->getCellRangeByName( rString ); - break; - } - case uno::TypeClass_INTERFACE: - { - uno::Reference< vba::XRange > xRange; - aParam >>= xRange; - if ( xRange.is() ) - xRange->getCellRange() >>= xRangeParam; - break; - } - default: - throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Can't extact CellRangeAddress from type" ) ), uno::Reference< uno::XInterface >() ); - } - uno::Reference< sheet::XCellRangeAddressable > xAddressable( xRangeParam, uno::UNO_QUERY_THROW ); - return xAddressable->getRangeAddress(); -} - uno::Reference< vba::XRange > ScVbaRange::Range( const uno::Any &Cell1, const uno::Any &Cell2 ) throw (uno::RuntimeException) { @@ -1163,12 +1189,26 @@ getPasteFormulaBits( sal_Int16 Operation) return nFormulaBits; } void SAL_CALL -ScVbaRange::PasteSpecial(sal_Int16 Paste, sal_Int16 Operation, ::sal_Bool SkipBlanks, ::sal_Bool Transpose ) throw (::com::sun::star::uno::RuntimeException) +ScVbaRange::PasteSpecial( const uno::Any& Paste, const uno::Any& Operation, const uno::Any& SkipBlanks, const uno::Any& Transpose ) throw (::com::sun::star::uno::RuntimeException) { - USHORT nFlags = getPasteFlags(Paste); - USHORT nFormulaBits = getPasteFormulaBits(Operation); - implnPasteSpecial(nFlags,nFormulaBits,SkipBlanks,Transpose); + // set up defaults + sal_Int32 nPaste = vba::xlPasteType::xlPasteAll; + sal_Int32 nOperation = vba::xlPasteSpecialOperation::xlPasteSpecialOperationNone; + sal_Bool bTranspose = sal_False; + sal_Bool bSkipBlanks = sal_False; + + if ( Paste.hasValue() ) + Paste >>= nPaste; + if ( Operation.hasValue() ) + Operation >>= nOperation; + if ( SkipBlanks.hasValue() ) + SkipBlanks >>= bSkipBlanks; + if ( Transpose.hasValue() ) + Transpose >>= bTranspose; + USHORT nFlags = getPasteFlags(nPaste); + USHORT nFormulaBits = getPasteFormulaBits(nOperation); + implnPasteSpecial(nFlags,nFormulaBits,bSkipBlanks,bTranspose); } uno::Reference< vba::XRange > @@ -1685,7 +1725,12 @@ ScVbaRange::characters( const uno::Any& Start, const css::uno::Any& Length ) thr if ( !isSingleCellRange() ) throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Can't create Characters property for multicell range ") ), uno::Reference< uno::XInterface >() ); uno::Reference< text::XSimpleText > xSimple(mxRange->getCellByPosition(0,0) , uno::UNO_QUERY_THROW ); - return uno::Reference< vba::XCharacters >( new ScVbaCharacters( m_xContext, xSimple, Start, Length ) ); + ScDocument* pDoc = getDocumentFromRange(mxRange); + if ( !pDoc ) + throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Failed to access document from shell" ) ), uno::Reference< uno::XInterface >() ); + + ScVbaPalette aPalette( pDoc->GetDocumentShell() ); + return uno::Reference< vba::XCharacters >( new ScVbaCharacters( m_xContext, aPalette, xSimple, Start, Length ) ); } void SAL_CALL @@ -1773,3 +1818,120 @@ ScVbaRange::getPropertySetInfo( ) throw (uno::RuntimeException) uno::Reference< beans::XPropertySetInfo > xInfo( createPropertySetInfo( getInfoHelper() ) ); return xInfo; } + +::rtl::OUString SAL_CALL +ScVbaRange::getName( ) throw (css::uno::RuntimeException) +{ + const static rtl::OUString sName( RTL_CONSTASCII_USTRINGPARAM("Cells") ); + return sName; +} + + +uno::Reference< awt::XDevice > +getDeviceFromDoc( const uno::Reference< frame::XModel >& xModel ) throw( uno::RuntimeException ) +{ + uno::Reference< frame::XController > xController( xModel->getCurrentController(), uno::UNO_QUERY_THROW ); + uno::Reference< frame::XFrame> xFrame( xController->getFrame(), uno::UNO_QUERY_THROW ); + uno::Reference< awt::XDevice > xDevice( xFrame->getComponentWindow(), uno::UNO_QUERY_THROW ); + return xDevice; +} + +// returns calc internal col. width ( in 1/100 mm ) +double +ScVbaRange::getCalcColWidth() throw (uno::RuntimeException) +{ + double nWidth = 0; + uno::Reference< table::XColumnRowRange > xColRowRange( mxRange, uno::UNO_QUERY_THROW ); + uno::Reference< beans::XPropertySet > xProps( xColRowRange->getColumns(), uno::UNO_QUERY_THROW ); + + xProps->getPropertyValue( WIDTH ) >>= nWidth; + return nWidth; +} +// return Char Width in 1/100 mm +double getDefaultCharWidth( const uno::Reference< frame::XModel >& xModel ) throw ( uno::RuntimeException ) +{ + const static rtl::OUString sDflt( RTL_CONSTASCII_USTRINGPARAM("Default")); + const static rtl::OUString sCharFontName( RTL_CONSTASCII_USTRINGPARAM("CharFontName")); + const static rtl::OUString sPageStyles( RTL_CONSTASCII_USTRINGPARAM("PageStyles")); + // get the font from the default style + uno::Reference< style::XStyleFamiliesSupplier > xStyleSupplier( xModel, uno::UNO_QUERY_THROW ); + uno::Reference< container::XNameAccess > xNameAccess( xStyleSupplier->getStyleFamilies(), uno::UNO_QUERY_THROW ); + uno::Reference< container::XNameAccess > xNameAccess2( xNameAccess->getByName( sPageStyles ), uno::UNO_QUERY_THROW ); + uno::Reference< beans::XPropertySet > xProps( xNameAccess2->getByName( sDflt ), uno::UNO_QUERY_THROW ); + rtl::OUString sFontName; + xProps->getPropertyValue( sCharFontName ) >>= sFontName; + + uno::Reference< awt::XDevice > xDevice = getDeviceFromDoc( xModel ); + awt::FontDescriptor aDesc; + aDesc.Name = sFontName; + uno::Reference< awt::XFont > xFont( xDevice->getFont( aDesc ), uno::UNO_QUERY_THROW ); + double nCharPixelWidth = xFont->getCharWidth( (sal_Int8)'0' ); + + double nPixelsPerMeter = xDevice->getInfo().PixelPerMeterX; + + double nCharWidth = nCharPixelWidth / nPixelsPerMeter; + nCharWidth = nCharWidth * (double)100 * (double)1000; + + return nCharWidth; +} + +uno::Any SAL_CALL +ScVbaRange::getColumnWidth() throw (uno::RuntimeException) +{ + double dfltCharWidth = 0; + ScDocShell* pShell = getDocShellFromRange( mxRange ); + if ( pShell ) + { + uno::Reference< frame::XModel > xModel = pShell->GetModel(); + if ( xModel.is() ) + dfltCharWidth = getCalcColWidth() / getDefaultCharWidth( xModel ); + } + return uno::makeAny( dfltCharWidth ); +} + +void SAL_CALL +ScVbaRange::setColumnWidth( const uno::Any& _columnwidth ) throw (uno::RuntimeException) +{ + double nColWidth = 0; + _columnwidth >>= nColWidth; + ScDocShell* pShell = getDocShellFromRange( mxRange ); + if ( pShell ) + { + uno::Reference< frame::XModel > xModel = pShell->GetModel(); + if ( xModel.is() ) + { + uno::Reference< table::XColumnRowRange > xColRowRange( mxRange, uno::UNO_QUERY_THROW ); + uno::Reference< beans::XPropertySet > xProps( xColRowRange->getColumns(), uno::UNO_QUERY_THROW ); + xProps->setPropertyValue( WIDTH, uno::makeAny( sal_Int32 ( getDefaultCharWidth( xModel ) * nColWidth ) ) ); + } + } +} + +uno::Any SAL_CALL +ScVbaRange::getWidth() throw (uno::RuntimeException) +{ + + double nWidth = getCalcColWidth(); + // Width is in 1/100 mm + // * 1 point = 1/72 inch = 20 twips + // * 1 inch = 72 points = 1440 twips + // * 1 cm = 567 twips + + // convert width to Points + nWidth = ( (double)((nWidth /1000 ) * 567 ) / 20 ); + return uno::makeAny( (sal_Int32)nWidth ); +} + +void SAL_CALL +ScVbaRange::setWidth( const uno::Any& _width ) throw (css::uno::RuntimeException) +{ + double nWidth; // Incomming width is in points + _width >>= nWidth; + // Convert nWidth to 1/100 mm + nWidth = (double)( ( nWidth * 20 ) / 567 ); + nWidth = (nWidth * 1000); + uno::Reference< table::XColumnRowRange > xColRowRange( mxRange, uno::UNO_QUERY_THROW ); + uno::Reference< beans::XPropertySet > xProps( xColRowRange->getColumns(), uno::UNO_QUERY_THROW ); + xProps->setPropertyValue( WIDTH , uno::makeAny( (sal_Int32)nWidth ) ); +} + diff --git a/scratch/sc-vba/vbarange.hxx b/scratch/sc-vba/vbarange.hxx index 76adbace9..f4d1a7b89 100644 --- a/scratch/sc-vba/vbarange.hxx +++ b/scratch/sc-vba/vbarange.hxx @@ -3,6 +3,7 @@ #include <cppuhelper/implbase1.hxx> #include <cppuhelper/implbase2.hxx> +#include <cppuhelper/implbase3.hxx> #include <com/sun/star/container/XEnumerationAccess.hpp> #include <org/openoffice/vba/XRange.hpp> @@ -17,6 +18,7 @@ #include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/beans/PropertyAttribute.hpp> #include <com/sun/star/script/XTypeConverter.hpp> +#include <com/sun/star/script/XDefaultMethod.hpp> #include <com/sun/star/sheet/FillDateMode.hpp> #include <com/sun/star/sheet/FillMode.hpp> #include <com/sun/star/sheet/FillDirection.hpp> @@ -26,7 +28,7 @@ class ScTableSheetsObj; -typedef ::cppu::WeakImplHelper2< oo::vba::XRange, css::container::XEnumerationAccess > ScVbaRange_BASE; +typedef ::cppu::WeakImplHelper3< oo::vba::XRange, css::container::XEnumerationAccess, css::script::XDefaultMethod > ScVbaRange_BASE; class ArrayVisitor { public: @@ -42,6 +44,7 @@ class ScVbaRange : public ScVbaRange_BASE sal_Bool mbIsRows; sal_Bool mbIsColumns; rtl::OUString msDftPropName; + double getCalcColWidth() throw (css::uno::RuntimeException); void visitArray( ArrayVisitor& vistor ); css::uno::Reference< css::script::XTypeConverter > getTypeConverter() throw (css::uno::RuntimeException); @@ -83,6 +86,11 @@ public: virtual css::uno::Reference< oo::vba::XComment > SAL_CALL getComment() throw (css::uno::RuntimeException); virtual css::uno::Any SAL_CALL getHidden() throw (css::uno::RuntimeException); virtual void SAL_CALL setHidden( const css::uno::Any& _hidden ) throw (css::uno::RuntimeException); + virtual css::uno::Any SAL_CALL getColumnWidth() throw (css::uno::RuntimeException); + virtual void SAL_CALL setColumnWidth( const css::uno::Any& _columnwidth ) throw (css::uno::RuntimeException); + virtual css::uno::Any SAL_CALL getWidth() throw (css::uno::RuntimeException); + virtual void SAL_CALL setWidth( const css::uno::Any& _width ) throw (css::uno::RuntimeException); + // Methods sal_Bool IsRows() { return mbIsRows; } sal_Bool IsColumns() { return mbIsColumns; } @@ -116,7 +124,7 @@ public: virtual css::uno::Reference< oo::vba::XRange > SAL_CALL Range( const css::uno::Any &Cell1, const css::uno::Any &Cell2 ) throw (css::uno::RuntimeException); virtual css::uno::Any SAL_CALL getCellRange( ) throw (css::uno::RuntimeException); - virtual void SAL_CALL PasteSpecial( sal_Int16 Paste, sal_Int16 Operation, ::sal_Bool SkipBlanks, ::sal_Bool Transpose ) throw (css::uno::RuntimeException); + virtual void SAL_CALL PasteSpecial( const css::uno::Any& Paste, const css::uno::Any& Operation, const css::uno::Any& SkipBlanks, const css::uno::Any& Transpose ) throw (css::uno::RuntimeException); virtual ::sal_Bool SAL_CALL Replace( const ::rtl::OUString& What, const ::rtl::OUString& Replacement, const css::uno::Any& LookAt, const css::uno::Any& SearchOrder, const css::uno::Any& MatchCase, const css::uno::Any& MatchByte, const css::uno::Any& SearchFormat, const css::uno::Any& ReplaceFormat ) throw (css::uno::RuntimeException); virtual void SAL_CALL Sort( const css::uno::Any& Key1, const css::uno::Any& Order1, const css::uno::Any& Key2, const css::uno::Any& Type, const css::uno::Any& Order2, const css::uno::Any& Key3, const css::uno::Any& Order3, const css::uno::Any& Header, const css::uno::Any& OrderCustom, const css::uno::Any& MatchCase, const css::uno::Any& Orientation, const css::uno::Any& SortMethod, const css::uno::Any& DataOption1, const css::uno::Any& DataOption2, const css::uno::Any& DataOption3 ) throw (css::uno::RuntimeException); virtual css::uno::Reference< oo::vba::XRange > SAL_CALL End( ::sal_Int32 Direction ) throw (css::uno::RuntimeException); @@ -143,6 +151,9 @@ public: } virtual sal_Bool SAL_CALL hasElements() throw (css::uno::RuntimeException); + // XDefaultMethod + ::rtl::OUString SAL_CALL getName( ) throw (css::uno::RuntimeException); + protected: // OPropertySetHelper virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper(); diff --git a/scratch/sc-vba/vbawindow.cxx b/scratch/sc-vba/vbawindow.cxx index bf072b03d..2bef41010 100644 --- a/scratch/sc-vba/vbawindow.cxx +++ b/scratch/sc-vba/vbawindow.cxx @@ -53,7 +53,7 @@ public: { throw container::NoSuchElementException(); } - return makeAny( uno::Reference< vba::XWorksheet > ( new ScVbaWorksheet( m_xContext, *(m_it++), m_xModel ) ) ); + return uno::makeAny( uno::Reference< vba::XWorksheet > ( new ScVbaWorksheet( m_xContext, *(m_it++), m_xModel ) ) ); } @@ -114,7 +114,7 @@ public: || Index >= sheets.size() ) throw lang::IndexOutOfBoundsException(); - return makeAny( sheets[ Index ] ); + return uno::makeAny( sheets[ Index ] ); } //XElementAccess @@ -134,7 +134,7 @@ public: NameIndexHash::const_iterator it = namesToIndices.find( aName ); if ( it == namesToIndices.end() ) throw container::NoSuchElementException(); - return makeAny( sheets[ it->second ] ); + return uno::makeAny( sheets[ it->second ] ); } @@ -212,7 +212,7 @@ uno::Any SAL_CALL ScVbaWindow::SelectedSheets( const uno::Any& aIndex ) throw (uno::RuntimeException) { uno::Reference< container::XEnumerationAccess > xEnumAccess( new SelectedSheetsEnumAccess( m_xContext, m_xModel ) ); - return makeAny( uno::Reference< vba::XWorksheets > ( new ScVbaWorksheets( m_xContext, xEnumAccess, m_xModel ) ) ); + return uno::makeAny( uno::Reference< vba::XWorksheets > ( new ScVbaWorksheets( m_xContext, xEnumAccess, m_xModel ) ) ); } void SAL_CALL diff --git a/scratch/sc-vba/vbaworksheet.hxx b/scratch/sc-vba/vbaworksheet.hxx index bfbdf7876..b84176ee3 100644 --- a/scratch/sc-vba/vbaworksheet.hxx +++ b/scratch/sc-vba/vbaworksheet.hxx @@ -44,8 +44,8 @@ public: // Attributes virtual ::rtl::OUString SAL_CALL getName() throw (css::uno::RuntimeException); virtual void SAL_CALL setName( const ::rtl::OUString &rName ) throw (css::uno::RuntimeException); - virtual sal_Bool getVisible() throw (css::uno::RuntimeException); - virtual void setVisible( sal_Bool bVisible ) throw (css::uno::RuntimeException); + virtual sal_Bool SAL_CALL getVisible() throw (css::uno::RuntimeException); + virtual void SAL_CALL setVisible( sal_Bool bVisible ) throw (css::uno::RuntimeException); virtual ::sal_Int32 SAL_CALL getStandardWidth() throw (css::uno::RuntimeException); virtual ::sal_Int32 SAL_CALL getStandardHeight() throw (css::uno::RuntimeException); virtual ::sal_Bool SAL_CALL getProtectionMode() throw (css::uno::RuntimeException); @@ -72,8 +72,8 @@ public: virtual void SAL_CALL CheckSpelling( const css::uno::Any& CustomDictionary,const css::uno::Any& IgnoreUppercase,const css::uno::Any& AlwaysSuggest, const css::uno::Any& SpellingLang ) throw (css::uno::RuntimeException); // Hacks (?) virtual css::uno::Reference< oo::vba::XRange > SAL_CALL Cells( const css::uno::Any &nRow, const css::uno::Any &nCol ) throw (css::uno::RuntimeException); - virtual css::uno::Reference< oo::vba::XRange > Rows(const css::uno::Any& aIndex ) throw (css::uno::RuntimeException); - virtual css::uno::Reference< oo::vba::XRange > Columns(const css::uno::Any& aIndex ) throw (css::uno::RuntimeException); + virtual css::uno::Reference< oo::vba::XRange > SAL_CALL Rows(const css::uno::Any& aIndex ) throw (css::uno::RuntimeException); + virtual css::uno::Reference< oo::vba::XRange > SAL_CALL Columns(const css::uno::Any& aIndex ) throw (css::uno::RuntimeException); virtual css::uno::Any SAL_CALL Evaluate( const ::rtl::OUString& Name ) throw (css::uno::RuntimeException); virtual css::uno::Any SAL_CALL PivotTables( const css::uno::Any& Index ) throw (css::uno::RuntimeException); diff --git a/scratch/sc-vba/vbaworksheets.cxx b/scratch/sc-vba/vbaworksheets.cxx index 2a460ebbf..040079f4b 100644 --- a/scratch/sc-vba/vbaworksheets.cxx +++ b/scratch/sc-vba/vbaworksheets.cxx @@ -39,7 +39,7 @@ public: virtual uno::Any SAL_CALL nextElement( ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException) { uno::Reference< sheet::XSpreadsheet > xSheet( m_xEnumeration->nextElement(), uno::UNO_QUERY_THROW ); - return makeAny( uno::Reference< vba::XWorksheet > ( new ScVbaWorksheet( m_xContext, xSheet, m_xModel ) ) ); + return uno::makeAny( uno::Reference< vba::XWorksheet > ( new ScVbaWorksheet( m_xContext, xSheet, m_xModel ) ) ); } }; @@ -75,7 +75,7 @@ uno::Any ScVbaWorksheets::createCollectionObject( const css::uno::Any& aSource ) { uno::Reference< sheet::XSpreadsheet > xSheet( aSource, uno::UNO_QUERY ); - return makeAny( uno::Reference< vba::XWorksheet > ( new ScVbaWorksheet( m_xContext, xSheet, mxModel ) ) ); + return uno::makeAny( uno::Reference< vba::XWorksheet > ( new ScVbaWorksheet( m_xContext, xSheet, mxModel ) ) ); } // XWorksheets |