Fill table cells with color for ODS and XLSX files
Needs ReviewPublic

Authored by mphilippov on Nov 20 2019, 1:15 PM.

Details

Summary

Even when the tables in XLS/XLSX files are painted with some color, this color isn't displayed.

Diff Detail

Repository
R8 Calligra
Lint
Lint Skipped
Unit
Unit Tests Skipped
mphilippov created this revision.Nov 20 2019, 1:15 PM
Restricted Application added a subscriber: Calligra-Devel-list. ยท View Herald TranscriptNov 20 2019, 1:15 PM
mphilippov requested review of this revision.Nov 20 2019, 1:15 PM

Not sure about all the details but two things look suspicious here:

  1. Above this there's handling for transparent and now the handling isn't symmetric for background brush.
  2. There's some handling on the file for KoXmlNs::draw / style-name & KoXmlNs::calligra / fill-style-name which do background brush setting. What's the relation between these three?

Not sure about all the details but two things look suspicious here:

  1. Above this there's handling for transparent and now the handling isn't symmetric for background brush.
  2. There's some handling on the file for KoXmlNs::draw / style-name & KoXmlNs::calligra / fill-style-name which do background brush setting. What's the relation between these three?
  1. I see it. Ok
  2. loadTableCellProperties() is a method for applying styles for table cells, i.e. cell background. There is no handling for cell background in the place you mentioned.

loadTableCellProperties() is a method for applying styles for table cells, i.e. cell background. There is no handling for cell background in the place you mentioned.

I'm talking about handling in that particular method. It will already set background brush in that method later. Why is that not enough?

loadTableCellProperties() is a method for applying styles for table cells, i.e. cell background. There is no handling for cell background in the place you mentioned.

I'm talking about handling in that particular method. It will already set background brush in that method later. Why is that not enough?

Do you mean this "if ()" part of code? If there is no style "graphic" and inner "if" will not execute. Do you mean it'll be better to handle it in this part of code...or what?

Do you mean this "if ()" part of code? If there is no style "graphic" and inner "if" will not execute. Do you mean it'll be better to handle it in this part of code...or what?

The main question was how should the three attributes play together. But another question: why isn't setBackgroundColor enough for the background color?

Do you mean this "if ()" part of code? If there is no style "graphic" and inner "if" will not execute. Do you mean it'll be better to handle it in this part of code...or what?

The main question was how should the three attributes play together. But another question: why isn't setBackgroundColor enough for the background color?

Ok. 1. There is a bug in calligra with alpla-channel. So with style->setBackgroundColor(QColor()); all transparent cells will be painted with black color.

  1. This part of code isn't handled in all spreadsheet formats either ods or xls or xlsx. Setting brush needs us to paint all the cell with the required color