diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-08-22 10:08:42 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-08-22 17:38:28 +0200 |
commit | 27fb6f228271637070e0e0a69d7df503250d8bde (patch) | |
tree | d0dae88d4da34af3d9658b24f726efac450dc40f /sd/source/ui/app | |
parent | 6073627ddc50de5d1222c89712c350ef34eaa0e1 (diff) |
Resolves: tdf#119259 reused in-use SdStyleSheet removed by undo
since...
commit a4cd841541a729d7b8126d27d91fa28e30b01403
Date: Thu Feb 13 16:10:47 2014 +0530
n#757432: Styles (rename &) copy to different decks.
While copying slides to different slide decks,
styles were not being copied if there is already one
with the same name. This patch renames and copies those
to keep the formatting intact.
if a SdStyleSheet is not freshly created, but reused, it ends up in
the rCreatedSheets list, and so when the copy is undone
(via SdMoveStyleSheetsUndoAction), the SdStyleSheet is unconditionally
remove from the StylePool and so its ref count hits 0 and is removed,
even though there are still objects depending on it.
the problem becames more common since...
bash-4.4$ git show 57db6e24b5ad43d447c30e44a112c74c7e75b46b
commit 57db6e24b5ad43d447c30e44a112c74c7e75b46b
Date: Tue Aug 15 02:51:07 2017 +0530
Removing old SfxItemSet::getHash usage
improves the SfxItemSet comparison.
Assuming that its correct to leave SdStyleSheetPool::CopySheets
with those reused SdStyleSheets in the list, change things so
that a flag is passed around to indicate if the SdStyleSheet
should be removed or not by undo
Change-Id: I82b5bd93183fd1ff9e67957ccfb5babef81fd36d
Reviewed-on: https://gerrit.libreoffice.org/59432
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sd/source/ui/app')
-rw-r--r-- | sd/source/ui/app/sdxfer.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sd/source/ui/app/sdxfer.cxx b/sd/source/ui/app/sdxfer.cxx index aef82807b809..2df04fd50038 100644 --- a/sd/source/ui/app/sdxfer.cxx +++ b/sd/source/ui/app/sdxfer.cxx @@ -302,7 +302,7 @@ void SdTransferable::CreateData() sal_Int32 nPos = aOldLayoutName.indexOf( SD_LT_SEPARATOR ); if( nPos != -1 ) aOldLayoutName = aOldLayoutName.copy( 0, nPos ); - SdStyleSheetVector aCreatedSheets; + StyleSheetCopyResultVector aCreatedSheets; pNewStylePool->CopyLayoutSheets( aOldLayoutName, *pOldStylePool, aCreatedSheets ); } |