[PATCH] fdo#55582 writer, calc: insert shapes also when shapes selec...
Lennard Wasserthal (via Code Review)
gerrit at gerrit.libreoffice.org
Tue Jan 1 05:33:08 PST 2013
Hi,
I have submitted a patch for review:
https://gerrit.libreoffice.org/1524
To pull it, you can do:
git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/24/1524/1
fdo#55582 writer, calc: insert shapes also when shapes selected
In writer, Pasting shapes overwrote others that were selected.
In calc, the edit mode when shapes were selected had no paste function.
Change-Id: I9f4c4b674c5a439aade5ce943f3b34577f8e2281
Signed-off-by: Lennard <Wasserthal at nefkom.net>
---
M sc/sdi/drawsh.sdi
M sc/source/ui/drawfunc/drawsh5.cxx
M sw/source/ui/dochdl/swdtflvr.cxx
3 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/sc/sdi/drawsh.sdi b/sc/sdi/drawsh.sdi
index ab2337f..914b53d 100644
--- a/sc/sdi/drawsh.sdi
+++ b/sc/sdi/drawsh.sdi
@@ -143,6 +143,7 @@
SID_DELETE_CONTENTS [ ExecMethod = ExecDrawFunc; StateMethod = GetDrawFuncState; Export = FALSE; ]
SID_CUT [ ExecMethod = ExecDrawFunc; StateMethod = GetDrawFuncState; Export = FALSE; ]
SID_COPY [ ExecMethod = ExecDrawFunc; StateMethod = GetDrawFuncState; Export = FALSE; ]
+ SID_PASTE [ ExecMethod = ExecDrawFunc; StateMethod = GetDrawFuncState; Export = FALSE; ]
SID_SELECTALL [ ExecMethod = ExecDrawFunc; StateMethod = GetDrawFuncState; Export = FALSE; ]
SID_OBJECT_ROTATE [ ExecMethod = ExecDrawFunc; StateMethod = GetState; Export = FALSE; ]
SID_OBJECT_MIRROR [ ExecMethod = ExecDrawFunc; StateMethod = GetState; Export = FALSE; ]
diff --git a/sc/source/ui/drawfunc/drawsh5.cxx b/sc/source/ui/drawfunc/drawsh5.cxx
index fa4c2ec..0f2fc17 100644
--- a/sc/source/ui/drawfunc/drawsh5.cxx
+++ b/sc/source/ui/drawfunc/drawsh5.cxx
@@ -23,6 +23,7 @@
#include <sfx2/request.hxx>
#include <sfx2/bindings.hxx>
#include <tools/urlobj.hxx>
+#include <cliputil.hxx>
#include <svx/svxdlg.hxx>
#include <svx/dialogs.hrc>
#include <svx/fmglob.hxx>
@@ -357,7 +358,7 @@
break;
case SID_PASTE:
- OSL_FAIL( "SdrView::PasteClipboard not supported anymore" );
+ ScClipUtil::PasteFromClipboard ( GetViewData(), GetViewData()->GetViewShell(), true );
break;
case SID_SELECTALL:
diff --git a/sw/source/ui/dochdl/swdtflvr.cxx b/sw/source/ui/dochdl/swdtflvr.cxx
index 2267a66..88cc4f4 100644
--- a/sw/source/ui/dochdl/swdtflvr.cxx
+++ b/sw/source/ui/dochdl/swdtflvr.cxx
@@ -3065,8 +3065,8 @@
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 );
@@ -3083,6 +3083,10 @@
}
rShell.SetRetainSelection( false );
}
+ if ( nSelection & nsSelectionType::SEL_DRW) //unselect hovering graphics
+ {
+ rShell.ResetSelect(NULL,false);
+ }
sal_Bool bInWrd = sal_False, bEndWrd = sal_False, bSttWrd = sal_False,
bSmart = 0 != (TRNSFR_DOCUMENT_WORD & eBufferType);
--
To view, visit https://gerrit.libreoffice.org/1524
To unsubscribe, visit https://gerrit.libreoffice.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I9f4c4b674c5a439aade5ce943f3b34577f8e2281
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Lennard Wasserthal <Wasserthal at nefkom.net>
More information about the LibreOffice
mailing list