Does LO Calc drop a Named Range that is not referenced?

asked 2018-01-18 00:15:37 +0200

Herb40 gravatar image

updated 2018-01-18 00:17:48 +0200

I have a Calc and Basic-based app that I have recently ported from OO. In one Basic macro, I copy a "model" SS using FileCopy, use FileExists to ensure that the copy worked properly, and then load the copy SS with LoadComponentFromURL. This SS contains a large number of "Named Ranges" (Defined Names), some of which are accessed by the Basic code to get/set their values. Later, that SS is saved with a StoreToURL and closed.

In a subsequent SS and different Basic macro, the SS created above is loaded and some of its Named Ranges are accessed. But some of the access attempts fail because the Named Range does not exist. When I examine the Named Ranges with Ctrl-F3, most of the Named Ranges are present but some are missing, even though I have absolutely no code that deletes a Named Range.

This series of events worked correctly in OO, and I just verified that. I do have some Basic code that does a wholesale clearing of a number of adjacent cells, where each of those cells also has a Named Range. Is this supposed to cause LO Calc to delete the Named Range just because the referenced cell is cleared in some Basic code?

edit retag flag offensive close merge delete

Comments

Show us the code. Come with a simple macro that shows your issue, and possibly file it as a bug.

Mike Kaganski gravatar imageMike Kaganski ( 2018-01-18 07:49:42 +0200 )edit