Bug 32059 - Commands merge with variables
Summary: Commands merge with variables
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Formula Editor (show other bugs)
Version:
(earliest affected)
3.3.0 Beta3
Hardware: x86 (IA32) Linux (All)
: medium normal
Assignee: Marcos Souza
URL:
Whiteboard: target:4.2.0
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-02 13:02 UTC by Rūdolfs
Modified: 2013-09-24 18:38 UTC (History)
3 users (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 Rūdolfs 2010-12-02 13:02:52 UTC
When there is no space between commands (like rightarrow) and other elements, like variables, they merge and break the formula.

How to reproduce:
1. type "a";
2. in formula elements window, select right arrow.

The result is "arightarrow" but it should have been "a rightarrow".

The software should check, if there is a space before inserted command. If there is no space, insert one.

Alternatively, command should be marked by some sort of marker, like in LaTeX it is "\", or in OpenOffice for symbols it is "%".
Comment 1 Jeffrey 2011-06-20 20:14:39 UTC
Reproduced on LibreOffice 3.4  340m1(Build:12) on OpenSuse. I agree with Rudolfs that a LaTex similar system would not be bad as it is not only popular but also proven to be very dependable.
Comment 2 Björn Michaelsen 2011-12-23 11:33:44 UTC
[This is an automated message.]
This bug was filed before the changes to Bugzilla on 2011-10-16. Thus it
started right out as NEW without ever being explicitly confirmed. The bug is
changed to state NEEDINFO for this reason. To move this bug from NEEDINFO back
to NEW please check if the bug still persists with the 3.5.0 beta1 or beta2 prereleases.
Details on how to test the 3.5.0 beta1 can be found at:
http://wiki.documentfoundation.org/QA/BugHunting_Session_3.5.0.-1

more detail on this bulk operation: http://nabble.documentfoundation.org/RFC-Operation-Spamzilla-tp3607474p3607474.html
Comment 3 Viktor Ostashevskyi 2012-05-31 05:21:50 UTC
Reproduced on LibreOffice 3.5.4.2 on Windows XP
Comment 4 Marcos Souza 2013-05-28 11:43:11 UTC
I sent a patch to gerrit about this bug:

https://gerrit.libreoffice.org/#/c/3983/

If anyone can validate this, it can be sent to stable :)
Comment 5 Commit Notification 2013-05-31 18:19:55 UTC
Marcos Paulo de Souza committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=467d5e0a2e074ff2afb4d1b1a37cff2094b0895b

Fix fdo#32059: Commands merge with variables



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 6 Marcos Souza 2013-05-31 18:43:18 UTC
Fixed now in master
Comment 7 Michael Duelli 2013-06-23 12:08:22 UTC
I tried with current master from git (Version: 4.2.0.0.alpha0+ Build ID: 3dac2c4b5d6aab37181cf6b113ec1a6732c2d2da) and cannot confirm this to work, so I reopened.

