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

AbstractExcelImporter doesn't reuse imported font

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: 3.5.0 RC
    • Fix Version/s: 3.5.0
    • Component/s: ZSS Component
    • Labels:
      None

      Description

      Problem Description

      This can be identified by inspecting codes.
      Please look at AbstractExcelImporter.toZssFont(Font poiFont), inside this method, there is no importedFont.put(font) statement.
      It should put the newly-created font to the hash, importedFont, for reusing in the future.

      Steps to Reproduce

      1. import the attached file StyleOverflow.xlsx.

      Actual

      Via JavaVisualVM head dump, you can see 65537 FontImpl are created. but the file contains 27 fonts

      Expected

      only 27 FontImpl should be created.


      Extra Information

      this case is not directly reported by a customer. But I found this issue when exporting an excel file having massive redundant styles. But they might need this function to reduce those redundant styles in the future.

        Activity

        Show
        henrichen henrichen added a comment - https://github.com/zkoss/zkspreadsheet/commit/e7beb978c1b8967ca2a89e1684b729be862ca530
        Hide
        henrichen henrichen added a comment -

        Fixed.

        Show
        henrichen henrichen added a comment - Fixed.

          People

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

            Dates

            • Created:
              Updated:
              Resolved: