Bug 105352 - Pasting multiple paragraphs without direct formatting into an empty formatted one, will result in the formatting of the last paragraph
Summary: Pasting multiple paragraphs without direct formatting into an empty formatted...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
: 86271 97248 102505 116863 131104 (view as bug list)
Depends on:
Blocks: Paste Formatting-Text-Diverse
  Show dependency treegraph
 
Reported: 2017-01-15 19:04 UTC by Telesto
Modified: 2022-10-06 04:09 UTC (History)
8 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Telesto 2017-01-15 19:04:33 UTC
Description:
This is a rebash of bug 105164. Pasting of unformatted text into an area with direct formatting, will result in applying the direct formatting to the pasted text. When pasting a single paragraph it's quite acceptable.

However, the behavior will be unexpected and counter-intuitive when pasting multiple paragraphs, because only the last paragraph gets formatted.

There are lots of easy workarounds, but the behavior looks quite odd when pasting multiple paragraphs.

Steps to Reproduce:
1. Copy text between the dashes into a new Writer document
----
ABC 


DEF
GHI
JKL
MNO
DEF
GHI
KLM
NOP
QRS
TUV
WXY
----
2. Note that everything is pasted without direct formatting (Font Color: Automatic)
3. Select ABC (apply some direct formatting; bold/underline/Highlight/Font Color)
4. Set the cursor after the 'C' and hit enter (creating a new paragraph; which has the same formatting as ABC. Note: it can happen by accident).
5. Cut/paste or drag "DEF-WXY" into the paragraph created in step 3.
6. WXY will be formatted to the applied formatting of the paragraph below ABC. The rest will be black without direct formatting (Font Color: Automatic)

As an alternative I have added test file. With two paragraphs with different formatting.

Actual Results:  
WXY will be formatted to the applied formatting of the paragraph below ABC. The rest will be black without direct formatting (and font color: Automatic)

Expected Results:
As steve -_-  already commented in bug 105164#c11: only adapting to the formatting for the last row unexpected and counter-intuitive. Three possible solutions:
1. Not the last but the first paragraph should be formatted (problem and source are nearby)
2. All text dragged into a certain formatted paragraph should adapt to the formatting
2. No formatting should be applied

Personally I prefer the last one, because it's quite common behavior in most text editors. 
- MS Word
- Wordpad
- Mozilla Thunderbird
- Zotero
- Google Docs
- Mac Texteditor
- Pages
- Abiword


Reproducible: Always

User Profile Reset: No

Additional Info:
Found in
Version: 5.4.0.0.alpha0+
Build ID: 99eed82939999d9a9689788a4134dd05d5c20c5a
CPU Threads: 4; OS Version: Windows 6.19; UI Render: default; 
TinderBox: Win-x86@42, Branch:master, Time: 2017-01-14_23:37:40
Locale: nl-NL (nl_NL); Calc: CL

and in
LibreOffice 3.3.0 
OOO330m19 (Build:6)
tag libreoffice-3.3.0.4


User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0
Comment 1 Telesto 2017-01-15 19:12:40 UTC
Setting to NEW. Confirmation: https://bugs.documentfoundation.org/show_bug.cgi?id=105164#c11

--> let's bring this to the attention of the design team
Comment 2 Heiko Tietze 2017-01-16 08:54:46 UTC
(In reply to Telesto from comment #0)
> Expected Results:
> 1. Not the last but the first paragraph should be formatted (problem and
> source are nearby)
> 2. All text dragged into a certain formatted paragraph should adapt to the
> formatting
> 3. No formatting should be applied

Definitely yes to 3. We also aim to promote formatting by styles and the direct formatting shouldn't "made easy". As a rule of thumb direct formatting must not be applied or inherited automatically. 
Guess we can remove UX safely.
Comment 3 Heiko Tietze 2018-07-23 11:16:40 UTC
It's a little bit more difficult: when you paste the paragraphs *ABC|DEF* within the bold word (at the pipe sign) you expect the first and last line to be formatted in bold and everything else taking what is defined in the source => WFM. When you paste at *|ABC* it should be the same and similarly when there is no text at all. 

Assuming we do no formatting it becomes
*1
2
3*
ABC
(removing the bold formatting from *ABC*)

So after all I'm for closing this ticket as WFM.
Comment 4 QA Administrators 2019-07-30 03:13:55 UTC Comment hidden (obsolete)
Comment 5 Timur 2020-03-08 18:50:25 UTC
*** Bug 131104 has been marked as a duplicate of this bug. ***
Comment 6 Timur 2020-03-09 11:22:07 UTC
Repro 7.0+ with ODT attachment 158393 [details] from bug 131104, seen as attachment 158355 [details]. 
Note: select just 2 paragraphs with text to be seen (or empty 3rd will be bold).
Comment 7 Randy 2020-03-09 15:00:16 UTC Comment hidden (obsolete)
Comment 8 Heiko Tietze 2020-03-09 15:04:50 UTC Comment hidden (off-topic)
Comment 9 Randy 2020-03-09 16:23:41 UTC Comment hidden (off-topic)
Comment 10 Timur 2020-03-10 13:01:48 UTC
*** Bug 116863 has been marked as a duplicate of this bug. ***
Comment 11 Timur 2020-03-10 13:03:39 UTC
I added bug 126737 to See Also because that report is mostly about this bug. 
But I kept it open for another smaller issue.
Comment 12 Timur 2020-03-11 14:27:59 UTC
*** Bug 102505 has been marked as a duplicate of this bug. ***
Comment 13 Timur 2020-03-23 11:06:30 UTC
*** Bug 97248 has been marked as a duplicate of this bug. ***
Comment 14 Timur 2020-07-30 14:40:21 UTC
*** Bug 86271 has been marked as a duplicate of this bug. ***
Comment 15 QA Administrators 2022-10-06 04:09:17 UTC
Dear Telesto,

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://web.libera.chat/?settings=#libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team

MassPing-UntouchedBug