Issue 98998 - Applied Styles List Should Be Updated After Deleting Cells/Columns/Rows
Summary: Applied Styles List Should Be Updated After Deleting Cells/Columns/Rows
Status: CONFIRMED
Alias: None
Product: Calc
Classification: Application
Component: formatting (show other issues)
Version: OOo 3.0.1
Hardware: PC Windows XP
: P4 Trivial with 2 votes (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
: 25213 126939 (view as issue list)
Depends on:
Blocks:
 
Reported: 2009-02-07 18:24 UTC by andreaippo
Modified: 2021-10-02 09:24 UTC (History)
7 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: 4.1.10
Developer Difficulty: ---


Attachments
First step: check format list box (73.85 KB, image/png)
2014-01-05 11:14 UTC, White Phoenix
no flags Details
step 2: added column - no problem (60.93 KB, image/png)
2014-01-05 11:15 UTC, White Phoenix
no flags Details
step 3: deleted column - still no problem (59.67 KB, image/png)
2014-01-05 11:15 UTC, White Phoenix
no flags Details
step 5: selected column, box goes blank. If you abort box returns to normal (61.38 KB, image/png)
2014-01-05 11:17 UTC, White Phoenix
no flags Details
step 6: format list box still showing only defaults. Custom formats missing. (64.08 KB, image/png)
2014-01-05 11:19 UTC, White Phoenix
no flags Details
THIS is step 4: column selected. step 5 is when you delete and the box is still blank. (61.38 KB, image/png)
2014-01-05 11:21 UTC, White Phoenix
no flags Details
Current version of AOO (217.08 KB, image/jpeg)
2016-04-23 23:21 UTC, White Phoenix
no flags Details
Open spreadsheet 1 (536.43 KB, image/jpeg)
2016-04-23 23:23 UTC, White Phoenix
no flags Details
Apply formats box has various formats used in spreadsheet listed. (553.33 KB, image/jpeg)
2016-04-23 23:24 UTC, White Phoenix
no flags Details
Formatted column deleted. (522.95 KB, image/jpeg)
2016-04-23 23:25 UTC, White Phoenix
no flags Details
Apply styles box reset to defaults. Only way to restore the list is to close and re-open file. (527.45 KB, image/jpeg)
2016-04-23 23:26 UTC, White Phoenix
no flags Details
2nd spreadsheet. (538.92 KB, image/jpeg)
2016-04-23 23:27 UTC, White Phoenix
no flags Details
Format listing in Apply Styles box. (554.13 KB, image/jpeg)
2016-04-23 23:28 UTC, White Phoenix
no flags Details
Formatted column in 2nd spreadsheet deleted. (532.85 KB, image/jpeg)
2016-04-23 23:29 UTC, White Phoenix
no flags Details
Apply styles box in 2nd spreadsheet also cleared. (531.94 KB, image/jpeg)
2016-04-23 23:30 UTC, White Phoenix
no flags Details
sample (7.66 KB, application/vnd.oasis.opendocument.spreadsheet)
2016-04-24 20:36 UTC, Yousuf (Jay) Philips
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description andreaippo 2009-02-07 18:24:52 UTC
If you apply an AutoFormat style to the sheet or an area, the style should be
re-applied after the deletion of rows and columns, because some styles have rows
or columns with alternating properties (e.g. colour).

Expected behavior after deleting one (or more) rows or columns in an
autoformatted area: the style is applied again to the area resulting from the
deletion of the rows or columns to keep the alternating properties (MS Excel 07
behavior)
Comment 1 White Phoenix 2012-07-02 09:10:47 UTC
I am not sure if this is the same thing as the problem I have had for years. I don’t want to make a duplicate if this is the same thing. If you delete a row, column or sheet, the Applied Styles box on the toolbar is reset to the defaults. The only way to get it back is to save and close the spreadsheet and then re-open it.

This has gotten old over the years and it seems that it should be simple to fix.

I don’t know about re-applying the style. If you delete anything and the style is still in use, it should not reset the list in the Applied Styles box anymore than it does in the Applied Styles list in the Styles window. Only if a style is no longer in use should the list change, and then only that one style should be removed.
Comment 2 Edwin Sharp 2013-12-29 14:52:24 UTC
Uncheck Formats in Delete Contents dialog to preserve formatting.
Comment 3 White Phoenix 2013-12-29 18:09:15 UTC
OK so my problem was not the same. It should go to another open bug report on the same problem or a new one created.

One way to create my problem is to:
1. Delete a row or column.
2. Click on the Apply Formatting box and all formats used for that spreadsheet will be listed.
3. Click on another tab to view a different sheet.
4. Click on the Apply Formatting box and only the default formats will be listed.
5. In order to return the format list, you must save and close the file. When you re-open the file the row/column will be deleted, but the format list is restored to the Apply Formatting box.

It seems to me that the formatting list should not be affected by any change of the spreadsheet except when a format has been removed from use. In which case it should only have that one format removed from the list.
Comment 4 Edwin Sharp 2013-12-29 19:22:51 UTC
Can not reproduce comment 3
Please attach example.
Comment 5 White Phoenix 2014-01-05 11:14:03 UTC
Created attachment 82215 [details]
First step: check format list box
Comment 6 White Phoenix 2014-01-05 11:15:12 UTC
Created attachment 82216 [details]
step 2: added column - no problem
Comment 7 White Phoenix 2014-01-05 11:15:52 UTC
Created attachment 82217 [details]
step 3: deleted column - still no problem
Comment 8 White Phoenix 2014-01-05 11:17:57 UTC
Created attachment 82218 [details]
step 5: selected column, box goes blank. If you abort box returns to normal
Comment 9 White Phoenix 2014-01-05 11:19:15 UTC
Created attachment 82219 [details]
step 6: format list box still showing only defaults. Custom formats missing.
Comment 10 White Phoenix 2014-01-05 11:21:51 UTC
Created attachment 82220 [details]
THIS is step 4: column selected. step 5 is when you delete and the box is still blank.
Comment 11 White Phoenix 2014-01-05 11:28:33 UTC
I couldn't just send you an example, but I attached screenshots. As I was creating the errors to get the screenshots, I did realize that I left out that I have custom formats which might be the reason they keep disappearing. Also as you can see in the screenshots, if you don't highlight the column (or row) it's fine. But when you highlight (or select a section) the format list box goes blank. After the operation (this happens when you move a selection as well) the formatting list box is still blank. When you click to see the list only the defaults are listed. The list does not come back after you undo.
Comment 12 Edwin Sharp 2014-01-05 15:49:59 UTC
Thank you.
This is expected behavior when selection has multiple formats.
Comment 13 White Phoenix 2014-01-05 22:42:55 UTC
Not to me. It can be avoided when deleting rows/column simply by not selecting them. However, you need to select the rows/columns/cells when you are going to move them. It certainly isn't necessary if you are moving and inserting instead of moving and replacing, since no formats are being removed from the file. Usually when I do replace or even delete the formats are still being used somewhere else in the file.

Wouldn't it make more sense to just remove the formats no longer being used instead of having to close the file and re-open it to restore the list?
Comment 14 Edwin Sharp 2014-01-06 11:38:24 UTC
Such format removal must be manual.
Comment 15 White Phoenix 2014-01-06 13:18:01 UTC
What about when no formats are being removed from the file? Why would the list revert to default if no custom formats were dropped?
Comment 16 White Phoenix 2014-02-02 20:45:10 UTC
Apache OpenOffice @ApacheOO · 4h 

@WhitePhoenixUS What is "expected" is judged from the perspective of users like you.  There is always room for improvement.

There should be a way for the Applied Styles list to be refreshed without closing and re-opening the file.
Comment 17 White Phoenix 2016-04-23 19:47:03 UTC
This issue has NOT been resolved. This is still an issue. Dismissing it is not solving it.
Comment 18 orcmid 2016-04-23 21:10:55 UTC
The history of this issue does not indicate when it was closed as NOT_AN_ISSUE.

I won't dispute that. It is clearly an issue for the reporter.

However, the attachments do not demonstrate any incorrect behavior.  

There is apparently a request for enhancement that was originally 7 years ago and then taken up again (not clear if same issue) in 2012-2014. 

The combination of that and it being about an old version of OpenOffice, with silence until today, suggests that this should be treated as resolved in some manner.

Nothing in the screen captures demonstrates anything that is not clearly by design.  Without an actual spread sheet we cannot determine if there is simply an user misunderstanding or some other situation.

I am changing this to WONT_FIX (although OBSOLETE or IRREPRODUCIBLE are candidates as well).

If a document and specific instructions on what to do that cause the problem and what the expected behavior is can be provided, we can look again.  Even then, there might not be a foreseeable opportunity to do anything about it.
Comment 19 White Phoenix 2016-04-23 23:21:54 UTC
Created attachment 85487 [details]
Current version of AOO

Here are screenshots from two different spreadsheets. This happens with every spreadsheet I have ever created. The first screen shot shows the version of AOO that is being used. As you can see. When a column that has data in it is deleted the Apply Styles drop down menu is reset to defaults. The only way to get it filled again is to close the spread sheet and reopen it.  Your reasoning for not fixing this is completely illogical. This may be the way it was designed, but how is it acceptable behavior? Does Excel do this? Does any other spreadsheet program do this?

This happens with the Linux version as well.
Comment 20 White Phoenix 2016-04-23 23:23:15 UTC
Created attachment 85488 [details]
Open spreadsheet 1
Comment 21 White Phoenix 2016-04-23 23:24:29 UTC
Created attachment 85489 [details]
Apply formats box has various formats used in spreadsheet listed.
Comment 22 White Phoenix 2016-04-23 23:25:31 UTC
Created attachment 85490 [details]
Formatted column deleted.
Comment 23 White Phoenix 2016-04-23 23:26:35 UTC
Created attachment 85491 [details]
Apply styles box reset to defaults. Only way to restore the list is to close and re-open file.
Comment 24 White Phoenix 2016-04-23 23:27:31 UTC
Created attachment 85492 [details]
2nd spreadsheet.
Comment 25 White Phoenix 2016-04-23 23:28:18 UTC
Created attachment 85493 [details]
Format listing in Apply Styles box.
Comment 26 White Phoenix 2016-04-23 23:29:15 UTC
Created attachment 85494 [details]
Formatted column in 2nd spreadsheet deleted.
Comment 27 White Phoenix 2016-04-23 23:30:15 UTC
Created attachment 85495 [details]
Apply styles box in 2nd spreadsheet also cleared.
Comment 28 orcmid 2016-04-24 05:30:14 UTC
(In reply to White Phoenix from comment #19)
> Created attachment 85487 [details]
> Current version of AOO
> 
> [ ... ]Your reasoning for not fixing this is completely illogical. This may be
> the way it was designed, but how is it acceptable behavior? Does Excel do
> this? Does any other spreadsheet program do this?
> 
> This happens with the Linux version as well.

My reasoning is not that is unworthy, although there does need to be better demonstration of the problem.  My reasoning is that no one has stepped up to fix it and I wanted to make it clear that no action is foreseeable at this time.

Thank you for your additional analysis and explanation.
Comment 29 orcmid 2016-04-24 16:14:39 UTC
(In reply to andreaippo from comment #0)
> If you apply an AutoFormat style to the sheet or an area, the style should be
> re-applied after the deletion of rows and columns, because some styles have
> rows
> or columns with alternating properties (e.g. colour).
> 
> Expected behavior after deleting one (or more) rows or columns in an
> autoformatted area: the style is applied again to the area resulting from the
> deletion of the rows or columns to keep the alternating properties (MS Excel
> 07
> behavior)

By now, is their recognition that the above request (the original 2009 report) is different than the problem described starting in 2012 and continuing to this point?

What would be a better title for the issue in order to focus it on the 2012-reported problem?
Comment 30 orcmid 2016-04-24 16:17:36 UTC
(In reply to orcmid from comment #29)

> By now, is their recognition that the above request (the original 2009
> report) is different than the problem described starting in 2012 and
> continuing to this point?
> 
> What would be a better title for the issue in order to focus it on the
> 2012-reported problem?

PS: Normally the issue would be split into two, but since the 2012 one has taken over and the original one received no discussion, I propose to take over the original issue as the one that all comments apply to.
Comment 31 orcmid 2016-04-24 16:37:42 UTC
(In reply to orcmid from comment #30)
 I propose to take
> over the original issue as the one that all comments apply to.
To be clear, I mean forget the 2009 original report and treat this as the 2012-reported issue, with an appropriate new title.  We will still have to find others able to reproduce it absent a sample document to manipulate.
Comment 32 Yousuf (Jay) Philips 2016-04-24 20:36:57 UTC
Created attachment 85498 [details]
sample

I can confirm the bug mentioned by White Phoenix in 2012 with the attached file.

Steps:
1) Open attached file
2) Make sure the 'Apply Style' drop down menu is visible in the formatting toolbar
3) Notice the two custom styles 'Test' and 'Test 2' are listed in the drop down
4) Select and delete column D
5) Select column B
6) Notice that the 'Apply Style' drop down has now been reset and both custom styles are missing

