summaryrefslogtreecommitdiff
path: root/sc/source/ui/docshell/arealink.cxx
diff options
context:
space:
mode:
authorKohei Yoshida <kyoshida@novell.com>2011-03-04 17:48:32 -0500
committerKohei Yoshida <kyoshida@novell.com>2011-03-05 15:21:07 -0500
commite422d9efc36407cae4220c025a4c2d8e8de14be9 (patch)
treef166728385f95f4152212e36d28a5b685100a60b /sc/source/ui/docshell/arealink.cxx
parentb2d3a5e2a3e5870778af63a30d7f3e6322294d06 (diff)
Removed SearchName() in favor of findByName().
Diffstat (limited to 'sc/source/ui/docshell/arealink.cxx')
-rw-r--r--sc/source/ui/docshell/arealink.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/sc/source/ui/docshell/arealink.cxx b/sc/source/ui/docshell/arealink.cxx
index a1e6c02aa4a1..ddef0eb95bc5 100644
--- a/sc/source/ui/docshell/arealink.cxx
+++ b/sc/source/ui/docshell/arealink.cxx
@@ -205,14 +205,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 bFound = FALSE;
+ bool bFound = false;
ScRangeName* pNames = pSrcDoc->GetRangeName();
USHORT nPos;
if (pNames) // benannte Bereiche
{
- if (pNames->SearchName( rAreaName, nPos ))
- if ( (*pNames)[nPos]->IsValidReference( rRange ) )
- bFound = TRUE;
+ const ScRangeData* p = pNames->findByName(rAreaName);
+ if (p && p->IsValidReference(rRange))
+ bFound = true;
}
if (!bFound) // Datenbankbereiche
{
@@ -225,14 +225,14 @@ BOOL ScAreaLink::FindExtRange( ScRange& rRange, ScDocument* pSrcDoc, const Strin
SCROW nRow1, nRow2;
(*pDBColl)[nPos]->GetArea(nTab,nCol1,nRow1,nCol2,nRow2);
rRange = ScRange( nCol1,nRow1,nTab, nCol2,nRow2,nTab );
- bFound = TRUE;
+ bFound = true;
}
}
if (!bFound) // direct reference (range or cell)
{
ScAddress::Details aDetails(pSrcDoc->GetAddressConvention(), 0, 0);
if ( rRange.ParseAny( rAreaName, pSrcDoc, aDetails ) & SCA_VALID )
- bFound = TRUE;
+ bFound = true;
}
return bFound;
}