Sub LoadingLibraries
BasicLibraries.LoadLibrary( "XrayTool" )
End Sub
Sub InspectDesktop
Xray StarDesktop
End Sub
Sub InspectDocument
Xray ThisComponent
End Sub
Option Explicit
Sub somethingRows
Dim oDoc as object, oSelect as object, oRows as object
oDoc = ThisComponent : oSelect = oDoc.CurrentSelection : oRows = oSelect.Rows
Xray oRows
End Sub
Villeroy wrote:OK, you can not record any actions in the office GUI, but your actions in the MRI tool gets recorded.
Sub Snippet
Dim oCurrentSelection As Object
oCurrentSelection = ThisComponent.CurrentSelection
End Sub
Sub Snippet
Dim oCurrentSelection As Object
Dim oObj_1 As Object
oCurrentSelection = ThisComponent.CurrentSelection
oObj_1 = oCurrentSelection.createTextCursor()
End Sub
Globalscope.BasicLibraries.LoadLibrary( "MRILib" )
Dim oMRI As Object
oMRI = CreateUnoService( "mytools.Mri" )
oMRI.inspect( MriTargetObject )
One of the advantages that I have seen in MRI (apart from the code generation) was the ability to get it working without the need to write a macro through the menu commands in Tools -> Add-Ons.
Jimster2012 wrote:MRI it brings up a windows of properties, methods and so forth but that is about as far as I can work it. I get no explanation of anything
When I try and select something like a method the selection windows keeps opening and says void.
Most people use MRI on their environment which is used on daily use also. So I do not want to add any entries for MRI on main menu or toolbars. I know addon's configuration for menu entries and toolbar entries can be provided in other package, so it might be good idea for me.rudolfo wrote:Nice for the novice user, but quite frankly the target group of Xray and MRI are rather power users or macro programmers, so they should be able to create their custom menu commands rather quickly.
I'm sorry, its my misunderstanding.My main point in my post was that it is not really difficult to do something similar with Xray
If someone write a full documentation for all objects of the office, it would be the more readable documentation, and you can use MRI to get list of method or properties from objects. But the office has extendablity by extensions and they can be provide their own API and the default implementation of the office might be replaced with the objects provided by them. For example, I wanted to print page number like 001, 002, ... which can not be done by the default implementation of the numbering service. I made a wrapper for the default numbering service and provider a numbering format I wanted to use. This was a simple situation but some part of the office can be done like that except for core implementation.Jimster2012 wrote:Am I correct that MRI cannot be used as a teaching aid? I would hate to have to purchase Microsoft Office to get started on programming learning but it seems like that is where all of the learning tutorials are.
I think so too, but there is the document about UNO: http://wiki.services.openoffice.org/wik ... sional_UNOJimster2012 wrote:The MRI documentation isn't very good unless you already have a thorough understanding of all of this.
The API of the office provide introspection mechanism to get information of an object itself and MRI and X-Ray use it, but they do not have any built-in documentation. If someone write documentation for each objects, they can link to them.Jimster2012 wrote:I was hoping that the MRI program would explain all of the services, methods and what they do but it looks like it assumes you already know what to do and what services you need to use and them explains them to you in your code which doesn't make sense at all to me because if you already know what interfaces and so forth you need, then you wouldn't need MRI or x-ray. lol.
I could say for this kind of open source project, it was not prepared. You can find File - Output entries on the menu of the MRI window, these menu write informations about object to permanent file. I add that kind of feature to documentation purpose but I need some writer. The UNO is now large implementation which has over 4000 files to define.Jimster2012 wrote:I think I will go ahead and just do it as a database but as far as learning any programming side of this I think I will have to eventually purchase MS Office as it seems like OpenOffice and LibreOffice are geared to professionals programmers already in the know.
Users browsing this forum: No registered users and 4 guests