Summary: | Cannot compile koffice with gcc 3.3.1 (related to bug# 62906) | ||
---|---|---|---|
Product: | [Applications] calligrasheets | Reporter: | Philippe Rigault <prigault> |
Component: | general | Assignee: | Laurent Montel <montel> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Attachments: | Patch for table.cc |
Description
Philippe Rigault
2003-08-20 00:09:08 UTC
Created attachment 2279 [details]
Patch for table.cc
Here is the patch to fix the problem
Subject: koffice/filters/kspread/latex/export CVS commit by faure: Helio already fixed compilation with gcc-3.3.1, but it's indeed more efficient to use QBitArray than QValueVector<bool> (since we know the number of items before hand), and this is more consistent with filters/kword/latex/export/. CCMAIL: 62984-done@bugs.kde.org M +7 -7 table.cc 1.5 --- koffice/filters/kspread/latex/export/table.cc #1.4:1.5 @@ -21,5 +21,5 @@ #include <kdebug.h> /* for kdDebug stream */ -#include <qvaluevector.h> +#include <qbitarray.h> #include "cell.h" #include "column.h" @@ -271,5 +271,5 @@ void Table::generateTopLineBorder(QTextS Cell* cell = 0; - QValueVector<bool> border; + QBitArray border( getMaxColumn() ); bool fullLine = true; for(int index = 1; index <= getMaxColumn(); index++) @@ -283,5 +283,5 @@ void Table::generateTopLineBorder(QTextS /* If the element has a border display it here */ - border.push_back( cell->hasTopBorder() ); + border[ index ] = cell->hasTopBorder(); if( ! cell->hasTopBorder() ) fullLine = false; @@ -304,5 +304,5 @@ void Table::generateTopLineBorder(QTextS int end; index = index + 1; - while(border[index] == true && index < getMaxColumn()) + while(border[index] && index < getMaxColumn()) { index = index + 1; @@ -327,5 +327,5 @@ void Table::generateBottomLineBorder(QTe { Cell* cell = 0; - QValueVector<bool> border; + QBitArray border( getMaxColumn() ); bool fullLine = true; @@ -339,5 +339,5 @@ void Table::generateBottomLineBorder(QTe /* If the element has a border display it here */ - border.push_back( cell->hasBottomBorder() ); + border[ index ] = cell->hasBottomBorder(); if( ! cell->hasBottomBorder() ) fullLine = false; @@ -360,5 +360,5 @@ void Table::generateBottomLineBorder(QTe int end; index = index + 1; - while(border[index] == true && index < getMaxColumn()) + while(border[index] && index < getMaxColumn()) { index = index + 1; |