8 messages in org.openoffice.fr.progRe: [prog] [calc]repérer les casses
FromSent OnAttachments
Bernard Siaud alias TroumadSep 2, 2007 8:31 am 
Francois GattoSep 3, 2007 1:00 am 
Bernard Siaud alias TroumadSep 3, 2007 6:50 am 
Francois GattoSep 3, 2007 7:34 am 
Bernard Siaud alias TroumadOct 14, 2007 2:02 pm 
Francois GattoOct 15, 2007 9:38 pm 
Bernard Siaud alias TroumadOct 15, 2007 9:49 pm 
Francois GattoOct 15, 2007 9:51 pm 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: [prog] [calc]repérer les cassesActions...
From:Bernard Siaud alias Troumad (lis@siaud.org)
Date:Sep 3, 2007 6:50:32 am
List:org.openoffice.fr.prog

Francois Gatto a écrit :

option explicit global oDoc as object global oMouseClickHandler as object const iClicksNumber = 1 'nombre de clics à détecter

sub StartMouseClickHandler oDoc = ThisComponent.currentController oMouseClickHandler = createUnoListener( "MCHApp_", "com.sun.star.awt.XMouseClickHandler" ) oDoc.addMouseClickHandler( oMouseClickHandler ) end sub

sub StopMouseClickHandler oDoc.removeMouseClickHandler( oMouseClickHandler ) end sub

sub MCHApp_disposing( oEvt ) end sub

function MCHApp_mousePressed( oEvt ) as boolean MCHApp_mousePressed = false end function

function MCHApp_mouseReleased( oEvt ) as boolean dim oCurSel as object dim oConv as object dim iCol as integer, iLig as long if oEvt.ClickCount = iClicksNumber then oCurSel = thisComponent.CurrentSelection oConv = thisComponent.createInstance( "com.sun.star.table.CellAddressConversion" ) oConv.Address = oCurSel.getCellAddress with oCurSel.RangeAddress 'Attention si dernière colonne iCol = .StartColumn + 1 if iCol >= 255 then msgbox( "Hep ! Limite atteinte.", 48, "OOoups !" ) iCol = iCol - 1 end if iLig = .StartRow end with thisComponent.CurrentController.ActiveSheet.getCellByPosition( iCol, iLig ).String = oConv.UserInterfaceRepresentation end if MCHApp_mouseReleased = false end function

NB : non testé sous Windows, mais je pense qu'il n'y a pas de problème.

Il faudra que je prenne le temps de comprendre ceci pour n'activer qu'une partie d'une seule feuille !

Merci !