Bug 88793 - EDITING, subtotals don't apply formatting
Summary: EDITING, subtotals don't apply formatting
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.1.0.4 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:5.3.0
Keywords: bibisected, bisected, regression
: 92233 (view as bug list)
Depends on:
Blocks: Function-Subtotal
  Show dependency treegraph
 
Reported: 2015-01-25 20:26 UTC by Robert Gonzalez MX
Modified: 2018-08-28 09:08 UTC (History)
8 users (show)

See Also:
Crash report or crash signature:


Attachments
Test file (71.88 KB, application/vnd.oasis.opendocument.spreadsheet)
2015-01-25 20:26 UTC, Robert Gonzalez MX
Details
Screenshot (133.48 KB, image/png)
2015-01-25 21:34 UTC, m.a.riosv
Details
Screenshot (65.74 KB, image/png)
2016-06-09 16:30 UTC, Robert Gonzalez MX
Details
Subtotals screenshot (106.12 KB, image/png)
2016-08-11 21:03 UTC, Robert Gonzalez MX
Details
Subtotals screenshot (138.80 KB, image/png)
2016-08-23 20:46 UTC, Robert Gonzalez MX
Details
screenshot_Linux (179.65 KB, image/png)
2017-04-27 08:22 UTC, Arul Michael
Details
selecting the option group by group (237.24 KB, image/png)
2017-07-25 16:46 UTC, Xavier Van Wijmeersch
Details
without selecting group by group (180.08 KB, image/png)
2017-07-25 16:50 UTC, Xavier Van Wijmeersch
Details
Test file with previous versions (49.46 KB, application/vnd.oasis.opendocument.spreadsheet)
2018-04-29 17:03 UTC, Robert Gonzalez MX
Details
Test file created with LO 6.1 apha1 (19.69 KB, application/vnd.oasis.opendocument.spreadsheet)
2018-04-29 17:04 UTC, Robert Gonzalez MX
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Gonzalez MX 2015-01-25 20:26:37 UTC
Created attachment 112795 [details]
Test file

In LO 4.3.5.2 on Windows 8.1 when applying subtotals it doesn't perform the include formatting option.

Steps to reproduce:

Open the test file
Go to cell A1
Select form the menu Data
Select Option Subtotals
In the first group select Group by: Group
Select in the calculate subtotals for: the months 
use the function sum
Select tab options
Select include formats
apply with OK

The result of the subtotals doesn't have the formatting
Comment 1 m.a.riosv 2015-01-25 21:34:50 UTC
Created attachment 112797 [details]
Screenshot

I think it works fine for me:
Win7x64
Version: 4.3.7.0.0+
Build ID: db4be3fee9369d8a0bb2df07c25564f19eb564ed
TinderBox: Win-x86@51-TDF, Branch:libreoffice-4-3, Time: 2015-01-23_21:42:55

Screenshot attached.
Comment 2 m.a.riosv 2015-01-25 21:47:47 UTC
Sorry @Robert too quick.

I see now.

Reproducible.
Win7x64
Version: 4.1.6.2 Build ID: 40ff705089295be5be0aae9b15123f687c05b0a
Version: 4.2.8.0.0+ Build ID: 1fc1d0d7d38bb16832d0d78d78682ed2d5f8716f
 TinderBox: Win-x86@42, Branch:libreoffice-4-2, Time: 2015-01-08_03:10:08
Version: 4.3.7.0.0+ Build ID: db4be3fee9369d8a0bb2df07c25564f19eb564ed
 TinderBox: Win-x86@51-TDF, Branch:libreoffice-4-3, Time: 2015-01-23_21:42:55

Crash as already reported with:
Version: 4.4.0.3 Build ID: de093506bcdc5fafd9023ee680b8c60e3e0645d7
Version: 4.4.1.0.0+ Build ID: cd2434655c94814598daa8105cab0af314a6adf7
 TinderBox: Win-x86@42, Branch:libreoffice-4-4, Time: 2015-01-23_02:40:36
Version: 4.5.0.0.alpha0+ Build ID: e3c0025461bdf55e62a308a76c3aa0a35109f076
 TinderBox: Win-x86@39, Branch:master, Time: 2015-01-24_02:19:31


Last working for me:
Win7x64
Version 4.0.6.2 (Build ID: 2e2573268451a50806fcd60ae2d9fe01dd0ce24)
Comment 3 Cor Nouws 2015-02-03 10:05:42 UTC
according to mariosv a regression
Comment 4 Matthew Francis 2015-02-12 04:47:25 UTC
The subtotals lose their formatting as of the below commit.

