You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openoffice.apache.org by bu...@apache.org on 2017/08/17 08:32:27 UTC

[Issue 127512] New: textable: cell value is set to "0" on save if cell format does not match written cell value

https://bz.apache.org/ooo/show_bug.cgi?id=127512

          Issue ID: 127512
        Issue Type: DEFECT
           Summary: textable: cell value is set to "0" on save if cell
                    format does not match written cell value
           Product: Writer
           Version: 4.1.2
          Hardware: All
                OS: Windows, all
            Status: CONFIRMED
          Severity: Normal
          Priority: P5 (lowest)
         Component: save-export
          Assignee: issues@openoffice.apache.org
          Reporter: oliver.brinzing@gmx.de
  Target Milestone: ---

Created attachment 86205
  --> https://bz.apache.org/ooo/attachment.cgi?id=86205&action=edit
writer_table_cell_format

steps to reproduce:

- open attached writer document
- press button
- cells C1,C2,C3 are filled with setString()
- save and reload
- values in C2,C3 are set to "0"/ "1899-12-30"

<table:table-cell table:style-name="Tabelle1.C2" 
                  office:value-type="float" 
                  office:value="0">
   <text:p text:style-name="P2">123,45</text:p>
</table:table-cell>

did not happen in aoo 401:

<table:table-cell table:style-name="Tabelle1.C2" office:value-type="string">
  <text:p text:style-name="P2">123,45</text:p>
</table:table-cell>

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

[Issue 127512] textable: cell value is set to "0" on save if cell format does not match written cell value

Posted by bu...@apache.org.
https://bz.apache.org/ooo/show_bug.cgi?id=127512

--- Comment #3 from oooforum (fr) <oo...@free.fr> ---
(In reply to Oliver Brinzing from comment #2)
> sure, but if a user inputs a string value into cell c2/c3, 
> the cell format will be (re)set to @ automatically, and the 
> value will not get lost during save/reload.
That's happen with UI but not through API

In Tools > Options > Writer > Table, we found:
Input in tables 
 [x] Number format recognition
So, a macro must take care of this parameter.

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

[Issue 127512] textable: cell value is set to "0" on save if cell format does not match written cell value

Posted by bu...@apache.org.
https://bz.apache.org/ooo/show_bug.cgi?id=127512

Oliver Brinzing <ol...@gmx.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |oliver.brinzing@gmx.de

--- Comment #2 from Oliver Brinzing <ol...@gmx.de> ---
> For me, input a number or a date must be set with Value property.

sure, but if a user inputs a string value into cell c2/c3, 
the cell format will be (re)set to @ automatically, and the 
value will not get lost during save/reload.

so i would expect setString() will either throw an exception in 
that case, or behave as described above.

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

[Issue 127512] textable: cell value is set to "0" on save if cell format does not match written cell value

Posted by bu...@apache.org.
https://bz.apache.org/ooo/show_bug.cgi?id=127512

oooforum (fr) <oo...@free.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |oooforum@free.fr

--- Comment #1 from oooforum (fr) <oo...@free.fr> ---
For me, input a number or a date must be set with Value property.
This code works as expected:
 oCell = oTable.getCellByName("C1")
 oCell.setString("Hello")
 oCell = oTable.getCellByName("C2")
 oCell.setValue("123.45")
 oCell = oTable.getCellByName("C3")
 oCell.setValue(dateValue("17/08/2017"))

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