Bug 163598 - Copy-pasting bullets in Impress loses levels
Summary: Copy-pasting bullets in Impress loses levels
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
7.5.0.3 release
Hardware: All All
: medium normal
Assignee: Justin L
URL:
Whiteboard: target:25.2.0
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Paste
  Show dependency treegraph
 
Reported: 2024-10-23 23:14 UTC by Gabor Kelemen (allotropia)
Modified: 2025-01-15 17:31 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file from Impress (12.45 KB, application/vnd.oasis.opendocument.presentation)
2024-10-23 23:14 UTC, Gabor Kelemen (allotropia)
Details
Screenshot of the issue in Impress (89.80 KB, image/png)
2024-10-23 23:14 UTC, Gabor Kelemen (allotropia)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gabor Kelemen (allotropia) 2024-10-23 23:14:32 UTC
Created attachment 197213 [details]
Example file from Impress

Attached file shows two placeholders in Impress. First has 3 paragraphs with bullets, on second and third levels too.

When this is pasted from the top placeholder to the bottom one, the second and third levels are lost and reset to first level.

1. Open attached file
2. Copy the top box content aa bb cc
3. Paste into the bottom box
-> indentation is lost, all content is on first level.

Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: dd41459378bca78a18f32e61bfac77aa48fabb8d
CPU threads: 14; OS: Windows 10 X86_64 (10.0 build 19045); UI render: Skia/Raster; VCL: win
Locale: hu-HU (hu_HU); UI: en-US
Calc: default

Seems to have started in 7.5 with:

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

author	Justin Luth <jluth@mail.com>	Thu Jul 28 09:03:13 2022 -0400
committer	Miklos Vajna <vmiklos@collabora.com>	Tue Aug 02 08:15:26 2022 +0200

tdf#148810 pptx import: Depth set by EE_PARA_OUTLLEVEL

Adding CC to: Justin Luth
Comment 1 Gabor Kelemen (allotropia) 2024-10-23 23:14:50 UTC
Created attachment 197214 [details]
Screenshot of the issue in Impress
Comment 2 Regina Henschel 2024-10-24 09:10:58 UTC
The default paste is "Flat XML format (Edit Engine ODF)". But here you need "Rich text formatting (Richtext)".
Comment 3 Justin L 2024-11-21 17:58:48 UTC
The difference is that on paste, SetPropertyValueHelper WAS being called to set EE_PARA_OUTLLEVEL (and EE_PARA_NUMBULLET), but now it isn't doing either of them  any more.

That is because GetDepth was returning -1, so aAny was left as void/empty.
sal_Int16 SvxEditEngineForwarder::GetDepth( sal_Int32 ) const
{
    // EditEngine does not support outline depth
    return -1;
}

bool SvxEditEngineForwarder::SetDepth( sal_Int32, sal_Int16 nNewDepth )
{
    // EditEngine does not support outline depth
    return nNewDepth == -1;
}
Comment 4 Commit Notification 2024-11-22 03:53:29 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/0d3748e5fbfb2ac8dd60d491d566075938927237

tdf#163598 editeng: avoid using fake outline depth

It will be available in 25.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.