Created attachment 49867 [details] sample file to demonstrate bug Go to the sheet Character Powers in the sample file (it should be the startup default). Go to Insert->Names->Define. Go to the names local to that sheet. You will see a named range called TestRange. Delete it, then press OK. Save the file. Reopen the file. Go to Insert->Names->Define. You will see that TestRange has magically reappeared! A number of other things don't work either. Changing the "Assigned to" field of TestRange fails to be saved. Reopening gets you the old definition. Deleting TestRange, creating a new range called TestRange, and saving also fails. The old definition gets saved even though you deleted it and created a new variable in its place. In fact, you are unable to create any new names at all on that sheet. Oh, you can create them, and you will see them in the Define Names pane, but should you save, close, and reopen they will have disappeared. You should have Automatically Update Links set to never, or say no if LO asks you to update.
Let me have a look at it but might already be fixed in 3.4.2
seems really be fixed in 3.4.2
After upgrading to 3.4.2, I'm still seeing the problem. Don't forget the "close and reopen" step. If you just delete the range without closing the file everything looks ok. The Define Names panel appears to have done its job.
I have reproduced a simple test case for this bug. To wit: Open a New spreadsheet in calc. Select Insert->Names->Define. Select Sheet1 on the Scope popup. Name your new range Test (or anything else you like). The default Assigned To is OK. Click Add. Click OK. Quit LO, clicking Save on the dialog box. Reopen your newly saved spreadsheet. Select Insert->Names->Define. Select Sheet1 on the Scope popup. Select the range you created above. Click Delete. Click OK. Quit LO, clicking Save on the dialog box. Reopen the spreadsheet. Select Insert->Names->Define. Select Sheet1 on the Scope popup. Observe that the range you deleted was not actually deleted.
I have another test case. Open a new blank spreadsheet. Save and quit. Reopen spreadsheet. Select Insert->Names->Define. Select Sheet1 on the Scope popup. Create the new range Test (or any other name you like). The default Assigned To is OK. Click Add. Click OK. Save and quit. Reopen spreadsheet. Select Insert->Names->Define. Select Sheet1 on the Scope popup. Observe that the range you created above is gone.
Reproduced on LibreOffice 3.4 340m1(Build:103) for OpenSuse Linux. Thanks for the document and clear steps. I followed the steps in the first one and the name/definition does not change upon re-opening.
So after several hours of debugging I finally found the problem(feature?): We copy the loaded sheet to the ouput stream if no change was made to the sheet. While this feature is a nice performance improvement I have to evaluate how I can adjust it so that it will consider changed range names as changes to the sheet. I'll lower the severity a bit since we have now a workaround: change something in the specific sheet and save then. For the next time I would be happy if you could create a small test document since your original document was a difficult to debug.
(In reply to comment #7) > For the next time I would be happy if you could create a small test document > since your original document was a difficult to debug. At the time, that was the only test case I had. Did you see the two super-simple test cases I described in comments #4 and #5?
Have a try with Menu/Tools/Options/LibreOffice - Allow to save document even when the document is not modified.
@mariosv: this is for a different feature, the only things that will help are changes to the sheet.
I see the status has changed to "Resolved/Fixed". Will the fix be in 3.43?
Yes, therefore I set in the whiteboard line target 3.4.3