Bug 156905 - Copy and paste a formula, now paste just the value
Summary: Copy and paste a formula, now paste just the value
Status: RESOLVED DUPLICATE of bug 157132
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.6.0.3 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:24.2.0
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Writer-Tables-Formulas
  Show dependency treegraph
 
Reported: 2023-08-25 01:37 UTC by Óvári
Modified: 2023-10-31 07:44 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Table with formulae in first and last columns not working (30.11 KB, application/vnd.oasis.opendocument.text)
2023-08-25 01:38 UTC, Óvári
Details
original file from OP saved in 7.5.5.2 (30.37 KB, application/vnd.oasis.opendocument.text)
2023-10-07 20:02 UTC, Kira Tubo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Óvári 2023-08-25 01:37:10 UTC
Description:
LibreOffice 7.5: correct copy and paste of formula
LibreOffice 7.6: (bug/regression) incorrect copy and paste of value

Steps to Reproduce:
LibreOffice 7.5: correct copy and paste of formula
LibreOffice 7.6: (bug) incorrect copy and paste of value

Table with first column and last column with formulae.

First column formula, which has the value ‘2’                                        =<A3>+1
Last column formula, which has the value ‘2’ in the first column           =<F3>+<E3>

1. Update LibreOffice to version 7.6.0.3
2. Select in the first column the value which shows ‘2’, so it will look like:
`Image in attached file`
3. Copy that cell (Ctrl+C)
4. Highlight some cells, say ‘4’ to ‘9’
`Image in attached file`
5. Paste (Ctrl+V)
6. Now the cell contain ‘2’, not the formula
`Image in attached file`
7. Seems like there are more bugs as the last column (pg) does not update when penultimate column (pp.) is changed.

Actual Results:
Paste value

Expected Results:
Paste formula


Reproducible: Always


User Profile Reset: No

Additional Info:
Version: 7.6.0.3 (X86_64) / LibreOffice Community
Build ID: 69edd8b8ebc41d00b4de3915dc82f8f0fc3b6265
CPU threads: 12; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Flatpak
Calc: threaded
Comment 1 Óvári 2023-08-25 01:38:43 UTC
Created attachment 189140 [details]
Table with formulae in first and last columns not working
Comment 2 m_a_riosv 2023-08-25 10:21:35 UTC
If I copy only the value by select it, the value is pasted, if I copy the cell, the formula is pasted. That looks the right behavior for me.

Version: 7.6.0.3 (X86_64) / LibreOffice Community
Build ID: 69edd8b8ebc41d00b4de3915dc82f8f0fc3b6265
CPU threads: 16; OS: Windows 10.0 Build 22621; UI render: default; VCL: win
Locale: es-ES (es_ES); UI: en-US
Calc: CL threaded
Comment 3 Óvári 2023-08-25 10:28:05 UTC
Thank you for your feedback as do not have Windows to see what the behavior is there.

The behavior seen on Linux Mint is:
For LO7.5, if I copy the cell, the formula is pasted.
For LO7.6, if I copy the cell, the value is pasted.

Maybe this is a GNU/Linux only bug?

