HI~ I have a finding on 122840 and have a code can fix it. But I have a further question about technique detail on this issue. Don't know if anybody is familiar with.
In 120478, zhaoshzh added support for scope of name range. MS Excel can define a same name to a range on different sheets. For example defines "MyRange" to "Sheet1.A1:A4" with scope in sheet1 and defines "MyRange" again to "Sheet2.A1:A4" with scope in sheet2. In order to add this support, he changed code in ScXMLImport::SetNamedRanges(), from xNamedRanges->addNewByName((*aItr)->sName, sTempContent, aCellAddress, GetRangeType((*aItr)->sRangeType)); to xNamedRanges->addNewByScopeName( sTabName, (*aItr)->sName, (*aItr)->sContent, aCellAddress, GetRangeType((*aItr)->sRangeType) ); addNewByScopeName is a new method, the difference with addNewByName is it added a new parameter sTabName in order to distinguish the scope. Others are same. But note he also changed the third parameter of the new method. In the old method, that parameter is sTempContent, it is string "0". However, in the new method he passed (*aItr)->sContent into, (*aItr)->sContent is the real content of the name. For example, for above illustration, "Sheet1.A1:A4" is the content of range name "MyRange". I'm not sure whether it is his pen mistake, but from logic, as he only add a new parameter for scope identification, the old parameters should not be changed. So I just change (*aItr)->sContent back to sTempContent, then it works. And there's no problem on 120478 sample file with the fix. I did some test, haven't find problem. But I don't know why we need to pass a "0" string as content into the method. Why not the real content? Does anybody know that? Thanks Clarence