Bug 117713 - UnoControlDialog is displayed in the wrong size (GTK3)
Summary: UnoControlDialog is displayed in the wrong size (GTK3)
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
Version:
(earliest affected)
5.3 all versions
Hardware: All Linux (All)
: medium normal
Assignee: Caolán McNamara
URL:
Whiteboard: target:6.3.0 target:6.2.1
Keywords: bibisected, bisected, regression
Depends on:
Blocks: GTK3
  Show dependency treegraph
 
Reported: 2018-05-20 12:56 UTC by joesch04
Modified: 2019-02-05 09:33 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
File to reproduce the error (98.76 KB, application/vnd.oasis.opendocument.text)
2018-07-09 05:09 UTC, joesch04
Details

Note You need to log in before you can comment on or make changes to this bug.
Description joesch04 2018-05-20 12:56:54 UTC
Description:
If the height and width of a UnoControlDialog are too small, the dialog is displayed in a fixed, too large size. 

I could observe the following Bug for LO 6.0.3/6.0.4 under Ubuntu 18.04 (Ubuntu is installed in VMWare), but not under MS Windows


Example 1:
--------------------------------------------

The following works:

Sub fortschrittsanzeige()
	wv_fortschritt_model = CreateUnoService("com.sun.star.awt.UnoControlDialogModel")
	
	With wv_fortschritt_model
		.setPropertyValue("Width",  400)
		.setPropertyValue("Height", 400)
		.SetPropertyValue("Title","only testing")
	End With

	oWin2 = CreateUnoService("com.sun.star.awt.Toolkit")
	wv_fortschritt = CreateUnoService("com.sun.star.awt.UnoControlDialog")
	
	With wv_fortschritt
		.setModel(wv_fortschritt_model)
		.createPeer(oWin2, null)
		.setVisible(True)
	End With
	
	'keep dialog visible for testing:	
	Msgbox ""
	wv_fortschritt.setVisible(False)
End Sub


but now reduce the values for height and width and the dialog is displayed too large:

Sub fortschrittsanzeige()
	wv_fortschritt_model = CreateUnoService("com.sun.star.awt.UnoControlDialogModel")
	
	With wv_fortschritt_model
		.setPropertyValue("Width",  40)
		.setPropertyValue("Height", 20)
		.SetPropertyValue("Title","only testing")
	End With

	oWin2 = CreateUnoService("com.sun.star.awt.Toolkit")
	wv_fortschritt = CreateUnoService("com.sun.star.awt.UnoControlDialog")
	
	With wv_fortschritt
		.setModel(wv_fortschritt_model)
		.createPeer(oWin2, null)
		.setVisible(True)
	End With
	
	'keep dialog visible for testing:	
	Msgbox ""
	wv_fortschritt.setVisible(False)
End Sub


Example 2:
--------------------------------------------
-open the basic IDE 
-insert a basic dialog
-set in the properties of the basic dialog for the height 20 and for the width 40
-start the dialog

You can see that the dialog is displayed too large.


Steps to Reproduce:
-open the basic IDE 
-insert a basic dialog
-set in the properties of the basic dialog for the height 20 and for the width 40
-start the dialog


Actual Results:  
You can see that the dialog is displayed too large.

Expected Results:
Show the dialog in the correct size


Reproducible: Always


User Profile Reset: Yes



Additional Info:


User-Agent: Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0) like Gecko
Comment 1 Buovjaga 2018-06-15 18:48:03 UTC
Could not repro with example 1.
Example 2 is lacking exact steps, so Basic IDE non-experts will not be able to reproduce it (except by luck). Please give detailed steps.

Set to NEEDINFO.
Change back to UNCONFIRMED after you have provided the information.

Arch Linux 64-bit
Version: 6.2.0.0.alpha0+
Build ID: 0d2c5e0838906101e1fdea93b4a0c422690e331c
CPU threads: 8; OS: Linux 4.16; UI render: default; VCL: kde4; 
Locale: fi-FI (fi_FI.UTF-8); Calc: group threaded
Built on June 15th 2018
Comment 2 joesch04 2018-07-09 05:09:56 UTC
Created attachment 143391 [details]
File to reproduce the error

Error descriptions are not made for end-users, but for experts! I won't describe the process again, because who wants to be able to fix the bug is also able to understand my description.

I have attached a sample file that can be used to reproduce the error.
Comment 3 Buovjaga 2018-07-09 17:29:58 UTC
Thanks for the file. I reproduce it, but only using the GTK3 VCL backend.

Regarding the error descriptions, we have to think like we are talking to children, not experts. See https://wiki.documentfoundation.org/QA/BugReport#Good_Reports

Arch Linux 64-bit
Version: 6.2.0.0.alpha0+
Build ID: 2cff0e2ceb53b2986be8788c7505cabbd04d0288
CPU threads: 8; OS: Linux 4.17; UI render: default; VCL: gtk3; 
Locale: fi-FI (fi_FI.UTF-8); Calc: group threaded
Built on July 7th 2018
Comment 4 Xisco Faulí 2018-07-09 18:39:49 UTC
Regression introduced by:

https://cgit.freedesktop.org/libreoffice/core/commit/?id=7e2ef433d29fca84ed27a9203b5761dc8dbd8bf8

author	Caolán McNamara <caolanm@redhat.com>	2016-11-15 15:05:44 +0000
committer	Caolán McNamara <caolanm@redhat.com>	2016-11-15 15:08:26 +0000
commit 7e2ef433d29fca84ed27a9203b5761dc8dbd8bf8 (patch)
tree 5f2d01c7c2025f37b72b18ceecfcccfb9a756415
parent ec4e48c7504cd0d02338e0be8b48344a95f39b72 (diff)
Resolves: tdf#102957 revert SetMinOutputSizePixel workaround

Bisected with: bibisect-linux-64-5.3

Adding Cc: to Caolán McNamara
Comment 5 Caolán McNamara 2019-01-29 11:30:37 UTC
reverting the fix isn't the solution here seeing as that was a broken state.

I think in this situation SetMinClientSize isn't called for the dialog so there is no size-request set. Setting an initial minimal default size seems to do the right thing.
Comment 6 Commit Notification 2019-01-29 12:46:53 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/bdf40cca40ddbea8c5c903f2695d6f958c87bb3b%5E%21

tdf#117713 set a tiny default size-request for the fixed container

It will be available in 6.3.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.
Comment 7 Caolán McNamara 2019-01-29 12:49:33 UTC
fixed in master, will risk a backport to 6-2 (in gerrit)
Comment 8 Buovjaga 2019-01-29 14:49:29 UTC
Thanks, verified.

Arch Linux 64-bit
Version: 6.3.0.0.alpha0+
Build ID: 8b01361979a8e9c0f59716e2b3de65daad7c25a7
CPU threads: 8; OS: Linux 4.20; UI render: default; VCL: gtk3; 
Locale: fi-FI (fi_FI.UTF-8); UI-Language: en-US
Calc: threaded
Built on 29 January 2019
Comment 9 Commit Notification 2019-02-05 09:33:52 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-6-2":

https://git.libreoffice.org/core/+/089354cd5a85c458e55f63d398ff61f4925fe467%5E%21

tdf#117713 set a tiny default size-request for the fixed container

It will be available in 6.2.1.

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.