incubator-ooo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mba...@apache.org
Subject svn commit: r1172372 [1/6] - in /incubator/ooo/trunk/main/helpauthoring: ./ HelpAuthoring/ META-INF/ filter/ help/ help/en-US/ help/en-US/org.openoffice.helpauthoring/
Date Sun, 18 Sep 2011 21:34:42 GMT
Author: mbauer
Date: Sun Sep 18 21:34:39 2011
New Revision: 1172372

URL: http://svn.apache.org/viewvc?rev=1172372&view=rev
Log:
cws mba34issues01: first revision of help authoring extension

Added:
    incubator/ooo/trunk/main/helpauthoring/
    incubator/ooo/trunk/main/helpauthoring/Addons.xcu
    incubator/ooo/trunk/main/helpauthoring/Filter.xcu
    incubator/ooo/trunk/main/helpauthoring/HelpAuthoring/
    incubator/ooo/trunk/main/helpauthoring/HelpAuthoring/Comment.xba
    incubator/ooo/trunk/main/helpauthoring/HelpAuthoring/Embed.xba
    incubator/ooo/trunk/main/helpauthoring/HelpAuthoring/Find.xba
    incubator/ooo/trunk/main/helpauthoring/HelpAuthoring/HID.xba
    incubator/ooo/trunk/main/helpauthoring/HelpAuthoring/Helpers.xba
    incubator/ooo/trunk/main/helpauthoring/HelpAuthoring/IND.xba
    incubator/ooo/trunk/main/helpauthoring/HelpAuthoring/Link.xba
    incubator/ooo/trunk/main/helpauthoring/HelpAuthoring/Meta.xba
    incubator/ooo/trunk/main/helpauthoring/HelpAuthoring/Module1.xba
    incubator/ooo/trunk/main/helpauthoring/HelpAuthoring/OtherElements.xba
    incubator/ooo/trunk/main/helpauthoring/HelpAuthoring/Switch.xba
    incubator/ooo/trunk/main/helpauthoring/HelpAuthoring/TOC.xba
    incubator/ooo/trunk/main/helpauthoring/HelpAuthoring/Table.xba
    incubator/ooo/trunk/main/helpauthoring/HelpAuthoring/Validate.xba
    incubator/ooo/trunk/main/helpauthoring/HelpAuthoring/_Main.xba
    incubator/ooo/trunk/main/helpauthoring/HelpAuthoring/dialog.xlb
    incubator/ooo/trunk/main/helpauthoring/HelpAuthoring/dlgCase.xdl
    incubator/ooo/trunk/main/helpauthoring/HelpAuthoring/dlgComment.xdl
    incubator/ooo/trunk/main/helpauthoring/HelpAuthoring/dlgConfigure.xdl
    incubator/ooo/trunk/main/helpauthoring/HelpAuthoring/dlgEmbed.xdl
    incubator/ooo/trunk/main/helpauthoring/HelpAuthoring/dlgFind.xdl
    incubator/ooo/trunk/main/helpauthoring/HelpAuthoring/dlgHID.xdl
    incubator/ooo/trunk/main/helpauthoring/HelpAuthoring/dlgIND.xdl
    incubator/ooo/trunk/main/helpauthoring/HelpAuthoring/dlgLink.xdl
    incubator/ooo/trunk/main/helpauthoring/HelpAuthoring/dlgMeta.xdl
    incubator/ooo/trunk/main/helpauthoring/HelpAuthoring/dlgObjProp.xdl
    incubator/ooo/trunk/main/helpauthoring/HelpAuthoring/dlgRepeatFind.xdl
    incubator/ooo/trunk/main/helpauthoring/HelpAuthoring/dlgSwitch.xdl
    incubator/ooo/trunk/main/helpauthoring/HelpAuthoring/dlgTOC.xdl
    incubator/ooo/trunk/main/helpauthoring/HelpAuthoring/dlgTable.xdl
    incubator/ooo/trunk/main/helpauthoring/HelpAuthoring/dlgWarn.xdl
    incubator/ooo/trunk/main/helpauthoring/HelpAuthoring/dlg_BrowseEmbed.xdl
    incubator/ooo/trunk/main/helpauthoring/HelpAuthoring/script.xlb
    incubator/ooo/trunk/main/helpauthoring/META-INF/
    incubator/ooo/trunk/main/helpauthoring/META-INF/manifest.xml
    incubator/ooo/trunk/main/helpauthoring/Paths.xcu
    incubator/ooo/trunk/main/helpauthoring/Type.xcu
    incubator/ooo/trunk/main/helpauthoring/description.xml
    incubator/ooo/trunk/main/helpauthoring/filter/
    incubator/ooo/trunk/main/helpauthoring/filter/soffice2xmlhelp.xsl
    incubator/ooo/trunk/main/helpauthoring/filter/xmlhelp.dtd
    incubator/ooo/trunk/main/helpauthoring/filter/xmlhelp2soffice.xsl
    incubator/ooo/trunk/main/helpauthoring/help/
    incubator/ooo/trunk/main/helpauthoring/help/en-US/
    incubator/ooo/trunk/main/helpauthoring/help/en-US/help.tree
    incubator/ooo/trunk/main/helpauthoring/help/en-US/org.openoffice.helpauthoring/
    incubator/ooo/trunk/main/helpauthoring/help/en-US/org.openoffice.helpauthoring/ha-docroot.xhp
    incubator/ooo/trunk/main/helpauthoring/help/en-US/org.openoffice.helpauthoring/ha-elements.xhp
    incubator/ooo/trunk/main/helpauthoring/help/en-US/org.openoffice.helpauthoring/ha-extendedtips.xhp
    incubator/ooo/trunk/main/helpauthoring/help/en-US/org.openoffice.helpauthoring/ha-hidsindex.xhp
    incubator/ooo/trunk/main/helpauthoring/help/en-US/org.openoffice.helpauthoring/ha-ids.xhp
    incubator/ooo/trunk/main/helpauthoring/help/en-US/org.openoffice.helpauthoring/ha-l10n.xhp
    incubator/ooo/trunk/main/helpauthoring/help/en-US/org.openoffice.helpauthoring/ha-metadata.xhp
    incubator/ooo/trunk/main/helpauthoring/help/en-US/org.openoffice.helpauthoring/ha-newfile.xhp
    incubator/ooo/trunk/main/helpauthoring/help/en-US/org.openoffice.helpauthoring/ha-specialsections.xhp
    incubator/ooo/trunk/main/helpauthoring/help/en-US/org.openoffice.helpauthoring/ha-switch.xhp
    incubator/ooo/trunk/main/helpauthoring/help/en-US/org.openoffice.helpauthoring/ha-transclude.xhp
    incubator/ooo/trunk/main/helpauthoring/help/en-US/org.openoffice.helpauthoring/ha-validating.xhp
    incubator/ooo/trunk/main/helpauthoring/help/en-US/org.openoffice.helpauthoring/helpauthoring.xhp

