Bug 61339 - FILEOPEN LibO 3572 .ods: CONDITIONAL FORMATTING without style type, UI Localization related
Summary: FILEOPEN LibO 3572 .ods: CONDITIONAL FORMATTING without style type, UI Locali...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
3.6.5.2 release
Hardware: Other Windows (All)
: medium normal
Assignee: Markus Mohrhard
URL:
Whiteboard: target:4.2.0 target:4.1.0.2
Keywords:
: 62934 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-02-23 11:07 UTC by Rainer Bielefeld Retired
Modified: 2013-09-11 14:15 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Sample Document (8.02 KB, application/vnd.oasis.opendocument.spreadsheet)
2013-02-23 11:07 UTC, Rainer Bielefeld Retired
Details
Sample with many styles (11.03 KB, application/vnd.oasis.opendocument.spreadsheet)
2013-02-23 12:20 UTC, Rainer Bielefeld Retired
Details
Minimal test (8.77 KB, application/vnd.oasis.opendocument.spreadsheet)
2013-06-19 16:01 UTC, sylvain
Details
Screenshots LibreOffice 4.1.0.2 (370.93 KB, application/x-zip-compressed)
2013-07-09 09:05 UTC, Jorendc
Details
Testcase (12.85 KB, application/vnd.oasis.opendocument.spreadsheet)
2013-07-09 09:55 UTC, Jorendc
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rainer Bielefeld Retired 2013-02-23 11:07:28 UTC
Created attachment 75402 [details]
Sample Document

Steps how to reproduce [Reproducible] with Server Installation of "LibO  4.0.1.1+   -  GERMAN UI / German Locale  [Build ID: 2c0c17a6e4bee0ee28131ea4bdc47edc700d659)]"  {tinderbox: @6, pull time  2013-02-1920:00(?)} on German WIN7 Home Premium (64bit) with newly created user profile ….\LODev\4\:

Open attached Sample Document "NewSample357odf" from LibO Start Center.
Expected: cael A3 shown with Formatting "Header" because  of CF
Actual: Style info for cell A1 in Menu 'Formatting -> CF ->  is empty

Now try again after having switched to English UI: Works fine

I wonder whether tat really is 3.5.7 related or to something else, I don't remember with what UI language I created the sample document.
Comment 1 Rainer Bielefeld Retired 2013-02-23 11:24:43 UTC
Language related success is already reproducible with 3.6.5: CF cell A1 recognized with English (USA) UI, but not with German UI.

Same FILEOPEN problem with Spanish UI, others not tested.

UI language during sample document relation does not matter

Sample Document is not valid ODF due to <http://odf-validator2.rhcloud.com/odf-validator2/>, what indicates "content.xml[2,3569]: Error: attribute "style:text-position" has a bad value"; I haven't a clue whether that might be related.

To me this seems to be a serious Version Interoperability Issue.
Comment 2 Rainer Bielefeld Retired 2013-02-23 12:20:59 UTC
Created attachment 75405 [details]
Sample with many styles

The additional sample document seems to show that only LibO build in styles are affected?
Comment 3 Rainer Bielefeld Retired 2013-02-23 15:50:58 UTC
Same with condition "formula". Reproducible on a second PC, so NEW.

Limited number of conditions affected, so that not a reason for MAB. 
But after saved from Localized 3.6 or later the CF will be lost when opened in 3.5, so I leave MAB because of dataloss.

Already [Reproducible] with Server Installation of "LibreOffice 3.6.2.2 release”  German UI/ German Locale [Build-ID:  da8c1e6] on German WIN7 Home Premium (64bit) 

Still was ok with  Server Installation of  "LibreOffice 3.6.0.4  German UI/Locale [Build-ID:  932b512] on German WIN7 Home Premium (64bit)  (already new CF)

@Markus:
Please change  Status to ASSIGNED and add yourself to "Assigned To" if you accept this Bug.
Comment 4 Markus Mohrhard 2013-04-15 01:50:05 UTC
*** Bug 62934 has been marked as a duplicate of this bug. ***
Comment 5 sylvain 2013-06-19 16:01:07 UTC
Created attachment 81075 [details]
Minimal test

Hi,

I've encountered the same bug and I created a minimal test :
- one cell has a conditional format applying a built-in style (Heading)
- the other has a conditional format applying a user defined style (Untitled1)

