Class: RubyScriptProvider::ScriptContext
- Inherits:
-
Object
- Object
- RubyScriptProvider::ScriptContext
- Includes:
- Runo::Com::Sun::Star::Script::Provider::XScriptContext, Uno::UnoBase
- Defined in:
- lib/rubyscriptprovider.rb
Overview
class for XSCRIPTCONTEXT constant
Instance Method Summary collapse
-
#getComponentContext ⇒ Object
XScriptContext.
- #getDesktop ⇒ Object
- #getDocument ⇒ Object
- #getInvocationContext ⇒ Object
-
#initialize(component_context, document, inv) ⇒ ScriptContext
constructor
A new instance of ScriptContext.
Methods included from Uno::UnoBase
#getImplementationId, #getTypes
Constructor Details
#initialize(component_context, document, inv) ⇒ ScriptContext
Returns a new instance of ScriptContext.
136 137 138 139 140 |
# File 'lib/rubyscriptprovider.rb', line 136 def initialize(component_context, document, inv) @component_context = component_context @document = document @inv = inv end |
Instance Method Details
#getComponentContext ⇒ Object
XScriptContext
143 144 145 |
# File 'lib/rubyscriptprovider.rb', line 143 def getComponentContext return @component_context end |
#getDesktop ⇒ Object
152 153 154 155 |
# File 'lib/rubyscriptprovider.rb', line 152 def getDesktop return @component_context.getServiceManager.createInstanceWithContext( "com.sun.star.frame.Desktop", @component_context) end |
#getDocument ⇒ Object
147 148 149 150 |
# File 'lib/rubyscriptprovider.rb', line 147 def getDocument return @document if @document return getDesktop.getCurrentComponent end |
#getInvocationContext ⇒ Object
157 158 159 |
# File 'lib/rubyscriptprovider.rb', line 157 def getInvocationContext return @inv end |