If I try to clear formatting within parts of the cell contents on a cell range by a macro, nothing happens:
This behavior is proved for Windows 7, LO 5.3.7., Windows 10, LO 18.104.22.168 (32 bit) and for Linux openSUSE LEAP 42.2 with LO 5.3.0 and LO 22.214.171.124 (both generic versions).
Doing so in AOO (any version) operates as desired, it clears the formatting of text portions and gives the whole text the actual cell format.
Steps to Reproduce:
1. Take a sheet cell containing the text "blue and yellow".
2. Select the words "blue" and "yellow" and give them the CharColors blue and yellow resp.
3. Take a cell range oRange containing that cell.
All formats of text portions in a Calc sheet cell remain untouched.
The formatting of text portions should be cleared and the whole text should be given the color of the actual cell format.
User Profile Reset: No
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0
+ LibO 126.96.36.199 (x64) @ Windows 7 Home Premium 64-bit
+ LibO 188.8.131.52 (x64) @ Windows 7 Home Premium 64-bit
I can confirm it for LibO 184.108.40.206 32-Bit, Windows 10
Thank you for reporting the bug. Please attach a sample document, as this makes it easier for us to verify the bug.
(Please note that the attachment will be public, remove any sensitive information before attaching it.
See https://wiki.documentfoundation.org/QA/FAQ#How_can_I_eliminate_confidential_data_from_a_sample_document.3F for help on how to do so.)
Created attachment 140289 [details]
Macros to display bugs using Calc cell range method clearContents with some CellFlags
This attachment shows a set of formatted cells, numbers, date/time, strings, as well as two cells (B4 and C4) with text portion formatting.
You can try the effect on B4:C4 (in fact no effect) by calling the macro
The file comes with two additional macros to serve as an example for bug 116129 as well:
Just a guess:
InsertDeleteFlags::ALL does not contain flags for EDITATTR
Shouldn't this be
( static_cast<InsertDeleteFlags>(nContentFlags) & InsertDeleteFlags::EDITATTR )
( nDelFlags & InsertDeleteFlags::EDITATTR )
Dear Volker Lenhardt,
To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.
There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.
If you have time, please do the following:
Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/
If the bug is present, please leave a comment that includes the information from Help - About LibreOffice.
If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice.
Please DO NOT
Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not
appropriate in this case)
If you want to do more to help you can test to see if your issue is a REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from https://downloadarchive.documentfoundation.org/libreoffice/old/
2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword
Feel free to come ask questions or to say hello in our QA chat: https://kiwiirc.com/nextclient/irc.freenode.net/#libreoffice-qa
Thank you for helping us make LibreOffice even better for everyone!
As with LO 220.127.116.11 and 18.104.22.168 both on macOS Big Sur (11.6) and with LO 22.214.171.124 on openSUSE Leap Tumbleweed there is no different behaviour. The bug persists as specified before.
With regards, Volker
In addition: With LO 3.3.0 on Linux openSUSE Tumbleweed (Leap 15.2) the macro works as desired, it clears the formatting of text portions and gives the whole text the actual cell format.