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

List:       koffice-devel
Subject:    gcc-3.3 patch for filters/kspread/latex/export
From:       Ben Burton <bab () debian ! org>
Date:       2003-08-13 4:35:44
[Download RAW message or body]


Hi.  Can I or somebody else please commit the following patch?  It fixes
a compile error with gcc-3.3 that was due to arrays being declared with
variable size.

The file is koffice/filters/kspread/latex/export/table.cc.

Thanks - Ben.

Index: table.cc
===================================================================
RCS file: /home/kde/koffice/filters/kspread/latex/export/table.cc,v
retrieving revision 1.3
diff -u -3 -p -r1.3 table.cc
--- table.cc	22 Mar 2003 16:49:52 -0000	1.3
+++ table.cc	13 Aug 2003 04:10:23 -0000
@@ -269,7 +269,7 @@ void Table::generateTopLineBorder(QTextS
 {
 	
 	Cell* cell = 0;
-	bool border[getMaxColumn()];
+	bool* border = new bool[getMaxColumn()];
 	bool fullLine = true;
 	for(int index = 1; index <= getMaxColumn(); index++)
 	{
@@ -312,6 +312,8 @@ void Table::generateTopLineBorder(QTextS
 			index = index + 1;
 		}
 	}
+
+	delete border;
 	
 	/*Row * row;
 	row = searchRow(row);
@@ -325,7 +327,7 @@ void Table::generateTopLineBorder(QTextS
 void Table::generateBottomLineBorder(QTextStream& out, int row)
 {
 	Cell* cell = 0;
-	bool border[getMaxColumn()];
+	bool* border = new bool[getMaxColumn()];
 	bool fullLine = true;
 
 	for(int index = 1; index <= getMaxColumn(); index++)
@@ -368,6 +370,8 @@ void Table::generateBottomLineBorder(QTe
 			index = index + 1;
 		}
 	}
+
+	delete border;
 }
 
 /*******************************************/
_______________________________________________
koffice-devel mailing list
koffice-devel@mail.kde.org
http://mail.kde.org/mailman/listinfo/koffice-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

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