sc/source/ui/view/cliputil.cxx |    3 +++
 sc/source/ui/view/gridwin4.cxx |    4 +++-
 sc/source/ui/view/viewfun3.cxx |    7 +++++--
 3 files changed, 11 insertions(+), 3 deletions(-)

New commits:
commit c675537f59b7c7e7a63f84e266cc0c2b146b2e7b
Author:     Marco Cecchetti <marco.cecche...@collabora.com>
AuthorDate: Tue Jan 30 14:51:56 2024 +0100
Commit:     Marco Cecchetti <marco.cecche...@collabora.com>
CommitDate: Mon Feb 5 18:21:37 2024 +0100

    lok: calc: missing invalidation of cached positions
    
    When executing an external paste position cached by ScPositionHelper
    where not invalidated causing misplaced tile rendering
    
    Change-Id: Ia707e8de5a870f42a6dd303d87694f7ec8f0a105
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162775
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Tomaž Vajngerl <qui...@gmail.com>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162989
    Reviewed-by: Marco Cecchetti <marco.cecche...@collabora.com>

diff --git a/sc/source/ui/view/cliputil.cxx b/sc/source/ui/view/cliputil.cxx
index 9c7d25db1055..e4d75d3b34b5 100644
--- a/sc/source/ui/view/cliputil.cxx
+++ b/sc/source/ui/view/cliputil.cxx
@@ -126,6 +126,9 @@ void ScClipUtil::PasteFromClipboard( ScViewData& rViewData, 
ScTabViewShell* pTab
         const SfxBoolItem* pItem = rThisDoc.GetAttr(nThisCol, nThisRow, 
nThisTab, ATTR_LINEBREAK);
         if (pItem->GetValue() || entireColumnOrRowSelected)
         {
+            pTabViewShell->OnLOKSetWidthOrHeight(nThisCol, true);
+            pTabViewShell->OnLOKSetWidthOrHeight(nThisRow, false);
+
             ScTabViewShell::notifyAllViewsSheetGeomInvalidation(
                 pTabViewShell, true /* bColumns */, true /* bRows */, true /* 
bSizes*/,
                 true /* bHidden */, true /* bFiltered */, true /* bGroups */, 
nThisTab);
diff --git a/sc/source/ui/view/viewfun3.cxx b/sc/source/ui/view/viewfun3.cxx
index fb0e469d5205..289776006284 100644
--- a/sc/source/ui/view/viewfun3.cxx
+++ b/sc/source/ui/view/viewfun3.cxx
@@ -755,8 +755,11 @@ bool ScViewFunc::PasteFromSystem( SotClipboardFormatId 
nFormatId, bool bApi )
         }
         else if (comphelper::LibreOfficeKit::isActive())
         {
-            SfxViewShell* pViewShell = rViewData.GetViewShell();
-            ScTabViewShell::notifyAllViewsSheetGeomInvalidation(pViewShell, 
true /* bColumns */, true /* bRows */,
+            ScTabViewShell* pTabViewShell = rViewData.GetViewShell();
+            pTabViewShell->OnLOKSetWidthOrHeight(rViewData.GetCurX(), true);
+            pTabViewShell->OnLOKSetWidthOrHeight(rViewData.GetCurY(), false);
+
+            ScTabViewShell::notifyAllViewsSheetGeomInvalidation(pTabViewShell, 
true /* bColumns */, true /* bRows */,
                 true /* bSizes */, false /* bHidden */, false /* bFiltered */, 
false /* bGroups */, rViewData.GetTabNo());
         }
     }
commit 2c4a79c645cc39fb56ff1d5e2b146b718d59088f
Author:     Marco Cecchetti <marco.cecche...@collabora.com>
AuthorDate: Tue Jan 23 17:34:20 2024 +0100
Commit:     Marco Cecchetti <marco.cecche...@collabora.com>
CommitDate: Mon Feb 5 18:21:26 2024 +0100

    lok: calc: rtl - misplaced caret
    
    This is a workaround since text cursor is horizontally a few pixels
    misplaced wrt text in the RTL case.
    This issue is a regression from
    https://gerrit.libreoffice.org/c/core/+/162196
    
    Change-Id: Ia06ee223d01a7df8841bfaca3cad32af896871d0
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162563
    Reviewed-by: Henry Castro <hcas...@collabora.com>
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162988

diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx
index 4f4df882ce83..50d03d010416 100644
--- a/sc/source/ui/view/gridwin4.cxx
+++ b/sc/source/ui/view/gridwin4.cxx
@@ -1197,12 +1197,14 @@ void ScGridWindow::DrawContent(OutputDevice &rDevice, 
const ScTableInfo& rTableI
                     // same zoom level as view used for painting
                     aNewOutputArea = rDevice.LogicToPixel(aOrigOutputAreaTw);
                 }
+                // a small workaround for getting text position matching 
cursor position horizontally.
+                const tools::Long nCursorGapPx = 2;
                 // Transform the cell range X coordinates such that the edit 
cell area is
                 // horizontally mirrored w.r.t the (combined-)tile.
                 aNewOutputArea = tools::Rectangle(
                     pLokRTLCtxt->docToTilePos(aNewOutputArea.Left() - 
aOriginAbsPx.X()) + aOriginAbsPx.X(),
                     aNewOutputArea.Top(),
-                    pLokRTLCtxt->docToTilePos(aNewOutputArea.Right() - 
aOriginAbsPx.X()) + aOriginAbsPx.X(),
+                    pLokRTLCtxt->docToTilePos(aNewOutputArea.Right() - 
aOriginAbsPx.X()) + aOriginAbsPx.X() + nCursorGapPx,
                     aNewOutputArea.Bottom());
                 aNewOutputArea.Normalize();
             }

Reply via email to