summaryrefslogtreecommitdiff
path: root/scripting
diff options
context:
space:
mode:
authorneilm <neilm@openoffice.org>2002-11-13 09:57:31 +0000
committerneilm <neilm@openoffice.org>2002-11-13 09:57:31 +0000
commit409218d48d9d11536f9194429a37c5fee8a67940 (patch)
treecd13309ea14c33611b1cfa2fa3de6dc8d9f4ae59 /scripting
parentdda139f5bfea962fcb2d48ee7c0d305dbfa51169 (diff)
Initial Import of Binding Dialog files to binding/ directory
Diffstat (limited to 'scripting')
-rw-r--r--scripting/workben/bindings/HelpBinding.xdl15
-rw-r--r--scripting/workben/bindings/KeyBinding.xdl37
-rw-r--r--scripting/workben/bindings/MenuBinding.xdl42
-rw-r--r--scripting/workben/bindings/ScriptBinding.xba839
-rw-r--r--scripting/workben/bindings/calckeybinding.xml90
-rw-r--r--scripting/workben/bindings/calcmenubar.xml306
-rw-r--r--scripting/workben/bindings/dialog.xlb7
-rw-r--r--scripting/workben/bindings/script.xlb5
-rw-r--r--scripting/workben/bindings/writerkeybinding.xml95
-rw-r--r--scripting/workben/bindings/writermenubar.xml275
10 files changed, 1711 insertions, 0 deletions
diff --git a/scripting/workben/bindings/HelpBinding.xdl b/scripting/workben/bindings/HelpBinding.xdl
new file mode 100644
index 000000000000..47e61f76d343
--- /dev/null
+++ b/scripting/workben/bindings/HelpBinding.xdl
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE dlg:window PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "dialog.dtd">
+<dlg:window xmlns:dlg="http://openoffice.org/2000/dialog" xmlns:script="http://openoffice.org/2000/script" dlg:id="HelpBinding" dlg:left="100" dlg:top="130" dlg:width="198" dlg:height="151" dlg:closeable="true" dlg:moveable="true" dlg:title="Office Help - Help about the Assign Script (Java) Dialog">
+ <dlg:bulletinboard>
+ <dlg:text dlg:id="Label2" dlg:tab-index="0" dlg:left="7" dlg:top="7" dlg:width="179" dlg:height="12" dlg:value="Integrated Help For Scripting Framework is not currently available." dlg:multiline="true"/>
+ <dlg:text dlg:id="Label1" dlg:tab-index="1" dlg:left="11" dlg:top="32" dlg:width="168" dlg:height="17" dlg:value="Assign Script (Java) Dialog allows you to bind a script written in Java to a menu or key event in Office." dlg:multiline="true"/>
+ <dlg:text dlg:id="Label3" dlg:tab-index="2" dlg:left="11" dlg:top="52" dlg:width="168" dlg:height="32" dlg:value="For menu bindings select the script function, type in your new menu label, choose the menu to insert after and click OK. To delete an existing binding select the menu item and click Delete." dlg:multiline="true"/>
+ <dlg:titledbox dlg:id="FrameControl1" dlg:tab-index="3" dlg:left="5" dlg:top="28" dlg:width="182" dlg:height="99"/>
+ <dlg:text dlg:id="Label4" dlg:tab-index="4" dlg:left="11" dlg:top="86" dlg:width="169" dlg:height="25" dlg:value="For key bindings select the script function, choose an available key combination and click OK. To delete an existing binding select the key combination and click Delete." dlg:multiline="true"/>
+ <dlg:text dlg:id="Label5" dlg:tab-index="5" dlg:left="11" dlg:top="114" dlg:width="169" dlg:height="9" dlg:value="Office must be restarted for the changes to take effect" dlg:multiline="true"/>
+ <dlg:button dlg:id="HelpOKButton" dlg:tab-index="6" dlg:left="144" dlg:top="132" dlg:width="36" dlg:height="13" dlg:value="OK">
+ <script:event script:event-name="on-performaction" script:location="application" script:macro-name="ScriptBindingLibrary.ScriptBinding.HelpOKButton" script:language="StarBasic"/>
+ </dlg:button>
+ </dlg:bulletinboard>
+</dlg:window> \ No newline at end of file
diff --git a/scripting/workben/bindings/KeyBinding.xdl b/scripting/workben/bindings/KeyBinding.xdl
new file mode 100644
index 000000000000..0a3dbafe8546
--- /dev/null
+++ b/scripting/workben/bindings/KeyBinding.xdl
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE dlg:window PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "dialog.dtd">
+<dlg:window xmlns:dlg="http://openoffice.org/2000/dialog" xmlns:script="http://openoffice.org/2000/script" dlg:id="KeyBindingDialog" dlg:left="70" dlg:top="83" dlg:width="229" dlg:height="236" dlg:closeable="true" dlg:moveable="true" dlg:title="Assign Script (Java) To Key">
+ <dlg:bulletinboard>
+ <dlg:menulist dlg:id="ScriptList" dlg:tab-index="0" dlg:left="62" dlg:top="20" dlg:width="150" dlg:height="55"/>
+ <dlg:fixedline dlg:id="FixedLine1" dlg:tab-index="1" dlg:left="65" dlg:top="8" dlg:width="157" dlg:height="7"/>
+ <dlg:text dlg:id="Label1" dlg:tab-index="2" dlg:left="7" dlg:top="7" dlg:width="57" dlg:height="9" dlg:value="Select script function"/>
+ <dlg:button dlg:id="Help" dlg:tab-index="3" dlg:left="182" dlg:top="218" dlg:width="36" dlg:height="13" dlg:value="Help">
+ <script:event script:event-name="on-performaction" script:location="application" script:macro-name="ScriptBindingLibrary.ScriptBinding.KeyHelpButton" script:language="StarBasic"/>
+ </dlg:button>
+ <dlg:button dlg:id="Cancel" dlg:tab-index="4" dlg:left="143" dlg:top="218" dlg:width="36" dlg:height="13" dlg:value="Cancel">
+ <script:event script:event-name="on-performaction" script:location="application" script:macro-name="ScriptBindingLibrary.ScriptBinding.KeyCancelButton" script:language="StarBasic"/>
+ </dlg:button>
+ <dlg:button dlg:id="OK" dlg:tab-index="5" dlg:left="104" dlg:top="218" dlg:width="36" dlg:height="13" dlg:value="OK">
+ <script:event script:event-name="on-performaction" script:location="application" script:macro-name="ScriptBindingLibrary.ScriptBinding.KeyOKButton" script:language="StarBasic"/>
+ </dlg:button>
+ <dlg:fixedline dlg:id="FixedLine3" dlg:tab-index="6" dlg:left="94" dlg:top="86" dlg:width="129" dlg:height="5"/>
+ <dlg:text dlg:id="Label4" dlg:tab-index="7" dlg:left="7" dlg:top="84" dlg:width="88" dlg:height="10" dlg:value="Choose shortcut key to assign to"/>
+ <dlg:menulist dlg:id="KeyList" dlg:tab-index="8" dlg:left="62" dlg:top="114" dlg:width="150" dlg:height="40">
+ <script:event script:event-name="on-itemstatechange" script:location="application" script:macro-name="ScriptBindingLibrary.ScriptBinding.KeyListListener" script:language="StarBasic"/>
+ </dlg:menulist>
+ <dlg:text dlg:id="Label6" dlg:tab-index="9" dlg:left="17" dlg:top="118" dlg:width="42" dlg:height="10" dlg:value="Shortcut Key"/>
+ <dlg:fixedline dlg:id="FixedLine4" dlg:tab-index="10" dlg:left="2" dlg:top="209" dlg:width="223" dlg:height="6"/>
+ <dlg:combobox dlg:id="KeyCombo" dlg:tab-index="11" dlg:left="62" dlg:top="97" dlg:width="150" dlg:height="12" dlg:spin="true">
+ <script:event script:event-name="on-itemstatechange" script:location="application" script:macro-name="ScriptBindingLibrary.ScriptBinding.KeyComboListener" script:language="StarBasic"/>
+ </dlg:combobox>
+ <dlg:text dlg:id="Label3" dlg:tab-index="12" dlg:left="17" dlg:top="97" dlg:width="42" dlg:height="10" dlg:value="Key Group"/>
+ <dlg:button dlg:id="Delete" dlg:tab-index="13" dlg:left="158" dlg:top="159" dlg:width="53" dlg:height="13" dlg:value="Delete Script Key">
+ <script:event script:event-name="on-performaction" script:location="application" script:macro-name="ScriptBindingLibrary.ScriptBinding.KeyDeleteButton" script:language="StarBasic"/>
+ </dlg:button>
+ <dlg:button dlg:id="NewButton" dlg:tab-index="14" dlg:left="158" dlg:top="188" dlg:width="53" dlg:height="13" dlg:value="New Script Key">
+ <script:event script:event-name="on-performaction" script:location="application" script:macro-name="ScriptBindingLibrary.ScriptBinding.KeyNewButton" script:language="StarBasic"/>
+ </dlg:button>
+ <dlg:fixedline dlg:id="FixedLine2" dlg:tab-index="15" dlg:left="82" dlg:top="178" dlg:width="139" dlg:height="5"/>
+ <dlg:text dlg:id="Label2" dlg:tab-index="16" dlg:left="5" dlg:top="176" dlg:width="75" dlg:height="10" dlg:value="Assign script to shortcut key"/>
+ </dlg:bulletinboard>
+</dlg:window> \ No newline at end of file
diff --git a/scripting/workben/bindings/MenuBinding.xdl b/scripting/workben/bindings/MenuBinding.xdl
new file mode 100644
index 000000000000..fa9abf526d83
--- /dev/null
+++ b/scripting/workben/bindings/MenuBinding.xdl
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE dlg:window PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "dialog.dtd">
+<dlg:window xmlns:dlg="http://openoffice.org/2000/dialog" xmlns:script="http://openoffice.org/2000/script" dlg:id="MenuBindingDialog" dlg:left="67" dlg:top="87" dlg:width="217" dlg:height="234" dlg:closeable="true" dlg:moveable="true" dlg:title="Assign Script (Java) To Menu">
+ <dlg:bulletinboard>
+ <dlg:menulist dlg:id="ScriptList" dlg:tab-index="0" dlg:left="55" dlg:top="16" dlg:width="150" dlg:height="47"/>
+ <dlg:fixedline dlg:id="FixedLine1" dlg:tab-index="1" dlg:left="67" dlg:top="6" dlg:width="143" dlg:height="6"/>
+ <dlg:text dlg:id="Label1" dlg:tab-index="2" dlg:left="8" dlg:top="5" dlg:width="58" dlg:height="8" dlg:value="Select script function"/>
+ <dlg:button dlg:id="Help" dlg:tab-index="3" dlg:left="173" dlg:top="216" dlg:width="36" dlg:height="13" dlg:value="Help">
+ <script:event script:event-name="on-performaction" script:location="application" script:macro-name="ScriptBindingLibrary.ScriptBinding.MenuHelpButton" script:language="StarBasic"/>
+ </dlg:button>
+ <dlg:fixedline dlg:id="FixedLine2" dlg:tab-index="4" dlg:left="5" dlg:top="207" dlg:width="208" dlg:height="6"/>
+ <dlg:button dlg:id="Cancel" dlg:tab-index="5" dlg:left="133" dlg:top="216" dlg:width="36" dlg:height="13" dlg:value="Cancel">
+ <script:event script:event-name="on-performaction" script:location="application" script:macro-name="ScriptBindingLibrary.ScriptBinding.MenuCancelButton" script:language="StarBasic"/>
+ </dlg:button>
+ <dlg:button dlg:id="OK" dlg:tab-index="6" dlg:left="94" dlg:top="216" dlg:width="36" dlg:height="13" dlg:value="OK">
+ <script:event script:event-name="on-performaction" script:location="application" script:macro-name="ScriptBindingLibrary.ScriptBinding.MenuOKButton" script:language="StarBasic"/>
+ </dlg:button>
+ <dlg:fixedline dlg:id="FixedLine3" dlg:tab-index="7" dlg:left="80" dlg:top="163" dlg:width="130" dlg:height="3"/>
+ <dlg:text dlg:id="Label2" dlg:tab-index="8" dlg:left="6" dlg:top="160" dlg:width="73" dlg:height="8" dlg:value="Assign script to new menu"/>
+ <dlg:textfield dlg:id="MenuLabelBox" dlg:tab-index="9" dlg:left="55" dlg:top="171" dlg:width="150" dlg:height="12">
+ <script:event script:event-name="on-blur" script:location="application" script:macro-name="ScriptBindingLibrary.ScriptBinding.MenuLabelBoxListener" script:language="StarBasic"/>
+ <script:event script:event-name="on-keydown" script:location="application" script:macro-name="ScriptBindingLibrary.ScriptBinding.MenuLabelBoxListener" script:language="StarBasic"/>
+ </dlg:textfield>
+ <dlg:text dlg:id="Label3" dlg:tab-index="10" dlg:left="12" dlg:top="173" dlg:width="28" dlg:height="10" dlg:value="New Menu"/>
+ <dlg:fixedline dlg:id="FixedLine4" dlg:tab-index="11" dlg:left="81" dlg:top="69" dlg:width="130" dlg:height="5"/>
+ <dlg:text dlg:id="Label4" dlg:tab-index="12" dlg:left="6" dlg:top="69" dlg:width="75" dlg:height="7" dlg:value="Choose menu to insert after"/>
+ <dlg:combobox dlg:id="MenuCombo" dlg:tab-index="13" dlg:left="55" dlg:top="83" dlg:width="150" dlg:height="12" dlg:spin="true">
+ <script:event script:event-name="on-itemstatechange" script:location="application" script:macro-name="ScriptBindingLibrary.ScriptBinding.MenuComboListener" script:language="StarBasic"/>
+ </dlg:combobox>
+ <dlg:text dlg:id="Label5" dlg:tab-index="14" dlg:left="12" dlg:top="85" dlg:width="40" dlg:height="10" dlg:value="Toplevel Menu"/>
+ <dlg:menulist dlg:id="SubMenuList" dlg:tab-index="15" dlg:left="55" dlg:top="98" dlg:width="150" dlg:height="37">
+ <script:event script:event-name="on-itemstatechange" script:location="application" script:macro-name="ScriptBindingLibrary.ScriptBinding.SubMenuListListener" script:language="StarBasic"/>
+ </dlg:menulist>
+ <dlg:text dlg:id="Label6" dlg:tab-index="16" dlg:left="12" dlg:top="100" dlg:width="40" dlg:height="10" dlg:value="Sub Menu"/>
+ <dlg:button dlg:id="Delete" dlg:tab-index="17" dlg:left="150" dlg:top="143" dlg:width="55" dlg:height="13" dlg:value="Delete Script Menu">
+ <script:event script:event-name="on-performaction" script:location="application" script:macro-name="ScriptBindingLibrary.ScriptBinding.MenuDeleteButton" script:language="StarBasic"/>
+ </dlg:button>
+ <dlg:button dlg:id="NewButton" dlg:tab-index="18" dlg:left="150" dlg:top="188" dlg:width="55" dlg:height="13" dlg:value="New Script Menu">
+ <script:event script:event-name="on-performaction" script:location="application" script:macro-name="ScriptBindingLibrary.ScriptBinding.MenuNewButton" script:language="StarBasic"/>
+ </dlg:button>
+ </dlg:bulletinboard>
+</dlg:window> \ No newline at end of file
diff --git a/scripting/workben/bindings/ScriptBinding.xba b/scripting/workben/bindings/ScriptBinding.xba
new file mode 100644
index 000000000000..3ff7f73d2ca8
--- /dev/null
+++ b/scripting/workben/bindings/ScriptBinding.xba
@@ -0,0 +1,839 @@
+<?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="ScriptBinding" script:language="StarBasic">REM ***** BASIC *****
+
+REM ----- Global Variables -----
+
+private bindingDialog as object
+private helpDialog as object
+
+private xmlFile() as string
+private xmlFileName as string
+
+private menuItems() as string
+private menuItemLinePosition() as integer
+private menuCount as integer
+
+private subMenuItems() as string
+private subMenuItemLinePosition() as integer
+private subMenuCount as integer
+
+private scriptNames() as string
+private scriptLinePosition as integer
+private scriptCount as integer
+
+private allKeyBindings() as string
+
+private numberOfLines as integer
+
+
+
+REM ------ Storage Refresh Function ------
+
+
+function RefreshUserScripts()
+ smgr = getProcessServiceManager()
+ context = smgr.getPropertyValue( &quot;DefaultContext&quot; )
+ scriptstoragemgr = context.getValueByName( &quot;/singletons/drafts.com.sun.star.script.framework.storage.theScriptStorageManager&quot; )
+
+ storage = scriptstoragemgr.getScriptStorage( 1 )
+ storage.refresh()
+end function
+
+
+REM ----- Launch Functions -----
+
+function ExecuteKeyBinding()
+ bindingDialog = LoadDialog( &quot;ScriptBindingLibrary&quot;, &quot;KeyBinding&quot; )
+ xmlFileName = GetDocumentType( &quot;Key&quot; )
+ officePath = GetOfficePath()
+ ReadXMLToArray( &quot;Key&quot; )
+ PopulateScriptList()
+ CreateAllKeyBindings()
+ PopulateTopLevelKeyBindingList()
+ PopulateKeyBindingList( 1, 11 )
+ bindingDialog.execute()
+end function
+
+
+function ExecuteMenuBinding()
+ bindingDialog = LoadDialog( &quot;ScriptBindingLibrary&quot;, &quot;MenuBinding&quot; )
+ xmlFileName = GetDocumentType( &quot;Menu&quot; )
+ officePath = GetOfficePath()
+ ReadXMLToArray( &quot;Menu&quot; )
+ PopulateScriptList()
+ PopulateMenuCombo()
+ PopulateSubMenuList( 1 )
+ MenuLabelBoxListener()
+ bindingDialog.execute()
+end function
+
+
+REM ----- Initialising functions -----
+
+
+function LoadDialog( libName as string, dialogName as string ) as object
+ dim library as object
+ dim libDialog as object
+ dim runtimeDialog as object
+
+ libContainer = DialogLibraries
+ libContainer.LoadLibrary( libName )
+ library = libContainer.getByName( libname )
+ libDialog = library.getByName( dialogName )
+ runtimeDialog = CreateUnoDialog( libDialog )
+
+ LoadDialog() = runtimeDialog
+end function
+
+
+function GetDocumentType( bindingType as string ) as string
+ document = StarDesktop.ActiveFrame.Controller.Model
+ if document.SupportsService(&quot;com.sun.star.sheet.SpreadsheetDocument&quot;) then
+ if bindingType = &quot;Key&quot; then
+ GetDocumentType() = &quot;calckeybinding.xml&quot;
+ else
+ if bindingType = &quot;Menu&quot; then
+ GetDocumentType() = &quot;calcmenubar.xml&quot;
+ end if
+ end if
+ else
+ if document.SupportsService(&quot;com.sun.star.text.TextDocument&quot;) then
+ if bindingType = &quot;Key&quot; then
+ GetDocumentType() = &quot;writerkeybinding.xml&quot;
+ else
+ if bindingType = &quot;Menu&quot; then
+ GetDocumentType() = &quot;writermenubar.xml&quot;
+ end if
+ end if
+ else
+ msgbox &quot;Couldn&apos;t determine file type&quot;
+ end if
+ end if
+end function
+
+
+function ReadXMLToArray( bindingType as string )
+
+ simplefileaccess = CreateUnoService( &quot;com.sun.star.ucb.SimpleFileAccess&quot; )
+ filestream = simplefileaccess.openFileRead( &quot;file://&quot; + GetOfficePath() + &quot;/user/config/soffice.cfg/&quot; + xmlFileName )
+
+ textin = CreateUnoService( &quot;com.sun.star.io.TextInputStream&quot; )
+ textin.setInputStream( filestream )
+
+ reDim xmlFile( 500 ) as String
+ reDim menuItems( 30 ) as String
+ reDim menuItemLinePosition( 30 ) as Integer
+ reDim scriptNames( 120 ) as string
+ redim scriptLinePosition( 120) as integer
+
+ lineCount = 1
+ menuCount = 1
+ scriptCount = 1
+
+ while not textin.isEOF()
+ xmlline = textin.readLine()
+ xmlFile( lineCount ) = xmlline
+
+ const menuItemWhiteSpace = 2
+ const menuXMLTag = &quot;&lt;menu:menu&quot;
+
+ &apos;If line read from XML file is a Menu title
+ if bindingType = &quot;Menu&quot; then
+ if instr( xmlFile( lineCount ), menuXMLTag ) = menuItemWhiteSpace then
+ menuLabel = ExtractLabelFromXMLLine( xmlFile( lineCount ) )
+ menuItems( menuCount ) = menuLabel
+ menuItemLinePosition( menuCount ) = lineCount
+ menuCount = menuCount + 1
+ end if
+ end if
+
+ if bindingType = &quot;Key&quot; then
+ if not( instr( xmlFile( lineCount ), &quot;&lt;accel:item&quot; ) = 0 ) then
+ scriptName = &quot;&quot;
+ if not( instr( xmlFile( lineCount ), &quot;accel:shift=&quot;+chr$(34)+&quot;true&quot;+chr$(34) ) = 0 ) then
+ scriptName = scriptName + &quot;SHIFT + &quot;
+ end if
+ if not( instr( xmlFile( lineCount ), &quot;accel:mod1=&quot;+chr$(34)+&quot;true&quot;+chr$(34) ) = 0 ) then
+ scriptName = scriptName + &quot;CONTROL + &quot;
+ end if
+ scriptName = scriptName + ExtractKeyCodeFromXMLLine( xmlFile( lineCount ) )
+ scriptNames( scriptCount ) = scriptName
+ scriptLinePosition( scriptCount ) = lineCount
+ scriptCount = scriptCount + 1
+ end if
+ end if
+
+ lineCount = lineCount + 1
+ wend
+
+ numberOfLines = lineCount
+ filestream.closeInput()
+end function
+
+
+function GetOfficePath() as string
+REM Error check and prompt user to manually input Office Path
+ settings = CreateUnoService( &quot;com.sun.star.frame.Settings&quot; )
+ path = settings.getByName( &quot;PathSettings&quot; )
+ unformattedOfficePath = path.getPropertyValue( &quot;UserPath&quot; )
+
+ dim officePath as string
+ const removeFromEnd = &quot;/user&quot;
+ const removeFromEndWindows = &quot;\user&quot;
+
+ REM If Solaris or Linux
+ if not ( instr( unformattedOfficePath, removeFromEnd ) = 0 ) then
+ endPosition = instr( unformattedOfficePath, removeFromEnd )&apos; - len( removeFromStart )
+ officePath = mid( unformattedOfficePath, 1, endPosition )
+ REM If Windows
+ else if not ( instr( unformattedOfficePath, removeFromEndWindows ) = 0 ) then
+ endPosition = instr( unformattedOfficePath, removeFromEndWindows )
+ officePath = mid( unformattedOfficePath, 1, endPosition )
+ while instr( officePath, &quot;\&quot; ) &gt; 0
+ backSlash = instr( officePath, &quot;\&quot; )
+ startPath = mid( officePath, 1, backSlash - 1 )
+ endPath = mid( officePath, backslash + 1, len( officePath ) - backSlash )
+ officePath = startPath + &quot;/&quot; + endPath
+ wend
+ else
+ msgbox &quot;Office path not found&quot;
+ REM Prompt user
+ end if
+ end if
+
+ GetOfficePath() = officePath
+end function
+
+
+
+REM ----- File Output functions -----
+
+function AddNewMenuBinding( newScript as string, newMenuLabel as string, newLinePosition as integer )
+ simplefileaccess = CreateUnoService( &quot;com.sun.star.ucb.SimpleFileAccess&quot; )
+ simplefileaccess.kill( &quot;file:///&quot; + GetOfficePath() + &quot;user/config/soffice.cfg/&quot; + xmlFileName )
+ outfilestream = simplefileaccess.openFileWrite( &quot;file:///&quot; + GetOfficePath() + &quot;user/config/soffice.cfg/&quot; + xmlFileName )
+
+ textout = CreateUnoService( &quot;com.sun.star.io.TextOutputStream&quot; )
+ textout.setOutputStream( outfilestream )
+
+ for n = 1 to numberOfLines - 1
+ if n = newLinePosition + 1 then
+ indent = GetMenuWhiteSpace( xmlFile( newLinePosition ) )
+ textout.writeString(indent + &quot;&lt;menu:menuitem menu:id=&quot;+chr$(34)+&quot;script://&quot; + newScript + chr$(34)+&quot; menu:helpid=&quot;+chr$(34)+&quot;1929&quot;+chr$(34)+&quot; menu:label=&quot;+chr$(34)+ newMenuLabel + chr$(34)+&quot;/&gt;&quot;+ chr$(10) )
+ &apos;msgbox (indent + &quot;&lt;menu:menuitem menu:id=&quot;+chr$(34)+&quot;script://&quot; + newScript + chr$(34)+&quot; menu:helpid=&quot;+chr$(34)+&quot;1929&quot;+chr$(34)+&quot; menu:label=&quot;+chr$(34)+ newMenuLabel + chr$(34)+&quot;/&gt;&quot;+ chr$(10) + &quot; newLinePosition is &quot; + newLinePosition)
+ textout.writeString( xmlFile(n) + chr$(10) )
+ else if n = numberOfLines - 1 then
+ textout.writeString( xmlFile(n) )
+ else
+ textout.writeString( xmlFile(n) + chr$(10) )
+ end if
+ end if
+ next n
+
+ outfilestream.flush()
+ outfilestream.closeOutput()
+ &apos;bindingDialog.endExecute()
+
+ &apos;msgbox ( &quot;Menu Label: &quot; + newMenuLabel + &quot; Function Name: &quot; + newScript )
+end function
+
+
+function AddNewKeyBinding( scriptName as string, shift as boolean, control as boolean, key as string )
+ simplefileaccess = CreateUnoService( &quot;com.sun.star.ucb.SimpleFileAccess&quot; )
+ simplefileaccess.kill( &quot;file:///&quot; + GetOfficePath() + &quot;user/config/soffice.cfg/&quot; + xmlFileName )
+ outfilestream = simplefileaccess.openFileWrite( &quot;file:///&quot; + GetOfficePath() + &quot;user/config/soffice.cfg/&quot; + xmlFileName )
+
+ textout = CreateUnoService( &quot;com.sun.star.io.TextOutputStream&quot; )
+ textout.setOutputStream( outfilestream )
+
+ dim keyCombo as string
+ newLine = &quot; &lt;accel:item accel:code=&quot;+chr$(34)+&quot;KEY_&quot; + key +chr$(34)
+ if shift then
+ keyCombo = &quot;SHIFT + &quot;
+ newLine = newLine + &quot; accel:shift=&quot;+chr$(34)+&quot;true&quot;+chr$(34)
+ end if
+ if control then
+ keyCombo = keyCombo + &quot;CONTROL + &quot;
+ newLine = newLine + &quot; accel:mod1=&quot;+chr$(34)+&quot;true&quot;+chr$(34)
+ end if
+ keyCombo = keyCombo + key
+ newLine = newLine + &quot; xlink:href=&quot;+chr$(34)+&quot;script://&quot; + scriptName
+
+ &apos;For this release of the scripting framework only use application binding
+ applicationBinding = true
+ if applicationBinding then
+ newLine = newLine + &quot;?location=application&quot;+chr$(34)+&quot;/&gt;&quot;
+ else
+ newLine = newLine + &quot;?location=document&quot;+chr$(34)+&quot;/&gt;&quot;
+ end if
+
+ &apos;msgbox ( &quot;New key binding: &quot; + newLine )
+
+ for n = 1 to numberOfLines - 1
+ if n = numberOfLines - 1 then
+ textout.writeString( newLine + chr$(10) )
+ textout.writeString( xmlFile( n ) )&apos; + chr$(10) )
+ else if n = numberOfLines - 1 then
+ textout.writeString( xmlFile( n ) )
+ else
+ textout.writeString( xmlFile( n ) + chr$(10) )
+ end if
+ end if
+
+ next n
+
+ outfilestream.flush()
+ outfilestream.closeOutput()
+ &apos;bindingDialog.endExecute()
+
+ &apos;msgbox ( &quot;Key: &quot; + keyCombo + &quot; Function Name: &quot; + scriptName )
+end function
+
+
+function RemoveBinding( removeLinePosition as integer )
+ simplefileaccess = CreateUnoService( &quot;com.sun.star.ucb.SimpleFileAccess&quot; )
+ simplefileaccess.kill( &quot;file:///&quot; + GetOfficePath() + &quot;user/config/soffice.cfg/&quot; + xmlFileName )
+ outfilestream = simplefileaccess.openFileWrite( &quot;file:///&quot; + GetOfficePath() + &quot;user/config/soffice.cfg/&quot; + xmlFileName )
+
+ textout = CreateUnoService( &quot;com.sun.star.io.TextOutputStream&quot; )
+ textout.setOutputStream( outfilestream )
+
+ for n = 1 to numberOfLines - 1
+ if not( n = removeLinePosition ) then
+ if n = numberOfLines - 1 then
+ textout.writeString( xmlFile( n ) )
+ else
+ textout.writeString( xmlFile( n ) + chr$(10) )
+ end if
+ &apos;else
+ &apos; msgbox (&quot;Deleting: &quot; + xmlFile( n ) )
+ end if
+ next n
+
+ outfilestream.flush()
+ outfilestream.closeOutput()
+ &apos;bindingDialog.endExecute()
+end function
+
+
+
+REM ----- Populating Dialog Controls -----
+
+
+function PopulateScriptList()
+ scriptList = bindingDialog.getControl( &quot;ScriptList&quot; )
+ scriptList.removeItems( 0, scriptList.getItemCount() )
+
+ smgr = getProcessServiceManager()
+ context = smgr.getPropertyValue( &quot;DefaultContext&quot; )
+ scriptstoragemgr = context.getValueByName( &quot;/singletons/drafts.com.sun.star.script.framework.storage.theScriptStorageManager&quot; )
+
+ storage = scriptstoragemgr.getScriptStorage( 1 )
+ logicalNames() = storage.getScriptLogicalNames()
+
+ for n = 1 to ubound( logicalNames() ) + 1
+ scriptList.addItem( logicalNames( n - 1 ), n )
+ next n
+
+ scriptList.selectItemPos( 0, true )
+end function
+
+
+function PopulateMenuCombo()
+ menuComboBox = bindingDialog.getControl( &quot;MenuCombo&quot; )
+ menuComboBox.removeItems( 0, menuComboBox.getItemCount() )
+ for n = 1 to menuCount - 1
+ menuComboBox.addItem( menuItems( n ), n - 1 )
+ next n
+ menuComboBox.setDropDownLineCount( 8 )
+ menuComboBox.text = menuComboBox.getItem( 0 )
+end function
+
+
+function PopulateSubMenuList( menuItemPosition as integer )
+ redim subMenuItems( 100 ) as string
+ redim subMenuItemLinePosition( 100 ) as integer
+ dim lineNumber as integer
+ const menuItemWhiteSpace = 4
+ const menuXMLTag = &quot;&lt;menu:menu&quot;
+ subMenuCount = 1
+
+ xmlStartLine = menuItemLinePosition( menuItemPosition ) + 1
+ &apos;If last menu item is chosen
+ if menuItemPosition = menuCount - 1 then
+ xmlEndLine = numberOfLines
+ else
+ xmlEndLine = menuItemLinePosition( menuItemPosition + 1 ) - 1
+ end if
+ for lineNumber = xmlStartLine to xmlEndLine
+ &apos;Insert all sub-menus and sub-popupmenus
+ if not( instr( xmlFile( lineNumber ), menuXMLTag ) = 0 ) and instr( xmlFile( lineNumber ), &quot;menupopup&quot;) = 0 then
+ subMenuIndent = GetMenuWhiteSpace( xmlFile( lineNumber ) )
+ if subMenuIndent = &quot; &quot; then
+ subMenuIndent = &quot;&quot;
+ else
+ subMenuIndent = subMenuIndent + subMenuIndent
+ end if
+ if not( instr( xmlFile( lineNumber ), &quot;menuseparator&quot; ) = 0 ) then
+ subMenuItems( subMenuCount ) = subMenuIndent + &quot;----------------&quot;
+ else
+ subMenuName = ExtractLabelFromXMLLine( xmlFile( lineNumber ) )
+ &apos;Add script Name if there is one bound to menu item
+ if instr( xmlFile( lineNumber ), &quot;script://&quot; ) &gt; 0 then
+ script = ExtractScriptIdFromXMLLine( xmlFile( lineNumber ) )
+ subMenuItems( subMenuCount ) = ( subMenuIndent + subMenuName + &quot; [&quot; + script + &quot;]&quot; )
+ else
+ &apos;ZZZZZ Test to change text properties
+ &apos;tcolor = rgb( 255, 0, 0 )
+ &apos;subMenuName.textcolor = tcolor
+ subMenuItems( subMenuCount ) = subMenuIndent + subMenuName
+ end if
+ end if
+ subMenuItemLinePosition( subMenuCount ) = lineNumber
+ subMenuCount = subMenuCount + 1
+ end if
+ next lineNumber
+
+ subMenuList = bindingDialog.getControl( &quot;SubMenuList&quot; )
+ subMenuList.removeItems( 0, subMenuList.getItemCount() )
+ for n = 1 to subMenuCount - 1
+ subMenuList.addItem( subMenuItems( n ), n - 1 )
+ next n
+ subMenuList.selectItemPos( 0, true )
+ &apos;ZZZZZ Test to change text properties
+ &apos;control = CreateUnoService( &quot;com.sun.star.awt.UnoControlEditModel&quot; )
+ &apos;msgbox ( subMenuName.dbg_methods )
+ &apos;control.setModel( bindingDialog.Model )
+ &apos;tcolor = rgb( 255, 0, 0 )
+ &apos;bindingDialog.Model.subMenuList.textcolor = tcolor
+ SubMenuListListener()
+end function
+
+
+
+function PopulateTopLevelKeyBindingList()
+ keyCombo = bindingDialog.getControl( &quot;KeyCombo&quot; )
+ keyCombo.removeItems( 0, keyCombo.getItemCount() )
+ keyCombo.addItem( &quot;SHIFT + CONTROL + F keys&quot;, 0 )
+ keyCombo.addItem( &quot;SHIFT + CONTROL + digits&quot;, 1 )
+ keyCombo.addItem( &quot;SHIFT + CONTROL + letters&quot;, 2 )
+ keyCombo.addItem( &quot;CONTROL + F keys&quot;, 3 )
+ keyCombo.addItem( &quot;CONTROL + digits&quot;, 4 )
+ keyCombo.addItem( &quot;CONTROL + letters&quot;, 5 )
+ keyCombo.addItem( &quot;SHIFT + F keys&quot;, 6 )
+
+ keyCombo.setDropDownLineCount( 7 )
+ keyCombo.text = keyCombo.getItem( 0 )
+end function
+
+
+function PopulateKeyBindingList( startPosition as integer, endPosition as integer )
+ dim formattedKeyBinding( 47 ) as string
+ counter = 1
+
+ keyList = bindingDialog.getControl( &quot;KeyList&quot; )
+
+ for n = startPosition to endPosition
+ if IsAllocatedKeyCombo( allKeyBindings( n ) ) &gt; 1 then
+ formattedKeyBinding( counter ) = ( allKeyBindings( n ) + &quot; [Allocated to &quot; + ExtractScriptIdFromXMLLine( xmlFile( isAllocatedKeyCombo( allKeyBindings( n ) ) ) ) + &quot;]&quot; )
+ else if IsAllocatedKeyCombo( allKeyBindings( n ) ) = 1 then
+ formattedKeyBinding( counter ) = ( allKeyBindings( n ) + &quot; [Allocated to Office function]&quot; )
+ else
+ formattedKeyBinding( counter ) = allKeyBindings( n )
+ end if
+ end if
+ counter = counter + 1
+ next n
+
+ keyList.removeItems( 0, keyList.getItemCount() )
+ for n = 1 to counter - 1
+ keyList.addItem( formattedKeyBinding( n ), n - 1 )
+ next n
+
+ keyList.selectItemPos( 0, true )
+ KeyListListener()
+end function
+
+
+
+function CreateAllKeyBindings()
+ reDim allKeyBindings( 105 ) as string
+ keyBindingPosition = 1
+&apos;SHIFT + CONTROL for shftctrl = 1 to 46
+ for FKey = 2 to 12
+ allKeyBindings( keyBindingPosition ) = &quot;SHIFT + CONTROL + F&quot; + FKey
+ keyBindingPosition = keyBindingPosition + 1
+ next FKey
+ for Digit = 0 to 9
+ allKeyBindings( keyBindingPosition ) = &quot;SHIFT + CONTROL + &quot; + Digit
+ keyBindingPosition = keyBindingPosition + 1
+ next Digit
+ for Alpha = 65 to 90
+ allKeyBindings( keyBindingPosition ) = &quot;SHIFT + CONTROL + &quot; + chr$( Alpha )
+ keyBindingPosition = keyBindingPosition + 1
+ next Alpha
+&apos;FOR for ctrl = 1 to 46
+ for FKey = 2 to 12
+ allKeyBindings( keyBindingPosition ) = &quot;CONTROL + F&quot; + FKey
+ keyBindingPosition = keyBindingPosition + 1
+ next FKey
+ for Digit = 0 to 9
+ allKeyBindings( keyBindingPosition ) = &quot;CONTROL + &quot; + Digit
+ keyBindingPosition = keyBindingPosition + 1
+ next Digit
+ for Alpha = 65 to 90
+ allKeyBindings( keyBindingPosition ) = &quot;CONTROL + &quot; + chr$( Alpha )
+ keyBindingPosition = keyBindingPosition + 1
+ next Alpha
+&apos;SHIFT for shift = 1 to 46
+ for FKey = 2 to 12
+ allKeyBindings( keyBindingPosition ) = &quot;SHIFT + F&quot; + FKey
+ keyBindingPosition = keyBindingPosition + 1
+ next FKey
+end function
+
+
+
+REM ----- Text Handling Functions -----
+
+
+function ExtractLabelFromXMLLine( XMLLine as string ) as string
+ labelStart = instr( XMLLine, &quot;label=&quot;+chr$(34)) + 7
+ labelEnd = instr( XMLLine, chr$(34)+&quot;&gt;&quot; )
+ if labelEnd = 0 then
+ labelEnd = instr( XMLLine, chr$(34)+&quot;/&gt;&quot; )
+ end if
+ labelLength = labelEnd - labelStart
+
+ menuLabelUnformatted = mid( XMLLine, labelStart, labelLength )
+ tildePosition = instr( menuLabelUnformatted, &quot;~&quot; )
+ select case tildePosition
+ case 0
+ menuLabel = menuLabelUnformatted
+ case 1
+ menuLabel = right( menuLabelUnformatted, labelLength - 1 )
+ case else
+ menuLabelLeft = left( menuLabelUnformatted, tildePosition - 1 )
+ menuLabelRight = right( menuLabelUnformatted, labelLength - tildePosition )
+ menuLabel = menuLabelLeft + menuLabelRight
+ end select
+
+ ExtractLabelFromXMLLine() = menuLabel
+end function
+
+
+function ExtractScriptIdFromXMLLine( XMLLine as string ) as string
+ idStart = instr( XMLLine, &quot;script://&quot;) + 9
+ if instr( XMLLine, &quot;&quot;+chr$(34)+&quot; menu:helpid=&quot; ) = 0 then
+ idEnd = instr( XMLLIne, &quot;?location=&quot; )
+ else
+ idEnd = instr( XMLLine, &quot;&quot;+chr$(34)+&quot; menu:helpid=&quot; )
+ end if
+ idLength = idEnd - idStart
+ scriptId = mid( XMLLine, idStart, idLength )
+
+ ExtractScriptIdFromXMLLine() = scriptId
+end function
+
+
+function ExtractKeyCodeFromXMLLine( XMLLine as string ) as string
+ keyStart = instr( XMLLine, &quot;code=&quot;+chr$(34)+&quot;KEY_&quot;) + 10
+ keyCode = mid( XMLLine, keyStart, ( len( XMLLine ) - keyStart ) )
+ keyEnd = instr( keyCode, chr$(34) )
+ keyCode = mid( keyCode, 1, keyEnd - 1 )
+
+ ExtractKeyCodeFromXMLLine() = keyCode
+end function
+
+
+function GetMenuWhiteSpace( MenuXMLLine as string ) as string
+ whiteSpace = &quot;&quot;
+ numberOfSpaces = instr( MenuXMLLine, &quot;&lt;&quot; ) - 1
+ for i = 1 to numberOfSpaces
+ whiteSpace = whiteSpace + &quot; &quot;
+ next i
+
+ GetMenuWhiteSpace() = whiteSpace
+end function
+
+
+function IsAllocatedKeyCombo( script as string ) as integer
+ const NotAllocated = 0
+ const AllocatedToOfficeFunction = 1
+ const AllocatedToScript = 2
+ dim Allocation as integer
+
+ if instr( script, &quot; [Allocated&quot; ) &gt; 0 then
+ endPosition = instr( script, &quot; [Allocated&quot; ) - 1
+ script = mid( script, 1, endPosition )
+ end if
+
+ Allocation = NotAllocated
+ count = 1
+ while Allocation = NotAllocated and count &lt; scriptCount
+ linePosition = scriptLinePosition( count )
+ if strcomp( script, scriptNames( count ) ) = 0 then
+ if instr( xmlFile( linePosition ), &quot;script://&quot; ) &gt; 0 then
+ Allocation = linePosition
+ else
+ Allocation = AllocatedToOfficeFunction
+ end if
+ end if
+ count = count + 1
+ wend
+ IsAllocatedKeyCombo() = Allocation
+end Function
+
+
+function IsAllocatedMenuItem( script as string ) as boolean
+ foundMenuItem = false
+ Allocated = false
+ count = 0
+ do
+ count = count + 1
+ if strcomp( script, subMenuItems( count ) ) = 0 then
+ foundMenuItem = true
+ end if
+ loop while not( foundMenuItem ) and count &lt; subMenuCount
+
+ linePosition = subMenuItemLinePosition( count )
+
+ if not( instr( xmlFile( linePosition ), &quot;script://&quot; ) = 0 ) then
+ Allocated = true
+ end if
+
+ isAllocatedMenuItem() = Allocated
+end Function
+
+
+function HasShiftKey( keyCombo ) as boolean
+ if instr( keyCombo, &quot;SHIFT&quot; ) = 0 then
+ hasShift = false
+ else
+ hasShift = true
+ end if
+
+ HasShiftKey = hasShift
+end function
+
+
+function HasControlKey( keyCombo ) as boolean
+ if instr( keyCombo, &quot;CONTROL&quot; ) = 0 then
+ hasControl = false
+ else
+ hasControl = true
+ end if
+
+ HasControlKey = hasControl
+end function
+
+
+function ExtractKeyFromCombo( keyString as string ) as string
+ while not( instr( keyString, &quot;+&quot; ) = 0 )
+ removeTo = instr( keyString, &quot;+ &quot; ) + 2
+ keyString = mid( keyString, removeTo, ( len( keyString ) - removeTo ) + 1 )
+ wend
+
+ ExtractKeyFromCombo() = keyString
+end function
+
+
+
+REM ------ Event Handling Functions ------
+
+
+function KeyListListener()
+ keyList = bindingDialog.getControl( &quot;KeyList&quot; )
+ selectedKeyCombo = keyList.getSelectedItem()
+
+ if isAllocatedKeyCombo( selectedKeyCombo ) &gt; 1 then
+ bindingDialog.Model.Delete.enabled = true
+ bindingDialog.Model.NewButton.enabled = false
+ else
+ if isAllocatedKeyCombo( selectedKeyCombo ) = 1 then
+ bindingDialog.Model.Delete.enabled = false
+ bindingDialog.Model.NewButton.enabled = false
+ else
+ bindingDialog.Model.Delete.enabled = false
+ bindingDialog.Model.NewButton.enabled = true
+ end if
+ end if
+end function
+
+
+function SubMenuListListener()
+ subMenuList = bindingDialog.getControl( &quot;SubMenuList&quot; )
+ selectedMenuItem = subMenuList.getSelectedItem()
+ if IsAllocatedMenuItem( selectedMenuItem ) then
+ bindingDialog.Model.Delete.enabled = true
+ else
+ bindingDialog.Model.Delete.enabled = false
+ end if
+end function
+
+
+&apos;Populates the SubMenuList with the appropriate menu items from the Top-level menu selected from the combo box
+function MenuComboListener()
+ combo = bindingDialog.getControl( &quot;MenuCombo&quot; )
+ newToplevelMenu = combo.text
+ counter = 0
+ do
+ counter = counter + 1
+ loop while not( newToplevelMenu = menuItems( counter ) )
+
+ PopulateSubMenuList( counter )
+end function
+
+
+&apos;Populates the KeyList with the appropriate key combos from the Top-level key group selected from the combo box
+function KeyComboListener()
+ combo = bindingDialog.getControl( &quot;KeyCombo&quot; )
+ itemSelected = combo.text
+
+ select case itemSelected
+ case &quot;SHIFT + CONTROL + F keys&quot;
+ PopulateKeyBindingList( 1, 11 )
+ case &quot;SHIFT + CONTROL + digits&quot;
+ PopulateKeyBindingList( 12, 21 )
+ case &quot;SHIFT + CONTROL + letters&quot;
+ PopulateKeyBindingList( 22, 47 )
+ case &quot;CONTROL + F keys&quot;
+ PopulateKeyBindingList( 48, 58 )
+ case &quot;CONTROL + digits&quot;
+ PopulateKeyBindingList( 59, 68 )
+ case &quot;CONTROL + letters&quot;
+ PopulateKeyBindingList( 69, 94 )
+ case &quot;SHIFT + F keys&quot;
+ PopulateKeyBindingList( 95, 105 )
+ case else
+ msgbox &quot;Error&quot;
+ end select
+end function
+
+
+function MenuLabelBoxListener()
+ if bindingDialog.Model.MenuLabelBox.text = &quot;&quot; then
+ bindingDialog.Model.NewButton.enabled = false
+ else
+ bindingDialog.Model.NewButton.enabled = true
+ end if
+end function
+
+
+function MenuOKButton()
+ msgbox (&quot;Office must be restarted before your changes will take effect.&quot; )
+ bindingDialog.endExecute()
+end function
+
+
+function MenuCancelButton()
+ bindingDialog.endExecute()
+end function
+
+
+function MenuHelpButton()
+ helpDialog = LoadDialog( &quot;ScriptBindingLibrary&quot;, &quot;HelpBinding&quot; )
+ helpDialog.execute()
+end function
+
+
+function MenuDeleteButton()
+ subMenuList = bindingDialog.getControl( &quot;SubMenuList&quot; )
+ linePos = subMenuItemLinePosition( subMenuList.getSelectedItemPos() + 1 )
+ RemoveBinding( linePos )
+
+ menuLabel = ExtractLabelFromXMLLine( xmlFile( linePos ) )
+ script = ExtractScriptIdFromXMLLine( xmlFile( linePos ) )
+ ReadXMLToArray( &quot;Menu&quot; )
+REM !!!
+ MenuComboListener()
+ &apos;PopulateSubMenuList( menuItemPosition as integer )
+end function
+
+
+function MenuNewButton()
+ menuScriptList = bindingDialog.getControl( &quot;ScriptList&quot; )
+ script = menuScriptList.getSelectedItem()
+ newMenuLabel = bindingDialog.Model.MenuLabelBox.text
+ if newMenuLabel = &quot;&quot; then
+ msgbox &quot;Error. Please enter new Menu Label&quot;
+ end if
+ subMenuList = bindingDialog.getControl( &quot;SubMenuList&quot; )
+ linePos = subMenuItemLinePosition( subMenuList.getSelectedItemPos() + 1 )
+ AddNewMenuBinding( script, newMenuLabel, linePos )
+
+ &apos;topLevelMenu = bindingDialog.Model.MenuCombo.text
+ &apos;subMenu = subMenuList.getSelectedItem()
+ ReadXMLToArray( &quot;Menu&quot; )
+REM !!!
+ MenuComboListener()
+ &apos;PopulateSubMenuList( menuItemPosition as integer )
+ &apos;msgbox ( &quot;Menu: &quot; + topLevelMenu + &quot; -&gt; &quot; + newMenuLabel + &quot; Function Name: &quot; + script )
+end function
+
+
+function KeyOKButton()
+ msgbox (&quot;Office must be restarted before your changes will take effect.&quot; )
+ bindingDialog.endExecute()
+end function
+
+
+function KeyCancelButton()
+ bindingDialog.endExecute()
+end function
+
+
+function KeyHelpButton()
+ helpDialog = LoadDialog( &quot;ScriptBindingLibrary&quot;, &quot;HelpBinding&quot; )
+ helpDialog.execute()
+end function
+
+
+function KeyNewButton()
+ menuScriptList = bindingDialog.getControl( &quot;ScriptList&quot; )
+ script = menuScriptList.getSelectedItem()
+
+ keyList = bindingDialog.getControl( &quot;KeyList&quot; )
+ REM Check that combo has not already been allocated
+ keyCombo = keyList.getSelectedItem()
+
+ AddNewKeyBinding( script, HasShiftKey( keyCombo ), HasControlKey( keyCombo ), ExtractKeyFromCombo( keyCombo ) )
+ ReadXMLToArray( &quot;Key&quot; )
+REM !!!
+ KeyComboListener()
+ &apos;PopulateKeyBindingList( startPosition as integer, endPosition as integer )
+end function
+
+
+function KeyDeleteButton()
+ keyList = bindingDialog.getControl( &quot;KeyList&quot; )
+ REM Check that combo is a script
+ keyCombo = keyList.getSelectedItem()
+
+ if instr( keyCombo, &quot; [Allocated&quot; ) &gt; 0 then
+ endPosition = instr( keyCombo, &quot; [Allocated&quot; ) - 1
+ keyCombo = mid( keyCombo, 1, endPosition )
+ end if
+
+ for n = 1 to scriptCount
+ if strcomp( keyCombo, scriptNames( n ) ) = 0 then
+ keyComboPosition = n
+ exit for
+ end if
+ next n
+
+ linePosition = scriptLinePosition( keyComboPosition )
+ RemoveBinding( linePosition )
+
+ script = ExtractScriptIdFromXMLLine( xmlFile( linePosition ) )
+ ReadXMLToArray( &quot;Key&quot; )
+REM !!!
+ KeyComboListener()
+ &apos;PopulateKeyBindingList( startPosition as integer, endPosition as integer )
+end function
+
+
+function HelpOKButton()
+ helpDialog.endExecute()
+end function</script:module>
diff --git a/scripting/workben/bindings/calckeybinding.xml b/scripting/workben/bindings/calckeybinding.xml
new file mode 100644
index 000000000000..dd67fb6996ec
--- /dev/null
+++ b/scripting/workben/bindings/calckeybinding.xml
@@ -0,0 +1,90 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE accel:acceleratorlist PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "accelerator.dtd">
+<accel:acceleratorlist xmlns:accel="http://openoffice.org/2001/accel" xmlns:xlink="http://www.w3.org/1999/xlink">
+ <accel:item accel:code="KEY_END" accel:shift="true" accel:mod1="true" xlink:href="slot:26532"/>
+ <accel:item accel:code="KEY_HOME" accel:shift="true" accel:mod1="true" xlink:href="slot:26531"/>
+ <accel:item accel:code="KEY_RIGHT" accel:shift="true" accel:mod1="true" xlink:href="slot:26542"/>
+ <accel:item accel:code="KEY_LEFT" accel:shift="true" accel:mod1="true" xlink:href="slot:26541"/>
+ <accel:item accel:code="KEY_UP" accel:shift="true" accel:mod1="true" xlink:href="slot:26539"/>
+ <accel:item accel:code="KEY_DOWN" accel:shift="true" accel:mod1="true" xlink:href="slot:26540"/>
+ <accel:item accel:code="KEY_F9" accel:shift="true" accel:mod1="true" xlink:href="slot:26318"/>
+ <accel:item accel:code="KEY_F5" accel:shift="true" accel:mod1="true" xlink:href="slot:26645"/>
+ <accel:item accel:code="KEY_F2" accel:shift="true" accel:mod1="true" xlink:href="slot:26089"/>
+ <accel:item accel:code="KEY_T" accel:shift="true" accel:mod1="true" xlink:href="slot:26645"/>
+ <accel:item accel:code="KEY_R" accel:shift="true" accel:mod1="true" xlink:href="slot:26012"/>
+ <accel:item accel:code="KEY_P" accel:shift="true" accel:mod1="true" xlink:href="slot:10294"/>
+ <accel:item accel:code="KEY_F" accel:shift="true" accel:mod1="true" xlink:href="slot:26612"/>
+ <accel:item accel:code="KEY_B" accel:shift="true" accel:mod1="true" xlink:href="slot:10295"/>
+ <accel:item accel:code="KEY_6" accel:shift="true" accel:mod1="true" xlink:href="slot:26052"/>
+ <accel:item accel:code="KEY_5" accel:shift="true" accel:mod1="true" xlink:href="slot:26046"/>
+ <accel:item accel:code="KEY_4" accel:shift="true" accel:mod1="true" xlink:href="slot:26045"/>
+ <accel:item accel:code="KEY_3" accel:shift="true" accel:mod1="true" xlink:href="slot:26053"/>
+ <accel:item accel:code="KEY_2" accel:shift="true" accel:mod1="true" xlink:href="slot:26055"/>
+ <accel:item accel:code="KEY_1" accel:shift="true" accel:mod1="true" xlink:href="slot:26054"/>
+ <accel:item accel:code="KEY_MULTIPLY" accel:mod1="true" xlink:href="slot:26551"/>
+ <accel:item accel:code="KEY_BACKSPACE" accel:mod1="true" xlink:href="slot:26550"/>
+ <accel:item accel:code="KEY_SPACE" accel:mod1="true" xlink:href="slot:26547"/>
+ <accel:item accel:code="KEY_PAGEDOWN" accel:mod1="true" xlink:href="slot:26543"/>
+ <accel:item accel:code="KEY_PAGEUP" accel:mod1="true" xlink:href="slot:26544"/>
+ <accel:item accel:code="KEY_END" accel:mod1="true" xlink:href="slot:5741"/>
+ <accel:item accel:code="KEY_HOME" accel:mod1="true" xlink:href="slot:5742"/>
+ <accel:item accel:code="KEY_RIGHT" accel:mod1="true" xlink:href="slot:26538"/>
+ <accel:item accel:code="KEY_LEFT" accel:mod1="true" xlink:href="slot:26537"/>
+ <accel:item accel:code="KEY_UP" accel:mod1="true" xlink:href="slot:26535"/>
+ <accel:item accel:code="KEY_DOWN" accel:mod1="true" xlink:href="slot:26536"/>
+ <accel:item accel:code="KEY_F12" accel:mod1="true" xlink:href="slot:26332"/>
+ <accel:item accel:code="KEY_F11" accel:mod1="true" xlink:href="slot:5573"/>
+ <accel:item accel:code="KEY_F8" accel:mod1="true" xlink:href="slot:26245"/>
+ <accel:item accel:code="KEY_F7" accel:mod1="true" xlink:href="slot:10245"/>
+ <accel:item accel:code="KEY_F3" accel:mod1="true" xlink:href="slot:26271"/>
+ <accel:item accel:code="KEY_F2" accel:mod1="true" xlink:href="slot:26152"/>
+ <accel:item accel:code="KEY_Z" accel:mod1="true" xlink:href="slot:5701"/>
+ <accel:item accel:code="KEY_Y" accel:mod1="true" xlink:href="slot:5700"/>
+ <accel:item accel:code="KEY_U" accel:mod1="true" xlink:href="slot:10014"/>
+ <accel:item accel:code="KEY_R" accel:mod1="true" xlink:href="slot:26372"/>
+ <accel:item accel:code="KEY_L" accel:mod1="true" xlink:href="slot:26371"/>
+ <accel:item accel:code="KEY_J" accel:mod1="true" xlink:href="slot:26374"/>
+ <accel:item accel:code="KEY_I" accel:mod1="true" xlink:href="slot:10008"/>
+ <accel:item accel:code="KEY_E" accel:mod1="true" xlink:href="slot:26373"/>
+ <accel:item accel:code="KEY_D" accel:mod1="true" xlink:href="slot:26610"/>
+ <accel:item accel:code="KEY_B" accel:mod1="true" xlink:href="slot:10009"/>
+ <accel:item accel:code="KEY_5" accel:mod1="true" xlink:href="slot:10035"/>
+ <accel:item accel:code="KEY_2" accel:mod1="true" xlink:href="slot:10036"/>
+ <accel:item accel:code="KEY_1" accel:mod1="true" xlink:href="slot:10034"/>
+ <accel:item accel:code="KEY_BACKSPACE" accel:shift="true" xlink:href="slot:26549"/>
+ <accel:item accel:code="KEY_SPACE" accel:shift="true" xlink:href="slot:26548"/>
+ <accel:item accel:code="KEY_PAGEDOWN" accel:shift="true" xlink:href="slot:26525"/>
+ <accel:item accel:code="KEY_PAGEUP" accel:shift="true" xlink:href="slot:26526"/>
+ <accel:item accel:code="KEY_END" accel:shift="true" xlink:href="slot:26534"/>
+ <accel:item accel:code="KEY_HOME" accel:shift="true" xlink:href="slot:26533"/>
+ <accel:item accel:code="KEY_RIGHT" accel:shift="true" xlink:href="slot:26524"/>
+ <accel:item accel:code="KEY_LEFT" accel:shift="true" xlink:href="slot:26523"/>
+ <accel:item accel:code="KEY_UP" accel:shift="true" xlink:href="slot:26522"/>
+ <accel:item accel:code="KEY_DOWN" accel:shift="true" xlink:href="slot:26521"/>
+ <accel:item accel:code="KEY_F11" accel:shift="true" xlink:href="slot:5538"/>
+ <accel:item accel:code="KEY_F8" accel:shift="true" xlink:href="slot:26122"/>
+ <accel:item accel:code="KEY_F7" accel:shift="true" xlink:href="slot:26456"/>
+ <accel:item accel:code="KEY_F5" accel:shift="true" xlink:href="slot:26458"/>
+ <accel:item accel:code="KEY_F4" accel:shift="true" xlink:href="slot:26609"/>
+ <accel:item accel:code="KEY_REPEAT" xlink:href="slot:5702"/>
+ <accel:item accel:code="KEY_UNDO" xlink:href="slot:5701"/>
+ <accel:item accel:code="KEY_INSERT" xlink:href="slot:26265"/>
+ <accel:item accel:code="KEY_BACKSPACE" xlink:href="slot:26553"/>
+ <accel:item accel:code="KEY_ESCAPE" xlink:href="slot:26557"/>
+ <accel:item accel:code="KEY_PAGEDOWN" xlink:href="slot:5735"/>
+ <accel:item accel:code="KEY_PAGEUP" xlink:href="slot:5736"/>
+ <accel:item accel:code="KEY_END" xlink:href="slot:5746"/>
+ <accel:item accel:code="KEY_HOME" xlink:href="slot:5745"/>
+ <accel:item accel:code="KEY_RIGHT" xlink:href="slot:5734"/>
+ <accel:item accel:code="KEY_LEFT" xlink:href="slot:5733"/>
+ <accel:item accel:code="KEY_UP" xlink:href="slot:5732"/>
+ <accel:item accel:code="KEY_DOWN" xlink:href="slot:5731"/>
+ <accel:item accel:code="KEY_F12" xlink:href="slot:26331"/>
+ <accel:item accel:code="KEY_F11" xlink:href="slot:5539"/>
+ <accel:item accel:code="KEY_F9" xlink:href="slot:26304"/>
+ <accel:item accel:code="KEY_F8" xlink:href="slot:26123"/>
+ <accel:item accel:code="KEY_F7" xlink:href="slot:10243"/>
+ <accel:item accel:code="KEY_F5" xlink:href="slot:10366"/>
+ <accel:item accel:code="KEY_F4" xlink:href="slot:6660"/>
+ <accel:item accel:code="KEY_F2" xlink:href="slot:26552"/>
+</accel:acceleratorlist> \ No newline at end of file
diff --git a/scripting/workben/bindings/calcmenubar.xml b/scripting/workben/bindings/calcmenubar.xml
new file mode 100644
index 000000000000..c5809d17d388
--- /dev/null
+++ b/scripting/workben/bindings/calcmenubar.xml
@@ -0,0 +1,306 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE menu:menubar PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "menubar.dtd">
+<menu:menubar xmlns:menu="http://openoffice.org/2001/menu" menu:id="menubar">
+ <menu:menu menu:id="slot:5510" menu:label="~File">
+ <menu:menupopup>
+ <menu:menuitem menu:id="slot:5537" menu:helpid="5537" menu:label="~New"/>
+ <menu:menuitem menu:id="slot:5501" menu:helpid="5501" menu:label="~Open..."/>
+ <menu:menuitem menu:id="slot:6381" menu:helpid="6381" menu:label="A~utoPilot"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id="slot:5503" menu:helpid="5503" menu:label="~Close"/>
+ <menu:menuitem menu:id="slot:5505" menu:helpid="5505" menu:label="~Save"/>
+ <menu:menuitem menu:id="slot:5502" menu:helpid="5502" menu:label="Save ~As..."/>
+ <menu:menuitem menu:id="slot:5309" menu:helpid="5309" menu:label="Sa~ve All"/>
+ <menu:menuitem menu:id="slot:5508" menu:helpid="5508" menu:label="Reload"/>
+ <menu:menuitem menu:id="slot:6583" menu:helpid="6583" menu:label="Versions..."/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id="slot:6673" menu:helpid="6673" menu:label="Expor~t as PDF..."/>
+ <menu:menu menu:id="slot:36" menu:label="Sen~d">
+ <menu:menupopup>
+ <menu:menuitem menu:id="slot:5331" menu:helpid="5331" menu:label="Document as ~E-mail..."/>
+ <menu:menuitem menu:id="slot:6672" menu:helpid="6672" menu:label="Document as P~DF Attachment..."/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id="slot:5535" menu:helpid="5535" menu:label="Propert~ies..."/>
+ <menu:menu menu:id="slot:39" menu:label="~Templates">
+ <menu:menupopup>
+ <menu:menuitem menu:id="slot:5540" menu:helpid="5540" menu:label="~Organize..."/>
+ <menu:menuitem menu:id="slot:6655" menu:helpid="6655" menu:label="~Address Book Source..."/>
+ <menu:menuitem menu:id="slot:5538" menu:helpid="5538" menu:label="~Save..."/>
+ <menu:menuitem menu:id="slot:5594" menu:helpid="5594" menu:label="~Edit..."/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id="slot:5325" menu:helpid="5325" menu:label="Pa~ge Preview"/>
+ <menu:menuitem menu:id="slot:5504" menu:helpid="5504" menu:label="~Print..."/>
+ <menu:menuitem menu:id="slot:5302" menu:helpid="5302" menu:label="P~rinter Settings..."/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id="slot:5300" menu:helpid="5300" menu:label="E~xit"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menu menu:id="slot:2" menu:label="~Edit">
+ <menu:menupopup>
+ <menu:menuitem menu:id="slot:5701" menu:helpid="5701" menu:label="Can&apos;t Undo"/>
+ <menu:menuitem menu:id="slot:5700" menu:helpid="5700" menu:label="Can&apos;t Restore"/>
+ <menu:menuitem menu:id="slot:5702" menu:helpid="5702" menu:label="~Repeat"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id="slot:5710" menu:helpid="5710" menu:label="Cu~t"/>
+ <menu:menuitem menu:id="slot:5711" menu:helpid="5711" menu:label="~Copy"/>
+ <menu:menuitem menu:id="slot:5712" menu:helpid="5712" menu:label="~Paste"/>
+ <menu:menuitem menu:id="slot:26220" menu:helpid="26220" menu:label="Paste ~Special..."/>
+ <menu:menuitem menu:id="slot:5723" menu:helpid="5723" menu:label="Select ~All"/>
+ <menu:menuseparator/>
+ <menu:menu menu:id="slot:37" menu:label="Chan~ges">
+ <menu:menupopup>
+ <menu:menuitem menu:id="slot:26238" menu:helpid="26238" menu:label="~Record"/>
+ <menu:menuitem menu:id="slot:26084" menu:helpid="26084" menu:label="~Protect Records..."/>
+ <menu:menuitem menu:id="slot:26239" menu:helpid="26239" menu:label="Sho~w..."/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id="slot:26258" menu:helpid="26258" menu:label="~Accept or Reject..."/>
+ <menu:menuitem menu:id="slot:26259" menu:helpid="26259" menu:label="~Comments..."/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id="slot:6587" menu:helpid="6587" menu:label="~Merge Document..."/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menuitem menu:id="slot:6586" menu:helpid="6586" menu:label="Co~mpare Document..."/>
+ <menu:menuitem menu:id="slot:5961" menu:helpid="5961" menu:label="~Find &amp; Replace..."/>
+ <menu:menuitem menu:id="slot:10366" menu:helpid="10366" menu:label="~Navigator"/>
+ <menu:menuitem menu:id="slot:26235" menu:helpid="26235" menu:label="~Headers &amp; Footers..."/>
+ <menu:menuseparator/>
+ <menu:menu menu:id="slot:3" menu:label="Fill">
+ <menu:menupopup>
+ <menu:menuitem menu:id="slot:26224" menu:helpid="26224" menu:label="~Down"/>
+ <menu:menuitem menu:id="slot:26225" menu:helpid="26225" menu:label="~Right"/>
+ <menu:menuitem menu:id="slot:26226" menu:helpid="26226" menu:label="~Up"/>
+ <menu:menuitem menu:id="slot:26227" menu:helpid="26227" menu:label="~Left"/>
+ <menu:menuitem menu:id="slot:26228" menu:helpid="26228" menu:label="~Sheet..."/>
+ <menu:menuitem menu:id="slot:26229" menu:helpid="26229" menu:label="S~eries..."/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menuitem menu:id="slot:5713" menu:helpid="5713" menu:label="Delete C~ontents..."/>
+ <menu:menuitem menu:id="slot:26222" menu:helpid="26222" menu:label="Delete C~ells..."/>
+ <menu:menu menu:id="slot:38" menu:label="Sheet">
+ <menu:menupopup>
+ <menu:menuitem menu:id="slot:26348" menu:helpid="26348" menu:label="~Move/Copy..."/>
+ <menu:menuitem menu:id="slot:26090" menu:helpid="26090" menu:label="~Select..."/>
+ <menu:menuitem menu:id="slot:26223" menu:helpid="26223" menu:label="~Delete..."/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menu menu:id="slot:4" menu:label="Delete Manual Break">
+ <menu:menupopup>
+ <menu:menuitem menu:id="slot:26263" menu:helpid="26263" menu:label="~Row Break"/>
+ <menu:menuitem menu:id="slot:26264" menu:helpid="26264" menu:label="~Column Break"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id="slot:26060" menu:helpid="26060" menu:label="Lin~ks..."/>
+ <menu:menuitem menu:id="slot:6314" menu:helpid="6314" menu:label="P~lug-in"/>
+ <menu:menuitem menu:id="slot:10371" menu:helpid="10371" menu:label="ImageMap"/>
+ <menu:menuitem menu:id="slot:5575" menu:helpid="5575" menu:label="~Object"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menu menu:id="slot:5" menu:label="~View">
+ <menu:menupopup>
+ <menu:menuitem menu:id="slot:10000" menu:helpid="10000" menu:label="~Zoom..."/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id="slot:6660" menu:helpid="6660" menu:label="~Data Sources"/>
+ <menu:menuseparator/>
+ <menu:menu menu:id="slot:29" menu:label="~Toolbars">
+ <menu:menupopup>
+ <menu:menuitem menu:id="slot:5910" menu:helpid="5910" menu:label="~Function Bar"/>
+ <menu:menuitem menu:id="slot:5905" menu:helpid="5905" menu:label="~Object Bar"/>
+ <menu:menuitem menu:id="slot:5909" menu:helpid="5909" menu:label="Main ~Toolbar"/>
+ <menu:menuitem menu:id="slot:10360" menu:helpid="10360" menu:label="~Hyperlink Bar"/>
+ <menu:menuitem menu:id="slot:26241" menu:helpid="26241" menu:label="For~mula Bar"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id="slot:5908" menu:helpid="5908" menu:label="Customi~ze..."/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menuitem menu:id="slot:5920" menu:helpid="5920" menu:label="~Status Bar"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id="slot:26242" menu:helpid="26242" menu:label="C~olumn &amp; Row Headers"/>
+ <menu:menuitem menu:id="slot:26245" menu:helpid="26245" menu:label="~Value Highlighting"/>
+ <menu:menuitem menu:id="slot:26247" menu:helpid="26247" menu:label="~Page Break Preview"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id="slot:5627" menu:helpid="5627" menu:label="F~ull Screen"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menu menu:id="slot:6" menu:label="~Insert">
+ <menu:menupopup>
+ <menu:menu menu:id="slot:7" menu:label="~Manual Break">
+ <menu:menupopup>
+ <menu:menuitem menu:id="slot:26261" menu:helpid="26261" menu:label="~Row Break"/>
+ <menu:menuitem menu:id="slot:26262" menu:helpid="26262" menu:label="~Column Break"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menuitem menu:id="slot:26266" menu:helpid="26266" menu:label="~Cells..."/>
+ <menu:menuitem menu:id="slot:26267" menu:helpid="26267" menu:label="~Rows"/>
+ <menu:menuitem menu:id="slot:26268" menu:helpid="26268" menu:label="Co~lumns"/>
+ <menu:menuitem menu:id="slot:26269" menu:helpid="26269" menu:label="~Sheet..."/>
+ <menu:menuitem menu:id="slot:26085" menu:helpid="26085" menu:label="E~xternal Data..."/>
+ <menu:menuitem menu:id="slot:10503" menu:helpid="10503" menu:label="S~pecial Character..."/>
+ <menu:menuitem menu:id="slot:5678" menu:helpid="5678" menu:label="~Hyperlink"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id="slot:26152" menu:helpid="26152" menu:label="~Function..."/>
+ <menu:menuitem menu:id="slot:26248" menu:helpid="26248" menu:label="F~unction List"/>
+ <menu:menuseparator/>
+ <menu:menu menu:id="slot:8" menu:label="~Names">
+ <menu:menupopup>
+ <menu:menuitem menu:id="slot:26271" menu:helpid="26271" menu:label="~Define..."/>
+ <menu:menuitem menu:id="slot:26272" menu:helpid="26272" menu:label="~Insert..."/>
+ <menu:menuitem menu:id="slot:26273" menu:helpid="26273" menu:label="~Create..."/>
+ <menu:menuitem menu:id="slot:26629" menu:helpid="26629" menu:label="~Labels..."/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menuitem menu:id="slot:26276" menu:helpid="26276" menu:label="Not~e"/>
+ <menu:menuseparator/>
+ <menu:menu menu:id="slot:30" menu:label="~Graphics">
+ <menu:menupopup>
+ <menu:menuitem menu:id="slot:10241" menu:helpid="10241" menu:label="From ~File..."/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menu menu:id="slot:1" menu:label="~Object">
+ <menu:menupopup>
+ <menu:menuitem menu:id="slot:5561" menu:helpid="5561" menu:label="~OLE Object..."/>
+ <menu:menuitem menu:id="slot:5672" menu:helpid="5672" menu:label="~Plug-in..."/>
+ <menu:menuitem menu:id="slot:5676" menu:helpid="5676" menu:label="~Sound..."/>
+ <menu:menuitem menu:id="slot:5677" menu:helpid="5677" menu:label="~Video..."/>
+ <menu:menuitem menu:id="slot:5673" menu:helpid="5673" menu:label="~Applet..."/>
+ <menu:menuitem menu:id="slot:26063" menu:helpid="26063" menu:label="~Formula..."/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menuitem menu:id="slot:26155" menu:helpid="26155" menu:label="Ch~art..."/>
+ <menu:menuitem menu:id="slot:5563" menu:helpid="5563" menu:label="Float~ing Frame"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menu menu:id="slot:5780" menu:label="F~ormat">
+ <menu:menupopup/>
+ </menu:menu>
+ <menu:menu menu:id="slot:14" menu:label="~Tools">
+ <menu:menupopup>
+ <menu:menu menu:id="slot:31" menu:label="~Spellcheck">
+ <menu:menupopup>
+ <menu:menuitem menu:id="slot:10243" menu:helpid="10243" menu:label="~Check..."/>
+ <menu:menuitem menu:id="slot:12021" menu:helpid="12021" menu:label="~AutoSpellcheck"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menuitem menu:id="slot:10245" menu:helpid="10245" menu:label="~Thesaurus..."/>
+ <menu:menuitem menu:id="slot:26087" menu:helpid="26087" menu:label="~Hyphenation..."/>
+ <menu:menu menu:id="slot:15" menu:label="~Detective">
+ <menu:menupopup>
+ <menu:menuitem menu:id="slot:26456" menu:helpid="26456" menu:label="Trace ~Precedents"/>
+ <menu:menuitem menu:id="slot:26457" menu:helpid="26457" menu:label="~Remove Precedents"/>
+ <menu:menuitem menu:id="slot:26458" menu:helpid="26458" menu:label="~Trace Dependents"/>
+ <menu:menuitem menu:id="slot:26459" menu:helpid="26459" menu:label="Remove ~Dependents"/>
+ <menu:menuitem menu:id="slot:26461" menu:helpid="26461" menu:label="Remove ~All Traces"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id="slot:26460" menu:helpid="26460" menu:label="Trace ~Error"/>
+ <menu:menuitem menu:id="slot:26469" menu:helpid="26469" menu:label="~Mark Invalid Data"/>
+ <menu:menuitem menu:id="slot:26470" menu:helpid="26470" menu:label="Refresh Tra~ces"/>
+ <menu:menuitem menu:id="slot:26471" menu:helpid="26471" menu:label="A~utoUpdate"/>
+ <menu:menuitem menu:id="slot:26462" menu:helpid="26462" menu:label="~Fill Mode"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id="slot:10424" menu:helpid="10424" menu:label="~AutoCorrect..."/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id="slot:26153" menu:helpid="26153" menu:label="~Goal Seek..."/>
+ <menu:menuitem menu:id="slot:26312" menu:helpid="26312" menu:label="Sc~enarios..."/>
+ <menu:menuseparator/>
+ <menu:menu menu:id="slot:16" menu:label="~Protect Document">
+ <menu:menupopup>
+ <menu:menuitem menu:id="slot:26306" menu:helpid="26306" menu:label="~Sheet..."/>
+ <menu:menuitem menu:id="slot:26307" menu:helpid="26307" menu:label="~Document..."/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menuseparator/>
+ <menu:menu menu:id="slot:32" menu:label="Cell Co~ntents">
+ <menu:menupopup>
+ <menu:menuitem menu:id="slot:26304" menu:helpid="26304" menu:label="~Recalculate"/>
+ <menu:menuitem menu:id="slot:26303" menu:helpid="26303" menu:label="Auto~Calculate"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id="slot:26319" menu:helpid="26319" menu:label="~AutoInput"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id="slot:5960" menu:helpid="5960" menu:label="~Gallery"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id="slot:10882" menu:helpid="10882" menu:label="~Data Sources..."/>
+ <menu:menuseparator/>
+ <menu:menu menu:id="slot:1" menu:label="~Macros">
+ <menu:menupopup>
+ <menu:menuitem menu:id="slot:6669" menu:helpid="6669" menu:label="~Record Macro"/>
+ <menu:menuitem menu:id="slot:5959" menu:helpid="5959" menu:label="~Macro..."/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menuitem menu:id="slot:5904" menu:helpid="5904" menu:label="~Configure..."/>
+ <menu:menuitem menu:id="slot:31630" menu:helpid="31630" menu:label="~Options..."/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menu menu:id="slot:10" menu:label="~Data">
+ <menu:menupopup>
+ <menu:menuitem menu:id="slot:26320" menu:helpid="26320" menu:label="~Define Range..."/>
+ <menu:menuitem menu:id="slot:26321" menu:helpid="26321" menu:label="Select ~Range..."/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id="slot:26322" menu:helpid="26322" menu:label="~Sort..."/>
+ <menu:menu menu:id="slot:11" menu:label="~Filter">
+ <menu:menupopup>
+ <menu:menuitem menu:id="slot:26325" menu:helpid="26325" menu:label="Auto~Filter"/>
+ <menu:menuitem menu:id="slot:26323" menu:helpid="26323" menu:label="~Standard Filter..."/>
+ <menu:menuitem menu:id="slot:26324" menu:helpid="26324" menu:label="~Advanced Filter..."/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id="slot:26326" menu:helpid="26326" menu:label="~Remove Filter"/>
+ <menu:menuitem menu:id="slot:26341" menu:helpid="26341" menu:label="~Hide AutoFilter"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menuitem menu:id="slot:26328" menu:helpid="26328" menu:label="Sub~totals..."/>
+ <menu:menuitem menu:id="slot:26625" menu:helpid="26625" menu:label="~Validity..."/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id="slot:26154" menu:helpid="26154" menu:label="~Multiple Operations..."/>
+ <menu:menuitem menu:id="slot:26150" menu:helpid="26150" menu:label="~Consolidate..."/>
+ <menu:menu menu:id="slot:12" menu:label="~Outline">
+ <menu:menupopup>
+ <menu:menuitem menu:id="slot:26329" menu:helpid="26329" menu:label="~Hide Details"/>
+ <menu:menuitem menu:id="slot:26330" menu:helpid="26330" menu:label="~Show Details"/>
+ <menu:menuitem menu:id="slot:26331" menu:helpid="26331" menu:label="~Group..."/>
+ <menu:menuitem menu:id="slot:26332" menu:helpid="26332" menu:label="~Ungroup..."/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id="slot:26333" menu:helpid="26333" menu:label="~AutoOutline"/>
+ <menu:menuitem menu:id="slot:10234" menu:helpid="10234" menu:label="~Remove"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menu menu:id="slot:13" menu:label="Data~Pilot">
+ <menu:menupopup>
+ <menu:menuitem menu:id="slot:26151" menu:helpid="26151" menu:label="~Start..."/>
+ <menu:menuitem menu:id="slot:26314" menu:helpid="26314" menu:label="~Refresh"/>
+ <menu:menuitem menu:id="slot:26315" menu:helpid="26315" menu:label="~Delete"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id="slot:26643" menu:helpid="26643" menu:label="R~efresh Range"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menu menu:id="slot:5610" menu:label="~Window">
+ <menu:menupopup>
+ <menu:menuitem menu:id="slot:5620" menu:helpid="5620" menu:label="~New Window"/>
+ <menu:menuitem menu:id="slot:5621" menu:helpid="5621" menu:label="Close"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id="slot:26069" menu:helpid="26069" menu:label="~Split"/>
+ <menu:menuitem menu:id="slot:26070" menu:helpid="26070" menu:label="~Freeze"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menu menu:id="slot:5410" menu:label="~Help">
+ <menu:menupopup>
+ <menu:menuitem menu:id="slot:5401" menu:helpid="5401" menu:label="~Contents"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id="slot:5962" menu:helpid="5962" menu:label="Help ~Agent"/>
+ <menu:menuitem menu:id="slot:5404" menu:helpid="5404" menu:label="~Tips"/>
+ <menu:menuitem menu:id="slot:5403" menu:helpid="5403" menu:label="~Extended Tips"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id="slot:6537" menu:helpid="6537" menu:label="~Registration..."/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id="slot:5301" menu:helpid="5301" menu:label="A~bout OpenOffice.org..."/>
+ </menu:menupopup>
+ </menu:menu>
+</menu:menubar> \ No newline at end of file
diff --git a/scripting/workben/bindings/dialog.xlb b/scripting/workben/bindings/dialog.xlb
new file mode 100644
index 000000000000..c748a6bae13d
--- /dev/null
+++ b/scripting/workben/bindings/dialog.xlb
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd">
+<library:library xmlns:library="http://openoffice.org/2000/library" library:name="ScriptBindingLibrary" library:readonly="false" library:passwordprotected="false">
+ <library:element library:name="MenuBinding"/>
+ <library:element library:name="HelpBinding"/>
+ <library:element library:name="KeyBinding"/>
+</library:library> \ No newline at end of file
diff --git a/scripting/workben/bindings/script.xlb b/scripting/workben/bindings/script.xlb
new file mode 100644
index 000000000000..d27eea7c844d
--- /dev/null
+++ b/scripting/workben/bindings/script.xlb
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd">
+<library:library xmlns:library="http://openoffice.org/2000/library" library:name="ScriptBindingLibrary" library:readonly="false" library:passwordprotected="false">
+ <library:element library:name="ScriptBinding"/>
+</library:library> \ No newline at end of file
diff --git a/scripting/workben/bindings/writerkeybinding.xml b/scripting/workben/bindings/writerkeybinding.xml
new file mode 100644
index 000000000000..d5773a558bcd
--- /dev/null
+++ b/scripting/workben/bindings/writerkeybinding.xml
@@ -0,0 +1,95 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE accel:acceleratorlist PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "accelerator.dtd">
+<accel:acceleratorlist xmlns:accel="http://openoffice.org/2001/accel" xmlns:xlink="http://www.w3.org/1999/xlink">
+ <accel:item accel:code="KEY_DELETE" accel:shift="true" accel:mod1="true" xlink:href="slot:20927"/>
+ <accel:item accel:code="KEY_BACKSPACE" accel:shift="true" accel:mod1="true" xlink:href="slot:20928"/>
+ <accel:item accel:code="KEY_RETURN" accel:shift="true" accel:mod1="true" xlink:href="slot:20305"/>
+ <accel:item accel:code="KEY_PAGEDOWN" accel:shift="true" accel:mod1="true" xlink:href="slot:20963"/>
+ <accel:item accel:code="KEY_END" accel:shift="true" accel:mod1="true" xlink:href="slot:20808"/>
+ <accel:item accel:code="KEY_HOME" accel:shift="true" accel:mod1="true" xlink:href="slot:20807"/>
+ <accel:item accel:code="KEY_RIGHT" accel:shift="true" accel:mod1="true" xlink:href="slot:20821"/>
+ <accel:item accel:code="KEY_LEFT" accel:shift="true" accel:mod1="true" xlink:href="slot:20822"/>
+ <accel:item accel:code="KEY_UP" accel:shift="true" accel:mod1="true" xlink:href="slot:20947"/>
+ <accel:item accel:code="KEY_DOWN" accel:shift="true" accel:mod1="true" xlink:href="slot:20948"/>
+ <accel:item accel:code="KEY_F12" accel:shift="true" accel:mod1="true" xlink:href="slot:20137"/>
+ <accel:item accel:code="KEY_F11" accel:shift="true" accel:mod1="true" xlink:href="slot:5556"/>
+ <accel:item accel:code="KEY_F9" accel:shift="true" accel:mod1="true" xlink:href="slot:20143"/>
+ <accel:item accel:code="KEY_F5" accel:shift="true" accel:mod1="true" xlink:href="slot:20659"/>
+ <accel:item accel:code="KEY_T" accel:shift="true" accel:mod1="true" xlink:href="slot:20559"/>
+ <accel:item accel:code="KEY_R" accel:shift="true" accel:mod1="true" xlink:href="slot:20201"/>
+ <accel:item accel:code="KEY_P" accel:shift="true" accel:mod1="true" xlink:href="slot:20411"/>
+ <accel:item accel:code="KEY_I" accel:shift="true" accel:mod1="true" xlink:href="slot:20989"/>
+ <accel:item accel:code="KEY_F" accel:shift="true" accel:mod1="true" xlink:href="slot:20150"/>
+ <accel:item accel:code="KEY_B" accel:shift="true" accel:mod1="true" xlink:href="slot:20412"/>
+ <accel:item accel:code="KEY_MULTIPLY" accel:mod1="true" xlink:href="slot:20127"/>
+ <accel:item accel:code="KEY_SUBTRACT" accel:mod1="true" xlink:href="slot:20343"/>
+ <accel:item accel:code="KEY_ADD" accel:mod1="true" xlink:href="slot:20615"/>
+ <accel:item accel:code="KEY_DELETE" accel:mod1="true" xlink:href="slot:20929"/>
+ <accel:item accel:code="KEY_BACKSPACE" accel:mod1="true" xlink:href="slot:20930"/>
+ <accel:item accel:code="KEY_SPACE" accel:mod1="true" xlink:href="slot:20344"/>
+ <accel:item accel:code="KEY_RETURN" accel:mod1="true" xlink:href="slot:20323"/>
+ <accel:item accel:code="KEY_PAGEDOWN" accel:mod1="true" xlink:href="slot:20961"/>
+ <accel:item accel:code="KEY_PAGEUP" accel:mod1="true" xlink:href="slot:20960"/>
+ <accel:item accel:code="KEY_END" accel:mod1="true" xlink:href="slot:20908"/>
+ <accel:item accel:code="KEY_HOME" accel:mod1="true" xlink:href="slot:20907"/>
+ <accel:item accel:code="KEY_RIGHT" accel:mod1="true" xlink:href="slot:20921"/>
+ <accel:item accel:code="KEY_LEFT" accel:mod1="true" xlink:href="slot:20922"/>
+ <accel:item accel:code="KEY_F12" accel:mod1="true" xlink:href="slot:20330"/>
+ <accel:item accel:code="KEY_F11" accel:mod1="true" xlink:href="slot:5573"/>
+ <accel:item accel:code="KEY_F10" accel:mod1="true" xlink:href="slot:20224"/>
+ <accel:item accel:code="KEY_F9" accel:mod1="true" xlink:href="slot:20226"/>
+ <accel:item accel:code="KEY_F8" accel:mod1="true" xlink:href="slot:20225"/>
+ <accel:item accel:code="KEY_F7" accel:mod1="true" xlink:href="slot:20603"/>
+ <accel:item accel:code="KEY_F3" accel:mod1="true" xlink:href="slot:20620"/>
+ <accel:item accel:code="KEY_F2" accel:mod1="true" xlink:href="slot:20308"/>
+ <accel:item accel:code="KEY_Z" accel:mod1="true" xlink:href="slot:5701"/>
+ <accel:item accel:code="KEY_Y" accel:mod1="true" xlink:href="slot:5700"/>
+ <accel:item accel:code="KEY_U" accel:mod1="true" xlink:href="slot:10014"/>
+ <accel:item accel:code="KEY_R" accel:mod1="true" xlink:href="slot:10029"/>
+ <accel:item accel:code="KEY_L" accel:mod1="true" xlink:href="slot:10028"/>
+ <accel:item accel:code="KEY_J" accel:mod1="true" xlink:href="slot:10031"/>
+ <accel:item accel:code="KEY_I" accel:mod1="true" xlink:href="slot:10008"/>
+ <accel:item accel:code="KEY_E" accel:mod1="true" xlink:href="slot:10030"/>
+ <accel:item accel:code="KEY_D" accel:mod1="true" xlink:href="slot:20405"/>
+ <accel:item accel:code="KEY_B" accel:mod1="true" xlink:href="slot:10009"/>
+ <accel:item accel:code="KEY_5" accel:mod1="true" xlink:href="slot:10035"/>
+ <accel:item accel:code="KEY_2" accel:mod1="true" xlink:href="slot:10036"/>
+ <accel:item accel:code="KEY_1" accel:mod1="true" xlink:href="slot:10034"/>
+ <accel:item accel:code="KEY_BACKSPACE" accel:shift="true" xlink:href="slot:20942"/>
+ <accel:item accel:code="KEY_RETURN" accel:shift="true" xlink:href="slot:20318"/>
+ <accel:item accel:code="KEY_PAGEDOWN" accel:shift="true" xlink:href="slot:20830"/>
+ <accel:item accel:code="KEY_PAGEUP" accel:shift="true" xlink:href="slot:20829"/>
+ <accel:item accel:code="KEY_END" accel:shift="true" xlink:href="slot:20806"/>
+ <accel:item accel:code="KEY_HOME" accel:shift="true" xlink:href="slot:20805"/>
+ <accel:item accel:code="KEY_RIGHT" accel:shift="true" xlink:href="slot:20802"/>
+ <accel:item accel:code="KEY_LEFT" accel:shift="true" xlink:href="slot:20801"/>
+ <accel:item accel:code="KEY_UP" accel:shift="true" xlink:href="slot:20803"/>
+ <accel:item accel:code="KEY_DOWN" accel:shift="true" xlink:href="slot:20804"/>
+ <accel:item accel:code="KEY_F12" accel:shift="true" xlink:href="slot:20138"/>
+ <accel:item accel:code="KEY_F11" accel:shift="true" xlink:href="slot:5555"/>
+ <accel:item accel:code="KEY_F9" accel:shift="true" xlink:href="slot:20129"/>
+ <accel:item accel:code="KEY_F8" accel:shift="true" xlink:href="slot:20939"/>
+ <accel:item accel:code="KEY_F5" accel:shift="true" xlink:href="slot:20958"/>
+ <accel:item accel:code="KEY_REPEAT" xlink:href="slot:5702"/>
+ <accel:item accel:code="KEY_UNDO" xlink:href="slot:5701"/>
+ <accel:item accel:code="KEY_INSERT" xlink:href="slot:10221"/>
+ <accel:item accel:code="KEY_BACKSPACE" xlink:href="slot:20926"/>
+ <accel:item accel:code="KEY_ESCAPE" xlink:href="slot:20941"/>
+ <accel:item accel:code="KEY_RETURN" xlink:href="slot:20303"/>
+ <accel:item accel:code="KEY_PAGEDOWN" xlink:href="slot:20938"/>
+ <accel:item accel:code="KEY_PAGEUP" xlink:href="slot:20937"/>
+ <accel:item accel:code="KEY_END" xlink:href="slot:20906"/>
+ <accel:item accel:code="KEY_HOME" xlink:href="slot:20905"/>
+ <accel:item accel:code="KEY_RIGHT" xlink:href="slot:20902"/>
+ <accel:item accel:code="KEY_LEFT" xlink:href="slot:20901"/>
+ <accel:item accel:code="KEY_UP" xlink:href="slot:20903"/>
+ <accel:item accel:code="KEY_DOWN" xlink:href="slot:20904"/>
+ <accel:item accel:code="KEY_F12" xlink:href="slot:20144"/>
+ <accel:item accel:code="KEY_F11" xlink:href="slot:5539"/>
+ <accel:item accel:code="KEY_F9" xlink:href="slot:20126"/>
+ <accel:item accel:code="KEY_F8" xlink:href="slot:20940"/>
+ <accel:item accel:code="KEY_F7" xlink:href="slot:20622"/>
+ <accel:item accel:code="KEY_F5" xlink:href="slot:10366"/>
+ <accel:item accel:code="KEY_F3" xlink:href="slot:20628"/>
+ <accel:item accel:code="KEY_F2" xlink:href="slot:20128"/>
+</accel:acceleratorlist> \ No newline at end of file
diff --git a/scripting/workben/bindings/writermenubar.xml b/scripting/workben/bindings/writermenubar.xml
new file mode 100644
index 000000000000..00f722c9ccdf
--- /dev/null
+++ b/scripting/workben/bindings/writermenubar.xml
@@ -0,0 +1,275 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE menu:menubar PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "menubar.dtd">
+<menu:menubar xmlns:menu="http://openoffice.org/2001/menu" menu:id="menubar">
+ <menu:menu menu:id="slot:5510" menu:label="~File">
+ <menu:menupopup>
+ <menu:menuitem menu:id="script://HighlightText.showForm" menu:helpid="1001" menu:label="Highlight"/>
+ <menu:menuitem menu:id="slot:5537" menu:helpid="5537" menu:label="~New"/>
+ <menu:menuitem menu:id="slot:5501" menu:helpid="5501" menu:label="~Open..."/>
+ <menu:menuitem menu:id="slot:6381" menu:helpid="6381" menu:label="A~utoPilot"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id="slot:5503" menu:helpid="5503" menu:label="~Close"/>
+ <menu:menuitem menu:id="slot:5505" menu:helpid="5505" menu:label="~Save"/>
+ <menu:menuitem menu:id="slot:5502" menu:helpid="5502" menu:label="Save ~As..."/>
+ <menu:menuitem menu:id="slot:5309" menu:helpid="5309" menu:label="Sa~ve All"/>
+ <menu:menuitem menu:id="slot:5508" menu:helpid="5508" menu:label="Reload"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id="slot:6583" menu:helpid="6583" menu:label="Versions..."/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id="slot:6673" menu:helpid="6673" menu:label="Expor~t as PDF..."/>
+ <menu:menu menu:id="slot:1" menu:label="Sen~d">
+ <menu:menupopup>
+ <menu:menuitem menu:id="slot:5331" menu:helpid="5331" menu:label="Document as ~E-mail..."/>
+ <menu:menuitem menu:id="slot:6672" menu:helpid="6672" menu:label="Document as P~DF Attachment..."/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id="slot:20004" menu:helpid="20004" menu:label="Create Master ~Document"/>
+ <menu:menuitem menu:id="slot:20040" menu:helpid="20040" menu:label="Create ~HTML Document"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id="slot:20036" menu:helpid="20036" menu:label="Outline to ~Presentation"/>
+ <menu:menuitem menu:id="slot:20037" menu:helpid="20037" menu:label="Outline to ~Clipboard"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id="slot:21612" menu:helpid="21612" menu:label="Create A~utoAbstract..."/>
+ <menu:menuitem menu:id="slot:21613" menu:helpid="21613" menu:label="AutoAbst~ract to Presentation..."/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id="slot:5535" menu:helpid="5535" menu:label="Propert~ies..."/>
+ <menu:menu menu:id="slot:2" menu:label="~Templates">
+ <menu:menupopup>
+ <menu:menuitem menu:id="slot:5540" menu:helpid="5540" menu:label="~Organize..."/>
+ <menu:menuitem menu:id="slot:6655" menu:helpid="6655" menu:label="~Address Book Source..."/>
+ <menu:menuitem menu:id="slot:5538" menu:helpid="5538" menu:label="~Save..."/>
+ <menu:menuitem menu:id="slot:5594" menu:helpid="5594" menu:label="~Edit..."/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id="slot:5325" menu:helpid="5325" menu:label="Pa~ge Preview"/>
+ <menu:menuitem menu:id="slot:5504" menu:helpid="5504" menu:label="~Print..."/>
+ <menu:menuitem menu:id="slot:5302" menu:helpid="5302" menu:label="P~rinter Settings..."/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id="slot:20364" menu:helpid="20364" menu:label="For~m Letter..."/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id="slot:5300" menu:helpid="5300" menu:label="E~xit"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menu menu:id="slot:1" menu:label="~Edit">
+ <menu:menupopup>
+ <menu:menuitem menu:id="slot:5701" menu:helpid="5701" menu:label="Can&apos;t Undo"/>
+ <menu:menuitem menu:id="slot:5700" menu:helpid="5700" menu:label="Can&apos;t Restore"/>
+ <menu:menuitem menu:id="slot:5702" menu:helpid="5702" menu:label="~Repeat"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id="slot:5710" menu:helpid="5710" menu:label="Cu~t"/>
+ <menu:menuitem menu:id="slot:5711" menu:helpid="5711" menu:label="~Copy"/>
+ <menu:menuitem menu:id="slot:5712" menu:helpid="5712" menu:label="~Paste"/>
+ <menu:menuitem menu:id="slot:20114" menu:helpid="20114" menu:label="Paste ~Special..."/>
+ <menu:menuitem menu:id="slot:20989" menu:helpid="20989" menu:label="Select Text"/>
+ <menu:menuitem menu:id="slot:5723" menu:helpid="5723" menu:label="Select ~All"/>
+ <menu:menuseparator/>
+ <menu:menu menu:id="slot:1" menu:label="Chan~ges">
+ <menu:menupopup>
+ <menu:menuitem menu:id="slot:21825" menu:helpid="21825" menu:label="~Record"/>
+ <menu:menuitem menu:id="slot:21823" menu:helpid="21823" menu:label="~Protect Records..."/>
+ <menu:menuitem menu:id="slot:21826" menu:helpid="21826" menu:label="~Show"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id="slot:21829" menu:helpid="21829" menu:label="~Accept or Reject..."/>
+ <menu:menuitem menu:id="slot:21827" menu:helpid="21827" menu:label="~Comment..."/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id="slot:6587" menu:helpid="6587" menu:label="~Merge Document..."/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menuitem menu:id="slot:6586" menu:helpid="6586" menu:label="Compar~e Document..."/>
+ <menu:menuitem menu:id="slot:5961" menu:helpid="5961" menu:label="~Find &amp; Replace..."/>
+ <menu:menuitem menu:id="slot:10366" menu:helpid="10366" menu:label="~Navigator"/>
+ <menu:menuitem menu:id="slot:20620" menu:helpid="20620" menu:label="AutoTe~xt..."/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id="slot:20309" menu:helpid="20309" menu:label="Exc~hange Database..."/>
+ <menu:menuitem menu:id="slot:20104" menu:helpid="20104" menu:label="F~ields..."/>
+ <menu:menuitem menu:id="slot:20162" menu:helpid="20162" menu:label="Footnote~..."/>
+ <menu:menuitem menu:id="slot:20123" menu:helpid="20123" menu:label="Index Entr~y..."/>
+ <menu:menuitem menu:id="slot:21833" menu:helpid="21833" menu:label="~Bibliography Entry..."/>
+ <menu:menuitem menu:id="slot:21835" menu:helpid="21835" menu:label="H~yperlink"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id="slot:20109" menu:helpid="20109" menu:label="Lin~ks..."/>
+ <menu:menuitem menu:id="slot:6314" menu:helpid="6314" menu:label="P~lug-in"/>
+ <menu:menuitem menu:id="slot:10371" menu:helpid="10371" menu:label="ImageMap"/>
+ <menu:menuitem menu:id="slot:5575" menu:helpid="5575" menu:label="~Object"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menu menu:id="slot:2" menu:label="~View">
+ <menu:menupopup>
+ <menu:menuitem menu:id="slot:10000" menu:helpid="10000" menu:label="~Zoom..."/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id="slot:6660" menu:helpid="6660" menu:label="~Data Sources"/>
+ <menu:menuseparator/>
+ <menu:menu menu:id="slot:1" menu:label="~Toolbars">
+ <menu:menupopup>
+ <menu:menuitem menu:id="slot:5910" menu:helpid="5910" menu:label="~Function Bar"/>
+ <menu:menuitem menu:id="slot:5905" menu:helpid="5905" menu:label="~Object Bar"/>
+ <menu:menuitem menu:id="slot:5909" menu:helpid="5909" menu:label="Main ~Toolbar"/>
+ <menu:menuitem menu:id="slot:10360" menu:helpid="10360" menu:label="~Hyperlink Bar"/>
+ <menu:menuitem menu:id="slot:20128" menu:helpid="20128" menu:label="Fo~rmula Bar"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id="slot:5908" menu:helpid="5908" menu:label="Customi~ze..."/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menuitem menu:id="slot:20211" menu:helpid="20211" menu:label="~Ruler"/>
+ <menu:menuitem menu:id="slot:5920" menu:helpid="5920" menu:label="~Status Bar"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id="slot:20214" menu:helpid="20214" menu:label="Te~xt Boundaries"/>
+ <menu:menuitem menu:id="slot:20225" menu:helpid="20225" menu:label="Fie~ld Shadings"/>
+ <menu:menuitem menu:id="slot:20226" menu:helpid="20226" menu:label="~Fields"/>
+ <menu:menuitem menu:id="slot:20224" menu:helpid="20224" menu:label="~Nonprinting Characters"/>
+ <menu:menuitem menu:id="slot:20242" menu:helpid="20242" menu:label="~Hidden Paragraphs"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id="slot:6313" menu:helpid="6313" menu:label="~Online Layout"/>
+ <menu:menuitem menu:id="slot:5627" menu:helpid="5627" menu:label="F~ull Screen"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menu menu:id="slot:3" menu:label="~Insert">
+ <menu:menupopup>
+ <menu:menuitem menu:id="slot:20304" menu:helpid="20304" menu:label="Manual ~Break..."/>
+ <menu:menu menu:id="slot:1" menu:label="Fiel~ds">
+ <menu:menupopup>
+ <menu:menuitem menu:id="slot:20392" menu:helpid="20392" menu:label="~Date"/>
+ <menu:menuitem menu:id="slot:20393" menu:helpid="20393" menu:label="~Time"/>
+ <menu:menuitem menu:id="slot:20394" menu:helpid="20394" menu:label="~Page Numbers"/>
+ <menu:menuitem menu:id="slot:20395" menu:helpid="20395" menu:label="Page ~Count"/>
+ <menu:menuitem menu:id="slot:20396" menu:helpid="20396" menu:label="~Subject"/>
+ <menu:menuitem menu:id="slot:20397" menu:helpid="20397" menu:label="~Title"/>
+ <menu:menuitem menu:id="slot:20398" menu:helpid="20398" menu:label="~Author"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id="slot:20308" menu:helpid="20308" menu:label="~Other..."/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menuitem menu:id="slot:20328" menu:helpid="20328" menu:label="S~pecial Character..."/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id="slot:20345" menu:helpid="20345" menu:label="~Section..."/>
+ <menu:menuitem menu:id="slot:5678" menu:helpid="5678" menu:label="~Hyperlink"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id="slot:21413" menu:helpid="21413" menu:label="He~ader"/>
+ <menu:menuitem menu:id="slot:21414" menu:helpid="21414" menu:label="Foote~r"/>
+ <menu:menuitem menu:id="slot:20312" menu:helpid="20312" menu:label="Footnote~..."/>
+ <menu:menuitem menu:id="slot:20310" menu:helpid="20310" menu:label="Caption..."/>
+ <menu:menuitem menu:id="slot:20302" menu:helpid="20302" menu:label="Bookmar~k..."/>
+ <menu:menuitem menu:id="slot:20313" menu:helpid="20313" menu:label="Cross-reference..."/>
+ <menu:menuitem menu:id="slot:20329" menu:helpid="20329" menu:label="Not~e..."/>
+ <menu:menuitem menu:id="slot:21410" menu:helpid="21410" menu:label="S~cript..."/>
+ <menu:menu menu:id="slot:2" menu:label="Inde~xes and Tables">
+ <menu:menupopup>
+ <menu:menuitem menu:id="slot:20335" menu:helpid="20335" menu:label="~Entry..."/>
+ <menu:menuitem menu:id="slot:21420" menu:helpid="21420" menu:label="~Indexes and Tables..."/>
+ <menu:menuitem menu:id="slot:21421" menu:helpid="21421" menu:label="~Bibliography Entry..."/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id="slot:21050" menu:helpid="21050" menu:label="En~velope..."/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id="slot:20334" menu:helpid="20334" menu:label="Fra~me..."/>
+ <menu:menuitem menu:id="slot:20330" menu:helpid="20330" menu:label="~Table..."/>
+ <menu:menuitem menu:id="slot:21411" menu:helpid="21411" menu:label="Hori~zontal Line..."/>
+ <menu:menu menu:id="slot:3" menu:label="~Graphics">
+ <menu:menupopup>
+ <menu:menuitem menu:id="slot:10241" menu:helpid="10241" menu:label="From ~File..."/>
+ <menu:menu menu:id="slot:1" menu:label="Scan">
+ <menu:menupopup>
+ <menu:menuitem menu:id="slot:10331" menu:helpid="10331" menu:label="~Select Source..."/>
+ <menu:menuitem menu:id="slot:10332" menu:helpid="10332" menu:label="~Request..."/>
+ </menu:menupopup>
+ </menu:menu>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menu menu:id="slot:4" menu:label="~Object">
+ <menu:menupopup>
+ <menu:menuitem menu:id="slot:5561" menu:helpid="5561" menu:label="~OLE Object..."/>
+ <menu:menuitem menu:id="slot:5672" menu:helpid="5672" menu:label="~Plug-in..."/>
+ <menu:menuitem menu:id="slot:5676" menu:helpid="5676" menu:label="~Sound..."/>
+ <menu:menuitem menu:id="slot:5677" menu:helpid="5677" menu:label="~Video..."/>
+ <menu:menuitem menu:id="slot:5673" menu:helpid="5673" menu:label="~Applet..."/>
+ <menu:menuitem menu:id="slot:20369" menu:helpid="20369" menu:label="~Formula"/>
+ <menu:menuitem menu:id="slot:10140" menu:helpid="10140" menu:label="~Chart..."/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menuitem menu:id="slot:5563" menu:helpid="5563" menu:label="Float~ing Frame"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id="slot:5532" menu:helpid="5532" menu:label="~File..."/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menu menu:id="slot:5780" menu:label="F~ormat">
+ <menu:menupopup/>
+ </menu:menu>
+ <menu:menu menu:id="slot:4" menu:label="~Tools">
+ <menu:menupopup>
+ <menu:menu menu:id="slot:1" menu:label="~Spellcheck">
+ <menu:menupopup>
+ <menu:menuitem menu:id="slot:20622" menu:helpid="20622" menu:label="~Check..."/>
+ <menu:menuitem menu:id="slot:12021" menu:helpid="12021" menu:label="~AutoSpellcheck"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menuitem menu:id="slot:20603" menu:helpid="20603" menu:label="~Thesaurus..."/>
+ <menu:menuitem menu:id="slot:20605" menu:helpid="20605" menu:label="~Hyphenation..."/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id="slot:10424" menu:helpid="10424" menu:label="~AutoCorrect/AutoFormat..."/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id="slot:20612" menu:helpid="20612" menu:label="Outline ~Numbering..."/>
+ <menu:menuitem menu:id="slot:20602" menu:helpid="20602" menu:label="~Line Numbering..."/>
+ <menu:menuitem menu:id="slot:20468" menu:helpid="20468" menu:label="~Footnotes..."/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id="slot:5960" menu:helpid="5960" menu:label="~Gallery"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id="slot:10880" menu:helpid="10880" menu:label="~Bibliography Database"/>
+ <menu:menuitem menu:id="slot:10882" menu:helpid="10882" menu:label="~Data Sources..."/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id="slot:20500" menu:helpid="20500" menu:label="Te~xt &lt;-&gt; Table..."/>
+ <menu:menuitem menu:id="slot:20614" menu:helpid="20614" menu:label="So~rt..."/>
+ <menu:menuitem menu:id="slot:20615" menu:helpid="20615" menu:label="Calculat~e"/>
+ <menu:menu menu:id="slot:2" menu:label="~Update">
+ <menu:menupopup>
+ <menu:menuitem menu:id="slot:21828" menu:helpid="21828" menu:label="~Update All"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id="slot:20126" menu:helpid="20126" menu:label="~Fields"/>
+ <menu:menuitem menu:id="slot:21824" menu:helpid="21824" menu:label="~Links"/>
+ <menu:menuitem menu:id="slot:21834" menu:helpid="21834" menu:label="All ~Charts"/>
+ <menu:menuitem menu:id="slot:20654" menu:helpid="20654" menu:label="Current ~Index"/>
+ <menu:menuitem menu:id="slot:20653" menu:helpid="20653" menu:label="~All Indexes and Tables"/>
+ <menu:menuitem menu:id="slot:20161" menu:helpid="20161" menu:label="Page Formatting"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menuseparator/>
+ <menu:menu menu:id="slot:3" menu:label="~Macros">
+ <menu:menupopup>
+ <menu:menuitem menu:id="slot:6669" menu:helpid="6669" menu:label="~Record Macro"/>
+ <menu:menuitem menu:id="slot:5959" menu:helpid="5959" menu:label="~Macro..."/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menuitem menu:id="slot:5904" menu:helpid="5904" menu:label="~Configure..."/>
+ <menu:menu menu:id="slot:4" menu:label="Assign Script (Ja~va) To">
+ <menu:menupopup>
+ <menu:menuitem menu:id="macro:///ScriptBindingLibrary.ScriptBinding.ExecuteMenuBinding()" menu:label="~Menu..."/>
+ <menu:menuitem menu:id="macro:///ScriptBindingLibrary.ScriptBinding.ExecuteKeyBinding" menu:label="~Key..."/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menuitem menu:id="macro:///ScriptBindingLibrary.ScriptBinding.RefreshUserScripts()" menu:label="~Refresh User Scripts"/>
+ <menu:menuitem menu:id="slot:31630" menu:helpid="31630" menu:label="~Options..."/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menu menu:id="slot:5610" menu:label="~Window">
+ <menu:menupopup>
+ <menu:menuitem menu:id="slot:5620" menu:helpid="5620" menu:label="~New Window"/>
+ <menu:menuitem menu:id="slot:5621" menu:helpid="5621" menu:label="Close"/>
+ <menu:menuseparator/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menu menu:id="slot:5410" menu:label="~Help">
+ <menu:menupopup>
+ <menu:menuitem menu:id="slot:5401" menu:helpid="5401" menu:label="~Contents"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id="slot:5962" menu:helpid="5962" menu:label="Help ~Agent"/>
+ <menu:menuitem menu:id="slot:5404" menu:helpid="5404" menu:label="~Tips"/>
+ <menu:menuitem menu:id="slot:5403" menu:helpid="5403" menu:label="~Extended Tips"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id="slot:6537" menu:helpid="6537" menu:label="~Registration..."/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id="slot:5301" menu:helpid="5301" menu:label="A~bout OpenOffice.org..."/>
+ </menu:menupopup>
+ </menu:menu>
+</menu:menubar>