Description: I find that when I copy text LibreOffice Writer either (1) copies exactly what I selected, or (2) adds an extra blank after the copied text, or (3) adds extra blanks both before and after the copied text. I have no idea why I sometimes get one behavior, and sometimes another. My preference would be always to copy exactly the selected text, and never add extra blanks. But regardless of which behavior you choose, it should be consistent. I can delete the unwanted blanks if I know I will always get them. Steps to Reproduce: Select a few characters and copy them to another place using ctrl-C and ctrl-V. Try characters from the start, middle and end of a word. Simply notice whether any extra blanks appear. Actual Results: The results are inconsistent. Sometimes I get extraneous blanks, sometimes not. It is this inconsistency that is the problem. Expected Results: Only the text that I selected should appear. Nothing else should be added or inserted. If I wanted to copy the text with a blank I would have selected the text and the blank together. Reproducible: Sometimes User Profile Reset: No Additional Info:
Thank you for reporting the bug. it seems you're using an old version of LibreOffice. Could you please try to reproduce it with the latest version of LibreOffice from https://www.libreoffice.org/download/libreoffice-fresh/ ? I have set the bug's status to 'NEEDINFO'. Please change it back to 'UNCONFIRMED' if the bug is still present in the latest version.
I am using version 6.3.3 which is not on your list of versions.
[Automated Action] NeedInfo-To-Unconfirmed
I can't confirm it with Version: 6.4.0.0.alpha1 (x64) Build ID: cc57df8f942f239d29cb575ea5a7cb01405db787 CPU threads: 4; OS: Windows 10.0 Build 18362; UI render: GL; VCL: win; Locale: de-DE (de_DE); UI-Language: en-US Calc: threaded Is it possible for you to attach a screencast?
1. Have "a b c" in a document. 2. Select and copy "b". No spaces selected before or after. 3. Place right after the "b" and paste. Expected result by OP: "a bb c" Actual result: "a b b c". Also try: 3. Place right before the "c" and paste. Expected result by OP: "a b bc" Actual result: "a b b c". BUT... 1. Have "abc" in a document. 2. Select and copy "b". 3. Place right after "b" and paste. Expected result by OP: to be consistent with the automatic space insertion, so either "ab bc" or "abb c". Actual result: "abbc". @Contestcen: please confirm that this is what you are observing and reporting. I think this is LibreOffice automatically detecting whether the selection is in word limits and trying to be smart about it by making sure it's inserted as a word without repeating spaces before and after or inserting them accordingly. In the first two cases Writer understand "b" is a word. In the third case it's clearly not.
Sorry, you're right. I misunderstood your report. I confirm that behaviour, but I don't think that this is a bug. If you have a b c every character is treated as a single word. If you paste it directly before or after a word, LO adds a blank space to separate the words. That's what I expect. If you have abc and copy b it is a character and therefor it is the correct behaviour if no space is added. So in my view NOTABUG See also bug 112011.
I am noticing that pasting as unformatted text will follow OP's desired behavior. LibreOffice can be customized to bind Paste Unformatted to a keyboard shortcut, so a fast workflow can be prepared.
Created attachment 155598 [details] Test cases for copying text I have attached some test cases which confirm what Octavio has suggested, however, I believe I have seen other behavior where I copy a single letter from the middle of a word into another word and blanks sometimes get added. I will try to find and isolate this. Meanwhile -- is there any way to turn off this automatic blank feature?
We have two options here. First, this is NotABug. As explained, difference is characters and words. So you cannot turn off feature, but solution for a user is Paste Unformatted. Other is to update Documentation, which I prefer. Unless it's already explained, because I couldn't find, we can add some text in Paste section like https://help.libreoffice.org/6.4/en-US/text/shared/guide/pasting.html?&DbPAR=WRITER&System=WIN: "Writer will copy and paste a word with trailing or leading space, to separate from other word. Same is for single letter, because it's regarded a word. One or more characters from a word will be pasted without space. Words pasted as unformatted text will also not have a space."
(In reply to Timur from comment #9) > "Writer will copy and paste a word with trailing or leading space, to > separate from other word. Same is for single letter, because it's regarded a > word. > One or more characters from a word will be pasted without space. > Words pasted as unformatted text will also not have a space." I agree that this should be documented. It's not "trailing or leading" but "trailing and leading". I did some tests to confirm this. I also think that the phrase "single letter" is ambiguous; it can be thought of any character from within a word if the rest of the proposed text has not been read yet. Allow me to propose a new text: --- If a text cut or copied from Writer is surrounded by spaces it will be considered as a set of words. When pasted, Writer will surround it smartly by spaces to keep it as a word: separated by spaces from other characters but avoiding any duplication of spaces. If the text is pasted as Unformatted Text, this consideration is ignored and the text is pasted as is, without adding any spaces. --- My two cents.
(In reply to Octavio Alvarez from comment #10) > --- > If a text cut or copied from Writer is surrounded by spaces it will be > considered as a set of words. When pasted, Writer will surround it smartly > by spaces to keep it as a word: separated by spaces from other characters > but avoiding any duplication of spaces. > > If the text is pasted as Unformatted Text, this consideration is ignored and > the text is pasted as is, without adding any spaces. > --- Small correction: Writer will surround it smartly by spaces to keep it as a set of words. --- If a text cut or copied from Writer is surrounded by spaces it will be considered as a set of words. When pasted, Writer will surround it smartly by spaces to keep it as a set of words: separated by spaces from other characters but avoiding any duplication of spaces. If the text is pasted as Unformatted Text, this consideration is ignored and the text is pasted as is, without adding any spaces. ---
Paste unformatted is not a useful solution for me. Aside from the difficulty of pressing 4 keys simultaneously, paste unformatted loses ALL formatting, not just word boundaries, namely font, size, and font effects. The reason that I am copying single characters instead of just retyping them is to preserve this formatting. It is more work to reformat the copied text than to delete the unwanted blanks. BTW, the text that I copied did not have blanks on either side. It was embedded in a line of dots (periods). This is another problem I have with LibreOffice. I have to do a lot of work to prevent periods from being compressed into ellipses. I disagree that this problem is NotABug. The fact that the extra blanks were inserted intentionally only means that this is not a programming bug, but it is still a design bug. Any time that you change something that I type, it's a bug. If you capitalize a letter that I typed in lower case, that's a bug. If you change a word I typed, that's a bug. If you change 3 dots into an ellipsis, or --> into an arrow, change 2nd into 2 with a superscript nd, that's a bug, unless I specifically tell you to make those formatting changes. Sorry, just sounding off, but this all gets very frustrating constantly fighting against program features that I'm sure the designers thought would actually be helpful.
(In reply to contestcen from comment #12) [On Paste Unformatted not being useful] > The reason that I am copying single characters instead of just retyping them > is to preserve this formatting. Can you share your use case? This is, why are you copying single characters instead of typing them? Put another way, why is it more difficult to type than to select, copy and paste? > BTW, the text that I copied did not have blanks on either side. It was > embedded in a line of dots (periods). Can you share a sample document and the step-by-step instructions to reproduce it? What we have tested so far does not match your description.
Created attachment 155723 [details] Copying text enclosed in dots/periods I have attached a set of test cases. On each line I have taken some characters from the original text and copied them, as indicated. The reason that I copy single characters or single words instead of retyping them is that I want to keep the same font and font effects. If I retyped the text, I would then have to select it, change it to bold, and then find the desired font by scrolling the drop-down list. If I do that carelessly, I would then need to unbold the following text and change it back to Times Roman. Or, the character might be something special that I can't just type. I would have to find it in the Special Characters lists.
I still keep getting extra blanks that are not explained by word boundaries. When I tried to reproduce this to show you, I got the opposite result. There was a blank missing according to what you have told me. Here is an example aaa bbb ccc Original text aaa bbb aaa bbbccc Copied “aaa bbb” before “ccc” Expected “aaa bbb aaa bbb ccc”
I have now been able to reproduce the copying error that I observed on Monday. I copied some text that had no leading blank(s) after text that had no trailing blanks, and ended up with 2 blanks between them. I will attach a file showing the problem.
Created attachment 155827 [details] Extra blanks when copying text BTW, I had the very devil of a time making the text in the second set of brackets boldface. I had to go word-by-word, and sometimes a character at a time.
Please see my comments 15 and 16 and their attachments. These show both of the errors that I reported originally, and they are not explained by the feature that adds blanks at word boundaries if they are missing. This bug report should be reinstated.
Can you share your use case? Your workflow does not seem to be typical. It would be useful to understand your use case, as asked in comment #13.
I don't know what you mean by "use case." I copy text so that I don't have to retype it and re-establish its characteristics such as font, size, bold, italic or special characters. It is often much faster to copy the text than to scroll through the dropdown list of fonts. It is not reasonable to send you my entire document, which is now around 115 pages, so I have isolated the problems for you and sent you examples, with explanations of how I got the results.
Maybe your workflow can benefit from using Styles. I didn't understand that much but it may be worth a try. I won't discuss Styles here because that would be too off-topic for this bug report. I just will leave the suggestion.
Pierre F committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/help/commit/31c843427f47cf1746687d5554a822f24346ae41 tdf#128595 (comment 11) extra spaces with copy/paste in Writer