[prev in list] [next in list] [prev in thread] [next in thread]
List: koffice
Subject: Re: Patch for kspread_editors.cc
From: Norbert Andres <nandres () web ! de>
Date: 2002-08-26 18:09:03
[Download RAW message or body]
Thanks for that code.
Please allow a few days for checking this and putting in (if nobody else does
- unfortunately I have no time for KSpread in the next two days).
What about this idea: prepending the '=' only if there are just numbers in
there and an operator which is not at the beginning. If ' is the first
character don't prepend anything, but remove the ' and pass it on. I will
check tomorrow (at work) how Excel behaves.
Regards
Norbert
On Monday 26 August 2002 15:36, Ferdinand Gassauer wrote:
> 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
____________________________________
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