Bug 88586 - font effect for specifying case
Summary: font effect for specifying case
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
(earliest affected) release
Hardware: Other All
: medium enhancement
Assignee: Not Assigned
Depends on:
Reported: 2015-01-19 14:26 UTC by David SPORN
Modified: 2015-01-26 10:58 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Note You need to log in before you can comment on or make changes to this bug.
Description David SPORN 2015-01-19 14:26:27 UTC
Calc: commands in menu Format | Change case doesn't work on a formatted date

Step to reproduce :

1: new document
2: enter a date (1/2/2015 - 1 feb. 2015)
3: format cell, number is a date, pattern = "MMMM" --> cell display "february" (all lowercase)
4: use Format | Change case to get an uppercase on the first letter or all uppercase --> nothing happens.

Expected behavior :
the cell MUST render the date with the appropriate casing (e.g "February" or "FEBRUARY")

If it is not possible (I feel the function is just a one shot text transformation), then :
- Either add a "font effect" named "Case" or something like that, that allow to specify the casing (not limited to dates)
- Or extends the pattern syntax to specify what case rendering to use. (e.g. I tried something like "Mmmm", but it could be something like "MMMM[case:WordStarstWithUppercase]"
Comment 1 m.a.riosv 2015-01-19 23:18:54 UTC
Hi David, thanks for reporting.

As you have comment, I think change case will never work in a format result.

Format result is language dependent, e.g. in Spanish is lowercase, English US is first letter uppercase.

If there are not dependent cells, it's possible use TEXT() function to format the result, and applying on it the UPPER()/PROPER()/LOWER() functions.
Comment 2 David SPORN 2015-01-20 15:06:40 UTC
Unfortunately for me I have hundreds of cascading dependent cells (i.e _value_ = _previous_value_ + 1).

Well I still think that it would be nice to have a font effect for specifying case.
Comment 3 raal 2015-01-21 08:37:29 UTC
changing summary
Comment 4 Robinson Tryon (qubit) 2015-01-22 08:58:17 UTC
(In reply to David SPORN from comment #2)
> Unfortunately for me I have hundreds of cascading dependent cells (i.e
> _value_ = _previous_value_ + 1).
> Well I still think that it would be nice to have a font effect for
> specifying case.

I don't see any particular reason for this not to exist, so
Status -> NEW

(cc'ing Jay -- he might have something useful to say)
Comment 5 Yousuf Philips (jay) (retired) 2015-01-25 21:06:16 UTC
Not sure if this is possible as date patterns seem to be case-insensitive, so there isnt a difference between "MMMM D, YYYY" and "mmmm D, YYYY" or "Mmmm D, YYYY". This is different from the way php handles its date format, which does allow have lower-case, title-case and upper-case variants.

I think this would likely need to be taken up with a calc expert to see if it possible to achieve this with date patterns.
Comment 6 David SPORN 2015-01-26 10:58:15 UTC
That's why I would rather add case effect in the tab "Font Effect". 

It's true that I originally also thought about extending the date patterns, but on second thought, it would break compatibility badly.

I believe that adding a font effect setting for case effect would have less side effect, and could be used in other usecases (e.g. formatting the result of a macro -I've just thought about that, looking for another use case-)

On the other hand, it could be a problem to consider that a "font effect" instead of a formatting effect.

Then, looking at the "number" tabs in the format dialog box, I see a section "Options" just before the format descriptor, 

--> the case effect could be added there as a drop-down list with "automatic", "lowercase", "uppercase", etc...

What do you think about this ?