openoffice-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [Bug 119325] New: Multiple SelectionChanged events with no reason in Calc
Date Thu, 10 May 2012 17:10:02 GMT

          Priority: P3
            Bug ID: 119325
           Summary: Multiple SelectionChanged events with no reason in
          Severity: major
        Issue Type: DEFECT
    Classification: Application
                OS: Windows 7
          Hardware: PC
            Status: UNCONFIRMED
           Version: OOo 3.3
         Component: ui
           Product: spreadsheet

Created attachment 77522
Select cells and click button to display number of events


A SelectionChanged event seems to be triggered several times at a single
modification of cell selection in Calc. It even occurs four times (on my
system) when I click on an already selected cell!!!

Here is a sample Calc file with macros:
Global count As Integer

Sub SelectionChanged(evt)
     count = count+1
End Sub

Sub Display
     Print count
     count = 0
End Sub

count is incremented each time SelectionChanged is executed (on a
SelectionChanged event in sheet 1).

Display is called by button on the same sheet and shows current value of count,
then resets it for further trials.

Now, select any cell or cell range (using mouse or keyboard) then click on the
button; strange isn't it?

If not wrong, I'd expect no event at all when the selection is not changed, and
just one when changed.

Badly needing that feature, I use this workaround:
Global ref As String

Sub SelectionChanged(evt)
     If evt.absoluteName = ref then Exit Sub
     ref = evt.absoluteName
End Sub
(supposing one will only select cells or cell ranges)

You are receiving this mail because:
You are the assignee for the bug.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message