Bug 135893 - Image pasted twice when copy/pasting a caption frame with image after DOCX export
Summary: Image pasted twice when copy/pasting a caption frame with image after DOCX ex...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.4.0.3 release
Hardware: All All
: medium normal
Assignee: Miklos Vajna
URL:
Whiteboard: target:7.1.0 target:7.0.4
Keywords: bibisected, bisected, regression
: 135664 136782 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-08-18 19:38 UTC by Telesto
Modified: 2020-12-15 12:50 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file (213.93 KB, application/vnd.oasis.opendocument.text)
2020-08-18 19:39 UTC, Telesto
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Telesto 2020-08-18 19:38:52 UTC
Description:
Image pasted twice when copy/pasting a caption frame with image after DOCX export

Steps to Reproduce:
1. Open the attached file
2. Save as DOCX
3. File reload
4. Select the image frame
5. CTRL+X
6. CTRL+V

Actual Results:
2 shapes

Expected Results:
1 shapes


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 7.1.0.0.alpha0+ (x64)
Build ID: <buildversion>
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win
Locale: nl-NL (nl_NL); UI: nl-NL
Calc: CL

also in
Version: 6.0.5.0.0+
Build ID: 15ea1cda0b3c37ff944ad9a239b7ed453e8b0591
CPU threads: 4; OS: Windows 6.3; UI render: default; 
Locale: nl-NL (nl_NL); Calc: CL
Comment 1 Telesto 2020-08-18 19:39:04 UTC
Created attachment 164428 [details]
Example file
Comment 2 Telesto 2020-08-18 19:42:51 UTC
Also in
4.4.7.2

no repro with
Versie: 4.2.0.4 
Build ID: 05dceb5d363845f2cf968344d7adab8dcfb2ba71
Comment 3 raal 2020-08-18 21:00:29 UTC
Confirm with Version: 7.1.0.0.alpha0+
Build ID: ce6c6a5ad6c9dde09bb0bb0c51e16d828cfe0ef7
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: x11
Locale: cs-CZ (cs_CZ.UTF-8); UI: en-US
Calc: threaded
Comment 4 raal 2020-08-18 21:20:48 UTC
This seems to have begun at the below commit.
Adding Cc: to Miklos Vajna ; Could you possibly take a look at this one?
Thanks
 6fd5254d3931c117e681077824c9dd92b3169519 is the first bad commit
commit 6fd5254d3931c117e681077824c9dd92b3169519
Author: Matthew Francis <mjay.francis@gmail.com>
Date:   Sun Mar 15 01:15:52 2015 +0800

    source-hash-c7307c77254557646f33017af915f6808a861e29
    
    commit c7307c77254557646f33017af915f6808a861e29
    Author:     Miklos Vajna <vmiklos@collabora.co.uk>
    AuthorDate: Fri Aug 15 15:59:56 2014 +0200
    Commit:     Miklos Vajna <vmiklos@collabora.co.uk>
    CommitDate: Fri Aug 15 16:48:58 2014 +0200
    
        fdo#82191 sw::DocumentLayoutManager: copy textbox content of draw formats
    
        The SwFmtCntnt, i.e. the content of the draw format was already copied,
        but that's only a pointer to the real content: instead duplicate the
        real contents on copy&paste, that's how we copy fly frames as well.
    
        Change-Id: I42475e356aaa1c54c08fb23a6a395d1726e5f33e
Comment 5 Commit Notification 2020-11-03 08:02:31 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/3ac675736066b47da7329269a01c1ef4a9cfe72a

tdf#135893 sw paste: fix copying fly frame in textbox twice

It will be available in 7.1.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.
Comment 6 Commit Notification 2020-11-03 20:59:48 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "libreoffice-7-0":

https://git.libreoffice.org/core/commit/bdda0c123b28531f515c37faf804d9ed1659074f

tdf#135893 sw paste: fix copying fly frame in textbox twice

It will be available in 7.0.4.

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 7 Xisco Faulí 2020-11-06 15:59:29 UTC
Verified in

Version: 7.1.0.0.alpha1+
Build ID: d7bcf59a51a058ba57e685cfc3e000fec623f716
CPU threads: 4; OS: Linux 5.7; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded

@Miklos, thanks for fixing this issue!
Comment 8 Attila Baraksó (NISZ) 2020-11-18 15:11:13 UTC
*** Bug 136782 has been marked as a duplicate of this bug. ***
Comment 9 Justin L 2020-12-15 12:50:26 UTC
*** Bug 135664 has been marked as a duplicate of this bug. ***