Bug 1436050

Summary: libreoffice does not set the right cursor position with gtk3 im module
Product: [Fedora] Fedora Reporter: Pant <pantelis.fedora>
Component: libreofficeAssignee: Caolan McNamara <caolanm>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 25CC: caolanm, dtardon, erack, mstahl, psatpute, sbergman, tfujiwar
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: libreoffice-5.2.6.2-5.fc25 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-11-17 08:31:39 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Screenshot of the problem. none

Description Pant 2017-03-27 02:10:41 UTC
Created attachment 1266523 [details]
Screenshot of the problem.

Description of problem:

Typing booster does not work when on Libreoffice. The problem is that suggested words appear in the same line with the typed text, hiding the typed text.

Version-Release number of selected component (if applicable):

ibus-1.5.14-5.fc25.x86_64. 
libreoffice-1:5.2.6.2-4.fc25.x86_64. 
libreoffice-writer-1:5.2.6.2-4.fc25.x86_64. 

How reproducible:

Every time.


Steps to Reproduce:

1.Set up language input to be <language>-typing-booster in settings. 
2.Start Libreoffice Writer. 
3.Type a word in the text area. 

Actual results:

Suggested words are showing on top of typed text. 

Expected results:

Suggested words should not be on top of typed text.

Additional info:

Ibus-typing-booster settings of English (US) Typing Booster language doesn't seem to have any impact on the location of the suggested words.

Comment 1 Caolan McNamara 2017-03-27 13:25:34 UTC
Works ok with the gtk2 backend but misplaced in the gtk3, though both use essentially the same code

Comment 2 Caolan McNamara 2017-05-29 12:14:06 UTC
*** Bug 1456350 has been marked as a duplicate of this bug. ***

Comment 3 fujiwara 2017-06-01 10:35:21 UTC
I debugged libreoffice-5.2.7.2-3.fc25.src.rpm .
If the build optimizations for the debugging are deleted, I don't see this problem.

--- libreoffice.spec.orig
+++ libreoffice.spec
@@ -1,3 +1,4 @@
+%global __os_install_post %{nil}
 # download path contains version without the last (fourth) digit
 %define libo_version 5.2.7
 # Should contain .alphaX / .betaX, if this is pre-release (actually
@@ -1115,6 +1116,10 @@ autoconf
 # TODO: enable coinmp?
 # avoid running autogen.sh on make
 touch autogen.lastrun
+#export CFLAGS="$CFLAGS -g -O0 -Wp,-D_FORTIFY_SOURCE=0"
+#export CXXFLAGS="$CXXFLAGS -g -O0 -Wp,-D_FORTIFY_SOURCE=0"
+export CFLAGS=' -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -g -O0 -Wp,-D_FORTIFY_SOURCE=0'
+export CXXFLAGS=' -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -g -O0 -Wp,-D_FORTIFY_SOURCE=0'
 %configure \
  %vendoroption \
  %{?with_lang} \
@@ -2271,9 +2276,9 @@ update-desktop-database %{_datadir}/appl
 %{libo_python_sitearch}/unohelper.py*
 %{libo_python_sitearch}/officehelper.py*
 %if 0%{libo_use_python3}
-%{libo_python_sitearch}/__pycache__/uno.cpython-*
-%{libo_python_sitearch}/__pycache__/unohelper.cpython-*
-%{libo_python_sitearch}/__pycache__/officehelper.cpython-*
+#%{libo_python_sitearch}/__pycache__/uno.cpython-*
+#%{libo_python_sitearch}/__pycache__/unohelper.cpython-*
+#%{libo_python_sitearch}/__pycache__/officehelper.cpython-*
 %endif
 %{baseinstdir}/share/registry/pyuno.xcd
 

I replaced the following *.so files from the original libreoffice-5.2.7.2-3.fc25 to check gtk_im_context_set_cursor_location() and dlopen()'s errors and refresh C++ binary compatibilities:
/usr/lib64/libreoffice/program/libdesktop_detectorlo.so
/usr/lib64/libreoffice/program/libeditenglo.so
/usr/lib64/libreoffice/program/libsofficeapp.so
/usr/lib64/libreoffice/program/libspllo.so
/usr/lib64/libreoffice/program/libsvtlo.so
/usr/lib64/libreoffice/program/libsvxlo.so
/usr/lib64/libreoffice/program/libswlo.so
/usr/lib64/libreoffice/program/libuno_sal.so.3
/usr/lib64/libreoffice/program/libvcllo.so
/usr/lib64/libreoffice/program/libvclplug_gtk3lo.so
/usr/lib64/libreoffice/program/libvclplug_gtklo.so
/usr/lib64/libreoffice/program/soffice.bin

This might be optimization flags issue.

Comment 5 fujiwara 2017-06-01 11:39:25 UTC
Sorry, the above comment was my mistake.
The latest libreoffice 5.2.7.2-3 fixes this problem.

(In reply to fujiwara from comment #3)
> I debugged libreoffice-5.2.7.2-3.fc25.src.rpm .
> If the build optimizations for the debugging are deleted, I don't see this
> problem.
>

Comment 6 Pravin Satpute 2017-06-02 10:03:43 UTC
That is great. Thanks fujiwara for the update.

Comment 7 Fedora End Of Life 2017-11-16 19:38:23 UTC
This message is a reminder that Fedora 25 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 25. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '25'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 25 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.