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

List:       koffice-devel
Subject:    Re: [RFC] Cell Format Dialog
From:       Raphael Langerhorst <raphael-langerhorst () gmx ! at>
Date:       2005-02-09 19:07:37
Message-ID: 200502092007.37413.raphael-langerhorst () gmx ! at
[Download RAW message or body]

Thanks David, your suggestion helped!!

So here goes the current analysis:
(we talk about kspread/dialogs/kspread_dlg_layout.cc)

The current code is sth like this:

void CellFormatPageFloat::slotChangeState() {

<snip/>

//line 1390
    if (!dlg->isSingleCell())  // <-- this line is of interest
        {
            precision->setEnabled(true);
            prefix->setEnabled(true);
            postfix->setEnabled(true);
            format->setEnabled(true);
        }
    else
        {
            precision->setEnabled(false);

This was the state in some earlier revision:

if (dlg->cellText.isEmpty() || dlg->m_bValue || !dlg->isSingleCell())


The change happened (probably?) while Tomas introduced the "Generic" 
cell data format (don't want to blame anyone).

Conclusion:
The prefix/precision/... stuff should get ONLY activated, if that's 
also suitable for the set format! So this wasn't clear anymore in the 
current version. Now, what we must find what this line should look 
like now, with the "Generic" cell format. The isSingleCell() call was 
probably made because if more cells are selected, a prefix/.. would 
always be acceptable (probably an implementation shortage?). m_bValue 
is true, if the cell contains any kind of "number" or a boolean 
value.

So, I would suggest a test like this:

if (!dlg->formatType || dlg->cellText.isEmpty() || dlg->m_bValue 
|| !dlg->isSingleCell())

What do ya think? dlg->formatType is NULL if it's a generic type (as 
far as I found out). Any KSpread expert around for this? I can do the 
change in CVS if you wish, just let me know.

Raphael

PS: we MUST do sth. about it, since it's obviously a (regression!!!) 
bug - checked with KOffice 1.3.5
_______________________________________________
koffice-devel mailing list
koffice-devel@kde.org
https://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