Bug 152324 - Document title jumps from Untitled 1 to Untitled 3 when text is is copied
Summary: Document title jumps from Untitled 1 to Untitled 3 when text is is copied
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.0.0.3 release
Hardware: All Windows (All)
: low minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, regression
Depends on:
Blocks: File-Opening
  Show dependency treegraph
 
Reported: 2022-11-30 20:29 UTC by darkwolf811
Modified: 2024-01-11 00:12 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 darkwolf811 2022-11-30 20:29:59 UTC
I have a header I like to copy and paste when creating documents, so I'll open up 4 or 5 documents and then paste the header on all of the documents. However, if I copy something on Untitled 1, it will then open a new document titled Untitled 3 instead of Untitled 2. Note: If I copy the initial header outside of LibreOffice, or have no content copied at all into the clipboard, it will proceed as expected to Untitled 1, 2, 3, etc.
Comment 1 Dieter 2022-12-14 08:50:46 UTC
I confirm it with

Version: 7.4.3.2 (x64) / LibreOffice Community
Build ID: 1048a8393ae2eeec98dff31b5c133c5f1d08b890
CPU threads: 4; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: en-GB
Calc: CL

Steps
1. Open an new document (Untitled 1)
2. Ctrl+N -> new document Untitled 2 (expected)
3. Close LO
4. Open an new document (Untitled 1)
5. Write some Text
6. Ctrl+A
7. Ctrl+C
8. Ctrl+N

Actual result
New document "Untitled 3"

Expected result
New document "Untitled 2"
Comment 2 Dieter 2022-12-14 09:00:17 UTC
Reproducible with

Version: 7.2.7.2 (x64) / LibreOffice Community
Build ID: 8d71d29d553c0f7dcbfa38fbfda25ee34cce99a2
CPU threads: 4; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: de-DE
Calc: CL

But not with

Version: 7.0.6.2 (x64)
Build ID: 144abb84a525d8e30c9dbbefa69cbbf2d8d4ae3b
CPU threads: 4; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: en-GB
Calc: CL
Comment 3 raal 2022-12-14 19:04:57 UTC
No repro with Version: 7.5.0.0.alpha1+ (X86_64) / LibreOffice Community
Build ID: 705b2924a14841883b4a8cac549f7af326d7a185
CPU threads: 4; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: cs-CZ (cs_CZ.UTF-8); UI: en-US
Calc: threaded
Comment 4 Dieter 2022-12-15 07:13:44 UTC
Also present in

Version: 7.5.0.0.beta1 (X86_64) / LibreOffice Community
Build ID: 3aca23eec42e9d6fbe57071d7633ae1fc4bc5fcc
CPU threads: 4; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: en-US (de_DE); UI: en-GB
Calc: CL threaded

So perhaps only Windows?

Darkwolf811, could you please copy and paste informations from Help -> About LibreOffice? Thank you.
Comment 5 Roman Kuznetsov 2022-12-19 16:39:57 UTC
No repro in

Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 68809ffde7d50a5f47afa5a1235025513762df8c
CPU threads: 16; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: ru-RU (ru_RU); UI: ru-RU
Calc: CL threaded

Possibly you have opened another new document like new spreadsheet/presentation in the same time. We have through numbering for all modules when we try to create new documents
Comment 6 Dieter 2022-12-19 19:47:27 UTC
Really strange. I can't repro the problem anymore. Don't think, that there were extra conditions when i could reproduce it before.

Darkwolf811, are you able to reproduce it with steps from comment 1? Please also paste information from Help -> About LibreOffice
=> NEEDINFO
Comment 7 darkwolf811 2022-12-21 23:24:53 UTC
Sure:

Version: 7.3.7.2 (x64) / LibreOffice Community
Build ID: e114eadc50a9ff8d8c8a0567d6da8f454beeb84f
CPU threads: 12; OS: Windows 10.0 Build 22621; UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: threaded

Using this version as I had another bug in 7.4.3 which resulted in some corrupted documents... anyway...

Same bug.

1. Open new writer document.
2. Write header such as "Example Header"
3. CTRL+A to select header.
4. CTRL+C to copy header.
5. CTRL+N to open new doc. (Will be titled Untitled 3 instead of Untitled 2)

Sequential pages are correctly labeled 4,5,6, etc.
Comment 8 QA Administrators 2022-12-22 03:36:33 UTC Comment hidden (obsolete)
Comment 9 darkwolf811 2023-03-02 02:53:55 UTC
Any updates on this?
Comment 10 Buovjaga 2023-03-28 11:55:25 UTC
(In reply to darkwolf811 from comment #9)
> Any updates on this?

As testers are unable to reproduce this, you could try bibisecting:
https://wiki.documentfoundation.org/QA/Bibisect/Windows
https://wiki.documentfoundation.org/QA/Bibisect

Dieter in comment 2 could reproduce with 7.2, but not with 7.0, so you would need repositories for versions 7.1 and 7.2 to continue testing..
Comment 11 darkwolf811 2023-06-22 01:28:19 UTC
Just downloaded Writer 7.5.4.2

Version: 7.5.4.2 (X86_64) / LibreOffice Community
Build ID: 36ccfdc35048b057fd9854c757a8b67ec53977b6
CPU threads: 12; OS: Windows 10.0 Build 22621; UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: threaded

And the issue still exists. I have discovered something new. If one copies the current text with ctrl+c, and opens a new document with ctrl+n, it will open on untitled 3. 

However, if you use the right click context menu to copy instead, it will correct open to untitled 2. Maybe this is the reason why reproducing is inconsistent. Can someone try to replicate this?
Comment 12 Kira Tubo 2023-09-17 04:37:11 UTC
When I tried to reproduce this issue, it didn't seem like copying the text was the causing the issue. For me it depended whether or not I typed a space after the first word I entered into the document. For example: 

I was able to reproduce with the following steps:
1. Open Writer (this creates Untitled 1)
2. Type some text, then add a space after e.g. "Example " or "Example header"
3. CTRL + N (this creates Untitled 3)

I was NOT able to reproduce with:
1. Open Writer (this creates Untitled 1)
2. Type a single word without a space e.g. "Example"
3. CTRL + N (this creates Untitled 2)

@darkwolf811@rocketmail.com can you double check on your end if this is the case for you with the text that you have been copying? Maybe also add a list of test words or phrases that you have been copying so we can try to reproduce with the exact data you have been using. I will set the status of this issue to NEEDINFO. When you respond, please it back to UNCONFIRMED. Thanks!

Version: 7.6.1.2 (X86_64) / LibreOffice Community
Build ID: f5defcebd022c5bc36bbb79be232cb6926d8f674
CPU threads: 6; OS: Windows 10.0 Build 22621; UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL threaded
Comment 13 Steven Casey 2023-12-01 05:59:23 UTC
This bug seems to occur when anything is written in the header (or body) and is followed by a space. Copying text does not change the result as Kira had figured out. To reproduce this consistently follow Kira's steps in comment 12. Those steps work with both the header and the body.

Additional Notes: 
 - After editing the header, deleting the header DOES revert LO back to its 
   expected behavior, but only sometimes.
 - The length of the string does not seem to matter. Only if there is a space 
   after it.

Regression introduced by:

https://git.libreoffice.org/core/+/e6b200524bd5f614ab5ece88e8187466e7c40096

commit e6b200524bd5f614ab5ece88e8187466e7c40096 [log]
author	Ashod Nakashian <ashodnakashian@yahoo.com> Thu Nov 02 21:20:50 2017 -0400
committer	Ashod Nakashian <ashnakash@gmail.com> Mon Nov 06 06:12:21 2017 +0100
tree c90e7c8d45f353a43465aa8c43e9881d4d55d53f
parent ffa46ebe6d83c5e812753c41857f31c059f33986 [diff]

Bisected with: Win32-6.0 repo

Adding CC: to Ashod Nakashian

Changing NEEDINFO -> NEW as I was able to reproduce it (in new LO versions as well as older versions) and was able to bisect it.