diff options
author | nobody <nobody@gnome.org> | 2004-11-12 10:37:09 +0000 |
---|---|---|
committer | nobody <nobody@gnome.org> | 2004-11-12 10:37:09 +0000 |
commit | 32434a4a42e2b1afbc5b437454d93727cedc62c8 (patch) | |
tree | d7226cf8105635af580ef4ba9f283262b0d2da5f | |
parent | e09be5821129338602adc84119bcf9bee36cc5e7 (diff) |
This commit was manufactured by cvs2svn to create tagOOO_BUILD_1_3_6
'OOO_BUILD_1_3_6'.
70 files changed, 39902 insertions, 10497 deletions
@@ -1,3 +1,53 @@ +ooo-build-1.3.6 + + + bug fixes + + i18n + + Hebrew font fixes (Rene) + + merge-cell translations (Petr) + + Japanese font fixes (Petr) + + Korean font fixes (Dan) + + turkish currency update (Rene) + + Win32 bits + + .Net 2002 (Gabor Keresztfalvi) + + Java build (Raul) + + writerperfect Win32 build (Raul) + + Misc + + cell selection fixes (Nicel) + + escape closes print preview (Jayant) + + email attachment filenames (Jayant) + + desktop debug build fix (Josh Triplett) + + setup symlink fixes (Petr) + + Unix Desktop + + KDE fpicker (Jan) + + don't freeze on double-click + + confirmation for Save As + + translation fixes + + filter list fix + + KDE NFW fixes (Jan) + + gtk+ (Michael) + + NWF fixes + + IM mangling + + Interop + + word interop crasher (Caolan) + + writerperfect import fix (Friedrich Strba) + + Build + + word count compilation fix (Dan) + + improved RPM packaging (Dan) + + updated pyuno docs (Martin) + + MimeType fixes to .desktop files (Rene) + + improve per-desktop icon code (Arkadiusz) + + LD_ASSUME_KERNEL pain (Bernhard R) + + misc. (Rene, Raul) + + features + + much improved calc filters (Srinivasa) + + build with free .jars (Macro Pratesi) + + build vs. 1.3.3 final (Martin K) + + Linux/ARM support (Peter Naulls) + + basic lotus 123 import (Aswanth, Sunil Gandhi) + + evolution connectivity re-write (Jayant, Michael) + + pending + + Quattro Pro import (Shilpa, Michael) + ooo-build-1.3.5 + bug fixes diff --git a/bin/build-ooo b/bin/build-ooo index 9e46c4e31..65e377a57 100755 --- a/bin/build-ooo +++ b/bin/build-ooo @@ -49,7 +49,7 @@ export LANG="C"; if test "z$ENABLE_JAVA" = "zyes"; then # Many Java's can't cope with the NPTL on Linux. - LD_ASSUME_KERNEL=2.2.5 /bin/true 2> /dev/null || LD_ASSUME_KERNEL=2.4.10 /bin/true 2> /dev/null || LD_ASSUME_KERNEL=2.6.0 2> /dev/null || unset LD_ASSUME_KERNEL + LD_ASSUME_KERNEL=2.2.5 /bin/true 2> /dev/null || LD_ASSUME_KERNEL=2.4.10 /bin/true 2> /dev/null || LD_ASSUME_KERNEL=2.6.0 /bin/true 2> /dev/null || unset LD_ASSUME_KERNEL export LD_ASSUME_KERNEL fi # Don't do a massive painful install @@ -90,7 +90,7 @@ EXTRA_BUILD_FLAGS= if test $BUILD_NCPUS -gt 1; then EXTRA_BUILD_FLAGS="-P$BUILD_NCPUS" fi -if test "z$BUILD_WIN32"="z"; then +if test "z$BUILD_WIN32" = "z"; then EXTRA_BUILD_FLAGS="--dlv_switch link $EXTRA_BUILD_FLAGS" fi diff --git a/bin/oowintool b/bin/oowintool index 38cf6b04b..983bd9ad5 100755 --- a/bin/oowintool +++ b/bin/oowintool @@ -88,7 +88,7 @@ my %msvc6 = ( my %msvs_net_2002 = ( 'ver' => '7.0', 'key' => 'Microsoft/VisualStudio/7.0/Setup/VC/ProductDir', - 'dll_path' => '../SDK/v1.1/Bin', # testme ... + 'dll_path' => '../Visual Studio .NET Professional - English', # testme ... 'dll_suffix' => '70' ); my %msvs_net_2003 = ( diff --git a/bin/package-ooo b/bin/package-ooo index 42bdb544a..d2e3ab983 100755 --- a/bin/package-ooo +++ b/bin/package-ooo @@ -52,6 +52,33 @@ create_simple_wrapper() cat <<EOT >$2 #!/bin/sh +# Keep in ~sync with ooo-wrapper + +SystemInstallDir="$OOINSTBASE" + +if [ -n "\$GNOME_DESKTOP_SESSION_ID" -a -d "\$SystemInstallDir/program/resource.gnome" ]; then + icon_set="gnome" +elif [ -n "\$KDE_FULL_SESSION" -a -d "\$SystemInstallDir/program/resource.kde" ]; then + icon_set="kde" +fi + +if [ -z "\$icon_set" ]; then + if [ -d "\$SystemInstallDir/program/resource.default" ]; then + icon_set="default" + elif [ -d "\$SystemInstallDir/program/resource.kde" ]; then + icon_set="kde" + elif [ -d "\$SystemInstallDir/program/resource.gnome" ]; then + icon_set="gnome" + else + icon_set="default" + fi +fi + +if [ -d "\$SystemInstallDir/program/resource.\$icon_set" ]; then + OOO_PREFERRED_RESOURCE_PATH="\$SystemInstallDir/program/resource.\$icon_set" + export OOO_PREFERRED_RESOURCE_PATH +fi + exec "$1" "\$@" EOT chmod 755 $2 diff --git a/bin/setup.in b/bin/setup.in index 331eda47b..dcb194f43 100755 --- a/bin/setup.in +++ b/bin/setup.in @@ -129,6 +129,7 @@ CONFIGURE_OPTIONS="$CONFIGURE_OPTIONS $OOO_WIDGET_FLAGS" ENABLE_BONOBO=@ENABLE_BONOBO@ ENABLE_JAVA=@ENABLE_JAVA@ JDK_HOME=@JDK_HOME@ +ANT_HOME=@ANT_HOME@ # Misc. internal TOOLSDIR='@TOOLSDIR@' OOBUILDDIR='@OOBUILDDIR@' @@ -168,6 +169,10 @@ TCSH=/bin/tcsh # setup paths PATH="$BUILDDIR/bin:$PATH:$TOOLSDIR/bin" if test "z$ENABLE_JAVA" = "zyes"; then + if test "z$ANT_HOME" != "z"; then + CONFIGURE_OPTIONS="$CONFIGURE_OPTIONS --with-ant-home=$ANT_HOME" + PATH="$ANT_HOME:$PATH" + fi if test "z$JDK_HOME" != "z"; then CONFIGURE_OPTIONS="$CONFIGURE_OPTIONS --with-jdk-home=$JDK_HOME" PATH="$JDK_HOME:$PATH" diff --git a/bin/unpack b/bin/unpack index 5a6d12dea..816345606 100755 --- a/bin/unpack +++ b/bin/unpack @@ -102,6 +102,9 @@ tar $OOO_UNTAR_OPTIONS $SRCDIR/$OOO_TARBALL || exit 1 cp -af $TOOLSDIR/bin/oowintool $OOBUILDDIR/config_office chmod a+x $OOBUILDDIR/config_office/oowintool +# hack: fix possible packaging problem in 1.1.3 +chmod a+x $OOBUILDDIR/icu/convert.sh + # Win32 prerequisites ... if test "z$BUILD_WIN32" != "z"; then diff --git a/configure.in b/configure.in index 043a1c0ad..21c4e0167 100644 --- a/configure.in +++ b/configure.in @@ -4,7 +4,7 @@ AC_PREFIX_DEFAULT(/usr) OOO_BUILDMAJOR_VERSION=1 OOO_BUILDMINOR_VERSION=3 -OOO_BUILDMICRO_VERSION=5 +OOO_BUILDMICRO_VERSION=6 dnl this includes pre-pended period. OOO_BUILDSTRIKE_VERSION= OOO_BUILDVERSION="$OOO_BUILDMAJOR_VERSION.$OOO_BUILDMINOR_VERSION.$OOO_BUILDMICRO_VERSION$OOO_BUILDSTRIKE_VERSION" @@ -75,6 +75,11 @@ AC_ARG_WITH(jdk-home, Java is disabled, this option has no effect. ],,) +AC_ARG_WITH(ant-home, +[ + --with-ant-home: specify the path of your ant installation. +],,) + AC_ARG_WITH(installed-ooo-dirname, [ --with-installed-ooo-dirname: specify the directory name of the core OOo network @@ -249,10 +254,6 @@ if test "z$with_tag" = "z"; then fi APPLY_DIR="$TOOLSDIR/patches/$with_tag" -# Exceptions for some tags... -if test "z$with_tag" = "zOOO_1_1_3_fix2" ; then - APPLY_DIR="$TOOLSDIR/patches/OOO_1_1_3" -fi if test -f $APPLY_DIR/apply; then AC_MSG_RESULT( found $with_tag, using $APPLY_DIR/apply ) @@ -365,11 +366,15 @@ if test "z$with_distro" = "zArk"; then fi JDK_HOME= +ANT_HOME= if test "z$enable_java" = "zyes"; then ENABLE_JAVA=yes if test "z$with_jdk_home" != "z"; then JDK_HOME=$with_jdk_home fi + if test "z$with_ant_home" != "z"; then + ANT_HOME=$with_ant_home + fi else AC_PATH_PROG(XSLTPROC, xsltproc, no) if test "$XSLTPROC" = "no"; then @@ -379,6 +384,7 @@ else fi AC_SUBST(ENABLE_JAVA) AC_SUBST(JDK_HOME) +AC_SUBST(ANT_HOME) AC_CHECK_HEADER(security/pam_appl.h, have_pam=true, have_pam=false) AC_CHECK_HEADER(png.h, have_png=true, have_png=false) diff --git a/download.in b/download.in index e757ce96c..27fd6b2bf 100755 --- a/download.in +++ b/download.in @@ -23,6 +23,7 @@ sub usage { 'OOO_1_1_0.tar.bz2' => 'http://ooo.ximian.com/packages/OOO_1_1_0', 'OOO_1_1_1.tar.bz2' => 'http://ooo.ximian.com/packages/OOO_1_1_1', 'OOO_1_1_2.tar.bz2' => 'http://ooo.ximian.com/packages/OOO_1_1_2', + 'OOO_1_1_3.tar.bz2' => 'http://ooo.ximian.com/packages/OOO_1_1_3', 'OOO_1_1_3_fix2.tar.bz2' => 'http://ooo.ximian.com/packages/OOO_1_1_3', 'libwpd-snap-20040823.tar.gz' => 'http://ooo.ximian.com/packages', 'ooo-scaled-icons.tar.gz' => 'http://ooo.ximian.com/packages', diff --git a/patches/OOO_1_1/allow-free-jars.diff b/patches/OOO_1_1/allow-free-jars.diff new file mode 100644 index 000000000..d24c83b2d --- /dev/null +++ b/patches/OOO_1_1/allow-free-jars.diff @@ -0,0 +1,116 @@ +--- officecfg/org/openoffice/configuration/XMLDefaultGenerator.java.orig Mon Oct 20 09:53:18 2003 ++++ officecfg/org/openoffice/configuration/XMLDefaultGenerator.java Mon Oct 20 15:05:46 2003 +@@ -62,12 +62,12 @@ + + import org.xml.sax.*; + import org.w3c.dom.*; +-import com.sun.xml.tree.XmlDocument; ++//import com.sun.xml.tree.XmlDocument; + import org.xml.sax.SAXException; + import org.xml.sax.SAXParseException; + import javax.xml.parsers.SAXParserFactory; + import javax.xml.parsers.SAXParser; +-import com.sun.xml.tree.*; ++//import com.sun.xml.tree.*; + import java.util.*; + import java.io.*; + import com.jclark.xsl.sax.Driver; +--- XmlSearch/prj/build.lst.orig Mon Oct 20 13:58:06 2003 ++++ XmlSearch/prj/build.lst Mon Oct 20 13:58:11 2003 +@@ -1,2 +1 @@ + xh XmlSearch : external codemaker NULL +-xh XmlSearch\src\com\sun\xmlsearch nmake - all xs NULL +--- xmlhelp/prj/build.lst.orig Mon Oct 20 13:53:25 2003 ++++ xmlhelp/prj/build.lst Mon Oct 20 13:53:33 2003 +@@ -2,7 +2,6 @@ + xh xmlhelp usr1 - all xh_mkout NULL + xh xmlhelp\source\helpprovider nmake - all xh_helpprovider NULL + xh xmlhelp\source\treeview nmake - all xh_treeview NULL +-xh xmlhelp\source\com\sun\star\help nmake - all xh_help NULL + xh xmlhelp\source\cxxhelp\util nmake - all xh_cutil NULL + xh xmlhelp\source\cxxhelp\qe nmake - all xh_qe NULL + xh xmlhelp\source\cxxhelp\db nmake - all xh_db NULL +Index: util/makefile.pmk +=================================================================== +RCS file: /cvs/installation/readlicense/util/makefile.pmk,v +retrieving revision 1.2.30.1 +diff -u -u -r1.2.30.1 makefile.pmk +--- readlicense_oo/util/makefile.pmk 9 Jan 2004 18:10:12 -0000 1.2.30.1 ++++ readlicense_oo/util/makefile.pmk 17 Oct 2004 22:32:06 -0000 +@@ -79,7 +79,7 @@ + $(MISC)$/%.html : + @+-$(MKDIR) $(@:d) + .IF "$(SOLAR_JAVA)"!="" +- $(JAVA) -classpath $(COMMON_BUILD_TOOLS)$/xt.jar$(PATH_SEPERATOR)$(COMMON_BUILD_TOOLS)$/parser.jar -Dcom.jclark.xsl.sax.parser=com.sun.xml.parser.Parser com.jclark.xsl.sax.Driver $(subst,$(@::d:d:b), $(@:b).xrm) ..$/readme.xsl os1=$(OS) gui1=$(GUI) cp1=$(CPUNAME) com1=$(COM) lang1=$(iso_$(@:d:d:b)) type=html file=$@ ++ $(JAVA) -classpath $(COMMON_BUILD_TOOLS)$/xt.jar$(PATH_SEPERATOR)$(COMMON_BUILD_TOOLS)$/parser.jar com.jclark.xsl.sax.Driver $(subst,$(@::d:d:b), $(@:b).xrm) ..$/readme.xsl os1=$(OS) gui1=$(GUI) cp1=$(CPUNAME) com1=$(COM) lang1=$(iso_$(@:d:d:b)) type=html file=$@ + .ELSE + sed 's|xmlns:xt="http://www.jclark.com/xt"||;s|extension-element-prefixes="xt"||;s|.*xt:document.*||;s|<xsl:output method = "HTML" doctype-public = "-//W3C//DTD HTML 3.2//EN" />|<xsl:output method="html" doctype-public="-//W3C//DTD HTML 3.2//EN" />|' < ..$/readme.xsl > ..$/readme2.xsl + xsltproc -o $@ \ +@@ -97,7 +97,7 @@ + $(MISC)$/%.txt : + @+-$(MKDIR) $(@:d) + .IF "$(SOLAR_JAVA)"!="" +- $(JAVA) -classpath $(COMMON_BUILD_TOOLS)$/xt.jar$(PATH_SEPERATOR)$(COMMON_BUILD_TOOLS)$/parser.jar -Dcom.jclark.xsl.sax.parser=com.sun.xml.parser.Parser com.jclark.xsl.sax.Driver $(subst,$(@::d:d:b), $(@:b).xrm) ..$/readme.xsl os1=$(OS) gui1=$(GUI) cp1=$(CPUNAME) com1=$(COM) lang1=$(iso_$(@:d:d:b)) type=text file=$@ ++ $(JAVA) -classpath $(COMMON_BUILD_TOOLS)$/xt.jar$(PATH_SEPERATOR)$(COMMON_BUILD_TOOLS)$/parser.jar com.jclark.xsl.sax.Driver $(subst,$(@::d:d:b), $(@:b).xrm) ..$/readme.xsl os1=$(OS) gui1=$(GUI) cp1=$(CPUNAME) com1=$(COM) lang1=$(iso_$(@:d:d:b)) type=text file=$@ + .ELSE + sed 's|xmlns:xt="http://www.jclark.com/xt"||;s|extension-element-prefixes="xt"||;s|.*xt:document.*||;s|<xsl:output method = "HTML" doctype-public = "-//W3C//DTD HTML 3.2//EN" />|<xsl:output method="text" />|' < ..$/readme.xsl > ..$/readme2.xsl + xsltproc -o $@ \ +Index: makefile.pmk +=================================================================== +RCS file: /cvs/util/officecfg/util/makefile.pmk,v +retrieving revision 1.23.94.1 +diff -u -u -r1.23.94.1 makefile.pmk +--- officecfg/util/makefile.pmk 9 Jan 2004 18:06:41 -0000 1.23.94.1 ++++ officecfg/util/makefile.pmk 17 Oct 2004 22:35:53 -0000 +@@ -68,11 +68,11 @@ + @+echo -------------+ validating and stripping schema files + -$(MKDIR) -p $(@:d) + .IF "$(SOLAR_JAVA)"!="" +- $(JAVA) -classpath $(SOLARBINDIR)$/jaxp.jar$(PATH_SEPERATOR)$(SOLARBINDIR)$/parser.jar$(PATH_SEPERATOR)$(CLASSDIR)$/cfgimport.jar -Djavax.xml.parsers.SAXParserFactory=com.sun.xml.parser.SAXParserFactoryImpl org.openoffice.configuration.Inspector $< +- $(JAVA) -classpath $(SOLARBINDIR)$/xt.jar$(PATH_SEPERATOR)$(SOLARBINDIR)$/parser.jar -Dcom.jclark.xsl.sax.parser=com.sun.xml.parser.Parser com.jclark.xsl.sax.Driver $< $(PRJ)$/util$/schema_val.xsl $(@:d)$(<:b).val file=$(<:d)$(<:b) pathSeparator=$/ +- $(JAVA) -classpath $(SOLARBINDIR)$/xt.jar$(PATH_SEPERATOR)$(SOLARBINDIR)$/parser.jar -Dcom.jclark.xsl.sax.parser=com.sun.xml.parser.Parser com.jclark.xsl.sax.Driver $< $(PRJ)$/util$/sanity.xsl $(@:d)$(<:b).san file=$(<:d)$(<:b) pathSeparator=$/ +- $(JAVA) -classpath $(SOLARBINDIR)$/xt.jar$(PATH_SEPERATOR)$(SOLARBINDIR)$/parser.jar -Dcom.jclark.xsl.sax.parser=com.sun.xml.parser.Parser com.jclark.xsl.sax.Driver $< $(PRJ)$/util$/schema_trim.xsl $(@:d)$(<:b).tmp +- $(JAVA) -classpath $(SOLARBINDIR)$/jaxp.jar$(PATH_SEPERATOR)$(SOLARBINDIR)$/parser.jar$(PATH_SEPERATOR)$(CLASSDIR)$/schema.jar -Djavax.xml.parsers.SAXParserFactory=com.sun.xml.parser.SAXParserFactoryImpl org.openoffice.helper.PrettyPrinter $(@:d)$(<:b).tmp $(@:d)$(<:b).xcs ++ $(JAVA) -classpath $(SOLARBINDIR)$/jaxp.jar$(PATH_SEPERATOR)$(SOLARBINDIR)$/parser.jar$(PATH_SEPERATOR)$(CLASSDIR)$/cfgimport.jar org.openoffice.configuration.Inspector $< ++ $(JAVA) -classpath $(SOLARBINDIR)$/xt.jar$(PATH_SEPERATOR)$(SOLARBINDIR)$/parser.jar com.jclark.xsl.sax.Driver $< $(PRJ)$/util$/schema_val.xsl $(@:d)$(<:b).val file=$(<:d)$(<:b) pathSeparator=$/ ++ $(JAVA) -classpath $(SOLARBINDIR)$/xt.jar$(PATH_SEPERATOR)$(SOLARBINDIR)$/parser.jar com.jclark.xsl.sax.Driver $< $(PRJ)$/util$/sanity.xsl $(@:d)$(<:b).san file=$(<:d)$(<:b) pathSeparator=$/ ++ $(JAVA) -classpath $(SOLARBINDIR)$/xt.jar$(PATH_SEPERATOR)$(SOLARBINDIR)$/parser.jar com.jclark.xsl.sax.Driver $< $(PRJ)$/util$/schema_trim.xsl $(@:d)$(<:b).tmp ++ $(JAVA) -classpath $(SOLARBINDIR)$/jaxp.jar$(PATH_SEPERATOR)$(SOLARBINDIR)$/parser.jar$(PATH_SEPERATOR)$(CLASSDIR)$/schema.jar org.openoffice.helper.PrettyPrinter $(@:d)$(<:b).tmp $(@:d)$(<:b).xcs + .ELSE + # xsltproc already validates against the dtd. For additional validation, + # org.openoffice.configuration.Inspector should be replaced and the +@@ -98,7 +98,7 @@ + @+echo -------------+ creating locale dependent resource bundles + -$(MKDIR) -p $(@:d) + .IF "$(SOLAR_JAVA)"!="" +- $(JAVA) -classpath $(SOLARBINDIR)$/xt.jar$(PATH_SEPERATOR)$(SOLARBINDIR)$/parser.jar -Dcom.jclark.xsl.sax.parser=com.sun.xml.parser.Parser com.jclark.xsl.sax.Driver $< $(PRJ)$/util$/resource.xsl $(@:d)$(<:b).properties locale={$(subst,$/$<, $(subst,$(MISC)$/registry$/res$/, $(subst,.properties,.xcs $@)))} ++ $(JAVA) -classpath $(SOLARBINDIR)$/xt.jar$(PATH_SEPERATOR)$(SOLARBINDIR)$/parser.jar com.jclark.xsl.sax.Driver $< $(PRJ)$/util$/resource.xsl $(@:d)$(<:b).properties locale={$(subst,$/$<, $(subst,$(MISC)$/registry$/res$/, $(subst,.properties,.xcs $@)))} + .ELSE + $(XSLTPROC) -o $(@:d)$(<:b).properties \ + --stringparam locale {$(subst,$/$<, $(subst,$(MISC)$/registry$/res$/, $(subst,.properties,.xcs $@)))} \ +@@ -111,10 +111,10 @@ + @+echo -------------+ validating and creating a locale independent file + -$(MKDIR) -p $(@:d) + .IF "$(SOLAR_JAVA)"!="" +- $(JAVA) -classpath $(SOLARBINDIR)$/jaxp.jar$(PATH_SEPERATOR)$(SOLARBINDIR)$/parser.jar$(PATH_SEPERATOR)$(CLASSDIR)$/cfgimport.jar -Djavax.xml.parsers.SAXParserFactory=com.sun.xml.parser.SAXParserFactoryImpl org.openoffice.configuration.Inspector $< +- $(JAVA) -classpath $(SOLARBINDIR)$/xt.jar$(PATH_SEPERATOR)$(SOLARBINDIR)$/parser.jar$(PATH_SEPERATOR)$(CLASSDIR)$/cfgimport.jar -Dcom.jclark.xsl.sax.parser=com.sun.xml.parser.Parser com.jclark.xsl.sax.Driver $< $(PRJ)$/util$/data_val.xsl $(@:d)$(<:b).val xcs=$(PRJ)$/registry$/schema$/$(<:d)$(<:b).xcs schemaRoot=$(PRJ)$/registry$/schema +- $(JAVA) -classpath $(SOLARBINDIR)$/xt.jar$(PATH_SEPERATOR)$(SOLARBINDIR)$/parser.jar$(PATH_SEPERATOR)$(CLASSDIR)$/cfgimport.jar -Dcom.jclark.xsl.sax.parser=com.sun.xml.parser.Parser com.jclark.xsl.sax.Driver $< $(PRJ)$/util$/alllang.xsl $(@:d)$(<:b).tmp xcs=$(PRJ)$/registry$/schema$/$(<:d)$(<:b).xcs schemaRoot=$(PRJ)$/registry$/schema +- $(JAVA) -classpath $(SOLARBINDIR)$/jaxp.jar$(PATH_SEPERATOR)$(SOLARBINDIR)$/parser.jar$(PATH_SEPERATOR)$(CLASSDIR)$/schema.jar -Djavax.xml.parsers.SAXParserFactory=com.sun.xml.parser.SAXParserFactoryImpl org.openoffice.helper.PrettyPrinter $(@:d)$(<:b).tmp $(@:d)$(<:b).xcu ++ $(JAVA) -classpath $(SOLARBINDIR)$/jaxp.jar$(PATH_SEPERATOR)$(SOLARBINDIR)$/parser.jar$(PATH_SEPERATOR)$(CLASSDIR)$/cfgimport.jar org.openoffice.configuration.Inspector $< ++ $(JAVA) -classpath $(SOLARBINDIR)$/xt.jar$(PATH_SEPERATOR)$(SOLARBINDIR)$/parser.jar$(PATH_SEPERATOR)$(CLASSDIR)$/cfgimport.jar com.jclark.xsl.sax.Driver $< $(PRJ)$/util$/data_val.xsl $(@:d)$(<:b).val xcs=$(PRJ)$/registry$/schema$/$(<:d)$(<:b).xcs schemaRoot=$(PRJ)$/registry$/schema ++ $(JAVA) -classpath $(SOLARBINDIR)$/xt.jar$(PATH_SEPERATOR)$(SOLARBINDIR)$/parser.jar$(PATH_SEPERATOR)$(CLASSDIR)$/cfgimport.jar com.jclark.xsl.sax.Driver $< $(PRJ)$/util$/alllang.xsl $(@:d)$(<:b).tmp xcs=$(PRJ)$/registry$/schema$/$(<:d)$(<:b).xcs schemaRoot=$(PRJ)$/registry$/schema ++ $(JAVA) -classpath $(SOLARBINDIR)$/jaxp.jar$(PATH_SEPERATOR)$(SOLARBINDIR)$/parser.jar$(PATH_SEPERATOR)$(CLASSDIR)$/schema.jar org.openoffice.helper.PrettyPrinter $(@:d)$(<:b).tmp $(@:d)$(<:b).xcu + .ELSE + # xsltproc already validates against the dtd. For additional validation, + # org.openoffice.configuration.Inspector should be replaced and the +@@ -142,8 +142,8 @@ + @+echo -------------+ creating locale dependent entries + -$(MKDIR) -p $(@:d) + .IF "$(SOLAR_JAVA)"!="" +- $(JAVA) -classpath $(SOLARBINDIR)$/xt.jar$(PATH_SEPERATOR)$(SOLARBINDIR)$/parser.jar$(PATH_SEPERATOR)$(CLASSDIR)$/cfgimport.jar -Dcom.jclark.xsl.sax.parser=com.sun.xml.parser.Parser com.jclark.xsl.sax.Driver $< $(PRJ)$/util$/alllang.xsl $(@:d)$(<:b).tmp xcs=$(PRJ)$/registry$/schema$/$(<:d)$(<:b).xcs schemaRoot=$(PRJ)$/registry$/schema locale={$(subst,$/$<, $(subst,$(MISC)$/registry$/res$/, $@))} +- $(JAVA) -classpath $(SOLARBINDIR)$/jaxp.jar$(PATH_SEPERATOR)$(SOLARBINDIR)$/parser.jar$(PATH_SEPERATOR)$(CLASSDIR)$/schema.jar -Djavax.xml.parsers.SAXParserFactory=com.sun.xml.parser.SAXParserFactoryImpl org.openoffice.helper.PrettyPrinter $(@:d)$(<:b).tmp $(@:d)$(<:b).xcu ++ $(JAVA) -classpath $(SOLARBINDIR)$/xt.jar$(PATH_SEPERATOR)$(SOLARBINDIR)$/parser.jar$(PATH_SEPERATOR)$(CLASSDIR)$/cfgimport.jar com.jclark.xsl.sax.Driver $< $(PRJ)$/util$/alllang.xsl $(@:d)$(<:b).tmp xcs=$(PRJ)$/registry$/schema$/$(<:d)$(<:b).xcs schemaRoot=$(PRJ)$/registry$/schema locale={$(subst,$/$<, $(subst,$(MISC)$/registry$/res$/, $@))} ++ $(JAVA) -classpath $(SOLARBINDIR)$/jaxp.jar$(PATH_SEPERATOR)$(SOLARBINDIR)$/parser.jar$(PATH_SEPERATOR)$(CLASSDIR)$/schema.jar org.openoffice.helper.PrettyPrinter $(@:d)$(<:b).tmp $(@:d)$(<:b).xcu + .ELSE + $(SED) 's|xmlns:filehelper="http://www.jclark.com/xt/java/org.openoffice.configuration.FileHelper"||;s|extension-element-prefixes="filehelper"||;s|filehelper:makeAbs(\(.*\))|\1|' < $(PRJ)$/util$/alllang.xsl > $(PRJ)$/util$/alllang2.xsl + $(XSLTPROC) -o $(@:d)$(<:b).tmp \ diff --git a/patches/OOO_1_1/build-split-resources.diff b/patches/OOO_1_1/build-split-resources.diff new file mode 100644 index 000000000..c301d1da6 --- /dev/null +++ b/patches/OOO_1_1/build-split-resources.diff @@ -0,0 +1,118 @@ +Index: inc/sc.hrc +=================================================================== +RCS file: /cvs/sc/sc/inc/sc.hrc,v +retrieving revision 1.35 +retrieving revision 1.35.288.2 +diff -u -r1.35 -r1.35.288.2 +--- sc/inc/sc.hrc 3 Dec 2002 15:26:06 -0000 1.35 ++++ sc/inc/sc.hrc 17 Sep 2004 14:25:38 -0000 1.35.288.2 +@@ -1141,8 +1141,12 @@ + #define RID_TBXCTL_INSOBJ (SC_RESOURCE_START+40) + #define RID_BMP_REFBTN1 (SC_RESOURCE_START+41) + #define RID_BMP_REFBTN2 (SC_RESOURCE_START+42) +-#define RID_SC_FUNCTION_DESCRIPTIONS1 (SC_RESOURCE_START+43) +-#define RID_SC_FUNCTION_DESCRIPTIONS2 (SC_RESOURCE_START+44) ++// #i34210# split function resources due to 64k limit, don't reuse old values ++// to have obviously empty function lists in case some localisation used the ++// old values for any reason. Don't even reuse the exact name because of the ++// translation database IDs. ++//#define RID_SC_FUNCTION_DESCRIPTIONS1 (SC_RESOURCE_START+43) ++//#define RID_SC_FUNCTION_DESCRIPTIONS2 (SC_RESOURCE_START+44) + #define RID_POPUP_CONTROL (SC_RESOURCE_START+45) + #define RID_POPUP_PAGEBREAK (SC_RESOURCE_START+46) + #define RID_OBJECTBAR_DRAWFORM (SC_RESOURCE_START+47) +@@ -1158,6 +1162,10 @@ + #define RID_IMAGELIST_H_NAVCONT (SC_RESOURCE_START+57) + #define RID_OUTLINEBITMAPS_H (SC_RESOURCE_START+58) + #define RID_OBJECTMENU_EDIT (SC_RESOURCE_START+59) ++#define RID_SC_FUNCTION_DESCRIPTIONS_1 (SC_RESOURCE_START+60) ++#define RID_SC_FUNCTION_DESCRIPTIONS_2 (SC_RESOURCE_START+61) ++#define RID_SC_FUNCTION_DESCRIPTIONS_3 (SC_RESOURCE_START+62) ++#define RID_SC_FUNCTION_DESCRIPTIONS_4 (SC_RESOURCE_START+63) + + #define STR_START (SC_RESOURCE_START+100) + #define STR_ROWHEIGHT (STR_START) +Index: source/core/data/global.cxx +=================================================================== +RCS file: /cvs/sc/sc/source/core/data/global.cxx,v +retrieving revision 1.31 +retrieving revision 1.31.166.2 +diff -u -r1.31 -r1.31.166.2 +--- sc/source/core/data/global.cxx 17 Apr 2003 09:54:45 -0000 1.31 ++++ sc/source/core/data/global.cxx 17 Sep 2004 14:25:38 -0000 1.31.166.2 +@@ -1475,10 +1475,12 @@ + USHORT i,j; + USHORT nDescBlock[] = + { +- RID_SC_FUNCTION_DESCRIPTIONS1, +- RID_SC_FUNCTION_DESCRIPTIONS2 ++ RID_SC_FUNCTION_DESCRIPTIONS_1, ++ RID_SC_FUNCTION_DESCRIPTIONS_2, ++ RID_SC_FUNCTION_DESCRIPTIONS_3, ++ RID_SC_FUNCTION_DESCRIPTIONS_4 + }; +- const USHORT nBlocks = sizeof(nDescBlock) / sizeof(USHORT); ++ const USHORT nBlocks = sizeof(nDescBlock) / sizeof(nDescBlock[0]); + + aFunctionList.Clear(); + +Index: source/ui/src/scfuncs.src +=================================================================== +RCS file: /cvs/sc/sc/source/ui/src/scfuncs.src,v +retrieving revision 1.76.22.8 +retrieving revision 1.76.22.8.4.2 +diff -u -r1.76.22.8 -r1.76.22.8.4.2 +--- sc/source/ui/src/scfuncs.src 10 Sep 2004 14:45:52 -0000 1.76.22.8 ++++ sc/source/ui/src/scfuncs.src 17 Sep 2004 14:25:39 -0000 1.76.22.8.4.2 +@@ -93,10 +93,16 @@ + // RID_SC_FUNCTION_DESCRIPTIONS1 + // RID_SC_FUNCTION_DESCRIPTIONS2 + ++ // #i34210# again splitted resources due to 64k limit ++ // RID_SC_FUNCTION_DESCRIPTIONS_1 ++ // RID_SC_FUNCTION_DESCRIPTIONS_2 ++ // RID_SC_FUNCTION_DESCRIPTIONS_3 ++ // RID_SC_FUNCTION_DESCRIPTIONS_4 ++ + #include "scfuncs.hrc" // ID_FUNCTION_GRP_XXX, HID_FUNC_XXX + #include "compiler.hrc" // SC_OPCODE_XXX + +-Resource RID_SC_FUNCTION_DESCRIPTIONS1 ++Resource RID_SC_FUNCTION_DESCRIPTIONS_1 + { + // -=*# Resource for function DBANZAHL #*=- + Resource SC_OPCODE_DB_COUNT +@@ -15963,6 +15969,11 @@ + Text[ galician ] = "Valor 1; Valor 2;... son de 1 a 30 argumentos que representan os pagamentos e ingresos."; + }; + }; ++}; ++ ++ ++Resource RID_SC_FUNCTION_DESCRIPTIONS_2 ++{ + // -=*# Resource for function IKV #*=- + Resource SC_OPCODE_IKV + { +@@ -32174,7 +32185,8 @@ + }; + }; + +-Resource RID_SC_FUNCTION_DESCRIPTIONS2 ++ ++Resource RID_SC_FUNCTION_DESCRIPTIONS_3 + { + // -=*# Resource for function DBANZAHL2 #*=- + // -=*# Resource for function HÄUFIGKEIT #*=- +@@ -49230,6 +49242,11 @@ + Text[ galician ] = "é o número de graos de liberdade."; + }; + }; ++}; ++ ++ ++Resource RID_SC_FUNCTION_DESCRIPTIONS_4 ++{ + // -=*# Resource for function STANDARDISIERUNG #*=- + Resource SC_OPCODE_STANDARD + { diff --git a/patches/OOO_1_1/crash-sw-checkbox-field.diff b/patches/OOO_1_1/crash-sw-checkbox-field.diff index c24f15820..731a91bfd 100644 --- a/patches/OOO_1_1/crash-sw-checkbox-field.diff +++ b/patches/OOO_1_1/crash-sw-checkbox-field.diff @@ -35,7 +35,7 @@ diff -u -p -r1.115.68.4 ww8par.hxx + com::sun::star::lang::XMultiServiceFactory> &rServiceFactory, + com::sun::star::uno::Reference < + com::sun::star::form::XFormComponent> &rFComp, -+ com::sun::star::awt::Size &rSz) {} ++ com::sun::star::awt::Size &rSz) { return FALSE; } private: //No copying WW8FormulaControl(const WW8FormulaControl&); diff --git a/patches/OOO_1_1/disable-hindi-kannada.diff b/patches/OOO_1_1/disable-hindi-kannada.diff new file mode 100644 index 000000000..11fdc8a29 --- /dev/null +++ b/patches/OOO_1_1/disable-hindi-kannada.diff @@ -0,0 +1,13 @@ +--- config_office/set_soenv.in-old 2004-10-09 22:36:28.000000000 +0200 ++++ config_office/set_soenv.in 2004-10-09 22:36:59.000000000 +0200 +@@ -49,8 +49,8 @@ + #------------------------------------------------- + # + # Platform independent constant values. +-my @LANGUAGES = ("AFRIK", "ARAB", "BASQUE", "CAT", "CHINSIM", "CHINTRAD", "CZECH", "DAN", "DTCH", "ENUS", "ESTONIAN", "FINN", "FREN", "GAL", "GREEK", "HEBREW", "HINDI", "HUNG", "ITAL", +-"JAPN", "KANNADA", "KOREAN", "LITHUANIAN", "NORBOK", "NORNYN", "NSOTHO", "POL", "PORT", "PORTBR", "RUSS", "SLOVAK", "SLOVENIAN", "SPAN", "SWED", "THAI", "TSWANA", "TURK", "WELSH", "ZULU" ); ++my @LANGUAGES = ("AFRIK", "ARAB", "BASQUE", "CAT", "CHINSIM", "CHINTRAD", "CZECH", "DAN", "DTCH", "ENUS", "ESTONIAN", "FINN", "FREN", "GAL", "GREEK", "HEBREW", "HUNG", "ITAL", ++"JAPN", "KOREAN", "LITHUANIAN", "NORBOK", "NORNYN", "NSOTHO", "POL", "PORT", "PORTBR", "RUSS", "SLOVAK", "SLOVENIAN", "SPAN", "SWED", "THAI", "TSWANA", "TURK", "WELSH", "ZULU" ); + my @DICTIONARIES = ("DADK", "DEDE", "ENGB", "ENUS", "ITIT", "RURU" ); + my ( $CALL_CDECL, $COMMON_OUTDIR, $NO_SRS_PATCH, $PRODUCT, $PROFULLSWITCH, $BIG_GOODIES, $BMP_WRITES_FLAG, + $common_build, $MK_UNROLL, $NO_REC_RES, $PROEXT, $SO3, $SOLAR_JAVA, diff --git a/patches/OOO_1_1/email-attachment.diff b/patches/OOO_1_1/email-attachment.diff new file mode 100644 index 000000000..6b51cb9ba --- /dev/null +++ b/patches/OOO_1_1/email-attachment.diff @@ -0,0 +1,38 @@ +--- unotools/source/ucbhelper/tempfile.cxx 2004-10-12 10:47:47.000000000 +0530 ++++ unotools/source/ucbhelper/tempfile.cxx 2004-10-19 16:20:49.663737320 +0530 +@@ -324,7 +324,8 @@ + for ( sal_Int32 i=0;; i++ ) + { + String aTmp( aName ); +- aTmp += String::CreateFromInt32( i ); ++ if (i) ++ aTmp += String::CreateFromInt32( i ); + if ( pExtension ) + aTmp += *pExtension; + else +--- sfx2/source/dialog/mailmodel.cxx 2004-10-19 16:52:56.703782704 +0530 ++++ sfx2/source/dialog/mailmodel.cxx 2004-10-11 20:48:22.000000000 +0530 +@@ -341,12 +341,12 @@ + pExt = new String( String::CreateFromAscii( "." ) + aFileObj.getExtension() ); + aFileObj.removeExtension(); + aLeadingStr = aFileObj.getName( INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_WITH_CHARSET ); +- aLeadingStr += String::CreateFromAscii( "_" ); ++ // aLeadingStr += String::CreateFromAscii( "_" ); + } + else + { + aLeadingStr = aFileObj.getName( INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_WITH_CHARSET ); +- aLeadingStr += String::CreateFromAscii( "_" ); ++ // aLeadingStr += String::CreateFromAscii( "_" ); + } + } + +@@ -441,7 +441,7 @@ + pExt = new String( aPDFExtension ); + aFileObj.removeExtension(); + aLeadingStr = aFileObj.getName( INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_WITH_CHARSET ); +- aLeadingStr += String::CreateFromAscii( "_" ); ++ // aLeadingStr += String::CreateFromAscii( "_" ); + } + else + { diff --git a/patches/OOO_1_1/gui-toolbox-large-icons.diff b/patches/OOO_1_1/gui-toolbox-large-icons.diff index 3e8c9eed7..3bef667bf 100644 --- a/patches/OOO_1_1/gui-toolbox-large-icons.diff +++ b/patches/OOO_1_1/gui-toolbox-large-icons.diff @@ -2,10 +2,11 @@ Index: registry/schema/org/openoffice/Office/Common.xcs =================================================================== RCS file: /cvs/util/officecfg/registry/schema/org/openoffice/Office/Common.xcs,v retrieving revision 1.84.8.5 -diff -u -r1.84.8.5 Common.xcs ---- officecfg/registry/schema/org/openoffice/Office/Common.xcs 27 Apr 2004 16:35:22 -0000 1.84.8.5 -+++ officecfg/registry/schema/org/openoffice/Office/Common.xcs 8 Jun 2004 23:01:08 -0000 -@@ -28992,41 +28992,46 @@ +Index: officecfg/registry/schema/org/openoffice/Office/Common.xcs +=================================================================== +--- officecfg/registry/schema/org/openoffice/Office/Common.xcs.orig 2004-09-12 12:14:15.192985792 +0200 ++++ officecfg/registry/schema/org/openoffice/Office/Common.xcs 2004-09-12 12:18:47.003664288 +0200 +@@ -36038,50 +36038,55 @@ </enumeration> <enumeration oor:value="1"> <info> @@ -32,7 +33,7 @@ diff -u -r1.84.8.5 Common.xcs - <desc xml:lang="pt-BR">32x32 pixel icons</desc> - <desc xml:lang="ja">32×32 ピクセルアイコン</desc> - <desc xml:lang="ko">32x32 pixel icons</desc> -- <desc xml:lang="tr">32x32 pixel icons</desc> +- <desc xml:lang="tr">32x32 piksel simgeler</desc> - <desc xml:lang="th">32x32 pixel icons</desc> - <desc xml:lang="x-comment">32x32 pixel icons</desc> - <desc xml:lang="hu">32x32 pixel icons</desc> @@ -40,6 +41,15 @@ diff -u -r1.84.8.5 Common.xcs - <desc xml:lang="ns">32x32 pixel icons</desc> - <desc xml:lang="af">32x32 pixel icons</desc> - <desc xml:lang="zu">32x32 pixel icons</desc> +- <desc xml:lang="nb">32x32 pixel icons</desc> +- <desc xml:lang="et">32x32 pixel icons</desc> +- <desc xml:lang="cy">32x32 pixel icons</desc> +- <desc xml:lang="tn">32x32 pixel icons</desc> +- <desc xml:lang="nn">32x32 pixel icons</desc> +- <desc xml:lang="eu">32x32 pixel icons</desc> +- <desc xml:lang="lt">32x32 taÅ¡kų paveikslai</desc> +- <desc xml:lang="kn-IN">32x32 pixel icons</desc> +- <desc xml:lang="gl">32x32 pixel icons</desc> + <desc xml:lang="en-US">24x24 pixel icons</desc> + <desc xml:lang="el">24x24 pixel icons</desc> + <desc xml:lang="nl">24x24 pixel iconen</desc> @@ -63,7 +73,7 @@ diff -u -r1.84.8.5 Common.xcs + <desc xml:lang="pt-BR">24x24 pixel icons</desc> + <desc xml:lang="ja">24×24 ピクセルアイコン</desc> + <desc xml:lang="ko">24x24 pixel icons</desc> -+ <desc xml:lang="tr">24x24 pixel icons</desc> ++ <desc xml:lang="tr">24x24 piksel simgeler</desc> + <desc xml:lang="th">24x24 pixel icons</desc> + <desc xml:lang="x-comment">24x24 pixel icons</desc> + <desc xml:lang="hu">24x24 pixel icons</desc> @@ -71,6 +81,15 @@ diff -u -r1.84.8.5 Common.xcs + <desc xml:lang="ns">24x24 pixel icons</desc> + <desc xml:lang="af">24x24 pixel icons</desc> + <desc xml:lang="zu">24x24 pixel icons</desc> ++ <desc xml:lang="nb">24x24 pixel icons</desc> ++ <desc xml:lang="et">24x24 pixel icons</desc> ++ <desc xml:lang="cy">24x24 pixel icons</desc> ++ <desc xml:lang="tn">24x24 pixel icons</desc> ++ <desc xml:lang="nn">24x24 pixel icons</desc> ++ <desc xml:lang="eu">24x24 pixel icons</desc> ++ <desc xml:lang="lt">24x24 taÅ¡kų paveikslai</desc> ++ <desc xml:lang="kn-IN">24x24 pixel icons</desc> ++ <desc xml:lang="gl">24x24 pixel icons</desc> + </info> + </enumeration> + <enumeration oor:value="2"> diff --git a/patches/OOO_1_1/hebrew-culmus.diff b/patches/OOO_1_1/hebrew-culmus.diff new file mode 100644 index 000000000..fdb44e670 --- /dev/null +++ b/patches/OOO_1_1/hebrew-culmus.diff @@ -0,0 +1,16 @@ +Index: registry/data/org/openoffice/VCL.xcu +=================================================================== +RCS file: /cvs/util/officecfg/registry/data/org/openoffice/VCL.xcu,v +retrieving revision 1.20.14.7 +diff -u -u -r1.20.14.7 VCL.xcu +--- officecfg/registry/data/org/openoffice/VCL.xcu 27 May 2004 13:21:14 -0000 1.20.14.7 ++++ officecfg/registry/data/org/openoffice/VCL.xcu 7 Nov 2004 14:21:56 -0000 +@@ -409,7 +409,7 @@ + </node> + <node oor:name="he" oor:op="replace"> + <prop oor:name="UI_SANS" oor:op="replace" oor:type="xs:string"> +- <value>Tahoma;Raanana;Lucidasans;Lucida Sans;Supplement;Andale Sans UI;Arial Unicode MS;Lucida Sans Unicode;Interface User;WarpSans;Geneva;MS Sans Serif;Helv;Dialog;Albany;Lucida;Helvetica;Charcoal;Chicago;Arial;Helmet;Interface System;Sans Serif</value> ++ <value>Ellinia CLM;Tahoma;Raanana;Lucidasans;Lucida Sans;Supplement;Andale Sans UI;Arial Unicode MS;Lucida Sans Unicode;Interface User;WarpSans;Geneva;MS Sans Serif;Helv;Dialog;Albany;Lucida;Helvetica;Charcoal;Chicago;Arial;Helmet;Interface System;Sans Serif</value> + </prop> + <prop oor:name="SANS_UNICODE" oor:type="xs:string" oor:op="replace"> + <value>Tahoma;Raanana;Lucidasans;Lucida Sans;Arial Unicode MS;Lucida Sans Unicode;clearlyU;Albany;Arial;Helvetica;Lucida;Geneva;Helmet;SansSerif</value> diff --git a/patches/OOO_1_1/i18n-calc-encoding.diff b/patches/OOO_1_1/i18n-calc-encoding.diff index 15c23ed17..11c0cf3b2 100644 --- a/patches/OOO_1_1/i18n-calc-encoding.diff +++ b/patches/OOO_1_1/i18n-calc-encoding.diff @@ -2,10 +2,11 @@ Index: calc/profile_calc.lng =================================================================== RCS file: /cvs/installation/scp/source/calc/Attic/profile_calc.lng,v retrieving revision 1.49.24.5 -diff -u -r1.49.24.5 profile_calc.lng ---- scp/source/calc/profile_calc.lng 27 Apr 2004 18:15:09 -0000 1.49.24.5 -+++ scp/source/calc/profile_calc.lng 10 Jun 2004 15:28:49 -0000 -@@ -598,7 +598,7 @@ +Index: scp/source/calc/profile_calc.lng +=================================================================== +--- scp/source/calc/profile_calc.lng.orig 2004-09-13 22:31:50.000000000 +0200 ++++ scp/source/calc/profile_calc.lng 2004-09-14 15:49:37.746332016 +0200 +@@ -678,7 +678,7 @@ 82 = "%PRODUCTNAME %PRODUCTVERSION ìŠ¤í”„ë ˆë“œì‹œíŠ¸" 86 = "%PRODUCTNAME %PRODUCTVERSION 工作表" 88 = "%PRODUCTNAME %PRODUCTVERSION 工作表" @@ -14,23 +15,11 @@ diff -u -r1.49.24.5 profile_calc.lng 07 = "Ýëåêòðîííàÿ òàáëèöà %PRODUCTNAME %PRODUCTVERSION" 30 = "Õðïëïãéóôéêü öýëëï %PRODUCTNAME %PRODUCTVERSION" 31 = "%PRODUCTNAME %PRODUCTVERSION Werkblad" -@@ -636,7 +636,7 @@ - 34 = "Hoja de ~cálculo" - 55 = "~Planilha" - 48 = "~Arkusz kalkulacyjny" --03 = "Folha de ~cálculo" -+03 = "Folha de ~cálculo" - 82 = "ìŠ¤í”„ë ˆë“œì‹œíŠ¸(~S)" - 33 = "~Classeur" - 96 = "~Spreadsheet" -Index: impress/profile_impress.lng +Index: scp/source/impress/profile_impress.lng =================================================================== -RCS file: /cvs/installation/scp/source/impress/Attic/profile_impress.lng,v -retrieving revision 1.57.24.5 -diff -u -r1.57.24.5 profile_impress.lng ---- scp/source/impress/profile_impress.lng 27 Apr 2004 18:18:43 -0000 1.57.24.5 -+++ scp/source/impress/profile_impress.lng 10 Jun 2004 15:28:51 -0000 -@@ -639,7 +639,7 @@ +--- scp/source/impress/profile_impress.lng.orig 2004-09-13 22:32:00.000000000 +0200 ++++ scp/source/impress/profile_impress.lng 2004-09-14 15:49:37.749331560 +0200 +@@ -724,7 +724,7 @@ 82 = "%PRODUCTNAME %PRODUCTVERSION í”„ë ˆì í…Œì´ì…˜" 86 = "%PRODUCTNAME %PRODUCTVERSION 演示文稿" 88 = "%PRODUCTNAME %PRODUCTVERSION ç°¡å ±" @@ -39,7 +28,7 @@ diff -u -r1.57.24.5 profile_impress.lng 07 = "Ïðåçåíòàöèÿ %PRODUCTNAME %PRODUCTVERSION" 30 = "Ðáñïõóßáóç %PRODUCTNAME %PRODUCTVERSION" 31 = "%PRODUCTNAME %PRODUCTVERSION Presentatie" -@@ -677,7 +677,7 @@ +@@ -767,7 +767,7 @@ 34 = "~Presentación" 55 = "A~presentação" 48 = "~Prezentacja" @@ -48,7 +37,7 @@ diff -u -r1.57.24.5 profile_impress.lng 82 = "í”„ë ˆì í…Œì´ì…˜(~P)" 33 = "~Présentation" 96 = "ÚÑÖ Ê~ÞÏíãí" -@@ -714,7 +714,7 @@ +@@ -809,7 +809,7 @@ 34 = "~Presentación..." 55 = "A~presentação..." 48 = "~Prezentacja..." @@ -56,15 +45,12 @@ diff -u -r1.57.24.5 profile_impress.lng +03 = "A~presentação..." 82 = "í”„ë ˆì í…Œì´ì…˜(~P)..." 33 = "~Présentation..." - 96 = "~Presentation..." -Index: math/profile_math.lng + 96 = "~ÚÑÖ ÊÞÏíãì..." +Index: scp/source/math/profile_math.lng =================================================================== -RCS file: /cvs/installation/scp/source/math/Attic/profile_math.lng,v -retrieving revision 1.40.24.4 -diff -u -r1.40.24.4 profile_math.lng ---- scp/source/math/profile_math.lng 27 Apr 2004 18:20:23 -0000 1.40.24.4 -+++ scp/source/math/profile_math.lng 10 Jun 2004 15:28:51 -0000 -@@ -80,7 +80,7 @@ +--- scp/source/math/profile_math.lng.orig 2004-09-13 22:32:04.000000000 +0200 ++++ scp/source/math/profile_math.lng 2004-09-14 15:49:37.750331408 +0200 +@@ -90,7 +90,7 @@ 34 = "~Fórmula" 55 = "~Fórmula" 48 = "F~ormu³a" @@ -73,14 +59,11 @@ diff -u -r1.40.24.4 profile_math.lng 82 = "수ì‹(~O)" 33 = "F~ormule" 96 = "ÕíÛÉ" -Index: office/profile.lng +Index: scp/source/office/profile.lng =================================================================== -RCS file: /cvs/installation/scp/source/office/Attic/profile.lng,v -retrieving revision 1.58.24.8 -diff -u -r1.58.24.8 profile.lng ---- scp/source/office/profile.lng 4 May 2004 06:48:05 -0000 1.58.24.8 -+++ scp/source/office/profile.lng 10 Jun 2004 15:28:53 -0000 -@@ -1080,7 +1080,7 @@ +--- scp/source/office/profile.lng.orig 2004-09-13 22:32:06.000000000 +0200 ++++ scp/source/office/profile.lng 2004-09-14 15:49:37.756330496 +0200 +@@ -1225,7 +1225,7 @@ 34 = "~Tarjetas de visita" 55 = "Cartões de ~Visita" 48 = "~Wizytówki" @@ -88,8 +71,8 @@ diff -u -r1.58.24.8 profile.lng +03 = "Cartões de ~visita" 82 = "명함(~U)" 33 = "Cartes de ~visite" - 96 = "B~usiness Cards" -@@ -1302,7 +1302,7 @@ + 96 = "ß~ÑÊ ÇáÚãá" +@@ -1477,7 +1477,7 @@ 34 = "Página ~Web..." 55 = "Página da ~Web..." 48 = "Strona ~WWW..." @@ -97,8 +80,8 @@ diff -u -r1.58.24.8 profile.lng +03 = "Página ~Web..." 82 = "웹 페ì´ì§€(~W)..." 33 = "Page ~Web..." - 96 = "~Web Page..." -@@ -1339,7 +1339,7 @@ + 96 = "~ÕÝÍÉ æíÈ..." +@@ -1519,7 +1519,7 @@ 34 = "Formulario..." 55 = "~Formulário..." 48 = "Fo~rmularz..." @@ -106,8 +89,8 @@ diff -u -r1.58.24.8 profile.lng +03 = "F~ormulário..." 82 = "ì–‘ì‹(~R)..." 33 = "Form~ulaire..." - 96 = "Form..." -@@ -1520,7 +1520,7 @@ + 96 = "äã~æÐÌ..." +@@ -1725,7 +1725,7 @@ 01 = "Address Data Source..." 44 = "Address Data Source..." 49 = "Adress-Datenquelle..." diff --git a/patches/OOO_1_1/iiimf-multilingual-extension-2-enable.diff b/patches/OOO_1_1/iiimf-multilingual-extension-2-enable.diff index 54aa303c5..ff90f51eb 100644 --- a/patches/OOO_1_1/iiimf-multilingual-extension-2-enable.diff +++ b/patches/OOO_1_1/iiimf-multilingual-extension-2-enable.diff @@ -1,6 +1,8 @@ ---- vcl/unx/inc/XIM.h 18 Sep 2000 17:05:40 -0000 1.1.1.1 -+++ vcl/unx/inc/XIM.h 24 Feb 2004 02:38:04 -0000 -@@ -155,6 +155,8 @@ +Index: vcl/unx/inc/XIM.h +=================================================================== +--- vcl/unx/inc/XIM.h.orig 2000-09-18 19:05:40.000000000 +0200 ++++ vcl/unx/inc/XIM.h 2004-10-06 16:20:54.713291328 +0200 +@@ -155,6 +155,8 @@ typedef struct _XIMSwitchIMNotifyCallbac /* XIM attributes for multilingual IM extension */ #define XNMultiLingualInput "multiLingualInput" #define XNQueryUnicodeCharacterSubset "unicodeCharacterSubset" @@ -9,10 +11,12 @@ /* XIC attributes for multilingual IM extension */ ---- vcl/unx/source/app/i18n_ic.cxx 2 Jul 2003 13:40:36 -0000 1.26 -+++ vcl/unx/source/app/i18n_ic.cxx 24 Feb 2004 02:38:04 -0000 -@@ -200,11 +200,9 @@ - ), +Index: vcl/unx/source/app/i18n_ic.cxx +=================================================================== +--- vcl/unx/source/app/i18n_ic.cxx.orig 2004-10-06 16:12:46.417523568 +0200 ++++ vcl/unx/source/app/i18n_ic.cxx 2004-10-06 16:20:54.714291176 +0200 +@@ -212,11 +212,9 @@ SalI18N_InputContext::SalI18N_InputConte + mpPreeditAttributes( NULL ), mpFocusFrame( NULL ) { -#ifdef SOLARIS @@ -23,12 +27,14 @@ maClientData.aText.pUnicodeBuffer = NULL; maClientData.aText.pCharStyle = NULL; ---- vcl/unx/source/app/i18n_im.cxx 28 Jan 2004 15:23:17 -0000 1.23.110.2 -+++ vcl/unx/source/app/i18n_im.cxx 24 Feb 2004 02:38:04 -0000 -@@ -438,11 +438,16 @@ - // get ml-input flag from input-method +Index: vcl/unx/source/app/i18n_im.cxx +=================================================================== +--- vcl/unx/source/app/i18n_im.cxx.orig 2004-10-06 16:12:46.447519008 +0200 ++++ vcl/unx/source/app/i18n_im.cxx 2004-10-06 16:21:07.651324448 +0200 +@@ -416,11 +416,16 @@ SalI18N_InputMethod::CreateMethod ( Disp if ( maMethod == (XIM)NULL ) mbMultiLingual = False; + -#if !defined(LINUX) else - if ( XGetIMValues(maMethod, @@ -42,10 +48,10 @@ + XNMultiLingualInput, &mbMultiLingual, NULL ) != NULL ) + mbMultiLingual = False; + } - if( mbMultiLingual ) - { - XIMUnicodeCharacterSubsets* subsets; -@@ -470,9 +475,6 @@ + + #if defined(MACOSX) && (BUILD_OS_MAJOR == 10) && (BUILD_OS_MINOR == 2) + // [ed] 6/12/04 Reapply multilingual patch for MACOSX Jaguar +@@ -459,9 +464,6 @@ SalI18N_InputMethod::CreateMethod ( Disp fprintf( stderr, "query subsets failed\n" ); #endif } diff --git a/patches/OOO_1_1/l10n-YTL.diff b/patches/OOO_1_1/l10n-YTL.diff new file mode 100644 index 000000000..dbc646a89 --- /dev/null +++ b/patches/OOO_1_1/l10n-YTL.diff @@ -0,0 +1,26 @@ +=================================================================== +RCS file: /opt/sourcecast/data/ccvs/repository/l10n/i18npool/source/localedata/data/tr_TR.xml,v +retrieving revision 1.7 +retrieving revision 1.7.130.1 +diff -u -r1.7 -r1.7.130.1 +--- i18npool/source/localedata/data/tr_TR.xml 2003/04/08 15:58:56 1.7 ++++ i18npool/source/localedata/data/tr_TR.xml 2004/10/13 15:38:38 1.7.130.1 +@@ -342,10 +342,17 @@ + </Calendar> + </LC_CALENDAR> + <LC_CURRENCY> +-<Currency default="true" usedInCompatibleFormatCodes="true"> ++<Currency default="false" usedInCompatibleFormatCodes="true"> + <CurrencyID>TL</CurrencyID> + <CurrencySymbol>TL</CurrencySymbol> + <BankSymbol>TRL</BankSymbol> ++<CurrencyName>Lira</CurrencyName> ++<DecimalPlaces>2</DecimalPlaces> ++</Currency> ++<Currency default="true" usedInCompatibleFormatCodes="false"> ++<CurrencyID>TRY</CurrencyID> ++<CurrencySymbol>YTL</CurrencySymbol> ++<BankSymbol>TRY</BankSymbol> + <CurrencyName>Lira</CurrencyName> + <DecimalPlaces>2</DecimalPlaces> + </Currency> diff --git a/patches/OOO_1_1/linux-arm-support.diff b/patches/OOO_1_1/linux-arm-support.diff new file mode 100644 index 000000000..24b1cace2 --- /dev/null +++ b/patches/OOO_1_1/linux-arm-support.diff @@ -0,0 +1,2036 @@ +diff --exclude=unxlngr.pro -urN openoffice.org-1.1.1/bridges/prj/build.lst openoffice.org-1.1.1-arm/bridges/prj/build.lst +--- bridges/prj/build.lst 2004-01-28 11:53:01.000000000 +0000 ++++ bridges/prj/build.lst 2004-06-22 11:40:23.000000000 +0100 +@@ -15,6 +15,7 @@ + br bridges\source\cpp_uno\gcc3_linux_powerpc nmake - u br_gcclp3 br_unotypes NULL + br bridges\source\cpp_uno\gcc3_linux_s390 nmake - u br_gccl33 br_unotypes NULL + br bridges\source\cpp_uno\gcc3_linux_sparc nmake - u br_gccl3s br_unotypes NULL ++br bridges\source\cpp_uno\gcc3_linux_arm nmake - u br_gccl3r br_unotypes NULL + br bridges\source\cpp_uno\gcc2_macosx_powerpc nmake - u br_gccmacoxp br_unotypes NULL + br bridges\source\cpp_uno\gcc3_macosx_powerpc nmake - u br_gcc3macoxp br_unotypes NULL + br bridges\source\cpp_uno\cc50_solaris_sparc nmake - u br_cc50sols br_unotypes NULL +diff --exclude=unxlngr.pro -urN openoffice.org-1.1.1/bridges/source/cpp_uno/gcc3_linux_arm/armhelper.s openoffice.org-1.1.1-arm/bridges/source/cpp_uno/gcc3_linux_arm/armhelper.s +--- bridges/source/cpp_uno/gcc3_linux_arm/armhelper.s 1970-01-01 01:00:00.000000000 +0100 ++++ bridges/source/cpp_uno/gcc3_linux_arm/armhelper.s 2004-07-20 15:11:10.000000000 +0100 +@@ -0,0 +1,116 @@ ++ ++ .file "armhelper.s" ++ ++@ ARM support code for OpenOffice C++/UNO bridging ++@ ++@ Written by Peter Naulls <peter@chocky.org> ++@ ++@ This code avoids the dynamically generated code used on other ++@ platforms to intercept and make virtual method calls. This ++@ avoids the need to flush the-icache, although it does mean some ++@ guessing to determine the index. ++ ++ ++@ Call a virtual function with an arbitrary number of words ++@ ++@ With 4 or less parameters, the function is directly jumped to. ++@ With more, parameters are pushed on the stack, and a stack ++@ frame is saved so the state can be restored. ++@ ++@ r0: pThis ++@ r1: nStackLongs ++@ r2: pStackLongs ++@ r3: nVtableIndex ++ ++ .global arm_callVirtualMethod ++ .type arm_callVirtualMethod, %function ++arm_callVirtualMethod: ++ ldr r0, [r0, #0] @ get class reference ++ ldr ip, [r0, r3, lsl #2] @ get method ++ ++ cmp r1, #5 ++ ldmltia r2, {r0-r3} @ load register params ++ movlt pc, ip @ don't return to this function ++ ++ mov r0, ip ++ ++ mov ip, sp ++ stmfd sp!, {fp, ip, lr, pc} ++ sub fp, ip, #4 ++ ++ ++ @ push paramters after #4 onto the stack ++ sub r1, r1, #4 ++ add r2, r2, #16 ++.Lstack: ++ cmp r1, #0 ++ subgt r1, r1, #1 ++ ldrgt r3, [r2, r1, lsl #2] ++ strgt r3, [sp, #-4]! ++ bgt .Lstack ++ ++ mov ip, r0 ++ ++ ldmdb r2, {r0-r3} @ load register params ++ mov lr, pc @ save return address ++ mov pc, ip @ jump to function ++ ++ ldmea fp, {fp, sp, pc} @ return ++ ++ ++ ++ ++@ Intercept a virtual call with a simple return type ++ ++ .type arm_codeSnippetSimple, %function ++ .global arm_codeSnippetSimple ++arm_codeSnippetSimple: ++ stmfd sp!, {r0-r3} @ follow other parameters on stack ++ stmfd sp!, {lr} ++ ++ ldr r0, [lr, #-4] @ Fetch the vtable LDR instruction ++ and r1, r0, #0x05900000 @ Check that it's really an LDR ++ cmp r1, #0x05900000 @ If not, fetch from further back ++ ldrne r0, [lr, #-20] ++ andne r1, r0, #0x05900000 @ Check again ++ cmpne r1, #0x05900000 @ ++ ldrne r0, [lr, #-24] @ If not, fetch from one more back ++ ++ mov r0, r0, lsr #2 @ Divide by 4 to get the table offset ++ and r0, r0, #0xff @ Get the index from the instruction ++ ++ add r1, sp, #4 @ r1 points to this and params ++ bl cpp_vtable_call(PLT) ++ ++ add sp, sp, #20 @ restore stack ++ ldr pc, [sp, #-20] @ return ++ ++ ++@ Intercept a virtual call with a complex return type ++ ++ .type arm_codeSnippetComplex, %function ++ .global arm_codeSnippetComplex ++arm_codeSnippetComplex: ++ stmfd sp!, {r0-r3} @ follow other parameters on stack ++ stmfd sp!, {lr} ++ ++ ldr r0, [lr, #-4] @ Fetch the vtable LDR instruction ++ and r1, r0, #0x05900000 @ Check that it's really an LDR ++ cmp r1, #0x05900000 @ If not, fetch from further back ++ ldrne r0, [lr, #-20] ++ andne r1, r0, #0x05900000 @ Check again ++ cmpne r1, #0x05900000 @ ++ ldrne r0, [lr, #-24] @ If not, fetch from one more back ++ ++ mov r0, r0, lsr #2 @ Divide by 4 to get the table offset ++ and r0, r0, #0xff @ Get the index from the instruction ++ orr r0, r0, #1<<31 @ Set top bit to indicate complex return ++ ++ add r1, sp, #4 @ r1 points to this and params ++ bl cpp_vtable_call(PLT) ++ ++ add sp, sp, #20 @ restore stack ++ ldr pc, [sp, #-20] @ return ++ ++ ++ +diff --exclude=unxlngr.pro -urN openoffice.org-1.1.1/bridges/source/cpp_uno/gcc3_linux_arm/cpp2uno.cxx openoffice.org-1.1.1-arm/bridges/source/cpp_uno/gcc3_linux_arm/cpp2uno.cxx +--- bridges/source/cpp_uno/gcc3_linux_arm/cpp2uno.cxx 1970-01-01 01:00:00.000000000 +0100 ++++ bridges/source/cpp_uno/gcc3_linux_arm/cpp2uno.cxx 2004-07-20 15:13:47.000000000 +0100 +@@ -0,0 +1,560 @@ ++/************************************************************************* ++ * ++ * $RCSfile$ ++ * ++ * $Revision$ ++ * ++ * last change: $Author$ $Date$ ++ * ++ * The Contents of this file are made available subject to the terms of ++ * either of the following licenses ++ * ++ * - GNU Lesser General Public License Version 2.1 ++ * - Sun Industry Standards Source License Version 1.1 ++ * ++ * Sun Microsystems Inc., October, 2000 ++ * ++ * GNU Lesser General Public License Version 2.1 ++ * ============================================= ++ * Copyright 2000 by Sun Microsystems, Inc. ++ * 901 San Antonio Road, Palo Alto, CA 94303, USA ++ * ++ * This library is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU Lesser General Public ++ * License version 2.1, as published by the Free Software Foundation. ++ * ++ * This library is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * Lesser General Public License for more details. ++ * ++ * You should have received a copy of the GNU Lesser General Public ++ * License along with this library; if not, write to the Free Software ++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, ++ * MA 02111-1307 USA ++ * ++ * ++ * Sun Industry Standards Source License Version 1.1 ++ * ================================================= ++ * The contents of this file are subject to the Sun Industry Standards ++ * Source License Version 1.1 (the "License"); You may not use this file ++ * except in compliance with the License. You may obtain a copy of the ++ * License at http://www.openoffice.org/license.html. ++ * ++ * Software provided under this License is provided on an "AS IS" basis, ++ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, ++ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, ++ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. ++ * See the License for the specific provisions governing your rights and ++ * obligations concerning the Software. ++ * ++ * The Initial Developer of the Original Code is: Sun Microsystems, Inc. ++ * ++ * Copyright: 2000 by Sun Microsystems, Inc. ++ * ++ * All Rights Reserved. ++ * ++ * Contributor(s): Modified for ARM support by Peter Naulls <peter@chocky.org> ++ * ++ * ++ ************************************************************************/ ++ ++#include <malloc.h> ++#include <hash_map> ++ ++#include <rtl/alloc.h> ++#include <osl/mutex.hxx> ++ ++#include <uno/data.h> ++#include <typelib/typedescription.hxx> ++ ++#include <bridges/cpp_uno/bridge.hxx> ++#include <bridges/cpp_uno/type_misc.hxx> ++ ++#include "share.hxx" ++ ++ ++using namespace ::osl; ++using namespace ::rtl; ++using namespace ::com::sun::star::uno; ++ ++namespace CPPU_CURRENT_NAMESPACE ++{ ++ ++//================================================================================================== ++rtl_StandardModuleCount g_moduleCount = MODULE_COUNT_INIT; ++ ++//================================================================================================== ++static typelib_TypeClass cpp2uno_call( ++ cppu_cppInterfaceProxy * pThis, ++ const typelib_TypeDescription * pMemberTypeDescr, ++ typelib_TypeDescriptionReference * pReturnTypeRef, // 0 indicates void return ++ sal_Int32 nParams, typelib_MethodParameter * pParams, ++ void ** pCallStack, ++ sal_Int64 * pRegisterReturn /* space for register return */ ) ++{ ++ // pCallStack: ret, [return ptr], this, params ++ char * pCppStack = (char *)(pCallStack + 0); ++ ++ // return ++ typelib_TypeDescription * pReturnTypeDescr = 0; ++ if (pReturnTypeRef) ++ TYPELIB_DANGER_GET( &pReturnTypeDescr, pReturnTypeRef ); ++ ++ void * pUnoReturn = 0; ++ void * pCppReturn = 0; // complex return ptr: if != 0 && != pUnoReturn, reconversion need ++ ++ if (pReturnTypeDescr) ++ { ++ if (cppu_isSimpleType( pReturnTypeDescr )) ++ { ++ pUnoReturn = pRegisterReturn; // direct way for simple types ++ } ++ else // complex return via ptr (pCppReturn) ++ { ++ pCppReturn = *(void **)pCppStack; ++ pCppStack += sizeof(void *); ++ ++ pUnoReturn = (cppu_relatesToInterface( pReturnTypeDescr ) ++ ? alloca( pReturnTypeDescr->nSize ) ++ : pCppReturn); // direct way ++ } ++ } ++ // pop this ++ pCppStack += sizeof( void* ); ++ ++ // stack space ++ OSL_ENSURE( sizeof(void *) == sizeof(sal_Int32), "### unexpected size!" ); ++ // parameters ++ void ** pUnoArgs = (void **)alloca( 4 * sizeof(void *) * nParams ); ++ void ** pCppArgs = pUnoArgs + nParams; ++ // indizes of values this have to be converted (interface conversion cpp<=>uno) ++ sal_Int32 * pTempIndizes = (sal_Int32 *)(pUnoArgs + (2 * nParams)); ++ // type descriptions for reconversions ++ typelib_TypeDescription ** ppTempParamTypeDescr = (typelib_TypeDescription **)(pUnoArgs + (3 * nParams)); ++ ++ sal_Int32 nTempIndizes = 0; ++ ++ for ( sal_Int32 nPos = 0; nPos < nParams; ++nPos ) ++ { ++ const typelib_MethodParameter & rParam = pParams[nPos]; ++ typelib_TypeDescription * pParamTypeDescr = 0; ++ TYPELIB_DANGER_GET( &pParamTypeDescr, rParam.pTypeRef ); ++ ++ if (!rParam.bOut && cppu_isSimpleType( pParamTypeDescr )) // value ++ { ++ pCppArgs[nPos] = pCppStack; ++ pUnoArgs[nPos] = pCppStack; ++ switch (pParamTypeDescr->eTypeClass) ++ { ++ case typelib_TypeClass_HYPER: ++ case typelib_TypeClass_UNSIGNED_HYPER: ++ case typelib_TypeClass_DOUBLE: ++ pCppStack += sizeof(sal_Int32); // extra long ++ } ++ // no longer needed ++ TYPELIB_DANGER_RELEASE( pParamTypeDescr ); ++ } ++ else // ptr to complex value | ref ++ { ++ pCppArgs[nPos] = *(void **)pCppStack; ++ ++ if (! rParam.bIn) // is pure out ++ { ++ // uno out is unconstructed mem! ++ pUnoArgs[nPos] = alloca( pParamTypeDescr->nSize ); ++ pTempIndizes[nTempIndizes] = nPos; ++ // will be released at reconversion ++ ppTempParamTypeDescr[nTempIndizes++] = pParamTypeDescr; ++ } ++ // is in/inout ++ else if (cppu_relatesToInterface( pParamTypeDescr )) ++ { ++ uno_copyAndConvertData( pUnoArgs[nPos] = alloca( pParamTypeDescr->nSize ), ++ *(void **)pCppStack, pParamTypeDescr, ++ &pThis->pBridge->aCpp2Uno ); ++ pTempIndizes[nTempIndizes] = nPos; // has to be reconverted ++ // will be released at reconversion ++ ppTempParamTypeDescr[nTempIndizes++] = pParamTypeDescr; ++ } ++ else // direct way ++ { ++ pUnoArgs[nPos] = *(void **)pCppStack; ++ // no longer needed ++ TYPELIB_DANGER_RELEASE( pParamTypeDescr ); ++ } ++ } ++ pCppStack += sizeof(sal_Int32); // standard parameter length ++ } ++ ++ // ExceptionHolder ++ uno_Any aUnoExc; // Any will be constructed by callee ++ uno_Any * pUnoExc = &aUnoExc; ++ ++ // invoke uno dispatch call ++ (*pThis->pUnoI->pDispatcher)( pThis->pUnoI, pMemberTypeDescr, pUnoReturn, pUnoArgs, &pUnoExc ); ++ ++ // in case an exception occured... ++ if (pUnoExc) ++ { ++ // destruct temporary in/inout params ++ for ( ; nTempIndizes--; ) ++ { ++ sal_Int32 nIndex = pTempIndizes[nTempIndizes]; ++ ++ if (pParams[nIndex].bIn) // is in/inout => was constructed ++ uno_destructData( pUnoArgs[nIndex], ppTempParamTypeDescr[nTempIndizes], 0 ); ++ TYPELIB_DANGER_RELEASE( ppTempParamTypeDescr[nTempIndizes] ); ++ } ++ if (pReturnTypeDescr) ++ TYPELIB_DANGER_RELEASE( pReturnTypeDescr ); ++ ++ raiseException( &aUnoExc, &pThis->pBridge->aUno2Cpp ); // has to destruct the any ++ // is here for dummy ++ return typelib_TypeClass_VOID; ++ } ++ else // else no exception occured... ++ { ++ // temporary params ++ for ( ; nTempIndizes--; ) ++ { ++ sal_Int32 nIndex = pTempIndizes[nTempIndizes]; ++ typelib_TypeDescription * pParamTypeDescr = ppTempParamTypeDescr[nTempIndizes]; ++ ++ if (pParams[nIndex].bOut) // inout/out ++ { ++ // convert and assign ++ uno_destructData( pCppArgs[nIndex], pParamTypeDescr, cpp_release ); ++ uno_copyAndConvertData( pCppArgs[nIndex], pUnoArgs[nIndex], pParamTypeDescr, ++ &pThis->pBridge->aUno2Cpp ); ++ } ++ // destroy temp uno param ++ uno_destructData( pUnoArgs[nIndex], pParamTypeDescr, 0 ); ++ ++ TYPELIB_DANGER_RELEASE( pParamTypeDescr ); ++ } ++ // return ++ if (pCppReturn) // has complex return ++ { ++ if (pUnoReturn != pCppReturn) // needs reconversion ++ { ++ uno_copyAndConvertData( pCppReturn, pUnoReturn, pReturnTypeDescr, ++ &pThis->pBridge->aUno2Cpp ); ++ // destroy temp uno return ++ uno_destructData( pUnoReturn, pReturnTypeDescr, 0 ); ++ } ++ // complex return ptr is set to eax ++ *(void **)pRegisterReturn = pCppReturn; ++ } ++ if (pReturnTypeDescr) ++ { ++ typelib_TypeClass eRet = (typelib_TypeClass)pReturnTypeDescr->eTypeClass; ++ TYPELIB_DANGER_RELEASE( pReturnTypeDescr ); ++ return eRet; ++ } ++ else ++ return typelib_TypeClass_VOID; ++ } ++} ++ ++ ++//================================================================================================== ++static typelib_TypeClass cpp_mediate( ++ sal_Int32 nVtableCall, ++ int ** pCallStack, ++ sal_Int64 * pRegisterReturn /* space for register return */ ) ++{ ++ OSL_ENSURE( sizeof(sal_Int32)==sizeof(void *), "### unexpected!" ); ++ ++ // pCallStack: [ret *], this, params ++ // _this_ ptr is patched cppu_XInterfaceProxy object ++ cppu_cppInterfaceProxy * pCppI = NULL; ++ if( nVtableCall & 0x80000000 ) ++ { ++ nVtableCall &= 0x7fffffff; ++ pCppI = (cppu_cppInterfaceProxy *)(XInterface *)*(pCallStack + 1); ++ } ++ else ++ { ++ pCppI = (cppu_cppInterfaceProxy *)(XInterface *)*(pCallStack + 0); ++ } ++ ++ typelib_InterfaceTypeDescription * pTypeDescr = pCppI->pTypeDescr; ++ ++ OSL_ENSURE( nVtableCall < pTypeDescr->nMapFunctionIndexToMemberIndex, "### illegal vtable index!" ); ++ if (nVtableCall >= pTypeDescr->nMapFunctionIndexToMemberIndex) ++ { ++ throw RuntimeException( ++ OUString::createFromAscii("illegal vtable index!"), ++ (XInterface *)pCppI ); ++ } ++ ++ // determine called method ++ OSL_ENSURE( nVtableCall < pTypeDescr->nMapFunctionIndexToMemberIndex, "### illegal vtable index!" ); ++ sal_Int32 nMemberPos = pTypeDescr->pMapFunctionIndexToMemberIndex[nVtableCall]; ++ OSL_ENSURE( nMemberPos < pTypeDescr->nAllMembers, "### illegal member index!" ); ++ ++ TypeDescription aMemberDescr( pTypeDescr->ppAllMembers[nMemberPos] ); ++ ++ typelib_TypeClass eRet; ++ switch (aMemberDescr.get()->eTypeClass) ++ { ++ case typelib_TypeClass_INTERFACE_ATTRIBUTE: ++ { ++ if (pTypeDescr->pMapMemberIndexToFunctionIndex[nMemberPos] == nVtableCall) ++ { ++ // is GET method ++ eRet = cpp2uno_call( ++ pCppI, aMemberDescr.get(), ++ ((typelib_InterfaceAttributeTypeDescription *)aMemberDescr.get())->pAttributeTypeRef, ++ 0, 0, // no params ++ pCallStack, pRegisterReturn ); ++ } ++ else ++ { ++ // is SET method ++ typelib_MethodParameter aParam; ++ aParam.pTypeRef = ++ ((typelib_InterfaceAttributeTypeDescription *)aMemberDescr.get())->pAttributeTypeRef; ++ aParam.bIn = sal_True; ++ aParam.bOut = sal_False; ++ ++ eRet = cpp2uno_call( ++ pCppI, aMemberDescr.get(), ++ 0, // indicates void return ++ 1, &aParam, ++ pCallStack, pRegisterReturn ); ++ } ++ break; ++ } ++ case typelib_TypeClass_INTERFACE_METHOD: ++ { ++ // is METHOD ++ switch (nVtableCall) ++ { ++ case 1: // acquire() ++ pCppI->acquireProxy(); // non virtual call! ++ eRet = typelib_TypeClass_VOID; ++ break; ++ case 2: // release() ++ pCppI->releaseProxy(); // non virtual call! ++ eRet = typelib_TypeClass_VOID; ++ break; ++ case 0: // queryInterface() opt ++ { ++ typelib_TypeDescription * pTD = 0; ++ TYPELIB_DANGER_GET( &pTD, reinterpret_cast< Type * >( pCallStack[2] )->getTypeLibType() ); ++ if (pTD) ++ { ++ XInterface * pInterface = 0; ++ (*pCppI->pBridge->pCppEnv->getRegisteredInterface)( ++ pCppI->pBridge->pCppEnv, ++ (void **)&pInterface, pCppI->oid.pData, (typelib_InterfaceTypeDescription *)pTD ); ++ ++ if (pInterface) ++ { ++ ::uno_any_construct( ++ reinterpret_cast< uno_Any * >( pCallStack[0] ), ++ &pInterface, pTD, cpp_acquire ); ++ pInterface->release(); ++ TYPELIB_DANGER_RELEASE( pTD ); ++ *(void **)pRegisterReturn = pCallStack[0]; ++ eRet = typelib_TypeClass_ANY; ++ break; ++ } ++ TYPELIB_DANGER_RELEASE( pTD ); ++ } ++ } // else perform queryInterface() ++ default: ++ eRet = cpp2uno_call( ++ pCppI, aMemberDescr.get(), ++ ((typelib_InterfaceMethodTypeDescription *)aMemberDescr.get())->pReturnTypeRef, ++ ((typelib_InterfaceMethodTypeDescription *)aMemberDescr.get())->nParams, ++ ((typelib_InterfaceMethodTypeDescription *)aMemberDescr.get())->pParams, ++ pCallStack, pRegisterReturn ); ++ } ++ break; ++ } ++ default: ++ { ++ throw RuntimeException( ++ OUString::createFromAscii("no member description found!"), ++ (XInterface *)pCppI ); ++ // is here for dummy ++ eRet = typelib_TypeClass_VOID; ++ } ++ } ++ ++ return eRet; ++} ++ ++//================================================================================================== ++/** ++ * is called on incoming vtable calls ++ * (called by asm snippets) ++ */ ++ ++extern "C" { ++int64_t cpp_vtable_call( int nTableEntry, int **pCallStack); ++ ++sal_Int64 cpp_vtable_call( int nTableEntry, int **pCallStack) ++{ ++ sal_Int64 nRegReturn; ++ cpp_mediate( nTableEntry, pCallStack, &nRegReturn ); ++ ++ return nRegReturn; ++} ++ ++} ++ ++ ++//================================================================================================== ++class MediateClassData ++{ ++ typedef ::std::hash_map< OUString, void *, OUStringHash > t_classdata_map; ++ t_classdata_map m_map; ++ Mutex m_mutex; ++ ++public: ++ void const * get_vtable( typelib_InterfaceTypeDescription * pTD ) SAL_THROW( () ); ++ ++ inline MediateClassData() SAL_THROW( () ) ++ {} ++ ~MediateClassData() SAL_THROW( () ); ++}; ++//__________________________________________________________________________________________________ ++MediateClassData::~MediateClassData() SAL_THROW( () ) ++{ ++ OSL_TRACE( "> calling ~MediateClassData(): freeing mediate vtables." ); ++ ++ for ( t_classdata_map::const_iterator iPos( m_map.begin() ); iPos != m_map.end(); ++iPos ) ++ { ++ ::rtl_freeMemory( iPos->second ); ++ } ++} ++ ++extern "C" { ++ ++void arm_codeSnippetSimple(void); ++void arm_codeSnippetComplex(void); ++ ++} ++ ++ ++//-------------------------------------------------------------------------------------------------- ++static inline int *codeSnippet(bool simple_ret_type ) SAL_THROW( () ) ++{ ++ return simple_ret_type ? (int)arm_codeSnippetSimple : (int)arm_codeSnippetComplex; ++} ++//__________________________________________________________________________________________________ ++void const * MediateClassData::get_vtable( typelib_InterfaceTypeDescription * pTD ) SAL_THROW( () ) ++{ ++ void * buffer; ++ ++ // avoiding locked counts ++ OUString const & unoName = *(OUString const *)&((typelib_TypeDescription *)pTD)->pTypeName; ++ { ++ MutexGuard aGuard( m_mutex ); ++ t_classdata_map::const_iterator iFind( m_map.find( unoName ) ); ++ if (iFind == m_map.end()) ++ { ++ // create new vtable ++ sal_Int32 nSlots = pTD->nMapFunctionIndexToMemberIndex; ++ buffer = ::rtl_allocateMemory( ((2 + nSlots) * sizeof (void *))); ++ ++ ::std::pair< t_classdata_map::iterator, bool > insertion( ++ m_map.insert( t_classdata_map::value_type( unoName, buffer ) ) ); ++ OSL_ENSURE( insertion.second, "### inserting new vtable buffer failed?!" ); ++ ++ void ** slots = (void **)buffer; ++ *slots++ = 0; ++ *slots++ = 0; // rtti ++ ++ sal_uInt32 vtable_pos = 0; ++ sal_Int32 nAllMembers = pTD->nAllMembers; ++ typelib_TypeDescriptionReference ** ppAllMembers = pTD->ppAllMembers; ++ for ( sal_Int32 nPos = 0; nPos < nAllMembers; ++nPos ) ++ { ++ typelib_TypeDescription * pTD = 0; ++ TYPELIB_DANGER_GET( &pTD, ppAllMembers[ nPos ] ); ++ OSL_ASSERT( pTD ); ++ if (typelib_TypeClass_INTERFACE_ATTRIBUTE == pTD->eTypeClass) ++ { ++ bool simple_ret = cppu_isSimpleType( ++ ((typelib_InterfaceAttributeTypeDescription *)pTD)->pAttributeTypeRef->eTypeClass ); ++ // get method ++ *slots++ = codeSnippet(simple_ret); ++ ++ if (! ((typelib_InterfaceAttributeTypeDescription *)pTD)->bReadOnly) ++ { ++ // set method ++ *slots++ = codeSnippet(true); ++ } ++ } ++ else ++ { ++ bool simple_ret = cppu_isSimpleType( ++ ((typelib_InterfaceMethodTypeDescription *)pTD)->pReturnTypeRef->eTypeClass ); ++ *slots++ = codeSnippet(simple_ret); ++ } ++ TYPELIB_DANGER_RELEASE( pTD ); ++ } ++ OSL_ASSERT( vtable_pos == nSlots ); ++ } ++ else ++ { ++ buffer = iFind->second; ++ } ++ } ++ ++ return ((void **)buffer + 2); ++} ++ ++//================================================================================================== ++void SAL_CALL cppu_cppInterfaceProxy_patchVtable( ++ XInterface * pCppI, typelib_InterfaceTypeDescription * pTypeDescr ) throw () ++{ ++ static MediateClassData * s_pMediateClassData = 0; ++ if (! s_pMediateClassData) ++ { ++ MutexGuard aGuard( Mutex::getGlobalMutex() ); ++ if (! s_pMediateClassData) ++ { ++#ifdef LEAK_STATIC_DATA ++ s_pMediateClassData = new MediateClassData(); ++#else ++ static MediateClassData s_aMediateClassData; ++ s_pMediateClassData = &s_aMediateClassData; ++#endif ++ } ++ } ++ *(void const **)pCppI = s_pMediateClassData->get_vtable( pTypeDescr ); ++} ++ ++} ++ ++extern "C" ++{ ++//################################################################################################## ++sal_Bool SAL_CALL component_canUnload( TimeValue * pTime ) ++ SAL_THROW_EXTERN_C() ++{ ++ return CPPU_CURRENT_NAMESPACE::g_moduleCount.canUnload( ++ &CPPU_CURRENT_NAMESPACE::g_moduleCount, pTime ); ++} ++//################################################################################################## ++void SAL_CALL uno_initEnvironment( uno_Environment * pCppEnv ) ++ SAL_THROW_EXTERN_C() ++{ ++ CPPU_CURRENT_NAMESPACE::cppu_cppenv_initEnvironment( ++ pCppEnv ); ++} ++//################################################################################################## ++void SAL_CALL uno_ext_getMapping( ++ uno_Mapping ** ppMapping, uno_Environment * pFrom, uno_Environment * pTo ) ++ SAL_THROW_EXTERN_C() ++{ ++ CPPU_CURRENT_NAMESPACE::cppu_ext_getMapping( ++ ppMapping, pFrom, pTo ); ++} ++} +diff --exclude=unxlngr.pro -urN openoffice.org-1.1.1/bridges/source/cpp_uno/gcc3_linux_arm/except.cxx openoffice.org-1.1.1-arm/bridges/source/cpp_uno/gcc3_linux_arm/except.cxx +--- bridges/source/cpp_uno/gcc3_linux_arm/except.cxx 1970-01-01 01:00:00.000000000 +0100 ++++ bridges/source/cpp_uno/gcc3_linux_arm/except.cxx 2004-07-13 23:44:57.000000000 +0100 +@@ -0,0 +1,359 @@ ++/************************************************************************* ++ * ++ * $RCSfile$ ++ * ++ * $Revision$ ++ * ++ * last change: $Author$ $Date$ ++ * ++ * The Contents of this file are made available subject to the terms of ++ * either of the following licenses ++ * ++ * - GNU Lesser General Public License Version 2.1 ++ * - Sun Industry Standards Source License Version 1.1 ++ * ++ * Sun Microsystems Inc., October, 2000 ++ * ++ * GNU Lesser General Public License Version 2.1 ++ * ============================================= ++ * Copyright 2000 by Sun Microsystems, Inc. ++ * 901 San Antonio Road, Palo Alto, CA 94303, USA ++ * ++ * This library is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU Lesser General Public ++ * License version 2.1, as published by the Free Software Foundation. ++ * ++ * This library is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * Lesser General Public License for more details. ++ * ++ * You should have received a copy of the GNU Lesser General Public ++ * License along with this library; if not, write to the Free Software ++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, ++ * MA 02111-1307 USA ++ * ++ * ++ * Sun Industry Standards Source License Version 1.1 ++ * ================================================= ++ * The contents of this file are subject to the Sun Industry Standards ++ * Source License Version 1.1 (the "License"); You may not use this file ++ * except in compliance with the License. You may obtain a copy of the ++ * License at http://www.openoffice.org/license.html. ++ * ++ * Software provided under this License is provided on an "AS IS" basis, ++ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, ++ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, ++ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. ++ * See the License for the specific provisions governing your rights and ++ * obligations concerning the Software. ++ * ++ * The Initial Developer of the Original Code is: Sun Microsystems, Inc. ++ * ++ * Copyright: 2000 by Sun Microsystems, Inc. ++ * ++ * All Rights Reserved. ++ * ++ * Contributor(s): _______________________________________ ++ * ++ * ++ ************************************************************************/ ++ ++#include <stdio.h> ++#include <dlfcn.h> ++#include <cxxabi.h> ++#include <hash_map> ++ ++#include <rtl/strbuf.hxx> ++#include <rtl/ustrbuf.hxx> ++#include <osl/diagnose.h> ++#include <osl/mutex.hxx> ++ ++#include <bridges/cpp_uno/bridge.hxx> ++#include <typelib/typedescription.hxx> ++#include <uno/any2.h> ++ ++#include "share.hxx" ++ ++ ++using namespace ::std; ++using namespace ::osl; ++using namespace ::rtl; ++using namespace ::com::sun::star::uno; ++using namespace ::__cxxabiv1; ++ ++ ++namespace CPPU_CURRENT_NAMESPACE ++{ ++ ++void dummy_can_throw_anything( char const * ) ++{ ++} ++ ++//================================================================================================== ++static OUString toUNOname( char const * p ) SAL_THROW( () ) ++{ ++#if OSL_DEBUG_LEVEL > 1 ++ char const * start = p; ++#endif ++ ++ // example: N3com3sun4star4lang24IllegalArgumentExceptionE ++ ++ OUStringBuffer buf( 64 ); ++ OSL_ASSERT( 'N' == *p ); ++ ++p; // skip N ++ ++ while ('E' != *p) ++ { ++ // read chars count ++ long n = (*p++ - '0'); ++ while ('0' <= *p && '9' >= *p) ++ { ++ n *= 10; ++ n += (*p++ - '0'); ++ } ++ buf.appendAscii( p, n ); ++ p += n; ++ if ('E' != *p) ++ buf.append( (sal_Unicode)'.' ); ++ } ++ ++#if OSL_DEBUG_LEVEL > 1 ++ OUString ret( buf.makeStringAndClear() ); ++ OString c_ret( OUStringToOString( ret, RTL_TEXTENCODING_ASCII_US ) ); ++ fprintf( stderr, "> toUNOname(): %s => %s\n", start, c_ret.getStr() ); ++ return ret; ++#else ++ return buf.makeStringAndClear(); ++#endif ++} ++ ++//================================================================================================== ++class RTTI ++{ ++ typedef hash_map< OUString, type_info *, OUStringHash > t_rtti_map; ++ ++ Mutex m_mutex; ++ t_rtti_map m_rttis; ++ t_rtti_map m_generatedRttis; ++ ++ void * m_hApp; ++ ++public: ++ RTTI() SAL_THROW( () ); ++ ~RTTI() SAL_THROW( () ); ++ ++ type_info * getRTTI( typelib_CompoundTypeDescription * ) SAL_THROW( () ); ++}; ++//__________________________________________________________________________________________________ ++RTTI::RTTI() SAL_THROW( () ) ++ : m_hApp( dlopen( 0, RTLD_LAZY ) ) ++{ ++} ++//__________________________________________________________________________________________________ ++RTTI::~RTTI() SAL_THROW( () ) ++{ ++ dlclose( m_hApp ); ++} ++ ++//__________________________________________________________________________________________________ ++type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr ) SAL_THROW( () ) ++{ ++ type_info * rtti; ++ ++ OUString const & unoName = *(OUString const *)&pTypeDescr->aBase.pTypeName; ++ ++ MutexGuard guard( m_mutex ); ++ t_rtti_map::const_iterator iFind( m_rttis.find( unoName ) ); ++ if (iFind == m_rttis.end()) ++ { ++ // RTTI symbol ++ OStringBuffer buf( 64 ); ++ buf.append( RTL_CONSTASCII_STRINGPARAM("_ZTIN") ); ++ sal_Int32 index = 0; ++ do ++ { ++ OUString token( unoName.getToken( 0, '.', index ) ); ++ buf.append( token.getLength() ); ++ OString c_token( OUStringToOString( token, RTL_TEXTENCODING_ASCII_US ) ); ++ buf.append( c_token ); ++ } ++ while (index >= 0); ++ buf.append( 'E' ); ++ ++ OString symName( buf.makeStringAndClear() ); ++ rtti = (type_info *)dlsym( m_hApp, symName.getStr() ); ++ ++ if (rtti) ++ { ++ pair< t_rtti_map::iterator, bool > insertion( ++ m_rttis.insert( t_rtti_map::value_type( unoName, rtti ) ) ); ++ OSL_ENSURE( insertion.second, "### inserting new rtti failed?!" ); ++ } ++ else ++ { ++ // try to lookup the symbol in the generated rtti map ++ t_rtti_map::const_iterator iFind( m_generatedRttis.find( unoName ) ); ++ if (iFind == m_generatedRttis.end()) ++ { ++ // we must generate it ! ++ // symbol and rtti-name is nearly identical, ++ // the symbol is prefixed with _ZTI ++ char const * rttiName = symName.getStr() +4; ++#if OSL_DEBUG_LEVEL > 1 ++ fprintf( stderr,"generated rtti for %s\n", rttiName ); ++#endif ++ if (pTypeDescr->pBaseTypeDescription) ++ { ++ // ensure availability of base ++ type_info * base_rtti = getRTTI( ++ (typelib_CompoundTypeDescription *)pTypeDescr->pBaseTypeDescription ); ++ rtti = new __si_class_type_info( ++ strdup( rttiName ), (__class_type_info *)base_rtti ); ++ } ++ else ++ { ++ // this class has no base class ++ rtti = new __class_type_info( strdup( rttiName ) ); ++ } ++ ++ pair< t_rtti_map::iterator, bool > insertion( ++ m_generatedRttis.insert( t_rtti_map::value_type( unoName, rtti ) ) ); ++ OSL_ENSURE( insertion.second, "### inserting new generated rtti failed?!" ); ++ } ++ else // taking already generated rtti ++ { ++ rtti = iFind->second; ++ } ++ } ++ } ++ else ++ { ++ rtti = iFind->second; ++ } ++ ++ return rtti; ++} ++ ++//-------------------------------------------------------------------------------------------------- ++static void deleteException( void * pExc ) ++{ ++ __cxa_exception const * header = ((__cxa_exception const *)pExc - 1); ++ typelib_TypeDescription * pTD = 0; ++ OUString unoName( toUNOname( header->exceptionType->name() ) ); ++ ::typelib_typedescription_getByName( &pTD, unoName.pData ); ++ OSL_ENSURE( pTD, "### unknown exception type! leaving out destruction => leaking!!!" ); ++ if (pTD) ++ { ++ ::uno_destructData( pExc, pTD, cpp_release ); ++ ::typelib_typedescription_release( pTD ); ++ } ++} ++ ++//================================================================================================== ++void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp ) ++{ ++#if OSL_DEBUG_LEVEL > 1 ++ OString cstr( ++ OUStringToOString( ++ *reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ), ++ RTL_TEXTENCODING_ASCII_US ) ); ++ fprintf( stderr, "> uno exception occured: %s\n", cstr.getStr() ); ++#endif ++ void * pCppExc; ++ type_info * rtti; ++ ++ { ++ // construct cpp exception object ++ typelib_TypeDescription * pTypeDescr = 0; ++ TYPELIB_DANGER_GET( &pTypeDescr, pUnoExc->pType ); ++ OSL_ASSERT( pTypeDescr ); ++ if (! pTypeDescr) ++ { ++ throw RuntimeException( ++ OUString( RTL_CONSTASCII_USTRINGPARAM("cannot get typedescription for type ") ) + ++ *reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ), ++ Reference< XInterface >() ); ++ } ++ ++ pCppExc = __cxa_allocate_exception( pTypeDescr->nSize ); ++ ::uno_copyAndConvertData( pCppExc, pUnoExc->pData, pTypeDescr, pUno2Cpp ); ++ ++ // destruct uno exception ++ ::uno_any_destruct( pUnoExc, 0 ); ++ // avoiding locked counts ++ static RTTI * s_rtti = 0; ++ if (! s_rtti) ++ { ++ MutexGuard guard( Mutex::getGlobalMutex() ); ++ if (! s_rtti) ++ { ++#ifdef LEAK_STATIC_DATA ++ s_rtti = new RTTI(); ++#else ++ static RTTI rtti_data; ++ s_rtti = &rtti_data; ++#endif ++ } ++ } ++ rtti = (type_info *)s_rtti->getRTTI( (typelib_CompoundTypeDescription *) pTypeDescr ); ++ TYPELIB_DANGER_RELEASE( pTypeDescr ); ++ OSL_ENSURE( rtti, "### no rtti for throwing exception!" ); ++ if (! rtti) ++ { ++ throw RuntimeException( ++ OUString( RTL_CONSTASCII_USTRINGPARAM("no rtti for type ") ) + ++ *reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ), ++ Reference< XInterface >() ); ++ } ++ } ++ ++ __cxa_throw( pCppExc, rtti, deleteException ); ++} ++ ++//================================================================================================== ++void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping * pCpp2Uno ) ++{ ++ if (! header) ++ { ++ RuntimeException aRE( ++ OUString( RTL_CONSTASCII_USTRINGPARAM("no exception header!") ), ++ Reference< XInterface >() ); ++ Type const & rType = ::getCppuType( &aRE ); ++ uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno ); ++#if OSL_DEBUG_LEVEL > 0 ++ OString cstr( OUStringToOString( aRE.Message, RTL_TEXTENCODING_ASCII_US ) ); ++ OSL_ENSURE( 0, cstr.getStr() ); ++#endif ++ return; ++ } ++ ++ typelib_TypeDescription * pExcTypeDescr = 0; ++ OUString unoName( toUNOname( header->exceptionType->name() ) ); ++#if OSL_DEBUG_LEVEL > 1 ++ OString cstr_unoName( OUStringToOString( unoName, RTL_TEXTENCODING_ASCII_US ) ); ++ fprintf( stderr, "> c++ exception occured: %s\n", cstr_unoName.getStr() ); ++#endif ++ typelib_typedescription_getByName( &pExcTypeDescr, unoName.pData ); ++ if (0 == pExcTypeDescr) ++ { ++ RuntimeException aRE( ++ OUString( RTL_CONSTASCII_USTRINGPARAM("exception type not found: ") ) + unoName, ++ Reference< XInterface >() ); ++ Type const & rType = ::getCppuType( &aRE ); ++ uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno ); ++#if OSL_DEBUG_LEVEL > 0 ++ OString cstr( OUStringToOString( aRE.Message, RTL_TEXTENCODING_ASCII_US ) ); ++ OSL_ENSURE( 0, cstr.getStr() ); ++#endif ++ } ++ else ++ { ++ // construct uno exception any ++ uno_any_constructAndConvert( pUnoExc, header->adjustedPtr, pExcTypeDescr, pCpp2Uno ); ++ typelib_typedescription_release( pExcTypeDescr ); ++ } ++} ++ ++} ++ +diff --exclude=unxlngr.pro -urN openoffice.org-1.1.1/bridges/source/cpp_uno/gcc3_linux_arm/makefile.mk openoffice.org-1.1.1-arm/bridges/source/cpp_uno/gcc3_linux_arm/makefile.mk +--- bridges/source/cpp_uno/gcc3_linux_arm/makefile.mk 1970-01-01 01:00:00.000000000 +0100 ++++ bridges/source/cpp_uno/gcc3_linux_arm/makefile.mk 2004-07-02 14:29:08.000000000 +0100 +@@ -0,0 +1,122 @@ ++#************************************************************************* ++# ++# $RCSfile$ ++# ++# $Revision$ ++# ++# last change: $Author$ $Date$ ++# ++# The Contents of this file are made available subject to the terms of ++# either of the following licenses ++# ++# - GNU Lesser General Public License Version 2.1 ++# - Sun Industry Standards Source License Version 1.1 ++# ++# Sun Microsystems Inc., October, 2000 ++# ++# GNU Lesser General Public License Version 2.1 ++# ============================================= ++# Copyright 2000 by Sun Microsystems, Inc. ++# 901 San Antonio Road, Palo Alto, CA 94303, USA ++# ++# This library is free software; you can redistribute it and/or ++# modify it under the terms of the GNU Lesser General Public ++# License version 2.1, as published by the Free Software Foundation. ++# ++# This library is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++# Lesser General Public License for more details. ++# ++# You should have received a copy of the GNU Lesser General Public ++# License along with this library; if not, write to the Free Software ++# Foundation, Inc., 59 Temple Place, Suite 330, Boston, ++# MA 02111-1307 USA ++# ++# ++# Sun Industry Standards Source License Version 1.1 ++# ================================================= ++# The contents of this file are subject to the Sun Industry Standards ++# Source License Version 1.1 (the "License"); You may not use this file ++# except in compliance with the License. You may obtain a copy of the ++# License at http://www.openoffice.org/license.html. ++# ++# Software provided under this License is provided on an "AS IS" basis, ++# WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, ++# WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, ++# MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. ++# See the License for the specific provisions governing your rights and ++# obligations concerning the Software. ++# ++# The Initial Developer of the Original Code is: Sun Microsystems, Inc. ++# ++# Copyright: 2000 by Sun Microsystems, Inc. ++# ++# All Rights Reserved. ++# ++# Contributor(s): _______________________________________ ++# ++# ++# ++#************************************************************************* ++ ++PRJ=..$/..$/.. ++ ++PRJNAME=bridges ++TARGET=gcc3_uno ++LIBTARGET=no ++ENABLE_EXCEPTIONS=TRUE ++NO_BSYMBOLIC=TRUE ++ ++# --- Settings ----------------------------------------------------- ++ ++.INCLUDE : svpre.mk ++.INCLUDE : settings.mk ++.INCLUDE : sv.mk ++ ++# --- Files -------------------------------------------------------- ++ ++.IF "$(COM)$(OS)$(CPU)$(COMNAME)" == "GCCLINUXRgcc3" ++ ++.IF "$(cppu_no_leak)" == "" ++CFLAGS += -DLEAK_STATIC_DATA ++.ENDIF ++ ++CFLAGSNOOPT=-O0 ++ ++SLOFILES= \ ++ $(SLO)$/except.obj \ ++ $(SLO)$/cpp2uno.obj \ ++ $(SLO)$/uno2cpp.obj \ ++ $(SLO)$/armhelper.obj ++ ++SHL1TARGET= $(TARGET) ++ ++SHL1DEF=$(MISC)$/$(SHL1TARGET).def ++SHL1IMPLIB=i$(TARGET) ++SHL1VERSIONMAP=..$/..$/bridge_exports.map ++ ++SHL1OBJS= \ ++ $(SLO)$/except.obj \ ++ $(SLO)$/cpp2uno.obj \ ++ $(SLO)$/uno2cpp.obj \ ++ $(SLO)$/armhelper.obj ++ ++ ++SHL1STDLIBS= \ ++ $(CPPULIB) \ ++ $(SALLIB) ++ ++ ++ ++.ENDIF ++ ++# --- Targets ------------------------------------------------------ ++ ++.INCLUDE : target.mk ++ ++$(SLO)$/%.obj: %.s ++ $(CC) -c -o $(SLO)$/$(@:b).o $< -fPIC ; touch $@ ++ ++ ++ +diff --exclude=unxlngr.pro -urN openoffice.org-1.1.1/bridges/source/cpp_uno/gcc3_linux_arm/share.hxx openoffice.org-1.1.1-arm/bridges/source/cpp_uno/gcc3_linux_arm/share.hxx +--- bridges/source/cpp_uno/gcc3_linux_arm/share.hxx 1970-01-01 01:00:00.000000000 +0100 ++++ bridges/source/cpp_uno/gcc3_linux_arm/share.hxx 2004-06-22 11:38:55.000000000 +0100 +@@ -0,0 +1,120 @@ ++/************************************************************************* ++ * ++ * $RCSfile$ ++ * ++ * $Revision$ ++ * ++ * last change: $Author$ $Date$ ++ * ++ * The Contents of this file are made available subject to the terms of ++ * either of the following licenses ++ * ++ * - GNU Lesser General Public License Version 2.1 ++ * - Sun Industry Standards Source License Version 1.1 ++ * ++ * Sun Microsystems Inc., October, 2000 ++ * ++ * GNU Lesser General Public License Version 2.1 ++ * ============================================= ++ * Copyright 2000 by Sun Microsystems, Inc. ++ * 901 San Antonio Road, Palo Alto, CA 94303, USA ++ * ++ * This library is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU Lesser General Public ++ * License version 2.1, as published by the Free Software Foundation. ++ * ++ * This library is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * Lesser General Public License for more details. ++ * ++ * You should have received a copy of the GNU Lesser General Public ++ * License along with this library; if not, write to the Free Software ++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, ++ * MA 02111-1307 USA ++ * ++ * ++ * Sun Industry Standards Source License Version 1.1 ++ * ================================================= ++ * The contents of this file are subject to the Sun Industry Standards ++ * Source License Version 1.1 (the "License"); You may not use this file ++ * except in compliance with the License. You may obtain a copy of the ++ * License at http://www.openoffice.org/license.html. ++ * ++ * Software provided under this License is provided on an "AS IS" basis, ++ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, ++ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, ++ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. ++ * See the License for the specific provisions governing your rights and ++ * obligations concerning the Software. ++ * ++ * The Initial Developer of the Original Code is: Sun Microsystems, Inc. ++ * ++ * Copyright: 2000 by Sun Microsystems, Inc. ++ * ++ * All Rights Reserved. ++ * ++ * Contributor(s): _______________________________________ ++ * ++ * ++ ************************************************************************/ ++ ++#include <typeinfo> ++#include <exception> ++#include <cstddef> ++ ++namespace CPPU_CURRENT_NAMESPACE ++{ ++ ++// ----- following decl from libstdc++-v3/libsupc++/unwind-cxx.h and unwind.h ++ ++struct _Unwind_Exception ++{ ++ unsigned exception_class __attribute__((__mode__(__DI__))); ++ void * exception_cleanup; ++ unsigned private_1 __attribute__((__mode__(__word__))); ++ unsigned private_2 __attribute__((__mode__(__word__))); ++} __attribute__((__aligned__)); ++ ++struct __cxa_exception ++{ ++ ::std::type_info *exceptionType; ++ void (*exceptionDestructor)(void *); ++ ++ ::std::unexpected_handler unexpectedHandler; ++ ::std::terminate_handler terminateHandler; ++ ++ __cxa_exception *nextException; ++ ++ int handlerCount; ++ ++ int handlerSwitchValue; ++ const unsigned char *actionRecord; ++ const unsigned char *languageSpecificData; ++ void *catchTemp; ++ void *adjustedPtr; ++ ++ _Unwind_Exception unwindHeader; ++}; ++ ++extern "C" void *__cxa_allocate_exception( ++ std::size_t thrown_size ) throw(); ++extern "C" void __cxa_throw ( ++ void *thrown_exception, std::type_info *tinfo, void (*dest) (void *) ) __attribute__((noreturn)); ++ ++struct __cxa_eh_globals ++{ ++ __cxa_exception *caughtExceptions; ++ unsigned int uncaughtExceptions; ++}; ++extern "C" __cxa_eh_globals *__cxa_get_globals () throw(); ++ ++// ----- ++ ++//================================================================================================== ++void raiseException( ++ uno_Any * pUnoExc, uno_Mapping * pUno2Cpp ); ++//================================================================================================== ++void fillUnoException( ++ __cxa_exception * header, uno_Any *, uno_Mapping * pCpp2Uno ); ++} +diff --exclude=unxlngr.pro -urN openoffice.org-1.1.1/bridges/source/cpp_uno/gcc3_linux_arm/uno2cpp.cxx openoffice.org-1.1.1-arm/bridges/source/cpp_uno/gcc3_linux_arm/uno2cpp.cxx +--- bridges/source/cpp_uno/gcc3_linux_arm/uno2cpp.cxx 1970-01-01 01:00:00.000000000 +0100 ++++ bridges/source/cpp_uno/gcc3_linux_arm/uno2cpp.cxx 2004-07-20 15:14:34.000000000 +0100 +@@ -0,0 +1,429 @@ ++/************************************************************************* ++ * ++ * $RCSfile$ ++ * ++ * $Revision$ ++ * ++ * last change: $Author$ $Date$ ++ * ++ * The Contents of this file are made available subject to the terms of ++ * either of the following licenses ++ * ++ * - GNU Lesser General Public License Version 2.1 ++ * - Sun Industry Standards Source License Version 1.1 ++ * ++ * Sun Microsystems Inc., October, 2000 ++ * ++ * GNU Lesser General Public License Version 2.1 ++ * ============================================= ++ * Copyright 2000 by Sun Microsystems, Inc. ++ * 901 San Antonio Road, Palo Alto, CA 94303, USA ++ * ++ * This library is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU Lesser General Public ++ * License version 2.1, as published by the Free Software Foundation. ++ * ++ * This library is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * Lesser General Public License for more details. ++ * ++ * You should have received a copy of the GNU Lesser General Public ++ * License along with this library; if not, write to the Free Software ++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, ++ * MA 02111-1307 USA ++ * ++ * ++ * Sun Industry Standards Source License Version 1.1 ++ * ================================================= ++ * The contents of this file are subject to the Sun Industry Standards ++ * Source License Version 1.1 (the "License"); You may not use this file ++ * except in compliance with the License. You may obtain a copy of the ++ * License at http://www.openoffice.org/license.html. ++ * ++ * Software provided under this License is provided on an "AS IS" basis, ++ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, ++ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, ++ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. ++ * See the License for the specific provisions governing your rights and ++ * obligations concerning the Software. ++ * ++ * The Initial Developer of the Original Code is: Sun Microsystems, Inc. ++ * ++ * Copyright: 2000 by Sun Microsystems, Inc. ++ * ++ * All Rights Reserved. ++ * ++ * Contributor(s): Modified for ARM support by Peter Naulls <peter@chocky.org> ++ * ++ * ++ ************************************************************************/ ++ ++#include <malloc.h> ++#include <rtl/alloc.h> ++ ++#include <uno/data.h> ++#include <bridges/cpp_uno/bridge.hxx> ++#include <bridges/cpp_uno/type_misc.hxx> ++ ++#include "share.hxx" ++ ++ ++using namespace ::rtl; ++using namespace ::com::sun::star::uno; ++ ++namespace CPPU_CURRENT_NAMESPACE ++{ ++ ++void dummy_can_throw_anything( char const * ); ++ ++extern "C" { ++ sal_Int64 arm_callVirtualMethod(void *, sal_Int32, sal_Int32 *, sal_Int32); ++} ++ ++//================================================================================================== ++static void callVirtualMethod( ++ void * pThis, ++ sal_Int32 nVtableIndex, ++ void * pRegisterReturn, ++ typelib_TypeClass eReturnType, ++ sal_Int32 * pStackLongs, ++ sal_Int32 nStackLongs ) ++{ ++ int regs[2]; ++ // parameter list is mixed list of * and values ++ // reference parameters are pointers ++ ++ OSL_ENSURE( pStackLongs && pThis, "### null ptr!" ); ++ OSL_ENSURE( (sizeof(void *) == 4) && (sizeof(sal_Int32) == 4), "### unexpected size of int!" ); ++ OSL_ENSURE( nStackLongs && pStackLongs, "### no stack in callVirtualMethod !" ); ++ ++ // never called ++ if (! pThis) dummy_can_throw_anything("xxx"); // address something ++ ++ *((sal_Int64 *)regs) = arm_callVirtualMethod(pThis, nStackLongs, pStackLongs, nVtableIndex); ++ ++ switch( eReturnType ) ++ { ++ case typelib_TypeClass_HYPER: ++ case typelib_TypeClass_UNSIGNED_HYPER: ++ ((long*)pRegisterReturn)[1] = regs[1]; ++ case typelib_TypeClass_LONG: ++ case typelib_TypeClass_UNSIGNED_LONG: ++ case typelib_TypeClass_CHAR: ++ case typelib_TypeClass_ENUM: ++ ((long*)pRegisterReturn)[0] = regs[0]; ++ break; ++ case typelib_TypeClass_SHORT: ++ case typelib_TypeClass_UNSIGNED_SHORT: ++ *(unsigned short*)pRegisterReturn = regs[0]; ++ break; ++ case typelib_TypeClass_BOOLEAN: ++ case typelib_TypeClass_BYTE: ++ *(unsigned char*)pRegisterReturn = regs[0]; ++ break; ++ case typelib_TypeClass_DOUBLE: ++ ((long*)pRegisterReturn)[1] = regs[0]; ++ case typelib_TypeClass_FLOAT: ++ ((long*)pRegisterReturn)[0] = regs[0]; ++ break; ++ } ++} ++ ++//================================================================================================== ++static void cpp_call( ++ cppu_unoInterfaceProxy * pThis, ++ sal_Int32 nVtableCall, ++ typelib_TypeDescriptionReference * pReturnTypeRef, ++ sal_Int32 nParams, typelib_MethodParameter * pParams, ++ void * pUnoReturn, void * pUnoArgs[], uno_Any ** ppUnoExc ) ++{ ++ // max space for: [complex ret ptr], values|ptr ... ++ char * pCppStack = ++ (char *)alloca( sizeof(sal_Int32) + ((nParams+2) * sizeof(sal_Int64)) ); ++ char * pCppStackStart = pCppStack; ++ ++ // return ++ typelib_TypeDescription * pReturnTypeDescr = 0; ++ TYPELIB_DANGER_GET( &pReturnTypeDescr, pReturnTypeRef ); ++ OSL_ENSURE( pReturnTypeDescr, "### expected return type description!" ); ++ ++ void * pCppReturn = 0; // if != 0 && != pUnoReturn, needs reconversion ++ ++ if (pReturnTypeDescr) ++ { ++ ++ if (cppu_isSimpleType( pReturnTypeDescr )) ++ { ++ pCppReturn = pUnoReturn; // direct way for simple types ++ } ++ else ++ { ++ // complex return via ptr ++ pCppReturn = *(void **)pCppStack = (cppu_relatesToInterface( pReturnTypeDescr ) ++ ? alloca( pReturnTypeDescr->nSize ) ++ : pUnoReturn); // direct way ++ pCppStack += sizeof(void *); ++ } ++ } ++ // push this ++ *(void**)pCppStack = pThis->pCppI; ++ pCppStack += sizeof( void* ); ++ ++ // stack space ++ OSL_ENSURE( sizeof(void *) == sizeof(sal_Int32), "### unexpected size!" ); ++ // args ++ void ** pCppArgs = (void **)alloca( 3 * sizeof(void *) * nParams ); ++ // indizes of values this have to be converted (interface conversion cpp<=>uno) ++ sal_Int32 * pTempIndizes = (sal_Int32 *)(pCppArgs + nParams); ++ // type descriptions for reconversions ++ typelib_TypeDescription ** ppTempParamTypeDescr = (typelib_TypeDescription **)(pCppArgs + (2 * nParams)); ++ ++ sal_Int32 nTempIndizes = 0; ++ ++ for ( sal_Int32 nPos = 0; nPos < nParams; ++nPos ) ++ { ++ const typelib_MethodParameter & rParam = pParams[nPos]; ++ typelib_TypeDescription * pParamTypeDescr = 0; ++ TYPELIB_DANGER_GET( &pParamTypeDescr, rParam.pTypeRef ); ++ ++ if (!rParam.bOut && cppu_isSimpleType( pParamTypeDescr )) ++ { ++ uno_copyAndConvertData( pCppArgs[nPos] = pCppStack, pUnoArgs[nPos], pParamTypeDescr, ++ &pThis->pBridge->aUno2Cpp ); ++ ++ switch (pParamTypeDescr->eTypeClass) ++ { ++ case typelib_TypeClass_HYPER: ++ case typelib_TypeClass_UNSIGNED_HYPER: ++ case typelib_TypeClass_DOUBLE: ++ pCppStack += sizeof(sal_Int32); // extra long ++ } ++ // no longer needed ++ TYPELIB_DANGER_RELEASE( pParamTypeDescr ); ++ } ++ else // ptr to complex value | ref ++ { ++ if (! rParam.bIn) // is pure out ++ { ++ // cpp out is constructed mem, uno out is not! ++ uno_constructData( ++ *(void **)pCppStack = pCppArgs[nPos] = alloca( pParamTypeDescr->nSize ), ++ pParamTypeDescr ); ++ pTempIndizes[nTempIndizes] = nPos; // default constructed for cpp call ++ // will be released at reconversion ++ ppTempParamTypeDescr[nTempIndizes++] = pParamTypeDescr; ++ } ++ // is in/inout ++ else if (cppu_relatesToInterface( pParamTypeDescr )) ++ { ++ uno_copyAndConvertData( ++ *(void **)pCppStack = pCppArgs[nPos] = alloca( pParamTypeDescr->nSize ), ++ pUnoArgs[nPos], pParamTypeDescr, &pThis->pBridge->aUno2Cpp ); ++ ++ pTempIndizes[nTempIndizes] = nPos; // has to be reconverted ++ // will be released at reconversion ++ ppTempParamTypeDescr[nTempIndizes++] = pParamTypeDescr; ++ } ++ else // direct way ++ { ++ *(void **)pCppStack = pCppArgs[nPos] = pUnoArgs[nPos]; ++ // no longer needed ++ TYPELIB_DANGER_RELEASE( pParamTypeDescr ); ++ } ++ } ++ pCppStack += sizeof(sal_Int32); // standard parameter length ++ } ++ ++ try ++ { ++ ++ OSL_ENSURE( !( (pCppStack - pCppStackStart ) & 3), "UNALIGNED STACK !!! (Please DO panic)" ); ++ ++ callVirtualMethod( ++ pThis->pCppI, nVtableCall, ++ pCppReturn, pReturnTypeDescr->eTypeClass, ++ (sal_Int32 *)pCppStackStart, (pCppStack - pCppStackStart) / sizeof(sal_Int32) ); ++ // NO exception occured... ++ *ppUnoExc = 0; ++ ++ // reconvert temporary params ++ for ( ; nTempIndizes--; ) ++ { ++ sal_Int32 nIndex = pTempIndizes[nTempIndizes]; ++ typelib_TypeDescription * pParamTypeDescr = ppTempParamTypeDescr[nTempIndizes]; ++ ++ if (pParams[nIndex].bIn) ++ { ++ if (pParams[nIndex].bOut) // inout ++ { ++ uno_destructData( pUnoArgs[nIndex], pParamTypeDescr, 0 ); // destroy uno value ++ uno_copyAndConvertData( pUnoArgs[nIndex], pCppArgs[nIndex], pParamTypeDescr, ++ &pThis->pBridge->aCpp2Uno ); ++ } ++ } ++ else // pure out ++ { ++ uno_copyAndConvertData( pUnoArgs[nIndex], pCppArgs[nIndex], pParamTypeDescr, ++ &pThis->pBridge->aCpp2Uno ); ++ } ++ // destroy temp cpp param => cpp: every param was constructed ++ uno_destructData( pCppArgs[nIndex], pParamTypeDescr, cpp_release ); ++ ++ TYPELIB_DANGER_RELEASE( pParamTypeDescr ); ++ } ++ // return value ++ if (pCppReturn && pUnoReturn != pCppReturn) ++ { ++ uno_copyAndConvertData( pUnoReturn, pCppReturn, pReturnTypeDescr, ++ &pThis->pBridge->aCpp2Uno ); ++ uno_destructData( pCppReturn, pReturnTypeDescr, cpp_release ); ++ } ++ } ++ catch (...) ++ { ++ __asm__("sub sp, sp, #2048\n"); ++ ++ // fill uno exception ++ fillUnoException( __cxa_get_globals()->caughtExceptions, *ppUnoExc, &pThis->pBridge->aCpp2Uno ); ++ ++ // temporary params ++ for ( ; nTempIndizes--; ) ++ { ++ sal_Int32 nIndex = pTempIndizes[nTempIndizes]; ++ // destroy temp cpp param => cpp: every param was constructed ++ uno_destructData( pCppArgs[nIndex], ppTempParamTypeDescr[nTempIndizes], cpp_release ); ++ TYPELIB_DANGER_RELEASE( ppTempParamTypeDescr[nTempIndizes] ); ++ } ++ // return type ++ if (pReturnTypeDescr) ++ TYPELIB_DANGER_RELEASE( pReturnTypeDescr ); ++ } ++} ++ ++ ++//================================================================================================== ++void SAL_CALL cppu_unoInterfaceProxy_dispatch( ++ uno_Interface * pUnoI, const typelib_TypeDescription * pMemberDescr, ++ void * pReturn, void * pArgs[], uno_Any ** ppException ) throw () ++{ ++ // is my surrogate ++ cppu_unoInterfaceProxy * pThis = (cppu_unoInterfaceProxy *)pUnoI; ++ typelib_InterfaceTypeDescription * pTypeDescr = pThis->pTypeDescr; ++ ++ switch (pMemberDescr->eTypeClass) ++ { ++ case typelib_TypeClass_INTERFACE_ATTRIBUTE: ++ { ++ // determine vtable call index ++ sal_Int32 nMemberPos = ((typelib_InterfaceMemberTypeDescription *)pMemberDescr)->nPosition; ++ OSL_ENSURE( nMemberPos < pTypeDescr->nAllMembers, "### member pos out of range!" ); ++ ++ sal_Int32 nVtableCall = pTypeDescr->pMapMemberIndexToFunctionIndex[nMemberPos]; ++ OSL_ENSURE( nVtableCall < pTypeDescr->nMapFunctionIndexToMemberIndex, "### illegal vtable index!" ); ++ ++ if (pReturn) ++ { ++ // dependent dispatch ++ cpp_call( ++ pThis, nVtableCall, ++ ((typelib_InterfaceAttributeTypeDescription *)pMemberDescr)->pAttributeTypeRef, ++ 0, 0, // no params ++ pReturn, pArgs, ppException ); ++ } ++ else ++ { ++ // is SET ++ typelib_MethodParameter aParam; ++ aParam.pTypeRef = ++ ((typelib_InterfaceAttributeTypeDescription *)pMemberDescr)->pAttributeTypeRef; ++ aParam.bIn = sal_True; ++ aParam.bOut = sal_False; ++ ++ typelib_TypeDescriptionReference * pReturnTypeRef = 0; ++ OUString aVoidName( RTL_CONSTASCII_USTRINGPARAM("void") ); ++ typelib_typedescriptionreference_new( ++ &pReturnTypeRef, typelib_TypeClass_VOID, aVoidName.pData ); ++ ++ // dependent dispatch ++ cpp_call( ++ pThis, nVtableCall +1, // get, then set method ++ pReturnTypeRef, ++ 1, &aParam, ++ pReturn, pArgs, ppException ); ++ ++ typelib_typedescriptionreference_release( pReturnTypeRef ); ++ } ++ ++ break; ++ } ++ case typelib_TypeClass_INTERFACE_METHOD: ++ { ++ // determine vtable call index ++ sal_Int32 nMemberPos = ((typelib_InterfaceMemberTypeDescription *)pMemberDescr)->nPosition; ++ OSL_ENSURE( nMemberPos < pTypeDescr->nAllMembers, "### member pos out of range!" ); ++ ++ sal_Int32 nVtableCall = pTypeDescr->pMapMemberIndexToFunctionIndex[nMemberPos]; ++ OSL_ENSURE( nVtableCall < pTypeDescr->nMapFunctionIndexToMemberIndex, "### illegal vtable index!" ); ++ ++ switch (nVtableCall) ++ { ++ // standard calls ++ case 1: // acquire uno interface ++ (*pUnoI->acquire)( pUnoI ); ++ *ppException = 0; ++ break; ++ case 2: // release uno interface ++ (*pUnoI->release)( pUnoI ); ++ *ppException = 0; ++ break; ++ case 0: // queryInterface() opt ++ { ++ typelib_TypeDescription * pTD = 0; ++ TYPELIB_DANGER_GET( &pTD, reinterpret_cast< Type * >( pArgs[0] )->getTypeLibType() ); ++ if (pTD) ++ { ++ uno_Interface * pInterface = 0; ++ (*pThis->pBridge->pUnoEnv->getRegisteredInterface)( ++ pThis->pBridge->pUnoEnv, ++ (void **)&pInterface, pThis->oid.pData, (typelib_InterfaceTypeDescription *)pTD ); ++ ++ if (pInterface) ++ { ++ ::uno_any_construct( ++ reinterpret_cast< uno_Any * >( pReturn ), ++ &pInterface, pTD, 0 ); ++ (*pInterface->release)( pInterface ); ++ TYPELIB_DANGER_RELEASE( pTD ); ++ *ppException = 0; ++ break; ++ } ++ TYPELIB_DANGER_RELEASE( pTD ); ++ } ++ } // else perform queryInterface() ++ default: ++ // dependent dispatch ++ cpp_call( ++ pThis, nVtableCall, ++ ((typelib_InterfaceMethodTypeDescription *)pMemberDescr)->pReturnTypeRef, ++ ((typelib_InterfaceMethodTypeDescription *)pMemberDescr)->nParams, ++ ((typelib_InterfaceMethodTypeDescription *)pMemberDescr)->pParams, ++ pReturn, pArgs, ppException ); ++ } ++ break; ++ } ++ default: ++ { ++ ::com::sun::star::uno::RuntimeException aExc( ++ OUString( RTL_CONSTASCII_USTRINGPARAM("illegal member type description!") ), ++ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >() ); ++ ++ Type const & rExcType = ::getCppuType( &aExc ); ++ // binary identical null reference ++ ::uno_type_any_construct( *ppException, &aExc, rExcType.getTypeLibType(), 0 ); ++ } ++ } ++} ++ ++} ++ +diff --exclude=unxlngr.pro -urN openoffice.org-1.1.1/config_office/set_soenv.in openoffice.org-1.1.1-arm/config_office/set_soenv.in +--- config_office/set_soenv.in 2004-07-20 12:11:46.000000000 +0100 ++++ config_office/set_soenv.in 2004-07-20 15:18:48.000000000 +0100 +@@ -424,7 +424,7 @@ + $JRETOOLKITDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."alpha".$ds."client"; + $JRETHREADDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."alpha".$ds."native_threads"; + } +- elsif ($machine_type eq "armv4l") ++ elsif (($machine_type eq "armv4l") or ($machine_type eq "armv5l")) + { print "Setting Linux ARM specific values... "; + $outfile = "LinuxARMEnv.Set"; + $CPU = "R"; +diff --exclude=unxlngr.pro -urN openoffice.org-1.1.1/cppu/source/uno/data.cxx openoffice.org-1.1.1-arm/cppu/source/uno/data.cxx +--- cppu/source/uno/data.cxx 2003-04-15 17:37:21.000000000 +0100 ++++ cppu/source/uno/data.cxx 2004-07-13 23:39:01.000000000 +0100 +@@ -394,7 +394,7 @@ + # pragma pack(8) + #endif + +-#if defined(__GNUC__) && (defined(LINUX) || defined(FREEBSD)) && defined(INTEL) ++#if defined(__GNUC__) && (defined(LINUX) || defined(FREEBSD)) && (defined(INTEL) || defined(ARM)) + #define MAX_ALIGNMENT_4 + #endif + +@@ -406,7 +406,7 @@ + if (OFFSET_OF(s, m) != n) { fprintf( stderr, "### OFFSET_OF(" #s ", " #m ") = %d instead of expected %d!!!\n", OFFSET_OF(s, m), n ); abort(); } + + #if OSL_DEBUG_LEVEL > 1 +-#if defined(__GNUC__) && (defined(LINUX) || defined(FREEBSD)) && (defined(INTEL) || defined(POWERPC) || defined(X86_64) || defined(S390)) ++#if defined(__GNUC__) && (defined(LINUX) || defined(FREEBSD)) && (defined(INTEL) || defined(POWERPC) || defined(X86_64) || defined(S390) || defined(ARM)) + #define BINTEST_VERIFYSIZE( s, n ) \ + fprintf( stderr, "> sizeof(" #s ") = %d; __alignof__ (" #s ") = %d\n", sizeof(s), __alignof__ (s) ); \ + if (sizeof(s) != n) { fprintf( stderr, "### sizeof(" #s ") = %d instead of expected %d!!!\n", sizeof(s), n ); abort(); } +@@ -423,7 +423,7 @@ + struct C1 + { + sal_Int16 n1; +-}; ++} __attribute__ ((__packed__)); + struct C2 : public C1 + { + sal_Int32 n2 CPPU_GCC3_ALIGN( C1 ); +@@ -510,15 +510,15 @@ + struct Char1 + { + char c1; +-}; ++} __attribute__ ((__packed__)); + struct Char2 : public Char1 + { + char c2 CPPU_GCC3_ALIGN( Char1 ); +-}; ++} __attribute__ ((__packed__)); + struct Char3 : public Char2 + { + char c3 CPPU_GCC3_ALIGN( Char2 ); +-}; ++} __attribute__ ((__packed__)); + struct Char4 + { + Char3 chars; +diff --exclude=unxlngr.pro -urN openoffice.org-1.1.1/desktop/source/pkgchk/pkgchk_misc.h openoffice.org-1.1.1-arm/desktop/source/pkgchk/pkgchk_misc.h +--- desktop/source/pkgchk/pkgchk_misc.h 2003-06-12 11:46:35.000000000 +0100 ++++ desktop/source/pkgchk/pkgchk_misc.h 2004-06-21 15:06:42.000000000 +0100 +@@ -242,6 +242,8 @@ + #define THIS_PLATFORM_PATH "/linux_s390.plt" + #elif defined (LINUX) && defined (SPARC) + #define THIS_PLATFORM_PATH "/linux_sparc.plt" ++#elif defined (LINUX) && defined (ARM) ++#define THIS_PLATFORM_PATH "/linux_arm.plt" + #elif defined (MACOSX) && defined (POWERPC) + #define THIS_PLATFORM_PATH "/macosx_powerpc.plt" + #elif defined (NETBSD) && defined (SPARC) + +Index: unxlngr.mk +=================================================================== +RCS file: /cvs/tools/solenv/inc/unxlngr.mk,v +retrieving revision 1.5 +diff -u -u -r1.5 unxlngr.mk +--- solenv/inc/unxlngr.mk 28 Apr 2003 16:47:30 -0000 1.5 ++++ solenv/inc/unxlngr.mk 20 Jul 2004 21:32:01 -0000 +@@ -54,28 +54,28 @@ + # + # All Rights Reserved. + # +-# Contributor(s): _______________________________________ +-# Tak-Shing Chan <chan@aleph1.co.uk> ++# Contributor(s): Peter Naulls <peter@chocky.org> + # + # + #************************************************************************* + +-# unxlngr.mk for armv4l ++# unxlngr.mk for ARM + + # mk file for unxlngr + ASM= + AFLAGS= + +-SOLAR_JAVA= ++SOLAR_JAVA*=TRUE + JAVAFLAGSDEBUG=-g + + # filter for supressing verbose messages from linker +-LINKOUTPUT_FILTER=" |& $(SOLARENV)$/bin$/msg_filter" ++#not needed at the moment ++#LINKOUTPUT_FILTER=" |& $(SOLARENV)$/bin$/msg_filter" + + # _PTHREADS is needed for the stl + CDEFS+=-DGLIBC=2 -DARM32 -D_PTHREADS -D_REENTRANT -DNEW_SOLAR -D_USE_NAMESPACE=1 -DSTLPORT_VERSION=400 + +-# this is a platform with JAVA support ++# this is a platform with Java support + .IF "$(SOLAR_JAVA)"!="" + JAVADEF=-DSOLAR_JAVA + .IF "$(debug)"=="" +@@ -83,64 +83,91 @@ + .ELSE + JAVA_RUNTIME=-ljava_g + .ENDIF +-.ENDIF ++.ENDIF + + # name of C++ Compiler + CXX*=g++ + # name of C Compiler + CC*=gcc ++.IF "$(SYSBASE)"!="" ++CFLAGS_SYSBASE:=-isystem $(SYSBASE)$/usr$/include ++CXX+:=$(CFLAGS_SYSBASE) ++CC+:=$(CFLAGS_SYSBASE) ++.ENDIF # "$(SYSBASE)"!="" + # flags for C and C++ Compiler + # do not use standard header search paths +-# here the Compiler is installed in the solenv hierarchy, to be changed + # if installed elsewhere +-CFLAGS=-nostdinc -c $(INCLUDE) -I$(SOLARENV)/unxlngr/lib/gcc-lib/arm-linux/2.95.2/include -I$(SOLARENV)/unxlngr/usr/include +-# flags for the C++ Compiler +-CFLAGSCC= ++.IF "$(BUILD_SOSL)"!="" ++CFLAGS= ++.ENDIF ++CFLAGS+=-fmessage-length=0 -c $(INCLUDE) ++ ++# flags to enable build with symbols; required for crashdump feature ++.IF "$(ENABLE_SYMBOLS)"=="SMALL" ++CFLAGSENABLESYMBOLS=-g1 ++.ELSE ++CFLAGSENABLESYMBOLS=-g ++.ENDIF + ++# flags for the C++ Compiler ++CFLAGSCC= -pipe + # Flags for enabling exception handling +-CFLAGSEXCEPTIONS=-fexceptions ++CFLAGSEXCEPTIONS=-fexceptions -fno-enforce-eh-specs + # Flags for disabling exception handling + CFLAGS_NO_EXCEPTIONS=-fno-exceptions + + # -fpermissive should be removed as soon as possible +-CFLAGSCXX= -fno-for-scope -fpermissive ++CFLAGSCXX= -pipe -fno-for-scope -fpermissive -fno-rtti ++ ++# Static objects are compiled with -fPIC too, because some static libraries end up in ++# shared libraries + + # Compiler flags for compiling static object in single threaded environment with graphical user interface +-CFLAGSOBJGUIST= ++CFLAGSOBJGUIST=-fPIC + # Compiler flags for compiling static object in single threaded environment with character user interface +-CFLAGSOBJCUIST= ++CFLAGSOBJCUIST=-fPIC + # Compiler flags for compiling static object in multi threaded environment with graphical user interface +-CFLAGSOBJGUIMT= ++CFLAGSOBJGUIMT=-fPIC + # Compiler flags for compiling static object in multi threaded environment with character user interface +-CFLAGSOBJCUIMT= ++CFLAGSOBJCUIMT=-fPIC + # Compiler flags for compiling shared object in multi threaded environment with graphical user interface +-CFLAGSSLOGUIMT=-fpic ++CFLAGSSLOGUIMT=-fPIC + # Compiler flags for compiling shared object in multi threaded environment with character user interface +-CFLAGSSLOCUIMT=-fpic ++CFLAGSSLOCUIMT=-fPIC + # Compiler flags for profiling + CFLAGSPROF= + # Compiler flags for debugging + CFLAGSDEBUG=-g + CFLAGSDBGUTIL= + # Compiler flags for enabling optimazations +-CFLAGSOPT=-O2 ++# CFLAGSOPT=-O2 ++# reduce to -O1 to avoid optimisation problems ++CFLAGSOPT=-O1 + # Compiler flags for disabling optimazations + CFLAGSNOOPT=-O +-# Compiler flags for discibing the output path ++# Compiler flags for describing the output path + CFLAGSOUTOBJ=-o ++# Enable all warnings ++CFLAGSWALL=-Wall ++# Set default warn level ++CFLAGSDFLTWARN=-w + + # switches for dynamic and static linking + STATIC = -Wl,-Bstatic + DYNAMIC = -Wl,-Bdynamic + + # name of linker +-LINK=gcc ++LINK*=$(CC) ++ + # default linker flags +-LINKFLAGS= ++#LINKFLAGSDEFS*=-Wl,-z,defs ++LINKFLAGSRUNPATH*=-Wl,-rpath,\''$$ORIGIN'\' ++LINKFLAGS= -O2 -Bsymbolic -Wl,-z,combreloc $(LINKFLAGSDEFS) $(LINKFLAGSRUNPATH) + + # linker flags for linking applications +-LINKFLAGSAPPGUI= -Wl,-export-dynamic +-LINKFLAGSAPPCUI= -Wl,-export-dynamic ++LINKFLAGSAPPGUI= -Wl,-export-dynamic -Wl,--noinhibit-exec ++LINKFLAGSAPPCUI= -Wl,-export-dynamic -Wl,--noinhibit-exec ++ + # linker flags for linking shared libraries + LINKFLAGSSHLGUI= -shared + LINKFLAGSSHLCUI= -shared +@@ -150,14 +177,10 @@ + LINKFLAGSDEBUG=-g + LINKFLAGSOPT= + +-.IF "$(NO_BSYMBOLIC)"=="" +-.IF "$(PRJNAME)" != "envtest" +-LINKFLAGSSHLGUI+=-Wl,-Bsymbolic +-LINKFLAGSSHLCUI+=-Wl,-Bsymbolic +-.ENDIF +-.ENDIF # "$(NO_BSYMBOLIC)"=="" +- +-LINKVERSIONMAPFLAG=-Wl,--version-script ++# linker flags for optimization (symbol hashtable) ++# for now, applied to symbol scoped libraries, only ++LINKFLAGSOPTIMIZE*=-Wl,-O1 ++LINKVERSIONMAPFLAG=$(LINKFLAGSOPTIMIZE) -Wl,--version-script + + SONAME_SWITCH=-Wl,-h + +@@ -172,13 +195,22 @@ + STDSLOCUI= + + # libraries for linking applications +-STDLIBCUIST=-ldl -lm -lstlport_gcc +-STDLIBGUIMT=-ldl -lpthread -lm -lstlport_gcc +-STDLIBCUIMT=-ldl -lpthread -lm -lstlport_gcc ++STDLIBCUIST=-ldl -lm ++STDLIBGUIMT=-lX11 -ldl -lpthread -lm ++STDLIBCUIMT=-ldl -lpthread -lm + STDLIBGUIST=-lX11 -ldl -lm + # libraries for linking shared libraries +-STDSHLGUIMT=-lX11 -lXext -ldl -lpthread -lm -lstlport_gcc +-STDSHLCUIMT=-ldl -lpthread -lm -lstlport_gcc ++STDSHLGUIMT=-lX11 -lXext -ldl -lpthread -lm ++STDSHLCUIMT=-ldl -lpthread -lm ++STDSHLGUIST=-lX11 -lXext -ldl -lm ++STDSHLCUIST=-ldl -lm ++ ++LIBSALCPPRT*=-Wl,--whole-archive -lsalcpprt -Wl,--no-whole-archive ++ ++LIBSTLPORT=$(DYNAMIC) -lstlport_gcc -lstdc++ ++LIBSTLPORTST=$(STATIC) -lstlport_gcc $(DYNAMIC) ++ ++#FILLUPARC=$(STATIC) -lsupc++ $(DYNAMIC) + + # name of library manager + LIBMGR=ar +@@ -202,3 +234,4 @@ + DLLPRE=lib + DLLPOST=.so + ++ +Index: boost_1_27_0.patch +=================================================================== +RCS file: /cvs/external/boost/boost_1_27_0.patch,v +retrieving revision 1.4.10.5 +diff -u -r1.4.10.5 boost_1_27_0.patch +--- boost/boost_1_27_0.patch 4 Oct 2004 18:04:11 -0000 1.4.10.5 ++++ boost/boost_1_27_0.patch 10 Nov 2004 15:25:56 -0000 +@@ -56,7 +56,7 @@ + + #include <boost/detail/atomic_count_win32.hpp> + +-! #elif (defined(linux) || defined(__linux) || defined(__linux__)) && !(defined(SPARC) || defined(sparc) || defined(sparc64)) ++! #elif (defined(linux) || defined(__linux) || defined(__linux__)) && !(defined(SPARC) || defined(sparc) || defined(sparc64)) && !(defined(ARM) || defined(ARM32)) + + #include <boost/detail/atomic_count_linux.hpp> + diff --git a/patches/OOO_1_1/lt-fixes.diff b/patches/OOO_1_1/lt-fixes.diff new file mode 100644 index 000000000..1be5e2f65 --- /dev/null +++ b/patches/OOO_1_1/lt-fixes.diff @@ -0,0 +1,591 @@ +diff -urN basctl/source/basicide/basidesh.src basctl/source/basicide/basidesh.src +--- basctl/source/basicide/basidesh.src 2004-09-09 20:50:02.000000000 +0300 ++++ basctl/source/basicide/basidesh.src 2004-11-09 14:22:08.000000000 +0200 +@@ -5333,7 +5333,7 @@ + Text[ norwegian_nynorsk ] = "~Vis"; + Text[ tswana ] = "~Leba"; + Text[ basque ] = "~Ikuspegia"; +- Text[ lithuanian ] = "~Rodinys"; ++ Text[ lithuanian ] = "~Rodyti"; + Text[ kannada ] = "ನೋಟ"; + Text[ galician ] = "~Ver"; + }; +@@ -5822,7 +5822,7 @@ + Text[ norwegian_nynorsk ] = "~Vis"; + Text[ tswana ] = "~Leba"; + Text[ basque ] = "~Ikuspegia"; +- Text[ lithuanian ] = "~Rodinys"; ++ Text[ lithuanian ] = "~Rodyti"; + Text[ kannada ] = "ನೋಟ"; + Text[ galician ] = "~Ver"; + }; +diff -urN dbaccess/source/ui/browser/sbabrw.src dbaccess/source/ui/browser/sbabrw.src +--- dbaccess/source/ui/browser/sbabrw.src 2004-09-09 19:22:28.000000000 +0300 ++++ dbaccess/source/ui/browser/sbabrw.src 2004-11-09 14:22:08.000000000 +0200 +@@ -1853,7 +1853,7 @@ + Text[ norwegian_nynorsk ] = "Vising av datakjelder"; + Text[ tswana ] = "Mokwalo setlhagisi bona"; + Text[ basque ] = "Datu-iturburuen ikuspegia"; +- Text[ lithuanian ] = "Duomenų Å¡altinio rodinys"; ++ Text[ lithuanian ] = "Duomenų Å¡altinio vaizdas"; + Text[ kannada ] = "ದತà³à²¤à²¸à²‚ಚಯ ನೋಟ"; + Text[ galician ] = "Vista de fonte de datos"; + }; +diff -urN dbaccess/source/ui/browser/sbagrid.src dbaccess/source/ui/browser/sbagrid.src +--- dbaccess/source/ui/browser/sbagrid.src 2004-09-09 19:22:41.000000000 +0300 ++++ dbaccess/source/ui/browser/sbagrid.src 2004-11-09 14:22:08.000000000 +0200 +@@ -510,7 +510,7 @@ + Text[ norwegian_nynorsk ] = "Vising #"; + Text[ tswana ] = "Leba #"; + Text[ basque ] = "Ikuspegi #"; +- Text[ lithuanian ] = "Rodinys #"; ++ Text[ lithuanian ] = "Vaizdas #"; + Text[ kannada ] = "ನೋಟ #"; + Text[ galician ] = "Ver #"; + }; +diff -urN dbaccess/source/ui/control/tabletree.src dbaccess/source/ui/control/tabletree.src +--- dbaccess/source/ui/control/tabletree.src 2004-09-09 19:23:10.000000000 +0300 ++++ dbaccess/source/ui/control/tabletree.src 2004-11-09 14:22:08.000000000 +0200 +@@ -513,7 +513,7 @@ + Text[ norwegian_nynorsk ] = "Alle visingar"; + Text[ tswana ] = "Tsotlhe ditebo"; + Text[ basque ] = "Ikuspegi guztiak"; +- Text[ lithuanian ] = "Visus rodinius"; ++ Text[ lithuanian ] = "Visus vaizdus"; + Text[ kannada ] = "ಎಲà³à²²à²¾ ನೋಟಗಳà³"; + Text[ galician ] = "Todas as visualizacións de táboas"; + }; +@@ -558,7 +558,7 @@ + Text[ norwegian_nynorsk ] = "Alle tabellar og visingar"; + Text[ tswana ] = "Tsotlhe ditafole le ditebo"; + Text[ basque ] = "Taula eta ikuspegi guztiak"; +- Text[ lithuanian ] = "Visas lenteles ir rodinius"; ++ Text[ lithuanian ] = "Visas lenteles ir vaizdus"; + Text[ kannada ] = "ಎಲà³à²²à²¾ ಕೋಷà³à²Ÿà²•à²—ಳೠಮತà³à²¤à³ ನೋಟಗಳà³"; + Text[ galician ] = "Todas as táboas e visualizacións de táboas"; + }; +diff -urN dbaccess/source/ui/dlg/dlgsave.src dbaccess/source/ui/dlg/dlgsave.src +--- dbaccess/source/ui/dlg/dlgsave.src 2004-09-09 19:25:54.000000000 +0300 ++++ dbaccess/source/ui/dlg/dlgsave.src 2004-11-09 14:22:08.000000000 +0200 +@@ -362,7 +362,7 @@ + Text[ norwegian_nynorsk ] = "~Namn på tabellvising"; + Text[ tswana ] = "~Leina la tafole tebo"; + Text[ basque ] = "T~aula-ikuspegiaren izena"; +- Text[ lithuanian ] = "~LentelÄ—s rodinio pavadinimas"; ++ Text[ lithuanian ] = "~LentelÄ—s vaizdo pavadinimas"; + Text[ kannada ] = "ಕೋಷà³à²Ÿà²• ನೋಟದ ಹೆಸರà³"; + Text[ galician ] = "Nome do ~modo táboa"; + }; +diff -urN dbaccess/source/ui/inc/toolbox.hrc dbaccess/source/ui/inc/toolbox.hrc +--- dbaccess/source/ui/inc/toolbox.hrc 2004-09-09 19:28:08.000000000 +0300 ++++ dbaccess/source/ui/inc/toolbox.hrc 2004-11-09 14:22:08.000000000 +0200 +@@ -1288,7 +1288,7 @@ + Text[ norwegian_nynorsk ] = "Ny ~visingsutforming";\ + Text[ tswana ] = "Ntsha ~Leba Tlhama"; \ + Text[ basque ] = "I~kuspegi-diseinu berria"; \ +- Text[ lithuanian ] = "Naujas ~peržiÅ«ros apipavidalinimas"; \ ++ Text[ lithuanian ] = "Naujo ~vaizdo projektavimas"; \ + Text[ kannada ] = "ಜಾರà³à²«à²²à²• ವಿನà³à²¯à²¾à²¸ "; \ + Text[ galician ] = "No~vo deseño de visualización"; \ + +@@ -1334,7 +1334,7 @@ + Text[ norwegian_nynorsk ] = "Ny ~tabellutforming";\ + Text[ tswana ] = "Ntsha ~Tafole Tlhama"; \ + Text[ basque ] = "T~aula-diseinu berria"; \ +- Text[ lithuanian ] = "Naujas ~lentelÄ—s apipavidalinimas"; \ ++ Text[ lithuanian ] = "Naujos ~lentelÄ—s projektavimas"; \ + Text[ kannada ] = "ಹೊಸಾ ಕೋಶಗವನà³à²¨à³ ವಿನà³à²¯à²¾à²¸"; \ + Text[ galician ] = "Novo deseño de ~táboa"; \ + +@@ -1380,7 +1380,7 @@ + Text[ norwegian_nynorsk ] = "Ny ~spørjingsutforming";\ + Text[ tswana ] = "Ntsha ~Ngongorego (Tlhama Tebo)"; \ + Text[ basque ] = "K~ontsulta-diseinu berria"; \ +- Text[ lithuanian ] = "Nauja ~užklausa (apipavidalinti rodinį)"; \ ++ Text[ lithuanian ] = "Nauja ~užklausa (vizualus projektavimas)"; \ + Text[ kannada ] = "New ~Query (Design View)"; \ + Text[ galician ] = "Nova ~consulta (vista de deseño)"; \ + +@@ -1472,7 +1472,7 @@ + Text[ norwegian_nynorsk ] = "Ny S~QL-kommando";\ + Text[ tswana ] = "Ntsha Ngongorego (~SQL Tebo)"; \ + Text[ basque ] = "SQL komando berria"; \ +- Text[ lithuanian ] = "Nauja užklausa (~SQL rodinys)"; \ ++ Text[ lithuanian ] = "Nauja užklausa (~SQL komandos)"; \ + Text[ kannada ] = "ಹೊಸಾ ಪà³à²°à²¶à³à²¨à³† (SQL ನೋಟ)"; \ + Text[ galician ] = "Nova consulta (vista ~SQL)"; \ + +diff -urN dbaccess/source/ui/misc/WizardPages.src dbaccess/source/ui/misc/WizardPages.src +--- dbaccess/source/ui/misc/WizardPages.src 2004-09-09 19:28:22.000000000 +0300 ++++ dbaccess/source/ui/misc/WizardPages.src 2004-11-09 14:22:08.000000000 +0200 +@@ -1609,7 +1609,7 @@ + Text[ norwegian_nynorsk ] = "~Som tabellvising"; + Text[ tswana ] = "Ja~aaka tafole tebo"; + Text[ basque ] = "Taula-ikuspegi gi~sa"; +- Text[ lithuanian ] = "K~aip lentelÄ—s rodinys"; ++ Text[ lithuanian ] = "K~aip lentelÄ—s vaizdas"; + Text[ kannada ] = "ಕೋಷà³à²Ÿà²• ನೋಟ"; + Text[ galician ] = "Como visualización de tábo~a"; + }; +diff -urN dbaccess/source/ui/querydesign/query.src dbaccess/source/ui/querydesign/query.src +--- dbaccess/source/ui/querydesign/query.src 2004-09-09 19:28:49.000000000 +0300 ++++ dbaccess/source/ui/querydesign/query.src 2004-11-09 14:22:08.000000000 +0200 +@@ -2442,7 +2442,7 @@ + Message[ norwegian_nynorsk ] = "Tabellvisinga er endra.\nVil du lagra endringane?"; + Message[ tswana ] = "Tafole e fetotswe.\n\nA o batla go boloka diphetogo?"; + Message[ basque ] = "Taula-ikuspegian aldaketak egin dira.\nGorde nahi dituzu?"; +- Message[ lithuanian ] = "LentelÄ—s rodinys pakeistas.\nAr įraÅ¡yti pakeitimus?"; ++ Message[ lithuanian ] = "LentelÄ—s vaizdas pakeistas.\nAr įraÅ¡yti pakeitimus?"; + Message[ kannada ] = "The table view has been changed.\nDo you want to save the changes?"; + Message[ galician ] = "Modificouse a visualización da táboa.\n¿Desexa gardar as modificacións?"; + }; +@@ -2536,7 +2536,7 @@ + Text[ norwegian_nynorsk ] = "Denne databasen støttar ikkje tabellvising."; + Text[ tswana ] = "O mokwalo ga o tshegetse tafole ditebo!"; + Text[ basque ] = "Datu-base honek ez du onartzen taula-ikuspegirik!"; +- Text[ lithuanian ] = "Å i duomenų bazÄ— nepalaiko lentelių rodinių!"; ++ Text[ lithuanian ] = "Å i duomenų bazÄ— nepalaiko lentelių vaizdų!"; + Text[ galician ] = "¡Esta base de datos non apoia ningunha visualización de táboas!"; + Text[ kannada ] = " "; + }; +@@ -2993,7 +2993,7 @@ + Text[ norwegian_nynorsk ] = "~Vis"; + Text[ tswana ] = "~Leba"; + Text[ basque ] = "~Ikuspegia"; +- Text[ lithuanian ] = "~Rodinys"; ++ Text[ lithuanian ] = "~Rodyti"; + Text[ kannada ] = "ನೋಟ"; + Text[ galician ] = "~Ver"; + }; +@@ -3448,7 +3448,7 @@ + Text[ norwegian_nynorsk ] = "Visingsutforming:"; + Text[ tswana ] = "Leba: Tlhama:"; + Text[ basque ] = "Diseinu ikuspegia:"; +- Text[ lithuanian ] = "Rodinio projektas:"; ++ Text[ lithuanian ] = "Vaizdo projektas:"; + Text[ kannada ] = "ವಿನà³à²¯à²¾à²¸ ವೀಕà³à²·à²¿à²¸à³:"; + Text[ galician ] = "Deseño de vista:"; + }; +diff -urN offmgr/source/offapp/dialog/optgdlg.src offmgr/source/offapp/dialog/optgdlg.src +--- offmgr/source/offapp/dialog/optgdlg.src 2004-09-09 18:54:38.000000000 +0300 ++++ offmgr/source/offapp/dialog/optgdlg.src 2004-11-09 14:22:08.000000000 +0200 +@@ -2624,7 +2624,7 @@ + Text[ norwegian_nynorsk ] = "3D-vising"; + Text[ tswana ] = "3D leba"; + Text[ basque ] = "3D ikuspegia"; +- Text[ lithuanian ] = "Trimatis rodinys"; ++ Text[ lithuanian ] = "Trimatis vaizdas"; + Text[ kannada ] = "3D view"; + Text[ galician ] = "Visualización 3D"; + }; +diff -urN offmgr/source/offapp/dialog/treeopt.src offmgr/source/offapp/dialog/treeopt.src +--- offmgr/source/offapp/dialog/treeopt.src 2004-09-09 18:55:21.000000000 +0300 ++++ offmgr/source/offapp/dialog/treeopt.src 2004-11-09 14:34:27.000000000 +0200 +@@ -1588,7 +1588,7 @@ + < "Vartotojo duomenys" ; RID_SFXPAGE_GENERAL; > ; + < "Bendrosios parinktys" ; OFA_TP_MISC; > ; + < "AtmintinÄ—" ; OFA_TP_MEMORY; > ; +- < "Rodinys" ; OFA_TP_VIEW ; > ; ++ < "Rodymas" ; OFA_TP_VIEW ; > ; + < "Spausdinimas" ; RID_SFXPAGE_PRINTOPTIONS; > ; + < "IÅ¡orinÄ—s programos" ; OFA_TP_HELPERPROG; > ; + < "Bylų vietos" ; RID_SFXPAGE_PATH; > ; +@@ -2822,7 +2822,7 @@ + { + < "RaÅ¡yklÄ—s dokumentas" ; 0; > ; + < "Bendrosios parinktys" ; RID_SW_TP_OPTLOAD_PAGE ; > ; +- < "Rodinys" ; RID_SW_TP_CONTENT_OPT ;> ; ++ < "Rodymas" ; RID_SW_TP_CONTENT_OPT ;> ; + < "Formatavimas" ; RID_SW_TP_OPTSHDWCRSR ; > ; + < "Tinklelis" ; RID_SVXPAGE_GRID ; > ; + < "Pagrindiniai Å¡riftai (Vakarų Europos)" ;RID_SW_TP_STD_FONT ; > ; +@@ -3256,7 +3256,7 @@ + ItemList [ lithuanian ] = + { + < "Tinklalapis" ; 0; > ; +- < "Rodinys" ; RID_SW_TP_HTML_CONTENT_OPT ;> ; ++ < "Rodymas" ; RID_SW_TP_HTML_CONTENT_OPT ;> ; + < "Formatavimo priemonÄ—s" ; RID_SW_TP_HTML_OPTSHDWCRSR ; > ; + < "Tinklelis" ; RID_SW_TP_HTML_OPTGRID_PAGE ; > ; + < "Spausdinimas" ; RID_SW_TP_HTML_OPTPRINT_PAGE ; > ; +@@ -3971,7 +3971,7 @@ + { + < "SkaiÄiuoklÄ—s dokumentas" ; 0; > ; + < "Bendrosios parinktys" ; SID_SC_TP_LAYOUT ;> ; +- < "Rodinys" ; SID_SC_TP_CONTENT ;> ; ++ < "Rodymas" ; SID_SC_TP_CONTENT ;> ; + < "SkaiÄiuoti" ; RID_OFA_TP_INTERNATIONAL ;> ; + < "SkaiÄiavimai" ; SID_SC_TP_CALC ;> ; + < "Rikiavimas" ; SID_SC_TP_USERLISTS ;> ; +@@ -4322,7 +4322,7 @@ + { + < "Pateikties dokumentas" ; 0; > ; + < "Bendrosios parinktys"; SID_SI_TP_MISC ; > ; +- < "Rodinys" ; SID_SI_TP_CONTENTS ; > ; ++ < "Rodymas" ; SID_SI_TP_CONTENTS ; > ; + < "Tinklelis" ; SID_SI_TP_SNAP ; > ; + < "Spausdinimas" ; SID_SI_TP_PRINT ; > ; + }; +@@ -4661,7 +4661,7 @@ + { + < "Grafikos dokumentas" ; 0; > ; + < "Bendrosios parinktys" ; SID_SD_TP_MISC ; > ; +- < "Rodinys" ; SID_SD_TP_CONTENTS ; > ; ++ < "Rodymas" ; SID_SD_TP_CONTENTS ; > ; + < "Tinklelis" ; SID_SD_TP_SNAP ; > ; + < "Spausdinimas" ; SID_SD_TP_PRINT ; > ; + }; +diff -urN offmgr/source/offapp/intro/ooo.src offmgr/source/offapp/intro/ooo.src +--- offmgr/source/offapp/intro/ooo.src 2004-09-09 18:57:08.000000000 +0300 ++++ offmgr/source/offapp/intro/ooo.src 2004-11-09 14:34:59.000000000 +0200 +@@ -186,7 +186,7 @@ + Text[ arabic ] = "ÍÞæÞ ÇáäÓÎ 2004 Sun Microsystems Inc.\n. ÃäÔÆ åÐÇ ÇáãäÊÌ ãä ÞÈá " OOO_VENDOR " ÈÇáÇÓÊäÇÏ Åáì OpenOffice.org æÈÇÓÊÎÏÇã " OOO_LICENSE ". \nOpenOffice.org ÊÔßÑ ßá ÃÚÖÇÁ ãÌÊãÚåÇ¡ ÎÕæÕÇð ÃæáÆß ÇáãÐßæÑíä Úáì http://www.openoffice.org/welcome/credits.html."; + Text[ tswana ] = "Copyright 2004 Letsatsi tsamaisonnye Inc.\n\nSe setlhagiswa se bopilwe ka \" OOO_VENDOR \" go tswa go OpenOffice.org \no dirisa \" OOO_LICENCE \" \n\nOpenOffice.org e netefaletsa botlhe maloko a setshaba,bogolo jang bao ba \numakilweng kwa http://www.openoffice.org/kamogelo/dikoloto.html."; + Text[ basque ] = "Copyright 2002 Sun Microsystems Inc.\nOpenOffice.org komunitatearen laguntzarekin egin da produktu hau eta Sun Microsystem Inc. komunitate horren kide fundatzailea da.\nOpenOffice.org-ek komunitateko kide guztiei eskerrak ematen dizkie, bereziki http://www.openoffice.org/welcome/credits.html orrian aipatzen direnei."; +- Text[ lithuanian ] = "(C) „Sun Microsystems Inc.“, 2002\nÅ is programų paketas sukurtas bendradarbiaujant su „OpenOffice.org“ bendruomene, kurios įkÅ«rÄ—jas yra „Sun Microsystems Inc“.\nDÄ—kojama visiems bendrijos nariams, iÅ¡vardintiems internete http://www.openoffice.org/welcome/credits.html.\n\nAtvirojo kodo programų lietuvinimo projekto vykdytojai.\nVilnius, 2003 m. rugsÄ—jo 17 d.\n\nEl. paÅ¡tas: dagiene@ktl.mii.lt\nInformacija internete:http://www.ivpk.lt; http://aldona.mii.lt/pms"; ++ Text[ lithuanian ] = "(C) „Sun Microsystems Inc.“, 2002\nÅ is programų paketas sukurtas bendradarbiaujant su „OpenOffice.org“ bendruomene, kurios įkÅ«rÄ—jas yra „Sun Microsystems Inc“.\nDÄ—kojama visiems bendrijos nariams, iÅ¡vardintiems internete http://www.openoffice.org/welcome/credits.html.\n\nAtvirojo kodo programų lietuvinimo projekto vykdytojai. Vilnius, 2003 m. rugsÄ—jo 17 d.\nEl. paÅ¡tas: dagiene@ktl.mii.lt\n\nOpenOffice.lt projekto dalyviai, 2004\nEl. paÅ¡tas: info@openoffice.lt\n\nInformacija internete:\nhttp://www.openoffice.lt\nhttp://www.ivpk.lt; http://aldona.mii.lt/pms"; + Text[ kannada ] = "Copyright 2004 Sun Microsystems Inc.\nThis product has been created by " OOO_VENDOR " based on OpenOffice.org using the " OOO_LICENSE ".\nOpenOffice.org acknowledges all community members, especially those mentioned at http://www.openoffice.org/welcome/credits.html."; + Text[ galician ] = "Copyright 2002 Sun Microsystems Inc.\nEste produto creosuse coas contribucións da comunidade de OpenOffice.org community, da que Sun Microsystem Inc. é o membro fundador.\nOpenOffice.org recoñece especialmente aos membros da comunidade mencionados en http://www.openoffice.org/welcome/credits.html."; + }; +diff -urN sc/source/ui/src/menue.src sc/source/ui/src/menue.src +--- sc/source/ui/src/menue.src 2004-09-09 21:08:50.000000000 +0300 ++++ sc/source/ui/src/menue.src 2004-11-09 14:22:08.000000000 +0200 +@@ -2362,7 +2362,7 @@ + Text[ norwegian_nynorsk ] = "~Vis"; + Text[ tswana ] = "~Leba"; + Text[ basque ] = "~Ikusi"; +- Text[ lithuanian ] = "~Rodinys"; ++ Text[ lithuanian ] = "~Rodyti"; + Text[ galician ] = "~Ver"; + Text[ thai ] = "~มุมมà¸à¸‡"; + Text[ kannada ] = "ನೋಟ"; +@@ -8407,7 +8407,7 @@ + Text[ norwegian_nynorsk ] = "~Vis"; + Text[ tswana ] = "~Leba"; + Text[ basque ] = "~Ikusi"; +- Text[ lithuanian ] = "~Rodinys"; ++ Text[ lithuanian ] = "~Rodyti"; + Text[ galician ] = "~Ver"; + Text[ thai ] = "~มุมมà¸à¸‡"; + Text[ kannada ] = "ನೋಟ"; +diff -urN sc/source/ui/src/scstring.src sc/source/ui/src/scstring.src +--- sc/source/ui/src/scstring.src 2004-09-09 21:12:14.000000000 +0300 ++++ sc/source/ui/src/scstring.src 2004-11-09 14:22:08.000000000 +0200 +@@ -4155,7 +4155,7 @@ + Text[ norwegian_nynorsk ] = "Visingsval"; + Text[ tswana ] = "Leba Dikgetho"; + Text[ basque ] = "Ikusteko aukerak"; +- Text[ lithuanian ] = "Rodinio parinktys"; ++ Text[ lithuanian ] = "Rodymo parinktys"; + Text[ galician ] = "Opcións de visualización"; + Text[ thai ] = "ตัวเลืà¸à¸à¸¡à¸¸à¸¡à¸¡à¸à¸‡"; + Text[ kannada ] = "ನೋಟ ಆಯà³à²•à³†à²—ಳà³"; +@@ -5417,7 +5417,7 @@ + Text[ norwegian_nynorsk ] = "Dokumentvising"; + Text[ tswana ] = "Setlankana tebo"; + Text[ basque ] = "Dokumentuaren ikuspegia"; +- Text[ lithuanian ] = "Dokumento rodinys"; ++ Text[ lithuanian ] = "Dokumento vaizdas"; + Text[ galician ] = "Document view"; + Text[ thai ] = "Document view"; + Text[ kannada ] = "ದಸà³à²¤à²¾à²µà³‡à²œà³ ನೋಟ"; +diff -urN sc/source/ui/src/toolbox.src sc/source/ui/src/toolbox.src +--- sc/source/ui/src/toolbox.src 2004-09-09 21:14:03.000000000 +0300 ++++ sc/source/ui/src/toolbox.src 2004-11-09 14:22:08.000000000 +0200 +@@ -1300,7 +1300,7 @@ + Text[ norwegian_nynorsk ] = "Objektlinje for sidevising"; + Text[ tswana ] = "Letlhare Tebo Sediriswa Bar"; + Text[ basque ] = "Orrialde-ikuspegiaren objektu-barra"; +- Text[ lithuanian ] = "Puslapio rodinių formatų juosta"; ++ Text[ lithuanian ] = "Puslapio peržiÅ«ros mygtukų juosta"; + Text[ galician ] = "Barra de vista previa"; + Text[ thai ] = "à¹à¸–บวัตถุมุมมà¸à¸‡à¸«à¸™à¹‰à¸²"; + Text[ kannada ] = "ಪà³à²Ÿ ನೋಟ ವಸà³à²¤à³ ಪಟà³à²Ÿà²¿à²•à³†"; +diff -urN sch/sdi/schslots.src sch/sdi/schslots.src +--- sch/sdi/schslots.src 2004-09-09 20:16:17.000000000 +0300 ++++ sch/sdi/schslots.src 2004-11-09 14:22:08.000000000 +0200 +@@ -102,7 +102,7 @@ + SlotName[ norwegian_nynorsk ] = "Rediger 3D-rute"; + SlotName[ tswana ] = "Kwala 3D tebo"; + SlotName[ basque ] = "Editatu 3D ikuspegia"; +- SlotName[ lithuanian ] = "Taisyti trimatį rodinį"; ++ SlotName[ lithuanian ] = "Taisyti trimatį vaizdÄ…"; + SlotName[ kannada ] = "ಮೂರೠಆಯಾಮ ನೋಟ ಸಂಪಾದಿಸà³"; + SlotName[ galician ] = "Editar a vista 3D"; + }; +@@ -760,7 +760,7 @@ + SlotName[ norwegian_nynorsk ] = "Rediger diagramgolv"; + SlotName[ tswana ] = "Kwala Chate Boalo"; + SlotName[ basque ] = "Editatu diagramaren zorua"; +- SlotName[ lithuanian ] = "Taisyti diagramos pargindÄ…"; ++ SlotName[ lithuanian ] = "Taisyti diagramos pagrindÄ…"; + SlotName[ kannada ] = "ನಕà³à²·à³†à²¯ ನೆಲವನà³à²¨à³ ಸಂಪಾದಿಸà³"; + SlotName[ galician ] = "Editar plano inferior"; + }; +diff -urN sch/source/ui/app/menuids.src sch/source/ui/app/menuids.src +--- sch/source/ui/app/menuids.src 2004-09-09 20:17:08.000000000 +0300 ++++ sch/source/ui/app/menuids.src 2004-11-09 14:22:08.000000000 +0200 +@@ -1594,7 +1594,7 @@ + Text[ norwegian_nynorsk ] = "3~D-vising ...";\ + Text[ tswana ] = "3~D Tebo...";\ + Text[ basque ] = "3D ~ikuspegia...";\ +- Text[ lithuanian ] = "70857325~Trimatis rodinys...";\ ++ Text[ lithuanian ] = "~Trimatis vaizdas...";\ + Text[ kannada ] = "ಮೂರೠಆಯಾಮ ನೋಟ";\ + Text[ galician ] = "~Ver en 3D...";\ + }; +diff -urN sch/source/ui/app/menu.src sch/source/ui/app/menu.src +--- sch/source/ui/app/menu.src 2004-09-09 20:16:56.000000000 +0300 ++++ sch/source/ui/app/menu.src 2004-11-09 14:22:08.000000000 +0200 +@@ -735,7 +735,7 @@ + Text[ norwegian_nynorsk ] = "~Vis"; + Text[ tswana ] = "~Tebo"; + Text[ basque ] = "~Ikuspegia"; +- Text[ lithuanian ] = "~Rodinys"; ++ Text[ lithuanian ] = "~Rodyti"; + Text[ kannada ] = "ನೋಟ"; + Text[ galician ] = "~Ver"; + }; +@@ -2660,7 +2660,7 @@ + Text[ norwegian_nynorsk ] = "3~D-vising ..."; + Text[ tswana ] = "3~D Tebo..."; + Text[ basque ] = "3~D Ikuspegia..."; +- Text[ lithuanian ] = "T~rimatis rodinys..."; ++ Text[ lithuanian ] = "T~rimatis vaizdas..."; + Text[ kannada ] = "ಮೂರೠಆಯಾಮ ನೋಟ"; + Text[ galician ] = "Vista 3~D..."; + }; +diff -urN sch/source/ui/app/strings.src sch/source/ui/app/strings.src +--- sch/source/ui/app/strings.src 2004-09-09 20:17:35.000000000 +0300 ++++ sch/source/ui/app/strings.src 2004-11-09 14:22:08.000000000 +0200 +@@ -3454,7 +3454,7 @@ + Text[ norwegian_nynorsk ] = "Rediger 3D-rute"; + Text[ tswana ] = "Kwala 3D tebo"; + Text[ basque ] = "Editatu 3D ikuspegia"; +- Text[ lithuanian ] = "Taisyti trimatį rodinį"; ++ Text[ lithuanian ] = "Taisyti trimatį vaizdÄ…"; + Text[ kannada ] = "ಮೂರೠಆಯಾಮ ನೋಟ ಸಂಪಾದಿಸà³"; + Text[ galician ] = "Editar a visualización en 3D"; + }; +diff -urN sch/source/ui/dlg/viewdlg.src sch/source/ui/dlg/viewdlg.src +--- sch/source/ui/dlg/viewdlg.src 2004-09-09 20:21:07.000000000 +0300 ++++ sch/source/ui/dlg/viewdlg.src 2004-11-09 14:22:08.000000000 +0200 +@@ -485,7 +485,7 @@ + Text[ norwegian_nynorsk ] = "3D-rute"; + Text[ tswana ] = "3D Tebo"; + Text[ basque ] = "3D ikuspegia"; +- Text[ lithuanian ] = "75927832Trimatis rodinys"; ++ Text[ lithuanian ] = "Trimatis vaizdas"; + Text[ kannada ] = "ಮೂರೠಆಯಾಮ ನೋಟ"; + Text[ galician ] = "Ver en 3D"; + }; +diff -urN sd/sdi/sdslots.src sd/sdi/sdslots.src +--- sd/sdi/sdslots.src 2004-09-09 20:05:04.000000000 +0300 ++++ sd/sdi/sdslots.src 2004-11-09 14:22:08.000000000 +0200 +@@ -1091,7 +1091,7 @@ + SlotName[ norwegian_nynorsk ] = "Vising i svart-kvitt"; + SlotName[ tswana ] = "Bontsho le Bosweu Tebo"; + SlotName[ basque ] = "Zuri-beltzeko ikuspegia"; +- SlotName[ lithuanian ] = "Nespalvotas rodinys"; ++ SlotName[ lithuanian ] = "Nespalvotas vaizdas"; + SlotName[ kannada ] = "ಕಪà³à²ªà³ ಮತà³à²¤à³ ಬಿಳà³à²ªà³ ನೋಟ"; + SlotName[ galician ] = "Ver branco e negro"; + }; +@@ -3577,7 +3577,7 @@ + SlotName[ norwegian_nynorsk ] = "Lysbiletvising"; + SlotName[ tswana ] = "Thoko Tebo"; + SlotName[ basque ] = "Diapositiba-ikuspegia"; +- SlotName[ lithuanian ] = "SkaidrÄ—s rodinys"; ++ SlotName[ lithuanian ] = "Skaidrių vaizdas"; + SlotName[ kannada ] = "ಜಾರà³à²«à²²à²• ನೋಟ"; + SlotName[ galician ] = "Modo Diapositivas"; + }; +@@ -7242,7 +7242,7 @@ + SlotName[ norwegian_nynorsk ] = "Disposisjonsvising"; + SlotName[ tswana ] = "Molantle Tebo"; + SlotName[ basque ] = "Eskema-ikuspegia"; +- SlotName[ lithuanian ] = "StruktÅ«ros rodinys"; ++ SlotName[ lithuanian ] = "StruktÅ«ros vaizdas"; + SlotName[ kannada ] = "ಹೊರರೇಖೆಯ ನೋಟ"; + SlotName[ galician ] = "Modo Esquema"; + }; +diff -urN sd/source/ui/accessibility/accessibility.src sd/source/ui/accessibility/accessibility.src +--- sd/source/ui/accessibility/accessibility.src 2004-09-09 20:05:48.000000000 +0300 ++++ sd/source/ui/accessibility/accessibility.src 2004-11-09 14:22:08.000000000 +0200 +@@ -382,7 +382,7 @@ + Text[ norwegian_nynorsk ] = "Lysbiletvising"; + Text[ tswana ] = "Dikgogelothoko Tebo"; + Text[ basque ] = "Diapositiba ikuspegia"; +- Text[ lithuanian ] = "Skaidrių rodinys"; ++ Text[ lithuanian ] = "Skaidrių vaizdas"; + Text[ kannada ] = "ಜಾರà³à²«à²²à²•à²—ಳ ನೋಟ"; + Text[ galician ] = "Slides View"; + }; +diff -urN sd/source/ui/app/menuids2.src sd/source/ui/app/menuids2.src +--- sd/source/ui/app/menuids2.src 2004-09-09 20:06:34.000000000 +0300 ++++ sd/source/ui/app/menuids2.src 2004-11-09 14:22:08.000000000 +0200 +@@ -727,7 +727,7 @@ + Text[ norwegian_nynorsk ] = "~Vis";\ + Text[ tswana ] = "~Tebo"; \ + Text[ basque ] = "~Ikusi"; \ +- Text[ lithuanian ] = "~Rodinys"; \ ++ Text[ lithuanian ] = "~Rodyti"; \ + Text[ kannada ] = "ನೋಟ"; \ + Text[ galician ] = "~Ver"; \ + +@@ -4734,7 +4734,7 @@ + Text[ norwegian_nynorsk ] = "V~isingskvalitet";\ + Text[ tswana ] = "~Pontsho Boleng";\ + Text[ basque ] = "~Bistaratze-kalitatea";\ +- Text[ lithuanian ] = "~Rodinio kokybÄ—";\ ++ Text[ lithuanian ] = "~Rodymo kokybÄ—";\ + Text[ kannada ] = "ಪà³à²°à²¦à²°à³à²¶à²¨ ಗà³à²£à²®à²Ÿà³à²Ÿ";\ + Text[ galician ] = "Calidade de ~visualización";\ + }; +diff -urN sd/source/ui/app/menuids.src sd/source/ui/app/menuids.src +--- sd/source/ui/app/menuids.src 2004-09-09 20:06:17.000000000 +0300 ++++ sd/source/ui/app/menuids.src 2004-11-09 14:22:08.000000000 +0200 +@@ -262,7 +262,7 @@ + Text[ norwegian_nynorsk ] = "L~ysbiletvising";\ + Text[ tswana ] = "~Dikgogelothoko Tebo";\ + Text[ basque ] = "~Diapositiba-ikuspegia";\ +- Text[ lithuanian ] = "S~kaidrių rodinys";\ ++ Text[ lithuanian ] = "S~kaidrių vaizdas";\ + Text[ kannada ] = "ಜಾರà³à²«à²²à²•à²—ಳ ನೋಟ";\ + Text[ galician ] = "Modo ~diapositivas";\ + }; +diff -urN sd/source/ui/app/strings.src sd/source/ui/app/strings.src +--- sd/source/ui/app/strings.src 2004-09-09 20:08:22.000000000 +0300 ++++ sd/source/ui/app/strings.src 2004-11-09 14:22:08.000000000 +0200 +@@ -4194,7 +4194,7 @@ + Text[ norwegian_nynorsk ] = "Lysbiletvising"; + Text[ tswana ] = "Thoko Tebo"; + Text[ basque ] = "Diapositiba-ikuspegia"; +- Text[ lithuanian ] = "Skaidrių rodinys"; ++ Text[ lithuanian ] = "Skaidrių vaizdas"; + Text[ kannada ] = "ಜಾರà³à²«à²²à²• ನೋಟ"; + Text[ galician ] = "Modo diapositivas"; + }; +diff -urN sfx2/sdi/sfxslots.src sfx2/sdi/sfxslots.src +--- sfx2/sdi/sfxslots.src 2004-09-09 21:29:01.000000000 +0300 ++++ sfx2/sdi/sfxslots.src 2004-11-09 14:22:08.000000000 +0200 +@@ -5643,7 +5643,7 @@ + SlotName[ norwegian_nynorsk ] = "Førehandsvis sida"; + SlotName[ tswana ] = "Tebo gape ya tsebe"; + SlotName[ basque ] = "Orrialdearen aurrebista"; +- SlotName[ lithuanian ] = "Užverti peržiÅ«rÄ…"; ++ SlotName[ lithuanian ] = "Spaudinio peržiÅ«ra"; + SlotName[ kannada ] = "ಪà³à²Ÿ ಮà³à²¨à³à²¨à³‹à²Ÿ"; + SlotName[ galician ] = "Ver a páxina"; + }; +diff -urN sfx2/source/appl/app.src sfx2/source/appl/app.src +--- sfx2/source/appl/app.src 2004-09-09 21:29:32.000000000 +0300 ++++ sfx2/source/appl/app.src 2004-11-09 14:22:08.000000000 +0200 +@@ -963,7 +963,7 @@ + Text[ norwegian_nynorsk ] = "Vis"; + Text[ tswana ] = "Tebo"; + Text[ basque ] = "Ikusi"; +- Text[ lithuanian ] = "Rodinys"; ++ Text[ lithuanian ] = "Rodyti"; + Text[ kannada ] = "ನೋಟ"; + Text[ galician ] = "Ver"; + }; +diff -urN starmath/source/menu.src starmath/source/menu.src +--- starmath/source/menu.src 2004-09-09 19:39:59.000000000 +0300 ++++ starmath/source/menu.src 2004-11-09 14:22:08.000000000 +0200 +@@ -1065,7 +1065,7 @@ + Text[ norwegian_nynorsk ] = "~Vis"; + Text[ tswana ] = "~Tebo"; + Text[ basque ] = "~Ikusi"; +- Text[ lithuanian ] = "~Rodinys"; ++ Text[ lithuanian ] = "~Rodyti"; + Text[ kannada ] = "ನೋಟ"; + Text[ galician ] = "~Ver"; + }; +@@ -2511,7 +2511,7 @@ + Text[ norwegian_nynorsk ] = "~Vis"; + Text[ tswana ] = "~Tebo"; + Text[ basque ] = "~Ikusi"; +- Text[ lithuanian ] = "~Rodinys"; ++ Text[ lithuanian ] = "~Rodyti"; + Text[ kannada ] = "ನೋಟ"; + Text[ galician ] = "~Ver"; + }; +diff -urN svx/source/gallery2/gallery.src svx/source/gallery2/gallery.src +--- svx/source/gallery2/gallery.src 2004-09-09 19:14:20.000000000 +0300 ++++ svx/source/gallery2/gallery.src 2004-11-09 14:22:08.000000000 +0200 +@@ -930,7 +930,7 @@ + Text[ norwegian_nynorsk ] = "~Førehandsvising"; + Text[ tswana ] = "Leba~gape"; + Text[ basque ] = "Aurr~ebista"; +- Text[ lithuanian ] = "~Rodinys"; ++ Text[ lithuanian ] = "~Rodyti"; + Text[ kannada ] = "ಮà³à²¨à³à²¨à³‹à²Ÿ"; + Text[ galician ] = "Pr~evisualización"; + }; +@@ -3158,7 +3158,7 @@ + Text[ norwegian_nynorsk ] = "Ikonvising"; + Text[ tswana ] = "Setshwantso Leba"; + Text[ basque ] = "Ikonoen ikuspegia"; +- Text[ lithuanian ] = "Mygtuko rodinys"; ++ Text[ lithuanian ] = "Ikonų peržiÅ«ra"; + Text[ kannada ] = "ಲಾಂಛನ ನೋಟ"; + Text[ galician ] = "Ver símbolos"; + }; +diff -urN sw/source/ui/docvw/access.src sw/source/ui/docvw/access.src +--- sw/source/ui/docvw/access.src 2004-09-09 20:29:38.000000000 +0300 ++++ sw/source/ui/docvw/access.src 2004-11-09 14:22:08.000000000 +0200 +@@ -101,7 +101,7 @@ + Text[ norwegian_nynorsk ] = "Dokumentvising"; + Text[ tswana ] = "Setlankana lebelela"; + Text[ basque ] = "Dokumentu-ikuspegia"; +- Text[ lithuanian ] = "Dokumento rodinys"; ++ Text[ lithuanian ] = "Dokumento vaizdas"; + Text[ kannada ] = "ದಸà³à²¤à²¾à²µà³‡à²œà³ ನೋಟ"; + Text[ galician ] = "Document view"; + }; +@@ -146,7 +146,7 @@ + Text[ norwegian_nynorsk ] = "Dokumentvising"; + Text[ tswana ] = "Setlankana lebelela"; + Text[ basque ] = "Dokumentu-ikuspegia"; +- Text[ lithuanian ] = "Dokumento rodinys"; ++ Text[ lithuanian ] = "Dokumento vaizdas"; + Text[ kannada ] = "ದಸà³à²¤à²¾à²µà³‡à²œà³ ನೋಟ"; + Text[ galician ] = "Document view"; + }; +diff -urN sw/source/ui/inc/swmn.hrc sw/source/ui/inc/swmn.hrc +--- sw/source/ui/inc/swmn.hrc 2004-09-09 20:36:08.000000000 +0300 ++++ sw/source/ui/inc/swmn.hrc 2004-11-09 14:22:08.000000000 +0200 +@@ -7357,7 +7357,7 @@ + Text[ norwegian_nynorsk ] = "~Vis"; + Text[ tswana ] = "~Lebelela"; + Text[ basque ] = "~Ikusi"; +- Text[ lithuanian ] = "~Rodinys"; ++ Text[ lithuanian ] = "~Rodyti"; + Text[ kannada ] = "ನೋಟ"; + Text[ galician ] = "~Ver"; + }; +diff -urN sw/source/ui/misc/linenum.src sw/source/ui/misc/linenum.src +--- sw/source/ui/misc/linenum.src 2004-09-09 20:38:35.000000000 +0300 ++++ sw/source/ui/misc/linenum.src 2004-11-09 14:22:08.000000000 +0200 +@@ -802,7 +802,7 @@ + Text[ norwegian_nynorsk ] = "Vis"; + Text[ tswana ] = "Lebelela"; + Text[ basque ] = "Ikusi"; +- Text[ lithuanian ] = "Rodinys"; ++ Text[ lithuanian ] = "Rodyti"; + Text[ kannada ] = "ನೋಟ"; + Text[ galician ] = "Visualización"; + }; +diff -urN sw/source/ui/utlui/navipi.src sw/source/ui/utlui/navipi.src +--- sw/source/ui/utlui/navipi.src 2004-09-09 20:44:42.000000000 +0300 ++++ sw/source/ui/utlui/navipi.src 2004-11-09 14:22:08.000000000 +0200 +@@ -660,7 +660,7 @@ + Text[ tswana ] = "shobokanyo Lebelela"; + Text[ norwegian_nynorsk ] = "Innhaldsvising"; + Text[ basque ] = "Edukiaren ikuspegia"; +- Text[ lithuanian ] = "Turinio rodinys"; ++ Text[ lithuanian ] = "Turinio vaizdas"; + Text[ kannada ] = "ವಿಷಯದ ನೋಟ"; + Text[ galician ] = "Conmutar vista do contido"; + }; diff --git a/patches/OOO_1_1/qpro-build.diff b/patches/OOO_1_1/qpro-build.diff new file mode 100644 index 000000000..625393339 --- /dev/null +++ b/patches/OOO_1_1/qpro-build.diff @@ -0,0 +1,123 @@ +--- sc/prj/build.lst 2004-07-21 19:19:39.000000000 +0100 ++++ sc/prj/build.lst 2004-10-19 15:05:37.208057512 +0100 +@@ -39,6 +39,7 @@ + sc sc\source\filter\pch get - all sc_fpch sc_sdi NULL + 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\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 +49,4 @@ + 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_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 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 NULL + +--- sc/util/makefile.mk 2004-07-21 19:20:30.000000000 +0100 ++++ sc/util/makefile.mk 2004-10-19 15:06:02.413225744 +0100 +@@ -204,6 +204,7 @@ + $(SLB)$/xcl97.lib \ + $(SLB)$/html.lib \ + $(SLB)$/lotus.lib \ ++ $(SLB)$/qpro.lib \ + $(SLB)$/rtf.lib \ + $(SLB)$/xml.lib \ + $(SLB)$/accessibility.lib \ + +--- /dev/null 2004-08-25 18:34:59.000000000 +0100 ++++ sc/source/filter/qpro/makefile.mk 2004-10-19 15:13:40.746548488 +0100 +@@ -0,0 +1,92 @@ ++#************************************************************************* ++# ++# $RCSfile$ ++# ++# $Revision$ ++# ++# last change: $Author$ $Date$ ++# ++# The Contents of this file are made available subject to the terms of ++# either of the following licenses ++# ++# - GNU Lesser General Public License Version 2.1 ++# - Sun Industry Standards Source License Version 1.1 ++# ++# Sun Microsystems Inc., October, 2000 ++# ++# GNU Lesser General Public License Version 2.1 ++# ============================================= ++# Copyright 2000 by Sun Microsystems, Inc. ++# 901 San Antonio Road, Palo Alto, CA 94303, USA ++# ++# This library is free software; you can redistribute it and/or ++# modify it under the terms of the GNU Lesser General Public ++# License version 2.1, as published by the Free Software Foundation. ++# ++# This library is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++# Lesser General Public License for more details. ++# ++# You should have received a copy of the GNU Lesser General Public ++# License along with this library; if not, write to the Free Software ++# Foundation, Inc., 59 Temple Place, Suite 330, Boston, ++# MA 02111-1307 USA ++# ++# ++# Sun Industry Standards Source License Version 1.1 ++# ================================================= ++# The contents of this file are subject to the Sun Industry Standards ++# Source License Version 1.1 (the "License"); You may not use this file ++# except in compliance with the License. You may obtain a copy of the ++# License at http://www.openoffice.org/license.html. ++# ++# Software provided under this License is provided on an "AS IS" basis, ++# WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, ++# WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, ++# MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. ++# See the License for the specific provisions governing your rights and ++# obligations concerning the Software. ++# ++# The Initial Developer of the Original Code is: Sun Microsystems, Inc. ++# ++# Copyright: 2000 by Sun Microsystems, Inc. ++# ++# All Rights Reserved. ++# ++# Contributor(s): _______________________________________ ++# ++# ++# ++#************************************************************************* ++ ++PRJ=..$/..$/.. ++ ++PRJNAME=sc ++TARGET=qpro ++ ++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 = \ ++ qpro.cxx ++ ++SLOFILES = \ ++ $(SLO)$/qpro.obj ++ ++# --- Tagets ------------------------------------------------------- ++ ++.INCLUDE : target.mk ++ diff --git a/patches/OOO_1_1/qpro-detect.diff b/patches/OOO_1_1/qpro-detect.diff new file mode 100644 index 000000000..8301d043d --- /dev/null +++ b/patches/OOO_1_1/qpro-detect.diff @@ -0,0 +1,127 @@ +--- sc/source/ui/docshell/docsh.cxx 2004-07-21 19:20:09.000000000 +0100 ++++ sc/source/ui/docshell/docsh.cxx 2004-10-22 15:12:53.630321776 +0100 +@@ -185,6 +185,7 @@ + static const sal_Char __FAR_DATA pFilterXML[] = "StarOffice XML (Calc)"; + static const sal_Char __FAR_DATA pFilterAscii[] = "Text - txt - csv (StarCalc)"; + static const sal_Char __FAR_DATA pFilterLotus[] = "Lotus"; ++static const sal_Char __FAR_DATA pFilterQPro[] = "QPro"; + static const sal_Char __FAR_DATA pFilterExcel4[] = "MS Excel 4.0"; + static const sal_Char __FAR_DATA pFilterEx4Temp[] = "MS Excel 4.0 Vorlage/Template"; + static const sal_Char __FAR_DATA pFilterExcel5[] = "MS Excel 5.0/95"; +@@ -977,6 +978,22 @@ + // #93255# update of row height done inside of Excel filter to speed up chart import + // bSetRowHeights = TRUE; // #75357# optimal row heights must be updated + } ++ else if (aFltName.EqualsAscii(pFilterQPro)) ++ { ++ ScColumn::bDoubleAlloc = TRUE; ++ FltError eError = ScImportQuattroPro( rMedium, &aDocument ); ++ ScColumn::bDoubleAlloc = FALSE; ++ if (eError != eERR_OK) ++ { ++ if (!GetError()) ++ SetError( eError ); ++ ++ if( ( eError & ERRCODE_WARNING_MASK ) == ERRCODE_WARNING_MASK ) ++ bRet = TRUE; ++ } ++ else ++ bRet = TRUE; ++ } + else if (aFltName.EqualsAscii(pFilterAscii)) + { + SfxItemSet* pSet = rMedium.GetItemSet(); + +--- sc/source/ui/app/sclib.cxx 2004-08-30 16:47:25.000000000 +0100 ++++ sc/source/ui/app/sclib.cxx 2004-10-22 15:25:49.082435136 +0100 +@@ -103,6 +103,7 @@ + static const sal_Char __FAR_DATA pFilterXML[] = "StarOffice XML (Calc)"; + static const sal_Char __FAR_DATA pFilterAscii[] = "Text - txt - csv (StarCalc)"; + static const sal_Char __FAR_DATA pFilterLotus[] = "Lotus"; ++static const sal_Char __FAR_DATA pFilterQPro[] = "QPro"; + static const sal_Char __FAR_DATA pFilterExcel4[] = "MS Excel 4.0"; + static const sal_Char __FAR_DATA pFilterEx4Temp[] = "MS Excel 4.0 Vorlage/Template"; + static const sal_Char __FAR_DATA pFilterExcel5[] = "MS Excel 5.0/95"; +@@ -557,6 +558,13 @@ + 0x0000, 0x0000, + M_ENDE }; + ++ const UINT16 pQPro[] = ++ { 0x0000, 0x0000, 0x0002, 0x0000, ++ M_ALT(4), 0x0001, 0x0002, // WB1, WB2 ++ 0x0006, 0x0007, // QPro 6/7 (?) ++ 0x0010, ++ M_ENDE }; ++ + const UINT16 pDIF1[] = // DIF mit CR-LF + { + 'T', 'A', 'B', 'L', 'E', +@@ -604,6 +612,7 @@ + pDIF1, + pDIF2, + pSylk, ++ pQPro, + pLotus97, + pLotus2 + }; +@@ -620,4 +629,5 @@ + pFilterDif, + pFilterDif, + pFilterSylk, ++ pFilterQPro, + pFilterLotus, + pFilterLotus + }; + + const UINT16 nByteMask = 0xFF; + +--- officecfg/registry/data/org/openoffice/Office/TypeDetection.xcu ++++ officecfg/registry/data/org/openoffice/Office/TypeDetection.xcu +@@ -227,6 +227,14 @@ + <value>1,,,,wk1;wks;123,0,</value> + </prop> + </node> ++ <node oor:name="calc_QPro" oor:op="replace"> ++ <prop oor:name="UIName"> ++ <value xml:lang="en-US">Quattro Pro</value> ++ </prop> ++ <prop oor:name="Data"> ++ <value>1,,,,wb1;wb2,0,</value> ++ </prop> ++ </node> + <node oor:name="calc_MS_Excel_40" oor:op="replace"> + <prop oor:name="UIName"> + <value xml:lang="en-US">Microsoft Excel 4.0</value> +@@ -4622,6 +4630,17 @@ + <value>0,calc_Lotus,com.sun.star.sheet.SpreadsheetDocument,,268435649,,0,,com.sun.star.comp.Calc.FilterOptionsDialog</value> + </prop> + </node> ++ <node oor:name="QPro" oor:op="replace"> ++ <prop oor:name="UIName"> ++ <value xml:lang="en-US">Quattro Pro</value> ++ </prop> ++ <prop oor:name="Data"> ++ <value>0,calc_QPro,com.sun.star.sheet.SpreadsheetDocument,,268435649,,0,,</value> ++ </prop> ++ <prop oor:name="Installed" oor:type="xs:boolean"> ++ <value>true</value> ++ </prop> ++ </node> + <node oor:name="MS Excel 4.0" oor:op="replace"> + <prop oor:name="Installed"> + <value>false</value> + +--- sc/inc/filter.hxx 2004-07-21 19:19:36.000000000 +0100 ++++ sc/inc/filter.hxx 2004-10-19 15:17:47.907974240 +0100 +@@ -122,6 +122,8 @@ + + FltError ScImportLotus123( SfxMedium&, ScDocument*, CharSet eSrc = RTL_TEXTENCODING_DONTKNOW ); + ++FltError ScImportQuattroPro( SfxMedium&, ScDocument* ); ++ + FltError ScImportExcel( SvStream&, ScDocument* ); + + FltError ScImportExcel( SfxMedium&, ScDocument* ); + + + diff --git a/patches/OOO_1_1/qpro-filter.diff b/patches/OOO_1_1/qpro-filter.diff new file mode 100644 index 000000000..637172a02 --- /dev/null +++ b/patches/OOO_1_1/qpro-filter.diff @@ -0,0 +1,177 @@ +--- /dev/null 2004-08-25 18:34:59.000000000 +0100 ++++ sc/source/filter/qpro/qpro.cxx 2004-10-22 16:41:56.507081048 +0100 +@@ -0,0 +1,174 @@ ++#ifdef PCH ++#include "filt_pch.hxx" ++#endif ++ ++#pragma hdrstop ++ ++//------------------------------------------------------------------------ ++ ++#include <stdio.h> ++#include <sfx2/docfile.hxx> ++ ++#include "flttools.hxx" ++#include "filter.hxx" ++#include "scerrors.hxx" ++#include "document.hxx" ++#include "cell.hxx" ++ ++// Stream wrapper class ++class BiffReader ++{ ++ protected: ++ SvStream *mpStream; ++ sal_uInt16 mnId; ++ sal_uInt16 mnLength; ++ sal_uInt32 mnOffset; ++ rtl_TextEncoding meCharSet; ++ ++ public: ++ BiffReader( SfxMedium & rMedium ); ++ ~BiffReader(); ++ bool recordsLeft() { return mpStream && !mpStream->IsEof(); } ++ bool nextRecord(); ++ sal_uInt16 getId() { return mnId; } ++ sal_uInt16 getLength() { return mnLength; } ++ void readString( String &rString, sal_uInt16 nLength ); ++ ++ inline SvStream& operator>>( sal_uInt8 & rByte ) { *mpStream >> rByte; } ++ inline SvStream& operator>>( sal_uInt16 & rWord ) { *mpStream >> rWord; } ++}; ++ ++BiffReader::BiffReader( SfxMedium & rMedium ) : ++ mnId(0), ++ mnLength(0), ++ mnOffset(0), ++ meCharSet( RTL_TEXTENCODING_ISO_8859_1 ) // FIXME detect as we parse ++{ ++ mpStream = rMedium.GetInStream(); ++ if( mpStream ) ++ mpStream->SetBufferSize( 65536 ); ++} ++BiffReader::~BiffReader() ++{ ++ if( mpStream ) ++ mpStream->SetBufferSize( 0 ); ++} ++ ++bool BiffReader::nextRecord() ++{ ++ if( !recordsLeft() ) ++ return false; ++ ++ sal_uInt32 nPos = mpStream->Tell(); ++ if( nPos != mnOffset + mnLength ) ++ mpStream->Seek( mnOffset + mnLength ); ++ ++ mnLength = mnId = 0; ++ *mpStream >> mnId >> mnLength; ++ ++ mnOffset = mpStream->Tell(); ++#ifdef DEBUG ++ fprintf( stderr, "Read record 0x%x length 0x%x at offset 0x%x\n", ++ mnId, mnLength, mnOffset ); ++ ++#if 1 // rather verbose ++ int len = mnLength; ++ while (len > 0) { ++ int i, chunk = len < 16 ? len : 16; ++ unsigned char data[16]; ++ mpStream->Read( data, chunk ); ++ ++ for (i = 0; i < chunk; i++) ++ fprintf( stderr, "%.2x ", data[i] ); ++ fprintf( stderr, "| " ); ++ for (i = 0; i < chunk; i++) ++ fprintf( stderr, "%c", data[i] < 127 && data[i] > 30 ? data[i] : '.' ); ++ fprintf( stderr, "\n" ); ++ ++ len -= chunk; ++ } ++ mpStream->Seek( mnOffset ); ++#endif ++#endif ++ return true; ++} ++ ++void BiffReader::readString( String &rString, sal_uInt16 nLength ) ++{ ++ sal_Char* pText = new sal_Char[ nLength + 1 ]; ++ mpStream->Read( pText, nLength ); ++ pText[ nLength ] = 0; ++ rString = String( pText, meCharSet ); ++} ++ ++static FltError ++readQProSheet( BiffReader &rReader, ScDocument *pDoc, sal_uInt16 nTab ) ++{ ++ sal_uInt8 nCol, nDummy; ++ sal_uInt16 nRow; ++ sal_uInt16 nStyle; ++ bool bEndOfSheet = false; ++ ++#ifdef DEBUG ++ fprintf( stderr, "Read sheet (%d)\n", nTab ); ++#endif ++ ++ while( !bEndOfSheet && rReader.nextRecord() ) { ++ switch( rReader.getId() ) ++ { ++ case 0x000f: { // Label cell ++ String aLabel; ++ rReader >> nCol >> nDummy >> nRow >> nStyle >> nDummy; ++ rReader.readString( aLabel, rReader.getLength() - 7 ); ++#ifdef DEBUG ++ fprintf( stderr, "Put Cell %d %d %d '%s'\n", ++ nCol, nRow, nTab, ++ (const sal_Char *)rtl::OUStringToOString( aLabel, RTL_TEXTENCODING_UTF8 ) ); ++#endif ++ pDoc->PutCell( nCol, nRow, nTab, new ScStringCell( aLabel ), (BOOL) TRUE ); ++ break; ++ } ++ case 0x00cb: // End of sheet; ++ bEndOfSheet = true; ++ break; ++ } ++ } ++ return eERR_OK; ++} ++ ++FltError ScImportQuattroPro( SfxMedium &rMedium, ScDocument *pDoc ) ++{ ++ FltError eRet = eERR_OK; ++ BiffReader aReader( rMedium ); ++ sal_uInt16 nVersion; ++ int nTab = 0; ++ ++ if( !aReader.recordsLeft() ) ++ return eERR_OPEN; ++ ++ while( aReader.nextRecord() && eRet == eERR_OK) { ++ switch( aReader.getId() ) ++ { ++ case 0x0000: // Begginning of file ++ aReader >> nVersion; ++ break; ++ case 0x00ca: // Beginning of sheet ++ if( nTab < 26 ) ++ { ++ String aName; ++ aName.Append( sal_Unicode( 'A' + nTab ) ); ++ pDoc->InsertTab( nTab, aName ); ++ } ++ eRet = readQProSheet( aReader, pDoc, nTab ); ++ nTab++; ++ break; ++ case 0x0001: ++ // Implement record handling here ... ++ sal_uInt8 aData; ++ aReader >> aData; ++ break; ++ } ++ } ++ ++ return eRet; ++} diff --git a/patches/OOO_1_1/sc-autofilter-empty-nonempty.diff b/patches/OOO_1_1/sc-autofilter-empty-nonempty.diff new file mode 100644 index 000000000..564dd650a --- /dev/null +++ b/patches/OOO_1_1/sc-autofilter-empty-nonempty.diff @@ -0,0 +1,42 @@ +--- /home/sragavan/cvs/bk/ooo-build/build/OOO_1_1_2/sc/source/ui/view/gridwin.cxx 2003-06-02 12:58:42.000000000 +0530 ++++ sc/source/ui/view/gridwin.cxx 2004-10-11 11:22:24.000000000 +0530 +@@ -159,6 +159,8 @@ + #define SC_AUTOFILTER_ALL 0 + #define SC_AUTOFILTER_CUSTOM 1 + #define SC_AUTOFILTER_TOP10 2 ++#define SC_AUTOFILTER_EMPTY 3 ++#define SC_AUTOFILTER_NOTEMPTY 4 + + // Modi fuer die FilterListBox + enum ScFilterBoxMode +@@ -711,7 +713,7 @@ + long nMaxText = 0; + + // default entries +- static const USHORT nDefIDs[] = { SCSTR_ALL, SCSTR_STDFILTER, SCSTR_TOP10FILTER }; ++ static const USHORT nDefIDs[] = { SCSTR_ALL, SCSTR_STDFILTER, SCSTR_TOP10FILTER, SCSTR_EMPTY, SCSTR_NOTEMPTY }; + const USHORT nDefCount = sizeof(nDefIDs) / sizeof(USHORT); + for (i=0; i<nDefCount; i++) + { +@@ -1087,6 +1089,21 @@ + rNewEntry.eOp = SC_TOPVAL; + *rNewEntry.pStr = String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("10")); + } ++ else if (nSel == SC_AUTOFILTER_EMPTY) ++ { ++ rNewEntry.pStr->Erase(); ++ rNewEntry.bQueryByString = FALSE; ++ rNewEntry.eOp = SC_EQUAL; ++ rNewEntry.nVal = SC_EMPTYFIELDS; ++ ++ } ++ else if (nSel == SC_AUTOFILTER_NOTEMPTY) ++ { ++ rNewEntry.pStr->Erase(); ++ rNewEntry.bQueryByString = FALSE; ++ rNewEntry.eOp = SC_EQUAL; ++ rNewEntry.nVal = SC_NONEMPTYFIELDS; ++ } + else + { + rNewEntry.eOp = SC_EQUAL; diff --git a/patches/OOO_1_1/sc-cell-selection-i3875.diff b/patches/OOO_1_1/sc-cell-selection-i3875.diff new file mode 100644 index 000000000..1c67ee2d9 --- /dev/null +++ b/patches/OOO_1_1/sc-cell-selection-i3875.diff @@ -0,0 +1,141 @@ +--- sc/source/ui/inc/viewdata.hxx 2004-10-19 11:08:50.000000000 +0530 ++++ sc/source/ui/inc/viewdata.hxx 2004-10-19 11:31:25.222005216 +0530 +@@ -54,7 +54,7 @@ + * + * All Rights Reserved. + * +- * Contributor(s): _______________________________________ ++ * Contributor(s): Kohei Yoshida__________________________ + * + * + ************************************************************************/ +@@ -218,6 +218,8 @@ + BYTE nFillMode; // Modus + BOOL bPagebreak; // Seitenumbruch-Vorschaumodus + ++ BOOL bSelCtrlMouseClick; ++ + DECL_LINK (EmptyEditHdl, EditStatus*); + DECL_LINK (EditEngineHdl, EditStatus*); + +@@ -307,6 +309,8 @@ + + void SetZoom( const Fraction& rNewX, const Fraction& rNewY ); + ++ void EnableSelCtrlMouseClick( BOOL bTmp ) { bSelCtrlMouseClick = bTmp; } ++ + const Fraction& GetZoomX() const { return bPagebreak ? aPageZoomX : aZoomX; } + const Fraction& GetZoomY() const { return bPagebreak ? aPageZoomY : aZoomY; } + +@@ -464,6 +468,8 @@ + const Size& GetScenButSize() const { return aScenButSize; } + void SetScenButSize(const Size& rNew) { aScenButSize = rNew; } + ++ BOOL IsSelCtrlMouseClickEnabled() { return bSelCtrlMouseClick; } ++ + static inline long ToPixel( USHORT nTwips, double nFactor ); + }; + +--- sc/source/ui/view/select.cxx 2004-10-19 11:08:52.000000000 +0530 ++++ sc/source/ui/view/select.cxx 2004-10-19 11:31:25.252000656 +0530 +@@ -54,7 +54,7 @@ + * + * All Rights Reserved. + * +- * Contributor(s): _______________________________________ ++ * Contributor(s): Kohei Yoshida__________________________ + * + * + ************************************************************************/ +@@ -598,6 +598,28 @@ + aAnchorPos.Put( nPosX, nPosY, nTab ); + bStarted = TRUE; + } ++ // #i3875# *Hack* When a new cell is Ctrl-clicked with no pre-selected cells, ++ // it highlights that new cell as well as the old cell where the cursor is ++ // positioned prior to the click. A selection mode via Shift-F8 should also ++ // follow the same behavior. ++ else if ( pViewData->IsSelCtrlMouseClickEnabled() ) ++ { ++ USHORT nOldX = pViewData->GetCurX(); ++ USHORT nOldY = pViewData->GetCurY(); ++ ++ pView->InitBlockMode( nOldX, nOldY, nTab, TRUE ); ++ pView->MarkCursor( (USHORT) nOldX, (USHORT) nOldY, nTab ); ++ ++ if ( nOldX != nPosX || nOldY != nPosY ) ++ { ++ pView->DoneBlockMode( TRUE ); ++ pView->InitBlockMode( nPosX, nPosY, nTab, TRUE ); ++ pView->MarkCursor( (USHORT) nPosX, (USHORT) nPosY, nTab ); ++ aAnchorPos.Put( nPosX, nPosY, nTab ); ++ } ++ ++ bStarted = TRUE; ++ } + } + + pView->SetCursor( (USHORT) nPosX, (USHORT) nPosY ); +--- sc/source/ui/view/tabview3.cxx 2004-10-19 11:08:52.000000000 +0530 ++++ sc/source/ui/view/tabview3.cxx 2004-10-19 11:31:25.273997312 +0530 +@@ -54,7 +54,7 @@ + * + * All Rights Reserved. + * +- * Contributor(s): _______________________________________ ++ * Contributor(s): Kohei Yoshida__________________________ + * + * + ************************************************************************/ +@@ -917,12 +917,20 @@ + BOOL ScTabView::SelMouseButtonDown( const MouseEvent& rMEvt ) + { + BOOL bRet = FALSE; ++ ++ // #i3875# *Hack* ++ BOOL bMod1Locked = aViewData.GetViewShell()->GetLockedModifiers() & KEY_MOD1 ? TRUE : FALSE; ++ aViewData.EnableSelCtrlMouseClick( rMEvt.IsMod1() || bMod1Locked ); ++ + if ( pSelEngine ) + { + bMoveIsShift = rMEvt.IsShift(); + bRet = pSelEngine->SelMouseButtonDown( rMEvt ); + bMoveIsShift = FALSE; + } ++ ++ aViewData.EnableSelCtrlMouseClick( FALSE ); // #i3875# *Hack* ++ + return bRet; + } + +--- sc/source/ui/view/viewdata.cxx 2004-10-19 11:08:52.000000000 +0530 ++++ sc/source/ui/view/viewdata.cxx 2004-10-19 11:31:25.300993208 +0530 +@@ -54,7 +54,7 @@ + * + * All Rights Reserved. + * +- * Contributor(s): _______________________________________ ++ * Contributor(s): Kohei Yoshida__________________________ + * + * + ************************************************************************/ +@@ -327,7 +327,8 @@ + bDelMarkValid( FALSE ), + bActive ( TRUE ), //! wie initialisieren? + bPagebreak ( FALSE ), +- pSpellingView ( NULL ) ++ pSpellingView ( NULL ), ++ bSelCtrlMouseClick( FALSE ) + { + SetGridMode ( TRUE ); + SetSyntaxMode ( FALSE ); +@@ -389,7 +390,8 @@ + bDelMarkValid( FALSE ), + bActive ( TRUE ), //! wie initialisieren? + bPagebreak ( rViewData.bPagebreak ), +- pSpellingView ( rViewData.pSpellingView ) ++ pSpellingView ( rViewData.pSpellingView ), ++ bSelCtrlMouseClick( rViewData.bSelCtrlMouseClick ) + { + SetGridMode ( rViewData.IsGridMode() ); + SetSyntaxMode ( rViewData.IsSyntaxMode() ); diff --git a/patches/OOO_1_1/sc-filter-hide-filteredrows.diff b/patches/OOO_1_1/sc-filter-hide-filteredrows.diff new file mode 100644 index 000000000..8afdfc01c --- /dev/null +++ b/patches/OOO_1_1/sc-filter-hide-filteredrows.diff @@ -0,0 +1,15 @@ +--- /home/sragavan/cvs/bk/ooo-build/build/OOO_1_1_2/sc/source/core/data/table2.cxx 2003-04-08 21:50:02.000000000 +0530 ++++ sc/source/core/data/table2.cxx 2004-10-13 15:01:58.814235896 +0530 +@@ -2251,8 +2251,10 @@ + } + + if (bShow) +- for (i=nStartRow; i<=nEndRow; i++) +- pRowFlags[i] &= ~(CR_HIDDEN | CR_FILTERED); ++ for (i=nStartRow; i<=nEndRow; i++){ ++ if (! pRowFlags[i] & CR_FILTERED) ++ pRowFlags[i] &= ~(CR_HIDDEN); ++ } + else + for (i=nStartRow; i<=nEndRow; i++) + pRowFlags[i] |= CR_HIDDEN; diff --git a/patches/OOO_1_1/sc-filters-fill-fix.diff b/patches/OOO_1_1/sc-filters-fill-fix.diff new file mode 100644 index 000000000..9523c6924 --- /dev/null +++ b/patches/OOO_1_1/sc-filters-fill-fix.diff @@ -0,0 +1,20 @@ +--- /home/sragavan/cvs/bk/ooo-build/build/OOO_1_1_2/sc/source/core/data/table4.cxx 2003-03-26 23:34:00.000000000 +0530 ++++ sc/source/core/data/table4.cxx 2004-10-14 11:12:38.050393488 +0530 +@@ -1286,6 +1286,8 @@ + { + for (rInner = nIMin; rInner <= nIMax; rInner++) + { ++ if (pDocument->RowFiltered( rInner, nTab)) ++ continue; + USHORT nInd = nActFormCnt; + FillFormula(nInd, bFirst, (ScFormulaCell*)pSrcCell, + nCol, nRow, (rInner == nIEnd) ); +@@ -1297,6 +1299,8 @@ + { + for (rInner = nIMin; rInner <= nIMax; rInner++) + { ++ if (pDocument->RowFiltered( rInner, nTab)) ++ continue; + aCol[nCol].Insert(nRow, pSrcCell->Clone(pDocument)); + } + nProgress += nIMax - nIMin + 1; diff --git a/patches/OOO_1_1/sc-no-delete-filteredrows.diff b/patches/OOO_1_1/sc-no-delete-filteredrows.diff new file mode 100644 index 000000000..1883c41fb --- /dev/null +++ b/patches/OOO_1_1/sc-no-delete-filteredrows.diff @@ -0,0 +1,88 @@ +--- /home/sragavan/cvs/bk/ooo-build/build/OOO_1_1_2/sc/source/core/data/column.cxx 2003-04-15 22:55:52.000000000 +0530 ++++ sc/source/core/data/column.cxx 2004-10-13 13:32:36.888372528 +0530 +@@ -1322,6 +1322,9 @@ + for (i = 0; i < nCount; i++) + if ((pItems[i].nRow >= nRow1) && (pItems[i].nRow <= nRow2)) + { ++ ++ if ( pDocument->RowFiltered( pItems[i].nRow , nTab)) ++ continue; + if (!nBlockCount) + nStartIndex = i; + nEndIndex = i; +@@ -1342,7 +1345,11 @@ + { + rColumn.Resize( rColumn.GetCellCount() + nBlockCount ); + for (i = nStartIndex; i <= nEndIndex; i++) ++ { ++ if ( pDocument->RowFiltered( pItems[i].nRow , nTab)) ++ continue; + rColumn.Append(pItems[i].nRow, pItems[i].pCell->Clone(rColumn.pDocument)); ++ } + } + } + +--- /home/sragavan/cvs/bk/ooo-build/build/OOO_1_1_2/sc/source/core/data/column3.cxx 2003-03-26 23:33:52.000000000 +0530 ++++ sc/source/core/data/column3.cxx 2004-10-13 11:16:15.567122408 +0530 +@@ -398,6 +398,17 @@ + BOOL bSimple = ((nDelFlag & IDF_CONTENTS) == IDF_CONTENTS); + USHORT i; + ++ /* ++ *If we are deleting a range that has filtered column, let it not be simple ++ */ ++ ++ if (bSimple) ++ { ++ for (i = nStartIndex; i <= nEndIndex && bSimple; i++) ++ if ( pDocument->RowFiltered(pItems[i].nRow, nTab)) ++ bSimple = FALSE; ++ } ++ + // Notiz-Zeichenobjekte + if (nDelFlag & IDF_NOTE) + { +@@ -452,6 +463,16 @@ + BOOL bDelete = FALSE; + ScBaseCell* pOldCell = pItems[j].pCell; + CellType eCellType = pOldCell->GetCellType(); ++ ++ /* ++ * If the rows are filtered continue instead deleting. ++ */ ++ if ( pDocument->RowFiltered( pItems[j].nRow, nTab)) ++ { ++ ++j; ++ continue; ++ } ++ + switch ( eCellType ) + { + case CELLTYPE_VALUE: +--- /home/sragavan/cvs/bk/ooo-build/build/OOO_1_1_2/sc/inc/document.hxx 2004-09-14 09:12:10.000000000 +0530 ++++ sc/inc/document.hxx 2004-10-12 11:44:52.000000000 +0530 +@@ -508,6 +508,8 @@ + long GetWeightedCount() const; // Formeln und Edit staerker gewichtet + ULONG GetCodeCount() const; // RPN-Code in Formeln + DECL_LINK( GetUserDefinedColor, USHORT * ); ++ BOOL RowFiltered( USHORT nRow, USHORT nTab ) const; // FillInfo ++ BOOL ColFiltered( USHORT nCol, USHORT nTab ) const; // FillInfo + // Numberformatter + + public: +@@ -1698,6 +1700,15 @@ + return ( pTab[nTab]->pRowFlags[nRow] & CR_HIDDEN ) != 0; + } + ++inline BOOL ScDocument::ColFiltered( USHORT nCol, USHORT nTab ) const ++{ ++ return ( pTab[nTab]->pColFlags[nCol] & CR_FILTERED) != 0; ++} ++ ++inline BOOL ScDocument::RowFiltered( USHORT nRow, USHORT nTab ) const ++{ ++ return ( pTab[nTab]->pRowFlags[nRow] & CR_FILTERED) != 0; ++} + + + #endif diff --git a/patches/OOO_1_1/sc-paste-insert-rows.diff b/patches/OOO_1_1/sc-paste-insert-rows.diff new file mode 100644 index 000000000..ef783c7d6 --- /dev/null +++ b/patches/OOO_1_1/sc-paste-insert-rows.diff @@ -0,0 +1,13 @@ +--- /home/sragavan/cvs/bk/ooo-build/build/OOO_1_1_2/sc/source/ui/view/viewfun3.cxx 2003-10-31 21:40:15.000000000 +0530 ++++ sc/source/ui/view/viewfun3.cxx 2004-10-14 13:29:36.754960480 +0530 +@@ -442,8 +442,8 @@ + + if (pOwnClip) + PasteFromClip( IDF_ALL, pOwnClip->GetDocument(), +- PASTE_NOFUNC, FALSE, FALSE, FALSE, INS_NONE, IDF_NONE, +- TRUE ); // allow warning dialog ++ PASTE_NOFUNC, FALSE, FALSE, FALSE, INS_CELLSDOWN, IDF_NONE, ++ FALSE ); + else if (pDrawClip) + PasteDraw(); + else diff --git a/patches/OOO_1_1/sc-paste-limitedsize.diff b/patches/OOO_1_1/sc-paste-limitedsize.diff new file mode 100644 index 000000000..57484236d --- /dev/null +++ b/patches/OOO_1_1/sc-paste-limitedsize.diff @@ -0,0 +1,25 @@ +--- /home/sragavan/cvs/bk/ooo-build/build/OOO_1_1_2/sc/source/ui/view/viewfun3.cxx 2003-10-31 21:40:15.000000000 +0530 ++++ sc/source/ui/view/viewfun3.cxx 2004-10-13 14:23:56.248238672 +0530 +@@ -721,15 +721,14 @@ + } + } + +- if (nBlockAddX > nDestSizeX) +- nMarkAddX = nBlockAddX - nDestSizeX; // fuer Merge-Test +- else +- nEndCol = nStartCol + nDestSizeX; ++ /* ++ * Therz no use in copying lesser data multiple times in a bigger marked area ++ * So Im just reducing the size of the marked area. ++ */ ++ nEndCol = nStartCol + nDestSizeX; + +- if (nBlockAddY > nDestSizeY) +- nMarkAddY = nBlockAddY - nDestSizeY; // fuer Merge-Test +- else +- nEndRow = nStartRow + nDestSizeY; ++ nEndRow = nStartRow + nDestSizeY; ++ + } + else + { diff --git a/patches/OOO_1_1/sc-standard-filter-options.diff b/patches/OOO_1_1/sc-standard-filter-options.diff new file mode 100644 index 000000000..676d97b2d --- /dev/null +++ b/patches/OOO_1_1/sc-standard-filter-options.diff @@ -0,0 +1,362 @@ +--- /home/sragavan/cvs/bk/ooo-build/build/OOO_1_1_2/sc/inc/global.hxx 2003-04-28 21:00:46.000000000 +0530 ++++ sc/inc/global.hxx 2004-10-08 16:23:48.000000000 +0530 +@@ -1329,6 +1329,8 @@ + + enum ScQueryOp + { ++ SC_BEGINS_WITH, ++ SC_ENDS_WITH, + SC_EQUAL, + SC_LESS, + SC_GREATER, +--- /home/sragavan/cvs/bk/ooo-build/build/OOO_1_1_2/sc/source/ui/dbgui/filtdlg.cxx 2004-01-09 20:11:10.000000000 +0530 ++++ sc/source/ui/dbgui/filtdlg.cxx 2004-10-08 16:24:56.000000000 +0530 +@@ -83,6 +83,7 @@ + #include "viewdata.hxx" + #include "document.hxx" + #include "scresid.hxx" ++#include "docoptio.hxx" + + #include "foptmgr.hxx" + +@@ -219,6 +220,7 @@ + aBtnMore, + aBtnCase, + aBtnRegExp, ++ aBtnWholeWord, + aBtnHeader, + aBtnUnique, + aBtnCopyResult, +@@ -573,6 +575,17 @@ + bCopyPosOk = ( SCA_VALID == (nResult & SCA_VALID) ); + } + ++ /* ++ * The reg exp checkbutton read is moved up, since, ++ * for begins and ends with query we are makeing them as re query transparently ++ * Checking this later spoils the entire transparent work. ++ */ ++ theParam.bRegExp = aBtnRegExp.IsChecked(); ++ ++ ScDocOptions pDocOpts = pDoc->GetDocOptions(); ++ pDocOpts.SetMatchWholeCell(aBtnWholeWord.IsChecked()); ++ pDoc->SetDocOptions(pDocOpts); ++ + for ( USHORT i=0; i<3; i++ ) + { + USHORT nField = aFieldLbArr[i]->GetSelectEntryPos(); +@@ -606,6 +619,19 @@ + } + else + { ++ if (eOp == SC_BEGINS_WITH ) { ++ String tmp ('^'); ++ tmp .Append(aStrVal); ++ ::rtl::OUString str (tmp); ++ aStrVal.Assign(tmp); ++ eOp = SC_EQUAL; ++ theParam.bRegExp = TRUE; ++ } ++ else if (eOp == SC_ENDS_WITH ) { ++ aStrVal.Append (String('$')); ++ eOp = SC_EQUAL; ++ theParam.bRegExp = TRUE; ++ } + *rEntry.pStr = aStrVal; + rEntry.nVal = 0; + rEntry.bQueryByString = TRUE; +@@ -642,7 +668,7 @@ + theParam.bByRow = TRUE; + theParam.bDuplicate = !aBtnUnique.IsChecked(); + theParam.bCaseSens = aBtnCase.IsChecked(); +- theParam.bRegExp = aBtnRegExp.IsChecked(); ++ + theParam.bDestPers = aBtnDestPers.IsChecked(); + + // nur die drei eingestellten - alles andere zuruecksetzen +--- /home/sragavan/cvs/bk/ooo-build/build/OOO_1_1_2/sc/source/ui/inc/filtdlg.hxx 2001-09-24 22:59:58.000000000 +0530 ++++ sc/source/ui/inc/filtdlg.hxx 2004-10-08 12:23:49.000000000 +0530 +@@ -101,6 +101,7 @@ + CheckBox aBtnCase; \ + CheckBox aBtnRegExp; \ + CheckBox aBtnHeader; \ ++ CheckBox aBtnWholeWord; \ + CheckBox aBtnUnique; \ + CheckBox aBtnCopyResult; \ + ListBox aLbCopyArea; \ +@@ -122,6 +123,7 @@ + aFlOptions ( this, ScResId( FL_OPTIONS ) ), \ + aBtnCase ( this, ScResId( BTN_CASE ) ), \ + aBtnRegExp ( this, ScResId( BTN_REGEXP ) ), \ ++ aBtnWholeWord ( this, ScResId( BTN_MATCH) ), \ + aBtnHeader ( this, ScResId( BTN_HEADER ) ), \ + aBtnUnique ( this, ScResId( BTN_UNIQUE ) ), \ + aBtnCopyResult ( this, ScResId( BTN_COPY_RESULT ) ), \ +--- /home/sragavan/cvs/bk/ooo-build/build/OOO_1_1_2/sc/source/ui/inc/filter.hrc 2001-05-21 14:52:56.000000000 +0530 ++++ sc/source/ui/inc/filter.hrc 2004-10-08 12:27:21.000000000 +0530 +@@ -81,7 +81,7 @@ + #define FT_DBAREA_LABEL 10 + #define FT_DBAREA 11 + #define BTN_DEST_PERS 12 +- ++#define BTN_MATCH 13 + // Filter: + #define FT_OP 20 + #define FT_FIELD 21 +--- /home/sragavan/cvs/bk/ooo-build/build/OOO_1_1_2/sc/source/ui/src/filter.src 2004-04-27 22:31:47.000000000 +0530 ++++ sc/source/ui/src/filter.src 2004-10-08 14:55:38.000000000 +0530 +@@ -66,7 +66,7 @@ + HelpId = SID_FILTER ; + Hide = TRUE ; + SVLook = TRUE ; +- Size = MAP_APPFONT ( 298 , 83 ) ; ++ Size = MAP_APPFONT ( 298 , 98 ) ; + Text = "Standardfilter" ; + Text [ ENGLISH ] = "Standard Filter" ; + Text [ norwegian ] = "Standardfilter" ; +@@ -708,12 +708,14 @@ + }; + stringlist [ english_us ] = + { +- < "=" ; Default ; > ; ++ < "Begins with" ; Default ; > ; ++ < "Ends with" ; Default ; > ; ++ < "Equals" ; Default ; > ; + < "<" ; Default ; > ; + < ">" ; Default ; > ; + < "<=" ; Default ; > ; + < ">=" ; Default ; > ; +- < "<>" ; Default ; > ; ++ < "Not equals" ; Default ; > ; + < "Largest" ; Default ; > ; + < "Smallest" ; Default ; > ; + < "Largest %" ; Default ; > ; +@@ -2278,6 +2280,14 @@ + Text[ zulu ] = "Isisho esi~jwayelekile"; + Text[ norwegian_nynorsk ] = "~Regulært uttrykk"; + }; ++ ++ CheckBox BTN_MATCH ++ { ++ Pos = MAP_APPFONT ( 12 , 126 ) ; ++ Size = MAP_APPFONT ( 239 , 10 ) ; ++ Text [ english_us ] = "Search criteria must apply to ~whole cells" ; ++ }; ++ + CheckBox BTN_HEADER + { + Hide = TRUE ; +@@ -2458,7 +2468,7 @@ + { + Border = TRUE ; + Hide = TRUE ; +- Pos = MAP_APPFONT ( 21 , 126 ) ; ++ Pos = MAP_APPFONT ( 21 , 138 ) ; + Size = MAP_APPFONT ( 90 , 90 ) ; + TabStop = TRUE ; + DropDown = TRUE ; +@@ -2467,7 +2477,7 @@ + { + Border = TRUE ; + Hide = TRUE ; +- Pos = MAP_APPFONT ( 115 , 126 ) ; ++ Pos = MAP_APPFONT ( 115 , 138 ) ; + Size = MAP_APPFONT ( 104 , 12 ) ; + TabStop = TRUE ; + }; +@@ -2475,7 +2485,7 @@ + { + QuickHelpText = "Verkleinern" ; + QuickHelpText [ ENGLISH ] = "Shrink" ; +- Pos = MAP_APPFONT ( 221 , 126 ) ; ++ Pos = MAP_APPFONT ( 221 , 138 ) ; + Size = MAP_APPFONT ( 12 , 12 ) ; + TabStop = FALSE ; + QuickHelpText [ english_us ] = "Shrink" ; +@@ -2605,7 +2615,7 @@ + FixedText FT_DBAREA_LABEL + { + Hide = TRUE ; +- Pos = MAP_APPFONT ( 6 , 144 ) ; ++ Pos = MAP_APPFONT ( 6 , 156 ) ; + Size = MAP_APPFONT ( 58 , 8 ) ; + Text = "Datenbereich:" ; + Text [ ENGLISH ] = "Data area:" ; +@@ -3204,10 +3214,10 @@ + Text [ danish ] = "dummy" ; + Text [ french ] = "factice" ; + Text [ swedish ] = "dummy" ; ++ Left = TRUE ; + Text [ dutch ] = "dummy" ; + Text [ spanish ] = "Texto ejemplo" ; + Text [ english_us ] = "dummy" ; +- Left = TRUE ; + Text[ chinese_simplified ] = "æ ·æœ¬"; + Text[ russian ] = "ôèêòèâíûé"; + Text[ polish ] = "Zaœlepka"; +--- /home/sragavan/cvs/bk/ooo-build/build/OOO_1_1_2/sc/source/ui/dbgui/foptmgr.cxx 2001-10-23 14:35:11.000000000 +0530 ++++ sc/source/ui/dbgui/foptmgr.cxx 2004-10-08 16:04:15.000000000 +0530 +@@ -76,6 +76,7 @@ + #include "dbcolect.hxx" + #include "viewdata.hxx" + #include "document.hxx" ++#include "docoptio.hxx" + + #define _FOPTMGR_CXX + #include "foptmgr.hxx" +@@ -111,6 +111,7 @@ + rBtnMore ( refBtnMore ), + rBtnCase ( refBtnCase ), + rBtnRegExp ( refBtnRegExp ), ++ rBtnWholeWord ( refBtnRegExp ), + rBtnHeader ( refBtnHeader ), + rBtnUnique ( refBtnUnique ), + rBtnCopyResult ( refBtnCopyResult ), +@@ -123,9 +124,53 @@ + rStrNoName ( refStrNoName ), + rStrUndefined ( refStrUndefined ) + { +- Init(); ++ Init(FALSE); + } + ++ScFilterOptionsMgr::ScFilterOptionsMgr( ++ Dialog* ptrDlg, ++ ScViewData* ptrViewData, ++ const ScQueryParam& refQueryData, ++ MoreButton& refBtnMore, ++ CheckBox& refBtnCase, ++ CheckBox& refBtnRegExp, ++ CheckBox& refBtnWholeWord, ++ CheckBox& refBtnHeader, ++ CheckBox& refBtnUnique, ++ CheckBox& refBtnCopyResult, ++ CheckBox& refBtnDestPers, ++ ListBox& refLbCopyArea, ++ Edit& refEdCopyArea, ++ ScRefButton& refRbCopyArea, ++ FixedText& refFtDbAreaLabel, ++ FixedInfo& refFtDbArea, ++ FixedLine& refFlOptions, ++ const String& refStrNoName, ++ const String& refStrUndefined ) ++ ++ : pDlg ( ptrDlg ), ++ pViewData ( ptrViewData ), ++ pDoc ( ptrViewData ? ptrViewData->GetDocument() : NULL ), ++ rQueryData ( refQueryData ), ++ rBtnMore ( refBtnMore ), ++ rBtnCase ( refBtnCase ), ++ rBtnRegExp ( refBtnRegExp ), ++ rBtnWholeWord ( refBtnWholeWord), ++ rBtnHeader ( refBtnHeader ), ++ rBtnUnique ( refBtnUnique ), ++ rBtnCopyResult ( refBtnCopyResult ), ++ rBtnDestPers ( refBtnDestPers ), ++ rLbCopyPos ( refLbCopyArea ), ++ rEdCopyPos ( refEdCopyArea ), ++ rRbCopyPos ( refRbCopyArea ), ++ rFtDbAreaLabel ( refFtDbAreaLabel ), ++ rFtDbArea ( refFtDbArea ), ++ rFlOptions ( refFlOptions ), ++ rStrNoName ( refStrNoName ), ++ rStrUndefined ( refStrUndefined ) ++{ ++ Init(TRUE); ++} + + //---------------------------------------------------------------------------- + +@@ -141,7 +186,7 @@ + + //---------------------------------------------------------------------------- + +-void ScFilterOptionsMgr::Init() ++void ScFilterOptionsMgr::Init(BOOL param) + { + DBG_ASSERT( pViewData && pDoc, "Init failed :-/" ); + +@@ -151,6 +196,8 @@ + + rBtnMore.AddWindow( &rBtnCase ); + rBtnMore.AddWindow( &rBtnRegExp ); ++ if (param) ++ rBtnMore.AddWindow(&rBtnWholeWord); + rBtnMore.AddWindow( &rBtnHeader ); + rBtnMore.AddWindow( &rBtnUnique ); + rBtnMore.AddWindow( &rBtnCopyResult ); +@@ -160,13 +207,18 @@ + rBtnMore.AddWindow( &rRbCopyPos ); + rBtnMore.AddWindow( &rFtDbAreaLabel ); + rBtnMore.AddWindow( &rFtDbArea ); +- rBtnMore.AddWindow( &rFlOptions ); ++ rBtnMore.AddWindow( &rFlOptions ); ++ + + rBtnCase .Check( rQueryData.bCaseSens ); + rBtnHeader .Check( rQueryData.bHasHeader ); + rBtnRegExp .Check( rQueryData.bRegExp ); + rBtnUnique .Check( !rQueryData.bDuplicate ); +- ++ if (param) { ++ BOOL bMatchWholeCell = pDoc->GetDocOptions().IsMatchWholeCell(); ++ rBtnWholeWord.Check(bMatchWholeCell); ++ } ++ + if ( pViewData && pDoc ) + { + String theAreaStr; +@@ -266,6 +318,7 @@ + } + else + rEdCopyPos.SetText( EMPTY_STRING ); ++ rFtDbArea.SetPosPixel(Point(158,331)); + } + + +--- /home/sragavan/cvs/bk/ooo-build/build/OOO_1_1_2/sc/source/ui/inc/foptmgr.hxx 2001-05-21 14:52:56.000000000 +0530 ++++ sc/source/ui/inc/foptmgr.hxx 2004-10-08 16:02:56.000000000 +0530 +@@ -108,6 +108,26 @@ + FixedLine& refFlOptions, + const String& refStrNoName, + const String& refStrUndefined ); ++ ScFilterOptionsMgr( Dialog* ptrDlg, ++ ScViewData* ptrViewData, ++ const ScQueryParam& refQueryData, ++ MoreButton& refBtnMore, ++ CheckBox& refBtnCase, ++ CheckBox& refBtnRegExp, ++ CheckBox& refBtnWholeWord, ++ CheckBox& refBtnHeader, ++ CheckBox& refBtnUnique, ++ CheckBox& refBtnCopyResult, ++ CheckBox& refBtnDestPers, ++ ListBox& refLbCopyArea, ++ Edit& refEdCopyArea, ++ ScRefButton& refRbCopyArea, ++ FixedText& refFtDbAreaLabel, ++ FixedInfo& refFtDbArea, ++ FixedLine& refFlOptions, ++ const String& refStrNoName, ++ const String& refStrUndefined ); ++ + ~ScFilterOptionsMgr(); + + BOOL VerifyPosStr ( const String& rPosStr ) const; +@@ -119,6 +139,7 @@ + + MoreButton& rBtnMore; + CheckBox& rBtnCase; ++ CheckBox& rBtnWholeWord; + CheckBox& rBtnRegExp; + CheckBox& rBtnHeader; + CheckBox& rBtnUnique; +@@ -138,7 +159,7 @@ + + #ifdef _FOPTMGR_CXX + private: +- void Init(); ++ void Init(BOOL param); + + // Handler: + DECL_LINK( EdPosModifyHdl, Edit* ); diff --git a/patches/OOO_1_1/sd-export-html-translations.diff b/patches/OOO_1_1/sd-export-html-translations.diff index 788cd7d9f..b88bb504a 100644 --- a/patches/OOO_1_1/sd-export-html-translations.diff +++ b/patches/OOO_1_1/sd-export-html-translations.diff @@ -1,12 +1,9 @@ -Index: source/filter/html/pubdlg.src +Index: sd/source/filter/html/pubdlg.src =================================================================== -RCS file: /cvs/graphics/sd/source/filter/html/pubdlg.src,v -retrieving revision 1.13.14.4 -diff -u -r1.13.14.4 pubdlg.src ---- sd/source/filter/html/pubdlg.src 27 Apr 2004 16:42:59 -0000 1.13.14.4 -+++ sd/source/filter/html/pubdlg.src 9 Jun 2004 04:36:11 -0000 -@@ -1357,47 +1357,47 @@ - Text[ norwegian_nynorsk ] = "Lagra bilete som"; +--- sd/source/filter/html/pubdlg.src.orig 2004-09-09 20:18:37.000000000 +0200 ++++ sd/source/filter/html/pubdlg.src 2004-09-12 14:19:41.194859600 +0200 +@@ -1487,52 +1487,52 @@ ModalDialog DLG_PUBLISHING + Text[ galician ] = "Save graphics as"; }; - RadioButton PAGE3_GIF @@ -14,7 +11,7 @@ diff -u -r1.13.14.4 pubdlg.src { Pos = MAP_APPFONT( 12, 49 ); Size = MAP_APPFONT( 116, 10 ); - Text = "~GIF"; +- Text = "~GIF"; - Text [ ENGLISH ] = "~GIF"; - Text[ italian ] = "~GIF"; - Text[ portuguese_brazilian ] = "~GIF"; @@ -32,8 +29,8 @@ diff -u -r1.13.14.4 pubdlg.src - Text[ greek ] = "~GIF - Graphics Interchange Format"; - Text[ korean ] = "~GIF"; - Text[ chinese_traditional ] = "~GIF"; -- Text[ arabic ] = "GIF - Graphics Interchange-Format"; -- Text[ turkish ] = "~GIF"; +- Text[ arabic ] = "~GIF"; +- Text[ turkish ] = "GIF"; - Text[ catalan ] = "~GIF"; - Text[ finnish ] = "~GIF"; - Text[ thai ] = "~GIF - Graphics Interchange Format"; @@ -51,6 +48,12 @@ diff -u -r1.13.14.4 pubdlg.src - Text[ afrikaans ] = "~GIF"; - Text[ zulu ] = "~GIF"; - Text[ norwegian_nynorsk ] = "~GIF"; +- Text[ tswana ] = "~GIF"; +- Text[ basque ] = "~GIF"; +- Text[ lithuanian ] = "~GIF"; +- Text[ kannada ] = "GIF"; +- Text[ galician ] = "~GIF"; ++ Text = "~PNG"; + Text [ ENGLISH ] = "~PNG"; + Text[ italian ] = "~PNG"; + Text[ portuguese_brazilian ] = "~PNG"; @@ -68,8 +71,8 @@ diff -u -r1.13.14.4 pubdlg.src + Text[ greek ] = "~PNG"; + Text[ korean ] = "~PNG"; + Text[ chinese_traditional ] = "~PNG"; -+ Text[ arabic ] = "PNG"; -+ Text[ turkish ] = "~PNG"; ++ Text[ arabic ] = "~PNG"; ++ Text[ turkish ] = "PNG"; + Text[ catalan ] = "~PNG"; + Text[ finnish ] = "~PNG"; + Text[ thai ] = "~PNG"; @@ -87,6 +90,11 @@ diff -u -r1.13.14.4 pubdlg.src + Text[ afrikaans ] = "~PNG"; + Text[ zulu ] = "~PNG"; + Text[ norwegian_nynorsk ] = "~PNG"; ++ Text[ tswana ] = "~PNG"; ++ Text[ basque ] = "~PNG"; ++ Text[ lithuanian ] = "~PNG"; ++ Text[ kannada ] = "PNG"; ++ Text[ galician ] = "~PNG"; }; RadioButton PAGE3_JPG diff --git a/patches/OOO_1_1/sw-escape-print-preview.diff b/patches/OOO_1_1/sw-escape-print-preview.diff new file mode 100644 index 000000000..40c659ee3 --- /dev/null +++ b/patches/OOO_1_1/sw-escape-print-preview.diff @@ -0,0 +1,15 @@ +Index: sw/source/ui/uiview/pview.cxx +=================================================================== +RCS file: /cvs/sw/sw/source/ui/uiview/pview.cxx,v +retrieving revision 1.43.156.1 +diff -u -r1.43.156.1 pview.cxx +--- sw/source/ui/uiview/pview.cxx 9 Jan 2004 14:34:20 -0000 1.43.156.1 ++++ sw/source/ui/uiview/pview.cxx 14 Oct 2004 09:54:39 -0000 +@@ -1125,6 +1125,7 @@ + switch(nKey) + { + case KEY_ADD : nSlot = SID_ZOOM_OUT; break; ++ case KEY_ESCAPE : nSlot = FN_CLOSE_PAGEPREVIEW; break; + case KEY_SUBTRACT : nSlot = SID_ZOOM_IN; break; + } + if(nSlot) diff --git a/patches/OOO_1_1/sysui-mimetypes.diff b/patches/OOO_1_1/sysui-mimetypes.diff new file mode 100644 index 000000000..3e0058c41 --- /dev/null +++ b/patches/OOO_1_1/sysui-mimetypes.diff @@ -0,0 +1,50 @@ +? delzip +? legacy/delzip +Index: calc.desktop +=================================================================== +RCS file: /cvs/gsl/sysui/desktop/gnome/calc.desktop,v +retrieving revision 1.2.30.2 +diff -u -u -r1.2.30.2 calc.desktop +--- sysui/desktop/gnome/calc.desktop 9 Jan 2004 19:02:26 -0000 1.2.30.2 ++++ sysui/desktop/gnome/calc.desktop 14 Oct 2004 07:22:58 -0000 +@@ -8,3 +8,4 @@ + Type=Application + Name=<productname> Calc + Comment=<productname> Spreadsheet ++MimeType=application/vnd.sun.xml.calc;application/vnd.sun.xml.calc.template;application/vnd.sun.xml.math;application/vnd.ms-excel;application/vnd.stardivision.calc;application/vnd.stardivision.chart;application/vnd.stardivision.math;application/vnd.lotus-1-2-3;text/x-comma-separated-values +Index: draw.desktop +=================================================================== +RCS file: /cvs/gsl/sysui/desktop/gnome/draw.desktop,v +retrieving revision 1.2.30.2 +diff -u -u -r1.2.30.2 draw.desktop +--- sysui/desktop/gnome/draw.desktop 9 Jan 2004 19:02:27 -0000 1.2.30.2 ++++ sysui/desktop/gnome/draw.desktop 14 Oct 2004 07:22:58 -0000 +@@ -8,3 +8,4 @@ + Type=Application + Name=<productname> Draw + Comment=<productname> Drawing ++MimeType=application/vnd.sun.xml.draw;application/vnd.sun.xml.draw.template;application/vnd.stardivision.draw +Index: impress.desktop +=================================================================== +RCS file: /cvs/gsl/sysui/desktop/gnome/impress.desktop,v +retrieving revision 1.2.30.3 +diff -u -u -r1.2.30.3 impress.desktop +--- sysui/desktop/gnome/impress.desktop 27 Aug 2004 10:27:44 -0000 1.2.30.3 ++++ sysui/desktop/gnome/impress.desktop 14 Oct 2004 07:22:58 -0000 +@@ -8,3 +8,4 @@ + Exec=<progpath_utf8>/program/simpress %U + Name=<productname> Impress + Comment=<productname> Presentation ++MimeType=application/vnd.sun.xml.impress;application/vnd.sun.xml.impress.template;application/vnd.ms-powerpoint;application/vnd.stardivision.impress +Index: writer.desktop +=================================================================== +RCS file: /cvs/gsl/sysui/desktop/gnome/writer.desktop,v +retrieving revision 1.2.30.2 +diff -u -u -r1.2.30.2 writer.desktop +--- sysui/desktop/gnome/writer.desktop 9 Jan 2004 19:02:29 -0000 1.2.30.2 ++++ sysui/desktop/gnome/writer.desktop 14 Oct 2004 07:22:58 -0000 +@@ -8,3 +8,4 @@ + Type=Application + Name=<productname> Writer + Comment=<productname> Text Document ++MimeType=application/vnd.sun.xml.writer;application/vnd.sun.xml.writer.global;application/vnd.sun.xml.writer.template;application/vnd.ms-word;application/x-mswrite;application/vnd.stardivision.writer;application/vnd.wordperfect;application/wordperfect;application/rtf;text/plain diff --git a/patches/OOO_1_1/sysui-translations.diff b/patches/OOO_1_1/sysui-translations.diff index 177d20444..44a5720c4 100644 --- a/patches/OOO_1_1/sysui-translations.diff +++ b/patches/OOO_1_1/sysui-translations.diff @@ -1,11 +1,13 @@ +-*- coding: utf-8 -*- + Index: documents.ulf =================================================================== RCS file: /cvs/gsl/sysui/desktop/share/documents.ulf,v retrieving revision 1.7.8.5 Index: sysui/desktop/share/documents.ulf =================================================================== ---- sysui/desktop/share/documents.ulf.orig 2004-04-27 20:01:05.000000000 +0200 -+++ sysui/desktop/share/documents.ulf 2004-07-30 22:18:28.430804688 +0200 +--- sysui/desktop/share/documents.ulf.orig 2004-09-13 22:50:54.000000000 +0200 ++++ sysui/desktop/share/documents.ulf 2004-09-14 15:46:59.389405928 +0200 @@ -1,12 +1,11 @@ [writer] en = "%PRODUCTNAME Text Document" @@ -20,28 +22,24 @@ Index: sysui/desktop/share/documents.ulf hu = "%PRODUCTNAME-szövegesdokumentum" it = "%PRODUCTNAME Documento di testo" cs = "Textový dokument %PRODUCTNAME" -@@ -21,45 +20,33 @@ zh-CN = "%PRODUCTNAME 文本文档" +@@ -21,10 +20,8 @@ zh-CN = "%PRODUCTNAME 文本文档" zh-TW = "%PRODUCTNAME æ–‡å—文件" tr = "PRODUCTNAME Metin belgesi" ar = "%PRODUCTNAME مستند نص" -he = "%PRODUCTNAME Textdokument" -ca = "%PRODUCTNAME Document de text" --th = "%PRODUCTNAME Textdokument" --hi-IN = "%PRODUCTNAME Textdokument" +ca = "Document de text d'%PRODUCTNAME" + th = "%PRODUCTNAME เà¸à¸à¸ªà¸²à¸£à¸‚้à¸à¸„วาม" +-hi-IN = "%PRODUCTNAME Textdokument" et = "%PRODUCTNAME-i tekstidokument" sl = "Dokument z besedilom programa %PRODUCTNAME" ru = "%PRODUCTNAME ТекÑтовый документ" - cy = "Dogfen Testun %PRODUCTNAME" - ns = "%PRODUCTNAME Tokumente ya Sengwalwa" - af = "%PRODUCTNAME-teksdokument" --zu = "Ushicilelo Lombhalo lwe-%PRODUCTNAME 5.0" -+zu = "Ushicilelo Lombhalo lwe-%PRODUCTNAME" +@@ -42,31 +39,25 @@ gl = "%PRODUCTNAME Text Document" [writer-template] en = "%PRODUCTNAME Text Document Template" de = "%PRODUCTNAME Textdokumentvorlage" -pt = "%PRODUCTNAME Textdokumentvorlage" --ru = "%PRODUCTNAME Textdokumentvorlage" + ru = "Шаблон текÑтового документа %PRODUCTNAME" -el = "%PRODUCTNAME Textdokumentvorlage" nl = "%PRODUCTNAME Tekstdocumentsjabloon" fr = "Modèle de texte %PRODUCTNAME" @@ -60,22 +58,22 @@ Index: sysui/desktop/share/documents.ulf ko = "%PRODUCTNAME í…스트 문서 ì„œì‹ íŒŒì¼" zh-CN = "%PRODUCTNAME æ–‡æœ¬æ–‡æ¡£æ ·å¼" zh-TW = "%PRODUCTNAME æ–‡å—文件樣å¼" --tr = "%PRODUCTNAME Textdokumentvorlage" + tr = "%PRODUCTNAME Metin Belgesi Åžablonu" -ar = "%PRODUCTNAME Textdokumentvorlage" -he = "%PRODUCTNAME Textdokumentvorlage" -ca = "%PRODUCTNAME Textdokumentvorlage" --th = "%PRODUCTNAME Textdokumentvorlage" --hi-IN = "%PRODUCTNAME Textdokumentvorlage" +ca = "%PRODUCTNAME Plantilla de document de text d'%PRODUCTNAME" + th = "%PRODUCTNAME à¹à¸¡à¹ˆà¹à¸šà¸šà¹€à¸à¸à¸ªà¸²à¸£à¸‚้à¸à¸„วาม" +-hi-IN = "%PRODUCTNAME Textdokumentvorlage" et = "%PRODUCTNAME-i tekstidokumendi mall" sl = "Predloga dokumenta z besedilom programa %PRODUCTNAME" ns = "%PRODUCTNAME Template ya Tokumente ya Sengwalwa" -@@ -69,13 +56,12 @@ zu = "Uqwembe loshicilelo lombhalo lwe-% +@@ -83,13 +74,12 @@ gl = "%PRODUCTNAME Text Document Templat [writer-global] en = "%PRODUCTNAME Master Document" de = "%PRODUCTNAME Globaldokument" -pt = "%PRODUCTNAME Globaldokument" - ru = "%PRODUCTNAME СоÑтавной документ" + ru = "СоÑтавной документ %PRODUCTNAME" el = "%PRODUCTNAME KÏÏιο ÎγγÏαφο" nl = "%PRODUCTNAME Masterdocument" fr = "%PRODUCTNAME Document maître" @@ -85,27 +83,30 @@ Index: sysui/desktop/share/documents.ulf hu = "%PRODUCTNAME-fÅ‘dokumentum" it = "%PRODUCTNAME Documento master" cs = "Hlavnà dokument %PRODUCTNAME" -@@ -90,26 +76,22 @@ zh-CN = "%PRODUCTNAME 主控文档" +@@ -104,15 +94,13 @@ zh-CN = "%PRODUCTNAME 主控文档" zh-TW = "%PRODUCTNAME 主控文件" - tr = "%PRODUCTNAME Ana belge" + tr = "%PRODUCTNAME Ana Belge" ar = "%PRODUCTNAME مستند شام?" -he = "%PRODUCTNAME Globaldokument" -ca = "%PRODUCTNAME Globaldokument" --th = "%PRODUCTNAME Globaldokument" --hi-IN = "%PRODUCTNAME Globaldokument" +ca = "%PRODUCTNAME "Document mestre d'%PRODUCTNAME" + th = "%PRODUCTNAME ต้นà¹à¸šà¸šà¹€à¸à¸à¸ªà¸²à¸£" +-hi-IN = "%PRODUCTNAME Globaldokument" et = "%PRODUCTNAME-i põhidokument" sl = "Glavni dokument programa %PRODUCTNAME" ns = "Tokumente ya Master ya %PRODUCTNAME" af = "%PRODUCTNAME-meesterdokument" -zu = "Ushicilelo Olukhulu lwe-%PRODUCTNAME 5.0" +zu = "Ushicilelo Olukhulu lwe-%PRODUCTNAME" - + nb = "%PRODUCTNAME Master Document" + cy = "%PRODUCTNAME Master Document" + tn = "%PRODUCTNAME Master Document" +@@ -125,13 +113,12 @@ gl = "%PRODUCTNAME Master Document" [writer-math] en = "%PRODUCTNAME Formula" de = "%PRODUCTNAME Formel" -pt = "%PRODUCTNAME Formel" - ru = "%PRODUCTNAME Формула" + ru = "Формула %PRODUCTNAME" el = "%PRODUCTNAME ΤÏπος" nl = "%PRODUCTNAME Formule" fr = "%PRODUCTNAME Formule" @@ -115,27 +116,30 @@ Index: sysui/desktop/share/documents.ulf hu = "%PRODUCTNAME-képlet" it = "%PRODUCTNAME Formula" cs = "Vzorec %PRODUCTNAME" -@@ -124,26 +106,22 @@ zh-CN = "%PRODUCTNAME å…¬å¼" +@@ -146,15 +133,13 @@ zh-CN = "%PRODUCTNAME å…¬å¼" zh-TW = "%PRODUCTNAME å…¬å¼" tr = "%PRODUCTNAME Formül" ar = "%PRODUCTNAME صيغة" -he = "%PRODUCTNAME Formel" -ca = "%PRODUCTNAME Formel" --th = "%PRODUCTNAME Formel" --hi-IN = "%PRODUCTNAME Formel" +ca = "Fòrmula d'%PRODUCTNAME" + th = "%PRODUCTNAME สมà¸à¸²à¸£" +-hi-IN = "%PRODUCTNAME Formel" et = "%PRODUCTNAME-i valem" sl = "Formula programa %PRODUCTNAME" ns = "Fomula ya %PRODUCTNAME" af = "%PRODUCTNAME-formule" -zu = "Indlela yokwenza ye-%PRODUCTNAME 5.0" +zu = "Indlela yokwenza ye-%PRODUCTNAME" - + nb = "%PRODUCTNAME Formula" + cy = "%PRODUCTNAME Formula" + tn = "%PRODUCTNAME Formula" +@@ -167,13 +152,12 @@ gl = "%PRODUCTNAME Formula" [impress] en = "%PRODUCTNAME Presentation" de = "%PRODUCTNAME Präsentation" -pt = "%PRODUCTNAME Präsentation" - ru = "%PRODUCTNAME ПрезентациÑ" + ru = "ÐŸÑ€ÐµÐ·ÐµÐ½Ñ‚Ð°Ñ†Ð¸Ñ %PRODUCTNAME" el = "%PRODUCTNAME ΠαÏουσίαση" nl = "%PRODUCTNAME Presentatie" fr = "%PRODUCTNAME Présentation" @@ -146,29 +150,31 @@ Index: sysui/desktop/share/documents.ulf hu = "%PRODUCTNAME-bemutató" it = "%PRODUCTNAME Presentazione" cs = "Prezentace %PRODUCTNAME" -@@ -156,46 +134,32 @@ ja = "%PRODUCTNAME プレゼンテーシ - ko = "%PRODUCTNAME í”„ë ˆì í…Œì´ì…˜" +@@ -187,16 +171,13 @@ ko = "%PRODUCTNAME í”„ë ˆì í…Œì´ì…˜" zh-CN = "%PRODUCTNAME 演示文稿" zh-TW = "%PRODUCTNAME ç°¡å ±" --tr = "%PRODUCTNAME Pr?sentation" + tr = "%PRODUCTNAME Sunu" -ar = "%PRODUCTNAME Pr?sentation" -he = "%PRODUCTNAME Präsentation" -ca = "%PRODUCTNAME Pr„sentation" --th = "%PRODUCTNAME Präsentation" --hi-IN = "%PRODUCTNAME Präsentation" +ca = "Presentació d'%PRODUCTNAME" + th = "%PRODUCTNAME à¸à¸²à¸£à¸™à¸³à¹€à¸ªà¸™à¸" +-hi-IN = "%PRODUCTNAME Präsentation" et = "%PRODUCTNAME-i esitlus" sl = "Predstavitev programa %PRODUCTNAME" ns = "TlhagiÅ¡o ya %PRODUCTNAME" af = "%PRODUCTNAME-voorlegging" -zu = "Ukunikezwa kolwazi kwe-%PRODUCTNAME 5.0" +zu = "Ukunikezwa kolwazi kwe-%PRODUCTNAME" - + nb = "%PRODUCTNAME Presentation" + cy = "%PRODUCTNAME Presentation" + tn = "%PRODUCTNAME Presentation" +@@ -209,31 +190,25 @@ gl = "%PRODUCTNAME Presentation" [impress-template] en = "%PRODUCTNAME Presentation Template" de = "%PRODUCTNAME Präsentationsvorlage" -pt = "%PRODUCTNAME Präsentationsvorlage" --ru = "%PRODUCTNAME Pr?sentationsvorlage" + ru = "Шаблон презентации %PRODUCTNAME" -el = "%PRODUCTNAME Pr?sentationsvorlage" nl = "%PRODUCTNAME Presentatiesjabloon" fr = "Modèle de présentation %PRODUCTNAME" @@ -187,22 +193,22 @@ Index: sysui/desktop/share/documents.ulf ko = "%PRODUCTNAME í”„ë ˆì í…Œì´ì…˜ ì„œì‹ íŒŒì¼" zh-CN = "%PRODUCTNAME æ¼”ç¤ºæ–‡ç¨¿æ ·å¼" zh-TW = "%PRODUCTNAME ç°¡å ±æ¨£å¼" --tr = "%PRODUCTNAME Präsentationsvorlage" + tr = "%PRODUCTNAME Sunu Åžablonu" -ar = "%PRODUCTNAME Pr?sentationsvorlage" -he = "%PRODUCTNAME Präsentationsvorlage" -ca = "%PRODUCTNAME Präsentationsvorlage" --th = "%PRODUCTNAME Präsentationsvorlage" --hi-IN = "%PRODUCTNAME Präsentationsvorlage" +ca = ""Plantilla de presentació d'%PRODUCTNAME" + th = "%PRODUCTNAME à¹à¸¡à¹ˆà¹à¸šà¸šà¸à¸²à¸£à¸™à¸³à¹€à¸ªà¸™à¸" +-hi-IN = "%PRODUCTNAME Präsentationsvorlage" et = "%PRODUCTNAME-i esitluse mall" sl = "Predloga predstavitve programa %PRODUCTNAME" ns = "%PRODUCTNAME Template ya TlhagiÅ¡o" -@@ -205,13 +169,12 @@ zu = "Uqwembe Lokunikezelwa kwe-%PRODUCT +@@ -251,13 +226,12 @@ gl = "%PRODUCTNAME Presentation Template [draw] en = "%PRODUCTNAME Drawing" de = "%PRODUCTNAME Zeichnung" -pt = "%PRODUCTNAME Zeichnung" - ru = "%PRODUCTNAME РиÑунок" + ru = "РиÑунок %PRODUCTNAME" el = "%PRODUCTNAME ΣχÎδιο" nl = "%PRODUCTNAME Tekening" fr = "%PRODUCTNAME Dessin" @@ -212,27 +218,30 @@ Index: sysui/desktop/share/documents.ulf hu = "%PRODUCTNAME-rajz" it = "%PRODUCTNAME Disegno" cs = "Kresba %PRODUCTNAME" -@@ -226,44 +189,32 @@ zh-CN = "%PRODUCTNAME 绘图" +@@ -272,15 +246,13 @@ zh-CN = "%PRODUCTNAME 绘图" zh-TW = "%PRODUCTNAME 繪圖" tr = "%PRODUCTNAME Çizim" ar = "%PRODUCTNAME رسم" -he = "%PRODUCTNAME Zeichnung" -ca = "%PRODUCTNAME Dibuix" --th = "%PRODUCTNAME Zeichnung" --hi-IN = "%PRODUCTNAME Zeichnung" +ca = "Dibuix d'%PRODUCTNAME" + th = "%PRODUCTNAME รูปวาด" +-hi-IN = "%PRODUCTNAME Zeichnung" et = "%PRODUCTNAME-i joonistus" sl = "Risba programa %PRODUCTNAME" ns = "Go thala ga %PRODUCTNAME" af = "%PRODUCTNAME-voorlegging" -zu = "Ukudweba nge-%PRODUCTNAME 5.0" +zu = "Ukudweba nge-%PRODUCTNAME" - + nb = "%PRODUCTNAME Drawing" + cy = "%PRODUCTNAME Drawing" + tn = "%PRODUCTNAME Drawing" +@@ -293,31 +265,25 @@ gl = "%PRODUCTNAME Drawing" [draw-template] en = "%PRODUCTNAME Drawing Template" de = "%PRODUCTNAME Zeichnungsvorlage" -pt = "%PRODUCTNAME Zeichnungsvorlage" --ru = "%PRODUCTNAME Zeichnungsvorlage" + ru = "Шаблон риÑунка %PRODUCTNAME" -el = "%PRODUCTNAME Zeichnungsvorlage" nl = "%PRODUCTNAME Tekeningsjabloon" fr = "Modèle de dessin %PRODUCTNAME" @@ -251,22 +260,22 @@ Index: sysui/desktop/share/documents.ulf ko = "%PRODUCTNAME 그리기 ì„œì‹ íŒŒì¼" zh-CN = "%PRODUCTNAME ç»˜å›¾æ ·å¼" zh-TW = "%PRODUCTNAME 繪圖樣å¼" --tr = "%PRODUCTNAME Zeichnungsvorlage" + tr = "%PRODUCTNAME Çizim Åžablonu" -ar = "%PRODUCTNAME Zeichnungsvorlage" -he = "%PRODUCTNAME Zeichnungsvorlage" -ca = "%PRODUCTNAME Zeichnungsvorlage" --th = "%PRODUCTNAME Zeichnungsvorlage" --hi-IN = "%PRODUCTNAME Zeichnungsvorlage" +ca = "Plantilla de dibuix d'%PRODUCTNAME" + th = "%PRODUCTNAME à¹à¸¡à¹ˆà¹à¸šà¸šà¸£à¸¹à¸›à¸§à¸²à¸”" +-hi-IN = "%PRODUCTNAME Zeichnungsvorlage" et = "%PRODUCTNAME-i joonistuse mall" sl = "Predloga risbe programa %PRODUCTNAME" ns = "%PRODUCTNAME Template ya go Thala" -@@ -273,13 +224,12 @@ zu = "Uqwembe Lokudweba lwe-%PRODUCTNAME +@@ -335,13 +301,12 @@ gl = "%PRODUCTNAME Drawing Template" [calc] en = "%PRODUCTNAME Spreadsheet" de = "%PRODUCTNAME Tabelle" -pt = "%PRODUCTNAME Tabelle" - ru = "%PRODUCTNAME ÐÐ»ÐµÐºÑ‚Ñ€Ð¾Ð½Ð½Ð°Ñ Ñ‚Ð°Ð±Ð»Ð¸Ñ†Ð°" + ru = "ÐÐ»ÐµÐºÑ‚Ñ€Ð¾Ð½Ð½Ð°Ñ Ñ‚Ð°Ð±Ð»Ð¸Ñ†Ð° %PRODUCTNAME" el = "%PRODUCTNAME Πίνακας" nl = "%PRODUCTNAME Tabel" fr = "%PRODUCTNAME Classeur" @@ -277,28 +286,31 @@ Index: sysui/desktop/share/documents.ulf hu = "%PRODUCTNAME-munkafüzet" it = "%PRODUCTNAME Tabella" cs = "SeÅ¡it %PRODUCTNAME" -@@ -293,45 +243,32 @@ ko = "%PRODUCTNAME ìŠ¤í”„ë ˆë“œì‹œíŠ¸" +@@ -355,16 +320,13 @@ ko = "%PRODUCTNAME ìŠ¤í”„ë ˆë“œì‹œíŠ¸" zh-CN = "%PRODUCTNAME 工作表" zh-TW = "%PRODUCTNAME 工作表" - tr = "%PRODUCTNAME Tablo" + tr = "%PRODUCTNAME Hesap Tablosu" -ar = "%PRODUCTNAME Tabelle" -he = "%PRODUCTNAME Tabelle" -ca = "%PRODUCTNAME Tabelle" --th = "%PRODUCTNAME Tabelle" --hi-IN = "%PRODUCTNAME Tabelle" +ca = "Fulla de cÃ| lcul d'%PRODUCTNAME" + th = "%PRODUCTNAME ตารางคำนวณ" +-hi-IN = "%PRODUCTNAME Tabelle" et = "%PRODUCTNAME-i arvutustabel" sl = "Preglednica programa %PRODUCTNAME" ns = "Pampiri ya go anega ya %PRODUCTNAME" af = "%PRODUCTNAME-sigblad" -zu = "Ikhasi lokubala %PRODUCTNAME 6.0" +zu = "Ikhasi lokubala %PRODUCTNAME" - + nb = "%PRODUCTNAME Spreadsheet" + cy = "%PRODUCTNAME Spreadsheet" + tn = "%PRODUCTNAME Spreadsheet" +@@ -377,31 +339,25 @@ gl = "%PRODUCTNAME Spreadsheet" [calc-template] en = "%PRODUCTNAME Spreadsheet Template" de = "%PRODUCTNAME Tabellenvorlage" -pt = "%PRODUCTNAME Tabellenvorlage" --ru = "%PRODUCTNAME Tabellenvorlage" + ru = "Шаблон Ñлектронной таблицы %PRODUCTNAME" -el = "%PRODUCTNAME Tabellenvorlage" nl = "%PRODUCTNAME Werkbladsjabloon" fr = "Modèle de classeur %PRODUCTNAME" @@ -317,20 +329,20 @@ Index: sysui/desktop/share/documents.ulf ko = "%PRODUCTNAME ìŠ¤í”„ë ˆë“œì‹œíŠ¸ ì„œì‹ íŒŒì¼" zh-CN = "%PRODUCTNAME å·¥ä½œè¡¨æ ·å¼" zh-TW = "%PRODUCTNAME 工作表樣å¼" --tr = "%PRODUCTNAME Tabellenvorlage" + tr = "%PRODUCTNAME Hesap Tablosu Åžablonu" -ar = "%PRODUCTNAME Tabellenvorlage" -he = "%PRODUCTNAME Tabellenvorlage" -ca = "%PRODUCTNAME Tabellenvorlage" --th = "%PRODUCTNAME Tabellenvorlage" --hi-IN = "%PRODUCTNAME Tabellenvorlage" +ca = "Plantilla de fulla de cÃ| lcul d'%PRODUCTNAME" + th = "%PRODUCTNAME à¹à¸¡à¹ˆà¹à¸šà¸šà¸•à¸²à¸£à¸²à¸‡à¸„ำนวณ" +-hi-IN = "%PRODUCTNAME Tabellenvorlage" et = "%PRODUCTNAME-i arvutustabeli mall" sl = "Predloga preglednice programa %PRODUCTNAME" ns = "%PRODUCTNAME Template ya Pampiri ya go Anega" Index: sysui/desktop/share/launcher_comment.ulf =================================================================== ---- sysui/desktop/share/launcher_comment.ulf.orig 2004-07-30 21:43:44.479613424 +0200 -+++ sysui/desktop/share/launcher_comment.ulf 2004-07-30 22:29:34.378565240 +0200 +--- sysui/desktop/share/launcher_comment.ulf.orig 2004-09-13 22:50:54.000000000 +0200 ++++ sysui/desktop/share/launcher_comment.ulf 2004-09-14 15:46:59.390405776 +0200 @@ -1,12 +1,11 @@ [writer] en = "%PRODUCTNAME Text Document" @@ -346,28 +358,24 @@ Index: sysui/desktop/share/launcher_comment.ulf hu = "%PRODUCTNAME-szövegesdokumentum" it = "%PRODUCTNAME Documento di testo" cs = "Textový dokument %PRODUCTNAME" -@@ -21,26 +20,22 @@ zh-CN = "%PRODUCTNAME 文本文档" +@@ -21,10 +20,8 @@ zh-CN = "%PRODUCTNAME 文本文档" zh-TW = "%PRODUCTNAME æ–‡å—文件" tr = "PRODUCTNAME Metin belgesi" ar = "%PRODUCTNAME مستند نص" -he = "%PRODUCTNAME Textdokument" -ca = "%PRODUCTNAME Document de text" --th = "%PRODUCTNAME Textdokument" --hi-IN = "%PRODUCTNAME Textdokument" +ca = "Document de text d'%PRODUCTNAME" + th = "%PRODUCTNAME เà¸à¸à¸ªà¸²à¸£à¸‚้à¸à¸„วาม" +-hi-IN = "%PRODUCTNAME Textdokument" et = "%PRODUCTNAME-i tekstidokument" sl = "Dokument z besedilom programa %PRODUCTNAME" cy = "Dogfen Testun %PRODUCTNAME" - ns = "%PRODUCTNAME Tokumente ya Sengwalwa" - af = "%PRODUCTNAME-teksdokument" --zu = "Ushicilelo Lombhalo lwe-%PRODUCTNAME 5.0" -+zu = "Ushicilelo Lombhalo lwe-%PRODUCTNAME" - +@@ -42,12 +39,11 @@ gl = "%PRODUCTNAME Text Document" [web] en = "%PRODUCTNAME HTML Document" de = "%PRODUCTNAME HTML Dokument" -pt = "%PRODUCTNAME HTML Dokument" - ru = "%PRODUCTNAME HTML-документ" + ru = "Документ HTML %PRODUCTNAME" nl = "%PRODUCTNAME HTML-document" fr = "%PRODUCTNAME Document HTML" -es = "Documento HTML %PRODUCTNAME " @@ -377,26 +385,25 @@ Index: sysui/desktop/share/launcher_comment.ulf hu = "%PRODUCTNAME HTML-dokumentum" it = "%PRODUCTNAME Documento HTML" cs = "HTML dokument %PRODUCTNAME" -@@ -53,12 +48,7 @@ ja = "%PRODUCTNAME HTML å½¢å¼ãƒ‰ã‚ュã - ko = "%PRODUCTNAME HTML 문서" +@@ -61,11 +57,8 @@ ko = "%PRODUCTNAME HTML 문서" zh-CN = "%PRODUCTNAME HTML 文档" zh-TW = "%PRODUCTNAME HTML 文件" --tr = "%PRODUCTNAME HTML Dokument" + tr = "%PRODUCTNAME HTML Belgesi" -ar = "%PRODUCTNAME HTML Dokument" -he = "%PRODUCTNAME HTML Dokument" -ca = "%PRODUCTNAME HTML Dokument" --th = "%PRODUCTNAME HTML Dokument" --hi-IN = "%PRODUCTNAME HTML Dokument" +ca = "Document HTML d'%PRODUCTNAME" + th = "%PRODUCTNAME เà¸à¸à¸ªà¸²à¸£ HTML" +-hi-IN = "%PRODUCTNAME HTML Dokument" et = "%PRODUCTNAME-i HTML-dokument" - sl = "HTML dokument programa %PRODUCTNAME" + sl = "Dokument HTML programa %PRODUCTNAME" ns = "Tokumente ya HTML ya %PRODUCTNAME" -@@ -68,12 +58,11 @@ zu = "Ushicilelo lwe-%PRODUCTNAME HTML" +@@ -81,12 +74,11 @@ gl = "%PRODUCTNAME HTML Document" [impress] en = "%PRODUCTNAME Presentation" de = "%PRODUCTNAME Präsentation" -pt = "%PRODUCTNAME Präsentation" - ru = "%PRODUCTNAME ПрезентациÑ" + ru = "ÐŸÑ€ÐµÐ·ÐµÐ½Ñ‚Ð°Ñ†Ð¸Ñ %PRODUCTNAME" nl = "%PRODUCTNAME Presentatie" fr = "%PRODUCTNAME Présentation" -es = "Presentación %PRODUCTNAME " @@ -406,21 +413,31 @@ Index: sysui/desktop/share/launcher_comment.ulf hu = "%PRODUCTNAME-bemutató" it = "%PRODUCTNAME Presentazione" cs = "Prezentace %PRODUCTNAME" -@@ -85,12 +74,7 @@ ja = "%PRODUCTNAME プレゼンテーシ - ko = "%PRODUCTNAME í”„ë ˆì í…Œì´ì…˜" +@@ -99,16 +91,13 @@ ko = "%PRODUCTNAME í”„ë ˆì í…Œì´ì…˜" zh-CN = "%PRODUCTNAME 演示文稿" zh-TW = "%PRODUCTNAME ç°¡å ±" --tr = "%PRODUCTNAME Pr?sentation" + tr = "%PRODUCTNAME Sunu" -ar = "%PRODUCTNAME Pr?sentation" -he = "%PRODUCTNAME Präsentation" -ca = "%PRODUCTNAME Pr„sentation" --th = "%PRODUCTNAME Präsentation" --hi-IN = "%PRODUCTNAME Präsentation" +ca = "Presentació d'%PRODUCTNAME" + th = "%PRODUCTNAME à¸à¸²à¸£à¸™à¸³à¹€à¸ªà¸™à¸" +-hi-IN = "%PRODUCTNAME Präsentation" et = "%PRODUCTNAME-i esitlus" sl = "Predstavitev programa %PRODUCTNAME" ns = "TlhagiÅ¡o ya %PRODUCTNAME" -@@ -105,7 +89,7 @@ ru = "%PRODUCTNAME РиÑунок" + af = "%PRODUCTNAME-voorlegging" +-zu = "Ukunikezwa kolwazi kwe-%PRODUCTNAME 5.0" ++zu = "Ukunikezwa kolwazi kwe-%PRODUCTNAME" + da = "%PRODUCTNAME-præsentation" + nb = "%PRODUCTNAME Presentation" + nn = "%PRODUCTNAME Presentation" +@@ -120,12 +109,11 @@ gl = "%PRODUCTNAME Presentation" + [draw] + en = "%PRODUCTNAME Drawing" + de = "%PRODUCTNAME Zeichnung" +-pt = "%PRODUCTNAME Zeichnung" + ru = "РиÑунок %PRODUCTNAME" nl = "%PRODUCTNAME Tekening" fr = "%PRODUCTNAME Dessin" es = "Dibujo %PRODUCTNAME" @@ -429,21 +446,30 @@ Index: sysui/desktop/share/launcher_comment.ulf hu = "%PRODUCTNAME-rajz" it = "%PRODUCTNAME Disegno" cs = "Kresba %PRODUCTNAME" -@@ -121,7 +105,7 @@ zh-TW = "%PRODUCTNAME 繪圖" +@@ -140,15 +128,13 @@ zh-CN = "%PRODUCTNAME 绘图" + zh-TW = "%PRODUCTNAME 繪圖" tr = "%PRODUCTNAME Çizim" ar = "%PRODUCTNAME رسم" - he = "%PRODUCTNAME Zeichnung" +-he = "%PRODUCTNAME Zeichnung" -ca = "%PRODUCTNAME Dibuix" +ca = "Dibuix d'%PRODUCTNAME" - th = "%PRODUCTNAME Zeichnung" - hi-IN = "%PRODUCTNAME Zeichnung" + th = "%PRODUCTNAME รูปวาด" +-hi-IN = "%PRODUCTNAME Zeichnung" et = "%PRODUCTNAME-i joonistus" -@@ -133,12 +117,11 @@ zu = "Ukudweba nge-%PRODUCTNAME 5.0" + sl = "Risba programa %PRODUCTNAME" + ns = "Go thala ga %PRODUCTNAME" + af = "%PRODUCTNAME-voorlegging" +-zu = "Ukudweba nge-%PRODUCTNAME 5.0" ++zu = "Ukudweba nge-%PRODUCTNAME" + nb = "%PRODUCTNAME Drawing" + nn = "%PRODUCTNAME Drawing" + eu = "%PRODUCTNAME Zeichnung" +@@ -159,12 +145,11 @@ gl = "%PRODUCTNAME Drawing" [calc] en = "%PRODUCTNAME Spreadsheet" de = "%PRODUCTNAME Tabelle" -pt = "%PRODUCTNAME Tabelle" - ru = "%PRODUCTNAME ÐÐ»ÐµÐºÑ‚Ñ€Ð¾Ð½Ð½Ð°Ñ Ñ‚Ð°Ð±Ð»Ð¸Ñ†Ð°" + ru = "ÐÐ»ÐµÐºÑ‚Ñ€Ð¾Ð½Ð½Ð°Ñ Ñ‚Ð°Ð±Ð»Ð¸Ñ†Ð° %PRODUCTNAME" nl = "%PRODUCTNAME Tabel" fr = "%PRODUCTNAME Classeur" es = "Hoja de cálculo %PRODUCTNAME" @@ -452,25 +478,31 @@ Index: sysui/desktop/share/launcher_comment.ulf hu = "PRODUCTNAME-munkafüzet" it = "%PRODUCTNAME Tabella" cs = "SeÅ¡it %PRODUCTNAME" -@@ -152,11 +135,7 @@ ko = "%PRODUCTNAME ìŠ¤í”„ë ˆë“œì‹œíŠ¸" +@@ -178,16 +163,13 @@ ko = "%PRODUCTNAME ìŠ¤í”„ë ˆë“œì‹œíŠ¸" zh-CN = "%PRODUCTNAME 工作表" zh-TW = "%PRODUCTNAME 工作表" - tr = "%PRODUCTNAME Tablo" + tr = "%PRODUCTNAME Hesap Tablosu" -ar = "%PRODUCTNAME Tabelle" -he = "%PRODUCTNAME Tabelle" -ca = "%PRODUCTNAME Tabelle" --th = "%PRODUCTNAME Tabelle" --hi-IN = "%PRODUCTNAME Tabelle" +ca = "Fulla de cÃ| lcul d'%PRODUCTNAME" + th = "%PRODUCTNAME ตารางคำนวณ" +-hi-IN = "%PRODUCTNAME Tabelle" et = "%PRODUCTNAME-i arvutustabel" sl = "Preglednica programa %PRODUCTNAME" ns = "Pampiri ya go anega ya %PRODUCTNAME" -@@ -166,12 +145,11 @@ zu = "Ikhasi lokubala %PRODUCTNAME 6.0" + af = "%PRODUCTNAME-sigblad" +-zu = "Ikhasi lokubala %PRODUCTNAME 6.0" ++zu = "Ikhasi lokubala %PRODUCTNAME" + nb = "%PRODUCTNAME Spreadsheet" + nn = "%PRODUCTNAME Spreadsheet" + eu = "%PRODUCTNAME Tabelle" +@@ -198,12 +180,11 @@ gl = "%PRODUCTNAME Spreadsheet" [math] en = "%PRODUCTNAME Formula" de = "%PRODUCTNAME Formel" -pt = "%PRODUCTNAME Formel" - ru = "%PRODUCTNAME Формула" + ru = "Формула %PRODUCTNAME" nl = "%PRODUCTNAME Formule" fr = "%PRODUCTNAME Formule" es = "Fórmula %PRODUCTNAME " @@ -479,28 +511,35 @@ Index: sysui/desktop/share/launcher_comment.ulf hu = "%PRODUCTNAME-képlet" it = "%PRODUCTNAME Formula" cs = "Vzorec %PRODUCTNAME" -@@ -186,10 +164,7 @@ zh-CN = "%PRODUCTNAME å…¬å¼" +@@ -218,15 +199,13 @@ zh-CN = "%PRODUCTNAME å…¬å¼" zh-TW = "%PRODUCTNAME å…¬å¼" tr = "%PRODUCTNAME Formül" ar = "%PRODUCTNAME صيغة" -he = "%PRODUCTNAME Formel" -ca = "%PRODUCTNAME Formel" --th = "%PRODUCTNAME Formel" --hi-IN = "%PRODUCTNAME Formel" +ca = "Fòrmula d'%PRODUCTNAME" + th = "%PRODUCTNAME สมà¸à¸²à¸£" +-hi-IN = "%PRODUCTNAME Formel" et = "%PRODUCTNAME-i valem" sl = "Formula programa %PRODUCTNAME" ns = "Fomula ya %PRODUCTNAME" + af = "%PRODUCTNAME-formule" +-zu = "Indlela yokwenza ye-%PRODUCTNAME 5.0" ++zu = "Indlela yokwenza ye-%PRODUCTNAME" + nb = "%PRODUCTNAME Formula" + nn = "%PRODUCTNAME Formula" + eu = "%PRODUCTNAME Formel" Index: sysui/desktop/share/launcher_name.ulf =================================================================== ---- sysui/desktop/share/launcher_name.ulf.orig 2004-07-30 21:43:44.697580288 +0200 -+++ sysui/desktop/share/launcher_name.ulf 2004-07-30 22:29:21.309552032 +0200 -@@ -1,12 +1,11 @@ +--- sysui/desktop/share/launcher_name.ulf.orig 2004-09-13 22:50:54.000000000 +0200 ++++ sysui/desktop/share/launcher_name.ulf 2004-09-14 15:46:59.395405016 +0200 +@@ -1,13 +1,11 @@ [printeradmin] en = "%PRODUCTNAME Printer Administration" de = "%PRODUCTNAME Drucker Verwaltung" -pt = "%PRODUCTNAME Drucker Verwaltung" ru = "%PRODUCTNAME Управление принтером" +-el = "%PRODUCTNAME Drucker Verwaltung" nl = "%PRODUCTNAME printerbeheer" fr = "%PRODUCTNAME Gestion des imprimantes" -es = "Administración de la impresora de %PRODUCTNAME " @@ -510,25 +549,25 @@ Index: sysui/desktop/share/launcher_name.ulf hu = "%PRODUCTNAME Nyomtatókezelés" it = "%PRODUCTNAME Gestione stampanti" cs = "Administrace tiskáren %PRODUCTNAME" -@@ -20,11 +19,7 @@ ko = "%PRODUCTNAME 프린터 관리" - zh-CN = "%PRODUCTNAME 打å°æœºç®¡ç†" +@@ -22,10 +20,8 @@ zh-CN = "%PRODUCTNAME 打å°æœºç®¡ç†" zh-TW = "%PRODUCTNAME å°è¡¨æ©Ÿç®¡ç†" - tr = "%PRODUCTNAME Printer Administration" --ar = "%PRODUCTNAME Drucker Verwaltung" + tr = "%PRODUCTNAME Yazıcı Yönetimi" + ar = "مسئول طابعة %PRODUCTNAME" -he = "%PRODUCTNAME Drucker Verwaltung" -ca = "%PRODUCTNAME Drucker Verwaltung" --th = "%PRODUCTNAME Drucker Verwaltung" --hi-IN = "%PRODUCTNAME Drucker Verwaltung" +ca = "Administració d'impressó d'%PRODUCTNAME" + th = "%PRODUCTNAME ดูà¹à¸¥à¹€à¸„รื่à¸à¸‡à¸žà¸´à¸¡à¸žà¹Œ" +-hi-IN = "%PRODUCTNAME Drucker Verwaltung" et = "%PRODUCTNAME-i printerite haldamine" sl = "%PRODUCTNAME nastavitve tiskalnika" cy = "Gweinyddiad Argraffu %PRODUCTNAME" -@@ -35,12 +30,11 @@ zu = "%PRODUCTNAME Ukuphathwa komshicile +@@ -43,13 +39,12 @@ gl = "%PRODUCTNAME Printer Administratio [template] en = "%PRODUCTNAME From Template" de = "%PRODUCTNAME Aus Vorlage" -pt = "%PRODUCTNAME Aus Vorlage" - ru = "%PRODUCTNAME Из шаблона" + ru = "%PRODUCTNAME из шаблона..." + el = "%PRODUCTNAME Από Ï€Ïότυπο" nl = "%PRODUCTNAME Uit sjabloon" fr = "À partir d'un modèle %PRODUCTNAME" es = "A partir de una plantilla de %PRODUCTNAME" @@ -537,17 +576,16 @@ Index: sysui/desktop/share/launcher_name.ulf hu = "%PRODUCTNAME sablonból" it = "%PRODUCTNAME Da modello" cs = "Ze Å¡ablony %PRODUCTNAME" -@@ -53,12 +47,7 @@ ja = "%PRODUCTNAME テンプレート㋠- ko = "%PRODUCTNAME ì„œì‹ íŒŒì¼ë¡œë¶€í„°" +@@ -63,11 +58,8 @@ ko = "%PRODUCTNAME ì„œì‹ íŒŒì¼ë¡œë¶€í„ zh-CN = "%PRODUCTNAME é‡‡ç”¨æ ·å¼" zh-TW = "%PRODUCTNAME 採用樣å¼" --tr = "%PRODUCTNAME Aus Vorlage" + tr = "%PRODUCTNAME Åžablondan" -ar = "%PRODUCTNAME Aus Vorlage" -he = "%PRODUCTNAME Aus Vorlage" -ca = "%PRODUCTNAME Aus Vorlage" --th = "%PRODUCTNAME Aus Vorlage" --hi-IN = "%PRODUCTNAME Aus Vorlage" +ca = "Des d'una plantilla d'%PRODUCTNAME" + th = "%PRODUCTNAME จาà¸à¹à¸¡à¹ˆà¹à¸šà¸š" +-hi-IN = "%PRODUCTNAME Aus Vorlage" et = "%PRODUCTNAME mallist" sl = "%PRODUCTNAME iz predloge" ns = "%PRODUCTNAME go tÅ¡wa go Template" diff --git a/patches/OOO_1_1/win32-build-fixes-1-1-3.diff b/patches/OOO_1_1/win32-build-fixes-1-1-3.diff new file mode 100644 index 000000000..ce296e7aa --- /dev/null +++ b/patches/OOO_1_1/win32-build-fixes-1-1-3.diff @@ -0,0 +1,23 @@ +--- stlport/win32_custom.sh.bak 2004-10-21 17:13:18.218750000 +0530 ++++ stlport/win32_custom.sh 2004-10-21 15:03:01.718750000 +0530 +@@ -3,6 +3,8 @@ + #rem - path to unpacked tarball + #rem - relative path back to module root + ++/usr/bin/dos2unix.exe ./wntmsci9.pro/misc/build/STLport-4.0/src/vc_common.mak ++ + cd $1 + + patch -i $2/dos_lineends.patch -b -p2 +--- solenv/inc/tg_ext.mk.bak 2004-10-28 14:40:56.671875000 +0530 ++++ solenv/inc/tg_ext.mk 2004-10-28 14:47:41.531250000 +0530 +@@ -176,6 +176,9 @@ + @+-$(MKDIR) $(PACKAGE_DIR) + +cd $(PACKAGE_DIR) && ( $(shell +$(TYPE) $(PRJ)$/$(ROUT)$/misc$/$(TARFILE_NAME).unpack)) && $(TOUCH) $(UNTAR_FLAG_FILE) + @+echo make writeable... ++.IF "$(TARFILE_NAME)"=="curl-7.9.8" ++ @+/usr/bin/dos2unix.exe $(PACKAGE_DIR)/curl-7.9.8/lib/Makefile.vc6 ++.ENDIF + .IF "$(GUI)"=="UNX" || "$(USE_SHELL)"!="4nt" + @+cd $(PACKAGE_DIR) && chmod -R +rw * && $(TOUCH) $(UNTAR_FLAG_FILE) + @+cd $(PACKAGE_DIR) && find . -type d -exec chmod a+x {{}} \; diff --git a/patches/OOO_1_1/win32-gw-send-mail.diff b/patches/OOO_1_1/win32-gw-send-mail.diff index d3e8c71ee..ae9322ac9 100755 --- a/patches/OOO_1_1/win32-gw-send-mail.diff +++ b/patches/OOO_1_1/win32-gw-send-mail.diff @@ -10,7 +10,7 @@ - aSysPath.getLength( ), - osl_getThreadTextEncoding( ) ) ); - -+ OString aFullPath = OUStringToOString( aSysPath, ++ OString aFullPath = ::rtl::OUStringToOString( aSysPath, + osl_getThreadTextEncoding() ); + sal_Int32 nLastSlash = aFullPath.lastIndexOf('\\'); + OString aFileName = aFullPath.copy( nLastSlash + 1 ); diff --git a/patches/OOO_1_1/win32-msvs-2003-misc.diff b/patches/OOO_1_1/win32-msvs-2003-misc.diff index 179bf20da..5c4c8890b 100644 --- a/patches/OOO_1_1/win32-msvs-2003-misc.diff +++ b/patches/OOO_1_1/win32-msvs-2003-misc.diff @@ -21,43 +21,10 @@ retrieving revision 1.4.10.1 diff -u -p -u -w -r1.4.10.1 boost_1_27_0.patch --- boost/boost_1_27_0.patch 15 Aug 2003 11:47:26 -0000 1.4.10.1 +++ boost/boost_1_27_0.patch 1 Apr 2004 22:44:43 -0000 -@@ -1,21 +1,66 @@ ----- misc/boost_1_27_0/boost/config/compiler/gcc.hpp --+++ misc/build/boost_1_27_0/boost/config/compiler/gcc.hpp --@@ -49,10 +49,10 @@ -+*** misc/boost_1_27_0/boost/config/compiler/gcc.hpp Thu Feb 7 16:26:06 2002 -+--- misc/build/boost_1_27_0/boost/config/compiler/gcc.hpp Mon Sep 15 13:00:28 2003 -+*************** -+*** 49,58 **** -+ # error "Compiler not configured - please reconfigure" -+ #endif -+ // -+! // last known and checked version is 3.1: -+! #if (__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ > 1)) -+ # if defined(BOOST_ASSERT_CONFIG) -+! # error "Unknown compiler version - please run the configure tests and report the results" -+ # else -+ # warning "Unknown compiler version - please run the configure tests and report the results" -+ # endif -+--- 49,58 ---- - # error "Compiler not configured - please reconfigure" - #endif - // ---// last known and checked version is 3.1: ---#if (__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ > 1)) --+// last known and checked version is 3.3: --+#if (__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ > 3)) -+! // last known and checked version is 3.3: -+! #if (__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ > 3)) - # if defined(BOOST_ASSERT_CONFIG) ---# error "Unknown compiler version - please run the configure tests and report the results" --+# error "Unknown / untested compiler version - please run the configure tests and report the results" -+! # error "Unknown / untested compiler version - please run the configure tests and report the results" - # else - # warning "Unknown compiler version - please run the configure tests and report the results" - # endif --*** misc/boost_1_27_0/boost/config/user.hpp Thu Feb 7 10:26:05 2002 ----- misc/build/boost_1_27_0/boost/config/user.hpp Fri Apr 11 17:50:51 2003 +@@ -23,6 +23,42 @@ + # else + # warning "Unknown compiler version - please run the configure tests and report the results" + # endif +*** misc/boost_1_27_0/boost/config/compiler/visualc.hpp Thu Feb 7 16:26:08 2002 +--- misc/build/boost_1_27_0/boost/config/compiler/visualc.hpp Mon Sep 15 13:01:38 2003 +*************** @@ -94,11 +61,9 @@ diff -u -p -u -w -r1.4.10.1 boost_1_27_0.patch + # if defined(BOOST_ASSERT_CONFIG) + # error "Unknown compiler version - please run the configure tests and report the results" + # else -+*** misc/boost_1_27_0/boost/config/user.hpp Thu Feb 7 16:26:05 2002 -+--- misc/build/boost_1_27_0/boost/config/user.hpp Mon Sep 15 13:00:28 2003 + *** misc/boost_1_27_0/boost/config/user.hpp 2002-02-07 16:26:05.000000000 +0100 + --- misc/build/boost_1_27_0/boost/config/user.hpp 2004-10-04 19:33:26.631731992 +0200 *************** - *** 56,58 **** - --- 56,68 ---- Index: configmgr/source/api2/apiaccessobj.hxx =================================================================== RCS file: /cvs/util/configmgr/source/api2/apiaccessobj.hxx,v @@ -674,39 +639,6 @@ diff -u -p -u -w -r1.62.20.1 makefile.mk DOCUSTUDIO4INTEGRATIONHTMLFILES= \ $(DESTDIRDOCU)$/DevStudioWizards$/CalcAddinWizard.html \ -@@ -238,7 +239,10 @@ INSTALLSCRIPT= \ - $(DESTDIR)$/setsdkenv_windows.bat - .ENDIF - --DIR_FILE_LIST=\ -+#-------------------------------------------------- -+# TARGETS -+#-------------------------------------------------- -+all : \ - $(EXELIST) \ - $(XMLLIST) \ - $(SDKDLLLIST) \ -@@ -251,19 +255,9 @@ DIR_FILE_LIST=\ - $(DESTDIRDOCU)$/common$/spec$/xml_format$/xml_specification.pdf - # $(DESTDIRCLASSES)$/oosupport.nbm \ - --DIR_DIRECTORY_LIST=$(uniq $(DIR_FILE_LIST:d)) --DIR_CREATE_FLAG=$(MISC)$/copying_dirs_created.txt --DIR_FILE_FLAG=$(MISC)$/copying_files.txt -- --#-------------------------------------------------- --# TARGETS --#-------------------------------------------------- --all : \ -- $(DIR_FILE_LIST) \ -- $(DIR_FILE_FLAG) -- - #-------------------------------------------------- - # use global rules - #-------------------------------------------------- - .INCLUDE: $(PRJ)$/util$/odk_rules.pmk - -+ Index: python/makefile.mk =================================================================== RCS file: /cvs/external/python/makefile.mk,v diff --git a/patches/OOO_1_1/word-count.diff b/patches/OOO_1_1/word-count.diff index 4f3040435..953e0ca18 100644 --- a/patches/OOO_1_1/word-count.diff +++ b/patches/OOO_1_1/word-count.diff @@ -57,7 +57,7 @@ retrieving revision 1.109 diff -u -p -u -r1.109 swslots.src --- sw/sdi/swslots.src 17 Jul 2003 11:48:28 -0000 1.109 +++ sw/sdi/swslots.src 31 Jul 2003 17:01:27 -0000 -@@ -3685,6 +3685,55 @@ SfxSlotInfo FN_HYPHENATE_OPT_DLG +@@ -3685,6 +3685,56 @@ SfxSlotInfo FN_HYPHENATE_OPT_DLG SlotName[ hindi ] = "हाइफनेशन"; SlotName[ slovak ] = "Delenie slov"; }; @@ -95,6 +95,7 @@ diff -u -p -u -r1.109 swslots.src + SlotName[ thai ] = "Word count"; + SlotName[ hebrew ] = "Word count"; + SlotName[ estonian ] = "Word count"; ++ SlotName[ lithuanian ] = "Dokumento statistika"; +/* --: "Word count" translations + az: "KÉ™lmÉ™ Miqdarı" + bs: "Zbir rijeÄi" @@ -138,93 +139,69 @@ Index: sw/source/ui/inc/swmn.hrc RCS file: /cvs/sw/sw/source/ui/inc/swmn.hrc,v retrieving revision 1.133 diff --context=15 -c -r1.133 swmn.hrc -*** sw/source/ui/inc/swmn.hrc.orig 2004-09-22 09:41:21.000000000 -0400 ---- sw/source/ui/inc/swmn.hrc 2004-09-23 09:09:01.214282641 -0400 -*************** -*** 9189,9218 **** ---- 9189,9270 ---- - Text[ extern ] = "~Hyphenation..."; - Text[ thai ] = "ใ~ช้ยัติภังค์..."; - Text[ czech ] = "DÄ›lenà slov..."; - Text[ hebrew ] = "שבירת מלי×..."; - Text[ hindi ] = "~हाइफनेशन..."; - Text[ slovak ] = "~Delenie slov..."; - Text[ hungarian ] = "~Elválasztás..."; - Text[ slovenian ] = "~Deljenje besed..."; - Text[ estonian ] = "~Poolitus..."; - Text[ welsh ] = "~Cyplysnodi..."; - Text[ northernsotho ] = "~Morathofatso..."; - Text[ afrikaans ] = "~Woordafbreking..."; - Text[ zulu ] = "~Ukwahlukaniswa kwamagama..."; - Text[ norwegian_nynorsk ] = "Orddeli~ng ..."; - }; -+ MenuItem -+ { -+ Identifier = FN_WORD_COUNT_DLG ; -+ HelpID = FN_WORD_COUNT_DLG ; -+ Text = "Wörter zählen..." ; -+ Text [ arabic ] = "ÅÍÕÇÆíÇÊ..."; -+ Text [ english ] = "Word count..."; -+ Text [ english_us ] = "Word count..."; -+ Text [ catalan ] = "Comptador de paraules..."; -+ Text [ czech ] = "PoÄet slov..."; -+ Text [ danish ] = "Ordoptælling..."; -+ Text [ greek ] = "Áñßèìçóç ËÝîåùí"; -+ Text [ spanish ] = "Contar palabras..."; -+ Text [ estonian ] = "Sõnade arv..."; -+ Text [ finnish ] = "Laske sanat..."; -+ Text [ french ] = "Statistiques..."; -+ Text [ hindi ] = "शबà¥à¤¦ गिनें..."; -+ Text [ italian ] = "Statistiche..."; -+ Text [ hungarian ] = "Szavak száma..."; -+ Text [ japanese ] = "ワードカウント..."; -+ Text [ korean ] = "통계..."; -+ Text [ norwegian ] = "Ordtelling..."; -+ Text [ dutch ] = "Woorden tellen..."; -+ Text [ polish ] = "Liczba s³ów..."; -+ Text [ portuguese ] = "Contagem palavras..."; -+ Text [ portuguese_brazilian ] = "Contagem palavras..."; -+ Text [ russian ] = "Êîëè÷åñòâî ñëîâ"; -+ Text [ slovak ] = "PoÄet slov..."; -+ Text [ swedish ] = "Ordräkning..."; -+ Text [ turkish ] = "Ýstatistik..."; -+ Text [ chinese_simplified ] = "统计..."; -+ Text [ chinese_traditional ] = "統計..."; -+ Text [ slovenian ] = "Å tevilo besed"; -+ Text [ thai ] = "Word count..."; -+ Text [ hebrew ] = "Word count..."; -+ Text [ estonian ] = "Word count..."; -+ /* --: "Word count" translations -+ az: "KÉ™lmÉ™ Miqdarı" -+ bs: "Zbir rijeÄi" -+ cy: "Cyfrif geiriau" -+ eu: "Hitz kopurua" -+ mk: "Броење на зборови" -+ mt: "Għadd ta’ kliem" -+ ro: "Numără cuvintele" -+ sl: "Å tevilo besed" -+ sq: "Llogariti fjalët" -+ ta: "சொல௠எணà¯à®£à®¿" -+ uk: "КількіÑÑ‚ÑŒ Ñлів" -+ vi: "Äếm từ" -+ wa: "Contaedje des mots" -+ */ -+ }; - #endif - SEPARATOR ; - MenuItem - { - Identifier = SID_AUTO_CORRECT_DLG; - HelpID = SID_AUTO_CORRECT_DLG; - Text = "~AutoKorrektur/AutoFormat..." ; - Text [ English ] = "~AutoCorrect/AutoFormat..." ; - Text [ portuguese ] = "~AutoCorrecção/AutoFormato..." ; - Text [ english_us ] = "~AutoCorrect/AutoFormat..." ; - Text [ portuguese_brazilian ] = "~AutoCorreção/AutoFormatação..." ; - Text [ swedish ] = "~AutoKorrigering/AutoFormat..." ; - Text [ danish ] = "~AutoKorrektur/AutoFormat..." ; - Text [ italian ] = "Correzione/Formattazione a~utomatica..." ; - Text [ spanish ] = "~Corrección/Formateado automático..." ; +--- sw/source/ui/inc/swmn.hrc.orig 2004-09-22 09:41:21.000000000 -0400 ++++ sw/source/ui/inc/swmn.hrc 2004-09-23 09:09:01.214282641 -0400 +@@ -9189,6 +9189,59 @@ ++ MenuItem ++ { ++ Identifier = FN_WORD_COUNT_DLG ; ++ HelpID = FN_WORD_COUNT_DLG ; ++ Text = "Wörter zählen..." ; ++ Text [ arabic ] = "ÅÍÕÇÆíÇÊ..."; ++ Text [ english ] = "Word count..."; ++ Text [ english_us ] = "Word count..."; ++ Text [ catalan ] = "Comptador de paraules..."; ++ Text [ czech ] = "PoÄet slov..."; ++ Text [ danish ] = "Ordoptælling..."; ++ Text [ greek ] = "Áñßèìçóç ËÝîåùí"; ++ Text [ spanish ] = "Contar palabras..."; ++ Text [ estonian ] = "Sõnade arv..."; ++ Text [ finnish ] = "Laske sanat..."; ++ Text [ french ] = "Statistiques..."; ++ Text [ hindi ] = "शबà¥à¤¦ गिनें..."; ++ Text [ italian ] = "Statistiche..."; ++ Text [ hungarian ] = "Szavak száma..."; ++ Text [ japanese ] = "ワードカウント..."; ++ Text [ korean ] = "통계..."; ++ Text [ norwegian ] = "Ordtelling..."; ++ Text [ dutch ] = "Woorden tellen..."; ++ Text [ polish ] = "Liczba s³ów..."; ++ Text [ portuguese ] = "Contagem palavras..."; ++ Text [ portuguese_brazilian ] = "Contagem palavras..."; ++ Text [ russian ] = "Êîëè÷åñòâî ñëîâ"; ++ Text [ slovak ] = "PoÄet slov..."; ++ Text [ swedish ] = "Ordräkning..."; ++ Text [ turkish ] = "Ýstatistik..."; ++ Text [ chinese_simplified ] = "统计..."; ++ Text [ chinese_traditional ] = "統計..."; ++ Text [ slovenian ] = "Å tevilo besed"; ++ Text [ thai ] = "Word count..."; ++ Text [ hebrew ] = "Word count..."; ++ Text [ estonian ] = "Word count..."; ++ Text [ lithuanian ] = "Dokumento ~statistika..."; ++/* --: "Word count" translations ++ az: "KÉ™lmÉ™ Miqdarı" ++ bs: "Zbir rijeÄi" ++ cy: "Cyfrif geiriau" ++ eu: "Hitz kopurua" ++ mk: "Броење на зборови" ++ mt: "Għadd ta’ kliem" ++ ro: "Numără cuvintele" ++ sl: "Å tevilo besed" ++ sq: "Llogariti fjalët" ++ ta: "சொல௠எணà¯à®£à®¿" ++ uk: "КількіÑÑ‚ÑŒ Ñлів" ++ vi: "Äếm từ" ++ wa: "Contaedje des mots" ++*/ ++ }; + #endif + SEPARATOR ; + MenuItem + { +- Identifier = SID_AUTO_CORRECT_DLG; ++ Identifier = SID_AUTO_CORRECT_DLG; /* foo */ + HelpID = SID_AUTO_CORRECT_DLG; Index: sw/source/ui/uiview/viewling.cxx =================================================================== RCS file: /cvs/sw/sw/source/ui/uiview/viewling.cxx,v diff --git a/patches/OOO_1_1_2/apply b/patches/OOO_1_1_2/apply index 57edf4b01..88cc166b4 100644 --- a/patches/OOO_1_1_2/apply +++ b/patches/OOO_1_1_2/apply @@ -751,6 +751,20 @@ sc-merge-cell.diff # Precision improvements - #22811 sc-precision-var.diff sc-precision-skew.diff +# adds to Autofilter Empty-NonEmpty options bxc #62165 Issue#35578 +sc-autofilter-empty-nonempty.diff +# Improves the standard filter options and menu. bxc #62187 #62495 Issue#35579 +sc-standard-filter-options.diff +# Paste just to clip size bxc #62158 Issue#35580 +sc-paste-limitedsize.diff +# Hides the filtered rows when height of rows are changed bxc #62161 Issue#35581 +sc-filter-hide-filteredrows.diff +# allows not to delete nonfiltered rows while deleting filtered ones bxc #62186 Issue#35582 +sc-no-delete-filteredrows.diff +# Auto Fill doesnt fill filtered rows bxc # FIXME (find bug id in bxc and issuezilla) +sc-filters-fill-fix.diff +# Paste of cells automatically insert rows. bxc # FIXME (find bug id in bxc and issuezilla) +sc-paste-insert-rows.diff [ VBABits ] diff --git a/patches/OOO_1_1_2/gui-toolbox-large-icons.diff b/patches/OOO_1_1_2/gui-toolbox-large-icons.diff new file mode 100644 index 000000000..3e8c9eed7 --- /dev/null +++ b/patches/OOO_1_1_2/gui-toolbox-large-icons.diff @@ -0,0 +1,86 @@ +Index: registry/schema/org/openoffice/Office/Common.xcs +=================================================================== +RCS file: /cvs/util/officecfg/registry/schema/org/openoffice/Office/Common.xcs,v +retrieving revision 1.84.8.5 +diff -u -r1.84.8.5 Common.xcs +--- officecfg/registry/schema/org/openoffice/Office/Common.xcs 27 Apr 2004 16:35:22 -0000 1.84.8.5 ++++ officecfg/registry/schema/org/openoffice/Office/Common.xcs 8 Jun 2004 23:01:08 -0000 +@@ -28992,41 +28992,46 @@ + </enumeration> + <enumeration oor:value="1"> + <info> +- <desc xml:lang="en-US">32x32 pixel icons</desc> +- <desc xml:lang="el">32x32 pixel icons</desc> +- <desc xml:lang="nl">32x32 pixel iconen</desc> +- <desc xml:lang="fr">32x32 pixel icons</desc> +- <desc xml:lang="fi">32x32 pixel icons</desc> +- <desc xml:lang="cs">32x32 pixel icons</desc> +- <desc xml:lang="da">32x32 pixel icons</desc> +- <desc xml:lang="zh-CN">32x32 åƒç´ å›¾æ ‡</desc> +- <desc xml:lang="zh-TW">32x32 pixel icons</desc> +- <desc xml:lang="ar">32x32 pixel icons</desc> +- <desc xml:lang="he">32x32 pixel icons</desc> +- <desc xml:lang="ca">32x32 pixel icons</desc> +- <desc xml:lang="hi-IN">32x32 pixel icons</desc> +- <desc xml:lang="pt">32x32 pixel icons</desc> +- <desc xml:lang="ru">32x32 pixel icons</desc> +- <desc xml:lang="es">32x32 pixel icons</desc> +- <desc xml:lang="it">32x32 pixel icons</desc> +- <desc xml:lang="sk">32x32 pixel icons</desc> +- <desc xml:lang="sv">32x32 pixel icons</desc> +- <desc xml:lang="pl">32x32 pixel icons</desc> +- <desc xml:lang="pt-BR">32x32 pixel icons</desc> +- <desc xml:lang="ja">32×32 ピクセルアイコン</desc> +- <desc xml:lang="ko">32x32 pixel icons</desc> +- <desc xml:lang="tr">32x32 pixel icons</desc> +- <desc xml:lang="th">32x32 pixel icons</desc> +- <desc xml:lang="x-comment">32x32 pixel icons</desc> +- <desc xml:lang="hu">32x32 pixel icons</desc> +- <desc xml:lang="sl">32x32 pixel icons</desc> +- <desc xml:lang="ns">32x32 pixel icons</desc> +- <desc xml:lang="af">32x32 pixel icons</desc> +- <desc xml:lang="zu">32x32 pixel icons</desc> ++ <desc xml:lang="en-US">24x24 pixel icons</desc> ++ <desc xml:lang="el">24x24 pixel icons</desc> ++ <desc xml:lang="nl">24x24 pixel iconen</desc> ++ <desc xml:lang="fr">24x24 pixel icons</desc> ++ <desc xml:lang="fi">24x24 pixel icons</desc> ++ <desc xml:lang="cs">24x24 pixel icons</desc> ++ <desc xml:lang="da">24x24 pixel icons</desc> ++ <desc xml:lang="zh-CN">24x24 åƒç´ å›¾æ ‡</desc> ++ <desc xml:lang="zh-TW">24x24 pixel icons</desc> ++ <desc xml:lang="ar">24x24 pixel icons</desc> ++ <desc xml:lang="he">24x24 pixel icons</desc> ++ <desc xml:lang="ca">24x24 pixel icons</desc> ++ <desc xml:lang="hi-IN">24x24 pixel icons</desc> ++ <desc xml:lang="pt">24x24 pixel icons</desc> ++ <desc xml:lang="ru">24x24 pixel icons</desc> ++ <desc xml:lang="es">24x24 pixel icons</desc> ++ <desc xml:lang="it">24x24 pixel icons</desc> ++ <desc xml:lang="sk">24x24 pixel icons</desc> ++ <desc xml:lang="sv">24x24 pixel icons</desc> ++ <desc xml:lang="pl">24x24 pixel icons</desc> ++ <desc xml:lang="pt-BR">24x24 pixel icons</desc> ++ <desc xml:lang="ja">24×24 ピクセルアイコン</desc> ++ <desc xml:lang="ko">24x24 pixel icons</desc> ++ <desc xml:lang="tr">24x24 pixel icons</desc> ++ <desc xml:lang="th">24x24 pixel icons</desc> ++ <desc xml:lang="x-comment">24x24 pixel icons</desc> ++ <desc xml:lang="hu">24x24 pixel icons</desc> ++ <desc xml:lang="sl">24x24 pixel icons</desc> ++ <desc xml:lang="ns">24x24 pixel icons</desc> ++ <desc xml:lang="af">24x24 pixel icons</desc> ++ <desc xml:lang="zu">24x24 pixel icons</desc> ++ </info> ++ </enumeration> ++ <enumeration oor:value="2"> ++ <info> ++ <desc xml:lang="en-US">automatic icon sizing</desc> + </info> + </enumeration> + </constraints> +- <value>0</value> ++ <value>1</value> + </prop> + <prop oor:name="ToolboxStyle" oor:type="xs:short"> + <!-- UIHints: Tools Options General View --> diff --git a/patches/OOO_1_1_2/iiimf-multilingual-extension-2-enable.diff b/patches/OOO_1_1_2/iiimf-multilingual-extension-2-enable.diff new file mode 100644 index 000000000..54aa303c5 --- /dev/null +++ b/patches/OOO_1_1_2/iiimf-multilingual-extension-2-enable.diff @@ -0,0 +1,57 @@ +--- vcl/unx/inc/XIM.h 18 Sep 2000 17:05:40 -0000 1.1.1.1 ++++ vcl/unx/inc/XIM.h 24 Feb 2004 02:38:04 -0000 +@@ -155,6 +155,8 @@ + /* XIM attributes for multilingual IM extension */ + #define XNMultiLingualInput "multiLingualInput" + #define XNQueryUnicodeCharacterSubset "unicodeCharacterSubset" ++#define XNQueryExtensionVersion "queryExtensionersion" ++#define XIIIMP_MULTILINGUAL_EXTENSION_VERSION 2 + + /* XIC attributes for multilingual IM extension */ + +--- vcl/unx/source/app/i18n_ic.cxx 2 Jul 2003 13:40:36 -0000 1.26 ++++ vcl/unx/source/app/i18n_ic.cxx 24 Feb 2004 02:38:04 -0000 +@@ -200,11 +200,9 @@ + ), + mpFocusFrame( NULL ) + { +-#ifdef SOLARIS + static const char* pIIIMPEnable = getenv( "SAL_DISABLE_OWN_IM_STATUS" ); + if( pIIIMPEnable && *pIIIMPEnable ) + mnSupportedStatusStyle &= ~XIMStatusCallbacks; +-#endif + + maClientData.aText.pUnicodeBuffer = NULL; + maClientData.aText.pCharStyle = NULL; +--- vcl/unx/source/app/i18n_im.cxx 28 Jan 2004 15:23:17 -0000 1.23.110.2 ++++ vcl/unx/source/app/i18n_im.cxx 24 Feb 2004 02:38:04 -0000 +@@ -438,11 +438,16 @@ + // get ml-input flag from input-method + if ( maMethod == (XIM)NULL ) + mbMultiLingual = False; +-#if !defined(LINUX) + else +- if ( XGetIMValues(maMethod, +- XNMultiLingualInput, &mbMultiLingual, NULL ) != NULL ) ++ { ++ int xiiimp_version = 1; ++ if ( XGetIMValues(maMethod, ++ XNQueryExtensionVersion, &xiiimp_version, NULL) != NULL || xiiimp_version < XIIIMP_MULTILINGUAL_EXTENSION_VERSION) + mbMultiLingual = False; ++ if ( XGetIMValues(maMethod, ++ XNMultiLingualInput, &mbMultiLingual, NULL ) != NULL ) ++ mbMultiLingual = False; ++ } + if( mbMultiLingual ) + { + XIMUnicodeCharacterSubsets* subsets; +@@ -470,9 +475,6 @@ + fprintf( stderr, "query subsets failed\n" ); + #endif + } +-#else +- mbMultiLingual = False; +-#endif + } + else + { diff --git a/patches/OOO_1_1_2/print-resolution-generic.diff b/patches/OOO_1_1_2/print-resolution-generic.diff new file mode 100644 index 000000000..dba4f5467 --- /dev/null +++ b/patches/OOO_1_1_2/print-resolution-generic.diff @@ -0,0 +1,269 @@ +--- psprint_config/configuration/ppds/SGENPRT.PS ++++ psprint_config/configuration/ppds/SGENPRT.PS +@@ -81,26 +81,18 @@ + + *% ===== Resolution ===== + +-*OpenUI *Resolution: PickOne ++*OpenUI *Resolution/Image Rendering Resolution: PickOne + *OrderDependency: 50 AnySetup *Resolution +-*DefaultResolution: 300dpi +-*Resolution 72dpi: "1 dict dup /HWResolution [72 72] put setpagedevice" +-*Resolution 144dpi: "1 dict dup /HWResolution [144 144] put setpagedevice" +-*Resolution 300dpi: "1 dict dup /HWResolution [300 300] put setpagedevice" +-*Resolution 360dpi: "1 dict dup /HWResolution [360 360] put setpagedevice" +-*Resolution 600dpi: "1 dict dup /HWResolution [600 600] put setpagedevice" +-*Resolution 720dpi: "1 dict dup /HWResolution [720 720] put setpagedevice" +-*Resolution 1200dpi: "1 dict dup /HWResolution [1200 1200] put setpagedevice" +-*Resolution 1440dpi: "1 dict dup /HWResolution [1440 1440] put setpagedevice" +-*Resolution 2400dpi: "1 dict dup /HWResolution [2400 2400] put setpagedevice" +-*?Resolution: " +- save +- currentpagedevice /HWResolution get +- 0 get +- ( ) cvs print (dpi) = flush +- restore +-" +-*End ++*DefaultResolution: 600dpi ++*Resolution 72dpi: "" ++*Resolution 144dpi: "" ++*Resolution 300dpi: "" ++*Resolution 360dpi: "" ++*Resolution 600dpi: "" ++*Resolution 720dpi: "" ++*Resolution 1200dpi: "" ++*Resolution 1440dpi: "" ++*Resolution 2400dpi: "" + *CloseUI: *Resolution + + *ResScreenFreq 72dpi: "60.0" +@@ -154,124 +146,78 @@ + + *% ===== Paper ===== + +-*OpenUI *PageSize: PickOne ++*OpenUI *PageSize/Document Page Size: PickOne + *OrderDependency: 30 AnySetup *PageSize + *DefaultPageSize: Letter +-*PageSize A0: "<</PageSize [2384 3370] /ImagingBBox null>> setpagedevice" +-*PageSize A1: "<</PageSize [1684 2384] /ImagingBBox null>> setpagedevice" +-*PageSize A2: "<</PageSize [1191 1684] /ImagingBBox null>> setpagedevice" +-*PageSize A3: "<</PageSize [842 1191] /ImagingBBox null>> setpagedevice" +-*PageSize A4: "<</PageSize [595 842] /ImagingBBox null>> setpagedevice" +-*PageSize A5: "<</PageSize [420 595] /ImagingBBox null>> setpagedevice" +-*PageSize A6: "<</PageSize [297 420] /ImagingBBox null>> setpagedevice" +-*PageSize B4: "<</PageSize [728 1032] /ImagingBBox null>> setpagedevice" +-*PageSize B5: "<</PageSize [516 729] /ImagingBBox null>> setpagedevice" +-*PageSize B6: "<</PageSize [363 516] /ImagingBBox null>> setpagedevice" +-*PageSize Legal/US Legal: "<</PageSize [612 1008] /ImagingBBox null>> setpagedevice" +-*PageSize Letter/US Letter: "<</PageSize [612 792] /ImagingBBox null>> setpagedevice" +-*PageSize Executive: "<</PageSize [522 756] /ImagingBBox null>> setpagedevice" +-*PageSize Statement: "<</PageSize [396 612] /ImagingBBox null>> setpagedevice" +-*PageSize Tabloid/US Tabloid: "<</PageSize [792 1224] /ImagingBBox null>> setpagedevice" +-*PageSize Ledger/Ledger Landscape: "<</PageSize [1224 792] /ImagingBBox null>> setpagedevice" +-*PageSize AnsiC/US C: "<</PageSize [1224 1584] /ImagingBBox null>> setpagedevice" +-*PageSize AnsiD/US D: "<</PageSize [1584 2448] /ImagingBBox null>> setpagedevice" +-*PageSize AnsiE/US E: "<</PageSize [2448 3168] /ImagingBBox null>> setpagedevice" +-*PageSize ARCHA/ARCH A: "<</PageSize [648 864] /ImagingBBox null>> setpagedevice" +-*PageSize ARCHB/ARCH B: "<</PageSize [864 1296] /ImagingBBox null>> setpagedevice" +-*PageSize ARCHC/ARCH C: "<</PageSize [1296 1728] /ImagingBBox null>> setpagedevice" +-*PageSize ARCHD/ARCH D: "<</PageSize [1728 2592] /ImagingBBox null>> setpagedevice" +-*PageSize ARCHE/ARCH E: "<</PageSize [2592 3456] /ImagingBBox null>> setpagedevice" +-*PageSize EnvMonarch/Monarch Envelope: "<</PageSize [279 540] /ImagingBBox null>> setpagedevice" +-*PageSize EnvDL/DL Envelope: "<</PageSize [312 624] /ImagingBBox null>> setpagedevice" +-*PageSize EnvC4/C4 Envelope: "<</PageSize [649 918] /ImagingBBox null>> setpagedevice" +-*PageSize EnvC5/C5 Envelope: "<</PageSize [459 649] /ImagingBBox null>> setpagedevice" +-*PageSize EnvC6/C6 Envelope: "<</PageSize [323 459] /ImagingBBox null>> setpagedevice" +-*PageSize Env10/C10 Envelope: "<</PageSize [297 684] /ImagingBBox null>> setpagedevice" +-*PageSize EnvC65/C65 Envelope: "<</PageSize [324 648] /ImagingBBox null>> setpagedevice" +-*PageSize Folio: "<</PageSize [595 935] /ImagingBBox null>> setpagedevice" +-*?PageSize: " +- save +- currentpagedevice /PageSize get aload pop +- 2 copy gt {exch} if +- (Unknown) +- 32 dict +- dup [2384 3370] (A0) put +- dup [1684 2384] (A1) put +- dup [1191 1684] (A2) put +- dup [842 1191] (A3) put +- dup [595 842] (A4) put +- dup [420 595] (A5) put +- dup [297 420] (A6) put +- dup [728 1032] (B4) put +- dup [516 729] (B5) put +- dup [363 516] (B6) put +- dup [612 1008] (Legal) put +- dup [612 792] (Letter) put +- dup [522 756] (Executive) put +- dup [396 612] (Statement) put +- dup [792 1224] (Tabloid) put +- dup [1224 792] (Ledger) put +- dup [1224 1584] (AnsiC) put +- dup [1584 2448] (AnsiD) put +- dup [2448 3168] (AnsiE) put +- dup [648 864] (ARCHA) put +- dup [864 1296] (ARCHB) put +- dup [1296 1728] (ARCHC) put +- dup [1728 2592] (ARCHD) put +- dup [2592 3456] (ARCHE) put +- dup [279 540] (EnvMonarch) put +- dup [312 624] (EnvDL) put +- dup [649 918] (EnvC4) put +- dup [459 649] (EnvC5) put +- dup [323 459] (EnvC6) put +- dup [297 684] (Env10) put +- dup [324 648] (EnvC65) put +- dup [595 935] (Folio) put +- { exch aload pop 4 index sub abs 5 le exch +- 5 index sub abs 5 le and +- { exch pop exit } { pop } ifelse +- } bind forall +- = flush pop pop +- restore +-" +-*End ++*PageSize A0: "" ++*PageSize A1: "" ++*PageSize A2: "" ++*PageSize A3: "" ++*PageSize A4: "" ++*PageSize A5: "" ++*PageSize A6: "" ++*PageSize B4: "" ++*PageSize B5: "" ++*PageSize B6: "" ++*PageSize Legal/US Legal: "" ++*PageSize Letter/US Letter: "" ++*PageSize Executive: "" ++*PageSize Statement: "" ++*PageSize Tabloid/US Tabloid: "" ++*PageSize Ledger/Ledger Landscape: "" ++*PageSize AnsiC/US C: "" ++*PageSize AnsiD/US D: "" ++*PageSize AnsiE/US E: "" ++*PageSize ARCHA/ARCH A: "" ++*PageSize ARCHB/ARCH B: "" ++*PageSize ARCHC/ARCH C: "" ++*PageSize ARCHD/ARCH D: "" ++*PageSize ARCHE/ARCH E: "" ++*PageSize EnvMonarch/Monarch Envelope: "" ++*PageSize EnvDL/DL Envelope: "" ++*PageSize EnvC4/C4 Envelope: "" ++*PageSize EnvC5/C5 Envelope: "" ++*PageSize EnvC6/C6 Envelope: "" ++*PageSize Env10/C10 Envelope: "" ++*PageSize EnvC65/C65 Envelope: "" ++*PageSize Folio: "" + *CloseUI: *PageSize + +-*OpenUI *PageRegion: PickOne ++*OpenUI *PageRegion/Document Page Region: PickOne + *OrderDependency: 40 AnySetup *PageRegion + *DefaultPageRegion: Letter +-*PageRegion A0: "<</PageSize [2384 3370] /ImagingBBox null>> setpagedevice" +-*PageRegion A1: "<</PageSize [1684 2384] /ImagingBBox null>> setpagedevice" +-*PageRegion A2: "<</PageSize [1191 1684] /ImagingBBox null>> setpagedevice" +-*PageRegion A3: "<</PageSize [842 1191] /ImagingBBox null>> setpagedevice" +-*PageRegion A4: "<</PageSize [595 842] /ImagingBBox null>> setpagedevice" +-*PageRegion A5: "<</PageSize [420 595] /ImagingBBox null>> setpagedevice" +-*PageRegion A6: "<</PageSize [297 420] /ImagingBBox null>> setpagedevice" +-*PageRegion B4: "<</PageSize [728 1032] /ImagingBBox null>> setpagedevice" +-*PageRegion B5: "<</PageSize [516 729] /ImagingBBox null>> setpagedevice" +-*PageRegion B6: "<</PageSize [363 516] /ImagingBBox null>> setpagedevice" +-*PageRegion Legal/US Legal: "<</PageSize [612 1008] /ImagingBBox null>> setpagedevice" +-*PageRegion Letter/US Letter: "<</PageSize [612 792] /ImagingBBox null>> setpagedevice" +-*PageRegion Executive: "<</PageSize [522 756] /ImagingBBox null>> setpagedevice" +-*PageRegion Statement: "<</PageSize [396 612] /ImagingBBox null>> setpagedevice" +-*PageRegion Tabloid/US Tabloid: "<</PageSize [792 1224] /ImagingBBox null>> setpagedevice" +-*PageRegion Ledger/Ledger Landscape: "<</PageSize [1224 792] /ImagingBBox null>> setpagedevice" +-*PageRegion AnsiC/US C: "<</PageSize [1224 1584] /ImagingBBox null>> setpagedevice" +-*PageRegion AnsiD/US D: "<</PageSize [1584 2448] /ImagingBBox null>> setpagedevice" +-*PageRegion AnsiE/US E: "<</PageSize [2448 3168] /ImagingBBox null>> setpagedevice" +-*PageRegion ARCHA/ARCH A: "<</PageSize [648 864] /ImagingBBox null>> setpagedevice" +-*PageRegion ARCHB/ARCH B: "<</PageSize [864 1296] /ImagingBBox null>> setpagedevice" +-*PageRegion ARCHC/ARCH C: "<</PageSize [1296 1728] /ImagingBBox null>> setpagedevice" +-*PageRegion ARCHD/ARCH D: "<</PageSize [1728 2592] /ImagingBBox null>> setpagedevice" +-*PageRegion ARCHE/ARCH E: "<</PageSize [2592 3456] /ImagingBBox null>> setpagedevice" +-*PageRegion EnvMonarch/Monarch Envelope: "<</PageSize [279 540] /ImagingBBox null>> setpagedevice" +-*PageRegion EnvDL/DL Envelope: "<</PageSize [312 624] /ImagingBBox null>> setpagedevice" +-*PageRegion EnvC4/C4 Envelope: "<</PageSize [649 918] /ImagingBBox null>> setpagedevice" +-*PageRegion EnvC5/C5 Envelope: "<</PageSize [459 649] /ImagingBBox null>> setpagedevice" +-*PageRegion EnvC6/C6 Envelope: "<</PageSize [323 459] /ImagingBBox null>> setpagedevice" +-*PageRegion Env10/C10 Envelope: "<</PageSize [297 684] /ImagingBBox null>> setpagedevice" +-*PageRegion EnvC65/C65 Envelope: "<</PageSize [324 648] /ImagingBBox null>> setpagedevice" +-*PageRegion Folio: "<</PageSize [595 935] /ImagingBBox null>> setpagedevice" ++*PageRegion A0: "" ++*PageRegion A1: "" ++*PageRegion A2: "" ++*PageRegion A3: "" ++*PageRegion A4: "" ++*PageRegion A5: "" ++*PageRegion A6: "" ++*PageRegion B4: "" ++*PageRegion B5: "" ++*PageRegion B6: "" ++*PageRegion Legal/US Legal: "" ++*PageRegion Letter/US Letter: "" ++*PageRegion Executive: "" ++*PageRegion Statement: "" ++*PageRegion Tabloid/US Tabloid: "" ++*PageRegion Ledger/Ledger Landscape: "" ++*PageRegion AnsiC/US C: "" ++*PageRegion AnsiD/US D: "" ++*PageRegion AnsiE/US E: "" ++*PageRegion ARCHA/ARCH A: "" ++*PageRegion ARCHB/ARCH B: "" ++*PageRegion ARCHC/ARCH C: "" ++*PageRegion ARCHD/ARCH D: "" ++*PageRegion ARCHE/ARCH E: "" ++*PageRegion EnvMonarch/Monarch Envelope: "" ++*PageRegion EnvDL/DL Envelope: "" ++*PageRegion EnvC4/C4 Envelope: "" ++*PageRegion EnvC5/C5 Envelope: "" ++*PageRegion EnvC6/C6 Envelope: "" ++*PageRegion Env10/C10 Envelope: "" ++*PageRegion EnvC65/C65 Envelope: "" ++*PageRegion Folio: "" + *CloseUI: *PageRegion + + *DefaultImageableArea: Letter +@@ -342,37 +288,6 @@ + *PaperDimension EnvC65: "324 648" + *PaperDimension Folio: "595 935" + +-*% ===== Duplex ===== +-*OpenUI *Duplex/Duplex: PickOne +-*OrderDependency: 30 AnySetup *Duplex +-*DefaultDuplex: Simplex +-*Duplex Simplex: "" +-*Duplex None/Off: " +-<</Duplex false /Tumble false +- /Policies << /Duplex 1 /Tumble 1 >> +->> setpagedevice" +-*Duplex DuplexNoTumble/Long edge:" +-<</Duplex true /Tumble false +- /Policies << /Duplex 1 /Tumble 1 >> +->> setpagedevice" +-*Duplex DuplexTumble/Short edge:" +-<</Duplex true /Tumble true +- /Policies << /Duplex 1 /Tumble 1 >> +->> setpagedevice" +-*End +-*CloseUI: *Duplex +- +-*% ===== ManualFeed === +-*OpenUI *ManualFeed/Manual Feed: Boolean +-*OrderDependency: 15 AnySetup *ManualFeed +-*DefaultManualFeed: False +-*ManualFeed False: " +-<< /ManualFeed false /Policies << /ManualFeed 1 >> >> setpagedevice" +-*ManualFeed True: " +-<< /ManualFeed true /Policies << /ManualFeed 1 >> >> setpagedevice" +-*End +-*CloseUI: *ManualFeed +- + *% ===== Fonts ===== + + *DefaultFont: Courier diff --git a/patches/OOO_1_1_2/sd-export-html-translations.diff b/patches/OOO_1_1_2/sd-export-html-translations.diff new file mode 100644 index 000000000..788cd7d9f --- /dev/null +++ b/patches/OOO_1_1_2/sd-export-html-translations.diff @@ -0,0 +1,92 @@ +Index: source/filter/html/pubdlg.src +=================================================================== +RCS file: /cvs/graphics/sd/source/filter/html/pubdlg.src,v +retrieving revision 1.13.14.4 +diff -u -r1.13.14.4 pubdlg.src +--- sd/source/filter/html/pubdlg.src 27 Apr 2004 16:42:59 -0000 1.13.14.4 ++++ sd/source/filter/html/pubdlg.src 9 Jun 2004 04:36:11 -0000 +@@ -1357,47 +1357,47 @@ + Text[ norwegian_nynorsk ] = "Lagra bilete som"; + }; + +- RadioButton PAGE3_GIF ++ RadioButton PAGE3_PNG + { + Pos = MAP_APPFONT( 12, 49 ); + Size = MAP_APPFONT( 116, 10 ); + Text = "~GIF"; +- Text [ ENGLISH ] = "~GIF"; +- Text[ italian ] = "~GIF"; +- Text[ portuguese_brazilian ] = "~GIF"; +- Text[ portuguese ] = "~GIF - Graphics Interchange Format"; +- Text[ danish ] = "~GIF"; +- Text[ french ] = "GIF"; +- Text[ swedish ] = "~GIF"; +- Text[ dutch ] = "~GIF - Graphics Interchange-Format"; +- Text[ spanish ] = "~GIF "; +- Text[ english_us ] = "~GIF"; +- Text[ chinese_simplified ] = "~GIF"; +- Text[ russian ] = "~GIF - Graphics Interchange Format"; +- Text[ polish ] = "GIF - Graphics Interchange Format"; +- Text[ japanese ] = "~GIF"; +- Text[ greek ] = "~GIF - Graphics Interchange Format"; +- Text[ korean ] = "~GIF"; +- Text[ chinese_traditional ] = "~GIF"; +- Text[ arabic ] = "GIF - Graphics Interchange-Format"; +- Text[ turkish ] = "~GIF"; +- Text[ catalan ] = "~GIF"; +- Text[ finnish ] = "~GIF"; +- Text[ thai ] = "~GIF - Graphics Interchange Format"; +- Text[ czech ] = "GIF"; +- Text[ hebrew ] = "~GIF"; +- Text[ hindi ] = "~GIF"; +- Text[ slovak ] = "~GIF"; +- Text[ hungarian ] = "~GIF"; +- Text[ slovenian ] = "~GIF"; +- Text[ estonian ] = "~GIF"; +- Text[ language_user1 ] = "~GIF"; +- Text[ norwegian ] = "~GIF"; +- Text[ welsh ] = "~GIF"; +- Text[ northernsotho ] = "~GIF"; +- Text[ afrikaans ] = "~GIF"; +- Text[ zulu ] = "~GIF"; +- Text[ norwegian_nynorsk ] = "~GIF"; ++ Text [ ENGLISH ] = "~PNG"; ++ Text[ italian ] = "~PNG"; ++ Text[ portuguese_brazilian ] = "~PNG"; ++ Text[ portuguese ] = "~PNG"; ++ Text[ danish ] = "~PNG"; ++ Text[ french ] = "PNG"; ++ Text[ swedish ] = "~PNG"; ++ Text[ dutch ] = "~PNG"; ++ Text[ spanish ] = "~PNG "; ++ Text[ english_us ] = "~PNG"; ++ Text[ chinese_simplified ] = "~PNG"; ++ Text[ russian ] = "~PNG"; ++ Text[ polish ] = "PNG"; ++ Text[ japanese ] = "~PNG"; ++ Text[ greek ] = "~PNG"; ++ Text[ korean ] = "~PNG"; ++ Text[ chinese_traditional ] = "~PNG"; ++ Text[ arabic ] = "PNG"; ++ Text[ turkish ] = "~PNG"; ++ Text[ catalan ] = "~PNG"; ++ Text[ finnish ] = "~PNG"; ++ Text[ thai ] = "~PNG"; ++ Text[ czech ] = "PNG"; ++ Text[ hebrew ] = "~PNG"; ++ Text[ hindi ] = "~PNG"; ++ Text[ slovak ] = "~PNG"; ++ Text[ hungarian ] = "~PNG"; ++ Text[ slovenian ] = "~PNG"; ++ Text[ estonian ] = "~PNG"; ++ Text[ language_user1 ] = "~PNG"; ++ Text[ norwegian ] = "~PNG"; ++ Text[ welsh ] = "~PNG"; ++ Text[ northernsotho ] = "~PNG"; ++ Text[ afrikaans ] = "~PNG"; ++ Text[ zulu ] = "~PNG"; ++ Text[ norwegian_nynorsk ] = "~PNG"; + }; + + RadioButton PAGE3_JPG diff --git a/patches/OOO_1_1_2/vcl-inc.diff b/patches/OOO_1_1_2/vcl-inc.diff new file mode 100644 index 000000000..9abbee81a --- /dev/null +++ b/patches/OOO_1_1_2/vcl-inc.diff @@ -0,0 +1,8737 @@ +Index: vcl/inc/abstdlg.hxx +=================================================================== +RCS file: vcl/inc/abstdlg.hxx +diff -N vcl/inc/abstdlg.hxx +--- /dev/null 1 Jan 1970 00:00:00 -0000 ++++ vcl/inc/abstdlg.hxx 3 Feb 2004 17:13:21 -0000 1.3 +@@ -0,0 +1,101 @@ ++/************************************************************************* ++ * ++ * ++ * ++ * ++ * ++ * ++ * ++ * The Contents of this file are made available subject to the terms of ++ * either of the following licenses ++ * ++ * - GNU Lesser General Public License Version 2.1 ++ * - Sun Industry Standards Source License Version 1.1 ++ * ++ * Sun Microsystems Inc., October, 2000 ++ * ++ * GNU Lesser General Public License Version 2.1 ++ * ============================================= ++ * Copyright 2000 by Sun Microsystems, Inc. ++ * 901 San Antonio Road, Palo Alto, CA 94303, USA ++ * ++ * This library is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU Lesser General Public ++ * License version 2.1, as published by the Free Software Foundation. ++ * ++ * This library is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * Lesser General Public License for more details. ++ * ++ * You should have received a copy of the GNU Lesser General Public ++ * License along with this library; if not, write to the Free Software ++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, ++ * MA 02111-1307 USA ++ * ++ * ++ * Sun Industry Standards Source License Version 1.1 ++ * ================================================= ++ * The contents of this file are subject to the Sun Industry Standards ++ * Source License Version 1.1 (the "License"); You may not use this file ++ * except in compliance with the License. You may obtain a copy of the ++ * License at http://www.openoffice.org/license.html. ++ * ++ * Software provided under this License is provided on an "AS IS" basis, ++ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, ++ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, ++ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. ++ * See the License for the specific provisions governing your rights and ++ * obligations concerning the Software. ++ * ++ * The Initial Developer of the Original Code is: Sun Microsystems, Inc. ++ * ++ * Copyright: 2000 by Sun Microsystems, Inc. ++ * ++ * All Rights Reserved. ++ * ++ * Contributor(s): _______________________________________ ++ * ++ * ++ ************************************************************************/ ++#ifndef _VCL_ABSTDLG_HXX ++#define _VCL_ABSTDLG_HXX ++ ++// include --------------------------------------------------------------- ++ ++#include <tools/solar.h> ++#include <tools/string.hxx> ++ ++class Window; ++class ResId; ++ ++class VclAbstractDialog ++{ ++public: ++ virtual USHORT Execute() = 0; ++ //virtual void Show( BOOL bVisible = TRUE, USHORT nFlags = 0 ) = 0; ++ virtual ~VclAbstractDialog(); ++}; ++ ++class VclAbstractTerminatedDialog : public VclAbstractDialog ++{ ++public: ++ virtual void EndDialog(long nResult =0) = 0; ++}; ++ ++class VclAbstractRefreshableDialog : public VclAbstractDialog ++{ ++public: ++ virtual void Update() = 0; ++ virtual void Sync() = 0; ++}; ++ ++class VclAbstractDialogFactory ++{ ++public: ++ static VclAbstractDialogFactory* Create(); ++ virtual VclAbstractDialog* CreateVclDialog( Window* pParent, const ResId& rResId ) = 0; ++}; ++ ++#endif ++ +Index: vcl/inc/accel.hxx +=================================================================== +RCS file: /cvs/gsl/vcl/inc/accel.hxx,v +retrieving revision 1.2 +retrieving revision 1.3 +diff -u -p -u -r1.2 -r1.3 +--- vcl/inc/accel.hxx 7 Dec 2000 13:37:15 -0000 1.2 ++++ vcl/inc/accel.hxx 6 Jan 2004 12:50:31 -0000 1.3 +@@ -65,11 +65,11 @@ + #ifndef _SV_SV_H + #include <sv.h> + #endif +-#ifndef _SV_RESID_HXX +-#include <resid.hxx> ++#ifndef _TOOLS_RESID_HXX ++#include <tools/resid.hxx> + #endif +-#ifndef _SV_RC_HXX +-#include <rc.hxx> ++#ifndef _TOOLS_RC_HXX ++#include <tools/rc.hxx> + #endif + #ifndef _SV_KEYCOD_HXX + #include <keycod.hxx> +@@ -84,6 +84,8 @@ class ImplAccelEntry; + + class Accelerator : public Resource + { ++ friend class ImplAccelManager; ++ + private: + ImplAccelData* mpData; + XubString maHelpStr; +@@ -99,15 +101,12 @@ private: + BOOL* mpDel; + + #if _SOLAR__PRIVATE +-#ifdef _SV_ACCEL_CXX + void ImplInit(); + void ImplCopyData( ImplAccelData& rAccelData ); + void ImplDeleteData(); + void ImplInsertAccel( USHORT nItemId, const KeyCode& rKeyCode, + BOOL bEnable, Accelerator* pAutoAccel ); +-#endif + +- friend class ImplAccelManager; + ImplAccelEntry* ImplGetAccelData( const KeyCode& rKeyCode ) const; + #endif + +@@ -118,7 +117,7 @@ public: + Accelerator(); + Accelerator( const Accelerator& rAccel ); + Accelerator( const ResId& rResId ); +- ~Accelerator(); ++ virtual ~Accelerator(); + + virtual void Activate(); + virtual void Deactivate(); +Index: vcl/inc/alpha.hxx +=================================================================== +RCS file: /cvs/gsl/vcl/inc/alpha.hxx,v +retrieving revision 1.3 +retrieving revision 1.6 +diff -u -p -u -r1.3 -r1.6 +--- vcl/inc/alpha.hxx 12 Sep 2002 09:30:19 -0000 1.3 ++++ vcl/inc/alpha.hxx 21 May 2004 16:20:16 -0000 1.6 +@@ -70,15 +70,15 @@ + // - AlphaMask - + // ------------- + ++class ImageList; ++ + class AlphaMask : private Bitmap + { + friend class BitmapEx; + friend class OutputDevice; ++ friend SvStream& operator<<( SvStream&, const ImageList& ); + + private: +- +- long nDummy1; +- long nDummy2; + + const Bitmap& ImplGetBitmap() const; + void ImplSetBitmap( const Bitmap& rBitmap ); +Index: vcl/inc/apptypes.hxx +=================================================================== +RCS file: /cvs/gsl/vcl/inc/apptypes.hxx,v +retrieving revision 1.3 +retrieving revision 1.4 +diff -u -p -u -r1.3 -r1.4 +--- vcl/inc/apptypes.hxx 11 Jul 2001 08:32:52 -0000 1.3 ++++ vcl/inc/apptypes.hxx 6 Jan 2004 12:51:37 -0000 1.4 +@@ -62,12 +62,12 @@ + #ifndef _VCL_APPTYPES_HXX + #define _VCL_APPTYPES_HXX + +-#ifndef _RTTI_HXX +-#include <tools/rtti.hxx> +-#endif +- + #ifndef _SV_SV_H + #include <sv.h> ++#endif ++ ++#ifndef _RTTI_HXX ++#include <tools/rtti.hxx> + #endif + + // --------------------- +Index: vcl/inc/bitmap.hxx +=================================================================== +RCS file: /cvs/gsl/vcl/inc/bitmap.hxx,v +retrieving revision 1.8 +retrieving revision 1.13 +diff -u -p -u -r1.8 -r1.13 +--- vcl/inc/bitmap.hxx 24 Apr 2003 14:56:11 -0000 1.8 ++++ vcl/inc/bitmap.hxx 10 Jun 2004 17:36:43 -0000 1.13 +@@ -68,8 +68,8 @@ + #ifndef _SV_MAPMOD_HXX + #include <mapmod.hxx> + #endif +-#ifndef _SV_RC_HXX +-#include <rc.hxx> ++#ifndef _TOOLS_RC_HXX ++#include <tools/rc.hxx> + #endif + #ifndef _SV_REGION_HXX + #include <region.hxx> +@@ -106,8 +106,8 @@ + + // ----------------------------------------------------------------------------- + +-#define BMP_COL_TRANS Color( 252, 3, 251 ) +- ++#define BMP_COL_TRANS Color( 252, 3, 251 ) ++#define BMP_COLOR_MONOCHROME_THRESHOLD 128 + + // --------- + // - Enums - +@@ -188,7 +188,9 @@ enum BmpFilter + enum BmpColorMode + { + BMP_COLOR_NORMAL = 0, +- BMP_COLOR_HIGHCONTRAST = 1 ++ BMP_COLOR_HIGHCONTRAST = 1, ++ BMP_COLOR_MONOCHROME_BLACK = 2, ++ BMP_COLOR_MONOCHROME_WHITE = 3 + }; + + // -------------------- +@@ -330,27 +332,6 @@ public: + BOOL ImplMosaic( const BmpFilterParam* pFilterParam, const Link* pProgress ); + BOOL ImplPopArt( const BmpFilterParam* pFilterParam, const Link* pProgress ); + +-#ifdef REMOTE_APPSERVER +- +- void ImplDrawRemote( OutputDevice* pOut, +- const Point& rSrcPt, const Size& rSrcSz, +- const Point& rDestPt, const Size& rDestSz ) const; +- void ImplDrawRemoteEx( OutputDevice* pOut, +- const Point& rSrcPt, const Size& rSrcSz, +- const Point& rDestPt, const Size& rDestSz, +- const Bitmap& rMask ) const; +- void ImplDrawRemoteAlpha( OutputDevice* pOut, +- const Point& rSrcPt, const Size& rSrcSz, +- const Point& rDestPt, const Size& rDestSz, +- const AlphaMask& rAlpha ) const; +- void ImplDrawRemoteMask( OutputDevice* pOut, +- const Point& rSrcPt, const Size& rSrcSz, +- const Point& rDestPt, const Size& rDestSz, +- const Color& rColor ) const; +- void ImplGetRemoteBmp( OutputDevice* pOut, const Point& rPt, +- const Size& rSz ); +- +-#endif // REMOTE_APPSERVER + #endif // PRIVATE + + public: +Index: vcl/inc/bitmapex.hxx +=================================================================== +RCS file: /cvs/gsl/vcl/inc/bitmapex.hxx,v +retrieving revision 1.5 +retrieving revision 1.9 +diff -u -p -u -r1.5 -r1.9 +--- vcl/inc/bitmapex.hxx 22 Oct 2002 17:07:54 -0000 1.5 ++++ vcl/inc/bitmapex.hxx 21 May 2004 16:20:50 -0000 1.9 +@@ -68,8 +68,8 @@ + #ifndef _SV_ALPHA_HXX + #include <alpha.hxx> + #endif +-#ifndef _SV_COLOR_HXX +-#include <color.hxx> ++#ifndef _TOOLS_COLOR_HXX ++#include <tools/color.hxx> + #endif + + // ------------------- +@@ -100,23 +100,10 @@ private: + Size aBitmapSize; + Color aTransparentColor; + TransparentType eTransparent; +- USHORT nDummy; + BOOL bAlpha; +- BYTE cDummy; + + public: + +-#ifdef REMOTE_APPSERVER +- +- void ImplDrawRemote( OutputDevice* pOut, +- const Point& rSrcPt, const Size& rSrcSz, +- const Point& rDestPt, const Size& rDestSz ) const; +- void ImplDrawRemoteAlpha( OutputDevice* pOut, +- const Point& rSrcPt, const Size& rSrcSz, +- const Point& rDestPt, const Size& rDestSz ) const; +- +-#endif // REMOTE +- + #if _SOLAR__PRIVATE + + ImpBitmap* ImplGetBitmapImpBitmap() const { return aBitmap.ImplGetImpBitmap(); } +Index: vcl/inc/brdwin.hxx +=================================================================== +RCS file: /cvs/gsl/vcl/inc/brdwin.hxx,v +retrieving revision 1.2 +retrieving revision 1.4 +diff -u -p -u -r1.2 -r1.4 +--- vcl/inc/brdwin.hxx 16 Feb 2001 11:09:45 -0000 1.2 ++++ vcl/inc/brdwin.hxx 17 Jun 2004 12:01:23 -0000 1.4 +@@ -156,14 +156,12 @@ private: + BOOL mbHelpBtn; + BOOL mbDisplayActive; + +-#ifdef _SV_BRDWIN_CXX + void ImplInit( Window* pParent, + WinBits nStyle, USHORT nTypeStyle, + SystemParentData* pParentData ); + void ImplInit( Window* pParent, + WinBits nStyle, USHORT nTypeStyle, + const ::com::sun::star::uno::Any& ); +-#endif + + public: + ImplBorderWindow( Window* pParent, +@@ -213,8 +211,8 @@ public: + void SetMinOutputSize( long nWidth, long nHeight ) + { mnMinWidth = nWidth; mnMinHeight = nHeight; } + +- void GetBorder( long& rLeftBorder, long& rTopBorder, +- long& rRightBorder, long& rBottomBorder ) const; ++ void GetBorder( sal_Int32& rLeftBorder, sal_Int32& rTopBorder, ++ sal_Int32& rRightBorder, sal_Int32& rBottomBorder ) const; + long CalcTitleWidth() const; + }; + +@@ -242,10 +240,10 @@ struct ImplBorderFrameData + long mnTrackY; + long mnTrackWidth; + long mnTrackHeight; +- long mnLeftBorder; +- long mnTopBorder; +- long mnRightBorder; +- long mnBottomBorder; ++ sal_Int32 mnLeftBorder; ++ sal_Int32 mnTopBorder; ++ sal_Int32 mnRightBorder; ++ sal_Int32 mnBottomBorder; + long mnNoTitleTop; + long mnBorderSize; + long mnTitleHeight; +@@ -279,8 +277,8 @@ public: + virtual USHORT RequestHelp( const Point& rPos, Rectangle& rHelpRect ); + + virtual void Init( OutputDevice* pDev, long nWidth, long nHeight ) = 0; +- virtual void GetBorder( long& rLeftBorder, long& rTopBorder, +- long& rRightBorder, long& rBottomBorder ) const = 0; ++ virtual void GetBorder( sal_Int32& rLeftBorder, sal_Int32& rTopBorder, ++ sal_Int32& rRightBorder, sal_Int32& rBottomBorder ) const = 0; + virtual long CalcTitleWidth() const = 0; + virtual void DrawWindow( USHORT nDrawFlags, OutputDevice* pOutDev = NULL, const Point* pOffset = NULL ) = 0; + +@@ -305,8 +303,8 @@ public: + ImplNoBorderWindowView( ImplBorderWindow* pBorderWindow ); + + virtual void Init( OutputDevice* pDev, long nWidth, long nHeight ); +- virtual void GetBorder( long& rLeftBorder, long& rTopBorder, +- long& rRightBorder, long& rBottomBorder ) const; ++ virtual void GetBorder( sal_Int32& rLeftBorder, sal_Int32& rTopBorder, ++ sal_Int32& rRightBorder, sal_Int32& rBottomBorder ) const; + virtual long CalcTitleWidth() const; + virtual void DrawWindow( USHORT nDrawFlags, OutputDevice* pOutDev, const Point* pOffset ); + }; +@@ -324,17 +322,17 @@ class ImplSmallBorderWindowView : public + OutputDevice* mpOutDev; + long mnWidth; + long mnHeight; +- long mnLeftBorder; +- long mnTopBorder; +- long mnRightBorder; +- long mnBottomBorder; ++ sal_Int32 mnLeftBorder; ++ sal_Int32 mnTopBorder; ++ sal_Int32 mnRightBorder; ++ sal_Int32 mnBottomBorder; + + public: + ImplSmallBorderWindowView( ImplBorderWindow* pBorderWindow ); + + virtual void Init( OutputDevice* pOutDev, long nWidth, long nHeight ); +- virtual void GetBorder( long& rLeftBorder, long& rTopBorder, +- long& rRightBorder, long& rBottomBorder ) const; ++ virtual void GetBorder( sal_Int32& rLeftBorder, sal_Int32& rTopBorder, ++ sal_Int32& rRightBorder, sal_Int32& rBottomBorder ) const; + virtual long CalcTitleWidth() const; + virtual void DrawWindow( USHORT nDrawFlags, OutputDevice* pOutDev, const Point* pOffset ); + }; +@@ -363,8 +361,8 @@ public: + virtual USHORT RequestHelp( const Point& rPos, Rectangle& rHelpRect ); + + virtual void Init( OutputDevice* pDev, long nWidth, long nHeight ); +- virtual void GetBorder( long& rLeftBorder, long& rTopBorder, +- long& rRightBorder, long& rBottomBorder ) const; ++ virtual void GetBorder( sal_Int32& rLeftBorder, sal_Int32& rTopBorder, ++ sal_Int32& rRightBorder, sal_Int32& rBottomBorder ) const; + virtual long CalcTitleWidth() const; + virtual void DrawWindow( USHORT nDrawFlags, OutputDevice* pOutDev, const Point* pOffset ); + }; +Index: vcl/inc/btndlg.hxx +=================================================================== +RCS file: /cvs/gsl/vcl/inc/btndlg.hxx,v +retrieving revision 1.2 +retrieving revision 1.3 +diff -u -p -u -r1.2 -r1.3 +--- vcl/inc/btndlg.hxx 7 Dec 2000 13:37:15 -0000 1.2 ++++ vcl/inc/btndlg.hxx 6 Jan 2004 12:53:29 -0000 1.3 +@@ -101,20 +101,15 @@ private: + BOOL mbFormat; + Link maClickHdl; + +-#if _SOLAR__PRIVATE +-#ifdef _SV_BTNDLG_CXX + void ImplInitData(); + PushButton* ImplCreatePushButton( USHORT nBtnFlags ); + ImplBtnDlgItem* ImplGetItem( USHORT nId ) const; + DECL_LINK( ImplClickHdl, PushButton* pBtn ); + void ImplPosControls(); +-#endif +-protected: +- long ImplGetButtonSize(); +-#endif + + protected: + ButtonDialog( WindowType nType ); ++ long ImplGetButtonSize(); + + public: + ButtonDialog( Window* pParent, WinBits nStyle = WB_STDDIALOG ); +Index: vcl/inc/button.hxx +=================================================================== +RCS file: /cvs/gsl/vcl/inc/button.hxx,v +retrieving revision 1.8 +retrieving revision 1.11 +diff -u -p -u -r1.8 -r1.11 +--- vcl/inc/button.hxx 17 Apr 2003 17:55:12 -0000 1.8 ++++ vcl/inc/button.hxx 10 May 2004 15:40:59 -0000 1.11 +@@ -78,6 +78,10 @@ + #include <bitmap.hxx> + #endif + ++#ifndef _SV_NATIVEWIDGETS_HXX ++#include <salnativewidgets.hxx> ++#endif ++ + class UserDrawEvent; + + // ---------- +@@ -124,7 +128,6 @@ protected: + Image maImageHC; + BitmapEx* mpBitmapEx; + BitmapEx* mpBitmapExHC; +- void* mpDummy; + SymbolType meSymbol; + ImageAlign meImageAlign; + TriState meState; +@@ -133,12 +136,9 @@ protected: + USHORT mnButtonState; + BOOL mbPressed; + BOOL mbInUserDraw; +- BOOL mbDummy1; +- BOOL mbDummy2; + Link maToggleHdl; + + #if _SOLAR__PRIVATE +-#ifdef _SV_BUTTON_CXX + void ImplInitData(); + WinBits ImplInitStyle( const Window* pPrevWindow, WinBits nStyle ); + void ImplInitSettings( BOOL bFont, BOOL bForeground, BOOL bBackground ); +@@ -148,7 +148,6 @@ protected: + USHORT ImplGetTextStyle() const; + BOOL IsSymbol() const { return ( (meSymbol != SYMBOL_NOSYMBOL) && (meSymbol != SYMBOL_IMAGE) ); } + BOOL IsImage() const { return !!maImage; } +-#endif + + protected: + void ImplInit( Window* pParent, WinBits nStyle ); +@@ -180,6 +179,7 @@ public: + virtual void LoseFocus(); + virtual void StateChanged( StateChangedType nType ); + virtual void DataChanged( const DataChangedEvent& rDCEvt ); ++ virtual long PreNotify( NotifyEvent& rNEvt ); + virtual void UserDraw( const UserDrawEvent& rUDEvt ); + + virtual void Toggle(); +@@ -253,10 +246,8 @@ inline BOOL PushButton::IsChecked() cons + + class OKButton : public PushButton + { +-#ifdef _SV_BUTTON_CXX + private: + void ImplInit( Window* pParent, WinBits nStyle ); +-#endif + + public: + OKButton( Window* pParent, WinBits nStyle = WB_DEFBUTTON ); +@@ -271,10 +262,8 @@ public: + + class CancelButton : public PushButton + { +-#ifdef _SV_BUTTON_CXX + private: + void ImplInit( Window* pParent, WinBits nStyle ); +-#endif + + public: + CancelButton( Window* pParent, WinBits nStyle = 0 ); +@@ -289,10 +278,8 @@ public: + + class HelpButton : public PushButton + { +-#ifdef _SV_BUTTON_CXX + private: + void ImplInit( Window* pParent, WinBits nStyle ); +-#endif + + public: + HelpButton( Window* pParent, WinBits nStyle = 0 ); +@@ -318,12 +305,9 @@ private: + BOOL mbSaveValue; + BOOL mbRadioCheck; + BOOL mbStateChanged; +- BOOL mbDummy1; +- BOOL mbDummy2; + Link maToggleHdl; + + #if _SOLAR__PRIVATE +-#ifdef _SV_BUTTON_CXX + void ImplInitData(); + WinBits ImplInitStyle( const Window* pPrevWindow, WinBits nStyle ); + void ImplInitSettings( BOOL bFont, BOOL bForeground, BOOL bBackground ); +@@ -336,7 +320,6 @@ private: + bool bLayout = false ); + void ImplDrawRadioButton( bool bLayout = false ); + void ImplUncheckAllOther(); +-#endif + + protected: + void ImplInit( Window* pParent, WinBits nStyle ); +@@ -376,6 +359,7 @@ public: + virtual void LoseFocus(); + virtual void StateChanged( StateChangedType nType ); + virtual void DataChanged( const DataChangedEvent& rDCEvt ); ++ virtual long PreNotify( NotifyEvent& rNEvt ); + + virtual void Toggle(); + +@@ -428,7 +412,6 @@ private: + Link maToggleHdl; + + #if _SOLAR__PRIVATE +-#ifdef _SV_BUTTON_CXX + void ImplInitData(); + WinBits ImplInitStyle( const Window* pPrevWindow, WinBits nStyle ); + void ImplInitSettings( BOOL bFont, BOOL bForeground, BOOL bBackground ); +@@ -439,7 +422,6 @@ private: + Rectangle& rStateRect, + Rectangle& rMouseRect, Rectangle& rFocusRect, bool bLayout ); + void ImplDrawCheckBox( bool bLayout = false ); +-#endif + + protected: + void ImplInit( Window* pParent, WinBits nStyle ); +@@ -465,6 +447,7 @@ public: + virtual void LoseFocus(); + virtual void StateChanged( StateChangedType nType ); + virtual void DataChanged( const DataChangedEvent& rDCEvt ); ++ virtual long PreNotify( NotifyEvent& rNEvt ); + + virtual void Toggle(); + +Index: vcl/inc/cmdevt.hxx +=================================================================== +RCS file: /cvs/gsl/vcl/inc/cmdevt.hxx,v +retrieving revision 1.10.250.1 +retrieving revision 1.12 +diff -u -p -u -r1.10.250.1 -r1.12 +--- vcl/inc/cmdevt.hxx 9 Jan 2004 18:13:38 -0000 1.10.250.1 ++++ vcl/inc/cmdevt.hxx 6 Jan 2004 12:54:08 -0000 1.12 +@@ -101,7 +101,6 @@ private: + xub_StrLen mnOldTextLen; + USHORT mnCursorFlags; + BOOL mbOnlyCursor; +- BOOL mbDummy; + + public: + CommandExtTextInputData(); +Index: vcl/inc/combobox.hxx +=================================================================== +RCS file: /cvs/gsl/vcl/inc/combobox.hxx,v +retrieving revision 1.12 +retrieving revision 1.14 +diff -u -p -u -r1.12 -r1.14 +--- vcl/inc/combobox.hxx 11 Apr 2003 17:24:42 -0000 1.12 ++++ vcl/inc/combobox.hxx 18 May 2004 10:47:56 -0000 1.14 +@@ -192,6 +192,7 @@ public: + BOOL IsUserDrawEnabled() const; + + void DrawEntry( const UserDrawEvent& rEvt, BOOL bDrawImage, BOOL bDrawText, BOOL bDrawTextAtImagePos = FALSE ); ++ void SetBorderStyle( USHORT nBorderStyle ); + + void SetSeparatorPos( USHORT n ); + void SetSeparatorPos(); +Index: vcl/inc/controllayout.hxx +=================================================================== +RCS file: /cvs/gsl/vcl/inc/controllayout.hxx,v +retrieving revision 1.3 +retrieving revision 1.4 +diff -u -p -u -r1.3 -r1.4 +--- vcl/inc/controllayout.hxx 16 May 2002 11:52:49 -0000 1.3 ++++ vcl/inc/controllayout.hxx 18 May 2004 10:48:10 -0000 1.4 +@@ -103,6 +103,20 @@ struct ControlLayoutData + // returns the interval [start,end] of line nLine + // returns [-1,-1] for an invalid line + Pair GetLineStartEnd( long nLine ) const; ++ /** ToRelativeLineIndex changes a layout data index to a count relative to its line. ++ ++ <p>This is equivalent to getting the line start/end pairs with ++ <member>GetLineStartEnd</member> until the index lies within [start,end] of a line ++ </p> ++ ++ @param nIndex ++ the absolute index inside the display text to be changed to a relative index ++ ++ @returns ++ the relative index inside the displayed line or -1 if the absolute index does ++ not match any line ++ */ ++ long ToRelativeLineIndex( long nIndex ) const; + }; + + } // namespace vcl +Index: vcl/inc/ctrl.hxx +=================================================================== +RCS file: /cvs/gsl/vcl/inc/ctrl.hxx,v +retrieving revision 1.5 +retrieving revision 1.8 +diff -u -p -u -r1.5 -r1.8 +--- vcl/inc/ctrl.hxx 16 May 2002 11:52:49 -0000 1.5 ++++ vcl/inc/ctrl.hxx 18 May 2004 10:48:23 -0000 1.8 +@@ -73,6 +73,10 @@ + #include <window.hxx> + #endif + ++#ifndef _SV_NATIVEWIDGETS_HXX ++#include <salnativewidgets.hxx> ++#endif ++ + // forward + namespace vcl { struct ControlLayoutData; } + +@@ -83,27 +87,26 @@ namespace vcl { struct ControlLayoutData + class Control : public Window + { + protected: +- mutable vcl::ControlLayoutData* mpLayoutData; ++ mutable vcl::ControlLayoutData* mpLayoutData; + private: +- long mnDummy1; +- BOOL mbHasFocus; +- BOOL mbDummy1; +- BOOL mbDummy2; +- BOOL mbDummy3; +- Link maGetFocusHdl; +- Link maLoseFocusHdl; ++ BOOL mbHasFocus; ++ Link maGetFocusHdl; ++ Link maLoseFocusHdl; + +-#ifdef _SV_CTRL_CXX + void ImplInitData(); +-public: +- void ImplSubControlLayoutChanged() const; +-#endif ++ + protected: + Control( WindowType nType ); +- virtual void FillLayoutData() const; ++ virtual void FillLayoutData() const; + + // helper method for composite controls + void AppendLayoutData( const Control& rSubControl ) const; ++ ++#if _SOLAR__PRIVATE ++public: ++ void ImplClearLayoutData() const; ++#endif ++ + public: + Control( Window* pParent, WinBits nWinStyle = 0 ); + Control( Window* pParent, const ResId& rResId ); +@@ -129,6 +132,20 @@ public: + // returns the interval [start,end] of line nLine + // returns [-1,-1] for an invalid line + Pair GetLineStartEnd( long nLine ) const; ++ /** ToRelativeLineIndex changes a layout data index to a count relative to its line. ++ ++ <p>This is equivalent to getting the line start/end pairs with ++ <member>GetLineStartEnd</member> until the index lies within [start,end] of a line ++ </p> ++ ++ @param nIndex ++ the absolute index inside the display text to be changed to a relative index ++ ++ @returns ++ the relative index inside the displayed line or -1 if the absolute index does ++ not match any line ++ */ ++ long ToRelativeLineIndex( long nIndex ) const; + + + void SetGetFocusHdl( const Link& rLink ) { maGetFocusHdl = rLink; } +Index: vcl/inc/cursor.hxx +=================================================================== +RCS file: /cvs/gsl/vcl/inc/cursor.hxx,v +retrieving revision 1.3 +retrieving revision 1.4 +diff -u -p -u -r1.3 -r1.4 +--- vcl/inc/cursor.hxx 27 Mar 2003 17:57:20 -0000 1.3 ++++ vcl/inc/cursor.hxx 6 Jan 2004 12:55:28 -0000 1.4 +@@ -66,6 +66,10 @@ + #include <tools/gen.hxx> + #endif + ++#ifndef _LINK_HXX ++#include <tools/link.hxx> ++#endif ++ + #ifndef _SV_SV_H + #include <sv.h> + #endif +@@ -103,11 +107,9 @@ private: + + #if _SOLAR__PRIVATE + public: +-#ifdef _SV_CURSOR_CXX + void ImplDraw(); + void ImplRestore(); + DECL_LINK( ImplTimerHdl, AutoTimer* ); +-#endif + void ImplShow( BOOL bDrawDirect = TRUE ); + void ImplHide(); + void ImplNew(); +Index: vcl/inc/cvtsvm.hxx +=================================================================== +RCS file: /cvs/gsl/vcl/inc/cvtsvm.hxx,v +retrieving revision 1.3 +retrieving revision 1.4 +diff -u -p -u -r1.3 -r1.4 +--- vcl/inc/cvtsvm.hxx 7 Dec 2000 13:37:15 -0000 1.3 ++++ vcl/inc/cvtsvm.hxx 6 Jan 2004 12:55:49 -0000 1.4 +@@ -129,7 +129,6 @@ class SVMConverter + { + private: + #if _SOLAR__PRIVATE +-#ifdef _SV_CVTSVM_CXX + void ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf ); + void ImplConvertToSVM1( SvStream& rOStm, GDIMetaFile& rMtf ); + ULONG ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf, +@@ -137,7 +136,6 @@ private: + Color& rLineCol, Stack& rLineColStack, + rtl_TextEncoding& rActualCharSet ); + #endif +-#endif // __PRIVATE + + public: + SVMConverter( SvStream& rIStm, GDIMetaFile& rMtf, ULONG nConvertMode ); +Index: vcl/inc/decoview.hxx +=================================================================== +RCS file: /cvs/gsl/vcl/inc/decoview.hxx,v +retrieving revision 1.3 +retrieving revision 1.4 +diff -u -p -u -r1.3 -r1.4 +--- vcl/inc/decoview.hxx 27 Mar 2003 17:57:20 -0000 1.3 ++++ vcl/inc/decoview.hxx 10 May 2004 15:41:25 -0000 1.4 +@@ -88,6 +88,7 @@ class OutputDevice; + #define FRAME_DRAW_DOUBLEIN ((USHORT)0x0004) + #define FRAME_DRAW_DOUBLEOUT ((USHORT)0x0005) + #define FRAME_DRAW_MENU ((USHORT)0x0010) ++#define FRAME_DRAW_WINDOWBORDER ((USHORT)0x0020) + #define FRAME_DRAW_MONO ((USHORT)0x1000) + #define FRAME_DRAW_NODRAW ((USHORT)0x8000) + #define FRAME_DRAW_STYLE ((USHORT)0x000F) +Index: vcl/inc/dialog.hxx +=================================================================== +RCS file: /cvs/gsl/vcl/inc/dialog.hxx,v +retrieving revision 1.7.252.1 +retrieving revision 1.10 +diff -u -p -u -r1.7.252.1 -r1.10 +--- vcl/inc/dialog.hxx 31 Oct 2003 15:43:22 -0000 1.7.252.1 ++++ vcl/inc/dialog.hxx 17 Jun 2004 12:02:16 -0000 1.10 +@@ -81,20 +81,16 @@ class Dialog : public SystemWindow + { + private: + Window* mpDialogParent; +- long mnDummy; + Dialog* mpPrevExecuteDlg; + long* mpResult; +- long mnDummy1; + long mnMousePositioned; + BOOL mbInExecute; + BOOL mbOldSaveBack; + BOOL mbInClose; + BOOL mbModalMode; + +-#ifdef _SV_DIALOG_CXX + void ImplInitData(); + void ImplInitSettings(); +-#endif + + #if _SOLAR__PRIVATE + protected: +@@ -126,8 +122,8 @@ public: + void EndDialog( long nResult = 0 ); + static void EndAllDialogs( Window* pParent=NULL ); + +- void GetDrawWindowBorder( long& rLeftBorder, long& rTopBorder, +- long& rRightBorder, long& rBottomBorder ) const; ++ void GetDrawWindowBorder( sal_Int32& rLeftBorder, sal_Int32& rTopBorder, ++ sal_Int32& rRightBorder, sal_Int32& rBottomBorder ) const; + + void SetModalInputMode( BOOL bModal ); + void SetModalInputMode( BOOL bModal, BOOL bSubModalDialogs ); +Index: vcl/inc/dockwin.hxx +=================================================================== +RCS file: /cvs/gsl/vcl/inc/dockwin.hxx,v +retrieving revision 1.4 +retrieving revision 1.6 +diff -u -p -u -r1.4 -r1.6 +--- vcl/inc/dockwin.hxx 24 Apr 2002 15:41:07 -0000 1.4 ++++ vcl/inc/dockwin.hxx 17 Jun 2004 12:02:29 -0000 1.6 +@@ -89,10 +89,10 @@ private: + long mnTrackY; + long mnTrackWidth; + long mnTrackHeight; +- long mnDockLeft; +- long mnDockTop; +- long mnDockRight; +- long mnDockBottom; ++ sal_Int32 mnDockLeft; ++ sal_Int32 mnDockTop; ++ sal_Int32 mnDockRight; ++ sal_Int32 mnDockBottom; + WinBits mnFloatBits; + BOOL mbDockCanceled:1, + mbDockPrevented:1, +@@ -106,15 +106,10 @@ private: + mbPined:1, + mbRollUp:1, + mbDockBtn:1, +- mbHideBtn:1, +- mbDummy1:1, +- mbDummy2:1, +- mbDummy3:1; ++ mbHideBtn:1; + + #if _SOLAR__PRIVATE +-#ifdef _SV_DOCKWIN_CXX + void ImplInitData(); +-#endif + + protected: + void ImplInit( Window* pParent, WinBits nStyle ); +Index: vcl/inc/edit.hxx +=================================================================== +RCS file: /cvs/gsl/vcl/inc/edit.hxx,v +retrieving revision 1.11 +retrieving revision 1.13 +diff -u -p -u -r1.11 -r1.13 +--- vcl/inc/edit.hxx 27 Mar 2003 17:57:20 -0000 1.11 ++++ vcl/inc/edit.hxx 10 May 2004 15:41:45 -0000 1.13 +@@ -139,7 +139,6 @@ private: + Link maAutocompleteHdl; + + #if _SOLAR__PRIVATE +-#ifdef _SV_EDIT_CXX + DECL_LINK( ImplUpdateDataHdl, Timer* ); + + void ImplInitData(); +@@ -164,7 +163,6 @@ private: + void ImplPaste( ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::clipboard::XClipboard >& rxClipboard ); + long ImplGetExtraOffset() const; + #endif +-#endif + + protected: + #if _SOLAR__PRIVATE +@@ -174,6 +172,7 @@ protected: + void ImplLoadRes( const ResId& rResId ); + void ImplSetSelection( const Selection& rSelection, BOOL bPaint = TRUE ); + #endif ++ int ImplGetNativeControlType(); + + ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDragSourceListener > mxDnDListener; + +Index: vcl/inc/field.hxx +=================================================================== +RCS file: /cvs/gsl/vcl/inc/field.hxx,v +retrieving revision 1.9 +retrieving revision 1.12 +diff -u -p -u -r1.9 -r1.12 +--- vcl/inc/field.hxx 5 Nov 2001 13:00:00 -0000 1.9 ++++ vcl/inc/field.hxx 2 Apr 2004 10:35:02 -0000 1.12 +@@ -105,17 +105,10 @@ private: + BOOL mbEmptyFieldValue; + BOOL mbEmptyFieldValueEnabled; + BOOL mbDefaultLocale; +- ULONG mnDummy1; +- BOOL mbDummy1; +- BOOL mbDummy2; +- BOOL mbDummy3; +- BOOL mbDummy4; + + protected: +-#if defined( _SV_FIELD_CXX ) || defined( _SV_FIELD2_CXX ) || defined( VCL_LONGCURR_CXX ) + void ImplSetText( const XubString& rText, Selection* pNewSel = NULL ); + BOOL ImplGetEmptyFieldValue() const { return mbEmptyFieldValue; } +-#endif + + void SetFieldText( const XubString& rText, BOOL bKeepSelection ); + void SetEmptyFieldValueData( BOOL bValue ) { mbEmptyFieldValue = bValue; } +@@ -125,7 +118,7 @@ protected: + + public: + FormatterBase( Edit* pField = NULL ); +- ~FormatterBase(); ++ virtual ~FormatterBase(); + + const LocaleDataWrapper& GetLocaleDataWrapper() const; + +@@ -174,21 +163,16 @@ private: + XubString maFieldString; + XubString maLiteralMask; + USHORT mnFormatFlags; +- USHORT mnDummy1; + BOOL mbSameMask; + BOOL mbInPattKeyInput; +- BOOL mbDummy1; +- BYTE mbDummy2; + + protected: + PatternFormatter(); + +-#ifdef _SV_FIELD2_CXX + void ImplLoadRes( const ResId& rResId ); + void ImplSetMask( const ByteString& rEditMask, const XubString& rLiteralMask ); + BOOL ImplIsSameMask() const { return mbSameMask; } + BOOL& ImplGetInPattKeyInput() { return mbInPattKeyInput; } +-#endif + + public: + ~PatternFormatter(); +@@ -217,9 +201,7 @@ public: + class NumericFormatter : public FormatterBase + { + private: +-#ifdef _SV_FIELD_CXX + void ImplInit(); +-#endif + + protected: + long mnFieldValue; +@@ -233,8 +215,6 @@ protected: + USHORT mnDumym2; + BOOL mbThousandSep; + BOOL mbShowTrailingZeros; +- BYTE mbDummy2; +- BYTE mbDummy3; + + // Eigentlich nur am entsprechenden Feld einstellbar (fuer Interaktion), + // wird aber in allen Verschiedenen Ableitungen benoetigt +@@ -255,12 +235,10 @@ protected: + void FieldFirst(); + void FieldLast(); + +-#ifdef _SV_FIELD_CXX + void ImplLoadRes( const ResId& rResId ); + BOOL ImplNumericReformat( const XubString& rStr, double& rValue, XubString& rOutStr ); + void ImplNewFieldValue( long nNewValue ); + void ImplSetUserValue( long nNewValue, Selection* pNewSelection = NULL ); +-#endif + + public: + ~NumericFormatter(); +@@ -308,9 +286,7 @@ public: + class MetricFormatter : public NumericFormatter + { + private: +-#ifdef _SV_FIELD_CXX + void ImplInit(); +-#endif + + protected: + XubString maCustomUnitText; +@@ -324,10 +300,8 @@ protected: + + virtual XubString CreateFieldText( long nValue ) const; + +-#ifdef _SV_FIELD_CXX + void ImplLoadRes( const ResId& rResId ); + BOOL ImplMetricReformat( const XubString& rStr, double& rValue, XubString& rOutStr ); +-#endif + + public: + ~MetricFormatter(); +@@ -368,23 +342,13 @@ class CurrencyFormatter : public Numeric + { + private: + String maCurrencySymbol; +- BOOL mbDummy1; +- BOOL mbDummy2; +- BYTE mbDummy3; +- BYTE mbDummy4; + +-#ifdef _SV_FIELD_CXX + void ImplInit(); +-#endif + + protected: + CurrencyFormatter(); +- + virtual XubString CreateFieldText( long nValue ) const; +- +-#ifdef _SV_FIELD_CXX + BOOL ImplCurrencyReformat( const XubString& rStr, XubString& rOutStr ); +-#endif + + public: + ~CurrencyFormatter(); +@@ -417,19 +381,13 @@ private: + BOOL mbShowDateCentury; + USHORT mnDateFormat; + ULONG mnExtDateFormat; +- BOOL mbDummy1; +- BOOL mbDummy2; +- BYTE mbDummy3; +- BYTE mbDummy4; ++ BOOL mbEnforceValidValue; + +-#ifdef _SV_FIELD2_CXX + void ImplInit(); +-#endif + + protected: + DateFormatter(); + +-#ifdef _SV_FIELD2_CXX + void ImplLoadRes( const ResId& rResId ); + const Date& ImplGetFieldDate() const { return maFieldDate; } + BOOL ImplDateReformat( const XubString& rStr, XubString& rOutStr, +@@ -440,7 +398,8 @@ protected: + const AllSettings& rSettings ) const; + void ImplNewFieldValue( const Date& rDate ); + CalendarWrapper& GetCalendarWrapper() const; +-#endif ++ ++ BOOL ImplAllowMalformedInput() const; + + public: + ~DateFormatter(); +@@ -450,11 +409,6 @@ public: + + virtual void SetLocale( const ::com::sun::star::lang::Locale& rLocale ); + +-#if SUPD < 651 +- // MT 11/01: Seems that nobody uses them, I only want to use the ExtDateFormat now ( ## ) +- void SetDateFormat( DateFormat eFormat ); +- DateFormat GetDateFormat() const; +-#endif + + void SetExtDateFormat( ExtDateFieldFormat eFormat ); + ExtDateFieldFormat GetExtDateFormat( BOOL bResolveSystemFormat = FALSE ) const; +@@ -489,6 +443,23 @@ public: + + static void ExpandCentury( Date& rDate ); + static void ExpandCentury( Date& rDate, USHORT nTwoDigitYearStart ); ++ ++ static Date GetInvalidDate() { return Date( 0, 0, 0 ); } ++ ++ /** enables or disables the enforcement of valid values ++ ++ If this is set to <TRUE/> (which is the default), then GetDate will always return a valid ++ date, no matter whether the current text can really be interpreted as date. (Note: this ++ is the compatible bahavior). ++ ++ If this is set to <FALSE/>, the GetDate will return GetInvalidDate, in case the current text ++ cannot be interpreted as date. ++ ++ In addition, if this is set to <FALSE/>, the text in the field will <em>not</em> be corrected ++ when the control loses the focus - instead, the invalid input will be preserved. ++ */ ++ void EnforceValidValue( BOOL _bEnforce ) { mbEnforceValidValue = _bEnforce; } ++ inline BOOL IsEnforceValidValue( ) const { return mbEnforceValidValue; } + }; + + +@@ -507,27 +478,20 @@ private: + USHORT mnTimeFormat; + BOOL mbDuration; + BOOL mbEmptyTime; +- ULONG mnDummy1; +- BOOL mbDummy1; +- BOOL mbDummy2; +- BYTE mbDummy3; +- BYTE mbDummy4; ++ BOOL mbEnforceValidValue; + +-#ifdef _SV_FIELD2_CXX + void ImplInit(); +-#endif + + protected: + Time maFieldTime; + + TimeFormatter(); + +-#ifdef _SV_FIELD2_CXX + void ImplLoadRes( const ResId& rResId ); + BOOL ImplTimeReformat( const XubString& rStr, XubString& rOutStr ); + void ImplNewFieldValue( const Time& rTime ); + void ImplSetUserTime( const Time& rNewTime, Selection* pNewSelection = NULL ); +-#endif ++ BOOL ImplAllowMalformedInput() const; + + public: + ~TimeFormatter(); +@@ -557,6 +521,23 @@ public: + void SetEmptyTime() { FormatterBase::SetEmptyFieldValue(); } + BOOL IsEmptyTime() const { return FormatterBase::IsEmptyFieldValue(); } + Time GetCorrectedTime() const { return maCorrectedTime; } ++ ++ static Time GetInvalidTime() { return Time( 99, 99, 99 ); } ++ ++ /** enables or disables the enforcement of valid values ++ ++ If this is set to <TRUE/> (which is the default), then GetTime will always return a valid ++ time, no matter whether the current text can really be interpreted as time. (Note: this ++ is the compatible bahavior). ++ ++ If this is set to <FALSE/>, the GetTime will return GetInvalidTime, in case the current text ++ cannot be interpreted as time. ++ ++ In addition, if this is set to <FALSE/>, the text in the field will <em>not</em> be corrected ++ when the control loses the focus - instead, the invalid input will be preserved. ++ */ ++ void EnforceValidValue( BOOL _bEnforce ) { mbEnforceValidValue = _bEnforce; } ++ inline BOOL IsEnforceValidValue( ) const { return mbEnforceValidValue; } + }; + + +@@ -583,10 +564,8 @@ public: + + class NumericField : public SpinField, public NumericFormatter + { +-#ifdef _SV_FIELD_CXX + protected: + void ImplLoadRes( const ResId& rResId ); +-#endif + + public: + NumericField( Window* pParent, WinBits nWinStyle ); +@@ -612,10 +591,8 @@ public: + + class MetricField : public SpinField, public MetricFormatter + { +-#ifdef _SV_FIELD_CXX + protected: + void ImplLoadRes( const ResId& rResId ); +-#endif + + public: + MetricField( Window* pParent, WinBits nWinStyle ); +@@ -663,10 +640,8 @@ public: + + class CurrencyField : public SpinField, public CurrencyFormatter + { +-#ifdef _SV_FIELD_CXX + protected: + void ImplLoadRes( const ResId& rResId ); +-#endif + + public: + CurrencyField( Window* pParent, WinBits nWinStyle ); +@@ -696,11 +671,9 @@ private: + Date maFirst; + Date maLast; + +-#ifdef _SV_FIELD2_CXX + protected: + void ImplDateSpinArea( BOOL bUp ); + void ImplLoadRes( const ResId& rResId ); +-#endif + + public: + DateField( Window* pParent, WinBits nWinStyle ); +@@ -739,11 +707,9 @@ private: + Time maFirst; + Time maLast; + +-#ifdef _SV_FIELD2_CXX + protected: + void ImplTimeSpinArea( BOOL bUp ); + void ImplLoadRes( const ResId& rResId ); +-#endif + + public: + TimeField( Window* pParent, WinBits nWinStyle ); +Index: vcl/inc/fixbrd.hxx +=================================================================== +RCS file: /cvs/gsl/vcl/inc/fixbrd.hxx,v +retrieving revision 1.2 +retrieving revision 1.3 +diff -u -p -u -r1.2 -r1.3 +--- vcl/inc/fixbrd.hxx 7 Dec 2000 13:37:15 -0000 1.2 ++++ vcl/inc/fixbrd.hxx 6 Jan 2004 12:57:59 -0000 1.3 +@@ -91,18 +91,13 @@ class FixedBorder : public Control + private: + USHORT mnType; + BOOL mbTransparent; +- BOOL mbDummy1; + +-#if _SOLAR__PRIVATE +-#ifdef _SV_FIXBRD_CXX + private: + void ImplInit( Window* pParent, WinBits nStyle ); + WinBits ImplInitStyle( WinBits nStyle ); + void ImplInitSettings(); + void ImplDraw( OutputDevice* pDev, ULONG nDrawFlags, + const Point& rPos, const Size& rSize ); +-#endif +-#endif + + public: + FixedBorder( Window* pParent, WinBits nStyle = 0 ); +Index: vcl/inc/fixed.hxx +=================================================================== +RCS file: /cvs/gsl/vcl/inc/fixed.hxx,v +retrieving revision 1.5 +retrieving revision 1.6 +diff -u -p -u -r1.5 -r1.6 +--- vcl/inc/fixed.hxx 29 Apr 2002 17:46:17 -0000 1.5 ++++ vcl/inc/fixed.hxx 6 Jan 2004 12:58:20 -0000 1.6 +@@ -84,14 +84,12 @@ class UserDrawEvent; + class FixedText : public Control + { + #if _SOLAR__PRIVATE +-#ifdef _SV_FIXED_CXX + private: + void ImplInit( Window* pParent, WinBits nStyle ); + WinBits ImplInitStyle( WinBits nStyle ); + void ImplInitSettings( BOOL bFont, BOOL bForeground, BOOL bBackground ); + void ImplDraw( OutputDevice* pDev, ULONG nDrawFlags, + const Point& rPos, const Size& rSize, bool bFillLayout = false ) const; +-#endif + public: + static USHORT ImplGetTextStyle( WinBits nWinBits ); + #endif +@@ -116,17 +114,15 @@ public: + + class FixedLine : public Control + { +-#if _SOLAR__PRIVATE +-#ifdef _SV_FIXED_CXX + private: + void ImplInit( Window* pParent, WinBits nStyle ); + WinBits ImplInitStyle( WinBits nStyle ); + void ImplInitSettings( BOOL bFont, BOOL bForeground, BOOL bBackground ); + void ImplDraw( bool bLayout = false ); +-#endif +-#endif ++ + protected: +- virtual void FillLayoutData() const; ++ virtual void FillLayoutData() const; ++ + public: + FixedLine( Window* pParent, WinBits nStyle = WB_HORZ ); + FixedLine( Window* pParent, const ResId& rResId ); +@@ -148,19 +144,14 @@ private: + Bitmap maBitmap; + Bitmap maBitmapHC; + +-#if _SOLAR__PRIVATE +-#ifdef _SV_FIXED_CXX +-private: + void ImplInit( Window* pParent, WinBits nStyle ); + WinBits ImplInitStyle( WinBits nStyle ); + void ImplInitSettings(); + void ImplDraw( OutputDevice* pDev, ULONG nDrawFlags, + const Point& rPos, const Size& rSize ); +-#endif + + protected: + void ImplLoadRes( const ResId& rResId ); +-#endif + + public: + FixedBitmap( Window* pParent, WinBits nStyle = 0 ); +@@ -190,19 +181,15 @@ private: + Image maImageHC; + BOOL mbInUserDraw; + +-#if _SOLAR__PRIVATE +-#ifdef _SV_FIXED_CXX + private: + void ImplInit( Window* pParent, WinBits nStyle ); + WinBits ImplInitStyle( WinBits nStyle ); + void ImplInitSettings(); + void ImplDraw( OutputDevice* pDev, ULONG nDrawFlags, + const Point& rPos, const Size& rSize ); +-#endif + + protected: + void ImplLoadRes( const ResId& rResId ); +-#endif + + public: + FixedImage( Window* pParent, WinBits nStyle = 0 ); +Index: vcl/inc/floatwin.hxx +=================================================================== +RCS file: /cvs/gsl/vcl/inc/floatwin.hxx,v +retrieving revision 1.5 +retrieving revision 1.6 +diff -u -p -u -r1.5 -r1.6 +--- vcl/inc/floatwin.hxx 31 Oct 2001 19:28:50 -0000 1.5 ++++ vcl/inc/floatwin.hxx 6 Jan 2004 12:58:54 -0000 1.6 +@@ -114,7 +114,6 @@ private: + FloatingWindow* mpNextFloat; + Window* mpFirstPopupModeWin; + ToolBox* mpBox; +- void* mpDummy; + Rectangle maFloatRect; + ULONG mnPostId; + ULONG mnPopupModeFlags; +@@ -131,10 +130,8 @@ private: + Link maPopupModeEndHdl; + + #if _SOLAR__PRIVATE +-#ifdef _SV_FLOATWIN_CXX + void ImplCallPopupModeEnd(); + DECL_LINK( ImplEndPopupModeHdl, void* ); +-#endif + + protected: + void ImplInit( Window* pParent, WinBits nStyle ); +Index: vcl/inc/fntstyle.hxx +=================================================================== +RCS file: /cvs/gsl/vcl/inc/fntstyle.hxx,v +retrieving revision 1.2 +retrieving revision 1.3 +diff -u -p -u -r1.2 -r1.3 +--- vcl/inc/fntstyle.hxx 23 Mar 2001 11:44:51 -0000 1.2 ++++ vcl/inc/fntstyle.hxx 6 Jan 2004 12:59:13 -0000 1.3 +@@ -62,6 +62,7 @@ + #ifndef _VCL_FNTSTYLE_HXX + #define _VCL_FNTSTYLE_HXX + ++#include <tools/solar.h> + #include <sal/types.h> + + // -------------- +Index: vcl/inc/font.hxx +=================================================================== +RCS file: /cvs/gsl/vcl/inc/font.hxx,v +retrieving revision 1.6 +retrieving revision 1.8 +diff -u -p -u -r1.6 -r1.8 +--- vcl/inc/font.hxx 1 Aug 2001 12:32:45 -0000 1.6 ++++ vcl/inc/font.hxx 6 Jan 2004 12:59:38 -0000 1.8 +@@ -71,8 +71,8 @@ + #ifndef _TOOLS_LANG_HXX + #include <tools/lang.hxx> + #endif +-#ifndef _SV_COLOR_HXX +-#include <color.hxx> ++#ifndef _TOOLS_COLOR_HXX ++#include <tools/color.hxx> + #endif + #ifndef _VCL_VCLENUM_HXX + #include <vclenum.hxx> +@@ -81,12 +81,6 @@ + #include <fntstyle.hxx> + #endif + +-#ifdef SMART_UNO_GENERATION +-class Font_Type; +-class Font_Size; +-class Font_Attribs; +-#endif +- + class SvStream; + #define FontAlign TextAlign + +@@ -226,16 +220,4 @@ public: + + friend SvStream& operator>>( SvStream& rIStm, Font& rFont ); + friend SvStream& operator<<( SvStream& rOStm, const Font& rFont ); +- +-#ifdef SMART_UNO_GENERATION +- void getType( Font_Type& ) const; +- void setType( const Font_Type& ); +- +- void getSize( Font_Size& ) const; +- void setSize( const Font_Size& ); +- +- void getAttribs( Font_Attribs& ) const; +- void setAttribs( const Font_Attribs& ); +-#endif +- + }; + +Index: vcl/inc/fontcfg.hxx +=================================================================== +RCS file: /cvs/gsl/vcl/inc/fontcfg.hxx,v +retrieving revision 1.3 +retrieving revision 1.5 +diff -u -p -u -r1.3 -r1.5 +--- vcl/inc/fontcfg.hxx 29 May 2002 13:37:05 -0000 1.3 ++++ vcl/inc/fontcfg.hxx 25 Jun 2004 15:24:19 -0000 1.5 +@@ -66,43 +66,70 @@ + #ifndef _UTL_CONFIGITEM_HXX_ + #include <unotools/configitem.hxx> + #endif +-#ifndef _LANG_HXX +-#include <tools/lang.hxx> +-#endif + #ifndef _STRING_HXX + #include <tools/string.hxx> + #endif + #ifndef _VCL_ENUM_HXX + #include <vclenum.hxx> + #endif ++#ifndef _COM_SUN_STAR_LANG_LOCALE_HPP_ ++#include <com/sun/star/lang/Locale.hpp> ++#endif + +-#include <map> + #include <hash_map> + #include <vector> + ++namespace com { ++namespace sun { ++namespace star { ++namespace lang { ++ ++// equality operator needed for hash_map; ++// (-> why does this need to be in the namespace of Locale ? g++ fails to compile else) ++inline bool operator==( const com::sun::star::lang::Locale& rLeft, const com::sun::star::lang::Locale& rRight ) ++{ ++ return ++ rLeft.Language.equals( rRight.Language ) && ++ rLeft.Country.equals( rRight.Country ) && ++ rLeft.Variant.equals( rRight.Variant ) ++ ; ++} ++}}}} ++ + namespace vcl + { + ++struct LocaleHash ++{ ++ size_t operator()( const com::sun::star::lang::Locale& rLocale ) const ++ { ++ return ++ (size_t)rLocale.Language.hashCode() ^ ++ (size_t)rLocale.Country.hashCode() ^ ++ (size_t)rLocale.Variant.hashCode(); ++ } ++}; ++ + class DefaultFontConfigItem : public ::utl::ConfigItem + { + +- ::std::map< int, ::std::map< int, ::rtl::OUString > > m_aDefaults; ++ std::hash_map< com::sun::star::lang::Locale , std::hash_map< int, rtl::OUString >, vcl::LocaleHash > m_aDefaults; + +- virtual void Notify( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& rPropertyNames ); ++ virtual void Notify( const com::sun::star::uno::Sequence< rtl::OUString >& rPropertyNames ); + virtual void Commit(); + + void getValues(); +- static int getKeyType( const ::rtl::OUString& rKey ); ++ static int getKeyType( const rtl::OUString& rKey ); + DefaultFontConfigItem(); + public: + virtual ~DefaultFontConfigItem(); + + static DefaultFontConfigItem* get(); + +- const ::rtl::OUString& getDefaultFont( int nLanguage, int nType ) const; +- const ::rtl::OUString& getUserInterfaceFont( int nLanguage = LANGUAGE_SYSTEM ) const; ++ const rtl::OUString& getDefaultFont( const com::sun::star::lang::Locale& rLocale, int nType ) const; ++ const rtl::OUString& getUserInterfaceFont( const com::sun::star::lang::Locale& rLocale ) const; + +- void setDefaultFont( int nLanguage, int nType, const ::rtl::OUString& rName ); ++ void setDefaultFont( const com::sun::star::lang::Locale& rLocale, int nType, const rtl::OUString& rName ); + }; + + +@@ -170,13 +197,13 @@ public: + struct FontNameAttr + { + String Name; +- ::std::vector< String > Substitutions; +- ::std::vector< String > MSSubstitutions; +- ::std::vector< String > PSSubstitutions; +- ::std::vector< String > HTMLSubstitutions; +- FontWeight Weight; ++ std::vector< String > Substitutions; ++ std::vector< String > MSSubstitutions; ++ std::vector< String > PSSubstitutions; ++ std::vector< String > HTMLSubstitutions; ++ FontWeight Weight; + FontWidth Width; +- unsigned long Type; // bitfield of IMPL_FONT_ATTR_* ++ unsigned long Type; // bitfield of IMPL_FONT_ATTR_* + }; + private: + +@@ -184,9 +211,9 @@ private: + // searches on the substitutes are done with Name as key, where + // a minimal match is sufficient (that is e.g. "Thorndale" will match + // "Thorndale BlaBlub"). Also names must be lower case. +- ::std::map< int, ::std::vector< FontNameAttr > > m_aSubstitutions; ++ std::hash_map< com::sun::star::lang::Locale, std::vector< FontNameAttr >, vcl::LocaleHash > m_aSubstitutions; + +- virtual void Notify( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& rPropertyNames ); ++ virtual void Notify( const com::sun::star::uno::Sequence< rtl::OUString >& rPropertyNames ); + virtual void Commit(); + + void getValues(); +@@ -196,17 +223,23 @@ public: + + static FontSubstConfigItem* get(); + +- const FontNameAttr* getSubstInfo( const String& rFontName, int nLanguage = LANGUAGE_ENGLISH ) const; ++ const FontNameAttr* getSubstInfo( ++ const String& rFontName, ++ const com::sun::star::lang::Locale& rLocale = ++ com::sun::star::lang::Locale( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "en" ) ), ++ rtl::OUString(), ++ rtl::OUString() ) ++ ) const; + static void getMapName( const String& rOrgName, String& rShortName, String& rFamilyName, FontWeight& rWeight, FontWidth& rWidth, unsigned long& rType ); + }; + + class SettingsConfigItem : public ::utl::ConfigItem + { + +- ::std::hash_map< ::rtl::OUString, ::std::hash_map< ::rtl::OUString, ::rtl::OUString, ::rtl::OUStringHash >, ::rtl::OUStringHash > ++ std::hash_map< rtl::OUString, std::hash_map< rtl::OUString, rtl::OUString, rtl::OUStringHash >, rtl::OUStringHash > + m_aSettings; + +- virtual void Notify( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& rPropertyNames ); ++ virtual void Notify( const com::sun::star::uno::Sequence< rtl::OUString >& rPropertyNames ); + virtual void Commit(); + + void getValues(); +@@ -216,8 +249,8 @@ public: + + static SettingsConfigItem* get(); + +- const ::rtl::OUString& getValue( const ::rtl::OUString& rGroup, const ::rtl::OUString& rKey ) const; +- void setValue( const ::rtl::OUString& rGroup, const ::rtl::OUString& rKey, const ::rtl::OUString& rValue ); ++ const rtl::OUString& getValue( const rtl::OUString& rGroup, const rtl::OUString& rKey ) const; ++ void setValue( const rtl::OUString& rGroup, const rtl::OUString& rKey, const rtl::OUString& rValue ); + }; + + +Index: vcl/inc/gdimtf.hxx +=================================================================== +RCS file: /cvs/gsl/vcl/inc/gdimtf.hxx,v +retrieving revision 1.5 +retrieving revision 1.6 +diff -u -p -u -r1.5 -r1.6 +--- vcl/inc/gdimtf.hxx 18 Nov 2002 13:42:14 -0000 1.5 ++++ vcl/inc/gdimtf.hxx 6 Jan 2004 13:00:30 -0000 1.6 +@@ -98,6 +98,7 @@ class Gradient; + #ifndef METAFILE_END + #define METAFILE_END GDI_METAFILE_END + #endif ++ + #ifndef METAFILE_LABEL_NOTFOUND + #define METAFILE_LABEL_NOTFOUND GDI_METAFILE_LABEL_NOTFOUND + #endif +@@ -136,11 +137,7 @@ typedef BitmapEx (*BmpExchangeFnc)( cons + // - GDIMetaFile - + // --------------- + +-#ifndef MAC + class GDIMetaFile : protected List +-#else +-class GDIMetaFile : public List +-#endif + { + private: + +@@ -191,8 +188,8 @@ protected: + + public: + GDIMetaFile(); +- GDIMetaFile( const GDIMetaFile& rMtf ); +- ~GDIMetaFile(); ++ GDIMetaFile( const GDIMetaFile& rMtf ); ++ virtual ~GDIMetaFile(); + + GDIMetaFile& operator=( const GDIMetaFile& rMtf ); + BOOL operator==( const GDIMetaFile& rMtf ) const; +Index: vcl/inc/glyphcache.hxx +=================================================================== +RCS file: /cvs/gsl/vcl/inc/glyphcache.hxx,v +retrieving revision 1.19 +retrieving revision 1.22 +diff -u -p -u -r1.19 -r1.22 +--- vcl/inc/glyphcache.hxx 2 Jul 2003 13:38:54 -0000 1.19 ++++ vcl/inc/glyphcache.hxx 18 May 2004 10:48:36 -0000 1.22 +@@ -72,6 +72,7 @@ class ServerFontLayout; + + #include <tools/gen.hxx> + #include <hash_map> ++#include <map> + #include <hash_set> + + struct ImplFontSelectData; +@@ -90,14 +91,20 @@ bool operator==( const ImplFontSelectDat + + // ======================================================================= + ++namespace std { + template<> +-struct std::hash<ImplFontSelectData> ++struct hash<ImplFontSelectData> + { + size_t operator()( const ImplFontSelectData& ) const; + }; + ++} ++ + //-------- + ++typedef std::map< sal_Unicode, std::map< sal_Unicode, int > > unicodeKernMap; ++typedef std::map< int, std::map< int, int > > glyphKernMap; ++ + class GlyphCache + { + public: +@@ -110,7 +117,11 @@ public: + void ClearFontPath(); + void AddFontPath( const String& rFontPath ); + void AddFontFile( const rtl::OString& rNormalizedName, +- int nFaceNum, int nFontId, const ImplFontData* ); ++ int nFaceNum, ++ int nFontId, ++ const ImplFontData*, ++ const unicodeKernMap* pUniKernPairs = NULL ++ ); + long FetchFontList( ImplDevFontList* ) const; + + ServerFont* CacheFont( const ImplFontSelectData& ); +@@ -118,7 +129,7 @@ public: + void RemoveFont( const ImplFontData* ); + + private: +-friend ServerFont; ++ friend class ServerFont; + // used by ServerFont class only + void AddedGlyph( ServerFont& rServerFont, GlyphData& rGlyphData ); + void RemovingGlyph( ServerFont& rSF, GlyphData& rGD, int nGlyphIndex ); +@@ -156,7 +167,7 @@ public: + long GetCharWidth() const { return mnAdvanceWidth; } + + protected: +-friend class GlyphData; ++ friend class GlyphData; + void SetOffset( int nX, int nY ) { maOffset = Point( nX, nY); } + void SetDelta( int nX, int nY ) { maDelta = Point( nX, nY); } + void SetSize( const Size& s ) { maSize = s; } +@@ -218,8 +229,8 @@ public: + const ImplFontSelectData& GetFontSelData() const { return maFontSelData; } + + virtual void FetchFontMetric( ImplFontMetricData&, long& rFactor ) const = 0; +- virtual ULONG GetKernPairs( struct ImplKernPairData** ) const = 0; +- virtual int GetGlyphKernValue( int, int ) const = 0; ++ virtual ULONG GetKernPairs( struct ImplKernPairData** ) const; ++ virtual int GetGlyphKernValue( int, int ) const; + virtual ULONG GetFontCodeRanges( sal_uInt32* pCodes ) const { return 0; } + Point TransformPoint( const Point& ) const; + +@@ -238,9 +249,9 @@ public: + void* GetExtPointer() { return mpExtData; } + + protected: +-friend GlyphCache; +-friend ServerFontLayout; +- ServerFont( const ImplFontSelectData& ); ++ friend class GlyphCache; ++ friend class ServerFontLayout; ++ ServerFont( const ImplFontSelectData&, const glyphKernMap* pGlyphKern = NULL, const unicodeKernMap* pUniKern = NULL ); + virtual ~ServerFont(); + + void AddRef() const { ++mnRefCount; } +@@ -273,6 +284,12 @@ private: + protected: + long nCos; + long nSin; ++ ++ // maps left glyph id to map of right glyphid ++ // the inner map maps right glyphid to kern value ++ const glyphKernMap* mpKernPairs; ++ const unicodeKernMap* mpUnicodeKernPairs; ++ + }; + + // ======================================================================= +Index: vcl/inc/gradient.hxx +=================================================================== +RCS file: /cvs/gsl/vcl/inc/gradient.hxx,v +retrieving revision 1.1.1.1 +retrieving revision 1.3 +diff -u -p -u -r1.1.1.1 -r1.3 +--- vcl/inc/gradient.hxx 19 Sep 2000 10:23:04 -0000 1.1.1.1 ++++ vcl/inc/gradient.hxx 6 Jan 2004 13:01:22 -0000 1.3 +@@ -62,7 +62,10 @@ + #ifndef _SV_GRADIENT_HXX + #define _SV_GRADIENT_HXX + +-#include <color.hxx> ++#ifndef _TOOLS_COLOR_HXX ++#include <tools/color.hxx> ++#endif ++ + #include <vclenum.hxx> + + // ------------------ +@@ -160,29 +163,6 @@ public: + + friend SvStream& operator>>( SvStream& rIStm, Gradient& rGradient ); + friend SvStream& operator<<( SvStream& rOStm, const Gradient& rGradient ); +- +-#ifdef SMART_UNO_GENERATION +- GradientStyle getStyle() const { return GetStyle(); } +- void setStyle( GradientStyle e ) { SetStyle( e ); } +- long getStartColor() const { return GetStartColor().GetColor(); } +- void setStartColor( long n ) { SetStartColor( Color( n ) ); } +- long getEndColor() const { return GetEndColor().GetColor(); } +- void setEndColor( long n ) { SetEndColor( Color( n ) ); } +- USHORT getAngle() const { return GetAngle(); } +- void setAngle( USHORT n ) { SetAngle( n ); } +- USHORT getBorder() const { return GetBorder(); } +- void setBorder( USHORT n ) { SetBorder( n ); } +- USHORT getXOffset() const { return GetOfsX(); } +- void setXOffset( USHORT n ) { SetOfsX( n ); } +- USHORT getYOffset() const { return GetOfsY(); } +- void setYOffset( USHORT n ) { SetOfsY( n ); } +- USHORT getStartIntensity() const { return GetStartIntensity(); } +- void setStartIntensity( USHORT n ) { SetStartIntensity( n ); } +- USHORT getEndIntensity() const { return GetEndIntensity(); } +- void setEndIntensity( USHORT n ) { SetEndIntensity( n ); } +- USHORT getStepCount() const { return GetSteps(); } +- void setStepCount( USHORT n ) { SetSteps( n ); } +-#endif + }; + + #endif // _SV_GRADIENT_HXX +Index: vcl/inc/graph.hxx +=================================================================== +RCS file: /cvs/gsl/vcl/inc/graph.hxx,v +retrieving revision 1.6 +retrieving revision 1.7 +diff -u -p -u -r1.6 -r1.7 +--- vcl/inc/graph.hxx 27 Mar 2003 17:57:21 -0000 1.6 ++++ vcl/inc/graph.hxx 20 Apr 2004 13:53:29 -0000 1.7 +@@ -143,6 +143,8 @@ public: + Bitmap GetBitmap( const Size* pSizePixel ) const; + BitmapEx GetBitmapEx() const; + BitmapEx GetBitmapEx( const Size* pSizePixel ) const; ++ Bitmap GetUnlimitedBitmap( const Size* pSizePixel ) const; ++ BitmapEx GetUnlimitedBitmapEx( const Size* pSizePixel ) const; + Animation GetAnimation() const; + const GDIMetaFile& GetGDIMetaFile() const; + +Index: vcl/inc/group.hxx +=================================================================== +RCS file: /cvs/gsl/vcl/inc/group.hxx,v +retrieving revision 1.2 +retrieving revision 1.3 +diff -u -p -u -r1.2 -r1.3 +--- vcl/inc/group.hxx 8 May 2002 16:01:29 -0000 1.2 ++++ vcl/inc/group.hxx 6 Jan 2004 13:01:39 -0000 1.3 +@@ -75,16 +75,15 @@ + + class GroupBox : public Control + { +-#ifdef _SV_GROUP_CXX + private: + void ImplInit( Window* pParent, WinBits nStyle ); + WinBits ImplInitStyle( WinBits nStyle ); + void ImplInitSettings( BOOL bFont, BOOL bForeground, BOOL bBackground ); + void ImplDraw( OutputDevice* pDev, ULONG nDrawFlags, + const Point& rPos, const Size& rSize, bool bLayout = false ); +-#endif + +- virtual void FillLayoutData() const; ++ virtual void FillLayoutData() const; ++ + public: + GroupBox( Window* pParent, WinBits nStyle = 0 ); + GroupBox( Window* pParent, const ResId& rResId ); +Index: vcl/inc/hatch.hxx +=================================================================== +RCS file: /cvs/gsl/vcl/inc/hatch.hxx,v +retrieving revision 1.1.1.1 +retrieving revision 1.3 +diff -u -p -u -r1.1.1.1 -r1.3 +--- vcl/inc/hatch.hxx 19 Sep 2000 10:23:04 -0000 1.1.1.1 ++++ vcl/inc/hatch.hxx 6 Jan 2004 13:01:57 -0000 1.3 +@@ -62,7 +62,10 @@ + #ifndef _SV_HATCH_HXX + #define _SV_HATCH_HXX + +-#include <color.hxx> ++#ifndef _TOOLS_COLOR_HXX ++#include <tools/color.hxx> ++#endif ++ + #include <vclenum.hxx> + + // -------------- +@@ -77,7 +80,6 @@ struct ImplHatch + Color maColor; + HatchStyle meStyle; + long mnDistance; +- long mnDummy; + USHORT mnAngle; + + ImplHatch(); +@@ -124,22 +126,6 @@ public: + + friend SvStream& operator>>( SvStream& rIStm, Hatch& rHatch ); + friend SvStream& operator<<( SvStream& rOStm, const Hatch& rHatch ); +- +-#ifdef SMART_UNO_GENERATION +- +- HatchStyle getStyle() const { return GetStyle(); } +- void setStyle( HatchStyle eStyle ) { SetStyle( eStyle ); } +- +- long getColor() const { return GetColor().GetColor(); } +- void setColor( long nColor ) { SetColor( Color( nColor ) ); } +- +- long getDistance() const { return GetDistance(); } +- void setDistance( ULONG nDistance ) { SetDistance( nDistance ); } +- +- USHORT getAngle() const { return GetAngle(); } +- void setAngle( USHORT n ) { SetAngle( n ); } +- +-#endif + }; + + #endif // _SV_HATCH_HXX +Index: vcl/inc/help.hxx +=================================================================== +RCS file: /cvs/gsl/vcl/inc/help.hxx,v +retrieving revision 1.3.284.1 +retrieving revision 1.5 +diff -u -p -u -r1.3.284.1 -r1.5 +--- vcl/inc/help.hxx 9 Jan 2004 18:13:39 -0000 1.3.284.1 ++++ vcl/inc/help.hxx 6 Jan 2004 13:02:14 -0000 1.5 +@@ -103,6 +103,7 @@ private: + + public: + Help(); ++ virtual ~Help(); + + void SetHelpFile( const String& rFileName ) { maHelpFile = rFileName; } + const String& GetHelpFile() const { return maHelpFile; } +Index: vcl/inc/ilstbox.hxx +=================================================================== +RCS file: /cvs/gsl/vcl/inc/ilstbox.hxx,v +retrieving revision 1.20 +retrieving revision 1.23 +diff -u -p -u -r1.20 -r1.23 +--- vcl/inc/ilstbox.hxx 24 Apr 2003 16:29:18 -0000 1.20 ++++ vcl/inc/ilstbox.hxx 18 May 2004 10:48:51 -0000 1.23 +@@ -244,7 +244,7 @@ private: + USHORT mnBorder; // Abstand Rahmen - Text + USHORT mnTextHeight; // Texthoehe + +- USHORT mnSelectModifier; // Modifiers ++ USHORT mnSelectModifier; // Modifiers + + BOOL mbHasFocusRect; + +@@ -261,8 +261,8 @@ private: + mbGrabFocus: 1, // Focus bei MBDown grabben + mbUserDrawEnabled: 1, // UserDraw possible + mbInUserDraw: 1, // In UserDraw +- mbReadOnly: 1; // ReadOnly +- ++ mbReadOnly: 1, // ReadOnly ++ mbMirroring: 1; // pb: #106948# explicit mirroring for calc + + Link maScrollHdl; + Link maSelectHdl; +@@ -273,7 +273,7 @@ private: + + protected: + DECL_LINK( SearchStringTimeout, Timer* ); +- ++ + virtual void KeyInput( const KeyEvent& rKEvt ); + virtual void MouseButtonDown( const MouseEvent& rMEvt ); + virtual void MouseMove( const MouseEvent& rMEvt ); +@@ -293,7 +293,7 @@ protected: + void ImplShowFocusRect(); + void ImplHideFocusRect(); + +- ++ + virtual void StateChanged( StateChangedType nType ); + virtual void DataChanged( const DataChangedEvent& rDCEvt ); + +@@ -316,6 +316,7 @@ public: + + void SelectEntry( USHORT nPos, BOOL bSelect ); + void DeselectAll(); ++ USHORT GetEntryPosForPoint( const Point& rPoint ) const; + + BOOL ProcessKeyInput( const KeyEvent& rKEvt ); + +@@ -342,13 +343,13 @@ public: + + void EnableUserDraw( BOOL bUserDraw ) { mbUserDrawEnabled = bUserDraw; } + BOOL IsUserDrawEnabled() const { return mbUserDrawEnabled; } +- ++ + void EnableMultiSelection( BOOL bMulti, BOOL bStackMode ) { mbMulti = bMulti; mbStackMode = bStackMode; } + BOOL IsMultiSelectionEnabled() const { return mbMulti; } +- ++ + void SetMultiSelectionSimpleMode( BOOL bSimple ) { mbSimpleMode = bSimple; } + BOOL IsMultiSelectionSimpleMode() const { return mbSimpleMode; } +- ++ + void EnableMouseMoveSelect( BOOL bMouseMoveSelect ) { mbMouseMoveSelect = bMouseMoveSelect; } + BOOL IsMouseMoveSelectEnabled() const { return mbMouseMoveSelect; } + BOOL IsMouseMoveSelect() const { return mbMouseMoveSelect||mbStackMode; } +@@ -372,7 +373,7 @@ public: + const Link& GetUserDrawHdl() const { return maUserDrawHdl; } + void SetMRUChangedHdl( const Link& rLink ) { maMRUChangedHdl = rLink; } + const Link& GetMRUChangedHdl() const { return maMRUChangedHdl; } +- ++ + BOOL IsSelectionChanged() const { return mbSelectionChanged; } + USHORT GetSelectModifier() const { return mnSelectModifier; } + +@@ -381,8 +382,11 @@ public: + void SetReadOnly( BOOL bReadOnly ) { mbReadOnly = bReadOnly; } + BOOL IsReadOnly() const { return mbReadOnly; } + +- + void ImplInitSettings( BOOL bFont, BOOL bForeground, BOOL bBackground ); ++ ++ // pb: #106948# explicit mirroring for calc ++ inline void EnableMirroring() { mbMirroring = TRUE; } ++ inline BOOL IsMirroring() const { return mbMirroring; } + }; + + // --------------- +@@ -422,7 +426,7 @@ public: + + const ImplEntryList* GetEntryList() const { return maLBWindow.GetEntryList(); } + ImplListBoxWindow* GetMainWindow() { return &maLBWindow; } +- ++ + virtual void Resize(); + virtual const Wallpaper& GetDisplayBackground() const; + virtual Window* GetPreferredKeyInputWindow(); +@@ -441,7 +445,7 @@ public: + + BOOL ProcessKeyInput( const KeyEvent& rKEvt ) { return maLBWindow.ProcessKeyInput( rKEvt ); } + BOOL HandleWheelAsCursorTravel( const CommandEvent& rCEvt ); +- ++ + void SetSeparatorPos( USHORT n ) { maLBWindow.SetSeparatorPos( n ); } + USHORT GetSeparatorPos() const { return maLBWindow.GetSeparatorPos(); } + +@@ -459,7 +463,7 @@ public: + + void EnableMultiSelection( BOOL bMulti, BOOL bStackMode ) { maLBWindow.EnableMultiSelection( bMulti, bStackMode ); } + BOOL IsMultiSelectionEnabled() const { return maLBWindow.IsMultiSelectionEnabled(); } +- ++ + void SetMultiSelectionSimpleMode( BOOL bSimple ) { maLBWindow.SetMultiSelectionSimpleMode( bSimple ); } + BOOL IsMultiSelectionSimpleMode() const { return maLBWindow.IsMultiSelectionSimpleMode(); } + +@@ -481,7 +485,7 @@ public: + const Link& GetDoubleClickHdl() const { return maLBWindow.GetDoubleClickHdl(); } + void SetUserDrawHdl( const Link& rLink ) { maLBWindow.SetUserDrawHdl( rLink ); } + const Link& GetUserDrawHdl() const { return maLBWindow.GetUserDrawHdl(); } +- ++ + void SetSelectionChangedHdl( const Link& rLnk ) { maLBWindow.GetEntryList()->SetSelectionChangedHdl( rLnk ); } + void SetCallSelectionChangedHdl( BOOL bCall ) { maLBWindow.GetEntryList()->SetCallSelectionChangedHdl( bCall ); } + BOOL IsSelectionChanged() const { return maLBWindow.IsSelectionChanged(); } +@@ -493,6 +497,9 @@ public: + USHORT GetMaxMRUCount() const { return maLBWindow.GetEntryList()->GetMaxMRUCount(); } + USHORT GetDisplayLineCount() const + { return maLBWindow.GetDisplayLineCount(); } ++ ++ // pb: #106948# explicit mirroring for calc ++ inline void EnableMirroring() { maLBWindow.EnableMirroring(); } + }; + + // ----------------------------- +@@ -535,6 +542,8 @@ public: + USHORT GetDropDownLineCount() const { return mnDDLineCount; } + + USHORT GetPopupModeStartSaveSelection() const { return mnPopupModeStartSaveSelection; } ++ ++ virtual void Resize(); + }; + + // ----------- +@@ -544,15 +553,15 @@ public: + class ImplWin : public Control + { + private: +- ++ + USHORT mnItemPos; // wegen UserDraw muss ich wissen, welches Item ich darstelle. + XubString maString; + Image maImage; + Image maImageHC; +- ++ + Rectangle maFocusRect; + Size maUserItemSize; +- ++ + Link maMBDownHdl; + Link maUserDrawHdl; + +@@ -573,10 +582,11 @@ public: + virtual void Resize(); + virtual void GetFocus(); + virtual void LoseFocus(); ++ virtual long PreNotify( NotifyEvent& rNEvt ); + + USHORT GetItemPos() const { return mnItemPos; } + void SetItemPos( USHORT n ) { mnItemPos = n; } +- ++ + const XubString& GetString() const { return maString; } + void SetString( const XubString& rStr ) { maString = rStr; } + +@@ -590,16 +600,16 @@ public: + virtual void MBDown(); + void SetMBDownHdl( const Link& rLink ) { maMBDownHdl = rLink; } + const Link& GetMBDownHdl() const { return maMBDownHdl; } +- ++ + void SetUserDrawHdl( const Link& rLink ) { maUserDrawHdl = rLink; } + const Link& GetUserDrawHdl() const { return maUserDrawHdl; } +- ++ + void SetUserItemSize( const Size& rSz ) { maUserItemSize = rSz; } + const Size& GetUserItemSize() const { return maUserItemSize; } + + void EnableUserDraw( BOOL bUserDraw ) { mbUserDrawEnabled = bUserDraw; } + BOOL IsUserDrawEnabled() const { return mbUserDrawEnabled; } +- ++ + void DrawEntry( BOOL bDrawImage, BOOL bDrawText, BOOL bDrawTextAtImagePos = FALSE, bool bLayout = false ); + }; + +Index: vcl/inc/imgcons.hxx +=================================================================== +RCS file: /cvs/gsl/vcl/inc/imgcons.hxx,v +retrieving revision 1.1.1.1 +retrieving revision 1.2 +diff -u -p -u -r1.1.1.1 -r1.2 +--- vcl/inc/imgcons.hxx 19 Sep 2000 10:23:04 -0000 1.1.1.1 ++++ vcl/inc/imgcons.hxx 6 Jan 2004 13:03:07 -0000 1.2 +@@ -85,7 +85,6 @@ private: + Bitmap maBitmap; + Bitmap maMask; + Rectangle maChangedRect; +- Rectangle maDummyRect; + Size maSize; + ImplColorMapper* mpMapper; + Color* mpPal; +@@ -94,10 +93,6 @@ private: + ULONG mnFormat; + ULONG mnStatus; + BOOL mbTrans; +- long mnDummy1; +- long mnDummy2; +- BOOL mbDummy1; +- BOOL mbDummy2; + + protected: + +Index: vcl/inc/imgctrl.hxx +=================================================================== +RCS file: /cvs/gsl/vcl/inc/imgctrl.hxx,v +retrieving revision 1.4 +retrieving revision 1.5 +diff -u -p -u -r1.4 -r1.5 +--- vcl/inc/imgctrl.hxx 15 Aug 2002 14:49:14 -0000 1.4 ++++ vcl/inc/imgctrl.hxx 6 Jan 2004 13:03:24 -0000 1.5 +@@ -74,7 +74,7 @@ class ImageControl : public FixedImage + private: + BitmapEx maBmp; + BitmapEx maBmpHC; +- ULONG mnDummy1_mbScaleImage; // Change member in next full update! ++ BOOL mbScaleImage; + + public: + ImageControl( Window* pParent, WinBits nStyle = 0 ); +Index: vcl/inc/impbmp.hxx +=================================================================== +RCS file: /cvs/gsl/vcl/inc/impbmp.hxx,v +retrieving revision 1.2 +retrieving revision 1.3 +diff -u -p -u -r1.2 -r1.3 +--- vcl/inc/impbmp.hxx 7 Dec 2000 13:37:15 -0000 1.2 ++++ vcl/inc/impbmp.hxx 1 Dec 2003 12:53:44 -0000 1.3 +@@ -92,11 +92,7 @@ private: + ULONG mnRefCount; + ULONG mnChecksum; + RMBitmap* mpRMBitmap; +-#ifndef REMOTE_APPSERVER + SalBitmap* mpSalBitmap; +-#else +- ImplServerBitmap* mpSalBitmap; +-#endif + + public: + +@@ -107,41 +103,8 @@ public: + + public: + +-#ifndef REMOTE_APPSERVER + void ImplSetSalBitmap( SalBitmap* pSalBitmap ); + SalBitmap* ImplGetSalBitmap() const { return mpSalBitmap; } +-#else +- void ImplSetSalBitmap( ImplServerBitmap* pSalBitmap ); +- ImplServerBitmap* ImplGetSalBitmap() const { return mpSalBitmap; } +- +- RMBitmap* ImplGetRemoteBmp(); +- +- void ImplCreateRemoteBmp( const Bitmap& rBitmap ); +- void ImplCreateRemoteBmp( const Bitmap& rBitmap, +- OutputDevice* pOut, +- const Point& rPt, const Size& rSz ); +- +- void ImplReleaseRemoteBmp(); +- +- void ImplDrawRemoteBmp( OutputDevice* pOut, +- const Point& rSrcPt, const Size& rSrcSz, +- const Point& rDestPt, const Size& rDestSz ); +- void ImplDrawRemoteBmpEx( OutputDevice* pOut, +- const Point& rSrcPt, const Size& rSrcSz, +- const Point& rDestPt, const Size& rDestSz, +- const Bitmap& rMask ); +- void ImplDrawRemoteBmpAlpha( OutputDevice* pOut, +- const Point& rSrcPt, const Size& rSrcSz, +- const Point& rDestPt, const Size& rDestSz, +- const AlphaMask& rAlpha ); +- void ImplDrawRemoteBmpMask( OutputDevice* pOut, +- const Point& rSrcPt, const Size& rSrcSz, +- const Point& rDestPt, const Size& rDestSz, +- const Color& rColor ); +- +- BOOL ImplIsGetPrepared() const; +- void ImplResolveGet(); +-#endif + + public: + +Index: vcl/inc/impgraph.hxx +=================================================================== +RCS file: /cvs/gsl/vcl/inc/impgraph.hxx,v +retrieving revision 1.3 +retrieving revision 1.4 +diff -u -p -u -r1.3 -r1.4 +--- vcl/inc/impgraph.hxx 24 Aug 2001 14:07:49 -0000 1.3 ++++ vcl/inc/impgraph.hxx 20 Apr 2004 13:53:44 -0000 1.4 +@@ -144,8 +144,8 @@ private: + BOOL ImplIsAlpha() const; + BOOL ImplIsAnimated() const; + +- Bitmap ImplGetBitmap( const Size* pSizePixel ) const; +- BitmapEx ImplGetBitmapEx( const Size* pSizePixel ) const; ++ Bitmap ImplGetBitmap( const Size* pSizePixel, BOOL bUnlimited ) const; ++ BitmapEx ImplGetBitmapEx( const Size* pSizePixel, BOOL bUnlimited ) const; + Animation ImplGetAnimation() const; + const GDIMetaFile& ImplGetGDIMetaFile() const; + +Index: vcl/inc/jobset.h +=================================================================== +RCS file: /cvs/gsl/vcl/inc/jobset.h,v +retrieving revision 1.5 +retrieving revision 1.6 +diff -u -p -u -r1.5 -r1.6 +--- vcl/inc/jobset.h 6 Mar 2002 11:13:54 -0000 1.5 ++++ vcl/inc/jobset.h 6 Jan 2004 13:03:42 -0000 1.6 +@@ -72,7 +72,7 @@ + #ifndef _SV_PRNTYPES_HXX + #include <prntypes.hxx> + #endif +-#ifndef __SGI_STL_HASH_MAP ++#ifndef _STLP_HASH_MAP + #include <hash_map> + #endif + #ifndef _RTL_USTRING_ +Index: vcl/inc/jobset.hxx +=================================================================== +RCS file: /cvs/gsl/vcl/inc/jobset.hxx,v +retrieving revision 1.4 +retrieving revision 1.5 +diff -u -p -u -r1.4 -r1.5 +--- vcl/inc/jobset.hxx 19 Dec 2001 14:43:31 -0000 1.4 ++++ vcl/inc/jobset.hxx 1 Dec 2003 12:54:41 -0000 1.5 +@@ -75,10 +75,6 @@ + class SvStream; + struct ImplJobSetup; + +-#ifdef REMOTE_APPSERVER +-namespace com { namespace sun { namespace star { namespace portal { namespace client { struct RmJobSetup; } } } } } +-#endif +- + // ------------ + // - JobSetup - + // ------------ +@@ -115,10 +111,6 @@ public: + + + JobSetup& operator=( const JobSetup& rJob ); +-#ifdef REMOTE_APPSERVER +- JobSetup& operator=( const ::com::sun::star::portal::client::RmJobSetup& ); +- void SetRmJobSetup( ::com::sun::star::portal::client::RmJobSetup& ) const; +-#endif + + BOOL operator==( const JobSetup& rJobSetup ) const; + BOOL operator!=( const JobSetup& rJobSetup ) const +Index: vcl/inc/keycod.hxx +=================================================================== +RCS file: /cvs/gsl/vcl/inc/keycod.hxx,v +retrieving revision 1.2 +retrieving revision 1.3 +diff -u -p -u -r1.2 -r1.3 +--- vcl/inc/keycod.hxx 27 Feb 2002 12:11:26 -0000 1.2 ++++ vcl/inc/keycod.hxx 6 Jan 2004 13:03:58 -0000 1.3 +@@ -69,8 +69,8 @@ + #ifndef _SV_SV_H + #include <sv.h> + #endif +-#ifndef _SV_RESID_HXX +-#include <resid.hxx> ++#ifndef _TOOLS_RESID_HXX ++#include <tools/resid.hxx> + #endif + #ifndef _SV_KEYCODES_HXX + #include <keycodes.hxx> +Index: vcl/inc/keycodes.hxx +=================================================================== +RCS file: /cvs/gsl/vcl/inc/keycodes.hxx,v +retrieving revision 1.2.250.1 +retrieving revision 1.5 +diff -u -p -u -r1.2.250.1 -r1.5 +--- vcl/inc/keycodes.hxx 9 Jan 2004 18:13:39 -0000 1.2.250.1 ++++ vcl/inc/keycodes.hxx 17 Mar 2004 10:04:17 -0000 1.5 +@@ -70,7 +70,7 @@ + // - KeyCode-Types - + // ----------------- + +-// By changes you must also change: tools/vclrsc.hxx ++// By changes you must also change: rsc/vclrsc.hxx + + // Key-Gruppen + #define KEYGROUP_NUM ((USHORT)0x0100) +@@ -186,6 +186,7 @@ + #define KEY_MENU ((USHORT)(KEYGROUP_MISC+26)) + #define KEY_HELP ((USHORT)(KEYGROUP_MISC+27)) + #define KEY_HANGUL_HANJA ((USHORT)(KEYGROUP_MISC+28)) ++#define KEY_DECIMAL ((USHORT)(KEYGROUP_MISC+29)) + + #define KEY_CODE ((USHORT)0x0FFF) + +Index: vcl/inc/lineinfo.hxx +=================================================================== +RCS file: /cvs/gsl/vcl/inc/lineinfo.hxx,v +retrieving revision 1.1.1.1 +retrieving revision 1.2 +diff -u -p -u -r1.1.1.1 -r1.2 +--- vcl/inc/lineinfo.hxx 19 Sep 2000 10:23:05 -0000 1.1.1.1 ++++ vcl/inc/lineinfo.hxx 4 Sep 2003 07:41:49 -0000 1.2 +@@ -140,31 +140,6 @@ public: + + friend SvStream& operator>>( SvStream& rIStm, LineInfo& rLineInfo ); + friend SvStream& operator<<( SvStream& rOStm, const LineInfo& rLineInfo ); +- +-#ifdef SMART_UNO_GENERATION +- +- LineStyle getStyle() const { return GetStyle(); } +- void setStyle( LineStyle eStyle ) { SetStyle( eStyle ); } +- +- long getWidth() const { return GetWidth(); } +- void setWidth( ULONG nDistance ) { SetWidth( nWidth ); } +- +- USORT getDashCount const { return GetDashCount(); } +- void setDashCount( USHORT nDashCount ) { SetDashCount( nDashCount ); } +- +- long getDashLen() const { return GetDashLen(); } +- void setDashLen( long nDashLen ) { SetDashLen( nDashLen ); } +- +- USHORT getDotCount() const { return GetDotCount(); } +- void setDotCount( USHORT nDotCount ) { SetDotCount( nDotCount ); } +- +- long getDotLen() const { GetDotLen(); } +- void setDotLen( long nDotLen ) { SetDotLen( nDotLen ); } +- +- long getDistance() const { return GetDistance(); } +- void setDistance( long nDistance ) { SetDistance( nDistance ); } +- +-#endif + }; + + #endif // _SV_LINEINFO_HXX +Index: vcl/inc/longcurr.hxx +=================================================================== +RCS file: /cvs/gsl/vcl/inc/longcurr.hxx,v +retrieving revision 1.3 +retrieving revision 1.4 +diff -u -p -u -r1.3 -r1.4 +--- vcl/inc/longcurr.hxx 29 Jun 2001 10:17:29 -0000 1.3 ++++ vcl/inc/longcurr.hxx 6 Jan 2004 13:04:51 -0000 1.4 +@@ -77,12 +77,9 @@ class LocaleDataWrapper; + + class LongCurrencyFormatter : public FormatterBase + { +-#if _SOLAR__PRIVATE +-#ifdef VCL_LONGCURR_CXX +- friend BOOL ImplLongCurrencyReformat( const XubString&, BigInt, BigInt, USHORT, const LocaleDataWrapper&, XubString&, LongCurrencyFormatter& ); ++private: ++ friend BOOL ImplLongCurrencyReformat( const XubString&, BigInt, BigInt, USHORT, const LocaleDataWrapper&, XubString&, LongCurrencyFormatter& ); + void ImpInit(); +-#endif +-#endif + + protected: + BigInt mnFieldValue; +@@ -95,9 +92,6 @@ protected: + USHORT mnDecimalDigits; + BOOL mbThousandSep; + +- ULONG mnDummy; +- BOOL mbDummy; +- + LongCurrencyFormatter(); + void ImplLoadRes( const ResId& rResId ); + +@@ -141,9 +135,7 @@ public: + class LongCurrencyField : public SpinField, public LongCurrencyFormatter + { + #if _SOLAR__PRIVATE +-#ifdef VCL_LONGCURR_CXX + friend void ImplNewLongCurrencyFieldValue( LongCurrencyField*, BigInt ); +-#endif + #endif + + private: +Index: vcl/inc/lstbox.hxx +=================================================================== +RCS file: /cvs/gsl/vcl/inc/lstbox.hxx,v +retrieving revision 1.12 +retrieving revision 1.14 +diff -u -p -u -r1.12 -r1.14 +--- vcl/inc/lstbox.hxx 1 Nov 2002 09:00:27 -0000 1.12 ++++ vcl/inc/lstbox.hxx 18 May 2004 10:49:04 -0000 1.14 +@@ -232,6 +232,9 @@ public: + USHORT GetMaxMRUCount() const; + + USHORT GetDisplayLineCount() const; ++ ++ void EnableMirroring(); ++ + }; + + + +Index: vcl/inc/mapmod.hxx +=================================================================== +RCS file: /cvs/gsl/vcl/inc/mapmod.hxx,v +retrieving revision 1.1.1.1 +retrieving revision 1.2 +diff -u -p -u -r1.1.1.1 -r1.2 +--- vcl/inc/mapmod.hxx 19 Sep 2000 10:23:05 -0000 1.1.1.1 ++++ vcl/inc/mapmod.hxx 7 Jan 2004 09:06:47 -0000 1.2 +@@ -72,8 +72,8 @@ + #ifndef _SV_SV_H + #include <sv.h> + #endif +-#ifndef _SV_RESID_HXX +-#include <resid.hxx> ++#ifndef _TOOLS_RESID_HXX ++#include <tools/resid.hxx> + #endif + #ifndef _VCL_MAPUNIT_HXX + #include <mapunit.hxx> +@@ -101,11 +101,9 @@ private: + friend SvStream& operator>>( SvStream& rIStm, ImplMapMode& rMapMode ); + friend SvStream& operator<<( SvStream& rOStm, const ImplMapMode& rMapMode ); + +-#ifdef _SV_MAPMOD_CXX + public: + ImplMapMode(); + ImplMapMode( const ImplMapMode& rImpMapMode ); +-#endif + }; + + // ----------- +@@ -119,9 +117,7 @@ class MapMode + private: + ImplMapMode* mpImplMapMode; + +-#ifdef _SV_MAPMOD_CXX + void ImplMakeUnique(); +-#endif + + public: + MapMode(); +Index: vcl/inc/menu.hxx +=================================================================== +RCS file: /cvs/gsl/vcl/inc/menu.hxx,v +retrieving revision 1.26.112.1 +retrieving revision 1.30 +diff -u -p -u -r1.26.112.1 -r1.30 +--- vcl/inc/menu.hxx 13 Nov 2003 16:48:20 -0000 1.26.112.1 ++++ vcl/inc/menu.hxx 25 Feb 2004 17:29:29 -0000 1.30 +@@ -66,20 +66,20 @@ + #include <sv.h> + #endif + +-#ifndef _SV_RC_HXX +-#include <rc.hxx> ++#ifndef _TOOLS_RC_HXX ++#include <tools/rc.hxx> + #endif + +-#ifndef _SV_RESID_HXX +-#include <resid.hxx> ++#ifndef _TOOLS_RESID_HXX ++#include <tools/resid.hxx> + #endif + + #ifndef _SV_BITMAPEX_HXX + #include <bitmapex.hxx> + #endif + +-#ifndef _SV_COLOR_HXX +-#include <color.hxx> ++#ifndef _TOOLS_COLOR_HXX ++#include <tools/color.hxx> + #endif + + #ifndef _VCL_VCLEVENT_HXX +@@ -103,7 +103,9 @@ class KeyEvent; + class AppBarWindow; + class MenuFloatingWindow; + class Window; + class AccessObjectRef; ++class SalMenu; ++struct SystemMenuData; + + namespace com { + namespace sun { +@@ -126,11 +127,11 @@ namespace vcl { struct MenuLayoutData; } + #define POPUPMENU_EXECUTE_LEFT ((USHORT)0x0004) + #define POPUPMENU_EXECUTE_RIGHT ((USHORT)0x0008) + +-// By changes you must also change: tools/vclrsc.hxx ++// By changes you must also change: rsc/vclrsc.hxx + enum MenuItemType { MENUITEM_DONTKNOW, MENUITEM_STRING, MENUITEM_IMAGE, + MENUITEM_STRINGIMAGE, MENUITEM_SEPARATOR }; + +-// By changes you must also change: tools/vclrsc.hxx ++// By changes you must also change: rsc/vclrsc.hxx + typedef USHORT MenuItemBits; + #define MIB_CHECKABLE ((MenuItemBits)0x0001) + #define MIB_RADIOCHECK ((MenuItemBits)0x0002) +@@ -151,12 +152,10 @@ struct MenuLogo + BitmapEx aBitmap; + Color aStartColor; + Color aEndColor; +- ULONG nDummy; + }; + + class Menu : public Resource + { +- friend class AccessObject; + friend class MenuBar; + friend class MenuBarWindow; + friend class MenuFloatingWindow; +@@ -164,6 +163,7 @@ class Menu : public Resource + friend class SystemWindow; + + private: ++ void* pMenuData_NotUsedYet; + MenuItemList* pItemList; // Liste mit den MenuItems + MenuLogo* pLogo; + Menu* pStartedFrom; +@@ -180,7 +180,7 @@ private: + XubString aTitleText; // PopupMenu-Text + + ULONG nEventId; +- ULONG nDummy; ++ USHORT mnHighlightedItemPos; // for native menues: keeps track of the highlighted item + USHORT nMenuFlags; + USHORT nDefaultItem; // Id vom Default-Item + USHORT nSelectedId; +@@ -197,16 +197,14 @@ private: + + ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > mxAccessible; + mutable vcl::MenuLayoutData* mpLayoutData; +- void* mpDummy; +- long mnDummy; +- BOOL mbDummy; ++ SalMenu* mpSalMenu; + + protected: +-#ifdef _SV_MENU_CXX + void ImplInit(); + void ImplLoadRes( const ResId& rResId ); + Menu* ImplGetStartMenu(); + Menu* ImplFindSelectMenu(); ++ Menu* ImplFindMenu( USHORT nId ); + Size ImplCalcSize( Window* pWin ); + BOOL ImplIsVisible( USHORT nPos ) const; + USHORT ImplGetVisibleItemCount() const; +@@ -220,11 +218,16 @@ protected: + DECL_LINK( ImplCallSelect, Menu* ); + + void ImplFillLayoutData() const; ++ SalMenu* ImplGetSalMenu() { return mpSalMenu; } ++ void ImplSetSalMenu( SalMenu *pMenu ); ++ ++#if _SOLAR__PRIVATE + public: + void ImplKillLayoutData() const; + #endif + + Menu(); ++ Menu( BOOL bMenuBar ); + Window* ImplGetWindow() const { return pWindow; } + + public: +@@ -315,7 +318,10 @@ public: + void SetTipHelpText( USHORT nItemId, const XubString& rString ); + const XubString& GetTipHelpText( USHORT nItemId ) const; + +- void SetHelpId( USHORT nItemId, ULONG nHelpId ); ++ void SetHelpCommand( USHORT nItemId, const XubString& rString ); ++ const XubString& GetHelpCommand( USHORT nItemId ) const; ++ ++ void SetHelpId( USHORT nItemId, ULONG nHelpId ); + ULONG GetHelpId( USHORT nItemId ) const; + + void SetActivateHdl( const Link& rLink ) { aActivateHdl = rLink; } +@@ -342,6 +348,9 @@ public: + // Fuer Menu-'Funktionen' + MenuItemList* GetItemList() const { return pItemList; } + ++ // returns the system's menu handle if native menues are supported ++ // pData must point to a SystemMenuData structure ++ BOOL GetSystemMenuData( SystemMenuData* pData ) const; + + // accessibility helpers + +@@ -393,14 +400,13 @@ public: + + class MenuBar : public Menu + { +- void* pDummy; + Link maCloserHdl; + Link maFloatHdl; + Link maHideHdl; + BOOL mbCloserVisible; + BOOL mbFloatBtnVisible; + BOOL mbHideBtnVisible; +- BOOL mbDummy1; ++ BOOL mbDisplayable; + + #if _SOLAR__PRIVATE + friend class Application; +@@ -431,6 +437,10 @@ public: + void ShowButtons( BOOL bClose, BOOL bFloat, BOOL bHide ); + + void SelectEntry( USHORT nId ); ++ BOOL HandleMenuActivateEvent( Menu *pMenu ) const; ++ BOOL HandleMenuDeActivateEvent( Menu *pMenu ) const; ++ BOOL HandleMenuHighlightEvent( Menu *pMenu, USHORT nEventId ) const; ++ BOOL HandleMenuCommandEvent( Menu *pMenu, USHORT nEventId ) const; + + void SetCloserHdl( const Link& rLink ) { maCloserHdl = rLink; } + const Link& GetCloserHdl() const { return maCloserHdl; } +@@ -438,6 +448,14 @@ public: + const Link& GetFloatButtonClickHdl() const { return maFloatHdl; } + void SetHideButtonClickHdl( const Link& rLink ) { maHideHdl = rLink; } + const Link& GetHideButtonClickHdl() const { return maHideHdl; } ++ ++ // - by default a menubar is displayable ++ // - if a menubar is not displayable, its MenuBarWindow will never be shown ++ // and it will be hidden if it was visible before ++ // - note: if a menubar is diplayable, this does not necessarily mean that it is currently visible ++ void SetDisplayable( BOOL bDisplayable ); ++ BOOL IsDisplayable() const { return mbDisplayable; } ++ + }; + + inline MenuBar& MenuBar::operator =( const MenuBar& rMenu ) +Index: vcl/inc/menubtn.hxx +=================================================================== +RCS file: /cvs/gsl/vcl/inc/menubtn.hxx,v +retrieving revision 1.1.1.1 +retrieving revision 1.2 +diff -u -p -u -r1.1.1.1 -r1.2 +--- vcl/inc/menubtn.hxx 19 Sep 2000 10:23:05 -0000 1.1.1.1 ++++ vcl/inc/menubtn.hxx 7 Jan 2004 09:07:50 -0000 1.2 +@@ -86,7 +86,6 @@ class MenuButton : public PushButton + { + private: + Rectangle maFocusRect; +- void* mpDummy; + Timer* mpMenuTimer; + PopupMenu* mpOwnMenu; + PopupMenu* mpMenu; +@@ -95,11 +94,9 @@ private: + Link maActivateHdl; + Link maSelectHdl; + +-#ifdef _SV_MENUBTN_CXX + void ImplInitData(); + void ImplExecuteMenu(); + DECL_LINK( ImplMenuTimeoutHdl, Timer* ); +-#endif + + protected: + void ImplInit( Window* pParent, WinBits nStyle ); +Index: vcl/inc/metaact.hxx +=================================================================== +RCS file: /cvs/gsl/vcl/inc/metaact.hxx,v +retrieving revision 1.4.252.1 +retrieving revision 1.7 +diff -u -p -u -r1.4.252.1 -r1.7 +--- vcl/inc/metaact.hxx 9 Jan 2004 18:13:40 -0000 1.4.252.1 ++++ vcl/inc/metaact.hxx 17 Jun 2004 12:05:02 -0000 1.7 +@@ -74,8 +74,8 @@ + #ifndef _SV_FONT_HXX + #include <font.hxx> + #endif +-#ifndef _SV_POLY_HXX +-#include <poly.hxx> ++#ifndef _TL_POLY_HXX ++#include <tools/poly.hxx> + #endif + #ifndef _SV_BITMAP_HXX + #include <bitmap.hxx> +@@ -575,7 +575,7 @@ private: + + Point maStartPt; + XubString maStr; +- long* mpDXAry; ++ sal_Int32* mpDXAry; + USHORT mnIndex; + USHORT mnLen; + +@@ -586,7 +586,7 @@ public: + MetaTextArrayAction( const MetaTextArrayAction& rAction ); + MetaTextArrayAction( const Point& rStartPt, + const XubString& rStr, +- const long* pDXAry, ++ const sal_Int32* pDXAry, + USHORT nIndex, + USHORT nLen ); + virtual ~MetaTextArrayAction(); +@@ -605,7 +605,7 @@ public: + const XubString& GetText() const { return maStr; } + USHORT GetIndex() const { return mnIndex; } + USHORT GetLen() const { return mnLen; } +- long* GetDXArray() const { return mpDXAry; } ++ sal_Int32* GetDXArray() const { return mpDXAry; } + }; + + // ------------------------- +Index: vcl/inc/msgbox.hxx +=================================================================== +RCS file: /cvs/gsl/vcl/inc/msgbox.hxx,v +retrieving revision 1.5 +retrieving revision 1.6 +diff -u -p -u -r1.5 -r1.6 +--- vcl/inc/msgbox.hxx 24 Oct 2002 10:56:12 -0000 1.5 ++++ vcl/inc/msgbox.hxx 7 Jan 2004 09:08:49 -0000 1.6 +@@ -118,12 +118,9 @@ protected: + XubString maCheckBoxText; + BOOL mbCheck; + +-#ifdef _SV_MSGBOX_CXX +-private: + void ImplInitData(); + void ImplInitButtons(); + void ImplPosControls(); +-#endif + + protected: + void ImplLoadRes( const ResId& rResId ); +@@ -159,10 +156,8 @@ public: + + class InfoBox : public MessBox + { +-#ifdef _SV_MSGBOX_CXX + private: + void ImplInitData(); +-#endif + + public: + InfoBox( Window* pParent, const XubString& rMessage ); +@@ -177,10 +172,8 @@ public: + + class WarningBox : public MessBox + { +-#ifdef _SV_MSGBOX_CXX + private: + void ImplInitData(); +-#endif + + public: + WarningBox( Window* pParent, WinBits nStyle, +@@ -198,10 +191,8 @@ public: + + class ErrorBox : public MessBox + { +-#ifdef _SV_MSGBOX_CXX + private: + void ImplInitData(); +-#endif + + public: + ErrorBox( Window* pParent, WinBits nStyle, +@@ -217,10 +208,8 @@ public: + + class QueryBox : public MessBox + { +-#ifdef _SV_MSGBOX_CXX + private: + void ImplInitData(); +-#endif + + public: + QueryBox( Window* pParent, WinBits nStyle, +Index: vcl/inc/opengl.hxx +=================================================================== +RCS file: /cvs/gsl/vcl/inc/opengl.hxx,v +retrieving revision 1.3 +retrieving revision 1.5 +diff -u -p -u -r1.3 -r1.5 +--- vcl/inc/opengl.hxx 15 Mar 2002 17:10:25 -0000 1.3 ++++ vcl/inc/opengl.hxx 7 Jan 2004 09:09:11 -0000 1.5 +@@ -80,22 +80,13 @@ class RmOpenGL; + class OpenGL + { + static BOOL mbNoOGL; +-private: + ++private: + OutputDevice* mpOutDev; +-#ifndef REMOTE_APPSERVER + SalOpenGL* mpOGL; +-#else +- RmOpenGL* mpOGL; +-#endif + +-#if _SOLAR__PRIVATE +-#ifdef _SV_OPENGL_CXX +-private: + void ImplInit(); + BOOL ImplInitFncPointers(); +-#endif +-#endif // __PRIVATE + + public: + OpenGL( OutputDevice* pOutDev ); +Index: vcl/inc/outdata.hxx +=================================================================== +RCS file: /cvs/gsl/vcl/inc/outdata.hxx,v +retrieving revision 1.1.1.1 +retrieving revision 1.3 +diff -u -p -u -r1.1.1.1 -r1.3 +--- vcl/inc/outdata.hxx 19 Sep 2000 10:23:05 -0000 1.1.1.1 ++++ vcl/inc/outdata.hxx 7 Jan 2004 09:09:31 -0000 1.3 +@@ -66,8 +66,8 @@ + #include <sv.h> + #endif + +-#ifndef _SV_COLOR_HXX +-#include <color.hxx> ++#ifndef _TOOLS_COLOR_HXX ++#include <tools/color.hxx> + #endif + + #ifndef _SV_SALGTYPE_HXX +@@ -78,12 +78,10 @@ + // - Hilfemethoden - + // ----------------- + +-#ifndef REMOTE_APPSERVER + inline SalColor ImplColorToSal( Color aColor ) + { + return MAKE_SALCOLOR( aColor.GetRed(), aColor.GetGreen(), aColor.GetBlue() ); + } +-#endif + + inline int ImplIsColorTransparent( Color aColor ) + { +Index: vcl/inc/outdev.h +=================================================================== +RCS file: /cvs/gsl/vcl/inc/outdev.h,v +retrieving revision 1.13 +retrieving revision 1.14 +diff -u -p -u -r1.13 -r1.14 +--- vcl/inc/outdev.h 27 Mar 2003 17:57:25 -0000 1.13 ++++ vcl/inc/outdev.h 7 Jan 2004 09:09:50 -0000 1.14 +@@ -263,7 +263,6 @@ private: + ImplFontEntry* mpFirstEntry; + USHORT mnRef0Count; + BOOL mbPrinter; +- BOOL mbDummy; + + public: + ImplFontCache( BOOL bPrinter ); +Index: vcl/inc/outdev.hxx +=================================================================== +RCS file: /cvs/gsl/vcl/inc/outdev.hxx,v +retrieving revision 1.40 +retrieving revision 1.51 +diff -u -p -u -r1.40 -r1.51 +--- vcl/inc/outdev.hxx 6 Jun 2003 10:29:59 -0000 1.40 ++++ vcl/inc/outdev.hxx 17 Jun 2004 12:05:32 -0000 1.51 +@@ -71,11 +71,11 @@ + #ifndef _SV_SV_H + #include <sv.h> + #endif +-#ifndef _SV_RC_HXX +-#include <rc.hxx> ++#ifndef _TOOLS_RC_HXX ++#include <tools/rc.hxx> + #endif +-#ifndef _SV_COLOR_HXX +-#include <color.hxx> ++#ifndef _TOOLS_COLOR_HXX ++#include <tools/color.hxx> + #endif + #ifndef _SV_FONT_HXX + #include <font.hxx> +@@ -92,8 +92,8 @@ + #ifndef _SV_SETTINGS_HXX + #include <settings.hxx> + #endif +-#ifndef _SV_POLY_HXX +-#include <poly.hxx> ++#ifndef _TL_POLY_HXX ++#include <tools/poly.hxx> + #endif + + #include <vector> +@@ -108,7 +108,6 @@ class ImplGetDevFontList; + class ImplGetDevSizeList; + class ImplMultiTextLineInfo; + class SalGraphics; +-class ImplServerGraphics; + class Gradient; + class Hatch; + class Bitmap; +@@ -139,7 +138,10 @@ namespace awt { + typedef std::vector< Rectangle > MetricVector; + + namespace vcl { class PDFWriterImpl; } + ++#define OUTDEV_BUFFER_SIZE 128 ++ ++ + // --------------------- + // - OutputDevice-Data - + // --------------------- +@@ -196,7 +194,9 @@ struct KerningPair + #define PUSH_TEXTALIGN ((USHORT)0x0100) + #define PUSH_REFPOINT ((USHORT)0x0200) + #define PUSH_TEXTLINECOLOR ((USHORT)0x0400) +-#define PUSH_ALLTEXT (PUSH_TEXTCOLOR | PUSH_TEXTFILLCOLOR | PUSH_TEXTLINECOLOR | PUSH_TEXTALIGN) ++#define PUSH_TEXTLAYOUTMODE ((USHORT)0x0800) ++#define PUSH_TEXTLANGUAGE ((USHORT)0x1000) ++#define PUSH_ALLTEXT (PUSH_TEXTCOLOR | PUSH_TEXTFILLCOLOR | PUSH_TEXTLINECOLOR | PUSH_TEXTALIGN | PUSH_TEXTLAYOUTMODE | PUSH_TEXTLANGUAGE) + #define PUSH_ALLFONT (PUSH_ALLTEXT | PUSH_FONT) + #define PUSH_ALL ((USHORT)0xFFFF) + +@@ -224,10 +224,11 @@ struct KerningPair + #define IMAGE_DRAW_DISABLE ((USHORT)0x0001) + #define IMAGE_DRAW_HIGHLIGHT ((USHORT)0x0002) + #define IMAGE_DRAW_DEACTIVE ((USHORT)0x0004) +-#define IMAGE_DRAW_COLORTRANSFORM ((USHORT)0x0008) ++#define IMAGE_DRAW_COLORTRANSFORM ((USHORT)0x0008) + #define IMAGE_DRAW_SEMITRANSPARENT ((USHORT)0x0010) ++#define IMAGE_DRAW_MONOCHROME_BLACK ((USHORT)0x0020) ++#define IMAGE_DRAW_MONOCHROME_WHITE ((USHORT)0x0040) + #define IMAGE_DRAW_3DLOOK 0 +- + #define IMAGE_DRAW_BTNLOOK 0 + + // WaveLine +@@ -327,20 +328,24 @@ enum OutDevViewType { OUTDEV_VIEWTYPE_DO + + class OutputDevice : public Resource + { +- friend class Window; +- friend class VirtualDevice; +- friend class Printer; +- friend class ImplQPrinter; +- friend class OpenGL; +- friend class ::vcl::PDFWriterImpl; +- friend class SalGraphicsLayout; ++ friend class Application; ++ friend class Bitmap; ++ friend class ImplImageBmp; ++ friend class ImplQPrinter; ++ friend class OpenGL; ++ friend class Printer; ++ friend class RMBitmap; ++ friend class RMBitmapEx; ++ friend class SalGraphicsLayout; ++ friend class System; ++ friend class VirtualDevice; ++ friend class Window; ++ friend class WorkWindow; ++ friend class vcl::PDFWriterImpl; ++ friend const char* ImplDbgCheckOutputDevice( const void* pObj ); + + private: +-#ifndef REMOTE_APPSERVER + mutable SalGraphics* mpGraphics; +-#else +- mutable ImplServerGraphics* mpGraphics; +-#endif + mutable OutputDevice* mpPrevGraphics; + mutable OutputDevice* mpNextGraphics; + GDIMetaFile* mpMetaFile; +@@ -354,7 +359,10 @@ private: + List* mpUnoGraphicsList; + OutDev3D* mp3DContext; + vcl::PDFWriterImpl* mpPDFWriter; +- void* mpDummy1; ++ ++ // TEMP TEMP TEMP ++ VirtualDevice* mpAlphaVDev; ++ + /// Additional output pixel offset, applied in LogicToPixel (used by SetPixelOffset/GetPixelOffset) + long mnOutOffOrigX; + /// Additional output offset in _logical_ coordinates, applied in PixelToLogic (used by SetPixelOffset/GetPixelOffset) +@@ -369,8 +377,8 @@ private: + long mnOutOffY; + long mnOutWidth; + long mnOutHeight; +- long mnDPIX; +- long mnDPIY; ++ sal_Int32 mnDPIX; ++ sal_Int32 mnDPIY; + /// Output offset for text alignment in pixel + long mnTextOffX; + /// Output offset for text alignment in pixel +@@ -379,7 +387,6 @@ private: + long mnEmphasisDescent; + ULONG mnDrawMode; + ULONG mnTextLayoutMode; +- long mnDummy1; + ImplMapRes maMapRes; + ImplThresholdRes maThresRes; + OutDevType meOutDevType; +@@ -389,7 +396,6 @@ private: + Color maFillColor; + Font maFont; + Color maTextColor; +- Color maTextFillColorDummy; // For compatibility to SV we work with the font fill color + Color maTextLineColor; + TextAlign meTextAlign; + RasterOp meRasterOp; +@@ -399,8 +405,6 @@ private: + Point maRefPoint; + USHORT mnAntialiasing; + LanguageType meTextLanguage; +- USHORT mnDummy3; +- USHORT mnDummy4; + mutable BOOL mbMap:1, + mbMapIsDefault:1, + mbClipRegion:1, +@@ -421,12 +425,121 @@ private: + mbTextLines:1, + mbTextSpecial:1, + mbRefPoint:1, +- mbEnableRTL:1, +- mbDummy2:1, +- mbDummy3:1; ++ mbEnableRTL:1; + + #if _SOLAR__PRIVATE +-#include <outdev.imp> ++public: ++ sal_Int32 ImplGetDPIX() const { return mnDPIX; } ++ sal_Int32 ImplGetDPIY() const { return mnDPIY; } ++ int ImplGetGraphics() const; ++ void ImplReleaseGraphics( BOOL bRelease = TRUE ); ++ BOOL ImplHasMirroredGraphics(); ++ void ImplReMirror( Point &rPoint ) const; ++ void ImplReMirror( Rectangle &rRect ) const; ++ void ImplReMirror( Region &rRegion ) const; ++ void ImplInitOutDevData(); ++ void ImplDeInitOutDevData(); ++ void ImplInitLineColor(); ++ void ImplInitFillColor(); ++ int ImplNewFont(); ++ void ImplInitFont(); ++ void ImplInitTextColor(); ++ void ImplInitKerningPairs( ImplKernPairData* pKernPairs = 0, long nKernPairs = 0 ); ++ void ImplInitClipRegion(); ++ static BOOL ImplSelectClipRegion( SalGraphics* pGraphics, const Region& rRegion, OutputDevice *pOutDev ); ++ void ImplSetClipRegion( const Region* pRegion ); ++ ++ SalLayout* ImplLayout( const String& rOrigStr, xub_StrLen nIndex, ++ xub_StrLen nLen, const Point& rLogicPos = Point(0,0), ++ long nLogicWidth=0, const sal_Int32* pLogicDXArray=NULL ) const; ++ long ImplGetTextWidth( const SalLayout& ) const; ++ void ImplDrawTextBackground( const SalLayout& ); ++ void ImplDrawTextLines( SalLayout&, FontStrikeout eStrikeout, FontUnderline eUnderline, BOOL bWordLine, BOOL bUnderlineAbove ); ++ bool ImplDrawRotateText( SalLayout& ); ++ void ImplDrawTextDirect( SalLayout&, BOOL bTextLines ); ++ void ImplDrawSpecialText( SalLayout& ); ++ void ImplDrawText( SalLayout& ); ++ Rectangle ImplGetTextBoundRect( const SalLayout& ); ++ void ImplDrawEmphasisMarks( SalLayout& ); ++ ++ void ImplDrawTextRect( long nBaseX, long nBaseY, long nX, long nY, long nWidth, long nHeight ); ++ ++ void ImplInitTextLineSize(); ++ void ImplInitAboveTextLineSize(); ++ void ImplDrawWaveLine( long nBaseX, long nBaseY, long nStartX, long nStartY, long nWidth, long nHeight, long nLineWidth, short nOrientation, const Color& rColor ); ++ void ImplDrawTextLine( long nBaseX, long nX, long nY, long nWidth, FontStrikeout eStrikeout, FontUnderline eUnderline, BOOL bUnderlineAbove ); ++ void ImplDrawMnemonicLine( long nX, long nY, long nWidth ); ++ void ImplGetEmphasisMark( PolyPolygon& rPolyPoly, BOOL& rPolyLine, Rectangle& rRect1, Rectangle& rRect2, long& rYOff, long& rWidth, FontEmphasisMark eEmphasis, long nHeight, short nOrient ); ++ void ImplDrawEmphasisMark( long nBaseX, long nX, long nY, const PolyPolygon& rPolyPoly, BOOL bPolyLine, const Rectangle& rRect1, const Rectangle& rRect2 ); ++ long ImplGetTextLines( ImplMultiTextLineInfo& rLineInfo, long nWidth, const XubString& rStr, USHORT nStyle ) const; ++ void ImplInitFontList() const; ++ void ImplUpdateFontData( BOOL bNewFontLists ); ++ static void ImplUpdateAllFontData( BOOL bNewFontLists ); ++ long ImplLogicXToDevicePixel( long nX ) const; ++ long ImplLogicYToDevicePixel( long nY ) const; ++ long ImplLogicWidthToDevicePixel( long nWidth ) const; ++ long ImplLogicHeightToDevicePixel( long nHeight ) const; ++ long ImplDevicePixelToLogicWidth( long nWidth ) const; ++ long ImplDevicePixelToLogicHeight( long nHeight ) const; ++ Point ImplLogicToDevicePixel( const Point& rLogicPt ) const; ++ Size ImplLogicToDevicePixel( const Size& rLogicSize ) const; ++ Rectangle ImplLogicToDevicePixel( const Rectangle& rLogicRect ) const; ++ Polygon ImplLogicToDevicePixel( const Polygon& rLogicPoly ) const; ++ PolyPolygon ImplLogicToDevicePixel( const PolyPolygon& rLogicPolyPoly ) const; ++ LineInfo ImplLogicToDevicePixel( const LineInfo& rLineInfo ) const; ++ Rectangle ImplDevicePixelToLogic( const Rectangle& rLogicRect ) const; ++ Region ImplPixelToDevicePixel( const Region& rRegion ) const; ++ void ImplDrawPolygon( const Polygon& rPoly, const PolyPolygon* pClipPolyPoly = NULL ); ++ void ImplDrawPolyPolygon( const PolyPolygon& rPolyPoly, const PolyPolygon* pClipPolyPoly = NULL ); ++ void ImplDrawPolyPolygon( USHORT nPoly, const PolyPolygon& rPolyPoly ); ++ void ImplDrawLinearGradient( const Rectangle& rRect, const Gradient& rGradient, BOOL bMtf, const PolyPolygon* pClipPolyPoly ); ++ void ImplDrawComplexGradient( const Rectangle& rRect, const Gradient& rGradient, BOOL bMtf, const PolyPolygon* pClipPolyPoly ); ++ ++ void ImplDrawHatch( const PolyPolygon& rPolyPoly, const Hatch& rHatch, BOOL bMtf ); ++ void ImplCalcHatchValues( const Rectangle& rRect, long nDist, USHORT nAngle10, Point& rPt1, Point& rPt2, Size& rInc, Point& rEndPt1 ); ++ void ImplDrawHatchLine( const Line& rLine, const PolyPolygon& rPolyPoly, Point* pPtBuffer, BOOL bMtf ); ++ ++ void ImplDrawWallpaper( long nX, long nY, long nWidth, long nHeight, const Wallpaper& rWallpaper ); ++ void ImplDrawColorWallpaper( long nX, long nY, long nWidth, long nHeight, const Wallpaper& rWallpaper ); ++ void ImplDrawBitmapWallpaper( long nX, long nY, long nWidth, long nHeight, const Wallpaper& rWallpaper ); ++ void ImplDrawGradientWallpaper( long nX, long nY, long nWidth, long nHeight, const Wallpaper& rWallpaper ); ++ void ImplDraw2ColorFrame( const Rectangle& rRect, const Color& rLeftTopColor, const Color& rRightBottomColor ); ++ ++ void ImplDrawOutDevDirect( const OutputDevice* pSrcDev, void* pPosAry ); ++ void ImplDrawBitmap( const Point& rDestPt, const Size& rDestSize, ++ const Point& rSrcPtPixel, const Size& rSrcSizePixel, ++ const Bitmap& rBitmap, const ULONG nAction ); ++ void ImplDrawBitmapEx( const Point& rDestPt, const Size& rDestSize, ++ const Point& rSrcPtPixel, const Size& rSrcSizePixel, ++ const BitmapEx& rBitmapEx, const ULONG nAction ); ++ void ImplDrawMask( const Point& rDestPt, const Size& rDestSize, ++ const Point& rSrcPtPixel, const Size& rSrcSizePixel, ++ const Bitmap& rBitmap, const Color& rMaskColor, ++ const ULONG nAction ); ++ void ImplDrawAlpha( const Bitmap& rBmp, const AlphaMask& rAlpha, ++ const Point& rDestPt, const Size& rDestSize, ++ const Point& rSrcPtPixel, const Size& rSrcSizePixel ); ++ void ImplPrintTransparent( const Bitmap& rBmp, const Bitmap& rMask, ++ const Point& rDestPt, const Size& rDestSize, ++ const Point& rSrcPtPixel, const Size& rSrcSizePixel ); ++ void ImplPrintMask( const Bitmap& rMask, const Color& rMaskColor, ++ const Point& rDestPt, const Size& rDestSize, ++ const Point& rSrcPtPixel, const Size& rSrcSizePixel ); ++ void ImplDrawFrameDev( const Point& rPt, const Point& rDevPt, const Size& rDevSize, ++ const OutputDevice& rOutDev, const Region& rRegion ); ++ void ImplGetFrameDev( const Point& rPt, const Point& rDevPt, const Size& rDevSize, ++ OutputDevice& rOutDev ); ++ void ImplGetFrameBitmap( const Point& rPt, const Size& rSize, ++ Bitmap& rBitmap ) const; ++ ++ BOOL ImplIsRecordLayout() const; ++ ++ void ImplAddDevFontSubstitute( const XubString& rFontName, ++ const XubString& rReplaceFontName, ++ USHORT nFlags = 0 ); ++ ++ static FontEmphasisMark ImplGetEmphasisMarkStyle( const Font& rFont ); ++ static BOOL ImplIsUnderlineAbove( const Font& ); + #endif + + protected: +@@ -459,15 +572,15 @@ public: + xub_StrLen nLen = STRING_LEN ) const; + long GetTextHeight() const; + void DrawTextArray( const Point& rStartPt, const XubString& rStr, +- const long* pDXAry = NULL, ++ const sal_Int32* pDXAry = NULL, + xub_StrLen nIndex = 0, + xub_StrLen nLen = STRING_LEN ); +- long GetTextArray( const XubString& rStr, long* pDXAry = NULL, ++ long GetTextArray( const XubString& rStr, sal_Int32* pDXAry = NULL, + xub_StrLen nIndex = 0, + xub_StrLen nLen = STRING_LEN ) const; +- bool GetCaretPositions( const XubString&, long* pCaretXArray, ++ bool GetCaretPositions( const XubString&, sal_Int32* pCaretXArray, + xub_StrLen nIndex, xub_StrLen nLen, +- long* pDXAry = NULL, long nWidth = 0, ++ sal_Int32* pDXAry = NULL, long nWidth = 0, + BOOL bCellBreaking = TRUE ) const; + void DrawStretchText( const Point& rStartPt, ULONG nWidth, + const XubString& rStr, +@@ -505,10 +618,10 @@ public: + xub_StrLen nLen = STRING_LEN ) const; + BOOL GetTextOutline( PolyPolygon&, + const String& rStr, xub_StrLen nBase = 0, xub_StrLen nIndex = 0, +- xub_StrLen nLen = STRING_LEN, BOOL bOptimize = TRUE, const ULONG nWidth = 0, const long* pDXArray = NULL ) const; ++ xub_StrLen nLen = STRING_LEN, BOOL bOptimize = TRUE, const ULONG nWidth = 0, const sal_Int32* pDXArray = NULL ) const; + BOOL GetTextOutlines( PolyPolyVector&, + const String& rStr, xub_StrLen nBase = 0, xub_StrLen nIndex = 0, +- xub_StrLen nLen = STRING_LEN, BOOL bOptimize = TRUE, const ULONG nWidth = 0, const long* pDXArray = NULL ) const; ++ xub_StrLen nLen = STRING_LEN, BOOL bOptimize = TRUE, const ULONG nWidth = 0, const sal_Int32* pDXArray = NULL ) const; + BOOL GetGlyphBoundRects( const Point& rOrigin, const String& rStr, int nIndex, + int nLen, int nBase, MetricVector& rVector ); + +@@ -517,10 +630,52 @@ public: + void DrawLine( const Point& rStartPt, const Point& rEndPt ); + void DrawLine( const Point& rStartPt, const Point& rEndPt, + const LineInfo& rLineInfo ); ++ ++ /** Render the given polygon as a line stroke ++ ++ The given polygon is stroked with the current LineColor, start ++ and end point are not automatically connected ++ ++ @see DrawPolygon ++ @see DrawPolyPolygon ++ */ + void DrawPolyLine( const Polygon& rPoly ); ++ ++ /** Render the given polygon as a line stroke ++ ++ The given polygon is stroked with the current LineColor, start ++ and end point are not automatically connected. The line is ++ rendered according to the specified LineInfo, e.g. supplying a ++ dash pattern, or a line thickness. ++ ++ @see DrawPolygon ++ @see DrawPolyPolygon ++ */ + void DrawPolyLine( const Polygon& rPoly, + const LineInfo& rLineInfo ); ++ ++ /** Render the given polygon ++ ++ The given polygon is stroked with the current LineColor, and ++ filled with the current FillColor. If one of these colors are ++ transparent, the corresponding stroke or fill stays ++ invisible. Start and end point of the polygon are ++ automatically connected. ++ ++ @see DrawPolyLine ++ */ + void DrawPolygon( const Polygon& rPoly ); ++ ++ /** Render the given poly-polygon ++ ++ The given poly-polygon is stroked with the current LineColor, ++ and filled with the current FillColor. If one of these colors ++ are transparent, the corresponding stroke or fill stays ++ invisible. Start and end points of the contained polygons are ++ automatically connected. ++ ++ @see DrawPolyLine ++ */ + void DrawPolyPolygon( const PolyPolygon& rPolyPoly ); + void DrawRect( const Rectangle& rRect ); + void DrawRect( const Rectangle& rRect, +@@ -606,17 +755,21 @@ public: + + Bitmap GetBitmap( const Point& rSrcPt, const Size& rSize ) const; + +- void EnableMapMode( BOOL bEnable = TRUE ) { mbMap = (bEnable != 0); } ++ /** Query extended bitmap (with alpha channel, if available). ++ */ ++ BitmapEx GetBitmapEx( const Point& rSrcPt, const Size& rSize ) const; ++ ++ void EnableMapMode( BOOL bEnable = TRUE ); + BOOL IsMapModeEnabled() const { return mbMap; } + + // Enabling/disabling RTL only makes sense for OutputDevices that use a mirroring SalGraphisLayout + void EnableRTL( BOOL bEnable = TRUE); + BOOL IsRTLEnabled() const { return mbEnableRTL; } + +- void SetConnectMetaFile( GDIMetaFile* pMtf ) { mpMetaFile = pMtf; } ++ void SetConnectMetaFile( GDIMetaFile* pMtf ); + GDIMetaFile* GetConnectMetaFile() const { return mpMetaFile; } + +- void EnableOutput( BOOL bEnable = TRUE ) { mbOutput = (bEnable != 0); } ++ void EnableOutput( BOOL bEnable = TRUE ); + BOOL IsOutputEnabled() const { return mbOutput; } + BOOL IsDeviceOutput() const { return mbDevOutput; } + BOOL IsDeviceOutputNecessary() const { return (mbOutput && mbDevOutput); } +@@ -676,7 +829,7 @@ public: + void SetFont( const Font& rNewFont ); + const Font& GetFont() const { return maFont; } + void SetTextColor( const Color& rColor ); +- const Color& GetTextColor() const { return maFont.GetColor(); } ++ const Color& GetTextColor() const { return maTextColor; } + void SetTextFillColor(); + void SetTextFillColor( const Color& rColor ); + +@@ -689,6 +842,6 @@ public: + void SetTextAlign( TextAlign eAlign ); + TextAlign GetTextAlign() const { return maFont.GetAlign(); } + +- void SetSettings( const AllSettings& rSettings ) { maSettings = rSettings; } ++ void SetSettings( const AllSettings& rSettings ); + const AllSettings& GetSettings() const { return maSettings; } + +@@ -811,6 +953,11 @@ public: + + Size GetOutputSizePixel() const + { return Size( mnOutWidth, mnOutHeight ); } ++ long GetOutputWidthPixel() const { return mnOutWidth; } ++ long GetOutputHeightPixel() const { return mnOutHeight; } ++ long GetOutOffXPixel() const { return mnOutOffX; } ++ long GetOutOffYPixel() const { return mnOutOffY; } ++ + Size GetOutputSize() const + { return PixelToLogic( GetOutputSizePixel() ); } + +@@ -831,9 +978,22 @@ public: + USHORT GetBitCount() const; ++ ++ /** Query the existence and depth of the alpha channel ++ ++ @return 0, if no alpha channel available, and the bit depth of ++ the alpha channel otherwise. ++ */ ++ USHORT GetAlphaBitCount() const; + ULONG GetColorCount() const; + + void Push( USHORT nFlags = PUSH_ALL ); + void Pop(); + ++ /** Query availability of alpha channel ++ ++ @return TRUE, if this device has an alpha channel. ++ */ ++ BOOL HasAlpha(); ++ + void DrawEPS( const Point& rPt, const Size& rSz, + const GfxLink& rGfxLink, GDIMetaFile* pSubst = NULL ); + + +Index: vcl/inc/pdfwriter.hxx +=================================================================== +RCS file: /cvs/gsl/vcl/inc/pdfwriter.hxx,v +retrieving revision 1.6 +retrieving revision 1.8 +diff -u -p -u -r1.6 -r1.8 +--- vcl/inc/pdfwriter.hxx 28 May 2003 12:29:54 -0000 1.6 ++++ vcl/inc/pdfwriter.hxx 17 Jun 2004 12:05:47 -0000 1.8 +@@ -73,7 +73,7 @@ + #ifndef _STRING_HXX + #include <tools/string.hxx> + #endif +-#ifndef _COLOR_HXX ++#ifndef _TOOLS_COLOR_HXX + #include <tools/color.hxx> + #endif + +@@ -191,7 +191,7 @@ public: + FontUnderline eUnderline, + BOOL bUnderlineAbove = FALSE ); + void DrawTextArray( const Point& rStartPt, const XubString& rStr, +- const long* pDXAry = NULL, ++ const sal_Int32* pDXAry = NULL, + xub_StrLen nIndex = 0, + xub_StrLen nLen = STRING_LEN ); + void DrawStretchText( const Point& rStartPt, ULONG nWidth, +Index: vcl/inc/pngread.hxx +=================================================================== +RCS file: vcl/inc/pngread.hxx +diff -N vcl/inc/pngread.hxx +--- /dev/null 1 Jan 1970 00:00:00 -0000 ++++ vcl/inc/pngread.hxx 28 Jun 2004 16:05:43 -0000 1.3 +@@ -0,0 +1,101 @@ ++/************************************************************************* ++ * ++ * ++ * ++ * ++ * ++ * ++ * ++ * The Contents of this file are made available subject to the terms of ++ * either of the following licenses ++ * ++ * - GNU Lesser General Public License Version 2.1 ++ * - Sun Industry Standards Source License Version 1.1 ++ * ++ * Sun Microsystems Inc., October, 2000 ++ * ++ * GNU Lesser General Public License Version 2.1 ++ * ============================================= ++ * Copyright 2000 by Sun Microsystems, Inc. ++ * 901 San Antonio Road, Palo Alto, CA 94303, USA ++ * ++ * This library is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU Lesser General Public ++ * License version 2.1, as published by the Free Software Foundation. ++ * ++ * This library is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * Lesser General Public License for more details. ++ * ++ * You should have received a copy of the GNU Lesser General Public ++ * License along with this library; if not, write to the Free Software ++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, ++ * MA 02111-1307 USA ++ * ++ * ++ * Sun Industry Standards Source License Version 1.1 ++ * ================================================= ++ * The contents of this file are subject to the Sun Industry Standards ++ * Source License Version 1.1 (the "License"); You may not use this file ++ * except in compliance with the License. You may obtain a copy of the ++ * License at http://www.openoffice.org/license.html. ++ * ++ * Software provided under this License is provided on an "AS IS" basis, ++ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, ++ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, ++ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. ++ * See the License for the specific provisions governing your rights and ++ * obligations concerning the Software. ++ * ++ * The Initial Developer of the Original Code is: Sun Microsystems, Inc. ++ * ++ * Copyright: 2000 by Sun Microsystems, Inc. ++ * ++ * All Rights Reserved. ++ * ++ * Contributor(s): _______________________________________ ++ * ++ * ++ ************************************************************************/ ++ ++#ifndef _SV_PNGREAD_HXX ++#define _SV_PNGREAD_HXX ++ ++#ifndef _SV_BITMAPEX_HXX ++#include <bitmapex.hxx> ++#endif ++#include <vector> ++ ++// ------------- ++// - PNGReader - ++// ------------- ++ ++namespace vcl ++{ ++ class PNGReaderImpl; ++ ++ class PNGReader ++ { ++ PNGReaderImpl* mpImpl; ++ ++ public: ++ ++ /* the PNG chunks are read within the c'tor, so the stream will ++ be positioned at the end of the PNG */ ++ PNGReader( SvStream& rStm ); ++ ~PNGReader(); ++ ++ BitmapEx Read(); ++ ++ // retrieve every chunk that resides inside the PNG ++ struct ChunkData ++ { ++ sal_uInt32 nType; ++ std::vector< sal_uInt8 > aData; ++ }; ++ const std::vector< ChunkData >& GetChunks() const; ++ }; ++} ++ ++#endif // _SV_PNGREAD_HXX +Index: vcl/inc/pngwrite.hxx +=================================================================== +RCS file: vcl/inc/pngwrite.hxx +diff -N vcl/inc/pngwrite.hxx +--- /dev/null 1 Jan 1970 00:00:00 -0000 ++++ vcl/inc/pngwrite.hxx 28 Jun 2004 16:05:57 -0000 1.3 +@@ -0,0 +1,106 @@ ++/************************************************************************* ++ * ++ * ++ * ++ * ++ * ++ * ++ * ++ * The Contents of this file are made available subject to the terms of ++ * either of the following licenses ++ * ++ * - GNU Lesser General Public License Version 2.1 ++ * - Sun Industry Standards Source License Version 1.1 ++ * ++ * Sun Microsystems Inc., October, 2000 ++ * ++ * GNU Lesser General Public License Version 2.1 ++ * ============================================= ++ * Copyright 2000 by Sun Microsystems, Inc. ++ * 901 San Antonio Road, Palo Alto, CA 94303, USA ++ * ++ * This library is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU Lesser General Public ++ * License version 2.1, as published by the Free Software Foundation. ++ * ++ * This library is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * Lesser General Public License for more details. ++ * ++ * You should have received a copy of the GNU Lesser General Public ++ * License along with this library; if not, write to the Free Software ++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, ++ * MA 02111-1307 USA ++ * ++ * ++ * Sun Industry Standards Source License Version 1.1 ++ * ================================================= ++ * The contents of this file are subject to the Sun Industry Standards ++ * Source License Version 1.1 (the "License"); You may not use this file ++ * except in compliance with the License. You may obtain a copy of the ++ * License at http://www.openoffice.org/license.html. ++ * ++ * Software provided under this License is provided on an "AS IS" basis, ++ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, ++ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, ++ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. ++ * See the License for the specific provisions governing your rights and ++ * obligations concerning the Software. ++ * ++ * The Initial Developer of the Original Code is: Sun Microsystems, Inc. ++ * ++ * Copyright: 2000 by Sun Microsystems, Inc. ++ * ++ * All Rights Reserved. ++ * ++ * Contributor(s): _______________________________________ ++ * ++ * ++ ************************************************************************/ ++ ++#ifndef _SV_PNGWRITE_HXX ++#define _SV_PNGWRITE_HXX ++ ++#ifndef _COM_SUN_STAR_UNO_SEQUENCE_HXX_ ++#include <com/sun/star/uno/Sequence.hxx> ++#endif ++#ifndef _COM_SUN_STAR_BEANS_PROPERTYVALUE_HPP_ ++#include <com/sun/star/beans/PropertyValue.hpp> ++#endif ++#ifndef _SV_BITMAPEX_HXX ++#include <bitmapex.hxx> ++#endif ++#include <vector> ++ ++// ------------- ++// - PNGWriter - ++// ------------- ++ ++namespace vcl ++{ ++ class PNGWriterImpl; ++ ++ class PNGWriter ++ { ++ PNGWriterImpl* mpImpl; ++ ++ public: ++ ++ PNGWriter( const BitmapEx& BmpEx, ++ const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >* pFilterData = NULL ); ++ ~PNGWriter(); ++ ++ sal_Bool Write( SvStream& rStm ); ++ ++ // additional method to be able to modify all chunk before they are stored ++ struct ChunkData ++ { ++ sal_uInt32 nType; ++ std::vector< sal_uInt8 > aData; ++ }; ++ std::vector< ChunkData >& GetChunks(); ++ }; ++} ++ ++#endif // _SV_PNGWRITE_HXX +Index: vcl/inc/print.hxx +=================================================================== +RCS file: /cvs/gsl/vcl/inc/print.hxx,v +retrieving revision 1.17 +retrieving revision 1.19 +diff -u -p -u -r1.17 -r1.19 +--- vcl/inc/print.hxx 27 Mar 2003 17:57:29 -0000 1.17 ++++ vcl/inc/print.hxx 7 Jan 2004 09:11:49 -0000 1.19 +@@ -85,12 +85,9 @@ + #include <tools/stream.hxx> + #endif + +-#if defined REMOTE_APPSERVER +-#include <vector> +-#endif +- + struct SalPrinterInfoQueue; + class SalInfoPrinter; ++struct SalPrinterQueueInfo; + class SalPrinter; + class VirtualDevice; + class Window; +@@ -101,10 +98,6 @@ namespace com { namespace sun { namespac + class Any; + } } } } + +-#ifdef REMOTE_APPSERVER +-namespace com { namespace sun { namespace star { namespace portal { namespace client { struct RmJobSetup; } } } } } +-#endif +- + // ----------------- + // - Printer-Types - + // ----------------- +@@ -268,29 +261,17 @@ class Printer : public OutputDevice + friend class ImplQPrinter; + + private: +-#ifndef REMOTE_APPSERVER ++ void* mpPrinterData_NotUsedYet; + SalInfoPrinter* mpInfoPrinter; + SalPrinter* mpPrinter; + Printer* mpJobPrinter; + SalGraphics* mpJobGraphics; +-#else +- RmPrinter* mpInfoPrinter; +- RmPrinter* mpPrinter; +- void* mpJobPrinter; +- void* mpJobGraphics; +-#endif + Printer* mpPrev; + Printer* mpNext; + VirtualDevice* mpDisplayDev; + ImplQPrinter* mpQPrinter; + GDIMetaFile* mpQMtf; + PrinterOptions* mpPrinterOptions; +-#ifndef REMOTE_APPSERVER +- void* mpDummy2; +-#else +- ::std::vector< PrinterPage* >* mpRemotePages; +-#endif +- void* mpDummy3; + XubString maPrinterName; + XubString maDriver; + XubString maPrintFile; +@@ -313,18 +294,11 @@ private: + BOOL mbIsQueuePrinter; + BOOL mbUserSetupCompleted; + BOOL mbUserSetupResult; +- BOOL mbDummy3; + Link maErrorHdl; + Link maStartPrintHdl; + Link maEndPrintHdl; + Link maPrintPageHdl; + +-#ifdef REMOTE_APPSERVER +- DECL_LINK( UserSetupCompleted, ::com::sun::star::uno::Any* ); +-#endif +- +-#if _SOLAR__PRIVATE +-#ifdef _SV_PRINT_CXX + void ImplInitData(); + void ImplInit( SalPrinterQueueInfo* pInfo ); + void ImplInitDisplay( const Window* pWindow ); +@@ -333,19 +307,11 @@ private: + void ImplUpdatePageData(); + void ImplUpdateFontList(); + void ImplFindPaperFormatForUserSize( JobSetup& ); +-#endif // _SV_PRINT_CXX +-#ifndef REMOTE_APPSERVER +- + DECL_LINK( ImplDestroyPrinterAsync, void* ); ++#if _SOLAR__PRIVATE + public: +- + void ImplEndPrint(); +-#else +-public: +- void PrintRemotePage( ULONG nPage ); +- void GetRemotePageSetup( ULONG nPage, ::com::sun::star::portal::client::RmJobSetup& rSetup ); +-#endif // REMOTE_APPSERVER +-#endif // __PRIVATE ++#endif + + #ifdef _SPOOLPRINTER_EXT + public: +Index: vcl/inc/regband.hxx +=================================================================== +RCS file: /cvs/gsl/vcl/inc/regband.hxx,v +retrieving revision 1.1.1.1 +retrieving revision 1.2 +diff -u -p -u -r1.1.1.1 -r1.2 +--- vcl/inc/regband.hxx 19 Sep 2000 10:23:06 -0000 1.1.1.1 ++++ vcl/inc/regband.hxx 7 Jan 2004 09:13:14 -0000 1.2 +@@ -65,8 +65,8 @@ + #ifndef _SV_SV_H + #include <sv.h> + #endif +-#ifndef _SV_POLY_HXX +-#include <poly.hxx> ++#ifndef _TL_POLY_HXX ++#include <tools/poly.hxx> + #endif + + /* ======================================================================= +Index: vcl/inc/region.h +=================================================================== +RCS file: /cvs/gsl/vcl/inc/region.h,v +retrieving revision 1.1.1.1 +retrieving revision 1.2 +diff -u -p -u -r1.1.1.1 -r1.2 +--- vcl/inc/region.h 19 Sep 2000 10:23:06 -0000 1.1.1.1 ++++ vcl/inc/region.h 7 Jan 2004 09:13:32 -0000 1.2 +@@ -68,8 +68,8 @@ + #ifndef _SV_REGBAND_HXX + #include <regband.hxx> + #endif +-#ifndef _SV_POLY_HXX +-#include <poly.hxx> ++#ifndef _TL_POLY_HXX ++#include <tools/poly.hxx> + #endif + + #ifndef _SV_REGION_HXX +Index: vcl/inc/region.hxx +=================================================================== +RCS file: /cvs/gsl/vcl/inc/region.hxx,v +retrieving revision 1.3 +retrieving revision 1.5 +diff -u -p -u -r1.3 -r1.5 +--- vcl/inc/region.hxx 18 Jun 2001 12:53:13 -0000 1.3 ++++ vcl/inc/region.hxx 7 Jan 2004 09:13:51 -0000 1.5 +@@ -91,11 +91,30 @@ typedef long RegionHandle; + + class Region + { ++ friend class OutputDevice; ++ friend class Window; ++ friend class Bitmap; ++ + private: +- ImplRegion* mpImplRegion; ++ ImplRegion* mpImplRegion; ++ ++ void ImplCopyData(); ++ void ImplCreateRectRegion( const Rectangle& rRect ); ++ void ImplCreatePolyPolyRegion( const PolyPolygon& rPolyPoly ); ++ void ImplPolyPolyRegionToBandRegionFunc(); ++ inline void ImplPolyPolyRegionToBandRegion(); ++ const ImplRegion* ImplGetImplRegion() const { return mpImplRegion; } ++ ImplRegion* ImplGetImplRegion() { return mpImplRegion; } ++ BOOL ImplGetFirstRect( ImplRegionInfo& rImplRegionInfo, ++ long& nX, long& nY, long& nWidth, long& nHeight ) const; ++ BOOL ImplGetNextRect( ImplRegionInfo& rImplRegionInfo, ++ long& nX, long& nY, long& nWidth, long& nHeight ) const; ++ void ImplBeginAddRect( ); ++ BOOL ImplAddRect( const Rectangle& rRect ); ++ void ImplEndAddRect( ); + +-#if _SOLAR__PRIVATE +-#include <region.imp> ++#ifdef DBG_UTIL ++ friend const char* ImplDbgTestRegion( const void* pObj ); + #endif + + public: +@@ -150,9 +169,6 @@ public: + + friend SvStream& operator>>( SvStream& rIStm, Region& rRegion ); + friend SvStream& operator<<( SvStream& rOStm, const Region& rRegion ); +- +- // usage of this function is only intended for the remote client +- RegionOverlapType GetOverlapType( const Rectangle& rRect ) const; + }; + + #endif // _SV_REGION_HXX +Index: vcl/inc/salbmp.hxx +=================================================================== +RCS file: vcl/inc/salbmp.hxx +diff -N vcl/inc/salbmp.hxx +--- /dev/null 1 Jan 1970 00:00:00 -0000 ++++ vcl/inc/salbmp.hxx 18 Nov 2003 14:28:29 -0000 1.2 +@@ -0,0 +1,96 @@ ++/************************************************************************* ++ * ++ * ++ * ++ * ++ * ++ * ++ * ++ * The Contents of this file are made available subject to the terms of ++ * either of the following licenses ++ * ++ * - GNU Lesser General Public License Version 2.1 ++ * - Sun Industry Standards Source License Version 1.1 ++ * ++ * Sun Microsystems Inc., October, 2000 ++ * ++ * GNU Lesser General Public License Version 2.1 ++ * ============================================= ++ * Copyright 2000 by Sun Microsystems, Inc. ++ * 901 San Antonio Road, Palo Alto, CA 94303, USA ++ * ++ * This library is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU Lesser General Public ++ * License version 2.1, as published by the Free Software Foundation. ++ * ++ * This library is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * Lesser General Public License for more details. ++ * ++ * You should have received a copy of the GNU Lesser General Public ++ * License along with this library; if not, write to the Free Software ++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, ++ * MA 02111-1307 USA ++ * ++ * ++ * Sun Industry Standards Source License Version 1.1 ++ * ================================================= ++ * The contents of this file are subject to the Sun Industry Standards ++ * Source License Version 1.1 (the "License"); You may not use this file ++ * except in compliance with the License. You may obtain a copy of the ++ * License at http://www.openoffice.org/license.html. ++ * ++ * Software provided under this License is provided on an "AS IS" basis, ++ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, ++ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, ++ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. ++ * See the License for the specific provisions governing your rights and ++ * obligations concerning the Software. ++ * ++ * The Initial Developer of the Original Code is: Sun Microsystems, Inc. ++ * ++ * Copyright: 2000 by Sun Microsystems, Inc. ++ * ++ * All Rights Reserved. ++ * ++ * Contributor(s): _______________________________________ ++ * ++ * ++ ************************************************************************/ ++ ++#ifndef _SV_SALBMP_HXX ++#define _SV_SALBMP_HXX ++ ++#ifndef _TL_GEN_HXX ++#include <tools/gen.hxx> ++#endif ++ ++struct BitmapBuffer; ++class SalGraphics; ++class BitmapPalette; ++ ++class SalBitmap ++{ ++public: ++ SalBitmap() {} ++ virtual ~SalBitmap(); ++ ++ virtual bool Create( const Size& rSize, ++ USHORT nBitCount, ++ const BitmapPalette& rPal ) = 0; ++ virtual bool Create( const SalBitmap& rSalBmp ) = 0; ++ virtual bool Create( const SalBitmap& rSalBmp, ++ SalGraphics* pGraphics ) = 0; ++ virtual bool Create( const SalBitmap& rSalBmp, ++ USHORT nNewBitCount ) = 0; ++ virtual void Destroy() = 0; ++ virtual Size GetSize() const = 0; ++ virtual USHORT GetBitCount() const = 0; ++ ++ virtual BitmapBuffer* AcquireBuffer( bool bReadOnly ) = 0; ++ virtual void ReleaseBuffer( BitmapBuffer* pBuffer, bool bReadOnly ) = 0; ++ ++}; ++ ++#endif +Index: vcl/inc/salctrlhandle.hxx +=================================================================== +RCS file: vcl/inc/salctrlhandle.hxx +diff -N vcl/inc/salctrlhandle.hxx +--- /dev/null 1 Jan 1970 00:00:00 -0000 ++++ vcl/inc/salctrlhandle.hxx 10 May 2004 15:42:11 -0000 1.2 +@@ -0,0 +1,82 @@ ++/************************************************************************* ++ * ++ * ++ * ++ * ++ * ++ * ++ * ++ * The Contents of this file are made available subject to the terms of ++ * either of the following licenses ++ * ++ * - GNU Lesser General Public License Version 2.1 ++ * - Sun Industry Standards Source License Version 1.1 ++ * ++ * Sun Microsystems Inc., October, 2000 ++ * ++ * GNU Lesser General Public License Version 2.1 ++ * ============================================= ++ * Copyright 2000 by Sun Microsystems, Inc. ++ * 901 San Antonio Road, Palo Alto, CA 94303, USA ++ * ++ * This library is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU Lesser General Public ++ * License version 2.1, as published by the Free Software Foundation. ++ * ++ * This library is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * Lesser General Public License for more details. ++ * ++ * You should have received a copy of the GNU Lesser General Public ++ * License along with this library; if not, write to the Free Software ++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, ++ * MA 02111-1307 USA ++ * ++ * ++ * Sun Industry Standards Source License Version 1.1 ++ * ================================================= ++ * The contents of this file are subject to the Sun Industry Standards ++ * Source License Version 1.1 (the "License"); You may not use this file ++ * except in compliance with the License. You may obtain a copy of the ++ * License at http://www.openoffice.org/license.html. ++ * ++ * Software provided under this License is provided on an "AS IS" basis, ++ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, ++ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, ++ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. ++ * See the License for the specific provisions governing your rights and ++ * obligations concerning the Software. ++ * ++ * The Initial Developer of the Original Code is: Sun Microsystems, Inc. ++ * ++ * Copyright: 2000 by Sun Microsystems, Inc. ++ * ++ * All Rights Reserved. ++ * ++ * Contributor(s): _______________________________________ ++ * ++ * ++ ************************************************************************/ ++ ++#ifndef _SV_SALCTRLHANDLE_HXX ++#define _SV_SALCTRLHANDLE_HXX ++ ++/* SalControlHandle: ++ * ++ * Container for platform-specific handles and data ++ * about controls. Lives as long as the VCL control ++ * lives. ++ */ ++ ++class SalControlHandle ++{ ++ public: ++ SalControlHandle() {} ++ virtual ~SalControlHandle(); ++ ++ // TODO: derive Sal implementation ++ //SalControlHandleData maData; ++}; ++ ++#endif +Index: vcl/inc/salframe.hxx +=================================================================== +RCS file: /cvs/gsl/vcl/inc/salframe.hxx,v +retrieving revision 1.16 +retrieving revision 1.19 +diff -u -p -u -r1.16 -r1.19 +--- vcl/inc/salframe.hxx 24 Apr 2003 15:16:48 -0000 1.16 ++++ vcl/inc/salframe.hxx 10 May 2004 15:42:24 -0000 1.19 +@@ -80,9 +80,6 @@ + #ifndef _SV_SALWTYPE_HXX + #include <salwtype.hxx> + #endif +-#ifndef _SV_SALFRAME_H +-#include <salframe.h> +-#endif + #ifndef _SV_SALGEOM_HXX + #include <salgeom.hxx> + #endif +@@ -91,11 +88,20 @@ + #include <tools/gen.hxx> + #endif + ++#ifndef _SV_REGION_HXX ++#include <region.hxx> ++#endif ++ ++#ifndef _RTL_USTRING_HXX_ ++#include <rtl/ustring.hxx> ++#endif ++ + #ifdef __cplusplus + + class AllSettings; + class SalGraphics; + class SalBitmap; ++class SalMenu; + + #else + +@@ -160,112 +166,119 @@ struct SystemEnvData; + + #ifdef __cplusplus + ++using namespace rtl; ++ + // ------------ + // - SalFrame - + // ------------ + ++struct SystemParentData; ++ + class SalFrame + { +- friend class SalInstance; +- ++ void* m_pInst; ++ SALFRAMEPROC m_pProc; + public: // public for Sal Implementation +- SalFrame(); +- ~SalFrame(); ++ SalFrame() : m_pInst( NULL ), m_pProc( NULL ) {} ++ virtual ~SalFrame(); + + public: // public for Sal Implementation +- SalFrameData maFrameData; + SalFrameGeometry maGeometry; +- static BOOL mbInReparent; +- +-#ifdef _INCL_SAL_SALFRAME_IMP +-#include <salframe.imp> +-#endif + + public: + // SalGraphics or NULL, but two Graphics for all SalFrames + // must be returned +- SalGraphics* GetGraphics(); +- void ReleaseGraphics( SalGraphics* pGraphics ); ++ virtual SalGraphics* GetGraphics() = 0; ++ virtual void ReleaseGraphics( SalGraphics* pGraphics ) = 0; + + // Event must be destroyed, when Frame is destroyed + // When Event is called, SalInstance::Yield() must be returned +- BOOL PostEvent( void* pData ); ++ virtual BOOL PostEvent( void* pData ) = 0; + +- void SetTitle( const XubString& rTitle ); +- void SetIcon( USHORT nIcon ); +- +- // Befor the window is visible, a resize event +- // must be sent with the correct size +- void Show( BOOL bVisible, BOOL bNoActivate = FALSE ); +- void Enable( BOOL bEnable ); +- // Set ClientSize and Center the Window to the desktop +- // and send/post a resize message +- void SetMinClientSize( long nWidth, long nHeight ); +- void SetPosSize( long nX, long nY, long nWidth, long nHeight, USHORT nFlags ); +- void GetClientSize( long& rWidth, long& rHeight ); +- void GetWorkArea( Rectangle& rRect ); +- SalFrame* GetParent() const; ++ virtual void SetTitle( const XubString& rTitle ) = 0; ++ virtual void SetIcon( USHORT nIcon ) = 0; ++ virtual void SetMenu( SalMenu *pSalMenu ) = 0; ++ virtual void DrawMenuBar() = 0; ++ ++ // Before the window is visible, a resize event ++ // must be sent with the correct size ++ virtual void Show( BOOL bVisible, BOOL bNoActivate = FALSE ) = 0; ++ virtual void Enable( BOOL bEnable ) = 0; ++ // Set ClientSize and Center the Window to the desktop ++ // and send/post a resize message ++ virtual void SetMinClientSize( long nWidth, long nHeight ) = 0; ++ virtual void SetPosSize( long nX, long nY, long nWidth, long nHeight, USHORT nFlags ) = 0; ++ virtual void GetClientSize( long& rWidth, long& rHeight ) = 0; ++ virtual void GetWorkArea( Rectangle& rRect ) = 0; ++ virtual SalFrame* GetParent() const = 0; + // Note: x will be mirrored at parent if UI mirroring is active +- SalFrameGeometry GetGeometry(); +- const SalFrameGeometry& GetUnmirroredGeometry() const { return maGeometry; } +- void SetWindowState( const SalFrameState* pState ); +- BOOL GetWindowState( SalFrameState* pState ); +- void ShowFullScreen( BOOL bFullScreen ); +- // Enable/Disable ScreenSaver, SystemAgents, ... +- void StartPresentation( BOOL bStart ); +- // Show Window over all other Windows +- void SetAlwaysOnTop( BOOL bOnTop ); +- +- // Window to top and grab focus +- void ToTop( USHORT nFlags ); +- +- // this function can call with the same +- // pointer style +- void SetPointer( PointerStyle ePointerStyle ); +- void CaptureMouse( BOOL bMouse ); +- void SetPointerPos( long nX, long nY ); +- +- // Alle noch anstehenden Ausgaben sofort +- // durchfuehren +- void Flush(); +- // Dummy-Syncronen Aufruf zum Client/Display +- // machen, damit man sicher sein kann, das +- // Ausgaben nicht den Client/das Display +- // ueberrennen +- void Sync(); +- +- void SetInputContext( SalInputContext* pContext ); +- void EndExtTextInput( USHORT nFlags ); +- +- XubString GetKeyName( USHORT nKeyCode ); +- XubString GetSymbolKeyName( const XubString& rFontName, USHORT nKeyCode ); +- +- // returns the input language used for the last key stroke +- // may be LANGUAGE_DONTKNOW if not supported by the OS +- LanguageType GetInputLanguage(); +- +- SalBitmap* SnapShot(); ++ SalFrameGeometry GetGeometry(); ++ const SalFrameGeometry& GetUnmirroredGeometry() const { return maGeometry; } ++ virtual void SetWindowState( const SalFrameState* pState ) = 0; ++ virtual BOOL GetWindowState( SalFrameState* pState ) = 0; ++ virtual void ShowFullScreen( BOOL bFullScreen ) = 0; ++ // Enable/Disable ScreenSaver, SystemAgents, ... ++ virtual void StartPresentation( BOOL bStart ) = 0; ++ // Show Window over all other Windows ++ virtual void SetAlwaysOnTop( BOOL bOnTop ) = 0; ++ ++ // Window to top and grab focus ++ virtual void ToTop( USHORT nFlags ) = 0; ++ ++ // this function can call with the same ++ // pointer style ++ virtual void SetPointer( PointerStyle ePointerStyle ) = 0; ++ virtual void CaptureMouse( BOOL bMouse ) = 0; ++ virtual void SetPointerPos( long nX, long nY ) = 0; ++ ++ // flush output buffer ++ virtual void Flush() = 0; ++ // flush output buffer, wait till outstanding operations are done ++ virtual void Sync() = 0; ++ ++ virtual void SetInputContext( SalInputContext* pContext ) = 0; ++ virtual void EndExtTextInput( USHORT nFlags ) = 0; ++ ++ virtual String GetKeyName( USHORT nKeyCode ) = 0; ++ virtual String GetSymbolKeyName( const XubString& rFontName, USHORT nKeyCode ) = 0; ++ ++ // returns the input language used for the last key stroke ++ // may be LANGUAGE_DONTKNOW if not supported by the OS ++ virtual LanguageType GetInputLanguage() = 0; + +- void UpdateSettings( AllSettings& rSettings ); ++ virtual SalBitmap* SnapShot() = 0; + +- void Beep( SoundType eSoundType ); ++ virtual void UpdateSettings( AllSettings& rSettings ) = 0; + +- // Liefert die SystemDaten zurueck +- const SystemEnvData* GetSystemData() const; ++ virtual void Beep( SoundType eSoundType ) = 0; ++ ++ // returns system data (most prominent: window handle) ++ virtual const SystemEnvData* GetSystemData() const = 0; + +- // Callbacks (indepen in \sv\source\app\svframe.cxx) +- // for default message handling return 0 +- void SetCallback( void* pInst, SALFRAMEPROC pProc ); + + // get current modifier and button mask +- ULONG GetCurrentModButtons(); ++ virtual ULONG GetCurrentModButtons() = 0; + + // set new parent window +- void SetParent( SalFrame* pNewParent ); ++ virtual void SetParent( SalFrame* pNewParent ) = 0; + // reparent window to act as a plugin; implementation + // may choose to use a new system window inetrnally + // return false to indicate failure +- bool SetPluginParent( SystemParentData* pNewParent ); ++ virtual bool SetPluginParent( SystemParentData* pNewParent ) = 0; ++ ++ // Callbacks (indepent part in vcl/source/window/winproc.cxx) ++ // for default message handling return 0 ++ void SetCallback( void* pInst, SALFRAMEPROC pProc ) ++ { m_pInst = pInst; m_pProc = pProc; } ++ ++ // returns the instance set ++ void* GetInstance() const { return m_pInst; } ++ ++ // Call the callback set; this sometimes necessary for implementation classes ++ // that should not now more than necessary about the SalFrame implementation ++ // (e.g. input methods, printer update handlers). ++ long CallCallback( USHORT nEvent, const void* pEvent ) const ++ { return m_pProc ? m_pProc( m_pInst, const_cast<SalFrame*>(this), nEvent, pEvent ) : 0; } + }; + + +Index: vcl/inc/salgdi.hxx +=================================================================== +RCS file: /cvs/gsl/vcl/inc/salgdi.hxx,v +retrieving revision 1.20.116.1 +retrieving revision 1.24 +diff -u -p -u -r1.20.116.1 -r1.24 +--- vcl/inc/salgdi.hxx 9 Jan 2004 18:13:40 -0000 1.20.116.1 ++++ vcl/inc/salgdi.hxx 17 Jun 2004 12:07:14 -0000 1.24 +@@ -72,15 +72,21 @@ + #ifndef _SV_SALGTYPE_HXX + #include <salgtype.hxx> + #endif +-#ifndef _SV_SALGDI_H +-#include <salgdi.h> +-#endif + #ifndef _VOS_THREAD_HXX + #include <vos/thread.hxx> + #endif + #ifndef _SV_OUTDEV_HXX + #include <outdev.hxx> + #endif ++#ifndef _RTL_USTRING_HXX_ ++#include <rtl/ustring.hxx> ++#endif ++#ifndef _SV_NATIVEWIDGETS_HXX ++#include <salnativewidgets.hxx> ++#endif ++#ifndef _SV_SALCTRLHANDLE_HXX ++#include <salctrlhandle.hxx> ++#endif + + #include <map> + +@@ -97,6 +103,7 @@ class ImplLayoutArgs; + class Rectangle; + struct FontSubsetInfo; + class OutputDevice; ++class ServerFontLayout; + + // --------------------- + // - SalGraphics-Codes - +@@ -114,72 +121,131 @@ class OutputDevice; + // - SalGraphics - + // --------------- + +-// note: if you add any new methods to class SalGraphics that work with coordinates +-// make sure they are virtual and add them to class SalGraphicsLayout where you have +-// to perform coordinate mirroring if required, (see existing methods as sample) ++// note: if you add any new methods to class SalGraphics using coordinates ++// make sure they have a corresponding protected pure virtual method ++// which has to be implemented by the platform dependent part. ++// Add a method that performs coordinate mirroring if required, (see ++// existing methods as sample) and then calls the equivalent pure method. ++ ++// note: all positions are in pixel and relative to ++// the top/left-position of the virtual output area ++ + + class SalGraphics + { +- friend class SalFrame; +- friend class SalVirtualDevice; +- friend class SalPrinter; +- +-public: // public for Sal Implementation +- SalGraphics(); +- virtual ~SalGraphics(); +- +-public: // public for Sal Implementation +- SalGraphicsData maGraphicsData; +- +- // to be overridden by derived class +- virtual int GetLayout() { return 0; } // base class supports left-to-right only +- virtual void SetLayout( int ) {}; ++ int m_nLayout; // 0: mirroring off, 1: mirror x-axis ++public: ++ SalGraphics(); ++ virtual ~SalGraphics(); + +-#ifdef _INCL_SAL_SALGDI_IMP +-#include <salgdi.imp> +-#endif ++protected: ++ virtual BOOL unionClipRegion( long nX, long nY, long nWidth, long nHeight ) = 0; ++ // draw --> LineColor and FillColor and RasterOp and ClipRegion ++ virtual void drawPixel( long nX, long nY ) = 0; ++ virtual void drawPixel( long nX, long nY, SalColor nSalColor ) = 0; ++ virtual void drawLine( long nX1, long nY1, long nX2, long nY2 ) = 0; ++ virtual void drawRect( long nX, long nY, long nWidth, long nHeight ) = 0; ++ virtual void drawPolyLine( ULONG nPoints, const SalPoint* pPtAry ) = 0; ++ virtual void drawPolygon( ULONG nPoints, const SalPoint* pPtAry ) = 0; ++ virtual void drawPolyPolygon( ULONG nPoly, const ULONG* pPoints, PCONSTSALPOINT* pPtAry ) = 0; ++ virtual sal_Bool drawPolyLineBezier( ULONG nPoints, const SalPoint* pPtAry, const BYTE* pFlgAry ) = 0; ++ virtual sal_Bool drawPolygonBezier( ULONG nPoints, const SalPoint* pPtAry, const BYTE* pFlgAry ) = 0; ++ virtual sal_Bool drawPolyPolygonBezier( ULONG nPoly, const ULONG* pPoints, const SalPoint* const* pPtAry, const BYTE* const* pFlgAry ) = 0; + ++ // CopyArea --> No RasterOp, but ClipRegion ++ virtual void copyArea( long nDestX, long nDestY, long nSrcX, long nSrcY, long nSrcWidth, ++ long nSrcHeight, USHORT nFlags ) = 0; ++ ++ // CopyBits and DrawBitmap --> RasterOp and ClipRegion ++ // CopyBits() --> pSrcGraphics == NULL, then CopyBits on same Graphics ++ virtual void copyBits( const SalTwoRect* pPosAry, SalGraphics* pSrcGraphics ) = 0; ++ virtual void drawBitmap( const SalTwoRect* pPosAry, const SalBitmap& rSalBitmap ) = 0; ++ virtual void drawBitmap( const SalTwoRect* pPosAry, ++ const SalBitmap& rSalBitmap, ++ SalColor nTransparentColor ) = 0; ++ virtual void drawBitmap( const SalTwoRect* pPosAry, ++ const SalBitmap& rSalBitmap, ++ const SalBitmap& rTransparentBitmap ) = 0; ++ virtual void drawMask( const SalTwoRect* pPosAry, ++ const SalBitmap& rSalBitmap, ++ SalColor nMaskColor ) = 0; ++ ++ virtual SalBitmap* getBitmap( long nX, long nY, long nWidth, long nHeight ) = 0; ++ virtual SalColor getPixel( long nX, long nY ) = 0; ++ ++ // invert --> ClipRegion (only Windows or VirDevs) ++ virtual void invert( long nX, long nY, long nWidth, long nHeight, SalInvert nFlags) = 0; ++ virtual void invert( ULONG nPoints, const SalPoint* pPtAry, SalInvert nFlags ) = 0; ++ ++ virtual BOOL drawEPS( long nX, long nY, long nWidth, long nHeight, void* pPtr, ULONG nSize ) = 0; ++ ++ // native widget rendering methods that require mirroring ++ virtual BOOL hitTestNativeControl( ControlType nType, ControlPart nPart, const Region& rControlRegion, ++ const Point& aPos, SalControlHandle& rControlHandle, BOOL& rIsInside ); ++ virtual BOOL drawNativeControl( ControlType nType, ControlPart nPart, const Region& rControlRegion, ++ ControlState nState, const ImplControlValue& aValue, SalControlHandle& rControlHandle, ++ rtl::OUString aCaption ); ++ virtual BOOL drawNativeControlText( ControlType nType, ControlPart nPart, const Region& rControlRegion, ++ ControlState nState, const ImplControlValue& aValue, ++ SalControlHandle& rControlHandle, rtl::OUString aCaption ); ++ virtual BOOL getNativeControlRegion( ControlType nType, ControlPart nPart, const Region& rControlRegion, ControlState nState, ++ const ImplControlValue& aValue, SalControlHandle& rControlHandle, rtl::OUString aCaption, ++ Region &rNativeBoundingRegion, Region &rNativeContentRegion ); + public: ++ // public SalGraphics methods, the interface to the independent vcl part + +- // this functions must be quick, because this data is query for all +- // GetGraphics()-Instances +- void GetResolution( long& rDPIX, long& rDPIY ); +- void GetScreenFontResolution( long& rDPIX, long& rDPIY ); +- USHORT GetBitCount(); +- long GetGraphicsWidth(); +- +- void ResetClipRegion(); +- void BeginSetClipRegion( ULONG nCount ); +- virtual BOOL UnionClipRegion( long nX, long nY, long nWidth, long nHeight, const OutputDevice *pOutDev ); +- void EndSetClipRegion(); +- +- void SetLineColor(); +- void SetLineColor( SalColor nSalColor ); +- void SetFillColor(); +- +- void SetFillColor( SalColor nSalColor ); +- +- void SetXORMode( BOOL bSet ); +- +- void SetROPLineColor( SalROPColor nROPColor ); +- void SetROPFillColor( SalROPColor nROPColor ); +- +- // all positions are in pixel and relative to +- // the top/left-position of the output area +- void SetTextColor( SalColor nSalColor ); +- USHORT SetFont( ImplFontSelectData*, int nFallbackLevel ); +- void GetFontMetric( ImplFontMetricData* ); +- // return only PairCount when (pKernPairs == NULL) +- ULONG GetKernPairs( ULONG nPairs, ImplKernPairData* pKernPairs ); +- ULONG GetFontCodeRanges( sal_uInt32* pCodePairs ) const; ++ // get device resolution ++ virtual void GetResolution( sal_Int32& rDPIX, sal_Int32& rDPIY ) = 0; ++ // get resolution for fonts (an implementations specific adjustment, ++ // ideally would be the same as the Resolution) ++ virtual void GetScreenFontResolution( sal_Int32& rDPIX, sal_Int32& rDPIY ) = 0; ++ // get the depth of the device ++ virtual USHORT GetBitCount() = 0; ++ // get the width of the device ++ virtual long GetGraphicsWidth() = 0; ++ ++ // set the clip region to empty ++ virtual void ResetClipRegion() = 0; ++ // begin setting the clip region, add rectangles to the ++ // region with the UnionClipRegion call ++ virtual void BeginSetClipRegion( ULONG nCount ) = 0; ++ // all rectangles were added and the clip region should be set now ++ virtual void EndSetClipRegion() = 0; ++ ++ // set the line color to transparent (= don't draw lines) ++ virtual void SetLineColor() = 0; ++ // set the line color to a specific color ++ virtual void SetLineColor( SalColor nSalColor ) = 0; ++ // set the fill color to transparent (= don't fill) ++ virtual void SetFillColor() = 0; ++ // set the fill color to a specific color, shapes will be ++ // filled accordingly ++ virtual void SetFillColor( SalColor nSalColor ) = 0; ++ // enable/disable XOR drawing ++ virtual void SetXORMode( BOOL bSet ) = 0; ++ // set line color for raster operations ++ virtual void SetROPLineColor( SalROPColor nROPColor ) = 0; ++ // set fill color for raster operations ++ virtual void SetROPFillColor( SalROPColor nROPColor ) = 0; ++ // set the text color to a specific color ++ virtual void SetTextColor( SalColor nSalColor ) = 0; ++ // set the font ++ virtual USHORT SetFont( ImplFontSelectData*, int nFallbackLevel ) = 0; ++ // get the current font's etrics ++ virtual void GetFontMetric( ImplFontMetricData* ) = 0; ++ // get kernign pairs of the current font ++ // return only PairCount if (pKernPairs == NULL) ++ virtual ULONG GetKernPairs( ULONG nPairs, ImplKernPairData* pKernPairs ) = 0; ++ // get the repertoire of the current font; the code pairs returned ++ // contain unicode ranges. if pCodePairs is NULL return only the ++ // number of pairs which would be filled ++ virtual ULONG GetFontCodeRanges( sal_uInt32* pCodePairs ) const = 0; + // graphics must fill supplied font list +- void GetDevFontList( ImplDevFontList* ); ++ virtual void GetDevFontList( ImplDevFontList* ) = 0; + // graphics should call ImplAddDevFontSubstitute on supplied + // OutputDevice for all its device specific preferred font substitutions +- void GetDevFontSubstList( OutputDevice* ); +- ImplFontData* AddTempDevFont( const String& rFileURL, const String& rFontName ); +- static void RemovingFont( ImplFontData* ); +- ++ virtual void GetDevFontSubstList( OutputDevice* ) = 0; ++ virtual ImplFontData* AddTempDevFont( const String& rFileURL, const String& rFontName ) = 0; + // CreateFontSubset: a method to get a subset of glyhps of a font + // inside a new valid font file + // returns TRUE if creation of subset was successfull +@@ -192,14 +258,14 @@ public: + // rInfo: additional outgoing information + // implementation note: encoding 0 with glyph id 0 should be added implicitly + // as "undefined character" +- BOOL CreateFontSubset( const rtl::OUString& rToFile, ++ virtual BOOL CreateFontSubset( const rtl::OUString& rToFile, + ImplFontData* pFont, +- long* pGlyphIDs, ++ sal_Int32* pGlyphIDs, + sal_uInt8* pEncoding, + sal_Int32* pWidths, + int nGlyphs, + FontSubsetInfo& rInfo // out parameter +- ); ++ ) = 0; + + // GetFontEncodingVector: a method to get the encoding map Unicode + // to font encoded character; this is only used for type1 fonts and +@@ -208,7 +274,7 @@ public: + // glyphs with only a name) exist it is set to the corresponding + // map for non encoded glyphs; the encoding vector contains -1 + // as encoding for these cases +- const std::map< sal_Unicode, sal_Int32 >* GetFontEncodingVector( ImplFontData* pFont, const std::map< sal_Unicode, rtl::OString >** ppNonEncoded ); ++ virtual const std::map< sal_Unicode, sal_Int32 >* GetFontEncodingVector( ImplFontData* pFont, const std::map< sal_Unicode, rtl::OString >** ppNonEncoded ) = 0; + + // GetEmbedFontData: gets the font data for a font marked + // embeddable by GetDevFontList or NULL in case of error +@@ -219,130 +285,146 @@ public: + // pWidths MUST support at least 256 members; + // rInfo: additional outgoing information + // pDataLen: out parameter, contains the byte length of the returned buffer +- const void* GetEmbedFontData( ImplFontData* pFont, +- const sal_Unicode* pUnicodes, +- sal_Int32* pWidths, +- FontSubsetInfo& rInfo, +- long* pDataLen ); ++ virtual const void* GetEmbedFontData( ImplFontData* pFont, ++ const sal_Unicode* pUnicodes, ++ sal_Int32* pWidths, ++ FontSubsetInfo& rInfo, ++ long* pDataLen ) = 0; + // frees the font data again +- void FreeEmbedFontData( const void* pData, long nDataLen ); ++ virtual void FreeEmbedFontData( const void* pData, long nDataLen ) = 0; + +- virtual BOOL GetGlyphBoundRect( long nIndex, Rectangle&, const OutputDevice *pOutDev ); +- virtual BOOL GetGlyphOutline( long nIndex, PolyPolygon&, const OutputDevice *pOutDev ); ++ virtual BOOL GetGlyphBoundRect( long nIndex, Rectangle& ) = 0; ++ virtual BOOL GetGlyphOutline( long nIndex, PolyPolygon& ) = 0; + +- virtual SalLayout* GetTextLayout( ImplLayoutArgs&, int nFallbackLevel ); ++ virtual SalLayout* GetTextLayout( ImplLayoutArgs&, int nFallbackLevel ) = 0; ++ virtual void DrawServerFontLayout( const ServerFontLayout& ) = 0; + +- // draw --> LineColor and FillColor and RasterOp and ClipRegion +- virtual void DrawPixel( long nX, long nY, const OutputDevice *pOutDev ); +- virtual void DrawPixel( long nX, long nY, SalColor nSalColor, const OutputDevice *pOutDev ); +- virtual void DrawLine( long nX1, long nY1, long nX2, long nY2, const OutputDevice *pOutDev ); +- virtual void DrawRect( long nX, long nY, long nWidth, long nHeight, const OutputDevice *pOutDev ); +- virtual void DrawPolyLine( ULONG nPoints, const SalPoint* pPtAry, const OutputDevice *pOutDev ); +- virtual void DrawPolygon( ULONG nPoints, const SalPoint* pPtAry, const OutputDevice *pOutDev ); +- virtual void DrawPolyPolygon( ULONG nPoly, const ULONG* pPoints, +- PCONSTSALPOINT* pPtAry, const OutputDevice *pOutDev ); +- virtual sal_Bool DrawPolyLineBezier( ULONG nPoints, const SalPoint* pPtAry, const BYTE* pFlgAry, const OutputDevice *pOutDev ); +- virtual sal_Bool DrawPolygonBezier( ULONG nPoints, const SalPoint* pPtAry, const BYTE* pFlgAry, const OutputDevice *pOutDev ); +- virtual sal_Bool DrawPolyPolygonBezier( ULONG nPoly, const ULONG* pPoints, +- const SalPoint* const* pPtAry, const BYTE* const* pFlgAry, const OutputDevice *pOutDev ); ++ // mirroring specifica ++ int GetLayout() { return m_nLayout; } ++ void SetLayout( int aLayout ) { m_nLayout = aLayout;} + ++ void mirror( long& nX, const OutputDevice *pOutDev ); ++ void mirror( long& nX, long& nWidth, const OutputDevice *pOutDev ); ++ BOOL mirror( sal_uInt32 nPoints, const SalPoint *pPtAry, SalPoint *pPtAry2, const OutputDevice *pOutDev ); ++ void mirror( Region& rRgn, const OutputDevice *pOutDev ); ++ ++ // non virtual methods; these do eventual coordinate mirroring and ++ // then delegate to protected virtual methods ++ BOOL UnionClipRegion( long nX, long nY, long nWidth, long nHeight, const OutputDevice *pOutDev ); ++ // draw --> LineColor and FillColor and RasterOp and ClipRegion ++ void DrawPixel( long nX, long nY, const OutputDevice *pOutDev ); ++ void DrawPixel( long nX, long nY, SalColor nSalColor, const OutputDevice *pOutDev ); ++ void DrawLine( long nX1, long nY1, long nX2, long nY2, const OutputDevice *pOutDev ); ++ void DrawRect( long nX, long nY, long nWidth, long nHeight, const OutputDevice *pOutDev ); ++ void DrawPolyLine( ULONG nPoints, const SalPoint* pPtAry, const OutputDevice *pOutDev ); ++ void DrawPolygon( ULONG nPoints, const SalPoint* pPtAry, const OutputDevice *pOutDev ); ++ void DrawPolyPolygon( ULONG nPoly, ++ const ULONG* pPoints, ++ PCONSTSALPOINT* pPtAry, ++ const OutputDevice *pOutDev ); ++ sal_Bool DrawPolyLineBezier( ULONG nPoints, ++ const SalPoint* pPtAry, ++ const BYTE* pFlgAry, ++ const OutputDevice *pOutDev ); ++ sal_Bool DrawPolygonBezier( ULONG nPoints, ++ const SalPoint* pPtAry, ++ const BYTE* pFlgAry, ++ const OutputDevice *pOutDev ); ++ sal_Bool DrawPolyPolygonBezier( ULONG nPoly, ++ const ULONG* pPoints, ++ const SalPoint* const* pPtAry, ++ const BYTE* const* pFlgAry, ++ const OutputDevice *pOutDev ); ++ + // CopyArea --> No RasterOp, but ClipRegion +- virtual void CopyArea( long nDestX, long nDestY, +- long nSrcX, long nSrcY, +- long nSrcWidth, long nSrcHeight, +- USHORT nFlags, const OutputDevice *pOutDev ); ++ void CopyArea( long nDestX, ++ long nDestY, ++ long nSrcX, ++ long nSrcY, ++ long nSrcWidth, ++ long nSrcHeight, ++ USHORT nFlags, ++ const OutputDevice *pOutDev ); + + // CopyBits and DrawBitmap --> RasterOp and ClipRegion + // CopyBits() --> pSrcGraphics == NULL, then CopyBits on same Graphics +- virtual void CopyBits( const SalTwoRect* pPosAry, +- SalGraphics* pSrcGraphics, const OutputDevice *pOutDev, const OutputDevice *pSrcOutDev ); +- virtual void DrawBitmap( const SalTwoRect* pPosAry, +- const SalBitmap& rSalBitmap, const OutputDevice *pOutDev ); +- virtual void DrawBitmap( const SalTwoRect* pPosAry, ++ void CopyBits( const SalTwoRect* pPosAry, ++ SalGraphics* pSrcGraphics, ++ const OutputDevice *pOutDev, ++ const OutputDevice *pSrcOutDev ); ++ void DrawBitmap( const SalTwoRect* pPosAry, + const SalBitmap& rSalBitmap, +- SalColor nTransparentColor, const OutputDevice *pOutDev ); +- virtual void DrawBitmap( const SalTwoRect* pPosAry, ++ const OutputDevice *pOutDev ); ++ void DrawBitmap( const SalTwoRect* pPosAry, + const SalBitmap& rSalBitmap, +- const SalBitmap& rTransparentBitmap, const OutputDevice *pOutDev ); ++ SalColor nTransparentColor, ++ const OutputDevice *pOutDev ); ++ void DrawBitmap( const SalTwoRect* pPosAry, ++ const SalBitmap& rSalBitmap, ++ const SalBitmap& rTransparentBitmap, ++ const OutputDevice *pOutDev ); + +- virtual void DrawMask( const SalTwoRect* pPosAry, ++ void DrawMask( const SalTwoRect* pPosAry, + const SalBitmap& rSalBitmap, +- SalColor nMaskColor, const OutputDevice *pOutDev ); ++ SalColor nMaskColor, ++ const OutputDevice *pOutDev ); + +- virtual SalBitmap* GetBitmap( long nX, long nY, long nWidth, long nHeight, const OutputDevice *pOutDev ); +- virtual SalColor GetPixel( long nX, long nY, const OutputDevice *pOutDev ); ++ SalBitmap* GetBitmap( long nX, long nY, long nWidth, long nHeight, const OutputDevice *pOutDev ); ++ SalColor GetPixel( long nX, long nY, const OutputDevice *pOutDev ); + + // invert --> ClipRegion (only Windows) +- virtual void Invert( long nX, long nY, long nWidth, long nHeight, SalInvert nFlags, const OutputDevice *pOutDev ); +- virtual void Invert( ULONG nPoints, const SalPoint* pPtAry, SalInvert nFlags, const OutputDevice *pOutDev ); +- +- virtual BOOL DrawEPS( long nX, long nY, long nWidth, long nHeight, void* pPtr, ULONG nSize, const OutputDevice *pOutDev ); +-}; +- +- +-// --------------------- +-// - SalGraphicsLayout - +-// --------------------- +- +-// extend SalGraphics for RTL +- +-class SalGraphicsLayout : public SalGraphics +-{ +- friend class SalFrame; +- friend class SalVirtualDevice; +- friend class SalPrinter; +- +-private: +- int mnLayout; +- +-public: +- SalGraphicsLayout(); +- ~SalGraphicsLayout(); +- +- int GetLayout() { return mnLayout; } +- void SetLayout( int aLayout) { mnLayout = aLayout;} +- +- void mirror( long& nX, const OutputDevice *pOutDev ); +- void mirror( long& nX, long& nWidth, const OutputDevice *pOutDev ); +- BOOL mirror( sal_uInt32 nPoints, const SalPoint *pPtAry, SalPoint *pPtAry2, const OutputDevice *pOutDev ); +- +- // overwrite those SalGraphics methods that require mirroring +- // note: text methods will not be mirrored here, this is handled in outdev3.cxx +- BOOL UnionClipRegion( long nX, long nY, long nWidth, long nHeight, const OutputDevice *pOutDev ); +- void DrawPixel( long nX, long nY, const OutputDevice *pOutDev ); +- void DrawPixel( long nX, long nY, SalColor nSalColor, const OutputDevice *pOutDev ); +- void DrawLine( long nX1, long nY1, long nX2, long nY2, const OutputDevice *pOutDev ); +- void DrawRect( long nX, long nY, long nWidth, long nHeight, const OutputDevice *pOutDev ); +- void DrawPolyLine( ULONG nPoints, const SalPoint* pPtAry, const OutputDevice *pOutDev ); +- void DrawPolygon( ULONG nPoints, const SalPoint* pPtAry, const OutputDevice *pOutDev ); +- void DrawPolyPolygon( ULONG nPoly, const ULONG* pPoints, +- PCONSTSALPOINT* pPtAry, const OutputDevice *pOutDev ); +- sal_Bool DrawPolyLineBezier( ULONG nPoints, const SalPoint* pPtAry, const BYTE* pFlgAry, const OutputDevice *pOutDev ); +- sal_Bool DrawPolygonBezier( ULONG nPoints, const SalPoint* pPtAry, const BYTE* pFlgAry, const OutputDevice *pOutDev ); +- sal_Bool DrawPolyPolygonBezier( ULONG nPoly, const ULONG* pPoints, +- const SalPoint* const* pPtAry, const BYTE* const* pFlgAry, const OutputDevice *pOutDev ); +- void CopyArea( long nDestX, long nDestY, +- long nSrcX, long nSrcY, +- long nSrcWidth, long nSrcHeight, +- USHORT nFlags, const OutputDevice *pOutDev ); +- void CopyBits( const SalTwoRect* pPosAry, +- SalGraphics* pSrcGraphics, const OutputDevice *pOutDev, const OutputDevice *pSrcOutDev ); +- void DrawBitmap( const SalTwoRect* pPosAry, +- const SalBitmap& rSalBitmap, const OutputDevice *pOutDev ); +- void DrawBitmap( const SalTwoRect* pPosAry, +- const SalBitmap& rSalBitmap, +- SalColor nTransparentColor, const OutputDevice *pOutDev ); +- void DrawBitmap( const SalTwoRect* pPosAry, +- const SalBitmap& rSalBitmap, +- const SalBitmap& rTransparentBitmap, const OutputDevice *pOutDev ); +- void DrawMask( const SalTwoRect* pPosAry, +- const SalBitmap& rSalBitmap, +- SalColor nMaskColor, const OutputDevice *pOutDev ); +- SalBitmap* GetBitmap( long nX, long nY, long nWidth, long nHeight, const OutputDevice *pOutDev ); +- SalColor GetPixel( long nX, long nY, const OutputDevice *pOutDev ); +- void Invert( long nX, long nY, long nWidth, long nHeight, SalInvert nFlags, const OutputDevice *pOutDev ); +- void Invert( ULONG nPoints, const SalPoint* pPtAry, SalInvert nFlags, const OutputDevice *pOutDev ); +- BOOL DrawEPS( long nX, long nY, long nWidth, long nHeight, void* pPtr, ULONG nSize, const OutputDevice *pOutDev ); ++ void Invert( long nX, long nY, long nWidth, long nHeight, SalInvert nFlags, const OutputDevice *pOutDev ); ++ void Invert( ULONG nPoints, const SalPoint* pPtAry, SalInvert nFlags, const OutputDevice *pOutDev ); ++ ++ BOOL DrawEPS( long nX, long nY, long nWidth, long nHeight, void* pPtr, ULONG nSize, const OutputDevice *pOutDev ); ++ ++ //------------------------------------- ++ // Native Widget Rendering functions ++ //------------------------------------- ++ ++ // Query the platform layer for control support ++ virtual BOOL IsNativeControlSupported( ControlType nType, ControlPart nPart ); ++ ++ // Query the native control to determine if it was acted upon ++ BOOL HitTestNativeControl( ControlType nType, ++ ControlPart nPart, ++ const Region& rControlRegion, ++ const Point& aPos, ++ SalControlHandle& rControlHandle, ++ BOOL& rIsInside, ++ const OutputDevice *pOutDev ); ++ ++ // Request rendering of a particular control and/or part ++ BOOL DrawNativeControl( ControlType nType, ++ ControlPart nPart, ++ const Region& rControlRegion, ++ ControlState nState, ++ const ImplControlValue& aValue, ++ SalControlHandle& rControlHandle, ++ rtl::OUString aCaption, ++ const OutputDevice *pOutDev ); ++ ++ // Request rendering of a caption string for a control ++ BOOL DrawNativeControlText( ControlType nType, ++ ControlPart nPart, ++ const Region& rControlRegion, ++ ControlState nState, ++ const ImplControlValue& aValue, ++ SalControlHandle& rControlHandle, ++ rtl::OUString aCaption, ++ const OutputDevice *pOutDev ); ++ ++ // Query the native control's actual drawing region (including adornment) ++ BOOL GetNativeControlRegion( ControlType nType, ++ ControlPart nPart, ++ const Region& rControlRegion, ++ ControlState nState, ++ const ImplControlValue& aValue, ++ SalControlHandle& rControlHandle, ++ rtl::OUString aCaption, ++ Region &rNativeBoundingRegion, ++ Region &rNativeContentRegion, ++ const OutputDevice *pOutDev ); + }; + + #endif // _SV_SALGDI_HXX +Index: vcl/inc/salimestatus.hxx +=================================================================== +RCS file: vcl/inc/salimestatus.hxx +diff -N vcl/inc/salimestatus.hxx +--- /dev/null 1 Jan 1970 00:00:00 -0000 ++++ vcl/inc/salimestatus.hxx 18 Nov 2003 14:29:06 -0000 1.2 +@@ -0,0 +1,77 @@ ++/************************************************************************* ++ * ++ * ++ * ++ * ++ * ++ * ++ * ++ * The Contents of this file are made available subject to the terms of ++ * either of the following licenses ++ * ++ * - GNU Lesser General Public License Version 2.1 ++ * - Sun Industry Standards Source License Version 1.1 ++ * ++ * Sun Microsystems Inc., October, 2000 ++ * ++ * GNU Lesser General Public License Version 2.1 ++ * ============================================= ++ * Copyright 2000 by Sun Microsystems, Inc. ++ * 901 San Antonio Road, Palo Alto, CA 94303, USA ++ * ++ * This library is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU Lesser General Public ++ * License version 2.1, as published by the Free Software Foundation. ++ * ++ * This library is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * Lesser General Public License for more details. ++ * ++ * You should have received a copy of the GNU Lesser General Public ++ * License along with this library; if not, write to the Free Software ++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, ++ * MA 02111-1307 USA ++ * ++ * ++ * Sun Industry Standards Source License Version 1.1 ++ * ================================================= ++ * The contents of this file are subject to the Sun Industry Standards ++ * Source License Version 1.1 (the "License"); You may not use this file ++ * except in compliance with the License. You may obtain a copy of the ++ * License at http://www.openoffice.org/license.html. ++ * ++ * Software provided under this License is provided on an "AS IS" basis, ++ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, ++ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, ++ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. ++ * See the License for the specific provisions governing your rights and ++ * obligations concerning the Software. ++ * ++ * The Initial Developer of the Original Code is: Sun Microsystems, Inc. ++ * ++ * Copyright: 2000 by Sun Microsystems, Inc. ++ * ++ * All Rights Reserved. ++ * ++ * Contributor(s): _______________________________________ ++ * ++ * ++ ************************************************************************/ ++ ++#ifndef _SV_SALIMESTATUS_HXX ++#define _SV_SALIMESTATUS_HXX ++ ++class SalI18NImeStatus ++{ ++public: ++ SalI18NImeStatus() {} ++ virtual ~SalI18NImeStatus(); ++ ++ // asks whether there is a status window available ++ // to toggle into menubar ++ virtual bool canToggle() = 0; ++ virtual void toggle() = 0; ++}; ++ ++#endif +Index: vcl/inc/salinst.hxx +=================================================================== +RCS file: /cvs/gsl/vcl/inc/salinst.hxx,v +retrieving revision 1.6.280.1 +retrieving revision 1.10 +diff -u -p -u -r1.6.280.1 -r1.10 +--- vcl/inc/salinst.hxx 2 Mar 2004 10:00:22 -0000 1.6.280.1 ++++ vcl/inc/salinst.hxx 18 May 2004 10:49:17 -0000 1.10 +@@ -67,15 +67,11 @@ + #ifndef _STRING_HXX + #include <tools/string.hxx> + #endif +- + #endif // __cplusplus + + #ifndef _SV_SV_H + #include <sv.h> + #endif +-#ifndef _SV_SALINST_H +-#include <salinst.h> +-#endif + + #ifdef __cplusplus + +@@ -86,10 +82,19 @@ struct ImplJobSetup; + class SalGraphics; + class SalFrame; + class SalObject; ++class SalSound; ++class SalOpenGL; ++class SalMenu; ++class SalMenuItem; + class SalVirtualDevice; + class SalInfoPrinter; + class SalPrinter; ++class SalTimer; + class ImplPrnQueueList; ++class SalI18NImeStatus; ++class SalSystem; ++class SalBitmap; ++struct SalItemParams; + class SalSession; + + namespace vos { class IMutex; } +@@ -100,67 +105,88 @@ namespace vos { class IMutex; } + + class SalInstance + { +- friend SalInstance* CreateSalInstance(); +- friend void DestroySalInstance( SalInstance* ); +- ++public: ++ typedef bool(*Callback)(void*,void*,int); + private: +- SalInstance(); +- ~SalInstance(); +- +-public: // public for Sal Implementation +- SalInstanceData maInstData; +- +-#ifdef _INCL_SAL_SALINST_IMP +-#include <salinst.imp> +-#endif +- ++ void* m_pEventInst; ++ void* m_pErrorInst; ++ Callback m_pEventCallback; ++ Callback m_pErrorCallback; ++ + public: +- // Frame +- // DisplayName for Unix ??? +- SalFrame* CreateChildFrame( SystemParentData* pParent, ULONG nStyle ); +- SalFrame* CreateFrame( SalFrame* pParent, ULONG nStyle ); +- void DestroyFrame( SalFrame* pFrame ); +- +- // Object (System Child Window) +- SalObject* CreateObject( SalFrame* pParent ); +- void DestroyObject( SalObject* pObject ); +- +- // VirtualDevice +- // nDX and nDY in Pixeln +- // nBitCount: 0 == Default / 1 == Mono +- SalVirtualDevice* CreateVirtualDevice( SalGraphics* pGraphics, +- long nDX, long nDY, +- USHORT nBitCount ); +- void DestroyVirtualDevice( SalVirtualDevice* pDevice ); +- +- // Printer +- // pSetupData->mpDriverData can be 0 +- // pSetupData must be updatet with the current +- // JobSetup +- SalInfoPrinter* CreateInfoPrinter( SalPrinterQueueInfo* pQueueInfo, +- ImplJobSetup* pSetupData ); +- void DestroyInfoPrinter( SalInfoPrinter* pPrinter ); +- SalPrinter* CreatePrinter( SalInfoPrinter* pInfoPrinter ); +- void DestroyPrinter( SalPrinter* pPrinter ); +- +- void GetPrinterQueueInfo( ImplPrnQueueList* pList ); +- void GetPrinterQueueState( SalPrinterQueueInfo* pInfo ); +- void DeletePrinterQueueInfo( SalPrinterQueueInfo* pInfo ); +- XubString GetDefaultPrinter(); ++ SalInstance() : ++ m_pEventInst( NULL ), ++ m_pErrorInst( NULL ), ++ m_pEventCallback( NULL ), ++ m_pErrorCallback( NULL ) ++ {} ++ virtual ~SalInstance(); ++ ++ // Frame ++ // DisplayName for Unix ??? ++ virtual SalFrame* CreateChildFrame( SystemParentData* pParent, ULONG nStyle ) = 0; ++ virtual SalFrame* CreateFrame( SalFrame* pParent, ULONG nStyle ) = 0; ++ virtual void DestroyFrame( SalFrame* pFrame ) = 0; ++ ++ // Object (System Child Window) ++ virtual SalObject* CreateObject( SalFrame* pParent ) = 0; ++ virtual void DestroyObject( SalObject* pObject ) = 0; ++ ++ // VirtualDevice ++ // nDX and nDY in Pixel ++ // nBitCount: 0 == Default(=as window) / 1 == Mono ++ virtual SalVirtualDevice* CreateVirtualDevice( SalGraphics* pGraphics, ++ long nDX, long nDY, ++ USHORT nBitCount ) = 0; ++ virtual void DestroyVirtualDevice( SalVirtualDevice* pDevice ) = 0; ++ ++ // Printer ++ // pSetupData->mpDriverData can be 0 ++ // pSetupData must be updatet with the current ++ // JobSetup ++ virtual SalInfoPrinter* CreateInfoPrinter( SalPrinterQueueInfo* pQueueInfo, ++ ImplJobSetup* pSetupData ) = 0; ++ virtual void DestroyInfoPrinter( SalInfoPrinter* pPrinter ) = 0; ++ virtual SalPrinter* CreatePrinter( SalInfoPrinter* pInfoPrinter ) = 0; ++ virtual void DestroyPrinter( SalPrinter* pPrinter ) = 0; ++ ++ virtual void GetPrinterQueueInfo( ImplPrnQueueList* pList ) = 0; ++ virtual void GetPrinterQueueState( SalPrinterQueueInfo* pInfo ) = 0; ++ virtual void DeletePrinterQueueInfo( SalPrinterQueueInfo* pInfo ) = 0; ++ virtual String GetDefaultPrinter() = 0; ++ ++ // SalSound ++ virtual SalSound* CreateSalSound() = 0; ++ // SalTimer ++ virtual SalTimer* CreateSalTimer() = 0; ++ // SalOpenGL ++ virtual SalOpenGL* CreateSalOpenGL( SalGraphics* pGraphics ) = 0; ++ // SalI18NImeStatus ++ virtual SalI18NImeStatus* CreateI18NImeStatus() = 0; ++ // SalSystem ++ virtual SalSystem* CreateSalSystem() = 0; ++ // SalBitmap ++ virtual SalBitmap* CreateSalBitmap() = 0; ++ ++ // YieldMutex ++ virtual vos::IMutex* GetYieldMutex() = 0; ++ virtual ULONG ReleaseYieldMutex() = 0; ++ virtual void AcquireYieldMutex( ULONG nCount ) = 0; ++ ++ // wait next event and dispatch ++ // must returned by UserEvent (SalFrame::PostEvent) ++ // and timer ++ virtual void Yield( BOOL bWait ) = 0; ++ virtual bool AnyInput( USHORT nType ) = 0; ++ ++ // Menues ++ virtual SalMenu* CreateMenu( BOOL bMenuBar ) = 0; ++ virtual void DestroyMenu( SalMenu* pMenu) = 0; ++ virtual SalMenuItem* CreateMenuItem( const SalItemParams* pItemData ) = 0; ++ virtual void DestroyMenuItem( SalMenuItem* pItem ) = 0; + + // may return NULL to disable session management +- SalSession* CreateSalSession(); +- +- // YieldMutex +- vos::IMutex* GetYieldMutex(); +- ULONG ReleaseYieldMutex(); +- void AcquireYieldMutex( ULONG nCount ); +- +- // wait next event and dispatch +- // must returned by UserEvent (SalFrame::PostEvent) +- // and timer +- void Yield( BOOL bWait ); +- static BOOL AnyInput( USHORT nType ); ++ virtual SalSession* CreateSalSession() = 0; + + // methods for XDisplayConnection + +@@ -168,11 +194,21 @@ public: + // void* pInst: pInstance form the SetCallback call + // void* pEvent: address of the system specific event structure + // int nBytes: length of the system specific event structure +- void SetEventCallback( void* pInstance, bool(*pCallback)(void*,void*,int)); +- void SetErrorEventCallback( void* pInstance, bool(*pCallback)(void*,void*,int)); ++ void SetEventCallback( void* pInstance, Callback pCallback ) ++ { m_pEventInst = pInstance; m_pEventCallback = pCallback; } ++ Callback GetEventCallback() const ++ { return m_pEventCallback; } ++ bool CallEventCallback( void* pEvent, int nBytes ) ++ { return m_pEventCallback ? m_pEventCallback( m_pEventInst, pEvent, nBytes ) : false; } ++ void SetErrorEventCallback( void* pInstance, Callback pCallback ) ++ { m_pErrorInst = pInstance; m_pErrorCallback = pCallback; } ++ Callback GetErrorEventCallback() const ++ { return m_pErrorCallback; } ++ bool CallErrorCallback( void* pEvent, int nBytes ) ++ { return m_pErrorCallback ? m_pErrorCallback( m_pErrorInst, pEvent, nBytes ) : false; } + + enum ConnectionIdentifierType { AsciiCString, Blob }; +- void* GetConnectionIdentifier( ConnectionIdentifierType& rReturnedType, int& rReturnedBytes ); ++ virtual void* GetConnectionIdentifier( ConnectionIdentifierType& rReturnedType, int& rReturnedBytes ) = 0; + }; + + // called from SVMain +@@ -185,6 +221,8 @@ void DestroySalInstance( SalInstance* pI + + void SalAbort( const XubString& rErrorText ); + ++const ::rtl::OUString& SalGetDesktopEnvironment(); ++ + #endif // __cplusplus + + // ----------- +@@ -193,7 +231,6 @@ void SalAbort( const XubString& rErrorTe + + void InitSalData(); // called from Application-Ctor + void DeInitSalData(); // called from Application-Dtor +-void SetFilterCallback( void* pCallback, void* pInst ); + + void InitSalMain(); + void DeInitSalMain(); +Index: vcl/inc/sallayout.hxx +=================================================================== +RCS file: /cvs/gsl/vcl/inc/sallayout.hxx,v +retrieving revision 1.31.68.1 +retrieving revision 1.36 +diff -u -p -u -r1.31.68.1 -r1.36 +--- vcl/inc/sallayout.hxx 9 Jan 2004 18:13:41 -0000 1.31.68.1 ++++ vcl/inc/sallayout.hxx 17 Jun 2004 12:07:38 -0000 1.36 +@@ -63,10 +63,10 @@ + #define _SV_SALLAYOUT_HXX + + #ifndef _SV_GEN_HXX +-#include <gen.hxx> +-#endif // _SV_GEN_HXX +-#ifndef _SV_POLY_HXX +-#include <poly.hxx> ++#include <tools/gen.hxx> ++#endif ++#ifndef _TL_POLY_HXX ++#include <tools/poly.hxx> + #endif + + #ifndef _TOOLS_LANG_HXX +@@ -76,11 +76,6 @@ typedef unsigned short LanguageType; + #include <vector> + #include <list> + +-#ifdef REMOTE_APPSERVER +-// TODO: better solution: derive ImpServerGraphics from SalGraphics +-#define SalGraphics ImplServerGraphics +-#endif +- + class SalGraphics; + struct ImplFontData; + +@@ -113,7 +108,7 @@ private: + std::vector<int> maRuns; + + public: +- ImplLayoutRuns() { mnRunIndex = 0; } ++ ImplLayoutRuns() { mnRunIndex = 0; maRuns.reserve(8); } + + void Clear() { maRuns.clear(); } + bool AddPos( int nCharPos, bool bRTL ); +@@ -140,7 +135,7 @@ public: + const xub_Unicode* mpStr; + + // positioning related inputs +- const long* mpDXArray; // in pixel units ++ const sal_Int32* mpDXArray; // in pixel units + long mnLayoutWidth; // in pixel units + int mnOrientation; // in 0-3600 system + +@@ -153,7 +148,7 @@ public: + int nMinCharPos, int nEndCharPos, int nFlags ); + + void SetLayoutWidth( long nWidth ) { mnLayoutWidth = nWidth; } +- void SetDXArray( const long* pDXArray ) { mpDXArray = pDXArray; } ++ void SetDXArray( const sal_Int32* pDXArray ) { mpDXArray = pDXArray; } + void SetOrientation( int nOrientation ) { mnOrientation = nOrientation; } + + void ResetPos() +@@ -220,13 +215,13 @@ public: + + // methods using string indexing + virtual int GetTextBreak( long nMaxWidth, long nCharExtra=0, int nFactor=1 ) const = 0; +- virtual long FillDXArray( long* pDXArray ) const = 0; ++ virtual long FillDXArray( sal_Int32* pDXArray ) const = 0; + virtual long GetTextWidth() const { return FillDXArray( NULL ); } +- virtual void GetCaretPositions( int nArraySize, long* pCaretXArray ) const = 0; ++ virtual void GetCaretPositions( int nArraySize, sal_Int32* pCaretXArray ) const = 0; + + // methods using glyph indexing +- virtual int GetNextGlyphs( int nLen, long* pGlyphIdxAry, Point& rPos, int&, +- long* pGlyphAdvAry = NULL, int* pCharPosAry = NULL ) const = 0; ++ virtual int GetNextGlyphs( int nLen, sal_Int32* pGlyphIdxAry, Point& rPos, int&, ++ sal_Int32* pGlyphAdvAry = NULL, int* pCharPosAry = NULL ) const = 0; + virtual bool GetOutline( SalGraphics&, PolyPolyVector& ) const; + virtual bool GetBoundRect( SalGraphics&, Rectangle& ) const; + +@@ -280,10 +275,10 @@ class MultiSalLayout : public SalLayout + public: + virtual void DrawText( SalGraphics& ) const; + virtual int GetTextBreak( long nMaxWidth, long nCharExtra, int nFactor ) const; +- virtual long FillDXArray( long* pDXArray ) const; +- virtual void GetCaretPositions( int nArraySize, long* pCaretXArray ) const; +- virtual int GetNextGlyphs( int nLen, long* pGlyphIdxAry, Point& rPos, +- int&, long* pGlyphAdvAry, int* pCharPosAry ) const; ++ virtual long FillDXArray( sal_Int32* pDXArray ) const; ++ virtual void GetCaretPositions( int nArraySize, sal_Int32* pCaretXArray ) const; ++ virtual int GetNextGlyphs( int nLen, sal_Int32* pGlyphIdxAry, Point& rPos, ++ int&, sal_Int32* pGlyphAdvAry, int* pCharPosAry ) const; + virtual bool GetOutline( SalGraphics&, PolyPolyVector& ) const; + virtual bool GetBoundRect( SalGraphics&, Rectangle& ) const; + +@@ -364,13 +359,13 @@ public: + + // used by upper layers + virtual long GetTextWidth() const; +- virtual long FillDXArray( long* pDXArray ) const; ++ virtual long FillDXArray( sal_Int32* pDXArray ) const; + virtual int GetTextBreak( long nMaxWidth, long nCharExtra, int nFactor ) const; +- virtual void GetCaretPositions( int nArraySize, long* pCaretXArray ) const; ++ virtual void GetCaretPositions( int nArraySize, sal_Int32* pCaretXArray ) const; + + // used by display layers +- virtual int GetNextGlyphs( int nLen, long* pGlyphIdxAry, Point& rPos, int&, +- long* pGlyphAdvAry = NULL, int* pCharPosAry = NULL ) const; ++ virtual int GetNextGlyphs( int nLen, sal_Int32* pGlyphIdxAry, Point& rPos, int&, ++ sal_Int32* pGlyphAdvAry = NULL, int* pCharPosAry = NULL ) const; + + protected: + GenericSalLayout(); +@@ -381,7 +376,7 @@ protected: + virtual void DropGlyph( int nStart ); + virtual void Simplify( bool bIsBase ); + +- bool GetCharWidths( long* pCharWidths ) const; ++ bool GetCharWidths( sal_Int32* pCharWidths ) const; + + private: + GlyphItem* mpGlyphItems; // TODO: change to GlyphList +Index: vcl/inc/salmenu.hxx +=================================================================== +RCS file: vcl/inc/salmenu.hxx +diff -N vcl/inc/salmenu.hxx +--- /dev/null 1 Jan 1970 00:00:00 -0000 ++++ vcl/inc/salmenu.hxx 7 Jan 2004 09:17:01 -0000 1.4 +@@ -0,0 +1,122 @@ ++/************************************************************************* ++ * ++ * ++ * ++ * ++ * ++ * ++ * ++ * The Contents of this file are made available subject to the terms of ++ * either of the following licenses ++ * ++ * - GNU Lesser General Public License Version 2.1 ++ * - Sun Industry Standards Source License Version 1.1 ++ * ++ * Sun Microsystems Inc., October, 2000 ++ * ++ * GNU Lesser General Public License Version 2.1 ++ * ============================================= ++ * Copyright 2000 by Sun Microsystems, Inc. ++ * 901 San Antonio Road, Palo Alto, CA 94303, USA ++ * ++ * This library is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU Lesser General Public ++ * License version 2.1, as published by the Free Software Foundation. ++ * ++ * This library is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * Lesser General Public License for more details. ++ * ++ * You should have received a copy of the GNU Lesser General Public ++ * License along with this library; if not, write to the Free Software ++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, ++ * MA 02111-1307 USA ++ * ++ * ++ * Sun Industry Standards Source License Version 1.1 ++ * ================================================= ++ * The contents of this file are subject to the Sun Industry Standards ++ * Source License Version 1.1 (the "License"); You may not use this file ++ * except in compliance with the License. You may obtain a copy of the ++ * License at http://www.openoffice.org/license.html. ++ * ++ * Software provided under this License is provided on an "AS IS" basis, ++ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, ++ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, ++ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. ++ * See the License for the specific provisions governing your rights and ++ * obligations concerning the Software. ++ * ++ * The Initial Developer of the Original Code is: Sun Microsystems, Inc. ++ * ++ * Copyright: 2000 by Sun Microsystems, Inc. ++ * ++ * All Rights Reserved. ++ * ++ * Contributor(s): _______________________________________ ++ * ++ * ++ ************************************************************************/ ++ ++#ifndef _SV_SALMENU_HXX ++#define _SV_SALMENU_HXX ++ ++#ifndef _SV_SV_H ++#include <sv.h> ++#endif ++#ifndef _SV_MENU_HXX ++#include <menu.hxx> ++#endif ++#ifndef _SV_KEYCODE_HXX ++#include <keycod.hxx> ++#endif ++#ifndef _SV_IMAGE_HXX ++#include <image.hxx> ++#endif ++ ++struct SystemMenuData; ++class SalFrame; ++ ++struct SalItemParams ++{ ++ USHORT nId; // item Id ++ MenuItemType eType; // MenuItem-Type ++ MenuItemBits nBits; // MenuItem-Bits ++ Menu* pMenu; // Pointer to Menu ++ XubString aText; // Menu-Text ++ Image aImage; // Image ++}; ++ ++ ++class SalMenuItem ++{ ++public: ++ SalMenuItem() {} ++ virtual ~SalMenuItem(); ++}; ++ ++class SalMenu ++{ ++public: ++ SalMenu() {} ++ virtual ~SalMenu(); ++ ++ virtual BOOL VisibleMenuBar() = 0; // must return TRUE to actually DISPLAY native menu bars ++ // otherwise only menu messages are processed (eg, OLE on Windows) ++ ++ virtual void InsertItem( SalMenuItem* pSalMenuItem, unsigned nPos ) = 0; ++ virtual void RemoveItem( unsigned nPos ) = 0; ++ virtual void SetSubMenu( SalMenuItem* pSalMenuItem, SalMenu* pSubMenu, unsigned nPos ) = 0; ++ virtual void SetFrame( const SalFrame* pFrame ) = 0; ++ virtual void CheckItem( unsigned nPos, BOOL bCheck ) = 0; ++ virtual void EnableItem( unsigned nPos, BOOL bEnable ) = 0; ++ virtual void SetItemText( unsigned nPos, SalMenuItem* pSalMenuItem, const XubString& rText )= 0; ++ virtual void SetItemImage( unsigned nPos, SalMenuItem* pSalMenuItem, const Image& rImage ) = 0; ++ virtual void SetAccelerator( unsigned nPos, SalMenuItem* pSalMenuItem, const KeyCode& rKeyCode, const XubString& rKeyName ) = 0; ++ virtual void GetSystemMenuData( SystemMenuData* pData ) = 0; ++}; ++ ++ ++#endif // _SV_SALMENU_HXX ++ +Index: vcl/inc/salnativewidgets.hxx +=================================================================== +RCS file: vcl/inc/salnativewidgets.hxx +diff -N vcl/inc/salnativewidgets.hxx +--- /dev/null 1 Jan 1970 00:00:00 -0000 ++++ vcl/inc/salnativewidgets.hxx 10 May 2004 15:42:51 -0000 1.2 +@@ -0,0 +1,367 @@ ++/************************************************************************* ++ * ++ * ++ * ++ * ++ * ++ * ++ * ++ * The Contents of this file are made available subject to the terms of ++ * either of the following licenses ++ * ++ * - GNU Lesser General Public License Version 2.1 ++ * - Sun Industry Standards Source License Version 1.1 ++ * ++ * Sun Microsystems Inc., October, 2000 ++ * ++ * GNU Lesser General Public License Version 2.1 ++ * ============================================= ++ * Copyright 2000 by Sun Microsystems, Inc. ++ * 901 San Antonio Road, Palo Alto, CA 94303, USA ++ * ++ * This library is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU Lesser General Public ++ * License version 2.1, as published by the Free Software Foundation. ++ * ++ * This library is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * Lesser General Public License for more details. ++ * ++ * You should have received a copy of the GNU Lesser General Public ++ * License along with this library; if not, write to the Free Software ++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, ++ * MA 02111-1307 USA ++ * ++ * ++ * Sun Industry Standards Source License Version 1.1 ++ * ================================================= ++ * The contents of this file are subject to the Sun Industry Standards ++ * Source License Version 1.1 (the "License"); You may not use this file ++ * except in compliance with the License. You may obtain a copy of the ++ * License at http://www.openoffice.org/license.html. ++ * ++ * Software provided under this License is provided on an "AS IS" basis, ++ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, ++ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, ++ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. ++ * See the License for the specific provisions governing your rights and ++ * obligations concerning the Software. ++ * ++ * The Initial Developer of the Original Code is: Sun Microsystems, Inc. ++ * ++ * Copyright: 2000 by Sun Microsystems, Inc. ++ * ++ * All Rights Reserved. ++ * ++ * Contributor(s): _______________________________________ ++ * ++ * ++ ************************************************************************/ ++ ++#ifndef _SV_NATIVEWIDGETS_HXX ++#define _SV_NATIVEWIDGETS_HXX ++ ++#ifndef _RTL_USTRING_HXX_ ++#include <rtl/ustring.hxx> ++#endif ++ ++/* Control Types: ++ * ++ * Specify the overall, whole control ++ * type (as opposed to parts of the ++ * control if it were composite). ++ */ ++ ++typedef sal_uInt32 ControlType; ++ ++// Normal PushButton/Command Button ++#define CTRL_PUSHBUTTON 1 ++ ++// Normal single radio button ++#define CTRL_RADIOBUTTON 2 ++ ++// Normal single checkbox ++#define CTRL_CHECKBOX 10 ++ ++// Combobox, i.e. a ListBox ++// that allows data entry by user ++#define CTRL_COMBOBOX 20 ++ ++// Control that allows text entry ++#define CTRL_EDITBOX 30 ++ ++// Control that allows text entry, but without the usual border ++// Has to be handled separately, because this one cannot handle ++// HAS_BACKGROUND_TEXTURE, which is drawn in the edit box'es ++// border window. ++#define CTRL_EDITBOX_NOBORDER 31 ++ ++// Control that pops up a menu, ++// but does NOT allow data entry ++#define CTRL_LISTBOX 35 ++ ++// An edit field together with two little ++// buttons on the side (aka spin field) ++#define CTRL_SPINBOX 40 ++ ++// Two standalone spin buttons ++// without an edit field ++#define CTRL_SPINBUTTONS 45 ++ ++// A single tab ++#define CTRL_TAB_ITEM 50 ++ ++// The border around a tab area, ++// but without the tabs themselves. ++// May have a gap at the top for ++// the active tab ++#define CTRL_TAB_PANE 55 ++ ++// Background of a Tab Pane ++#define CTRL_TAB_BODY 56 ++ ++// Normal scrollbar, including ++// all parts like slider, buttons ++#define CTRL_SCROLLBAR 60 ++ ++// Border around a group of related ++// items, perhaps also displaying ++// a label of identification ++#define CTRL_GROUPBOX 70 ++ ++// A separator line ++#define CTRL_FIXEDLINE 80 ++ ++// A rectangular border, like a ++// Tab Pane, but without the ++// possible gap for a tab ++#define CTRL_FIXEDBORDER 90 ++ ++ ++ ++/* Control Parts: ++ * ++ * Uniquely identify a part of a control, ++ * for example the slider of a scroll bar. ++ */ ++ ++typedef sal_uInt32 ControlPart; ++ ++#define PART_ENTIRE_CONTROL 1 ++#define PART_WINDOW 5 // the static listbox window containing the list ++#define PART_BUTTON 100 ++#define PART_BUTTON_UP 101 ++#define PART_BUTTON_DOWN 102 // Also for ComboBoxes/ListBoxes ++#define PART_BUTTON_LEFT 103 ++#define PART_BUTTON_RIGHT 104 ++#define PART_ALL_BUTTONS 105 ++#define PART_TRACK_HORZ_LEFT 200 ++#define PART_TRACK_VERT_UPPER 201 ++#define PART_TRACK_HORZ_RIGHT 202 ++#define PART_TRACK_VERT_LOWER 203 ++#define PART_THUMB_HORZ 210 ++#define PART_THUMB_VERT 211 ++ ++/** The edit field part of a control, e.g. of the combo box. ++ ++ Currently used just for combo boxes and just for GetNativeControlRegion(). ++ It is valid only if GetNativeControlRegion() supports PART_BUTTON_DOWN as ++ well. ++*/ ++#define PART_SUB_EDIT 300 ++ ++// For controls that require the entire background ++// to be drawn first, and then other pieces over top. ++// (GTK+ scrollbars for example). Control region passed ++// in to draw this part is expected to be the entire ++// area of the control. ++// A control may respond to one or both. ++#define PART_DRAW_BACKGROUND_HORZ 1000 ++#define PART_DRAW_BACKGROUND_VERT 1001 ++ ++// GTK+ also draws tabs right->left since there is a ++// hardcoded 2 pixel overlap between adjacent tabs ++#define PART_TABS_DRAW_RTL 3000 ++ ++// For themes that do not want to have the focus ++// rectangle part drawn by VCL but take care of the ++// whole inner control part by themselves ++// eg, listboxes or comboboxes or spinbuttons ++#define HAS_BACKGROUND_TEXTURE 4000 ++ ++// For scrollbars that have 3 buttons (most KDE themes) ++#define HAS_THREE_BUTTONS 5000 ++ ++/* Control State: ++ * ++ * Specify how a particular part of the control ++ * is to be drawn. Constants are bitwise OR-ed ++ * together to compose a final drawing state. ++ * A _disabled_ state is assumed by the drawing ++ * functions until an ENABLED or HIDDEN is passed ++ * in the ControlState. ++ */ ++ ++typedef sal_uInt32 ControlState; ++ ++#define CTRL_STATE_ENABLED 0x0001 ++#define CTRL_STATE_FOCUSED 0x0002 ++#define CTRL_STATE_PRESSED 0x0004 ++#define CTRL_STATE_ROLLOVER 0x0008 ++#define CTRL_STATE_HIDDEN 0x0010 ++#define CTRL_STATE_DEFAULT 0x0020 ++#define CTRL_STATE_SELECTED 0x0040 ++#define CTRL_CACHING_ALLOWED 0x8000 // set when the control is completely visible (i.e. not clipped) ++ ++/* ButtonValue: ++ * ++ * Identifies the tri-state value options ++ * that buttons allow ++ */ ++ ++enum ButtonValue { ++ BUTTONVALUE_DONTKNOW, ++ BUTTONVALUE_ON, ++ BUTTONVALUE_OFF, ++ BUTTONVALUE_MIXED ++}; ++ ++ ++#ifdef __cplusplus ++ ++ ++/* ScrollbarValue: ++ * ++ * Value container for scrollbars. ++ */ ++class ScrollbarValue ++{ ++ public: ++ long mnMin; ++ long mnMax; ++ long mnCur; ++ long mnVisibleSize; ++ Rectangle maThumbRect; ++ Rectangle maButton1Rect; ++ Rectangle maButton2Rect; ++ ControlState mnButton1State; ++ ControlState mnButton2State; ++ ControlState mnThumbState; ++ ControlState mnPage1State; ++ ControlState mnPage2State; ++ ++ inline ScrollbarValue() ++ { ++ mnMin = 0; mnMax = 0; mnCur = 0; mnVisibleSize = 0; ++ mnButton1State = 0; mnButton2State = 0; ++ mnThumbState = 0; mnPage1State = 0; mnPage2State = 0; ++ }; ++ inline ~ScrollbarValue() {}; ++}; ++ ++/* TabitemValue: ++ * ++ * Value container for tabitems. ++ */ ++ ++/* TABITEM constants are OR-ed together */ ++#define TABITEM_NOTALIGNED 0x000 // the tabitem is an inner item ++#define TABITEM_LEFTALIGNED 0x001 // the tabitem is aligned with the left border of the TabControl ++#define TABITEM_RIGHTALIGNED 0x002 // the tabitem is aligned with the right border of the TabControl ++#define TABITEM_FIRST_IN_GROUP 0x004 // the tabitem is the first in group of tabitems ++#define TABITEM_LAST_IN_GROUP 0x008 // the tabitem is the last in group of tabitems ++ ++class TabitemValue ++{ ++ public: ++ unsigned int mnAlignment; ++ ++ inline TabitemValue() ++ { ++ mnAlignment = 0; ++ }; ++ inline ~TabitemValue() {}; ++ ++ BOOL isLeftAligned() { return (mnAlignment & TABITEM_LEFTALIGNED) != 0; } ++ BOOL isRightAligned() { return (mnAlignment & TABITEM_RIGHTALIGNED) != 0; } ++ BOOL isBothAligned() { return isLeftAligned() && isRightAligned(); } ++ BOOL isNotAligned() { return (mnAlignment & (TABITEM_LEFTALIGNED | TABITEM_RIGHTALIGNED)) == 0; } ++ BOOL isFirst() { return (mnAlignment & TABITEM_FIRST_IN_GROUP) != 0; } ++ BOOL isLast() { return (mnAlignment & TABITEM_LAST_IN_GROUP) != 0; } ++}; ++ ++ ++/* SpinbuttonValue: ++ * ++ * Value container for spinbuttons to paint both buttons at once. ++ * Note: the other parameters of DrawNativeControl will have no meaning ++ * all parameters for spinbuttons are carried here ++ */ ++class SpinbuttonValue ++{ ++ public: ++ Rectangle maUpperRect; ++ Rectangle maLowerRect; ++ ControlState mnUpperState; ++ ControlState mnLowerState; ++ int mnUpperPart; ++ int mnLowerPart; ++ ++ inline SpinbuttonValue() ++ { ++ mnUpperState = mnLowerState = 0; ++ }; ++ inline ~SpinbuttonValue() {}; ++}; ++ ++/* ImplControlValue: ++ * ++ * Generic value container for all control parts. ++ */ ++ ++class ImplControlValue ++{ ++ friend class SalFrame; ++ ++ private: ++ ButtonValue mTristate; // Tristate value: on, off, mixed ++ rtl::OUString mString; // string value ++ long mNumber; // numeric value ++ void * mOptionalVal; // optional control-specific value ++ ++ public: ++ inline ImplControlValue( ButtonValue nTristate, rtl::OUString sString, long nNumeric, void * aOptVal ) \ ++ { mTristate = nTristate; mString = sString; mNumber = nNumeric; mOptionalVal = aOptVal; }; ++ inline ImplControlValue( ButtonValue nTristate, rtl::OUString sString, long nNumeric ) \ ++ { mTristate = nTristate; mString = sString; mNumber = nNumeric; mOptionalVal = NULL; }; ++ inline ImplControlValue( ButtonValue nTristate ) { mTristate = nTristate; mOptionalVal = NULL; }; ++ inline ImplControlValue( rtl::OUString sString ) { mString = sString; mOptionalVal = NULL; }; ++ inline ImplControlValue( long nNumeric ) { mNumber = nNumeric; mOptionalVal = NULL; }; ++ inline ImplControlValue( void * aOptVal ) { mOptionalVal = aOptVal; }; ++ inline ImplControlValue() { mTristate = BUTTONVALUE_DONTKNOW; mNumber = 0; mOptionalVal = NULL; }; ++ inline ~ImplControlValue() { mOptionalVal = NULL; }; ++ ++ inline ButtonValue getTristateVal( void ) const { return mTristate; } ++ inline void setTristateVal( ButtonValue nTristate ) { mTristate = nTristate; } ++ ++ inline const rtl::OUString& getStringVal( void ) const { return mString; } ++ inline void setStringVal( rtl::OUString sString ) { mString = sString; } ++ ++ inline long getNumericVal( void ) const { return mNumber; } ++ inline void setNumericVal( long nNumeric ) { mNumber = nNumeric; } ++ ++ inline void * getOptionalVal( void ) const { return mOptionalVal; } ++ inline void setOptionalVal( void * aOptVal ) { mOptionalVal = aOptVal; } ++}; ++ ++#endif /* __cplusplus */ ++ ++#endif ++ ++ ++ ++ ++ ++ ++ +Index: vcl/inc/salobj.hxx +=================================================================== +RCS file: /cvs/gsl/vcl/inc/salobj.hxx,v +retrieving revision 1.1.1.1 +retrieving revision 1.2 +diff -u -p -u -r1.1.1.1 -r1.2 +--- vcl/inc/salobj.hxx 19 Sep 2000 10:23:06 -0000 1.1.1.1 ++++ vcl/inc/salobj.hxx 18 Nov 2003 14:29:32 -0000 1.2 +@@ -71,9 +71,6 @@ + #ifndef _SV_SALWTYPE_HXX + #include <salwtype.hxx> + #endif +-#ifndef _SV_SALOBJ_H +-#include <salobj.h> +-#endif + + struct SystemEnvData; + +@@ -91,37 +88,32 @@ struct SystemEnvData; + + class SalObject + { +-public: // public for Sal Implementation +- SalObject(); +- ~SalObject(); +- +-public: // public for Sal Implementation +- SalObjectData maObjectData; +- +-#ifdef _INCL_SAL_SALOBJ_IMP +-#include <salobj.imp> +-#endif +- ++ void* m_pInst; ++ SALOBJECTPROC m_pCallback; + public: +- void ResetClipRegion(); +- USHORT GetClipRegionType(); +- void BeginSetClipRegion( ULONG nRects ); +- void UnionClipRegion( long nX, long nY, long nWidth, long nHeight ); +- void EndSetClipRegion(); +- +- void SetPosSize( long nX, long nY, long nWidth, long nHeight ); +- void Show( BOOL bVisible ); +- void Enable( BOOL nEnable ); +- void GrabFocus(); +- +- void SetBackground(); +- void SetBackground( SalColor nSalColor ); +- +- const SystemEnvData* GetSystemData() const; +- +- // Callbacks (indepen in \vcl\source\window\winproc.cxx) +- // for default message handling return 0 +- void SetCallback( void* pInst, SALOBJECTPROC pProc ); ++ SalObject() : m_pInst( NULL ), m_pCallback( NULL ) {} ++ virtual ~SalObject(); ++ ++ virtual void ResetClipRegion() = 0; ++ virtual USHORT GetClipRegionType() = 0; ++ virtual void BeginSetClipRegion( ULONG nRects ) = 0; ++ virtual void UnionClipRegion( long nX, long nY, long nWidth, long nHeight ) = 0; ++ virtual void EndSetClipRegion() = 0; ++ ++ virtual void SetPosSize( long nX, long nY, long nWidth, long nHeight ) = 0; ++ virtual void Show( BOOL bVisible ) = 0; ++ virtual void Enable( BOOL nEnable ) = 0; ++ virtual void GrabFocus() = 0; ++ ++ virtual void SetBackground() = 0; ++ virtual void SetBackground( SalColor nSalColor ) = 0; ++ ++ virtual const SystemEnvData* GetSystemData() const = 0; ++ ++ void SetCallback( void* pInst, SALOBJECTPROC pProc ) ++ { m_pInst = pInst; m_pCallback = pProc; } ++ long CallCallback( USHORT nEvent, const void* pEvent ) ++ { return m_pCallback ? m_pCallback( m_pInst, this, nEvent, pEvent ) : 0; } + }; + + #endif // _SV_SALOBJ_HXX +Index: vcl/inc/salogl.hxx +=================================================================== +RCS file: vcl/inc/salogl.hxx +diff -N vcl/inc/salogl.hxx +--- /dev/null 1 Jan 1970 00:00:00 -0000 ++++ vcl/inc/salogl.hxx 18 Nov 2003 14:29:40 -0000 1.2 +@@ -0,0 +1,109 @@ ++/************************************************************************* ++ * ++ * ++ * ++ * ++ * ++ * ++ * ++ * The Contents of this file are made available subject to the terms of ++ * either of the following licenses ++ * ++ * - GNU Lesser General Public License Version 2.1 ++ * - Sun Industry Standards Source License Version 1.1 ++ * ++ * Sun Microsystems Inc., October, 2000 ++ * ++ * GNU Lesser General Public License Version 2.1 ++ * ============================================= ++ * Copyright 2000 by Sun Microsystems, Inc. ++ * 901 San Antonio Road, Palo Alto, CA 94303, USA ++ * ++ * This library is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU Lesser General Public ++ * License version 2.1, as published by the Free Software Foundation. ++ * ++ * This library is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * Lesser General Public License for more details. ++ * ++ * You should have received a copy of the GNU Lesser General Public ++ * License along with this library; if not, write to the Free Software ++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, ++ * MA 02111-1307 USA ++ * ++ * ++ * Sun Industry Standards Source License Version 1.1 ++ * ================================================= ++ * The contents of this file are subject to the Sun Industry Standards ++ * Source License Version 1.1 (the "License"); You may not use this file ++ * except in compliance with the License. You may obtain a copy of the ++ * License at http://www.openoffice.org/license.html. ++ * ++ * Software provided under this License is provided on an "AS IS" basis, ++ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, ++ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, ++ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. ++ * See the License for the specific provisions governing your rights and ++ * obligations concerning the Software. ++ * ++ * The Initial Developer of the Original Code is: Sun Microsystems, Inc. ++ * ++ * Copyright: 2000 by Sun Microsystems, Inc. ++ * ++ * All Rights Reserved. ++ * ++ * Contributor(s): _______________________________________ ++ * ++ * ++ ************************************************************************/ ++ ++#ifndef _SV_SALOGL_HXX ++#define _SV_SALOGL_HXX ++ ++#define _OPENGL_EXT ++ ++#ifndef _GEN_HXX ++#include <tools/gen.hxx> ++#endif ++ ++#define _SVUNX_H ++ ++#ifndef _SV_SV_H ++#include <sv.h> ++#endif ++#ifndef _SV_SALOTYPE_HXX ++#include <salotype.hxx> ++#endif ++ ++// ----------------- ++// - State defines - ++// ----------------- ++ ++#define OGL_STATE_UNLOADED (0x00000000) ++#define OGL_STATE_INVALID (0x00000001) ++#define OGL_STATE_VALID (0x00000002) ++ ++// ------------- ++// - SalOpenGL - ++// ------------- ++ ++class SalGraphics; ++ ++class SalOpenGL ++{ ++public: ++ ++ SalOpenGL() {} ++ virtual ~SalOpenGL(); ++ ++ virtual bool IsValid() = 0; ++ virtual void* GetOGLFnc( const char * ) = 0; ++ virtual void OGLEntry( SalGraphics* pGraphics ) = 0; ++ virtual void OGLExit( SalGraphics* pGraphics ) = 0; ++ virtual void StartScene( SalGraphics* pGraphics ) = 0; ++ virtual void StopScene() = 0; ++}; ++ ++#endif +Index: vcl/inc/salprn.hxx +=================================================================== +RCS file: /cvs/gsl/vcl/inc/salprn.hxx,v +retrieving revision 1.4 +retrieving revision 1.5 +diff -u -p -u -r1.4 -r1.5 +--- vcl/inc/salprn.hxx 20 Nov 2002 12:03:33 -0000 1.4 ++++ vcl/inc/salprn.hxx 18 Nov 2003 14:29:49 -0000 1.5 +@@ -69,9 +69,6 @@ + #ifndef _SV_SV_H + #include <sv.h> + #endif +-#ifndef _SV_SALPRN_H +-#include <salprn.h> +-#endif + #ifndef _SV_PRNTYPES_HXX + #include <prntypes.hxx> + #endif +@@ -107,49 +104,39 @@ struct SalPrinterQueueInfo + + class SalInfoPrinter + { +- friend class SalInstance; +- + public: + std::vector< vcl::PaperInfo > m_aPaperFormats; // all printer supported formats + bool m_bPapersInit; // set to true after InitPaperFormats ++ ++ SalInfoPrinter() {} ++ virtual ~SalInfoPrinter(); + +- SalInfoPrinter(); +- ~SalInfoPrinter(); +- +-public: // public for Sal Implementation +- SalInfoPrinterData maPrinterData; +- +-#ifdef _INCL_SAL_SALIPRN_IMP +-#include <saliprn.imp> +-#endif +- +-public: + // SalGraphics or NULL, but two Graphics for all SalFrames + // must be returned +- SalGraphics* GetGraphics(); +- void ReleaseGraphics( SalGraphics* pGraphics ); ++ virtual SalGraphics* GetGraphics() = 0; ++ virtual void ReleaseGraphics( SalGraphics* pGraphics ) = 0; + +- BOOL Setup( SalFrame* pFrame, ImplJobSetup* pSetupData ); +- // This function set the driver data and +- // set the new indepen data in pSetupData +- BOOL SetPrinterData( ImplJobSetup* pSetupData ); +- // This function merged the indepen driver data +- // and set the new indepen data in pSetupData +- // Only the data must changed, where the bit +- // in nFlags is set +- BOOL SetData( ULONG nFlags, ImplJobSetup* pSetupData ); +- +- void GetPageInfo( const ImplJobSetup* pSetupData, +- long& rOutWidth, long& rOutHeight, +- long& rPageOffX, long& rPageOffY, +- long& rPageWidth, long& rPageHeight ); +- ULONG GetCapabilities( const ImplJobSetup* pSetupData, USHORT nType ); +- ULONG GetPaperBinCount( const ImplJobSetup* pSetupData ); +- XubString GetPaperBinName( const ImplJobSetup* pSetupData, ULONG nPaperBin ); ++ virtual BOOL Setup( SalFrame* pFrame, ImplJobSetup* pSetupData ) = 0; ++ // This function set the driver data and ++ // set the new indepen data in pSetupData ++ virtual BOOL SetPrinterData( ImplJobSetup* pSetupData ) = 0; ++ // This function merged the indepen driver data ++ // and set the new indepen data in pSetupData ++ // Only the data must changed, where the bit ++ // in nFlags is set ++ virtual BOOL SetData( ULONG nFlags, ImplJobSetup* pSetupData ) = 0; ++ ++ virtual void GetPageInfo( const ImplJobSetup* pSetupData, ++ long& rOutWidth, long& rOutHeight, ++ long& rPageOffX, long& rPageOffY, ++ long& rPageWidth, long& rPageHeight ) = 0; ++ virtual ULONG GetCapabilities( const ImplJobSetup* pSetupData, USHORT nType ) = 0; ++ virtual ULONG GetPaperBinCount( const ImplJobSetup* pSetupData ) = 0; ++ virtual String GetPaperBinName( const ImplJobSetup* pSetupData, ULONG nPaperBin ) = 0; + // fills m_aPaperFormats and sets m_bPapersInit to true +- void InitPaperFormats( const ImplJobSetup* pSetupData ); ++ virtual void InitPaperFormats( const ImplJobSetup* pSetupData ) = 0; + // returns angle that a landscape page will be turned counterclockwise wrt to portrait +- int GetLandscapeAngle( const ImplJobSetup* pSetupData ); ++ virtual int GetLandscapeAngle( const ImplJobSetup* pSetupData ) = 0; + }; + + +@@ -159,30 +146,20 @@ public: + + class SalPrinter + { +- friend class SalInstance; +- +-private: +- SalPrinter(); +- ~SalPrinter(); +- + public: // public for Sal Implementation +- SalPrinterData maPrinterData; ++ SalPrinter() {} ++ virtual ~SalPrinter(); + +-#ifdef _INCL_SAL_SALPRN_IMP +-#include <salprn.imp> +-#endif +- +-public: +- BOOL StartJob( const XubString* pFileName, +- const XubString& rJobName, +- const XubString& rAppName, +- ULONG nCopies, BOOL bCollate, +- ImplJobSetup* pSetupData ); +- BOOL EndJob(); +- BOOL AbortJob(); +- SalGraphics* StartPage( ImplJobSetup* pSetupData, BOOL bNewJobData ); +- BOOL EndPage(); +- ULONG GetErrorCode(); ++ virtual BOOL StartJob( const XubString* pFileName, ++ const XubString& rJobName, ++ const XubString& rAppName, ++ ULONG nCopies, BOOL bCollate, ++ ImplJobSetup* pSetupData ) = 0; ++ virtual BOOL EndJob() = 0; ++ virtual BOOL AbortJob() = 0; ++ virtual SalGraphics* StartPage( ImplJobSetup* pSetupData, BOOL bNewJobData ) = 0; ++ virtual BOOL EndPage() = 0; ++ virtual ULONG GetErrorCode() = 0; + }; + + #endif // _SV_SALPRN_HXX + +Index: vcl/inc/salsound.hxx +=================================================================== +RCS file: vcl/inc/salsound.hxx +diff -N vcl/inc/salsound.hxx +--- /dev/null 1 Jan 1970 00:00:00 -0000 ++++ vcl/inc/salsound.hxx 18 Nov 2003 14:29:57 -0000 1.2 +@@ -0,0 +1,119 @@ ++/************************************************************************* ++ * ++ * ++ * ++ * ++ * ++ * ++ * ++ * The Contents of this file are made available subject to the terms of ++ * either of the following licenses ++ * ++ * - GNU Lesser General Public License Version 2.1 ++ * - Sun Industry Standards Source License Version 1.1 ++ * ++ * Sun Microsystems Inc., October, 2000 ++ * ++ * GNU Lesser General Public License Version 2.1 ++ * ============================================= ++ * Copyright 2000 by Sun Microsystems, Inc. ++ * 901 San Antonio Road, Palo Alto, CA 94303, USA ++ * ++ * This library is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU Lesser General Public ++ * License version 2.1, as published by the Free Software Foundation. ++ * ++ * This library is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * Lesser General Public License for more details. ++ * ++ * You should have received a copy of the GNU Lesser General Public ++ * License along with this library; if not, write to the Free Software ++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, ++ * MA 02111-1307 USA ++ * ++ * ++ * Sun Industry Standards Source License Version 1.1 ++ * ================================================= ++ * The contents of this file are subject to the Sun Industry Standards ++ * Source License Version 1.1 (the "License"); You may not use this file ++ * except in compliance with the License. You may obtain a copy of the ++ * License at http://www.openoffice.org/license.html. ++ * ++ * Software provided under this License is provided on an "AS IS" basis, ++ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, ++ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, ++ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. ++ * See the License for the specific provisions governing your rights and ++ * obligations concerning the Software. ++ * ++ * The Initial Developer of the Original Code is: Sun Microsystems, Inc. ++ * ++ * Copyright: 2000 by Sun Microsystems, Inc. ++ * ++ * All Rights Reserved. ++ * ++ * Contributor(s): _______________________________________ ++ * ++ * ++ ************************************************************************/ ++ ++#ifndef _SV_SALSOUND_HXX ++#define _SV_SALSOUND_HXX ++ ++#ifndef _GEN_HXX ++#include <tools/gen.hxx> ++#endif ++#ifndef _SV_SV_H ++#include <sv.h> ++#endif ++#ifndef _STRING_HXX ++#include <tools/string.hxx> ++#endif ++#ifndef _SV_SALSTYPE_HXX ++#include <salstype.hxx> ++#endif ++ ++class SalSound ++{ ++ // for notification ++ void* m_pInst; ++ SALSOUNDPROC m_aPROC; ++public: ++ SalSound() : m_pInst( NULL ), m_aPROC( NULL ) {} ++ virtual ~SalSound(); ++ ++ // checks whether sound system is ready for input and hence ++ // SalSound can be initialized ++ virtual bool IsValid() = 0; ++ // initialize with sound file name, returns success and // FIXME: rSoundLen ? ++ virtual bool Init( const String& rSoundName, ++ ULONG& rSoundLen ) = 0; ++ // play the sound, start at nStartTime (ms), play for nPlayTime (ms), ++ // loop = true/false ++ virtual void Play( ULONG nStartTime, ULONG nPlayTime, bool bLoop ) = 0; ++ // stop playing ++ virtual void Stop() = 0; ++ // pause playing ++ virtual void Pause() = 0; ++ // continue a paused play ++ virtual void Continue() = 0; ++ // is looping ? ++ virtual bool IsLoopMode() const = 0; ++ // is playing ? ++ virtual bool IsPlaying() const = 0; ++ // is paused ? ++ virtual bool IsPaused() const = 0; ++ ++ // register a callback to be called when state changes ++ void SetNotifyProc( void* pInst, SALSOUNDPROC pProc ) ++ { m_pInst = pInst; m_aPROC = pProc; } ++ void CallNotifyProc( SoundNotification eNotification, ULONG nError ) ++ { ++ if( m_aPROC ) ++ m_aPROC( m_pInst, eNotification, nError ); ++ } ++}; ++ ++#endif +Index: vcl/inc/salsys.hxx +=================================================================== +RCS file: /cvs/gsl/vcl/inc/salsys.hxx,v +retrieving revision 1.7 +retrieving revision 1.9 +diff -u -p -u -r1.7 -r1.9 +--- vcl/inc/salsys.hxx 20 Nov 2002 15:45:04 -0000 1.7 ++++ vcl/inc/salsys.hxx 7 Jan 2004 09:17:24 -0000 1.9 +@@ -65,44 +65,9 @@ + #ifndef _STRING_HXX + #include <tools/string.hxx> + #endif +-#ifndef _LIST_HXX +-#include <tools/list.hxx> +-#endif +- +-#ifndef _SV_SV_H +-#include <sv.h> +-#endif +- +-#ifndef _SV_SYSTEM_HXX +-#include <system.hxx> +-#endif +- +-#include <list> +- +-// ------------------- +-// - SalSystem-Types - +-// ------------------- +- +-// Must be the same values like in VCLSystemInfo +-#define SALSYSTEM_GETSYSTEMINFO_STACK ((ULONG)0x00000001) +-#define SALSYSTEM_GETSYSTEMINFO_MODULES ((ULONG)0x00000002) +-#define SALSYSTEM_GETSYSTEMINFO_SYSTEMVERSION ((ULONG)0x00000004) +-#define SALSYSTEM_GETSYSTEMINFO_CPUTYPE ((ULONG)0x00000008) +-#define SALSYSTEM_GETSYSTEMINFO_MEMORYINFO ((ULONG)0x00000010) +-#define SALSYSTEM_GETSYSTEMINFO_LOCALVOLUMES ((ULONG)0x00000020) +-#define SALSYSTEM_GETSYSTEMINFO_SYSTEMDIRS ((ULONG)0x00000040) +-#define SALSYSTEM_GETSYSTEMINFO_MOUSEINFO ((ULONG)0x00000080) +-#define SALSYSTEM_GETSYSTEMINFO_GRAPHICSSYSTEM ((ULONG)0x00000100) +- +-// ------------- +-// - SalSystem - +-// ------------- + +-String GetSalSummarySystemInfos( ULONG nFlags ); + +-bool GetSalSystemDisplayInfo( System::DisplayInfo& rInfo ); +- +-/* Button combinations for ImplShowNativeMessageBox ++/* Button combinations for ShowNativeMessageBox + */ + const int SALSYSTEM_SHOWNATIVEMSGBOX_BTNCOMBI_OK = 0; + const int SALSYSTEM_SHOWNATIVEMSGBOX_BTNCOMBI_OK_CANCEL = 1; +@@ -111,7 +76,7 @@ const int SALSYSTEM_SHOWNATIVEMSGBOX_BTN + const int SALSYSTEM_SHOWNATIVEMSGBOX_BTNCOMBI_YES_NO = 4; + const int SALSYSTEM_SHOWNATIVEMSGBOX_BTNCOMBI_RETRY_CANCEL = 5; + +-/* Button identifier for ImplShowNativeMessageBox ++/* Button identifier for ShowNativeMessageBox + */ + const int SALSYSTEM_SHOWNATIVEMSGBOX_BTN_OK = 1; + const int SALSYSTEM_SHOWNATIVEMSGBOX_BTN_CANCEL = 2; +@@ -121,29 +86,57 @@ const int SALSYSTEM_SHOWNATIVEMSGBOX_BTN + const int SALSYSTEM_SHOWNATIVEMSGBOX_BTN_YES = 6; + const int SALSYSTEM_SHOWNATIVEMSGBOX_BTN_NO = 7; + +-/* Shows a native message box with the specified title, message and button +- combination. ++ ++ ++// ------------- ++// - SalSystem - ++// ------------- ++ ++struct DisplayInfo ++{ ++ int nWidth, nHeight, nDepth; ++}; ++ ++ ++class SalSystem ++{ ++public: ++ SalSystem() {} ++ virtual ~SalSystem(); ++ ++ // get info about the display ++ virtual bool GetSalSystemDisplayInfo( DisplayInfo& rInfo ) = 0; ++ ++ ++ /* Shows a native message box with the specified title, message and button ++ combination. + +- @param rTitle +- The title to be shown by the dialog box. ++ @param rTitle ++ The title to be shown by the dialog box. + +- @param rMessage +- The message to be shown by the dialog box. ++ @param rMessage ++ The message to be shown by the dialog box. + +- @param nButtonCombination +- Specify which button combination the message box should display. +- See button combinations above. ++ @param nButtonCombination ++ Specify which button combination the message box should display. ++ See button combinations above. + +- @param nDefaultButton +- Specifies which button has the focus initially. +- See button identifiers above. +- The effect of specifying a button that doesn't belong +- to the specified button combination is undefined. ++ @param nDefaultButton ++ Specifies which button has the focus initially. ++ See button identifiers above. ++ The effect of specifying a button that doesn't belong ++ to the specified button combination is undefined. + +- @returns the identifier of the button that was pressed by the user. +- See button identifier above. If the function fails the +- return value is 0. +-*/ +-int ImplShowNativeMessageBox(const String& rTitle, const String& rMessage, int nButtonCombination, int nDefaultButton); ++ @returns the identifier of the button that was pressed by the user. ++ See button identifier above. If the function fails the ++ return value is 0. ++ */ ++ virtual int ShowNativeMessageBox( const String& rTitle, ++ const String& rMessage, ++ int nButtonCombination, ++ int nDefaultButton) = 0; ++}; ++ ++SalSystem* ImplGetSalSystem(); + + #endif // _SV_SALSYS_HXX +Index: vcl/inc/saltimer.hxx +=================================================================== +RCS file: /cvs/gsl/vcl/inc/saltimer.hxx,v +retrieving revision 1.1.1.1 +retrieving revision 1.2 +diff -u -p -u -r1.1.1.1 -r1.2 +--- vcl/inc/saltimer.hxx 19 Sep 2000 10:23:06 -0000 1.1.1.1 ++++ vcl/inc/saltimer.hxx 18 Nov 2003 14:30:19 -0000 1.2 +@@ -73,15 +73,34 @@ + // - SalTimer - + // ------------ + ++/* ++ * note: there will be only a single instance of SalTimer ++ * SalTimer originally had only static methods, but ++ * this needed to be virtualized for the sal plugin migration ++ */ ++ + class SalTimer + { ++ SALTIMERPROC m_pProc; + public: +- // AutoRepeat and Restart +- static void Start( ULONG nMS ); +- static void Stop(); ++ SalTimer() : m_pProc( NULL ) {} ++ virtual ~SalTimer(); ++ ++ // AutoRepeat and Restart ++ virtual void Start( ULONG nMS ) = 0; ++ virtual void Stop() = 0; + + // Callbacks (indepen in \sv\source\app\timer.cxx) +- static void SetCallback( SALTIMERPROC pProc ); ++ void SetCallback( SALTIMERPROC pProc ) ++ { ++ m_pProc = pProc; ++ } ++ ++ void CallCallback() ++ { ++ if( m_pProc ) ++ m_pProc(); ++ } + }; + + #endif // _SV_SALTIMER_HXX +Index: vcl/inc/salvd.hxx +=================================================================== +RCS file: /cvs/gsl/vcl/inc/salvd.hxx,v +retrieving revision 1.1.1.1 +retrieving revision 1.2 +diff -u -p -u -r1.1.1.1 -r1.2 +--- vcl/inc/salvd.hxx 19 Sep 2000 10:23:06 -0000 1.1.1.1 ++++ vcl/inc/salvd.hxx 18 Nov 2003 14:30:29 -0000 1.2 +@@ -65,9 +65,6 @@ + #ifndef _SV_SV_H + #include <sv.h> + #endif +-#ifndef _SV_SALVD_H +-#include <salvd.h> +-#endif + + class SalGraphics; + +@@ -77,27 +74,17 @@ class SalGraphics; + + class SalVirtualDevice + { +- friend class SalInstance; +- +-private: +- SalVirtualDevice(); +- ~SalVirtualDevice(); +- + public: // public for Sal Implementation +- SalVirDevData maVirDevData; +- +-#ifdef _INCL_SAL_SALVD_IMP +-#include <salvd.imp> +-#endif ++ SalVirtualDevice() {} ++ virtual ~SalVirtualDevice(); + +-public: + // SalGraphics or NULL, but two Graphics for all SalVirtualDevices + // must be returned +- SalGraphics* GetGraphics(); +- void ReleaseGraphics( SalGraphics* pGraphics ); ++ virtual SalGraphics* GetGraphics() = 0; ++ virtual void ReleaseGraphics( SalGraphics* pGraphics ) = 0; + + // Set new size, without saving the old contents +- BOOL SetSize( long nNewDX, long nNewDY ); ++ virtual BOOL SetSize( long nNewDX, long nNewDY ) = 0; + }; + + #endif // _SV_SALVD_HXX +Index: vcl/inc/salwtype.hxx +=================================================================== +RCS file: /cvs/gsl/vcl/inc/salwtype.hxx,v +retrieving revision 1.11 +retrieving revision 1.12 +diff -u -p -u -r1.11 -r1.12 +--- vcl/inc/salwtype.hxx 27 Mar 2003 17:57:31 -0000 1.11 ++++ vcl/inc/salwtype.hxx 18 Nov 2003 14:56:54 -0000 1.12 +@@ -147,7 +147,11 @@ struct ImplFontSelectData; + #define SALEVENT_CLOSEPOPUPS ((USHORT)30) + #define SALEVENT_EXTERNALKEYINPUT ((USHORT)31) + #define SALEVENT_EXTERNALKEYUP ((USHORT)32) +-#define SALEVENT_COUNT ((USHORT)32) ++#define SALEVENT_MENUCOMMAND ((USHORT)33) ++#define SALEVENT_MENUHIGHLIGHT ((USHORT)34) ++#define SALEVENT_MENUACTIVATE ((USHORT)35) ++#define SALEVENT_MENUDEACTIVATE ((USHORT)36) ++#define SALEVENT_COUNT ((USHORT)36) + + // MOUSELEAVE must send, when the pointer leave the client area and + // the mouse is not captured +@@ -169,6 +173,13 @@ struct SalKeyEvent + USHORT mnCode; // SV-KeyCode (KEY_xxx | KEY_SHIFT | KEY_MOD1 | KEY_MOD2) + USHORT mnCharCode; // SV-CharCode + USHORT mnRepeat; // Repeat-Count (KeyInputs-1) ++}; ++ ++// MENUEVENT ++struct SalMenuEvent ++{ ++ USHORT mnId; // Menu item ID ++ void* mpMenu; // pointer to VCL menu (class Menu) + }; + + // KEYMODCHANGE +Index: vcl/inc/scrbar.hxx +=================================================================== +RCS file: /cvs/gsl/vcl/inc/scrbar.hxx,v +retrieving revision 1.5 +retrieving revision 1.10 +diff -u -p -u -r1.5 -r1.10 +--- vcl/inc/scrbar.hxx 25 Jul 2001 11:39:21 -0000 1.5 ++++ vcl/inc/scrbar.hxx 10 May 2004 15:43:03 -0000 1.10 +@@ -69,6 +69,8 @@ + #include <ctrl.hxx> + #endif + ++class AutoTimer; ++ + // ------------------- + // - ScrollBar-Types - + // ------------------- +@@ -79,6 +81,7 @@ enum ScrollType { SCROLL_DONTKNOW, SCROL + // ------------- + // - ScrollBar - + // ------------- ++struct ImplScrollBarData; + + class ScrollBar : public Control + { +@@ -88,7 +91,7 @@ private: + Rectangle maPage1Rect; + Rectangle maPage2Rect; + Rectangle maThumbRect; +- void* mpDummy; ++ ImplScrollBarData* mpData; + long mnStartPos; + long mnMouseOff; + long mnThumbPixRange; +@@ -107,14 +110,26 @@ private: + ScrollType meDDScrollType; + BOOL mbCalcSize; + BOOL mbFullDrag; +- BOOL mbDummy1; +- BOOL mbDummy2; + Link maScrollHdl; + Link maEndScrollHdl; ++ Rectangle* ImplFindPartRect( const Point& rPt ); + +-#ifdef _SV_SCRBAR_CXX +-#include <scrbar.imp> +-#endif ++ void ImplInit( Window* pParent, WinBits nStyle ); ++ void ImplInitStyle( WinBits nStyle ); ++ void ImplLoadRes( const ResId& rResId ); ++ BOOL ImplUpdateThumbRect( const Rectangle& rOldRect ); ++ void ImplUpdateRects( BOOL bUpdate = TRUE ); ++ long ImplCalcThumbPos( long nPixPos ); ++ long ImplCalcThumbPosPix( long nPos ); ++ void ImplCalc( BOOL bUpdate = TRUE ); ++ void ImplDraw( USHORT nDrawFlags, OutputDevice* pOutDev ); ++ long ImplScroll( long nNewPos, BOOL bCallEndScroll ); ++ long ImplDoAction( BOOL bCallEndScroll ); ++ void ImplDoMouseAction( const Point& rPos, BOOL bCallAction = TRUE ); ++ void ImplInvert(); ++ BOOL ImplDrawNative( USHORT nDrawFlags ); ++ DECL_LINK( ImplTimerHdl, Timer* ); ++ DECL_LINK( ImplAutoTimerHdl, AutoTimer* ); + + public: + ScrollBar( Window* pParent, WinBits nStyle = WB_VERT ); +@@ -125,9 +140,13 @@ public: + virtual void Tracking( const TrackingEvent& rTEvt ); + virtual void KeyInput( const KeyEvent& rKEvt ); + virtual void Paint( const Rectangle& rRect ); ++ virtual void Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, ULONG nFlags ); + virtual void Resize(); + virtual void StateChanged( StateChangedType nType ); + virtual void DataChanged( const DataChangedEvent& rDCEvt ); ++ virtual long PreNotify( NotifyEvent& rNEvt ); ++ virtual void GetFocus(); ++ virtual void LoseFocus(); + + virtual void Scroll(); + virtual void EndScroll(); +@@ -169,11 +188,9 @@ public: + + class ScrollBarBox : public Window + { +-#ifdef _SV_SCRBAR_CXX + private: + void ImplInit( Window* pParent, WinBits nStyle ); + void ImplInitSettings(); +-#endif + + public: + ScrollBarBox( Window* pParent, WinBits nStyle = 0 ); +Index: vcl/inc/settings.hxx +=================================================================== +RCS file: /cvs/gsl/vcl/inc/settings.hxx,v +retrieving revision 1.19 +retrieving revision 1.23 +diff -u -p -u -r1.19 -r1.23 +--- vcl/inc/settings.hxx 17 Apr 2003 15:16:59 -0000 1.19 ++++ vcl/inc/settings.hxx 10 Jun 2004 17:17:43 -0000 1.23 +@@ -69,8 +69,8 @@ + #ifndef _SV_SV_H + #include <sv.h> + #endif +-#ifndef _SV_COLOR_HXX +-#include <color.hxx> ++#ifndef _TOOLS_COLOR_HXX ++#include <tools/color.hxx> + #endif + #ifndef _SV_FONT_HXX + #include <font.hxx> +@@ -99,10 +99,8 @@ class ImplMachineData + { + friend class MachineSettings; + +-#ifdef _SV_SETTINGS_CXX + ImplMachineData(); + ImplMachineData( const ImplMachineData& rData ); +-#endif + + private: + USHORT mnRefCount; +@@ -161,10 +159,8 @@ class ImplMouseData + { + friend class MouseSettings; + +-#ifdef _SV_SETTINGS_CXX + ImplMouseData(); + ImplMouseData( const ImplMouseData& rData ); +-#endif + + private: + USHORT mnRefCount; +@@ -187,10 +183,6 @@ private: + ULONG mnActionDelay; + ULONG mnMenuDelay; + ULONG mnFollow; +- ULONG mnDummy1; +- ULONG mnDummy2; +- ULONG mnDummy3; +- ULONG mnDummy4; + USHORT mnMiddleButtonAction; + USHORT mnAlign1; + }; +@@ -324,10 +316,8 @@ class ImplKeyboardData + { + friend class KeyboardSettings; + +-#ifdef _SV_SETTINGS_CXX + ImplKeyboardData(); + ImplKeyboardData( const ImplKeyboardData& rData ); +-#endif + + private: + USHORT mnRefCount; +@@ -378,74 +368,56 @@ class ImplStyleData + { + friend class StyleSettings; + +-#ifdef _SV_SETTINGS_CXX + ImplStyleData(); + ImplStyleData( const ImplStyleData& rData ); + void SetStandardStyles(); +- void SetStandardWinStyles(); +- void SetStandardOS2Styles(); +- void SetStandardMacStyles(); +- void SetStandardUnixStyles(); +-#endif + + private: + USHORT mnRefCount; +- Color maFaceColor; +- Color maCheckedColor; +- Color maLightColor; +- Color maLightBorderColor; +- Color maShadowColor; +- Color maDarkShadowColor; +- Color maButtonTextColor; +- Color maRadioCheckTextColor; +- Color maLabelTextColor; +- Color maInfoTextColor; +- Color maWindowColor; +- Color maWindowTextColor; +- Color maDialogColor; +- Color maDialogTextColor; +- Color maWorkspaceColor; +- Color maFieldColor; +- Color maFieldTextColor; ++ ++ void* mpStyleData_NotUsedYet; ++ ++ Color maActiveBorderColor; + Color maActiveColor; + Color maActiveColor2; + Color maActiveTextColor; +- Color maActiveBorderColor; ++ Color maButtonTextColor; ++ Color maCheckedColor; ++ Color maDarkShadowColor; ++ Color maDeactiveBorderColor; + Color maDeactiveColor; + Color maDeactiveColor2; + Color maDeactiveTextColor; +- Color maDeactiveBorderColor; ++ Color maDialogColor; ++ Color maDialogTextColor; ++ Color maDisableColor; ++ Color maFaceColor; ++ Color maFieldColor; ++ Color maFieldTextColor; ++ Color maFontColor; ++ Color maGroupTextColor; ++ Color maHelpColor; + Color maHelpTextColor; +- Color maMenuColor; + Color maHighlightColor; ++ Color maHighlightLinkColor; + Color maHighlightTextColor; ++ Color maInfoTextColor; ++ Color maLabelTextColor; ++ Color maLightBorderColor; ++ Color maLightColor; ++ Color maLinkColor; ++ Color maMenuBarColor; ++ Color maMenuBorderColor; ++ Color maMenuColor; + Color maMenuHighlightColor; + Color maMenuHighlightTextColor; +- Color maDisableColor; +- Color maHelpColor; +- Color maGroupTextColor; + Color maMenuTextColor; +- Color maLinkColor; ++ Color maRadioCheckTextColor; ++ Color maShadowColor; + Color maVisitedLinkColor; +- Color maHighlightLinkColor; +- Color maFontColor; +- Color maDummyColor2; +- Color maDummyColor3; +- Color maDummyColor4; +- Color maDummyColor5; +- Color maDummyColor6; +- Color maDummyColor7; +- Color maDummyColor8; +- Color maDummyColor9; +- Color maDummyColor10; +- Color maDummyColor11; +- Color maDummyColor12; +- Color maDummyColor13; +- Color maDummyColor14; +- Color maDummyColor15; +- Color maDummyColor16; +- Color maMenuBorderColor; +- Color maMenuBarColor; ++ Color maWindowColor; ++ Color maWindowTextColor; ++ Color maWorkspaceColor; + Font maAppFont; + Font maHelpFont; + Font maTitleFont; +@@ -459,8 +431,6 @@ private: + Font maFieldFont; + Font maIconFont; + Font maGroupFont; +- Font maDummyFont1; +- Font maDummyFont2; + long mnBorderSize; + long mnTitleHeight; + long mnFloatTitleHeight; +@@ -473,11 +443,6 @@ private: + long mnIconHorzSpace; + long mnIconVertSpace; + long mnAntialiasedMin; +- long mnDummySize2; +- long mnDummySize3; +- long mnDummySize4; +- long mnDummySize5; +- long mnDummySize6; + ULONG mnCursorBlinkTime; + ULONG mnDragFullOptions; + ULONG mnAnimationOptions; +@@ -485,8 +450,6 @@ private: + ULONG mnLogoDisplayTime; + ULONG mnDisplayOptions; + ULONG mnToolbarIconSize; +- ULONG mnDummyOption3; +- ULONG mnDummyOption4; + ULONG mnUseFlatMenues; + ULONG mnOptions; + USHORT mnScreenZoom; +@@ -499,6 +462,7 @@ private: + USHORT mnUseSystemUIFonts; + USHORT mnAutoMnemonic; + USHORT mnUseImagesInMenus; ++ ULONG mnUseFlatBorders; + }; + + // ----------------- +@@ -750,10 +714,15 @@ public: + { CopyData(); mpData->mnHighContrast = bHighContrast; } + BOOL GetHighContrastMode() const + { return (BOOL) mpData->mnHighContrast; } ++ BOOL IsHighContrastBlackAndWhite() const; + void SetUseSystemUIFonts( BOOL bUseSystemUIFonts ) + { CopyData(); mpData->mnUseSystemUIFonts = bUseSystemUIFonts; } + BOOL GetUseSystemUIFonts() const + { return (BOOL) mpData->mnUseSystemUIFonts; } ++ void SetUseFlatBorders( BOOL bUseFlatBorders ) ++ { CopyData(); mpData->mnUseFlatBorders = bUseFlatBorders; } ++ BOOL GetUseFlatBorders() const ++ { return (BOOL) mpData->mnUseFlatBorders; } + void SetUseFlatMenues( BOOL bUseFlatMenues ) + { CopyData(); mpData->mnUseFlatMenues = bUseFlatMenues; } + BOOL GetUseFlatMenues() const +@@ -962,17 +931,14 @@ class ImplMiscData + { + friend class MiscSettings; + +-#ifdef _SV_SETTINGS_CXX + ImplMiscData(); + ImplMiscData( const ImplMiscData& rData ); +-#endif + + private: + USHORT mnRefCount; + USHORT mnTwoDigitYearStart; + USHORT mnEnableATT; +- USHORT mnDummy1; +- USHORT mnDummy2; ++ BOOL mbEnableLocalizedDecimalSep; + }; + + // ---------------- +@@ -997,6 +963,8 @@ public: + { return mpData->mnTwoDigitYearStart; } + void SetEnableATToolSupport( BOOL bEnable ); + BOOL GetEnableATToolSupport() const; ++ void SetEnableLocalizedDecimalSep( BOOL bEnable ); ++ BOOL GetEnableLocalizedDecimalSep() const; + const MiscSettings& operator =( const MiscSettings& rSet ); + + BOOL operator ==( const MiscSettings& rSet ) const; +@@ -1012,10 +980,8 @@ class ImplSoundData + { + friend class SoundSettings; + +-#ifdef _SV_SETTINGS_CXX + ImplSoundData(); + ImplSoundData( const ImplSoundData& rData ); +-#endif + + private: + USHORT mnRefCount; +@@ -1063,10 +1029,8 @@ class ImplNotificationData + { + friend class NotificationSettings; + +-#ifdef _SV_SETTINGS_CXX + ImplNotificationData(); + ImplNotificationData( const ImplNotificationData& rData ); +-#endif + + private: + USHORT mnRefCount; +@@ -1109,10 +1073,8 @@ class ImplHelpData + { + friend class HelpSettings; + +-#ifdef _SV_SETTINGS_CXX + ImplHelpData(); + ImplHelpData( const ImplHelpData& rData ); +-#endif + + private: + USHORT mnRefCount; +@@ -1171,13 +1133,11 @@ public: + + class ImplAllSettingsData + { +- friend class AllSettings; ++ friend class AllSettings; + +-#ifdef _SV_SETTINGS_CXX +- ImplAllSettingsData(); +- ImplAllSettingsData( const ImplAllSettingsData& rData ); +- ~ImplAllSettingsData(); +-#endif ++ ImplAllSettingsData(); ++ ImplAllSettingsData( const ImplAllSettingsData& rData ); ++ ~ImplAllSettingsData(); + + private: + USHORT mnRefCount; +@@ -1202,9 +1162,6 @@ private: + CollatorWrapper* mpUICollatorWrapper; + vcl::I18nHelper* mpI18nHelper; + vcl::I18nHelper* mpUII18nHelper; +- +- void* mpDummy1; +- void* mpDummy2; + }; + + // --------------- +Index: vcl/inc/slider.hxx +=================================================================== +RCS file: /cvs/gsl/vcl/inc/slider.hxx,v +retrieving revision 1.1.1.1 +retrieving revision 1.2 +diff -u -p -u -r1.1.1.1 -r1.2 +--- vcl/inc/slider.hxx 19 Sep 2000 10:23:07 -0000 1.1.1.1 ++++ vcl/inc/slider.hxx 7 Jan 2004 09:18:32 -0000 1.2 +@@ -106,7 +106,6 @@ private: + Link maSlideHdl; + Link maEndSlideHdl; + +-#ifdef _SV_SLIDER_CXX + void ImplInit( Window* pParent, WinBits nStyle ); + void ImplInitStyle( WinBits nStyle ); + void ImplLoadRes( const ResId& rResId ); +@@ -123,7 +122,6 @@ private: + void ImplDoMouseAction( const Point& rPos, BOOL bCallAction = TRUE ); + long ImplDoSlide( long nNewPos ); + long ImplDoSlideAction( ScrollType eScrollType ); +-#endif + + public: + Slider( Window* pParent, WinBits nStyle = WB_HORZ ); +Index: vcl/inc/sound.hxx +=================================================================== +RCS file: /cvs/gsl/vcl/inc/sound.hxx,v +retrieving revision 1.3 +retrieving revision 1.5 +diff -u -p -u -r1.3 -r1.5 +--- vcl/inc/sound.hxx 13 Jun 2001 10:52:47 -0000 1.3 ++++ vcl/inc/sound.hxx 7 Jan 2004 09:19:13 -0000 1.5 +@@ -92,15 +92,10 @@ class Sound + { + private: + +-#ifndef REMOTE_APPSERVER + SalSound* mpSound; +-#else +- RMSound* mpSound; +-#endif +- + XubString maSoundName; + Window* mpWindow; +- BYTE* mpSoundData; ++ BYTE* mpSoundData_NOTUSED; + ULONG mnDataLen; + ULONG mnSoundLen; + ULONG mnStartTime; +@@ -124,7 +119,7 @@ public: + + public: + Sound( Window* pWindow = NULL ); +- ~Sound(); ++ virtual ~Sound(); + + virtual void Notify(); + +@@ -132,8 +127,6 @@ public: + Window* GetWindow() const { return mpWindow; } + BOOL SetSoundName( const XubString& rSoundName ); + const XubString& GetSoundName() const { return maSoundName; } +- BOOL SetSoundData( const BYTE* pSoundData, ULONG nDataLen ); +- BYTE* GetSoundData() const { return mpSoundData; } + ULONG GetSoundLen() const { return mnSoundLen; } + + void Play(); +Index: vcl/inc/spin.h +=================================================================== +RCS file: /cvs/gsl/vcl/inc/spin.h,v +retrieving revision 1.1.1.1 +retrieving revision 1.2 +diff -u -p -u -r1.1.1.1 -r1.2 +--- vcl/inc/spin.h 19 Sep 2000 10:23:07 -0000 1.1.1.1 ++++ vcl/inc/spin.h 11 Dec 2003 11:51:45 -0000 1.2 +@@ -82,6 +82,6 @@ void ImplDrawSpinButton( OutputDevice* p + BOOL bUpperIn, BOOL bLowerIn, + BOOL bUpperEnabled = TRUE, + BOOL bLowerEnabled = TRUE, +- BOOL bHorz = FALSE ); ++ BOOL bHorz = FALSE, BOOL bMirrorHorz = FALSE ); + + #endif // _SV_SPIN_H +Index: vcl/inc/spin.hxx +=================================================================== +RCS file: /cvs/gsl/vcl/inc/spin.hxx,v +retrieving revision 1.1.1.1 +retrieving revision 1.4 +diff -u -p -u -r1.1.1.1 -r1.4 +--- vcl/inc/spin.hxx 19 Sep 2000 10:23:07 -0000 1.1.1.1 ++++ vcl/inc/spin.hxx 10 May 2004 15:43:29 -0000 1.4 +@@ -82,19 +82,24 @@ private: + AutoTimer maRepeatTimer; + Rectangle maUpperRect; + Rectangle maLowerRect; +- BOOL mbRepeat : 1; +- BOOL mbUpperIn : 1; +- BOOL mbLowerIn : 1; +- BOOL mbInitialUp : 1; +- BOOL mbInitialDown : 1; +- BOOL mbHorz : 1; ++ Rectangle maFocusRect; ++ BOOL mbRepeat : 1; ++ BOOL mbUpperIn : 1; ++ BOOL mbLowerIn : 1; ++ BOOL mbInitialUp : 1; ++ BOOL mbInitialDown : 1; ++ BOOL mbHorz : 1; ++ BOOL mbUpperIsFocused : 1; + Link maUpHdlLink; + Link maDownHdlLink; ++ long mnMinRange; ++ long mnMaxRange; ++ long mnValue; ++ long mnValueStep; ++ Rectangle* ImplFindPartRect( const Point& rPt ); + +-#ifdef _SV_SPIN_CXX + void ImplInit( Window* pParent, WinBits nStyle ); + DECL_LINK( ImplTimeout, Timer* ); +-#endif + + public: + SpinButton( Window* pParent, WinBits nStyle = 0 ); +@@ -106,16 +111,45 @@ public: + + virtual void Resize(); + virtual void Paint( const Rectangle& rRect ); ++ virtual void Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, ULONG nFlags ); + virtual void MouseButtonDown( const MouseEvent& rMEvt ); + virtual void MouseButtonUp( const MouseEvent& rMEvt ); + virtual void MouseMove( const MouseEvent& rMEvt ); + virtual void KeyInput( const KeyEvent& rKEvt ); + virtual void StateChanged( StateChangedType nStateChange ); ++ virtual void GetFocus(); ++ virtual void LoseFocus(); ++ ++ void SetRangeMin( long nNewRange ); ++ long GetRangeMin() const { return mnMinRange; } ++ void SetRangeMax( long nNewRange ); ++ long GetRangeMax() const { return mnMaxRange; } ++ void SetRange( const Range& rRange ); ++ Range GetRange() const { return Range( GetRangeMin(), GetRangeMax() ); } ++ void SetValue( long nValue ); ++ long GetValue() const { return mnValue; } ++ void SetValueStep( long nNewStep ) { mnValueStep = nNewStep; } ++ long GetValueStep() const { return mnValueStep; } ++ virtual long PreNotify( NotifyEvent& rNEvt ); + + void SetUpHdl( const Link& rLink ) { maUpHdlLink = rLink; } + const Link& GetUpHdl() const { return maUpHdlLink; } + void SetDownHdl( const Link& rLink ) { maDownHdlLink = rLink; } + const Link& GetDownHdl() const { return maDownHdlLink; } ++ ++private: ++ // moves the focus to the upper or lower rect. Return TRUE if the focus rect actually changed. ++ BOOL ImplMoveFocus( BOOL _bUpper ); ++ void ImplCalcFocusRect( BOOL _bUpper ); ++ ++ inline BOOL ImplIsUpperEnabled( ) const ++ { ++ return mnValue + mnValueStep <= mnMaxRange; ++ } ++ inline BOOL ImplIsLowerEnabled( ) const ++ { ++ return mnValue >= mnMinRange + mnValueStep; ++ } + }; + + #endif // _SV_SPIN_HXX +Index: vcl/inc/spinfld.hxx +=================================================================== +RCS file: /cvs/gsl/vcl/inc/spinfld.hxx,v +retrieving revision 1.3 +retrieving revision 1.6 +diff -u -p -u -r1.3 -r1.6 +--- vcl/inc/spinfld.hxx 3 May 2002 13:04:10 -0000 1.3 ++++ vcl/inc/spinfld.hxx 10 May 2004 15:43:41 -0000 1.6 +@@ -97,16 +97,12 @@ protected: + mbLowerIn:1, + mbInDropDown:1; + +-#if _SOLAR__PRIVATE + void ImplInit( Window* pParent, WinBits nStyle ); + +-#ifdef _SV_SPINFLD_CXX + private: + DECL_LINK( ImplTimeout, Timer* ); + void ImplInitData(); + void ImplCalcButtonAreas( OutputDevice* pDev, const Size& rOutSz, Rectangle& rDDArea, Rectangle& rSpinUpArea, Rectangle& rSpinDownArea ); +-#endif +-#endif + + protected: + SpinField( WindowType nTyp ); +@@ -117,6 +113,7 @@ protected: + void EndDropDown(); + + virtual void FillLayoutData() const; ++ Rectangle * ImplFindPartRect( const Point& rPt ); + public: + SpinField( Window* pParent, WinBits nWinStyle = 0 ); + SpinField( Window* pParent, const ResId& rResId ); +@@ -137,6 +134,7 @@ public: + virtual void Resize(); + virtual void StateChanged( StateChangedType nType ); + virtual void DataChanged( const DataChangedEvent& rDCEvt ); ++ virtual long PreNotify( NotifyEvent& rNEvt ); + + void SetUpHdl( const Link& rLink ) { maUpHdlLink = rLink; } + const Link& GetUpHdl() const { return maUpHdlLink; } +Index: vcl/inc/split.hxx +=================================================================== +RCS file: /cvs/gsl/vcl/inc/split.hxx,v +retrieving revision 1.7 +retrieving revision 1.8 +diff -u -p -u -r1.7 -r1.8 +--- vcl/inc/split.hxx 14 Aug 2002 14:06:39 -0000 1.7 ++++ vcl/inc/split.hxx 7 Jan 2004 09:20:22 -0000 1.8 +@@ -92,7 +92,6 @@ private: + Link maStartSplitHdl; + Link maSplitHdl; + +-#ifdef _SV_SPLIT_CXX + void ImplInitData(); + void ImplDrawSplitter(); + void ImplSplitMousePos( Point& rPos ); +@@ -101,7 +100,6 @@ private: + BOOL ImplSplitterActive(); + Splitter* ImplFindSibling(); + void ImplRestoreSplitter(); +-#endif + + protected: + void ImplInit( Window* pParent, WinBits nWinStyle ); +Index: vcl/inc/splitwin.hxx +=================================================================== +RCS file: /cvs/gsl/vcl/inc/splitwin.hxx,v +retrieving revision 1.2 +retrieving revision 1.3 +diff -u -p -u -r1.2 -r1.3 +--- vcl/inc/splitwin.hxx 27 Mar 2003 17:57:33 -0000 1.2 ++++ vcl/inc/splitwin.hxx 7 Jan 2004 09:20:41 -0000 1.3 +@@ -141,10 +141,7 @@ private: + mbFadeInPressed:1, + mbFadeOutPressed:1, + mbFadeNoButtonMode:1, +- mbNoAlign:1, +- mbDummy2:1, +- mbDummy3:1, +- mbDummy4:1; ++ mbNoAlign:1; + Link maStartSplitHdl; + Link maSplitHdl; + Link maSplitResizeHdl; +@@ -152,7 +149,6 @@ private: + Link maFadeInHdl; + Link maFadeOutHdl; + +-#ifdef _SV_SPLITWIN_CXX + void ImplInit( Window* pParent, WinBits nStyle ); + void ImplInitSettings(); + void ImplCalcLayout(); +@@ -169,7 +165,6 @@ private: + void ImplDrawFadeIn( BOOL bInPaint ); + void ImplDrawFadeOut( BOOL bInPaint ); + void ImplNewAlign(); +-#endif + + public: + SplitWindow( Window* pParent, WinBits nStyle = 0 ); +Index: vcl/inc/status.hxx +=================================================================== +RCS file: /cvs/gsl/vcl/inc/status.hxx,v +retrieving revision 1.3 +retrieving revision 1.4 +diff -u -p -u -r1.3 -r1.4 +--- vcl/inc/status.hxx 27 Mar 2003 17:57:33 -0000 1.3 ++++ vcl/inc/status.hxx 7 Jan 2004 09:20:58 -0000 1.4 +@@ -128,23 +128,17 @@ private: + long mnCalcHeight; + long mnTextY; + long mnItemY; +- long mnDummyLong; + USHORT mnCurItemId; + USHORT mnPercent; + USHORT mnPercentCount; +- USHORT mnDummy1; + BOOL mbVisibleItems; + BOOL mbFormat; + BOOL mbProgressMode; + BOOL mbInUserDraw; + BOOL mbBottomBorder; +- BOOL mbDummy1; +- BOOL mbDummy2; +- BOOL mbDummy3; + Link maClickHdl; + Link maDoubleClickHdl; + +-#ifdef _SV_STATUS_CXX + void ImplInit( Window* pParent, WinBits nStyle ); + void ImplInitSettings( BOOL bFont, BOOL bForeground, BOOL bBackground ); + void ImplFormat(); +@@ -155,7 +149,6 @@ private: + USHORT nOldPerc, USHORT nNewPerc ); + void ImplCalcProgressRect(); + Rectangle ImplGetItemRectPos( USHORT nPos ) const; +-#endif + + public: + StatusBar( Window* pParent, +Index: vcl/inc/svapp.hxx +=================================================================== +RCS file: /cvs/gsl/vcl/inc/svapp.hxx,v +retrieving revision 1.27 +retrieving revision 1.30 +diff -u -p -u -r1.27 -r1.30 +--- vcl/inc/svapp.hxx 10 Jun 2003 14:29:14 -0000 1.27 ++++ vcl/inc/svapp.hxx 10 May 2004 12:57:43 -0000 1.30 +@@ -74,9 +74,6 @@ + #ifndef _UNQID_HXX + #include <tools/unqid.hxx> + #endif +-#ifndef _RTTI_HXX +-#include <tools/rtti.hxx> +-#endif + #ifndef _SV_SV_H + #include <sv.h> + #endif +@@ -100,13 +97,8 @@ class Window; + class Reflection; + class KeyCode; + class NotifyEvent; + class KeyEvent; + +-#ifndef NOOLDSV +-class Font; +-class ApplicationAddress; +-class ApplicationEvent; +-#endif + namespace vos { class IMutex; } + + #ifndef _COM_SUN_STAR_UNO_REFERENCE_H_ +@@ -327,7 +291,7 @@ class Application + { + public: + Application(); +- ~Application(); ++ virtual ~Application(); + + virtual void Main() = 0; + +@@ -406,8 +370,9 @@ public: + + #ifndef NO_GETAPPWINDOW + static WorkWindow* GetAppWindow(); + #endif +- static Window* GetFocusWindow(); ++ ++ static Window* GetFocusWindow(); + static OutputDevice* GetDefaultDevice(); + + static Window* GetFirstTopLevelWindow(); +@@ -562,6 +482,11 @@ public: + Can be called without the Solar mutex locked. + */ + static bool GetShowImeStatusWindowDefault(); ++ ++ /** Returns a string representing the desktop environment ++ the process is currently running in. ++ */ ++ static const ::rtl::OUString& GetDesktopEnvironment(); + }; + + Application* GetpApp(); +Index: vcl/inc/svdata.hxx +=================================================================== +RCS file: /cvs/gsl/vcl/inc/svdata.hxx,v +retrieving revision 1.38.88.2 +retrieving revision 1.45 +diff -u -p -u -r1.38.88.2 -r1.45 +--- vcl/inc/svdata.hxx 2 Mar 2004 10:00:45 -0000 1.38.88.2 ++++ vcl/inc/svdata.hxx 25 Jun 2004 17:08:32 -0000 1.45 +@@ -147,80 +147,13 @@ class ImplVDevCache; + class UnoWrapperBase; + class GraphicConverter; + class ImplWheelWindow; ++class SalTimer; ++class SalI18NImeStatus; + + namespace vos { class OMutex; } + namespace vos { class OCondition; } + namespace vcl { class DisplayConnection; class DefaultFontConfigItem; class FontSubstConfigItem; class SettingsConfigItem;} + +-// ---------- +-// - Remote - +-// ---------- +- +-#ifdef REMOTE_APPSERVER +-class VclOTimer; +-class RmEventQueue; +-class UNODispatchThread; +- +-// see unotools/atom.hxx +-namespace utl { +- class AtomClient; +-} +- +-// needed for server side drag and drop +-namespace com { namespace sun { namespace star { namespace datatransfer { namespace dnd { +- class XDragSource; +-} } } } } +- +-#include <tools/table.hxx> +-#include <vos/mutex.hxx> +-#include <vos/thread.hxx> +-#include <vos/semaphor.hxx> +-#include "rvp.hxx" +- +-#define CHECK_FOR_RVPSYNC_NORMAL() ImplGetSVData()->mpRVPNormalSync->CheckForRVPSync( NULL ); +-#define CHECK_FOR_RVPSYNC_SOUND() ImplGetSVData()->mpRVPSoundSync->CheckForRVPSync( NULL ); +- +-void rvpExceptionHandler(); +- +-DECLARE_TABLE( KeyNames, String* ); +- +-class ImplRemoteYieldMutex : public vos::OMutex +-{ +- ULONG mnCount; +- vos::OThread::TThreadIdentifier mnThreadId; +- vos::OThread::TThreadIdentifier mnMainThreadId; +- +-public: +- ImplRemoteYieldMutex(); +- +- virtual void SAL_CALL acquire(); +- virtual void SAL_CALL release(); +- virtual sal_Bool SAL_CALL tryToAcquire(); +- +- ULONG GetAcquireCount() const { return mnCount; } +- vos::OThread::TThreadIdentifier GetThreadId() const { return mnThreadId; } +- vos::OThread::TThreadIdentifier GetMainThreadId() const { return mnMainThreadId; } +- +-}; +- +-// sync uno rvp call packages +-class RVPSync +-{ +- vos::OThread::TThreadIdentifier mnLastThreadId; +- oslInterlockedCount mnRVPCount; +- REF( NMSP_CLIENT::XRmSync ) mxRVPSync; +- vos::OMutex maMutex; +- sal_uInt32 mnForceSyncCount; +- sal_uInt32 mnSyncCount; +- +-public: +- RVPSync( const REF( NMSP_CLIENT::XRmSync )& xRVPSync ); +- +- void CheckForRVPSync( const char* ); +-}; +- +-#endif +- + // ----------------- + // - ImplSVAppData - + // ----------------- +@@ -234,9 +167,6 @@ struct ImplSVAppData + ImeStatusWindowMode_SHOW + }; + +-#ifdef REMOTE_APPSERVER +- ImplRemoteYieldMutex* mpSolarMutex; // Solar-Mutex +-#endif + ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > mxMSF; + String* mpMSFTempFileName; + AllSettings* mpSettings; // Application settings +@@ -337,7 +266,6 @@ struct ImplSVWinData + USHORT mnAutoScrollFlags; // auto scroll flags + BOOL mbNoDeactivate; // TRUE: keine Deactivate durchfuehren + BOOL mbNoSaveFocus; // TRUE: menues must not save/restore focus +- BOOL mbDummy1; + }; + + +@@ -387,17 +315,6 @@ struct ImplSVHelpData + }; + + +-// -------------------- +-// - ImplSVSystemData - +-// -------------------- +- +-struct ImplSVSystemData +-{ +-#ifndef REMOTE_APPSERVER +- SalSystem* mpDefSystem; // Default-System-Instance +-#endif +-}; +- + // -------------- + // - ImplSVData - + // -------------- +@@ -412,6 +329,9 @@ struct ImplSVData + ULONG mnThreadCount; // is VCL MultiThread enabled + ImplConfigData* mpFirstConfigData; // Zeiger auf ersten Config-Block + ImplTimerData* mpFirstTimerData; // list of all running timers ++ SalTimer* mpSalTimer; // interface to sal event loop/timers ++ SalI18NImeStatus* mpImeStatus; // interface to ime status window ++ SalSystem* mpSalSystem; // SalSystem interface + ResMgr* mpResMgr; // SV-Resource-Manager + ULONG mnTimerPeriod; // current timer period + ULONG mnTimerUpdate; // TimerCallbackProcs on stack +@@ -422,35 +342,12 @@ struct ImplSVData + ImplSVWinData maWinData; // indepen data for Windows classes + ImplSVCtrlData maCtrlData; // indepen data for Control classes + ImplSVHelpData maHelpData; // indepen data for Help classes +- ImplSVSystemData maSystemData; // indepen data for class System + UnoWrapperBase* mpUnoWrapper; + Window* mpIntroWindow; // the splash screen + + vos::OThread::TThreadIdentifier mnMainThreadId; + ::vcl::DisplayConnection* mpDisplayConnection; + +-#ifdef REMOTE_APPSERVER +- VclOTimer* mpOTimer; // VOS-Timer +- RmEventQueue* mpRmEventQueue; // Remote-EventQueue +- REF( NMSP_CLIENT::XRmStatus ) mxStatus; // Remote-Status +- REF( NMSP_LANG::XMultiServiceFactory ) mxClientFactory; // XFactory zum erzeugen der UNO-Objekte statt ueber UNO_createObject +- REF( NMSP_CLIENT::XMultiInstanceFactory ) mxMultiFactory; // XFactory zum erzeugen der UNO-Objekte statt ueber UNO_createObject +- RVPSync* mpRVPNormalSync; // sync interfaces for rvp normal-calls +- RVPSync* mpRVPSoundSync; // sync interfaces for rvp sound-calls +- long mnRemoteVersion; // remote version of client +- ::utl::AtomClient* mpAtoms; // Atoms for client connection +- ::vos::OMutex* mpWindowObjectMutex; +- ::vos::OCondition* mpStartUpCond; +- void* mhRemoteEnv; // not needed anymore +- String* mpConnectionName; +- KeyNames* mpKeyNames; +- REF( NMSP_CLIENT::XRmPrinterEnvironment ) mxRmPrinterEnvironment; +- NMSP_CLIENT::PrinterEnvironment* mpPrinterEnvironment; +-// UNO_Server mhRemotePrinter; // UNO-PrinterServer +-// XRmPrinterEnvironment* mpRmPrinterEnv; // UNO-Printer-Environment +- ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDragSource > mxServerDragSource; +- Rectangle maWorkArea; // the remote screen size in pixels +-#endif + ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > mxAccessBridge; + com::sun::star::uno::Reference< com::sun::star::frame::XSessionManagerClient > xSMClient; + ::vcl::SettingsConfigItem* mpSettingsConfigItem; +@@ -465,10 +362,8 @@ ResMgr* ImplGetResMgr(); + void ImplWindowAutoMnemonic( Window* pWindow ); + void ImplTimerCallbackProc(); + +-#ifndef REMOTE_APPSERVER + void ImplUpdateSystemProcessWindow(); + Window* ImplFindWindow( const SalFrame* pFrame, Point& rSalFramePos ); +-#endif + + // SVAPP.CXX + BOOL ImplCallHotKey( const KeyCode& rKeyCode ); +Index: vcl/inc/sysdata.hxx +=================================================================== +RCS file: /cvs/gsl/vcl/inc/sysdata.hxx,v +retrieving revision 1.2 +retrieving revision 1.4 +diff -u -p -u -r1.2 -r1.4 +--- vcl/inc/sysdata.hxx 9 Feb 2001 14:51:45 -0000 1.2 ++++ vcl/inc/sysdata.hxx 7 Jan 2004 09:22:49 -0000 1.4 +@@ -69,11 +69,8 @@ + struct SystemEnvData + { + unsigned long nSize; // size in bytes of this structure +-#ifndef SYSDATA_ONLY_BASETYPE +-#if defined( WIN ) || defined( WNT ) ++#if defined( WNT ) + HWND hWnd; // the window hwnd +-#elif defined( OS2 ) +- HWND hWnd; // the client hwnd + #elif defined( UNX ) + void* pDisplay; // the relevant display connection + long aWindow; // the window of the object +@@ -86,7 +83,6 @@ struct SystemEnvData + long aShellWindow; // the window of the frame's shell + void* pShellWidget; // the frame's shell widget + #endif +-#endif + }; + + #define SystemChildData SystemEnvData +@@ -98,14 +94,24 @@ struct SystemEnvData + struct SystemParentData + { + unsigned long nSize; // size in bytes of this structure +-#ifndef SYSDATA_ONLY_BASETYPE +-#if defined( WIN ) || defined( WNT ) ++#if defined( WNT ) + HWND hWnd; // the window hwnd +-#elif defined( OS2 ) +- HWND hWnd; // the client hwnd + #elif defined( UNX ) + long aWindow; // the window of the object + #endif ++}; ++ ++// -------------------- ++// - SystemMenuData - ++// -------------------- ++ ++struct SystemMenuData ++{ ++ unsigned long nSize; // size in bytes of this structure ++#if defined( WNT ) ++ HMENU hMenu; // the menu handle of the menu bar ++#elif defined( UNX ) ++ long aMenu; // ??? + #endif + }; + +Index: vcl/inc/syswin.hxx +=================================================================== +RCS file: /cvs/gsl/vcl/inc/syswin.hxx,v +retrieving revision 1.12 +retrieving revision 1.13 +diff -u -p -u -r1.12 -r1.13 +--- vcl/inc/syswin.hxx 27 Mar 2003 17:57:34 -0000 1.12 ++++ vcl/inc/syswin.hxx 7 Jan 2004 09:23:35 -0000 1.13 +@@ -219,12 +219,9 @@ private: + BOOL mbDockBtn; + BOOL mbHideBtn; + BOOL mbSysChild; +- BOOL mbDummy2; +- BOOL mbDummy3; + USHORT mnMenuBarMode; + USHORT mnIcon; + TaskPaneList* mpTaskPaneList; +- void* mpDummy; + + protected: + SystemWindow( WindowType nType ); +Index: vcl/inc/tabctrl.hxx +=================================================================== +RCS file: /cvs/gsl/vcl/inc/tabctrl.hxx,v +retrieving revision 1.4 +retrieving revision 1.7 +diff -u -p -u -r1.4 -r1.7 +--- vcl/inc/tabctrl.hxx 4 Jun 2003 11:21:18 -0000 1.4 ++++ vcl/inc/tabctrl.hxx 10 May 2004 15:43:53 -0000 1.7 +@@ -110,8 +110,6 @@ private: + Link maActivateHdl; + Link maDeactivateHdl; + +-#ifdef _SV_TABCTRL_CXX +-private: + void ImplInitSettings( BOOL bFont, BOOL bForeground, BOOL bBackground ); + ImplTabItem* ImplGetItem( USHORT nId ) const; + void ImplScrollBtnsColor(); +@@ -124,16 +122,17 @@ private: + void ImplActivateTabPage( BOOL bNext ); + void ImplSetFirstPagePos( USHORT nPagePos ); + void ImplShowFocus(); +- void ImplDrawItem( ImplTabItem* pItem, const Rectangle& rCurRect, bool bLayout = false ); ++ void ImplDrawItem( ImplTabItem* pItem, const Rectangle& rCurRect, bool bLayout = false, bool bFirstInGroup = false, bool bLastInGroup = false, bool bIsCurrentItem = false ); + void ImplPaint( const Rectangle& rRect, bool bLayout = false ); + void ImplFreeLayoutData(); + DECL_LINK( ImplScrollBtnHdl, PushButton* pBtn ); +-#endif ++ + protected: + void ImplInit( Window* pParent, WinBits nStyle ); + void ImplLoadRes( const ResId& rResId ); + + virtual void FillLayoutData() const; ++ Rectangle* ImplFindPartRect( const Point& rPt ); + + public: + TabControl( Window* pParent, +@@ -152,6 +151,7 @@ public: + virtual long Notify( NotifyEvent& rNEvt ); + virtual void StateChanged( StateChangedType nType ); + virtual void DataChanged( const DataChangedEvent& rDCEvt ); ++ virtual long PreNotify( NotifyEvent& rNEvt ); + + virtual void ActivatePage(); + virtual long DeactivatePage(); +Index: vcl/inc/tabdlg.hxx +=================================================================== +RCS file: /cvs/gsl/vcl/inc/tabdlg.hxx,v +retrieving revision 1.1.1.1 +retrieving revision 1.2 +diff -u -p -u -r1.1.1.1 -r1.2 +--- vcl/inc/tabdlg.hxx 19 Sep 2000 10:23:07 -0000 1.1.1.1 ++++ vcl/inc/tabdlg.hxx 7 Jan 2004 09:24:21 -0000 1.2 +@@ -83,10 +83,8 @@ private: + WindowAlign meViewAlign; + BOOL mbPosControls; + +-#ifdef _SV_TABDLG_CXX + void ImplInitData(); + void ImplPosControls(); +-#endif + + public: + TabDialog( Window* pParent, +Index: vcl/inc/tabpage.hxx +=================================================================== +RCS file: /cvs/gsl/vcl/inc/tabpage.hxx,v +retrieving revision 1.3 +retrieving revision 1.5 +diff -u -p -u -r1.3 -r1.5 +--- vcl/inc/tabpage.hxx 24 Apr 2003 16:30:10 -0000 1.3 ++++ vcl/inc/tabpage.hxx 20 Feb 2004 08:49:19 -0000 1.5 +@@ -75,15 +75,15 @@ + + class TabPage : public Window + { +-#ifdef _SV_TABPAGE_CXX + private: + void ImplInit( Window* pParent, WinBits nStyle ); + void ImplInitSettings(); +-#endif + + public: + TabPage( Window* pParent, WinBits nStyle = 0 ); + TabPage( Window* pParent, const ResId& rResId ); ++ ++ virtual void Paint( const Rectangle& rRect ); + + virtual void StateChanged( StateChangedType nStateChange ); + virtual void DataChanged( const DataChangedEvent& rDCEvt ); +Index: vcl/inc/threadex.hxx +=================================================================== +RCS file: /cvs/gsl/vcl/inc/threadex.hxx,v +retrieving revision 1.1.1.1 +retrieving revision 1.2 +diff -u -p -u -r1.1.1.1 -r1.2 +--- vcl/inc/threadex.hxx 19 Sep 2000 10:23:07 -0000 1.1.1.1 ++++ vcl/inc/threadex.hxx 7 Jan 2004 09:24:56 -0000 1.2 +@@ -74,7 +74,7 @@ namespace vcl + static void SAL_CALL worker( void* ); + public: + ThreadExecutor(); +- ~ThreadExecutor(); ++ virtual ~ThreadExecutor(); + + virtual long doIt() = 0; + long execute(); +@@ -88,7 +88,7 @@ namespace vcl + DECL_LINK( worker, void* ); + public: + SolarThreadExecutor(); +- ~SolarThreadExecutor(); ++ virtual ~SolarThreadExecutor(); + + virtual long doIt() = 0; + long execute(); +Index: vcl/inc/timer.hxx +=================================================================== +RCS file: /cvs/gsl/vcl/inc/timer.hxx,v +retrieving revision 1.1.1.1 +retrieving revision 1.2 +diff -u -p -u -r1.1.1.1 -r1.2 +--- vcl/inc/timer.hxx 19 Sep 2000 10:23:07 -0000 1.1.1.1 ++++ vcl/inc/timer.hxx 7 Jan 2004 09:25:18 -0000 1.2 +@@ -89,7 +89,7 @@ protected: + public: + Timer(); + Timer( const Timer& rTimer ); +- ~Timer(); ++ virtual ~Timer(); + + virtual void Timeout(); + +Index: vcl/inc/toolbox.hxx +=================================================================== +RCS file: /cvs/gsl/vcl/inc/toolbox.hxx,v +retrieving revision 1.24 +retrieving revision 1.26 +diff -u -p -u -r1.24 -r1.26 +--- vcl/inc/toolbox.hxx 17 Apr 2003 15:17:11 -0000 1.24 ++++ vcl/inc/toolbox.hxx 20 Jan 2004 11:55:53 -0000 1.26 +@@ -202,7 +201,6 @@ private: + Rectangle maPaintRect; + FloatingWindow* mpFloatWin; + USHORT mnKeyModifier; +- USHORT mnDummy2; + long mnDX; + long mnDY; + long mnItemWidth; +@@ -250,10 +248,9 @@ private: + mbDragging:1, + mbHideStatusText:1, + mbMenuStrings:1, +- mbDummy1_Shift:1, +- mbDummy2_KeyEvt:1, +- mbDummy3_ChangingHighlight:1, +- mbDummy4:1; ++ mbIsShift:1, ++ mbIsKeyEvent:1, ++ mbChangingHighlight:1; + WindowAlign meAlign; + WindowAlign meDockAlign; + ButtonType meButtonType; +@@ -267,8 +264,6 @@ private: + Link maSelectHdl; + Link maNextToolBoxHdl; + +-#if _SOLAR__PRIVATE +-#ifdef _SV_TOOLBOX_CXX + void ImplInit( Window* pParent, WinBits nStyle ); + void ImplInitSettings( BOOL bFont, BOOL bForeground, BOOL bBackground ); + void ImplLoadRes( const ResId& rResId ); +@@ -298,12 +293,16 @@ private: + void ImplUpdateInputEnable(); + void ImplFillLayoutData() const; + DECL_LINK( ImplUpdateHdl, void* ); +-#endif ++ ++#if _SOLAR__PRIVATE + public: + void ImplFloatControl( BOOL bStart, FloatingWindow* pWindow = NULL ); + void ImplDisableFlatButtons(); + #endif + ++protected: ++ void SetCurItemId(USHORT nSet) { mnCurItemId = nSet; } ++ + public: + ToolBox( Window* pParent, WinBits nStyle = 0 ); + ToolBox( Window* pParent, const ResId& rResId ); +@@ -510,9 +509,9 @@ public: + void GetAccessObject( AccessObjectRef& rAcc ) const; + + // allow Click Handler to detect special key +- BOOL IsShift() const { return mbDummy1_Shift; } ++ BOOL IsShift() const { return mbIsShift; } + // allow Click Handler to distinguish between mouse and key input +- BOOL IsKeyEvent() const { return mbDummy2_KeyEvt; } ++ BOOL IsKeyEvent() const { return mbIsKeyEvent; } + + // accessibility helpers + +Index: vcl/inc/unobrok.hxx +=================================================================== +RCS file: /cvs/gsl/vcl/inc/unobrok.hxx,v +retrieving revision 1.1.1.1 +retrieving revision 1.2 +diff -u -p -u -r1.1.1.1 -r1.2 +--- vcl/inc/unobrok.hxx 19 Sep 2000 10:23:07 -0000 1.1.1.1 ++++ vcl/inc/unobrok.hxx 1 Dec 2003 13:02:17 -0000 1.2 +@@ -62,62 +62,8 @@ + #ifndef _UNOBROK_HXX + #define _UNOBROK_HXX + +-#include "rvp.hxx" +- + #include <svdata.hxx> + #include <vos/thread.hxx> +- +-// #include <com/sun/star/connection/XAcceptor.hpp> +- +-// class UnoBrokerThread : public ::vos::OThread +-// { +-// public: +- +-// UnoBrokerThread( +-// const ::com::sun::star::uno::Reference< +-// ::com::sun::star::lang::XMultiServiceFactory > &rSMgr, +-// const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > &rInitialObject ); +- +-// ~UnoBrokerThread(); +-// protected: +- +-// virtual void SAL_CALL run(); +-// virtual void SAL_CALL onTerminated(); +- +-// private: +- +-// ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_rSMgr; +-// ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > m_rInitialObject; +-// }; +- +- +-// /***************** +-// * This thread is used, when application is started as appserver +-// * Note : No security is checked, every user may connect to the application ! +-// *****************/ +-// class vcl_AcceptorThread : public ::vos::OThread +-// { +-// public: +- +-// vcl_AcceptorThread( +-// const ::com::sun::star::uno::Reference< +-// ::com::sun::star::lang::XMultiServiceFactory > &rSMgr, +-// const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > &rInitialObject, +-// const ::rtl::OUString &sAcceptorParameter); +- +-// protected: +- +-// virtual void SAL_CALL run(); +-// virtual void SAL_CALL onTerminated(); +- +-// virtual void SAL_CALL terminate(); +-// private: +- +-// ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_rSMgr; +-// ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > m_rInitialObject; +-// ::com::sun::star::uno::Reference< ::com::sun::star::connection::XAcceptor > m_rAcceptor; +-// ::rtl::OUString m_sAcceptorDescription; +-// }; + + namespace vcl_accept + { +Index: vcl/inc/unohelp2.hxx +=================================================================== +RCS file: /cvs/gsl/vcl/inc/unohelp2.hxx,v +retrieving revision 1.1 +retrieving revision 1.2 +diff -u -p -u -r1.1 -r1.2 +--- vcl/inc/unohelp2.hxx 18 Mar 2002 17:34:51 -0000 1.1 ++++ vcl/inc/unohelp2.hxx 7 Jan 2004 09:25:54 -0000 1.2 +@@ -74,6 +74,9 @@ + #include <tools/string.hxx> + #endif + ++#ifndef _OSL_MUTEX_HXX_ ++#include <osl/mutex.hxx> ++#endif + + namespace vcl { namespace unohelper { + +@@ -98,6 +101,14 @@ namespace vcl { namespace unohelper { + ::com::sun::star::uno::Any SAL_CALL getTransferData( const ::com::sun::star::datatransfer::DataFlavor& aFlavor ) throw(::com::sun::star::datatransfer::UnsupportedFlavorException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException); + ::com::sun::star::uno::Sequence< ::com::sun::star::datatransfer::DataFlavor > SAL_CALL getTransferDataFlavors( ) throw(::com::sun::star::uno::RuntimeException); + sal_Bool SAL_CALL isDataFlavorSupported( const ::com::sun::star::datatransfer::DataFlavor& aFlavor ) throw(::com::sun::star::uno::RuntimeException); ++ }; ++ ++ struct MutexHelper ++ { ++ private: ++ ::osl::Mutex maMutex; ++ public: ++ ::osl::Mutex& GetMutex() { return maMutex; } + }; + + }} // namespace vcl::unohelper +Index: vcl/inc/vclevent.hxx +=================================================================== +RCS file: /cvs/gsl/vcl/inc/vclevent.hxx,v +retrieving revision 1.30 +retrieving revision 1.31 +diff -u -p -u -r1.30 -r1.31 +--- vcl/inc/vclevent.hxx 12 Jun 2003 07:50:37 -0000 1.30 ++++ vcl/inc/vclevent.hxx 19 May 2004 13:50:40 -0000 1.31 +@@ -178,6 +178,7 @@ class Menu; + #define VCLEVENT_TOOLBOX_ITEMENABLED 1168 // pData = itempos + #define VCLEVENT_TOOLBOX_ITEMDISABLED 1169 // pData = itempos + #define VCLEVENT_TABPAGE_PAGETEXTCHANGED 1170 // pData = pageid ++#define VCLEVENT_ROADMAP_ITEMSELECTED 1171 + + // VclMenuEvent + #define VCLEVENT_MENU_ACTIVATE 1200 +@@ -203,8 +204,8 @@ class VclSimpleEvent + { + private: + ULONG nId; +- +-public: ++ ++public: + VclSimpleEvent( ULONG n ) { nId = n; } + TYPEINFO(); + +@@ -216,11 +217,11 @@ class VclWindowEvent : public VclSimpleE + private: + Window* pWindow; + void* pData; +- +-public: ++ ++public: + VclWindowEvent( Window* pWin, ULONG n, void* pDat = NULL ) : VclSimpleEvent(n) { pWindow = pWin; pData = pDat; } + TYPEINFO(); +- ++ + Window* GetWindow() const { return pWindow; } + void* GetData() const { return pData; } + }; +@@ -230,11 +231,11 @@ class VclMouseEvent : public VclWindowEv + { + private: + MouseEvent aEvent; +- +-public: ++ ++public: + VclMouseEvent( Window* pWin, ULONG n, const MouseEvent& rEvent ) : VclWindowEvent( pWin, n ), aEvent(rEvent) { ; } + TYPEINFO(); +- ++ + const MouseEvent& GetEvent() const { return aEvent; } + }; + */ +@@ -244,11 +245,11 @@ class VclMenuEvent : public VclSimpleEve + private: + Menu* pMenu; + USHORT mnPos; +- +-public: ++ ++public: + VclMenuEvent( Menu* pM, ULONG n, USHORT nPos ) : VclSimpleEvent(n) { pMenu = pM; mnPos = nPos; } + TYPEINFO(); +- ++ + Menu* GetMenu() const { return pMenu; } + USHORT GetItemPos() const { return mnPos; } + }; +@@ -261,7 +262,7 @@ public: + + // stops notifying when any handler has processed the event + // and returns TRUE in that case +- // a handler must return TRUE to signal that it has processed the event ++ // a handler must return TRUE to signal that it has processed the event + BOOL Process( VclSimpleEvent* pEvent ) const; + }; + +Index: vcl/inc/virdev.hxx +=================================================================== +RCS file: /cvs/gsl/vcl/inc/virdev.hxx,v +retrieving revision 1.3 +retrieving revision 1.7 +diff -u -p -u -r1.3 -r1.7 +--- vcl/inc/virdev.hxx 1 Apr 2003 09:43:53 -0000 1.3 ++++ vcl/inc/virdev.hxx 7 Jan 2004 09:26:54 -0000 1.7 +@@ -78,40 +78,52 @@ class RmVirtualDevice; + + class VirtualDevice : public OutputDevice + { +-private: ++ friend class Application; ++ friend class OutputDevice; + +-#ifndef REMOTE_APPSERVER ++private: + SalVirtualDevice* mpVirDev; +-#else +- RmVirtualDevice* mpVirDev; +-#endif + VirtualDevice* mpPrev; + VirtualDevice* mpNext; + USHORT mnBitCount; + BOOL mbScreenComp; +- BOOL mbDummyAlign; ++ sal_Int8 mnAlphaDepth; ++ BYTE meRefDevMode; + +-#if _SOLAR__PRIVATE +- friend class Application; +- friend class OutputDevice; +-#ifdef _SV_VIRDEV_CXX + void ImplInitVirDev( const OutputDevice* pOutDev, long nDX, long nDY, USHORT nBitCount ); +-#endif +-#ifdef REMOTE_APPSERVER +- RmVirtualDevice* ImplGetRemoteVirDev() const { return mpVirDev; } +-#endif +-#endif ++ BOOL ImplSetOutputSizePixel( const Size& rNewSize, BOOL bErase ); + + public: + VirtualDevice( USHORT nBitCount = 0 ); + VirtualDevice( const OutputDevice& rCompDev, + USHORT nBitCount = 0 ); ++ /** Create a virtual device with alpha channel ++ ++ @param rCompDev ++ The generated vdev will be compatible to this device. By ++ default, Application::GetDefaultDevice() is used here. ++ ++ @param nBitCount ++ Bit depth of the generated virtual device. Use 0 here, to ++ indicate: take default screen depth. Currently, only 0 and 1 ++ are allowed here, with 1 denoting binary mask. ++ ++ @param nAlphaBitCount ++ Bit depth of the generated virtual device. Use 0 here, to ++ indicate: take default screen depth. Currently, only 0 and 1 ++ are allowed here, with 1 denoting binary mask. ++ */ ++ VirtualDevice( const OutputDevice& rCompDev, ++ USHORT nBitCount, USHORT nAlphaBitCount ); + virtual ~VirtualDevice(); + +- void SetReferenceDevice(); + BOOL SetOutputSizePixel( const Size& rNewSize, BOOL bErase = TRUE ); + BOOL SetOutputSize( const Size& rNewSize, BOOL bErase = TRUE ) + { return SetOutputSizePixel( LogicToPixel( rNewSize ), bErase ); } ++ ++ // reference device modes for different compatibility levels ++ enum RefDevMode { REFDEV_NONE=0, REFDEV_MODE06, REFDEV_MODE48, REFDEV_MODE96 }; ++ void SetReferenceDevice( RefDevMode eMode = VirtualDevice::REFDEV_MODE06 ); + }; + + #endif // _SV_VIRDEV_HXX +Index: vcl/inc/wall.hxx +=================================================================== +RCS file: /cvs/gsl/vcl/inc/wall.hxx,v +retrieving revision 1.1.1.1 +retrieving revision 1.2 +diff -u -p -u -r1.1.1.1 -r1.2 +--- vcl/inc/wall.hxx 19 Sep 2000 10:23:08 -0000 1.1.1.1 ++++ vcl/inc/wall.hxx 7 Jan 2004 09:27:34 -0000 1.2 +@@ -65,13 +65,14 @@ + #ifndef _SV_SV_H + #include <sv.h> + #endif +-#ifndef _SV_COLOR_HXX +-#include <color.hxx> ++#ifndef _TOOLS_COLOR_HXX ++#include <tools/color.hxx> + #endif + + class Rectangle; + class Gradient; + class BitmapEx; ++class ImplWallpaper; + + // ------------------- + // - Wallpaper-Types - +@@ -113,40 +114,6 @@ enum WallpaperStyle + + #endif + +-// ----------------- +-// - ImplWallpaper - +-// ----------------- +- +-class SvStream; +- +-class ImplWallpaper +-{ +- friend class Wallpaper; +- +-private: +- Color maColor; +- BitmapEx* mpBitmap; +- Gradient* mpGradient; +- Rectangle* mpRect; +- WallpaperStyle meStyle; +- USHORT mnRefCount; +- BitmapEx* mpCache; +- +- friend SvStream& operator>>( SvStream& rIStm, ImplWallpaper& rImplWallpaper ); +- friend SvStream& operator<<( SvStream& rOStm, const ImplWallpaper& rImplWallpaper ); +- +-#ifdef _SV_WALL_CXX +-public: +- ImplWallpaper(); +- ImplWallpaper( const ImplWallpaper& rImplWallpaper ); +- ~ImplWallpaper(); +- +- void ImplSetCachedBitmap( BitmapEx& rBmp ); +- const BitmapEx* ImplGetCachedBitmap() { return mpCache; } +- void ImplReleaseCachedBitmap(); +-#endif +-}; +- + // ------------- + // - Wallpaper - + // ------------- +@@ -156,8 +123,9 @@ class Wallpaper + private: + ImplWallpaper* mpImplWallpaper; + +-#ifdef _SV_WALL_CXX + void ImplMakeUnique( BOOL bReleaseCache = TRUE ); ++ ++#if _SOLAR__PRIVATE + public: + ImplWallpaper* ImplGetImpWallpaper() const { return mpImplWallpaper; } + #endif +@@ -171,25 +139,25 @@ public: + ~Wallpaper(); + + void SetColor( const Color& rColor ); +- const Color& GetColor() const { return mpImplWallpaper->maColor; } ++ const Color& GetColor() const; + + void SetStyle( WallpaperStyle eStyle ); +- WallpaperStyle GetStyle() const { return mpImplWallpaper->meStyle; } ++ WallpaperStyle GetStyle() const; + + void SetBitmap( const BitmapEx& rBitmap ); + void SetBitmap(); + BitmapEx GetBitmap() const; +- BOOL IsBitmap() const { return (mpImplWallpaper->mpBitmap != 0); } ++ BOOL IsBitmap() const; + + void SetGradient( const Gradient& rGradient ); + void SetGradient(); + Gradient GetGradient() const; +- BOOL IsGradient() const { return (mpImplWallpaper->mpGradient != 0); } ++ BOOL IsGradient() const; + + void SetRect( const Rectangle& rRect ); + void SetRect(); + Rectangle GetRect() const; +- BOOL IsRect() const { return (mpImplWallpaper->mpRect != 0); } ++ BOOL IsRect() const; + + BOOL IsFixed() const; + BOOL IsScrollable() const; +Index: vcl/inc/wall2.hxx +=================================================================== +RCS file: vcl/inc/wall2.hxx +diff -N vcl/inc/wall2.hxx +--- /dev/null 1 Jan 1970 00:00:00 -0000 ++++ vcl/inc/wall2.hxx 7 Jan 2004 09:27:49 -0000 1.2 +@@ -0,0 +1,96 @@ ++/************************************************************************* ++ * ++ * ++ * ++ * ++ * ++ * ++ * ++ * The Contents of this file are made available subject to the terms of ++ * either of the following licenses ++ * ++ * - GNU Lesser General Public License Version 2.1 ++ * - Sun Industry Standards Source License Version 1.1 ++ * ++ * Sun Microsystems Inc., October, 2000 ++ * ++ * GNU Lesser General Public License Version 2.1 ++ * ============================================= ++ * Copyright 2000 by Sun Microsystems, Inc. ++ * 901 San Antonio Road, Palo Alto, CA 94303, USA ++ * ++ * This library is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU Lesser General Public ++ * License version 2.1, as published by the Free Software Foundation. ++ * ++ * This library is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * Lesser General Public License for more details. ++ * ++ * You should have received a copy of the GNU Lesser General Public ++ * License along with this library; if not, write to the Free Software ++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, ++ * MA 02111-1307 USA ++ * ++ * ++ * Sun Industry Standards Source License Version 1.1 ++ * ================================================= ++ * The contents of this file are subject to the Sun Industry Standards ++ * Source License Version 1.1 (the "License"); You may not use this file ++ * except in compliance with the License. You may obtain a copy of the ++ * License at http://www.openoffice.org/license.html. ++ * ++ * Software provided under this License is provided on an "AS IS" basis, ++ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, ++ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, ++ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. ++ * See the License for the specific provisions governing your rights and ++ * obligations concerning the Software. ++ * ++ * The Initial Developer of the Original Code is: Sun Microsystems, Inc. ++ * ++ * Copyright: 2000 by Sun Microsystems, Inc. ++ * ++ * All Rights Reserved. ++ * ++ * Contributor(s): _______________________________________ ++ * ++ * ++ ************************************************************************/ ++ ++#ifndef _SV_WALL2_HXX ++#define _SV_WALL2_HXX ++ ++#ifndef _SV_WALL_HXX ++#include <wall.hxx> ++#endif ++ ++class ImplWallpaper ++{ ++ friend class Wallpaper; ++ ++private: ++ Color maColor; ++ BitmapEx* mpBitmap; ++ Gradient* mpGradient; ++ Rectangle* mpRect; ++ WallpaperStyle meStyle; ++ USHORT mnRefCount; ++ BitmapEx* mpCache; ++ ++ friend SvStream& operator>>( SvStream& rIStm, ImplWallpaper& rImplWallpaper ); ++ friend SvStream& operator<<( SvStream& rOStm, const ImplWallpaper& rImplWallpaper ); ++ ++public: ++ ImplWallpaper(); ++ ImplWallpaper( const ImplWallpaper& rImplWallpaper ); ++ ~ImplWallpaper(); ++ ++ void ImplSetCachedBitmap( BitmapEx& rBmp ); ++ const BitmapEx* ImplGetCachedBitmap() { return mpCache; } ++ void ImplReleaseCachedBitmap(); ++}; ++ ++ ++#endif // _SV_WALL2_HXX +Index: vcl/inc/windata.hxx +=================================================================== +RCS file: /cvs/gsl/vcl/inc/windata.hxx,v +retrieving revision 1.2 +retrieving revision 1.3 +diff -u -p -u -r1.2 -r1.3 +--- vcl/inc/windata.hxx 27 Jun 2001 08:23:42 -0000 1.2 ++++ vcl/inc/windata.hxx 1 Dec 2003 13:02:52 -0000 1.3 +@@ -72,15 +72,7 @@ class SalFrame; + // - Prototypes - + // -------------- + +-#ifndef REMOTE_APPSERVER +- long ImplWindowFrameProc( void* pInst, SalFrame* pFrame, +- USHORT nEvent, const void* pEvent ); +-#else +- class ExtRmEvent; +- class Window; +- void ImplRemoteWindowFrameProc( ExtRmEvent* pEvent ); +- void ImplUpdateCursorRect( Window *pWindow ); +-#endif ++long ImplWindowFrameProc( void* pInst, SalFrame* pFrame, USHORT nEvent, const void* pEvent ); + + // ----------- + // - HitTest - +Index: vcl/inc/window.h +=================================================================== +RCS file: /cvs/gsl/vcl/inc/window.h,v +retrieving revision 1.11.136.1 +retrieving revision 1.15 +diff -u -p -u -r1.11.136.1 -r1.15 +--- vcl/inc/window.h 9 Jan 2004 18:13:41 -0000 1.11.136.1 ++++ vcl/inc/window.h 17 Jun 2004 12:10:38 -0000 1.15 +@@ -86,6 +86,7 @@ class VirtualDevice; + struct SalPaintEvent; + class ImplDevFontList; + class ImplFontCache; ++class SalControlHandle; + + namespace com { + namespace sun { +@@ -113,6 +114,10 @@ struct ImplWinData + Rectangle* mpFocusRect; + Rectangle* mpTrackRect; + USHORT mnTrackFlags; ++ USHORT mnIsTopWindow; ++ BOOL mbMouseOver; // tracks mouse over for native widget paint effect ++ SalControlHandle* mpSalControlHandle; // native data for NWF ++ BOOL mbEnableNativeWidget; // toggle native widget rendering + }; + + // ------------------- +@@ -145,16 +150,18 @@ struct ImplFrameData + Window* mpFirstBackWin; // Erstes Overlap-Window mit Hintergrund-Sicherung + ImplDevFontList* mpFontList; // Font-List for this frame + ImplFontCache* mpFontCache; // Font-Cache for this frame +- long mnDPIX; // Original Screen Resolution +- long mnDPIY; // Original Screen Resolution +- long mnFontDPIX; // Original Font Resolution +- long mnFontDPIY; // Original Font Resolution ++ sal_Int32 mnDPIX; // Original Screen Resolution ++ sal_Int32 mnDPIY; // Original Screen Resolution ++ sal_Int32 mnFontDPIX; // Original Font Resolution ++ sal_Int32 mnFontDPIY; // Original Font Resolution + ImplMapRes maMapUnitRes; // for LogicUnitToPixel + ULONG mnAllSaveBackSize; // Groesse aller Bitmaps fuer Hintergrund-Sicherung + ULONG mnFocusId; // FocusId for PostUserLink + ULONG mnMouseMoveId; // MoveId for PostUserLink + long mnLastMouseX; // last x mouse position + long mnLastMouseY; // last y mouse position ++ long mnBeforeLastMouseX; // last but one x mouse position ++ long mnBeforeLastMouseY; // last but one y mouse position + long mnFirstMouseX; // first x mouse position by mousebuttondown + long mnFirstMouseY; // first y mouse position by mousebuttondown + long mnLastMouseWinX; // last x mouse position, rel. to pMouseMoveWin +Index: vcl/inc/window.hxx +=================================================================== +RCS file: /cvs/gsl/vcl/inc/window.hxx,v +retrieving revision 1.47.112.1 +retrieving revision 1.55 +diff -u -p -u -r1.47.112.1 -r1.55 +--- vcl/inc/window.hxx 26 Jan 2004 17:20:36 -0000 1.47.112.1 ++++ vcl/inc/window.hxx 17 Jun 2004 12:10:54 -0000 1.55 +@@ -68,8 +68,8 @@ + #ifndef _SV_OUTDEV_HXX + #include <outdev.hxx> + #endif +-#ifndef _SV_RESID_HXX +-#include <resid.hxx> ++#ifndef _TOOLS_RESID_HXX ++#include <tools/resid.hxx> + #endif + #ifndef _SV_POINTR_HXX + #include <pointr.hxx> +@@ -91,12 +91,20 @@ + #include <event.hxx> + #endif + +-#ifndef _COM_SUN_STAR_UNO_REFERENCE_HXX_ +-#include <com/sun/star/uno/Reference.hxx> ++#ifndef _SV_REGION_HXX ++#include <region.hxx> ++#endif ++ ++#ifndef _SV_NATIVEWIDGETS_HXX ++#include <salnativewidgets.hxx> ++#endif ++ ++#ifndef _RTL_USTRING_HXX_ ++#include <rtl/ustring.hxx> + #endif + +-#ifdef REMOTE_APPSERVER +-#include "rvp.hxx" ++#ifndef _COM_SUN_STAR_UNO_REFERENCE_HXX_ ++#include <com/sun/star/uno/Reference.hxx> + #endif + + class VirtualDevice; +@@ -144,6 +151,7 @@ namespace sun { + namespace star { + namespace awt { + class XWindowPeer; ++ class XWindow; + } + namespace uno { + class Any; +@@ -335,26 +351,55 @@ typedef USHORT StateChangedType; + #define EXTTEXTINPUT_END_COMPLETE ((USHORT)0x0001) + #define EXTTEXTINPUT_END_CANCEL ((USHORT)0x0002) + ++#if _SOLAR__PRIVATE ++#define IMPL_MINSIZE_BUTTON_WIDTH 70 ++#define IMPL_MINSIZE_BUTTON_HEIGHT 22 ++#define IMPL_EXTRA_BUTTON_WIDTH 18 ++#define IMPL_EXTRA_BUTTON_HEIGHT 10 ++#define IMPL_SEP_BUTTON_X 5 ++#define IMPL_SEP_BUTTON_Y 5 ++#define IMPL_MINSIZE_MSGBOX_WIDTH 150 ++#define IMPL_MINSIZE_MSGBOX_HEIGHT 80 ++#define IMPL_DIALOG_OFFSET 5 ++#define IMPL_DIALOG_BAR_OFFSET 3 ++#define IMPL_MSGBOX_OFFSET_EXTRA_X 0 ++#define IMPL_MSGBOX_OFFSET_EXTRA_Y 2 ++#define IMPL_SEP_MSGBOX_IMAGE 8 ++#define IMPL_SEP_BUTTON_IMAGE 4 ++ ++#define DLGWINDOW_PREV 0 ++#define DLGWINDOW_NEXT 1 ++#define DLGWINDOW_FIRST 2 ++#endif ++ + // ---------- + // - Window - + // ---------- + + class Window : public OutputDevice + { ++ friend class Cursor; ++ friend class OutputDevice; ++ friend class Application; ++ friend class SystemWindow; ++ friend class WorkWindow; ++ friend class Dialog; ++ friend class MessBox; ++ friend class DockingWindow; ++ friend class FloatingWindow; ++ friend class GroupBox; ++ friend class PushButton; ++ friend class RadioButton; ++ friend class SystemChildWindow; ++ friend class ImplBorderWindow; ++ + private: + ImplWinData* mpWinData; + ImplOverlapData* mpOverlapData; + ImplFrameData* mpFrameData; +-#ifndef REMOTE_APPSERVER + SalFrame* mpFrame; + SalObject* mpSysObj; + void* mpRmEvents; +-#else +- friend class ExtRmEvent; +- RmFrameWindow* mpFrame; +- void* mpSysObj; +- ExtRmEvent* mpRmEvents; +-#endif + Window* mpFrameWindow; + Window* mpOverlapWindow; + Window* mpBorderWindow; +@@ -385,14 +433,13 @@ private: + Font* mpControlFont; + Color maControlForeground; + Color maControlBackground; +- long mnLeftBorder; +- long mnTopBorder; +- long mnRightBorder; +- long mnBottomBorder; ++ sal_Int32 mnLeftBorder; ++ sal_Int32 mnTopBorder; ++ sal_Int32 mnRightBorder; ++ sal_Int32 mnBottomBorder; + long mnX; + long mnY; + long mnAbsScreenX; +- long mnDummy2; + Point maPos; + ULONG mnHelpId; + ULONG mnUniqId; +@@ -413,8 +460,6 @@ private: + WinBits mnExtendedStyle; + WinBits mnPrevExtendedStyle; + WindowType mnType; +- LanguageType meDummy1; +- CharSet meDummy2; + USHORT mnWaitCount; + USHORT mnPaintFlags; + USHORT mnGetFocusFlags; +@@ -422,8 +467,6 @@ private: + USHORT mnActivateMode; + USHORT mnDlgCtrlFlags; + USHORT mnLockCount; +- USHORT mnDummy3; +- USHORT mnIsTopWindow; + BOOL mbFrame:1, + mbBorderWin:1, + mbOverlapWin:1, +@@ -490,9 +533,176 @@ private: + mbDrawSelectionBackground:1; + + ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > mxDNDListenerContainer; ++ void ImplInitData( WindowType nType ); ++ + + #if _SOLAR__PRIVATE +-#include <window.imp> ++ ++#ifdef DBG_UTIL ++ friend const char* ImplDbgCheckWindow( const void* pObj ); ++#endif ++ ++public: ++ void ImplInit( Window* pParent, WinBits nStyle, SystemParentData* pSystemParentData ); ++ void ImplInit( Window* pParent, WinBits nStyle, const ::com::sun::star::uno::Any& aSystemWorkWindowToken ); ++ WinBits ImplInitRes( const ResId& rResId ); ++ void ImplLoadRes( const ResId& rResId ); ++ void ImplWindowRes( const ResId& rResId ); ++ void ImplSetFrameParent( const Window* pParent ); ++ void ImplInsertWindow( Window* pParent ); ++ void ImplRemoveWindow( BOOL bRemoveFrameData ); ++ Window* ImplGetWindow() { if ( mpClientWindow ) return mpClientWindow; else return this; } ++ ImplFrameData* ImplGetFrameData() { return mpFrameData; } ++ SalFrame* ImplGetFrame() const { return mpFrame; } ++ ImplWinData* ImplGetWinData() const; ++ SalGraphics* ImplGetFrameGraphics() const; ++ void ImplCallFocusChangeActivate( Window* pNewOverlapWindow, Window* pOldOverlapWindow ); ++ Window* ImplFindWindow( const Point& rFramePos ); ++ USHORT ImplHitTest( const Point& rFramePos ); ++ Window* ImplGetParent() const { return mpParent; } ++ Window* ImplGetClientWindow() const { return mpClientWindow; } ++ Window* ImplGetBorderWindow() const { return mpBorderWindow; } ++ Window* ImplGetFirstOverlapWindow() { if ( mbOverlapWin ) return this; else return mpOverlapWindow; } ++ const Window* ImplGetFirstOverlapWindow() const { if ( mbOverlapWin ) return this; else return mpOverlapWindow; } ++ Window* ImplGetFrameWindow() const { return mpFrameWindow; } ++ BOOL ImplIsRealParentPath( const Window* pWindow ) const; ++ BOOL ImplIsChild( const Window* pWindow, BOOL bSystemWindow = FALSE ) const; ++ BOOL ImplIsWindowOrChild( const Window* pWindow, BOOL bSystemWindow = FALSE ) const; ++ Window* ImplGetSameParent( const Window* pWindow ) const; ++ BOOL ImplIsDockingWindow() const { return mbDockWin; } ++ BOOL ImplIsFloatingWindow() const { return mbFloatWin; } ++ BOOL ImplIsToolbox() const { return mbToolBox; } ++ BOOL ImplIsSplitter() const { return mbSplitter; } ++ BOOL ImplIsPushButton() const { return mbPushButton; } ++ BOOL ImplIsOverlapWindow() const { return mbOverlapWin; } ++ void ImplSetActive( BOOL bActive ) { mbActive = bActive; } ++ BOOL ImplIsMouseTransparent() const { return mbMouseTransparent; } ++ void ImplSetMouseTransparent( BOOL bTransparent ) { mbMouseTransparent = bTransparent; } ++ int ImplTestMousePointerSet(); ++ PointerStyle ImplGetMousePointer() const; ++ void ImplResetReallyVisible(); ++ void ImplSetReallyVisible(); ++ void ImplCallInitShow(); ++ void ImplAddDel( ImplDelData* pDel ); ++ void ImplRemoveDel( ImplDelData* pDel ); ++ void ImplInitResolutionSettings(); ++ void ImplPointToLogic( Font& rFont ) const; ++ void ImplLogicToPoint( Font& rFont ) const; ++ Point ImplOutputToFrame( const Point& rPos ) ++ { return Point( rPos.X()+mnOutOffX, rPos.Y()+mnOutOffY ); } ++ Point ImplFrameToOutput( const Point& rPos ) ++ { return Point( rPos.X()-mnOutOffX, rPos.Y()-mnOutOffY ); } ++ void ImplOutputToFrame( Rectangle& rRect ) ++ { rRect.Left()+=mnOutOffX; rRect.Top()+=mnOutOffY; ++ rRect.Right()+=mnOutOffX; rRect.Bottom()+=mnOutOffY; } ++ void ImplFrameToOutput( Rectangle& rRect ) ++ { rRect.Left()-=mnOutOffX; rRect.Top()-=mnOutOffY; ++ rRect.Right()-=mnOutOffX; rRect.Bottom()-=mnOutOffY; } ++ BOOL ImplSysObjClip( const Region* pOldRegion ); ++ void ImplUpdateSysObjChildsClip(); ++ void ImplUpdateSysObjOverlapsClip(); ++ void ImplUpdateSysObjClip(); ++ BOOL ImplSetClipFlagChilds( BOOL bSysObjOnlySmaller = FALSE ); ++ BOOL ImplSetClipFlagOverlapWindows( BOOL bSysObjOnlySmaller = FALSE ); ++ BOOL ImplSetClipFlag( BOOL bSysObjOnlySmaller = FALSE ); ++ void ImplIntersectWindowClipRegion( Region& rRegion ); ++ void ImplIntersectWindowRegion( Region& rRegion ); ++ void ImplExcludeWindowRegion( Region& rRegion ); ++ void ImplExcludeOverlapWindows( Region& rRegion ); ++ void ImplExcludeOverlapWindows2( Region& rRegion ); ++ void ImplClipBoundaries( Region& rRegion, BOOL bThis, BOOL bOverlaps ); ++ BOOL ImplClipChilds( Region& rRegion ); ++ void ImplClipAllChilds( Region& rRegion ); ++ void ImplClipSiblings( Region& rRegion ); ++ void ImplInitWinClipRegion(); ++ void ImplInitWinChildClipRegion(); ++ Region* ImplGetWinChildClipRegion(); ++ void ImplIntersectAndUnionOverlapWindows( const Region& rInterRegion, Region& rRegion ); ++ void ImplIntersectAndUnionOverlapWindows2( const Region& rInterRegion, Region& rRegion ); ++ void ImplCalcOverlapRegionOverlaps( const Region& rInterRegion, Region& rRegion ); ++ void ImplCalcOverlapRegion( const Rectangle& rSourceRect, Region& rRegion, ++ BOOL bChilds, BOOL bParent, BOOL bSiblings ); ++ void ImplCallPaint( const Region* pRegion, USHORT nPaintFlags ); ++ void ImplCallOverlapPaint(); ++ void ImplPostPaint(); ++ void ImplInvalidateFrameRegion( const Region* pRegion, USHORT nFlags ); ++ void ImplInvalidateOverlapFrameRegion( const Region& rRegion ); ++ void ImplInvalidateParentFrameRegion( Region& rRegion ); ++ void ImplInvalidate( const Region* rRegion, USHORT nFlags ); ++ void ImplValidateFrameRegion( const Region* rRegion, USHORT nFlags ); ++ void ImplValidate( const Region* rRegion, USHORT nFlags ); ++ void ImplMoveInvalidateRegion( const Rectangle& rRect, long nHorzScroll, long nVertScroll, BOOL bChilds ); ++ void ImplMoveAllInvalidateRegions( const Rectangle& rRect, long nHorzScroll, long nVertScroll, BOOL bChilds ); ++ void ImplScroll( const Rectangle& rRect, long nHorzScroll, long nVertScroll, USHORT nFlags ); ++ void ImplUpdateAll( BOOL bOverlapWindows = TRUE ); ++ void ImplUpdateWindowPtr( Window* pWindow ); ++ void ImplUpdateWindowPtr(); ++ void ImplUpdateOverlapWindowPtr( BOOL bNewFrame ); ++ BOOL ImplUpdatePos(); ++ void ImplUpdateSysObjPos(); ++ void ImplUpdateGlobalSettings( AllSettings& rSettings, BOOL bCallHdl = TRUE ); ++ void ImplAlignChilds(); ++ void ImplPosSizeWindow( long nX, long nY, long nWidth, long nHeight, USHORT nFlags ); ++ void ImplToBottomChild(); ++ void ImplCalcToTop( ImplCalcToTopData* pPrevData ); ++ void ImplCalcChildOverlapToTop( ImplCalcToTopData* pPrevData ); ++ void ImplToTop( USHORT nFlags ); ++ void ImplStartToTop( USHORT nFlags ); ++ void ImplFocusToTop( USHORT nFlags, BOOL bReallyVisible ); ++ void ImplShowAllOverlaps(); ++ void ImplHideAllOverlaps(); ++ void ImplNotifyKeyMouseCommandEventListeners( NotifyEvent& rNEvt ); ++ void ImplCallMouseMove( USHORT nMouseCode, BOOL bModChanged = FALSE ); ++ void ImplGenerateMouseMove(); ++ void ImplGrabFocus( USHORT nFlags ); ++ void ImplInvertFocus( const Rectangle& rRect ); ++ void ImplControlFocus( USHORT nFlags = 0 ); ++ Window* ImplGetDlgWindow( USHORT n, USHORT nType, USHORT nStart = 0, USHORT nEnd = 0xFFFF, USHORT* pIndex = NULL ); ++ BOOL ImplDlgCtrl( const KeyEvent& rKEvt, BOOL bKeyInput ); ++ BOOL ImplHasDlgCtrl(); ++ void ImplDlgCtrlNextWindow(); ++ void ImplDlgCtrlFocusChanged( Window* pWindow, BOOL bGetFocus ); ++ Window* ImplFindDlgCtrlWindow( Window* pWindow ); ++ long ImplLogicUnitToPixelX( long nX, MapUnit eUnit ); ++ long ImplLogicUnitToPixelY( long nY, MapUnit eUnit ); ++ BOOL ImplIsWindowInFront( const Window* pTestWindow ) const; ++ void ImplSaveOverlapBackground(); ++ BOOL ImplRestoreOverlapBackground( Region& rInvRegion ); ++ void ImplDeleteOverlapBackground(); ++ void ImplInvalidateAllOverlapBackgrounds(); ++ static void ImplNewInputContext(); ++ void ImplCallActivateListeners(Window*); ++ void ImplCallDeactivateListeners(Window*); ++ DECL_LINK( ImplHandlePaintHdl, void* ); ++ DECL_LINK( ImplGenerateMouseMoveHdl, void* ); ++ DECL_LINK( ImplTrackTimerHdl, Timer* ); ++ DECL_LINK( ImplAsyncFocusHdl, void* ); ++ DECL_LINK( ImplAsyncStateChangedHdl, void* ); ++ ++ static void ImplCalcSymbolRect( Rectangle& rRect ); ++ void ImplHandleScroll( ScrollBar* pHScrl, long nX, ScrollBar* pVScrl, long nY ); ++ BOOL ImplGetCurrentBackgroundColor( Color& rCol ); ++ BOOL ImplIsAccessibleCandidate() const; ++ BOOL ImplIsAccessibleNativeFrame() const; ++ USHORT ImplGetAccessibleCandidateChildWindowCount( USHORT nFirstWindowType ) const; ++ Window* ImplGetAccessibleCandidateChild( USHORT nChild, USHORT& rChildCount, USHORT nFirstWindowType, BOOL bTopLevel = TRUE ) const; ++ BOOL ImplRegisterAccessibleNativeFrame(); ++ void ImplRevokeAccessibleNativeFrame(); ++ void ImplCallResize(); ++ void ImplCallMove(); ++ Rectangle ImplOutputToUnmirroredAbsoluteScreenPixel( const Rectangle& rRect ) const; ++ void ImplMirrorFramePos( Point &pt ) const; ++ long ImplGetUnmirroredOutOffX(); ++ void ImplIncModalCount(); ++ void ImplDecModalCount(); ++ ++ Rectangle ImplGetWindowExtentsRelative( Window *pRelativeWindow, BOOL bClientOnly ); ++ void ImplNotifyIconifiedState( BOOL bIconified ); ++ bool ImplStopDnd(); ++ void ImplStartDnd(); ++ ++ static void ImplInitAppFontData( Window* pWindow ); ++ void ImplInitSalControlHandle(); + #endif + + protected: +@@ -573,8 +783,8 @@ public: + + void SetBorderStyle( USHORT nBorderStyle ); + USHORT GetBorderStyle() const; +- void GetBorder( long& rLeftBorder, long& rTopBorder, +- long& rRightBorder, long& rBottomBorder ) const; ++ void GetBorder( sal_Int32& rLeftBorder, sal_Int32& rTopBorder, ++ sal_Int32& rRightBorder, sal_Int32& rBottomBorder ) const; + Size CalcWindowSize( const Size& rOutSz ) const; + Size CalcOutputSize( const Size& rWinSz ) const; + long CalcTitleWidth() const; +@@ -594,6 +804,8 @@ public: + void SetDialogControlFlags( USHORT nFlags ) { mnDlgCtrlFlags = nFlags; } + USHORT GetDialogControlFlags() const { return mnDlgCtrlFlags; } + ++ BOOL IsMouseOver(); ++ + ULONG GetCurrentModButtons(); + + void SetInputContext( const InputContext& rInputContext ); +@@ -616,7 +828,7 @@ public: + void SetZoomedPointFont( const Font& rFont ); + long GetDrawPixel( OutputDevice* pDev, long nPixels ) const; + Font GetDrawPixelFont( OutputDevice* pDev ) const; +- void GetFontResolution( long& nDPIX, long& nDPIY ) const; ++ void GetFontResolution( sal_Int32& nDPIX, sal_Int32& nDPIY ) const; + + void SetControlFont(); + void SetControlFont( const Font& rFont ); +@@ -641,6 +853,10 @@ public: + Region GetWindowClipRegionPixel( USHORT nFlags = 0 ) const; + Region GetPaintRegion() const; + BOOL IsInPaint() const { return mbInPaint; } ++ // while IsInPaint returns true ExpandPaintClipRegion adds the ++ // submitted region to the paint clip region so you can ++ // paint additional parts of your window if necessary ++ void ExpandPaintClipRegion( const Region& rRegion ); + + void SetParent( Window* pNewParent ); + Window* GetParent() const { return mpRealParent; } +@@ -687,8 +903,12 @@ public: + BOOL IsDefaultPos() const { return mbDefPos; } + BOOL IsDefaultSize() const { return mbDefSize; } + ++ // those conversion routines might deliver different results during UI mirroring + Point OutputToScreenPixel( const Point& rPos ) const; + Point ScreenToOutputPixel( const Point& rPos ) const; ++ // the normalized screen methods work independent from UI mirroring ++ Point OutputToNormalizedScreenPixel( const Point& rPos ) const; ++ Point NormalizedScreenToOutputPixel( const Point& rPos ) const; + Point OutputToAbsoluteScreenPixel( const Point& rPos ) const; + Point AbsoluteScreenToOutputPixel( const Point& rPos ) const; + Rectangle GetDesktopRectPixel() const; +@@ -753,6 +964,7 @@ public: + BOOL IsChildPointerOverwrite() const { return mbChildPtrOverwrite; } + void SetPointerPosPixel( const Point& rPos ); + Point GetPointerPosPixel(); ++ Point GetLastPointerPosPixel(); + void ShowPointer( BOOL bVisible ); + BOOL IsPointerVisible() const { return !mbNoPtrVisible; } + void EnterWait(); +@@ -852,11 +1060,11 @@ public: + ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > GetAccessible( BOOL bCreate = TRUE ); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > CreateAccessible(); + void SetAccessible( ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > ); +- ++ + Window* GetAccessibleParentWindow() const; + USHORT GetAccessibleChildWindowCount(); + Window* GetAccessibleChildWindow( USHORT n ); +- ++ + void SetAccessibleRole( USHORT nRole ); + USHORT GetAccessibleRole() const; + +@@ -900,6 +1114,52 @@ public: + // Clipboard/Selection interfaces + virtual ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::clipboard::XClipboard > GetClipboard(); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::clipboard::XClipboard > GetSelection(); ++ ++ //------------------------------------- ++ // Native Widget Rendering functions ++ //------------------------------------- ++ ++ // form controls must never use native widgets, this can be toggled here ++ void EnableNativeWidget( BOOL bEnable = TRUE ); ++ BOOL IsNativeWidgetEnabled() const; ++ ++ // These all just call through to the private mpFrame functions of the same name. ++ ++ // Query the platform layer for control support ++ BOOL IsNativeControlSupported( ControlType nType, ControlPart nPart ); ++ ++ // Query the native control to determine if it was acted upon ++ BOOL HitTestNativeControl( ControlType nType, ++ ControlPart nPart, ++ const Region& rControlRegion, ++ const Point& aPos, ++ BOOL& rIsInside ); ++ ++ // Request rendering of a particular control and/or part ++ BOOL DrawNativeControl( ControlType nType, ++ ControlPart nPart, ++ const Region& rControlRegion, ++ ControlState nState, ++ const ImplControlValue& aValue, ++ rtl::OUString aCaption ); ++ ++ // Request rendering of a caption string for a control ++ BOOL DrawNativeControlText( ControlType nType, ++ ControlPart nPart, ++ const Region& rControlRegion, ++ ControlState nState, ++ const ImplControlValue& aValue, ++ rtl::OUString aCaption ); ++ ++ // Query the native control's actual drawing region (including adornment) ++ BOOL GetNativeControlRegion( ControlType nType, ++ ControlPart nPart, ++ const Region& rControlRegion, ++ ControlState nState, ++ const ImplControlValue& aValue, ++ rtl::OUString aCaption, ++ Region &rNativeBoundingRegion, ++ Region &rNativeContentRegion ); + }; + + inline void Window::SetPosPixel( const Point& rNewPos ) +Index: vcl/inc/wintypes.hxx +=================================================================== +RCS file: /cvs/gsl/vcl/inc/wintypes.hxx,v +retrieving revision 1.14 +retrieving revision 1.17 +diff -u -p -u -r1.14 -r1.17 +--- vcl/inc/wintypes.hxx 11 Apr 2003 17:27:04 -0000 1.14 ++++ vcl/inc/wintypes.hxx 10 May 2004 15:44:37 -0000 1.17 +@@ -154,14 +154,15 @@ typedef USHORT WindowType; + #define WINDOW_TREELISTBOX (WINDOW_FIRST + 0x4d) + #define WINDOW_HELPTEXTWINDOW (WINDOW_FIRST + 0x4e) + #define WINDOW_INTROWINDOW (WINDOW_FIRST + 0x4f) +-#define WINDOW_LAST (WINDOW_INTROWINDOW) ++#define WINDOW_LISTBOXWINDOW (WINDOW_FIRST + 0x50) ++#define WINDOW_LAST (WINDOW_LISTBOXWINDOW) + + + // --------------- + // - Window-Bits - + // --------------- + +-// By changes you must also change: tools/vclrsc.hxx ++// By changes you must also change: rsc/vclrsc.hxx + typedef sal_Int64 WinBits; + + // Window-Bits fuer Window +Index: vcl/inc/wrkwin.hxx +=================================================================== +RCS file: /cvs/gsl/vcl/inc/wrkwin.hxx,v +retrieving revision 1.7 +retrieving revision 1.9 +diff -u -p -u -r1.7 -r1.9 +--- vcl/inc/wrkwin.hxx 11 Apr 2003 17:27:14 -0000 1.7 ++++ vcl/inc/wrkwin.hxx 17 Jun 2004 11:43:45 -0000 1.9 +@@ -96,20 +92,10 @@ private: + BOOL mbPresentationMode:1, + mbPresentationVisible:1, + mbPresentationFull:1, +- mbFullScreenMode:1, +- mbDummy0:1, +- mbDummy1:1, +- mbDummy2:1, +- mbDummy3:1, +- mbDummy4:1, +- mbDummy5:1, +- mbDummy6:1, +- mbDummy7:1; ++ mbFullScreenMode:1; + +-#ifdef _SV_WRKWIN_CXX + void ImplInitData(); + void ImplInit( Window* pParent, WinBits nStyle, const ::com::sun::star::uno::Any& aSystemWorkWindowToken ); +-#endif + + protected: + WorkWindow( WindowType nType ); +@@ -124,6 +110,8 @@ public: + WorkWindow( SystemParentData* pParent ); // Not in the REMOTE-Version + ~WorkWindow(); + ++ virtual BOOL Close(); ++ + void ShowFullScreenMode( BOOL bFullScreenMode = TRUE ); + void EndFullScreenMode() { ShowFullScreenMode( FALSE ); } + BOOL IsFullScreenMode() const { return mbFullScreenMode; } +@@ -136,16 +124,14 @@ public: + + BOOL SetPluginParent( SystemParentData* pParent ); + +-#ifndef NOOLDSV + void Minimize(); +- void Maximize(); + void Restore(); + +- BOOL IsMaximized() const; + + void SetOptOutputSizePixel( const Size& ) {} + Size GetOptOutputSizePixel() const { return Size(); } +-#endif ++ void Maximize( BOOL bMaximize = TRUE ); ++ BOOL IsMaximized(); + }; + + #endif // _SV_WRKWIN_HXX +Index: vcl/inc/xconnection.hxx +=================================================================== +RCS file: /cvs/gsl/vcl/inc/xconnection.hxx,v +retrieving revision 1.2 +retrieving revision 1.3 +diff -u -p -u -r1.2 -r1.3 +--- vcl/inc/xconnection.hxx 11 Sep 2001 15:52:21 -0000 1.2 ++++ vcl/inc/xconnection.hxx 6 Jan 2004 13:08:25 -0000 1.3 +@@ -78,7 +78,7 @@ + #include <com/sun/star/uno/Reference.hxx> + #endif + +-#ifndef __SGI_STL_LIST ++#ifndef _STLP_LIST + #include <list> + #endif + diff --git a/patches/OOO_1_1_2/vcl-source-gdi.diff b/patches/OOO_1_1_2/vcl-source-gdi.diff new file mode 100644 index 000000000..6d059d99c --- /dev/null +++ b/patches/OOO_1_1_2/vcl-source-gdi.diff @@ -0,0 +1,14528 @@ +Index: vcl/source/gdi/alpha.cxx +=================================================================== +RCS file: /cvs/gsl/vcl/source/gdi/alpha.cxx,v +retrieving revision 1.3 +retrieving revision 1.4 +diff -u -p -u -r1.3 -r1.4 +--- vcl/source/gdi/alpha.cxx 12 Sep 2002 09:30:55 -0000 1.3 ++++ vcl/source/gdi/alpha.cxx 6 Jan 2004 13:26:28 -0000 1.4 +@@ -59,16 +59,14 @@ + * + ************************************************************************/ + +-#define _SV_ALPHA_CXX +- + #ifndef _DEBUG_HXX + #include <tools/debug.hxx> + #endif + #ifndef _SV_BMPACC_HXX + #include <bmpacc.hxx> + #endif +-#ifndef _SV_COLOR_HXX +-#include <color.hxx> ++#ifndef _TOOLS_COLOR_HXX ++#include <tools/color.hxx> + #endif + #ifndef _SV_ALPHA_HXX + #include <alpha.hxx> +Index: vcl/source/gdi/animate.cxx +=================================================================== +RCS file: /cvs/gsl/vcl/source/gdi/animate.cxx,v +retrieving revision 1.1.1.1 +retrieving revision 1.4 +diff -u -p -u -r1.1.1.1 -r1.4 +--- vcl/source/gdi/animate.cxx 18 Sep 2000 17:05:37 -0000 1.1.1.1 ++++ vcl/source/gdi/animate.cxx 17 Jun 2004 12:14:23 -0000 1.4 +@@ -59,7 +59,6 @@ + * + ************************************************************************/ + +-#define _SV_ANIMATE_CXX + #define ENABLE_BYTESTRING_STREAM_OPERATORS + + #ifndef _DEBUG_HXX +@@ -137,11 +136,11 @@ ULONG AnimationBitmap::GetChecksum() con + // ------------- + + Animation::Animation() : +- mbIsInAnimation ( FALSE ), +- meCycleMode ( CYCLE_NORMAL ), + mnLoopCount ( 0 ), + mnLoops ( 0 ), + mnPos ( 0 ), ++ meCycleMode ( CYCLE_NORMAL ), ++ mbIsInAnimation ( FALSE ), + mbLoopTerminated ( FALSE ), + mbIsWaiting ( FALSE ) + { +@@ -153,12 +152,12 @@ Animation::Animation() : + // ----------------------------------------------------------------------- + + Animation::Animation( const Animation& rAnimation ) : +- maGlobalSize ( rAnimation.maGlobalSize ), + maBitmapEx ( rAnimation.maBitmapEx ), +- meCycleMode ( rAnimation.meCycleMode ), +- mbIsInAnimation ( FALSE ), ++ maGlobalSize ( rAnimation.maGlobalSize ), + mnLoopCount ( rAnimation.mnLoopCount ), + mnPos ( rAnimation.mnPos ), ++ meCycleMode ( rAnimation.meCycleMode ), ++ mbIsInAnimation ( FALSE ), + mbLoopTerminated ( rAnimation.mbLoopTerminated ), + mbIsWaiting ( rAnimation.mbIsWaiting ) + { +@@ -490,10 +489,7 @@ void Animation::Draw( OutputDevice* pOut + + void Animation::ImplRestartTimer( ULONG nTimeout ) + { +-#ifdef REMOTE_APPSERVER +- nTimeout = nTimeout > 40 ? nTimeout : 40; +-#endif +- maTimer.SetTimeout( Max( nTimeout, MIN_TIMEOUT + ( mnAnimCount - 1 ) * INC_TIMEOUT ) * 10L ); ++ maTimer.SetTimeout( Max( nTimeout, (ULONG)(MIN_TIMEOUT + ( mnAnimCount - 1 ) * INC_TIMEOUT) ) * 10L ); + maTimer.Start(); + } + +@@ -957,8 +953,6 @@ SvStream& operator>>( SvStream& rIStm, A + AnimationBitmap aAnimBmp; + BitmapEx aBmpEx; + ByteString aDummyStr; +- Point aPoint; +- Size aSize; + UINT32 nTmp32; + UINT16 nTmp16; + BYTE cTmp; +Index: vcl/source/gdi/bitmap.cxx +=================================================================== +RCS file: /cvs/gsl/vcl/source/gdi/bitmap.cxx,v +retrieving revision 1.7 +retrieving revision 1.11 +diff -u -p -u -r1.7 -r1.11 +--- vcl/source/gdi/bitmap.cxx 24 Apr 2003 14:56:22 -0000 1.7 ++++ vcl/source/gdi/bitmap.cxx 21 May 2004 16:22:22 -0000 1.11 +@@ -59,8 +59,6 @@ + * + ************************************************************************/ + +-#define _SV_BITMAP_CXX +- + #ifndef _RTL_CRC_H_ + #include <rtl/crc.h> + #endif +@@ -73,8 +71,8 @@ + #ifndef _SV_BMPACC_HXX + #include <bmpacc.hxx> + #endif +-#ifndef _SV_POLY_HXX +-#include <poly.hxx> ++#ifndef _TL_POLY_HXX ++#include <tools/poly.hxx> + #endif + #ifndef _SV_OUTDEV_HXX + #include <outdev.hxx> +@@ -83,13 +81,13 @@ + #include <impbmp.hxx> + #endif + #ifndef _SV_RC_H +-#include <rc.h> ++#include <tools/rc.h> + #endif + #ifndef _SV_BITMAP_HXX + #include <bitmap.hxx> + #endif +-#ifndef _SV_ALPHA_HXX +-#include <alpha.hxx> ++#ifndef _SV_BITMAPEX_HXX ++#include <bitmapex.hxx> + #endif + #ifndef _SV_SVAPP_HXX + #include <svapp.hxx> +@@ -98,7 +96,9 @@ + #include <image.hxx> + #endif + +-// ------------------------------------------------------------------ ++// ---------- ++// - Bitmap - ++// ---------- + + Bitmap::Bitmap() : + mpImpBmp( NULL ) +@@ -496,12 +486,6 @@ void Bitmap::ImplSetImpBitmap( ImpBitmap + + BitmapReadAccess* Bitmap::AcquireReadAccess() + { +-#ifdef REMOTE_APPSERVER +- BOOL bGottenFromServer = FALSE; +- if( mpImpBmp && mpImpBmp->ImplIsGetPrepared() ) +- mpImpBmp->ImplResolveGet(), bGottenFromServer = TRUE; +-#endif +- + BitmapReadAccess* pReadAccess = new BitmapReadAccess( *this ); + + if( !*pReadAccess ) +@@ -510,11 +494,6 @@ BitmapReadAccess* Bitmap::AcquireReadAcc + pReadAccess = NULL; + } + +-#ifdef REMOTE_APPSERVER +- if( pReadAccess && mpImpBmp && bGottenFromServer ) +- mpImpBmp->ImplReleaseRemoteBmp(); +-#endif +- + return pReadAccess; + } + +@@ -522,11 +501,6 @@ BitmapReadAccess* Bitmap::AcquireReadAcc + + BitmapWriteAccess* Bitmap::AcquireWriteAccess() + { +-#ifdef REMOTE_APPSERVER +- if( mpImpBmp && mpImpBmp->ImplIsGetPrepared() ) +- mpImpBmp->ImplResolveGet(); +-#endif +- + BitmapWriteAccess* pWriteAccess = new BitmapWriteAccess( *this ); + + if( !*pWriteAccess ) +@@ -535,11 +509,6 @@ BitmapWriteAccess* Bitmap::AcquireWriteA + pWriteAccess = NULL; + } + +-#ifdef REMOTE_APPSERVER +- if( pWriteAccess && mpImpBmp ) +- mpImpBmp->ImplReleaseRemoteBmp(); +-#endif +- + return pWriteAccess; + } + +@@ -560,8 +529,8 @@ BOOL Bitmap::Erase( const Color& rFillCo + if( pWriteAcc ) + { + const ULONG nFormat = pWriteAcc->GetScanlineFormat(); +- BYTE cIndex; +- BOOL bFast; ++ BYTE cIndex = 0; ++ BOOL bFast = FALSE; + + switch( nFormat ) + { +@@ -612,7 +581,7 @@ BOOL Bitmap::Erase( const Color& rFillCo + if( bFast ) + { + const ULONG nBufSize = pWriteAcc->GetScanlineSize() * pWriteAcc->Height(); +- HMEMSET( pWriteAcc->GetBuffer(), cIndex, nBufSize ); ++ memset( pWriteAcc->GetBuffer(), cIndex, nBufSize ); + } + else + { +@@ -713,9 +682,9 @@ BOOL Bitmap::Mirror( ULONG nMirrorFlags + + for( long nY = 0L, nOther = nHeight1; nY < nHeight_2; nY++, nOther-- ) + { +- HMEMCPY( pBuffer, pAcc->GetScanline( nY ), nScanSize ); +- HMEMCPY( pAcc->GetScanline( nY ), pAcc->GetScanline( nOther ), nScanSize ); +- HMEMCPY( pAcc->GetScanline( nOther ), pBuffer, nScanSize ); ++ memcpy( pBuffer, pAcc->GetScanline( nY ), nScanSize ); ++ memcpy( pAcc->GetScanline( nY ), pAcc->GetScanline( nOther ), nScanSize ); ++ memcpy( pAcc->GetScanline( nOther ), pBuffer, nScanSize ); + } + + delete[] pBuffer; +@@ -1069,6 +1038,9 @@ BOOL Bitmap::CopyPixel( const Rectangle& + } + else if( pReadAcc->HasPalette() ) + { ++ for( long nSrcY = aRectSrc.Top(); nSrcY < nSrcEndY; nSrcY++, nDstY++ ) ++ for( long nSrcX = aRectSrc.Left(), nDstX = aRectDst.Left(); nSrcX < nSrcEndX; nSrcX++, nDstX++ ) ++ pWriteAcc->SetPixel( nDstY, nDstX, pReadAcc->GetPaletteColor( pReadAcc->GetPixel( nSrcY, nSrcX ) ) ); + } + else + for( long nSrcY = aRectSrc.Top(); nSrcY < nSrcEndY; nSrcY++, nDstY++ ) +@@ -1157,8 +1129,6 @@ BOOL Bitmap::Expand( ULONG nDX, ULONG nD + + if( pReadAcc ) + { +-// Was soll den das ? +-// BitmapPalette aBmpPal( pReadAcc ? pReadAcc->GetPalette() : BitmapPalette() ); + BitmapPalette aBmpPal( pReadAcc->GetPalette() ); + Bitmap aNewBmp( aNewSize, GetBitCount(), &aBmpPal ); + BitmapWriteAccess* pWriteAcc = aNewBmp.AcquireWriteAccess(); +@@ -1166,7 +1136,6 @@ BOOL Bitmap::Expand( ULONG nDX, ULONG nD + if( pWriteAcc ) + { + BitmapColor aColor; +- const ULONG nScanlineSize = pReadAcc->GetScanlineSize(); + const long nNewX = nWidth; + const long nNewY = nHeight; + const long nNewWidth = pWriteAcc->Width(); +@@ -1448,11 +1417,6 @@ Region Bitmap::CreateRegion( const Color + return aRegion; + } + +-//fuer WIN16 Borland +-#ifdef WIN +-#pragma codeseg BITMAP_SEG1 +-#endif +- + // ------------------------------------------------------------------ + + BOOL Bitmap::Replace( const Bitmap& rMask, const Color& rReplaceColor ) +@@ -1755,7 +1719,6 @@ Bitmap Bitmap::CreateDisplayBitmap( Outp + { + Bitmap aDispBmp( *this ); + +-#ifndef REMOTE_APPSERVER + if( mpImpBmp && ( pDisplay->mpGraphics || pDisplay->ImplGetGraphics() ) ) + { + ImpBitmap* pImpDispBmp = new ImpBitmap; +@@ -1765,7 +1728,6 @@ Bitmap Bitmap::CreateDisplayBitmap( Outp + else + delete pImpDispBmp; + } +-#endif + + return aDispBmp; + } +@@ -1971,80 +1945,3 @@ BOOL Bitmap::MakeMono( BYTE cThreshold ) + { + return ImplMakeMono( cThreshold ); + } +- +-// ------------------------------------------------------------------ +- +-#ifdef REMOTE_APPSERVER +- +-void Bitmap::ImplDrawRemote( OutputDevice* pOut, +- const Point& rSrcPt, const Size& rSrcSz, +- const Point& rDestPt, const Size& rDestSz ) const +-{ +- if( mpImpBmp ) +- { +- if( !mpImpBmp->ImplGetRemoteBmp() ) +- mpImpBmp->ImplCreateRemoteBmp( *this ); +- +- mpImpBmp->ImplDrawRemoteBmp( pOut, rSrcPt, rSrcSz, rDestPt, rDestSz ); +- } +-} +- +-// ------------------------------------------------------------------ +- +-void Bitmap::ImplDrawRemoteEx( OutputDevice* pOut, +- const Point& rSrcPt, const Size& rSrcSz, +- const Point& rDestPt, const Size& rDestSz, +- const Bitmap& rMask ) const +-{ +- if( mpImpBmp ) +- { +- if( !mpImpBmp->ImplGetRemoteBmp() ) +- mpImpBmp->ImplCreateRemoteBmp( *this ); +- +- mpImpBmp->ImplDrawRemoteBmpEx( pOut, rSrcPt, rSrcSz, rDestPt, rDestSz, rMask ); +- } +-} +- +-// ------------------------------------------------------------------ +- +-void Bitmap::ImplDrawRemoteAlpha( OutputDevice* pOut, +- const Point& rSrcPt, const Size& rSrcSz, +- const Point& rDestPt, const Size& rDestSz, +- const AlphaMask& rAlpha ) const +-{ +- if( mpImpBmp ) +- { +- if( !mpImpBmp->ImplGetRemoteBmp() ) +- mpImpBmp->ImplCreateRemoteBmp( *this ); +- +- mpImpBmp->ImplDrawRemoteBmpAlpha( pOut, rSrcPt, rSrcSz, rDestPt, rDestSz, rAlpha ); +- } +-} +- +-// ------------------------------------------------------------------ +- +-void Bitmap::ImplDrawRemoteMask( OutputDevice* pOut, +- const Point& rSrcPt, const Size& rSrcSz, +- const Point& rDestPt, const Size& rDestSz, +- const Color& rColor ) const +-{ +- if( mpImpBmp ) +- { +- if( !mpImpBmp->ImplGetRemoteBmp() ) +- mpImpBmp->ImplCreateRemoteBmp( *this ); +- +- mpImpBmp->ImplDrawRemoteBmpMask( pOut, rSrcPt, rSrcSz, rDestPt, rDestSz, rColor ); +- } +-} +- +-// ------------------------------------------------------------------ +- +-void Bitmap::ImplGetRemoteBmp( OutputDevice* pOut, const Point& rPt, const Size& rSz ) +-{ +- DBG_ASSERT( !mpImpBmp, "Bitmap::ImplGetRemoteBmp???" ); +- +- mpImpBmp = new ImpBitmap; +- mpImpBmp->ImplCreateRemoteBmp( *this, pOut, rPt, rSz ); +-} +- +-#endif +Index: vcl/source/gdi/bitmap2.cxx +=================================================================== +RCS file: /cvs/gsl/vcl/source/gdi/bitmap2.cxx,v +retrieving revision 1.4 +retrieving revision 1.6 +diff -u -p -u -r1.4 -r1.6 +--- vcl/source/gdi/bitmap2.cxx 24 Apr 2003 13:17:58 -0000 1.4 ++++ vcl/source/gdi/bitmap2.cxx 17 Jun 2004 12:14:50 -0000 1.6 +@@ -59,14 +59,6 @@ + * + ************************************************************************/ + +-#ifdef WIN +-#ifndef _SV_SVSYS_HXX +-#include <svsys.h> +-#endif +-#endif +- +-#define _SV_BITMAP_CXX +- + #include <tools/zcodec.hxx> + #ifndef _TOOLS_NEW_HXX + #include <tools/new.hxx> +@@ -130,8 +122,8 @@ struct DIBInfoHeader + nHeight( 0UL ), + nPlanes( 0 ), + nBitCount( 0 ), +- nCompression( 0UL ), +- nSizeImage( 0UL ), ++ nCompression( 0 ), ++ nSizeImage( 0 ), + nXPelsPerMeter( 0UL ), + nYPelsPerMeter( 0UL ), + nColsUsed( 0UL ), +@@ -196,8 +188,6 @@ BOOL Bitmap::ImplReadDIB( SvStream& rISt + { + DIBInfoHeader aHeader; + const ULONG nStmPos = rIStm.Tell(); +- BitmapPalette* pPalette = NULL; +- BOOL bHeaderRead = FALSE; + BOOL bRet = FALSE; + + if( ImplReadDIBInfoHeader( rIStm, aHeader ) && aHeader.nWidth && aHeader.nHeight && aHeader.nBitCount ) +@@ -665,7 +655,7 @@ BOOL Bitmap::ImplReadDIBBits( SvStream& + + BOOL Bitmap::Write( SvStream& rOStm, BOOL bCompressed, BOOL bFileHeader ) const + { +- BMP_ASSERT( mpImpBmp, "Empty Bitmaps can't be saved" ); ++ DBG_ASSERT( mpImpBmp, "Empty Bitmaps can't be saved" ); + + const Size aSizePix( GetSizePixel() ); + BOOL bRet = FALSE; +@@ -711,7 +701,7 @@ BOOL Bitmap::ImplWriteDIB( SvStream& rOS + DIBInfoHeader aHeader; + ULONG nImageSizePos; + ULONG nEndPos; +- ULONG nCompression = 0UL; ++ ULONG nCompression = 0; + BOOL bRet = FALSE; + + aHeader.nSize = DIBINFOHEADERSIZE; +Index: vcl/source/gdi/bitmap3.cxx +=================================================================== +RCS file: /cvs/gsl/vcl/source/gdi/bitmap3.cxx,v +retrieving revision 1.3 +retrieving revision 1.4 +diff -u -p -u -r1.3 -r1.4 +--- vcl/source/gdi/bitmap3.cxx 27 Aug 2001 12:57:08 -0000 1.3 ++++ vcl/source/gdi/bitmap3.cxx 6 Jan 2004 13:28:34 -0000 1.4 +@@ -60,11 +60,6 @@ + ************************************************************************/ + + #include <stdlib.h> +-#define _SV_BITMAP_CXX +- +-#ifdef W31 +-#include <tools/svwin.h> +-#endif + #include <tools/new.hxx> + #ifndef _SV_BMPACC_HXX + #include <bmpacc.hxx> +@@ -1033,7 +1028,7 @@ BOOL Bitmap::ImplScaleFast( const double + + while( ( nActY < nNewHeight1 ) && ( pLutY[ nActY + 1 ] == nMapY ) ) + { +- HMEMCPY( pWriteAcc->GetScanline( nActY + 1L ), ++ memcpy( pWriteAcc->GetScanline( nActY + 1L ), + pWriteAcc->GetScanline( nActY ), nScanlineSize ); + nActY++; + } +@@ -1316,11 +1311,6 @@ BOOL Bitmap::Dither( ULONG nDitherFlags, + return bRet; + } + +-//fuer WIN16 Borland +-#ifdef WIN +-#pragma codeseg BITMAP3_SEG1 +-#endif +- + // ------------------------------------------------------------------------ + + BOOL Bitmap::ImplDitherMatrix( const BitmapPalette* pDitherPal ) +@@ -1413,7 +1403,6 @@ BOOL Bitmap::ImplDitherFloyd( const Bitm + long nX; + long nW = nWidth * 3L; + long nW2 = nW - 3L; +- long nWLen = nW << 2; + long nRErr, nGErr, nBErr; + long nRC, nGC, nBC; + long nTemp; +@@ -1491,7 +1480,8 @@ BOOL Bitmap::ImplDitherFloyd( const Bitm + pWriteAcc->SetPixel( nYAcc, 0, BitmapColor( (BYTE) ( nVCLBLut[ nBC ] + nVCLGLut[nGC ] + nVCLRLut[nRC ] ) ) ); + + // mittlere Pixel ueber Schleife +- for ( long nX = 3L, nXAcc = 1L; nX < nW2; nXAcc++ ) ++ long nX, nXAcc; ++ for ( nX = 3L, nXAcc = 1L; nX < nW2; nXAcc++ ) + { + CALC_ERRORS; + CALC_TABLES7; +@@ -1908,12 +1898,12 @@ BOOL Bitmap::ImplReduceMedian( USHORT nC + if( pWAcc ) + { + const ULONG nSize = 32768UL * sizeof( ULONG ); +- HPULONG pColBuf = (HPULONG) SvMemAlloc( nSize ); ++ ULONG* pColBuf = (ULONG*) SvMemAlloc( nSize ); + const long nWidth = pWAcc->Width(); + const long nHeight = pWAcc->Height(); + long nIndex = 0L; + +- HMEMSET( (HPBYTE) pColBuf, 0, nSize ); ++ memset( (HPBYTE) pColBuf, 0, nSize ); + + // create Buffer + if( pRAcc->HasPalette() ) +@@ -1986,7 +1976,7 @@ void Bitmap::ImplMedianCut( ULONG* pColB + const long nGLen = nG2 - nG1; + const long nBLen = nB2 - nB1; + long nR, nG, nB; +- HPULONG pBuf = pColBuf; ++ ULONG* pBuf = pColBuf; + + if( !nRLen && !nGLen && !nBLen ) + { +Index: vcl/source/gdi/bitmap4.cxx +=================================================================== +RCS file: /cvs/gsl/vcl/source/gdi/bitmap4.cxx,v +retrieving revision 1.2.292.1 +retrieving revision 1.5 +diff -u -p -u -r1.2.292.1 -r1.5 +--- vcl/source/gdi/bitmap4.cxx 15 Aug 2003 11:23:35 -0000 1.2.292.1 ++++ vcl/source/gdi/bitmap4.cxx 6 Jan 2004 13:29:07 -0000 1.5 +@@ -58,7 +58,6 @@ + * + * + ************************************************************************/ +-#define _SV_BITMAP_CXX + + #include <stdlib.h> + #include <vos/macros.hxx> +@@ -88,8 +87,7 @@ + + BOOL Bitmap::Filter( BmpFilter eFilter, const BmpFilterParam* pFilterParam, const Link* pProgress ) + { +- const USHORT nBitCount = GetBitCount(); +- BOOL bRet = FALSE; ++ BOOL bRet = FALSE; + + switch( eFilter ) + { +@@ -620,7 +618,7 @@ BOOL Bitmap::ImplEmbossGrey( const BmpFi + aGrey.SetIndex( 0 ); + else + { +- const double fGrey = nDotL / sqrt( nNx * nNx + nNy * nNy + nZ2 ); ++ const double fGrey = nDotL / sqrt( (double)(nNx * nNx + nNy * nNy + nZ2) ); + aGrey.SetIndex( (BYTE) VOS_BOUND( fGrey, 0, 255 ) ); + } + +Index: vcl/source/gdi/color.cxx +=================================================================== +RCS file: /cvs/gsl/vcl/source/gdi/color.cxx,v +retrieving revision 1.1.1.1 +retrieving revision 1.2 +diff -u -p -u -r1.1.1.1 -r1.2 +--- vcl/source/gdi/color.cxx 18 Sep 2000 17:05:37 -0000 1.1.1.1 ++++ vcl/source/gdi/color.cxx 6 Jan 2004 13:34:39 -0000 1.2 +@@ -76,7 +76,7 @@ + #include <svapp.hxx> + #endif + #ifndef _SV_RC_H +-#include <rc.h> ++#include <tools/rc.h> + #endif + + //============================================================================ +@@ -97,7 +97,7 @@ Color::Color( const ResId& rResId ) + USHORT nGreen = pResMgr->ReadShort(); + USHORT nBlue = pResMgr->ReadShort(); + // one more historical USHORT +- USHORT nDummy = pResMgr->ReadShort(); ++ pResMgr->ReadShort(); + + // RGB-Farbe + mnColor = RGB_COLORDATA( nRed>>8, nGreen>>8, nBlue>>8 ); +Index: vcl/source/gdi/cvtgrf.cxx +=================================================================== +RCS file: /cvs/gsl/vcl/source/gdi/cvtgrf.cxx,v +retrieving revision 1.2 +retrieving revision 1.4 +diff -u -p -u -r1.2 -r1.4 +--- vcl/source/gdi/cvtgrf.cxx 27 Sep 2001 17:00:25 -0000 1.2 ++++ vcl/source/gdi/cvtgrf.cxx 6 Jan 2004 13:35:07 -0000 1.4 +@@ -59,8 +59,6 @@ + * + ************************************************************************/ + +-#define _SV_CVTGRF_CXX +- + #ifndef _SV_SVSYS_HXX + #include <svsys.h> + #endif +@@ -81,19 +79,6 @@ + // - Callback - + // -------------- + +-#ifndef REMOTE_APPSERVER +- +-ULONG ImplFilterCallback( void* pInst, +- ULONG nInFormat, void* pInBuffer, ULONG nInBufSize, +- ULONG nOutFormat, void** ppOutBuffer ) +-{ +- return( ( (GraphicConverter*) pInst )->ImplConvert( nInFormat, +- pInBuffer, nInBufSize, +- ppOutBuffer, nOutFormat ) ); +-} +- +-#endif +- + // -------------------- + // - GraphicConverter - + // -------------------- +@@ -101,9 +86,6 @@ ULONG ImplFilterCallback( void* pInst, + GraphicConverter::GraphicConverter() : + mpConvertData( NULL ) + { +-#ifndef REMOTE_APPSERVER +- SetFilterCallback( (void*)ImplFilterCallback, this ); +-#endif + } + + // ------------------------------------------------------------------------ +Index: vcl/source/gdi/cvtsvm.cxx +=================================================================== +RCS file: /cvs/gsl/vcl/source/gdi/cvtsvm.cxx,v +retrieving revision 1.7 +retrieving revision 1.9 +diff -u -p -u -r1.7 -r1.9 +--- vcl/source/gdi/cvtsvm.cxx 27 Mar 2003 17:57:56 -0000 1.7 ++++ vcl/source/gdi/cvtsvm.cxx 17 Jun 2004 12:15:59 -0000 1.9 +@@ -59,7 +59,6 @@ + * + ************************************************************************/ + +-#define _SV_CVTSVM_CXX + #define ENABLE_BYTESTRING_STREAM_OPERATORS + + #include <algorithm> +@@ -720,7 +719,7 @@ void SVMConverter::ImplConvertFromSVM1( + case( GDI_TEXTARRAY_ACTION ): + { + ByteString aByteStr; +- long* pDXAry = NULL; ++ sal_Int32* pDXAry = NULL; + INT32 nIndex, nLen, nAryLen; + + rIStm >> aPt >> nIndex >> nLen >> nTmp >> nAryLen; +@@ -731,7 +730,7 @@ void SVMConverter::ImplConvertFromSVM1( + { + INT32 nStrLen( aStr.Len() ); + +- pDXAry = new long[ ::std::max( nAryLen, nStrLen ) ]; ++ pDXAry = new sal_Int32[ Max( nAryLen, nStrLen ) ]; + + for( long i = 0L; i < nAryLen; i++ ) + rIStm >> nTmp, pDXAry[ i ] = nTmp; +@@ -741,7 +740,7 @@ void SVMConverter::ImplConvertFromSVM1( + { + if( nAryLen+1 == nStrLen ) + { +- long* pTmpAry = new long[nStrLen]; ++ sal_Int32* pTmpAry = new sal_Int32[nStrLen]; + + aFontVDev.GetTextArray( aStr, pTmpAry, (USHORT) nIndex, (USHORT) nLen ); + +@@ -1195,7 +1194,6 @@ void SVMConverter::ImplConvertToSVM1( Sv + ULONG nPos; + ULONG nCountPos; + Font aSaveFont; +- const ULONG nActionCount = rMtf.GetActionCount(); + const USHORT nOldFormat = rOStm.GetNumberFormatInt(); + rtl_TextEncoding eActualCharSet = gsl_getSystemTextEncoding(); + const Size aPrefSize( rMtf.GetPrefSize() ); +@@ -1461,7 +1459,7 @@ ULONG SVMConverter::ImplWriteActions( Sv + ULONG nAryLen; + ULONG nLen = pAct->GetLen(); + const ULONG nTextLen = aText.Len(); +- long* pDXArray = pAct->GetDXArray(); ++ sal_Int32* pDXArray = pAct->GetDXArray(); + + if ( ImplWriteUnicodeComment( rOStm, aUniText ) ) + nCount++; +Index: vcl/source/gdi/font.cxx +=================================================================== +RCS file: /cvs/gsl/vcl/source/gdi/font.cxx,v +retrieving revision 1.6 +retrieving revision 1.7 +diff -u -p -u -r1.6 -r1.7 +--- vcl/source/gdi/font.cxx 27 Mar 2003 17:57:56 -0000 1.6 ++++ vcl/source/gdi/font.cxx 6 Jan 2004 13:36:04 -0000 1.7 +@@ -59,8 +59,6 @@ + * + ************************************************************************/ + +-#define _SV_FONT_CXX +- + #ifndef _STREAM_HXX + #include <tools/stream.hxx> + #endif +@@ -110,11 +108,11 @@ Impl_Font::Impl_Font() : + // ----------------------------------------------------------------------- + + Impl_Font::Impl_Font( const Impl_Font& rImplFont ) : +- maColor( rImplFont.maColor ), +- maFillColor( rImplFont.maFillColor ), + maName( rImplFont.maName ), + maStyleName( rImplFont.maStyleName ), +- maSize( rImplFont.maSize ) ++ maSize( rImplFont.maSize ), ++ maColor( rImplFont.maColor ), ++ maFillColor( rImplFont.maFillColor ) + { + mnRefCount = 1; + meCharSet = rImplFont.meCharSet; +@@ -158,11 +156,7 @@ Font::Font() + { + DBG_CTOR( Font, NULL ); + +-#ifdef WIN +- static Impl_Font _near aStaticImplFont; +-#else + static Impl_Font aStaticImplFont; +-#endif + // RefCount == 0 fuer statische Objekte + aStaticImplFont.mnRefCount = 0; + mpImplFont = &aStaticImplFont; +@@ -609,19 +603,16 @@ SvStream& operator>>( SvStream& rIStm, I + rIStm.ReadByteString( rImpl_Font.maName, rIStm.GetStreamCharSet() ); + rIStm.ReadByteString( rImpl_Font.maStyleName, rIStm.GetStreamCharSet() ); + rIStm >> rImpl_Font.maSize; +-// rIStm >> rImpl_Font.maColor; // removed since SUPD396 +-// rIStm >> rImpl_Font.maFillColor; // removed since SUPD396 + + rIStm >> nTmp16; rImpl_Font.meCharSet = (rtl_TextEncoding) nTmp16; + rIStm >> nTmp16; rImpl_Font.meFamily = (FontFamily) nTmp16; + rIStm >> nTmp16; rImpl_Font.mePitch = (FontPitch) nTmp16; +-// rIStm >> nTmp16; rImpl_Font.meAlign = (FontAlign) nTmp16; // removed since SUPD396 + rIStm >> nTmp16; rImpl_Font.meWeight = (FontWeight) nTmp16; + rIStm >> nTmp16; rImpl_Font.meUnderline = (FontUnderline) nTmp16; + rIStm >> nTmp16; rImpl_Font.meStrikeout = (FontStrikeout) nTmp16; + rIStm >> nTmp16; rImpl_Font.meItalic = (FontItalic) nTmp16; +- rIStm >> nTmp16; rImpl_Font.meLanguage = (LanguageType) nTmp16; // new since SUPD 396 +- rIStm >> nTmp16; rImpl_Font.meWidthType = (FontWidth) nTmp16; // new since SUPD 396 ++ rIStm >> nTmp16; rImpl_Font.meLanguage = (LanguageType) nTmp16; ++ rIStm >> nTmp16; rImpl_Font.meWidthType = (FontWidth) nTmp16; + + rIStm >> rImpl_Font.mnOrientation; + +@@ -629,7 +620,6 @@ SvStream& operator>>( SvStream& rIStm, I + rIStm >> bTmp; rImpl_Font.mbOutline = bTmp; + rIStm >> bTmp; rImpl_Font.mbShadow = bTmp; + rIStm >> nTmp8; rImpl_Font.mnKerning = nTmp8; +-// rIStm >> bTmp; rImpl_Font.mbTransparent = bTmp; // removed since SUPD396 + + if( aCompat.GetVersion() >= 2 ) + { +@@ -652,19 +642,16 @@ SvStream& operator<<( SvStream& rOStm, c + rOStm.WriteByteString( rImpl_Font.maName, rOStm.GetStreamCharSet() ); + rOStm.WriteByteString( rImpl_Font.maStyleName, rOStm.GetStreamCharSet() ); + rOStm << rImpl_Font.maSize; +-// rOStm << rImpl_Font.maColor; // removed since SUPD396 +-// rOStm << rImpl_Font.maFillColor; // removed since SUPD396 + + rOStm << (UINT16) GetStoreCharSet( rImpl_Font.meCharSet, rOStm.GetVersion() ); + rOStm << (UINT16) rImpl_Font.meFamily; + rOStm << (UINT16) rImpl_Font.mePitch; +-// rOStm << (UINT16) rImpl_Font.meAlign; // removed since SUPD396 + rOStm << (UINT16) rImpl_Font.meWeight; + rOStm << (UINT16) rImpl_Font.meUnderline; + rOStm << (UINT16) rImpl_Font.meStrikeout; + rOStm << (UINT16) rImpl_Font.meItalic; +- rOStm << (UINT16) rImpl_Font.meLanguage; // new since SUPD 396 +- rOStm << (UINT16) rImpl_Font.meWidthType; // new since SUPD 396 ++ rOStm << (UINT16) rImpl_Font.meLanguage; ++ rOStm << (UINT16) rImpl_Font.meWidthType; + + rOStm << rImpl_Font.mnOrientation; + +@@ -672,7 +659,6 @@ SvStream& operator<<( SvStream& rOStm, c + rOStm << (BOOL) rImpl_Font.mbOutline; + rOStm << (BOOL) rImpl_Font.mbShadow; + rOStm << (BYTE) rImpl_Font.mnKerning; +-// rOStm << (BOOL) rImpl_Font.mbTransparent; // removed since SUPD396 + + // new in version 2 + rOStm << (BYTE) rImpl_Font.meRelief; +Index: vcl/source/gdi/fontcfg.cxx +=================================================================== +RCS file: /cvs/gsl/vcl/source/gdi/fontcfg.cxx,v +retrieving revision 1.18.20.3 +retrieving revision 1.28 +diff -u -p -u -r1.18.20.3 -r1.28 +--- vcl/source/gdi/fontcfg.cxx 26 Jan 2004 17:21:01 -0000 1.18.20.3 ++++ vcl/source/gdi/fontcfg.cxx 25 Jun 2004 15:16:03 -0000 1.28 +@@ -88,13 +88,12 @@ + #include <tools/isolang.hxx> + #endif + +-#if OSL_DEBUG_LEVEL > 1 +-#include <stdio.h> ++#ifndef _RTL_USTRBUF_HXX_ ++#include <rtl/ustrbuf.hxx> + #endif + +-#if defined DEBUG_TIMING ++#if OSL_DEBUG_LEVEL > 1 + #include <stdio.h> +-#include <osl/time.h> + #endif + + #include <string.h> +@@ -109,6 +108,7 @@ using namespace vcl; + using namespace rtl; + using namespace utl; + using namespace com::sun::star::uno; ++using namespace com::sun::star::lang; + using namespace com::sun::star::beans; + + struct KeyMap +@@ -221,36 +221,41 @@ void DefaultFontConfigItem::Commit() + + int i, nKeys = sizeof(aKeyMap)/sizeof(aKeyMap[0]); + +- ::std::map< int, ::std::map< int, OUString > >::const_iterator lang; ++ std::hash_map< Locale, std::hash_map< int, OUString >, LocaleHash >::const_iterator lang; + + for( lang = m_aDefaults.begin(); lang != m_aDefaults.end(); ++lang ) + { +- int nLanguage = lang->first; +- if( nLanguage == LANGUAGE_DONTKNOW || +- nLanguage == LANGUAGE_NONE || +- nLanguage == LANGUAGE_SYSTEM || +- ( nLanguage >= LANGUAGE_USER1 && nLanguage <= LANGUAGE_USER9 ) +- ) +- continue; +- String aLanguage( ConvertLanguageToIsoString( nLanguage, '-' ).ToLowerAscii() ); +- if( ! aLanguage.Len() ) ++ OUStringBuffer aLanguage(16); ++ aLanguage.append( lang->first.Language.toAsciiLowerCase() ); ++ if( lang->first.Country.getLength() ) ++ { ++ aLanguage.append( sal_Unicode('-') ); ++ aLanguage.append( lang->first.Country.toAsciiLowerCase() ); ++ if( lang->first.Variant.getLength() ) ++ { ++ aLanguage.append( sal_Unicode('-') ); ++ aLanguage.append( lang->first.Variant.toAsciiLowerCase() ); ++ } ++ } ++ if( ! aLanguage.getLength() ) + continue; + +- String aKeyName( aLanguage ); +- sal_Bool bAdded = AddNode( OUString(), aLanguage ); // defaults for a not yet configured language may be added ++ OUString aKeyName = aLanguage.makeStringAndClear(); ++ AddNode( OUString(), aKeyName ); // defaults for a not yet configured language may be added + Sequence< PropertyValue > aValues( nKeys ); + PropertyValue* pValues = aValues.getArray(); + int nIndex = 0; + for( i = 0; i < nKeys; i++ ) + { +- ::std::map< int, OUString >::const_iterator it = lang->second.find( aKeyMap[i].nEnum ); ++ std::hash_map< int, OUString >::const_iterator it = lang->second.find( aKeyMap[i].nEnum ); + if( it == lang->second.end() ) + continue; + +- String aName( aKeyName ); +- aName.Append( '/' ); +- aName.AppendAscii( aKeyMap[i].pName, aKeyMap[i].nLen ); +- pValues[nIndex].Name = aName; ++ OUStringBuffer aName( 64 ); ++ aName.append( aKeyName ); ++ aName.append( sal_Unicode('/') ); ++ aName.appendAscii( aKeyMap[i].pName, aKeyMap[i].nLen ); ++ pValues[nIndex].Name = aName.makeStringAndClear(); + pValues[nIndex].Handle = it->first; + pValues[nIndex].Value <<= it->second; + pValues[nIndex].State = PropertyState_DIRECT_VALUE; +@@ -274,65 +279,19 @@ void DefaultFontConfigItem::Notify( cons + /* + * DefaultFontConfigItem::getValues + */ +-#ifdef DEBUG_TIMING +-static double fTimeCorrection = 0.0; +-#define START_TIMING() osl_getSystemTime( &aTmpTV1 ); +-#define END_TIMING()\ +- osl_getSystemTime( &aTmpTV2 );\ +- fTmp = (double)aTmpTV2.Seconds + 1e-9*(double)aTmpTV2.Nanosec - (double)aTmpTV1.Seconds -1e-9*(double)aTmpTV1.Nanosec;\ +- if( fTmp > 0.0005 )\ +- fConfigTime += fTmp;\ +- else\ +- fprintf( stderr, "warning: timining inaccurate: %g\n", fTmp ); +- +-#else +-#define START_TIMING() +-#define END_TIMING() +-#endif +- + void DefaultFontConfigItem::getValues() + { + if( ! IsValidConfigMgr() ) + return; + +-#ifdef DEBUG_TIMING +- static bool bOnce = false; +- TimeValue aStart; +- TimeValue aStop; +- TimeValue aTmpTV1, aTmpTV2; +- double fConfigTime = 0.0; +- double fTmp; +- if( ! bOnce ) +- { +- bOnce = true; +- START_TIMING(); +- for( int i = 0; i < 100000; i++ ) +- osl_getSystemTime( &aStop ); +- END_TIMING(); +- fTimeCorrection = fTmp/100000.0; +- fprintf( stderr, "osl_getSystemTime takes an average of %g seconds\n", fTimeCorrection ); +- } +- osl_getSystemTime( &aStart ); +- fConfigTime = 0.0; +-#endif +- + m_aDefaults.clear(); + + int i, j; +- START_TIMING(); + Sequence< OUString > aNames( GetNodeNames( OUString() ) ); +- END_TIMING(); + for( j = 0; j < aNames.getLength(); j++ ) + { +-#if OSL_DEBUG_LEVEL > 1 +- fprintf( stderr, "found localized default font data for \"%s\"\n", +- OUStringToOString( aNames.getConstArray()[j], RTL_TEXTENCODING_ASCII_US ).getStr() +- ); +-#endif + String aKeyName( aNames.getConstArray()[j] ); +- START_TIMING(); + Sequence< OUString > aKeys( GetNodeNames( aKeyName ) ); +- END_TIMING(); + Sequence< OUString > aLocaleKeys( aKeys.getLength() ); + const OUString* pFrom = aKeys.getConstArray(); + OUString* pTo = aLocaleKeys.getArray(); +@@ -343,10 +302,26 @@ void DefaultFontConfigItem::getValues() + aName.Append( String( pFrom[m] ) ); + pTo[m] = aName; + } +- START_TIMING(); + Sequence< Any > aValues( GetProperties( aLocaleKeys ) ); +- END_TIMING(); +- int nLanguageType = ConvertIsoStringToLanguage( aNames.getConstArray()[j], '-' ); ++ Locale aLocale; ++ sal_Int32 nIndex = 0; ++ const OUString* pIso = aNames.getConstArray() + j; ++ aLocale.Language = pIso->getToken( 0, '-', nIndex ).toAsciiLowerCase(); ++ if( nIndex > 0 ) ++ { ++ aLocale.Country = pIso->getToken( 0, '-', nIndex ).toAsciiLowerCase(); ++ if( nIndex > 0 ) ++ aLocale.Variant = pIso->copy( nIndex ).toAsciiLowerCase(); ++ } ++#if OSL_DEBUG_LEVEL > 2 ++ fprintf( stderr, "found localized default font data for \"%s\" = %s-%s-%s\n", ++ OUStringToOString( *pIso, osl_getThreadTextEncoding() ).getStr(), ++ OUStringToOString( aLocale.Language, osl_getThreadTextEncoding() ).getStr(), ++ OUStringToOString( aLocale.Country, osl_getThreadTextEncoding() ).getStr(), ++ OUStringToOString( aLocale.Variant, osl_getThreadTextEncoding() ).getStr() ++ ++ ); ++#endif + const Any* pValue = aValues.getConstArray(); + for( i = 0; i < aValues.getLength(); i++, pValue++ ) + { +@@ -354,8 +329,8 @@ void DefaultFontConfigItem::getValues() + { + const OUString* pLine = (const OUString*)pValue->getValue(); + if( pLine->getLength() ) +- m_aDefaults[ nLanguageType ][ getKeyType( aKeys.getConstArray()[i] ) ] = *pLine; +-#if OSL_DEBUG_LEVEL > 1 ++ m_aDefaults[ aLocale ][ getKeyType( aKeys.getConstArray()[i] ) ] = *pLine; ++#if OSL_DEBUG_LEVEL > 2 + fprintf( stderr, " \"%s\"=\"%.30s\"\n", + OUStringToOString( aKeys.getConstArray()[i], RTL_TEXTENCODING_ASCII_US ).getStr(), + OUStringToOString( *pLine, RTL_TEXTENCODING_ASCII_US ).getStr() +@@ -364,36 +339,37 @@ void DefaultFontConfigItem::getValues() + } + } + } +-#ifdef DEBUG_TIMING +- osl_getSystemTime( &aStop ); +- double fElapse = (double)aStop.Seconds + 1e-9*(double)aStop.Nanosec; +- fElapse -= (double)aStart.Seconds + 1e-9*(double)aStart.Nanosec; +- fprintf( stderr, "DefaultFontConfigItem::getValues needed %g seconds\n", fElapse ); +- fprintf( stderr, "time spent in configuration: %g seconds (%g%%)\n", fConfigTime, fConfigTime/fElapse*100.0 ); +-#endif + } + + /* + * DefaultFontConfigItem::getDefaultFont + */ + +-const OUString& DefaultFontConfigItem::getDefaultFont( int nLanguage, int nType ) const ++const OUString& DefaultFontConfigItem::getDefaultFont( const Locale& rLocale, int nType ) const + { +- ::std::map< int, ::std::map< int, OUString > >::const_iterator lang = m_aDefaults.find( nLanguage ); ++ Locale aLocale; ++ aLocale.Language = rLocale.Language.toAsciiLowerCase(); ++ aLocale.Country = rLocale.Country.toAsciiLowerCase(); ++ aLocale.Variant = rLocale.Variant.toAsciiLowerCase(); ++ std::hash_map< Locale, std::hash_map< int, OUString >, vcl::LocaleHash >::const_iterator lang = m_aDefaults.find( aLocale ); + if( lang == m_aDefaults.end() || lang->second.find( nType ) == lang->second.end() ) + { +- String aLang, aCountry; +- ConvertLanguageToIsoNames( nLanguage, aLang, aCountry ); +- nLanguage = ConvertIsoStringToLanguage( aLang ); +- lang = m_aDefaults.find( nLanguage ); ++ aLocale.Variant = OUString(); ++ lang = m_aDefaults.find( aLocale ); + if( lang == m_aDefaults.end() || lang->second.find( nType ) == lang->second.end() ) + { +- nLanguage = LANGUAGE_ENGLISH; +- lang = m_aDefaults.find( nLanguage ); ++ aLocale.Country = OUString(); ++ ++ lang = m_aDefaults.find( aLocale ); + if( lang == m_aDefaults.end() || lang->second.find( nType ) == lang->second.end() ) + { +- static OUString aEmpty; +- return aEmpty; ++ aLocale.Language = OUString( RTL_CONSTASCII_USTRINGPARAM( "en" ) ); ++ lang = m_aDefaults.find( aLocale ); ++ if( lang == m_aDefaults.end() || lang->second.find( nType ) == lang->second.end() ) ++ { ++ static OUString aEmpty; ++ return aEmpty; ++ } + } + } + } +@@ -404,11 +380,17 @@ const OUString& DefaultFontConfigItem::g + * DefaultFontConfigItem::getUserInterfaceFont + */ + +-const OUString& DefaultFontConfigItem::getUserInterfaceFont( int nLanguage ) const ++const OUString& DefaultFontConfigItem::getUserInterfaceFont( const Locale& rLocale ) const + { +- if( nLanguage == LANGUAGE_SYSTEM ) +- nLanguage = Application::GetSettings().GetUILanguage(); +- const OUString& aUIFont = getDefaultFont( nLanguage, DEFAULTFONT_UI_SANS ); ++ Locale aLocale; ++ aLocale.Language = rLocale.Language.toAsciiLowerCase(); ++ aLocale.Country = rLocale.Country.toAsciiLowerCase(); ++ aLocale.Variant = rLocale.Variant.toAsciiLowerCase(); ++ ++ if( ! aLocale.Language.getLength() ) ++ aLocale = Application::GetSettings().GetUILocale(); ++ ++ const OUString& aUIFont = getDefaultFont( aLocale, DEFAULTFONT_UI_SANS ); + + if( aUIFont.getLength() ) + return aUIFont; +@@ -464,63 +446,43 @@ const OUString& DefaultFontConfigItem::g + static const OUString aFallBackKorean( aFallBackKoreanLocalized ); + + // optimize font list for some locales, as long as Andale Sans UI does not support them +- switch( nLanguage ) ++ if( aLocale.Language.equalsAscii( "ar" ) || ++ aLocale.Language.equalsAscii( "he" ) || ++ aLocale.Language.equalsAscii( "iw" ) ) + { +- case LANGUAGE_ARABIC: +- case LANGUAGE_ARABIC_SAUDI_ARABIA: +- case LANGUAGE_ARABIC_IRAQ: +- case LANGUAGE_ARABIC_EGYPT: +- case LANGUAGE_ARABIC_LIBYA: +- case LANGUAGE_ARABIC_ALGERIA: +- case LANGUAGE_ARABIC_MOROCCO: +- case LANGUAGE_ARABIC_TUNISIA: +- case LANGUAGE_ARABIC_OMAN: +- case LANGUAGE_ARABIC_YEMEN: +- case LANGUAGE_ARABIC_SYRIA: +- case LANGUAGE_ARABIC_JORDAN: +- case LANGUAGE_ARABIC_LEBANON: +- case LANGUAGE_ARABIC_KUWAIT: +- case LANGUAGE_ARABIC_UAE: +- case LANGUAGE_ARABIC_BAHRAIN: +- case LANGUAGE_ARABIC_QATAR: +- case LANGUAGE_HEBREW: +- return aFallBackArabic; +- break; +- case LANGUAGE_THAI: +- return aFallBackThai; +- break; +- case LANGUAGE_KOREAN: +- case LANGUAGE_KOREAN_JOHAB: +- return aFallBackKorean; +- break; +- // latin-2 (use luxi before vera) +- case LANGUAGE_CZECH: +- case LANGUAGE_HUNGARIAN: +- case LANGUAGE_POLISH: +- case LANGUAGE_ROMANIAN: +- case LANGUAGE_CROATIAN: +- case LANGUAGE_SLOVAK: +- case LANGUAGE_SLOVENIAN: +- case LANGUAGE_SORBIAN: +- return aFallbackLatin2; +- break; +- +- case LANGUAGE_CHINESE: +- case LANGUAGE_CHINESE_SIMPLIFIED: ++ return aFallBackArabic; ++ } ++ else if( aLocale.Language.equalsAscii( "th" ) ) ++ { ++ return aFallBackThai; ++ } ++ else if( aLocale.Language.equalsAscii( "ko" ) ) ++ { ++ return aFallBackKorean; ++ } ++ else if( aLocale.Language.equalsAscii( "cs" ) || ++ aLocale.Language.equalsAscii( "hu" ) || ++ aLocale.Language.equalsAscii( "pl" ) || ++ aLocale.Language.equalsAscii( "ro" ) || ++ aLocale.Language.equalsAscii( "rm" ) || ++ aLocale.Language.equalsAscii( "hr" ) || ++ aLocale.Language.equalsAscii( "sk" ) || ++ aLocale.Language.equalsAscii( "sl" ) || ++ aLocale.Language.equalsAscii( "sb" ) ) ++ { ++ return aFallbackLatin2; ++ } ++ else if( aLocale.Language.equalsAscii( "zh" ) ) ++ { ++ if( ! aLocale.Country.equalsAscii( "cn" ) ) ++ return aFallBackChineseTRD; ++ else + return aFallBackChineseSIM; +- break; +- case LANGUAGE_CHINESE_TRADITIONAL: +- case LANGUAGE_CHINESE_HONGKONG: +- case LANGUAGE_CHINESE_SINGAPORE: +- case LANGUAGE_CHINESE_MACAU: +- return aFallBackChineseTRD; +- break; +- case LANGUAGE_JAPANESE: +- return aFallBackJapanese; +- break; +- default: +- break; +- } ++ } ++ else if( aLocale.Language.equalsAscii( "ja" ) ) ++ { ++ return aFallBackJapanese; ++ } + + return aFallback; + } +@@ -529,12 +491,17 @@ const OUString& DefaultFontConfigItem::g + * DefaultFontConfigItem::setDefaultFont + */ + +-void DefaultFontConfigItem::setDefaultFont( int nLanguage, int nType, const OUString& rFont ) ++void DefaultFontConfigItem::setDefaultFont( const Locale& rLocale, int nType, const OUString& rFont ) + { +- bool bModified = m_aDefaults[ nLanguage ][ nType ] != rFont; ++ Locale aLocale; ++ aLocale.Language = rLocale.Language.toAsciiLowerCase(); ++ aLocale.Country = rLocale.Country.toAsciiLowerCase(); ++ aLocale.Variant = rLocale.Variant.toAsciiLowerCase(); ++ ++ bool bModified = m_aDefaults[ aLocale ][ nType ] != rFont; + if( bModified ) + { +- m_aDefaults[ nLanguage ][ nType ] = rFont; ++ m_aDefaults[ aLocale ][ nType ] = rFont; + SetModified(); + } + } +@@ -922,7 +889,7 @@ static BOOL ImplFindAndErase( String& rN + // ======================================================================= + + void FontSubstConfigItem::getMapName( const String& rOrgName, String& rShortName, +- String& rFamilyName, FontWeight& rWeight, FontWidth& rWidth, unsigned long& rType ) ++ String& rFamilyName, FontWeight& rWeight, FontWidth& rWidth, ULONG& rType ) + { + rShortName = rOrgName; + +@@ -1072,54 +1039,62 @@ void FontSubstConfigItem::getValues() + if( ! IsValidConfigMgr() ) + return; + +-#ifdef DEBUG_TIMING +- TimeValue aStart; +- TimeValue aStop; +- TimeValue aTmpTV1, aTmpTV2; +- osl_getSystemTime( &aStart ); +- +- double fConfigTime = 0.0; +- double fTmp; +-#endif +- +- START_TIMING(); + Sequence< OUString > aLocales( GetNodeNames( OUString( ) ) ); +- END_TIMING(); + for( int j = 0; j < aLocales.getLength(); j++ ) + { +- String aKeyName( aLocales.getConstArray()[j] ); +- int nLanguageType = ConvertIsoStringToLanguage( aLocales.getConstArray()[j], '-' ); +- START_TIMING(); +- Sequence< OUString > aSubstFonts( GetNodeNames( aKeyName ) ); +- END_TIMING(); +-#if OSL_DEBUG_LEVEL > 1 ++ const OUString* pIso = aLocales.getConstArray() +j; ++ Locale aLocale; ++ sal_Int32 nIndex = 0; ++ aLocale.Language = pIso->getToken( 0, '-', nIndex ).toAsciiLowerCase(); ++ if( nIndex > 0 ) ++ { ++ aLocale.Country = pIso->getToken( 0, '-', nIndex ).toAsciiLowerCase(); ++ if( nIndex > 0 ) ++ aLocale.Variant = pIso->copy( nIndex ).toAsciiLowerCase(); ++ } ++ Sequence< OUString > aSubstFonts( GetNodeNames( *pIso ) ); ++#if OSL_DEBUG_LEVEL > 2 + fprintf( stderr, "reading %d font substitutions for locale %s\n", + aSubstFonts.getLength(), +- ByteString( aKeyName, RTL_TEXTENCODING_ASCII_US ).GetBuffer() ); ++ OUStringToOString( *pIso, RTL_TEXTENCODING_ASCII_US ).getStr() ); + #endif + for( int i = 0; i < aSubstFonts.getLength(); i++ ) + { + FontNameAttr aAttributes; + aAttributes.Name = aSubstFonts.getConstArray()[i]; + +- String aFontKey( aKeyName ); +- aFontKey.Append( '/' ); ++ OUStringBuffer aFontKey( 128 ); ++ aFontKey.append( *pIso ); ++ aFontKey.append( sal_Unicode('/') ); + // must use the wrapped name in config paths due to non-ASCII chars (eg korean font names) !!! +- String wrappedName = wrapConfigurationElementName( aAttributes.Name ); +- aFontKey.Append( wrappedName ); ++ OUString wrappedName = wrapConfigurationElementName( aAttributes.Name ); ++ aFontKey.append( wrappedName ); + Sequence< OUString > aKeys( 7 ); + OUString* pKeys = aKeys.getArray(); +- aFontKey.Append( '/' ); +- pKeys[0] = aFontKey.Copy().AppendAscii( "SubstFonts" ); +- pKeys[1] = aFontKey.Copy().AppendAscii( "SubstFontsMS" ); +- pKeys[2] = aFontKey.Copy().AppendAscii( "SubstFontsPS" ); +- pKeys[3] = aFontKey.Copy().AppendAscii( "SubstFontsHTML" ); +- pKeys[4] = aFontKey.Copy().AppendAscii( "FontWidth" ); +- pKeys[5] = aFontKey.Copy().AppendAscii( "FontWeight" ); +- pKeys[6] = aFontKey.Copy().AppendAscii( "FontType" ); +- START_TIMING(); ++ aFontKey.append( sal_Unicode('/') ); ++ OUString aPath = aFontKey.makeStringAndClear(); ++ aFontKey.append( aPath ); ++ aFontKey.appendAscii( "SubstFonts" ); ++ pKeys[0] = aFontKey.makeStringAndClear(); ++ aFontKey.append( aPath ); ++ aFontKey.appendAscii( "SubstFontsMS" ); ++ pKeys[1] = aFontKey.makeStringAndClear(); ++ aFontKey.append( aPath ); ++ aFontKey.appendAscii( "SubstFontsPS" ); ++ pKeys[2] = aFontKey.makeStringAndClear(); ++ aFontKey.append( aPath ); ++ aFontKey.appendAscii( "SubstFontsHTML" ); ++ pKeys[3] = aFontKey.makeStringAndClear(); ++ aFontKey.append( aPath ); ++ aFontKey.appendAscii( "FontWidth" ); ++ pKeys[4] = aFontKey.makeStringAndClear(); ++ aFontKey.append( aPath ); ++ aFontKey.appendAscii( "FontWeight" ); ++ pKeys[5] = aFontKey.makeStringAndClear(); ++ aFontKey.append( aPath ); ++ aFontKey.appendAscii( "FontType" ); ++ pKeys[6] = aFontKey.makeStringAndClear(); + Sequence< Any > aValues( GetProperties( aKeys ) ); +- END_TIMING(); + const Any* pValues = aValues.getConstArray(); + sal_Int32 nIndex = 0, width = -1, weight = -1, type = 0; + const OUString* pLine; +@@ -1226,20 +1201,13 @@ void FontSubstConfigItem::getValues() + } + aAttributes.Type = type; + +- m_aSubstitutions[nLanguageType].push_back( aAttributes ); ++ m_aSubstitutions[aLocale].push_back( aAttributes ); + } +- ::std::sort( m_aSubstitutions[nLanguageType].begin(), m_aSubstitutions[nLanguageType].end(), StrictStringSort() ); ++ std::sort( m_aSubstitutions[aLocale].begin(), m_aSubstitutions[aLocale].end(), StrictStringSort() ); + } +-#ifdef DEBUG_TIMING +- osl_getSystemTime( &aStop ); +- double fElapse = (double)aStop.Seconds + 1e-9*(double)aStop.Nanosec; +- fElapse -= (double)aStart.Seconds + 1e-9*(double)aStart.Nanosec; +- fprintf( stderr, "FontSubstConfigItem::getValues needed %g seconds\n", fElapse ); +- fprintf( stderr, "time spent in configuration: %g seconds (%g%%)\n", fConfigTime, fConfigTime/fElapse*100.0 ); +-#endif + } + +-const FontSubstConfigItem::FontNameAttr* FontSubstConfigItem::getSubstInfo( const String& rFontName, int nLanguage ) const ++const FontSubstConfigItem::FontNameAttr* FontSubstConfigItem::getSubstInfo( const String& rFontName, const Locale& rLocale ) const + { + if( !rFontName.Len() ) + return NULL; +@@ -1250,9 +1218,18 @@ const FontSubstConfigItem::FontNameAttr* + aSearchFont.ToLowerAscii(); + FontNameAttr aSearchAttr; + aSearchAttr.Name = aSearchFont; +- for( int i = 0; i < 3; i++ ) ++ ++ Locale aLocale; ++ aLocale.Language = rLocale.Language.toAsciiLowerCase(); ++ aLocale.Country = rLocale.Country.toAsciiLowerCase(); ++ aLocale.Variant = rLocale.Variant.toAsciiLowerCase(); ++ ++ if( ! aLocale.Language.getLength() ) ++ aLocale = Application::GetSettings().GetUILocale(); ++ ++ while( aLocale.Language.getLength() ) + { +- ::std::map< int, ::std::vector< FontNameAttr > >::const_iterator lang = m_aSubstitutions.find( nLanguage ); ++ std::hash_map< Locale, std::vector< FontNameAttr >, LocaleHash >::const_iterator lang = m_aSubstitutions.find( aLocale ); + if( lang != m_aSubstitutions.end() ) + { + // try to find an exact match +@@ -1261,22 +1238,15 @@ const FontSubstConfigItem::FontNameAttr* + if( it != lang->second.end() && aSearchFont.CompareTo( it->Name, aSearchFont.Len() ) == COMPARE_EQUAL ) + return &(*it); + } +- switch( i ) +- { +- case 0: +- { +- String aLang, aCountry; +- ConvertLanguageToIsoNames( nLanguage, aLang, aCountry ); +- int nNewLanguage = ConvertIsoStringToLanguage( aLang ); +- if( nNewLanguage == nLanguage || nNewLanguage == LANGUAGE_DONTKNOW || nNewLanguage == LANGUAGE_NONE ) +- nNewLanguage = LANGUAGE_ENGLISH; +- nLanguage = nNewLanguage; +- } +- break; +- case 1: +- nLanguage = LANGUAGE_ENGLISH; +- break; +- } ++ // gradually become more unspecific ++ if( aLocale.Variant.getLength() ) ++ aLocale.Variant = OUString(); ++ else if( aLocale.Country.getLength() ) ++ aLocale.Country = OUString(); ++ else if( ! aLocale.Language.equalsAscii( "en" ) ) ++ aLocale.Language = OUString( RTL_CONSTASCII_USTRINGPARAM( "en" ) ); ++ else ++ aLocale.Language = OUString(); + } + return NULL; + } +@@ -1324,7 +1294,7 @@ void SettingsConfigItem::Commit() + if( ! IsValidConfigMgr() ) + return; + +- ::std::hash_map< OUString, ::std::hash_map< OUString, OUString, OUStringHash >, OUStringHash >::const_iterator group; ++ std::hash_map< OUString, std::hash_map< OUString, OUString, OUStringHash >, OUStringHash >::const_iterator group; + + for( group = m_aSettings.begin(); group != m_aSettings.end(); ++group ) + { +@@ -1333,7 +1303,7 @@ void SettingsConfigItem::Commit() + Sequence< PropertyValue > aValues( group->second.size() ); + PropertyValue* pValues = aValues.getArray(); + int nIndex = 0; +- ::std::hash_map< OUString, OUString, OUStringHash >::const_iterator it; ++ std::hash_map< OUString, OUString, OUStringHash >::const_iterator it; + for( it = group->second.begin(); it != group->second.end(); ++it ) + { + String aName( aKeyName ); +@@ -1372,7 +1342,7 @@ void SettingsConfigItem::getValues() + Sequence< OUString > aNames( GetNodeNames( OUString() ) ); + for( j = 0; j < aNames.getLength(); j++ ) + { +-#if OSL_DEBUG_LEVEL > 1 ++#if OSL_DEBUG_LEVEL > 2 + fprintf( stderr, "found settings data for \"%s\"\n", + OUStringToOString( aNames.getConstArray()[j], RTL_TEXTENCODING_ASCII_US ).getStr() + ); +@@ -1398,7 +1368,7 @@ void SettingsConfigItem::getValues() + const OUString* pLine = (const OUString*)pValue->getValue(); + if( pLine->getLength() ) + m_aSettings[ aKeyName ][ pFrom[i] ] = *pLine; +-#if OSL_DEBUG_LEVEL > 1 ++#if OSL_DEBUG_LEVEL > 2 + fprintf( stderr, " \"%s\"=\"%.30s\"\n", + OUStringToOString( aKeys.getConstArray()[i], RTL_TEXTENCODING_ASCII_US ).getStr(), + OUStringToOString( *pLine, RTL_TEXTENCODING_ASCII_US ).getStr() +Index: vcl/source/gdi/fontcvt.cxx +=================================================================== +RCS file: /cvs/gsl/vcl/source/gdi/fontcvt.cxx,v +retrieving revision 1.13 +retrieving revision 1.14 +diff -u -p -u -r1.13 -r1.14 +--- vcl/source/gdi/fontcvt.cxx 10 Jun 2002 11:06:06 -0000 1.13 ++++ vcl/source/gdi/fontcvt.cxx 6 Jan 2004 13:37:42 -0000 1.14 +@@ -67,16 +67,16 @@ + #include <outdev.h> + #endif + +-#ifndef __SGI_STL_MAP ++#ifndef _STLP_MAP + #include <map> + #endif +-#ifndef __SGI_STL_VECTOR ++#ifndef _STLP_VECTOR + #include <vector> + #endif +-#ifndef __SGI_STL_ALGORITHM ++#ifndef _STLP_ALGORITHM + #include <algorithm> + #endif +-#ifndef __SGI_STL_FUNCTIONAL ++#ifndef _STLP_FUNCTIONAL + #include <functional> + #endif + +@@ -1233,13 +1233,9 @@ StarSymbolToMSMultiFontImpl::StarSymbolT + for (aEntry.cIndex = 0xFF; aEntry.cIndex >= 0x20; --aEntry.cIndex) + { + if (sal_Unicode cChar = r.pTab[aEntry.cIndex-0x20]) +-#if 1 + maMagicMap.insert( + ::std::multimap<sal_Unicode, SymbolEntry>::value_type( + cChar, aEntry)); +-#else +- maMagicMap.insert(::std::make_pair(cChar, aEntry)); +-#endif + } + } + +@@ -1270,14 +1266,9 @@ StarSymbolToMSMultiFontImpl::StarSymbolT + for (int j = r.mnSize / sizeof(r.mpTable[0]); j >=0; --j) + { + aEntry.cIndex = r.mpTable[j].cMS; +-#if 1 + maMagicMap.insert( + ::std::multimap<sal_Unicode, SymbolEntry>::value_type( + r.mpTable[j].cStar, aEntry)); +-#else +- maMagicMap.insert(::std::make_pair(r.mpTable[j].cStar,aEntry)); +-#endif +- + } + } + } +@@ -1317,11 +1308,7 @@ String StarSymbolToMSMultiFontImpl::Conv + String StarSymbolToMSMultiFontImpl::ConvertString(String &rString, + xub_StrLen& rIndex) + { +-#if 1 + typedef ::std::multimap<sal_Unicode, SymbolEntry>::iterator MI; +-#else +- typedef ::std::multimap<sal_Unicode, SymbolEntry>::const_iterator MI; +-#endif + typedef ::std::pair<MI, MI> Result; + + String sRet; +Index: vcl/source/gdi/gdimtf.cxx +=================================================================== +RCS file: /cvs/gsl/vcl/source/gdi/gdimtf.cxx,v +retrieving revision 1.9 +retrieving revision 1.10 +diff -u -p -u -r1.9 -r1.10 +--- vcl/source/gdi/gdimtf.cxx 18 Nov 2002 13:44:33 -0000 1.9 ++++ vcl/source/gdi/gdimtf.cxx 6 Jan 2004 13:38:14 -0000 1.10 +@@ -59,8 +59,6 @@ + * + ************************************************************************/ + +-#define _SV_GDIMTF_CXX +- + #ifndef _VOS_MACROS_HXX_ + #include <vos/macros.hxx> + #endif +@@ -1174,8 +1172,6 @@ void GDIMetaFile::Rotate( long nAngle10 + case( META_GRADIENTEX_ACTION ): + { + MetaGradientExAction* pAct = (MetaGradientExAction*) pAction; +- Gradient aGradient( ); +- + aMtf.AddAction( new MetaGradientExAction( ImplGetRotatedPolyPolygon( pAct->GetPolyPolygon(), aRotAnchor, aRotOffset, fSin, fCos ), + pAct->GetGradient() ) ); + } +@@ -2178,7 +2174,6 @@ SvStream& operator>>( SvStream& rIStm, G + char aId[ 7 ]; + ULONG nStmPos = rIStm.Tell(); + USHORT nOldFormat = rIStm.GetNumberFormatInt(); +- BOOL bError = FALSE; + + rIStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN ); + +Index: vcl/source/gdi/gfxlink.cxx +=================================================================== +RCS file: /cvs/gsl/vcl/source/gdi/gfxlink.cxx,v +retrieving revision 1.9 +retrieving revision 1.10 +diff -u -p -u -r1.9 -r1.10 +--- vcl/source/gdi/gfxlink.cxx 24 Jun 2003 07:32:36 -0000 1.9 ++++ vcl/source/gdi/gfxlink.cxx 6 Jan 2004 13:39:16 -0000 1.10 +@@ -79,9 +79,9 @@ + + GfxLink::GfxLink() : + meType ( GFX_LINK_TYPE_NONE ), +- mnBufSize ( 0 ), + mpBuf ( NULL ), + mpSwap ( NULL ), ++ mnBufSize ( 0 ), + mnUserId ( 0UL ), + mpImpData ( new ImpGfxLink ) + { +Index: vcl/source/gdi/gradient.cxx +=================================================================== +RCS file: /cvs/gsl/vcl/source/gdi/gradient.cxx,v +retrieving revision 1.1.1.1 +retrieving revision 1.2 +diff -u -p -u -r1.1.1.1 -r1.2 +--- vcl/source/gdi/gradient.cxx 18 Sep 2000 17:05:37 -0000 1.1.1.1 ++++ vcl/source/gdi/gradient.cxx 6 Jan 2004 13:39:43 -0000 1.2 +@@ -58,8 +58,6 @@ + * + * + ************************************************************************/ +- +-#define _SV_GRADIENT_CXX + + #ifndef _STREAM_HXX + #include <tools/stream.hxx> +Index: vcl/source/gdi/graph.cxx +=================================================================== +RCS file: /cvs/gsl/vcl/source/gdi/graph.cxx,v +retrieving revision 1.5 +retrieving revision 1.7 +diff -u -p -u -r1.5 -r1.7 +--- vcl/source/gdi/graph.cxx 27 Mar 2003 17:57:57 -0000 1.5 ++++ vcl/source/gdi/graph.cxx 20 Apr 2004 13:54:00 -0000 1.7 +@@ -59,8 +59,6 @@ + * + ************************************************************************/ + +-#define _SV_GRAPH_CXX +- + #ifndef _SV_IMPGRAPH_HXX + #include <impgraph.hxx> + #endif +@@ -446,14 +444,28 @@ BitmapEx Graphic::GetBitmapEx() const + + Bitmap Graphic::GetBitmap( const Size* pSizePixel ) const + { +- return mpImpGraphic->ImplGetBitmap( pSizePixel ); ++ return mpImpGraphic->ImplGetBitmap( pSizePixel, FALSE ); + } + + // ------------------------------------------------------------------------ + + BitmapEx Graphic::GetBitmapEx( const Size* pSizePixel ) const + { +- return mpImpGraphic->ImplGetBitmapEx( pSizePixel ); ++ return mpImpGraphic->ImplGetBitmapEx( pSizePixel, FALSE ); ++} ++ ++// ------------------------------------------------------------------------ ++ ++Bitmap Graphic::GetUnlimitedBitmap( const Size* pSizePixel ) const ++{ ++ return mpImpGraphic->ImplGetBitmap( pSizePixel, TRUE ) ; ++} ++ ++// ------------------------------------------------------------------------ ++ ++BitmapEx Graphic::GetUnlimitedBitmapEx( const Size* pSizePixel ) const ++{ ++ return mpImpGraphic->ImplGetBitmapEx( pSizePixel, TRUE ) ; + } + + // ------------------------------------------------------------------------ +@@ -507,7 +519,7 @@ Size Graphic::GetSizePixel( const Output + Size aRet; + + if( GRAPHIC_BITMAP == mpImpGraphic->ImplGetType() ) +- aRet = mpImpGraphic->ImplGetBitmapEx( NULL ).GetSizePixel(); ++ aRet = mpImpGraphic->ImplGetBitmapEx( NULL, FALSE ).GetSizePixel(); + else + aRet = ( pRefDevice ? pRefDevice : Application::GetDefaultDevice() )->LogicToPixel( GetPrefSize(), GetPrefMapMode() ); + +Index: vcl/source/gdi/hatch.cxx +=================================================================== +RCS file: /cvs/gsl/vcl/source/gdi/hatch.cxx,v +retrieving revision 1.1.1.1 +retrieving revision 1.2 +diff -u -p -u -r1.1.1.1 -r1.2 +--- vcl/source/gdi/hatch.cxx 18 Sep 2000 17:05:37 -0000 1.1.1.1 ++++ vcl/source/gdi/hatch.cxx 6 Jan 2004 13:40:40 -0000 1.2 +@@ -58,8 +58,6 @@ + * + * + ************************************************************************/ +- +-#define _SV_HATCH_CXX + + #ifndef _STREAM_HXX + #include <tools/stream.hxx> + +Index: vcl/source/gdi/impanmvw.cxx +=================================================================== +RCS file: /cvs/gsl/vcl/source/gdi/impanmvw.cxx,v +retrieving revision 1.1.1.1 +retrieving revision 1.3 +diff -u -p -u -r1.1.1.1 -r1.3 +--- vcl/source/gdi/impanmvw.cxx 18 Sep 2000 17:05:37 -0000 1.1.1.1 ++++ vcl/source/gdi/impanmvw.cxx 6 Jan 2004 13:42:16 -0000 1.3 +@@ -59,8 +59,6 @@ + * + ************************************************************************/ + +-#define _SV_IMPANMVW_CXX +- + #define private public + + #include "impanmvw.hxx" +@@ -78,11 +76,11 @@ ImplAnimView::ImplAnimView( Animation* p + OutputDevice* pFirstFrameOutDev ) : + mpParent ( pParent ), + mpOut ( pFirstFrameOutDev ? pFirstFrameOutDev : pOut ), ++ mnExtraData ( nExtraData ), + maPt ( rPt ), + maSz ( rSz ), +- maClip ( mpOut->GetClipRegion() ), + maSzPix ( mpOut->LogicToPixel( maSz ) ), +- mnExtraData ( nExtraData ), ++ maClip ( mpOut->GetClipRegion() ), + mpBackground ( new VirtualDevice ), + mpRestore ( new VirtualDevice ), + meLastDisposal ( DISPOSE_BACK ), +@@ -345,10 +343,8 @@ void ImplAnimView::ImplDraw( ULONG nPos, + + delete pDev; + +-#ifndef REMOTE_APPSERVER + if( mpOut->GetOutDevType() == OUTDEV_WINDOW ) + ( (Window*) mpOut )->Sync(); +-#endif + } + } + } +Index: vcl/source/gdi/impbmp.cxx +=================================================================== +RCS file: /cvs/gsl/vcl/source/gdi/impbmp.cxx,v +retrieving revision 1.1.1.1 +retrieving revision 1.4 +diff -u -p -u -r1.1.1.1 -r1.4 +--- vcl/source/gdi/impbmp.cxx 18 Sep 2000 17:05:37 -0000 1.1.1.1 ++++ vcl/source/gdi/impbmp.cxx 6 Jan 2004 13:42:38 -0000 1.4 +@@ -59,26 +59,19 @@ + * + ************************************************************************/ + +-#define _SV_IMPBMP_CXX +- +-#ifndef REMOTE_APPSERVER + #ifndef _SV_SVSYS_HXX + #include <svsys.h> + #endif + #ifndef _SV_SALBMP_HXX + #include <salbmp.hxx> + #endif +-#else +-#include <indbmp.hxx> +-#ifndef _SV_RMBITMAP_HXX +-#include <rmbitmap.hxx> +-#endif +-#endif + #ifndef _DEBUG_HXX + #include <tools/debug.hxx> + #endif + #include <impbmp.hxx> + #include <bitmap.hxx> ++#include <svdata.hxx> ++#include <salinst.hxx> + + // -------------- + // - ImpBitmap - +@@ -88,11 +81,7 @@ ImpBitmap::ImpBitmap() : + mnRefCount ( 1UL ), + mnChecksum ( 0UL ), + mpRMBitmap ( NULL ), +-#ifndef REMOTE_APPSERVER +- mpSalBitmap ( new SalBitmap ) +-#else +- mpSalBitmap ( new ImplServerBitmap ) +-#endif ++ mpSalBitmap ( ImplGetSVData()->mpDefInst->CreateSalBitmap() ) + { + } + +@@ -100,18 +89,11 @@ ImpBitmap::ImpBitmap() : + + ImpBitmap::~ImpBitmap() + { +-#ifdef REMOTE_APPSERVER +- ImplReleaseRemoteBmp(); +-#endif + delete mpSalBitmap; + } + + // ----------------------------------------------------------------------- +-#ifndef REMOTE_APPSERVER + void ImpBitmap::ImplSetSalBitmap( SalBitmap* pBitmap ) +-#else +-void ImpBitmap::ImplSetSalBitmap( ImplServerBitmap* pBitmap ) +-#endif + { + delete mpSalBitmap, mpSalBitmap = pBitmap; + } +@@ -195,115 +164,4 @@ void ImpBitmap::ImplReleaseBuffer( Bitma + + if( !bReadOnly ) + mnChecksum = 0; +-} +- +-#ifdef REMOTE_APPSERVER +- +-RMBitmap* ImpBitmap::ImplGetRemoteBmp() +-{ +- return mpRMBitmap; +-} +- +-// ----------------------------------------------------------------------- +- +-void ImpBitmap::ImplCreateRemoteBmp( const Bitmap& rBitmap ) +-{ +- DBG_ASSERT( !mpRMBitmap, "ImplCreateRemoteBmp( Bitmap& rBitmap )???" ); +- +- mpRMBitmap = new RMBitmap( &(Bitmap&) rBitmap ); +- mpRMBitmap->Create(); +-} +- +-// ----------------------------------------------------------------------- +- +-void ImpBitmap::ImplCreateRemoteBmp( const Bitmap& rBitmap, +- OutputDevice* pOut, +- const Point& rPt, const Size& rSz ) +-{ +- DBG_ASSERT( !mpRMBitmap, "ImplCreateRemoteBmp( Bitmap& rBitmap )???" ); +- +- mpRMBitmap = new RMBitmap( &(Bitmap&) rBitmap ); +- mpRMBitmap->CreateGet( pOut, rPt, rSz ); +-} +- +-// ----------------------------------------------------------------------- +- +-void ImpBitmap::ImplReleaseRemoteBmp() +-{ +- delete mpRMBitmap; +- mpRMBitmap = NULL; +-} +- +-// ----------------------------------------------------------------------- +- +-void ImpBitmap::ImplDrawRemoteBmp( OutputDevice* pOut, +- const Point& rSrcPt, const Size& rSrcSz, +- const Point& rDestPt, const Size& rDestSz ) +-{ +- if( mpRMBitmap ) +- mpRMBitmap->Draw( pOut, rSrcPt, rSrcSz, rDestPt, rDestSz ); +-} +- +-// ----------------------------------------------------------------------- +- +-void ImpBitmap::ImplDrawRemoteBmpEx( OutputDevice* pOut, +- const Point& rSrcPt, const Size& rSrcSz, +- const Point& rDestPt, const Size& rDestSz, +- const Bitmap& rMask ) +-{ +- if( mpRMBitmap ) +- mpRMBitmap->DrawEx( pOut, rSrcPt, rSrcSz, rDestPt, rDestSz, rMask ); +-} +- +-// ----------------------------------------------------------------------- +- +-void ImpBitmap::ImplDrawRemoteBmpAlpha( OutputDevice* pOut, +- const Point& rSrcPt, const Size& rSrcSz, +- const Point& rDestPt, const Size& rDestSz, +- const AlphaMask& rAlpha ) +-{ +- if( mpRMBitmap ) +- mpRMBitmap->DrawAlpha( pOut, rSrcPt, rSrcSz, rDestPt, rDestSz, rAlpha ); +-} +- +-// ----------------------------------------------------------------------- +- +-void ImpBitmap::ImplDrawRemoteBmpMask( OutputDevice* pOut, +- const Point& rSrcPt, const Size& rSrcSz, +- const Point& rDestPt, const Size& rDestSz, +- const Color& rColor ) +-{ +- if( mpRMBitmap ) +- mpRMBitmap->DrawMask( pOut, rSrcPt, rSrcSz, rDestPt, rDestSz, rColor ); +-} +- +-// ----------------------------------------------------------------------- +- +-BOOL ImpBitmap::ImplIsGetPrepared() const +-{ +- return( mpRMBitmap ? mpRMBitmap->IsGetPrepared() : FALSE ); +-} +- +-// ----------------------------------------------------------------------- +- +-void ImpBitmap::ImplResolveGet() +-{ +- if( mpRMBitmap ) +- { +- Bitmap aBmp; +- mpRMBitmap->Get( aBmp ); +- ImpBitmap* pGetImpBmp = aBmp.ImplGetImpBitmap(); +- +- if( pGetImpBmp ) +- { +- // wir nehmen der gegetteten Bitmap einfach +- // die SalBitmap weg; Null-Setzen nicht vergessen, +- // da die Bitmap die SalBitmap sonst abraeumt +- delete mpSalBitmap; +- mpSalBitmap = pGetImpBmp->mpSalBitmap; +- pGetImpBmp->mpSalBitmap = NULL; +- } +- } +-} +- +-#endif ++} +\ No newline at end of file +Index: vcl/source/gdi/impgraph.cxx +=================================================================== +RCS file: /cvs/gsl/vcl/source/gdi/impgraph.cxx,v +retrieving revision 1.14 +retrieving revision 1.16 +diff -u -p -u -r1.14 -r1.16 +--- vcl/source/gdi/impgraph.cxx 24 Jun 2003 07:32:48 -0000 1.14 ++++ vcl/source/gdi/impgraph.cxx 20 Apr 2004 13:54:19 -0000 1.16 +@@ -59,8 +59,6 @@ + * + ************************************************************************/ + +-#define _SV_IMPGRAPH_CXX +- + #ifndef _VCOMPAT_HXX + #include <tools/vcompat.hxx> + #endif +@@ -166,8 +164,8 @@ ImpGraphic::ImpGraphic() : + // ------------------------------------------------------------------------ + + ImpGraphic::ImpGraphic( const ImpGraphic& rImpGraphic ) : +- maEx ( rImpGraphic.maEx ), + maMetaFile ( rImpGraphic.maMetaFile ), ++ maEx ( rImpGraphic.maEx ), + mpContext ( NULL ), + mpSwapFile ( rImpGraphic.mpSwapFile ), + meType ( rImpGraphic.meType ), +@@ -490,7 +488,7 @@ BOOL ImpGraphic::ImplIsAnimated() const + + // ------------------------------------------------------------------------ + +-Bitmap ImpGraphic::ImplGetBitmap( const Size* pSizePixel ) const ++Bitmap ImpGraphic::ImplGetBitmap( const Size* pSizePixel, BOOL bUnlimited ) const + { + Bitmap aRetBmp; + +@@ -523,7 +521,7 @@ Bitmap ImpGraphic::ImplGetBitmap( const + aSizePix = *pSizePixel; + } + +- if( aSizePix.Width() && aSizePix.Height() && ++ if( aSizePix.Width() && aSizePix.Height() && !bUnlimited && + ( aSizePix.Width() > GRAPHIC_MTFTOBMP_MAXEXT || aSizePix.Height() > GRAPHIC_MTFTOBMP_MAXEXT ) ) + { + const Size aOldSizePix( aSizePix ); +@@ -556,7 +554,7 @@ Bitmap ImpGraphic::ImplGetBitmap( const + + // ------------------------------------------------------------------------ + +-BitmapEx ImpGraphic::ImplGetBitmapEx( const Size* pSizePixel ) const ++BitmapEx ImpGraphic::ImplGetBitmapEx( const Size* pSizePixel, BOOL bUnlimited ) const + { + BitmapEx aRetBmpEx; + +@@ -570,7 +568,7 @@ BitmapEx ImpGraphic::ImplGetBitmapEx( co + else if( ( meType != GRAPHIC_DEFAULT ) && ImplIsSupportedGraphic() ) + { + const ImpGraphic aMonoMask( maMetaFile.GetMonochromeMtf( COL_BLACK ) ); +- aRetBmpEx = BitmapEx( ImplGetBitmap( pSizePixel ), aMonoMask.ImplGetBitmap( pSizePixel ) ); ++ aRetBmpEx = BitmapEx( ImplGetBitmap( pSizePixel, bUnlimited ), aMonoMask.ImplGetBitmap( pSizePixel, bUnlimited ) ); + } + + return aRetBmpEx; +@@ -1147,7 +1145,6 @@ BOOL ImpGraphic::ImplWriteEmbedded( SvSt + const MapMode aMapMode( ImplGetPrefMapMode() ); + const Size aSize( ImplGetPrefSize() ); + const USHORT nOldFormat = rOStm.GetNumberFormatInt(); +- const ULONG nStmPos1 = rOStm.Tell(); + ULONG nDataFieldPos; + + rOStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN ); +Index: vcl/source/gdi/implncvt.cxx +=================================================================== +RCS file: /cvs/gsl/vcl/source/gdi/implncvt.cxx,v +retrieving revision 1.2 +retrieving revision 1.3 +diff -u -p -u -r1.2 -r1.3 +--- vcl/source/gdi/implncvt.cxx 27 Mar 2003 17:57:57 -0000 1.2 ++++ vcl/source/gdi/implncvt.cxx 6 Jan 2004 13:44:03 -0000 1.3 +@@ -134,11 +134,11 @@ ImplFloatPoint ImplFloatPoint::GetNVec( + // -------------------- + + ImplLineConverter::ImplLineConverter( const Polygon& rPolygon, const LineInfo& rLineInfo, const Point* pRefPoint ) : +- maLineInfo ( rLineInfo ), + mfWidthHalf ( rLineInfo.GetWidth() >> 1 ), +- mpFloatPoint ( NULL ), ++ maLineInfo ( rLineInfo ), + mpFloat0 ( new ImplFloatPoint[ 6 ] ), + mpFloat1 ( new ImplFloatPoint[ 6 ] ), ++ mpFloatPoint ( NULL ), + mnLines ( 0 ) + { + UINT16 nIndex, nPolySize = rPolygon.GetSize(); +@@ -249,7 +249,6 @@ const Polygon* ImplLineConverter::ImplGe + INT32 nDashLen = maLineInfo.GetDashLen() + nDistance; + INT32 nDashesLen = maLineInfo.GetDashCount() * nDashLen; + INT32 nDotLen = maLineInfo.GetDotLen() + nDistance; +- INT32 nDotsLen = maLineInfo.GetDotCount() * nDotLen; + + if ( mnRefDistance >= nDashesLen ) + { +Index: vcl/source/gdi/implncvt.hxx +=================================================================== +RCS file: /cvs/gsl/vcl/source/gdi/implncvt.hxx,v +retrieving revision 1.1.1.1 +retrieving revision 1.2 +diff -u -p -u -r1.1.1.1 -r1.2 +--- vcl/source/gdi/implncvt.hxx 18 Sep 2000 17:05:38 -0000 1.1.1.1 ++++ vcl/source/gdi/implncvt.hxx 6 Jan 2004 13:44:27 -0000 1.2 +@@ -62,8 +62,8 @@ + #ifndef _SV_LINECONV_HXX + #define _SV_LINECONV_HXX + +-#ifndef _SV_POLY_HXX +-#include <poly.hxx> ++#ifndef _TL_POLY_HXX ++#include <tools/poly.hxx> + #endif + #ifndef _SV_LINEINFO_HXX + #include <lineinfo.hxx> +Index: vcl/source/gdi/impprn.cxx +=================================================================== +RCS file: /cvs/gsl/vcl/source/gdi/impprn.cxx,v +retrieving revision 1.5 +retrieving revision 1.7 +diff -u -p -u -r1.5 -r1.7 +--- vcl/source/gdi/impprn.cxx 27 Mar 2003 17:57:57 -0000 1.5 ++++ vcl/source/gdi/impprn.cxx 6 Jan 2004 13:44:52 -0000 1.7 +@@ -59,9 +59,6 @@ + * + ************************************************************************/ + +-#ifndef REMOTE_APPSERVER +- +-#define _SV_IMPPRN_CXX + #define _SPOOLPRINTER_EXT + + #ifndef _QUEUE_HXX +@@ -150,8 +147,6 @@ void ImplQPrinter::Destroy() + + void ImplQPrinter::ImplPrintMtf( GDIMetaFile& rMtf, long nMaxBmpDPIX, long nMaxBmpDPIY ) + { +- const PrinterOptions& rPrinterOptions = GetPrinterOptions(); +- + for( MetaAction* pAct = rMtf.FirstAction(); pAct && !mbAborted; pAct = rMtf.NextAction() ) + { + const ULONG nType = pAct->GetType(); +@@ -191,8 +186,6 @@ void ImplQPrinter::ImplPrintMtf( GDIMeta + + if( pAct && ( pAct->GetType() == META_BMPSCALE_ACTION ) ) + { +- MetaBmpScaleAction* pBmpScaleAction = (MetaBmpScaleAction*) pAct; +- + // execute action here to avoid DPI processing of bitmap; + pAct->Execute( this ); + +@@ -403,8 +396,6 @@ IMPL_LINK( ImplQPrinter, ImplPrintHdl, T + + for ( USHORT i = 0; i < nCopyCount; i++ ) + { +- ULONG nActionPos = 0UL; +- + if ( pActPage->mpSetup ) + { + SetJobSetup( *pActPage->mpSetup ); +@@ -476,5 +467,3 @@ void ImplQPrinter::AddQueuePage( GDIMeta + pQueuePage->mpSetup = new JobSetup( mpParent->GetJobSetup() ); + mpQueue->Put( pQueuePage ); + } +- +-#endif +Index: vcl/source/gdi/impvect.cxx +=================================================================== +RCS file: /cvs/gsl/vcl/source/gdi/impvect.cxx,v +retrieving revision 1.3.120.1 +retrieving revision 1.5 +diff -u -p -u -r1.3.120.1 -r1.5 +--- vcl/source/gdi/impvect.cxx 15 Jan 2004 14:03:27 -0000 1.3.120.1 ++++ vcl/source/gdi/impvect.cxx 2 Mar 2004 10:35:43 -0000 1.5 +@@ -59,15 +59,13 @@ + * + ************************************************************************/ + +-#define _SV_IMPVECT_CXX +- + #include <stdlib.h> + #include <tools/new.hxx> + #ifndef _SV_BMPACC_HXX + #include <bmpacc.hxx> + #endif +-#ifndef _SV_POLY_HXX +-#include <poly.hxx> ++#ifndef _TL_POLY_HXX ++#include <tools/poly.hxx> + #endif + #ifndef _SV_GDIMTF_HXX + #include <gdimtf.hxx> +@@ -88,19 +86,6 @@ + #include <impvect.hxx> + #endif + +-// !!! ggf. einkommentieren, um Bitmaps zu erzeugen (nur, wenn File mit Debug uebersetzt wurde) +-// #define DEBUG_BMPOUTPUT +- +-#if (OSL_DEBUG_LEVEL > 1) && defined DEBUG_BMPOUTPUT +-#define DBG_BMP 1 +-#else +-#undef DBG_BMP +-#endif +- +-#ifdef DBG_BMP +-#include <tools/stream.hxx> +-#endif +- + // ----------- + // - Defines - + // ----------- +@@ -221,15 +206,9 @@ extern "C" int __LOADONCALLAPI ImplColor + // - ImplPointArray - + // ------------------ + +-#ifdef WIN +-typedef Point* huge HPPoint; +-#else +-typedef Point* HPPoint; +-#endif +- + class ImplPointArray + { +- HPPoint mpArray; ++ Point* mpArray; + ULONG mnSize; + ULONG mnRealSize; + +@@ -252,9 +231,9 @@ public: + // ----------------------------------------------------------------------------- + + ImplPointArray::ImplPointArray() : ++ mpArray ( NULL ), + mnSize ( 0UL ), +- mnRealSize ( 0UL ), +- mpArray ( NULL ) ++ mnRealSize ( 0UL ) + + { + } +@@ -279,8 +258,8 @@ void ImplPointArray::ImplSetSize( ULONG + if( mpArray ) + SvMemFree( mpArray ); + +- mpArray = (HPPoint) SvMemAlloc( nTotal ); +- HMEMSET( (HPBYTE) mpArray, 0, nTotal ); ++ mpArray = (Point*) SvMemAlloc( nTotal ); ++ memset( (HPBYTE) mpArray, 0, nTotal ); + } + + // ----------------------------------------------------------------------------- +@@ -336,9 +315,6 @@ public: + inline BOOL IsCont( long nY, long nX ) const; + inline BOOL IsDone( long nY, long nX ) const; + +-#ifdef DBG_BMP +- Bitmap GetBitmap() const; +-#endif // DBG_BMP + }; + + // ----------------------------------------------------------------------------- +@@ -351,7 +327,7 @@ ImplVectMap::ImplVectMap( long nWidth, l + const long nSize = nWidthAl * nHeight; + Scanline pTmp = mpBuf = (Scanline) SvMemAlloc( nSize ); + +- HMEMSET( mpBuf, 0, nSize ); ++ memset( mpBuf, 0, nSize ); + mpScan = (Scanline*) SvMemAlloc( nHeight * sizeof( Scanline ) ); + + for( long nY = 0L; nY < nHeight; pTmp += nWidthAl ) +@@ -403,36 +379,6 @@ inline BOOL ImplVectMap::IsDone( long nY + return( VECT_DONE_INDEX == Get( nY, nX ) ); + } + +-// ----------------------------------------------------------------------------- +- +-#ifdef DBG_BMP +-Bitmap ImplVectMap::GetBitmap() const +-{ +- Bitmap aBmp( Size( mnWidth, mnHeight ), 4 ); +- BitmapWriteAccess* pAcc = aBmp.AcquireWriteAccess(); +- +- if( pAcc ) +- { +- for( long nY = 0L; nY < mnHeight; nY++ ) +- { +- for( long nX = 0L; nX < mnWidth; nX++ ) +- { +- switch( Get( nY, nX ) ) +- { +- case( VECT_FREE_INDEX ): pAcc->SetPixel( nY, nX, 15 ); break; +- case( VECT_CONT_INDEX ): pAcc->SetPixel( nY, nX, 0 ); break; +- case( VECT_DONE_INDEX ): pAcc->SetPixel( nY, nX, 2); break; +- } +- } +- } +- +- aBmp.ReleaseAccess( pAcc ); +- } +- +- return aBmp; +-} +-#endif // DBG_BMP +- + // ------------- + // - ImplChain - + // ------------- +@@ -470,8 +416,8 @@ public: + // ----------------------------------------------------------------------------- + + ImplChain::ImplChain( ULONG nInitCount, long nResize ) : +- mnCount ( 0UL ), + mnArraySize ( nInitCount ), ++ mnCount ( 0UL ), + mnResize ( nResize ) + { + DBG_ASSERT( nInitCount && nResize, "ImplChain::ImplChain(): invalid parameters!" ); +@@ -494,7 +440,7 @@ void ImplChain::ImplGetSpace() + + mnArraySize = ( mnResize < 0L ) ? ( mnArraySize << 1UL ) : ( mnArraySize + (ULONG) mnResize ); + pNewCodes = new BYTE[ mnArraySize ]; +- HMEMCPY( pNewCodes, mpCodes, nOldArraySize ); ++ memcpy( pNewCodes, mpCodes, nOldArraySize ); + delete[] mpCodes; + mpCodes = pNewCodes; + } +@@ -542,7 +488,7 @@ void ImplChain::ImplEndAdd( ULONG nFlag + const BYTE cNextMove = mpCodes[ i + 1 ]; + const ChainMove& rMove = aImplMove[ cMove ]; + const ChainMove& rMoveInner = aImplMoveInner[ cMove ]; +- Point& rPt = aArr[ nPolyPos ]; ++// Point& rPt = aArr[ nPolyPos ]; + BOOL bDone = TRUE; + + nLastX += rMove.nDX; +@@ -649,7 +595,7 @@ void ImplChain::ImplEndAdd( ULONG nFlag + const BYTE cNextMove = mpCodes[ i + 1 ]; + const ChainMove& rMove = aImplMove[ cMove ]; + const ChainMove& rMoveOuter = aImplMoveOuter[ cMove ]; +- Point& rPt = aArr[ nPolyPos ]; ++// Point& rPt = aArr[ nPolyPos ]; + BOOL bDone = TRUE; + + nLastX += rMove.nDX; +@@ -889,7 +835,7 @@ BOOL ImplVectorizer::ImplVectorize( cons + { + const BitmapColor aBmpCol( pRAcc->GetPaletteColor( pColorSet[ i ].mnIndex ) ); + const Color aFindColor( aBmpCol.GetRed(), aBmpCol.GetGreen(), aBmpCol.GetBlue() ); +- const BYTE cLum = aFindColor.GetLuminance(); ++// const BYTE cLum = aFindColor.GetLuminance(); + ImplVectMap* pMap = ImplExpand( pRAcc, aFindColor ); + + VECT_PROGRESS( pProgress, FRound( fPercent += fPercentStep_2 ) ); +@@ -977,7 +923,7 @@ BOOL ImplVectorizer::ImplVectorize( cons + if( nFlags & BMP_VECTORIZE_REDUCE_EDGES ) + rPolyPoly.Optimize( POLY_OPTIMIZE_EDGES ); + +- // #i14895:setting the correct direction for polygons ++ // #i14895#:setting the correct direction for polygons + // that represent holes and non-holes; non-hole polygons + // need to have a right orientation, holes need to have a + // left orientation in order to be treated correctly by +@@ -1172,14 +1118,6 @@ void ImplVectorizer::ImplCalculate( Impl + { + const long nWidth = pMap->Width(), nHeight= pMap->Height(); + +-#ifdef DBG_BMP +- if( pMap ) +- { +- SvFileStream aOStm( "d:\\cont.bmp", STREAM_WRITE | STREAM_TRUNC ); +- aOStm << pMap->GetBitmap(); +- } +-#endif // DBG_BMP +- + for( long nY = 0L; nY < nHeight; nY++ ) + { + long nX = 0L; +@@ -1241,14 +1179,6 @@ void ImplVectorizer::ImplCalculate( Impl + } + } + } +- +-#ifdef DBG_BMP +- if( pMap ) +- { +- SvFileStream aOStm( "d:\\vect.bmp", STREAM_WRITE | STREAM_TRUNC ); +- aOStm << pMap->GetBitmap(); +- } +-#endif // DBG_BMP + } + + // ----------------------------------------------------------------------------- +Index: vcl/source/gdi/impvect.hxx +=================================================================== +RCS file: /cvs/gsl/vcl/source/gdi/impvect.hxx,v +retrieving revision 1.1.1.1 +retrieving revision 1.2 +diff -u -p -u -r1.1.1.1 -r1.2 +--- vcl/source/gdi/impvect.hxx 18 Sep 2000 17:05:38 -0000 1.1.1.1 ++++ vcl/source/gdi/impvect.hxx 6 Jan 2004 13:45:39 -0000 1.2 +@@ -62,8 +62,8 @@ + #ifndef _SV_IMPVECT_HXX + #define _SV_IMPVECT_HXX + +-#ifndef _SV_POLY_HXX +-#include <poly.hxx> ++#ifndef _TL_POLY_HXX ++#include <tools/poly.hxx> + #endif + #ifndef _SV_GDIMTF_HXX + #include <gdimtf.hxx> +Index: vcl/source/gdi/jobset.cxx +=================================================================== +RCS file: /cvs/gsl/vcl/source/gdi/jobset.cxx,v +retrieving revision 1.7 +retrieving revision 1.8 +diff -u -p -u -r1.7 -r1.8 +--- vcl/source/gdi/jobset.cxx 19 Jun 2002 11:20:42 -0000 1.7 ++++ vcl/source/gdi/jobset.cxx 6 Jan 2004 13:46:09 -0000 1.8 +@@ -58,8 +58,6 @@ + * + * + ************************************************************************/ +- +-#define _SV_JOBSET_CXX + + #ifndef _DEBUG_HXX + #include <tools/debug.hxx> +Index: vcl/source/gdi/lineinfo.cxx +=================================================================== +RCS file: /cvs/gsl/vcl/source/gdi/lineinfo.cxx,v +retrieving revision 1.1.1.1 +retrieving revision 1.2 +diff -u -p -u -r1.1.1.1 -r1.2 +--- vcl/source/gdi/lineinfo.cxx 18 Sep 2000 17:05:38 -0000 1.1.1.1 ++++ vcl/source/gdi/lineinfo.cxx 6 Jan 2004 13:46:37 -0000 1.2 +@@ -58,8 +58,6 @@ + * + * + ************************************************************************/ +- +-#define _SV_LINEINFO_CXX + + #ifndef _STREAM_HXX + #include <tools/stream.hxx> +Index: vcl/source/gdi/mapmod.cxx +=================================================================== +RCS file: /cvs/gsl/vcl/source/gdi/mapmod.cxx,v +retrieving revision 1.1.1.1 +retrieving revision 1.3 +diff -u -p -u -r1.1.1.1 -r1.3 +--- vcl/source/gdi/mapmod.cxx 18 Sep 2000 17:05:38 -0000 1.1.1.1 ++++ vcl/source/gdi/mapmod.cxx 17 Mar 2004 10:04:58 -0000 1.3 +@@ -59,8 +59,6 @@ + * + ************************************************************************/ + +-#define _SV_MAPMOD_CXX +- + #ifndef _STREAM_HXX + #include <tools/stream.hxx> + #endif +@@ -137,12 +135,11 @@ SvStream& operator<<( SvStream& rOStm, c + + static ImplMapMode* ImplGetStaticMapMode( MapUnit eUnit ) + { +- // Achtung: Ganz fies und dreckig !!! +-#ifdef WIN +- static long _near aStaticImplMapModeAry[(MAP_LASTENUMDUMMY)*sizeof(ImplMapMode)/sizeof(long)]; +-#else + static long aStaticImplMapModeAry[(MAP_LASTENUMDUMMY)*sizeof(ImplMapMode)/sizeof(long)]; +-#endif ++ ++ // #i19496 check for out-of-bounds ++ if( eUnit >= MAP_LASTENUMDUMMY ) ++ return (ImplMapMode*)aStaticImplMapModeAry; + + ImplMapMode* pImplMapMode = ((ImplMapMode*)aStaticImplMapModeAry)+eUnit; + if ( !pImplMapMode->mbSimple ) +Index: vcl/source/gdi/metaact.cxx +=================================================================== +RCS file: /cvs/gsl/vcl/source/gdi/metaact.cxx,v +retrieving revision 1.11.112.1 +retrieving revision 1.14 +diff -u -p -u -r1.11.112.1 -r1.14 +--- vcl/source/gdi/metaact.cxx 9 Jan 2004 18:13:44 -0000 1.11.112.1 ++++ vcl/source/gdi/metaact.cxx 17 Jun 2004 12:17:25 -0000 1.14 +@@ -59,7 +59,6 @@ + * + ************************************************************************/ + +-#define _SV_METAACT_CXX + #define ENABLE_BYTESTRING_STREAM_OPERATORS + + #include <algorithm> +@@ -1364,8 +1363,8 @@ MetaTextArrayAction::MetaTextArrayAction + { + const ULONG nAryLen = mnLen; + +- mpDXAry = new long[ nAryLen ]; +- memcpy( mpDXAry, rAction.mpDXAry, nAryLen * sizeof( long ) ); ++ mpDXAry = new sal_Int32[ nAryLen ]; ++ memcpy( mpDXAry, rAction.mpDXAry, nAryLen * sizeof( sal_Int32 ) ); + } + else + mpDXAry = NULL; +@@ -1375,7 +1374,7 @@ MetaTextArrayAction::MetaTextArrayAction + + MetaTextArrayAction::MetaTextArrayAction( const Point& rStartPt, + const XubString& rStr, +- const long* pDXAry, ++ const sal_Int32* pDXAry, + USHORT nIndex, + USHORT nLen ) : + MetaAction ( META_TEXTARRAY_ACTION ), +@@ -1388,8 +1387,8 @@ MetaTextArrayAction::MetaTextArrayAction + + if( nAryLen ) + { +- mpDXAry = new long[ nAryLen ]; +- memcpy( mpDXAry, pDXAry, nAryLen * sizeof( long ) ); ++ mpDXAry = new sal_Int32[ nAryLen ]; ++ memcpy( mpDXAry, pDXAry, nAryLen * sizeof( sal_Int32 ) ); + } + else + mpDXAry = NULL; +@@ -1492,8 +1491,8 @@ void MetaTextArrayAction::Read( SvStream + if( nAryLen ) + { + // #i9762#, #106172# Ensure that DX array is at least mnLen entries long +- const ULONG nIntAryLen( ::std::max(nAryLen, static_cast<ULONG>(mnLen)) ); +- mpDXAry = new long[ nIntAryLen ]; ++ const ULONG nIntAryLen( Max(nAryLen, static_cast<ULONG>(mnLen)) ); ++ mpDXAry = new sal_Int32[ nIntAryLen ]; + + ULONG i; + for( i = 0UL; i < nAryLen; i++ ) +@@ -3964,7 +3963,7 @@ void MetaCommentAction::ImplInitDynamicD + if ( nDataSize && pData ) + { + mnDataSize = nDataSize, mpData = new BYTE[ mnDataSize ]; +- HMEMCPY( mpData, pData, mnDataSize ); ++ memcpy( mpData, pData, mnDataSize ); + } + else + { +Index: vcl/source/gdi/octree.cxx +=================================================================== +RCS file: /cvs/gsl/vcl/source/gdi/octree.cxx,v +retrieving revision 1.1.1.1 +retrieving revision 1.2 +diff -u -p -u -r1.1.1.1 -r1.2 +--- vcl/source/gdi/octree.cxx 18 Sep 2000 17:05:38 -0000 1.1.1.1 ++++ vcl/source/gdi/octree.cxx 6 Jan 2004 13:48:20 -0000 1.2 +@@ -70,16 +70,6 @@ + #endif + #include <octree.hxx> + +-// ------------ +-// - Typedefs - +-// ------------ +- +-#ifdef WIN +-typedef ULONG huge* HPULONG; +-#else +-typedef ULONG* HPULONG; +-#endif +- + // --------- + // - pMask - + // --------- +@@ -345,13 +335,11 @@ void Octree::GetPalIndex( PNODE pNode ) + InverseColorMap::InverseColorMap( const BitmapPalette& rPal ) : + nBits( 8 - OCTREE_BITS ) + { +- HPULONG cdp; ++ ULONG* cdp; + BYTE* crgbp; + const ULONG nColorMax = 1 << OCTREE_BITS; + const ULONG xsqr = 1 << ( nBits << 1 ); + const ULONG xsqr2 = xsqr << 1; +- const ULONG gstride = nColorMax; +- const ULONG rstride = nColorMax * nColorMax; + const ULONG nColors = rPal.GetEntryCount(); + const long x = 1L << nBits; + const long x2 = x >> 1L; +@@ -378,7 +366,7 @@ InverseColorMap::InverseColorMap( const + cginc = ( xsqr - ( cGreen << nBits ) ) << 1L; + cbinc = ( xsqr - ( cBlue << nBits ) ) << 1L; + +- cdp = (HPULONG) pBuffer; ++ cdp = (ULONG*) pBuffer; + crgbp = pMap; + + for( r = 0, rxx = crinc; r < nColorMax; rdist += rxx, r++, rxx += xsqr2 ) +@@ -412,8 +400,8 @@ void InverseColorMap::ImplCreateBuffers( + const ULONG nSize = nCount * sizeof( ULONG ); + + pMap = (BYTE*) SvMemAlloc( nCount ); +- HMEMSET( pMap, 0x00, nCount ); ++ memset( pMap, 0x00, nCount ); + + pBuffer = (BYTE*) SvMemAlloc( nSize ); +- HMEMSET( pBuffer, 0xff, nSize ); ++ memset( pBuffer, 0xff, nSize ); + } +Index: vcl/source/gdi/opengl.cxx +=================================================================== +RCS file: /cvs/gsl/vcl/source/gdi/opengl.cxx,v +retrieving revision 1.5 +retrieving revision 1.8 +diff -u -p -u -r1.5 -r1.8 +--- vcl/source/gdi/opengl.cxx 28 Apr 2003 17:09:40 -0000 1.5 ++++ vcl/source/gdi/opengl.cxx 6 Jan 2004 13:48:43 -0000 1.8 +@@ -59,8 +59,6 @@ + * + ************************************************************************/ + +-#define _SV_OPENGL_CXX +- + #define private public + #include <svsys.h> + #include <window.hxx> +@@ -79,6 +77,12 @@ + #ifndef _SV_SALGDI_HXX + #include <salgdi.hxx> + #endif ++#ifndef _SV_SVDATA_HXX ++#include <svdata.hxx> ++#endif ++#ifndef _SV_SALINST_HXX ++#include <salinst.hxx> ++#endif + + + #include <svapp.hxx> +@@ -88,9 +92,7 @@ + // - Defines - + // ----------- + +-#ifdef WIN +-#define __OPENGL_CALL _far _pascal +-#elif defined WNT ++#ifdef WNT + #define __OPENGL_CALL __stdcall + #else + #define __OPENGL_CALL +@@ -190,11 +192,7 @@ typedef void ( __OPENGL_CALL *OGLFncBlen + + #define PGRAPHICS mpOutDev->mpGraphics + +-#ifndef REMOTE_APPSERVER + #define OGL_INIT() (mpOGL && (mpOutDev->mpGraphics || mpOutDev->ImplGetGraphics())) +-#else +-#define OGL_INIT() (mpOGL && (mpOutDev->mpGraphics || mpOutDev->ImplGetGraphics())) +-#endif + + #define INIT_OGLFNC( FncName ) static OGLFnc##FncName pImplOpenGLFnc##FncName = NULL; + #define GET_OGLFNC_GL( FncName ) \ +@@ -297,7 +295,6 @@ INIT_OGLFNC( BlendFunc ); + + BOOL OpenGL::ImplInitFncPointers() + { +-#ifndef REMOTE_APPSERVER + BOOL bRet = TRUE; + + GET_OGLFNC_GL( ClearDepth ); +@@ -387,9 +384,6 @@ BOOL OpenGL::ImplInitFncPointers() + GET_OGLFNC_GL( BlendFunc ); + + return bRet; +-#else +- return FALSE; +-#endif + } + + BOOL OpenGL::mbNoOGL = FALSE; +@@ -406,22 +400,18 @@ OpenGL::OpenGL( OutputDevice* pOutDev ) + + OpenGL::~OpenGL() + { +-#ifndef REMOTE_APPSERVER + delete mpOGL; +-#else +-#endif + } + + // ------------------------------------------------------------------------ + + void OpenGL::ImplInit() + { +-#ifndef REMOTE_APPSERVER + if( ( PGRAPHICS || mpOutDev->ImplGetGraphics() ) && ! mbNoOGL ) + { +- mpOGL = new SalOpenGL( PGRAPHICS ); ++ mpOGL = ImplGetSVData()->mpDefInst->CreateSalOpenGL( PGRAPHICS ); + +- if ( !mpOGL->Create() || (!bImplOpenGLFncPtrInitialized && !ImplInitFncPointers()) ) ++ if ( !mpOGL->IsValid() || (!bImplOpenGLFncPtrInitialized && !ImplInitFncPointers()) ) + { + delete mpOGL; + mpOGL = NULL; +@@ -431,133 +421,105 @@ void OpenGL::ImplInit() + } + else + mpOGL = NULL; +-#else +- mpOGL = NULL; +-#endif + } + + // ------------------------------------------------------------------------ + + void OpenGL::SetConnectOutputDevice( OutputDevice* pOutDev ) + { +-#ifndef REMOTE_APPSERVER + delete mpOGL; + mpOutDev = pOutDev; + ImplInit(); +-#else +-#endif + } + + // ------------------------------------------------------------------------ + + void OpenGL::ClearDepth( GLclampd fDepth ) + { +-#ifndef REMOTE_APPSERVER + if( OGL_INIT() ) + { + mpOGL->OGLEntry( PGRAPHICS ); + pImplOpenGLFncClearDepth( fDepth ); + mpOGL->OGLExit( PGRAPHICS ); + } +-#else +-#endif + } + + // ------------------------------------------------------------------------ + + void OpenGL::DepthFunc( GLenum eFunc ) + { +-#ifndef REMOTE_APPSERVER + if( OGL_INIT() ) + { + mpOGL->OGLEntry( PGRAPHICS ); + pImplOpenGLFncDepthFunc( eFunc ); + mpOGL->OGLExit( PGRAPHICS ); + } +-#else +-#endif + } + + // ------------------------------------------------------------------------ + + void OpenGL::Enable( GLenum eCap ) + { +-#ifndef REMOTE_APPSERVER + if( OGL_INIT() ) + { + mpOGL->OGLEntry( PGRAPHICS ); + pImplOpenGLFncEnable( eCap ); + mpOGL->OGLExit( PGRAPHICS ); + } +-#else +-#endif + } + + // ------------------------------------------------------------------------ + + void OpenGL::Disable( GLenum eCap ) + { +-#ifndef REMOTE_APPSERVER + if( OGL_INIT() ) + { + mpOGL->OGLEntry( PGRAPHICS ); + pImplOpenGLFncDisable( eCap ); + mpOGL->OGLExit( PGRAPHICS ); + } +-#else +-#endif + } + + // ------------------------------------------------------------------------ + + void OpenGL::DepthMask( GLboolean bFlag ) + { +-#ifndef REMOTE_APPSERVER + if( OGL_INIT() ) + { + mpOGL->OGLEntry( PGRAPHICS ); + pImplOpenGLFncDepthMask( bFlag ); + mpOGL->OGLExit( PGRAPHICS ); + } +-#else +-#endif + } + + // ------------------------------------------------------------------------ + + void OpenGL::ShadeModel( GLenum eMode ) + { +-#ifndef REMOTE_APPSERVER + if( OGL_INIT() ) + { + mpOGL->OGLEntry( PGRAPHICS ); + pImplOpenGLFncShadeModel( eMode ); + mpOGL->OGLExit( PGRAPHICS ); + } +-#else +-#endif + } + + // ------------------------------------------------------------------------ + + void OpenGL::EdgeFlag( GLboolean bFlag ) + { +-#ifndef REMOTE_APPSERVER + if( OGL_INIT() ) + { + mpOGL->OGLEntry( PGRAPHICS ); + pImplOpenGLFncEdgeFlag( bFlag ); + mpOGL->OGLExit( PGRAPHICS ); + } +-#else +-#endif + } + + // ------------------------------------------------------------------------ + + void OpenGL::Clear( GLbitfield nMask ) + { +-#ifndef REMOTE_APPSERVER + if( OGL_INIT() ) + { + #if defined UNX && ! defined MACOSX +@@ -567,30 +529,24 @@ void OpenGL::Clear( GLbitfield nMask ) + pImplOpenGLFncClear( nMask ); + mpOGL->OGLExit( PGRAPHICS ); + } +-#else +-#endif + } + + // ------------------------------------------------------------------------ + + void OpenGL::Flush() + { +-#ifndef REMOTE_APPSERVER + if( OGL_INIT() ) + { + mpOGL->OGLEntry( PGRAPHICS ); + pImplOpenGLFncFlush(); + mpOGL->OGLExit( PGRAPHICS ); + } +-#else +-#endif + } + + // ------------------------------------------------------------------------ + + void OpenGL::Finish() + { +-#ifndef REMOTE_APPSERVER + if( OGL_INIT() ) + { + mpOGL->OGLEntry( PGRAPHICS ); +@@ -600,15 +556,12 @@ void OpenGL::Finish() + #endif + mpOGL->OGLExit( PGRAPHICS ); + } +-#else +-#endif + } + + // ------------------------------------------------------------------------ + + void OpenGL::Viewport( GLint nX, GLint nY, GLsizei nWidth, GLsizei nHeight ) + { +-#ifndef REMOTE_APPSERVER + if( OGL_INIT() ) + { + long nOutHeight; +@@ -625,7 +578,7 @@ void OpenGL::Viewport( GLint nX, GLint n + { + long lx = nX + mpOutDev->mnOutOffX; + long lwidth = nWidth; +- ((SalGraphicsLayout*)mpOutDev->mpGraphics)->mirror( lx, lwidth, mpOutDev ); ++ mpOutDev->mpGraphics->mirror( lx, lwidth, mpOutDev ); + nX = lx - mpOutDev->mnOutOffX; + } + pImplOpenGLFncViewport( nX + mpOutDev->mnOutOffX, +@@ -634,549 +587,438 @@ void OpenGL::Viewport( GLint nX, GLint n + + mpOGL->OGLExit( PGRAPHICS ); + } +-#else +-#endif + } + + // ------------------------------------------------------------------------ + + void OpenGL::Begin( GLenum eMode ) + { +-#ifndef REMOTE_APPSERVER + if( OGL_INIT() ) + { + mpOGL->OGLEntry( PGRAPHICS ); + pImplOpenGLFncBegin( eMode ); + mpOGL->OGLExit( PGRAPHICS ); + } +-#else +-#endif + } + + // ------------------------------------------------------------------------ + + void OpenGL::End() + { +-#ifndef REMOTE_APPSERVER + if( OGL_INIT() ) + { + mpOGL->OGLEntry( PGRAPHICS ); + pImplOpenGLFncEnd(); + mpOGL->OGLExit( PGRAPHICS ); + } +-#else +-#endif + } + + // ------------------------------------------------------------------------ + + void OpenGL::Vertex3dv( const GLdouble* fVar ) + { +-#ifndef REMOTE_APPSERVER + if( OGL_INIT() ) + { + mpOGL->OGLEntry( PGRAPHICS ); + pImplOpenGLFncVertex3dv( fVar ); + mpOGL->OGLExit( PGRAPHICS ); + } +-#else +-#endif + } + + // ------------------------------------------------------------------------ + + void OpenGL::Normal3dv( const GLdouble* fVar ) + { +-#ifndef REMOTE_APPSERVER + if( OGL_INIT() ) + { + mpOGL->OGLEntry( PGRAPHICS ); + pImplOpenGLFncNormal3dv( fVar ); + mpOGL->OGLExit( PGRAPHICS ); + } +-#else +-#endif + } + + // ------------------------------------------------------------------------ + + void OpenGL::Color4ub( GLubyte cRed, GLubyte cGreen, GLubyte cBlue, GLubyte cAlpha ) + { +-#ifndef REMOTE_APPSERVER + if( OGL_INIT() ) + { + mpOGL->OGLEntry( PGRAPHICS ); + pImplOpenGLFncColor4ub( cRed, cGreen, cBlue, cAlpha ); + mpOGL->OGLExit( PGRAPHICS ); + } +-#else +-#endif + } + + // ------------------------------------------------------------------------ + + void OpenGL::Materialfv( GLenum eFace, GLenum ePName, const GLfloat *fParams ) + { +-#ifndef REMOTE_APPSERVER + if( OGL_INIT() ) + { + mpOGL->OGLEntry( PGRAPHICS ); + pImplOpenGLFncMaterialfv( eFace, ePName, fParams ); + mpOGL->OGLExit( PGRAPHICS ); + } +-#else +-#endif + } + + // ------------------------------------------------------------------------ + + void OpenGL::Materialf( GLenum eFace, GLenum ePName, GLfloat fParam ) + { +-#ifndef REMOTE_APPSERVER + if( OGL_INIT() ) + { + mpOGL->OGLEntry( PGRAPHICS ); + pImplOpenGLFncMaterialf( eFace, ePName, fParam ); + mpOGL->OGLExit( PGRAPHICS ); + } +-#else +-#endif + } + + // ------------------------------------------------------------------------ + + void OpenGL::LightModelfv( GLenum ePName, const GLfloat *fParams ) + { +-#ifndef REMOTE_APPSERVER + if( OGL_INIT() ) + { + mpOGL->OGLEntry( PGRAPHICS ); + pImplOpenGLFncLightModelfv( ePName, fParams ); + mpOGL->OGLExit( PGRAPHICS ); + } +-#else +-#endif + } + + // ------------------------------------------------------------------------ + + void OpenGL::LightModelf( GLenum ePName, GLfloat fParam ) + { +-#ifndef REMOTE_APPSERVER + if( OGL_INIT() ) + { + mpOGL->OGLEntry( PGRAPHICS ); + pImplOpenGLFncLightModelf( ePName, fParam ); + mpOGL->OGLExit( PGRAPHICS ); + } +-#else +-#endif + } + + // ------------------------------------------------------------------------ + + void OpenGL::Lightfv( GLenum eLight, GLenum ePName, const GLfloat *fParams ) + { +-#ifndef REMOTE_APPSERVER + if( OGL_INIT() ) + { + mpOGL->OGLEntry( PGRAPHICS ); + pImplOpenGLFncLightfv( eLight, ePName, fParams ); + mpOGL->OGLExit( PGRAPHICS ); + } +-#else +-#endif + } + + // ------------------------------------------------------------------------ + + void OpenGL::Lightf( GLenum eLight, GLenum ePName, GLfloat fParam ) + { +-#ifndef REMOTE_APPSERVER + if( OGL_INIT() ) + { + mpOGL->OGLEntry( PGRAPHICS ); + pImplOpenGLFncLightf( eLight, ePName, fParam ); + mpOGL->OGLExit( PGRAPHICS ); + } +-#else +-#endif + } + + // ------------------------------------------------------------------------ + + void OpenGL::PolygonMode( GLenum eFace, GLenum eMode ) + { +-#ifndef REMOTE_APPSERVER + if( OGL_INIT() ) + { + mpOGL->OGLEntry( PGRAPHICS ); + pImplOpenGLFncPolygonMode( eFace, eMode ); + mpOGL->OGLExit( PGRAPHICS ); + } +-#else +-#endif + } + + // ------------------------------------------------------------------------ + + void OpenGL::CullFace( GLenum eMode ) + { +-#ifndef REMOTE_APPSERVER + if( OGL_INIT() ) + { + mpOGL->OGLEntry( PGRAPHICS ); + pImplOpenGLFncCullFace( eMode ); + mpOGL->OGLExit( PGRAPHICS ); + } +-#else +-#endif + } + + // ------------------------------------------------------------------------ + + void OpenGL::PointSize( GLfloat fSize ) + { +-#ifndef REMOTE_APPSERVER + if( OGL_INIT() ) + { + mpOGL->OGLEntry( PGRAPHICS ); + pImplOpenGLFncPointSize( fSize ); + mpOGL->OGLExit( PGRAPHICS ); + } +-#else +-#endif + } + + // ------------------------------------------------------------------------ + + void OpenGL::LineWidth( GLfloat fWidth ) + { +-#ifndef REMOTE_APPSERVER + if( OGL_INIT() ) + { + mpOGL->OGLEntry( PGRAPHICS ); + pImplOpenGLFncLineWidth( fWidth ); + mpOGL->OGLExit( PGRAPHICS ); + } +-#else +-#endif + } + + // ------------------------------------------------------------------------ + + void OpenGL::MatrixMode( GLenum eMode ) + { +-#ifndef REMOTE_APPSERVER + if( OGL_INIT() ) + { + mpOGL->OGLEntry( PGRAPHICS ); + pImplOpenGLFncMatrixMode( eMode ); + mpOGL->OGLExit( PGRAPHICS ); + } +-#else +-#endif + } + + // ------------------------------------------------------------------------ + + void OpenGL::LoadMatrixd( const GLdouble *fM ) + { +-#ifndef REMOTE_APPSERVER + if( OGL_INIT() ) + { + mpOGL->OGLEntry( PGRAPHICS ); + pImplOpenGLFncLoadMatrixd( fM ); + mpOGL->OGLExit( PGRAPHICS ); + } +-#else +-#endif + } + + // ------------------------------------------------------------------------ + + void OpenGL::TexCoord2dv( const GLdouble *pParams ) + { +-#ifndef REMOTE_APPSERVER + if( OGL_INIT() ) + { + mpOGL->OGLEntry( PGRAPHICS ); + pImplOpenGLFncTexCoord2dv( pParams ); + mpOGL->OGLExit( PGRAPHICS ); + } +-#else +-#endif + } + + // ------------------------------------------------------------------------ + + void OpenGL::TexCoord3dv( const GLdouble *fVar ) + { +-#ifndef REMOTE_APPSERVER + if( OGL_INIT() ) + { + mpOGL->OGLEntry( PGRAPHICS ); + pImplOpenGLFncTexCoord3dv( fVar ); + mpOGL->OGLExit( PGRAPHICS ); + } +-#else +-#endif + } + + // ------------------------------------------------------------------------ + + void OpenGL::TexImage1D( GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *pixels ) + { +-#ifndef REMOTE_APPSERVER + if( OGL_INIT() ) + { + mpOGL->OGLEntry( PGRAPHICS ); + pImplOpenGLFncTexImage1D( target, level, internalformat, width, border, format, type, pixels ); + mpOGL->OGLExit( PGRAPHICS ); + } +-#else +-#endif + } + + // ------------------------------------------------------------------------ + + void OpenGL::TexImage2D( GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels ) + { +-#ifndef REMOTE_APPSERVER + if( OGL_INIT() ) + { + mpOGL->OGLEntry( PGRAPHICS ); + pImplOpenGLFncTexImage2D( target, level, internalformat, width, height, border, format, type, pixels ); + mpOGL->OGLExit( PGRAPHICS ); + } +-#else +-#endif + } + + // ------------------------------------------------------------------------ + + void OpenGL::CopyTexImage1D( GLenum target, GLint level, GLenum internalFormat, GLint x, GLint y, GLsizei width, GLint border ) + { +-#ifndef REMOTE_APPSERVER + if( OGL_INIT() ) + { + mpOGL->OGLEntry( PGRAPHICS ); + pImplOpenGLFncCopyTexImage1D( target, level, internalFormat, x, y, width, border ); + mpOGL->OGLExit( PGRAPHICS ); + } +-#else +-#endif + } + + // ------------------------------------------------------------------------ + + void OpenGL::CopyTexImage2D( GLenum target, GLint level, GLenum internalFormat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border ) + { +-#ifndef REMOTE_APPSERVER + if( OGL_INIT() ) + { + mpOGL->OGLEntry( PGRAPHICS ); + pImplOpenGLFncCopyTexImage2D( target, level, internalFormat, x, y, width, height, border ); + mpOGL->OGLExit( PGRAPHICS ); + } +-#else +-#endif + } + + // ------------------------------------------------------------------------ + + void OpenGL::CopyTexSubImage1D( GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width ) + { +-#ifndef REMOTE_APPSERVER + if( OGL_INIT() ) + { + mpOGL->OGLEntry( PGRAPHICS ); + pImplOpenGLFncCopyTexSubImage1D( target, level, xoffset, x, y, width ); + mpOGL->OGLExit( PGRAPHICS ); + } +-#else +-#endif + } + + // ------------------------------------------------------------------------ + + void OpenGL::CopyTexSubImage2D( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height ) + { +-#ifndef REMOTE_APPSERVER + if( OGL_INIT() ) + { + mpOGL->OGLEntry( PGRAPHICS ); + pImplOpenGLFncCopyTexSubImage2D( target, level, xoffset, yoffset, x, y, width, height ); + mpOGL->OGLExit( PGRAPHICS ); + } +- +-#else +-#endif + } + + // ------------------------------------------------------------------------ + + void OpenGL::PixelTransferf( GLenum pname, GLfloat param ) + { +-#ifndef REMOTE_APPSERVER + if( OGL_INIT() ) + { + mpOGL->OGLEntry( PGRAPHICS ); + pImplOpenGLFncPixelTransferf( pname, param ); + mpOGL->OGLExit( PGRAPHICS ); + } +-#else +-#endif + } + + // ------------------------------------------------------------------------ + + void OpenGL::PixelTransferi( GLenum pname, GLint param ) + { +-#ifndef REMOTE_APPSERVER + if( OGL_INIT() ) + { + mpOGL->OGLEntry( PGRAPHICS ); + pImplOpenGLFncPixelTransferi( pname, param ); + mpOGL->OGLExit( PGRAPHICS ); + } +-#else +-#endif + } + + // ------------------------------------------------------------------------ + + void OpenGL::GetTexLevelParameterfv( GLenum target, GLint level, GLenum pname, GLfloat *params ) + { +-#ifndef REMOTE_APPSERVER + if( OGL_INIT() ) + { + mpOGL->OGLEntry( PGRAPHICS ); + pImplOpenGLFncGetTexLevelParameterfv( target, level, pname, params ); + mpOGL->OGLExit( PGRAPHICS ); + } +-#else +-#endif + } + + // ------------------------------------------------------------------------ + + void OpenGL::GetTexLevelParameteriv( GLenum target, GLint level, GLenum pname, GLint *params ) + { +-#ifndef REMOTE_APPSERVER + if( OGL_INIT() ) + { + mpOGL->OGLEntry( PGRAPHICS ); + pImplOpenGLFncGetTexLevelParameteriv( target, level, pname, params ); + mpOGL->OGLExit( PGRAPHICS ); + } +-#else +-#endif + } + + // ------------------------------------------------------------------------ + + void OpenGL::GetTexParameterfv( GLenum target, GLenum pname, GLfloat *params ) + { +-#ifndef REMOTE_APPSERVER + if( OGL_INIT() ) + { + mpOGL->OGLEntry( PGRAPHICS ); + pImplOpenGLFncGetTexParameterfv( target, pname, params ); + mpOGL->OGLExit( PGRAPHICS ); + } +-#else +-#endif + } + + // ------------------------------------------------------------------------ + + void OpenGL::GetTexParameteriv( GLenum target, GLenum pname, GLint *params ) + { +-#ifndef REMOTE_APPSERVER + if( OGL_INIT() ) + { + mpOGL->OGLEntry( PGRAPHICS ); + pImplOpenGLFncGetTexParameteriv( target, pname, params ); + mpOGL->OGLExit( PGRAPHICS ); + } +-#else +-#endif + } + + // ------------------------------------------------------------------------ + + void OpenGL::TexSubImage1D( GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels ) + { +-#ifndef REMOTE_APPSERVER + if( OGL_INIT() ) + { + mpOGL->OGLEntry( PGRAPHICS ); + pImplOpenGLFncTexSubImage1D( target, level, xoffset, width, format, type, pixels ); + mpOGL->OGLExit( PGRAPHICS ); + } +-#else +-#endif + } + + // ------------------------------------------------------------------------ + + void OpenGL::TexSubImage2D( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels ) + { +-#ifndef REMOTE_APPSERVER + if( OGL_INIT() ) + { + mpOGL->OGLEntry( PGRAPHICS ); + pImplOpenGLFncTexSubImage2D( target, level, xoffset, yoffset, width, height, format, type, pixels ); + mpOGL->OGLExit( PGRAPHICS ); + } +-#else +-#endif + } + + // ------------------------------------------------------------------------ + + void OpenGL::PixelStoref( GLenum pname, GLfloat param ) + { +-#ifndef REMOTE_APPSERVER + if( OGL_INIT() ) + { + mpOGL->OGLEntry( PGRAPHICS ); + pImplOpenGLFncPixelStoref( pname, param ); + mpOGL->OGLExit( PGRAPHICS ); + } +-#else +-#endif + } + + // ------------------------------------------------------------------------ + + void OpenGL::PixelStorei( GLenum pname, GLint param ) + { +-#ifndef REMOTE_APPSERVER + if( OGL_INIT() ) + { + mpOGL->OGLEntry( PGRAPHICS ); + pImplOpenGLFncPixelStorei( pname, param ); + mpOGL->OGLExit( PGRAPHICS ); + } +-#else +-#endif + } + + // ------------------------------------------------------------------------ + + void OpenGL::GenTextures( GLsizei n, GLuint *textures ) + { +-#ifndef REMOTE_APPSERVER + if( OGL_INIT() ) + { + mpOGL->OGLEntry( PGRAPHICS ); + pImplOpenGLFncGenTextures( n, textures ); + mpOGL->OGLExit( PGRAPHICS ); + } +-#else +-#endif + } + + // ------------------------------------------------------------------------ +@@ -1185,16 +1027,12 @@ GLboolean OpenGL::IsTexture( GLuint text + { + GLboolean bRet = FALSE; + +-#ifndef REMOTE_APPSERVER + if( OGL_INIT() ) + { + mpOGL->OGLEntry( PGRAPHICS ); + bRet = pImplOpenGLFncIsTexture( texture ); + mpOGL->OGLExit( PGRAPHICS ); + } +-#else +-#endif +- + return bRet; + } + +@@ -1202,30 +1040,24 @@ GLboolean OpenGL::IsTexture( GLuint text + + void OpenGL::BindTexture( GLenum target, GLuint texture ) + { +-#ifndef REMOTE_APPSERVER + if( OGL_INIT() ) + { + mpOGL->OGLEntry( PGRAPHICS ); + pImplOpenGLFncBindTexture( target, texture ); + mpOGL->OGLExit( PGRAPHICS ); + } +-#else +-#endif + } + + // ------------------------------------------------------------------------ + + void OpenGL::DeleteTextures( GLsizei n, const GLuint *textures ) + { +-#ifndef REMOTE_APPSERVER + if( OGL_INIT() ) + { + mpOGL->OGLEntry( PGRAPHICS ); + pImplOpenGLFncDeleteTextures( n, textures ); + mpOGL->OGLExit( PGRAPHICS ); + } +-#else +-#endif + } + + // ------------------------------------------------------------------------ +@@ -1233,17 +1065,12 @@ void OpenGL::DeleteTextures( GLsizei n, + GLboolean OpenGL::AreTexturesResident( GLsizei n, const GLuint *textures, GLboolean *residences ) + { + GLboolean bRet = FALSE; +- +-#ifndef REMOTE_APPSERVER + if( OGL_INIT() ) + { + mpOGL->OGLEntry( PGRAPHICS ); + bRet = pImplOpenGLFncAreTexturesResident( n, textures, residences ); + mpOGL->OGLExit( PGRAPHICS ); + } +-#else +-#endif +- + return bRet; + } + +@@ -1251,262 +1078,210 @@ GLboolean OpenGL::AreTexturesResident( G + + void OpenGL::PrioritizeTextures( GLsizei n, const GLuint *textures, const GLclampf *priorities ) + { +-#ifndef REMOTE_APPSERVER + if( OGL_INIT() ) + { + mpOGL->OGLEntry( PGRAPHICS ); + pImplOpenGLFncPrioritizeTextures( n, textures, priorities ); + mpOGL->OGLExit( PGRAPHICS ); + } +-#else +-#endif + } + + // ------------------------------------------------------------------------ + + void OpenGL::TexEnvf( GLenum target, GLenum pname, GLfloat param ) + { +-#ifndef REMOTE_APPSERVER + if( OGL_INIT() ) + { + mpOGL->OGLEntry( PGRAPHICS ); + pImplOpenGLFncTexEnvf( target, pname, param ); + mpOGL->OGLExit( PGRAPHICS ); + } +-#else +-#endif + } + + // ------------------------------------------------------------------------ + + void OpenGL::TexEnvfv( GLenum target, GLenum pname, const GLfloat *params ) + { +-#ifndef REMOTE_APPSERVER + if( OGL_INIT() ) + { + mpOGL->OGLEntry( PGRAPHICS ); + pImplOpenGLFncTexEnvfv( target, pname, params ); + mpOGL->OGLExit( PGRAPHICS ); + } +-#else +-#endif + } + + // ------------------------------------------------------------------------ + + void OpenGL::TexEnvi( GLenum target, GLenum pname, GLint param ) + { +-#ifndef REMOTE_APPSERVER + if( OGL_INIT() ) + { + mpOGL->OGLEntry( PGRAPHICS ); + pImplOpenGLFncTexEnvi( target, pname, param ); + mpOGL->OGLExit( PGRAPHICS ); + } +-#else +-#endif + } + + // ------------------------------------------------------------------------ + + void OpenGL::TexEnviv( GLenum target, GLenum pname, const GLint *params ) + { +-#ifndef REMOTE_APPSERVER + if( OGL_INIT() ) + { + mpOGL->OGLEntry( PGRAPHICS ); + pImplOpenGLFncTexEnviv( target, pname, params ); + mpOGL->OGLExit( PGRAPHICS ); + } +-#else +-#endif + } + + // ------------------------------------------------------------------------ + + void OpenGL::TexParameterf( GLenum target, GLenum pname, GLfloat param ) + { +-#ifndef REMOTE_APPSERVER + if( OGL_INIT() ) + { + mpOGL->OGLEntry( PGRAPHICS ); + pImplOpenGLFncTexParameterf( target, pname, param ); + mpOGL->OGLExit( PGRAPHICS ); + } +-#else +-#endif + } + + // ------------------------------------------------------------------------ + + void OpenGL::TexParameterfv( GLenum target, GLenum pname, const GLfloat *params ) + { +-#ifndef REMOTE_APPSERVER + if( OGL_INIT() ) + { + mpOGL->OGLEntry( PGRAPHICS ); + pImplOpenGLFncTexParameterfv( target, pname, params ); + mpOGL->OGLExit( PGRAPHICS ); + } +-#else +-#endif + } + + // ------------------------------------------------------------------------ + + void OpenGL::TexParameteri( GLenum target, GLenum pname, GLint param ) + { +-#ifndef REMOTE_APPSERVER + if( OGL_INIT() ) + { + mpOGL->OGLEntry( PGRAPHICS ); + pImplOpenGLFncTexParameteri( target, pname, param ); + mpOGL->OGLExit( PGRAPHICS ); + } +-#else +-#endif + } + + // ------------------------------------------------------------------------ + + void OpenGL::TexParameteriv( GLenum target, GLenum pname, const GLint *params ) + { +-#ifndef REMOTE_APPSERVER + if( OGL_INIT() ) + { + mpOGL->OGLEntry( PGRAPHICS ); + pImplOpenGLFncTexParameteriv( target, pname, params ); + mpOGL->OGLExit( PGRAPHICS ); + } +-#else +-#endif + } + + // ------------------------------------------------------------------------ + + void OpenGL::TexGend( GLenum coord, GLenum pname, GLdouble param ) + { +-#ifndef REMOTE_APPSERVER + if( OGL_INIT() ) + { + mpOGL->OGLEntry( PGRAPHICS ); + pImplOpenGLFncTexGend( coord, pname, param ); + mpOGL->OGLExit( PGRAPHICS ); + } +-#else +-#endif + } + + // ------------------------------------------------------------------------ + + void OpenGL::TexGendv( GLenum coord, GLenum pname, const GLdouble *params ) + { +-#ifndef REMOTE_APPSERVER + if( OGL_INIT() ) + { + mpOGL->OGLEntry( PGRAPHICS ); + pImplOpenGLFncTexGendv( coord, pname, params ); + mpOGL->OGLExit( PGRAPHICS ); + } +-#else +-#endif + } + + // ------------------------------------------------------------------------ + + void OpenGL::TexGenf( GLenum coord, GLenum pname, GLfloat param ) + { +-#ifndef REMOTE_APPSERVER + if( OGL_INIT() ) + { + mpOGL->OGLEntry( PGRAPHICS ); + pImplOpenGLFncTexGenf( coord, pname, param ); + mpOGL->OGLExit( PGRAPHICS ); + } +-#else +-#endif + } + + // ------------------------------------------------------------------------ + + void OpenGL::TexGenfv( GLenum coord, GLenum pname, const GLfloat *params ) + { +-#ifndef REMOTE_APPSERVER + if( OGL_INIT() ) + { + mpOGL->OGLEntry( PGRAPHICS ); + pImplOpenGLFncTexGenfv( coord, pname, params ); + mpOGL->OGLExit( PGRAPHICS ); + } +-#else +-#endif + } + + // ------------------------------------------------------------------------ + + void OpenGL::TexGeni( GLenum coord, GLenum pname, GLint param ) + { +-#ifndef REMOTE_APPSERVER + if( OGL_INIT() ) + { + mpOGL->OGLEntry( PGRAPHICS ); + pImplOpenGLFncTexGeni( coord, pname, param ); + mpOGL->OGLExit( PGRAPHICS ); + } +-#else +-#endif + } + + // ------------------------------------------------------------------------ + + void OpenGL::TexGeniv( GLenum coord, GLenum pname, const GLint *params ) + { +-#ifndef REMOTE_APPSERVER + if( OGL_INIT() ) + { + mpOGL->OGLEntry( PGRAPHICS ); + pImplOpenGLFncTexGeniv( coord, pname, params ); + mpOGL->OGLExit( PGRAPHICS ); + } +-#else +-#endif + } + + // ------------------------------------------------------------------------ + + void OpenGL::GetIntegerv( GLenum pname, GLint *params ) + { +-#ifndef REMOTE_APPSERVER + if( OGL_INIT() ) + { + mpOGL->OGLEntry( PGRAPHICS ); + pImplOpenGLFncGetIntegerv( pname, params ); + mpOGL->OGLExit( PGRAPHICS ); + } +-#else +-#endif + } + + // ------------------------------------------------------------------------ + + void OpenGL::PolygonOffset( GLfloat factor, GLfloat units ) + { +-#ifndef REMOTE_APPSERVER + if( OGL_INIT() ) + { + mpOGL->OGLEntry( PGRAPHICS ); + pImplOpenGLFncPolygonOffset( factor, units ); + mpOGL->OGLExit( PGRAPHICS ); + } +-#else +-#endif + } + + // ------------------------------------------------------------------------ + + void OpenGL::Scissor( GLint nX, GLint nY, GLsizei nWidth, GLsizei nHeight ) + { +-#ifndef REMOTE_APPSERVER + if( OGL_INIT() ) + { + long nOutHeight; +@@ -1523,7 +1298,7 @@ void OpenGL::Scissor( GLint nX, GLint nY + { + long lx = nX + mpOutDev->mnOutOffX; + long lwidth = nWidth; +- ((SalGraphicsLayout*)mpOutDev->mpGraphics)->mirror( lx, lwidth, mpOutDev ); ++ mpOutDev->mpGraphics->mirror( lx, lwidth, mpOutDev ); + nX = lx - mpOutDev->mnOutOffX; + } + pImplOpenGLFncScissor( nX + mpOutDev->mnOutOffX, +@@ -1531,217 +1306,173 @@ void OpenGL::Scissor( GLint nX, GLint nY + nWidth, nHeight ); + mpOGL->OGLExit( PGRAPHICS ); + } +-#else +-#endif + } + + // ------------------------------------------------------------------------ + + void OpenGL::EnableClientState( GLenum array ) + { +-#ifndef REMOTE_APPSERVER + if( OGL_INIT() ) + { + mpOGL->OGLEntry( PGRAPHICS ); + pImplOpenGLFncEnableClientState( array ); + mpOGL->OGLExit( PGRAPHICS ); + } +-#else +-#endif + } + + // ------------------------------------------------------------------------ + + void OpenGL::DisableClientState( GLenum array ) + { +-#ifndef REMOTE_APPSERVER + if( OGL_INIT() ) + { + mpOGL->OGLEntry( PGRAPHICS ); + pImplOpenGLFncDisableClientState( array ); + mpOGL->OGLExit( PGRAPHICS ); + } +-#else +-#endif + } + + // ------------------------------------------------------------------------ + + void OpenGL::VertexPointer( GLint size, GLenum type, GLsizei stride, const GLvoid *pointer ) + { +-#ifndef REMOTE_APPSERVER + if( OGL_INIT() ) + { + mpOGL->OGLEntry( PGRAPHICS ); + pImplOpenGLFncVertexPointer( size, type, stride, pointer ); + mpOGL->OGLExit( PGRAPHICS ); + } +-#else +-#endif + } + + // ------------------------------------------------------------------------ + + void OpenGL::ColorPointer( GLint size, GLenum type, GLsizei stride, const GLvoid *pointer ) + { +-#ifndef REMOTE_APPSERVER + if( OGL_INIT() ) + { + mpOGL->OGLEntry( PGRAPHICS ); + pImplOpenGLFncColorPointer( size, type, stride, pointer ); + mpOGL->OGLExit( PGRAPHICS ); + } +-#else +-#endif + } + + // ------------------------------------------------------------------------ + + void OpenGL::IndexPointer( GLenum type, GLsizei stride, const GLvoid *pointer ) + { +-#ifndef REMOTE_APPSERVER + if( OGL_INIT() ) + { + mpOGL->OGLEntry( PGRAPHICS ); + pImplOpenGLFncIndexPointer( type, stride, pointer ); + mpOGL->OGLExit( PGRAPHICS ); + } +-#else +-#endif + } + + // ------------------------------------------------------------------------ + + void OpenGL::NormalPointer( GLenum type, GLsizei stride, const GLvoid *pointer ) + { +-#ifndef REMOTE_APPSERVER + if( OGL_INIT() ) + { + mpOGL->OGLEntry( PGRAPHICS ); + pImplOpenGLFncNormalPointer( type, stride, pointer ); + mpOGL->OGLExit( PGRAPHICS ); + } +-#else +-#endif + } + + // ------------------------------------------------------------------------ + + void OpenGL::TexCoordPointer( GLint size, GLenum type, GLsizei stride, const GLvoid *pointer ) + { +-#ifndef REMOTE_APPSERVER + if( OGL_INIT() ) + { + mpOGL->OGLEntry( PGRAPHICS ); + pImplOpenGLFncTexCoordPointer( size, type, stride, pointer ); + mpOGL->OGLExit( PGRAPHICS ); + } +-#else +-#endif + } + + // ------------------------------------------------------------------------ + + void OpenGL::EdgeFlagPointer( GLsizei stride, const GLvoid *pointer ) + { +-#ifndef REMOTE_APPSERVER + if( OGL_INIT() ) + { + mpOGL->OGLEntry( PGRAPHICS ); + pImplOpenGLFncEdgeFlagPointer( stride, pointer ); + mpOGL->OGLExit( PGRAPHICS ); + } +-#else +-#endif + } + + // ------------------------------------------------------------------------ + + void OpenGL::ArrayElement( GLint i ) + { +-#ifndef REMOTE_APPSERVER + if( OGL_INIT() ) + { + mpOGL->OGLEntry( PGRAPHICS ); + pImplOpenGLFncArrayElement( i ); + mpOGL->OGLExit( PGRAPHICS ); + } +-#else +-#endif + } + + // ------------------------------------------------------------------------ + + void OpenGL::DrawElements( GLenum mode, GLsizei count, GLenum type, const GLvoid *indices ) + { +-#ifndef REMOTE_APPSERVER + if( OGL_INIT() ) + { + mpOGL->OGLEntry( PGRAPHICS ); + pImplOpenGLFncDrawElements( mode, count, type, indices ); + mpOGL->OGLExit( PGRAPHICS ); + } +-#else +-#endif + } + + // ------------------------------------------------------------------------ + + void OpenGL::DrawArrays( GLenum mode, GLint first, GLsizei count ) + { +-#ifndef REMOTE_APPSERVER + if( OGL_INIT() ) + { + mpOGL->OGLEntry( PGRAPHICS ); + pImplOpenGLFncDrawArrays( mode, first, count ); + mpOGL->OGLExit( PGRAPHICS ); + } +-#else +-#endif + } + + // ------------------------------------------------------------------------ + + void OpenGL::InterleavedArrays( GLenum format, GLsizei stride, const GLvoid *pointer ) + { +-#ifndef REMOTE_APPSERVER + if( OGL_INIT() ) + { + mpOGL->OGLEntry( PGRAPHICS ); + pImplOpenGLFncInterleavedArrays( format, stride, pointer ); + mpOGL->OGLExit( PGRAPHICS ); + } +-#else +-#endif + } + + // ------------------------------------------------------------------------ + + void OpenGL::LoadIdentity( ) + { +-#ifndef REMOTE_APPSERVER + if( OGL_INIT() ) + { + mpOGL->OGLEntry( PGRAPHICS ); + pImplOpenGLFncLoadIdentity(); + mpOGL->OGLExit( PGRAPHICS ); + } +-#else +-#endif + } + + // ------------------------------------------------------------------------ + + void OpenGL::BlendFunc( GLenum sfactor, GLenum dfactor ) + { +-#ifndef REMOTE_APPSERVER + if( OGL_INIT() ) + { + mpOGL->OGLEntry( PGRAPHICS ); + pImplOpenGLFncBlendFunc( sfactor, dfactor); + mpOGL->OGLExit( PGRAPHICS ); + } +-#else +-#endif + } + +Index: vcl/source/gdi/outdev.cxx +=================================================================== +RCS file: /cvs/gsl/vcl/source/gdi/outdev.cxx,v +retrieving revision 1.23 +retrieving revision 1.29 +diff -u -p -u -r1.23 -r1.29 +--- vcl/source/gdi/outdev.cxx 24 Apr 2003 10:27:08 -0000 1.23 ++++ vcl/source/gdi/outdev.cxx 3 Feb 2004 16:45:04 -0000 1.29 +@@ -59,15 +59,10 @@ + * + ************************************************************************/ + +-#define _SV_OUTDEV_CXX + #include <tools/ref.hxx> +-#ifndef REMOTE_APPSERVER + #ifndef _SV_SVSYS_HXX + #include <svsys.h> + #endif +-#endif +- +-#ifndef REMOTE_APPSERVER + #ifndef _SV_SALGDI_HXX + #include <salgdi.hxx> + #endif +@@ -83,12 +78,6 @@ + #ifndef _SV_SALPRN_HXX + #include <salprn.hxx> + #endif +-#else +-#ifndef _SV_RMOUTDEV_HXX +-#include <rmoutdev.hxx> +-#endif +-#endif +- + #ifndef _DEBUG_HXX + #include <tools/debug.hxx> + #endif +@@ -153,8 +142,8 @@ + #include <com/sun/star/awt/XGraphics.hpp> + + DBG_NAME( OutputDevice ); +-DBG_NAMEEX( Polygon ); +-DBG_NAMEEX( PolyPolygon ); ++DBG_NAME( Polygon ); ++DBG_NAME( PolyPolygon ); + DBG_NAMEEX( Region ); + + // ----------------------------------------------------------------------- +@@ -184,19 +173,21 @@ const char* ImplDbgCheckOutputDevice( co + + struct ImplObjStack + { +- ImplObjStack* mpPrev; +- MapMode* mpMapMode; +- Region* mpClipRegion; +- Color* mpLineColor; +- Color* mpFillColor; +- Font* mpFont; +- Color* mpTextColor; +- Color* mpTextFillColor; +- Color* mpTextLineColor; +- Point* mpRefPoint; +- TextAlign meTextAlign; +- RasterOp meRasterOp; +- USHORT mnFlags; ++ ImplObjStack* mpPrev; ++ MapMode* mpMapMode; ++ Region* mpClipRegion; ++ Color* mpLineColor; ++ Color* mpFillColor; ++ Font* mpFont; ++ Color* mpTextColor; ++ Color* mpTextFillColor; ++ Color* mpTextLineColor; ++ Point* mpRefPoint; ++ TextAlign meTextAlign; ++ RasterOp meRasterOp; ++ ULONG mnTextLayoutMode; ++ LanguageType meTextLanguage; ++ USHORT mnFlags; + }; + + // ----------------------------------------------------------------------- +@@ -248,7 +239,6 @@ static void ImplDeleteObjStack( ImplObjS + + // ----------------------------------------------------------------------- + +-#ifndef REMOTE_APPSERVER + + BOOL OutputDevice::ImplSelectClipRegion( SalGraphics* pGraphics, const Region& rRegion, OutputDevice *pOutDev ) + { +@@ -277,7 +267,6 @@ BOOL OutputDevice::ImplSelectClipRegion( + return bClipRegion; + } + +-#endif + + // ======================================================================= + +@@ -305,7 +294,6 @@ PolyPolygon ImplSubdivideBezier( const P + + // ======================================================================= + +-#ifndef REMOTE_APPSERVER + // #100127# Extracted from OutputDevice::DrawPolyPolygon() + void OutputDevice::ImplDrawPolyPolygon( USHORT nPoly, const PolyPolygon& rPolyPoly ) + { +@@ -390,15 +378,14 @@ void OutputDevice::ImplDrawPolyPolygon( + delete[] pFlagAryAry; + } + } +-#endif + + // ======================================================================= + + OutputDevice::OutputDevice() : + maRegion( REGION_NULL ), +- maSettings( Application::GetSettings() ), + maFillColor( COL_WHITE ), +- maTextLineColor( COL_TRANSPARENT ) ++ maTextLineColor( COL_TRANSPARENT ), ++ maSettings( Application::GetSettings() ) + { + DBG_CTOR( OutputDevice, ImplDbgCheckOutputDevice ); + +@@ -416,6 +403,7 @@ OutputDevice::OutputDevice() : + mpOutDevData = NULL; + mp3DContext = NULL; + mpPDFWriter = NULL; ++ mpAlphaVDev = NULL; + mnOutOffX = 0; + mnOutOffY = 0; + mnOutWidth = 0; +@@ -442,7 +430,6 @@ OutputDevice::OutputDevice() : + mbDevOutput = FALSE; + mbOutputClipped = FALSE; + maTextColor = maFont.GetColor(); +- maTextFillColorDummy= maFont.GetFillColor(); + meTextAlign = maFont.GetAlign(); + meRasterOp = ROP_OVERPAINT; + mnAntialiasing = 0; +@@ -523,6 +510,8 @@ OutputDevice::~OutputDevice() + mpFontList->Clear(); + delete mpFontList; + } ++ ++ delete mpAlphaVDev; + } + + // ----------------------------------------------------------------------- +@@ -540,17 +529,18 @@ void OutputDevice::EnableRTL( BOOL bEnab + if( ImplGetGraphics() ) + mpGraphics->SetLayout( mbEnableRTL ? SAL_LAYOUT_BIDI_RTL : 0 ); + } ++ ++ if( mpAlphaVDev ) ++ mpAlphaVDev->EnableRTL( bEnable ); + } + + BOOL OutputDevice::ImplHasMirroredGraphics() + { +-#ifndef REMOTE_APPSERVER + return ( ImplGetGraphics() && (mpGraphics->GetLayout() & SAL_LAYOUT_BIDI_RTL) ); +-#else +- return FALSE; +-#endif + } + ++// note: the coordiantes to be remirrored are in frame coordiantes ! ++ + void OutputDevice::ImplReMirror( Point &rPoint ) const + { + rPoint.X() = mnOutOffX + mnOutWidth - 1 - rPoint.X() + mnOutOffX; +@@ -590,8 +580,6 @@ void OutputDevice::ImplReMirror( Regi + + // ----------------------------------------------------------------------- + +-#ifndef REMOTE_APPSERVER +- + int OutputDevice::ImplGetGraphics() const + { + DBG_TESTSOLARMUTEX(); +@@ -824,8 +812,6 @@ void OutputDevice::ImplReleaseGraphics( + } + } + +-#endif +- + // ----------------------------------------------------------------------- + + void OutputDevice::ImplInitOutDevData() +@@ -871,7 +857,6 @@ void OutputDevice::ImplInitLineColor() + { + DBG_TESTSOLARMUTEX(); + +-#ifndef REMOTE_APPSERVER + if( mbLineColor ) + { + if( ROP_0 == meRasterOp ) +@@ -885,9 +870,6 @@ void OutputDevice::ImplInitLineColor() + } + else + mpGraphics->SetLineColor(); +-#else +- mpGraphics->SetLineColor( maLineColor ); +-#endif + + mbInitLineColor = FALSE; + } +@@ -898,7 +880,6 @@ void OutputDevice::ImplInitFillColor() + { + DBG_TESTSOLARMUTEX(); + +-#ifndef REMOTE_APPSERVER + if( mbFillColor ) + { + if( ROP_0 == meRasterOp ) +@@ -912,9 +893,6 @@ void OutputDevice::ImplInitFillColor() + } + else + mpGraphics->SetFillColor(); +-#else +- mpGraphics->SetFillColor( maFillColor ); +-#endif + + mbInitFillColor = FALSE; + } +@@ -950,11 +928,7 @@ void OutputDevice::ImplInitClipRegion() + else + { + mbOutputClipped = FALSE; +-#ifndef REMOTE_APPSERVER + ImplSelectClipRegion( mpGraphics, aRegion, this ); +-#else +- mpGraphics->SetClipRegion( aRegion ); +-#endif + } + mbClipRegionSet = TRUE; + } +@@ -967,13 +941,9 @@ void OutputDevice::ImplInitClipRegion() + else + { + mbOutputClipped = FALSE; +-#ifndef REMOTE_APPSERVER + ImplSelectClipRegion( mpGraphics, + // #102532# Respect output offset also for clip region + ImplPixelToDevicePixel( maRegion ), this ); +-#else +- mpGraphics->SetClipRegion( maRegion ); +-#endif + } + + mbClipRegionSet = TRUE; +@@ -982,11 +952,7 @@ void OutputDevice::ImplInitClipRegion() + { + if ( mbClipRegionSet ) + { +-#ifndef REMOTE_APPSERVER + mpGraphics->ResetClipRegion(); +-#else +- mpGraphics->SetClipRegion(); +-#endif + mbClipRegionSet = FALSE; + } + +@@ -1031,6 +997,9 @@ void OutputDevice::SetClipRegion() + mpMetaFile->AddAction( new MetaClipRegionAction( Region(), FALSE ) ); + + ImplSetClipRegion( NULL ); ++ ++ if( mpAlphaVDev ) ++ mpAlphaVDev->SetClipRegion(); + } + + // ----------------------------------------------------------------------- +@@ -1051,6 +1020,9 @@ void OutputDevice::SetClipRegion( const + Region aRegion = LogicToPixel( rRegion ); + ImplSetClipRegion( &aRegion ); + } ++ ++ if( mpAlphaVDev ) ++ mpAlphaVDev->SetClipRegion( rRegion ); + } + + // ----------------------------------------------------------------------- +@@ -1101,6 +1073,9 @@ void OutputDevice::MoveClipRegion( long + ImplLogicHeightToDevicePixel( nVertMove ) ); + mbInitClipRegion = TRUE; + } ++ ++ if( mpAlphaVDev ) ++ mpAlphaVDev->MoveClipRegion( nHorzMove, nVertMove ); + } + + // ----------------------------------------------------------------------- +@@ -1117,6 +1092,9 @@ void OutputDevice::IntersectClipRegion( + maRegion.Intersect( aRect ); + mbClipRegion = TRUE; + mbInitClipRegion = TRUE; ++ ++ if( mpAlphaVDev ) ++ mpAlphaVDev->IntersectClipRegion( rRect ); + } + + // ----------------------------------------------------------------------- +@@ -1139,6 +1117,9 @@ void OutputDevice::IntersectClipRegion( + mbClipRegion = TRUE; + mbInitClipRegion = TRUE; + } ++ ++ if( mpAlphaVDev ) ++ mpAlphaVDev->IntersectClipRegion( rRegion ); + } + + // ----------------------------------------------------------------------- +@@ -1149,6 +1130,9 @@ void OutputDevice::SetDrawMode( ULONG nD + DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice ); + + mnDrawMode = nDrawMode; ++ ++ if( mpAlphaVDev ) ++ mpAlphaVDev->SetDrawMode( nDrawMode ); + } + + // ----------------------------------------------------------------------- +@@ -1166,15 +1150,12 @@ void OutputDevice::SetRasterOp( RasterOp + meRasterOp = eRasterOp; + mbInitLineColor = mbInitFillColor = TRUE; + +-#ifndef REMOTE_APPSERVER + if( mpGraphics || ImplGetGraphics() ) + mpGraphics->SetXORMode( (ROP_INVERT == meRasterOp) || (ROP_XOR == meRasterOp) ); +-#else +- ImplServerGraphics* pGraphics = ImplGetServerGraphics(); +- if( pGraphics ) +- pGraphics->SetRasterOp( eRasterOp ); +-#endif + } ++ ++ if( mpAlphaVDev ) ++ mpAlphaVDev->SetRasterOp( eRasterOp ); + } + + // ----------------------------------------------------------------------- +@@ -1193,6 +1174,9 @@ void OutputDevice::SetLineColor() + mbLineColor = FALSE; + maLineColor = Color( COL_TRANSPARENT ); + } ++ ++ if( mpAlphaVDev ) ++ mpAlphaVDev->SetLineColor(); + } + + // ----------------------------------------------------------------------- +@@ -1258,6 +1242,9 @@ void OutputDevice::SetLineColor( const C + maLineColor = aColor; + } + } ++ ++ if( mpAlphaVDev ) ++ mpAlphaVDev->SetLineColor( COL_BLACK ); + } + + // ----------------------------------------------------------------------- +@@ -1276,6 +1263,9 @@ void OutputDevice::SetFillColor() + mbFillColor = FALSE; + maFillColor = Color( COL_TRANSPARENT ); + } ++ ++ if( mpAlphaVDev ) ++ mpAlphaVDev->SetFillColor(); + } + + // ----------------------------------------------------------------------- +@@ -1345,6 +1335,9 @@ void OutputDevice::SetFillColor( const C + maFillColor = aColor; + } + } ++ ++ if( mpAlphaVDev ) ++ mpAlphaVDev->SetFillColor( COL_BLACK ); + } + + // ----------------------------------------------------------------------- +@@ -1356,6 +1349,9 @@ void OutputDevice::SetBackground() + + maBackground = Wallpaper(); + mbBackground = FALSE; ++ ++ if( mpAlphaVDev ) ++ mpAlphaVDev->SetBackground(); + } + + // ----------------------------------------------------------------------- +@@ -1371,6 +1367,9 @@ void OutputDevice::SetBackground( const + mbBackground = FALSE; + else + mbBackground = TRUE; ++ ++ if( mpAlphaVDev ) ++ mpAlphaVDev->SetBackground( rBackground ); + } + + // ----------------------------------------------------------------------- +@@ -1385,6 +1384,9 @@ void OutputDevice::SetRefPoint() + + mbRefPoint = FALSE; + maRefPoint.X() = maRefPoint.Y() = 0L; ++ ++ if( mpAlphaVDev ) ++ mpAlphaVDev->SetRefPoint(); + } + + // ----------------------------------------------------------------------- +@@ -1399,6 +1401,9 @@ void OutputDevice::SetRefPoint( const Po + + mbRefPoint = TRUE; + maRefPoint = rRefPoint; ++ ++ if( mpAlphaVDev ) ++ mpAlphaVDev->SetRefPoint( rRefPoint ); + } + + // ----------------------------------------------------------------------- +@@ -1414,7 +1419,6 @@ void OutputDevice::DrawLine( const Point + if ( !IsDeviceOutputNecessary() || !mbLineColor || ImplIsRecordLayout() ) + return; + +-#ifndef REMOTE_APPSERVER + if ( !mpGraphics ) + { + if ( !ImplGetGraphics() ) +@@ -1433,16 +1437,9 @@ void OutputDevice::DrawLine( const Point + Point aEndPt = ImplLogicToDevicePixel( rEndPt ); + + mpGraphics->DrawLine( aStartPt.X(), aStartPt.Y(), aEndPt.X(), aEndPt.Y(), this ); +-#else +- ImplServerGraphics* pGraphics = ImplGetServerGraphics(); +- if ( pGraphics ) +- { +- if ( mbInitLineColor ) +- ImplInitLineColor(); +- pGraphics->DrawLine( ImplLogicToDevicePixel( rStartPt ), +- ImplLogicToDevicePixel( rEndPt ) ); +- } +-#endif ++ ++ if( mpAlphaVDev ) ++ mpAlphaVDev->DrawLine( rStartPt, rEndPt ); + } + + // ----------------------------------------------------------------------- +@@ -1465,8 +1462,6 @@ void OutputDevice::DrawLine( const Point + if ( !IsDeviceOutputNecessary() || !mbLineColor || ( LINE_NONE == rLineInfo.GetStyle() ) || ImplIsRecordLayout() ) + return; + +-#ifndef REMOTE_APPSERVER +- + if( !mpGraphics && !ImplGetGraphics() ) + return; + +@@ -1523,60 +1518,8 @@ void OutputDevice::DrawLine( const Point + mpGraphics->DrawLine( aStartPt.X(), aStartPt.Y(), aEndPt.X(), aEndPt.Y(), this ); + } + +-#else +- +- ImplServerGraphics* pGraphics = ImplGetServerGraphics(); +- if ( pGraphics ) +- { +- const LineInfo aInfo( ImplLogicToDevicePixel( rLineInfo ) ); +- +- if( ( aInfo.GetWidth() > 1L ) || ( LINE_DASH == aInfo.GetStyle() ) ) +- { +- Polygon aPoly( 2 ); aPoly[ 0 ] = rStartPt; aPoly[ 1 ] = rEndPt; +- GDIMetaFile* pOldMetaFile = mpMetaFile; +- ImplLineConverter aLineCvt( ImplLogicToDevicePixel( aPoly ), aInfo, ( mbRefPoint ) ? &maRefPoint : NULL ); +- +- mpMetaFile = NULL; +- +- if ( aInfo.GetWidth() > 1 ) +- { +- const Color aOldLineColor( maLineColor ); +- const Color aOldFillColor( maFillColor ); +- +- SetLineColor(); +- ImplInitLineColor(); +- SetFillColor( aOldLineColor ); +- ImplInitFillColor(); +- +- for( const Polygon* pPoly = aLineCvt.ImplGetFirst(); pPoly; pPoly = aLineCvt.ImplGetNext() ) +- pGraphics->DrawPolygon( *pPoly ); +- +- SetLineColor( aOldLineColor ); +- SetFillColor( aOldFillColor ); +- } +- else +- { +- if ( mbInitLineColor ) +- ImplInitLineColor(); +- +- for ( const Polygon* pPoly = aLineCvt.ImplGetFirst(); pPoly; pPoly = aLineCvt.ImplGetNext() ) { +- Point xPoint((*pPoly)[ 0 ].X(), (*pPoly)[ 0 ].Y()); +- Point yPoint((*pPoly)[ 1 ].X(), (*pPoly)[ 1 ].Y()); +- mpGraphics->DrawLine( xPoint, yPoint ); +- } +- } +- mpMetaFile = pOldMetaFile; +- } +- else +- { +- if ( mbInitLineColor ) +- ImplInitLineColor(); +- +- pGraphics->DrawLine( ImplLogicToDevicePixel( rStartPt ), ImplLogicToDevicePixel( rEndPt ) ); +- } +- } +- +-#endif ++ if( mpAlphaVDev ) ++ mpAlphaVDev->DrawLine( rStartPt, rEndPt, rLineInfo ); + } + + // ----------------------------------------------------------------------- +@@ -1598,7 +1541,6 @@ void OutputDevice::DrawRect( const Recta + return; + aRect.Justify(); + +-#ifndef REMOTE_APPSERVER + if ( !mpGraphics ) + { + if ( !ImplGetGraphics() ) +@@ -1616,17 +1558,9 @@ void OutputDevice::DrawRect( const Recta + ImplInitFillColor(); + + mpGraphics->DrawRect( aRect.Left(), aRect.Top(), aRect.GetWidth(), aRect.GetHeight(), this ); +-#else +- ImplServerGraphics* pGraphics = ImplGetServerGraphics(); +- if ( pGraphics ) +- { +- if ( mbInitLineColor ) +- ImplInitLineColor(); +- if ( mbInitFillColor ) +- ImplInitFillColor(); +- pGraphics->DrawRect( aRect ); +- } +-#endif ++ ++ if( mpAlphaVDev ) ++ mpAlphaVDev->DrawRect( rRect ); + } + + // ----------------------------------------------------------------------- +@@ -1645,7 +1579,6 @@ void OutputDevice::DrawPolyLine( const P + if ( !IsDeviceOutputNecessary() || !mbLineColor || (nPoints < 2) || ImplIsRecordLayout() ) + return; + +-#ifndef REMOTE_APPSERVER + // we need a graphics + if ( !mpGraphics ) + { +@@ -1679,22 +1612,9 @@ void OutputDevice::DrawPolyLine( const P + { + mpGraphics->DrawPolyLine( nPoints, pPtAry, this ); + } +-#else +- ImplServerGraphics* pGraphics = ImplGetServerGraphics(); +- if ( pGraphics ) +- { +- if ( mbInitLineColor ) +- ImplInitLineColor(); +- +- Polygon aPoly = ImplLogicToDevicePixel( rPoly ); + +- // #100127# TODO: maybe extend Polygon::operator>> +- if( aPoly.HasFlags() ) +- aPoly = ImplSubdivideBezier( aPoly ); +- +- pGraphics->DrawPolyLine( aPoly ); +- } +-#endif ++ if( mpAlphaVDev ) ++ mpAlphaVDev->DrawPolyLine( rPoly ); + } + + // ----------------------------------------------------------------------- +@@ -1728,7 +1648,6 @@ void OutputDevice::DrawPolyLine( const P + nPoints = aPoly.GetSize(); + } + +-#ifndef REMOTE_APPSERVER + // we need a graphics + if ( !mpGraphics && !ImplGetGraphics() ) + return; +@@ -1774,48 +1693,9 @@ void OutputDevice::DrawPolyLine( const P + else + mpGraphics->DrawPolyLine( nPoints, (const SalPoint*) aPoly.GetConstPointAry(), this ); + } +-#else +- ImplServerGraphics* pGraphics = ImplGetServerGraphics(); + +- if ( pGraphics ) +- { +- const LineInfo aInfo( ImplLogicToDevicePixel( rLineInfo ) ); +- +- if( aInfo.GetWidth() > 1L ) +- { +- const Color aOldLineColor( maLineColor ); +- const Color aOldFillColor( maFillColor ); +- GDIMetaFile* pOldMetaFile = mpMetaFile; +- ImplLineConverter aLineCvt( aPoly, aInfo, ( mbRefPoint ) ? &maRefPoint : NULL ); +- +- mpMetaFile = NULL; +- SetLineColor(); +- ImplInitLineColor(); +- SetFillColor( aOldLineColor ); +- ImplInitFillColor(); +- +- for( const Polygon* pPoly = aLineCvt.ImplGetFirst(); pPoly; pPoly = aLineCvt.ImplGetNext() ) +- pGraphics->DrawPolygon( *pPoly ); +- +- SetLineColor( aOldLineColor ); +- SetFillColor( aOldFillColor ); +- mpMetaFile = pOldMetaFile; +- } +- else +- { +- if ( mbInitLineColor ) +- ImplInitLineColor(); +- if ( LINE_DASH == aInfo.GetStyle() ) +- { +- ImplLineConverter aLineCvt( aPoly, aInfo, ( mbRefPoint ) ? &maRefPoint : NULL ); +- for( const Polygon* pPoly = aLineCvt.ImplGetFirst(); pPoly; pPoly = aLineCvt.ImplGetNext() ) +- pGraphics->DrawPolyLine( *pPoly ); +- } +- else +- pGraphics->DrawPolyLine( aPoly ); +- } +- } +-#endif ++ if( mpAlphaVDev ) ++ mpAlphaVDev->DrawPolyLine( rPoly, rLineInfo ); + } + + // ----------------------------------------------------------------------- +@@ -1834,7 +1714,6 @@ void OutputDevice::DrawPolygon( const Po + if ( !IsDeviceOutputNecessary() || (!mbLineColor && !mbFillColor) || (nPoints < 2) || ImplIsRecordLayout() ) + return; + +-#ifndef REMOTE_APPSERVER + // we need a graphics + if ( !mpGraphics ) + { +@@ -1870,24 +1749,8 @@ void OutputDevice::DrawPolygon( const Po + { + mpGraphics->DrawPolygon( nPoints, pPtAry, this ); + } +-#else +- ImplServerGraphics* pGraphics = ImplGetServerGraphics(); +- if ( pGraphics ) +- { +- if ( mbInitLineColor ) +- ImplInitLineColor(); +- if ( mbInitFillColor ) +- ImplInitFillColor(); +- +- Polygon aPoly = ImplLogicToDevicePixel( rPoly ); +- +- // #100127# TODO: maybe extend Polygon::operator>> +- if( aPoly.HasFlags() ) +- aPoly = ImplSubdivideBezier( aPoly ); +- +- pGraphics->DrawPolygon( aPoly ); +- } +-#endif ++ if( mpAlphaVDev ) ++ mpAlphaVDev->DrawPolygon( rPoly ); + } + + // ----------------------------------------------------------------------- +@@ -1906,7 +1769,6 @@ void OutputDevice::DrawPolyPolygon( cons + if ( !IsDeviceOutputNecessary() || (!mbLineColor && !mbFillColor) || !nPoly || ImplIsRecordLayout() ) + return; + +-#ifndef REMOTE_APPSERVER + // we need a graphics + if ( !mpGraphics ) + { +@@ -1945,47 +1807,8 @@ void OutputDevice::DrawPolyPolygon( cons + // ImplLogicToDevicePixel calls + ImplDrawPolyPolygon( nPoly, ImplLogicToDevicePixel( rPolyPoly ) ); + } +-#else +- ImplServerGraphics* pGraphics = ImplGetServerGraphics(); +- if ( pGraphics ) +- { +- if ( mbInitLineColor ) +- ImplInitLineColor(); +- +- if ( mbInitFillColor ) +- ImplInitFillColor(); +- if ( nPoly == 1 ) +- { +- Polygon aPoly = ImplLogicToDevicePixel( rPolyPoly.GetObject( 0 ) ); +- USHORT nSize = aPoly.GetSize(); +- if ( nSize >= 2 ) +- { +- // #100127# TODO: maybe extend Polygon::operator>> +- if( aPoly.HasFlags() ) +- aPoly = ImplSubdivideBezier( aPoly ); +- +- pGraphics->DrawPolygon( aPoly ); +- } +- } +- else +- { +- PolyPolygon aPolyPoly = ImplLogicToDevicePixel( rPolyPoly ); +- +- USHORT i, nPoints = aPolyPoly.Count(); +- for( i=0; i<nPoints; ++i ) +- { +- if( aPolyPoly.GetObject( i ).HasFlags() ) +- { +- // #100127# TODO: maybe extend Polygon::operator>> +- aPolyPoly = ImplSubdivideBezier( aPolyPoly ); +- break; +- } +- } +- +- pGraphics->DrawPolyPolygon( aPolyPoly ); +- } +- } +-#endif ++ if( mpAlphaVDev ) ++ mpAlphaVDev->DrawPolyPolygon( rPolyPoly ); + } + + // ----------------------------------------------------------------------- +@@ -2038,6 +1861,10 @@ void OutputDevice::Push( USHORT nFlags ) + } + if ( nFlags & PUSH_TEXTALIGN ) + pData->meTextAlign = GetTextAlign(); ++ if( nFlags & PUSH_TEXTLAYOUTMODE ) ++ pData->mnTextLayoutMode = GetLayoutMode(); ++ if( nFlags & PUSH_TEXTLANGUAGE ) ++ pData->meTextLanguage = GetDigitLanguage(); + if ( nFlags & PUSH_RASTEROP ) + pData->meRasterOp = GetRasterOp(); + if ( nFlags & PUSH_MAPMODE ) +@@ -2061,6 +1888,9 @@ void OutputDevice::Push( USHORT nFlags ) + else + pData->mpRefPoint = NULL; + } ++ ++ if( mpAlphaVDev ) ++ mpAlphaVDev->Push(); + } + + // ----------------------------------------------------------------------- +@@ -2083,6 +1913,9 @@ void OutputDevice::Pop() + return; + } + ++ if( mpAlphaVDev ) ++ mpAlphaVDev->Pop(); ++ + mpObjStack = pData->mpPrev; + + if ( pData->mnFlags & PUSH_LINECOLOR ) +@@ -2119,6 +1952,10 @@ void OutputDevice::Pop() + } + if ( pData->mnFlags & PUSH_TEXTALIGN ) + SetTextAlign( pData->meTextAlign ); ++ if( pData->mnFlags & PUSH_TEXTLAYOUTMODE ) ++ SetLayoutMode( pData->mnTextLayoutMode ); ++ if( pData->mnFlags & PUSH_TEXTLANGUAGE ) ++ SetDigitLanguage( pData->meTextLanguage ); + if ( pData->mnFlags & PUSH_RASTEROP ) + SetRasterOp( pData->meRasterOp ); + if ( pData->mnFlags & PUSH_MAPMODE ) +@@ -2145,6 +1982,33 @@ void OutputDevice::Pop() + + // ----------------------------------------------------------------------- + ++void OutputDevice::SetConnectMetaFile( GDIMetaFile* pMtf ) ++{ ++ mpMetaFile = pMtf; ++} ++ ++// ----------------------------------------------------------------------- ++ ++void OutputDevice::EnableOutput( BOOL bEnable ) ++{ ++ mbOutput = (bEnable != 0); ++ ++ if( mpAlphaVDev ) ++ mpAlphaVDev->EnableOutput( bEnable ); ++} ++ ++// ----------------------------------------------------------------------- ++ ++void OutputDevice::SetSettings( const AllSettings& rSettings ) ++{ ++ maSettings = rSettings; ++ ++ if( mpAlphaVDev ) ++ mpAlphaVDev->SetSettings( rSettings ); ++} ++ ++// ----------------------------------------------------------------------- ++ + USHORT OutputDevice::GetBitCount() const + { + DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice ); +@@ -2152,20 +2016,33 @@ USHORT OutputDevice::GetBitCount() const + if ( meOutDevType == OUTDEV_VIRDEV ) + return ((VirtualDevice*)this)->mnBitCount; + +-#ifndef REMOTE_APPSERVER + // we need a graphics + if ( !mpGraphics ) + { + if ( !((OutputDevice*)this)->ImplGetGraphics() ) + return 0; + } +-#endif + + return (USHORT)mpGraphics->GetBitCount(); + } + + // ----------------------------------------------------------------------- + ++USHORT OutputDevice::GetAlphaBitCount() const ++{ ++ DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice ); ++ ++ if ( meOutDevType == OUTDEV_VIRDEV && ++ mpAlphaVDev != NULL ) ++ { ++ return mpAlphaVDev->GetBitCount(); ++ } ++ ++ return 0; ++} ++ ++// ----------------------------------------------------------------------- ++ + ULONG OutputDevice::GetColorCount() const + { + DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice ); +@@ -2176,11 +2053,17 @@ ULONG OutputDevice::GetColorCount() cons + + // ----------------------------------------------------------------------- + ++BOOL OutputDevice::HasAlpha() ++{ ++ return mpAlphaVDev != NULL; ++} ++ ++// ----------------------------------------------------------------------- ++ + OpenGL* OutputDevice::GetOpenGL() + { + DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice ); + +-#ifndef REMOTE_APPSERVER + OpenGL* pOGL; + + if( OUTDEV_PRINTER != meOutDevType ) +@@ -2197,9 +2080,6 @@ OpenGL* OutputDevice::GetOpenGL() + pOGL = NULL; + + return pOGL; +-#else +- return NULL; +-#endif + } + + // ----------------------------------------------------------------------- +Index: vcl/source/gdi/outdev2.cxx +=================================================================== +RCS file: /cvs/gsl/vcl/source/gdi/outdev2.cxx,v +retrieving revision 1.13.112.1 +retrieving revision 1.22 +diff -u -p -u -r1.13.112.1 -r1.22 +--- vcl/source/gdi/outdev2.cxx 15 Jan 2004 14:04:04 -0000 1.13.112.1 ++++ vcl/source/gdi/outdev2.cxx 24 May 2004 15:24:50 -0000 1.22 +@@ -59,8 +59,6 @@ + * + ************************************************************************/ + +-#define _SV_OUTDEV2_CXX +- + #ifndef _SV_SVSYS_HXX + #include <svsys.h> + #endif +@@ -112,12 +110,16 @@ + #ifndef _SV_WINDOW_HXX + #include <window.hxx> + #endif +-#ifdef REMOTE_APPSERVER +-#include <rmoutdev.hxx> +-#endif + #ifndef _SV_SALLAYOUT_HXX + #include <sallayout.hxx> + #endif ++#ifndef _SV_IMAGE_H ++#include <image.h> ++#endif ++#ifndef _SV_IMAGE_HXX ++#include <image.hxx> ++#endif ++ + #define BAND_MAX_SIZE 512000 + + // ======================================================================= +@@ -130,8 +132,6 @@ DBG_NAMEEX( OutputDevice ); + // - Defines - + // ----------- + +-#ifndef REMOTE_APPSERVER +- + #define OUTDEV_INIT() \ + { \ + if ( !IsDeviceOutputNecessary() ) \ +@@ -148,24 +148,7 @@ DBG_NAMEEX( OutputDevice ); + return; \ + } + +-#else // !REMOTE_APPSERVER +- +-#define OUTDEV_INIT() \ +-{ \ +- if ( !IsDeviceOutputNecessary() ) \ +- return; \ +- ImplServerGraphics* pGraphics = ImplGetServerGraphics(); \ +- if ( !pGraphics ) \ +- return; \ +-} +- +-#endif // REMOTE_APPSERVER +- +-#ifndef REMOTE_APPSERVER + #define TwoRect SalTwoRect +-#else +-#define TwoRect RemoteTwoRect +-#endif + + // ------------- + // - externals - +@@ -241,11 +224,7 @@ ULONG ImplAdjustTwoRect( TwoRect& rTwoRe + void OutputDevice::ImplDrawOutDevDirect( const OutputDevice* pSrcDev, void* pVoidPosAry ) + { + TwoRect* pPosAry = (TwoRect*)pVoidPosAry; +-#ifndef REMOTE_APPSERVER + SalGraphics* pGraphics2; +-#else +- ImplServerGraphics* pGraphics2; +-#endif + + if ( pPosAry->mnSrcWidth && pPosAry->mnSrcHeight && pPosAry->mnDestWidth && pPosAry->mnDestHeight ) + { +@@ -256,13 +235,11 @@ void OutputDevice::ImplDrawOutDevDirect( + if ( (GetOutDevType() != pSrcDev->GetOutDevType()) || + (GetOutDevType() != OUTDEV_WINDOW) ) + { +-#ifndef REMOTE_APPSERVER + if ( !pSrcDev->mpGraphics ) + { + if ( !((OutputDevice*)pSrcDev)->ImplGetGraphics() ) + return; + } +-#endif + pGraphics2 = pSrcDev->mpGraphics; + } + else +@@ -271,16 +248,13 @@ void OutputDevice::ImplDrawOutDevDirect( + pGraphics2 = NULL; + else + { +-#ifndef REMOTE_APPSERVER + if ( !pSrcDev->mpGraphics ) + { + if ( !((OutputDevice*)pSrcDev)->ImplGetGraphics() ) + return; + } +-#endif + pGraphics2 = pSrcDev->mpGraphics; + +-#ifndef REMOTE_APPSERVER + if ( !mpGraphics ) + { + if ( !ImplGetGraphics() ) +@@ -288,7 +262,6 @@ void OutputDevice::ImplDrawOutDevDirect( + } + DBG_ASSERT( mpGraphics && pSrcDev->mpGraphics, + "OutputDevice::DrawOutDev(): We need more than one Graphics" ); +-#endif + } + } + } +@@ -324,7 +297,7 @@ void OutputDevice::ImplDrawOutDevDirect( + if( (GetOutDevType() != OUTDEV_WINDOW) && pGraphics2 && (pGraphics2->GetLayout() & SAL_LAYOUT_BIDI_RTL) ) + { + SalTwoRect pPosAry2 = *pPosAry; +- ((SalGraphicsLayout*)pGraphics2)->mirror( pPosAry2.mnSrcX, pPosAry2.mnSrcWidth, pSrcDev ); ++ pGraphics2->mirror( pPosAry2.mnSrcX, pPosAry2.mnSrcWidth, pSrcDev ); + mpGraphics->CopyBits( &pPosAry2, pGraphics2, this, pSrcDev ); + } + else +@@ -401,6 +374,9 @@ void OutputDevice::DrawOutDev( const Poi + mpGraphics->CopyBits( &aPosAry, NULL, this, NULL ); + } + } ++ ++ if( mpAlphaVDev ) ++ mpAlphaVDev->DrawOutDev( rDestPt, rDestSize, rSrcPt, rSrcSize ); + } + + // ------------------------------------------------------------------ +@@ -442,7 +418,38 @@ void OutputDevice::DrawOutDev( const Poi + aPosAry.mnDestWidth = ImplLogicWidthToDevicePixel( rDestSize.Width() ); + aPosAry.mnDestHeight = ImplLogicHeightToDevicePixel( rDestSize.Height() ); + +- ImplDrawOutDevDirect( &rOutDev, &aPosAry ); ++ if( mpAlphaVDev ) ++ { ++ if( rOutDev.mpAlphaVDev ) ++ { ++ // alpha-blend source over destination ++ DrawBitmapEx( rDestPt, rDestSize, rOutDev.GetBitmapEx(rSrcPt, rSrcSize) ); ++ ++ // This would be mode SOURCE: ++ // copy source alpha channel to our alpha channel ++ //mpAlphaVDev->DrawOutDev( rDestPt, rDestSize, rSrcPt, rSrcSize, *rOutDev.mpAlphaVDev ); ++ } ++ else ++ { ++ ImplDrawOutDevDirect( &rOutDev, &aPosAry ); ++ ++ // make destination rectangle opaque - source has no alpha ++ mpAlphaVDev->DrawRect( Rectangle(rDestPt, rDestSize) ); ++ } ++ } ++ else ++ { ++ if( rOutDev.mpAlphaVDev ) ++ { ++ // alpha-blend source over destination ++ DrawBitmapEx( rDestPt, rDestSize, rOutDev.GetBitmapEx(rSrcPt, rSrcSize) ); ++ } ++ else ++ { ++ // no alpha at all, neither in source nor destination device ++ ImplDrawOutDevDirect( &rOutDev, &aPosAry ); ++ } ++ } + } + + // ------------------------------------------------------------------ +@@ -496,17 +503,10 @@ void OutputDevice::CopyArea( const Point + aPosAry.mnDestY-aPosAry.mnSrcY, + FALSE ); + +-#ifndef REMOTE_APPSERVER + mpGraphics->CopyArea( aPosAry.mnDestX, aPosAry.mnDestY, + aPosAry.mnSrcX, aPosAry.mnSrcY, + aPosAry.mnSrcWidth, aPosAry.mnSrcHeight, + SAL_COPYAREA_WINDOWINVALIDATE, this ); +-#else +- mpGraphics->CopyArea( aPosAry.mnDestX, aPosAry.mnDestY, +- aPosAry.mnSrcX, aPosAry.mnSrcY, +- aPosAry.mnSrcWidth, aPosAry.mnSrcHeight, +- COPYAREA_WINDOWINVALIDATE ); +-#endif + } + else + { +@@ -518,6 +518,9 @@ void OutputDevice::CopyArea( const Point + } + + SetRasterOp( eOldRop ); ++ ++ if( mpAlphaVDev ) ++ mpAlphaVDev->CopyArea( rDestPt, rSrcPt, rSrcSize, nFlags ); + } + + // ------------------------------------------------------------------ +@@ -534,7 +537,6 @@ void OutputDevice::ImplDrawFrameDev( con + mbMap = FALSE; + SetRasterOp( ROP_OVERPAINT ); + +-#ifndef REMOTE_APPSERVER + if ( !IsDeviceOutputNecessary() ) + return; + +@@ -543,24 +545,12 @@ void OutputDevice::ImplDrawFrameDev( con + if ( !ImplGetGraphics() ) + return; + } +-#else +- if ( !IsDeviceOutputNecessary() ) +- return; +- +-#endif + + // ClipRegion zuruecksetzen +-#ifndef REMOTE_APPSERVER + if ( rRegion.IsNull() ) + mpGraphics->ResetClipRegion(); + else + ImplSelectClipRegion( mpGraphics, rRegion, this ); +-#else +- if ( rRegion.IsNull() ) +- mpGraphics->SetClipRegion(); +- else +- mpGraphics->SetClipRegion( rRegion ); +-#endif + + TwoRect aPosAry; + aPosAry.mnSrcX = rDevPt.X(); +@@ -605,6 +595,9 @@ void OutputDevice::DrawBitmap( const Poi + + const Size aSizePix( rBitmap.GetSizePixel() ); + ImplDrawBitmap( rDestPt, PixelToLogic( aSizePix ), Point(), aSizePix, rBitmap, META_BMP_ACTION ); ++ ++ if( mpAlphaVDev ) ++ mpAlphaVDev->DrawRect( Rectangle(rDestPt, PixelToLogic( aSizePix )) ); + } + + // ------------------------------------------------------------------ +@@ -617,6 +610,9 @@ void OutputDevice::DrawBitmap( const Poi + return; + + ImplDrawBitmap( rDestPt, rDestSize, Point(), rBitmap.GetSizePixel(), rBitmap, META_BMPSCALE_ACTION ); ++ ++ if( mpAlphaVDev ) ++ mpAlphaVDev->DrawRect( Rectangle(rDestPt, rDestSize) ); + } + + // ------------------------------------------------------------------ +@@ -631,6 +627,9 @@ void OutputDevice::DrawBitmap( const Poi + return; + + ImplDrawBitmap( rDestPt, rDestSize, rSrcPtPixel, rSrcSizePixel, rBitmap, META_BMPSCALEPART_ACTION ); ++ ++ if( mpAlphaVDev ) ++ mpAlphaVDev->DrawRect( Rectangle(rDestPt, rDestSize) ); + } + + // ----------------------------------------------------------------------------- +@@ -721,15 +720,7 @@ void OutputDevice::ImplDrawBitmap( const + if ( nMirrFlags ) + aBmp.Mirror( nMirrFlags ); + +-#ifndef REMOTE_APPSERVER + mpGraphics->DrawBitmap( &aPosAry, *aBmp.ImplGetImpBitmap()->ImplGetSalBitmap(), this ); +-#else +- aBmp.ImplDrawRemote( this, +- Point( aPosAry.mnSrcX, aPosAry.mnSrcY ), +- Size( aPosAry.mnSrcWidth, aPosAry.mnSrcHeight ), +- Point( aPosAry.mnDestX, aPosAry.mnDestY ), +- Size( aPosAry.mnDestWidth, aPosAry.mnDestHeight ) ); +-#endif + } + } + } +@@ -873,13 +864,11 @@ void OutputDevice::ImplDrawBitmapEx( con + } + return; + } +-#ifndef REMOTE_APPSERVER + else if( rBitmapEx.IsAlpha() ) + { + ImplDrawAlpha( aBmpEx.GetBitmap(), aBmpEx.GetAlpha(), rDestPt, rDestSize, rSrcPtPixel, rSrcSizePixel ); + return; + } +-#endif + + if( !( !aBmpEx ) ) + { +@@ -898,7 +887,6 @@ void OutputDevice::ImplDrawBitmapEx( con + + if( aPosAry.mnSrcWidth && aPosAry.mnSrcHeight && aPosAry.mnDestWidth && aPosAry.mnDestHeight ) + { +-#ifndef REMOTE_APPSERVER + + if( nMirrFlags ) + aBmpEx.Mirror( nMirrFlags ); +@@ -967,22 +955,29 @@ void OutputDevice::ImplDrawBitmapEx( con + mpGraphics->DrawBitmap( &aPosAry, *pImpBmp->ImplGetSalBitmap(), + *pMaskBmp->ImplGetSalBitmap(), + this ); ++ ++ // #110958# Paint mask to alpha channel. Luckily, the ++ // black and white representation of the mask maps to ++ // the alpha channel ++ ++ // #i25167# Restrict mask painting to _opaque_ areas ++ // of the mask, otherwise we spoil areas where no ++ // bitmap content was ever visible. Interestingly ++ // enough, this can be achieved by taking the mask as ++ // the transparency mask of itself ++ if( mpAlphaVDev ) ++ mpAlphaVDev->DrawBitmapEx( rDestPt, ++ rDestSize, ++ BitmapEx( rBitmapEx.GetMask(), ++ rBitmapEx.GetMask() ) ); + } + else ++ { + mpGraphics->DrawBitmap( &aPosAry, *pImpBmp->ImplGetSalBitmap(), this ); + +-#else +- +- if( nMirrFlags ) +- aBmpEx.Mirror( nMirrFlags ); +- +- aBmpEx.ImplDrawRemote( this, +- Point( aPosAry.mnSrcX, aPosAry.mnSrcY ), +- Size( aPosAry.mnSrcWidth, aPosAry.mnSrcHeight ), +- Point( aPosAry.mnDestX, aPosAry.mnDestY ), +- Size( aPosAry.mnDestWidth, aPosAry.mnDestHeight ) ); +- +-#endif ++ if( mpAlphaVDev ) ++ mpAlphaVDev->DrawRect( Rectangle(rDestPt, rDestSize) ); ++ } + } + } + } +@@ -999,6 +994,10 @@ void OutputDevice::DrawMask( const Point + + const Size aSizePix( rBitmap.GetSizePixel() ); + ImplDrawMask( rDestPt, PixelToLogic( aSizePix ), Point(), aSizePix, rBitmap, rMaskColor, META_MASK_ACTION ); ++ ++ // TODO: Use mask here ++ if( mpAlphaVDev ) ++ mpAlphaVDev->DrawRect( Rectangle(rDestPt, PixelToLogic( aSizePix )) ); + } + + // ------------------------------------------------------------------ +@@ -1012,6 +1011,10 @@ void OutputDevice::DrawMask( const Point + return; + + ImplDrawMask( rDestPt, rDestSize, Point(), rBitmap.GetSizePixel(), rBitmap, rMaskColor, META_MASKSCALE_ACTION ); ++ ++ // TODO: Use mask here ++ if( mpAlphaVDev ) ++ mpAlphaVDev->DrawRect( Rectangle(rDestPt, rDestSize) ); + } + + // ------------------------------------------------------------------ +@@ -1026,6 +1029,10 @@ void OutputDevice::DrawMask( const Point + return; + + ImplDrawMask( rDestPt, rDestSize, rSrcPtPixel, rSrcSizePixel, rBitmap, rMaskColor, META_MASKSCALEPART_ACTION ); ++ ++ // TODO: Use mask here ++ if( mpAlphaVDev ) ++ mpAlphaVDev->DrawRect( Rectangle(rDestPt, rDestSize) ); + } + + // ------------------------------------------------------------------ +@@ -1066,16 +1073,13 @@ void OutputDevice::ImplDrawMask( const P + + OUTDEV_INIT(); + +-#ifndef REMOTE_APPSERVER + if ( OUTDEV_PRINTER == meOutDevType ) + { + ImplPrintMask( rBitmap, rMaskColor, rDestPt, rDestSize, rSrcPtPixel, rSrcSizePixel ); + return; + } +-#endif + + const ImpBitmap* pImpBmp = rBitmap.ImplGetImpBitmap(); +- + if ( pImpBmp ) + { + TwoRect aPosAry; +@@ -1146,13 +1214,10 @@ Bitmap OutputDevice::GetBitmap( const Po + long nWidth = ImplLogicWidthToDevicePixel( rSize.Width() ); + long nHeight = ImplLogicHeightToDevicePixel( rSize.Height() ); + +-#ifndef REMOTE_APPSERVER + if ( mpGraphics || ( (OutputDevice*) this )->ImplGetGraphics() ) +-#endif + { + if ( nWidth && nHeight ) + { +-#ifndef REMOTE_APPSERVER + Rectangle aRect( Point( nX, nY ), Size( nWidth, nHeight ) ); + BOOL bClipped = FALSE; + +@@ -1232,9 +1297,6 @@ Bitmap OutputDevice::GetBitmap( const Po + aBmp.ImplSetImpBitmap( pImpBmp ); + } + } +-#else +- aBmp.ImplGetRemoteBmp( (OutputDevice*) this, Point( nX, nY ), Size( nWidth, nHeight ) ); +-#endif + } + } + +@@ -1243,6 +1305,27 @@ Bitmap OutputDevice::GetBitmap( const Po + + // ------------------------------------------------------------------ + ++BitmapEx OutputDevice::GetBitmapEx( const Point& rSrcPt, const Size& rSize ) const ++{ ++ DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice ); ++ ++ // #110958# Extract alpha value from VDev, if any ++ if( mpAlphaVDev ) ++ { ++ Bitmap aAlphaBitmap( mpAlphaVDev->GetBitmap( rSrcPt, rSize ) ); ++ ++ // ensure 8 bit alpha ++ if( aAlphaBitmap.GetBitCount() > 8 ) ++ aAlphaBitmap.Convert( BMP_CONVERSION_8BIT_GREYS ); ++ ++ return BitmapEx(GetBitmap( rSrcPt, rSize ), AlphaMask( aAlphaBitmap ) ); ++ } ++ else ++ return GetBitmap( rSrcPt, rSize ); ++} ++ ++// ------------------------------------------------------------------ ++ + void OutputDevice::ImplGetFrameBitmap( const Point& rDestPt, const Size& rSize, + Bitmap& rBitmap ) const + { +@@ -1262,7 +1345,6 @@ Color OutputDevice::GetPixel( const Poin + + Color aColor; + +-#ifndef REMOTE_APPSERVER + if ( mpGraphics || ((OutputDevice*)this)->ImplGetGraphics() ) + { + if ( mbInitClipRegion ) +@@ -1278,16 +1360,6 @@ Color OutputDevice::GetPixel( const Poin + aColor.SetBlue( SALCOLOR_BLUE( aSalCol ) ); + } + } +-#else // REMOTE_APPSERVER +- ImplServerGraphics* pGraphics = ( (OutputDevice*) this )->ImplGetServerGraphics(); +- if( pGraphics ) +- { +- const long nX = ImplLogicXToDevicePixel( rPt.X() ); +- const long nY = ImplLogicYToDevicePixel( rPt.Y() ); +- aColor = pGraphics->GetPixel( Point( nX, nY ) ); +- } +-#endif // REMOTE_APPSERVER +- + return aColor; + } + +@@ -1302,7 +1374,6 @@ Color* OutputDevice::GetPixel( const Pol + + if( nSize ) + { +-#ifndef REMOTE_APPSERVER + if ( mpGraphics || ((OutputDevice*)this)->ImplGetGraphics() ) + { + if ( mbInitClipRegion ) +@@ -1325,13 +1396,6 @@ Color* OutputDevice::GetPixel( const Pol + } + } + } +-#else // REMOTE_APPSERVER +- ImplServerGraphics* pGraphics = ( (OutputDevice*) this )->ImplGetServerGraphics(); +- if( pGraphics ) +- { +- pColors = pGraphics->GetPixel( ImplLogicToDevicePixel( rPts ) ); +- } +-#endif // REMOTE_APPSERVER + } + + return pColors; +@@ -1350,7 +1414,6 @@ void OutputDevice::DrawPixel( const Poin + if ( !IsDeviceOutputNecessary() || !mbLineColor || ImplIsRecordLayout() ) + return; + +-#ifndef REMOTE_APPSERVER + Point aPt = ImplLogicToDevicePixel( rPt ); + + // we need a graphics +@@ -1369,15 +1432,9 @@ void OutputDevice::DrawPixel( const Poin + ImplInitLineColor(); + + mpGraphics->DrawPixel( aPt.X(), aPt.Y(), this ); +-#else +- ImplServerGraphics* pGraphics = ImplGetServerGraphics(); +- if ( pGraphics ) +- { +- if ( mbInitLineColor ) +- ImplInitLineColor(); +- pGraphics->DrawPixel( ImplLogicToDevicePixel( rPt ) ); +- } +-#endif ++ ++ if( mpAlphaVDev ) ++ mpAlphaVDev->DrawPixel( rPt ); + } + + // ----------------------------------------------------------------------- +@@ -1428,7 +1485,6 @@ void OutputDevice::DrawPixel( const Poin + if ( !IsDeviceOutputNecessary() || ImplIsColorTransparent( aColor ) || ImplIsRecordLayout() ) + return; + +-#ifndef REMOTE_APPSERVER + Point aPt = ImplLogicToDevicePixel( rPt ); + + // we need a graphics +@@ -1444,11 +1500,9 @@ void OutputDevice::DrawPixel( const Poin + return; + + mpGraphics->DrawPixel( aPt.X(), aPt.Y(), ImplColorToSal( aColor ), this ); +-#else +- ImplServerGraphics* pGraphics = ImplGetServerGraphics(); +- if ( pGraphics ) +- pGraphics->DrawPixel( ImplLogicToDevicePixel( rPt ), aColor ); +-#endif ++ ++ if( mpAlphaVDev ) ++ mpAlphaVDev->DrawPixel( rPt ); + } + + // ----------------------------------------------------------------------- +@@ -1474,7 +1528,6 @@ void OutputDevice::DrawPixel( const Poly + if ( !IsDeviceOutputNecessary() || ImplIsRecordLayout() ) + return; + +-#ifndef REMOTE_APPSERVER + // we need a graphics + if ( mpGraphics || ImplGetGraphics() ) + { +@@ -1490,15 +1543,11 @@ void OutputDevice::DrawPixel( const Poly + mpGraphics->DrawPixel( aPt.X(), aPt.Y(), ImplColorToSal( pColors[ i ] ), this ); + } + } +-#else +- ImplServerGraphics* pGraphics = ImplGetServerGraphics(); +- if ( pGraphics ) +- { +- pGraphics->DrawPixel( ImplLogicToDevicePixel( rPts ), pColors ); +- } +-#endif + } + } ++ ++ if( mpAlphaVDev ) ++ mpAlphaVDev->DrawPixel( rPts, pColors ); + } + + // ----------------------------------------------------------------------- +@@ -1516,6 +1565,9 @@ void OutputDevice::DrawPixel( const Poly + DrawPixel( rPts, pColArray ); + delete[] pColArray; + } ++ ++ if( mpAlphaVDev ) ++ mpAlphaVDev->DrawPixel( rPts, rColor ); + } + + // ------------------------------------------------------------------------ +@@ -1552,6 +1604,8 @@ void OutputDevice::ImplDrawAlpha( const + + if( !aDstRect.Intersection( Rectangle( aOutPt, aOutSz ) ).IsEmpty() ) + { ++ VirtualDevice* pOldVDev = mpAlphaVDev; ++ + Rectangle aBmpRect( aPt, rBmp.GetSizePixel() ); + + if( !aBmpRect.Intersection( Rectangle( rSrcPtPixel, rSrcSizePixel ) ).IsEmpty() ) +@@ -1567,6 +1621,11 @@ void OutputDevice::ImplDrawAlpha( const + // access) + aDstRect.SetSize( aBmp.GetSizePixel() ); + ++ // #110958# Disable alpha VDev, we're doing the necessary ++ // stuff explicitely furher below ++ if( mpAlphaVDev ) ++ mpAlphaVDev = NULL; ++ + BitmapColor aDstCol; + const long nSrcWidth = aBmpRect.GetWidth(), nSrcHeight = aBmpRect.GetHeight(); + const long nDstWidth = aDstRect.GetWidth(), nDstHeight = aDstRect.GetHeight(); +@@ -1600,12 +1659,17 @@ void OutputDevice::ImplDrawAlpha( const + pMapY[ nY ] = nMirrOffY - pMapY[ nY ]; + } + ++ BitmapReadAccess* pP = ( (Bitmap&) rBmp ).AcquireReadAccess(); ++ BitmapReadAccess* pA = ( (AlphaMask&) rAlpha ).AcquireReadAccess(); ++ ++ DBG_ASSERT( pA->GetScanlineFormat() == BMP_FORMAT_8BIT_PAL || ++ pA->GetScanlineFormat() == BMP_FORMAT_8BIT_TC_MASK, ++ "OutputDevice::ImplDrawAlpha(): non-8bit alpha no longer supported!" ); ++ + if( GetBitCount() <= 8 ) + { + Bitmap aDither( aBmp.GetSizePixel(), 8 ); + BitmapColor aIndex( 0 ); +- BitmapReadAccess* pP = ( (Bitmap&) rBmp ).AcquireReadAccess(); +- BitmapReadAccess* pA = ( (AlphaMask&) rAlpha ).AcquireReadAccess(); + BitmapReadAccess* pB = aBmp.AcquireReadAccess(); + BitmapWriteAccess* pW = aDither.AcquireWriteAccess(); + +@@ -1631,126 +1695,210 @@ void OutputDevice::ImplDrawAlpha( const + } + } + +- ( (Bitmap&) rBmp ).ReleaseAccess( pP ); +- ( (AlphaMask&) rAlpha ).ReleaseAccess( pA ); + aBmp.ReleaseAccess( pB ); + aDither.ReleaseAccess( pW ); + DrawBitmap( aDstRect.TopLeft(), aDither ); + } + else + { +- BitmapReadAccess* pP = ( (Bitmap&) rBmp ).AcquireReadAccess(); +- BitmapReadAccess* pA = ( (AlphaMask&) rAlpha ).AcquireReadAccess(); + BitmapWriteAccess* pB = aBmp.AcquireWriteAccess(); + + if( pP && pA && pB ) + { +- if( pA->GetScanlineFormat() == BMP_FORMAT_8BIT_PAL ) +- { +- switch( pP->GetScanlineFormat() ) +- { +- case( BMP_FORMAT_8BIT_PAL ): +- { +- for( nY = 0; nY < nDstHeight; nY++ ) +- { +- const long nMapY = pMapY[ nY ]; +- Scanline pPScan = pP->GetScanline( nMapY ); +- Scanline pAScan = pA->GetScanline( nMapY ); +- +- for( nX = 0; nX < nDstWidth; nX++ ) +- { +- const long nMapX = pMapX[ nX ]; +- aDstCol = pB->GetPixel( nY, nX ); +- pB->SetPixel( nY, nX, aDstCol.Merge( pP->GetPaletteColor( pPScan[ nMapX ] ), +- pAScan[ nMapX ] ) ); +- } +- } +- } +- break; +- +- case( BMP_FORMAT_24BIT_TC_BGR ): +- { +- for( nY = 0; nY < nDstHeight; nY++ ) +- { +- const long nMapY = pMapY[ nY ]; +- Scanline pPScan = pP->GetScanline( nMapY ); +- Scanline pAScan = pA->GetScanline( nMapY ); +- +- for( nX = 0; nX < nDstWidth; nX++ ) +- { +- const long nMapX = pMapX[ nX ]; +- Scanline pTmp = pPScan + nMapX * 3; +- +- aDstCol = pB->GetPixel( nY, nX ); +- pB->SetPixel( nY, nX, aDstCol.Merge( pTmp[ 2 ], pTmp[ 1 ], pTmp[ 0 ], +- pAScan[ nMapX ] ) ); +- } +- } +- } +- break; +- +- case( BMP_FORMAT_24BIT_TC_RGB ): +- { +- for( nY = 0; nY < nDstHeight; nY++ ) +- { +- const long nMapY = pMapY[ nY ]; +- Scanline pPScan = pP->GetScanline( nMapY ); +- Scanline pAScan = pA->GetScanline( nMapY ); +- +- for( nX = 0; nX < nDstWidth; nX++ ) +- { +- const long nMapX = pMapX[ nX ]; +- Scanline pTmp = pPScan + nMapX * 3; +- +- aDstCol = pB->GetPixel( nY, nX ); +- pB->SetPixel( nY, nX, aDstCol.Merge( pTmp[ 0 ], pTmp[ 1 ], pTmp[ 2 ], +- pAScan[ nMapX ] ) ); +- } +- } +- } +- break; +- +- default: +- { +- for( nY = 0; nY < nDstHeight; nY++ ) +- { +- const long nMapY = pMapY[ nY ]; +- Scanline pAScan = pA->GetScanline( nMapY ); +- +- for( nX = 0; nX < nDstWidth; nX++ ) +- { +- const long nMapX = pMapX[ nX ]; +- aDstCol = pB->GetPixel( nY, nX ); +- pB->SetPixel( nY, nX, aDstCol.Merge( pP->GetColor( nMapY, nMapX ), +- pAScan[ nMapX ] ) ); +- } +- } +- } +- break; +- } +- } +- else +- { +- for( nY = 0; nY < nDstHeight; nY++ ) +- { +- const long nMapY = pMapY[ nY ]; +- +- for( nX = 0; nX < nDstWidth; nX++ ) +- { +- const long nMapX = pMapX[ nX ]; +- aDstCol = pB->GetPixel( nY, nX ); +- pB->SetPixel( nY, nX, aDstCol.Merge( pP->GetColor( nMapY, nMapX ), +- (BYTE) pA->GetPixel( nMapY, nMapX ) ) ); +- } +- } +- } ++ switch( pP->GetScanlineFormat() ) ++ { ++ case( BMP_FORMAT_8BIT_PAL ): ++ { ++ for( nY = 0; nY < nDstHeight; nY++ ) ++ { ++ const long nMapY = pMapY[ nY ]; ++ Scanline pPScan = pP->GetScanline( nMapY ); ++ Scanline pAScan = pA->GetScanline( nMapY ); ++ ++ for( nX = 0; nX < nDstWidth; nX++ ) ++ { ++ const long nMapX = pMapX[ nX ]; ++ aDstCol = pB->GetPixel( nY, nX ); ++ pB->SetPixel( nY, nX, aDstCol.Merge( pP->GetPaletteColor( pPScan[ nMapX ] ), ++ pAScan[ nMapX ] ) ); ++ } ++ } ++ } ++ break; ++ ++ case( BMP_FORMAT_24BIT_TC_BGR ): ++ { ++ for( nY = 0; nY < nDstHeight; nY++ ) ++ { ++ const long nMapY = pMapY[ nY ]; ++ Scanline pPScan = pP->GetScanline( nMapY ); ++ Scanline pAScan = pA->GetScanline( nMapY ); ++ ++ for( nX = 0; nX < nDstWidth; nX++ ) ++ { ++ const long nMapX = pMapX[ nX ]; ++ Scanline pTmp = pPScan + nMapX * 3; ++ ++ aDstCol = pB->GetPixel( nY, nX ); ++ pB->SetPixel( nY, nX, aDstCol.Merge( pTmp[ 2 ], pTmp[ 1 ], pTmp[ 0 ], ++ pAScan[ nMapX ] ) ); ++ } ++ } ++ } ++ break; ++ ++ case( BMP_FORMAT_24BIT_TC_RGB ): ++ { ++ for( nY = 0; nY < nDstHeight; nY++ ) ++ { ++ const long nMapY = pMapY[ nY ]; ++ Scanline pPScan = pP->GetScanline( nMapY ); ++ Scanline pAScan = pA->GetScanline( nMapY ); ++ ++ for( nX = 0; nX < nDstWidth; nX++ ) ++ { ++ const long nMapX = pMapX[ nX ]; ++ Scanline pTmp = pPScan + nMapX * 3; ++ ++ aDstCol = pB->GetPixel( nY, nX ); ++ pB->SetPixel( nY, nX, aDstCol.Merge( pTmp[ 0 ], pTmp[ 1 ], pTmp[ 2 ], ++ pAScan[ nMapX ] ) ); ++ } ++ } ++ } ++ break; ++ ++ default: ++ { ++ for( nY = 0; nY < nDstHeight; nY++ ) ++ { ++ const long nMapY = pMapY[ nY ]; ++ Scanline pAScan = pA->GetScanline( nMapY ); ++ ++ for( nX = 0; nX < nDstWidth; nX++ ) ++ { ++ const long nMapX = pMapX[ nX ]; ++ aDstCol = pB->GetPixel( nY, nX ); ++ pB->SetPixel( nY, nX, aDstCol.Merge( pP->GetColor( nMapY, nMapX ), ++ pAScan[ nMapX ] ) ); ++ } ++ } ++ } ++ break; ++ } + } + +- ( (Bitmap&) rBmp ).ReleaseAccess( pP ); +- ( (AlphaMask&) rAlpha ).ReleaseAccess( pA ); + aBmp.ReleaseAccess( pB ); + DrawBitmap( aDstRect.TopLeft(), aBmp ); + } ++ ++ // #110958# Enable alpha VDev again ++ mpAlphaVDev = pOldVDev; ++ ++ // #110958# Perform merging of bitmap and VDev alpha channel ++ if( mpAlphaVDev ) ++ { ++ BOOL bOldMapMode( IsMapModeEnabled() ); ++ mpAlphaVDev->EnableMapMode(FALSE); ++ Bitmap aBitmap( mpAlphaVDev->GetBitmap( aDstRect.TopLeft(), aDstRect.GetSize() ) ); ++ BitmapWriteAccess* pW = aBitmap.AcquireWriteAccess(); ++ BYTE nAlpha; ++ ++ if( pW && pA ) ++ { ++ if( mpAlphaVDev->GetBitCount() < 8 ) ++ { ++ // Less than 8 bit for backbuffer - try dithering of alpha channel ++ BitmapColor aIndex( 0 ); ++ ++ for( nY = 0, nOutY = nOffY; nY < nDstHeight; nY++, nOutY++ ) ++ { ++ const long nMapY = pMapY[ nY ]; ++ const long nModY = ( nOutY & 0x0FL ) << 4L; ++ Scanline pAScan = pA->GetScanline( nMapY ); ++ ++ for( nX = 0, nOutX = nOffX; nX < nDstWidth; nX++, nOutX++ ) ++ { ++ const long nMapX = pMapX[ nX ]; ++ const ULONG nD = nVCLDitherLut[ nModY | ( nOutX & 0x0FL ) ]; ++ ++ nAlpha = pAScan[ nMapX ]; ++ ++ // Have to perform the compositing ++ // 'algebra' in the inverse alpha ++ // space (with 255 meaning opaque), ++ // otherwise, transitivity is not ++ // achieved. ++ nAlpha = 255-COLOR_CHANNEL_MERGE( 255, (BYTE) 255-pW->GetColor( nY, nX ), 255-nAlpha ); ++ ++ aIndex.SetIndex( (BYTE) ( nVCLRLut[ ( nVCLLut[ nAlpha ] + nD ) >> 16UL ] + ++ nVCLGLut[ ( nVCLLut[ nAlpha ] + nD ) >> 16UL ] + ++ nVCLBLut[ ( nVCLLut[ nAlpha ] + nD ) >> 16UL ] ) ); ++ pW->SetPixel( nY, nX, aIndex ); ++ } ++ } ++ } ++ else ++ { ++ if( pW->GetScanlineFormat() == BMP_FORMAT_8BIT_PAL || ++ pW->GetScanlineFormat() == BMP_FORMAT_8BIT_TC_MASK ) ++ { ++ // optimized handling for 8 bit alpha - 8 bit backbuffer ++ for( nY = 0; nY < nDstHeight; nY++ ) ++ { ++ const long nMapY = pMapY[ nY ]; ++ Scanline pWScan = pW->GetScanline( nY ); ++ Scanline pAScan = pA->GetScanline( nMapY ); ++ ++ for( nX = 0; nX < nDstWidth; nX++ ) ++ { ++ const long nMapX = pMapX[ nX ]; ++ ++ nAlpha = pAScan[ nMapX ]; ++ ++ // Have to perform the compositing ++ // 'algebra' in the inverse alpha ++ // space (with 255 meaning opaque), ++ // otherwise, transitivity is not ++ // achieved. ++ pWScan[ nX ] = 255 - COLOR_CHANNEL_MERGE( 255, 255-pWScan[ nX ], 255-nAlpha ); ++ } ++ } ++ } ++ else ++ { ++ // optimized handling for 8 bit alpha - >8 bit backbuffer ++ for( nY = 0; nY < nDstHeight; nY++ ) ++ { ++ const long nMapY = pMapY[ nY ]; ++ Scanline pAScan = pA->GetScanline( nMapY ); ++ ++ for( nX = 0; nX < nDstWidth; nX++ ) ++ { ++ const long nMapX = pMapX[ nX ]; ++ nAlpha = pAScan[ nMapX ]; ++ ++ // Have to perform the compositing ++ // 'algebra' in the inverse alpha ++ // space (with 255 meaning opaque), ++ // otherwise, transitivity is not ++ // achieved. ++ nAlpha = 255 - COLOR_CHANNEL_MERGE( 255, 255-pW->GetColor( nY, nX ).GetBlue(), 255-nAlpha ); ++ ++ pW->SetPixel( nY, nX, Color(nAlpha, nAlpha, nAlpha) ); ++ } ++ } ++ } ++ } ++ } ++ ++ aBitmap.ReleaseAccess( pW ); ++ mpAlphaVDev->DrawBitmap( aDstRect.TopLeft(), aBitmap ); ++ mpAlphaVDev->EnableMapMode( bOldMapMode ); ++ } ++ ++ ( (Bitmap&) rBmp ).ReleaseAccess( pP ); ++ ( (AlphaMask&) rAlpha ).ReleaseAccess( pA ); + + delete[] pMapX; + delete[] pMapY; +Index: vcl/source/gdi/outdev3.cxx +=================================================================== +RCS file: /cvs/gsl/vcl/source/gdi/outdev3.cxx,v +retrieving revision 1.155.20.6 +retrieving revision 1.173 +diff -u -p -u -r1.155.20.6 -r1.173 +--- vcl/source/gdi/outdev3.cxx 13 Feb 2004 14:03:37 -0000 1.155.20.6 ++++ vcl/source/gdi/outdev3.cxx 25 Jun 2004 15:16:20 -0000 1.173 +@@ -59,27 +59,20 @@ + * + ************************************************************************/ + +-#include <math.h> +-#include <string.h> ++#include <cmath> ++#include <cstring> + ++#ifndef _ISOLANG_HXX ++#include <tools/isolang.hxx> ++#endif + +-#define _SV_OUTDEV_CXX +- +-#ifndef REMOTE_APPSERVER + #ifndef _SV_SVSYS_HXX + #include <svsys.h> + #endif +-#endif + +-#ifndef REMOTE_APPSERVER + #ifndef _SV_SALGDI_HXX + #include <salgdi.hxx> + #endif +-#else +-#ifndef _SV_RMOUTDEV_HXX +-#include <rmoutdev.hxx> +-#endif +-#endif // REMOTE_APPSERVER + + #ifndef _SV_SALLAYOUT_HXX + #include <sallayout.hxx> +@@ -110,8 +103,8 @@ + #ifndef _SV_OUTFONT_HXX + #include <outfont.hxx> + #endif +-#ifndef _SV_POLY_HXX +-#include <poly.hxx> ++#ifndef _TL_POLY_HXX ++#include <tools/poly.hxx> + #endif + #ifndef _SV_OUTDEV_H + #include <outdev.h> +@@ -153,6 +146,10 @@ + #include <osl/file.h> + #endif + ++#ifndef _SV_GLYPHCACHE_HXX ++#include <glyphcache.hxx> ++#endif ++ + #include <unohelp.hxx> + #ifndef _VCL_PDFWRITER_IMPL_HXX + #include <pdfwriter_impl.hxx> +@@ -179,9 +176,13 @@ + + #if defined(WIN32) + #include <malloc.h> + #define alloca _alloca +-#elif defined(SOLARIS) || defined(IRIX) +-#include <alloca.h> ++#elif defined(SOLARIS) || defined(IRIX) ++ #include <alloca.h> ++#else ++#ifndef MACOSX ++ #include <malloc.h> ++#endif + #endif + + #include <memory> +@@ -211,6 +209,9 @@ using namespace ::vcl; + + // ======================================================================= + ++//#ifdef USE_NEW_RTL_IMPLEMENTATION ++ ++ + static void ImplRotatePos( long nOriginX, long nOriginY, long& rX, long& rY, + int nOrientation ) + { +@@ -296,11 +297,7 @@ void OutputDevice::ImplUpdateFontData( B + if ( bNewFontLists ) + { + // we need a graphics +-#ifndef REMOTE_APPSERVER + if ( ImplGetGraphics() ) +-#else +- if ( ImplGetServerGraphics() ) +-#endif + { + if( mpFontList && mpFontList != pSVData->maGDIData.mpScreenFontList ) + mpFontList->Clear(); +@@ -395,10 +392,9 @@ void OutputDevice::ImplUpdateAllFontData + pFrame = pSVData->maWinData.mpFirstFrame; + if ( pFrame ) + { +-#ifndef REMOTE_APPSERVER + if ( pFrame->ImplGetGraphics() ) +-#endif +- pFrame->mpGraphics->GetDevFontList( pFrame->mpFrameData->mpFontList ); ++ // MT: Stupid typecast here and somewhere ((OutputDevice*)&aVDev)->, because bug in .NET2002 compiler. ++ ((OutputDevice*)pFrame)->mpGraphics->GetDevFontList( pFrame->mpFrameData->mpFontList ); + } + } + } +@@ -908,8 +904,8 @@ void OutputDevice::GetFontSubstitute( US + + // ----------------------------------------------------------------------- + +-static void ImplFontSubstitute( String& rFontName, +- USHORT nFlags, ImplFontSubstEntry* pDevSpecific ) ++static BOOL ImplFontSubstitute( XubString& rFontName, ++ USHORT nFlags1, USHORT nFlags2, ImplFontSubstEntry* pDevSpecific ) + { + #ifdef DBG_UTIL + String aTempName = rFontName; +@@ -917,33 +913,36 @@ static void ImplFontSubstitute( String& + DBG_ASSERT( aTempName == rFontName, "ImplFontSubstitute() called without a searchname" ); + #endif + +- // apply global replacement (e.g. from the Tools->Options->Fonts dialog) +- ImplSVData* pSVData = ImplGetSVData(); +- const ImplFontSubstEntry* pEntry = pSVData->maGDIData.mpFirstFontSubst; +- for(; pEntry; pEntry = pEntry->mpNext ) // linear search => TODO ++ // apply font replacement (eg, from the list in Tools->Options) ++ ImplSVData* pSVData = ImplGetSVData(); ++ ImplFontSubstEntry* pEntry = pSVData->maGDIData.mpFirstFontSubst; ++ while ( pEntry ) + { +- // replace if ALWAYS or SCREENONLY flags match or nFlags is zero +- if(((pEntry->mnFlags & nFlags) || !nFlags) +- && (pEntry->maSearchName == rFontName) ) ++ if ( ((pEntry->mnFlags & nFlags1) == nFlags2) && ++ (pEntry->maSearchName == rFontName) ) + { + rFontName = pEntry->maSearchReplaceName; +- return; ++ return TRUE; + } +- } + +- // apply device specific replacement (e.g. Arial->Helvetica on a PS printer) ++ pEntry = pEntry->mpNext; ++ } + if( pDevSpecific ) + { +- for( pEntry = pDevSpecific; pEntry; pEntry = pEntry->mpNext ) ++ pEntry = pDevSpecific; ++ while ( pEntry ) + { +- if(((pEntry->mnFlags & nFlags) || !nFlags) +- && (pEntry->maSearchName == rFontName) ) ++ if ( ((pEntry->mnFlags & nFlags1) == nFlags2) && ++ (pEntry->maSearchName == rFontName) ) + { + rFontName = pEntry->maSearchReplaceName; +- return; ++ return TRUE; + } ++ pEntry = pEntry->mpNext; + } + } ++ ++ return FALSE; + } + + // ======================================================================= +@@ -1034,14 +1033,25 @@ static void ImplAddTokenFontNames( Strin + Font OutputDevice::GetDefaultFont( USHORT nType, LanguageType eLang, + ULONG nFlags, const OutputDevice* pOutDev ) + { ++ DBG_TRACE( "OutputDevice::GetDefaultFont()" ); ++ ++ com::sun::star::lang::Locale aLocale; + if( eLang == LANGUAGE_NONE || eLang == LANGUAGE_SYSTEM || eLang == LANGUAGE_DONTKNOW ) + { +- eLang = Application::GetSettings().GetUILanguage(); ++ aLocale = Application::GetSettings().GetUILocale(); + } ++ else ++ { ++ String aLang, aCountry; ++ ConvertLanguageToIsoNames( eLang, aLang, aCountry ); ++ aLocale.Language= aLang; ++ aLocale.Country = aCountry; ++ } ++ + + DefaultFontConfigItem* pDefaults = DefaultFontConfigItem::get(); +- String aSearch = pDefaults->getUserInterfaceFont( eLang ); // ensure a fallback +- String aDefault = pDefaults->getDefaultFont( eLang, nType ); ++ String aSearch = pDefaults->getUserInterfaceFont( aLocale ); // ensure a fallback ++ String aDefault = pDefaults->getDefaultFont( aLocale, nType ); + if( aDefault.Len() ) + aSearch = aDefault; + +@@ -1166,6 +1176,47 @@ Font OutputDevice::GetDefaultFont( USHOR + aFont.SetName( aSearch ); + } + } ++ ++#if OSL_DEBUG_LEVEL > 2 ++ const char* s = "DEFAULTFONT_SANS_UNKNOWN"; ++ switch ( nType ) ++ { ++ case DEFAULTFONT_SANS_UNICODE: s = "DEFAULTFONT_SANS_UNICODE"; break; ++ case DEFAULTFONT_UI_SANS: s = "DEFAULTFONT_UI_SANS"; break; ++ ++ case DEFAULTFONT_SANS: s = "DEFAULTFONT_SANS"; break; ++ case DEFAULTFONT_LATIN_HEADING: s = "DEFAULTFONT_LATIN_HEADING"; break; ++ case DEFAULTFONT_LATIN_SPREADSHEET: s = "DEFAULTFONT_LATIN_SPREADSHEET"; break; ++ case DEFAULTFONT_LATIN_DISPLAY: s = "DEFAULTFONT_LATIN_DISPLAY"; break; ++ ++ case DEFAULTFONT_SERIF: s = "DEFAULTFONT_SERIF"; break; ++ case DEFAULTFONT_LATIN_TEXT: s = "DEFAULTFONT_LATIN_TEXT"; break; ++ case DEFAULTFONT_LATIN_PRESENTATION: s = "DEFAULTFONT_LATIN_PRESENTATION"; break; ++ ++ case DEFAULTFONT_FIXED: s = "DEFAULTFONT_FIXED"; break; ++ case DEFAULTFONT_LATIN_FIXED: s = "DEFAULTFONT_LATIN_FIXED"; break; ++ case DEFAULTFONT_UI_FIXED: s = "DEFAULTFONT_UI_FIXED"; break; ++ ++ case DEFAULTFONT_SYMBOL: s = "DEFAULTFONT_SYMBOL"; break; ++ ++ case DEFAULTFONT_CJK_TEXT: s = "DEFAULTFONT_CJK_TEXT"; break; ++ case DEFAULTFONT_CJK_PRESENTATION: s = "DEFAULTFONT_CJK_PRESENTATION"; break; ++ case DEFAULTFONT_CJK_SPREADSHEET: s = "DEFAULTFONT_CJK_SPREADSHEET"; break; ++ case DEFAULTFONT_CJK_HEADING: s = "DEFAULTFONT_CJK_HEADING"; break; ++ case DEFAULTFONT_CJK_DISPLAY: s = "DEFAULTFONT_CJK_DISPLAY"; break; ++ ++ case DEFAULTFONT_CTL_TEXT: s = "DEFAULTFONT_CTL_TEXT"; break; ++ case DEFAULTFONT_CTL_PRESENTATION: s = "DEFAULTFONT_CTL_PRESENTATION"; break; ++ case DEFAULTFONT_CTL_SPREADSHEET: s = "DEFAULTFONT_CTL_SPREADSHEET"; break; ++ case DEFAULTFONT_CTL_HEADING: s = "DEFAULTFONT_CTL_HEADING"; break; ++ case DEFAULTFONT_CTL_DISPLAY: s = "DEFAULTFONT_CTL_DISPLAY"; break; ++ } ++ fprintf( stderr, " OutputDevice::GetDefaultFont() Type=\"%s\" lang=%d flags=%d FontName=\"%s\"\n", ++ s, eLang, nFlags, ++ OUStringToOString( aFont.GetName(), osl_getThreadTextEncoding() ).getStr() ++ ); ++#endif ++ + return aFont; + } + +@@ -1291,8 +1342,7 @@ static void ImplCalcType( ULONG& rType, + + // ======================================================================= + +-ImplDevFontList::ImplDevFontList() : +- List( CONTAINER_MAXBLOCKSIZE, 96, 32 ) ++ImplDevFontList::ImplDevFontList() : List( CONTAINER_MAXBLOCKSIZE, 96, 32 ) + { + mbMatchData = FALSE; + mbMapNames = FALSE; +@@ -1319,7 +1369,9 @@ void ImplDevFontList::ImplClear() + ImplFontData* pNextFD = pFontData->mpNext; + + // tell lower layers about the imminent death +- SalGraphics::RemovingFont( pFontData ); ++#ifdef UNX ++ GlyphCache::GetInstance().RemoveFont( pFontData ); ++#endif + delete pFontData; + + pFontData = pNextFD; +@@ -1800,24 +1852,24 @@ ImplFontEntry* ImplFontCache::Get( ImplD + + ImplDevFontListData* pFoundData; + String aSearchName; ++ USHORT nSubstFlags1 = FONT_SUBSTITUTE_ALWAYS; ++ USHORT nSubstFlags2 = FONT_SUBSTITUTE_ALWAYS; ++ xub_StrLen nFirstNameIndex = 0; + xub_StrLen nIndex = 0; + int nToken = 0; + ULONG i; + +- USHORT nSubstFlags = FONT_SUBSTITUTE_ALWAYS; +- if ( !mbPrinter ) +- nSubstFlags |= FONT_SUBSTITUTE_SCREENONLY; +- +- // check if the first font in the semicolon separated list of font names +- // is available, substitute the font there is a matching entry in the +- // Tools->Options->Fonts dialog with ALWAYS or SCREENONLY flags set ++ if ( mbPrinter ) ++ nSubstFlags1 |= FONT_SUBSTITUTE_SCREENONLY; ++ ++ // Test if one Font in the name list is available + do + { + nToken++; + String aToken = GetFontToken( aName, 0, nIndex ); + aSearchName = aToken; + ImplGetEnglishSearchFontName( aSearchName ); +- ImplFontSubstitute( aSearchName, nSubstFlags, pDevSpecific ); ++ ImplFontSubstitute( aSearchName, nSubstFlags1, nSubstFlags2, pDevSpecific ); + pFoundData = pFontList->ImplFind( aSearchName ); + if( pFoundData ) + { +@@ -1827,13 +1879,14 @@ ImplFontEntry* ImplFontCache::Get( ImplD + } + while ( nIndex != STRING_NOTFOUND ); + +- // if the first font was not available find the next available font in +- // the semicolon separated list of font names. A font is also considered +- // available when there is a matching entry in the Tools->Options->Fonts +- // dialog witho neither ALWAYS nor SCREENONLY flags set and the substitution +- // font is available +- if( !pFoundData ) ++ // Danach versuchen wir es nocheinmal unter Beruecksichtigung ++ // der gloablen Fontersetzungstabelle, wobei wir jetzt auch ++ // die Fonts nehmen, die ersetzt werden sollen, wenn sie ++ // nicht vorhanden sind ++ if ( !pFoundData ) + { ++ nSubstFlags1 &= ~FONT_SUBSTITUTE_ALWAYS; ++ nSubstFlags2 &= ~FONT_SUBSTITUTE_ALWAYS; + nIndex = 0; + do + { +@@ -1844,7 +1897,7 @@ ImplFontEntry* ImplFontCache::Get( ImplD + } + else + nIndex = STRING_NOTFOUND; +- ImplFontSubstitute( aSearchName, 0, pDevSpecific ); ++ ImplFontSubstitute( aSearchName, nSubstFlags1, nSubstFlags2, pDevSpecific ); + pFoundData = pFontList->ImplFind( aSearchName ); + if( pFoundData ) + break; +@@ -1917,7 +1970,9 @@ ImplFontEntry* ImplFontCache::Get( ImplD + + if ( !pFoundData && bSymbolEncoding ) + { +- String aFontname = DefaultFontConfigItem::get()->getDefaultFont( LANGUAGE_ENGLISH, DEFAULTFONT_SYMBOL ); ++ com::sun::star::lang::Locale aLocale( OUString( RTL_CONSTASCII_USTRINGPARAM("en") ), ++ OUString(), OUString() ); ++ String aFontname = DefaultFontConfigItem::get()->getDefaultFont( aLocale, DEFAULTFONT_SYMBOL ); + ImplGetEnglishSearchFontName( aFontname ); + pFoundData = pFontList->ImplFindFontFromToken( aFontname ); + } +@@ -2378,23 +2433,25 @@ ImplFontEntry* ImplFontCache::Get( ImplD + // Try to use a Standard Unicode or a Standard Font to get + // as max as possible characters + DefaultFontConfigItem* pDefaults = DefaultFontConfigItem::get(); +- String aFontname = pDefaults->getDefaultFont( LANGUAGE_ENGLISH, DEFAULTFONT_SANS_UNICODE ); ++ com::sun::star::lang::Locale aLoc( OUString( RTL_CONSTASCII_USTRINGPARAM( "en" ) ), ++ OUString(), OUString() ); ++ String aFontname = pDefaults->getDefaultFont( aLoc, DEFAULTFONT_SANS_UNICODE ); + ImplGetEnglishSearchFontName( aFontname ); + + pFoundData = pFontList->ImplFindFontFromToken( aFontname ); + if ( !pFoundData ) + { +- aFontname = pDefaults->getDefaultFont( LANGUAGE_ENGLISH, DEFAULTFONT_SANS ); ++ aFontname = pDefaults->getDefaultFont( aLoc, DEFAULTFONT_SANS ); + ImplGetEnglishSearchFontName( aFontname ); + pFoundData = pFontList->ImplFindFontFromToken( aFontname ); + if ( !pFoundData ) + { +- aFontname = pDefaults->getDefaultFont( LANGUAGE_ENGLISH, DEFAULTFONT_SERIF ); ++ aFontname = pDefaults->getDefaultFont( aLoc, DEFAULTFONT_SERIF ); + ImplGetEnglishSearchFontName( aFontname ); + pFoundData = pFontList->ImplFindFontFromToken( aFontname ); + if ( !pFoundData ) + { +- aFontname = pDefaults->getDefaultFont( LANGUAGE_ENGLISH, DEFAULTFONT_FIXED ); ++ aFontname = pDefaults->getDefaultFont( aLoc, DEFAULTFONT_FIXED ); + ImplGetEnglishSearchFontName( aFontname ); + pFoundData = pFontList->ImplFindFontFromToken( aFontname ); + } +@@ -2626,7 +2683,7 @@ ImplFontEntry* ImplFontCache::GetFallbac + { + // TODO: implement dynamic lists or improve static lists + #define FALLBACKFONT_NAMELIST \ +- "arialunicodems;andalesansui;cyberbit;starsymbol;opensymbol;lucidatypeWriter;" \ ++ "arialunicodems;andalesansui;cyberbit;starsymbol;opensymbol;lucidatypewriter;" \ + "fzmingti;sunbatang;sundotum;baekmukdotum;" \ + "hgmincholightj;msunglightsc;msunglighttc;hymyeongjolightk;" \ + "lucidasans;tahoma;" \ +@@ -2730,7 +2787,6 @@ void ImplFontCache::Clear() + } + + // #112304# make sure the font cache is really clean +- // #112304# there are still referenced entries + mpFirstEntry = NULL; + + DBG_ASSERT( (mnRef0Count==0), "ImplFontCache::Clear() - mnRef0Count non-zero" ); +@@ -2871,11 +2927,7 @@ void OutputDevice::ImplInitTextColor() + + if ( mbInitTextColor ) + { +-#ifndef REMOTE_APPSERVER + mpGraphics->SetTextColor( ImplColorToSal( GetTextColor() ) ); +-#else +- mpGraphics->SetTextColor( GetTextColor() ); +-#endif + mbInitTextColor = FALSE; + } + } +@@ -2900,16 +2952,10 @@ int OutputDevice::ImplNewFont() + + mbNewFont = FALSE; + +-#ifndef REMOTE_APPSERVER + // we need a graphics + if ( !mpGraphics && !ImplGetGraphics() ) + return FALSE; + SalGraphics* pGraphics = mpGraphics; +-#else +- // due to clipping we may get NULL, so don't use return value +- ImplGetServerGraphics(); +- ImplServerGraphics* pGraphics = mpGraphics; +-#endif + ImplInitFontList(); + + // convert to pixel height +@@ -3006,16 +3053,7 @@ int OutputDevice::ImplNewFont() + mpPDFWriter->getFontMetric( &pFontEntry->maFontSelData, &(pFontEntry->maMetric) ); + else + { +-#ifndef REMOTE_APPSERVER + pGraphics->GetFontMetric( &(pFontEntry->maMetric) ); +-#else +- long nFactor = 0; +- pGraphics->GetFontMetric( +- pFontEntry->maMetric, nFactor, +- 0x21, 0x20, NULL, +- (maFont.GetKerning() & KERNING_FONTSPECIFIC) != 0, +- &pKernPairs, nKernPairs ); +-#endif + } + + pFontEntry->mbFixedFont = pFontEntry->maMetric.mePitch == PITCH_FIXED; +@@ -3122,9 +3160,10 @@ inline bool CmpKernData( const ImplKernP + + static void ImplSortKernPairs( ImplKernPairData* pKernPairs, long l, long r ) + { +-#if 1 // TODO: use STL's insertion sort +- long i = l; ++ // TODO: use STL's insertion sort ++ // std::sort( pKernPairs+l, pKernPairs+r, CmpKernData ); + ++ long i = l; + long j = r; + ImplKernPairData* pComp = pKernPairs + ((l+r) >> 1); + sal_uInt32 nComp = *((sal_uInt32*)pComp); +@@ -3150,9 +3189,6 @@ static void ImplSortKernPairs( ImplKernP + ImplSortKernPairs( pKernPairs, l, j ); + if ( i < r ) + ImplSortKernPairs( pKernPairs, i, r ); +-#else +- std::sort( pKernPairs+l, pKernPairs+r, CmpKernData ); +-#endif + } + + // ----------------------------------------------------------------------- +@@ -3174,7 +3210,6 @@ void OutputDevice::ImplInitKerningPairs( + pFontEntry->mpKernPairs = NULL; + return; + } +-#ifndef REMOTE_APPSERVER + pFontEntry->mnKernPairs = mpGraphics->GetKernPairs( 0, NULL ); + if ( pFontEntry->mnKernPairs ) + { +@@ -3183,12 +3218,6 @@ void OutputDevice::ImplInitKerningPairs( + pFontEntry->mnKernPairs = mpGraphics->GetKernPairs( pFontEntry->mnKernPairs, pKernPairs ); + pFontEntry->mpKernPairs = pKernPairs; + } +-#else +- if ( !pKernPairs ) +- nKernPairs = mpGraphics->GetKernPairs( &pKernPairs ); +- if ( nKernPairs ) +- pFontEntry->mpKernPairs = pKernPairs; +-#endif + + // Sort Kerning Pairs + if ( pFontEntry->mpKernPairs ) +@@ -3256,21 +3285,12 @@ void OutputDevice::ImplDrawTextRect( lon + Rectangle aRect( Point( nX, nY ), Size( nWidth+1, nHeight+1 ) ); + Polygon aPoly( aRect ); + aPoly.Rotate( Point( nBaseX, nBaseY ), mpFontEntry->mnOrientation ); +-#ifndef REMOTE_APPSERVER + ImplDrawPolygon( aPoly ); +-#else +- mpGraphics->DrawPolygon( aPoly ); +-#endif + return; + } + } + +-#ifndef REMOTE_APPSERVER + mpGraphics->DrawRect( nX, nY, nWidth, nHeight, this ); +-#else +- Rectangle aRect( Point( nX, nY ), Size( nWidth, nHeight ) ); +- mpGraphics->DrawRect( aRect ); +-#endif + } + + // ----------------------------------------------------------------------- +@@ -3282,7 +3302,6 @@ void OutputDevice::ImplDrawTextBackgroun + long nX = aBase.X(); + long nY = aBase.Y(); + +-#ifndef REMOTE_APPSERVER + if ( mbLineColor || mbInitLineColor ) + { + mpGraphics->SetLineColor(); +@@ -3294,21 +3313,6 @@ void OutputDevice::ImplDrawTextBackgroun + ImplDrawTextRect( nX, nY, nX, nY-mpFontEntry->maMetric.mnAscent-mnEmphasisAscent, + nWidth, + mpFontEntry->mnLineHeight+mnEmphasisAscent+mnEmphasisDescent ); +-#else +- Color aOldLineColor = GetLineColor(); +- Color aOldFillColor = GetFillColor(); +- SetLineColor(); +- SetFillColor( GetTextFillColor() ); +- if ( mbInitLineColor ) +- ImplInitLineColor(); +- if ( mbInitFillColor ) +- ImplInitFillColor(); +- ImplDrawTextRect( nX, nY, nX, nY-mpFontEntry->maMetric.mnAscent-mnEmphasisAscent, +- nWidth, +- mpFontEntry->mnLineHeight+mnEmphasisAscent+mnEmphasisDescent ); +- SetLineColor( aOldLineColor ); +- SetFillColor( aOldFillColor ); +-#endif + } + + // ----------------------------------------------------------------------- +@@ -3542,11 +3545,7 @@ void OutputDevice::ImplInitAboveTextLine + static void ImplDrawWavePixel( long nOriginX, long nOriginY, + long nCurX, long nCurY, + short nOrientation, +-#ifndef REMOTE_APPSERVER + SalGraphics* pGraphics, +-#else +- ImplServerGraphics* pGraphics, +-#endif + OutputDevice* pOutDev, + BOOL bDrawPixAsRect, + +@@ -3557,24 +3556,12 @@ static void ImplDrawWavePixel( long nOri + + if ( bDrawPixAsRect ) + { +-#ifndef REMOTE_APPSERVER + + pGraphics->DrawRect( nCurX, nCurY, nPixWidth, nPixHeight, pOutDev ); +-#else +- Point aPos( nCurX, nCurY ); +- Size aSize( nPixWidth, nPixHeight ); +- Rectangle aRect( aPos, aSize ); +- pGraphics->DrawRect( aRect ); +-#endif + } + else + { +-#ifndef REMOTE_APPSERVER + pGraphics->DrawPixel( nCurX, nCurY, pOutDev ); +-#else +- Point aPos( nCurX, nCurY ); +- pGraphics->DrawPixel( aPos ); +-#endif + } + } + +@@ -3592,15 +3579,8 @@ void OutputDevice::ImplDrawWaveLine( lon + // Bei Hoehe von 1 Pixel reicht es, eine Linie auszugeben + if ( (nLineWidth == 1) && (nHeight == 1) ) + { +-#ifndef REMOTE_APPSERVER + mpGraphics->SetLineColor( ImplColorToSal( rColor ) ); + mbInitLineColor = TRUE; +-#else +- Color aOldLineColor = GetLineColor(); +- SetLineColor( rColor ); +- if ( mbInitLineColor ) +- ImplInitLineColor(); +-#endif + + long nEndX = nStartX+nWidth; + long nEndY = nStartY; +@@ -3609,15 +3589,8 @@ void OutputDevice::ImplDrawWaveLine( lon + ImplRotatePos( nBaseX, nBaseY, nStartX, nStartY, nOrientation ); + ImplRotatePos( nBaseX, nBaseY, nEndX, nEndY, nOrientation ); + } +-#ifndef REMOTE_APPSERVER + mpGraphics->DrawLine( nStartX, nStartY, nEndX, nEndY, this ); +-#else +- mpGraphics->DrawLine( Point( nStartX, nStartY ), Point( nEndX, nEndY ) ); +-#endif + +-#ifdef REMOTE_APPSERVER +- SetLineColor( aOldLineColor ); +-#endif + } + else + { +@@ -3632,15 +3605,9 @@ void OutputDevice::ImplDrawWaveLine( lon + long nPixWidth; + long nPixHeight; + BOOL bDrawPixAsRect; +-#ifdef REMOTE_APPSERVER +- Color aOldLineColor = GetLineColor(); +- Color aOldFillColor = GetFillColor(); +- +-#endif + // Auf Druckern die Pixel per DrawRect() ausgeben + if ( (GetOutDevType() == OUTDEV_PRINTER) || (nLineWidth > 1) ) + { +-#ifndef REMOTE_APPSERVER + if ( mbLineColor || mbInitLineColor ) + { + mpGraphics->SetLineColor(); +@@ -3648,29 +3615,14 @@ void OutputDevice::ImplDrawWaveLine( lon + } + mpGraphics->SetFillColor( ImplColorToSal( rColor ) ); + mbInitFillColor = TRUE; +-#else +- SetLineColor(); +- SetFillColor( rColor ); +- if ( mbInitLineColor ) +- ImplInitLineColor(); +- if ( mbInitFillColor ) +- ImplInitFillColor(); +-#endif + bDrawPixAsRect = TRUE; + nPixWidth = nLineWidth; + nPixHeight = ((nLineWidth*mnDPIX)+(mnDPIY/2))/mnDPIY; + } + else + { +-#ifndef REMOTE_APPSERVER + mpGraphics->SetLineColor( ImplColorToSal( rColor ) ); + mbInitLineColor = TRUE; +-#else +- Color aOldLineColor = GetLineColor(); +- SetLineColor( rColor ); +- if ( mbInitLineColor ) +- ImplInitLineColor(); +-#endif + nPixWidth = 1; + nPixHeight = 1; + bDrawPixAsRect = FALSE; +@@ -3732,10 +3684,6 @@ void OutputDevice::ImplDrawWaveLine( lon + } + } + +-#ifdef REMOTE_APPSERVER +- SetLineColor( aOldLineColor ); +- SetFillColor( aOldFillColor ); +-#endif + } + } + +@@ -3877,7 +3825,13 @@ void OutputDevice::ImplDrawTextLine( lon + { + if( mpFontEntry->mnOrientation ) + ImplRotatePos( nBaseX, nBaseY, nX, nY, mpFontEntry->mnOrientation ); +- SalLayout* pSalLayout = ImplLayout( aStrikeoutText, 0, STRING_LEN, Point(nX,nY) ); ++ ++ // strikeout text has to be left aligned ++ ULONG nOrigTLM = mnTextLayoutMode; ++ mnTextLayoutMode = TEXT_LAYOUT_BIDI_STRONG | TEXT_LAYOUT_COMPLEX_DISABLED; ++ SalLayout* pSalLayout = ImplLayout( aStrikeoutText, 0, STRING_LEN ); ++ mnTextLayoutMode = nOrigTLM; ++ + if( pSalLayout ) + { + pSalLayout->DrawBase() = Point( nX+mnTextOffX, nY+mnTextOffY ); +@@ -3898,17 +3852,20 @@ void OutputDevice::ImplDrawTextLine( lon + case UNDERLINE_WAVE: + case UNDERLINE_DOUBLEWAVE: + case UNDERLINE_BOLDWAVE: ++ { + bNormalLines = FALSE; ++ } ++ break; ++ default: ++ { ++ ; // We don't want a gcc warning... ++ } ++ + } + } + + if ( bNormalLines ) + { +-#ifdef REMOTE_APPSERVER +- Color aOldLineColor = GetLineColor(); +- Color aOldFillColor = GetFillColor(); +-#endif +- + if ( eUnderline > UNDERLINE_LAST ) + eUnderline = UNDERLINE_SINGLE; + +@@ -3981,7 +3938,6 @@ void OutputDevice::ImplDrawTextLine( lon + + if ( nLineHeight ) + { +-#ifndef REMOTE_APPSERVER + if ( mbLineColor || mbInitLineColor ) + { + mpGraphics->SetLineColor(); +@@ -3989,14 +3945,6 @@ void OutputDevice::ImplDrawTextLine( lon + } + mpGraphics->SetFillColor( ImplColorToSal( aUnderlineColor ) ); + mbInitFillColor = TRUE; +-#else +- SetLineColor(); +- SetFillColor( aUnderlineColor ); +- if ( mbInitLineColor ) +- ImplInitLineColor(); +- if ( mbInitFillColor ) +- ImplInitFillColor(); +-#endif + + nLeft = nX; + +@@ -4173,7 +4121,6 @@ void OutputDevice::ImplDrawTextLine( lon + + if ( nLineHeight ) + { +-#ifndef REMOTE_APPSERVER + if ( mbLineColor || mbInitLineColor ) + { + mpGraphics->SetLineColor(); +@@ -4181,14 +4128,6 @@ void OutputDevice::ImplDrawTextLine( lon + } + mpGraphics->SetFillColor( ImplColorToSal( aStrikeoutColor ) ); + mbInitFillColor = TRUE; +-#else +- SetLineColor(); +- SetFillColor( aStrikeoutColor ); +- if ( mbInitLineColor ) +- ImplInitLineColor(); +- if ( mbInitFillColor ) +- ImplInitFillColor(); +-#endif + + nLeft = nX; + +@@ -4202,10 +4141,6 @@ void OutputDevice::ImplDrawTextLine( lon + } + } + +-#ifdef REMOTE_APPSERVER +- SetLineColor( aOldLineColor ); +- SetFillColor( aOldFillColor ); +-#endif + } + } + +@@ -4217,10 +4152,10 @@ void OutputDevice::ImplDrawTextLines( Sa + if( bWordLine ) + { + Point aPos, aStartPt; +- long nWidth = 0, nAdvance=0; ++ sal_Int32 nWidth = 0, nAdvance=0; + for( int nStart = 0;;) + { +- long nGlyphIndex; ++ sal_Int32 nGlyphIndex; + if( !rSalLayout.GetNextGlyphs( 1, &nGlyphIndex, aPos, nStart, &nAdvance ) ) + break; + +@@ -4486,7 +4421,7 @@ void OutputDevice::ImplDrawEmphasisMarks + BOOL bOldMap = mbMap; + GDIMetaFile* pOldMetaFile = mpMetaFile; + mpMetaFile = NULL; +- mbMap = FALSE; ++ EnableMapMode( FALSE ); + + FontEmphasisMark nEmphasisMark = ImplGetEmphasisMarkStyle( maFont ); + PolyPolygon aPolyPoly; +@@ -4534,11 +4469,11 @@ void OutputDevice::ImplDrawEmphasisMarks + Rectangle aRectangle; + for( int nStart = 0;;) + { +- long nGlyphIndex; ++ sal_Int32 nGlyphIndex; + if( !rSalLayout.GetNextGlyphs( 1, &nGlyphIndex, aOutPoint, nStart ) ) + break; + +- if( !mpGraphics->GetGlyphBoundRect( nGlyphIndex, aRectangle, NULL ) ) ++ if( !mpGraphics->GetGlyphBoundRect( nGlyphIndex, aRectangle ) ) + continue; + + if( !rSalLayout.IsSpacingGlyph( nGlyphIndex ) ) +@@ -4557,7 +4492,7 @@ void OutputDevice::ImplDrawEmphasisMarks + + SetLineColor( aOldLineColor ); + SetFillColor( aOldFillColor ); +- mbMap = bOldMap; ++ EnableMapMode( bOldMap ); + mpMetaFile = pOldMetaFile; + } + +@@ -4604,7 +4539,7 @@ bool OutputDevice::ImplDrawRotateText( S + + // draw text into upper left corner + rSalLayout.DrawBase() -= aBoundRect.TopLeft(); +- rSalLayout.DrawText( *pVDev->mpGraphics ); ++ rSalLayout.DrawText( *((OutputDevice*)pVDev)->mpGraphics ); + + Bitmap aBmp = pVDev->GetBitmap( Point(), aBoundRect.GetSize() ); + if ( !aBmp || !aBmp.Rotate( mpFontEntry->mnOwnOrientation, COL_WHITE ) ) +@@ -4625,11 +4560,11 @@ bool OutputDevice::ImplDrawRotateText( S + mnOutOffX = 0L; + mnOutOffY = 0L; + mpMetaFile = NULL; +- mbMap = FALSE; ++ EnableMapMode( FALSE ); + + DrawMask( aPoint, aBmp, GetTextColor() ); + +- mbMap = bOldMap; ++ EnableMapMode( bOldMap ); + mnOutOffX = nOldOffX; + mnOutOffY = nOldOffY; + mpMetaFile = pOldMetaFile; +@@ -4655,9 +4590,15 @@ void OutputDevice::ImplDrawTextDirect( S + rSalLayout.DrawBase().X() = w - 1 - x; + if( !IsRTLEnabled() ) + { ++ OutputDevice *pOutDevRef = (OutputDevice *)this; ++#ifdef USE_NEW_RTL_IMPLEMENTATION ++ if( meOutDevType == OUTDEV_WINDOW ) ++ pOutDevRef = (OutputDevice*) ((Window *) this)->mpDummy4; ++#endif ++ + // mirror this window back +- long devX = w-mnOutWidth-mnOutOffX; // re-mirrored mnOutOffX +- rSalLayout.DrawBase().X() = devX + ( mnOutWidth - 1 - (rSalLayout.DrawBase().X() - devX) ) ; ++ long devX = w-pOutDevRef->mnOutWidth-pOutDevRef->mnOutOffX; // re-mirrored mnOutOffX ++ rSalLayout.DrawBase().X() = devX + ( pOutDevRef->mnOutWidth - 1 - (rSalLayout.DrawBase().X() - devX) ) ; + } + } + +@@ -4897,6 +4838,9 @@ void OutputDevice::SetAntialiasing( USHO + mnAntialiasing = nMode; + mbInitFont = TRUE; + } ++ ++ if( mpAlphaVDev ) ++ mpAlphaVDev->SetAntialiasing( nMode ); + } + + // ----------------------------------------------------------------------- +@@ -4978,13 +4922,26 @@ void OutputDevice::SetFont( const Font& + mpMetaFile->AddAction( new MetaTextFillColorAction( aFont.GetFillColor(), !aFont.IsTransparent() ) ); + } + ++#if OSL_DEBUG_LEVEL > 2 ++ fprintf( stderr, " OutputDevice::SetFont() FontName=\"%s\"\n", ++ OUStringToOString( aFont.GetName(), osl_getThreadTextEncoding() ).getStr() ); ++#endif ++ + if ( !maFont.IsSameInstance( aFont ) ) + { +- if ( maFont.GetColor() != aFont.GetColor() ) ++ // Optimization MT/HDU: COL_TRANSPARENT means SetFont should ignore the font color, ++ // because SetTextColor() is used for this. ++ if ( ( aFont.GetColor() != COL_TRANSPARENT ) && ( maFont.GetColor() != aFont.GetColor() ) ) ++ { ++ maTextColor = aFont.GetColor(); + mbInitTextColor = TRUE; ++ } + maFont = aFont; + mbNewFont = TRUE; + } ++ ++ if( mpAlphaVDev ) ++ mpAlphaVDev->SetFont( rNewFont ); + } + + // ----------------------------------------------------------------------- +@@ -4997,6 +4954,9 @@ void OutputDevice::SetLayoutMode( ULONG + mpMetaFile->AddAction( new MetaLayoutModeAction( nTextLayoutMode ) ); + + mnTextLayoutMode = nTextLayoutMode; ++ ++ if( mpAlphaVDev ) ++ mpAlphaVDev->SetLayoutMode( nTextLayoutMode ); + } + + // ----------------------------------------------------------------------- +@@ -5012,6 +4972,9 @@ void OutputDevice::SetDigitLanguage( Lan + eTextLanguage = GetSystemLanguage(); + + meTextLanguage = eTextLanguage; ++ ++ if( mpAlphaVDev ) ++ mpAlphaVDev->SetDigitLanguage( eTextLanguage ); + } + + // ----------------------------------------------------------------------- +@@ -5050,11 +5013,14 @@ void OutputDevice::SetTextColor( const C + if ( mpMetaFile ) + mpMetaFile->AddAction( new MetaTextColorAction( aColor ) ); + +- if ( maFont.GetColor() != aColor ) ++ if ( maTextColor != aColor ) + { +- maFont.SetColor( aColor ); ++ maTextColor = aColor; + mbInitTextColor = TRUE; + } ++ ++ if( mpAlphaVDev ) ++ mpAlphaVDev->SetTextColor( COL_BLACK ); + } + + // ----------------------------------------------------------------------- +@@ -5071,6 +5037,9 @@ void OutputDevice::SetTextFillColor() + maFont.SetFillColor( Color( COL_TRANSPARENT ) ); + if ( !maFont.IsTransparent() ) + maFont.SetTransparent( TRUE ); ++ ++ if( mpAlphaVDev ) ++ mpAlphaVDev->SetTextFillColor(); + } + + // ----------------------------------------------------------------------- +@@ -5122,6 +5091,9 @@ void OutputDevice::SetTextFillColor( con + maFont.SetFillColor( aColor ); + if ( maFont.IsTransparent() != bTransFill ) + maFont.SetTransparent( bTransFill ); ++ ++ if( mpAlphaVDev ) ++ mpAlphaVDev->SetTextFillColor( COL_BLACK ); + } + + // ----------------------------------------------------------------------- +@@ -5145,6 +5117,9 @@ void OutputDevice::SetTextLineColor() + mpMetaFile->AddAction( new MetaTextLineColorAction( Color(), FALSE ) ); + + maTextLineColor = Color( COL_TRANSPARENT ); ++ ++ if( mpAlphaVDev ) ++ mpAlphaVDev->SetTextLineColor(); + } + + // ----------------------------------------------------------------------- +@@ -5184,6 +5159,9 @@ void OutputDevice::SetTextLineColor( con + mpMetaFile->AddAction( new MetaTextLineColorAction( aColor, TRUE ) ); + + maTextLineColor = aColor; ++ ++ if( mpAlphaVDev ) ++ mpAlphaVDev->SetTextLineColor( COL_BLACK ); + } + + // ----------------------------------------------------------------------- +@@ -5202,6 +5180,9 @@ void OutputDevice::SetTextAlign( TextAli + maFont.SetAlign( eAlign ); + mbNewFont = TRUE; + } ++ ++ if( mpAlphaVDev ) ++ mpAlphaVDev->SetTextAlign( eAlign ); + } + + // ----------------------------------------------------------------------- +@@ -5224,7 +5205,6 @@ void OutputDevice::DrawTextLine( const P + if ( !IsDeviceOutputNecessary() || ImplIsRecordLayout() ) + return; + +-#ifndef REMOTE_APPSERVER + // we need a graphics + if( !mpGraphics && !ImplGetGraphics() ) + return; +@@ -5232,10 +5212,6 @@ void OutputDevice::DrawTextLine( const P + ImplInitClipRegion(); + if( mbOutputClipped ) + return; +-#else +- if( !ImplGetServerGraphics() ) +- return; +-#endif + + // initialize font if needed to get text offsets + // TODO: only needed for mnTextOff!=(0,0) +@@ -5249,6 +5225,9 @@ void OutputDevice::DrawTextLine( const P + nWidth = ImplLogicWidthToDevicePixel( nWidth ); + aPos += Point( mnTextOffX, mnTextOffY ); + ImplDrawTextLine( aPos.X(), aPos.X(), aPos.Y(), nWidth, eStrikeout, eUnderline, bUnderlineAbove ); ++ ++ if( mpAlphaVDev ) ++ mpAlphaVDev->DrawTextLine( rPos, nWidth, eStrikeout, eUnderline, bUnderlineAbove ); + } + + // ------------------------------------------------------------------------ +@@ -5266,7 +5245,6 @@ void OutputDevice::DrawWaveLine( const P + DBG_TRACE( "OutputDevice::DrawWaveLine()" ); + DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice ); + +-#ifndef REMOTE_APPSERVER + if ( !IsDeviceOutputNecessary() || ImplIsRecordLayout() ) + return; + +@@ -5324,18 +5302,8 @@ void OutputDevice::DrawWaveLine( const P + ImplDrawWaveLine( nStartX, nStartY, nStartX, nStartY, + nEndX-nStartX, nWaveHeight, 1, + nOrientation, GetLineColor() ); +-#else +- ImplServerGraphics* pGraphics = ImplGetServerGraphics(); +- if ( pGraphics ) +- { +- if ( mbInitLineColor ) +- ImplInitLineColor(); +- +- Point aPos1 = ImplLogicToDevicePixel( rStartPos ); +- Point aPos2 = ImplLogicToDevicePixel( rEndPos ); +- pGraphics->DrawWaveLine( aPos1, aPos2, nStyle ); +- } +-#endif ++ if( mpAlphaVDev ) ++ mpAlphaVDev->DrawWaveLine( rStartPos, rEndPos, nStyle ); + } + + // ----------------------------------------------------------------------- +@@ -5354,6 +5322,11 @@ void OutputDevice::DrawText( const Point + DBG_TRACE( "OutputDevice::DrawText()" ); + DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice ); + ++#if OSL_DEBUG_LEVEL > 2 ++ fprintf( stderr, " OutputDevice::DrawText(\"%s\")\n", ++ OUStringToOString( rStr, osl_getThreadTextEncoding() ).getStr() ); ++#endif ++ + if ( mpMetaFile ) + mpMetaFile->AddAction( new MetaTextAction( rStartPt, rStr, nIndex, nLen ) ); + if( pVector ) +@@ -5405,25 +5378,15 @@ void OutputDevice::DrawText( const Point + + if ( !IsDeviceOutputNecessary() || pVector ) + return; +-#ifdef UNX +- String aStr( rStr ); +- if( meOutDevType == OUTDEV_PRINTER ) +- { +- if( !mpGraphics ) +- if( !ImplGetGraphics() ) +- return; +- xub_StrLen nCutStart, nCutStop; +- aStr = mpGraphics->maGraphicsData.FaxPhoneComment( rStr, nIndex, nLen, nCutStart, nCutStop ); +- } +- SalLayout* pSalLayout = ImplLayout( aStr, nIndex, nLen, rStartPt ); +-#else + SalLayout* pSalLayout = ImplLayout( rStr, nIndex, nLen, rStartPt ); +-#endif + if( pSalLayout ) + { + ImplDrawText( *pSalLayout ); + pSalLayout->Release(); + } ++ ++ if( mpAlphaVDev ) ++ mpAlphaVDev->DrawText( rStartPt, rStr, nIndex, nLen, pVector, pDisplayText ); + } + + // ----------------------------------------------------------------------- +@@ -5460,7 +5423,7 @@ long OutputDevice::GetTextHeight() const + // ----------------------------------------------------------------------- + + void OutputDevice::DrawTextArray( const Point& rStartPt, const String& rStr, +- const long* pDXAry, ++ const sal_Int32* pDXAry, + xub_StrLen nIndex, xub_StrLen nLen ) + { + DBG_TRACE( "OutputDevice::DrawTextArray()" ); +@@ -5472,38 +5435,20 @@ void OutputDevice::DrawTextArray( const + if ( !IsDeviceOutputNecessary() ) + return; + +-#ifdef UNX +- String aStr( rStr ); +- if( meOutDevType == OUTDEV_PRINTER ) +- { +- if( !mpGraphics ) +- if( !ImplGetGraphics() ) +- return; +- xub_StrLen nCutStart, nCutStop, nOrgLen = nLen; +- aStr = mpGraphics->maGraphicsData.FaxPhoneComment( rStr, nIndex, nLen, nCutStart, nCutStop ); +- if( nCutStop != nCutStart ) +- { +- long* pAry = (long*)alloca(sizeof(long)*nLen ); +- if( nCutStart > nIndex ) +- memcpy( pAry, pDXAry, sizeof(long)*(nCutStart-nIndex) ); +- memcpy( pAry+nCutStart-nIndex, pDXAry + nOrgLen - (nCutStop-nIndex), nLen - (nCutStop-nIndex) ); +- pDXAry = pAry; +- } +- } +- SalLayout* pSalLayout = ImplLayout( aStr, nIndex, nLen, rStartPt, 0, pDXAry ); +-#else + SalLayout* pSalLayout = ImplLayout( rStr, nIndex, nLen, rStartPt, 0, pDXAry ); +-#endif + if( pSalLayout ) + { + ImplDrawText( *pSalLayout ); + pSalLayout->Release(); + } ++ ++ if( mpAlphaVDev ) ++ mpAlphaVDev->DrawTextArray( rStartPt, rStr, pDXAry, nIndex, nLen ); + } + + // ----------------------------------------------------------------------- + +-long OutputDevice::GetTextArray( const String& rStr, long* pDXAry, ++long OutputDevice::GetTextArray( const String& rStr, sal_Int32* pDXAry, + xub_StrLen nIndex, xub_StrLen nLen ) const + { + DBG_TRACE( "OutputDevice::GetTextArray()" ); +@@ -5550,9 +5495,9 @@ long OutputDevice::GetTextArray( const S + + // ----------------------------------------------------------------------- + +-bool OutputDevice::GetCaretPositions( const XubString& rStr, long* pCaretXArray, ++bool OutputDevice::GetCaretPositions( const XubString& rStr, sal_Int32* pCaretXArray, + xub_StrLen nIndex, xub_StrLen nLen, +- long* pDXAry, long nLayoutWidth, ++ sal_Int32* pDXAry, long nLayoutWidth, + BOOL bCellBreaking ) const + { + DBG_TRACE( "OutputDevice::GetCaretPositions()" ); +@@ -5632,44 +5577,29 @@ void OutputDevice::DrawStretchText( cons + if ( !IsDeviceOutputNecessary() ) + return; + +-#ifdef UNX +- String aStr( rStr ); +- if( meOutDevType == OUTDEV_PRINTER ) +- { +- if( !mpGraphics ) +- if( !ImplGetGraphics() ) +- return; +- xub_StrLen nCutStart, nCutStop; +- aStr = mpGraphics->maGraphicsData.FaxPhoneComment( rStr, nIndex, nLen, nCutStart, nCutStop ); +- } +- SalLayout* pSalLayout = ImplLayout( aStr, nIndex, nLen, rStartPt, nWidth ); +-#else + SalLayout* pSalLayout = ImplLayout( rStr, nIndex, nLen, rStartPt, nWidth ); +-#endif + if( pSalLayout ) + { + ImplDrawText( *pSalLayout ); + pSalLayout->Release(); + } ++ ++ if( mpAlphaVDev ) ++ mpAlphaVDev->DrawStretchText( rStartPt, nWidth, rStr, nIndex, nLen ); + } + + // ----------------------------------------------------------------------- + + SalLayout* OutputDevice::ImplLayout( const String& rOrigStr, + xub_StrLen nMinIndex, xub_StrLen nLen, +- const Point& rLogicalPos, long nLogicalWidth, const long* pDXArray ) const ++ const Point& rLogicalPos, long nLogicalWidth, const sal_Int32* pDXArray ) const + { + SalLayout* pSalLayout = NULL; + +-#ifndef REMOTE_APPSERVER + // we need a graphics + if( !mpGraphics ) + if( !ImplGetGraphics() ) + return NULL; +-#else +- // due to clipping we may get NULL, so don't use return value +- ImplGetServerGraphics(); +-#endif + + // initialize font if needed + if( mbNewFont ) +@@ -5790,7 +5720,7 @@ SalLayout* OutputDevice::ImplLayout( con + if( pDXArray && mbMap ) + { + // convert from logical units to font units using a temporary array +- long* pTempDXAry = (long*)alloca( nLength * sizeof(long) ); ++ sal_Int32* pTempDXAry = (sal_Int32*)alloca( nLength * sizeof(sal_Int32) ); + // using base position for better rounding a.k.a. "dancing characters" + int nPixelXOfs = ImplLogicWidthToDevicePixel( rLogicalPos.X() ); + for( int i = 0; i < nLength; ++i ) +@@ -6017,7 +5947,6 @@ void OutputDevice::DrawText( const Recta + if ( ( !IsDeviceOutputNecessary() && ! pVector ) || !rOrigStr.Len() || rRect.IsEmpty() ) + return; + +-#ifndef REMOTE_APPSERVER + // we need a graphics + if( !mpGraphics && !ImplGetGraphics() ) + return; +@@ -6025,10 +5954,6 @@ void OutputDevice::DrawText( const Recta + ImplInitClipRegion(); + if( mbOutputClipped ) + return; +-#else +- if( !ImplGetServerGraphics() ) +- return; +-#endif + + Color aOldTextColor; + Color aOldTextFillColor; +@@ -6063,10 +5988,14 @@ void OutputDevice::DrawText( const Recta + SetTextColor( COL_LIGHTGREEN ); + else + { ++ // draw disabled text always without shadow ++ // as it fits better with native look ++ /* + SetTextColor( GetSettings().GetStyleSettings().GetLightColor() ); + Rectangle aRect = rRect; + aRect.Move( 1, 1 ); + DrawText( aRect, rOrigStr, nStyle & ~TEXT_DRAW_DISABLE ); ++ */ + SetTextColor( GetSettings().GetStyleSettings().GetShadowColor() ); + } + } +@@ -6176,7 +6105,7 @@ void OutputDevice::DrawText( const Recta + long nMnemonicY; + long nMnemonicWidth; + +- long *pCaretXArray = (long*) alloca( 2 * sizeof(long) * nLineLen ); ++ sal_Int32* pCaretXArray = (sal_Int32*) alloca( 2 * sizeof(sal_Int32) * nLineLen ); + BOOL bRet = GetCaretPositions( aStr, pCaretXArray, + nIndex, nLineLen); + long lc_x1 = pCaretXArray[2*(nMnemonicPos - nIndex)]; +@@ -6184,11 +6113,7 @@ void OutputDevice::DrawText( const Recta + nMnemonicWidth = ::abs((int)(lc_x1 - lc_x2)); + + Point aTempPos = LogicToPixel( aPos ); +-#if (_MSC_VER < 1300) +- nMnemonicX = mnOutOffX + aTempPos.X() + ImplLogicWidthToDevicePixel( std::min( lc_x1, lc_x2 ) ); +-#else +- nMnemonicX = mnOutOffX + aTempPos.X() + ImplLogicWidthToDevicePixel( min( lc_x1, lc_x2 ) ); +-#endif ++ nMnemonicX = mnOutOffX + aTempPos.X() + ImplLogicWidthToDevicePixel( Min( lc_x1, lc_x2 ) ); + nMnemonicY = mnOutOffY + aTempPos.Y() + ImplLogicWidthToDevicePixel( GetFontMetric().GetAscent() ); + ImplDrawMnemonicLine( nMnemonicX, nMnemonicY, nMnemonicWidth ); + } +@@ -6251,18 +6176,14 @@ void OutputDevice::DrawText( const Recta + long nMnemonicWidth; + if ( nMnemonicPos != STRING_NOTFOUND ) + { +- long *pCaretXArray = (long*) alloca( 2 * sizeof(long) * aStr.Len() ); ++ sal_Int32* pCaretXArray = (sal_Int32*) alloca( 2 * sizeof(sal_Int32) * aStr.Len() ); + BOOL bRet = GetCaretPositions( aStr, pCaretXArray, 0, aStr.Len() ); + long lc_x1 = pCaretXArray[2*(nMnemonicPos)]; + long lc_x2 = pCaretXArray[2*(nMnemonicPos)+1]; + nMnemonicWidth = ::abs((int)(lc_x1 - lc_x2)); + + Point aTempPos = LogicToPixel( aPos ); +-#if (_MSC_VER < 1300) +- nMnemonicX = mnOutOffX + aTempPos.X() + ImplLogicWidthToDevicePixel( std::min(lc_x1, lc_x2) ); +-#else +- nMnemonicX = mnOutOffX + aTempPos.X() + ImplLogicWidthToDevicePixel( min(lc_x1, lc_x2) ); +-#endif ++ nMnemonicX = mnOutOffX + aTempPos.X() + ImplLogicWidthToDevicePixel( Min(lc_x1, lc_x2) ); + nMnemonicY = mnOutOffY + aTempPos.Y() + ImplLogicWidthToDevicePixel( GetFontMetric().GetAscent() ); + } + +@@ -6295,6 +6216,9 @@ void OutputDevice::DrawText( const Recta + if ( bRestoreFillColor ) + SetTextFillColor( aOldTextFillColor ); + } ++ ++ if( mpAlphaVDev ) ++ mpAlphaVDev->DrawText( rRect, rOrigStr, nStyle, pVector, pDisplayText ); + } + + // ----------------------------------------------------------------------- +@@ -6559,7 +6483,6 @@ void OutputDevice::DrawCtrlText( const P + return; + + // better get graphics here because ImplDrawMnemonicLine() will not +-#ifndef REMOTE_APPSERVER + // we need a graphics + if( !mpGraphics && !ImplGetGraphics() ) + return; +@@ -6567,10 +6490,6 @@ void OutputDevice::DrawCtrlText( const P + ImplInitClipRegion(); + if ( mbOutputClipped ) + return; +-#else +- if( !ImplGetServerGraphics() ) +- return; +-#endif + + if( nIndex >= rStr.Len() ) + return; +@@ -6608,22 +6527,17 @@ void OutputDevice::DrawCtrlText( const P + nMnemonicPos = nLen-1; + } + +- long *pCaretXArray = (long*)alloca( 2 * sizeof(long) * nLen ); ++ sal_Int32* pCaretXArray = (sal_Int32*)alloca( 2 * sizeof(sal_Int32) * nLen ); + BOOL bRet = GetCaretPositions( aStr, pCaretXArray, nIndex, nLen ); + long lc_x1 = pCaretXArray[ 2*(nMnemonicPos - nIndex) ]; + long lc_x2 = pCaretXArray[ 2*(nMnemonicPos - nIndex)+1 ]; + nMnemonicWidth = ::abs((int)(lc_x1 - lc_x2)); + +-#if (_MSC_VER < 1300) +- Point aTempPos( std::min(lc_x1,lc_x2), GetFontMetric().GetAscent() ); ++ Point aTempPos( Min(lc_x1,lc_x2), GetFontMetric().GetAscent() ); + if( bInvalidPos ) // #106952#, place behind the (last) character +- aTempPos = Point( std::max(lc_x1,lc_x2), GetFontMetric().GetAscent() ); +-#else +- Point aTempPos( min(lc_x1,lc_x2), GetFontMetric().GetAscent() ); +- if( bInvalidPos ) // #106952#, place behind the (last) character +- aTempPos = Point( max(lc_x1,lc_x2), GetFontMetric().GetAscent() ); +-#endif +- aTempPos += rPos; ++ aTempPos = Point( Max(lc_x1,lc_x2), GetFontMetric().GetAscent() ); ++ ++ aTempPos += rPos; + aTempPos = LogicToPixel( aTempPos ); + nMnemonicX = mnOutOffX + aTempPos.X(); + nMnemonicY = mnOutOffY + aTempPos.Y(); +@@ -6688,6 +6602,9 @@ void OutputDevice::DrawCtrlText( const P + ImplDrawMnemonicLine( nMnemonicX, nMnemonicY, nMnemonicWidth ); + } + } ++ ++ if( mpAlphaVDev ) ++ mpAlphaVDev->DrawCtrlText( rPos, rStr, nIndex, nLen, nStyle, pVector, pDisplayText ); + } + + // ----------------------------------------------------------------------- +@@ -6835,6 +6752,10 @@ BOOL OutputDevice::AddTempDevFont( const + if( !pFontData ) + return FALSE; + mpFontList->Add( pFontData ); ++ ++ if( mpAlphaVDev ) ++ mpAlphaVDev->AddTempDevFont( rFileURL, rFontName ); ++ + return TRUE; + } + +@@ -7101,13 +7023,8 @@ BOOL OutputDevice::GetTextBoundRect( Rec + long nXOffset = 0; + if( nBase != nIndex ) + { +-#if (_MSC_VER < 1300) +- xub_StrLen nStart = std::min( nBase, nIndex ); +- xub_StrLen nOfsLen = std::max( nBase, nIndex ) - nStart; +-#else +- xub_StrLen nStart = min( nBase, nIndex ); +- xub_StrLen nOfsLen = max( nBase, nIndex ) - nStart; +-#endif ++ xub_StrLen nStart = Min( nBase, nIndex ); ++ xub_StrLen nOfsLen = Max( nBase, nIndex ) - nStart; + pSalLayout = ImplLayout( rStr, nStart, nOfsLen ); + if( pSalLayout ) + { +@@ -7269,7 +7186,7 @@ BOOL OutputDevice::GetTextBoundRect( Rec + + BOOL OutputDevice::GetTextOutline( PolyPolygon& rPolyPoly, + const String& rStr, xub_StrLen nBase, xub_StrLen nIndex, xub_StrLen nLen, +- BOOL bOptimize, const ULONG nTWidth, const long* pDXArray ) const ++ BOOL bOptimize, const ULONG nTWidth, const sal_Int32* pDXArray ) const + { + rPolyPoly.Clear(); + PolyPolyVector aVector; +@@ -7286,7 +7203,7 @@ BOOL OutputDevice::GetTextOutline( PolyP + + BOOL OutputDevice::GetTextOutlines( PolyPolyVector& rVector, + const String& rStr, xub_StrLen nBase, xub_StrLen nIndex, +- xub_StrLen nLen, BOOL bOptimize, const ULONG nTWidth, const long* pDXArray ) const ++ xub_StrLen nLen, BOOL bOptimize, const ULONG nTWidth, const sal_Int32* pDXArray ) const + { + BOOL bRet = FALSE; + rVector.clear(); +@@ -7309,13 +7226,8 @@ BOOL OutputDevice::GetTextOutlines( Poly + long nXOffset = 0; + if( nBase != nIndex ) + { +-#if (_MSC_VER < 1300) +- xub_StrLen nStart = std::min( nBase, nIndex ); +- xub_StrLen nOfsLen = std::max( nBase, nIndex ) - nStart; +-#else +- xub_StrLen nStart = min( nBase, nIndex ); +- xub_StrLen nOfsLen = max( nBase, nIndex ) - nStart; +-#endif ++ xub_StrLen nStart = Min( nBase, nIndex ); ++ xub_StrLen nOfsLen = Max( nBase, nIndex ) - nStart; + pSalLayout = ImplLayout( rStr, nStart, nOfsLen, Point( 0,0 ), nTWidth, pDXArray ); + if( pSalLayout ) + { +@@ -7401,8 +7313,8 @@ BOOL OutputDevice::GetTextOutlines( Poly + if (pSalLayout == 0) + return false; + long nWidth = pSalLayout->GetTextWidth(); +- long nHeight = aVDev.mpFontEntry->mnLineHeight + aVDev.mnEmphasisAscent +- + aVDev.mnEmphasisDescent; ++ long nHeight = ((OutputDevice*)&aVDev)->mpFontEntry->mnLineHeight + ((OutputDevice*)&aVDev)->mnEmphasisAscent ++ + ((OutputDevice*)&aVDev)->mnEmphasisDescent; + pSalLayout->Release(); + + if( !nWidth || !nHeight ) +@@ -7446,8 +7358,8 @@ BOOL OutputDevice::GetTextOutlines( Poly + // draw glyph into virtual device + aVDev.Erase(); + pSalLayout->DrawBase() += aOffset; +- pSalLayout->DrawBase() += Point( aVDev.mnTextOffX, aVDev.mnTextOffY ); +- pSalLayout->DrawText( *aVDev.mpGraphics ); ++ pSalLayout->DrawBase() += Point( ((OutputDevice*)&aVDev)->mnTextOffX, ((OutputDevice*)&aVDev)->mnTextOffY ); ++ pSalLayout->DrawText( *((OutputDevice*)&aVDev)->mpGraphics ); + pSalLayout->Release(); + + // convert character image into outline +@@ -7467,11 +7379,11 @@ BOOL OutputDevice::GetTextOutlines( Poly + Point& rPt = rPoly[k]; + rPt.X() = FRound(ImplDevicePixelToLogicWidth( + nXOffset + rPt.X() - aOffset.X() +- - aVDev.mnTextOffX) ++ - ((OutputDevice*)&aVDev)->mnTextOffX) + * fScaleX); + rPt.Y() = FRound(ImplDevicePixelToLogicHeight( + rPt.Y() - aOffset.Y() +- - aVDev.mnTextOffY) ++ - ((OutputDevice*)&aVDev)->mnTextOffY) + * fScaleY); + } + } +@@ -7499,13 +7411,9 @@ BOOL OutputDevice::GetFontCharMap( FontC + { + rFontCharMap.ImplSetDefaultRanges(); + +-#ifndef REMOTE_APPSERVER + // we need a graphics + if( !mpGraphics && !ImplGetGraphics() ) + return FALSE; +-#else +- ImplGetServerGraphics(); +-#endif + + if( mbNewFont ) + const_cast<OutputDevice&>(*this).ImplNewFont(); +Index: vcl/source/gdi/outdev4.cxx +=================================================================== +RCS file: /cvs/gsl/vcl/source/gdi/outdev4.cxx,v +retrieving revision 1.13.136.1 +retrieving revision 1.17 +diff -u -p -u -r1.13.136.1 -r1.17 +--- vcl/source/gdi/outdev4.cxx 9 Jan 2004 18:13:45 -0000 1.13.136.1 ++++ vcl/source/gdi/outdev4.cxx 6 Jan 2004 13:50:37 -0000 1.17 +@@ -59,24 +59,14 @@ + * + ************************************************************************/ + +-#define _SV_OUTDEV_CXX +- + #include <math.h> + +-#ifndef REMOTE_APPSERVER + #ifndef _SV_SVSYS_HXX + #include <svsys.h> + #endif +-#endif +-#ifndef REMOTE_APPSERVER + #ifndef _SV_SALGDI_HXX + #include <salgdi.hxx> + #endif +-#else +-#ifndef _SV_RMOUTDEV_HXX +-#include <rmoutdev.hxx> +-#endif +-#endif + #ifndef _DEBUG_HXX + #include <tools/debug.hxx> + #endif +@@ -95,14 +85,14 @@ + #ifndef _SV_OUTDATA_HXX + #include <outdata.hxx> + #endif +-#ifndef _POLY_HXX ++#ifndef _TL_POLY_HXX + #include <tools/poly.hxx> + #endif + #ifndef _SV_SALBTYPE_HXX + #include <salbtype.hxx> + #endif +-#ifndef _SV_LINE_HXX +-#include <line.hxx> ++#ifndef _LINE_HXX ++#include <tools/line.hxx> + #endif + #ifndef _SV_HATCH_HXX + #include <hatch.hxx> +@@ -147,8 +137,6 @@ DBG_NAMEEX( Gradient ); + + // ======================================================================= + +-#ifndef REMOTE_APPSERVER +- + void OutputDevice::ImplDrawPolygon( const Polygon& rPoly, const PolyPolygon* pClipPolyPoly ) + { + if( pClipPolyPoly ) +@@ -224,8 +212,6 @@ void OutputDevice::ImplDrawPolyPolygon( + delete pPolyPoly; + } + +-#endif +- + // ----------------------------------------------------------------------- + + inline UINT8 ImplGetGradientColorValue( long nValue ) +@@ -395,10 +381,8 @@ void OutputDevice::ImplDrawLinearGradien + + if ( bMtf ) + mpMetaFile->AddAction( new MetaFillColorAction( Color( nRed, nGreen, nBlue ), TRUE ) ); +-#ifndef REMOTE_APPSERVER + else + mpGraphics->SetFillColor( MAKE_SALCOLOR( nRed, nGreen, nBlue ) ); +-#endif + + // Startpolygon erzeugen (== Borderpolygon) + Polygon aPoly( 4 ); +@@ -415,10 +399,8 @@ void OutputDevice::ImplDrawLinearGradien + // berechnetesPolygon ausgeben + if ( bMtf ) + mpMetaFile->AddAction( new MetaPolygonAction( aPoly ) ); +-#ifndef REMOTE_APPSERVER + else + ImplDrawPolygon( aPoly, pClipPolyPoly ); +-#endif + + // neues Polygon berechnen + aRect.Top() = (long)(fScanLine += fScanInc); +@@ -484,10 +466,8 @@ void OutputDevice::ImplDrawLinearGradien + + if ( bMtf ) + mpMetaFile->AddAction( new MetaFillColorAction( Color( nRed, nGreen, nBlue ), TRUE ) ); +-#ifndef REMOTE_APPSERVER + else + mpGraphics->SetFillColor( MAKE_SALCOLOR( nRed, nGreen, nBlue ) ); +-#endif + } + } + +@@ -630,17 +610,14 @@ void OutputDevice::ImplDrawComplexGradie + + if( bMtf ) + mpMetaFile->AddAction( new MetaFillColorAction( Color( nRed, nGreen, nBlue ), TRUE ) ); +-#ifndef REMOTE_APPSERVER + else + mpGraphics->SetFillColor( MAKE_SALCOLOR( nRed, nGreen, nBlue ) ); +-#endif + + if( pPolyPoly ) + { + pPolyPoly->Insert( aPoly = rRect ); + pPolyPoly->Insert( aPoly ); + } +-#ifndef REMOTE_APPSERVER + else + { + // extend rect, to avoid missing bounding line +@@ -653,7 +630,6 @@ void OutputDevice::ImplDrawComplexGradie + + ImplDrawPolygon( aPoly = aExtRect, pClipPolyPoly ); + } +-#endif + + // Schleife, um nacheinander die Polygone/PolyPolygone auszugeben + for( long i = 1; i < nSteps; i++ ) +@@ -690,10 +666,8 @@ void OutputDevice::ImplDrawComplexGradie + + if( bMtf ) + mpMetaFile->AddAction( new MetaPolyPolygonAction( *pPolyPoly ) ); +-#ifndef REMOTE_APPSERVER + else + ImplDrawPolyPolygon( *pPolyPoly, pClipPolyPoly ); +-#endif + + // #107349# Set fill color _after_ geometry painting: + // pPolyPoly's geometry is the band from last iteration's +@@ -707,7 +681,6 @@ void OutputDevice::ImplDrawComplexGradie + else + mpGraphics->SetFillColor( MAKE_SALCOLOR( nRed, nGreen, nBlue ) ); + } +-#ifndef REMOTE_APPSERVER + else + { + // #107349# Set fill color _before_ geometry painting +@@ -718,7 +691,6 @@ void OutputDevice::ImplDrawComplexGradie + + ImplDrawPolygon( aPoly, pClipPolyPoly ); + } +-#endif + } + + // Falls PolyPolygon-Ausgabe, muessen wir noch ein letztes inneres Polygon zeichnen +@@ -743,13 +715,11 @@ void OutputDevice::ImplDrawComplexGradie + mpMetaFile->AddAction( new MetaFillColorAction( Color( nRed, nGreen, nBlue ), TRUE ) ); + mpMetaFile->AddAction( new MetaPolygonAction( rPoly ) ); + } +-#ifndef REMOTE_APPSERVER + else + { + mpGraphics->SetFillColor( MAKE_SALCOLOR( nRed, nGreen, nBlue ) ); + ImplDrawPolygon( rPoly, pClipPolyPoly ); + } +-#endif + } + + delete pPolyPoly; +@@ -835,7 +805,6 @@ void OutputDevice::DrawGradient( const R + // Wenn Rechteck leer ist, brauchen wir nichts machen + if ( !aRect.IsEmpty() ) + { +-#ifndef REMOTE_APPSERVER + // Clip Region sichern + Push( PUSH_CLIPREGION ); + IntersectClipRegion( rRect ); +@@ -879,12 +848,10 @@ void OutputDevice::DrawGradient( const R + } + + Pop(); +-#else +- ImplServerGraphics* pGraphics = ImplGetServerGraphics(); +- if ( pGraphics ) +- pGraphics->DrawGradient( aRect, aGradient ); +-#endif + } ++ ++ if( mpAlphaVDev ) ++ mpAlphaVDev->DrawRect( rRect ); + } + + // ----------------------------------------------------------------------- +@@ -990,7 +957,6 @@ void OutputDevice::DrawGradient( const P + aGradient.SetEndColor( aEndCol ); + } + +-#ifndef REMOTE_APPSERVER + if( OUTDEV_PRINTER == meOutDevType ) + { + const Rectangle aBoundRect( rPolyPoly.GetBoundRect() ); +@@ -1054,41 +1020,52 @@ void OutputDevice::DrawGradient( const P + + if( !aDstRect.IsEmpty() ) + { +- VirtualDevice aVDev; ++ VirtualDevice* pVDev; + const Size aDstSize( aDstRect.GetSize() ); + +- if( aVDev.SetOutputSizePixel( aDstSize) ) ++ if( HasAlpha() ) ++ { ++ // #110958# Pay attention to alpha VDevs here, otherwise, ++ // background will be wrong: Temp VDev has to have alpha, too. ++ pVDev = new VirtualDevice( *this, 0, GetAlphaBitCount() > 1 ? 0 : 1 ); ++ } ++ else ++ { ++ // nothing special here. Plain VDev ++ pVDev = new VirtualDevice(); ++ } ++ ++ if( pVDev->SetOutputSizePixel( aDstSize) ) + { + MapMode aVDevMap; +- const RasterOp eOldROP = GetRasterOp(); + const BOOL bOldMap = mbMap; + +- mbMap = FALSE; ++ EnableMapMode( FALSE ); + +- aVDev.DrawOutDev( Point(), aDstSize, aDstRect.TopLeft(), aDstSize, *this ); +- aVDev.SetRasterOp( ROP_XOR ); ++ pVDev->DrawOutDev( Point(), aDstSize, aDstRect.TopLeft(), aDstSize, *this ); ++ pVDev->SetRasterOp( ROP_XOR ); + aVDevMap.SetOrigin( Point( -aDstRect.Left(), -aDstRect.Top() ) ); +- aVDev.SetMapMode( aVDevMap ); +- aVDev.DrawGradient( aBoundRect, aGradient ); +- aVDev.SetFillColor( COL_BLACK ); +- aVDev.SetRasterOp( ROP_0 ); +- aVDev.DrawPolyPolygon( aPolyPoly ); +- aVDev.SetRasterOp( ROP_XOR ); +- aVDev.DrawGradient( aBoundRect, aGradient ); ++ pVDev->SetMapMode( aVDevMap ); ++ pVDev->DrawGradient( aBoundRect, aGradient ); ++ pVDev->SetFillColor( COL_BLACK ); ++ pVDev->SetRasterOp( ROP_0 ); ++ pVDev->DrawPolyPolygon( aPolyPoly ); ++ pVDev->SetRasterOp( ROP_XOR ); ++ pVDev->DrawGradient( aBoundRect, aGradient ); + aVDevMap.SetOrigin( Point() ); +- aVDev.SetMapMode( aVDevMap ); +- DrawOutDev( aDstRect.TopLeft(), aDstSize, Point(), aDstSize, aVDev ); ++ pVDev->SetMapMode( aVDevMap ); ++ DrawOutDev( aDstRect.TopLeft(), aDstSize, Point(), aDstSize, *pVDev ); + +- mbMap = bOldMap; ++ EnableMapMode( bOldMap ); + } ++ ++ delete pVDev; + } + } +-#else +- ImplServerGraphics* pGraphics = ImplGetServerGraphics(); +- if ( pGraphics ) +- pGraphics->DrawGradient( ImplLogicToDevicePixel( rPolyPoly ), aGradient ); +-#endif + } ++ ++ if( mpAlphaVDev ) ++ mpAlphaVDev->DrawPolyPolygon( rPolyPoly ); + } + + // ----------------------------------------------------------------------- +@@ -1180,7 +1157,6 @@ void OutputDevice::DrawHatch( const Poly + if( !IsDeviceOutputNecessary() || ImplIsRecordLayout() ) + return; + +-#ifndef REMOTE_APPSERVER + if( !mpGraphics && !ImplGetGraphics() ) + return; + +@@ -1189,39 +1165,29 @@ void OutputDevice::DrawHatch( const Poly + + if( mbOutputClipped ) + return; +-#endif + + if( rPolyPoly.Count() ) + { +-#ifndef REMOTE_APPSERVER + PolyPolygon aPolyPoly( LogicToPixel( rPolyPoly ) ); + GDIMetaFile* pOldMetaFile = mpMetaFile; + BOOL bOldMap = mbMap; + + aPolyPoly.Optimize( POLY_OPTIMIZE_NO_SAME ); +- aHatch.SetDistance( ImplLogicWidthToDevicePixel( aHatch.GetDistance() ) ); ++ aHatch.SetDistance( ImplLogicWidthToDevicePixel( aHatch.GetDistance() ) ); + + mpMetaFile = NULL; +- mbMap = FALSE; ++ EnableMapMode( FALSE ); + Push( PUSH_LINECOLOR ); + SetLineColor( aHatch.GetColor() ); + ImplInitLineColor(); + ImplDrawHatch( aPolyPoly, aHatch, FALSE ); + Pop(); +- mbMap = bOldMap; ++ EnableMapMode( bOldMap ); + mpMetaFile = pOldMetaFile; +-#else +- ImplServerGraphics* pGraphics = ImplGetServerGraphics(); +- if ( pGraphics ) +- { +- PolyPolygon aPolyPoly( ImplLogicToDevicePixel( rPolyPoly ) ); +- +- aPolyPoly.Optimize( POLY_OPTIMIZE_NO_SAME ); +- aHatch.SetDistance( ImplLogicWidthToDevicePixel( aHatch.GetDistance() ) ); +- pGraphics->DrawHatch( aPolyPoly, aHatch ); +- } +-#endif + } ++ ++ if( mpAlphaVDev ) ++ mpAlphaVDev->DrawHatch( rPolyPoly, rHatch ); + } + + // ----------------------------------------------------------------------- +@@ -1422,7 +1388,6 @@ void OutputDevice::ImplDrawHatchLine( co + + if( rPoly.GetSize() > 1 ) + { +- Point aIntersection; + Line aCurSegment( rPoly[ 0 ], Point() ); + + for( long i = 1, nCount = rPoly.GetSize(); i <= nCount; i++ ) +@@ -1482,20 +1447,19 @@ void OutputDevice::ImplDrawHatchLine( co + } + else + { +-#ifndef REMOTE_APPSERVER + for( long i = 0; i < nPCounter; i += 2 ) + { + if( mpPDFWriter ) +- mpPDFWriter->drawLine( pPtBuffer[i], pPtBuffer[i+1] ); ++ { ++ mpPDFWriter->drawLine( pPtBuffer[ i ], pPtBuffer[ i+1 ] ); ++ } + else + { + const Point aPt1( ImplLogicToDevicePixel( pPtBuffer[ i ] ) ); + const Point aPt2( ImplLogicToDevicePixel( pPtBuffer[ i + 1 ] ) ); +- + mpGraphics->DrawLine( aPt1.X(), aPt1.Y(), aPt2.X(), aPt2.Y(), this ); + } + } +-#endif + } + } + } +Index: vcl/source/gdi/outdev5.cxx +=================================================================== +RCS file: /cvs/gsl/vcl/source/gdi/outdev5.cxx,v +retrieving revision 1.3 +retrieving revision 1.6 +diff -u -p -u -r1.3 -r1.6 +--- vcl/source/gdi/outdev5.cxx 27 Mar 2003 17:58:00 -0000 1.3 ++++ vcl/source/gdi/outdev5.cxx 6 Jan 2004 13:51:01 -0000 1.6 +@@ -59,23 +59,14 @@ + * + ************************************************************************/ + +-#define _SV_OUTDEV_CXX + #include <tools/ref.hxx> +-#ifndef REMOTE_APPSERVER + #ifndef _SV_SVSYS_HXX + #include <svsys.h> + #endif +-#endif + +-#ifndef REMOTE_APPSERVER + #ifndef _SV_SALGDI_HXX + #include <salgdi.hxx> + #endif +-#else +-#ifndef _SV_RMOUTDEV_HXX +-#include <rmoutdev.hxx> +-#endif +-#endif + + #ifndef _DEBUG_HXX + #include <tools/debug.hxx> +@@ -84,7 +75,7 @@ + #ifndef _SV_SVDATA_HXX + #include <svdata.hxx> + #endif +-#ifndef _POLY_HXX ++#ifndef _TL_POLY_HXX + #include <tools/poly.hxx> + #endif + #ifndef _SV_METAACT_HXX +@@ -102,6 +93,9 @@ + #ifndef _SV_OUTDEV_HXX + #include <outdev.hxx> + #endif ++#ifndef _SV_VIRDEV_HXX ++#include <virdev.hxx> ++#endif + + // ======================================================================= + +@@ -129,7 +123,6 @@ void OutputDevice::DrawRect( const Recta + nHorzRound = ImplLogicWidthToDevicePixel( nHorzRound ); + nVertRound = ImplLogicHeightToDevicePixel( nVertRound ); + +-#ifndef REMOTE_APPSERVER + // we need a graphics + if ( !mpGraphics ) + { +@@ -163,20 +156,9 @@ void OutputDevice::DrawRect( const Recta + mpGraphics->DrawPolygon( aRoundRectPoly.GetSize(), pPtAry, this ); + } + } +-#else +- ImplServerGraphics* pGraphics = ImplGetServerGraphics(); +- if ( pGraphics ) +- { +- if ( mbInitLineColor ) +- ImplInitLineColor(); +- if ( mbInitFillColor ) +- ImplInitFillColor(); +- if ( !nHorzRound || !nVertRound ) +- pGraphics->DrawRect( aRect ); +- else +- pGraphics->DrawRect( aRect, nHorzRound, nVertRound ); +- } +-#endif ++ ++ if( mpAlphaVDev ) ++ mpAlphaVDev->DrawRect( rRect, nHorzRound, nVertRound ); + } + + // ----------------------------------------------------------------------- +@@ -196,7 +178,6 @@ void OutputDevice::DrawEllipse( const Re + if ( aRect.IsEmpty() ) + return; + +-#ifndef REMOTE_APPSERVER + // we need a graphics + if ( !mpGraphics ) + { +@@ -225,17 +206,9 @@ void OutputDevice::DrawEllipse( const Re + mpGraphics->DrawPolygon( aRectPoly.GetSize(), pPtAry, this ); + } + } +-#else +- ImplServerGraphics* pGraphics = ImplGetServerGraphics(); +- if ( pGraphics ) +- { +- if ( mbInitLineColor ) +- ImplInitLineColor(); +- if ( mbInitFillColor ) +- ImplInitFillColor(); +- pGraphics->DrawEllipse( aRect ); +- } +-#endif ++ ++ if( mpAlphaVDev ) ++ mpAlphaVDev->DrawEllipse( rRect ); + } + + // ----------------------------------------------------------------------- +@@ -256,7 +229,6 @@ void OutputDevice::DrawArc( const Rectan + if ( aRect.IsEmpty() ) + return; + +-#ifndef REMOTE_APPSERVER + // we need a graphics + if ( !mpGraphics ) + { +@@ -281,19 +253,9 @@ void OutputDevice::DrawArc( const Rectan + const SalPoint* pPtAry = (const SalPoint*)aArcPoly.GetConstPointAry(); + mpGraphics->DrawPolyLine( aArcPoly.GetSize(), pPtAry, this ); + } +-#else +- ImplServerGraphics* pGraphics = ImplGetServerGraphics(); +- if ( pGraphics ) +- { +- if ( mbInitLineColor ) +- ImplInitLineColor(); +- if ( mbInitFillColor ) +- ImplInitFillColor(); +- pGraphics->DrawArc( aRect, +- ImplLogicToDevicePixel( rStartPt ), +- ImplLogicToDevicePixel( rEndPt ) ); +- } +-#endif ++ ++ if( mpAlphaVDev ) ++ mpAlphaVDev->DrawArc( rRect, rStartPt, rEndPt ); + } + + // ----------------------------------------------------------------------- +@@ -314,7 +276,6 @@ void OutputDevice::DrawPie( const Rectan + if ( aRect.IsEmpty() ) + return; + +-#ifndef REMOTE_APPSERVER + // we need a graphics + if ( !mpGraphics ) + { +@@ -346,19 +307,9 @@ void OutputDevice::DrawPie( const Rectan + mpGraphics->DrawPolygon( aPiePoly.GetSize(), pPtAry, this ); + } + } +-#else +- ImplServerGraphics* pGraphics = ImplGetServerGraphics(); +- if ( pGraphics ) +- { +- if ( mbInitLineColor ) +- ImplInitLineColor(); +- if ( mbInitFillColor ) +- ImplInitFillColor(); +- pGraphics->DrawPie( aRect, +- ImplLogicToDevicePixel( rStartPt ), +- ImplLogicToDevicePixel( rEndPt ) ); +- } +-#endif ++ ++ if( mpAlphaVDev ) ++ mpAlphaVDev->DrawPie( rRect, rStartPt, rEndPt ); + } + + // ----------------------------------------------------------------------- +@@ -379,7 +330,6 @@ void OutputDevice::DrawChord( const Rect + if ( aRect.IsEmpty() ) + return; + +-#ifndef REMOTE_APPSERVER + // we need a graphics + if ( !mpGraphics ) + { +@@ -411,17 +361,7 @@ void OutputDevice::DrawChord( const Rect + mpGraphics->DrawPolygon( aChordPoly.GetSize(), pPtAry, this ); + } + } +-#else +- ImplServerGraphics* pGraphics = ImplGetServerGraphics(); +- if ( pGraphics ) +- { +- if ( mbInitLineColor ) +- ImplInitLineColor(); +- if ( mbInitFillColor ) +- ImplInitFillColor(); +- pGraphics->DrawChord( aRect, +- ImplLogicToDevicePixel( rStartPt ), +- ImplLogicToDevicePixel( rEndPt ) ); +- } +-#endif ++ ++ if( mpAlphaVDev ) ++ mpAlphaVDev->DrawChord( rRect, rStartPt, rEndPt ); + } +Index: vcl/source/gdi/outdev6.cxx +=================================================================== +RCS file: /cvs/gsl/vcl/source/gdi/outdev6.cxx,v +retrieving revision 1.5 +retrieving revision 1.9 +diff -u -p -u -r1.5 -r1.9 +--- vcl/source/gdi/outdev6.cxx 8 Apr 2003 15:35:51 -0000 1.5 ++++ vcl/source/gdi/outdev6.cxx 17 May 2004 16:00:10 -0000 1.9 +@@ -59,19 +59,13 @@ + * + ************************************************************************/ + +-#define _SV_WALL_CXX +- + #include <math.h> +-#ifndef REMOTE_APPSERVER + #ifndef _SV_SVSYS_HXX + #include <svsys.h> + #endif + #ifndef _SV_SALGDI_HXX + #include <salgdi.hxx> + #endif +-#else // REMOTE_APPSERVER +-#include <tools/stream.hxx> +-#endif // REMOTE_APPSERVER + #ifndef _DEBUG_HXX + #include <tools/debug.hxx> + #endif +@@ -102,8 +96,8 @@ + #ifndef _SV_GRAPH_HXX + #include <graph.hxx> + #endif +-#ifdef REMOTE_APPSERVER +-#include <rmoutdev.hxx> ++#ifndef _SV_WALL2_HXX ++#include <wall2.hxx> + #endif + #ifndef _COM_SUN_STAR_UNO_SEQUENCE_HXX_ + #include <com/sun/star/uno/Sequence.hxx> +@@ -126,7 +120,6 @@ void OutputDevice::DrawGrid( const Recta + if( aDstRect.IsEmpty() || ImplIsRecordLayout() ) + return; + +-#ifndef REMOTE_APPSERVER + if( !mpGraphics && !ImplGetGraphics() ) + return; + +@@ -135,12 +128,6 @@ void OutputDevice::DrawGrid( const Recta + + if( mbOutputClipped ) + return; +-#else +- ImplServerGraphics* pGraphics = ImplGetServerGraphics(); +- +- if( !pGraphics ) +- return; +-#endif + + const long nDistX = Max( rDist.Width(), 1L ); + const long nDistY = Max( rDist.Height(), 1L ); +@@ -180,9 +167,8 @@ void OutputDevice::DrawGrid( const Recta + if( mbInitFillColor ) + ImplInitFillColor(); + +-#ifndef REMOTE_APPSERVER + const BOOL bOldMap = mbMap; +- mbMap = FALSE; ++ EnableMapMode( FALSE ); + + if( nFlags & GRID_DOTS ) + { +@@ -211,12 +197,10 @@ void OutputDevice::DrawGrid( const Recta + } + } + +- mbMap = bOldMap; +-#else // REMOTE_APPSERVER +- aHorzBuf.realloc( nHorzCount ); +- aVertBuf.realloc( nVertCount ); +- pGraphics->DrawGrid( nStartX, nEndX, aHorzBuf, nStartY, nEndY, aVertBuf, nFlags ); +-#endif // REMOTE_APPSERVER ++ EnableMapMode( bOldMap ); ++ ++ if( mpAlphaVDev ) ++ mpAlphaVDev->DrawGrid( rRect, rDist, nFlags ); + } + + // ------------------------------------------------------------------------ +@@ -241,6 +225,13 @@ void OutputDevice::DrawTransparent( cons + if( mpMetaFile ) + mpMetaFile->AddAction( new MetaTransparentAction( rPolyPoly, nTransparencePercent ) ); + ++ VirtualDevice* pOldAlphaVDev = mpAlphaVDev; ++ ++ // #110958# Disable alpha VDev, we perform the necessary ++ // operation explicitely further below. ++ if( mpAlphaVDev ) ++ mpAlphaVDev = NULL; ++ + if( !IsDeviceOutputNecessary() || ( !mbLineColor && !mbFillColor ) || ImplIsRecordLayout() ) + return; + +@@ -272,7 +263,7 @@ void OutputDevice::DrawTransparent( cons + Rectangle aRect( aPolyRect.TopLeft(), Size( aPolyRect.GetWidth(), nBaseExtent ) ); + + const BOOL bOldMap = mbMap; +- mbMap = FALSE; ++ EnableMapMode( FALSE ); + + while( aRect.Top() <= aPolyRect.Bottom() ) + { +@@ -287,12 +278,11 @@ void OutputDevice::DrawTransparent( cons + aRect.Move( nMove, 0 ); + } + +- mbMap = bOldMap; ++ EnableMapMode( bOldMap ); + Pop(); + } + else + { +-#ifndef REMOTE_APPSERVER + PolyPolygon aPolyPoly( LogicToPixel( rPolyPoly ) ); + Rectangle aPolyRect( aPolyPoly.GetBoundRect() ); + Point aPoint; +@@ -321,7 +311,7 @@ void OutputDevice::DrawTransparent( cons + { + const BOOL bOldMap = mbMap; + +- mbMap = FALSE; ++ EnableMapMode( FALSE ); + + aVDev.SetLineColor( COL_BLACK ); + aVDev.SetFillColor( COL_BLACK ); +@@ -438,7 +428,7 @@ void OutputDevice::DrawTransparent( cons + + DrawBitmap( aDstRect.TopLeft(), aPaint ); + +- mbMap = bOldMap; ++ EnableMapMode( bOldMap ); + + if( mbLineColor ) + { +@@ -452,20 +442,25 @@ void OutputDevice::DrawTransparent( cons + else + DrawPolyPolygon( rPolyPoly ); + } +-#else // REMOTE_APPSERVER +- ImplServerGraphics* pGraphics = ImplGetServerGraphics(); +- if ( pGraphics ) +- { +- if ( mbInitLineColor ) +- ImplInitLineColor(); +- if ( mbInitFillColor ) +- ImplInitFillColor(); +- pGraphics->DrawTransparent( ImplLogicToDevicePixel( rPolyPoly ), nTransparencePercent ); +- } +-#endif // REMOTE_APPSERVER + } + + mpMetaFile = pOldMetaFile; ++ ++ // #110958# Restore disabled alpha VDev ++ mpAlphaVDev = pOldAlphaVDev; ++ ++ // #110958# Apply alpha value also to VDev alpha channel ++ if( mpAlphaVDev ) ++ { ++ const Color aFillCol( mpAlphaVDev->GetFillColor() ); ++ mpAlphaVDev->SetFillColor( Color(255*nTransparencePercent/100, ++ 255*nTransparencePercent/100, ++ 255*nTransparencePercent/100) ); ++ ++ mpAlphaVDev->DrawTransparent( rPolyPoly, nTransparencePercent ); ++ ++ mpAlphaVDev->SetFillColor( aFillCol ); ++ } + } + } + +@@ -511,8 +506,8 @@ void OutputDevice::DrawTransparent( cons + { + VirtualDevice* pVDev = new VirtualDevice; + +- pVDev->mnDPIX = mnDPIX; +- pVDev->mnDPIY = mnDPIY; ++ ((OutputDevice*)pVDev)->mnDPIX = mnDPIX; ++ ((OutputDevice*)pVDev)->mnDPIY = mnDPIY; + + if( pVDev->SetOutputSizePixel( aDstRect.GetSize() ) ) + { +@@ -553,17 +548,13 @@ void OutputDevice::DrawTransparent( cons + pVDev->EnableMapMode( FALSE ); + pVDev->DrawMask( Point(), pVDev->GetOutputSizePixel(), aMask, Color( COL_WHITE ) ); + +-#ifndef REMOTE_APPSERVER + aAlpha = pVDev->GetBitmap( Point(), pVDev->GetOutputSizePixel() ); +-#else +- aAlpha.ImplSetBitmap( pVDev->GetBitmap( Point(), pVDev->GetOutputSizePixel() ) ); +-#endif + + delete pVDev; + +- mbMap = FALSE; ++ EnableMapMode( FALSE ); + DrawBitmapEx( aDstRect.TopLeft(), BitmapEx( aPaint, aAlpha ) ); +- mbMap = bOldMap; ++ EnableMapMode( bOldMap ); + } + else + delete pVDev; +@@ -579,7 +570,6 @@ void OutputDevice::ImplDrawColorWallpape + long nWidth, long nHeight, + const Wallpaper& rWallpaper ) + { +-#ifndef REMOTE_APPSERVER + // we need a graphics + if ( !mpGraphics ) + { +@@ -604,23 +594,6 @@ void OutputDevice::ImplDrawColorWallpape + mpGraphics->DrawRect( nX+mnOutOffX, nY+mnOutOffY, nWidth, nHeight, this ); + SetLineColor( aOldLineColor ); + SetFillColor( aOldFillColor ); +-#else +- ImplServerGraphics* pGraphics = ImplGetServerGraphics(); +- if ( pGraphics ) +- { +- Color aOldLineColor = GetLineColor(); +- Color aOldFillColor = GetFillColor(); +- SetLineColor(); +- SetFillColor( rWallpaper.GetColor() ); +- if ( mbInitLineColor ) +- ImplInitLineColor(); +- if ( mbInitFillColor ) +- ImplInitFillColor(); +- pGraphics->DrawRect( Rectangle( Point( nX+mnOutOffX, nY+mnOutOffY ), Size( nWidth, nHeight ) ) ); +- SetLineColor( aOldLineColor ); +- SetFillColor( aOldFillColor ); +- } +-#endif + } + + // ----------------------------------------------------------------------- +@@ -699,7 +672,7 @@ void OutputDevice::ImplDrawBitmapWallpap + } + + mpMetaFile = NULL; +- mbMap = FALSE; ++ EnableMapMode( FALSE ); + Push( PUSH_CLIPREGION ); + IntersectClipRegion( Rectangle( Point( nX, nY ), Size( nWidth, nHeight ) ) ); + +@@ -862,7 +835,7 @@ void OutputDevice::ImplDrawBitmapWallpap + rWallpaper.ImplGetImpWallpaper()->ImplSetCachedBitmap( aBmpEx ); + + Pop(); +- mbMap = bOldMap; ++ EnableMapMode( bOldMap ); + mpMetaFile = pOldMetaFile; + } + +@@ -884,14 +857,14 @@ void OutputDevice::ImplDrawGradientWallp + aBound = Rectangle( Point( nX, nY ), Size( nWidth, nHeight ) ); + + mpMetaFile = NULL; +- mbMap = FALSE; ++ EnableMapMode( FALSE ); + Push( PUSH_CLIPREGION ); + IntersectClipRegion( Rectangle( Point( nX, nY ), Size( nWidth, nHeight ) ) ); + + DrawGradient( aBound, rWallpaper.GetGradient() ); + + Pop(); +- mbMap = bOldMap; ++ EnableMapMode( bOldMap ); + mpMetaFile = pOldMetaFile; + } + +@@ -931,6 +904,9 @@ void OutputDevice::DrawWallpaper( const + rWallpaper ); + } + } ++ ++ if( mpAlphaVDev ) ++ mpAlphaVDev->DrawWallpaper( rRect, rWallpaper ); + } + + // ----------------------------------------------------------------------- +@@ -949,6 +925,9 @@ void OutputDevice::Erase() + if ( eRasterOp != ROP_OVERPAINT ) + SetRasterOp( eRasterOp ); + } ++ ++ if( mpAlphaVDev ) ++ mpAlphaVDev->Erase(); + } + + // ----------------------------------------------------------------------- +@@ -957,40 +936,12 @@ void OutputDevice::ImplDraw2ColorFrame( + const Color& rLeftTopColor, + const Color& rRightBottomColor ) + { +-#ifndef REMOTE_APPSERVER + SetFillColor( rLeftTopColor ); + DrawRect( Rectangle( rRect.TopLeft(), Point( rRect.Left(), rRect.Bottom()-1 ) ) ); + DrawRect( Rectangle( rRect.TopLeft(), Point( rRect.Right()-1, rRect.Top() ) ) ); + SetFillColor( rRightBottomColor ); + DrawRect( Rectangle( rRect.BottomLeft(), rRect.BottomRight() ) ); + DrawRect( Rectangle( rRect.TopRight(), rRect.BottomRight() ) ); +-#else +- if ( mpMetaFile ) +- { +- BOOL bOutputEnabled = IsOutputEnabled(); +- EnableOutput( FALSE ); +- SetFillColor( rLeftTopColor ); +- DrawRect( Rectangle( rRect.TopLeft(), Point( rRect.Left(), rRect.Bottom()-1 ) ) ); +- DrawRect( Rectangle( rRect.TopLeft(), Point( rRect.Right()-1, rRect.Top() ) ) ); +- SetFillColor( rRightBottomColor ); +- DrawRect( Rectangle( rRect.BottomLeft(), rRect.BottomRight() ) ); +- DrawRect( Rectangle( rRect.TopRight(), rRect.BottomRight() ) ); +- EnableOutput( bOutputEnabled ); +- } +- +- if ( IsDeviceOutputNecessary() && !rRect.IsEmpty() ) +- { +- ImplServerGraphics* pGraphics = ImplGetServerGraphics(); +- if ( pGraphics ) +- { +- if ( mbInitLineColor ) +- ImplInitLineColor(); +- Rectangle aRect( ImplLogicToDevicePixel( rRect ) ); +- pGraphics->Draw2ColorFrame( aRect, rLeftTopColor, rRightBottomColor ); +- } +- } +- SetFillColor( rRightBottomColor ); +-#endif + } + + // ----------------------------------------------------------------------- +@@ -1011,6 +962,9 @@ void OutputDevice::DrawEPS( const Point& + if ( !IsDeviceOutputNecessary() || ImplIsRecordLayout() ) + return; + ++ if( mbOutputClipped ) ++ return; ++ + Rectangle aRect( ImplLogicToDevicePixel( Rectangle( rPoint, rSize ) ) ); + BOOL bDrawn = FALSE; + +@@ -1020,21 +974,14 @@ void OutputDevice::DrawEPS( const Point& + + if( GetOutDevType() == OUTDEV_PRINTER ) + { +-#ifndef REMOTE_APPSERVER + if( !mpGraphics && !ImplGetGraphics() ) + return; + + if( mbInitClipRegion ) + ImplInitClipRegion(); + +- if( !mbOutputClipped ) +- { +- bDrawn = mpGraphics->DrawEPS( aRect.Left(), aRect.Top(), aRect.GetWidth(), aRect.GetHeight(), +- (BYTE*) rGfxLink.GetData(), rGfxLink.GetDataSize(), this ); +- } +-#else +- DBG_ERROR( "No direct EPS-support for remote appserver!" ); +-#endif ++ bDrawn = mpGraphics->DrawEPS( aRect.Left(), aRect.Top(), aRect.GetWidth(), aRect.GetHeight(), ++ (BYTE*) rGfxLink.GetData(), rGfxLink.GetDataSize(), this ); + } + + if( !bDrawn && pSubst ) +@@ -1046,4 +993,7 @@ void OutputDevice::DrawEPS( const Point& + mpMetaFile = pOldMetaFile; + } + } ++ ++ if( mpAlphaVDev ) ++ mpAlphaVDev->DrawEPS( rPoint, rSize, rGfxLink, pSubst ); + } +Index: vcl/source/gdi/outmap.cxx +=================================================================== +RCS file: /cvs/gsl/vcl/source/gdi/outmap.cxx,v +retrieving revision 1.10.122.1 +retrieving revision 1.13 +diff -u -p -u -r1.10.122.1 -r1.13 +--- vcl/source/gdi/outmap.cxx 17 Sep 2003 08:35:33 -0000 1.10.122.1 ++++ vcl/source/gdi/outmap.cxx 6 Jan 2004 13:51:57 -0000 1.13 +@@ -61,8 +61,6 @@ + + #include <limits.h> + +-#define _SV_OUTMAP_CXX +- + #ifndef _SV_SVSYS_HXX + #include <svsys.h> + #endif +@@ -74,10 +72,13 @@ + #include <tools/debug.hxx> + #endif + ++#ifndef _SV_VIRDEV_HXX ++#include <virdev.hxx> ++#endif + #ifndef _SV_SVDATA_HXX + #include <svdata.hxx> + #endif +-#ifndef _POLY_HXX ++#ifndef _TL_POLY_HXX + #include <tools/poly.hxx> + #endif + #ifndef _SV_REGION_HXX +@@ -811,6 +812,16 @@ Region OutputDevice::ImplPixelToDevicePi + + // ----------------------------------------------------------------------- + ++void OutputDevice::EnableMapMode( BOOL bEnable ) ++{ ++ mbMap = (bEnable != 0); ++ ++ if( mpAlphaVDev ) ++ mpAlphaVDev->EnableMapMode( bEnable ); ++} ++ ++// ----------------------------------------------------------------------- ++ + void OutputDevice::SetMapMode() + { + DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice ); +@@ -836,6 +847,9 @@ void OutputDevice::SetMapMode() + mnOutOffLogicX = mnOutOffOrigX; // no mapping -> equal offsets + mnOutOffLogicY = mnOutOffOrigY; + } ++ ++ if( mpAlphaVDev ) ++ mpAlphaVDev->SetMapMode(); + } + + // ----------------------------------------------------------------------- +@@ -859,6 +873,9 @@ void OutputDevice::SetMapMode( const Map + if ( maMapMode == rNewMapMode ) + return; + ++ if( mpAlphaVDev ) ++ mpAlphaVDev->SetMapMode( rNewMapMode ); ++ + // Ist Default-MapMode, dann bereche nichts + BOOL bOldMap = mbMap; + mbMap = !rNewMapMode.IsDefault(); +@@ -999,6 +1016,9 @@ void OutputDevice::SetRelativeMapMode( c + mnOutOffLogicY = ImplPixelToLogic( mnOutOffOrigY, mnDPIY, + maMapRes.mnMapScNumY, maMapRes.mnMapScDenomY, + maThresRes.mnThresPixToLogY ); ++ ++ if( mpAlphaVDev ) ++ mpAlphaVDev->SetRelativeMapMode( rNewMapMode ); + } + + // ----------------------------------------------------------------------- +@@ -2113,6 +2133,9 @@ void OutputDevice::SetPixelOffset( const + mnOutOffLogicY = ImplPixelToLogic( mnOutOffOrigY, mnDPIY, + maMapRes.mnMapScNumY, maMapRes.mnMapScDenomY, + maThresRes.mnThresPixToLogY ); ++ ++ if( mpAlphaVDev ) ++ mpAlphaVDev->SetPixelOffset( rOffset ); + } + + // ----------------------------------------------------------------------- +Index: vcl/source/gdi/pdfwriter.cxx +=================================================================== +RCS file: /cvs/gsl/vcl/source/gdi/pdfwriter.cxx,v +retrieving revision 1.8 +retrieving revision 1.9 +diff -u -p -u -r1.8 -r1.9 +--- vcl/source/gdi/pdfwriter.cxx 28 May 2003 12:30:50 -0000 1.8 ++++ vcl/source/gdi/pdfwriter.cxx 17 Jun 2004 12:19:19 -0000 1.9 +@@ -129,7 +129,7 @@ void PDFWriter::DrawTextLine( + void PDFWriter::DrawTextArray( + const Point& rStartPt, + const XubString& rStr, +- const long* pDXAry, ++ const sal_Int32* pDXAry, + xub_StrLen nIndex, + xub_StrLen nLen ) + { +Index: vcl/source/gdi/pdfwriter_impl.cxx +=================================================================== +RCS file: /cvs/gsl/vcl/source/gdi/pdfwriter_impl.cxx,v +retrieving revision 1.55.10.6 +retrieving revision 1.68 +diff -u -p -u -r1.55.10.6 -r1.68 +--- vcl/source/gdi/pdfwriter_impl.cxx 13 Feb 2004 13:20:46 -0000 1.55.10.6 ++++ vcl/source/gdi/pdfwriter_impl.cxx 17 Jun 2004 12:39:36 -0000 1.68 +@@ -59,6 +59,9 @@ + * + ************************************************************************/ + ++#define _USE_MATH_DEFINES ++#include <math.h> ++ + #include <pdfwriter_impl.hxx> + #include <rtl/strbuf.hxx> + #include <tools/debug.hxx> +@@ -71,29 +74,19 @@ + #include <outdev.h> + #include <sallayout.hxx> + #include <metric.hxx> +-#ifndef REMOTE_APPSERVER + #include <svsys.h> + #include <salgdi.hxx> +-#else +-#include <rmoutdev.hxx> +-#endif + #include <osl/thread.h> + #include <osl/file.h> + #include <rtl/crc.h> + + #include "implncvt.hxx" + +-#include <math.h> + #ifdef WNT + // Aaarrgh + #define M_PI 3.14159265 + #endif + +-#define ENABLE_COMPRESSION +-#if OSL_DEBUG_LEVEL < 2 +-#define COMPRESS_PAGES +-#endif +- + using namespace vcl; + using namespace rtl; + +@@ -246,6 +234,117 @@ static void appendNonStrokingColor( cons + } + } + ++// matrix helper class ++namespace vcl ++{ ++/* for sparse matrices of the form (2D linear transformations) ++ * f[0] f[1] 0 ++ * f[2] f[3] 0 ++ * f[4] f[5] 1 ++ */ ++class Matrix3 ++{ ++ double f[6]; ++ ++ void set( double *pn ) { for( int i = 0 ; i < 5; i++ ) f[i] = pn[i]; } ++public: ++ Matrix3(); ++ ~Matrix3() {} ++ ++ void skew( double alpha, double beta ); ++ void scale( double sx, double sy ); ++ void rotate( double angle ); ++ void translate( double tx, double ty ); ++ ++ void append( PDFWriterImpl::PDFPage& rPage, OStringBuffer& rBuffer, Point* pBack = NULL ); ++ ++ Point transform( const Point& rPoint ); ++}; ++} ++ ++Matrix3::Matrix3() ++{ ++ // initialize to unity ++ f[0] = 1.0; ++ f[1] = 0.0; ++ f[2] = 0.0; ++ f[3] = 1.0; ++ f[4] = 0.0; ++ f[5] = 0.0; ++} ++ ++Point Matrix3::transform( const Point& rOrig ) ++{ ++ double x = (double)rOrig.X(), y = (double)rOrig.Y(); ++ return Point( (int)(x*f[0] + y*f[2] + f[4]), (int)(x*f[1] + y*f[3] + f[5]) ); ++} ++ ++void Matrix3::skew( double alpha, double beta ) ++{ ++ double fn[6]; ++ double tb = tan( beta ); ++ fn[0] = f[0] + f[2]*tb; ++ fn[1] = f[1]; ++ fn[2] = f[2] + f[3]*tb; ++ fn[3] = f[3]; ++ fn[4] = f[4] + f[5]*tb; ++ fn[5] = f[5]; ++ if( alpha != 0.0 ) ++ { ++ double ta = tan( alpha ); ++ fn[1] += f[0]*ta; ++ fn[3] += f[2]*ta; ++ fn[5] += f[4]*ta; ++ } ++ set( fn ); ++} ++ ++void Matrix3::scale( double sx, double sy ) ++{ ++ double fn[6]; ++ fn[0] = sx*f[0]; ++ fn[1] = sy*f[1]; ++ fn[2] = sx*f[2]; ++ fn[3] = sy*f[3]; ++ fn[4] = sx*f[4]; ++ fn[5] = sy*f[5]; ++ set( fn ); ++} ++ ++void Matrix3::rotate( double angle ) ++{ ++ double fn[6]; ++ double fSin = sin(angle); ++ double fCos = cos(angle); ++ fn[0] = f[0]*fCos - f[1]*fSin; ++ fn[1] = f[0]*fSin + f[1]*fCos; ++ fn[2] = f[2]*fCos - f[3]*fSin; ++ fn[3] = f[2]*fSin + f[3]*fCos; ++ fn[4] = f[4]*fCos - f[5]*fSin; ++ fn[5] = f[4]*fSin + f[5]*fCos; ++ set( fn ); ++} ++ ++void Matrix3::translate( double tx, double ty ) ++{ ++ f[4] += tx; ++ f[5] += ty; ++} ++ ++void Matrix3::append( PDFWriterImpl::PDFPage& rPage, OStringBuffer& rBuffer, Point* pBack ) ++{ ++ appendDouble( f[0], rBuffer ); ++ rBuffer.append( ' ' ); ++ appendDouble( f[1], rBuffer ); ++ rBuffer.append( ' ' ); ++ appendDouble( f[2], rBuffer ); ++ rBuffer.append( ' ' ); ++ appendDouble( f[3], rBuffer ); ++ rBuffer.append( ' ' ); ++ rPage.appendPoint( Point( (long)f[4], (long)f[5] ), rBuffer, false, pBack ); ++} ++ ++ + + PDFWriterImpl::PDFPage::PDFPage( PDFWriterImpl* pWriter, sal_Int32 nPageWidth, sal_Int32 nPageHeight, PDFWriter::Orientation eOrientation ) + : +@@ -277,7 +376,7 @@ void PDFWriterImpl::PDFPage::beginStream + aLine.append( " 0 obj\r\n<< /Length " ); + aLine.append( m_nStreamLengthObject ); + aLine.append( " 0 R\r\n" ); +-#if defined COMPRESS_PAGES && defined ENABLE_COMPRESSION ++#if defined ( COMPRESS_PAGES ) && !defined ( DEBUG_DISABLE_PDFCOMPRESSION ) + aLine.append( " /Filter /FlateDecode\r\n" ); + #endif + aLine.append( ">>\r\nstream\r\n" ); +@@ -288,7 +387,7 @@ void PDFWriterImpl::PDFPage::beginStream + osl_closeFile( m_pWriter->m_aFile ); + m_pWriter->m_bOpen = false; + } +-#if defined COMPRESS_PAGES && defined ENABLE_COMPRESSION ++#if defined ( COMPRESS_PAGES ) && !defined ( DEBUG_DISABLE_PDFCOMPRESSION ) + m_pWriter->beginCompression(); + #endif + } +@@ -329,9 +428,6 @@ bool PDFWriterImpl::PDFPage::emit(sal_In + " /Parent " ); + aLine.append( nParentObject ); + aLine.append( " 0 R\r\n" ); +- aLine.append( " /Resources " ); +- aLine.append( m_pWriter->m_nResourceDict ); +- aLine.append( " 0 R\r\n" ); + if( m_nPageWidth && m_nPageHeight ) + { + aLine.append( " /MediaBox [ 0 0 " ); +@@ -428,9 +524,9 @@ void PDFWriterImpl::PDFPage::appendRect( + { + appendPoint( rRect.BottomLeft() + Point( 0, 1 ), rBuffer ); + rBuffer.append( ' ' ); +- appendMappedLength( rRect.GetWidth(), rBuffer, false ); ++ appendMappedLength( (sal_Int32)rRect.GetWidth(), rBuffer, false ); + rBuffer.append( ' ' ); +- appendMappedLength( rRect.GetHeight(), rBuffer, true ); ++ appendMappedLength( (sal_Int32)rRect.GetHeight(), rBuffer, true ); + rBuffer.append( " re" ); + } + +@@ -545,23 +641,23 @@ void PDFWriterImpl::PDFPage::appendLineI + rBuffer.append( "[ " ); + for( int n = 0; n < rInfo.GetDashCount(); n++ ) + { +- appendMappedLength( rInfo.GetDashLen(), rBuffer ); ++ appendMappedLength( (sal_Int32)rInfo.GetDashLen(), rBuffer ); + rBuffer.append( ' ' ); +- appendMappedLength( rInfo.GetDistance(), rBuffer ); ++ appendMappedLength( (sal_Int32)rInfo.GetDistance(), rBuffer ); + rBuffer.append( ' ' ); + } + for( int m = 0; m < rInfo.GetDotCount(); m++ ) + { +- appendMappedLength( rInfo.GetDotLen(), rBuffer ); ++ appendMappedLength( (sal_Int32)rInfo.GetDotLen(), rBuffer ); + rBuffer.append( ' ' ); +- appendMappedLength( rInfo.GetDistance(), rBuffer ); ++ appendMappedLength( (sal_Int32)rInfo.GetDistance(), rBuffer ); + rBuffer.append( ' ' ); + } + rBuffer.append( "] 0 d\r\n" ); + } + if( rInfo.GetWidth() > 1 ) + { +- appendMappedLength( rInfo.GetWidth(), rBuffer ); ++ appendMappedLength( (sal_Int32)rInfo.GetWidth(), rBuffer ); + rBuffer.append( " w\r\n" ); + } + else if( rInfo.GetWidth() == 0 ) +@@ -620,7 +716,6 @@ PDFWriterImpl::PDFWriterImpl( const OUSt + m_nInheritedPageHeight( 842 ), // default A4 + m_eInheritedOrientation( PDFWriter::Portrait ), + m_nCurrentPage( -1 ), +- m_nResourceDict( -1 ), + m_eVersion( eVersion ), + m_eCompression( eCompression ), + m_aFileName( rFilename ), +@@ -695,7 +790,7 @@ void PDFWriterImpl::emitComment( const O + + void PDFWriterImpl::beginCompression() + { +-#ifdef ENABLE_COMPRESSION ++#ifndef DEBUG_DISABLE_PDFCOMPRESSION + m_pCodec = new ZCodec( 0x4000, 0x4000 ); + m_pMemStream = new SvMemoryStream(); + m_pCodec->BeginCompression(); +@@ -704,7 +799,7 @@ void PDFWriterImpl::beginCompression() + + void PDFWriterImpl::endCompression() + { +-#ifdef ENABLE_COMPRESSION ++#ifndef DEBUG_DISABLE_PDFCOMPRESSION + if( m_pCodec ) + { + m_pCodec->EndCompression(); +@@ -753,24 +848,19 @@ OutputDevice* PDFWriterImpl::getReferenc + if( ! m_pReferenceDevice ) + { + VirtualDevice* pVDev = new VirtualDevice( 0 ); +- sal_Int32 nDPI; + + m_pReferenceDevice = pVDev; +- pVDev->SetReferenceDevice(); + ++ VirtualDevice::RefDevMode eMode = VirtualDevice::REFDEV_MODE06; + switch( m_eCompression ) + { +- case( PDFWriter::Print ): nDPI = 1200; break; +- case( PDFWriter::Press ): nDPI = 2400; break; +- +- default: +- nDPI = 600; +- break; ++ case( PDFWriter::Print ): eMode = VirtualDevice::REFDEV_MODE48; break; ++ case( PDFWriter::Press ): eMode = VirtualDevice::REFDEV_MODE96; break; + } ++ pVDev->SetReferenceDevice( eMode ); + + pVDev->SetOutputSizePixel( Size( 640, 480 ) ); + pVDev->SetMapMode( MAP_MM ); +- pVDev->mnDPIX = pVDev->mnDPIY = nDPI; + + m_pReferenceDevice->mpPDFWriter = this; + m_pReferenceDevice->ImplUpdateFontData( TRUE ); +@@ -781,7 +871,6 @@ OutputDevice* PDFWriterImpl::getReferenc + ImplDevFontList* PDFWriterImpl::filterDevFontList( ImplDevFontList* pFontList ) + { + DBG_ASSERT( m_aSubsets.size() == 0, "Fonts changing during PDF generation, document will be invalid" ); +- + ImplDevFontList* pFiltered = new ImplDevFontList(); + + ImplDevFontListData* pData = pFontList->First(); +@@ -1403,7 +1493,7 @@ std::map< sal_Int32, sal_Int32 > PDFWrit + "<< /Length " ); + aLine.append( nStreamLengthObject ); + aLine.append( " 0 R\r\n" +-#ifdef ENABLE_COMPRESSION ++#ifndef DEBUG_DISABLE_PDFCOMPRESSION + " /Filter /FlateDecode\r\n" + #endif + " /Length1 " ); +@@ -1764,7 +1854,7 @@ sal_Int32 PDFWriterImpl::createToUnicode + "CMapName currentdict /CMap defineresource pop\r\n" + "end\r\n" + "end\r\n" ); +-#if defined COMPRESS_PAGES && defined ENABLE_COMPRESSION ++#ifndef DEBUG_DISABLE_PDFCOMPRESSION + ZCodec* pCodec = new ZCodec( 0x4000, 0x4000 ); + SvMemoryStream aStream; + pCodec->BeginCompression(); +@@ -1777,7 +1867,7 @@ sal_Int32 PDFWriterImpl::createToUnicode + + aLine.append( nStream ); + aLine.append( " 0 obj\r\n<< /Length " ); +-#if defined COMPRESS_PAGES && defined ENABLE_COMPRESSION ++#ifndef DEBUG_DISABLE_PDFCOMPRESSION + sal_Int32 nLen = (sal_Int32)aStream.Tell(); + aStream.Seek( 0 ); + aLine.append( nLen ); +@@ -1787,7 +1877,7 @@ sal_Int32 PDFWriterImpl::createToUnicode + #endif + aLine.append( " >>\r\nstream\r\n" ); + CHECK_RETURN( writeBuffer( aLine.getStr(), aLine.getLength() ) ); +-#if defined COMPRESS_PAGES && defined ENABLE_COMPRESSION ++#ifndef DEBUG_DISABLE_PDFCOMPRESSION + CHECK_RETURN( writeBuffer( aStream.GetData(), nLen ) ); + #else + CHECK_RETURN( writeBuffer( aContents.getStr(), aContents.getLength() ) ); +@@ -1884,11 +1974,7 @@ sal_Int32 PDFWriterImpl::emitFonts() + if( ! m_aSubsets.size() && ! m_aEmbeddedFonts.size() ) // no fonts + return 0; + +-#ifndef REMOTE_APPSERVER + if( ! m_pReferenceDevice->ImplGetGraphics() ) +-#else +- if( ! m_pReferenceDevice->ImplGetServerGraphics() ) +-#endif + return 0; + + OStringBuffer aLine( 1024 ); +@@ -1902,7 +1988,7 @@ sal_Int32 PDFWriterImpl::emitFonts() + { + for( FontEmitList::iterator lit = it->second.m_aSubsets.begin(); lit != it->second.m_aSubsets.end(); ++lit ) + { +- long pGlyphIDs[ 256 ]; ++ sal_Int32 pGlyphIDs[ 256 ]; + sal_Int32 pWidths[ 256 ]; + sal_uInt8 pEncoding[ 256 ]; + sal_Unicode pUnicodes[ 256 ]; +@@ -1954,7 +2040,7 @@ sal_Int32 PDFWriterImpl::emitFonts() + "<< /Length " ); + aLine.append( (sal_Int32)nStreamLengthObject ); + aLine.append( " 0 R\r\n" +-#ifdef ENABLE_COMPRESSION ++#ifndef DEBUG_DISABLE_PDFCOMPRESSION + " /Filter /FlateDecode\r\n" + #endif + " /Length1 " ); +@@ -2226,14 +2312,13 @@ bool PDFWriterImpl::emitCatalog() + // first create a page tree node id + sal_Int32 nTreeNode = createObject(); + +- // emit global resource dictionary (page emit needs it) +- m_nResourceDict = emitResources(); +- + // emit all pages + for( std::list<PDFPage>::iterator it = m_aPages.begin(); it != m_aPages.end(); ++it ) + if( ! it->emit( nTreeNode ) ) + return false; + ++ sal_Int32 nResourceDict = emitResources(); ++ + // adjust tree node file offset + if( ! updateObject( nTreeNode ) ) + return false; +@@ -2244,7 +2329,7 @@ bool PDFWriterImpl::emitCatalog() + aLine.append( " 0 obj\r\n" ); + aLine.append( "<< /Type /Pages\r\n" ); + aLine.append( " /Resources " ); +- aLine.append( m_nResourceDict ); ++ aLine.append( nResourceDict ); + aLine.append( " 0 R\r\n" ); + switch( m_eInheritedOrientation ) + { +@@ -2468,7 +2553,7 @@ bool PDFWriterImpl::emit() + + void PDFWriterImpl::registerGlyphs( + int nGlyphs, +- long* pGlyphs, ++ sal_Int32* pGlyphs, + sal_Unicode* pUnicodes, + sal_uInt8* pMappedGlyphs, + sal_Int32* pMappedFontObjects, +@@ -2535,10 +2620,8 @@ void PDFWriterImpl::registerGlyphs( + + const std::map< sal_Unicode, sal_Int32 >* pEncoding = NULL; + const std::map< sal_Unicode, rtl::OString >* pNonEncoded = NULL; +-#ifndef REMOTE_APPSERVER + getReferenceDevice()->ImplGetGraphics(); + pEncoding = m_pReferenceDevice->mpGraphics->GetFontEncodingVector( pCurrentFont, &pNonEncoded ); +-#endif + + std::map< sal_Unicode, sal_Int32 >::const_iterator enc_it; + std::map< sal_Unicode, rtl::OString >::const_iterator nonenc_it; +@@ -2608,131 +2691,112 @@ void PDFWriterImpl::registerGlyphs( + } + } + +-void PDFWriterImpl::drawLayout( SalLayout& rLayout, const String& rText, bool bTextLines ) ++void PDFWriterImpl::drawRelief( SalLayout& rLayout, const String& rText, bool bTextLines ) + { +- FontRelief eRelief = m_aCurrentPDFState.m_aFont.GetRelief(); +- // relief takes precedence over shadow (see outdev3.cxx) +- if( eRelief != RELIEF_NONE ) +- { +- push( PUSH_ALL ); ++ push( PUSH_ALL ); + +- Color aTextColor = m_aCurrentPDFState.m_aFont.GetColor(); +- Color aTextLineColor = m_aCurrentPDFState.m_aTextLineColor; +- Color aReliefColor( COL_LIGHTGRAY ); +- if( aTextColor == COL_BLACK ) +- aTextColor = Color( COL_WHITE ); +- if( aTextLineColor == COL_BLACK ) +- aTextLineColor = Color( COL_WHITE ); +- if( aTextColor == COL_WHITE ) +- aReliefColor = Color( COL_BLACK ); +- +- Font aSetFont = m_aCurrentPDFState.m_aFont; +- aSetFont.SetRelief( RELIEF_NONE ); +- aSetFont.SetShadow( FALSE ); +- +- aSetFont.SetColor( aReliefColor ); +- setTextLineColor( aTextLineColor ); +- setFont( aSetFont ); +- long nOff = 1 + getReferenceDevice()->mnDPIX/300; +- if( eRelief == RELIEF_ENGRAVED ) +- nOff = -nOff; ++ FontRelief eRelief = m_aCurrentPDFState.m_aFont.GetRelief(); + +- rLayout.DrawOffset() += Point( nOff, nOff ); +- updateGraphicsState(); +- drawLayout( rLayout, rText, bTextLines ); ++ Color aTextColor = m_aCurrentPDFState.m_aFont.GetColor(); ++ Color aTextLineColor = m_aCurrentPDFState.m_aTextLineColor; ++ Color aReliefColor( COL_LIGHTGRAY ); ++ if( aTextColor == COL_BLACK ) ++ aTextColor = Color( COL_WHITE ); ++ if( aTextLineColor == COL_BLACK ) ++ aTextLineColor = Color( COL_WHITE ); ++ if( aTextColor == COL_WHITE ) ++ aReliefColor = Color( COL_BLACK ); ++ ++ Font aSetFont = m_aCurrentPDFState.m_aFont; ++ aSetFont.SetRelief( RELIEF_NONE ); ++ aSetFont.SetShadow( FALSE ); ++ ++ aSetFont.SetColor( aReliefColor ); ++ setTextLineColor( aTextLineColor ); ++ setFont( aSetFont ); ++ long nOff = 1 + getReferenceDevice()->mnDPIX/300; ++ if( eRelief == RELIEF_ENGRAVED ) ++ nOff = -nOff; ++ ++ rLayout.DrawOffset() += Point( nOff, nOff ); ++ updateGraphicsState(); ++ drawLayout( rLayout, rText, bTextLines ); ++ ++ rLayout.DrawOffset() -= Point( nOff, nOff ); ++ setTextLineColor( aTextLineColor ); ++ aSetFont.SetColor( aTextColor ); ++ setFont( aSetFont ); ++ updateGraphicsState(); ++ drawLayout( rLayout, rText, bTextLines ); ++ ++ // clean up the mess ++ pop(); ++} + +- rLayout.DrawOffset() -= Point( nOff, nOff ); +- setTextLineColor( aTextLineColor ); +- aSetFont.SetColor( aTextColor ); +- setFont( aSetFont ); +- updateGraphicsState(); +- drawLayout( rLayout, rText, bTextLines ); ++void PDFWriterImpl::drawShadow( SalLayout& rLayout, const String& rText, bool bTextLines ) ++{ ++ Font aSaveFont = m_aCurrentPDFState.m_aFont; ++ Color aSaveTextLineColor = m_aCurrentPDFState.m_aTextLineColor; ++ ++ Font& rFont = m_aCurrentPDFState.m_aFont; ++ if( rFont.GetColor() == Color( COL_BLACK ) || rFont.GetColor().GetLuminance() < 8 ) ++ rFont.SetColor( Color( COL_LIGHTGRAY ) ); ++ else ++ rFont.SetColor( Color( COL_BLACK ) ); ++ rFont.SetShadow( FALSE ); ++ rFont.SetOutline( FALSE ); ++ setFont( rFont ); ++ setTextLineColor( rFont.GetColor() ); ++ updateGraphicsState(); ++ ++ long nOff = 1 + ((m_pReferenceDevice->mpFontEntry->mnLineHeight-24)/24); ++ if( rFont.IsOutline() ) ++ nOff++; ++ rLayout.DrawBase() += Point( nOff, nOff ); ++ drawLayout( rLayout, rText, bTextLines ); ++ rLayout.DrawBase() -= Point( nOff, nOff ); ++ ++ setFont( aSaveFont ); ++ setTextLineColor( aSaveTextLineColor ); ++ updateGraphicsState(); ++} + +- // clean up the mess +- pop(); ++void PDFWriterImpl::drawLayout( SalLayout& rLayout, const String& rText, bool bTextLines ) ++{ ++ // relief takes precedence over shadow (see outdev3.cxx) ++ if( m_aCurrentPDFState.m_aFont.GetRelief() != RELIEF_NONE ) ++ { ++ drawRelief( rLayout, rText, bTextLines ); + return; + } + else if( m_aCurrentPDFState.m_aFont.IsShadow() ) +- { +- Font aSaveFont = m_aCurrentPDFState.m_aFont; +- Color aSaveTextLineColor = m_aCurrentPDFState.m_aTextLineColor; +- +- Font& rFont = m_aCurrentPDFState.m_aFont; +- if( rFont.GetColor() == Color( COL_BLACK ) || rFont.GetColor().GetLuminance() < 8 ) +- rFont.SetColor( Color( COL_LIGHTGRAY ) ); +- else +- rFont.SetColor( Color( COL_BLACK ) ); +- rFont.SetShadow( FALSE ); +- setFont( rFont ); +- setTextLineColor( rFont.GetColor() ); +- updateGraphicsState(); +- +- long nOff = 1 + ((m_pReferenceDevice->mpFontEntry->mnLineHeight-24)/24); +- if( rFont.IsOutline() ) +- nOff++; +- rLayout.DrawBase() += Point( nOff, nOff ); +- drawLayout( rLayout, rText, bTextLines ); +- rLayout.DrawBase() -= Point( nOff, nOff ); +- +- setFont( aSaveFont ); +- setTextLineColor( aSaveTextLineColor ); +- updateGraphicsState(); +- } ++ drawShadow( rLayout, rText, bTextLines ); + + OStringBuffer aLine( 512 ); + +- // setup text colors (if necessary) +- bool bPop = false; +- if( m_aCurrentPDFState.m_aFont.IsOutline() && +- m_aCurrentPDFState.m_aLineColor != m_aCurrentPDFState.m_aFont.GetColor() ) +- { +- bPop = true; +- aLine.append( "q " ); +- appendStrokingColor( m_aCurrentPDFState.m_aFont.GetColor(), aLine ); +- aLine.append( "\r\n" ); +- } +- else if( m_aCurrentPDFState.m_aFillColor != m_aCurrentPDFState.m_aFont.GetColor() ) +- { +- bPop = true; +- aLine.append( "q " ); +- appendNonStrokingColor( m_aCurrentPDFState.m_aFont.GetColor(), aLine ); +- aLine.append( "\r\n" ); +- } +- +- // begin text object +- aLine.append( "BT\r\n" ); +- // outline attribute ? +- if( m_aCurrentPDFState.m_aFont.IsOutline() ) +- { +- aLine.append( "1 Tr " ); +- double fW = (double)m_aCurrentPDFState.m_aFont.GetHeight() / 30.0; +- m_aPages.back().appendMappedLength( fW, aLine ); +- aLine.append ( " w\r\n" ); +- } +- + const int nMaxGlyphs = 256; + +- // note: the layout calculates in outdevs device pixel !! +- +- long pGlyphs[nMaxGlyphs]; ++ sal_Int32 pGlyphs[nMaxGlyphs]; + sal_uInt8 pMappedGlyphs[nMaxGlyphs]; + sal_Int32 pMappedFontObjects[nMaxGlyphs]; + sal_Unicode pUnicodes[nMaxGlyphs]; + int pCharPosAry[nMaxGlyphs]; +- long nAdvanceWidths[nMaxGlyphs]; ++ sal_Int32 nAdvanceWidths[nMaxGlyphs]; + ImplFontData* pFallbackFonts[nMaxGlyphs]; +- long *pAdvanceWidths = m_aCurrentPDFState.m_aFont.IsVertical() ? nAdvanceWidths : NULL; +- long nGlyphFlags[nMaxGlyphs]; ++ sal_Int32 *pAdvanceWidths = m_aCurrentPDFState.m_aFont.IsVertical() ? nAdvanceWidths : NULL; ++ sal_Int32 nGlyphFlags[nMaxGlyphs]; + int nGlyphs; + int nIndex = 0; + Point aPos, aLastPos(0, 0), aCumulativePos(0,0), aGlyphPos; + bool bFirst = true, bWasYChange = false; + int nMinCharPos = 0, nMaxCharPos = rText.Len()-1; + double fXScale = 1.0; ++ double fSkew = 0.0; + sal_Int32 nFontHeight = m_pReferenceDevice->mpFontEntry->maFontSelData.mnHeight; + TextAlign eAlign = m_aCurrentPDFState.m_aFont.GetAlign(); + + // transform font height back to current units ++ // note: the layout calculates in outdevs device pixel !! + nFontHeight = m_pReferenceDevice->ImplDevicePixelToLogicHeight( nFontHeight ); + if( m_aCurrentPDFState.m_aFont.GetWidth() ) + { +@@ -2748,16 +2812,99 @@ void PDFWriterImpl::drawLayout( SalLayou + // force state before GetFontMetric + m_pReferenceDevice->ImplNewFont(); + } ++ ++ // perform artificial italics if necessary ++ if( ( m_aCurrentPDFState.m_aFont.GetItalic() == ITALIC_NORMAL || ++ m_aCurrentPDFState.m_aFont.GetItalic() == ITALIC_OBLIQUE ) && ++ !( m_pReferenceDevice->mpFontEntry->maFontSelData.mpFontData->meItalic == ITALIC_NORMAL || ++ m_pReferenceDevice->mpFontEntry->maFontSelData.mpFontData->meItalic == ITALIC_OBLIQUE ) ++ ) ++ { ++ fSkew = M_PI/12.0; ++ } ++ + // if the mapmode is distorted we need to adjust for that also + if( m_aCurrentPDFState.m_aMapMode.GetScaleX() != m_aCurrentPDFState.m_aMapMode.GetScaleY() ) + { + fXScale *= (double)(m_aCurrentPDFState.m_aMapMode.GetScaleX() / m_aCurrentPDFState.m_aMapMode.GetScaleY()); + } + +- double fAngle = (double)m_aCurrentPDFState.m_aFont.GetOrientation() * M_PI / 1800.0; +- double fSin = sin( fAngle ); +- double fCos = cos( fAngle ); ++ int nAngle = m_aCurrentPDFState.m_aFont.GetOrientation(); ++ // normalize angles ++ while( nAngle < 0 ) ++ nAngle += 3600; ++ nAngle = nAngle % 3600; ++ double fAngle = (double)nAngle * M_PI / 1800.0; ++ ++ Matrix3 aRotScale; ++ aRotScale.scale( fXScale, 1.0 ); ++ if( fAngle != 0.0 ) ++ aRotScale.rotate( -fAngle ); + ++ bool bPop = false; ++ bool bABold = false; ++ // artificial bold necessary ? ++ int nBoldness = (int)m_aCurrentPDFState.m_aFont.GetWeight() - (int)m_pReferenceDevice->mpFontEntry->maFontSelData.mpFontData->meWeight; ++ if( nBoldness > 1 ) ++ { ++ if( ! bPop ) ++ aLine.append( "q " ); ++ bPop = true; ++ bABold = true; ++ } ++ // setup text colors (if necessary) ++ Color aStrokeColor( COL_TRANSPARENT ); ++ Color aNonStrokeColor( COL_TRANSPARENT ); ++ ++ if( m_aCurrentPDFState.m_aFont.IsOutline() ) ++ { ++ aStrokeColor = m_aCurrentPDFState.m_aFont.GetColor(); ++ aNonStrokeColor = Color( COL_WHITE ); ++ } ++ else ++ aNonStrokeColor = m_aCurrentPDFState.m_aFont.GetColor(); ++ if( bABold ) ++ aStrokeColor = m_aCurrentPDFState.m_aFont.GetColor(); ++ ++ if( aStrokeColor != Color( COL_TRANSPARENT ) && aStrokeColor != m_aCurrentPDFState.m_aLineColor ) ++ { ++ if( ! bPop ) ++ aLine.append( "q " ); ++ bPop = true; ++ appendStrokingColor( aStrokeColor, aLine ); ++ aLine.append( "\r\n" ); ++ } ++ if( aNonStrokeColor != Color( COL_TRANSPARENT ) && aNonStrokeColor != m_aCurrentPDFState.m_aFillColor ) ++ { ++ if( ! bPop ) ++ aLine.append( "q " ); ++ bPop = true; ++ appendNonStrokingColor( aNonStrokeColor, aLine ); ++ aLine.append( "\r\n" ); ++ } ++ ++ // begin text object ++ aLine.append( "BT\r\n" ); ++ // outline attribute ? ++ if( m_aCurrentPDFState.m_aFont.IsOutline() || bABold ) ++ { ++ // set correct text mode, set stroke width ++ aLine.append( "2 Tr " ); // fill, then stroke ++ ++ if( m_aCurrentPDFState.m_aFont.IsOutline() ) ++ { ++ // unclear what to do in case of outline and artificial bold ++ // for the time being outline wins ++ aLine.append( "0.25 w \r\n" ); ++ } ++ else ++ { ++ double fW = (double)m_aCurrentPDFState.m_aFont.GetHeight() / 30.0; ++ m_aPages.back().appendMappedLength( fW, aLine ); ++ aLine.append ( " w\r\n" ); ++ } ++ } ++ + sal_Int32 nLastMappedFont = -1; + while( (nGlyphs = rLayout.GetNextGlyphs( nMaxGlyphs, pGlyphs, aPos, nIndex, pAdvanceWidths, pCharPosAry )) ) + { +@@ -2774,8 +2921,7 @@ void PDFWriterImpl::drawLayout( SalLayou + + if( aDiff.X() || aDiff.Y() ) + { +- aDiff = Point( (int)(fXScale * fCos * (double)aDiff.X() + fSin * (double)aDiff.Y()), +- -(int)(fXScale * fSin * (double)aDiff.X() - fCos * (double)aDiff.Y()) ); ++ aDiff = aRotScale.transform( aDiff ); + aPos += aDiff; + } + +@@ -2816,6 +2962,8 @@ void PDFWriterImpl::drawLayout( SalLayou + double fDeltaAngle = 0.0; + double fYScale = 1.0; + double fTempXScale = fXScale; ++ double fSkewB = fSkew; ++ double fSkewA = 0.0; + + Point aDeltaPos; + if( ( nGlyphFlags[n] & GF_ROTMASK ) == GF_ROTL ) +@@ -2825,6 +2973,8 @@ void PDFWriterImpl::drawLayout( SalLayou + aDeltaPos.Y() = (int)((double)m_pReferenceDevice->GetFontMetric().GetDescent() * fXScale); + fYScale = fXScale; + fTempXScale = 1.0; ++ fSkewA = -fSkewB; ++ fSkewB = 0.0; + } + else if( ( nGlyphFlags[n] & GF_ROTMASK ) == GF_ROTR ) + { +@@ -2833,6 +2983,8 @@ void PDFWriterImpl::drawLayout( SalLayou + aDeltaPos.Y() = -m_pReferenceDevice->GetFontMetric().GetAscent(); + fYScale = fXScale; + fTempXScale = 1.0; ++ fSkewA = fSkewB; ++ fSkewB = 0.0; + } + aDeltaPos += (m_pReferenceDevice->PixelToLogic( Point( (int)((double)nXOffset/fXScale)/rLayout.GetUnitsPerPixel(), 0 ) ) - m_pReferenceDevice->PixelToLogic( Point() ) ); + nXOffset += pAdvanceWidths[n]; +@@ -2840,21 +2992,15 @@ void PDFWriterImpl::drawLayout( SalLayou + continue; + + +- aDeltaPos = Point( (int)(fXScale * fCos * (double)aDeltaPos.X() + fSin * (double)aDeltaPos.Y()), +- -(int)(fXScale * fSin * (double)aDeltaPos.X() - fCos * (double)aDeltaPos.Y()) ); ++ aDeltaPos = aRotScale.transform( aDeltaPos ); + +- double fDSin = sin( fAngle+fDeltaAngle ); +- double fDCos = cos( fAngle+fDeltaAngle ); +- +- appendDouble( fTempXScale*fDCos, aLine ); +- aLine.append( ' ' ); +- appendDouble( fDSin*fTempXScale, aLine ); +- aLine.append( ' ' ); +- appendDouble( -fDSin*fYScale, aLine ); +- aLine.append( ' ' ); +- appendDouble( fDCos*fYScale, aLine ); +- aLine.append( ' ' ); +- m_aPages.back().appendPoint( aPos+aDeltaPos, aLine ); ++ Matrix3 aMat; ++ if( fSkewB != 0.0 || fSkewA != 0.0 ) ++ aMat.skew( fSkewA, fSkewB ); ++ aMat.scale( fTempXScale, fYScale ); ++ aMat.rotate( fAngle+fDeltaAngle ); ++ aMat.translate( aPos.X()+aDeltaPos.X(), aPos.Y()+aDeltaPos.Y() ); ++ aMat.append( m_aPages.back(), aLine ); + aLine.append( " Tm" ); + if( nLastMappedFont != pMappedFontObjects[n] ) + { +@@ -2873,7 +3019,7 @@ void PDFWriterImpl::drawLayout( SalLayou + else // normal case + { + // optimize use of Td vs. Tm +- if( fXScale == 1.0 && fCos == 1.0 && fSin == 0.0 ) ++ if( fAngle == 0.0 && fXScale == 1.0 && ( !bFirst || fSkew == 0.0 ) ) + { + if( bFirst ) + { +@@ -2885,12 +3031,12 @@ void PDFWriterImpl::drawLayout( SalLayou + { + sal_Int32 nDiffL = 0; + Point aDiff = aPos - aLastPos; +- m_aPages.back().appendMappedLength( aDiff.X(), aLine, false, &nDiffL ); ++ m_aPages.back().appendMappedLength( (sal_Int32)aDiff.X(), aLine, false, &nDiffL ); + aCumulativePos.X() += nDiffL; + aLine.append( ' ' ); + if( bWasYChange ) + { +- m_aPages.back().appendMappedLength( aDiff.Y(), aLine, true, &nDiffL ); ++ m_aPages.back().appendMappedLength( (sal_Int32)aDiff.Y(), aLine, true, &nDiffL ); + aCumulativePos.Y() += nDiffL; + } + else +@@ -2912,17 +3058,16 @@ void PDFWriterImpl::drawLayout( SalLayou + } + else + { +- appendDouble( fXScale*fCos, aLine ); +- aLine.append( ' ' ); +- appendDouble( fSin*fXScale, aLine ); +- aLine.append( ' ' ); +- appendDouble( -fSin, aLine ); +- aLine.append( ' ' ); +- appendDouble( fCos, aLine ); +- aLine.append( ' ' ); +- m_aPages.back().appendPoint( aPos, aLine, false, &aCumulativePos ); ++ Matrix3 aMat; ++ if( fSkew != 0.0 ) ++ aMat.skew( 0.0, fSkew ); ++ aMat.scale( fXScale, 1.0 ); ++ aMat.rotate( fAngle ); ++ aMat.translate( aPos.X(), aPos.Y() ); ++ aMat.append( m_aPages.back(), aLine, &aCumulativePos ); + aLine.append( " Tm\r\n" ); + aLastPos = aPos; ++ bFirst = false; + } + int nLast = 0; + while( nLast < nGlyphs ) +@@ -2979,10 +3124,10 @@ void PDFWriterImpl::drawLayout( SalLayou + if( m_aCurrentPDFState.m_aFont.IsWordLineMode() ) + { + Point aPos, aStartPt; +- long nWidth = 0, nAdvance=0; ++ sal_Int32 nWidth = 0, nAdvance=0; + for( int nStart = 0;;) + { +- long nGlyphIndex; ++ sal_Int32 nGlyphIndex; + if( !rLayout.GetNextGlyphs( 1, &nGlyphIndex, aPos, nStart, &nAdvance ) ) + break; + +@@ -3081,7 +3226,7 @@ void PDFWriterImpl::drawLayout( SalLayou + for( int nStart = 0;;) + { + Point aPos; +- long nGlyphIndex, nAdvance; ++ sal_Int32 nGlyphIndex, nAdvance; + if( !rLayout.GetNextGlyphs( 1, &nGlyphIndex, aPos, nStart, &nAdvance ) ) + break; + +@@ -3089,8 +3234,7 @@ void PDFWriterImpl::drawLayout( SalLayou + { + Point aAdjOffset = aOffset; + aAdjOffset.X() += (nAdvance - nEmphWidth) / 2; +- aAdjOffset = Point( (int)(fXScale * fCos * (double)aAdjOffset.X() + fSin * (double)aAdjOffset.Y()), +- -(int)(fXScale * fSin * (double)aAdjOffset.X() - fCos * (double)aAdjOffset.Y()) ); ++ aAdjOffset = aRotScale.transform( aAdjOffset ); + + aAdjOffset -= Point( nEmphWidth2, nEmphHeight2 ); + +@@ -3113,7 +3257,7 @@ void PDFWriterImpl::drawEmphasisMark( lo + const Rectangle& rRect1, const Rectangle& rRect2 ) + { + // TODO: pass nWidth as width of this mark +- long nWidth = 0; ++ // long nWidth = 0; + + if ( rPolyPoly.Count() ) + { +@@ -3163,7 +3307,7 @@ void PDFWriterImpl::drawText( const Poin + } + } + +-void PDFWriterImpl::drawTextArray( const Point& rPos, const String& rText, const long* pDXArray, xub_StrLen nIndex, xub_StrLen nLen, bool bTextLines ) ++void PDFWriterImpl::drawTextArray( const Point& rPos, const String& rText, const sal_Int32* pDXArray, xub_StrLen nIndex, xub_StrLen nLen, bool bTextLines ) + { + MARK( "drawText with array" ); + +@@ -3219,7 +3363,6 @@ void PDFWriterImpl::drawText( const Rect + Point aPos = rRect.TopLeft(); + + long nTextHeight = m_pReferenceDevice->GetTextHeight(); +- TextAlign eAlign = m_aCurrentPDFState.m_aFont.GetAlign(); + xub_StrLen nMnemonicPos = STRING_NOTFOUND; + + String aStr = rOrigStr; +@@ -3346,7 +3489,7 @@ void PDFWriterImpl::drawLine( const Poin + + OStringBuffer aLine; + m_aPages.back().appendPoint( rStart, aLine ); +- aLine.append( " m " ); ++ aLine.append( "m " ); + m_aPages.back().appendPoint( rStop, aLine ); + aLine.append( " l S\r\n" ); + +@@ -3454,7 +3597,13 @@ void PDFWriterImpl::drawTextLine( const + setFont( aFont ); + updateGraphicsState(); + } ++ ++ // strikeout string is left aligned non-CTL text ++ ULONG nOrigTLM = m_pReferenceDevice->GetLayoutMode(); ++ m_pReferenceDevice->SetLayoutMode( TEXT_LAYOUT_BIDI_STRONG|TEXT_LAYOUT_COMPLEX_DISABLED ); + drawText( rPos, aStrikeout, 0, aStrikeout.Len(), false ); ++ m_pReferenceDevice->SetLayoutMode( nOrigTLM ); ++ + if( bShadow ) + { + Font aFont = m_aCurrentPDFState.m_aFont; +@@ -3471,7 +3620,14 @@ void PDFWriterImpl::drawTextLine( const + case UNDERLINE_WAVE: + case UNDERLINE_DOUBLEWAVE: + case UNDERLINE_BOLDWAVE: +- bNormalLines = false; ++ { ++ bNormalLines = FALSE; ++ } ++ break; ++ default: ++ { ++ ; // No gcc warning ++ } + } + } + +@@ -3488,17 +3644,10 @@ void PDFWriterImpl::drawTextLine( const + + // rotate and translate matrix + double fAngle = (double)m_aCurrentPDFState.m_aFont.GetOrientation() * M_PI / 1800.0; +- double fSin = sin( fAngle ); +- double fCos = cos( fAngle ); +- appendDouble( fCos, aLine ); +- aLine.append( ' ' ); +- appendDouble( fSin, aLine ); +- aLine.append( ' ' ); +- appendDouble( -fSin, aLine ); +- aLine.append( ' ' ); +- appendDouble( fCos, aLine ); +- aLine.append( ' ' ); +- m_aPages.back().appendPoint( aPos, aLine ); ++ Matrix3 aMat; ++ aMat.rotate( fAngle ); ++ aMat.translate( aPos.X(), aPos.Y() ); ++ aMat.append( m_aPages.back(), aLine ); + aLine.append( " cm\r\n" ); + + if ( aUnderlineColor.GetTransparency() != 0 ) +@@ -3536,7 +3685,7 @@ void PDFWriterImpl::drawTextLine( const + if ( eUnderline == UNDERLINE_BOLDWAVE ) + nLineWidth = 3*nLineWidth/2; + +- m_aPages.back().appendMappedLength( nLineWidth, aLine ); ++ m_aPages.back().appendMappedLength( (sal_Int32)nLineWidth, aLine ); + aLine.append( " w " ); + + if ( eUnderline == UNDERLINE_DOUBLEWAVE ) +@@ -3651,7 +3800,7 @@ void PDFWriterImpl::drawTextLine( const + + if ( nLineHeight ) + { +- m_aPages.back().appendMappedLength( nLineHeight, aLine, true ); ++ m_aPages.back().appendMappedLength( (sal_Int32)nLineHeight, aLine, true ); + aLine.append( " w " ); + appendStrokingColor( aUnderlineColor, aLine ); + aLine.append( "\r\n" ); +@@ -3660,7 +3809,7 @@ void PDFWriterImpl::drawTextLine( const + (eUnderline == UNDERLINE_BOLDDOTTED) ) + { + aLine.append( "[ " ); +- m_aPages.back().appendMappedLength( nLineHeight, aLine, false ); ++ m_aPages.back().appendMappedLength( (sal_Int32)nLineHeight, aLine, false ); + aLine.append( " ] 0 d\r\n" ); + } + else if ( (eUnderline == UNDERLINE_DASH) || +@@ -3670,12 +3819,8 @@ void PDFWriterImpl::drawTextLine( const + { + sal_Int32 nDashLength = 4*nLineHeight; + sal_Int32 nVoidLength = 2*nLineHeight; +- switch( eUnderline ) +- { +- case UNDERLINE_LONGDASH: +- case UNDERLINE_BOLDLONGDASH: +- nDashLength = 8*nLineHeight; +- } ++ if ( ( eUnderline == UNDERLINE_LONGDASH ) || ( eUnderline == UNDERLINE_BOLDLONGDASH ) ) ++ nDashLength = 8*nLineHeight; + + aLine.append( "[ " ); + m_aPages.back().appendMappedLength( nDashLength, aLine, false ); +@@ -3693,7 +3838,7 @@ void PDFWriterImpl::drawTextLine( const + aLine.append( ' ' ); + m_aPages.back().appendMappedLength( nVoidLength, aLine, false ); + aLine.append( ' ' ); +- m_aPages.back().appendMappedLength( nLineHeight, aLine, false ); ++ m_aPages.back().appendMappedLength( (sal_Int32)nLineHeight, aLine, false ); + aLine.append( ' ' ); + m_aPages.back().appendMappedLength( nVoidLength, aLine, false ); + aLine.append( " ] 0 d\r\n" ); +@@ -3709,31 +3854,31 @@ void PDFWriterImpl::drawTextLine( const + aLine.append( ' ' ); + m_aPages.back().appendMappedLength( nVoidLength, aLine, false ); + aLine.append( ' ' ); +- m_aPages.back().appendMappedLength( nLineHeight, aLine, false ); ++ m_aPages.back().appendMappedLength( (sal_Int32)nLineHeight, aLine, false ); + aLine.append( ' ' ); + m_aPages.back().appendMappedLength( nVoidLength, aLine, false ); + aLine.append( ' ' ); +- m_aPages.back().appendMappedLength( nLineHeight, aLine, false ); ++ m_aPages.back().appendMappedLength( (sal_Int32)nLineHeight, aLine, false ); + aLine.append( ' ' ); + m_aPages.back().appendMappedLength( nVoidLength, aLine, false ); + aLine.append( " ] 0 d\r\n" ); + } + + aLine.append( "0 " ); +- m_aPages.back().appendMappedLength( -nLinePos, aLine, true ); ++ m_aPages.back().appendMappedLength( (sal_Int32)(-nLinePos), aLine, true ); + aLine.append( " m " ); +- m_aPages.back().appendMappedLength( nWidth, aLine, false ); ++ m_aPages.back().appendMappedLength( (sal_Int32)nWidth, aLine, false ); + aLine.append( ' ' ); +- m_aPages.back().appendMappedLength( -nLinePos, aLine, true ); ++ m_aPages.back().appendMappedLength( (sal_Int32)(-nLinePos), aLine, true ); + aLine.append( " l S\r\n" ); + if ( eUnderline == UNDERLINE_DOUBLE ) + { + aLine.append( "0 " ); +- m_aPages.back().appendMappedLength( -nLinePos2-nLineHeight, aLine, true ); ++ m_aPages.back().appendMappedLength( (sal_Int32)(-nLinePos2-nLineHeight), aLine, true ); + aLine.append( " m " ); +- m_aPages.back().appendMappedLength( nWidth, aLine, false ); ++ m_aPages.back().appendMappedLength( (sal_Int32)nWidth, aLine, false ); + aLine.append( ' ' ); +- m_aPages.back().appendMappedLength( -nLinePos2-nLineHeight, aLine, true ); ++ m_aPages.back().appendMappedLength( (sal_Int32)(-nLinePos2-nLineHeight), aLine, true ); + aLine.append( " l S\r\n" ); + } + } +@@ -3769,27 +3914,27 @@ void PDFWriterImpl::drawTextLine( const + + if ( nLineHeight ) + { +- m_aPages.back().appendMappedLength( nLineHeight, aLine, true ); ++ m_aPages.back().appendMappedLength( (sal_Int32)nLineHeight, aLine, true ); + aLine.append( " w " ); + appendStrokingColor( aStrikeoutColor, aLine ); + aLine.append( "\r\n" ); + + aLine.append( "0 " ); +- m_aPages.back().appendMappedLength( -nLinePos, aLine, true ); ++ m_aPages.back().appendMappedLength( (sal_Int32)(-nLinePos), aLine, true ); + aLine.append( " m " ); +- m_aPages.back().appendMappedLength( nWidth, aLine, true ); ++ m_aPages.back().appendMappedLength( (sal_Int32)nWidth, aLine, true ); + aLine.append( ' ' ); +- m_aPages.back().appendMappedLength( -nLinePos, aLine, true ); ++ m_aPages.back().appendMappedLength( (sal_Int32)(-nLinePos), aLine, true ); + aLine.append( " l S\r\n" ); + + if ( eStrikeout == STRIKEOUT_DOUBLE ) + { + aLine.append( "0 " ); +- m_aPages.back().appendMappedLength( -nLinePos2-nLineHeight, aLine, true ); ++ m_aPages.back().appendMappedLength( (sal_Int32)(-nLinePos2-nLineHeight), aLine, true ); + aLine.append( " m " ); +- m_aPages.back().appendMappedLength( nWidth, aLine, true ); ++ m_aPages.back().appendMappedLength( (sal_Int32)nWidth, aLine, true ); + aLine.append( ' ' ); +- m_aPages.back().appendMappedLength( -nLinePos2-nLineHeight, aLine, true ); ++ m_aPages.back().appendMappedLength( (sal_Int32)(-nLinePos2-nLineHeight), aLine, true ); + aLine.append( " l S\r\n" ); + + } +@@ -4366,7 +4511,7 @@ bool PDFWriterImpl::writeGradientFunctio + " /Length " ); + aLine.append( nStreamLengthObject ); + aLine.append( " 0 R\r\n" +-#ifdef ENABLE_COMPRESSION ++#ifndef DEBUG_DISABLE_PDFCOMPRESSION + " /Filter /FlateDecode\r\n" + #endif + ">>\r\n" +@@ -4587,7 +4732,7 @@ bool PDFWriterImpl::writeBitmapObject( B + " /Length " ); + aLine.append( nStreamLengthObject ); + aLine.append( " 0 R\r\n" ); +-#ifdef ENABLE_COMPRESSION ++#ifndef DEBUG_DISABLE_PDFCOMPRESSION + aLine.append( " /Filter /FlateDecode\r\n" ); + #endif + if( ! bMask ) +@@ -4768,9 +4913,9 @@ void PDFWriterImpl::drawJPGBitmap( SvStr + delete pStream; + + aLine.append( "q " ); +- m_aPages.back().appendMappedLength( rTargetArea.GetWidth(), aLine, false ); ++ m_aPages.back().appendMappedLength( (sal_Int32)rTargetArea.GetWidth(), aLine, false ); + aLine.append( " 0 0 " ); +- m_aPages.back().appendMappedLength( rTargetArea.GetHeight(), aLine, true ); ++ m_aPages.back().appendMappedLength( (sal_Int32)rTargetArea.GetHeight(), aLine, true ); + aLine.append( ' ' ); + m_aPages.back().appendPoint( rTargetArea.BottomLeft(), aLine ); + aLine.append( " cm\r\n /Im" ); +@@ -4790,9 +4935,9 @@ void PDFWriterImpl::drawBitmap( const Po + appendNonStrokingColor( rFillColor, aLine ); + aLine.append( ' ' ); + } +- m_aPages.back().appendMappedLength( rDestSize.Width(), aLine, false ); ++ m_aPages.back().appendMappedLength( (sal_Int32)rDestSize.Width(), aLine, false ); + aLine.append( " 0 0 " ); +- m_aPages.back().appendMappedLength( rDestSize.Height(), aLine, true ); ++ m_aPages.back().appendMappedLength( (sal_Int32)rDestSize.Height(), aLine, true ); + aLine.append( ' ' ); + m_aPages.back().appendPoint( rDestPoint + Point( 0, rDestSize.Height()-1 ), aLine ); + aLine.append( " cm\r\n /Im" ); +@@ -4910,9 +5055,9 @@ void PDFWriterImpl::drawGradient( const + if( m_aGraphicsStack.front().m_aLineColor != Color( COL_TRANSPARENT ) ) + aLine.append( "q " ); + aLine.append( "0 0 " ); +- m_aPages.back().appendMappedLength( rRect.GetWidth(), aLine, false ); ++ m_aPages.back().appendMappedLength( (sal_Int32)rRect.GetWidth(), aLine, false ); + aLine.append( ' ' ); +- m_aPages.back().appendMappedLength( rRect.GetHeight(), aLine, true ); ++ m_aPages.back().appendMappedLength( (sal_Int32)rRect.GetHeight(), aLine, true ); + aLine.append( " re W n\r\n" ); + + aLine.append( "/P" ); +@@ -4921,9 +5066,9 @@ void PDFWriterImpl::drawGradient( const + if( m_aGraphicsStack.front().m_aLineColor != Color( COL_TRANSPARENT ) ) + { + aLine.append( "Q 0 0 " ); +- m_aPages.back().appendMappedLength( rRect.GetWidth(), aLine, false ); ++ m_aPages.back().appendMappedLength( (sal_Int32)rRect.GetWidth(), aLine, false ); + aLine.append( ' ' ); +- m_aPages.back().appendMappedLength( rRect.GetHeight(), aLine, true ); ++ m_aPages.back().appendMappedLength( (sal_Int32)rRect.GetHeight(), aLine, true ); + aLine.append( " re S " ); + } + aLine.append( "Q\r\n" ); +@@ -4977,17 +5122,16 @@ void PDFWriterImpl::drawHatch( const Pol + if( m_aGraphicsStack.front().m_aLineColor == Color( COL_TRANSPARENT ) && + m_aGraphicsStack.front().m_aFillColor == Color( COL_TRANSPARENT ) ) + return; +- +- if( rPolyPoly.Count() ) +- { +- PolyPolygon aPolyPoly( rPolyPoly ); +- +- aPolyPoly.Optimize( POLY_OPTIMIZE_NO_SAME ); +- push( PUSH_LINECOLOR ); +- setLineColor( rHatch.GetColor() ); +- getReferenceDevice()->ImplDrawHatch( aPolyPoly, rHatch, FALSE ); +- pop(); +- } ++ if( rPolyPoly.Count() ) ++ { ++ PolyPolygon aPolyPoly( rPolyPoly ); ++ ++ aPolyPoly.Optimize( POLY_OPTIMIZE_NO_SAME ); ++ push( PUSH_LINECOLOR ); ++ setLineColor( rHatch.GetColor() ); ++ getReferenceDevice()->ImplDrawHatch( aPolyPoly, rHatch, FALSE ); ++ pop(); ++ } + } + + void PDFWriterImpl::drawWallpaper( const Rectangle& rRect, const Wallpaper& rWall ) +@@ -5056,6 +5200,7 @@ void PDFWriterImpl::drawWallpaper( const + aBmpPos.X() += aRect.GetWidth()-aBmpSize.Width(); + aBmpPos.Y() += aRect.GetHeight()-aBmpSize.Height(); + break; ++ default: ; + } + } + else +Index: vcl/source/gdi/pdfwriter_impl.hxx +=================================================================== +RCS file: /cvs/gsl/vcl/source/gdi/pdfwriter_impl.hxx,v +retrieving revision 1.25.82.2 +retrieving revision 1.28 +diff -u -p -u -r1.25.82.2 -r1.28 +--- vcl/source/gdi/pdfwriter_impl.hxx 26 Jan 2004 17:22:37 -0000 1.25.82.2 ++++ vcl/source/gdi/pdfwriter_impl.hxx 17 Jun 2004 12:19:44 -0000 1.28 +@@ -339,7 +339,6 @@ private: + sal_Int32 m_nCurrentPage; + + sal_Int32 m_nCatalogObject; +- sal_Int32 m_nResourceDict; + + PDFWriter::PDFVersion m_eVersion; + PDFWriter::Compression m_eCompression; +@@ -406,11 +405,13 @@ private: + SvMemoryStream* m_pMemStream; + + /* creates fonts and subsets that will be emitted later */ +- void registerGlyphs( int nGlyphs, long* pGlyphs, sal_Unicode* pUnicodes, sal_uInt8* pMappedGlyphs, sal_Int32* pMappedFontObjects, ImplFontData* pFallbackFonts[] ); ++ void registerGlyphs( int nGlyphs, sal_Int32* pGlyphs, sal_Unicode* pUnicodes, sal_uInt8* pMappedGlyphs, sal_Int32* pMappedFontObjects, ImplFontData* pFallbackFonts[] ); + + /* emits a text object according to the passed layout */ + /* TODO: remove rText as soon as SalLayout will change so that rText is not necessary anymore */ + void drawLayout( SalLayout& rLayout, const String& rText, bool bTextLines ); ++ void drawRelief( SalLayout& rLayout, const String& rText, bool bTextLines ); ++ void drawShadow( SalLayout& rLayout, const String& rText, bool bTextLines ); + + /* writes differences between graphics stack and current real PDF + * state to the file +@@ -569,7 +570,7 @@ public: + + /* actual drawing functions */ + void drawText( const Point& rPos, const String& rText, xub_StrLen nIndex = 0, xub_StrLen nLen = STRING_LEN, bool bTextLines = true ); +- void drawTextArray( const Point& rPos, const String& rText, const long* pDXArray = NULL, xub_StrLen nIndex = 0, xub_StrLen nLen = STRING_LEN, bool bTextLines = true ); ++ void drawTextArray( const Point& rPos, const String& rText, const sal_Int32* pDXArray = NULL, xub_StrLen nIndex = 0, xub_StrLen nLen = STRING_LEN, bool bTextLines = true ); + void drawStretchText( const Point& rPos, ULONG nWidth, const String& rText, + xub_StrLen nIndex = 0, xub_StrLen nLen = STRING_LEN, + bool bTextLines = true ); +Index: vcl/source/gdi/pngread.cxx +=================================================================== +RCS file: vcl/source/gdi/pngread.cxx +diff -N vcl/source/gdi/pngread.cxx +--- /dev/null 1 Jan 1970 00:00:00 -0000 ++++ vcl/source/gdi/pngread.cxx 28 Jun 2004 16:23:30 -0000 1.6 +@@ -0,0 +1,1499 @@ ++/************************************************************************* ++ * ++ * ++ * ++ * ++ * ++ * ++ * ++ * The Contents of this file are made available subject to the terms of ++ * either of the following licenses ++ * ++ * - GNU Lesser General Public License Version 2.1 ++ * - Sun Industry Standards Source License Version 1.1 ++ * ++ * Sun Microsystems Inc., October, 2000 ++ * ++ * GNU Lesser General Public License Version 2.1 ++ * ============================================= ++ * Copyright 2000 by Sun Microsystems, Inc. ++ * 901 San Antonio Road, Palo Alto, CA 94303, USA ++ * ++ * This library is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU Lesser General Public ++ * License version 2.1, as published by the Free Software Foundation. ++ * ++ * This library is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * Lesser General Public License for more details. ++ * ++ * You should have received a copy of the GNU Lesser General Public ++ * License along with this library; if not, write to the Free Software ++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, ++ * MA 02111-1307 USA ++ * ++ * ++ * Sun Industry Standards Source License Version 1.1 ++ * ================================================= ++ * The contents of this file are subject to the Sun Industry Standards ++ * Source License Version 1.1 (the "License"); You may not use this file ++ * except in compliance with the License. You may obtain a copy of the ++ * License at http://www.openoffice.org/license.html. ++ * ++ * Software provided under this License is provided on an "AS IS" basis, ++ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, ++ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, ++ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. ++ * See the License for the specific provisions governing your rights and ++ * obligations concerning the Software. ++ * ++ * The Initial Developer of the Original Code is: Sun Microsystems, Inc. ++ * ++ * Copyright: 2000 by Sun Microsystems, Inc. ++ * ++ * All Rights Reserved. ++ * ++ * Contributor(s): _______________________________________ ++ * ++ * ++ ************************************************************************/ ++ ++#include "pngread.hxx" ++ ++#include <cmath> ++#include <rtl/crc.h> ++#include <rtl/memory.h> ++#include <rtl/alloc.h> ++#include <tools/zcodec.hxx> ++#include <tools/stream.hxx> ++#include "bmpacc.hxx" ++#include "svapp.hxx" ++#include "alpha.hxx" ++ ++#ifndef _OSL_ENDIAN_H_ ++#include <osl/endian.h> ++#endif ++ ++// ----------- ++// - Defines - ++// ----------- ++ ++#define PNGCHUNK_IHDR 0x49484452 ++#define PNGCHUNK_PLTE 0x504c5445 ++#define PNGCHUNK_IDAT 0x49444154 ++#define PNGCHUNK_IEND 0x49454e44 ++#define PNGCHUNK_bKGD 0x624b4744 ++#define PNGCHUNK_cHRM 0x6348524d ++#define PNGCHUNK_gAMA 0x67414d41 ++#define PNGCHUNK_hIST 0x68495354 ++#define PNGCHUNK_pHYs 0x70485973 ++#define PNGCHUNK_sBIT 0x73425420 ++#define PNGCHUNK_tIME 0x74494d45 ++#define PNGCHUNK_tEXt 0x74455874 ++#define PNGCHUNK_tRNS 0x74524e53 ++#define PNGCHUNK_zTXt 0x7a545874 ++#define PMGCHUNG_msOG 0x6d734f47 // Microsoft Office Animated GIF ++ ++#define PNG_TRANS_VAL 0x1 ++ ++#define VIEWING_GAMMA 2.5 ++#define DISPLAY_GAMMA 1.25 ++ ++namespace vcl ++{ ++// ----------- ++// - statics - ++// ----------- ++ ++static const BYTE aBlockHeight[ 8 ] = ++{ ++ 0, 8, 8, 4, 4, 2, 2, 1 ++}; ++ ++// ------------------------------------------------------------------------------ ++ ++static const BYTE aBlockWidth[ 8 ] = ++{ ++ 0, 8, 4, 4, 2, 2, 1, 1 ++}; ++ ++// ------------------------------------------------------------------------------ ++ ++static const BYTE mpDefaultColorTable[ 256 ] = ++{ 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, ++ 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, ++ 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, ++ 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, ++ 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, ++ 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f, ++ 0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, ++ 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, ++ 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, ++ 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f, ++ 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, ++ 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, ++ 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, ++ 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf, ++ 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, ++ 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff ++}; ++ ++/* ------------------------------------------------------------------------ ++ SJ: InitChunkSeq reads all PNG chunks. The rStm stream position will be at ++ the end of the file afterwards. ++*/ ++const sal_Bool InitChunkSeq( SvStream& rStm, std::vector< vcl::PNGReader::ChunkData >& rChunkSeq ) ++{ ++ sal_Bool bRet = sal_True; ++ sal_uInt16 nIStmOldMode = rStm.GetNumberFormatInt(); ++ rStm.SetNumberFormatInt( NUMBERFORMAT_INT_BIGENDIAN ); ++ ++ sal_uInt32 nDummy[ 2 ]; ++ rStm >> nDummy[0] >> nDummy[1]; ++ if( ! ( nDummy[0] == 0x89504e47 ) && ( nDummy[1] == 0x0d0a1a0a ) ) ++ bRet = sal_False; ++ else ++ { ++ sal_uInt32 nChunkLen, nCRC32, nCheck, nType = 0; ++ while( !rStm.IsEof() && ( rStm.GetError() == ERRCODE_NONE ) ) ++ { ++ rChunkSeq.resize( rChunkSeq.size() + 1 ); ++ vcl::PNGReader::ChunkData& rChunkData = rChunkSeq.back(); ++ rStm >> nChunkLen ++ >> nType; ++ ++ rChunkData.nType = nType; ++ #if defined(__LITTLEENDIAN) || defined(OSL_LITENDIAN) ++ nType = SWAPLONG( nType ); ++ #endif ++ nCRC32 = rtl_crc32( 0, &nType, 4 ); ++ if ( nChunkLen && !rStm.IsEof() ) ++ { ++ rChunkData.aData.resize( nChunkLen ); ++ sal_uInt8* pPtr = &rChunkData.aData[ 0 ]; ++ rStm.Read( pPtr, nChunkLen ); ++ nCRC32 = rtl_crc32( nCRC32, pPtr, nChunkLen ); ++ } ++ rStm >> nCheck; ++ if ( nCRC32 != nCheck ) ++ { ++ bRet = sal_False; ++ break; ++ } ++ if ( rChunkData.nType == PNGCHUNK_IEND ) ++ break; ++ } ++ if ( !rChunkSeq.size() || ( rChunkSeq[ 0 ].nType != PNGCHUNK_IHDR ) ) ++ bRet = sal_False; ++ } ++ rStm.SetNumberFormatInt( nIStmOldMode ); ++ return bRet; ++} ++ ++// ------------- ++// - PNGReaderImpl - ++// ------------- ++ ++class PNGReaderImpl ++{ ++ friend class vcl::PNGReader; ++ ++ std::vector< vcl::PNGReader::ChunkData > maChunkSeq; ++ std::vector< sal_uInt8 >::iterator maDataIter; ++ std::vector< sal_uInt8 >::iterator maDataEnd; ++ sal_Int32 mnChunkLen; ++ ++ Bitmap* mpBmp; ++ BitmapWriteAccess* mpAcc; ++ Bitmap* mpMaskBmp; ++ AlphaMask* mpAlphaMask; ++ BitmapWriteAccess* mpMaskAcc; ++ ZCodec* mpZCodec; ++ BYTE* mpInflateInBuf; // as big as the size of a scanline + alphachannel + 1 ++ BYTE* mpScanprior; // pointer to the latest scanline ++ BYTE* mpTransTab; // ++ BYTE* mpScan; // pointer in the current scanline ++ BYTE* mpColorTable; // ++ sal_uInt32 mnChunkType; // Chunk which is currently open ++ sal_uInt32 mnWidth; ++ sal_uInt32 mnHeight; ++ sal_uInt32 mnBBP; // number of bytes per pixel ++ sal_uInt32 mnScansize; // max size of scanline ++ sal_uInt32 mnPrefWidth; // preferred width in meter ++ sal_uInt32 mnPrefHeight; // preferred Height in meter ++ sal_uInt32 mnYpos; // latest y position; ++ USHORT mnIStmOldMode; ++ USHORT mnDepth; // pixel depth ++ BYTE mnTransRed; ++ BYTE mnTransGreen; ++ BYTE mnTransBlue; ++ BYTE mnBitDepth; // sample depth ++ BYTE mnColorType; ++ BYTE mnCompressionType; ++ BYTE mnFilterType; ++ BYTE mnInterlaceType; ++ BYTE mnPass; // if interlaced the latest pass ( 1..7 ) else 7 ++ BYTE cTransIndex1; ++ BYTE cNonTransIndex1; ++ BOOL mbStatus; ++ BOOL mbTransparent; // graphic includes an tRNS Chunk or an alpha Channel ++ BOOL mbAlphaChannel; ++ BOOL mbRGBTriple; ++ BOOL mbPalette; // FALSE if we need a Palette ++ BOOL mbGrayScale; ++ BOOL mbzCodecInUse; ++ BOOL mbIDAT; // TRUE if finished with the complete IDAT... ++ BOOL mbGamma; // TRUE if Gamma Correction available ++ BOOL mbpHYs; // TRUE if pysical size of pixel available ++ ++ void ImplSetPixel( sal_uInt32 y, sal_uInt32 x, const BitmapColor &, BOOL bTrans ); ++ void ImplSetPixel( sal_uInt32 y, sal_uInt32 x, BYTE nPalIndex, BOOL bTrans ); ++ void ImplSetAlphaPixel( sal_uInt32 y, sal_uInt32 x, const BitmapColor&, BYTE nAlpha ); ++ void ImplReadIDAT(); ++ void ImplResizeScanline(); ++ void ImplGetFilter( sal_uInt32 nXStart=0, sal_uInt32 nXAdd=1 ); ++ void ImplReadTransparent(); ++ void ImplGetGamma(); ++ void ImplGetBackground(); ++ BYTE ImplScaleColor(); ++ BOOL ImplReadHeader(); ++ BOOL ImplReadPalette(); ++ void ImplGetGrayPalette( sal_uInt32 ); ++ sal_uInt32 ImplReadsal_uInt32(); ++ ++public: ++ ++ PNGReaderImpl( SvStream& rStm ); ++ ~PNGReaderImpl(); ++ ++ BitmapEx Read(); ++}; ++ ++// ------------------------------------------------------------------------------ ++ ++PNGReaderImpl::PNGReaderImpl( SvStream& rPNG ) : ++ mpAcc ( NULL ), ++ mpMaskAcc ( NULL ), ++ mpInflateInBuf ( NULL ), ++ mpScanprior ( NULL ), ++ mpTransTab ( NULL ), ++ mpBmp ( NULL ), ++ mpMaskBmp ( NULL ), ++ mpAlphaMask ( NULL ), ++ mbGamma ( sal_False ), ++ mbzCodecInUse ( sal_False ), ++ mbpHYs ( sal_False ), ++ mpColorTable ( (sal_uInt8*) mpDefaultColorTable ), ++ mpZCodec ( new ZCodec( DEFAULT_IN_BUFSIZE, DEFAULT_OUT_BUFSIZE, MAX_MEM_USAGE ) ) ++{ ++ mbStatus = InitChunkSeq( rPNG, maChunkSeq ); ++} ++ ++// ------------------------------------------------------------------------ ++ ++PNGReaderImpl::~PNGReaderImpl() ++{ ++ if ( mbzCodecInUse ) ++ mpZCodec->EndCompression(); ++ ++ if( mpColorTable != mpDefaultColorTable ) ++ delete[] mpColorTable; ++ ++ rtl_freeMemory( mpScanprior ); ++ ++ delete mpBmp; ++ delete mpAlphaMask; ++ delete mpMaskBmp; ++ delete[] mpTransTab; ++ delete[] mpInflateInBuf; ++ delete mpZCodec; ++} ++ ++// ------------------------------------------------------------------------ ++ ++BitmapEx PNGReaderImpl::Read() ++{ ++ BitmapEx aRet; ++ ++ std::vector< vcl::PNGReader::ChunkData >::iterator aIter( maChunkSeq.begin() ); ++ std::vector< vcl::PNGReader::ChunkData >::iterator aEnd ( maChunkSeq.end() ); ++ ++ while( mbStatus && ( aIter != aEnd ) && ( aIter->nType != PNGCHUNK_IEND ) ) ++ { ++ maDataIter = aIter->aData.begin(); ++ maDataEnd = aIter->aData.end(); ++ mnChunkLen = aIter->aData.size(); ++ ++ switch ( aIter->nType ) ++ { ++ case PNGCHUNK_IHDR : ++ { ++ mbStatus = ImplReadHeader(); ++ } ++ break; ++ ++ case PNGCHUNK_gAMA : // the gamma chunk must precede ++ { ++ if ( mbIDAT == FALSE ) // the 'IDAT' and also the ++ ImplGetGamma(); // 'PLTE'(if available ) ++ } ++ break; ++ ++ case PNGCHUNK_PLTE : ++ { ++ if ( !mbPalette ) ++ mbStatus = ImplReadPalette(); ++ } ++ break; ++ ++ case PNGCHUNK_tRNS : ++ ImplReadTransparent(); ++ break; ++ ++ case PNGCHUNK_bKGD : // the background chunk must appear ++ { ++ if ( ( mbIDAT == FALSE ) && mbPalette ) // before the 'IDAT' and after the ++ ImplGetBackground(); // PLTE(if available ) chunk. ++ } ++ break; ++ ++ case PNGCHUNK_IDAT : ++ { ++ if ( !mbIDAT ) // the gfx is finished, but there may be left a zlibCRC of about 4Bytes ++ ImplReadIDAT(); ++ } ++ break; ++ ++ case PNGCHUNK_pHYs : ++ { ++ if ( !mbIDAT && mnChunkLen == 9 ) ++ { ++ mnPrefWidth = ImplReadsal_uInt32(); ++ mnPrefHeight= ImplReadsal_uInt32(); ++ ++ sal_uInt8 nUnitSpecifier = *maDataIter++; ++ ++ if ( nUnitSpecifier == 1 ) ++ mbpHYs = sal_True; ++ } ++ } ++ break; ++ } ++ aIter++; ++ } ++ if ( mpAcc ) ++ mpBmp->ReleaseAccess( mpAcc ), mpAcc = NULL; ++ ++ if ( mpMaskAcc ) ++ { ++ if ( mbAlphaChannel ) ++ mpAlphaMask->ReleaseAccess( mpMaskAcc ); ++ else ++ mpMaskBmp->ReleaseAccess( mpMaskAcc ); ++ ++ mpMaskAcc = NULL; ++ } ++ ++ if ( mbStatus ) ++ { ++ if ( mbAlphaChannel ) ++ aRet = BitmapEx( *mpBmp, *mpAlphaMask ); ++ else if ( mbTransparent ) ++ aRet = BitmapEx( *mpBmp, *mpMaskBmp ); ++ else ++ aRet = *mpBmp; ++ ++ if ( mbpHYs && mnPrefWidth && mnPrefHeight ) ++ { ++ sal_Int32 nPrefSizeX = (sal_Int32)( 100000.0 * ( (double)mnWidth / mnPrefWidth ) ); ++ sal_Int32 nPrefSizeY = (sal_Int32)( 100000.0 * ( (double)mnHeight / mnPrefHeight ) ); ++ ++ aRet.SetPrefMapMode( MAP_100TH_MM ); ++ aRet.SetPrefSize( Size( nPrefSizeX, nPrefSizeY ) ); ++ } ++ } ++ if( !mbStatus ) ++ aRet.Clear(); ++ ++ return aRet; ++} ++ ++// ------------------------------------------------------------------------ ++ ++BOOL PNGReaderImpl::ImplReadHeader() ++{ ++ mnWidth = ImplReadsal_uInt32(); ++ mnHeight = ImplReadsal_uInt32(); ++ ++ if ( ( mnWidth == 0 ) || ( mnHeight == 0 ) ) ++ return FALSE; ++ ++ mnBitDepth = *maDataIter++; ++ mnColorType = *maDataIter++; ++ ++ if ( mnCompressionType = *maDataIter++ ) ++ return FALSE; ++ ++ if ( mnFilterType = *maDataIter++ ) ++ return FALSE; ++ ++ switch ( mnInterlaceType = *maDataIter++ ) // filter type valid ? ++ { ++ case 0 : ++ mnPass = 7; ++ break; ++ case 1 : ++ mnPass = 0; ++ break; ++ default: ++ return FALSE; ++ } ++ mnYpos = 0; ++ mbPalette = TRUE; ++ mbIDAT = mbAlphaChannel = mbTransparent = FALSE; ++ mbGrayScale = mbRGBTriple = FALSE; ++ mnDepth = mnBitDepth; ++ mnScansize = ( ( mnWidth * mnBitDepth ) + 7 ) >> 3; ++ ++ // valid color types are 0,2,3,4 & 6 ++ switch ( mnColorType ) ++ { ++ case 0 : // each pixel is a grayscale ++ { ++ switch ( mnBitDepth ) ++ { ++ case 2 : ++ mnDepth = 8; // we have to expand the bitmap ++ case 16 : ++ mnDepth >>= 1; // we have to reduce the bitmap ++ case 1 : ++ case 4 : ++ case 8 : ++ mbGrayScale = TRUE; ++ break; ++ default : ++ return FALSE; ++ } ++ } ++ break; ++ ++ case 2 : // each pixel is an RGB triple ++ { ++ mbRGBTriple = TRUE; ++ mnScansize*=3; ++ switch ( mnBitDepth ) ++ { ++ case 16 : // we have to reduce the bitmap ++ case 8 : ++ mnDepth = 24; ++ break; ++ default : ++ return FALSE; ++ } ++ } ++ break; ++ ++ case 3 : // each pixel is a palette index ++ { ++ switch ( mnBitDepth ) ++ { ++ case 2 : ++ mnDepth = 4; // we have to expand the bitmap ++ case 1 : ++ case 4 : ++ case 8 : ++ mbPalette = FALSE; ++ break; ++ default : ++ return FALSE; ++ } ++ } ++ break; ++ ++ case 4 : // each pixel is a grayscale sample followed by an alpha sample ++ { ++ mnScansize <<= 1; ++ mbAlphaChannel = TRUE; ++ switch ( mnBitDepth ) ++ { ++ case 16 : ++ mnDepth >>= 1; // we have to reduce the bitmap ++ case 8 : ++ mbGrayScale = TRUE; ++ break; ++ default : ++ return FALSE; ++ } ++ } ++ break; ++ ++ case 6 : // each pixel is an RGB triple followed by an alpha sample ++ { ++ mbRGBTriple = TRUE; ++ mnScansize*=4; ++ mbAlphaChannel = TRUE; ++ switch (mnBitDepth ) ++ { ++ case 16 : // we have to reduce the bitmap ++ case 8 : ++ mnDepth = 24; ++ break; ++ default : ++ return FALSE; ++ } ++ } ++ break; ++ ++ default : ++ return FALSE; ++ } ++ mnBBP = mnScansize / mnWidth; ++ ++ if ( !mnBBP ) ++ mnBBP = 1; ++ ++ mnScansize++; // each scanline includes one filterbyte ++ mpScan = mpInflateInBuf = new BYTE[ mnScansize ]; ++ mpScanprior = (sal_uInt8*)rtl_allocateZeroMemory( mnScansize ); ++ ++ if ( mnInterlaceType ) ++ ImplResizeScanline(); ++ ++ mpBmp = new Bitmap( Size( mnWidth, mnHeight ), mnDepth); ++ mpAcc = mpBmp->AcquireWriteAccess(); ++ ++ if ( mbAlphaChannel ) ++ { ++ mpAlphaMask = new AlphaMask( Size( mnWidth, mnHeight ) ); ++ mpAlphaMask->Erase( 128 ); ++ mpMaskAcc = mpAlphaMask->AcquireWriteAccess(); ++ } ++ else ++ { ++ mpMaskBmp = new Bitmap( Size( mnWidth, mnHeight ), 1 ); ++ mpMaskBmp->Erase( Color( COL_WHITE ) ); ++ mpMaskAcc = mpMaskBmp->AcquireWriteAccess(); ++ } ++ ++ if ( ( mpAcc == NULL ) || ( mpMaskAcc == NULL ) ) ++ return FALSE; ++ ++ const Color aWhite( COL_WHITE ); ++ cTransIndex1 = (BYTE)mpMaskAcc->GetBestPaletteIndex( aWhite ); ++ cNonTransIndex1 = cTransIndex1 ? 0 : 1; ++ ++ if ( mbGrayScale ) ++ ImplGetGrayPalette( mnDepth ); ++ ++ return TRUE; ++} ++ ++// ------------------------------------------------------------------------ ++ ++void PNGReaderImpl::ImplGetGrayPalette( sal_uInt32 nDepth ) ++{ ++ sal_uInt32 nAdd, nStart = 0; ++ ++ mpAcc->SetPaletteEntryCount( 1 << nDepth ); ++ ++ switch ( nDepth ) ++ { ++ case 1 : nAdd = 255; break; ++ case 2 : nAdd = 85; break; ++ case 4 : nAdd = 17; break; ++ case 8 : nAdd = 1; break; ++ } ++ ++ for ( sal_uInt32 i = 0; nStart < 256; i++, nStart += nAdd ) ++ mpAcc->SetPaletteColor( (USHORT)i, BitmapColor( mpColorTable[ nStart ], ++ mpColorTable[ nStart ], mpColorTable[ nStart ] ) ); ++} ++ ++// ------------------------------------------------------------------------ ++ ++BOOL PNGReaderImpl::ImplReadPalette() ++{ ++ sal_uInt32 nCount = mnChunkLen / 3; ++ ++ if ( ( ( mnChunkLen % 3 ) == 0 ) && ( ( 0 < nCount ) && ( nCount <= 256 ) ) && mpAcc ) ++ { ++ BYTE nRed, nGreen, nBlue; ++ ++ mbPalette = TRUE; ++ mpAcc->SetPaletteEntryCount( (USHORT) nCount ); ++ ++ for ( USHORT i = 0; i < nCount; i++ ) ++ { ++ nRed = mpColorTable[ *maDataIter++ ]; ++ nGreen = mpColorTable[ *maDataIter++ ]; ++ nBlue = mpColorTable[ *maDataIter++ ]; ++ mpAcc->SetPaletteColor( i, Color( nRed, nGreen, nBlue ) ); ++ } ++ } ++ else ++ mbStatus = FALSE; ++ ++ return mbStatus; ++} ++ ++// ------------------------------------------------------------------------ ++ ++void PNGReaderImpl::ImplReadTransparent() ++{ ++ if ( mpTransTab == NULL ) ++ { ++ switch ( mnColorType ) ++ { ++ case 0 : ++ { ++ if ( mnChunkLen == 2 ) ++ { ++ mpTransTab = new sal_uInt8[ 256 ]; ++ rtl_fillMemory( mpTransTab, 256, 0xff ); ++ // color type 0 and 4 is always greyscale, ++ // so the return value can be used as index ++ sal_uInt8 nIndex = ImplScaleColor(); ++ mpTransTab[ nIndex ] = 0; ++ mbTransparent = sal_True; ++ } ++ } ++ break; ++ ++ case 2 : ++ { ++ if ( mnChunkLen == 6 ) ++ { ++ mnTransRed = ImplScaleColor(); ++ mnTransGreen = ImplScaleColor(); ++ mnTransBlue = ImplScaleColor(); ++ } ++ } ++ break; ++ ++ case 3 : ++ { ++ if ( mnChunkLen <= 256 ) ++ { ++ mpTransTab = new BYTE [ 256 ]; ++ rtl_fillMemory( mpTransTab, 256, 0xff ); ++ rtl_copyMemory( mpTransTab, maDataIter, mnChunkLen ); ++ maDataIter += mnChunkLen; ++ mbTransparent = TRUE; ++ } ++ } ++ break; ++ } ++ } ++} ++ ++// ------------------------------------------------------------------------ ++ ++void PNGReaderImpl::ImplGetGamma() ++{ ++ sal_uInt32 nGammaValue = ImplReadsal_uInt32(); ++ double fGamma = ( ( VIEWING_GAMMA / DISPLAY_GAMMA ) * ( (double)nGammaValue / 100000 ) ); ++ double fInvGamma = ( fGamma <= 0.0 || fGamma > 10.0 ) ? 1.0 : ( 1.0 / fGamma ); ++ ++ if ( fInvGamma != 1.0 ) ++ { ++ mbGamma = TRUE; ++ ++ if ( mpColorTable == mpDefaultColorTable ) ++ mpColorTable = new sal_uInt8[ 256 ]; ++ ++ for ( sal_Int32 i = 0; i < 256; i++ ) ++ mpColorTable[ i ] = (sal_uInt8)(pow((double)i/255.0, fInvGamma) * 255.0 + 0.5); ++ ++ if ( mbGrayScale ) ++ ImplGetGrayPalette( mnDepth ); ++ } ++} ++ ++// ------------------------------------------------------------------------ ++ ++void PNGReaderImpl::ImplGetBackground() ++{ ++ Point aPoint; ++ Rectangle aRectangle( aPoint, Size( mnWidth, mnHeight ) ); ++ ++ switch ( mnColorType ) ++ { ++ case 3 : ++ { ++ if ( mnChunkLen == 1 ) ++ { ++ UINT16 nCol = *maDataIter++; ++ if ( nCol < mpAcc->GetPaletteEntryCount() ) ++ { ++ mpAcc->SetFillColor( (const Color&)mpAcc->GetPaletteColor( (BYTE)nCol ) ); ++ mpAcc->FillRect( aRectangle ); ++ break; ++ } ++ } ++ } ++ break; ++ ++ case 0 : ++ case 4 : ++ { ++ if ( mnChunkLen == 2 ) ++ { ++ // the color type 0 and 4 is always greyscale, ++ // so the return value can be used as index ++ sal_uInt8 nIndex = ImplScaleColor(); ++ mpAcc->SetFillColor( (const Color&)mpAcc->GetPaletteColor( nIndex ) ); ++ mpAcc->FillRect( aRectangle ); ++ } ++ } ++ break; ++ ++ case 2 : ++ case 6 : ++ { ++ if ( mnChunkLen == 6 ) ++ { ++ sal_uInt8 nRed = ImplScaleColor(); ++ sal_uInt8 nGreen = ImplScaleColor(); ++ sal_uInt8 nBlue = ImplScaleColor(); ++ mpAcc->SetFillColor( Color( nRed, nGreen, nBlue ) ); ++ mpAcc->FillRect( aRectangle ); ++ } ++ } ++ break; ++ } ++} ++ ++// ------------------------------------------------------------------------ ++ ++// for color type 0 and 4 (greyscale) the return value is always index to the color ++// 2 and 6 (RGB) the return value is always the 8 bit color component ++sal_uInt8 PNGReaderImpl::ImplScaleColor() ++{ ++ sal_uInt32 nMask = ( ( 1 << mnBitDepth ) - 1 ); ++ sal_uInt16 nCol = ( *maDataIter++ << 8 ); ++ ++ nCol += *maDataIter++ & (sal_uInt16)nMask; ++ ++ if ( mnBitDepth > 8 ) // convert 16bit graphics to 8 ++ nCol >>= 8; ++ ++ return (sal_uInt8) nCol; ++} ++ ++// ------------------------------------------------------------------------ ++// ImplReadIDAT reads as much bitmap data as possible ++ ++void PNGReaderImpl::ImplReadIDAT() ++{ ++ sal_uInt32 nToRead, nRead; ++ if ( mnChunkLen ) // Chunk empty ? ++ { ++ if ( mbzCodecInUse == FALSE ) ++ { ++ mbzCodecInUse = TRUE; ++ mpZCodec->BeginCompression( ZCODEC_PNG_DEFAULT ); ++ } ++ mpZCodec->SetBreak( mnChunkLen ); ++ SvMemoryStream aIStrm( maDataIter, mnChunkLen, STREAM_READ ); ++ ++ while ( ( mpZCodec->GetBreak() ) ) ++ { ++ // get bytes needed to fill the current scanline ++ nToRead = mnScansize - ( mpScan - mpInflateInBuf ); ++ ++ if ( ( nRead = mpZCodec->ReadAsynchron( aIStrm, mpScan, nToRead ) ) < 0 ) ++ { ++ mbStatus = FALSE; ++ break; ++ } ++ if ( nRead < nToRead ) ++ { ++ mpScan += nRead; // ZStream is Broken ++ break; ++ } ++ else ++ { ++ mpScan = mpInflateInBuf; // this scanline is Finished ++ ++ if ( mnInterlaceType == 0 ) ++ { ++ ImplGetFilter ( 0, 1 ); ++ mnYpos++; ++ } ++ else ++ { ++ // interlace mode ++ switch ( mnPass ) ++ { ++ case 1 : // pass 1 ++ { ++ ImplGetFilter ( 0, 8 ); ++ mnYpos += 8; ++ } ++ break; ++ ++ case 2 : // pass 2 ++ { ++ ImplGetFilter ( 4, 8 ); ++ mnYpos += 8; ++ } ++ break; ++ ++ case 3 : // pass 3 ++ { ++ if ( mnYpos >= 4 ) ++ { ++ ImplGetFilter ( 0, 4 ); ++ } ++ mnYpos += 8; ++ } ++ break; ++ ++ case 4 : // pass 4 ++ { ++ ImplGetFilter ( 2, 4 ); ++ mnYpos += 4; ++ } ++ break; ++ ++ case 5 : // pass 5 ++ { ++ if ( mnYpos >= 2 ) ++ { ++ ImplGetFilter ( 0, 2 ); ++ } ++ mnYpos += 4; ++ } ++ break; ++ ++ case 6 : // pass 6 ++ { ++ ImplGetFilter ( 1, 2 ); ++ mnYpos += 2; ++ } ++ break; ++ ++ case 7 : // pass 7 ++ { ++ if ( mnYpos >= 1 ) ++ { ++ ImplGetFilter ( 0, 1 ); ++ } ++ mnYpos += 2; ++ } ++ break; ++ } ++ } ++ } ++ ++ if ( mnYpos >= mnHeight ) ++ { ++ if ( mnPass == 7 ) ++ break; ++ else ++ { ++ ImplResizeScanline(); ++ } ++ } ++ } ++ } ++ ++ if ( ( mnPass >= 7 ) && ( mnYpos >= mnHeight ) ) ++ { ++ mpZCodec->EndCompression(); ++ mbzCodecInUse = FALSE; ++ mbIDAT = TRUE; ++ } ++} ++ ++// --------------------------------------------------------------------------------------------------- ++ ++void PNGReaderImpl::ImplResizeScanline( void ) ++{ ++ long nScansize; ++ ++ while ( mnPass < 7 ) ++ { ++ sal_uInt32 nX = 0; ++ ++ mnYpos = 0; ++ mnPass++; ++ ++ switch ( mnPass ) ++ { ++ case 1 : ++ nScansize = ( mnWidth + 7 ) >> 3; ++ break; ++ ++ case 2 : ++ nX += 4; ++ nScansize = ( mnWidth + 3 ) >> 3; ++ break; ++ ++ case 3 : ++ mnYpos += 4; ++ nScansize = ( mnWidth + 3 ) >> 2; ++ break; ++ ++ case 4 : ++ nX += 2; ++ nScansize = ( mnWidth + 1) >> 2; ++ break; ++ ++ case 5 : ++ mnYpos += 2; ++ nScansize = ( mnWidth + 1 ) >> 1; ++ break; ++ ++ case 6 : ++ nX++; ++ nScansize = mnWidth >> 1; ++ break; ++ ++ case 7 : ++ mnYpos++; ++ nScansize = mnWidth; ++ break; ++ } ++ ++ if ( ( mnYpos >= mnHeight ) || ( nX >= mnWidth ) ) // is pass to be skipped ? ++ continue; ++ ++ // in Interlace mode the size of scanline is not constant ++ // so first we calculate the number of entrys ++ mnScansize = nScansize * mnBitDepth; ++ ++ if ( mbRGBTriple ) ++ mnScansize *= 3; ++ ++ // convert bitsize to byte ++ mnScansize = ( mnScansize + 7 ) >> 3; ++ ++ if ( mbAlphaChannel ) ++ mnScansize += ( ( nScansize * mnBitDepth ) >> 3 ); ++ ++ rtl_zeroMemory( mpScanprior, ++mnScansize ); ++ break; ++ } ++} ++ ++// --------------------------------------------------------------------------------------------------- ++// ImplGetFilter writes the complete Scanline (nY) - in interlace mode the parameter nXStart and nXAdd ++// appends to the currently used pass ++// the complete size of scanline will be returned - in interlace mode zero is possible! ++ ++void PNGReaderImpl::ImplGetFilter ( sal_uInt32 nXStart, sal_uInt32 nXAdd ) ++{ ++ BYTE* pTmp = mpInflateInBuf; ++ BYTE* p1; ++ BYTE* p2; ++ BYTE* p3; ++ BYTE* p4; ++ BYTE nFilterType, nCol; ++ sal_uInt32 nXIndex, nX, nY = mnYpos, n1, n2, na, nb, nc; ++ sal_Int32 np, npa, npb, npc; ++ ++ sal_uInt32 nBBP = mnBBP; ++ ++ if ( nXStart < (sal_uInt32)mnWidth ) ++ { ++ nFilterType = *pTmp++; // the filter type may change each scanline ++ ++ switch ( nFilterType ) ++ { ++ case 1 : ++ { ++ p1 = pTmp + nBBP; ++ p2 = pTmp; ++ ++ while ( p1 < pTmp + mnScansize - 1 ) ++ ( *p1++ ) += ( *p2++ ); ++ } ++ break; ++ ++ case 2 : ++ { ++ p1 = pTmp; ++ p2 = mpScanprior+1; ++ ++ while ( p1 < pTmp + mnScansize - 1 ) ++ ( *p1++ ) += ( *p2++ ); ++ } ++ break; ++ ++ case 3 : ++ { ++ p1 = pTmp; ++ p2 = mpScanprior + 1; ++ p3 = pTmp-nBBP; ++ ++ while ( p1 < pTmp + mnScansize - 1 ) ++ { ++ n1 = (BYTE)( *p2++ ); ++ n2 = ( p3 >= pTmp ) ? (BYTE)*p3 : 0; ++ p3++; ++ ( *p1++ ) += (BYTE)( ( n1 + n2 ) >> 1 ); ++ } ++ } ++ break; ++ ++ case 4 : ++ { ++ p1 = pTmp; ++ p2 = p1 - nBBP; ++ p3 = mpScanprior + 1; ++ p4 = p3 - nBBP; ++ ++ while ( p1 < pTmp + mnScansize - 1 ) ++ { ++ nb = *p3++; ++ if ( p2 >= pTmp ) ++ { ++ na = *p2; ++ nc = *p4; ++ } ++ else ++ na = nc = 0; ++ ++ np = na + nb; ++ np -= nc; ++ npa = np - na; ++ npb = np - nb; ++ npc = np - nc; ++ ++ if ( npa < 0 ) ++ npa =-npa; ++ if ( npb < 0 ) ++ npb =-npb; ++ if ( npc < 0 ) ++ npc =-npc; ++ ++ if ( ( npa <= npb ) && ( npa <= npc ) ) ++ *p1++ += (BYTE)na; ++ else if ( npb <= npc ) ++ *p1++ += (BYTE)nb; ++ else ++ *p1++ += (BYTE)nc; ++ ++ p2++; ++ p4++; ++ } ++ } ++ break; ++ // undefined FilterType -> we will let them pass and display the data unfiltered ++ } ++ if ( mpAcc->HasPalette() ) // alphachannel is not allowed by pictures including palette entries ++ { ++ switch ( mpAcc->GetBitCount() ) ++ { ++ case 1 : ++ { ++ if ( mbTransparent ) ++ { ++ for ( nX = nXStart, nXIndex = 0; nX < (sal_uInt32)mnWidth; nX += nXAdd, nXIndex++ ) ++ { ++ sal_uInt32 nShift = ( nXIndex & 7 ) ^ 7; ++ ++ if ( nShift == 0 ) ++ nCol = ( *pTmp++ ) & 1; ++ else ++ nCol = ( *pTmp >> nShift ) & 1; ++ ++ ImplSetPixel( nY, nX, nCol, mpTransTab[ nCol ] < PNG_TRANS_VAL ); ++ } ++ } ++ else ++ { ++ for ( nX = nXStart, nXIndex = 0; nX < (sal_uInt32)mnWidth; nX += nXAdd, nXIndex++ ) ++ { ++ sal_uInt32 nShift = ( nXIndex & 7 ) ^ 7; ++ ++ if ( nShift == 0 ) ++ ImplSetPixel( nY, nX, ( *pTmp++ & 1 ), FALSE ); ++ else ++ ImplSetPixel( nY, nX, ( *pTmp >> nShift ) & 1, FALSE ); ++ } ++ } ++ } ++ break; ++ ++ case 4 : ++ { ++ if ( mbTransparent ) ++ { ++ if ( mnBitDepth == 4 ) // maybe the source is a two bitmap graphic ++ { ++ for ( nX = nXStart, nXIndex = 0; nX < mnWidth; nX += nXAdd, nXIndex++ ) ++ { ++ if( nXIndex & 1 ) ++ { ++ ImplSetPixel( nY, nX, *pTmp & 0x0f, mpTransTab[ *pTmp & 0x0f ] < PNG_TRANS_VAL ); ++ pTmp++; ++ } ++ else ++ { ++ ImplSetPixel( nY, nX, ( *pTmp >> 4 ) & 0x0f, mpTransTab[ *pTmp >> 4 ] < PNG_TRANS_VAL ); ++ } ++ } ++ } ++ else ++ { ++ for ( nX = nXStart, nXIndex = 0; nX < mnWidth; nX += nXAdd, nXIndex++ ) ++ { ++ switch( nXIndex & 3 ) ++ { ++ case 0 : ++ nCol = *pTmp >> 6; ++ break; ++ ++ case 1 : ++ nCol = ( *pTmp >> 4 ) & 0x03 ; ++ break; ++ ++ case 2 : ++ nCol = ( *pTmp >> 2 ) & 0x03; ++ break; ++ ++ case 3 : ++ nCol = ( *pTmp++ ) & 0x03; ++ break; ++ } ++ ++ ImplSetPixel( nY, nX, nCol, mpTransTab[ nCol ] < PNG_TRANS_VAL ); ++ } ++ } ++ } ++ else ++ { ++ if ( mnBitDepth == 4 ) // maybe the source is a two bitmap graphic ++ { ++ for ( nX = nXStart, nXIndex = 0; nX < mnWidth; nX += nXAdd, nXIndex++ ) ++ { ++ if( nXIndex & 1 ) ++ ImplSetPixel( nY, nX, *pTmp++ & 0x0f, FALSE ); ++ else ++ ImplSetPixel( nY, nX, ( *pTmp >> 4 ) & 0x0f, FALSE ); ++ } ++ } ++ else ++ { ++ for ( nX = nXStart, nXIndex = 0; nX < mnWidth; nX += nXAdd, nXIndex++ ) ++ { ++ switch( nXIndex & 3 ) ++ { ++ case 0 : ++ ImplSetPixel( nY, nX, *pTmp >> 6, FALSE ); ++ break; ++ ++ case 1 : ++ ImplSetPixel( nY, nX, ( *pTmp >> 4 ) & 0x03, FALSE ); ++ break; ++ ++ case 2 : ++ ImplSetPixel( nY, nX, ( *pTmp >> 2 ) & 0x03, FALSE ); ++ break; ++ ++ case 3 : ++ ImplSetPixel( nY, nX, *pTmp++ & 0x03, FALSE ); ++ break; ++ } ++ } ++ } ++ } ++ } ++ break; ++ ++ case 8 : ++ { ++ if ( mbAlphaChannel ) ++ { ++ if ( mnBitDepth == 8 ) // maybe the source is a 16 bit grayscale ++ { ++ for ( nX = nXStart; nX < mnWidth; nX += nXAdd, pTmp += 2 ) ++ ImplSetAlphaPixel( nY, nX, pTmp[ 0 ], pTmp[ 1 ] ); ++ } ++ else ++ { ++ for ( nX = nXStart; nX < mnWidth; nX += nXAdd, pTmp += 4 ) ++ ImplSetAlphaPixel( nY, nX, pTmp[ 0 ], pTmp[ 2 ] ); ++ } ++ } ++ else ++ { ++ if ( mbTransparent ) ++ { ++ if ( mnBitDepth == 8 ) // maybe the source is a 16 bit grayscale ++ { ++ for ( nX = nXStart; nX < mnWidth; nX += nXAdd, pTmp++ ) ++ ImplSetPixel( nY, nX, *pTmp, mpTransTab[ *pTmp ] < PNG_TRANS_VAL ); ++ } ++ else ++ { ++ for ( nX = nXStart; nX < mnWidth; nX += nXAdd, pTmp += 2 ) ++ ImplSetPixel( nY, nX, *pTmp, mpTransTab[ *pTmp ] < PNG_TRANS_VAL ); ++ } ++ } ++ else ++ { ++ if ( mnBitDepth == 8 ) // maybe the source is a 16 bit grayscale ++ { ++ for ( nX = nXStart; nX < mnWidth; nX += nXAdd ) ++ ImplSetPixel( nY, nX, *pTmp++, FALSE ); ++ } ++ else ++ { ++ for ( nX = nXStart; nX < mnWidth; nX += nXAdd, pTmp += 2 ) ++ ImplSetPixel( nY, nX, *pTmp, FALSE ); ++ } ++ } ++ } ++ } ++ break; ++ ++ default : ++ mbStatus = FALSE; ++ break; ++ } ++ } ++ else ++ { ++ if ( mbAlphaChannel || mbTransparent ) ++ { ++ if ( mbAlphaChannel ) ++ { ++ if ( mnBitDepth == 8 ) // maybe the source is a 16 bit each sample ++ { ++ for ( nX = nXStart; nX < mnWidth; nX += nXAdd, pTmp += 4 ) ++ ImplSetAlphaPixel( nY, nX, BitmapColor( mpColorTable[ pTmp[ 0 ] ], ++ mpColorTable[ pTmp[ 1 ] ], ++ mpColorTable[ pTmp[ 2 ] ] ), pTmp[ 3 ] ); ++ } ++ else ++ { ++ for ( nX = nXStart; nX < mnWidth; nX += nXAdd, pTmp += 8 ) ++ ImplSetAlphaPixel( nY, nX, BitmapColor( mpColorTable[ pTmp[ 0 ] ], ++ mpColorTable[ pTmp[ 2 ] ], ++ mpColorTable[ pTmp[ 4 ] ] ), pTmp[6] ); ++ } ++ } ++ else // Transparency chunk ++ { ++ sal_Bool bTransparent; ++ sal_uInt8 nRed, nGreen, nBlue; ++ ++ if ( mnBitDepth == 8 ) // maybe the source is a 16 bit each sample ++ { ++ for ( nX = nXStart; nX < mnWidth; nX += nXAdd, pTmp += 3 ) ++ { ++ nRed = pTmp[ 0 ]; ++ nGreen = pTmp[ 1 ]; ++ nBlue = pTmp[ 2 ]; ++ bTransparent = ( ( nRed == mnTransRed ) ++ && ( nGreen == mnTransGreen ) ++ && ( nBlue == mnTransBlue ) ); ++ ++ ImplSetPixel( nY, nX, BitmapColor( mpColorTable[ nRed ], ++ mpColorTable[ nGreen ], ++ mpColorTable[ nBlue ] ), bTransparent ); ++ } ++ } ++ else ++ { ++ for ( nX = nXStart; nX < mnWidth; nX += nXAdd, pTmp += 6 ) ++ { ++ nRed = pTmp[ 0 ]; ++ nGreen = pTmp[ 2 ]; ++ nBlue = pTmp[ 4 ]; ++ bTransparent = ( ( nRed == mnTransRed ) ++ && ( nGreen == mnTransGreen ) ++ && ( nBlue == mnTransBlue ) ); ++ ++ ImplSetPixel( nY, nX, BitmapColor( mpColorTable[ nRed ], ++ mpColorTable[ nGreen ], ++ mpColorTable[ nBlue ] ), bTransparent ); ++ } ++ } ++ } ++ } ++ else ++ { ++ if ( mnBitDepth == 8 ) // maybe the source is a 16 bit each sample ++ { ++ for ( nX = nXStart; nX < mnWidth; nX += nXAdd, pTmp += 3 ) ++ ImplSetPixel( nY, nX, BitmapColor( mpColorTable[ pTmp[ 0 ] ], ++ mpColorTable[ pTmp[ 1 ] ], ++ mpColorTable[ pTmp[ 2 ] ] ), FALSE ); ++ } ++ else ++ { ++ for ( nX = nXStart; nX < mnWidth; nX += nXAdd, pTmp += 6 ) ++ ImplSetPixel( nY, nX, BitmapColor( mpColorTable[ pTmp[ 0 ] ], ++ mpColorTable[ pTmp[ 2 ] ], ++ mpColorTable[ pTmp[ 4 ] ] ), FALSE ); ++ } ++ } ++ } ++ } ++ ++ rtl_copyMemory( mpScanprior, mpInflateInBuf, mnScansize ); ++} ++ ++// ------------------------------------------------------------------------ ++ ++void PNGReaderImpl::ImplSetPixel( sal_uInt32 nY, sal_uInt32 nX, const BitmapColor& rBitmapColor, BOOL bTrans ) ++{ ++ if ( mnPass == 7 ) ++ { ++ mpAcc->SetPixel( nY, nX, rBitmapColor ); ++ ++ if ( bTrans ) ++ mpMaskAcc->SetPixel( nY, nX, cTransIndex1 ); ++ else ++ mpMaskAcc->SetPixel( nY, nX, cNonTransIndex1 ); ++ } ++ else ++ { ++ sal_uInt32 nTX; ++ ++ for ( int nBHeight = 0; nBHeight < aBlockHeight[ mnPass ]; nBHeight++ ) ++ { ++ nTX = nX; ++ ++ for ( int nBWidth = 0; nBWidth < aBlockWidth[ mnPass ]; nBWidth++ ) ++ { ++ mpAcc->SetPixel( nY, nTX, rBitmapColor ); ++ ++ if ( bTrans ) ++ mpMaskAcc->SetPixel( nY, nTX, cTransIndex1 ); ++ else ++ mpMaskAcc->SetPixel( nY, nTX, cNonTransIndex1 ); ++ ++ if ( ++nTX == mnWidth ) ++ break; ++ } ++ ++ if ( ++nY == mnHeight ) ++ break; ++ } ++ } ++} ++ ++// ------------------------------------------------------------------------ ++ ++void PNGReaderImpl::ImplSetPixel( sal_uInt32 nY, sal_uInt32 nX, BYTE nPalIndex, BOOL bTrans ) ++{ ++ if ( mnPass == 7 ) ++ { ++ mpAcc->SetPixel( nY, nX, (BYTE)nPalIndex ); ++ ++ if ( bTrans ) ++ mpMaskAcc->SetPixel( nY, nX, cTransIndex1 ); ++ else ++ mpMaskAcc->SetPixel( nY, nX, cNonTransIndex1 ); ++ } ++ else ++ { ++ sal_uInt32 nTX; ++ ++ for ( int nBHeight = 0; nBHeight < aBlockHeight[ mnPass ]; nBHeight++ ) ++ { ++ nTX = nX; ++ ++ for ( int nBWidth = 0; nBWidth < aBlockWidth[ mnPass ]; nBWidth++ ) ++ { ++ mpAcc->SetPixel( nY, nTX, (BYTE)nPalIndex ); ++ ++ if ( bTrans ) ++ mpMaskAcc->SetPixel( nY, nTX, cTransIndex1 ); ++ else ++ mpMaskAcc->SetPixel( nY, nTX, cNonTransIndex1 ); ++ ++ if ( ++nTX == mnWidth ) ++ break; ++ } ++ if ( ++nY == mnHeight ) ++ break; ++ } ++ } ++} ++ ++// ------------------------------------------------------------------------ ++ ++void PNGReaderImpl::ImplSetAlphaPixel( sal_uInt32 nY, sal_uInt32 nX, const BitmapColor& rBitmapColor, BYTE nAlpha ) ++{ ++ if ( mnPass == 7 ) ++ { ++ mpAcc->SetPixel( nY, nX, rBitmapColor ); ++ mpMaskAcc->SetPixel( nY, nX, 255 - nAlpha ); ++ } ++ else ++ { ++ sal_uInt32 nTX; ++ ++ for ( int nBHeight = 0; nBHeight < aBlockHeight[ mnPass ]; nBHeight++ ) ++ { ++ nTX = nX; ++ ++ for ( int nBWidth = 0; nBWidth < aBlockWidth[ mnPass ]; nBWidth++ ) ++ { ++ mpAcc->SetPixel( nY, nTX, rBitmapColor ); ++ mpMaskAcc->SetPixel( nY, nTX, 255 - nAlpha ); ++ if ( ++nTX == mnWidth ) ++ break; ++ } ++ ++ if ( ++nY == mnHeight ) ++ break; ++ } ++ } ++} ++ ++// ------------------------------------------------------------------------ ++ ++sal_uInt32 PNGReaderImpl::ImplReadsal_uInt32() ++{ ++ sal_uInt32 nRet; ++ nRet = *maDataIter++; ++ nRet <<= 8; ++ nRet |= *maDataIter++; ++ nRet <<= 8; ++ nRet |= *maDataIter++; ++ nRet <<= 8; ++ nRet |= *maDataIter++; ++ return nRet; ++} ++ ++// ------------------------------------------------------------------------ ++ ++// ------------- ++// - PNGReader - ++// ------------- ++ ++PNGReader::PNGReader( SvStream& rIStm ) : ++ mpImpl( new ::vcl::PNGReaderImpl( rIStm ) ) ++{ ++} ++ ++// ------------------------------------------------------------------------ ++ ++PNGReader::~PNGReader() ++{ ++ delete mpImpl; ++} ++ ++// ------------------------------------------------------------------------ ++ ++BitmapEx PNGReader::Read() ++{ ++ return mpImpl->Read(); ++} ++ ++// ------------------------------------------------------------------------ ++ ++const std::vector< vcl::PNGReader::ChunkData >& PNGReader::GetChunks() const ++{ ++ return mpImpl->maChunkSeq; ++} ++ ++} // namespace vcl +Index: vcl/source/gdi/pngwrite.cxx +=================================================================== +RCS file: vcl/source/gdi/pngwrite.cxx +diff -N vcl/source/gdi/pngwrite.cxx +--- /dev/null 1 Jan 1970 00:00:00 -0000 ++++ vcl/source/gdi/pngwrite.cxx 28 Jun 2004 16:23:56 -0000 1.4 +@@ -0,0 +1,750 @@ ++/************************************************************************* ++ * ++ * ++ * ++ * ++ * ++ * ++ * ++ * The Contents of this file are made available subject to the terms of ++ * either of the following licenses ++ * ++ * - GNU Lesser General Public License Version 2.1 ++ * - Sun Industry Standards Source License Version 1.1 ++ * ++ * Sun Microsystems Inc., October, 2000 ++ * ++ * GNU Lesser General Public License Version 2.1 ++ * ============================================= ++ * Copyright 2000 by Sun Microsystems, Inc. ++ * 901 San Antonio Road, Palo Alto, CA 94303, USA ++ * ++ * This library is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU Lesser General Public ++ * License version 2.1, as published by the Free Software Foundation. ++ * ++ * This library is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * Lesser General Public License for more details. ++ * ++ * You should have received a copy of the GNU Lesser General Public ++ * License along with this library; if not, write to the Free Software ++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, ++ * MA 02111-1307 USA ++ * ++ * ++ * Sun Industry Standards Source License Version 1.1 ++ * ================================================= ++ * The contents of this file are subject to the Sun Industry Standards ++ * Source License Version 1.1 (the "License"); You may not use this file ++ * except in compliance with the License. You may obtain a copy of the ++ * License at http://www.openoffice.org/license.html. ++ * ++ * Software provided under this License is provided on an "AS IS" basis, ++ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, ++ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, ++ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. ++ * See the License for the specific provisions governing your rights and ++ * obligations concerning the Software. ++ * ++ * The Initial Developer of the Original Code is: Sun Microsystems, Inc. ++ * ++ * Copyright: 2000 by Sun Microsystems, Inc. ++ * ++ * All Rights Reserved. ++ * ++ * Contributor(s): _______________________________________ ++ * ++ * ++ ************************************************************************/ ++ ++#include "pngwrite.hxx" ++ ++#include <cmath> ++#include <rtl/crc.h> ++#include <rtl/memory.h> ++#include <rtl/alloc.h> ++#include <tools/zcodec.hxx> ++#include <tools/stream.hxx> ++#include "bmpacc.hxx" ++#include "svapp.hxx" ++#include "alpha.hxx" ++ ++#ifndef _OSL_ENDIAN_H_ ++#include <osl/endian.h> ++#endif ++ ++// ----------- ++// - Defines - ++// ----------- ++ ++#define PNG_DEF_COMPRESSION 6 ++ ++#define PNGCHUNK_IHDR 0x49484452 ++#define PNGCHUNK_PLTE 0x504c5445 ++#define PNGCHUNK_IDAT 0x49444154 ++#define PNGCHUNK_IEND 0x49454e44 ++#define PNGCHUNK_bKGD 0x624b4744 ++#define PNGCHUNK_cHRM 0x6348524d ++#define PNGCHUNK_gAMA 0x67414d41 ++#define PNGCHUNK_hIST 0x68495354 ++#define PNGCHUNK_pHYs 0x70485973 ++#define PNGCHUNK_sBIT 0x73425420 ++#define PNGCHUNK_tIME 0x74494d45 ++#define PNGCHUNK_tEXt 0x74455874 ++#define PNGCHUNK_tRNS 0x74524e53 ++#define PNGCHUNK_zTXt 0x7a545874 ++ ++namespace vcl ++{ ++// ----------------- ++// - PNGWriterImplImpl - ++// ----------------- ++ ++class PNGWriterImpl ++{ ++public: ++ ++ PNGWriterImpl( const BitmapEx& BmpEx, ++ const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >* pFilterData = NULL ); ++ ~PNGWriterImpl(); ++ ++ sal_Bool Write( SvStream& rOStm ); ++ ++ std::vector< vcl::PNGWriter::ChunkData >& GetChunks(); ++ ++private: ++ ++ std::vector< vcl::PNGWriter::ChunkData > maChunkSeq; ++ ++ sal_Int32 mnCompLevel; ++ sal_Int32 mnInterlaced; ++ BOOL mbStatus; ++ ++ BitmapReadAccess* mpAccess; ++ BitmapReadAccess* mpMaskAccess; ++ ZCodec* mpZCodec; ++ ++ BYTE* mpDeflateInBuf; // as big as the size of a scanline + alphachannel + 1 ++ BYTE* mpPreviousScan; // as big as mpDeflateInBuf ++ BYTE* mpCurrentScan; ++ ULONG mnDeflateInSize; ++ ++ ULONG mnWidth, mnHeight; ++ BYTE mnBitsPerPixel; ++ BYTE mnFilterType; // 0 oder 4; ++ ULONG mnBBP; // bytes per pixel ( needed for filtering ) ++ BOOL mbTrueAlpha; ++ ULONG mnCRC; ++ long mnChunkDatSize; ++ ULONG mnLastPercent; ++ ++ void ImplWritepHYs( const BitmapEx& rBitmapEx ); ++ void ImplWriteIDAT(); ++ ULONG ImplGetFilter( ULONG nY, ULONG nXStart=0, ULONG nXAdd=1 ); ++ void ImplClearFirstScanline(); ++ void ImplWriteTransparent(); ++ BOOL ImplWriteHeader(); ++ void ImplWritePalette(); ++ void ImplOpenChunk( ULONG nChunkType ); ++ void ImplWriteChunk( BYTE nNumb ); ++ void ImplWriteChunk( ULONG nNumb ); ++ void ImplWriteChunk( unsigned char* pSource, sal_uInt32 nDatSize ); ++ void ImplCloseChunk( void ); ++}; ++ ++// ------------------------------------------------------------------------ ++ ++PNGWriterImpl::PNGWriterImpl( const BitmapEx& rBmpEx, ++ const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >* pFilterData ) : ++ mnLastPercent ( 0UL ), ++ mnInterlaced ( 0 ), ++ mnCompLevel ( PNG_DEF_COMPRESSION ), ++ mpAccess ( NULL ), ++ mpMaskAccess ( NULL ), ++ mbStatus ( TRUE ), ++ mpZCodec ( new ZCodec( DEFAULT_IN_BUFSIZE, DEFAULT_OUT_BUFSIZE, MAX_MEM_USAGE ) ) ++{ ++ if ( !rBmpEx.IsEmpty() ) ++ { ++ Bitmap aBmp( rBmpEx.GetBitmap() ); ++ ++ if ( pFilterData ) ++ { ++ sal_Int32 i = 0; ++ for ( i = 0; i < pFilterData->getLength(); i++ ) ++ { ++ if ( (*pFilterData)[ i ].Name.equalsAscii( "Compression" ) ) ++ (*pFilterData)[ i ].Value >>= mnCompLevel; ++ else if ( (*pFilterData)[ i ].Name.equalsAscii( "Interlaced" ) ) ++ (*pFilterData)[ i ].Value >>= mnInterlaced; ++ } ++ } ++ mnBitsPerPixel = (BYTE)aBmp.GetBitCount(); ++ ++ if( rBmpEx.IsTransparent() ) ++ { ++ if ( mnBitsPerPixel <= 8 && rBmpEx.IsAlpha() ) ++ { ++ aBmp.Convert( BMP_CONVERSION_24BIT ); ++ mnBitsPerPixel = 24; ++ } ++ ++ if ( mnBitsPerPixel <= 8 ) // transparent palette ++ { ++ aBmp.Convert( BMP_CONVERSION_8BIT_TRANS ); ++ aBmp.Replace( rBmpEx.GetMask(), BMP_COL_TRANS ); ++ mnBitsPerPixel = 8; ++ mpAccess = aBmp.AcquireReadAccess(); ++ if ( mpAccess ) ++ { ++ if ( ImplWriteHeader() ) ++ { ++ ImplWritepHYs( rBmpEx ); ++ ImplWritePalette(); ++ ImplWriteTransparent(); ++ ImplWriteIDAT(); ++ } ++ aBmp.ReleaseAccess( mpAccess ); ++ } ++ else ++ mbStatus = FALSE; ++ } ++ else ++ { ++ mpAccess = aBmp.AcquireReadAccess(); // TRUE RGB with alphachannel ++ if( mpAccess ) ++ { ++ if ( ( mbTrueAlpha = rBmpEx.IsAlpha() ) ) ++ { ++ AlphaMask aMask( rBmpEx.GetAlpha() ); ++ mpMaskAccess = aMask.AcquireReadAccess(); ++ if ( mpMaskAccess ) ++ { ++ if ( ImplWriteHeader() ) ++ { ++ ImplWritepHYs( rBmpEx ); ++ ImplWriteIDAT(); ++ } ++ aMask.ReleaseAccess( mpMaskAccess ); ++ } ++ else ++ mbStatus = FALSE; ++ } ++ else ++ { ++ Bitmap aMask( rBmpEx.GetMask() ); ++ mpMaskAccess = aMask.AcquireReadAccess(); ++ if( mpMaskAccess ) ++ { ++ if ( ImplWriteHeader() ) ++ { ++ ImplWritepHYs( rBmpEx ); ++ ImplWriteIDAT(); ++ } ++ aMask.ReleaseAccess( mpMaskAccess ); ++ } ++ else ++ mbStatus = FALSE; ++ } ++ aBmp.ReleaseAccess( mpAccess ); ++ } ++ else ++ mbStatus = FALSE; ++ } ++ } ++ else ++ { ++ mpAccess = aBmp.AcquireReadAccess(); // palette + RGB without alphachannel ++ if( mpAccess ) ++ { ++ if ( ImplWriteHeader() ) ++ { ++ ImplWritepHYs( rBmpEx ); ++ if( mpAccess->HasPalette() ) ++ ImplWritePalette(); ++ ++ ImplWriteIDAT(); ++ } ++ aBmp.ReleaseAccess( mpAccess ); ++ } ++ else ++ mbStatus = FALSE; ++ } ++ if ( mbStatus ) ++ { ++ ImplOpenChunk( PNGCHUNK_IEND ); // create an IEND chunk ++ ImplCloseChunk(); ++ } ++ } ++} ++ ++// ------------------------------------------------------------------------ ++ ++PNGWriterImpl::~PNGWriterImpl() ++{ ++ delete mpZCodec; ++} ++ ++// ------------------------------------------------------------------------ ++ ++sal_Bool PNGWriterImpl::Write( SvStream& rOStm ) ++{ ++ /* png signature is always an array of 8 bytes */ ++ sal_uInt16 nOldMode = rOStm.GetNumberFormatInt(); ++ rOStm.SetNumberFormatInt( NUMBERFORMAT_INT_BIGENDIAN ); ++ rOStm << (ULONG)0x89504e47; ++ rOStm << (ULONG)0x0d0a1a0a; ++ ++ std::vector< vcl::PNGWriter::ChunkData >::iterator aBeg( maChunkSeq.begin() ); ++ std::vector< vcl::PNGWriter::ChunkData >::iterator aEnd( maChunkSeq.end() ); ++ while( aBeg != aEnd ) ++ { ++ sal_uInt32 nType = aBeg->nType; ++ #if defined(__LITTLEENDIAN) || defined(OSL_LITENDIAN) ++ nType = SWAPLONG( nType ); ++ #endif ++ sal_uInt32 nCRC = rtl_crc32( 0, &nType, 4 ); ++ sal_uInt32 nDataSize = aBeg->aData.size(); ++ if ( nDataSize ) ++ nCRC = rtl_crc32( nCRC, &aBeg->aData[ 0 ], nDataSize ); ++ rOStm << nDataSize ++ << aBeg->nType; ++ rOStm.Write( &aBeg->aData[ 0 ], nDataSize ); ++ rOStm << nCRC; ++ aBeg++; ++ } ++ rOStm.SetNumberFormatInt( nOldMode ); ++ return mbStatus; ++} ++ ++// ------------------------------------------------------------------------ ++ ++std::vector< vcl::PNGWriter::ChunkData >& PNGWriterImpl::GetChunks() ++{ ++ return maChunkSeq; ++} ++ ++// ------------------------------------------------------------------------ ++ ++BOOL PNGWriterImpl::ImplWriteHeader() ++{ ++ ImplOpenChunk(PNGCHUNK_IHDR); ++ ImplWriteChunk( ( mnWidth = (ULONG)mpAccess->Width() ) ); ++ ImplWriteChunk( ( mnHeight = (ULONG)mpAccess->Height() ) ); ++ ++ if ( mnWidth && mnHeight && mnBitsPerPixel && mbStatus ) ++ { ++ BYTE nBitDepth = mnBitsPerPixel; ++ if ( mnBitsPerPixel <= 8 ) ++ mnFilterType = 0; ++ else ++ mnFilterType = 4; ++ ++ BYTE nColorType = 2; // colortype: ++ // bit 0 -> palette is used ++ if ( mpAccess->HasPalette() ) // bit 1 -> color is used ++ nColorType |= 1; // bit 2 -> alpha channel is used ++ else ++ nBitDepth /= 3; ++ ++ if ( mpMaskAccess ) ++ nColorType |= 4; ++ ++ ImplWriteChunk( nBitDepth ); ++ ImplWriteChunk( nColorType ); // colortype ++ ImplWriteChunk((BYTE) 0 ); // compression type ++ ImplWriteChunk((BYTE) 0 ); // filter type - is not supported in this version ++ ImplWriteChunk((BYTE) mnInterlaced ); // interlace type ++ ImplCloseChunk(); ++ } ++ else ++ mbStatus = FALSE; ++ return mbStatus; ++} ++ ++// ------------------------------------------------------------------------ ++ ++void PNGWriterImpl::ImplWritePalette() ++{ ++ const ULONG nCount = mpAccess->GetPaletteEntryCount(); ++ BYTE* pTempBuf = new BYTE[ nCount*3 ]; ++ BYTE* pTmp = pTempBuf; ++ ++ ImplOpenChunk( PNGCHUNK_PLTE ); ++ ++ for ( USHORT i = 0; i < nCount; i++ ) ++ { ++ const BitmapColor& rColor = mpAccess->GetPaletteColor( i ); ++ *pTmp++ = rColor.GetRed(); ++ *pTmp++ = rColor.GetGreen(); ++ *pTmp++ = rColor.GetBlue(); ++ } ++ ImplWriteChunk( pTempBuf, nCount*3 ); ++ ImplCloseChunk(); ++ delete[] pTempBuf; ++} ++ ++// ------------------------------------------------------------------------ ++ ++void PNGWriterImpl::ImplWriteTransparent () ++{ ++ const ULONG nTransIndex = mpAccess->GetBestMatchingColor( BMP_COL_TRANS ); ++ ++ ImplOpenChunk( PNGCHUNK_tRNS ); ++ ++ for ( ULONG n = 0UL; n <= nTransIndex; n++ ) ++ ImplWriteChunk( ( nTransIndex == n ) ? (BYTE) 0x0 : (BYTE) 0xff ); ++ ++ ImplCloseChunk(); ++} ++ ++// ------------------------------------------------------------------------ ++ ++void PNGWriterImpl::ImplWritepHYs( const BitmapEx& rBmpEx ) ++{ ++ if ( rBmpEx.GetPrefMapMode() == MAP_100TH_MM ) ++ { ++ Size aPrefSize( rBmpEx.GetPrefSize() ); ++ if ( aPrefSize.Width() && aPrefSize.Height() ) ++ { ++ ImplOpenChunk( PNGCHUNK_pHYs ); ++ sal_uInt8 nMapUnit = 1; ++ sal_uInt32 nPrefSizeX = (sal_uInt32)( (double)100000.0 / ( (double)aPrefSize.Width() / mnWidth ) + 0.5 ); ++ sal_uInt32 nPrefSizeY = (sal_uInt32)( (double)100000.0 / ( (double)aPrefSize.Height() / mnHeight ) + 0.5 ); ++ ImplWriteChunk( nPrefSizeX ); ++ ImplWriteChunk( nPrefSizeY ); ++ ImplWriteChunk( nMapUnit ); ++ ImplCloseChunk(); ++ } ++ } ++} ++ ++// ------------------------------------------------------------------------ ++ ++void PNGWriterImpl::ImplWriteIDAT () ++{ ++ ImplOpenChunk( PNGCHUNK_IDAT ); ++ ++ mnDeflateInSize = mnBitsPerPixel; ++ ++ if( mpMaskAccess ) ++ mnDeflateInSize += 8; ++ ++ mnBBP = ( mnDeflateInSize + 7 ) >> 3; ++ ++ mnDeflateInSize = mnBBP * mnWidth + 1; ++ ++ mpDeflateInBuf = new BYTE[ mnDeflateInSize ]; ++ ++ if ( mnFilterType ) // using filter type 4 we need memory for the scanline 3 times ++ { ++ mpPreviousScan = new BYTE[ mnDeflateInSize ]; ++ mpCurrentScan = new BYTE[ mnDeflateInSize ]; ++ ImplClearFirstScanline(); ++ } ++ mpZCodec->BeginCompression( ZCODEC_PNG_DEFAULT + mnCompLevel ); ++ mpZCodec->SetCRC( mnCRC ); ++ SvMemoryStream aOStm; ++ if ( mnInterlaced == 0 ) ++ { ++ for ( ULONG nY = 0; nY < mnHeight; nY++ ) ++ mpZCodec->Write( aOStm, mpDeflateInBuf, ImplGetFilter( nY ) ); ++ } ++ else ++ { ++ // interlace mode ++ ULONG nY; ++ for ( nY = 0; nY < mnHeight; nY+=8 ) // pass 1 ++ mpZCodec->Write( aOStm, mpDeflateInBuf, ImplGetFilter ( nY, 0, 8 ) ); ++ ImplClearFirstScanline(); ++ ++ for ( nY = 0; nY < mnHeight; nY+=8 ) // pass 2 ++ mpZCodec->Write( aOStm, mpDeflateInBuf, ImplGetFilter ( nY, 4, 8 ) ); ++ ImplClearFirstScanline(); ++ ++ if ( mnHeight >= 5 ) // pass 3 ++ { ++ for ( nY = 4; nY < mnHeight; nY+=8 ) ++ mpZCodec->Write( aOStm, mpDeflateInBuf, ImplGetFilter ( nY, 0, 4 ) ); ++ ImplClearFirstScanline(); ++ } ++ ++ for ( nY = 0; nY < mnHeight; nY+=4 ) // pass 4 ++ mpZCodec->Write( aOStm, mpDeflateInBuf, ImplGetFilter ( nY, 2, 4 ) ); ++ ImplClearFirstScanline(); ++ ++ if ( mnHeight >= 3 ) // pass 5 ++ { ++ for ( nY = 2; nY < mnHeight; nY+=4 ) ++ mpZCodec->Write( aOStm, mpDeflateInBuf, ImplGetFilter ( nY, 0, 2 ) ); ++ ImplClearFirstScanline(); ++ } ++ ++ for ( nY = 0; nY < mnHeight; nY+=2 ) // pass 6 ++ mpZCodec->Write( aOStm, mpDeflateInBuf, ImplGetFilter ( nY, 1, 2 ) ); ++ ImplClearFirstScanline(); ++ ++ if ( mnHeight >= 2 ) // pass 7 ++ { ++ for ( nY = 1; nY < mnHeight; nY+=2 ) ++ mpZCodec->Write( aOStm, mpDeflateInBuf, ImplGetFilter ( nY, 0, 1 ) ); ++ } ++ } ++ mpZCodec->EndCompression(); ++ mnCRC = mpZCodec->GetCRC(); ++ ++ if ( mnFilterType ) // using filter type 4 we need memory for the scanline 3 times ++ { ++ delete[] mpCurrentScan; ++ delete[] mpPreviousScan; ++ } ++ delete[] mpDeflateInBuf; ++ ImplWriteChunk( (unsigned char*)aOStm.GetData(), aOStm.Tell() ); ++ ImplCloseChunk(); ++} ++ ++// --------------------------------------------------------------------------------------------------- ++// ImplGetFilter writes the complete Scanline (nY) - in interlace mode the parameter nXStart and nXAdd ++// appends to the currently used pass ++// the complete size of scanline will be returned - in interlace mode zero is possible! ++ ++ULONG PNGWriterImpl::ImplGetFilter ( ULONG nY, ULONG nXStart, ULONG nXAdd ) ++{ ++ BYTE* pDest; ++ ++ if ( mnFilterType ) ++ pDest = mpCurrentScan; ++ else ++ pDest = mpDeflateInBuf; ++ ++ if ( nXStart < mnWidth ) ++ { ++ *pDest++ = mnFilterType; // in this version the filter type is either 0 or 4 ++ ++ if ( mpAccess->HasPalette() ) // alphachannel is not allowed by pictures including palette entries ++ { ++ switch ( mnBitsPerPixel ) ++ { ++ case( 1 ): ++ { ++ ULONG nX, nXIndex; ++ for ( nX = nXStart, nXIndex = 0; nX < mnWidth; nX+=nXAdd, nXIndex++ ) ++ { ++ ULONG nShift = ( nXIndex & 7 ) ^ 7; ++ if ( nShift == 7) ++ *pDest = (BYTE) mpAccess->GetPixel( nY, nX ) << nShift; ++ else if ( nShift == 0 ) ++ *pDest++ |= (BYTE) mpAccess->GetPixel( nY, nX ) << nShift; ++ else ++ *pDest |= (BYTE) mpAccess->GetPixel( nY, nX ) << nShift; ++ } ++ if ( ( nXIndex & 7 ) != 0 ) pDest++; // byte is not completely used, so the ++ } // bufferpointer is to correct ++ break; ++ ++ case( 4 ): ++ { ++ ULONG nX, nXIndex; ++ for ( nX = nXStart, nXIndex = 0; nX < mnWidth; nX+= nXAdd, nXIndex++ ) ++ { ++ if( nXIndex & 1 ) ++ *pDest++ |= (BYTE) mpAccess->GetPixel( nY, nX ); ++ else ++ *pDest = (BYTE) mpAccess->GetPixel( nY, nX ) << 4; ++ } ++ if ( nXIndex & 1 ) pDest++; ++ } ++ break; ++ ++ case( 8 ): ++ { ++ for ( ULONG nX = nXStart; nX < mnWidth; nX+=nXAdd ) ++ *pDest++ = mpAccess->GetPixel( nY, nX ); ++ } ++ break; ++ ++ default : ++ mbStatus = FALSE; ++ break; ++ } ++ } ++ else ++ { ++ if ( mpMaskAccess ) // mpMaskAccess != NULL -> alphachannel is to create ++ { ++ if ( mbTrueAlpha ) ++ { ++ for ( ULONG nX = nXStart; nX < mnWidth; nX += nXAdd ) ++ { ++ const BitmapColor& rColor = mpAccess->GetPixel( nY, nX ); ++ *pDest++ = rColor.GetRed(); ++ *pDest++ = rColor.GetGreen(); ++ *pDest++ = rColor.GetBlue(); ++ *pDest++ = 255 - mpMaskAccess->GetPixel( nY, nX ); ++ } ++ } ++ else ++ { ++ const BitmapColor aTrans( mpMaskAccess->GetBestMatchingColor( Color( COL_WHITE ) ) ); ++ ++ for ( ULONG nX = nXStart; nX < mnWidth; nX+=nXAdd ) ++ { ++ const BitmapColor& rColor = mpAccess->GetPixel( nY, nX ); ++ *pDest++ = rColor.GetRed(); ++ *pDest++ = rColor.GetGreen(); ++ *pDest++ = rColor.GetBlue(); ++ ++ if( mpMaskAccess->GetPixel( nY, nX ) == aTrans ) ++ *pDest++ = 0; ++ else ++ *pDest++ = 0xff; ++ } ++ } ++ } ++ else ++ { ++ for ( ULONG nX = nXStart; nX < mnWidth; nX+=nXAdd ) ++ { ++ const BitmapColor& rColor = mpAccess->GetPixel( nY, nX ); ++ *pDest++ = rColor.GetRed(); ++ *pDest++ = rColor.GetGreen(); ++ *pDest++ = rColor.GetBlue(); ++ } ++ } ++ } ++ } ++ // filter type4 ( PAETH ) will be used only for 24bit graphics ++ if ( mnFilterType ) ++ { ++ mnDeflateInSize = pDest - mpCurrentScan; ++ pDest = mpDeflateInBuf; ++ *pDest++ = 4; // filter type ++ ++ ULONG na, nb, nc; ++ long np, npa, npb, npc; ++ ++ BYTE* p1 = mpCurrentScan + 1; // Current Pixel ++ BYTE* p2 = p1 - mnBBP; // left pixel ++ BYTE* p3 = mpPreviousScan; // upper pixel ++ BYTE* p4 = p3 - mnBBP; // upperleft Pixel; ++ ++ while ( pDest < mpDeflateInBuf + mnDeflateInSize ) ++ { ++ nb = *p3++; ++ if ( p2 >= mpCurrentScan + 1 ) ++ { ++ na = *p2; ++ nc = *p4; ++ } ++ else ++ na = nc = 0; ++ ++ np = na + nb; ++ np -= nc; ++ npa = np - na; ++ npb = np - nb; ++ npc = np - nc; ++ if ( npa < 0 ) ++ npa =-npa; ++ if ( npb < 0 ) ++ npb =-npb; ++ if ( npc < 0 ) ++ npc =-npc; ++ if ( ( npa <= npb ) && ( npa <= npc ) ) *pDest++ = *p1++ - (BYTE)na; ++ else if ( npb <= npc ) *pDest++ = *p1++ - (BYTE)nb; ++ else *pDest++ = *p1++ - (BYTE)nc; ++ p4++; ++ p2++; ++ } ++ for ( long i = 0; i < (long)( mnDeflateInSize - 1 ); i++ ) ++ mpPreviousScan[ i ] = mpCurrentScan[ i + 1 ]; ++ } ++ else ++ mnDeflateInSize = pDest - mpDeflateInBuf; ++ return ( mnDeflateInSize ); ++} ++ ++// ------------------------------------------------------------------------ ++ ++void PNGWriterImpl::ImplClearFirstScanline() ++{ ++ if ( mnFilterType ) ++ rtl_zeroMemory( mpPreviousScan, mnDeflateInSize ); ++} ++ ++// ------------------------------------------------------------------------ ++ ++void PNGWriterImpl::ImplOpenChunk ( ULONG nChunkType ) ++{ ++ maChunkSeq.resize( maChunkSeq.size() + 1 ); ++ maChunkSeq.back().nType = nChunkType; ++} ++ ++// ------------------------------------------------------------------------ ++ ++void PNGWriterImpl::ImplWriteChunk ( BYTE nSource ) ++{ ++ maChunkSeq.back().aData.push_back( nSource ); ++} ++ ++void PNGWriterImpl::ImplWriteChunk ( ULONG nSource ) ++{ ++ vcl::PNGWriter::ChunkData& rChunkData = maChunkSeq.back(); ++ rChunkData.aData.push_back( (sal_uInt8)( nSource >> 24 ) ); ++ rChunkData.aData.push_back( (sal_uInt8)( nSource >> 16 ) ); ++ rChunkData.aData.push_back( (sal_uInt8)( nSource >> 8 ) ); ++ rChunkData.aData.push_back( (sal_uInt8)( nSource ) ); ++} ++ ++void PNGWriterImpl::ImplWriteChunk ( unsigned char* pSource, sal_uInt32 nDatSize ) ++{ ++ if ( nDatSize ) ++ { ++ vcl::PNGWriter::ChunkData& rChunkData = maChunkSeq.back(); ++ sal_uInt32 nSize = rChunkData.aData.size(); ++ rChunkData.aData.resize( nSize + nDatSize ); ++ rtl_copyMemory( &rChunkData.aData[ nSize ], pSource, nDatSize ); ++ } ++} ++ ++// ------------------------------------------------------------------------ ++// nothing to do ++void PNGWriterImpl::ImplCloseChunk ( void ) ++{ ++} ++ ++// ------------- ++// - PNGWriter - ++// ------------- ++ ++PNGWriter::PNGWriter( const BitmapEx& rBmpEx, ++ const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >* pFilterData ) : ++ mpImpl( new ::vcl::PNGWriterImpl( rBmpEx, pFilterData ) ) ++{ ++} ++ ++// ------------------------------------------------------------------------ ++ ++PNGWriter::~PNGWriter() ++{ ++ delete mpImpl; ++} ++ ++// ------------------------------------------------------------------------ ++ ++sal_Bool PNGWriter::Write( SvStream& rIStm ) ++{ ++ return mpImpl->Write( rIStm ); ++} ++ ++// ------------------------------------------------------------------------ ++ ++std::vector< vcl::PNGWriter::ChunkData >& PNGWriter::GetChunks() ++{ ++ return mpImpl->GetChunks(); ++} ++ ++} // namespace vcl ++ +Index: vcl/source/gdi/polyscan.cxx +=================================================================== +RCS file: /cvs/gsl/vcl/source/gdi/polyscan.cxx,v +retrieving revision 1.1.1.1 +retrieving revision 1.2 +diff -u -p -u -r1.1.1.1 -r1.2 +--- vcl/source/gdi/polyscan.cxx 18 Sep 2000 17:05:38 -0000 1.1.1.1 ++++ vcl/source/gdi/polyscan.cxx 6 Jan 2004 13:52:52 -0000 1.2 +@@ -62,8 +62,11 @@ + #include <string.h> + #include <tools/new.hxx> + #include "salbtype.hxx" +-#include "poly.hxx" + #include "polyscan.hxx" ++ ++#ifndef _TL_POLY_HXX ++#include <tools/poly.hxx> ++#endif + + // ---------------- + // - PolyScanline - +Index: vcl/source/gdi/print.cxx +=================================================================== +RCS file: /cvs/gsl/vcl/source/gdi/print.cxx,v +retrieving revision 1.42.82.1 +retrieving revision 1.45 +diff -u -p -u -r1.42.82.1 -r1.45 +--- vcl/source/gdi/print.cxx 26 Jan 2004 17:23:05 -0000 1.42.82.1 ++++ vcl/source/gdi/print.cxx 6 Jan 2004 13:53:20 -0000 1.45 +@@ -59,14 +59,11 @@ + * + ************************************************************************/ + +-#define _SV_PRINT_CXX + #define _SPOOLPRINTER_EXT + #define _RMPRINTER_EXT + #define ENABLE_BYTESTRING_STREAM_OPERATORS + #include <list> + +-#ifndef REMOTE_APPSERVER +- + #ifndef _SV_SVSYS_HXX + #include <svsys.h> + #endif +@@ -85,44 +82,6 @@ + + #include <unohelp.hxx> + +-#else /* REMOTE_APPSERVER */ +- +-#include "rvp.hxx" +-#include "rmoutdev.hxx" +-#include "rmwindow.hxx" +- +-struct SalPrinterQueueInfo +-{ +- XubString maPrinterName; +- XubString maDriver; +- XubString maLocation; +- XubString maComment; +- ULONG mnStatus; +- ULONG mnJobs; +- void* mpSysData; +- +- SalPrinterQueueInfo(); +- ~SalPrinterQueueInfo(); +-}; +-#include "rmprint.hxx" +- +-#include <vos/mutex.hxx> +-#ifndef _VCL_UNOHELP_HXX +-#include <unohelp.hxx> +-#endif +- +-using namespace com::sun::star::portal::client; +- +-#if OSL_DEBUG_LEVEL > 1 +-#ifdef PRODUCT +-#define OSL_DEBUG_LEVEL 0 +-#else +-#define OSL_DEBUG_LEVEL 1 +-#endif +-#endif +- +-#endif +- + #ifndef _DEBUG_HXX + #include <tools/debug.hxx> + #endif +@@ -371,27 +330,7 @@ static void ImplInitPrnQueueList() + + pSVData->maGDIData.mpPrinterQueueList = new ImplPrnQueueList; + +-#ifndef REMOTE_APPSERVER + pSVData->mpDefInst->GetPrinterQueueInfo( pSVData->maGDIData.mpPrinterQueueList ); +-#else +- BOOL bPrinterInfoOk = FALSE; +- const ULONG nCount = pSVData->mpPrinterEnvironment->Infos.getLength(); +- const RmQueueInfo* pInfos = pSVData->mpPrinterEnvironment->Infos.getConstArray(); +- +- for( ULONG i = 0; i < nCount; i++ ) +- { +- SalPrinterQueueInfo* pNewInfo = new SalPrinterQueueInfo; +- +- pNewInfo->maPrinterName = pInfos[i].PrinterName; +- pNewInfo->maDriver = pInfos[i].Driver; +- pNewInfo->maLocation = pInfos[i].Location; +- pNewInfo->maComment = pInfos[i].Comment; +- pNewInfo->mnStatus = pInfos[i].PrinterStatus; +- pNewInfo->mnJobs = pInfos[i].Jobs; +- pNewInfo->mpSysData = NULL; +- pSVData->maGDIData.mpPrinterQueueList->Add( pNewInfo ); +- } +-#endif + } + + // ----------------------------------------------------------------------- +@@ -409,11 +348,7 @@ void ImplDeletePrnQueueList() + if ( pInfo->mpQueueInfo ) + delete pInfo->mpQueueInfo; + +-#ifndef REMOTE_APPSERVER + pSVData->mpDefInst->DeletePrinterQueueInfo( pInfo->mpSalQueueInfo ); +-#else +- delete pInfo->mpSalQueueInfo; +-#endif + + delete pInfo; + pInfo = pPrnList->Next(); +@@ -457,12 +392,8 @@ const QueueInfo& Printer::GetQueueInfo( + + ImplPrnQueueData* pInfo = pSVData->maGDIData.mpPrinterQueueList->Get( nQueue ); + +-#ifndef REMOTE_APPSERVER + if ( bStatus ) + pSVData->mpDefInst->GetPrinterQueueState( pInfo->mpSalQueueInfo ); +-#else +- // ??? +-#endif + + if ( !pInfo->mpQueueInfo ) + pInfo->mpQueueInfo = new QueueInfo; +@@ -482,11 +413,7 @@ XubString Printer::GetDefaultPrinterName + { + ImplSVData* pSVData = ImplGetSVData(); + +-#ifndef REMOTE_APPSERVER + return pSVData->mpDefInst->GetDefaultPrinter(); +-#else +- return pSVData->mpPrinterEnvironment->DefaultPrinter; +-#endif + } + + // ======================================================================= +@@ -524,9 +451,6 @@ void Printer::ImplInitData() + else + pSVData->maGDIData.mpLastPrinter = this; + pSVData->maGDIData.mpFirstPrinter = this; +-#ifdef REMOTE_APPSERVER +- mpRemotePages = new ::std::vector< PrinterPage* >(); +-#endif + } + + // ----------------------------------------------------------------------- +@@ -557,7 +481,6 @@ void Printer::ImplInit( SalPrinterQueueI + pJobSetup->maPrinterName = maPrinterName; + pJobSetup->maDriver = maDriver; + +-#ifndef REMOTE_APPSERVER + mpInfoPrinter = pSVData->mpDefInst->CreateInfoPrinter( pInfo, pJobSetup ); + mpPrinter = NULL; + mpJobPrinter = NULL; +@@ -576,73 +499,10 @@ void Printer::ImplInit( SalPrinterQueueI + ImplInitDisplay( NULL ); + return; + } +-#else +- +- mpInfoPrinter = new RmPrinter; +- +- Reference< XRmPrinter > xPrinter; +- +- if (pSVData->mxClientFactory.is() ) +- { +- xPrinter = Reference< XRmPrinter >( pSVData->mxClientFactory->createInstance( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "OfficePrinter.stardiv.de" ) ) ), NMSP_UNO::UNO_QUERY ); +- mpInfoPrinter->SetInterface( xPrinter ); +- } +- +- if ( ! xPrinter.is() ) +- { +- delete mpInfoPrinter; +- mpInfoPrinter = NULL; +- ImplInitDisplay( NULL ); +- return; +- } +- else +- { +- QueueInfo aQInfo; +- RmJobSetup aRmJobSetup; +- const REF( XRmPrinter )& rxPrinter = mpInfoPrinter->GetInterface(); +- +- const RmQueueInfo* pInfos = pSVData->mpPrinterEnvironment->Infos.getConstArray(); +- const RmQueueInfo* pSelectedInfo = NULL; +- ::rtl::OUString aCompare( maPrinterName ); +- for( int i = 0; i < pSVData->mpPrinterEnvironment->Infos.getLength(); i++ ) +- { +- if( pInfos[i].PrinterName == aCompare ) +- { +- pSelectedInfo = pInfos+i; +- break; +- } +- } +- +- if( pSelectedInfo ) +- { +- mpInfoPrinter->CreateInfoInstance( *pSelectedInfo, aRmJobSetup ); +- maJobSetup = aRmJobSetup; +- } +- +- if( rxPrinter.is() ) +- { +- mpGraphics = new ImplServerGraphics( pSVData->mpAtoms ); +- REF( XRmOutputDevice ) aTmp( rxPrinter, UNO_QUERY ); +- mpGraphics->SetInterface( aTmp ); +- } +- +- if( !mpGraphics->GetInterface().is() ) +- { +- delete mpGraphics, mpGraphics = NULL; +- delete mpInfoPrinter, mpInfoPrinter = NULL; +- ImplInitDisplay( NULL ); +- return; +- } +- else +- { +- ImplGetServerGraphics(); +- } +- } +-#endif + + // Daten initialisieren + ImplUpdatePageData(); +- mpFontList = new ImplDevFontList; ++ mpFontList = new ImplDevFontList(); + mpFontCache = new ImplFontCache( TRUE ); + mpGraphics->GetDevFontList( mpFontList ); + } +@@ -666,10 +526,6 @@ void Printer::ImplInitDisplay( const Win + mpFontCache = pSVData->maGDIData.mpScreenFontCache; + mnDPIX = mpDisplayDev->mnDPIX; + mnDPIY = mpDisplayDev->mnDPIY; +- +-#ifdef REMOTE_APPSERVER +- mpGraphics = mpDisplayDev->mpGraphics; +-#endif + } + + // ----------------------------------------------------------------------- +@@ -761,7 +617,6 @@ SalPrinterQueueInfo* Printer::ImplGetQue + + void Printer::ImplUpdatePageData() + { +-#ifndef REMOTE_APPSERVER + // we need a graphics + if ( !ImplGetGraphics() ) + return; +@@ -771,15 +626,6 @@ void Printer::ImplUpdatePageData() + mnOutWidth, mnOutHeight, + maPageOffset.X(), maPageOffset.Y(), + maPaperSize.Width(), maPaperSize.Height() ); +-#else +- if ( mpInfoPrinter && mpGraphics ) +- { +- mpGraphics->GetResolution( mnDPIX, mnDPIY ); +- mpInfoPrinter->GetPageInfo( mnOutWidth, mnOutHeight, +- maPageOffset.X(), maPageOffset.Y(), +- maPaperSize.Width(), maPaperSize.Height() ); +- } +-#endif + } + + // ----------------------------------------------------------------------- +@@ -869,37 +715,9 @@ Printer::~Printer() + + delete mpPrinterOptions; + +-#ifndef REMOTE_APPSERVER + ImplReleaseGraphics(); + if ( mpInfoPrinter ) + ImplGetSVData()->mpDefInst->DestroyInfoPrinter( mpInfoPrinter ); +-#else +- if ( mpInfoPrinter ) +- { +- if( mpGraphics ) { +- REF( XRmOutputDevice ) aTmp; +- mpGraphics->SetInterface( aTmp ); +- } +- +- ImplReleaseServerGraphics(); +- +- if ( mpGetDevFontList ) +- { +- delete mpGetDevFontList; +- mpGetDevFontList = NULL; +- } +- if ( mpGetDevSizeList ) +- { +- delete mpGetDevSizeList; +- mpGetDevSizeList = NULL; +- } +- delete mpGraphics, mpGraphics = NULL; +- delete mpInfoPrinter, mpInfoPrinter = NULL; +- } +- for( int i = 0; i < mpRemotePages->size(); i++ ) +- delete (*mpRemotePages)[i]; +- delete mpRemotePages; +-#endif + if ( mpDisplayDev ) + delete mpDisplayDev; + else +@@ -944,11 +762,7 @@ ULONG Printer::GetCapabilities( USHORT n + if ( IsDisplayPrinter() ) + return FALSE; + +-#ifndef REMOTE_APPSERVER + return mpInfoPrinter->GetCapabilities( maJobSetup.ImplGetConstData(), nType ); +-#else +- return mpInfoPrinter->GetCapabilities( nType ); +-#endif + } + + // ----------------------------------------------------------------------- +@@ -989,7 +803,6 @@ BOOL Printer::SetJobSetup( const JobSetu + + JobSetup aJobSetup = rSetup; + +-#ifndef REMOTE_APPSERVER + ImplReleaseGraphics(); + if ( mpInfoPrinter->SetPrinterData( aJobSetup.ImplGetData() ) ) + { +@@ -1002,55 +815,10 @@ BOOL Printer::SetJobSetup( const JobSetu + } + + return FALSE; +-#else +- if ( mpInfoPrinter ) +- { +- RmJobSetup aRmJobSetup; +- +- aJobSetup.SetRmJobSetup( aRmJobSetup ); +- if ( mpInfoPrinter->SetJobSetup( aRmJobSetup ) ) +- { +- mbNewJobSetup = TRUE; +- maJobSetup = aRmJobSetup; +- ImplUpdatePageData(); +- ImplUpdateFontList(); +- return TRUE; +- } +- else +- return FALSE; +- } +- return FALSE; +-#endif + } + + // ----------------------------------------------------------------------- + +-#ifdef REMOTE_APPSERVER +-IMPL_LINK( Printer, UserSetupCompleted, ::com::sun::star::uno::Any*, pResult ) +-{ +- ::vos::OGuard guard( Application::GetSolarMutex( ) ); +- +- if( pResult->hasValue() ) +- { +- mbUserSetupResult = TRUE; +- +- ::com::sun::star::portal::client::RmJobSetup aRmJobSetup; +- *pResult >>= aRmJobSetup; +- JobSetup aJobSetup; +- aJobSetup = aRmJobSetup; +- ImplUpdateJobSetupPaper( aJobSetup ); +- mbNewJobSetup = TRUE; +- maJobSetup = aJobSetup; +- ImplUpdatePageData(); +- ImplUpdateFontList(); +- } +- else +- mbUserSetupResult = FALSE; +- +- mbUserSetupCompleted = TRUE; +- return 0; +-} +-#endif + + BOOL Printer::Setup( Window* pWindow ) + { +@@ -1060,7 +828,6 @@ BOOL Printer::Setup( Window* pWindow ) + if ( IsJobActive() || IsPrinting() ) + return FALSE; + +-#ifndef REMOTE_APPSERVER + JobSetup aJobSetup = maJobSetup; + SalFrame* pFrame; + if ( !pWindow ) +@@ -1084,21 +851,6 @@ BOOL Printer::Setup( Window* pWindow ) + return TRUE; + } + return FALSE; +-#else +- RmJobSetup aRmJobSetup; +- maJobSetup.SetRmJobSetup( aRmJobSetup ); +- mpInfoPrinter->SetJobSetup( aRmJobSetup ); +- RmFrameWindow* pFrame; +- if ( !pWindow ) +- pFrame = ImplGetDefaultWindow()->ImplGetFrame(); +- else +- pFrame = pWindow->ImplGetFrame(); +- mbUserSetupCompleted = FALSE; +- mpInfoPrinter->UserSetup( pFrame->GetFrameInterface(), pFrame->InsertUserEventLink( LINK( this, Printer, UserSetupCompleted ) ) ); +- while( ! mbUserSetupCompleted ) +- Application::Reschedule(); +- return mbUserSetupResult; +-#endif + } + + // ----------------------------------------------------------------------- +@@ -1123,22 +875,8 @@ BOOL Printer::SetPrinterProps( const Pri + // Alten Printer zerstoeren + if ( !IsDisplayPrinter() ) + { +-#ifndef REMOTE_APPSERVER + ImplReleaseGraphics(); + pSVData->mpDefInst->DestroyInfoPrinter( mpInfoPrinter ); +-#else +- if ( mpInfoPrinter ) +- { +- if( mpGraphics ) { +- REF( XRmOutputDevice ) aTmp; +- mpGraphics->SetInterface( aTmp ); +- } +- +- ImplReleaseServerGraphics(); +- delete mpGraphics, mpGraphics = NULL; +- delete mpInfoPrinter, mpInfoPrinter = NULL; +- } +-#endif + if ( mpFontEntry ) + { + mpFontCache->Release( mpFontEntry ); +@@ -1173,9 +911,7 @@ BOOL Printer::SetPrinterProps( const Pri + // Alten Printer zerstoeren? + if ( GetName() != pPrinter->GetName() ) + { +-#ifndef REMOTE_APPSERVER + ImplReleaseGraphics(); +-#endif + if ( mpDisplayDev ) + { + delete mpDisplayDev; +@@ -1183,21 +919,7 @@ BOOL Printer::SetPrinterProps( const Pri + } + else + { +-#ifndef REMOTE_APPSERVER + pSVData->mpDefInst->DestroyInfoPrinter( mpInfoPrinter ); +-#else +- if ( mpInfoPrinter ) +- { +- if( mpGraphics ) { +- REF( XRmOutputDevice ) aTmp; +- mpGraphics->SetInterface( aTmp ); +- } +- +- ImplReleaseServerGraphics(); +- delete mpGraphics, mpGraphics = NULL; +- delete mpInfoPrinter, mpInfoPrinter = NULL; +- } +-#endif + + if ( mpFontEntry ) + { +@@ -1258,18 +980,10 @@ BOOL Printer::SetOrientation( Orientatio + return TRUE; + } + +-#ifndef REMOTE_APPSERVER + ImplReleaseGraphics(); + if ( mpInfoPrinter->SetData( SAL_JOBSET_ORIENTATION, pSetupData ) ) + { + ImplUpdateJobSetupPaper( aJobSetup ); +-#else +- RmJobSetup aRmJobSetup; +- aJobSetup.SetRmJobSetup( aRmJobSetup ); +- if ( mpInfoPrinter->SetOrientation( (unsigned short)eOrientation, aRmJobSetup ) ) +- { +- aJobSetup = aRmJobSetup; +-#endif + mbNewJobSetup = TRUE; + maJobSetup = aJobSetup; + ImplUpdatePageData(); +@@ -1311,18 +1025,10 @@ BOOL Printer::SetPaperBin( USHORT nPaper + return TRUE; + } + +-#ifndef REMOTE_APPSERVER + ImplReleaseGraphics(); + if ( mpInfoPrinter->SetData( SAL_JOBSET_PAPERBIN, pSetupData ) ) + { + ImplUpdateJobSetupPaper( aJobSetup ); +-#else +- RmJobSetup aRmJobSetup; +- aJobSetup.SetRmJobSetup( aRmJobSetup ); +- if ( mpInfoPrinter->SetPaperBin( nPaperBin, aRmJobSetup ) ) +- { +- aJobSetup = aRmJobSetup; +-#endif + mbNewJobSetup = TRUE; + maJobSetup = aJobSetup; + ImplUpdatePageData(); +@@ -1377,6 +1083,7 @@ void Printer::ImplFindPaperFormatForUser + nPaperWidth, + nPaperHeight ) ) + { ++ pSetupData->meOrientation = ORIENTATION_PORTRAIT; + pSetupData->mePaperFormat = ImplGetPaperFormat( rPaperInfo.m_nPaperWidth*100, + rPaperInfo.m_nPaperHeight*100 ); + break; +@@ -1399,6 +1106,7 @@ void Printer::ImplFindPaperFormatForUser + nPaperHeight, + nPaperWidth )) + { ++ pSetupData->meOrientation = ORIENTATION_LANDSCAPE; + pSetupData->mePaperFormat = ImplGetPaperFormat( rPaperInfo.m_nPaperWidth*100, + rPaperInfo.m_nPaperHeight*100 ); + break; +@@ -1432,20 +1140,12 @@ BOOL Printer::SetPaper( Paper ePaper ) + return TRUE; + } + +-#ifndef REMOTE_APPSERVER + ImplReleaseGraphics(); + if ( ePaper == PAPER_USER ) + ImplFindPaperFormatForUserSize( aJobSetup ); + if ( mpInfoPrinter->SetData( SAL_JOBSET_PAPERSIZE|SAL_JOBSET_ORIENTATION, pSetupData ) ) + { + ImplUpdateJobSetupPaper( aJobSetup ); +-#else +- RmJobSetup aRmJobSetup; +- aJobSetup.SetRmJobSetup( aRmJobSetup ); +- if ( mpInfoPrinter->SetPaper( (unsigned short)ePaper, aRmJobSetup ) ) +- { +- aJobSetup = aRmJobSetup; +-#endif + mbNewJobSetup = TRUE; + maJobSetup = aJobSetup; + ImplUpdatePageData(); +@@ -1486,7 +1186,6 @@ BOOL Printer::SetPaperSizeUser( const Si + return TRUE; + } + +-#ifndef REMOTE_APPSERVER + ImplReleaseGraphics(); + ImplFindPaperFormatForUserSize( aJobSetup ); + +@@ -1494,13 +1193,6 @@ BOOL Printer::SetPaperSizeUser( const Si + if ( mpInfoPrinter->SetData( SAL_JOBSET_PAPERSIZE|SAL_JOBSET_ORIENTATION, pSetupData ) ) + { + ImplUpdateJobSetupPaper( aJobSetup ); +-#else +- RmJobSetup aRmJobSetup; +- aJobSetup.SetRmJobSetup( aRmJobSetup ); +- if ( mpInfoPrinter->SetPaperSizeUser( aPageSize.Width(), aPageSize.Height(), aRmJobSetup ) ) +- { +- aJobSetup = aRmJobSetup; +-#endif + mbNewJobSetup = TRUE; + maJobSetup = aJobSetup; + ImplUpdatePageData(); +@@ -1611,14 +1303,7 @@ USHORT Printer::GetPaperBinCount() const + if ( IsDisplayPrinter() ) + return 0; + +-#ifndef REMOTE_APPSERVER + return (USHORT)mpInfoPrinter->GetPaperBinCount( maJobSetup.ImplGetConstData() ); +-#else +- if ( mpInfoPrinter ) +- return mpInfoPrinter->GetPaperBinCount(); +- else +- return 0; +-#endif + } + + // ----------------------------------------------------------------------- +@@ -1628,17 +1313,10 @@ XubString Printer::GetPaperBinName( USHO + if ( IsDisplayPrinter() ) + return ImplGetSVEmptyStr(); + +-#ifndef REMOTE_APPSERVER + if ( nPaperBin < GetPaperBinCount() ) + return mpInfoPrinter->GetPaperBinName( maJobSetup.ImplGetConstData(), nPaperBin ); + else + return ImplGetSVEmptyStr(); +-#else +- if ( mpInfoPrinter ) +- return (String)mpInfoPrinter->GetPaperBinName( nPaperBin ); +- else +- return ImplGetSVEmptyStr(); +-#endif + } + + // ----------------------------------------------------------------------- +@@ -1679,7 +1357,6 @@ void Printer::PrintPage() + + // ----------------------------------------------------------------------- + +-#ifndef REMOTE_APPSERVER + + ULONG ImplSalPrinterErrorCodeToVCL( ULONG nError ) + { +@@ -1724,10 +1401,6 @@ IMPL_LINK( Printer, ImplDestroyPrinterAs + + // ----------------------------------------------------------------------- + +-#endif +- +-// ----------------------------------------------------------------------- +- + BOOL Printer::StartJob( const XubString& rJobName ) + { + mnError = PRINTER_OK; +@@ -1738,7 +1411,6 @@ BOOL Printer::StartJob( const XubString& + if ( IsJobActive() || IsPrinting() ) + return FALSE; + +-#ifndef REMOTE_APPSERVER + ULONG nCopies = mnCopyCount; + BOOL bCollateCopy = mbCollateCopy; + BOOL bUserCopy = FALSE; +@@ -1836,14 +1508,6 @@ BOOL Printer::StartJob( const XubString& + return FALSE; + } + } +-#else +- mbNewJobSetup = FALSE; +- maJobName = rJobName; +- mnCurPage = 1; +- mnCurPrintPage = 1; +- mbJobActive = TRUE; +- mbPrinting = TRUE; +-#endif + + return TRUE; + } +@@ -1859,7 +1523,6 @@ BOOL Printer::EndJob() + + mbJobActive = FALSE; + +-#ifndef REMOTE_APPSERVER + if ( mpPrinter || mpQPrinter ) + { + ImplReleaseGraphics(); +@@ -1886,75 +1549,6 @@ BOOL Printer::EndJob() + + return TRUE; + } +-#else +- ImplSVData* pSVData = ImplGetSVData(); +- sal_Bool bResult = sal_False; +- +- try +- { +- mpPrinter = new RmPrinter(); +- mpPrinter->mxRemotePrinter = REF( XRmPrinter )( pSVData->mxClientFactory->createInstance( ::rtl::OUString::createFromAscii( "OfficePrinter.stardiv.de" ) ), NMSP_UNO::UNO_QUERY ); +- RmJobSetup aRmJobSetup; +- maJobSetup.SetRmJobSetup( aRmJobSetup ); +- mpPrinter->CreatePrintInstance( aRmJobSetup ); +- if( mpPrinter->mxRemotePrinter.is() ) +- { +- RmPageRequestor* pRequestor = new RmPageRequestor( this ); +- Reference< XRmPageRequestor > xReq( pRequestor ); +- CHECK_FOR_RVPSYNC_NORMAL(); +- bResult = mpPrinter->mxRemotePrinter->StartJob( mnCopyCount, +- mbCollateCopy, +- maJobName, +- maPrintFile, +- mbPrintFile, +- mpRemotePages->size(), +- xReq ); +- if( bResult ) +- do Application::Reschedule(); while( mbPrinting && ! pRequestor->isCompleted() ); +- } +- } +- catch( RuntimeException &e ) +- { +- rvpExceptionHandler(); +- bResult = FALSE; +- if( mpPrinter ) +- { +- delete mpPrinter; +- mpPrinter = NULL; +- } +- } +- +- for( int i = 0; i < mpRemotePages->size(); i++ ) +- delete (*mpRemotePages)[i]; +- *mpRemotePages = ::std::vector< PrinterPage* >(); +- +- if ( mpPrinter ) +- { +- if( bResult ) +- { +- CHECK_FOR_RVPSYNC_NORMAL(); +- try +- { +- mpPrinter->mxRemotePrinter->EndJob( vcl::unohelper::GetMultiServiceFactory() ); +- } +- catch( RuntimeException &e ) +- { +- rvpExceptionHandler(); +- } +- } +- mbPrinting = FALSE; +- mbDevOutput = FALSE; +- mnCurPage = 0; +- mnCurPrintPage = 0; +- maJobName.Erase(); +- EndPrint(); +- +- delete mpPrinter; +- mpPrinter = NULL; +- +- return bResult; +- } +-#endif + + return FALSE; + } +@@ -1972,7 +1566,6 @@ BOOL Printer::AbortJob() + mbInPrintPage = FALSE; + mpJobGraphics = NULL; + +-#ifndef REMOTE_APPSERVER + if ( mpPrinter || mpQPrinter ) + { + mbPrinting = FALSE; +@@ -2005,33 +1598,6 @@ BOOL Printer::AbortJob() + + return TRUE; + } +-#else +- mbPrinting = FALSE; +- mbDevOutput = FALSE; +- mnCurPage = 0; +- mnCurPrintPage = 0; +- maJobName.Erase(); +- if( mpPrinter ) +- { +- if( mpPrinter->mxRemotePrinter.is() ) +- { +- CHECK_FOR_RVPSYNC_NORMAL(); +- try +- { +- mpPrinter->mxRemotePrinter->AbortJob(); +- } +- catch( RuntimeException &e ) +- { +- rvpExceptionHandler(); +- } +- } +- delete mpPrinter; +- mpPrinter = NULL; +- } +- EndPrint(); +- +- return TRUE; +-#endif + + return FALSE; + } +@@ -2043,7 +1609,6 @@ BOOL Printer::StartPage() + if ( !IsJobActive() ) + return FALSE; + +-#ifndef REMOTE_APPSERVER + if ( mpPrinter || mpQPrinter ) + { + if ( mpPrinter ) +@@ -2083,18 +1648,6 @@ BOOL Printer::StartPage() + + return TRUE; + } +-#else +- mpQMtf = new GDIMetaFile; +- mpQMtf->Record( this ); +- mpQMtf->SaveStatus(); +- +- mbInPrintPage = TRUE; +- mnCurPage++; +- mnCurPrintPage++; +- PrintPage(); +- +- return TRUE; +-#endif + + return FALSE; + } +@@ -2108,7 +1661,6 @@ BOOL Printer::EndPage() + + mbInPrintPage = FALSE; + +-#ifndef REMOTE_APPSERVER + if ( mpPrinter || mpQPrinter ) + { + if ( mpPrinter ) +@@ -2132,109 +1684,6 @@ BOOL Printer::EndPage() + + return TRUE; + } +-#else +- mpQMtf->Stop(); +- mpQMtf->WindStart(); +- mpRemotePages->push_back( new PrinterPage( mpQMtf, mbNewJobSetup, GetJobSetup() ) ); +- mpQMtf = NULL; +- mbNewJobSetup = FALSE; +- +- return TRUE; +-#endif + + return FALSE; + } +- +-#ifdef REMOTE_APPSERVER +-void Printer::GetRemotePageSetup( ULONG nPage, RmJobSetup& rSetup ) +-{ +- if( nPage < mpRemotePages->size() ) +- (*mpRemotePages)[nPage]->GetJobSetup().SetRmJobSetup( rSetup ); +-} +- +-void Printer::PrintRemotePage( ULONG nPage ) +-{ +-#if OSL_DEBUG_LEVEL > 1 +- fprintf( stderr, "printing page %d of %d\n", nPage, mpRemotePages->size() ); +-#endif +- if ( mpPrinter && mpPrinter->mxRemotePrinter.is() ) +- { +-#if OSL_DEBUG_LEVEL > 1 +- fprintf( stderr, "have printer\n", nPage ); +-#endif +- if( nPage >= mpRemotePages->size() ) +- { +- try +- { +- CHECK_FOR_RVPSYNC_NORMAL(); +- mpPrinter->mxRemotePrinter->StartPage(); +- CHECK_FOR_RVPSYNC_NORMAL(); +- mpPrinter->mxRemotePrinter->EndPage(); +- } +- catch( RuntimeException &e ) +- { +- rvpExceptionHandler(); +- } +- return; +- } +- +- if( mpGraphics ) { +- REF( XRmOutputDevice ) aTmp; +- mpGraphics->SetInterface( aTmp ); +- delete mpGraphics; +- } +- +- PrinterPage* pPage = (*mpRemotePages)[nPage]; +- +- CHECK_FOR_RVPSYNC_NORMAL(); +- try +- { +- mpPrinter->mxRemotePrinter->StartPage(); +-#if OSL_DEBUG_LEVEL > 1 +- fprintf( stderr, "page started\n" ); +-#endif +- } +- catch( RuntimeException &e ) +- { +-#if OSL_DEBUG_LEVEL > 1 +- fprintf( stderr, "page started exception\n" ); +-#endif +- rvpExceptionHandler(); +- } +- +- mpGraphics = new ImplServerGraphics( ImplGetSVData()->mpAtoms ); +- Reference< XRmOutputDevice > temp( mpPrinter->mxRemotePrinter, UNO_QUERY ); +- mpGraphics->SetInterface( temp ); +- +- mbDevOutput = TRUE; +- mbInPrintPage = TRUE; +- mnCurPage = nPage; +- mnCurPrintPage = nPage; +- +- pPage->GetGDIMetaFile()->WindStart(); +- pPage->GetGDIMetaFile()->Play( this ); +- +-#if OSL_DEBUG_LEVEL > 1 +- fprintf( stderr, "metafile played %d actions\n", pPage->GetGDIMetaFile()->GetActionCount() ); +-#endif +- +- CHECK_FOR_RVPSYNC_NORMAL(); +- try +- { +- mpPrinter->mxRemotePrinter->EndPage(); +-#if OSL_DEBUG_LEVEL > 1 +- fprintf( stderr, "page ended\n" ); +-#endif +- } +- catch( RuntimeException &e ) +- { +-#if OSL_DEBUG_LEVEL > 1 +- fprintf( stderr, "page ended exception\n" ); +-#endif +- rvpExceptionHandler(); +- } +- mbDevOutput = FALSE; +- mbNewJobSetup = FALSE; +- } +-} +-#endif +Index: vcl/source/gdi/print2.cxx +=================================================================== +RCS file: /cvs/gsl/vcl/source/gdi/print2.cxx,v +retrieving revision 1.17.82.1 +retrieving revision 1.19 +diff -u -p -u -r1.17.82.1 -r1.19 +--- vcl/source/gdi/print2.cxx 9 Jan 2004 18:13:47 -0000 1.17.82.1 ++++ vcl/source/gdi/print2.cxx 6 Jan 2004 13:53:54 -0000 1.19 +@@ -59,7 +59,6 @@ + * + ************************************************************************/ + +-#define _SV_PRINT_CXX + #define _SPOOLPRINTER_EXT + + #include <functional> +@@ -604,9 +603,6 @@ struct ConnectedComponents + typedef ::std::list< ConnectedComponents > ConnectedComponentsList; + + // remove comment to enable highlighting of generated output +-#ifdef DBG_UTIL +-//#define DEBUG_GetPreparedMetaFile +-#endif + + void Printer::GetPreparedMetaFile( const GDIMetaFile& rInMtf, GDIMetaFile& rOutMtf, + long nMaxBmpDPIX, long nMaxBmpDPIY ) +@@ -1041,10 +1037,6 @@ void Printer::GetPreparedMetaFile( const + aBandBmp, nMaxBmpDPIX, nMaxBmpDPIY ); + } + +-#ifdef DEBUG_GetPreparedMetaFile +- //aBandBmp.Invert(); +-#endif +- + rOutMtf.AddAction( new MetaCommentAction( "PRNSPOOL_TRANSPARENTBITMAP_BEGIN" ) ); + rOutMtf.AddAction( new MetaBmpScaleAction( aDstPtPix, aDstSzPix, aBandBmp ) ); + rOutMtf.AddAction( new MetaCommentAction( "PRNSPOOL_TRANSPARENTBITMAP_END" ) ); +@@ -1140,20 +1132,6 @@ void Printer::GetPreparedMetaFile( const + + rOutMtf.SetPrefMapMode( rInMtf.GetPrefMapMode() ); + rOutMtf.SetPrefSize( rInMtf.GetPrefSize() ); +- +-#ifdef DEBUG_GetPreparedMetaFile +- // iterate over all aCCList members and generate rectangles for the bounding boxes +- rOutMtf.AddAction( new MetaFillColorAction( COL_WHITE, FALSE ) ); +- for( aCurr = aCCList.begin(); aCurr != aLast; ++aCurr ) +- { +- if( aCurr->bIsSpecial ) +- rOutMtf.AddAction( new MetaLineColorAction( COL_RED, TRUE) ); +- else +- rOutMtf.AddAction( new MetaLineColorAction( COL_BLUE, TRUE) ); +- +- rOutMtf.AddAction( new MetaRectAction( aMapModeVDev.PixelToLogic( aCurr->aBounds ) ) ); +- } +-#endif + } + } + +Index: vcl/source/gdi/regband.cxx +=================================================================== +RCS file: /cvs/gsl/vcl/source/gdi/regband.cxx,v +retrieving revision 1.1.1.1 +retrieving revision 1.2 +diff -u -p -u -r1.1.1.1 -r1.2 +--- vcl/source/gdi/regband.cxx 18 Sep 2000 17:05:38 -0000 1.1.1.1 ++++ vcl/source/gdi/regband.cxx 6 Jan 2004 13:54:21 -0000 1.2 +@@ -59,8 +59,6 @@ + * + ************************************************************************/ + +-#define _SV_REGBAND_CXX +- + #ifndef _DEBUG_HXX + #include <tools/debug.hxx> + #endif +@@ -633,7 +631,6 @@ void ImplRegionBand::XOr( long nXLeft, l + // -> reduce boundaries of new separation + if ( (nXLeft <= pSep->mnXLeft) && (nXRight >= pSep->mnXRight) ) + { +- int iOldXRight = pSep->mnXRight; + pSep->mnXRight = pSep->mnXLeft; + pSep->mnXLeft = nXLeft; + nXLeft = pSep->mnXRight; +@@ -644,7 +641,6 @@ void ImplRegionBand::XOr( long nXLeft, l + // -> set boundaries of new separation to right remainder + if ( (nXRight >= pSep->mnXLeft) && (nXLeft <= pSep->mnXLeft) ) + { +- int iOldXRight = pSep->mnXRight; + pSep->mnXRight = pSep->mnXLeft; + pSep->mnXLeft = nXLeft; + nXLeft = pSep->mnXRight; +Index: vcl/source/gdi/region.cxx +=================================================================== +RCS file: /cvs/gsl/vcl/source/gdi/region.cxx,v +retrieving revision 1.3 +retrieving revision 1.6 +diff -u -p -u -r1.3 -r1.6 +--- vcl/source/gdi/region.cxx 30 Sep 2002 17:28:03 -0000 1.3 ++++ vcl/source/gdi/region.cxx 4 Feb 2004 14:42:24 -0000 1.6 +@@ -59,8 +59,6 @@ + * + ************************************************************************/ + +-#define _SV_REGION_CXX +- + #include <limits.h> + + #ifndef _VCOMPAT_HXX +@@ -2202,49 +2200,6 @@ SvStream& operator<<( SvStream& rOStrm, + + // ----------------------------------------------------------------------- + +-RegionOverlapType Region::GetOverlapType( const Rectangle& rRect ) const +-{ +- DBG_CHKTHIS( Region, ImplDbgTestRegion ); +- +- // is rectangle empty? -> not inside +- if ( rRect.IsEmpty() ) +- return REGION_OUTSIDE; +- +- ((Region*)this)->ImplPolyPolyRegionToBandRegion(); +- +- // no instance data? -> not inside +- if ( (mpImplRegion == &aImplEmptyRegion) || (mpImplRegion == &aImplNullRegion) ) +- return REGION_OUTSIDE; +- +- // resolve pointer +- ImplRegionBand* pBand = mpImplRegion->mpFirstBand; +- ImplRegionBandSep* pSep = pBand->mpFirstSep; +- +- // complex region? don't check for now. This may change in the future... +- if ( pBand->mpNextBand || pSep->mpNextSep ) +- return REGION_OVER; +- +- // get justified rectangle +- long nLeft = Min( rRect.Left(), rRect.Right() ); +- long nTop = Min( rRect.Top(), rRect.Bottom() ); +- long nRight = Max( rRect.Left(), rRect.Right() ); +- long nBottom = Max( rRect.Top(), rRect.Bottom() ); +- +- // check rectangle region +- BOOL boLeft = (nLeft >= pSep->mnXLeft) && (nLeft < pSep->mnXRight); +- BOOL boRight = (nRight <= pSep->mnXRight) && (nRight > pSep->mnXLeft); +- BOOL boTop = (nTop >= pBand->mnYTop) && (nTop < pBand->mnYBottom); +- BOOL boBottom = (nBottom <= pBand->mnYBottom) && (nBottom > pBand->mnYTop); +- if ( boLeft && boRight && boTop && boBottom ) +- return REGION_INSIDE; +- if ( boLeft || boRight || boTop || boBottom ) +- return REGION_OVER; +- +- return REGION_OUTSIDE; +-} +- +-// ----------------------------------------------------------------------- +- + void Region::ImplBeginAddRect() + { + DBG_CHKTHIS( Region, ImplDbgTestRegion ); +@@ -2440,13 +2395,13 @@ RegionHandle Region::BeginEnumRects() + + // no internal data? -> region is empty! + if ( (mpImplRegion == &aImplEmptyRegion) || (mpImplRegion == &aImplNullRegion) ) +- return NULL; ++ return 0; + + // no band in the list? -> region is empty! + if ( mpImplRegion->mpFirstBand == NULL ) + { + DBG_ASSERT( mpImplRegion->mpFirstBand, "Region::BeginEnumRects() First Band is Empty!" ); +- return NULL; ++ return 0; + } + + ImplRegionHandle* pData = new ImplRegionHandle; +Index: vcl/source/gdi/salgdilayout.cxx +=================================================================== +RCS file: /cvs/gsl/vcl/source/gdi/salgdilayout.cxx,v +retrieving revision 1.12 +retrieving revision 1.17 +diff -u -p -u -r1.12 -r1.17 +--- vcl/source/gdi/salgdilayout.cxx 27 Mar 2003 17:58:03 -0000 1.12 ++++ vcl/source/gdi/salgdilayout.cxx 10 May 2004 15:49:10 -0000 1.17 +@@ -59,15 +59,11 @@ + * + ************************************************************************/ + +-#define _SV_OUTDEV_CXX + #include <tools/ref.hxx> +-#ifndef REMOTE_APPSERVER + #ifndef _SV_SVSYS_HXX + #include <svsys.h> + #endif +-#endif + +-#ifndef REMOTE_APPSERVER + #ifndef _SV_SALGDI_HXX + #include <salgdi.hxx> + #endif +@@ -80,11 +76,6 @@ + #ifndef _SV_SALPRN_HXX + #include <salprn.hxx> + #endif +-#else +-#ifndef _SV_RMOUTDEV_HXX +-#include <rmoutdev.hxx> +-#endif +-#endif + + #ifndef _DEBUG_HXX + #include <tools/debug.hxx> +@@ -95,7 +86,7 @@ + #ifndef _SV_SVAPP_HXX + #include <svapp.hxx> + #endif +-#ifndef _POLY_HXX ++#ifndef _TL_POLY_HXX + #include <tools/poly.hxx> + #endif + #ifndef _SV_REGION_HXX +@@ -149,9 +140,9 @@ + #ifndef _SV_SALLAYOUT_HXX + #include <sallayout.hxx> + #endif ++#undef private + +-#define IS_NOTRTL_ENABLED() ( pOutDev && !pOutDev->IsRTLEnabled() ) +- ++//#define USE_NEW_RTL_IMPLEMENTATION + + // ---------------------------------------------------------------------------- + // The only common SalFrame method +@@ -174,68 +165,80 @@ SalFrameGeometry SalFrame::GetGeometry() + + // ---------------------------------------------------------------------------- + +-SalGraphicsLayout::SalGraphicsLayout() : SalGraphics() ++SalGraphics::SalGraphics() ++ : m_nLayout( 0 ) + { + // read global RTL settings + if( Application::GetSettings().GetLayoutRTL() ) +- mnLayout = SAL_LAYOUT_BIDI_RTL; +- else +- mnLayout = 0; ++ m_nLayout = SAL_LAYOUT_BIDI_RTL; + } + +-SalGraphicsLayout::~SalGraphicsLayout() ++SalGraphics::~SalGraphics() + { + } + + // ---------------------------------------------------------------------------- + +-void SalGraphicsLayout::mirror( long& x, const OutputDevice *pOutDev ) ++void SalGraphics::mirror( long& x, const OutputDevice *pOutDev ) + { + long w; +- if( pOutDev && pOutDev->meOutDevType == OUTDEV_VIRDEV ) +- w = pOutDev->mnOutWidth; ++ if( pOutDev && pOutDev->GetOutDevType() == OUTDEV_VIRDEV ) ++ w = pOutDev->GetOutputWidthPixel(); + else + w = GetGraphicsWidth(); + + if( w ) + { +- x = w-1-x; +- + if( pOutDev && !pOutDev->IsRTLEnabled() ) + { ++ OutputDevice *pOutDevRef = (OutputDevice*) pOutDev; ++#ifdef USE_NEW_RTL_IMPLEMENTATION ++ if( pOutDev->meOutDevType == OUTDEV_WINDOW ) ++ pOutDevRef = (OutputDevice*) ((Window *) pOutDev)->mpDummy4; // top of non-mirroring hierarchy ++#endif ++ + // mirror this window back +- long devX = w-pOutDev->mnOutWidth-pOutDev->mnOutOffX; // re-mirrored mnOutOffX +- x = devX + ( pOutDev->mnOutWidth - 1 - (x - devX) ) ; ++ long devX = w-pOutDevRef->GetOutputWidthPixel()-pOutDevRef->GetOutOffXPixel(); // re-mirrored mnOutOffX ++ x = devX + (x - pOutDevRef->GetOutOffXPixel()); + } ++ else ++ x = w-1-x; + } + } + +-void SalGraphicsLayout::mirror( long& x, long& nWidth, const OutputDevice *pOutDev ) ++void SalGraphics::mirror( long& x, long& nWidth, const OutputDevice *pOutDev ) + { + long w; +- if( pOutDev && pOutDev->meOutDevType == OUTDEV_VIRDEV ) +- w = pOutDev->mnOutWidth; ++ if( pOutDev && pOutDev->GetOutDevType() == OUTDEV_VIRDEV ) ++ w = pOutDev->GetOutputWidthPixel(); + else + w = GetGraphicsWidth(); + + if( w ) + { +- x = w-nWidth-x; +- + if( pOutDev && !pOutDev->IsRTLEnabled() ) + { ++ OutputDevice *pOutDevRef = (OutputDevice*) pOutDev; ++#ifdef USE_NEW_RTL_IMPLEMENTATION ++ if( pOutDev->meOutDevType == OUTDEV_WINDOW ) ++ pOutDevRef = (OutputDevice*) ((Window *) pOutDev)->mpDummy4; // top of non-mirroring hierarchy ++#endif ++ + // mirror this window back +- long devX = w-pOutDev->mnOutWidth-pOutDev->mnOutOffX; // re-mirrored mnOutOffX +- x = devX + ( pOutDev->mnOutWidth - nWidth - (x - devX) ) ; ++ long devX = w-pOutDevRef->GetOutputWidthPixel()-pOutDevRef->GetOutOffXPixel(); // re-mirrored mnOutOffX ++ x = devX + (x - pOutDevRef->GetOutOffXPixel()); + } ++ else ++ x = w-nWidth-x; ++ + } + } + +-BOOL SalGraphicsLayout::mirror( sal_uInt32 nPoints, const SalPoint *pPtAry, SalPoint *pPtAry2, const OutputDevice *pOutDev ) ++BOOL SalGraphics::mirror( sal_uInt32 nPoints, const SalPoint *pPtAry, SalPoint *pPtAry2, const OutputDevice *pOutDev ) + { + long w; +- if( pOutDev && pOutDev->meOutDevType == OUTDEV_VIRDEV ) +- w = pOutDev->mnOutWidth; ++ if( pOutDev && pOutDev->GetOutDevType() == OUTDEV_VIRDEV ) ++ w = pOutDev->GetOutputWidthPixel(); + else + w = GetGraphicsWidth(); + +@@ -245,12 +248,19 @@ BOOL SalGraphicsLayout::mirror( sal_uInt + + if( pOutDev && !pOutDev->IsRTLEnabled() ) + { ++ OutputDevice *pOutDevRef = (OutputDevice*) pOutDev; ++#ifdef USE_NEW_RTL_IMPLEMENTATION ++ if( pOutDev->meOutDevType == OUTDEV_WINDOW ) ++ pOutDevRef = (OutputDevice*) ((Window *) pOutDev)->mpDummy4; // top of non-mirroring hierarchy ++#endif ++ + // mirror this window back +- long devX = w-pOutDev->mnOutWidth-pOutDev->mnOutOffX; // re-mirrored mnOutOffX ++ long devX = w-pOutDevRef->GetOutputWidthPixel()-pOutDevRef->GetOutOffXPixel(); // re-mirrored mnOutOffX + for( i=0, j=nPoints-1; i<nPoints; i++,j-- ) + { +- long x = w-1-pPtAry[i].mnX; +- pPtAry2[j].mnX = devX + ( pOutDev->mnOutWidth - 1 - (x - devX) ); ++ //long x = w-1-pPtAry[i].mnX; ++ //pPtAry2[j].mnX = devX + ( pOutDevRef->mnOutWidth - 1 - (x - devX) ); ++ pPtAry2[j].mnX = devX + (pPtAry[i].mnX - pOutDevRef->GetOutOffXPixel()); + pPtAry2[j].mnY = pPtAry[i].mnY; + } + } +@@ -268,69 +278,81 @@ BOOL SalGraphicsLayout::mirror( sal_uInt + return FALSE; + } + ++void SalGraphics::mirror( Region& rRgn, const OutputDevice *pOutDev ) ++{ ++ // mirror the bounding rect and move Region by resulting offset ++ Rectangle aRect( rRgn.GetBoundRect() ); ++ long nWidth = aRect.GetWidth(); ++ long x = aRect.Left(); ++ long x_org = x; ++ ++ mirror( x, nWidth, pOutDev ); ++ rRgn.Move( x - x_org, 0 ); ++} ++ + // ---------------------------------------------------------------------------- + +-BOOL SalGraphicsLayout::UnionClipRegion( long nX, long nY, long nWidth, long nHeight, const OutputDevice *pOutDev ) ++BOOL SalGraphics::UnionClipRegion( long nX, long nY, long nWidth, long nHeight, const OutputDevice *pOutDev ) + { +- if( (mnLayout & SAL_LAYOUT_BIDI_RTL) ) ++ if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) ) + mirror( nX, nWidth, pOutDev ); +- return SalGraphics::UnionClipRegion( nX, nY, nWidth, nHeight, NULL ); ++ return unionClipRegion( nX, nY, nWidth, nHeight ); + } + +-void SalGraphicsLayout::DrawPixel( long nX, long nY, const OutputDevice *pOutDev ) ++void SalGraphics::DrawPixel( long nX, long nY, const OutputDevice *pOutDev ) + { +- if( (mnLayout & SAL_LAYOUT_BIDI_RTL) ) ++ if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) ) + mirror( nX, pOutDev ); +- SalGraphics::DrawPixel( nX, nY, NULL ); ++ drawPixel( nX, nY ); + } +-void SalGraphicsLayout::DrawPixel( long nX, long nY, SalColor nSalColor, const OutputDevice *pOutDev ) ++void SalGraphics::DrawPixel( long nX, long nY, SalColor nSalColor, const OutputDevice *pOutDev ) + { +- if( (mnLayout & SAL_LAYOUT_BIDI_RTL) ) ++ if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) ) + mirror( nX, pOutDev ); +- SalGraphics::DrawPixel( nX, nY, nSalColor, NULL ); ++ drawPixel( nX, nY, nSalColor ); + } +-void SalGraphicsLayout::DrawLine( long nX1, long nY1, long nX2, long nY2, const OutputDevice *pOutDev ) ++void SalGraphics::DrawLine( long nX1, long nY1, long nX2, long nY2, const OutputDevice *pOutDev ) + { +- if( (mnLayout & SAL_LAYOUT_BIDI_RTL) ) ++ if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) ) + { + mirror( nX1, pOutDev ); + mirror( nX2, pOutDev ); + } +- SalGraphics::DrawLine( nX1, nY1, nX2, nY2, NULL ); ++ drawLine( nX1, nY1, nX2, nY2 ); + } +-void SalGraphicsLayout::DrawRect( long nX, long nY, long nWidth, long nHeight, const OutputDevice *pOutDev ) ++void SalGraphics::DrawRect( long nX, long nY, long nWidth, long nHeight, const OutputDevice *pOutDev ) + { +- if( (mnLayout & SAL_LAYOUT_BIDI_RTL) ) ++ if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) ) + mirror( nX, nWidth, pOutDev ); +- SalGraphics::DrawRect( nX, nY, nWidth, nHeight, NULL ); ++ drawRect( nX, nY, nWidth, nHeight ); + } +-void SalGraphicsLayout::DrawPolyLine( ULONG nPoints, const SalPoint* pPtAry, const OutputDevice *pOutDev ) ++void SalGraphics::DrawPolyLine( ULONG nPoints, const SalPoint* pPtAry, const OutputDevice *pOutDev ) + { +- if( (mnLayout & SAL_LAYOUT_BIDI_RTL) ) ++ if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) ) + { + SalPoint* pPtAry2 = new SalPoint[nPoints]; + BOOL bCopied = mirror( nPoints, pPtAry, pPtAry2, pOutDev ); +- SalGraphics::DrawPolyLine( nPoints, bCopied ? pPtAry2 : pPtAry, NULL ); ++ drawPolyLine( nPoints, bCopied ? pPtAry2 : pPtAry ); + delete [] pPtAry2; + } + else +- SalGraphics::DrawPolyLine( nPoints, pPtAry, NULL ); ++ drawPolyLine( nPoints, pPtAry ); + } +-void SalGraphicsLayout::DrawPolygon( ULONG nPoints, const SalPoint* pPtAry, const OutputDevice *pOutDev ) ++void SalGraphics::DrawPolygon( ULONG nPoints, const SalPoint* pPtAry, const OutputDevice *pOutDev ) + { +- if( (mnLayout & SAL_LAYOUT_BIDI_RTL) ) ++ if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) ) + { + SalPoint* pPtAry2 = new SalPoint[nPoints]; + BOOL bCopied = mirror( nPoints, pPtAry, pPtAry2, pOutDev ); +- SalGraphics::DrawPolygon( nPoints, bCopied ? pPtAry2 : pPtAry, NULL ); ++ drawPolygon( nPoints, bCopied ? pPtAry2 : pPtAry ); + delete [] pPtAry2; + } + else +- SalGraphics::DrawPolygon( nPoints, pPtAry, NULL ); ++ drawPolygon( nPoints, pPtAry ); + } +-void SalGraphicsLayout::DrawPolyPolygon( ULONG nPoly, const ULONG* pPoints, PCONSTSALPOINT* pPtAry, const OutputDevice *pOutDev ) ++void SalGraphics::DrawPolyPolygon( ULONG nPoly, const ULONG* pPoints, PCONSTSALPOINT* pPtAry, const OutputDevice *pOutDev ) + { +- if( (mnLayout & SAL_LAYOUT_BIDI_RTL) ) ++ if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) ) + { + // TODO: optimize, reduce new/delete calls + SalPoint **pPtAry2 = new SalPoint*[nPoly]; +@@ -339,148 +361,213 @@ void SalGraphicsLayout::DrawPolyPolygon( + { + ULONG nPoints = pPoints[i]; + pPtAry2[i] = new SalPoint[ nPoints ]; +- BOOL bCopied = mirror( nPoints, pPtAry[i], pPtAry2[i], pOutDev ); ++ mirror( nPoints, pPtAry[i], pPtAry2[i], pOutDev ); + } + +- SalGraphics::DrawPolyPolygon( nPoly, pPoints, (PCONSTSALPOINT*)pPtAry2, NULL ); ++ drawPolyPolygon( nPoly, pPoints, (PCONSTSALPOINT*)pPtAry2 ); + + for(i=0; i<nPoly; i++) + delete [] pPtAry2[i]; + delete [] pPtAry2; + } + else +- SalGraphics::DrawPolyPolygon( nPoly, pPoints, pPtAry, NULL ); ++ drawPolyPolygon( nPoly, pPoints, pPtAry ); + } +-sal_Bool SalGraphicsLayout::DrawPolyLineBezier( ULONG nPoints, const SalPoint* pPtAry, const BYTE* pFlgAry, const OutputDevice *pOutDev ) ++sal_Bool SalGraphics::DrawPolyLineBezier( ULONG nPoints, const SalPoint* pPtAry, const BYTE* pFlgAry, const OutputDevice *pOutDev ) + { +- DBG_ASSERT( !(mnLayout & SAL_LAYOUT_BIDI_RTL), "DrawPolyLineBezier - no mirroring implemented"); +- return SalGraphics::DrawPolyLineBezier( nPoints, pPtAry, pFlgAry, NULL ); ++ DBG_ASSERT( !(m_nLayout & SAL_LAYOUT_BIDI_RTL), "DrawPolyLineBezier - no mirroring implemented"); ++ return drawPolyLineBezier( nPoints, pPtAry, pFlgAry ); + } +-sal_Bool SalGraphicsLayout::DrawPolygonBezier( ULONG nPoints, const SalPoint* pPtAry, const BYTE* pFlgAry, const OutputDevice *pOutDev ) ++sal_Bool SalGraphics::DrawPolygonBezier( ULONG nPoints, const SalPoint* pPtAry, const BYTE* pFlgAry, const OutputDevice *pOutDev ) + { +- DBG_ASSERT( !(mnLayout & SAL_LAYOUT_BIDI_RTL), "DrawPolygonBezier - no mirroring implemented"); +- return SalGraphics::DrawPolygonBezier( nPoints, pPtAry, pFlgAry, NULL ); ++ DBG_ASSERT( !(m_nLayout & SAL_LAYOUT_BIDI_RTL), "DrawPolygonBezier - no mirroring implemented"); ++ return drawPolygonBezier( nPoints, pPtAry, pFlgAry ); + } +-sal_Bool SalGraphicsLayout::DrawPolyPolygonBezier( ULONG nPoly, const ULONG* pPoints, ++sal_Bool SalGraphics::DrawPolyPolygonBezier( ULONG nPoly, const ULONG* pPoints, + const SalPoint* const* pPtAry, const BYTE* const* pFlgAry, const OutputDevice *pOutDev ) + { +- DBG_ASSERT( !(mnLayout & SAL_LAYOUT_BIDI_RTL), "DrawPolyPolygonBezier - no mirroring implemented"); +- return SalGraphics::DrawPolyPolygonBezier( nPoly, pPoints, pPtAry, pFlgAry, NULL ); ++ DBG_ASSERT( !(m_nLayout & SAL_LAYOUT_BIDI_RTL), "DrawPolyPolygonBezier - no mirroring implemented"); ++ return drawPolyPolygonBezier( nPoly, pPoints, pPtAry, pFlgAry ); + } +-void SalGraphicsLayout::CopyArea( long nDestX, long nDestY, +- long nSrcX, long nSrcY, +- long nSrcWidth, long nSrcHeight, +- USHORT nFlags, const OutputDevice *pOutDev ) ++void SalGraphics::CopyArea( long nDestX, long nDestY, ++ long nSrcX, long nSrcY, ++ long nSrcWidth, long nSrcHeight, ++ USHORT nFlags, const OutputDevice *pOutDev ) + { +- if( (mnLayout & SAL_LAYOUT_BIDI_RTL) ) ++ if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) ) + { + mirror( nDestX, nSrcWidth, pOutDev ); + mirror( nSrcX, nSrcWidth, pOutDev ); + } +- SalGraphics::CopyArea( nDestX, nDestY, nSrcX, nSrcY, nSrcWidth, nSrcHeight, nFlags, NULL ); ++ copyArea( nDestX, nDestY, nSrcX, nSrcY, nSrcWidth, nSrcHeight, nFlags ); + } +-void SalGraphicsLayout::CopyBits( const SalTwoRect* pPosAry, +- SalGraphics* pSrcGraphics, const OutputDevice *pOutDev, const OutputDevice *pSrcOutDev ) ++void SalGraphics::CopyBits( const SalTwoRect* pPosAry, ++ SalGraphics* pSrcGraphics, const OutputDevice *pOutDev, const OutputDevice *pSrcOutDev ) + { +- if( ( (mnLayout & SAL_LAYOUT_BIDI_RTL) ) || ++ if( ( (m_nLayout & SAL_LAYOUT_BIDI_RTL) ) || + (pSrcGraphics && (pSrcGraphics->GetLayout() & SAL_LAYOUT_BIDI_RTL) ) ) + { + SalTwoRect pPosAry2 = *pPosAry; + if( pSrcGraphics && (pSrcGraphics->GetLayout() & SAL_LAYOUT_BIDI_RTL) ) + mirror( pPosAry2.mnSrcX, pPosAry2.mnSrcWidth, pSrcOutDev ); +- if( (mnLayout & SAL_LAYOUT_BIDI_RTL) ) ++ if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) ) + mirror( pPosAry2.mnDestX, pPosAry2.mnDestWidth, pOutDev ); +- SalGraphics::CopyBits( &pPosAry2, pSrcGraphics, NULL, NULL ); ++ copyBits( &pPosAry2, pSrcGraphics ); + } + else +- SalGraphics::CopyBits( pPosAry, pSrcGraphics, NULL, NULL ); ++ copyBits( pPosAry, pSrcGraphics ); + } +-void SalGraphicsLayout::DrawBitmap( const SalTwoRect* pPosAry, ++void SalGraphics::DrawBitmap( const SalTwoRect* pPosAry, + const SalBitmap& rSalBitmap, const OutputDevice *pOutDev ) + { +- if( (mnLayout & SAL_LAYOUT_BIDI_RTL) ) ++ if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) ) + { + SalTwoRect pPosAry2 = *pPosAry; + mirror( pPosAry2.mnDestX, pPosAry2.mnDestWidth, pOutDev ); +- SalGraphics::DrawBitmap( &pPosAry2, rSalBitmap, NULL ); ++ drawBitmap( &pPosAry2, rSalBitmap ); + } + else +- SalGraphics::DrawBitmap( pPosAry, rSalBitmap, NULL ); ++ drawBitmap( pPosAry, rSalBitmap ); + } +-void SalGraphicsLayout::DrawBitmap( const SalTwoRect* pPosAry, ++void SalGraphics::DrawBitmap( const SalTwoRect* pPosAry, + const SalBitmap& rSalBitmap, + SalColor nTransparentColor, const OutputDevice *pOutDev ) + { +- if( (mnLayout & SAL_LAYOUT_BIDI_RTL) ) ++ if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) ) + { + SalTwoRect pPosAry2 = *pPosAry; + mirror( pPosAry2.mnDestX, pPosAry2.mnDestWidth, pOutDev ); +- SalGraphics::DrawBitmap( &pPosAry2, rSalBitmap, nTransparentColor, NULL ); ++ drawBitmap( &pPosAry2, rSalBitmap, nTransparentColor ); + } + else +- SalGraphics::DrawBitmap( pPosAry, rSalBitmap, nTransparentColor, NULL ); ++ drawBitmap( pPosAry, rSalBitmap, nTransparentColor ); + } +-void SalGraphicsLayout::DrawBitmap( const SalTwoRect* pPosAry, +- const SalBitmap& rSalBitmap, +- const SalBitmap& rTransparentBitmap, const OutputDevice *pOutDev ) ++void SalGraphics::DrawBitmap( const SalTwoRect* pPosAry, ++ const SalBitmap& rSalBitmap, ++ const SalBitmap& rTransparentBitmap, const OutputDevice *pOutDev ) + { +- if( (mnLayout & SAL_LAYOUT_BIDI_RTL) ) ++ if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) ) + { + SalTwoRect pPosAry2 = *pPosAry; + mirror( pPosAry2.mnDestX, pPosAry2.mnDestWidth, pOutDev ); +- SalGraphics::DrawBitmap( &pPosAry2, rSalBitmap, rTransparentBitmap, NULL ); ++ drawBitmap( &pPosAry2, rSalBitmap, rTransparentBitmap ); + } + else +- SalGraphics::DrawBitmap( pPosAry, rSalBitmap, rTransparentBitmap, NULL ); ++ drawBitmap( pPosAry, rSalBitmap, rTransparentBitmap ); + } +-void SalGraphicsLayout::DrawMask( const SalTwoRect* pPosAry, ++void SalGraphics::DrawMask( const SalTwoRect* pPosAry, + const SalBitmap& rSalBitmap, + SalColor nMaskColor, const OutputDevice *pOutDev ) + { +- if( (mnLayout & SAL_LAYOUT_BIDI_RTL) ) ++ if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) ) + { + SalTwoRect pPosAry2 = *pPosAry; + mirror( pPosAry2.mnDestX, pPosAry2.mnDestWidth, pOutDev ); +- SalGraphics::DrawMask( &pPosAry2, rSalBitmap, nMaskColor, NULL ); ++ drawMask( &pPosAry2, rSalBitmap, nMaskColor ); + } + else +- SalGraphics::DrawMask( pPosAry, rSalBitmap, nMaskColor, NULL ); ++ drawMask( pPosAry, rSalBitmap, nMaskColor ); + } +-SalBitmap* SalGraphicsLayout::GetBitmap( long nX, long nY, long nWidth, long nHeight, const OutputDevice *pOutDev ) ++SalBitmap* SalGraphics::GetBitmap( long nX, long nY, long nWidth, long nHeight, const OutputDevice *pOutDev ) + { +- if( (mnLayout & SAL_LAYOUT_BIDI_RTL) ) ++ if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) ) + mirror( nX, nWidth, pOutDev ); +- return SalGraphics::GetBitmap( nX, nY, nWidth, nHeight, NULL ); ++ return getBitmap( nX, nY, nWidth, nHeight ); + } +-SalColor SalGraphicsLayout::GetPixel( long nX, long nY, const OutputDevice *pOutDev ) ++SalColor SalGraphics::GetPixel( long nX, long nY, const OutputDevice *pOutDev ) + { +- if( (mnLayout & SAL_LAYOUT_BIDI_RTL) ) ++ if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) ) + mirror( nX, pOutDev ); +- return SalGraphics::GetPixel( nX, nY, NULL ); ++ return getPixel( nX, nY ); + } +-void SalGraphicsLayout::Invert( long nX, long nY, long nWidth, long nHeight, SalInvert nFlags, const OutputDevice *pOutDev ) ++void SalGraphics::Invert( long nX, long nY, long nWidth, long nHeight, SalInvert nFlags, const OutputDevice *pOutDev ) + { +- if( (mnLayout & SAL_LAYOUT_BIDI_RTL) ) ++ if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) ) + mirror( nX, nWidth, pOutDev ); +- SalGraphics::Invert( nX, nY, nWidth, nHeight, nFlags, NULL ); ++ invert( nX, nY, nWidth, nHeight, nFlags ); + } +-void SalGraphicsLayout::Invert( ULONG nPoints, const SalPoint* pPtAry, SalInvert nFlags, const OutputDevice *pOutDev ) ++void SalGraphics::Invert( ULONG nPoints, const SalPoint* pPtAry, SalInvert nFlags, const OutputDevice *pOutDev ) + { +- if( (mnLayout & SAL_LAYOUT_BIDI_RTL) ) ++ if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) ) + { + SalPoint* pPtAry2 = new SalPoint[nPoints]; + BOOL bCopied = mirror( nPoints, pPtAry, pPtAry2, pOutDev ); +- SalGraphics::Invert( nPoints, bCopied ? pPtAry2 : pPtAry, nFlags, NULL ); ++ invert( nPoints, bCopied ? pPtAry2 : pPtAry, nFlags ); + delete [] pPtAry2; + } + else +- SalGraphics::Invert( nPoints, pPtAry, nFlags, NULL ); ++ invert( nPoints, pPtAry, nFlags ); + } + +-BOOL SalGraphicsLayout::DrawEPS( long nX, long nY, long nWidth, long nHeight, void* pPtr, ULONG nSize, const OutputDevice *pOutDev ) ++BOOL SalGraphics::DrawEPS( long nX, long nY, long nWidth, long nHeight, void* pPtr, ULONG nSize, const OutputDevice *pOutDev ) + { +- if( (mnLayout & SAL_LAYOUT_BIDI_RTL) ) ++ if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) ) + mirror( nX, nWidth, pOutDev ); +- return SalGraphics::DrawEPS( nX, nY, nWidth, nHeight, pPtr, nSize, NULL ); ++ return drawEPS( nX, nY, nWidth, nHeight, pPtr, nSize ); + } + ++BOOL SalGraphics::HitTestNativeControl( ControlType nType, ControlPart nPart, const Region& rControlRegion, ++ const Point& aPos, SalControlHandle& rControlHandle, BOOL& rIsInside, const OutputDevice *pOutDev ) ++{ ++ if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) ) ++ { ++ Point pt( aPos ); ++ Region rgn( rControlRegion ); ++ mirror( pt.X(), pOutDev ); ++ mirror( rgn, pOutDev ); ++ return hitTestNativeControl( nType, nPart, rgn, pt, rControlHandle, rIsInside ); ++ } ++ else ++ return hitTestNativeControl( nType, nPart, rControlRegion, aPos, rControlHandle, rIsInside ); ++} ++ ++BOOL SalGraphics::DrawNativeControl( ControlType nType, ControlPart nPart, const Region& rControlRegion, ++ ControlState nState, const ImplControlValue& aValue, SalControlHandle& rControlHandle, ++ OUString aCaption, const OutputDevice *pOutDev ) ++{ ++ if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) ) ++ { ++ Region rgn( rControlRegion ); ++ mirror( rgn, pOutDev ); ++ return drawNativeControl( nType, nPart, rgn, nState, aValue, rControlHandle, aCaption ); ++ } ++ else ++ return drawNativeControl( nType, nPart, rControlRegion, nState, aValue, rControlHandle, aCaption ); ++} ++ ++BOOL SalGraphics::DrawNativeControlText( ControlType nType, ControlPart nPart, const Region& rControlRegion, ++ ControlState nState, const ImplControlValue& aValue, ++ SalControlHandle& rControlHandle, OUString aCaption, const OutputDevice *pOutDev ) ++{ ++ if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) ) ++ { ++ Region rgn( rControlRegion ); ++ mirror( rgn, pOutDev ); ++ return drawNativeControlText( nType, nPart, rgn, nState, aValue, rControlHandle, aCaption ); ++ } ++ else ++ return drawNativeControlText( nType, nPart, rControlRegion, nState, aValue, rControlHandle, aCaption ); ++} ++ ++BOOL SalGraphics::GetNativeControlRegion( ControlType nType, ControlPart nPart, const Region& rControlRegion, ControlState nState, ++ const ImplControlValue& aValue, SalControlHandle& rControlHandle, OUString aCaption, ++ Region &rNativeBoundingRegion, Region &rNativeContentRegion, const OutputDevice *pOutDev ) ++{ ++ if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) ) ++ { ++ Region rgn( rControlRegion ); ++ mirror( rgn, pOutDev ); ++ if( getNativeControlRegion( nType, nPart, rgn, nState, aValue, rControlHandle, aCaption, ++ rNativeBoundingRegion, rNativeContentRegion ) ) ++ { ++ mirror( rNativeBoundingRegion, pOutDev ); ++ mirror( rNativeContentRegion, pOutDev ); ++ return TRUE; ++ } ++ else ++ return FALSE; ++ } ++ else ++ return getNativeControlRegion( nType, nPart, rControlRegion, nState, aValue, rControlHandle, aCaption, ++ rNativeBoundingRegion, rNativeContentRegion ); ++} +Index: vcl/source/gdi/sallayout.cxx +=================================================================== +RCS file: /cvs/gsl/vcl/source/gdi/sallayout.cxx,v +retrieving revision 1.46.10.6 +retrieving revision 1.58 +diff -u -p -u -r1.46.10.6 -r1.58 +--- vcl/source/gdi/sallayout.cxx 7 Apr 2004 11:02:20 -0000 1.46.10.6 ++++ vcl/source/gdi/sallayout.cxx 17 Jun 2004 12:20:59 -0000 1.58 +@@ -60,41 +60,37 @@ + ************************************************************************/ + + #include <cstdio> ++ ++#define _USE_MATH_DEFINES + #include <math.h> + + #if defined(WIN32) + #define M_PI 3.1415926536 + #include <malloc.h> + #define alloca _alloca +-#elif defined(SOLARIS) || defined(IRIX) +-#include <alloca.h> ++#elif defined(SOLARIS) || defined(IRIX) ++ #include <alloca.h> ++#else ++#ifndef MACOSX ++ #include <malloc.h> ++#endif + #endif + +-//#define _SV_OUTDEV_CXX +- +-#ifndef REMOTE_APPSERVER + #ifndef _SV_SVSYS_HXX + #include <svsys.h> + #endif +-#endif + +-#ifndef REMOTE_APPSERVER + #ifndef _SV_SALGDI_HXX + #include <salgdi.hxx> + #endif +-#else +-#ifndef _SV_RMOUTDEV_HXX +-#include <rmoutdev.hxx> +-#endif +-#endif // REMOTE_APPSERVER + + #ifndef _SV_SALLAYOUT_HXX + #include <sallayout.hxx> + #endif // _SV_SALLAYOUT_HXX + +-#ifndef _SV_POLY_HXX +-#include <poly.hxx> +-#endif // _SV_POLY_HXX ++#ifndef _TL_POLY_HXX ++#include <tools/poly.hxx> ++#endif + + #include <tools/lang.hxx> + +@@ -133,13 +125,14 @@ sal_Unicode GetVerticalChar( sal_Unicode + { + return 0; // #i14788# input method is responsible vertical char changes + +- int nVert = 0; ++ int nVert = 0; + switch( nChar ) + { + // #104627# special treatment for some unicodes + case 0x002C: nVert = 0x3001; break; + case 0x002E: nVert = 0x3002; break; +-#if 0 // to few fonts have the compatibility forms, using ++ /* ++ // to few fonts have the compatibility forms, using + // them will then cause more trouble than good + // TODO: decide on a font specific basis + case 0x2018: nVert = 0xFE41; break; +@@ -167,7 +160,7 @@ sal_Unicode GetVerticalChar( sal_Unicode + case 0x300D: nVert = 0xFE42; break; + case 0x300E: nVert = 0xFE43; break; + case 0x300F: nVert = 0xFE44; break; +-#endif ++ */ + } + + return nVert; +@@ -440,13 +433,14 @@ bool ImplLayoutRuns::GetRun( int* nMinRu + + ImplLayoutArgs::ImplLayoutArgs( const xub_Unicode* pStr, int nLength, + int nMinCharPos, int nEndCharPos, int nFlags ) +-: mpStr( pStr ), ++: ++ mnFlags( nFlags ), + mnLength( nLength ), + mnMinCharPos( nMinCharPos ), + mnEndCharPos( nEndCharPos ), +- mnFlags( nFlags ), +- mnLayoutWidth( 0 ), ++ mpStr( pStr ), + mpDXArray( NULL ), ++ mnLayoutWidth( 0 ), + mnOrientation( 0 ) + { + if( mnFlags & SAL_LAYOUT_BIDI_STRONG ) +@@ -487,14 +481,13 @@ ImplLayoutArgs::ImplLayoutArgs( const xu + for( int i = 0; i < nRunCount; ++i ) + { + int32_t nMinPos, nLength; +- UBiDiDirection nDir = ubidi_getVisualRun( pLineBidi, i, &nMinPos, &nLength ); ++ ubidi_getVisualRun( pLineBidi, i, &nMinPos, &nLength ); + int nPos0 = nMinPos + mnMinCharPos; + int nPos1 = nPos0 + nLength; +-#if 0 +- bool bRTL = (nDir == UBIDI_RTL); +-#else // workaround for #110273# (probably ICU problem TODO: analyze there) ++ ++ // bool bRTL = (nDir == UBIDI_RTL); ++ // workaround for #110273# (probably ICU problem TODO: analyze there) + bool bRTL = ((pParaLevels[ nPos0 ] & 1) != 0); +-#endif + + // remove control characters from runs by splitting them up + if( !bRTL ) +@@ -554,10 +547,10 @@ SalLayout::SalLayout() + : mnMinCharPos( -1 ), + mnEndCharPos( -1 ), + mnLayoutFlags( 0 ), +- mnOrientation( 0 ), +- maDrawOffset( 0, 0 ), + mnUnitsPerPixel( 1 ), +- mnRefCount( 1 ) ++ mnOrientation( 0 ), ++ mnRefCount( 1 ), ++ maDrawOffset( 0, 0 ) + {} + + // ----------------------------------------------------------------------- +@@ -673,12 +666,12 @@ bool SalLayout::GetOutline( SalGraphics& + PolyPolygon aGlyphOutline; + for( int nStart = 0;;) + { +- long nLGlyph; ++ sal_Int32 nLGlyph; + if( !GetNextGlyphs( 1, &nLGlyph, aPos, nStart ) ) + break; + + // get outline of individual glyph, ignoring "empty" glyphs +- bool bSuccess = rSalGraphics.GetGlyphOutline( nLGlyph, aGlyphOutline, NULL ); ++ bool bSuccess = rSalGraphics.GetGlyphOutline( nLGlyph, aGlyphOutline ); + bRet &= bSuccess; + // only add non-empty outlines + if( bSuccess && (aGlyphOutline.Count() > 0) ) +@@ -703,12 +696,12 @@ bool SalLayout::GetBoundRect( SalGraphic + Rectangle aRectangle; + for( int nStart = 0;;) + { +- long nLGlyph; ++ sal_Int32 nLGlyph; + if( !GetNextGlyphs( 1, &nLGlyph, aPos, nStart ) ) + break; + + // get bounding rectangle of individual glyph +- if( rSalGraphics.GetGlyphBoundRect( nLGlyph, aRectangle, NULL ) ) ++ if( rSalGraphics.GetGlyphBoundRect( nLGlyph, aRectangle ) ) + { + // merge rectangle + aRectangle += aPos; +@@ -741,9 +734,10 @@ bool SalLayout::IsSpacingGlyph( long nGl + // ======================================================================= + + GenericSalLayout::GenericSalLayout() +-: mnGlyphCount(0), +- mnGlyphCapacity(0), +- mpGlyphItems(0) ++: mpGlyphItems(0), ++ mnGlyphCount(0), ++ mnGlyphCapacity(0) ++ + {} + + // ----------------------------------------------------------------------- +@@ -776,7 +770,7 @@ void GenericSalLayout::AppendGlyph( cons + + // ----------------------------------------------------------------------- + +-bool GenericSalLayout::GetCharWidths( long* pCharWidths ) const ++bool GenericSalLayout::GetCharWidths( sal_Int32* pCharWidths ) const + { + // initialize character extents buffer + int nCharCount = mnEndCharPos - mnMinCharPos; +@@ -785,7 +779,6 @@ bool GenericSalLayout::GetCharWidths( lo + + // determine cluster extents + const GlyphItem* pG = mpGlyphItems; +- int nClusterIndex = 0; + for( int i = mnGlyphCount; --i >= 0; ++pG ) + { + // use cluster start to get char index +@@ -840,7 +833,7 @@ bool GenericSalLayout::GetCharWidths( lo + + // ----------------------------------------------------------------------- + +-long GenericSalLayout::FillDXArray( long* pCharWidths ) const ++long GenericSalLayout::FillDXArray( sal_Int32* pCharWidths ) const + { + if( pCharWidths ) + if( !GetCharWidths( pCharWidths ) ) +@@ -915,7 +908,7 @@ void GenericSalLayout::ApplyDXArray( Imp + } + + // calculate adjusted cluster widths +- long* pNewGlyphWidths = (long*)alloca( mnGlyphCount * sizeof(long) ); ++ sal_Int32* pNewGlyphWidths = (sal_Int32*)alloca( mnGlyphCount * sizeof(long) ); + for( i = 0; i < mnGlyphCount; ++i ) + pNewGlyphWidths[ i ] = 0; + +@@ -937,7 +930,6 @@ void GenericSalLayout::ApplyDXArray( Imp + long nDelta = 0; + long nNewPos = 0; + pG = mpGlyphItems; +- const GlyphItem* const pGEnd = mpGlyphItems + mnGlyphCount; + for( i = 0; i < mnGlyphCount; ++i, ++pG ) + { + if( pG->IsClusterStart() ) +@@ -1006,7 +998,7 @@ void GenericSalLayout::Justify( long nNe + + // interpolate inbetween glyph positions + int nDiffWidth = nNewWidth - nOldWidth; +- int nDiffSum = 0; ++ int nDeltaSum = 0; + for( pG = mpGlyphItems; (pG < pGRight) && (nStretchable > 0); ++pG ) + { + if( pG->mnOrigWidth <= 0 ) +@@ -1017,12 +1009,11 @@ void GenericSalLayout::Justify( long nNe + --nStretchable; + + pG->mnNewWidth += nDeltaWidth; +- pG->maLinearPos.X() += nDiffSum; +- nDiffSum += nDeltaWidth; ++ pG->maLinearPos.X() += nDeltaSum; ++ nDeltaSum += nDeltaWidth; + } + } + +- + // ----------------------------------------------------------------------- + + void GenericSalLayout::ApplyAsianKerning( const sal_Unicode* pStr, int nLength ) +@@ -1140,7 +1131,7 @@ void GenericSalLayout::KashidaJustify( l + + // ----------------------------------------------------------------------- + +-void GenericSalLayout::GetCaretPositions( int nMaxIndex, long* pCaretXArray ) const ++void GenericSalLayout::GetCaretPositions( int nMaxIndex, sal_Int32* pCaretXArray ) const + { + // initialize result array + long nXPos = -1; +@@ -1176,7 +1167,7 @@ void GenericSalLayout::GetCaretPositions + int GenericSalLayout::GetTextBreak( long nMaxWidth, long nCharExtra, int nFactor ) const + { + int nCharCapacity = mnEndCharPos - mnMinCharPos; +- long* pCharWidths = (long*)alloca( nCharCapacity * sizeof(long) ); ++ sal_Int32* pCharWidths = (sal_Int32*)alloca( nCharCapacity * sizeof(sal_Int32) ); + if( !GetCharWidths( pCharWidths ) ) + return STRING_LEN; + +@@ -1194,8 +1185,8 @@ int GenericSalLayout::GetTextBreak( long + + // ----------------------------------------------------------------------- + +-int GenericSalLayout::GetNextGlyphs( int nLen, long* pGlyphs, Point& rPos, +- int& nStart, long* pGlyphAdvAry, int* pCharPosAry ) const ++int GenericSalLayout::GetNextGlyphs( int nLen, sal_Int32* pGlyphs, Point& rPos, ++ int& nStart, sal_Int32* pGlyphAdvAry, int* pCharPosAry ) const + { + const GlyphItem* pG = mpGlyphItems + nStart; + +@@ -1411,7 +1402,7 @@ void MultiSalLayout::AdjustLayout( ImplL + mpLayouts[n]->SalLayout::AdjustLayout( aMultiArgs ); + // then we can measure the unmodified metrics + int nCharCount = rArgs.mnEndCharPos - rArgs.mnMinCharPos; +- long* pJustificationArray = (long*)alloca( nCharCount * sizeof(long) ); ++ sal_Int32* pJustificationArray = (sal_Int32*)alloca( nCharCount * sizeof(sal_Int32) ); + FillDXArray( pJustificationArray ); + // #i17359# multilayout is not simplified yet, so calculating the + // unjustified width needs handholding; also count the number of +@@ -1456,11 +1447,11 @@ void MultiSalLayout::AdjustLayout( ImplL + int nStartOld[ MAX_FALLBACK ]; + int nStartNew[ MAX_FALLBACK ]; + int nCharPos[ MAX_FALLBACK ]; +- long nGlyphAdv[ MAX_FALLBACK ]; ++ sal_Int32 nGlyphAdv[ MAX_FALLBACK ]; + int nValid[ MAX_FALLBACK ]; + const ImplLayoutRuns& rLastLevelRuns = maFallbackRuns[ mnLevel-1 ]; + +- long nDummy; ++ sal_Int32 nDummy; + Point aPos; + int nLevel = 0, n; + for( n = 0; n < mnLevel; ++n ) +@@ -1501,6 +1492,7 @@ void MultiSalLayout::AdjustLayout( ImplL + + // merge the fallback levels + long nXPos = 0; ++ int nFallbackUnitsPerPixel = 1; + for( n = 0; n < nLevel; ++n ) + maFallbackRuns[n].ResetPos(); + while( nValid[0] ) +@@ -1515,9 +1507,10 @@ void MultiSalLayout::AdjustLayout( ImplL + { + // use base(n==0) or fallback(n>=1) level + long nNewPos = nXPos; +- if( mpLayouts[n]->GetUnitsPerPixel() != mnUnitsPerPixel ) ++ nFallbackUnitsPerPixel = mpLayouts[n]->GetUnitsPerPixel(); ++ if( nFallbackUnitsPerPixel != mnUnitsPerPixel ) + { +- nNewPos *= mpLayouts[n]->GetUnitsPerPixel(); ++ nNewPos *= nFallbackUnitsPerPixel; + nNewPos /= mnUnitsPerPixel; + } + mpLayouts[n]->MoveGlyph( nStartOld[n], nNewPos ); +@@ -1530,12 +1523,19 @@ void MultiSalLayout::AdjustLayout( ImplL + n = 0; // keep NotDef in base level + else + n = -1; // drop NotDef in base level ++ nFallbackUnitsPerPixel = mnUnitsPerPixel; + } + + if( n >= 0 ) + { + // use glyph from best matching layout +- nXPos += nGlyphAdv[n] * mnUnitsPerPixel / mpLayouts[n]->GetUnitsPerPixel(); ++ int nCurrentGlyphAdv = nGlyphAdv[n]; ++ if( nFallbackUnitsPerPixel != mnUnitsPerPixel ) ++ { ++ nCurrentGlyphAdv *= mnUnitsPerPixel; ++ nCurrentGlyphAdv /= nFallbackUnitsPerPixel; ++ } ++ nXPos += nCurrentGlyphAdv; + + // complete this glyph cluster, then advance to next + for( int nActivePos = nCharPos[0];; ) +@@ -1545,7 +1545,13 @@ void MultiSalLayout::AdjustLayout( ImplL + nStartNew[n], &nGlyphAdv[n], &nCharPos[n] ); + if( !nValid[n] || (nCharPos[n] != nActivePos) ) + break; +- nXPos += nGlyphAdv[n] * mnUnitsPerPixel / mpLayouts[n]->GetUnitsPerPixel(); ++ int nCurrentGlyphAdv = nGlyphAdv[n]; ++ if( nFallbackUnitsPerPixel != mnUnitsPerPixel ) ++ { ++ nCurrentGlyphAdv *= mnUnitsPerPixel; ++ nCurrentGlyphAdv /= nFallbackUnitsPerPixel; ++ } ++ nXPos += nCurrentGlyphAdv; + } + + // performance optimization (fallback level is completed) +@@ -1557,7 +1563,7 @@ void MultiSalLayout::AdjustLayout( ImplL + { + // drop NotDef glyph from base layout + mpLayouts[0]->DropGlyph( nStartOld[0] ); +- mpLayouts[0]->MoveGlyph( nStartNew[0], nXPos*mpLayouts[0]->GetUnitsPerPixel()/mnUnitsPerPixel ); ++ mpLayouts[0]->MoveGlyph( nStartNew[0], nXPos ); + + // get next glyph in base layout + nStartOld[0] = nStartNew[0]; +@@ -1613,7 +1619,7 @@ int MultiSalLayout::GetTextBreak( long n + return mpLayouts[0]->GetTextBreak( nMaxWidth, nCharExtra, nFactor ); + + int nCharCount = mnEndCharPos - mnMinCharPos; +- long* pCharWidths = (long*)alloca( 2*nCharCount * sizeof(long) ); ++ sal_Int32* pCharWidths = (sal_Int32*)alloca( 2*nCharCount * sizeof(sal_Int32) ); + mpLayouts[0]->FillDXArray( pCharWidths ); + + for( int n = 1; n < mnLevel; ++n ) +@@ -1642,18 +1648,18 @@ int MultiSalLayout::GetTextBreak( long n + + // ----------------------------------------------------------------------- + +-long MultiSalLayout::FillDXArray( long* pCharWidths ) const ++long MultiSalLayout::FillDXArray( sal_Int32* pCharWidths ) const + { + long nMaxWidth = 0; + + // prepare merging of fallback levels +- long* pTempWidths = NULL; ++ sal_Int32* pTempWidths = NULL; + const int nCharCount = mnEndCharPos - mnMinCharPos; + if( pCharWidths ) + { + for( int i = 0; i < nCharCount; ++i ) + pCharWidths[i] = 0; +- pTempWidths = (long*)alloca( nCharCount * sizeof(long) ); ++ pTempWidths = (sal_Int32*)alloca( nCharCount * sizeof(sal_Int32) ); + } + + for( int n = mnLevel; --n >= 0; ) +@@ -1663,11 +1669,8 @@ long MultiSalLayout::FillDXArray( long* + if( !nWidth ) + continue; + // merge results from current level +- if( mnUnitsPerPixel != mpLayouts[n]->GetUnitsPerPixel() ) +- { +- nWidth *= mnUnitsPerPixel; +- nWidth /= mpLayouts[n]->GetUnitsPerPixel(); +- } ++ nWidth *= mnUnitsPerPixel; ++ nWidth /= mpLayouts[n]->GetUnitsPerPixel(); + if( nMaxWidth < nWidth ) + nMaxWidth = nWidth; + if( !pCharWidths ) +@@ -1693,14 +1696,14 @@ long MultiSalLayout::FillDXArray( long* + + // ----------------------------------------------------------------------- + +-void MultiSalLayout::GetCaretPositions( int nMaxIndex, long* pCaretXArray ) const ++void MultiSalLayout::GetCaretPositions( int nMaxIndex, sal_Int32* pCaretXArray ) const + { + SalLayout& rLayout = *mpLayouts[ 0 ]; + rLayout.GetCaretPositions( nMaxIndex, pCaretXArray ); + + if( mnLevel > 1 ) + { +- long* pTempPos = (long*)alloca( nMaxIndex * sizeof(long) ); ++ sal_Int32* pTempPos = (sal_Int32*)alloca( nMaxIndex * sizeof(sal_Int32) ); + for( int n = 1; n < mnLevel; ++n ) + { + mpLayouts[ n ]->GetCaretPositions( nMaxIndex, pTempPos ); +@@ -1718,8 +1721,8 @@ void MultiSalLayout::GetCaretPositions( + + // ----------------------------------------------------------------------- + +-int MultiSalLayout::GetNextGlyphs( int nLen, long* pGlyphIdxAry, Point& rPos, +- int& nStart, long* pGlyphAdvAry, int* pCharPosAry ) const ++int MultiSalLayout::GetNextGlyphs( int nLen, sal_Int32* pGlyphIdxAry, Point& rPos, ++ int& nStart, sal_Int32* pGlyphAdvAry, int* pCharPosAry ) const + { + // for multi-level fallback only single glyphs should be used + if( mnLevel > 1 && nLen > 1 ) +Index: vcl/source/gdi/salmisc.cxx +=================================================================== +RCS file: /cvs/gsl/vcl/source/gdi/salmisc.cxx,v +retrieving revision 1.3 +retrieving revision 1.4 +diff -u -p -u -r1.3 -r1.4 +--- vcl/source/gdi/salmisc.cxx 17 Jan 2002 15:35:33 -0000 1.3 ++++ vcl/source/gdi/salmisc.cxx 6 Jan 2004 13:56:04 -0000 1.4 +@@ -89,7 +89,7 @@ break + #define DOUBLE_SCANLINES() \ + while( ( nActY < nHeight1 ) && ( pMapY[ nActY + 1 ] == nMapY ) ) \ + { \ +- HMEMCPY( pDstScanMap[ nActY + 1L ], pDstScan, rDstBuffer.mnScanlineSize ); \ ++ memcpy( pDstScanMap[ nActY + 1L ], pDstScan, rDstBuffer.mnScanlineSize ); \ + nActY++; \ + } + +Index: vcl/source/gdi/salnativewidgets-none.cxx +=================================================================== +RCS file: vcl/source/gdi/salnativewidgets-none.cxx +diff -N vcl/source/gdi/salnativewidgets-none.cxx +--- /dev/null 1 Jan 1970 00:00:00 -0000 ++++ vcl/source/gdi/salnativewidgets-none.cxx 10 May 2004 15:49:20 -0000 1.2 +@@ -0,0 +1,172 @@ ++/************************************************************************* ++ * ++ * ++ * ++ * ++ * ++ * ++ * ++ * The Contents of this file are made available subject to the terms of ++ * either of the following licenses ++ * ++ * - GNU Lesser General Public License Version 2.1 ++ * - Sun Industry Standards Source License Version 1.1 ++ * ++ * Sun Microsystems Inc., October, 2000 ++ * ++ * GNU Lesser General Public License Version 2.1 ++ * ============================================= ++ * Copyright 2000 by Sun Microsystems, Inc. ++ * 901 San Antonio Road, Palo Alto, CA 94303, USA ++ * ++ * This library is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU Lesser General Public ++ * License version 2.1, as published by the Free Software Foundation. ++ * ++ * This library is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * Lesser General Public License for more details. ++ * ++ * You should have received a copy of the GNU Lesser General Public ++ * License along with this library; if not, write to the Free Software ++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, ++ * MA 02111-1307 USA ++ * ++ * ++ * Sun Industry Standards Source License Version 1.1 ++ * ================================================= ++ * The contents of this file are subject to the Sun Industry Standards ++ * Source License Version 1.1 (the "License"); You may not use this file ++ * except in compliance with the License. You may obtain a copy of the ++ * License at http://www.openoffice.org/license.html. ++ * ++ * Software provided under this License is provided on an "AS IS" basis, ++ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, ++ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, ++ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. ++ * See the License for the specific provisions governing your rights and ++ * obligations concerning the Software. ++ * ++ * The Initial Developer of the Original Code is: Sun Microsystems, Inc. ++ * ++ * Copyright: 2000 by Sun Microsystems, Inc. ++ * ++ * All Rights Reserved. ++ * ++ * Contributor(s): Juergen Keil ++ * ++ * ++ ************************************************************************/ ++ ++#include <salgdi.hxx> ++ ++using namespace rtl; ++ ++/**************************************************************** ++ * Placeholder for no native widgets ++ ***************************************************************/ ++ ++ ++/* ++ * IsNativeControlSupported() ++ * ++ * Returns TRUE if the platform supports native ++ * drawing of the control defined by nPart ++ */ ++BOOL SalGraphics::IsNativeControlSupported( ControlType nType, ControlPart nPart ) ++{ ++ return( FALSE ); ++} ++ ++ ++/* ++ * HitTestNativeControl() ++ * ++ * If the return value is TRUE, bIsInside contains information whether ++ * aPos was or was not inside the native widget specified by the ++ * nType/nPart combination. ++ */ ++BOOL SalGraphics::hitTestNativeControl( ControlType nType, ++ ControlPart nPart, ++ const Region& rControlRegion, ++ const Point& aPos, ++ SalControlHandle& rControlHandle, ++ BOOL& rIsInside ) ++{ ++ return( FALSE ); ++} ++ ++ ++/* ++ * DrawNativeControl() ++ * ++ * Draws the requested control described by nPart/nState. ++ * ++ * rControlRegion: The bounding region of the complete control in VCL frame coordinates. ++ * aValue: An optional value (tristate/numerical/string) ++ * rControlHandle: Carries platform dependent data and is maintained by the SalFrame implementation. ++ * aCaption: A caption or title string (like button text etc) ++ */ ++BOOL SalGraphics::drawNativeControl( ControlType nType, ++ ControlPart nPart, ++ const Region& rControlRegion, ++ ControlState nState, ++ const ImplControlValue& aValue, ++ SalControlHandle& rControlHandle, ++ OUString aCaption ) ++{ ++ return( FALSE ); ++} ++ ++ ++/* ++ * DrawNativeControlText() ++ * ++ * OPTIONAL. Draws the requested text for the control described by nPart/nState. ++ * Used if text not drawn by DrawNativeControl(). ++ * ++ * rControlRegion: The bounding region of the complete control in VCL frame coordinates. ++ * aValue: An optional value (tristate/numerical/string) ++ * rControlHandle: Carries platform dependent data and is maintained by the SalFrame implementation. ++ * aCaption: A caption or title string (like button text etc) ++ */ ++BOOL SalGraphics::drawNativeControlText( ControlType nType, ++ ControlPart nPart, ++ const Region& rControlRegion, ++ ControlState nState, ++ const ImplControlValue& aValue, ++ SalControlHandle& rControlHandle, ++ OUString aCaption ) ++{ ++ return( FALSE ); ++} ++ ++ ++/* ++ * GetNativeControlRegion() ++ * ++ * If the return value is TRUE, rNativeBoundingRegion ++ * contains the TRUE bounding region covered by the control ++ * including any adornment, while rNativeContentRegion contains the area ++ * within the control that can be safely drawn into without drawing over ++ * the borders of the control. ++ * ++ * rControlRegion: The bounding region of the control in VCL frame coordinates. ++ * aValue: An optional value (tristate/numerical/string) ++ * rControlHandle: Carries platform dependent data and is maintained by the SalFrame implementation. ++ * aCaption: A caption or title string (like button text etc) ++ */ ++BOOL SalGraphics::getNativeControlRegion( ControlType nType, ++ ControlPart nPart, ++ const Region& rControlRegion, ++ ControlState nState, ++ const ImplControlValue& aValue, ++ SalControlHandle& rControlHandle, ++ OUString aCaption, ++ Region &rNativeBoundingRegion, ++ Region &rNativeContentRegion ) ++{ ++ return( FALSE ); ++} ++ +Index: vcl/source/gdi/svcompat.cxx +=================================================================== +RCS file: /cvs/gsl/vcl/source/gdi/svcompat.cxx,v +retrieving revision 1.1.1.1 +retrieving revision 1.2 +diff -u -p -u -r1.1.1.1 -r1.2 +--- vcl/source/gdi/svcompat.cxx 18 Sep 2000 17:05:38 -0000 1.1.1.1 ++++ vcl/source/gdi/svcompat.cxx 6 Jan 2004 13:56:30 -0000 1.2 +@@ -58,8 +58,6 @@ + * + * + ************************************************************************/ +- +-#define _SV_COMPAT_CXX + + #ifndef _STREAM_HXX + #include <tools/stream.hxx> +Index: vcl/source/gdi/virdev.cxx +=================================================================== +RCS file: /cvs/gsl/vcl/source/gdi/virdev.cxx,v +retrieving revision 1.9 +retrieving revision 1.14 +diff -u -p -u -r1.9 -r1.14 +--- vcl/source/gdi/virdev.cxx 2 May 2003 14:36:42 -0000 1.9 ++++ vcl/source/gdi/virdev.cxx 6 Jan 2004 13:57:02 -0000 1.14 +@@ -59,13 +59,10 @@ + * + ************************************************************************/ + +-#define _SV_VIRDEV_CXX +- + #ifndef _SV_SVSYS_HXX + #include <svsys.h> + #endif + +-#ifndef REMOTE_APPSERVER + #ifndef _SV_SALINST_HXX + #include <salinst.hxx> + #endif +@@ -78,7 +75,6 @@ + #ifndef _SV_SALVD_HXX + #include <salvd.hxx> + #endif +-#endif + + #ifndef _DEBUG_HXX + #include <tools/debug.hxx> +@@ -104,52 +100,6 @@ + + using namespace ::com::sun::star::uno; + +-// appserver +-#ifdef REMOTE_APPSERVER +-#ifndef _SV_RMOUTDEV_HXX +-#include <rmoutdev.hxx> +-#endif +-#ifndef _SV_RMVIRDEV_HXX +-#include <rmvirdev.hxx> +-#endif +-#ifndef _VCL_RMCACHE_HXX_ +-#include <rmcache.hxx> +-#endif +-#endif +- +-// ======================================================================= +- +-// interface cache +-#ifdef REMOTE_APPSERVER +- +-static ::vcl::InterfacePairCache< ::com::sun::star::portal::client::XRmVirtualDevice, ::com::sun::star::portal::client::XRmOutputDevice >* pRemoteVirdevCache = NULL; +- +-typedef ::std::pair< ::com::sun::star::uno::Reference< ::com::sun::star::portal::client::XRmVirtualDevice >, ::com::sun::star::uno::Reference< ::com::sun::star::portal::client::XRmOutputDevice > > virdevInterfacePair; +- +- +-void createRemoteVirdevCache( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aInterfaceSeq ) +-{ +- if( ! pRemoteVirdevCache ) +- { +- ImplSVData* pSVData = ImplGetSVData(); +- pRemoteVirdevCache = new ::vcl::InterfacePairCache< ::com::sun::star::portal::client::XRmVirtualDevice, ::com::sun::star::portal::client::XRmOutputDevice >( +- pSVData->mxMultiFactory, +- aInterfaceSeq, +- ::rtl::OUString::createFromAscii( "OfficeVirtualDevice.stardiv.de" ), 10, 40 ); +- } +-} +- +-void eraseRemoteVirdevCache() +-{ +- if( pRemoteVirdevCache ) +- { +- delete pRemoteVirdevCache; +- pRemoteVirdevCache = NULL; +- } +-} +- +-#endif +- + // ======================================================================= + + void VirtualDevice::ImplInitVirDev( const OutputDevice* pOutDev, +@@ -169,7 +119,6 @@ void VirtualDevice::ImplInitVirDev( cons + if ( !pOutDev ) + pOutDev = ImplGetDefaultWindow(); + +-#ifndef REMOTE_APPSERVER + SalGraphics* pGraphics; + if ( !pOutDev->mpGraphics ) + ((OutputDevice*)pOutDev)->ImplGetGraphics(); +@@ -180,62 +129,13 @@ void VirtualDevice::ImplInitVirDev( cons + mpVirDev = NULL; + if ( !mpVirDev ) + GetpApp()->Exception( EXC_SYSOBJNOTCREATED ); +-#else +- +- if( pOutDev->GetOutDevType() == OUTDEV_PRINTER || ! mpVirDev ) +- { +- virdevInterfacePair aPair = pRemoteVirdevCache->takeInterface(); +- if( aPair.first.is() && aPair.second.is() ) +- { +- if( ! mpVirDev ) +- mpVirDev = new RmVirtualDevice; +- mpVirDev->SetInterface( aPair.first ); +- mpVirDev->Create( (ULONG) pOutDev, nDX, nDY, nBitCount ); +- +- if( ! mpGraphics ) +- mpGraphics = new ImplServerGraphics(); +- mpGraphics->SetInterface( aPair.second ); +- } +- } +- else +- { +- // this was done in ImpGetServerGraphics before +- // and is now here because of interface caching +- if( mpGraphics && mpGraphics->GetInterface().is() ) +- { +- try +- { +- CHECK_FOR_RVPSYNC_NORMAL(); +- mpGraphics->GetInterface()->SetFillColor( mpGraphics->maFillColor.GetColor() ); +- } +- catch (...) +- { +- if( mpGraphics ) +- delete mpGraphics, mpGraphics = NULL; +- +- if( mpVirDev ) +- { +- virdevInterfacePair aPair = pRemoteVirdevCache->takeInterface(); +- if( aPair.first.is() && aPair.second.is() ) +- { +- mpVirDev->SetInterface( aPair.first ); +- mpVirDev->Create( (ULONG)NULL, mnOutWidth, mnOutHeight, mnBitCount ); +- mpGraphics = new ImplServerGraphics(); +- mpGraphics->SetInterface( aPair.second ); +- } +- else +- mpVirDev->SetInterface( REF( NMSP_CLIENT::XRmVirtualDevice )() ); +- } +- } +- } +- ImplGetServerGraphics( TRUE ); +- } +-#endif + + mnBitCount = ( nBitCount ? nBitCount : pOutDev->GetBitCount() ); + mnOutWidth = nDX; + mnOutHeight = nDY; + mbScreenComp = TRUE; ++ mbScreenComp = FALSE; ++ mnAlphaDepth = -1; + + if( mnBitCount < 8 ) + SetAntialiasing( ANTIALIASING_DISABLE_TEXT ); +@@ -270,7 +170,8 @@ void VirtualDevice::ImplInitVirDev( cons + // ----------------------------------------------------------------------- + + VirtualDevice::VirtualDevice( USHORT nBitCount ) +- : mpVirDev( NULL ) ++: mpVirDev( NULL ), ++ meRefDevMode( REFDEV_NONE ) + { + DBG_TRACE1( "VirtualDevice::VirtualDevice( %hu )", nBitCount ); + +@@ -280,11 +181,25 @@ VirtualDevice::VirtualDevice( USHORT nBi + // ----------------------------------------------------------------------- + + VirtualDevice::VirtualDevice( const OutputDevice& rCompDev, USHORT nBitCount ) ++ : mpVirDev( NULL ), ++ meRefDevMode( REFDEV_NONE ) ++{ ++ DBG_TRACE1( "VirtualDevice::VirtualDevice( %hu )", nBitCount ); ++ ++ ImplInitVirDev( &rCompDev, 1, 1, nBitCount ); ++} ++ ++// ----------------------------------------------------------------------- ++ ++VirtualDevice::VirtualDevice( const OutputDevice& rCompDev, USHORT nBitCount, USHORT nAlphaBitCount ) + : mpVirDev( NULL ) + { + DBG_TRACE1( "VirtualDevice::VirtualDevice( %hu )", nBitCount ); + + ImplInitVirDev( &rCompDev, 1, 1, nBitCount ); ++ ++ // #110958# Enable alpha channel ++ mnAlphaDepth = nAlphaBitCount; + } + + // ----------------------------------------------------------------------- +@@ -295,33 +210,10 @@ VirtualDevice::~VirtualDevice() + + ImplSVData* pSVData = ImplGetSVData(); + +-#ifndef REMOTE_APPSERVER + ImplReleaseGraphics(); + + if ( mpVirDev ) + pSVData->mpDefInst->DestroyVirtualDevice( mpVirDev ); +-#else +- if ( pRemoteVirdevCache && mpVirDev && mpGraphics ) +- { +- virdevInterfacePair aPair( mpVirDev->GetInterface(), mpGraphics->GetInterface() ); +- CHECK_FOR_RVPSYNC_NORMAL(); +- try +- { +- aPair.first->Create( 0, 0, 0, 0 ); +- pRemoteVirdevCache->putInterface( aPair ); +- } +- catch ( RuntimeException &e ) +- { +- rvpExceptionHandler(); +- } +- } +- +- REF( NMSP_CLIENT::XRmOutputDevice ) aTmp; +- mpGraphics->SetInterface( aTmp ); +- ImplReleaseServerGraphics(); +- delete mpVirDev; +- delete mpGraphics; +-#endif + + // VirDev aus der Liste eintragen + if( mpPrev ) +@@ -337,9 +229,9 @@ VirtualDevice::~VirtualDevice() + + // ----------------------------------------------------------------------- + +-BOOL VirtualDevice::SetOutputSizePixel( const Size& rNewSize, BOOL bErase ) ++BOOL VirtualDevice::ImplSetOutputSizePixel( const Size& rNewSize, BOOL bErase ) + { +- DBG_TRACE3( "VirtualDevice::SetOutputSizePixel( %ld, %ld, %d )", rNewSize.Width(), rNewSize.Height(), (int)bErase ); ++ DBG_TRACE3( "VirtualDevice::ImplSetOutputSizePixel( %ld, %ld, %d )", rNewSize.Width(), rNewSize.Height(), (int)bErase ); + + if ( !mpVirDev ) + return FALSE; +@@ -350,33 +242,6 @@ BOOL VirtualDevice::SetOutputSizePixel( + return TRUE; + } + +-#ifdef REMOTE_APPSERVER +- long nOldWidth = mnOutWidth, nOldHeight = mnOutHeight; +- +- try +- { +- mnOutWidth = rNewSize.Width(); +- mnOutHeight = rNewSize.Height(); +- mpVirDev->ResizeOutputSizePixel( mnOutWidth, mnOutHeight ); +- } +- catch (...) +- { +- delete mpVirDev, mpVirDev = NULL; +- ImplInitVirDev( NULL, mnOutWidth, mnOutHeight, mnBitCount ); +- } +- +- if( bErase ) +- Erase(); +- else +- { +- if ( nOldWidth < mnOutWidth ) +- Erase( Rectangle( Point( nOldWidth, 0 ), Size( mnOutWidth-nOldWidth, Max( nOldHeight, mnOutHeight ) ) ) ); +- if ( nOldHeight< mnOutHeight ) +- Erase( Rectangle( Point( 0, nOldHeight ), Size( Max( nOldWidth, mnOutWidth ), mnOutHeight-nOldHeight ) ) ); +- } +- +- return TRUE; +-#else + BOOL bRet; + long nNewWidth = rNewSize.Width(), nNewHeight = rNewSize.Height(); + +@@ -455,16 +320,79 @@ BOOL VirtualDevice::SetOutputSizePixel( + } + + return bRet; +-#endif + } + +-void VirtualDevice::SetReferenceDevice() ++// ----------------------------------------------------------------------- ++ ++BOOL VirtualDevice::SetOutputSizePixel( const Size& rNewSize, BOOL bErase ) + { +- // reference device has 600dpi +- mnDPIX = 600; +- mnDPIY = 600; ++ if( ImplSetOutputSizePixel(rNewSize, bErase) ) ++ { ++ if( mnAlphaDepth != -1 ) ++ { ++ // #110958# Setup alpha bitmap ++ if(mpAlphaVDev && mpAlphaVDev->GetOutputSizePixel() != rNewSize) ++ { ++ delete mpAlphaVDev; ++ mpAlphaVDev = 0L; ++ } ++ ++ if( !mpAlphaVDev ) ++ { ++ mpAlphaVDev = new VirtualDevice( *this, mnAlphaDepth ); ++ mpAlphaVDev->ImplSetOutputSizePixel(rNewSize, bErase); ++ } ++ ++ // TODO: copy full outdev state to new one, here. Also needed in outdev2.cxx:DrawOutDev ++ if( GetLineColor() != Color( COL_TRANSPARENT ) ) ++ mpAlphaVDev->SetLineColor( COL_BLACK ); ++ ++ if( GetFillColor() != Color( COL_TRANSPARENT ) ) ++ mpAlphaVDev->SetFillColor( COL_BLACK ); ++ ++ mpAlphaVDev->SetMapMode( GetMapMode() ); ++ } ++ ++ return TRUE; ++ } ++ ++ return FALSE; ++} ++ ++// ----------------------------------------------------------------------- ++ ++void VirtualDevice::SetReferenceDevice( RefDevMode eRefDevMode ) ++{ ++ switch( eRefDevMode ) ++ { ++ case REFDEV_NONE: ++ default: ++ DBG_ASSERT( FALSE, "VDev::SetRefDev illegal argument!" ); ++ // fall through ++ case REFDEV_MODE06: ++ mnDPIX = mnDPIY = 600; ++ break; ++ case REFDEV_MODE48: ++ mnDPIX = mnDPIY = 4800; ++ break; ++ case REFDEV_MODE96: ++ mnDPIX = mnDPIY = 9600; ++ break; ++ } ++ ++ EnableOutput( FALSE ); // prevent output on reference device + mbScreenComp = FALSE; + ++ // invalidate currently selected fonts ++ mbInitFont = TRUE; ++ mbNewFont = TRUE; ++ ++ // avoid adjusting font lists when already in refdev mode ++ BYTE nOldRefDevMode = meRefDevMode; ++ meRefDevMode = (BYTE)eRefDevMode; ++ if( nOldRefDevMode != REFDEV_NONE ) ++ return; ++ + // the reference device should have only scalable fonts + // => clean up the original font lists before getting new ones + if ( mpFontEntry ) +@@ -491,6 +419,7 @@ void VirtualDevice::SetReferenceDevice() + delete mpFontCache; + + // get font list with scalable fonts only ++ ImplGetGraphics(); + ImplDevFontList* pScalableDevFonts = new ImplDevFontList(); + ImplDevFontListData* pData = pSVData->maGDIData.mpScreenFontList->First(); + for(; pData; pData = pSVData->maGDIData.mpScreenFontList->Next() ) +@@ -506,13 +435,11 @@ void VirtualDevice::SetReferenceDevice() + pScalableDevFonts->Add( pNewData ); + } + } +- mpFontList = pScalableDevFonts; + + // prepare to use new font lists ++ mpFontList = pScalableDevFonts; + mpFontCache = new ImplFontCache( FALSE ); +- mbInitFont = TRUE; +- mbNewFont = TRUE; +- +- // TODO: increase maFont's size accordingly? + } + ++// ----------------------------------------------------------------------- ++// eof +Index: vcl/source/gdi/wall.cxx +=================================================================== +RCS file: /cvs/gsl/vcl/source/gdi/wall.cxx,v +retrieving revision 1.1.1.1 +retrieving revision 1.2 +diff -u -p -u -r1.1.1.1 -r1.2 +--- vcl/source/gdi/wall.cxx 18 Sep 2000 17:05:39 -0000 1.1.1.1 ++++ vcl/source/gdi/wall.cxx 6 Jan 2004 13:57:32 -0000 1.2 +@@ -59,8 +59,6 @@ + * + ************************************************************************/ + +-#define _SV_WALL_CXX +- + #ifndef _STREAM_HXX + #include <tools/stream.hxx> + #endif +@@ -79,8 +77,10 @@ + #ifndef _SV_WALL_HXX + #include <wall.hxx> + #endif ++#ifndef _SV_WALL2_HXX ++#include <wall2.hxx> ++#endif + +-// ======================================================================= + + DBG_NAME( Wallpaper ); + +@@ -259,11 +259,7 @@ Wallpaper::Wallpaper() + { + DBG_CTOR( Wallpaper, NULL ); + +-#ifdef WIN +- static ImplWallpaper _near aStaticImplWallpaper; +-#else + static ImplWallpaper aStaticImplWallpaper; +-#endif + + aStaticImplWallpaper.mnRefCount = 0; + mpImplWallpaper = &aStaticImplWallpaper; +@@ -349,6 +345,15 @@ void Wallpaper::SetColor( const Color& r + + // ----------------------------------------------------------------------- + ++const Color& Wallpaper::GetColor() const ++{ ++ DBG_CHKTHIS( Wallpaper, NULL ); ++ ++ return mpImplWallpaper->maColor; ++} ++ ++// ----------------------------------------------------------------------- ++ + void Wallpaper::SetStyle( WallpaperStyle eStyle ) + { + DBG_CHKTHIS( Wallpaper, NULL ); +@@ -359,6 +364,15 @@ void Wallpaper::SetStyle( WallpaperStyle + + // ----------------------------------------------------------------------- + ++WallpaperStyle Wallpaper::GetStyle() const ++{ ++ DBG_CHKTHIS( Wallpaper, NULL ); ++ ++ return mpImplWallpaper->meStyle; ++} ++ ++// ----------------------------------------------------------------------- ++ + void Wallpaper::SetBitmap( const BitmapEx& rBitmap ) + { + DBG_CHKTHIS( Wallpaper, NULL ); +@@ -416,6 +430,16 @@ BitmapEx Wallpaper::GetBitmap() const + + // ----------------------------------------------------------------------- + ++BOOL Wallpaper::IsBitmap() const ++{ ++ DBG_CHKTHIS( Wallpaper, NULL ); ++ ++ return (mpImplWallpaper->mpBitmap != 0); ++} ++ ++ ++// ----------------------------------------------------------------------- ++ + void Wallpaper::SetGradient( const Gradient& rGradient ) + { + DBG_CHKTHIS( Wallpaper, NULL ); +@@ -462,6 +486,16 @@ Gradient Wallpaper::GetGradient() const + + // ----------------------------------------------------------------------- + ++BOOL Wallpaper::IsGradient() const ++{ ++ DBG_CHKTHIS( Wallpaper, NULL ); ++ ++ return (mpImplWallpaper->mpGradient != 0); ++} ++ ++ ++// ----------------------------------------------------------------------- ++ + void Wallpaper::SetRect( const Rectangle& rRect ) + { + DBG_CHKTHIS( Wallpaper, NULL ); +@@ -513,6 +547,16 @@ Rectangle Wallpaper::GetRect() const + return aRect; + } + } ++ ++// ----------------------------------------------------------------------- ++ ++BOOL Wallpaper::IsRect() const ++{ ++ DBG_CHKTHIS( Wallpaper, NULL ); ++ ++ return (mpImplWallpaper->mpRect != 0); ++} ++ + + // ----------------------------------------------------------------------- + +Index: vcl/source/gdi/makefile.mk +=================================================================== +RCS file: /cvs/gsl/vcl/source/gdi/makefile.mk,v +retrieving revision 1.14 +diff -u -p -u -r1.14 makefile.mk +--- vcl/source/gdi/makefile.mk 27 Mar 2003 17:57:58 -0000 1.14 ++++ vcl/source/gdi/makefile.mk 5 Jul 2004 14:27:07 -0000 +@@ -132,37 +132,18 @@ SLOFILES= $(SLO)$/salmisc.obj \ + $(SLO)$/fontcfg.obj \ + $(SLO)$/base14.obj \ + $(SLO)$/pdfwriter.obj \ + $(SLO)$/pdfwriter_impl.obj\ +- $(SLO)$/bmpconv.obj ++ $(SLO)$/sallayout.obj \ ++ $(SLO)$/salgdilayout.obj \ ++ $(SLO)$/salnativewidgets-none.obj \ ++ $(SLO)$/bmpconv.obj \ ++ $(SLO)$/pngread.obj + +-.IF "$(remote)"=="" +- SLOFILES += $(SLO)$/salgdilayout.obj +-.ENDIF +- +-.IF "$(ENABLE_CTL)"!="" +- SLOFILES += $(SLO)$/sallayout.obj +-.ENDIF +- +-.IF "$(remote)"!="" +-EXCEPTIONSFILES= $(SLO)$/bitmap.obj \ +- $(SLO)$/color.obj \ +- $(SLO)$/gfxlink.obj \ +- $(SLO)$/impgraph.obj \ +- $(SLO)$/impvect.obj \ +- $(SLO)$/outdev.obj \ +- $(SLO)$/outdev3.obj \ +- $(SLO)$/outdev6.obj \ +- $(SLO)$/print.obj \ +- $(SLO)$/print2.obj \ +- $(SLO)$/virdev.obj +- +-.ELSE + EXCEPTIONSFILES= $(SLO)$/outdev.obj \ + $(SLO)$/gfxlink.obj \ + $(SLO)$/print.obj \ + $(SLO)$/impgraph.obj \ + $(SLO)$/bmpconv.obj +-.ENDIF + + # --- Targets ------------------------------------------------------ + diff --git a/patches/OOO_1_1_2/vcl-source-glyphs.diff b/patches/OOO_1_1_2/vcl-source-glyphs.diff new file mode 100644 index 000000000..b401f7d15 --- /dev/null +++ b/patches/OOO_1_1_2/vcl-source-glyphs.diff @@ -0,0 +1,792 @@ +Index: vcl/source/glyphs/gcach_ftyp.cxx +=================================================================== +RCS file: /cvs/gsl/vcl/source/glyphs/gcach_ftyp.cxx,v +retrieving revision 1.98.20.2 +diff -u -p -u -r1.98.20.2 gcach_ftyp.cxx +--- vcl/source/glyphs/gcach_ftyp.cxx 28 Jan 2004 15:22:42 -0000 1.98.20.2 ++++ vcl/source/glyphs/gcach_ftyp.cxx 5 Jul 2004 14:01:28 -0000 +@@ -58,13 +59,10 @@ + * + ************************************************************************/ + +-#if defined(WIN32) +-#ifndef _SV_SVSYS_HXX +- ++#ifdef WNT + #include <svsys.h> + #undef CreateFont + #endif +-#endif + + #include <gcach_ftyp.hxx> + +@@ -72,17 +70,25 @@ + #include <outfont.hxx> + #include <bitmap.hxx> + #include <bmpacc.hxx> +-#include <poly.hxx> ++ ++#ifndef _TL_POLY_HXX ++#include <tools/poly.hxx> ++#endif + + #include <osl/file.hxx> + #include <osl/thread.hxx> + +-#include "freetype/freetype.h" +-#include "freetype/ftglyph.h" +-#include "freetype/ftoutln.h" +-#include "freetype/tttables.h" +-#include "freetype/tttags.h" +-#include "freetype/ttnameid.h" ++#ifndef INCLUDED_RTL_INSTANCE_HXX ++#include <rtl/instance.hxx> ++#endif ++ ++#include "ft2build.h" ++#include FT_FREETYPE_H ++#include FT_GLYPH_H ++#include FT_OUTLINE_H ++#include FT_TRUETYPE_TABLES_H ++#include FT_TRUETYPE_TAGS_H ++#include FT_TRUETYPE_IDS_H + + #ifndef FREETYPE_PATCH + // VERSION_MINOR in freetype.h is too coarse +@@ -251,15 +258,22 @@ void FtFontFile::Unmap() + // ======================================================================= + + FtFontInfo::FtFontInfo( const ImplFontData& rFontData, +- const ::rtl::OString& rNativeFileName, int nFaceNum, int nFontId, int nSynthetic ) +-: mpFontFile( FtFontFile::FindFontFile( rNativeFileName ) ), ++ const ::rtl::OString& rNativeFileName, ++ int nFaceNum, int nFontId, int nSynthetic, ++ const unicodeKernMap* pKern ++ ) ++: + maFontData( rFontData ), ++ mpFontFile( FtFontFile::FindFontFile( rNativeFileName ) ), + mnFaceNum( nFaceNum ), +- mnFontId( nFontId ), + mnSynthetic( nSynthetic ), ++ mnFontId( nFontId ), + maFaceFT( NULL ), + mnRefCount( 0 ) + { ++ if( pKern ) ++ maUnicodeKernPairs = *pKern; ++ + maFontData.mpSysData = (void*)nFontId; + maFontData.mpNext = NULL; + +@@ -336,6 +350,43 @@ void FtFontInfo::ReleaseFaceFT( FT_FaceR + } + } + ++void FtFontInfo::CacheGlyphIndex( sal_Unicode cChar, int nGI ) const ++{ ++ maGlyphMap[ cChar ] = nGI; ++ ++ if( maUnicodeKernPairs.size() != maGlyphKernPairs.size() ) ++ { ++ // move kerning to glyph kerning map ++ unicodeKernMap::const_iterator left_it = ++ maUnicodeKernPairs.find( cChar ); ++ std::map< sal_Unicode, int >::const_iterator right_it; ++ for( left_it = maUnicodeKernPairs.begin(); left_it != maUnicodeKernPairs.end(); ++left_it ) ++ { ++ if( left_it->first == cChar ) ++ { ++ for( right_it = left_it->second.begin(); right_it != left_it->second.end(); ++right_it ) ++ { ++ int nRightGlyph = GetGlyphIndex( right_it->first ); ++ if( nRightGlyph != -1 ) ++ maGlyphKernPairs[ nGI ][ nRightGlyph ] = right_it->second; ++ } ++ } ++ else ++ { ++ int nLeftGlyph = GetGlyphIndex( left_it->first ); ++ if( nLeftGlyph != -1 ) ++ { ++ for( right_it = left_it->second.begin(); right_it != left_it->second.end(); ++right_it ) ++ { ++ if( right_it->first == cChar ) ++ maGlyphKernPairs[ nLeftGlyph ][ nGI ] = right_it->second; ++ } ++ } ++ } ++ } ++ } ++} ++ + // ----------------------------------------------------------------------- + + static unsigned GetUInt( const unsigned char* p ) { return((p[0]<<24)+(p[1]<<16)+(p[2]<<8)+p[3]);} +@@ -382,11 +433,10 @@ const unsigned char* FtFontInfo::GetTabl + // ======================================================================= + + FreetypeManager::FreetypeManager() +-: mnNextFontId( 0x1000 ), +- mnMaxFontId( 0 ) ++: mnMaxFontId( 0 ), mnNextFontId( 0x1000 ) + { + FT_Error rcFT = FT_Init_FreeType( &aLibFT ); +- ++ + #ifdef RTLD_DEFAULT // true if a good dlfcn.h header was included + // Get version of freetype library to enable workarounds. + // Freetype <= 2.0.9 does not have FT_Library_Version(). +@@ -449,7 +499,10 @@ void* FreetypeManager::GetFontHandle( in + // ----------------------------------------------------------------------- + + void FreetypeManager::AddFontFile( const rtl::OString& rNormalizedName, +- int nFaceNum, int nFontId, const ImplFontData* pData ) ++ int nFaceNum, int nFontId, ++ const ImplFontData* pData, ++ const unicodeKernMap* pKern ++ ) + { + if( !rNormalizedName.getLength() ) + return; +@@ -457,7 +510,7 @@ void FreetypeManager::AddFontFile( const + if( maFontList.find( nFontId ) != maFontList.end() ) + return; + +- FtFontInfo* pFI = new FtFontInfo( *pData, rNormalizedName, nFaceNum, nFontId, 0 ); ++ FtFontInfo* pFI = new FtFontInfo( *pData, rNormalizedName, nFaceNum, nFontId, 0, pKern ); + maFontList[ nFontId ] = pFI; + if( mnMaxFontId < nFontId ) + mnMaxFontId = nFontId; +@@ -482,8 +535,8 @@ long FreetypeManager::AddFontDir( const + rcOSL = aDirItem.getFileStatus( aFileStatus ); + + ::rtl::OUString aUSytemPath; +- OSL_VERIFY( osl_File_E_None +- == ::osl::FileBase::getSystemPathFromFileURL( aFileStatus.getFileURL(), aUSytemPath )); ++ OSL_VERIFY( osl::FileBase::E_None ++ == osl::FileBase::getSystemPathFromFileURL( aFileStatus.getFileURL(), aUSytemPath )); + ::rtl::OString aCFileName = rtl::OUStringToOString( aUSytemPath, theEncoding ); + const char* pszFontFileName = aCFileName.getStr(); + +@@ -556,8 +609,21 @@ long FreetypeManager::FetchFontList( Imp + for( FontList::const_iterator it(maFontList.begin()); it != maFontList.end(); ++it, ++nCount ) + { + const FtFontInfo& rFFI = *it->second; +- ImplFontData* pFontData = new ImplFontData( rFFI.GetFontData() ); +- pToAdd->Add( pFontData ); ++ rtl::OUString aFamilyName = rFFI.GetFontData().maName; ++ sal_Int32 nIndex = 0; ++ rtl::OUString aAliasNames = rFFI.GetFontData().maMapNames; ++ ++ do ++ { ++ ImplFontData* pFontData = new ImplFontData( rFFI.GetFontData() ); ++ pFontData->maName = aFamilyName; ++ pFontData->maMapNames.Erase(); ++ pToAdd->Add( pFontData ); ++ if( nIndex >= 0 ) ++ aFamilyName = aAliasNames.getToken( 0, ';', nIndex ); ++ else ++ aFamilyName = rtl::OUString(); ++ } while( aFamilyName.getLength() ); + } + + return nCount; +@@ -581,7 +647,7 @@ FreetypeServerFont* FreetypeManager::Cre + if( it != maFontList.end() ) + { + FtFontInfo* pFI = it->second; +- FreetypeServerFont* pFont = new FreetypeServerFont( rFSD, pFI ); ++ FreetypeServerFont* pFont = new FreetypeServerFont( rFSD, pFI, pFI->GetGlyphKernMap(), pFI->GetUnicodeKernMap() ); + return pFont; + } + +@@ -592,8 +658,8 @@ FreetypeServerFont* FreetypeManager::Cre + // FreetypeServerFont + // ======================================================================= + +-FreetypeServerFont::FreetypeServerFont( const ImplFontSelectData& rFSD, FtFontInfo* pFI ) +-: ServerFont( rFSD ), ++FreetypeServerFont::FreetypeServerFont( const ImplFontSelectData& rFSD, FtFontInfo* pFI, const glyphKernMap* pKern, const unicodeKernMap* pUniKern ) ++: ServerFont( rFSD, pKern, pUniKern ), + mpFontInfo( pFI ), + maFaceFT( NULL ), + maSizeFT( NULL ), +@@ -856,23 +944,23 @@ int FreetypeServerFont::ApplyGlyphTransf + case GF_ROTL: // left + nAngle += 900; + bStretched = (mfStretch != 1.0); +- aVector.x = +rMetrics.descender * mfStretch; ++ aVector.x = (long)((double)+rMetrics.descender * mfStretch); + aVector.y = -rMetrics.ascender; +- aMatrix.xx = -nSin / mfStretch; +- aMatrix.yy = -nSin * mfStretch; +- aMatrix.xy = -nCos * mfStretch; +- aMatrix.yx = +nCos / mfStretch; ++ aMatrix.xx = (long)((double)-nSin / mfStretch); ++ aMatrix.yy = (long)((double)-nSin * mfStretch); ++ aMatrix.xy = (long)((double)-nCos * mfStretch); ++ aMatrix.yx = (long)((double)+nCos / mfStretch); + break; + case GF_ROTR: // right + nAngle -= 900; + bStretched = (mfStretch != 1.0); + aVector.x = -maFaceFT->glyph->metrics.horiAdvance; +- aVector.x += (rMetrics.descender * nSin/65536.0); +- aVector.y = -(rMetrics.descender * mfStretch * nCos/65536.0); +- aMatrix.xx = +nSin / mfStretch; +- aMatrix.yy = +nSin * mfStretch; +- aMatrix.xy = +nCos * mfStretch; +- aMatrix.yx = -nCos / mfStretch; ++ aVector.x += (long)((double)rMetrics.descender * nSin/65536.0); ++ aVector.y = -(long)((double)rMetrics.descender * mfStretch * nCos/65536.0); ++ aMatrix.xx = (long)((double)+nSin / mfStretch); ++ aMatrix.yy = (long)((double)+nSin * mfStretch); ++ aMatrix.xy = (long)((double)+nCos * mfStretch); ++ aMatrix.yx = (long)((double)-nCos / mfStretch); + break; + } + +@@ -1049,9 +1137,9 @@ void FreetypeServerFont::InitGlyphData( + if( nGlyphFlags & GF_ROTMASK ) { // for bVertical rotated glyphs + const FT_Size_Metrics& rMetrics = maFaceFT->size->metrics; + #if (FTVERSION < 2000) +- nCharWidth = (rMetrics.height - rMetrics.descender) * mfStretch; ++ nCharWidth = (long)((double)(rMetrics.height - rMetrics.descender) * mfStretch); + #else +- nCharWidth = (rMetrics.height + rMetrics.descender) * mfStretch; ++ nCharWidth = (long)((double)(rMetrics.height + rMetrics.descender) * mfStretch); + #endif + } + rGD.SetCharWidth( (nCharWidth + 32) >> 6 ); +@@ -1314,34 +1402,6 @@ ULONG FreetypeServerFont::GetFontCodeRan + { + int nRangeCount = 0; + +-#if 0 && (FTVERSION >= 2102) +- // TODO: enable new version when it is fast enough for big fonts +- // TODO: implement Get_Next_Missing_Char() and use this +- FT_UInt nGlyphIndex = 0; +- sal_uInt32 aChar = FT_Get_First_Char( maFaceFT, &nGlyphIndex ); +- if( nGlyphIndex ) +- nRangeCount = 1; +- if( pCodes ) +- *(pCodes++) = aChar; // start of first range +- for(;;) +- { +- sal_uInt32 bChar = FT_Get_Next_Char( maFaceFT, aChar, &nGlyphIndex ); +- if( !nGlyphIndex ) +- break; +- if( bChar != aChar+1 ) +- { +- ++nRangeCount; +- if( pCodes ) +- { +- *(pCodes++) = aChar+1; // end of old range +- *(pCodes++) = bChar; // start of new range +- } +- } +- aChar = bChar; +- } +- if( pCodes && nRangeCount ) +- *(pCodes++) = aChar+1; // end of last range +-#else + const unsigned char* pCmap = NULL; + ULONG nLength = 0; + if( FT_IS_SFNT( maFaceFT ) ) +@@ -1409,8 +1469,6 @@ ULONG FreetypeServerFont::GetFontCodeRan + *(pCodes++) = cCode; + } + } +-#endif +- + return nRangeCount; + } + // ----------------------------------------------------------------------- +@@ -1420,7 +1478,10 @@ ULONG FreetypeServerFont::GetFontCodeRan + int FreetypeServerFont::GetGlyphKernValue( int nGlyphLeft, int nGlyphRight ) const + { + if( maSizeFT ) ++ + pFTActivateSize( maSizeFT ); ++ if( !FT_HAS_KERNING( maFaceFT ) || !FT_IS_SFNT( maFaceFT ) ) ++ return ServerFont::GetGlyphKernValue( nGlyphLeft, nGlyphRight ); + + FT_Vector aKernVal; + FT_Error rcFT = FT_Get_Kerning( maFaceFT, nGlyphLeft, nGlyphRight, +@@ -1438,7 +1499,7 @@ ULONG FreetypeServerFont::GetKernPairs( + + *ppKernPairs = NULL; + if( !FT_HAS_KERNING( maFaceFT ) || !FT_IS_SFNT( maFaceFT ) ) +- return 0; ++ return ServerFont::GetKernPairs( ppKernPairs ); + + // first figure out which glyph pairs are involved in kerning + ULONG nKernLength = 0; +Index: vcl/source/glyphs/gcach_ftyp.hxx +=================================================================== +RCS file: /cvs/gsl/vcl/source/glyphs/gcach_ftyp.hxx,v +retrieving revision 1.24 +retrieving revision 1.27 +diff -u -p -u -r1.24 -r1.27 +--- vcl/source/glyphs/gcach_ftyp.hxx 4 Jul 2003 12:51:33 -0000 1.24 ++++ vcl/source/glyphs/gcach_ftyp.hxx 18 May 2004 10:55:11 -0000 1.27 +@@ -65,11 +65,15 @@ + #include <glyphcache.hxx> + #include <rtl/textcvt.h> + +-typedef int FT_Int; +-struct FT_GlyphRec_; ++#include "ft2build.h" ++#include FT_FREETYPE_H ++#include FT_GLYPH_H ++#include FT_OUTLINE_H ++#include FT_TRUETYPE_TABLES_H ++#include FT_TRUETYPE_TAGS_H ++#include FT_TRUETYPE_IDS_H + class FreetypeServerFont; +-struct FT_FaceRec_; +-struct FT_SizeRec_; ++struct FT_GlyphRec_; + + // ----------------------------------------------------------------------- + +@@ -87,7 +85,6 @@ public: + const unsigned char* GetBuffer() const { return mpFileMap; } + int GetFileSize() const { return mnFileSize; } + const ::rtl::OString* GetFileName() const { return &maNativeFileName; } +- + private: + FtFontFile( const ::rtl::OString& rNativeFileName ); + +@@ -104,7 +101,9 @@ class FtFontInfo + { + public: + FtFontInfo( const ImplFontData&, const ::rtl::OString&, +- int nFaceNum, int nFontId, int nSynthetic ); ++ int nFaceNum, int nFontId, int nSynthetic, ++ const unicodeKernMap* pUnicodeKern = NULL ++ ); + + const unsigned char* GetTable( const char*, ULONG* pLength=0 ) const; + +@@ -121,6 +120,11 @@ public: + + int GetGlyphIndex( sal_Unicode cChar ) const; + void CacheGlyphIndex( sal_Unicode cChar, int nGI ) const; ++ const glyphKernMap* GetGlyphKernMap() const ++ { return (maUnicodeKernPairs.size() || maGlyphKernPairs.size()) ? &maGlyphKernPairs : NULL; } ++ const unicodeKernMap* GetUnicodeKernMap() const ++ { return maUnicodeKernPairs.size() ? &maUnicodeKernPairs : NULL; } ++ + + private: + ImplFontData maFontData; +@@ -135,6 +139,9 @@ private: + // cache unicode->glyphid mapping because looking it up is expensive + typedef ::std::hash_map<sal_Unicode,int> FIGlyphMap; + mutable FIGlyphMap maGlyphMap; ++ ++ mutable glyphKernMap maGlyphKernPairs; ++ unicodeKernMap maUnicodeKernPairs; + }; + + // these two inlines are very important for performance +@@ -147,11 +154,6 @@ inline int FtFontInfo::GetGlyphIndex( sa + return -1; + } + +-inline void FtFontInfo::CacheGlyphIndex( sal_Unicode cChar, int nGI ) const +-{ +- maGlyphMap[ cChar ] = nGI; +-} +- + // ----------------------------------------------------------------------- + + class FreetypeManager +@@ -162,7 +164,9 @@ public: + + long AddFontDir( const String& rUrlName ); + void AddFontFile( const rtl::OString& rNormalizedName, +- int nFaceNum, int nFontId, const ImplFontData* ); ++ int nFaceNum, int nFontId, const ImplFontData*, ++ const unicodeKernMap* pKern = NULL ++ ); + long FetchFontList( ImplDevFontList* ) const; + void ClearFontList(); + +@@ -182,7 +186,7 @@ private: + class FreetypeServerFont : public ServerFont + { + public: +- FreetypeServerFont( const ImplFontSelectData&, FtFontInfo* ); ++ FreetypeServerFont( const ImplFontSelectData&, FtFontInfo*, const glyphKernMap*, const unicodeKernMap* ); + virtual ~FreetypeServerFont(); + + virtual const ::rtl::OString* GetFontFileName() const { return mpFontInfo->GetFontFileName(); } +@@ -206,9 +210,10 @@ public: + const unsigned char* GetTable( const char* pName, ULONG* pLength ) + { return mpFontInfo->GetTable( pName, pLength ); } + int GetEmUnits() const; ++ const FT_Size_Metrics& GetMetricsFT() const { return maSizeFT->metrics; } + + protected: +-friend GlyphCache; ++ friend class GlyphCache; + + int ApplyGlyphTransform( int nGlyphFlags, FT_GlyphRec_* ) const; + virtual void InitGlyphData( int nGlyphIndex, GlyphData& ) const; +Index: vcl/source/glyphs/gcach_layout.cxx +=================================================================== +RCS file: /cvs/gsl/vcl/source/glyphs/gcach_layout.cxx,v +retrieving revision 1.23.20.1 +retrieving revision 1.29 +diff -u -p -u -r1.23.20.1 -r1.29 +--- vcl/source/glyphs/gcach_layout.cxx 9 Jan 2004 18:13:49 -0000 1.23.20.1 ++++ vcl/source/glyphs/gcach_layout.cxx 25 Jun 2004 17:09:25 -0000 1.29 +@@ -59,30 +59,29 @@ + ************************************************************************/ + + #define ENABLE_ICU_LAYOUT +-#if OSL_DEBUG_LEVEL > 1 +-//#define VERBOSE_DEBUG +-#endif +- +-#if !defined(_SV_SALUNX_HXX) && !defined(WIN32) +-#include <salunx.h> +-#endif + + #ifndef _SV_GCACHFTYP_HXX +-#include <freetype/freetype.h> + #include <gcach_ftyp.hxx> + #endif + + #ifndef _SV_SALLAYOUT_HXX + #include <sallayout.hxx> + #endif ++#ifndef _SV_SALGDI_HXX ++#include <salgdi.hxx> ++#endif + + #ifdef WIN32 + #include <malloc.h> + #define alloca _alloca +-#elif !defined(FREEBSD) && !defined(NETBSD) && !defined(MACOSX) +-#include <alloca.h> ++#elif defined(SOLARIS) || defined(IRIX) ++ #include <alloca.h> ++#else ++#ifndef MACOSX ++ #include <malloc.h> ++#endif + #endif + + #if OSL_DEBUG_LEVEL > 1 + #include <cstdio> + #endif +@@ -446,6 +446,13 @@ + meScriptCode( USCRIPT_INVALID_CODE ) + {} + ++void ServerFontLayout::DrawText( SalGraphics& rSalGraphics ) const ++{ ++ rSalGraphics.DrawServerFontLayout( *this ); ++} ++ ++//-------------------------------------------------------------------------- ++ + // ----------------------------------------------------------------------- + + IcuLayoutEngine::~IcuLayoutEngine() +Index: vcl/source/glyphs/gcach_rbmp.cxx +=================================================================== +RCS file: /cvs/gsl/vcl/source/glyphs/gcach_rbmp.cxx,v +retrieving revision 1.3 +retrieving revision 1.4 +diff -u -p -u -r1.3 -r1.4 +--- vcl/source/glyphs/gcach_rbmp.cxx 13 Dec 2001 14:54:19 -0000 1.3 ++++ vcl/source/glyphs/gcach_rbmp.cxx 6 Jan 2004 13:58:48 -0000 1.4 +@@ -64,7 +64,7 @@ + //------------------------------------------------------------------------ + + RawBitmap::RawBitmap() +-: mnAllocated(0), mpBits(0) ++: mpBits(0), mnAllocated(0) + {} + + //------------------------------------------------------------------------ +Index: vcl/source/glyphs/gcach_vdev.cxx +=================================================================== +RCS file: /cvs/gsl/vcl/source/glyphs/gcach_vdev.cxx,v +retrieving revision 1.11 +retrieving revision 1.15 +diff -u -p -u -r1.11 -r1.15 +--- vcl/source/glyphs/gcach_vdev.cxx 5 Aug 2002 07:19:22 -0000 1.11 ++++ vcl/source/glyphs/gcach_vdev.cxx 17 Jun 2004 12:21:43 -0000 1.15 +@@ -75,10 +75,6 @@ + + long VirtDevServerFont::FetchFontList( ImplDevFontList* pToAdd ) + { +-#if 0 +- // TODO: add fonts on server but not on client to the list +- long nCount = 0; +-#else + // TODO: get fonts on server but not on client, + // problem is that currently there is no serverside virtual device... + VirtualDevice vdev( 1 ); +@@ -112,8 +108,6 @@ long VirtDevServerFont::FetchFontList( I + + pToAdd->Add( new ImplFontData( rData ) ); // TODO: avoid copy if possible + } +-#endif +- + return nCount; + } + +@@ -202,13 +197,16 @@ void VirtDevServerFont::InitGlyphData( i + vdev.SetFont( aFont ); + + // get glyph metrics +- long nCharWidth = 10; ++ sal_Int32 nCharWidth = 10; + // TODO: vdev.GetCharWidth( nGlyphIndex, nGlyphIndex, &nCharWidth ); + rGD.SetCharWidth( nCharWidth ); + +- const Rectangle aRect = vdev.GetTextRect( aRect, nGlyphIndex ); ++ const Rectangle aRect = vdev.GetTextRect( ++ aRect, String(static_cast< sal_Unicode >(nGlyphIndex)) ); + rGD.SetOffset( aRect.Top(), aRect.Left() ); +- rGD.SetDelta( vdev.GetTextWidth( nGlyphIndex ), 0 ); ++ rGD.SetDelta( ++ vdev.GetTextWidth( String(static_cast< sal_Unicode >(nGlyphIndex)) ), ++ 0 ); + rGD.SetSize( aRect.GetSize() ); + } + +@@ -223,7 +221,7 @@ bool VirtDevServerFont::GetAntialiasAdvi + + bool VirtDevServerFont::GetGlyphBitmap1( int nGlyphIndex, RawBitmap& ) const + { +-#if 0 ++ /* + // draw bitmap + vdev.SetOutputSizePixel( aSize, TRUE ); + vdev.DrawText( Point(0,0)-rGD.GetMetric().GetOffset(), nGlyphIndex ); +@@ -233,9 +231,8 @@ bool VirtDevServerFont::GetGlyphBitmap1( + const Bitmap& rBitmap = vdev.GetBitmap( Point(0,0), aSize ); + rGD.SetBitmap( new Bitmap( rBitmap ) ); + return true; +-#else ++ */ + return false; +-#endif + } + + // ----------------------------------------------------------------------- +@@ -295,9 +292,8 @@ ULONG VirtDevServerFont::GetKernPairs( I + + bool VirtDevServerFont::GetGlyphOutline( int nGlyphIndex, PolyPolygon& rPolyPoly ) const + { +-#if 1 + return false; +-#else ++ /* + Font aFont; + aFont.SetName ( GetFontSelData().maName ); + aFont.SetStyleName ( GetFontSelData().maStyleName ); +@@ -311,7 +307,7 @@ bool VirtDevServerFont::GetGlyphOutline( + + const bool bOptimize = true; + return vdev.GetGlyphOutline( nGlyphIndex, rPolyPoly, bOptimize ); +-#endif ++ */ + } + + // ======================================================================= +Index: vcl/source/glyphs/gcach_vdev.hxx +=================================================================== +RCS file: /cvs/gsl/vcl/source/glyphs/gcach_vdev.hxx,v +retrieving revision 1.5 +retrieving revision 1.7 +diff -u -p -u -r1.5 -r1.7 +--- vcl/source/glyphs/gcach_vdev.hxx 15 Feb 2002 15:58:57 -0000 1.5 ++++ vcl/source/glyphs/gcach_vdev.hxx 4 Feb 2004 15:59:34 -0000 1.7 +@@ -72,7 +72,7 @@ public: + virtual bool GetGlyphOutline( int nGlyphIndex, PolyPolygon& ) const; + + protected: +-friend GlyphCache; ++ friend class GlyphCache; + static long FetchFontList( ImplDevFontList* ); + static void ClearFontList(); + +Index: vcl/source/glyphs/glyphcache.cxx +=================================================================== +RCS file: /cvs/gsl/vcl/source/glyphs/glyphcache.cxx,v +retrieving revision 1.22.40.2 +retrieving revision 1.26 +diff -u -p -u -r1.22.40.2 -r1.26 +--- vcl/source/glyphs/glyphcache.cxx 26 Jan 2004 17:23:59 -0000 1.22.40.2 ++++ vcl/source/glyphs/glyphcache.cxx 18 May 2004 10:55:25 -0000 1.26 +@@ -88,8 +88,8 @@ GlyphCache::GlyphCache( ULONG nMaxSize ) + mnBytesUsed(sizeof(GlyphCache)), + mnLruIndex(0), + mnGlyphCount(0), +- mpFtManager(NULL), +- mpCurrentGCFont(NULL) ++ mpCurrentGCFont(NULL), ++ mpFtManager(NULL) + { + mpFtManager = new FreetypeManager; + } +@@ -167,7 +167,7 @@ void GlyphCache::RemoveFont( const ImplF + FontList::iterator it_next = maFontList.begin(), it; + while( it_next != maFontList.end() ) + { +- it = it_next++; ++ it = it_next++; + if( pFontData != it->first.mpFontData ) + continue; + +@@ -219,10 +219,12 @@ void GlyphCache::AddFontPath( const Stri + // ----------------------------------------------------------------------- + + void GlyphCache::AddFontFile( const rtl::OString& rNormalizedName, int nFaceNum, +- int nFontId, const ImplFontData* pFontData ) ++ int nFontId, const ImplFontData* pFontData, ++ const unicodeKernMap* pKern ++ ) + { + if( mpFtManager ) +- mpFtManager->AddFontFile( rNormalizedName, nFaceNum, nFontId, pFontData ); ++ mpFtManager->AddFontFile( rNormalizedName, nFaceNum, nFontId, pFontData, pKern ); + } + + // ----------------------------------------------------------------------- +@@ -337,7 +339,7 @@ void GlyphCache::GarbageCollect() + FontList::iterator it_next = maFontList.begin(), it; + while( it_next != maFontList.end() ) + { +- it = it_next++; ++ it = it_next++; + ServerFont* pSF = it->second; + if( (pSF != NULL) + && (pSF->GetRefCount() <= 0) +@@ -401,15 +403,17 @@ inline void GlyphCache::RemovingGlyph( S + // ServerFont + // ======================================================================= + +-ServerFont::ServerFont( const ImplFontSelectData& rFSD ) ++ServerFont::ServerFont( const ImplFontSelectData& rFSD, const glyphKernMap* pKern, const unicodeKernMap* pUniKern ) + : maFontSelData(rFSD), + mnExtInfo(0), + mnRefCount(1), + mnBytesUsed( sizeof(ServerFont) ), +- mpNextGCFont( NULL ), + mpPrevGCFont( NULL ), ++ mpNextGCFont( NULL ), + nCos( 0x10000), +- nSin( 0) ++ nSin( 0), ++ mpKernPairs( pKern ), ++ mpUnicodeKernPairs( pUniKern ) + { + if( rFSD.mnOrientation != 0 ) + { +@@ -440,6 +444,65 @@ long ServerFont::Release() const + + // ----------------------------------------------------------------------- + ++int ServerFont::GetGlyphKernValue( int left, int right ) const ++{ ++ int kern = 0; ++ if( mpKernPairs ) ++ { ++ std::map< int, std::map< int, int > >::const_iterator left_it = ++ mpKernPairs->find( left ); ++ if( left_it != mpKernPairs->end() ) ++ { ++ std::map< int, int >::const_iterator right_it = left_it->second.find( right ); ++ if( right_it != left_it->second.end() ) ++ kern = right_it->second; ++ } ++ } ++ return kern*(maFontSelData.mnWidth ? maFontSelData.mnWidth : maFontSelData.mnHeight)/1000; ++} ++ ++// ----------------------------------------------------------------------- ++ ++ULONG ServerFont::GetKernPairs( struct ImplKernPairData** ppKernPairs ) const ++{ ++ int nKernEntry = 0; ++ unicodeKernMap::const_iterator left_it; ++ std::map< sal_Unicode, int >::const_iterator right_it; ++ if( mpUnicodeKernPairs ) ++ { ++ // count the kern entries ++ for( left_it = mpUnicodeKernPairs->begin(); left_it != mpUnicodeKernPairs->end(); ++left_it ) ++ { ++ nKernEntry += left_it->second.size(); ++ } ++ } ++ ++ // allocate kern pair table ++ if( nKernEntry ) ++ { ++ *ppKernPairs = new ImplKernPairData[ nKernEntry ]; ++ ++ // fill in kern pairs ++ nKernEntry = 0; ++ for( left_it = mpUnicodeKernPairs->begin(); left_it != mpUnicodeKernPairs->end(); ++left_it ) ++ { ++ for( right_it = left_it->second.begin(); right_it != left_it->second.end(); ++right_it ) ++ { ++ (*ppKernPairs)[ nKernEntry ].mnChar1 = (USHORT)left_it->first; ++ (*ppKernPairs)[ nKernEntry ].mnChar2 = (USHORT)right_it->first; ++ (*ppKernPairs)[ nKernEntry ].mnKern = right_it->second*(maFontSelData.mnWidth ? maFontSelData.mnWidth : maFontSelData.mnHeight)/1000; ++ nKernEntry++; ++ } ++ } ++ } ++ else ++ *ppKernPairs = NULL; ++ ++ return (ULONG)nKernEntry; ++} ++ ++// ----------------------------------------------------------------------- ++ + GlyphData& ServerFont::GetGlyphData( int nGlyphIndex ) + { + // usually the GlyphData is cached +@@ -465,7 +528,7 @@ void ServerFont::GarbageCollect( long nM + GlyphList::iterator it_next = maGlyphList.begin(), it; + while( it_next != maGlyphList.end() ) + { +- it = it_next++; ++ it = it_next++; + GlyphData& rGD = it->second; + if( (nMinLruIndex - rGD.GetLruValue()) > 0 ) + { +Index: vcl/source/glyphs/makefile.mk +=================================================================== +RCS file: /cvs/gsl/vcl/source/glyphs/makefile.mk,v +retrieving revision 1.5 +retrieving revision 1.6 +diff -u -p -u -r1.5 -r1.6 +--- vcl/source/glyphs/makefile.mk 15 Feb 2002 15:52:27 -0000 1.5 ++++ vcl/source/glyphs/makefile.mk 6 Jan 2004 14:00:38 -0000 1.6 +@@ -76,11 +76,9 @@ TARGET=glyphs + SLOFILES=\ + $(SLO)$/glyphcache.obj \ + $(SLO)$/gcach_rbmp.obj \ ++ $(SLO)$/gcach_layout.obj \ + $(SLO)$/gcach_vdev.obj \ + $(SLO)$/gcach_ftyp.obj +-.IF "$(ENABLE_CTL)" != "" +-SLOFILES+=$(SLO)$/gcach_layout.obj +-.ENDIF + .ENDIF + + # --- Targets ------------------------------------------------------ diff --git a/patches/OOO_1_1_2/vcl-unx-source-gdi.diff b/patches/OOO_1_1_2/vcl-unx-source-gdi.diff new file mode 100644 index 000000000..29d649121 --- /dev/null +++ b/patches/OOO_1_1_2/vcl-unx-source-gdi.diff @@ -0,0 +1,9805 @@ +Index: vcl/unx/source/gdi/cdeint.cxx +=================================================================== +RCS file: /cvs/gsl/vcl/unx/source/gdi/cdeint.cxx,v +retrieving revision 1.8 +retrieving revision 1.9 +diff -u -p -u -r1.8 -r1.9 +--- vcl/unx/source/gdi/cdeint.cxx 24 Jun 2002 15:53:02 -0000 1.8 ++++ vcl/unx/source/gdi/cdeint.cxx 18 Nov 2003 14:44:27 -0000 1.9 +@@ -64,14 +64,12 @@ + #include <salunx.h> + #include <saldisp.hxx> + #include <cdeint.hxx> +-#include <salframe.hxx> + #include <settings.hxx> + + #include <tools/stream.hxx> + #include <tools/debug.hxx> + +-CDEIntegrator::CDEIntegrator( SalFrame* pFrame ) : +- DtIntegrator( pFrame ) ++CDEIntegrator::CDEIntegrator() + { + meType = DtCDE; + mnRefCount++; +Index: vcl/unx/source/gdi/dtint.cxx +=================================================================== +RCS file: /cvs/gsl/vcl/unx/source/gdi/dtint.cxx,v +retrieving revision 1.16.82.1 +retrieving revision 1.22 +diff -u -p -u -r1.16.82.1 -r1.22 +--- vcl/unx/source/gdi/dtint.cxx 15 Jan 2004 12:52:24 -0000 1.16.82.1 ++++ vcl/unx/source/gdi/dtint.cxx 10 May 2004 15:58:19 -0000 1.22 +@@ -72,10 +72,8 @@ + #include <cdeint.hxx> + #endif + #include <kdeint.hxx> +-#include <gnomeint.hxx> + #include <saldisp.hxx> + #include <saldata.hxx> +-#include <salframe.hxx> + #include <wmadaptor.hxx> + + #include <svapp.hxx> +@@ -103,16 +101,12 @@ BOOL bSymbolLoadFailed = FALSE; + DtIntegratorList DtIntegrator::aIntegratorList; + String DtIntegrator::aHomeDir; + +-DtIntegrator::DtIntegrator( SalFrame* pFrame ) : +- mpSalFrame( pFrame ), ++DtIntegrator::DtIntegrator() : + meType( DtGeneric ), + mnRefCount( 0 ), + mnSystemLookCommandProcess( -1 ) + { +- if( pFrame ) +- mpSalDisplay = pFrame->maFrameData.GetDisplay(); +- else +- mpSalDisplay = GetSalData()->GetDefDisp(); ++ mpSalDisplay = GetSalData()->GetDisplay(); + mpDisplay = mpSalDisplay->GetDisplay(); + aIntegratorList.Insert( this, LIST_APPEND ); + static const char* pHome = getenv( "HOME" ); +@@ -123,16 +117,12 @@ DtIntegrator::~DtIntegrator() + { + } + +-DtIntegrator* DtIntegrator::CreateDtIntegrator( SalFrame* pFrame ) ++DtIntegrator* DtIntegrator::CreateDtIntegrator() + { +- // hack for sclient +- if( ! pFrame && aIntegratorList.Count() ) +- return aIntegratorList.GetObject( 0 ); +- +- SalDisplay* pSalDisplay = pFrame ? pFrame->maFrameData.GetDisplay() : GetSalData()->GetDefDisp(); ++ SalDisplay* pSalDisplay = GetSalData()->GetDisplay(); + Display* pDisplay = pSalDisplay->GetDisplay(); + +- for( int i = 0; i < aIntegratorList.Count(); i++ ) ++ for( unsigned int i = 0; i < aIntegratorList.Count(); i++ ) + { + DtIntegrator* pIntegrator = aIntegratorList.GetObject( i ); + if( pIntegrator->mpDisplay == pDisplay ) +@@ -150,14 +140,12 @@ DtIntegrator* DtIntegrator::CreateDtInte + OString aOver( pOverride ); + #if USE_CDE + if( aOver.equalsIgnoreAsciiCase( "cde" ) ) +- return new CDEIntegrator( pFrame ); ++ return new CDEIntegrator(); + #endif + if( aOver.equalsIgnoreAsciiCase( "kde" ) ) +- return new KDEIntegrator( pFrame ); +- if( aOver.equalsIgnoreAsciiCase( "gnome" ) ) +- return new GNOMEIntegrator( pFrame ); ++ return new KDEIntegrator(); + if( aOver.equalsIgnoreAsciiCase( "none" ) ) +- return new DtIntegrator( pFrame ); ++ return new DtIntegrator(); + } + + Atom nDtAtom = None; +@@ -168,461 +156,20 @@ DtIntegrator* DtIntegrator::CreateDtInte + // check dt type + // CDE + nDtAtom = XInternAtom( pDisplay, "_DT_WM_READY", True ); +- if( nDtAtom && ( pLibrary = dlopen( "libDtSvc.so", DLOPEN_MODE ) ) ) ++ if( nDtAtom && ( pLibrary = dlopen( "/usr/dt/lib/libDtSvc.so", DLOPEN_MODE ) ) ) + { + dlclose( pLibrary ); +- return new CDEIntegrator( pFrame ); ++ return new CDEIntegrator(); + } + #endif + + if( pSalDisplay->getWMAdaptor()->getWindowManagerName().EqualsAscii( "KWin" ) ) +- return new KDEIntegrator( pFrame ); +- +- // actually this is not that good an indicator for a GNOME running +- // but there currently does not seem to be a better one +- nDtAtom = XInternAtom( pDisplay, "GNOME_SM_PROXY", True ); +- Atom nDtAtom2 = XInternAtom( pDisplay, "NAUTILUS_DESKTOP_WINDOW_ID", True ); +- if( nDtAtom || nDtAtom2 ) +- { +- int nProperties = 0; +- Atom* pProperties = XListProperties( pDisplay, pSalDisplay->GetRootWindow(), &nProperties ); +- if( pProperties && nProperties ) +- { +- for( int i = 0; i < nProperties; i++ ) +- if( pProperties[ i ] == nDtAtom || +- pProperties[ i ] == nDtAtom2 ) +- { +- XFree( pProperties ); +- return new GNOMEIntegrator( pFrame ); +- } +- XFree( pProperties ); +- } +- } ++ return new KDEIntegrator(); + + // default: generic implementation +- return new DtIntegrator( pFrame ); ++ return new DtIntegrator(); + } + + void DtIntegrator::GetSystemLook( AllSettings& rSettings ) + { +-} +- +-Color DtIntegrator::parseColor( const ByteString& rLine ) +-{ +- Color aColor; +- +- xub_StrLen nPos1 = rLine.Search( '(' ); +- xub_StrLen nPos2 = rLine.Search( ')', nPos1 != STRING_NOTFOUND ? nPos1 : 0 ); +- if( nPos1 != STRING_NOTFOUND && nPos2 != STRING_NOTFOUND +- && (int)nPos2 - (int)nPos1 > 5 ) +- { +- ByteString aTriple( rLine.Copy( nPos1+1, nPos2-nPos1-1 ) ); +- xub_StrLen nIndex = 0; +- int nRed, nGreen, nBlue, nColor = 0; +- do +- { +- switch( nColor ) +- { +- case 0: nRed = aTriple.GetToken( 0, ',', nIndex ).ToInt32();break; +- case 1: nGreen = aTriple.GetToken( 0, ',', nIndex ).ToInt32();break; +- case 2: nBlue = aTriple.GetToken( 0, ',', nIndex ).ToInt32();break; +- } +- nColor++; +- } while( nIndex != STRING_NOTFOUND ); +- if( nColor == 3 ) +- { +- aColor = Color( nRed, nGreen, nBlue ); +- } +- } +- return aColor; +-} +- +-Font DtIntegrator::parseFont( const ByteString& rLine ) +-{ +- Font aFont; +- +- xub_StrLen nPos1 = rLine.Search( '"' ); +- xub_StrLen nPos2 = rLine.Search( '"', nPos1 != STRING_NOTFOUND ? nPos1+1 : 0 ); +- if( nPos1 != STRING_NOTFOUND && nPos2 != STRING_NOTFOUND +- && (int)nPos2 - (int)nPos1 > 1 ) +- { +- aFont.SetName( String( rLine.Copy( nPos1+1, nPos2-nPos1-1 ), osl_getThreadTextEncoding() ) ); +- xub_StrLen nIndex = nPos2; +- ByteString aToken = rLine.GetToken( 1, ',', nIndex ); +- if( aToken.Len() ) +- { +- int nPixelHeight = aToken.ToInt32(); +- long nDPIX, nDPIY; +- long nDispDPIY = mpSalDisplay->GetResolution().B(); +- mpSalDisplay->GetScreenFontResolution( nDPIX, nDPIY ); +- int nHeight = nPixelHeight * nDispDPIY / nDPIY; +- // allow for rounding in back conversion (at SetFont) +- while( (nHeight * nDPIY / nDispDPIY) > nPixelHeight ) +- nHeight--; +- while( (nHeight * nDPIY / nDispDPIY) < nPixelHeight ) +- nHeight++; +- aFont.SetHeight( nHeight ); +- } +- while( nIndex != STRING_NOTFOUND ) +- { +- aToken = rLine.GetToken( 0, ',', nIndex ); +- if( aToken.Equals( "bold" ) ) +- aFont.SetWeight( WEIGHT_BOLD ); +- else if( aToken.Equals( "light" ) ) +- aFont.SetWeight( WEIGHT_LIGHT ); +- else if( aToken.Equals( "italic" ) ) +- aFont.SetItalic( ITALIC_NORMAL ); +- } +- } +- return aFont; +-} +- +-bool DtIntegrator::StartSystemLookProcess( const char* pCommand ) +-{ +- ByteString aCommand, aArgWindow; +- if( pCommand[0] == '/' ) +- aCommand = pCommand; +- else +- { +- OUString aExec; +- OUString aSys; +- osl_getExecutableFile( &aExec.pData ); +- if( osl_File_E_None != osl_getSystemPathFromFileURL( aExec.pData, &aSys.pData ) ) +- return false; // huh ? +- aCommand = ByteString( String( aSys ), osl_getThreadTextEncoding() ); +- aCommand.Erase( aCommand.SearchBackward( '/' )+1 ); +- aCommand.Append( pCommand ); +- } +- aArgWindow = ByteString::CreateFromInt32( mpSalDisplay->GetDrawable() ); +- mnSystemLookCommandProcess = fork(); +- if( mnSystemLookCommandProcess == 0 ) +- { +-#if OSL_DEBUG_LEVEL > 1 +- fprintf( stderr, "exec( \"%s --vcl-system-settings-window %s\" )\n", aCommand.GetBuffer(), aArgWindow.GetBuffer() ); +-#endif +- int nRedirect = open( "/dev/null", O_WRONLY ); +- if( nRedirect != -1 ) +- { +- dup2( nRedirect, STDOUT_FILENO ); +- dup2( nRedirect, STDERR_FILENO ); +- } +- execl( aCommand.GetBuffer(), aCommand.GetBuffer(), "--vcl-system-settings-window", aArgWindow.GetBuffer(), NULL ); +- _exit(1); +- } +- return mnSystemLookCommandProcess != -1; +-} +- +-void DtIntegrator::GetSystemLook( const char* pCommand, AllSettings& rSettings ) +-{ +- BOOL bRet = FALSE; +- std::list< ByteString > aLines; +- +- if( pCommand ) +- { +- char pBuffer[1024]; +- FILE* pOutput = NULL; +- +- ByteString aCommand; +- if( pCommand[0] == '/' ) +- aCommand = pCommand; +- else +- { +- OUString aExec; +- OUString aSys; +- osl_getExecutableFile( &aExec.pData ); +- if( osl_File_E_None != osl_getSystemPathFromFileURL( aExec.pData, &aSys.pData ) ) +- return; // huh ? +- aCommand = ByteString( String( aSys ), osl_getThreadTextEncoding() ); +- aCommand.Erase( aCommand.SearchBackward( '/' )+1 ); +- aCommand.Append( pCommand ); +- } +-#if OSL_DEBUG_LEVEL < 2 +- aCommand.Append( " 2>/dev/null" ); +-#endif +- pOutput = popen( aCommand.GetBuffer(), "r" ); +-#if OSL_DEBUG_LEVEL > 1 +- fprintf( stderr, "popen( \"%s\", \"r\" ) = %p\n", aCommand.GetBuffer(), pOutput ); +-#endif +- while( fgets( pBuffer, sizeof( pBuffer ), pOutput ) ) +- { +- aLines.push_back( ByteString( pBuffer ) ); +- } +- pclose( pOutput ); +- } +- else if( ! pCommand && mnSystemLookCommandProcess != -1 ) +- { +- // get the lines from the VCL_SYSTEM_SETTINGS property +- Atom nType = 0; +- int nFormat = 0; +- unsigned long nItems = 0, nBytes = 0; +- char* pData = NULL; +- // query size of the property +- XGetWindowProperty( mpSalDisplay->GetDisplay(), +- mpSalDisplay->GetDrawable(), +- mpSalDisplay->getWMAdaptor()->getAtom( WMAdaptor::VCL_SYSTEM_SETTINGS ), +- 0, 0, +- False, +- XA_STRING, +- &nType, +- &nFormat, +- &nItems, +- &nBytes, +- (unsigned char**)&pData ); +- if( nBytes ) +- { +- // query the actual data +- XGetWindowProperty( mpSalDisplay->GetDisplay(), +- mpSalDisplay->GetDrawable(), +- mpSalDisplay->getWMAdaptor()->getAtom( WMAdaptor::VCL_SYSTEM_SETTINGS ), +- 0, (nBytes+3)/4, +- False, +- XA_STRING, +- &nType, +- &nFormat, +- &nItems, +- &nBytes, +- (unsigned char**)&pData ); +- // sanity check +- if( nFormat == 8 && nType == XA_STRING && nItems ) +- { +-#if OSL_DEBUG_LEVEL > 1 +- fprintf( stderr, "got %d data items:\n%.*s", nItems, nItems, pData ); +-#endif +- // fill in the lines +- char* pRun = pData; +- char* pLastLine = pData; +- while( (pRun-pData) <= nItems ) +- { +- if( *pRun == '\n' ) +- { +- if( pRun-pLastLine > 1 ) +- { +- aLines.push_back( ByteString( pLastLine, pRun - pLastLine ) ); +- pLastLine = pRun+1; +- } +- } +- pRun++; +- } +- } +-#if OSL_DEBUG_LEVEL > 1 +- else +- fprintf( stderr, "query of data failed with nFormat = %d, nType = %d, nItems = %d\n", nFormat, nType, nItems ); +-#endif +- XFree( pData ); +- } +-#if OSL_DEBUG_LEVEL > 1 +- else +- fprintf( stderr, "query of bytes failed\n" ); +-#endif +- } +- +- // nothing to do ? +- if( aLines.begin() == aLines.end() ) +- return; +- +- StyleSettings aStyleSettings( rSettings.GetStyleSettings() ); +- MouseSettings aMouseSettings( rSettings.GetMouseSettings() ); +- KeyboardSettings aKeyboardSettings( rSettings.GetKeyboardSettings() ); +- +- std::set< DtSetEnum > aItemSet; +- +- while( aLines.begin() != aLines.end() ) +- { +- ByteString aLine( aLines.front() ); +- aLines.pop_front(); +- if( aLine.GetChar( aLine.Len()-1 ) == '\n' ) +- aLine.Erase( aLine.Len()-1 ); // cut newline +- +- USHORT nPos = aLine.Search( '=' ); +- if( nPos == STRING_NOTFOUND ) +- continue; +- +- DtSetEnum aToken = (DtSetEnum)aLine.Copy( 0, nPos ).ToInt32(); +- aLine.Erase( 0, nPos+1 ); +- +- if( aToken ) +- { +- bRet = TRUE; +- aItemSet.insert( aToken ); +- } +- +- switch( aToken ) +- { +- case MouseOptions: aMouseSettings.SetOptions( aLine.ToInt32() );break; +- case DoubleClickTime: aMouseSettings.SetDoubleClickTime( aLine.ToInt32() );break; +- case DoubleClickWidth: aMouseSettings.SetDoubleClickWidth( aLine.ToInt32() );break; +- case DoubleClickHeight: aMouseSettings.SetDoubleClickHeight( aLine.ToInt32() );break; +- case StartDragWidth: aMouseSettings.SetStartDragWidth( aLine.ToInt32() );break; +- case StartDragHeight: aMouseSettings.SetStartDragHeight( aLine.ToInt32() );break; +- case DragMoveCode: aMouseSettings.SetDragMoveCode( aLine.ToInt32() );break; +- case DragCopyCode: aMouseSettings.SetDragCopyCode( aLine.ToInt32() );break; +- case DragLinkCode: aMouseSettings.SetDragLinkCode( aLine.ToInt32() );break; +- case ContextMenuCode: aMouseSettings.SetContextMenuCode( aLine.ToInt32() );break; +- case ContextMenuClicks: aMouseSettings.SetContextMenuClicks( aLine.ToInt32() );break; +- case ContextMenuDown: aMouseSettings.SetContextMenuDown( aLine.ToInt32() );break; +- case ScrollRepeat: aMouseSettings.SetScrollRepeat( aLine.ToInt32() );break; +- case ButtonStartRepeat: aMouseSettings.SetButtonStartRepeat( aLine.ToInt32() );break; +- case ButtonRepeat: aMouseSettings.SetButtonRepeat( aLine.ToInt32() );break; +- case ActionDelay: aMouseSettings.SetActionDelay( aLine.ToInt32() );break; +- case MenuDelay: aMouseSettings.SetMenuDelay( aLine.ToInt32() );break; +- case Follow: aMouseSettings.SetFollow( aLine.ToInt32() );break; +- case MiddleButtonAction: aMouseSettings.SetMiddleButtonAction( aLine.ToInt32() );break; +- case KeyboardOptions: aKeyboardSettings.SetOptions( aLine.ToInt32() );break; +- case StyleOptions: aStyleSettings.SetOptions( aLine.ToInt32() );break; +- case BorderSize: aStyleSettings.SetBorderSize( aLine.ToInt32() );break; +- case TitleHeight: aStyleSettings.SetTitleHeight( aLine.ToInt32() );break; +- case FloatTitleHeight: aStyleSettings.SetFloatTitleHeight( aLine.ToInt32() );break; +- case TearOffTitleHeight: aStyleSettings.SetTearOffTitleHeight( aLine.ToInt32() );break; +- case MenuBarHeight: aStyleSettings.SetMenuBarHeight( aLine.ToInt32() );break; +- case ScrollBarSize: aStyleSettings.SetScrollBarSize( aLine.ToInt32() );break; +- case SpinSize: aStyleSettings.SetSpinSize( aLine.ToInt32() );break; +- case SplitSize: aStyleSettings.SetSplitSize( aLine.ToInt32() );break; +- case IconHorzSpace: aStyleSettings.SetIconHorzSpace( aLine.ToInt32() );break; +- case IconVertSpace: aStyleSettings.SetIconVertSpace( aLine.ToInt32() );break; +- case CursorSize: aStyleSettings.SetCursorSize( aLine.ToInt32() );break; +- case CursorBlinkTime: aStyleSettings.SetCursorBlinkTime( aLine.ToInt32() );break; +- case ScreenZoom: aStyleSettings.SetScreenZoom( aLine.ToInt32() );break; +- case ScreenFontZoom: aStyleSettings.SetScreenFontZoom( aLine.ToInt32() );break; +- case LogoDisplayTime: aStyleSettings.SetLogoDisplayTime( aLine.ToInt32() );break; +- case DragFullOptions: aStyleSettings.SetDragFullOptions( aLine.ToInt32() );break; +- case AnimationOptions: aStyleSettings.SetAnimationOptions( aLine.ToInt32() );break; +- case SelectionOptions: aStyleSettings.SetSelectionOptions( aLine.ToInt32() );break; +- case DisplayOptions: aStyleSettings.SetDisplayOptions( aLine.ToInt32() );break; +- case AntialiasingMinPixelHeight: aStyleSettings.SetAntialiasingMinPixelHeight( aLine.ToInt32() );break; +- case ThreeDColor: aStyleSettings.Set3DColors( parseColor( aLine ) );break; +- case FaceColor: aStyleSettings.SetFaceColor( parseColor( aLine ) );break; +- case CheckedColor: aStyleSettings.SetCheckedColor( parseColor( aLine ) );break; +- case LightColor: aStyleSettings.SetLightColor( parseColor( aLine ) );break; +- case LightBorderColor: aStyleSettings.SetLightBorderColor( parseColor( aLine ) );break; +- case ShadowColor: aStyleSettings.SetShadowColor( parseColor( aLine ) );break; +- case DarkShadowColor: aStyleSettings.SetDarkShadowColor( parseColor( aLine ) );break; +- case ButtonTextColor: aStyleSettings.SetButtonTextColor( parseColor( aLine ) );break; +- case RadioCheckTextColor: aStyleSettings.SetRadioCheckTextColor( parseColor( aLine ) );break; +- case GroupTextColor: aStyleSettings.SetGroupTextColor( parseColor( aLine ) );break; +- case LabelTextColor: aStyleSettings.SetLabelTextColor( parseColor(aLine ) );break; +- case InfoTextColor: aStyleSettings.SetInfoTextColor( parseColor( aLine ) );break; +- case WindowColor: aStyleSettings.SetWindowColor( parseColor( aLine ) );break; +- case WindowTextColor: aStyleSettings.SetWindowTextColor( parseColor( aLine ) );break; +- case DialogColor: aStyleSettings.SetDialogColor( parseColor( aLine ) );break; +- case DialogTextColor: aStyleSettings.SetDialogTextColor( parseColor( aLine ) );break; +- case WorkspaceColor: aStyleSettings.SetWorkspaceColor( parseColor( aLine ) );break; +- case FieldColor: aStyleSettings.SetFieldColor( parseColor( aLine ) );break; +- case FieldTextColor: aStyleSettings.SetFieldTextColor( parseColor( aLine ) );break; +- case ActiveColor: aStyleSettings.SetActiveColor( parseColor( aLine ) );break; +- case ActiveColor2: aStyleSettings.SetActiveColor2( parseColor( aLine ) );break; +- case ActiveTextColor: aStyleSettings.SetActiveTextColor( parseColor( aLine ) );break; +- case ActiveBorderColor: aStyleSettings.SetActiveBorderColor( parseColor( aLine ) );break; +- case DeactiveColor: aStyleSettings.SetDeactiveColor( parseColor( aLine ) );break; +- case DeactiveColor2: aStyleSettings.SetDeactiveColor2( parseColor( aLine ) );break; +- case DeactiveTextColor: aStyleSettings.SetDeactiveTextColor( parseColor( aLine ) );break; +- case DeactiveBorderColor: aStyleSettings.SetDeactiveBorderColor( parseColor( aLine ) );break; +- case HighlightColor: aStyleSettings.SetHighlightColor( parseColor( aLine ) );break; +- case HighlightTextColor: aStyleSettings.SetHighlightTextColor( parseColor( aLine ) );break; +- case DisableColor: aStyleSettings.SetDisableColor( parseColor( aLine ) );break; +- case HelpColor: aStyleSettings.SetHelpColor( parseColor( aLine ) );break; +- case HelpTextColor: aStyleSettings.SetHelpTextColor( parseColor( aLine ) );break; +- case MenuColor: aStyleSettings.SetMenuColor( parseColor( aLine ) );break; +- case MenuBarColor: aStyleSettings.SetMenuBarColor( parseColor( aLine ) );break; +- case MenuTextColor: aStyleSettings.SetMenuTextColor( parseColor( aLine ) );break; +- case MenuHighlightColor: aStyleSettings.SetMenuHighlightColor( parseColor( aLine ) );break; +- case MenuHighlightTextColor: aStyleSettings.SetMenuHighlightTextColor( parseColor( aLine ) );break; +- case LinkColor: aStyleSettings.SetLinkColor( parseColor( aLine ) );break; +- case VisitedLinkColor: aStyleSettings.SetVisitedLinkColor( parseColor( aLine ) );break; +- case HighlightLinkColor: aStyleSettings.SetHighlightLinkColor( parseColor( aLine ) );break; +- case HighContrastMode: aStyleSettings.SetHighContrastMode( aLine.ToInt32() );break; +- case AppFont: aStyleSettings.SetAppFont( parseFont( aLine ) );break; +- case HelpFont: aStyleSettings.SetHelpFont( parseFont( aLine ) );break; +- case TitleFont: aStyleSettings.SetTitleFont( parseFont( aLine ) );break; +- case FloatTitleFont: aStyleSettings.SetFloatTitleFont( parseFont( aLine ) );break; +- case MenuFont: aStyleSettings.SetMenuFont( parseFont( aLine ) );break; +- case ToolFont: aStyleSettings.SetToolFont( parseFont( aLine ) );break; +- case GroupFont: aStyleSettings.SetGroupFont( parseFont( aLine ) );break; +- case LabelFont: aStyleSettings.SetLabelFont( parseFont( aLine ) );break; +- case InfoFont: aStyleSettings.SetInfoFont( parseFont( aLine ) );break; +- case RadioCheckFont: aStyleSettings.SetRadioCheckFont( parseFont( aLine ) );break; +- case PushButtonFont: aStyleSettings.SetPushButtonFont( parseFont( aLine ) );break; +- case FieldFont: aStyleSettings.SetFieldFont( parseFont( aLine ) );break; +- case IconFont: aStyleSettings.SetIconFont( parseFont( aLine ) );break; +- case RadioButtonStyle: aStyleSettings.SetRadioButtonStyle( aLine.ToInt32() );break; +- case CheckBoxStyle: aStyleSettings.SetCheckBoxStyle( aLine.ToInt32() );break; +- case PushButtonStyle: aStyleSettings.SetPushButtonStyle( aLine.ToInt32() );break; +- case TabControlStyle: aStyleSettings.SetTabControlStyle( aLine.ToInt32() ); +- break; +- +- case AllTextColors: +- { +- Color aTextColor = parseColor( aLine ); +- aStyleSettings.SetDialogTextColor( aTextColor ); +- aStyleSettings.SetMenuTextColor( aTextColor ); +- aStyleSettings.SetButtonTextColor( aTextColor ); +- aStyleSettings.SetRadioCheckTextColor( aTextColor ); +- aStyleSettings.SetGroupTextColor( aTextColor ); +- aStyleSettings.SetLabelTextColor( aTextColor ); +- aStyleSettings.SetInfoTextColor( aTextColor ); +- aStyleSettings.SetWindowTextColor( aTextColor ); +- aStyleSettings.SetFieldTextColor( aTextColor ); +- } +- break; +- case AllBackColors: +- { +- Color aBack = parseColor( aLine ); +- aStyleSettings.Set3DColors( aBack ); +- aStyleSettings.SetFaceColor( aBack ); +- aStyleSettings.SetDialogColor( aBack ); +- aStyleSettings.SetMenuColor( aBack ); +- aStyleSettings.SetMenuBarColor( aBack ); +- aStyleSettings.SetWindowColor( aBack ); +- aStyleSettings.SetFieldColor( aBack ); +- if( aBack == COL_LIGHTGRAY ) +- aStyleSettings.SetCheckedColor( Color( 0xCC, 0xCC, 0xCC ) ); +- else +- { +- Color aColor2 = aStyleSettings.GetLightColor(); +- aStyleSettings. +- SetCheckedColor( Color( +- (BYTE)(((USHORT)aBack.GetRed()+(USHORT)aColor2.GetRed())/2), +- (BYTE)(((USHORT)aBack.GetGreen()+(USHORT)aColor2.GetGreen())/2), +- (BYTE)(((USHORT)aBack.GetBlue()+(USHORT)aColor2.GetBlue())/2) +- ) ); +- } +- } +- break; +- case UIFont: +- if( aStyleSettings.GetUseSystemUIFonts() ) +- { +- Font aFont = parseFont( aLine ); +- aStyleSettings.SetAppFont( aFont ); +- aStyleSettings.SetHelpFont( aFont ); +- aStyleSettings.SetMenuFont( aFont ); +- aStyleSettings.SetToolFont( aFont ); +- aStyleSettings.SetLabelFont( aFont ); +- aStyleSettings.SetInfoFont( aFont ); +- aStyleSettings.SetRadioCheckFont( aFont ); +- aStyleSettings.SetPushButtonFont( aFont ); +- aStyleSettings.SetFieldFont( aFont ); +- aStyleSettings.SetIconFont( aFont ); +- aStyleSettings.SetGroupFont( aFont ); +- } +- break; +- case ToolbarIconSize: +- if( aLine.EqualsIgnoreCaseAscii( "large" ) ) +- aStyleSettings.SetToolbarIconSize( STYLE_TOOLBAR_ICONSIZE_LARGE ); +- else if( aLine.EqualsIgnoreCaseAscii( "small" ) ) +- aStyleSettings.SetToolbarIconSize( STYLE_TOOLBAR_ICONSIZE_SMALL ); +- else +- aStyleSettings.SetToolbarIconSize( STYLE_TOOLBAR_ICONSIZE_UNKNOWN ); +- break; +-#if OSL_DEBUG_LEVEL > 1 +- default: +- fprintf( stderr, "don't understand \"%d=%s\"\n", aToken, aLine.GetBuffer() ); +- break; +-#endif +- } +- } +- if( bRet ) +- { +- rSettings.SetKeyboardSettings( aKeyboardSettings ); +- rSettings.SetMouseSettings( aMouseSettings ); +- rSettings.SetStyleSettings( aStyleSettings ); +- } + } +Index: vcl/unx/source/gdi/gcach_xpeer.cxx +=================================================================== +RCS file: /cvs/gsl/vcl/unx/source/gdi/gcach_xpeer.cxx,v +retrieving revision 1.32.18.1 +retrieving revision 1.37 +diff -u -p -u -r1.32.18.1 -r1.37 +--- vcl/unx/source/gdi/gcach_xpeer.cxx 9 Jan 2004 18:14:01 -0000 1.32.18.1 ++++ vcl/unx/source/gdi/gcach_xpeer.cxx 4 Feb 2004 11:05:23 -0000 1.37 +@@ -61,6 +61,7 @@ + + #include <rtl/ustring.hxx> + #include <osl/module.h> ++#include <osl/thread.h> + using namespace rtl; + + #include <gcach_xpeer.hxx> +@@ -138,7 +139,7 @@ void X11GlyphPeer::SetDisplay( Display* + if( !pRenderLib ) { + #ifdef DEBUG + fprintf( stderr, "Display can do XRender, but no %s installed.\n" +- "Please install for improved display performance\n", xrenderLibraryName.getStr() ); ++ "Please install for improved display performance\n", OUStringToOString( xrenderLibraryName.getStr(), osl_getThreadTextEncoding() ).getStr() ); + #endif + return; + } +@@ -296,15 +297,16 @@ void X11GlyphPeer::RemovingGlyph( Server + + case XRENDER_KIND: + { ++/* ++ // TODO: reenable when it works without problems + Glyph nGlyphId = (Glyph)rGlyphData.GetExtPointer(); + // XRenderFreeGlyphs not implemented yet for version<=0.2 + // #108209# disabled because of crash potential, + // the glyph leak is not too bad because they will + // be cleaned up when the glyphset is released +-#if 0 // TODO: reenable when it works without problems + if( nRenderVersion >= 0x05 ) + (*pXRenderFreeGlyphs)( mpDisplay, aGlyphSet, &nGlyphId, 1 ); +-#endif ++*/ + mnBytesUsed -= nHeight * ((nWidth + 3) & ~3); + } + break; +@@ -331,7 +333,7 @@ bool X11GlyphPeer::ForcedAntialiasing( c + GlyphSet X11GlyphPeer::GetGlyphSet( ServerFont& rServerFont ) + { + if( !mbUsingXRender ) +- return NULL; ++ return 0; + + GlyphSet aGlyphSet; + +@@ -354,12 +356,12 @@ GlyphSet X11GlyphPeer::GetGlyphSet( Serv + rServerFont.SetExtended( XRENDER_KIND, (void*)aGlyphSet ); + } + else +- aGlyphSet = NULL; ++ aGlyphSet = 0; + } + break; + + default: +- aGlyphSet = NULL; ++ aGlyphSet = 0; + break; + } + +@@ -381,7 +383,7 @@ Pixmap X11GlyphPeer::GetPixmap( ServerFo + { + // #94666# circumvent bug in some X11 systems, e.g. XF410.LynxEM.v163 + ULONG nPixmapWidth = 8 * maRawBitmap.mnScanlineSize - 1; +- nPixmapWidth = std::max( nPixmapWidth, maRawBitmap.mnWidth ); ++ nPixmapWidth = Max( nPixmapWidth, maRawBitmap.mnWidth ); + + rGlyphData.SetSize( Size( nPixmapWidth, maRawBitmap.mnHeight ) ); + rGlyphData.SetOffset( +maRawBitmap.mnXOffset, +maRawBitmap.mnYOffset ); +Index: vcl/unx/source/gdi/kdeint.cxx +=================================================================== +RCS file: /cvs/gsl/vcl/unx/source/gdi/kdeint.cxx,v +retrieving revision 1.10 +retrieving revision 1.12 +diff -u -p -u -r1.10 -r1.12 +--- vcl/unx/source/gdi/kdeint.cxx 16 Jul 2003 17:46:57 -0000 1.10 ++++ vcl/unx/source/gdi/kdeint.cxx 6 Jan 2004 14:37:00 -0000 1.12 +@@ -60,18 +60,18 @@ + ************************************************************************/ + + #include <kdeint.hxx> +-#include <config.hxx> ++#include <tools/config.hxx> + #include <settings.hxx> + + #include <osl/thread.h> + + #include <unistd.h> ++#include <cstdio> + + using namespace rtl; + using namespace osl; + +-KDEIntegrator::KDEIntegrator( SalFrame* pFrame ) : +- DtIntegrator( pFrame ) ++KDEIntegrator::KDEIntegrator() + { + meType = DtKDE; + } +@@ -80,7 +80,7 @@ KDEIntegrator::~KDEIntegrator() + { + } + +-static char* pTryFiles[] = ++static const char* pTryFiles[] = + { + "/usr/share/config/kdeglobals", + "/opt/kde/share/config/kdeglobals", +@@ -93,7 +93,7 @@ void KDEIntegrator::GetSystemLook( AllSe + { + rtl_TextEncoding aEncoding = osl_getThreadTextEncoding(); + +- for( int i = 0; (i < sizeof( pTryFiles )/sizeof(pTryFiles[0])); i++ ) ++ for( unsigned int i = 0; (i < sizeof( pTryFiles )/sizeof(pTryFiles[0])); i++ ) + { + String aFile; + if( pTryFiles[i][0] == '~' ) +Index: vcl/unx/source/gdi/makefile.mk +=================================================================== +RCS file: /cvs/gsl/vcl/unx/source/gdi/makefile.mk,v +retrieving revision 1.9 +retrieving revision 1.13 +diff -u -p -u -r1.9 -r1.13 +--- vcl/unx/source/gdi/makefile.mk 27 Aug 2002 14:52:35 -0000 1.9 ++++ vcl/unx/source/gdi/makefile.mk 10 May 2004 15:58:32 -0000 1.13 +@@ -80,24 +80,29 @@ dummy: + + .ELSE # "$(GUIBASE)"!="unx" + +-.IF "$(remote)"=="" + SLOFILES= \ + $(SLO)$/salgdi2.obj \ + $(SLO)$/salbmp.obj \ + $(SLO)$/salgdi.obj \ + $(SLO)$/salvd.obj \ + $(SLO)$/salogl.obj \ +- $(SLO)$/charnames.obj \ + $(SLO)$/dtint.obj \ +- $(SLO)$/kdeint.obj \ +- $(SLO)$/gnomeint.obj \ + $(SLO)$/salcvt.obj \ +- $(SLO)$/ansi1252.obj \ + $(SLO)$/xfont.obj \ + $(SLO)$/xlfd_attr.obj \ + $(SLO)$/xlfd_extd.obj \ + $(SLO)$/xlfd_smpl.obj \ +- $(SLO)$/salgdi3.obj ++ $(SLO)$/salgdi3.obj \ ++ $(SLO)$/pspgraphics.obj ++ ++.IF "$(WITH_WIDGETSET)"=="kde" ++ # salnativewidgets-kde.cxx contains own implementation of KDEintegrator ++ SLOFILES+=$(SLO)/salnativewidgets-kde.obj ++ CFLAGS+=$(WIDGETSET_CFLAGS) ++.ELSE ++ SLOFILES+= \ ++ $(SLO)$/kdeint.obj ++.ENDIF + + .IF "$(USE_XPRINT)" == "TRUE" + CFLAGS+=-D_USE_PRINT_EXTENSION_=1 +@@ -113,8 +118,6 @@ ENVCFLAGS+=-DUSE_CDE + + .IF "$(USE_BUILTIN_RASTERIZER)" != "" + SLOFILES+= $(SLO)$/gcach_xpeer.obj +-.ENDIF +- + .ENDIF + + .ENDIF # "$(GUIBASE)"!="unx" +Index: vcl/unx/source/gdi/pspgraphics.cxx +=================================================================== +RCS file: vcl/unx/source/gdi/pspgraphics.cxx +diff -N vcl/unx/source/gdi/pspgraphics.cxx +--- /dev/null 1 Jan 1970 00:00:00 -0000 ++++ vcl/unx/source/gdi/pspgraphics.cxx 17 Jun 2004 12:28:07 -0000 1.4 +@@ -0,0 +1,1355 @@ ++/************************************************************************* ++ * ++ * ++ * ++ * ++ * ++ * ++ * ++ * The Contents of this file are made available subject to the terms of ++ * either of the following licenses ++ * ++ * - GNU Lesser General Public License Version 2.1 ++ * - Sun Industry Standards Source License Version 1.1 ++ * ++ * Sun Microsystems Inc., October, 2000 ++ * ++ * GNU Lesser General Public License Version 2.1 ++ * ============================================= ++ * Copyright 2000 by Sun Microsystems, Inc. ++ * 901 San Antonio Road, Palo Alto, CA 94303, USA ++ * ++ * This library is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU Lesser General Public ++ * License version 2.1, as published by the Free Software Foundation. ++ * ++ * This library is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * Lesser General Public License for more details. ++ * ++ * You should have received a copy of the GNU Lesser General Public ++ * License along with this library; if not, write to the Free Software ++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, ++ * MA 02111-1307 USA ++ * ++ * ++ * Sun Industry Standards Source License Version 1.1 ++ * ================================================= ++ * The contents of this file are subject to the Sun Industry Standards ++ * Source License Version 1.1 (the "License"); You may not use this file ++ * except in compliance with the License. You may obtain a copy of the ++ * License at http://www.openoffice.org/license.html. ++ * ++ * Software provided under this License is provided on an "AS IS" basis, ++ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, ++ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, ++ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. ++ * See the License for the specific provisions governing your rights and ++ * obligations concerning the Software. ++ * ++ * The Initial Developer of the Original Code is: Sun Microsystems, Inc. ++ * ++ * Copyright: 2000 by Sun Microsystems, Inc. ++ * ++ * All Rights Reserved. ++ * ++ * Contributor(s): _______________________________________ ++ * ++ * ++ ************************************************************************/ ++ ++#include <pspgraphics.h> ++#include <psprint/jobdata.hxx> ++#include <psprint/printergfx.hxx> ++#include <psprint/printerinfomanager.hxx> ++#include <bmpacc.hxx> ++#include <salbmp.hxx> ++#include <glyphcache.hxx> ++#include <svapp.hxx> ++ ++#include <stdlib.h> ++#include <unistd.h> ++#include <fcntl.h> ++#include <sys/mman.h> ++#include <sys/stat.h> ++#include <sys/types.h> ++ ++using namespace psp; ++using namespace rtl; ++ ++// ----- Implementation of PrinterBmp by means of SalBitmap/BitmapBuffer --------------- ++ ++class SalPrinterBmp : public psp::PrinterBmp ++{ ++ private: ++ BitmapBuffer* mpBmpBuffer; ++ ++ FncGetPixel mpFncGetPixel; ++ Scanline mpScanAccess; ++ sal_Int32 mnScanOffset; ++ ++ sal_uInt32 ColorOf (BitmapColor& rColor) const; ++ sal_uInt8 GrayOf (BitmapColor& rColor) const; ++ ++ SalPrinterBmp (); ++ ++ public: ++ ++ SalPrinterBmp (BitmapBuffer* pBitmap); ++ virtual ~SalPrinterBmp (); ++ virtual sal_uInt32 GetPaletteColor (sal_uInt32 nIdx) const; ++ virtual sal_uInt32 GetPaletteEntryCount () const; ++ virtual sal_uInt32 GetPixelRGB (sal_uInt32 nRow, sal_uInt32 nColumn) const; ++ virtual sal_uInt8 GetPixelGray (sal_uInt32 nRow, sal_uInt32 nColumn) const; ++ virtual sal_uInt8 GetPixelIdx (sal_uInt32 nRow, sal_uInt32 nColumn) const; ++ virtual sal_uInt32 GetWidth () const; ++ virtual sal_uInt32 GetHeight() const; ++ virtual sal_uInt32 GetDepth () const; ++}; ++ ++SalPrinterBmp::SalPrinterBmp (BitmapBuffer* pBuffer) : ++ mpBmpBuffer (pBuffer) ++{ ++ DBG_ASSERT (mpBmpBuffer, "SalPrinterBmp::SalPrinterBmp () can't acquire Bitmap"); ++ ++ // calibrate scanline buffer ++ if( BMP_SCANLINE_ADJUSTMENT( mpBmpBuffer->mnFormat ) == BMP_FORMAT_TOP_DOWN ) ++ { ++ mpScanAccess = mpBmpBuffer->mpBits; ++ mnScanOffset = mpBmpBuffer->mnScanlineSize; ++ } ++ else ++ { ++ mpScanAccess = mpBmpBuffer->mpBits ++ + (mpBmpBuffer->mnHeight - 1) * mpBmpBuffer->mnScanlineSize; ++ mnScanOffset = - mpBmpBuffer->mnScanlineSize; ++ } ++ ++ // request read access to the pixels ++ switch( BMP_SCANLINE_FORMAT( mpBmpBuffer->mnFormat ) ) ++ { ++ case BMP_FORMAT_1BIT_MSB_PAL: ++ mpFncGetPixel = BitmapReadAccess::GetPixelFor_1BIT_MSB_PAL; break; ++ case BMP_FORMAT_1BIT_LSB_PAL: ++ mpFncGetPixel = BitmapReadAccess::GetPixelFor_1BIT_LSB_PAL; break; ++ case BMP_FORMAT_4BIT_MSN_PAL: ++ mpFncGetPixel = BitmapReadAccess::GetPixelFor_4BIT_MSN_PAL; break; ++ case BMP_FORMAT_4BIT_LSN_PAL: ++ mpFncGetPixel = BitmapReadAccess::GetPixelFor_4BIT_LSN_PAL; break; ++ case BMP_FORMAT_8BIT_PAL: ++ mpFncGetPixel = BitmapReadAccess::GetPixelFor_8BIT_PAL; break; ++ case BMP_FORMAT_8BIT_TC_MASK: ++ mpFncGetPixel = BitmapReadAccess::GetPixelFor_8BIT_TC_MASK; break; ++ case BMP_FORMAT_16BIT_TC_MSB_MASK: ++ mpFncGetPixel = BitmapReadAccess::GetPixelFor_16BIT_TC_MSB_MASK; break; ++ case BMP_FORMAT_16BIT_TC_LSB_MASK: ++ mpFncGetPixel = BitmapReadAccess::GetPixelFor_16BIT_TC_LSB_MASK; break; ++ case BMP_FORMAT_24BIT_TC_BGR: ++ mpFncGetPixel = BitmapReadAccess::GetPixelFor_24BIT_TC_BGR; break; ++ case BMP_FORMAT_24BIT_TC_RGB: ++ mpFncGetPixel = BitmapReadAccess::GetPixelFor_24BIT_TC_RGB; break; ++ case BMP_FORMAT_24BIT_TC_MASK: ++ mpFncGetPixel = BitmapReadAccess::GetPixelFor_24BIT_TC_MASK; break; ++ case BMP_FORMAT_32BIT_TC_ABGR: ++ mpFncGetPixel = BitmapReadAccess::GetPixelFor_32BIT_TC_ABGR; break; ++ case BMP_FORMAT_32BIT_TC_ARGB: ++ mpFncGetPixel = BitmapReadAccess::GetPixelFor_32BIT_TC_ARGB; break; ++ case BMP_FORMAT_32BIT_TC_BGRA: ++ mpFncGetPixel = BitmapReadAccess::GetPixelFor_32BIT_TC_BGRA; break; ++ case BMP_FORMAT_32BIT_TC_RGBA: ++ mpFncGetPixel = BitmapReadAccess::GetPixelFor_32BIT_TC_RGBA; break; ++ case BMP_FORMAT_32BIT_TC_MASK: ++ mpFncGetPixel = BitmapReadAccess::GetPixelFor_32BIT_TC_MASK; break; ++ ++ default: ++ DBG_ERROR("Error: SalPrinterBmp::SalPrinterBmp() unknown bitmap format"); ++ break; ++ } ++} ++ ++SalPrinterBmp::~SalPrinterBmp () ++{ ++} ++ ++sal_uInt32 ++SalPrinterBmp::GetWidth () const ++{ ++ return mpBmpBuffer->mnWidth; ++} ++ ++sal_uInt32 ++SalPrinterBmp::GetHeight () const ++{ ++ return mpBmpBuffer->mnHeight; ++} ++ ++sal_uInt32 ++SalPrinterBmp::GetDepth () const ++{ ++ sal_uInt32 nDepth; ++ ++ switch (mpBmpBuffer->mnBitCount) ++ { ++ case 1: ++ nDepth = 1; ++ break; ++ ++ case 4: ++ case 8: ++ nDepth = 8; ++ break; ++ ++ case 16: ++ case 24: ++ case 32: ++ nDepth = 24; ++ break; ++ ++ default: ++ DBG_ERROR ("Error: unsupported bitmap depth in SalPrinterBmp::GetDepth()"); ++ break; ++ } ++ ++ return nDepth; ++} ++ ++sal_uInt32 ++SalPrinterBmp::ColorOf (BitmapColor& rColor) const ++{ ++ if (rColor.IsIndex()) ++ return ColorOf (mpBmpBuffer->maPalette[rColor.GetIndex()]); ++ else ++ return ((rColor.GetBlue()) & 0x000000ff) ++ | ((rColor.GetGreen() << 8) & 0x0000ff00) ++ | ((rColor.GetRed() << 16) & 0x00ff0000); ++} ++ ++sal_uInt8 ++SalPrinterBmp::GrayOf (BitmapColor& rColor) const ++{ ++ if (rColor.IsIndex()) ++ return GrayOf (mpBmpBuffer->maPalette[rColor.GetIndex()]); ++ else ++ return ( rColor.GetBlue() * 28UL ++ + rColor.GetGreen() * 151UL ++ + rColor.GetRed() * 77UL ) >> 8; ++} ++ ++sal_uInt32 ++SalPrinterBmp::GetPaletteEntryCount () const ++{ ++ return mpBmpBuffer->maPalette.GetEntryCount (); ++} ++ ++sal_uInt32 ++SalPrinterBmp::GetPaletteColor (sal_uInt32 nIdx) const ++{ ++ return ColorOf (mpBmpBuffer->maPalette[nIdx]); ++} ++ ++sal_uInt32 ++SalPrinterBmp::GetPixelRGB (sal_uInt32 nRow, sal_uInt32 nColumn) const ++{ ++ Scanline pScan = mpScanAccess + nRow * mnScanOffset; ++ BitmapColor aColor = mpFncGetPixel (pScan, nColumn, mpBmpBuffer->maColorMask); ++ ++ return ColorOf (aColor); ++} ++ ++sal_uInt8 ++SalPrinterBmp::GetPixelGray (sal_uInt32 nRow, sal_uInt32 nColumn) const ++{ ++ Scanline pScan = mpScanAccess + nRow * mnScanOffset; ++ BitmapColor aColor = mpFncGetPixel (pScan, nColumn, mpBmpBuffer->maColorMask); ++ ++ return GrayOf (aColor); ++} ++ ++sal_uInt8 ++SalPrinterBmp::GetPixelIdx (sal_uInt32 nRow, sal_uInt32 nColumn) const ++{ ++ Scanline pScan = mpScanAccess + nRow * mnScanOffset; ++ BitmapColor aColor = mpFncGetPixel (pScan, nColumn, mpBmpBuffer->maColorMask); ++ ++ if (aColor.IsIndex()) ++ return aColor.GetIndex(); ++ else ++ return 0; ++} ++ ++/******************************************************* ++ * PspGraphics * ++ *******************************************************/ ++ ++PspGraphics::~PspGraphics() ++{ ++} ++ ++void PspGraphics::GetResolution( sal_Int32 &rDPIX, sal_Int32 &rDPIY ) ++{ ++ if (m_pJobData != NULL) ++ { ++ int x = m_pJobData->m_aContext.getRenderResolution(); ++ ++ rDPIX = x; ++ rDPIY = x; ++ } ++} ++ ++void PspGraphics::GetScreenFontResolution( sal_Int32 &rDPIX, sal_Int32 &rDPIY ) ++{ ++ m_pPrinterGfx->GetScreenFontResolution (rDPIX, rDPIY); ++} ++ ++USHORT PspGraphics::GetBitCount() ++{ ++ return m_pPrinterGfx->GetBitCount(); ++} ++ ++long PspGraphics::GetGraphicsWidth() ++{ ++ return 0; ++} ++ ++void PspGraphics::ResetClipRegion() ++{ ++ m_pPrinterGfx->ResetClipRegion (); ++} ++ ++void PspGraphics::BeginSetClipRegion( ULONG n ) ++{ ++ m_pPrinterGfx->BeginSetClipRegion(n); ++} ++ ++BOOL PspGraphics::unionClipRegion( long nX, long nY, long nDX, long nDY ) ++{ ++ return (BOOL)m_pPrinterGfx->UnionClipRegion (nX, nY, nDX, nDY); ++} ++ ++void PspGraphics::EndSetClipRegion() ++{ ++ m_pPrinterGfx->EndSetClipRegion (); ++} ++ ++void PspGraphics::SetLineColor() ++{ ++ m_pPrinterGfx->SetLineColor (); ++} ++ ++void PspGraphics::SetLineColor( SalColor nSalColor ) ++{ ++ psp::PrinterColor aColor (SALCOLOR_RED (nSalColor), ++ SALCOLOR_GREEN (nSalColor), ++ SALCOLOR_BLUE (nSalColor)); ++ m_pPrinterGfx->SetLineColor (aColor); ++} ++ ++void PspGraphics::SetFillColor() ++{ ++ m_pPrinterGfx->SetFillColor (); ++} ++ ++void PspGraphics::SetFillColor( SalColor nSalColor ) ++{ ++ psp::PrinterColor aColor (SALCOLOR_RED (nSalColor), ++ SALCOLOR_GREEN (nSalColor), ++ SALCOLOR_BLUE (nSalColor)); ++ m_pPrinterGfx->SetFillColor (aColor); ++} ++ ++void PspGraphics::SetROPLineColor( SalROPColor nROPColor ) ++{ ++ DBG_ASSERT( 0, "Error: PrinterGfx::SetROPLineColor() not implemented" ); ++} ++ ++void PspGraphics::SetROPFillColor( SalROPColor nROPColor ) ++{ ++ DBG_ASSERT( 0, "Error: PrinterGfx::SetROPFillColor() not implemented" ); ++} ++ ++void PspGraphics::SetXORMode( BOOL bSet ) ++{ ++ DBG_ASSERT( !bSet, "Error: PrinterGfx::SetXORMode() not implemented" ); ++} ++ ++void PspGraphics::drawPixel( long nX, long nY ) ++{ ++ m_pPrinterGfx->DrawPixel (Point(nX, nY)); ++} ++ ++void PspGraphics::drawPixel( long nX, long nY, SalColor nSalColor ) ++{ ++ psp::PrinterColor aColor (SALCOLOR_RED (nSalColor), ++ SALCOLOR_GREEN (nSalColor), ++ SALCOLOR_BLUE (nSalColor)); ++ m_pPrinterGfx->DrawPixel (Point(nX, nY), aColor); ++} ++ ++void PspGraphics::drawLine( long nX1, long nY1, long nX2, long nY2 ) ++{ ++ m_pPrinterGfx->DrawLine (Point(nX1, nY1), Point(nX2, nY2)); ++} ++ ++void PspGraphics::drawRect( long nX, long nY, long nDX, long nDY ) ++{ ++ m_pPrinterGfx->DrawRect (Rectangle(Point(nX, nY), Size(nDX, nDY))); ++} ++ ++void PspGraphics::drawPolyLine( ULONG nPoints, const SalPoint *pPtAry ) ++{ ++ m_pPrinterGfx->DrawPolyLine (nPoints, (Point*)pPtAry); ++} ++ ++void PspGraphics::drawPolygon( ULONG nPoints, const SalPoint* pPtAry ) ++{ ++ // Point must be equal to SalPoint! see vcl/inc/salgtype.hxx ++ m_pPrinterGfx->DrawPolygon (nPoints, (Point*)pPtAry); ++} ++ ++void PspGraphics::drawPolyPolygon( ULONG nPoly, ++ const ULONG *pPoints, ++ PCONSTSALPOINT *pPtAry ) ++{ ++ m_pPrinterGfx->DrawPolyPolygon (nPoly, pPoints, (const Point**)pPtAry); ++} ++ ++sal_Bool PspGraphics::drawPolyLineBezier( ULONG nPoints, const SalPoint* pPtAry, const BYTE* pFlgAry ) ++{ ++ m_pPrinterGfx->DrawPolyLineBezier (nPoints, (Point*)pPtAry, pFlgAry); ++ return sal_True; ++} ++ ++sal_Bool PspGraphics::drawPolygonBezier( ULONG nPoints, const SalPoint* pPtAry, const BYTE* pFlgAry ) ++{ ++ m_pPrinterGfx->DrawPolygonBezier (nPoints, (Point*)pPtAry, pFlgAry); ++ return sal_True; ++} ++ ++sal_Bool PspGraphics::drawPolyPolygonBezier( ULONG nPoly, ++ const ULONG* pPoints, ++ const SalPoint* const* pPtAry, ++ const BYTE* const* pFlgAry ) ++{ ++ // Point must be equal to SalPoint! see vcl/inc/salgtype.hxx ++ m_pPrinterGfx->DrawPolyPolygonBezier (nPoly, pPoints, (Point**)pPtAry, (BYTE**)pFlgAry); ++ return sal_True; ++} ++ ++void PspGraphics::invert( ULONG nPoints, ++ const SalPoint* pPtAry, ++ SalInvert nFlags ) ++{ ++ DBG_ASSERT( 0, "Error: PrinterGfx::Invert() not implemented" ); ++} ++BOOL PspGraphics::drawEPS( long nX, long nY, long nWidth, long nHeight, void* pPtr, ULONG nSize ) ++{ ++ return m_pPrinterGfx->DrawEPS( Rectangle( Point( nX, nY ), Size( nWidth, nHeight ) ), pPtr, nSize ); ++} ++ ++void PspGraphics::copyBits( const SalTwoRect *pPosAry, ++ SalGraphics *pSSrcGraphics ) ++{ ++ DBG_ERROR( "Error: PrinterGfx::CopyBits() not implemented" ); ++} ++ ++void PspGraphics::copyArea ( long nDestX, long nDestY, ++ long nSrcX, long nSrcY, ++ long nSrcWidth, long nSrcHeight, ++ USHORT nFlags ) ++{ ++ DBG_ERROR( "Error: PrinterGfx::CopyArea() not implemented" ); ++} ++ ++void PspGraphics::drawBitmap( const SalTwoRect* pPosAry, const SalBitmap& rSalBitmap ) ++{ ++ Rectangle aSrc (Point(pPosAry->mnSrcX, pPosAry->mnSrcY), ++ Size(pPosAry->mnSrcWidth, pPosAry->mnSrcHeight)); ++ Rectangle aDst (Point(pPosAry->mnDestX, pPosAry->mnDestY), ++ Size(pPosAry->mnDestWidth, pPosAry->mnDestHeight)); ++ ++ BitmapBuffer* pBuffer= const_cast<SalBitmap&>(rSalBitmap).AcquireBuffer(sal_True); ++ ++ SalPrinterBmp aBmp (pBuffer); ++ m_pPrinterGfx->DrawBitmap (aDst, aSrc, aBmp); ++ ++ const_cast<SalBitmap&>(rSalBitmap).ReleaseBuffer (pBuffer, sal_True); ++} ++ ++void PspGraphics::drawBitmap( const SalTwoRect* pPosAry, ++ const SalBitmap& rSalBitmap, ++ const SalBitmap& rTransBitmap ) ++{ ++ DBG_ERROR("Error: no PrinterGfx::DrawBitmap() for transparent bitmap"); ++} ++ ++void PspGraphics::drawBitmap( const SalTwoRect* pPosAry, ++ const SalBitmap& rSalBitmap, ++ SalColor nTransparentColor ) ++{ ++ DBG_ERROR("Error: no PrinterGfx::DrawBitmap() for transparent color"); ++} ++ ++void PspGraphics::drawMask( const SalTwoRect* pPosAry, ++ const SalBitmap &rSalBitmap, ++ SalColor nMaskColor ) ++{ ++ DBG_ERROR("Error: PrinterGfx::DrawMask() not implemented"); ++} ++ ++SalBitmap* PspGraphics::getBitmap( long nX, long nY, long nDX, long nDY ) ++{ ++ DBG_WARNING ("Warning: PrinterGfx::GetBitmap() not implemented"); ++ return NULL; ++} ++ ++SalColor PspGraphics::getPixel( long nX, long nY ) ++{ ++ DBG_ERROR ("Warning: PrinterGfx::GetPixel() not implemented"); ++ return 0; ++} ++ ++void PspGraphics::invert( ++ long nX, ++ long nY, ++ long nDX, ++ long nDY, ++ SalInvert nFlags ) ++{ ++ DBG_ERROR ("Warning: PrinterGfx::Invert() not implemented"); ++} ++ ++/* ++ * returns: ++ * true: cut out positions rStart to rStop from output because fax number was swallowed ++ * false: do nothing ++ */ ++ ++String PspGraphics::FaxPhoneComment( const String& rOrig, xub_StrLen nIndex, xub_StrLen& rLen, xub_StrLen& rCutStart, xub_StrLen& rCutStop ) const ++{ ++ rCutStop = rCutStart = STRING_NOTFOUND; ++ ++ if( ! m_pPhoneNr ) ++ return String( rOrig ); ++ ++#define FAX_PHONE_TOKEN "@@#" ++#define FAX_PHONE_TOKEN_LENGTH 3 ++#define FAX_END_TOKEN "@@" ++#define FAX_END_TOKEN_LENGTH 2 ++ ++ bool bRet = false; ++ bool bStarted = false; ++ bool bStopped = false; ++ USHORT nPos; ++ USHORT nStart = 0; ++ USHORT nStop = rLen; ++ String aPhone = rOrig.Copy( nIndex, rLen ); ++ ++ static String aPhoneNumber; ++ static bool bIsCollecting = false; ++ ++ if( ! bIsCollecting ) ++ { ++ if( ( nPos = aPhone.SearchAscii( FAX_PHONE_TOKEN ) ) != STRING_NOTFOUND ) ++ { ++ nStart = nPos; ++ bIsCollecting = true; ++ aPhoneNumber.Erase(); ++ bRet = true; ++ bStarted = true; ++ } ++ } ++ if( bIsCollecting ) ++ { ++ bRet = true; ++ nPos = bStarted ? nStart + FAX_PHONE_TOKEN_LENGTH : 0; ++ if( ( nPos = aPhone.SearchAscii( FAX_END_TOKEN, nPos ) ) != STRING_NOTFOUND ) ++ { ++ bIsCollecting = false; ++ nStop = nPos + FAX_END_TOKEN_LENGTH; ++ bStopped = true; ++ } ++ int nTokenStart = nStart + (bStarted ? FAX_PHONE_TOKEN_LENGTH : 0); ++ int nTokenStop = nStop - (bStopped ? FAX_END_TOKEN_LENGTH : 0); ++ aPhoneNumber += aPhone.Copy( nTokenStart, nTokenStop - nTokenStart ); ++ if( ! bIsCollecting ) ++ { ++ *m_pPhoneNr = aPhoneNumber; ++ aPhoneNumber.Erase(); ++ } ++ } ++ if( aPhoneNumber.Len() > 1024 ) ++ { ++ bIsCollecting = false; ++ aPhoneNumber.Erase(); ++ bRet = false; ++ } ++ ++ String aRet; ++ if( bRet && m_bSwallowFaxNo ) ++ { ++ rLen -= nStop - nStart; ++ rCutStart = nStart+nIndex; ++ rCutStop = nStop+nIndex; ++ if( rCutStart ) ++ aRet = rOrig.Copy( 0, rCutStart ); ++ aRet += rOrig.Copy( rCutStop ); ++ } ++ else ++ aRet = rOrig; ++ ++ return aRet; ++} ++ ++class PspFontLayout : public GenericSalLayout ++{ ++public: ++ PspFontLayout( ::psp::PrinterGfx& ); ++ virtual bool LayoutText( ImplLayoutArgs& ); ++ virtual void InitFont() const; ++ virtual void DrawText( SalGraphics& ) const; ++private: ++ ::psp::PrinterGfx& mrPrinterGfx; ++ int mnFontID; ++ int mnFontHeight; ++ int mnFontWidth; ++ bool mbVertical; ++ bool mbArtItalic; ++ bool mbArtBold; ++}; ++ ++//-------------------------------------------------------------------------- ++ ++PspFontLayout::PspFontLayout( ::psp::PrinterGfx& rGfx ) ++: mrPrinterGfx( rGfx ) ++{ ++ mnFontID = mrPrinterGfx.GetFontID(); ++ mnFontHeight = mrPrinterGfx.GetFontHeight(); ++ mnFontWidth = mrPrinterGfx.GetFontWidth(); ++ mbVertical = mrPrinterGfx.GetFontVertical(); ++ mbArtItalic = mrPrinterGfx.GetArtificialItalic(); ++ mbArtBold = mrPrinterGfx.GetArtificialBold(); ++} ++ ++//-------------------------------------------------------------------------- ++ ++bool PspFontLayout::LayoutText( ImplLayoutArgs& rArgs ) ++{ ++ mbVertical = ((rArgs.mnFlags & SAL_LAYOUT_VERTICAL) != 0); ++ ++ long nUnitsPerPixel = 1; ++ int nOldGlyphId = -1; ++ long nGlyphWidth = 0; ++ int nCharPos = -1; ++ Point aNewPos( 0, 0 ); ++ GlyphItem aPrevItem; ++ rtl_TextEncoding aFontEnc = mrPrinterGfx.GetFontMgr().getFontEncoding( mnFontID ); ++ for(;;) ++ { ++ bool bRightToLeft; ++ if( !rArgs.GetNextPos( &nCharPos, &bRightToLeft ) ) ++ break; ++ ++ sal_Unicode cChar = rArgs.mpStr[ nCharPos ]; ++ if( bRightToLeft ) ++ cChar = GetMirroredChar( cChar ); ++ // symbol font aliasing: 0x0020-0x00ff -> 0xf020 -> 0xf0ff ++ if( aFontEnc == RTL_TEXTENCODING_SYMBOL ) ++ if( cChar < 256 ) ++ cChar += 0xf000; ++ int nGlyphIndex = cChar; // printer glyphs = unicode ++ ++ // update fallback_runs if needed ++ psp::CharacterMetric aMetric; ++ mrPrinterGfx.GetFontMgr().getMetrics( mnFontID, cChar, cChar, &aMetric, mbVertical ); ++ if( aMetric.width == -1 && aMetric.height == -1 ) ++ rArgs.NeedFallback( nCharPos, bRightToLeft ); ++ ++ // apply pair kerning to prev glyph if requested ++ if( SAL_LAYOUT_KERNING_PAIRS & rArgs.mnFlags ) ++ { ++ if( nOldGlyphId > 0 ) ++ { ++ const std::list< KernPair >& rKernPairs = mrPrinterGfx.getKernPairs(mbVertical); ++ for( std::list< KernPair >::const_iterator it = rKernPairs.begin(); ++ it != rKernPairs.end(); ++it ) ++ { ++ if( it->first == nOldGlyphId && it->second == nGlyphIndex ) ++ { ++ int nTextScale = mrPrinterGfx.GetFontWidth(); ++ if( ! nTextScale ) ++ nTextScale = mrPrinterGfx.GetFontHeight(); ++ int nKern = (mbVertical ? it->kern_y : it->kern_x) * nTextScale; ++ nGlyphWidth += nKern; ++ aPrevItem.mnNewWidth = nGlyphWidth; ++ break; ++ } ++ } ++ } ++ } ++ ++ // finish previous glyph ++ if( nOldGlyphId >= 0 ) ++ AppendGlyph( aPrevItem ); ++ nOldGlyphId = nGlyphIndex; ++ aNewPos.X() += nGlyphWidth; ++ ++ // prepare GlyphItem for appending it in next round ++ nUnitsPerPixel = mrPrinterGfx.GetCharWidth( cChar, cChar, &nGlyphWidth ); ++ int nGlyphFlags = bRightToLeft ? GlyphItem::IS_RTL_GLYPH : 0; ++ nGlyphIndex |= GF_ISCHAR; ++ aPrevItem = GlyphItem( nCharPos, nGlyphIndex, aNewPos, nGlyphFlags, nGlyphWidth ); ++ } ++ ++ // append last glyph item if any ++ if( nOldGlyphId >= 0 ) ++ AppendGlyph( aPrevItem ); ++ ++ SetOrientation( mrPrinterGfx.GetFontAngle() ); ++ SetUnitsPerPixel( nUnitsPerPixel ); ++ return (nOldGlyphId >= 0); ++} ++ ++class PspServerFontLayout : public ServerFontLayout ++{ ++public: ++ PspServerFontLayout( ::psp::PrinterGfx&, ServerFont& rFont ); ++ ++ virtual void InitFont() const; ++private: ++ ::psp::PrinterGfx& mrPrinterGfx; ++ int mnFontID; ++ int mnFontHeight; ++ int mnFontWidth; ++ bool mbVertical; ++ bool mbArtItalic; ++ bool mbArtBold; ++}; ++ ++PspServerFontLayout::PspServerFontLayout( ::psp::PrinterGfx& rGfx, ServerFont& rFont ) ++ : ServerFontLayout( rFont ), ++ mrPrinterGfx( rGfx ) ++{ ++ mnFontID = mrPrinterGfx.GetFontID(); ++ mnFontHeight = mrPrinterGfx.GetFontHeight(); ++ mnFontWidth = mrPrinterGfx.GetFontWidth(); ++ mbVertical = mrPrinterGfx.GetFontVertical(); ++ mbArtItalic = mrPrinterGfx.GetArtificialItalic(); ++ mbArtBold = mrPrinterGfx.GetArtificialBold(); ++} ++ ++void PspServerFontLayout::InitFont() const ++{ ++ mrPrinterGfx.SetFont( mnFontID, mnFontHeight, mnFontWidth, ++ mnOrientation, mbVertical, mbArtItalic, mbArtBold ); ++} ++ ++//-------------------------------------------------------------------------- ++ ++void DrawPrinterLayout( const SalLayout& rLayout, ::psp::PrinterGfx& rGfx ) ++{ ++ const int nMaxGlyphs = 200; ++ sal_Int32 aGlyphAry[ nMaxGlyphs ]; ++ sal_Int32 aWidthAry[ nMaxGlyphs ]; ++ sal_Int32 aIdxAry [ nMaxGlyphs ]; ++ sal_Unicode aUnicodes[ nMaxGlyphs ]; ++ Point aPos; ++ long nUnitsPerPixel = rLayout.GetUnitsPerPixel(); ++ for( int nStart = 0;; ) ++ { ++ int nGlyphCount = rLayout.GetNextGlyphs( nMaxGlyphs, aGlyphAry, aPos, nStart, aWidthAry ); ++ if( !nGlyphCount ) ++ break; ++ ++ sal_Int32 nXOffset = 0; ++ for( int i = 0; i < nGlyphCount; ++i ) ++ { ++ nXOffset += aWidthAry[ i ]; ++ aIdxAry[ i ] = nXOffset / nUnitsPerPixel; ++ sal_uInt32 nGlyphIdx = aGlyphAry[i] & (GF_IDXMASK | GF_ROTMASK); ++ aUnicodes[i] = (aGlyphAry[i] & GF_ISCHAR) ? nGlyphIdx : 0; ++ aGlyphAry[i] = nGlyphIdx; ++ } ++ ++ rGfx.DrawGlyphs( aPos, (sal_uInt32 *)aGlyphAry, aUnicodes, nGlyphCount, aIdxAry ); ++ } ++} ++ ++//-------------------------------------------------------------------------- ++ ++void PspFontLayout::InitFont() const ++{ ++ mrPrinterGfx.SetFont( mnFontID, mnFontHeight, mnFontWidth, ++ mnOrientation, mbVertical, mbArtItalic, mbArtBold ); ++} ++ ++//-------------------------------------------------------------------------- ++ ++void PspFontLayout::DrawText( SalGraphics& ) const ++{ ++ DrawPrinterLayout( *this, mrPrinterGfx ); ++} ++ ++void PspGraphics::DrawServerFontLayout( const ServerFontLayout& rLayout ) ++{ ++#ifdef USE_BUILTIN_RASTERIZER ++ // print complex text ++ DrawPrinterLayout( rLayout, *m_pPrinterGfx ); ++#endif ++} ++ ++ULONG PspGraphics::GetFontCodeRanges( sal_uInt32* pCodePairs ) const ++ ++{ ++ ULONG nPairs = 0; ++#ifdef USE_BUILTIN_RASTERIZER ++ if( m_pServerFont[0] ) ++ nPairs = m_pServerFont[0]->GetFontCodeRanges( pCodePairs ); ++#endif //USE_BUILTIN_RASTERIZER ++ return nPairs; ++} ++ ++USHORT PspGraphics::SetFont( ImplFontSelectData *pEntry, int nFallbackLevel ) ++{ ++ sal_Bool bVertical = pEntry->mbVertical; ++ sal_Int32 nID = pEntry->mpFontData ? (sal_Int32)pEntry->mpFontData->mpSysData : 0; ++ ++ bool bArtItalic = false; ++ bool bArtBold = false; ++ if( pEntry->meItalic == ITALIC_OBLIQUE || pEntry->meItalic == ITALIC_NORMAL ) ++ { ++ psp::italic::type eItalic = m_pPrinterGfx->GetFontMgr().getFontItalic( nID ); ++ if( eItalic != psp::italic::Italic && eItalic != psp::italic::Oblique ) ++ bArtItalic = true; ++ } ++ int nWeight = (int)pEntry->meWeight; ++ int nRealWeight = (int)m_pPrinterGfx->GetFontMgr().getFontWeight( nID ); ++ if( nRealWeight < nWeight-2 || ++ ( nRealWeight < (int)psp::weight::SemiBold && nWeight > (int)WEIGHT_NORMAL) ) ++ { ++ bArtBold = true; ++ } ++ ++ // also set the serverside font for layouting ++ m_bFontVertical = pEntry->mbVertical; ++ for( int i = nFallbackLevel; i < MAX_FALLBACK; ++i ) ++ { ++ if( m_pServerFont[i] != NULL ) ++ { ++ // old server side font is no longer referenced ++ GlyphCache::GetInstance().UncacheFont( *m_pServerFont[i] ); ++ m_pServerFont[i] = NULL; ++ } ++ } ++ ++ if( pEntry->mpFontData ) ++ { ++ // requesting a font provided by builtin rasterizer ++ ServerFont* pServerFont = GlyphCache::GetInstance().CacheFont( *pEntry ); ++ if( pServerFont != NULL ) ++ { ++ if( pServerFont->TestFont() ) ++ m_pServerFont[ nFallbackLevel ] = pServerFont; ++ else ++ GlyphCache::GetInstance().UncacheFont( *pServerFont ); ++ } ++ else ++ m_pServerFont[ nFallbackLevel ] = pServerFont; ++ } ++ ++ // set the printer font ++ return m_pPrinterGfx->SetFont( nID, ++ pEntry->mnHeight, ++ pEntry->mnWidth, ++ pEntry->mnOrientation, ++ pEntry->mbVertical, ++ bArtItalic, ++ bArtBold ++ ); ++} ++ ++void PspGraphics::SetTextColor( SalColor nSalColor ) ++{ ++ psp::PrinterColor aColor (SALCOLOR_RED (nSalColor), ++ SALCOLOR_GREEN (nSalColor), ++ SALCOLOR_BLUE (nSalColor)); ++ m_pPrinterGfx->SetTextColor (aColor); ++} ++ ++ImplFontData* PspGraphics::AddTempDevFont(const String& rFileURL, const String& rFontName ) ++{ ++ return NULL; ++} ++ ++void PspGraphics::GetDevFontList( ImplDevFontList *pList ) ++{ ++ const char* pLangBoost = NULL; ++ const LanguageType aLang = Application::GetSettings().GetUILanguage(); ++ switch( aLang ) ++ { ++ case LANGUAGE_JAPANESE: ++ pLangBoost = "jan"; // japanese is default ++ break; ++ case LANGUAGE_CHINESE: ++ case LANGUAGE_CHINESE_SIMPLIFIED: ++ case LANGUAGE_CHINESE_SINGAPORE: ++ pLangBoost = "zhs"; ++ break; ++ case LANGUAGE_CHINESE_TRADITIONAL: ++ case LANGUAGE_CHINESE_HONGKONG: ++ case LANGUAGE_CHINESE_MACAU: ++ pLangBoost = "zht"; ++ break; ++ case LANGUAGE_KOREAN: ++ case LANGUAGE_KOREAN_JOHAB: ++ pLangBoost = "kor"; ++ break; ++ } ++ ++ ::std::list< psp::fontID > aList; ++ const psp::PrintFontManager& rMgr = psp::PrintFontManager::get(); ++ rMgr.getFontList( aList, m_pJobData->m_pParser ); ++ ++ ::std::list< psp::fontID >::iterator it; ++ for (it = aList.begin(); it != aList.end(); ++it) ++ { ++ psp::FastPrintFontInfo aInfo; ++ if (rMgr.getFontFastInfo (*it, aInfo)) ++ { ++ ImplFontData *pFontData = new ImplFontData; ++ SetImplFontData( aInfo, *pFontData ); ++ pFontData->mpSysData = (void*)*it; ++ if( pFontData->maName.CompareIgnoreCaseToAscii( "itc ", 4 ) == COMPARE_EQUAL ) ++ pFontData->maName = pFontData->maName.Copy( 4 ); ++ if( aInfo.m_eType == psp::fonttype::TrueType ) ++ { ++ // prefer truetype fonts ++ pFontData->mnQuality += 10; ++ // asian type 1 fonts are not known ++ ByteString aFileName( rMgr.getFontFileSysPath( *it ) ); ++ int nPos = aFileName.SearchBackward( '_' ); ++ if( nPos == STRING_NOTFOUND || aFileName.GetChar( nPos+1 ) == '.' ) ++ pFontData->mnQuality += 5; ++ else ++ { ++ if( pLangBoost && aFileName.Copy( nPos+1, 3 ).EqualsIgnoreCaseAscii( pLangBoost ) ) ++ pFontData->mnQuality += 10; ++ } ++ } ++ pList->Add( pFontData ); ++ } ++ } ++} ++ ++void PspGraphics::GetDevFontSubstList( OutputDevice* pOutDev ) ++{ ++ const psp::PrinterInfo& rInfo = psp::PrinterInfoManager::get().getPrinterInfo( m_pJobData->m_aPrinterName ); ++ if( rInfo.m_bPerformFontSubstitution ) ++ { ++ for( std::hash_map< rtl::OUString, rtl::OUString, rtl::OUStringHash >::const_iterator it = rInfo.m_aFontSubstitutes.begin(); it != rInfo.m_aFontSubstitutes.end(); ++it ) ++ pOutDev->ImplAddDevFontSubstitute( it->first, it->second, FONT_SUBSTITUTE_ALWAYS ); ++ } ++} ++ ++void PspGraphics::GetFontMetric( ImplFontMetricData *pMetric ) ++{ ++ const psp::PrintFontManager& rMgr = psp::PrintFontManager::get(); ++ psp::PrintFontInfo aInfo; ++ ++ if (rMgr.getFontInfo (m_pPrinterGfx->GetFontID(), aInfo)) ++ { ++ sal_Int32 nTextHeight = m_pPrinterGfx->GetFontHeight(); ++ sal_Int32 nTextWidth = m_pPrinterGfx->GetFontWidth(); ++ if( ! nTextWidth ) ++ nTextWidth = nTextHeight; ++ ++ pMetric->mnOrientation = m_pPrinterGfx->GetFontAngle(); ++ pMetric->mnSlant = 0; ++ pMetric->mbDevice = aInfo.m_eType == psp::fonttype::Builtin ? sal_True : sal_False; ++ ++ pMetric->meCharSet = aInfo.m_aEncoding; ++ ++ pMetric->meFamily = ToFontFamily (aInfo.m_eFamilyStyle); ++ pMetric->meWeight = ToFontWeight (aInfo.m_eWeight); ++ pMetric->mePitch = ToFontPitch (aInfo.m_ePitch); ++ pMetric->meItalic = ToFontItalic (aInfo.m_eItalic); ++ pMetric->meType = TYPE_SCALABLE; ++ ++ pMetric->mnFirstChar = 0; ++ pMetric->mnLastChar = 255; ++ ++ pMetric->mnWidth = nTextWidth; ++ pMetric->mnAscent = ( aInfo.m_nAscend * nTextHeight + 500 ) / 1000; ++ pMetric->mnDescent = ( aInfo.m_nDescend * nTextHeight + 500 ) / 1000; ++ pMetric->mnLeading = ( aInfo.m_nLeading * nTextHeight + 500 ) / 1000; ++ } ++} ++ ++ULONG PspGraphics::GetKernPairs( ULONG nPairs, ImplKernPairData *pKernPairs ) ++{ ++ const ::std::list< ::psp::KernPair >& rPairs( m_pPrinterGfx->getKernPairs() ); ++ ULONG nHavePairs = rPairs.size(); ++ if( pKernPairs && nPairs ) ++ { ++ ::std::list< ::psp::KernPair >::const_iterator it; ++ int i; ++ int nTextScale = m_pPrinterGfx->GetFontWidth(); ++ if( ! nTextScale ) ++ nTextScale = m_pPrinterGfx->GetFontHeight(); ++ for( i = 0, it = rPairs.begin(); i < nPairs && i < nHavePairs; i++, ++it ) ++ { ++ pKernPairs[i].mnChar1 = it->first; ++ pKernPairs[i].mnChar2 = it->second; ++ pKernPairs[i].mnKern = it->kern_x * nTextScale / 1000; ++ } ++ ++ } ++ return nHavePairs; ++} ++ ++BOOL PspGraphics::GetGlyphBoundRect( long nGlyphIndex, Rectangle& rRect ) ++{ ++ int nLevel = nGlyphIndex >> GF_FONTSHIFT; ++ if( nLevel >= MAX_FALLBACK ) ++ return FALSE; ++ ++ ServerFont* pSF = m_pServerFont[ nLevel ]; ++ if( !pSF ) ++ return FALSE; ++ ++ nGlyphIndex &= ~GF_FONTMASK; ++ const GlyphMetric& rGM = pSF->GetGlyphMetric( nGlyphIndex ); ++ rRect = Rectangle( rGM.GetOffset(), rGM.GetSize() ); ++ return TRUE; ++} ++ ++BOOL PspGraphics::GetGlyphOutline( long nGlyphIndex, PolyPolygon& rPolyPoly ) ++{ ++ int nLevel = nGlyphIndex >> GF_FONTSHIFT; ++ if( nLevel >= MAX_FALLBACK ) ++ return FALSE; ++ ++ ServerFont* pSF = m_pServerFont[ nLevel ]; ++ if( !pSF ) ++ return FALSE; ++ ++ nGlyphIndex &= ~GF_FONTMASK; ++ if( pSF->GetGlyphOutline( nGlyphIndex, rPolyPoly ) ) ++ return TRUE; ++ ++ return FALSE; ++} ++ ++SalLayout* PspGraphics::GetTextLayout( ImplLayoutArgs& rArgs, int nFallbackLevel ) ++{ ++ // workaround for printers not handling glyph indexing for non-TT fonts ++ int nFontId = m_pPrinterGfx->GetFontID(); ++ if( psp::fonttype::TrueType != psp::PrintFontManager::get().getFontType( nFontId ) ) ++ rArgs.mnFlags |= SAL_LAYOUT_DISABLE_GLYPH_PROCESSING; ++ else if( nFallbackLevel > 0 ) ++ rArgs.mnFlags &= ~SAL_LAYOUT_DISABLE_GLYPH_PROCESSING; ++ ++ GenericSalLayout* pLayout = NULL; ++ ++ if( m_pServerFont[ nFallbackLevel ] ++ && !(rArgs.mnFlags & SAL_LAYOUT_DISABLE_GLYPH_PROCESSING) ) ++ pLayout = new PspServerFontLayout( *m_pPrinterGfx, *m_pServerFont[nFallbackLevel] ); ++ else ++ pLayout = new PspFontLayout( *m_pPrinterGfx ); ++ ++ return pLayout; ++} ++//-------------------------------------------------------------------------- ++ ++BOOL PspGraphics::CreateFontSubset( ++ const rtl::OUString& rToFile, ++ ImplFontData* pFont, ++ sal_Int32* pGlyphIDs, ++ sal_uInt8* pEncoding, ++ sal_Int32* pWidths, ++ int nGlyphs, ++ FontSubsetInfo& rInfo ++ ) ++{ ++ // in this context the sysdata member of pFont should ++ // contain a fontID as the X fonts should be filtered ++ // out of the font list available to PDF export (for ++ // which this method was created). The correct way would ++ // be to have the GlyphCache search for the ImplFontData pFont ++ psp::fontID aFont = (psp::fontID)pFont->mpSysData; ++ return PspGraphics::DoCreateFontSubset( rToFile, aFont, pGlyphIDs, pEncoding, pWidths, nGlyphs, rInfo ); ++} ++ ++//-------------------------------------------------------------------------- ++ ++const void* PspGraphics::GetEmbedFontData( ImplFontData* pFont, const sal_Unicode* pUnicodes, sal_Int32* pWidths, FontSubsetInfo& rInfo, long* pDataLen ) ++{ ++ // in this context the sysdata member of pFont should ++ // contain a fontID as the X fonts should be filtered ++ // out of the font list available to PDF export (for ++ // which this method was created). The correct way would ++ // be to have the GlyphCache search for the ImplFontData pFont ++ psp::fontID aFont = (psp::fontID)pFont->mpSysData; ++ return PspGraphics::DoGetEmbedFontData( aFont, pUnicodes, pWidths, rInfo, pDataLen ); ++} ++ ++//-------------------------------------------------------------------------- ++ ++void PspGraphics::FreeEmbedFontData( const void* pData, long nLen ) ++{ ++ PspGraphics::DoFreeEmbedFontData( pData, nLen ); ++} ++ ++//-------------------------------------------------------------------------- ++ ++const std::map< sal_Unicode, sal_Int32 >* PspGraphics::GetFontEncodingVector( ImplFontData* pFont, const std::map< sal_Unicode, rtl::OString >** pNonEncoded ) ++{ ++ // in this context the sysdata member of pFont should ++ // contain a fontID as the X fonts should be filtered ++ // out of the font list available to PDF export (for ++ // which this method was created). The correct way would ++ // be to have the GlyphCache search for the ImplFontData pFont ++ psp::fontID aFont = (psp::fontID)pFont->mpSysData; ++ return PspGraphics::DoGetFontEncodingVector( aFont, pNonEncoded ); ++} ++ ++ ++// static helpers of PspGraphics ++ ++bool PspGraphics::DoCreateFontSubset( const rtl::OUString& rToFile, ++ psp::fontID aFont, ++ sal_Int32* pGlyphIDs, ++ sal_uInt8* pEncoding, ++ sal_Int32* pWidths, ++ int nGlyphs, ++ FontSubsetInfo& rInfo ) ++{ ++ psp::PrintFontManager& rMgr = psp::PrintFontManager::get(); ++ psp::PrintFontInfo aFontInfo; ++ ++ if( ! rMgr.getFontInfo( aFont, aFontInfo ) ) ++ return false; ++ ++ // fill in font info ++ switch( aFontInfo.m_eType ) ++ { ++ case psp::fonttype::TrueType: rInfo.m_nFontType = SAL_FONTSUBSETINFO_TYPE_TRUETYPE;break; ++ case psp::fonttype::Type1: rInfo.m_nFontType = SAL_FONTSUBSETINFO_TYPE_TYPE1;break; ++ default: ++ return false; ++ } ++ rInfo.m_nAscent = aFontInfo.m_nAscend; ++ rInfo.m_nDescent = aFontInfo.m_nDescend; ++ rInfo.m_aPSName = rMgr.getPSName( aFont ); ++ ++ int xMin, yMin, xMax, yMax; ++ rMgr.getFontBoundingBox( aFont, xMin, yMin, xMax, yMax ); ++ ++ if( ! rMgr.createFontSubset( aFont, ++ rToFile, ++ pGlyphIDs, ++ pEncoding, ++ pWidths, ++ nGlyphs ++ ) ) ++ return false; ++ ++ rInfo.m_aFontBBox = Rectangle( Point( xMin, yMin ), Size( xMax-xMin, yMax-yMin ) ); ++ rInfo.m_nCapHeight = yMax; // Well ... ++ ++ return true; ++} ++ ++const void* PspGraphics::DoGetEmbedFontData( fontID aFont, const sal_Unicode* pUnicodes, sal_Int32* pWidths, FontSubsetInfo& rInfo, long* pDataLen ) ++{ ++ psp::PrintFontManager& rMgr = psp::PrintFontManager::get(); ++ ++ psp::PrintFontInfo aFontInfo; ++ if( ! rMgr.getFontInfo( aFont, aFontInfo ) ) ++ return NULL; ++ ++ // fill in font info ++ switch( aFontInfo.m_eType ) ++ { ++ case psp::fonttype::TrueType: rInfo.m_nFontType = SAL_FONTSUBSETINFO_TYPE_TRUETYPE;break; ++ case psp::fonttype::Type1: rInfo.m_nFontType = SAL_FONTSUBSETINFO_TYPE_TYPE1;break; ++ default: ++ return NULL; ++ } ++ rInfo.m_nAscent = aFontInfo.m_nAscend; ++ rInfo.m_nDescent = aFontInfo.m_nDescend; ++ rInfo.m_aPSName = rMgr.getPSName( aFont ); ++ ++ int xMin, yMin, xMax, yMax; ++ rMgr.getFontBoundingBox( aFont, xMin, yMin, xMax, yMax ); ++ ++ psp::CharacterMetric aMetrics[256]; ++ sal_Unicode aUnicodes[256]; ++ if( aFontInfo.m_aEncoding == RTL_TEXTENCODING_SYMBOL && aFontInfo.m_eType == psp::fonttype::Type1 ) ++ { ++ for( int i = 0; i < 256; i++ ) ++ aUnicodes[i] = pUnicodes[i] < 0x0100 ? pUnicodes[i] + 0xf000 : pUnicodes[i]; ++ pUnicodes = aUnicodes; ++ } ++ if( ! rMgr.getMetrics( aFont, pUnicodes, 256, aMetrics ) ) ++ return NULL; ++ ++ OString aSysPath = rMgr.getFontFileSysPath( aFont ); ++ struct stat aStat; ++ if( stat( aSysPath.getStr(), &aStat ) ) ++ return NULL; ++ int fd = open( aSysPath.getStr(), O_RDONLY ); ++ if( fd < 0 ) ++ return NULL; ++ void* pFile = mmap( NULL, aStat.st_size, PROT_READ, MAP_SHARED, fd, 0 ); ++ close( fd ); ++ if( pFile == MAP_FAILED ) ++ return NULL; ++ ++ *pDataLen = aStat.st_size; ++ ++ rInfo.m_aFontBBox = Rectangle( Point( xMin, yMin ), Size( xMax-xMin, yMax-yMin ) ); ++ rInfo.m_nCapHeight = yMax; // Well ... ++ ++ for( int i = 0; i < 256; i++ ) ++ ++ pWidths[i] = (aMetrics[i].width > 0 ? aMetrics[i].width : 0); ++ ++ return pFile; ++} ++ ++void PspGraphics::DoFreeEmbedFontData( const void* pData, long nLen ) ++{ ++ if( pData ) ++ munmap( (char*)pData, nLen ); ++} ++ ++const std::map< sal_Unicode, sal_Int32 >* PspGraphics::DoGetFontEncodingVector( fontID aFont, const std::map< sal_Unicode, rtl::OString >** pNonEncoded ) ++{ ++ psp::PrintFontManager& rMgr = psp::PrintFontManager::get(); ++ ++ psp::PrintFontInfo aFontInfo; ++ if( ! rMgr.getFontInfo( aFont, aFontInfo ) ) ++ { ++ if( pNonEncoded ) ++ *pNonEncoded = NULL; ++ return NULL; ++ } ++ ++ return rMgr.getEncodingMap( aFont, pNonEncoded ); ++} ++ ++void PspGraphics::SetImplFontData( const psp::FastPrintFontInfo& aInfo, ImplFontData& rData ) ++{ ++ rData.meFamily = ToFontFamily (aInfo.m_eFamilyStyle); ++ rData.meWeight = ToFontWeight (aInfo.m_eWeight); ++ ++ rData.meItalic = ToFontItalic (aInfo.m_eItalic); ++ rData.meWidthType = ToFontWidth (aInfo.m_eWidth); ++ rData.mePitch = ToFontPitch (aInfo.m_ePitch); ++ rData.meCharSet = aInfo.m_aEncoding; ++ rData.maName = aInfo.m_aFamilyName; ++ // rData.meScript = SCRIPT_DONTKNOW; ++ /*rData.maStyleName = XXX */ ++ ++ rData.mnWidth = 0; ++ rData.mnHeight = 0; ++ rData.mbOrientation = TRUE; ++ rData.mnQuality = (aInfo.m_eType == psp::fonttype::Builtin ? 1024 : 0); ++ rData.mnVerticalOrientation= 0; ++ rData.meType = TYPE_SCALABLE; ++ rData.mbDevice = (aInfo.m_eType == psp::fonttype::Builtin); ++ String aMapNames; ++ for( ::std::list< OUString >::const_iterator it = aInfo.m_aAliases.begin(); it != aInfo.m_aAliases.end(); ++it ) ++ { ++ if( it != aInfo.m_aAliases.begin() ) ++ aMapNames.Append(';'); ++ aMapNames.Append( String( *it ) ); ++ } ++ rData.maMapNames = aMapNames; ++ switch( aInfo.m_eType ) ++ { ++ case psp::fonttype::TrueType: ++ rData.mbSubsettable = TRUE; ++ rData.mbEmbeddable = FALSE; ++ break; ++ case psp::fonttype::Type1: ++ rData.mbSubsettable = FALSE; ++ rData.mbEmbeddable = TRUE; ++ break; ++ default: ++ rData.mbSubsettable = FALSE; ++ rData.mbEmbeddable = FALSE; ++ break; ++ } ++} ++ ++FontWidth PspGraphics::ToFontWidth (psp::width::type eWidth) ++{ ++ switch (eWidth) ++ { ++ case psp::width::UltraCondensed: return WIDTH_ULTRA_CONDENSED; ++ case psp::width::ExtraCondensed: return WIDTH_EXTRA_CONDENSED; ++ case psp::width::Condensed: return WIDTH_CONDENSED; ++ case psp::width::SemiCondensed: return WIDTH_SEMI_CONDENSED; ++ case psp::width::Normal: return WIDTH_NORMAL; ++ case psp::width::SemiExpanded: return WIDTH_SEMI_EXPANDED; ++ case psp::width::Expanded: return WIDTH_EXPANDED; ++ case psp::width::ExtraExpanded: return WIDTH_EXTRA_EXPANDED; ++ case psp::width::UltraExpanded: return WIDTH_ULTRA_EXPANDED; ++ } ++ return WIDTH_DONTKNOW; ++} ++ ++FontWeight PspGraphics::ToFontWeight (psp::weight::type eWeight) ++{ ++ switch (eWeight) ++ { ++ case psp::weight::Thin: return WEIGHT_THIN; ++ case psp::weight::UltraLight: return WEIGHT_ULTRALIGHT; ++ case psp::weight::Light: return WEIGHT_LIGHT; ++ case psp::weight::SemiLight: return WEIGHT_SEMILIGHT; ++ case psp::weight::Normal: return WEIGHT_NORMAL; ++ case psp::weight::Medium: return WEIGHT_MEDIUM; ++ case psp::weight::SemiBold: return WEIGHT_SEMIBOLD; ++ case psp::weight::Bold: return WEIGHT_BOLD; ++ case psp::weight::UltraBold: return WEIGHT_ULTRABOLD; ++ case psp::weight::Black: return WEIGHT_BLACK; ++ } ++ return WEIGHT_DONTKNOW; ++} ++ ++FontPitch PspGraphics::ToFontPitch (psp::pitch::type ePitch) ++{ ++ switch (ePitch) ++ { ++ case psp::pitch::Fixed: return PITCH_FIXED; ++ case psp::pitch::Variable: return PITCH_VARIABLE; ++ } ++ return PITCH_DONTKNOW; ++} ++ ++FontItalic PspGraphics::ToFontItalic (psp::italic::type eItalic) ++{ ++ switch (eItalic) ++ { ++ case psp::italic::Upright: return ITALIC_NONE; ++ case psp::italic::Oblique: return ITALIC_OBLIQUE; ++ case psp::italic::Italic: return ITALIC_NORMAL; ++ } ++ return ITALIC_DONTKNOW; ++} ++ ++FontFamily PspGraphics::ToFontFamily (psp::family::type eFamily) ++{ ++ switch (eFamily) ++ { ++ case psp::family::Decorative: return FAMILY_DECORATIVE; ++ case psp::family::Modern: return FAMILY_MODERN; ++ case psp::family::Roman: return FAMILY_ROMAN; ++ case psp::family::Script: return FAMILY_SCRIPT; ++ case psp::family::Swiss: return FAMILY_SWISS; ++ case psp::family::System: return FAMILY_SYSTEM; ++ } ++ return FAMILY_DONTKNOW; ++} +Index: vcl/unx/source/gdi/salbmp.cxx +=================================================================== +RCS file: /cvs/gsl/vcl/unx/source/gdi/salbmp.cxx,v +retrieving revision 1.8.274.1 +retrieving revision 1.14 +diff -u -p -u -r1.8.274.1 -r1.14 +--- vcl/unx/source/gdi/salbmp.cxx 15 Jan 2004 12:52:46 -0000 1.8.274.1 ++++ vcl/unx/source/gdi/salbmp.cxx 22 Jun 2004 17:42:38 -0000 1.14 +@@ -59,20 +59,18 @@ + * + ************************************************************************/ + +-#define _SV_SALBMP_CXX +- +-// -=-= #includes =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +- + #include <string.h> + #include <stdio.h> + #include <errno.h> + #ifdef FREEBSD + #include <sys/types.h> + #endif +-#include <sys/shm.h> + #include <prex.h> + #include <postx.h> + #include <salunx.h> ++#ifndef _OSL_ENDIAN_H_ ++#include <osl/endian.h> ++#endif + #ifndef _RTL_MEMORY_H_ + #include <rtl/memory.h> + #endif +@@ -85,11 +83,14 @@ + #ifndef _SV_SALDISP_HXX + #include <saldisp.hxx> + #endif +-#ifndef _SV_SALGDI_HXX +-#include <salgdi.hxx> ++#ifndef _SV_SALGDI_H ++#include <salgdi.h> ++#endif ++#ifndef _SV_SALBMP_H ++#include <salbmp.h> + #endif +-#ifndef _SV_SALBMP_HXX +-#include <salbmp.hxx> ++#ifndef _SV_SALINST_H ++#include <salinst.h> + #endif + + // ----------- +@@ -102,12 +103,17 @@ + // - SalBitmap - + // ------------- + +-ImplSalBitmapCache* SalBitmap::mpCache = NULL; +-ULONG SalBitmap::mnCacheInstCount = 0; ++SalBitmap* X11SalInstance::CreateSalBitmap() ++{ ++ return new X11SalBitmap(); ++} ++ ++ImplSalBitmapCache* X11SalBitmap::mpCache = NULL; ++ULONG X11SalBitmap::mnCacheInstCount = 0; + + // ----------------------------------------------------------------------------- + +-SalBitmap::SalBitmap() : ++X11SalBitmap::X11SalBitmap() : + mpDIB( NULL ), + mpDDB( NULL ) + { +@@ -115,14 +121,14 @@ SalBitmap::SalBitmap() : + + // ----------------------------------------------------------------------------- + +-SalBitmap::~SalBitmap() ++X11SalBitmap::~X11SalBitmap() + { + Destroy(); + } + + // ----------------------------------------------------------------------------- + +-void SalBitmap::ImplCreateCache() ++void X11SalBitmap::ImplCreateCache() + { + if( !mnCacheInstCount++ ) + mpCache = new ImplSalBitmapCache; +@@ -130,9 +136,9 @@ void SalBitmap::ImplCreateCache() + + // ----------------------------------------------------------------------------- + +-void SalBitmap::ImplDestroyCache() ++void X11SalBitmap::ImplDestroyCache() + { +- DBG_ASSERT( mnCacheInstCount, "SalBitmap::ImplDestroyCache(): underflow" ); ++ DBG_ASSERT( mnCacheInstCount, "X11SalBitmap::ImplDestroyCache(): underflow" ); + + if( mnCacheInstCount && !--mnCacheInstCount ) + delete mpCache, mpCache = NULL; +@@ -140,7 +146,7 @@ void SalBitmap::ImplDestroyCache() + + // ----------------------------------------------------------------------------- + +-void SalBitmap::ImplRemovedFromCache() ++void X11SalBitmap::ImplRemovedFromCache() + { + if( mpDDB ) + delete mpDDB, mpDDB = NULL; +@@ -148,7 +154,7 @@ void SalBitmap::ImplRemovedFromCache() + + // ----------------------------------------------------------------------------- + +-BitmapBuffer* SalBitmap::ImplCreateDIB( const Size& rSize, USHORT nBitCount, const BitmapPalette& rPal ) ++BitmapBuffer* X11SalBitmap::ImplCreateDIB( const Size& rSize, USHORT nBitCount, const BitmapPalette& rPal ) + { + DBG_ASSERT( nBitCount == 1 || nBitCount == 4 || nBitCount == 8 || nBitCount == 24, "Unsupported BitCount!" ); + +@@ -198,7 +204,7 @@ BitmapBuffer* SalBitmap::ImplCreateDIB( + + // ----------------------------------------------------------------------------- + +-BitmapBuffer* SalBitmap::ImplCreateDIB( Drawable aDrawable, ++BitmapBuffer* X11SalBitmap::ImplCreateDIB( Drawable aDrawable, + long nDrawableDepth, + long nX, long nY, + long nWidth, long nHeight ) +@@ -207,7 +213,7 @@ BitmapBuffer* SalBitmap::ImplCreateDIB( + + if( aDrawable && nWidth && nHeight && nDrawableDepth ) + { +- SalDisplay* pSalDisp = GetSalData()->GetCurDisp(); ++ SalDisplay* pSalDisp = GetSalData()->GetDisplay(); + SalXLib* pXLib = pSalDisp->GetXLib(); + Display* pXDisp = pSalDisp->GetDisplay(); + +@@ -342,13 +348,13 @@ BitmapBuffer* SalBitmap::ImplCreateDIB( + + // ----------------------------------------------------------------------------- + +-XImage* SalBitmap::ImplCreateXImage( SalDisplay *pSalDisp, long nDepth, const SalTwoRect& rTwoRect ) const ++XImage* X11SalBitmap::ImplCreateXImage( SalDisplay *pSalDisp, long nDepth, const SalTwoRect& rTwoRect ) const + { + XImage* pImage = NULL; + + if( !mpDIB && mpDDB ) + { +- ( (SalBitmap*) this )->mpDIB = ImplCreateDIB( mpDDB->ImplGetPixmap(), ++ const_cast<X11SalBitmap*>(this)->mpDIB = ImplCreateDIB( mpDDB->ImplGetPixmap(), + mpDDB->ImplGetDepth(), + 0, 0, + mpDDB->ImplGetWidth(), +@@ -478,7 +484,7 @@ XImage* SalBitmap::ImplCreateXImage( Sal + + // ----------------------------------------------------------------------------- + #ifdef _USE_PRINT_EXTENSION_ +-BOOL SalBitmap::ImplCreateFromDrawable( SalDisplay* pDisplay, Drawable aDrawable, long nDrawableDepth, ++bool X11SalBitmap::ImplCreateFromDrawable( SalDisplay* pDisplay, Drawable aDrawable, long nDrawableDepth, + long nX, long nY, long nWidth, long nHeight ) + { + Destroy(); +@@ -489,7 +495,7 @@ BOOL SalBitmap::ImplCreateFromDrawable( + return( mpDDB != NULL ); + } + #else +-BOOL SalBitmap::ImplCreateFromDrawable( Drawable aDrawable, long nDrawableDepth, ++bool X11SalBitmap::ImplCreateFromDrawable( Drawable aDrawable, long nDrawableDepth, + long nX, long nY, long nWidth, long nHeight ) + { + Destroy(); +@@ -502,19 +508,8 @@ BOOL SalBitmap::ImplCreateFromDrawable( + // ----------------------------------------------------------------------------- + #endif + +-BOOL SalBitmap::ImplCreateLocalFromDrawable( Drawable aDrawable, long nDrawableDepth, +- long nX, long nY, long nWidth, long nHeight ) +-{ +- Destroy(); +- +- if( aDrawable && nWidth && nHeight && nDrawableDepth ) +- mpDIB = ImplCreateDIB( aDrawable, nDrawableDepth, nX, nY, nWidth, nHeight ); +- +- return( mpDIB != NULL ); +-} +- +-BOOL +-SalBitmap::SnapShot (Display* pDisplay, XLIB_Window hWindow) ++bool ++X11SalBitmap::SnapShot (Display* pDisplay, XLIB_Window hWindow) + { + if (hWindow != None) + { +@@ -577,7 +572,7 @@ SalBitmap::SnapShot (Display* pDisplay, + { + XImage* pImage = XGetImage (pDisplay, aAttribute.root, + x, y, width, height, AllPlanes, ZPixmap); +- BOOL bSnapShot = ImplCreateFromXImage (pDisplay, aAttribute.root, pImage); ++ bool bSnapShot = ImplCreateFromXImage (pDisplay, aAttribute.root, pImage); + XDestroyImage (pImage); + + return bSnapShot; +@@ -589,8 +584,8 @@ SalBitmap::SnapShot (Display* pDisplay, + return False; + } + +-BOOL +-SalBitmap::ImplCreateFromXImage (Display* pDisplay, XLIB_Window hWindow, XImage* pImage) ++bool ++X11SalBitmap::ImplCreateFromXImage (Display* pDisplay, XLIB_Window hWindow, XImage* pImage) + { + Destroy(); + +@@ -603,8 +598,8 @@ SalBitmap::ImplCreateFromXImage (Display + } + + #ifdef _USE_PRINT_EXTENSION_ +-void SalBitmap::ImplDraw( SalDisplay *pDisplay, Drawable aDrawable, long nDrawableDepth, +- const SalTwoRect& rTwoRect, const GC& rGC ) const ++void X11SalBitmap::ImplDraw( SalDisplay *pDisplay, Drawable aDrawable, long nDrawableDepth, ++ const SalTwoRect& rTwoRect, const GC& rGC, bool bDstIsWindow ) const + { + if( !mpDDB || !mpDDB->ImplMatches( nDrawableDepth, rTwoRect ) ) + { +@@ -654,11 +649,11 @@ void SalBitmap::ImplDraw( SalDisplay *pD + } + + if( mpDDB ) +- mpDDB->ImplDraw( pDisplay, aDrawable, nDrawableDepth, rTwoRect, rGC ); ++ mpDDB->ImplDraw( pDisplay, aDrawable, nDrawableDepth, rTwoRect, rGC, bDstIsWindow ); + } + #else +-void SalBitmap::ImplDraw( Drawable aDrawable, long nDrawableDepth, +- const SalTwoRect& rTwoRect, const GC& rGC ) const ++void X11SalBitmap::ImplDraw( Drawable aDrawable, long nDrawableDepth, ++ const SalTwoRect& rTwoRect, const GC& rGC, bool bDstIsWindow ) const + { + if( !mpDDB || !mpDDB->ImplMatches( nDrawableDepth, rTwoRect ) ) + { +@@ -667,18 +662,18 @@ void SalBitmap::ImplDraw( Drawable aDraw + // do we already have a DIB? if not, create aDIB from current DDB first + if( !mpDIB ) + { +- ( (SalBitmap*) this )->mpDIB = ImplCreateDIB( mpDDB->ImplGetPixmap(), ++ const_cast<X11SalBitmap*>(this)->mpDIB = ImplCreateDIB( mpDDB->ImplGetPixmap(), + mpDDB->ImplGetDepth(), + 0, 0, + mpDDB->ImplGetWidth(), + mpDDB->ImplGetHeight() ); + } + +- delete mpDDB, ( (SalBitmap*) this )->mpDDB = NULL; ++ delete mpDDB, const_cast<X11SalBitmap*>(this)->mpDDB = NULL; + } + + if( mpCache ) +- mpCache->ImplRemove( const_cast<SalBitmap*>(this) ); ++ mpCache->ImplRemove( const_cast<X11SalBitmap*>(this) ); + + SalTwoRect aTwoRect( rTwoRect ); + +@@ -693,28 +688,28 @@ void SalBitmap::ImplDraw( Drawable aDraw + aTwoRect.mnSrcHeight = aTwoRect.mnDestHeight = aSize.Height(); + } + +- XImage* pImage = ImplCreateXImage( GetSalData()->GetCurDisp(), ++ XImage* pImage = ImplCreateXImage( GetSalData()->GetDisplay(), + nDrawableDepth, aTwoRect ); + + if( pImage ) + { +- ( (SalBitmap*) this )->mpDDB = new ImplSalDDB( pImage, aDrawable, aTwoRect ); ++ const_cast<X11SalBitmap*>(this)->mpDDB = new ImplSalDDB( pImage, aDrawable, aTwoRect ); + delete[] pImage->data, pImage->data = NULL; + XDestroyImage( pImage ); + + if( mpCache ) +- mpCache->ImplAdd( const_cast<SalBitmap*>(this), mpDDB->ImplGetMemSize() ); ++ mpCache->ImplAdd( const_cast<X11SalBitmap*>(this), mpDDB->ImplGetMemSize() ); + } + } + + if( mpDDB ) +- mpDDB->ImplDraw( aDrawable, nDrawableDepth, rTwoRect, rGC ); ++ mpDDB->ImplDraw( aDrawable, nDrawableDepth, rTwoRect, rGC, bDstIsWindow ); + } + #endif + + // ----------------------------------------------------------------------------- + +-BOOL SalBitmap::Create( const Size& rSize, USHORT nBitCount, const BitmapPalette& rPal ) ++bool X11SalBitmap::Create( const Size& rSize, USHORT nBitCount, const BitmapPalette& rPal ) + { + Destroy(); + mpDIB = ImplCreateDIB( rSize, nBitCount, rPal ); +@@ -724,14 +719,14 @@ BOOL SalBitmap::Create( const Size& rSiz + + // ----------------------------------------------------------------------------- + +-BOOL SalBitmap::Create( const SalBitmap& rSalBmp ) ++bool X11SalBitmap::Create( const SalBitmap& rSSalBmp ) + { + Destroy(); + ++ const X11SalBitmap& rSalBmp = static_cast<const X11SalBitmap&>( rSSalBmp ); ++ + if( rSalBmp.mpDIB ) + { +- const Size aSize( rSalBmp.GetSize() ); +- + mpDIB = ImplCreateDIB( rSalBmp.GetSize(), rSalBmp.GetBitCount(), rSalBmp.mpDIB->maPalette ); + + if( mpDIB ) +@@ -752,21 +747,21 @@ BOOL SalBitmap::Create( const SalBitmap& + + // ----------------------------------------------------------------------------- + +-BOOL SalBitmap::Create( const SalBitmap& rSalBmp, SalGraphics* pGraphics ) ++bool X11SalBitmap::Create( const SalBitmap& rSalBmp, SalGraphics* pGraphics ) + { + return FALSE; + } + + // ----------------------------------------------------------------------------- + +-BOOL SalBitmap::Create( const SalBitmap& rSalBmp, USHORT nNewBitCount ) ++bool X11SalBitmap::Create( const SalBitmap& rSalBmp, USHORT nNewBitCount ) + { + return FALSE; + } + + // ----------------------------------------------------------------------------- + +-void SalBitmap::Destroy() ++void X11SalBitmap::Destroy() + { + if( mpDIB ) + { +@@ -783,7 +778,7 @@ void SalBitmap::Destroy() + + // ----------------------------------------------------------------------------- + +-Size SalBitmap::GetSize() const ++Size X11SalBitmap::GetSize() const + { + Size aSize; + +@@ -797,7 +792,7 @@ Size SalBitmap::GetSize() const + + // ----------------------------------------------------------------------------- + +-USHORT SalBitmap::GetBitCount() const ++USHORT X11SalBitmap::GetBitCount() const + { + USHORT nBitCount; + +@@ -825,7 +820,7 @@ USHORT SalBitmap::GetBitCount() const + + // ----------------------------------------------------------------------------- + +-BitmapBuffer* SalBitmap::AcquireBuffer( BOOL bReadOnly ) ++BitmapBuffer* X11SalBitmap::AcquireBuffer( bool bReadOnly ) + { + if( !mpDIB && mpDDB ) + { +@@ -838,7 +833,7 @@ BitmapBuffer* SalBitmap::AcquireBuffer( + + // ----------------------------------------------------------------------------- + +-void SalBitmap::ReleaseBuffer( BitmapBuffer* pBuffer, BOOL bReadOnly ) ++void X11SalBitmap::ReleaseBuffer( BitmapBuffer* pBuffer, bool bReadOnly ) + { + if( !bReadOnly ) + { +@@ -864,14 +859,14 @@ ImplSalDDB::ImplSalDDB( + mnDepth ( pImage->depth ) + { + #if !defined(_USE_PRINT_EXTENSION_) +- SalDisplay* pSalDisp = GetSalData()->GetCurDisp(); ++ SalDisplay* pSalDisp = GetSalData()->GetDisplay(); + Display* pXDisp = pSalDisp->GetDisplay(); + #else + Display* pXDisp = pDisplay->GetDisplay(); + #endif + + +- if( maPixmap = XCreatePixmap( pXDisp, aDrawable, ImplGetWidth(), ImplGetHeight(), ImplGetDepth() ) ) ++ if( (maPixmap = XCreatePixmap( pXDisp, aDrawable, ImplGetWidth(), ImplGetHeight(), ImplGetDepth() )) ) + { + XGCValues aValues; + GC aGC; +@@ -939,13 +934,13 @@ ImplSalDDB::ImplSalDDB( + mnDepth( nDrawableDepth ) + { + #if !defined(_USE_PRINT_EXTENSION_) +- SalDisplay* pSalDisp = GetSalData()->GetCurDisp(); ++ SalDisplay* pSalDisp = GetSalData()->GetDisplay(); + Display* pXDisp = pSalDisp->GetDisplay(); + #else + Display* pXDisp = pDisplay->GetDisplay(); + #endif + +- if( maPixmap = XCreatePixmap( pXDisp, aDrawable, nWidth, nHeight, nDrawableDepth ) ) ++ if( (maPixmap = XCreatePixmap( pXDisp, aDrawable, nWidth, nHeight, nDrawableDepth )) ) + { + XGCValues aValues; + GC aGC; +@@ -962,10 +957,10 @@ ImplSalDDB::ImplSalDDB( + aGC = XCreateGC( pXDisp, maPixmap, nValues, &aValues ); + #ifdef _USE_PRINT_EXTENSION_ + ImplDraw( pDisplay, aDrawable, nDrawableDepth, maPixmap, mnDepth, +- nX, nY, nWidth, nHeight, 0, 0, aGC ); ++ nX, nY, nWidth, nHeight, 0, 0, aGC, false ); + #else + ImplDraw( aDrawable, nDrawableDepth, maPixmap, mnDepth, +- nX, nY, nWidth, nHeight, 0, 0, aGC ); ++ nX, nY, nWidth, nHeight, 0, 0, aGC, false ); + #endif + XFreeGC( pXDisp, aGC ); + +@@ -980,14 +975,14 @@ ImplSalDDB::ImplSalDDB( + ImplSalDDB::~ImplSalDDB() + { + if( maPixmap && ImplGetSVData() ) +- XFreePixmap( GetSalData()->GetCurDisp()->GetDisplay(), maPixmap ); ++ XFreePixmap( GetSalData()->GetDisplay()->GetDisplay(), maPixmap ); + } + + // ----------------------------------------------------------------------------- + +-BOOL ImplSalDDB::ImplMatches( long nDepth, const SalTwoRect& rTwoRect ) const ++bool ImplSalDDB::ImplMatches( long nDepth, const SalTwoRect& rTwoRect ) const + { +- BOOL bRet = FALSE; ++ bool bRet = FALSE; + + if( ( maPixmap != 0 ) && ( ( mnDepth == nDepth ) || ( 1 == mnDepth ) ) ) + { +@@ -1017,18 +1012,18 @@ void ImplSalDDB::ImplDraw( + #ifdef _USE_PRINT_EXTENSION_ + SalDisplay* pDisplay, + #endif +- Drawable aDrawable, long nDrawableDepth, const SalTwoRect& rTwoRect, const GC& rGC ) const ++ Drawable aDrawable, long nDrawableDepth, const SalTwoRect& rTwoRect, const GC& rGC, bool bDstIsWindow ) const + { + #ifdef _USE_PRINT_EXTENSION_ + ImplDraw( pDisplay, maPixmap, mnDepth, aDrawable, nDrawableDepth, + rTwoRect.mnSrcX - maTwoRect.mnSrcX, rTwoRect.mnSrcY - maTwoRect.mnSrcY, + rTwoRect.mnDestWidth, rTwoRect.mnDestHeight, +- rTwoRect.mnDestX, rTwoRect.mnDestY, rGC ); ++ rTwoRect.mnDestX, rTwoRect.mnDestY, rGC, bDstIsWindow ); + #else + ImplDraw( maPixmap, mnDepth, aDrawable, nDrawableDepth, + rTwoRect.mnSrcX - maTwoRect.mnSrcX, rTwoRect.mnSrcY - maTwoRect.mnSrcY, + rTwoRect.mnDestWidth, rTwoRect.mnDestHeight, +- rTwoRect.mnDestX, rTwoRect.mnDestY, rGC ); ++ rTwoRect.mnDestX, rTwoRect.mnDestY, rGC, bDstIsWindow ); + #endif + } + +@@ -1042,10 +1037,10 @@ void ImplSalDDB::ImplDraw( + Drawable aDstDrawable, long nDstDrawableDepth, + long nSrcX, long nSrcY, + long nDestWidth, long nDestHeight, +- long nDestX, long nDestY, const GC& rGC ) ++ long nDestX, long nDestY, const GC& rGC, bool bDstIsWindow ) + { + #if !defined(_USE_PRINT_EXTENSION_) +- SalDisplay* pSalDisp = GetSalData()->GetCurDisp(); ++ SalDisplay* pSalDisp = GetSalData()->GetDisplay(); + Display* pXDisp = pSalDisp->GetDisplay(); + #else + Display* pXDisp = pDisplay->GetDisplay(); +@@ -1058,18 +1053,11 @@ void ImplSalDDB::ImplDraw( + } + else + { +- if( nDestWidth > SAL_DRAWPIXMAP_MAX_EXT ) +- { +- // !!! Broken XCopyArea +- XCopyArea( pXDisp, aSrcDrawable, aDstDrawable, rGC, +- nSrcX, nSrcY, nDestWidth, nDestHeight, nDestX, nDestY ); +- } +- else +- { +- XCopyArea( pXDisp, aSrcDrawable, aDstDrawable, rGC, +- nSrcX, nSrcY, nDestWidth, nDestHeight, nDestX, nDestY ); +- } ++ XCopyArea( pXDisp, aSrcDrawable, aDstDrawable, rGC, ++ nSrcX, nSrcY, nDestWidth, nDestHeight, nDestX, nDestY ); + } ++ if( bDstIsWindow ) ++ X11SalGraphics::YieldGraphicsExpose( pXDisp, NULL, aDstDrawable ); + } + + // ---------------------- +@@ -1078,11 +1066,11 @@ void ImplSalDDB::ImplDraw( + + struct ImplBmpObj + { +- SalBitmap* mpBmp; ++ X11SalBitmap* mpBmp; + ULONG mnMemSize; + ULONG mnFlags; + +- ImplBmpObj( SalBitmap* pBmp, ULONG nMemSize, ULONG nFlags ) : ++ ImplBmpObj( X11SalBitmap* pBmp, ULONG nMemSize, ULONG nFlags ) : + mpBmp( pBmp ), mnMemSize( nMemSize ), mnFlags( nFlags ) {} + }; + +@@ -1102,10 +1090,10 @@ ImplSalBitmapCache::~ImplSalBitmapCache( + + // ----------------------------------------------------------------------------- + +-void ImplSalBitmapCache::ImplAdd( SalBitmap* pBmp, ULONG nMemSize, ULONG nFlags ) ++void ImplSalBitmapCache::ImplAdd( X11SalBitmap* pBmp, ULONG nMemSize, ULONG nFlags ) + { + ImplBmpObj* pObj; +- BOOL bFound = FALSE; ++ bool bFound = FALSE; + + for( pObj = (ImplBmpObj*) maBmpList.Last(); pObj && !bFound; pObj = (ImplBmpObj*) maBmpList.Prev() ) + if( pObj->mpBmp == pBmp ) +@@ -1124,7 +1112,7 @@ void ImplSalBitmapCache::ImplAdd( SalBit + + // ----------------------------------------------------------------------------- + +-void ImplSalBitmapCache::ImplRemove( SalBitmap* pBmp ) ++void ImplSalBitmapCache::ImplRemove( X11SalBitmap* pBmp ) + { + for( ImplBmpObj* pObj = (ImplBmpObj*) maBmpList.Last(); pObj; pObj = (ImplBmpObj*) maBmpList.Prev() ) + { +Index: vcl/unx/source/gdi/salgdi.cxx +=================================================================== +RCS file: /cvs/gsl/vcl/unx/source/gdi/salgdi.cxx,v +retrieving revision 1.24.120.2 +retrieving revision 1.33 +diff -u -p -u -r1.24.120.2 -r1.33 +--- vcl/unx/source/gdi/salgdi.cxx 15 Jan 2004 12:53:28 -0000 1.24.120.2 ++++ vcl/unx/source/gdi/salgdi.cxx 22 Jun 2004 17:42:18 -0000 1.33 +@@ -59,14 +59,22 @@ + * + ************************************************************************/ + +-#define _SV_SALGDI_CXX +- +-// -=-= #includes =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- + #include <stdio.h> + #include <stdlib.h> + + #include <prex.h> ++// [ed] 6/15/02 There's a conflicting definition of INT8 within the Xmd.h header ++// and the solar.h OOo header. So, wrap the X11 header with a bogus #define ++// to use the OOo definition of the symbol for INT8. ++// [fa] 4/12/04 With 64-bit changes, X11 headers also conflict with INT64 ++ ++#define INT8 blehBlahFooBarINT8 ++#define INT64 blehBlahFooBarINT64 ++ + #include <X11/Xproto.h> ++ ++#undef INT8 ++#undef INT64 + #include <postx.h> + + #include <salunx.h> +@@ -78,13 +86,13 @@ + #include <saldisp.hxx> + #endif + #ifndef _SV_SALGDI_HXX +-#include <salgdi.hxx> ++#include <salgdi.h> + #endif +-#ifndef _SV_SALFRAME_HXX +-#include <salframe.hxx> ++#ifndef _SV_SALFRAME_H ++#include <salframe.h> + #endif +-#ifndef _SV_SALVD_HXX +-#include <salvd.hxx> ++#ifndef _SV_SALVD_H ++#include <salvd.h> + #endif + #include <tools/debug.hxx> + +@@ -128,17 +136,13 @@ inline SalPolyLine::~SalPolyLine() + { if( pFirst_ != Points_ ) delete [] pFirst_; } + + #undef STATIC_POINTS +-// -=-= SalGraphicsData =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= ++// -=-= X11SalGraphics =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +-SalGraphicsData::SalGraphicsData() ++X11SalGraphics::X11SalGraphics() + { +-#ifndef _USE_PRINT_EXTENSION_ +- m_pJobData = NULL; +- m_pPrinterGfx = NULL; +- m_pPhoneNr = NULL; +-#endif + m_pFrame = NULL; + m_pVDev = NULL; ++ m_pDeleteColormap = NULL; + hDrawable_ = None; + + pClipRegion_ = NULL; +@@ -188,38 +192,53 @@ SalGraphicsData::SalGraphicsData() + } + + // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +-SalGraphicsData::~SalGraphicsData() ++X11SalGraphics::~X11SalGraphics() + { +-#ifndef _USE_PRINT_EXTENSION_ +- if( ! ( m_pJobData || m_pPrinterGfx ) ) +-#endif +- { +- Display *pDisplay = GetXDisplay(); ++ Display *pDisplay = GetXDisplay(); ++ ++ DBG_ASSERT( !pPaintRegion_, "pPaintRegion_" ) ++ if( pClipRegion_ ) XDestroyRegion( pClipRegion_ ); ++ ++ if( hBrush_ ) XFreePixmap( pDisplay, hBrush_ ); ++ if( pPenGC_ ) XFreeGC( pDisplay, pPenGC_ ); ++ if( pFontGC_ ) XFreeGC( pDisplay, pFontGC_ ); ++ if( pBrushGC_ ) XFreeGC( pDisplay, pBrushGC_ ); ++ if( pMonoGC_ ) XFreeGC( pDisplay, pMonoGC_ ); ++ if( pCopyGC_ ) XFreeGC( pDisplay, pCopyGC_ ); ++ if( pMaskGC_ ) XFreeGC( pDisplay, pMaskGC_ ); ++ if( pInvertGC_ ) XFreeGC( pDisplay, pInvertGC_ ); ++ if( pInvert50GC_ ) XFreeGC( pDisplay, pInvert50GC_ ); ++ if( pStippleGC_ ) XFreeGC( pDisplay, pStippleGC_ ); ++ if( pTrackingGC_ ) XFreeGC( pDisplay, pTrackingGC_ ); ++ if( m_pDeleteColormap ) ++ delete m_pDeleteColormap; ++} + +- DBG_ASSERT( !pPaintRegion_, "pPaintRegion_" ) +- if( pClipRegion_ ) XDestroyRegion( pClipRegion_ ); ++// -=-= SalGraphics / X11SalGraphics =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + +- if( hBrush_ ) XFreePixmap( pDisplay, hBrush_ ); +- if( pPenGC_ ) XFreeGC( pDisplay, pPenGC_ ); +- if( pFontGC_ ) XFreeGC( pDisplay, pFontGC_ ); +- if( pBrushGC_ ) XFreeGC( pDisplay, pBrushGC_ ); +- if( pMonoGC_ ) XFreeGC( pDisplay, pMonoGC_ ); +- if( pCopyGC_ ) XFreeGC( pDisplay, pCopyGC_ ); +- if( pMaskGC_ ) XFreeGC( pDisplay, pMaskGC_ ); +- if( pInvertGC_ ) XFreeGC( pDisplay, pInvertGC_ ); +- if( pInvert50GC_ ) XFreeGC( pDisplay, pInvert50GC_ ); +- if( pStippleGC_ ) XFreeGC( pDisplay, pStippleGC_ ); +- if( pTrackingGC_ ) XFreeGC( pDisplay, pTrackingGC_ ); +- } ++void X11SalGraphics::Init( SalFrame *pFrame, Drawable aTarget ) ++{ ++ m_pColormap = &GetSalData()->GetDisplay()->GetColormap(); ++ hDrawable_ = aTarget; ++ ++ bWindow_ = TRUE; ++ m_pFrame = pFrame; ++ m_pVDev = NULL; ++ ++ nPenPixel_ = GetPixel( nPenColor_ ); ++ nTextPixel_ = GetPixel( nTextColor_ ); ++ nBrushPixel_ = GetPixel( nBrushColor_ ); ++ numClipRects_ = 0; + } + + // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +-void SalGraphicsData::DeInit() ++void X11SalGraphics::DeInit() + { ++ hDrawable_ = None; + } + + // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +-void SalGraphicsData::SetClipRegion( GC pGC, XLIB_Region pXReg ) const ++void X11SalGraphics::SetClipRegion( GC pGC, XLIB_Region pXReg ) const + { + Display *pDisplay = GetXDisplay(); + +@@ -250,7 +269,7 @@ void SalGraphicsData::SetClipRegion( GC + } + + // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +-GC SalGraphicsData::SelectPen() ++GC X11SalGraphics::SelectPen() + { + Display *pDisplay = GetXDisplay(); + +@@ -281,7 +300,7 @@ GC SalGraphicsData::SelectPen() + } + + // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +-GC SalGraphicsData::SelectBrush() ++GC X11SalGraphics::SelectBrush() + { + Display *pDisplay = GetXDisplay(); + +@@ -334,7 +353,7 @@ GC SalGraphicsData::SelectBrush() + } + + // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +-GC SalGraphicsData::GetTrackingGC() ++GC X11SalGraphics::GetTrackingGC() + { + const char dash_list[2] = {2, 2}; + +@@ -343,8 +362,8 @@ GC SalGraphicsData::GetTrackingGC() + XGCValues values; + + values.graphics_exposures = True; +- values.foreground = xColormap_->GetBlackPixel() +- ^ xColormap_->GetWhitePixel(); ++ values.foreground = m_pColormap->GetBlackPixel() ++ ^ m_pColormap->GetWhitePixel(); + values.function = GXxor; + values.line_width = 1; + values.line_style = LineOnOffDash; +@@ -366,7 +385,7 @@ GC SalGraphicsData::GetTrackingGC() + } + + // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +-void SalGraphicsData::DrawLines( ULONG nPoints, ++void X11SalGraphics::DrawLines( ULONG nPoints, + const SalPolyLine &rPoints, + GC pGC ) + { +@@ -399,7 +418,7 @@ void SalGraphicsData::DrawLines( ULONG + #define P_DELTA 51 + #define DMAP( v, m ) ((v % P_DELTA) > m ? (v / P_DELTA) + 1 : (v / P_DELTA)) + +-BOOL SalGraphicsData::GetDitherPixmap( SalColor nSalColor ) ++BOOL X11SalGraphics::GetDitherPixmap( SalColor nSalColor ) + { + static const short nOrdDither8Bit[ 8 ][ 8 ] = + { +@@ -475,49 +494,24 @@ BOOL SalGraphicsData::GetDitherPixmap( S + return TRUE; + } + +-// -=-= SalGraphics =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +-// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +-SalGraphics::SalGraphics() +-{ } +- +-// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +-SalGraphics::~SalGraphics() +-{ } +- + // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +-void SalGraphics::GetResolution( long &rDPIX, long &rDPIY ) // const ++void X11SalGraphics::GetResolution( sal_Int32 &rDPIX, sal_Int32 &rDPIY ) // const + { +-#ifndef _USE_PRINT_EXTENSION_ +- if (maGraphicsData.m_pJobData != NULL) +- { +- int x = maGraphicsData.m_pJobData->m_aContext.getRenderResolution(); +- +- rDPIX = x; +- rDPIY = x; +- } +- else +- { +-#endif +- +- SalDisplay *pDisplay = _GetDisplay(); +- +- rDPIX = pDisplay->GetResolution().A(); +- rDPIY = pDisplay->GetResolution().B(); +- if ( rDPIY < 96 ) +- { +- rDPIX = Divide( rDPIX * 96, rDPIY ); ++ SalDisplay *pDisplay = GetDisplay(); ++ ++ rDPIX = pDisplay->GetResolution().A(); ++ rDPIY = pDisplay->GetResolution().B(); ++ if( !pDisplay->GetExactResolution() && rDPIY < 96 ) ++ { ++ rDPIX = Divide( rDPIX * 96, rDPIY ); + rDPIY = 96; +- } +- else if ( rDPIY > 200 ) +- { +- rDPIX = Divide( rDPIX * 200, rDPIY ); +- rDPIY = 200; +- } +- +-#ifndef _USE_PRINT_EXTENSION_ +- } +-#endif +- ++ } ++ else if ( rDPIY > 200 ) ++ { ++ rDPIX = Divide( rDPIX * 200, rDPIY ); ++ rDPIY = 200; ++ } ++ + // #i12705# equalize x- and y-resolution if they are close enough + if( rDPIX != rDPIY ) + { +@@ -535,731 +529,439 @@ void SalGraphics::GetResolution( long &r + } + + // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +-void SalGraphics::GetScreenFontResolution( long &rDPIX, long &rDPIY ) // const ++void X11SalGraphics::GetScreenFontResolution( sal_Int32 &rDPIX, sal_Int32 &rDPIY ) // const + { +-#ifndef _USE_PRINT_EXTENSION_ +- if (maGraphicsData.m_pPrinterGfx != NULL) +- maGraphicsData.m_pPrinterGfx->GetScreenFontResolution (rDPIX, rDPIY); +- else +-#endif +- _GetDisplay()->GetScreenFontResolution( rDPIX, rDPIY ); ++ GetDisplay()->GetScreenFontResolution( rDPIX, rDPIY ); + } + + // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +-USHORT SalGraphics::GetBitCount() // const ++USHORT X11SalGraphics::GetBitCount() // const + { +-#ifndef _USE_PRINT_EXTENSION_ +- if (maGraphicsData.m_pPrinterGfx != NULL) +- return maGraphicsData.m_pPrinterGfx->GetBitCount (); +- else +- { +-#endif +- +- return _GetVisual()->GetDepth(); +- +-#ifndef _USE_PRINT_EXTENSION_ +- } +-#endif ++ return GetVisual()->GetDepth(); + } + + // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +-long SalGraphics::GetGraphicsWidth() ++long X11SalGraphics::GetGraphicsWidth() + { +- if( maGraphicsData.m_pFrame ) +- return maGraphicsData.m_pFrame->maGeometry.nWidth; +- else if( maGraphicsData.m_pVDev ) +- return maGraphicsData.m_pVDev->maVirDevData.GetWidth(); ++ if( m_pFrame ) ++ return m_pFrame->maGeometry.nWidth; ++ else if( m_pVDev ) ++ return m_pVDev->GetWidth(); + else + return 0; + } + + // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +-void SalGraphics::ResetClipRegion() ++void X11SalGraphics::ResetClipRegion() + { +-#ifndef _USE_PRINT_EXTENSION_ +- if (maGraphicsData.m_pPrinterGfx != NULL) +- maGraphicsData.m_pPrinterGfx->ResetClipRegion (); +- else +- { +-#endif +- +- if( _GetClipRegion() ) +- { +- _IsPenGC() = FALSE; +- _IsFontGC() = FALSE; +- _IsBrushGC() = FALSE; +- _IsMonoGC() = FALSE; +- _IsCopyGC() = FALSE; +- _IsInvertGC() = FALSE; +- _IsInvert50GC() = FALSE; +- _IsStippleGC() = FALSE; +- _IsTrackingGC() = FALSE; +- +- XDestroyRegion( _GetClipRegion() ); +- _GetClipRegion() = NULL; +- } +- +-#ifndef _USE_PRINT_EXTENSION_ +- } +-#endif ++ if( pClipRegion_ ) ++ { ++ bPenGC_ = FALSE; ++ bFontGC_ = FALSE; ++ bBrushGC_ = FALSE; ++ bMonoGC_ = FALSE; ++ bCopyGC_ = FALSE; ++ bInvertGC_ = FALSE; ++ bInvert50GC_ = FALSE; ++ bStippleGC_ = FALSE; ++ bTrackingGC_ = FALSE; ++ ++ XDestroyRegion( pClipRegion_ ); ++ pClipRegion_ = NULL; ++ } + } + + // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +-void SalGraphics::BeginSetClipRegion( ULONG n ) ++void X11SalGraphics::BeginSetClipRegion( ULONG n ) + { +-#ifndef _USE_PRINT_EXTENSION_ +- if (maGraphicsData.m_pPrinterGfx != NULL) +- maGraphicsData.m_pPrinterGfx->BeginSetClipRegion(n); +- else +- { +-#endif +- +- if( _GetClipRegion() ) +- XDestroyRegion( _GetClipRegion() ); +- _GetClipRegion() = XCreateRegion(); +- +-#ifndef _USE_PRINT_EXTENSION_ +- } +-#endif ++ if( pClipRegion_ ) ++ XDestroyRegion( pClipRegion_ ); ++ pClipRegion_ = XCreateRegion(); ++ numClipRects_ = 0; ++ boundingClipRect_.SetEmpty(); + } + + // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +-BOOL SalGraphics::UnionClipRegion( long nX, long nY, long nDX, long nDY, const OutputDevice* ) ++BOOL X11SalGraphics::unionClipRegion( long nX, long nY, long nDX, long nDY ) + { +-#ifndef _USE_PRINT_EXTENSION_ +- if (maGraphicsData.m_pPrinterGfx != NULL) +- return maGraphicsData.m_pPrinterGfx->UnionClipRegion (nX, nY, nDX, nDY); +- else +- { +-#endif +- +- if (!nDX || !nDY) +- return TRUE; +- +- XRectangle aRect; +- aRect.x = (short)nX; +- aRect.y = (short)nY; +- aRect.width = (unsigned short)nDX; +- aRect.height = (unsigned short)nDY; +- +- XUnionRectWithRegion( &aRect, _GetClipRegion(), _GetClipRegion() ); +- ++ if (!nDX || !nDY) + return TRUE; + +-#ifndef _USE_PRINT_EXTENSION_ +- } +-#endif ++ numClipRects_++; ++ boundingClipRect_.Union( Rectangle( nX, nY, nX+nDX, nY+nDY ) ); ++ ++ XRectangle aRect; ++ aRect.x = (short)nX; ++ aRect.y = (short)nY; ++ aRect.width = (unsigned short)nDX; ++ aRect.height = (unsigned short)nDY; ++ ++ XUnionRectWithRegion( &aRect, pClipRegion_, pClipRegion_ ); ++ ++ return TRUE; + } + + // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +-void SalGraphics::EndSetClipRegion() +-{ +-#ifndef _USE_PRINT_EXTENSION_ +- if (maGraphicsData.m_pPrinterGfx != NULL) +- maGraphicsData.m_pPrinterGfx->EndSetClipRegion (); +- else +- { +-#endif +- +- _IsPenGC() = FALSE; +- _IsFontGC() = FALSE; +- _IsBrushGC() = FALSE; +- _IsMonoGC() = FALSE; +- _IsCopyGC() = FALSE; +- _IsInvertGC() = FALSE; +- _IsInvert50GC() = FALSE; +- _IsStippleGC() = FALSE; +- _IsTrackingGC() = FALSE; +- +- if( XEmptyRegion( _GetClipRegion() ) ) +- { +- XDestroyRegion( _GetClipRegion() ); +- _GetClipRegion() = NULL; +- } +- +-#ifndef _USE_PRINT_EXTENSION_ +- } +-#endif ++void X11SalGraphics::EndSetClipRegion() ++{ ++ bPenGC_ = FALSE; ++ bFontGC_ = FALSE; ++ bBrushGC_ = FALSE; ++ bMonoGC_ = FALSE; ++ bCopyGC_ = FALSE; ++ bInvertGC_ = FALSE; ++ bInvert50GC_ = FALSE; ++ bStippleGC_ = FALSE; ++ bTrackingGC_ = FALSE; ++ ++ if( XEmptyRegion( pClipRegion_ ) ) ++ { ++ XDestroyRegion( pClipRegion_ ); ++ pClipRegion_= NULL; ++ numClipRects_ = 0; ++ boundingClipRect_.SetEmpty(); ++ } + } + + // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +-void SalGraphics::SetLineColor() ++void X11SalGraphics::SetLineColor() + { +-#ifndef _USE_PRINT_EXTENSION_ +- if (maGraphicsData.m_pPrinterGfx != NULL) +- maGraphicsData.m_pPrinterGfx->SetLineColor (); +- else +- { +-#endif +- +- if( _GetPenColor() != 0xFFFFFFFF ) +- { +- _GetPenColor() = 0xFFFFFFFF; +- _IsPenGC() = FALSE; +- } +- +-#ifndef _USE_PRINT_EXTENSION_ +- } +-#endif ++ if( nPenColor_ != 0xFFFFFFFF ) ++ { ++ nPenColor_ = 0xFFFFFFFF; ++ bPenGC_ = FALSE; ++ } + } + + // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +-void SalGraphics::SetLineColor( SalColor nSalColor ) ++void X11SalGraphics::SetLineColor( SalColor nSalColor ) + { +-#ifndef _USE_PRINT_EXTENSION_ +- if (maGraphicsData.m_pPrinterGfx != NULL) +- { +- psp::PrinterColor aColor (SALCOLOR_RED (nSalColor), +- SALCOLOR_GREEN (nSalColor), +- SALCOLOR_BLUE (nSalColor)); +- maGraphicsData.m_pPrinterGfx->SetLineColor (aColor); +- } +- else +- { +-#endif +- +- if( _GetPenColor() != nSalColor ) +- { +- _GetPenColor() = nSalColor; +- _GetPenPixel() = _GetPixel( nSalColor ); +- _IsPenGC() = FALSE; +- } +- +-#ifndef _USE_PRINT_EXTENSION_ +- } +-#endif ++ if( nPenColor_ != nSalColor ) ++ { ++ nPenColor_ = nSalColor; ++ nPenPixel_ = GetPixel( nSalColor ); ++ bPenGC_ = FALSE; ++ } + } + + // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +-void SalGraphics::SetFillColor() ++void X11SalGraphics::SetFillColor() + { +-#ifndef _USE_PRINT_EXTENSION_ +- if (maGraphicsData.m_pPrinterGfx != NULL) +- maGraphicsData.m_pPrinterGfx->SetFillColor (); +- else +- { +-#endif +- +- if( _GetBrushColor() != 0xFFFFFFFF ) +- { +- _IsDitherBrush() = FALSE; +- _GetBrushColor() = 0xFFFFFFFF; +- _IsBrushGC() = FALSE; +- } +- +-#ifndef _USE_PRINT_EXTENSION_ +- } +-#endif ++ if( nBrushColor_ != 0xFFFFFFFF ) ++ { ++ bDitherBrush_ = FALSE; ++ nBrushColor_ = 0xFFFFFFFF; ++ bBrushGC_ = FALSE; ++ } + } + + // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +-void SalGraphics::SetFillColor( SalColor nSalColor ) ++void X11SalGraphics::SetFillColor( SalColor nSalColor ) + { +-#ifndef _USE_PRINT_EXTENSION_ +- if (maGraphicsData.m_pPrinterGfx != NULL) +- { +- psp::PrinterColor aColor (SALCOLOR_RED (nSalColor), +- SALCOLOR_GREEN (nSalColor), +- SALCOLOR_BLUE (nSalColor)); +- maGraphicsData.m_pPrinterGfx->SetFillColor (aColor); +- } +- else +- { +-#endif +- +- if( _GetBrushColor() != nSalColor ) +- { +- _IsDitherBrush() = FALSE; +- _GetBrushColor() = nSalColor; +- _GetBrushPixel() = _GetPixel( nSalColor ); +- if( TrueColor != _GetColormap().GetVisual()->GetClass() +- && _GetColor( _GetBrushPixel() ) != _GetBrushColor() +- && nSalColor != MAKE_SALCOLOR( 0x00, 0x00, 0x00 ) // black +- && nSalColor != MAKE_SALCOLOR( 0x00, 0x00, 0x80 ) // blue +- && nSalColor != MAKE_SALCOLOR( 0x00, 0x80, 0x00 ) // green +- && nSalColor != MAKE_SALCOLOR( 0x00, 0x80, 0x80 ) // cyan +- && nSalColor != MAKE_SALCOLOR( 0x80, 0x00, 0x00 ) // red +- && nSalColor != MAKE_SALCOLOR( 0x80, 0x00, 0x80 ) // magenta +- && nSalColor != MAKE_SALCOLOR( 0x80, 0x80, 0x00 ) // brown +- && nSalColor != MAKE_SALCOLOR( 0x80, 0x80, 0x80 ) // gray +- && nSalColor != MAKE_SALCOLOR( 0xC0, 0xC0, 0xC0 ) // light gray +- && nSalColor != MAKE_SALCOLOR( 0x00, 0x00, 0xFF ) // light blue +- && nSalColor != MAKE_SALCOLOR( 0x00, 0xFF, 0x00 ) // light green +- && nSalColor != MAKE_SALCOLOR( 0x00, 0xFF, 0xFF ) // light cyan +- && nSalColor != MAKE_SALCOLOR( 0xFF, 0x00, 0x00 ) // light red +- && nSalColor != MAKE_SALCOLOR( 0xFF, 0x00, 0xFF ) // light magenta +- && nSalColor != MAKE_SALCOLOR( 0xFF, 0xFF, 0x00 ) // light brown +- && nSalColor != MAKE_SALCOLOR( 0xFF, 0xFF, 0xFF ) ) +- _IsDitherBrush() = maGraphicsData.GetDitherPixmap(nSalColor); +- _IsBrushGC() = FALSE; +- } +- +-#ifndef _USE_PRINT_EXTENSION_ +- } +-#endif ++ if( nBrushColor_ != nSalColor ) ++ { ++ bDitherBrush_ = FALSE; ++ nBrushColor_ = nSalColor; ++ nBrushPixel_ = GetPixel( nSalColor ); ++ if( TrueColor != GetColormap().GetVisual()->GetClass() ++ && GetColormap().GetColor( nBrushPixel_ ) != nBrushColor_ ++ && nSalColor != MAKE_SALCOLOR( 0x00, 0x00, 0x00 ) // black ++ && nSalColor != MAKE_SALCOLOR( 0x00, 0x00, 0x80 ) // blue ++ && nSalColor != MAKE_SALCOLOR( 0x00, 0x80, 0x00 ) // green ++ && nSalColor != MAKE_SALCOLOR( 0x00, 0x80, 0x80 ) // cyan ++ && nSalColor != MAKE_SALCOLOR( 0x80, 0x00, 0x00 ) // red ++ && nSalColor != MAKE_SALCOLOR( 0x80, 0x00, 0x80 ) // magenta ++ && nSalColor != MAKE_SALCOLOR( 0x80, 0x80, 0x00 ) // brown ++ && nSalColor != MAKE_SALCOLOR( 0x80, 0x80, 0x80 ) // gray ++ && nSalColor != MAKE_SALCOLOR( 0xC0, 0xC0, 0xC0 ) // light gray ++ && nSalColor != MAKE_SALCOLOR( 0x00, 0x00, 0xFF ) // light blue ++ && nSalColor != MAKE_SALCOLOR( 0x00, 0xFF, 0x00 ) // light green ++ && nSalColor != MAKE_SALCOLOR( 0x00, 0xFF, 0xFF ) // light cyan ++ && nSalColor != MAKE_SALCOLOR( 0xFF, 0x00, 0x00 ) // light red ++ && nSalColor != MAKE_SALCOLOR( 0xFF, 0x00, 0xFF ) // light magenta ++ && nSalColor != MAKE_SALCOLOR( 0xFF, 0xFF, 0x00 ) // light brown ++ && nSalColor != MAKE_SALCOLOR( 0xFF, 0xFF, 0xFF ) ) ++ bDitherBrush_ = GetDitherPixmap(nSalColor); ++ bBrushGC_ = FALSE; ++ } + } + + // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +-void SalGraphics::SetROPLineColor( SalROPColor nROPColor ) ++void X11SalGraphics::SetROPLineColor( SalROPColor nROPColor ) + { +-#ifndef _USE_PRINT_EXTENSION_ +- if (maGraphicsData.m_pPrinterGfx != NULL) +- { +- DBG_ASSERT( 0, "Error: PrinterGfx::SetROPLineColor() not implemented" ); +- } +- else +- { +-#endif +- +- switch( nROPColor ) +- { +- case SAL_ROP_0 : // 0 +- _GetPenPixel() = (Pixel)0; +- break; +- case SAL_ROP_1 : // 1 +- _GetPenPixel() = (Pixel)(1 << _GetVisual()->GetDepth()) - 1; +- break; +- case SAL_ROP_INVERT : // 2 +- _GetPenPixel() = (Pixel)(1 << _GetVisual()->GetDepth()) - 1; +- break; +- } +- _GetPenColor() = _GetColor( _GetPenPixel() ); +- _IsPenGC() = FALSE; +- +-#ifndef _USE_PRINT_EXTENSION_ +- } +-#endif ++ switch( nROPColor ) ++ { ++ case SAL_ROP_0 : // 0 ++ nPenPixel_ = (Pixel)0; ++ break; ++ case SAL_ROP_1 : // 1 ++ nPenPixel_ = (Pixel)(1 << GetVisual()->GetDepth()) - 1; ++ break; ++ case SAL_ROP_INVERT : // 2 ++ nPenPixel_ = (Pixel)(1 << GetVisual()->GetDepth()) - 1; ++ break; ++ } ++ nPenColor_ = GetColormap().GetColor( nPenPixel_ ); ++ bPenGC_ = FALSE; + } + + // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +-void SalGraphics::SetROPFillColor( SalROPColor nROPColor ) ++void X11SalGraphics::SetROPFillColor( SalROPColor nROPColor ) + { +-#ifndef _USE_PRINT_EXTENSION_ +- if (maGraphicsData.m_pPrinterGfx != NULL) +- { +- DBG_ASSERT( 0, "Error: PrinterGfx::SetROPFillColor() not implemented" ); +- } +- else +- { +-#endif +- +- switch( nROPColor ) +- { +- case SAL_ROP_0 : // 0 +- _GetBrushPixel() = (Pixel)0; +- break; +- case SAL_ROP_1 : // 1 +- _GetBrushPixel() = (Pixel)(1 << _GetVisual()->GetDepth()) - 1; +- break; +- case SAL_ROP_INVERT : // 2 +- _GetBrushPixel() = (Pixel)(1 << _GetVisual()->GetDepth()) - 1; +- break; +- } +- _IsDitherBrush() = FALSE; +- _GetBrushColor() = _GetColor( _GetBrushPixel() ); +- _IsBrushGC() = FALSE; +- +-#ifndef _USE_PRINT_EXTENSION_ +- } +-#endif ++ switch( nROPColor ) ++ { ++ case SAL_ROP_0 : // 0 ++ nBrushPixel_ = (Pixel)0; ++ break; ++ case SAL_ROP_1 : // 1 ++ nBrushPixel_ = (Pixel)(1 << GetVisual()->GetDepth()) - 1; ++ break; ++ case SAL_ROP_INVERT : // 2 ++ nBrushPixel_ = (Pixel)(1 << GetVisual()->GetDepth()) - 1; ++ break; ++ } ++ bDitherBrush_ = FALSE; ++ nBrushColor_ = GetColormap().GetColor( nBrushPixel_ ); ++ bBrushGC_ = FALSE; + } + + // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +-void SalGraphics::SetXORMode( BOOL bSet ) ++void X11SalGraphics::SetXORMode( BOOL bSet ) + { +-#ifndef _USE_PRINT_EXTENSION_ +- if (maGraphicsData.m_pPrinterGfx != NULL) +- { +- DBG_ASSERT( !bSet, "Error: PrinterGfx::SetXORMode() not implemented" ); +- } +- else +- { +-#endif +- +- if( !_IsXORMode() == bSet ) +- { +- _IsXORMode() = bSet; +- _IsPenGC() = FALSE; +- _IsBrushGC() = FALSE; +- _IsMonoGC() = FALSE; +- _IsCopyGC() = FALSE; +- _IsInvertGC() = FALSE; +- _IsInvert50GC() = FALSE; +- _IsStippleGC() = FALSE; +- _IsTrackingGC() = FALSE; +- } +- +-#ifndef _USE_PRINT_EXTENSION_ +- } +-#endif ++ if( !bXORMode_ == bSet ) ++ { ++ bXORMode_ = bSet; ++ bPenGC_ = FALSE; ++ bBrushGC_ = FALSE; ++ bMonoGC_ = FALSE; ++ bCopyGC_ = FALSE; ++ bInvertGC_ = FALSE; ++ bInvert50GC_ = FALSE; ++ bStippleGC_ = FALSE; ++ bTrackingGC_ = FALSE; ++ } + } + + // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +-void SalGraphics::DrawPixel( long nX, long nY, const OutputDevice* ) ++void X11SalGraphics::drawPixel( long nX, long nY ) + { +-#ifndef _USE_PRINT_EXTENSION_ +- if (maGraphicsData.m_pPrinterGfx != NULL) +- maGraphicsData.m_pPrinterGfx->DrawPixel (Point(nX, nY)); +- else +- { +-#endif +- +- if( _GetPenColor() != 0xFFFFFFFF ) +- XDrawPoint( _GetXDisplay(), _GetDrawable(), _SelectPen(), nX, nY ); +- +-#ifndef _USE_PRINT_EXTENSION_ +- } +-#endif ++ if( nPenColor_ != 0xFFFFFFFF ) ++ XDrawPoint( GetXDisplay(), GetDrawable(), SelectPen(), nX, nY ); + } + +-void SalGraphics::DrawPixel( long nX, long nY, SalColor nSalColor, const OutputDevice* ) ++void X11SalGraphics::drawPixel( long nX, long nY, SalColor nSalColor ) + { +-#ifndef _USE_PRINT_EXTENSION_ +- if (maGraphicsData.m_pPrinterGfx != NULL) +- { +- psp::PrinterColor aColor (SALCOLOR_RED (nSalColor), +- SALCOLOR_GREEN (nSalColor), +- SALCOLOR_BLUE (nSalColor)); +- maGraphicsData.m_pPrinterGfx->DrawPixel (Point(nX, nY), aColor); +- } +- else +- { +-#endif +- +- if( nSalColor != 0xFFFFFFFF ) ++ if( nSalColor != 0xFFFFFFFF ) ++ { ++ Display *pDisplay = GetXDisplay(); ++ ++ if( nPenColor_ == 0xFFFFFFFF && !bPenGC_ ) ++ { ++ SetLineColor( nSalColor ); ++ XDrawPoint( pDisplay, GetDrawable(), SelectPen(), nX, nY ); ++ nPenColor_ = 0xFFFFFFFF; ++ bPenGC_ = False; ++ } ++ else + { +- Display *pDisplay = _GetXDisplay(); +- +- if( _GetPenColor() == 0xFFFFFFFF && !_IsPenGC() ) +- { +- SetLineColor( nSalColor ); +- XDrawPoint( pDisplay, _GetDrawable(), _SelectPen(), nX, nY ); +- _GetPenColor() = 0xFFFFFFFF; +- _IsPenGC() = False; +- } +- else +- { +- GC pGC = _SelectPen(); +- +- if( nSalColor != _GetPenColor() ) +- XSetForeground( pDisplay, pGC, _GetPixel( nSalColor ) ); +- +- XDrawPoint( pDisplay, _GetDrawable(), pGC, nX, nY ); +- +- if( nSalColor != _GetPenColor() ) +- XSetForeground( pDisplay, pGC, _GetPenPixel() ); +- } ++ GC pGC = SelectPen(); ++ ++ if( nSalColor != nPenColor_ ) ++ XSetForeground( pDisplay, pGC, GetPixel( nSalColor ) ); ++ ++ XDrawPoint( pDisplay, GetDrawable(), pGC, nX, nY ); ++ ++ if( nSalColor != nPenColor_ ) ++ XSetForeground( pDisplay, pGC, nPenPixel_ ); + } +-#ifndef _USE_PRINT_EXTENSION_ +- } +-#endif ++ } + } + + // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +-void SalGraphics::DrawLine( long nX1, long nY1, long nX2, long nY2, const OutputDevice* ) ++void X11SalGraphics::drawLine( long nX1, long nY1, long nX2, long nY2 ) + { +-#ifndef _USE_PRINT_EXTENSION_ +- if (maGraphicsData.m_pPrinterGfx != NULL) +- maGraphicsData.m_pPrinterGfx->DrawLine (Point(nX1, nY1), Point(nX2, nY2)); +- else +- { +-#endif +- +- if( _GetPenColor() != 0xFFFFFFFF ) ++ if( nPenColor_ != 0xFFFFFFFF ) ++ { ++ if ( GetDisplay()->GetProperties() & PROPERTY_BUG_DrawLine ) + { +- if ( _GetDisplay()->GetProperties() & PROPERTY_BUG_DrawLine ) +- { +- GC aGC = _SelectPen(); +- XDrawPoint (_GetXDisplay(), _GetDrawable(), aGC, (int)nX1, (int)nY1); +- XDrawPoint (_GetXDisplay(), _GetDrawable(), aGC, (int)nX2, (int)nY2); +- XDrawLine (_GetXDisplay(), _GetDrawable(), aGC, nX1, nY1, nX2, nY2 ); ++ GC aGC = SelectPen(); ++ XDrawPoint (GetXDisplay(), GetDrawable(), aGC, (int)nX1, (int)nY1); ++ XDrawPoint (GetXDisplay(), GetDrawable(), aGC, (int)nX2, (int)nY2); ++ XDrawLine (GetXDisplay(), GetDrawable(), aGC, nX1, nY1, nX2, nY2 ); + } +- else +- XDrawLine( _GetXDisplay(), _GetDrawable(),_SelectPen(), +- nX1, nY1, nX2, nY2 ); +- } +- +-#ifndef _USE_PRINT_EXTENSION_ +- } +-#endif ++ else ++ XDrawLine( GetXDisplay(), GetDrawable(),SelectPen(), ++ nX1, nY1, nX2, nY2 ); ++ } + } + + // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +-void SalGraphics::DrawRect( long nX, long nY, long nDX, long nDY, const OutputDevice* ) ++void X11SalGraphics::drawRect( long nX, long nY, long nDX, long nDY ) + { +-#ifndef _USE_PRINT_EXTENSION_ +- if (maGraphicsData.m_pPrinterGfx != NULL) +- +- maGraphicsData.m_pPrinterGfx->DrawRect (Rectangle(Point(nX, nY), Size(nDX, nDY))); +- else +- { +-#endif +- +- if( _GetBrushColor() != 0xFFFFFFFF ) +- { +- XFillRectangle( _GetXDisplay(), +- _GetDrawable(), +- _SelectBrush(), +- nX, nY, nDX, nDY ); +- } +- // Beschreibung DrawRect verkehrt, deshalb -1 +- if( _GetPenColor() != 0xFFFFFFFF ) +- XDrawRectangle( _GetXDisplay(), +- _GetDrawable(), +- _SelectPen(), +- nX, nY, nDX-1, nDY-1 ); +- +-#ifndef _USE_PRINT_EXTENSION_ +- } +-#endif ++ if( nBrushColor_ != 0xFFFFFFFF ) ++ { ++ XFillRectangle( GetXDisplay(), ++ GetDrawable(), ++ SelectBrush(), ++ nX, nY, nDX, nDY ); ++ } ++ // Beschreibung DrawRect verkehrt, deshalb -1 ++ if( nPenColor_ != 0xFFFFFFFF ) ++ XDrawRectangle( GetXDisplay(), ++ GetDrawable(), ++ SelectPen(), ++ nX, nY, nDX-1, nDY-1 ); + } + + // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +-void SalGraphics::DrawPolyLine( ULONG nPoints, const SalPoint *pPtAry, const OutputDevice* ) ++void X11SalGraphics::drawPolyLine( ULONG nPoints, const SalPoint *pPtAry ) + { +-#ifndef _USE_PRINT_EXTENSION_ +- if (maGraphicsData.m_pPrinterGfx != NULL) +- maGraphicsData.m_pPrinterGfx->DrawPolyLine (nPoints, (Point*)pPtAry); +- else +- { +-#endif +- +- if( _GetPenColor() != 0xFFFFFFFF ) +- { +- SalPolyLine Points( nPoints, pPtAry ); +- +- maGraphicsData.DrawLines( nPoints, Points, _SelectPen() ); +- } +-#ifndef _USE_PRINT_EXTENSION_ +- } +-#endif ++ if( nPenColor_ != 0xFFFFFFFF ) ++ { ++ SalPolyLine Points( nPoints, pPtAry ); ++ ++ DrawLines( nPoints, Points, SelectPen() ); ++ } + } + + // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +-void SalGraphics::DrawPolygon( ULONG nPoints, const SalPoint* pPtAry, const OutputDevice *pOutDev ) ++void X11SalGraphics::drawPolygon( ULONG nPoints, const SalPoint* pPtAry ) + { +-#ifndef _USE_PRINT_EXTENSION_ +- // Point must be equal to SalPoint! see vcl/inc/salgtype.hxx +- if (maGraphicsData.m_pPrinterGfx != NULL) +- maGraphicsData.m_pPrinterGfx->DrawPolygon (nPoints, (Point*)pPtAry); +- else +- { +-#endif +- +- if( nPoints < 3 ) ++ if( nPoints < 3 ) ++ { ++ if( !nPoints ) + { +- if( !nPoints ) +- { + #if OSL_DEBUG_LEVEL > 1 +- fprintf( stderr, "SalGraphics::DrawPolygon !nPoints\n" ); ++ fprintf( stderr, "X11SalGraphicsDrawPolygon !nPoints\n" ); + #endif +- } +- else if( !_IsXORMode() ) +- { +- if( 1 == nPoints ) +- DrawPixel( pPtAry[0].mnX, pPtAry[0].mnY, pOutDev ); +- else +- DrawLine( pPtAry[0].mnX, pPtAry[0].mnY, +- pPtAry[1].mnX, pPtAry[1].mnY, pOutDev ); +- } +- return; + } +- +- SalPolyLine Points( nPoints, pPtAry ); +- +- nPoints++; +- +- if( _GetBrushColor() != 0xFFFFFFFF ) +- XFillPolygon( _GetXDisplay(), +- _GetDrawable(), +- _SelectBrush(), +- &Points[0], nPoints, +- Complex, CoordModeOrigin ); +- +- if( _GetPenColor() != 0xFFFFFFFF ) +- maGraphicsData.DrawLines( nPoints, Points, _SelectPen() ); +- +-#ifndef _USE_PRINT_EXTENSION_ +- } +-#endif ++ else if( !bXORMode_ ) ++ { ++ if( 1 == nPoints ) ++ drawPixel( pPtAry[0].mnX, pPtAry[0].mnY ); ++ else ++ drawLine( pPtAry[0].mnX, pPtAry[0].mnY, ++ pPtAry[1].mnX, pPtAry[1].mnY ); ++ } ++ return; ++ } ++ ++ SalPolyLine Points( nPoints, pPtAry ); ++ ++ nPoints++; ++ ++ if( nBrushColor_ != 0xFFFFFFFF ) ++ XFillPolygon( GetXDisplay(), ++ GetDrawable(), ++ SelectBrush(), ++ &Points[0], nPoints, ++ Complex, CoordModeOrigin ); ++ ++ if( nPenColor_ != 0xFFFFFFFF ) ++ DrawLines( nPoints, Points, SelectPen() ); + } + + // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +-void SalGraphics::DrawPolyPolygon( ULONG nPoly, ++void X11SalGraphics::drawPolyPolygon( ULONG nPoly, + const ULONG *pPoints, +- PCONSTSALPOINT *pPtAry, +- const OutputDevice *pOutDev ) ++ PCONSTSALPOINT *pPtAry ) + { +-#ifndef _USE_PRINT_EXTENSION_ +- if (maGraphicsData.m_pPrinterGfx != NULL) +- maGraphicsData.m_pPrinterGfx->DrawPolyPolygon (nPoly, pPoints, (const Point**)pPtAry); +- else +- { +- +-#endif +- +- if( _GetBrushColor() != 0xFFFFFFFF ) +- { +- ULONG i, n; +- XLIB_Region pXRegA = NULL; +- +-#ifdef CLIPPING +- Size aOutSize = pOutDev->GetOutputSizePixel(); +- +- ClipRectangle aClippingRect( Point(0,0), +- Point(aOutSize.Width(), aOutSize.Height()) ); +- +- ULONG nMax = pPoints[0]; +- for( i = 1; i < nPoly; i++ ) +- if( pPoints[i] > nMax ) +- nMax = pPoints[i]; +- +- SalPolyLine Points( nMax * 2 ); +- +- for( i = 0; i < nPoly; i++ ) ++ if( nBrushColor_ != 0xFFFFFFFF ) ++ { ++ ULONG i, n; ++ XLIB_Region pXRegA = NULL; ++ ++ for( i = 0; i < nPoly; i++ ) { ++ n = pPoints[i]; ++ SalPolyLine Points( n, pPtAry[i] ); ++ if( n > 2 ) + { +- n = aClippingRect.ClipPolygon( pPoints[i], pPtAry[i], &Points[0] ); +-#else +- for( i = 0; i < nPoly; i++ ) { +- n = pPoints[i]; +- SalPolyLine Points( n, pPtAry[i] ); +-#endif +- if( n > 2 ) ++ XLIB_Region pXRegB = XPolygonRegion( &Points[0], n+1, WindingRule ); ++ if( !pXRegA ) ++ pXRegA = pXRegB; ++ else + { +- XLIB_Region pXRegB = XPolygonRegion( &Points[0], n+1, WindingRule ); +- if( !pXRegA ) +- pXRegA = pXRegB; +- else +- { +- XXorRegion( pXRegA, pXRegB, pXRegA ); +- XDestroyRegion( pXRegB ); +- } ++ XXorRegion( pXRegA, pXRegB, pXRegA ); ++ XDestroyRegion( pXRegB ); + } + } +- +- if( pXRegA ) +- { +- XRectangle aXRect; +- XClipBox( pXRegA, &aXRect ); +- +- GC pGC = _SelectBrush(); +- maGraphicsData.SetClipRegion( pGC, pXRegA ); // ??? doppelt +- XDestroyRegion( pXRegA ); +- _IsBrushGC() = FALSE; +- +- XFillRectangle( _GetXDisplay(), +- _GetDrawable(), +- pGC, +- aXRect.x, aXRect.y, aXRect.width, aXRect.height ); +- } + } +- +- if( _GetPenColor() != 0xFFFFFFFF ) +- for( ULONG i = 0; i < nPoly; i++ ) +- DrawPolyLine( pPoints[i], pPtAry[i], pOutDev ); +- +-#ifndef _USE_PRINT_EXTENSION_ +- } +-#endif ++ ++ if( pXRegA ) ++ { ++ XRectangle aXRect; ++ XClipBox( pXRegA, &aXRect ); ++ ++ GC pGC = SelectBrush(); ++ SetClipRegion( pGC, pXRegA ); // ??? doppelt ++ XDestroyRegion( pXRegA ); ++ bBrushGC_ = FALSE; ++ ++ XFillRectangle( GetXDisplay(), ++ GetDrawable(), ++ pGC, ++ aXRect.x, aXRect.y, aXRect.width, aXRect.height ); ++ } ++ } ++ ++ if( nPenColor_ != 0xFFFFFFFF ) ++ for( ULONG i = 0; i < nPoly; i++ ) ++ drawPolyLine( pPoints[i], pPtAry[i] ); + } + + // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + +-sal_Bool SalGraphics::DrawPolyLineBezier( ULONG nPoints, const SalPoint* pPtAry, const BYTE* pFlgAry, const OutputDevice* ) ++sal_Bool X11SalGraphics::drawPolyLineBezier( ULONG nPoints, const SalPoint* pPtAry, const BYTE* pFlgAry ) + { +-#ifndef _USE_PRINT_EXTENSION_ +- if (maGraphicsData.m_pPrinterGfx != NULL) +- { +- maGraphicsData.m_pPrinterGfx->DrawPolyLineBezier (nPoints, (Point*)pPtAry, pFlgAry); +- return sal_True; +- } +-#endif + return sal_False; + } + + // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + +-sal_Bool SalGraphics::DrawPolygonBezier( ULONG nPoints, const SalPoint* pPtAry, const BYTE* pFlgAry, const OutputDevice* ) ++sal_Bool X11SalGraphics::drawPolygonBezier( ULONG nPoints, const SalPoint* pPtAry, const BYTE* pFlgAry ) + { +-#ifndef _USE_PRINT_EXTENSION_ +- if (maGraphicsData.m_pPrinterGfx != NULL) +- { +- maGraphicsData.m_pPrinterGfx->DrawPolygonBezier (nPoints, (Point*)pPtAry, pFlgAry); +- return sal_True; +- } +-#endif + return sal_False; + } + + // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + +-sal_Bool SalGraphics::DrawPolyPolygonBezier( ULONG nPoly, const ULONG* pPoints, +- const SalPoint* const* pPtAry, const BYTE* const* pFlgAry, const OutputDevice* ) ++sal_Bool X11SalGraphics::drawPolyPolygonBezier( ULONG nPoly, const ULONG* pPoints, ++ const SalPoint* const* pPtAry, const BYTE* const* pFlgAry ) + { +-#ifndef _USE_PRINT_EXTENSION_ +- // Point must be equal to SalPoint! see vcl/inc/salgtype.hxx +- if (maGraphicsData.m_pPrinterGfx != NULL) +- { +- maGraphicsData.m_pPrinterGfx->DrawPolyPolygonBezier (nPoly, pPoints, (Point**)pPtAry, (BYTE**)pFlgAry); +- return sal_True; +- } +-#endif + return sal_False; + } + + // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + +-void SalGraphics::Invert( ULONG nPoints, +- const SalPoint* pPtAry, +- SalInvert nFlags, +- const OutputDevice* ) +-{ +-#ifndef _USE_PRINT_EXTENSION_ +- if (maGraphicsData.m_pPrinterGfx != NULL) +- { +- DBG_ASSERT( 0, "Error: PrinterGfx::Invert() not implemented" ); +- } +- else +- { +-#endif +- +- SalDisplay *pDisp = _GetDisplay(); +- SalPolyLine Points ( nPoints, pPtAry ); +- +- GC pGC; +- if( SAL_INVERT_50 & nFlags ) +- pGC = maGraphicsData.GetInvert50GC(); +- else +- if ( SAL_INVERT_TRACKFRAME & nFlags ) +- pGC = maGraphicsData.GetTrackingGC(); +- else +- pGC = maGraphicsData.GetInvertGC(); +- +- if( SAL_INVERT_TRACKFRAME & nFlags ) +- maGraphicsData.DrawLines ( nPoints, Points, pGC ); ++void X11SalGraphics::invert( ULONG nPoints, ++ const SalPoint* pPtAry, ++ SalInvert nFlags ) ++{ ++ SalDisplay *pDisp = GetDisplay(); ++ SalPolyLine Points ( nPoints, pPtAry ); ++ ++ GC pGC; ++ if( SAL_INVERT_50 & nFlags ) ++ pGC = GetInvert50GC(); ++ else ++ if ( SAL_INVERT_TRACKFRAME & nFlags ) ++ pGC = GetTrackingGC(); + else +- XFillPolygon( _GetXDisplay(), +- _GetDrawable(), +- pGC, +- &Points[0], nPoints, +- Complex, CoordModeOrigin ); +- +-#ifndef _USE_PRINT_EXTENSION_ +- } +-#endif ++ pGC = GetInvertGC(); ++ ++ if( SAL_INVERT_TRACKFRAME & nFlags ) ++ DrawLines ( nPoints, Points, pGC ); ++ else ++ XFillPolygon( GetXDisplay(), ++ GetDrawable(), ++ pGC, ++ &Points[0], nPoints, ++ Complex, CoordModeOrigin ); + } + + // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + +-BOOL SalGraphics::DrawEPS( long nX, long nY, long nWidth, long nHeight, void* pPtr, ULONG nSize, const OutputDevice* ) ++BOOL X11SalGraphics::drawEPS( long nX, long nY, long nWidth, long nHeight, void* pPtr, ULONG nSize ) + { +-#ifndef _USE_PRINT_EXTENSION_ +- if (maGraphicsData.m_pPrinterGfx != NULL) +- { +- return maGraphicsData.m_pPrinterGfx->DrawEPS( Rectangle( Point( nX, nY ), Size( nWidth, nHeight ) ), pPtr, nSize ); +- } +- else +-#endif +- return FALSE; ++ return FALSE; + } +- +Index: vcl/unx/source/gdi/salgdi2.cxx +=================================================================== +RCS file: /cvs/gsl/vcl/unx/source/gdi/salgdi2.cxx,v +retrieving revision 1.18.68.1 +retrieving revision 1.25 +diff -u -p -u -r1.18.68.1 -r1.25 +--- vcl/unx/source/gdi/salgdi2.cxx 15 Jan 2004 12:53:52 -0000 1.18.68.1 ++++ vcl/unx/source/gdi/salgdi2.cxx 22 Jun 2004 17:42:46 -0000 1.25 +@@ -59,9 +59,6 @@ + * + ************************************************************************/ + +-#define _SV_SALGDI2_CXX +- +-// -=-= #includes =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + #include <stdio.h> + + #include <salunx.h> +@@ -72,17 +69,17 @@ + #ifndef _SV_SALDISP_HXX + #include <saldisp.hxx> + #endif +-#ifndef _SV_SALBMP_HXX +-#include <salbmp.hxx> ++#ifndef _SV_SALBMP_H ++#include <salbmp.h> + #endif + #ifndef _SV_SALBTYPE_HXX + #include <salbtype.hxx> + #endif +-#ifndef _SV_SALGDI_HXX +-#include <salgdi.hxx> ++#ifndef _SV_SALGDI_H ++#include <salgdi.h> + #endif +-#ifndef _SV_SALFRAME_HXX +-#include <salframe.hxx> ++#ifndef _SV_SALFRAME_H ++#include <salframe.h> + #endif + + #ifndef _USE_PRINT_EXTENSION_ +@@ -115,7 +112,7 @@ static void sal_PrintImage( char *s, XIm + #if (OSL_DEBUG_LEVEL > 1) && defined SALGDI2_TESTTRANS + #define DBG_TESTTRANS( _def_drawable ) \ + { \ +- XCopyArea( pXDisp, _def_drawable, aDrawable, _GetCopyGC(), \ ++ XCopyArea( pXDisp, _def_drawable, aDrawable, GetCopyGC(), \ + 0, 0, \ + pPosAry->mnDestWidth, pPosAry->mnDestHeight, \ + 0, 0 ); \ +@@ -124,15 +121,15 @@ static void sal_PrintImage( char *s, XIm + #define DBG_TESTTRANS( _def_drawable ) + #endif // (OSL_DEBUG_LEVEL > 1) && defined SALGDI2_TESTTRANS + +-// -=-= SalGraphicsData =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= ++// -=-= X11SalGraphics =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +-GC SalGraphicsData::CreateGC( Drawable hDrawable, unsigned long nMask ) ++GC X11SalGraphics::CreateGC( Drawable hDrawable, unsigned long nMask ) + { + XGCValues values; + + values.graphics_exposures = True; +- values.foreground = xColormap_->GetBlackPixel() +- ^ xColormap_->GetWhitePixel(); ++ values.foreground = m_pColormap->GetBlackPixel() ++ ^ m_pColormap->GetWhitePixel(); + values.function = GXxor; + values.line_width = 1; + values.fill_style = FillStippled; +@@ -143,7 +140,7 @@ GC SalGraphicsData::CreateGC( Drawable h + } + + // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +-inline GC SalGraphicsData::GetMonoGC( Pixmap hPixmap ) ++inline GC X11SalGraphics::GetMonoGC( Pixmap hPixmap ) + { + if( !pMonoGC_ ) + pMonoGC_ = CreateGC( hPixmap ); +@@ -158,7 +155,7 @@ inline GC SalGraphicsData::GetMonoGC( Pi + } + + // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +-inline GC SalGraphicsData::GetCopyGC() ++inline GC X11SalGraphics::GetCopyGC() + { + if( bXORMode_ ) return GetInvertGC(); + +@@ -174,7 +171,7 @@ inline GC SalGraphicsData::GetCopyGC() + } + + // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +-GC SalGraphicsData::GetInvertGC() ++GC X11SalGraphics::GetInvertGC() + { + if( !pInvertGC_ ) + pInvertGC_ = CreateGC( GetDrawable(), +@@ -192,15 +189,15 @@ GC SalGraphicsData::GetInvertGC() + } + + // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +-GC SalGraphicsData::GetInvert50GC() ++GC X11SalGraphics::GetInvert50GC() + { + if( !pInvert50GC_ ) + { + XGCValues values; + + values.graphics_exposures = True; +- values.foreground = xColormap_->GetWhitePixel(); +- values.background = xColormap_->GetBlackPixel(); ++ values.foreground = m_pColormap->GetWhitePixel(); ++ values.background = m_pColormap->GetBlackPixel(); + values.function = GXinvert; + values.line_width = 1; + values.line_style = LineSolid; +@@ -240,7 +237,7 @@ GC SalGraphicsData::GetInvert50GC() + } + + // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +-inline GC SalGraphicsData::GetStippleGC() ++inline GC X11SalGraphics::GetStippleGC() + { + if( !pStippleGC_ ) + pStippleGC_ = CreateGC( GetDrawable(), +@@ -259,7 +256,7 @@ inline GC SalGraphicsData::GetStippleGC( + } + + // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +-int SalGraphicsData::Clip( XLIB_Region pRegion, ++int X11SalGraphics::Clip( XLIB_Region pRegion, + int &nX, + int &nY, + unsigned int &nDX, +@@ -297,7 +294,7 @@ int SalGraphicsData::Clip( XLIB_Region + } + + // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +-int SalGraphicsData::Clip( int &nX, ++int X11SalGraphics::Clip( int &nX, + int &nY, + unsigned int &nDX, + unsigned int &nDY, +@@ -339,7 +336,7 @@ int SalGraphicsData::Clip( int + } + + // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +-GC SalGraphicsData::SetMask( int &nX, ++GC X11SalGraphics::SetMask( int &nX, + int &nY, + unsigned int &nDX, + unsigned int &nDY, +@@ -369,7 +366,7 @@ GC SalGraphicsData::SetMask( int + if( !hPixmap ) + { + #if (OSL_DEBUG_LEVEL > 1) || defined DBG_UTIL +- fprintf( stderr, "SalGraphicsData::SetMask !hPixmap\n" ); ++ fprintf( stderr, "X11SalGraphics::SetMask !hPixmap\n" ); + #endif + return NULL; + } +@@ -399,771 +396,495 @@ GC SalGraphicsData::SetMask( int + return pMaskGC_; + } + +-// ----- Implementation of PrinterBmp by means of SalBitmap/BitmapBuffer --------------- +- +-#ifndef _USE_PRINT_EXTENSION_ +-class SalPrinterBmp : public psp::PrinterBmp +-{ +- private: +- +- BitmapBuffer* mpBmpBuffer; +- +- FncGetPixel mpFncGetPixel; +- Scanline mpScanAccess; +- sal_Int32 mnScanOffset; +- +- sal_uInt32 ColorOf (BitmapColor& rColor) const; +- sal_uInt8 GrayOf (BitmapColor& rColor) const; +- +- SalPrinterBmp (); +- +- public: +- +- SalPrinterBmp (BitmapBuffer* pBitmap); +- virtual ~SalPrinterBmp (); +- virtual sal_uInt32 GetPaletteColor (sal_uInt32 nIdx) const; +- virtual sal_uInt32 GetPaletteEntryCount () const; +- virtual sal_uInt32 GetPixelRGB (sal_uInt32 nRow, sal_uInt32 nColumn) const; +- virtual sal_uInt8 GetPixelGray (sal_uInt32 nRow, sal_uInt32 nColumn) const; +- virtual sal_uInt8 GetPixelIdx (sal_uInt32 nRow, sal_uInt32 nColumn) const; +- virtual sal_uInt32 GetWidth () const; +- virtual sal_uInt32 GetHeight() const; +- virtual sal_uInt32 GetDepth () const; +-}; +- +-SalPrinterBmp::SalPrinterBmp (BitmapBuffer* pBuffer) : +- mpBmpBuffer (pBuffer) +-{ +- DBG_ASSERT (mpBmpBuffer, "SalPrinterBmp::SalPrinterBmp () can't acquire Bitmap"); +- +- // calibrate scanline buffer +- if( BMP_SCANLINE_ADJUSTMENT( mpBmpBuffer->mnFormat ) == BMP_FORMAT_TOP_DOWN ) +- { +- mpScanAccess = mpBmpBuffer->mpBits; +- mnScanOffset = mpBmpBuffer->mnScanlineSize; +- } +- else +- { +- mpScanAccess = mpBmpBuffer->mpBits +- + (mpBmpBuffer->mnHeight - 1) * mpBmpBuffer->mnScanlineSize; +- mnScanOffset = - mpBmpBuffer->mnScanlineSize; +- } +- +- // request read access to the pixels +- switch( BMP_SCANLINE_FORMAT( mpBmpBuffer->mnFormat ) ) +- { +- case BMP_FORMAT_1BIT_MSB_PAL: +- mpFncGetPixel = BitmapReadAccess::GetPixelFor_1BIT_MSB_PAL; break; +- case BMP_FORMAT_1BIT_LSB_PAL: +- mpFncGetPixel = BitmapReadAccess::GetPixelFor_1BIT_LSB_PAL; break; +- case BMP_FORMAT_4BIT_MSN_PAL: +- mpFncGetPixel = BitmapReadAccess::GetPixelFor_4BIT_MSN_PAL; break; +- case BMP_FORMAT_4BIT_LSN_PAL: +- mpFncGetPixel = BitmapReadAccess::GetPixelFor_4BIT_LSN_PAL; break; +- case BMP_FORMAT_8BIT_PAL: +- mpFncGetPixel = BitmapReadAccess::GetPixelFor_8BIT_PAL; break; +- case BMP_FORMAT_8BIT_TC_MASK: +- mpFncGetPixel = BitmapReadAccess::GetPixelFor_8BIT_TC_MASK; break; +- case BMP_FORMAT_16BIT_TC_MSB_MASK: +- mpFncGetPixel = BitmapReadAccess::GetPixelFor_16BIT_TC_MSB_MASK; break; +- case BMP_FORMAT_16BIT_TC_LSB_MASK: +- mpFncGetPixel = BitmapReadAccess::GetPixelFor_16BIT_TC_LSB_MASK; break; +- case BMP_FORMAT_24BIT_TC_BGR: +- mpFncGetPixel = BitmapReadAccess::GetPixelFor_24BIT_TC_BGR; break; +- case BMP_FORMAT_24BIT_TC_RGB: +- mpFncGetPixel = BitmapReadAccess::GetPixelFor_24BIT_TC_RGB; break; +- case BMP_FORMAT_24BIT_TC_MASK: +- mpFncGetPixel = BitmapReadAccess::GetPixelFor_24BIT_TC_MASK; break; +- case BMP_FORMAT_32BIT_TC_ABGR: +- mpFncGetPixel = BitmapReadAccess::GetPixelFor_32BIT_TC_ABGR; break; +- case BMP_FORMAT_32BIT_TC_ARGB: +- mpFncGetPixel = BitmapReadAccess::GetPixelFor_32BIT_TC_ARGB; break; +- case BMP_FORMAT_32BIT_TC_BGRA: +- mpFncGetPixel = BitmapReadAccess::GetPixelFor_32BIT_TC_BGRA; break; +- case BMP_FORMAT_32BIT_TC_RGBA: +- mpFncGetPixel = BitmapReadAccess::GetPixelFor_32BIT_TC_RGBA; break; +- case BMP_FORMAT_32BIT_TC_MASK: +- mpFncGetPixel = BitmapReadAccess::GetPixelFor_32BIT_TC_MASK; break; +- +- default: +- DBG_ERROR("Error: SalPrinterBmp::SalPrinterBmp() unknown bitmap format"); +- break; +- } +-} +- +-SalPrinterBmp::~SalPrinterBmp () +-{ +-} +- +-sal_uInt32 +-SalPrinterBmp::GetWidth () const +-{ +- return mpBmpBuffer->mnWidth; +-} +- +-sal_uInt32 +-SalPrinterBmp::GetHeight () const +-{ +- return mpBmpBuffer->mnHeight; +-} +- +-sal_uInt32 +-SalPrinterBmp::GetDepth () const +-{ +- sal_uInt32 nDepth; +- +- switch (mpBmpBuffer->mnBitCount) +- { +- case 1: +- nDepth = 1; +- break; +- +- case 4: +- case 8: +- nDepth = 8; +- break; +- +- case 16: +- case 24: +- case 32: +- nDepth = 24; +- break; +- +- default: +- DBG_ERROR ("Error: unsupported bitmap depth in SalPrinterBmp::GetDepth()"); +- break; +- } +- +- return nDepth; +-} +- +-sal_uInt32 +-SalPrinterBmp::ColorOf (BitmapColor& rColor) const +-{ +- if (rColor.IsIndex()) +- return ColorOf (mpBmpBuffer->maPalette[rColor.GetIndex()]); +- else +- return ((rColor.GetBlue()) & 0x000000ff) +- | ((rColor.GetGreen() << 8) & 0x0000ff00) +- | ((rColor.GetRed() << 16) & 0x00ff0000); +-} +- +-sal_uInt8 +-SalPrinterBmp::GrayOf (BitmapColor& rColor) const +-{ +- if (rColor.IsIndex()) +- return GrayOf (mpBmpBuffer->maPalette[rColor.GetIndex()]); +- else +- return ( rColor.GetBlue() * 28UL +- + rColor.GetGreen() * 151UL +- + rColor.GetRed() * 77UL ) >> 8; +-} +- +-sal_uInt32 +-SalPrinterBmp::GetPaletteEntryCount () const +-{ +- return mpBmpBuffer->maPalette.GetEntryCount (); +-} +- +-sal_uInt32 +-SalPrinterBmp::GetPaletteColor (sal_uInt32 nIdx) const +-{ +- return ColorOf (mpBmpBuffer->maPalette[nIdx]); +-} ++// -=-= SalGraphics =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= ++// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + +-sal_uInt32 +-SalPrinterBmp::GetPixelRGB (sal_uInt32 nRow, sal_uInt32 nColumn) const ++extern "C" + { +- Scanline pScan = mpScanAccess + nRow * mnScanOffset; +- BitmapColor aColor = mpFncGetPixel (pScan, nColumn, mpBmpBuffer->maColorMask); +- +- return ColorOf (aColor); ++ static Bool GraphicsExposePredicate( Display* pDisplay, XEvent* pEvent, XPointer pFrameWindow ) ++ { ++ Bool bRet = False; ++ if( (pEvent->type == GraphicsExpose || pEvent->type == NoExpose) && ++ pEvent->xnoexpose.drawable == (Drawable)pFrameWindow ) ++ { ++ bRet = True; ++ } ++ return bRet; ++ } + } + +-sal_uInt8 +-SalPrinterBmp::GetPixelGray (sal_uInt32 nRow, sal_uInt32 nColumn) const +-{ +- Scanline pScan = mpScanAccess + nRow * mnScanOffset; +- BitmapColor aColor = mpFncGetPixel (pScan, nColumn, mpBmpBuffer->maColorMask); +- +- return GrayOf (aColor); +-} + +-sal_uInt8 +-SalPrinterBmp::GetPixelIdx (sal_uInt32 nRow, sal_uInt32 nColumn) const ++void X11SalGraphics::YieldGraphicsExpose( Display* pDisplay, SalFrame* pFrame, Drawable aWindow ) + { +- Scanline pScan = mpScanAccess + nRow * mnScanOffset; +- BitmapColor aColor = mpFncGetPixel (pScan, nColumn, mpBmpBuffer->maColorMask); +- +- if (aColor.IsIndex()) +- return aColor.GetIndex(); +- else +- return 0; +-} +-#endif ++ // get frame if necessary ++ if( ! pFrame ) ++ { ++ const std::list< SalFrame* >& rFrames = GetSalData()->GetDisplay()->getFrames(); ++ for( std::list< SalFrame* >::const_iterator it = rFrames.begin(); it != rFrames.end() && ! pFrame; ++it ) ++ { ++ const SystemEnvData* pEnvData = (*it)->GetSystemData(); ++ if( pEnvData->aWindow == aWindow ) ++ pFrame = *it; ++ } ++ if( ! pFrame ) ++ return; ++ } + +-// -=-= SalGraphics =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +-// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +-void SalGraphics::CopyBits( const SalTwoRect *pPosAry, +- SalGraphics *pSrcGraphics, +- const OutputDevice *pOutDev, const OutputDevice *pSrcOutDev) +-{ +-#ifndef _USE_PRINT_EXTENSION_ +- if (maGraphicsData.m_pPrinterGfx != NULL) +- { +- DBG_ERROR( "Error: PrinterGfx::CopyBits() not implemented" ); +- } +- else +- { +-#endif ++ XEvent aEvent; ++ while( XCheckTypedWindowEvent( pDisplay, aWindow, Expose, &aEvent ) ) ++ { ++ SalPaintEvent aPEvt; ++ aPEvt.mnBoundX = aEvent.xexpose.x; ++ aPEvt.mnBoundY = aEvent.xexpose.y; ++ aPEvt.mnBoundWidth = aEvent.xexpose.width+1; ++ aPEvt.mnBoundHeight = aEvent.xexpose.height+1; ++ pFrame->CallCallback( SALEVENT_PAINT, &aPEvt ); ++ } ++ ++ do ++ { ++ XIfEvent( pDisplay, &aEvent, GraphicsExposePredicate, (XPointer)aWindow ); ++ if( aEvent.type == NoExpose ) ++ break; + +- if( pPosAry->mnSrcWidth <= 0 +- || pPosAry->mnSrcHeight <= 0 +- || pPosAry->mnDestWidth <= 0 +- || pPosAry->mnDestHeight <= 0 ) ++ if( pFrame ) + { +- return; ++ SalPaintEvent aPEvt; ++ aPEvt.mnBoundX = aEvent.xgraphicsexpose.x; ++ aPEvt.mnBoundY = aEvent.xgraphicsexpose.y; ++ aPEvt.mnBoundWidth = aEvent.xgraphicsexpose.width+1; ++ aPEvt.mnBoundHeight = aEvent.xgraphicsexpose.height+1; ++ pFrame->CallCallback( SALEVENT_PAINT, &aPEvt ); + } ++ } while( aEvent.xgraphicsexpose.count != 0 ); ++} + +- int n; +- if( !pSrcGraphics ) ++void X11SalGraphics::copyBits( const SalTwoRect *pPosAry, ++ SalGraphics *pSSrcGraphics ) ++{ ++ X11SalGraphics* pSrcGraphics = pSSrcGraphics ++ ? static_cast<X11SalGraphics*>(pSSrcGraphics) ++ : this; ++ ++ if( pPosAry->mnSrcWidth <= 0 ++ || pPosAry->mnSrcHeight <= 0 ++ || pPosAry->mnDestWidth <= 0 ++ || pPosAry->mnDestHeight <= 0 ) ++ { ++ return; ++ } ++ ++ int n; ++ if( pSrcGraphics == this ) ++ { ++ n = 2; ++ } ++ else if( pSrcGraphics->bWindow_ ) ++ { ++ // window or compatible virtual device ++ if( pSrcGraphics->GetDisplay() == GetDisplay() ) ++ n = 2; // same Display ++ else ++ n = 1; // printer or other display ++ } ++ else if( pSrcGraphics->bVirDev_ ) ++ { ++ // printer compatible virtual device ++ if( bPrinter_ ) ++ n = 2; // printer or compatible virtual device == same display ++ else ++ n = 1; // window or compatible virtual device ++ } ++ else ++ n = 0; ++ ++ if( n == 2 ++ && pPosAry->mnSrcWidth == pPosAry->mnDestWidth ++ && pPosAry->mnSrcHeight == pPosAry->mnDestHeight ) ++ { ++ if( bXORMode_ ++ && !pSrcGraphics->bVirDev_ ++ && (GetDisplay()->GetProperties() & PROPERTY_BUG_XCopyArea_GXxor) ) + { +- pSrcGraphics = this; +- n = 2; ++ Pixmap hPixmap = XCreatePixmap( GetXDisplay(), ++ pSrcGraphics->GetDrawable(), // source ++ pPosAry->mnSrcWidth, pPosAry->mnSrcHeight, ++ pSrcGraphics->GetBitCount() ); ++ XCopyArea( GetXDisplay(), ++ pSrcGraphics->GetDrawable(), // source ++ hPixmap, // destination ++ GetDisplay()->GetCopyGC(), // no clipping ++ pPosAry->mnSrcX, pPosAry->mnSrcY, ++ pPosAry->mnSrcWidth, pPosAry->mnSrcHeight, ++ 0, 0 ); // destination ++ XCopyArea( GetXDisplay(), ++ hPixmap, // source ++ GetDrawable(), // destination ++ GetInvertGC(), // destination clipping ++ 0, 0, // source ++ pPosAry->mnSrcWidth, pPosAry->mnSrcHeight, ++ pPosAry->mnDestX, pPosAry->mnDestY ); ++ XFreePixmap( GetXDisplay(), hPixmap ); + } +- else if( pSrcGraphics->_IsWindow() ) +- // window or compatible virtual device +- if( pSrcGraphics->_GetDisplay() == _GetDisplay() ) +- n = 2; // same Display +- else +- n = 1; // printer or other display +- else if( pSrcGraphics->_IsVirtualDevice() ) +- // printer compatible virtual device +- if( _IsPrinter() ) +- n = 2; // printer or compatible virtual device == same display +- else +- n = 1; // window or compatible virtual device + else +- n = 0; ++ XCopyArea( GetXDisplay(), ++ pSrcGraphics->GetDrawable(), // source ++ GetDrawable(), // destination ++ GetCopyGC(), // destination clipping ++ pPosAry->mnSrcX, pPosAry->mnSrcY, ++ pPosAry->mnSrcWidth, pPosAry->mnSrcHeight, ++ pPosAry->mnDestX, pPosAry->mnDestY ); + +- if( n == 2 +- && pPosAry->mnSrcWidth == pPosAry->mnDestWidth +- && pPosAry->mnSrcHeight == pPosAry->mnDestHeight ) ++ if( bWindow_ && ! bVirDev_ ) + { +- if( _IsXORMode() +- && !pSrcGraphics->_IsVirtualDevice() +- && (_GetDisplay()->GetProperties() & PROPERTY_BUG_XCopyArea_GXxor) ) +- { +- Pixmap hPixmap = XCreatePixmap( _GetXDisplay(), +- pSrcGraphics->_GetDrawable(), // source +- pPosAry->mnSrcWidth, pPosAry->mnSrcHeight, +- pSrcGraphics->GetBitCount() ); +- XCopyArea( _GetXDisplay(), +- pSrcGraphics->_GetDrawable(), // source +- hPixmap, // destination +- _GetDisplay()->GetCopyGC(), // no clipping +- pPosAry->mnSrcX, pPosAry->mnSrcY, +- pPosAry->mnSrcWidth, pPosAry->mnSrcHeight, +- 0, 0 ); // destination +- XCopyArea( _GetXDisplay(), +- hPixmap, // source +- _GetDrawable(), // destination +- maGraphicsData.GetInvertGC(), // destination clipping +- 0, 0, // source +- pPosAry->mnSrcWidth, pPosAry->mnSrcHeight, +- pPosAry->mnDestX, pPosAry->mnDestY ); +- XFreePixmap( _GetXDisplay(), hPixmap ); +- } +- else +- XCopyArea( _GetXDisplay(), +- pSrcGraphics->_GetDrawable(), // source +- _GetDrawable(), // destination +- maGraphicsData.GetCopyGC(), // destination clipping +- pPosAry->mnSrcX, pPosAry->mnSrcY, +- pPosAry->mnSrcWidth, pPosAry->mnSrcHeight, +- pPosAry->mnDestX, pPosAry->mnDestY ); +- +- if( _IsWindow() && ! _IsVirtualDevice() ) +- { +- maGraphicsData.m_pFrame->maFrameData.YieldGraphicsExpose(); +- } ++ YieldGraphicsExpose( GetXDisplay(), m_pFrame, GetDrawable() ); + } +- else if( n ) ++ } ++ else if( n ) ++ { ++ SalBitmap *pDDB = pSrcGraphics->getBitmap( pPosAry->mnSrcX, ++ pPosAry->mnSrcY, ++ pPosAry->mnSrcWidth, ++ pPosAry->mnSrcHeight ); ++ ++ if( !pDDB ) + { +- SalBitmap *pDDB = pSrcGraphics->GetBitmap( pPosAry->mnSrcX, +- pPosAry->mnSrcY, +- pPosAry->mnSrcWidth, +- pPosAry->mnSrcHeight, pSrcOutDev ); +- +- if( !pDDB ) +- { +- stderr0( "SalGraphics::CopyBits !pSrcGraphics->GetBitmap()\n" ); +- return; +- } +- +- SalTwoRect aPosAry( *pPosAry ); +- +- aPosAry.mnSrcX = 0, aPosAry.mnSrcY = 0; +- DrawBitmap( &aPosAry, *pDDB, pOutDev ); +- +- delete pDDB; ++ stderr0( "SalGraphics::CopyBits !pSrcGraphics->GetBitmap()\n" ); ++ return; + } +- else +- stderr0( "SalGraphics::CopyBits from Printer not yet implemented\n" ); +- +-#ifndef _USE_PRINT_EXTENSION_ +- } +-#endif ++ ++ SalTwoRect aPosAry( *pPosAry ); ++ ++ aPosAry.mnSrcX = 0, aPosAry.mnSrcY = 0; ++ drawBitmap( &aPosAry, *pDDB ); ++ ++ delete pDDB; ++ } ++ else ++ stderr0( "X11SalGraphics::CopyBits from Printer not yet implemented\n" ); + } + + // -------------------------------------------------------------------------- + +-void SalGraphics::CopyArea ( long nDestX, long nDestY, ++void X11SalGraphics::copyArea ( long nDestX, long nDestY, + long nSrcX, long nSrcY, + long nSrcWidth, long nSrcHeight, +- USHORT nFlags, const OutputDevice *pOutDev ) ++ USHORT nFlags ) + { +-#ifndef _USE_PRINT_EXTENSION_ +- if (maGraphicsData.m_pPrinterGfx != NULL) +- { +- DBG_ERROR( "Error: PrinterGfx::CopyArea() not implemented" ); +- } +- else +- { +-#endif +- +- SalTwoRect aPosAry; +- +- aPosAry.mnDestX = nDestX; +- aPosAry.mnDestY = nDestY; +- aPosAry.mnDestWidth = nSrcWidth; +- aPosAry.mnDestHeight = nSrcHeight; +- +- aPosAry.mnSrcX = nSrcX; +- aPosAry.mnSrcY = nSrcY; +- aPosAry.mnSrcWidth = nSrcWidth; +- aPosAry.mnSrcHeight = nSrcHeight; +- +- SalGraphics::CopyBits ( &aPosAry, 0, pOutDev, pOutDev ); +- +-#ifndef _USE_PRINT_EXTENSION_ +- } +-#endif +-} +- +-// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +-void SalGraphics::DrawBitmap( const SalTwoRect* pPosAry, const SalBitmap& rSalBitmap, const OutputDevice* ) +-{ +-#ifndef _USE_PRINT_EXTENSION_ +- if (maGraphicsData.m_pPrinterGfx != NULL) +- { +- Rectangle aSrc (Point(pPosAry->mnSrcX, pPosAry->mnSrcY), +- Size(pPosAry->mnSrcWidth, pPosAry->mnSrcHeight)); +- Rectangle aDst (Point(pPosAry->mnDestX, pPosAry->mnDestY), +- Size(pPosAry->mnDestWidth, pPosAry->mnDestHeight)); +- +- BitmapBuffer* pBuffer= const_cast<SalBitmap&>(rSalBitmap).AcquireBuffer(sal_True); +- +- SalPrinterBmp aBmp (pBuffer); +- maGraphicsData.m_pPrinterGfx->DrawBitmap (aDst, aSrc, aBmp); +- +- const_cast<SalBitmap&>(rSalBitmap).ReleaseBuffer (pBuffer, sal_True); +- } +- else +- { +-#endif +- +- SalDisplay* pSalDisp = maGraphicsData.GetDisplay(); +- Display* pXDisp = pSalDisp->GetDisplay(); +- const Drawable aDrawable( maGraphicsData.GetDrawable() ); ++ SalTwoRect aPosAry; ++ ++ aPosAry.mnDestX = nDestX; ++ aPosAry.mnDestY = nDestY; ++ aPosAry.mnDestWidth = nSrcWidth; ++ aPosAry.mnDestHeight = nSrcHeight; ++ ++ aPosAry.mnSrcX = nSrcX; ++ aPosAry.mnSrcY = nSrcY; ++ aPosAry.mnSrcWidth = nSrcWidth; ++ aPosAry.mnSrcHeight = nSrcHeight; ++ ++ copyBits ( &aPosAry, 0 ); ++} ++ ++// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= ++void X11SalGraphics::drawBitmap( const SalTwoRect* pPosAry, const SalBitmap& rSalBitmap ) ++{ ++ SalDisplay* pSalDisp = GetDisplay(); ++ Display* pXDisp = pSalDisp->GetDisplay(); ++ const Drawable aDrawable( GetDrawable() ); ++ const SalColormap& rColMap = pSalDisp->GetColormap(); ++ const long nDepth = GetDisplay()->GetVisual()->GetDepth(); ++ GC aGC( GetCopyGC() ); ++ XGCValues aOldVal, aNewVal; ++ int nValues = GCForeground | GCBackground; ++ ++ if( rSalBitmap.GetBitCount() == 1 ) ++ { ++ // set foreground/background values for 1Bit bitmaps ++ XGetGCValues( pXDisp, aGC, nValues, &aOldVal ); ++ aNewVal.foreground = rColMap.GetWhitePixel(), aNewVal.background = rColMap.GetBlackPixel(); ++ XChangeGC( pXDisp, aGC, nValues, &aNewVal ); ++ } ++ ++ static_cast<const X11SalBitmap&>(rSalBitmap).ImplDraw( aDrawable, nDepth, *pPosAry, aGC, bWindow_ ); ++ ++ if( rSalBitmap.GetBitCount() == 1 ) ++ XChangeGC( pXDisp, aGC, nValues, &aOldVal ); ++ XFlush( pXDisp ); ++} ++ ++// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= ++ ++void X11SalGraphics::drawBitmap( const SalTwoRect* pPosAry, ++ const SalBitmap& rSalBitmap, ++ const SalBitmap& rTransBitmap ) ++{ ++ DBG_ASSERT( !bPrinter_, "Drawing of transparent bitmaps on printer devices is strictly forbidden" ); ++ ++ SalDisplay* pSalDisp = GetDisplay(); ++ Display* pXDisp = pSalDisp->GetDisplay(); ++ Drawable aDrawable( GetDrawable() ); ++ const USHORT nDepth = pSalDisp->GetVisual()->GetDepth(); ++ Pixmap aFG( XCreatePixmap( pXDisp, aDrawable, pPosAry->mnDestWidth, ++ pPosAry->mnDestHeight, nDepth ) ); ++ Pixmap aBG( XCreatePixmap( pXDisp, aDrawable, pPosAry->mnDestWidth, ++ pPosAry->mnDestHeight, nDepth ) ); ++ ++ if( aFG && aBG ) ++ { ++ GC aTmpGC; ++ XGCValues aValues; + const SalColormap& rColMap = pSalDisp->GetColormap(); +- const long nDepth = maGraphicsData.GetDisplay()->GetVisual()->GetDepth(); +- GC aGC( maGraphicsData.GetCopyGC() ); +- XGCValues aOldVal, aNewVal; +- int nValues = GCForeground | GCBackground; +- +- if( rSalBitmap.GetBitCount() == 1 ) +- { +- // set foreground/background values for 1Bit bitmaps +- XGetGCValues( pXDisp, aGC, nValues, &aOldVal ); +- aNewVal.foreground = rColMap.GetWhitePixel(), aNewVal.background = rColMap.GetBlackPixel(); +- XChangeGC( pXDisp, aGC, nValues, &aNewVal ); +- } +- +-#if defined(_USE_PRINT_EXTENSION_) +- rSalBitmap.ImplDraw( pSalDisp, aDrawable, nDepth, *pPosAry, aGC ); +-#else +- rSalBitmap.ImplDraw( aDrawable, nDepth, *pPosAry, aGC ); +-#endif +- +- if( rSalBitmap.GetBitCount() == 1 ) +- XChangeGC( pXDisp, aGC, nValues, &aOldVal ); +- XFlush( pXDisp ); +- +-#ifndef _USE_PRINT_EXTENSION_ +- } +-#endif +-} +- +-// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +- +-void SalGraphics::DrawBitmap( const SalTwoRect* pPosAry, const SalBitmap& rSalBitmap, +- const SalBitmap& rTransBitmap, const OutputDevice *pOutDev ) +-{ +-#ifndef _USE_PRINT_EXTENSION_ +- if (maGraphicsData.m_pPrinterGfx != NULL) +- { +- DBG_ERROR("Error: no PrinterGfx::DrawBitmap() for transparent bitmap"); +- } +- else +- { +-#endif +- +- DBG_ASSERT( !_IsPrinter(), "Drawing of transparent bitmaps on printer devices is strictly forbidden" ); +- +- SalDisplay* pSalDisp = maGraphicsData.GetDisplay(); +- Display* pXDisp = pSalDisp->GetDisplay(); +- Drawable aDrawable( maGraphicsData.GetDrawable() ); +- const USHORT nDepth = pSalDisp->GetVisual()->GetDepth(); +- Pixmap aFG( XCreatePixmap( pXDisp, aDrawable, pPosAry->mnDestWidth, +- pPosAry->mnDestHeight, nDepth ) ); +- Pixmap aBG( XCreatePixmap( pXDisp, aDrawable, pPosAry->mnDestWidth, +- pPosAry->mnDestHeight, nDepth ) ); +- +- if( aFG && aBG ) ++ const int nBlack = rColMap.GetBlackPixel(), nWhite = rColMap.GetWhitePixel(); ++ const int nValues = GCFunction | GCForeground | GCBackground; ++ SalTwoRect aTmpRect( *pPosAry ); aTmpRect.mnDestX = aTmpRect.mnDestY = 0; ++ ++ // draw paint bitmap in pixmap #1 ++ aValues.function = GXcopy, aValues.foreground = nWhite, aValues.background = nBlack; ++ aTmpGC = XCreateGC( pXDisp, aFG, nValues, &aValues ); ++ static_cast<const X11SalBitmap&>(rSalBitmap).ImplDraw( aFG, nDepth, aTmpRect, aTmpGC, false ); ++ DBG_TESTTRANS( aFG ); ++ ++ // draw background in pixmap #2 ++ XCopyArea( pXDisp, aDrawable, aBG, aTmpGC, ++ pPosAry->mnDestX, pPosAry->mnDestY, ++ pPosAry->mnDestWidth, pPosAry->mnDestHeight, ++ 0, 0 ); ++ ++ DBG_TESTTRANS( aBG ); ++ ++ // mask out paint bitmap in pixmap #1 (transparent areas 0) ++ aValues.function = GXand, aValues.foreground = 0x00000000, aValues.background = 0xffffffff; ++ XChangeGC( pXDisp, aTmpGC, nValues, &aValues ); ++ static_cast<const X11SalBitmap&>(rTransBitmap).ImplDraw( aFG, 1, aTmpRect, aTmpGC, false ); ++ ++ DBG_TESTTRANS( aFG ); ++ ++ // #105055# For XOR mode, keep background behind bitmap intact ++ if( !bXORMode_ ) + { +- GC aTmpGC; +- XGCValues aValues; +- const SalColormap& rColMap = pSalDisp->GetColormap(); +- const int nBlack = rColMap.GetBlackPixel(), nWhite = rColMap.GetWhitePixel(); +- const int nValues = GCFunction | GCForeground | GCBackground; +- SalTwoRect aTmpRect( *pPosAry ); aTmpRect.mnDestX = aTmpRect.mnDestY = 0; +- +- // draw paint bitmap in pixmap #1 +- aValues.function = GXcopy, aValues.foreground = nWhite, aValues.background = nBlack; +- aTmpGC = XCreateGC( pXDisp, aFG, nValues, &aValues ); +-#ifdef _USE_PRINT_EXTENSION_ +- rSalBitmap.ImplDraw( pSalDisp, aFG, nDepth, aTmpRect, aTmpGC ); +-#else +- rSalBitmap.ImplDraw( aFG, nDepth, aTmpRect, aTmpGC ); +-#endif +- DBG_TESTTRANS( aFG ); +- +- // draw background in pixmap #2 +- XCopyArea( pXDisp, aDrawable, aBG, aTmpGC, +- pPosAry->mnDestX, pPosAry->mnDestY, +- pPosAry->mnDestWidth, pPosAry->mnDestHeight, +- 0, 0 ); +- DBG_TESTTRANS( aBG ); +- +- // mask out paint bitmap in pixmap #1 (transparent areas 0) +- aValues.function = GXand, aValues.foreground = 0x00000000, aValues.background = 0xffffffff; ++ // mask out background in pixmap #2 (nontransparent areas 0) ++ aValues.function = GXand, aValues.foreground = 0xffffffff, aValues.background = 0x00000000; + XChangeGC( pXDisp, aTmpGC, nValues, &aValues ); +-#ifdef _USE_PRINT_EXTENSION_ +- rTransBitmap.ImplDraw( pSalDisp, aFG, 1, aTmpRect, aTmpGC ); +-#else +- rTransBitmap.ImplDraw( aFG, 1, aTmpRect, aTmpGC ); +-#endif +- +- DBG_TESTTRANS( aFG ); +- +- // #105055# For XOR mode, keep background behind bitmap intact +- if( !maGraphicsData.bXORMode_ ) +- { +- // mask out background in pixmap #2 (nontransparent areas 0) +- aValues.function = GXand, aValues.foreground = 0xffffffff, aValues.background = 0x00000000; +- XChangeGC( pXDisp, aTmpGC, nValues, &aValues ); +-#ifdef _USE_PRINT_EXTENSION_ +- rTransBitmap.ImplDraw( pSalDisp, aBG, 1, aTmpRect, aTmpGC ); +-#else +- rTransBitmap.ImplDraw( aBG, 1, aTmpRect, aTmpGC ); +-#endif +- +- DBG_TESTTRANS( aBG ); +- } +- +- // merge pixmap #1 and pixmap #2 in pixmap #2 +- aValues.function = GXxor, aValues.foreground = 0xffffffff, aValues.background = 0x00000000; +- XChangeGC( pXDisp, aTmpGC, nValues, &aValues ); +- XCopyArea( pXDisp, aFG, aBG, aTmpGC, +- 0, 0, +- pPosAry->mnDestWidth, pPosAry->mnDestHeight, +- 0, 0 ); +- DBG_TESTTRANS( aBG ); +- +- // #105055# Disable XOR temporarily +- BOOL bOldXORMode( maGraphicsData.bXORMode_ ); +- maGraphicsData.bXORMode_ = FALSE; +- +- // copy pixmap #2 (result) to background +- XCopyArea( pXDisp, aBG, aDrawable, maGraphicsData.GetCopyGC(), +- 0, 0, +- pPosAry->mnDestWidth, pPosAry->mnDestHeight, +- pPosAry->mnDestX, pPosAry->mnDestY ); ++ static_cast<const X11SalBitmap&>(rTransBitmap).ImplDraw( aBG, 1, aTmpRect, aTmpGC, false ); ++ + DBG_TESTTRANS( aBG ); +- +- maGraphicsData.bXORMode_ = bOldXORMode; +- +- XFreeGC( pXDisp, aTmpGC ); +- XFlush( pXDisp ); + } +- else +- DrawBitmap( pPosAry, rSalBitmap, pOutDev ); +- +- if( aFG ) +- XFreePixmap( pXDisp, aFG ); +- +- if( aBG ) +- XFreePixmap( pXDisp, aBG ); +- +-#ifndef _USE_PRINT_EXTENSION_ +- } +-#endif ++ ++ // merge pixmap #1 and pixmap #2 in pixmap #2 ++ aValues.function = GXxor, aValues.foreground = 0xffffffff, aValues.background = 0x00000000; ++ XChangeGC( pXDisp, aTmpGC, nValues, &aValues ); ++ XCopyArea( pXDisp, aFG, aBG, aTmpGC, ++ 0, 0, ++ pPosAry->mnDestWidth, pPosAry->mnDestHeight, ++ 0, 0 ); ++ DBG_TESTTRANS( aBG ); ++ ++ // #105055# Disable XOR temporarily ++ BOOL bOldXORMode( bXORMode_ ); ++ bXORMode_ = FALSE; ++ ++ // copy pixmap #2 (result) to background ++ XCopyArea( pXDisp, aBG, aDrawable, GetCopyGC(), ++ 0, 0, ++ pPosAry->mnDestWidth, pPosAry->mnDestHeight, ++ pPosAry->mnDestX, pPosAry->mnDestY ); ++ YieldGraphicsExpose( pXDisp, bWindow_ ? m_pFrame : NULL, aDrawable ); ++ ++ DBG_TESTTRANS( aBG ); ++ ++ bXORMode_ = bOldXORMode; ++ ++ XFreeGC( pXDisp, aTmpGC ); ++ XFlush( pXDisp ); ++ } ++ else ++ drawBitmap( pPosAry, rSalBitmap ); ++ ++ if( aFG ) ++ XFreePixmap( pXDisp, aFG ); ++ ++ if( aBG ) ++ XFreePixmap( pXDisp, aBG ); + } + + // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +-void SalGraphics::DrawBitmap( const SalTwoRect* pPosAry, const SalBitmap& rSalBitmap, +- SalColor nTransparentColor, const OutputDevice* ) +-{ +-#ifndef _USE_PRINT_EXTENSION_ +- if (maGraphicsData.m_pPrinterGfx != NULL) +- { +- DBG_ERROR("Error: no PrinterGfx::DrawBitmap() for transparent color"); +- } +- else +- { +-#endif +- +- DBG_ERROR( "::DrawBitmap with transparent color not supported" ); +- +-#ifndef _USE_PRINT_EXTENSION_ +- } +-#endif ++void X11SalGraphics::drawBitmap( const SalTwoRect* pPosAry, ++ const SalBitmap& rSalBitmap, ++ SalColor nTransparentColor ) ++{ ++ DBG_ERROR( "::DrawBitmap with transparent color not supported" ); + } + + // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +-void SalGraphics::DrawMask( const SalTwoRect* pPosAry, const SalBitmap &rSalBitmap, +- SalColor nMaskColor, const OutputDevice *pOutDev ) +-{ +-#ifndef _USE_PRINT_EXTENSION_ +- if (maGraphicsData.m_pPrinterGfx != NULL) +- { +- DBG_ERROR("Error: PrinterGfx::DrawMask() not implemented"); +- } +- else +- { +-#endif +- +- SalDisplay* pSalDisp = maGraphicsData.GetDisplay(); +- Display* pXDisp = pSalDisp->GetDisplay(); +- Drawable aDrawable( maGraphicsData.GetDrawable() ); +- Pixmap aStipple( XCreatePixmap( pXDisp, aDrawable, +- pPosAry->mnDestWidth, +- pPosAry->mnDestHeight, 1 ) ); +- +- if( aStipple ) +- { +- SalTwoRect aTwoRect( *pPosAry ); aTwoRect.mnDestX = aTwoRect.mnDestY = 0; +- GC aTmpGC; +- XGCValues aValues; +- +- // create a stipple bitmap first (set bits are changed to unset bits and vice versa) +- aValues.function = GXcopyInverted; +- aValues.foreground = 1, aValues.background = 0; +- aTmpGC = XCreateGC( pXDisp, aStipple, GCFunction | GCForeground | GCBackground, &aValues ); +-#ifdef _USE_PRINT_EXTENSION_ +- rSalBitmap.ImplDraw( pSalDisp, aStipple, 1, aTwoRect, aTmpGC ); +-#else +- rSalBitmap.ImplDraw( aStipple, 1, aTwoRect, aTmpGC ); +-#endif +- +- XFreeGC( pXDisp, aTmpGC ); +- +- // Set stipple and draw rectangle +- GC aStippleGC( maGraphicsData.GetStippleGC() ); +- int nX = pPosAry->mnDestX, nY = pPosAry->mnDestY; +- +- XSetStipple( pXDisp, aStippleGC, aStipple ); +- XSetTSOrigin( pXDisp, aStippleGC, nX, nY ); +- XSetForeground( pXDisp, aStippleGC, _GetPixel( nMaskColor ) ); +- XFillRectangle( pXDisp, aDrawable, aStippleGC, +- nX, nY, +- pPosAry->mnDestWidth, pPosAry->mnDestHeight ); +- XFreePixmap( pXDisp, aStipple ); +- XFlush( pXDisp ); +- } +- else +- DrawBitmap( pPosAry, rSalBitmap, pOutDev ); +- +-#ifndef _USE_PRINT_EXTENSION_ +- } +-#endif ++void X11SalGraphics::drawMask( const SalTwoRect* pPosAry, ++ const SalBitmap &rSalBitmap, ++ SalColor nMaskColor ) ++{ ++ SalDisplay* pSalDisp = GetDisplay(); ++ Display* pXDisp = pSalDisp->GetDisplay(); ++ Drawable aDrawable( GetDrawable() ); ++ Pixmap aStipple( XCreatePixmap( pXDisp, aDrawable, ++ pPosAry->mnDestWidth, ++ pPosAry->mnDestHeight, 1 ) ); ++ ++ if( aStipple ) ++ { ++ SalTwoRect aTwoRect( *pPosAry ); aTwoRect.mnDestX = aTwoRect.mnDestY = 0; ++ GC aTmpGC; ++ XGCValues aValues; ++ ++ // create a stipple bitmap first (set bits are changed to unset bits and vice versa) ++ aValues.function = GXcopyInverted; ++ aValues.foreground = 1, aValues.background = 0; ++ aTmpGC = XCreateGC( pXDisp, aStipple, GCFunction | GCForeground | GCBackground, &aValues ); ++ static_cast<const X11SalBitmap&>(rSalBitmap).ImplDraw( aStipple, 1, aTwoRect, aTmpGC, false ); ++ ++ XFreeGC( pXDisp, aTmpGC ); ++ ++ // Set stipple and draw rectangle ++ GC aStippleGC( GetStippleGC() ); ++ int nX = pPosAry->mnDestX, nY = pPosAry->mnDestY; ++ ++ XSetStipple( pXDisp, aStippleGC, aStipple ); ++ XSetTSOrigin( pXDisp, aStippleGC, nX, nY ); ++ XSetForeground( pXDisp, aStippleGC, GetPixel( nMaskColor ) ); ++ XFillRectangle( pXDisp, aDrawable, aStippleGC, ++ nX, nY, ++ pPosAry->mnDestWidth, pPosAry->mnDestHeight ); ++ XFreePixmap( pXDisp, aStipple ); ++ XFlush( pXDisp ); ++ } ++ else ++ drawBitmap( pPosAry, rSalBitmap ); + } + + // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +-SalBitmap *SalGraphics::GetBitmap( long nX, long nY, long nDX, long nDY, const OutputDevice* ) ++SalBitmap *X11SalGraphics::getBitmap( long nX, long nY, long nDX, long nDY ) + { +-#ifndef _USE_PRINT_EXTENSION_ +- if (maGraphicsData.m_pPrinterGfx != NULL) +- { +- DBG_WARNING ("Warning: PrinterGfx::GetBitmap() not implemented"); +- return NULL; +- } +- else +- { +-#endif +- +- if( _IsPrinter() && !_IsVirtualDevice() ) ++ if( bPrinter_ && !bVirDev_ ) ++ return NULL; ++ ++ if( bWindow_ && !bVirDev_ ) ++ { ++ // normalize ++ if( nDX < 0 ) ++ { ++ nX += nDX; ++ nDX = -nDX; ++ } ++ if ( nDY < 0 ) ++ { ++ nY += nDY; ++ nDY = -nDY; ++ } ++ ++ XWindowAttributes aAttrib; ++ ++ XGetWindowAttributes( GetXDisplay(), GetDrawable(), &aAttrib ); ++ if( aAttrib.map_state != IsViewable ) ++ { ++ stderr0( "X11SalGraphics::GetBitmap drawable not viewable\n" ); + return NULL; +- +- if( _IsWindow() && !_IsVirtualDevice() ) ++ } ++ ++ // am Window clippen (eg) ++ if ( nX < 0 ) + { +- // normalize +- if( nDX < 0 ) +- { +- nX += nDX; +- nDX = -nDX; +- } +- if ( nDY < 0 ) +- { +- nY += nDY; +- nDY = -nDY; +- } +- +- XWindowAttributes aAttrib; +- +- XGetWindowAttributes( _GetXDisplay(), _GetDrawable(), &aAttrib ); +- if( aAttrib.map_state != IsViewable ) +- { +- stderr0( "SalGraphics::GetBitmap drawable not viewable\n" ); +- return NULL; +- } +- +- // am Window clippen (eg) +- if ( nX < 0 ) +- { +- nDX += nX; +- nX = 0; +- } +- if ( nY < 0 ) +- { +- nDY += nY; +- nY = 0; +- } +- if( nX + nDX > aAttrib.width ) +- nDX = aAttrib.width - nX; +- if( nY + nDY > aAttrib.height ) +- nDY = aAttrib.height - nY; +- +- // nun alles ok ? +- if( nDX <= 0 || nDY <= 0 ) +- { +- stderr0( "SalGraphics::GetBitmap zero sized bitmap after clipping\n" ); +- return NULL; +- } ++ nDX += nX; ++ nX = 0; + } +- +- SalBitmap* pSalBitmap = new SalBitmap; +- USHORT nBitCount = GetBitCount(); +- +- if( &_GetDisplay()->GetColormap() != &_GetColormap() ) +- nBitCount = 1; +- +- pSalBitmap->ImplCreateLocalFromDrawable( _GetDrawable(), nBitCount, nX, nY, nDX, nDY ); +- return pSalBitmap; +- +-#ifndef _USE_PRINT_EXTENSION_ +- } +-#endif +-} +- +-// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +-SalColor SalGraphics::GetPixel( long nX, long nY, const OutputDevice* ) +-{ +-#ifndef _USE_PRINT_EXTENSION_ +- if (maGraphicsData.m_pPrinterGfx != NULL) +- { +- DBG_ERROR ("Warning: PrinterGfx::GetPixel() not implemented"); +- return 0; +- } +- else +- { +-#endif +- +- if( _IsWindow() && !_IsVirtualDevice() ) ++ if ( nY < 0 ) + { +- XWindowAttributes aAttrib; +- +- XGetWindowAttributes( _GetXDisplay(), _GetDrawable(), &aAttrib ); +- if( aAttrib.map_state != IsViewable ) +- { +- stderr0( "SalGraphics::GetPixel drawable not viewable\n" ); +- return 0; +- } ++ nDY += nY; ++ nY = 0; ++ } ++ if( nX + nDX > aAttrib.width ) ++ nDX = aAttrib.width - nX; ++ if( nY + nDY > aAttrib.height ) ++ nDY = aAttrib.height - nY; ++ ++ // nun alles ok ? ++ if( nDX <= 0 || nDY <= 0 ) ++ { ++ stderr0( "X11SalGraphics::GetBitmap zero sized bitmap after clipping\n" ); ++ return NULL; + } ++ } ++ ++ X11SalBitmap* pSalBitmap = new X11SalBitmap; ++ USHORT nBitCount = GetBitCount(); ++ ++ if( &GetDisplay()->GetColormap() != &GetColormap() ) ++ nBitCount = 1; ++ ++ ++ pSalBitmap->ImplCreateFromDrawable( GetDrawable(), nBitCount, nX, nY, nDX, nDY ); ++ return pSalBitmap; ++} + +- XImage *pXImage = XGetImage( _GetXDisplay(), +- _GetDrawable(), +- nX, nY, +- 1, 1, +- AllPlanes, +- ZPixmap ); +- if( !pXImage ) ++// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= ++SalColor X11SalGraphics::getPixel( long nX, long nY ) ++{ ++ if( bWindow_ && !bVirDev_ ) ++ { ++ XWindowAttributes aAttrib; ++ ++ XGetWindowAttributes( GetXDisplay(), GetDrawable(), &aAttrib ); ++ if( aAttrib.map_state != IsViewable ) + { +- stderr0( "SalGraphics::GetPixel !XGetImage()\n" ); ++ stderr0( "X11SalGraphics::GetPixel drawable not viewable\n" ); + return 0; + } +- +- XColor aXColor; +- +- aXColor.pixel = XGetPixel( pXImage, 0, 0 ); +- XDestroyImage( pXImage ); +- +- return _GetColormap().GetColor( aXColor.pixel ); +- +-#ifndef _USE_PRINT_EXTENSION_ +- } +-#endif ++ } ++ ++ XImage *pXImage = XGetImage( GetXDisplay(), ++ GetDrawable(), ++ nX, nY, ++ 1, 1, ++ AllPlanes, ++ ZPixmap ); ++ if( !pXImage ) ++ { ++ stderr0( "X11SalGraphics::GetPixel !XGetImage()\n" ); ++ return 0; ++ } ++ ++ XColor aXColor; ++ ++ aXColor.pixel = XGetPixel( pXImage, 0, 0 ); ++ XDestroyImage( pXImage ); ++ ++ return GetColormap().GetColor( aXColor.pixel ); + } + + // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +-void SalGraphics::Invert( long nX, ++void X11SalGraphics::invert( long nX, + long nY, + long nDX, + long nDY, +- SalInvert nFlags, const OutputDevice* ) ++ SalInvert nFlags ) + { +-#ifndef _USE_PRINT_EXTENSION_ +- if (maGraphicsData.m_pPrinterGfx != NULL) +- { +- DBG_ERROR ("Warning: PrinterGfx::Invert() not implemented"); +- } +- else +- { +-#endif +- +- SalDisplay *pDisp = _GetDisplay(); +- +- GC pGC; +- if( SAL_INVERT_50 & nFlags ) ++ SalDisplay *pDisp = GetDisplay(); ++ ++ GC pGC; ++ if( SAL_INVERT_50 & nFlags ) ++ { ++ pGC = GetInvert50GC(); ++ XFillRectangle( GetXDisplay(), GetDrawable(), pGC, nX, nY, nDX, nDY ); ++ } ++ else ++ { ++ if ( SAL_INVERT_TRACKFRAME & nFlags ) + { +- pGC = maGraphicsData.GetInvert50GC(); +- XFillRectangle( _GetXDisplay(), _GetDrawable(), pGC, nX, nY, nDX, nDY ); ++ pGC = GetTrackingGC(); ++ XDrawRectangle( GetXDisplay(), GetDrawable(), pGC, nX, nY, nDX, nDY ); + } + else +- if ( SAL_INVERT_TRACKFRAME & nFlags ) +- { +- pGC = maGraphicsData.GetTrackingGC(); +- XDrawRectangle( _GetXDisplay(), _GetDrawable(), pGC, nX, nY, nDX, nDY ); +- } +- else +- { +- pGC = maGraphicsData.GetInvertGC(); +- XFillRectangle( _GetXDisplay(), _GetDrawable(), pGC, nX, nY, nDX, nDY ); +- } +- +-#ifndef _USE_PRINT_EXTENSION_ +- } +-#endif ++ { ++ pGC = GetInvertGC(); ++ XFillRectangle( GetXDisplay(), GetDrawable(), pGC, nX, nY, nDX, nDY ); ++ } ++ } + } + +Index: vcl/unx/source/gdi/salgdi3.cxx +=================================================================== +RCS file: /cvs/gsl/vcl/unx/source/gdi/salgdi3.cxx,v +retrieving revision 1.105.46.5 +retrieving revision 1.119 +diff -u -p -u -r1.105.46.5 -r1.119 +--- vcl/unx/source/gdi/salgdi3.cxx 13 Feb 2004 14:03:54 -0000 1.105.46.5 ++++ vcl/unx/source/gdi/salgdi3.cxx 17 Jun 2004 12:29:09 -0000 1.119 +@@ -59,10 +59,6 @@ + * + ************************************************************************/ + +-#define _SV_SALGDI3_CXX +- +-// -=-= #includes =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +- + #include <string.h> + #include <stdio.h> + #include <stdlib.h> +@@ -76,9 +72,7 @@ + #include <alloca.h> + #endif + +-#ifdef USE_BUILTIN_RASTERIZER + #include <gcach_xpeer.hxx> +-#endif // USE_BUILTIN_RASTERIZER + + #ifndef _SAL_TYPES_H_ + #include <sal/types.h> +@@ -92,14 +86,17 @@ + #ifndef _SV_SALDISP_HXX + #include <saldisp.hxx> + #endif +-#ifndef _SV_SALGDI_HXX +-#include <salgdi.hxx> ++#ifndef _SV_SALGDI_H ++#include <salgdi.h> ++#endif ++#ifndef _VCL_PSPGRAPHICS_H ++#include <pspgraphics.h> + #endif + #ifndef _SV_SALFRAME_HXX + #include <salframe.hxx> + #endif +-#ifndef _SV_SALVD_HXX +-#include <salvd.hxx> ++#ifndef _SV_SALVD_H ++#include <salvd.h> + #endif + #ifndef _SV_OUTDEV_H + #include <outdev.h> +@@ -107,8 +104,8 @@ + #ifndef _STRING_HXX + #include <tools/string.hxx> + #endif +-#ifndef _SV_POLY_HXX +-#include <poly.hxx> ++#ifndef _TL_POLY_HXX ++#include <tools/poly.hxx> + #endif + #ifndef _RTL_TENCINFO_H + #include <rtl/tencinfo.h> +@@ -132,9 +129,6 @@ + #include <svapp.hxx> + #endif + +-#ifndef ANSI1252_HXX_ +-#include "ansi1252.hxx" +-#endif + #ifndef XLFD_ATTRIBUTE_HXX + #include "xlfd_attr.hxx" + #endif +@@ -155,106 +149,12 @@ + + // ----------------------------------------------------------------------- + +-#ifdef USE_BUILTIN_RASTERIZER + static X11GlyphPeer aX11GlyphPeer; +-#endif // USE_BUILTIN_RASTERIZER + + using namespace rtl; + + // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + +-/* +- * returns: +- * true: cut out positions rStart to rStop from output because fax number was swallowed +- * false: do nothing +- */ +- +-String SalGraphicsData::FaxPhoneComment( const String& rOrig, xub_StrLen nIndex, xub_StrLen& rLen, xub_StrLen& rCutStart, xub_StrLen& rCutStop ) const +-{ +- rCutStop = rCutStart = STRING_NOTFOUND; +- +-#ifdef _USE_PRINT_EXTENSION_ +- return String( rOrig ); +-#else +- if( ! m_pPhoneNr ) +- return String( rOrig ); +-#endif +- +-#define FAX_PHONE_TOKEN "@@#" +-#define FAX_PHONE_TOKEN_LENGTH 3 +-#define FAX_END_TOKEN "@@" +-#define FAX_END_TOKEN_LENGTH 2 +- +- bool bRet = false; +- bool bStarted = false; +- bool bStopped = false; +- USHORT nPos; +- USHORT nStart = 0; +- USHORT nStop = rLen; +- String aPhone = rOrig.Copy( nIndex, rLen ); +- +- static String aPhoneNumber; +- static bool bIsCollecting = false; +- +- if( ! bIsCollecting ) +- { +- if( ( nPos = aPhone.SearchAscii( FAX_PHONE_TOKEN ) ) != STRING_NOTFOUND ) +- { +- nStart = nPos; +- bIsCollecting = true; +- aPhoneNumber.Erase(); +- bRet = true; +- bStarted = true; +- } +- } +- if( bIsCollecting ) +- { +- bRet = true; +- nPos = bStarted ? nStart + FAX_PHONE_TOKEN_LENGTH : 0; +- if( ( nPos = aPhone.SearchAscii( FAX_END_TOKEN, nPos ) ) != STRING_NOTFOUND ) +- { +- bIsCollecting = false; +- nStop = nPos + FAX_END_TOKEN_LENGTH; +- bStopped = true; +- } +- int nTokenStart = nStart + (bStarted ? FAX_PHONE_TOKEN_LENGTH : 0); +- int nTokenStop = nStop - (bStopped ? FAX_END_TOKEN_LENGTH : 0); +- aPhoneNumber += aPhone.Copy( nTokenStart, nTokenStop - nTokenStart ); +- if( ! bIsCollecting ) +- { +-#ifndef PRINTER_DUMMY +- *m_pPhoneNr = aPhoneNumber; +-#endif +- aPhoneNumber.Erase(); +- } +- } +- if( aPhoneNumber.Len() > 1024 ) +- { +- bIsCollecting = false; +- aPhoneNumber.Erase(); +- bRet = false; +- } +- +- String aRet; +- if( bRet +-#ifndef MACOSX +- && m_bSwallowFaxNo +-#endif +- ) +- { +- rLen -= nStop - nStart; +- rCutStart = nStart+nIndex; +- rCutStop = nStop+nIndex; +- if( rCutStart ) +- aRet = rOrig.Copy( 0, rCutStart ); +- aRet += rOrig.Copy( rCutStop ); +- } +- else +- aRet = rOrig; +- +- return aRet; +-} +- + // ---------------------------------------------------------------------------- + // + // manage X11 fonts and self rastered fonts +@@ -263,9 +163,6 @@ String SalGraphicsData::FaxPhoneComment( + + #ifndef _USE_PRINT_EXTENSION_ + +-static FontItalic ToFontItalic (psp::italic::type eItalic); +-static FontWeight ToFontWeight (psp::weight::type eWeight); +- + class FontLookup + { + public: +@@ -278,21 +175,20 @@ class FontLookup + + private: + ++ rtl::OString maName; + FontWeight mnWeight; + FontItalic mnItalic; + sal_Bool mbDisplay; + +- rtl::OString maName; +- + public: + + FontLookup ( ::std::list< psp::fontID >::iterator& it, + const psp::PrintFontManager& rMgr ); + FontLookup (const Xlfd& rFont); + FontLookup (const FontLookup &rRef) : ++ maName (rRef.maName), + mnWeight (rRef.mnWeight), + mnItalic (rRef.mnItalic), +- maName (rRef.maName), + mbDisplay(rRef.mbDisplay) + {} + ~FontLookup () +@@ -345,8 +241,8 @@ FontLookup::FontLookup ( ::std::list< ps + psp::FastPrintFontInfo aInfo; + if (rMgr.getFontFastInfo (*it, aInfo)) + { +- mnItalic = ToFontItalic (aInfo.m_eItalic); +- mnWeight = ToFontWeight (aInfo.m_eWeight); ++ mnItalic = PspGraphics::ToFontItalic (aInfo.m_eItalic); ++ mnWeight = PspGraphics::ToFontWeight (aInfo.m_eWeight); + mbDisplay= aInfo.m_eType == psp::fonttype::Builtin + || aInfo.m_eType == psp::fonttype::Unknown ? False : True; + maName = rtl::OUStringToOString +@@ -588,7 +484,7 @@ SalDisplay::GetFont( const ExtendedXlfd + if( pFontCache_->GetCurPos() ) + { + pFontCache_->Remove( pItem ); +- pFontCache_->Insert( pItem, 0UL ); ++ pFontCache_->Insert( pItem, (sal_uInt32)0 ); + } + return pItem; + } +@@ -618,7 +514,7 @@ SalDisplay::GetFont( const ExtendedXlfd + ExtendedFontStruct *pItem = new ExtendedFontStruct( GetDisplay(), + rPixelSize, bVertical, + const_cast<ExtendedXlfd*>(pRequestedFont) ); +- pFontCache_->Insert( pItem, 0UL ); ++ pFontCache_->Insert( pItem, (sal_uInt32)0 ); + pItem->AddRef(); + + return pItem; +@@ -656,12 +552,12 @@ SalDisplay::DestroyFontCache() + + // ---------------------------------------------------------------------------- + // +-// SalGraphicsData ++// X11SalGraphics + // + // ---------------------------------------------------------------------------- + + GC +-SalGraphicsData::SelectFont() ++X11SalGraphics::SelectFont() + { + Display *pDisplay = GetXDisplay(); + +@@ -697,9 +593,8 @@ SalGraphicsData::SelectFont() + + //-------------------------------------------------------------------------- + +-bool SalGraphicsData::SetFont( const ImplFontSelectData *pEntry, int nFallbackLevel ) ++bool X11SalGraphics::setFont( const ImplFontSelectData *pEntry, int nFallbackLevel ) + { +- nFontOrientation_ = pEntry->mnOrientation; + bFontVertical_ = pEntry->mbVertical; + + #ifdef HDU_DEBUG +@@ -740,9 +635,6 @@ bool SalGraphicsData::SetFont( const Imp + return true; + } + +- if( m_pPrinterGfx != NULL ) +- return false; +- + bFontGC_ = FALSE; + ExtendedXlfd *pSysFont = (ExtendedXlfd*)pEntry->mpFontData->mpSysData; + if( !pSysFont ) +@@ -834,8 +726,7 @@ ConvertTextItem16( XTextItem16* pTextIte + + //-------------------------------------------------------------------------- + +-#ifdef USE_BUILTIN_RASTERIZER +-void SalGraphicsData::DrawServerAAFontString( const ServerFontLayout& rLayout ) ++void X11SalGraphics::DrawServerAAFontString( const ServerFontLayout& rLayout ) + { + Display* pDisplay = GetXDisplay(); + Visual* pVisual = GetDisplay()->GetVisual()->GetVisual(); +@@ -843,7 +734,7 @@ void SalGraphicsData::DrawServerAAFontSt + + // create xrender Picture for font foreground + static Pixmap aPixmap; +- static Picture aSrc = NULL; ++ static Picture aSrc = 0; + if( !aSrc ) + { + int iDummy; +@@ -879,7 +770,7 @@ void SalGraphicsData::DrawServerAAFontSt + + Point aPos; + static const int MAXGLYPHS = 160; +- long aGlyphAry[ MAXGLYPHS ]; ++ sal_Int32 aGlyphAry[ MAXGLYPHS ]; + int nMaxGlyphs = rLayout.GetOrientation() ? 1 : MAXGLYPHS; + for( int nStart = 0;;) + { +@@ -900,7 +791,7 @@ void SalGraphicsData::DrawServerAAFontSt + + //-------------------------------------------------------------------------- + +-bool SalGraphicsData::DrawServerAAForcedString( const ServerFontLayout& rLayout ) ++bool X11SalGraphics::DrawServerAAForcedString( const ServerFontLayout& rLayout ) + { + ServerFont& rFont = rLayout.GetServerFont(); + +@@ -908,7 +799,7 @@ bool SalGraphicsData::DrawServerAAForced + int nXmin, nXmax, nYmin, nYmax; + int nStart = 0; + Point aPos; +- long nGlyph; ++ sal_Int32 nGlyph; + for( bool bFirst=true; rLayout.GetNextGlyphs( 1, &nGlyph, aPos, nStart ); ) + { + const RawBitmap* const pRawBitmap = aX11GlyphPeer.GetRawBitmap( rFont, nGlyph ); +@@ -947,7 +838,7 @@ bool SalGraphicsData::DrawServerAAForced + if( m_pFrame ) + nWidth = m_pFrame->maGeometry.nWidth, nHeight = m_pFrame->maGeometry.nHeight; + else if( m_pVDev ) +- nWidth = m_pVDev->maVirDevData.GetWidth(), nHeight = m_pVDev->maVirDevData.GetHeight(); ++ nWidth = m_pVDev->GetWidth(), nHeight = m_pVDev->GetHeight(); + + if( pClipRegion_ && !XEmptyRegion( pClipRegion_ ) ) + { +@@ -1082,7 +973,7 @@ bool SalGraphicsData::DrawServerAAForced + + //-------------------------------------------------------------------------- + +-void SalGraphicsData::DrawServerSimpleFontString( const ServerFontLayout& rSalLayout ) ++void X11SalGraphics::DrawServerSimpleFontString( const ServerFontLayout& rSalLayout ) + { + ServerFont& rFont = rSalLayout.GetServerFont(); + +@@ -1096,7 +987,7 @@ void SalGraphicsData::DrawServerSimpleFo + XCopyGC( pDisplay, nGC, (1<<GCLastBit)-(1+GCFillStyle+GCLineWidth), tmpGC ); + + Point aPos; +- long nGlyph; ++ sal_Int32 nGlyph; + for( int nStart = 0; rSalLayout.GetNextGlyphs( 1, &nGlyph, aPos, nStart ); ) + { + Pixmap aStipple = aX11GlyphPeer.GetPixmap( rFont, nGlyph ); +@@ -1124,186 +1015,27 @@ void SalGraphicsData::DrawServerSimpleFo + + //-------------------------------------------------------------------------- + +-#ifndef _USE_PRINT_EXTENSION_ +- +-class PspFontLayout : public GenericSalLayout +-{ +-public: +- PspFontLayout( ::psp::PrinterGfx& ); +- virtual bool LayoutText( ImplLayoutArgs& ); +- virtual void InitFont() const; +- virtual void DrawText( SalGraphics& ) const; +-private: +- ::psp::PrinterGfx& mrPrinterGfx; +- int mnFontID; +- int mnFontHeight; +- int mnFontWidth; +- bool mbVertical; +-}; +- +-//-------------------------------------------------------------------------- +- +-PspFontLayout::PspFontLayout( ::psp::PrinterGfx& rGfx ) +-: mrPrinterGfx( rGfx ) +-{ +- mnFontID = mrPrinterGfx.GetFontID(); +- mnFontHeight = mrPrinterGfx.GetFontHeight(); +- mnFontWidth = mrPrinterGfx.GetFontWidth(); +- mbVertical = mrPrinterGfx.GetFontVertical(); +-} +- +-//-------------------------------------------------------------------------- +- +-bool PspFontLayout::LayoutText( ImplLayoutArgs& rArgs ) +-{ +- mbVertical = ((rArgs.mnFlags & SAL_LAYOUT_VERTICAL) != 0); +- +- long nUnitsPerPixel = 1; +- int nOldGlyphId = -1; +- long nGlyphWidth = 0; +- int nCharPos = -1; +- Point aNewPos( 0, 0 ); +- GlyphItem aPrevItem; +- rtl_TextEncoding aFontEnc = mrPrinterGfx.GetFontMgr().getFontEncoding( mnFontID ); +- for(;;) +- { +- bool bRightToLeft; +- if( !rArgs.GetNextPos( &nCharPos, &bRightToLeft ) ) +- break; +- +- sal_Unicode cChar = rArgs.mpStr[ nCharPos ]; +- if( bRightToLeft ) +- cChar = GetMirroredChar( cChar ); +- // symbol font aliasing: 0x0020-0x00ff -> 0xf020 -> 0xf0ff +- if( aFontEnc == RTL_TEXTENCODING_SYMBOL ) +- if( cChar < 256 ) +- cChar += 0xf000; +- int nGlyphIndex = cChar; // printer glyphs = unicode +- +- // update fallback_runs if needed +- psp::CharacterMetric aMetric; +- mrPrinterGfx.GetFontMgr().getMetrics( mnFontID, cChar, cChar, &aMetric, mbVertical ); +- if( aMetric.width == -1 && aMetric.height == -1 ) +- rArgs.NeedFallback( nCharPos, bRightToLeft ); +- +- // apply pair kerning to prev glyph if requested +- if( SAL_LAYOUT_KERNING_PAIRS & rArgs.mnFlags ) +- { +- // TODO: get kerning value from printer +- int nKern = 0; //GetGlyphKernValue( nOldGlyphId, nGlyphIndex ); +- nGlyphWidth += nKern; +- aPrevItem.mnNewWidth = nGlyphWidth; +- } +- +- // finish previous glyph +- if( nOldGlyphId >= 0 ) +- AppendGlyph( aPrevItem ); +- nOldGlyphId = nGlyphIndex; +- aNewPos.X() += nGlyphWidth; +- +- // prepare GlyphItem for appending it in next round +- nUnitsPerPixel = mrPrinterGfx.GetCharWidth( cChar, cChar, &nGlyphWidth ); +- int nGlyphFlags = bRightToLeft ? GlyphItem::IS_RTL_GLYPH : 0; +- nGlyphIndex |= GF_ISCHAR; +- aPrevItem = GlyphItem( nCharPos, nGlyphIndex, aNewPos, nGlyphFlags, nGlyphWidth ); +- } +- +- // append last glyph item if any +- if( nOldGlyphId >= 0 ) +- AppendGlyph( aPrevItem ); +- +- SetOrientation( mrPrinterGfx.GetFontAngle() ); +- SetUnitsPerPixel( nUnitsPerPixel ); +- return (nOldGlyphId >= 0); +-} +- +-class PspServerFontLayout : public ServerFontLayout +-{ +-public: +- PspServerFontLayout( ::psp::PrinterGfx&, ServerFont& rFont ); +- +- virtual void InitFont() const; +-private: +- ::psp::PrinterGfx& mrPrinterGfx; +- int mnFontID; +- int mnFontHeight; +- int mnFontWidth; +- bool mbVertical; +-}; +- +-PspServerFontLayout::PspServerFontLayout( ::psp::PrinterGfx& rGfx, ServerFont& rFont ) +- : ServerFontLayout( rFont ), +- mrPrinterGfx( rGfx ) +-{ +- mnFontID = mrPrinterGfx.GetFontID(); +- mnFontHeight = mrPrinterGfx.GetFontHeight(); +- mnFontWidth = mrPrinterGfx.GetFontWidth(); +- mbVertical = mrPrinterGfx.GetFontVertical(); +-} +- +-void PspServerFontLayout::InitFont() const +-{ +- mrPrinterGfx.SetFont( mnFontID, mnFontHeight, mnFontWidth, +- mnOrientation, mbVertical ); +-} +- +-//-------------------------------------------------------------------------- +- +-void DrawPrinterLayout( const SalLayout& rLayout, ::psp::PrinterGfx& rGfx ) +-{ +- const int nMaxGlyphs = 200; +- long aGlyphAry[ nMaxGlyphs ]; +- long aWidthAry[ nMaxGlyphs ]; +- sal_Int32 aIdxAry [ nMaxGlyphs ]; +- sal_Unicode aUnicodes[ nMaxGlyphs ]; +- Point aPos; +- long nUnitsPerPixel = rLayout.GetUnitsPerPixel(); +- for( int nStart = 0;; ) +- { +- int nGlyphCount = rLayout.GetNextGlyphs( nMaxGlyphs, aGlyphAry, aPos, nStart, aWidthAry ); +- if( !nGlyphCount ) +- break; +- +- long nXOffset = 0; +- for( int i = 0; i < nGlyphCount; ++i ) +- { +- nXOffset += aWidthAry[ i ]; +- aIdxAry[ i ] = nXOffset / nUnitsPerPixel; +- long nGlyphIdx = aGlyphAry[i] & (GF_IDXMASK | GF_ROTMASK); +- aUnicodes[i] = (aGlyphAry[i] & GF_ISCHAR) ? nGlyphIdx : 0; +- aGlyphAry[i] = nGlyphIdx; +- } +- +- rGfx.DrawGlyphs( aPos, (unsigned long*)aGlyphAry, aUnicodes, nGlyphCount, aIdxAry ); +- } +-} +- +-//-------------------------------------------------------------------------- +- +-void PspFontLayout::InitFont() const +-{ +- mrPrinterGfx.SetFont( mnFontID, mnFontHeight, mnFontWidth, +- mnOrientation, mbVertical ); +-} +- +-//-------------------------------------------------------------------------- +- +-void PspFontLayout::DrawText( SalGraphics& ) const ++static Point ++RotatedPoint( Point &rOrigin, int nDx, int nAngle ) + { +- DrawPrinterLayout( *this, mrPrinterGfx ); ++ Point aPos( rOrigin.X() + nDx, rOrigin.Y() ); ++ Polygon aPolygon(1); ++ aPolygon.SetPoint( aPos, 0 ); ++ aPolygon.Rotate( rOrigin, nAngle ); ++ return aPolygon.GetPoint( 0 ); + } + +-#endif // _USE_PRINT_EXTENSION_ +- + //-------------------------------------------------------------------------- + +-void SalGraphicsData::DispatchServerFontString( const ServerFontLayout& rLayout ) ++void X11SalGraphics::DrawServerFontLayout( const ServerFontLayout& rLayout ) + { +- if( m_pPrinterGfx != NULL ) +- { +- // print complex text +- DrawPrinterLayout( rLayout, *m_pPrinterGfx ); +- } ++ // draw complex text ++ ServerFont& rFont = rLayout.GetServerFont(); ++ ++ if( aX11GlyphPeer.GetGlyphSet( rFont ) ) ++ DrawServerAAFontString( rLayout ); ++ else if( aX11GlyphPeer.ForcedAntialiasing( rFont ) ) ++ DrawServerAAForcedString( rLayout ); + else + { + // draw complex text +@@ -1326,35 +1058,7 @@ void SalGraphicsData::DispatchServerFont + + //-------------------------------------------------------------------------- + +-void ServerFontLayout::DrawText( SalGraphics& rSalGraphics ) const +-{ +- rSalGraphics.maGraphicsData.DispatchServerFontString( *this ); +-} +- +-//-------------------------------------------------------------------------- +- +-static Point +-RotatedPoint( Point &rOrigin, int nDx, int nAngle ) +-{ +- Point aPos( rOrigin.X() + nDx, rOrigin.Y() ); +- Polygon aPolygon(1); +- aPolygon.SetPoint( aPos, 0 ); +- aPolygon.Rotate( rOrigin, nAngle ); +- return aPolygon.GetPoint( 0 ); +-} +- +-//-------------------------------------------------------------------------- +- +-void SalGraphicsData::DrawServerFontString( const ServerFontLayout& rLayout ) +-{ +- DispatchServerFontString( rLayout ); +-} +- +-#endif // USE_BUILTIN_RASTERIZER +- +-//-------------------------------------------------------------------------- +- +-void SalGraphicsData::DrawStringUCS2MB( ExtendedFontStruct& rFont, ++void X11SalGraphics::DrawStringUCS2MB( ExtendedFontStruct& rFont, + const Point& rPoint, const sal_Unicode* pStr, int nLength ) + { + Display* pDisplay = GetXDisplay(); +@@ -1383,8 +1087,9 @@ void SalGraphicsData::DrawStringUCS2MB( + { + XTextItem16 *pTextItem = (XTextItem16*)alloca( nLength * sizeof(XTextItem16) ); + XChar2b *pMBChar = (XChar2b*)pStr; ++ int nItem = 0; + +- for( int nChar = 0, nItem = 0; nChar < nLength; ++nChar ) ++ for( int nChar = 0; nChar < nLength; ++nChar ) + { + rtl_TextEncoding nEnc; + XFontStruct* pFontStruct = rFont.GetFontStruct( pStr[nChar], &nEnc ); +@@ -1406,15 +1111,13 @@ void SalGraphicsData::DrawStringUCS2MB( + + //-------------------------------------------------------------------------- + +-ULONG SalGraphicsData::GetFontCodeRanges( sal_uInt32* pCodePairs ) const ++ULONG X11SalGraphics::GetFontCodeRanges( sal_uInt32* pCodePairs ) const + + { + ULONG nPairs = 0; +-#ifdef USE_BUILTIN_RASTERIZER + if( mpServerFont[0] ) + nPairs = mpServerFont[0]->GetFontCodeRanges( pCodePairs ); + else +-#endif //USE_BUILTIN_RASTERIZER + if( mXFont[0] ) + nPairs = mXFont[0]->GetFontCodeRanges( pCodePairs ); + return nPairs; +@@ -1449,204 +1152,32 @@ CheckNoNegativeCoordinateWorkaround() + // + // ---------------------------------------------------------------------------- + +-USHORT SalGraphics::SetFont( ImplFontSelectData *pEntry, int nFallbackLevel ) ++USHORT X11SalGraphics::SetFont( ImplFontSelectData *pEntry, int nFallbackLevel ) + { +-#ifndef _USE_PRINT_EXTENSION_ +- if( (maGraphicsData.m_pPrinterGfx != NULL) ) +- { +- sal_Bool bVertical = pEntry->mbVertical; +- sal_Int32 nID = pEntry->mpFontData ? (sal_Int32)pEntry->mpFontData->mpSysData : 0; +- +- // also set the serverside font for layouting +- maGraphicsData.SetFont( pEntry, nFallbackLevel ); +- +- // set the printer and the printer fallback font +- return maGraphicsData.m_pPrinterGfx->SetFont( +- nID, +- pEntry->mnHeight, +- pEntry->mnWidth, +- pEntry->mnOrientation, +- pEntry->mbVertical +- ); +- } +- else +-#endif +- { +- USHORT nRetVal = 0; +- if( !maGraphicsData.SetFont( pEntry, nFallbackLevel ) ) +- nRetVal |= SAL_SETFONT_BADFONT; +- if( _IsPrinter() || (maGraphicsData.mpServerFont[ nFallbackLevel ] != NULL) ) +- nRetVal |= SAL_SETFONT_USEDRAWTEXTARRAY; +- return nRetVal; +- } +-} +- +-// ---------------------------------------------------------------------------- +- +-void SalGraphics::RemovingFont( ImplFontData* pFontData ) +-{ +- // ImplFontData gets removed => notify all caches +- GlyphCache::GetInstance().RemoveFont( pFontData ); ++ USHORT nRetVal = 0; ++ if( !setFont( pEntry, nFallbackLevel ) ) ++ nRetVal |= SAL_SETFONT_BADFONT; ++ if( bPrinter_ || (mpServerFont[ nFallbackLevel ] != NULL) ) ++ nRetVal |= SAL_SETFONT_USEDRAWTEXTARRAY; ++ return nRetVal; + } + + // ---------------------------------------------------------------------------- + + void +-SalGraphics::SetTextColor( SalColor nSalColor ) ++X11SalGraphics::SetTextColor( SalColor nSalColor ) + { +-#ifndef _USE_PRINT_EXTENSION_ +- if (maGraphicsData.m_pPrinterGfx != NULL) +- { +- psp::PrinterColor aColor (SALCOLOR_RED (nSalColor), +- SALCOLOR_GREEN (nSalColor), +- SALCOLOR_BLUE (nSalColor)); +- maGraphicsData.m_pPrinterGfx->SetTextColor (aColor); +- } +- else +- { +-#endif +- +- if( _GetTextColor() != nSalColor ) ++ if( nTextColor_ != nSalColor ) + { +- _GetTextColor() = nSalColor; +- _GetTextPixel() = _GetPixel( nSalColor ); +- _IsFontGC() = FALSE; +- } +- +-#ifndef _USE_PRINT_EXTENSION_ ++ nTextColor_ = nSalColor; ++ nTextPixel_ = GetPixel( nSalColor ); ++ bFontGC_ = FALSE; + } +-#endif + } + + // ---------------------------------------------------------------------------- + +-#ifndef _USE_PRINT_EXTENSION_ +- +-static FontWidth +-ToFontWidth (psp::width::type eWidth) +-{ +- switch (eWidth) +- { +- case psp::width::UltraCondensed: return WIDTH_ULTRA_CONDENSED; +- case psp::width::ExtraCondensed: return WIDTH_EXTRA_CONDENSED; +- case psp::width::Condensed: return WIDTH_CONDENSED; +- case psp::width::SemiCondensed: return WIDTH_SEMI_CONDENSED; +- case psp::width::Normal: return WIDTH_NORMAL; +- case psp::width::SemiExpanded: return WIDTH_SEMI_EXPANDED; +- case psp::width::Expanded: return WIDTH_EXPANDED; +- case psp::width::ExtraExpanded: return WIDTH_EXTRA_EXPANDED; +- case psp::width::UltraExpanded: return WIDTH_ULTRA_EXPANDED; +- } +- return WIDTH_DONTKNOW; +-} +- +-static FontWeight +-ToFontWeight (psp::weight::type eWeight) +-{ +- switch (eWeight) +- { +- case psp::weight::Thin: return WEIGHT_THIN; +- case psp::weight::UltraLight: return WEIGHT_ULTRALIGHT; +- case psp::weight::Light: return WEIGHT_LIGHT; +- case psp::weight::SemiLight: return WEIGHT_SEMILIGHT; +- case psp::weight::Normal: return WEIGHT_NORMAL; +- case psp::weight::Medium: return WEIGHT_MEDIUM; +- case psp::weight::SemiBold: return WEIGHT_SEMIBOLD; +- case psp::weight::Bold: return WEIGHT_BOLD; +- case psp::weight::UltraBold: return WEIGHT_ULTRABOLD; +- case psp::weight::Black: return WEIGHT_BLACK; +- } +- return WEIGHT_DONTKNOW; +-} +- +-static FontPitch +-ToFontPitch (psp::pitch::type ePitch) +-{ +- switch (ePitch) +- { +- case psp::pitch::Fixed: return PITCH_FIXED; +- case psp::pitch::Variable: return PITCH_VARIABLE; +- } +- return PITCH_DONTKNOW; +-} +- +-static FontItalic +-ToFontItalic (psp::italic::type eItalic) +-{ +- switch (eItalic) +- { +- case psp::italic::Upright: return ITALIC_NONE; +- case psp::italic::Oblique: return ITALIC_OBLIQUE; +- case psp::italic::Italic: return ITALIC_NORMAL; +- } +- return ITALIC_DONTKNOW; +-} +- +-static FontFamily +-ToFontFamily (psp::family::type eFamily) +-{ +- switch (eFamily) +- { +- case psp::family::Decorative: return FAMILY_DECORATIVE; +- case psp::family::Modern: return FAMILY_MODERN; +- case psp::family::Roman: return FAMILY_ROMAN; +- case psp::family::Script: return FAMILY_SCRIPT; +- case psp::family::Swiss: return FAMILY_SWISS; +- case psp::family::System: return FAMILY_SYSTEM; +- } +- return FAMILY_DONTKNOW; +-} +- +-static void SetImplFontData( const psp::FastPrintFontInfo& aInfo, ImplFontData& rData ) +-{ +- rData.meFamily = ToFontFamily (aInfo.m_eFamilyStyle); +- rData.meWeight = ToFontWeight (aInfo.m_eWeight); +- +- rData.meItalic = ToFontItalic (aInfo.m_eItalic); +- rData.meWidthType = ToFontWidth (aInfo.m_eWidth); +- rData.mePitch = ToFontPitch (aInfo.m_ePitch); +- rData.meCharSet = aInfo.m_aEncoding; +- rData.maName = aInfo.m_aFamilyName; +- // rData.meScript = SCRIPT_DONTKNOW; +- /*rData.maStyleName = XXX */ +- +- rData.mnWidth = 0; +- rData.mnHeight = 0; +- rData.mbOrientation = TRUE; +- rData.mnQuality = (aInfo.m_eType == psp::fonttype::Builtin ? 1024 : 0); +- rData.mnVerticalOrientation= 0; +- rData.meType = TYPE_SCALABLE; +- rData.mbDevice = (aInfo.m_eType == psp::fonttype::Builtin); +- String aMapNames; +- for( ::std::list< OUString >::const_iterator it = aInfo.m_aAliases.begin(); it != aInfo.m_aAliases.end(); ++it ) +- { +- if( it != aInfo.m_aAliases.begin() ) +- aMapNames.Append(';'); +- aMapNames.Append( String( *it ) ); +- } +- rData.maMapNames = aMapNames; +- switch( aInfo.m_eType ) +- { +- case psp::fonttype::TrueType: +- rData.mbSubsettable = TRUE; +- rData.mbEmbeddable = FALSE; +- break; +- case psp::fonttype::Type1: +- rData.mbSubsettable = FALSE; +- rData.mbEmbeddable = TRUE; +- break; +- default: +- rData.mbSubsettable = FALSE; +- rData.mbEmbeddable = FALSE; +- break; +- } +-} +- +-#endif +- +-// ---------------------------------------------------------------------------- +- +-ImplFontData* SalGraphics::AddTempDevFont( const String& rFileURL, const String& rFontName ) ++ImplFontData* X11SalGraphics::AddTempDevFont( const String& rFileURL, const String& rFontName ) + { + // inform font manager + rtl::OUString aUSystemPath; +@@ -1662,7 +1193,7 @@ ImplFontData* SalGraphics::AddTempDevFon + psp::FastPrintFontInfo aInfo; + rMgr.getFontFastInfo( nFontId, aInfo ); + ImplFontData* pFontData = new ImplFontData; +- SetImplFontData( aInfo, *pFontData ); ++ PspGraphics::SetImplFontData( aInfo, *pFontData ); + pFontData->maName = rFontName; + pFontData->mnQuality += 5800; + +@@ -1676,148 +1207,83 @@ ImplFontData* SalGraphics::AddTempDevFon + + // ---------------------------------------------------------------------------- + +-void SalGraphics::GetDevFontList( ImplDevFontList *pList ) ++void X11SalGraphics::GetDevFontList( ImplDevFontList *pList ) + { +-#ifndef _USE_PRINT_EXTENSION_ +- if (maGraphicsData.m_pJobData != NULL) ++ XlfdStorage* pFonts = GetDisplay()->GetXlfdList(); ++ ++ for ( int nIdx = 0; nIdx < pFonts->GetCount(); nIdx++ ) ++ { ++ ImplFontData *pFontData = new ImplFontData; ++ pFonts->Get(nIdx)->ToImplFontData( pFontData ); ++ if( pFontData->maName.CompareIgnoreCaseToAscii( "itc ", 4 ) == COMPARE_EQUAL ) ++ pFontData->maName = pFontData->maName.Copy( 4 ); ++ pFontData->mbSubsettable = FALSE; ++ pFontData->mbEmbeddable = FALSE; ++ pList->Add( pFontData ); ++ } ++ ++ aX11GlyphPeer.SetDisplay( GetXDisplay(), ++ GetDisplay()->GetVisual()->GetVisual() ); ++#ifdef MACOSX ++ GlyphCache::EnsureInstance( aX11GlyphPeer, true ); ++#else ++ GlyphCache::EnsureInstance( aX11GlyphPeer, false ); ++#endif ++ GlyphCache& rGC = GlyphCache::GetInstance(); ++ ++ const psp::PrintFontManager& rMgr = psp::PrintFontManager::get(); ++ ::std::list< psp::fontID > aList; ++ ::std::list< psp::fontID >::iterator it; ++ rMgr.getFontList( aList ); ++ unicodeKernMap aKernTab; ++ for( it = aList.begin(); it != aList.end(); ++it ) + { +- const char* pLangBoost = NULL; +- const LanguageType aLang = Application::GetSettings().GetUILanguage(); +- switch( aLang ) +- { +- case LANGUAGE_JAPANESE: +- pLangBoost = "jan"; // japanese is default +- break; +- case LANGUAGE_CHINESE: +- case LANGUAGE_CHINESE_SIMPLIFIED: +- case LANGUAGE_CHINESE_SINGAPORE: +- pLangBoost = "zhs"; +- break; +- case LANGUAGE_CHINESE_TRADITIONAL: +- case LANGUAGE_CHINESE_HONGKONG: +- case LANGUAGE_CHINESE_MACAU: +- pLangBoost = "zht"; +- break; +- case LANGUAGE_KOREAN: +- case LANGUAGE_KOREAN_JOHAB: +- pLangBoost = "kor"; +- break; +- } +- +- ::std::list< psp::fontID > aList; +- const psp::PrintFontManager& rMgr = psp::PrintFontManager::get(); +- rMgr.getFontList( aList, maGraphicsData.m_pJobData->m_pParser ); +- +- ::std::list< psp::fontID >::iterator it; +- for (it = aList.begin(); it != aList.end(); ++it) ++ psp::FastPrintFontInfo aInfo; ++ if( rMgr.getFontFastInfo( *it, aInfo ) ) + { +- psp::FastPrintFontInfo aInfo; +- if (rMgr.getFontFastInfo (*it, aInfo)) ++ if( aInfo.m_eType == psp::fonttype::Builtin ) ++ continue; ++ ImplFontData aFontData; ++ PspGraphics::SetImplFontData( aInfo, aFontData ); ++ // prefer builtin_rasterizer fonts ++ aFontData.mnQuality += 4096; ++ // prefer truetype fonts ++ if( aInfo.m_eType == psp::fonttype::TrueType ) ++ aFontData.mnQuality += 1000; ++ int nFaceNum = rMgr.getFontFaceNumber( aInfo.m_nID ); ++ if( aFontData.maName.CompareIgnoreCaseToAscii( "itc ", 4 ) == COMPARE_EQUAL ) ++ aFontData.maName = aFontData.maName.Copy( 4 ); ++ if( nFaceNum < 0 ) ++ nFaceNum = 0; ++ ++ ++ const unicodeKernMap* pKernTab = NULL; ++ if( aInfo.m_eType == psp::fonttype::Type1 ) + { +- ImplFontData *pFontData = new ImplFontData; +- SetImplFontData( aInfo, *pFontData ); +- pFontData->mpSysData = (void*)*it; +- if( pFontData->maName.CompareIgnoreCaseToAscii( "itc ", 4 ) == COMPARE_EQUAL ) +- pFontData->maName = pFontData->maName.Copy( 4 ); +- if( aInfo.m_eType == psp::fonttype::TrueType ) ++ const std::list< psp::KernPair >& rKernPairs = rMgr.getKernPairs( *it ); ++ if( rKernPairs.size() ) + { +- // prefer truetype fonts +- pFontData->mnQuality += 10; +- // asian type 1 fonts are not known +- ByteString aFileName( rMgr.getFontFileSysPath( *it ) ); +- int nPos = aFileName.SearchBackward( '_' ); +- if( nPos == STRING_NOTFOUND || aFileName.GetChar( nPos+1 ) == '.' ) +- pFontData->mnQuality += 5; +- else +- { +- if( pLangBoost && aFileName.Copy( nPos+1, 3 ).EqualsIgnoreCaseAscii( pLangBoost ) ) +- pFontData->mnQuality += 10; +- } ++ aKernTab.clear(); ++ for( std::list< psp::KernPair >::const_iterator it = rKernPairs.begin(); ++ it != rKernPairs.end(); ++it ) ++ aKernTab[ it->first ][ it->second ] = it->kern_x; ++ pKernTab = & aKernTab; + } +- pList->Add( pFontData ); + } ++ ++ // handling of alias names is done by GlyphCache::FetchFontList ++ rGC.AddFontFile( rMgr.getFontFileSysPath( aInfo.m_nID ), nFaceNum, ++ aInfo.m_nID, &aFontData, pKernTab ); + } + } +- else +-#endif +- { +- XlfdStorage* pFonts = _GetDisplay()->GetXlfdList(); + +- for ( int nIdx = 0; nIdx < pFonts->GetCount(); nIdx++ ) +- { +- ImplFontData *pFontData = new ImplFontData; +-#ifdef MACOSX +- // don't use bitmap X fonts on OS X +- if ( pFonts->Get(nIdx)->GetFontType() != TYPE_RASTER ) +-#endif +- { +- pFonts->Get(nIdx)->ToImplFontData( pFontData ); +- if( pFontData->maName.CompareIgnoreCaseToAscii( "itc ", 4 ) == COMPARE_EQUAL ) +- pFontData->maName = pFontData->maName.Copy( 4 ); +- pFontData->mbSubsettable = FALSE; +- pFontData->mbEmbeddable = FALSE; +- pList->Add( pFontData ); +- } +- } +- +-#ifdef USE_BUILTIN_RASTERIZER +- aX11GlyphPeer.SetDisplay( maGraphicsData.GetXDisplay(), +- maGraphicsData.GetDisplay()->GetVisual()->GetVisual() ); +-#ifdef MACOSX +- GlyphCache::EnsureInstance( aX11GlyphPeer, true ); +-#else +- GlyphCache::EnsureInstance( aX11GlyphPeer, false ); +-#endif +- GlyphCache& rGC = GlyphCache::GetInstance(); +- +- const psp::PrintFontManager& rMgr = psp::PrintFontManager::get(); +- ::std::list< psp::fontID > aList; +- ::std::list< psp::fontID >::iterator it; +- rMgr.getFontList( aList ); +- for( it = aList.begin(); it != aList.end(); ++it ) +- { +- psp::FastPrintFontInfo aInfo; +- if( rMgr.getFontFastInfo( *it, aInfo ) ) +- { +- if( aInfo.m_eType == psp::fonttype::Builtin ) +- continue; +- ImplFontData aFontData; +- SetImplFontData( aInfo, aFontData ); +- // prefer builtin_rasterizer fonts +- aFontData.mnQuality += 4096; +- // prefer truetype fonts +- if( aInfo.m_eType == psp::fonttype::TrueType ) +- aFontData.mnQuality += 1000; +- int nFaceNum = rMgr.getFontFaceNumber( aInfo.m_nID ); +- if( aFontData.maName.CompareIgnoreCaseToAscii( "itc ", 4 ) == COMPARE_EQUAL ) +- aFontData.maName = aFontData.maName.Copy( 4 ); +- if( nFaceNum < 0 ) +- nFaceNum = 0; +- rGC.AddFontFile( rMgr.getFontFileSysPath( aInfo.m_nID ), nFaceNum, +- aInfo.m_nID, &aFontData ); +- } +- } +- +- rGC.FetchFontList( pList ); +-#endif // USE_BUILTIN_RASTERIZER +- } ++ rGC.FetchFontList( pList ); + } + + // ---------------------------------------------------------------------------- + +-void SalGraphics::GetDevFontSubstList( OutputDevice* pOutDev ) ++void X11SalGraphics::GetDevFontSubstList( OutputDevice* pOutDev ) + { +-#ifndef _USE_PRINT_EXTENSION_ +- if( maGraphicsData.m_pPrinterGfx != NULL ) +- { +- const psp::PrinterInfo& rInfo = psp::PrinterInfoManager::get().getPrinterInfo( maGraphicsData.m_pJobData->m_aPrinterName ); +- if( rInfo.m_bPerformFontSubstitution ) +- { +- for( std::hash_map< rtl::OUString, rtl::OUString, rtl::OUStringHash >::const_iterator it = rInfo.m_aFontSubstitutes.begin(); it != rInfo.m_aFontSubstitutes.end(); ++it ) +- pOutDev->ImplAddDevFontSubstitute( it->first, it->second, FONT_SUBSTITUTE_ALWAYS ); +- } +- } +-#endif + } + + // ---------------------------------------------------------------------------- +@@ -1831,136 +1297,53 @@ sal_DivideNeg( long n1, long n2 ) + // ---------------------------------------------------------------------------- + + void +-SalGraphics::GetFontMetric( ImplFontMetricData *pMetric ) ++X11SalGraphics::GetFontMetric( ImplFontMetricData *pMetric ) + { +-#ifndef _USE_PRINT_EXTENSION_ +- if (maGraphicsData.m_pPrinterGfx != NULL) +- { +- const psp::PrintFontManager& rMgr = psp::PrintFontManager::get(); +- psp::PrintFontInfo aInfo; +- +- if (rMgr.getFontInfo (maGraphicsData.m_pPrinterGfx->GetFontID(), aInfo)) +- { +- sal_Int32 nTextHeight = maGraphicsData.m_pPrinterGfx->GetFontHeight(); +- sal_Int32 nTextWidth = maGraphicsData.m_pPrinterGfx->GetFontWidth(); +- if( ! nTextWidth ) +- nTextWidth = nTextHeight; +- +- pMetric->mnOrientation = maGraphicsData.m_pPrinterGfx->GetFontAngle(); +- pMetric->mnSlant = 0; +- pMetric->mbDevice = aInfo.m_eType == psp::fonttype::Builtin ? sal_True : sal_False; +- +- pMetric->meCharSet = aInfo.m_aEncoding; +- +- pMetric->meFamily = ToFontFamily (aInfo.m_eFamilyStyle); +- pMetric->meWeight = ToFontWeight (aInfo.m_eWeight); +- pMetric->mePitch = ToFontPitch (aInfo.m_ePitch); +- pMetric->meItalic = ToFontItalic (aInfo.m_eItalic); +- pMetric->meType = TYPE_SCALABLE; +- +- pMetric->mnFirstChar = 0; +- pMetric->mnLastChar = 255; +- +- pMetric->mnWidth = nTextWidth; +- pMetric->mnAscent = ( aInfo.m_nAscend * nTextHeight + 500 ) / 1000; +- pMetric->mnDescent = ( aInfo.m_nDescend * nTextHeight + 500 ) / 1000; +- pMetric->mnLeading = ( aInfo.m_nLeading * nTextHeight + 500 ) / 1000; +- } +- return; +- } +-#endif +- +- if( maGraphicsData.mpServerFont[0] != NULL ) ++ if( mpServerFont[0] != NULL ) + { + long rDummyFactor; +- maGraphicsData.mpServerFont[0]->FetchFontMetric( *pMetric, rDummyFactor ); ++ mpServerFont[0]->FetchFontMetric( *pMetric, rDummyFactor ); + return; + } + +- ExtendedFontStruct* pFont = maGraphicsData.mXFont[0]; ++ ExtendedFontStruct* pFont = mXFont[0]; + if( pFont != NULL ) + { + pFont->ToImplFontMetricData( pMetric ); +- if ( maGraphicsData.bFontVertical_ ) ++ if ( bFontVertical_ ) + pMetric->mnOrientation = 0; + } + } + + // --------------------------------------------------------------------------- + +-static long +-InitializeWidthArray( long *pWidthArray, sal_Size nItems, int nValue = 0 ) +-{ +- const long nPrecision = 1; +- +- for ( int i = 0; i < nItems; i++, pWidthArray++ ) +- *pWidthArray = nValue; +- +- return nPrecision; +-} +- +-// --------------------------------------------------------------------------- +- +-extern unsigned char TranslateCharName( char* ); +- + ULONG +-SalGraphics::GetKernPairs( ULONG nPairs, ImplKernPairData *pKernPairs ) ++X11SalGraphics::GetKernPairs( ULONG nPairs, ImplKernPairData *pKernPairs ) + { +- if( ! _IsPrinter() ) ++ if( ! bPrinter_ ) + { +- if( maGraphicsData.mpServerFont[0] != NULL ) ++ if( mpServerFont[0] != NULL ) + { + ImplKernPairData* pTmpKernPairs; +- ULONG nGotPairs = maGraphicsData.mpServerFont[0]->GetKernPairs( &pTmpKernPairs ); ++ ULONG nGotPairs = mpServerFont[0]->GetKernPairs( &pTmpKernPairs ); + for( int i = 0; i < nPairs && i < nGotPairs; ++i ) + pKernPairs[ i ] = pTmpKernPairs[ i ]; + delete[] pTmpKernPairs; + return nGotPairs; + } + } +- else +- { +-#ifndef _USE_PRINT_EXTENSION_ +- const ::std::list< ::psp::KernPair >& rPairs( maGraphicsData.m_pPrinterGfx->getKernPairs() ); +- ULONG nHavePairs = rPairs.size(); +- if( pKernPairs && nPairs ) +- { +- ::std::list< ::psp::KernPair >::const_iterator it; +- int i; +- int nTextScale = maGraphicsData.m_pPrinterGfx->GetFontWidth(); +- if( ! nTextScale ) +- nTextScale = maGraphicsData.m_pPrinterGfx->GetFontHeight(); +- for( i = 0, it = rPairs.begin(); i < nPairs && i < nHavePairs; i++, ++it ) +- { +- pKernPairs[i].mnChar1 = it->first; +- pKernPairs[i].mnChar2 = it->second; +- pKernPairs[i].mnKern = it->kern_x * nTextScale / 1000; +- } +- +- } +- return nHavePairs; +-#endif +- } +- + return 0; + } + + // --------------------------------------------------------------------------- + +-ULONG SalGraphics::GetFontCodeRanges( sal_uInt32* pCodePairs ) const +-{ +- return maGraphicsData.GetFontCodeRanges( pCodePairs ); +-} +- +-// --------------------------------------------------------------------------- +- +-BOOL SalGraphics::GetGlyphBoundRect( long nGlyphIndex, Rectangle& rRect, const OutputDevice* ) ++BOOL X11SalGraphics::GetGlyphBoundRect( long nGlyphIndex, Rectangle& rRect ) + { + int nLevel = nGlyphIndex >> GF_FONTSHIFT; + if( nLevel >= MAX_FALLBACK ) + return FALSE; + +- ServerFont* pSF = maGraphicsData.mpServerFont[ nLevel ]; ++ ServerFont* pSF = mpServerFont[ nLevel ]; + if( !pSF ) + return FALSE; + +@@ -1972,13 +1355,13 @@ BOOL SalGraphics::GetGlyphBoundRect( lon + + // --------------------------------------------------------------------------- + +-BOOL SalGraphics::GetGlyphOutline( long nGlyphIndex, PolyPolygon& rPolyPoly, const OutputDevice* ) ++BOOL X11SalGraphics::GetGlyphOutline( long nGlyphIndex, PolyPolygon& rPolyPoly ) + { + int nLevel = nGlyphIndex >> GF_FONTSHIFT; + if( nLevel >= MAX_FALLBACK ) + return FALSE; + +- ServerFont* pSF = maGraphicsData.mpServerFont[ nLevel ]; ++ ServerFont* pSF = mpServerFont[ nLevel ]; + if( !pSF ) + return FALSE; + +@@ -1991,29 +1374,13 @@ BOOL SalGraphics::GetGlyphOutline( long + + //-------------------------------------------------------------------------- + +-SalLayout* SalGraphicsData::GetTextLayout( ImplLayoutArgs& rArgs, int nFallbackLevel ) ++SalLayout* X11SalGraphics::GetTextLayout( ImplLayoutArgs& rArgs, int nFallbackLevel ) + { +-#if !defined(_USE_PRINT_EXTENSION_) +- // workaround for printers not handling glyph indexing for non-TT fonts +- if( m_pPrinterGfx != NULL ) +- { +- int nFontId = m_pPrinterGfx->GetFontID(); +- if( psp::fonttype::TrueType != psp::PrintFontManager::get().getFontType( nFontId ) ) +- rArgs.mnFlags |= SAL_LAYOUT_DISABLE_GLYPH_PROCESSING; +- else if( nFallbackLevel > 0 ) +- rArgs.mnFlags &= ~SAL_LAYOUT_DISABLE_GLYPH_PROCESSING; +- } +-#endif // !defined(_USE_PRINT_EXTENSION_) +- + GenericSalLayout* pLayout = NULL; + + if( mpServerFont[ nFallbackLevel ] + && !(rArgs.mnFlags & SAL_LAYOUT_DISABLE_GLYPH_PROCESSING) ) +- pLayout = m_pPrinterGfx ? new PspServerFontLayout( *m_pPrinterGfx, *mpServerFont[nFallbackLevel] ) : new ServerFontLayout( *mpServerFont[ nFallbackLevel ] ); +-#if !defined(_USE_PRINT_EXTENSION_) +- else if( m_pPrinterGfx != NULL ) +- pLayout = new PspFontLayout( *m_pPrinterGfx ); +-#endif // !defined(_USE_PRINT_EXTENSION_) ++ pLayout = new ServerFontLayout( *mpServerFont[ nFallbackLevel ] ); + else if( mXFont[ nFallbackLevel ] ) + pLayout = new X11FontLayout( *mXFont[ nFallbackLevel ] ); + else +@@ -2024,18 +1391,10 @@ SalLayout* SalGraphicsData::GetTextLayou + + //-------------------------------------------------------------------------- + +-SalLayout* SalGraphics::GetTextLayout( ImplLayoutArgs& rArgs, int nFallbackLevel ) +-{ +- SalLayout* pSalLayout = maGraphicsData.GetTextLayout( rArgs, nFallbackLevel ); +- return pSalLayout; +-} +- +-//-------------------------------------------------------------------------- +- +-BOOL SalGraphics::CreateFontSubset( ++BOOL X11SalGraphics::CreateFontSubset( + const rtl::OUString& rToFile, + ImplFontData* pFont, +- long* pGlyphIDs, ++ sal_Int32* pGlyphIDs, + sal_uInt8* pEncoding, + sal_Int32* pWidths, + int nGlyphs, +@@ -2049,41 +1408,7 @@ BOOL SalGraphics::CreateFontSubset( + // which this method was created). The correct way would + // be to have the GlyphCache search for the ImplFontData pFont + psp::fontID aFont = (psp::fontID)pFont->mpSysData; +- psp::PrintFontManager& rMgr = psp::PrintFontManager::get(); +- +- psp::PrintFontInfo aFontInfo; +- +- if( ! rMgr.getFontInfo( aFont, aFontInfo ) ) +- return FALSE; +- +- // fill in font info +- switch( aFontInfo.m_eType ) +- { +- case psp::fonttype::TrueType: rInfo.m_nFontType = SAL_FONTSUBSETINFO_TYPE_TRUETYPE;break; +- case psp::fonttype::Type1: rInfo.m_nFontType = SAL_FONTSUBSETINFO_TYPE_TYPE1;break; +- default: +- return FALSE; +- } +- rInfo.m_nAscent = aFontInfo.m_nAscend; +- rInfo.m_nDescent = aFontInfo.m_nDescend; +- rInfo.m_aPSName = rMgr.getPSName( aFont ); +- +- int xMin, yMin, xMax, yMax; +- rMgr.getFontBoundingBox( aFont, xMin, yMin, xMax, yMax ); +- +- if( ! rMgr.createFontSubset( aFont, +- rToFile, +- pGlyphIDs, +- pEncoding, +- pWidths, +- nGlyphs +- ) ) +- return FALSE; +- +- rInfo.m_aFontBBox = Rectangle( Point( xMin, yMin ), Size( xMax-xMin, yMax-yMin ) ); +- rInfo.m_nCapHeight = yMax; // Well ... +- +- return TRUE; ++ return PspGraphics::DoCreateFontSubset( rToFile, aFont, pGlyphIDs, pEncoding, pWidths, nGlyphs, rInfo ); + #else + return FALSE; + #endif +@@ -2091,7 +1416,7 @@ BOOL SalGraphics::CreateFontSubset( + + //-------------------------------------------------------------------------- + +-const void* SalGraphics::GetEmbedFontData( ImplFontData* pFont, const sal_Unicode* pUnicodes, sal_Int32* pWidths, FontSubsetInfo& rInfo, long* pDataLen ) ++const void* X11SalGraphics::GetEmbedFontData( ImplFontData* pFont, const sal_Unicode* pUnicodes, sal_Int32* pWidths, FontSubsetInfo& rInfo, long* pDataLen ) + { + #ifndef _USE_PRINT_EXTENSION_ + // in this context the sysdata member of pFont should +@@ -2100,61 +1425,7 @@ const void* SalGraphics::GetEmbedFontDat + // which this method was created). The correct way would + // be to have the GlyphCache search for the ImplFontData pFont + psp::fontID aFont = (psp::fontID)pFont->mpSysData; +- psp::PrintFontManager& rMgr = psp::PrintFontManager::get(); +- +- psp::PrintFontInfo aFontInfo; +- if( ! rMgr.getFontInfo( aFont, aFontInfo ) ) +- return NULL; +- +- // fill in font info +- switch( aFontInfo.m_eType ) +- { +- case psp::fonttype::TrueType: rInfo.m_nFontType = SAL_FONTSUBSETINFO_TYPE_TRUETYPE;break; +- case psp::fonttype::Type1: rInfo.m_nFontType = SAL_FONTSUBSETINFO_TYPE_TYPE1;break; +- default: +- return NULL; +- } +- rInfo.m_nAscent = aFontInfo.m_nAscend; +- rInfo.m_nDescent = aFontInfo.m_nDescend; +- rInfo.m_aPSName = rMgr.getPSName( aFont ); +- +- int xMin, yMin, xMax, yMax; +- rMgr.getFontBoundingBox( aFont, xMin, yMin, xMax, yMax ); +- +- psp::CharacterMetric aMetrics[256]; +- sal_Unicode aUnicodes[256]; +- if( aFontInfo.m_aEncoding == RTL_TEXTENCODING_SYMBOL && aFontInfo.m_eType == psp::fonttype::Type1 ) +- { +- for( int i = 0; i < 256; i++ ) +- aUnicodes[i] = pUnicodes[i] < 0x0100 ? pUnicodes[i] + 0xf000 : pUnicodes[i]; +- pUnicodes = aUnicodes; +- } +- if( ! rMgr.getMetrics( aFont, pUnicodes, 256, aMetrics ) ) +- return NULL; +- +- OString aSysPath = rMgr.getFontFileSysPath( aFont ); +- struct stat aStat; +- if( stat( aSysPath.getStr(), &aStat ) ) +- return NULL; +- int fd = open( aSysPath.getStr(), O_RDONLY ); +- if( fd < 0 ) +- return NULL; +- void* pFile = mmap( NULL, aStat.st_size, PROT_READ, MAP_SHARED, fd, 0 ); +- close( fd ); +- if( pFile == MAP_FAILED ) +- return NULL; +- +- *pDataLen = aStat.st_size; +- +- rInfo.m_aFontBBox = Rectangle( Point( xMin, yMin ), Size( xMax-xMin, yMax-yMin ) ); +- rInfo.m_nCapHeight = yMax; // Well ... +- +- for( int i = 0; i < 256; i++ ) +- +- pWidths[i] = (aMetrics[i].width > 0 ? aMetrics[i].width : 0); +- +- return pFile; +- ++ return PspGraphics::DoGetEmbedFontData( aFont, pUnicodes, pWidths, rInfo, pDataLen ); + #else + return NULL; + #endif +@@ -2162,14 +1433,16 @@ const void* SalGraphics::GetEmbedFontDat + + //-------------------------------------------------------------------------- + +-void SalGraphics::FreeEmbedFontData( const void* pData, long nLen ) ++void X11SalGraphics::FreeEmbedFontData( const void* pData, long nLen ) + { +- munmap( (char*)pData, nLen ); ++#ifndef _USE_PRINT_EXTENSION_ ++ PspGraphics::DoFreeEmbedFontData( pData, nLen ); ++#endif + } + + //-------------------------------------------------------------------------- + +-const std::map< sal_Unicode, sal_Int32 >* SalGraphics::GetFontEncodingVector( ImplFontData* pFont, const std::map< sal_Unicode, rtl::OString >** pNonEncoded ) ++const std::map< sal_Unicode, sal_Int32 >* X11SalGraphics::GetFontEncodingVector( ImplFontData* pFont, const std::map< sal_Unicode, rtl::OString >** pNonEncoded ) + { + #ifndef _USE_PRINT_EXTENSION_ + // in this context the sysdata member of pFont should +@@ -2178,17 +1451,7 @@ const std::map< sal_Unicode, sal_Int32 > + // which this method was created). The correct way would + // be to have the GlyphCache search for the ImplFontData pFont + psp::fontID aFont = (psp::fontID)pFont->mpSysData; +- psp::PrintFontManager& rMgr = psp::PrintFontManager::get(); +- +- psp::PrintFontInfo aFontInfo; +- if( ! rMgr.getFontInfo( aFont, aFontInfo ) ) +- { +- if( pNonEncoded ) +- *pNonEncoded = NULL; +- return NULL; +- } +- +- return rMgr.getEncodingMap( aFont, pNonEncoded ); ++ return PspGraphics::DoGetFontEncodingVector( aFont, pNonEncoded ); + #else + return NULL; + #endif +Index: vcl/unx/source/gdi/salnativewidgets-kde.cxx +=================================================================== +RCS file: vcl/unx/source/gdi/salnativewidgets-kde.cxx +diff -N vcl/unx/source/gdi/salnativewidgets-kde.cxx +--- /dev/null 1 Jan 1970 00:00:00 -0000 ++++ vcl/unx/source/gdi/salnativewidgets-kde.cxx 10 May 2004 15:59:25 -0000 1.2 +@@ -0,0 +1,1633 @@ ++/************************************************************************* ++ * ++ * ++ * ++ * ++ * ++ * ++ * ++ * The Contents of this file are made available subject to the terms of ++ * either of the following licenses ++ * ++ * - GNU Lesser General Public License Version 2.1 ++ * - Sun Industry Standards Source License Version 1.1 ++ * ++ * Sun Microsystems Inc., October, 2000 ++ * ++ * GNU Lesser General Public License Version 2.1 ++ * ============================================= ++ * Copyright 2000 by Sun Microsystems, Inc. ++ * 901 San Antonio Road, Palo Alto, CA 94303, USA ++ * ++ * This library is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU Lesser General Public ++ * License version 2.1, as published by the Free Software Foundation. ++ * ++ * This library is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * Lesser General Public License for more details. ++ * ++ * You should have received a copy of the GNU Lesser General Public ++ * License along with this library; if not, write to the Free Software ++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, ++ * MA 02111-1307 USA ++ * ++ * ++ * Sun Industry Standards Source License Version 1.1 ++ * ================================================= ++ * The contents of this file are subject to the Sun Industry Standards ++ * Source License Version 1.1 (the "License"); You may not use this file ++ * except in compliance with the License. You may obtain a copy of the ++ * License at http://www.openoffice.org/license.html. ++ * ++ * Software provided under this License is provided on an "AS IS" basis, ++ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, ++ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, ++ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. ++ * See the License for the specific provisions governing your rights and ++ * obligations concerning the Software. ++ * ++ * The Initial Developer of the Original Code is: Sun Microsystems, Inc. ++ * ++ * Copyright: 2000 by Sun Microsystems, Inc. ++ * ++ * All Rights Reserved. ++ * ++ * Contributor(s): Juergen Keil ++ * Jan Holesovsky <kendy@artax.karlin.mff.cuni.cz> ++ * Lukas Tinkl <lukas@kde.org> ++ * ++ * ++ ************************************************************************/ ++ ++#define _SV_SALNATIVEWIDGETS_KDE_CXX ++ ++// Hack, but needed because of conflicting types... ++#define Region QtXRegion ++ ++#include <qcheckbox.h> ++#include <qcombobox.h> ++#include <qframe.h> ++#include <qlineedit.h> ++#include <qlistview.h> ++#include <qpainter.h> ++#include <qpushbutton.h> ++#include <qradiobutton.h> ++#include <qrangecontrol.h> ++#include <qtabbar.h> ++#include <qtabwidget.h> ++#include <qwidget.h> ++ ++#include <kaboutdata.h> ++#include <kapplication.h> ++#include <kcmdlineargs.h> ++#include <kconfig.h> ++#include <kglobal.h> ++#include <kmainwindow.h> ++#include <kmenubar.h> ++#include <kstyle.h> ++ ++#undef Region ++ ++#include <salunx.h> ++ ++#ifndef _SV_SALDATA_HXX ++#include <saldata.hxx> ++#endif ++ ++#ifndef _SV_SALDISP_HXX ++#include <saldisp.hxx> ++#endif ++ ++#ifndef _SV_SALGDI_HXX ++#include <salgdi.hxx> ++#endif ++ ++#ifndef _SV_KDEINT_HXX ++#include <kdeint.hxx> ++#endif ++ ++#ifndef _SV_SETTINGS_HXX ++#include <settings.hxx> ++#endif ++ ++#include <iostream> ++ ++using namespace ::rtl; ++ ++/** Cached native widgets. ++ ++ A class which caches and paints the native widgets. ++*/ ++class WidgetPainter ++{ ++ protected: ++ /** Cached push button. ++ ++ It is necessary for the QStyle::drawControl(). The buttons are created ++ on demand and they are still hidden (no QWidget::show() is called). ++ */ ++ QPushButton *m_pPushButton; ++ ++ /** Cached radio button. ++ ++ @see m_pPushButton ++ */ ++ QRadioButton *m_pRadioButton; ++ ++ /** Cached check box. ++ ++ @see m_pPushButton ++ */ ++ QCheckBox *m_pCheckBox; ++ ++ /** Cached combo box. ++ ++ @see m_pPushButton ++ */ ++ QComboBox *m_pComboBox; ++ ++ /** Cached editable combo box. ++ ++ Needed, because some styles do not like dynamic changes ++ (QComboBox::setEditable()). ++ ++ @see m_pPushButton ++ */ ++ QComboBox *m_pEditableComboBox; ++ ++ /** Cached line edit box. ++ ++ @see m_pPushButton ++ */ ++ QLineEdit *m_pLineEdit; ++ ++ /** Cached spin box. ++ ++ @see m_pPushButton ++ */ ++ QSpinWidget *m_pSpinWidget; ++ ++ /** Cached spin box'es line edit. ++ ++ @see m_pPushButton ++ */ ++ QLineEdit *m_pSpinEdit; ++ ++ /** Cached tab. ++ ++ Left, middle, right tab and a tab which is alone. ++ ++ @see m_pPushButton ++ */ ++ QTab *m_pTabLeft, *m_pTabMiddle, *m_pTabRight, *m_pTabAlone; ++ ++ /** Cached tab bar's parent widget. ++ ++ Needed, because the Qt windows style checks for the availability ++ of tab bar's parent. We cannot use m_pTabWidget, because ++ TabWidget::setTabBar() and TabWidget::tabBar() methods are ++ protected. ++ ++ @see m_pPushButton, m_pTabWidget ++ */ ++ QWidget *m_pTabBarParent; ++ ++ /** Cached tab bar widget. ++ ++ @see m_pPushButton ++ */ ++ QTabBar *m_pTabBar; ++ ++ /** Cached tab widget. ++ ++ We need it to draw the tab page. It cannot be used to draw the ++ tabs themselves, because the drawing has to be tweaked a little ++ due to not enough information from VCL. ++ ++ @see m_pPushButton, m_pTabBarParent ++ */ ++ QTabWidget *m_pTabWidget; ++ ++ /** Cached list view. ++ ++ @see m_pPushButton ++ */ ++ QListView *m_pListView; ++ ++ /** Cached scroll bar. ++ ++ @see m_pPushButton ++ */ ++ QScrollBar *m_pScrollBar; ++ ++ // TODO other widgets ++ ++ public: ++ /** Implicit constructor. ++ ++ It creates an empty WidgetPainter with all the cached widgets initialized ++ to NULL. The widgets are created on demand and they are still hidden ++ (no QWidget::show()), because they are needed just as a parameter for ++ QStyle::drawControl(). ++ ++ @see m_pPushButton ++ */ ++ WidgetPainter( void ); ++ ++ /** Destructor. ++ ++ Destruct all the cached widgets. ++ */ ++ virtual ~WidgetPainter( void ); ++ ++ /** Paints the specified widget to the X window. ++ ++ Use X calls to bitblt (bit block transfer) the widget qWidget to ++ the window specified by drawable with the style defined by nStyle. ++ ++ @param qWidget ++ A pointer to the cached widget. ++ ++ @param nState ++ The state of the control (focused, on/off, ...) ++ ++ @param aValue ++ The value (true/false, ...) ++ ++ @param dpy ++ The display to be used by the X calls. ++ ++ @param drawable ++ The destination X window. ++ ++ @param gc ++ The graphics context. ++ */ ++ BOOL drawStyledWidget( QWidget *pWidget, ++ ControlState nState, const ImplControlValue& aValue, ++ Display *dpy, XLIB_Window drawable, GC gc ); ++ ++ /** 'Get' method for push button. ++ ++ The method returns the cached push button. It is constructed if it ++ does not exist. It has NULL as a parent and it stays hidden, but it ++ is necessary for the drawStyledWidget() method. ++ ++ @return valid push button. ++ */ ++ QPushButton *pushButton( const Region& rControlRegion, BOOL bDefault ); ++ ++ /** 'Get' method for radio button. ++ ++ @see pushButton() ++ */ ++ QRadioButton *radioButton( const Region& rControlRegion ); ++ ++ /** 'Get' method for check box. ++ ++ @see pushButton() ++ */ ++ QCheckBox *checkBox( const Region& rControlRegion ); ++ ++ /** 'Get' method for combo box. ++ ++ It returns m_pComboBox or m_pEditableComboBox according to ++ bEditable. ++ ++ @see pushButton(), m_pEditableComboBox ++ */ ++ QComboBox *comboBox( const Region& rControlRegion, BOOL bEditable ); ++ ++ /** 'Get' method for line edit box. ++ ++ @see pushButton() ++ */ ++ QLineEdit *lineEdit( const Region& rControlRegion ); ++ ++ /** 'Get' method for spin box. ++ ++ @see pushButton() ++ */ ++ QSpinWidget *spinWidget( const Region& rControlRegion ); ++ ++ /** 'Get' method for tab bar. ++ ++ @see pushButton() ++ */ ++ QTabBar *tabBar( const Region& rControlRegion ); ++ ++ /** 'Get' method for tab widget. ++ ++ @see pushButton() ++ */ ++ QTabWidget *tabWidget( const Region& rControlRegion ); ++ ++ /** 'Get' method for list view. ++ ++ @see pushButton() ++ */ ++ QListView *listView( const Region& rControlRegion ); ++ ++ /** 'Get' method for scroll bar. ++ ++ @see pushButton() ++ */ ++ QScrollBar *scrollBar( const Region& rControlRegion, ++ BOOL bHorizontal, const ImplControlValue& aValue ); ++ ++ // TODO other widgets ++ ++ protected: ++ /** Style conversion function. ++ ++ Conversion function between VCL ControlState together with ++ ImplControlValue and Qt state flags. ++ ++ @param nState ++ State of the widget (default, focused, ...) as defined in Native ++ Widget Framework. ++ ++ @param aValue ++ Value held by the widget (on, off, ...) ++ */ ++ QStyle::SFlags vclStateValue2SFlags( ControlState nState, const ImplControlValue& aValue ); ++ ++ public: ++ /** Convert VCL Region to QRect. ++ ++ @param rControlRegion ++ The region to convert. ++ ++ @return ++ The bounding box of the region. ++ */ ++ static QRect region2QRect( const Region& rControlRegion ); ++}; ++ ++WidgetPainter::WidgetPainter( void ) ++ : m_pPushButton( NULL ), ++ m_pRadioButton( NULL ), ++ m_pCheckBox( NULL ), ++ m_pComboBox( NULL ), ++ m_pEditableComboBox( NULL ), ++ m_pLineEdit( NULL ), ++ m_pSpinWidget( NULL ), ++ m_pSpinEdit( NULL ), ++ m_pTabLeft( NULL ), ++ m_pTabMiddle( NULL ), ++ m_pTabRight( NULL ), ++ m_pTabAlone( NULL ), ++ m_pTabBarParent( NULL ), ++ m_pTabBar( NULL ), ++ m_pTabWidget( NULL ), ++ m_pListView( NULL ), ++ m_pScrollBar( NULL ) ++{ ++} ++ ++WidgetPainter::~WidgetPainter( void ) ++{ ++ delete m_pPushButton, m_pPushButton = NULL; ++ delete m_pRadioButton, m_pRadioButton = NULL; ++ delete m_pCheckBox, m_pCheckBox = NULL; ++ delete m_pComboBox, m_pComboBox = NULL; ++ delete m_pEditableComboBox, m_pEditableComboBox = NULL; ++ delete m_pLineEdit, m_pLineEdit = NULL; ++ delete m_pSpinWidget, m_pSpinWidget = NULL; ++ delete m_pSpinEdit, m_pSpinEdit = NULL; ++ delete m_pTabLeft, m_pTabLeft = NULL; ++ delete m_pTabMiddle, m_pTabMiddle = NULL; ++ delete m_pTabRight, m_pTabRight = NULL; ++ delete m_pTabAlone, m_pTabAlone = NULL; ++ delete m_pTabBarParent, m_pTabBarParent = NULL; ++ delete m_pTabBar, m_pTabBar = NULL; ++ delete m_pTabWidget, m_pTabWidget = NULL; ++ delete m_pListView, m_pListView = NULL; ++ delete m_pScrollBar, m_pScrollBar = NULL; ++} ++ ++BOOL WidgetPainter::drawStyledWidget( QWidget *pWidget, ++ ControlState nState, const ImplControlValue& aValue, ++ Display *dpy, XLIB_Window drawable, GC gc ) ++{ ++ if ( !pWidget ) ++ return FALSE; ++ ++ // Normalize the widget ++ QPoint qWidgetPos( pWidget->pos() ); ++ pWidget->move( 0, 0 ); ++ ++ // Enable/disable the widget ++ pWidget->setEnabled( nState & CTRL_STATE_ENABLED ); ++ ++ // Create pixmap to paint to ++ QPixmap qPixmap( pWidget->width(), pWidget->height() ); ++ QPainter qPainter( &qPixmap ); ++ QRect qRect( 0, 0, pWidget->width(), pWidget->height() ); ++ ++ // Use the background of the widget ++ qPixmap.fill( pWidget, QPoint(0, 0) ); ++ ++ // Convert the flags ++ QStyle::SFlags nStyle = vclStateValue2SFlags( nState, aValue ); ++ ++ // Store the widget class ++ const char *pClassName = pWidget->className(); ++ ++ // Draw the widget to the pixmap ++ if ( strcmp( "QPushButton", pClassName ) == 0 ) ++ { ++ // Workaround for the Platinum style. ++ // Platinum takes the state directly from the widget, not from SFlags. ++ QPushButton *pPushButton = static_cast<QPushButton *>( pWidget->qt_cast( "QPushButton" ) ); ++ if ( pPushButton ) ++ { ++ pPushButton->setDown ( nStyle & QStyle::Style_Down ); ++ pPushButton->setOn ( nStyle & QStyle::Style_On ); ++ pPushButton->setEnabled( nStyle & QStyle::Style_Enabled ); ++ } ++ ++ kapp->style().drawControl( QStyle::CE_PushButton, ++ &qPainter, pWidget, qRect, ++ pWidget->colorGroup(), nStyle ); ++ } ++ else if ( strcmp( "QRadioButton", pClassName ) == 0 ) ++ { ++ // Bitblt from the screen, because the radio buttons are usually not ++ // rectangular, and there could be a bitmap under them ++ GC aTmpGC = XCreateGC( dpy, qPixmap.handle(), 0, NULL ); ++ XCopyArea( dpy, ++ drawable, qPixmap.handle(), ++ aTmpGC, ++ qWidgetPos.x(), qWidgetPos.y(), qRect.width(), qRect.height(), ++ 0, 0 ); ++ XFreeGC( dpy, aTmpGC ); ++ ++ kapp->style().drawControl( QStyle::CE_RadioButton, ++ &qPainter, pWidget, qRect, ++ pWidget->colorGroup(), nStyle ); ++ } ++ else if ( strcmp( "QCheckBox", pClassName ) == 0 ) ++ { ++ kapp->style().drawControl( QStyle::CE_CheckBox, ++ &qPainter, pWidget, qRect, ++ pWidget->colorGroup(), nStyle ); ++ } ++ else if ( strcmp( "QComboBox", pClassName ) == 0 ) ++ { ++ kapp->style().drawComplexControl( QStyle::CC_ComboBox, ++ &qPainter, pWidget, qRect, ++ pWidget->colorGroup(), nStyle ); ++ ++ // Editable combo box uses the background of the associated edit box ++ QComboBox *pComboBox = static_cast<QComboBox *>( pWidget->qt_cast( "QComboBox" ) ); ++ if ( pComboBox && pComboBox->editable() && pComboBox->lineEdit() ) ++ { ++ QColorGroup::ColorRole eColorRole = ( pComboBox->isEnabled() )? ++ QColorGroup::Base: QColorGroup::Background; ++ qPainter.fillRect( ++ kapp->style().querySubControlMetrics( QStyle::CC_ComboBox, ++ pComboBox, QStyle::SC_ComboBoxEditField ), ++ pComboBox->lineEdit()->colorGroup().brush( eColorRole ) ); ++ } ++ } ++ else if ( strcmp( "QLineEdit", pClassName ) == 0 ) ++ { ++ kapp->style().drawPrimitive( QStyle::PE_PanelLineEdit, ++ &qPainter, qRect, ++ pWidget->colorGroup(), nStyle | QStyle::Style_Sunken ); ++ } ++ else if ( strcmp( "QSpinWidget", pClassName ) == 0 ) ++ { ++ SpinbuttonValue *pValue = static_cast<SpinbuttonValue *> ( aValue.getOptionalVal() ); ++ ++ // Is any of the buttons pressed? ++ QStyle::SCFlags eActive = QStyle::SC_None; ++ if ( pValue ) ++ { ++ if ( pValue->mnUpperState & CTRL_STATE_PRESSED ) ++ eActive = QStyle::SC_SpinWidgetUp; ++ else if ( pValue->mnLowerState & CTRL_STATE_PRESSED ) ++ eActive = QStyle::SC_SpinWidgetDown; ++ ++ // Update the enable/disable state of the widget ++ if ( ( nState & CTRL_STATE_ENABLED ) || ++ ( pValue->mnUpperState & CTRL_STATE_ENABLED ) || ++ ( pValue->mnLowerState & CTRL_STATE_ENABLED ) ) ++ { ++ pWidget->setEnabled( true ); ++ nStyle |= QStyle::Style_Enabled; ++ } ++ else ++ pWidget->setEnabled( false ); ++ ++ // Mouse-over effect ++ if ( (pValue->mnUpperState & CTRL_STATE_ROLLOVER) || ++ (pValue->mnLowerState & CTRL_STATE_ROLLOVER) ) ++ nStyle |= QStyle::Style_MouseOver; ++ } ++ ++ // Spin widget uses the background of the associated edit box ++ QSpinWidget *pSpinWidget = static_cast<QSpinWidget *>( pWidget->qt_cast( "QSpinWidget" ) ); ++ if ( pSpinWidget && pSpinWidget->editWidget() ) ++ { ++ QColorGroup::ColorRole eColorRole = ( pSpinWidget->isEnabled() )? ++ QColorGroup::Base: QColorGroup::Background; ++ qPainter.fillRect( ++ kapp->style().querySubControlMetrics( QStyle::CC_SpinWidget, ++ pSpinWidget, QStyle::SC_SpinWidgetEditField ), ++ pSpinWidget->editWidget()->colorGroup().brush( eColorRole ) ); ++ } ++ ++ // Adjust the frame (needed for Motif Plus style) ++ QRect qFrameRect = kapp->style().querySubControlMetrics( QStyle::CC_SpinWidget, ++ pWidget, QStyle::SC_SpinWidgetFrame ); ++ ++ kapp->style().drawComplexControl( QStyle::CC_SpinWidget, ++ &qPainter, pWidget, qFrameRect, ++ pWidget->colorGroup(), nStyle, ++ QStyle::SC_All, eActive ); ++ } ++ else if ( strcmp( "QTabBar", pClassName ) == 0 ) ++ { ++ TabitemValue *pValue = static_cast<TabitemValue *> ( aValue.getOptionalVal() ); ++ ++ QTab *pTab = NULL; ++ if ( pValue ) ++ { ++ if ( ( pValue->isFirst() || pValue->isLeftAligned() ) && ( pValue->isLast() || pValue->isRightAligned() ) ) ++ pTab = m_pTabAlone; ++ else if ( pValue->isFirst() || pValue->isLeftAligned() ) ++ pTab = m_pTabLeft; ++ else if ( pValue->isLast() || pValue->isRightAligned() ) ++ pTab = m_pTabRight; ++ else ++ pTab = m_pTabMiddle; ++ } ++ if ( !pTab ) ++ return FALSE; ++ ++ pTab->setRect( qRect ); ++ ++ kapp->style().drawControl( QStyle::CE_TabBarTab, ++ &qPainter, pWidget, qRect, ++ pWidget->colorGroup(), nStyle, ++ QStyleOption( pTab ) ); ++ } ++ else if ( strcmp( "QTabWidget", pClassName ) == 0 ) ++ { ++ kapp->style().drawPrimitive( QStyle::PE_PanelTabWidget, ++ &qPainter, qRect, ++ pWidget->colorGroup(), nStyle ); ++ } ++ else if ( strcmp( "QListView", pClassName ) == 0 ) ++ { ++ kapp->style().drawPrimitive( QStyle::PE_Panel, ++ &qPainter, qRect, ++ pWidget->colorGroup(), nStyle | QStyle::Style_Sunken ); ++ } ++ else if ( strcmp( "QScrollBar", pClassName ) == 0 ) ++ { ++ ScrollbarValue *pValue = static_cast<ScrollbarValue *> ( aValue.getOptionalVal() ); ++ ++ QStyle::SCFlags eActive = QStyle::SC_None; ++ if ( pValue ) ++ { ++ // Workaround for Style_MouseOver-aware themes. ++ // Quite ugly, but I do not know about a better solution. ++ const char *pStyleName = kapp->style().className(); ++ if ( strcmp( "QMotifPlusStyle", pStyleName ) == 0 ) ++ { ++ nStyle |= QStyle::Style_MouseOver; ++ if ( pValue->mnThumbState & CTRL_STATE_ROLLOVER ) ++ eActive = QStyle::SC_ScrollBarSlider; ++ } ++ else if ( strcmp( "QSGIStyle", pStyleName ) == 0 ) ++ { ++ nStyle |= QStyle::Style_MouseOver; ++ if ( pValue->mnButton1State & CTRL_STATE_ROLLOVER ) ++ eActive = QStyle::SC_ScrollBarSubLine; ++ else if ( pValue->mnButton2State & CTRL_STATE_ROLLOVER ) ++ eActive = QStyle::SC_ScrollBarAddLine; ++ else if ( pValue->mnThumbState & CTRL_STATE_ROLLOVER ) ++ eActive = QStyle::SC_ScrollBarSlider; ++ } ++ ++ if ( pValue->mnButton1State & CTRL_STATE_PRESSED ) ++ eActive = QStyle::SC_ScrollBarSubLine; ++ else if ( pValue->mnButton2State & CTRL_STATE_PRESSED ) ++ eActive = QStyle::SC_ScrollBarAddLine; ++ else if ( pValue->mnThumbState & CTRL_STATE_PRESSED ) ++ eActive = QStyle::SC_ScrollBarSlider; ++ else if ( pValue->mnPage1State & CTRL_STATE_PRESSED ) ++ eActive = QStyle::SC_ScrollBarSubPage; ++ else if ( pValue->mnPage2State & CTRL_STATE_PRESSED ) ++ eActive = QStyle::SC_ScrollBarAddPage; ++ ++ // Update the enable/disable state of the widget ++ if ( ( nState & CTRL_STATE_ENABLED ) || ++ ( pValue->mnButton1State & CTRL_STATE_ENABLED ) || ++ ( pValue->mnButton2State & CTRL_STATE_ENABLED ) || ++ ( pValue->mnThumbState & CTRL_STATE_ENABLED ) || ++ ( pValue->mnPage1State & CTRL_STATE_ENABLED ) || ++ ( pValue->mnPage2State & CTRL_STATE_ENABLED ) ) ++ { ++ pWidget->setEnabled( true ); ++ nStyle |= QStyle::Style_Enabled; ++ } ++ else ++ pWidget->setEnabled( false ); ++ } ++ ++ // Is it a horizontal scroll bar? ++ QScrollBar *pScrollBar = static_cast<QScrollBar *> ( pWidget->qt_cast( "QScrollBar" ) ); ++ QStyle::StyleFlags eHoriz = QStyle::Style_Default; ++ if ( pScrollBar && pScrollBar->orientation() == Qt::Horizontal ) ++ eHoriz = QStyle::Style_Horizontal; ++ ++ kapp->style().drawComplexControl( QStyle::CC_ScrollBar, ++ &qPainter, pWidget, qRect, ++ pWidget->colorGroup(), nStyle | eHoriz, ++ QStyle::SC_All, eActive ); ++ } ++ else ++ return FALSE; ++ ++ // Bitblt it to the screen ++ XCopyArea( dpy, ++ qPixmap.handle(), drawable, ++ gc, ++ 0, 0, qRect.width(), qRect.height(), ++ qWidgetPos.x(), qWidgetPos.y() ); ++ ++ // Restore widget's position ++ pWidget->move( qWidgetPos ); ++ ++ return TRUE; ++} ++ ++QPushButton *WidgetPainter::pushButton( const Region& rControlRegion, ++ BOOL bDefault ) ++{ ++ if ( !m_pPushButton ) ++ m_pPushButton = new QPushButton( NULL, "push_button" ); ++ ++ QRect qRect = region2QRect( rControlRegion ); ++ ++ // Workaround for broken styles which do not add ++ // QStyle::PM_ButtonDefaultIndicator to the size of the default button ++ // (for example Keramik) ++ // FIXME Fix Keramik style to be consistant with Qt built-in styles. Aargh! ++ if ( bDefault ) ++ { ++ QSize qContentsSize( 50, 50 ); ++ m_pPushButton->setDefault( false ); ++ QSize qNormalSize = kapp->style().sizeFromContents( QStyle::CT_PushButton, ++ m_pPushButton, qContentsSize ); ++ m_pPushButton->setDefault( true ); ++ QSize qDefSize = kapp->style().sizeFromContents( QStyle::CT_PushButton, ++ m_pPushButton, qContentsSize ); ++ ++ int nIndicatorSize = kapp->style().pixelMetric( ++ QStyle::PM_ButtonDefaultIndicator, m_pPushButton ); ++ if ( qNormalSize.width() == qDefSize.width() ) ++ qRect.addCoords( nIndicatorSize, 0, -nIndicatorSize, 0 ); ++ if ( qNormalSize.height() == qDefSize.height() ) ++ qRect.addCoords( 0, nIndicatorSize, 0, -nIndicatorSize ); ++ } ++ ++ m_pPushButton->move( qRect.topLeft() ); ++ m_pPushButton->resize( qRect.size() ); ++ m_pPushButton->setDefault( bDefault ); ++ ++ return m_pPushButton; ++} ++ ++QRadioButton *WidgetPainter::radioButton( const Region& rControlRegion ) ++{ ++ if ( !m_pRadioButton ) ++ m_pRadioButton = new QRadioButton( NULL, "radio_button" ); ++ ++ QRect qRect = region2QRect( rControlRegion ); ++ ++ // Workaround for broken themes which do not honor the given size. ++ // Quite ugly, but I do not know about a better solution. ++ const char *pStyleName = kapp->style().className(); ++ if ( strcmp( "KThemeStyle", pStyleName ) == 0 ) ++ { ++ QRect qOldRect( qRect ); ++ ++ qRect.setWidth( kapp->style().pixelMetric( ++ QStyle::PM_ExclusiveIndicatorWidth, m_pRadioButton ) ); ++ qRect.setHeight( kapp->style().pixelMetric( ++ QStyle::PM_ExclusiveIndicatorHeight, m_pRadioButton ) ); ++ ++ qRect.moveBy( ( qOldRect.width() - qRect.width() ) / 2, ++ ( qOldRect.height() - qRect.height() ) / 2 ); ++ } ++ ++ m_pRadioButton->move( qRect.topLeft() ); ++ m_pRadioButton->resize( qRect.size() ); ++ ++ return m_pRadioButton; ++} ++ ++QCheckBox *WidgetPainter::checkBox( const Region& rControlRegion ) ++{ ++ if ( !m_pCheckBox ) ++ m_pCheckBox = new QCheckBox( NULL, "check_box" ); ++ ++ QRect qRect = region2QRect( rControlRegion ); ++ ++ // Workaround for broken themes which do not honor the given size. ++ // Quite ugly, but I do not know about a better solution. ++ const char *pStyleName = kapp->style().className(); ++ if ( strcmp( "KThemeStyle", pStyleName ) == 0 ) ++ { ++ QRect qOldRect( qRect ); ++ ++ qRect.setWidth( kapp->style().pixelMetric( ++ QStyle::PM_IndicatorWidth, m_pCheckBox ) ); ++ qRect.setHeight( kapp->style().pixelMetric( ++ QStyle::PM_IndicatorHeight, m_pCheckBox ) ); ++ ++ qRect.moveBy( ( qOldRect.width() - qRect.width() ) / 2, ++ ( qOldRect.height() - qRect.height() ) / 2 ); ++ } ++ ++ m_pCheckBox->move( qRect.topLeft() ); ++ m_pCheckBox->resize( qRect.size() ); ++ ++ return m_pCheckBox; ++} ++ ++QComboBox *WidgetPainter::comboBox( const Region& rControlRegion, ++ BOOL bEditable ) ++{ ++ QComboBox *pComboBox = NULL; ++ if ( bEditable ) ++ { ++ if ( !m_pEditableComboBox ) ++ m_pEditableComboBox = new QComboBox( true, NULL, "combo_box_edit" ); ++ pComboBox = m_pEditableComboBox; ++ } ++ else ++ { ++ if ( !m_pComboBox ) ++ m_pComboBox = new QComboBox( false, NULL, "combo_box" ); ++ pComboBox = m_pComboBox; ++ } ++ ++ QRect qRect = region2QRect( rControlRegion ); ++ ++ pComboBox->move( qRect.topLeft() ); ++ pComboBox->resize( qRect.size() ); ++ ++ return pComboBox; ++} ++ ++QLineEdit *WidgetPainter::lineEdit( const Region& rControlRegion ) ++{ ++ if ( !m_pLineEdit ) ++ m_pLineEdit = new QLineEdit( NULL, "line_edit" ); ++ ++ QRect qRect = region2QRect( rControlRegion ); ++ ++ m_pLineEdit->move( qRect.topLeft() ); ++ m_pLineEdit->resize( qRect.size() ); ++ ++ return m_pLineEdit; ++} ++ ++QSpinWidget *WidgetPainter::spinWidget( const Region& rControlRegion ) ++{ ++ if ( !m_pSpinWidget ) ++ { ++ m_pSpinWidget = new QSpinWidget( NULL, "spin_widget" ); ++ ++ m_pSpinEdit = new QLineEdit( NULL, "line_edit_spin" ); ++ m_pSpinWidget->setEditWidget( m_pSpinEdit ); ++ } ++ ++ QRect qRect = region2QRect( rControlRegion ); ++ ++ m_pSpinWidget->move( qRect.topLeft() ); ++ m_pSpinWidget->resize( qRect.size() ); ++ m_pSpinWidget->arrange(); ++ ++ return m_pSpinWidget; ++} ++ ++QTabBar *WidgetPainter::tabBar( const Region& rControlRegion ) ++{ ++ if ( !m_pTabBar ) ++ { ++ if ( !m_pTabBarParent ) ++ m_pTabBarParent = new QWidget( NULL, "tab_bar_parent" ); ++ ++ m_pTabBar = new QTabBar( m_pTabBarParent, "tab_bar" ); ++ ++ m_pTabLeft = new QTab(); ++ m_pTabMiddle = new QTab(); ++ m_pTabRight = new QTab(); ++ m_pTabAlone = new QTab(); ++ ++ m_pTabBar->addTab( m_pTabLeft ); ++ m_pTabBar->addTab( m_pTabMiddle ); ++ m_pTabBar->addTab( m_pTabRight ); ++ } ++ ++ QRect qRect = region2QRect( rControlRegion ); ++ ++ m_pTabBar->move( qRect.topLeft() ); ++ m_pTabBar->resize( qRect.size() ); ++ ++ m_pTabBar->setShape( QTabBar::RoundedAbove ); ++ ++ return m_pTabBar; ++} ++ ++QTabWidget *WidgetPainter::tabWidget( const Region& rControlRegion ) ++{ ++ if ( !m_pTabWidget ) ++ m_pTabWidget = new QTabWidget( NULL, "tab_widget" ); ++ ++ QRect qRect = region2QRect( rControlRegion ); ++ --qRect.rTop(); ++ ++ m_pTabWidget->move( qRect.topLeft() ); ++ m_pTabWidget->resize( qRect.size() ); ++ ++ return m_pTabWidget; ++} ++ ++QListView *WidgetPainter::listView( const Region& rControlRegion ) ++{ ++ if ( !m_pListView ) ++ m_pListView = new QListView( NULL, "list_view" ); ++ ++ QRect qRect = region2QRect( rControlRegion ); ++ ++ m_pListView->move( qRect.topLeft() ); ++ m_pListView->resize( qRect.size() ); ++ ++ return m_pListView; ++} ++ ++QScrollBar *WidgetPainter::scrollBar( const Region& rControlRegion, ++ BOOL bHorizontal, const ImplControlValue& aValue ) ++{ ++ if ( !m_pScrollBar ) ++ { ++ m_pScrollBar = new QScrollBar( NULL, "scroll_bar" ); ++ m_pScrollBar->setTracking( false ); ++ m_pScrollBar->setLineStep( 1 ); ++ } ++ ++ QRect qRect = region2QRect( rControlRegion ); ++ ++ m_pScrollBar->move( qRect.topLeft() ); ++ m_pScrollBar->resize( qRect.size() ); ++ m_pScrollBar->setOrientation( bHorizontal? Qt::Horizontal: Qt::Vertical ); ++ ++ ScrollbarValue *pValue = static_cast<ScrollbarValue *> ( aValue.getOptionalVal() ); ++ if ( pValue ) ++ { ++ m_pScrollBar->setMinValue( pValue->mnMin ); ++ m_pScrollBar->setMaxValue( pValue->mnMax - pValue->mnVisibleSize ); ++ m_pScrollBar->setValue( pValue->mnCur ); ++ m_pScrollBar->setPageStep( pValue->mnVisibleSize ); ++ } ++ ++ return m_pScrollBar; ++} ++ ++QStyle::SFlags WidgetPainter::vclStateValue2SFlags( ControlState nState, ++ const ImplControlValue& aValue ) ++{ ++ QStyle::SFlags nStyle = ++ ( (nState & CTRL_STATE_DEFAULT)? QStyle::Style_ButtonDefault: QStyle::Style_Default ) | ++ ( (nState & CTRL_STATE_ENABLED)? QStyle::Style_Enabled: QStyle::Style_Default ) | ++ ( (nState & CTRL_STATE_FOCUSED)? QStyle::Style_HasFocus: QStyle::Style_Default ) | ++ ( (nState & CTRL_STATE_PRESSED)? QStyle::Style_Down: QStyle::Style_Raised ) | ++ ( (nState & CTRL_STATE_SELECTED)? QStyle::Style_Selected : QStyle::Style_Default ) | ++ ( (nState & CTRL_STATE_ROLLOVER)? QStyle::Style_MouseOver: QStyle::Style_Default ); ++ //TODO ( (nState & CTRL_STATE_HIDDEN)? QStyle::Style_: QStyle::Style_Default ) | ++ ++ switch ( aValue.getTristateVal() ) ++ { ++ case BUTTONVALUE_ON: nStyle |= QStyle::Style_On; break; ++ case BUTTONVALUE_OFF: nStyle |= QStyle::Style_Off; break; ++ case BUTTONVALUE_MIXED: nStyle |= QStyle::Style_NoChange; break; ++ } ++ ++ return nStyle; ++} ++ ++QRect WidgetPainter::region2QRect( const Region& rControlRegion ) ++{ ++ Rectangle aRect = rControlRegion.GetBoundRect(); ++ ++ return QRect( QPoint( aRect.Left(), aRect.Top() ), ++ QPoint( aRect.Right(), aRect.Bottom() ) ); ++} ++ ++/** Instance of WidgetPainter. ++ ++ It is used to paint the widgets requested by NWF. ++*/ ++static WidgetPainter widgetPainter; ++ ++ ++/** Initialization of KDE and local stuff. ++ ++ It creates an instance of KApplication. ++*/ ++void VCLInitNativeWidgets( void ) ++{ ++ KAboutData *kAboutData = new KAboutData( "OpenOffice.org", ++ I18N_NOOP( "OpenOffice.org" ), ++ "1.1.0", ++ I18N_NOOP( "OpenOffice.org with KDE Native Widget Support." ), ++ KAboutData::License_LGPL, ++ "(c) 2003, Jan Holesovsky", ++ I18N_NOOP( "OpenOffice.org is an office suite.\n" ), ++ "http://kde.openoffice.org/index.html", ++ "dev@kde.openoffice.org"); ++ kAboutData->addAuthor( "Jan Holesovsky", ++ I18N_NOOP( "Original author and maintainer of the KDE NWF." ), ++ "kendy@artax.karlin.mff.cuni.cz", ++ "http://artax.karlin.mff.cuni.cz/~kendy" ); ++ ++ // We ignore the arguments, KApplication has to be initialized according ++ // to the OOo's display. ++ int argc = 0; ++ char *argv[20] = { "soffice.bin", 0 }; ++ KCmdLineArgs::init( argc, argv, kAboutData ); ++ ++ // Get display ++ SalDisplay *pSalDisplay = GetSalData()->GetCurDisp(); ++ if ( !pSalDisplay ) ++ ::std::cerr << "Cannot get current display!" << ::std::endl; ++ else ++ new KApplication( pSalDisplay->GetDisplay(), argc, argv, "soffice.bin" ); ++} ++ ++/** Release KDE and local stuff ++ ++ No operation for KDE. ++*/ ++void VCLDeinitNativeWidgets( void ) ++{ ++} ++ ++/** What widgets can be drawn the native way. ++ ++ @param nType ++ Type of the widget. ++ ++ @param nPart ++ Specification of the widget's part if it consists of more than one. ++ ++ @return TRUE if the platform supports native drawing of the widget nType ++ defined by nPart. ++*/ ++BOOL SalGraphics::IsNativeControlSupported( ControlType nType, ControlPart nPart ) ++{ ++ return ++ ( (nType == CTRL_PUSHBUTTON) && (nPart == PART_ENTIRE_CONTROL) ) || ++ ( (nType == CTRL_RADIOBUTTON) && (nPart == PART_ENTIRE_CONTROL) ) || ++ ( (nType == CTRL_CHECKBOX) && (nPart == PART_ENTIRE_CONTROL) ) || ++ ( (nType == CTRL_COMBOBOX) && (nPart == PART_ENTIRE_CONTROL || nPart == HAS_BACKGROUND_TEXTURE) ) || ++ ( (nType == CTRL_EDITBOX) && (nPart == PART_ENTIRE_CONTROL || nPart == HAS_BACKGROUND_TEXTURE) ) || ++ ( (nType == CTRL_LISTBOX) && (nPart == PART_ENTIRE_CONTROL || nPart == PART_WINDOW) ) || ++ ( (nType == CTRL_SPINBOX) && (nPart == PART_ENTIRE_CONTROL || nPart == HAS_BACKGROUND_TEXTURE) ) || ++ // no CTRL_SPINBUTTONS for KDE ++ ( (nType == CTRL_TAB_ITEM) && (nPart == PART_ENTIRE_CONTROL) ) || ++ ( (nType == CTRL_TAB_PANE) && (nPart == PART_ENTIRE_CONTROL) ) || ++ // no CTRL_TAB_BODY for KDE ++ ( (nType == CTRL_SCROLLBAR) && (nPart == PART_ENTIRE_CONTROL || nPart == PART_DRAW_BACKGROUND_HORZ || nPart == PART_DRAW_BACKGROUND_VERT) ) || ++ ( (nType == CTRL_SCROLLBAR) && (nPart == HAS_THREE_BUTTONS) ); // TODO small optimization is possible here: return this only if the style really has 3 buttons ++ // CTRL_GROUPBOX not supported ++ // CTRL_FIXEDLINE not supported ++ // CTRL_FIXEDBORDER not supported ++} ++ ++ ++/** Test whether the position is in the native widget. ++ ++ If the return value is TRUE, bIsInside contains information whether ++ aPos was or was not inside the native widget specified by the ++ nType/nPart combination. ++*/ ++BOOL SalGraphics::HitTestNativeControl( ControlType nType, ControlPart nPart, ++ const Region& rControlRegion, const Point& aPos, ++ SalControlHandle& rControlHandle, BOOL& rIsInside, ++ const OutputDevice* ) ++{ ++ if ( nType == CTRL_SCROLLBAR ) ++ { ++ rIsInside = FALSE; ++ ++ BOOL bHorizontal = ( nPart == PART_BUTTON_LEFT || nPart == PART_BUTTON_RIGHT ); ++ ++ QScrollBar *pScrollBar = widgetPainter.scrollBar( rControlRegion, ++ bHorizontal, ImplControlValue() ); ++ QRect qRectSubLine = kapp->style().querySubControlMetrics( ++ QStyle::CC_ScrollBar, pScrollBar, QStyle::SC_ScrollBarSubLine ); ++ QRect qRectAddLine = kapp->style().querySubControlMetrics( ++ QStyle::CC_ScrollBar, pScrollBar, QStyle::SC_ScrollBarAddLine ); ++ ++ // There are 2 buttons on the right/bottom side of the scrollbar ++ BOOL bTwoSubButtons = FALSE; ++ ++ // It is a Platinum style scroll bar ++ BOOL bPlatinumStyle = FALSE; ++ ++ // Workaround for Platinum and 3 button style scroll bars. ++ // It makes the right/down button bigger. ++ if ( bHorizontal ) ++ { ++ qRectAddLine.setLeft( kapp->style().querySubControlMetrics( ++ QStyle::CC_ScrollBar, pScrollBar, ++ QStyle::SC_ScrollBarAddPage ).right() + 1 ); ++ if ( qRectAddLine.width() > qRectSubLine.width() ) ++ bTwoSubButtons = TRUE; ++ if ( qRectSubLine.left() > kapp->style().querySubControlMetrics( QStyle::CC_ScrollBar, pScrollBar, QStyle::SC_ScrollBarSubPage ).left() ) ++ bPlatinumStyle = TRUE; ++ } ++ else ++ { ++ qRectAddLine.setTop( kapp->style().querySubControlMetrics( ++ QStyle::CC_ScrollBar, pScrollBar, ++ QStyle::SC_ScrollBarAddPage ).bottom() + 1 ); ++ if ( qRectAddLine.height() > qRectSubLine.height() ) ++ bTwoSubButtons = TRUE; ++ if ( qRectSubLine.top() > kapp->style().querySubControlMetrics( QStyle::CC_ScrollBar, pScrollBar, QStyle::SC_ScrollBarSubPage ).top() ) ++ bPlatinumStyle = TRUE; ++ } ++ ++ switch ( nPart ) ++ { ++ case PART_BUTTON_LEFT: ++ if ( !bPlatinumStyle && qRectSubLine.contains( aPos.getX(), aPos.getY() ) ) ++ rIsInside = TRUE; ++ else if ( bTwoSubButtons ) ++ { ++ qRectAddLine.setWidth( qRectAddLine.width() / 2 ); ++ rIsInside = qRectAddLine.contains( aPos.getX(), aPos.getY() ); ++ } ++ break; ++ ++ case PART_BUTTON_UP: ++ if ( !bPlatinumStyle && qRectSubLine.contains( aPos.getX(), aPos.getY() ) ) ++ rIsInside = TRUE; ++ else if ( bTwoSubButtons ) ++ { ++ qRectAddLine.setHeight( qRectAddLine.height() / 2 ); ++ rIsInside = qRectAddLine.contains( aPos.getX(), aPos.getY() ); ++ } ++ break; ++ ++ case PART_BUTTON_RIGHT: ++ if ( bTwoSubButtons ) ++ qRectAddLine.setLeft( qRectAddLine.left() + qRectAddLine.width() / 2 ); ++ ++ rIsInside = qRectAddLine.contains( aPos.getX(), aPos.getY() ); ++ break; ++ ++ case PART_BUTTON_DOWN: ++ if ( bTwoSubButtons ) ++ qRectAddLine.setTop( qRectAddLine.top() + qRectAddLine.height() / 2 ); ++ ++ rIsInside = qRectAddLine.contains( aPos.getX(), aPos.getY() ); ++ break; ++ } ++ ++ return TRUE; ++ } ++ ++ return FALSE; ++} ++ ++ ++/** Draw the requested control described by nPart/nState. ++ ++ @param rControlRegion ++ The bounding region of the complete control in VCL frame coordinates. ++ ++ @param aValue ++ An optional value (tristate/numerical/string). ++ ++ @param rControlHandle ++ Carries platform dependent data and is maintained by the SalFrame implementation. ++ ++ @param aCaption ++ A caption or title string (like button text etc.) ++*/ ++BOOL SalGraphics::DrawNativeControl( ControlType nType, ControlPart nPart, ++ const Region& rControlRegion, ControlState nState, ++ const ImplControlValue& aValue, SalControlHandle& rControlHandle, ++ OUString aCaption, const OutputDevice* ) ++{ ++ BOOL bReturn = FALSE; ++ ++ Display *dpy = maGraphicsData.GetXDisplay(); ++ XLIB_Window drawable = maGraphicsData.GetDrawable(); ++ GC gc = maGraphicsData.SelectFont(); // GC with current clipping region set ++ ++ if ( (nType == CTRL_PUSHBUTTON) && (nPart == PART_ENTIRE_CONTROL) ) ++ { ++ bReturn = widgetPainter.drawStyledWidget( ++ widgetPainter.pushButton( rControlRegion, (nState & CTRL_STATE_DEFAULT) ), ++ nState, aValue, ++ dpy, drawable, gc ); ++ } ++ else if ( (nType == CTRL_RADIOBUTTON) && (nPart == PART_ENTIRE_CONTROL) ) ++ { ++ bReturn = widgetPainter.drawStyledWidget( ++ widgetPainter.radioButton( rControlRegion ), ++ nState, aValue, ++ dpy, drawable, gc ); ++ } ++ else if ( (nType == CTRL_CHECKBOX) && (nPart == PART_ENTIRE_CONTROL) ) ++ { ++ bReturn = widgetPainter.drawStyledWidget( ++ widgetPainter.checkBox( rControlRegion ), ++ nState, aValue, ++ dpy, drawable, gc ); ++ } ++ else if ( (nType == CTRL_COMBOBOX) && (nPart == PART_ENTIRE_CONTROL) ) ++ { ++ bReturn = widgetPainter.drawStyledWidget( ++ widgetPainter.comboBox( rControlRegion, TRUE ), ++ nState, aValue, ++ dpy, drawable, gc ); ++ } ++ else if ( (nType == CTRL_EDITBOX) && (nPart == PART_ENTIRE_CONTROL) ) ++ { ++ bReturn = widgetPainter.drawStyledWidget( ++ widgetPainter.lineEdit( rControlRegion ), ++ nState, aValue, ++ dpy, drawable, gc ); ++ } ++ else if ( (nType == CTRL_LISTBOX) && (nPart == PART_ENTIRE_CONTROL) ) ++ { ++ bReturn = widgetPainter.drawStyledWidget( ++ widgetPainter.comboBox( rControlRegion, FALSE ), ++ nState, aValue, ++ dpy, drawable, gc ); ++ } ++ else if ( (nType == CTRL_LISTBOX) && (nPart == PART_WINDOW) ) ++ { ++ bReturn = widgetPainter.drawStyledWidget( ++ widgetPainter.listView( rControlRegion ), ++ nState, aValue, ++ dpy, drawable, gc ); ++ } ++ else if ( (nType == CTRL_SPINBOX) && (nPart == PART_ENTIRE_CONTROL) ) ++ { ++ bReturn = widgetPainter.drawStyledWidget( ++ widgetPainter.spinWidget( rControlRegion ), ++ nState, aValue, ++ dpy, drawable, gc ); ++ } ++ else if ( (nType==CTRL_TAB_ITEM) && (nPart == PART_ENTIRE_CONTROL) ) ++ { ++ bReturn = widgetPainter.drawStyledWidget( ++ widgetPainter.tabBar( rControlRegion ), ++ nState, aValue, ++ dpy, drawable, gc ); ++ } ++ else if ( (nType==CTRL_TAB_PANE) && (nPart == PART_ENTIRE_CONTROL) ) ++ { ++ bReturn = widgetPainter.drawStyledWidget( ++ widgetPainter.tabWidget( rControlRegion ), ++ nState, aValue, ++ dpy, drawable, gc ); ++ } ++ else if ( (nType == CTRL_SCROLLBAR) && (nPart == PART_DRAW_BACKGROUND_HORZ || nPart == PART_DRAW_BACKGROUND_VERT) ) ++ { ++ bReturn = widgetPainter.drawStyledWidget( ++ widgetPainter.scrollBar( rControlRegion, nPart == PART_DRAW_BACKGROUND_HORZ, aValue ), ++ nState, aValue, ++ dpy, drawable, gc ); ++ } ++ ++ return bReturn; ++} ++ ++ ++/** Draw text on the widget. ++ ++ OPTIONAL. Draws the requested text for the control described by nPart/nState. ++ Used if text is not drawn by DrawNativeControl(). ++ ++ @param rControlRegion ++ The bounding region of the complete control in VCL frame coordinates. ++ ++ @param aValue ++ An optional value (tristate/numerical/string) ++ ++ @param rControlHandle ++ Carries platform dependent data and is maintained by the SalFrame implementation. ++ ++ @param aCaption ++ A caption or title string (like button text etc.) ++*/ ++BOOL SalGraphics::DrawNativeControlText( ControlType nType, ControlPart nPart, ++ const Region& rControlRegion, ControlState nState, ++ const ImplControlValue& aValue, SalControlHandle& rControlHandle, ++ OUString aCaption, const OutputDevice* ) ++{ ++ return FALSE; ++} ++ ++/** Check if the bounding regions match. ++ ++ If the return value is TRUE, rNativeBoundingRegion ++ contains the true bounding region covered by the control ++ including any adornment, while rNativeContentRegion contains the area ++ within the control that can be safely drawn into without drawing over ++ the borders of the control. ++ ++ @param rControlRegion ++ The bounding region of the control in VCL frame coordinates. ++ ++ @param aValue ++ An optional value (tristate/numerical/string) ++ ++ @param rControlHandle ++ Carries platform dependent data and is maintained by the SalFrame implementation. ++ ++ @param aCaption ++ A caption or title string (like button text etc.) ++*/ ++BOOL SalGraphics::GetNativeControlRegion( ControlType nType, ControlPart nPart, ++ const Region& rControlRegion, ControlState nState, ++ const ImplControlValue& aValue, SalControlHandle& rControlHandle, ++ OUString aCaption, ++ Region &rNativeBoundingRegion, Region &rNativeContentRegion, ++ const OutputDevice* ) ++{ ++ BOOL bReturn = FALSE; ++ QRect qBoundingRect = WidgetPainter::region2QRect( rControlRegion ); ++ QRect qRect; ++ ++ QWidget *pWidget = NULL; ++ switch ( nType ) ++ { ++ // Metrics of the push button ++ case CTRL_PUSHBUTTON: ++ pWidget = widgetPainter.pushButton( rControlRegion, ( nState & CTRL_STATE_DEFAULT ) ); ++ ++ switch ( nPart ) ++ { ++ case PART_ENTIRE_CONTROL: ++ qRect = qBoundingRect; ++ ++ if ( nState & CTRL_STATE_DEFAULT ) ++ { ++ int nIndicatorSize = kapp->style().pixelMetric( ++ QStyle::PM_ButtonDefaultIndicator, pWidget ); ++ qBoundingRect.addCoords( -nIndicatorSize, -nIndicatorSize, ++ nIndicatorSize, nIndicatorSize ); ++ bReturn = TRUE; ++ } ++ break; ++ } ++ break; ++ ++ // Metrics of the combo box ++ case CTRL_COMBOBOX: ++ case CTRL_LISTBOX: ++ pWidget = widgetPainter.comboBox( rControlRegion, ( nType == CTRL_COMBOBOX ) ); ++ switch ( nPart ) ++ { ++ case PART_BUTTON_DOWN: ++ qRect = kapp->style().querySubControlMetrics( ++ QStyle::CC_ComboBox, pWidget, QStyle::SC_ComboBoxArrow ); ++ qRect.setLeft( kapp->style().querySubControlMetrics( ++ QStyle::CC_ComboBox, pWidget, ++ QStyle::SC_ComboBoxEditField ).right() + 1 ); ++ bReturn = TRUE; ++ break; ++ ++ case PART_SUB_EDIT: ++ qRect = kapp->style().querySubControlMetrics( ++ QStyle::CC_ComboBox, pWidget, QStyle::SC_ComboBoxEditField ); ++ bReturn = TRUE; ++ break; ++ } ++ break; ++ ++ // Metrics of the spin box ++ case CTRL_SPINBOX: ++ pWidget = widgetPainter.spinWidget( rControlRegion ); ++ switch ( nPart ) ++ { ++ case PART_BUTTON_UP: ++ qRect = kapp->style().querySubControlMetrics( ++ QStyle::CC_SpinWidget, pWidget, QStyle::SC_SpinWidgetUp ); ++ bReturn = TRUE; ++ break; ++ ++ case PART_BUTTON_DOWN: ++ qRect = kapp->style().querySubControlMetrics( ++ QStyle::CC_SpinWidget, pWidget, QStyle::SC_SpinWidgetDown ); ++ bReturn = TRUE; ++ break; ++ } ++ break; ++ ++ // Metrics of the scroll bar ++ case CTRL_SCROLLBAR: ++ pWidget = widgetPainter.scrollBar( rControlRegion, ++ ( nPart == PART_BUTTON_LEFT || nPart == PART_BUTTON_RIGHT ), ++ ImplControlValue() ); ++ switch ( nPart ) ++ { ++ case PART_BUTTON_LEFT: ++ case PART_BUTTON_UP: ++ qRect = kapp->style().querySubControlMetrics( ++ QStyle::CC_ScrollBar, pWidget, QStyle::SC_ScrollBarSubLine ); ++ ++ // Workaround for Platinum style scroll bars. It makes the ++ // left/up button invisible. ++ if ( nPart == PART_BUTTON_LEFT ) ++ { ++ if ( qRect.left() > kapp->style().querySubControlMetrics( ++ QStyle::CC_ScrollBar, pWidget, ++ QStyle::SC_ScrollBarSubPage ).left() ) ++ { ++ qRect.setLeft( 0 ); ++ qRect.setRight( 0 ); ++ } ++ } ++ else ++ { ++ if ( qRect.top() > kapp->style().querySubControlMetrics( ++ QStyle::CC_ScrollBar, pWidget, ++ QStyle::SC_ScrollBarSubPage ).top() ) ++ { ++ qRect.setTop( 0 ); ++ qRect.setBottom( 0 ); ++ } ++ } ++ ++ bReturn = TRUE; ++ break; ++ ++ case PART_BUTTON_RIGHT: ++ case PART_BUTTON_DOWN: ++ qRect = kapp->style().querySubControlMetrics( ++ QStyle::CC_ScrollBar, pWidget, QStyle::SC_ScrollBarAddLine ); ++ ++ // Workaround for Platinum and 3 button style scroll bars. ++ // It makes the right/down button bigger. ++ if ( nPart == PART_BUTTON_RIGHT ) ++ qRect.setLeft( kapp->style().querySubControlMetrics( ++ QStyle::CC_ScrollBar, pWidget, ++ QStyle::SC_ScrollBarAddPage ).right() + 1 ); ++ else ++ qRect.setTop( kapp->style().querySubControlMetrics( ++ QStyle::CC_ScrollBar, pWidget, ++ QStyle::SC_ScrollBarAddPage ).bottom() + 1 ); ++ ++ bReturn = TRUE; ++ break; ++ } ++ } ++ ++ // Fill rNativeBoundingRegion and rNativeContentRegion ++ if ( bReturn ) ++ { ++ // Bounding region ++ Point aBPoint( qBoundingRect.x(), qBoundingRect.y() ); ++ Size aBSize( qBoundingRect.width(), qBoundingRect.height() ); ++ rNativeBoundingRegion = Region( Rectangle( aBPoint, aBSize ) ); ++ ++ // Region of the content ++ Point aPoint( qRect.x(), qRect.y() ); ++ Size aSize( qRect.width(), qRect.height() ); ++ rNativeContentRegion = Region( Rectangle( aPoint, aSize ) ); ++ } ++ ++ return bReturn; ++} ++ ++/** Constructor. ++*/ ++SalControlHandleData::SalControlHandleData( void ) ++{ ++} ++ ++/** Destructor. ++*/ ++SalControlHandleData::~SalControlHandleData( void ) ++{ ++} ++ ++// ----------------------------------------------------------------------- ++// KDEIntegrator implementation ++// ----------------------------------------------------------------------- ++ ++/** Constructor of the KDE integrator. ++*/ ++KDEIntegrator::KDEIntegrator( SalFrame* pFrame ) : ++ DtIntegrator( pFrame ) ++{ ++ meType = DtKDE; ++} ++ ++/** Destructor of the KDE integrator. ++*/ ++KDEIntegrator::~KDEIntegrator() ++{ ++} ++ ++/** Helper function to convert colors. ++*/ ++Color toColor( const QColor &rColor ) ++{ ++ return Color( rColor.red(), rColor.green(), rColor.blue() ); ++} ++ ++/** Helper function to read color from KConfig configuration repository. ++*/ ++Color readColor( KConfig *pConfig, const char *pKey ) ++{ ++ return toColor( pConfig->readColorEntry( pKey ) ); ++} ++ ++/** Helper function to add information to Font from QFont. ++*/ ++void modifyFont( Font &rFont, const QFont &rQFont ) ++{ ++ QFontInfo qFontInfo( rQFont ); ++ ++ rFont.SetName( String( qFontInfo.family().utf8(), RTL_TEXTENCODING_UTF8 ) ); ++ ++ // Do not set the height, it does not look good ++ // rFont.SetHeight( qFontInfo.pointSize() ); ++ ++ rFont.SetItalic( qFontInfo.italic()? ITALIC_NORMAL: ITALIC_NONE ); ++ ++ FontWeight eWeight = WEIGHT_DONTKNOW; ++ int nWeight = qFontInfo.weight(); ++ if ( nWeight <= QFont::Light ) ++ eWeight = WEIGHT_LIGHT; ++ else if ( nWeight <= QFont::Normal ) ++ eWeight = WEIGHT_NORMAL; ++ else if ( nWeight <= QFont::DemiBold ) ++ eWeight = WEIGHT_SEMIBOLD; ++ else if ( nWeight <= QFont::Bold ) ++ eWeight = WEIGHT_BOLD; ++ else ++ eWeight = WEIGHT_BLACK; ++ rFont.SetWeight( eWeight ); ++} ++ ++/** Implementation of KDE integration's main method. ++*/ ++void KDEIntegrator::GetSystemLook( AllSettings& rSettings ) ++{ ++ StyleSettings aStyleSettings( rSettings.GetStyleSettings() ); ++ ++ // WM settings ++ KConfig *pConfig = KGlobal::config(); ++ if ( pConfig ) ++ { ++ pConfig->setGroup( "WM" ); ++ const char *pKey; ++ ++ pKey = "activeBackground"; ++ if ( pConfig->hasKey( pKey ) ) ++ aStyleSettings.SetActiveColor( readColor( pConfig, pKey ) ); ++ ++ pKey = "activeBlend"; ++ if ( pConfig->hasKey( pKey ) ) ++ aStyleSettings.SetActiveColor2( readColor( pConfig, pKey ) ); ++ ++ pKey = "inactiveBackground"; ++ if ( pConfig->hasKey( pKey ) ) ++ aStyleSettings.SetDeactiveColor( readColor( pConfig, pKey ) ); ++ ++ pKey = "inactiveBlend"; ++ if ( pConfig->hasKey( pKey ) ) ++ aStyleSettings.SetDeactiveColor2( readColor( pConfig, pKey ) ); ++ ++ pKey = "inactiveForeground"; ++ if ( pConfig->hasKey( pKey ) ) ++ aStyleSettings.SetDeactiveTextColor( readColor( pConfig, pKey ) ); ++ ++ pKey = "activeForeground"; ++ if ( pConfig->hasKey( pKey ) ) ++ aStyleSettings.SetActiveTextColor( readColor( pConfig, pKey ) ); ++ ++ pKey = "titleFont"; ++ if ( pConfig->hasKey( pKey ) ) ++ { ++ Font aFont= aStyleSettings.GetTitleFont(); ++ modifyFont( aFont, pConfig->readFontEntry( pKey ) ); ++ aStyleSettings.SetTitleFont( aFont ); ++ } ++ } ++ ++ // General settings ++ QColorGroup qColorGroup = kapp->palette().active(); ++ ++ // Foreground ++ Color aFore = toColor( qColorGroup.foreground() ); ++ aStyleSettings.SetRadioCheckTextColor( aFore ); ++ aStyleSettings.SetLabelTextColor( aFore ); ++ aStyleSettings.SetInfoTextColor( aFore ); ++ aStyleSettings.SetDialogTextColor( aFore ); ++ aStyleSettings.SetGroupTextColor( aFore ); ++ ++ // Input boxes, list boxes ++ aStyleSettings.SetFieldColor( toColor( qColorGroup.base() ) ); ++ aStyleSettings.SetFieldTextColor( toColor( qColorGroup.text() ) ); ++ ++ // Buttons ++ aStyleSettings.SetButtonTextColor( toColor( qColorGroup.buttonText() ) ); ++ ++ // Disable color ++ aStyleSettings.SetDisableColor( toColor( qColorGroup.mid() ) ); ++ ++ // Background ++ Color aBack = toColor( qColorGroup.background() ); ++ aStyleSettings.Set3DColors( aBack ); ++ aStyleSettings.SetFaceColor( aBack ); ++ aStyleSettings.SetDialogColor( aBack ); ++ if( aBack == COL_LIGHTGRAY ) ++ aStyleSettings.SetCheckedColor( Color( 0xCC, 0xCC, 0xCC ) ); ++ else ++ { ++ Color aColor2 = aStyleSettings.GetLightColor(); ++ aStyleSettings. ++ SetCheckedColor( Color( (BYTE)(((USHORT)aBack.GetRed()+(USHORT)aColor2.GetRed())/2), ++ (BYTE)(((USHORT)aBack.GetGreen()+(USHORT)aColor2.GetGreen())/2), ++ (BYTE)(((USHORT)aBack.GetBlue()+(USHORT)aColor2.GetBlue())/2) ++ ) ); ++ } ++ ++ // Selection ++ aStyleSettings.SetHighlightColor( toColor( qColorGroup.highlight() ) ); ++ aStyleSettings.SetHighlightTextColor( toColor( qColorGroup.highlightedText() ) ); ++ ++ // Font ++ Font aFont= aStyleSettings.GetAppFont(); ++ modifyFont( aFont, kapp->font() ); ++ ++ aStyleSettings.SetAppFont( aFont ); ++ aStyleSettings.SetHelpFont( aFont ); ++ aStyleSettings.SetMenuFont( aFont ); // will be changed according to pMenuBar ++ aStyleSettings.SetToolFont( aFont ); // will be changed according to pToolBar ++ aStyleSettings.SetLabelFont( aFont ); ++ aStyleSettings.SetInfoFont( aFont ); ++ aStyleSettings.SetRadioCheckFont( aFont ); ++ aStyleSettings.SetPushButtonFont( aFont ); ++ aStyleSettings.SetFieldFont( aFont ); ++ aStyleSettings.SetIconFont( aFont ); ++ aStyleSettings.SetGroupFont( aFont ); ++ ++ // Menu ++ KMainWindow qMainWindow; ++ qMainWindow.createGUI(); ++ ++ KMenuBar *pMenuBar = qMainWindow.menuBar(); ++ if ( pMenuBar ) ++ { ++ // Color ++ QColorGroup qMenuCG = pMenuBar->colorGroup(); ++ aStyleSettings.SetMenuTextColor( toColor( qMenuCG.buttonText() ) ); ++ aStyleSettings.SetMenuColor( toColor( qMenuCG.button() ) ); ++ aStyleSettings.SetMenuBarColor( toColor( qMenuCG.button() ) ); ++ aStyleSettings.SetMenuHighlightColor( toColor ( qMenuCG.highlight() ) ); ++ aStyleSettings.SetMenuHighlightTextColor( toColor ( qMenuCG.highlightedText() ) ); ++ ++ // Font ++ Font aFont= aStyleSettings.GetMenuFont(); ++ modifyFont( aFont, pMenuBar->font() ); ++ aStyleSettings.SetMenuFont( aFont ); ++ } ++ ++ // Tool bar ++ KToolBar *pToolBar = qMainWindow.toolBar(); ++ if ( pToolBar ) ++ { ++ Font aFont= aStyleSettings.GetToolFont(); ++ modifyFont( aFont, pToolBar->font() ); ++ aStyleSettings.SetToolFont( aFont ); ++ } ++ ++ // Scroll bar size ++ aStyleSettings.SetScrollBarSize( kapp->style().pixelMetric( QStyle::PM_ScrollBarExtent ) ); ++ ++ rSettings.SetStyleSettings( aStyleSettings ); ++} ++ ++/* vim: set tabstop=8 shiftwidth=4: */ +Index: vcl/unx/source/gdi/salogl.cxx +=================================================================== +RCS file: /cvs/gsl/vcl/unx/source/gdi/salogl.cxx,v +retrieving revision 1.7 +retrieving revision 1.11 +diff -u -p -u -r1.7 -r1.11 +--- vcl/unx/source/gdi/salogl.cxx 15 Apr 2003 16:10:05 -0000 1.7 ++++ vcl/unx/source/gdi/salogl.cxx 10 May 2004 15:59:38 -0000 1.11 +@@ -59,8 +59,6 @@ + * + ************************************************************************/ + +-#define _SV_SALOGL_CXX +- + #include <salunx.h> + + #ifndef _SV_SALDATA_HXX +@@ -71,18 +69,20 @@ + #include <saldisp.hxx> + #endif + +-#ifndef _SV_SALOGL_HXX +-#include <salogl.hxx> ++#ifndef _SV_SALOGL_H ++#include <salogl.h> + #endif + +-#ifndef _SV_SALGDI_HXX +-#include <salgdi.hxx> ++#ifndef _SV_SALGDI_H ++#include <salgdi.h> + #endif + + #include <stdlib.h> + #include <stdio.h> + #include <string.h> + ++using namespace rtl; ++ + // ------------ + // - Lib-Name - + // ------------ +@@ -97,55 +97,53 @@ + // - Macros - + // ---------- + +-// NetBSD has neither RTLD_GLOBAL nor RTLD_NOW +-#if defined NETBSD +-#define DLOPEN_MODE 0 +-#else +-#define DLOPEN_MODE (RTLD_NOW | RTLD_GLOBAL) +-#endif +- +- + // ----------------- + // - Statics init. - + // ----------------- + + // Members +-GLXContext SalOpenGL::maGLXContext = 0; +-Display* SalOpenGL::mpDisplay = 0; +-XVisualInfo* SalOpenGL::mpVisualInfo = 0; +-BOOL SalOpenGL::mbHaveGLVisual = FALSE; +- +-void * SalOpenGL::mpGLLib = 0; +-ULONG SalOpenGL::mnOGLState = OGL_STATE_UNLOADED; +- +-GLXContext (*SalOpenGL::pCreateContext)( Display *, XVisualInfo *, GLXContext, Bool ) = 0; +-void (*SalOpenGL::pDestroyContext)( Display *, GLXContext ) = 0; +-GLXContext (*SalOpenGL::pGetCurrentContext)( ) = 0; +-Bool (*SalOpenGL::pMakeCurrent)( Display *, GLXDrawable, GLXContext ) = 0; +-void (*SalOpenGL::pSwapBuffers)( Display*, GLXDrawable ) = 0; +-int (*SalOpenGL::pGetConfig)( Display*, XVisualInfo*, int, int* ) = 0; +-void (*SalOpenGL::pFlush)() = 0; ++GLXContext X11SalOpenGL::maGLXContext = 0; ++Display* X11SalOpenGL::mpDisplay = 0; ++XVisualInfo* X11SalOpenGL::mpVisualInfo = 0; ++BOOL X11SalOpenGL::mbHaveGLVisual = FALSE; ++ ++#ifdef MACOSX ++oslModule X11SalOpenGL::mpGLLib = 0; ++#else ++void * X11SalOpenGL::mpGLLib = 0; ++#endif ++ ++ULONG X11SalOpenGL::mnOGLState = OGL_STATE_UNLOADED; ++ ++GLXContext (*X11SalOpenGL::pCreateContext)( Display *, XVisualInfo *, GLXContext, Bool ) = 0; ++void (*X11SalOpenGL::pDestroyContext)( Display *, GLXContext ) = 0; ++GLXContext (*X11SalOpenGL::pGetCurrentContext)( ) = 0; ++Bool (*X11SalOpenGL::pMakeCurrent)( Display *, GLXDrawable, GLXContext ) = 0; ++void (*X11SalOpenGL::pSwapBuffers)( Display*, GLXDrawable ) = 0; ++int (*X11SalOpenGL::pGetConfig)( Display*, XVisualInfo*, int, int* ) = 0; ++void (*X11SalOpenGL::pFlush)() = 0; + + // ------------- +-// - SalOpenGL - ++// - X11SalOpenGL - + // ------------- + +-SalOpenGL::SalOpenGL( SalGraphics* pGraphics ) ++X11SalOpenGL::X11SalOpenGL( SalGraphics* pSGraphics ) + { +- mpDisplay = pGraphics->maGraphicsData.GetXDisplay(); +- mpVisualInfo = pGraphics->maGraphicsData.GetDisplay()->GetVisual(); +- maDrawable = pGraphics->maGraphicsData.GetDrawable(); ++ X11SalGraphics* pGraphics = static_cast<X11SalGraphics*>(pSGraphics); ++ mpDisplay = pGraphics->GetXDisplay(); ++ mpVisualInfo = pGraphics->GetDisplay()->GetVisual(); ++ maDrawable = pGraphics->GetDrawable(); + } + + // ------------------------------------------------------------------------ + +-SalOpenGL::~SalOpenGL() ++X11SalOpenGL::~X11SalOpenGL() + { + } + + // ------------------------------------------------------------------------ + +-BOOL SalOpenGL::Create() ++bool X11SalOpenGL::IsValid() + { + if( OGL_STATE_UNLOADED == mnOGLState ) + { +@@ -205,7 +203,7 @@ BOOL SalOpenGL::Create() + GLX_DOUBLEBUFFER, &nDoubleBuffer ); + if( nHaveGL && ! nDoubleBuffer ) + { +- SalDisplay* pSalDisplay = GetSalData()->GetDefDisp(); ++ SalDisplay* pSalDisplay = GetSalData()->GetDisplay(); + BOOL bPreviousState = + pSalDisplay->GetXLib()->GetIgnoreXErrors(); + pSalDisplay->GetXLib()->SetIgnoreXErrors( TRUE ); +@@ -244,36 +242,23 @@ BOOL SalOpenGL::Create() + + // ------------------------------------------------------------------------ + +-void SalOpenGL::Release() ++void X11SalOpenGL::Release() + { + ImplFreeLib(); + } + + // ------------------------------------------------------------------------ + +-void* SalOpenGL::GetOGLFnc( const String& rFncName ) ++void* X11SalOpenGL::GetOGLFnc( const char *pFncName ) + { +- if( mpGLLib ) +- { +- return dlsym( mpGLLib, ByteString( rFncName, RTL_TEXTENCODING_ASCII_US ).GetBuffer() ); +- } +- return NULL; +-} +- +-void* SalOpenGL::GetOGLFnc( char *pFncName ) +-{ +- if( mpGLLib ) +- { +- return dlsym( mpGLLib, pFncName ); +- } +- return NULL; ++ return resolveSymbol( pFncName ); + } + + // ------------------------------------------------------------------------ + +-void SalOpenGL::OGLEntry( SalGraphics* pGraphics ) ++void X11SalOpenGL::OGLEntry( SalGraphics* pGraphics ) + { +- GLXDrawable aDrawable = pGraphics->maGraphicsData.GetDrawable(); ++ GLXDrawable aDrawable = static_cast<X11SalGraphics*>(pGraphics)->GetDrawable(); + if( aDrawable != maDrawable ) + { + maDrawable = aDrawable; +@@ -283,19 +268,23 @@ void SalOpenGL::OGLEntry( SalGraphics* p + + // ------------------------------------------------------------------------ + +-void SalOpenGL::OGLExit( SalGraphics* pGraphics ) ++void X11SalOpenGL::OGLExit( SalGraphics* pGraphics ) + { + } + + // ------------------------------------------------------------------------ + +-void SalOpenGL::ImplFreeLib() ++void X11SalOpenGL::ImplFreeLib() + { + if( mpGLLib ) + { + if( maGLXContext && pDestroyContext ) + pDestroyContext( mpDisplay, maGLXContext ); +- dlclose( mpGLLib ); ++#ifdef MACOSX ++ osl_unloadModule( (oslModule) mpGLLib ); ++#else ++ osl_unloadModule( mpGLLib ); ++#endif + + mpGLLib = 0; + pCreateContext = 0; +@@ -309,37 +298,55 @@ void SalOpenGL::ImplFreeLib() + + // ------------------------------------------------------------------------ + +-BOOL SalOpenGL::ImplInit() ++void* X11SalOpenGL::resolveSymbol( const char* pSymbol ) ++{ ++ void* pSym = NULL; ++ if( mpGLLib ) ++ { ++ OUString aSym = OUString::createFromAscii( pSymbol ); ++#ifdef MACOSX ++ pSym = osl_getSymbol( (oslModule) mpGLLib, aSym.pData ); ++#else ++ pSym = osl_getSymbol( mpGLLib, aSym.pData ); ++#endif ++ } ++ return pSym; ++} ++ ++ ++BOOL X11SalOpenGL::ImplInit() + { + if( ! mpGLLib ) + { + ByteString sNoGL( getenv( "SAL_NOOPENGL" ) ); +- if( sNoGL.ToLowerAscii() == "true" ) return FALSE; +- mpGLLib = dlopen( OGL_LIBNAME, DLOPEN_MODE ); ++ if( sNoGL.ToLowerAscii() == "true" ) ++ return FALSE; ++ OUString aLibName( RTL_CONSTASCII_USTRINGPARAM( OGL_LIBNAME ) ); ++ mpGLLib = osl_loadModule( aLibName.pData, SAL_LOADMODULE_NOW ); + } + if( ! mpGLLib ) + { + #if OSL_DEBUG_LEVEL > 1 +- fprintf( stderr, OGL_LIBNAME "could not be opened: %s\n", dlerror() ); ++ fprintf( stderr, OGL_LIBNAME "could not be opened\n" ); + #endif + return FALSE; + } + + // Internal use + pCreateContext = (GLXContext(*)(Display*,XVisualInfo*,GLXContext,Bool )) +- GetOGLFnc( "glXCreateContext" ); ++ resolveSymbol( "glXCreateContext" ); + pDestroyContext = (void(*)(Display*,GLXContext)) +- GetOGLFnc( "glXDestroyContext" ); ++ resolveSymbol( "glXDestroyContext" ); + pGetCurrentContext = (GLXContext(*)()) +- GetOGLFnc( "glXGetCurrentContext" ); ++ resolveSymbol( "glXGetCurrentContext" ); + pMakeCurrent = (Bool(*)(Display*,GLXDrawable,GLXContext)) +- GetOGLFnc( "glXMakeCurrent" ); ++ resolveSymbol( "glXMakeCurrent" ); + pSwapBuffers=(void(*)(Display*, GLXDrawable)) +- GetOGLFnc( "glXSwapBuffers" ); ++ resolveSymbol( "glXSwapBuffers" ); + pGetConfig = (int(*)(Display*, XVisualInfo*, int, int* )) +- GetOGLFnc( "glXGetConfig" ); ++ resolveSymbol( "glXGetConfig" ); + pFlush = (void(*)()) +- GetOGLFnc( "glFlush" ); ++ resolveSymbol( "glFlush" ); + + BOOL bRet = pCreateContext && pDestroyContext && pGetCurrentContext && pMakeCurrent && pSwapBuffers && pGetConfig ? TRUE : FALSE; + +@@ -351,14 +358,14 @@ BOOL SalOpenGL::ImplInit() + return bRet; + } + +-void SalOpenGL::StartScene( SalGraphics* pGraphics ) ++void X11SalOpenGL::StartScene( SalGraphics* pGraphics ) + { + // flush pending operations which otherwise might be drawn + // at the wrong time + XSync( mpDisplay, False ); + } + +-void SalOpenGL::StopScene() ++void X11SalOpenGL::StopScene() + { + if( maDrawable ) + { +@@ -367,7 +374,7 @@ void SalOpenGL::StopScene() + } + } + +-void SalOpenGL::MakeVisualWeights( Display* pDisplay, ++void X11SalOpenGL::MakeVisualWeights( Display* pDisplay, + XVisualInfo* pInfos, + int *pWeights, + int nVisuals ) +Index: vcl/unx/source/gdi/salprnpsp.cxx +=================================================================== +RCS file: /cvs/gsl/vcl/unx/source/gdi/salprnpsp.cxx,v +retrieving revision 1.27.40.2 +retrieving revision 1.33 +diff -u -p -u -r1.27.40.2 -r1.33 +--- vcl/unx/source/gdi/salprnpsp.cxx 28 Jan 2004 15:25:52 -0000 1.27.40.2 ++++ vcl/unx/source/gdi/salprnpsp.cxx 10 May 2004 15:59:51 -0000 1.33 +@@ -79,14 +79,14 @@ + #ifndef _SV_JOBSET_H + #include <jobset.h> + #endif +-#ifndef _SV_SALINST_HXX +-#include <salinst.hxx> ++#ifndef _SV_SALDISP_HXX ++#include <saldisp.hxx> + #endif +-#ifndef _SV_SALPRN_HXX +-#include <salprn.hxx> ++#ifndef _SV_SALINST_H ++#include <salinst.h> + #endif +-#ifndef _SV_SALGDI_HXX +-#include <salgdi.hxx> ++#ifndef _SV_SALPRN_H ++#include <salprn.h> + #endif + #ifndef _SV_PRINT_H + #include <print.h> +@@ -94,8 +94,11 @@ + #ifndef _SV_SALPTYPE_HXX + #include <salptype.hxx> + #endif +-#ifndef _SV_SALFRAME_HXX +-#include <salframe.hxx> ++#ifndef _SV_SALFRAME_H ++#include <salframe.h> ++#endif ++#ifndef _VCL_PSPGRAPHICS_H ++#include <pspgraphics.h> + #endif + #ifndef _SV_SALDATA_HXX + #include <saldata.hxx> +@@ -211,9 +214,9 @@ static void getPaLib() + } + } + +-inline PtTo10Mu( int nPoints ) { return (int)((((double)nPoints)*35.27777778)+0.5); } ++inline int PtTo10Mu( int nPoints ) { return (int)((((double)nPoints)*35.27777778)+0.5); } + +-inline TenMuToPt( int nUnits ) { return (int)((((double)nUnits)/35.27777778)+0.5); } ++inline int TenMuToPt( int nUnits ) { return (int)((((double)nUnits)/35.27777778)+0.5); } + + static struct + { +@@ -433,20 +436,19 @@ static bool createPdf( const String& rTo + + // ----------------------------------------------------------------------- + +-SalInfoPrinter* SalInstance::CreateInfoPrinter( +- SalPrinterQueueInfo* pQueueInfo, +- ImplJobSetup* pJobSetup ) ++SalInfoPrinter* X11SalInstance::CreateInfoPrinter( SalPrinterQueueInfo* pQueueInfo, ++ ImplJobSetup* pJobSetup ) + { +- maInstData.mbPrinterInit = true; ++ mbPrinterInit = true; + // create and initialize SalInfoPrinter +- SalInfoPrinter* pPrinter = new SalInfoPrinter; ++ PspSalInfoPrinter* pPrinter = new PspSalInfoPrinter; + + if( pJobSetup ) + { + PrinterInfoManager& rManager( PrinterInfoManager::get() ); + PrinterInfo aInfo( rManager.getPrinterInfo( pQueueInfo->maPrinterName ) ); +- pPrinter->maPrinterData.m_aJobData = aInfo; +- pPrinter->maPrinterData.m_aPrinterGfx.Init( pPrinter->maPrinterData.m_aJobData ); ++ pPrinter->m_aJobData = aInfo; ++ pPrinter->m_aPrinterGfx.Init( pPrinter->m_aJobData ); + + if( pJobSetup->mpDriverData ) + JobData::constructFromStreamBuffer( pJobSetup->mpDriverData, pJobSetup->mnDriverDataLen, aInfo ); +@@ -463,35 +465,35 @@ SalInfoPrinter* SalInstance::CreateInfoP + + // ----------------------------------------------------------------------- + +-void SalInstance::DestroyInfoPrinter( SalInfoPrinter* pPrinter ) ++void X11SalInstance::DestroyInfoPrinter( SalInfoPrinter* pPrinter ) + { + delete pPrinter; + } + + // ----------------------------------------------------------------------- + +-SalPrinter* SalInstance::CreatePrinter( SalInfoPrinter* pInfoPrinter ) ++SalPrinter* X11SalInstance::CreatePrinter( SalInfoPrinter* pInfoPrinter ) + { +- maInstData.mbPrinterInit = true; ++ mbPrinterInit = true; + // create and initialize SalPrinter +- SalPrinter* pPrinter = new SalPrinter; +- pPrinter->maPrinterData.m_aJobData = pInfoPrinter->maPrinterData.m_aJobData; ++ PspSalPrinter* pPrinter = new PspSalPrinter; ++ pPrinter->m_aJobData = static_cast<PspSalInfoPrinter*>(pInfoPrinter)->m_aJobData; + + return pPrinter; + } + + // ----------------------------------------------------------------------- + +-void SalInstance::DestroyPrinter( SalPrinter* pPrinter ) ++void X11SalInstance::DestroyPrinter( SalPrinter* pPrinter ) + { + delete pPrinter; + } + + // ----------------------------------------------------------------------- + +-void SalInstance::GetPrinterQueueInfo( ImplPrnQueueList* pList ) ++void X11SalInstance::GetPrinterQueueInfo( ImplPrnQueueList* pList ) + { +- maInstData.mbPrinterInit = true; ++ mbPrinterInit = true; + PrinterInfoManager& rManager( PrinterInfoManager::get() ); + ::std::list< OUString > aPrinters; + rManager.listPrinters( aPrinters ); +@@ -524,56 +526,56 @@ void SalInstance::GetPrinterQueueInfo( I + + // ----------------------------------------------------------------------- + +-void SalInstance::DeletePrinterQueueInfo( SalPrinterQueueInfo* pInfo ) ++void X11SalInstance::DeletePrinterQueueInfo( SalPrinterQueueInfo* pInfo ) + { + delete pInfo; + } + + // ----------------------------------------------------------------------- + +-void SalInstance::GetPrinterQueueState( SalPrinterQueueInfo* pInfo ) ++void X11SalInstance::GetPrinterQueueState( SalPrinterQueueInfo* pInfo ) + { +- maInstData.mbPrinterInit = true; ++ mbPrinterInit = true; + } + + // ----------------------------------------------------------------------- + +-String SalInstance::GetDefaultPrinter() ++String X11SalInstance::GetDefaultPrinter() + { +- maInstData.mbPrinterInit = true; ++ mbPrinterInit = true; + PrinterInfoManager& rManager( PrinterInfoManager::get() ); + return rManager.getDefaultPrinter(); + } + + // ======================================================================= + +-SalInfoPrinter::SalInfoPrinter() ++PspSalInfoPrinter::PspSalInfoPrinter() + { +- maPrinterData.m_pGraphics = NULL; ++ m_pGraphics = NULL; + m_bPapersInit = false; + } + + // ----------------------------------------------------------------------- + +-SalInfoPrinter::~SalInfoPrinter() ++PspSalInfoPrinter::~PspSalInfoPrinter() + { +- if( maPrinterData.m_pGraphics ) ++ if( m_pGraphics ) + { +- delete maPrinterData.m_pGraphics; +- maPrinterData.m_pGraphics = NULL; ++ delete m_pGraphics; ++ m_pGraphics = NULL; + } + } + + // ----------------------------------------------------------------------- + +-void SalInfoPrinter::InitPaperFormats( const ImplJobSetup* pSetupData ) ++void PspSalInfoPrinter::InitPaperFormats( const ImplJobSetup* pSetupData ) + { + m_aPaperFormats.clear(); + m_bPapersInit = true; + +- if( maPrinterData.m_aJobData.m_pParser ) ++ if( m_aJobData.m_pParser ) + { +- const PPDKey* pKey = maPrinterData.m_aJobData.m_pParser->getKey( String( RTL_CONSTASCII_USTRINGPARAM( "PageSize" ) ) ); ++ const PPDKey* pKey = m_aJobData.m_pParser->getKey( String( RTL_CONSTASCII_USTRINGPARAM( "PageSize" ) ) ); + if( pKey ) + { + int nValues = pKey->countValues(); +@@ -585,7 +587,7 @@ void SalInfoPrinter::InitPaperFormats( c + if( ! aInfo.m_aPaperName.Len() ) + aInfo.m_aPaperName = pValue->m_aOption; + int nWidth = 0, nHeight = 0; +- maPrinterData.m_aJobData.m_pParser->getPaperDimension( pValue->m_aOption, nWidth, nHeight ); ++ m_aJobData.m_pParser->getPaperDimension( pValue->m_aOption, nWidth, nHeight ); + aInfo.m_nPaperWidth = (unsigned long)((PtTo10Mu( nWidth )+50)/100); + aInfo.m_nPaperHeight = (unsigned long)((PtTo10Mu( nHeight )+50)/100); + m_aPaperFormats.push_back( aInfo ); +@@ -596,46 +598,44 @@ void SalInfoPrinter::InitPaperFormats( c + + // ----------------------------------------------------------------------- + +-int SalInfoPrinter::GetLandscapeAngle( const ImplJobSetup* pSetupData ) ++int PspSalInfoPrinter::GetLandscapeAngle( const ImplJobSetup* pSetupData ) + { + return 900; + } + + // ----------------------------------------------------------------------- + +-SalGraphics* SalInfoPrinter::GetGraphics() ++SalGraphics* PspSalInfoPrinter::GetGraphics() + { + // return a valid pointer only once + // the reasoning behind this is that we could have different + // SalGraphics that can run in multiple threads + // (future plans) + SalGraphics* pRet = NULL; +- if( ! maPrinterData.m_pGraphics ) ++ if( ! m_pGraphics ) + { +- maPrinterData.m_pGraphics = new SalGraphics; +- maPrinterData.m_pGraphics->maGraphicsData.m_pJobData = &maPrinterData.m_aJobData; +- maPrinterData.m_pGraphics->maGraphicsData.m_pPrinterGfx = &maPrinterData.m_aPrinterGfx; +- maPrinterData.m_pGraphics->maGraphicsData.bPrinter_ = TRUE; +- pRet = maPrinterData.m_pGraphics; ++ m_pGraphics = new PspGraphics( &m_aJobData, &m_aPrinterGfx ); ++ m_pGraphics->SetLayout( 0 ); ++ pRet = m_pGraphics; + } + return pRet; + } + + // ----------------------------------------------------------------------- + +-void SalInfoPrinter::ReleaseGraphics( SalGraphics* pGraphics ) ++void PspSalInfoPrinter::ReleaseGraphics( SalGraphics* pGraphics ) + { +- if( pGraphics == maPrinterData.m_pGraphics ) ++ if( pGraphics == m_pGraphics ) + { + delete pGraphics; +- maPrinterData.m_pGraphics = NULL; ++ m_pGraphics = NULL; + } + return; + } + + // ----------------------------------------------------------------------- + +-BOOL SalInfoPrinter::Setup( SalFrame* pFrame, ImplJobSetup* pJobSetup ) ++BOOL PspSalInfoPrinter::Setup( SalFrame* pFrame, ImplJobSetup* pJobSetup ) + { + if( ! pFrame || ! pJobSetup ) + return FALSE; +@@ -679,12 +679,12 @@ BOOL SalInfoPrinter::Setup( SalFrame* pF + // data should be merged into the driver data + // If pJobSetup->mpDriverData IS NULL, then the driver defaults + // should be merged into the independent data +-BOOL SalInfoPrinter::SetPrinterData( ImplJobSetup* pJobSetup ) ++BOOL PspSalInfoPrinter::SetPrinterData( ImplJobSetup* pJobSetup ) + { + if( pJobSetup->mpDriverData ) + return SetData( ~0, pJobSetup ); + +- copyJobDataToJobSetup( pJobSetup, maPrinterData.m_aJobData ); ++ copyJobDataToJobSetup( pJobSetup, m_aJobData ); + return TRUE; + } + +@@ -694,7 +694,7 @@ BOOL SalInfoPrinter::SetPrinterData( Imp + // and sets the new independ data in pJobSetup + // Only the data must be changed, where the bit + // in nGetDataFlags is set +-BOOL SalInfoPrinter::SetData( ++BOOL PspSalInfoPrinter::SetData( + ULONG nSetDataFlags, + ImplJobSetup* pJobSetup ) + { +@@ -804,7 +804,7 @@ BOOL SalInfoPrinter::SetData( + if( nSetDataFlags & SAL_JOBSET_ORIENTATION ) + aData.m_eOrientation = pJobSetup->meOrientation == ORIENTATION_LANDSCAPE ? orientation::Landscape : orientation::Portrait; + +- maPrinterData.m_aJobData = aData; ++ m_aJobData = aData; + copyJobDataToJobSetup( pJobSetup, aData ); + return TRUE; + } +@@ -814,7 +814,7 @@ BOOL SalInfoPrinter::SetData( + + // ----------------------------------------------------------------------- + +-void SalInfoPrinter::GetPageInfo( ++void PspSalInfoPrinter::GetPageInfo( + const ImplJobSetup* pJobSetup, + long& rOutWidth, long& rOutHeight, + long& rPageOffX, long& rPageOffY, +@@ -858,7 +858,7 @@ void SalInfoPrinter::GetPageInfo( + + // ----------------------------------------------------------------------- + +-ULONG SalInfoPrinter::GetPaperBinCount( const ImplJobSetup* pJobSetup ) ++ULONG PspSalInfoPrinter::GetPaperBinCount( const ImplJobSetup* pJobSetup ) + { + if( ! pJobSetup ) + return 0; +@@ -872,7 +872,7 @@ ULONG SalInfoPrinter::GetPaperBinCount( + + // ----------------------------------------------------------------------- + +-String SalInfoPrinter::GetPaperBinName( const ImplJobSetup* pJobSetup, ULONG nPaperBin ) ++String PspSalInfoPrinter::GetPaperBinName( const ImplJobSetup* pJobSetup, ULONG nPaperBin ) + { + JobData aData; + JobData::constructFromStreamBuffer( pJobSetup->mpDriverData, pJobSetup->mnDriverDataLen, aData ); +@@ -896,7 +896,7 @@ String SalInfoPrinter::GetPaperBinName( + + // ----------------------------------------------------------------------- + +-ULONG SalInfoPrinter::GetCapabilities( const ImplJobSetup* pJobSetup, USHORT nType ) ++ULONG PspSalInfoPrinter::GetCapabilities( const ImplJobSetup* pJobSetup, USHORT nType ) + { + switch( nType ) + { +@@ -951,13 +951,13 @@ ULONG SalInfoPrinter::GetCapabilities( c + * SalPrinter + */ + +-SalPrinter::SalPrinter() ++PspSalPrinter::PspSalPrinter() + { + } + + // ----------------------------------------------------------------------- + +-SalPrinter::~SalPrinter() ++PspSalPrinter::~PspSalPrinter() + { + } + +@@ -972,7 +972,7 @@ static String getTmpName() + return aSys; + } + +-BOOL SalPrinter::StartJob( ++BOOL PspSalPrinter::StartJob( + const XubString* pFileName, + const XubString& rJobName, + const XubString& rAppName, +@@ -981,81 +981,81 @@ BOOL SalPrinter::StartJob( + { + vcl_sal::PrinterUpdate::jobStarted(); + +- maPrinterData.m_bFax = false; +- maPrinterData.m_bPdf = false; +- maPrinterData.m_aFileName = pFileName ? *pFileName : String(); +- maPrinterData.m_aTmpFile = String(); +- maPrinterData.m_nCopies = nCopies; ++ m_bFax = false; ++ m_bPdf = false; ++ m_aFileName = pFileName ? *pFileName : String(); ++ m_aTmpFile = String(); ++ m_nCopies = nCopies; + +- JobData::constructFromStreamBuffer( pJobSetup->mpDriverData, pJobSetup->mnDriverDataLen, maPrinterData.m_aJobData ); +- if( maPrinterData.m_nCopies > 1 ) ++ JobData::constructFromStreamBuffer( pJobSetup->mpDriverData, pJobSetup->mnDriverDataLen, m_aJobData ); ++ if( m_nCopies > 1 ) + // in case user did not do anything (m_nCopies=1) + // take the default from jobsetup +- maPrinterData.m_aJobData.m_nCopies = maPrinterData.m_nCopies; ++ m_aJobData.m_nCopies = m_nCopies; + + // check wether this printer is configured as fax + int nMode = 0; +- const PrinterInfo& rInfo( PrinterInfoManager::get().getPrinterInfo( maPrinterData.m_aJobData.m_aPrinterName ) ); ++ const PrinterInfo& rInfo( PrinterInfoManager::get().getPrinterInfo( m_aJobData.m_aPrinterName ) ); + sal_Int32 nIndex = 0; + while( nIndex != -1 ) + { + OUString aToken( rInfo.m_aFeatures.getToken( 0, ',', nIndex ) ); + if( ! aToken.compareToAscii( "fax", 3 ) ) + { +- maPrinterData.m_bFax = true; +- maPrinterData.m_aTmpFile = getTmpName(); ++ m_bFax = true; ++ m_aTmpFile = getTmpName(); + nMode = S_IRUSR | S_IWUSR; + + ::std::hash_map< ::rtl::OUString, ::rtl::OUString, ::rtl::OUStringHash >::const_iterator it; + it = pJobSetup->maValueMap.find( ::rtl::OUString::createFromAscii( "FAX#" ) ); + if( it != pJobSetup->maValueMap.end() ) +- maPrinterData.m_aFaxNr = it->second; ++ m_aFaxNr = it->second; + + sal_Int32 nPos = 0; +- maPrinterData.m_bSwallowFaxNo = ! aToken.getToken( 1, '=', nPos ).compareToAscii( "swallow", 7 ) ? true : false; ++ m_bSwallowFaxNo = ! aToken.getToken( 1, '=', nPos ).compareToAscii( "swallow", 7 ) ? true : false; + + break; + } + if( ! aToken.compareToAscii( "pdf=", 4 ) ) + { +- maPrinterData.m_bPdf = true; +- maPrinterData.m_aTmpFile = getTmpName(); ++ m_bPdf = true; ++ m_aTmpFile = getTmpName(); + nMode = S_IRUSR | S_IWUSR; + +- if( ! maPrinterData.m_aFileName.Len() ) ++ if( ! m_aFileName.Len() ) + { +- maPrinterData.m_aFileName = getPdfDir( rInfo ); +- maPrinterData.m_aFileName.Append( '/' ); +- maPrinterData.m_aFileName.Append( rJobName ); +- maPrinterData.m_aFileName.AppendAscii( ".pdf" ); ++ m_aFileName = getPdfDir( rInfo ); ++ m_aFileName.Append( '/' ); ++ m_aFileName.Append( rJobName ); ++ m_aFileName.AppendAscii( ".pdf" ); + } + break; + } + } +- maPrinterData.m_aPrinterGfx.Init( maPrinterData.m_aJobData ); +- return maPrinterData.m_aPrintJob.StartJob( maPrinterData.m_aTmpFile.Len() ? maPrinterData.m_aTmpFile : maPrinterData.m_aFileName, nMode, rJobName, rAppName, maPrinterData.m_aJobData, &maPrinterData.m_aPrinterGfx ) ? TRUE : FALSE; ++ m_aPrinterGfx.Init( m_aJobData ); ++ return m_aPrintJob.StartJob( m_aTmpFile.Len() ? m_aTmpFile : m_aFileName, nMode, rJobName, rAppName, m_aJobData, &m_aPrinterGfx ) ? TRUE : FALSE; + } + + // ----------------------------------------------------------------------- + +-BOOL SalPrinter::EndJob() ++BOOL PspSalPrinter::EndJob() + { +- BOOL bSuccess = maPrinterData.m_aPrintJob.EndJob(); ++ BOOL bSuccess = m_aPrintJob.EndJob(); + + if( bSuccess ) + { + // check for fax +- if( maPrinterData.m_bFax ) ++ if( m_bFax ) + { + +- const PrinterInfo& rInfo( PrinterInfoManager::get().getPrinterInfo( maPrinterData.m_aJobData.m_aPrinterName ) ); ++ const PrinterInfo& rInfo( PrinterInfoManager::get().getPrinterInfo( m_aJobData.m_aPrinterName ) ); + // sendAFax removes the file after use +- bSuccess = sendAFax( maPrinterData.m_aFaxNr, maPrinterData.m_aTmpFile, rInfo.m_aCommand ); ++ bSuccess = sendAFax( m_aFaxNr, m_aTmpFile, rInfo.m_aCommand ); + } +- else if( maPrinterData.m_bPdf ) ++ else if( m_bPdf ) + { +- const PrinterInfo& rInfo( PrinterInfoManager::get().getPrinterInfo( maPrinterData.m_aJobData.m_aPrinterName ) ); +- bSuccess = createPdf( maPrinterData.m_aFileName, maPrinterData.m_aTmpFile, rInfo.m_aCommand ); ++ const PrinterInfo& rInfo( PrinterInfoManager::get().getPrinterInfo( m_aJobData.m_aPrinterName ) ); ++ bSuccess = createPdf( m_aFileName, m_aTmpFile, rInfo.m_aCommand ); + } + } + vcl_sal::PrinterUpdate::jobEnded(); +@@ -1064,47 +1064,43 @@ BOOL SalPrinter::EndJob() + + // ----------------------------------------------------------------------- + +-BOOL SalPrinter::AbortJob() ++BOOL PspSalPrinter::AbortJob() + { +- BOOL bAbort = maPrinterData.m_aPrintJob.AbortJob() ? TRUE : FALSE; ++ BOOL bAbort = m_aPrintJob.AbortJob() ? TRUE : FALSE; + vcl_sal::PrinterUpdate::jobEnded(); + return bAbort; + } + + // ----------------------------------------------------------------------- + +-SalGraphics* SalPrinter::StartPage( ImplJobSetup* pJobSetup, BOOL bNewJobData ) ++SalGraphics* PspSalPrinter::StartPage( ImplJobSetup* pJobSetup, BOOL bNewJobData ) + { +- JobData::constructFromStreamBuffer( pJobSetup->mpDriverData, pJobSetup->mnDriverDataLen, maPrinterData.m_aJobData ); +- maPrinterData.m_pGraphics = new SalGraphics(); +- maPrinterData.m_pGraphics->maGraphicsData.m_pJobData = &maPrinterData.m_aJobData; +- maPrinterData.m_pGraphics->maGraphicsData.m_pPrinterGfx = &maPrinterData.m_aPrinterGfx; +- maPrinterData.m_pGraphics->maGraphicsData.bPrinter_ = true; +- maPrinterData.m_pGraphics->maGraphicsData.m_pPhoneNr = maPrinterData.m_bFax ? &maPrinterData.m_aFaxNr : NULL; +- maPrinterData.m_pGraphics->maGraphicsData.m_bSwallowFaxNo = maPrinterData.m_bSwallowFaxNo; +- if( maPrinterData.m_nCopies > 1 ) ++ JobData::constructFromStreamBuffer( pJobSetup->mpDriverData, pJobSetup->mnDriverDataLen, m_aJobData ); ++ m_pGraphics = new PspGraphics( &m_aJobData, &m_aPrinterGfx, m_bFax ? &m_aFaxNr : NULL, m_bSwallowFaxNo ); ++ m_pGraphics->SetLayout( 0 ); ++ if( m_nCopies > 1 ) + // in case user did not do anything (m_nCopies=1) + // take the default from jobsetup +- maPrinterData.m_aJobData.m_nCopies = maPrinterData.m_nCopies; ++ m_aJobData.m_nCopies = m_nCopies; + +- maPrinterData.m_aPrintJob.StartPage( maPrinterData.m_aJobData, bNewJobData ? sal_True : sal_False ); +- maPrinterData.m_aPrinterGfx.Init( maPrinterData.m_aPrintJob ); ++ m_aPrintJob.StartPage( m_aJobData, bNewJobData ? sal_True : sal_False ); ++ m_aPrinterGfx.Init( m_aPrintJob ); + +- return maPrinterData.m_pGraphics; ++ return m_pGraphics; + } + + // ----------------------------------------------------------------------- + +-BOOL SalPrinter::EndPage() ++BOOL PspSalPrinter::EndPage() + { +- sal_Bool bResult = maPrinterData.m_aPrintJob.EndPage(); +- maPrinterData.m_aPrinterGfx.Clear(); ++ sal_Bool bResult = m_aPrintJob.EndPage(); ++ m_aPrinterGfx.Clear(); + return bResult ? TRUE : FALSE; + } + + // ----------------------------------------------------------------------- + +-ULONG SalPrinter::GetErrorCode() ++ULONG PspSalPrinter::GetErrorCode() + { + return 0; + } +@@ -1116,39 +1112,16 @@ ULONG SalPrinter::GetErrorCode() + Timer* vcl_sal::PrinterUpdate::pPrinterUpdateTimer = NULL; + int vcl_sal::PrinterUpdate::nActiveJobs = 0; + +-struct PrnFrameCall +-{ +- SalFrame* pFrame; +- SalFrameDelData aDelData; +- +- PrnFrameCall() : pFrame( NULL ) {} +-}; +- + void vcl_sal::PrinterUpdate::doUpdate() + { + ::psp::PrinterInfoManager& rManager( ::psp::PrinterInfoManager::get() ); + if( rManager.checkPrintersChanged() ) + { +- std::list< PrnFrameCall > aList; +- SalFrame* pFrame = GetSalData()->pFirstFrame_; +- while( pFrame ) +- { +- aList.push_back( PrnFrameCall() ); +- aList.back().pFrame = pFrame; +- pFrame->maFrameData.RegisterDeleteData( &aList.back().aDelData ); +- pFrame = pFrame->maFrameData.GetNextFrame(); +- } +- +- while( aList.begin() != aList.end() ) +- { +- if( ! aList.front().aDelData.IsDeleted() ) +- { +- aList.front().pFrame->maFrameData.Call( SALEVENT_PRINTERCHANGED, NULL ); +- if( !aList.front().aDelData.IsDeleted() ) +- aList.front().pFrame->maFrameData.UnregisterDeleteData( &aList.front().aDelData ); +- } +- aList.pop_front(); +- } ++ SalDisplay* pDisp = GetSalData()->GetDisplay(); ++ const std::list< SalFrame* >& rList = pDisp->getFrames(); ++ for( std::list< SalFrame* >::const_iterator it = rList.begin(); ++ it != rList.end(); ++it ) ++ pDisp->SendInternalEvent( *it, NULL, SALEVENT_PRINTERCHANGED ); + } + } + +Index: vcl/unx/source/gdi/salvd.cxx +=================================================================== +RCS file: /cvs/gsl/vcl/unx/source/gdi/salvd.cxx,v +retrieving revision 1.4 +retrieving revision 1.8 +diff -u -p -u -r1.4 -r1.8 +--- vcl/unx/source/gdi/salvd.cxx 27 Mar 2003 17:58:52 -0000 1.4 ++++ vcl/unx/source/gdi/salvd.cxx 10 May 2004 16:00:04 -0000 1.8 +@@ -59,9 +59,6 @@ + * + ************************************************************************/ + +-#define _SV_SALVD_CXX +- +-// -=-= #includes =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + #include <salunx.h> + + #ifndef _SV_SALDATA_HXX +@@ -73,53 +70,53 @@ + #ifndef _SV_SALINST_HXX + #include <salinst.hxx> + #endif +-#ifndef _SV_SALGDI_HXX +-#include <salgdi.hxx> ++#ifndef _SV_SALGDI_H ++#include <salgdi.h> + #endif +-#ifndef _SV_SALVD_HXX +-#include <salvd.hxx> ++#ifndef _SV_SALVD_H ++#include <salvd.h> + #endif + + // -=-= SalInstance =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +-SalVirtualDevice* SalInstance::CreateVirtualDevice( SalGraphics* pGraphics, +- long nDX, long nDY, +- USHORT nBitCount ) ++SalVirtualDevice* X11SalInstance::CreateVirtualDevice( SalGraphics* pGraphics, ++ long nDX, long nDY, ++ USHORT nBitCount ) + { +- SalVirtualDevice *pVDev = new SalVirtualDevice(); ++ X11SalVirtualDevice *pVDev = new X11SalVirtualDevice(); + if( !nBitCount && pGraphics ) + nBitCount = pGraphics->GetBitCount(); +- if( !pVDev->maVirDevData.Init( pGraphics->maGraphicsData.GetDisplay(), +- nDX, nDY, nBitCount ) ) ++ if( !pVDev->Init( GetSalData()->GetDisplay(), nDX, nDY, nBitCount ) ) + { + delete pVDev; + return NULL; + } + +- pVDev->maVirDevData.InitGraphics( pVDev, pGraphics ); ++ pVDev->InitGraphics( pVDev ); + return pVDev; + } + +-void SalInstance::DestroyVirtualDevice( SalVirtualDevice* pDevice ) +-{ delete pDevice; } ++void X11SalInstance::DestroyVirtualDevice( SalVirtualDevice* pDevice ) ++{ ++ delete pDevice; ++} + + // -=-= SalGraphicsData =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +-void SalGraphicsData::Init( SalVirtualDevice *pDevice, +- SalGraphics *pGraphics ) ++void X11SalGraphics::Init( X11SalVirtualDevice *pDevice ) + { +- SalDisplay *pDisplay = pDevice->maVirDevData.GetDisplay(); ++ SalDisplay *pDisplay = pDevice->GetDisplay(); + + int nVisualDepth = pDisplay->GetColormap().GetVisual()->GetDepth(); +- int nDeviceDepth = pDevice->maVirDevData.GetDepth(); ++ int nDeviceDepth = pDevice->GetDepth(); + + if( nDeviceDepth == nVisualDepth ) +- xColormap_ = &pDisplay->GetColormap(); ++ m_pColormap = &pDisplay->GetColormap(); + else + if( nDeviceDepth == 1 ) +- xColormap_ = new SalColormap(); ++ m_pDeleteColormap = m_pColormap = new SalColormap(); + +- hDrawable_ = pDevice->maVirDevData.GetDrawable(); ++ hDrawable_ = pDevice->GetDrawable(); + m_pVDev = pDevice; + m_pFrame = NULL; + +@@ -133,12 +130,12 @@ void SalGraphicsData::Init( SalVirtualDe + + // -=-= SalVirDevData / SalVirtualDevice -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +-BOOL SalVirDevData::Init( SalDisplay *pDisplay, +- long nDX, long nDY, ++BOOL X11SalVirtualDevice::Init( SalDisplay *pDisplay, ++ long nDX, long nDY, + USHORT nBitCount ) + { +- pDisplay_ = pDisplay; +- pGraphics_ = new SalGraphicsLayout(); ++ pDisplay_ = pDisplay; ++ pGraphics_ = new X11SalGraphics(); + pGraphics_->SetLayout( 0 ); // by default no! mirroring for VirtualDevices, can be enabled with EnableRTL() + nDX_ = nDX; + nDY_ = nDY; +@@ -149,11 +146,13 @@ BOOL SalVirDevData::Init( SalDisplay *pD + nDX_, nDY_, + GetDepth() ); + ++ pGraphics_->Init( this ); ++ + return hDrawable_ != None ? TRUE : FALSE; + } + + // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +-inline SalVirDevData::SalVirDevData() ++X11SalVirtualDevice::X11SalVirtualDevice() + { + pDisplay_ = (SalDisplay*)ILLEGAL_POINTER; + pGraphics_ = NULL; +@@ -164,78 +163,61 @@ inline SalVirDevData::SalVirDevData() + bGraphics_ = FALSE; + } + +-SalVirtualDevice::SalVirtualDevice() {} +- + // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +-inline SalVirDevData::~SalVirDevData() ++X11SalVirtualDevice::~X11SalVirtualDevice() + { + if( pGraphics_ ) +- { +- pGraphics_->maGraphicsData.DeInit(); + delete pGraphics_; +- } + + if( GetDrawable() ) + XFreePixmap( GetXDisplay(), GetDrawable() ); + } + +-SalVirtualDevice::~SalVirtualDevice() +-{} +- +-// -=-= #defines -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +- +-#define _GetDrawable() maVirDevData.GetDrawable() +-#define _GetDisplay() maVirDevData.GetDisplay() +-#define _GetXDisplay() maVirDevData.GetXDisplay() +-#define _GetDepth() maVirDevData.nDepth_ +- +-// -=-= SalVirtualDevice -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +-// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +-SalGraphics* SalVirtualDevice::GetGraphics() ++SalGraphics* X11SalVirtualDevice::GetGraphics() + { +- if( maVirDevData.bGraphics_ ) ++ if( bGraphics_ ) + return NULL; + +- if( maVirDevData.pGraphics_ ) +- maVirDevData.bGraphics_ = TRUE; ++ if( pGraphics_ ) ++ bGraphics_ = TRUE; + +- return maVirDevData.pGraphics_; ++ return pGraphics_; + } + +-void SalVirtualDevice::ReleaseGraphics( SalGraphics* ) +-{ maVirDevData.bGraphics_ = FALSE; } ++void X11SalVirtualDevice::ReleaseGraphics( SalGraphics* ) ++{ bGraphics_ = FALSE; } + +-BOOL SalVirtualDevice::SetSize( long nDX, long nDY ) ++BOOL X11SalVirtualDevice::SetSize( long nDX, long nDY ) + { + if( !nDX ) nDX = 1; + if( !nDY ) nDY = 1; + +- Pixmap h = XCreatePixmap( _GetXDisplay(), +- maVirDevData.pDisplay_->GetDrawable(), +- nDX, nDY, _GetDepth() ); ++ Pixmap h = XCreatePixmap( GetXDisplay(), ++ pDisplay_->GetDrawable(), ++ nDX, nDY, nDepth_ ); + + if( !h ) + { +- if( !_GetDrawable() ) ++ if( !GetDrawable() ) + { +- maVirDevData.hDrawable_ = XCreatePixmap( _GetXDisplay(), +- maVirDevData.pDisplay_->GetDrawable(), +- 1, 1, _GetDepth() ); +- maVirDevData.nDX_ = 1; +- maVirDevData.nDY_ = 1; ++ hDrawable_ = XCreatePixmap( GetXDisplay(), ++ pDisplay_->GetDrawable(), ++ 1, 1, nDepth_ ); ++ nDX_ = 1; ++ nDY_ = 1; + } + return FALSE; + } + +- if( _GetDrawable() ) +- XFreePixmap( _GetXDisplay(), _GetDrawable() ); +- maVirDevData.hDrawable_ = h; ++ if( GetDrawable() ) ++ XFreePixmap( GetXDisplay(), GetDrawable() ); ++ hDrawable_ = h; + +- maVirDevData.nDX_ = nDX; +- maVirDevData.nDY_ = nDY; ++ nDX_ = nDX; ++ nDY_ = nDY; + +- if( maVirDevData.pGraphics_ ) +- maVirDevData.InitGraphics( this, maVirDevData.pGraphics_ ); ++ if( pGraphics_ ) ++ InitGraphics( this ); + + return TRUE; + } +Index: vcl/unx/source/gdi/xfont.cxx +=================================================================== +RCS file: /cvs/gsl/vcl/unx/source/gdi/xfont.cxx,v +retrieving revision 1.29.82.2 +retrieving revision 1.36 +diff -u -p -u -r1.29.82.2 -r1.36 +--- vcl/unx/source/gdi/xfont.cxx 26 Jan 2004 17:26:20 -0000 1.29.82.2 ++++ vcl/unx/source/gdi/xfont.cxx 17 Jun 2004 12:29:36 -0000 1.36 +@@ -76,8 +76,11 @@ + #ifndef _SV_OUTFONT_HXX + #include <outfont.hxx> + #endif +-#ifndef _SV_SALGDI_HXX +-#include <salgdi.hxx> ++#ifndef _SV_SALDISP_HXX ++#include <saldisp.hxx> ++#endif ++#ifndef _SV_SALGDI_H ++#include <salgdi.h> + #endif + + #if OSL_DEBUG_LEVEL > 1 +@@ -122,8 +125,8 @@ ExtendedFontStruct::ExtendedFontStruct( + maPixelSize( rPixelSize ), + mfXScale(1.0), mfYScale(1.0), + mbVertical( bVertical ), +- mpXlfd( pXlfd ), + mnCachedEncoding( RTL_TEXTENCODING_DONTKNOW ), ++ mpXlfd( pXlfd ), + mpRangeCodes(NULL), + mnRangeCount(-1) + { +@@ -434,7 +438,7 @@ ExtendedFontStruct::GetDefaultWidth() + // is compatible with iso8859-X at least in the range to 0x7f + sal_Size + ExtendedFontStruct::GetCharWidth8( sal_Unicode nFrom, sal_Unicode nTo, +- long* pWidthArray, rtl_TextEncoding nEncoding ) ++ sal_Int32* pWidthArray, rtl_TextEncoding nEncoding ) + { + if ( !(nFrom <= nTo) ) + return 0; +@@ -477,7 +481,7 @@ ExtendedFontStruct::GetCharWidth8( sal_U + // Handle utf16 encoded fonts, which do not require conversion + sal_Size + ExtendedFontStruct::GetCharWidthUTF16( sal_Unicode nFrom, sal_Unicode nTo, +- long* pWidthArray ) ++ sal_Int32* pWidthArray ) + { + if ( !(nFrom <= nTo) ) + return 0; +@@ -523,7 +527,7 @@ ExtendedFontStruct::GetCharWidthUTF16( s + // font in fontstruct, 8 and 16 bit fonts are handled the same way + sal_Size + ExtendedFontStruct::GetCharWidth16( sal_Unicode nFrom, sal_Unicode nTo, +- long* pWidthArray, ExtendedFontStruct *pFallback ) ++ sal_Int32* pWidthArray, ExtendedFontStruct *pFallback ) + { + if ( nFrom > nTo ) + return 0; +@@ -608,8 +612,8 @@ ExtendedFontStruct::GetCharWidth16( sal_ + } + + sal_Size +-ExtendedFontStruct::GetCharWidth( sal_Unicode cChar, long *pPhysicalWidth, +- long *pLogicalWidth ) ++ExtendedFontStruct::GetCharWidth( sal_Unicode cChar, sal_Int32 *pPhysicalWidth, ++ sal_Int32 *pLogicalWidth ) + { + sal_Size nConverted = 0; + +@@ -707,7 +711,9 @@ bool X11FontLayout::LayoutText( ImplLayo + { + Point aNewPos( 0, 0 ); + bool bRightToLeft; +- for( int nCharPos = -1; rArgs.GetNextPos( &nCharPos, &bRightToLeft ); ) ++ int nCharPos; ++ ++ for( nCharPos = -1; rArgs.GetNextPos( &nCharPos, &bRightToLeft ); ) + { + sal_Unicode cChar = rArgs.mpStr[ nCharPos ]; + if( bRightToLeft ) +@@ -722,7 +728,7 @@ bool X11FontLayout::LayoutText( ImplLayo + nGlyphIndex = 0; // drop NotDef fallback glyphs + } + +- long nPhysGlyphWidth, nLogGlyphWidth; ++ sal_Int32 nPhysGlyphWidth, nLogGlyphWidth; + mrFont.GetCharWidth( cChar, &nPhysGlyphWidth, &nLogGlyphWidth ); + int nGlyphFlags = (nPhysGlyphWidth > 0) ? 0 : GlyphItem::IS_IN_CLUSTER; + if( bRightToLeft ) +@@ -753,7 +759,7 @@ void X11FontLayout::DrawText( SalGraphic + int nMaxGlyphs = GetOrientation() ? 1 : MAXGLYPHS; + + Point aPos; +- long aGlyphAry[ MAXGLYPHS ]; ++ sal_Int32 aGlyphAry[ MAXGLYPHS ]; + sal_Unicode pStr[ MAXGLYPHS ]; + for( int nStart=0;;) + { +@@ -764,7 +770,7 @@ void X11FontLayout::DrawText( SalGraphic + for( int i = 0; i < nGlyphCount; ++i ) + pStr[ i ] = aGlyphAry[ i ] & GF_IDXMASK; + +- rSalGraphics.maGraphicsData.DrawStringUCS2MB( mrFont, aPos, pStr, nGlyphCount ); ++ static_cast<X11SalGraphics&>(rSalGraphics).DrawStringUCS2MB( mrFont, aPos, pStr, nGlyphCount ); + } + } + +Index: vcl/unx/source/gdi/xlfd_attr.cxx +=================================================================== +RCS file: /cvs/gsl/vcl/unx/source/gdi/xlfd_attr.cxx,v +retrieving revision 1.14 +retrieving revision 1.15 +diff -u -p -u -r1.14 -r1.15 +--- vcl/unx/source/gdi/xlfd_attr.cxx 12 Jun 2003 08:19:39 -0000 1.14 ++++ vcl/unx/source/gdi/xlfd_attr.cxx 6 Jan 2004 14:41:47 -0000 1.15 +@@ -120,10 +120,12 @@ Attribute::Compare( const char *p, int n + const rtl::OString& + Attribute::GetKey () + { ++ static rtl::OString aEmptyStr; ++ + if (mpKeyName != NULL) + return *mpKeyName; + if (mnLength == NULL) +- return rtl::OString(); ++ return aEmptyStr; + + sal_Char* pBuffer = (sal_Char*)alloca (mnLength); + +Index: vcl/unx/source/gdi/xlfd_extd.cxx +=================================================================== +RCS file: /cvs/gsl/vcl/unx/source/gdi/xlfd_extd.cxx,v +retrieving revision 1.16.46.2 +retrieving revision 1.21 +diff -u -p -u -r1.16.46.2 -r1.21 +--- vcl/unx/source/gdi/xlfd_extd.cxx 26 Jan 2004 17:26:45 -0000 1.16.46.2 ++++ vcl/unx/source/gdi/xlfd_extd.cxx 30 Mar 2004 13:43:43 -0000 1.21 +@@ -652,7 +652,7 @@ ScalableBitmapXlfd::ToString( ByteString + rString += '-'; + rString += ByteString::CreateFromInt32( rInfo.mnResolutionY ); + rString += '-'; +- rString += rInfo.mcSpacing; ++ rString += static_cast< char >(rInfo.mcSpacing); + rString += "-0"; + + AppendAttribute( mpFactory->RetrieveCharset(rInfo.mnCharset), rString ); +@@ -673,10 +673,10 @@ ScalableBitmapXlfd::ToString( ByteString + + rString += "-*-"; + char pTmp[256]; +- sprintf( pTmp, pMatricsString, nPixelSize, nPixelSize ); ++ snprintf( pTmp, sizeof(pTmp), pMatricsString, nPixelSize, nPixelSize ); + rString += pTmp; + rString += "-*-*-"; +- rString += rInfo.mcSpacing; ++ rString += static_cast< char >(rInfo.mcSpacing); + rString += "-*"; + + AppendAttribute( mpFactory->RetrieveCharset(rInfo.mnCharset), rString ); +@@ -697,10 +697,10 @@ BitmapXlfd::ToString( ByteString &rStrin + + rString += "-*-"; + char pTmp[256]; +- sprintf( pTmp, pMatricsString, nPixelSize, nPixelSize ); ++ snprintf( pTmp, sizeof(pTmp), pMatricsString, nPixelSize, nPixelSize ); + rString += pTmp; + rString += "-*-*-"; +- rString += rInfo.mcSpacing; ++ rString += static_cast< char >(rInfo.mcSpacing); + rString += "-*"; + + AppendAttribute( mpFactory->RetrieveCharset(rInfo.mnCharset), rString ); +@@ -774,28 +774,9 @@ BitmapXlfd::ToString( ByteString &rStrin + AppendAttribute( mpFactory->RetrieveAddstyle(rInfo.mnAddstyle), rString ); + rString += '-'; + rString += ByteString::CreateFromInt32( mnPixelSize ); +- #ifdef __notdef__ +- // since mnPointSize is not asked when comparing two bitmap font xlfd +- // it may differ (and it does) for two fonts with same pixelsize +- rString += "-"; +- rString += ByteString::CreateFromInt32( mnPointSize ); +- rString += "-"; +- rString += ByteString::CreateFromInt32( rInfo.mnResolutionX ); +- rString += '-'; +- rString += ByteString::CreateFromInt32( rInfo.mnResolutionY ); +- rString += '-'; +- #else +- rString += "-*-*-*-"; +- #endif /* __notdef__ */ +- +- rString += rInfo.mcSpacing; +- +- #ifdef __notdef__ +- rString += '-'; +- rString += ByteString::CreateFromInt32( mnAverageWidth ); +- #else +- rString += "-*"; +- #endif ++ rString += "-*-*-*-"; ++ rString += static_cast< char >(rInfo.mcSpacing); ++ rString += "-*"; + + AppendAttribute( mpFactory->RetrieveCharset(rInfo.mnCharset), rString ); + } +@@ -836,7 +817,7 @@ ScalableXlfd::ToString( ByteString &rStr + rString += '-'; + rString += ByteString::CreateFromInt32( nPixelSize ); + rString += "-0-0-0-"; +- rString += rInfo.mcSpacing; ++ rString += static_cast< char >(rInfo.mcSpacing); + rString += "-0"; + + AppendAttribute( mpFactory->RetrieveCharset(rInfo.mnCharset), rString ); +@@ -857,10 +838,10 @@ ScalableXlfd::ToString( ByteString &rStr + + rString += "-*-"; + char pTmp[256]; +- sprintf( pTmp, pMatricsString, nPixelSize, nPixelSize ); ++ snprintf( pTmp, sizeof(pTmp), pMatricsString, nPixelSize, nPixelSize ); + rString += pTmp; + rString += "-*-*-"; +- rString += rInfo.mcSpacing; ++ rString += static_cast< char >(rInfo.mcSpacing); + rString += "-*"; + + AppendAttribute( mpFactory->RetrieveCharset(rInfo.mnCharset), rString ); +@@ -1018,7 +999,7 @@ VirtualXlfd::ToString( ByteString &rStri + rString += '-'; + rString += ByteString::CreateFromInt32( nPixelSize ); + rString += "-0-0-0-"; +- rString += rInfo.mcSpacing; ++ rString += static_cast< char >(rInfo.mcSpacing); + rString += "-0"; + + AppendAttribute( mpFactory->RetrieveCharset(rInfo.mnCharset), rString ); +@@ -1045,10 +1026,10 @@ VirtualXlfd::ToString( ByteString &rStri + + rString += "-*-"; + char pTmp[256]; +- sprintf( pTmp, pMatricsString, nPixelSize, nPixelSize ); ++ snprintf( pTmp, sizeof(pTmp), pMatricsString, nPixelSize, nPixelSize ); + rString += pTmp; + rString += "-*-*-"; +- rString += rInfo.mcSpacing; ++ rString += static_cast< char >(rInfo.mcSpacing); + rString += "-*"; + + AppendAttribute( mpFactory->RetrieveCharset(rInfo.mnCharset), rString ); +Index: vcl/unx/source/gdi/xlfd_extd.hxx +=================================================================== +RCS file: /cvs/gsl/vcl/unx/source/gdi/xlfd_extd.hxx,v +retrieving revision 1.9.120.2 +retrieving revision 1.12 +diff -u -p -u -r1.9.120.2 -r1.12 +--- vcl/unx/source/gdi/xlfd_extd.hxx 26 Jan 2004 17:27:37 -0000 1.9.120.2 ++++ vcl/unx/source/gdi/xlfd_extd.hxx 17 Mar 2004 10:07:56 -0000 1.12 +@@ -93,8 +93,8 @@ class XlfdStorage; + + class ExtendedXlfd { + +- friend VirtualXlfd; +- friend XlfdStorage; ++ friend class VirtualXlfd; ++ friend class XlfdStorage; + + public: + ExtendedXlfd(); +Index: vcl/unx/source/gdi/xlfd_smpl.cxx +=================================================================== +RCS file: /cvs/gsl/vcl/unx/source/gdi/xlfd_smpl.cxx,v +retrieving revision 1.5 +retrieving revision 1.7 +diff -u -p -u -r1.5 -r1.7 +--- vcl/unx/source/gdi/xlfd_smpl.cxx 15 Apr 2003 16:11:23 -0000 1.5 ++++ vcl/unx/source/gdi/xlfd_smpl.cxx 18 May 2004 13:49:24 -0000 1.7 +@@ -282,12 +282,12 @@ Xlfd::ToString( ByteString &rString ) co + AppendAttribute( mpFactory->RetrieveSetwidth(mnSetwidth), rString ); + AppendAttribute( mpFactory->RetrieveAddstyle(mnAddstyle), rString ); + +- rString += '-'; rString += ByteString::CreateFromInt32( mnPixelSize ); +- rString += '-'; rString += ByteString::CreateFromInt32( mnPointSize ); +- rString += '-'; rString += ByteString::CreateFromInt32( mnResolutionX ); +- rString += '-'; rString += ByteString::CreateFromInt32( mnResolutionY ); +- rString += '-'; rString += mcSpacing; +- rString += '-'; rString += ByteString::CreateFromInt32( mnAverageWidth ); ++ rString.Append("-"); rString.Append( ByteString::CreateFromInt32( mnPixelSize ) ); ++ rString.Append("-"); rString.Append( ByteString::CreateFromInt32( mnPointSize ) ); ++ rString.Append("-"); rString.Append( ByteString::CreateFromInt32( mnResolutionX ) ); ++ rString.Append("-"); rString.Append( ByteString::CreateFromInt32( mnResolutionY ) ); ++ rString.Append("-"); rString.Append( (char)mcSpacing ); ++ rString.Append("-"); rString.Append( ByteString::CreateFromInt32( mnAverageWidth ) ); + + AppendAttribute( mpFactory->RetrieveCharset(mnCharset), rString ); + +Index: vcl/unx/source/gdi/xprintext.cxx +=================================================================== +RCS file: /cvs/gsl/vcl/unx/source/gdi/xprintext.cxx,v +retrieving revision 1.6 +retrieving revision 1.8 +diff -u -p -u -r1.6 -r1.8 +--- vcl/unx/source/gdi/xprintext.cxx 15 Apr 2003 16:11:42 -0000 1.6 ++++ vcl/unx/source/gdi/xprintext.cxx 30 Mar 2004 13:43:56 -0000 1.8 +@@ -59,8 +59,6 @@ + * + ************************************************************************/ + +-#define _VCL_XPRINT_EXTENSION_CXX +- + #include <stdio.h> + #include <stdlib.h> + #include <unistd.h> +@@ -432,7 +430,7 @@ SalPrinter::StartJob( + XpSelectInput (pDisplay, aContext, XPPrintMask); + + char pJobName[ 64 ]; +- sprintf (pJobName, "%s.job-name: XPrint%d", pPrinterName, getpid() ); ++ snprintf (pJobName, sizeof(pJobName), "%s.job-name: XPrint%d", pPrinterName, getpid() ); + + XpStartJob( pDisplay, XPSpool ); + diff --git a/patches/OOO_1_1_2/word-count.diff b/patches/OOO_1_1_2/word-count.diff new file mode 100644 index 000000000..40ae70725 --- /dev/null +++ b/patches/OOO_1_1_2/word-count.diff @@ -0,0 +1,287 @@ +Index: sw/inc/cmdid.h +=================================================================== +RCS file: /cvs/sw/sw/inc/cmdid.h,v +retrieving revision 1.46 +diff -u -p -u -r1.46 cmdid.h +--- sw/inc/cmdid.h 22 May 2003 08:40:37 -0000 1.46 ++++ sw/inc/cmdid.h 31 Jul 2003 17:01:16 -0000 +@@ -749,6 +749,7 @@ Achtung: Ab sofort sind in diesem File k + #define FN_MACRO_POPUP (FN_EXTRA + 37) /* Alle Macrofunktionen */ + #define FN_BULLET (FN_EXTRA + 38) /* Bullet-Liste */ + ++#define FN_WORD_COUNT_DLG (FN_EXTRA + 39) + + // Bereich: Gloassaries + +Index: sw/sdi/swriter.sdi +=================================================================== +RCS file: /cvs/sw/sw/sdi/swriter.sdi,v +retrieving revision 1.43 +diff -u -p -u -r1.43 swriter.sdi +--- sw/sdi/swriter.sdi 22 May 2003 08:42:09 -0000 1.43 ++++ sw/sdi/swriter.sdi 31 Jul 2003 17:01:17 -0000 +@@ -8482,6 +8482,29 @@ SfxBoolItem UnderlineDouble FN_UNDERLINE + ] + + //-------------------------------------------------------------------------- ++SfxVoidItem WordCount FN_WORD_COUNT_DLG ++() ++[ ++ /* flags: */ ++ AutoUpdate = FALSE, ++ Cachable = Cachable, ++ FastCall = FALSE, ++ HasCoreId = FALSE, ++ HasDialog = TRUE, ++ ReadOnlyDoc = TRUE, ++ Toggle = TRUE, ++ Container = FALSE, ++ Asynchron; ++ ++ /* config: */ ++ AccelConfig = TRUE, ++ MenuConfig = TRUE, ++ StatusBarConfig = FALSE, ++ ToolBoxConfig = TRUE, ++ GroupId = GID_DOCUMENT; ++] ++ ++//-------------------------------------------------------------------------- + SfxVoidItem UnhainFrames FN_FRAME_UNCHAIN + + [ +Index: sw/sdi/swslots.src +=================================================================== +RCS file: /cvs/sw/sw/sdi/swslots.src,v +retrieving revision 1.109 +diff -u -p -u -r1.109 swslots.src +--- sw/sdi/swslots.src 17 Jul 2003 11:48:28 -0000 1.109 ++++ sw/sdi/swslots.src 31 Jul 2003 17:01:27 -0000 +@@ -3685,6 +3685,56 @@ SfxSlotInfo FN_HYPHENATE_OPT_DLG + SlotName[ hindi ] = "हाइफनेशन"; + SlotName[ slovak ] = "Delenie slov"; + }; ++SfxSlotInfo FN_WORD_COUNT_DLG ++{ ++ SlotName = "Wörter zählen..."; ++ SlotName[ arabic ] = "ÅÍÕÇÆíÇÊ"; ++ SlotName[ english ] = "Word count"; ++ SlotName[ english_us ] = "Word count"; ++ SlotName[ catalan ] = "Comptador de paraules"; ++ SlotName[ czech ] = "PoÄet slov"; ++ SlotName[ danish ] = "Ordoptælling"; ++ SlotName[ greek ] = "Áñßèìçóç ËÝîåùí"; ++ SlotName[ spanish ] = "Contar palabras"; ++ SlotName[ estonian ] = "Sõnade arv"; ++ SlotName[ finnish ] = "Laske sanat"; ++ SlotName[ french ] = "Statistiques"; ++ SlotName[ hindi ] = "शबà¥à¤¦ गिनें"; ++ SlotName[ italian ] = "Statistiche"; ++ SlotName[ hungarian ] = "Szavak száma"; ++ SlotName[ japanese ] = "ワードカウント"; ++ SlotName[ korean ] = "통계"; ++ SlotName[ norwegian ] = "Ordtelling"; ++ SlotName[ dutch ] = "Woorden tellen"; ++ SlotName[ polish ] = "Liczba s³ów"; ++ SlotName[ portuguese ] = "Contagem palavras"; ++ SlotName[ portuguese_brazilian ] = "Contagem palavras"; ++ SlotName[ russian ] = "Êîëè÷åñòâî ñëîâ"; ++ SlotName[ slovak ] = "PoÄet slov"; ++ SlotName[ swedish ] = "Ordräkning"; ++ SlotName[ turkish ] = "Ýstatistik"; ++ SlotName[ chinese_simplified ] = "统计"; ++ SlotName[ chinese_traditional ] = "統計"; ++ SlotName[ slovenian ] = "Å tevilo besed"; ++ SlotName[ thai ] = "Word count"; ++ SlotName[ hebrew ] = "Word count"; ++ SlotName[ estonian ] = "Word count"; ++ SlotName[ lithuanian ] = "Dokumento statistika"; ++/* --: "Word count" translations ++ az: "KÉ™lmÉ™ Miqdarı" ++ bs: "Zbir rijeÄi" ++ cy: "Cyfrif geiriau" ++ eu: "Hitz kopurua" ++ mk: "Броење на зборови" ++ mt: "Għadd ta’ kliem" ++ ro: "Numără cuvintele" ++ sq: "Llogariti fjalët" ++ ta: "சொல௠எணà¯à®£à®¿" ++ uk: "КількіÑÑ‚ÑŒ Ñлів" ++ vi: "Äếm từ" ++ wa: "Contaedje des mots" ++*/ ++}; + SfxSlotInfo FN_IDX_MARK_TO_IDX + { + SlotName = "Indexmarke zum Index"; +Index: sw/sdi/viewsh.sdi +=================================================================== +RCS file: /cvs/sw/sw/sdi/viewsh.sdi,v +retrieving revision 1.9 +diff -u -p -u -r1.9 viewsh.sdi +--- sw/sdi/viewsh.sdi 6 Dec 2002 13:58:48 -0000 1.9 ++++ sw/sdi/viewsh.sdi 31 Jul 2003 17:01:27 -0000 +@@ -112,6 +112,12 @@ interface TextEditView : BaseTextEditVie + StateMethod = GetState ; + DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR"; + ] ++ FN_WORD_COUNT_DLG // status(final|play) ++ [ ++ ExecMethod = ExecLingu ; ++ StateMethod = GetState ; ++ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR"; ++ ]; + FN_CHANGE_PAGENUM // status(final) + [ + ExecMethod = ExecDlg ; +Index: sw/source/ui/inc/swmn.hrc +=================================================================== +RCS file: /cvs/sw/sw/source/ui/inc/swmn.hrc,v +retrieving revision 1.133 +diff --context=15 -c -r1.133 swmn.hrc +*** sw/source/ui/inc/swmn.hrc.orig 2004-09-22 09:41:21.000000000 -0400 +--- sw/source/ui/inc/swmn.hrc 2004-09-23 09:09:01.214282641 -0400 +*************** +*** 9189,9218 **** +--- 9189,9271 ---- + Text[ extern ] = "~Hyphenation..."; + Text[ thai ] = "ใ~ช้ยัติภังค์..."; + Text[ czech ] = "DÄ›lenà slov..."; + Text[ hebrew ] = "שבירת מלי×..."; + Text[ hindi ] = "~हाइफनेशन..."; + Text[ slovak ] = "~Delenie slov..."; + Text[ hungarian ] = "~Elválasztás..."; + Text[ slovenian ] = "~Deljenje besed..."; + Text[ estonian ] = "~Poolitus..."; + Text[ welsh ] = "~Cyplysnodi..."; + Text[ northernsotho ] = "~Morathofatso..."; + Text[ afrikaans ] = "~Woordafbreking..."; + Text[ zulu ] = "~Ukwahlukaniswa kwamagama..."; + Text[ norwegian_nynorsk ] = "Orddeli~ng ..."; + }; ++ MenuItem ++ { ++ Identifier = FN_WORD_COUNT_DLG ; ++ HelpID = FN_WORD_COUNT_DLG ; ++ Text = "Wörter zählen..." ; ++ Text [ arabic ] = "ÅÍÕÇÆíÇÊ..."; ++ Text [ english ] = "Word count..."; ++ Text [ english_us ] = "Word count..."; ++ Text [ catalan ] = "Comptador de paraules..."; ++ Text [ czech ] = "PoÄet slov..."; ++ Text [ danish ] = "Ordoptælling..."; ++ Text [ greek ] = "Áñßèìçóç ËÝîåùí"; ++ Text [ spanish ] = "Contar palabras..."; ++ Text [ estonian ] = "Sõnade arv..."; ++ Text [ finnish ] = "Laske sanat..."; ++ Text [ french ] = "Statistiques..."; ++ Text [ hindi ] = "शबà¥à¤¦ गिनें..."; ++ Text [ italian ] = "Statistiche..."; ++ Text [ hungarian ] = "Szavak száma..."; ++ Text [ japanese ] = "ワードカウント..."; ++ Text [ korean ] = "통계..."; ++ Text [ norwegian ] = "Ordtelling..."; ++ Text [ dutch ] = "Woorden tellen..."; ++ Text [ polish ] = "Liczba s³ów..."; ++ Text [ portuguese ] = "Contagem palavras..."; ++ Text [ portuguese_brazilian ] = "Contagem palavras..."; ++ Text [ russian ] = "Êîëè÷åñòâî ñëîâ"; ++ Text [ slovak ] = "PoÄet slov..."; ++ Text [ swedish ] = "Ordräkning..."; ++ Text [ turkish ] = "Ýstatistik..."; ++ Text [ chinese_simplified ] = "统计..."; ++ Text [ chinese_traditional ] = "統計..."; ++ Text [ slovenian ] = "Å tevilo besed"; ++ Text [ thai ] = "Word count..."; ++ Text [ hebrew ] = "Word count..."; ++ Text [ estonian ] = "Word count..."; ++ Text [ lithuanian ] = "Dokumento ~statistika..."; ++ /* --: "Word count" translations ++ az: "KÉ™lmÉ™ Miqdarı" ++ bs: "Zbir rijeÄi" ++ cy: "Cyfrif geiriau" ++ eu: "Hitz kopurua" ++ mk: "Броење на зборови" ++ mt: "Għadd ta’ kliem" ++ ro: "Numără cuvintele" ++ sl: "Å tevilo besed" ++ sq: "Llogariti fjalët" ++ ta: "சொல௠எணà¯à®£à®¿" ++ uk: "КількіÑÑ‚ÑŒ Ñлів" ++ vi: "Äếm từ" ++ wa: "Contaedje des mots" ++ */ ++ }; + #endif + SEPARATOR ; + MenuItem + { + Identifier = SID_AUTO_CORRECT_DLG; + HelpID = SID_AUTO_CORRECT_DLG; + Text = "~AutoKorrektur/AutoFormat..." ; + Text [ English ] = "~AutoCorrect/AutoFormat..." ; + Text [ portuguese ] = "~AutoCorrecção/AutoFormato..." ; + Text [ english_us ] = "~AutoCorrect/AutoFormat..." ; + Text [ portuguese_brazilian ] = "~AutoCorreção/AutoFormatação..." ; + Text [ swedish ] = "~AutoKorrigering/AutoFormat..." ; + Text [ danish ] = "~AutoKorrektur/AutoFormat..." ; + Text [ italian ] = "Correzione/Formattazione a~utomatica..." ; + Text [ spanish ] = "~Corrección/Formateado automático..." ; +Index: sw/source/ui/uiview/viewling.cxx +=================================================================== +RCS file: /cvs/sw/sw/source/ui/uiview/viewling.cxx,v +retrieving revision 1.13 +diff -u -p -u -r1.13 viewling.cxx +--- sw/source/ui/uiview/viewling.cxx 17 Apr 2003 17:51:30 -0000 1.13 ++++ sw/source/ui/uiview/viewling.cxx 7 Aug 2003 12:38:22 -0000 +@@ -105,6 +105,9 @@ + #ifndef _SVX_DIALMGR_HXX //autogen + #include <svx/dialmgr.hxx> + #endif ++#ifndef _SFX_DINFDLG_HXX ++#include <sfx2/dinfdlg.hxx> ++#endif + #ifndef _SVX_LANGITEM_HXX + #include <svx/langitem.hxx> + #endif +@@ -214,6 +217,40 @@ void SwView::ExecLingu(SfxRequest &rReq) + case FN_HYPHENATE_OPT_DLG: + HyphenateDocument(); + break; ++ case FN_WORD_COUNT_DLG: { ++ ++ SfxObjectShell *pObjectShell = GetObjectShell(); ++ if (!pObjectShell) ++ break; ++ ++ String aURL, aTitle; ++ SfxDocumentInfo *pTmpDocInfo = new SfxDocumentInfo; ++ *pTmpDocInfo = pObjectShell->GetDocInfo (); ++ pTmpDocInfo->SetReadOnly( true ); ++ SfxDocumentInfoItem aDocInfoItem( aURL, *pTmpDocInfo ); ++ ++ SfxItemSet aSet(GetPool(), SID_DOCINFO, SID_DOCINFO, ++ SID_EXPLORER_PROPS_START, SID_EXPLORER_PROPS_START, 0L ); ++ aSet.Put( aDocInfoItem ); ++ aSet.Put( SfxStringItem( SID_EXPLORER_PROPS_START, aTitle ) ); ++ ++ // SwDocShell::CreateDocumentInfoDialog ++ SfxDocumentInfoDialog *pDlg = pObjectShell->CreateDocumentInfoDialog( 0, aSet ); ++ ++ pDlg->RemoveResetButton(); ++ pDlg->RemoveTabPage( TP_DOCINFODESC ); ++ pDlg->RemoveTabPage( TP_DOCINFODOC ); ++ pDlg->RemoveTabPage( TP_DOCINFOUSER ); ++ pDlg->RemoveTabPage( TP_DOCINFORELOAD ); ++ pDlg->GetCancelButton().Hide(); ++ ++ pDlg->Execute(); // discard return value - it's irrelevant. ++ ++ delete pDlg; ++ delete pTmpDocInfo; ++ break; ++ } ++ + default: + ASSERT(!this, falscher Dispatcher); + return; diff --git a/patches/OOO_1_1_3/apply b/patches/OOO_1_1_3/apply index 227ed0694..76789536d 100644 --- a/patches/OOO_1_1_3/apply +++ b/patches/OOO_1_1_3/apply @@ -10,12 +10,12 @@ PATCHPATH=.:../OOO_1_1:../evo2:../vclplug:../wpd:../mscodec Minimal : MinimalOnly, BuildBits Common : BuildBits, IconRender, Misc, MenuFixes, CalcFixes, WordPerfect, DBFixes -LinuxCommon : Common, VCLPlug, FilePickers, FontBits, i18n, SystemBits, RecentFiles, LinuxOnly, ODKFixes +LinuxCommon : Common, VCLPlug, FilePickers, FontBits, i18n, SystemBits, RecentFiles, LinuxOnly, ODKFixes, StartupNotification DebianBase : DebianOnly, LinuxCommon -Debian : DebianBase, XineramaPIC, GnomeVFS +Debian : DebianBase, XineramaPIC, GnomeVFS, Evo2 DebianWoody: DebianBase, OldLibArt -NonDebianCommon : VBABits, Lotus, StartupNotification +NonDebianCommon : VBABits, Lotus RedHatBase : LinuxCommon, GnomeVFS, GlobalDesktopFiles, NonDebianCommon, Evo2, RedHatOnly RHFedora : RedHatBase, RHFedoraOnly RHEL3 : RedHatBase, RHEL3Only, OldLibArt @@ -27,8 +27,8 @@ NLD : NovellBase, NLDOnly PLD : PLDOnly, LinuxCommon, KDECommon, GlobalDesktopFiles, NonDebianCommon KDE : LinuxCommon, KDEOnly -# Odd one, very few patches: Ark : ArkOnly, LinuxCommon, GlobalDesktopFiles, ODKFixes, VBABits + # somewhat odder: Win32 : VCLPlug, Common, ODKFixes, VBABits, Win32Only @@ -285,6 +285,12 @@ gui-interop-warnings.diff # fix updating symlinks; the symlink must be removed before it is replaced [X#66902] setup2-update-symlink.diff +# add mimetype entries to the .desktop files +sysui-mimetypes.diff + +# Linux/ARM Support, Debian #260435 +linux-arm-support.diff + [ ODKFixes ] # Fix ODK Java bits @@ -445,7 +451,7 @@ padmin-nofontconfig.diff # fix some brokenness with font sync settings #15507, #16683 gui-ft-use-system-font.diff -[ NovellOnly, RedHatOnly, PLDOnly ] +[ NovellOnly, RedHatOnly, PLDOnly, DebianOnly ] # Disable broken crashdialog bits module-buildset-crashrep.diff @@ -508,6 +514,14 @@ build-instsetoo-lang.diff # Temporary until above patch adapted for DebianOnly's needs build-instsetoo-langext.diff +# disable hindi and kannada because of #34210 +#disable-hindi-kannada.diff +# fix ,,resource larger than 64K cannot be handled'' issue [#34210] +build-split-resources.diff + +# allow build with free jars, #21678 +allow-free-jars.diff + [ i18n ] # Use the environment to determine locale #21191 @@ -530,6 +544,12 @@ i18n-calc-encoding.diff # Fix silly brokenness in langtab lists - #18826 translation-shift.diff +# add new turkish currency from 2005-01-01 and make it default, #35440 +l10n-YTL.diff + +# fix lt, Debian #280757 +lt-fixes.diff + [ SystemBits ] # use system db. 23779 @@ -572,6 +592,11 @@ gui-splash-redraw.diff no-splash-takeover.patch [ Misc ] +# Escape should cancel the print preview X#67133 #35777 +sw-escape-print-preview.diff + +# E-mail attachment file name appended with "_1" X#67684 #35780 +email-attachment.diff # Icu was patched to include rpath - remove it. icu-no-rpath.diff @@ -685,6 +710,21 @@ sc-merge-cell.diff # Precision improvements - #22811 sc-precision-var.diff sc-precision-skew.diff +# adds to Autofilter Empty-NonEmpty options bxc #62165 Issue#35578 +sc-autofilter-empty-nonempty.diff +# Improves the standard filter options and menu. bxc #62187 #62495 Issue#35579 +sc-standard-filter-options.diff +# Paste just to clip size bxc #62158 Issue#35580 +sc-paste-limitedsize.diff +# Hides the filtered rows when height of rows are changed bxc #62161 Issue#35581 +sc-filter-hide-filteredrows.diff +# allows not to delete nonfiltered rows while deleting filtered ones bxc #62186 Issue#35582 +sc-no-delete-filteredrows.diff +# Auto Fill doesnt fill filtered rows bxc # FIXME (find bug id in bxc and issuezilla) +sc-filters-fill-fix.diff +# Paste of cells automatically insert rows. bxc # FIXME (find bug id in bxc and issuezilla) +sc-paste-insert-rows.diff + [ VBABits ] @@ -853,9 +893,6 @@ resmgr-resource-path.diff # Push fonts into the ps stream always print-type42.diff -# resolution independant printing bits, #29483 -print-resolution-generic.diff - # in case the system is panicing; registry/data/org/openoffice/VCL.xcu is # not installed or broken; used for example if OOo is installed from an # installation set by ./install --interactive @@ -868,6 +905,9 @@ gui-font-paranoid-fallback.diff # splash pld-splash.diff +# fix ,,resource larger than 64K cannot be handled'' issue [#34210] +build-split-resources.diff + ####################################################### [ ArkOnly ] @@ -888,9 +928,11 @@ win32-msvs-2003-misc3.diff win32-msvs-2003-vclplug.diff # Build berkeleydb with dmake not crack-rock-make #27400 -win32-berkeleydb-toplevel.diff win32-berkeleydb-make-patch.diff +# Build fixes for the stlport and curl projects +win32-build-fixes-1-1-3.diff + # Odd sj2 / sjlib behavior on Win32 - badly fitted for no-java too. win32-sjlib.diff @@ -904,9 +946,6 @@ win32-bmp32-ssa-fixes.diff # Accelerate / cache DIB creation ( don't keep doing it ) win32-bmp32-speedup.diff -# Disable odk build -disable-odk-build.diff - # Novell splash - prolly belongs in a NovellWin32Only section but ... novell-splash.diff @@ -1058,7 +1097,7 @@ kde-splash.diff ######################################################## -[ KDEOnly, PLDOnly ] +[ KDEOnly, ArkOnly, PLDOnly ] # Preset Tools->Options->OpenOffice.org->External # programs->(HTTP|HTTPS|FTP|MAILTO) to "kfmclient exec" helper-programs-kde.diff diff --git a/patches/mscodec/.cvsignore b/patches/mscodec/.cvsignore deleted file mode 100644 index 282522db0..000000000 --- a/patches/mscodec/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -Makefile.in diff --git a/patches/mscodec/Makefile.am b/patches/mscodec/Makefile.am deleted file mode 100644 index 0b280d2c7..000000000 --- a/patches/mscodec/Makefile.am +++ /dev/null @@ -1 +0,0 @@ -EXTRA_DIST = $(wildcard *.diff) diff --git a/patches/mscodec/mscodec-sal.diff b/patches/mscodec/mscodec-sal.diff deleted file mode 100644 index 5c934d913..000000000 --- a/patches/mscodec/mscodec-sal.diff +++ /dev/null @@ -1,849 +0,0 @@ -Index: sal/inc/rtl/cipher.h -=================================================================== -RCS file: /cvs/porting/sal/inc/rtl/cipher.h,v -retrieving revision 1.4 -retrieving revision 1.4.242.1 -diff -u -r1.4 -r1.4.242.1 ---- sal/inc/rtl/cipher.h 29 Nov 2001 19:12:42 -0000 1.4 -+++ sal/inc/rtl/cipher.h 15 Mar 2004 19:14:54 -0000 1.4.242.1 -@@ -86,6 +86,7 @@ - enum __rtl_CipherAlgorithm - { - rtl_Cipher_AlgorithmBF, -+ rtl_Cipher_AlgorithmARCFOUR, - rtl_Cipher_AlgorithmInvalid, - rtl_Cipher_Algorithm_FORCE_EQUAL_SIZE = SAL_MAX_ENUM - }; -@@ -177,8 +178,8 @@ - rtlCipherError SAL_CALL rtl_cipher_init ( - rtlCipher Cipher, - rtlCipherDirection Direction, -- const sal_uInt8 *pKeyData, sal_uInt32 nKeyLen, -- const sal_uInt8 *pArgData, sal_uInt32 nArgLen -+ const sal_uInt8 *pKeyData, sal_Size nKeyLen, -+ const sal_uInt8 *pArgData, sal_Size nArgLen - ) SAL_THROW_EXTERN_C(); - - -@@ -195,8 +196,8 @@ - */ - rtlCipherError SAL_CALL rtl_cipher_encode ( - rtlCipher Cipher, -- const void *pData, sal_uInt32 nDatLen, -- sal_uInt8 *pBuffer, sal_uInt32 nBufLen -+ const void *pData, sal_Size nDatLen, -+ sal_uInt8 *pBuffer, sal_Size nBufLen - ) SAL_THROW_EXTERN_C(); - - -@@ -213,8 +214,8 @@ - */ - rtlCipherError SAL_CALL rtl_cipher_decode ( - rtlCipher Cipher, -- const void *pData, sal_uInt32 nDatLen, -- sal_uInt8 *pBuffer, sal_uInt32 nBufLen -+ const void *pData, sal_Size nDatLen, -+ sal_uInt8 *pBuffer, sal_Size nBufLen - ) SAL_THROW_EXTERN_C(); - - -@@ -249,8 +250,8 @@ - rtlCipherError SAL_CALL rtl_cipher_initBF ( - rtlCipher Cipher, - rtlCipherDirection Direction, -- const sal_uInt8 *pKeyData, sal_uInt32 nKeyLen, -- const sal_uInt8 *pArgData, sal_uInt32 nArgLen -+ const sal_uInt8 *pKeyData, sal_Size nKeyLen, -+ const sal_uInt8 *pArgData, sal_Size nArgLen - ) SAL_THROW_EXTERN_C(); - - -@@ -259,8 +260,8 @@ - */ - rtlCipherError SAL_CALL rtl_cipher_encodeBF ( - rtlCipher Cipher, -- const void *pData, sal_uInt32 nDatLen, -- sal_uInt8 *pBuffer, sal_uInt32 nBufLen -+ const void *pData, sal_Size nDatLen, -+ sal_uInt8 *pBuffer, sal_Size nBufLen - ) SAL_THROW_EXTERN_C(); - - -@@ -269,8 +270,8 @@ - */ - rtlCipherError SAL_CALL rtl_cipher_decodeBF ( - rtlCipher Cipher, -- const void *pData, sal_uInt32 nDatLen, -- sal_uInt8 *pBuffer, sal_uInt32 nBufLen -+ const void *pData, sal_Size nDatLen, -+ sal_uInt8 *pBuffer, sal_Size nBufLen - ) SAL_THROW_EXTERN_C(); - - -@@ -278,6 +279,64 @@ - @see rtl_cipher_destroy() - */ - void SAL_CALL rtl_cipher_destroyBF ( -+ rtlCipher Cipher -+) SAL_THROW_EXTERN_C(); -+ -+ -+/*======================================================================== -+ * -+ * rtl_cipherARCFOUR (RC4) interface. -+ * -+ *======================================================================*/ -+/** Create a RC4 cipher handle for the given mode. -+ @descr The RC4 symmetric stream cipher algorithm is specified in -+ Bruce Schneier: Applied Cryptography, 2nd edition, ch. 17.1 -+ -+ @see rtl_cipher_create() -+ -+ @param Mode [in] cipher mode. Must be rtl_Cipher_ModeStream. -+ @return Cipher handle, or 0 upon failure. -+ */ -+rtlCipher SAL_CALL rtl_cipher_createARCFOUR ( -+ rtlCipherMode Mode -+) SAL_THROW_EXTERN_C(); -+ -+ -+/** Inititialize a RC4 cipher for the given direction. -+ @see rtl_cipher_init() -+ */ -+rtlCipherError SAL_CALL rtl_cipher_initARCFOUR ( -+ rtlCipher Cipher, -+ rtlCipherDirection Direction, -+ const sal_uInt8 *pKeyData, sal_Size nKeyLen, -+ const sal_uInt8 *pArgData, sal_Size nArgLen -+) SAL_THROW_EXTERN_C(); -+ -+ -+/** Encode a buffer under the RC4 cipher algorithm. -+ @see rtl_cipher_encode() -+ */ -+rtlCipherError SAL_CALL rtl_cipher_encodeARCFOUR ( -+ rtlCipher Cipher, -+ const void *pData, sal_Size nDatLen, -+ sal_uInt8 *pBuffer, sal_Size nBufLen -+) SAL_THROW_EXTERN_C(); -+ -+ -+/** Decode a buffer under the RC4 cipher algorithm. -+ @see rtl_cipher_decode() -+ */ -+rtlCipherError SAL_CALL rtl_cipher_decodeARCFOUR ( -+ rtlCipher Cipher, -+ const void *pData, sal_Size nDatLen, -+ sal_uInt8 *pBuffer, sal_Size nBufLen -+) SAL_THROW_EXTERN_C(); -+ -+ -+/** Destroy a RC4 cipher handle. -+ @see rtl_cipher_destroy() -+ */ -+void SAL_CALL rtl_cipher_destroyARCFOUR ( - rtlCipher Cipher - ) SAL_THROW_EXTERN_C(); - -Index: sal/inc/rtl/digest.h -=================================================================== -RCS file: /cvs/porting/sal/inc/rtl/digest.h,v -retrieving revision 1.5 -retrieving revision 1.5.242.1 -diff -u -r1.5 -r1.5.242.1 ---- sal/inc/rtl/digest.h 29 Nov 2001 19:12:42 -0000 1.5 -+++ sal/inc/rtl/digest.h 15 Mar 2004 19:14:55 -0000 1.5.242.1 -@@ -304,6 +304,19 @@ - @see rtl_digest_get() - */ - rtlDigestError SAL_CALL rtl_digest_getMD5 ( -+ rtlDigest Digest, -+ sal_uInt8 *pBuffer, sal_uInt32 nBufLen -+) SAL_THROW_EXTERN_C(); -+ -+ -+/** Retrieve the raw (not finalized) MD5 digest value. -+ @descr This function is a non-standard replacement for -+ rtl_digest_getMD5() and must be used with caution. -+ -+ @postcond Digest initialized to accept another update sequence. -+ @see rtl_digest_get() -+ */ -+rtlDigestError SAL_CALL rtl_digest_rawMD5 ( - rtlDigest Digest, - sal_uInt8 *pBuffer, sal_uInt32 nBufLen - ) SAL_THROW_EXTERN_C(); -Index: sal/rtl/source/cipher.c -=================================================================== -RCS file: /cvs/porting/sal/rtl/source/cipher.c,v -retrieving revision 1.1.1.1 -retrieving revision 1.1.1.1.268.1 -diff -u -r1.1.1.1 -r1.1.1.1.268.1 ---- sal/rtl/source/cipher.c 18 Sep 2000 15:17:24 -0000 1.1.1.1 -+++ sal/rtl/source/cipher.c 15 Mar 2004 19:14:55 -0000 1.1.1.1.268.1 -@@ -129,13 +129,13 @@ - typedef rtlCipherError (SAL_CALL cipher_init_t) ( - rtlCipher Cipher, - rtlCipherDirection Direction, -- const sal_uInt8 *pKeyData, sal_uInt32 nKeyLen, -- const sal_uInt8 *pArgData, sal_uInt32 nArgLen); -+ const sal_uInt8 *pKeyData, sal_Size nKeyLen, -+ const sal_uInt8 *pArgData, sal_Size nArgLen); - - typedef rtlCipherError (SAL_CALL cipher_update_t) ( - rtlCipher Cipher, -- const void *pData, sal_uInt32 nDatLen, -- sal_uInt8 *pBuffer, sal_uInt32 nBufLen); -+ const void *pData, sal_Size nDatLen, -+ sal_uInt8 *pBuffer, sal_Size nBufLen); - - typedef void (SAL_CALL cipher_delete_t) (rtlCipher Cipher); - -@@ -172,6 +172,10 @@ - Cipher = rtl_cipher_createBF (Mode); - break; - -+ case rtl_Cipher_AlgorithmARCFOUR: -+ Cipher = rtl_cipher_createARCFOUR (Mode); -+ break; -+ - default: /* rtl_Cipher_AlgorithmInvalid */ - break; - } -@@ -184,8 +188,8 @@ - rtlCipherError SAL_CALL rtl_cipher_init ( - rtlCipher Cipher, - rtlCipherDirection Direction, -- const sal_uInt8 *pKeyData, sal_uInt32 nKeyLen, -- const sal_uInt8 *pArgData, sal_uInt32 nArgLen) -+ const sal_uInt8 *pKeyData, sal_Size nKeyLen, -+ const sal_uInt8 *pArgData, sal_Size nArgLen) - { - Cipher_Impl *pImpl = (Cipher_Impl*)Cipher; - if (pImpl == NULL) -@@ -202,8 +206,8 @@ - */ - rtlCipherError SAL_CALL rtl_cipher_encode ( - rtlCipher Cipher, -- const void *pData, sal_uInt32 nDatLen, -- sal_uInt8 *pBuffer, sal_uInt32 nBufLen) -+ const void *pData, sal_Size nDatLen, -+ sal_uInt8 *pBuffer, sal_Size nBufLen) - { - Cipher_Impl *pImpl = (Cipher_Impl*)Cipher; - if (pImpl == NULL) -@@ -219,8 +223,8 @@ - */ - rtlCipherError SAL_CALL rtl_cipher_decode ( - rtlCipher Cipher, -- const void *pData, sal_uInt32 nDatLen, -- sal_uInt8 *pBuffer, sal_uInt32 nBufLen) -+ const void *pData, sal_Size nDatLen, -+ sal_uInt8 *pBuffer, sal_Size nBufLen) - { - Cipher_Impl *pImpl = (Cipher_Impl*)Cipher; - if (pImpl == NULL) -@@ -276,8 +280,8 @@ - static rtlCipherError __rtl_cipherBF_init ( - CipherContextBF *ctx, - rtlCipherMode eMode, -- const sal_uInt8 *pKeyData, sal_uInt32 nKeyLen, -- const sal_uInt8 *pArgData, sal_uInt32 nArgLen); -+ const sal_uInt8 *pKeyData, sal_Size nKeyLen, -+ const sal_uInt8 *pArgData, sal_Size nArgLen); - - /** __rtl_cipherBF_update. - */ -@@ -285,8 +289,8 @@ - CipherContextBF *ctx, - rtlCipherMode eMode, - rtlCipherDirection eDirection, -- const sal_uInt8 *pData, sal_uInt32 nDatLen, -- sal_uInt8 *pBuffer, sal_uInt32 nBufLen); -+ const sal_uInt8 *pData, sal_Size nDatLen, -+ sal_uInt8 *pBuffer, sal_Size nBufLen); - - /** __rtl_cipherBF_updateECB. - */ -@@ -295,7 +299,7 @@ - rtlCipherDirection direction, - const sal_uInt8 *pData, - sal_uInt8 *pBuffer, -- sal_uInt32 nLength); -+ sal_Size nLength); - - /** __rtl_cipherBF_updateCBC. - */ -@@ -304,7 +308,7 @@ - rtlCipherDirection direction, - const sal_uInt8 *pData, - sal_uInt8 *pBuffer, -- sal_uInt32 nLength); -+ sal_Size nLength); - - /** __rtl_cipherBF_updateCFB. - */ -@@ -313,7 +317,7 @@ - rtlCipherDirection direction, - const sal_uInt8 *pData, - sal_uInt8 *pBuffer, -- sal_uInt32 nLength); -+ sal_Size nLength); - - /** __rtl_cipher_encode. - */ -@@ -701,8 +705,8 @@ - static rtlCipherError __rtl_cipherBF_init ( - CipherContextBF *ctx, - rtlCipherMode eMode, -- const sal_uInt8 *pKeyData, sal_uInt32 nKeyLen, -- const sal_uInt8 *pArgData, sal_uInt32 nArgLen) -+ const sal_uInt8 *pKeyData, sal_Size nKeyLen, -+ const sal_uInt8 *pArgData, sal_Size nArgLen) - { - CipherKeyBF *key; - sal_uInt32 D, DL, DR; -@@ -773,8 +777,8 @@ - CipherContextBF *ctx, - rtlCipherMode eMode, - rtlCipherDirection eDirection, -- const sal_uInt8 *pData, sal_uInt32 nDatLen, -- sal_uInt8 *pBuffer, sal_uInt32 nBufLen) -+ const sal_uInt8 *pData, sal_Size nDatLen, -+ sal_uInt8 *pBuffer, sal_Size nBufLen) - { - /* Check arguments. */ - if ((pData == NULL) || (pBuffer == NULL)) -@@ -830,7 +834,7 @@ - rtlCipherDirection direction, - const sal_uInt8 *pData, - sal_uInt8 *pBuffer, -- sal_uInt32 nLength) -+ sal_Size nLength) - { - CipherKeyBF *key; - sal_uInt32 DL, DR; -@@ -865,7 +869,7 @@ - rtlCipherDirection direction, - const sal_uInt8 *pData, - sal_uInt8 *pBuffer, -- sal_uInt32 nLength) -+ sal_Size nLength) - { - CipherKeyBF *key; - sal_uInt32 DL, DR; -@@ -918,7 +922,7 @@ - rtlCipherDirection direction, - const sal_uInt8 *pData, - sal_uInt8 *pBuffer, -- sal_uInt32 nLength) -+ sal_Size nLength) - { - sal_uInt8 *iv; - sal_uInt32 k; -@@ -1087,8 +1091,8 @@ - rtlCipherError SAL_CALL rtl_cipher_initBF ( - rtlCipher Cipher, - rtlCipherDirection Direction, -- const sal_uInt8 *pKeyData, sal_uInt32 nKeyLen, -- const sal_uInt8 *pArgData, sal_uInt32 nArgLen) -+ const sal_uInt8 *pKeyData, sal_Size nKeyLen, -+ const sal_uInt8 *pArgData, sal_Size nArgLen) - { - CipherBF_Impl *pImpl = (CipherBF_Impl*)Cipher; - -@@ -1113,8 +1117,8 @@ - */ - rtlCipherError SAL_CALL rtl_cipher_encodeBF ( - rtlCipher Cipher, -- const void *pData, sal_uInt32 nDatLen, -- sal_uInt8 *pBuffer, sal_uInt32 nBufLen) -+ const void *pData, sal_Size nDatLen, -+ sal_uInt8 *pBuffer, sal_Size nBufLen) - { - CipherBF_Impl *pImpl = (CipherBF_Impl*)Cipher; - if (pImpl == NULL) -@@ -1139,8 +1143,8 @@ - */ - rtlCipherError SAL_CALL rtl_cipher_decodeBF ( - rtlCipher Cipher, -- const void *pData, sal_uInt32 nDatLen, -- sal_uInt8 *pBuffer, sal_uInt32 nBufLen) -+ const void *pData, sal_Size nDatLen, -+ sal_uInt8 *pBuffer, sal_Size nBufLen) - { - CipherBF_Impl *pImpl = (CipherBF_Impl*)Cipher; - if (pImpl == NULL) -@@ -1175,3 +1179,239 @@ - } - } - -+/*======================================================================== -+ * -+ * rtl_cipher_ARCFOUR (RC4) internals. -+ * -+ *======================================================================*/ -+#define CIPHER_CBLOCK_ARCFOUR 256 -+ -+typedef struct cipherARCFOUR_context_st -+{ -+ unsigned int m_S[CIPHER_CBLOCK_ARCFOUR]; -+ unsigned int m_X, m_Y; -+} ContextARCFOUR_Impl; -+ -+typedef struct cipherARCFOUR_impl_st -+{ -+ Cipher_Impl m_cipher; -+ ContextARCFOUR_Impl m_context; -+} CipherARCFOUR_Impl; -+ -+/** rtl_cipherARCFOUR_init_Impl. -+ */ -+static rtlCipherError rtl_cipherARCFOUR_init_Impl ( -+ ContextARCFOUR_Impl *ctx, -+ const sal_uInt8 *pKeyData, sal_Size nKeyLen, -+ const sal_uInt8 *pArgData, sal_Size nArgLen); -+ -+/** rtl_cipherARCFOUR_update_Impl. -+ */ -+static rtlCipherError rtl_cipherARCFOUR_update_Impl ( -+ ContextARCFOUR_Impl *ctx, -+ const sal_uInt8 *pData, sal_Size nDatLen, -+ sal_uInt8 *pBuffer, sal_Size nBufLen); -+ -+/* -+ * rtl_cipherARCFOUR_init_Impl. -+ */ -+static rtlCipherError rtl_cipherARCFOUR_init_Impl ( -+ ContextARCFOUR_Impl *ctx, -+ const sal_uInt8 *pKeyData, sal_Size nKeyLen, -+ const sal_uInt8 *pArgData, sal_Size nArgLen) -+{ -+ unsigned int K[CIPHER_CBLOCK_ARCFOUR]; -+ unsigned int *L, *S; -+ unsigned int x, y, t; -+ sal_Size n, k; -+ -+ S = &(ctx->m_S[0]); -+ -+ /* Initialize S linearly. */ -+ for (x = 0; x < CIPHER_CBLOCK_ARCFOUR; x++) -+ S[x] = x; -+ -+ /* Initialize K with key, repeat key as necessary. */ -+ for (L = K, n = CIPHER_CBLOCK_ARCFOUR; n > nKeyLen; n -= nKeyLen) -+ { -+ for (k = 0; k < nKeyLen; k++) L[k] = pKeyData[k]; -+ L += nKeyLen; -+ } -+ for (k = 0; k < n; k++) L[k] = pKeyData[k]; -+ -+ /* Initialize S with K. */ -+ for (x = 0, y = 0; x < CIPHER_CBLOCK_ARCFOUR; x++) -+ { -+ y = (y + S[x] + K[x]) % CIPHER_CBLOCK_ARCFOUR; -+ t = S[x], S[x] = S[y], S[y] = t; /* swap S[x] and S[y] */ -+ } -+ -+ /* Initialize counters X and Y. */ -+ ctx->m_X = 0; -+ ctx->m_Y = 0; -+ -+ return rtl_Cipher_E_None; -+} -+ -+/* -+ * rtl_cipherARCFOUR_update_Impl. -+ */ -+static rtlCipherError rtl_cipherARCFOUR_update_Impl ( -+ ContextARCFOUR_Impl *ctx, -+ const sal_uInt8 *pData, sal_Size nDatLen, -+ sal_uInt8 *pBuffer, sal_Size nBufLen) -+{ -+ register unsigned int *S; -+ register unsigned int x, y, t; -+ sal_Size k; -+ -+ /* Check arguments. */ -+ if ((pData == NULL) || (pBuffer == NULL)) -+ return rtl_Cipher_E_Argument; -+ -+ if (!((0 < nDatLen) && (nDatLen <= nBufLen))) -+ return rtl_Cipher_E_BufferSize; -+ -+ /* Update. */ -+ S = &(ctx->m_S[0]); -+ for (k = 0; k < nDatLen; k++) -+ { -+ /* Update counters X and Y. */ -+ x = ctx->m_X; -+ y = ctx->m_Y; -+ x = (x + 1 ) % CIPHER_CBLOCK_ARCFOUR; -+ y = (y + S[x]) % CIPHER_CBLOCK_ARCFOUR; -+ ctx->m_X = x; -+ ctx->m_Y = y; -+ -+ /* Swap S[x] and S[y]. */ -+ t = S[x], S[x] = S[y], S[y] = t; -+ -+ /* Evaluate next key byte S[t]. */ -+ t = (S[x] + S[y]) % CIPHER_CBLOCK_ARCFOUR; -+ pBuffer[k] = pData[k] ^ ((sal_uInt8)(S[t] & 0xff)); -+ } -+ -+ return rtl_Cipher_E_None; -+} -+ -+/*======================================================================== -+ * -+ * rtl_cipher_ARCFOUR (RC4) implementation. -+ * -+ * Reference: -+ * Bruce Schneier: Applied Cryptography, 2nd edition, ch. 17.1 -+ * -+ *======================================================================*/ -+/* -+ * rtl_cipher_createARCFOUR. -+ */ -+rtlCipher SAL_CALL rtl_cipher_createARCFOUR (rtlCipherMode Mode) -+{ -+ CipherARCFOUR_Impl *pImpl = (CipherARCFOUR_Impl*)NULL; -+ -+ if (!(Mode == rtl_Cipher_ModeStream)) -+ return ((rtlCipher)NULL); -+ -+ pImpl = ((CipherARCFOUR_Impl*)rtl_allocateZeroMemory (sizeof (CipherARCFOUR_Impl))); -+ if (pImpl) -+ { -+ pImpl->m_cipher.m_algorithm = rtl_Cipher_AlgorithmARCFOUR; -+ pImpl->m_cipher.m_direction = rtl_Cipher_DirectionInvalid; -+ pImpl->m_cipher.m_mode = rtl_Cipher_ModeStream; -+ -+ pImpl->m_cipher.m_init = rtl_cipher_initARCFOUR; -+ pImpl->m_cipher.m_encode = rtl_cipher_encodeARCFOUR; -+ pImpl->m_cipher.m_decode = rtl_cipher_decodeARCFOUR; -+ pImpl->m_cipher.m_delete = rtl_cipher_destroyARCFOUR; -+ } -+ return ((rtlCipher)pImpl); -+} -+ -+/* -+ * rtl_cipher_initARCFOUR. -+ */ -+rtlCipherError SAL_CALL rtl_cipher_initARCFOUR ( -+ rtlCipher Cipher, -+ rtlCipherDirection Direction, -+ const sal_uInt8 *pKeyData, sal_Size nKeyLen, -+ const sal_uInt8 *pArgData, sal_Size nArgLen) -+{ -+ CipherARCFOUR_Impl *pImpl = (CipherARCFOUR_Impl*)Cipher; -+ -+ if ((pImpl == NULL) || (pKeyData == NULL)) -+ return rtl_Cipher_E_Argument; -+ -+ if (!(pImpl->m_cipher.m_algorithm == rtl_Cipher_AlgorithmARCFOUR)) -+ return rtl_Cipher_E_Algorithm; -+ -+ if (!(Direction == rtl_Cipher_DirectionInvalid)) -+ pImpl->m_cipher.m_direction = Direction; -+ else -+ return rtl_Cipher_E_Direction; -+ -+ return rtl_cipherARCFOUR_init_Impl ( -+ &(pImpl->m_context), -+ pKeyData, nKeyLen, pArgData, nArgLen); -+} -+ -+/* -+ * rtl_cipher_encodeARCFOUR. -+ */ -+rtlCipherError SAL_CALL rtl_cipher_encodeARCFOUR ( -+ rtlCipher Cipher, -+ const void *pData, sal_Size nDatLen, -+ sal_uInt8 *pBuffer, sal_Size nBufLen) -+{ -+ CipherARCFOUR_Impl *pImpl = (CipherARCFOUR_Impl*)Cipher; -+ if (pImpl == NULL) -+ return rtl_Cipher_E_Argument; -+ -+ if (!(pImpl->m_cipher.m_algorithm == rtl_Cipher_AlgorithmARCFOUR)) -+ return rtl_Cipher_E_Algorithm; -+ -+ if (pImpl->m_cipher.m_direction == rtl_Cipher_DirectionInvalid) -+ return rtl_Cipher_E_Direction; -+ -+ return rtl_cipherARCFOUR_update_Impl ( -+ &(pImpl->m_context), -+ (const sal_uInt8*)pData, nDatLen, pBuffer, nBufLen); -+} -+ -+/* -+ * rtl_cipher_decodeARCFOUR. -+ */ -+rtlCipherError SAL_CALL rtl_cipher_decodeARCFOUR ( -+ rtlCipher Cipher, -+ const void *pData, sal_Size nDatLen, -+ sal_uInt8 *pBuffer, sal_Size nBufLen) -+{ -+ CipherARCFOUR_Impl *pImpl = (CipherARCFOUR_Impl*)Cipher; -+ if (pImpl == NULL) -+ return rtl_Cipher_E_Argument; -+ -+ if (!(pImpl->m_cipher.m_algorithm == rtl_Cipher_AlgorithmARCFOUR)) -+ return rtl_Cipher_E_Algorithm; -+ -+ if (pImpl->m_cipher.m_direction == rtl_Cipher_DirectionInvalid) -+ return rtl_Cipher_E_Direction; -+ -+ return rtl_cipherARCFOUR_update_Impl ( -+ &(pImpl->m_context), -+ (const sal_uInt8*)pData, nDatLen, pBuffer, nBufLen); -+} -+ -+/* -+ * rtl_cipher_destroyARCFOUR. -+ */ -+void SAL_CALL rtl_cipher_destroyARCFOUR (rtlCipher Cipher) -+{ -+ CipherARCFOUR_Impl *pImpl = (CipherARCFOUR_Impl*)Cipher; -+ if (pImpl) -+ { -+ if (pImpl->m_cipher.m_algorithm == rtl_Cipher_AlgorithmARCFOUR) -+ rtl_freeZeroMemory (pImpl, sizeof (CipherARCFOUR_Impl)); -+ else -+ rtl_freeMemory (pImpl); -+ } -+} -Index: sal/rtl/source/digest.c -=================================================================== -RCS file: /cvs/porting/sal/rtl/source/digest.c,v -retrieving revision 1.6 -retrieving revision 1.6.256.1 -diff -u -r1.6 -r1.6.256.1 ---- sal/rtl/source/digest.c 6 May 2001 15:15:50 -0000 1.6 -+++ sal/rtl/source/digest.c 15 Mar 2004 19:14:55 -0000 1.6.256.1 -@@ -913,6 +913,38 @@ - ctx = &(pImpl->m_context); - - __rtl_digest_endMD5 (ctx); -+ RTL_DIGEST_LTOC (ctx->m_nA, p); -+ RTL_DIGEST_LTOC (ctx->m_nB, p); -+ RTL_DIGEST_LTOC (ctx->m_nC, p); -+ RTL_DIGEST_LTOC (ctx->m_nD, p); -+ __rtl_digest_initMD5 (ctx); -+ -+ return rtl_Digest_E_None; -+} -+ -+/* -+ * rtl_digest_rawMD5. -+ */ -+rtlDigestError SAL_CALL rtl_digest_rawMD5 ( -+ rtlDigest Digest, sal_uInt8 *pBuffer, sal_uInt32 nBufLen) -+{ -+ DigestMD5_Impl *pImpl = (DigestMD5_Impl *)Digest; -+ sal_uInt8 *p = pBuffer; -+ -+ DigestContextMD5 *ctx; -+ -+ if ((pImpl == NULL) || (pBuffer == NULL)) -+ return rtl_Digest_E_Argument; -+ -+ if (!(pImpl->m_digest.m_algorithm == rtl_Digest_AlgorithmMD5)) -+ return rtl_Digest_E_Algorithm; -+ -+ if (!(pImpl->m_digest.m_length <= nBufLen)) -+ return rtl_Digest_E_BufferSize; -+ -+ ctx = &(pImpl->m_context); -+ -+ /* __rtl_digest_endMD5 (ctx); *//* not finalized */ - RTL_DIGEST_LTOC (ctx->m_nA, p); - RTL_DIGEST_LTOC (ctx->m_nB, p); - RTL_DIGEST_LTOC (ctx->m_nC, p); -Index: sal/workben/t_cipher.c -=================================================================== -RCS file: /cvs/porting/sal/workben/t_cipher.c,v -retrieving revision 1.1.1.1 -retrieving revision 1.1.1.1.268.1 -diff -u -r1.1.1.1 -r1.1.1.1.268.1 ---- sal/workben/t_cipher.c 18 Sep 2000 15:17:30 -0000 1.1.1.1 -+++ sal/workben/t_cipher.c 15 Mar 2004 19:14:56 -0000 1.1.1.1.268.1 -@@ -206,13 +206,58 @@ - 0x51, 0x9D, 0x57, 0xA6, 0xC3 - }; - -+static sal_uInt8 arcfour_key[6][30] = -+{ -+ { 8, 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef }, -+ { 8, 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef }, -+ { 8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, -+ { 4, 0xef, 0x01, 0x23, 0x45 }, -+ { 8, 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef }, -+ { 4, 0xef, 0x01, 0x23, 0x45 } -+}; -+static sal_uInt8 arcfour_data_len[6] = -+{ -+ 8, 8, 8, 20, 28, 10 -+}; -+static sal_uInt8 arcfour_data[6][30] = -+{ -+ { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef, 0xff }, -+ { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff }, -+ { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff }, -+ { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0xff }, -+ { 0x12, 0x34, 0x56, 0x78, 0x9A, 0xBC, 0xDE, 0xF0, -+ 0x12, 0x34, 0x56, 0x78, 0x9A, 0xBC, 0xDE, 0xF0, -+ 0x12, 0x34, 0x56, 0x78, 0x9A, 0xBC, 0xDE, 0xF0, -+ 0x12, 0x34, 0x56, 0x78, 0xff }, -+ { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0xff } -+}; -+static sal_uInt8 arcfour_ok[6][30] = -+{ -+ { 0x75, 0xb7, 0x87, 0x80, 0x99, 0xe0, 0xc5, 0x96, 0x00}, -+ { 0x74, 0x94, 0xc2, 0xe7, 0x10, 0x4b, 0x08, 0x79, 0x00}, -+ { 0xde, 0x18, 0x89, 0x41, 0xa3, 0x37, 0x5d, 0x3a, 0x00}, -+ { 0xd6, 0xa1, 0x41, 0xa7, 0xec, 0x3c, 0x38, 0xdf, -+ 0xbd, 0x61, 0x5a, 0x11, 0x62, 0xe1, 0xc7, 0xba, -+ 0x36, 0xb6, 0x78, 0x58, 0x00 }, -+ { 0x66, 0xa0, 0x94, 0x9f, 0x8a, 0xf7, 0xd6, 0x89, -+ 0x1f, 0x7f, 0x83, 0x2b, 0xa8, 0x33, 0xc0, 0x0c, -+ 0x89, 0x2e, 0xbe, 0x30, 0x14, 0x3c, 0xe2, 0x87, -+ 0x40, 0x01, 0x1e, 0xcf, 0x00 }, -+ { 0xd6, 0xa1, 0x41, 0xa7, 0xec, 0x3c, 0x38, 0xdf, -+ 0xbd, 0x61, 0x00} -+}; -+ - int SAL_CALL main (int argc, char *argv) - { - rtlCipher cipher; - - /* ECB */ - cipher = rtl_cipher_create (rtl_Cipher_AlgorithmBF, rtl_Cipher_ModeECB); -- if (cipher) -+ OSL_ASSERT(cipher != 0); -+ if (cipher != 0) - { - rtlCipherError result; - sal_uInt8 ecb_in[40], ecb_out[40]; -@@ -240,7 +285,8 @@ - - /* CBC */ - cipher = rtl_cipher_create (rtl_Cipher_AlgorithmBF, rtl_Cipher_ModeCBC); -- if (cipher) -+ OSL_ASSERT(cipher != 0); -+ if (cipher != 0) - { - rtlCipherError result; - sal_uInt8 cbc_in[40], cbc_out[40]; -@@ -273,7 +319,8 @@ - - /* CFB */ - cipher = rtl_cipher_create (rtl_Cipher_AlgorithmBF, rtl_Cipher_ModeStream); -- if (cipher) -+ OSL_ASSERT(cipher != 0); -+ if (cipher != 0) - { - rtlCipherError result; - sal_uInt8 cfb_in[40], cfb_out[40]; -@@ -300,7 +347,81 @@ - cipher, cfb_out, length, cfb_in, sizeof(cfb_in)); - OSL_ASSERT(result == rtl_Cipher_E_None); - OSL_ASSERT(memcmp (cfb_in, cbc_data, length) == 0); -+ -+ rtl_cipher_destroy (cipher); -+ } -+ -+ /* ARCFOUR */ -+ cipher = rtl_cipher_create (rtl_Cipher_AlgorithmARCFOUR, rtl_Cipher_ModeStream); -+ OSL_ASSERT(cipher != 0); -+ if (cipher != 0) -+ { -+ rtlCipherError result; -+ sal_uInt8 arcfour_out[40]; -+ sal_Size length; -+ int i, n; -+ -+ n = sizeof(arcfour_data_len) / sizeof(arcfour_data_len[0]); -+ for (i = 0; i < n; i++) -+ { -+ length = arcfour_data_len[i]; -+ -+ result = rtl_cipher_init ( -+ cipher, rtl_Cipher_DirectionBoth, -+ &(arcfour_key[i][1]), arcfour_key[i][0], 0, 0); -+ OSL_ASSERT(result == rtl_Cipher_E_None); -+ -+ memset (arcfour_out, 0, sizeof(arcfour_out)); -+ result = rtl_cipher_encode ( -+ cipher, &(arcfour_data[i][0]), length, -+ arcfour_out, sizeof(arcfour_out)); -+ OSL_ASSERT(result == rtl_Cipher_E_None); -+ OSL_ASSERT(memcmp (arcfour_out, arcfour_ok[i], length) == 0); -+ } -+ -+ n = arcfour_data_len[3]; -+ for (i = 1; i < n; i++) -+ { -+ length = i; -+ -+ result = rtl_cipher_init ( -+ cipher, rtl_Cipher_DirectionBoth, -+ &(arcfour_key[3][1]), arcfour_key[3][0], 0, 0); -+ OSL_ASSERT(result == rtl_Cipher_E_None); -+ -+ memset (arcfour_out, 0, sizeof(arcfour_out)); -+ result = rtl_cipher_encode ( -+ cipher, &(arcfour_data[3][0]), length, -+ arcfour_out, sizeof(arcfour_out)); -+ OSL_ASSERT(result == rtl_Cipher_E_None); -+ OSL_ASSERT(memcmp (arcfour_out, arcfour_ok[3], length) == 0); -+ OSL_ASSERT(arcfour_out[length] == 0); -+ } -+ -+ n = arcfour_data_len[3]; -+ for (i = 1; i < n; i++) -+ { -+ length = i; -+ -+ result = rtl_cipher_init ( -+ cipher, rtl_Cipher_DirectionBoth, -+ &(arcfour_key[3][1]), arcfour_key[3][0], 0, 0); -+ OSL_ASSERT(result == rtl_Cipher_E_None); -+ -+ memset (arcfour_out, 0, sizeof(arcfour_out)); -+ result = rtl_cipher_encode ( -+ cipher, &(arcfour_data[3][0]), length, -+ &(arcfour_out[0]), sizeof(arcfour_out)); -+ OSL_ASSERT(result == rtl_Cipher_E_None); -+ -+ result = rtl_cipher_encode ( -+ cipher, &(arcfour_data[3][length]), n - length, -+ &(arcfour_out[length]), sizeof(arcfour_out) - length); -+ OSL_ASSERT(result == rtl_Cipher_E_None); -+ -+ OSL_ASSERT(memcmp (arcfour_out, arcfour_ok[3], length) == 0); -+ } - - rtl_cipher_destroy (cipher); - } - - ---- sal/util/sal.map 2004-09-02 12:52:58.255859848 +0100 -+++ sal/util/sal.map 2004-09-02 13:11:57.326694760 +0100 -@@ -169,6 +169,12 @@ - osl_unloadUserProfile; - osl_sendResourcePipe; - osl_receiveResourcePipe; -+ rtl_cipher_createARCFOUR; -+ rtl_cipher_initARCFOUR; -+ rtl_cipher_decodeARCFOUR; -+ rtl_cipher_encodeARCFOUR; -+ rtl_cipher_destroyARCFOUR; -+ rtl_digest_rawMD5; - rtl_allocateMemory; - rtl_compareMemory; - rtl_copyMemory; diff --git a/patches/mscodec/mscodec-sc-inc-warnpassword-hxx.diff b/patches/mscodec/mscodec-sc-inc-warnpassword-hxx.diff deleted file mode 100644 index a05291010..000000000 --- a/patches/mscodec/mscodec-sc-inc-warnpassword-hxx.diff +++ /dev/null @@ -1,85 +0,0 @@ ---- /dev/null 2004-07-26 12:51:14.000000000 +0100 -+++ sc/inc/warnpassword.hxx 2004-08-11 09:57:48.000000000 +0100 -@@ -0,0 +1,82 @@ -+/************************************************************************* -+ * -+ * $RCSfile$ -+ * -+ * $Revision$ -+ * -+ * last change: $Author$ $Date$ -+ * -+ * The Contents of this file are made available subject to the terms of -+ * either of the following licenses -+ * -+ * - GNU Lesser General Public License Version 2.1 -+ * - Sun Industry Standards Source License Version 1.1 -+ * -+ * Sun Microsystems Inc., October, 2000 -+ * -+ * GNU Lesser General Public License Version 2.1 -+ * ============================================= -+ * Copyright 2000 by Sun Microsystems, Inc. -+ * 901 San Antonio Road, Palo Alto, CA 94303, USA -+ * -+ * This library is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU Lesser General Public -+ * License version 2.1, as published by the Free Software Foundation. -+ * -+ * This library is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * Lesser General Public License for more details. -+ * -+ * You should have received a copy of the GNU Lesser General Public -+ * License along with this library; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, -+ * MA 02111-1307 USA -+ * -+ * -+ * Sun Industry Standards Source License Version 1.1 -+ * ================================================= -+ * The contents of this file are subject to the Sun Industry Standards -+ * Source License Version 1.1 (the "License"); You may not use this file -+ * except in compliance with the License. You may obtain a copy of the -+ * License at http://www.openoffice.org/license.html. -+ * -+ * Software provided under this License is provided on an "AS IS" basis, -+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, -+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, -+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. -+ * See the License for the specific provisions governing your rights and -+ * obligations concerning the Software. -+ * -+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc. -+ * -+ * Copyright: 2000 by Sun Microsystems, Inc. -+ * -+ * All Rights Reserved. -+ * -+ * Contributor(s): _______________________________________ -+ * -+ * -+ ************************************************************************/ -+ -+#ifndef SC_WARNPASSWORD_HXX -+#define SC_WARNPASSWORD_HXX -+ -+ -+ -+class SfxMedium; -+/** Static API helper functions. */ -+class ScWarnPassword -+{ -+public: -+ /** Opens a query warning dialog. -+ @descr Pop up Query on export with a choice of yes/no if a -+ an encrypted password is imported. -+ @return true if yes and false if no. default to true. -+ */ -+ static bool WarningOnPassword( SfxMedium& rMedium ); -+}; -+ -+ -+#endif -+ diff --git a/patches/mscodec/mscodec-sc-source-filter-excel-xlstream-cxx.diff b/patches/mscodec/mscodec-sc-source-filter-excel-xlstream-cxx.diff deleted file mode 100644 index f218fe2b1..000000000 --- a/patches/mscodec/mscodec-sc-source-filter-excel-xlstream-cxx.diff +++ /dev/null @@ -1,86 +0,0 @@ ---- /dev/null 2004-07-26 12:51:14.000000000 +0100 -+++ sc/source/filter/excel/xlstream.cxx 2004-08-11 10:03:01.000000000 +0100 -@@ -0,0 +1,83 @@ -+/************************************************************************* -+ * -+ * $RCSfile$ -+ * -+ * $Revision$ -+ * -+ * last change: $Author$ $Date$ -+ * -+ * The Contents of this file are made available subject to the terms of -+ * either of the following licenses -+ * -+ * - GNU Lesser General Public License Version 2.1 -+ * - Sun Industry Standards Source License Version 1.1 -+ * -+ * Sun Microsystems Inc., October, 2000 -+ * -+ * GNU Lesser General Public License Version 2.1 -+ * ============================================= -+ * Copyright 2000 by Sun Microsystems, Inc. -+ * 901 San Antonio Road, Palo Alto, CA 94303, USA -+ * -+ * This library is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU Lesser General Public -+ * License version 2.1, as published by the Free Software Foundation. -+ * -+ * This library is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * Lesser General Public License for more details. -+ * -+ * You should have received a copy of the GNU Lesser General Public -+ * License along with this library; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, -+ * MA 02111-1307 USA -+ * -+ * -+ * Sun Industry Standards Source License Version 1.1 -+ * ================================================= -+ * The contents of this file are subject to the Sun Industry Standards -+ * Source License Version 1.1 (the "License"); You may not use this file -+ * except in compliance with the License. You may obtain a copy of the -+ * License at http://www.openoffice.org/license.html. -+ * -+ * Software provided under this License is provided on an "AS IS" basis, -+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, -+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, -+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. -+ * See the License for the specific provisions governing your rights and -+ * obligations concerning the Software. -+ * -+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc. -+ * -+ * Copyright: 2000 by Sun Microsystems, Inc. -+ * -+ * All Rights Reserved. -+ * -+ * Contributor(s): _______________________________________ -+ * -+ * -+ ************************************************************************/ -+ -+// ============================================================================ -+ -+#ifndef SC_XLSTREAM_HXX -+#include "xlstream.hxx" -+#endif -+ -+// Encryption/decryption ====================================================== -+ -+const ByteString XclCryptoHelper::GetBiff5WbProtPassword() -+{ -+ static const ByteString saPass( "VelvetSweatshop" ); -+ return saPass; -+} -+ -+const String XclCryptoHelper::GetBiff8WbProtPassword() -+{ -+ static const String saPass( GetBiff5WbProtPassword(), RTL_TEXTENCODING_ASCII_US ); -+ return saPass; -+} -+ -+// ============================================================================ -+ diff --git a/patches/mscodec/mscodec-sc-source-filter-inc-xlstream-hxx.diff b/patches/mscodec/mscodec-sc-source-filter-inc-xlstream-hxx.diff deleted file mode 100644 index e7a43d7b3..000000000 --- a/patches/mscodec/mscodec-sc-source-filter-inc-xlstream-hxx.diff +++ /dev/null @@ -1,112 +0,0 @@ ---- /dev/null 2004-07-26 12:51:14.000000000 +0100 -+++ sc/source/filter/inc/xlstream.hxx 2004-08-11 10:07:17.000000000 +0100 -@@ -0,0 +1,109 @@ -+/************************************************************************* -+ * -+ * $RCSfile$ -+ * -+ * $Revision$ -+ * -+ * last change: $Author$ $Date$ -+ * -+ * The Contents of this file are made available subject to the terms of -+ * either of the following licenses -+ * -+ * - GNU Lesser General Public License Version 2.1 -+ * - Sun Industry Standards Source License Version 1.1 -+ * -+ * Sun Microsystems Inc., October, 2000 -+ * -+ * GNU Lesser General Public License Version 2.1 -+ * ============================================= -+ * Copyright 2000 by Sun Microsystems, Inc. -+ * 901 San Antonio Road, Palo Alto, CA 94303, USA -+ * -+ * This library is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU Lesser General Public -+ * License version 2.1, as published by the Free Software Foundation. -+ * -+ * This library is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * Lesser General Public License for more details. -+ * -+ * You should have received a copy of the GNU Lesser General Public -+ * License along with this library; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, -+ * MA 02111-1307 USA -+ * -+ * -+ * Sun Industry Standards Source License Version 1.1 -+ * ================================================= -+ * The contents of this file are subject to the Sun Industry Standards -+ * Source License Version 1.1 (the "License"); You may not use this file -+ * except in compliance with the License. You may obtain a copy of the -+ * License at http://www.openoffice.org/license.html. -+ * -+ * Software provided under this License is provided on an "AS IS" basis, -+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, -+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, -+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. -+ * See the License for the specific provisions governing your rights and -+ * obligations concerning the Software. -+ * -+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc. -+ * -+ * Copyright: 2000 by Sun Microsystems, Inc. -+ * -+ * All Rights Reserved. -+ * -+ * Contributor(s): _______________________________________ -+ * -+ * -+ ************************************************************************/ -+ -+// ============================================================================ -+ -+#ifndef SC_XLSTREAM_HXX -+#define SC_XLSTREAM_HXX -+ -+#ifndef _STREAM_HXX -+#include <tools/stream.hxx> -+#endif -+#ifndef _SVXERR_HXX -+#include <svx/svxerr.hxx> -+#endif -+ -+#ifndef SC_FTOOLS_HXX -+#include "ftools.hxx" -+#endif -+ -+// Constants ================================================================== -+ -+const sal_uInt32 EXC_REC_SEEK_TO_BEGIN = 0; -+const sal_uInt32 EXC_REC_SEEK_TO_END = SAL_MAX_UINT32; -+ -+const sal_uInt16 EXC_MAXRECSIZE_BIFF5 = 2080; -+const sal_uInt16 EXC_MAXRECSIZE_BIFF8 = 8224; -+ -+const ErrCode EXC_ENCR_ERROR_WRONG_PASS = ERRCODE_SVX_WRONGPASS; -+const ErrCode EXC_ENCR_ERROR_UNSUPP_CRYPT = ERRCODE_SVX_READ_FILTER_CRYPT; -+const sal_uInt16 EXC_ENCR_BLOCKSIZE = 1024; -+ -+const sal_uInt16 EXC_ID_UNKNOWN = SAL_MAX_UINT16; -+const sal_uInt16 EXC_ID_CONT = 0x003C; -+ -+// Encryption/decryption ====================================================== -+ -+/** Helper class for BIFF stream en-/decryption. */ -+class XclCryptoHelper : ScfNoInstance -+{ -+public: -+ /** Returns the fixed password for workbook protection. */ -+ static const ByteString GetBiff5WbProtPassword(); -+ -+ /** Returns the fixed password for workbook protection. */ -+ static const String GetBiff8WbProtPassword(); -+}; -+ -+// ============================================================================ -+ -+#endif -+ diff --git a/patches/mscodec/mscodec-sc-source-ui-unoobj-warnpassword-cxx.diff b/patches/mscodec/mscodec-sc-source-ui-unoobj-warnpassword-cxx.diff deleted file mode 100644 index f24608436..000000000 --- a/patches/mscodec/mscodec-sc-source-ui-unoobj-warnpassword-cxx.diff +++ /dev/null @@ -1,153 +0,0 @@ ---- /dev/null 2004-07-26 12:51:14.000000000 +0100 -+++ sc/source/ui/unoobj/warnpassword.cxx 2004-08-11 10:08:32.000000000 +0100 -@@ -0,0 +1,150 @@ -+/************************************************************************* -+ * -+ * $RCSfile$ -+ * -+ * $Revision$ -+ * -+ * last change: $Author$ $Date$ -+ * -+ * The Contents of this file are made available subject to the terms of -+ * either of the following licenses -+ * -+ * - GNU Lesser General Public License Version 2.1 -+ * - Sun Industry Standards Source License Version 1.1 -+ * -+ * Sun Microsystems Inc., October, 2000 -+ * -+ * GNU Lesser General Public License Version 2.1 -+ * ============================================= -+ * Copyright 2000 by Sun Microsystems, Inc. -+ * 901 San Antonio Road, Palo Alto, CA 94303, USA -+ * -+ * This library is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU Lesser General Public -+ * License version 2.1, as published by the Free Software Foundation. -+ * -+ * This library is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * Lesser General Public License for more details. -+ * -+ * You should have received a copy of the GNU Lesser General Public -+ * License along with this library; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, -+ * MA 02111-1307 USA -+ * -+ * -+ * Sun Industry Standards Source License Version 1.1 -+ * ================================================= -+ * The contents of this file are subject to the Sun Industry Standards -+ * Source License Version 1.1 (the "License"); You may not use this file -+ * except in compliance with the License. You may obtain a copy of the -+ * License at http://www.openoffice.org/license.html. -+ * -+ * Software provided under this License is provided on an "AS IS" basis, -+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, -+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, -+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. -+ * See the License for the specific provisions governing your rights and -+ * obligations concerning the Software. -+ * -+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc. -+ * -+ * Copyright: 2000 by Sun Microsystems, Inc. -+ * -+ * All Rights Reserved. -+ * -+ * Contributor(s): _______________________________________ -+ * -+ * -+ ************************************************************************/ -+ -+// ============================================================================ -+ -+#ifndef SC_WARNPASSWORD_HXX -+#include "warnpassword.hxx" -+#endif -+ -+#ifndef _COM_SUN_STAR_TASK_XINTERACTIONHANDLER_HPP_ -+#include <com/sun/star/task/XInteractionHandler.hpp> -+#endif -+#ifndef _COM_SUN_STAR_TASK_XINTERACTIONREQUEST_HPP_ -+#include <com/sun/star/task/XInteractionRequest.hpp> -+#endif -+ -+#ifndef _SFXITEMSET_HXX -+#include <svtools/itemset.hxx> -+#endif -+#ifndef _SFXDOCFILE_HXX -+#include <sfx2/docfile.hxx> -+#endif -+#ifndef _SFXSIDS_HRC -+#include <sfx2/sfxsids.hrc> -+#endif -+#ifndef _UCBHELPER_SIMPLEINTERACTIONREQUEST_HXX -+#include <ucbhelper/simpleinteractionrequest.hxx> -+#endif -+#ifndef _COM_SUN_STAR_TASK_INTERACTIONCLASSIFICATION_HPP_ -+#include <com/sun/star/task/InteractionClassification.hpp> -+#endif -+#ifndef _COM_SUN_STAR_UCB_INTERACTIVEAPPEXCEPTION_HPP_ -+#include <com/sun/star/ucb/InteractiveAppException.hpp> -+#endif -+#ifndef _COM_SUN_STAR_UCB_XCONTENT_HPP_ -+#include <com/sun/star/ucb/XContent.hpp> -+#endif -+#ifndef _SVXERR_HXX -+#include <svx/svxerr.hxx> -+#endif -+ -+ -+using ::rtl::OUString; -+using ::com::sun::star::uno::makeAny; -+using ::com::sun::star::uno::Any; -+using ::com::sun::star::uno::Reference; -+using ::com::sun::star::uno::Exception; -+using ::com::sun::star::uno::XInterface; -+using ::com::sun::star::task::InteractionClassification_QUERY; -+using ::com::sun::star::task::XInteractionHandler; -+using ::com::sun::star::task::XInteractionRequest; -+using ::com::sun::star::ucb::InteractiveAppException; -+ -+bool ScWarnPassword::WarningOnPassword( SfxMedium& rMedium ) -+{ -+ bool bReturn = true; -+ Reference< XInteractionHandler > xHandler( rMedium.GetInteractionHandler()); -+ if( xHandler.is() ) -+ { -+ -+ OUString empty; -+ Any xException( makeAny(InteractiveAppException(empty, -+ Reference <XInterface> (), -+ InteractionClassification_QUERY, -+ ERRCODE_SVX_EXPORT_FILTER_CRYPT))); -+ -+ Reference< ucbhelper::SimpleInteractionRequest > xRequest -+ = new ucbhelper::SimpleInteractionRequest( -+ xException, -+ ucbhelper::CONTINUATION_APPROVE -+ | ucbhelper::CONTINUATION_DISAPPROVE ); -+ -+ xHandler->handle( xRequest.get() ); -+ -+ const sal_Int32 nResp = xRequest->getResponse(); -+ -+ switch ( nResp ) -+ { -+ case ucbhelper::CONTINUATION_UNKNOWN: -+ break; -+ -+ case ucbhelper::CONTINUATION_APPROVE: -+ // Continue -+ break; -+ -+ case ucbhelper::CONTINUATION_DISAPPROVE: -+ bReturn = false; -+ break; -+ } -+ } -+ return bReturn; -+} diff --git a/patches/mscodec/mscodec-sc.diff b/patches/mscodec/mscodec-sc.diff deleted file mode 100644 index b467c4668..000000000 --- a/patches/mscodec/mscodec-sc.diff +++ /dev/null @@ -1,5839 +0,0 @@ -Index: sc/inc/filter.hxx -=================================================================== -RCS file: /cvs/sc/sc/inc/filter.hxx,v -retrieving revision 1.3 -retrieving revision 1.3.410.1 -diff -w -u -r1.3 -r1.3.410.1 ---- sc/inc/filter.hxx 20 Jul 2001 18:34:25 -0000 1.3 -+++ sc/inc/filter.hxx 23 Mar 2004 17:37:49 -0000 1.3.410.1 -@@ -121,8 +121,6 @@ - // *********************************************************************** - - FltError ScImportLotus123( SfxMedium&, ScDocument*, CharSet eSrc = RTL_TEXTENCODING_DONTKNOW ); -- --FltError ScImportExcel( SvStream&, ScDocument* ); - - FltError ScImportExcel( SfxMedium&, ScDocument* ); - -Index: sc/inc/scextopt.hxx -=================================================================== -RCS file: /cvs/sc/sc/inc/scextopt.hxx,v -retrieving revision 1.9 -retrieving revision 1.9.72.1 -diff -w -u -r1.9 -r1.9.72.1 ---- sc/inc/scextopt.hxx 4 Jun 2004 10:14:45 -0000 1.9 -+++ sc/inc/scextopt.hxx 16 Jul 2004 17:41:18 -0000 1.9.72.1 -@@ -158,6 +158,7 @@ - - BOOL bChanged; // for import: copy data only first time to doc - bool bWinProtection; // Excel Workbook Windows protection flag -+ bool bWinEncryption; // Excel Workbook Windows encryption flag - - void Reset(); - -@@ -202,6 +203,8 @@ - void AddCodename( const String& ); // -> tables - inline void SetWinProtection(bool bImportWinProtection) {bWinProtection = bImportWinProtection; } - inline bool IsWinProtected() { return bWinProtection; } -+ inline void SetWinEncryption(bool bImportWinEncryption) {bWinEncryption = bImportWinEncryption; } -+ inline bool IsWinEncrypted() { return bWinEncryption; } - }; - - - -Index: sc/source/filter/excel/XclImpCharts.cxx -=================================================================== -RCS file: /cvs/sc/sc/source/filter/excel/XclImpCharts.cxx,v -retrieving revision 1.15 -retrieving revision 1.13.6.3 -diff -w -u -r1.15 -r1.13.6.3 ---- sc/source/filter/excel/XclImpCharts.cxx 4 Jun 2004 10:41:11 -0000 1.15 -+++ sc/source/filter/excel/XclImpCharts.cxx 14 Jul 2004 10:13:54 -0000 1.13.6.3 -@@ -177,7 +177,7 @@ - XclImpObjectManager aObjManager( GetRoot() ); - XclImpEscherPropSet aPropSet( aObjManager.GetDffManager() ); - // read from stream -- rStrm.InitializeRecord( true, rStrm.GetRecId() ); -+ rStrm.ResetRecord( true, rStrm.GetRecId() ); - rStrm >> aPropSet; - // get the data - aPropSet.FillToItemSet( maItemSet ); -@@ -1324,8 +1324,7 @@ - rStrm.Ignore( 2 ); - UINT8 nLen; - rStrm >> nLen; -- rpString = new String; -- rStrm.AppendUniString( *rpString, nLen ); -+ rpString = new String( rStrm.ReadUniString( nLen ) ); - } - } - -Index: sc/source/filter/excel/biffdump.cxx -=================================================================== -RCS file: /cvs/sc/sc/source/filter/excel/biffdump.cxx,v -retrieving revision 1.64 -retrieving revision 1.62.6.6 -diff -w -u -r1.64 -r1.62.6.6 ---- sc/source/filter/excel/biffdump.cxx 4 Jun 2004 13:58:51 -0000 1.64 -+++ sc/source/filter/excel/biffdump.cxx 14 Jul 2004 10:14:18 -0000 1.62.6.6 -@@ -97,8 +97,8 @@ - #ifndef SC_FPROGRESSBAR_HXX - #include "fprogressbar.hxx" - #endif --#ifndef SC_XLTOOLS_HXX --#include "xltools.hxx" -+#ifndef SC_XICONTENT_HXX -+#include "xicontent.hxx" - #endif - - #ifndef _FLTTOOLS_HXX -@@ -133,9 +133,6 @@ - static UINT16 nSXLISize[2] = {0, 0}; // array size for SXLI records [rows/cols] - static UINT16 nSXLIIndex = 0; // current index for SXLI records - --extern const sal_Char* pUserNamesStreamName; --extern const sal_Char* pRevLogStreamName; -- - Biff8RecDumper __aDummyBiff8RecDumperInstance(); - - -@@ -917,6 +914,32 @@ - } - - -+void Biff8RecDumper::PreDumpDecrypted( ULONG nL ) -+{ -+ if( !nL ) return; -+ -+ ByteString t; -+ const sal_Char* pPre = (pLevelPre > pLevelPreString) ? pLevelPre - 1 : pLevelPre; -+ -+ LINESTART(); -+ ADDTEXT( "*** encrypted ***" ); -+ PRINT(); -+ pIn->DisableDecryption(); -+ pIn->Seek( EXC_REC_SEEK_TO_BEGIN ); -+ ContDump( nL ); -+ -+ if( pIn->HasValidDecrypter() ) -+ { -+ LINESTART(); -+ ADDTEXT( "*** decrypted ***" ); -+ PRINT(); -+ pIn->EnableDecryption(); -+ pIn->Seek( EXC_REC_SEEK_TO_BEGIN ); -+ ContDump( nL ); -+ } -+} -+ -+ - void Biff8RecDumper::RecDump( BOOL bSubStream ) - { - const sal_Char* p; -@@ -926,6 +949,15 @@ - const UINT16 nR = pIn->GetRecId(); - const ByteString* pName = GetName( nR ); - -+ // detect BIFF version -+ switch( nR ) -+ { -+ case 0x0009: SetBiff( xlBiff2 ); break; -+ case 0x0209: SetBiff( xlBiff3 ); break; -+ case 0x0409: SetBiff( xlBiff4 ); break; -+ case 0x0809: SetBiff( bBIFF8 ? xlBiff8 : xlBiff5 ); break; -+ } -+ - // set CONTINUE handling mode - switch( nR ) - { -@@ -934,10 +966,10 @@ - case 0x005D: // OBJ - case 0x00EC: // MSODRAWING - case 0x01B6: // TXO -- pIn->InitializeRecord( false ); -+ pIn->ResetRecord( false ); - break; - default: -- pIn->InitializeRecord( bReadContRecs ); -+ pIn->ResetRecord( bReadContRecs ); - } - const ULONG nL = pIn->GetRecSize(); - -@@ -1003,7 +1035,7 @@ - if( !bSkipOffset ) - { - aT += " :"; -- __AddHex( aT, UINT32(pIn->Tell() - 2 * sizeof(UINT16)) ); -+ __AddHex( aT, UINT32(pIn->GetSvStreamPos() - 2 * sizeof(UINT16)) ); - aT += ':'; - } - -@@ -1013,11 +1045,25 @@ - if( HasModeNameOnly( nR ) ) - ; - else if( HasModeHex( nR ) || !bBIFF8 ) -+ { -+ if( bEncrypted ) -+ PreDumpDecrypted( nL ); -+ else - ContDump( nL ); -+ } - else if( nMaxBodyLines && nL ) - { - XclImpStream& rIn = *pIn; - -+ if( bEncrypted ) -+ { -+ PreDumpDecrypted( nL ); -+ LINESTART(); -+ ADDTEXT( "*** contents ***" ); -+ PRINT(); -+ pIn->Seek( EXC_REC_SEEK_TO_BEGIN ); -+ } -+ - LINESTART(); - - switch( nR ) -@@ -1353,9 +1399,20 @@ - { - case 0x0001: - { -- ADDTEXT( "BIFF8 standard) key=..." ); -+ ADDTEXT( "BIFF8 standard)" ); - PRINT(); -- ContDump( rIn.GetRecLeft() ); -+ LINESTART(); -+ ADDTEXT( "document-id=..." ); -+ PRINT(); -+ ContDump( 16 ); -+ LINESTART(); -+ ADDTEXT( "salt-data=..." ); -+ PRINT(); -+ ContDump( 16 ); -+ LINESTART(); -+ ADDTEXT( "salt-hash=..." ); -+ PRINT(); -+ ContDump( 16 ); - } - break; - case 0x0002: -@@ -1374,12 +1431,12 @@ - ADDTEXT( " hash-key-len=" ); ADDDEC( 4 ); - PRINT(); - LINESTART(); -- ADDTEXT( "unknown=" ); ADDHEX( 4 ); -+ ADDTEXT( "crypt-prov-type=" ); ADDHEX( 4 ); - ADDTEXT( " unknown=" ); ADDHEX( 4 ); - ADDTEXT( " unknown=" ); ADDHEX( 4 ); - PRINT(); - LINESTART(); -- ADDTEXT( "crypto-provider='" ); -+ ADDTEXT( "crypt-provider-name='" ); - sal_uInt16 nChar; - do - { -@@ -1393,12 +1450,16 @@ - LINESTART(); - sal_uInt32 nLen; - rIn >> nLen; -- ADDTEXT( "*** key1 *** len=" ); __AddHex( t, nLen ); -+ ADDTEXT( "*** document-id *** len=" ); __AddHex( t, nLen ); - PRINT(); -- ContDump( 2 * nLen ); -+ ContDump( nLen ); -+ LINESTART(); -+ ADDTEXT( "*** salt-data *** len=" ); __AddHex( t, nLen ); -+ PRINT(); -+ ContDump( nLen ); - LINESTART(); - rIn >> nLen; -- ADDTEXT( "*** key2 *** len=" ); __AddHex( t, nLen ); -+ ADDTEXT( "*** salt-hash *** len=" ); __AddHex( t, nLen ); - PRINT(); - ContDump( nLen ); - } -@@ -1420,7 +1481,6 @@ - ContDump( rIn.GetRecLeft() ); - } - } -- bBIFF8 = FALSE; // continue in hex mode - } - break; - case 0x0031: // FONT -@@ -1478,6 +1538,7 @@ - String aData; - sal_uInt32 __nFlags; - LINESTART(); -+ rIn.SetNulSubstChar( '\0' ); - aData = rIn.ReadRawUniString( 32, true ); - ADDTEXT( "device-name='" ); ADDTEXT( GETSTR( aData ) ); - ADDTEXT( "'" ); -@@ -2604,6 +2665,7 @@ - break; - case 0x0138: // CHTRINFO - change tracking info - { -+ rIn.DisableDecryption(); - ADDTEXT( "14 bytes of unknown data..." ); - PRINT(); - ContDump( 14 ); -@@ -2919,6 +2981,7 @@ - break; - case 0x0194: - { -+ rIn.DisableDecryption(); - ADDTEXT( "unknown: " ); ADDHEX( 4 ); - ADDTEXT( " date/time: " ); ADDDEC( 2 ); - ADDTEXT( "-" ); ADDDEC( 1 ); -@@ -2940,8 +3003,13 @@ - ContDump( rIn.GetRecLeft() ); - } - break; -+ case 0x0195: -+ rIn.DisableDecryption(); -+ ContDump( nL ); -+ break; - case 0x0196: - { -+ rIn.DisableDecryption(); - ADDTEXT( "unknown: " ); ADDHEX( 2 ); - ADDTEXT( " " ); ADDHEX( 2 ); - ADDTEXT( " " ); ADDHEX( 2 ); -@@ -3910,6 +3978,7 @@ - break; - case 0x0809: // BOF - { -+ rIn.DisableDecryption(); - LINESTART(); - ADDTEXT( "version number: " ); - ADDHEX( 2 ); -@@ -4846,24 +4915,36 @@ - ContDump( nL ); - break; - case 0x1066: // ChartGelframe -- rIn.InitializeRecord( true, 0x1066 ); -+ rIn.ResetRecord( true, 0x1066 ); - EscherDump( nL ); - break; - case 0x1067: // ChartBoppcustom - ContDump( nL ); - break; - default: -+ if( !bEncrypted ) - ContDump( nL ); - } - - } - -+ if( nR == EXC_ID_FILEPASS ) -+ { -+ bEncrypted = true; -+ pIn->Seek( EXC_REC_SEEK_TO_BEGIN ); -+ bool bValid = (XclImpDecryptHelper::ReadFilepass( *pIn ) == ERRCODE_NONE); -+ LINESTART(); -+ ADDTEXT( "decrypter=" ); lcl_AddOnOff( t, bValid ); -+ PRINT(); -+ bBIFF8 = bBIFF8 && bValid; // dump BIFF8 hex only on invalid decrypter -+ } -+ - if( bDec ) - pLevelPre -= nLevelInc; - } - - --void Biff8RecDumper::DumpSubStream( SvStorage* pStorage, const sal_Char* pStreamName ) -+void Biff8RecDumper::DumpSubStream( SvStorage* pStorage, const String& rStrmName ) - { - ByteString sOutput; - -@@ -4875,14 +4956,12 @@ - return; - } - -- String sName; -- sName.AppendAscii( pStreamName ); -- if( !pStorage->IsContained( sName ) || !pStorage->IsStream( sName ) ) -+ if( !pStorage->IsContained( rStrmName ) || !pStorage->IsStream( rStrmName ) ) - return; - -- SvStream* pStream = pStorage->OpenStream( sName, STREAM_STD_READ ); -+ SvStorageStreamRef xSvStrm = OpenStream( pStorage, rStrmName ); - -- if( !pStream ) -+ if( !xSvStrm.Is() ) - { - sOutput = "-- no stream available --"; - Print( sOutput ); -@@ -4890,26 +4969,26 @@ - return; - } - -- pStream->Seek( STREAM_SEEK_TO_END ); -- if( pStream->Tell() == ~((ULONG)0) ) -+ xSvStrm->Seek( STREAM_SEEK_TO_END ); -+ if( xSvStrm->Tell() == STREAM_SEEK_TO_END ) - { - sOutput = "-- no stream available --"; - Print( sOutput ); - DBG_ERROR( "Biff8RecDumper::DumpSubStream - no stream available" ); -- delete pStream; - return; - } - - sOutput = "-- substream dump --"; - Print( sOutput ); - sOutput = "Stream name: "; -- sOutput += pStreamName; -+ sOutput += ByteString( rStrmName, RTL_TEXTENCODING_ASCII_US ); - Print( sOutput ); - - XclImpStream* pOldStream = pIn; -- pIn = new XclImpStream( *pStream, *pExcRoot->pIR ); -+ pIn = new XclImpStream( *xSvStrm, GetRoot() ); - XclImpStream& rIn = *pIn; -- rIn.SetWarningMode( bWarnings ); -+ if( pOldStream ) -+ rIn.CopyDecrypterFrom( *pOldStream ); - - // -- dump from here -- - UINT16 nId; -@@ -4927,16 +5006,14 @@ - sOutput = "-- end of stream --\n"; - Print( sOutput ); - delete pIn; -- delete pStream; - pIn = pOldStream; - } - - - void Biff8RecDumper::DumpPivotCache( const UINT16 nStrId ) - { -- ByteString sByteStrName; -- __AddPureHex( sByteStrName, nStrId ); -- DumpSubStream( pPivotCache, sByteStrName.GetBuffer() ); -+ SvStorageRef xStrg = OpenStorage( EXC_STORAGE_PTCACHE ); -+ DumpSubStream( xStrg, ScfTools::GetHexStr( nStrId ) ); - } - - -@@ -7815,7 +7892,7 @@ - if( *pOutName == "*" ) - { - ByteString aDefault( "DefaultDumpName.txt" ); -- SfxObjectShell* pShell = pExcRoot->pDoc->GetDocumentShell(); -+ SfxObjectShell* pShell = GetDocShell(); - if( pShell ) - { - SfxMedium* pMedium = pShell->GetMedium(); -@@ -8309,14 +8386,14 @@ - } - - --Biff8RecDumper::Biff8RecDumper( RootData& rRootData, BOOL _bBIFF8 ) : -- ExcRoot( &rRootData ), -- bBIFF8( _bBIFF8 ) -+Biff8RecDumper::Biff8RecDumper( const XclImpRoot& rRoot, BOOL _bBIFF8 ) : -+ XclImpRoot( rRoot ), -+ bBIFF8( _bBIFF8 ), -+ bEncrypted( false ) - { - nXFCount = 0; - nFontIndex = 0; - nInstances++; -- pPivotCache = NULL; - - if( !pCharType ) - { -@@ -8493,7 +8570,7 @@ - r.StoreGlobalPosition(); - while( r.StartNextRecord() ) - { -- r.InitializeRecord( false ); -+ r.ResetRecord( false ); - sal_uInt16 nRecSize = (sal_uInt16) Min( r.GetRecSize(), nBufLen ); - aBook << r.GetRecId() << nRecSize; - r.Read( pBuffer, nRecSize ); -@@ -8503,23 +8580,20 @@ - } - } - -- pPivotCache = pExcRoot->pPivotCacheStorage; -- - if( pTitle ) - *pDumpStream << pTitle->GetBuffer(); - - pIn = &r; - r.StoreGlobalPosition(); -- r.SetWarningMode( bWarnings ); - - ::std::auto_ptr< ScfProgressBar > pProgress( new ScfProgressBar( -- pExcRoot->pIR->GetDocShell(), String( RTL_CONSTASCII_USTRINGPARAM( "Dumper" ) ) ) ); -- sal_Int32 nStreamSeg = pProgress->AddSegment( r.GetStreamSize() ); -+ GetDocShell(), String( RTL_CONSTASCII_USTRINGPARAM( "Dumper" ) ) ) ); -+ sal_Int32 nStreamSeg = pProgress->AddSegment( r.GetSvStreamSize() ); - pProgress->ActivateSegment( nStreamSeg ); - - while( r.StartNextRecord() ) - { -- pProgress->Progress( r.Tell() ); -+ pProgress->Progress( r.GetSvStreamPos() ); - - if( HasModeDump( r.GetRecId() ) ) - RecDump(); -@@ -8531,17 +8605,22 @@ - pProgress.reset(); - - r.SeekGlobalPosition(); -- r.SetWarningMode( TRUE ); -- -- pPivotCache = NULL; - - // dump substreams -- if( pExcRoot->pRootStorage ) -+ if( GetRootStorage() ) - { -- DumpSubStream( pExcRoot->pRootStorage, pUserNamesStreamName ); -- DumpSubStream( pExcRoot->pRootStorage, pRevLogStreamName ); -+ pIn = NULL; -+ bool bOldEncr = bEncrypted; -+ bEncrypted = false; -+ DumpSubStream( GetRootStorage(), EXC_STREAM_USERNAMES ); -+ -+ pIn = &r; -+ bEncrypted = bOldEncr; -+ DumpSubStream( GetRootStorage(), EXC_STREAM_REVLOG ); -+ -+ pIn = NULL; - -- SvStorageStream* pContrIn = pExcRoot->pRootStorage->OpenStream( _STRINGCONST( "Ctls" ), STREAM_STD_READ ); -+ SvStorageStream* pContrIn = GetRootStorage()->OpenStream( _STRINGCONST( "Ctls" ), STREAM_STD_READ ); - if( pContrIn ) - ControlsDump( *pContrIn ); - } -Index: sc/source/filter/excel/colrowst.cxx -=================================================================== -RCS file: /cvs/sc/sc/source/filter/excel/colrowst.cxx,v -retrieving revision 1.22 -retrieving revision 1.22.72.1 -diff -w -u -r1.22 -r1.22.72.1 ---- sc/source/filter/excel/colrowst.cxx 4 Jun 2004 10:41:40 -0000 1.22 -+++ sc/source/filter/excel/colrowst.cxx 16 Jul 2004 17:39:37 -0000 1.22.72.1 -@@ -487,6 +487,7 @@ - bChanged = TRUE; - - SetWinProtection(false); -+ SetWinEncryption(false); - } - - -@@ -576,6 +577,7 @@ - - bChanged = rCpy.bChanged; - bWinProtection = rCpy.bWinProtection; -+ bWinEncryption = rCpy.bWinEncryption; - - return *this; - } -Index: sc/source/filter/excel/excchart.cxx -=================================================================== -RCS file: /cvs/sc/sc/source/filter/excel/excchart.cxx,v -retrieving revision 1.20 -retrieving revision 1.20.108.1 -diff -w -u -r1.20 -r1.20.108.1 ---- sc/source/filter/excel/excchart.cxx 5 Nov 2003 13:31:17 -0000 1.20 -+++ sc/source/filter/excel/excchart.cxx 23 Mar 2004 15:41:49 -0000 1.20.108.1 -@@ -304,7 +304,7 @@ - void ImportExcel8::ChartEof( void ) - { - // #90118# be able to read following CONTINUE record as MSODRAWING -- aIn.InitializeRecord( false ); -+ aIn.ResetRecord( false ); - bObjSection = TRUE; - } - -Index: sc/source/filter/excel/excel.cxx -=================================================================== -RCS file: /cvs/sc/sc/source/filter/excel/excel.cxx,v -retrieving revision 1.13 -retrieving revision 1.12.140.3 -diff -w -u -r1.13 -r1.12.140.3 ---- sc/source/filter/excel/excel.cxx 28 Jun 2004 17:56:06 -0000 1.13 -+++ sc/source/filter/excel/excel.cxx 14 Jul 2004 10:15:12 -0000 1.12.140.3 -@@ -111,30 +111,6 @@ - void DeInitFuncData(); - - -- --static const sal_Char* pWrkbkNameExcel5 = "Book"; --static const sal_Char* pWrkbkNameExcel97 = "Workbook"; --const sal_Char* pPivotCacheStorageName = "_SX_DB_CUR"; --const sal_Char* pVBAStorageName = "_VBA_PROJECT_CUR"; --const sal_Char* pVBASubStorageName = "VBA"; --const sal_Char* pUserNamesStreamName = "User Names"; --const sal_Char* pRevLogStreamName = "Revision Log"; -- --String lcl_GetDocUrl( const SfxMedium& rMedium ) --{ -- String aDocUrl; -- if( const SfxStringItem* pItem = (const SfxStringItem*) rMedium.GetItemSet()->GetItem( SID_FILE_NAME ) ) -- aDocUrl = pItem->GetValue(); -- return aDocUrl; --} -- --FltError ScImportExcel( SvStream& rStream, ScDocument* pDocument ) --{ -- ImportExcel aFilter( rStream, pDocument, String() ); -- return aFilter.Read(); --} -- -- - FltError ScImportExcel( SfxMedium& r, ScDocument* p ) - { - return ScImportExcel( r, p, EIF_AUTO ); -@@ -151,10 +127,10 @@ - { - // *** look for contained streams *** - -- const String aStreamName5( String::CreateFromAscii( pWrkbkNameExcel5 ) ); -+ const String aStreamName5( EXC_STREAM_BOOK ); - sal_Bool bHasBook = pStorage->IsContained( aStreamName5 ) && pStorage->IsStream( aStreamName5 ); - -- const String aStreamName8( String::CreateFromAscii( pWrkbkNameExcel97 ) ); -+ const String aStreamName8( EXC_STREAM_WORKBOOK ); - sal_Bool bHasWorkbook = pStorage->IsContained( aStreamName8 ) && pStorage->IsStream( aStreamName8 ); - - // *** handle user-defined filter selection *** -@@ -204,7 +180,7 @@ - - if( (eRet == eERR_OK) && pStreamName ) - { -- SvStorageStreamRef xStream = pStorage->OpenStream( *pStreamName, STREAM_READ | STREAM_SHARE_DENYALL ); -+ SvStorageStreamRef xStream = ScfTools::OpenStorageStreamRead( pStorage, *pStreamName ); - DBG_ASSERT( xStream.Is(), "ScImportExcel - missing stream" ); - xStream->SetBufferSize( 32768 ); - -@@ -222,13 +198,6 @@ - else if( bHasBook && (nVersion == 0x0600) ) - eBiffDetect = xlBiffDet8; - -- //!!! move into filter !!! -- const String aPvCchStrgNm( String::CreateFromAscii( pPivotCacheStorageName ) ); -- SvStorage* pPivotCacheStorage = NULL; -- if( eBiffDetect == xlBiffDet8 ) -- pPivotCacheStorage = pStorage->OpenStorage( aPvCchStrgNm, STREAM_STD_READ ); -- //!!! move into filter !!! -- - // *** and Go! *** - - if( eRet == eERR_OK ) -@@ -236,9 +205,9 @@ - ImportExcel* pFilter = NULL; - - if( eBiffDetect == xlBiffDet5 ) -- pFilter = new ImportExcel( *xStream, pDocument, lcl_GetDocUrl( rMedium ) ); -+ pFilter = new ImportExcel( rMedium, *xStream, pDocument ); - else if( eBiffDetect == xlBiffDet8 ) -- pFilter = new ImportExcel8( pStorage, *xStream, pDocument, lcl_GetDocUrl( rMedium ), pPivotCacheStorage ); -+ pFilter = new ImportExcel8( rMedium, *xStream, pDocument ); - - if( pFilter ) - eRet = pFilter->Read(); -@@ -263,7 +232,7 @@ - pStream->Seek( 0UL ); - pStream->SetBufferSize( 32768 ); - -- ImportExcel aFilter( *pStream, pDocument, lcl_GetDocUrl( rMedium ) ); -+ ImportExcel aFilter( rMedium, *pStream, pDocument ); - eRet = aFilter.Read(); - - pStream->SetBufferSize( 0 ); -@@ -293,19 +262,19 @@ - FltError ScExportExcel5( SfxMedium &rOutMedium, ScDocument *pDocument, - const BOOL bBiff8, CharSet eNach ) - { -- const sal_Char* pWrkBook; -+ String aWrkBook; - const sal_Char* pClipboard; - const sal_Char* pClassName; - - if( bBiff8 ) - { -- pWrkBook = pWrkbkNameExcel97; -+ aWrkBook = EXC_STREAM_WORKBOOK; - pClipboard = "Biff8"; - pClassName = "Microsoft Excel 97-Tabelle"; - } - else - { -- pWrkBook = pWrkbkNameExcel5; -+ aWrkBook = EXC_STREAM_BOOK; - pClipboard = "Biff5"; - pClassName = "Microsoft Excel 5.0-Tabelle"; - } -@@ -317,8 +286,7 @@ - SvStorage* pStorage = rOutMedium.GetStorage(); - if( pStorage ) - {// OLE2-Datei -- SvStorageStreamRef xStStream = -- pStorage->OpenStream( _STRING( pWrkBook ), STREAM_READWRITE | STREAM_TRUNC ); -+ SvStorageStreamRef xStStream = ScfTools::OpenStorageStreamWrite( pStorage, aWrkBook ); - - xStStream->SetBufferSize( 32768 ); - -@@ -329,12 +297,12 @@ - - if ( bBiff8 ) - { -- ExportBiff8 aFilter( *pStorage, *xStStream, xlBiff8, pDocument, lcl_GetDocUrl( rOutMedium ), eNach, bRelUrl ); -+ ExportBiff8 aFilter( rOutMedium, *xStStream, xlBiff8, pDocument, eNach, bRelUrl ); - eRet = aFilter.Write(); - } - else - { -- ExportBiff5 aFilter( *pStorage, *xStStream, xlBiff5, pDocument, lcl_GetDocUrl( rOutMedium ), eNach, bRelUrl ); -+ ExportBiff5 aFilter( rOutMedium, *xStStream, xlBiff5, pDocument, eNach, bRelUrl ); - eRet = aFilter.Write(); - } - -Index: sc/source/filter/excel/excform.cxx -=================================================================== -RCS file: /cvs/sc/sc/source/filter/excel/excform.cxx,v -retrieving revision 1.27 -retrieving revision 1.24.10.2 -diff -w -u -r1.27 -r1.24.10.2 ---- sc/source/filter/excel/excform.cxx 28 Jun 2004 16:52:55 -0000 1.27 -+++ sc/source/filter/excel/excform.cxx 14 Jul 2004 10:15:20 -0000 1.24.10.2 -@@ -432,8 +432,7 @@ - break; - case 0x17: // String Constant [314 266] - aIn >> nLen; -- aString.Erase(); -- aIn.AppendRawByteString( aString, nLen ); -+ aString = aIn.ReadRawByteString( nLen ); - - aStack << aPool.Store( aString ); - break; -Index: sc/source/filter/excel/excform8.cxx -=================================================================== -RCS file: /cvs/sc/sc/source/filter/excel/excform8.cxx,v -retrieving revision 1.28 -retrieving revision 1.26.6.2 -diff -w -u -r1.28 -r1.26.6.2 ---- sc/source/filter/excel/excform8.cxx 28 Jun 2004 17:56:19 -0000 1.28 -+++ sc/source/filter/excel/excform8.cxx 14 Jul 2004 10:15:28 -0000 1.26.6.2 -@@ -300,8 +300,7 @@ - break; - case 0x17: // String Constant [314 266] - aIn >> nLen; // und? -- aString.Erase(); -- aIn.AppendUniString( aString, nLen ); // reads Grbit even if nLen==0 -+ aString = aIn.ReadUniString( nLen ); // reads Grbit even if nLen==0 - - aStack << aPool.Store( aString ); - break; -Index: sc/source/filter/excel/excimp8.cxx -=================================================================== -RCS file: /cvs/sc/sc/source/filter/excel/excimp8.cxx,v -retrieving revision 1.93 -retrieving revision 1.90.6.5 -diff -w -u -r1.93 -r1.90.6.5 ---- sc/source/filter/excel/excimp8.cxx 28 Jun 2004 17:56:33 -0000 1.93 -+++ sc/source/filter/excel/excimp8.cxx 14 Jul 2004 10:15:37 -0000 1.90.6.5 -@@ -162,27 +162,19 @@ - - using namespace com::sun::star; - --extern const sal_Char* pVBAStorageName; --extern const sal_Char* pVBASubStorageName; -- -- - - #define INVALID_POS 0xFFFFFFFF - - - - --ImportExcel8::ImportExcel8( SvStorage* pStorage, SvStream& rStream, ScDocument* pDoc, const String& rDocUrl, SvStorage* pPivotCache ) : -- ImportExcel( rStream, pDoc, rDocUrl ) -+ImportExcel8::ImportExcel8( SfxMedium& rMedium, SvStream& rStream, ScDocument* pDoc ) : -+ ImportExcel( rMedium, rStream, pDoc ) - { - delete pFormConv; - - pFormConv = pExcRoot->pFmlaConverter = new ExcelToSc8( pExcRoot, aIn ); - -- pExcRoot->pPivotCacheStorage = pPivotCache; -- -- pExcRoot->pRootStorage = pStorage; -- - bHasBasic = FALSE; - } - -@@ -538,14 +530,13 @@ - { - if( pFiltOpt->IsLoadExcelBasicCode() || pFiltOpt->IsLoadExcelBasicStorage() ) - { -- DBG_ASSERT( pExcRoot->pRootStorage, "-ImportExcel8::PostDocLoad(): no storage, no cookies!" ); -+ DBG_ASSERT( GetRootStorage(), "-ImportExcel8::PostDocLoad(): no storage, no cookies!" ); - -- SvxImportMSVBasic aBasicImport( *pShell, *pExcRoot->pRootStorage, -+ SvxImportMSVBasic aBasicImport( *pShell, *GetRootStorage(), - pFiltOpt->IsLoadExcelBasicCode(), - pFiltOpt->IsLoadExcelBasicStorage() ); - -- aBasicImport.Import( String::CreateFromAscii( pVBAStorageName ), -- String::CreateFromAscii( pVBASubStorageName ) ); -+ aBasicImport.Import( EXC_STORAGE_VBA_PROJECT, EXC_STORAGE_VBA ); - } - } - } -@@ -557,7 +548,7 @@ - SfxDocumentInfo aNewDocInfo; - SfxDocumentInfo& rOldDocInfo = pShell->GetDocInfo(); - -- aNewDocInfo.LoadPropertySet( pExcRoot->pRootStorage ); -+ aNewDocInfo.LoadPropertySet( GetRootStorage() ); - - rOldDocInfo = aNewDocInfo; - pShell->Broadcast( SfxDocumentInfoHint( &rOldDocInfo ) ); -Index: sc/source/filter/excel/excobj.cxx -=================================================================== -RCS file: /cvs/sc/sc/source/filter/excel/excobj.cxx,v -retrieving revision 1.32 -retrieving revision 1.31.6.2 -diff -w -u -r1.32 -r1.31.6.2 ---- sc/source/filter/excel/excobj.cxx 4 Jun 2004 10:43:09 -0000 1.32 -+++ sc/source/filter/excel/excobj.cxx 14 Jul 2004 10:15:45 -0000 1.31.6.2 -@@ -424,7 +424,7 @@ - UINT16 nId; - aIn >> nId; - if( pChart ) -- aIn.AppendByteString( pChart->aLastLabel, FALSE ); -+ pChart->aLastLabel = aIn.ReadByteString( false ); - } - - -Index: sc/source/filter/excel/exctools.cxx -=================================================================== -RCS file: /cvs/sc/sc/source/filter/excel/exctools.cxx,v -retrieving revision 1.48 -retrieving revision 1.44.4.3 -diff -w -u -r1.48 -r1.44.4.3 ---- sc/source/filter/excel/exctools.cxx 28 Jun 2004 17:57:05 -0000 1.48 -+++ sc/source/filter/excel/exctools.cxx 14 Jul 2004 10:16:03 -0000 1.44.4.3 -@@ -120,12 +120,10 @@ - bBreakSharedFormula = TRUE; - bChartTab = FALSE; - -- pRootStorage = pPivotCacheStorage = /*pCtrlStorage = */NULL; - pAutoFilterBuffer = NULL; - pPrintRanges = new _ScRangeListTabs; - pPrintTitles = new _ScRangeListTabs; - -- pRootStorage = NULL; - pTabId = NULL; - pUserBViewList = NULL; - pCellMerging = NULL; -Index: sc/source/filter/excel/expop2.cxx -=================================================================== -RCS file: /cvs/sc/sc/source/filter/excel/expop2.cxx,v -retrieving revision 1.18 -retrieving revision 1.17.6.3 -diff -w -u -r1.18 -r1.17.6.3 ---- sc/source/filter/excel/expop2.cxx 4 Jun 2004 10:43:59 -0000 1.18 -+++ sc/source/filter/excel/expop2.cxx 14 Jul 2004 10:16:15 -0000 1.17.6.3 -@@ -93,17 +93,11 @@ - #include "xelink.hxx" - #endif - --extern const sal_Char* pVBAStorageName; --extern const sal_Char* pVBASubStorageName; - -- -- -- --ExportBiff5::ExportBiff5( SvStorage& rRootStorage, SvStream& aStream, XclBiff eBiff, ScDocument* pDoc, const String& rBasePath, CharSet eDest, bool bRelUrl ): -- XclExpRootData( eBiff, *pDoc, rBasePath, eDest, bRelUrl ), -+ExportBiff5::ExportBiff5( SfxMedium& rMedium, SvStream& aStream, XclBiff eBiff, ScDocument* pDoc, CharSet eDest, bool bRelUrl ): -+ XclExpRootData( eBiff, rMedium, *pDoc, eDest, bRelUrl ), - ExportTyp( aStream, pDoc, eDest ), - XclExpRoot( static_cast< XclExpRootData& >( *this ) ) -- // Excel immer Windoofs, Quelle (SC) immer System - { - DBG_ASSERT( pDoc, "-ExportBiff5::ExportBiff5(): No Null-Document!" ); - -@@ -117,7 +111,6 @@ - pExcRoot->eDateiTyp = Biff5; - pExcRoot->nColMax = static_cast<SCCOL>(XCL_COLMAX); - pExcRoot->nRowMax = static_cast<SCROW>(EXC5_ANZROW); -- pExcRoot->pRootStorage = &rRootStorage; - - pExcRoot->pCharset = &eZielChar; - -@@ -144,7 +137,6 @@ - { - FltError eRet = eERR_OK; - SvtFilterOptions* pFiltOpt = NULL; -- SvStorage* pRootStorage = pExcRoot->pRootStorage; - - if( pExcRoot->eHauptDateiTyp >= Biff8 ) - { -@@ -159,27 +151,27 @@ - { - SfxObjectShell& rDocShell = *pExcRoot->pDoc->GetDocumentShell(); - -- DBG_ASSERT( pExcRoot->pRootStorage, "-ImportExcel8::ImportExcel8(): no storage, no cookies!" ); -+ DBG_ASSERT( GetRootStorage(), "ExportBiff5::Write - no storage" ); - - SvxImportMSVBasic aBasicImport( rDocShell, -- *pRootStorage, -+ *GetRootStorage(), - pFiltOpt->IsLoadExcelBasicCode(), - pFiltOpt->IsLoadExcelBasicStorage() ); - -- ULONG nErr = aBasicImport.SaveOrDelMSVBAStorage( TRUE, _STRING( pVBAStorageName ) ); -+ ULONG nErr = aBasicImport.SaveOrDelMSVBAStorage( TRUE, EXC_STORAGE_VBA_PROJECT ); - - if( nErr != ERRCODE_NONE ) - rDocShell.SetError( nErr ); - } - - // VBA-storage written? -- pExcRoot->bWriteVBAStorage = pRootStorage->IsContained( _STRING( pVBAStorageName ) ); -+ pExcRoot->bWriteVBAStorage = GetRootStorage()->IsContained( EXC_STORAGE_VBA_PROJECT ); - - pExcDoc->ReadDoc(); // ScDoc -> ExcDoc - pExcDoc->Write( aOut ); // wechstreamen - - SfxDocumentInfo& rInfo = rDocShell.GetDocInfo(); -- rInfo.SavePropertySet( pExcRoot->pRootStorage ); -+ rInfo.SavePropertySet( GetRootStorage() ); - - if( pExcRoot->bCellCut || IsTruncated() ) - return SCWARN_EXPORT_MAXROW; -@@ -189,8 +181,8 @@ - - - --ExportBiff8::ExportBiff8( SvStorage& rRootStorage, SvStream& aStream, XclBiff eBiff, ScDocument* pDoc, const String& rBasePath, CharSet eZ, bool bRelUrl ) : -- ExportBiff5( rRootStorage, aStream, eBiff, pDoc, rBasePath, eZ, bRelUrl ) -+ExportBiff8::ExportBiff8( SfxMedium& rMedium, SvStream& aStream, XclBiff eBiff, ScDocument* pDoc, CharSet eZ, bool bRelUrl ) : -+ ExportBiff5( rMedium, aStream, eBiff, pDoc, eZ, bRelUrl ) - { - pExcRoot->eHauptDateiTyp = Biff8; - pExcRoot->eDateiTyp = Biff8; -Index: sc/source/filter/excel/impop.cxx -=================================================================== -RCS file: /cvs/sc/sc/source/filter/excel/impop.cxx,v -retrieving revision 1.61 -retrieving revision 1.60.4.6 -diff -w -u -r1.61 -r1.60.4.6 ---- sc/source/filter/excel/impop.cxx 4 Jun 2004 10:44:32 -0000 1.61 -+++ sc/source/filter/excel/impop.cxx 14 Jul 2004 10:16:45 -0000 1.60.4.6 -@@ -195,8 +195,8 @@ - - - --ImportExcel::ImportExcel( SvStream& rSvStrm, ScDocument* pDoc, const String& rDocUrl ): -- XclImpRootData( xlBiffUnknown, *pDoc, rDocUrl, RTL_TEXTENCODING_MS_1252 ), -+ImportExcel::ImportExcel( SfxMedium& rMedium, SvStream& rSvStrm, ScDocument* pDoc ): -+ XclImpRootData( xlBiffUnknown, rMedium, *pDoc, RTL_TEXTENCODING_MS_1252 ), - ImportTyp( pDoc, RTL_TEXTENCODING_MS_1252 ), - XclImpRoot( static_cast< XclImpRootData& >( *this ) ), - maStrm( rSvStrm, *this ), -@@ -507,15 +507,10 @@ - void ImportExcel::Bof2( void ) - { - sal_uInt16 nSubType; --#if SC_XCL_USEDECR -- maStrm.UseDecryption( false ); --#endif -+ maStrm.DisableDecryption(); - maStrm.Ignore( 2 ); - maStrm >> nSubType; - SetBiff( xlBiff2 ); --#if SC_XCL_USEDECR -- maStrm.UseDecryption( true ); --#endif - - pExcRoot->eHauptDateiTyp = Biff2; - if( nSubType == 0x0010 ) // Worksheet? -@@ -553,9 +548,9 @@ - - void ImportExcel::Externsheet( void ) - { -- String aEncodedUrl, aUrl, aTabName; -+ String aUrl, aTabName; - bool bSameWorkBook; -- aIn.AppendByteString( aEncodedUrl, false ); -+ String aEncodedUrl( aIn.ReadByteString( false ) ); - XclImpUrlHelper::DecodeUrl( aUrl, aTabName, bSameWorkBook, *pExcRoot->pIR, aEncodedUrl ); - ScfTools::ConvertToScSheetName( aTabName ); - pExcRoot->pExtSheetBuff->Add( aUrl, aTabName, bSameWorkBook ); -@@ -764,41 +759,6 @@ - } - - --BOOL ImportExcel::Filepass( void ) --{ --#if SC_XCL_USEDECR -- if( pExcRoot->eHauptDateiTyp <= Biff5 ) -- { -- aIn.UseDecryption( false ); -- sal_uInt16 nKey, nHash; -- aIn >> nKey >> nHash; -- -- bool bValid = (maPassword.Len() > 0); -- if( !bValid ) -- { -- if( (nKey == 0xB359) && (nHash == 0x9A0A) ) -- { -- // Workbook protection -> password is encoded in PASSWORD record -- maPassword.AssignAscii( "VelvetSweatshop" ); -- bValid = true; -- } -- } -- -- if( bValid ) -- { -- XclImpBiff5Decrypter* pDecrypter = new XclImpBiff5Decrypter( maPassword, nKey, nHash ); -- bValid = pDecrypter->IsValid(); // validates password -- aIn.EnableDecryption( pDecrypter ); -- } -- return !bValid; -- } -- else --#endif -- // POST: return = TRUE, wenn Password <> 0 -- return aIn.ReaduInt32() != 0; --} -- -- - void ImportExcel::Pane( void ) - { - pColRowBuff->ReadSplit( aIn ); -@@ -1296,15 +1256,10 @@ - void ImportExcel::Bof3( void ) - { - sal_uInt16 nSubType; --#if SC_XCL_USEDECR -- maStrm.UseDecryption( false ); --#endif -+ maStrm.DisableDecryption(); - maStrm.Ignore( 2 ); - maStrm >> nSubType; - SetBiff( xlBiff3 ); --#if SC_XCL_USEDECR -- maStrm.UseDecryption( true ); --#endif - - DBG_ASSERT( nSubType != 0x0100, "*ImportExcel::Bof3(): Biff3 als Workbook?!" ); - pExcRoot->eHauptDateiTyp = Biff3; -@@ -1505,15 +1460,10 @@ - void ImportExcel::Bof4( void ) - { - sal_uInt16 nSubType; --#if SC_XCL_USEDECR -- maStrm.UseDecryption( false ); --#endif -+ maStrm.DisableDecryption(); - maStrm.Ignore( 2 ); - maStrm >> nSubType; - SetBiff( xlBiff4 ); --#if SC_XCL_USEDECR -- maStrm.UseDecryption( true ); --#endif - - pExcRoot->eHauptDateiTyp = Biff4; - if( nSubType == 0x0010 ) // Sheet? -@@ -1539,15 +1489,10 @@ - BiffTyp eHaupt = Biff5; - BiffTyp eDatei; - --#if SC_XCL_USEDECR -- maStrm.UseDecryption( false ); --#endif -+ maStrm.DisableDecryption(); - maStrm >> nVers >> nSubType; - if( nSubType == 0x0005 ) // nVers may be wrong in Worksheet BOFs - SetBiff( (nVers == 0x0600) ? xlBiff8 : xlBiff5 ); --#if SC_XCL_USEDECR -- maStrm.UseDecryption( true ); --#endif - - switch( nSubType ) - { -Index: sc/source/filter/excel/makefile.mk -=================================================================== -RCS file: /cvs/sc/sc/source/filter/excel/makefile.mk,v -retrieving revision 1.25 -retrieving revision 1.24.60.2 -diff -w -u -r1.25 -r1.24.60.2 ---- sc/source/filter/excel/makefile.mk 4 Jun 2004 14:00:14 -0000 1.25 -+++ sc/source/filter/excel/makefile.mk 14 Jul 2004 10:16:53 -0000 1.24.60.2 -@@ -81,6 +81,7 @@ - # --- Files -------------------------------------------------------- - - SLOFILES = \ -+ $(SLO)$/xlstream.obj \ - $(SLO)$/xltools.obj \ - $(SLO)$/xlroot.obj \ - $(SLO)$/xlstyle.obj \ -Index: sc/source/filter/excel/read.cxx -=================================================================== -RCS file: /cvs/sc/sc/source/filter/excel/read.cxx,v -retrieving revision 1.43 -retrieving revision 1.42.6.5 -diff -w -u -r1.43 -r1.42.6.5 ---- sc/source/filter/excel/read.cxx 4 Jun 2004 14:00:29 -0000 1.43 -+++ sc/source/filter/excel/read.cxx 14 Jul 2004 10:13:35 -0000 1.42.6.5 -@@ -118,7 +118,7 @@ - { - #if EXC_INCL_DUMPER - { -- Biff8RecDumper aDumper( *pExcRoot, FALSE ); -+ Biff8RecDumper aDumper( GetRoot(), FALSE ); - if( aDumper.Dump( aIn ) ) - return eERR_OK; - } -@@ -161,7 +161,7 @@ - DBG_ASSERT( &aIn != NULL, "-ImportExcel::Read(): Kein Stream - wie dass?!" ); - - ::std::auto_ptr< ScfSimpleProgressBar > pProgress( new ScfSimpleProgressBar( -- aIn.GetStreamSize(), GetDocShell(), STR_LOAD_DOC ) ); -+ aIn.GetSvStreamSize(), GetDocShell(), STR_LOAD_DOC ) ); - - while( eAkt != Z_Ende ) - { -@@ -175,7 +175,7 @@ - } - - if( eAkt != Z_Biff5Pre && eAkt != Z_Biff5WPre ) -- pProgress->Progress( aIn.Tell() ); -+ pProgress->Progress( aIn.GetSvStreamPos() ); - - switch( eAkt ) - { -@@ -269,11 +269,9 @@ - case 0x2A: GetPageSettings().ReadPrintheaders( maStrm ); break; - case 0x2B: GetPageSettings().ReadPrintgridlines( maStrm ); break; - case 0x2F: // FILEPASS [ 2345] -- if( Filepass() ) -- { -- eLastErr = eERR_FILEPASSWD; -+ eLastErr = XclImpDecryptHelper::ReadFilepass( maStrm ); -+ if( eLastErr != ERRCODE_NONE ) - eAkt = Z_Ende; -- } - break; - case 0x31: GetFontBuffer().ReadFont( maStrm ); break; - case 0x41: Pane(); break; // PANE [ 2345] -@@ -310,11 +308,9 @@ - case 0x2A: GetPageSettings().ReadPrintheaders( maStrm ); break; - case 0x2B: GetPageSettings().ReadPrintgridlines( maStrm ); break; - case 0x2F: // FILEPASS [ 2345] -- if( Filepass() ) -- { -- eLastErr = eERR_FILEPASSWD; -+ eLastErr = XclImpDecryptHelper::ReadFilepass( maStrm ); -+ if( eLastErr != ERRCODE_NONE ) - eAkt = Z_Ende; -- } - break; - case 0x41: Pane(); break; // PANE [ 2345] - case 0x42: Codepage(); break; // CODEPAGE [ 2345] -@@ -368,11 +364,10 @@ - case 0x2A: GetPageSettings().ReadPrintheaders( maStrm ); break; - case 0x2B: GetPageSettings().ReadPrintgridlines( maStrm ); break; - case 0x2F: // FILEPASS [ 2345] -- if( Filepass() ) -- { -- eLastErr = eERR_FILEPASSWD; -+ eLastErr = XclImpDecryptHelper::ReadFilepass( maStrm ); -+ if( eLastErr != ERRCODE_NONE ) - eAkt = Z_Ende; -- } -+ break; - case 0x41: Pane(); break; // PANE [ 2345] - case 0x42: Codepage(); break; // CODEPAGE [ 2345] - case 0x55: DefColWidth(); break; -@@ -413,11 +408,9 @@ - break; - case 0x12: DocProtect(); break; // PROTECT [ 5] - case 0x2F: // FILEPASS [ 2345] -- if( Filepass() ) -- { -- eLastErr = eERR_FILEPASSWD; -+ eLastErr = XclImpDecryptHelper::ReadFilepass( maStrm ); -+ if( eLastErr != ERRCODE_NONE ) - eAkt = Z_Ende; -- } - break; - case 0x17: Externsheet(); break; // EXTERNSHEET [ 2345] - case 0x42: Codepage(); break; // CODEPAGE [ 2345] -@@ -469,11 +462,9 @@ - break; - case 0x1D: Selection(); break; // SELECTION [ 2345] - case 0x2F: // FILEPASS [ 2345] -- if( Filepass() ) -- { -- eLastErr = eERR_FILEPASSWD; -+ eLastErr = XclImpDecryptHelper::ReadFilepass( maStrm ); -+ if( eLastErr != ERRCODE_NONE ) - eAkt = Z_Ende; -- } - break; - case 0x41: Pane(); break; // PANE [ 2345] - case 0x42: Codepage(); break; // CODEPAGE [ 2345] -@@ -586,11 +577,9 @@ - break; - case 0x12: DocProtect(); break; // PROTECT [ 5] - case 0x2F: // FILEPASS [ 2345] -- if( Filepass() ) -- { -- eLastErr = eERR_FILEPASSWD; -+ eLastErr = XclImpDecryptHelper::ReadFilepass( maStrm ); -+ if( eLastErr != ERRCODE_NONE ) - eAkt = Z_Ende; -- } - break; - case 0x42: Codepage(); break; // CODEPAGE [ 2345] - case 0x85: Boundsheet(); break; // BOUNDSHEET [ 5] -@@ -612,13 +601,6 @@ - case 0x1E: GetNumFmtBuffer().ReadFormat( maStrm ); break; - case 0x22: Rec1904(); break; // 1904 [ 2345] - case 0x25: Defrowheight2(); break; // DEFAULTROWHEI[ 2 ] -- case 0x2F: // FILEPASS [ 2345] -- if( Filepass() ) -- { -- eLastErr = eERR_FILEPASSWD; -- eAkt = Z_Ende; -- } -- break; - case 0x31: GetFontBuffer().ReadFont( maStrm ); break; - case 0x42: Codepage(); break; // CODEPAGE [ 2345] - case 0x55: DefColWidth(); break; -@@ -681,11 +663,9 @@ - case 0x2A: GetPageSettings().ReadPrintheaders( maStrm ); break; - case 0x2B: GetPageSettings().ReadPrintgridlines( maStrm ); break; - case 0x2F: // FILEPASS [ 2345] -- if( Filepass() ) -- { -- eLastErr = eERR_FILEPASSWD; -+ eLastErr = XclImpDecryptHelper::ReadFilepass( maStrm ); -+ if( eLastErr != ERRCODE_NONE ) - eAkt = Z_Ende; -- } - break; - case 0x5D: - if( bWithDrawLayer ) -@@ -1014,7 +994,7 @@ - { - #if EXC_INCL_DUMPER - { -- Biff8RecDumper aDumper( *pExcRoot, TRUE ); -+ Biff8RecDumper aDumper( GetRoot(), TRUE ); - if( aDumper.Dump( aIn ) ) - return eERR_OK; - } -@@ -1046,7 +1026,7 @@ - "-ImportExcel8::Read(): Kein Stream - wie dass?!" ); - - ::std::auto_ptr< ScfSimpleProgressBar > pProgress( new ScfSimpleProgressBar( -- aIn.GetStreamSize(), GetDocShell(), STR_LOAD_DOC ) ); -+ aIn.GetSvStreamSize(), GetDocShell(), STR_LOAD_DOC ) ); - - bObjSection = FALSE; - -@@ -1061,11 +1041,11 @@ - } - - if( eAkt != Z_Biff8Pre && eAkt != Z_Biff8WPre ) -- pProgress->Progress( aIn.Tell() ); -+ pProgress->Progress( aIn.GetSvStreamPos() ); - - if( nOpcode != EXC_ID_CONT ) - { -- aIn.InitializeRecord( TRUE ); // enable internal CONTINUE handling -+ aIn.ResetRecord( true ); // enable internal CONTINUE handling - bObjSection = - (nOpcode == 0x005D) || // OBJ - (nOpcode == 0x00EB) || // MSODRAWINGGROUP -@@ -1110,12 +1090,9 @@ - case 0x12: DocProtect(); break; // PROTECT [ 5678] - case 0x19: WinProtection(); break; - case 0x2F: // FILEPASS [ 2345 ] -- if( Filepass() ) -- { -- GetTracer().TraceLog(ePassword); -- eLastErr = eERR_FILEPASSWD; -+ eLastErr = XclImpDecryptHelper::ReadFilepass( maStrm ); -+ if( eLastErr != ERRCODE_NONE ) - eAkt = Z_Ende; -- } - break; - case 0x42: Codepage(); break; // CODEPAGE [ 2345 ] - case 0x85: Boundsheet(); break; // BOUNDSHEET [ 5 ] -@@ -1336,15 +1313,6 @@ - IncCurrScTab(); - } - break; -- case 0x002F: // FILEPASS [ 2345 ] -- { -- if( Filepass() ) -- { -- eLastErr = eERR_FILEPASSWD; -- eAkt = Z_Ende; -- } -- } -- break; - default: bFound = FALSE; - } - } -@@ -1481,7 +1449,7 @@ - PostDocLoad(); - - // import change tracking data -- XclImpChangeTrack aImpChTr( pExcRoot ); -+ XclImpChangeTrack aImpChTr( pExcRoot, maStrm ); - aImpChTr.Apply(); - - if( bTabTruncated || IsTruncated() ) -@@ -1512,7 +1480,7 @@ - if( bLoop ) - bLoop = (aIn.GetRecId() != 0x000A); - } -- rProgress.Progress( aIn.Tell() ); -+ rProgress.Progress( aIn.GetSvStreamPos() ); - - return eERR_OK; - } -@@ -1523,7 +1491,7 @@ - bLoop = aIn.StartNextRecord(); - nOpcode = aIn.GetRecId(); - -- rProgress.Progress( aIn.Tell() ); -+ rProgress.Progress( aIn.GetSvStreamPos() ); - - // page settings - only for charts in entire sheet - if( bOwnTab ) switch( nOpcode ) -Index: sc/source/filter/excel/xepivot.cxx -=================================================================== -RCS file: /cvs/sc/sc/source/filter/excel/xepivot.cxx,v -retrieving revision 1.2 -retrieving revision 1.2.72.3 -diff -w -u -r1.2 -r1.2.72.3 ---- sc/source/filter/excel/xepivot.cxx 4 Jun 2004 14:01:19 -0000 1.2 -+++ sc/source/filter/excel/xepivot.cxx 15 Jul 2004 08:56:59 -0000 1.2.72.3 -@@ -117,9 +117,6 @@ - #include "xelink.hxx" - #endif - --#include "root.hxx" --extern const sal_Char* pPivotCacheStorageName; -- - using ::com::sun::star::sheet::DataPilotFieldOrientation; - using ::com::sun::star::sheet::DataPilotFieldOrientation_HIDDEN; - using ::com::sun::star::sheet::DataPilotFieldOrientation_ROW; -@@ -442,7 +439,7 @@ - GetDoc().GetDataStart( nScTab, nFirstDocCol, nFirstDocRow ); - GetDoc().GetPrintArea( nScTab, nLastDocCol, nLastDocRow, false ); - SCCOL nFirstSrcCol = maSrcRange.aStart.Col(), nLastSrcCol = maSrcRange.aEnd.Col(); -- SCCOL nFirstSrcRow = maSrcRange.aStart.Row(), nLastSrcRow = maSrcRange.aEnd.Row(); -+ SCROW nFirstSrcRow = maSrcRange.aStart.Row(), nLastSrcRow = maSrcRange.aEnd.Row(); - - // adjust row indexes, keep one row of empty area to add an empty cache item - if( nFirstSrcRow < nFirstDocRow ) -@@ -524,12 +521,8 @@ - - void XclExpPivotCache::WriteCacheStream() - { -- if( !mpRD->pPivotCacheStorage ) -- mpRD->pPivotCacheStorage = -- GetRootStorage()->OpenStorage( -- String::CreateFromAscii(pPivotCacheStorageName), STREAM_STD_WRITE ); -- SvStorageStreamRef xSvStrm = mpRD->pPivotCacheStorage->OpenStream( -- ScfTools::GetHexStr( mnStrmId ), STREAM_READWRITE | STREAM_TRUNC ); -+ SvStorageRef xSvStrg = OpenStorage( EXC_STORAGE_PTCACHE ); -+ SvStorageStreamRef xSvStrm = OpenStream( xSvStrg, ScfTools::GetHexStr( mnStrmId ) ); - if( xSvStrm.Is() ) - { - XclExpStream aStrm( *xSvStrm, GetRoot() ); -Index: sc/source/filter/excel/xeroot.cxx -=================================================================== -RCS file: /cvs/sc/sc/source/filter/excel/xeroot.cxx,v -retrieving revision 1.10 -retrieving revision 1.9.6.3 -diff -w -u -r1.10 -r1.9.6.3 ---- sc/source/filter/excel/xeroot.cxx 4 Jun 2004 14:01:37 -0000 1.10 -+++ sc/source/filter/excel/xeroot.cxx 14 Jul 2004 10:18:23 -0000 1.9.6.3 -@@ -65,6 +65,10 @@ - #include "xeroot.hxx" - #endif - -+#ifndef _SVSTOR_HXX -+#include <so3/svstor.hxx> -+#endif -+ - #ifndef SC_ADDINCOL_HXX - #include "addincol.hxx" - #endif -@@ -85,11 +89,10 @@ - #include "xepivot.hxx" - #endif - -- - // Global data ================================================================ - --XclExpRootData::XclExpRootData( XclBiff eBiff, ScDocument& rDocument, const String& rDocUrl, CharSet eCharSet, bool bRelUrl ) : -- XclRootData( eBiff, rDocument, rDocUrl, eCharSet ), -+XclExpRootData::XclExpRootData( XclBiff eBiff, SfxMedium& rMedium, ScDocument& rDocument, CharSet eCharSet, bool bRelUrl ) : -+ XclRootData( eBiff, rMedium, rDocument, eCharSet, true ), - mbRelUrl( bRelUrl ) - { - } -@@ -98,14 +101,12 @@ - { - } - -- - // ---------------------------------------------------------------------------- - - XclExpRoot::XclExpRoot( XclExpRootData& rExpRootData ) : - XclRoot( rExpRootData ), - mrExpData( rExpRootData ) - { -- mrExpData.mpTracer.reset( new XclTracer( GetDocUrl(), CREATE_OUSTRING( "Office.Tracing/Export/Excel" ) ) ); - mrExpData.mpPalette.reset( new XclExpPalette( GetRoot() ) ); - mrExpData.mpFontBuffer.reset( new XclExpFontBuffer( GetRoot() ) ); - mrExpData.mpNumFmtBuffer.reset( new XclExpNumFmtBuffer( GetRoot() ) ); -@@ -182,7 +183,6 @@ - { - XclRoot::CheckCellRangeList( rRanges, GetXclMaxPos() ); - } -- - - // ============================================================================ - -Index: sc/source/filter/excel/xicontent.cxx -=================================================================== -RCS file: /cvs/sc/sc/source/filter/excel/xicontent.cxx,v -retrieving revision 1.10 -retrieving revision 1.8.6.3 -diff -w -u -r1.10 -r1.8.6.3 ---- sc/source/filter/excel/xicontent.cxx 4 Jun 2004 14:01:53 -0000 1.10 -+++ sc/source/filter/excel/xicontent.cxx 14 Jul 2004 10:18:32 -0000 1.8.6.3 -@@ -213,7 +211,7 @@ - void lclAppendString32( String& rString, XclImpStream& rStrm, sal_uInt32 nChars, bool b16Bit ) - { - sal_uInt16 nReadChars = static_cast< sal_uInt16 >( ::std::min( nChars, 0xFFFFUL ) ); -- rStrm.AppendRawUniString( rString, nReadChars, b16Bit ); -+ rString.Append( rStrm.ReadRawUniString( nReadChars, b16Bit ) ); - // ignore remaining chars - sal_uInt32 nIgnore = nChars - nReadChars; - if( b16Bit ) -@@ -713,15 +706,13 @@ - rStrm >> nFlags; - - // message strings -- String aPromptTitle, aErrorTitle, aPromptMessage, aErrorMessage; -- - /* Empty strings are single NUL characters in Excel (string length is 1). - -> Do not let the stream replace them with '?' characters. */ - rStrm.SetNulSubstChar( '\0' ); -- rStrm.AppendUniString( aPromptTitle ); -- rStrm.AppendUniString( aErrorTitle ); -- rStrm.AppendUniString( aPromptMessage ); -- rStrm.AppendUniString( aErrorMessage ); -+ String aPromptTitle( rStrm.ReadUniString() ); -+ String aErrorTitle( rStrm.ReadUniString() ); -+ String aPromptMessage( rStrm.ReadUniString() ); -+ String aErrorMessage( rStrm.ReadUniString() ); - rStrm.SetNulSubstChar(); // back to default - - // formula(s) -@@ -873,8 +863,7 @@ - - void XclImpWebQuery::ReadWqstring( XclImpStream& rStrm ) - { -- maURL.Erase(); -- rStrm.AppendUniString( maURL ); -+ maURL = rStrm.ReadUniString(); - } - - void XclImpWebQuery::ReadWqsettings( XclImpStream& rStrm ) -@@ -893,9 +882,8 @@ - { - if( meMode == xlWQSpecTables ) - { -- String aTables; - rStrm.Ignore( 4 ); -- rStrm.AppendUniString( aTables ); -+ String aTables( rStrm.ReadUniString() ); - - const sal_Unicode cSep = ';'; - aTables.SearchAndReplaceAll( ',', cSep ); -@@ -938,8 +925,7 @@ - if( GetBiff() == xlBiff8 ) - { - rStrm.Ignore( 10 ); -- String aXclName; -- rStrm.AppendUniString( aXclName ); -+ String aXclName( rStrm.ReadUniString() ); - - // #101529# find the defined name used in Calc - if( const XclImpName* pName = GetNameBuffer().FindName( aXclName, GetCurrScTab() ) ) -@@ -992,6 +978,108 @@ - pQuery->Apply( rDoc, aFilterName ); - } - -+// Decryption ================================================================= -+ -+namespace { -+ -+XclImpDecrypterRef lclReadFilepass5( XclImpStream& rStrm ) -+{ -+ XclImpDecrypterRef xDecr; -+ DBG_ASSERT( rStrm.GetRecLeft() == 4, "lclReadFilepass5 - wrong record size" ); -+ if( rStrm.GetRecLeft() == 4 ) -+ { -+ sal_uInt16 nKey, nHash; -+ rStrm >> nKey >> nHash; -+ xDecr.reset( new XclImpBiff5Decrypter( rStrm.GetRoot(), nKey, nHash ) ); -+ } -+ return xDecr; -+} -+ -+XclImpDecrypterRef lclReadFilepass8_Standard( XclImpStream& rStrm ) -+{ -+ XclImpDecrypterRef xDecr; -+ DBG_ASSERT( rStrm.GetRecLeft() == 48, "lclReadFilepass8 - wrong record size" ); -+ if( rStrm.GetRecLeft() == 48 ) -+ { -+ sal_uInt8 pnDocId[ 16 ]; -+ sal_uInt8 pnSaltData[ 16 ]; -+ sal_uInt8 pnSaltHash[ 16 ]; -+ rStrm.Read( pnDocId, 16 ); -+ rStrm.Read( pnSaltData, 16 ); -+ rStrm.Read( pnSaltHash, 16 ); -+ xDecr.reset( new XclImpBiff8Decrypter( -+ rStrm.GetRoot(), pnDocId, pnSaltData, pnSaltHash ) ); -+ } -+ return xDecr; -+} -+ -+XclImpDecrypterRef lclReadFilepass8_Strong( XclImpStream& rStrm ) -+{ -+ // not supported -+ return XclImpDecrypterRef(); -+} -+ -+XclImpDecrypterRef lclReadFilepass8( XclImpStream& rStrm ) -+{ -+ XclImpDecrypterRef xDecr; -+ -+ sal_uInt16 nMode; -+ rStrm >> nMode; -+ switch( nMode ) -+ { -+ case EXC_FILEPASS_BIFF5: -+ xDecr = lclReadFilepass5( rStrm ); -+ break; -+ -+ case EXC_FILEPASS_BIFF8: -+ { -+ rStrm.Ignore( 2 ); -+ sal_uInt16 nSubMode; -+ rStrm >> nSubMode; -+ switch( nSubMode ) -+ { -+ case EXC_FILEPASS_BIFF8_STD: -+ xDecr = lclReadFilepass8_Standard( rStrm ); -+ break; -+ case EXC_FILEPASS_BIFF8_STRONG: -+ xDecr = lclReadFilepass8_Strong( rStrm ); -+ break; -+ default: -+ DBG_ERRORFILE( "lclReadFilepass8 - unknown BIFF8 encryption sub mode" ); -+ } -+ } -+ break; -+ -+ default: -+ DBG_ERRORFILE( "lclReadFilepass8 - unknown encryption mode" ); -+ } -+ -+ return xDecr; -+} -+ -+} // namespace -+ -+// ---------------------------------------------------------------------------- -+ -+ErrCode XclImpDecryptHelper::ReadFilepass( XclImpStream& rStrm ) -+{ -+ XclImpDecrypterRef xDecr; -+ rStrm.DisableDecryption(); -+ -+ switch( rStrm.GetRoot().GetBiff() ) -+ { -+ case xlBiff2: -+ case xlBiff3: -+ case xlBiff4: -+ case xlBiff5: -+ case xlBiff7: xDecr = lclReadFilepass5( rStrm ); break; -+ case xlBiff8: xDecr = lclReadFilepass8( rStrm ); break; -+ default: DBG_ERROR_BIFF(); -+ }; -+ rStrm.SetDecrypter( xDecr ); -+ -+ return xDecr.get() ? xDecr->GetError() : EXC_ENCR_ERROR_UNSUPP_CRYPT; -+} - - // ============================================================================ - -Index: sc/source/filter/excel/xiescher.cxx -=================================================================== -RCS file: /cvs/sc/sc/source/filter/excel/xiescher.cxx,v -retrieving revision 1.17 -retrieving revision 1.13.6.4 -diff -w -u -r1.17 -r1.13.6.4 ---- sc/source/filter/excel/xiescher.cxx 28 Jun 2004 17:57:51 -0000 1.17 -+++ sc/source/filter/excel/xiescher.cxx 14 Jul 2004 10:18:40 -0000 1.13.6.4 -@@ -229,7 +229,7 @@ - if( !nSrcSize ) - return NULL; - -- rSrcStrm.Seek( RECORD_SEEK_TO_BEGIN ); -+ rSrcStrm.Seek( EXC_REC_SEEK_TO_BEGIN ); - sal_Char* pBuf = new sal_Char[ nSrcSize ]; - rSrcStrm.Read( pBuf, nSrcSize ); - aStrm.Write( pBuf, nSrcSize ); -@@ -872,7 +872,7 @@ - rStrm >> n16; // string length - if( n16 ) - { // the 4th way Xcl stores a unicode string: not even a Grbit byte present if length 0 -- rStrm.AppendUniString( aUserName, n16 ); -+ aUserName = rStrm.ReadUniString( n16 ); - // 0:= ID follows, 1:= pad byte + ID - #ifndef PRODUCT - sal_Int32 nLeft = sal_Int32(nFmlaLen) - (rStrm.GetRecPos() - nPos0); -@@ -1568,7 +1568,7 @@ - - void XclImpObjectManager::ReadMsodrawing( XclImpStream& rStrm ) - { -- rStrm.InitializeRecord( false ); // disable internal CONTINUE handling -+ rStrm.ResetRecord( false ); // disable internal CONTINUE handling - - if( !maStreamConsumer.HasData() ) - return; -@@ -1613,7 +1613,7 @@ - - void XclImpObjectManager::ReadObj( XclImpStream& rStrm ) - { -- rStrm.InitializeRecord( false ); // disable internal CONTINUE handling -+ rStrm.ResetRecord( false ); // disable internal CONTINUE handling - - sal_uInt16 nSubRecId, nSubRecSize; - bool bLoop = true; -@@ -1644,7 +1644,7 @@ - - void XclImpObjectManager::ReadTxo( XclImpStream& rStrm ) - { -- rStrm.InitializeRecord( false ); // disable internal CONTINUE handling -+ rStrm.ResetRecord( false ); // disable internal CONTINUE handling - - sal_uInt16 nAlign, nTextLen, nFormCnt; - ::std::auto_ptr< XclImpString > pString; -@@ -1667,9 +1667,8 @@ - DBG_ASSERT( bValid, "XclImpObjectManager::ReadTxo - missing CONTINUE record" ); - if( bValid ) - { -- rStrm.InitializeRecord( false ); -- String aText; -- rStrm.AppendUniString( aText, nTextLen ); -+ rStrm.ResetRecord( false ); -+ String aText( rStrm.ReadUniString( nTextLen ) ); - pString.reset( new XclImpString( aText ) ); - } - } -@@ -1682,7 +1681,7 @@ - DBG_ASSERT( bValid, "XclImpObjectManager::ReadTxo - missing CONTINUE record" ); - if( bValid ) - { -- rStrm.InitializeRecord( false ); -+ rStrm.ResetRecord( false ); - - sal_uInt16 nChar, nFont; - sal_uInt16 nCount = nFormCnt - 1; -Index: sc/source/filter/excel/xihelper.cxx -=================================================================== -RCS file: /cvs/sc/sc/source/filter/excel/xihelper.cxx,v -retrieving revision 1.11 -retrieving revision 1.10.10.2 -diff -w -u -r1.11 -r1.10.10.2 ---- sc/source/filter/excel/xihelper.cxx 4 Jun 2004 10:46:58 -0000 1.11 -+++ sc/source/filter/excel/xihelper.cxx 14 Jul 2004 10:18:50 -0000 1.10.10.2 -@@ -144,7 +144,7 @@ - rStrm.ReadUniStringExtHeader( b16Bit, bRich, bFarEast, nRunCount, nExtInf, nFlagField ); - - // --- character array --- -- rStrm.AppendRawUniString( maString, nChars, b16Bit ); -+ maString = rStrm.ReadRawUniString( nChars, b16Bit ); - - // --- formatting --- - ReadFormats( rStrm, nRunCount ); -@@ -744,8 +744,7 @@ - rStrm >> mfValue; - break; - case EXC_CACHEDVAL_STRING: -- mpStr.reset( new String ); -- rStrm.AppendUniString( *mpStr ); -+ mpStr.reset( new String( rStrm.ReadUniString() ) ); - break; - case EXC_CACHEDVAL_BOOL: - case EXC_CACHEDVAL_ERROR: -Index: sc/source/filter/excel/xilink.cxx -=================================================================== -RCS file: /cvs/sc/sc/source/filter/excel/xilink.cxx,v -retrieving revision 1.12 -retrieving revision 1.8.10.2 -diff -w -u -r1.12 -r1.8.10.2 ---- sc/source/filter/excel/xilink.cxx 28 Jun 2004 17:58:04 -0000 1.12 -+++ sc/source/filter/excel/xilink.cxx 14 Jul 2004 10:18:59 -0000 1.8.10.2 -@@ -552,7 +552,7 @@ - sal_uInt8 nLen; - - rStrm >> nFlags >> mnStorageId >> nLen ; -- rStrm.AppendUniString( maName, nLen ); -+ maName = rStrm.ReadUniString( nLen ); - - if( ::get_flag( nFlags, EXC_EXTN_BUILTIN ) || !::get_flag( nFlags, EXC_EXTN_OLE_OR_DDE ) ) - { -Index: sc/source/filter/excel/xipage.cxx -=================================================================== -RCS file: /cvs/sc/sc/source/filter/excel/xipage.cxx,v -retrieving revision 1.5 -retrieving revision 1.3.4.2 -diff -w -u -r1.5 -r1.3.4.2 ---- sc/source/filter/excel/xipage.cxx 4 Jun 2004 10:47:26 -0000 1.5 -+++ sc/source/filter/excel/xipage.cxx 14 Jul 2004 10:19:07 -0000 1.3.4.2 -@@ -187,12 +187,7 @@ - { - String aString; - if( rStrm.GetRecLeft() ) -- { -- if( GetBiff() < xlBiff8 ) -- rStrm.AppendByteString( aString, false ); -- else -- rStrm.AppendUniString( aString ); -- } -+ aString = (GetBiff() < xlBiff8) ? rStrm.ReadByteString( false ) : rStrm.ReadUniString(); - - switch( rStrm.GetRecId() ) - { -Index: sc/source/filter/excel/xipivot.cxx -=================================================================== -RCS file: /cvs/sc/sc/source/filter/excel/xipivot.cxx,v -retrieving revision 1.2 -retrieving revision 1.2.72.2 -diff -w -u -r1.2 -r1.2.72.2 ---- sc/source/filter/excel/xipivot.cxx 4 Jun 2004 14:02:26 -0000 1.2 -+++ sc/source/filter/excel/xipivot.cxx 15 Jul 2004 09:05:19 -0000 1.2.72.2 -@@ -204,20 +204,19 @@ - - // ============================================================================ - --XclImpPivotCache::XclImpPivotCache( const XclImpRoot& rRoot, sal_uInt16 nStrmId ) : -- XclImpRoot( rRoot ), -+XclImpPivotCache::XclImpPivotCache( const XclImpStream& rBookStrm, sal_uInt16 nStrmId ) : -+ XclImpRoot( rBookStrm.GetRoot() ), - mnSrcType( EXC_SXVS_UNKNOWN ) - { -- if( SvStorage* pSt = mpRD->pPivotCacheStorage ) -- { -- SvStorageStreamRef pStIn = pSt->OpenStream( ScfTools::GetHexStr( nStrmId ), STREAM_STD_READ ); -- if( pStIn.Is() ) -+ SvStorageRef xSvStrg = OpenStorage( EXC_STORAGE_PTCACHE ); -+ SvStorageStreamRef xSvStrm = OpenStream( xSvStrg, ScfTools::GetHexStr( nStrmId ) ); -+ if( xSvStrm.Is() ) - { -- XclImpStream aStrm( *pStIn, GetRoot() ); -+ XclImpStream aStrm( *xSvStrm, GetRoot() ); -+ aStrm.CopyDecrypterFrom( rBookStrm ); - ReadPivotCacheStream( aStrm ); - } - } --} - - XclImpPivotCache::~XclImpPivotCache() - { -@@ -845,7 +844,7 @@ - { - sal_uInt16 nStrmId; - rStrm >> nStrmId; -- maPCacheList.Append( new XclImpPivotCache( GetRoot(), nStrmId ) ); -+ maPCacheList.Append( new XclImpPivotCache( rStrm, nStrmId ) ); - } - - void XclImpPivotTableManager::ReadDconref( XclImpStream& rStrm ) -Index: sc/source/filter/excel/xiroot.cxx -=================================================================== -RCS file: /cvs/sc/sc/source/filter/excel/xiroot.cxx,v -retrieving revision 1.9 -retrieving revision 1.8.6.3 -diff -w -u -r1.9 -r1.8.6.3 ---- sc/source/filter/excel/xiroot.cxx 4 Jun 2004 14:02:42 -0000 1.9 -+++ sc/source/filter/excel/xiroot.cxx 14 Jul 2004 10:19:30 -0000 1.8.6.3 -@@ -94,11 +94,10 @@ - #include "root.hxx" - #include "excimp8.hxx" - -- - // Global data ================================================================ - --XclImpRootData::XclImpRootData( XclBiff eBiff, ScDocument& rDocument, const String& rDocUrl, CharSet eCharSet ) : -- XclRootData( eBiff, rDocument, rDocUrl, eCharSet ) -+XclImpRootData::XclImpRootData( XclBiff eBiff, SfxMedium& rMedium, ScDocument& rDocument, CharSet eCharSet ) : -+ XclRootData( eBiff, rMedium, rDocument, eCharSet, false ) - { - } - -@@ -106,14 +105,12 @@ - { - } - -- - // ---------------------------------------------------------------------------- - - XclImpRoot::XclImpRoot( XclImpRootData& rImpRootData ) : - XclRoot( rImpRootData ), - mrImpData( rImpRootData ) - { -- mrImpData.mpTracer.reset( new XclTracer( GetDocUrl(), CREATE_OUSTRING( "Office.Tracing/Import/Excel" ) ) ); - mrImpData.mpPalette.reset( new XclImpPalette( GetRoot() ) ); - mrImpData.mpFontBuffer.reset( new XclImpFontBuffer( GetRoot() ) ); - mrImpData.mpNumFmtBuffer.reset( new XclImpNumFmtBuffer( GetRoot() ) ); -Index: sc/source/filter/excel/xistream.cxx -=================================================================== -RCS file: /cvs/sc/sc/source/filter/excel/xistream.cxx,v -retrieving revision 1.5 -retrieving revision 1.5.6.8 -diff -w -u -r1.5 -r1.5.6.8 ---- sc/source/filter/excel/xistream.cxx 2 Mar 2004 09:39:12 -0000 1.5 -+++ sc/source/filter/excel/xistream.cxx 14 Apr 2004 10:08:16 -0000 1.5.6.8 -@@ -59,217 +59,299 @@ - * - ************************************************************************/ - --#ifdef PCH --#include "filt_pch.hxx" --#endif -- --#pragma hdrstop -- -- - // ============================================================================ - - #ifndef SC_XISTREAM_HXX - #include "xistream.hxx" - #endif - --#ifndef _STREAM_HXX --#include <tools/stream.hxx> --#endif -- - #ifndef SC_XIROOT_HXX - #include "xiroot.hxx" - #endif - -- -+// ============================================================================ -+// Decryption - // ============================================================================ - --#if SC_XCL_USEDECR --XclImpDecrypter::~XclImpDecrypter() -+XclImpDecrypter::XclImpDecrypter() : -+ mnError( EXC_ENCR_ERROR_UNSUPP_CRYPT ), -+ mnOldPos( STREAM_SEEK_TO_END ), -+ mnRecSize( 0 ) - { - } - --sal_uInt16 XclImpDecrypter::GetHash( const ByteString& rPass ) -+XclImpDecrypter::XclImpDecrypter( const XclImpDecrypter& rSrc ) : -+ mnError( rSrc.mnError ), -+ mnOldPos( STREAM_SEEK_TO_END ), -+ mnRecSize( 0 ) - { -- sal_uInt16 nLen = static_cast< sal_uInt16 >( ::std::min< xub_StrLen >( rPass.Len(), 0xFFFF ) ); -- sal_uInt16 nHash = nLen; -- if( nLen ) -- nHash ^= 0xCE4B; -+} - -- for( sal_uInt16 nIndex = 0; nIndex < nLen; ++nIndex ) -+XclImpDecrypter::~XclImpDecrypter() - { -- sal_uInt16 nChar = static_cast< sal_uInt8 >( rPass.GetChar( nIndex ) ); -- sal_uInt8 nRot = static_cast< sal_uInt8 >( (nIndex + 1) % 15 ); -- ::rotate_left( nChar, nRot, 15 ); -- nHash ^= nChar; - } -- return nHash; -+ -+XclImpDecrypterRef XclImpDecrypter::Clone() const -+{ -+ XclImpDecrypterRef xNewDecr; -+ if( IsValid() ) -+ xNewDecr.reset( OnClone() ); -+ return xNewDecr; - } - --sal_uInt16 XclImpDecrypter::GetKey( const ByteString& rPass ) -+void XclImpDecrypter::Update( SvStream& rStrm, sal_uInt16 nRecSize ) - { -- xub_StrLen nLen = rPass.Len(); -- if( !nLen ) return 0; -+ if( IsValid() ) -+ { -+ ULONG nNewPos = rStrm.Tell(); -+ if( (mnOldPos != nNewPos) || (mnRecSize != nRecSize) ) -+ { -+ OnUpdate( mnOldPos, nNewPos, nRecSize ); -+ mnOldPos = nNewPos; -+ mnRecSize = nRecSize; -+ } -+ } -+} - -- sal_uInt16 nKey = 0; -- sal_uInt16 nKeyBase = 0x8000; -- sal_uInt16 nKeyEnd = 0xFFFF; -- for( xub_StrLen nIndex = 0; nIndex < nLen; ++nIndex ) -+sal_uInt16 XclImpDecrypter::Read( SvStream& rStrm, void* pData, sal_uInt16 nBytes ) - { -- sal_Char nChar = rPass.GetChar( nLen - nIndex - 1 ) & 0x7F; -- for( sal_uInt8 nBit = 0; nBit < 8; ++nBit ) -+ sal_uInt16 nRet = 0; -+ if( pData && nBytes ) - { -- ::rotate_left( nKeyBase, 1 ); -- if( nKeyBase & 1 ) nKeyBase ^= 0x1020; -- if( nChar & 1 ) nKey ^= nKeyBase; -- nChar >>= 1; -- ::rotate_left( nKeyEnd, 1 ); -- if( nKeyEnd & 1 ) nKeyEnd ^= 0x1020; -+ if( IsValid() ) -+ { -+ Update( rStrm, mnRecSize ); -+ nRet = OnRead( rStrm, reinterpret_cast< sal_uInt8* >( pData ), nBytes ); -+ mnOldPos = rStrm.Tell(); - } -+ else -+ nRet = static_cast< sal_uInt16 >( rStrm.Read( pData, nBytes ) ); - } -- return nKey ^ nKeyEnd; -+ return nRet; - } - -+void XclImpDecrypter::SetHasValidPassword( bool bValid ) -+{ -+ mnError = bValid ? ERRCODE_NONE : EXC_ENCR_ERROR_WRONG_PASS; -+} - - // ---------------------------------------------------------------------------- - --XclImpBiff5Decrypter::XclImpBiff5Decrypter( const String& rPass, sal_uInt16 nKey, sal_uInt16 nHash ) : -- mbIsValid( false ) -+XclImpBiff5Decrypter::XclImpBiff5Decrypter( const XclImpRoot& rRoot, sal_uInt16 nKey, sal_uInt16 nHash ) - { -- ByteString aPass( rPass, RTL_TEXTENCODING_MS_1252 ); //! correct? -- xub_StrLen nLen = aPass.Len(); -- if( (0 < nLen) && (nLen < 16) && (GetKey( aPass ) == nKey) && (GetHash( aPass ) == nHash) ) -+ Init( XclCryptoHelper::GetBiff5WbProtPassword(), nKey, nHash ); -+ if( !IsValid() ) - { -- static const sal_uInt8 pFillChars[] = -+ //! TODO: correct byte string encoding in all cases? -+ ByteString aPass( rRoot.QueryPassword(), RTL_TEXTENCODING_MS_1252 ); -+ Init( aPass, nKey, nHash ); -+ } -+} -+ -+XclImpBiff5Decrypter::XclImpBiff5Decrypter( const XclImpBiff5Decrypter& rSrc ) : -+ XclImpDecrypter( rSrc ) -+{ -+ if( rSrc.IsValid() ) -+ { -+ memcpy( mpnPassw, rSrc.mpnPassw, sizeof( mpnPassw ) ); -+ maCodec.InitKey( mpnPassw ); -+ } -+} -+ -+XclImpBiff5Decrypter* XclImpBiff5Decrypter::OnClone() const - { -- 0xBB, 0xFF, 0xFF, 0xBA, -- 0xFF, 0xFF, 0xB9, 0x80, -- 0x00, 0xBE, 0x0F, 0x00, -- 0xBF, 0x0F, 0x00 -- }; -- const sal_uInt8* pFillChar = pFillChars; -+ return new XclImpBiff5Decrypter( *this ); -+} - -- xub_StrLen nIndex; -- for( nIndex = 0; nIndex < nLen; ++nIndex ) -- mpKey[ nIndex ] = aPass.GetChar( nIndex ); -- for( ; nIndex < 16; ++nIndex, ++pFillChar ) -- mpKey[ nIndex ] = *pFillChar; -+void XclImpBiff5Decrypter::OnUpdate( ULONG nOldStrmPos, ULONG nNewStrmPos, sal_uInt16 nRecSize ) -+{ -+ maCodec.InitCipher(); -+ maCodec.Skip( (nNewStrmPos + nRecSize) & 0x0F ); -+} - -- SVBT16 nOrigKey; -- ShortToSVBT16( nKey, nOrigKey ); -- sal_uInt8* pKeyChar = mpKey; -- for( nIndex = 0; nIndex < 16; ++nIndex, ++pKeyChar ) -+sal_uInt16 XclImpBiff5Decrypter::OnRead( SvStream& rStrm, sal_uInt8* pnData, sal_uInt16 nBytes ) - { -- *pKeyChar ^= nOrigKey[ nIndex & 0x01 ]; -- ::rotate_left( *pKeyChar, 2 ); -+ sal_uInt16 nRet = static_cast< sal_uInt16 >( rStrm.Read( pnData, nBytes ) ); -+ maCodec.Decode( pnData, nRet ); -+ return nRet; - } - -- mbIsValid = true; -+void XclImpBiff5Decrypter::Init( const ByteString& rPass, sal_uInt16 nKey, sal_uInt16 nHash ) -+{ -+ xub_StrLen nLen = rPass.Len(); -+ bool bValid = (0 < nLen) && (nLen < 16); -+ -+ if( bValid ) -+ { -+ // transform ByteString to sal_uInt8 array -+ memset( mpnPassw, 0, sizeof( mpnPassw ) ); -+ for( xub_StrLen nChar = 0; nChar < nLen; ++nChar ) -+ mpnPassw[ nChar ] = static_cast< sal_uInt8 >( rPass.GetChar( nChar ) ); -+ // init codec -+ maCodec.InitKey( mpnPassw ); -+ bValid = maCodec.VerifyKey( nKey, nHash ); - } -+ -+ SetHasValidPassword( bValid ); - } - --bool XclImpBiff5Decrypter::IsValid() const -+// ---------------------------------------------------------------------------- -+ -+XclImpBiff8Decrypter::XclImpBiff8Decrypter( -+ const XclImpRoot& rRoot, sal_uInt8 pnDocId[ 16 ], -+ sal_uInt8 pnSaltData[ 16 ], sal_uInt8 pnSaltHash[ 16 ] ) - { -- return mbIsValid; -+ Init( XclCryptoHelper::GetBiff8WbProtPassword(), pnDocId, pnSaltData, pnSaltHash ); -+ if( !IsValid() ) -+ Init( rRoot.QueryPassword(), pnDocId, pnSaltData, pnSaltHash ); - } - --void XclImpBiff5Decrypter::SetOffset( sal_uInt16 nRecSize ) -+XclImpBiff8Decrypter::XclImpBiff8Decrypter( const XclImpBiff8Decrypter& rSrc ) : -+ XclImpDecrypter( rSrc ) -+{ -+ if( rSrc.IsValid() ) - { -- mnOffset = nRecSize & 0x0F; -+ memcpy( mpnPassw, rSrc.mpnPassw, sizeof( mpnPassw ) ); -+ memcpy( mpnDocId, rSrc.mpnDocId, sizeof( mpnDocId ) ); -+ maCodec.InitKey( mpnPassw, mpnDocId ); -+ } - } - --sal_uInt32 XclImpBiff5Decrypter::ReadDecrypt( SvStream& rStrm, void* pData, sal_uInt32 nBytes ) -+XclImpBiff8Decrypter* XclImpBiff8Decrypter::OnClone() const - { -- DBG_ASSERT( mbIsValid, "XclImpBiff5Decrypter::ReadDecrypt - invalid decrypter" ); -+ return new XclImpBiff8Decrypter( *this ); -+} - -- sal_uInt32 nRet = 0; -- if( pData && nBytes ) -+void XclImpBiff8Decrypter::OnUpdate( ULONG nOldStrmPos, ULONG nNewStrmPos, sal_uInt16 nRecSize ) -+{ -+ if( nNewStrmPos != nOldStrmPos ) - { -- sal_uInt8* pCurrKey = mpKey + ((rStrm.Tell() + mnOffset) & 0x0F); -- sal_uInt8* pKeyLast = mpKey + 0x0F; -+ sal_uInt32 nOldBlock = GetBlock( nOldStrmPos ); -+ sal_uInt16 nOldOffset = GetOffset( nOldStrmPos ); - -- nRet = rStrm.Read( pData, nBytes ); -+ sal_uInt32 nNewBlock = GetBlock( nNewStrmPos ); -+ sal_uInt16 nNewOffset = GetOffset( nNewStrmPos ); - -- sal_uInt32 nBytesLeft = nBytes; -- sal_uInt8* pBuffer = reinterpret_cast< sal_uInt8* >( pData ); -- const sal_uInt8* pBufferEnd = pBuffer + nBytes; -- for( ; pBuffer < pBufferEnd; ++pBuffer ) -- { -- ::rotate_left( *pBuffer, 3 ); -- *pBuffer ^= *pCurrKey; -- if( pCurrKey < pKeyLast ) ++pCurrKey; else pCurrKey = mpKey; -+ /* Rekey cipher, if block changed or if previous offset in same block. */ -+ if( (nNewBlock != nOldBlock) || (nNewOffset < nOldOffset) ) -+ { -+ maCodec.InitCipher( nNewBlock ); -+ nOldOffset = 0; // reset nOldOffset for next if() statement - } -+ -+ /* Seek to correct offset. */ -+ if( nNewOffset > nOldOffset ) -+ maCodec.Skip( nNewOffset - nOldOffset ); - } -- return nRet; - } - -+sal_uInt16 XclImpBiff8Decrypter::OnRead( SvStream& rStrm, sal_uInt8* pnData, sal_uInt16 nBytes ) -+{ -+ sal_uInt16 nRet = 0; - --// ---------------------------------------------------------------------------- -- --XclImpBiff8Decrypter::XclImpBiff8Decrypter( const String& rPass ) -+ sal_uInt8* pnCurrData = pnData; -+ sal_uInt16 nBytesLeft = nBytes; -+ while( nBytesLeft ) - { -- DBG_ERRORFILE( "XclImpBiff8Decrypter::XclImpBiff8Decrypter - not implemented" ); -+ sal_uInt16 nBlockLeft = EXC_ENCR_BLOCKSIZE - GetOffset( rStrm.Tell() ); -+ sal_uInt16 nDecBytes = ::std::min< sal_uInt16 >( nBytesLeft, nBlockLeft ); -+ -+ // read the block from stream -+ nRet += static_cast< sal_uInt16 >( rStrm.Read( pnCurrData, nDecBytes ) ); -+ // decode the block inplace -+ maCodec.Decode( pnCurrData, nDecBytes, pnCurrData, nDecBytes ); -+ if( GetOffset( rStrm.Tell() ) == 0 ) -+ maCodec.InitCipher( GetBlock( rStrm.Tell() ) ); -+ -+ pnCurrData += nDecBytes; -+ nBytesLeft -= nDecBytes; - } - --bool XclImpBiff8Decrypter::IsValid() const --{ -- return false; -+ return nRet; - } - --void XclImpBiff8Decrypter::SetOffset( sal_uInt16 nRecSize ) -+void XclImpBiff8Decrypter::Init( -+ const String& rPass, sal_uInt8 pnDocId[ 16 ], -+ sal_uInt8 pnSaltData[ 16 ], sal_uInt8 pnSaltHash[ 16 ] ) - { -+ xub_StrLen nLen = rPass.Len(); -+ bool bValid = (0 < nLen) && (nLen < 16); -+ -+ if( bValid ) -+ { -+ // transform String to sal_uInt16 array -+ memset( mpnPassw, 0, sizeof( mpnPassw ) ); -+ for( xub_StrLen nChar = 0; nChar < nLen; ++nChar ) -+ mpnPassw[ nChar ] = static_cast< sal_uInt16 >( rPass.GetChar( nChar ) ); -+ // copy document ID -+ memcpy( mpnDocId, pnDocId, sizeof( mpnDocId ) ); -+ // init codec -+ maCodec.InitKey( mpnPassw, mpnDocId ); -+ bValid = maCodec.VerifyKey( pnSaltData, pnSaltHash ); -+ } -+ -+ SetHasValidPassword( bValid ); - } - --sal_uInt32 XclImpBiff8Decrypter::ReadDecrypt( SvStream& rStrm, void* pData, sal_uInt32 nBytes ) -+sal_uInt32 XclImpBiff8Decrypter::GetBlock( ULONG nStrmPos ) const - { -- return rStrm.Read( pData, nBytes ); -+ return static_cast< sal_uInt32 >( nStrmPos / EXC_ENCR_BLOCKSIZE ); - } --#endif - -+sal_uInt16 XclImpBiff8Decrypter::GetOffset( ULONG nStrmPos ) const -+{ -+ return static_cast< sal_uInt16 >( nStrmPos % EXC_ENCR_BLOCKSIZE ); -+} - - // ============================================================================ -+// Stream -+// ============================================================================ - --XclImpStreamPos::XclImpStreamPos( -- sal_uInt32 nStrmPos, sal_uInt32 nNextPos, -- sal_uInt32 nCurrSize, sal_uInt32 nRecLeft, sal_uInt16 nRecSize ) : -- mnPos( nStrmPos ), -- mnNextPos( nNextPos ), -- mnCurrSize( nCurrSize ), -- mnRecLeft( nRecLeft ), -- mnRecSize( nRecSize ) -+XclImpStreamPos::XclImpStreamPos() : -+ mnPos( STREAM_SEEK_TO_BEGIN ), -+ mnNextPos( STREAM_SEEK_TO_BEGIN ), -+ mnCurrSize( 0 ), -+ mnRawRecId( EXC_ID_UNKNOWN ), -+ mnRawRecSize( 0 ), -+ mnRawRecLeft( 0 ), -+ mbValid( false ) - { - } - - void XclImpStreamPos::Set( -- sal_uInt32 nStrmPos, sal_uInt32 nNextPos, -- sal_uInt32 nCurrSize, sal_uInt32 nRecLeft, sal_uInt16 nRecSize ) -+ const SvStream& rStrm, ULONG nNextPos, sal_uInt32 nCurrSize, -+ sal_uInt16 nRawRecId, sal_uInt16 nRawRecSize, sal_uInt16 nRawRecLeft, -+ bool bValid ) - { -- mnPos = nStrmPos; -+ mnPos = rStrm.Tell(); - mnNextPos = nNextPos; - mnCurrSize = nCurrSize; -- mnRecLeft = nRecLeft; -- mnRecSize = nRecSize; -+ mnRawRecId = nRawRecId; -+ mnRawRecSize = nRawRecSize; -+ mnRawRecLeft = nRawRecLeft; -+ mbValid = bValid; - } - - void XclImpStreamPos::Get( -- sal_uInt32& rnStrmPos, sal_uInt32& rnNextPos, -- sal_uInt32& rnCurrSize, sal_uInt32& rnRecLeft, sal_uInt16& rnRecSize ) const -+ SvStream& rStrm, ULONG& rnNextPos, sal_uInt32& rnCurrSize, -+ sal_uInt16& rnRawRecId, sal_uInt16& rnRawRecSize, sal_uInt16& rnRawRecLeft, -+ bool& rbValid ) const - { -- rnStrmPos = mnPos; -+ rStrm.Seek( mnPos ); - rnNextPos = mnNextPos; - rnCurrSize = mnCurrSize; -- rnRecLeft = mnRecLeft; -- rnRecSize = mnRecSize; -+ rnRawRecId = mnRawRecId; -+ rnRawRecSize = mnRawRecSize; -+ rnRawRecLeft = mnRawRecLeft; -+ rbValid = mbValid; - } - -- - // ============================================================================ - --XclImpStream::XclImpStream( SvStream& rInStrm, const XclImpRoot& rRoot, bool bContHandling ) : -+XclImpStream::XclImpStream( SvStream& rInStrm, const XclImpRoot& rRoot, bool bContLookup ) : - mrStrm( rInStrm ), - mrRoot( rRoot ), -- maFirstRec( STREAM_SEEK_TO_BEGIN, STREAM_SEEK_TO_BEGIN, 0, 0, 0 ), -- maGlobPos( STREAM_SEEK_TO_BEGIN, STREAM_SEEK_TO_BEGIN, 0, 0, 0 ), -- mnGlobRecId( 0 ), -+ mnGlobRecId( EXC_ID_UNKNOWN ), - mbGlobValidRec( false ), - mbHasGlobPos( false ), - mnNextRecPos( STREAM_SEEK_TO_BEGIN ), -@@ -278,16 +360,14 @@ - mbHasComplRec( false ), - mnRecId( EXC_ID_UNKNOWN ), - mnAltContId( EXC_ID_UNKNOWN ), -- mnRecSize( 0 ), -- mnRecLeft( 0 ), -+ mnRawRecId( EXC_ID_UNKNOWN ), -+ mnRawRecSize( 0 ), -+ mnRawRecLeft( 0 ), - mcNulSubst( '?' ), -- mbCont( bContHandling ), --#if SC_XCL_USEDECR -+ mbCont( bContLookup ), - mbUseDecr( false ), --#endif - mbValidRec( false ), -- mbValid( false ), -- mbWarnings( true ) -+ mbValid( false ) - { - mnStreamSize = mrStrm.Seek( STREAM_SEEK_TO_END ); - mrStrm.Seek( STREAM_SEEK_TO_BEGIN ); -@@ -298,157 +378,98 @@ - { - } - --bool XclImpStream::GetNextRecord( sal_uInt16& rnRecId, sal_uInt16& rnRecSize ) --{ -- mrStrm.Seek( mnNextRecPos ); -- bool bRet = (mnNextRecPos < mnStreamSize); -- if( bRet ) -- { -- mrStrm >> rnRecId >> rnRecSize; // read direct --#if SC_XCL_USEDECR -- SetDecrypterOffset( rnRecSize ); --#endif -- } -- else -- rnRecId = rnRecSize = 0; -- return bRet; --} -- --void XclImpStream::SetupRecord() --{ -- mnRecLeft = mnRecSize; -- mnCurrRecSize = mnComplRecSize = mnRecSize; -- mbHasComplRec = !mbCont; -- maFirstRec.Set( Tell(), mnNextRecPos, mnComplRecSize, mnRecLeft, mnRecSize ); --} -- --bool XclImpStream::IsContinueId( sal_uInt16 nRecId ) --{ -- return (nRecId == EXC_ID_CONT) || (nRecId == mnAltContId); --} -- - bool XclImpStream::StartNextRecord() - { -- maPosStack.Clear(); -+ maPosStack.clear(); - -- /* counter to ignore zero records (id==len==0) (i.e. the application -+ /* #i4266# Counter to ignore zero records (id==len==0) (i.e. the application - "Crystal Report" writes zero records between other records) */ - sal_uInt32 nZeroRecCount = 5; - bool bIsZeroRec = false; - - do - { -- mbValidRec = GetNextRecord( mnRecId, mnRecSize ); -- bIsZeroRec = !mnRecId && !mnRecSize; -+ mbValidRec = ReadNextRawRecHeader(); -+ bIsZeroRec = !mnRawRecId && !mnRawRecSize; - if( bIsZeroRec ) --nZeroRecCount; -- mnNextRecPos = Tell() + mnRecSize; -+ mnNextRecPos = mrStrm.Tell() + mnRawRecSize; - } -- while( mbValidRec && ((mbCont && IsContinueId( mnRecId )) || (bIsZeroRec && nZeroRecCount)) ); -+ while( mbValidRec && ((mbCont && IsContinueId( mnRawRecId )) || (bIsZeroRec && nZeroRecCount)) ); - -- if( bIsZeroRec ) -- mbValidRec = false; -+ mbValidRec = mbValidRec && !bIsZeroRec; - mbValid = mbValidRec; -- mnAltContId = EXC_ID_UNKNOWN; - SetupRecord(); -+ - return mbValidRec; - } - --void XclImpStream::InitializeRecord( bool bContHandling, sal_uInt16 nAltContId ) -+void XclImpStream::ResetRecord( bool bContLookup, sal_uInt16 nAltContId ) - { - if( mbValidRec ) - { -- maPosStack.Clear(); -+ maPosStack.clear(); - RestorePosition( maFirstRec ); -- mnCurrRecSize = mnComplRecSize = mnRecSize; -- mbHasComplRec = !bContHandling; -- mbCont = bContHandling; -+ mnCurrRecSize = mnComplRecSize = mnRawRecSize; -+ mbHasComplRec = !bContLookup; -+ mbCont = bContLookup; - mnAltContId = nAltContId; -+ EnableDecryption(); - } - } - --#if SC_XCL_USEDECR --void XclImpStream::EnableDecryption( XclImpDecrypter* pDecrypter ) -+void XclImpStream::SetDecrypter( XclImpDecrypterRef xDecrypter ) - { -- mpDecrypter.reset( pDecrypter ); -- SetDecrypterOffset( mnRecSize ); -- UseDecryption( true ); -+ mxDecrypter = xDecrypter; -+ EnableDecryption(); -+ SetupDecrypter(); - } - --void XclImpStream::UseDecryption( bool bUse ) -+void XclImpStream::CopyDecrypterFrom( const XclImpStream& rStrm ) - { -- mbUseDecr = (mpDecrypter.get() && mpDecrypter->IsValid()) ? bUse : false; -+ XclImpDecrypterRef xNewDecr; -+ if( rStrm.mxDecrypter.get() ) -+ xNewDecr = rStrm.mxDecrypter->Clone(); -+ SetDecrypter( xNewDecr ); - } --#endif - --bool XclImpStream::GetContinue() -+bool XclImpStream::HasValidDecrypter() const - { -- bool bRet = mbCont || IsContinueId( mnRecId ); -- if( bRet ) -- { -- sal_uInt16 nNewNum; -- bRet = GetNextRecord( nNewNum, mnRecSize ) && IsContinueId( nNewNum ); -- } -- if( bRet ) -- { -- mnRecLeft = mnRecSize; -- mnNextRecPos = Tell() + mnRecSize; -- mnCurrRecSize += mnRecSize; -- } -- return bRet; -+ return mxDecrypter.get() && mxDecrypter->IsValid(); - } - --bool XclImpStream::CheckDataLeft( sal_uInt32 nBytes ) -+void XclImpStream::EnableDecryption( bool bEnable ) - { -- bool bNewValid = mbValid && ((mnRecLeft >= nBytes) ? true : (mnRecLeft ? false : GetContinue())); -- DBG_ASSERT( !mbWarnings || bNewValid || !mbValid, "XclImpStream - record overread" ); // one assertion per record -- return (mbValid = bNewValid); // really assignment -+ mbUseDecr = bEnable && HasValidDecrypter(); - } - --void XclImpStream::StartContinue() --{ -- bool bNewValid = (mbValid && !mnRecLeft) ? GetContinue() : false; -- DBG_ASSERT( !mbWarnings || bNewValid || !mbValid, "XclImpStream - record overread" ); // one assertion per record -- mbValid = bNewValid; --} -- -- - // ---------------------------------------------------------------------------- - - void XclImpStream::PushPosition() - { -- if( mbValid ) -- maPosStack.Push( new XclImpStreamPos( -- Tell(), mnNextRecPos, mnCurrRecSize, mnRecLeft, mnRecSize ) ); --} -- --void XclImpStream::RestorePosition( const XclImpStreamPos& rPos ) --{ -- sal_uInt32 nPos; -- rPos.Get( nPos, mnNextRecPos, mnCurrRecSize, mnRecLeft, mnRecSize ); -- mrStrm.Seek( nPos ); -- mbValid = true; -+ maPosStack.push_back( XclImpStreamPos() ); -+ StorePosition( maPosStack.back() ); - } - - void XclImpStream::PopPosition() - { -- XclImpStreamPos* pPos = maPosStack.Pop(); -- DBG_ASSERT( pPos, "XclImpStream::PopPosition - stack empty" ); -- if( pPos ) -+ DBG_ASSERT( !maPosStack.empty(), "XclImpStream::PopPosition - stack empty" ); -+ if( !maPosStack.empty() ) - { -- RestorePosition( *pPos ); -- delete pPos; -+ RestorePosition( maPosStack.back() ); -+ maPosStack.pop_back(); - } - } - - void XclImpStream::RejectPosition() - { -- DBG_ASSERT( !maPosStack.Empty(), "XclImpStream::RejectPosition - stack empty" ); -- delete maPosStack.Pop(); -+ DBG_ASSERT( !maPosStack.empty(), "XclImpStream::RejectPosition - stack empty" ); -+ if( !maPosStack.empty() ) -+ maPosStack.pop_back(); - } - - void XclImpStream::StoreGlobalPosition() - { -- maGlobPos.Set( Tell(), mnNextRecPos, mnCurrRecSize, mnRecLeft, mnRecSize ); -+ StorePosition( maGlobPos ); - mnGlobRecId = mnRecId; - mbGlobValidRec = mbValidRec; - mbHasGlobPos = true; -@@ -463,19 +484,21 @@ - mnRecId = mnGlobRecId; - mnComplRecSize = mnCurrRecSize; - mbHasComplRec = !mbCont; -- mbValidRec = mbValid = mbGlobValidRec; --#if SC_XCL_USEDECR -- SetDecrypterOffset( mnRecSize ); --#endif -+ mbValidRec = mbGlobValidRec; - } - } - -+sal_uInt32 XclImpStream::GetRecPos() const -+{ -+ return mbValid ? (mnCurrRecSize - mnRawRecLeft) : EXC_REC_SEEK_TO_END; -+} -+ - sal_uInt32 XclImpStream::GetRecSize() - { -- if( IsValid() && !mbHasComplRec ) -+ if( !mbHasComplRec ) - { - PushPosition(); -- while( GetContinue() ); // GetContinue() adds up mnCurrRecSize -+ while( JumpToNextContinue() ); // JumpToNextContinue() adds up mnCurrRecSize - mnComplRecSize = mnCurrRecSize; - mbHasComplRec = true; - PopPosition(); -@@ -483,137 +506,142 @@ - return mnComplRecSize; - } - -+sal_uInt32 XclImpStream::GetRecLeft() -+{ -+ return mbValid ? (GetRecSize() - GetRecPos()) : 0; -+} - - // ---------------------------------------------------------------------------- - --void XclImpStream::ReadAtom( sal_Int8& rnValue ) -+XclImpStream& XclImpStream::operator>>( sal_Int8& rnValue ) -+{ -+ if( EnsureRawReadSize( 1 ) ) - { --#if SC_XCL_USEDECR - if( mbUseDecr ) -- mpDecrypter->ReadDecrypt( mrStrm, &rnValue, 1 ); -+ mxDecrypter->Read( mrStrm, &rnValue, 1 ); - else --#endif - mrStrm >> rnValue; -- --mnRecLeft; -+ --mnRawRecLeft; -+ } -+ return *this; - } - --void XclImpStream::ReadAtom( sal_uInt8& rnValue ) -+XclImpStream& XclImpStream::operator>>( sal_uInt8& rnValue ) -+{ -+ if( EnsureRawReadSize( 1 ) ) - { --#if SC_XCL_USEDECR - if( mbUseDecr ) -- mpDecrypter->ReadDecrypt( mrStrm, &rnValue, 1 ); -+ mxDecrypter->Read( mrStrm, &rnValue, 1 ); - else --#endif - mrStrm >> rnValue; -- --mnRecLeft; -+ --mnRawRecLeft; -+ } -+ return *this; - } - --void XclImpStream::ReadAtom( sal_Int16& rnValue ) -+XclImpStream& XclImpStream::operator>>( sal_Int16& rnValue ) -+{ -+ if( EnsureRawReadSize( 2 ) ) - { --#if SC_XCL_USEDECR - if( mbUseDecr ) - { -- SVBT16 pBuffer; -- mpDecrypter->ReadDecrypt( mrStrm, pBuffer, 2 ); -- rnValue = static_cast< sal_Int16 >( SVBT16ToShort( pBuffer ) ); -+ SVBT16 pnBuffer; -+ mxDecrypter->Read( mrStrm, pnBuffer, 2 ); -+ rnValue = static_cast< sal_Int16 >( SVBT16ToShort( pnBuffer ) ); - } - else --#endif - mrStrm >> rnValue; -- mnRecLeft -= 2; -+ mnRawRecLeft -= 2; -+ } -+ return *this; - } - --void XclImpStream::ReadAtom( sal_uInt16& rnValue ) -+XclImpStream& XclImpStream::operator>>( sal_uInt16& rnValue ) -+{ -+ if( EnsureRawReadSize( 2 ) ) - { --#if SC_XCL_USEDECR - if( mbUseDecr ) - { -- SVBT16 pBuffer; -- mpDecrypter->ReadDecrypt( mrStrm, pBuffer, 2 ); -- rnValue = SVBT16ToShort( pBuffer ); -+ SVBT16 pnBuffer; -+ mxDecrypter->Read( mrStrm, pnBuffer, 2 ); -+ rnValue = SVBT16ToShort( pnBuffer ); - } - else --#endif - mrStrm >> rnValue; -- mnRecLeft -= 2; -+ mnRawRecLeft -= 2; -+ } -+ return *this; - } - --void XclImpStream::ReadAtom( sal_Int32& rnValue ) -+XclImpStream& XclImpStream::operator>>( sal_Int32& rnValue ) -+{ -+ if( EnsureRawReadSize( 4 ) ) - { --#if SC_XCL_USEDECR - if( mbUseDecr ) - { -- SVBT32 pBuffer; -- mpDecrypter->ReadDecrypt( mrStrm, pBuffer, 4 ); -- rnValue = static_cast< sal_Int32 >( SVBT32ToLong( pBuffer ) ); -+ SVBT32 pnBuffer; -+ mxDecrypter->Read( mrStrm, pnBuffer, 4 ); -+ rnValue = static_cast< sal_Int32 >( SVBT32ToLong( pnBuffer ) ); - } - else --#endif - mrStrm >> rnValue; -- mnRecLeft -= 4; -+ mnRawRecLeft -= 4; -+ } -+ return *this; - } - --void XclImpStream::ReadAtom( sal_uInt32& rnValue ) -+XclImpStream& XclImpStream::operator>>( sal_uInt32& rnValue ) -+{ -+ if( EnsureRawReadSize( 4 ) ) - { --#if SC_XCL_USEDECR - if( mbUseDecr ) - { -- SVBT32 pBuffer; -- mpDecrypter->ReadDecrypt( mrStrm, pBuffer, 4 ); -- rnValue = SVBT32ToLong( pBuffer ); -+ SVBT32 pnBuffer; -+ mxDecrypter->Read( mrStrm, pnBuffer, 4 ); -+ rnValue = SVBT32ToLong( pnBuffer ); - } - else --#endif - mrStrm >> rnValue; -- mnRecLeft -= 4; -+ mnRawRecLeft -= 4; -+ } -+ return *this; - } - --void XclImpStream::ReadAtom( float& rfValue ) -+XclImpStream& XclImpStream::operator>>( float& rfValue ) -+{ -+ if( EnsureRawReadSize( 4 ) ) - { --#if SC_XCL_USEDECR - if( mbUseDecr ) - { -- SVBT32 pBuffer; -- mpDecrypter->ReadDecrypt( mrStrm, pBuffer, 4 ); -- sal_uInt32 nValue = SVBT32ToLong( pBuffer ); -+ SVBT32 pnBuffer; -+ mxDecrypter->Read( mrStrm, pnBuffer, 4 ); -+ sal_uInt32 nValue = SVBT32ToLong( pnBuffer ); - memcpy( &rfValue, &nValue, 4 ); - } - else --#endif - mrStrm >> rfValue; -- mnRecLeft -= 4; -+ mnRawRecLeft -= 4; -+ } -+ return *this; - } - --void XclImpStream::ReadAtom( double& rfValue ) -+XclImpStream& XclImpStream::operator>>( double& rfValue ) -+{ -+ if( EnsureRawReadSize( 8 ) ) - { --#if SC_XCL_USEDECR - if( mbUseDecr ) - { -- SVBT64 pBuffer; -- mpDecrypter->ReadDecrypt( mrStrm, pBuffer, 8 ); -- rfValue = SVBT64ToDouble( pBuffer ); -+ SVBT64 pnBuffer; -+ mxDecrypter->Read( mrStrm, pnBuffer, 8 ); -+ rfValue = SVBT64ToDouble( pnBuffer ); - } - else --#endif - mrStrm >> rfValue; -- mnRecLeft -= 8; -+ mnRawRecLeft -= 8; - } -- --sal_uInt32 XclImpStream::ReadData( void* pData, sal_uInt32 nBytes ) --{ --#if SC_XCL_USEDECR -- sal_uInt32 nRet = mbUseDecr ? -- mpDecrypter->ReadDecrypt( mrStrm, pData, nBytes ) : mrStrm.Read( pData, nBytes ); --#else -- sal_uInt32 nRet = mrStrm.Read( pData, nBytes ); --#endif -- mnRecLeft -= nRet; -- return nRet; -+ return *this; - } - -- --// ---------------------------------------------------------------------------- -- - sal_Int8 XclImpStream::ReadInt8() - { - sal_Int8 nValue; -@@ -673,22 +701,23 @@ - sal_uInt32 XclImpStream::Read( void* pData, sal_uInt32 nBytes ) - { - sal_uInt32 nRet = 0; -- if( IsValid() && pData && nBytes ) -+ if( mbValid && pData && nBytes ) - { -- sal_uInt8* pBuffer = reinterpret_cast< sal_uInt8* >( pData ); -+ sal_uInt8* pnBuffer = reinterpret_cast< sal_uInt8* >( pData ); - sal_uInt32 nBytesLeft = nBytes; - -- while( IsValid() && nBytesLeft ) -+ while( mbValid && nBytesLeft ) - { -- sal_uInt32 nReadSize = ::std::min( nBytesLeft, mnRecLeft ); -- sal_uInt32 nReadRet = ReadData( pBuffer, nReadSize ); -+ sal_uInt16 nReadSize = GetMaxRawReadSize( nBytesLeft ); -+ sal_uInt16 nReadRet = ReadRawData( pnBuffer, nReadSize ); - nRet += nReadRet; - mbValid = (nReadSize == nReadRet); -- DBG_ASSERT( !mbWarnings || IsValid(), "XclImpStream::Read - stream read error" ); -- pBuffer += nReadRet; -+ DBG_ASSERT( mbValid, "XclImpStream::Read - stream read error" ); -+ pnBuffer += nReadRet; - nBytesLeft -= nReadRet; -- if( IsValid() && nBytesLeft ) -- StartContinue(); -+ if( mbValid && nBytesLeft ) -+ JumpToNextContinue(); -+ DBG_ASSERT( mbValid, "XclImpStream::Read - record overread" ); - } - } - return nRet; -@@ -697,21 +726,21 @@ - sal_uInt32 XclImpStream::CopyToStream( SvStream& rOutStrm, sal_uInt32 nBytes ) - { - sal_uInt32 nRet = 0; -- if( IsValid() && nBytes ) -+ if( mbValid && nBytes ) - { - const sal_uInt32 nMaxBuffer = 0x1000; -- sal_uInt8* pBuffer = new sal_uInt8[ ::std::min( nBytes, nMaxBuffer ) ]; -+ sal_uInt8* pnBuffer = new sal_uInt8[ ::std::min( nBytes, nMaxBuffer ) ]; - sal_uInt32 nBytesLeft = nBytes; - -- while( IsValid() && nBytesLeft ) -+ while( mbValid && nBytesLeft ) - { - sal_uInt32 nReadSize = ::std::min( nBytesLeft, nMaxBuffer ); -- nRet += Read( pBuffer, nReadSize ); -- rOutStrm.Write( pBuffer, nReadSize ); -+ nRet += Read( pnBuffer, nReadSize ); -+ rOutStrm.Write( pnBuffer, static_cast< ULONG >( nReadSize ) ); - nBytesLeft -= nReadSize; - } - -- delete[] pBuffer; -+ delete[] pnBuffer; - } - return nRet; - } -@@ -734,69 +763,47 @@ - if( mbValidRec ) - { - sal_uInt32 nCurrPos = GetRecPos(); -- if( nPos > nCurrPos ) // forward -- Ignore( nPos - nCurrPos ); -- else if( nPos < nCurrPos ) // backward -+ if( !mbValid || (nPos < nCurrPos) ) // from invalid state or backward - { - RestorePosition( maFirstRec ); - Ignore( nPos ); - } -+ else if( nPos > nCurrPos ) // forward -+ { -+ Ignore( nPos - nCurrPos ); -+ } - } - } - - void XclImpStream::Ignore( sal_uInt32 nBytes ) - { -+ // implementation similar to Read(), but without really reading anything - sal_uInt32 nBytesLeft = nBytes; -- while( IsValid() && nBytesLeft ) -+ while( mbValid && nBytesLeft ) - { -- sal_uInt32 nReadSize = ::std::min( nBytesLeft, mnRecLeft ); -- mrStrm.SeekRel( static_cast< sal_Int32 >( nReadSize ) ); -- mnRecLeft -= nReadSize; -+ sal_uInt16 nReadSize = GetMaxRawReadSize( nBytesLeft ); -+ mrStrm.SeekRel( nReadSize ); -+ mnRawRecLeft -= nReadSize; - nBytesLeft -= nReadSize; - if( nBytesLeft ) -- StartContinue(); -+ JumpToNextContinue(); -+ DBG_ASSERT( mbValid, "XclImpStream::Ignore - record overread" ); - } - } - -- - // ---------------------------------------------------------------------------- - --void XclImpStream::StartStringContinue( bool& rb16Bit ) --{ -- DBG_ASSERT( !mbWarnings || !mnRecLeft, "XclImpStream::StartStringContinue - unexpected garbage" ); -- -- if( mbCont && GetRecLeft() ) -- StartContinue(); -- else if( mnRecId == EXC_ID_CONT ) // start next CONTINUE for TXO import -- { -- sal_uInt16 nNewNum, nNewSize; -- mbValidRec = GetNextRecord( nNewNum, nNewSize ) && (nNewNum || nNewSize); -- mbValid = mbValidRec && (nNewNum == EXC_ID_CONT); -- if( mbValid ) -- { -- mnRecSize = nNewSize; -- mnNextRecPos = Tell() + nNewSize; -- SetupRecord(); -- } -- } -- else -- mbValid = false; -- -- if( mbValid ) -- rb16Bit = HasFlag( ReaduInt8(), EXC_STRF_16BIT ); --} -- - sal_uInt32 XclImpStream::ReadUniStringExtHeader( - bool& rb16Bit, bool& rbRich, bool& rbFareast, -- sal_uInt16& rnCrun, sal_uInt32& rnExtInf, sal_uInt8 nFlags ) -+ sal_uInt16& rnFormatRuns, sal_uInt32& rnExtInf, sal_uInt8 nFlags ) - { -- DBG_ASSERT( !HasFlag( nFlags, EXC_STRF_UNKNOWN ), "XclImpStream::ReadUniStringExt - unknown flags" ); -- rb16Bit = HasFlag( nFlags, EXC_STRF_16BIT ); -- rbRich = HasFlag( nFlags, EXC_STRF_RICH ); -- rbFareast = HasFlag( nFlags, EXC_STRF_FAREAST ); -- rnCrun = rbRich ? ReaduInt16() : 0; -+ DBG_ASSERT( !::get_flag( nFlags, EXC_STRF_UNKNOWN ), "XclImpStream::ReadUniStringExt - unknown flags" ); -+ rb16Bit = ::get_flag( nFlags, EXC_STRF_16BIT ); -+ rbRich = ::get_flag( nFlags, EXC_STRF_RICH ); -+ rbFareast = ::get_flag( nFlags, EXC_STRF_FAREAST ); -+ rnFormatRuns = rbRich ? ReaduInt16() : 0; - rnExtInf = rbFareast ? ReaduInt32() : 0; -- return rnExtInf + 4UL * rnCrun; -+ return rnExtInf + 4 * rnFormatRuns; - } - - sal_uInt32 XclImpStream::ReadUniStringExtHeader( bool& rb16Bit, sal_uInt8 nFlags ) -@@ -807,10 +814,13 @@ - return ReadUniStringExtHeader( rb16Bit, bRich, bFareast, nCrun, nExtInf, nFlags ); - } - --void XclImpStream::AppendRawUniString( String& rString, sal_uInt16 nChars, bool b16Bit ) -+// ---------------------------------------------------------------------------- -+ -+String XclImpStream::ReadRawUniString( sal_uInt16 nChars, bool b16Bit ) - { -- sal_uInt32 nCharsLeft = nChars; -- sal_uInt32 nReadSize; -+ String aRet; -+ sal_uInt16 nCharsLeft = nChars; -+ sal_uInt16 nReadSize; - - sal_Unicode* pcBuffer = new sal_Unicode[ nCharsLeft + 1 ]; - -@@ -818,12 +828,12 @@ - { - if( b16Bit ) - { -- nReadSize = ::std::min( nCharsLeft, mnRecLeft / 2 ); -- DBG_ASSERT( !mbWarnings || (nReadSize <= nCharsLeft) || !(mnRecLeft & 0x1), -+ nReadSize = ::std::min< sal_uInt16 >( nCharsLeft, mnRawRecLeft / 2 ); -+ DBG_ASSERT( (nReadSize <= nCharsLeft) || !(mnRawRecLeft & 0x1), - "XclImpStream::ReadRawUniString - missing a byte" ); - } - else -- nReadSize = ::std::min( nCharsLeft, mnRecLeft ); -+ nReadSize = GetMaxRawReadSize( nCharsLeft ); - - sal_Unicode* pcUniChar = pcBuffer; - sal_Unicode* pcEndChar = pcBuffer + nReadSize; -@@ -848,117 +858,226 @@ - } - - *pcEndChar = '\0'; -- rString.Append( pcBuffer ); -+ aRet.Append( pcBuffer ); - - nCharsLeft -= nReadSize; - if( nCharsLeft ) -- StartStringContinue( b16Bit ); -+ JumpToNextStringContinue( b16Bit ); - } - - delete[] pcBuffer; -+ return aRet; -+} -+ -+String XclImpStream::ReadUniString( sal_uInt16 nChars, sal_uInt8 nFlags ) -+{ -+ bool b16Bit; -+ sal_uInt32 nExtSize = ReadUniStringExtHeader( b16Bit, nFlags ); -+ String aRet( ReadRawUniString( nChars, b16Bit ) ); -+ SkipUniStringExtData( nExtSize ); -+ return aRet; -+} -+ -+String XclImpStream::ReadUniString( sal_uInt16 nChars ) -+{ -+ return ReadUniString( nChars, ReaduInt8() ); -+} -+ -+String XclImpStream::ReadUniString() -+{ -+ return ReadUniString( ReaduInt16() ); - } - - void XclImpStream::IgnoreRawUniString( sal_uInt16 nChars, bool b16Bit ) - { -- sal_uInt32 nCharsLeft = nChars; -- sal_uInt32 nReadSize; -+ sal_uInt16 nCharsLeft = nChars; -+ sal_uInt16 nReadSize; - - while( IsValid() && nCharsLeft ) - { - if( b16Bit ) - { -- nReadSize = ::std::min( nCharsLeft, mnRecLeft / 2 ); -- DBG_ASSERT( !mbWarnings || (nReadSize <= nCharsLeft) || !(mnRecLeft & 0x1), -+ nReadSize = ::std::min< sal_uInt16 >( nCharsLeft, mnRawRecLeft / 2 ); -+ DBG_ASSERT( (nReadSize <= nCharsLeft) || !(mnRawRecLeft & 0x1), - "XclImpStream::IgnoreRawUniString - missing a byte" ); - Ignore( nReadSize * 2 ); - } - else - { -- nReadSize = ::std::min( nCharsLeft, mnRecLeft ); -+ nReadSize = GetMaxRawReadSize( nCharsLeft ); - Ignore( nReadSize ); - } - - nCharsLeft -= nReadSize; - if( nCharsLeft ) -- StartStringContinue( b16Bit ); -+ JumpToNextStringContinue( b16Bit ); - } - } - --void XclImpStream::AppendUniString( String& rString, sal_uInt16 nChars, sal_uInt8 nFlags ) -+void XclImpStream::IgnoreUniString( sal_uInt16 nChars, sal_uInt8 nFlags ) - { - bool b16Bit; - sal_uInt32 nExtSize = ReadUniStringExtHeader( b16Bit, nFlags ); -- AppendRawUniString( rString, nChars, b16Bit ); -+ IgnoreRawUniString( nChars, b16Bit ); - SkipUniStringExtData( nExtSize ); - } - --String XclImpStream::ReadRawUniString( sal_uInt16 nChars, bool b16Bit ) -+void XclImpStream::IgnoreUniString( sal_uInt16 nChars ) - { -- String aRet; -- AppendRawUniString( aRet, nChars, b16Bit ); -- return aRet; -+ IgnoreUniString( nChars, ReaduInt8() ); - } - --String XclImpStream::ReadUniString( sal_uInt16 nChars, sal_uInt8 nFlags ) -+void XclImpStream::IgnoreUniString() - { -- String aRet; -- AppendUniString( aRet, nChars, nFlags ); -- return aRet; -+ IgnoreUniString( ReaduInt16() ); - } - --String XclImpStream::ReadUniString( sal_uInt16 nChars ) -+// ---------------------------------------------------------------------------- -+ -+String XclImpStream::ReadRawByteString( sal_uInt16 nChars ) - { -- String aRet; -- AppendUniString( aRet, nChars ); -+ sal_Char* pcBuffer = new sal_Char[ nChars + 1 ]; -+ sal_uInt16 nCharsRead = ReadRawData( pcBuffer, nChars ); -+ pcBuffer[ nCharsRead ] = '\0'; -+ String aRet( pcBuffer, mrRoot.GetCharSet() ); -+ delete[] pcBuffer; - return aRet; - } - --String XclImpStream::ReadUniString() -+String XclImpStream::ReadByteString( bool b16BitLen ) - { -- String aRet; -- AppendUniString( aRet ); -- return aRet; -+ return ReadRawByteString( ReadByteStrLen( b16BitLen ) ); - } - --void XclImpStream::IgnoreUniString( sal_uInt16 nChars, sal_uInt8 nFlags ) -+void XclImpStream::IgnoreRawByteString( sal_uInt16 nChars ) - { -- bool b16Bit; -- sal_uInt32 nExtSize = ReadUniStringExtHeader( b16Bit, nFlags ); -- IgnoreRawUniString( nChars, b16Bit ); -- SkipUniStringExtData( nExtSize ); -+ Ignore( nChars ); - } - --void XclImpStream::AppendRawByteString( String& rString, sal_uInt16 nChars ) -+void XclImpStream::IgnoreByteString( bool b16BitLen ) - { -- sal_Char* pcBuffer = new sal_Char[ nChars + 1 ]; -- sal_uInt32 nCharsRead = ReadData( pcBuffer, nChars ); -- pcBuffer[ nCharsRead ] = '\0'; -- rString.Append( String( pcBuffer, mrRoot.GetCharSet() ) ); -- delete[] pcBuffer; -+ IgnoreRawByteString( ReadByteStrLen( b16BitLen ) ); - } - --String XclImpStream::ReadRawByteString( sal_uInt16 nChars ) -+// private -------------------------------------------------------------------- -+ -+void XclImpStream::StorePosition( XclImpStreamPos& rPos ) - { -- String aRet; -- AppendRawByteString( aRet, nChars ); -- return aRet; -+ rPos.Set( mrStrm, mnNextRecPos, mnCurrRecSize, mnRawRecId, mnRawRecSize, mnRawRecLeft, mbValid ); - } - --String XclImpStream::ReadByteString( bool b16BitLen ) -+void XclImpStream::RestorePosition( const XclImpStreamPos& rPos ) - { -- String aRet; -- AppendByteString( aRet, b16BitLen ); -- return aRet; -+ rPos.Get( mrStrm, mnNextRecPos, mnCurrRecSize, mnRawRecId, mnRawRecSize, mnRawRecLeft, mbValid ); -+ SetupDecrypter(); - } - -+bool XclImpStream::ReadNextRawRecHeader() -+{ -+ mrStrm.Seek( mnNextRecPos ); -+ bool bRet = (mnNextRecPos < mnStreamSize); -+ if( bRet ) -+ mrStrm >> mnRawRecId >> mnRawRecSize; -+ return bRet; -+} - --// ---------------------------------------------------------------------------- -+void XclImpStream::SetupDecrypter() -+{ -+ if( mxDecrypter.get() ) -+ mxDecrypter->Update( mrStrm, mnRawRecSize ); -+} - --sal_uInt32 XclImpStream::Tell() const -+void XclImpStream::SetupRawRecord() - { -- return mrStrm.Tell(); -+ // pre: mnRawRecSize contains current raw record size -+ // pre: mrStrm points to start of raw record data -+ mnNextRecPos = mrStrm.Tell() + mnRawRecSize; -+ mnRawRecLeft = mnRawRecSize; -+ mnCurrRecSize += mnRawRecSize; -+ SetupDecrypter(); // decrypter works on raw record level - } - -+void XclImpStream::SetupRecord() -+{ -+ mnRecId = mnRawRecId; -+ mnAltContId = EXC_ID_UNKNOWN; -+ mnCurrRecSize = 0; -+ mnComplRecSize = mnRawRecSize; -+ mbHasComplRec = !mbCont; -+ SetupRawRecord(); -+ SetNulSubstChar(); -+ EnableDecryption(); -+ StorePosition( maFirstRec ); -+} -+ -+bool XclImpStream::IsContinueId( sal_uInt16 nRecId ) const -+{ -+ return (nRecId == EXC_ID_CONT) || (nRecId == mnAltContId); -+} -+ -+bool XclImpStream::JumpToNextContinue() -+{ -+ mbValid = mbValid && (mbCont || IsContinueId( mnRecId )); -+ if( mbValid ) -+ mbValid = ReadNextRawRecHeader() && IsContinueId( mnRawRecId ); -+ if( mbValid ) // do not setup a following non-CONTINUE record -+ SetupRawRecord(); -+ return mbValid; -+} -+ -+bool XclImpStream::JumpToNextStringContinue( bool& rb16Bit ) -+{ -+ DBG_ASSERT( !mnRawRecLeft, "XclImpStream::JumpToNextStringContinue - unexpected garbage" ); -+ -+ if( mbCont && GetRecLeft() ) -+ { -+ JumpToNextContinue(); -+ } -+ else if( mnRecId == EXC_ID_CONT ) -+ { -+ // CONTINUE handling is off, but we have started reading in a CONTINUE record -+ // -> start next CONTINUE for TXO import -+ mbValidRec = ReadNextRawRecHeader() && (mnRawRecId || mnRawRecSize); -+ mbValid = mbValidRec && (mnRawRecId == EXC_ID_CONT); -+ // we really start a new record here - no chance to return to string origin -+ if( mbValid ) -+ SetupRecord(); -+ } -+ else -+ mbValid = false; -+ -+ if( mbValid ) -+ rb16Bit = ::get_flag( ReaduInt8(), EXC_STRF_16BIT ); -+ return mbValid; -+} -+ -+bool XclImpStream::EnsureRawReadSize( sal_uInt16 nBytes ) -+{ -+ if( mbValid && nBytes ) -+ { -+ while( mbValid && !mnRawRecLeft ) JumpToNextContinue(); -+ mbValid = mbValid && (nBytes <= mnRawRecLeft); -+ DBG_ASSERT( mbValid, "XclImpStream::EnsureRawReadSize - record overread" ); -+ } -+ return mbValid; -+} -+ -+sal_uInt16 XclImpStream::GetMaxRawReadSize( sal_uInt32 nBytes ) const -+{ -+ return static_cast< sal_uInt16 >( ::std::min< sal_uInt32 >( nBytes, mnRawRecLeft ) ); -+} -+ -+sal_uInt16 XclImpStream::ReadRawData( void* pData, sal_uInt16 nBytes ) -+{ -+ DBG_ASSERT( (nBytes <= mnRawRecLeft), "XclImpStream::ReadRawData - record overread" ); -+ sal_uInt16 nRet = 0; -+ if( mbUseDecr ) -+ nRet = mxDecrypter->Read( mrStrm, pData, nBytes ); -+ else -+ nRet = static_cast< sal_uInt16 >( mrStrm.Read( pData, nBytes ) ); -+ mnRawRecLeft -= nRet; -+ return nRet; -+} - - // ============================================================================ - -Index: sc/source/filter/excel/xistyle.cxx -=================================================================== -RCS file: /cvs/sc/sc/source/filter/excel/xistyle.cxx,v -retrieving revision 1.14 -retrieving revision 1.13.6.2 -diff -w -u -r1.14 -r1.13.6.2 ---- sc/source/filter/excel/xistyle.cxx 4 Jun 2004 10:47:43 -0000 1.14 -+++ sc/source/filter/excel/xistyle.cxx 14 Jul 2004 10:19:39 -0000 1.13.6.2 -@@ -425,14 +425,12 @@ - - void XclImpFont::ReadFontName2( XclImpStream& rStrm ) - { -- maData.maName.Erase(); -- rStrm.AppendByteString( maData.maName, false ); -+ maData.maName = rStrm.ReadByteString( false ); - } - - void XclImpFont::ReadFontName8( XclImpStream& rStrm ) - { -- maData.maName.Erase(); -- rStrm.AppendUniString( maData.maName, rStrm.ReaduInt8() ); -+ maData.maName = rStrm.ReadUniString( rStrm.ReaduInt8() ); - } - - void XclImpFont::GuessScriptType() -@@ -677,7 +675,7 @@ - { - case xlBiff2: - case xlBiff3: -- rStrm.AppendByteString( aFormat, false ); -+ aFormat = rStrm.ReadByteString( false ); - bAppend = true; - break; - -@@ -687,12 +685,12 @@ - case xlBiff5: - case xlBiff7: - rStrm >> nIndex; -- rStrm.AppendByteString( aFormat, false ); -+ aFormat = rStrm.ReadByteString( false ); - break; - - case xlBiff8: - rStrm >> nIndex; -- rStrm.AppendUniString( aFormat ); -+ aFormat = rStrm.ReadUniString(); - break; - - default: -@@ -1486,9 +1484,9 @@ - { - String aStyleName; - if( GetBiff() < xlBiff8 ) -- rStrm.AppendByteString( aStyleName, false ); // 8 bit length -+ aStyleName = rStrm.ReadByteString( false ); // 8 bit length - else -- rStrm.AppendUniString( aStyleName ); -+ aStyleName = rStrm.ReadUniString(); - if( aStyleName.Len() ) // #i1624# #i1768# ignore unnamed styles - pXF->SetStyleName( aStyleName ); - } -Index: sc/source/filter/excel/xlocx.cxx -=================================================================== -RCS file: /cvs/sc/sc/source/filter/excel/xlocx.cxx,v -retrieving revision 1.9 -retrieving revision 1.6.6.2 -diff -w -u -r1.9 -r1.6.6.2 ---- sc/source/filter/excel/xlocx.cxx 28 Jun 2004 17:58:28 -0000 1.9 -+++ sc/source/filter/excel/xlocx.cxx 14 Jul 2004 10:20:07 -0000 1.6.6.2 -@@ -218,7 +218,7 @@ - XclOcxConverter( rRoot ), - XclImpRoot( rRoot ) - { -- mxStrm = ScfTools::OpenStorageStreamRead( GetRootStorage(), EXC_STREAMNAME_CTLS ); -+ mxStrm = OpenStream( EXC_STREAMNAME_CTLS ); - } - - bool XclImpOcxConverter::CreateSdrUnoObj( XclImpEscherOle& rOcxCtrl ) -@@ -457,7 +457,7 @@ - { - // output stream - if( !mxStrm.Is() ) -- mxStrm = ScfTools::OpenStorageStreamWrite( GetRootStorage(), EXC_STREAMNAME_CTLS ); -+ mxStrm = OpenStream( EXC_STREAMNAME_CTLS ); - if( mxStrm.Is() ) - { - String aClassName; -Index: sc/source/filter/excel/xlroot.cxx -=================================================================== -RCS file: /cvs/sc/sc/source/filter/excel/xlroot.cxx,v -retrieving revision 1.12 -retrieving revision 1.11.6.5 -diff -w -u -r1.12 -r1.11.6.5 ---- sc/source/filter/excel/xlroot.cxx 4 Jun 2004 10:48:23 -0000 1.12 -+++ sc/source/filter/excel/xlroot.cxx 16 Jul 2004 17:39:37 -0000 1.11.6.5 -@@ -68,12 +68,18 @@ - #ifndef _SV_SVAPP_HXX - #include <vcl/svapp.hxx> - #endif -+#ifndef _SFXSTRITEM_HXX -+#include <svtools/stritem.hxx> -+#endif - #ifndef _SFX_OBJSH_HXX - #include <sfx2/objsh.hxx> - #endif - #ifndef _SFX_PRINTER_HXX - #include <sfx2/printer.hxx> - #endif -+#ifndef _SFXDOCFILE_HXX -+#include <sfx2/docfile.hxx> -+#endif - #ifndef _SV_FONT_HXX - #include <vcl/font.hxx> - #endif -@@ -81,10 +87,6 @@ - #include <svx/editstat.hxx> - #endif - --#ifndef _COM_SUN_STAR_UNO_REFERENCE_HXX_ --#include <com/sun/star/uno/Reference.hxx> --#endif -- - #ifndef SC_ITEMS_HXX - #include "scitems.hxx" - #endif -@@ -114,6 +116,9 @@ - #include "patattr.hxx" - #endif - -+#ifndef SC_FAPIHELPER_HXX -+#include "fapihelper.hxx" -+#endif - #ifndef SC_XLSTYLE_HXX - #include "xlstyle.hxx" - #endif -@@ -123,20 +128,17 @@ - - #include "root.hxx" - -- - namespace com { namespace sun { namespace star { namespace frame { class XModel; } } } } - - using ::com::sun::star::uno::Reference; - using ::com::sun::star::frame::XModel; - -- - // Global data ================================================================ - --XclRootData::XclRootData( XclBiff eBiff, ScDocument& rDocument, const String& rDocUrl, CharSet eCharSet ) : -+XclRootData::XclRootData( XclBiff eBiff, SfxMedium& rMedium, ScDocument& rDocument, CharSet eCharSet, bool bExport ) : - meBiff( eBiff ), -+ mrMedium( rMedium ), - mrDoc( rDocument ), -- maDocUrl( rDocUrl ), -- maBasePath( rDocUrl, 0, rDocUrl.SearchBackward( '/' ) + 1 ), - meCharSet( eCharSet ), - meSysLang( Application::GetSettings().GetLanguage() ), - meDocLang( Application::GetSettings().GetLanguage() ), -@@ -148,17 +150,29 @@ - static_cast<SCTAB>(EXC_MAXTAB2) ), - mnCharWidth( 110 ), - mnScTab( 0 ), -+ mbExport( bExport ), - mbTruncated( false ), -- mpRDP( new RootData )//! -+ mbHasPassw( false ), -+ mxRD( new RootData )//! - { - #ifdef DBG_UTIL - mnObjCnt = 0; - #endif - -+ // document URL and path -+ if( const SfxItemSet* pItemSet = mrMedium.GetItemSet() ) -+ if( const SfxStringItem* pItem = static_cast< const SfxStringItem* >( pItemSet->GetItem( SID_FILE_NAME ) ) ) -+ maDocUrl = pItem->GetValue(); -+ maBasePath = maDocUrl.Copy( 0, maDocUrl.SearchBackward( '/' ) + 1 ); -+ -+ // extended document options - if( mrDoc.GetExtDocOptions() ) - mpExtDocOpt.reset( new ScExtDocOptions( *mrDoc.GetExtDocOptions() ) ); - else - mpExtDocOpt.reset( new ScExtDocOptions ); -+ -+ mpTracer.reset( new XclTracer( maDocUrl, CREATE_OUSTRING( -+ mbExport ? "Office.Tracing/Export/Excel" : "Office.Tracing/Import/Excel" ) ) ); - } - - XclRootData::~XclRootData() -@@ -168,12 +182,11 @@ - #endif - } - -- - // ---------------------------------------------------------------------------- - - XclRoot::XclRoot( XclRootData& rRootData ) : - mrData( rRootData ), -- mpRD( rRootData.mpRDP.get() )//! -+ mpRD( rRootData.mxRD.get() )//! - { - #ifdef DBG_UTIL - ++mrData.mnObjCnt; -@@ -264,6 +277,48 @@ - mrData.maMaxPos.SetTab( ::std::min( mrData.maScMaxPos.Tab(), mrData.maXclMaxPos.Tab() ) ); - } - -+const String& XclRoot::QueryPassword() const -+{ -+ if( !mrData.mbHasPassw ) -+ { -+ mrData.maPassw = ScfApiHelper::QueryPasswordForMedium( GetMedium() ); -+ // set to true, even if dialog has been cancelled (never ask twice) -+ mrData.mbHasPassw = true; -+ -+ GetExtDocOptions().SetWinEncryption( true ); -+ } -+ return mrData.maPassw; -+} -+ -+SvStorage* XclRoot::GetRootStorage() const -+{ -+ return GetMedium().GetStorage(); -+} -+ -+SvStorageRef XclRoot::OpenStorage( SvStorage* pStrg, const String& rStrgName ) const -+{ -+ return mrData.mbExport ? -+ ScfTools::OpenStorageWrite( pStrg, rStrgName ) : -+ ScfTools::OpenStorageRead( pStrg, rStrgName ); -+} -+ -+SvStorageRef XclRoot::OpenStorage( const String& rStrgName ) const -+{ -+ return OpenStorage( GetRootStorage(), rStrgName ); -+} -+ -+SvStorageStreamRef XclRoot::OpenStream( SvStorage* pStrg, const String& rStrmName ) const -+{ -+ return mrData.mbExport ? -+ ScfTools::OpenStorageStreamWrite( pStrg, rStrmName ) : -+ ScfTools::OpenStorageStreamRead( pStrg, rStrmName ); -+} -+ -+SvStorageStreamRef XclRoot::OpenStream( const String& rStrmName ) const -+{ -+ return OpenStream( GetRootStorage(), rStrmName ); -+} -+ - SfxObjectShell* XclRoot::GetDocShell() const - { - return GetDoc().GetDocumentShell(); -@@ -295,11 +350,6 @@ - return *GetDoc().GetRangeName(); - } - --SvStorage* XclRoot::GetRootStorage() const --{ -- return mpRD->pRootStorage; --} -- - ScEditEngineDefaulter& XclRoot::GetEditEngine() const - { - if( !mrData.mpEditEngine.get() ) -@@ -408,7 +458,6 @@ - delete rRanges.Remove( nIndex ); - } - } -- - - // ============================================================================ - -cvs server: tag CWS_SRC680_ENCRYPTION_ANCHOR is not in file sc/source/filter/excel/xlstream.cxx -cvs server: Diffing sc/source/filter/ftools -Index: sc/source/filter/ftools/fapihelper.cxx -=================================================================== -RCS file: /cvs/sc/sc/source/filter/ftools/fapihelper.cxx,v -retrieving revision 1.2 -retrieving revision 1.2.280.2 -diff -w -u -r1.2 -r1.2.280.2 ---- sc/source/filter/ftools/fapihelper.cxx 26 Mar 2003 18:04:50 -0000 1.2 -+++ sc/source/filter/ftools/fapihelper.cxx 16 Jul 2004 17:43:07 -0000 1.2.280.2 -@@ -59,24 +59,48 @@ - * - ************************************************************************/ - --#ifdef PCH --#include "filt_pch.hxx" --#endif --#pragma hdrstop -- - // ============================================================================ - - #ifndef SC_FAPIHELPER_HXX - #include "fapihelper.hxx" - #endif - -+#ifndef _COM_SUN_STAR_TASK_XINTERACTIONHANDLER_HPP_ -+#include <com/sun/star/task/XInteractionHandler.hpp> -+#endif -+#ifndef _COM_SUN_STAR_TASK_XINTERACTIONREQUEST_HPP_ -+#include <com/sun/star/task/XInteractionRequest.hpp> -+#endif -+ -+#ifndef _URLOBJ_HXX -+#include <tools/urlobj.hxx> -+#endif -+// no include guard in this header!!! -+//#ifndef ... -+#include <svtools/docpasswdrequest.hxx> -+//#endif -+#ifndef _SFXDOCFILE_HXX -+#include <sfx2/docfile.hxx> -+#endif -+#ifndef _SFXSTRITEM_HXX //SfxStringItem -+#include <svtools/stritem.hxx> -+#endif -+#ifndef _SFXITEMSET_HXX -+#include <svtools/itemset.hxx> -+#endif -+#ifndef _SFXSIDS_HRC -+#include <sfx2/sfxsids.hrc> -+#endif -+ -+ - using ::rtl::OUString; - using ::com::sun::star::uno::Any; - using ::com::sun::star::uno::Reference; - using ::com::sun::star::uno::Exception; - using ::com::sun::star::beans::XPropertySet; - using ::com::sun::star::beans::XPropertySetInfo; -- -+using ::com::sun::star::task::XInteractionHandler; -+using ::com::sun::star::task::XInteractionRequest; - - // Set properties ============================================================= - -@@ -116,6 +139,42 @@ - return bSuccess; - } - -+// Static helper functions ==================================================== -+ -+String ScfApiHelper::QueryPasswordForMedium( SfxMedium& rMedium ) -+{ -+ String aPassw; -+ const SfxItemSet* pSet = rMedium.GetItemSet(); -+ const SfxPoolItem *pPasswordItem; -+ -+ if(pSet && SFX_ITEM_SET == pSet->GetItemState(SID_PASSWORD, TRUE, &pPasswordItem)) -+ aPassw = ((const SfxStringItem *)pPasswordItem)->GetValue(); -+ else -+ { -+ try -+ { -+ Reference< XInteractionHandler > xHandler( rMedium.GetInteractionHandler() ); -+ if( xHandler.is() ) -+ { -+ RequestDocumentPassword* pRequest = new RequestDocumentPassword( -+ ::com::sun::star::task::PasswordRequestMode_PASSWORD_ENTER, -+ INetURLObject( rMedium.GetOrigURL() ).GetName( INetURLObject::DECODE_WITH_CHARSET ) ); -+ Reference< XInteractionRequest > xRequest( pRequest ); -+ -+ xHandler->handle( xRequest ); -+ -+ if( pRequest->isPassword() ) -+ aPassw = pRequest->getPassword(); -+ } -+ } -+ catch( Exception& ) -+ { -+ } -+ } -+ -+ return aPassw; -+} -+ - - // MultiPropertySets ========================================================== - -Index: sc/source/filter/ftools/ftools.cxx -=================================================================== -RCS file: /cvs/sc/sc/source/filter/ftools/ftools.cxx,v -retrieving revision 1.7 -retrieving revision 1.7.6.1 -diff -w -u -r1.7 -r1.7.6.1 ---- sc/source/filter/ftools/ftools.cxx 2 Mar 2004 09:40:57 -0000 1.7 -+++ sc/source/filter/ftools/ftools.cxx 25 Mar 2004 13:04:50 -0000 1.7.6.1 -@@ -59,12 +59,6 @@ - * - ************************************************************************/ - --#ifdef PCH --#include "filt_pch.hxx" --#endif -- --#pragma hdrstop -- - // ============================================================================ - - #ifndef SC_FTOOLS_HXX -@@ -239,26 +230,41 @@ - rName.SetChar( nPos, '_' ); - } - -- - // *** streams and storages *** ----------------------------------------------- - --const SvStorageStreamRef ScfTools::OpenStorageStreamRead( SvStorage* pStorage, const String& rStrmName ) -+SvStorageRef ScfTools::OpenStorageRead( SvStorage* pStrg, const String& rStrgName ) -+{ -+ SvStorageRef xSubStrg; -+ if( pStrg && pStrg->IsContained( rStrgName ) ) -+ xSubStrg = pStrg->OpenStorage( rStrgName, STREAM_STD_READ ); -+ return xSubStrg; -+} -+ -+SvStorageRef ScfTools::OpenStorageWrite( SvStorage* pStrg, const String& rStrgName ) -+{ -+ SvStorageRef xSubStrg; -+ if( pStrg ) -+ xSubStrg = pStrg->OpenStorage( rStrgName, STREAM_STD_WRITE ); -+ return xSubStrg; -+} -+ -+SvStorageStreamRef ScfTools::OpenStorageStreamRead( SvStorage* pStrg, const String& rStrmName ) - { - SvStorageStreamRef xStrm; -- if( pStorage && pStorage->IsContained( rStrmName ) && pStorage->IsStream( rStrmName ) ) -- xStrm = pStorage->OpenStream( rStrmName, STREAM_READ | STREAM_SHARE_DENYALL ); -+ if( pStrg && pStrg->IsContained( rStrmName ) && pStrg->IsStream( rStrmName ) ) -+ xStrm = pStrg->OpenStream( rStrmName, STREAM_STD_READ ); - return xStrm; - } - --const SvStorageStreamRef ScfTools::OpenStorageStreamWrite( SvStorage* pStorage, const String& rStrmName ) -+SvStorageStreamRef ScfTools::OpenStorageStreamWrite( SvStorage* pStrg, const String& rStrmName ) - { -+ DBG_ASSERT( !pStrg || !pStrg->IsContained( rStrmName ), "ScfTools::OpenStorageStreamWrite - stream exists already" ); - SvStorageStreamRef xStrm; -- if( pStorage ) -- xStrm = pStorage->OpenStream( rStrmName/*, STREAM_READWRITE | STREAM_TRUNC*/ ); -+ if( pStrg ) -+ xStrm = pStrg->OpenStream( rStrmName, STREAM_STD_WRITE | STREAM_TRUNC ); - return xStrm; - } - -- - // *** item handling *** ------------------------------------------------------ - - bool ScfTools::CheckItem( const SfxItemSet& rItemSet, sal_uInt16 nWhichId, bool bDeep ) -Index: sc/source/filter/inc/XclImpChangeTrack.hxx -=================================================================== -RCS file: /cvs/sc/sc/source/filter/inc/XclImpChangeTrack.hxx,v -retrieving revision 1.14 -retrieving revision 1.13.282.4 -diff -w -u -r1.14 -r1.13.282.4 ---- sc/source/filter/inc/XclImpChangeTrack.hxx 4 Jun 2004 10:50:45 -0000 1.14 -+++ sc/source/filter/inc/XclImpChangeTrack.hxx 14 Jul 2004 10:22:59 -0000 1.13.282.4 -@@ -118,7 +118,7 @@ - String sOldUsername; - - ScChangeTrack* pChangeTrack; -- SvStream* pInStrm; // input stream -+ SvStorageStreamRef xInStrm; // input stream - XclImpStream* pStrm; // stream import class - sal_uInt16 nTabIdCount; - sal_Bool bGlobExit; // global exit loop -@@ -169,7 +169,7 @@ - void ReadRecords(); - - public: -- XclImpChangeTrack( RootData* pRootData ); -+ XclImpChangeTrack( RootData* pRootData, const XclImpStream& rBookStrm ); - ~XclImpChangeTrack(); - - // reads extended 3D ref info following the formulas, returns sc tab nums -@@ -214,7 +214,7 @@ - - inline void XclImpChangeTrack::ReadString( String& rString ) - { -- pStrm->AppendUniString( rString ); -+ rString = pStrm->ReadUniString(); - } - - inline void XclImpChangeTrack::IgnoreString() -Index: sc/source/filter/inc/biffdump.hxx -=================================================================== -RCS file: /cvs/sc/sc/source/filter/inc/biffdump.hxx,v -retrieving revision 1.11 -retrieving revision 1.11.242.2 -diff -w -u -r1.11 -r1.11.242.2 ---- sc/source/filter/inc/biffdump.hxx 21 May 2003 08:01:01 -0000 1.11 -+++ sc/source/filter/inc/biffdump.hxx 25 Mar 2004 13:15:17 -0000 1.11.242.2 -@@ -86,8 +86,8 @@ - #ifndef _EXCFORM_HXX - #include "excform.hxx" - #endif --#ifndef _ROOT_HXX --#include "root.hxx" -+#ifndef SC_XIROOT_HXX -+#include "xiroot.hxx" - #endif - - -@@ -171,7 +171,7 @@ - - - --class Biff8RecDumper : public ExcRoot -+class Biff8RecDumper : public XclImpRoot - { - private: - protected: -@@ -185,7 +185,6 @@ - - SvFileStream* pDumpStream; - XclImpStream* pIn; -- SvStorage* pPivotCache; - - UINT32 nMaxBodyLines; - BOOL bEndLoading; -@@ -197,6 +196,7 @@ - BOOL bBlankLine; - BOOL bExportBookStream; - BOOL bBIFF8; -+ bool bEncrypted; - - UINT32 nFieldCnt; - UINT32 nItemCnt; -@@ -225,7 +225,7 @@ - - void Print( const ByteString& rStr ); - void Print( const sal_Char* pStr ); -- void DumpSubStream( SvStorage* pStorage, const sal_Char* pStreamName ); -+ void DumpSubStream( SvStorage* pStorage, const String& rStrmName ); - void DumpPivotCache( const UINT16 nStrId ); - UINT16 DumpXF( XclImpStream& rIn, const sal_Char* pPre ); - void DumpValidPassword( XclImpStream& rIn, const sal_Char* pPre ); -@@ -236,6 +236,7 @@ - void ContDumpStream( SvStream& rStrm, const ULONG nL ); - void FormulaDump( const UINT16 nL, const FORMULA_TYPE eFT ); - void ControlsDump( SvStream& rIn ); -+ void PreDumpDecrypted( ULONG nL ); - static const sal_Char* GetBlanks( const UINT16 nNumOfBlanks ); - static BOOL IsLineEnd( const sal_Char c, sal_Char& rNext, SvStream& rIn, INT32& rLeft ); - void Init( void ); -@@ -286,7 +287,7 @@ - inline const DUMP_ERR* FirstErr( void ); - inline const DUMP_ERR* NextErr( void ); - public: -- Biff8RecDumper( RootData& rRootData, BOOL bBIFF8 ); -+ Biff8RecDumper( const XclImpRoot& rRoot, BOOL bBIFF8 ); - ~Biff8RecDumper(); - BOOL Dump( XclImpStream& rIn ); - // = TRUE -> nicht weiter laden -Index: sc/source/filter/inc/excdefs.hxx -=================================================================== -RCS file: /cvs/sc/sc/source/filter/inc/excdefs.hxx,v -retrieving revision 1.43 -retrieving revision 1.41.6.2 -diff -w -u -r1.43 -r1.41.6.2 ---- sc/source/filter/inc/excdefs.hxx 4 Jun 2004 14:03:50 -0000 1.43 -+++ sc/source/filter/inc/excdefs.hxx 14 Jul 2004 10:23:50 -0000 1.41.6.2 -@@ -171,6 +171,9 @@ - #define EXC_OUTLINE_COUNT (EXC_OUTLINE_MAX + 1) - - // defines for change tracking ================================================ -+ -+#define EXC_STREAM_USERNAMES CREATE_STRING( "User Names" ) -+#define EXC_STREAM_REVLOG CREATE_STRING( "Revision Log" ) - - // opcodes - #define EXC_CHTR_OP_COLFLAG 0x0001 -Index: sc/source/filter/inc/excimp8.hxx -=================================================================== -RCS file: /cvs/sc/sc/source/filter/inc/excimp8.hxx,v -retrieving revision 1.53 -retrieving revision 1.51.108.3 -diff -w -u -r1.53 -r1.51.108.3 ---- sc/source/filter/inc/excimp8.hxx 4 Jun 2004 14:04:06 -0000 1.53 -+++ sc/source/filter/inc/excimp8.hxx 14 Jul 2004 10:24:17 -0000 1.51.108.3 -@@ -153,11 +153,9 @@ - - public: - ImportExcel8( -- SvStorage* pStorage, -+ SfxMedium& rMedium, - SvStream& aStream, -- ScDocument* pDoc, -- const String& rDocUrl, -- SvStorage* pPivotCache ); -+ ScDocument* pDoc ); - - virtual ~ImportExcel8( void ); - -Index: sc/source/filter/inc/exp_op.hxx -=================================================================== -RCS file: /cvs/sc/sc/source/filter/inc/exp_op.hxx,v -retrieving revision 1.7 -retrieving revision 1.6.272.2 -diff -w -u -r1.7 -r1.6.272.2 ---- sc/source/filter/inc/exp_op.hxx 4 Jun 2004 10:53:48 -0000 1.7 -+++ sc/source/filter/inc/exp_op.hxx 14 Jul 2004 10:24:46 -0000 1.6.272.2 -@@ -152,7 +152,7 @@ - RootData* pExcRoot; - - public: -- ExportBiff5( SvStorage&, SvStream&, XclBiff, ScDocument*, const String& rBasePath, CharSet eDest, bool bRelUrl ); -+ ExportBiff5( SfxMedium& rMedium, SvStream&, XclBiff, ScDocument*, CharSet eDest, bool bRelUrl ); - virtual ~ExportBiff5(); - FltError Write(); - }; -@@ -163,7 +163,7 @@ - class ExportBiff8 : public ExportBiff5 - { - public: -- ExportBiff8( SvStorage&, SvStream&, XclBiff, ScDocument*, const String& rBasePath, CharSet eDest, bool bRelUrl ); -+ ExportBiff8( SfxMedium& rMedium, SvStream&, XclBiff, ScDocument*, CharSet eDest, bool bRelUrl ); - virtual ~ExportBiff8(); - }; - -Index: sc/source/filter/inc/fapihelper.hxx -=================================================================== -RCS file: /cvs/sc/sc/source/filter/inc/fapihelper.hxx,v -retrieving revision 1.4 -retrieving revision 1.4.140.1 -diff -w -u -r1.4 -r1.4.140.1 ---- sc/source/filter/inc/fapihelper.hxx 7 Aug 2003 15:30:15 -0000 1.4 -+++ sc/source/filter/inc/fapihelper.hxx 23 Mar 2004 17:40:54 -0000 1.4.140.1 -@@ -80,13 +80,15 @@ - #include <com/sun/star/beans/XMultiPropertySet.hpp> - #endif - --#ifndef _TOOLS_DEBUG_HXX --#include <tools/debug.hxx> --#endif - #ifndef _COMPHELPER_TYPES_HXX_ - #include <comphelper/types.hxx> - #endif - -+#ifndef SC_FTOOLS_HXX -+#include "ftools.hxx" -+#endif -+ -+class SfxMedium; - - // ============================================================================ - -@@ -129,7 +131,6 @@ - ::setPropValue( xProp, rName, ::rtl::OUString( rText ) ); - } - -- - // Get properties ============================================================= - - /** Puts the value of a property into an Any. The XPropertySet must be valid. -@@ -177,6 +178,16 @@ - return ::getPropBool( bRet, rxProp, rName ) && bRet; - } - -+// Static helper functions ==================================================== -+ -+/** Static API helper functions. */ -+class ScfApiHelper : ScfNoInstance -+{ -+public: -+ /** Opens a password dialog and returns the entered password. -+ @return The entered password or an empty string on 'Cancel' or any error. */ -+ static String QueryPasswordForMedium( SfxMedium& rMedium ); -+}; - - // MultiPropertySets ========================================================== - -@@ -223,6 +234,7 @@ - const XPropertySetRef& xPropSet ); - }; - -+// ---------------------------------------------------------------------------- - - inline const ::rtl::OUString& ScfMultiPSHelper::getName( sal_Int32 nIndex ) const - { -@@ -235,7 +247,6 @@ - DBG_ASSERT( (0 <= nIndex) && (nIndex < maValueSeq.getLength()), "ScfMultiPSHelper::getValue - invalid index" ); - return maValueSeq[ nIndex ]; - } -- - - // ============================================================================ - -Index: sc/source/filter/inc/ftools.hxx -=================================================================== -RCS file: /cvs/sc/sc/source/filter/inc/ftools.hxx,v -retrieving revision 1.10 -retrieving revision 1.7.108.3 -diff -w -u -r1.10 -r1.7.108.3 ---- sc/source/filter/inc/ftools.hxx 4 Jun 2004 14:07:10 -0000 1.10 -+++ sc/source/filter/inc/ftools.hxx 14 Jul 2004 10:25:17 -0000 1.7.108.3 -@@ -127,7 +124,7 @@ - /** Returns the value, if it is not greater than nMax, otherwise nMax. */ - template< typename ReturnType, typename Type > - inline ReturnType ulimit( Type nValue, ReturnType nMax ) --{ return static_cast< ReturnType >( ::std::min< Type >( nValue, nMax ) ); } -+{ return static_cast< ReturnType >( ::std::min( nValue, static_cast< Type >( nMax ) ) ); } - - /** Returns the value, if it fits into ReturnType, otherwise the maximum value of ReturnType. */ - template< typename ReturnType, typename Type > -@@ -187,46 +183,6 @@ - (rnBitField &= ~(nMask << nStartBit)) |= (nNewValue << nStartBit); - } - -- --// Modify values on bit-level ------------------------------------------------- -- --/** Rotates rnValue left by nBits bits. */ --template< typename Type > --inline void rotate_left( Type& rnValue, sal_uInt8 nBits ) --{ -- DBG_ASSERT( nBits < sizeof( Type ) * 8, "rotate_left - overflow" ); -- rnValue = static_cast< Type >( (rnValue << nBits) | (rnValue >> (sizeof( Type ) * 8 - nBits)) ); --} -- --/** Rotates the lower nWidth bits of rnValue left by nBits bits. */ --template< typename Type > --inline void rotate_left( Type& rnValue, sal_uInt8 nBits, sal_uInt8 nWidth ) --{ -- DBG_ASSERT( (nBits < nWidth) && (nWidth < sizeof( Type ) * 8), "rotate_left - overflow" ); -- Type nMask = static_cast< Type >( (1UL << nWidth) - 1 ); -- rnValue = static_cast< Type >( -- ((rnValue << nBits) | ((rnValue & nMask) >> (nWidth - nBits))) & nMask ); --} -- --/** Rotates rnValue right by nBits bits. */ --template< typename Type > --inline void rotate_right( Type& rnValue, sal_uInt8 nBits ) --{ -- DBG_ASSERT( nBits < sizeof( Type ) * 8, "rotate_right - overflow" ); -- return static_cast< Type >( (rnValue >> nBits) | (rnValue << (sizeof( Type ) * 8 - nBits)) ); --} -- --/** Rotates the lower nWidth bits of rnValue right by nBits bits. */ --template< typename Type > --inline void rotate_right( Type& rnValue, sal_uInt8 nBits, sal_uInt8 nWidth ) --{ -- DBG_ASSERT( (nBits < nWidth) && (nWidth < sizeof( Type ) * 8), "rotate_right - overflow" ); -- Type nMask = static_cast< Type >( (1UL << nWidth) - 1 ); -- return static_cast< Type >( -- (((rnValue & nMask) >> nBits) | (rnValue << (nWidth - nBits))) & nMask ); --} -- -- - // ============================================================================ - - /** Deriving from this class prevents copy construction. */ -@@ -239,29 +195,28 @@ - inline ScfNoCopy() {} - }; - -- - // ---------------------------------------------------------------------------- - - /** Deriving from this class prevents construction in general. */ - class ScfNoInstance : private ScfNoCopy {}; - -- - // ============================================================================ - - class SfxPoolItem; - class SfxItemSet; - class ScStyleSheet; - class ScStyleSheetPool; -+class SvStream; - class SvStorage; -+class SvStorageRef; - class SvStorageStreamRef; --class SvStream; - - /** Contains static methods used anywhere in the filters. */ - class ScfTools : ScfNoInstance - { - public: - --// *** common methods *** -+// *** common methods *** ----------------------------------------------------- - - /** Reads a 10-byte-long-double and converts it to double. */ - static double ReadLongDouble( SvStream& rStrm ); -@@ -270,12 +225,14 @@ - /** Returns a string representing the hexadecimal value of nValue. */ - static String GetHexStr( sal_uInt16 nValue ); - -- /** Mixes RGB components with given transparence (0x0000 == full nFore ... 0x8000 = full nBack). */ -+ /** Mixes RGB components with given transparence. -+ @param nTrans Foreground transparence (0x0000 == full nFore ... 0x8000 = full nBack). */ - static sal_uInt8 GetMixedColorComp( sal_uInt8 nFore, sal_uInt8 nBack, sal_uInt16 nTrans ); -- /** Mixes colors with given transparence (0x0000 == full rFore ... 0x8000 = full rBack). */ -+ /** Mixes colors with given transparence. -+ @param nTrans Foreground transparence (0x0000 == full rFore ... 0x8000 = full rBack). */ - static Color GetMixedColor( const Color& rFore, const Color& rBack, sal_uInt16 nTrans ); - --// *** conversion of names *** -+// *** conversion of names *** ------------------------------------------------ - - /** Converts a string to a valid Calc sheet name. - @descr Sheet names in Calc may contain letters, digits, underscores, and spaces -@@ -287,14 +244,19 @@ - (*) = not allowed at first position. */ - static void ConvertToScDefinedName( String& rName ); - --// *** streams and storages *** -+// *** streams and storages *** ----------------------------------------------- - -- /** Tries to open the stream with the specified name in the passed storage (read-only). */ -- static const SvStorageStreamRef OpenStorageStreamRead( SvStorage* pStorage, const String& rStrmName ); -- /** Tries to create or open a stream with the specified name in the passed storage (read/write). */ -- static const SvStorageStreamRef OpenStorageStreamWrite( SvStorage* pStorage, const String& rStrmName ); -+ /** Tries to open an existing stream with the specified name in the passed storage (read-only). */ -+ static SvStorageRef OpenStorageRead( SvStorage* pStrg, const String& rStrgName ); -+ /** Creates and opens a stream with the specified name in the passed storage (read/write). */ -+ static SvStorageRef OpenStorageWrite( SvStorage* pStrg, const String& rStrgName ); -+ -+ /** Tries to open an existing stream with the specified name in the passed storage (read-only). */ -+ static SvStorageStreamRef OpenStorageStreamRead( SvStorage* pStrg, const String& rStrmName ); -+ /** Creates and opens a stream with the specified name in the passed storage (read/write). */ -+ static SvStorageStreamRef OpenStorageStreamWrite( SvStorage* pStrg, const String& rStrmName ); - --// *** item handling *** -+// *** item handling *** ------------------------------------------------------ - - /** Returns true, if the passed item set contains the item. - @param bDeep true = Searches in parent item sets too. */ -Index: sc/source/filter/inc/imp_op.hxx -=================================================================== -RCS file: /cvs/sc/sc/source/filter/inc/imp_op.hxx,v -retrieving revision 1.25 -retrieving revision 1.24.108.5 -diff -w -u -r1.25 -r1.24.108.5 ---- sc/source/filter/inc/imp_op.hxx 4 Jun 2004 10:55:05 -0000 1.25 -+++ sc/source/filter/inc/imp_op.hxx 14 Jul 2004 10:25:50 -0000 1.24.108.5 -@@ -186,7 +186,6 @@ - - XclImpStream maStrm; // input stream - XclImpStream& aIn; // input stream -- String maPassword; - - NameBuffer* pExtNameBuff; // ... externe Namen (Ind.-Basis=1) - ExcelToSc* pFormConv; // Formel-Konverter -@@ -231,7 +230,6 @@ - void Externname25( void ); // 0x23 - void Colwidth( void ); // 0x24 - void Defrowheight2( void ); // 0x25 -- BOOL Filepass( void ); // 0x2F - // void Window1( void ); // 0x3D - void Pane( void ); // 0x41 - void Codepage( void ); // 0x42 -@@ -351,12 +349,9 @@ - // Achtung: rUnconvertedText wird moeglicherweise veraendert - - public: -- ImportExcel( SvStream&, ScDocument*, const String& rDocUrl ); -+ ImportExcel( SfxMedium&, SvStream&, ScDocument* ); - - virtual ~ImportExcel( void ); -- -- /** Sets a password for stream decryption. */ -- inline void SetPassword( const String& rPassword ) { maPassword = rPassword; } - - virtual FltError Read( void ); - }; -Index: sc/source/filter/inc/root.hxx -=================================================================== -RCS file: /cvs/sc/sc/source/filter/inc/root.hxx,v -retrieving revision 1.34 -retrieving revision 1.31.6.3 -diff -w -u -r1.34 -r1.31.6.3 ---- sc/source/filter/inc/root.hxx 28 Jun 2004 17:59:07 -0000 1.34 -+++ sc/source/filter/inc/root.hxx 14 Jul 2004 10:26:51 -0000 1.31.6.3 -@@ -85,7 +85,6 @@ - #include "excdefs.hxx" - #endif - --class SvStorage; - class SvNumberFormatter; - class ScRangeName; - class ScProgress; -@@ -119,7 +118,6 @@ - - struct RootData // -> Inkarnation jeweils im ImportExcel-Objekt! - { -- SvStorage* pRootStorage; // THE storage - double fRowScale; // Spaltenbreiten / Zeilenhoehen - ScDocument* pDoc; - ScRangeName* pScRangeName; -@@ -139,7 +137,6 @@ - BOOL bChartTab; // Tabelle mit einem einzigen Chart - - // Biff8 -- SvStorage* pPivotCacheStorage; - XclImpAutoFilterBuffer* pAutoFilterBuffer; // ranges for autofilter and advanced filter - _ScRangeListTabs* pPrintRanges; - _ScRangeListTabs* pPrintTitles; -Index: sc/source/filter/inc/xeroot.hxx -=================================================================== -RCS file: /cvs/sc/sc/source/filter/inc/xeroot.hxx,v -retrieving revision 1.9 -retrieving revision 1.8.6.2 -diff -w -u -r1.9 -r1.8.6.2 ---- sc/source/filter/inc/xeroot.hxx 4 Jun 2004 14:05:21 -0000 1.9 -+++ sc/source/filter/inc/xeroot.hxx 14 Jul 2004 10:29:13 -0000 1.8.6.2 -@@ -107,8 +107,8 @@ - - explicit XclExpRootData( - XclBiff eBiff, -+ SfxMedium& rMedium, - ScDocument& rDocument, -- const String& rDocUrl, - CharSet eCharSet, - bool bRelUrl ); - virtual ~XclExpRootData(); -Index: sc/source/filter/inc/xestream.hxx -=================================================================== -RCS file: /cvs/sc/sc/source/filter/inc/xestream.hxx,v -retrieving revision 1.4 -retrieving revision 1.4.108.1 -diff -w -u -r1.4 -r1.4.108.1 ---- sc/source/filter/inc/xestream.hxx 5 Nov 2003 13:40:58 -0000 1.4 -+++ sc/source/filter/inc/xestream.hxx 17 Mar 2004 12:56:14 -0000 1.4.108.1 -@@ -64,14 +64,9 @@ - #ifndef SC_XESTREAM_HXX - #define SC_XESTREAM_HXX - --#ifndef _STREAM_HXX --#include <tools/stream.hxx> -+#ifndef SC_XLSTREAM_HXX -+#include "xlstream.hxx" - #endif -- --#ifndef SC_FTOOLS_HXX --#include "ftools.hxx" --#endif -- - - /* ============================================================================ - Output stream class for Excel export -Index: sc/source/filter/inc/xicontent.hxx -=================================================================== -RCS file: /cvs/sc/sc/source/filter/inc/xicontent.hxx,v -retrieving revision 1.6 -retrieving revision 1.5.108.2 -diff -w -u -r1.6 -r1.5.108.2 ---- sc/source/filter/inc/xicontent.hxx 4 Jun 2004 14:05:42 -0000 1.6 -+++ sc/source/filter/inc/xicontent.hxx 14 Jul 2004 10:29:22 -0000 1.5.108.2 -@@ -80,7 +80,6 @@ - - class XclImpStream; - -- - /* ============================================================================ - Classes to import the big Excel document contents (related to several cells or - globals for the document). -@@ -90,6 +89,7 @@ - - Conditional formatting - - Data validation - - Web queries -+- Stream decryption - ============================================================================ */ - - // Shared string table ======================================================== -@@ -113,7 +113,9 @@ - ScBaseCell* CreateCell( sal_uInt32 nSstIndex, sal_uInt32 nXFIndex = 0 ) const; - - private: -- ScfDelList< XclImpString > maStringList; /// List with formatted and unformatted strings. -+ typedef ScfDelList< XclImpString > XclImpStringList; -+ -+ XclImpStringList maStringList; /// List with formatted and unformatted strings. - XclImpString maErrorString; /// Placeholder for strings not found in the list. - }; - -@@ -211,14 +208,13 @@ - static void ReadDV( XclImpStream& rStrm ); - }; - -- - // Web queries ================================================================ - - /** Stores the data of one web query. */ - class XclImpWebQuery : ScfNoCopy - { - public: -- XclImpWebQuery( const ScRange& rDestRange ); -+ explicit XclImpWebQuery( const ScRange& rDestRange ); - - /** Reads a PARAMQRY record and sets data to the web query. */ - void ReadParamqry( XclImpStream& rStrm ); -@@ -249,14 +245,12 @@ - sal_uInt16 mnRefresh; /// Refresh time in minutes. - }; - -- - // ---------------------------------------------------------------------------- - - class XclImpWebQueryBuffer : protected XclImpRoot - { - public: -- inline XclImpWebQueryBuffer( const XclImpRoot& rRoot ) : -- XclImpRoot( rRoot ) {} -+ inline explicit XclImpWebQueryBuffer( const XclImpRoot& rRoot ) : XclImpRoot( rRoot ) {} - - /** Reads the QSI record and creates a new web query in the buffer. */ - void ReadQsi( XclImpStream& rStrm ); -@@ -276,6 +270,16 @@ - ScfDelList< XclImpWebQuery > maWQList; /// List of the web query objects. - }; - -+// Decryption ================================================================= -+ -+/** Provides static functions to import stream decryption settings. */ -+class XclImpDecryptHelper : ScfNoInstance -+{ -+public: -+ /** Reads the FILEPASS record, queries a password and sets decryption algorihm. -+ @return Error code that may cause an error message after import. */ -+ static ErrCode ReadFilepass( XclImpStream& rStrm ); -+}; - - // ============================================================================ - -Index: sc/source/filter/inc/xipivot.hxx -=================================================================== -RCS file: /cvs/sc/sc/source/filter/inc/xipivot.hxx,v -retrieving revision 1.2 -retrieving revision 1.2.72.1 -diff -w -u -r1.2 -r1.2.72.1 ---- sc/source/filter/inc/xipivot.hxx 4 Jun 2004 14:06:12 -0000 1.2 -+++ sc/source/filter/inc/xipivot.hxx 14 Jul 2004 14:18:12 -0000 1.2.72.1 -@@ -122,7 +122,7 @@ - class XclImpPivotCache : protected XclImpRoot - { - public: -- explicit XclImpPivotCache( const XclImpRoot& rRoot, sal_uInt16 nStrmId ); -+ explicit XclImpPivotCache( const XclImpStream& rBookStrm, sal_uInt16 nStrmId ); - ~XclImpPivotCache(); - - // data access ------------------------------------------------------------ -Index: sc/source/filter/inc/xiroot.hxx -=================================================================== -RCS file: /cvs/sc/sc/source/filter/inc/xiroot.hxx,v -retrieving revision 1.9 -retrieving revision 1.8.6.2 -diff -w -u -r1.9 -r1.8.6.2 ---- sc/source/filter/inc/xiroot.hxx 4 Jun 2004 14:06:31 -0000 1.9 -+++ sc/source/filter/inc/xiroot.hxx 14 Jul 2004 10:30:15 -0000 1.8.6.2 -@@ -127,8 +127,8 @@ - - explicit XclImpRootData( - XclBiff eBiff, -+ SfxMedium& rMedium, - ScDocument& rDocument, -- const String& rDocUrl, - CharSet eCharSet ); - virtual ~XclImpRootData(); - }; -Index: sc/source/filter/inc/xistream.hxx -=================================================================== -RCS file: /cvs/sc/sc/source/filter/inc/xistream.hxx,v -retrieving revision 1.4 -retrieving revision 1.4.6.7 -diff -w -u -r1.4 -r1.4.6.7 ---- sc/source/filter/inc/xistream.hxx 2 Mar 2004 09:44:55 -0000 1.4 -+++ sc/source/filter/inc/xistream.hxx 4 Jun 2004 11:32:10 -0000 1.4.6.7 -@@ -64,227 +64,240 @@ - #ifndef SC_XISTREAM_HXX - #define SC_XISTREAM_HXX - --#ifndef SC_FTOOLS_HXX --#include "ftools.hxx" -+#ifndef SVX_MSCODEC_HXX -+#include <svx/mscodec.hxx> - #endif --#ifndef SC_XLCONST_HXX --#include "xlconst.hxx" -+#ifndef SC_XLSTREAM_HXX -+#include "xlstream.hxx" - #endif - -+class XclImpRoot; - - /* ============================================================================ - Input stream class for Excel import - - CONTINUE record handling - - ByteString and UniString support -+- Decryption - ============================================================================ */ - --// Decryption ================================================================= -+// ============================================================================ -+// Decryption -+// ============================================================================ - --#define SC_XCL_USEDECR 0 -+class XclImpDecrypter; -+typedef ::boost::shared_ptr< XclImpDecrypter > XclImpDecrypterRef; - --#if SC_XCL_USEDECR - /** Base class for BIFF stream decryption. */ - class XclImpDecrypter : ScfNoCopy - { - public: -+ explicit XclImpDecrypter(); - virtual ~XclImpDecrypter(); - -- /** Returns true, if the decrypter has been constructed successfully (especially -- with a valid password). */ -- virtual bool IsValid() const = 0; -- /** Initializes the key array offset which is dependent from record size. */ -- virtual void SetOffset( sal_uInt16 nRecSize ) = 0; -+ /** Returns the current error code of the decrypter. */ -+ inline ErrCode GetError() const { return mnError; } -+ /** Returns true, if the decrypter has been constructed successfully. -+ This means especially that construction happened with a valid password. */ -+ inline bool IsValid() const { return mnError == ERRCODE_NONE; } -+ -+ /** Creates a (ref-counted) copy of this decrypter object. */ -+ XclImpDecrypterRef Clone() const; -+ -+ /** Updates the decrypter on start of a new record or after seeking stream. */ -+ void Update( SvStream& rStrm, sal_uInt16 nRecSize ); - /** Reads and decrypts nBytes bytes and stores data into the existing(!) buffer pData. - @return Count of bytes really read. */ -- virtual sal_uInt32 ReadDecrypt( SvStream& rStrm, void* pData, sal_uInt32 nBytes ) = 0; -+ sal_uInt16 Read( SvStream& rStrm, void* pData, sal_uInt16 nBytes ); - -- /** Calculates the 16-bit hash value for the given password. */ -- static sal_uInt16 GetHash( const ByteString& rPass ); -- /** Calculates the BIFF2-BIFF7 decryption key for the given password. */ -- static sal_uInt16 GetKey( const ByteString& rPass ); --}; -+protected: -+ /** Protected copy c'tor for OnClone(). */ -+ explicit XclImpDecrypter( const XclImpDecrypter& rSrc ); -+ -+ /** Sets the decrypter to a state showing whether the password was correct. */ -+ void SetHasValidPassword( bool bValid ); - -+private: -+ /** Implementation of cloning this object. */ -+ virtual XclImpDecrypter* OnClone() const = 0; -+ /** Implementation of updating the decrypter. */ -+ virtual void OnUpdate( ULONG nOldStrmPos, ULONG nNewStrmPos, sal_uInt16 nRecSize ) = 0; -+ /** Implementation of the decryption. */ -+ virtual sal_uInt16 OnRead( SvStream& rStrm, sal_uInt8* pnData, sal_uInt16 nBytes ) = 0; -+ -+private: -+ ErrCode mnError; /// Decrypter error code. -+ ULONG mnOldPos; /// Last known stream position. -+ sal_uInt16 mnRecSize; /// Current record size. -+}; - - // ---------------------------------------------------------------------------- - --/** Decrypts BIFF5 stream contents using the given password and key. */ -+/** Decrypts BIFF5 stream contents. */ - class XclImpBiff5Decrypter : public XclImpDecrypter - { --private: -- sal_uInt8 mpKey[ 16 ]; /// Decryption key. -- sal_uInt32 mnOffset; /// Key/stream offset. -- bool mbIsValid; /// true = Password is valid. -- - public: - /** Constructs the decrypter. -- @param nKey Password key from FILEPASS record. -- @param nHash Password hash value from FILEPASS record. */ -- explicit XclImpBiff5Decrypter( const String& rPass, sal_uInt16 nKey, sal_uInt16 nHash ); -- -- /** Returns true, if the decrypter has been constructed successfully (especially -- with a valid password). */ -- virtual bool IsValid() const; -- /** Initializes the key array offset dependent from record size. */ -- virtual void SetOffset( sal_uInt16 nRecSize ); -- /** Reads and decrypts nBytes bytes and stores data into the existing(!) buffer pData. -- @return Count of bytes really read. */ -- virtual sal_uInt32 ReadDecrypt( SvStream& rStrm, void* pData, sal_uInt32 nBytes ); --}; -+ @descr Checks if the passed key and hash specify workbook protection. -+ Asks for a password otherwise. -+ @param nKey Password key from FILEPASS record to verify password. -+ @param nHash Password hash value from FILEPASS record to verify password. */ -+ explicit XclImpBiff5Decrypter( const XclImpRoot& rRoot, sal_uInt16 nKey, sal_uInt16 nHash ); -+ -+private: -+ /** Private copy c'tor for OnClone(). */ -+ explicit XclImpBiff5Decrypter( const XclImpBiff5Decrypter& rSrc ); - -+ /** Implementation of cloning this object. */ -+ virtual XclImpBiff5Decrypter* OnClone() const; -+ /** Implementation of updating the decrypter. */ -+ virtual void OnUpdate( ULONG nOldStrmPos, ULONG nNewStrmPos, sal_uInt16 nRecSize ); -+ /** Implementation of the decryption. */ -+ virtual sal_uInt16 OnRead( SvStream& rStrm, sal_uInt8* pnData, sal_uInt16 nBytes ); -+ -+ /** Initializes the members. -+ @postcond Internal status is set and can be querried with IsValid(). */ -+ void Init( const ByteString& rPass, sal_uInt16 nKey, sal_uInt16 nHash ); -+ -+private: -+ ::svx::MSCodec_XorXLS95 maCodec; /// Crypto algorithm implementation. -+ sal_uInt8 mpnPassw[ 16 ]; /// Cached password data for copy construction. -+}; - - // ---------------------------------------------------------------------------- - --/** Decrypts BIFF8 stream contents using the given password and key. */ -+/** Decrypts BIFF8 stream contents using the given document identifier. */ - class XclImpBiff8Decrypter : public XclImpDecrypter - { - public: -- explicit XclImpBiff8Decrypter( const String& rPass ); -+ /** Constructs the decrypter. -+ @descr Checks if the passed salt data specifies workbook protection. -+ Asks for a password otherwise. -+ @param pnDocId Unique document identifier from FILEPASS record. -+ @param pnSaltData Salt data from FILEPASS record. -+ @param pnSaltHash Salt hash value from FILEPASS record. */ -+ explicit XclImpBiff8Decrypter( const XclImpRoot& rRoot, sal_uInt8 pnDocId[ 16 ], -+ sal_uInt8 pnSaltData[ 16 ], sal_uInt8 pnSaltHash[ 16 ] ); - -- /** Returns true, if the decrypter has been constructed successfully (especially -- with a valid password). */ -- virtual bool IsValid() const; -- /** Initializes the key array offset dependent from record size. */ -- virtual void SetOffset( sal_uInt16 nRecSize ); -- /** Reads and decrypts nBytes bytes and stores data into the existing(!) buffer pData. -- @return Count of bytes really read. */ -- virtual sal_uInt32 ReadDecrypt( SvStream& rStrm, void* pData, sal_uInt32 nBytes ); --}; --#endif -+private: -+ /** Private copy c'tor for OnClone(). */ -+ explicit XclImpBiff8Decrypter( const XclImpBiff8Decrypter& rSrc ); -+ -+ /** Implementation of cloning this object. */ -+ virtual XclImpBiff8Decrypter* OnClone() const; -+ /** Implementation of updating the decrypter. */ -+ virtual void OnUpdate( ULONG nOldStrmPos, ULONG nNewStrmPos, sal_uInt16 nRecSize ); -+ /** Implementation of the decryption. */ -+ virtual sal_uInt16 OnRead( SvStream& rStrm, sal_uInt8* pnData, sal_uInt16 nBytes ); -+ -+ /** Initializes the internal codec. -+ @postcond Internal status is set and can be querried with IsValid(). */ -+ void Init( const String& rPass, sal_uInt8 pnDocId[ 16 ], -+ sal_uInt8 pnSaltData[ 16 ], sal_uInt8 pnSaltHash[ 16 ] ); -+ -+ /** Returns the block number corresponding to the passed stream position. */ -+ sal_uInt32 GetBlock( ULONG nStrmPos ) const; -+ /** Returns the block offset corresponding to the passed stream position. */ -+ sal_uInt16 GetOffset( ULONG nStrmPos ) const; - -+private: -+ ::svx::MSCodec_Std97 maCodec; /// Crypto algorithm implementation. -+ sal_uInt16 mpnPassw[ 16 ]; /// Cached password data for copy construction. -+ sal_uInt8 mpnDocId[ 16 ]; /// Cached document ID for copy construction. -+}; - - // ============================================================================ -+// Stream -+// ============================================================================ - - /** This class represents an Excel stream position. - @descr It contains the relevant data for a stream position inside of a record - (including CONTINUE records). */ - class XclImpStreamPos - { --private: -- sal_uInt32 mnPos; /// Absolute position of the stream. -- sal_uInt32 mnNextPos; /// Absolute position of next record. -- sal_uInt32 mnCurrSize; /// Current calculated size of the record. -- sal_uInt32 mnRecLeft; /// Size left in current record. -- sal_uInt16 mnRecSize; /// Size of record (without CONTINUE). -- - public: -- /** Constructs the stream position data with the passed values. */ -- explicit XclImpStreamPos( -- sal_uInt32 nStrmPos, sal_uInt32 nNextPos, -- sal_uInt32 nCurrSize, sal_uInt32 nRecLeft, -- sal_uInt16 nRecSize ); -+ /** Constructs an invalid stream position data object. */ -+ explicit XclImpStreamPos(); - - /** Sets the stream position data to the passed values. */ -- void Set( -- sal_uInt32 nStrmPos, sal_uInt32 nNextPos, -- sal_uInt32 nCurrSize, sal_uInt32 nRecLeft, -- sal_uInt16 nRecSize ); -+ void Set( const SvStream& rStrm, ULONG nNextPos, sal_uInt32 nCurrSize, -+ sal_uInt16 nRawRecId, sal_uInt16 nRawRecSize, sal_uInt16 nRawRecLeft, -+ bool bValid ); - - /** Writes the contained stream position data to the given variables. */ -- void Get( -- sal_uInt32& rnStrmPos, sal_uInt32& rnNextPos, -- sal_uInt32& rnCurrSize, sal_uInt32& rnRecLeft, -- sal_uInt16& rnRecSize ) const; --}; -+ void Get( SvStream& rStrm, ULONG& rnNextPos, sal_uInt32& rnCurrSize, -+ sal_uInt16& rnRawRecId, sal_uInt16& rnRawRecSize, sal_uInt16& rnRawRecLeft, -+ bool& rbValid ) const; - -+private: -+ ULONG mnPos; /// Absolute position of the stream. -+ ULONG mnNextPos; /// Absolute position of next record. -+ sal_uInt32 mnCurrSize; /// Current calculated size of the record. -+ sal_uInt16 mnRawRecId; /// Current raw record ID (including CONTINUEs). -+ sal_uInt16 mnRawRecSize; /// Current raw record size (without following CONTINUEs). -+ sal_uInt16 mnRawRecLeft; /// Bytes left in current raw record (without following CONTINUEs). -+ bool mbValid; /// Read state: false = record overread. -+}; - --// ---------------------------------------------------------------------------- -- --class XclImpRoot; -+// ============================================================================ - - /** This class is used to import record oriented streams. - @descr An instance is constructed with an SvStream. The SvStream stream is - reset to its start while constructing this stream. - -- To start reading a record call StartNextRecord(). Now it is possible to read -- all contents of the record using operator>>() or any of the Read***() methods. -- If some data exceeds the record size limit, the stream looks for a following -- CONTINUE record and jumps automatically to it. It is NOT allowed that an atomic -- data type is split into two records (i.e. 4 bytes of a double in one record and -- the other 4 bytes in a following CONTINUE). -- -- Trying to read over the record limits results in a stream error. The IsValid() -- method indicates that with returning false. From now on it is undefined what data -- the read methods will return. The error state will be reset, if the record is -- reset (with the method InitializeRecord()) or if the next record is started. -- -- To switch off the automatic lookup of CONTINUE records, use InitializeRecord() -- with false parameter. This is useful i.e. on import of Escher objects, where -- sometimes solely CONTINUE records will occur. The automatic lookup keeps switched -- off until the method InitializeRecord() is called with parameter true. -- -- The import stream supports decrypting the stream data. The contents of a record -- (not the record header) will be encrypted by Excel if the file has been stored with -- password protection. The methods EnableDecryption() and UseDecryption() control -- the usage of the decryption algorithms. EnableDecryption() sets a decryption -- algorithm. UseDecryption() may be used to stop the usage of the decryption -- temporarily (sometimes record contents are never encrypted, i.e. all BOF records -- or the stream position in BOUNDSHEET). If decryption has been enabled -- with EnableDecryption(), the usage will be switched on automatically. -- -- It is possible to store several stream positions inside of a record (including -- its CONTINUE records). The positions are stored in a stack, which can be controlled -- with the methods PushPosition(), PopPosition() and RejectPosition(). The stack -- will be cleared whenever a new record is started (using the method -- StartNextRecord()). -- -- Additionally a single global stream position can be stored which keeps valid -- during the whole import process (methods StoreGlobalPosition(), SeekGlobalPosition() -- and DeleteGlobalPosition()). So it is possible to jump back to a previous record -- (that is a real jump without return). -+ To start reading a record call StartNextRecord(). Now it is possible to -+ read all contents of the record using operator>>() or any of the Read***() -+ functions. If some data exceeds the record size limit, the stream looks for -+ a following CONTINUE record and jumps automatically to it. It is NOT -+ allowed that an atomic data type is split into two records (i.e. 4 bytes of -+ a double in one record and the other 4 bytes in a following CONTINUE). -+ -+ Trying to read over the record limits results in a stream error. The -+ IsValid() function indicates that with returning false. From now on it is -+ undefined what data the read functions will return. The error state will be -+ reset, if the record is reset (with the method ResetRecord()) or if the -+ next record is started. -+ -+ To switch off the automatic lookup of CONTINUE records, use ResetRecord() -+ with false parameter. This is useful i.e. on import of Escher objects, -+ where sometimes solely CONTINUE records will occur. The automatic lookup -+ keeps switched off until the method ResetRecord() is called with parameter -+ true. All other settings done on the stream (i.e. alternative CONTINUE -+ record identifier, enabled decryption, NUL substitution character) will be -+ reset to default values, if a new record is started. -+ -+ The import stream supports decrypting the stream data. The contents of a -+ record (not the record header) will be encrypted by Excel if the file has -+ been stored with password protection. The functions SetDecrypter(), -+ EnableDecryption(), and DisableDecryption() control the usage of the -+ decryption algorithms. SetDecrypter() sets a new decryption algorithm and -+ initially enables it. DisableDecryption() may be used to stop the usage of -+ the decryption temporarily (sometimes record contents are never encrypted, -+ i.e. all BOF records or the stream position in BOUNDSHEET). Decryption will -+ be reenabled automatically, if a new record is started with the function -+ StartNextRecord(). -+ -+ It is possible to store several stream positions inside a record (including -+ its CONTINUE records). The positions are stored on a stack, which can be -+ controlled with the functions PushPosition(), PopPosition() and -+ RejectPosition(). The stack will be cleared whenever a new record is -+ started with the function StartNextRecord(). -+ -+ Additionally a single global stream position can be stored which keeps -+ valid during the whole import process (methods StoreGlobalPosition(), -+ SeekGlobalPosition() and DeleteGlobalPosition()). This is the only way to -+ jump back to a previous record (that is a real jump without return). - */ - class XclImpStream - { --private: --#if SC_XCL_USEDECR -- typedef ::std::auto_ptr< XclImpDecrypter > XclImpDecrypterPtr; --#endif -- typedef ScfDelStack< XclImpStreamPos > XclImpStreamPosStack; -- --private: -- SvStream& mrStrm; /// Reference to the system input stream. -- const XclImpRoot& mrRoot; /// Filter root data. -- --#if SC_XCL_USEDECR -- XclImpDecrypterPtr mpDecrypter; /// Provides methods to decrypt data. --#endif -- -- XclImpStreamPos maFirstRec; /// Start position of current record. -- XclImpStreamPosStack maPosStack; /// Stack for record positions. -- -- XclImpStreamPos maGlobPos; /// User defined position elsewhere in stream. -- sal_uInt16 mnGlobRecId; /// Record ID for user defined position. -- bool mbGlobValidRec; /// Was user position a valid record? -- bool mbHasGlobPos; /// Is user position defined? -- -- sal_uInt32 mnStreamSize; /// Size of system stream. -- sal_uInt32 mnNextRecPos; /// Start of next record header. -- sal_uInt32 mnCurrRecSize; /// Helper for record position. -- sal_uInt32 mnComplRecSize; /// Size of complete record data (with CONTINUEs). -- bool mbHasComplRec; /// true = mnComplRecSize is valid. -- -- sal_uInt16 mnRecId; /// Current record ID (not the CONTINUE ID). -- sal_uInt16 mnAltContId; /// Alternative record ID for content continuation. -- sal_uInt16 mnRecSize; /// Size of current record content (without CONTINUE). -- sal_uInt32 mnRecLeft; /// Count of bytes left in current record. -- -- sal_Unicode mcNulSubst; /// Replacement for NUL characters. -- -- bool mbCont; /// Automatic CONTINUE lookup on/off. --#if SC_XCL_USEDECR -- bool mbUseDecr; /// Usage of decryption. --#endif -- bool mbValidRec; /// Read state: false = no record available. -- bool mbValid; /// Read state: false = record overread. -- bool mbWarnings; /// Enable/disable assertions. -- - public: -- /** Constructs the Excel record import stream. -+ /** Constructs the Excel record import stream using a TOOLS stream object. - @param rInStrm The system input stream. Will be set to its start position. -- @param bContHandling Automatic CONTINUE lookup on/off. */ -+ Must exist as long as this object exists. -+ @param bContLookup Automatic CONTINUE lookup on/off. */ - explicit XclImpStream( - SvStream& rInStrm, - const XclImpRoot& rRoot, -- bool bContHandling = true ); -+ bool bContLookup = true ); - - ~XclImpStream(); - -@@ -297,27 +310,35 @@ - @return false = no record found (end of stream). */ - bool StartNextRecord(); - /** Sets stream pointer to begin of record content. -- @param bContHandling Automatic CONTINUE lookup on/off. -- This setting is persistent until next call of this function. -- @param nAltContId Sets an alternative record ID for content continuation. -- This value is reset automatically when a new record is started with -- StartNextRecord(). */ -- void InitializeRecord( bool bContHandling, sal_uInt16 nAltContId = EXC_ID_UNKNOWN ); -- -- /** Controls the appearance of overread warnings. -- @param bWarnMode false = no overread assertions. */ -- inline void SetWarningMode( bool bWarnMode ) { mbWarnings = bWarnMode; } -- --#if SC_XCL_USEDECR -- /** Enables decryption of record contents for the rest of the stream. -- @descr Stream takes ownership of the decrypter object. */ -- void EnableDecryption( XclImpDecrypter* pDecrypter ); -- /** Switches usage of current decryption algorithm on/off. */ -- void UseDecryption( bool bUse ); --#endif -+ @param bContLookup Automatic CONTINUE lookup on/off. In difference -+ to other stream settings, this setting is persistent until next call of -+ this function (because it is wanted to receive the next CONTINUE -+ records separately). -+ @param nAltContId Sets an alternative record ID for content -+ continuation. This value is reset automatically when a new record is -+ started with StartNextRecord(). */ -+ void ResetRecord( bool bContLookup, -+ sal_uInt16 nAltContId = EXC_ID_UNKNOWN ); -+ -+ /** Enables decryption of record contents for the rest of the stream. */ -+ void SetDecrypter( XclImpDecrypterRef xDecrypter ); -+ /** Sets decrypter from another stream. */ -+ void CopyDecrypterFrom( const XclImpStream& rStrm ); -+ /** Returns true, if a valid decrypter is set at the stream. */ -+ bool HasValidDecrypter() const; -+ /** Switches usage of current decryption algorithm on/off. -+ @descr Encryption is re-enabled automatically, if a new record is -+ started using the function StartNextRecord(). */ -+ void EnableDecryption( bool bEnable = true ); -+ /** Switches usage of current decryption algorithm off. -+ @descr This is a record-local setting. The function StartNextRecord() -+ always enables decryption. */ -+ inline void DisableDecryption() { EnableDecryption( false ); } - - /** Pushes current position on user position stack. -- @descr This stack is emptied at every start of a new record. */ -+ @descr This stack is emptied when starting a new record with -+ StartNextRecord(). The decryption state (enabled/disabled) is not -+ pushed onto the stack. */ - void PushPosition(); - /** Seeks to last position from user position stack. - @descr This position will be removed from the stack. */ -@@ -332,27 +353,25 @@ - /** Invalidates global user position. */ - inline void DeleteGlobalPosition() { mbHasGlobPos = false; } - -- /** Returns read state: false = record overread. */ -+ /** Returns record reading state: false = record overread. */ - inline bool IsValid() const { return mbValid; } - /** Returns the current record ID. */ - inline sal_uInt16 GetRecId() const { return mnRecId; } - /** Returns the position inside of the whole record content. */ -- inline sal_uInt32 GetRecPos() const -- { return IsValid() ? mnCurrRecSize - mnRecLeft : 0; } -+ sal_uInt32 GetRecPos() const; - /** Returns the data size of the whole record without record headers. */ - sal_uInt32 GetRecSize(); - /** Returns remaining data size of the whole record without record headers. */ -- inline sal_uInt32 GetRecLeft() -- { return IsValid() ? GetRecSize() - GetRecPos() : 0; } -+ sal_uInt32 GetRecLeft(); - -- inline XclImpStream& operator>>( sal_Int8& rnValue ); -- inline XclImpStream& operator>>( sal_uInt8& rnValue ); -- inline XclImpStream& operator>>( sal_Int16& rnValue ); -- inline XclImpStream& operator>>( sal_uInt16& rnValue ); -- inline XclImpStream& operator>>( sal_Int32& rnValue ); -- inline XclImpStream& operator>>( sal_uInt32& rnValue ); -- inline XclImpStream& operator>>( float& rfValue ); -- inline XclImpStream& operator>>( double& rfValue ); -+ XclImpStream& operator>>( sal_Int8& rnValue ); -+ XclImpStream& operator>>( sal_uInt8& rnValue ); -+ XclImpStream& operator>>( sal_Int16& rnValue ); -+ XclImpStream& operator>>( sal_uInt16& rnValue ); -+ XclImpStream& operator>>( sal_Int32& rnValue ); -+ XclImpStream& operator>>( sal_uInt32& rnValue ); -+ XclImpStream& operator>>( float& rfValue ); -+ XclImpStream& operator>>( double& rfValue ); - - sal_Int8 ReadInt8(); - sal_uInt8 ReaduInt8(); -@@ -379,55 +398,46 @@ - /** Seeks forward inside the current record. */ - void Ignore( sal_uInt32 nBytes ); - -+ // *** special string functions *** --------------------------------------- - -- // *** UNICODE STRINGS *** -- // structure of an Excel unicode string: -- // (1) 2 byte character count -- // (2) 1 byte flags (16-bit-characters, rich string, far east string) -- // (3) [2 byte rich string format run count] -- // (4) [4 byte far east data size] -- // (5) character array -- // (6) [4 * (rich string format run count) byte] -- // (7) [(far east data size) byte] -- // header = (1), (2) -- // ext. header = (3), (4) -- // ext. data = (6), (7) -- -- // *** special string functions *** -+ // *** read/ignore unicode strings *** ------------------------------------ -+ /* - look for CONTINUE records even if CONTINUE handling disabled -+ (only if inside of a CONTINUE record - for TXO import) -+ - no overread assertions (for Applix wrong string length export bug) -+ -+ structure of an Excel unicode string: -+ (1) 2 byte character count -+ (2) 1 byte flags (16-bit-characters, rich string, far east string) -+ (3) [2 byte rich string format run count] -+ (4) [4 byte far east data size] -+ (5) character array -+ (6) [4 * (rich string format run count) byte] -+ (7) [(far east data size) byte] -+ header = (1), (2) -+ ext. header = (3), (4) -+ ext. data = (6), (7) -+ */ - - /** Reads ext. header, detects 8/16 bit mode, sets all ext. info. -- @return Size of ext. data. */ -+ @return Total size of ext. data. */ - sal_uInt32 ReadUniStringExtHeader( - bool& rb16Bit, bool& rbRich, bool& rbFareast, -- sal_uInt16& rnCrun, sal_uInt32& rnExtInf, sal_uInt8 nFlags ); -+ sal_uInt16& rnFormatRuns, sal_uInt32& rnExtInf, sal_uInt8 nFlags ); - /** Seeks to begin of character array, detects 8/16 bit mode. -- @return Size of ext. data. */ -+ @return Total size of ext. data. */ - sal_uInt32 ReadUniStringExtHeader( bool& rb16Bit, sal_uInt8 nFlags ); - /** Skips ext. data after character array. */ -- inline void SkipUniStringExtData( sal_uInt32 nExtSize ) -- { Ignore( nExtSize ); } -+ inline void SkipUniStringExtData( sal_uInt32 nExtSize ) { Ignore( nExtSize ); } - - /** Sets a replacement character for NUL characters. -- @descr NUL characters must be replaced, because Tools strings cannot handle them. -- @param cNulSubst The character to use for NUL replacement. It is possible to specify -- NUL here. in this case strings are terminated when the first NUL occurs during string import. */ -+ @descr NUL characters must be replaced, because Tools strings cannot -+ handle them. The substitution character is reset to '?' automatically, -+ if a new record is started using the function StartNextRecord(). -+ @param cNulSubst The character to use for NUL replacement. It is -+ possible to specify NUL here. in this case strings are terminated when -+ the first NUL occurs during string import. */ - inline void SetNulSubstChar( sal_Unicode cNulSubst = '?' ) { mcNulSubst = cNulSubst; } - -- // *** read/ignore unicode strings *** -- // - look for CONTINUE records even if CONTINUE handling disabled -- // (only if inside of a CONTINUE record - for TXO import) -- // - no overread assertions (for Applix wrong string length export bug) -- -- /** Reads nChars characters and appends string to rString. */ -- void AppendRawUniString( String& rString, sal_uInt16 nChars, bool b16Bit ); -- /** Reads ext. header, nChar characters, ext. data and appends string to rString. */ -- void AppendUniString( String& rString, sal_uInt16 nChars, sal_uInt8 nFlags ); -- /** Reads 8 bit flags, ext. header, nChar characters, ext. data and appends string to rString. */ -- inline void AppendUniString( String& rString, sal_uInt16 nChars ); -- /** Reads 16 bit character count, 8 bit flags, ext. header, character array, -- ext. data and appends string to rString. */ -- inline void AppendUniString( String& rString ); -- - /** Reads nChars characters and returns the string. */ - String ReadRawUniString( sal_uInt16 nChars, bool b16Bit ); - /** Reads ext. header, nChar characters, ext. data and returns the string. */ -@@ -443,16 +453,11 @@ - /** Ignores ext. header, nChar characters, ext. data. */ - void IgnoreUniString( sal_uInt16 nChars, sal_uInt8 nFlags ); - /** Ignores 8 bit flags, ext. header, nChar characters, ext. data. */ -- inline void IgnoreUniString( sal_uInt16 nChars ); -+ void IgnoreUniString( sal_uInt16 nChars ); - /** Ignores 16 bit character count, 8 bit flags, ext. header, character array, ext. data. */ -- inline void IgnoreUniString(); -+ void IgnoreUniString(); - -- // *** read/ignore 8-bit-strings, store in String *** -- -- /** Reads nChar byte characters and appends string to rString. */ -- void AppendRawByteString( String& rString, sal_uInt16 nChars ); -- /** Reads 8/16 bit string length, character array and appends string to rString. */ -- inline void AppendByteString( String& rString, bool b16BitLen ); -+ // *** read/ignore 8-bit-strings, store in String *** --------------------- - - /** Reads nChar byte characters and returns the string. */ - String ReadRawByteString( sal_uInt16 nChars ); -@@ -460,176 +465,106 @@ - String ReadByteString( bool b16BitLen ); - - /** Ignores nChar byte characters. */ -- inline void IgnoreRawByteString( sal_uInt16 nChars ); -+ void IgnoreRawByteString( sal_uInt16 nChars ); - /** Ignores 8/16 bit string length, character array. */ -- inline void IgnoreByteString( bool b16BitLen ); -+ void IgnoreByteString( bool b16BitLen ); - -- // *** SvStream functions *** -+ // *** SvStream functions *** --------------------------------------------- - - /** Returns the absolute stream position. */ -- sal_uInt32 Tell() const; -+ inline ULONG GetSvStreamPos() const { return mrStrm.Tell(); } - /** Returns the stream size. */ -- inline sal_uInt32 GetStreamSize() const { return mnStreamSize; } -+ inline ULONG GetSvStreamSize() const { return mnStreamSize; } - - private: --#if SC_XCL_USEDECR -- /** Initializes the key/stream offset of the decrypter. */ -- inline void SetDecrypterOffset( sal_uInt16 nRecSize ); --#endif -- -- /** Reads and decrypts a sal_Int8 value. */ -- void ReadAtom( sal_Int8& rnValue ); -- /** Reads and decrypts a sal_uInt8 value. */ -- void ReadAtom( sal_uInt8& rnValue ); -- /** Reads and decrypts a sal_Int16 value. */ -- void ReadAtom( sal_Int16& rnValue ); -- /** Reads and decrypts a sal_uInt16 value. */ -- void ReadAtom( sal_uInt16& rnValue ); -- /** Reads and decrypts a sal_Int32 value. */ -- void ReadAtom( sal_Int32& rnValue ); -- /** Reads and decrypts a sal_uInt32 value. */ -- void ReadAtom( sal_uInt32& rnValue ); -- /** Reads and decrypts a float value. */ -- void ReadAtom( float& rfValue ); -- /** Reads and decrypts a double value. */ -- void ReadAtom( double& rfValue ); -- /** Reads and decrypts nBytes bytes to the existing(!) buffer pData. -- @return Count of bytes really read. */ -- sal_uInt32 ReadData( void* pData, sal_uInt32 nBytes ); -+ /** Stores current stream position into rPos. */ -+ void StorePosition( XclImpStreamPos& rPos ); -+ /** Restores stream position contained in rPos. */ -+ void RestorePosition( const XclImpStreamPos& rPos ); - -- /** Internal start of a new record, doesn't change mnNextRecPos and mbValid. -- @return false = no record found (end of stream). */ -- bool GetNextRecord( sal_uInt16& rnRecId, sal_uInt16& rnRecSize ); -- /** Internal setup of a new record, expecting mnRecId and mnNextRecPos. */ -+ /** Seeks to next raw record header and reads record ID and size. -+ @descr This is a "raw" function, means that stream members are -+ inconsistent after return. Does only change mnRawRecId, mnRawRecSize, -+ and the base stream position, but no other members. -+ @return false = No record header found (end of stream). */ -+ bool ReadNextRawRecHeader(); -+ -+ /** Initializes the decrypter to read a new record. */ -+ void SetupDecrypter(); -+ /** Initializes all members after base stream has been seeked to new raw record. */ -+ void SetupRawRecord(); -+ /** Initializes all members after base stream has been seeked to new record. */ - void SetupRecord(); -- /** Returns true, if the passed ID is a real or an alternative continuation record ID. */ -- bool IsContinueId( sal_uInt16 nRecId ); -- /** Looks for and goes to a following CONTINUE record. -- @descr Does not change mbValid, updates mnCurrRecSize. */ -- bool GetContinue(); - -- /** Checks mnRecLeft and jumps into next CONTINUE record if necessary and mbCont is true. */ -- bool CheckDataLeft( sal_uInt32 nBytes ); -+ /** Returns true, if the passed ID is real or alternative continuation record ID. */ -+ bool IsContinueId( sal_uInt16 nRecId ) const; - - /** Goes to start of the next CONTINUE record. -- @descr Sets mbValid, mnNextRecPos and mnRecLeft. */ -- void StartContinue(); -+ @descr Stream must be located at the end of a raw record, and handling -+ of CONTINUE records must be enabled. -+ @return Copy of mbValid. */ -+ bool JumpToNextContinue(); - /** Goes to start of the next CONTINUE record while reading strings. -- @descr Sets mbValid, mnNextRecPos and mnRecLeft, reads additional Unicode -- flag byte and sets/resets rb16Bit. */ -- void StartStringContinue( bool& rb16Bit ); -+ @descr Stream must be located at the end of a raw record. If reading -+ has been started in a CONTINUE record, jumps to an existing following -+ CONTINUE record, even if handling of CONTINUE records is disabled (This -+ is a special handling for TXO string data). Reads additional Unicode -+ flag byte at start of the new raw record and sets or resets rb16Bit. -+ @return Copy of mbValid. */ -+ bool JumpToNextStringContinue( bool& rb16Bit ); -+ -+ /** Ensures that reading nBytes bytes is possible with next stream access. -+ @descr Stream must be located at the end of a raw record, and handling -+ of CONTINUE records must be enabled. -+ @return Copy of mbValid. */ -+ bool EnsureRawReadSize( sal_uInt16 nBytes ); -+ /** Returns the maximum size of raw data possible to read in one block. */ -+ sal_uInt16 GetMaxRawReadSize( sal_uInt32 nBytes ) const; -+ -+ /** Reads and decrypts nBytes bytes to the existing(!) buffer pData. -+ @return Count of bytes really read. */ -+ sal_uInt16 ReadRawData( void* pData, sal_uInt16 nBytes ); - - /** Reads 8 bit/16 bit string length. */ - inline sal_uInt16 ReadByteStrLen( bool b16BitLen ) - { return b16BitLen ? ReaduInt16() : ReaduInt8(); } - -- /** Restores stream position contained in rPos. */ -- void RestorePosition( const XclImpStreamPos& rPos ); --}; -- -- --// ---------------------------------------------------------------------------- -- --inline XclImpStream& XclImpStream::operator>>( sal_Int8& rnValue ) --{ -- if( CheckDataLeft( 1 ) ) ReadAtom( rnValue ); -- return *this; --} -- --inline XclImpStream& XclImpStream::operator>>( sal_uInt8& rnValue ) --{ -- if( CheckDataLeft( 1 ) ) ReadAtom( rnValue ); -- return *this; --} -- --inline XclImpStream& XclImpStream::operator>>( sal_Int16& rnValue ) --{ -- if( CheckDataLeft( 2 ) ) ReadAtom( rnValue ); -- return *this; --} -- --inline XclImpStream& XclImpStream::operator>>( sal_uInt16& rnValue ) --{ -- if( CheckDataLeft( 2 ) ) ReadAtom( rnValue ); -- return *this; --} -- --inline XclImpStream& XclImpStream::operator>>( sal_Int32& rnValue ) --{ -- if( CheckDataLeft( 4 ) ) ReadAtom( rnValue ); -- return *this; --} -- --inline XclImpStream& XclImpStream::operator>>( sal_uInt32& rnValue ) --{ -- if( CheckDataLeft( 4 ) ) ReadAtom( rnValue ); -- return *this; --} -- --inline XclImpStream& XclImpStream::operator>>( float& rfValue ) --{ -- if( CheckDataLeft( 4 ) ) ReadAtom( rfValue ); -- return *this; --} -- --inline XclImpStream& XclImpStream::operator>>( double& rfValue ) --{ -- if( CheckDataLeft( 8 ) ) ReadAtom( rfValue ); -- return *this; --} -- -- --// ---------------------------------------------------------------------------- -- --inline void XclImpStream::AppendUniString( String& rString, sal_uInt16 nChars ) --{ -- AppendUniString( rString, nChars, ReaduInt8() ); --} -- --inline void XclImpStream::AppendUniString( String& rString ) --{ -- AppendUniString( rString, ReaduInt16() ); --} -- --inline void XclImpStream::IgnoreUniString( sal_uInt16 nChars ) --{ -- IgnoreUniString( nChars, ReaduInt8() ); --} -+private: -+ typedef ::std::vector< XclImpStreamPos > XclImpStreamPosStack; - --inline void XclImpStream::IgnoreUniString() --{ -- IgnoreUniString( ReaduInt16() ); --} -+ SvStream& mrStrm; /// Reference to the system input stream. -+ const XclImpRoot& mrRoot; /// Filter root data. - -+ XclImpDecrypterRef mxDecrypter; /// Provides methods to decrypt data. - --// ---------------------------------------------------------------------------- -- --inline void XclImpStream::AppendByteString( String& rString, bool b16BitLen ) --{ -- AppendRawByteString( rString, ReadByteStrLen( b16BitLen ) ); --} -+ XclImpStreamPos maFirstRec; /// Start position of current record. -+ XclImpStreamPosStack maPosStack; /// Stack for record positions. - --inline void XclImpStream::IgnoreRawByteString( sal_uInt16 nChars ) --{ -- Ignore( nChars ); --} -+ XclImpStreamPos maGlobPos; /// User defined position elsewhere in stream. -+ sal_uInt16 mnGlobRecId; /// Record ID for user defined position. -+ bool mbGlobValidRec; /// Was user position a valid record? -+ bool mbHasGlobPos; /// Is user position defined? - --inline void XclImpStream::IgnoreByteString( bool b16BitLen ) --{ -- IgnoreRawByteString( ReadByteStrLen( b16BitLen ) ); --} -+ ULONG mnStreamSize; /// Size of system stream. -+ ULONG mnNextRecPos; /// Start of next record header. -+ sal_uInt32 mnCurrRecSize; /// Helper for record position. -+ sal_uInt32 mnComplRecSize; /// Size of complete record data (with CONTINUEs). -+ bool mbHasComplRec; /// true = mnComplRecSize is valid. - -+ sal_uInt16 mnRecId; /// Current record ID (not the CONTINUE ID). -+ sal_uInt16 mnAltContId; /// Alternative record ID for content continuation. - --// ---------------------------------------------------------------------------- -+ sal_uInt16 mnRawRecId; /// Current raw record ID (including CONTINUEs). -+ sal_uInt16 mnRawRecSize; /// Current raw record size (without following CONTINUEs). -+ sal_uInt16 mnRawRecLeft; /// Bytes left in current raw record (without following CONTINUEs). - --#if SC_XCL_USEDECR --inline void XclImpStream::SetDecrypterOffset( sal_uInt16 nRecSize ) --{ -- if( mpDecrypter.get() ) -- mpDecrypter->SetOffset( nRecSize ); --} --#endif -+ sal_Unicode mcNulSubst; /// Replacement for NUL characters. - -+ bool mbCont; /// Automatic CONTINUE lookup on/off. -+ bool mbUseDecr; /// Usage of decryption. -+ bool mbValidRec; /// false = No more records to read. -+ bool mbValid; /// false = Record overread. -+}; - - // ============================================================================ - -Index: sc/source/filter/inc/xlconst.hxx -=================================================================== -RCS file: /cvs/sc/sc/source/filter/inc/xlconst.hxx,v -retrieving revision 1.15 -retrieving revision 1.13.10.4 -diff -w -u -r1.15 -r1.13.10.4 ---- sc/source/filter/inc/xlconst.hxx 4 Jun 2004 14:06:49 -0000 1.15 -+++ sc/source/filter/inc/xlconst.hxx 14 Jul 2004 10:30:45 -0000 1.13.10.4 -@@ -102,14 +102,13 @@ - const SCTAB SCNOTAB = SCTAB_MAX; /// An invalid Calc sheet index, for common use. - const sal_uInt16 EXC_NOTAB = 0xFFFF; /// An invalid Excel sheet index, for common use. - -+// Storage/stream names ------------------------------------------------------- - --// In/out stream -------------------------------------------------------------- -+#define EXC_STORAGE_VBA_PROJECT CREATE_STRING( "_VBA_PROJECT_CUR" ) -+#define EXC_STORAGE_VBA CREATE_STRING( "VBA" ) - --const sal_uInt32 RECORD_SEEK_TO_BEGIN = 0; --const sal_uInt32 RECORD_SEEK_TO_END = ~RECORD_SEEK_TO_BEGIN; -- --const sal_uInt16 EXC_MAXRECSIZE_BIFF5 = 2080; --const sal_uInt16 EXC_MAXRECSIZE_BIFF8 = 8224; -+#define EXC_STREAM_BOOK CREATE_STRING( "Book" ) -+#define EXC_STREAM_WORKBOOK CREATE_STRING( "Workbook" ) - - // String import/export ------------------------------------------------------- - -@@ -189,16 +183,11 @@ - const sal_uInt16 EXC_ID_NOTE = 0x001C; - const sal_uInt16 EXC_NOTE_VISIBLE = 0x0002; - -- - // (0x0012, 0x0019) PROTECT and WINDOWPROTECT -------------------- - - const sal_uInt16 EXC_ID_PROTECT = 0x0012; - const sal_uInt16 EXC_ID_WINDOWPROTECT = 0x0019; - --// (0x003C) CONTINUE ---------------------------------------------------------- -- --const sal_uInt16 EXC_ID_CONT = 0x003C; -- - // (0x003D) WINDOW1 ----------------------------------------------------------- - - const sal_uInt16 EXC_ID_WINDOW1 = 0x003D; -@@ -240,14 +226,9 @@ - - const sal_uInt16 EXC_WSBOOL_DEFAULTFLAGS = 0x04C1; - -- - // (0x008C) COUNTRY ----------------------------------------------------------- - - const sal_uInt16 EXC_ID_COUNTRY = 0x008C; -- --// (0xFFFF) unknown record - special ID --------------------------------------- -- --const sal_uInt16 EXC_ID_UNKNOWN = 0xFFFF; - - // ============================================================================ - -Index: sc/source/filter/inc/xlcontent.hxx -=================================================================== -RCS file: /cvs/sc/sc/source/filter/inc/xlcontent.hxx,v -retrieving revision 1.4 -retrieving revision 1.3.108.2 -diff -w -u -r1.4 -r1.3.108.2 ---- sc/source/filter/inc/xlcontent.hxx 4 Jun 2004 14:07:04 -0000 1.4 -+++ sc/source/filter/inc/xlcontent.hxx 14 Jul 2004 10:30:53 -0000 1.3.108.2 -@@ -70,6 +70,15 @@ - - - // Constants ================================================================== -+ -+// (0x002F) FILEPASS ---------------------------------------------------------- -+ -+const sal_uInt16 EXC_ID_FILEPASS = 0x002F; -+ -+const sal_uInt16 EXC_FILEPASS_BIFF5 = 0x0000; -+const sal_uInt16 EXC_FILEPASS_BIFF8 = 0x0001; -+const sal_uInt16 EXC_FILEPASS_BIFF8_STD = 0x0001; -+const sal_uInt16 EXC_FILEPASS_BIFF8_STRONG = 0x0002; - - // (0x00FC, 0x00FF) SST, EXTSST ----------------------------------------------- - -Index: sc/source/filter/inc/xlocx.hxx -=================================================================== -RCS file: /cvs/sc/sc/source/filter/inc/xlocx.hxx,v -retrieving revision 1.7 -retrieving revision 1.6.6.2 -diff -w -u -r1.7 -r1.6.6.2 ---- sc/source/filter/inc/xlocx.hxx 4 Jun 2004 11:01:20 -0000 1.7 -+++ sc/source/filter/inc/xlocx.hxx 14 Jul 2004 10:31:25 -0000 1.6.6.2 -@@ -143,7 +143,7 @@ - const XclImpCtrlLinkHelper& rControl ) const; - - private: -- SvStorageStreamRef mxStrm; /// The 'Ctls' strem. -+ SvStorageStreamRef mxStrm; /// The 'Ctls' stream. - }; - - -@@ -180,7 +180,9 @@ - const XControlModelRef& rxModel ) const; - - private: -+#if EXC_EXP_OCX_CTRL - SvStorageStreamRef mxStrm; /// The 'Ctls' stream. -+#endif - }; - - // ============================================================================ -Index: sc/source/filter/inc/xlpivot.hxx -=================================================================== -RCS file: /cvs/sc/sc/source/filter/inc/xlpivot.hxx,v -retrieving revision 1.2 -retrieving revision 1.2.72.1 -diff -w -u -r1.2 -r1.2.72.1 ---- sc/source/filter/inc/xlpivot.hxx 4 Jun 2004 14:07:18 -0000 1.2 -+++ sc/source/filter/inc/xlpivot.hxx 14 Jul 2004 14:18:13 -0000 1.2.72.1 -@@ -95,6 +95,8 @@ - // Constants and Enumerations ================================================= - - // misc ----------------------------------------------------------------------- -+ -+#define EXC_STORAGE_PTCACHE CREATE_STRING( "_SX_DB_CUR" ) - - const sal_uInt16 EXC_PC_MAXFIELDCOUNT = 0xFFFE; - const sal_uInt16 EXC_PC_MAXITEMCOUNT = 32500; -Index: sc/source/filter/inc/xlroot.hxx -=================================================================== -RCS file: /cvs/sc/sc/source/filter/inc/xlroot.hxx,v -retrieving revision 1.12 -retrieving revision 1.11.6.4 -diff -w -u -r1.12 -r1.11.6.4 ---- sc/source/filter/inc/xlroot.hxx 4 Jun 2004 11:01:34 -0000 1.12 -+++ sc/source/filter/inc/xlroot.hxx 14 Jul 2004 10:31:43 -0000 1.11.6.4 -@@ -76,9 +76,10 @@ - #include "xltools.hxx" - #endif - -- - // Global data ================================================================ - -+class SfxMedium; -+class SvStorage; - class ScEditEngineDefaulter; - class ScHeaderEditEngine; - class EditEngine; -@@ -90,16 +91,18 @@ - /** Stores global buffers and data needed elsewhere in the Excel filters. */ - struct XclRootData - { -- typedef ::std::auto_ptr< ScEditEngineDefaulter > ScEditEngineDefaulterPtr; -- typedef ::std::auto_ptr< ScHeaderEditEngine > ScHeaderEditEnginePtr; -+ typedef ::std::auto_ptr< ScEditEngineDefaulter > ScEEDefaulterPtr; -+ typedef ::std::auto_ptr< ScHeaderEditEngine > ScHeaderEEPtr; - typedef ::std::auto_ptr< EditEngine > EditEnginePtr; - typedef ::std::auto_ptr< ScExtDocOptions > ScExtDocOptionsPtr; - typedef ::std::auto_ptr< XclTracer > XclTracerPtr; - - XclBiff meBiff; /// Current BIFF version. -+ SfxMedium& mrMedium; /// The medium to import from. - ScDocument& mrDoc; /// The source or destination document. - String maDocUrl; /// Document URL of imported/exported file. - String maBasePath; /// Base path of imported/exported file (path of maDocUrl). -+ String maPassw; /// Entered password for stream encryption/decryption. - CharSet meCharSet; /// Character set to import/export byte strings. - LanguageType meSysLang; /// System language. - LanguageType meDocLang; /// Document language (import: from file, export: from system). -@@ -107,19 +110,21 @@ - ScAddress maScMaxPos; /// Highest Calc cell position. - ScAddress maXclMaxPos; /// Highest Excel cell position. - ScAddress maMaxPos; /// Highest position valid in Calc and Excel. -- long mnCharWidth; /// Width of '0' in default font (twips). -- SCTAB mnScTab; /// Current Calc sheet index. -- bool mbTruncated; /// Flag for the table truncated warning box. - -- ScEditEngineDefaulterPtr mpEditEngine; /// Edit engine for rich strings etc. -- ScHeaderEditEnginePtr mpHFEditEngine; /// Edit engine for header/footer. -+ ScEEDefaulterPtr mpEditEngine; /// Edit engine for rich strings etc. -+ ScHeaderEEPtr mpHFEditEngine; /// Edit engine for header/footer. - EditEnginePtr mpDrawEditEng; /// Edit engine for text boxes. - - ScExtDocOptionsPtr mpExtDocOpt; /// Extended document options. -- - XclTracerPtr mpTracer; /// Filter tracer. - -- ::std::auto_ptr< RootData > mpRDP;//! -+ long mnCharWidth; /// Width of '0' in default font (twips). -+ SCTAB mnScTab; /// Current Calc sheet index. -+ const bool mbExport; /// false = Import, true = Export. -+ bool mbTruncated; /// Flag for the table truncated warning box. -+ bool mbHasPassw; /// true = Password already querried. -+ -+ ::std::auto_ptr< RootData > mxRD;//! - - #ifdef DBG_UTIL - sal_Int32 mnObjCnt; /// Object counter for mem leak tests. -@@ -127,13 +132,13 @@ - - explicit XclRootData( - XclBiff eBiff, -+ SfxMedium& rMedium, - ScDocument& rDocument, -- const String& rDocUrl, -- CharSet eCharSet ); -+ CharSet eCharSet, -+ bool bExport ); - virtual ~XclRootData(); - }; - -- - // ---------------------------------------------------------------------------- - - class SfxObjectShell; -@@ -149,9 +154,6 @@ - /** Access to global data for a filter object (imported or exported document) from other classes. */ - class XclRoot - { --private: -- mutable XclRootData& mrData; /// Reference to the global data struct. -- - public: - XclRoot( const XclRoot& rRoot ); - virtual ~XclRoot(); -@@ -170,19 +172,35 @@ - inline LanguageType GetDocLanguage() const { return mrData.meDocLang; } - /** Returns the UI language. */ - inline LanguageType GetUILanguage() const { return mrData.meUILang; } -+ /** Returns the character set to import/export byte strings. */ -+ inline CharSet GetCharSet() const { return mrData.meCharSet; } -+ /** Returns the width of the '0' character (default font) for the current printer (twips). */ -+ inline long GetCharWidth() const { return mrData.mnCharWidth; } - /** Returns the current Calc sheet index. */ - inline SCTAB GetCurrScTab() const { return mrData.mnScTab; } - /** Returns whether the "some cells have been cut" warning box should show. */ - inline bool IsTruncated() const { return mrData.mbTruncated; } - -+ /** Returns the medium to import from. */ -+ inline SfxMedium& GetMedium() const { return mrData.mrMedium; } - /** Returns the document URL of the imported/exported file. */ - inline const String& GetDocUrl() const { return mrData.maDocUrl; } - /** Returns the base path of the imported/exported file. */ - inline const String& GetBasePath() const { return mrData.maBasePath; } -- /** Returns the character set to import/export byte strings. */ -- inline CharSet GetCharSet() const { return mrData.meCharSet; } -- /** Returns the width of the '0' character (default font) for the current printer (twips). */ -- inline long GetCharWidth() const { return mrData.mnCharWidth; } -+ /** Queries a password from the user and returns it (empty string -> input cancelled). */ -+ const String& QueryPassword() const; -+ -+ /** Returns the OLE2 root storage of the imported/exported file. -+ @return Pointer to root storage or 0, if the file is a simple stream. */ -+ SvStorage* GetRootStorage() const; -+ /** Tries to open a storage as child of the specified storage for writing. */ -+ SvStorageRef OpenStorage( SvStorage* pStrg, const String& rStrgName ) const; -+ /** Tries to open a storage as child of the root storage for writing. */ -+ SvStorageRef OpenStorage( const String& rStrgName ) const; -+ /** Tries to open a new stream in the specified storage for writing. */ -+ SvStorageStreamRef OpenStream( SvStorage* pStrg, const String& rStrmName ) const; -+ /** Tries to open a new stream in the root storage for writing. */ -+ SvStorageStreamRef OpenStream( const String& rStrmName ) const; - - /** Returns the destination document (import) or source document (export). */ - inline ScDocument& GetDoc() const { return mrData.mrDoc; } -@@ -201,10 +219,6 @@ - /** Returns the defined names container of the Calc document. */ - ScRangeName& GetNamedRanges() const; - -- /** Returns the OLE2 root storage of the imported/exported file. -- @return Pointer to root storage or 0, if the file is a simple stream. */ -- SvStorage* GetRootStorage() const; -- - /** Returns the edit engine for import/export of rich strings etc. */ - ScEditEngineDefaulter& GetEditEngine() const; - /** Returns the edit engine for import/export of headers/footers. */ -@@ -267,8 +281,10 @@ - @param rRangeList (In/out) The cell range list to check. - @param rMaxPos Highest valid cell address. */ - void CheckCellRangeList( ScRangeList& rRanges, const ScAddress& rMaxPos ) const; --}; - -+private: -+ mutable XclRootData& mrData; /// Reference to the global data struct. -+}; - - // ============================================================================ - -Index: sc/source/filter/xcl97/XclExpChangeTrack.cxx -=================================================================== -RCS file: /cvs/sc/sc/source/filter/xcl97/XclExpChangeTrack.cxx,v -retrieving revision 1.15 -retrieving revision 1.14.6.3 -diff -w -u -r1.15 -r1.14.6.3 ---- sc/source/filter/xcl97/XclExpChangeTrack.cxx 4 Jun 2004 11:06:09 -0000 1.15 -+++ sc/source/filter/xcl97/XclExpChangeTrack.cxx 14 Jul 2004 10:35:25 -0000 1.14.6.3 -@@ -85,11 +85,6 @@ - #endif - - //___________________________________________________________________ -- --extern const sal_Char* pRevLogStreamName; --extern const sal_Char* pUserNamesStreamName; -- --//___________________________________________________________________ - // local functions - - void lcl_WriteDateTime( XclExpStream& rStrm, const DateTime& rDateTime ) -@@ -1279,12 +1274,12 @@ - sal_Bool XclExpChangeTrack::WriteUserNamesStream() - { - sal_Bool bRet = sal_False; -- String sStreamName( pUserNamesStreamName, RTL_TEXTENCODING_ASCII_US ); -- SvStorageStreamRef xSvStrm = pExcRoot->pRootStorage->OpenStream( sStreamName, STREAM_READWRITE | STREAM_TRUNC ); -+ const XclExpRoot& rRoot = *pExcRoot->pER; -+ SvStorageStreamRef xSvStrm = rRoot.OpenStream( EXC_STREAM_USERNAMES ); - DBG_ASSERT( xSvStrm.Is(), "XclExpChangeTrack::WriteUserNamesStream - no stream" ); - if( xSvStrm.Is() ) - { -- XclExpStream aXclStrm( *xSvStrm, *pExcRoot->pER ); -+ XclExpStream aXclStrm( *xSvStrm, rRoot ); - XclExpChTr0x0191().Save( aXclStrm ); - XclExpChTr0x0198().Save( aXclStrm ); - XclExpChTr0x0192().Save( aXclStrm ); -@@ -1302,12 +1297,12 @@ - - if( WriteUserNamesStream() ) - { -- String sStreamName( pRevLogStreamName, RTL_TEXTENCODING_ASCII_US ); -- SvStorageStreamRef xSvStrm = pExcRoot->pRootStorage->OpenStream( sStreamName, STREAM_READWRITE | STREAM_TRUNC ); -+ const XclExpRoot& rRoot = *pExcRoot->pER; -+ SvStorageStreamRef xSvStrm = rRoot.OpenStream( EXC_STREAM_REVLOG ); - DBG_ASSERT( xSvStrm.Is(), "XclExpChangeTrack::Write - no stream" ); - if( xSvStrm.Is() ) - { -- XclExpStream aXclStrm( *xSvStrm, *pExcRoot->pER, EXC_MAXRECSIZE_BIFF8 + 8 ); -+ XclExpStream aXclStrm( *xSvStrm, rRoot, EXC_MAXRECSIZE_BIFF8 + 8 ); - aRecList.Save( aXclStrm ); - xSvStrm->Commit(); - } -Index: sc/source/filter/xcl97/XclImpChangeTrack.cxx -=================================================================== -RCS file: /cvs/sc/sc/source/filter/xcl97/XclImpChangeTrack.cxx,v -retrieving revision 1.21 -retrieving revision 1.20.6.4 -diff -w -u -r1.21 -r1.20.6.4 ---- sc/source/filter/xcl97/XclImpChangeTrack.cxx 4 Jun 2004 11:06:45 -0000 1.21 -+++ sc/source/filter/xcl97/XclImpChangeTrack.cxx 14 Jul 2004 10:35:34 -0000 1.20.6.4 -@@ -96,47 +96,38 @@ - #endif - - //___________________________________________________________________ -- --extern const sal_Char* pRevLogStreamName; --extern const sal_Char* pUserNamesStreamName; -- --//___________________________________________________________________ - // class XclImpChangeTrack - --XclImpChangeTrack::XclImpChangeTrack( RootData* pRootData ) : -+XclImpChangeTrack::XclImpChangeTrack( RootData* pRootData, const XclImpStream& rBookStrm ) : - ExcRoot( pRootData ), - aRecHeader(), - sOldUsername(), - pChangeTrack( NULL ), -- pInStrm( NULL ), - pStrm( NULL ), - nTabIdCount( 0 ), - bGlobExit( sal_False ), - eNestedMode( nmBase ) - { -- String sStreamName( pRevLogStreamName, RTL_TEXTENCODING_ASCII_US ); -- SvStorage& rStorage = *pExcRoot->pRootStorage; -- -- if( !rStorage.IsContained( sStreamName ) || !rStorage.IsStream( sStreamName ) ) -- return; -+ const XclImpRoot& rRoot = *pExcRoot->pIR; - - // Verify that the User Names stream exists before going any further. Excel adds both - // "Revision Log" and "User Names" streams when Change Tracking is active but the Revision log - // remains if Change Tracking is turned off. -- String sUserNamesStreamName( pUserNamesStreamName, RTL_TEXTENCODING_ASCII_US ); -- if( !rStorage.IsContained( sUserNamesStreamName ) || !rStorage.IsStream( sUserNamesStreamName ) ) -+ SvStorageStreamRef xUserStrm = rRoot.OpenStream( EXC_STREAM_USERNAMES ); -+ if( !xUserStrm.Is() ) - return; - -- pInStrm = rStorage.OpenStream( sStreamName, STREAM_STD_READ ); -- if( pInStrm ) -+ xInStrm = rRoot.OpenStream( EXC_STREAM_REVLOG ); -+ if( xInStrm.Is() ) - { -- pInStrm->Seek( STREAM_SEEK_TO_END ); -- ULONG nStreamLen = pInStrm->Tell(); -- if( (pInStrm->GetErrorCode() == ERRCODE_NONE) && (nStreamLen != ~((ULONG)0)) ) -- { -- pInStrm->Seek( STREAM_SEEK_TO_BEGIN ); -- pStrm = new XclImpStream( *pInStrm, *pExcRoot->pIR ); -- pChangeTrack = new ScChangeTrack( pExcRoot->pDoc ); -+ xInStrm->Seek( STREAM_SEEK_TO_END ); -+ ULONG nStreamLen = xInStrm->Tell(); -+ if( (xInStrm->GetErrorCode() == ERRCODE_NONE) && (nStreamLen != STREAM_SEEK_TO_END) ) -+ { -+ xInStrm->Seek( STREAM_SEEK_TO_BEGIN ); -+ pStrm = new XclImpStream( *xInStrm, rRoot ); -+ pStrm->CopyDecrypterFrom( rBookStrm ); -+ pChangeTrack = new ScChangeTrack( rRoot.GetDocPtr() ); - - sOldUsername = pChangeTrack->GetUser(); - pChangeTrack->SetUseFixDateTime( TRUE ); -@@ -148,12 +139,8 @@ - - XclImpChangeTrack::~XclImpChangeTrack() - { -- if( pChangeTrack ) - delete pChangeTrack; -- if( pStrm ) - delete pStrm; -- if( pInStrm ) -- delete pInStrm; - } - - void XclImpChangeTrack::DoAcceptRejectAction( ScChangeAction* pAction ) -@@ -372,6 +359,7 @@ - - void XclImpChangeTrack::ReadChTrInfo() - { -+ pStrm->DisableDecryption(); - pStrm->Ignore( 32 ); - String sUsername( pStrm->ReadUniString() ); - if( !pStrm->IsValid() ) return; -Index: sc/source/ui/docshell/docsh.cxx -=================================================================== -RCS file: /cvs/sc/sc/source/ui/docshell/docsh.cxx,v -retrieving revision 1.69 -retrieving revision 1.69.36.1 -diff -w -u -r1.69 -r1.69.36.1 ---- sc/source/ui/docshell/docsh.cxx 28 Jun 2004 12:41:49 -0000 1.69 -+++ sc/source/ui/docshell/docsh.cxx 16 Jul 2004 17:38:26 -0000 1.69.36.1 -@@ -163,6 +163,7 @@ - #include "scextopt.hxx" - #include "compiler.hxx" - #include "cfgids.hxx" -+#include "warnpassword.hxx" - - #include "docsh.hxx" - -@@ -1866,6 +1867,7 @@ - { - WaitObject aWait( GetDialogParent() ); - -+ BOOL bDo = TRUE; - ScTabViewShell* pViewShell = GetBestViewShell(); - if( pViewShell ) - { -@@ -1873,8 +1875,15 @@ - if( !pExtDocOpt ) - aDocument.SetExtDocOptions( pExtDocOpt = new ScExtDocOptions ); - pViewShell->GetViewData()->WriteExtOptions( *pExtDocOpt ); -+ -+ // if the imported document contained an encrypted -+ // password - determineif we should save without it. -+ if(pExtDocOpt && pExtDocOpt->IsWinEncrypted() ) -+ bDo = ScWarnPassword::WarningOnPassword( rMed ); - } - -+ if(bDo) -+ { - BOOL bFake97 = ( aFltName.EqualsAscii(pFilterExcel97) || aFltName.EqualsAscii(pFilterEx97Temp) ); - FltError eError = ScExportExcel5( rMed, &aDocument, bFake97, RTL_TEXTENCODING_MS_1252 ); - -@@ -1886,6 +1895,9 @@ - else - bRet = eError == eERR_OK; - } -+ else -+ SetError(ERRCODE_ABORT); -+ } - else if (aFltName.EqualsAscii(pFilterAscii)) - { - SvStream* pStream = rMed.GetOutStream(); -Index: sc/source/ui/src/scerrors.src -=================================================================== -RCS file: /cvs/sc/sc/source/ui/src/scerrors.src,v -retrieving revision 1.43 -retrieving revision 1.42.84.2 -diff -w -u -r1.43 -r1.42.84.2 ---- sc/source/ui/src/scerrors.src 26 Jun 2004 20:09:15 -0000 1.43 -+++ sc/source/ui/src/scerrors.src 14 Jul 2004 11:36:29 -0000 1.42.84.2 -@@ -62,99 +62,95 @@ - #include "scerrors.hxx" - #include "sc.hrc" - -- -- --#define SH_MAX 0x7fff -- - Resource RID_ERRHDLSC - { - //------------------------------------------------------------ - // ERRORS ----------------------------------------------------- - //------------------------------------------------------------ -- String SCERR_IMPORT_CONNECT & SH_MAX -+ String SCERR_IMPORT_CONNECT & ERRCODE_RES_MASK - { - Text [ de ] = "Es konnte keine Verbindung zu der Datei hergestellt werden." ; - Text [ en-US ] = "Impossible to connect to the file." ; - Text [ x-comment ] = " "; - }; -- String SCERR_IMPORT_OPEN & SH_MAX -+ String SCERR_IMPORT_OPEN & ERRCODE_RES_MASK - { - /* ### ACHTUNG: Neuer Text in Resource? Die Datei konnte nicht geöffnet werden. : Die Datei konnte nicht ge÷ffnet werden. */ - Text [ de ] = "Die Datei konnte nicht geöffnet werden." ; - Text [ en-US ] = "File could not be opened." ; - Text [ x-comment ] = " "; - }; -- String SCERR_IMPORT_UNKNOWN & SH_MAX -+ String SCERR_IMPORT_UNKNOWN & ERRCODE_RES_MASK - { - Text [ de ] = "Ein unbekannter Fehler ist aufgetreten." ; - Text [ en-US ] = "An unknown error has occurred." ; - Text [ x-comment ] = " "; - }; -- String SCERR_IMPORT_OUTOFMEM & SH_MAX -+ String SCERR_IMPORT_OUTOFMEM & ERRCODE_RES_MASK - { - Text [ de ] = "Nicht genug Speicher beim Importieren." ; - Text [ en-US ] = "Not enough memory while importing." ; - Text [ x-comment ] = " "; - }; -- String SCERR_IMPORT_UNKNOWN_WK & SH_MAX -+ String SCERR_IMPORT_UNKNOWN_WK & ERRCODE_RES_MASK - { - Text [ de ] = "Unbekanntes Lotus-123-Dateiformat." ; - Text [ en-US ] = "Unknown Lotus1-2-3 file format." ; - Text [ x-comment ] = " "; - }; -- String SCERR_IMPORT_FORMAT & SH_MAX -+ String SCERR_IMPORT_FORMAT & ERRCODE_RES_MASK - { - Text [ de ] = "Fehler in Dateistruktur beim Importieren." ; - Text [ en-US ] = "Error in file structure while importing." ; - Text [ x-comment ] = " "; - }; -- String SCERR_IMPORT_NI & SH_MAX -+ String SCERR_IMPORT_NI & ERRCODE_RES_MASK - { - /* ### ACHTUNG: Neuer Text in Resource? Für diesen Dateityp ist kein Filter implementiert. : F³r diesen Dateityp ist kein Filter implementiert. */ - Text [ de ] = "Für diesen Dateityp ist kein Filter implementiert." ; - Text [ en-US ] = "There is no filter available for this file type." ; - Text [ x-comment ] = " "; - }; -- String SCERR_IMPORT_UNKNOWN_BIFF & SH_MAX -+ String SCERR_IMPORT_UNKNOWN_BIFF & ERRCODE_RES_MASK - { - /* ### ACHTUNG: Neuer Text in Resource? Nicht unterstütztes oder unbekanntes Excel-Dateiformat. : Nicht unterst³tztes oder unbekanntes Excel-Dateiformat. */ - Text [ de ] = "Nicht unterstütztes oder unbekanntes Excel-Dateiformat." ; - Text [ en-US ] = "Unknown or unsupported Excel file format." ; - Text [ x-comment ] = " "; - }; -- String SCERR_IMPORT_NI_BIFF & SH_MAX -+ String SCERR_IMPORT_NI_BIFF & ERRCODE_RES_MASK - { - Text [ de ] = "Noch nicht implementiertes Excel-Dateiformat." ; - Text [ en-US ] = "Excel file format not yet implemented." ; - Text [ x-comment ] = " "; - }; -- String SCERR_IMPORT_FILEPASSWD & SH_MAX -+ String SCERR_IMPORT_FILEPASSWD & ERRCODE_RES_MASK - { - /* ### ACHTUNG: Neuer Text in Resource? Die Datei ist durch ein Kennwort geschützt. : Die Datei ist durch ein Kennwort gesch³tzt. */ - Text [ de ] = "Die Datei ist durch ein Kennwort geschützt." ; - Text [ en-US ] = "This file is password-protected." ; - Text [ x-comment ] = " "; - }; -- String SCERR_IMPORT_INTERNAL & SH_MAX -+ String SCERR_IMPORT_INTERNAL & ERRCODE_RES_MASK - { - Text [ de ] = "Interner Importfehler" ; - Text [ en-US ] = "Internal import error." ; - Text [ x-comment ] = " "; - }; -- String SCERR_IMPORT_8K_LIMIT & SH_MAX -+ String SCERR_IMPORT_8K_LIMIT & ERRCODE_RES_MASK - { - /* ### ACHTUNG: Neuer Text in Resource? Die Datei enthält Daten unterhalb von Zeile 8192 und kann daher nicht gelesen werden. : Die Datei enthõlt Daten unterhalb von Zeile 8192 und kann daher nicht gelesen werden. */ - Text [ de ] = "Die Datei enthält Daten unterhalb von Zeile 8192 und kann daher nicht gelesen werden." ; - Text [ en-US ] = "The file contains data after row 8192 and therefore can not be read." ; - Text [ x-comment ] = " "; - }; -- String SCERR_IMPORT_FILE_ROWCOL & SH_MAX -+ String SCERR_IMPORT_FILE_ROWCOL & ERRCODE_RES_MASK - { - Text [ de ] = "Formatfehler in Teildokument $(ARG1) an Position $(ARG2)(Zeile,Spalte) in der Datei entdeckt" ; - Text [ en-US ] = "Format error discovered in the file in sub-document $(ARG1) at $(ARG2)(row,col)"; - Text [ x-comment ] = "; shou; should be the same text like in the writer"; - }; -- String SCERR_IMPORT_FORMAT_ROWCOL & SH_MAX -+ String SCERR_IMPORT_FORMAT_ROWCOL & ERRCODE_RES_MASK - { - Text [ de ] = "Formatfehler an Position $(ARG1)(Zeile,Spalte) in der Datei entdeckt" ; - Text [ en-US ] = "File format error found at $(ARG1)(row,col)" ; -@@ -162,13 +158,13 @@ - }; - - // Export ---------------------------------------------------- -- String SCERR_EXPORT_CONNECT & SH_MAX -+ String SCERR_EXPORT_CONNECT & ERRCODE_RES_MASK - { - Text [ de ] = "Es konnte keine Verbindung zu der Datei hergestellt werden." ; - Text [ en-US ] = "Connection to the file could not be established." ; - Text [ x-comment ] = " "; - }; -- String SCERR_EXPORT_DATA & SH_MAX -+ String SCERR_EXPORT_DATA & ERRCODE_RES_MASK - { - Text [ de ] = "Die Daten konnten nicht geschrieben werden." ; - Text [ en-US ] = "Data could not be written." ; -@@ -177,120 +173,85 @@ - //------------------------------------------------------------ - // WARNINGS --------------------------------------------------- - //------------------------------------------------------------ -- String SCWARN_EXPORT_ASCII & SH_MAX -+ String SCWARN_EXPORT_ASCII & ERRCODE_RES_MASK - { - Text [ de ] = "Es wurde nur die aktuelle Tabelle gespeichert." ; - Text [ en-US ] = "Only the active sheet was saved." ; - Text [ x-comment ] = " "; - }; -- String SCWARN_IMPORT_RANGE_OVERFLOW & SH_MAX -+ String SCWARN_IMPORT_RANGE_OVERFLOW & ERRCODE_RES_MASK - { - /* ### ACHTUNG: Neuer Text in Resource? Die Maximalanzahl von Zeilen wurde überschritten. Überzählige Zeilen wurden nicht mitimportiert! : Die Maximalanzahl von Zeilen wurde ³berschritten. šberzõhlige Zeilen wurden nicht mitimportiert! */ - Text [ de ] = "Die Maximalanzahl von Zeilen wurde überschritten. Überzählige Zeilen wurden nicht mitimportiert!" ; - Text [ en-US ] = "The maximum number of rows has been exceeded. Excess rows were not imported!" ; - Text [ x-comment ] = " "; - }; -- String SCWARN_IMPORT_ROW_OVERFLOW & SH_MAX -+ String SCWARN_IMPORT_ROW_OVERFLOW & ERRCODE_RES_MASK - { - Text [ de ] = "Die Daten konnten nicht vollständig geladen werden, da die maximale Anzahl von Tabellenzeilen überschritten wurde." ; - Text [ en-US ] = "The data could not be loaded completely because the maximum number of rows per sheet was exceeded." ; - }; -- String SCWARN_IMPORT_COLUMN_OVERFLOW & SH_MAX -+ String SCWARN_IMPORT_COLUMN_OVERFLOW & ERRCODE_RES_MASK - { - Text [ de ] = "Die Daten konnten nicht vollständig geladen werden, da die maximale Anzahl von Tabellenspalten überschritten wurde." ; - Text [ en-US ] = "The data could not be loaded completely because the maximum number of columns per sheet was exceeded." ; - }; -- String SCWARN_IMPORT_SHEET_OVERFLOW & SH_MAX -+ String SCWARN_IMPORT_SHEET_OVERFLOW & ERRCODE_RES_MASK - { - Text [ de ] = "Einige Tabellen konnten nicht geladen werden, da die maximale Anzahl von Tabellen überschritten wurde." ; - Text [ en-US ] = "Some sheets could not be loaded because the maximum number of sheets was exceeded." ; - }; -- String SCWARN_IMPORT_OPEN_FM3 & SH_MAX -+ String SCWARN_IMPORT_OPEN_FM3 & ERRCODE_RES_MASK - { - /* ### ACHTUNG: Neuer Text in Resource? Zugehörige FM3-Datei konnte nicht geöffnet werden. : Zugeh÷rige FM3-Datei konnte nicht ge÷ffnet werden. */ - Text [ de ] = "Zugehörige FM3-Datei konnte nicht geöffnet werden." ; - Text [ en-US ] = "Corresponding FM3-File could not be opened." ; - Text [ x-comment ] = " "; - }; -- String SCWARN_IMPORT_WRONG_FM3 & SH_MAX -+ String SCWARN_IMPORT_WRONG_FM3 & ERRCODE_RES_MASK - { - /* ### ACHTUNG: Neuer Text in Resource? Fehler in Dateistruktur der zugehörigen FM3-Datei. : Fehler in Dateistruktur der zugeh÷rigen FM3-Datei. */ - Text [ de ] = "Fehler in Dateistruktur der zugehörigen FM3-Datei." ; - Text [ en-US ] = "Error in file structure of corresponding FM3-File." ; - Text [ x-comment ] = " "; - }; -- String SCWARN_CORE_HARD_RECALC & SH_MAX -+ String SCWARN_CORE_HARD_RECALC & ERRCODE_RES_MASK - { - /* ### ACHTUNG: Neuer Text in Resource? Dokument zu komplex für automatische Berechnung. Neuberechnung mit F9. : Dokument zu komplex f³r automatische Berechnung. Neuberechnung mit F9. */ - Text [ de ] = "Dokument zu komplex für automatische Berechnung. Neuberechnung mit F9." ; - Text [ en-US ] = "Document too complex for automatic calculation. Press F9 to recalculate." ; - Text [ x-comment ] = " "; - }; -- String SCWARN_EXPORT_MAXROW & SH_MAX -+ String SCWARN_EXPORT_MAXROW & ERRCODE_RES_MASK - { - /* ### ACHTUNG: Neuer Text in Resource? Das Dokument enthält mehr Zeilen, als das Ausgabeformat unterstützt.\nÜberzählige Zeilen wurden nicht gespeichert. : Das Dokument enthõlt mehr Zeilen, als das Ausgabeformat unterst³tzt.\nšberzõhlige Zeilen wurden nicht gespeichert. */ - Text [ de ] = "Das Dokument enthält mehr Zeilen, als das Ausgabeformat unterstützt.\nÜberzählige Zeilen wurden nicht gespeichert." ; - Text [ en-US ] = "The document contains more rows than supported in the selected format.\nAdditional rows were not saved." ; - Text [ x-comment ] = " "; - }; -- String SCWARN_IMPORT_INFOLOST & SH_MAX -+ String SCWARN_IMPORT_INFOLOST & ERRCODE_RES_MASK - { - /* ### ACHTUNG: Neuer Text in Resource? Das Dokument enthält Informationen, die dieser Programmversion unbekannt sind.\nBei erneutem Speichern gehen diese Informationen verloren! : Das Dokument enthõlt Informationen, die dieser Programmversion unbekannt sind.\nBei erneutem Speichern gehen diese Informationen verloren! */ - Text [ de ] = "Das Dokument enthält Informationen, die dieser Programmversion unbekannt sind.\nBei erneutem Speichern gehen diese Informationen verloren!" ; - Text [ en-US ] = "The document contains information not recognized by this program version.\nResaving the document will delete this information!" ; - Text [ x-comment ] = " "; - }; -- String SCWARN_EXPORT_DATALOST & SH_MAX -+ String SCWARN_EXPORT_DATALOST & ERRCODE_RES_MASK - { - Text [ de ] = "Es konnten nicht alle Zellinhalte in dem angegebenen Format gespeichert werden." ; - Text [ en-US ] = "Not all cell contents could be saved in the specified format." ; - Text [ x-comment ] = " "; - }; -- String SCWARN_EXPORT_NONCONVERTIBLE_CHARS & SH_MAX -+ String SCWARN_EXPORT_NONCONVERTIBLE_CHARS & ERRCODE_RES_MASK - { - Text [ de ] = "Die folgenden Zeichen konnten nicht in den gewählten Zeichensatz konvertiert werden\nund wurden in Ӓ Ersatzdarstellung geschrieben:\n\n$(ARG1)"; - Text [ en-US ] = "The following characters could not be converted to the selected character set\nand were written as Ӓ surrogates:\n\n$(ARG1)"; - }; -- String SCWARN_IMPORT_FILE_ROWCOL & SH_MAX -+ String SCWARN_IMPORT_FILE_ROWCOL & ERRCODE_RES_MASK - { - Text [ de ] = "Formatfehler in Teildokument $(ARG1) an Position $(ARG2)(Zeile,Spalte) in der Datei entdeckt" ; - Text [ en-US ] = "Format error discovered in the file in sub-document $(ARG1) at $(ARG2)(row,col)"; - Text [ x-comment ] = "; shou; should be the same text like in the writer"; - }; - }; -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- - -Index: sc/source/ui/unoobj/makefile.mk -=================================================================== -RCS file: /cvs/sc/sc/source/ui/unoobj/makefile.mk,v -retrieving revision 1.15 -retrieving revision 1.15.42.1 -diff -w -u -r1.15 -r1.15.42.1 ---- sc/source/ui/unoobj/makefile.mk 11 Feb 2004 09:57:39 -0000 1.15 -+++ sc/source/ui/unoobj/makefile.mk 16 Jul 2004 17:36:44 -0000 1.15.42.1 -@@ -121,7 +121,8 @@ - $(SLO)$/addruno.obj \ - $(SLO)$/listenercalls.obj \ - $(SLO)$/cellvaluebinding.obj \ -- $(SLO)$/celllistsource.obj -+ $(SLO)$/celllistsource.obj \ -+ $(SLO)$/warnpassword.obj - - SLO2FILES = \ - $(SLO)$/scdetect.obj \ diff --git a/patches/mscodec/mscodec-sd.diff b/patches/mscodec/mscodec-sd.diff deleted file mode 100644 index 250a0b912..000000000 --- a/patches/mscodec/mscodec-sd.diff +++ /dev/null @@ -1,24 +0,0 @@ ---- ../openoffice/build/OOO_1_1_3_fix2/sd/source/filter/sdpptwrp.cxx 2004-07-21 19:21:33.000000000 +0100 -+++ sd/source/filter/sdpptwrp.cxx 2004-09-02 13:14:43.823383416 +0100 -@@ -65,6 +65,7 @@ - #include <sfx2/interno.hxx> - #include <svx/msoleexp.hxx> - #include <svx/svxmsbas.hxx> -+#include <svx/svxerr.hxx> - #include <offmgr/app.hxx> - #include <offmgr/fltrcfg.hxx> - -@@ -145,7 +146,12 @@ - aTracer.StartTracing(); - SdPPTImport* pImport = new SdPPTImport( &mrDocument, *pDocStream, *pStorage, mrMedium, &aTracer ); - if ( !( bRet = pImport->Import() ) ) -- mrMedium.SetError( SVSTREAM_WRONGVERSION ); -+ { -+ if ( pStorage->IsStream( String( RTL_CONSTASCII_USTRINGPARAM("EncryptedSummary") ) ) ) -+ mrMedium.SetError( ERRCODE_SVX_READ_FILTER_PPOINT ); -+ else -+ mrMedium.SetError( SVSTREAM_WRONGVERSION ); -+ } - if ( aTracer.IsEnabled() ) - { - sal_Int32 nCount = 0; diff --git a/patches/mscodec/mscodec-svx-inc-mscodec-hxx.diff b/patches/mscodec/mscodec-svx-inc-mscodec-hxx.diff deleted file mode 100644 index 186711d24..000000000 --- a/patches/mscodec/mscodec-svx-inc-mscodec-hxx.diff +++ /dev/null @@ -1,329 +0,0 @@ ---- /dev/null 2004-07-26 12:51:14.000000000 +0100 -+++ svx/inc/mscodec.hxx 2004-08-11 09:54:04.000000000 +0100 -@@ -0,0 +1,326 @@ -+/************************************************************************* -+ * -+ * $RCSfile$ -+ * -+ * $Revision$ -+ * -+ * last change: $Author$ $Date$ -+ * -+ * The Contents of this file are made available subject to the terms of -+ * either of the following licenses -+ * -+ * - GNU Lesser General Public License Version 2.1 -+ * - Sun Industry Standards Source License Version 1.1 -+ * -+ * Sun Microsystems Inc., October, 2000 -+ * -+ * GNU Lesser General Public License Version 2.1 -+ * ============================================= -+ * Copyright 2000 by Sun Microsystems, Inc. -+ * 901 San Antonio Road, Palo Alto, CA 94303, USA -+ * -+ * This library is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU Lesser General Public -+ * License version 2.1, as published by the Free Software Foundation. -+ * -+ * This library is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * Lesser General Public License for more details. -+ * -+ * You should have received a copy of the GNU Lesser General Public -+ * License along with this library; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, -+ * MA 02111-1307 USA -+ * -+ * -+ * Sun Industry Standards Source License Version 1.1 -+ * ================================================= -+ * The contents of this file are subject to the Sun Industry Standards -+ * Source License Version 1.1 (the "License"); You may not use this file -+ * except in compliance with the License. You may obtain a copy of the -+ * License at http://www.openoffice.org/license.html. -+ * -+ * Software provided under this License is provided on an "AS IS" basis, -+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, -+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, -+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. -+ * See the License for the specific provisions governing your rights and -+ * obligations concerning the Software. -+ * -+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc. -+ * -+ * Copyright: 2000 by Sun Microsystems, Inc. -+ * -+ * All Rights Reserved. -+ * -+ * Contributor(s): _______________________________________ -+ * -+ * -+ ************************************************************************/ -+ -+#ifndef SVX_MSCODEC_HXX -+#define SVX_MSCODEC_HXX -+ -+#ifndef _RTL_CIPHER_H_ -+#include "rtl/cipher.h" -+#endif -+#ifndef _RTL_DIGEST_H_ -+#include "rtl/digest.h" -+#endif -+ -+namespace svx { -+ -+// ============================================================================ -+ -+/** Encodes and decodes data from protected MSO 95- documents. -+ */ -+class MSCodec_Xor95 -+{ -+public: -+ explicit MSCodec_Xor95(int nRotateDistance); -+ virtual ~MSCodec_Xor95(); -+ -+ /** Initializes the algorithm with the specified password. -+ -+ @param pPassData -+ Character array containing the password. Must be zero terminated, -+ which results in a maximum length of 15 characters. -+ */ -+ void InitKey( const sal_uInt8 pnPassData[ 16 ] ); -+ -+ /** Verifies the validity of the password using the passed key and hash. -+ -+ @precond -+ The codec must be initialized with InitKey() before this function -+ can be used. -+ -+ @param nKey -+ Password key value read from the file. -+ @param nHash -+ Password hash value read from the file. -+ -+ @return -+ true = Test was successful. -+ */ -+ bool VerifyKey( sal_uInt16 nKey, sal_uInt16 nHash ) const; -+ -+ /** Reinitializes the codec to start a new memory block. -+ -+ Resets the internal key offset to 0. -+ -+ @precond -+ The codec must be initialized with InitKey() before this function -+ can be used. -+ */ -+ void InitCipher(); -+ -+ /** Decodes a block of memory inplace. -+ -+ @precond -+ The codec must be initialized with InitKey() before this function -+ can be used. -+ -+ @param pnData -+ Encrypted data block. Will contain the decrypted data afterwards. -+ @param nBytes -+ Size of the passed data block. -+ */ -+ virtual void Decode( sal_uInt8* pnData, sal_Size nBytes )=0; -+ -+ /** Lets the cipher skip a specific amount of bytes. -+ -+ This function sets the cipher to the same state as if the specified -+ amount of data has been decoded with one or more calls of Decode(). -+ -+ @precond -+ The codec must be initialized with InitKey() before this function -+ can be used. -+ -+ @param nBytes -+ Number of bytes to be skipped (cipher "seeks" forward). -+ */ -+ void Skip( sal_Size nBytes ); -+ -+ // static ----------------------------------------------------------------- -+ -+ /** Calculates the 16-bit hash value for the given password. -+ -+ The password data may be longer than 16 bytes. The array does not need -+ to be terminated with a NULL byte (but it can without invalidating the -+ result). -+ */ -+ static sal_uInt16 GetHash( const sal_uInt8* pnPassData, sal_Size nSize ); -+ -+protected: -+ sal_uInt8 mpnKey[ 16 ]; /// Encryption key. -+ sal_Size mnOffset; /// Key offset. -+ -+private: -+ MSCodec_Xor95( const MSCodec_Xor95& ); -+ MSCodec_Xor95& operator=( const MSCodec_Xor95& ); -+ -+ sal_uInt16 mnKey; /// Base key from password. -+ sal_uInt16 mnHash; /// Hash value from password. -+ int mnRotateDistance; -+}; -+ -+/** Encodes and decodes data from protected MSO XLS 95- documents. -+ */ -+class MSCodec_XorXLS95 : public MSCodec_Xor95 -+{ -+public: -+ explicit MSCodec_XorXLS95() : MSCodec_Xor95(2) {} -+ -+ /** Decodes a block of memory inplace. -+ -+ @precond -+ The codec must be initialized with InitKey() before this function -+ can be used. -+ -+ @param pnData -+ Encrypted data block. Will contain the decrypted data afterwards. -+ @param nBytes -+ Size of the passed data block. -+ */ -+ virtual void Decode( sal_uInt8* pnData, sal_Size nBytes ); -+}; -+ -+/** Encodes and decodes data from protected MSO Word 95- documents. -+ */ -+class MSCodec_XorWord95 : public MSCodec_Xor95 -+{ -+public: -+ explicit MSCodec_XorWord95() : MSCodec_Xor95(7) {} -+ -+ /** Decodes a block of memory inplace. -+ -+ @precond -+ The codec must be initialized with InitKey() before this function -+ can be used. -+ -+ @param pnData -+ Encrypted data block. Will contain the decrypted data afterwards. -+ @param nBytes -+ Size of the passed data block. -+ */ -+ virtual void Decode( sal_uInt8* pnData, sal_Size nBytes ); -+}; -+ -+ -+// ============================================================================ -+ -+/** Encodes and decodes data from protected MSO 97+ documents. -+ -+ This is a wrapper class around low level cryptographic functions from RTL. -+ Implementation is based on the wvDecrypt package by Caolan McNamara: -+ http://www.csn.ul.ie/~caolan/docs/wvDecrypt.html -+ */ -+class MSCodec_Std97 -+{ -+public: -+ explicit MSCodec_Std97(); -+ ~MSCodec_Std97(); -+ -+ /** Initializes the algorithm with the specified password and document ID. -+ -+ @param pPassData -+ Wide character array containing the password. Must be zero -+ terminated, which results in a maximum length of 15 characters. -+ @param pUnique -+ Unique document identifier read from or written to the file. -+ */ -+ void InitKey( -+ const sal_uInt16 pPassData[ 16 ], -+ const sal_uInt8 pUnique[ 16 ] ); -+ -+ /** Verifies the validity of the password using the passed salt data. -+ -+ @precond -+ The codec must be initialized with InitKey() before this function -+ can be used. -+ -+ @param pSaltData -+ Salt data block read from the file. -+ @param pSaltDigest -+ Salt digest read from the file. -+ -+ @return -+ true = Test was successful. -+ */ -+ bool VerifyKey( -+ const sal_uInt8 pSaltData[ 16 ], -+ const sal_uInt8 pSaltDigest[ 16 ] ); -+ -+ /** Rekeys the codec using the specified counter. -+ -+ After reading a specific amount of data the cipher algorithm needs to -+ be rekeyed using a counter that counts the data blocks. -+ -+ The block size is for example 512 Bytes for Word files and 1024 Bytes -+ for Excel files. -+ -+ @precond -+ The codec must be initialized with InitKey() before this function -+ can be used. -+ -+ @param nCounter -+ Block counter used to rekey the cipher. -+ */ -+ bool InitCipher( sal_uInt32 nCounter ); -+ -+ /** Decodes a block of memory. -+ -+ @see rtl_cipher_decode() -+ -+ @precond -+ The codec must be initialized with InitKey() before this function -+ can be used. The destination buffer must be able to take all -+ encoded data from the source buffer (usually this means it must be -+ as long as or longer than the source buffer). -+ -+ @param pData -+ Encrypted source data block. -+ @param nDatLen -+ Size of the passed source data block. -+ @param pBuffer -+ Destination buffer for the decrypted data. -+ @param nBufLen -+ Size of the destination buffer. -+ -+ @return -+ true = Decoding was successful (no error occured). -+ */ -+ bool Decode( -+ const void* pData, sal_Size nDatLen, -+ sal_uInt8* pBuffer, sal_Size nBufLen ); -+ -+ /** Lets the cipher skip a specific amount of bytes. -+ -+ This function sets the cipher to the same state as if the specified -+ amount of data has been decoded with one or more calls of Decode(). -+ -+ @precond -+ The codec must be initialized with InitKey() before this function -+ can be used. -+ -+ @param nDatLen -+ Number of bytes to be skipped (cipher "seeks" forward). -+ */ -+ bool Skip( sal_Size nDatLen ); -+ -+private: -+ MSCodec_Std97( const MSCodec_Std97& ); -+ MSCodec_Std97& operator=( const MSCodec_Std97& ); -+ -+ rtlCipher m_hCipher; -+ rtlDigest m_hDigest; -+ sal_uInt8 m_pDigestValue[ RTL_DIGEST_LENGTH_MD5 ]; -+}; -+ -+// ============================================================================ -+ -+} // namespace svx -+ -+#endif -+ diff --git a/patches/mscodec/mscodec-svx-source-msfilter-mscodec-cxx.diff b/patches/mscodec/mscodec-svx-source-msfilter-mscodec-cxx.diff deleted file mode 100644 index 6d8f1bc5a..000000000 --- a/patches/mscodec/mscodec-svx-source-msfilter-mscodec-cxx.diff +++ /dev/null @@ -1,430 +0,0 @@ ---- /dev/null 2004-07-26 12:51:14.000000000 +0100 -+++ svx/source/msfilter/mscodec.cxx 2004-08-11 09:55:12.000000000 +0100 -@@ -0,0 +1,427 @@ -+/************************************************************************* -+ * -+ * $RCSfile$ -+ * -+ * $Revision$ -+ * -+ * last change: $Author$ $Date$ -+ * -+ * The Contents of this file are made available subject to the terms of -+ * either of the following licenses -+ * -+ * - GNU Lesser General Public License Version 2.1 -+ * - Sun Industry Standards Source License Version 1.1 -+ * -+ * Sun Microsystems Inc., October, 2000 -+ * -+ * GNU Lesser General Public License Version 2.1 -+ * ============================================= -+ * Copyright 2000 by Sun Microsystems, Inc. -+ * 901 San Antonio Road, Palo Alto, CA 94303, USA -+ * -+ * This library is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU Lesser General Public -+ * License version 2.1, as published by the Free Software Foundation. -+ * -+ * This library is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * Lesser General Public License for more details. -+ * -+ * You should have received a copy of the GNU Lesser General Public -+ * License along with this library; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, -+ * MA 02111-1307 USA -+ * -+ * -+ * Sun Industry Standards Source License Version 1.1 -+ * ================================================= -+ * The contents of this file are subject to the Sun Industry Standards -+ * Source License Version 1.1 (the "License"); You may not use this file -+ * except in compliance with the License. You may obtain a copy of the -+ * License at http://www.openoffice.org/license.html. -+ * -+ * Software provided under this License is provided on an "AS IS" basis, -+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, -+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, -+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. -+ * See the License for the specific provisions governing your rights and -+ * obligations concerning the Software. -+ * -+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc. -+ * -+ * Copyright: 2000 by Sun Microsystems, Inc. -+ * -+ * All Rights Reserved. -+ * -+ * Contributor(s): _______________________________________ -+ * -+ * -+ ************************************************************************/ -+ -+#ifndef SVX_MSCODEC_HXX -+#include "mscodec.hxx" -+#endif -+ -+#include <osl/diagnose.h> -+#include <algorithm> -+#include <tools/solar.h> -+ -+namespace svx { -+ -+// ============================================================================ -+ -+namespace { -+ -+/** Rotates rnValue left by nBits bits. */ -+template< typename Type > -+inline void lclRotateLeft( Type& rnValue, sal_uInt8 nBits ) -+{ -+ OSL_ASSERT( nBits < sizeof( Type ) * 8 ); -+ rnValue = static_cast< Type >( (rnValue << nBits) | (rnValue >> (sizeof( Type ) * 8 - nBits)) ); -+} -+ -+/** Rotates the lower nWidth bits of rnValue left by nBits bits. */ -+template< typename Type > -+inline void lclRotateLeft( Type& rnValue, sal_uInt8 nBits, sal_uInt8 nWidth ) -+{ -+ OSL_ASSERT( (nBits < nWidth) && (nWidth < sizeof( Type ) * 8) ); -+ Type nMask = static_cast< Type >( (1UL << nWidth) - 1 ); -+ rnValue = static_cast< Type >( -+ ((rnValue << nBits) | ((rnValue & nMask) >> (nWidth - nBits))) & nMask ); -+} -+ -+sal_Size lclGetLen( const sal_uInt8* pnPassData, sal_Size nBufferSize ) -+{ -+ sal_Size nLen = 0; -+ while( (nLen < nBufferSize) && pnPassData[ nLen ] ) ++nLen; -+ return nLen; -+} -+ -+sal_uInt16 lclGetKey( const sal_uInt8* pnPassData, sal_Size nBufferSize ) -+{ -+ sal_Size nLen = lclGetLen( pnPassData, nBufferSize ); -+ if( !nLen ) return 0; -+ -+ sal_uInt16 nKey = 0; -+ sal_uInt16 nKeyBase = 0x8000; -+ sal_uInt16 nKeyEnd = 0xFFFF; -+ const sal_uInt8* pnChar = pnPassData + nLen - 1; -+ for( sal_Size nIndex = 0; nIndex < nLen; ++nIndex, --pnChar ) -+ { -+ sal_uInt8 cChar = *pnChar & 0x7F; -+ for( sal_uInt8 nBit = 0; nBit < 8; ++nBit ) -+ { -+ lclRotateLeft( nKeyBase, 1 ); -+ if( nKeyBase & 1 ) nKeyBase ^= 0x1020; -+ if( cChar & 1 ) nKey ^= nKeyBase; -+ cChar >>= 1; -+ lclRotateLeft( nKeyEnd, 1 ); -+ if( nKeyEnd & 1 ) nKeyEnd ^= 0x1020; -+ } -+ } -+ return nKey ^ nKeyEnd; -+} -+ -+sal_uInt16 lclGetHash( const sal_uInt8* pnPassData, sal_Size nBufferSize ) -+{ -+ sal_Size nLen = lclGetLen( pnPassData, nBufferSize ); -+ -+ sal_uInt16 nHash = static_cast< sal_uInt16 >( nLen ); -+ if( nLen ) -+ nHash ^= 0xCE4B; -+ -+ const sal_uInt8* pnChar = pnPassData; -+ for( sal_Size nIndex = 0; nIndex < nLen; ++nIndex, ++pnChar ) -+ { -+ sal_uInt16 cChar = *pnChar; -+ sal_uInt8 nRot = static_cast< sal_uInt8 >( (nIndex + 1) % 15 ); -+ lclRotateLeft( cChar, nRot, 15 ); -+ nHash ^= cChar; -+ } -+ return nHash; -+} -+ -+ -+} // namespace -+ -+// ============================================================================ -+ -+MSCodec_Xor95::MSCodec_Xor95(int nRotateDistance) : -+ mnOffset( 0 ), -+ mnKey( 0 ), -+ mnHash( 0 ), -+ mnRotateDistance( nRotateDistance ) -+{ -+ (void)memset( mpnKey, 0, sizeof( mpnKey ) ); -+} -+ -+MSCodec_Xor95::~MSCodec_Xor95() -+{ -+ (void)memset( mpnKey, 0, sizeof( mpnKey ) ); -+ mnKey = mnHash = 0; -+} -+ -+void MSCodec_Xor95::InitKey( const sal_uInt8 pnPassData[ 16 ] ) -+{ -+ mnKey = lclGetKey( pnPassData, 16 ); -+ mnHash = lclGetHash( pnPassData, 16 ); -+ -+ (void)memcpy( mpnKey, pnPassData, 16 ); -+ -+ static const sal_uInt8 spnFillChars[] = -+ { -+ 0xBB, 0xFF, 0xFF, 0xBA, -+ 0xFF, 0xFF, 0xB9, 0x80, -+ 0x00, 0xBE, 0x0F, 0x00, -+ 0xBF, 0x0F, 0x00 -+ }; -+ -+ sal_Size nIndex; -+ sal_Size nLen = lclGetLen( pnPassData, 16 ); -+ const sal_uInt8* pnFillChar = spnFillChars; -+ for( nIndex = nLen; nIndex < sizeof( mpnKey ); ++nIndex, ++pnFillChar ) -+ mpnKey[ nIndex ] = *pnFillChar; -+ -+ SVBT16 pnOrigKey; -+ ShortToSVBT16( mnKey, pnOrigKey ); -+ sal_uInt8* pnKeyChar = mpnKey; -+ for( nIndex = 0; nIndex < sizeof( mpnKey ); ++nIndex, ++pnKeyChar ) -+ { -+ *pnKeyChar ^= pnOrigKey[ nIndex & 0x01 ]; -+ lclRotateLeft( *pnKeyChar, mnRotateDistance ); -+ } -+} -+ -+bool MSCodec_Xor95::VerifyKey( sal_uInt16 nKey, sal_uInt16 nHash ) const -+{ -+ return (nKey == mnKey) && (nHash == mnHash); -+} -+ -+void MSCodec_Xor95::InitCipher() -+{ -+ mnOffset = 0; -+} -+ -+void MSCodec_XorXLS95::Decode( sal_uInt8* pnData, sal_Size nBytes ) -+{ -+ const sal_uInt8* pnCurrKey = mpnKey + mnOffset; -+ const sal_uInt8* pnKeyLast = mpnKey + 0x0F; -+ -+ for( const sal_uInt8* pnDataEnd = pnData + nBytes; pnData < pnDataEnd; ++pnData ) -+ { -+ lclRotateLeft( *pnData, 3 ); -+ *pnData ^= *pnCurrKey; -+ if( pnCurrKey < pnKeyLast ) ++pnCurrKey; else pnCurrKey = mpnKey; -+ } -+ -+ // update mnOffset -+ Skip( nBytes ); -+} -+ -+void MSCodec_XorWord95::Decode( sal_uInt8* pnData, sal_Size nBytes ) -+{ -+ const sal_uInt8* pnCurrKey = mpnKey + mnOffset; -+ const sal_uInt8* pnKeyLast = mpnKey + 0x0F; -+ -+ for( const sal_uInt8* pnDataEnd = pnData + nBytes; pnData < pnDataEnd; ++pnData ) -+ { -+ const sal_uInt8 cChar = *pnData ^ *pnCurrKey; -+ if (*pnData && cChar) -+ *pnData = cChar; -+ if( pnCurrKey < pnKeyLast ) ++pnCurrKey; else pnCurrKey = mpnKey; -+ } -+ -+ // update mnOffset -+ Skip( nBytes ); -+} -+ -+ -+void MSCodec_Xor95::Skip( sal_Size nBytes ) -+{ -+ mnOffset = (mnOffset + nBytes) & 0x0F; -+} -+ -+sal_uInt16 MSCodec_Xor95::GetHash( const sal_uInt8* pnPassData, sal_Size nSize ) -+{ -+ return lclGetHash( pnPassData, nSize ); -+} -+ -+// ============================================================================ -+ -+MSCodec_Std97::MSCodec_Std97 () -+{ -+ m_hCipher = rtl_cipher_create ( -+ rtl_Cipher_AlgorithmARCFOUR, rtl_Cipher_ModeStream); -+ OSL_ASSERT(m_hCipher != 0); -+ -+ m_hDigest = rtl_digest_create ( -+ rtl_Digest_AlgorithmMD5); -+ OSL_ASSERT(m_hDigest != 0); -+ -+ (void)memset (m_pDigestValue, 0, sizeof(m_pDigestValue)); -+} -+ -+MSCodec_Std97::~MSCodec_Std97 () -+{ -+ (void)memset (m_pDigestValue, 0, sizeof(m_pDigestValue)); -+ rtl_digest_destroy (m_hDigest); -+ rtl_cipher_destroy (m_hCipher); -+} -+ -+void MSCodec_Std97::InitKey ( -+ const sal_uInt16 pPassData[16], -+ const sal_uInt8 pUnique[16]) -+{ -+ sal_uInt8 pKeyData[64]; -+ int i, n; -+ -+ // Fill PassData into KeyData. -+ (void)memset (pKeyData, 0, sizeof(pKeyData)); -+ for (i = 0, n = 16; (i < n) && pPassData[i]; i++) -+ { -+ pKeyData[2*i ] = ((pPassData[i] >> 0) & 0xff); -+ pKeyData[2*i + 1] = ((pPassData[i] >> 8) & 0xff); -+ } -+ pKeyData[2*i] = 0x80; -+ pKeyData[ 56] = i << 4; -+ -+ // Fill raw digest of KeyData into KeyData. -+ (void)rtl_digest_updateMD5 ( -+ m_hDigest, pKeyData, sizeof(pKeyData)); -+ (void)rtl_digest_rawMD5 ( -+ m_hDigest, pKeyData, RTL_DIGEST_LENGTH_MD5); -+ -+ // Update digest with KeyData and Unique. -+ for (i = 0; i < 16; i++) -+ { -+ rtl_digest_updateMD5 (m_hDigest, pKeyData, 5); -+ rtl_digest_updateMD5 (m_hDigest, pUnique, 16); -+ } -+ -+ // Update digest with padding. -+ pKeyData[16] = 0x80; -+ (void)memset (pKeyData + 17, 0, sizeof(pKeyData) - 17); -+ pKeyData[56] = 0x80; -+ pKeyData[57] = 0x0a; -+ -+ rtl_digest_updateMD5 ( -+ m_hDigest, &(pKeyData[16]), sizeof(pKeyData) - 16); -+ -+ // Fill raw digest of above updates into DigestValue. -+ rtl_digest_rawMD5 ( -+ m_hDigest, m_pDigestValue, sizeof(m_pDigestValue)); -+ -+ // Erase KeyData array and leave. -+ (void)memset (pKeyData, 0, sizeof(pKeyData)); -+} -+ -+bool MSCodec_Std97::VerifyKey ( -+ const sal_uInt8 pSaltData[16], -+ const sal_uInt8 pSaltDigest[16]) -+{ -+ bool result = false; -+ -+ if (InitCipher(0)) -+ { -+ sal_uInt8 pDigest[RTL_DIGEST_LENGTH_MD5]; -+ sal_uInt8 pBuffer[64]; -+ -+ // Decode SaltData into Buffer. -+ rtl_cipher_decode ( -+ m_hCipher, pSaltData, 16, pBuffer, sizeof(pBuffer)); -+ -+ pBuffer[16] = 0x80; -+ (void)memset (pBuffer + 17, 0, sizeof(pBuffer) - 17); -+ pBuffer[56] = 0x80; -+ -+ // Fill raw digest of Buffer into Digest. -+ rtl_digest_updateMD5 ( -+ m_hDigest, pBuffer, sizeof(pBuffer)); -+ rtl_digest_rawMD5 ( -+ m_hDigest, pDigest, sizeof(pDigest)); -+ -+ // Decode original SaltDigest into Buffer. -+ rtl_cipher_decode ( -+ m_hCipher, pSaltDigest, 16, pBuffer, sizeof(pBuffer)); -+ -+ // Compare Buffer with computed Digest. -+ result = (memcmp (pBuffer, pDigest, sizeof(pDigest)) == 0); -+ -+ // Erase Buffer and Digest arrays. -+ (void)memset (pBuffer, 0, sizeof(pBuffer)); -+ (void)memset (pDigest, 0, sizeof(pDigest)); -+ } -+ -+ return (result); -+} -+ -+bool MSCodec_Std97::InitCipher (sal_uInt32 nCounter) -+{ -+ rtlCipherError result; -+ sal_uInt8 pKeyData[64]; -+ -+ // Initialize KeyData array. -+ (void)memset (pKeyData, 0, sizeof(pKeyData)); -+ -+ // Fill 40 bit of DigestValue into [0..4]. -+ (void)memcpy (pKeyData, m_pDigestValue, 5); -+ -+ // Fill counter into [5..8]. -+ pKeyData[ 5] = sal_uInt8((nCounter >> 0) & 0xff); -+ pKeyData[ 6] = sal_uInt8((nCounter >> 8) & 0xff); -+ pKeyData[ 7] = sal_uInt8((nCounter >> 16) & 0xff); -+ pKeyData[ 8] = sal_uInt8((nCounter >> 24) & 0xff); -+ -+ pKeyData[ 9] = 0x80; -+ pKeyData[56] = 0x48; -+ -+ // Fill raw digest of KeyData into KeyData. -+ (void)rtl_digest_updateMD5 ( -+ m_hDigest, pKeyData, sizeof(pKeyData)); -+ (void)rtl_digest_rawMD5 ( -+ m_hDigest, pKeyData, RTL_DIGEST_LENGTH_MD5); -+ -+ // Initialize Cipher with KeyData (for decoding). -+ result = rtl_cipher_init ( -+ m_hCipher, rtl_Cipher_DirectionDecode, -+ pKeyData, RTL_DIGEST_LENGTH_MD5, 0, 0); -+ -+ // Erase KeyData array and leave. -+ (void)memset (pKeyData, 0, sizeof(pKeyData)); -+ -+ return (result == rtl_Cipher_E_None); -+} -+ -+bool MSCodec_Std97::Decode ( -+ const void *pData, sal_Size nDatLen, -+ sal_uInt8 *pBuffer, sal_Size nBufLen) -+{ -+ rtlCipherError result; -+ -+ result = rtl_cipher_decode ( -+ m_hCipher, pData, nDatLen, pBuffer, nBufLen); -+ -+ return (result == rtl_Cipher_E_None); -+} -+ -+bool MSCodec_Std97::Skip( sal_Size nDatLen ) -+{ -+ sal_uInt8 pnDummy[ 1024 ]; -+ sal_Size nDatLeft = nDatLen; -+ bool bResult = true; -+ -+ while (bResult && nDatLeft) -+ { -+ sal_Size nBlockLen = ::std::min< sal_Size >( nDatLeft, sizeof(pnDummy) ); -+ bResult = Decode( pnDummy, nBlockLen, pnDummy, nBlockLen ); -+ nDatLeft -= nBlockLen; -+ } -+ -+ return bResult; -+} -+ -+// ============================================================================ -+ -+} // namespace svx -+ diff --git a/patches/mscodec/mscodec-svx.diff b/patches/mscodec/mscodec-svx.diff deleted file mode 100644 index d00378ab4..000000000 --- a/patches/mscodec/mscodec-svx.diff +++ /dev/null @@ -1,142 +0,0 @@ -Index: svx/inc/svxerr.hxx -=================================================================== -RCS file: /cvs/graphics/svx/inc/svxerr.hxx,v -retrieving revision 1.3 -retrieving revision 1.3.112.3 -diff -w -u -r1.3 -r1.3.112.3 ---- svx/inc/svxerr.hxx 3 Feb 2004 17:45:45 -0000 1.3 -+++ svx/inc/svxerr.hxx 16 Jul 2004 17:45:58 -0000 1.3.112.3 -@@ -101,6 +101,19 @@ - #define ERRCODE_SVX_VBASIC_STORAGE_EXIST (14UL | ERRCODE_AREA_SVX \ - | ERRCODE_WARNING_MASK \ - | ERRCODE_CLASS_WRITE ) -+ -+/** Error message: "Wrong password." */ -+#define ERRCODE_SVX_WRONGPASS (15UL | ERRCODE_AREA_SVX | ERRCODE_CLASS_NONE) -+ -+/** Error message: "Read error. Unsupported encryption method." */ -+#define ERRCODE_SVX_READ_FILTER_CRYPT (16UL | ERRCODE_AREA_SVX | ERRCODE_CLASS_READ) -+ -+/** Error message: "Read error. Passwort encrypted Powerpoint documents..." */ -+#define ERRCODE_SVX_READ_FILTER_PPOINT (17UL | ERRCODE_AREA_SVX | ERRCODE_CLASS_READ) -+ -+/** Error message: "Warning. Passwort protection is not suppported when ..." */ -+#define ERRCODE_SVX_EXPORT_FILTER_CRYPT (18UL | ERRCODE_AREA_SVX | ERRCODE_CLASS_EXPORT) -+ - - // both codes will be used twice : with ERRCODE_CLASS_READ- and ERRCODE_CLASS_WRITE-bits - #define ERRCTX_SVX_LINGU_THESAURUS 1 - - -Index: svx/prj/d.lst -=================================================================== -RCS file: /cvs/graphics/svx/prj/d.lst,v -retrieving revision 1.89 -retrieving revision 1.81.28.2 -diff -w -u -r1.89 -r1.81.28.2 ---- svx/prj/d.lst 28 Jun 2004 14:03:17 -0000 1.89 -+++ svx/prj/d.lst 13 Jul 2004 19:12:51 -0000 1.81.28.2 -@@ -543,6 +543,7 @@ - hedabu: ..\inc\unoforou.hxx %_DEST%\inc%_EXT%\svx\unoforou.hxx - hedabu: ..\inc\e3dundo.hxx %_DEST%\inc%_EXT%\svx\e3dundo.hxx - hedabu: ..\inc\anchorid.hxx %_DEST%\inc%_EXT%\svx\anchorid.hxx -+hedabu: ..\inc\mscodec.hxx %_DEST%\inc%_EXT%\svx\mscodec.hxx - hedabu: ..\inc\msdffimp.hxx %_DEST%\inc%_EXT%\svx\msdffimp.hxx - hedabu: ..\inc\msdffdef.hxx %_DEST%\inc%_EXT%\svx\msdffdef.hxx - hedabu: ..\inc\msfiltertracer.hxx %_DEST%\inc%_EXT%\svx\msfiltertracer.hxx - -Index: svx/source/items/svxerr.src -=================================================================== -RCS file: /cvs/graphics/svx/source/items/svxerr.src,v -retrieving revision 1.47 -retrieving revision 1.46.152.5 -diff -w -u -r1.47 -r1.46.152.5 ---- svx/source/items/svxerr.src 25 Jun 2004 12:13:12 -0000 1.47 -+++ svx/source/items/svxerr.src 16 Jul 2004 17:46:33 -0000 1.46.152.5 -@@ -216,47 +216,30 @@ - TEXT[ zulu ] = "Ikhodi ye-VBA Basiz equkethwe oshicilelweni angeke igcinwe."; - TEXT[ norwegian_nynorsk ] = "Den opphavlege VBA Basic-koden som fanst i dokumentet blir ikkje lagra."; - }; --}; -- // ********************************************************************** EOF -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- - -+ String ERRCODE_SVX_WRONGPASS & ERRCODE_RES_MASK -+ { -+ TEXT = "Das Kennwort ist ungültig. Das Dokument kann nicht geöffnet werden."; -+ TEXT [ english_us ] = "The password is incorrect. The document cannot be opened."; -+ }; - -+ String ERRCODE_SVX_READ_FILTER_CRYPT & ERRCODE_RES_MASK -+ { -+ TEXT = "Die Verschlüsselungsmethode des aktuellen Dokumentes wird nicht unterstützt. Nur die Microsoft Office 97/2000 kompatible Kennwortverschlüsselung wird unterstützt."; -+ TEXT [ english_us ] = "The encryption method of this document is not supported. Only the Microsoft Office 97/2000 compatible password encryption is supported."; -+ }; - -+ String ERRCODE_SVX_READ_FILTER_PPOINT & ERRCODE_RES_MASK -+ { -+ TEXT = "Das Laden von kennwortgeschützten PowerPoint Dokumenten wird nicht unterstützt."; -+ TEXT [ english_us ] = "The loading of password-encrypted PowerPoint documents is not supported."; -+ }; - -+ String ERRCODE_SVX_EXPORT_FILTER_CRYPT & ERRCODE_RES_MASK -+ { -+ TEXT = "Der Kennwortschutz wird beim Speichern von Dokumementen im Microsoft Office Format nicht unterstützt.\nMöchten Sie Dokument ohne Kennwortschtz speichern"; -+ TEXT [ english_us ] = "Password protection is not supported when documents are saved in Microsoft Office format.\nDo you want to save the document without password protection"; -+ }; -+}; -+ // ********************************************************************** EOF - - -Index: svx/source/msfilter/makefile.mk -=================================================================== -RCS file: /cvs/graphics/svx/source/msfilter/makefile.mk,v -retrieving revision 1.11 -retrieving revision 1.11.484.1 -diff -w -u -r1.11 -r1.11.484.1 ---- svx/source/msfilter/makefile.mk 24 Apr 2003 13:26:39 -0000 1.11 -+++ svx/source/msfilter/makefile.mk 17 Mar 2004 16:39:32 -0000 1.11.484.1 -@@ -83,6 +83,7 @@ - $(SLO)$/svxmsbas.obj \ - $(SLO)$/msocximex.obj \ - $(SLO)$/msashape3d.obj \ -+ $(SLO)$/mscodec.obj \ - $(SLO)$/msfiltertracer.obj - - EXCEPTIONSFILES= \ diff --git a/patches/mscodec/mscodec-sw.diff b/patches/mscodec/mscodec-sw.diff deleted file mode 100644 index 0efaab1bc..000000000 --- a/patches/mscodec/mscodec-sw.diff +++ /dev/null @@ -1,588 +0,0 @@ ---- sw/source/filter/ww8/ww8par.hxx 2004-07-21 19:26:51.000000000 +0100 -+++ sw/source/filter/ww8/ww8par.hxx 2004-09-02 13:24:39.507825616 +0100 -@@ -1173,8 +1173,10 @@ - //This converts MS Asian Typography information into OOo's - void ImportDopTypography(const WW8DopTypography &rTypo); - -- ULONG LoadDoc1( SwPaM& rPaM ,WW8Glossary *pGloss); -+ ULONG LoadThroughDecryption(SwPaM& rPaM ,WW8Glossary *pGloss); -+ ULONG SetSubStreams(SvStorageStreamRef &rTableStream, SvStorageStreamRef &rDataStream); -+ ULONG CoreLoad(WW8Glossary *pGloss, const SwPosition &rPos); - - bool StartTable(WW8_CP nStartCp); - bool InEqualApo(int nLvl) const; - ---- sw/source/filter/ww8/ww8scan.hxx 2004-07-21 19:26:52.000000000 +0100 -+++ sw/source/filter/ww8/ww8scan.hxx 2004-09-02 13:26:15.593218416 +0100 -@@ -1052,8 +1052,8 @@ - - - UINT16 nFibBack; // 0xc -- INT16 lKey1; // 0xe file encrypted key, only valid if fEncrypted. -- INT16 lKey2; // 0x10 key in 2 Portionen wg. Misalignment -+ UINT16 nHash; // 0xe file encrypted hash -+ UINT16 nKey; // 0x10 file encrypted key - UINT8 envr; // 0x12 environment in which file was created - // 0 created by Win Word / 1 created by Mac Word - BYTE fMac :1; // 0x13 when 1, this file was last saved in the Mac environment - ---- sw/source/filter/ww8/ww8scan.cxx 2004-07-21 19:26:52.000000000 +0100 -+++ sw/source/filter/ww8/ww8scan.cxx 2004-09-02 13:28:42.632864992 +0100 -@@ -4952,8 +4952,8 @@ - rSt >> aBits1; - rSt >> aBits2; - rSt >> nFibBack; -- rSt >> lKey1; -- rSt >> lKey2; -+ rSt >> nHash; -+ rSt >> nKey; - rSt >> envr; - rSt >> aVer8Bits1; // unter Ver67 nur leeres Reservefeld - // Inhalt von aVer8Bits1 -@@ -5319,8 +5319,8 @@ - Set_UInt16( pData, nBits16 ); - - Set_UInt16( pData, nFibBack ); -- Set_UInt16( pData, lKey1 ); -- Set_UInt16( pData, lKey2 ); -+ Set_UInt16( pData, nHash ); -+ Set_UInt16( pData, nKey ); - Set_UInt8( pData, envr ); - - BYTE nBits8 = 0; - ---- sw/source/filter/ww8/ww8par.cxx 2004-09-02 12:52:46.598632016 +0100 -+++ sw/source/filter/ww8/ww8par.cxx 2004-09-02 13:40:17.986155224 +0100 -@@ -75,13 +75,28 @@ - #include <rtl/tencinfo.h> - #endif - --#ifndef _SVSTOR_HXX //autogen -+#ifndef _SVSTOR_HXX - #include <so3/svstor.hxx> - #endif - --#ifndef _SFXDOCINF_HXX //autogen -+#ifndef _SFXDOCINF_HXX - #include <sfx2/docinf.hxx> - #endif -+#ifndef _SFXDOCFILE_HXX -+#include <sfx2/docfile.hxx> -+#endif -+ -+#ifndef _URLOBJ_HXX -+#include <tools/urlobj.hxx> -+#endif -+#ifndef _UNOTOOLS_TEMPFILE_HXX -+#include <unotools/tempfile.hxx> -+#endif -+#ifndef _SFXECODE_HXX -+#include <svtools/sfxecode.hxx> -+#endif -+ -+#include <svtools/docpasswdrequest.hxx> - - #ifndef _OFA_FLTRCFG_HXX - #include <offmgr/fltrcfg.hxx> -@@ -127,6 +142,12 @@ - #ifndef _MSDFFIMP_HXX - #include <svx/msdffimp.hxx> - #endif -+#ifndef _SVXERR_HXX -+#include <svx/svxerr.hxx> -+#endif -+#ifndef SVX_MSCODEC_HXX -+#include <svx/mscodec.hxx> -+#endif - - #ifndef _FMTFLD_HXX - #include <fmtfld.hxx> -@@ -234,6 +255,12 @@ - #ifndef _COM_SUN_STAR_I18N_FORBIDDENCHARACTERS_HPP_ - #include <com/sun/star/i18n/ForbiddenCharacters.hpp> - #endif -+#ifndef _COM_SUN_STAR_TASK_XINTERACTIONHANDLER_HPP_ -+#include <com/sun/star/task/XInteractionHandler.hpp> -+#endif -+#ifndef _COM_SUN_STAR_TASK_XINTERACTIONREQUEST_HPP_ -+#include <com/sun/star/task/XInteractionRequest.hpp> -+#endif - #ifndef _COMPHELPER_EXTRACT_HXX_ - #include <comphelper/extract.hxx> - #endif -@@ -2758,14 +2785,14 @@ - } - } - --ULONG SwWW8ImplReader::LoadDoc1( SwPaM& rPaM ,WW8Glossary *pGloss) -+ULONG SwWW8ImplReader::CoreLoad(WW8Glossary *pGloss, const SwPosition &rPos) - { - ULONG nErrRet = 0; - - if (mbNewDoc && pStg && !pGloss) - ReadDocInfo(); - -- pPaM = new SwPaM( *rPaM.GetPoint() ); -+ pPaM = new SwPaM( rPos ); - - pCtrlStck = new SwWW8FltControlStack( &rDoc, nFieldFlags, *this ); - -@@ -2786,33 +2813,6 @@ - - USHORT eMode = REDLINE_SHOW_INSERT; - -- // enum-para mitgeben, welche Versions-Nummern erlaubt sind: ww6, ww8, ... -- -- if (pGloss) -- pWwFib = pGloss->GetFib(); -- else -- pWwFib = new WW8Fib( *pStrm, nWantedVersion ); // Fib einlesen -- -- if ( pWwFib->nFibError ) -- { // ERR_NO_WW8_FILE -- nErrRet = ERR_SWG_READ_ERROR; // oder ERR_SW6_READ_ERROR -- } -- else if( pWwFib->fEncrypted ) -- { -- nErrRet = ERR_SW6_PASSWD; // gecryptet geht nicht -- -- -- -- // Annotation: Crypted files C O U L D be imported if we used the methods -- // provided by Caolan Mc Nammara. -- // Written permission (my e-mail) was given by him -- // but no special document has been signed... -- // 27. Sept. 1999, K.-H. Zimmer -- -- -- } -- else -- { - mpSprmParser = new wwSprmParser(pWwFib->nVersion); - - // praktische Hilfsvariablen besetzen: -@@ -2823,66 +2823,6 @@ - bVer7 = (7 == pWwFib->nVersion); - bVer8 = (8 == pWwFib->nVersion); - -- SvStorageStreamRef xTableStream, xDataStream; -- -- // Nachdem wir nun den FIB eingelesen haben, wissen wir ja, -- // welcher Table-Stream gueltig ist. -- // Diesen oeffnen wir nun. -- -- // 6 stands for "6 OR 7", 7 stand for "ONLY 7" -- switch( pWwFib->nVersion ) -- { -- case 6: -- case 7: pTableStream = pStrm; -- pDataStream = pStrm; -- break; -- -- case 8: -- { -- if( !pStg ) -- { -- ASSERT( pStg, "Version 8 muss immer einen Storage haben!" ); -- nErrRet = ERR_SWG_READ_ERROR; -- break; -- } -- -- xTableStream = pStg->OpenStream( String::CreateFromAscii( -- pWwFib->fWhichTblStm ? SL::a1Table : SL::a0Table), -- STREAM_STD_READ ); -- -- pTableStream = &xTableStream; -- pTableStream->SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN ); -- -- xDataStream = pStg->OpenStream(CREATE_CONST_ASC(SL::aData), -- STREAM_STD_READ | STREAM_NOCREATE ); -- -- if( xDataStream.Is() && SVSTREAM_OK == xDataStream->GetError() ) -- { -- pDataStream = &xDataStream; -- pDataStream->SetNumberFormatInt(NUMBERFORMAT_INT_LITTLEENDIAN); -- } -- else -- pDataStream = pStrm; -- -- if( pWwFib->lcbPlcfspaHdr || pWwFib->lcbPlcfspaMom ) -- { -- pMSDffManager = new SwMSDffManager( *this ); -- //#79055# Now the dff manager always needs a controls -- //converter as well, but a control converter may still exist -- //without a dffmanager. cmc -- pFormImpl = new SwMSConvertControls(mpDocShell, pPaM); -- } -- } -- break; -- default: -- // Programm-Fehler! -- ASSERT( !this, "Es wurde vergessen, nVersion zu kodieren!" ); -- nErrRet = ERR_SWG_READ_ERROR; -- break; -- } -- -- if( ERR_SWG_READ_ERROR != nErrRet ) -- { - eTextCharSet = WW8Fib::GetFIBCharset(pWwFib->chse); - eStructCharSet = WW8Fib::GetFIBCharset(pWwFib->chseTables); - -@@ -3018,7 +2958,7 @@ - // loop for each glossary entry and add dummy section node - if (pGloss) - { -- WW8PLCF aPlc(&xTableStream,pWwFib->fcPlcfglsy, -+ WW8PLCF aPlc(pTableStream, pWwFib->fcPlcfglsy, - pWwFib->lcbPlcfglsy,0 ); - - WW8_CP nStart, nEnd; -@@ -3160,13 +3100,10 @@ - DELETEZ( pTabNode ); - delete mpSprmParser; - ::EndProgress( mpDocShell ); -- } -+ - pDataStream = 0; - pTableStream = 0; -- } - -- if (!pGloss) -- DELETEZ(pWwFib); - DeleteCtrlStk(); - mpRedlineStack->closeall(*pPaM->GetPoint()); - delete mpRedlineStack; -@@ -3203,6 +3449,314 @@ - } - }; - -+ULONG SwWW8ImplReader::SetSubStreams(SvStorageStreamRef &rTableStream, -+ SvStorageStreamRef &rDataStream) -+{ -+ ULONG nErrRet = 0; -+ // 6 stands for "6 OR 7", 7 stand for "ONLY 7" -+ switch (pWwFib->nVersion) -+ { -+ case 6: -+ case 7: -+ pTableStream = pStrm; -+ pDataStream = pStrm; -+ break; -+ case 8: -+ if(!pStg) -+ { -+ ASSERT( pStg, "Version 8 muss immer einen Storage haben!" ); -+ nErrRet = ERR_SWG_READ_ERROR; -+ break; -+ } -+ -+ rTableStream = pStg->OpenStream(String::CreateFromAscii( -+ pWwFib->fWhichTblStm ? SL::a1Table : SL::a0Table), -+ STREAM_STD_READ); -+ -+ pTableStream = &rTableStream; -+ pTableStream->SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN ); -+ -+ rDataStream = pStg->OpenStream(CREATE_CONST_ASC(SL::aData), -+ STREAM_STD_READ | STREAM_NOCREATE ); -+ -+ if (rDataStream.Is() && SVSTREAM_OK == rDataStream->GetError()) -+ { -+ pDataStream = &rDataStream; -+ pDataStream->SetNumberFormatInt(NUMBERFORMAT_INT_LITTLEENDIAN); -+ } -+ else -+ pDataStream = pStrm; -+ break; -+ default: -+ // Programm-Fehler! -+ ASSERT( !this, "Es wurde vergessen, nVersion zu kodieren!" ); -+ nErrRet = ERR_SWG_READ_ERROR; -+ break; -+ } -+ return nErrRet; -+} -+ -+namespace -+{ -+ utl::TempFile *MakeTemp(SvFileStream &rSt) -+ { -+ utl::TempFile *pT = new utl::TempFile; -+ pT->EnableKillingFile(); -+ rSt.Open(pT->GetFileName(), STREAM_READWRITE | STREAM_SHARE_DENYWRITE); -+ return pT; -+ } -+ -+#define WW_BLOCKSIZE 0x200 -+ -+ void DecryptRC4(svx::MSCodec_Std97& rCtx, SvStream &rIn, SvStream &rOut) -+ { -+ rIn.Seek(STREAM_SEEK_TO_END); -+ ULONG nLen = rIn.Tell(); -+ rIn.Seek(0); -+ -+ sal_uInt8 in[WW_BLOCKSIZE]; -+ for (ULONG nI = 0, nBlock = 0; nI < nLen; nI += WW_BLOCKSIZE, ++nBlock) -+ { -+ ULONG nBS = (nLen - nI > WW_BLOCKSIZE) ? WW_BLOCKSIZE : nLen - nI; -+ rIn.Read(in, nBS); -+ rCtx.InitCipher(nBlock); -+ rCtx.Decode(in, nBS, in, nBS); -+ rOut.Write(in, nBS); -+ } -+ } -+ -+ void DecryptXOR(svx::MSCodec_XorWord95 &rCtx, SvStream &rIn, SvStream &rOut) -+ { -+ ULONG nSt = rIn.Tell(); -+ rIn.Seek(STREAM_SEEK_TO_END); -+ ULONG nLen = rIn.Tell(); -+ rIn.Seek(nSt); -+ -+ rCtx.InitCipher(); -+ rCtx.Skip(nSt); -+ -+ sal_uInt8 in[0x4096]; -+ for (ULONG nI = nSt; nI < nLen; nI += 0x4096) -+ { -+ ULONG nBS = (nLen - nI > 0x4096 ) ? 0x4096 : nLen - nI; -+ rIn.Read(in, nBS); -+ rCtx.Decode(in, nBS); -+ rOut.Write(in, nBS); -+ } -+ } -+ -+ //moan, copy and paste :-( -+ String QueryPasswordForMedium(SfxMedium& rMedium) -+ { -+ String aPassw; -+ -+ using namespace com::sun::star; -+ try -+ { -+ uno::Reference< task::XInteractionHandler > xHandler( rMedium.GetInteractionHandler() ); -+ if( xHandler.is() ) -+ { -+ RequestDocumentPassword* pRequest = new RequestDocumentPassword( -+ task::PasswordRequestMode_PASSWORD_ENTER, -+ INetURLObject( rMedium.GetOrigURL() ).GetName( INetURLObject::DECODE_WITH_CHARSET ) ); -+ uno::Reference< task::XInteractionRequest > xRequest( pRequest ); -+ -+ xHandler->handle( xRequest ); -+ -+ if( pRequest->isPassword() ) -+ aPassw = pRequest->getPassword(); -+ } -+ } -+ catch( uno::Exception& ) -+ { -+ } -+ -+ return aPassw; -+ } -+ -+} -+ -+ULONG SwWW8ImplReader::LoadThroughDecryption(SwPaM& rPaM ,WW8Glossary *pGloss) -+{ -+ ULONG nErrRet = 0; -+ if (pGloss) -+ pWwFib = pGloss->GetFib(); -+ else -+ pWwFib = new WW8Fib(*pStrm, nWantedVersion); -+ -+ if (pWwFib->nFibError) -+ nErrRet = ERR_SWG_READ_ERROR; -+ -+ SvStorageStreamRef xTableStream, xDataStream; -+ -+ if (!nErrRet) -+ nErrRet = SetSubStreams(xTableStream, xDataStream); -+ -+ utl::TempFile *pTempMain = 0; -+ utl::TempFile *pTempTable = 0; -+ utl::TempFile *pTempData = 0; -+ SvFileStream aDecryptMain; -+ SvFileStream aDecryptTable; -+ SvFileStream aDecryptData; -+ -+ bool bDecrypt = false; -+ enum {RC4, XOR, Other} eAlgo = Other; -+ if (pWwFib->fEncrypted && !nErrRet) -+ { -+ if (!pGloss) -+ { -+ bDecrypt = true; -+ if (8 != pWwFib->nVersion) -+ eAlgo = XOR; -+ else -+ { -+ if (pWwFib->nKey != 0) -+ eAlgo = XOR; -+ else -+ { -+ pTableStream->Seek(0); -+ sal_uInt32 nEncType; -+ *pTableStream >> nEncType; -+ if (nEncType == 0x10001) -+ eAlgo = RC4; -+ } -+ } -+ } -+ } -+ -+ if (bDecrypt) -+ { -+ nErrRet = ERRCODE_SVX_WRONGPASS; -+ switch (eAlgo) -+ { -+ default: -+ nErrRet = ERRCODE_SVX_READ_FILTER_CRYPT; -+ break; -+ case XOR: -+ { -+ String sUniPassword = -+ QueryPasswordForMedium(*(mpDocShell->GetMedium())); -+ -+ ByteString sPassword(sUniPassword, -+ WW8Fib::GetFIBCharset(pWwFib->chseTables)); -+ -+ xub_StrLen nLen = sPassword.Len(); -+ // DR: do not cut a wrong (too long) password -+ if( nLen <= 15 ) -+ { -+ sal_uInt8 aPassword[16] = {0}; -+ -+ for (xub_StrLen nChar = 0; nChar < sPassword.Len(); ++nChar ) -+ aPassword[nChar] = sPassword.GetChar(nChar); -+ -+ svx::MSCodec_XorWord95 aCtx; -+ aCtx.InitKey(aPassword); -+ if (aCtx.VerifyKey(pWwFib->nKey, pWwFib->nHash)) -+ { -+ nErrRet = 0; -+ pTempMain = MakeTemp(aDecryptMain); -+ -+ pStrm->Seek(0); -+ size_t nUnencryptedHdr = -+ (8 == pWwFib->nVersion) ? 0x44 : 0x34; -+ sal_uInt8 *pIn = new sal_uInt8[nUnencryptedHdr]; -+ pStrm->Read(pIn, nUnencryptedHdr); -+ aDecryptMain.Write(pIn, nUnencryptedHdr); -+ delete pIn; -+ -+ DecryptXOR(aCtx, *pStrm, aDecryptMain); -+ -+ if (!pTableStream || pTableStream == pStrm) -+ pTableStream = &aDecryptMain; -+ else -+ { -+ pTempTable = MakeTemp(aDecryptTable); -+ DecryptXOR(aCtx, *pTableStream, aDecryptTable); -+ pTableStream = &aDecryptTable; -+ } -+ -+ if (!pDataStream || pDataStream == pStrm) -+ pDataStream = &aDecryptMain; -+ else -+ { -+ pTempData = MakeTemp(aDecryptData); -+ DecryptXOR(aCtx, *pDataStream, aDecryptData); -+ pDataStream = &aDecryptData; -+ } -+ } -+ } -+ } -+ break; -+ case RC4: -+ { -+ String sUniPassword = -+ QueryPasswordForMedium(*(mpDocShell->GetMedium())); -+ -+ xub_StrLen nLen = sUniPassword.Len(); -+ // DR: do not cut a wrong (too long) password -+ if (nLen <= 15) -+ { -+ sal_Unicode aPassword[16] = {0}; -+ for (xub_StrLen nChar = 0; nChar < nLen; ++nChar ) -+ aPassword[nChar] = sUniPassword.GetChar(nChar); -+ -+ sal_uInt8 aDocId[ 16 ]; -+ pTableStream->Read(aDocId, 16); -+ sal_uInt8 aSaltData[ 16 ]; -+ pTableStream->Read(aSaltData, 16); -+ sal_uInt8 aSaltHash[ 16 ]; -+ pTableStream->Read(aSaltHash, 16); -+ -+ svx::MSCodec_Std97 aCtx; -+ aCtx.InitKey(aPassword, aDocId); -+ if (aCtx.VerifyKey(aSaltData, aSaltHash)) -+ { -+ nErrRet = 0; -+ -+ pTempTable = MakeTemp(aDecryptTable); -+ DecryptRC4(aCtx, *pTableStream, aDecryptTable); -+ pTableStream = &aDecryptTable; -+ -+ pTempMain = MakeTemp(aDecryptMain); -+ DecryptRC4(aCtx, *pStrm, aDecryptMain); -+ -+ if (!pDataStream || pDataStream == pStrm) -+ pDataStream = &aDecryptMain; -+ else -+ { -+ pTempData = MakeTemp(aDecryptData); -+ DecryptRC4(aCtx, *pDataStream, aDecryptData); -+ pDataStream = &aDecryptData; -+ } -+ } -+ } -+ } -+ break; -+ } -+ -+ if (nErrRet == 0) -+ { -+ pStrm = &aDecryptMain; -+ -+ delete pWwFib; -+ pWwFib = new WW8Fib(*pStrm, nWantedVersion); -+ if (pWwFib->nFibError) -+ nErrRet = ERR_SWG_READ_ERROR; -+ } -+ } -+ -+ if (!nErrRet) -+ nErrRet = CoreLoad(pGloss, *rPaM.GetPoint()); -+ -+ delete pTempMain; -+ delete pTempTable; -+ delete pTempData; -+ -+ if (!pGloss) -+ delete pWwFib; -+ return nErrRet; -+} -+ - class outlineeq : public std::unary_function<const SwTxtFmtColl*, bool> - { - private: -@@ -3414,9 +3968,6 @@ - { - ULONG nErrRet = 0; - -- pAktColl = 0; -- pAktItemSet = 0; -- - { - static const sal_Char* aNames[ 12 ] = { - "WinWord/WW", "WinWord/WW8", "WinWord/WWFT", -@@ -3497,7 +4048,7 @@ - } - - if (!nErrRet) -- nErrRet = LoadDoc1(rPaM ,pGloss); -+ nErrRet = LoadThroughDecryption(rPaM ,pGloss); - - return nErrRet; - } diff --git a/patches/mscodec/mscodec-uui.diff b/patches/mscodec/mscodec-uui.diff deleted file mode 100644 index 3ed5947c8..000000000 --- a/patches/mscodec/mscodec-uui.diff +++ /dev/null @@ -1,45 +0,0 @@ -Index: uui/source/iahndl.cxx -=================================================================== -RCS file: /cvs/ucb/uui/source/iahndl.cxx,v -retrieving revision 1.41 -retrieving revision 1.41.26.1 -diff -u -r1.41 -r1.41.26.1 ---- uui/source/iahndl.cxx 21 Apr 2004 12:01:16 -0000 1.41 -+++ uui/source/iahndl.cxx 17 Jul 2004 14:45:23 -0000 1.41.26.1 -@@ -2348,23 +2348,29 @@ - - rtl::OUString aMessage; - { -- enum Source { SOURCE_DEFAULT, SOURCE_CNT, SOURCE_UUI }; -- static char const * const aManager[3] -+ enum Source { SOURCE_DEFAULT, SOURCE_CNT, SOURCE_SVX, SOURCE_UUI }; -+ static char const * const aManager[4] - = { 0, - CREATEVERSIONRESMGR_NAME(cnt), -+ CREATEVERSIONRESMGR_NAME(svx), - CREATEVERSIONRESMGR_NAME(uui) }; -- static USHORT const aId[3] -+ static USHORT const aId[4] - = { RID_ERRHDL, - RID_CHAOS_START + 12, - // cf. chaos/source/inc/cntrids.hrc, where - // #define RID_CHAOS_ERRHDL (RID_CHAOS_START + 12) -+ RID_SVX_START + 350, // RID_SVXERRCODE - RID_UUI_ERRHDL }; -- Source eSource = nErrorCode >= ERRCODE_AREA_TOOLS -- && nErrorCode < ERRCODE_AREA_LIB1 ? -+ ErrCode nErrorId = nErrorCode & ~ERRCODE_WARNING_MASK; -+ Source eSource = nErrorId >= ERRCODE_AREA_TOOLS -+ && nErrorId < ERRCODE_AREA_LIB1 ? - SOURCE_DEFAULT : -- nErrorCode >= ERRCODE_AREA_CHAOS -- && nErrorCode < ERRCODE_AREA_CHAOS_END ? -+ nErrorId >= ERRCODE_AREA_CHAOS -+ && nErrorId < ERRCODE_AREA_CHAOS_END ? - SOURCE_CNT : -+ nErrorId >= ERRCODE_AREA_SVX -+ && nErrorId <= ERRCODE_AREA_SVX_END ? -+ SOURCE_SVX : - SOURCE_UUI; - - vos::OGuard aGuard(Application::GetSolarMutex()); diff --git a/patches/order b/patches/order index 28a3555e4..aa9bc29e9 100644 --- a/patches/order +++ b/patches/order @@ -1,2 +1,3 @@ OOO_1_1_1 1.1 -OOO_1_1_2 1.1 buildable +OOO_1_1_2 1.1 +OOO_1_1_3 1.1 buildable diff --git a/patches/vclplug/vcl-inc.diff b/patches/vclplug/vcl-inc.diff index 9abbee81a..9888e8296 100644 --- a/patches/vclplug/vcl-inc.diff +++ b/patches/vclplug/vcl-inc.diff @@ -1,9 +1,7 @@ Index: vcl/inc/abstdlg.hxx =================================================================== -RCS file: vcl/inc/abstdlg.hxx -diff -N vcl/inc/abstdlg.hxx ---- /dev/null 1 Jan 1970 00:00:00 -0000 -+++ vcl/inc/abstdlg.hxx 3 Feb 2004 17:13:21 -0000 1.3 +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ vcl/inc/abstdlg.hxx 2004-09-12 14:54:44.784065432 +0200 @@ -0,0 +1,101 @@ +/************************************************************************* + * @@ -108,12 +106,8 @@ diff -N vcl/inc/abstdlg.hxx + Index: vcl/inc/accel.hxx =================================================================== -RCS file: /cvs/gsl/vcl/inc/accel.hxx,v -retrieving revision 1.2 -retrieving revision 1.3 -diff -u -p -u -r1.2 -r1.3 ---- vcl/inc/accel.hxx 7 Dec 2000 13:37:15 -0000 1.2 -+++ vcl/inc/accel.hxx 6 Jan 2004 12:50:31 -0000 1.3 +--- vcl/inc/accel.hxx.orig 2004-09-12 14:26:21.659979648 +0200 ++++ vcl/inc/accel.hxx 2004-09-12 14:54:44.785065280 +0200 @@ -65,11 +65,11 @@ #ifndef _SV_SV_H #include <sv.h> @@ -166,13 +160,9 @@ diff -u -p -u -r1.2 -r1.3 virtual void Deactivate(); Index: vcl/inc/alpha.hxx =================================================================== -RCS file: /cvs/gsl/vcl/inc/alpha.hxx,v -retrieving revision 1.3 -retrieving revision 1.6 -diff -u -p -u -r1.3 -r1.6 ---- vcl/inc/alpha.hxx 12 Sep 2002 09:30:19 -0000 1.3 -+++ vcl/inc/alpha.hxx 21 May 2004 16:20:16 -0000 1.6 -@@ -70,15 +70,15 @@ +--- vcl/inc/alpha.hxx.orig 2004-09-12 14:26:21.659979648 +0200 ++++ vcl/inc/alpha.hxx 2004-09-12 14:54:44.786065128 +0200 +@@ -70,16 +70,16 @@ // - AlphaMask - // ------------- @@ -185,21 +175,18 @@ diff -u -p -u -r1.3 -r1.6 + friend SvStream& operator<<( SvStream&, const ImageList& ); private: -- + - long nDummy1; - long nDummy2; - +- const Bitmap& ImplGetBitmap() const; void ImplSetBitmap( const Bitmap& rBitmap ); + Index: vcl/inc/apptypes.hxx =================================================================== -RCS file: /cvs/gsl/vcl/inc/apptypes.hxx,v -retrieving revision 1.3 -retrieving revision 1.4 -diff -u -p -u -r1.3 -r1.4 ---- vcl/inc/apptypes.hxx 11 Jul 2001 08:32:52 -0000 1.3 -+++ vcl/inc/apptypes.hxx 6 Jan 2004 12:51:37 -0000 1.4 -@@ -62,12 +62,12 @@ +--- vcl/inc/apptypes.hxx.orig 2004-09-12 14:26:21.660979496 +0200 ++++ vcl/inc/apptypes.hxx 2004-09-12 14:54:44.786065128 +0200 +@@ -62,14 +62,14 @@ #ifndef _VCL_APPTYPES_HXX #define _VCL_APPTYPES_HXX @@ -209,21 +196,19 @@ diff -u -p -u -r1.3 -r1.4 - #ifndef _SV_SV_H #include <sv.h> -+#endif -+ -+#ifndef _RTTI_HXX -+#include <tools/rtti.hxx> #endif ++#ifndef _RTTI_HXX ++#include <tools/rtti.hxx> ++#endif ++ + // --------------------- + // - Application-Types - // --------------------- Index: vcl/inc/bitmap.hxx =================================================================== -RCS file: /cvs/gsl/vcl/inc/bitmap.hxx,v -retrieving revision 1.8 -retrieving revision 1.13 -diff -u -p -u -r1.8 -r1.13 ---- vcl/inc/bitmap.hxx 24 Apr 2003 14:56:11 -0000 1.8 -+++ vcl/inc/bitmap.hxx 10 Jun 2004 17:36:43 -0000 1.13 +--- vcl/inc/bitmap.hxx.orig 2004-09-12 14:26:21.662979192 +0200 ++++ vcl/inc/bitmap.hxx 2004-09-12 14:54:44.787064976 +0200 @@ -68,8 +68,8 @@ #ifndef _SV_MAPMOD_HXX #include <mapmod.hxx> @@ -287,12 +272,8 @@ diff -u -p -u -r1.8 -r1.13 public: Index: vcl/inc/bitmapex.hxx =================================================================== -RCS file: /cvs/gsl/vcl/inc/bitmapex.hxx,v -retrieving revision 1.5 -retrieving revision 1.9 -diff -u -p -u -r1.5 -r1.9 ---- vcl/inc/bitmapex.hxx 22 Oct 2002 17:07:54 -0000 1.5 -+++ vcl/inc/bitmapex.hxx 21 May 2004 16:20:50 -0000 1.9 +--- vcl/inc/bitmapex.hxx.orig 2004-09-12 14:26:21.663979040 +0200 ++++ vcl/inc/bitmapex.hxx 2004-09-12 14:54:44.788064824 +0200 @@ -68,8 +68,8 @@ #ifndef _SV_ALPHA_HXX #include <alpha.hxx> @@ -330,12 +311,8 @@ diff -u -p -u -r1.5 -r1.9 ImpBitmap* ImplGetBitmapImpBitmap() const { return aBitmap.ImplGetImpBitmap(); } Index: vcl/inc/brdwin.hxx =================================================================== -RCS file: /cvs/gsl/vcl/inc/brdwin.hxx,v -retrieving revision 1.2 -retrieving revision 1.4 -diff -u -p -u -r1.2 -r1.4 ---- vcl/inc/brdwin.hxx 16 Feb 2001 11:09:45 -0000 1.2 -+++ vcl/inc/brdwin.hxx 17 Jun 2004 12:01:23 -0000 1.4 +--- vcl/inc/brdwin.hxx.orig 2004-09-12 14:26:21.665978736 +0200 ++++ vcl/inc/brdwin.hxx 2004-09-12 14:54:44.789064672 +0200 @@ -156,14 +156,12 @@ private: BOOL mbHelpBtn; BOOL mbDisplayActive; @@ -436,12 +413,8 @@ diff -u -p -u -r1.2 -r1.4 }; Index: vcl/inc/btndlg.hxx =================================================================== -RCS file: /cvs/gsl/vcl/inc/btndlg.hxx,v -retrieving revision 1.2 -retrieving revision 1.3 -diff -u -p -u -r1.2 -r1.3 ---- vcl/inc/btndlg.hxx 7 Dec 2000 13:37:15 -0000 1.2 -+++ vcl/inc/btndlg.hxx 6 Jan 2004 12:53:29 -0000 1.3 +--- vcl/inc/btndlg.hxx.orig 2004-09-12 14:26:21.666978584 +0200 ++++ vcl/inc/btndlg.hxx 2004-09-12 14:54:44.790064520 +0200 @@ -101,20 +101,15 @@ private: BOOL mbFormat; Link maClickHdl; @@ -466,12 +439,8 @@ diff -u -p -u -r1.2 -r1.3 ButtonDialog( Window* pParent, WinBits nStyle = WB_STDDIALOG ); Index: vcl/inc/button.hxx =================================================================== -RCS file: /cvs/gsl/vcl/inc/button.hxx,v -retrieving revision 1.8 -retrieving revision 1.11 -diff -u -p -u -r1.8 -r1.11 ---- vcl/inc/button.hxx 17 Apr 2003 17:55:12 -0000 1.8 -+++ vcl/inc/button.hxx 10 May 2004 15:40:59 -0000 1.11 +--- vcl/inc/button.hxx.orig 2004-09-12 14:26:21.667978432 +0200 ++++ vcl/inc/button.hxx 2004-09-12 14:54:44.791064368 +0200 @@ -78,6 +78,10 @@ #include <bitmap.hxx> #endif @@ -520,7 +489,7 @@ diff -u -p -u -r1.8 -r1.11 virtual void UserDraw( const UserDrawEvent& rUDEvt ); virtual void Toggle(); -@@ -253,10 +246,8 @@ inline BOOL PushButton::IsChecked() cons +@@ -253,10 +253,8 @@ inline BOOL PushButton::IsChecked() cons class OKButton : public PushButton { @@ -531,7 +500,7 @@ diff -u -p -u -r1.8 -r1.11 public: OKButton( Window* pParent, WinBits nStyle = WB_DEFBUTTON ); -@@ -271,10 +262,8 @@ public: +@@ -271,10 +269,8 @@ public: class CancelButton : public PushButton { @@ -542,7 +511,7 @@ diff -u -p -u -r1.8 -r1.11 public: CancelButton( Window* pParent, WinBits nStyle = 0 ); -@@ -289,10 +278,8 @@ public: +@@ -289,10 +285,8 @@ public: class HelpButton : public PushButton { @@ -553,7 +522,7 @@ diff -u -p -u -r1.8 -r1.11 public: HelpButton( Window* pParent, WinBits nStyle = 0 ); -@@ -318,12 +305,9 @@ private: +@@ -318,12 +312,9 @@ private: BOOL mbSaveValue; BOOL mbRadioCheck; BOOL mbStateChanged; @@ -566,7 +535,7 @@ diff -u -p -u -r1.8 -r1.11 void ImplInitData(); WinBits ImplInitStyle( const Window* pPrevWindow, WinBits nStyle ); void ImplInitSettings( BOOL bFont, BOOL bForeground, BOOL bBackground ); -@@ -336,7 +320,6 @@ private: +@@ -336,7 +327,6 @@ private: bool bLayout = false ); void ImplDrawRadioButton( bool bLayout = false ); void ImplUncheckAllOther(); @@ -574,7 +543,7 @@ diff -u -p -u -r1.8 -r1.11 protected: void ImplInit( Window* pParent, WinBits nStyle ); -@@ -376,6 +359,7 @@ public: +@@ -376,6 +366,7 @@ public: virtual void LoseFocus(); virtual void StateChanged( StateChangedType nType ); virtual void DataChanged( const DataChangedEvent& rDCEvt ); @@ -582,7 +551,7 @@ diff -u -p -u -r1.8 -r1.11 virtual void Toggle(); -@@ -428,7 +412,6 @@ private: +@@ -428,7 +419,6 @@ private: Link maToggleHdl; #if _SOLAR__PRIVATE @@ -590,7 +559,7 @@ diff -u -p -u -r1.8 -r1.11 void ImplInitData(); WinBits ImplInitStyle( const Window* pPrevWindow, WinBits nStyle ); void ImplInitSettings( BOOL bFont, BOOL bForeground, BOOL bBackground ); -@@ -439,7 +422,6 @@ private: +@@ -439,7 +429,6 @@ private: Rectangle& rStateRect, Rectangle& rMouseRect, Rectangle& rFocusRect, bool bLayout ); void ImplDrawCheckBox( bool bLayout = false ); @@ -598,7 +567,7 @@ diff -u -p -u -r1.8 -r1.11 protected: void ImplInit( Window* pParent, WinBits nStyle ); -@@ -465,6 +447,7 @@ public: +@@ -465,6 +454,7 @@ public: virtual void LoseFocus(); virtual void StateChanged( StateChangedType nType ); virtual void DataChanged( const DataChangedEvent& rDCEvt ); @@ -608,12 +577,8 @@ diff -u -p -u -r1.8 -r1.11 Index: vcl/inc/cmdevt.hxx =================================================================== -RCS file: /cvs/gsl/vcl/inc/cmdevt.hxx,v -retrieving revision 1.10.250.1 -retrieving revision 1.12 -diff -u -p -u -r1.10.250.1 -r1.12 ---- vcl/inc/cmdevt.hxx 9 Jan 2004 18:13:38 -0000 1.10.250.1 -+++ vcl/inc/cmdevt.hxx 6 Jan 2004 12:54:08 -0000 1.12 +--- vcl/inc/cmdevt.hxx.orig 2004-09-12 14:26:21.668978280 +0200 ++++ vcl/inc/cmdevt.hxx 2004-09-12 14:54:44.792064216 +0200 @@ -101,7 +101,6 @@ private: xub_StrLen mnOldTextLen; USHORT mnCursorFlags; @@ -624,12 +589,8 @@ diff -u -p -u -r1.10.250.1 -r1.12 CommandExtTextInputData(); Index: vcl/inc/combobox.hxx =================================================================== -RCS file: /cvs/gsl/vcl/inc/combobox.hxx,v -retrieving revision 1.12 -retrieving revision 1.14 -diff -u -p -u -r1.12 -r1.14 ---- vcl/inc/combobox.hxx 11 Apr 2003 17:24:42 -0000 1.12 -+++ vcl/inc/combobox.hxx 18 May 2004 10:47:56 -0000 1.14 +--- vcl/inc/combobox.hxx.orig 2004-09-12 14:26:21.669978128 +0200 ++++ vcl/inc/combobox.hxx 2004-09-12 14:54:44.792064216 +0200 @@ -192,6 +192,7 @@ public: BOOL IsUserDrawEnabled() const; @@ -640,12 +601,8 @@ diff -u -p -u -r1.12 -r1.14 void SetSeparatorPos(); Index: vcl/inc/controllayout.hxx =================================================================== -RCS file: /cvs/gsl/vcl/inc/controllayout.hxx,v -retrieving revision 1.3 -retrieving revision 1.4 -diff -u -p -u -r1.3 -r1.4 ---- vcl/inc/controllayout.hxx 16 May 2002 11:52:49 -0000 1.3 -+++ vcl/inc/controllayout.hxx 18 May 2004 10:48:10 -0000 1.4 +--- vcl/inc/controllayout.hxx.orig 2004-09-12 14:26:21.670977976 +0200 ++++ vcl/inc/controllayout.hxx 2004-09-12 14:54:44.793064064 +0200 @@ -103,6 +103,20 @@ struct ControlLayoutData // returns the interval [start,end] of line nLine // returns [-1,-1] for an invalid line @@ -669,12 +626,8 @@ diff -u -p -u -r1.3 -r1.4 } // namespace vcl Index: vcl/inc/ctrl.hxx =================================================================== -RCS file: /cvs/gsl/vcl/inc/ctrl.hxx,v -retrieving revision 1.5 -retrieving revision 1.8 -diff -u -p -u -r1.5 -r1.8 ---- vcl/inc/ctrl.hxx 16 May 2002 11:52:49 -0000 1.5 -+++ vcl/inc/ctrl.hxx 18 May 2004 10:48:23 -0000 1.8 +--- vcl/inc/ctrl.hxx.orig 2004-09-12 14:26:21.671977824 +0200 ++++ vcl/inc/ctrl.hxx 2004-09-12 14:54:44.794063912 +0200 @@ -73,6 +73,10 @@ #include <window.hxx> #endif @@ -749,12 +702,8 @@ diff -u -p -u -r1.5 -r1.8 void SetGetFocusHdl( const Link& rLink ) { maGetFocusHdl = rLink; } Index: vcl/inc/cursor.hxx =================================================================== -RCS file: /cvs/gsl/vcl/inc/cursor.hxx,v -retrieving revision 1.3 -retrieving revision 1.4 -diff -u -p -u -r1.3 -r1.4 ---- vcl/inc/cursor.hxx 27 Mar 2003 17:57:20 -0000 1.3 -+++ vcl/inc/cursor.hxx 6 Jan 2004 12:55:28 -0000 1.4 +--- vcl/inc/cursor.hxx.orig 2004-09-12 14:26:21.672977672 +0200 ++++ vcl/inc/cursor.hxx 2004-09-12 14:54:44.795063760 +0200 @@ -66,6 +66,10 @@ #include <tools/gen.hxx> #endif @@ -780,12 +729,8 @@ diff -u -p -u -r1.3 -r1.4 void ImplNew(); Index: vcl/inc/cvtsvm.hxx =================================================================== -RCS file: /cvs/gsl/vcl/inc/cvtsvm.hxx,v -retrieving revision 1.3 -retrieving revision 1.4 -diff -u -p -u -r1.3 -r1.4 ---- vcl/inc/cvtsvm.hxx 7 Dec 2000 13:37:15 -0000 1.3 -+++ vcl/inc/cvtsvm.hxx 6 Jan 2004 12:55:49 -0000 1.4 +--- vcl/inc/cvtsvm.hxx.orig 2004-09-12 14:26:21.672977672 +0200 ++++ vcl/inc/cvtsvm.hxx 2004-09-12 14:54:44.795063760 +0200 @@ -129,7 +129,6 @@ class SVMConverter { private: @@ -804,12 +749,8 @@ diff -u -p -u -r1.3 -r1.4 SVMConverter( SvStream& rIStm, GDIMetaFile& rMtf, ULONG nConvertMode ); Index: vcl/inc/decoview.hxx =================================================================== -RCS file: /cvs/gsl/vcl/inc/decoview.hxx,v -retrieving revision 1.3 -retrieving revision 1.4 -diff -u -p -u -r1.3 -r1.4 ---- vcl/inc/decoview.hxx 27 Mar 2003 17:57:20 -0000 1.3 -+++ vcl/inc/decoview.hxx 10 May 2004 15:41:25 -0000 1.4 +--- vcl/inc/decoview.hxx.orig 2004-09-12 14:26:21.674977368 +0200 ++++ vcl/inc/decoview.hxx 2004-09-12 14:54:44.796063608 +0200 @@ -88,6 +88,7 @@ class OutputDevice; #define FRAME_DRAW_DOUBLEIN ((USHORT)0x0004) #define FRAME_DRAW_DOUBLEOUT ((USHORT)0x0005) @@ -820,12 +761,8 @@ diff -u -p -u -r1.3 -r1.4 #define FRAME_DRAW_STYLE ((USHORT)0x000F) Index: vcl/inc/dialog.hxx =================================================================== -RCS file: /cvs/gsl/vcl/inc/dialog.hxx,v -retrieving revision 1.7.252.1 -retrieving revision 1.10 -diff -u -p -u -r1.7.252.1 -r1.10 ---- vcl/inc/dialog.hxx 31 Oct 2003 15:43:22 -0000 1.7.252.1 -+++ vcl/inc/dialog.hxx 17 Jun 2004 12:02:16 -0000 1.10 +--- vcl/inc/dialog.hxx.orig 2004-09-12 14:26:21.675977216 +0200 ++++ vcl/inc/dialog.hxx 2004-09-12 14:54:44.796063608 +0200 @@ -81,20 +81,16 @@ class Dialog : public SystemWindow { private: @@ -860,12 +797,8 @@ diff -u -p -u -r1.7.252.1 -r1.10 void SetModalInputMode( BOOL bModal, BOOL bSubModalDialogs ); Index: vcl/inc/dockwin.hxx =================================================================== -RCS file: /cvs/gsl/vcl/inc/dockwin.hxx,v -retrieving revision 1.4 -retrieving revision 1.6 -diff -u -p -u -r1.4 -r1.6 ---- vcl/inc/dockwin.hxx 24 Apr 2002 15:41:07 -0000 1.4 -+++ vcl/inc/dockwin.hxx 17 Jun 2004 12:02:29 -0000 1.6 +--- vcl/inc/dockwin.hxx.orig 2004-09-12 14:26:21.676977064 +0200 ++++ vcl/inc/dockwin.hxx 2004-09-12 14:54:44.797063456 +0200 @@ -89,10 +89,10 @@ private: long mnTrackY; long mnTrackWidth; @@ -900,12 +833,8 @@ diff -u -p -u -r1.4 -r1.6 void ImplInit( Window* pParent, WinBits nStyle ); Index: vcl/inc/edit.hxx =================================================================== -RCS file: /cvs/gsl/vcl/inc/edit.hxx,v -retrieving revision 1.11 -retrieving revision 1.13 -diff -u -p -u -r1.11 -r1.13 ---- vcl/inc/edit.hxx 27 Mar 2003 17:57:20 -0000 1.11 -+++ vcl/inc/edit.hxx 10 May 2004 15:41:45 -0000 1.13 +--- vcl/inc/edit.hxx.orig 2004-09-12 14:26:21.676977064 +0200 ++++ vcl/inc/edit.hxx 2004-09-12 14:54:44.798063304 +0200 @@ -139,7 +139,6 @@ private: Link maAutocompleteHdl; @@ -932,12 +861,8 @@ diff -u -p -u -r1.11 -r1.13 Index: vcl/inc/field.hxx =================================================================== -RCS file: /cvs/gsl/vcl/inc/field.hxx,v -retrieving revision 1.9 -retrieving revision 1.12 -diff -u -p -u -r1.9 -r1.12 ---- vcl/inc/field.hxx 5 Nov 2001 13:00:00 -0000 1.9 -+++ vcl/inc/field.hxx 2 Apr 2004 10:35:02 -0000 1.12 +--- vcl/inc/field.hxx.orig 2004-09-12 14:26:21.679976608 +0200 ++++ vcl/inc/field.hxx 2004-09-12 14:54:44.800063000 +0200 @@ -105,17 +105,10 @@ private: BOOL mbEmptyFieldValue; BOOL mbEmptyFieldValueEnabled; @@ -965,7 +890,7 @@ diff -u -p -u -r1.9 -r1.12 const LocaleDataWrapper& GetLocaleDataWrapper() const; -@@ -174,21 +163,16 @@ private: +@@ -174,21 +167,16 @@ private: XubString maFieldString; XubString maLiteralMask; USHORT mnFormatFlags; @@ -987,7 +912,7 @@ diff -u -p -u -r1.9 -r1.12 public: ~PatternFormatter(); -@@ -217,9 +201,7 @@ public: +@@ -217,9 +205,7 @@ public: class NumericFormatter : public FormatterBase { private: @@ -997,7 +922,7 @@ diff -u -p -u -r1.9 -r1.12 protected: long mnFieldValue; -@@ -233,8 +215,6 @@ protected: +@@ -233,8 +219,6 @@ protected: USHORT mnDumym2; BOOL mbThousandSep; BOOL mbShowTrailingZeros; @@ -1006,7 +931,7 @@ diff -u -p -u -r1.9 -r1.12 // Eigentlich nur am entsprechenden Feld einstellbar (fuer Interaktion), // wird aber in allen Verschiedenen Ableitungen benoetigt -@@ -255,12 +235,10 @@ protected: +@@ -255,12 +239,10 @@ protected: void FieldFirst(); void FieldLast(); @@ -1019,7 +944,7 @@ diff -u -p -u -r1.9 -r1.12 public: ~NumericFormatter(); -@@ -308,9 +286,7 @@ public: +@@ -308,9 +290,7 @@ public: class MetricFormatter : public NumericFormatter { private: @@ -1029,7 +954,7 @@ diff -u -p -u -r1.9 -r1.12 protected: XubString maCustomUnitText; -@@ -324,10 +300,8 @@ protected: +@@ -324,10 +304,8 @@ protected: virtual XubString CreateFieldText( long nValue ) const; @@ -1040,7 +965,7 @@ diff -u -p -u -r1.9 -r1.12 public: ~MetricFormatter(); -@@ -368,23 +342,13 @@ class CurrencyFormatter : public Numeric +@@ -368,23 +346,13 @@ class CurrencyFormatter : public Numeric { private: String maCurrencySymbol; @@ -1064,7 +989,7 @@ diff -u -p -u -r1.9 -r1.12 public: ~CurrencyFormatter(); -@@ -417,19 +381,13 @@ private: +@@ -417,19 +385,13 @@ private: BOOL mbShowDateCentury; USHORT mnDateFormat; ULONG mnExtDateFormat; @@ -1085,7 +1010,7 @@ diff -u -p -u -r1.9 -r1.12 void ImplLoadRes( const ResId& rResId ); const Date& ImplGetFieldDate() const { return maFieldDate; } BOOL ImplDateReformat( const XubString& rStr, XubString& rOutStr, -@@ -440,7 +398,8 @@ protected: +@@ -440,7 +402,8 @@ protected: const AllSettings& rSettings ) const; void ImplNewFieldValue( const Date& rDate ); CalendarWrapper& GetCalendarWrapper() const; @@ -1095,7 +1020,7 @@ diff -u -p -u -r1.9 -r1.12 public: ~DateFormatter(); -@@ -450,11 +409,6 @@ public: +@@ -450,11 +413,6 @@ public: virtual void SetLocale( const ::com::sun::star::lang::Locale& rLocale ); @@ -1107,7 +1032,7 @@ diff -u -p -u -r1.9 -r1.12 void SetExtDateFormat( ExtDateFieldFormat eFormat ); ExtDateFieldFormat GetExtDateFormat( BOOL bResolveSystemFormat = FALSE ) const; -@@ -489,6 +443,23 @@ public: +@@ -489,6 +447,23 @@ public: static void ExpandCentury( Date& rDate ); static void ExpandCentury( Date& rDate, USHORT nTwoDigitYearStart ); @@ -1131,7 +1056,7 @@ diff -u -p -u -r1.9 -r1.12 }; -@@ -507,27 +478,20 @@ private: +@@ -507,27 +482,20 @@ private: USHORT mnTimeFormat; BOOL mbDuration; BOOL mbEmptyTime; @@ -1161,7 +1086,7 @@ diff -u -p -u -r1.9 -r1.12 public: ~TimeFormatter(); -@@ -557,6 +521,23 @@ public: +@@ -557,6 +525,23 @@ public: void SetEmptyTime() { FormatterBase::SetEmptyFieldValue(); } BOOL IsEmptyTime() const { return FormatterBase::IsEmptyFieldValue(); } Time GetCorrectedTime() const { return maCorrectedTime; } @@ -1185,7 +1110,7 @@ diff -u -p -u -r1.9 -r1.12 }; -@@ -583,10 +564,8 @@ public: +@@ -583,10 +568,8 @@ public: class NumericField : public SpinField, public NumericFormatter { @@ -1196,7 +1121,7 @@ diff -u -p -u -r1.9 -r1.12 public: NumericField( Window* pParent, WinBits nWinStyle ); -@@ -612,10 +591,8 @@ public: +@@ -612,10 +595,8 @@ public: class MetricField : public SpinField, public MetricFormatter { @@ -1207,7 +1132,7 @@ diff -u -p -u -r1.9 -r1.12 public: MetricField( Window* pParent, WinBits nWinStyle ); -@@ -663,10 +640,8 @@ public: +@@ -663,10 +644,8 @@ public: class CurrencyField : public SpinField, public CurrencyFormatter { @@ -1218,7 +1143,7 @@ diff -u -p -u -r1.9 -r1.12 public: CurrencyField( Window* pParent, WinBits nWinStyle ); -@@ -696,11 +671,9 @@ private: +@@ -696,11 +675,9 @@ private: Date maFirst; Date maLast; @@ -1230,7 +1155,7 @@ diff -u -p -u -r1.9 -r1.12 public: DateField( Window* pParent, WinBits nWinStyle ); -@@ -739,11 +707,9 @@ private: +@@ -739,11 +716,9 @@ private: Time maFirst; Time maLast; @@ -1244,12 +1169,8 @@ diff -u -p -u -r1.9 -r1.12 TimeField( Window* pParent, WinBits nWinStyle ); Index: vcl/inc/fixbrd.hxx =================================================================== -RCS file: /cvs/gsl/vcl/inc/fixbrd.hxx,v -retrieving revision 1.2 -retrieving revision 1.3 -diff -u -p -u -r1.2 -r1.3 ---- vcl/inc/fixbrd.hxx 7 Dec 2000 13:37:15 -0000 1.2 -+++ vcl/inc/fixbrd.hxx 6 Jan 2004 12:57:59 -0000 1.3 +--- vcl/inc/fixbrd.hxx.orig 2004-09-12 14:26:21.680976456 +0200 ++++ vcl/inc/fixbrd.hxx 2004-09-12 14:54:44.800063000 +0200 @@ -91,18 +91,13 @@ class FixedBorder : public Control private: USHORT mnType; @@ -1271,12 +1192,8 @@ diff -u -p -u -r1.2 -r1.3 FixedBorder( Window* pParent, WinBits nStyle = 0 ); Index: vcl/inc/fixed.hxx =================================================================== -RCS file: /cvs/gsl/vcl/inc/fixed.hxx,v -retrieving revision 1.5 -retrieving revision 1.6 -diff -u -p -u -r1.5 -r1.6 ---- vcl/inc/fixed.hxx 29 Apr 2002 17:46:17 -0000 1.5 -+++ vcl/inc/fixed.hxx 6 Jan 2004 12:58:20 -0000 1.6 +--- vcl/inc/fixed.hxx.orig 2004-09-12 14:26:21.681976304 +0200 ++++ vcl/inc/fixed.hxx 2004-09-12 14:54:44.801062848 +0200 @@ -84,14 +84,12 @@ class UserDrawEvent; class FixedText : public Control { @@ -1355,12 +1272,8 @@ diff -u -p -u -r1.5 -r1.6 FixedImage( Window* pParent, WinBits nStyle = 0 ); Index: vcl/inc/floatwin.hxx =================================================================== -RCS file: /cvs/gsl/vcl/inc/floatwin.hxx,v -retrieving revision 1.5 -retrieving revision 1.6 -diff -u -p -u -r1.5 -r1.6 ---- vcl/inc/floatwin.hxx 31 Oct 2001 19:28:50 -0000 1.5 -+++ vcl/inc/floatwin.hxx 6 Jan 2004 12:58:54 -0000 1.6 +--- vcl/inc/floatwin.hxx.orig 2004-09-12 14:26:21.682976152 +0200 ++++ vcl/inc/floatwin.hxx 2004-09-12 14:54:44.802062696 +0200 @@ -114,7 +114,6 @@ private: FloatingWindow* mpNextFloat; Window* mpFirstPopupModeWin; @@ -1382,12 +1295,8 @@ diff -u -p -u -r1.5 -r1.6 void ImplInit( Window* pParent, WinBits nStyle ); Index: vcl/inc/fntstyle.hxx =================================================================== -RCS file: /cvs/gsl/vcl/inc/fntstyle.hxx,v -retrieving revision 1.2 -retrieving revision 1.3 -diff -u -p -u -r1.2 -r1.3 ---- vcl/inc/fntstyle.hxx 23 Mar 2001 11:44:51 -0000 1.2 -+++ vcl/inc/fntstyle.hxx 6 Jan 2004 12:59:13 -0000 1.3 +--- vcl/inc/fntstyle.hxx.orig 2004-09-12 14:26:21.682976152 +0200 ++++ vcl/inc/fntstyle.hxx 2004-09-12 14:54:44.802062696 +0200 @@ -62,6 +62,7 @@ #ifndef _VCL_FNTSTYLE_HXX #define _VCL_FNTSTYLE_HXX @@ -1398,12 +1307,8 @@ diff -u -p -u -r1.2 -r1.3 // -------------- Index: vcl/inc/font.hxx =================================================================== -RCS file: /cvs/gsl/vcl/inc/font.hxx,v -retrieving revision 1.6 -retrieving revision 1.8 -diff -u -p -u -r1.6 -r1.8 ---- vcl/inc/font.hxx 1 Aug 2001 12:32:45 -0000 1.6 -+++ vcl/inc/font.hxx 6 Jan 2004 12:59:38 -0000 1.8 +--- vcl/inc/font.hxx.orig 2004-09-12 14:26:21.684975848 +0200 ++++ vcl/inc/font.hxx 2004-09-12 14:54:44.803062544 +0200 @@ -71,8 +71,8 @@ #ifndef _TOOLS_LANG_HXX #include <tools/lang.hxx> @@ -1428,7 +1333,7 @@ diff -u -p -u -r1.6 -r1.8 class SvStream; #define FontAlign TextAlign -@@ -226,16 +220,4 @@ public: +@@ -226,18 +220,6 @@ public: friend SvStream& operator>>( SvStream& rIStm, Font& rFont ); friend SvStream& operator<<( SvStream& rOStm, const Font& rFont ); @@ -1445,15 +1350,12 @@ diff -u -p -u -r1.6 -r1.8 -#endif - }; - + + #ifndef NOOLDSV Index: vcl/inc/fontcfg.hxx =================================================================== -RCS file: /cvs/gsl/vcl/inc/fontcfg.hxx,v -retrieving revision 1.3 -retrieving revision 1.5 -diff -u -p -u -r1.3 -r1.5 ---- vcl/inc/fontcfg.hxx 29 May 2002 13:37:05 -0000 1.3 -+++ vcl/inc/fontcfg.hxx 25 Jun 2004 15:24:19 -0000 1.5 +--- vcl/inc/fontcfg.hxx.orig 2004-09-12 14:26:21.685975696 +0200 ++++ vcl/inc/fontcfg.hxx 2004-09-12 14:54:44.806062088 +0200 @@ -66,43 +66,70 @@ #ifndef _UTL_CONFIGITEM_HXX_ #include <unotools/configitem.hxx> @@ -1607,12 +1509,8 @@ diff -u -p -u -r1.3 -r1.5 Index: vcl/inc/gdimtf.hxx =================================================================== -RCS file: /cvs/gsl/vcl/inc/gdimtf.hxx,v -retrieving revision 1.5 -retrieving revision 1.6 -diff -u -p -u -r1.5 -r1.6 ---- vcl/inc/gdimtf.hxx 18 Nov 2002 13:42:14 -0000 1.5 -+++ vcl/inc/gdimtf.hxx 6 Jan 2004 13:00:30 -0000 1.6 +--- vcl/inc/gdimtf.hxx.orig 2004-09-12 14:26:21.686975544 +0200 ++++ vcl/inc/gdimtf.hxx 2004-09-12 14:54:44.807061936 +0200 @@ -98,6 +98,7 @@ class Gradient; #ifndef METAFILE_END #define METAFILE_END GDI_METAFILE_END @@ -1646,21 +1544,9 @@ diff -u -p -u -r1.5 -r1.6 BOOL operator==( const GDIMetaFile& rMtf ) const; Index: vcl/inc/glyphcache.hxx =================================================================== -RCS file: /cvs/gsl/vcl/inc/glyphcache.hxx,v -retrieving revision 1.19 -retrieving revision 1.22 -diff -u -p -u -r1.19 -r1.22 ---- vcl/inc/glyphcache.hxx 2 Jul 2003 13:38:54 -0000 1.19 -+++ vcl/inc/glyphcache.hxx 18 May 2004 10:48:36 -0000 1.22 -@@ -72,6 +72,7 @@ class ServerFontLayout; - - #include <tools/gen.hxx> - #include <hash_map> -+#include <map> - #include <hash_set> - - struct ImplFontSelectData; -@@ -90,14 +91,20 @@ bool operator==( const ImplFontSelectDat +--- vcl/inc/glyphcache.hxx.orig 2004-09-12 14:46:23.370291912 +0200 ++++ vcl/inc/glyphcache.hxx 2004-09-12 14:58:34.432153616 +0200 +@@ -91,14 +92,17 @@ bool operator==( const ImplFontSelectDat // ======================================================================= @@ -1674,28 +1560,12 @@ diff -u -p -u -r1.19 -r1.22 +} + + typedef std::map< sal_Unicode, std::map< sal_Unicode, int > > unicodeKernMap; + typedef std::map< int, std::map< int, int > > glyphKernMap; + //-------- -+typedef std::map< sal_Unicode, std::map< sal_Unicode, int > > unicodeKernMap; -+typedef std::map< int, std::map< int, int > > glyphKernMap; -+ - class GlyphCache - { - public: -@@ -110,7 +117,11 @@ public: - void ClearFontPath(); - void AddFontPath( const String& rFontPath ); - void AddFontFile( const rtl::OString& rNormalizedName, -- int nFaceNum, int nFontId, const ImplFontData* ); -+ int nFaceNum, -+ int nFontId, -+ const ImplFontData*, -+ const unicodeKernMap* pUniKernPairs = NULL -+ ); - long FetchFontList( ImplDevFontList* ) const; - - ServerFont* CacheFont( const ImplFontSelectData& ); -@@ -118,7 +129,7 @@ public: +@@ -124,7 +131,7 @@ public: void RemoveFont( const ImplFontData* ); private: @@ -1704,7 +1574,7 @@ diff -u -p -u -r1.19 -r1.22 // used by ServerFont class only void AddedGlyph( ServerFont& rServerFont, GlyphData& rGlyphData ); void RemovingGlyph( ServerFont& rSF, GlyphData& rGD, int nGlyphIndex ); -@@ -156,7 +167,7 @@ public: +@@ -162,7 +169,7 @@ public: long GetCharWidth() const { return mnAdvanceWidth; } protected: @@ -1713,51 +1583,10 @@ diff -u -p -u -r1.19 -r1.22 void SetOffset( int nX, int nY ) { maOffset = Point( nX, nY); } void SetDelta( int nX, int nY ) { maDelta = Point( nX, nY); } void SetSize( const Size& s ) { maSize = s; } -@@ -218,8 +229,8 @@ public: - const ImplFontSelectData& GetFontSelData() const { return maFontSelData; } - - virtual void FetchFontMetric( ImplFontMetricData&, long& rFactor ) const = 0; -- virtual ULONG GetKernPairs( struct ImplKernPairData** ) const = 0; -- virtual int GetGlyphKernValue( int, int ) const = 0; -+ virtual ULONG GetKernPairs( struct ImplKernPairData** ) const; -+ virtual int GetGlyphKernValue( int, int ) const; - virtual ULONG GetFontCodeRanges( sal_uInt32* pCodes ) const { return 0; } - Point TransformPoint( const Point& ) const; - -@@ -238,9 +249,9 @@ public: - void* GetExtPointer() { return mpExtData; } - - protected: --friend GlyphCache; --friend ServerFontLayout; -- ServerFont( const ImplFontSelectData& ); -+ friend class GlyphCache; -+ friend class ServerFontLayout; -+ ServerFont( const ImplFontSelectData&, const glyphKernMap* pGlyphKern = NULL, const unicodeKernMap* pUniKern = NULL ); - virtual ~ServerFont(); - - void AddRef() const { ++mnRefCount; } -@@ -273,6 +284,12 @@ private: - protected: - long nCos; - long nSin; -+ -+ // maps left glyph id to map of right glyphid -+ // the inner map maps right glyphid to kern value -+ const glyphKernMap* mpKernPairs; -+ const unicodeKernMap* mpUnicodeKernPairs; -+ - }; - - // ======================================================================= Index: vcl/inc/gradient.hxx =================================================================== -RCS file: /cvs/gsl/vcl/inc/gradient.hxx,v -retrieving revision 1.1.1.1 -retrieving revision 1.3 -diff -u -p -u -r1.1.1.1 -r1.3 ---- vcl/inc/gradient.hxx 19 Sep 2000 10:23:04 -0000 1.1.1.1 -+++ vcl/inc/gradient.hxx 6 Jan 2004 13:01:22 -0000 1.3 +--- vcl/inc/gradient.hxx.orig 2004-09-12 14:26:21.688975240 +0200 ++++ vcl/inc/gradient.hxx 2004-09-12 14:54:44.810061480 +0200 @@ -62,7 +62,10 @@ #ifndef _SV_GRADIENT_HXX #define _SV_GRADIENT_HXX @@ -1802,12 +1631,8 @@ diff -u -p -u -r1.1.1.1 -r1.3 #endif // _SV_GRADIENT_HXX Index: vcl/inc/graph.hxx =================================================================== -RCS file: /cvs/gsl/vcl/inc/graph.hxx,v -retrieving revision 1.6 -retrieving revision 1.7 -diff -u -p -u -r1.6 -r1.7 ---- vcl/inc/graph.hxx 27 Mar 2003 17:57:21 -0000 1.6 -+++ vcl/inc/graph.hxx 20 Apr 2004 13:53:29 -0000 1.7 +--- vcl/inc/graph.hxx.orig 2004-09-12 14:26:21.689975088 +0200 ++++ vcl/inc/graph.hxx 2004-09-12 14:54:44.811061328 +0200 @@ -143,6 +143,8 @@ public: Bitmap GetBitmap( const Size* pSizePixel ) const; BitmapEx GetBitmapEx() const; @@ -1819,12 +1644,8 @@ diff -u -p -u -r1.6 -r1.7 Index: vcl/inc/group.hxx =================================================================== -RCS file: /cvs/gsl/vcl/inc/group.hxx,v -retrieving revision 1.2 -retrieving revision 1.3 -diff -u -p -u -r1.2 -r1.3 ---- vcl/inc/group.hxx 8 May 2002 16:01:29 -0000 1.2 -+++ vcl/inc/group.hxx 6 Jan 2004 13:01:39 -0000 1.3 +--- vcl/inc/group.hxx.orig 2004-09-12 14:26:21.690974936 +0200 ++++ vcl/inc/group.hxx 2004-09-12 14:54:44.811061328 +0200 @@ -75,16 +75,15 @@ class GroupBox : public Control @@ -1846,12 +1667,8 @@ diff -u -p -u -r1.2 -r1.3 GroupBox( Window* pParent, const ResId& rResId ); Index: vcl/inc/hatch.hxx =================================================================== -RCS file: /cvs/gsl/vcl/inc/hatch.hxx,v -retrieving revision 1.1.1.1 -retrieving revision 1.3 -diff -u -p -u -r1.1.1.1 -r1.3 ---- vcl/inc/hatch.hxx 19 Sep 2000 10:23:04 -0000 1.1.1.1 -+++ vcl/inc/hatch.hxx 6 Jan 2004 13:01:57 -0000 1.3 +--- vcl/inc/hatch.hxx.orig 2004-09-12 14:26:21.690974936 +0200 ++++ vcl/inc/hatch.hxx 2004-09-12 14:54:44.812061176 +0200 @@ -62,7 +62,10 @@ #ifndef _SV_HATCH_HXX #define _SV_HATCH_HXX @@ -1897,12 +1714,8 @@ diff -u -p -u -r1.1.1.1 -r1.3 #endif // _SV_HATCH_HXX Index: vcl/inc/help.hxx =================================================================== -RCS file: /cvs/gsl/vcl/inc/help.hxx,v -retrieving revision 1.3.284.1 -retrieving revision 1.5 -diff -u -p -u -r1.3.284.1 -r1.5 ---- vcl/inc/help.hxx 9 Jan 2004 18:13:39 -0000 1.3.284.1 -+++ vcl/inc/help.hxx 6 Jan 2004 13:02:14 -0000 1.5 +--- vcl/inc/help.hxx.orig 2004-09-12 14:26:21.691974784 +0200 ++++ vcl/inc/help.hxx 2004-09-12 14:54:44.812061176 +0200 @@ -103,6 +103,7 @@ private: public: @@ -1913,12 +1726,8 @@ diff -u -p -u -r1.3.284.1 -r1.5 const String& GetHelpFile() const { return maHelpFile; } Index: vcl/inc/ilstbox.hxx =================================================================== -RCS file: /cvs/gsl/vcl/inc/ilstbox.hxx,v -retrieving revision 1.20 -retrieving revision 1.23 -diff -u -p -u -r1.20 -r1.23 ---- vcl/inc/ilstbox.hxx 24 Apr 2003 16:29:18 -0000 1.20 -+++ vcl/inc/ilstbox.hxx 18 May 2004 10:48:51 -0000 1.23 +--- vcl/inc/ilstbox.hxx.orig 2004-09-12 14:26:21.693974480 +0200 ++++ vcl/inc/ilstbox.hxx 2004-09-12 14:54:44.814060872 +0200 @@ -244,7 +244,7 @@ private: USHORT mnBorder; // Abstand Rahmen - Text USHORT mnTextHeight; // Texthoehe @@ -2113,12 +1922,8 @@ diff -u -p -u -r1.20 -r1.23 Index: vcl/inc/imgcons.hxx =================================================================== -RCS file: /cvs/gsl/vcl/inc/imgcons.hxx,v -retrieving revision 1.1.1.1 -retrieving revision 1.2 -diff -u -p -u -r1.1.1.1 -r1.2 ---- vcl/inc/imgcons.hxx 19 Sep 2000 10:23:04 -0000 1.1.1.1 -+++ vcl/inc/imgcons.hxx 6 Jan 2004 13:03:07 -0000 1.2 +--- vcl/inc/imgcons.hxx.orig 2004-09-12 14:26:21.694974328 +0200 ++++ vcl/inc/imgcons.hxx 2004-09-12 14:54:44.815060720 +0200 @@ -85,7 +85,6 @@ private: Bitmap maBitmap; Bitmap maMask; @@ -2140,12 +1945,8 @@ diff -u -p -u -r1.1.1.1 -r1.2 Index: vcl/inc/imgctrl.hxx =================================================================== -RCS file: /cvs/gsl/vcl/inc/imgctrl.hxx,v -retrieving revision 1.4 -retrieving revision 1.5 -diff -u -p -u -r1.4 -r1.5 ---- vcl/inc/imgctrl.hxx 15 Aug 2002 14:49:14 -0000 1.4 -+++ vcl/inc/imgctrl.hxx 6 Jan 2004 13:03:24 -0000 1.5 +--- vcl/inc/imgctrl.hxx.orig 2004-09-12 14:26:21.695974176 +0200 ++++ vcl/inc/imgctrl.hxx 2004-09-12 14:54:44.816060568 +0200 @@ -74,7 +74,7 @@ class ImageControl : public FixedImage private: BitmapEx maBmp; @@ -2157,12 +1958,8 @@ diff -u -p -u -r1.4 -r1.5 ImageControl( Window* pParent, WinBits nStyle = 0 ); Index: vcl/inc/impbmp.hxx =================================================================== -RCS file: /cvs/gsl/vcl/inc/impbmp.hxx,v -retrieving revision 1.2 -retrieving revision 1.3 -diff -u -p -u -r1.2 -r1.3 ---- vcl/inc/impbmp.hxx 7 Dec 2000 13:37:15 -0000 1.2 -+++ vcl/inc/impbmp.hxx 1 Dec 2003 12:53:44 -0000 1.3 +--- vcl/inc/impbmp.hxx.orig 2004-09-12 14:26:21.696974024 +0200 ++++ vcl/inc/impbmp.hxx 2004-09-12 14:54:44.816060568 +0200 @@ -92,11 +92,7 @@ private: ULONG mnRefCount; ULONG mnChecksum; @@ -2219,12 +2016,8 @@ diff -u -p -u -r1.2 -r1.3 Index: vcl/inc/impgraph.hxx =================================================================== -RCS file: /cvs/gsl/vcl/inc/impgraph.hxx,v -retrieving revision 1.3 -retrieving revision 1.4 -diff -u -p -u -r1.3 -r1.4 ---- vcl/inc/impgraph.hxx 24 Aug 2001 14:07:49 -0000 1.3 -+++ vcl/inc/impgraph.hxx 20 Apr 2004 13:53:44 -0000 1.4 +--- vcl/inc/impgraph.hxx.orig 2004-09-12 14:26:21.697973872 +0200 ++++ vcl/inc/impgraph.hxx 2004-09-12 14:54:44.817060416 +0200 @@ -144,8 +144,8 @@ private: BOOL ImplIsAlpha() const; BOOL ImplIsAnimated() const; @@ -2238,12 +2031,8 @@ diff -u -p -u -r1.3 -r1.4 Index: vcl/inc/jobset.h =================================================================== -RCS file: /cvs/gsl/vcl/inc/jobset.h,v -retrieving revision 1.5 -retrieving revision 1.6 -diff -u -p -u -r1.5 -r1.6 ---- vcl/inc/jobset.h 6 Mar 2002 11:13:54 -0000 1.5 -+++ vcl/inc/jobset.h 6 Jan 2004 13:03:42 -0000 1.6 +--- vcl/inc/jobset.h.orig 2004-09-12 14:26:21.697973872 +0200 ++++ vcl/inc/jobset.h 2004-09-12 14:54:44.817060416 +0200 @@ -72,7 +72,7 @@ #ifndef _SV_PRNTYPES_HXX #include <prntypes.hxx> @@ -2255,12 +2044,8 @@ diff -u -p -u -r1.5 -r1.6 #ifndef _RTL_USTRING_ Index: vcl/inc/jobset.hxx =================================================================== -RCS file: /cvs/gsl/vcl/inc/jobset.hxx,v -retrieving revision 1.4 -retrieving revision 1.5 -diff -u -p -u -r1.4 -r1.5 ---- vcl/inc/jobset.hxx 19 Dec 2001 14:43:31 -0000 1.4 -+++ vcl/inc/jobset.hxx 1 Dec 2003 12:54:41 -0000 1.5 +--- vcl/inc/jobset.hxx.orig 2004-09-12 14:26:21.698973720 +0200 ++++ vcl/inc/jobset.hxx 2004-09-12 14:54:44.818060264 +0200 @@ -75,10 +75,6 @@ class SvStream; struct ImplJobSetup; @@ -2285,12 +2070,8 @@ diff -u -p -u -r1.4 -r1.5 BOOL operator!=( const JobSetup& rJobSetup ) const Index: vcl/inc/keycod.hxx =================================================================== -RCS file: /cvs/gsl/vcl/inc/keycod.hxx,v -retrieving revision 1.2 -retrieving revision 1.3 -diff -u -p -u -r1.2 -r1.3 ---- vcl/inc/keycod.hxx 27 Feb 2002 12:11:26 -0000 1.2 -+++ vcl/inc/keycod.hxx 6 Jan 2004 13:03:58 -0000 1.3 +--- vcl/inc/keycod.hxx.orig 2004-09-12 14:26:21.699973568 +0200 ++++ vcl/inc/keycod.hxx 2004-09-12 14:54:44.818060264 +0200 @@ -69,8 +69,8 @@ #ifndef _SV_SV_H #include <sv.h> @@ -2304,12 +2085,8 @@ diff -u -p -u -r1.2 -r1.3 #include <keycodes.hxx> Index: vcl/inc/keycodes.hxx =================================================================== -RCS file: /cvs/gsl/vcl/inc/keycodes.hxx,v -retrieving revision 1.2.250.1 -retrieving revision 1.5 -diff -u -p -u -r1.2.250.1 -r1.5 ---- vcl/inc/keycodes.hxx 9 Jan 2004 18:13:39 -0000 1.2.250.1 -+++ vcl/inc/keycodes.hxx 17 Mar 2004 10:04:17 -0000 1.5 +--- vcl/inc/keycodes.hxx.orig 2004-09-12 14:26:21.700973416 +0200 ++++ vcl/inc/keycodes.hxx 2004-09-12 14:54:44.819060112 +0200 @@ -70,7 +70,7 @@ // - KeyCode-Types - // ----------------- @@ -2329,12 +2106,8 @@ diff -u -p -u -r1.2.250.1 -r1.5 Index: vcl/inc/lineinfo.hxx =================================================================== -RCS file: /cvs/gsl/vcl/inc/lineinfo.hxx,v -retrieving revision 1.1.1.1 -retrieving revision 1.2 -diff -u -p -u -r1.1.1.1 -r1.2 ---- vcl/inc/lineinfo.hxx 19 Sep 2000 10:23:05 -0000 1.1.1.1 -+++ vcl/inc/lineinfo.hxx 4 Sep 2003 07:41:49 -0000 1.2 +--- vcl/inc/lineinfo.hxx.orig 2004-09-12 14:26:21.701973264 +0200 ++++ vcl/inc/lineinfo.hxx 2004-09-12 14:54:44.819060112 +0200 @@ -140,31 +140,6 @@ public: friend SvStream& operator>>( SvStream& rIStm, LineInfo& rLineInfo ); @@ -2369,12 +2142,8 @@ diff -u -p -u -r1.1.1.1 -r1.2 #endif // _SV_LINEINFO_HXX Index: vcl/inc/longcurr.hxx =================================================================== -RCS file: /cvs/gsl/vcl/inc/longcurr.hxx,v -retrieving revision 1.3 -retrieving revision 1.4 -diff -u -p -u -r1.3 -r1.4 ---- vcl/inc/longcurr.hxx 29 Jun 2001 10:17:29 -0000 1.3 -+++ vcl/inc/longcurr.hxx 6 Jan 2004 13:04:51 -0000 1.4 +--- vcl/inc/longcurr.hxx.orig 2004-09-12 14:26:21.702973112 +0200 ++++ vcl/inc/longcurr.hxx 2004-09-12 14:54:44.820059960 +0200 @@ -77,12 +77,9 @@ class LocaleDataWrapper; class LongCurrencyFormatter : public FormatterBase @@ -2400,24 +2169,21 @@ diff -u -p -u -r1.3 -r1.4 LongCurrencyFormatter(); void ImplLoadRes( const ResId& rResId ); -@@ -141,9 +135,7 @@ public: +@@ -141,10 +135,8 @@ public: class LongCurrencyField : public SpinField, public LongCurrencyFormatter { #if _SOLAR__PRIVATE -#ifdef VCL_LONGCURR_CXX friend void ImplNewLongCurrencyFieldValue( LongCurrencyField*, BigInt ); --#endif #endif +-#endif private: + BigInt mnSpinSize; Index: vcl/inc/lstbox.hxx =================================================================== -RCS file: /cvs/gsl/vcl/inc/lstbox.hxx,v -retrieving revision 1.12 -retrieving revision 1.14 -diff -u -p -u -r1.12 -r1.14 ---- vcl/inc/lstbox.hxx 1 Nov 2002 09:00:27 -0000 1.12 -+++ vcl/inc/lstbox.hxx 18 May 2004 10:49:04 -0000 1.14 +--- vcl/inc/lstbox.hxx.orig 2004-09-12 14:26:21.703972960 +0200 ++++ vcl/inc/lstbox.hxx 2004-09-12 14:54:44.821059808 +0200 @@ -232,6 +232,9 @@ public: USHORT GetMaxMRUCount() const; @@ -2428,15 +2194,10 @@ diff -u -p -u -r1.12 -r1.14 }; - Index: vcl/inc/mapmod.hxx =================================================================== -RCS file: /cvs/gsl/vcl/inc/mapmod.hxx,v -retrieving revision 1.1.1.1 -retrieving revision 1.2 -diff -u -p -u -r1.1.1.1 -r1.2 ---- vcl/inc/mapmod.hxx 19 Sep 2000 10:23:05 -0000 1.1.1.1 -+++ vcl/inc/mapmod.hxx 7 Jan 2004 09:06:47 -0000 1.2 +--- vcl/inc/mapmod.hxx.orig 2004-09-12 14:26:21.704972808 +0200 ++++ vcl/inc/mapmod.hxx 2004-09-12 14:54:44.821059808 +0200 @@ -72,8 +72,8 @@ #ifndef _SV_SV_H #include <sv.h> @@ -2472,12 +2233,8 @@ diff -u -p -u -r1.1.1.1 -r1.2 MapMode(); Index: vcl/inc/menu.hxx =================================================================== -RCS file: /cvs/gsl/vcl/inc/menu.hxx,v -retrieving revision 1.26.112.1 -retrieving revision 1.30 -diff -u -p -u -r1.26.112.1 -r1.30 ---- vcl/inc/menu.hxx 13 Nov 2003 16:48:20 -0000 1.26.112.1 -+++ vcl/inc/menu.hxx 25 Feb 2004 17:29:29 -0000 1.30 +--- vcl/inc/menu.hxx.orig 2004-09-12 14:26:21.706972504 +0200 ++++ vcl/inc/menu.hxx 2004-09-12 14:54:44.823059504 +0200 @@ -66,20 +66,20 @@ #include <sv.h> #endif @@ -2505,8 +2262,7 @@ diff -u -p -u -r1.26.112.1 -r1.30 #endif #ifndef _VCL_VCLEVENT_HXX -@@ -103,7 +103,9 @@ class KeyEvent; - class AppBarWindow; +@@ -104,6 +104,8 @@ class AppBarWindow; class MenuFloatingWindow; class Window; class AccessObjectRef; @@ -2515,7 +2271,7 @@ diff -u -p -u -r1.26.112.1 -r1.30 namespace com { namespace sun { -@@ -126,11 +127,11 @@ namespace vcl { struct MenuLayoutData; } +@@ -126,11 +128,11 @@ namespace vcl { struct MenuLayoutData; } #define POPUPMENU_EXECUTE_LEFT ((USHORT)0x0004) #define POPUPMENU_EXECUTE_RIGHT ((USHORT)0x0008) @@ -2529,7 +2285,7 @@ diff -u -p -u -r1.26.112.1 -r1.30 typedef USHORT MenuItemBits; #define MIB_CHECKABLE ((MenuItemBits)0x0001) #define MIB_RADIOCHECK ((MenuItemBits)0x0002) -@@ -151,12 +152,10 @@ struct MenuLogo +@@ -151,12 +153,10 @@ struct MenuLogo BitmapEx aBitmap; Color aStartColor; Color aEndColor; @@ -2542,7 +2298,7 @@ diff -u -p -u -r1.26.112.1 -r1.30 friend class MenuBar; friend class MenuBarWindow; friend class MenuFloatingWindow; -@@ -164,6 +163,7 @@ class Menu : public Resource +@@ -164,6 +164,7 @@ class Menu : public Resource friend class SystemWindow; private: @@ -2550,7 +2306,7 @@ diff -u -p -u -r1.26.112.1 -r1.30 MenuItemList* pItemList; // Liste mit den MenuItems MenuLogo* pLogo; Menu* pStartedFrom; -@@ -180,7 +180,7 @@ private: +@@ -180,7 +181,7 @@ private: XubString aTitleText; // PopupMenu-Text ULONG nEventId; @@ -2559,7 +2315,7 @@ diff -u -p -u -r1.26.112.1 -r1.30 USHORT nMenuFlags; USHORT nDefaultItem; // Id vom Default-Item USHORT nSelectedId; -@@ -197,16 +197,14 @@ private: +@@ -197,16 +198,14 @@ private: ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > mxAccessible; mutable vcl::MenuLayoutData* mpLayoutData; @@ -2578,7 +2334,7 @@ diff -u -p -u -r1.26.112.1 -r1.30 Size ImplCalcSize( Window* pWin ); BOOL ImplIsVisible( USHORT nPos ) const; USHORT ImplGetVisibleItemCount() const; -@@ -220,11 +218,16 @@ protected: +@@ -220,11 +219,16 @@ protected: DECL_LINK( ImplCallSelect, Menu* ); void ImplFillLayoutData() const; @@ -2595,7 +2351,7 @@ diff -u -p -u -r1.26.112.1 -r1.30 Window* ImplGetWindow() const { return pWindow; } public: -@@ -315,7 +318,10 @@ public: +@@ -315,7 +319,10 @@ public: void SetTipHelpText( USHORT nItemId, const XubString& rString ); const XubString& GetTipHelpText( USHORT nItemId ) const; @@ -2607,7 +2363,7 @@ diff -u -p -u -r1.26.112.1 -r1.30 ULONG GetHelpId( USHORT nItemId ) const; void SetActivateHdl( const Link& rLink ) { aActivateHdl = rLink; } -@@ -342,6 +348,9 @@ public: +@@ -347,6 +354,9 @@ public: // Fuer Menu-'Funktionen' MenuItemList* GetItemList() const { return pItemList; } @@ -2617,7 +2373,7 @@ diff -u -p -u -r1.26.112.1 -r1.30 // accessibility helpers -@@ -393,14 +400,13 @@ public: +@@ -393,14 +403,13 @@ public: class MenuBar : public Menu { @@ -2633,7 +2389,7 @@ diff -u -p -u -r1.26.112.1 -r1.30 #if _SOLAR__PRIVATE friend class Application; -@@ -431,6 +437,10 @@ public: +@@ -431,6 +440,10 @@ public: void ShowButtons( BOOL bClose, BOOL bFloat, BOOL bHide ); void SelectEntry( USHORT nId ); @@ -2644,7 +2400,7 @@ diff -u -p -u -r1.26.112.1 -r1.30 void SetCloserHdl( const Link& rLink ) { maCloserHdl = rLink; } const Link& GetCloserHdl() const { return maCloserHdl; } -@@ -438,6 +448,14 @@ public: +@@ -438,6 +451,14 @@ public: const Link& GetFloatButtonClickHdl() const { return maFloatHdl; } void SetHideButtonClickHdl( const Link& rLink ) { maHideHdl = rLink; } const Link& GetHideButtonClickHdl() const { return maHideHdl; } @@ -2661,12 +2417,8 @@ diff -u -p -u -r1.26.112.1 -r1.30 inline MenuBar& MenuBar::operator =( const MenuBar& rMenu ) Index: vcl/inc/menubtn.hxx =================================================================== -RCS file: /cvs/gsl/vcl/inc/menubtn.hxx,v -retrieving revision 1.1.1.1 -retrieving revision 1.2 -diff -u -p -u -r1.1.1.1 -r1.2 ---- vcl/inc/menubtn.hxx 19 Sep 2000 10:23:05 -0000 1.1.1.1 -+++ vcl/inc/menubtn.hxx 7 Jan 2004 09:07:50 -0000 1.2 +--- vcl/inc/menubtn.hxx.orig 2004-09-12 14:26:21.707972352 +0200 ++++ vcl/inc/menubtn.hxx 2004-09-12 14:54:44.823059504 +0200 @@ -86,7 +86,6 @@ class MenuButton : public PushButton { private: @@ -2689,12 +2441,8 @@ diff -u -p -u -r1.1.1.1 -r1.2 void ImplInit( Window* pParent, WinBits nStyle ); Index: vcl/inc/metaact.hxx =================================================================== -RCS file: /cvs/gsl/vcl/inc/metaact.hxx,v -retrieving revision 1.4.252.1 -retrieving revision 1.7 -diff -u -p -u -r1.4.252.1 -r1.7 ---- vcl/inc/metaact.hxx 9 Jan 2004 18:13:40 -0000 1.4.252.1 -+++ vcl/inc/metaact.hxx 17 Jun 2004 12:05:02 -0000 1.7 +--- vcl/inc/metaact.hxx.orig 2004-09-12 14:26:21.709972048 +0200 ++++ vcl/inc/metaact.hxx 2004-09-12 14:54:44.825059200 +0200 @@ -74,8 +74,8 @@ #ifndef _SV_FONT_HXX #include <font.hxx> @@ -2735,12 +2483,8 @@ diff -u -p -u -r1.4.252.1 -r1.7 // ------------------------- Index: vcl/inc/msgbox.hxx =================================================================== -RCS file: /cvs/gsl/vcl/inc/msgbox.hxx,v -retrieving revision 1.5 -retrieving revision 1.6 -diff -u -p -u -r1.5 -r1.6 ---- vcl/inc/msgbox.hxx 24 Oct 2002 10:56:12 -0000 1.5 -+++ vcl/inc/msgbox.hxx 7 Jan 2004 09:08:49 -0000 1.6 +--- vcl/inc/msgbox.hxx.orig 2004-09-12 14:26:21.710971896 +0200 ++++ vcl/inc/msgbox.hxx 2004-09-12 14:54:44.826059048 +0200 @@ -118,12 +118,9 @@ protected: XubString maCheckBoxText; BOOL mbCheck; @@ -2800,12 +2544,8 @@ diff -u -p -u -r1.5 -r1.6 QueryBox( Window* pParent, WinBits nStyle, Index: vcl/inc/opengl.hxx =================================================================== -RCS file: /cvs/gsl/vcl/inc/opengl.hxx,v -retrieving revision 1.3 -retrieving revision 1.5 -diff -u -p -u -r1.3 -r1.5 ---- vcl/inc/opengl.hxx 15 Mar 2002 17:10:25 -0000 1.3 -+++ vcl/inc/opengl.hxx 7 Jan 2004 09:09:11 -0000 1.5 +--- vcl/inc/opengl.hxx.orig 2004-09-12 14:26:21.711971744 +0200 ++++ vcl/inc/opengl.hxx 2004-09-12 14:54:44.827058896 +0200 @@ -80,22 +80,13 @@ class RmOpenGL; class OpenGL { @@ -2832,12 +2572,8 @@ diff -u -p -u -r1.3 -r1.5 OpenGL( OutputDevice* pOutDev ); Index: vcl/inc/outdata.hxx =================================================================== -RCS file: /cvs/gsl/vcl/inc/outdata.hxx,v -retrieving revision 1.1.1.1 -retrieving revision 1.3 -diff -u -p -u -r1.1.1.1 -r1.3 ---- vcl/inc/outdata.hxx 19 Sep 2000 10:23:05 -0000 1.1.1.1 -+++ vcl/inc/outdata.hxx 7 Jan 2004 09:09:31 -0000 1.3 +--- vcl/inc/outdata.hxx.orig 2004-09-12 14:26:21.712971592 +0200 ++++ vcl/inc/outdata.hxx 2004-09-12 14:54:44.827058896 +0200 @@ -66,8 +66,8 @@ #include <sv.h> #endif @@ -2864,12 +2600,8 @@ diff -u -p -u -r1.1.1.1 -r1.3 { Index: vcl/inc/outdev.h =================================================================== -RCS file: /cvs/gsl/vcl/inc/outdev.h,v -retrieving revision 1.13 -retrieving revision 1.14 -diff -u -p -u -r1.13 -r1.14 ---- vcl/inc/outdev.h 27 Mar 2003 17:57:25 -0000 1.13 -+++ vcl/inc/outdev.h 7 Jan 2004 09:09:50 -0000 1.14 +--- vcl/inc/outdev.h.orig 2004-09-12 14:26:21.713971440 +0200 ++++ vcl/inc/outdev.h 2004-09-12 14:54:44.828058744 +0200 @@ -263,7 +263,6 @@ private: ImplFontEntry* mpFirstEntry; USHORT mnRef0Count; @@ -2880,12 +2612,8 @@ diff -u -p -u -r1.13 -r1.14 ImplFontCache( BOOL bPrinter ); Index: vcl/inc/outdev.hxx =================================================================== -RCS file: /cvs/gsl/vcl/inc/outdev.hxx,v -retrieving revision 1.40 -retrieving revision 1.51 -diff -u -p -u -r1.40 -r1.51 ---- vcl/inc/outdev.hxx 6 Jun 2003 10:29:59 -0000 1.40 -+++ vcl/inc/outdev.hxx 17 Jun 2004 12:05:32 -0000 1.51 +--- vcl/inc/outdev.hxx.orig 2004-09-12 14:26:21.717970832 +0200 ++++ vcl/inc/outdev.hxx 2004-09-12 14:54:44.832058136 +0200 @@ -71,11 +71,11 @@ #ifndef _SV_SV_H #include <sv.h> @@ -2921,8 +2649,7 @@ diff -u -p -u -r1.40 -r1.51 class Gradient; class Hatch; class Bitmap; -@@ -139,7 +138,10 @@ namespace awt { - typedef std::vector< Rectangle > MetricVector; +@@ -147,6 +146,9 @@ typedef std::vector< Rectangle > MetricV namespace vcl { class PDFWriterImpl; } @@ -2932,7 +2659,7 @@ diff -u -p -u -r1.40 -r1.51 // --------------------- // - OutputDevice-Data - // --------------------- -@@ -196,7 +194,9 @@ struct KerningPair +@@ -196,7 +198,9 @@ struct KerningPair #define PUSH_TEXTALIGN ((USHORT)0x0100) #define PUSH_REFPOINT ((USHORT)0x0200) #define PUSH_TEXTLINECOLOR ((USHORT)0x0400) @@ -2943,7 +2670,7 @@ diff -u -p -u -r1.40 -r1.51 #define PUSH_ALLFONT (PUSH_ALLTEXT | PUSH_FONT) #define PUSH_ALL ((USHORT)0xFFFF) -@@ -224,10 +224,11 @@ struct KerningPair +@@ -224,10 +228,11 @@ struct KerningPair #define IMAGE_DRAW_DISABLE ((USHORT)0x0001) #define IMAGE_DRAW_HIGHLIGHT ((USHORT)0x0002) #define IMAGE_DRAW_DEACTIVE ((USHORT)0x0004) @@ -2957,7 +2684,7 @@ diff -u -p -u -r1.40 -r1.51 #define IMAGE_DRAW_BTNLOOK 0 // WaveLine -@@ -327,20 +328,24 @@ enum OutDevViewType { OUTDEV_VIEWTYPE_DO +@@ -327,20 +332,24 @@ enum OutDevViewType { OUTDEV_VIEWTYPE_DO class OutputDevice : public Resource { @@ -2993,7 +2720,7 @@ diff -u -p -u -r1.40 -r1.51 mutable OutputDevice* mpPrevGraphics; mutable OutputDevice* mpNextGraphics; GDIMetaFile* mpMetaFile; -@@ -354,7 +359,10 @@ private: +@@ -354,7 +363,10 @@ private: List* mpUnoGraphicsList; OutDev3D* mp3DContext; vcl::PDFWriterImpl* mpPDFWriter; @@ -3005,7 +2732,7 @@ diff -u -p -u -r1.40 -r1.51 /// Additional output pixel offset, applied in LogicToPixel (used by SetPixelOffset/GetPixelOffset) long mnOutOffOrigX; /// Additional output offset in _logical_ coordinates, applied in PixelToLogic (used by SetPixelOffset/GetPixelOffset) -@@ -369,8 +377,8 @@ private: +@@ -369,8 +381,8 @@ private: long mnOutOffY; long mnOutWidth; long mnOutHeight; @@ -3016,7 +2743,7 @@ diff -u -p -u -r1.40 -r1.51 /// Output offset for text alignment in pixel long mnTextOffX; /// Output offset for text alignment in pixel -@@ -379,7 +387,6 @@ private: +@@ -379,7 +391,6 @@ private: long mnEmphasisDescent; ULONG mnDrawMode; ULONG mnTextLayoutMode; @@ -3024,7 +2751,7 @@ diff -u -p -u -r1.40 -r1.51 ImplMapRes maMapRes; ImplThresholdRes maThresRes; OutDevType meOutDevType; -@@ -389,7 +396,6 @@ private: +@@ -389,7 +400,6 @@ private: Color maFillColor; Font maFont; Color maTextColor; @@ -3032,7 +2759,7 @@ diff -u -p -u -r1.40 -r1.51 Color maTextLineColor; TextAlign meTextAlign; RasterOp meRasterOp; -@@ -399,8 +405,6 @@ private: +@@ -399,8 +409,6 @@ private: Point maRefPoint; USHORT mnAntialiasing; LanguageType meTextLanguage; @@ -3041,7 +2768,7 @@ diff -u -p -u -r1.40 -r1.51 mutable BOOL mbMap:1, mbMapIsDefault:1, mbClipRegion:1, -@@ -421,12 +425,121 @@ private: +@@ -421,12 +429,121 @@ private: mbTextLines:1, mbTextSpecial:1, mbRefPoint:1, @@ -3167,7 +2894,7 @@ diff -u -p -u -r1.40 -r1.51 #endif protected: -@@ -459,15 +572,15 @@ public: +@@ -459,15 +576,15 @@ public: xub_StrLen nLen = STRING_LEN ) const; long GetTextHeight() const; void DrawTextArray( const Point& rStartPt, const XubString& rStr, @@ -3187,7 +2914,7 @@ diff -u -p -u -r1.40 -r1.51 BOOL bCellBreaking = TRUE ) const; void DrawStretchText( const Point& rStartPt, ULONG nWidth, const XubString& rStr, -@@ -505,10 +618,10 @@ public: +@@ -505,10 +622,10 @@ public: xub_StrLen nLen = STRING_LEN ) const; BOOL GetTextOutline( PolyPolygon&, const String& rStr, xub_StrLen nBase = 0, xub_StrLen nIndex = 0, @@ -3200,7 +2927,7 @@ diff -u -p -u -r1.40 -r1.51 BOOL GetGlyphBoundRects( const Point& rOrigin, const String& rStr, int nIndex, int nLen, int nBase, MetricVector& rVector ); -@@ -517,10 +630,52 @@ public: +@@ -526,10 +643,52 @@ public: void DrawLine( const Point& rStartPt, const Point& rEndPt ); void DrawLine( const Point& rStartPt, const Point& rEndPt, const LineInfo& rLineInfo ); @@ -3253,7 +2980,7 @@ diff -u -p -u -r1.40 -r1.51 void DrawPolyPolygon( const PolyPolygon& rPolyPoly ); void DrawRect( const Rectangle& rRect ); void DrawRect( const Rectangle& rRect, -@@ -606,17 +755,21 @@ public: +@@ -606,17 +765,21 @@ public: Bitmap GetBitmap( const Point& rSrcPt, const Size& rSize ) const; @@ -3278,7 +3005,7 @@ diff -u -p -u -r1.40 -r1.51 BOOL IsOutputEnabled() const { return mbOutput; } BOOL IsDeviceOutput() const { return mbDevOutput; } BOOL IsDeviceOutputNecessary() const { return (mbOutput && mbDevOutput); } -@@ -676,7 +829,7 @@ public: +@@ -676,7 +839,7 @@ public: void SetFont( const Font& rNewFont ); const Font& GetFont() const { return maFont; } void SetTextColor( const Color& rColor ); @@ -3287,7 +3014,7 @@ diff -u -p -u -r1.40 -r1.51 void SetTextFillColor(); void SetTextFillColor( const Color& rColor ); -@@ -689,6 +842,6 @@ public: +@@ -689,7 +852,7 @@ public: void SetTextAlign( TextAlign eAlign ); TextAlign GetTextAlign() const { return maFont.GetAlign(); } @@ -3295,7 +3022,8 @@ diff -u -p -u -r1.40 -r1.51 + void SetSettings( const AllSettings& rSettings ); const AllSettings& GetSettings() const { return maSettings; } -@@ -811,6 +953,11 @@ public: + #ifndef NOOLDSV +@@ -811,6 +974,11 @@ public: Size GetOutputSizePixel() const { return Size( mnOutWidth, mnOutHeight ); } @@ -3307,7 +3035,9 @@ diff -u -p -u -r1.40 -r1.51 Size GetOutputSize() const { return PixelToLogic( GetOutputSizePixel() ); } -@@ -831,9 +978,22 @@ public: +@@ -836,11 +1004,24 @@ public: + #endif + USHORT GetBitCount() const; + + /** Query the existence and depth of the alpha channel @@ -3330,15 +3060,10 @@ diff -u -p -u -r1.40 -r1.51 void DrawEPS( const Point& rPt, const Size& rSz, const GfxLink& rGfxLink, GDIMetaFile* pSubst = NULL ); - Index: vcl/inc/pdfwriter.hxx =================================================================== -RCS file: /cvs/gsl/vcl/inc/pdfwriter.hxx,v -retrieving revision 1.6 -retrieving revision 1.8 -diff -u -p -u -r1.6 -r1.8 ---- vcl/inc/pdfwriter.hxx 28 May 2003 12:29:54 -0000 1.6 -+++ vcl/inc/pdfwriter.hxx 17 Jun 2004 12:05:47 -0000 1.8 +--- vcl/inc/pdfwriter.hxx.orig 2004-09-12 14:26:21.718970680 +0200 ++++ vcl/inc/pdfwriter.hxx 2004-09-12 14:54:44.833057984 +0200 @@ -73,7 +73,7 @@ #ifndef _STRING_HXX #include <tools/string.hxx> @@ -3359,10 +3084,8 @@ diff -u -p -u -r1.6 -r1.8 void DrawStretchText( const Point& rStartPt, ULONG nWidth, Index: vcl/inc/pngread.hxx =================================================================== -RCS file: vcl/inc/pngread.hxx -diff -N vcl/inc/pngread.hxx ---- /dev/null 1 Jan 1970 00:00:00 -0000 -+++ vcl/inc/pngread.hxx 28 Jun 2004 16:05:43 -0000 1.3 +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ vcl/inc/pngread.hxx 2004-09-12 14:54:44.833057984 +0200 @@ -0,0 +1,101 @@ +/************************************************************************* + * @@ -3467,10 +3190,8 @@ diff -N vcl/inc/pngread.hxx +#endif // _SV_PNGREAD_HXX Index: vcl/inc/pngwrite.hxx =================================================================== -RCS file: vcl/inc/pngwrite.hxx -diff -N vcl/inc/pngwrite.hxx ---- /dev/null 1 Jan 1970 00:00:00 -0000 -+++ vcl/inc/pngwrite.hxx 28 Jun 2004 16:05:57 -0000 1.3 +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ vcl/inc/pngwrite.hxx 2004-09-12 14:54:44.834057832 +0200 @@ -0,0 +1,106 @@ +/************************************************************************* + * @@ -3580,12 +3301,8 @@ diff -N vcl/inc/pngwrite.hxx +#endif // _SV_PNGWRITE_HXX Index: vcl/inc/print.hxx =================================================================== -RCS file: /cvs/gsl/vcl/inc/print.hxx,v -retrieving revision 1.17 -retrieving revision 1.19 -diff -u -p -u -r1.17 -r1.19 ---- vcl/inc/print.hxx 27 Mar 2003 17:57:29 -0000 1.17 -+++ vcl/inc/print.hxx 7 Jan 2004 09:11:49 -0000 1.19 +--- vcl/inc/print.hxx.orig 2004-09-12 14:26:21.721970224 +0200 ++++ vcl/inc/print.hxx 2004-09-12 14:54:44.835057680 +0200 @@ -85,12 +85,9 @@ #include <tools/stream.hxx> #endif @@ -3685,12 +3402,8 @@ diff -u -p -u -r1.17 -r1.19 public: Index: vcl/inc/regband.hxx =================================================================== -RCS file: /cvs/gsl/vcl/inc/regband.hxx,v -retrieving revision 1.1.1.1 -retrieving revision 1.2 -diff -u -p -u -r1.1.1.1 -r1.2 ---- vcl/inc/regband.hxx 19 Sep 2000 10:23:06 -0000 1.1.1.1 -+++ vcl/inc/regband.hxx 7 Jan 2004 09:13:14 -0000 1.2 +--- vcl/inc/regband.hxx.orig 2004-09-12 14:26:21.722970072 +0200 ++++ vcl/inc/regband.hxx 2004-09-12 14:54:44.836057528 +0200 @@ -65,8 +65,8 @@ #ifndef _SV_SV_H #include <sv.h> @@ -3704,12 +3417,8 @@ diff -u -p -u -r1.1.1.1 -r1.2 /* ======================================================================= Index: vcl/inc/region.h =================================================================== -RCS file: /cvs/gsl/vcl/inc/region.h,v -retrieving revision 1.1.1.1 -retrieving revision 1.2 -diff -u -p -u -r1.1.1.1 -r1.2 ---- vcl/inc/region.h 19 Sep 2000 10:23:06 -0000 1.1.1.1 -+++ vcl/inc/region.h 7 Jan 2004 09:13:32 -0000 1.2 +--- vcl/inc/region.h.orig 2004-09-12 14:26:21.722970072 +0200 ++++ vcl/inc/region.h 2004-09-12 14:54:44.836057528 +0200 @@ -68,8 +68,8 @@ #ifndef _SV_REGBAND_HXX #include <regband.hxx> @@ -3723,12 +3432,8 @@ diff -u -p -u -r1.1.1.1 -r1.2 #ifndef _SV_REGION_HXX Index: vcl/inc/region.hxx =================================================================== -RCS file: /cvs/gsl/vcl/inc/region.hxx,v -retrieving revision 1.3 -retrieving revision 1.5 -diff -u -p -u -r1.3 -r1.5 ---- vcl/inc/region.hxx 18 Jun 2001 12:53:13 -0000 1.3 -+++ vcl/inc/region.hxx 7 Jan 2004 09:13:51 -0000 1.5 +--- vcl/inc/region.hxx.orig 2004-09-12 14:26:21.728969160 +0200 ++++ vcl/inc/region.hxx 2004-09-12 14:54:44.837057376 +0200 @@ -91,11 +91,30 @@ typedef long RegionHandle; class Region @@ -3775,10 +3480,8 @@ diff -u -p -u -r1.3 -r1.5 #endif // _SV_REGION_HXX Index: vcl/inc/salbmp.hxx =================================================================== -RCS file: vcl/inc/salbmp.hxx -diff -N vcl/inc/salbmp.hxx ---- /dev/null 1 Jan 1970 00:00:00 -0000 -+++ vcl/inc/salbmp.hxx 18 Nov 2003 14:28:29 -0000 1.2 +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ vcl/inc/salbmp.hxx 2004-09-12 14:54:44.838057224 +0200 @@ -0,0 +1,96 @@ +/************************************************************************* + * @@ -3878,10 +3581,8 @@ diff -N vcl/inc/salbmp.hxx +#endif Index: vcl/inc/salctrlhandle.hxx =================================================================== -RCS file: vcl/inc/salctrlhandle.hxx -diff -N vcl/inc/salctrlhandle.hxx ---- /dev/null 1 Jan 1970 00:00:00 -0000 -+++ vcl/inc/salctrlhandle.hxx 10 May 2004 15:42:11 -0000 1.2 +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ vcl/inc/salctrlhandle.hxx 2004-09-12 14:54:44.838057224 +0200 @@ -0,0 +1,82 @@ +/************************************************************************* + * @@ -3967,12 +3668,8 @@ diff -N vcl/inc/salctrlhandle.hxx +#endif Index: vcl/inc/salframe.hxx =================================================================== -RCS file: /cvs/gsl/vcl/inc/salframe.hxx,v -retrieving revision 1.16 -retrieving revision 1.19 -diff -u -p -u -r1.16 -r1.19 ---- vcl/inc/salframe.hxx 24 Apr 2003 15:16:48 -0000 1.16 -+++ vcl/inc/salframe.hxx 10 May 2004 15:42:24 -0000 1.19 +--- vcl/inc/salframe.hxx.orig 2004-09-12 14:26:21.732968552 +0200 ++++ vcl/inc/salframe.hxx 2004-09-12 14:54:44.839057072 +0200 @@ -80,9 +80,6 @@ #ifndef _SV_SALWTYPE_HXX #include <salwtype.hxx> @@ -4202,12 +3899,8 @@ diff -u -p -u -r1.16 -r1.19 Index: vcl/inc/salgdi.hxx =================================================================== -RCS file: /cvs/gsl/vcl/inc/salgdi.hxx,v -retrieving revision 1.20.116.1 -retrieving revision 1.24 -diff -u -p -u -r1.20.116.1 -r1.24 ---- vcl/inc/salgdi.hxx 9 Jan 2004 18:13:40 -0000 1.20.116.1 -+++ vcl/inc/salgdi.hxx 17 Jun 2004 12:07:14 -0000 1.24 +--- vcl/inc/salgdi.hxx.orig 2004-09-12 14:26:21.735968096 +0200 ++++ vcl/inc/salgdi.hxx 2004-09-12 14:54:44.842056616 +0200 @@ -72,15 +72,21 @@ #ifndef _SV_SALGTYPE_HXX #include <salgtype.hxx> @@ -4713,10 +4406,8 @@ diff -u -p -u -r1.20.116.1 -r1.24 #endif // _SV_SALGDI_HXX Index: vcl/inc/salimestatus.hxx =================================================================== -RCS file: vcl/inc/salimestatus.hxx -diff -N vcl/inc/salimestatus.hxx ---- /dev/null 1 Jan 1970 00:00:00 -0000 -+++ vcl/inc/salimestatus.hxx 18 Nov 2003 14:29:06 -0000 1.2 +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ vcl/inc/salimestatus.hxx 2004-09-12 14:54:44.843056464 +0200 @@ -0,0 +1,77 @@ +/************************************************************************* + * @@ -4797,12 +4488,8 @@ diff -N vcl/inc/salimestatus.hxx +#endif Index: vcl/inc/salinst.hxx =================================================================== -RCS file: /cvs/gsl/vcl/inc/salinst.hxx,v -retrieving revision 1.6.280.1 -retrieving revision 1.10 -diff -u -p -u -r1.6.280.1 -r1.10 ---- vcl/inc/salinst.hxx 2 Mar 2004 10:00:22 -0000 1.6.280.1 -+++ vcl/inc/salinst.hxx 18 May 2004 10:49:17 -0000 1.10 +--- vcl/inc/salinst.hxx.orig 2004-09-12 14:26:21.738967640 +0200 ++++ vcl/inc/salinst.hxx 2004-09-12 14:54:44.845056160 +0200 @@ -67,15 +67,11 @@ #ifndef _STRING_HXX #include <tools/string.hxx> @@ -5029,12 +4716,8 @@ diff -u -p -u -r1.6.280.1 -r1.10 void DeInitSalMain(); Index: vcl/inc/sallayout.hxx =================================================================== -RCS file: /cvs/gsl/vcl/inc/sallayout.hxx,v -retrieving revision 1.31.68.1 -retrieving revision 1.36 -diff -u -p -u -r1.31.68.1 -r1.36 ---- vcl/inc/sallayout.hxx 9 Jan 2004 18:13:41 -0000 1.31.68.1 -+++ vcl/inc/sallayout.hxx 17 Jun 2004 12:07:38 -0000 1.36 +--- vcl/inc/sallayout.hxx.orig 2004-09-12 14:26:21.739967488 +0200 ++++ vcl/inc/sallayout.hxx 2004-09-12 14:54:44.846056008 +0200 @@ -63,10 +63,10 @@ #define _SV_SALLAYOUT_HXX @@ -5151,10 +4834,8 @@ diff -u -p -u -r1.31.68.1 -r1.36 GlyphItem* mpGlyphItems; // TODO: change to GlyphList Index: vcl/inc/salmenu.hxx =================================================================== -RCS file: vcl/inc/salmenu.hxx -diff -N vcl/inc/salmenu.hxx ---- /dev/null 1 Jan 1970 00:00:00 -0000 -+++ vcl/inc/salmenu.hxx 7 Jan 2004 09:17:01 -0000 1.4 +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ vcl/inc/salmenu.hxx 2004-09-12 14:54:44.846056008 +0200 @@ -0,0 +1,122 @@ +/************************************************************************* + * @@ -5280,10 +4961,8 @@ diff -N vcl/inc/salmenu.hxx + Index: vcl/inc/salnativewidgets.hxx =================================================================== -RCS file: vcl/inc/salnativewidgets.hxx -diff -N vcl/inc/salnativewidgets.hxx ---- /dev/null 1 Jan 1970 00:00:00 -0000 -+++ vcl/inc/salnativewidgets.hxx 10 May 2004 15:42:51 -0000 1.2 +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ vcl/inc/salnativewidgets.hxx 2004-09-12 14:54:44.848055704 +0200 @@ -0,0 +1,367 @@ +/************************************************************************* + * @@ -5654,12 +5333,8 @@ diff -N vcl/inc/salnativewidgets.hxx + Index: vcl/inc/salobj.hxx =================================================================== -RCS file: /cvs/gsl/vcl/inc/salobj.hxx,v -retrieving revision 1.1.1.1 -retrieving revision 1.2 -diff -u -p -u -r1.1.1.1 -r1.2 ---- vcl/inc/salobj.hxx 19 Sep 2000 10:23:06 -0000 1.1.1.1 -+++ vcl/inc/salobj.hxx 18 Nov 2003 14:29:32 -0000 1.2 +--- vcl/inc/salobj.hxx.orig 2004-09-12 14:26:21.742967032 +0200 ++++ vcl/inc/salobj.hxx 2004-09-12 14:54:44.848055704 +0200 @@ -71,9 +71,6 @@ #ifndef _SV_SALWTYPE_HXX #include <salwtype.hxx> @@ -5735,10 +5410,8 @@ diff -u -p -u -r1.1.1.1 -r1.2 #endif // _SV_SALOBJ_HXX Index: vcl/inc/salogl.hxx =================================================================== -RCS file: vcl/inc/salogl.hxx -diff -N vcl/inc/salogl.hxx ---- /dev/null 1 Jan 1970 00:00:00 -0000 -+++ vcl/inc/salogl.hxx 18 Nov 2003 14:29:40 -0000 1.2 +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ vcl/inc/salogl.hxx 2004-09-12 14:54:44.849055552 +0200 @@ -0,0 +1,109 @@ +/************************************************************************* + * @@ -5851,12 +5524,8 @@ diff -N vcl/inc/salogl.hxx +#endif Index: vcl/inc/salprn.hxx =================================================================== -RCS file: /cvs/gsl/vcl/inc/salprn.hxx,v -retrieving revision 1.4 -retrieving revision 1.5 -diff -u -p -u -r1.4 -r1.5 ---- vcl/inc/salprn.hxx 20 Nov 2002 12:03:33 -0000 1.4 -+++ vcl/inc/salprn.hxx 18 Nov 2003 14:29:49 -0000 1.5 +--- vcl/inc/salprn.hxx.orig 2004-09-12 14:26:21.746966424 +0200 ++++ vcl/inc/salprn.hxx 2004-09-12 14:54:44.850055400 +0200 @@ -69,9 +69,6 @@ #ifndef _SV_SV_H #include <sv.h> @@ -5984,13 +5653,10 @@ diff -u -p -u -r1.4 -r1.5 }; #endif // _SV_SALPRN_HXX - Index: vcl/inc/salsound.hxx =================================================================== -RCS file: vcl/inc/salsound.hxx -diff -N vcl/inc/salsound.hxx ---- /dev/null 1 Jan 1970 00:00:00 -0000 -+++ vcl/inc/salsound.hxx 18 Nov 2003 14:29:57 -0000 1.2 +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ vcl/inc/salsound.hxx 2004-09-12 14:54:44.851055248 +0200 @@ -0,0 +1,119 @@ +/************************************************************************* + * @@ -6113,12 +5779,8 @@ diff -N vcl/inc/salsound.hxx +#endif Index: vcl/inc/salsys.hxx =================================================================== -RCS file: /cvs/gsl/vcl/inc/salsys.hxx,v -retrieving revision 1.7 -retrieving revision 1.9 -diff -u -p -u -r1.7 -r1.9 ---- vcl/inc/salsys.hxx 20 Nov 2002 15:45:04 -0000 1.7 -+++ vcl/inc/salsys.hxx 7 Jan 2004 09:17:24 -0000 1.9 +--- vcl/inc/salsys.hxx.orig 2004-09-12 14:26:21.748966120 +0200 ++++ vcl/inc/salsys.hxx 2004-09-12 14:54:44.851055248 +0200 @@ -65,44 +65,9 @@ #ifndef _STRING_HXX #include <tools/string.hxx> @@ -6253,12 +5915,8 @@ diff -u -p -u -r1.7 -r1.9 #endif // _SV_SALSYS_HXX Index: vcl/inc/saltimer.hxx =================================================================== -RCS file: /cvs/gsl/vcl/inc/saltimer.hxx,v -retrieving revision 1.1.1.1 -retrieving revision 1.2 -diff -u -p -u -r1.1.1.1 -r1.2 ---- vcl/inc/saltimer.hxx 19 Sep 2000 10:23:06 -0000 1.1.1.1 -+++ vcl/inc/saltimer.hxx 18 Nov 2003 14:30:19 -0000 1.2 +--- vcl/inc/saltimer.hxx.orig 2004-09-12 14:26:21.749965968 +0200 ++++ vcl/inc/saltimer.hxx 2004-09-12 14:54:44.852055096 +0200 @@ -73,15 +73,34 @@ // - SalTimer - // ------------ @@ -6300,12 +5958,8 @@ diff -u -p -u -r1.1.1.1 -r1.2 #endif // _SV_SALTIMER_HXX Index: vcl/inc/salvd.hxx =================================================================== -RCS file: /cvs/gsl/vcl/inc/salvd.hxx,v -retrieving revision 1.1.1.1 -retrieving revision 1.2 -diff -u -p -u -r1.1.1.1 -r1.2 ---- vcl/inc/salvd.hxx 19 Sep 2000 10:23:06 -0000 1.1.1.1 -+++ vcl/inc/salvd.hxx 18 Nov 2003 14:30:29 -0000 1.2 +--- vcl/inc/salvd.hxx.orig 2004-09-12 14:26:21.750965816 +0200 ++++ vcl/inc/salvd.hxx 2004-09-12 14:54:44.852055096 +0200 @@ -65,9 +65,6 @@ #ifndef _SV_SV_H #include <sv.h> @@ -6351,12 +6005,8 @@ diff -u -p -u -r1.1.1.1 -r1.2 #endif // _SV_SALVD_HXX Index: vcl/inc/salwtype.hxx =================================================================== -RCS file: /cvs/gsl/vcl/inc/salwtype.hxx,v -retrieving revision 1.11 -retrieving revision 1.12 -diff -u -p -u -r1.11 -r1.12 ---- vcl/inc/salwtype.hxx 27 Mar 2003 17:57:31 -0000 1.11 -+++ vcl/inc/salwtype.hxx 18 Nov 2003 14:56:54 -0000 1.12 +--- vcl/inc/salwtype.hxx.orig 2004-09-12 14:26:21.751965664 +0200 ++++ vcl/inc/salwtype.hxx 2004-09-12 14:54:44.853054944 +0200 @@ -147,7 +147,11 @@ struct ImplFontSelectData; #define SALEVENT_CLOSEPOPUPS ((USHORT)30) #define SALEVENT_EXTERNALKEYINPUT ((USHORT)31) @@ -6370,28 +6020,24 @@ diff -u -p -u -r1.11 -r1.12 // MOUSELEAVE must send, when the pointer leave the client area and // the mouse is not captured -@@ -169,6 +173,13 @@ struct SalKeyEvent - USHORT mnCode; // SV-KeyCode (KEY_xxx | KEY_SHIFT | KEY_MOD1 | KEY_MOD2) - USHORT mnCharCode; // SV-CharCode +@@ -171,6 +175,13 @@ struct SalKeyEvent USHORT mnRepeat; // Repeat-Count (KeyInputs-1) -+}; -+ + }; + +// MENUEVENT +struct SalMenuEvent +{ + USHORT mnId; // Menu item ID + void* mpMenu; // pointer to VCL menu (class Menu) - }; - ++}; ++ // KEYMODCHANGE + struct SalKeyModEvent + { Index: vcl/inc/scrbar.hxx =================================================================== -RCS file: /cvs/gsl/vcl/inc/scrbar.hxx,v -retrieving revision 1.5 -retrieving revision 1.10 -diff -u -p -u -r1.5 -r1.10 ---- vcl/inc/scrbar.hxx 25 Jul 2001 11:39:21 -0000 1.5 -+++ vcl/inc/scrbar.hxx 10 May 2004 15:43:03 -0000 1.10 +--- vcl/inc/scrbar.hxx.orig 2004-09-12 14:26:21.752965512 +0200 ++++ vcl/inc/scrbar.hxx 2004-09-12 14:54:44.854054792 +0200 @@ -69,6 +69,8 @@ #include <ctrl.hxx> #endif @@ -6478,12 +6124,8 @@ diff -u -p -u -r1.5 -r1.10 ScrollBarBox( Window* pParent, WinBits nStyle = 0 ); Index: vcl/inc/settings.hxx =================================================================== -RCS file: /cvs/gsl/vcl/inc/settings.hxx,v -retrieving revision 1.19 -retrieving revision 1.23 -diff -u -p -u -r1.19 -r1.23 ---- vcl/inc/settings.hxx 17 Apr 2003 15:16:59 -0000 1.19 -+++ vcl/inc/settings.hxx 10 Jun 2004 17:17:43 -0000 1.23 +--- vcl/inc/settings.hxx.orig 2004-09-12 14:26:21.756964904 +0200 ++++ vcl/inc/settings.hxx 2004-09-12 14:54:44.858054184 +0200 @@ -69,8 +69,8 @@ #ifndef _SV_SV_H #include <sv.h> @@ -6790,12 +6432,8 @@ diff -u -p -u -r1.19 -r1.23 // --------------- Index: vcl/inc/slider.hxx =================================================================== -RCS file: /cvs/gsl/vcl/inc/slider.hxx,v -retrieving revision 1.1.1.1 -retrieving revision 1.2 -diff -u -p -u -r1.1.1.1 -r1.2 ---- vcl/inc/slider.hxx 19 Sep 2000 10:23:07 -0000 1.1.1.1 -+++ vcl/inc/slider.hxx 7 Jan 2004 09:18:32 -0000 1.2 +--- vcl/inc/slider.hxx.orig 2004-09-12 14:26:21.757964752 +0200 ++++ vcl/inc/slider.hxx 2004-09-12 14:54:44.859054032 +0200 @@ -106,7 +106,6 @@ private: Link maSlideHdl; Link maEndSlideHdl; @@ -6814,12 +6452,8 @@ diff -u -p -u -r1.1.1.1 -r1.2 Slider( Window* pParent, WinBits nStyle = WB_HORZ ); Index: vcl/inc/sound.hxx =================================================================== -RCS file: /cvs/gsl/vcl/inc/sound.hxx,v -retrieving revision 1.3 -retrieving revision 1.5 -diff -u -p -u -r1.3 -r1.5 ---- vcl/inc/sound.hxx 13 Jun 2001 10:52:47 -0000 1.3 -+++ vcl/inc/sound.hxx 7 Jan 2004 09:19:13 -0000 1.5 +--- vcl/inc/sound.hxx.orig 2004-09-12 14:26:21.758964600 +0200 ++++ vcl/inc/sound.hxx 2004-09-12 14:54:44.859054032 +0200 @@ -92,15 +92,10 @@ class Sound { private: @@ -6857,12 +6491,8 @@ diff -u -p -u -r1.3 -r1.5 void Play(); Index: vcl/inc/spin.h =================================================================== -RCS file: /cvs/gsl/vcl/inc/spin.h,v -retrieving revision 1.1.1.1 -retrieving revision 1.2 -diff -u -p -u -r1.1.1.1 -r1.2 ---- vcl/inc/spin.h 19 Sep 2000 10:23:07 -0000 1.1.1.1 -+++ vcl/inc/spin.h 11 Dec 2003 11:51:45 -0000 1.2 +--- vcl/inc/spin.h.orig 2004-09-12 14:26:21.759964448 +0200 ++++ vcl/inc/spin.h 2004-09-12 14:54:44.860053880 +0200 @@ -82,6 +82,6 @@ void ImplDrawSpinButton( OutputDevice* p BOOL bUpperIn, BOOL bLowerIn, BOOL bUpperEnabled = TRUE, @@ -6873,12 +6503,8 @@ diff -u -p -u -r1.1.1.1 -r1.2 #endif // _SV_SPIN_H Index: vcl/inc/spin.hxx =================================================================== -RCS file: /cvs/gsl/vcl/inc/spin.hxx,v -retrieving revision 1.1.1.1 -retrieving revision 1.4 -diff -u -p -u -r1.1.1.1 -r1.4 ---- vcl/inc/spin.hxx 19 Sep 2000 10:23:07 -0000 1.1.1.1 -+++ vcl/inc/spin.hxx 10 May 2004 15:43:29 -0000 1.4 +--- vcl/inc/spin.hxx.orig 2004-09-12 14:26:21.760964296 +0200 ++++ vcl/inc/spin.hxx 2004-09-12 14:54:44.861053728 +0200 @@ -82,19 +82,24 @@ private: AutoTimer maRepeatTimer; Rectangle maUpperRect; @@ -6960,12 +6586,8 @@ diff -u -p -u -r1.1.1.1 -r1.4 #endif // _SV_SPIN_HXX Index: vcl/inc/spinfld.hxx =================================================================== -RCS file: /cvs/gsl/vcl/inc/spinfld.hxx,v -retrieving revision 1.3 -retrieving revision 1.6 -diff -u -p -u -r1.3 -r1.6 ---- vcl/inc/spinfld.hxx 3 May 2002 13:04:10 -0000 1.3 -+++ vcl/inc/spinfld.hxx 10 May 2004 15:43:41 -0000 1.6 +--- vcl/inc/spinfld.hxx.orig 2004-09-12 14:26:21.761964144 +0200 ++++ vcl/inc/spinfld.hxx 2004-09-12 14:54:44.861053728 +0200 @@ -97,16 +97,12 @@ protected: mbLowerIn:1, mbInDropDown:1; @@ -7001,12 +6623,8 @@ diff -u -p -u -r1.3 -r1.6 const Link& GetUpHdl() const { return maUpHdlLink; } Index: vcl/inc/split.hxx =================================================================== -RCS file: /cvs/gsl/vcl/inc/split.hxx,v -retrieving revision 1.7 -retrieving revision 1.8 -diff -u -p -u -r1.7 -r1.8 ---- vcl/inc/split.hxx 14 Aug 2002 14:06:39 -0000 1.7 -+++ vcl/inc/split.hxx 7 Jan 2004 09:20:22 -0000 1.8 +--- vcl/inc/split.hxx.orig 2004-09-12 14:26:21.761964144 +0200 ++++ vcl/inc/split.hxx 2004-09-12 14:54:44.862053576 +0200 @@ -92,7 +92,6 @@ private: Link maStartSplitHdl; Link maSplitHdl; @@ -7025,12 +6643,8 @@ diff -u -p -u -r1.7 -r1.8 void ImplInit( Window* pParent, WinBits nWinStyle ); Index: vcl/inc/splitwin.hxx =================================================================== -RCS file: /cvs/gsl/vcl/inc/splitwin.hxx,v -retrieving revision 1.2 -retrieving revision 1.3 -diff -u -p -u -r1.2 -r1.3 ---- vcl/inc/splitwin.hxx 27 Mar 2003 17:57:33 -0000 1.2 -+++ vcl/inc/splitwin.hxx 7 Jan 2004 09:20:41 -0000 1.3 +--- vcl/inc/splitwin.hxx.orig 2004-09-12 14:26:21.762963992 +0200 ++++ vcl/inc/splitwin.hxx 2004-09-12 14:54:44.862053576 +0200 @@ -141,10 +141,7 @@ private: mbFadeInPressed:1, mbFadeOutPressed:1, @@ -7061,12 +6675,8 @@ diff -u -p -u -r1.2 -r1.3 SplitWindow( Window* pParent, WinBits nStyle = 0 ); Index: vcl/inc/status.hxx =================================================================== -RCS file: /cvs/gsl/vcl/inc/status.hxx,v -retrieving revision 1.3 -retrieving revision 1.4 -diff -u -p -u -r1.3 -r1.4 ---- vcl/inc/status.hxx 27 Mar 2003 17:57:33 -0000 1.3 -+++ vcl/inc/status.hxx 7 Jan 2004 09:20:58 -0000 1.4 +--- vcl/inc/status.hxx.orig 2004-09-12 14:26:21.764963688 +0200 ++++ vcl/inc/status.hxx 2004-09-12 14:54:44.863053424 +0200 @@ -128,23 +128,17 @@ private: long mnCalcHeight; long mnTextY; @@ -7101,12 +6711,8 @@ diff -u -p -u -r1.3 -r1.4 StatusBar( Window* pParent, Index: vcl/inc/svapp.hxx =================================================================== -RCS file: /cvs/gsl/vcl/inc/svapp.hxx,v -retrieving revision 1.27 -retrieving revision 1.30 -diff -u -p -u -r1.27 -r1.30 ---- vcl/inc/svapp.hxx 10 Jun 2003 14:29:14 -0000 1.27 -+++ vcl/inc/svapp.hxx 10 May 2004 12:57:43 -0000 1.30 +--- vcl/inc/svapp.hxx.orig 2004-09-12 14:26:21.765963536 +0200 ++++ vcl/inc/svapp.hxx 2004-09-12 14:54:44.865053120 +0200 @@ -74,9 +74,6 @@ #ifndef _UNQID_HXX #include <tools/unqid.hxx> @@ -7117,9 +6723,7 @@ diff -u -p -u -r1.27 -r1.30 #ifndef _SV_SV_H #include <sv.h> #endif -@@ -100,13 +97,8 @@ class Window; - class Reflection; - class KeyCode; +@@ -106,11 +103,6 @@ class KeyCode; class NotifyEvent; class KeyEvent; @@ -7131,7 +6735,7 @@ diff -u -p -u -r1.27 -r1.30 namespace vos { class IMutex; } #ifndef _COM_SUN_STAR_UNO_REFERENCE_H_ -@@ -327,7 +291,7 @@ class Application +@@ -327,7 +319,7 @@ class Application { public: Application(); @@ -7140,8 +6744,7 @@ diff -u -p -u -r1.27 -r1.30 virtual void Main() = 0; -@@ -406,8 +370,9 @@ public: - +@@ -435,7 +427,8 @@ public: #ifndef NO_GETAPPWINDOW static WorkWindow* GetAppWindow(); #endif @@ -7151,7 +6754,7 @@ diff -u -p -u -r1.27 -r1.30 static OutputDevice* GetDefaultDevice(); static Window* GetFirstTopLevelWindow(); -@@ -562,6 +482,11 @@ public: +@@ -562,6 +555,11 @@ public: Can be called without the Solar mutex locked. */ static bool GetShowImeStatusWindowDefault(); @@ -7165,12 +6768,8 @@ diff -u -p -u -r1.27 -r1.30 Application* GetpApp(); Index: vcl/inc/svdata.hxx =================================================================== -RCS file: /cvs/gsl/vcl/inc/svdata.hxx,v -retrieving revision 1.38.88.2 -retrieving revision 1.45 -diff -u -p -u -r1.38.88.2 -r1.45 ---- vcl/inc/svdata.hxx 2 Mar 2004 10:00:45 -0000 1.38.88.2 -+++ vcl/inc/svdata.hxx 25 Jun 2004 17:08:32 -0000 1.45 +--- vcl/inc/svdata.hxx.orig 2004-09-12 14:26:21.767963232 +0200 ++++ vcl/inc/svdata.hxx 2004-09-12 14:54:44.866052968 +0200 @@ -147,80 +147,13 @@ class ImplVDevCache; class UnoWrapperBase; class GraphicConverter; @@ -7264,7 +6863,7 @@ diff -u -p -u -r1.38.88.2 -r1.45 ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > mxMSF; String* mpMSFTempFileName; AllSettings* mpSettings; // Application settings -@@ -337,7 +266,6 @@ struct ImplSVWinData +@@ -337,7 +267,6 @@ struct ImplSVWinData USHORT mnAutoScrollFlags; // auto scroll flags BOOL mbNoDeactivate; // TRUE: keine Deactivate durchfuehren BOOL mbNoSaveFocus; // TRUE: menues must not save/restore focus @@ -7272,7 +6871,7 @@ diff -u -p -u -r1.38.88.2 -r1.45 }; -@@ -387,17 +315,6 @@ struct ImplSVHelpData +@@ -387,17 +316,6 @@ struct ImplSVHelpData }; @@ -7290,7 +6889,7 @@ diff -u -p -u -r1.38.88.2 -r1.45 // -------------- // - ImplSVData - // -------------- -@@ -412,6 +329,9 @@ struct ImplSVData +@@ -412,6 +330,9 @@ struct ImplSVData ULONG mnThreadCount; // is VCL MultiThread enabled ImplConfigData* mpFirstConfigData; // Zeiger auf ersten Config-Block ImplTimerData* mpFirstTimerData; // list of all running timers @@ -7300,7 +6899,7 @@ diff -u -p -u -r1.38.88.2 -r1.45 ResMgr* mpResMgr; // SV-Resource-Manager ULONG mnTimerPeriod; // current timer period ULONG mnTimerUpdate; // TimerCallbackProcs on stack -@@ -422,35 +342,12 @@ struct ImplSVData +@@ -422,35 +343,12 @@ struct ImplSVData ImplSVWinData maWinData; // indepen data for Windows classes ImplSVCtrlData maCtrlData; // indepen data for Control classes ImplSVHelpData maHelpData; // indepen data for Help classes @@ -7336,7 +6935,7 @@ diff -u -p -u -r1.38.88.2 -r1.45 ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > mxAccessBridge; com::sun::star::uno::Reference< com::sun::star::frame::XSessionManagerClient > xSMClient; ::vcl::SettingsConfigItem* mpSettingsConfigItem; -@@ -465,10 +362,8 @@ ResMgr* ImplGetResMgr(); +@@ -465,10 +363,8 @@ ResMgr* ImplGetResMgr(); void ImplWindowAutoMnemonic( Window* pWindow ); void ImplTimerCallbackProc(); @@ -7349,12 +6948,8 @@ diff -u -p -u -r1.38.88.2 -r1.45 BOOL ImplCallHotKey( const KeyCode& rKeyCode ); Index: vcl/inc/sysdata.hxx =================================================================== -RCS file: /cvs/gsl/vcl/inc/sysdata.hxx,v -retrieving revision 1.2 -retrieving revision 1.4 -diff -u -p -u -r1.2 -r1.4 ---- vcl/inc/sysdata.hxx 9 Feb 2001 14:51:45 -0000 1.2 -+++ vcl/inc/sysdata.hxx 7 Jan 2004 09:22:49 -0000 1.4 +--- vcl/inc/sysdata.hxx.orig 2004-09-12 14:26:21.768963080 +0200 ++++ vcl/inc/sysdata.hxx 2004-09-12 14:54:44.867052816 +0200 @@ -69,11 +69,8 @@ struct SystemEnvData { @@ -7407,12 +7002,8 @@ diff -u -p -u -r1.2 -r1.4 Index: vcl/inc/syswin.hxx =================================================================== -RCS file: /cvs/gsl/vcl/inc/syswin.hxx,v -retrieving revision 1.12 -retrieving revision 1.13 -diff -u -p -u -r1.12 -r1.13 ---- vcl/inc/syswin.hxx 27 Mar 2003 17:57:34 -0000 1.12 -+++ vcl/inc/syswin.hxx 7 Jan 2004 09:23:35 -0000 1.13 +--- vcl/inc/syswin.hxx.orig 2004-09-12 14:26:21.769962928 +0200 ++++ vcl/inc/syswin.hxx 2004-09-12 14:54:44.868052664 +0200 @@ -219,12 +219,9 @@ private: BOOL mbDockBtn; BOOL mbHideBtn; @@ -7428,12 +7019,8 @@ diff -u -p -u -r1.12 -r1.13 SystemWindow( WindowType nType ); Index: vcl/inc/tabctrl.hxx =================================================================== -RCS file: /cvs/gsl/vcl/inc/tabctrl.hxx,v -retrieving revision 1.4 -retrieving revision 1.7 -diff -u -p -u -r1.4 -r1.7 ---- vcl/inc/tabctrl.hxx 4 Jun 2003 11:21:18 -0000 1.4 -+++ vcl/inc/tabctrl.hxx 10 May 2004 15:43:53 -0000 1.7 +--- vcl/inc/tabctrl.hxx.orig 2004-09-12 14:26:21.770962776 +0200 ++++ vcl/inc/tabctrl.hxx 2004-09-12 14:54:44.868052664 +0200 @@ -110,8 +110,6 @@ private: Link maActivateHdl; Link maDeactivateHdl; @@ -7473,12 +7060,8 @@ diff -u -p -u -r1.4 -r1.7 virtual long DeactivatePage(); Index: vcl/inc/tabdlg.hxx =================================================================== -RCS file: /cvs/gsl/vcl/inc/tabdlg.hxx,v -retrieving revision 1.1.1.1 -retrieving revision 1.2 -diff -u -p -u -r1.1.1.1 -r1.2 ---- vcl/inc/tabdlg.hxx 19 Sep 2000 10:23:07 -0000 1.1.1.1 -+++ vcl/inc/tabdlg.hxx 7 Jan 2004 09:24:21 -0000 1.2 +--- vcl/inc/tabdlg.hxx.orig 2004-09-12 14:26:21.770962776 +0200 ++++ vcl/inc/tabdlg.hxx 2004-09-12 14:54:44.869052512 +0200 @@ -83,10 +83,8 @@ private: WindowAlign meViewAlign; BOOL mbPosControls; @@ -7492,13 +7075,9 @@ diff -u -p -u -r1.1.1.1 -r1.2 TabDialog( Window* pParent, Index: vcl/inc/tabpage.hxx =================================================================== -RCS file: /cvs/gsl/vcl/inc/tabpage.hxx,v -retrieving revision 1.3 -retrieving revision 1.5 -diff -u -p -u -r1.3 -r1.5 ---- vcl/inc/tabpage.hxx 24 Apr 2003 16:30:10 -0000 1.3 -+++ vcl/inc/tabpage.hxx 20 Feb 2004 08:49:19 -0000 1.5 -@@ -75,15 +75,15 @@ +--- vcl/inc/tabpage.hxx.orig 2004-09-12 14:26:21.771962624 +0200 ++++ vcl/inc/tabpage.hxx 2004-09-12 14:54:44.869052512 +0200 +@@ -75,16 +75,16 @@ class TabPage : public Window { @@ -7511,19 +7090,16 @@ diff -u -p -u -r1.3 -r1.5 public: TabPage( Window* pParent, WinBits nStyle = 0 ); TabPage( Window* pParent, const ResId& rResId ); -+ -+ virtual void Paint( const Rectangle& rRect ); ++ virtual void Paint( const Rectangle& rRect ); ++ virtual void StateChanged( StateChangedType nStateChange ); virtual void DataChanged( const DataChangedEvent& rDCEvt ); + Index: vcl/inc/threadex.hxx =================================================================== -RCS file: /cvs/gsl/vcl/inc/threadex.hxx,v -retrieving revision 1.1.1.1 -retrieving revision 1.2 -diff -u -p -u -r1.1.1.1 -r1.2 ---- vcl/inc/threadex.hxx 19 Sep 2000 10:23:07 -0000 1.1.1.1 -+++ vcl/inc/threadex.hxx 7 Jan 2004 09:24:56 -0000 1.2 +--- vcl/inc/threadex.hxx.orig 2004-09-12 14:26:21.772962472 +0200 ++++ vcl/inc/threadex.hxx 2004-09-12 14:54:44.870052360 +0200 @@ -74,7 +74,7 @@ namespace vcl static void SAL_CALL worker( void* ); public: @@ -7544,12 +7120,8 @@ diff -u -p -u -r1.1.1.1 -r1.2 long execute(); Index: vcl/inc/timer.hxx =================================================================== -RCS file: /cvs/gsl/vcl/inc/timer.hxx,v -retrieving revision 1.1.1.1 -retrieving revision 1.2 -diff -u -p -u -r1.1.1.1 -r1.2 ---- vcl/inc/timer.hxx 19 Sep 2000 10:23:07 -0000 1.1.1.1 -+++ vcl/inc/timer.hxx 7 Jan 2004 09:25:18 -0000 1.2 +--- vcl/inc/timer.hxx.orig 2004-09-12 14:26:21.772962472 +0200 ++++ vcl/inc/timer.hxx 2004-09-12 14:54:44.870052360 +0200 @@ -89,7 +89,7 @@ protected: public: Timer(); @@ -7561,13 +7133,9 @@ diff -u -p -u -r1.1.1.1 -r1.2 Index: vcl/inc/toolbox.hxx =================================================================== -RCS file: /cvs/gsl/vcl/inc/toolbox.hxx,v -retrieving revision 1.24 -retrieving revision 1.26 -diff -u -p -u -r1.24 -r1.26 ---- vcl/inc/toolbox.hxx 17 Apr 2003 15:17:11 -0000 1.24 -+++ vcl/inc/toolbox.hxx 20 Jan 2004 11:55:53 -0000 1.26 -@@ -202,7 +201,6 @@ private: +--- vcl/inc/toolbox.hxx.orig 2004-09-12 14:26:21.775962016 +0200 ++++ vcl/inc/toolbox.hxx 2004-09-12 14:54:44.872052056 +0200 +@@ -202,7 +202,6 @@ private: Rectangle maPaintRect; FloatingWindow* mpFloatWin; USHORT mnKeyModifier; @@ -7575,7 +7143,7 @@ diff -u -p -u -r1.24 -r1.26 long mnDX; long mnDY; long mnItemWidth; -@@ -250,10 +248,9 @@ private: +@@ -250,10 +249,9 @@ private: mbDragging:1, mbHideStatusText:1, mbMenuStrings:1, @@ -7589,7 +7157,7 @@ diff -u -p -u -r1.24 -r1.26 WindowAlign meAlign; WindowAlign meDockAlign; ButtonType meButtonType; -@@ -267,8 +264,6 @@ private: +@@ -267,8 +265,6 @@ private: Link maSelectHdl; Link maNextToolBoxHdl; @@ -7598,7 +7166,7 @@ diff -u -p -u -r1.24 -r1.26 void ImplInit( Window* pParent, WinBits nStyle ); void ImplInitSettings( BOOL bFont, BOOL bForeground, BOOL bBackground ); void ImplLoadRes( const ResId& rResId ); -@@ -298,12 +293,16 @@ private: +@@ -298,12 +294,16 @@ private: void ImplUpdateInputEnable(); void ImplFillLayoutData() const; DECL_LINK( ImplUpdateHdl, void* ); @@ -7616,7 +7184,7 @@ diff -u -p -u -r1.24 -r1.26 public: ToolBox( Window* pParent, WinBits nStyle = 0 ); ToolBox( Window* pParent, const ResId& rResId ); -@@ -510,9 +509,9 @@ public: +@@ -513,9 +513,9 @@ public: void GetAccessObject( AccessObjectRef& rAcc ) const; // allow Click Handler to detect special key @@ -7630,13 +7198,9 @@ diff -u -p -u -r1.24 -r1.26 Index: vcl/inc/unobrok.hxx =================================================================== -RCS file: /cvs/gsl/vcl/inc/unobrok.hxx,v -retrieving revision 1.1.1.1 -retrieving revision 1.2 -diff -u -p -u -r1.1.1.1 -r1.2 ---- vcl/inc/unobrok.hxx 19 Sep 2000 10:23:07 -0000 1.1.1.1 -+++ vcl/inc/unobrok.hxx 1 Dec 2003 13:02:17 -0000 1.2 -@@ -62,62 +62,8 @@ +--- vcl/inc/unobrok.hxx.orig 2004-09-12 14:26:21.776961864 +0200 ++++ vcl/inc/unobrok.hxx 2004-09-12 14:54:44.872052056 +0200 +@@ -62,63 +62,9 @@ #ifndef _UNOBROK_HXX #define _UNOBROK_HXX @@ -7644,7 +7208,7 @@ diff -u -p -u -r1.1.1.1 -r1.2 - #include <svdata.hxx> #include <vos/thread.hxx> -- + -// #include <com/sun/star/connection/XAcceptor.hpp> - -// class UnoBrokerThread : public ::vos::OThread @@ -7696,17 +7260,14 @@ diff -u -p -u -r1.1.1.1 -r1.2 -// ::com::sun::star::uno::Reference< ::com::sun::star::connection::XAcceptor > m_rAcceptor; -// ::rtl::OUString m_sAcceptorDescription; -// }; - +- namespace vcl_accept { + sal_Bool accept(const ::rtl::OUString & accDcp, const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory> & rSMgr); Index: vcl/inc/unohelp2.hxx =================================================================== -RCS file: /cvs/gsl/vcl/inc/unohelp2.hxx,v -retrieving revision 1.1 -retrieving revision 1.2 -diff -u -p -u -r1.1 -r1.2 ---- vcl/inc/unohelp2.hxx 18 Mar 2002 17:34:51 -0000 1.1 -+++ vcl/inc/unohelp2.hxx 7 Jan 2004 09:25:54 -0000 1.2 +--- vcl/inc/unohelp2.hxx.orig 2004-09-12 14:26:21.776961864 +0200 ++++ vcl/inc/unohelp2.hxx 2004-09-12 14:54:44.873051904 +0200 @@ -74,6 +74,9 @@ #include <tools/string.hxx> #endif @@ -7717,11 +7278,10 @@ diff -u -p -u -r1.1 -r1.2 namespace vcl { namespace unohelper { -@@ -98,6 +101,14 @@ namespace vcl { namespace unohelper { - ::com::sun::star::uno::Any SAL_CALL getTransferData( const ::com::sun::star::datatransfer::DataFlavor& aFlavor ) throw(::com::sun::star::datatransfer::UnsupportedFlavorException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException); +@@ -99,6 +102,14 @@ namespace vcl { namespace unohelper { ::com::sun::star::uno::Sequence< ::com::sun::star::datatransfer::DataFlavor > SAL_CALL getTransferDataFlavors( ) throw(::com::sun::star::uno::RuntimeException); sal_Bool SAL_CALL isDataFlavorSupported( const ::com::sun::star::datatransfer::DataFlavor& aFlavor ) throw(::com::sun::star::uno::RuntimeException); -+ }; + }; + + struct MutexHelper + { @@ -7729,17 +7289,14 @@ diff -u -p -u -r1.1 -r1.2 + ::osl::Mutex maMutex; + public: + ::osl::Mutex& GetMutex() { return maMutex; } - }; ++ }; }} // namespace vcl::unohelper + Index: vcl/inc/vclevent.hxx =================================================================== -RCS file: /cvs/gsl/vcl/inc/vclevent.hxx,v -retrieving revision 1.30 -retrieving revision 1.31 -diff -u -p -u -r1.30 -r1.31 ---- vcl/inc/vclevent.hxx 12 Jun 2003 07:50:37 -0000 1.30 -+++ vcl/inc/vclevent.hxx 19 May 2004 13:50:40 -0000 1.31 +--- vcl/inc/vclevent.hxx.orig 2004-09-12 14:26:21.777961712 +0200 ++++ vcl/inc/vclevent.hxx 2004-09-12 14:54:44.874051752 +0200 @@ -178,6 +178,7 @@ class Menu; #define VCLEVENT_TOOLBOX_ITEMENABLED 1168 // pData = itempos #define VCLEVENT_TOOLBOX_ITEMDISABLED 1169 // pData = itempos @@ -7815,12 +7372,8 @@ diff -u -p -u -r1.30 -r1.31 Index: vcl/inc/virdev.hxx =================================================================== -RCS file: /cvs/gsl/vcl/inc/virdev.hxx,v -retrieving revision 1.3 -retrieving revision 1.7 -diff -u -p -u -r1.3 -r1.7 ---- vcl/inc/virdev.hxx 1 Apr 2003 09:43:53 -0000 1.3 -+++ vcl/inc/virdev.hxx 7 Jan 2004 09:26:54 -0000 1.7 +--- vcl/inc/virdev.hxx.orig 2004-09-12 14:26:21.778961560 +0200 ++++ vcl/inc/virdev.hxx 2004-09-12 14:54:44.875051600 +0200 @@ -78,40 +78,52 @@ class RmVirtualDevice; class VirtualDevice : public OutputDevice @@ -7892,12 +7445,8 @@ diff -u -p -u -r1.3 -r1.7 #endif // _SV_VIRDEV_HXX Index: vcl/inc/wall.hxx =================================================================== -RCS file: /cvs/gsl/vcl/inc/wall.hxx,v -retrieving revision 1.1.1.1 -retrieving revision 1.2 -diff -u -p -u -r1.1.1.1 -r1.2 ---- vcl/inc/wall.hxx 19 Sep 2000 10:23:08 -0000 1.1.1.1 -+++ vcl/inc/wall.hxx 7 Jan 2004 09:27:34 -0000 1.2 +--- vcl/inc/wall.hxx.orig 2004-09-12 14:26:21.779961408 +0200 ++++ vcl/inc/wall.hxx 2004-09-12 14:54:44.876051448 +0200 @@ -65,13 +65,14 @@ #ifndef _SV_SV_H #include <sv.h> @@ -8000,10 +7549,8 @@ diff -u -p -u -r1.1.1.1 -r1.2 BOOL IsScrollable() const; Index: vcl/inc/wall2.hxx =================================================================== -RCS file: vcl/inc/wall2.hxx -diff -N vcl/inc/wall2.hxx ---- /dev/null 1 Jan 1970 00:00:00 -0000 -+++ vcl/inc/wall2.hxx 7 Jan 2004 09:27:49 -0000 1.2 +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ vcl/inc/wall2.hxx 2004-09-12 14:54:44.876051448 +0200 @@ -0,0 +1,96 @@ +/************************************************************************* + * @@ -8103,12 +7650,8 @@ diff -N vcl/inc/wall2.hxx +#endif // _SV_WALL2_HXX Index: vcl/inc/windata.hxx =================================================================== -RCS file: /cvs/gsl/vcl/inc/windata.hxx,v -retrieving revision 1.2 -retrieving revision 1.3 -diff -u -p -u -r1.2 -r1.3 ---- vcl/inc/windata.hxx 27 Jun 2001 08:23:42 -0000 1.2 -+++ vcl/inc/windata.hxx 1 Dec 2003 13:02:52 -0000 1.3 +--- vcl/inc/windata.hxx.orig 2004-09-12 14:26:21.781961104 +0200 ++++ vcl/inc/windata.hxx 2004-09-12 14:54:44.877051296 +0200 @@ -72,15 +72,7 @@ class SalFrame; // - Prototypes - // -------------- @@ -8128,12 +7671,8 @@ diff -u -p -u -r1.2 -r1.3 // - HitTest - Index: vcl/inc/window.h =================================================================== -RCS file: /cvs/gsl/vcl/inc/window.h,v -retrieving revision 1.11.136.1 -retrieving revision 1.15 -diff -u -p -u -r1.11.136.1 -r1.15 ---- vcl/inc/window.h 9 Jan 2004 18:13:41 -0000 1.11.136.1 -+++ vcl/inc/window.h 17 Jun 2004 12:10:38 -0000 1.15 +--- vcl/inc/window.h.orig 2004-09-12 14:26:21.782960952 +0200 ++++ vcl/inc/window.h 2004-09-12 14:54:44.878051144 +0200 @@ -86,6 +86,7 @@ class VirtualDevice; struct SalPaintEvent; class ImplDevFontList; @@ -8178,12 +7717,8 @@ diff -u -p -u -r1.11.136.1 -r1.15 long mnLastMouseWinX; // last x mouse position, rel. to pMouseMoveWin Index: vcl/inc/window.hxx =================================================================== -RCS file: /cvs/gsl/vcl/inc/window.hxx,v -retrieving revision 1.47.112.1 -retrieving revision 1.55 -diff -u -p -u -r1.47.112.1 -r1.55 ---- vcl/inc/window.hxx 26 Jan 2004 17:20:36 -0000 1.47.112.1 -+++ vcl/inc/window.hxx 17 Jun 2004 12:10:54 -0000 1.55 +--- vcl/inc/window.hxx.orig 2004-09-12 14:26:21.786960344 +0200 ++++ vcl/inc/window.hxx 2004-09-12 14:54:44.881050688 +0200 @@ -68,8 +68,8 @@ #ifndef _SV_OUTDEV_HXX #include <outdev.hxx> @@ -8220,7 +7755,7 @@ diff -u -p -u -r1.47.112.1 -r1.55 #endif class VirtualDevice; -@@ -144,6 +151,7 @@ namespace sun { +@@ -144,6 +152,7 @@ namespace sun { namespace star { namespace awt { class XWindowPeer; @@ -8228,7 +7763,7 @@ diff -u -p -u -r1.47.112.1 -r1.55 } namespace uno { class Any; -@@ -335,26 +351,55 @@ typedef USHORT StateChangedType; +@@ -335,26 +344,55 @@ typedef USHORT StateChangedType; #define EXTTEXTINPUT_END_COMPLETE ((USHORT)0x0001) #define EXTTEXTINPUT_END_CANCEL ((USHORT)0x0002) @@ -8291,7 +7826,7 @@ diff -u -p -u -r1.47.112.1 -r1.55 Window* mpFrameWindow; Window* mpOverlapWindow; Window* mpBorderWindow; -@@ -385,14 +433,13 @@ private: +@@ -385,14 +423,13 @@ private: Font* mpControlFont; Color maControlForeground; Color maControlBackground; @@ -8310,7 +7845,7 @@ diff -u -p -u -r1.47.112.1 -r1.55 Point maPos; ULONG mnHelpId; ULONG mnUniqId; -@@ -413,8 +460,6 @@ private: +@@ -413,8 +450,6 @@ private: WinBits mnExtendedStyle; WinBits mnPrevExtendedStyle; WindowType mnType; @@ -8319,7 +7854,7 @@ diff -u -p -u -r1.47.112.1 -r1.55 USHORT mnWaitCount; USHORT mnPaintFlags; USHORT mnGetFocusFlags; -@@ -422,8 +467,6 @@ private: +@@ -422,8 +457,6 @@ private: USHORT mnActivateMode; USHORT mnDlgCtrlFlags; USHORT mnLockCount; @@ -8328,7 +7863,7 @@ diff -u -p -u -r1.47.112.1 -r1.55 BOOL mbFrame:1, mbBorderWin:1, mbOverlapWin:1, -@@ -490,9 +533,176 @@ private: +@@ -490,9 +523,176 @@ private: mbDrawSelectionBackground:1; ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > mxDNDListenerContainer; @@ -8506,7 +8041,7 @@ diff -u -p -u -r1.47.112.1 -r1.55 #endif protected: -@@ -573,8 +783,8 @@ public: +@@ -573,8 +773,8 @@ public: void SetBorderStyle( USHORT nBorderStyle ); USHORT GetBorderStyle() const; @@ -8517,7 +8052,7 @@ diff -u -p -u -r1.47.112.1 -r1.55 Size CalcWindowSize( const Size& rOutSz ) const; Size CalcOutputSize( const Size& rWinSz ) const; long CalcTitleWidth() const; -@@ -594,6 +804,8 @@ public: +@@ -594,6 +794,8 @@ public: void SetDialogControlFlags( USHORT nFlags ) { mnDlgCtrlFlags = nFlags; } USHORT GetDialogControlFlags() const { return mnDlgCtrlFlags; } @@ -8526,7 +8061,7 @@ diff -u -p -u -r1.47.112.1 -r1.55 ULONG GetCurrentModButtons(); void SetInputContext( const InputContext& rInputContext ); -@@ -616,7 +828,7 @@ public: +@@ -616,7 +818,7 @@ public: void SetZoomedPointFont( const Font& rFont ); long GetDrawPixel( OutputDevice* pDev, long nPixels ) const; Font GetDrawPixelFont( OutputDevice* pDev ) const; @@ -8535,7 +8070,7 @@ diff -u -p -u -r1.47.112.1 -r1.55 void SetControlFont(); void SetControlFont( const Font& rFont ); -@@ -641,6 +853,10 @@ public: +@@ -641,6 +843,10 @@ public: Region GetWindowClipRegionPixel( USHORT nFlags = 0 ) const; Region GetPaintRegion() const; BOOL IsInPaint() const { return mbInPaint; } @@ -8546,7 +8081,7 @@ diff -u -p -u -r1.47.112.1 -r1.55 void SetParent( Window* pNewParent ); Window* GetParent() const { return mpRealParent; } -@@ -687,8 +903,12 @@ public: +@@ -687,8 +893,12 @@ public: BOOL IsDefaultPos() const { return mbDefPos; } BOOL IsDefaultSize() const { return mbDefSize; } @@ -8559,7 +8094,7 @@ diff -u -p -u -r1.47.112.1 -r1.55 Point OutputToAbsoluteScreenPixel( const Point& rPos ) const; Point AbsoluteScreenToOutputPixel( const Point& rPos ) const; Rectangle GetDesktopRectPixel() const; -@@ -753,6 +964,7 @@ public: +@@ -753,6 +963,7 @@ public: BOOL IsChildPointerOverwrite() const { return mbChildPtrOverwrite; } void SetPointerPosPixel( const Point& rPos ); Point GetPointerPosPixel(); @@ -8567,7 +8102,7 @@ diff -u -p -u -r1.47.112.1 -r1.55 void ShowPointer( BOOL bVisible ); BOOL IsPointerVisible() const { return !mbNoPtrVisible; } void EnterWait(); -@@ -852,11 +1060,11 @@ public: +@@ -852,11 +1063,11 @@ public: ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > GetAccessible( BOOL bCreate = TRUE ); virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > CreateAccessible(); void SetAccessible( ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > ); @@ -8581,7 +8116,7 @@ diff -u -p -u -r1.47.112.1 -r1.55 void SetAccessibleRole( USHORT nRole ); USHORT GetAccessibleRole() const; -@@ -900,6 +1114,52 @@ public: +@@ -900,6 +1111,52 @@ public: // Clipboard/Selection interfaces virtual ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::clipboard::XClipboard > GetClipboard(); virtual ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::clipboard::XClipboard > GetSelection(); @@ -8636,12 +8171,8 @@ diff -u -p -u -r1.47.112.1 -r1.55 inline void Window::SetPosPixel( const Point& rNewPos ) Index: vcl/inc/wintypes.hxx =================================================================== -RCS file: /cvs/gsl/vcl/inc/wintypes.hxx,v -retrieving revision 1.14 -retrieving revision 1.17 -diff -u -p -u -r1.14 -r1.17 ---- vcl/inc/wintypes.hxx 11 Apr 2003 17:27:04 -0000 1.14 -+++ vcl/inc/wintypes.hxx 10 May 2004 15:44:37 -0000 1.17 +--- vcl/inc/wintypes.hxx.orig 2004-09-12 14:26:21.787960192 +0200 ++++ vcl/inc/wintypes.hxx 2004-09-12 14:54:44.882050536 +0200 @@ -154,14 +154,15 @@ typedef USHORT WindowType; #define WINDOW_TREELISTBOX (WINDOW_FIRST + 0x4d) #define WINDOW_HELPTEXTWINDOW (WINDOW_FIRST + 0x4e) @@ -8662,13 +8193,9 @@ diff -u -p -u -r1.14 -r1.17 // Window-Bits fuer Window Index: vcl/inc/wrkwin.hxx =================================================================== -RCS file: /cvs/gsl/vcl/inc/wrkwin.hxx,v -retrieving revision 1.7 -retrieving revision 1.9 -diff -u -p -u -r1.7 -r1.9 ---- vcl/inc/wrkwin.hxx 11 Apr 2003 17:27:14 -0000 1.7 -+++ vcl/inc/wrkwin.hxx 17 Jun 2004 11:43:45 -0000 1.9 -@@ -96,20 +92,10 @@ private: +--- vcl/inc/wrkwin.hxx.orig 2004-09-12 14:26:21.788960040 +0200 ++++ vcl/inc/wrkwin.hxx 2004-09-12 14:54:44.882050536 +0200 +@@ -96,20 +96,10 @@ private: BOOL mbPresentationMode:1, mbPresentationVisible:1, mbPresentationFull:1, @@ -8690,7 +8217,7 @@ diff -u -p -u -r1.7 -r1.9 protected: WorkWindow( WindowType nType ); -@@ -124,6 +110,8 @@ public: +@@ -124,6 +114,8 @@ public: WorkWindow( SystemParentData* pParent ); // Not in the REMOTE-Version ~WorkWindow(); @@ -8699,7 +8226,7 @@ diff -u -p -u -r1.7 -r1.9 void ShowFullScreenMode( BOOL bFullScreenMode = TRUE ); void EndFullScreenMode() { ShowFullScreenMode( FALSE ); } BOOL IsFullScreenMode() const { return mbFullScreenMode; } -@@ -136,16 +124,14 @@ public: +@@ -136,16 +128,14 @@ public: BOOL SetPluginParent( SystemParentData* pParent ); @@ -8720,12 +8247,8 @@ diff -u -p -u -r1.7 -r1.9 #endif // _SV_WRKWIN_HXX Index: vcl/inc/xconnection.hxx =================================================================== -RCS file: /cvs/gsl/vcl/inc/xconnection.hxx,v -retrieving revision 1.2 -retrieving revision 1.3 -diff -u -p -u -r1.2 -r1.3 ---- vcl/inc/xconnection.hxx 11 Sep 2001 15:52:21 -0000 1.2 -+++ vcl/inc/xconnection.hxx 6 Jan 2004 13:08:25 -0000 1.3 +--- vcl/inc/xconnection.hxx.orig 2004-09-12 14:26:21.789959888 +0200 ++++ vcl/inc/xconnection.hxx 2004-09-12 14:54:44.883050384 +0200 @@ -78,7 +78,7 @@ #include <com/sun/star/uno/Reference.hxx> #endif diff --git a/patches/vclplug/vcl-source-gdi.diff b/patches/vclplug/vcl-source-gdi.diff index 6d059d99c..39cff42c1 100644 --- a/patches/vclplug/vcl-source-gdi.diff +++ b/patches/vclplug/vcl-source-gdi.diff @@ -536,15 +536,7 @@ diff -u -p -u -r1.2.292.1 -r1.5 switch( eFilter ) { -@@ -620,7 +618,7 @@ BOOL Bitmap::ImplEmbossGrey( const BmpFi - aGrey.SetIndex( 0 ); - else - { -- const double fGrey = nDotL / sqrt( nNx * nNx + nNy * nNy + nZ2 ); -+ const double fGrey = nDotL / sqrt( (double)(nNx * nNx + nNy * nNy + nZ2) ); - aGrey.SetIndex( (BYTE) VOS_BOUND( fGrey, 0, 255 ) ); - } - + Index: vcl/source/gdi/color.cxx =================================================================== RCS file: /cvs/gsl/vcl/source/gdi/color.cxx,v @@ -1454,18 +1446,6 @@ diff -u -p -u -r1.13 -r1.14 } } } -@@ -1317,11 +1308,7 @@ String StarSymbolToMSMultiFontImpl::Conv - String StarSymbolToMSMultiFontImpl::ConvertString(String &rString, - xub_StrLen& rIndex) - { --#if 1 - typedef ::std::multimap<sal_Unicode, SymbolEntry>::iterator MI; --#else -- typedef ::std::multimap<sal_Unicode, SymbolEntry>::const_iterator MI; --#endif - typedef ::std::pair<MI, MI> Result; - - String sRet; Index: vcl/source/gdi/gdimtf.cxx =================================================================== RCS file: /cvs/gsl/vcl/source/gdi/gdimtf.cxx,v diff --git a/patches/vclplug/vcl-source-glyphs.diff b/patches/vclplug/vcl-source-glyphs.diff index b401f7d15..5121c80f1 100644 --- a/patches/vclplug/vcl-source-glyphs.diff +++ b/patches/vclplug/vcl-source-glyphs.diff @@ -2,10 +2,11 @@ Index: vcl/source/glyphs/gcach_ftyp.cxx =================================================================== RCS file: /cvs/gsl/vcl/source/glyphs/gcach_ftyp.cxx,v retrieving revision 1.98.20.2 -diff -u -p -u -r1.98.20.2 gcach_ftyp.cxx ---- vcl/source/glyphs/gcach_ftyp.cxx 28 Jan 2004 15:22:42 -0000 1.98.20.2 -+++ vcl/source/glyphs/gcach_ftyp.cxx 5 Jul 2004 14:01:28 -0000 -@@ -58,13 +59,10 @@ +Index: vcl/source/glyphs/gcach_ftyp.cxx +=================================================================== +--- vcl/source/glyphs/gcach_ftyp.cxx.orig 2004-09-12 14:46:23.000000000 +0200 ++++ vcl/source/glyphs/gcach_ftyp.cxx 2004-09-14 13:53:47.306959408 +0200 +@@ -58,13 +58,10 @@ * ************************************************************************/ @@ -20,7 +21,7 @@ diff -u -p -u -r1.98.20.2 gcach_ftyp.cxx #include <gcach_ftyp.hxx> -@@ -72,17 +70,25 @@ +@@ -72,17 +69,25 @@ #include <outfont.hxx> #include <bitmap.hxx> #include <bmpacc.hxx> @@ -53,19 +54,9 @@ diff -u -p -u -r1.98.20.2 gcach_ftyp.cxx #ifndef FREETYPE_PATCH // VERSION_MINOR in freetype.h is too coarse -@@ -251,15 +258,22 @@ void FtFontFile::Unmap() - // ======================================================================= - - FtFontInfo::FtFontInfo( const ImplFontData& rFontData, -- const ::rtl::OString& rNativeFileName, int nFaceNum, int nFontId, int nSynthetic ) --: mpFontFile( FtFontFile::FindFontFile( rNativeFileName ) ), -+ const ::rtl::OString& rNativeFileName, -+ int nFaceNum, int nFontId, int nSynthetic, -+ const unicodeKernMap* pKern -+ ) -+: +@@ -258,8 +263,8 @@ FtFontInfo::FtFontInfo( const ImplFontDa + : mpFontFile( FtFontFile::FindFontFile( rNativeFileName ) ), maFontData( rFontData ), -+ mpFontFile( FtFontFile::FindFontFile( rNativeFileName ) ), mnFaceNum( nFaceNum ), - mnFontId( nFontId ), mnSynthetic( nSynthetic ), @@ -73,57 +64,7 @@ diff -u -p -u -r1.98.20.2 gcach_ftyp.cxx maFaceFT( NULL ), mnRefCount( 0 ) { -+ if( pKern ) -+ maUnicodeKernPairs = *pKern; -+ - maFontData.mpSysData = (void*)nFontId; - maFontData.mpNext = NULL; - -@@ -336,6 +350,43 @@ void FtFontInfo::ReleaseFaceFT( FT_FaceR - } - } - -+void FtFontInfo::CacheGlyphIndex( sal_Unicode cChar, int nGI ) const -+{ -+ maGlyphMap[ cChar ] = nGI; -+ -+ if( maUnicodeKernPairs.size() != maGlyphKernPairs.size() ) -+ { -+ // move kerning to glyph kerning map -+ unicodeKernMap::const_iterator left_it = -+ maUnicodeKernPairs.find( cChar ); -+ std::map< sal_Unicode, int >::const_iterator right_it; -+ for( left_it = maUnicodeKernPairs.begin(); left_it != maUnicodeKernPairs.end(); ++left_it ) -+ { -+ if( left_it->first == cChar ) -+ { -+ for( right_it = left_it->second.begin(); right_it != left_it->second.end(); ++right_it ) -+ { -+ int nRightGlyph = GetGlyphIndex( right_it->first ); -+ if( nRightGlyph != -1 ) -+ maGlyphKernPairs[ nGI ][ nRightGlyph ] = right_it->second; -+ } -+ } -+ else -+ { -+ int nLeftGlyph = GetGlyphIndex( left_it->first ); -+ if( nLeftGlyph != -1 ) -+ { -+ for( right_it = left_it->second.begin(); right_it != left_it->second.end(); ++right_it ) -+ { -+ if( right_it->first == cChar ) -+ maGlyphKernPairs[ nLeftGlyph ][ nGI ] = right_it->second; -+ } -+ } -+ } -+ } -+ } -+} -+ - // ----------------------------------------------------------------------- - - static unsigned GetUInt( const unsigned char* p ) { return((p[0]<<24)+(p[1]<<16)+(p[2]<<8)+p[3]);} -@@ -382,11 +433,10 @@ const unsigned char* FtFontInfo::GetTabl +@@ -425,11 +467,10 @@ const unsigned char* FtFontInfo::GetTabl // ======================================================================= FreetypeManager::FreetypeManager() @@ -137,28 +78,7 @@ diff -u -p -u -r1.98.20.2 gcach_ftyp.cxx #ifdef RTLD_DEFAULT // true if a good dlfcn.h header was included // Get version of freetype library to enable workarounds. // Freetype <= 2.0.9 does not have FT_Library_Version(). -@@ -449,7 +499,10 @@ void* FreetypeManager::GetFontHandle( in - // ----------------------------------------------------------------------- - - void FreetypeManager::AddFontFile( const rtl::OString& rNormalizedName, -- int nFaceNum, int nFontId, const ImplFontData* pData ) -+ int nFaceNum, int nFontId, -+ const ImplFontData* pData, -+ const unicodeKernMap* pKern -+ ) - { - if( !rNormalizedName.getLength() ) - return; -@@ -457,7 +510,7 @@ void FreetypeManager::AddFontFile( const - if( maFontList.find( nFontId ) != maFontList.end() ) - return; - -- FtFontInfo* pFI = new FtFontInfo( *pData, rNormalizedName, nFaceNum, nFontId, 0 ); -+ FtFontInfo* pFI = new FtFontInfo( *pData, rNormalizedName, nFaceNum, nFontId, 0, pKern ); - maFontList[ nFontId ] = pFI; - if( mnMaxFontId < nFontId ) - mnMaxFontId = nFontId; -@@ -482,8 +535,8 @@ long FreetypeManager::AddFontDir( const +@@ -527,8 +568,8 @@ long FreetypeManager::AddFontDir( const rcOSL = aDirItem.getFileStatus( aFileStatus ); ::rtl::OUString aUSytemPath; @@ -169,7 +89,7 @@ diff -u -p -u -r1.98.20.2 gcach_ftyp.cxx ::rtl::OString aCFileName = rtl::OUStringToOString( aUSytemPath, theEncoding ); const char* pszFontFileName = aCFileName.getStr(); -@@ -556,8 +609,21 @@ long FreetypeManager::FetchFontList( Imp +@@ -601,8 +642,21 @@ long FreetypeManager::FetchFontList( Imp for( FontList::const_iterator it(maFontList.begin()); it != maFontList.end(); ++it, ++nCount ) { const FtFontInfo& rFFI = *it->second; @@ -193,27 +113,7 @@ diff -u -p -u -r1.98.20.2 gcach_ftyp.cxx } return nCount; -@@ -581,7 +647,7 @@ FreetypeServerFont* FreetypeManager::Cre - if( it != maFontList.end() ) - { - FtFontInfo* pFI = it->second; -- FreetypeServerFont* pFont = new FreetypeServerFont( rFSD, pFI ); -+ FreetypeServerFont* pFont = new FreetypeServerFont( rFSD, pFI, pFI->GetGlyphKernMap(), pFI->GetUnicodeKernMap() ); - return pFont; - } - -@@ -592,8 +658,8 @@ FreetypeServerFont* FreetypeManager::Cre - // FreetypeServerFont - // ======================================================================= - --FreetypeServerFont::FreetypeServerFont( const ImplFontSelectData& rFSD, FtFontInfo* pFI ) --: ServerFont( rFSD ), -+FreetypeServerFont::FreetypeServerFont( const ImplFontSelectData& rFSD, FtFontInfo* pFI, const glyphKernMap* pKern, const unicodeKernMap* pUniKern ) -+: ServerFont( rFSD, pKern, pUniKern ), - mpFontInfo( pFI ), - maFaceFT( NULL ), - maSizeFT( NULL ), -@@ -856,23 +944,23 @@ int FreetypeServerFont::ApplyGlyphTransf +@@ -903,23 +957,23 @@ int FreetypeServerFont::ApplyGlyphTransf case GF_ROTL: // left nAngle += 900; bStretched = (mfStretch != 1.0); @@ -248,7 +148,7 @@ diff -u -p -u -r1.98.20.2 gcach_ftyp.cxx break; } -@@ -1049,9 +1137,9 @@ void FreetypeServerFont::InitGlyphData( +@@ -1096,9 +1150,9 @@ void FreetypeServerFont::InitGlyphData( if( nGlyphFlags & GF_ROTMASK ) { // for bVertical rotated glyphs const FT_Size_Metrics& rMetrics = maFaceFT->size->metrics; #if (FTVERSION < 2000) @@ -260,7 +160,7 @@ diff -u -p -u -r1.98.20.2 gcach_ftyp.cxx #endif } rGD.SetCharWidth( (nCharWidth + 32) >> 6 ); -@@ -1314,34 +1402,6 @@ ULONG FreetypeServerFont::GetFontCodeRan +@@ -1361,34 +1415,6 @@ ULONG FreetypeServerFont::GetFontCodeRan { int nRangeCount = 0; @@ -295,7 +195,7 @@ diff -u -p -u -r1.98.20.2 gcach_ftyp.cxx const unsigned char* pCmap = NULL; ULONG nLength = 0; if( FT_IS_SFNT( maFaceFT ) ) -@@ -1409,8 +1469,6 @@ ULONG FreetypeServerFont::GetFontCodeRan +@@ -1456,8 +1482,6 @@ ULONG FreetypeServerFont::GetFontCodeRan *(pCodes++) = cCode; } } @@ -304,34 +204,10 @@ diff -u -p -u -r1.98.20.2 gcach_ftyp.cxx return nRangeCount; } // ----------------------------------------------------------------------- -@@ -1420,7 +1478,10 @@ ULONG FreetypeServerFont::GetFontCodeRan - int FreetypeServerFont::GetGlyphKernValue( int nGlyphLeft, int nGlyphRight ) const - { - if( maSizeFT ) -+ - pFTActivateSize( maSizeFT ); -+ if( !FT_HAS_KERNING( maFaceFT ) || !FT_IS_SFNT( maFaceFT ) ) -+ return ServerFont::GetGlyphKernValue( nGlyphLeft, nGlyphRight ); - - FT_Vector aKernVal; - FT_Error rcFT = FT_Get_Kerning( maFaceFT, nGlyphLeft, nGlyphRight, -@@ -1438,7 +1499,7 @@ ULONG FreetypeServerFont::GetKernPairs( - - *ppKernPairs = NULL; - if( !FT_HAS_KERNING( maFaceFT ) || !FT_IS_SFNT( maFaceFT ) ) -- return 0; -+ return ServerFont::GetKernPairs( ppKernPairs ); - - // first figure out which glyph pairs are involved in kerning - ULONG nKernLength = 0; Index: vcl/source/glyphs/gcach_ftyp.hxx =================================================================== -RCS file: /cvs/gsl/vcl/source/glyphs/gcach_ftyp.hxx,v -retrieving revision 1.24 -retrieving revision 1.27 -diff -u -p -u -r1.24 -r1.27 ---- vcl/source/glyphs/gcach_ftyp.hxx 4 Jul 2003 12:51:33 -0000 1.24 -+++ vcl/source/glyphs/gcach_ftyp.hxx 18 May 2004 10:55:11 -0000 1.27 +--- vcl/source/glyphs/gcach_ftyp.hxx.orig 2004-09-12 14:46:23.000000000 +0200 ++++ vcl/source/glyphs/gcach_ftyp.hxx 2004-09-14 13:53:47.307959256 +0200 @@ -65,11 +65,15 @@ #include <glyphcache.hxx> #include <rtl/textcvt.h> @@ -352,7 +228,7 @@ diff -u -p -u -r1.24 -r1.27 // ----------------------------------------------------------------------- -@@ -87,7 +85,6 @@ public: +@@ -87,7 +91,6 @@ public: const unsigned char* GetBuffer() const { return mpFileMap; } int GetFileSize() const { return mnFileSize; } const ::rtl::OString* GetFileName() const { return &maNativeFileName; } @@ -360,72 +236,7 @@ diff -u -p -u -r1.24 -r1.27 private: FtFontFile( const ::rtl::OString& rNativeFileName ); -@@ -104,7 +101,9 @@ class FtFontInfo - { - public: - FtFontInfo( const ImplFontData&, const ::rtl::OString&, -- int nFaceNum, int nFontId, int nSynthetic ); -+ int nFaceNum, int nFontId, int nSynthetic, -+ const unicodeKernMap* pUnicodeKern = NULL -+ ); - - const unsigned char* GetTable( const char*, ULONG* pLength=0 ) const; - -@@ -121,6 +120,11 @@ public: - - int GetGlyphIndex( sal_Unicode cChar ) const; - void CacheGlyphIndex( sal_Unicode cChar, int nGI ) const; -+ const glyphKernMap* GetGlyphKernMap() const -+ { return (maUnicodeKernPairs.size() || maGlyphKernPairs.size()) ? &maGlyphKernPairs : NULL; } -+ const unicodeKernMap* GetUnicodeKernMap() const -+ { return maUnicodeKernPairs.size() ? &maUnicodeKernPairs : NULL; } -+ - - private: - ImplFontData maFontData; -@@ -135,6 +139,9 @@ private: - // cache unicode->glyphid mapping because looking it up is expensive - typedef ::std::hash_map<sal_Unicode,int> FIGlyphMap; - mutable FIGlyphMap maGlyphMap; -+ -+ mutable glyphKernMap maGlyphKernPairs; -+ unicodeKernMap maUnicodeKernPairs; - }; - - // these two inlines are very important for performance -@@ -147,11 +154,6 @@ inline int FtFontInfo::GetGlyphIndex( sa - return -1; - } - --inline void FtFontInfo::CacheGlyphIndex( sal_Unicode cChar, int nGI ) const --{ -- maGlyphMap[ cChar ] = nGI; --} -- - // ----------------------------------------------------------------------- - - class FreetypeManager -@@ -162,7 +164,9 @@ public: - - long AddFontDir( const String& rUrlName ); - void AddFontFile( const rtl::OString& rNormalizedName, -- int nFaceNum, int nFontId, const ImplFontData* ); -+ int nFaceNum, int nFontId, const ImplFontData*, -+ const unicodeKernMap* pKern = NULL -+ ); - long FetchFontList( ImplDevFontList* ) const; - void ClearFontList(); - -@@ -182,7 +186,7 @@ private: - class FreetypeServerFont : public ServerFont - { - public: -- FreetypeServerFont( const ImplFontSelectData&, FtFontInfo* ); -+ FreetypeServerFont( const ImplFontSelectData&, FtFontInfo*, const glyphKernMap*, const unicodeKernMap* ); - virtual ~FreetypeServerFont(); - - virtual const ::rtl::OString* GetFontFileName() const { return mpFontInfo->GetFontFileName(); } -@@ -206,9 +210,10 @@ public: +@@ -211,9 +222,10 @@ public: const unsigned char* GetTable( const char* pName, ULONG* pLength ) { return mpFontInfo->GetTable( pName, pLength ); } int GetEmUnits() const; @@ -439,13 +250,9 @@ diff -u -p -u -r1.24 -r1.27 virtual void InitGlyphData( int nGlyphIndex, GlyphData& ) const; Index: vcl/source/glyphs/gcach_layout.cxx =================================================================== -RCS file: /cvs/gsl/vcl/source/glyphs/gcach_layout.cxx,v -retrieving revision 1.23.20.1 -retrieving revision 1.29 -diff -u -p -u -r1.23.20.1 -r1.29 ---- vcl/source/glyphs/gcach_layout.cxx 9 Jan 2004 18:13:49 -0000 1.23.20.1 -+++ vcl/source/glyphs/gcach_layout.cxx 25 Jun 2004 17:09:25 -0000 1.29 -@@ -59,30 +59,29 @@ +--- vcl/source/glyphs/gcach_layout.cxx.orig 2004-09-12 14:26:10.000000000 +0200 ++++ vcl/source/glyphs/gcach_layout.cxx 2004-09-14 13:53:47.310958800 +0200 +@@ -59,28 +59,27 @@ ************************************************************************/ #define ENABLE_ICU_LAYOUT @@ -483,9 +290,7 @@ diff -u -p -u -r1.23.20.1 -r1.29 #endif #if OSL_DEBUG_LEVEL > 1 - #include <cstdio> - #endif -@@ -446,6 +446,13 @@ +@@ -450,6 +449,13 @@ IcuLayoutEngine::IcuLayoutEngine( Freety meScriptCode( USCRIPT_INVALID_CODE ) {} @@ -501,12 +306,8 @@ diff -u -p -u -r1.23.20.1 -r1.29 IcuLayoutEngine::~IcuLayoutEngine() Index: vcl/source/glyphs/gcach_rbmp.cxx =================================================================== -RCS file: /cvs/gsl/vcl/source/glyphs/gcach_rbmp.cxx,v -retrieving revision 1.3 -retrieving revision 1.4 -diff -u -p -u -r1.3 -r1.4 ---- vcl/source/glyphs/gcach_rbmp.cxx 13 Dec 2001 14:54:19 -0000 1.3 -+++ vcl/source/glyphs/gcach_rbmp.cxx 6 Jan 2004 13:58:48 -0000 1.4 +--- vcl/source/glyphs/gcach_rbmp.cxx.orig 2004-09-12 14:26:10.000000000 +0200 ++++ vcl/source/glyphs/gcach_rbmp.cxx 2004-09-14 13:53:47.311958648 +0200 @@ -64,7 +64,7 @@ //------------------------------------------------------------------------ @@ -518,12 +319,8 @@ diff -u -p -u -r1.3 -r1.4 //------------------------------------------------------------------------ Index: vcl/source/glyphs/gcach_vdev.cxx =================================================================== -RCS file: /cvs/gsl/vcl/source/glyphs/gcach_vdev.cxx,v -retrieving revision 1.11 -retrieving revision 1.15 -diff -u -p -u -r1.11 -r1.15 ---- vcl/source/glyphs/gcach_vdev.cxx 5 Aug 2002 07:19:22 -0000 1.11 -+++ vcl/source/glyphs/gcach_vdev.cxx 17 Jun 2004 12:21:43 -0000 1.15 +--- vcl/source/glyphs/gcach_vdev.cxx.orig 2004-09-12 14:26:10.000000000 +0200 ++++ vcl/source/glyphs/gcach_vdev.cxx 2004-09-14 13:53:47.312958496 +0200 @@ -75,10 +75,6 @@ long VirtDevServerFont::FetchFontList( ImplDevFontList* pToAdd ) @@ -544,7 +341,7 @@ diff -u -p -u -r1.11 -r1.15 return nCount; } -@@ -202,13 +197,16 @@ void VirtDevServerFont::InitGlyphData( i +@@ -202,13 +196,16 @@ void VirtDevServerFont::InitGlyphData( i vdev.SetFont( aFont ); // get glyph metrics @@ -564,7 +361,7 @@ diff -u -p -u -r1.11 -r1.15 rGD.SetSize( aRect.GetSize() ); } -@@ -223,7 +221,7 @@ bool VirtDevServerFont::GetAntialiasAdvi +@@ -223,7 +220,7 @@ bool VirtDevServerFont::GetAntialiasAdvi bool VirtDevServerFont::GetGlyphBitmap1( int nGlyphIndex, RawBitmap& ) const { @@ -573,7 +370,7 @@ diff -u -p -u -r1.11 -r1.15 // draw bitmap vdev.SetOutputSizePixel( aSize, TRUE ); vdev.DrawText( Point(0,0)-rGD.GetMetric().GetOffset(), nGlyphIndex ); -@@ -233,9 +231,8 @@ bool VirtDevServerFont::GetGlyphBitmap1( +@@ -233,9 +230,8 @@ bool VirtDevServerFont::GetGlyphBitmap1( const Bitmap& rBitmap = vdev.GetBitmap( Point(0,0), aSize ); rGD.SetBitmap( new Bitmap( rBitmap ) ); return true; @@ -584,7 +381,7 @@ diff -u -p -u -r1.11 -r1.15 } // ----------------------------------------------------------------------- -@@ -295,9 +292,8 @@ ULONG VirtDevServerFont::GetKernPairs( I +@@ -295,9 +291,8 @@ ULONG VirtDevServerFont::GetKernPairs( I bool VirtDevServerFont::GetGlyphOutline( int nGlyphIndex, PolyPolygon& rPolyPoly ) const { @@ -595,7 +392,7 @@ diff -u -p -u -r1.11 -r1.15 Font aFont; aFont.SetName ( GetFontSelData().maName ); aFont.SetStyleName ( GetFontSelData().maStyleName ); -@@ -311,7 +307,7 @@ bool VirtDevServerFont::GetGlyphOutline( +@@ -311,7 +306,7 @@ bool VirtDevServerFont::GetGlyphOutline( const bool bOptimize = true; return vdev.GetGlyphOutline( nGlyphIndex, rPolyPoly, bOptimize ); @@ -606,12 +403,8 @@ diff -u -p -u -r1.11 -r1.15 // ======================================================================= Index: vcl/source/glyphs/gcach_vdev.hxx =================================================================== -RCS file: /cvs/gsl/vcl/source/glyphs/gcach_vdev.hxx,v -retrieving revision 1.5 -retrieving revision 1.7 -diff -u -p -u -r1.5 -r1.7 ---- vcl/source/glyphs/gcach_vdev.hxx 15 Feb 2002 15:58:57 -0000 1.5 -+++ vcl/source/glyphs/gcach_vdev.hxx 4 Feb 2004 15:59:34 -0000 1.7 +--- vcl/source/glyphs/gcach_vdev.hxx.orig 2004-09-12 14:26:10.000000000 +0200 ++++ vcl/source/glyphs/gcach_vdev.hxx 2004-09-14 13:53:47.312958496 +0200 @@ -72,7 +72,7 @@ public: virtual bool GetGlyphOutline( int nGlyphIndex, PolyPolygon& ) const; @@ -623,12 +416,8 @@ diff -u -p -u -r1.5 -r1.7 Index: vcl/source/glyphs/glyphcache.cxx =================================================================== -RCS file: /cvs/gsl/vcl/source/glyphs/glyphcache.cxx,v -retrieving revision 1.22.40.2 -retrieving revision 1.26 -diff -u -p -u -r1.22.40.2 -r1.26 ---- vcl/source/glyphs/glyphcache.cxx 26 Jan 2004 17:23:59 -0000 1.22.40.2 -+++ vcl/source/glyphs/glyphcache.cxx 18 May 2004 10:55:25 -0000 1.26 +--- vcl/source/glyphs/glyphcache.cxx.orig 2004-09-12 14:46:23.000000000 +0200 ++++ vcl/source/glyphs/glyphcache.cxx 2004-09-14 13:53:47.313958344 +0200 @@ -88,8 +88,8 @@ GlyphCache::GlyphCache( ULONG nMaxSize ) mnBytesUsed(sizeof(GlyphCache)), mnLruIndex(0), @@ -649,22 +438,7 @@ diff -u -p -u -r1.22.40.2 -r1.26 if( pFontData != it->first.mpFontData ) continue; -@@ -219,10 +219,12 @@ void GlyphCache::AddFontPath( const Stri - // ----------------------------------------------------------------------- - - void GlyphCache::AddFontFile( const rtl::OString& rNormalizedName, int nFaceNum, -- int nFontId, const ImplFontData* pFontData ) -+ int nFontId, const ImplFontData* pFontData, -+ const unicodeKernMap* pKern -+ ) - { - if( mpFtManager ) -- mpFtManager->AddFontFile( rNormalizedName, nFaceNum, nFontId, pFontData ); -+ mpFtManager->AddFontFile( rNormalizedName, nFaceNum, nFontId, pFontData, pKern ); - } - - // ----------------------------------------------------------------------- -@@ -337,7 +339,7 @@ void GlyphCache::GarbageCollect() +@@ -338,7 +338,7 @@ void GlyphCache::GarbageCollect() FontList::iterator it_next = maFontList.begin(), it; while( it_next != maFontList.end() ) { @@ -673,13 +447,7 @@ diff -u -p -u -r1.22.40.2 -r1.26 ServerFont* pSF = it->second; if( (pSF != NULL) && (pSF->GetRefCount() <= 0) -@@ -401,15 +403,17 @@ inline void GlyphCache::RemovingGlyph( S - // ServerFont - // ======================================================================= - --ServerFont::ServerFont( const ImplFontSelectData& rFSD ) -+ServerFont::ServerFont( const ImplFontSelectData& rFSD, const glyphKernMap* pKern, const unicodeKernMap* pUniKern ) - : maFontSelData(rFSD), +@@ -407,8 +407,8 @@ ServerFont::ServerFont( const ImplFontSe mnExtInfo(0), mnRefCount(1), mnBytesUsed( sizeof(ServerFont) ), @@ -687,80 +455,9 @@ diff -u -p -u -r1.22.40.2 -r1.26 mpPrevGCFont( NULL ), + mpNextGCFont( NULL ), nCos( 0x10000), -- nSin( 0) -+ nSin( 0), -+ mpKernPairs( pKern ), -+ mpUnicodeKernPairs( pUniKern ) - { - if( rFSD.mnOrientation != 0 ) - { -@@ -440,6 +444,65 @@ long ServerFont::Release() const - - // ----------------------------------------------------------------------- - -+int ServerFont::GetGlyphKernValue( int left, int right ) const -+{ -+ int kern = 0; -+ if( mpKernPairs ) -+ { -+ std::map< int, std::map< int, int > >::const_iterator left_it = -+ mpKernPairs->find( left ); -+ if( left_it != mpKernPairs->end() ) -+ { -+ std::map< int, int >::const_iterator right_it = left_it->second.find( right ); -+ if( right_it != left_it->second.end() ) -+ kern = right_it->second; -+ } -+ } -+ return kern*(maFontSelData.mnWidth ? maFontSelData.mnWidth : maFontSelData.mnHeight)/1000; -+} -+ -+// ----------------------------------------------------------------------- -+ -+ULONG ServerFont::GetKernPairs( struct ImplKernPairData** ppKernPairs ) const -+{ -+ int nKernEntry = 0; -+ unicodeKernMap::const_iterator left_it; -+ std::map< sal_Unicode, int >::const_iterator right_it; -+ if( mpUnicodeKernPairs ) -+ { -+ // count the kern entries -+ for( left_it = mpUnicodeKernPairs->begin(); left_it != mpUnicodeKernPairs->end(); ++left_it ) -+ { -+ nKernEntry += left_it->second.size(); -+ } -+ } -+ -+ // allocate kern pair table -+ if( nKernEntry ) -+ { -+ *ppKernPairs = new ImplKernPairData[ nKernEntry ]; -+ -+ // fill in kern pairs -+ nKernEntry = 0; -+ for( left_it = mpUnicodeKernPairs->begin(); left_it != mpUnicodeKernPairs->end(); ++left_it ) -+ { -+ for( right_it = left_it->second.begin(); right_it != left_it->second.end(); ++right_it ) -+ { -+ (*ppKernPairs)[ nKernEntry ].mnChar1 = (USHORT)left_it->first; -+ (*ppKernPairs)[ nKernEntry ].mnChar2 = (USHORT)right_it->first; -+ (*ppKernPairs)[ nKernEntry ].mnKern = right_it->second*(maFontSelData.mnWidth ? maFontSelData.mnWidth : maFontSelData.mnHeight)/1000; -+ nKernEntry++; -+ } -+ } -+ } -+ else -+ *ppKernPairs = NULL; -+ -+ return (ULONG)nKernEntry; -+} -+ -+// ----------------------------------------------------------------------- -+ - GlyphData& ServerFont::GetGlyphData( int nGlyphIndex ) - { - // usually the GlyphData is cached -@@ -465,7 +528,7 @@ void ServerFont::GarbageCollect( long nM + nSin( 0), + mpKernPairs( pKern ), +@@ -527,7 +586,7 @@ void ServerFont::GarbageCollect( long nM GlyphList::iterator it_next = maGlyphList.begin(), it; while( it_next != maGlyphList.end() ) { @@ -771,13 +468,9 @@ diff -u -p -u -r1.22.40.2 -r1.26 { Index: vcl/source/glyphs/makefile.mk =================================================================== -RCS file: /cvs/gsl/vcl/source/glyphs/makefile.mk,v -retrieving revision 1.5 -retrieving revision 1.6 -diff -u -p -u -r1.5 -r1.6 ---- vcl/source/glyphs/makefile.mk 15 Feb 2002 15:52:27 -0000 1.5 -+++ vcl/source/glyphs/makefile.mk 6 Jan 2004 14:00:38 -0000 1.6 -@@ -76,11 +76,9 @@ TARGET=glyphs +--- vcl/source/glyphs/makefile.mk.orig 2004-09-12 14:26:10.000000000 +0200 ++++ vcl/source/glyphs/makefile.mk 2004-09-14 13:53:47.314958192 +0200 +@@ -77,11 +77,9 @@ CFLAGS += $(FREETYPE_CFLAGS) SLOFILES=\ $(SLO)$/glyphcache.obj \ $(SLO)$/gcach_rbmp.obj \ diff --git a/patches/vclplug/vcl-unx-source-gdi.diff b/patches/vclplug/vcl-unx-source-gdi.diff index 29d649121..7989f4d08 100644 --- a/patches/vclplug/vcl-unx-source-gdi.diff +++ b/patches/vclplug/vcl-unx-source-gdi.diff @@ -3,9 +3,10 @@ Index: vcl/unx/source/gdi/cdeint.cxx RCS file: /cvs/gsl/vcl/unx/source/gdi/cdeint.cxx,v retrieving revision 1.8 retrieving revision 1.9 -diff -u -p -u -r1.8 -r1.9 ---- vcl/unx/source/gdi/cdeint.cxx 24 Jun 2002 15:53:02 -0000 1.8 -+++ vcl/unx/source/gdi/cdeint.cxx 18 Nov 2003 14:44:27 -0000 1.9 +Index: vcl/unx/source/gdi/cdeint.cxx +=================================================================== +--- vcl/unx/source/gdi/cdeint.cxx.orig 2004-09-12 14:26:04.000000000 +0200 ++++ vcl/unx/source/gdi/cdeint.cxx 2004-09-14 14:09:32.367288400 +0200 @@ -64,14 +64,12 @@ #include <salunx.h> #include <saldisp.hxx> @@ -24,12 +25,8 @@ diff -u -p -u -r1.8 -r1.9 mnRefCount++; Index: vcl/unx/source/gdi/dtint.cxx =================================================================== -RCS file: /cvs/gsl/vcl/unx/source/gdi/dtint.cxx,v -retrieving revision 1.16.82.1 -retrieving revision 1.22 -diff -u -p -u -r1.16.82.1 -r1.22 ---- vcl/unx/source/gdi/dtint.cxx 15 Jan 2004 12:52:24 -0000 1.16.82.1 -+++ vcl/unx/source/gdi/dtint.cxx 10 May 2004 15:58:19 -0000 1.22 +--- vcl/unx/source/gdi/dtint.cxx.orig 2004-09-12 14:26:04.000000000 +0200 ++++ vcl/unx/source/gdi/dtint.cxx 2004-09-14 14:09:32.371287792 +0200 @@ -72,10 +72,8 @@ #include <cdeint.hxx> #endif @@ -143,7 +140,7 @@ diff -u -p -u -r1.16.82.1 -r1.22 void DtIntegrator::GetSystemLook( AllSettings& rSettings ) { --} + } - -Color DtIntegrator::parseColor( const ByteString& rLine ) -{ @@ -563,15 +560,11 @@ diff -u -p -u -r1.16.82.1 -r1.22 - rSettings.SetMouseSettings( aMouseSettings ); - rSettings.SetStyleSettings( aStyleSettings ); - } - } +-} Index: vcl/unx/source/gdi/gcach_xpeer.cxx =================================================================== -RCS file: /cvs/gsl/vcl/unx/source/gdi/gcach_xpeer.cxx,v -retrieving revision 1.32.18.1 -retrieving revision 1.37 -diff -u -p -u -r1.32.18.1 -r1.37 ---- vcl/unx/source/gdi/gcach_xpeer.cxx 9 Jan 2004 18:14:01 -0000 1.32.18.1 -+++ vcl/unx/source/gdi/gcach_xpeer.cxx 4 Feb 2004 11:05:23 -0000 1.37 +--- vcl/unx/source/gdi/gcach_xpeer.cxx.orig 2004-09-12 14:26:04.000000000 +0200 ++++ vcl/unx/source/gdi/gcach_xpeer.cxx 2004-09-14 14:09:32.372287640 +0200 @@ -61,6 +61,7 @@ #include <rtl/ustring.hxx> @@ -643,12 +636,8 @@ diff -u -p -u -r1.32.18.1 -r1.37 rGlyphData.SetOffset( +maRawBitmap.mnXOffset, +maRawBitmap.mnYOffset ); Index: vcl/unx/source/gdi/kdeint.cxx =================================================================== -RCS file: /cvs/gsl/vcl/unx/source/gdi/kdeint.cxx,v -retrieving revision 1.10 -retrieving revision 1.12 -diff -u -p -u -r1.10 -r1.12 ---- vcl/unx/source/gdi/kdeint.cxx 16 Jul 2003 17:46:57 -0000 1.10 -+++ vcl/unx/source/gdi/kdeint.cxx 6 Jan 2004 14:37:00 -0000 1.12 +--- vcl/unx/source/gdi/kdeint.cxx.orig 2004-09-12 14:26:04.000000000 +0200 ++++ vcl/unx/source/gdi/kdeint.cxx 2004-09-14 14:09:32.373287488 +0200 @@ -60,18 +60,18 @@ ************************************************************************/ @@ -691,12 +680,8 @@ diff -u -p -u -r1.10 -r1.12 if( pTryFiles[i][0] == '~' ) Index: vcl/unx/source/gdi/makefile.mk =================================================================== -RCS file: /cvs/gsl/vcl/unx/source/gdi/makefile.mk,v -retrieving revision 1.9 -retrieving revision 1.13 -diff -u -p -u -r1.9 -r1.13 ---- vcl/unx/source/gdi/makefile.mk 27 Aug 2002 14:52:35 -0000 1.9 -+++ vcl/unx/source/gdi/makefile.mk 10 May 2004 15:58:32 -0000 1.13 +--- vcl/unx/source/gdi/makefile.mk.orig 2004-09-12 14:26:04.000000000 +0200 ++++ vcl/unx/source/gdi/makefile.mk 2004-09-14 14:09:32.374287336 +0200 @@ -80,24 +80,29 @@ dummy: .ELSE # "$(GUIBASE)"!="unx" @@ -733,21 +718,19 @@ diff -u -p -u -r1.9 -r1.13 .IF "$(USE_XPRINT)" == "TRUE" CFLAGS+=-D_USE_PRINT_EXTENSION_=1 -@@ -113,8 +118,6 @@ ENVCFLAGS+=-DUSE_CDE - - .IF "$(USE_BUILTIN_RASTERIZER)" != "" +@@ -115,8 +120,6 @@ ENVCFLAGS+=-DUSE_CDE SLOFILES+= $(SLO)$/gcach_xpeer.obj --.ENDIF -- .ENDIF +-.ENDIF +- .ENDIF # "$(GUIBASE)"!="unx" + + # --- Targets ------------------------------------------------------ Index: vcl/unx/source/gdi/pspgraphics.cxx =================================================================== -RCS file: vcl/unx/source/gdi/pspgraphics.cxx -diff -N vcl/unx/source/gdi/pspgraphics.cxx ---- /dev/null 1 Jan 1970 00:00:00 -0000 -+++ vcl/unx/source/gdi/pspgraphics.cxx 17 Jun 2004 12:28:07 -0000 1.4 +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ vcl/unx/source/gdi/pspgraphics.cxx 2004-09-14 14:09:32.377286880 +0200 @@ -0,0 +1,1355 @@ +/************************************************************************* + * @@ -2106,12 +2089,8 @@ diff -N vcl/unx/source/gdi/pspgraphics.cxx +} Index: vcl/unx/source/gdi/salbmp.cxx =================================================================== -RCS file: /cvs/gsl/vcl/unx/source/gdi/salbmp.cxx,v -retrieving revision 1.8.274.1 -retrieving revision 1.14 -diff -u -p -u -r1.8.274.1 -r1.14 ---- vcl/unx/source/gdi/salbmp.cxx 15 Jan 2004 12:52:46 -0000 1.8.274.1 -+++ vcl/unx/source/gdi/salbmp.cxx 22 Jun 2004 17:42:38 -0000 1.14 +--- vcl/unx/source/gdi/salbmp.cxx.orig 2004-09-12 14:26:04.000000000 +0200 ++++ vcl/unx/source/gdi/salbmp.cxx 2004-09-14 14:09:32.382286120 +0200 @@ -59,20 +59,18 @@ * ************************************************************************/ @@ -2638,12 +2617,8 @@ diff -u -p -u -r1.8.274.1 -r1.14 { Index: vcl/unx/source/gdi/salgdi.cxx =================================================================== -RCS file: /cvs/gsl/vcl/unx/source/gdi/salgdi.cxx,v -retrieving revision 1.24.120.2 -retrieving revision 1.33 -diff -u -p -u -r1.24.120.2 -r1.33 ---- vcl/unx/source/gdi/salgdi.cxx 15 Jan 2004 12:53:28 -0000 1.24.120.2 -+++ vcl/unx/source/gdi/salgdi.cxx 22 Jun 2004 17:42:18 -0000 1.33 +--- vcl/unx/source/gdi/salgdi.cxx.orig 2004-09-12 14:26:04.000000000 +0200 ++++ vcl/unx/source/gdi/salgdi.cxx 2004-09-14 14:09:32.386285512 +0200 @@ -59,14 +59,22 @@ * ************************************************************************/ @@ -3951,12 +3926,8 @@ diff -u -p -u -r1.24.120.2 -r1.33 - Index: vcl/unx/source/gdi/salgdi2.cxx =================================================================== -RCS file: /cvs/gsl/vcl/unx/source/gdi/salgdi2.cxx,v -retrieving revision 1.18.68.1 -retrieving revision 1.25 -diff -u -p -u -r1.18.68.1 -r1.25 ---- vcl/unx/source/gdi/salgdi2.cxx 15 Jan 2004 12:53:52 -0000 1.18.68.1 -+++ vcl/unx/source/gdi/salgdi2.cxx 22 Jun 2004 17:42:46 -0000 1.25 +--- vcl/unx/source/gdi/salgdi2.cxx.orig 2004-09-12 14:26:04.000000000 +0200 ++++ vcl/unx/source/gdi/salgdi2.cxx 2004-09-14 14:09:32.406282472 +0200 @@ -59,9 +59,6 @@ * ************************************************************************/ @@ -5315,12 +5286,8 @@ diff -u -p -u -r1.18.68.1 -r1.25 Index: vcl/unx/source/gdi/salgdi3.cxx =================================================================== -RCS file: /cvs/gsl/vcl/unx/source/gdi/salgdi3.cxx,v -retrieving revision 1.105.46.5 -retrieving revision 1.119 -diff -u -p -u -r1.105.46.5 -r1.119 ---- vcl/unx/source/gdi/salgdi3.cxx 13 Feb 2004 14:03:54 -0000 1.105.46.5 -+++ vcl/unx/source/gdi/salgdi3.cxx 17 Jun 2004 12:29:09 -0000 1.119 +--- vcl/unx/source/gdi/salgdi3.cxx.orig 2004-09-12 14:46:23.000000000 +0200 ++++ vcl/unx/source/gdi/salgdi3.cxx 2004-09-14 14:11:55.218571704 +0200 @@ -59,10 +59,6 @@ * ************************************************************************/ @@ -5664,7 +5631,7 @@ diff -u -p -u -r1.105.46.5 -r1.119 for( int nStart = 0; rSalLayout.GetNextGlyphs( 1, &nGlyph, aPos, nStart ); ) { Pixmap aStipple = aX11GlyphPeer.GetPixmap( rFont, nGlyph ); -@@ -1124,186 +1015,27 @@ void SalGraphicsData::DrawServerSimpleFo +@@ -1124,200 +1015,27 @@ void SalGraphicsData::DrawServerSimpleFo //-------------------------------------------------------------------------- @@ -5733,10 +5700,24 @@ diff -u -p -u -r1.105.46.5 -r1.119 - // apply pair kerning to prev glyph if requested - if( SAL_LAYOUT_KERNING_PAIRS & rArgs.mnFlags ) - { -- // TODO: get kerning value from printer -- int nKern = 0; //GetGlyphKernValue( nOldGlyphId, nGlyphIndex ); -- nGlyphWidth += nKern; -- aPrevItem.mnNewWidth = nGlyphWidth; +- if( nOldGlyphId > 0 ) +- { +- const std::list< psp::KernPair >& rKernPairs = mrPrinterGfx.getKernPairs(mbVertical); +- for( std::list< psp::KernPair >::const_iterator it = rKernPairs.begin(); +- it != rKernPairs.end(); ++it ) +- { +- if( it->first == nOldGlyphId && it->second == nGlyphIndex ) +- { +- int nTextScale = mrPrinterGfx.GetFontWidth(); +- if( ! nTextScale ) +- nTextScale = mrPrinterGfx.GetFontHeight(); +- int nKern = (mbVertical ? it->kern_y : it->kern_x) * nTextScale; +- nGlyphWidth += nKern; +- aPrevItem.mnNewWidth = nGlyphWidth; +- break; +- } +- } +- } - } - - // finish previous glyph @@ -5866,7 +5847,7 @@ diff -u -p -u -r1.105.46.5 -r1.119 else { // draw complex text -@@ -1326,35 +1058,7 @@ void SalGraphicsData::DispatchServerFont +@@ -1340,35 +1058,7 @@ void SalGraphicsData::DispatchServerFont //-------------------------------------------------------------------------- @@ -5903,7 +5884,7 @@ diff -u -p -u -r1.105.46.5 -r1.119 const Point& rPoint, const sal_Unicode* pStr, int nLength ) { Display* pDisplay = GetXDisplay(); -@@ -1383,8 +1087,9 @@ void SalGraphicsData::DrawStringUCS2MB( +@@ -1397,8 +1087,9 @@ void SalGraphicsData::DrawStringUCS2MB( { XTextItem16 *pTextItem = (XTextItem16*)alloca( nLength * sizeof(XTextItem16) ); XChar2b *pMBChar = (XChar2b*)pStr; @@ -5914,7 +5895,7 @@ diff -u -p -u -r1.105.46.5 -r1.119 { rtl_TextEncoding nEnc; XFontStruct* pFontStruct = rFont.GetFontStruct( pStr[nChar], &nEnc ); -@@ -1406,15 +1111,13 @@ void SalGraphicsData::DrawStringUCS2MB( +@@ -1420,15 +1111,13 @@ void SalGraphicsData::DrawStringUCS2MB( //-------------------------------------------------------------------------- @@ -5931,7 +5912,7 @@ diff -u -p -u -r1.105.46.5 -r1.119 if( mXFont[0] ) nPairs = mXFont[0]->GetFontCodeRanges( pCodePairs ); return nPairs; -@@ -1449,204 +1152,32 @@ CheckNoNegativeCoordinateWorkaround() +@@ -1463,204 +1152,32 @@ CheckNoNegativeCoordinateWorkaround() // // ---------------------------------------------------------------------------- @@ -5990,29 +5971,29 @@ diff -u -p -u -r1.105.46.5 -r1.119 { -#ifndef _USE_PRINT_EXTENSION_ - if (maGraphicsData.m_pPrinterGfx != NULL) -- { ++ if( nTextColor_ != nSalColor ) + { - psp::PrinterColor aColor (SALCOLOR_RED (nSalColor), - SALCOLOR_GREEN (nSalColor), - SALCOLOR_BLUE (nSalColor)); - maGraphicsData.m_pPrinterGfx->SetTextColor (aColor); -- } ++ nTextColor_ = nSalColor; ++ nTextPixel_ = GetPixel( nSalColor ); ++ bFontGC_ = FALSE; + } - else - { -#endif - - if( _GetTextColor() != nSalColor ) -+ if( nTextColor_ != nSalColor ) - { +- { - _GetTextColor() = nSalColor; - _GetTextPixel() = _GetPixel( nSalColor ); - _IsFontGC() = FALSE; - } - -#ifndef _USE_PRINT_EXTENSION_ -+ nTextColor_ = nSalColor; -+ nTextPixel_ = GetPixel( nSalColor ); -+ bFontGC_ = FALSE; - } +- } -#endif } @@ -6149,7 +6130,7 @@ diff -u -p -u -r1.105.46.5 -r1.119 { // inform font manager rtl::OUString aUSystemPath; -@@ -1662,7 +1193,7 @@ ImplFontData* SalGraphics::AddTempDevFon +@@ -1676,7 +1193,7 @@ ImplFontData* SalGraphics::AddTempDevFon psp::FastPrintFontInfo aInfo; rMgr.getFontFastInfo( nFontId, aInfo ); ImplFontData* pFontData = new ImplFontData; @@ -6158,7 +6139,7 @@ diff -u -p -u -r1.105.46.5 -r1.119 pFontData->maName = rFontName; pFontData->mnQuality += 5800; -@@ -1676,148 +1207,83 @@ ImplFontData* SalGraphics::AddTempDevFon +@@ -1690,164 +1207,82 @@ ImplFontData* SalGraphics::AddTempDevFon // ---------------------------------------------------------------------------- @@ -6167,35 +6148,7 @@ diff -u -p -u -r1.105.46.5 -r1.119 { -#ifndef _USE_PRINT_EXTENSION_ - if (maGraphicsData.m_pJobData != NULL) -+ XlfdStorage* pFonts = GetDisplay()->GetXlfdList(); -+ -+ for ( int nIdx = 0; nIdx < pFonts->GetCount(); nIdx++ ) -+ { -+ ImplFontData *pFontData = new ImplFontData; -+ pFonts->Get(nIdx)->ToImplFontData( pFontData ); -+ if( pFontData->maName.CompareIgnoreCaseToAscii( "itc ", 4 ) == COMPARE_EQUAL ) -+ pFontData->maName = pFontData->maName.Copy( 4 ); -+ pFontData->mbSubsettable = FALSE; -+ pFontData->mbEmbeddable = FALSE; -+ pList->Add( pFontData ); -+ } -+ -+ aX11GlyphPeer.SetDisplay( GetXDisplay(), -+ GetDisplay()->GetVisual()->GetVisual() ); -+#ifdef MACOSX -+ GlyphCache::EnsureInstance( aX11GlyphPeer, true ); -+#else -+ GlyphCache::EnsureInstance( aX11GlyphPeer, false ); -+#endif -+ GlyphCache& rGC = GlyphCache::GetInstance(); -+ -+ const psp::PrintFontManager& rMgr = psp::PrintFontManager::get(); -+ ::std::list< psp::fontID > aList; -+ ::std::list< psp::fontID >::iterator it; -+ rMgr.getFontList( aList ); -+ unicodeKernMap aKernTab; -+ for( it = aList.begin(); it != aList.end(); ++it ) - { +- { - const char* pLangBoost = NULL; - const LanguageType aLang = Application::GetSettings().GetUILanguage(); - switch( aLang ) @@ -6225,39 +6178,17 @@ diff -u -p -u -r1.105.46.5 -r1.119 - - ::std::list< psp::fontID >::iterator it; - for (it = aList.begin(); it != aList.end(); ++it) -+ psp::FastPrintFontInfo aInfo; -+ if( rMgr.getFontFastInfo( *it, aInfo ) ) - { +- { - psp::FastPrintFontInfo aInfo; - if (rMgr.getFontFastInfo (*it, aInfo)) -+ if( aInfo.m_eType == psp::fonttype::Builtin ) -+ continue; -+ ImplFontData aFontData; -+ PspGraphics::SetImplFontData( aInfo, aFontData ); -+ // prefer builtin_rasterizer fonts -+ aFontData.mnQuality += 4096; -+ // prefer truetype fonts -+ if( aInfo.m_eType == psp::fonttype::TrueType ) -+ aFontData.mnQuality += 1000; -+ int nFaceNum = rMgr.getFontFaceNumber( aInfo.m_nID ); -+ if( aFontData.maName.CompareIgnoreCaseToAscii( "itc ", 4 ) == COMPARE_EQUAL ) -+ aFontData.maName = aFontData.maName.Copy( 4 ); -+ if( nFaceNum < 0 ) -+ nFaceNum = 0; -+ -+ -+ const unicodeKernMap* pKernTab = NULL; -+ if( aInfo.m_eType == psp::fonttype::Type1 ) - { +- { - ImplFontData *pFontData = new ImplFontData; - SetImplFontData( aInfo, *pFontData ); - pFontData->mpSysData = (void*)*it; - if( pFontData->maName.CompareIgnoreCaseToAscii( "itc ", 4 ) == COMPARE_EQUAL ) - pFontData->maName = pFontData->maName.Copy( 4 ); - if( aInfo.m_eType == psp::fonttype::TrueType ) -+ const std::list< psp::KernPair >& rKernPairs = rMgr.getKernPairs( *it ); -+ if( rKernPairs.size() ) - { +- { - // prefer truetype fonts - pFontData->mnQuality += 10; - // asian type 1 fonts are not known @@ -6270,29 +6201,35 @@ diff -u -p -u -r1.105.46.5 -r1.119 - if( pLangBoost && aFileName.Copy( nPos+1, 3 ).EqualsIgnoreCaseAscii( pLangBoost ) ) - pFontData->mnQuality += 10; - } -+ aKernTab.clear(); -+ for( std::list< psp::KernPair >::const_iterator it = rKernPairs.begin(); -+ it != rKernPairs.end(); ++it ) -+ aKernTab[ it->first ][ it->second ] = it->kern_x; -+ pKernTab = & aKernTab; - } +- } - pList->Add( pFontData ); - } -+ -+ // handling of alias names is done by GlyphCache::FetchFontList -+ rGC.AddFontFile( rMgr.getFontFileSysPath( aInfo.m_nID ), nFaceNum, -+ aInfo.m_nID, &aFontData, pKernTab ); - } - } +- } +- } +- } - else -#endif - { - XlfdStorage* pFonts = _GetDisplay()->GetXlfdList(); - +- - for ( int nIdx = 0; nIdx < pFonts->GetCount(); nIdx++ ) - { - ImplFontData *pFontData = new ImplFontData; --#ifdef MACOSX ++ XlfdStorage* pFonts = GetDisplay()->GetXlfdList(); ++ ++ for ( int nIdx = 0; nIdx < pFonts->GetCount(); nIdx++ ) ++ { ++ ImplFontData *pFontData = new ImplFontData; ++ pFonts->Get(nIdx)->ToImplFontData( pFontData ); ++ if( pFontData->maName.CompareIgnoreCaseToAscii( "itc ", 4 ) == COMPARE_EQUAL ) ++ pFontData->maName = pFontData->maName.Copy( 4 ); ++ pFontData->mbSubsettable = FALSE; ++ pFontData->mbEmbeddable = FALSE; ++ pList->Add( pFontData ); ++ } ++ ++ aX11GlyphPeer.SetDisplay( GetXDisplay(), ++ GetDisplay()->GetVisual()->GetVisual() ); + #ifdef MACOSX - // don't use bitmap X fonts on OS X - if ( pFonts->Get(nIdx)->GetFontType() != TYPE_RASTER ) -#endif @@ -6311,17 +6248,31 @@ diff -u -p -u -r1.105.46.5 -r1.119 - maGraphicsData.GetDisplay()->GetVisual()->GetVisual() ); -#ifdef MACOSX - GlyphCache::EnsureInstance( aX11GlyphPeer, true ); --#else ++ GlyphCache::EnsureInstance( aX11GlyphPeer, true ); + #else - GlyphCache::EnsureInstance( aX11GlyphPeer, false ); --#endif ++ GlyphCache::EnsureInstance( aX11GlyphPeer, false ); + #endif - GlyphCache& rGC = GlyphCache::GetInstance(); - - const psp::PrintFontManager& rMgr = psp::PrintFontManager::get(); - ::std::list< psp::fontID > aList; - ::std::list< psp::fontID >::iterator it; - rMgr.getFontList( aList ); +- unicodeKernMap aKernTab; - for( it = aList.begin(); it != aList.end(); ++it ) -- { ++ GlyphCache& rGC = GlyphCache::GetInstance(); ++ ++ const psp::PrintFontManager& rMgr = psp::PrintFontManager::get(); ++ ::std::list< psp::fontID > aList; ++ ::std::list< psp::fontID >::iterator it; ++ rMgr.getFontList( aList ); ++ unicodeKernMap aKernTab; ++ for( it = aList.begin(); it != aList.end(); ++it ) ++ { ++ psp::FastPrintFontInfo aInfo; ++ if( rMgr.getFontFastInfo( *it, aInfo ) ) + { - psp::FastPrintFontInfo aInfo; - if( rMgr.getFontFastInfo( *it, aInfo ) ) - { @@ -6339,14 +6290,58 @@ diff -u -p -u -r1.105.46.5 -r1.119 - aFontData.maName = aFontData.maName.Copy( 4 ); - if( nFaceNum < 0 ) - nFaceNum = 0; ++ if( aInfo.m_eType == psp::fonttype::Builtin ) ++ continue; ++ ImplFontData aFontData; ++ PspGraphics::SetImplFontData( aInfo, aFontData ); ++ // prefer builtin_rasterizer fonts ++ aFontData.mnQuality += 4096; ++ // prefer truetype fonts ++ if( aInfo.m_eType == psp::fonttype::TrueType ) ++ aFontData.mnQuality += 1000; ++ int nFaceNum = rMgr.getFontFaceNumber( aInfo.m_nID ); ++ if( aFontData.maName.CompareIgnoreCaseToAscii( "itc ", 4 ) == COMPARE_EQUAL ) ++ aFontData.maName = aFontData.maName.Copy( 4 ); ++ if( nFaceNum < 0 ) ++ nFaceNum = 0; ++ + +- const unicodeKernMap* pKernTab = NULL; +- if( aInfo.m_eType == psp::fonttype::Type1 ) ++ const unicodeKernMap* pKernTab = NULL; ++ if( aInfo.m_eType == psp::fonttype::Type1 ) ++ { ++ const std::list< psp::KernPair >& rKernPairs = rMgr.getKernPairs( *it ); ++ if( rKernPairs.size() ) + { +- const std::list< psp::KernPair >& rKernPairs = rMgr.getKernPairs( *it ); +- if( rKernPairs.size() ) +- { +- aKernTab.clear(); +- for( std::list< psp::KernPair >::const_iterator it = rKernPairs.begin(); +- it != rKernPairs.end(); ++it ) +- aKernTab[ it->first ][ it->second ] = it->kern_x; +- pKernTab = & aKernTab; +- } ++ aKernTab.clear(); ++ for( std::list< psp::KernPair >::const_iterator it = rKernPairs.begin(); ++ it != rKernPairs.end(); ++it ) ++ aKernTab[ it->first ][ it->second ] = it->kern_x; ++ pKernTab = & aKernTab; + } +- - rGC.AddFontFile( rMgr.getFontFileSysPath( aInfo.m_nID ), nFaceNum, -- aInfo.m_nID, &aFontData ); -- } -- } +- aInfo.m_nID, &aFontData, pKernTab ); + } ++ ++ // handling of alias names is done by GlyphCache::FetchFontList ++ rGC.AddFontFile( rMgr.getFontFileSysPath( aInfo.m_nID ), nFaceNum, ++ aInfo.m_nID, &aFontData, pKernTab ); + } - - rGC.FetchFontList( pList ); -#endif // USE_BUILTIN_RASTERIZER -- } + } + rGC.FetchFontList( pList ); } @@ -6369,7 +6364,7 @@ diff -u -p -u -r1.105.46.5 -r1.119 } // ---------------------------------------------------------------------------- -@@ -1831,136 +1297,53 @@ sal_DivideNeg( long n1, long n2 ) +@@ -1861,136 +1296,53 @@ sal_DivideNeg( long n1, long n2 ) // ---------------------------------------------------------------------------- void @@ -6517,7 +6512,7 @@ diff -u -p -u -r1.105.46.5 -r1.119 if( !pSF ) return FALSE; -@@ -1972,13 +1355,13 @@ BOOL SalGraphics::GetGlyphBoundRect( lon +@@ -2002,13 +1354,13 @@ BOOL SalGraphics::GetGlyphBoundRect( lon // --------------------------------------------------------------------------- @@ -6533,7 +6528,7 @@ diff -u -p -u -r1.105.46.5 -r1.119 if( !pSF ) return FALSE; -@@ -1991,29 +1374,13 @@ BOOL SalGraphics::GetGlyphOutline( long +@@ -2021,29 +1373,13 @@ BOOL SalGraphics::GetGlyphOutline( long //-------------------------------------------------------------------------- @@ -6565,7 +6560,7 @@ diff -u -p -u -r1.105.46.5 -r1.119 else if( mXFont[ nFallbackLevel ] ) pLayout = new X11FontLayout( *mXFont[ nFallbackLevel ] ); else -@@ -2024,18 +1391,10 @@ SalLayout* SalGraphicsData::GetTextLayou +@@ -2054,18 +1390,10 @@ SalLayout* SalGraphicsData::GetTextLayou //-------------------------------------------------------------------------- @@ -6586,7 +6581,7 @@ diff -u -p -u -r1.105.46.5 -r1.119 sal_uInt8* pEncoding, sal_Int32* pWidths, int nGlyphs, -@@ -2049,41 +1408,7 @@ BOOL SalGraphics::CreateFontSubset( +@@ -2079,41 +1407,7 @@ BOOL SalGraphics::CreateFontSubset( // which this method was created). The correct way would // be to have the GlyphCache search for the ImplFontData pFont psp::fontID aFont = (psp::fontID)pFont->mpSysData; @@ -6629,7 +6624,7 @@ diff -u -p -u -r1.105.46.5 -r1.119 #else return FALSE; #endif -@@ -2091,7 +1416,7 @@ BOOL SalGraphics::CreateFontSubset( +@@ -2121,7 +1415,7 @@ BOOL SalGraphics::CreateFontSubset( //-------------------------------------------------------------------------- @@ -6638,7 +6633,7 @@ diff -u -p -u -r1.105.46.5 -r1.119 { #ifndef _USE_PRINT_EXTENSION_ // in this context the sysdata member of pFont should -@@ -2100,61 +1425,7 @@ const void* SalGraphics::GetEmbedFontDat +@@ -2130,61 +1424,7 @@ const void* SalGraphics::GetEmbedFontDat // which this method was created). The correct way would // be to have the GlyphCache search for the ImplFontData pFont psp::fontID aFont = (psp::fontID)pFont->mpSysData; @@ -6701,7 +6696,7 @@ diff -u -p -u -r1.105.46.5 -r1.119 #else return NULL; #endif -@@ -2162,14 +1433,16 @@ const void* SalGraphics::GetEmbedFontDat +@@ -2192,14 +1432,16 @@ const void* SalGraphics::GetEmbedFontDat //-------------------------------------------------------------------------- @@ -6721,7 +6716,7 @@ diff -u -p -u -r1.105.46.5 -r1.119 { #ifndef _USE_PRINT_EXTENSION_ // in this context the sysdata member of pFont should -@@ -2178,17 +1451,7 @@ const std::map< sal_Unicode, sal_Int32 > +@@ -2208,17 +1450,7 @@ const std::map< sal_Unicode, sal_Int32 > // which this method was created). The correct way would // be to have the GlyphCache search for the ImplFontData pFont psp::fontID aFont = (psp::fontID)pFont->mpSysData; @@ -6742,10 +6737,8 @@ diff -u -p -u -r1.105.46.5 -r1.119 #endif Index: vcl/unx/source/gdi/salnativewidgets-kde.cxx =================================================================== -RCS file: vcl/unx/source/gdi/salnativewidgets-kde.cxx -diff -N vcl/unx/source/gdi/salnativewidgets-kde.cxx ---- /dev/null 1 Jan 1970 00:00:00 -0000 -+++ vcl/unx/source/gdi/salnativewidgets-kde.cxx 10 May 2004 15:59:25 -0000 1.2 +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ vcl/unx/source/gdi/salnativewidgets-kde.cxx 2004-09-14 14:09:32.421280192 +0200 @@ -0,0 +1,1633 @@ +/************************************************************************* + * @@ -8382,12 +8375,8 @@ diff -N vcl/unx/source/gdi/salnativewidgets-kde.cxx +/* vim: set tabstop=8 shiftwidth=4: */ Index: vcl/unx/source/gdi/salogl.cxx =================================================================== -RCS file: /cvs/gsl/vcl/unx/source/gdi/salogl.cxx,v -retrieving revision 1.7 -retrieving revision 1.11 -diff -u -p -u -r1.7 -r1.11 ---- vcl/unx/source/gdi/salogl.cxx 15 Apr 2003 16:10:05 -0000 1.7 -+++ vcl/unx/source/gdi/salogl.cxx 10 May 2004 15:59:38 -0000 1.11 +--- vcl/unx/source/gdi/salogl.cxx.orig 2004-09-12 14:26:04.000000000 +0200 ++++ vcl/unx/source/gdi/salogl.cxx 2004-09-14 14:09:32.422280040 +0200 @@ -59,8 +59,6 @@ * ************************************************************************/ @@ -8679,12 +8668,8 @@ diff -u -p -u -r1.7 -r1.11 int nVisuals ) Index: vcl/unx/source/gdi/salprnpsp.cxx =================================================================== -RCS file: /cvs/gsl/vcl/unx/source/gdi/salprnpsp.cxx,v -retrieving revision 1.27.40.2 -retrieving revision 1.33 -diff -u -p -u -r1.27.40.2 -r1.33 ---- vcl/unx/source/gdi/salprnpsp.cxx 28 Jan 2004 15:25:52 -0000 1.27.40.2 -+++ vcl/unx/source/gdi/salprnpsp.cxx 10 May 2004 15:59:51 -0000 1.33 +--- vcl/unx/source/gdi/salprnpsp.cxx.orig 2004-09-12 14:26:04.000000000 +0200 ++++ vcl/unx/source/gdi/salprnpsp.cxx 2004-09-14 14:09:32.426279432 +0200 @@ -79,14 +79,14 @@ #ifndef _SV_JOBSET_H #include <jobset.h> @@ -9256,12 +9241,8 @@ diff -u -p -u -r1.27.40.2 -r1.33 Index: vcl/unx/source/gdi/salvd.cxx =================================================================== -RCS file: /cvs/gsl/vcl/unx/source/gdi/salvd.cxx,v -retrieving revision 1.4 -retrieving revision 1.8 -diff -u -p -u -r1.4 -r1.8 ---- vcl/unx/source/gdi/salvd.cxx 27 Mar 2003 17:58:52 -0000 1.4 -+++ vcl/unx/source/gdi/salvd.cxx 10 May 2004 16:00:04 -0000 1.8 +--- vcl/unx/source/gdi/salvd.cxx.orig 2004-09-12 14:26:04.000000000 +0200 ++++ vcl/unx/source/gdi/salvd.cxx 2004-09-14 14:09:32.427279280 +0200 @@ -59,9 +59,6 @@ * ************************************************************************/ @@ -9484,12 +9465,8 @@ diff -u -p -u -r1.4 -r1.8 } Index: vcl/unx/source/gdi/xfont.cxx =================================================================== -RCS file: /cvs/gsl/vcl/unx/source/gdi/xfont.cxx,v -retrieving revision 1.29.82.2 -retrieving revision 1.36 -diff -u -p -u -r1.29.82.2 -r1.36 ---- vcl/unx/source/gdi/xfont.cxx 26 Jan 2004 17:26:20 -0000 1.29.82.2 -+++ vcl/unx/source/gdi/xfont.cxx 17 Jun 2004 12:29:36 -0000 1.36 +--- vcl/unx/source/gdi/xfont.cxx.orig 2004-09-12 14:26:04.000000000 +0200 ++++ vcl/unx/source/gdi/xfont.cxx 2004-09-14 14:09:32.428279128 +0200 @@ -76,8 +76,11 @@ #ifndef _SV_OUTFONT_HXX #include <outfont.hxx> @@ -9514,7 +9491,7 @@ diff -u -p -u -r1.29.82.2 -r1.36 mpRangeCodes(NULL), mnRangeCount(-1) { -@@ -434,7 +438,7 @@ ExtendedFontStruct::GetDefaultWidth() +@@ -437,7 +440,7 @@ ExtendedFontStruct::GetDefaultWidth() // is compatible with iso8859-X at least in the range to 0x7f sal_Size ExtendedFontStruct::GetCharWidth8( sal_Unicode nFrom, sal_Unicode nTo, @@ -9523,7 +9500,7 @@ diff -u -p -u -r1.29.82.2 -r1.36 { if ( !(nFrom <= nTo) ) return 0; -@@ -477,7 +481,7 @@ ExtendedFontStruct::GetCharWidth8( sal_U +@@ -480,7 +483,7 @@ ExtendedFontStruct::GetCharWidth8( sal_U // Handle utf16 encoded fonts, which do not require conversion sal_Size ExtendedFontStruct::GetCharWidthUTF16( sal_Unicode nFrom, sal_Unicode nTo, @@ -9532,7 +9509,7 @@ diff -u -p -u -r1.29.82.2 -r1.36 { if ( !(nFrom <= nTo) ) return 0; -@@ -523,7 +527,7 @@ ExtendedFontStruct::GetCharWidthUTF16( s +@@ -526,7 +529,7 @@ ExtendedFontStruct::GetCharWidthUTF16( s // font in fontstruct, 8 and 16 bit fonts are handled the same way sal_Size ExtendedFontStruct::GetCharWidth16( sal_Unicode nFrom, sal_Unicode nTo, @@ -9541,7 +9518,7 @@ diff -u -p -u -r1.29.82.2 -r1.36 { if ( nFrom > nTo ) return 0; -@@ -608,8 +612,8 @@ ExtendedFontStruct::GetCharWidth16( sal_ +@@ -611,8 +614,8 @@ ExtendedFontStruct::GetCharWidth16( sal_ } sal_Size @@ -9552,7 +9529,7 @@ diff -u -p -u -r1.29.82.2 -r1.36 { sal_Size nConverted = 0; -@@ -707,7 +711,9 @@ bool X11FontLayout::LayoutText( ImplLayo +@@ -710,7 +713,9 @@ bool X11FontLayout::LayoutText( ImplLayo { Point aNewPos( 0, 0 ); bool bRightToLeft; @@ -9563,7 +9540,7 @@ diff -u -p -u -r1.29.82.2 -r1.36 { sal_Unicode cChar = rArgs.mpStr[ nCharPos ]; if( bRightToLeft ) -@@ -722,7 +728,7 @@ bool X11FontLayout::LayoutText( ImplLayo +@@ -725,7 +730,7 @@ bool X11FontLayout::LayoutText( ImplLayo nGlyphIndex = 0; // drop NotDef fallback glyphs } @@ -9572,7 +9549,7 @@ diff -u -p -u -r1.29.82.2 -r1.36 mrFont.GetCharWidth( cChar, &nPhysGlyphWidth, &nLogGlyphWidth ); int nGlyphFlags = (nPhysGlyphWidth > 0) ? 0 : GlyphItem::IS_IN_CLUSTER; if( bRightToLeft ) -@@ -753,7 +759,7 @@ void X11FontLayout::DrawText( SalGraphic +@@ -756,7 +761,7 @@ void X11FontLayout::DrawText( SalGraphic int nMaxGlyphs = GetOrientation() ? 1 : MAXGLYPHS; Point aPos; @@ -9581,7 +9558,7 @@ diff -u -p -u -r1.29.82.2 -r1.36 sal_Unicode pStr[ MAXGLYPHS ]; for( int nStart=0;;) { -@@ -764,7 +770,7 @@ void X11FontLayout::DrawText( SalGraphic +@@ -767,7 +772,7 @@ void X11FontLayout::DrawText( SalGraphic for( int i = 0; i < nGlyphCount; ++i ) pStr[ i ] = aGlyphAry[ i ] & GF_IDXMASK; @@ -9592,12 +9569,8 @@ diff -u -p -u -r1.29.82.2 -r1.36 Index: vcl/unx/source/gdi/xlfd_attr.cxx =================================================================== -RCS file: /cvs/gsl/vcl/unx/source/gdi/xlfd_attr.cxx,v -retrieving revision 1.14 -retrieving revision 1.15 -diff -u -p -u -r1.14 -r1.15 ---- vcl/unx/source/gdi/xlfd_attr.cxx 12 Jun 2003 08:19:39 -0000 1.14 -+++ vcl/unx/source/gdi/xlfd_attr.cxx 6 Jan 2004 14:41:47 -0000 1.15 +--- vcl/unx/source/gdi/xlfd_attr.cxx.orig 2004-09-12 14:26:04.000000000 +0200 ++++ vcl/unx/source/gdi/xlfd_attr.cxx 2004-09-14 14:09:32.433278368 +0200 @@ -120,10 +120,12 @@ Attribute::Compare( const char *p, int n const rtl::OString& Attribute::GetKey () @@ -9614,12 +9587,8 @@ diff -u -p -u -r1.14 -r1.15 Index: vcl/unx/source/gdi/xlfd_extd.cxx =================================================================== -RCS file: /cvs/gsl/vcl/unx/source/gdi/xlfd_extd.cxx,v -retrieving revision 1.16.46.2 -retrieving revision 1.21 -diff -u -p -u -r1.16.46.2 -r1.21 ---- vcl/unx/source/gdi/xlfd_extd.cxx 26 Jan 2004 17:26:45 -0000 1.16.46.2 -+++ vcl/unx/source/gdi/xlfd_extd.cxx 30 Mar 2004 13:43:43 -0000 1.21 +--- vcl/unx/source/gdi/xlfd_extd.cxx.orig 2004-09-12 14:26:04.000000000 +0200 ++++ vcl/unx/source/gdi/xlfd_extd.cxx 2004-09-14 14:09:32.435278064 +0200 @@ -652,7 +652,7 @@ ScalableBitmapXlfd::ToString( ByteString rString += '-'; rString += ByteString::CreateFromInt32( rInfo.mnResolutionY ); @@ -9733,12 +9702,8 @@ diff -u -p -u -r1.16.46.2 -r1.21 AppendAttribute( mpFactory->RetrieveCharset(rInfo.mnCharset), rString ); Index: vcl/unx/source/gdi/xlfd_extd.hxx =================================================================== -RCS file: /cvs/gsl/vcl/unx/source/gdi/xlfd_extd.hxx,v -retrieving revision 1.9.120.2 -retrieving revision 1.12 -diff -u -p -u -r1.9.120.2 -r1.12 ---- vcl/unx/source/gdi/xlfd_extd.hxx 26 Jan 2004 17:27:37 -0000 1.9.120.2 -+++ vcl/unx/source/gdi/xlfd_extd.hxx 17 Mar 2004 10:07:56 -0000 1.12 +--- vcl/unx/source/gdi/xlfd_extd.hxx.orig 2004-09-12 14:26:04.000000000 +0200 ++++ vcl/unx/source/gdi/xlfd_extd.hxx 2004-09-14 14:09:32.435278064 +0200 @@ -93,8 +93,8 @@ class XlfdStorage; class ExtendedXlfd { @@ -9752,12 +9717,8 @@ diff -u -p -u -r1.9.120.2 -r1.12 ExtendedXlfd(); Index: vcl/unx/source/gdi/xlfd_smpl.cxx =================================================================== -RCS file: /cvs/gsl/vcl/unx/source/gdi/xlfd_smpl.cxx,v -retrieving revision 1.5 -retrieving revision 1.7 -diff -u -p -u -r1.5 -r1.7 ---- vcl/unx/source/gdi/xlfd_smpl.cxx 15 Apr 2003 16:11:23 -0000 1.5 -+++ vcl/unx/source/gdi/xlfd_smpl.cxx 18 May 2004 13:49:24 -0000 1.7 +--- vcl/unx/source/gdi/xlfd_smpl.cxx.orig 2004-09-12 14:26:04.000000000 +0200 ++++ vcl/unx/source/gdi/xlfd_smpl.cxx 2004-09-14 14:09:32.436277912 +0200 @@ -282,12 +282,12 @@ Xlfd::ToString( ByteString &rString ) co AppendAttribute( mpFactory->RetrieveSetwidth(mnSetwidth), rString ); AppendAttribute( mpFactory->RetrieveAddstyle(mnAddstyle), rString ); @@ -9779,12 +9740,8 @@ diff -u -p -u -r1.5 -r1.7 Index: vcl/unx/source/gdi/xprintext.cxx =================================================================== -RCS file: /cvs/gsl/vcl/unx/source/gdi/xprintext.cxx,v -retrieving revision 1.6 -retrieving revision 1.8 -diff -u -p -u -r1.6 -r1.8 ---- vcl/unx/source/gdi/xprintext.cxx 15 Apr 2003 16:11:42 -0000 1.6 -+++ vcl/unx/source/gdi/xprintext.cxx 30 Mar 2004 13:43:56 -0000 1.8 +--- vcl/unx/source/gdi/xprintext.cxx.orig 2004-09-12 14:26:04.000000000 +0200 ++++ vcl/unx/source/gdi/xprintext.cxx 2004-09-14 14:09:32.437277760 +0200 @@ -59,8 +59,6 @@ * ************************************************************************/ diff --git a/patches/vclplug/vcl-util.diff b/patches/vclplug/vcl-util.diff index 3b7413cd8..552d2cfb8 100644 --- a/patches/vclplug/vcl-util.diff +++ b/patches/vclplug/vcl-util.diff @@ -243,7 +243,7 @@ Index: vcl/util/makefile.mk -.IF "$(OS)"=="LINUX" || "$(OS)"=="SOLARIS" || "$(OS)"=="FREEBSD" -# some nas versions need -lXt, too --SHL1STDLIBS += -lXt +-#we must not link with Xt !!! it requires Xm which is not available on all platforms -SHL1STDLIBS += -laudio -.IF "$(OS)"=="SOLARIS" -# needed by libaudio.a |