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

List:       koffice-devel
Subject:    koffice/kspread
From:       Raphael Langerhorst <raphael-langerhorst () gmx ! at>
Date:       2005-02-28 18:44:47
Message-ID: 20050228184447.693A3148A2 () office ! kde ! org
[Download RAW message or body]

CVS commit by raphael: 

Start work on KSpread Format Storage optimizations.

* Fixed Bug on the way: 
Wrong style comparison for changing a (non-default!) style and cells with this style \
have been changed & changed back manually in between.

* Added a constant to kspread_global.h:
#define KS_Max_Quad 0x8000
(please see the comment for that: can we make the spreadsheet 0x8000 X 0x8000 by \
default instead of 0x7FFF ?)

* Added the StyleCluster class which is a quad tree for referencing cell styles, see \
discussion on koffice-devel mailinglist. Not used yet. Will receive further cleanup \
before it is final, also style changes for cell ranges still needs to be implemented.

This work has started during the FOSDEM event, Ben Lamb and John Flux contributed a \
lot of intelligence and some of the code

CCMAIL: john@geola.co.uk
CCMAIL: ben@zurgy.org
CCMAIL: koffice-devel@kde.org


  A            stylecluster.cc   1.1 [LGPL (v2+)]
  A            stylecluster.h   1.1 [LGPL (v2+)]
  M +1 -0      Makefile.am   1.224
  M +9 -2      kspread_format.cc   1.160
  M +4 -0      kspread_global.h   1.31


--- koffice/kspread/Makefile.am  #1.223:1.224
@@ -14,4 +14,5 @@
         dependencies.cc \
         formula.cc \
+        stylecluster.cc \
         kspread_autofill.cc \
         kspread_canvas.cc \

--- koffice/kspread/kspread_format.cc  #1.159:1.160
@@ -109,4 +109,5 @@ double KSpreadFormat::globalColWidth()
 void KSpreadFormat::copy( const KSpreadFormat & _l )
 {
+  // TODO why is the table not copied?
   if ( m_pStyle && m_pStyle->release() )
     delete m_pStyle;
@@ -120,4 +121,5 @@ void KSpreadFormat::copy( const KSpreadF
   if ( _l.m_strComment )
   {
+    if (m_strComment)
     delete m_strComment;
     m_strComment  = new QString( *_l.m_strComment );
@@ -1665,5 +1667,10 @@ void KSpreadFormat::setBackGroundBrushCo
 void KSpreadFormat::setTextFont( const QFont & _f )
 {
-  if( _f == KoGlobal::defaultFont() )
+  if( m_pStyle->parent() && _f == m_pStyle->parent()->font())
+  {
+    clearProperty( PFont );
+    setNoFallBackProperties( PFont );
+  }
+  else if( !m_pStyle->parent() && _f == KoGlobal::defaultFont() )
   {
     clearProperty( PFont );

--- koffice/kspread/kspread_global.h  #1.30:1.31
@@ -53,4 +53,8 @@ class ElapsedTime
 #define KS_colMax 0x7FFF
 
+/* Currently used by StyleCluster for the Quad tree - question is, if we can make \
the spreadsheet this big in general? +   We need this value to be the smallest number \
which is a power of 2 and more than both KS_rowMax and KS_colMax*/ +#define \
KS_Max_Quad 0x8000 +
 /* Definition of maximal supported columns/rows, which can be merged */
 #define KS_spanMax 0xFFF


_______________________________________________
koffice-devel mailing list
koffice-devel@kde.org
https://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