Bug 63432 - FORMATTING: "Change Case" does not work in some situations when symbols appear
Summary: FORMATTING: "Change Case" does not work in some situations when symbols appear
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version: Inherited From OOo
Hardware: All All
: low minor
Assignee: Not Assigned
QA Contact:
URL:
Whiteboard:
Keywords:
: 57397 79605 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-04-11 15:37 UTC by webofht-libreofficebugs002
Modified: 2014-06-04 06:15 UTC (History)
6 users (show)

See Also:
i915 platform:
i915 features:


Attachments
Sample document showing text containing symbols (13.41 KB, application/vnd.oasis.opendocument.text)
2013-04-11 15:40 UTC, webofht-libreofficebugs002
Details
Test change case (8.66 KB, application/vnd.oasis.opendocument.text)
2014-02-11 09:27 UTC, Ákos
Details

Description webofht-libreofficebugs002 2013-04-11 15:37:15 UTC
Problem description: If a symbol such as the open quotation mark appears right before a word, the following “Format → Change Case” functions do not work as expected.


Steps to reproduce:
I save this attached file using LibreOffice Version 4.0.2.2 (Build ID: 4c82dcdd6efcd48b1d8bba66bfe1989deee49c3)

Select the text (including the symbol) → Format 
→ Change Case → Sentence case → (It does not work)

Select the text (including the symbol) → Format 
→ Change Case → Capitalize Every Word → (It does not work)

Select the text (including the symbol) → Format 
→ Change Case → tOGGLE cASE → (It does not work)

Sample text:
hi! 'quotation marks' may cause the problem
hi! “quotation marks” may cause the problem
hi! "quotation marks" may cause the problem
hi! (brackets mmm...) may cause the problem
hi! [square brackets mmm...] may cause the problem
hi! *asterisks may cause the problem
hi! -minuses may cause the problem

'quotation marks' may cause the problem
“quotation marks” may cause the problem
"quotation marks" may cause the problem
(brackets mmm...) may cause the problem
[square brackets mmm...] may cause the problem
*asterisks may cause the problem
-minuses may cause the problem


Current behavior: The three specified "Change Case" features do not work.

Expected behavior: These three specified "Change Case" features should work.


Potential problem in the programming code (a guess): Nothing checks the symbol.

Potential solution (a guess): Add a checking function (e.g. using regular expressions, etc.) to check the first character of each word first for the symbol. If the symbol exists, check the next character for another symbol until a letter appears. When the letter appears, apply the format. This could be one of the new Easy Hacks.

I hope that this will help you to solve the programming problems.

Regards,
C. H. D.
Comment 1 webofht-libreofficebugs002 2013-04-11 15:40:13 UTC
Created attachment 77818 [details]
Sample document showing text containing symbols
Comment 2 Joel Madero 2013-04-11 16:50:57 UTC
Thank you for reporting this issue! I have been able to confirm the issue on:
Version 3.6.5.2 
Platform: Bodhi Linux 2.2 x64
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 
As I've been able to confirm this problem on an earlier release I am changing the version number as version is the earliest version that we can confirm the bug, we use comments to say that the bug exists in newer versions as well.

Marking as:

New (confirmed)
Minor - doesn't prevent high quality work but slows it down
Low - default seems appropriate, not a hugely used feature, only happens with symbols


Note: Easiest way to see all of these issues is to highlight everything and apply the formatting styles, you'll see what works and what doesn't.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 
LibreOffice is powered by a team of volunteers, every bug is confirmed (triaged) by human beings who mostly give their time for free. We invite you to join our triaging by checking out this link:
https://wiki.documentfoundation.org/QA/BugTriage

There are also other ways to get involved including with marketing, UX, documentation, and of course developing -  http://www.libreoffice.org/get-help/mailing-lists/. 

Lastly, good bug reports help tremendously in making the process go smoother, please always provide reproducible steps (even if it seems easy) and attach any and all relevant material
Comment 3 Ákos 2014-02-11 09:27:12 UTC
Created attachment 93852 [details]
Test change case

I can reproduce Change Case problems without symbols:
1. Select all the test from file Change Case
2. Select Format -> Change Case -> UPPERCASE
3. Select Format -> Change Case -> tOGGLE cASE

The result is all lowercase, and if you test in random order the 5 Change Case options (Sentence case, lowercase, UPPERCASE, Capitalize Every Word tOGGLE cASE), the result is not in all case, that you expect.

I can reproduce the bug in LibreOffice 4.1.4.2 and 4.2.0.4
Comment 4 tommy27 2014-06-04 05:08:21 UTC
*** Bug 57397 has been marked as a duplicate of this bug. ***
Comment 5 tommy27 2014-06-04 05:12:34 UTC
*** Bug 79605 has been marked as a duplicate of this bug. ***
Comment 6 tommy27 2014-06-04 05:18:55 UTC
I think the root of the problem is that if you have a sentence like:

"hello world"

and you apply the first letter capitalization, LibO sees the quotation mark (or any other symbol) as the first letter and capitalizes it (you won't notice any visual difference since there's no upper/lower case for those symbols) instead of letter h which is actually seen as the second letter

maybe developers should tweak the code and put an exception to skip those symbols as first letters in a sentence and apply capitalization to the very first letter of a word.

the issue is inherited from OOo and affects AOO 4.1 as well.

I add Writer developer to CC list to hear advice from him.
Comment 7 Ákos 2014-06-04 06:15:33 UTC
I can reproduce with LibreOffice 4.3.0.0beta1


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.