[prev in list] [next in list] [prev in thread] [next in thread]
List: koffice-devel
Subject: [PATCH] make pasting results in kspread working...
From: Holger Schroeder <holger-kde () holgis ! net>
Date: 2003-06-11 13:40:20
[Download RAW message or body]
Hi,
i noticed, that the following did not work as expected:
mark an area in kspread, which contains some formulas, then select copy.
now move the cursor to some other cell in the sheet and select edit -> special
paste... -> Results.
this should paste the result of a formula, and not the formula itself.
the following patch (hopefully) fixes this.
could somebody, who understands the sources better than me please apply this
or a better version of this ?
thanks, Holger
--- kspread_cell.cc 2003-06-11 15:31:42.000000000 +0200
+++ kspread_cell.cc_patched 2003-06-11 15:26:24.000000000 +0200
@@ -5150,12 +5150,22 @@
if ( clear )
clearFlag( Flag_CalcDirty );
+ // now delete the formula stuff in case PasteMode is Result
+ // and we are actually pasting a formula
+ if ( pm == ::Result && text.text().startsWith("=") )
+ {
+ m_content = Text ;
+ m_strText = t ;
+ }
}
}
if ( !f.isNull() && f.hasAttribute( "style" ) )
setStyle( (Style)f.attribute("style").toInt() );
return true;
}
_______________________________________________
koffice-devel mailing list
koffice-devel@mail.kde.org
http://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