Added: incubator/ooo/trunk/main/helpauthoring/Addons.xcu
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/helpauthoring/Addons.xcu?rev=1172372&view=auto
==============================================================================
--- incubator/ooo/trunk/main/helpauthoring/Addons.xcu (added)
+++ incubator/ooo/trunk/main/helpauthoring/Addons.xcu Sun Sep 18 21:34:39 2011
@@ -0,0 +1,576 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!--***********************************************************************
+ *
+ * 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: Addons.xcu,v $
+ *
+ * $Revision: 1.2 $
+ *
+ * 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.
+ *
+ ************************************************************************ -->
+<oor:component-data xmlns:oor="http://openoffice.org/2001/registry" xmlns:xs="http://www.w3.org/2001/XMLSchema" oor:name="Addons" oor:package="org.openoffice.Office">
+	<node oor:name="AddonUI">
+		<node oor:name="OfficeMenuBar">
+			<node oor:name="org.openoffice.helpauthoring" oor:op="replace">
+				<prop oor:name="Title" oor:type="xs:string">
+					<value/>
+					<value xml:lang="en-US">Help Authoring</value>
+				</prop>
+				<prop oor:name="Context" oor:type="xs:string">
+					<value>com.sun.star.text.TextDocument</value>
+				</prop>
+				<node oor:name="Submenu">
+					<node oor:name="m01" oor:op="replace">
+						<prop oor:name="URL" oor:type="xs:string">
+							<value>vnd.sun.star.script:HelpAuthoring._Main.CreateFile?language=Basic&amp;location=application</value>
+						</prop>
+						<prop oor:name="Title" oor:type="xs:string">
+							<value/>
+							<value xml:lang="en-US">Create Help File</value>
+						</prop>
+					</node>
+					<node oor:name="m02" oor:op="replace">
+						<prop oor:name="URL" oor:type="xs:string">
+							<value>vnd.sun.star.script:HelpAuthoring._Main.DisplayVersion?language=Basic&amp;location=application</value>
+						</prop>
+						<prop oor:name="Title" oor:type="xs:string">
+							<value/>
+							<value xml:lang="en-US">About</value>
+						</prop>
+					</node>
+					<node oor:name="m03" oor:op="replace">
+						<prop oor:name="URL" oor:type="xs:string">
+							<value>vnd.sun.star.script:HelpAuthoring.Helpers.SetDocumentRoot?language=Basic&amp;location=application</value>
+						</prop>
+						<prop oor:name="Title" oor:type="xs:string">
+							<value/>
+							<value xml:lang="en-US">Set Document Root</value>
+						</prop>
+					</node>
+					<node oor:name="m04" oor:op="replace">
+						<prop oor:name="URL" oor:type="xs:string">
+							<value>vnd.sun.star.script:HelpAuthoring.Meta.Main?language=Basic&amp;location=application</value>
+						</prop>
+						<prop oor:name="Title" oor:type="xs:string">
+							<value/>
+							<value xml:lang="en-US">Edit Meta Data </value>
+						</prop>
+					</node>
+					<node oor:name="m05" oor:op="replace">
+						<prop oor:name="URL" oor:type="xs:string">
+							<value>vnd.sun.star.script:HelpAuthoring.Validate.Validate?language=Basic&amp;location=application</value>
+						</prop>
+						<prop oor:name="Title" oor:type="xs:string">
+							<value/>
+							<value xml:lang="en-US">Validate this Help File </value>
+						</prop>
+					</node>
+					<node oor:name="m06" oor:op="replace">
+						<prop oor:name="URL" oor:type="xs:string">
+							<value>vnd.sun.star.script:HelpAuthoring.OtherElements.ToggleParaL10NStatus?language=Basic&amp;location=application</value>
+						</prop>
+						<prop oor:name="Title" oor:type="xs:string">
+							<value/>
+							<value xml:lang="en-US">Toggle L10N </value>
+						</prop>
+					</node>
+					<node oor:name="m07" oor:op="replace">
+						<prop oor:name="URL" oor:type="xs:string">
+							<value>vnd.sun.star.script:HelpAuthoring.Helpers.InsertNewParaData?language=Basic&amp;location=application</value>
+						</prop>
+						<prop oor:name="Title" oor:type="xs:string">
+							<value/>
+							<value xml:lang="en-US">Assign ID </value>
+						</prop>
+					</node>
+					<node oor:name="m08" oor:op="replace">
+						<prop oor:name="URL" oor:type="xs:string">
+							<value>vnd.sun.star.script:HelpAuthoring.Comment.Main?language=Basic&amp;location=application</value>
+						</prop>
+						<prop oor:name="Title" oor:type="xs:string">
+							<value/>
+							<value xml:lang="en-US">Insert Comment </value>
+						</prop>
+					</node>
+					<node oor:name="m09" oor:op="replace">
+						<prop oor:name="URL" oor:type="xs:string">
+							<value>vnd.sun.star.script:HelpAuthoring.Table.Main?language=Basic&amp;location=application</value>
+						</prop>
+						<prop oor:name="Title" oor:type="xs:string">
+							<value/>
+							<value xml:lang="en-US">Insert Table </value>
+						</prop>
+					</node>
+					<node oor:name="m10" oor:op="replace">
+						<prop oor:name="URL" oor:type="xs:string">
+							<value>vnd.sun.star.script:HelpAuthoring.Link.Main?language=Basic&amp;location=application</value>
+						</prop>
+						<prop oor:name="Title" oor:type="xs:string">
+							<value/>
+							<value xml:lang="en-US">Insert Link </value>
+						</prop>
+					</node>
+					<node oor:name="m11" oor:op="replace">
+						<prop oor:name="URL" oor:type="xs:string">
+							<value>vnd.sun.star.script:HelpAuthoring.HID.Main?language=Basic&amp;location=application</value>
+						</prop>
+						<prop oor:name="Title" oor:type="xs:string">
+							<value/>
+							<value xml:lang="en-US">Insert Help ID </value>
+						</prop>
+					</node>
+					<node oor:name="m12" oor:op="replace">
+						<prop oor:name="URL" oor:type="xs:string">
+							<value>vnd.sun.star.script:HelpAuthoring.IND.Main?language=Basic&amp;location=application</value>
+						</prop>
+						<prop oor:name="Title" oor:type="xs:string">
+							<value/>
+							<value xml:lang="en-US">Insert Index Entry </value>
+						</prop>
+					</node>
+					<node oor:name="m13" oor:op="replace">
+						<prop oor:name="URL" oor:type="xs:string">
+							<value>vnd.sun.star.script:HelpAuthoring.OtherElements.InsertExtendedTip?language=Basic&amp;location=application</value>
+						</prop>
+						<prop oor:name="Title" oor:type="xs:string">
+							<value/>
+							<value xml:lang="en-US">Insert Extended Tip </value>
+						</prop>
+					</node>
+					<node oor:name="m14" oor:op="replace">
+						<prop oor:name="URL" oor:type="xs:string">
+							<value>vnd.sun.star.script:HelpAuthoring.OtherElements.InsertHowToGet?language=Basic&amp;location=application</value>
+						</prop>
+						<prop oor:name="Title" oor:type="xs:string">
+							<value/>
+							<value xml:lang="en-US">&quot;How to Get&quot; Section </value>
+						</prop>
+					</node>
+					<node oor:name="m15" oor:op="replace">
+						<prop oor:name="URL" oor:type="xs:string">
+							<value>vnd.sun.star.script:HelpAuthoring.OtherElements.InsertGraphic?language=Basic&amp;location=application</value>
+						</prop>
+						<prop oor:name="Title" oor:type="xs:string">
+							<value/>
+							<value xml:lang="en-US">Insert Image </value>
+						</prop>
+					</node>
+					<node oor:name="m16" oor:op="replace">
+						<prop oor:name="URL" oor:type="xs:string">
+							<value>vnd.sun.star.script:HelpAuthoring.OtherElements.InsertSection?language=Basic&amp;location=application</value>
+						</prop>
+						<prop oor:name="Title" oor:type="xs:string">
+							<value/>
+							<value xml:lang="en-US">Insert Section </value>
+						</prop>
+					</node>
+					<node oor:name="m17" oor:op="replace">
+						<prop oor:name="URL" oor:type="xs:string">
+							<value>vnd.sun.star.script:HelpAuthoring.OtherElements.InsertVariable?language=Basic&amp;location=application</value>
+						</prop>
+						<prop oor:name="Title" oor:type="xs:string">
+							<value/>
+							<value xml:lang="en-US">Insert Variable </value>
+						</prop>
+					</node>
+					<node oor:name="m18" oor:op="replace">
+						<prop oor:name="URL" oor:type="xs:string">
+							<value>vnd.sun.star.script:HelpAuthoring.Embed.Main?language=Basic&amp;location=application</value>
+						</prop>
+						<prop oor:name="Title" oor:type="xs:string">
+							<value/>
+							<value xml:lang="en-US">Transclude (Embed) </value>
+						</prop>
+					</node>
+					<node oor:name="m19" oor:op="replace">
+						<prop oor:name="URL" oor:type="xs:string">
+							<value>vnd.sun.star.script:HelpAuthoring.OtherElements.InsertRelatedTopics?language=Basic&amp;location=application</value>
+						</prop>
+						<prop oor:name="Title" oor:type="xs:string">
+							<value/>
+							<value xml:lang="en-US">&quot;Related Topics&quot; Section </value>
+						</prop>
+					</node>
+				</node>
+			</node>
+		</node>
+		<!--
+		<node oor:name="OfficeToolBar">
+			<node oor:name="org.openoffice.helpauthoring" oor:op="replace">
+				<prop oor:name="Title" oor:type="xs:string">
+					<value/>
+					<value xml:lang="en-US">Help Authoring</value>
+				</prop>
+				<prop oor:name="Context" oor:type="xs:string">
+					<value>com.sun.star.text.TextDocument</value>
+				</prop>
+				<node oor:name="m01" oor:op="replace">
+					<prop oor:name="URL" oor:type="xs:string">
+						<value>vnd.sun.star.script:HelpAuthoring._Main.CreateFile?language=Basic&amp;location=application</value>
+					</prop>
+					<prop oor:name="Title" oor:type="xs:string">
+						<value/>
+						<value xml:lang="en-US">Create Help File</value>
+					</prop>
+					<prop oor:name="ImageIdentifier" oor:type="xs:string">
+						<value xml:lang="en-US">images/favorites.png</value>
+					</prop>
+					<prop oor:name="Target" oor:type="xs:string">
+						<value>_self</value>
+					</prop>
+					<prop oor:name="Context" oor:type="xs:string">
+						<value>com.sun.star.text.TextDocument</value>
+					</prop>
+				</node>
+					
+				<node oor:name="m02" oor:op="replace">
+					<prop oor:name="URL" oor:type="xs:string">
+						<value>vnd.sun.star.script:HelpAuthoring._Main.DisplayVersion?language=Basic&amp;location=application</value>
+					</prop>
+					<prop oor:name="Title" oor:type="xs:string">
+						<value/>
+						<value xml:lang="en-US">About</value>
+					</prop>
+					<prop oor:name="ImageIdentifier" oor:type="xs:string">
+						<value/>
+					</prop>
+					<prop oor:name="Target" oor:type="xs:string">
+						<value>_self</value>
+					</prop>
+					<prop oor:name="Context" oor:type="xs:string">
+						<value>com.sun.star.text.TextDocument</value>
+					</prop>
+				</node>
+					
+				<node oor:name="m03" oor:op="replace">
+					<prop oor:name="URL" oor:type="xs:string">
+						<value>vnd.sun.star.script:HelpAuthoring.Helpers.SetDocumentRoot?language=Basic&amp;location=application</value>
+					</prop>
+					<prop oor:name="Title" oor:type="xs:string">
+						<value/>
+						<value xml:lang="en-US">Set Document Root</value>
+					</prop>
+					<prop oor:name="ImageIdentifier" oor:type="xs:string">
+						<value/>
+					</prop>
+					<prop oor:name="Target" oor:type="xs:string">
+						<value>_self</value>
+					</prop>
+					<prop oor:name="Context" oor:type="xs:string">
+						<value>com.sun.star.text.TextDocument</value>
+					</prop>
+				</node>
+				<node oor:name="m04" oor:op="replace">
+					<prop oor:name="URL" oor:type="xs:string">
+						<value>vnd.sun.star.script:HelpAuthoring.Meta.Main?language=Basic&amp;location=application</value>
+					</prop>
+					<prop oor:name="Title" oor:type="xs:string">
+						<value/>
+						<value xml:lang="en-US">Edit Meta Data </value>
+					</prop>
+					<prop oor:name="ImageIdentifier" oor:type="xs:string">
+						<value/>
+					</prop>
+					<prop oor:name="Target" oor:type="xs:string">
+						<value>_self</value>
+					</prop>
+					<prop oor:name="Context" oor:type="xs:string">
+						<value>com.sun.star.text.TextDocument</value>
+					</prop>
+				</node>
+				<node oor:name="m05" oor:op="replace">
+					<prop oor:name="URL" oor:type="xs:string">
+						<value>vnd.sun.star.script:HelpAuthoring.Validate.Validate?language=Basic&amp;location=application</value>
+					</prop>
+					<prop oor:name="Title" oor:type="xs:string">
+						<value/>
+						<value xml:lang="en-US">Validate this Help File </value>
+					</prop>
+					<prop oor:name="ImageIdentifier" oor:type="xs:string">
+						<value/>
+					</prop>
+					<prop oor:name="Target" oor:type="xs:string">
+						<value>_self</value>
+					</prop>
+					<prop oor:name="Context" oor:type="xs:string">
+						<value>com.sun.star.text.TextDocument</value>
+					</prop>
+				</node>
+				<node oor:name="m06" oor:op="replace">
+					<prop oor:name="URL" oor:type="xs:string">
+						<value>vnd.sun.star.script:HelpAuthoring.OtherElements.ToggleParaL10NStatus?language=Basic&amp;location=application</value>
+					</prop>
+					<prop oor:name="Title" oor:type="xs:string">
+						<value/>
+						<value xml:lang="en-US">Toggle L10N </value>
+					</prop>
+					<prop oor:name="ImageIdentifier" oor:type="xs:string">
+						<value/>
+					</prop>
+					<prop oor:name="Target" oor:type="xs:string">
+						<value>_self</value>
+					</prop>
+					<prop oor:name="Context" oor:type="xs:string">
+						<value>com.sun.star.text.TextDocument</value>
+					</prop>
+				</node>
+				<node oor:name="m07" oor:op="replace">
+					<prop oor:name="URL" oor:type="xs:string">
+						<value>vnd.sun.star.script:HelpAuthoring.Helpers.InsertNewParaData?language=Basic&amp;location=application</value>
+					</prop>
+					<prop oor:name="Title" oor:type="xs:string">
+						<value/>
+						<value xml:lang="en-US">Assign ID </value>
+					</prop>
+					<prop oor:name="ImageIdentifier" oor:type="xs:string">
+						<value/>
+					</prop>
+					<prop oor:name="Target" oor:type="xs:string">
+						<value>_self</value>
+					</prop>
+					<prop oor:name="Context" oor:type="xs:string">
+						<value>com.sun.star.text.TextDocument</value>
+					</prop>
+				</node>
+				<node oor:name="m08" oor:op="replace">
+					<prop oor:name="URL" oor:type="xs:string">
+						<value>vnd.sun.star.script:HelpAuthoring.Comment.Main?language=Basic&amp;location=application</value>
+					</prop>
+					<prop oor:name="Title" oor:type="xs:string">
+						<value/>
+						<value xml:lang="en-US">Insert Comment </value>
+					</prop>
+					<prop oor:name="ImageIdentifier" oor:type="xs:string">
+						<value/>
+					</prop>
+					<prop oor:name="Target" oor:type="xs:string">
+						<value>_self</value>
+					</prop>
+					<prop oor:name="Context" oor:type="xs:string">
+						<value>com.sun.star.text.TextDocument</value>
+					</prop>
+				</node>
+				<node oor:name="m09" oor:op="replace">
+					<prop oor:name="URL" oor:type="xs:string">
+						<value>vnd.sun.star.script:HelpAuthoring.Table.Main?language=Basic&amp;location=application</value>
+					</prop>
+					<prop oor:name="Title" oor:type="xs:string">
+						<value/>
+						<value xml:lang="en-US">Insert Table </value>
+					</prop>
+					<prop oor:name="ImageIdentifier" oor:type="xs:string">
+						<value/>
+					</prop>
+					<prop oor:name="Target" oor:type="xs:string">
+						<value>_self</value>
+					</prop>
+					<prop oor:name="Context" oor:type="xs:string">
+						<value>com.sun.star.text.TextDocument</value>
+					</prop>
+				</node>
+				<node oor:name="m10" oor:op="replace">
+					<prop oor:name="URL" oor:type="xs:string">
+						<value>vnd.sun.star.script:HelpAuthoring.Link.Main?language=Basic&amp;location=application</value>
+					</prop>
+					<prop oor:name="Title" oor:type="xs:string">
+						<value/>
+						<value xml:lang="en-US">Insert Link </value>
+					</prop>
+					<prop oor:name="ImageIdentifier" oor:type="xs:string">
+						<value/>
+					</prop>
+					<prop oor:name="Target" oor:type="xs:string">
+						<value>_self</value>
+					</prop>
+					<prop oor:name="Context" oor:type="xs:string">
+						<value>com.sun.star.text.TextDocument</value>
+					</prop>
+				</node>
+				<node oor:name="m11" oor:op="replace">
+					<prop oor:name="URL" oor:type="xs:string">
+						<value>vnd.sun.star.script:HelpAuthoring.HID.Main?language=Basic&amp;location=application</value>
+					</prop>
+					<prop oor:name="Title" oor:type="xs:string">
+						<value/>
+						<value xml:lang="en-US">Insert Help ID </value>
+					</prop>
+					<prop oor:name="ImageIdentifier" oor:type="xs:string">
+						<value/>
+					</prop>
+					<prop oor:name="Target" oor:type="xs:string">
+						<value>_self</value>
+					</prop>
+					<prop oor:name="Context" oor:type="xs:string">
+						<value>com.sun.star.text.TextDocument</value>
+					</prop>
+				</node>
+				<node oor:name="m12" oor:op="replace">
+					<prop oor:name="URL" oor:type="xs:string">
+						<value>vnd.sun.star.script:HelpAuthoring.IND.Main?language=Basic&amp;location=application</value>
+					</prop>
+					<prop oor:name="Title" oor:type="xs:string">
+						<value/>
+						<value xml:lang="en-US">Insert Index Entry </value>
+					</prop>
+					<prop oor:name="ImageIdentifier" oor:type="xs:string">
+						<value/>
+					</prop>
+					<prop oor:name="Target" oor:type="xs:string">
+						<value>_self</value>
+					</prop>
+					<prop oor:name="Context" oor:type="xs:string">
+						<value>com.sun.star.text.TextDocument</value>
+					</prop>
+				</node>
+				<node oor:name="m13" oor:op="replace">
+					<prop oor:name="URL" oor:type="xs:string">
+						<value>vnd.sun.star.script:HelpAuthoring.OtherElements.InsertExtendedTip?language=Basic&amp;location=application</value>
+					</prop>
+					<prop oor:name="Title" oor:type="xs:string">
+						<value/>
+						<value xml:lang="en-US">Insert Extended Tip </value>
+					</prop>
+					<prop oor:name="ImageIdentifier" oor:type="xs:string">
+						<value/>
+					</prop>
+					<prop oor:name="Target" oor:type="xs:string">
+						<value>_self</value>
+					</prop>
+					<prop oor:name="Context" oor:type="xs:string">
+						<value>com.sun.star.text.TextDocument</value>
+					</prop>
+				</node>
+				<node oor:name="m14" oor:op="replace">
+					<prop oor:name="URL" oor:type="xs:string">
+						<value>vnd.sun.star.script:HelpAuthoring.OtherElements.InsertHowToGet?language=Basic&amp;location=application</value>
+					</prop>
+					<prop oor:name="Title" oor:type="xs:string">
+						<value/>
+						<value xml:lang="en-US">&quot;How to Get&quot; Section </value>
+					</prop>
+					<prop oor:name="ImageIdentifier" oor:type="xs:string">
+						<value/>
+					</prop>
+					<prop oor:name="Target" oor:type="xs:string">
+						<value>_self</value>
+					</prop>
+					<prop oor:name="Context" oor:type="xs:string">
+						<value>com.sun.star.text.TextDocument</value>
+					</prop>
+				</node>
+				<node oor:name="m15" oor:op="replace">
+					<prop oor:name="URL" oor:type="xs:string">
+						<value>vnd.sun.star.script:HelpAuthoring.OtherElements.InsertGraphic?language=Basic&amp;location=application</value>
+					</prop>
+					<prop oor:name="Title" oor:type="xs:string">
+						<value/>
+						<value xml:lang="en-US">Insert Image </value>
+					</prop>
+					<prop oor:name="ImageIdentifier" oor:type="xs:string">
+						<value/>
+					</prop>
+					<prop oor:name="Target" oor:type="xs:string">
+						<value>_self</value>
+					</prop>
+					<prop oor:name="Context" oor:type="xs:string">
+						<value>com.sun.star.text.TextDocument</value>
+					</prop>
+				</node>
+				<node oor:name="m16" oor:op="replace">
+					<prop oor:name="URL" oor:type="xs:string">
+						<value>vnd.sun.star.script:HelpAuthoring.OtherElements.InsertSection?language=Basic&amp;location=application</value>
+					</prop>
+					<prop oor:name="Title" oor:type="xs:string">
+						<value/>
+						<value xml:lang="en-US">Insert Section </value>
+					</prop>
+					<prop oor:name="ImageIdentifier" oor:type="xs:string">
+						<value/>
+					</prop>
+					<prop oor:name="Target" oor:type="xs:string">
+						<value>_self</value>
+					</prop>
+					<prop oor:name="Context" oor:type="xs:string">
+						<value>com.sun.star.text.TextDocument</value>
+					</prop>
+				</node>
+				<node oor:name="m17" oor:op="replace">
+					<prop oor:name="URL" oor:type="xs:string">
+						<value>vnd.sun.star.script:HelpAuthoring.OtherElements.InsertVariable?language=Basic&amp;location=application</value>
+					</prop>
+					<prop oor:name="Title" oor:type="xs:string">
+						<value/>
+						<value xml:lang="en-US">Insert Variable </value>
+					</prop>
+					<prop oor:name="ImageIdentifier" oor:type="xs:string">
+						<value/>
+					</prop>
+					<prop oor:name="Target" oor:type="xs:string">
+						<value>_self</value>
+					</prop>
+					<prop oor:name="Context" oor:type="xs:string">
+						<value>com.sun.star.text.TextDocument</value>
+					</prop>
+				</node>
+				<node oor:name="m18" oor:op="replace">
+					<prop oor:name="URL" oor:type="xs:string">
+						<value>vnd.sun.star.script:HelpAuthoring.Embed.Main?language=Basic&amp;location=application</value>
+					</prop>
+					<prop oor:name="Title" oor:type="xs:string">
+						<value/>
+						<value xml:lang="en-US">Transclude (Embed) </value>
+					</prop>
+					<prop oor:name="ImageIdentifier" oor:type="xs:string">
+						<value/>
+					</prop>
+					<prop oor:name="Target" oor:type="xs:string">
+						<value>_self</value>
+					</prop>
+					<prop oor:name="Context" oor:type="xs:string">
+						<value>com.sun.star.text.TextDocument</value>
+					</prop>
+				</node>
+				<node oor:name="m19" oor:op="replace">
+					<prop oor:name="URL" oor:type="xs:string">
+						<value>vnd.sun.star.script:HelpAuthoring.OtherElements.InsertRelatedTopics?language=Basic&amp;location=application</value>
+					</prop>
+					<prop oor:name="Title" oor:type="xs:string">
+						<value/>
+						<value xml:lang="en-US">&quot;Related Topics&quot; Section </value>
+					</prop>
+					<prop oor:name="ImageIdentifier" oor:type="xs:string">
+						<value/>
+					</prop>
+					<prop oor:name="Target" oor:type="xs:string">
+						<value>_self</value>
+					</prop>
+					<prop oor:name="Context" oor:type="xs:string">
+						<value>com.sun.star.text.TextDocument</value>
+					</prop>
+				</node>
+			</node>
+		</node>
+		//-->
+	</node>
+</oor:component-data>

