Difference between revisions of "Calc/Drafts/Issue 33851"

From Apache OpenOffice Wiki
< Calc‎ | Drafts
Jump to: navigation, search
(Paste cut formula cells to hidden cells)
(Paste cut formula cells to visible cells)
Line 80: Line 80:
 
===== Paste cut formula cells to hidden cells =====
 
===== Paste cut formula cells to hidden cells =====
  
===== Paste cut formula cells to a non-filtered range =====
+
===== Paste cut formula cells to visible cells=====
  
 
== Fill cells ==
 
== Fill cells ==

Revision as of 14:21, 14 January 2007

A specification draft for issue 33851, which is about how filtered rows should be treated during cut/copy/paste/fill cells operations, and due to its length and controversial discussion is unlikely to be read and understood, so presenting the outcome in a wiki page and editing that instead is much more appropriate. Please bear in mind that this page is geared towards developing a specification (see also Category:Specification), don't discuss here, use the Talk page (discussion link above) instead. Thanks.

General overview

There's consensus that operations modifying the document's content should not modify content of rows that are not displayed due to an applied filter setting. Some simply argue do it like Excel, however, that's not what Excel does, see single topics below.


Copy cells

This sounds easy: just copy the cells that are not filtered out.

Note that the current Calc implementation does not allow a multi-selection to be copied to the clipboard. It reached consensus that the current Calc behavior, to treat the visible rows as one area, is sufficient.

  • For what to do during paste if the cells contain formulas with relative references see below under #Paste cells.


Cut cells

Sounds the same as copy cells, just cut the cells that are not filtered out. Though the paste case may be easier, probably the references should be adjusted the same way as usual in a cut/paste scenario.

  • NOTE: Excel 2003 in this case cuts all cells, including filtered. Do it like Excel probably does not apply here.

Note that current Calc implementation does not allow a multi-selection to be copied to the clipboard.

  • For what to do during paste if the cells contain formulas with relative references see below under #Paste cells.


Paste cells

Do not touch rows that are filtered-out.

  • How to handle the case when the area in clipboard is larger than a selected area to be pasted to?
    • Excel 2003 ignores the selection.
  • How to handle the case when the selected area is larger than the area in clipboard?
    • Excel 2003 ignores the selection except if a multiple of the columns of the clipboard content is selected.
  • NOTE: Excel 2003 pastes also to filtered rows. Do it like Excel probably does not apply here.


Paste copied cells

It reached consensus that the current Calc behavior, to treat the visible rows as one area and thus paste as one area, is sufficient.


Paste copied cells with formulas

  • NOTE: Excel 2003 does not paste the formulas if the cells were copied from a filtered range, only the values are pasted. Do it like Excel probably does not apply here.


Paste copied cells with formulas containing cell references

Adjust formulas, as usual in copy/paste.

Paste copied formula cells to hidden cells
Paste copied formula cells to visible cells

Paste cut cells

Because the Cut could/would break formulas in hidden cells

  • => cutting both hidden and non-hidden seems an option
  • => alternative: provide user with the option to select between the 2 possibilities

NOTE:

  • this is a problem specific for CUT
  • it does NOT apply for Copy
    • Copy does NOT break hidden cells
    • therefore this comment applies soley to Cut

-- Discoleo 01:09, 12 January 2007 (CET)


Paste cut cells with formulas

Paste cut cells with formulas containing cell references

Adjust references as usual in a cut/paste scenario.


Paste cut formula cells to hidden cells
Paste cut formula cells to visible cells

Fill cells

Fill only non-filtered (visible) rows.


Fill cells with formulas containing cell references

  • How to adapt relative cell references?
    • Treat as if the visible area was a contiguous area? Probably the best.
      • The same as if one single cell was copied to the clipboard and then pasted to several locations, leaving out the hidden rows. Most logical. And is also what Excel 2003 does.


Fill series

  1. Fill continuously in the non-filtered (visible) rows?
  2. Or fill with gaps, leaving out the values that would go into the filtered rows?
  3. Or do nothing?
    • Excel 2003 disables Fill Series on filtered ranges.
    • Probably the best, fill series on a filtered range doesn't make much sense anyway.

Scenario 1

If you want to get some serial numbering for visible data after filtering, Fill Series would be a good function to do that, if rows what have been filtered out will be ignored.

  • Current behaviour: Fill Series will also fill invisible rows
  • Desired behaviour: Fill Series should be available, but only touch visible cells.
Personal tools