Kaydet (Commit) b7cb2ae5 authored tarafından Lennard Wasserthal's avatar Lennard Wasserthal Kaydeden (comit) Michael Stahl

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: 's avatarLennard Wasserthal <Wasserthal@nefkom.net>
üst 0b3d0fb2
...@@ -3203,8 +3203,8 @@ bool SwTransferable::PrivatePaste( SwWrtShell& rShell ) ...@@ -3203,8 +3203,8 @@ bool SwTransferable::PrivatePaste( SwWrtShell& rShell )
bool bKillPaMs = false; bool bKillPaMs = false;
//Delete selected content, not at table-selection and table in Clipboard //Delete selected content, not at table-selection and table in Clipboard, and dont delete hovering graphics.
if( rShell.HasSelection() && !( nSelection & nsSelectionType::SEL_TBL_CELLS)) if( rShell.HasSelection() && !( nSelection & nsSelectionType::SEL_TBL_CELLS) && !( nSelection & nsSelectionType::SEL_DRW))
{ {
bKillPaMs = true; bKillPaMs = true;
rShell.SetRetainSelection( true ); rShell.SetRetainSelection( true );
...@@ -3221,6 +3221,10 @@ bool SwTransferable::PrivatePaste( SwWrtShell& rShell ) ...@@ -3221,6 +3221,10 @@ bool SwTransferable::PrivatePaste( SwWrtShell& rShell )
} }
rShell.SetRetainSelection( false ); rShell.SetRetainSelection( false );
} }
if ( nSelection & nsSelectionType::SEL_DRW) //unselect hovering graphics
{
rShell.ResetSelect(NULL,false);
}
bool bInWrd = false, bEndWrd = false, bSttWrd = false, bool bInWrd = false, bEndWrd = false, bSttWrd = false,
bSmart = 0 != (TRNSFR_DOCUMENT_WORD & eBufferType); bSmart = 0 != (TRNSFR_DOCUMENT_WORD & eBufferType);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment