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:
Depends on:
Blocks:
 
Reported: 2017-01-15 19:04 UTC by Telesto
Modified: 2018-07-23 11:16 UTC (History)
1 user (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.