- If you open this file with an english UI (Options/Language Settings/User Interface) be it USA or UK, both cells are correctly formatted : i.e. Heading and Untitled1 are applied. 
- If you change the UI language to something else (e.g. french) only the user defined style is applied.

So the file is fine, but I think the bug comes from the fact that some parts of LibO use english names (e.g. the apply-style-name XML attribute) and some other parts use translated names (the UI).
As said in the description, when you edit the CF in french the combobox is filled with french names (e.g. Titre, Titre1) and its value is empty.

Reproducible on Windows 7 x64 with :
LibreOffice 3.6.6.2 (Build ID: f969faf)
LibreOffice 4.0.3.3 (Build ID: 0eaa50a932c8f2199a615e1eb30f7ac74279539)
LibreOffice 4.1.0.0.beta2 (Build ID: 33224f4f11a05cfad2249e812fcc2975fbb61f6)

Works with :
LibreOffice 3.4.6 OOO340m1 (Build:602)
LibreOffice 3.5.1.2 Version ID : dc9775d-05ecbee-0851ad3-1586698-727bf66
LibreOffice 3.5.7.2 Version ID : 3215f89-f603614-ab984f2-7348103-1225a5b
Comment 6 Markus Mohrhard 2013-06-28 23:48:45 UTC
I think I finally have an idea why this worked in the old code and no longer in the new conditional format code.

In the old code conditional formats where part of styles so they had no reference to our internal styles except through inheritance. In the new code conditional formats reference a style by name which means that references to our translated styles will break in localized versions.

I need to think about this problem as I think it is a general localization problem.
Comment 7 Markus Mohrhard 2013-06-29 00:56:19 UTC
Hopefully my patch fixes the bug report. I have no localized builds so I can't check this right now.
Comment 8 Markus Mohrhard 2013-06-29 00:57:34 UTC
@Joren: Can you test with a localized build that this is fixed as soon as a daily build with all locals is available?
Comment 9 Commit Notification 2013-06-29 01:06:12 UTC
Markus Mohrhard committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=5b9bad7482a98f2d0d37c4b75a13292abe653ea3

handle localized default style names, fdo#61339



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 10 Commit Notification 2013-07-01 13:39:53 UTC
Markus Mohrhard committed a patch related to this issue.
It has been pushed to "libreoffice-4-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=297363822d460321c0b3bdd4a8acc9f689f4661b&h=libreoffice-4-1

handle localized default style names, fdo#61339


It will be available in LibreOffice 4.1.

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 Jorendc 2013-07-09 09:05:03 UTC
Created attachment 82220 [details]
Screenshots LibreOffice 4.1.0.2

@Markus: Sadly still reproducible using Mac OSX 10.8.4 with LibreOffice 4.1.0.2 RC; Dutch UI and English (US) UI.

2 sample comparison screenshots attached.

Kind regards,
Joren
Comment 12 Markus Mohrhard 2013-07-09 09:29:22 UTC
(In reply to comment #11)
> Created attachment 82220 [details]
> Screenshots LibreOffice 4.1.0.2
> 
> @Markus: Sadly still reproducible using Mac OSX 10.8.4 with LibreOffice
> 4.1.0.2 RC; Dutch UI and English (US) UI.
> 
> 2 sample comparison screenshots attached.
> 
> Kind regards,
> Joren

Can you then please attach a document with conditional format that uses the default styles? Normally the import and export code should take care of translating the localized style names to the english versions. So you see your localized ones in the UI while the file format only knows the english ones.
Comment 13 Jorendc 2013-07-09 09:54:44 UTC
(In reply to comment #12)
> Can you then please attach a document with conditional format that uses the
> default styles? Normally the import and export code should take care of
> translating the localized style names to the english versions. So you see
> your localized ones in the UI while the file format only knows the english
> ones.

Indeed, looks fixed then.
Created my own spreadsheet and applied some Conditional Formatting using English UI, reopened using Dutch UI -> works as expected. The other way around works too.

So as far I can see: fixed for documents you create with LibreOffice 4.1.0.2 and +, not fixed when you try to import a document created with an older version.

Kind regards,
Joren
Comment 14 Jorendc 2013-07-09 09:55:50 UTC
Created attachment 82222 [details]
Testcase

Created using Mac OSX 10.8.4 with LibreOffice 4.1.0.2 RC.