tdf#112452 : Refine the fix for tdf#94561
commiteebd2c72ce2d6003975de6b5bfe14b204b382a6e
authorDennis Francis <dennis.francis@collabora.co.uk>
Thu, 21 Jun 2018 09:43:44 +0000 (21 15:13 +0530)
committerEike Rathke <erack@redhat.com>
Tue, 26 Jun 2018 13:07:05 +0000 (26 15:07 +0200)
tree07a1645c1b2e7daa74066d07f5e7636c0d5fc506
parent3f750c1e7f8b4dac1dac0333a3f8270e1d7fea00
tdf#112452 : Refine the fix for tdf#94561

Do the changes in 7c0f6b9d0fb8d7d9e54865ccf1047bb8f8148101
only if the destination is not an undo document.

Also removes the below unnecessary change in that commit.

if ( IsNoteCaption( pOldObject ) )
{
    pOldObject = aIter.Next();
    continue;
}

Change-Id: Ib18324ed16e91dbd932d449858a489dc09c53713
Reviewed-on: https://gerrit.libreoffice.org/56287
Tested-by: Jenkins
Reviewed-by: Eike Rathke <erack@redhat.com>
sc/source/core/data/drwlayer.cxx
sc/source/core/data/table2.cxx