The current paste operation disfigures the formatting either of the source string or of the target paragraph.
Steps to Reproduce:
1. Mark a substring of some paragraph formatted one way.
2. Copy it.
3. Paste it into a paragraph formatted a different way.
The target paragraph assumes the formatting of the source paragraph.
The formatting of the target paragraph should remain intact.
User Profile Reset: No
OpenGL enabled: Yes
The document attached describes it in full and suggests a repair.
Created attachment 151009 [details]
Full description of bug, justification of complaint, suggestion
Current functioning of the paste operation is based on the failure to distinguish between block-level formatting and inline-element formatting. It is suggested to observe this distinction.
did you try to use "Paste Special->Unformatted text"?
This is described extensively in the document appended to the report.
Design team: please inspect the attached design document
If you work with styles the copy/paste operation will not override in Writer. Workflow:
* Insert some dummy text, apply a style and change it to something else (eg font color red)
* Create another document, do the same as before but don't change the style
* Copy/paste from one into the other document
=> the document style is preserved (meaning the red font color is lost in one way or adopted in the other), and that's good, at least for Writer.
There is a similar request for Impress in bug 112697 (and the duplicate bug 79928) where the situation is not so clear. What template (slide background color/image, indentation of bullets etc.) should be used for copy/paste operations? The source means you add another master or the target and you change the copied objects. Ideally we get a Paste Special option.
Back to the topic, when you paste special in Writer per "Without Style" it's the same as "Unformatted Text" and the opposite "Adopt Style" (or whatever we call this option) it changes all your document as the inserted style is taken. Don't think it's useful this way. Could you provide a use case like "I copy <foo> from <bar> and paste at <baz> expecting <qux>?
At the moment, I can do nothing about this, since on my current installation (LO 184.108.40.206 on Windows 7), the bug does not show. I.e., when I copy a string from paragraph source to paragraph target, the formatting of the target is not touched, no matter whether it uses a predefined or a user-defined template. It thus appears that this bug is a feature of the Linux version. I will be back when I can use my Linux version.
[Automated Action] NeedInfo-To-Unconfirmed
I have now checked this for LO 220.127.116.11 on Kubuntu 18.04. Result:
I confirm (comment 5) that if the source paragraph has a style applied, copying part of this paragraph into another one does not transfer that style. Moreover, what I observed for the Windows version now holds for the Linux version, too: Paragraph properties are generally not transferred if only part of a paragraph is copied and pasted. I.o.w.: For properties applying to an entire paragraph, it does not matter for the copy/paste operation whether they have been stipulated specifically for the source paragraph or they are properties of a style applied to it. So far, so good; problem partly solved.
However, a difference appears for character properties:
- If a certain character property (say font size 10 pt) is set in the style applied to the source paragraph, it is not transferred by copy/paste of part of it.
- If the same property is assigned specifically to the source paragraph, then it is inherited by all of its parts and, therefore, transferred to the paste target.
This is still inconsistent. Properties applied to entire paragraphs should _never_ be copied if only part of them is copied.
Moreover, see Bug 113605, comment 6.
If you modify the paragraph style in document A and copy text into document B, the style of B is preserved, which makes sense. If the copied text has a character style or direct formatting applied, wouldn't expect anything else.
I don't see an issue.
We are talking about an attribute - a character style - applied to an entire paragraph (not to parts of it). Why is it treated differently depending on whether it is a component of a paragraph style or stipulated by direct formating of the given paragraph?
(In reply to Christian Lehmann from comment #10)
> character style - applied to an entire paragraph
The character style (CS) is not meant to format paragraphs, it applies on single words or phrases and comes on top of the paragraph style (PS). For example, you can define the PS "Citation" in italic and a CS "InnerCitation" in normal weight.
Example: <i>He heard quiet steps behind him.</i> That didn't bode well.
From start to end of the CS formatted part it will adopt the copied text.
Example: <i>He heard quiet [didn't bode] steps behind him.</i> That didn't bode well.
And of course it also takes what your copy from
Example: <i>He heard quiet steps behind him.</i> That didn't <i>heard quiet</i>bode well.
The same happens with directly formatted text.
Maybe we have a terminological problem here. For reasons not transparent to me, recent editions of LO offer attributes like font size, italics and so on in two submenus of the Format menu, viz. in Text and Character [this should be undone, by the way]. I called this kind of attribute "Character" attribute just to comply with recent terminology. I was not referring to the rubric "Character Styles" of the Styles panel.
Now if that is settled, then your statement that this kind of attribute "is not meant to format paragraphs" does not hold. Of course I can apply such attributes to an entire paragraph. And it does make sense: Of course, we have paragraphs formated with a certain Text (or "Character") attribute, like quotations to be set in a smaller font size etc.
Now as said before, there are (at least) two ways of assigning such an attribute to a paragraph: Either in a Paragraph Style (this time, yes, using the rubric "Paragraph Styles" of that panel). Or else by marking the entire paragraph in question and assigning it the attribute in question (by any of the methods available for this operation).
If we can agree on this, then I would uphold my complaint about the differential copy/paste treatment of the two paragraph attributes. Which is the treatment of such a text attribute holding for an entire paragraph that you would "expect" (as you say) on a copy/paste operation applied to part of it?
(In reply to Christian Lehmann from comment #12)
> Maybe we have a terminological problem here. For reasons not transparent to
> me, recent editions of LO offer attributes like font size, italics and so on
> in two submenus of the Format menu...
The main menu has Format > Text > Bold, Italic... which is direct formatting (it wont change across the document), with the context menu Character > Default, Emphasis... is character style (the appearance changes over the whole document if the style is modified). And the same is available at the main menu under Styles.
Paragraph styles do not override the target, character styles and direct formatting is taken into the target. The supposed way to format documents is to use paragraph styles for sections and to highlight only parts with character style.
That works perfectly for me and I recommend to resolve the issue respectively. Admittedly it's not really simple, as you may expect, but text processors are complex software and you have to learn concepts. The alleged inconsistency comes from the fact that we not only want to support expert users but also people who just write a short letter with no straight formatting, as an example.
(In reply to Heiko Tietze from comment #13)
> (In reply to Christian Lehmann from comment #12)
> > Maybe we have a terminological problem here. For reasons not transparent to
> > me, recent editions of LO offer attributes like font size, italics and so on
> > in two submenus of the Format menu...
> The main menu has Format > Text > Bold, Italic... which is direct formatting
> (it wont change across the document), with the context menu Character >
> Default, Emphasis... is character style (the appearance changes over the
> whole document if the style is modified). And the same is available at the
> main menu under Styles.
I cannot reproduce this. First, taking stock:
a) The main menu Format has (among others) two submenus called Text and Character.
b) The context menu (available upon right-click in the document) only offers the Character menu plus a selection of Character Styles as available from #c.
c) In the Styles panel, there are (among others) catalogs of paragraph and of character styles. Upon modifying any of these, menus appear which offer features of the options also available from the main Format menu.
Now ignoring #c, I observe that the submenu Text of #a offers the very same features as the submenu Character. It is this what I considered redundant; the more so as the same features are, again, available as clickable icons in the Formatting Toolbar. One can also confuse the user by presenting the same features under different names.
As for #b, it does the same service as the submenu Character of #a plus the Character Styles list of #c. I observe no difference concerning the appearance changing over the whole document. This is as it should be.
> Paragraph styles do not override the target, character styles and direct
> formatting is taken into the target. The supposed way to format documents is
> to use paragraph styles for sections and to highlight only parts with
> character style.
But please consider the case that I made in comment 12: I can assign a certain Font property like, say, 11 pt, to an entire paragraph by defining and assigning a paragraph style which has this feature. Or else - if I have only one such paragraph in my document - I do not define such a style, but simply mark the paragraph and assign it this font property. I see nothing wrong in this latter procedure, nor do I see an alternate way of doing this which avoids the inconsistency that I mentioned.
Sorry if this exchange boils down to removing a misunderstanding. But hopefully it will lead to clearer menus and menu functions.
Could someone please provide *full* description of *every small* step needed to see the problem, and that full description followed by clear description of which result of the steps is considered wrong, and which is the expected result - all that without now-useless description of _why_, which is already tldr here?
For me, problem here is the discussion itself, which repeats from time to time. What I do is convert those bugs to Documentation, like bug 112872 for clone formatting.
Documentation should be very clear with all those examples, so that we immediately can point there. But I can't see a good page on copy/paste with direct/style/character...