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

AbstractExcelImporter doesn't reuse imported font

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 3.5.0
    • 3.5.0 RC
    • ZSS Component
    • None

      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.

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

              Created:
              Updated:
              Resolved: