Bug 88380 - Character formats (e.g. bold) lost when pasting multiple times
Summary: Character formats (e.g. bold) lost when pasting multiple times
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
: 88923 (view as bug list)
Depends on:
Blocks: Paste Character Formatting-Text-Diverse
  Show dependency treegraph
 
Reported: 2015-01-14 01:08 UTC by Jim Avera
Modified: 2023-06-22 19:03 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
pastebug.odt - demo with emboldened text which can't be re-pasted repeatedly (11.18 KB, application/vnd.oasis.opendocument.text)
2015-01-14 01:08 UTC, Jim Avera
Details
pastebug.odt - demo with emboldened text which can't be re-pasted repeatedly (11.11 KB, application/vnd.oasis.opendocument.text)
2015-01-14 01:11 UTC, Jim Avera
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jim Avera 2015-01-14 01:08:55 UTC
Created attachment 112186 [details]
pastebug.odt - demo with emboldened text which can't be re-pasted repeatedly

If several words are selected, with the first BOLD and the others not, then when they are pasted into another paragraph the emboldening is lost (all words appear as non-bold).  Sometimes.

This occurs either on the first paste, or sometimes it works the first time but subsequent pastes into new paragraphs loose the emboldening.  So, for example, you can't select a paragraph, copy it, and make many copies by repeatedly typing ENTER followed by ^V (the copies will be made but the character formats are lost).

HOW TO REPRODUCE:

Open the attached demo file and follow the instructions within.
Comment 1 Jim Avera 2015-01-14 01:11:06 UTC
Created attachment 112187 [details]
pastebug.odt - demo with emboldened text which can't be re-pasted repeatedly
Comment 2 Buovjaga 2015-01-17 11:10:31 UTC
I reproduced.

Jim: this seems to be a duplicate of bug 79928. Do you agree?
If yes, we could close this as duplicate and comment to the other bug and reference your attachment 112187 [details] test case.

Win 7 64-bit Version: 4.5.0.0.alpha0+
Build ID: 4c93c341be1425401112eed3581e8b8a6308880d
TinderBox: Win-x86@42, Branch:master, Time: 2015-01-16_01:53:40

Ubuntu 14.10 64-bit Version: 4.5.0.0.alpha0+
Build ID: 0ffa3abc7d6c0437ece30cfb1430d28ffcc9f5c1
TinderBox: Linux-rpm_deb-x86_64@46-TDF-dbg, Branch:master, Time: 2015-01-15_22:47:16

