Formula that refer to a NameRange does not update contents correctly

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: Normal
    • 3.5.0
    • Affects Version/s: 3.5.0 RC
    • Component/s: ZSS Formula
    • None

      SBook book = SBooks.createBook("book1");
      book.getBookSeries().setAutoFormulaCacheClean(true);
      SSheet sheet1 = book.createSheet("SheetX");

      SName name = book.createName("FOO");
      name.setRefersToFormula("SheetX!A1:B2");

      // test insert/delete cells
      sheet1.getCell("A1").setValue(1);
      sheet1.getCell("B1").setValue(2);
      sheet1.getCell("A2").setValue(3);
      sheet1.getCell("B2").setValue(4);

      Assert.assertEquals("SheetX!A1:B2", name.getRefersToFormula());
      Assert.assertEquals(10D, sheet1.getCell("D2").getValue());

      // insert B1:B1
      sheet1.insertCell(0, 1, 0, 1, true);
      Assert.assertEquals("SheetX!A1:B2", name.getRefersToFormula());
      Assert.assertEquals(8D, sheet1.getCell("D2").getValue());

            Assignee:
            dennis
            Reporter:
            henrichen
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: