Bug 163192 - Default options of database ranges
Summary: Default options of database ranges
Status: UNCONFIRMED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-09-28 13:35 UTC by Andreas Säger
Modified: 2024-11-14 19:52 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Säger 2024-09-28 13:35:17 UTC
When you drag a database query or table into a spreadsheet, Calc generates a database range "Import1" with both options "Keep formatting" and "Insert/Remove Cells" unchecked. 
"Keep formatting" takes care that your spreadsheet formatting survives the next refresh.
"Insert/Remove Cells" prevents that adjacent data are overwritten on refresh when the database row set has increased. And it prevents that adjacent data are left in empty sheet space when the row set has decreased.
You always want these two options being checked. I can not imagine any scenario where it would make sense to uncheck any of them.

These options are checked by default when you create a database range manually. How does this make any sense with an unlinked (not refreshable) db range? Answer: When you copy the result of a sort or filter operation to another sheet, option "Insert/Remove Cells" makes a difference. Again, you never want to turn this off. I can't find any effect of "Keep Formatting" with unlinked db ranges.

Please, check these options for linked import ranges per default. IMHO, they  should not exist anyway.
Comment 1 Andreas Säger 2024-09-28 17:57:53 UTC
How to reproduce:
Drag the biblio table from the data source window into a Calc sheet.
Call Data>Define... "Options". Only the header option is set because database data always import with column headers.

Select a cell or range, call Data>Define... enter a name, click [Add] and look at the options. Options "Insert/Remove" and "Keep Formatting" are set.
Comment 2 m_a_riosv 2024-09-28 23:32:07 UTC
It has always worked like that, inherited from OOo.

I agree, but I'm not sure if there are no scenarios for these unselected options.

Could the change be a break for users?

In any case, it seems more a request for ‘enhancement’ than a ‘bug’.
Comment 3 Andreas Säger 2024-09-29 14:15:37 UTC
Many years ago, I filed an enhancement request to set these options by default and someone implemented the new defaults. However, the defaults do not apply to linked import ranges, where they would be even more useful than with manually created ranges.
Comment 4 Andreas Säger 2024-11-14 19:52:08 UTC
See also: https://bz.apache.org/ooo/show_bug.cgi?id=123725
This incomplete enhancement inherits from AOO.