Bug 125751: Resizing of range of selected rows/cols has improper defaults (normal)
Opened:2006-04-17 18:22
Product:kspread
Component:general
Version:unspecified
Status:RESOLVED
Platform:unspecified
Resolution:FIXED
Reporter:klee cs washington edu
Assigned to:Raphael Langerhorst

Version:           1.5rc1 (using KDE KDE 3.5.1)

Steps to reproduce:

1. Select a range of rows by left-dragging across a range of row numbers in the left-hand row selector.

2. Right-click on selected row numbers in the row selector.

3. Select "Resize row..." from the context menu.

4. Hit the "Defaults" button.  The default height will be the total height of all the cells.

This would be fine, if the resize operation applied to the entire selected range, but the new size applies to each cell individually.  The behavior of the default button should be consistent with the resize behavior.

The same bug applies to selected columns.


------- Additional Comment #1 From Stefan Nikolaus 2006-04-17 20:30 -------
SVN commit 530822 by nikolaus:

operation       'Resize Column...', 'Resize Row...'
                        Fix the default width/height in the 'Resize Column/Row' dialogs.
Bug: 125751


 M  +10 -2     branches/koffice/1.5/koffice/kspread/dialogs/kspread_dlg_resize2.cc  
 M  +10 -2     trunk/koffice/kspread/dialogs/kspread_dlg_resize2.cc  


--- branches/koffice/1.5/koffice/kspread/dialogs/kspread_dlg_resize2.cc #530821:530822
 at  at  -106,7 +106,11  at  at
 
 void ResizeRow::slotDefault()
 {
-    m_pHeight->setValue( POINT_TO_MM( heightOfRow ) );
+  Sheet* sheet = m_pView->activeSheet();
+  if (!sheet)
+    return;
+  double points = sheet->rowFormat(0)->dblHeight();
+  m_pHeight->setValue(KoUnit::toUserValue(points, m_pView->doc()->unit()));
 }
 
 ResizeColumn::ResizeColumn( View* parent, const char* name )
 at  at  -168,7 +172,11  at  at
 
 void ResizeColumn::slotDefault()
 {
-    m_pWidth->setValue( POINT_TO_MM(colWidth ) );
+  Sheet* sheet = m_pView->activeSheet();
+  if (!sheet)
+    return;
+  double points = sheet->columnFormat(0)->dblWidth();
+  m_pWidth->setValue(KoUnit::toUserValue(points, m_pView->doc()->unit()));
 }
 
 
--- trunk/koffice/kspread/dialogs/kspread_dlg_resize2.cc #530821:530822
 at  at  -111,7 +111,11  at  at
 
 void ResizeRow::slotDefault()
 {
-    m_pHeight->setValue( POINT_TO_MM( heightOfRow ) );
+  Sheet* sheet = m_pView->activeSheet();
+  if (!sheet)
+    return;
+  double points = sheet->rowFormat(0)->dblHeight();
+  m_pHeight->setValue(KoUnit::toUserValue(points, m_pView->doc()->unit()));
 }
 
 ResizeColumn::ResizeColumn( View* parent, const char* name )
 at  at  -175,7 +179,11  at  at
 
 void ResizeColumn::slotDefault()
 {
-    m_pWidth->setValue( POINT_TO_MM(colWidth ) );
+  Sheet* sheet = m_pView->activeSheet();
+  if (!sheet)
+    return;
+  double points = sheet->columnFormat(0)->dblWidth();
+  m_pWidth->setValue(KoUnit::toUserValue(points, m_pView->doc()->unit()));
 }


Votes: 1    Show votes for this bug    Vote for this bug

Additional Comments:


View Bug Activity   |   Format For Printing


Attachment Type Modified Status Actions
Create a New Attachment (proposed patch, testcase, etc.) View All


Actions: Query | Reports Search:   New Account | Log In