summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorLennard Wasserthal <Wasserthal@nefkom.net>2013-09-07 14:00:01 +0200
committerMichael Stahl <mstahl@redhat.com>2014-05-15 23:39:14 +0200
commitb7cb2ae5026cfd3bb30f148ed40f244b5c128876 (patch)
tree1e67731ec82516ee1eb6f8721cb68757ec914d6b /sw
parent0b3d0fb2d9256dc6bae6af69ed494487004def75 (diff)
fdo#55582 Writer: Dont overwrite from even when selected, from writer.
This patch fixes the writer part, calc part is fixed long ago. Problem: it overwrites when you paste from impress or calc. This allows to keep the graphic's frame, so the text doesn't have to be rearranged. (i.e. it is desired, so I didn't change that) I was trying to give the user a choice, but I didn't succeed in keeping the frame when pasting from writer to writer. coming soon! Change-Id: I07271df9bb501779d06f332bb13edd05f0aefacb Signed-off-by: Lennard Wasserthal <Wasserthal@nefkom.net>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/uibase/dochdl/swdtflvr.cxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/sw/source/core/uibase/dochdl/swdtflvr.cxx b/sw/source/core/uibase/dochdl/swdtflvr.cxx
index 447dbfdb86fc..62938d50dc52 100644
--- a/sw/source/core/uibase/dochdl/swdtflvr.cxx
+++ b/sw/source/core/uibase/dochdl/swdtflvr.cxx
@@ -3203,8 +3203,8 @@ bool SwTransferable::PrivatePaste( SwWrtShell& rShell )
bool bKillPaMs = false;
- //Delete selected content, not at table-selection and table in Clipboard
- if( rShell.HasSelection() && !( nSelection & nsSelectionType::SEL_TBL_CELLS))
+ //Delete selected content, not at table-selection and table in Clipboard, and dont delete hovering graphics.
+ if( rShell.HasSelection() && !( nSelection & nsSelectionType::SEL_TBL_CELLS) && !( nSelection & nsSelectionType::SEL_DRW))
{
bKillPaMs = true;
rShell.SetRetainSelection( true );
@@ -3221,6 +3221,10 @@ bool SwTransferable::PrivatePaste( SwWrtShell& rShell )
}
rShell.SetRetainSelection( false );
}
+ if ( nSelection & nsSelectionType::SEL_DRW) //unselect hovering graphics
+ {
+ rShell.ResetSelect(NULL,false);
+ }
bool bInWrd = false, bEndWrd = false, bSttWrd = false,
bSmart = 0 != (TRNSFR_DOCUMENT_WORD & eBufferType);