Bug 163402 - in writer If you have 2 lines of text with a return at the end of the line select both lines and then press shift " it will put a quote around but it will create a repeat of line 2 on a third line
Summary: in writer If you have 2 lines of text with a return at the end of the line se...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
24.8.0.0 alpha0+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, implementationError
Depends on:
Blocks: Selection
  Show dependency treegraph
 
Reported: 2024-10-12 15:27 UTC by Nick
Modified: 2024-12-15 11:16 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
163402_selectedQuotation.odt: testing document - Ctrl-A (to select all), then press " (13.13 KB, application/vnd.oasis.opendocument.text)
2024-10-18 14:41 UTC, Justin L
Details
dmp file (773.96 KB, application/vnd.tcpdump.pcap)
2024-12-01 17:30 UTC, BogdanB
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nick 2024-10-12 15:27:30 UTC
Description:
in writer If you have 2 lines of text with a return at the end of the 1st line and select both lines and then press shift " it will put a quote around the 2 lines but it will create a repeat of line 2 on a third line. If you then press CTRL Z it will delete the 2 and 3rd lines

Steps to Reproduce:
1.Type 2 lines of text with a return at the end of line 1
2.Select text and press shift "
3.Press CTRL Z

Actual Results:
When shift " pressed writer puts quotes around line 1 and 2 but repeats line 2 on line 3.
If you then press CTRL Z to undo the action it removes lines 2 & 3

Expected Results:
Should just put " around the text


Reproducible: Always


User Profile Reset: Yes

Additional Info:
None
Comment 1 m_a_riosv 2024-10-12 21:01:38 UTC
Reproducible
Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 8a6919f39b4b871904a2a4199755ca619aa707e2
CPU threads: 16; OS: Windows 11 X86_64 (10.0 build 22631); UI render: Skia/Raster; VCL: win
Locale: es-ES (es_ES); UI: en-US
Calc: CL threaded
Comment 2 Justin L 2024-10-18 14:39:59 UTC
This was a new capability added in 24.8.
commit a7dd2e5a4712083cc5934e1d677e7dff86ceb7e6
Author: Yiğit Akçay on Thu Jan 25 23:05:59 2024 +0300
    tdf#151710 Enable enclosing of selected text with characters
Comment 3 Justin L 2024-10-18 14:41:22 UTC
Created attachment 197132 [details]
163402_selectedQuotation.odt: testing document - Ctrl-A (to select all), then press "
Comment 4 Justin L 2024-10-18 14:42:56 UTC
I noticed that it was also changing the "paragraph marker" into a "new line marker".
Comment 5 Takenori Yasuda 2024-12-01 11:44:57 UTC
I have confirmed the following events additionally.

    - Occurs even outside of Western text (confirmed in Japanese text)
    - Occurs when the selection range includes Carriage Return (U+000D)
    - Does not occur even if the selection range includes Line Feed (U+000A)
    - Very rarely displays "!!br0ken!!" (reproduction method unknown)
    - May crash (reproduction method unknown)


Version: 24.8.3.2 (X86_64) / LibreOffice Community
Build ID: 48a6bac9e7e268aeb4c3483fcf825c94556d9f92
CPU threads: 8; OS: Windows 11 X86_64 (10.0 build 22631); UI render: Skia/Raster; VCL: win
Locale: ja-JP (ja_JP); UI: ja-JP
Calc: CL threaded Jumbo

Version: 25.2.0.0.alpha1 (X86_64) / LibreOffice Community
Build ID: e3a80ef423457e6634be97665732b2181c944d4c
CPU threads: 8; OS: Windows 11 X86_64 (10.0 build 22631); UI render: Skia/Vulkan; VCL: win
Locale: ja-JP (ja_JP); UI: ja-JP
Calc: CL threaded
Comment 6 BogdanB 2024-12-01 17:30:21 UTC
I have got a crash with this, after step 2.
Version: 25.2.0.0.alpha1+ (X86_64) / LibreOffice Community
Build ID: 869fff459cbee6a2edadd5c24f2b65c199712de6
CPU threads: 4; OS: Linux 6.8; UI render: default; VCL: gtk3
Locale: ro-RO (ro_RO.UTF-8); UI: en-US
Calc: threaded
Comment 7 BogdanB 2024-12-01 17:30:33 UTC
Created attachment 197888 [details]
dmp file
Comment 8 BogdanB 2024-12-01 17:31:38 UTC
In the debug version of LibreOffice I get this message, I am note sure is completely related:
soffice.bin: /home/tdf/lode/jenkins/workspace/lo_gerrit/tb/src_master/sw/source/core/doc/DocumentContentOperationsManager.cxx:4869: bool sw::DocumentContentOperationsManager::ReplaceRangeImpl(SwPaM&, const rtl::OUString&, bool): Assertion `(pStt->GetNode() == pEnd->GetNode() || ( pStt->GetNodeIndex() + 1 == pEnd->GetNodeIndex() && !pEnd->GetContentIndex() )) && "invalid range: Point and Mark on different nodes"' failed.
warn:desktop:11355:11355:desktop/source/app/crashreport.cxx:61: minidump generated: /home/bogdan/.config/libreofficedev/4/crash//e5d36438-97bc-407e-8d73d19c-60404eca.dmp