diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2011-11-23 03:41:26 +0100 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2011-11-23 06:25:36 +0100 |
commit | 9e8ae1d56076474e4673a953d8ebd726cb5daa18 (patch) | |
tree | 9fa98ed589c4484bfc2b72a520e7f195f561c0f2 /sc/source/ui/docshell/docfunc.cxx | |
parent | f3c7c1e4ceddc6f778de89c1e75dbb126247c787 (diff) |
remove ScRangeName::findByName
this method was mmisused and is the source for some "bugs"
we don't allow case sensitive storage of range names and therefore it
does not amke sense to search by case sensitive names, use
ScRangeName::findByUpperName instead
Especially the uno implementation did behave wrongly and allowed to
create two names that were identicall for the model
Diffstat (limited to 'sc/source/ui/docshell/docfunc.cxx')
-rw-r--r-- | sc/source/ui/docshell/docfunc.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx index 739b973861c3..0d8a406d9466 100644 --- a/sc/source/ui/docshell/docfunc.cxx +++ b/sc/source/ui/docshell/docfunc.cxx @@ -4575,7 +4575,7 @@ void ScDocFunc::CreateOneName( ScRangeName& rList, ScRange( nX1, nY1, nTab, nX2, nY2, nTab ).Format( aContent, SCR_ABS_3D, pDoc ); bool bInsert = false; - ScRangeData* pOld = rList.findByName(aName); + ScRangeData* pOld = rList.findByUpperName(ScGlobal::pCharClass->upper(aName)); if (pOld) { String aOldStr; @@ -4738,7 +4738,7 @@ sal_Bool ScDocFunc::InsertNameList( const ScAddress& rStartPos, sal_Bool bApi ) for (ScRangeName::iterator itr = itrBeg; itr != itrEnd; ++itr) { const ScRangeData& r = *itr; - if (!r.HasType(RT_DATABASE) && !r.HasType(RT_SHARED) && !pLocalList->findByName(r.GetName())) + if (!r.HasType(RT_DATABASE) && !r.HasType(RT_SHARED) && !pLocalList->findByUpperName(r.GetUpperName())) ++nValidCount; } @@ -4773,7 +4773,7 @@ sal_Bool ScDocFunc::InsertNameList( const ScAddress& rStartPos, sal_Bool bApi ) for (ScRangeName::iterator itr = itrBeg; itr != itrEnd; ++itr) { ScRangeData& r = *itr; - if (!r.HasType(RT_DATABASE) && !r.HasType(RT_SHARED) && !pLocalList->findByName(r.GetName())) + if (!r.HasType(RT_DATABASE) && !r.HasType(RT_SHARED) && !pLocalList->findByUpperName(r.GetUpperName())) ppSortArray[j++] = &r; } #ifndef ICC |