Adding Cc: to markus.mohrhard@googlemail.com; Could you take a look at this? Thanks


57efd69c22e2c6f5cb4d057345644b6e07a62d48 is the first bad commit
commit 57efd69c22e2c6f5cb4d057345644b6e07a62d48
Author: Markus Mohrhard <markus.mohrhard@googlemail.com>
Date:   Fri May 24 22:41:44 2013 +0200

    remove inherited number formats, related fdo#60215
    
    Change-Id: I23d5e1b3baeb1499ada1fba1665027bdbe3fbb87
Comment 5 Robert Gonzalez MX 2015-05-24 00:21:47 UTC
Hi.

Reproducible with Version: 5.0.0.0.beta1
Build ID: 0a16c3dda4150008d9be6f24cbd15ac198d116d3
Locale: es-MX (es_MX) on windows 8

I think the option of formatting should be independent from the pre-sorting.
The option of include formatting is only selectable when the pre-sorting option is enabled.
Comment 6 m.a.riosv 2015-06-21 22:18:36 UTC
*** Bug 92233 has been marked as a duplicate of this bug. ***
Comment 7 Robinson Tryon (qubit) 2015-12-13 11:12:16 UTC Comment hidden (obsolete)
Comment 8 Robert Gonzalez MX 2016-06-09 16:29:45 UTC
Hello.
Just tested this bug with Version: 5.2.0.0.beta1
Build ID: 1e9933ef611c66bcded94b84052543c78cf1c223
CPU Threads: 8; OS Version: Linux 4.1; UI Render: default; 
Locale: es-MX (es_MX.UTF-8)
In OpenSUSE Leap 42.1

Is still reproducible
Comment 9 Robert Gonzalez MX 2016-06-09 16:30:56 UTC
Created attachment 125575 [details]
Screenshot
Comment 10 Commit Notification 2016-07-29 23:31:00 UTC
Arul Michael committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=88a5f7d56f9e6040450fb959ce8d091a50edcfde

tdf#88793 EDITING, subtotals don't apply formatting

It will be available in 5.3.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 11 Robert Gonzalez MX 2016-08-11 21:02:16 UTC
Hi.

I just tested it with Version: 5.3.0.0.alpha0+
Build ID: f471c55378290fb8dc3571c74cc6abe90d81c46c
CPU Threads: 8; OS Version: Windows 6.2; UI Render: default; 
TinderBox: Win-x86@62-merge-TDF, Branch:MASTER, Time: 2016-08-11_08:44:29
Locale: es-MX (es_MX); Calc: group
On Windows 10

And is not fixed yet. I add a screenshot of the result.
Comment 12 Robert Gonzalez MX 2016-08-11 21:03:15 UTC
Created attachment 126764 [details]
Subtotals screenshot
Comment 13 Robert Gonzalez MX 2016-08-23 20:45:51 UTC
Hi there!

Testing with Version: 5.3.0.0.alpha0+
Build ID: 6431e91eca9e44684066a32ed3d6411509dac781
CPU Threads: 8; OS Version: Windows 6.19; UI Render: default; 
TinderBox: Win-x86@42, Branch:master, Time: 2016-08-21_06:34:00
Locale: es-MX (es_MX); Calc: group
On Windows 10

Still not working.
Comment 14 Robert Gonzalez MX 2016-08-23 20:46:30 UTC
Created attachment 126993 [details]
Subtotals screenshot
Comment 15 m.a.riosv 2016-08-23 21:37:02 UTC
Looks as if Subtotal follow the format only with a standard format.

i.e. with the sample file, selecting Spanish (Mexico) as language for locale setting (Menu/Tools/Options/Language settings/Language/)
seems to work fine.
or selecting a % format without decimals, results in a % format with two decimals.
Comment 16 Xisco Faulí 2016-09-10 22:37:12 UTC
Hi Arul,
Please, next time you assign a bug to yourself, remember to change the status and the assignee.
Regards
Comment 17 Xisco Faulí 2016-09-26 15:13:39 UTC
Adding Cc: to Markus Mohrhard
Comment 18 Robert Gonzalez MX 2016-11-13 17:55:40 UTC
Hello.