Added: incubator/ooo/trunk/main/helpauthoring/Filter.xcu
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/helpauthoring/Filter.xcu?rev=1172372&view=auto
==============================================================================
--- incubator/ooo/trunk/main/helpauthoring/Filter.xcu (added)
+++ incubator/ooo/trunk/main/helpauthoring/Filter.xcu Sun Sep 18 21:34:39 2011
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<oor:component-data xmlns:oor="http://openoffice.org/2001/registry" xmlns:xs="http://www.w3.org/2001/XMLSchema" oor:name="Filter" oor:package="org.openoffice.TypeDetection">
+ <node oor:name="Filters">
+  <node oor:name="XHP_Help" oor:op="replace">
+        <prop oor:name="UIComponent"/>
+        <prop oor:name="TemplateName"/>
+        <prop oor:name="FileFormatVersion"><value>0</value></prop>
+        <prop oor:name="Type"><value>XHP_Help</value></prop>
+        <prop oor:name="DocumentService"><value>com.sun.star.text.TextDocument</value></prop>
+        <prop oor:name="UserData"><value oor:separator=",">com.sun.star.documentconversion.XSLTFilter,,com.sun.star.comp.Writer.XMLOasisImporter,com.sun.star.comp.Writer.XMLOasisExporter,%origin%/filter/xmlhelp2soffice.xsl,%origin%/filter/soffice2xmlhelp.xsl,%origin%/filter/xmlhel.dtd,%origin%/filter/xmlhelptemplate.ott</value></prop>
+        <prop oor:name="FilterService"><value>com.sun.star.comp.Writer.XmlFilterAdaptor</value></prop>
+        <prop oor:name="UIName"><value>Help (xhp)</value></prop>
+        <prop oor:name="Flags"><value>IMPORT EXPORT ALIEN 3RDPARTYFILTER</value></prop>
+  </node>
+ </node>
+</oor:component-data>

