[Libreoffice-commits] core.git: sc/inc sc/source

Marco Cecchetti marco.cecchetti at collabora.com
Mon Jan 15 14:37:13 UTC 2018


 sc/inc/clipparam.hxx              |    6 ------
 sc/source/core/data/clipparam.cxx |    6 ++----
 sc/source/ui/view/viewfun3.cxx    |   22 ----------------------
 3 files changed, 2 insertions(+), 32 deletions(-)

New commits:
commit 183fd9a58ae3eeb749b78e6f4ca5783c79b43acb
Author: Marco Cecchetti <marco.cecchetti at collabora.com>
Date:   Wed Jan 10 17:31:35 2018 +0100

    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 at gmail.com>
    Tested-by: Marco Cecchetti <mrcekets at gmail.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 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 689ffe0e3c77..83b3a51edd86 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)


More information about the Libreoffice-commits mailing list