summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2013-05-27 13:36:16 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2013-05-27 13:38:48 +0200
commit5651e793d2a55e3ab7f4e731252d7c678f1e37c0 (patch)
tree98febcfd5dba7cfe03254ce9845ea16ac9dd8277
parentc891d0b3d8810815bdb1ed4fe793bb10ff7c541b (diff)
range names need to be checked upper case, fdo#64031
Change-Id: I540821fd7058bf0da27d955c9d966a10dd21ec94
-rw-r--r--sc/inc/arealink.hxx2
-rw-r--r--sc/source/ui/docshell/arealink.cxx7
2 files changed, 5 insertions, 4 deletions
diff --git a/sc/inc/arealink.hxx b/sc/inc/arealink.hxx
index 43ebeacc083a..60670b478f94 100644
--- a/sc/inc/arealink.hxx
+++ b/sc/inc/arealink.hxx
@@ -41,7 +41,7 @@ private:
bool bAddUndo;
bool bInCreate;
bool bDoInsert; // is set to FALSE for first update
- bool FindExtRange( ScRange& rRange, ScDocument* pSrcDoc, const String& rAreaName );
+ bool FindExtRange( ScRange& rRange, ScDocument* pSrcDoc, const OUString& rAreaName );
public:
TYPEINFO();
diff --git a/sc/source/ui/docshell/arealink.cxx b/sc/source/ui/docshell/arealink.cxx
index 5c5e725184aa..6409fbd6415a 100644
--- a/sc/source/ui/docshell/arealink.cxx
+++ b/sc/source/ui/docshell/arealink.cxx
@@ -190,13 +190,14 @@ bool ScAreaLink::IsEqual( const String& rFile, const String& rFilter, const Stri
}
// find a range with name >rAreaName< in >pSrcDoc<, return it in >rRange<
-bool ScAreaLink::FindExtRange( ScRange& rRange, ScDocument* pSrcDoc, const String& rAreaName )
+bool ScAreaLink::FindExtRange( ScRange& rRange, ScDocument* pSrcDoc, const OUString& rAreaName )
{
bool bFound = false;
+ OUString aUpperName = ScGlobal::pCharClass->uppercase(rAreaName);
ScRangeName* pNames = pSrcDoc->GetRangeName();
if (pNames) // benannte Bereiche
{
- const ScRangeData* p = pNames->findByUpperName(rAreaName);
+ const ScRangeData* p = pNames->findByUpperName(aUpperName);
if (p && p->IsValidReference(rRange))
bFound = true;
}
@@ -205,7 +206,7 @@ bool ScAreaLink::FindExtRange( ScRange& rRange, ScDocument* pSrcDoc, const Strin
ScDBCollection* pDBColl = pSrcDoc->GetDBCollection();
if (pDBColl)
{
- const ScDBData* pDB = pDBColl->getNamedDBs().findByUpperName(ScGlobal::pCharClass->uppercase(rAreaName));
+ const ScDBData* pDB = pDBColl->getNamedDBs().findByUpperName(aUpperName);
if (pDB)
{
SCTAB nTab;