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

Dennis Francis (via logerrit) logerrit at kemper.freedesktop.org
Thu Jan 21 13:28:00 UTC 2021


 sc/source/ui/view/cliputil.cxx |   20 ++++++++++++++++++--
 1 file changed, 18 insertions(+), 2 deletions(-)

New commits:
commit ab59506f44db55f8c888dbc1bb947b624fefa311
Author:     Dennis Francis <dennis.francis at collabora.com>
AuthorDate: Tue Jan 19 10:56:04 2021 +0530
Commit:     Dennis Francis <dennis.francis at collabora.com>
CommitDate: Thu Jan 21 14:27:14 2021 +0100

    lok: Send rows heights invalidation on paste
    
    ... when the dest cell has wrap-text option set.
    
    Conflicts:
            sc/source/ui/view/cliputil.cxx
    
    Change-Id: I9f0dd157694701c96fd91e02b8232ed205f13ae4
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109602
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Andras Timar <andras.timar at collabora.com>
    (cherry picked from commit 5fb8b1b2867af8dc5e55c769cf9923609709f914)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109670
    Tested-by: Jenkins
    Reviewed-by: Dennis Francis <dennis.francis at collabora.com>

diff --git a/sc/source/ui/view/cliputil.cxx b/sc/source/ui/view/cliputil.cxx
index 95378d76b545..d2db10b0a062 100644
--- a/sc/source/ui/view/cliputil.cxx
+++ b/sc/source/ui/view/cliputil.cxx
@@ -8,6 +8,7 @@
  */
 
 #include <cliputil.hxx>
+#include <attrib.hxx>
 #include <viewdata.hxx>
 #include <tabvwsh.hxx>
 #include <transobj.hxx>
@@ -20,8 +21,10 @@
 #include <viewutil.hxx>
 #include <markdata.hxx>
 #include <gridwin.hxx>
+#include <scitems.hxx>
 
 #include <sfx2/classificationhelper.hxx>
+#include <comphelper/lok.hxx>
 
 namespace
 {
@@ -47,8 +50,11 @@ void ScClipUtil::PasteFromClipboard( ScViewData& rViewData, ScTabViewShell* pTab
 {
     const ScTransferObj* pOwnClip = ScTransferObj::GetOwnClipboard(ScTabViewShell::GetClipData(rViewData.GetActiveWin()));
     ScDocument& rThisDoc = rViewData.GetDocument();
-    ScDPObject* pDPObj = rThisDoc.GetDPAtCursor( rViewData.GetCurX(),
-                         rViewData.GetCurY(), rViewData.GetTabNo() );
+    SCCOL nThisCol = rViewData.GetCurX();
+    SCROW nThisRow = rViewData.GetCurY();
+    SCTAB nThisTab = rViewData.GetTabNo();
+    ScDPObject* pDPObj = rThisDoc.GetDPAtCursor( nThisCol, nThisRow, nThisTab );
+
     if ( pOwnClip && pDPObj )
     {
         // paste from Calc into DataPilot table: sort (similar to drag & drop)
@@ -90,6 +96,16 @@ void ScClipUtil::PasteFromClipboard( ScViewData& rViewData, ScTabViewShell* pTab
                         bShowDialog );      // allow warning dialog
         }
     }
+    if (comphelper::LibreOfficeKit::isActive())
+    {
+        const ScLineBreakCell* pItem = rThisDoc.GetAttr(nThisCol, nThisRow, nThisTab, ATTR_LINEBREAK);
+        if (pItem && pItem->GetValue())
+        {
+            ScTabViewShell::notifyAllViewsSheetGeomInvalidation(
+                pTabViewShell, false /* bColumns */, true /* bRows */, true /* bSizes*/,
+                true /* bHidden */, true /* bFiltered */, true /* bGroups */, nThisTab);
+        }
+    }
     pTabViewShell->CellContentChanged();        // => PasteFromSystem() ???
 }
 


More information about the Libreoffice-commits mailing list