Thank you
Comment 4 Ezinne 2023-08-29 12:37:02 UTC
Not reproducible on:

Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: e7496f41562b75ea9732ca48f9aa0c07b69e424f
CPU threads: 4; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-GB (en_GB.UTF-8); UI: en-US
Calc: threaded
Comment 5 Fran 2023-08-30 00:37:53 UTC
(In reply to Óvári from comment #3)
> Thank you for your feedback as do not have Windows to see what the behavior
> is there.
> 
> The behavior seen on Linux Mint is:
> For LO7.5, if I copy the cell, the formula is pasted.
> For LO7.6, if I copy the cell, the value is pasted.
> 
> Maybe this is a GNU/Linux only bug?
> 
> Thank you

I experience the same problem described in this bug in macOS.

In previous versions, when I pasted a formula it was updated with references to cells in the row where the formula was pasted, not the original raw formula.

  i.e. in row 1, cell B the formula '=<A1>*0.8' was converted to '=<A2>*0.8' when the cell was pasted in row 2, cell B. This is actually the behavior expected if you were using Calc instead of a Table in Writer.

Since I upgraded to 7.6.0.3, the current behavior is to paste the formula 'as is', so I get '=<A1>*0.8' when the cell is pasted elsewhere. This breaks my expectation to work with tables with formulas as described in the previous example.

Reproducing the steps mentioned in the Description with the attached document, what I observe is not a "Paste value" result, but a "Paste literal formula", which results in the cell containing the '2', as it was the original value given by the copied formula. It seems the formula is being pasted, but the *raw* formula referreing to the original cells.

I hope this helps to understand what is going on here.

Thank you
Comment 6 Óvári 2023-08-30 11:20:14 UTC
(In reply to Fran from comment #5)
> I experience the same problem described in this bug in macOS.

Thank you, have changed Hardware to ALL.

Can you please update the status from UNCONFIRMED to NEW? Thank you once again.
Comment 7 BogdanB 2023-09-23 04:23:43 UTC
Working well in
Version: 7.5.6.2 (X86_64) / LibreOffice Community
Build ID: f654817fb68d6d4600d7d2f6b647e47729f55f15
CPU threads: 4; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: ro-RO (ro_RO.UTF-8); UI: en-US
Calc: threaded

Bad in
Version: 7.6.1.2 (X86_64) / LibreOffice Community
Build ID: f5defcebd022c5bc36bbb79be232cb6926d8f674
CPU threads: 4; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: ro-RO (ro_RO.UTF-8); UI: en-US
Calc: threaded

Bad in 
Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: db1ba9c56dadf4be5642a6f3de36c04208d8d9a7
CPU threads: 4; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: ro-RO (ro_RO.UTF-8); UI: en-US
Calc: threaded

The steps in order to reproduce the bug are more precise in the document, containing also images.
Comment 8 BogdanB 2023-09-27 19:07:20 UTC
When I try to bibisect this I get this error:
./instdir/program/soffice
terminate called after throwing an instance of 'com::sun::star::uno::RuntimeException'


Fatal exception: Signal 6
Stack:
/home/bogdan/Documente/Bibisect7.6/linux-64-7.6/instdir/program/libuno_sal.so.3(+0x14fc8)[0x7f2742814fc8]
/home/bogdan/Documente/Bibisect7.6/linux-64-7.6/instdir/program/libuno_sal.so.3(+0x40146)[0x7f2742840146]
/lib/x86_64-linux-gnu/libc.so.6(+0x42520)[0x7f274221a520]
/lib/x86_64-linux-gnu/libc.so.6(pthread_kill+0x12c)[0x7f274226ea7c]
/lib/x86_64-linux-gnu/libc.so.6(raise+0x16)[0x7f274221a476]
/lib/x86_64-linux-gnu/libc.so.6(abort+0xd3)[0x7f27422007f3]
/lib/x86_64-linux-gnu/libstdc++.so.6(+0xa2b9e)[0x7f274204eb9e]
/lib/x86_64-linux-gnu/libstdc++.so.6(+0xae20c)[0x7f274205a20c]
/lib/x86_64-linux-gnu/libstdc++.so.6(+0xad1e9)[0x7f27420591e9]
/lib/x86_64-linux-gnu/libstdc++.so.6(__gxx_personality_v0+0x99)[0x7f2742059959]
/lib/x86_64-linux-gnu/libgcc_s.so.1(+0x16884)[0x7f2742a90884]
/lib/x86_64-linux-gnu/libgcc_s.so.1(_Unwind_Resume+0x12d)[0x7f2742a912dd]
/home/bogdan/Documente/Bibisect7.6/linux-64-7.6/instdir/program/libvcllo.so(+0x83eb5e)[0x7f2739e3eb5e]
/home/bogdan/Documente/Bibisect7.6/linux-64-7.6/instdir/program/libuno_sal.so.3(+0x18002)[0x7f2742818002]
/home/bogdan/Documente/Bibisect7.6/linux-64-7.6/instdir/program/libuno_sal.so.3(+0x4000f)[0x7f274284000f]
/lib/x86_64-linux-gnu/libc.so.6(+0x42520)[0x7f274221a520]
/home/bogdan/Documente/Bibisect7.6/linux-64-7.6/instdir/program/libdocmodello.so(_ZN5model5ThemeC2ERKS0_+0x34)[0x7f27352091b4]
/home/bogdan/Documente/Bibisect7.6/linux-64-7.6/instdir/program/libxolo.so(+0x2c3c5d)[0x7f2735cc3c5d]
/home/bogdan/Documente/Bibisect7.6/linux-64-7.6/instdir/program/libxolo.so(+0x2c3f79)[0x7f2735cc3f79]
/home/bogdan/Documente/Bibisect7.6/linux-64-7.6/instdir/program/libxolo.so(_ZN11SvXMLImport14endFastElementEi+0x82)[0x7f2735b9bc62]
/home/bogdan/Documente/Bibisect7.6/linux-64-7.6/instdir/program/../program/libexpwraplo.so(+0x20846)[0x7f26fc620846]
/home/bogdan/Documente/Bibisect7.6/linux-64-7.6/instdir/program/../program/libexpwraplo.so(+0x25843)[0x7f26fc625843]
/home/bogdan/Documente/Bibisect7.6/linux-64-7.6/instdir/program/libxolo.so(_ZN11SvXMLImport11parseStreamERKN3com3sun4star3xml3sax11InputSourceE+0x12d)[0x7f2735b9b7cd]
/home/bogdan/Documente/Bibisect7.6/linux-64-7.6/instdir/program/../program/libswlo.so(+0xb48217)[0x7f26ea548217]
/home/bogdan/Documente/Bibisect7.6/linux-64-7.6/instdir/program/../program/libswlo.so(+0xb4abae)[0x7f26ea54abae]
/home/bogdan/Documente/Bibisect7.6/linux-64-7.6/instdir/program/../program/libswlo.so(_ZN8SwReader4ReadERK6Reader+0x57f)[0x7f26ea49084f]
/home/bogdan/Documente/Bibisect7.6/linux-64-7.6/instdir/program/../program/libswlo.so(+0xbb3541)[0x7f26ea5b3541]
/home/bogdan/Documente/Bibisect7.6/linux-64-7.6/instdir/program/libsfxlo.so(_ZN14SfxObjectShell13LoadOwnFormatER9SfxMedium+0xd8)[0x7f273dd69838]
/home/bogdan/Documente/Bibisect7.6/linux-64-7.6/instdir/program/libsfxlo.so(_ZN14SfxObjectShell6DoLoadEP9SfxMedium+0x8c4)[0x7f273dd72654]
/home/bogdan/Documente/Bibisect7.6/linux-64-7.6/instdir/program/libsfxlo.so(_ZN12SfxBaseModel4loadERKN3com3sun4star3uno8SequenceINS2_5beans13PropertyValueEEE+0x1dd)[0x7f273ddafa9d]
/home/bogdan/Documente/Bibisect7.6/linux-64-7.6/instdir/program/libsfxlo.so(+0x4545c7)[0x7f273de545c7]
/home/bogdan/Documente/Bibisect7.6/linux-64-7.6/instdir/program/libfwklo.so(+0x1cf93a)[0x7f273f3cf93a]
/home/bogdan/Documente/Bibisect7.6/linux-64-7.6/instdir/program/libfwklo.so(+0x1d0aa6)[0x7f273f3d0aa6]
/home/bogdan/Documente/Bibisect7.6/linux-64-7.6/instdir/program/libfwklo.so(+0x1d1356)[0x7f273f3d1356]
/home/bogdan/Documente/Bibisect7.6/linux-64-7.6/instdir/program/libfwklo.so(+0xf3bda)[0x7f273f2f3bda]
/home/bogdan/Documente/Bibisect7.6/linux-64-7.6/instdir/program/libfwklo.so(+0xf4898)[0x7f273f2f4898]
/home/bogdan/Documente/Bibisect7.6/linux-64-7.6/instdir/program/libcomphelper.so(_ZN10comphelper19SynchronousDispatch8dispatchERKN3com3sun4star3uno9ReferenceINS4_10XInterfaceEEERKN3rtl8OUStringESD_RKNS4_8SequenceINS3_5beans13PropertyValueEEE+0x3cf)[0x7f2740b28f4f]
/home/bogdan/Documente/Bibisect7.6/linux-64-7.6/instdir/program/libsfxlo.so(+0x13d1f3)[0x7f273db3d1f3]
/home/bogdan/Documente/Bibisect7.6/linux-64-7.6/instdir/program/libsfxlo.so(+0x1d146f)[0x7f273dbd146f]
/home/bogdan/Documente/Bibisect7.6/linux-64-7.6/instdir/program/libsfxlo.so(_ZN13SfxDispatcher8Execute_ER8SfxShellRK7SfxSlotR10SfxRequest11SfxCallMode+0xe6)[0x7f273dbd53c6]
/home/bogdan/Documente/Bibisect7.6/linux-64-7.6/instdir/program/libsfxlo.so(_ZN13SfxDispatcher7ExecuteEt11SfxCallModeRK10SfxItemSet+0xdf)[0x7f273dbd823f]
/home/bogdan/Documente/Bibisect7.6/linux-64-7.6/instdir/program/libsfxlo.so(+0x13cd6b)[0x7f273db3cd6b]
/home/bogdan/Documente/Bibisect7.6/linux-64-7.6/instdir/program/libsfxlo.so(+0x1d146f)[0x7f273dbd146f]
/home/bogdan/Documente/Bibisect7.6/linux-64-7.6/instdir/program/libsfxlo.so(_ZN13SfxDispatcher14PostMsgHandlerESt10unique_ptrI10SfxRequestSt14default_deleteIS1_EE+0x13c)[0x7f273dbd778c]
/home/bogdan/Documente/Bibisect7.6/linux-64-7.6/instdir/program/libsfxlo.so(+0x1e0112)[0x7f273dbe0112]
/home/bogdan/Documente/Bibisect7.6/linux-64-7.6/instdir/program/libsfxlo.so(+0x3ec6ad)[0x7f273ddec6ad]
/home/bogdan/Documente/Bibisect7.6/linux-64-7.6/instdir/program/libvcllo.so(+0x536b3f)[0x7f2739b36b3f]
/home/bogdan/Documente/Bibisect7.6/linux-64-7.6/instdir/program/libvcllo.so(_ZN16SalUserEventList18DispatchUserEventsEb+0x17d)[0x7f2739df3f9d]
/home/bogdan/Documente/Bibisect7.6/linux-64-7.6/instdir/program/libvclplug_gtk3lo.so(+0xe7ae9)[0x7f272d2e7ae9]
/lib/x86_64-linux-gnu/libglib-2.0.so.0(g_main_context_dispatch+0x174)[0x7f274091bc44]
/lib/x86_64-linux-gnu/libglib-2.0.so.0(+0xab258)[0x7f2740971258]
/lib/x86_64-linux-gnu/libglib-2.0.so.0(g_main_context_iteration+0x33)[0x7f27409193e3]
/home/bogdan/Documente/Bibisect7.6/linux-64-7.6/instdir/program/libvclplug_gtk3lo.so(+0xe8a5c)[0x7f272d2e8a5c]
/home/bogdan/Documente/Bibisect7.6/linux-64-7.6/instdir/program/libvcllo.so(+0x835a72)[0x7f2739e35a72]
/home/bogdan/Documente/Bibisect7.6/linux-64-7.6/instdir/program/libvcllo.so(_ZN11Application7ExecuteEv+0x75)[0x7f2739e38165]
/home/bogdan/Documente/Bibisect7.6/linux-64-7.6/instdir/program/libsofficeapp.so(+0x30c36)[0x7f2742430c36]
/home/bogdan/Documente/Bibisect7.6/linux-64-7.6/instdir/program/libvcllo.so(_Z10ImplSVMainv+0x46)[0x7f2739e40446]
/home/bogdan/Documente/Bibisect7.6/linux-64-7.6/instdir/program/libsofficeapp.so(soffice_main+0x11d)[0x7f274245cfad]
/home/bogdan/Documente/Bibisect7.6/linux-64-7.6/instdir/program/soffice.bin[0x40066b]
/lib/x86_64-linux-gnu/libc.so.6(+0x29d90)[0x7f2742201d90]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x80)[0x7f2742201e40]
/home/bogdan/Documente/Bibisect7.6/linux-64-7.6/instdir/program/soffice.bin[0x40069f]
Comment 9 Kira Tubo 2023-10-07 20:02:07 UTC
Created attachment 190085 [details]
original file from OP saved in 7.5.5.2

It seems that there are issues bibisecting win64-7.6 repository with files saved using more recent builds. I resaved the original file using 7.5.5.2 (see attached) and was able to successfully bibisect to the commit below. That being said, it looks like this issue is the same as Bug 157132, and since Bjoern was already contacted about it there, I'll go ahead and close this bug as a duplicate. 

----------------------

commit 7aa64323a7955693095c217d9a7d3bdaba3efc50
Author: Norbert Thiebaud <nthiebaud@gmail.com>
Date:   Tue Mar 14 05:33:59 2023 -0700

    source 8a3dc12a13a3b9e99dbd5000ca6a1d541cf472f7

------------------

commit 8a3dc12a13a3b9e99dbd5000ca6a1d541cf472f7	[log]
author	Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>	Sat Mar 04 02:18:58 2023 +0100
committer	Michael Stahl <michael.stahl@allotropia.de>	Tue Mar 14 10:25:01 2023 +0000
tree 54604d51a119eef82d8b9e059e1da7dac60f12e1
parent a224948ef44eadfb32aee002d5f0e9f10c9e47de [diff]

-----------------
Comment 10 Kira Tubo 2023-10-07 20:03:04 UTC

*** This bug has been marked as a duplicate of bug 157132 ***
Comment 11 BogdanB 2023-10-07 20:51:53 UTC
(In reply to Kira Tubo from comment #9)
> Created attachment 190085 [details]
> original file from OP saved in 7.5.5.2
> 
> It seems that there are issues bibisecting win64-7.6 repository with files
> saved using more recent builds. 

Indeed, I tried to bibisect with a new empty file and were problem also.
Comment 12 Xisco Faulí 2023-10-11 10:49:02 UTC
(In reply to BogdanB from comment #8)
> When I try to bibisect this I get this error:
> ./instdir/program/soffice
> terminate called after throwing an instance of
> 'com::sun::star::uno::RuntimeException'

This problem was introduced by https://cgit.freedesktop.org/libreoffice/core/commit/?id=d8de2dc3c55a9013a71167c8058a333e7221a6a0 and later fixed by https://cgit.freedesktop.org/libreoffice/core/commit/?id=4f347ebabad6355014889f0a81b107dc774590fe
Comment 13 Xisco Faulí 2023-10-27 12:51:07 UTC
(In reply to Xisco Faulí from comment #12)
> (In reply to BogdanB from comment #8)
> > When I try to bibisect this I get this error:
> > ./instdir/program/soffice
> > terminate called after throwing an instance of
> > 'com::sun::star::uno::RuntimeException'
> 
> This problem was introduced by
> https://cgit.freedesktop.org/libreoffice/core/commit/
> ?id=d8de2dc3c55a9013a71167c8058a333e7221a6a0 and later fixed by
> https://cgit.freedesktop.org/libreoffice/core/commit/
> ?id=4f347ebabad6355014889f0a81b107dc774590fe

For the record, after 4f347ebabad6355014889f0a81b107dc774590fe, the same document still crashes at export time. it was fixed with 9747d9a6ea954dfca4152d36fdb28a8b77fec84b
Comment 14 Commit Notification 2023-10-31 07:44:38 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/33ca16e94dcd9b74f39937bafaa76c8ca9189877

related: tdf#156905: sw_odfexport2: Add unittest

It will be available in 24.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.