Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Several Problems in a Very Complicated Spreadsheet #3681

Merged
merged 3 commits into from
Aug 27, 2023

Commits on Aug 20, 2023

  1. Fix Several Problems in a Very Complicated Spreadsheet

    Fix PHPOffice#3679. That issue was opened for a problem which was already solved by PR PHPOffice#3659, however there were additional problems with the spreadsheet.
    
    The main problem is that Data Validations and Conditional Styles can each be supplied in the Xml in either "external" or "internal" formats. The code for each to handle "external" assumes that each is the only "external" item on the worksheet in the Xml, but some of the worksheets in the sample spreadsheet provide both as "external" on some sheets. The code to fix this is verified against the supplied sample, however no formal test has been added for it. The sample is much too large and complicated to be added to the test suite - it takes several minutes to read, and even longer to write (`setPreCalculateFormulas(false)` is highly recommended). I will leave this ticket open for a few days to see if I can hand-craft a suitable test case, but I am not hopeful.
    
    A second problem is that something in the Xlsx Reader `$xmlSheetNS->sheetData->row` loop breaks the selected cell for the worksheet. This is easily fixed and verified by eye (and with the supplied sample), but, again, no explicit test case is added.
    
    A third problem is that drawings which are part of the supplied sample use `srcRect` tags in the Xml to effectively produce a cropped version of the image. This tag has hitherto been ignored. It is now supported in Xlsx Reader, Xlsx Writer, and Worksheet/BaseDrawing object. This is again verified with the supplied sample; unlike the other parts, it was easy to add a new formal test case for this part of the fix.
    oleibman committed Aug 20, 2023
    Configuration menu
    Copy the full SHA
    d8bafbf View commit details
    Browse the repository at this point in the history
  2. Scrutinizer False Positives

    oleibman committed Aug 20, 2023
    Configuration menu
    Copy the full SHA
    7400ba0 View commit details
    Browse the repository at this point in the history

Commits on Aug 27, 2023

  1. Configuration menu
    Copy the full SHA
    8d7ac4e View commit details
    Browse the repository at this point in the history