ooo-build r15490 - in trunk: . bin bin/piece doc patches/dev300 src src/helpcontent2



Author: pmladek
Date: Fri Mar  6 16:40:42 2009
New Revision: 15490
URL: http://svn.gnome.org/viewvc/ooo-build?rev=15490&view=rev

Log:
2009-03-06  Petr Mladek  <pmladek suse cz>

        * patches/dev300/piece-helpcontent2.diff:
        * patches/dev300/piece-writer2latex.diff:
        * patches/dev300/piece-extensions.diff:
        * patches/dev300/piece-reportdesign.diff:
        * patches/dev300/piece-sw.diff:
        * patches/dev300/piece-vbahelper.diff:
        * patches/dev300/apply: fix build with ooo310-m2

        * patches/dev300/piece-scp2.diff: add hack to build with internal icu
          on older systems

        * patches/dev300/wpgimporter.diff: fix context to apply correctly

        * bin/piece/sys-setup.in: fix link flags to search the system solver
          before /usr/lib; the internal libraries must be preferred if they
          are they are enabled and built

        * configure.in, src/helpcontent2/*, src/main_transform.xsl:
        * bin/piece/file-list-postprocess, bin/piece/install-bootstrap:
        * bin/piece/file-list-l10n, bin/piece/file-list-help: hack to install
          all the common files in the main OpenOffice.org package

        * bin/piece/file-list-artwork: remove execuable rights from icons

        * bin/piece/desktop-support-app: pack also the system icon directories
          on older distributions to pass the build check

        * bin/piece/build-generic, bin/applyflags, doc/split.txt: use
          applyflags also for the split build; also check the file
          ooo-build/apply-additional-sections for more extra selected sections;
          it is useful to do test builds with Experimental sections if they
          affect only one piece



Added:
   trunk/patches/dev300/piece-sw.diff
   trunk/patches/dev300/piece-vbahelper.diff
   trunk/patches/dev300/piece-writer2latex.diff
   trunk/src/helpcontent2/   (props changed)
   trunk/src/helpcontent2/Makefile.am
   trunk/src/helpcontent2/idxcaption.xsl
   trunk/src/helpcontent2/idxcontent.xsl
   trunk/src/helpcontent2/main_transform.xsl
Removed:
   trunk/src/main_transform.xsl
Modified:
   trunk/ChangeLog
   trunk/bin/applyflags
   trunk/bin/piece/build-generic
   trunk/bin/piece/desktop-support-app
   trunk/bin/piece/file-list-artwork
   trunk/bin/piece/file-list-help
   trunk/bin/piece/file-list-l10n
   trunk/bin/piece/file-list-postprocess
   trunk/bin/piece/install-bootstrap
   trunk/bin/piece/sys-setup.in
   trunk/configure.in
   trunk/doc/split.txt
   trunk/patches/dev300/apply
   trunk/patches/dev300/piece-extensions.diff
   trunk/patches/dev300/piece-helpcontent2.diff
   trunk/patches/dev300/piece-reportdesign.diff
   trunk/patches/dev300/piece-scp2.diff
   trunk/patches/dev300/wpgimporter.diff
   trunk/src/Makefile.am

Modified: trunk/bin/applyflags
==============================================================================
--- trunk/bin/applyflags	(original)
+++ trunk/bin/applyflags	Fri Mar  6 16:40:42 2009
@@ -4,6 +4,8 @@
 # highly dependent on a custom environment ...
 
 bindir=$1
+# optional to force another OOBUILDDIR in the split build
+builddir=$2
 
 if test "z$bindir" == "z"; then
     echo "Serious error - requires path to bindir";
@@ -13,6 +15,9 @@
 cd $bindir
 source ./setup >& /dev/null
 
+# do we use another builddir?
+test -n "$builddir" && OOBUILDDIR=$builddir
+
 echo -n "--distro=$DISTRO";
 if test -d $OOBUILDDIR/binfilter; then
     echo -n " --distro=Binfilter";

Modified: trunk/bin/piece/build-generic
==============================================================================
--- trunk/bin/piece/build-generic	(original)
+++ trunk/bin/piece/build-generic	Fri Mar  6 16:40:42 2009
@@ -20,12 +20,28 @@
 
 $OO_TOOLSDIR/install-artwork $OO_TOOLSDIR/../src `pwd`
 
-# drop --distro=Localize for now ...
-$OO_TOOLSDIR/../patches/apply.pl $OO_TOOLSDIR/../patches/dev300 --pieces \
-	--tag=$ooo_build_tag --hotfixes=`pwd`/ooo-build/hotfixes \
-	--distro=$DISTRO --distro=Piece --distro=Binfilter \
-	--distro=System --distro=Sdk --distro=Extensions \
-	 `pwd` || exit 1;
+# new modules
+test "$piece" = "libs_core" && mkdir -p vbahelper
+
+# apply flags
+builddir=`pwd`
+FLAGS=`$OO_TOOLSDIR/applyflags $OO_TOOLSDIR $builddir`
+# explicitely add --distro=Localize --distro=System
+# they can't be detected easily
+FLAGS="$FLAGS --distro=Localize --distro=System"
+# additional piece-specific sections added in the package sources (special build)
+additional_sections_file="$builddir/ooo-build/apply-additional-sections"
+if test -f "$additional_sections_file" ; then
+    for section in `sed "s|,| |g" $additional_sections_file` ; do
+	FLAGS="$FLAGS --distro=$section"
+    done
+fi
+# additional piece specifix hotfixes added in the package sources (special build)
+FLAGS="$FLAGS --hotfixes=$builddir/ooo-build/hotfixes"
+
+# finally call apply.pl
+$OO_TOOLSDIR/../patches/apply.pl $OO_TOOLSDIR/../patches/dev300 \
+    --tag=$ooo_build_tag $FLAGS $builddir || exit 1;
 
 # available source dirs
 omit_dirs="-e applied_patches -e ^solver -e ooo-build"

Modified: trunk/bin/piece/desktop-support-app
==============================================================================
--- trunk/bin/piece/desktop-support-app	(original)
+++ trunk/bin/piece/desktop-support-app	Fri Mar  6 16:40:42 2009
@@ -6,6 +6,12 @@
 
 source $OO_TOOLSDIR/piece/sys-setup
 
+# hack for older SUSE distributions (to pass build checks)
+list_icon_dirs=
+if test "$DISTRO" = "SUSE-10.1" ; then
+    list_icon_dirs=1
+fi
+
 create_wrapper()
 {
     mkdir -p $DESTDIR$OO_PREFIX/bin
@@ -50,6 +56,7 @@
 {
     icon_name=$1
     icon_dir=/usr/share/icons/hicolor
+    test -n "$list_icon_dirs" && echo "%dir $icon_dir" >>files-$piece.txt
 
     for size in 16x16 22x22 24x24 32x32 48x48 scalable ; do
 	# note that the scalable directory includes .svg icons
@@ -60,6 +67,8 @@
 	mkdir -p "$DESTDIR$target_dir"
 	cp $file "$DESTDIR$target_dir/$filename" || exit 1;
 	test -n "$DESTDIR" && echo "$target_dir/$filename" >>files-$piece.txt
+	test -n "$list_icon_dirs" && echo "%dir $icon_dir/$size" >>files-$piece.txt
+	test -n "$list_icon_dirs" && echo "%dir $icon_dir/$size/apps" >>files-$piece.txt
     done
 
     # create symlink below share/pixmaps to keep the backward compatibility

Modified: trunk/bin/piece/file-list-artwork
==============================================================================
--- trunk/bin/piece/file-list-artwork	(original)
+++ trunk/bin/piece/file-list-artwork	Fri Mar  6 16:40:42 2009
@@ -9,6 +9,8 @@
 
 # remove the CVS dirs
 find $DESTDIR$OO_SOLVERDIR -depth -type d -name CVS -exec rm -rf {} \;
+# remove ugly executable rights
+find $DESTDIR -type f -name "*.png" -exec chmod 644 {} \;
 
 # move the stuff to /usr/share when enabled
 test "$OOO_BUILD_NOARCH" = 'YES' && $OO_TOOLSDIR/piece/install-devel-helper $piece $ooo_build_tag

Modified: trunk/bin/piece/file-list-help
==============================================================================
--- trunk/bin/piece/file-list-help	(original)
+++ trunk/bin/piece/file-list-help	Fri Mar  6 16:40:42 2009
@@ -10,8 +10,18 @@
 
 # put the rest into the common file list
 $OO_TOOLSDIR/piece/merge-file-lists "files-$piece.txt" $DESTDIR/gid_*
-# main_transform.xsl will be in l10n-extras
-remove_file "files-$piece.txt" $OO_INSTDIR/basis$VERSION/help/main_transform.xsl
+# FIXME: remove files from the top dir; they are common for all localizations
+#        and must be included in the main package (postprocess)
+for file in main_transform.xsl idxcaption.xsl idxcontent.xsl ; do
+    if test `du --block-size=1 --apparent-size $DESTDIR$OO_INSTDIR/basis$VERSION/help/$file | cut -f1` -eq \
+            `du --block-size=1 --apparent-size $OO_TOOLSDIR/../src/helpcontent2/$file | cut -f1` ; then
+	remove_file "files-$piece.txt" $OO_INSTDIR/basis$VERSION/help/$file
+    else
+	echo "Error: The file \"$file\" has changed in the sources"
+	echo "       Please, update the prebuilt variant in $OO_TOOLSDIR/../src/helpcontent2"
+	exit 1;
+    fi
+done
 # FIXME: hid.lst will be in testtool package (built in ?)
 remove_file "files-$piece.txt" $OO_INSTDIR/basis$VERSION/program/hid.lst
 # non-wanted mess

Modified: trunk/bin/piece/file-list-l10n
==============================================================================
--- trunk/bin/piece/file-list-l10n	(original)
+++ trunk/bin/piece/file-list-l10n	Fri Mar  6 16:40:42 2009
@@ -7,11 +7,6 @@
 
 # generate the common file list
 $OO_TOOLSDIR/piece/merge-file-lists "files-$piece.txt" $DESTDIR/gid_*
-# install the common main_transform.xsl for the helpcontent
-mkdir -p $DESTDIR$OO_INSTDIR/basis$VERSION/help
-cp -a $OO_TOOLSDIR/../src/main_transform.xsl $DESTDIR$OO_INSTDIR/basis$VERSION/help
-echo "%dir $OO_INSTDIR/basis$VERSION/help" >>files-$piece.txt
-echo "$OO_INSTDIR/basis$VERSION/help/main_transform.xsl" >>files-$piece.txt
 
 if test "$VENDORNAME" = "Novell" ; then
     # We want to update an existing gallery. Unfortunately, gengal does not work

Modified: trunk/bin/piece/file-list-postprocess
==============================================================================
--- trunk/bin/piece/file-list-postprocess	(original)
+++ trunk/bin/piece/file-list-postprocess	Fri Mar  6 16:40:42 2009
@@ -13,6 +13,14 @@
 $OO_TOOLSDIR/piece/desktop-support-app "$piece" "$ooo_build_tag" "fromtemplate"
 $OO_TOOLSDIR/piece/desktop-support-app "$piece" "$ooo_build_tag" "ooffice"
 
+# install the common files for the helpcontent
+mkdir -p $DESTDIR$OO_INSTDIR/basis$VERSION/help
+echo "%dir $OO_INSTDIR/basis$VERSION/help" >>files-$piece.txt
+for file in main_transform.xsl idxcaption.xsl idxcontent.xsl ; do
+    cp -a $OO_TOOLSDIR/../src/helpcontent2/$file $DESTDIR$OO_INSTDIR/basis$VERSION/help/
+    echo "$OO_INSTDIR/basis$VERSION/help/$file" >>files-$piece.txt
+done
+
 # extra shared MIME info
 mkdir -p $DESTDIR/usr/share/mime/packages
 cp $OO_TOOLSDIR/../desktop/openoffice.xml $DESTDIR/usr/share/mime/packages

Modified: trunk/bin/piece/install-bootstrap
==============================================================================
--- trunk/bin/piece/install-bootstrap	(original)
+++ trunk/bin/piece/install-bootstrap	Fri Mar  6 16:40:42 2009
@@ -37,7 +37,7 @@
    $TOOLSDIR/src/*.patch \
    $TOOLSDIR/src/*.odb \
    $TOOLSDIR/src/sg3.* \
-   $TOOLSDIR/src/main_transform.xsl \
+   $TOOLSDIR/src/helpcontent2 \
    $TOOLSDIR/src/icons \
    $TOOLSDIR/src/layout \
    $OOINSTDIR/ooo-build/src

Modified: trunk/bin/piece/sys-setup.in
==============================================================================
--- trunk/bin/piece/sys-setup.in	(original)
+++ trunk/bin/piece/sys-setup.in	Fri Mar  6 16:40:42 2009
@@ -74,8 +74,10 @@
 SOLARLIB_SYSTEM="$SOLARLIB" # FIXME: this is necessary to build bean module; it adds the Java paths detected by config_office/configure
 SOLARLIB=" -L../lib -L$SOLARPIECE/$INPATH/lib -L$SOLARENV/$OUTPATH/lib -L$SOLARENV/$OUTPATH/lib"
 SOLARLIB="$SOLARLIB -L$URE_DIR/lib -L$INSTALL_DIR "
+# the system solver (from devel packages) must be searched after the normal installation directory because it includes static libraries that we do not want
+# it must be before other system libraries to prefer the internal versions of the libraries if they are enabled and built
+SOLARLIB="$SOLARLIB -L$SOLARVER/lib"
 SOLARLIB="$SOLARLIB -L$JAVA_HOME/lib -L$JAVA_HOME/jre/lib/i386 -L$JAVA_HOME/jre/lib/i386/client -L$JAVA_HOME/jre/lib/i386/native_threads -L/usr/lib -L/usr/lib/xulrunner-1.9"
-SOLARLIB="$SOLARLIB -L$SOLARVER/lib" # NB. at the end - it has static libraries in there we don't prefer.
 SOLARLIB="$SOLARLIB $SOLARLIB_SYSTEM"
 export SOLARLIB SOLARINC
 export SOLARIDLINC="-I$SOLARVERSION/$INPATH/idl$EXT_UPDMINOR -I$SOLARPIECE/$INPATH/idl$EXT_UPDMINOR"

Modified: trunk/configure.in
==============================================================================
--- trunk/configure.in	(original)
+++ trunk/configure.in	Fri Mar  6 16:40:42 2009
@@ -1482,6 +1482,7 @@
 po/sdf-templates/Makefile
 doc/Makefile
 src/Makefile
+src/helpcontent2/Makefile
 src/icons/Makefile
 src/icons/tango/Makefile
 src/layout/Makefile

Modified: trunk/doc/split.txt
==============================================================================
--- trunk/doc/split.txt	(original)
+++ trunk/doc/split.txt	Fri Mar  6 16:40:42 2009
@@ -76,6 +76,16 @@
 
 	  See also ooo-build/bin/ooo-sdf-split
 
+	+ the experimental sections can be enabled in bootstrap
+	  by the configure option --with-additional-sections
+	  More sections can be separated by comma ','.
+
+	  Aternatively, you might enable piece-specific experimental
+	  sections if you mention them in the file
+	  <build_tag>-<piece>/ooo-build/apply-additional-sections;
+	  More sections can be separated by comma ',' or by space " "
+	  or by new line.
+
 	+ it is possible to add/replace original diffs from
 	  the bootstrap package; just put diffs in the direcotry
 	  <build_tag>-<piece>/ooo-build/hotfixes
@@ -164,6 +174,11 @@
 	         these into the system sometimes multiple times, which
 		 bloats our -devel packages horribly & unnecessarily.
 
+	+ FIXME: the common helpcontent2 files (main_transform.xsl
+	  idxcaption.xsl idxcontent.xsl) should be passed to the main
+	  package via the help-devel package; it is currently done
+	  via ooo-build/src
+
 	+ we install all the artwork into the system:
 		+ yet really it would be far better to install just
 		the .zip archives, and work from them

Modified: trunk/patches/dev300/apply
==============================================================================
--- trunk/patches/dev300/apply	(original)
+++ trunk/patches/dev300/apply	Fri Mar  6 16:40:42 2009
@@ -2830,6 +2830,7 @@
 piece-helpcontent2.diff
 piece-sdext.diff
 piece-swext.diff
+piece-writer2latex.diff
 piece-writerfilter.diff
 piece-ridljar.diff
 piece-offapi.diff
@@ -2854,7 +2855,9 @@
 piece-apache-commons.diff
 #piece-reportbuilder.diff
 piece-reportdesign.diff
+piece-vbahelper.diff
 piece-sc.diff
+piece-sw.diff
 piece-xmerge.diff
 piece-packimages.diff
 piece-automation.diff

Modified: trunk/patches/dev300/piece-extensions.diff
==============================================================================
--- trunk/patches/dev300/piece-extensions.diff	(original)
+++ trunk/patches/dev300/piece-extensions.diff	Fri Mar  6 16:40:42 2009
@@ -1,3 +1,19 @@
+--- extensions/source/oooimprovement/makefile.mk.old	2009-02-21 00:00:23.000000000 +0100
++++ extensions/source/oooimprovement/makefile.mk	2009-03-02 12:35:34.000000000 +0100
+@@ -37,10 +37,10 @@ TARGET=oooimprovement
+ ENABLE_EXCEPTIONS=TRUE
+ 
+ PACKAGE=org.openoffice.Office
+-ABSXCSROOT=$(SOLARXMLDIR)
++ABSXCSROOT=$(SPLITINSTALLDIR)$/..$/share
+ XCSROOT=..
+-DTDDIR=$(ABSXCSROOT)
+-XSLDIR=$(ABSXCSROOT)$/processing
++DTDDIR=$(SOLARXMLDIR)
++XSLDIR=$(SOLARXMLDIR)$/processing
+ PROCESSOUT=$(MISC)$/$(TARGET)
+ PROCESSORDIR=$(SOLARBINDIR)
+ 
 --- extensions/source/update/check/makefile.mk
 +++ extensions/source/update/check/makefile.mk
 @@ -37,10 +37,10 @@

Modified: trunk/patches/dev300/piece-helpcontent2.diff
==============================================================================
--- trunk/patches/dev300/piece-helpcontent2.diff	(original)
+++ trunk/patches/dev300/piece-helpcontent2.diff	Fri Mar  6 16:40:42 2009
@@ -16,8 +16,8 @@
 @@ -1,10 +1,10 @@
  .INCLUDE : $(INCCOM)$/aux_langs.mk
  
--my_cp:=$(CLASSPATH)$(PATH_SEPERATOR)$(SOLARBINDIR)$/jaxp.jar$(PATH_SEPERATOR)$(SOLARBINDIR)$/juh.jar$(PATH_SEPERATOR)$(SOLARBINDIR)$/parser.jar$(PATH_SEPERATOR)$(SOLARBINDIR)$/xt.jar$(PATH_SEPERATOR)$(SPLITINSTALLDIR)$/classes$/unoil.jar$(PATH_SEPERATOR)$(SOLARBINDIR)$/ridl.jar$(PATH_SEPERATOR)$(SOLARBINDIR)$/jurt.jar$(PATH_SEPERATOR)$(SOLARBINDIR)$/xmlsearch.jar$(PATH_SEPERATOR)$(SOLARBINDIR)$/LuceneHelpWrapper.jar$
-+my_cp:=$(CLASSPATH)$(PATH_SEPERATOR)$(SOLARBINDIR)$/jaxp.jar$(PATH_SEPERATOR)$(SPLITINSTALLDIR)$/classes$/juh.jar$(PATH_SEPERATOR)$(SOLARBINDIR)$/parser.jar$(PATH_SEPERATOR)$(SOLARBINDIR)$/xt.jar$(PATH_SEPERATOR)$(SPLITINSTALLDIR)$/classes$/unoil.jar$(PATH_SEPERATOR)$(SPLITUREDIR)$/share$/java$/ridl.jar$(PATH_SEPERATOR)$(SPLITUREDIR)$/share$/java$/jurt.jar$(PATH_SEPERATOR)$(SOLARBINDIR)$/xmlsearch.jar$(PATH_SEPERATOR)$(SPLITINSTALLDIR)$/classes$/LuceneHelpWrapper.jar$
+-my_cp:=$(CLASSPATH)$(PATH_SEPERATOR)$(SOLARBINDIR)$/jaxp.jar$(PATH_SEPERATOR)$(SOLARBINDIR)$/juh.jar$(PATH_SEPERATOR)$(SOLARBINDIR)$/parser.jar$(PATH_SEPERATOR)$(SOLARBINDIR)$/xt.jar$(PATH_SEPERATOR)$(SOLARBINDIR)$/unoil.jar$(PATH_SEPERATOR)$(SOLARBINDIR)$/ridl.jar$(PATH_SEPERATOR)$(SOLARBINDIR)$/jurt.jar$(PATH_SEPERATOR)$(SOLARBINDIR)$/xmlsearch.jar$(PATH_SEPERATOR)$(SOLARBINDIR)$/LuceneHelpWrapper.jar$
++my_cp:=$(CLASSPATH)$(PATH_SEPERATOR)$(SOLARBINDIR)$/jaxp.jar$(PATH_SEPERATOR)$(SPLITUREDIR)$/share$/java$/juh.jar$(PATH_SEPERATOR)$(SOLARBINDIR)$/parser.jar$(PATH_SEPERATOR)$(SOLARBINDIR)$/xt.jar$(PATH_SEPERATOR)$(SPLITINSTALLDIR)$/classes$/unoil.jar$(PATH_SEPERATOR)$(SPLITUREDIR)$/share$/java$/ridl.jar$(PATH_SEPERATOR)$(SPLITUREDIR)$/share$/java$/jurt.jar$(PATH_SEPERATOR)$(SOLARBINDIR)$/xmlsearch.jar$(PATH_SEPERATOR)$(SPLITINSTALLDIR)$/classes$/LuceneHelpWrapper.jar$
  .IF "$(SYSTEM_LUCENE)" == "YES"
  my_cp!:=$(my_cp)$(PATH_SEPERATOR)$(LUCENE_CORE_JAR)$(PATH_SEPERATOR)$(LUCENE_ANALYZERS_JAR)
  .ELSE

Modified: trunk/patches/dev300/piece-reportdesign.diff
==============================================================================
--- trunk/patches/dev300/piece-reportdesign.diff	(original)
+++ trunk/patches/dev300/piece-reportdesign.diff	Fri Mar  6 16:40:42 2009
@@ -1,19 +1,119 @@
---- reportdesign/util/makefile.pmk	2008-08-11 14:49:42.000000000 +0100
-+++ reportdesign/util/makefile.pmk	2008-08-11 14:49:42.000000000 +0100
-@@ -29,13 +29,10 @@
- #
- #*************************************************************************
- 
--XSLDIR=$(SOLARXMLDIR)$/processing
--ABSXCSROOT=$(PWD)$/$(MISC)$/$(EXTNAME)
--# ABSXCSROOT=$(MISC)$/$(EXTNAME)
--XCSROOT=..
--# XCSROOT=$(SOLARXMLDIR)
--# ABSXCSROOT=$(SOLARXMLDIR)
+diff -purN reportdesign.old/registry/data/org/openoffice/makefile.mk reportdesign/registry/data/org/openoffice/makefile.mk
+--- reportdesign.old/registry/data/org/openoffice/makefile.mk	2009-02-20 23:58:23.000000000 +0100
++++ reportdesign/registry/data/org/openoffice/makefile.mk	2009-03-03 11:17:28.000000000 +0100
+@@ -49,6 +49,6 @@ XCUFILES= \
+ 
+ ALLTAR: "$(PWD)$/$(MISC)$/$(EXTNAME)$/registry$/schema$/$(PACKAGEDIR)$/Setup.xcs"
+ 
+-"$(PWD)$/$(MISC)$/$(EXTNAME)$/registry$/schema$/$(PACKAGEDIR)$/Setup.xcs": $(SOLARXMLDIR)$/registry$/schema$/$(PACKAGEDIR)$/Setup.xcs
++"$(PWD)$/$(MISC)$/$(EXTNAME)$/registry$/schema$/$(PACKAGEDIR)$/Setup.xcs": $(SPLITINSTALLDIR)$/..$/share$/registry$/schema$/$(PACKAGEDIR)$/Setup.xcs
+     @@-$(MKDIRHIER) $(@:d)
+     $(COPY) $< $@
+diff -purN reportdesign.old/registry/data/org/openoffice/Office/makefile.mk reportdesign/registry/data/org/openoffice/Office/makefile.mk
+--- reportdesign.old/registry/data/org/openoffice/Office/makefile.mk	2009-02-20 23:58:23.000000000 +0100
++++ reportdesign/registry/data/org/openoffice/Office/makefile.mk	2009-03-03 11:36:11.000000000 +0100
+@@ -54,18 +54,18 @@ XCUFILES= \
+ 
+ ALLTAR: "$(PWD)$/$(MISC)$/$(EXTNAME)$/registry$/schema$/$(PACKAGEDIR)$/Embedding.xcs" "$(PWD)$/$(MISC)$/$(EXTNAME)$/registry$/schema$/$(PACKAGEDIR)$/ExtendedColorScheme.xcs" "$(PWD)$/$(MISC)$/$(EXTNAME)$/registry$/schema$/$(PACKAGEDIR)$/Paths.xcs"
+ 
+-"$(PWD)$/$(MISC)$/$(EXTNAME)$/registry$/schema$/$(PACKAGEDIR)$/Embedding.xcs" : $(SOLARXMLDIR)$/registry$/schema$/$(PACKAGEDIR)$/Embedding.xcs
++"$(PWD)$/$(MISC)$/$(EXTNAME)$/registry$/schema$/$(PACKAGEDIR)$/Embedding.xcs" : $(SPLITINSTALLDIR)$/..$/share$/registry$/schema$/$(PACKAGEDIR)$/Embedding.xcs
+     @@-$(MKDIRHIER) $(@:d)
+     $(COPY) $< $@
+ 
+-"$(PWD)$/$(MISC)$/$(EXTNAME)$/registry$/schema$/$(PACKAGEDIR)$/ExtendedColorScheme.xcs" : $(SOLARXMLDIR)$/registry$/schema$/$(PACKAGEDIR)$/ExtendedColorScheme.xcs
++"$(PWD)$/$(MISC)$/$(EXTNAME)$/registry$/schema$/$(PACKAGEDIR)$/ExtendedColorScheme.xcs" : $(SPLITINSTALLDIR)$/..$/share$/registry$/schema$/$(PACKAGEDIR)$/ExtendedColorScheme.xcs
+     @@-$(MKDIRHIER) $(@:d)
+     $(COPY) $< $@
+ 
+-"$(PWD)$/$(MISC)$/$(EXTNAME)$/registry$/schema$/$(PACKAGEDIR)$/Paths.xcs" : $(SOLARXMLDIR)$/registry$/schema$/$(PACKAGEDIR)$/Paths.xcs
++"$(PWD)$/$(MISC)$/$(EXTNAME)$/registry$/schema$/$(PACKAGEDIR)$/Paths.xcs" : $(SPLITINSTALLDIR)$/..$/share$/registry$/schema$/$(PACKAGEDIR)$/Paths.xcs
+     @@-$(MKDIRHIER) $(@:d)
+     $(COPY) $< $@
+     
+-"$(PWD)$/$(MISC)$/$(EXTNAME)$/registry$/schema$/$(PACKAGEDIR)$/Accelerators.xcs": $(SOLARXMLDIR)$/registry$/schema$/$(PACKAGEDIR)$/Accelerators.xcs
++"$(PWD)$/$(MISC)$/$(EXTNAME)$/registry$/schema$/$(PACKAGEDIR)$/Accelerators.xcs": $(SPLITINSTALLDIR)$/..$/share$/registry$/schema$/$(PACKAGEDIR)$/Accelerators.xcs
+     @@-$(MKDIRHIER) $(@:d)
+     $(COPY) $< $@
+diff -purN reportdesign.old/registry/data/org/openoffice/Office/UI/makefile.mk reportdesign/registry/data/org/openoffice/Office/UI/makefile.mk
+--- reportdesign.old/registry/data/org/openoffice/Office/UI/makefile.mk	2009-02-20 23:58:23.000000000 +0100
++++ reportdesign/registry/data/org/openoffice/Office/UI/makefile.mk	2009-03-03 14:41:42.000000000 +0100
+@@ -49,4 +49,8 @@ MODULEFILES=
+ 
+ .INCLUDE : target.mk
+ 
+-   
+\ No newline at end of file
++ALLTAR: "$(PWD)$/$(MISC)$/$(EXTNAME)$/registry$/schema$/$(PACKAGEDIR)$/WindowState.xcs"
++
++"$(PWD)$/$(MISC)$/$(EXTNAME)$/registry$/schema$/$(PACKAGEDIR)$/WindowState.xcs" : $(SPLITINSTALLDIR)$/..$/share$/registry$/schema$/$(PACKAGEDIR)$/WindowState.xcs
++    @@-$(MKDIRHIER) $(@:d)
++    $(COPY) $< $@
+diff -purN reportdesign.old/registry/data/org/openoffice/TypeDetection/makefile.mk reportdesign/registry/data/org/openoffice/TypeDetection/makefile.mk
+--- reportdesign.old/registry/data/org/openoffice/TypeDetection/makefile.mk	2009-02-20 23:58:23.000000000 +0100
++++ reportdesign/registry/data/org/openoffice/TypeDetection/makefile.mk	2009-03-03 11:18:54.000000000 +0100
+@@ -50,10 +50,10 @@ XCUFILES= \
+ 
+ ALLTAR: "$(PWD)$/$(MISC)$/$(EXTNAME)$/registry$/schema$/$(PACKAGEDIR)$/Filter.xcs" "$(PWD)$/$(MISC)$/$(EXTNAME)$/registry$/schema$/$(PACKAGEDIR)$/Types.xcs"
+ 
+-"$(PWD)$/$(MISC)$/$(EXTNAME)$/registry$/schema$/$(PACKAGEDIR)$/Filter.xcs" : $(SOLARXMLDIR)$/registry$/schema$/$(PACKAGEDIR)$/Filter.xcs
++"$(PWD)$/$(MISC)$/$(EXTNAME)$/registry$/schema$/$(PACKAGEDIR)$/Filter.xcs" : $(SPLITINSTALLDIR)$/..$/share$/registry$/schema$/$(PACKAGEDIR)$/Filter.xcs
+     @@-$(MKDIRHIER) $(@:d)
+     $(COPY) $< $@
+ 
+-"$(PWD)$/$(MISC)$/$(EXTNAME)$/registry$/schema$/$(PACKAGEDIR)$/Types.xcs" : $(SOLARXMLDIR)$/registry$/schema$/$(PACKAGEDIR)$/Types.xcs
++"$(PWD)$/$(MISC)$/$(EXTNAME)$/registry$/schema$/$(PACKAGEDIR)$/Types.xcs" : $(SPLITINSTALLDIR)$/..$/share$/registry$/schema$/$(PACKAGEDIR)$/Types.xcs
+     @@-$(MKDIRHIER) $(@:d)
+     $(COPY) $< $@
+diff -purN reportdesign.old/registry/schema/org/openoffice/Office/makefile.mk reportdesign/registry/schema/org/openoffice/Office/makefile.mk
+--- reportdesign.old/registry/schema/org/openoffice/Office/makefile.mk	2009-02-20 23:58:23.000000000 +0100
++++ reportdesign/registry/schema/org/openoffice/Office/makefile.mk	2009-03-03 11:36:44.000000000 +0100
+@@ -45,6 +45,6 @@ XCSFILES= \
+ 
+ ALLTAR: "$(PWD)$/$(MISC)$/$(EXTNAME)$/registry$/schema$/$(PACKAGEDIR)$/DataAccess.xcs"
+ 
+-"$(PWD)$/$(MISC)$/$(EXTNAME)$/registry$/schema$/$(PACKAGEDIR)$/DataAccess.xcs" : $(SOLARXMLDIR)$/registry$/schema$/$(PACKAGEDIR)$/DataAccess.xcs
++"$(PWD)$/$(MISC)$/$(EXTNAME)$/registry$/schema$/$(PACKAGEDIR)$/DataAccess.xcs" : $(SPLITINSTALLDIR)$/..$/share$/registry$/schema$/$(PACKAGEDIR)$/DataAccess.xcs
+     @@-$(MKDIRHIER) $(@:d)
+     $(COPY) $< $@
+diff -purN reportdesign.old/registry/schema/org/openoffice/Office/UI/makefile.mk reportdesign/registry/schema/org/openoffice/Office/UI/makefile.mk
+--- reportdesign.old/registry/schema/org/openoffice/Office/UI/makefile.mk	2009-02-20 23:58:23.000000000 +0100
++++ reportdesign/registry/schema/org/openoffice/Office/UI/makefile.mk	2009-03-03 14:27:39.000000000 +0100
+@@ -42,21 +42,22 @@ XCSFILES= \
+     ReportCommands.xcs \
+ 	DbReportWindowState.xcs
+ 
++XSLTPROC+= --stringparam root $(SPLITINSTALLDIR)$/..$/share$/registry$/schema
++
+ MODULEFILES=
+ 
+ .INCLUDE : target.mk
+ 
+ ALLTAR: "$(PWD)$/$(MISC)$/$(EXTNAME)$/registry$/schema$/$(PACKAGEDIR)$/Commands.xcs" "$(PWD)$/$(MISC)$/$(EXTNAME)$/registry$/schema$/$(PACKAGEDIR)$/WindowState.xcs" "$(PWD)$/$(MISC)$/$(EXTNAME)$/registry$/schema$/$(PACKAGEDIR)$/Controller.xcs"
+ 
+-"$(PWD)$/$(MISC)$/$(EXTNAME)$/registry$/schema$/$(PACKAGEDIR)$/Commands.xcs": $(SOLARXMLDIR)$/registry$/schema$/$(PACKAGEDIR)$/Commands.xcs
++"$(PWD)$/$(MISC)$/$(EXTNAME)$/registry$/schema$/$(PACKAGEDIR)$/Commands.xcs": $(SPLITINSTALLDIR)$/..$/share$/registry$/schema$/$(PACKAGEDIR)$/Commands.xcs
+     @@-$(MKDIRHIER) $(@:d)
+     $(COPY) $< $@
+     
+-"$(PWD)$/$(MISC)$/$(EXTNAME)$/registry$/schema$/$(PACKAGEDIR)$/WindowState.xcs" : $(SOLARXMLDIR)$/registry$/schema$/$(PACKAGEDIR)$/WindowState.xcs
++"$(PWD)$/$(MISC)$/$(EXTNAME)$/registry$/schema$/$(PACKAGEDIR)$/WindowState.xcs" : $(SPLITINSTALLDIR)$/..$/share$/registry$/schema$/$(PACKAGEDIR)$/WindowState.xcs
+     @@-$(MKDIRHIER) $(@:d)
+     $(COPY) $< $@
+     
+-"$(PWD)$/$(MISC)$/$(EXTNAME)$/registry$/schema$/$(PACKAGEDIR)$/Controller.xcs" : $(SOLARXMLDIR)$/registry$/schema$/$(PACKAGEDIR)$/Controller.xcs
++"$(PWD)$/$(MISC)$/$(EXTNAME)$/registry$/schema$/$(PACKAGEDIR)$/Controller.xcs" : $(SPLITINSTALLDIR)$/..$/share$/registry$/schema$/$(PACKAGEDIR)$/Controller.xcs
+     @@-$(MKDIRHIER) $(@:d)
+     $(COPY) $< $@
+-
+diff -purN reportdesign.old/util/makefile.pmk reportdesign/util/makefile.pmk
+--- reportdesign.old/util/makefile.pmk	2009-02-20 23:58:23.000000000 +0100
++++ reportdesign/util/makefile.pmk	2009-03-03 14:42:42.000000000 +0100
+@@ -35,7 +35,7 @@ ABSXCSROOT=$(PWD)$/$(MISC)$/$(EXTNAME)
+ XCSROOT=..
+ # XCSROOT=$(SOLARXMLDIR)
+ # ABSXCSROOT=$(SOLARXMLDIR)
 -DTDDIR=$(SOLARXMLDIR)
-+XCSROOT=$(SPLITINSTALLDIR)$/../share
-+XSLDIR=$(SOLARVER)/xml$(EXT_UPDMINOR)$/processing
-+ABSXCSROOT=$(XCSROOT)
 +DTDDIR=$(SOLARVER)/xml$(EXT_UPDMINOR)
  PROCESSOUT=$(MISC)$/$(EXTNAME)
  PROCESSORDIR=$(SOLARBINDIR)

Modified: trunk/patches/dev300/piece-scp2.diff
==============================================================================
--- trunk/patches/dev300/piece-scp2.diff	(original)
+++ trunk/patches/dev300/piece-scp2.diff	Fri Mar  6 16:40:42 2009
@@ -10,7 +10,7 @@
 
 --- scp2/source/ooo/makefile.mk
 +++ scp2/source/ooo/makefile.mk
-@@ -41,6 +41,10 @@
+@@ -39,7 +39,11 @@ TARGETTYPE=CUI
  # --- Settings -----------------------------------------------------
  
  .INCLUDE :  settings.mk
@@ -22,7 +22,8 @@
 +ISOLANG_CPP=0
  
  .IF "$(COM)" == "MSC"
-@@ -164,7 +164,17 @@
+ SCPDEFS+=-D_MSC
+@@ -168,7 +172,17 @@ SCPDEFS+=-DSYSTEM_HUNSPELL
  .IF "$(SYSTEM_REDLAND)" == "YES"
  SCPDEFS+=-DSYSTEM_REDLAND
  .ELSE
@@ -41,8 +42,23 @@
  SCPDEFS+=\
      -DRAPTOR_MAJOR=$(RAPTOR_MAJOR) \
      -DRAPTOR_MINOR=$(RAPTOR_MINOR) \
-@@ -288,5 +288,5 @@
- $(ICUVERSION_DEPENDENT_FILES) : $(SOLARINCDIR)$/icuversion.mk
+@@ -209,7 +223,9 @@ SCPDEFS+=-DSYSTEM_LUCENE
+ .IF "$(SYSTEM_ICU)" == "YES"
+ SCPDEFS+=-DSYSTEM_ICU
+ .ELSE
+-.INCLUDE :  icuversion.mk
++ICU_MAJOR=4
++ICU_MINOR=0
++ICU_MICRO=0
+ SCPDEFS+=\
+     -DICU_MAJOR=$(ICU_MAJOR) \
+     -DICU_MINOR=$(ICU_MINOR) \
+@@ -312,8 +328,8 @@ ULFFILES=                          \
+ .INCLUDE :  target.mk
+ 
+ .IF "$(SYSTEM_ICU)" != "YES"
+-$(ICUVERSION_DEPENDENT_FILES) : $(SOLARINCDIR)$/icuversion.mk
++#$(ICUVERSION_DEPENDENT_FILES) : $(SOLARINCDIR)$/icuversion.mk
  .ENDIF
  
 -$(ISOLANGVERSION_DEPENDENT_FILES) : $(SOLARINCDIR)$/i18npool/version.mk

Added: trunk/patches/dev300/piece-sw.diff
==============================================================================
--- (empty file)
+++ trunk/patches/dev300/piece-sw.diff	Fri Mar  6 16:40:42 2009
@@ -0,0 +1,12 @@
+--- sw/source/ui/vba/makefile.mk.old	2009-03-02 18:24:23.000000000 +0100
++++ sw/source/ui/vba/makefile.mk	2009-03-02 18:43:15.000000000 +0100
+@@ -80,7 +80,7 @@ ALLTAR : \
+ 
+ $(SLOFILES) : $(MISC)$/$(TARGET).don
+ 
+-$(MISC)$/$(TARGET).don : $(SOLARBINDIR)$/oovbaapi.rdb
+-        +$(CPPUMAKER) -O$(INCCOM)$/$(TARGET) -BUCR $(SOLARBINDIR)$/oovbaapi.rdb -X$(SOLARBINDIR)$/types.rdb && echo > $@
++$(MISC)$/$(TARGET).don : $(SPLITINSTALLDIR)$/oovbaapi.rdb
++        +$(CPPUMAKER) -O$(INCCOM)$/$(TARGET) -BUCR $(SPLITINSTALLDIR)$/oovbaapi.rdb -X$(SOLARBINDIR)$/types.rdb && echo > $@
+         echo $@
+ 

Added: trunk/patches/dev300/piece-vbahelper.diff
==============================================================================
--- (empty file)
+++ trunk/patches/dev300/piece-vbahelper.diff	Fri Mar  6 16:40:42 2009
@@ -0,0 +1,26 @@
+--- vbahelper/source/msforms/makefile.mk.old	2009-03-02 17:28:50.000000000 +0100
++++ vbahelper/source/msforms/makefile.mk	2009-03-02 18:05:51.000000000 +0100
+@@ -72,7 +72,8 @@ ALLTAR : \
+ 
+ $(SLOFILES) : $(MISC)$/$(TARGET).don
+ 
+-$(MISC)$/$(TARGET).don : $(SOLARBINDIR)$/oovbaapi.rdb
+-        +$(CPPUMAKER) -O$(INCCOM)$/$(TARGET) -BUCR $(SOLARBINDIR)$/oovbaapi.rdb -X$(SOLARBINDIR)$/types.rdb && echo > $@
++OOVBADIR=$(SOLARPIECE)$/$(INPATH)$/bin
++$(MISC)$/$(TARGET).don : $(OOVBADIR)$/oovbaapi.rdb
++        +$(CPPUMAKER) -O$(INCCOM)$/$(TARGET) -BUCR $(OOVBADIR)$/oovbaapi.rdb -X$(SOLARBINDIR)$/types.rdb && echo > $@
+         echo $@
+ 
+--- vbahelper/source/vbahelper/makefile.mk.old	2009-03-02 17:28:50.000000000 +0100
++++ vbahelper/source/vbahelper/makefile.mk	2009-03-02 18:07:40.000000000 +0100
+@@ -60,7 +60,8 @@ ALLTAR : \
+ 
+ $(SLOFILES) : $(MISC)$/$(TARGET).don
+ 
+-$(MISC)$/$(TARGET).don : $(SOLARBINDIR)$/oovbaapi.rdb
+-        +$(CPPUMAKER) -O$(INCCOM)$/$(TARGET) -BUCR $(SOLARBINDIR)$/oovbaapi.rdb -X$(SOLARBINDIR)$/types.rdb && echo > $@
++OOVBADIR=$(SOLARPIECE)$/$(INPATH)$/bin
++$(MISC)$/$(TARGET).don : $(OOVBADIR)$/oovbaapi.rdb
++        +$(CPPUMAKER) -O$(INCCOM)$/$(TARGET) -BUCR $(OOVBADIR)$/oovbaapi.rdb -X$(SOLARBINDIR)$/types.rdb && echo > $@
+         echo $@
+ 

Added: trunk/patches/dev300/piece-writer2latex.diff
==============================================================================
--- (empty file)
+++ trunk/patches/dev300/piece-writer2latex.diff	Fri Mar  6 16:40:42 2009
@@ -0,0 +1,37 @@
+--- writer2latex/writer2latex05.patch.old	2009-02-21 00:00:21.000000000 +0100
++++ writer2latex/writer2latex05.patch	2009-03-02 20:17:11.000000000 +0100
+@@ -10,24 +10,28 @@
+      <description>writer2latex - build file</description>
+  
+      <target name="help" description="Displays usage information">
+-@@ -40,7 +37,7 @@
++@@ -40,8 +37,10 @@
+      <property name="target.lib" location="target/lib"/>
+      <!-- classpath for the application; needs java-uno classes -->
+      <path id="main.class.path"> 
+ -        <filelist dir="${OFFICE_HOME}/program/classes"
+-+        <filelist dir="${solar.jar}"
+-             files="jurt.jar,unoil.jar,ridl.jar,juh.jar"/>
++-            files="jurt.jar,unoil.jar,ridl.jar,juh.jar"/>
+++        <filelist dir="${split.ure}/share/java"
+++            files="jurt.jar,ridl.jar,juh.jar"/>
+++        <filelist dir="${split.install}/classes"
+++            files="unoil.jar"/>
+      </path> 
+  
+-@@ -85,7 +85,7 @@
+-                 <attribute name="Main-Class" value="writer2latex.Application"/>
++     <target name="all"
++@@ -115,7 +114,7 @@
++                 <attribute name="Built-By" value="${user.name}"/>
+                  <!-- OOo needs this to register the filter: -->
+                  <attribute name="RegistrationClassName" value="writer2latex.filter.W2LExportFilter" />
+ -                <attribute name="Class-Path" value="jaxp.jar parser.jar"/>
+ +                <attribute name="Class-Path" value="jaxp.jar jaxp_parser_impl.jar"/>
+              </manifest>
+          </jar>
+-     </target>
++ 
+ --- misc/build/writer2latex05/source/writer2latex/office/ImageLoader.java       2007-04-17 09:30:42.000000000 +0200
+ +++ misc/build/writer2latex05/source/writer2latex/office/ImageLoader.java        2007-11-20 21:18:32.000000000 +0100
+ @@ -107,8 +107,8 @@

Modified: trunk/patches/dev300/wpgimporter.diff
==============================================================================
--- trunk/patches/dev300/wpgimporter.diff	(original)
+++ trunk/patches/dev300/wpgimporter.diff	Fri Mar  6 16:40:42 2009
@@ -104,16 +104,16 @@
  # count = 6
 --- scp2/source/graphicfilter/file_graphicfilter.scp	20 Jun 2006 04:52:21 -0000	1.11
 +++ scp2/source/graphicfilter/file_graphicfilter.scp	7 May 2007 13:55:23 -0000
-@@ -67,3 +67,5 @@
+@@ -62,3 +62,5 @@ STD_UNO_LIB_FILE( gid_File_Lib_Flash, fl
  
- STD_UNO_LIB_FILE_PATCH( gid_File_Lib_Svg, svgfilter )
+ STD_UNO_LIB_FILE( gid_File_Lib_Svg, svgfilter )
  
 +STD_UNO_LIB_FILE_PATCH( gid_File_Lib_WPGImport, wpgimport )
 +
 --- scp2/source/graphicfilter/module_graphicfilter.scp	9 Sep 2005 01:28:30 -0000	1.4
 +++ scp2/source/graphicfilter/module_graphicfilter.scp	6 Jun 2007 07:53:53 -0000
-@@ -39,7 +39,7 @@
-     MOD_NAME_DESC ( MODULE_OPTIONAL_GRFFLT );
+@@ -36,7 +36,7 @@ Module gid_Module_Optional_Grfflt
+     Sortkey = "600";
      ParentID = gid_Module_Optional;
      Default = YES;
 -    Files = (gid_File_Lib_Svg, gid_File_Lib_Flash,

Modified: trunk/src/Makefile.am
==============================================================================
--- trunk/src/Makefile.am	(original)
+++ trunk/src/Makefile.am	Fri Mar  6 16:40:42 2009
@@ -1,4 +1,4 @@
-SUBDIRS=layout sdf icons
+SUBDIRS=helpcontent2 icons layout sdf
 
 EXTRA_DIST=\
 	${wildcard setup_native_packinfo*.tar.bz2} \

Added: trunk/src/helpcontent2/Makefile.am
==============================================================================
--- (empty file)
+++ trunk/src/helpcontent2/Makefile.am	Fri Mar  6 16:40:42 2009
@@ -0,0 +1 @@
+EXTRA_DIST = $(wildcard *.xsl)

Added: trunk/src/helpcontent2/idxcaption.xsl
==============================================================================
--- (empty file)
+++ trunk/src/helpcontent2/idxcaption.xsl	Fri Mar  6 16:40:42 2009
@@ -0,0 +1,34 @@
+<xsl:stylesheet version="1.0" encoding="UTF-8"
+	xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
+	xmlns:office="http://openoffice.org/2000/office";
+	xmlns:style="http://openoffice.org/2000/style";
+	xmlns:table="http://openoffice.org/2000/table";
+	xmlns:draw="http://openoffice.org/2000/drawing";
+	xmlns:fo="http://www.w3.org/1999/XSL/Format";
+	xmlns:xlink="http://www.w3.org/1999/xlink";
+	xmlns:dc="http://purl.org/dc/elements/1.1/";
+	xmlns:meta="http://openoffice.org/2000/meta";
+	xmlns:number="http://openoffice.org/2000/datastyle";
+	xmlns:svg="http://www.w3.org/2000/svg";
+	xmlns:chart="http://openoffice.org/2000/chart";
+	xmlns:help="http://openoffice.org/2000/help";
+	xmlns:index="http://sun.com/2000/XMLSearch";	
+	xmlns:text="http://openoffice.org/2000/text";>
+
+<xsl:param name="Language" select="'en-US'"/>
+<xsl:output method="text" encoding="UTF-8"/>
+
+<xsl:template match="/">
+	<xsl:apply-templates select="//title" mode="include"/>
+	<xsl:apply-templates select="//paragraph[ role='heading']" mode="include"/>
+</xsl:template>
+
+<xsl:template match="*" mode="include">
+	<xsl:value-of select="."/>
+	<xsl:text>&#xA;</xsl:text>
+</xsl:template>
+
+<xsl:template match="*"/>
+
+</xsl:stylesheet>
+

Added: trunk/src/helpcontent2/idxcontent.xsl
==============================================================================
--- (empty file)
+++ trunk/src/helpcontent2/idxcontent.xsl	Fri Mar  6 16:40:42 2009
@@ -0,0 +1,104 @@
+<xsl:stylesheet version="1.0" encoding="UTF-8"
+	xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
+	xmlns:office="http://openoffice.org/2000/office";
+	xmlns:style="http://openoffice.org/2000/style";
+	xmlns:table="http://openoffice.org/2000/table";
+	xmlns:draw="http://openoffice.org/2000/drawing";
+	xmlns:fo="http://www.w3.org/1999/XSL/Format";
+	xmlns:xlink="http://www.w3.org/1999/xlink";
+	xmlns:dc="http://purl.org/dc/elements/1.1/";
+	xmlns:meta="http://openoffice.org/2000/meta";
+	xmlns:number="http://openoffice.org/2000/datastyle";
+	xmlns:svg="http://www.w3.org/2000/svg";
+	xmlns:chart="http://openoffice.org/2000/chart";
+	xmlns:help="http://openoffice.org/2000/help";
+	xmlns:index="http://sun.com/2000/XMLSearch";	
+	xmlns:text="http://openoffice.org/2000/text";>
+
+<xsl:param name="Language" select="'en-US'"/>
+<xsl:output method="text" encoding="UTF-8"/>
+
+<xsl:template match="helpdocument|body">
+  <xsl:choose>
+    <xsl:when test="meta/topic[ indexer='exclude']"/>
+    <xsl:otherwise>
+      <xsl:apply-templates/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="title">
+  <xsl:value-of select="."/>
+  <xsl:text>&#xA;</xsl:text>
+</xsl:template>
+
+<xsl:template match="table">
+  <xsl:apply-templates/>
+  <xsl:text>&#xA;</xsl:text>
+</xsl:template>
+
+<xsl:template match="tablecell">
+  <xsl:apply-templates/>
+  <xsl:text>&#xA;</xsl:text>
+</xsl:template>
+
+<xsl:template match="tablerow">
+  <xsl:apply-templates/>
+  <xsl:text>&#xA;</xsl:text>
+</xsl:template>
+
+<xsl:template match="list">
+  <xsl:apply-templates/>
+  <xsl:text>&#xA;</xsl:text>
+</xsl:template>
+
+<xsl:template match="listitem">
+  <xsl:apply-templates/>
+  <xsl:text>&#xA;</xsl:text>
+</xsl:template>
+
+<xsl:template match="item">
+  <xsl:apply-templates/>
+  <xsl:text>&#xA;</xsl:text>
+</xsl:template>
+
+<xsl:template match="emph">
+  <xsl:apply-templates/>
+  <xsl:text>&#xA;</xsl:text>
+</xsl:template>
+
+<xsl:template match="paragraph">
+  <xsl:value-of select="."/>
+  <xsl:text>&#xA;</xsl:text>
+</xsl:template>
+
+<xsl:template match="section">
+  <xsl:apply-templates/>
+  <xsl:text>&#xA;</xsl:text>
+</xsl:template>
+
+<xsl:template match="bookmark">
+  <xsl:apply-templates/>
+  <xsl:text>&#xA;</xsl:text>
+</xsl:template>
+
+<xsl:template match="bookmark_value">
+  <xsl:apply-templates/>
+  <xsl:text>&#xA;</xsl:text>
+</xsl:template>
+
+<xsl:template match="link">
+  <xsl:apply-templates/>
+  <xsl:text>&#xA;</xsl:text>
+</xsl:template>
+
+<xsl:template match="ahelp[ visibility='visible']">
+  <xsl:value-of select="."/>
+  <xsl:text>&#xA;</xsl:text>
+</xsl:template>
+
+<xsl:template match="*"/>
+
+</xsl:stylesheet>
+
+

Added: trunk/src/helpcontent2/main_transform.xsl
==============================================================================
--- (empty file)
+++ trunk/src/helpcontent2/main_transform.xsl	Fri Mar  6 16:40:42 2009
@@ -0,0 +1,975 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+
+<!--***********************************************************************
+  This is the main transformation style sheet for transforming.
+  Only use with OOo 2.0
+  Owner: fpe openoffice org
+  =========================================================================
+  Changes Log
+    May 24 2004 Created
+    Aug 24 2004 Fixed for help2 CWS
+    Aug 27 2004 Added css link, fixed missing embed-mode for variable
+                Removed width/height for images
+    Sep 03 2004 Modularized xsl, added some embedded modes
+    Oct 08 2004 Fixed bug wrong mode "embedded" for links
+                Added embedded modes for embed and embedvar (for cascaded embeds)
+                Added <p> tags around falsely embedded pars and vars
+    Dec 08 2004 #i38483#, fixed wrong handling of web links
+                #i37377#, fixed missing usage of Database parameter for switching
+    Jan 04 2005 #i38905#, fixed buggy branding replacement template
+    Mar 17 2005 #i43972#, added language info to image URL, evaluate Language parameter
+                evaluate new localize attribute in images
+    May 10 2005 #i48785#, fixed wrong setting of distrib variable
+    Aug 16 2005 workaround for #i53365#
+    Aug 19 2005 fixed missing list processing in embedded sections
+    Aug 19 2005 #i53535#, fixed wrong handling of Database parameter
+		Oct 17 2006 #i70462#, disabled sorting to avoid output of error messages to console
+***********************************************************************//-->
+
+<!--
+
+  DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+  
+  Copyright 2008 by Sun Microsystems, Inc.
+ 
+  OpenOffice.org - a multi-platform office productivity suite
+ 
+  $RCSfile: main_transform.xsl,v $
+ 
+  $Revision: 1.18 $
+ 
+  This file is part of OpenOffice.org.
+ 
+  OpenOffice.org is free software: you can redistribute it and/or modify
+  it under the terms of the GNU Lesser General Public License version 3
+  only, as published by the Free Software Foundation.
+ 
+  OpenOffice.org 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 version 3 for more details
+  (a copy is included in the LICENSE file that accompanied this code).
+ 
+  You should have received a copy of the GNU Lesser General Public License
+  version 3 along with OpenOffice.org.  If not, see
+  <http://www.openoffice.org/license.html>
+  for a copy of the LGPLv3 License.
+ 
+-->
+
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
+
+<xsl:output indent="yes" method="html"/>
+
+<!--
+############################
+# Variables and Parameters #
+############################
+//-->
+
+<!-- General Usage -->
+<xsl:variable name="am" select="'&amp;'"/>
+<xsl:variable name="sl" select="'/'"/>
+<xsl:variable name="qt" select="'&quot;'"/>
+
+<!-- generic Icon alt text -->
+<xsl:variable name="alttext" select="'text/shared/00/icon_alt.xhp'"/>
+
+<!-- For calculating pixel sizes -->
+<xsl:variable name="dpi" select="'96'"/>
+<xsl:variable name="dpcm" select="'38'"/>
+
+<!-- Product brand variables used in the help files -->
+<xsl:variable name="brand1" select="'$[officename]'"/>
+<xsl:variable name="brand2" select="'$[officeversion]'"/>
+<xsl:variable name="brand3" select="'%PRODUCTNAME'"/>
+<xsl:variable name="brand4" select="'%PRODUCTVERSION'"/>
+
+<!-- meta data variables from the help file -->
+<xsl:variable name="filename" select="/helpdocument/meta/topic/filename"/>
+<xsl:variable name="topic_id" select="/helpdocument/meta/topic/@id"/>
+<xsl:variable name="topic_status" select="/helpdocument/meta/topic/@status"/>
+<xsl:variable name="title" select="/helpdocument/meta/topic/title"/>
+<xsl:variable name="doclang" select="/helpdocument/meta/topic/title/@xml-lang"/>
+
+<!-- Module and the corresponding switching values-->
+<xsl:param name="Database" select="'swriter'"/>
+<xsl:variable name="module" select="$Database"/>
+<xsl:variable name="appl">
+	<xsl:choose>
+		<xsl:when test="$module = 'swriter'"><xsl:value-of select="'WRITER'"/></xsl:when>
+		<xsl:when test="$module = 'scalc'"><xsl:value-of select="'CALC'"/></xsl:when>
+		<xsl:when test="$module = 'sdraw'"><xsl:value-of select="'DRAW'"/></xsl:when>
+		<xsl:when test="$module = 'simpress'"><xsl:value-of select="'IMPRESS'"/></xsl:when>
+		<xsl:when test="$module = 'schart'"><xsl:value-of select="'CHART'"/></xsl:when>
+		<xsl:when test="$module = 'sbasic'"><xsl:value-of select="'BASIC'"/></xsl:when>
+		<xsl:when test="$module = 'smath'"><xsl:value-of select="'MATH'"/></xsl:when>
+	</xsl:choose>
+</xsl:variable>
+
+  <!-- the other parameters given by the help caller -->
+<xsl:param name="System" select="'WIN'"/>
+<xsl:param name="productname" select="'Office'"/>
+<xsl:param name="productversion" select="''"/>
+<xsl:variable name="pversion">
+	<xsl:value-of select="translate($productversion,' ','')"/>
+</xsl:variable>
+<!-- this is were the images are -->
+<xsl:param name="imgrepos" select="''"/>
+<xsl:param name="Id" />
+<!-- (lame) distinction between OS and Commercial -->
+<xsl:param name="distrib">
+	<xsl:choose>
+		<xsl:when test="starts-with($productname,'OpenOffice')">
+			<xsl:value-of select="'OpenSource'"/>
+		</xsl:when>
+		<xsl:otherwise>
+			<xsl:value-of select="'COMMERCIAL'"/>
+		</xsl:otherwise>
+	</xsl:choose>
+</xsl:param>
+<xsl:param name="Language" select="'en-US'"/>
+<xsl:variable name="lang" select="$Language"/>
+
+<xsl:param name="ExtensionId" select="''"/>
+<xsl:param name="ExtensionPath" select="''"/>
+
+
+  <!-- parts of help and image urls -->
+<xsl:variable name="help_url_prefix" select="'vnd.sun.star.help://'"/>
+<xsl:variable name="img_url_prefix" select="concat('vnd.sun.star.pkg://',$imgrepos,'/')"/>
+<xsl:variable name="urlpost" select="concat('?Language=',$lang,$am,'System=',$System,$am,'UseDB=no')"/>
+<xsl:variable name="urlpre" select="$help_url_prefix" /> 
+<xsl:variable name="linkprefix" select="$urlpre"/>
+<xsl:variable name="linkpostfix" select="$urlpost"/>
+
+<xsl:variable name="css" select="'default.css'"/>
+
+<!-- images for notes, tips and warnings -->
+<xsl:variable name="note_img" select="concat($img_url_prefix,'res/helpimg/note.png')"/>
+<xsl:variable name="tip_img" select="concat($img_url_prefix,'res/helpimg/tip.png')"/>
+<xsl:variable name="warning_img" select="concat($img_url_prefix,'res/helpimg/warning.png')"/>
+
+<!--
+#############
+# Templates #
+#############
+//-->
+
+<!-- Create the document skeleton -->
+<xsl:template match="/">
+	<xsl:variable name="csslink" select="concat($urlpre,'/',$urlpost)"/>
+	<html>
+		<head>
+			<title><xsl:value-of select="$title"/></title>
+			<link href="{$csslink}" rel="Stylesheet" type="text/css" /> <!-- stylesheet link -->
+  		<meta http-equiv="Content-type" content="text/html; charset=utf-8"/>
+		</head>
+		<body lang="{$lang}">
+			<xsl:apply-templates select="/helpdocument/body"/>
+		</body>
+	</html>
+</xsl:template>
+
+<!-- AHELP -->
+<xsl:template match="ahelp">
+	<xsl:if test="not(@visibility='hidden')"><span class="avis"><xsl:apply-templates /></span></xsl:if>
+</xsl:template>
+
+<!-- ALT -->
+<xsl:template match="alt"/>
+
+<!-- BOOKMARK -->
+<xsl:template match="bookmark">
+	<a name="{ id}"></a>
+	<xsl:choose>
+		<xsl:when test="starts-with(@branch,'hid')" />
+		<xsl:otherwise><xsl:apply-templates /></xsl:otherwise>
+	</xsl:choose>
+</xsl:template>
+<xsl:template match="bookmark" mode="embedded" />
+
+<!-- BOOKMARK_VALUE -->
+<xsl:template match="bookmark_value" />
+
+<!-- BR -->
+<xsl:template match="br"><br /></xsl:template>
+
+<!-- CAPTION -->
+<xsl:template match="caption" />
+
+<!-- CASE -->
+<xsl:template match="case"><xsl:call-template name="insertcase" /></xsl:template>
+<xsl:template match="case" mode="embedded">
+	<xsl:call-template name="insertcase">
+		<xsl:with-param name="embedded" select="'yes'"/>
+	</xsl:call-template>
+</xsl:template>
+
+<!-- CASEINLINE -->
+<xsl:template match="caseinline"><xsl:call-template name="insertcase" /></xsl:template>
+<xsl:template match="caseinline" mode="embedded">
+	<xsl:call-template name="insertcase">
+		<xsl:with-param name="embedded" select="'yes'"/>
+	</xsl:call-template>
+</xsl:template>
+
+<!-- COMMENT -->
+<xsl:template match="comment" />
+<xsl:template match="comment" mode="embedded"/>
+
+<!-- CREATED -->
+<xsl:template match="created" />
+
+<!-- DEFAULT -->
+<xsl:template match="default"><xsl:call-template name="insertdefault" /></xsl:template>
+<xsl:template match="default" mode="embedded">
+	<xsl:call-template name="insertdefault">
+		<xsl:with-param name="embedded" select="'yes'"/>
+	</xsl:call-template>
+</xsl:template>
+
+<!-- DEFAULTINLINE -->
+<xsl:template match="defaultinline"><xsl:call-template name="insertdefault" /></xsl:template>
+<xsl:template match="defaultinline" mode="embedded">
+	<xsl:call-template name="insertdefault">
+		<xsl:with-param name="embedded" select="'yes'"/>
+	</xsl:call-template>
+</xsl:template>
+
+<!-- EMBED -->
+<xsl:template match="embed"><xsl:call-template name="resolveembed"/></xsl:template>
+<xsl:template match="embed" mode="embedded"><xsl:call-template name="resolveembed"/></xsl:template>
+
+<!-- EMBEDVAR -->
+<xsl:template match="embedvar"><xsl:call-template name="resolveembedvar"/></xsl:template>
+<xsl:template match="embedvar" mode="embedded"><xsl:call-template name="resolveembedvar"/></xsl:template>
+
+<!-- EMPH -->
+<xsl:template match="emph">
+	<span class="emph"><xsl:apply-templates /></span>
+</xsl:template>
+<xsl:template match="emph" mode="embedded">
+	<span class="emph"><xsl:apply-templates /></span>
+</xsl:template>
+
+<!-- FILENAME -->
+<xsl:template match="filename" />
+
+<!-- HISTORY -->
+<xsl:template match="history" />
+
+<!-- IMAGE -->
+<xsl:template match="image"><xsl:call-template name="insertimage"/></xsl:template>
+<xsl:template match="image" mode="embedded"><xsl:call-template name="insertimage"/></xsl:template>
+
+<!-- ITEM -->
+<xsl:template match="item"><span class="{ type}"><xsl:apply-templates /></span></xsl:template>
+<xsl:template match="item" mode="embedded"><span class="{ type}"><xsl:apply-templates /></span></xsl:template>
+
+<!-- LASTEDITED -->
+<xsl:template match="lastedited" />
+
+<!-- LINK -->
+<xsl:template match="link">
+	<xsl:choose> <!-- don't insert the heading link to itself -->
+		<xsl:when test="(concat('/',@href) = /helpdocument/meta/topic/filename) or (@href = /helpdocument/meta/topic/filename)">
+			<xsl:apply-templates />
+		</xsl:when>
+		<xsl:when test="contains(child::embedvar/@href,'/00/00000004.xhp#wie')"> <!-- special treatment of howtoget links -->
+			<xsl:call-template name="insert_howtoget">
+				<xsl:with-param name="linkhref" select="@href"/>
+			</xsl:call-template>
+		</xsl:when>
+		<xsl:otherwise>
+			<xsl:call-template name="createlink" /> 
+		</xsl:otherwise>
+	</xsl:choose>
+</xsl:template>
+<xsl:template match="link" mode="embedded">
+	<xsl:call-template name="createlink"/>
+</xsl:template>
+
+<!-- LIST -->
+<xsl:template match="list">
+	<xsl:choose>
+		<xsl:when test="@type='ordered'">
+			<ol>
+				<xsl:if test="@startwith">
+					<xsl:attribute name="start"><xsl:value-of select="@startwith"/></xsl:attribute>
+				</xsl:if>
+				<xsl:apply-templates />
+			</ol>
+		</xsl:when>
+		<xsl:otherwise>
+			<ul><xsl:apply-templates /></ul>
+		</xsl:otherwise>
+	</xsl:choose>
+</xsl:template>
+
+<xsl:template match="list" mode="embedded">
+	<xsl:choose>
+		<xsl:when test="@type='ordered'">
+			<ol>
+				<xsl:if test="@startwith">
+					<xsl:attribute name="start"><xsl:value-of select="@startwith"/></xsl:attribute>
+				</xsl:if>
+				<xsl:apply-templates mode="embedded"/>
+			</ol>
+		</xsl:when>
+		<xsl:otherwise>
+			<ul><xsl:apply-templates mode="embedded"/></ul>
+		</xsl:otherwise>
+	</xsl:choose>
+</xsl:template>
+
+<!-- LISTITEM -->
+<xsl:template match="listitem">
+	<li><xsl:apply-templates /></li>
+</xsl:template>
+
+<xsl:template match="listitem" mode="embedded">
+	<li><xsl:apply-templates mode="embedded"/></li>
+</xsl:template>
+
+<!-- META, SEE HEADER -->
+<xsl:template match="meta" />
+
+<!-- OBJECT (UNUSED) -->
+<xsl:template match="object" />
+
+<!-- PARAGRAPH -->
+<xsl:template match="paragraph">
+	<xsl:choose>
+		
+		<xsl:when test="@role='heading'">
+			<xsl:call-template name="insertheading">
+				<xsl:with-param name="level" select="@level"/>
+			</xsl:call-template>
+		</xsl:when>
+		
+		<xsl:when test="contains(' note warning tip ',@role)">
+			<xsl:call-template name="insertnote">
+				<xsl:with-param name="type" select="@role" />
+			</xsl:call-template>
+		</xsl:when>
+		
+		<xsl:when test="contains(descendant::embedvar/@href,'/00/00000004.xhp#wie')"> <!-- special treatment of howtoget links -->
+			<xsl:apply-templates />
+		</xsl:when>		
+		
+		<xsl:otherwise>
+			<xsl:call-template name="insertpara" />
+		</xsl:otherwise>
+	
+	</xsl:choose>
+</xsl:template>
+
+<xsl:template match="paragraph" mode="embedded">
+		<xsl:choose>
+		
+		<xsl:when test="@role='heading'">	<!-- increase the level of headings that are embedded -->
+		<!-- 
+		   The internal sablotron processor does not seem to support the number function.
+			 Therefore, we need a workaround for
+			 <xsl:variable name="level"><xsl:value-of select="number(@level)+1"/></xsl:variable>
+		-->
+			<xsl:variable name="newlevel">
+				<xsl:choose>
+					<xsl:when test="@level='1'"><xsl:value-of select="'2'"/></xsl:when>
+					<xsl:when test="@level='2'"><xsl:value-of select="'2'"/></xsl:when>
+					<xsl:when test="@level='3'"><xsl:value-of select="'3'"/></xsl:when>
+					<xsl:when test="@level='4'"><xsl:value-of select="'4'"/></xsl:when>
+					<xsl:when test="@level='5'"><xsl:value-of select="'5'"/></xsl:when>
+				</xsl:choose>
+			</xsl:variable>
+			
+			<xsl:call-template name="insertheading">
+				<xsl:with-param name="level" select="$newlevel"/>
+				<xsl:with-param name="embedded" select="'yes'"/>
+			</xsl:call-template>
+		</xsl:when>
+		
+		<xsl:when test="contains(' note warning tip ',@role)">
+			<xsl:call-template name="insertnote">
+				<xsl:with-param name="type" select="@role" />
+			</xsl:call-template>
+		</xsl:when>
+		
+		<xsl:when test="contains(descendant::embedvar/@href,'/00/00000004.xhp#wie')"> <!-- special treatment of howtoget links -->
+			<xsl:apply-templates />
+		</xsl:when>		
+		
+		<xsl:otherwise>
+			<xsl:call-template name="insertpara" />
+		</xsl:otherwise>
+		
+	</xsl:choose>
+</xsl:template>
+
+
+<!-- SECTION -->
+<xsl:template match="section">
+	<a name="{ id}"></a>
+
+		<xsl:choose>
+			
+			<xsl:when test="@id='relatedtopics'">
+				<div class="relatedtopics">
+					<xsl:variable name="href"><xsl:value-of select="concat($urlpre,'shared/text/shared/00/00000004.xhp',$urlpost)"/></xsl:variable>
+					<xsl:variable name="anchor"><xsl:value-of select="'related'"/></xsl:variable>
+					<xsl:variable name="doc" select="document($href)"/>
+					<p class="related">
+						<xsl:apply-templates select="$doc//variable[ id=$anchor]"/>
+					</p>
+					<div class="relatedbody">
+						<xsl:apply-templates />
+					</div>
+				</div>
+			</xsl:when>
+			
+			<xsl:when test="@id='howtoget'">
+				<xsl:call-template name="insert_howtoget" />
+			</xsl:when>
+			
+			<xsl:otherwise>
+						<xsl:apply-templates/>
+			</xsl:otherwise>
+		
+		</xsl:choose>
+
+</xsl:template>
+
+
+<!-- SECTION -->
+<xsl:template match="section" mode="embedded">
+	<a name="{ id}"></a>
+	<xsl:apply-templates mode="embedded"/>
+</xsl:template>
+
+<!-- SORT -->
+<xsl:template match="sort" >
+  <!-- sorting disabled due to #i70462#
+	<xsl:apply-templates><xsl:sort select="descendant::paragraph"/></xsl:apply-templates>
+	//-->
+	<xsl:apply-templates />
+</xsl:template>
+<xsl:template match="sort" mode="embedded">
+<!-- sorting disabled due to #i70462#
+	<xsl:apply-templates><xsl:sort select="descendant::paragraph"/></xsl:apply-templates>
+	//-->
+	<xsl:apply-templates />
+</xsl:template>
+
+<!-- SWITCH -->
+<xsl:template match="switch"><xsl:apply-templates /></xsl:template>
+<xsl:template match="switch" mode="embedded"><xsl:apply-templates /></xsl:template>
+
+<!-- SWITCHINLINE -->
+<xsl:template match="switchinline"><xsl:apply-templates /></xsl:template>
+<xsl:template match="switchinline" mode="embedded"><xsl:apply-templates mode="embedded"/></xsl:template>
+
+<!-- TABLE -->
+<xsl:template match="table"><xsl:call-template name="inserttable"/></xsl:template>
+<xsl:template match="table" mode="embedded"><xsl:call-template name="inserttable"/></xsl:template>
+
+<!-- TABLECELL -->
+<xsl:template match="tablecell"><td valign="top"><xsl:apply-templates /></td></xsl:template>
+<xsl:template match="tablecell" mode="icontable"><td valign="top"><xsl:apply-templates/></td></xsl:template>
+<xsl:template match="tablecell" mode="embedded"><td valign="top"><xsl:apply-templates mode="embedded"/></td></xsl:template>
+
+<!-- TABLEROW -->
+<xsl:template match="tablerow"><tr><xsl:apply-templates /></tr></xsl:template>
+<xsl:template match="tablerow" mode="icontable"><tr><xsl:apply-templates mode="icontable"/></tr></xsl:template>
+<xsl:template match="tablerow" mode="embedded"><tr><xsl:apply-templates mode="embedded"/></tr></xsl:template>
+
+<!-- TITLE -->
+<xsl:template match="title"/>
+
+<!-- TOPIC -->
+<xsl:template match="topic"/>
+
+<!-- VARIABLE -->
+<xsl:template match="variable"><a name="{ id}"></a><xsl:apply-templates /></xsl:template>
+<xsl:template match="variable" mode="embedded"><a name="{ id}"></a><xsl:apply-templates mode="embedded"/></xsl:template>
+
+<xsl:template match="text()">
+	<xsl:call-template name="brand">
+		<xsl:with-param name="string"><xsl:value-of select="."/></xsl:with-param>
+	</xsl:call-template>
+</xsl:template>
+
+<xsl:template match="text()" mode="embedded">
+	<xsl:call-template name="brand">
+		<xsl:with-param name="string"><xsl:value-of select="."/></xsl:with-param>
+	</xsl:call-template>
+</xsl:template>
+
+<!-- In case of missing help files -->
+<xsl:template match="help-id-missing"><xsl:value-of select="$Id"/></xsl:template>
+
+<!-- 
+###################
+# NAMED TEMPLATES #
+###################
+//-->
+
+<!-- Branding -->
+<xsl:template name="brand" >
+	<xsl:param name="string"/>
+	
+    <xsl:choose>
+		
+        <xsl:when test="contains($string,$brand1)">
+           <xsl:variable name="newstr">
+                <xsl:value-of select="substring-before($string,$brand1)"/>
+                <xsl:value-of select="$productname"/>
+                <xsl:value-of select="substring-after($string,$brand1)"/>
+           </xsl:variable>
+			<xsl:call-template name="brand">
+				<xsl:with-param name="string" select="$newstr"/>
+			</xsl:call-template>
+		</xsl:when>
+        
+		<xsl:when test="contains($string,$brand2)">
+		    <xsl:variable name="newstr">
+                <xsl:value-of select="substring-before($string,$brand2)"/>
+                <xsl:value-of select="$pversion"/>
+                <xsl:value-of select="substring-after($string,$brand2)"/>
+           </xsl:variable>
+			<xsl:call-template name="brand">
+				<xsl:with-param name="string" select="$newstr"/>
+			</xsl:call-template>
+		</xsl:when>
+        
+		<xsl:when test="contains($string,$brand3)">
+			<xsl:variable name="newstr">
+                <xsl:value-of select="substring-before($string,$brand3)"/>
+                <xsl:value-of select="$productname"/>
+                <xsl:value-of select="substring-after($string,$brand3)"/>
+           </xsl:variable>
+			<xsl:call-template name="brand">
+				<xsl:with-param name="string" select="$newstr"/>
+			</xsl:call-template>
+		</xsl:when>
+		
+        <xsl:when test="contains($string,$brand4)">
+			    <xsl:variable name="newstr">
+                <xsl:value-of select="substring-before($string,$brand4)"/>
+                <xsl:value-of select="$pversion"/>
+                <xsl:value-of select="substring-after($string,$brand4)"/>
+           </xsl:variable>
+			<xsl:call-template name="brand">
+				<xsl:with-param name="string" select="$newstr"/>
+			</xsl:call-template>
+		</xsl:when>
+		
+        <xsl:otherwise>
+			<xsl:value-of select="$string"/>
+		</xsl:otherwise>
+	</xsl:choose> 
+    
+</xsl:template>
+
+
+<!-- Insert Paragraph -->
+<xsl:template name="insertpara">
+	<xsl:variable name="role">
+		<xsl:choose>
+			<xsl:when test="ancestor::table">
+				<xsl:value-of select="concat(@role,'intable')"/>
+			</xsl:when>
+			<xsl:otherwise>
+				<xsl:value-of select="@role"/>
+			</xsl:otherwise>
+		</xsl:choose>
+	</xsl:variable>
+	<p class="{$role}"><xsl:apply-templates /></p>
+</xsl:template>
+
+<!-- Insert "How to get Link" -->
+<xsl:template name="insert_howtoget">
+	<xsl:param name="linkhref" />
+	<xsl:variable name="archive" select="'shared'"/>
+	<xsl:variable name="tmp_href"><xsl:value-of select="concat($urlpre,'shared/text/shared/00/00000004.xhp',$urlpost)"/></xsl:variable>	
+	<xsl:variable name="tmp_doc" select="document($tmp_href)"/>
+	<table class="howtoget" width="100%" border="1" cellpadding="3" cellspacing="0">
+		<tr>
+			<td>
+				<p class="howtogetheader"><xsl:apply-templates select="$tmp_doc//variable[ id='wie']"/></p>
+				<div class="howtogetbody">
+				<xsl:choose>
+					<xsl:when test="$linkhref = ''"> <!-- new style -->
+						<xsl:apply-templates/>
+					</xsl:when>
+					<xsl:otherwise> <!-- old style -->
+						<xsl:variable name="archive1"><xsl:value-of select="concat(substring-before(substring-after($linkhref,'text/'),'/'),'/')"/></xsl:variable>
+						<xsl:variable name="href"><xsl:value-of select="concat($urlpre,$archive1,substring-before($linkhref,'#'),$urlpost)"/></xsl:variable>
+						<xsl:variable name="anc"><xsl:value-of select="substring-after($linkhref,'#')"/></xsl:variable>
+						<xsl:variable name="docum" select="document($href)"/>
+						
+						<xsl:call-template name="insertembed">
+							<xsl:with-param name="doc" select="$docum" />
+							<xsl:with-param name="anchor" select="$anc" />
+						</xsl:call-template>
+
+					</xsl:otherwise>
+				</xsl:choose>				
+				</div>
+			</td>
+		</tr>
+	</table>
+	<br/>
+</xsl:template>
+
+<!-- Create a link -->
+<xsl:template name="createlink">
+<xsl:variable name="archive"><xsl:value-of select="concat(substring-before(substring-after(@href,'text/'),'/'),'/')"/></xsl:variable>
+<xsl:variable name="dbpostfix"><xsl:call-template name="createDBpostfix"><xsl:with-param name="archive" select="$archive"/></xsl:call-template></xsl:variable>
+	<xsl:choose>
+		<xsl:when test="contains(@href,'#')">
+			<xsl:variable name="anchor"><xsl:value-of select="concat('#',substring-after(@href,'#'))"/></xsl:variable>
+			<xsl:variable name="href"><xsl:value-of select="concat($linkprefix,$archive,substring-before(@href,'#'),$linkpostfix,$dbpostfix,$anchor)"/></xsl:variable>
+			<a href="{$href}"><xsl:apply-templates /></a>
+		</xsl:when>
+		<xsl:when test="starts-with(@href,'http://')">  <!-- web links -->
+			<a href="{ href}"><xsl:apply-templates /></a>
+		</xsl:when>
+		<xsl:otherwise>
+			<xsl:variable name="href"><xsl:value-of select="concat($linkprefix,$archive,@href,$linkpostfix,$dbpostfix)"/></xsl:variable>
+			<a href="{$href}"><xsl:apply-templates /></a>
+		</xsl:otherwise>
+	</xsl:choose>
+</xsl:template>
+
+<!-- Insert Note, Warning, or Tip -->
+<xsl:template name="insertnote">
+	<xsl:param name="type" /> <!-- note, tip, or warning -->
+	<xsl:variable name="imgsrc">
+		<xsl:choose>
+			<xsl:when test="$type='note'"><xsl:value-of select="$note_img"/></xsl:when>
+			<xsl:when test="$type='tip'"><xsl:value-of select="$tip_img"/></xsl:when>
+			<xsl:when test="$type='warning'"><xsl:value-of select="$warning_img"/></xsl:when>
+		</xsl:choose>
+	</xsl:variable>
+	<xsl:variable name="dbpostfix"><xsl:call-template name="createDBpostfix"><xsl:with-param name="archive" select="'shared'"/></xsl:call-template></xsl:variable>
+	<xsl:variable name="alt">
+		<xsl:variable name="href"><xsl:value-of select="concat($urlpre,'shared/',$alttext,$urlpost,$dbpostfix)"/></xsl:variable>
+		<xsl:variable name="anchor"><xsl:value-of select="concat('alt_',$type)"/></xsl:variable>
+		<xsl:variable name="doc" select="document($href)"/>
+		<xsl:apply-templates select="$doc//variable[ id=$anchor]" mode="embedded"/>
+	</xsl:variable>
+	<div class="{$type}">
+		<table border="0" class="{$type}" cellspacing="0" cellpadding="5">
+			<tr>
+				<td><img src="{$imgsrc}" alt="{$alt}" title="{$alt}"/></td>
+				<td><xsl:apply-templates /></td>
+			</tr>
+		</table>
+	</div>
+	<br/>
+</xsl:template>
+
+<!-- Insert a heading -->
+<xsl:template name="insertheading">
+	<xsl:param name="level" />
+	<xsl:param name="embedded" />
+	<xsl:text disable-output-escaping="yes">&lt;h</xsl:text><xsl:value-of select="$level"/><xsl:text disable-output-escaping="yes">&gt;</xsl:text>
+		<xsl:choose>
+			<xsl:when test="$embedded = 'yes'">
+				<xsl:apply-templates mode="embedded"/>
+			</xsl:when>
+			<xsl:otherwise>
+				<xsl:apply-templates />
+			</xsl:otherwise>
+		</xsl:choose>
+	<xsl:text disable-output-escaping="yes">&lt;/h</xsl:text><xsl:value-of select="$level"/><xsl:text disable-output-escaping="yes">&gt;</xsl:text>
+</xsl:template>
+
+<!-- Evaluate a case or caseinline switch -->
+<xsl:template name="insertcase">
+	<xsl:param name="embedded" />
+	<xsl:choose>
+		<xsl:when test="parent::switch[ select='sys'] or parent::switchinline[ select='sys']">
+			<xsl:if test="@select = $System">
+				<xsl:choose>
+					<xsl:when test="$embedded = 'yes'">
+						<xsl:apply-templates mode="embedded"/>
+					</xsl:when>
+					<xsl:otherwise>
+						<xsl:apply-templates />
+					</xsl:otherwise>
+				</xsl:choose>
+			</xsl:if>
+		</xsl:when>
+		<xsl:when test="parent::switch[ select='appl'] or parent::switchinline[ select='appl']">
+			<xsl:if test="@select = $appl">
+				<xsl:choose>
+					<xsl:when test="$embedded = 'yes'">
+						<xsl:apply-templates mode="embedded"/>
+					</xsl:when>
+					<xsl:otherwise>
+						<xsl:apply-templates />
+					</xsl:otherwise>
+				</xsl:choose>
+			</xsl:if>
+		</xsl:when>
+		<xsl:when test="parent::switch[ select='distrib'] or parent::switchinline[ select='distrib']">
+			<xsl:if test="@select = $distrib">
+				<xsl:choose>
+					<xsl:when test="$embedded = 'yes'">
+						<xsl:apply-templates mode="embedded"/>
+					</xsl:when>
+					<xsl:otherwise>
+						<xsl:apply-templates />
+					</xsl:otherwise>
+				</xsl:choose>
+			</xsl:if>
+		</xsl:when>
+	</xsl:choose>
+</xsl:template>
+
+<!-- Evaluate a default or defaultinline switch -->
+<xsl:template name="insertdefault">
+	<xsl:param name="embedded" />
+	
+	<xsl:choose>
+		<xsl:when test="parent::switch[ select='sys'] or parent::switchinline[ select='sys']">
+			<xsl:if test="not(../child::case[ select=$System]) and not(../child::caseinline[ select=$System])">
+				<xsl:choose>
+					<xsl:when test="$embedded = 'yes'">
+						<xsl:apply-templates mode="embedded"/>
+					</xsl:when>
+					<xsl:otherwise>
+						<xsl:apply-templates />
+					</xsl:otherwise>
+				</xsl:choose>
+			</xsl:if>
+		</xsl:when>
+		<xsl:when test="parent::switch[ select='appl'] or parent::switchinline[ select='appl']">
+			<xsl:if test="not(../child::case[ select=$appl]) and not(../child::caseinline[ select=$appl])">
+				<xsl:choose>
+					<xsl:when test="$embedded = 'yes'">
+						<xsl:apply-templates mode="embedded"/>
+					</xsl:when>
+					<xsl:otherwise>
+						<xsl:apply-templates />
+					</xsl:otherwise>
+				</xsl:choose>
+			</xsl:if>
+		</xsl:when>
+		<xsl:when test="parent::switch[ select='distrib'] or parent::switchinline[ select='distrib']">
+			<xsl:if test="not(../child::case[ select=$distrib]) and not(../child::caseinline[ select=$distrib])">
+				<xsl:choose>
+					<xsl:when test="$embedded = 'yes'">
+						<xsl:apply-templates mode="embedded"/>
+					</xsl:when>
+					<xsl:otherwise>
+						<xsl:apply-templates />
+					</xsl:otherwise>
+				</xsl:choose>
+			</xsl:if>
+		</xsl:when>
+	</xsl:choose>
+</xsl:template>
+
+<!-- evaluate embeds -->
+<xsl:template name="insertembed">
+	<xsl:param name="doc" />
+	<xsl:param name="anchor" />
+	<!-- different embed targets (also falsely used embed instead embedvar) -->
+	<xsl:choose>
+		<xsl:when test="$doc//section[ id=$anchor]"> <!-- first test for a section of that name -->
+			<xsl:apply-templates select="$doc//section[ id=$anchor]" mode="embedded"/>
+		</xsl:when>
+		<xsl:when test="$doc//paragraph[ id=$anchor]"> <!-- then test for a para of that name -->
+			<p class="embedded">
+				<xsl:apply-templates select="$doc//paragraph[ id=$anchor]" mode="embedded"/>
+			</p>
+		</xsl:when>
+		<xsl:when test="$doc//variable[ id=$anchor]"> <!-- then test for a variable of that name -->
+			<p class="embedded">
+				<xsl:apply-templates select="$doc//variable[ id=$anchor]" mode="embedded"/>
+			</p>
+		</xsl:when>
+		<xsl:otherwise> <!-- then give up -->
+			<p class="bug">D'oh! You found a bug (<xsl:value-of select="@href"/> not found).</p> 
+		</xsl:otherwise>
+	</xsl:choose>
+</xsl:template>
+
+<!-- Insert an image -->
+<xsl:template name="insertimage">
+	
+	<xsl:variable name="fpath">
+		<xsl:call-template name="getfpath">
+			<xsl:with-param name="s"><xsl:value-of select="@src"/></xsl:with-param>
+		</xsl:call-template>
+	</xsl:variable>
+	
+	<xsl:variable name="fname">
+		<xsl:call-template name="getfname">
+			<xsl:with-param name="s"><xsl:value-of select="@src"/></xsl:with-param>
+		</xsl:call-template>
+	</xsl:variable>
+
+  <xsl:variable name="src">
+    <xsl:choose>
+      <xsl:when test="not($ExtensionId='') and starts-with(@src,$ExtensionId)">
+        <xsl:value-of select="concat($ExtensionPath,'/',@src)"/>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:choose>
+          <xsl:when test="(@localize='true') and not($lang='en-US')">
+            <xsl:value-of select="concat($img_url_prefix,$fpath,$lang,'/',$fname)"/>
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:value-of select="concat($img_url_prefix,$fpath,$fname)"/>
+          </xsl:otherwise>
+        </xsl:choose>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+  
+	<!--<xsl:variable name="src"><xsl:value-of select="concat($img_url_prefix,@src)"/></xsl:variable>-->
+	<xsl:variable name="alt"><xsl:value-of select="./alt"/></xsl:variable>
+	<xsl:variable name="width" select="''"/> <!-- Images don't all have the correct size -->
+	<xsl:variable name="height" select="''"/><!-- Image don't all have the correct size -->
+	<img src="{$src}" alt="{$alt}" title="{$alt}">
+		<xsl:if test="not($width='')"><xsl:attribute name="width"><xsl:value-of select="$width"/></xsl:attribute></xsl:if>
+		<xsl:if test="not($height='')"><xsl:attribute name="height"><xsl:value-of select="$height"/></xsl:attribute></xsl:if>
+	</img>  
+</xsl:template>
+
+<!-- Insert a Table -->
+<xsl:template name="inserttable">
+	<xsl:variable name="imgsrc">	<!-- see if we are in an image table -->
+		<xsl:value-of select="tablerow/tablecell[1]/paragraph[1]/image/@src"/>
+	</xsl:variable>
+	
+	<xsl:choose>
+		
+		<xsl:when test="count(descendant::tablecell)=1">
+			<table border="0" class="onecell" cellpadding="0" cellspacing="0">
+				<xsl:apply-templates />
+		 </table>
+		</xsl:when>
+		
+		<xsl:when test="descendant::tablecell[1]/descendant::image">
+			<table border="0" class="icontable" cellpadding="5" cellspacing="0">
+				<xsl:apply-templates mode="icontable"/>
+		 </table>
+		</xsl:when>
+		
+		<xsl:when test="@class='wide'">
+			<table border="1" class="{ class}" cellpadding="0" cellspacing="0" width="100%" >
+				<xsl:apply-templates />
+		 </table>
+		</xsl:when>
+		
+		<xsl:when test="not(@class='')">
+			<table border="1" class="{ class}" cellpadding="0" cellspacing="0" >
+				<xsl:apply-templates />
+		 </table>
+		</xsl:when>
+		
+		<xsl:otherwise>
+			<table border="1" class="border" cellpadding="0" cellspacing="0" >
+				<xsl:apply-templates />
+		 </table>
+		</xsl:otherwise>
+	</xsl:choose>
+	
+	<br/>
+</xsl:template>
+
+<xsl:template name="resolveembed">
+	<div class="embedded">
+		<xsl:variable name="archive"><xsl:value-of select="concat(substring-before(substring-after(@href,'text/'),'/'),'/')"/></xsl:variable>
+		<xsl:variable name="dbpostfix"><xsl:call-template name="createDBpostfix"><xsl:with-param name="archive" select="$archive"/></xsl:call-template></xsl:variable>
+		<xsl:variable name="href"><xsl:value-of select="concat($urlpre,$archive,substring-before(@href,'#'),$urlpost,$dbpostfix)"/></xsl:variable>
+		<xsl:variable name="anc"><xsl:value-of select="substring-after(@href,'#')"/></xsl:variable>
+		<xsl:variable name="docum" select="document($href)"/>
+		
+		<xsl:call-template name="insertembed">
+			<xsl:with-param name="doc" select="$docum" />
+			<xsl:with-param name="anchor" select="$anc" />
+		</xsl:call-template>
+
+	</div>
+</xsl:template>
+
+<xsl:template name="resolveembedvar">
+	<xsl:if test="not(@href='text/shared/00/00000004.xhp#wie')"> <!-- special treatment if howtoget links -->
+		<xsl:variable name="archive"><xsl:value-of select="concat(substring-before(substring-after(@href,'text/'),'/'),'/')"/></xsl:variable>
+		<xsl:variable name="dbpostfix"><xsl:call-template name="createDBpostfix"><xsl:with-param name="archive" select="$archive"/></xsl:call-template></xsl:variable>
+		<xsl:variable name="href"><xsl:value-of select="concat($urlpre,$archive,substring-before(@href,'#'),$urlpost,$dbpostfix)"/></xsl:variable>
+		<xsl:variable name="anchor"><xsl:value-of select="substring-after(@href,'#')"/></xsl:variable>
+		<xsl:variable name="doc" select="document($href)"/>
+		<xsl:choose>
+			<xsl:when test="$doc//variable[ id=$anchor]"> <!-- test for a variable of that name -->
+				<xsl:apply-templates select="$doc//variable[ id=$anchor]" mode="embedded"/>
+			</xsl:when>
+			<xsl:otherwise> <!-- or give up -->
+				<span class="bug">[<xsl:value-of select="@href"/> not found].</span> 
+			</xsl:otherwise>
+		</xsl:choose>
+	</xsl:if>
+</xsl:template>
+
+<!-- Apply -->
+<xsl:template name="apply">
+	<xsl:param name="embedded" />
+	<xsl:choose>
+		<xsl:when test="$embedded = 'yes'">
+			<xsl:apply-templates mode="embedded"/>
+		</xsl:when>
+		<xsl:otherwise>
+			<xsl:apply-templates />
+		</xsl:otherwise>
+	</xsl:choose>
+</xsl:template>
+
+<xsl:template name="getfpath">
+	<xsl:param name="s"/>
+	<xsl:param name="p"/>
+	<xsl:choose>
+		<xsl:when test="contains($s,'/')">
+			<xsl:call-template name="getfpath">
+				<xsl:with-param name="p"><xsl:value-of select="concat($p,substring-before($s,'/'),'/')"/></xsl:with-param>
+				<xsl:with-param name="s"><xsl:value-of select="substring-after($s,'/')"/></xsl:with-param>
+			</xsl:call-template>
+		</xsl:when>
+		<xsl:otherwise>
+			<xsl:value-of select="$p"/>
+		</xsl:otherwise>
+	</xsl:choose>
+</xsl:template>
+
+<xsl:template name="getfname">
+	<xsl:param name="s"/>
+	<xsl:choose>
+		<xsl:when test="contains($s,'/')">
+			<xsl:call-template name="getfname">
+				<xsl:with-param name="s"><xsl:value-of select="substring-after($s,'/')"/></xsl:with-param>
+			</xsl:call-template>
+		</xsl:when>
+		<xsl:otherwise>
+			<xsl:value-of select="$s"/>
+		</xsl:otherwise>
+	</xsl:choose>
+</xsl:template>
+
+<xsl:template name="createDBpostfix">
+	<xsl:param name="archive"/>
+	<xsl:variable name="newDB">
+		<xsl:choose>
+			<xsl:when test="(substring($archive,1,6) = 'shared')"><xsl:value-of select="$Database"/></xsl:when>
+			<xsl:otherwise><xsl:value-of select="substring-before($archive,'/')"/></xsl:otherwise>
+		</xsl:choose>
+	</xsl:variable>
+	<xsl:value-of select="concat($am,'DbPAR=',$newDB)"/>
+</xsl:template>
+
+</xsl:stylesheet>



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]