This is what I did:
1. I inserted a formula in writer
2. I typed "a" (that's all text in there)
3. I positioned the pointer just right to "a"
4. Selected "Others - Rightarrow"
5. The result is "arightarrow " (note the space at the end)

Interestingly, if positioning the pointer just left to "a" the result is "rightarrow a" (space in between).
Comment 8 Marcos Souza 2013-06-24 10:56:22 UTC
Hi Michael Duelli,

I can't reproduce this with head in ae57695241d41022f4559601addbedea36b88f37.

I did a git pull, make and make install.

Are you using Linux, or what OS?

Let's resolve this issue :)
Comment 9 Michael Duelli 2013-06-24 20:37:45 UTC
(In reply to comment #8)
> Are you using Linux, or what OS?

Yes, this is on Linux. How can I support you?
Comment 10 Rūdolfs 2013-06-25 09:42:49 UTC
This is still observable on with version 4.1.0.1 on fedora 19.
Comment 11 Marcos Souza 2013-06-25 10:46:25 UTC
Guys, so I don't know :)

Here, for me, it works nicely. I'm using master.

I did a mek, and a make dev-install, and it worked.

Michael Duelli, can you please compile again? It
Comment 12 Marcos Souza 2013-06-25 10:47:05 UTC
Just to certify if you have the right .so files about Math
Comment 13 Marcos Souza 2013-07-29 10:31:26 UTC
Rudolf, this still don't work for you?

Let's look at this, to kill this issue :)
Comment 14 Rūdolfs 2013-07-30 17:20:20 UTC
I tried it on LO version 4.1.0.3 (Build ID: 4.1.0.3-2.fc19 on Fedora) and the behaviour is still the same — the spacing is not automatically added.
Comment 15 Marcos Souza 2013-07-31 15:40:48 UTC
Hi Rūdolfs!

Yeah, I can reprocduce this using the new Elements Dock, but not the Elements dialog....

You can reproduce with both?

I'll try to fix this in Elements Dock
Comment 16 Rūdolfs 2013-07-31 15:52:47 UTC
Tried with elements dock. I have the same behaviour.
Comment 17 Rūdolfs 2013-07-31 16:15:21 UTC
What I meant was that the bug is there for both Elements Dock and Elements Dialog.
Comment 18 Marcos Souza 2013-07-31 16:17:56 UTC
Thanks...

Maybe I need to test a fresh machine, with a fresh intallation...

But, in Elements Dock, this issue is hapenning for me. I'll try to test better here.

Thanks for helping!
Comment 19 Michael Duelli 2013-07-31 23:10:43 UTC
Sorry for the delayed response, I was struggling with learning how to efficiently build libreoffice.

Thanks for pointing me on the two different ways to enter commands in starmath:
Your patch fixed insertion via Elements dialog, but not Elements dock - which I used.

I submitted a simple proposal to gerrit that also fixes insertion via Elements dock: https://gerrit.libreoffice.org/#/c/5225/

Please have a look at this.
Comment 20 Michael Duelli 2013-08-04 10:45:28 UTC
Thanks Marcos! I uploaded an extended patch to gerrit. Setting this to resolved, hoping it can be validated.
Comment 21 Commit Notification 2013-08-08 09:19:48 UTC
Michael Duelli committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=356b2f0edfd5a01ed05976c1bdb74948ff84b5fd

Extension to fix all cases of fdo#32059: Commands merge with variables



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 22 Marcos Souza 2013-08-13 13:51:59 UTC
Rūdolfs,

This issue is fixed now, or you still can reproduce this now?
Comment 23 Rūdolfs 2013-08-13 18:36:22 UTC
Hi,
the issue is fixed, however, the fix introduced a new subtle bug:
if I press key "A", then right arrow button, then key "B", formula now will write as “a rightarrowb” (before fix it was “arightarrow b”).

Although after pressing arrow button in element dialogue adds space at the end, the cursor is for some reason is place right after string “rightarrow”. Cursor behaviour before patch was correct.

I can not test if the same issue is with formula dock as well — after adding the arrow, I have to place the cursor explicitly in formula field.
Comment 24 Marcos Souza 2013-08-19 11:27:54 UTC
Rudolf,

thanks for testing. We'1l try to fix this soon.

Michael Duelli,
Rudolf can reproduce the error :)

Can you try to fix this issue? Maybe this can be easy to fix!

If I had time, I would take a look at this issue and about the focus after click in Elements Dock.

Thanks guys!
Comment 25 Michael Duelli 2013-08-21 16:38:34 UTC
I will have a look at it, as I also want to find out about the problem with getting focus in edit window after command insertion that already existed before my patch.
Comment 26 Marcos Souza 2013-08-29 22:12:00 UTC
Hi Michael, Rudolf

I sent an commit trying to solve this issue:
https://gerrit.libreoffice.org/#/c/5688/

Can you please test?

After this we need to look at the grab focus in the Elements Dock!

Thanks guys!
Comment 27 Marcos Souza 2013-08-30 20:12:17 UTC
Hi Rūdolfs,

A patch was pushed to master.

Can you please test in daily-build?

Hi Michael Duelli,
This makes sense to you http://cgit.freedesktop.org/libreoffice/core/commit/?id=6c5ee38b09fd59d415850ad7d5e85ee791b18b91 ?

If you want to put some comments, please tell me :)

Let's hope this is fixed now!
Comment 28 Commit Notification 2013-08-30 20:16:19 UTC
Marcos Paulo de Souza committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=6c5ee38b09fd59d415850ad7d5e85ee791b18b91

fdo#32059: Fix this once and for all



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 29 Rūdolfs 2013-09-02 19:27:44 UTC
I tested with version
http://dev-builds.libreoffice.org/daily/master/Linux-x86-64@8-SLED11/2013-08-30_00.08.45/

and it still displays buggy behavour.

Were the changes included in this build or should I wait bit longer for the next build?
Comment 30 Marcos Souza 2013-09-02 19:31:23 UTC
Hi Rudolf,

Maybe this patch was not included in the dayle build. Can you please test the next daily build? Because in the message after the patch is application says about 24-48 hours till the patch can be available in the daily builds.

Thanks since now for testing!!
Comment 31 Marcos Souza 2013-09-24 11:47:36 UTC
Hi Rudolf,

can I close this issue? I beleive this is OK now :)
Comment 32 Rūdolfs 2013-09-24 18:36:03 UTC
> can I close this issue?
I guess yes. I tested it on windows daily build, since rpms are still not available. On windows it works as expected.
Comment 33 Marcos Souza 2013-09-24 18:38:00 UTC
Hi Rudolf, thanks a lot for you patience about testing this fix :)

So closing as fixed!