summaryrefslogtreecommitdiff
path: root/sc/source/core/data
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2020-03-01 02:03:56 +0100
committerEike Rathke <erack@redhat.com>2020-03-01 16:52:34 +0100
commita209ec58ff5893823ed0b7a11e8463c38df86739 (patch)
treee2430949686b8c6d063591c4f457909277436f2c /sc/source/core/data
parent4c483204edc5ab5da4b40eb92fd69c6d87d11505 (diff)
Related: tdf#130371 Broadcast ScAreasChanged for created names
... to notify the Name Box to refresh its name list. Change-Id: I20fb461d59c0dd98698837d91e2a7ef9a8c5a4ef Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89768 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
Diffstat (limited to 'sc/source/core/data')
-rw-r--r--sc/source/core/data/document10.cxx9
1 files changed, 9 insertions, 0 deletions
diff --git a/sc/source/core/data/document10.cxx b/sc/source/core/data/document10.cxx
index 1afe7a378ac1..3b67bb6c3af1 100644
--- a/sc/source/core/data/document10.cxx
+++ b/sc/source/core/data/document10.cxx
@@ -26,6 +26,7 @@
#include <editeng/colritem.hxx>
#include <scitems.hxx>
#include <datamapper.hxx>
+#include <docsh.hxx>
// Add totally brand-new methods to this source file.
@@ -884,7 +885,15 @@ bool ScDocument::CopyAdjustRangeName( SCTAB& rSheet, sal_uInt16& rIndex, ScRange
rpRangeData = copyRangeName( pOldRangeData, rNewDoc, this, rNewPos, rOldPos, bGlobalNamesToLocal,
nOldSheet, nNewSheet, bSameDoc);
}
+
+ if (rpRangeData && !rNewDoc.IsClipOrUndo())
+ {
+ ScDocShell* pDocSh = static_cast<ScDocShell*>(rNewDoc.GetDocumentShell());
+ if (pDocSh)
+ pDocSh->SetAreasChangedNeedBroadcast();
+ }
}
+
rSheet = nNewSheet;
rIndex = rpRangeData ? rpRangeData->GetIndex() : 0; // 0 means not inserted
return true;