https://issues.apache.org/ooo/show_bug.cgi?id=125931

          Issue ID: 125931
        Issue Type: DEFECT
           Summary: copy and paste special formula as numbers+text results
                    in error (#VALUE!) for all cells which should contain
                    1 or 0
           Product: Calc
           Version: 4.1.0
          Hardware: All
                OS: Linux64
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: editing
          Assignee: [email protected]
          Reporter: [email protected]

Copying and pasting formula (containing generated 0s and 1s) as numbers+text
results in error (#VALUE!) for all cells which should contain 1 or 0.

Case 1: New Calc file

0. Create new Calc file: 
1. create a series of 0s and 1s in column A (cells formatted as number)
2. create a formula =IF(A1;1;0) in column B1
3. fill down the formula in column B
4. copy and paste special (as numbers+text only) column B to column C
5. expected behaviour: the text is copied exactly (but no formulae are copied)
6. result: the formula =(IF(D1;1;0))/1 is copied*
*NB1 If Ax contains no text, then column Cx will generate "#DIV/0". When file
is saved and reopened these cells then generate #VALUE!, but still contain the
new formula.
*NB2 Every time cell is copied and pasted (as number and text only) another
"(... )/0" wrapper/formula encapsulation is added.

Case 2: Existing Calc file

0. Create new Calc file, save as .ODS, then reopen calc file.
1. create a series of 0s and 1s in column A (cells formatted as number)
2. create a formula =IF(A1;1;0) in column B1
3. fill down the formula in column B
4. copy and paste special (as numbers+text only) column B to column C
5. expected behaviour: the text is copied exactly (but no formulae are copied)
6. result: the value 0 is copied for all values 1, and the value #VALUE! is
copied for all values 0

Workaround: the only way to safely copy and paste numbers and text at present
is to copy and paste the cell content to text editor (eg nedit), and copy and
paste them back into the document.

-- 
You are receiving this mail because:
You are the assignee for the issue.
You are watching all issue changes.

Reply via email to