Added: incubator/ooo/trunk/main/helpauthoring/HelpAuthoring/Comment.xba
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/helpauthoring/HelpAuthoring/Comment.xba?rev=1172372&view=auto
==============================================================================
--- incubator/ooo/trunk/main/helpauthoring/HelpAuthoring/Comment.xba (added)
+++ incubator/ooo/trunk/main/helpauthoring/HelpAuthoring/Comment.xba Sun Sep 18 21:34:39 2011
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
+<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Comment" script:language="StarBasic">&apos; *** MODULE COMMENT ***
+
+Dim oDialog AS Object
+Dim document AS Object
+
+&apos;=======================================================
+&apos; Main
+&apos;-------------------------------------------------------
+&apos; Inserts a comment
+&apos;=======================================================
+Sub Main
+
+	If not IsHelpFile Then
+		msgbox(strErr_NoHelpFile)
+		Exit Sub
+	End If
+
+	document = StarDesktop.CurrentComponent
+
+	BasicLibraries.LoadLibrary(&quot;HelpAuthoring&quot;)
+	oDialog = LoadDialog(&quot;HelpAuthoring&quot;, &quot;dlgComment&quot;)
+	oDialogModel = oDialog.Model
+	
+	if not IsHelpFile Then
+		msgbox(strErr_NoHelpFile)
+		Exit Sub
+	End If
+	
+	oTxtComment = oDialog.GetControl(&quot;txtComment&quot;)
+	
+	If oDialog.Execute() = 1 Then
+		oSel = thiscomponent.getcurrentcontroller.getselection
+		oCur = oSel(0).getText.createTextCursorByRange(oSel(0))
+		oCur.gotoStartOfParagraph(0)
+		oCur.gotoEndOfParagraph(1)
+		
+		If oCur.GetString = &quot;&quot; Then
+			SetParaStyle(&quot;hlp_aux_comment&quot;)
+		End If
+	
+		If oTxtComment.Text &lt;&gt; &quot;&quot; Then
+			InsertTag(&quot;COMMENT_&quot;,&quot;&lt;COMMENT&gt;&quot;)
+			SetCharStyle(&quot;hlp_aux_comment&quot;)
+			InsertTag(&quot;COMMENT&quot;,oTxtComment.Text)
+			InsertTag(&quot;_COMMENT&quot;,&quot;&lt;/COMMENT&gt;&quot;)
+		End If
+	End If
+
+	oDialog.dispose
+	
+End Sub
+	
+</script:module>
\ No newline at end of file

