summaryrefslogtreecommitdiff
path: root/odk/examples/DevelopersGuide/ScriptingFramework
diff options
context:
space:
mode:
Diffstat (limited to 'odk/examples/DevelopersGuide/ScriptingFramework')
-rw-r--r--odk/examples/DevelopersGuide/ScriptingFramework/SayHello/META-INF/manifest.xml5
-rw-r--r--odk/examples/DevelopersGuide/ScriptingFramework/SayHello/Makefile129
-rw-r--r--odk/examples/DevelopersGuide/ScriptingFramework/SayHello/SayHello.odtbin0 -> 8874 bytes
-rw-r--r--odk/examples/DevelopersGuide/ScriptingFramework/SayHello/SayHello/SayHello.java46
-rw-r--r--odk/examples/DevelopersGuide/ScriptingFramework/SayHello/SayHello/parcel-descriptor.xml17
-rwxr-xr-xodk/examples/DevelopersGuide/ScriptingFramework/SayHello/build.xml81
-rw-r--r--odk/examples/DevelopersGuide/ScriptingFramework/ScriptSelector/META-INF/manifest.xml5
-rw-r--r--odk/examples/DevelopersGuide/ScriptingFramework/ScriptSelector/Makefile131
-rw-r--r--odk/examples/DevelopersGuide/ScriptingFramework/ScriptSelector/ScriptSelector.odtbin0 -> 8921 bytes
-rw-r--r--odk/examples/DevelopersGuide/ScriptingFramework/ScriptSelector/ScriptSelector/ScriptSelector.java397
-rw-r--r--odk/examples/DevelopersGuide/ScriptingFramework/ScriptSelector/ScriptSelector/container.gifbin0 -> 164 bytes
-rw-r--r--odk/examples/DevelopersGuide/ScriptingFramework/ScriptSelector/ScriptSelector/parcel-descriptor.xml17
-rw-r--r--odk/examples/DevelopersGuide/ScriptingFramework/ScriptSelector/ScriptSelector/script.gifbin0 -> 187 bytes
-rw-r--r--odk/examples/DevelopersGuide/ScriptingFramework/ScriptSelector/ScriptSelector/soffice.gifbin0 -> 136 bytes
-rwxr-xr-xodk/examples/DevelopersGuide/ScriptingFramework/ScriptSelector/build.xml81
-rw-r--r--odk/examples/DevelopersGuide/ScriptingFramework/makefile.mk79
16 files changed, 988 insertions, 0 deletions
diff --git a/odk/examples/DevelopersGuide/ScriptingFramework/SayHello/META-INF/manifest.xml b/odk/examples/DevelopersGuide/ScriptingFramework/SayHello/META-INF/manifest.xml
new file mode 100644
index 000000000000..e7bf06b4eba9
--- /dev/null
+++ b/odk/examples/DevelopersGuide/ScriptingFramework/SayHello/META-INF/manifest.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE manifest:manifest PUBLIC "-//OpenOffice.org//DTD Manifest 1.0//EN" "Manifest.dtd">
+<manifest:manifest xmlns:manifest="http://openoffice.org/2001/manifest">
+ <manifest:file-entry manifest:media-type="application/vnd.sun.star.framework-script" manifest:full-path="SayHello"/>
+</manifest:manifest>
diff --git a/odk/examples/DevelopersGuide/ScriptingFramework/SayHello/Makefile b/odk/examples/DevelopersGuide/ScriptingFramework/SayHello/Makefile
new file mode 100644
index 000000000000..9017df49dd6b
--- /dev/null
+++ b/odk/examples/DevelopersGuide/ScriptingFramework/SayHello/Makefile
@@ -0,0 +1,129 @@
+#*************************************************************************
+#
+# The Contents of this file are made available subject to the terms of
+# the BSD license.
+#
+# Copyright 2000, 2010 Oracle and/or its affiliates.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# 3. Neither the name of Sun Microsystems, Inc. nor the names of its
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+# TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
+# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+#**************************************************************************
+
+# Builds the OOoBean of the Developers Guide
+
+PRJ=../../../..
+SETTINGS=$(PRJ)/settings
+
+include $(SETTINGS)/settings.mk
+include $(SETTINGS)/std.mk
+include $(SETTINGS)/dk.mk
+
+# Define non-platform/compiler specific settings
+SAMPLE_NAME=SayHello
+SAMPLE_CLASS_OUT = $(OUT_CLASS)/ScriptingFramework/$(SAMPLE_NAME)
+SAMPLE_GEN_OUT = $(OUT_MISC)/ScriptingFramework
+
+SCRIPT_NAME=SayHello
+SCRIPT_CLASS_OUT=$(SAMPLE_CLASS_OUT)/$(SCRIPT_NAME)
+SCRIPT_GEN_OUT=$(SAMPLE_GEN_OUT)/$(SCRIPT_NAME)
+SCRIPT_JAR_NAME=$(SCRIPT_NAME).jar
+SCRIPT_JAR=$(SAMPLE_CLASS_OUT)/$(SCRIPT_JAR_NAME)
+SCRIPT_PACKAGE = $(OUT_BIN)/$(SCRIPT_NAME).$(UNOOXT_EXT)
+SCRIPT_PACKAGE_URL = $(subst \\,\,"$(COMP_PACKAGE_DIR)$(PS)$(SCRIPT_NAME).$(UNOOXT_EXT)")
+SCRIPT_REGISTERFLAG=$(SCRIPT_GEN_OUT)$(PS)devguide_scriptingframework_$(SCRIPT_NAME)_register_scriptpkg.flag
+
+JAVAFILES = \
+ SayHello/SayHello.java
+
+CLASSFILES = $(patsubst %.java,$(SCRIPT_CLASS_OUT)/%.class,$(subst $(SAMPLE_NAME)/,,$(JAVAFILES)))
+
+SDK_CLASSPATH = $(subst $(EMPTYSTRING) $(PATH_SEPARATOR),$(PATH_SEPARATOR),$(CLASSPATH)\
+ $(PATH_SEPARATOR)$(SAMPLE_CLASS_OUT))
+
+# Targets
+.PHONY: ALL
+ALL : \
+ SayHelloExample
+
+include $(SETTINGS)/stdtarget.mk
+
+$(CLASSFILES) : $(JAVAFILES)
+ -$(MKDIR) $(subst /,$(PS),$(@D))
+ $(SDK_JAVAC) $(JAVAC_FLAGS) -classpath "$(SDK_CLASSPATH)" -d $(SCRIPT_CLASS_OUT) $(JAVAFILES)
+
+$(SCRIPT_JAR) : $(CLASSFILES)
+ -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
+ -$(MKDIR) $(subst /,$(PS),$(@D))
+ $(SDK_JAR) cvf $@ $(CLASSNAMES) -C $(SCRIPT_CLASS_OUT) .
+
+# rule for component package file
+$(SCRIPT_PACKAGE) : $(SCRIPT_JAR) META-INF/manifest.xml $(SCRIPT_NAME)/parcel-descriptor.xml
+ -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
+ -$(MKDIR) $(subst /,$(PS),$(@D))
+ $(SDK_ZIP) $@ META-INF/manifest.xml $(SCRIPT_NAME)/parcel-descriptor.xml
+ cd $(subst /,$(PS),$(SAMPLE_CLASS_OUT)/..) && $(SDK_ZIP) -u ../../bin/$(@F) $(SAMPLE_NAME)/$(SCRIPT_JAR_NAME)
+
+$(SCRIPT_REGISTERFLAG) : $(SCRIPT_PACKAGE)
+ifeq "$(SDK_AUTO_DEPLOYMENT)" "YES"
+ -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
+ -$(MKDIR) $(subst /,$(PS),$(@D))
+ $(DEPLOYTOOL) $(SCRIPT_PACKAGE_URL)
+ @echo flagged > $(subst /,$(PS),$@)
+else
+ @echo --------------------------------------------------------------------------------
+ @echo If you want to install your component automatically, please set the environment
+ @echo variable SDK_AUTO_DEPLOYMENT = YES. But note that auto deployment is only
+ @echo possible if no office instance is running.
+ @echo --------------------------------------------------------------------------------
+endif
+
+
+SayHelloExample : $(SCRIPT_REGISTERFLAG)
+ @echo --------------------------------------------------------------------------------
+ @echo The "$(QM)$(SCRIPT_NAME)$(QM)" scripting package was installed in your office installation
+ @echo if SDK_AUTO_DEPLOYMENT = YES. If you want to run the script, start the Office
+ @echo and use the Tools/Macros/Run Macro menu item.
+ @echo You can also load the document "$(QM)$(SCRIPT_NAME).odt$(QM)" and press the button to run the
+ @echo script.
+ @echo -
+ @echo $(MAKE) $(SCRIPT_NAME).odt.load
+ @echo --------------------------------------------------------------------------------
+
+$(SCRIPT_NAME).odt.load : $(SCRIPT_REGISTERFLAG)
+ "$(OFFICE_PROGRAM_PATH)$(PS)soffice" $(basename $@)
+
+%.run: $(CLASSFILES)
+ $(SDK_JAVA) -classpath "$(SDK_CLASSPATH)" $(subst /,.,$(PACKAGE)).$(basename $@)
+
+%.dbg: $(JAR1_JAR)
+ jdb -classpath "$(SDK_CLASSPATH)" $(subst /,.,$(PACKAGE)).$(basename $@)
+
+.PHONY: clean
+clean :
+ -$(DELRECURSIVE) $(subst /,$(PS),$(SAMPLE_CLASS_OUT))
+ -$(DELRECURSIVE) $(subst /,$(PS),$(SCRIPT_GEN_OUT))
+ -$(DEL) $(subst \\,\,$(subst /,$(PS),$(SCRIPT_PACKAGE_URL)))
+
diff --git a/odk/examples/DevelopersGuide/ScriptingFramework/SayHello/SayHello.odt b/odk/examples/DevelopersGuide/ScriptingFramework/SayHello/SayHello.odt
new file mode 100644
index 000000000000..e18331915ca2
--- /dev/null
+++ b/odk/examples/DevelopersGuide/ScriptingFramework/SayHello/SayHello.odt
Binary files differ
diff --git a/odk/examples/DevelopersGuide/ScriptingFramework/SayHello/SayHello/SayHello.java b/odk/examples/DevelopersGuide/ScriptingFramework/SayHello/SayHello/SayHello.java
new file mode 100644
index 000000000000..b120c4cfa9f9
--- /dev/null
+++ b/odk/examples/DevelopersGuide/ScriptingFramework/SayHello/SayHello/SayHello.java
@@ -0,0 +1,46 @@
+import com.sun.star.script.provider.XScriptContext;
+
+import com.sun.star.uno.UnoRuntime;
+import com.sun.star.frame.XComponentLoader;
+import com.sun.star.lang.XComponent;
+import com.sun.star.text.XTextDocument;
+import com.sun.star.text.XTextRange;
+import com.sun.star.text.XText;
+import com.sun.star.beans.PropertyValue;
+import com.sun.star.awt.ActionEvent;
+
+public class SayHello
+{
+ public static void start(XScriptContext ctxt, ActionEvent e)
+ throws Exception
+ {
+ SayHello.start(ctxt);
+ }
+
+ public static void start(XScriptContext ctxt)
+ throws Exception
+ {
+ // getting the text document object
+ XTextDocument xTextDocument = createDocument(ctxt);
+
+ XText xText = xTextDocument.getText();
+ XTextRange xTextRange = xText.getEnd();
+ xTextRange.setString("Hello");
+ }
+
+ private static XTextDocument createDocument(XScriptContext ctxt)
+ throws Exception
+ {
+ XComponentLoader loader = (XComponentLoader)
+ UnoRuntime.queryInterface(
+ XComponentLoader.class, ctxt.getDesktop());
+
+ XComponent comp = loader.loadComponentFromURL(
+ "private:factory/swriter", "_blank", 4, new PropertyValue[0]);
+
+ XTextDocument doc = (XTextDocument)
+ UnoRuntime.queryInterface( XTextDocument.class, comp);
+
+ return doc;
+ }
+}
diff --git a/odk/examples/DevelopersGuide/ScriptingFramework/SayHello/SayHello/parcel-descriptor.xml b/odk/examples/DevelopersGuide/ScriptingFramework/SayHello/SayHello/parcel-descriptor.xml
new file mode 100644
index 000000000000..3f317a3495a2
--- /dev/null
+++ b/odk/examples/DevelopersGuide/ScriptingFramework/SayHello/SayHello/parcel-descriptor.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<parcel language="Java" xmlns:parcel="scripting.dtd">
+ <script language="Java">
+ <locale lang="en">
+ <displayname value="SayHello"/>
+ <description>
+ Prints Hello in a Writer document
+ </description>
+ </locale>
+ <functionname value="SayHello.start"/>
+ <logicalname value="SayHello.start"/>
+ <languagedepprops>
+ <prop name="classpath" value="SayHello.jar"/>
+ </languagedepprops>
+ </script>
+</parcel>
diff --git a/odk/examples/DevelopersGuide/ScriptingFramework/SayHello/build.xml b/odk/examples/DevelopersGuide/ScriptingFramework/SayHello/build.xml
new file mode 100755
index 000000000000..dd0b0cfcfd10
--- /dev/null
+++ b/odk/examples/DevelopersGuide/ScriptingFramework/SayHello/build.xml
@@ -0,0 +1,81 @@
+<project default="build">
+
+ <!-- =================== Global Properties ============================= -->
+ <property environment="env"/>
+ <property name="macroname" value="SayHello"/>
+ <property name="unopkgfile" value="${basedir}/${macroname}.uno.pkg"/>
+
+ <!-- ==================== intialise properties ========================= -->
+ <target name="checksdk">
+ <condition property="UsingSDK">
+ <available file="${env.OFFICE_PROGRAM_PATH}"/>
+ </condition>
+ </target>
+
+ <target name="initsdk" if="UsingSDK">
+ <property name="opp" value="${env.OFFICE_PROGRAM_PATH}"/>
+ </target>
+
+ <target name="initnosdk" unless="UsingSDK">
+ <fail unless="opp" message="Path to Office install not set"/>
+ </target>
+
+ <!-- ==================== classpath setting ============================ -->
+ <target name="init" depends="checksdk,initsdk,initnosdk">
+ <path id="scriptclasspath">
+ <pathelement location="${opp}/classes/unoil.jar"/>
+ <pathelement location="${opp}/classes/ridl.jar"/>
+ <pathelement location="${opp}/classes/jurt.jar"/>
+ <pathelement location="${opp}/classes/juh.jar"/>
+ <pathelement location="${opp}/classes/ScriptFramework.jar"/>
+ </path>
+ </target>
+
+ <!-- ====================== Clean Generated Files ===================== -->
+ <target name="clean">
+ <delete>
+ <fileset dir=".">
+ <include name="**/*.class"/>
+ <include name="**/*.jar"/>
+ <include name="**/*.uno.pkg"/>
+ </fileset>
+ </delete>
+ </target>
+
+ <!-- ===================== Compile the script ========================= -->
+ <target name="compile" depends="init">
+ <javac srcdir="${macroname}" destdir="${macroname}"
+ includes="**/*.java" classpathref="scriptclasspath"
+ debug="on" optimize="on" deprecation="on"/>
+ </target>
+
+ <!-- ====================== Build UNO Package ========================= -->
+ <target name="build" depends="compile">
+ <delete file="${unopkgfile}"/>
+
+ <jar jarfile="${macroname}/${macroname}.jar"
+ basedir="${macroname}" includes="*.class,*.gif">
+ </jar>
+
+ <zip zipfile="${unopkgfile}">
+ <fileset dir="${basedir}">
+ <include name="**/*.jar"/>
+ <include name="**/parcel-descriptor.xml"/>
+ <include name="**/manifest.xml"/>
+ </fileset>
+ </zip>
+ </target>
+
+ <!-- ====================== Deploy Generated Files ==================== -->
+ <target name="deploy" depends="build">
+ <exec executable="${opp}/unopkg">
+ <arg line="add"/>
+ <arg line="--force"/>
+ <arg path="${unopkgfile}"/>
+ </exec>
+ </target>
+
+ <!-- ========================= All In One Build ======================= -->
+ <target name="all" depends="clean,build,deploy"/>
+
+</project>
diff --git a/odk/examples/DevelopersGuide/ScriptingFramework/ScriptSelector/META-INF/manifest.xml b/odk/examples/DevelopersGuide/ScriptingFramework/ScriptSelector/META-INF/manifest.xml
new file mode 100644
index 000000000000..0b86e92ad399
--- /dev/null
+++ b/odk/examples/DevelopersGuide/ScriptingFramework/ScriptSelector/META-INF/manifest.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE manifest:manifest PUBLIC "-//OpenOffice.org//DTD Manifest 1.0//EN" "Manifest.dtd">
+<manifest:manifest xmlns:manifest="http://openoffice.org/2001/manifest">
+ <manifest:file-entry manifest:media-type="application/vnd.sun.star.framework-script" manifest:full-path="ScriptSelector"/>
+</manifest:manifest>
diff --git a/odk/examples/DevelopersGuide/ScriptingFramework/ScriptSelector/Makefile b/odk/examples/DevelopersGuide/ScriptingFramework/ScriptSelector/Makefile
new file mode 100644
index 000000000000..1088fe5db0de
--- /dev/null
+++ b/odk/examples/DevelopersGuide/ScriptingFramework/ScriptSelector/Makefile
@@ -0,0 +1,131 @@
+#*************************************************************************
+#
+# The Contents of this file are made available subject to the terms of
+# the BSD license.
+#
+# Copyright 2000, 2010 Oracle and/or its affiliates.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# 3. Neither the name of Sun Microsystems, Inc. nor the names of its
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+# TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
+# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+#**************************************************************************
+
+# Builds the OOoBean of the Developers Guide
+
+PRJ=../../../..
+SETTINGS=$(PRJ)/settings
+
+include $(SETTINGS)/settings.mk
+include $(SETTINGS)/std.mk
+include $(SETTINGS)/dk.mk
+
+# Define non-platform/compiler specific settings
+SAMPLE_NAME=ScriptSelector
+SAMPLE_CLASS_OUT = $(OUT_CLASS)/ScriptingFramework/$(SAMPLE_NAME)
+SAMPLE_GEN_OUT = $(OUT_MISC)/ScriptingFramework
+
+SCRIPT_NAME=ScriptSelector
+SCRIPT_CLASS_OUT=$(SAMPLE_CLASS_OUT)/$(SCRIPT_NAME)
+SCRIPT_GEN_OUT=$(SAMPLE_GEN_OUT)/$(SCRIPT_NAME)
+SCRIPT_JAR_NAME=$(SCRIPT_NAME).jar
+SCRIPT_JAR=$(SAMPLE_CLASS_OUT)/$(SCRIPT_JAR_NAME)
+SCRIPT_PACKAGE = $(OUT_BIN)/$(SCRIPT_NAME).$(UNOOXT_EXT)
+SCRIPT_PACKAGE_URL = $(subst \\,\,"$(COMP_PACKAGE_DIR)$(PS)$(SCRIPT_NAME).$(UNOOXT_EXT)")
+SCRIPT_REGISTERFLAG=$(SCRIPT_GEN_OUT)$(PS)devguide_scriptingframework_$(SCRIPT_NAME)_register.flag
+
+JAVAFILES = \
+ ScriptSelector/ScriptSelector.java
+
+CLASSFILES = $(patsubst %.java,$(SCRIPT_CLASS_OUT)/%.class,$(subst $(SAMPLE_NAME)/,,$(JAVAFILES)))
+
+SDK_CLASSPATH = $(subst $(EMPTYSTRING) $(PATH_SEPARATOR),$(PATH_SEPARATOR),$(CLASSPATH)\
+ $(PATH_SEPARATOR)$(SAMPLE_CLASS_OUT))
+
+# Targets
+.PHONY: ALL
+ALL : ScriptSelectorExample
+
+include $(SETTINGS)/stdtarget.mk
+
+$(CLASSFILES) : $(JAVAFILES)
+ -$(MKDIR) $(subst /,$(PS),$(@D))
+ $(SDK_JAVAC) $(JAVAC_FLAGS) -classpath "$(SDK_CLASSPATH)" -d $(SCRIPT_CLASS_OUT) $(JAVAFILES)
+
+$(SCRIPT_JAR) : $(CLASSFILES) $(SCRIPT_NAME)/container.gif $(SCRIPT_NAME)/script.gif $(SCRIPT_NAME)/soffice.gif
+ -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
+ -$(MKDIR) $(subst /,$(PS),$(@D))
+ $(COPY) $(subst /,$(PS),$(SCRIPT_NAME)/container.gif) $(subst /,$(PS),$(SCRIPT_CLASS_OUT))
+ $(COPY) $(subst /,$(PS),$(SCRIPT_NAME)/script.gif) $(subst /,$(PS),$(SCRIPT_CLASS_OUT))
+ $(COPY) $(subst /,$(PS),$(SCRIPT_NAME)/soffice.gif) $(subst /,$(PS),$(SCRIPT_CLASS_OUT))
+ $(SDK_JAR) cvf $@ -C $(SCRIPT_CLASS_OUT) .
+
+# rule for component package file
+$(SCRIPT_PACKAGE) : $(SCRIPT_JAR) META-INF/manifest.xml $(SCRIPT_NAME)/parcel-descriptor.xml
+ -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
+ -$(MKDIR) $(subst /,$(PS),$(@D))
+ $(SDK_ZIP) $@ META-INF/manifest.xml $(SCRIPT_NAME)/parcel-descriptor.xml
+ cd $(subst /,$(PS),$(SAMPLE_CLASS_OUT)/..) && $(SDK_ZIP) -u ../../bin/$(@F) $(SAMPLE_NAME)/$(SCRIPT_JAR_NAME)
+
+$(SCRIPT_REGISTERFLAG) : $(SCRIPT_PACKAGE)
+ifeq "$(SDK_AUTO_DEPLOYMENT)" "YES"
+ -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
+ -$(MKDIR) $(subst /,$(PS),$(@D))
+ $(DEPLOYTOOL) $(SCRIPT_PACKAGE_URL)
+ @echo flagged > $(subst /,$(PS),$@)
+else
+ @echo --------------------------------------------------------------------------------
+ @echo If you want to install your component automatically, please set the environment
+ @echo variable SDK_AUTO_DEPLOYMENT = YES. But note that auto deployment is only
+ @echo possible if no office instance is running.
+ @echo --------------------------------------------------------------------------------
+endif
+
+
+ScriptSelectorExample : $(SCRIPT_REGISTERFLAG)
+ @echo --------------------------------------------------------------------------------
+ @echo The "$(QM)$(SCRIPT_NAME)$(QM)" scripting package was installed in your office installation
+ @echo if SDK_AUTO_DEPLOYMENT = YES. If you want to run the script, start the Office
+ @echo and use the Tools/Macros/Run Macro menu item.
+ @echo You can also load the document "$(QM)$(SCRIPT_NAME).odt$(QM)" and press the button to run
+ @echo the script.
+ @echo -
+ @echo $(MAKE) $(SCRIPT_NAME).odt.load
+ @echo --------------------------------------------------------------------------------
+
+$(SCRIPT_NAME).odt.load : $(SCRIPT_REGISTERFLAG)
+ "$(OFFICE_PROGRAM_PATH)$(PS)soffice" $(basename $@)
+
+%.run: $(CLASSFILES)
+ $(SDK_JAVA) -classpath "$(SDK_CLASSPATH)" $(subst /,.,$(PACKAGE)).$(basename $@)
+
+%.dbg: $(JAR1_JAR)
+ jdb -classpath "$(SDK_CLASSPATH)" $(subst /,.,$(PACKAGE)).$(basename $@)
+
+.PHONY: clean
+clean :
+ -$(DELRECURSIVE) $(subst /,$(PS),$(SAMPLE_CLASS_OUT))
+ -$(DELRECURSIVE) $(subst /,$(PS),$(SCRIPT_GEN_OUT))
+ -$(DEL) $(subst \\,\,$(subst /,$(PS),$(SCRIPT_PACKAGE_URL)))
+
diff --git a/odk/examples/DevelopersGuide/ScriptingFramework/ScriptSelector/ScriptSelector.odt b/odk/examples/DevelopersGuide/ScriptingFramework/ScriptSelector/ScriptSelector.odt
new file mode 100644
index 000000000000..323bb6edd411
--- /dev/null
+++ b/odk/examples/DevelopersGuide/ScriptingFramework/ScriptSelector/ScriptSelector.odt
Binary files differ
diff --git a/odk/examples/DevelopersGuide/ScriptingFramework/ScriptSelector/ScriptSelector/ScriptSelector.java b/odk/examples/DevelopersGuide/ScriptingFramework/ScriptSelector/ScriptSelector/ScriptSelector.java
new file mode 100644
index 000000000000..f461b9ddfb5d
--- /dev/null
+++ b/odk/examples/DevelopersGuide/ScriptingFramework/ScriptSelector/ScriptSelector/ScriptSelector.java
@@ -0,0 +1,397 @@
+import javax.swing.*;
+import javax.swing.tree.*;
+import javax.swing.table.*;
+import javax.swing.event.*;
+import javax.swing.border.*;
+import java.awt.*;
+import java.awt.event.*;
+import java.util.*;
+import java.beans.*;
+
+import com.sun.star.uno.UnoRuntime;
+import com.sun.star.uno.Exception;
+import com.sun.star.uno.Any;
+import com.sun.star.uno.AnyConverter;
+import com.sun.star.uno.Type;
+import com.sun.star.uno.XComponentContext;
+
+import com.sun.star.lang.XComponent;
+import com.sun.star.frame.XModel;
+import com.sun.star.frame.FrameSearchFlag;
+import com.sun.star.frame.XDispatchProvider;
+import com.sun.star.frame.XDispatchHelper;
+import com.sun.star.frame.XDispatch;
+import com.sun.star.util.XURLTransformer;
+import com.sun.star.beans.*;
+import com.sun.star.script.XInvocation;
+
+import com.sun.star.lib.uno.helper.PropertySet;
+
+import com.sun.star.script.browse.XBrowseNode;
+import com.sun.star.script.browse.BrowseNodeTypes;
+import com.sun.star.script.browse.XBrowseNodeFactory;
+import com.sun.star.script.browse.BrowseNodeFactoryViewTypes;
+import com.sun.star.script.provider.XScriptContext;
+import com.sun.star.script.provider.XScript;
+import com.sun.star.script.provider.XScriptProvider;
+import com.sun.star.script.provider.XScriptProviderFactory;
+
+public class ScriptSelector {
+
+ private static final int BIG_GAP = 10;
+ private static final int MED_GAP = 5;
+
+ private static final String MSP_FACTORY =
+ "/singletons/com.sun.star.script.provider." +
+ "theMasterScriptProviderFactory";
+
+ private static final String BROWSE_FACTORY =
+ "/singletons/com.sun.star.script.browse.theBrowseNodeFactory";
+
+ private ScriptSelectorPanel selectorPanel;
+
+ public ScriptSelector()
+ {
+ }
+
+ public void show(final XScriptContext ctxt)
+ {
+ try {
+ XBrowseNode root = getRootNode(ctxt);
+
+ Object obj = ctxt.getComponentContext().getValueByName(MSP_FACTORY);
+
+ XScriptProviderFactory fac = (XScriptProviderFactory)
+ UnoRuntime.queryInterface(XScriptProviderFactory.class, obj);
+
+ final XScriptProvider msp =
+ fac.createScriptProvider(new Any(new Type(), null));
+
+ final JFrame client = new JFrame("Script");
+
+ selectorPanel = new ScriptSelectorPanel(root);
+
+ final JButton runButton, closeButton;
+
+ runButton = new JButton("Run");
+ runButton.setEnabled(false);
+
+ closeButton = new JButton("Close");
+
+ JPanel northButtons =
+ new JPanel(new GridLayout(2, 1, MED_GAP, MED_GAP));
+
+ northButtons.add(runButton);
+ northButtons.add(closeButton);
+
+ JPanel southButtons =
+ new JPanel(new GridLayout(3, 1, MED_GAP, MED_GAP));
+
+ selectorPanel.tree.addTreeSelectionListener(
+ new TreeSelectionListener() {
+ public void valueChanged(TreeSelectionEvent e) {
+ XBrowseNode xbn = selectorPanel.getSelection();
+ XPropertySet props = (XPropertySet)
+ UnoRuntime.queryInterface(XPropertySet.class, xbn);
+
+ if (xbn != null &&
+ xbn.getType() == BrowseNodeTypes.SCRIPT)
+ {
+ runButton.setEnabled(true);
+ }
+ else
+ {
+ runButton.setEnabled(false);
+ }
+ }
+ }
+ );
+
+ ActionListener listener = new ActionListener() {
+ public void actionPerformed(ActionEvent event) {
+ if (event.getSource() == runButton) {
+ String uri = selectorPanel.textField.getText();
+
+ try {
+ XScript script = msp.getScript(uri);
+
+ Object[][] out = new Object[1][0];
+ out[0] = new Object[0];
+
+ short[][] num = new short[1][0];
+ num[0] = new short[0];
+
+ script.invoke(new Object[0], num, out);
+ }
+ catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+ else if (event.getSource() == closeButton) {
+ client.dispose();
+ }
+ }
+ };
+
+ runButton.addActionListener(listener);
+ closeButton.addActionListener(listener);
+
+ JPanel buttonPanel = new JPanel(new BorderLayout());
+ buttonPanel.add(northButtons, BorderLayout.NORTH);
+ buttonPanel.add(southButtons, BorderLayout.SOUTH);
+
+ JPanel mainPanel = new JPanel(new BorderLayout(MED_GAP, MED_GAP));
+ mainPanel.setBorder(
+ new EmptyBorder(BIG_GAP, BIG_GAP, BIG_GAP, BIG_GAP));
+ mainPanel.add(selectorPanel, BorderLayout.CENTER);
+ mainPanel.add(buttonPanel, BorderLayout.EAST);
+
+ client.getContentPane().add(mainPanel);
+ client.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
+ client.setSize(500, 350);
+
+ // set the x and y locations so that the frame is in the
+ // centre of the screen
+ Dimension d = client.getToolkit().getScreenSize();
+
+ int x = (int)((d.getWidth() - client.getWidth()) / 2);
+ int y = (int)((d.getHeight() - client.getHeight()) / 2);
+
+ client.setLocation(x, y);
+
+ client.show();
+ }
+ catch (com.sun.star.uno.RuntimeException rue) {
+ rue.printStackTrace();
+ }
+ catch (java.lang.Exception e) {
+ e.printStackTrace();
+ }
+ }
+
+ public void show(final XScriptContext ctxt,
+ final com.sun.star.awt.MouseEvent e)
+ {
+ show(ctxt);
+ }
+
+ public void show(final XScriptContext ctxt,
+ final com.sun.star.awt.ActionEvent e)
+ {
+ show(ctxt);
+ }
+
+ private void checkEnabled(XPropertySet props, String name,
+ JButton button)
+ {
+ boolean enable = false;
+
+ try
+ {
+ if (props != null)
+ {
+ Object o = props.getPropertyValue(name);
+ enable = AnyConverter.toBoolean(
+ props.getPropertyValue(name));
+ }
+ }
+ catch (com.sun.star.lang.IllegalArgumentException iae)
+ {
+ // leave enable set to false
+ }
+ catch (com.sun.star.beans.UnknownPropertyException upe)
+ {
+ // leave enable set to false
+ }
+ catch (com.sun.star.lang.WrappedTargetException wte)
+ {
+ // leave enable set to false
+ }
+
+ button.setEnabled(enable);
+ }
+
+ private XBrowseNode getRootNode(XScriptContext ctxt) {
+
+ XBrowseNode result = null;
+
+ XComponentContext xcc = ctxt.getComponentContext();
+ XBrowseNodeFactory xBrowseFac = (XBrowseNodeFactory)
+ UnoRuntime.queryInterface(
+ XBrowseNodeFactory.class, xcc.getValueByName(BROWSE_FACTORY));
+
+ result = (XBrowseNode)UnoRuntime.queryInterface(
+ XBrowseNode.class, xBrowseFac.createView(
+ BrowseNodeFactoryViewTypes.MACROSELECTOR ) );
+
+ return result;
+ }
+}
+
+class ScriptSelectorPanel extends JPanel {
+
+ private XBrowseNode myrootnode = null;
+ public JTextField textField;
+ public JTree tree;
+ public DefaultTreeModel treeModel;
+
+ public ScriptSelectorPanel(XBrowseNode root)
+ {
+ this.myrootnode = root;
+ initUI();
+ }
+
+ public XBrowseNode getSelection() {
+ DefaultMutableTreeNode node = (DefaultMutableTreeNode)
+ tree.getLastSelectedPathComponent();
+
+ if (node == null) {
+ return null;
+ }
+
+ return (XBrowseNode)node.getUserObject();
+ }
+
+ private void initUI() {
+ setLayout(new BorderLayout());
+
+ DefaultMutableTreeNode top =
+ new DefaultMutableTreeNode(myrootnode) {
+ public String toString() {
+ return ((XBrowseNode)getUserObject()).getName();
+ }
+ };
+ initNodes(myrootnode, top);
+ treeModel = new DefaultTreeModel(top);
+ tree = new JTree(treeModel);
+
+ tree.setCellRenderer(new ScriptTreeRenderer());
+
+ tree.getSelectionModel().setSelectionMode
+ (TreeSelectionModel.SINGLE_TREE_SELECTION);
+
+ tree.addTreeSelectionListener(new TreeSelectionListener() {
+ public void valueChanged(TreeSelectionEvent e) {
+ XBrowseNode xbn = getSelection();
+ XPropertySet props = (XPropertySet)UnoRuntime.queryInterface(
+ XPropertySet.class, xbn);
+
+ if (xbn == null) {
+ textField.setText("");
+ return;
+ }
+
+ String str = xbn.getName();
+ if (xbn.getType() == BrowseNodeTypes.SCRIPT && props != null)
+ {
+ try {
+ str = AnyConverter.toString(
+ props.getPropertyValue("URI"));
+ }
+ catch (Exception ignore) {
+ // default will be used
+ }
+ }
+ textField.setText(str);
+ }
+ });
+
+ JScrollPane scroller = new JScrollPane(tree);
+ add(scroller, BorderLayout.CENTER);
+
+ textField = new JTextField();
+ add(textField, BorderLayout.SOUTH);
+ }
+
+ public void removeNode(DefaultMutableTreeNode node) {
+ MutableTreeNode parent = (MutableTreeNode)(node.getParent());
+ if (parent != null) {
+ treeModel.removeNodeFromParent(node);
+ }
+ }
+
+ public void addNode(DefaultMutableTreeNode parent, XBrowseNode xbn) {
+ DefaultMutableTreeNode newNode =
+ new DefaultMutableTreeNode(xbn) {
+ public String toString() {
+ return ((XBrowseNode)getUserObject()).getName();
+ }
+ };
+
+ treeModel.insertNodeInto(newNode, parent, parent.getChildCount());
+ tree.scrollPathToVisible(new TreePath(newNode.getPath()));
+ }
+
+ private void initNodes(XBrowseNode parent, DefaultMutableTreeNode top) {
+ if ( parent == null || parent.hasChildNodes() == false )
+ {
+ return;
+ }
+
+ XBrowseNode[] children = parent.getChildNodes();
+
+ try {
+ if (children != null) {
+ for (int i = 0; i < children.length; i++) {
+ if ( children[i] == null )
+ {
+ continue;
+ }
+ DefaultMutableTreeNode newNode =
+ new DefaultMutableTreeNode(children[i]) {
+ public String toString() {
+ return ((XBrowseNode)getUserObject()).getName();
+ }
+ };
+ top.add(newNode);
+ initNodes(children[i], newNode);
+ }
+ }
+ }
+ catch (java.lang.Exception e) {
+ e.printStackTrace();
+ }
+ }
+}
+
+class ScriptTreeRenderer extends DefaultTreeCellRenderer {
+
+ private ImageIcon sofficeIcon;
+ private ImageIcon scriptIcon;
+ private ImageIcon containerIcon;
+
+ public ScriptTreeRenderer() {
+ sofficeIcon = new ImageIcon(getClass().getResource("soffice.gif"));
+ scriptIcon = new ImageIcon(getClass().getResource("script.gif"));
+ containerIcon = new ImageIcon(getClass().getResource("container.gif"));
+ }
+
+ public Component getTreeCellRendererComponent(
+ JTree tree,
+ Object value,
+ boolean sel,
+ boolean expanded,
+ boolean leaf,
+ int row,
+ boolean hasFocus) {
+
+ super.getTreeCellRendererComponent(
+ tree, value, sel,
+ expanded, leaf, row,
+ hasFocus);
+
+ DefaultMutableTreeNode node = (DefaultMutableTreeNode)value;
+ XBrowseNode xbn = (XBrowseNode)node.getUserObject();
+ if (xbn.getType() == BrowseNodeTypes.SCRIPT) {
+ setIcon(scriptIcon);
+ }
+ else if(xbn.getType() == BrowseNodeTypes.CONTAINER) {
+ setIcon(containerIcon);
+ }
+ else if(xbn.getType() == BrowseNodeTypes.ROOT) {
+ setIcon(sofficeIcon);
+ }
+
+ return this;
+ }
+}
diff --git a/odk/examples/DevelopersGuide/ScriptingFramework/ScriptSelector/ScriptSelector/container.gif b/odk/examples/DevelopersGuide/ScriptingFramework/ScriptSelector/ScriptSelector/container.gif
new file mode 100644
index 000000000000..3a345f9bf94a
--- /dev/null
+++ b/odk/examples/DevelopersGuide/ScriptingFramework/ScriptSelector/ScriptSelector/container.gif
Binary files differ
diff --git a/odk/examples/DevelopersGuide/ScriptingFramework/ScriptSelector/ScriptSelector/parcel-descriptor.xml b/odk/examples/DevelopersGuide/ScriptingFramework/ScriptSelector/ScriptSelector/parcel-descriptor.xml
new file mode 100644
index 000000000000..758fc3f677d2
--- /dev/null
+++ b/odk/examples/DevelopersGuide/ScriptingFramework/ScriptSelector/ScriptSelector/parcel-descriptor.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<parcel language="Java" xmlns:parcel="scripting.dtd">
+ <script language="Java">
+ <locale lang="en">
+ <displayname value="Script Selector"/>
+ <description>
+ Example Script Selector shows how XBrowseNode API works
+ </description>
+ </locale>
+ <functionname value="ScriptSelector.show"/>
+ <logicalname value="ScriptSelector.show"/>
+ <languagedepprops>
+ <prop name="classpath" value="ScriptSelector.jar"/>
+ </languagedepprops>
+ </script>
+</parcel>
diff --git a/odk/examples/DevelopersGuide/ScriptingFramework/ScriptSelector/ScriptSelector/script.gif b/odk/examples/DevelopersGuide/ScriptingFramework/ScriptSelector/ScriptSelector/script.gif
new file mode 100644
index 000000000000..d3b3768cae11
--- /dev/null
+++ b/odk/examples/DevelopersGuide/ScriptingFramework/ScriptSelector/ScriptSelector/script.gif
Binary files differ
diff --git a/odk/examples/DevelopersGuide/ScriptingFramework/ScriptSelector/ScriptSelector/soffice.gif b/odk/examples/DevelopersGuide/ScriptingFramework/ScriptSelector/ScriptSelector/soffice.gif
new file mode 100644
index 000000000000..88124d87d1e6
--- /dev/null
+++ b/odk/examples/DevelopersGuide/ScriptingFramework/ScriptSelector/ScriptSelector/soffice.gif
Binary files differ
diff --git a/odk/examples/DevelopersGuide/ScriptingFramework/ScriptSelector/build.xml b/odk/examples/DevelopersGuide/ScriptingFramework/ScriptSelector/build.xml
new file mode 100755
index 000000000000..572e7c4c459a
--- /dev/null
+++ b/odk/examples/DevelopersGuide/ScriptingFramework/ScriptSelector/build.xml
@@ -0,0 +1,81 @@
+<project default="build">
+
+ <!-- =================== Global Properties ============================= -->
+ <property environment="env"/>
+ <property name="macroname" value="ScriptSelector"/>
+ <property name="unopkgfile" value="${basedir}/${macroname}.uno.pkg"/>
+
+ <!-- ==================== intialise properties ========================= -->
+ <target name="checksdk">
+ <condition property="UsingSDK">
+ <available file="${env.OFFICE_PROGRAM_PATH}"/>
+ </condition>
+ </target>
+
+ <target name="initsdk" if="UsingSDK">
+ <property name="opp" value="${env.OFFICE_PROGRAM_PATH}"/>
+ </target>
+
+ <target name="initnosdk" unless="UsingSDK">
+ <fail unless="opp" message="Path to Office install not set"/>
+ </target>
+
+ <!-- ==================== classpath setting ============================ -->
+ <target name="init" depends="checksdk,initsdk,initnosdk">
+ <path id="scriptclasspath">
+ <pathelement location="${opp}/classes/unoil.jar"/>
+ <pathelement location="${opp}/classes/ridl.jar"/>
+ <pathelement location="${opp}/classes/jurt.jar"/>
+ <pathelement location="${opp}/classes/juh.jar"/>
+ <pathelement location="${opp}/classes/ScriptFramework.jar"/>
+ </path>
+ </target>
+
+ <!-- ====================== Clean Generated Files ===================== -->
+ <target name="clean">
+ <delete>
+ <fileset dir=".">
+ <include name="**/*.class"/>
+ <include name="**/*.jar"/>
+ <include name="**/*.uno.pkg"/>
+ </fileset>
+ </delete>
+ </target>
+
+ <!-- ===================== Compile the script ========================= -->
+ <target name="compile" depends="init">
+ <javac srcdir="${macroname}" destdir="${macroname}"
+ includes="**/*.java" classpathref="scriptclasspath"
+ debug="on" optimize="on" deprecation="on"/>
+ </target>
+
+ <!-- ====================== Build UNO Package ========================= -->
+ <target name="build" depends="compile">
+ <delete file="${unopkgfile}"/>
+
+ <jar jarfile="${macroname}/${macroname}.jar"
+ basedir="${macroname}" includes="*.class,*.gif">
+ </jar>
+
+ <zip zipfile="${unopkgfile}">
+ <fileset dir="${basedir}">
+ <include name="**/*.jar"/>
+ <include name="**/parcel-descriptor.xml"/>
+ <include name="**/manifest.xml"/>
+ </fileset>
+ </zip>
+ </target>
+
+ <!-- ====================== Deploy Generated Files ==================== -->
+ <target name="deploy" depends="build">
+ <exec executable="${opp}/unopkg">
+ <arg line="add"/>
+ <arg line="--force"/>
+ <arg path="${unopkgfile}"/>
+ </exec>
+ </target>
+
+ <!-- ========================= All In One Build ======================= -->
+ <target name="all" depends="clean,build,deploy"/>
+
+</project>
diff --git a/odk/examples/DevelopersGuide/ScriptingFramework/makefile.mk b/odk/examples/DevelopersGuide/ScriptingFramework/makefile.mk
new file mode 100644
index 000000000000..615a8c131a4f
--- /dev/null
+++ b/odk/examples/DevelopersGuide/ScriptingFramework/makefile.mk
@@ -0,0 +1,79 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2010 Oracle and/or its affiliates.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# 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.
+#
+#*************************************************************************
+
+PRJ=..$/..$/..
+PRJNAME=odk
+TARGET=copying
+
+#----------------------------------------------------------------
+.INCLUDE: settings.mk
+.INCLUDE: $(PRJ)$/util$/makefile.pmk
+#----------------------------------------------------------------
+
+#----------------------------------------------------
+# this makefile is only used for copying the example
+# files into the SDK
+#----------------------------------------------------
+
+DESTSF=$(DESTDIRDEVGUIDEEXAMPLES)$/ScriptingFramework
+SF_FILES=\
+ $(DESTSF)$/SayHello$/SayHello$/parcel-descriptor.xml \
+ $(DESTSF)$/SayHello$/SayHello$/SayHello.java \
+ $(DESTSF)$/SayHello$/Makefile \
+ $(DESTSF)$/SayHello$/SayHello.odt \
+ $(DESTSF)$/SayHello$/build.xml \
+ $(DESTSF)$/SayHello$/META-INF$/manifest.xml \
+ $(DESTSF)$/ScriptSelector$/ScriptSelector.odt \
+ $(DESTSF)$/ScriptSelector$/Makefile \
+ $(DESTSF)$/ScriptSelector$/build.xml \
+ $(DESTSF)$/ScriptSelector$/META-INF$/manifest.xml \
+ $(DESTSF)$/ScriptSelector$/ScriptSelector$/container.gif \
+ $(DESTSF)$/ScriptSelector$/ScriptSelector$/script.gif \
+ $(DESTSF)$/ScriptSelector$/ScriptSelector$/soffice.gif \
+ $(DESTSF)$/ScriptSelector$/ScriptSelector$/ScriptSelector.java \
+ $(DESTSF)$/ScriptSelector$/ScriptSelector$/parcel-descriptor.xml
+
+DIR_FILE_LIST= \
+ $(SF_FILES) \
+
+DIR_DIRECTORY_LIST=$(uniq $(DIR_FILE_LIST:d))
+DIR_CREATE_FLAG=$(MISC)$/devguide_sf_dirs_created.txt
+DIR_FILE_FLAG=$(MISC)$/devguide_sf.txt
+
+#--------------------------------------------------
+# TARGETS
+#--------------------------------------------------
+all : \
+ $(DIR_FILE_LIST) \
+ $(DIR_FILE_FLAG)
+
+#--------------------------------------------------
+# use global rules
+#--------------------------------------------------
+.INCLUDE: $(PRJ)$/util$/odk_rules.pmk
+
+