Bug 160510 - When pasting text styled with character format to a new document that style isn't edit-able when "All Styles" are choosen
Summary: When pasting text styled with character format to a new document that style i...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.5.9.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Writer-Styles-Character
  Show dependency treegraph
 
Reported: 2024-04-03 19:00 UTC by Ulrich Windl
Modified: 2024-12-12 05:27 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Partial screenshot showing context menu (10.37 KB, image/png)
2024-04-03 19:00 UTC, Ulrich Windl
Details
Sample document showing the bug (9.45 KB, application/vnd.oasis.opendocument.text)
2024-04-04 21:38 UTC, Ulrich Windl
Details
Another sample document (11.62 KB, application/vnd.oasis.opendocument.text)
2024-10-16 12:53 UTC, Ulrich Windl
Details
Context menu of "English" without option to edit it (10.75 KB, image/png)
2024-10-16 12:53 UTC, Ulrich Windl
Details
Context menu of "English" with the option to edit it (10.67 KB, image/png)
2024-10-16 12:54 UTC, Ulrich Windl
Details
video testing the bug (14.50 MB, video/webm)
2024-12-11 05:53 UTC, BogdanB
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ulrich Windl 2024-04-03 19:00:04 UTC
Description:
For a test I had copied some text that used a character style, and pasted that text into a new empty document.
When I wanted to show the properties of the assigned character style, I realized that the style is not edit-able.
Clicking around in the document eventually made the style edit-able.


Steps to Reproduce:
1. Have some text with a named character style applied
2. Mark and copy such text
3. Paste text into new empty document
4. Switch to character styles, press right mouse button over the style

Actual Results:
You see only "New" and "Delete", but not "Change"

Expected Results:
You should be able to change the named character style


Reproducible: Always


User Profile Reset: No

Additional Info:
Version: 7.5.9.2 (x86) / LibreOffice Community
Build ID: cdeefe45c17511d326101eed8008ac4092f278a9
CPU threads: 8; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: de-DE
Calc: threaded
Comment 1 Ulrich Windl 2024-04-03 19:00:49 UTC
Created attachment 193466 [details]
Partial screenshot showing context menu
Comment 2 m_a_riosv 2024-04-03 21:04:43 UTC
Works for me with
Version: 7.5.9.2 (X86_64) / LibreOffice Community
Build ID: cdeefe45c17511d326101eed8008ac4092f278a9
CPU threads: 16; OS: Windows 10.0 Build 22631; UI render: default; VCL: win
Locale: es-ES (es_ES); UI: es-ES
Calc: CL threaded
Comment 3 Haris 2024-04-04 06:21:14 UTC
Hello Ulrich Windl,

With the newer versions, you can easily change the character styles of a pasted text. These are the steps I used:

1. Copy text with a character style (the text I copied was bolded, and it was from a website).
2. Paste text into an empty document.
3. Select the text and right-click.
4. Hover over "Character", and a dropdown appears to the right with a check next to the character style (for me, it was "Strong Emphasis").
5. Select "No Character Style" from the dropdown. The character style should be removed from the text.

These are the two builds I tested with:

Stable Build
Version: 24.2.2.2 (AARCH64) / LibreOffice Community
Build ID: d56cc158d8a96260b836f100ef4b4ef25d6f1a01
CPU threads: 10; OS: macOS 14.1.2; UI render: Skia/Metal; VCL: osx
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded

Master/Daily Build
Version: 24.8.0.0.alpha0+ (AARCH64) / LibreOffice Community
Build ID: c4023d3ec604abfff38be2053e2989c7ec2ba8c1
CPU threads: 10; OS: macOS 14.1.2; UI render: Skia/Metal; VCL: osx
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded
Comment 4 Ulrich Windl 2024-04-04 21:38:46 UTC
Created attachment 193497 [details]
Sample document showing the bug

Maybe this is just an effect of other bugs related to copying text with character formats. I made an experiment:
If the text pasted contains more than the styled part, then the character format can be edited; however if it contains only the styled part, the character style cannot be edited. In this case I saved the document, closed it and re-opened it, and still: the character style cannot be edited.