LibreOffice 3.3.0 
OOO330m19 (Build:6)
tag libreoffice-3.3.0.4
Comment 3 Robinson Tryon (qubit) 2015-01-17 12:23:27 UTC
(In reply to Beluga from comment #2)
> I reproduced.
> 
> Jim: this seems to be a duplicate of bug 79928. Do you agree?
> If yes, we could close this as duplicate and comment to the other bug and
> reference your attachment 112187 [details] test case.

As there's repro let's stick it in NEW until we decide if it's a dupe.
Comment 4 Jim Avera 2015-01-19 02:42:47 UTC
> Jim: this seems to be a duplicate of bug 79928. Do you agree?
Tentatively no, I don't think they are the same bug.

Bug 79928 seems to be fixed in LO 4.4.0.0.beta2/Linux but this one isn't; however I'm not familiar with the Presentation app so might not have done the repro steps exactly as intended for bug 79928.

Also there are some differences in reported symptoms:  79928 says the formatting is lost on the very first paste, whereas in this bug the first paste works ok but later ones don't.  And the other bug described pasting into a region to which character formatting had been previously applied, whereas this bug occurs pasting into a pristine paragraph with no local formatting.
Comment 5 Gordo 2015-05-05 17:41:29 UTC
1. New Text Document.
2. Type “This is a test.” and Enter.
3. Select “This” and make it Bold.
4. Copy paragraph and paste to the empty paragraph below.
5. Enter and paste again.
Result:
Bold is retained.
6. Enter three empty paragraphs.
7. Place cursor in first empty paragraph.
8. Turn on Bold and type “This”.
9. Turn off Bold and type “ is a test.” and Enter.
10. Copy paragraph and paste to the empty paragraph below.
Result:
Bold is lost.
11. Paste into the other empty paragraphs.
Result:
Bold is retained.
12. Place cursor after last paragraph and Enter.
13. Paste into the empty paragraph.
Result:
Bold is lost.
14. Place cursor after first paragraph and Enter.
15. Paste into the empty paragraph.
Result:
Bold is retained.

Pasting into paragraphs that were created by entering after paragraphs that had direct formatting turned on and off causes the formatting to be lost because there is still something there to say “no bold”.

Version: 4.4.3.2
Build ID: 88805f81e9fe61362df02b9941de8e38a9b5fd16
Comment 6 QA Administrators 2016-09-20 09:38:24 UTC Comment hidden (obsolete)
Comment 7 Jim Avera 2016-09-21 21:34:30 UTC
Bug still there in 5.2.3.0.0+

I tried Gordo's test (Comment #5) and saw the same behaviour.
Comment 8 Xisco Faulí 2017-09-29 08:54:08 UTC Comment hidden (obsolete)
Comment 9 Jim Avera 2017-09-29 18:34:49 UTC
Bug is still there in master 

(Version: 6.0.0.0.alpha0+ Build ID: 892c719fffa06de4c7aeab497326cad7bae9e5c6)

It is easy to reproduce -- open the attached demo and follow the instructions written in that file.

In summary:
  1. Copy text containing bold and not-bold
  2. ^V to paste; works the first time
  3. Click in an empty paragraph
  4. ^V to paste; fails -- boldness is lost
Comment 10 Timur 2018-07-06 15:19:56 UTC
attachment 112187 [details]: 
<text:p text:style-name="P1">
<text:span text:style-name="T8">Loud – </text:span>
<text:span text:style-name="T3">soft.</text:span>
</text:p>

<style:style style:name="P1" style:family="paragraph">
<style:text-properties fo:font-size="14pt" fo:font-weight="bold"/>

<style:style style:name="T3" style:family="text">
<style:text-properties fo:font-weight="normal" officeooo:rsid="000837d9"/>

<style:style style:name="T8" style:family="text">
<style:text-properties officeooo:rsid="000837d9"/>

"Loud" inherits Bold from paragraph P1 and "soft" is text applied Normal. 
When copied for the first time, it inherits paragraph from the existing P4 but retains T8 that keeps Bold. 
When copied subsequently, it inherits P4 but looses T8 and all text is T3 that is Normal. 

I can't say why. Probably related to "Paragraphs are inserted without paragraph end character".
Comment 11 QA Administrators 2019-07-30 03:14:08 UTC Comment hidden (obsolete)
Comment 12 Jim Avera 2019-07-30 03:28:19 UTC
Bug is still there in 

Version: 6.4.0.0.alpha0+
Build ID: f75c2b04785aa05cff3bcd52689feb7400a14e8e
CPU threads: 12; OS: Linux 5.0; UI render: default; VCL: gtk3; 
TinderBox: Linux-rpm_deb-x86_64@86-TDF, Branch:master, Time: 2019-06-15_11:49:26
Locale: en-US (en_US.UTF-8); UI-Language: en-US
Calc: threaded

STEPS TO REPRODUCE (extract from comment #5): 

1. Create new write document
2. Turn on bold by clicking the B icon
   Type "This"
   Turn off bold
   Type " is a test."
3. Select entire paragraph with the mouse, and Control-C to copy
4. Place curser at end of text;
   press ENTER several times (creates empty paragraphs)
5. Place cursor in one of the empty paragraphs, then Control-V to paste

RESULTS: Bold is not preserved.
Comment 13 QA Administrators 2021-08-31 03:55:46 UTC Comment hidden (obsolete)
Comment 14 Timur 2021-08-31 13:04:27 UTC
*** Bug 88923 has been marked as a duplicate of this bug. ***
Comment 15 Timur 2021-08-31 13:07:45 UTC
I think this is the explanation, per Comment 12:
"This is a test" is not "B This /B is a test" with "stop Bold" and default text after, but "B This not-B is a test" with direct format of not-Bold.
Can be seen if format is cleared before paste. 
Doesn't make sense but it's an old issue, just hard to find where mentioned first.  
Cannot be "fixed" without serious change on how direct format is un-applied.
Comment 16 Diana Vides 2023-06-22 19:03:43 UTC
This problem is still present in Version: 7.5.3.2 (X86_64) / LibreOffice Community
Build ID: 9f56dff12ba03b9acd7730a5a481eea045e468f3
CPU threads: 6; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: es-ES (en_US); UI: en-US
Calc: threaded

 Also, it is present in Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 098e8d6f111ca9d7680ed1eec00522fed6487e95
CPU threads: 6; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL threaded