[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - sc/source
Eike Rathke (via logerrit)
logerrit at kemper.freedesktop.org
Mon Sep 28 12:18:14 UTC 2020
sc/source/core/data/documen3.cxx | 14 ++++++++++++++
1 file changed, 14 insertions(+)
New commits:
commit 6d9652e2864a020b61f26a7b51ca908f1d9790a8
Author: Eike Rathke <erack at redhat.com>
AuthorDate: Sun Sep 27 14:51:50 2020 +0200
Commit: Xisco Fauli <xiscofauli at libreoffice.org>
CommitDate: Mon Sep 28 14:17:39 2020 +0200
Resolves: tdf#67007 display sheet-local range name in Name Box for selection
Change-Id: Ia9980b13ed5c93cc72231ead532e3916e6234f56
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103509
Reviewed-by: Eike Rathke <erack at redhat.com>
Tested-by: Jenkins
(cherry picked from commit d3a8fdf3cad0e71ff5e13bb229fed6e52206c6b9)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103430
Reviewed-by: Xisco Fauli <xiscofauli at libreoffice.org>
diff --git a/sc/source/core/data/documen3.cxx b/sc/source/core/data/documen3.cxx
index 33c9a2b5665b..f34389e9fe35 100644
--- a/sc/source/core/data/documen3.cxx
+++ b/sc/source/core/data/documen3.cxx
@@ -239,6 +239,20 @@ bool ScDocument::InsertNewRangeName( SCTAB nTab, const OUString& rName, const Sc
const ScRangeData* ScDocument::GetRangeAtBlock( const ScRange& rBlock, OUString* pName ) const
{
const ScRangeData* pData = nullptr;
+ if (rBlock.aStart.Tab() == rBlock.aEnd.Tab())
+ {
+ const ScRangeName* pLocalNames = GetRangeName(rBlock.aStart.Tab());
+ if (pLocalNames)
+ {
+ pData = pLocalNames->findByRange( rBlock );
+ if (pData)
+ {
+ if (pName)
+ *pName = pData->GetName();
+ return pData;
+ }
+ }
+ }
if ( pRangeName )
{
pData = pRangeName->findByRange( rBlock );
More information about the Libreoffice-commits
mailing list