If you try to edit the style "Taste", it does not offer the corresponding context menu.
Comment 5 Ulrich Windl 2024-04-05 23:35:28 UTC
(In reply to Haris from comment #3)
I think you misunderstood, or I didn't explain well enough:
I don't want to assign a different "named" character style, but instead I want to change the attributes of the currently assigned style ("Taste" in the screenshot, I thought it was obvious).
Comment 6 Haris 2024-04-11 23:51:58 UTC
My apologies, I read your post regarding character styles and misunderstood which character styles you were referring to. The "Edit Style" options shows up for me, and I'm able to successfully edit any character style. Hence, I'm unable to reproduce the bug in the following two builds:

Stable Build
Version: 24.2.2.2 (AARCH64) / LibreOffice Community
Build ID: d56cc158d8a96260b836f100ef4b4ef25d6f1a01
CPU threads: 10; OS: macOS 14.1.2; UI render: Skia/Metal; VCL: osx
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded

Master/Daily Build
Version: 24.8.0.0.alpha0+ (AARCH64) / LibreOffice Community
Build ID: c4023d3ec604abfff38be2053e2989c7ec2ba8c1
CPU threads: 10; OS: macOS 14.1.2; UI render: Skia/Metal; VCL: osx
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded
Comment 7 Robert Großkopf 2024-04-12 18:37:22 UTC
Tested the attached file with 
Version: 24.2.2.2 (X86_64) / LibreOffice Community
Build ID: d56cc158d8a96260b836f100ef4b4ef25d6f1a01
CPU threads: 6; OS: Linux 6.4; UI render: default; VCL: kf5 (cairo+xcb)
Locale: de-DE (de_DE.UTF-8); UI: de-DE
Calc: threaded
"Taste" is editable here.

Get the same with LO 7.6.4 and LO 7.5.5 on the same system: OpenSUSE 15.6 Beta 64bit rpm Linux

Might be the behavior has something to do with user profile. So test it in safe mode or with a renamed user profile
Comment 8 QA Administrators 2024-10-16 03:15:24 UTC Comment hidden (obsolete)
Comment 9 Ulrich Windl 2024-10-16 12:50:41 UTC
(In reply to Robert Großkopf from comment #7)
> Tested the attached file with 
> Version: 24.2.2.2 (X86_64) / LibreOffice Community
> Build ID: d56cc158d8a96260b836f100ef4b4ef25d6f1a01
> CPU threads: 6; OS: Linux 6.4; UI render: default; VCL: kf5 (cairo+xcb)
> Locale: de-DE (de_DE.UTF-8); UI: de-DE
> Calc: threaded
> "Taste" is editable here.
> 
> Get the same with LO 7.6.4 and LO 7.5.5 on the same system: OpenSUSE 15.6
> Beta 64bit rpm Linux
> 
> Might be the behavior has something to do with user profile. So test it in
> safe mode or with a renamed user profile

Re-confirmed bug with:
Version: 7.6.7.2 (x86) / LibreOffice Community
Build ID: dd47e4b30cb7dab30588d6c79c651f218165e3c5
CPU threads: 8; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: de-DE
Calc: CL threaded

Saved the file in question, closed it, and re-opened it. In my case the character style "English" isn't editable. Maybe it's a Windows-specific issue.
(In reply to Haris from comment #3)

> 4. Hover over "Character", and a dropdown appears to the right with a check
> next to the character style (for me, it was "Strong Emphasis").
> 5. Select "No Character Style" from the dropdown. The character style should
> be removed from the text.

I'm afraid you mis-understood: I don't want to assign a new character style, but I want to *edit* the style assigned.


Well, I found out that the problem is even worse:
Having placed the cursor inside text that has a character style applied, I cannot edit that character style (that was selected when placing the cursor).
However when a different character style is selected that way, I can edit that style.
Comment 10 Ulrich Windl 2024-10-16 12:53:21 UTC
Created attachment 197083 [details]
Another sample document

Here "Power Cycle" has character style "English" applied (while the rest is without style (i.e.: German).
Clicking inside "Power Cycle", and then opening the context menu of "English" does not offer editing the style; however when I place the cursor outside, then I can edit the "English" style.
Comment 11 Ulrich Windl 2024-10-16 12:53:54 UTC
Created attachment 197084 [details]
Context menu of "English" without option to edit it
Comment 12 Ulrich Windl 2024-10-16 12:54:45 UTC
Created attachment 197085 [details]
Context menu of "English" with the option to edit it
Comment 13 Ulrich Windl 2024-10-16 13:04:46 UTC
Due to bug 159168 I reverted from the newer version; until recently new newer portable version fixing the bug was available.
Comment 14 Robert Großkopf 2024-10-16 13:17:10 UTC
You couldn't set your own bug to new, but I could confirm the following behavior:

Open https://bugs.documentfoundation.org/attachment.cgi?id=197083.
Switch to character styles on sidebar.

Be sure you have set "All Styles" to see all styles.
Mark "Power-Cycle" in text content.
Right mouse click on marked character style "Englisch".
There is only available option "New" and "Delete". Other options are greyed out.

Now set "Applied Styles" instead of "All Styles".
Do the same: Mark text, right mouse click on style → "Edit Style" is available.
This right behavior is the same in "Hierarchical" and also in "Custom Styles".

The buggy behavior only appears with "All Styles".

Tested with OpenSUSE 15.6 64bit rpm Linux
LO-Version:
Version: 24.8.2.1 (X86_64) / LibreOffice Community
Build ID: 0f794b6e29741098670a3b95d60478a65d05ef13
CPU threads: 6; OS: Linux 6.4; UI render: default; VCL: kf5 (cairo+xcb)
Locale: de-DE (de_DE.UTF-8); UI: en-US
Calc: threaded
Comment 15 Robert Großkopf 2024-10-16 13:36:39 UTC
Tested the bug again with

Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 40beeb144a00c9725cde4239c251f67c658d31a8
CPU threads: 6; OS: Linux 6.4; UI render: default; VCL: kf5 (cairo+xcb)
Locale: de-DE (de_DE.UTF-8); UI: en-US
Calc: threaded

There the bug will appear if I choose "Applied Styles" and "All Styles". Might be fixing bug159168 has changed the behavior for "Applied Styles" so the bug will also appear with this option.
Comment 16 Buovjaga 2024-11-19 15:02:24 UTC
(In reply to Robert Großkopf from comment #14)
> You couldn't set your own bug to new, but I could confirm the following
> behavior:
> 
> Open https://bugs.documentfoundation.org/attachment.cgi?id=197083.
> Switch to character styles on sidebar.
> 
> Be sure you have set "All Styles" to see all styles.
> Mark "Power-Cycle" in text content.
> Right mouse click on marked character style "Englisch".
> There is only available option "New" and "Delete". Other options are greyed
> out.
> 
> Now set "Applied Styles" instead of "All Styles".
> Do the same: Mark text, right mouse click on style → "Edit Style" is
> available.
> This right behavior is the same in "Hierarchical" and also in "Custom
> Styles".
> 
> The buggy behavior only appears with "All Styles".

Not reproduced, not with 7.5 either.

Arch Linux 64-bit
Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: c8b607b7c0096c58dc5187262bf0133dee728d50
CPU threads: 8; OS: Linux 6.11; UI render: default; VCL: kf6 (cairo+wayland)
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
Calc: CL threaded
Built on 19 November 2024

Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: deaa5dc2a4d5446cdd120236615608702598e365
CPU threads: 2; OS: Windows 11 X86_64 (10.0 build 22621); UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-GB
Calc: threaded
Comment 17 BogdanB 2024-12-11 05:53:11 UTC
Created attachment 198055 [details]
video testing the bug

Ulrich, please see my video
Comment 18 BogdanB 2024-12-11 05:53:50 UTC
I was testing using
Version: 24.8.3.2 (X86_64) / LibreOffice Community
Build ID: 48a6bac9e7e268aeb4c3483fcf825c94556d9f92
CPU threads: 16; OS: Linux 6.8; UI render: default; VCL: gtk3
Locale: ro-RO (ro_RO.UTF-8); UI: en-US
Calc: threaded