[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: koffice/filters/kspread/excel
From: Sebastian Sauer <mail () dipe ! org>
Date: 2010-03-22 16:10:54
Message-ID: 20100322161054.4F3A2AC86C () svn ! kde ! org
[Download RAW message or body]
SVN commit 1106362 by sebsauer:
Fix content got lost if more then 1024 columns where used cause of a hardcoded \
maximal column value in Sheet::cell.
M +0 -11 import/excelimport.cc
M +2 -1 sidewinder/sheet.cpp
M +11 -0 sidewinder/utils.h
--- trunk/koffice/filters/kspread/excel/import/excelimport.cc #1106361:1106362
@@ -54,17 +54,6 @@
#define UNICODE_GBP 0x00A3
#define UNICODE_JPY 0x00A5
-// The minimal number of rows and columns. This is used to fill remaming rows and \
columns with the
-// default style what is needed cause Excel does always define the default for all \
rows and columns
-// while ODF does only for those that are explicit defined.
-static const uint minimumColumnCount = 1024;
-static const uint minimumRowCount = 32768;
-
-// The maximal number of rows and columns. This allows us to cut rows and columns \
away that would
-// not be handled by the consumer application anyway cause they reached the \
applications limited.
-static const uint maximalColumnCount = 32768;
-static const uint maximalRowCount = 32768; //65536
-
namespace Swinder {
// qHash function to support hashing by Swinder::FormatFont instances.
--- trunk/koffice/filters/kspread/excel/sidewinder/sheet.cpp #1106361:1106362
@@ -21,6 +21,7 @@
#include "sheet.h"
#include "workbook.h"
#include "ustring.h"
+#include "utils.h"
#include <iostream>
#include <map>
@@ -148,7 +149,7 @@
Cell* Sheet::cell(unsigned columnIndex, unsigned rowIndex, bool autoCreate)
{
- unsigned hashed = (rowIndex + 1) * 1024 + columnIndex + 1;
+ const unsigned hashed = (rowIndex + 1) * maximalColumnCount + columnIndex + 1;
Cell* c = d->cells[ hashed ];
// create cell if necessary
--- trunk/koffice/filters/kspread/excel/sidewinder/utils.h #1106361:1106362
@@ -29,6 +29,17 @@
namespace Swinder
{
+// The minimal number of rows and columns. This is used to fill remaming rows and \
columns with the +// default style what is needed cause Excel does always define the \
default for all rows and columns +// while ODF does only for those that are explicit \
defined. +static const uint minimumColumnCount = 1024;
+static const uint minimumRowCount = 32768;
+
+// The maximal number of rows and columns. This allows us to cut rows and columns \
away that would +// not be handled by the consumer application anyway cause they \
reached the applications limited. +static const uint maximalColumnCount = 32768;
+static const uint maximalRowCount = 32768; //65536
+
class Workbook;
Value errorAsValue(int errorCode);
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic