[prev in list] [next in list] [prev in thread] [next in thread]
List: koffice
Subject: Re: Patch for kspread_editors.cc
From: Ferdinand Gassauer <gassauer () kde ! org>
Date: 2002-08-26 13:36:58
[Download RAW message or body]
Norbert Andres wrote:
> I'm not sure if I like it. I tested it and have one concern:
>
> if I wanted to insert just a negative number, e.g. -14, KSpread creates a
> formula: =-14. Can you improve it to e.g. remove the "=" if there is no
> other operator?
>
> Regards
> Norbert
>
> On Sunday 25 August 2002 15:12, Ferdinand Gassauer wrote:
>> Hi!
>> Hope that it is not to late for 1.2
>> Please check
I wrote a piece of code, but I do not know where to put it
it should run on leaving the edit mode.
QString t1( m_pEdit->text());
if ( t1[0] == '=' )
{
// check matching pattern - formula with signed values only
QRegExp exp("(=)([+-])([0-9]+)");
int n = exp.search(t1);
if ( n == 1 ) // FIX ME - which value ?
{
t1 = m_pEdit->text().right(0);
if (t1[0] == '+')
t1 = m_pEdit->text().right(1);
m_pEdit->setText(t1);
}
}
apparently my first reply didn't hit the list
--
cu
ferdinand
____________________________________
koffice mailing list
koffice@mail.kde.org
To unsubscribe please visit:
http://mail.kde.org/mailman/listinfo/koffice
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic