[Libreoffice-commits] core.git: sw/source
Jim Raykowski (via logerrit)
logerrit at kemper.freedesktop.org
Thu Mar 12 21:22:59 UTC 2020
sw/source/uibase/dochdl/swdtflvr.cxx | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
New commits:
commit 0409c260b6be9d52e91ce3becebdd400e996b596
Author: Jim Raykowski <raykowj at gmail..com>
AuthorDate: Fri Jan 31 21:59:15 2020 -0900
Commit: Jim Raykowski <raykowj at gmail.com>
CommitDate: Thu Mar 12 22:22:25 2020 +0100
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 at gmail.com>
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
{
More information about the Libreoffice-commits
mailing list