summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDennis Francis <dennis.francis@collabora.com>2021-01-19 10:56:04 +0530
committerAndras Timar <andras.timar@collabora.com>2021-01-19 09:28:25 +0100
commit5fb8b1b2867af8dc5e55c769cf9923609709f914 (patch)
tree146bf0fec38581405fe83e2d298672a09e2a1fbe
parentfc67bb78c08847d8ce96b3b53a902cabcf6106c1 (diff)
lok: Send rows heights invalidation on paste
... when the dest cell has wrap-text option set. Change-Id: I9f0dd157694701c96fd91e02b8232ed205f13ae4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109602 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com>
-rw-r--r--sc/source/ui/view/cliputil.cxx18
1 files changed, 16 insertions, 2 deletions
diff --git a/sc/source/ui/view/cliputil.cxx b/sc/source/ui/view/cliputil.cxx
index bdee23c43a2a..31bbf37d80e5 100644
--- a/sc/source/ui/view/cliputil.cxx
+++ b/sc/source/ui/view/cliputil.cxx
@@ -20,8 +20,10 @@
#include <viewutil.hxx>
#include <markdata.hxx>
#include <gridwin.hxx>
+#include <scitems.hxx>
#include <sfx2/classificationhelper.hxx>
+#include <comphelper/lok.hxx>
namespace
{
@@ -47,8 +49,10 @@ void ScClipUtil::PasteFromClipboard( ScViewData* pViewData, ScTabViewShell* pTab
{
const ScTransferObj* pOwnClip = ScTransferObj::GetOwnClipboard(ScTabViewShell::GetClipData(pViewData->GetActiveWin()));
ScDocument* pThisDoc = pViewData->GetDocument();
- ScDPObject* pDPObj = pThisDoc->GetDPAtCursor( pViewData->GetCurX(),
- pViewData->GetCurY(), pViewData->GetTabNo() );
+ SCCOL nThisCol = pViewData->GetCurX();
+ SCROW nThisRow = pViewData->GetCurY();
+ SCTAB nThisTab = pViewData->GetTabNo();
+ ScDPObject* pDPObj = pThisDoc->GetDPAtCursor( nThisCol, nThisRow, nThisTab );
if ( pOwnClip && pDPObj )
{
// paste from Calc into DataPilot table: sort (similar to drag & drop)
@@ -90,6 +94,16 @@ void ScClipUtil::PasteFromClipboard( ScViewData* pViewData, ScTabViewShell* pTab
bShowDialog ); // allow warning dialog
}
}
+ if (comphelper::LibreOfficeKit::isActive())
+ {
+ const SfxBoolItem* pItem = static_cast<const SfxBoolItem*>(pThisDoc->GetAttr(nThisCol, nThisRow, nThisTab, ATTR_LINEBREAK));
+ if (pItem->GetValue())
+ {
+ ScTabViewShell::notifyAllViewsSheetGeomInvalidation(
+ pTabViewShell, false /* bColumns */, true /* bRows */, true /* bSizes*/,
+ true /* bHidden */, true /* bFiltered */, true /* bGroups */, nThisTab);
+ }
+ }
pTabViewShell->CellContentChanged(); // => PasteFromSystem() ???
}