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

List:       koffice
Subject:    patch for kspread
From:       montel laurent <montell () club-internet ! fr>
Date:       2000-09-02 15:14:24
[Download RAW message or body]

Hi,

I fixed a bug :
-Now when you select a cell merged, the color is the good color,
before the marker was at the good color and cell which was obscursing
the color was defaultColorGroup.highlight()
Now it works

-Now when you click on a merged cell, you don't change KSpreadVBorder
before when you click on, KSpreadVBorder and KSpreadHBorder was change
until you make mouserelease event.
now it works

So could you test it please.

thanks 
bye

["patch41.diff" (text/plain)]

? patch29.diff
? patch40.diff
? patch26.diff
? kword.kwd
? fonts.dir
? toto.csv
? toto2.ksp
? KSpreadLocation.diff
? ???
? KSpreadCellIface_stub.h
? KSpreadCellIface_stub.cpp
? toto.ksp
? filters/Makefile.in
? filters/Makefile
? filters/csv/Makefile
? filters/csv/Makefile.in
? filters/csv/csvfilter
? filters/komma/Makefile.in
? filters/komma/Makefile
? pics/@kde_minidir@
cvs server: Diffing .
Index: kspread_canvas.cc
===================================================================
RCS file: /home/kde/koffice/kspread/kspread_canvas.cc,v
retrieving revision 1.148
diff -u -p -r1.148 kspread_canvas.cc
--- kspread_canvas.cc	2000/09/01 04:36:58	1.148
+++ kspread_canvas.cc	2000/09/02 15:11:23
@@ -1019,7 +1019,6 @@ void KSpreadCanvas::mousePressEvent( QMo
         selection.setCoords( col, row,
                              col + cell->extraXCells(),
                              row + cell->extraYCells() );
-
         table->setSelection( selection, this );
         m_iMouseStartColumn = col;
         m_iMouseStartRow = row;
@@ -1988,7 +1987,12 @@ void KSpreadCanvas::updatePosWidget()
     QRect selection = m_pView->activeTable()->selectionRect();
     QString buffer;
     QString tmp;
-    if ( selection.left() == 0 || (selection.width()==1 && selection.height()==1))
+    KSpreadCell *cell=activeTable()->cellAt(markerColumn(),markerRow());
+    QRect extraCell;
+    extraCell.setCoords(markerColumn(),markerRow(),
+    markerColumn()+cell->extraXCells(),markerRow()+cell->extraYCells());
+    if ( selection.left() == 0 || (selection.width()==1 && selection.height()==1)
+    ||extraCell==selection)
     {
         if(activeTable()->getLcMode())
         {
@@ -2586,10 +2590,15 @@ void KSpreadVBorder::paintEvent( QPaintE
   QFont boldFont = normalFont;
   boldFont.setBold( TRUE );
 
+  KSpreadCell *cell=table->cellAt(m_pCanvas->markerColumn(),m_pCanvas->markerRow());
+  QRect extraCell;
+  extraCell.setCoords(m_pCanvas->markerColumn(),m_pCanvas->markerRow(),
+  m_pCanvas->markerColumn()+cell->extraXCells(),m_pCanvas->markerRow()+cell->extraYCells());
   for ( int y = top_row; y <= bottom_row; y++ )
   {
     bool highlighted = ( selection.left() != 0 && y >= selection.top() &&
-                      y <= selection.bottom() && (selection.width()!=1  ||selection.height()!=1));
+                      y <= selection.bottom() && (selection.width()!=1  ||selection.height()!=1)
+                      &&extraCell!=selection);
     bool selected = ( highlighted && selection.right() == 0x7FFF );
 
     RowLayout *row_lay = table->rowLayout( y );
@@ -3043,11 +3052,16 @@ void KSpreadHBorder::paintEvent( QPaintE
   QFont normalFont = painter.font();
   QFont boldFont = normalFont;
   boldFont.setBold( TRUE );
+  KSpreadCell *cell=table->cellAt(m_pCanvas->markerColumn(),m_pCanvas->markerRow());
+  QRect extraCell;
+  extraCell.setCoords(m_pCanvas->markerColumn(),m_pCanvas->markerRow(),
+  m_pCanvas->markerColumn()+cell->extraXCells(),m_pCanvas->markerRow()+cell->extraYCells());
 
   for ( int x = left_col; x <= right_col; x++ )
   {
     bool highlighted = ( selection.left() != 0 && x >= selection.left() &&
-                      x <= selection.right() && (selection.width()!=1 || selection.height()!=1));
+                      x <= selection.right() && (selection.width()!=1 || selection.height()!=1)
+                      &&extraCell!=selection );
     bool selected = ( highlighted && selection.bottom() == 0x7FFF );
 
     ColumnLayout *col_lay = table->columnLayout( x );
Index: kspread_cell.cc
===================================================================
RCS file: /home/kde/koffice/kspread/kspread_cell.cc,v
retrieving revision 1.201
diff -u -p -r1.201 kspread_cell.cc
--- kspread_cell.cc	2000/08/29 07:17:29	1.201
+++ kspread_cell.cc	2000/09/02 15:11:43
@@ -2308,15 +2308,25 @@ void KSpreadCell::paintCell( const QRect
     if ( m_pObscuringCell )
         selected = m_pTable->selectionRect().contains( QPoint( m_pObscuringCell->column(),
                                                                     m_pObscuringCell->row() ) );
+
     // Dont draw any selection when printing.
     if ( _painter.device()->isExtDev() )
         selected = FALSE;
 
     QColorGroup defaultColorGroup = QApplication::palette().active();
-
     QRect m = m_pTable->marker();
+
+    int moveX=0;
+    int moveY=0;
+    if( isObscured() && isObscuringForced() )
+    {
+    moveX=obscuringCellsColumn();
+    moveY=obscuringCellsRow();
+    }
+
     // Determine the correct background color
-    if ( selected && ( _col != m.left() || _row != m.top() )  )
+    if ( selected && ( _col != m.left() || _row != m.top() )
+    && (moveX!=m.left() || moveY!=m.top()))
         _painter.setBackgroundColor( defaultColorGroup.highlight() );
     else
     {
cvs server: Diffing dtd
cvs server: Diffing extensions
cvs server: Diffing filters
cvs server: Diffing filters/csv
cvs server: Diffing filters/komma
cvs server: Diffing pics
cvs server: Diffing plugins
cvs server: Diffing plugins/calculator
cvs server: Diffing plugins/calculator/pics
cvs server: Diffing scripts
cvs server: Diffing tablestyles
cvs server: Diffing toolbar
cvs server: Diffing toolbar/hicolor
cvs server: Diffing toolbar/locolor


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

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