I have tested this bug with Calc Version: 5.2.3.3
Build ID: d54a8868f08a7b39642414cf2c8ef2f228f780cf
CPU Threads: 8; OS Version: Windows 6.2; UI Render: default; 
Locale: es-MX (es_MX); Calc: group
on Windows 10 and XP SP3

And still reproducible.

I have changed the locale settings to English (USA) and the default language for documents too and still reproduces.

Also tested inserting the subtotal function and in this way the formatting is applied.

Steps to test:

insert a whole row at row 5
select the whole new row 5 
clear direct formatting to ensure there is no formatting
go to D5
insert function with the fx button in the formula toolbar o with the menu insert function or ctrl F2
seek for the subtotal function in the wizard
click next and in the function field type 9 (sum)
in the range field type D2:D4 then OK
The result displays formatted

Also tested with Version: 5.3.0.0.alpha1+
Build ID: 4ea62fe8a1194bca3bee5048832456c3559dcb8e
CPU Threads: 8; OS Version: Windows 6.2; UI Render: default; Layout Engine: new; 
TinderBox: Win-x86@62-merge-TDF, Branch:MASTER, Time: 2016-11-05_23:04:01
Locale: es-MX (es_MX); Calc: group

And

Version: 5.3.0.0.alpha1+
Build ID: f20df23ad9380d19dfb64b51d943109bd3895efe
CPU Threads: 8; OS Version: Windows 6.2; UI Render: default; Layout Engine: new; 
TinderBox: Win-x86@62-merge-TDF, Branch:MASTER, Time: 2016-11-12_23:23:49
Locale: es-MX (es_MX); Calc: group
Comment 19 Arul Michael 2017-04-27 08:22:53 UTC
Created attachment 132884 [details]
screenshot_Linux

Hi
I could not recreate the issue in my linux machine with the master build. Please see the screenshot attached following the steps given in comment 1.
Thanks
Arul
Comment 20 Xavier Van Wijmeersch 2017-07-25 16:46:48 UTC
Created attachment 134844 [details]
selecting the option group by group

this screenshot shows zero's in column B where there need the groupsname
Comment 21 Xavier Van Wijmeersch 2017-07-25 16:50:11 UTC
Created attachment 134845 [details]
without selecting group by group

Did two test one following the description, that one give the zero's in column B
second test i did not select group by group and the group name is given in column B
Comment 22 Robert Gonzalez MX 2018-04-29 16:55:29 UTC
Hi.

Tested with Version: 6.1.0.0.alpha1 (x64)
Build ID: cb47f0d320994e001bc38dc2ee9b7d957b15e6ab
CPU threads: 8; OS: Windows 10.0; UI render: GL; 
Locale: es-MX (es_MX); Calc: CL

I have made two tests, using Data - Subtotals, which is the case for this bug, and another test using the function subtotals.

What I find out using Data - Subtotals is that in the new rows inserted by the grouping, the cell style used for this is "Result" and is used in all the cells with the subtotal results.
But if I apply manually the cell style "Result2" to one of the subtotals results, the correct formatting is applied.

These styles are not present in a new spreadsheet, so I guess that they are created when the Data - Subtotals procedure is executed.

Maybe in this procedure, the style applied to the grouping is "Result" and the style to apply to the subtotal results should be "Result2".

Actually, creating a new spreadsheet in 6.1, and typing all the test data again, and performing the Data - Subtotals with the menu, it doesn't create the "Result" and "Result2" styles. Looking for them in the styles navigator window, they are not present nor hidden.

When selecting the cells of the typed data, the "default" style is highlighted in the styles window,  but when a cell in the subtotals row is selected or clicked, nothing is highlighted in the styles window, and there are no "hidden" styles.

Also, the subtotals results don't apply the same formatting from the data used.
Comment 23 Robert Gonzalez MX 2018-04-29 17:03:31 UTC
Created attachment 141764 [details]
Test file with previous versions
Comment 24 Robert Gonzalez MX 2018-04-29 17:04:14 UTC
Created attachment 141765 [details]
Test file created with LO 6.1 apha1
Comment 25 Robert Gonzalez MX 2018-04-29 17:17:13 UTC
When opening the file created with LO 6.1 apha1 in LO 6.0.3.2 x64 all the cells including the ones created by the Data - Subtotals have the default style and the subtotals results have the correct style, but they don't have the bold italics highlight.

Redoing the Data - Subtotals procedure, displays the message "Delete data? yes o no". Answering yes refresh the subtotals losing the formatting. But the bold italics highlight is not made, and the "Result" and Result2" styles are not created either.