diff options
author | Marco Cecchetti <marco.cecchetti@collabora.com> | 2018-01-10 17:31:35 +0100 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2018-03-21 12:11:49 +0100 |
commit | 0d60dfd81b81921aa38f75d33162e0ba6c0e510e (patch) | |
tree | e91a02f256231e9b7335353a79916ae97b2b7579 /sc | |
parent | 97a170e0fd06a7968fd23db931cd01f99a5c36cd (diff) |
Revert "lok: sc: copy / paste confusion -- workaround"
This reverts commit f0684222540b96d8366ce175c522b64472361b80.
This workaround is no more needed because of commit 1b7a827
Change-Id: Icd13b245d5965c2b2ece326f7f5705cf06cf1b64
Reviewed-on: https://gerrit.libreoffice.org/47761
Reviewed-by: Marco Cecchetti <mrcekets@gmail.com>
Tested-by: Marco Cecchetti <mrcekets@gmail.com>
(cherry picked from commit 183fd9a58ae3eeb749b78e6f4ca5783c79b43acb)
Diffstat (limited to 'sc')
-rw-r--r-- | sc/inc/clipparam.hxx | 6 | ||||
-rw-r--r-- | sc/source/core/data/clipparam.cxx | 6 | ||||
-rw-r--r-- | sc/source/ui/view/viewfun3.cxx | 22 |
3 files changed, 2 insertions, 32 deletions
diff --git a/sc/inc/clipparam.hxx b/sc/inc/clipparam.hxx index 16555225d074..2e5dece711e8 100644 --- a/sc/inc/clipparam.hxx +++ b/sc/inc/clipparam.hxx @@ -26,8 +26,6 @@ #include <vector> -class SfxViewShell; - /** * This struct stores general clipboard parameters associated with a * ScDocument instance created in clipboard mode. @@ -40,7 +38,6 @@ struct ScClipParam Direction meDirection; bool mbCutMode; sal_uInt32 mnSourceDocID; - SfxViewShell* mpSourceView; ScRangeListVector maProtectedChartRangesVector; ScClipParam(); @@ -70,9 +67,6 @@ struct ScClipParam sal_uInt32 getSourceDocID() const { return mnSourceDocID; } void setSourceDocID( sal_uInt32 nVal ) { mnSourceDocID = nVal; } - - SfxViewShell* getSourceView() const { return mpSourceView; } - void setSourceView( SfxViewShell* pSourceView ) { mpSourceView = pSourceView; } }; #endif diff --git a/sc/source/core/data/clipparam.cxx b/sc/source/core/data/clipparam.cxx index c80521045691..51738c9532e3 100644 --- a/sc/source/core/data/clipparam.cxx +++ b/sc/source/core/data/clipparam.cxx @@ -23,16 +23,14 @@ ScClipParam::ScClipParam() : meDirection(Unspecified), mbCutMode(false), - mnSourceDocID(0), - mpSourceView(nullptr) + mnSourceDocID(0) { } ScClipParam::ScClipParam(const ScRange& rRange, bool bCutMode) : meDirection(Unspecified), mbCutMode(bCutMode), - mnSourceDocID(0), - mpSourceView(nullptr) + mnSourceDocID(0) { maRanges.Append(rRange); } diff --git a/sc/source/ui/view/viewfun3.cxx b/sc/source/ui/view/viewfun3.cxx index dd038f35e242..2c50bdfff97b 100644 --- a/sc/source/ui/view/viewfun3.cxx +++ b/sc/source/ui/view/viewfun3.cxx @@ -227,14 +227,6 @@ bool ScViewFunc::CopyToClip( ScDocument* pClipDoc, const ScRangeList& rRanges, b // and lose the 'if' above aClipParam.setSourceDocID( pDoc->GetDocumentID() ); - // This is only a workaround, which doesn't allow to paste content - // in one view which has been copied in a different view. - // TODO: implement a solution providing one clipboard per view - if (comphelper::LibreOfficeKit::isActive()) - { - aClipParam.setSourceView(GetViewData().GetViewShell()); - } - if (SfxObjectShell* pObjectShell = pDoc->GetDocumentShell()) { // Copy document properties from pObjectShell to pClipDoc (to its clip options, as it has no object shell). @@ -875,20 +867,6 @@ bool ScViewFunc::PasteFromClip( InsertDeleteFlags nFlags, ScDocument* pClipDoc, if (GetViewData().SelectionForbidsCellFill()) return false; - // This is only a workaround, which doesn't allow to paste content - // in one view which has been copied in a different view. - // TODO: implement a solution providing one clipboard per view - if (comphelper::LibreOfficeKit::isActive()) - { - ScTabViewShell* pThisView = GetViewData().GetViewShell(); - ScTabViewShell* pSourceView = dynamic_cast<ScTabViewShell*>(pClipDoc->GetClipParam().getSourceView()); - - if (pThisView && pSourceView && pThisView != pSourceView) - { - return false; - } - } - // undo: save all or no content InsertDeleteFlags nContFlags = InsertDeleteFlags::NONE; if (nFlags & InsertDeleteFlags::CONTENTS) |