Added: incubator/ooo/trunk/main/helpauthoring/HelpAuthoring/Embed.xba
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/helpauthoring/HelpAuthoring/Embed.xba?rev=1172372&view=auto
==============================================================================
--- incubator/ooo/trunk/main/helpauthoring/HelpAuthoring/Embed.xba (added)
+++ incubator/ooo/trunk/main/helpauthoring/HelpAuthoring/Embed.xba Sun Sep 18 21:34:39 2011
@@ -0,0 +1,327 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
+<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Embed" script:language="StarBasic">&apos; *** MODULE EMBED ***
+
+Dim oDialog AS Object
+Dim oBrowseDialog As Object
+Dim document AS Object
+Dim arParas(0) As String
+Dim arSecs(0) As String
+Dim arVars(0) As String
+
+&apos;=======================================================
+&apos; Main
+&apos;-------------------------------------------------------
+&apos; Embeds a variable or a section
+&apos;=======================================================
+Sub Main(optional bCR As Boolean)
+
+	If not IsHelpFile Then
+		msgbox(strErr_NoHelpFile)
+		Exit Sub
+	End If
+
+	GlobalScope.BasicLibraries.loadLibrary(&quot;Tools&quot;)
+
+	document = StarDesktop.CurrentComponent
+
+	BasicLibraries.LoadLibrary(&quot;HelpAuthoring&quot;)
+	oDialog = LoadDialog(&quot;HelpAuthoring&quot;, &quot;dlgEmbed&quot;)
+	oDialogModel = oDialog.Model
+	
+	oTxtFilePath = oDialog.GetControl(&quot;txtFilePath&quot;)   		&apos; path to file, rel to Docroot
+	oTxtID = oDialog.GetControl(&quot;txtID&quot;) 					&apos; anchor
+	oTxtHidFName = oDialog.GetControl(&quot;txtHidFName&quot;)		&apos; pure filename
+	oOpVariable = oDialog.GetControl(&quot;opVariable&quot;)
+	oOpSection = oDialog.GetControl(&quot;opSection&quot;)
+	
+	DocRoot = ReadConfig(&quot;HelpPrefix&quot;)
+	EmbedFolder = ReadConfig(&quot;LastEmbedDir&quot;)
+	EmbedFile = ReadConfig(&quot;LastEmbedFile&quot;)
+	EmbedID = ReadConfig(&quot;LastEmbedAnchor&quot;)
+	EmbedType = ReadConfig(&quot;LastEmbedType&quot;)
+	If EmbedType = &quot;Variable&quot; Then
+		oOpVariable.State = TRUE
+	Else
+		oOpVariable.State = FALSE
+	End If
+	SetLabel
+	
+	If IsSubDir(EmbedFolder,DocRoot) Then
+		RelDir = Right(EmbedFolder,Len(EmbedFolder)-Len(DocRoot))
+		If Dir(DocRoot+RelDir+EmbedFile) &gt; &quot;&quot; Then
+			oTxtFilePath.Text = RelDir+EmbedFile
+			oTxtHidFName.Text = DocRoot+RelDir+EmbedFile
+			oTxtID.Text = EmbedID
+		End If
+	End If
+
+
+	GoForIt = 1
+
+	If (oDialog.Execute() = 1 AND oTxtFilePath.Text &lt;&gt; &quot;&quot;) Then
+&apos;		msgbox (oTxtFilePath.Text)
+
+		If oTxtID.Text = &quot;&quot; Then
+			msgbox &quot;You did not specify a section or variable to embed.&quot;,256
+		Else
+			WriteConfig(&quot;LastEmbedAnchor&quot;,oTxtID.Text)
+			If oOpVariable.State Then
+				txtEmbed = oTxtFilePath.Text + &quot;#&quot; + oTxtID.Text
+				InsertTag(&quot;EMBEDVAR&quot;,&quot;&lt;EMBEDVAR var=&quot;&quot;&quot; + txtEmbed + &quot;&quot;&quot;&gt;&quot;,&quot;hlp_aux_tag&quot;)
+				SetCharStyle(&quot;Default&quot;)
+				WriteConfig(&quot;LastEmbedType&quot;,&quot;Variable&quot;)
+			Else
+				txtEmbed = oTxtFilePath.Text + &quot;#&quot; + oTxtID.Text
+				CR
+				SetParaStyle(&quot;hlp_aux_embed&quot;)
+				SetCharStyle(&quot;hlp_aux_tag&quot;)
+				InsertTag(&quot;EMBED&quot;,&quot;&lt;EMBED href=&quot;&quot;&quot; + txtEmbed + &quot;&quot;&quot;&gt;&quot;,&quot;hlp_aux_tag&quot;)
+				CR
+				WriteConfig(&quot;LastEmbedType&quot;,&quot;Section&quot;)
+			End If
+		End If
+	End If
+	oDialog.dispose
+End Sub
+
+&apos;=======================================================
+&apos; SetLabel
+&apos;-------------------------------------------------------
+&apos; Changes the text field label in the dialog
+&apos;=======================================================
+Sub SetLabel
+	olblID = oDialog.GetControl(&quot;lblID&quot;)
+	oOpVariable = oDialog.GetControl(&quot;opVariable&quot;)
+	If oOpVariable.getState Then
+		olblID.setText(&quot;Variable ID&quot;)
+		oDialog.Title = &quot;Embed Variable&quot;
+	Else
+		olblID.setText(&quot;Section or Paragraph ID&quot;)
+		oDialog.Title = &quot;Embed Section&quot;
+	End If
+End Sub
+
+Sub GetFile
+Dim ListAny(0) as Long
+	ListAny(0) = com.sun.star.ui.dialogs.TemplateDescription.FILEOPEN_SIMPLE
+	oFileDialog = CreateUnoService(&quot;com.sun.star.ui.dialogs.FilePicker&quot;)
+	oFileDialog.Initialize(ListAny())
+	
+	DocRoot = ReadConfig(&quot;HelpPrefix&quot;)
+	sLastEmbedDir = ReadConfig(&quot;LastEmbedDir&quot;)
+	sLastEmbedFile = ReadConfig(&quot;LastEmbedFile&quot;)
+	
+	If IsSubDir(sLastEmbedDir,DocRoot) Then
+		oFileDialog.setDisplayDirectory(sLastEmbedDir)
+		If sLastEmbedFile &lt;&gt; &quot;&quot; AND Dir(sLastEmbedDir+sLastEmbedFile) &gt; &quot;&quot; Then
+			oFileDialog.setDefaultName(sLastEmbedFile)
+		End If
+	Else
+		oFileDialog.setDisplayDirectory(DocRoot)
+	End If
+	
+	oMasterKey = GetRegistryKeyContent(&quot;org.openoffice.TypeDetection.Types/&quot;)
+	oTypes() = oMasterKey.Types
+	oFileDialog.AppendFilter(&quot;Help&quot;, &quot;*.xhp&quot;)
+
+	oFileDialog.SetTitle(&quot;Embed From Help File&quot;)
+	iAccept = oFileDialog.Execute()
+	If iAccept = 1 Then
+		sPath = oFileDialog.Files(0)  
+		sCurDir = oFileDialog.getDisplayDirectory +&quot;/&quot;
+		WriteConfig(&quot;LastEmbedDir&quot;,sCurDir)
+		LastFile = Right(sPath, Len(sPath) - Len(sCurDir))
+		WriteConfig(&quot;LastEmbedFile&quot;,LastFile)
+
+		oTxtPath = oDialog.GetControl(&quot;txtFilePath&quot;)		
+		oTxtHidFName = oDialog.GetControl(&quot;txtHidFName&quot;)		
+		oTxtHidFName.Text = sPath
+		
+		If IsSubDir(sCurDir,DocRoot) Then
+			oTxtPath.Text = GetRelPath(sPath, DocRoot)
+		Else
+			oTxtPath.Text = sPath
+			msgbox(&quot;File is outside of your Document Root&quot;,48,&quot;Warning&quot;)
+		End If
+		
+		oButBrowseIDs = oDialog.GetControl(&quot;butBrowseIDs&quot;)
+		oButBrowseIDs.Enable = true
+	End If
+
+End Sub
+
+Sub UpdateFileName
+	oTxtPath = oDialog.GetControl(&quot;txtFilePath&quot;)
+	ShortFName = oTxtPath.Text
+	
+	If ShortFName &gt; &quot;&quot; Then
+
+		oTxtHidFName = oDialog.GetControl(&quot;txtHidFName&quot;)
+		FName = oTxtHidFName.Text
+
+		If Right(FName, Len(ShortFName)) &lt;&gt; ShortFName Then
+		&apos;	oTxtHidFName.Text = MakeAbsPath(ShortFName)
+			oTxtHidFName.Text = ShortFName
+		End If
+	
+		oButBrowseIDs = oDialog.GetControl(&quot;butBrowseIDs&quot;)		
+		If not(FileExists(oTxtHidFName.Text)) Then
+			msgbox oTxtHidFName.Text+&quot; cannot be found.&quot;,48,&quot;D&apos;oh!&quot;
+			oButBrowseIDs.Enable = false
+		Else
+			oButBrowseIDs.Enable = true
+		End If
+	End If
+End Sub
+
+Sub BrowseEmbed
+	BasicLibraries.LoadLibrary(&quot;HelpAuthoring&quot;)
+	oBrowseDialog = LoadDialog(&quot;HelpAuthoring&quot;, &quot;dlg_BrowseEmbed&quot;)
+	oOpVariable = oDialog.GetControl(&quot;opVariable&quot;)
+	oTxtPath = oDialog.GetControl(&quot;txtFilePath&quot;)
+	oTxtHidFName = oDialog.GetControl(&quot;txtHidFName&quot;)
+	filename = oTxtHidFName.Text
+	
+	ReDim arParas(0)
+	ReDim arVars(0)
+	ReDim arSecs(0)
+	
+&apos;	msgbox(filename)
+	
+	iNumber = Freefile
+	If FileExists(filename) Then
+		Dim arLines(0) As String
+		Open filename For Input As iNumber
+		Do While (not eof(iNumber))
+			Line Input #iNumber, sLine
+			sDim = ubound(arLines())+1
+			ReDim Preserve arLines(sDim)
+			arLines(sDim) = sLine
+		Loop
+		Close #iNumber
+		sContent = join(arLines(),&quot; &quot;)
+		
+		arTmp() = split(sContent,&quot;&lt;paragraph&quot;)
+		For n=1 to ubound(arTmp())
+			If arTmp(n) &lt;&gt; &quot;&quot; Then
+				arTmp(n) = Right(arTmp(n),Len(arTmp(n))-Instr(arTmp(n),&quot;id=&quot;)-3)
+				sId = Left(arTmp(n),Instr(arTmp(n),&quot;&quot;&quot;&quot;)-1)
+				arTmp(n) = Right(arTmp(n),Len(arTmp(n))-Instr(arTmp(n),&quot;&gt;&quot;))
+				arTmp(n) = Left(arTmp(n),Instr(arTmp(n),&quot;&lt;/paragraph&gt;&quot;)-1)
+				If Len(arTmp(n) &gt; 100) Then
+					arTmp(n) = Left(arTmp(n),100)+&quot;...&quot;
+				End If
+				sDim = ubound(arParas())
+				arParas(sDim) = sId+&quot;: &quot;+arTmp(n)
+				sDim = ubound(arParas())+1
+				ReDim Preserve arParas(sDim)
+			End If
+		Next n
+
+		arTmp() = split(sContent,&quot;&lt;section&quot;)
+		For n=1 to ubound(arTmp())
+			If arTmp(n) &lt;&gt; &quot;&quot; Then
+				arTmp(n) = Right(arTmp(n),Len(arTmp(n))-Instr(arTmp(n),&quot;id=&quot;)-3)
+				sId = Left(arTmp(n),Instr(arTmp(n),&quot;&quot;&quot;&quot;)-1)
+				arTmp(n) = Right(arTmp(n),Len(arTmp(n))-Instr(arTmp(n),&quot;&gt;&quot;))
+				If Instr(arTmp(n),&quot;&lt;/section&gt;&quot;)&gt;0 Then
+					arTmp(n) = Left(arTmp(n),Instr(arTmp(n),&quot;&lt;/section&gt;&quot;)-1)
+				End If
+				If Len(arTmp(n) &gt; 100) Then
+					arTmp(n) = Left(arTmp(n),100)+&quot;...&quot;
+				End If
+				sDim = ubound(arSecs())
+				arSecs(sDim) = sId+&quot;: &quot;+arTmp(n)
+				sDim = ubound(arSecs())+1
+				ReDim Preserve arSecs(sDim)
+			End If
+		Next n
+
+		arTmp() = split(sContent,&quot;&lt;variable&quot;)
+		For n=1 to ubound(arTmp())
+			If arTmp(n) &lt;&gt; &quot;&quot; Then
+				arTmp(n) = Right(arTmp(n),Len(arTmp(n))-Instr(arTmp(n),&quot;id=&quot;)-3)
+				sId = Left(arTmp(n),Instr(arTmp(n),&quot;&quot;&quot;&quot;)-1)
+				arTmp(n) = Right(arTmp(n),Len(arTmp(n))-Instr(arTmp(n),&quot;&gt;&quot;))
+				arTmp(n) = Left(arTmp(n),Instr(arTmp(n),&quot;&lt;/variable&gt;&quot;)-1)
+				If Len(arTmp(n) &gt; 100) Then
+					arTmp(n) = Left(arTmp(n),100)+&quot;...&quot;
+				End If
+				sDim = ubound(arVars())
+				arVars(sDim) = sId+&quot;: &quot;+arTmp(n)
+				sDim = ubound(arVars())+1
+				ReDim Preserve arVars(sDim)
+			End If
+		Next n
+	
+		ShowSecs
+			
+		If oBrowseDialog.Execute() = 1 Then
+			olbElements = oBrowseDialog.GetControl(&quot;lbElements&quot;)
+			sSelected = olbElements.SelectedItem
+			sSelected = Left(sSelected,Instr(sSelected,&quot;:&quot;)-1)
+			oTxtID = oDialog.GetControl(&quot;txtID&quot;)
+			oTxtID.Text = sSelected
+		End If	
+	Else
+		msgbox &quot;Cannot open &quot;+filename,48,&quot;Error&quot;
+	End If	
+End Sub
+
+Sub UpdateLIst
+	oOpSections = oBrowseDialog.GetControl(&quot;opSections&quot;)
+	oOpVariables = oBrowseDialog.GetControl(&quot;opVariables&quot;)
+	oOpParas = oBrowseDialog.GetControl(&quot;opParas&quot;)
+	If oOpSections.getState Then
+		ShowSecs
+	ElseIf oOpVariables.getState Then
+		ShowVars
+	ElseIf oOpParas.getState Then
+		ShowParas
+	End If
+End Sub
+
+Sub ShowSecs
+	olbElements = oBrowseDialog.GetControl(&quot;lbElements&quot;)
+	olbElements.RemoveItems(0,olbElements.ItemCount)
+	olbElements.AddItems(arSecs(),ubound(arSecs()))
+	oOpSection = oDialog.GetControl(&quot;opSection&quot;)
+	oOpSection.setState(TRUE)
+	SetLabel
+End Sub
+
+Sub ShowVars
+	olbElements = oBrowseDialog.GetControl(&quot;lbElements&quot;)
+	olbElements.RemoveItems(0,olbElements.ItemCount)
+	olbElements.AddItems(arVars(),ubound(arVars()))
+	oOpVariable = oDialog.GetControl(&quot;opVariable&quot;)
+	oOpVariable.setState(TRUE)
+	SetLabel
+End Sub
+
+Sub ShowParas
+	olbElements = oBrowseDialog.GetControl(&quot;lbElements&quot;)
+	olbElements.RemoveItems(0,olbElements.ItemCount)
+	olbElements.AddItems(arParas(),ubound(arParas()))
+	oOpVariable = oDialog.GetControl(&quot;opSection&quot;)
+	oOpVariable.setState(TRUE)
+	SetLabel
+End Sub
+
+Sub CheckButton
+	olbElements = oBrowseDialog.GetControl(&quot;lbElements&quot;)
+	obutSelect = oBrowseDialog.GetControl(&quot;butSelect&quot;)
+	sSelected = olbElements.SelectedItem
+	If sSelected = &quot;&quot; Then
+		oButSelect.enable = false
+	Else
+		oButSelect.enable = true	
+	End If
+End Sub
+
+
+Function IsSubDir(D as String, R as String)
+	 IsSubDir = (Left(D,Len(R)) = R)
+End Function
+</script:module>
\ No newline at end of file

Added: incubator/ooo/trunk/main/helpauthoring/HelpAuthoring/Find.xba
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/helpauthoring/HelpAuthoring/Find.xba?rev=1172372&view=auto
==============================================================================
--- incubator/ooo/trunk/main/helpauthoring/HelpAuthoring/Find.xba (added)
+++ incubator/ooo/trunk/main/helpauthoring/HelpAuthoring/Find.xba Sun Sep 18 21:34:39 2011
@@ -0,0 +1,149 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
+<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Find" script:language="StarBasic">&apos; *** MODULE FIND ***
+
+Dim oDialog AS Object
+Dim document AS Object
+Dim Found(0) As Object
+Dim nPos As Integer
+
+&apos;=======================================================
+&apos; Main
+&apos;-------------------------------------------------------
+&apos; Calls the Find routine to search in fields
+&apos;=======================================================
+Sub Main
+
+	If not IsHelpFile Then
+		msgbox(strErr_NoHelpFile)
+		Exit Sub
+	End If
+
+	BasicLibraries.LoadLibrary(&quot;HelpAuthoring&quot;)
+	oDialog = LoadDialog(&quot;HelpAuthoring&quot;, &quot;dlgFind&quot;)
+		
+	oDoc = StarDesktop.CurrentComponent
+	Enum = oDoc.Text.createEnumeration
+
+	LastSearchTerm = ReadConfig(&quot;SearchTerm&quot;)
+	If LastSearchTerm &lt;&gt; &quot;&quot; Then
+		oTxtFind = oDialog.GetControl(&quot;txtFind&quot;)
+		oTxtFind.Text = LastSearchTerm
+	End If
+
+	If oDialog.execute() = 1 Then
+		oTxtFind = oDialog.GetControl(&quot;txtFind&quot;)
+		sFind = oTxtFind.Text
+		WriteConfig(&quot;SearchTerm&quot;,sFind)
+	
+		Do While Enum.hasMoreElements
+			TE = Enum.nextElement
+			If TE.supportsService(&quot;com.sun.star.text.Paragraph&quot;) Then
+				TP = TE.createEnumeration
+				While TP.hasmoreElements
+					TPE = TP.nextElement
+					If TPE.supportsService(&quot;com.sun.star.text.TextField&quot;) Then
+						If Instr(TPE.String, sFind) Then
+							sDim = ubound(Found())+1
+							Redim Preserve Found(sDim) As Object
+							Found(sDim) = TPE.TextField.getAnchor.getText.createTextCursorbyRange(TPE.TextField.getAnchor)
+						End If
+					End If
+				Wend
+			ElseIf TE.supportsService(&quot;com.sun.star.text.TextTable&quot;) Then
+				CellName = &quot;A1&quot;
+				Cell = TE.getCellByName(CellName)
+				tmpCellEnum = Cell.createEnumeration
+				tmpCellElement = tmpCellEnum.nextElement
+	
+				Rows = TE.getRows
+				Cols = TE.getColumns
+
+				For RowIndex = 1 to Rows.getCount()
+					For ColIndex = 1 to Cols.getCount()
+						CellName = Chr(64 + ColIndex) &amp; RowIndex
+						Cell = TE.getCellByName(CellName)
+						CellEnum = Cell.createEnumeration
+
+						Do While CellEnum.hasMoreElements
+
+							CellElement = CellEnum.nextElement
+
+							If CellElement.supportsService(&quot;com.sun.star.text.Paragraph&quot;) Then
+								TP = CellElement.createEnumeration
+								While TP.hasmoreElements
+									TPE = TP.nextElement
+									If TPE.supportsService(&quot;com.sun.star.text.TextField&quot;) Then
+										If Instr(TPE.String, sFind) Then
+											sDim = ubound(Found())+1
+											Redim Preserve Found(sDim) As Object
+											Found(sDim) = TPE.TextField.getAnchor.getText.createTextCursorbyRange(TPE.TextField.getAnchor)
+										End If
+									End If
+								Wend
+							EndIf
+
+						Loop
+			
+					Next
+				Next
+
+			EndIf
+		Loop
+
+		If ubound(Found()) &lt; 1 	Then
+			msgbox &quot;Nothing found&quot;			
+		ElseIf ubound(Found()) &gt; 1 	Then
+			nPos = 1
+			thiscomponent.getcurrentcontroller.select(Found(1))
+			oDialog = LoadDialog(&quot;HelpAuthoring&quot;, &quot;dlgRepeatFind&quot;)
+			oPrev = oDialog.GetControl(&quot;butPrev&quot;)
+			oPrev.Enable = FALSE
+			oDialog.Execute()
+		Else
+			thiscomponent.getcurrentcontroller.select(Found(1))
+		End If
+	End If
+End Sub
+
+&apos;=======================================================
+&apos; FindNext
+&apos;-------------------------------------------------------
+&apos; Goes to the next search result position.
+&apos;=======================================================
+Sub FindNext
+	If nPos &lt; ubound(Found()) Then
+		nPos = nPos + 1
+		thiscomponent.getcurrentcontroller.select(Found(nPos))
+		If nPos = ubound(Found()) Then
+			oNext = oDialog.GetControl(&quot;butNext&quot;)
+			oNext.Enable = FALSE
+		End If
+		If nPos &gt; 1 Then
+			oPrev = oDialog.GetControl(&quot;butPrev&quot;)
+			oPrev.Enable = TRUE
+		End If
+	End If
+End Sub
+
+&apos;=======================================================
+&apos; FindPrev
+&apos;-------------------------------------------------------
+&apos; Goes to the previous search result position.
+&apos;=======================================================
+Sub FindPrev
+	If nPos &gt; 1 Then
+		nPos = nPos - 1
+		thiscomponent.getcurrentcontroller.select(Found(nPos))
+		If nPos = 1 Then
+			oPrev = oDialog.GetControl(&quot;butPrev&quot;)
+			oPrev.Enable = FALSE
+		End If
+		If nPos &lt; ubound(Found()) Then
+			oNext = oDialog.GetControl(&quot;butNext&quot;)
+			oNext.Enable = TRUE
+		End If
+	End If
+End Sub
+
+</script:module>
\ No newline at end of file

