incubator-ooo-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ariel Constenla-Haile <arie...@apache.org>
Subject Re: Macros: from OO_2.0 to OO_3.4
Date Fri, 31 Aug 2012 00:19:00 GMT
Hi Ennio,

On Thu, Aug 30, 2012 at 10:40:03PM +0200, Ennio Sr wrote:
> Hi Ariel,
> the public area of my free web space should be accessible by anybody.
> Please try again, and if you do not succeed be so kind to suggest an
> alternate free public space web where I can upload the file: it's ony
> 24K large!
> Go to:
>  http://file.webalice.it
> and insert:
> - Username: mr.why
> - Password: guest
> 
> I hope it works ;-)

Yes, it worked, I needed the user name.

> I uploaded an .odt copy of my macros to: http://tinyurl.com/yee4a86
> The password, if required, is 'guest', and the file name
> 'Load_KbdCfg-copy.txt.odt'

The macro you copied there works fine in OpenOffice 3.4, it might be
a bug in Debian's version.

Try with following document
http://people.apache.org/~arielch/ShortCutManager.odt
It has the following macros, basically the same on your document:

REM  *****  BASIC  *****

Option Explicit

Sub Remove
    On Error GoTo RemoveErrHdlr
    Dim sCmd$
    Dim oShortCutMgr as Object
    Dim aKeyEvt As New com.sun.star.awt.KeyEvent
    aKeyEvt.Modifiers = com.sun.star.awt.KeyModifier.MOD2
    aKeyEvt.KeyCode = com.sun.star.awt.Key.NUM0
    sCmd= ".uno:About"
    oShortCutMgr = ThisComponent.UIConfigurationManager.ShortCutManager
    oShortCutMgr.removeKeyEvent(aKeyEvt, sCmd)
    oShortCutMgr.store()
    Exit Sub
RemoveErrHdlr:
    MsgBox "Error " & err & ": " & error$ + chr(13) + "In line : " + Erl + chr(13)
+ Now , 16 ,"An error occurred"
End Sub

Sub Add
    On Error GoTo AddErrHdlr
    Dim sCmd$
    Dim oShortCutMgr as Object
    Dim aKeyEvt As New com.sun.star.awt.KeyEvent
    aKeyEvt.Modifiers = com.sun.star.awt.KeyModifier.MOD2
    aKeyEvt.KeyCode = com.sun.star.awt.Key.NUM0
    sCmd= ".uno:About"
    oShortCutMgr = ThisComponent.UIConfigurationManager.ShortCutManager
    oShortCutMgr.setKeyEvent(aKeyEvt, sCmd)
    oShortCutMgr.store()
    Exit Sub
AddErrHdlr:
    MsgBox "Error " & err & ": " & error$ + chr(13) + "In line : " + Erl + chr(13)
+ Now , 16 ,"An error occurred"
End Sub


If they don't work in your OOo version, then it's a problem with the
version.


Regards
-- 
Ariel Constenla-Haile
La Plata, Argentina

Mime
View raw message