summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Raykowski <raykowj@gmail..com>2020-01-31 21:59:15 -0900
committerJim Raykowski <raykowj@gmail.com>2020-03-12 22:22:25 +0100
commit0409c260b6be9d52e91ce3becebdd400e996b596 (patch)
treee9f38336403405841706675f4bbd1ffb975781d3
parentf72b6d505b72803e4becf894bbb9dbf6f6482d59 (diff)
tdf#130094 Work around content pastes twice after undo
commit 24019d56fbc4ac94bd1b72b37a9bcabc7ef8164b seems to have introduced this behavior. This patch is a work around that skips code introduced by the above commit when selection type includes number list type. Change-Id: I7a74ad7262e3e008f6aa11fe04fb81b9604ef3e1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87795 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
-rw-r--r--sw/source/uibase/dochdl/swdtflvr.cxx12
1 files changed, 9 insertions, 3 deletions
diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx b/sw/source/uibase/dochdl/swdtflvr.cxx
index 6dbb5c50046b..f79f27ed271c 100644
--- a/sw/source/uibase/dochdl/swdtflvr.cxx
+++ b/sw/source/uibase/dochdl/swdtflvr.cxx
@@ -3645,8 +3645,11 @@ bool SwTransferable::PrivatePaste(SwWrtShell& rShell, SwPasteContext* pContext,
//Delete selected content, not at table-selection and table in Clipboard, and don't delete hovering graphics.
if( rShell.HasSelection() && !( nSelection & SelectionType::TableCell) && !( nSelection & SelectionType::DrawObject))
{
- bKillPaMs = true;
- rShell.SetRetainSelection( true );
+ if (!(nSelection & SelectionType::NumberList))
+ {
+ bKillPaMs = true;
+ rShell.SetRetainSelection( true );
+ }
if (pContext)
pContext->forget();
rShell.DelRight();
@@ -3662,7 +3665,10 @@ bool SwTransferable::PrivatePaste(SwWrtShell& rShell, SwPasteContext* pContext,
Point aPt( rShell.GetCharRect().Pos() );
rShell.SwCursorShell::SetCursor( aPt, true );
}
- rShell.SetRetainSelection( false );
+ if (!(nSelection & SelectionType::NumberList))
+ {
+ rShell.SetRetainSelection( false );
+ }
}
if ( nSelection & SelectionType::DrawObject) //unselect hovering graphics
{