Added: incubator/ooo/trunk/main/helpauthoring/HelpAuthoring/HID.xba
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/helpauthoring/HelpAuthoring/HID.xba?rev=1172372&view=auto
==============================================================================
--- incubator/ooo/trunk/main/helpauthoring/HelpAuthoring/HID.xba (added)
+++ incubator/ooo/trunk/main/helpauthoring/HelpAuthoring/HID.xba Sun Sep 18 21:34:39 2011
@@ -0,0 +1,113 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
+<script:module xmlns:script="http://openoffice.org/2000/script" script:name="HID" script:language="StarBasic">&apos; *** MODULE HID ***
+
+Dim oDialog AS Object
+Dim document AS Object
+
+Sub Main
+
+	If not IsHelpFile Then
+		msgbox(strErr_NoHelpFile)
+		Exit Sub
+	End If
+
+	document = StarDesktop.CurrentComponent
+
+	BasicLibraries.LoadLibrary(&quot;HelpAuthoring&quot;)
+	oDialog = LoadDialog(&quot;HelpAuthoring&quot;, &quot;dlgHID&quot;)
+	oDialogModel = oDialog.Model
+	
+&apos;	oPath = createUNOService(&quot;com.sun.star.util.PathSettings&quot;)	
+&apos;	filename = oPath.UserConfig+&quot;/help_hid.lst&quot;
+&apos;	oButHIDList = oDialog.GetControl(&quot;butHIDList&quot;)
+&apos;	If FileExists(filename) Then
+&apos;		oButHIDList.Enable = true
+&apos;	Else
+&apos;		oLblWait = oDialog.GetControl(&quot;lblWait&quot;)
+&apos;		oLblWait.Text = &quot;No hid list found in your config folder&quot;
+&apos;		oButHIDList.Enable = false
+&apos;	End If
+	oTxtHID = oDialog.GetControl(&quot;txtHID&quot;)
+	
+	&apos; Check if bookmarks are allowed here
+	If IsInList Then
+		msgbox &quot;No Bookmarks allowed inside a list.&quot;, 48, &quot;D&apos;oh!&quot;
+		Exit Sub
+	End If
+	
+	&apos; Find out if we are in front of an existing HID
+	If oDialog.Execute() = 1 Then
+	
+		If oTxtHID.Text = &quot;&quot; Then
+			msgbox &quot;Empty Help ID. No Help ID element added.&quot;
+		Else
+			If IsInBookmark &gt; 0 or Not(ParaIsEmpty) Then
+				CR
+			End If
+			If not(join(split(oTxtHID.Text,&quot; &quot;),&quot;&quot;) = oTxtHID.Text) Then
+&apos;				msgbox &quot;Help ID seems to contain forbidden characters (like spaces). You may need to verify this.&quot;
+&apos;               HID and uno command
+				arHID = split(oTxtHID.Text,&quot; &quot;)
+				sHID = arHID(0)
+				sUNO = arHID(1)
+			Else
+				sHID = oTxtHID.Text
+				sUNO = &quot;&quot;
+			End If
+			
+			If sHID &lt;&gt; &quot;&quot; Then
+				bmid = CreateID
+				InsertTagCR(&quot;BOOKMARK&quot;,&quot;&lt;BOOKMARK branch=&quot;&quot;hid/&quot; + sHID + &quot;&quot;&quot; id=&quot;&quot;bm_id&quot; + bmid + &quot;&quot;&quot; localize=&quot;&quot;false&quot;&quot;/&gt;&quot;,&quot;hlp_aux_bookmark&quot;)
+			End If
+			If sUNO &lt;&gt; &quot;&quot; Then
+				bmid = CreateID
+				InsertTagCR(&quot;BOOKMARK&quot;,&quot;&lt;BOOKMARK branch=&quot;&quot;hid/&quot; + sUNO + &quot;&quot;&quot; id=&quot;&quot;bm_id&quot; + bmid + &quot;&quot;&quot; localize=&quot;&quot;false&quot;&quot;/&gt;&quot;,&quot;hlp_aux_bookmark&quot;)
+			End If
+			
+		End If
+	End If
+	oDialog.dispose
+
+End Sub
+
+Sub ConvertToSymbol
+	oPath = createUNOService(&quot;com.sun.star.util.PathSettings&quot;)	
+	filename = oPath.UserConfig+&quot;/help_hid.lst&quot;
+	oTxtHID = oDialog.GetControl(&quot;txtHID&quot;)
+	oButHIDList = oDialog.GetControl(&quot;butHIDList&quot;)
+	sHID = oTxtHID.Text
+	sCt = 0
+	If FileExists(filename) AND sHID &lt;&gt; &quot;&quot; Then
+		oLblWait = oDialog.GetControl(&quot;lblWait&quot;)
+		oLblWait.Text = &quot;Searching help_hid.lst. Please wait...&quot;
+		iNumber = Freefile
+		bFound = false
+		Open filename For Input As iNumber
+		Do While (not eof(iNumber) AND not(bFound))
+			Line Input #iNumber, sLine
+			sCt = sCt+1
+			arHID = split(sLine,&quot;,&quot;)
+			If arHID(1) = sHID Then
+				If arHID(2) &lt;&gt; &quot;&quot; Then
+					symHID = arHID(0) + &quot; &quot; + arHID(2)
+				Else
+					symHID = arHID(0)
+				End If
+				bFound = true	
+			End If
+		Loop
+		Close #iNumber
+		If not bFound Then
+			oLblWait.Text = &quot;Nothing found. Searched &quot;+sCt+&quot; Help IDs&quot;
+		Else
+			oTxtHID.Text = symHID
+			oLblWait.Text = &quot;HelpID found. Searched &quot;+sCt+&quot; Help IDs&quot;
+			oButHIDList.Enable = false
+		End If
+	Else
+		oLblWait.Text = &quot;No help_hid.lst found in your config folder&quot;
+	End If
+End Sub
+
+</script:module>
\ No newline at end of file



Mime
View raw message