Bug 120376 - Draw/Impress: Styles duplicated when copying slides
Summary: Draw/Impress: Styles duplicated when copying slides
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
6.0.0.0.alpha0+
Hardware: All All
: medium normal
Assignee: Michael Stahl (allotropia)
URL:
Whiteboard: target:6.2.0 target:6.1.3 target:6.0.7
Keywords: bibisected, bisected, regression
Depends on:
Blocks: ImpressDraw-Styles
  Show dependency treegraph
 
Reported: 2018-10-07 12:48 UTC by Patrik Eschle
Modified: 2018-10-31 13:02 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:


Attachments
Impress Window. Left: Pane with 2 slides, right styles with duplicated style Default_1 (88.09 KB, image/png)
2018-10-07 12:48 UTC, Patrik Eschle
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Patrik Eschle 2018-10-07 12:48:53 UTC
Created attachment 145445 [details]
Impress Window. Left: Pane with 2 slides, right styles with duplicated style Default_1

When copying a slide in Draw or Impress, the styles are copied as well and renamed by appending _1.

Copy may be inside the document or from another LO-document.

Built-in styles are copied as well, in particular style "Default"

The expected behavior is that no new style is created, but the old style is used on the new slide

Reproduce by:
***
Start as expected
***
- Start LibreOffice
- Select "Create Impress Presentation" (or Draw)
- Cancel the template selection (empty presentation appears)
- Select the rectangle tool, draw a rectangle (see blue rectangle)
- In the left pane "Slides" click on the first (and only slide)
- Click on Edit/Copy and Edit/Paste (or Ctl-C Ctl-V)
- A second slides appears in the slides pane

***
The following is unexpected
***
- A style Default_1 has been added to the list of styles
Comment 1 Roman Kuznetsov 2018-10-11 16:44:18 UTC
confirm in

Version: 6.2.0.0.alpha0+ (x64)
Build ID: e7d5bad5ae083da12c3ec4a4a8bdc8b42447a242
CPU threads: 4; OS: Windows 10.0; UI render: GL; VCL: win; 
TinderBox: Win-x86_64@42, Branch:master, Time: 2018-10-06_02:55:02
Locale: ru-RU (ru_RU); Calc: threaded
Comment 2 Xisco Faulí 2018-10-15 12:25:03 UTC
happens while copying/pasting the slide, not while duplicating it...
Comment 3 Xisco Faulí 2018-10-15 12:39:45 UTC
Regression introduced by:

https://cgit.freedesktop.org/libreoffice/core/commit/?id=57db6e24b5ad43d447c30e44a112c74c7e75b46b

author	Varun Dhall <varun.dhall@studentpartner.com>	2017-08-15 02:51:07 +0530
committer	Julien Nabet <serval2412@yahoo.fr>	2017-08-15 08:58:39 +0200
commit 57db6e24b5ad43d447c30e44a112c74c7e75b46b (patch)
tree 0c62a3fc61e94c2a683e7cdfee87f088009b4b48
parent 8ee4530b90ca7c7967fad00f059236a2b0b57607 (diff)
Removing old SfxItemSet::getHash usage

Bisected with: bibisect-linux64-6.0

Adding Cc: to Varun Dhall
Comment 4 Julien Nabet 2018-10-15 12:46:47 UTC
Sorry, I just had noticed there was a +2 in review and +1 in Verified.
See https://gerrit.libreoffice.org/#/c/41155/

If it needs to be reverted, don't hesitate! (hope it's possible without conflict).
Comment 5 Michael Stahl (allotropia) 2018-10-15 12:53:45 UTC
we can't easily revert that, as the hash function had a ridiculous implementation that serialized the item-set via Store...

iirc Caolan fixed some similar style bug introduced by the same commit recently?
Comment 7 Michael Stahl (allotropia) 2018-10-27 20:56:12 UTC
yeah uhm so ... i wish i had noticed this earlier :-/

fixed on master
Comment 8 Commit Notification 2018-10-27 20:57:06 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=be9f3db2306150a37ef18e4ccc8d8f4a1934c5c1

tdf#120376 sd: fix duplicated styles on copy/paste

It will be available in 6.2.0.

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

Affected users are encouraged to test the fix and report feedback.
Comment 9 Commit Notification 2018-10-28 10:35:14 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-6-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=ba5d56afd88ba29ba7f222d15f4b9046011cc38e&h=libreoffice-6-0

tdf#120376 sd: fix duplicated styles on copy/paste

It will be available in 6.0.8.

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

Affected users are encouraged to test the fix and report feedback.
Comment 10 Commit Notification 2018-10-28 10:35:24 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-6-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=8bef4f3033fff8eb12a58d3fa4cdd49076e18cf2&h=libreoffice-6-1

tdf#120376 sd: fix duplicated styles on copy/paste

It will be available in 6.1.4.

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

Affected users are encouraged to test the fix and report feedback.
Comment 11 Commit Notification 2018-10-28 14:09:26 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-6-1-3":

https://git.libreoffice.org/core/+/1cf4d604db563a47e1c7f6282226aaa45c344374%5E%21

tdf#120376 sd: fix duplicated styles on copy/paste

It will be available in 6.1.3.

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.
Comment 12 Xisco Faulí 2018-10-29 18:18:20 UTC
Verified in

Version: 6.2.0.0.alpha1+
Build ID: 19a0698079fbba36646a2d06eaec3a7fde60b2f5
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); Calc: threaded

@Michael Stahl, Thanks for fixing this bug!
Comment 13 Patrik Eschle 2018-10-29 19:10:30 UTC
Works for me (Linux X64) - thanks for the quick fix!
Comment 14 Commit Notification 2018-10-30 12:45:11 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-6-0-7":

https://git.libreoffice.org/core/+/ea3e84429f84c4a57ce28980b799cc6d6995ef26%5E%21

tdf#120376 sd: fix duplicated styles on copy/paste

It will be available in 6.0.7.

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.