[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3' - sc/inc sc/source
Marco Cecchetti
marco.cecchetti at collabora.com
Mon Jan 15 11:57:53 UTC 2018
sc/inc/clipparam.hxx | 6 ------
sc/source/core/data/clipparam.cxx | 6 ++----
sc/source/ui/view/viewfun3.cxx | 25 -------------------------
3 files changed, 2 insertions(+), 35 deletions(-)
New commits:
commit aceaaaa85fd824611349e637f37b9644b6fe62cb
Author: Marco Cecchetti <marco.cecchetti at collabora.com>
Date: Wed Jan 10 19:19:19 2018 +0100
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 at collabora.com>
Tested-by: Jan Holesovsky <kendy at collabora.com>
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)
More information about the Libreoffice-commits
mailing list