[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    Re: koffice/libs/kotext/opendocument
From:       zander () kde ! org
Date:       2010-09-17 9:16:48
Message-ID: 201009171116.49216.zander () kde ! org
[Download RAW message or body]

Since a commit made on monday the unit test 
koffice/libs/kotext/opendocument/tests/TestChangeLoading is failing with an 
assert;
QFATAL : TestChangeLoading::testTableDeleteLoading() ASSERT: "cellStyle" in 
file /home/tester/kde/koffice/libs/kotext/opendocument/KoTextLoader.cpp, line 
1266


Could you please take a look and make sure we don't regress our unit tests :)

Thanks!

On Tuesday 14. September 2010 21.07.36 Carlos Licea wrote:
> SVN commit 1175336 by clicea:
> 
> Load properly the default cell style for the rows and columns on a table.
> 
>  M  +25 -2     KoTextLoader.cpp
> 
> 
> --- trunk/koffice/libs/kotext/opendocument/KoTextLoader.cpp
> #1175335:1175336 @@ -1200,6 +1200,15 @@
>                              }
>                          }
>                      }
> +
> +                    QString defaultCellStyleName =
> tblTag.attributeNS(KoXmlNS::table, "default-cell-style-name", ""); +      
>              if (!defaultCellStyleName.isEmpty()) {
> +                        for (int c = columns; c < columns + repeatColumn;
> c++) { +                            KoTableCellStyle *cellStyle =
> d->textSharedData->tableCellStyle(defaultCellStyleName, d->stylesDotXml);
> +                            tcarManager->setDefaultColumnCellStyle(c,
> cellStyle); +                        }
> +                    }
> +
>                      columns = columns + repeatColumn;
>                      if (rows > 0)
>                          tbl->resize(rows, columns);
> @@ -1213,6 +1222,13 @@
>                              tcarManager->setRowStyle(rows, *rowStyle);
>                          }
>                      }
> +
> +                    QString defaultCellStyleName =
> tblTag.attributeNS(KoXmlNS::table, "default-cell-style-name", ""); +      
>              if (!defaultCellStyleName.isEmpty()) {
> +                        KoTableCellStyle *cellStyle =
> d->textSharedData->tableCellStyle(defaultCellStyleName, d->stylesDotXml);
> +                        tcarManager->setDefaultRowCellStyle(rows,
> cellStyle); +                    }
> +
>                      rows++;
>                      if (columns > 0)
>                          tbl->resize(rows, columns);
> @@ -1237,13 +1253,20 @@
> 
>                                      if (cell.isValid()) {
>                                          QString cellStyleName =
> rowTag.attributeNS(KoXmlNS::table, "style-name", ""); +                   
>                     KoTableCellStyle *cellStyle = 0; if
> (!cellStyleName.isEmpty()) { -                                           
> KoTableCellStyle *cellStyle =
> d->textSharedData->tableCellStyle(cellStyleName, d->stylesDotXml); +      
>                                      cellStyle =
> d->textSharedData->tableCellStyle(cellStyleName, d->stylesDotXml); +      
>                                  } else if
> (tcarManager->defaultRowCellStyle(currentRow)) { +                        
>                    cellStyle =
> tcarManager->defaultRowCellStyle(currentRow); +                           
>             } else if (tcarManager->defaultColumnCellStyle(currentCell)) {
> +                                            cellStyle =
> tcarManager->defaultColumnCellStyle(currentCell); +                       
>                 }
> +
>                                              QTextTableCellFormat
> cellFormat = cell.format().toTableCellFormat(); +                         
>               Q_ASSERT(cellStyle);
>                                              if (cellStyle)
>                                                 
> cellStyle->applyStyle(cellFormat); cell.setFormat(cellFormat); -          
>                              }
> 
>                                          // handle inline Rdf
>                                          // rowTag is the current table
> cell.

-- 
Thomas Zander
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic