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

List:       kde-commits
Subject:    koffice/kspread
From:       Philipp Müller <philipp.mueller () gmx ! de>
Date:       2003-01-28 21:08:13
[Download RAW message or body]

CVS commit by pmueller: 

Fix for #51780: kspread has larger cell higths for formulas
This fix removes a buggy version of a kind if autoresize of a cell.
It was trying to use the height of the editor to later on adjust the minimum height \
of the cell. But the height of the editor may have nothing to do with the output (it \
then only displays the formula). Additional this is not configurable.

Second part of the change: 
If we generate an editor, we pass the cell reference. But it was possible that the \
pointer was referencing to the default cell. Now, when we generate an editor, we \
always pass a valid cell.


  M +4 -19     kspread_canvas.cc   1.356


--- koffice/kspread/kspread_canvas.cc  #1.355:1.356
@@ -2559,19 +2559,7 @@ void KSpreadCanvas::deleteEditor( bool s
   // but only if we are using it (text editor)
   // A bit of a hack - perhaps we should store the editor mode ?
-  bool textEditor=true;
-  int newHeight = -1;
-  int row = -1;
+  bool textEditor = true;
   if ( m_pEditor->inherits("KSpreadTextEditor") )
-  {
-      if ( m_pEditor->cell()->height() < m_pEditor->height() )
-      {
-          if (((KSpreadTextEditor * ) m_pEditor)->sizeUpdate())
-          {
-              newHeight = m_pEditor->height();
-              row = m_pEditor->cell()->row();
-          }
-      }
       m_pEditWidget->setEditMode( false );
-  }
   else
     textEditor = false;
@@ -2605,7 +2593,4 @@ void KSpreadCanvas::deleteEditor( bool s
     m_pView->updateEditWidget();
 
-  if ( newHeight != -1 )
-      m_pView->vBorderWidget()->resizeRow( newHeight, row, true );
-
   setFocus();
 }
@@ -2613,5 +2598,5 @@ void KSpreadCanvas::deleteEditor( bool s
 void KSpreadCanvas::createEditor()
 {
-  KSpreadCell* cell = activeTable()->cellAt( markerColumn(), markerRow() );
+  KSpreadCell* cell = activeTable()->nonDefaultCell( markerColumn(), markerRow(), \
false );  
   createEditor( CellEditor );
@@ -2625,5 +2610,5 @@ void KSpreadCanvas::createEditor( Editor
   if ( !m_pEditor )
   {
-    KSpreadCell* cell = activeTable()->cellAt( marker() );
+    KSpreadCell* cell = activeTable()->nonDefaultCell( marker().x(), marker().x(), \
false );  if ( ed == CellEditor )
     {


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

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