Skip to content

copy-paste leads to incorrect serialization #587

Closed

Description

@izulin

Description

Moving cells with relative references can lead to engine with references into negative address space. This is handled correctly by evaluation, but incorrectly by serialization.

    const engine = HyperFormula.buildFromArray([
      [null, null],
      [null, '=A1'],
    ])

    engine.copy({sheet: 0, col: 1, row: 1}, 1, 1)
    engine.paste({sheet: 0, col: 0, row: 0})

    engine.getCellValue({sheet: 0, col: 0, row: 0})  //REF error (correct)
    engine.getCellSerialized({sheet: 0, col: 0, row: 0}) //'=0' (incorrect)

Steps to reproduce

Demo

Your environment

  • HyperFormula version:
  • Browser Name and version:
  • Operating System:

Links

Activity

  1. added
    Bug
    on Dec 16, 2020
  2. self-assigned this
    on Dec 16, 2020
  3. added
    Verified
    on Dec 17, 2020
  4. wojciechczerniak commented on Jan 8, 2021

    @wojciechczerniak
    Contributor

    Done in #585

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

BugVerified

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions