Uploaded image for project: 'ZK Spreadsheet'
  1. ZK Spreadsheet
  2. ZSS-1310

Can't perform some edit operations on unlocked cells in a protected sheet

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 3.9.2
    • 3.9.1
    • None
    • Security Level: Jimmy
    • Sprint 8

      steps to reproduce

      1. load the attached file
      2. copy A1 and paste to B1 with a hot key or context menu

      current result

      zss doesn't paste the value even A1 is unlocked.

      debug info

      • A1:C2 are all unlocked cells
      • users can copy unlocked cells in Excel
      • all action classes that extend AbstractCellDataStyleAction will be blocked in a protected sheet
      • These actions are block by disabled UI: CellBorderAction, CellStyleAction, FontStyleAction, MergeCellAction, PasteCellAction, PasteSpecialCellAction, SortCellAction, ToggleMergeCellAction, UnmergeCellAction
      • These actions are blocked at server side: ClearCellAction

      Excel 2011 spec about copy-paste in a protected sheet:

      In a protected sheet,

      1. users can copy among unlocked cells
      2. users copy a locked cell and paste it an unlocked one.
      3. it doesn't copy the "locked" status
      4. if there is a locked cell in the affected target range while copying, don't paste cells
      5. cut an unlocked cell, the cell should keep unlocked
        1. without sheet protection, cut an unlocked cell, the cell restores to the default value, locked is true
      6. unlocked cell can be "Clear Format", "Clear All", or "Clear Contents"
        1. "Clear Formats" resets locked status to true

      workaround

        1. Abstract2DCellDataStyleAction.java
          6 kB
        2. AbstractCellDataStyleAction.java
          4 kB
        3. AbstractUndoableAction.java
          3 kB
        4. CutCellAction.java
          4 kB
        5. PasteCellAction.java
          6 kB
        6. protected-unlocked.png
          protected-unlocked.png
          16 kB
        7. unlock.xlsx
          31 kB

            henrichen henrichen
            hawk hawk
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: