diff options
author | Noel Power <npower@openoffice.org> | 2003-02-26 11:52:59 +0000 |
---|---|---|
committer | Noel Power <npower@openoffice.org> | 2003-02-26 11:52:59 +0000 |
commit | 6e90891a06ac629418a77bff9b3e2641570a70d1 (patch) | |
tree | d74c6f024c58d95ae52a3d157dc0b084a5d68455 /scripting/workben/bindings | |
parent | dc56ba3b948a9e2706e1d2e1f374f291e177776b (diff) |
Checking in Neils modifications for EventBinding (after review) and test.
Diffstat (limited to 'scripting/workben/bindings')
-rw-r--r-- | scripting/workben/bindings/EventsBinding.xdl | 2 | ||||
-rw-r--r-- | scripting/workben/bindings/ScriptBinding.xba | 470 |
2 files changed, 228 insertions, 244 deletions
diff --git a/scripting/workben/bindings/EventsBinding.xdl b/scripting/workben/bindings/EventsBinding.xdl index 684b672772db..e8df4667fec5 100644 --- a/scripting/workben/bindings/EventsBinding.xdl +++ b/scripting/workben/bindings/EventsBinding.xdl @@ -13,7 +13,7 @@ <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="3" dlg:left="57" dlg:top="192" 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"/> + <script:event script:event-name="on-performaction" script:location="application" script:macro-name="ScriptBindingLibrary.ScriptBinding.EventOKButton" script:language="StarBasic"/> </dlg:button> <dlg:fixedline dlg:id="FixedLine4" dlg:tab-index="4" dlg:left="76" dlg:top="99" dlg:width="98" dlg:height="5"/> <dlg:text dlg:id="Label4" dlg:tab-index="5" dlg:left="5" dlg:top="97" dlg:width="71" dlg:height="8" dlg:value="Choose Event to assign to"/> diff --git a/scripting/workben/bindings/ScriptBinding.xba b/scripting/workben/bindings/ScriptBinding.xba index 9a4fe9721f69..d1e16353f2a1 100644 --- a/scripting/workben/bindings/ScriptBinding.xba +++ b/scripting/workben/bindings/ScriptBinding.xba @@ -64,12 +64,13 @@ private keyAllocationMap(6,25) as new com.sun.star.beans.PropertyValue private AllKeyGroupsArray(6) as String -'Array to store all event bindings for the Applications +'Array of props to store all event bindings for the Applications private allEventTypesApp( 14 ) as new com.sun.star.beans.PropertyValue -'Array to store all event types -private allEventTypes( 14 ) as string -'Array to store textual description for all event types -private allEventTypesAsText( 14 ) as string +'Array of props to store all event bindings for the Document +private allEventTypesDoc( 14 ) as new com.sun.star.beans.PropertyValue +'Array of props to store all event types (Name) and textual description (Value) +private allEventTypes( 14 ) as new com.sun.star.beans.PropertyValue + REM ------ Storage Refresh Function ------ @@ -232,9 +233,13 @@ Sub ExecuteEventBinding createAllEventTypes() createAllEventBindings() + 'Populate application event bindings array (from config xml file) if not (ReadXMLToArray( "Event" )) then Exit Sub endif + 'Populate document event bindings array (using Office API calls) + ReadEventsFromDoc() + bindingDialog = LoadDialog( "ScriptBindingLibrary", "EventsBinding" ) initialiseNavigationComboArrays() PopulateLanguageCombo() @@ -287,7 +292,6 @@ end function function GetDocumentType( bindingType as string ) as string document = StarDesktop.ActiveFrame.Controller.Model - 'msgbox document.dbg_supportedinterfaces Dim errornumber As Integer errornumber = 111 Error errornumber @@ -433,7 +437,7 @@ function ReadXMLToArray( bindingType as string ) as boolean elseif bindingType = "Key" then processKeyXMLLine( lineCount, xmlline ) elseif bindingType = "Event" then - evaluateForEvent( xmlline, lineCount ) + evaluateForEvent( xmlline, lineCount ) else MsgBox ("Error: Couldn't determine file type" + chr$(10) + chr$(10) + "Action: Please reinstall Scripting Framework",0,"Error" ) end if @@ -472,26 +476,110 @@ end sub sub evaluateForEvent( xmlline as string, lineCount as integer ) dim eventName as String 'if the xml line identifies a script or SB macro - dim scriptProp as new com.sun.star.beans.PropertyValue + dim scriptName as string + dim lineNumber as integer if instr( xmlline, "event:language=" + chr$(34) + "Script" ) > 0 then - eventName = ExtractEventNameFromXMLLine( xmlline ) - scriptProp.Name = ExtractEventScriptFromXMLLine( xmlline ) - scriptProp.Value = lineCount - + scriptName = ExtractEventScriptFromXMLLine( xmlline ) + lineNumber = lineCount elseif instr( xmlline, "event:language=" + chr$(34) + "StarBasic" ) > 0 then - eventName = ExtractEventNameFromXMLLine( xmlline ) - scriptProp.Name = "Allocated to Office function" - scriptProp.Value = 1 + eventName = ExtractEventNameFromXMLLine( xmlline ) + scriptName = "Allocated to Office function" + lineNumber = 1 end if + + 'Need to sequence to find the corresponding index for the event type for n = 0 to ubound( allEventTypesApp() ) - if ( eventName = allEventTypes( n ) ) then - allEventTypesApp( n ).Value = scriptProp + if ( eventName = allEventTypes( n ).Name ) then + allEventTypesApp( n ).Name = scriptName + allEventTypesApp( n ).Value = lineNumber end if next n end sub +sub ReadEventsFromDoc() + On Error Goto ErrorHandler + + eventSupplier = ThisComponent + for n = 0 to ubound( allEventTypes() ) + scriptProps = eventSupplier.getEvents().getByName( allEventTypes( n ).Name ) + if ( ubound( scriptProps ) > 0 ) then + if ( scriptProps(0).Value = "Script" ) then + 'Script binding + allEventTypesDoc(n).Name = scriptProps(1).Value + allEventTypesDoc(n).value = 2 + elseif( scriptProps(0).Value = "StarBasic" ) then + 'StarBasic macro + allEventTypesDoc(n).Name = "Allocated to Office function" + allEventTypesDoc(n).value = 1 + end if + end if + next n + + exit sub + + ' eventProps is undefined if there are no event bindings in the doc + ErrorHandler: + reset +end sub + + +sub WriteEventsToDoc() + On Error Goto ErrorHandler + + eventSupplier = ThisComponent + for n = 0 to ubound( allEventTypes() ) + scriptName = allEventTypesDoc( n ).Name + eventName = allEventTypes( n ).Name + if( allEventTypesDoc( n ).Value > 1 ) then 'script + 'add to doc + AddEventToDocViaAPI( scriptName, eventName ) + elseif( allEventTypesDoc( n ).Value = 0 ) then 'blank (this will "remove" already blank entries) + 'remove from doc + RemoveEventFromDocViaAPI( eventName ) + endif + 'Otherwise it is a StarBasic binding - leave alone + next n + + exit sub + + ErrorHandler: + reset + msgbox( "Error calling UNO API for writing event bindings to the document" ) +end sub + + +sub RemoveEventFromDocViaAPI( event as string ) + dim document as object + dim dispatcher as object + dim parser as object + dim url as new com.sun.star.util.URL + + document = ThisComponent.CurrentController.Frame + parser = createUnoService("com.sun.star.util.URLTransformer") + dim args(0) as new com.sun.star.beans.PropertyValue + args(0).Name = "" + args(0).Value = event + url.Complete = "script://ScriptFrmwrkHelper.removeEvent?language=Java+function=ScriptFrmwrkHelper.removeEvent+location=user" + parser.parseStrict(url) + disp = document.queryDispatch(url,"",0) + disp.dispatch(url,args()) +end sub + + +sub AddEventToDocViaAPI( scriptName as string, eventName as string ) + dim properties( 1 ) as new com.sun.star.beans.PropertyValue + properties( 0 ).Name = "EventType" + properties( 0 ).Value = "Script" + properties( 1 ).Name = "URL" + properties( 1 ).Value = scriptName + + eventSupplier = ThisComponent + 'eventSupplier = StarDesktop.ActiveFrame.Controller.Model + nameReplace = eventSupplier.getEvents() + nameReplace.replaceByName( eventName, properties() ) +end sub ' returns 0 for Fkey @@ -640,50 +728,28 @@ sub UpdateConfig( a$ ) End Sub -sub AddNewEventBindingDoc( scriptName as string, eventName as string ) - dim properties( 1 ) as new com.sun.star.beans.PropertyValue - properties( 0 ).Name = "EventType" - properties( 0 ).Value = "Script" - properties( 1 ).Name = "URL" - properties( 1 ).Value = scriptName - - eventSupplier = ThisComponent - 'eventSupplier = StarDesktop.ActiveFrame.Controller.Model - nameReplace = eventSupplier.getEvents() - nameReplace.replaceByName( eventName, properties() ) -end sub - -sub AddNewEventBindingApp( scriptName as string, eventBinding as string ) - - for n = 0 to ubound( allEventTypesApp() ) - if strcomp( allEventTypesApp( n ).Name, eventBinding, 1 ) = 0 then - dim scriptProp as new com.sun.star.beans.PropertyValue - scriptProp.Name = scriptName - scriptProp.Value = numberOfLines - allEventTypesApp( n ).Value = scriptProp - exit for - end if - next n - - newline = " <event:event event:name=" + chr$(34) + eventBinding + chr$(34) - newline = newline + " event:language=" + chr$(34) + "Script" + chr$(34) + " xlink:href=" + chr$(34) - newline = newline + scriptName + chr$(34) + " xlink:type=" + chr$(34) + "simple" + chr$(34) + "/>" +sub AddNewEventBinding( scriptName as string, eventPosition as integer, isApp as boolean ) + event = allEventTypes( eventPosition ).Name + 'dim scriptProp as new com.sun.star.beans.PropertyValue + if isApp then + 'scriptProp.Name = scriptName + 'scriptProp.Value = numberOfLines + allEventTypesApp( eventPosition ).Name = scriptName + allEventTypesApp( eventPosition ).Value = numberOfLines - 'msgbox ( "numberOfLines is " + numberOfLines ) - for n = 1 to numberOfLines - if n = numberOfLines then - 'msgbox ( "Adding new line: " + newline + " " + n) - 'msgbox ( "Adding last line: </event:events>"+ n ) - xmlFile( n ) = newline - xmlFile( n + 1 ) = "</event:events>" - exit for - else - 'msgbox ( "Adding line: " + xmlFile( n )+ " " + n ) - xmlFile( n ) = xmlFile( n ) - end if - next n - numberOfLines = numberOfLines + 1 + newline = " <event:event event:name=" + chr$(34) + event + chr$(34) + newline = newline + " event:language=" + chr$(34) + "Script" + chr$(34) + " xlink:href=" + chr$(34) + newline = newline + scriptName + chr$(34) + " xlink:type=" + chr$(34) + "simple" + chr$(34) + "/>" + xmlFile( numberOfLines ) = newline + xmlFile( numberOfLines + 1 ) = "</event:events>" + numberOfLines = numberOfLines + 1 + else + 'scriptProp.Name = scriptName + 'scriptProp.Value = 2 + allEventTypesDoc( eventPosition ).Name = scriptName + allEventTypesDoc( eventPosition ).Value = 2 + end if end sub REM ----- Array update functions ----- @@ -1032,57 +1098,39 @@ sub PopulateKeyBindingList( keyGroupIndex as Integer ) end sub sub populateEventList( focusPosition as integer ) - on error goto ErrorHandler - allApps = bindingDialog.getControl( "AllAppsOption" ) eventList = bindingDialog.getControl( "EventList" ) eventList.removeItems( 0, eventList.getItemCount() ) - - ' use allEventTypes() to fill list box - ' for each element compare with allEventTypesApp - - if allApps.state = true then ' Application event - for n = 0 to ubound( allEventTypesAsText() ) - stringToAdd = "" - scriptProp = allEventTypesApp( n ).Value - ' If the line number is 1 then SB macro - ' more than 1 it is the line number of the script - if ( scriptProp.Value = 1 ) then - stringToAdd = stringToAdd + " [Allocated to Office function]" - elseif ( scriptProp.Value > 1 ) then - stringToAdd = stringToAdd + " [" + scriptProp.Name + "]" - end if - eventList.addItem( allEventTypesAsText( n ) + " " + stringToAdd, n ) - next n - else 'Document event - for n = 0 to ubound( allEventTypes() ) - displayLine = allEventTypesAsText( n ) - eventSupplier = ThisComponent - scriptProps = eventSupplier.getEvents().getByName( allEventTypes( n ) ) - if ( UBOUND( scriptProps ) > 0 ) then - if ( UBOUND( scriptProps ) = 2 ) then - ' Starbasic script - displayLine = displayLine + " [Allocated to Office function]" - else - displayLine = displayLine + " [" + scriptProps(1).Value + "]" - end if - end if - eventList.addItem( displayLine, n ) 'add doc event info later - next n - + + dim isApp as boolean + if allApps.state = true then ' Application event + isApp = true + else + isApp = false end if - - eventList.selectItemPos( focusPosition, true ) - Exit Sub - - ' eventProps is undefined if there are no event bindings in the doc - ErrorHandler: - reset - for n = 0 to ubound( allEventTypesAsText() ) - eventList.addItem( allEventTypesAsText(n), n ) + + ' use allEventTypes() to fill list box + ' for each element compare with allEventTypesApp + dim scriptName as string + dim lineNumber as integer + for n = 0 to ubound( allEventTypes() ) + ' If the line number is 1 then SB macro + ' more than 1 it is the line number of the script + if isApp then + lineNumber = allEventTypesApp( n ).Value + scriptName = allEventTypesApp( n ).Name + else + lineNumber = allEventTypesDoc( n ).Value + scriptName = allEventTypesDoc( n ).Name + end if + stringToAdd = "" + if ( lineNumber >= 1 ) then + stringToAdd = " [" + scriptName + "]" + end if + eventList.addItem( allEventTypes( n ).Value + " " + stringToAdd, n ) next n - eventList.selectItemPos( focusPosition, true ) + eventList.selectItemPos( focusPosition, true ) end sub @@ -1125,92 +1173,53 @@ end sub sub createAllEventTypes() - allEventTypes( 0 ) = "OnStartApp" - allEventTypes( 1 ) = "OnCloseApp" - allEventTypes( 2 ) = "OnNew" - allEventTypes( 3 ) = "OnLoad" - allEventTypes( 4 ) = "OnSaveAs" - allEventTypes( 5 ) = "OnSaveAsDone" - allEventTypes( 6 ) = "OnSave" - allEventTypes( 7 ) = "OnSaveDone" - allEventTypes( 8 ) = "OnPrepareUnload" - allEventTypes( 9 ) = "OnUnload" - allEventTypes( 10 ) = "OnFocus" - allEventTypes( 11 ) = "OnUnfocus" - allEventTypes( 12 ) = "OnPrint" - allEventTypes( 13 ) = "OnError" - allEventTypes( 14 ) = "OnNewMail" - - allEventTypesAsText(0) = "Start Application" - allEventTypesAsText(1) = "Close Application" - allEventTypesAsText(2) = "Create Document" - allEventTypesAsText(3) = "Open Document" - allEventTypesAsText(4) = "Save Document As" - allEventTypesAsText(5) = "Document has been saved as" - allEventTypesAsText(6) = "Save Document" - allEventTypesAsText(7) = "Document has been saved" - allEventTypesAsText(8) = "Close Document" - allEventTypesAsText(9) = "Close Document" - allEventTypesAsText(10) = "Activate document" - allEventTypesAsText(11) = "DeActivate document" - allEventTypesAsText(12) = "Print Document" - allEventTypesAsText(13) = "JavaScript Error" - allEventTypesAsText(14) = "Message received" - + allEventTypes( 0 ).Name = "OnStartApp" + allEventTypes( 0 ).Value = "Start Application" + allEventTypes( 1 ).Name = "OnCloseApp" + allEventTypes( 1 ).Value = "Close Application" + allEventTypes( 2 ).Name = "OnNew" + allEventTypes( 2 ).Value = "Create Document" + allEventTypes( 3 ).Name = "OnLoad" + allEventTypes( 3 ).Value = "Open Document" + allEventTypes( 4 ).Name = "OnSaveAs" + allEventTypes( 4 ).Value = "Save Document As" + allEventTypes( 5 ).Name = "OnSaveAsDone" + allEventTypes( 5 ).Value = "Document has been saved as" + allEventTypes( 6 ).Name = "OnSave" + allEventTypes( 6 ).Value = "Save Document" + allEventTypes( 7 ).Name = "OnSaveDone" + allEventTypes( 7 ).Value = "Document has been saved" + allEventTypes( 8 ).Name = "OnPrepareUnload" + allEventTypes( 8 ).Value = "Close Document" + allEventTypes( 9 ).Name = "OnUnload" + allEventTypes( 9 ).Value = "Close Document" + allEventTypes( 10 ).Name = "OnFocus" + allEventTypes( 10 ).Value = "Activate document" + allEventTypes( 11 ).Name = "OnUnfocus" + allEventTypes( 11 ).Value = "DeActivate document" + allEventTypes( 12 ).Name = "OnPrint" + allEventTypes( 12 ).Value = "Print Document" + allEventTypes( 13 ).Name = "OnError" + allEventTypes( 13 ).Value = "JavaScript Error" + allEventTypes( 14 ).Name = "OnNewMail" + allEventTypes( 14 ).Value = "Message received" end sub sub createAllEventBindings() - dim props as new com.sun.star.beans.PropertyValue - props.Name = "" - props.Value = 0 + 'dim props as new com.sun.star.beans.PropertyValue + 'props.Name = "" 'Name = script name + 'props.Value = 0 'Value = 0 for empty, 1 for macro, linenumber for script ' Creates all types of event bindings for both Application and Document ' Initially both arrays have no bindings allocated to the events - allEventTypesApp( 0 ).Name = "OnStartApp" - allEventTypesApp( 0 ).Value = props - - allEventTypesApp( 1 ).Name = "OnCloseApp" - allEventTypesApp( 1 ).Value = props - - allEventTypesApp( 2 ).Name = "OnNew" - allEventTypesApp( 2 ).Value = props - - allEventTypesApp( 3 ).Name = "OnLoad" - allEventTypesApp( 3 ).Value = props - - allEventTypesApp( 4 ).Name = "OnSaveAs" - allEventTypesApp( 4 ).Value = props - - allEventTypesApp( 5 ).Name = "OnSaveAsDone" - allEventTypesApp( 5 ).Value = props - - allEventTypesApp( 6 ).Name = "OnSave" - allEventTypesApp( 6 ).Value = props - - allEventTypesApp( 7 ).Name = "OnSaveDone" - allEventTypesApp( 7 ).Value = props - - allEventTypesApp( 8 ).Name = "OnPrepareLoad" - allEventTypesApp( 8 ).Value = props - - allEventTypesApp( 9 ).Name = "OnUnload" - allEventTypesApp( 9 ).Value = props - - allEventTypesApp( 10 ).Name = "OnFocus" - allEventTypesApp( 10 ).Value = props - - allEventTypesApp( 11 ).Name = "OnUnfocus" - allEventTypesApp( 11 ).Value = props - - allEventTypesApp( 12 ).Name = "OnPrint" - allEventTypesApp( 12 ).Value = props - - allEventTypesApp( 13 ).Name = "OnError" - allEventTypesApp( 13 ).Value = props - - allEventTypesApp( 14 ).Name = "OnNewMail" - allEventTypesApp( 14 ).Value = props + ' The value for Doc is only Script/macro name (no need for line number) + for n = 0 to ubound( allEventTypes() ) + allEventTypesApp( n ).Name = "" + allEventTypesApp( n ).Value = 0 + allEventTypesDoc( n ).Name = "" + allEventTypesDoc( n ).Value = 0 + next n end sub @@ -1271,7 +1280,6 @@ function ExtractEventNameFromXMLLine( xmlline as string ) idEnd = instr( xmlline, chr$(34)+" event:language" ) idLength = idEnd - idStart event = mid( xmlline, idStart, idLength ) - 'msgbox ( "event: " + event ) ExtractEventNameFromXMLLine() = event end function @@ -1473,41 +1481,24 @@ sub EventListListener() eventPos = eventList.getSelectedItemPos() allApps = bindingDialog.getControl( "AllAppsOption" ) + + dim binding as integer if allApps.state = true then - 'if the name is blank then the event is unassigned or assigned to a macro - binding = allEventTypesApp( eventPos ).Value.Value - - if ( binding > 1 ) then - bindingDialog.Model.Delete.enabled = true - else - bindingDialog.Model.Delete.enabled = false - end if + binding = allEventTypesApp( eventPos ).Value else - event = allEventTypes( eventPos ) - 'if doc bindings - 'sequence through doc bindings using api - 'when find matching event - see if script or macro - dim prop as new com.sun.star.beans.PropertyValue - eventSupplier = StarDesktop.ActiveFrame.Controller.Model - scriptProps = eventSupplier.getEvents().getByName( event ) - 'msgbox ("listener scriptprops has " + UBOUND( scriptProps ) + "elems") - if ( UBOUND( scriptProps ) >= 0 ) then - if ( UBOUND( scriptProps ) = 2 ) then - ' Starbasic script - bindingDialog.Model.Delete.enabled = false - else - bindingDialog.Model.Delete.enabled = true - end if - else - bindingDialog.Model.Delete.enabled = false - end if - end if - + binding = allEventTypesDoc( eventPos ).Value + endif + + if ( binding > 1 ) then + bindingDialog.Model.Delete.enabled = true + else + bindingDialog.Model.Delete.enabled = false + end if + exit sub ErrorHandler: reset - 'msgbox ( "EventListListener: ErrorHandler called" ) bindingDialog.Model.Delete.enabled = false end sub @@ -1653,16 +1644,16 @@ sub EventNewButton() scriptURI = getScriptURI( selectedScript ) eventList = bindingDialog.getControl( "EventList" ) eventPosition = eventList.getSelectedItemPos() - event = allEventTypes( eventPosition ) - 'msgbox ( "script is: " + scriptLogical + " and event is " + event ) allApps = bindingDialog.getControl( "AllAppsOption" ) + dim isApp as boolean if allApps.state = true then 'Application - AddNewEventBindingApp( scriptURI, event ) + isApp = true else 'Document - AddNewEventBindingDoc( scriptURI, event ) + isApp = false end if - + AddNewEventBinding( scriptURI, eventPosition, isApp ) + populateEventList( eventPosition ) EventListListener() end sub @@ -1675,39 +1666,32 @@ sub EventDeleteButton() allApps = bindingDialog.getControl( "AllAppsOption" ) if allApps.state = true then 'Application - eventProp = allEventTypesApp( eventPosition ).Value - linePosition = eventProp.Value - eventProp.Name = "" - eventProp.Value = 0 - allEventTypesApp( eventPosition ).Value = eventProp + linePosition = allEventTypesApp( eventPosition ).Value + 'dim eventProp as new com.sun.star.beans.PropertyValue + 'eventProp.Name = "" + 'eventProp.Value = 0 + allEventTypesApp( eventPosition ).Name = "" + allEventTypesApp( eventPosition ).Value = 0 RemoveBinding( linePosition ) else 'Document - DeleteEvent( allEventTypes( eventPosition ) ) + 'DeleteEvent( allEventTypes( eventPosition ) ) + allEventTypesDoc( eventPosition ).Name = "" + allEventTypesDoc( eventPosition ).Value = 0 end if PopulateEventList( eventPosition ) EventListListener() - end sub -sub HelpOKButton() - helpDialog.endExecute() + +sub EventOKButton + WriteEventsToDoc() + WriteXMLFromArray() + bindingDialog.endExecute() end sub -sub DeleteEvent( event as String ) - dim document as object - dim dispatcher as object - dim parser as object - dim url as new com.sun.star.util.URL - document = ThisComponent.CurrentController.Frame - parser = createUnoService("com.sun.star.util.URLTransformer") - dim args(0) as new com.sun.star.beans.PropertyValue - args(0).Name = "" - args(0).Value = event - url.Complete = "script://ScriptFrmwrkHelper.removeEvent?language=Java+function=ScriptFrmwrkHelper.removeEvent+location=user" - parser.parseStrict(url) - disp = document.queryDispatch(url,"",0) - disp.dispatch(url,args()) -end sub -</script:module> +sub HelpOKButton() + helpDialog.endExecute() +end sub +</script:module>
\ No newline at end of file |