summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarco Cecchetti <marco.cecchetti@collabora.com>2018-01-10 19:19:19 +0100
committerJan Holesovsky <kendy@collabora.com>2018-01-15 12:57:20 +0100
commitaceaaaa85fd824611349e637f37b9644b6fe62cb (patch)
tree9aa695754335de0b43a3ea95cae8e158d16681a2
parent233101a135d2e6dd67f3eaf9f54ac56d43c372cf (diff)
Revert "lok: sc: copy / paste confusion -- workaround"
This reverts commit 7fc62b59ddad40f725709f14331c38c0a78ff6ee. This workaround is no more needed because of commit dc916fd Change-Id: Icd13b245d5965c2b2ece326f7f5705cf06cf1b64 Reviewed-on: https://gerrit.libreoffice.org/47765 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com>
-rw-r--r--sc/inc/clipparam.hxx6
-rw-r--r--sc/source/core/data/clipparam.cxx6
-rw-r--r--sc/source/ui/view/viewfun3.cxx25
3 files changed, 2 insertions, 35 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 bc856672fbba..9c08d6093dfc 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 712db2c511e7..719ebda2d4c1 100644
--- a/sc/source/ui/view/viewfun3.cxx
+++ b/sc/source/ui/view/viewfun3.cxx
@@ -37,9 +37,6 @@
#include <sot/exchange.hxx>
#include <memory>
-#include <comphelper/lok.hxx>
-#include <sfx2/lokhelper.hxx>
-
#include "attrib.hxx"
#include "patattr.hxx"
#include "dociter.hxx"
@@ -228,14 +225,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).
@@ -879,20 +868,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)