AOO412m3(Build:9782)  -  Rev. 1709696
2015-10-21 09:51 - Linux x86_64
Comment 33 Yousuf (Jay) Philips 2016-04-24 21:15:18 UTC
So White Phoenix has created a new bug for this issue 126939.
Comment 34 orcmid 2016-04-24 22:16:37 UTC
Change title for this to be the original for 126939.  That one will be a duplicate.
Comment 35 orcmid 2016-04-24 22:17:22 UTC
Flag confirmation in version 4.1.2.
Comment 36 orcmid 2016-04-24 22:18:38 UTC
*** Issue 126939 has been marked as a duplicate of this issue. ***
Comment 37 mroe 2016-04-25 08:07:41 UTC
I see the actual behaviour not as a defect. The program doesn't know what was the intention for a(n auto)formatting. And what is with other (hard or soft) formattings (bold, styles, conditional formatting …) that were applied after the AutoFormat? Will they stay preserved?
Comment 38 oooforum (fr) 2021-09-15 07:57:58 UTC
*** Issue 25213 has been marked as a duplicate of this issue. ***
Comment 39 oooforum (fr) 2021-09-15 08:13:03 UTC
AutoFormat should react like "Format as table" from MS-Excel.

If you add a new row at the end, the format still continue and make also a copy for previous formulas.
Comment 40 Peter 2021-09-26 13:29:46 UTC
I don't understand the duplicate. It has nothing to do with this issue.
Which is more about styles. Plus there is a link to an extension that filles the gap on thew request. Why the duplicate lkinking then?
I dont get it? oooForum can you maybe explain? I would like to understand.

For the Issue that White Phoenix rose. I try to rewrap the issue from my point of view:

After creation of a custom Style, the style is applied to one Cell.
If this Cell becomes deleted, it becomes removed from styles list.

In my opinion this is odd at best. Why does the drop down list first show all attributed styles and then remove some while keep others?

So lets look further. On the side bar, when we load the nice sample from White Phoenix we can select in Styles and Formatting applied Styles. 
The list consists of Default, test and test 2 if you look at the sample file.
Now when we remove the Column and click somewhere, please notice that the applied Styles go blank.
-> This is a bug and In my opinion should not happen.
I assume that this has an effect on the styles drop down which White Phoenix talks about.

Now I add the latest confirmation. But can anyone confirm my observation? I tested on Linux. thx!
Comment 41 oooforum (fr) 2021-10-02 09:24:52 UTC
(In reply to Peter from comment #40)
> I don't understand the duplicate. It has nothing to do with this issue.
For me, this is an enhancement. Both users would have same function like "Format as table".