https://bugs.documentfoundation.org/show_bug.cgi?id=92938

            Bug ID: 92938
           Summary: Calc working slow when adding/removing cell names
           Product: LibreOffice
           Version: 4.2.8.2 release
          Hardware: x86-64 (AMD64)
                OS: Linux (All)
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: Calc
          Assignee: [email protected]
          Reporter: [email protected]

Created attachment 117445
  --> https://bugs.documentfoundation.org/attachment.cgi?id=117445&action=edit
ods file

When I delete a cell name in the Manage Names UI, then click OK, the UI freezes
for a while before closing. Calc also freezes for a while when I use a macro to
define cell names.

I have a sheet called FoodList that has lots of defined cell names, and 52
other sheets called FoodEntryx which refer to the cell names in FoodList with
an =SUM() formula. When the FoodEntryx sheets are empty I can delete or define
cell names with no freezing, but when the sheets are filled out with formulas,
calc will freeze when defining or deleting cell names. When 1 sheet is filled
out it freezes for about 6 seconds and the more sheets I fill out the longer
the freezing gets.

To reproduce this, open the Manage Names UI and delete 1 of the cell names then
click OK and it will freeze. Or you can run the following macro:

Sub DefineNewCellNames

Dim oSheet, oCell, namedRanges, cName
Dim cColumn(7) As String
Dim cArray(1) 

oSheet = ThisComponent.Sheets.getByName("FoodList")
oCell = oSheet.getCellByPosition(0,0)
namedRanges = ThisComponent.NamedRanges

cColumn(0) = "calories"
cColumn(1) = "protein"
cColumn(2) = "fat"
cColumn(3) = "carbs"
cColumn(4) = "sugar"
cColumn(5) = "sodium"
cColumn(6) = "salt"
cColumn(7) = "fibre"

cArray(0) = 90
cArray(1) = 91

For i = 0 To 1
  cName = oSheet.getCellByPosition(1,cArray(i)).string

  For j = 2 To 9
    oCell = oSheet.getCellByPosition(j,cArray(i))
    namedRanges.addNewByName(cName & "_" & cColumn(j-2), oCell.AbsoluteName,
oCell.getCellAddress, 1)
  Next j
Next i

End Sub

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to