Bug 93998 - Image background missing on dialog
Summary: Image background missing on dialog
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
Version:
(earliest affected)
5.0.1.2 release
Hardware: All All
: medium normal
Assignee: Miklos Vajna
URL:
Whiteboard: target:6.4.0 target:6.3.2
Keywords: bibisected, bisected, regression
Depends on:
Blocks:
 
Reported: 2015-09-07 17:40 UTC by Gustavo Diaz
Modified: 2019-09-05 09:05 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Error en imagen de fondo de Dialog (289.14 KB, application/vnd.oasis.opendocument.spreadsheet)
2015-09-07 17:40 UTC, Gustavo Diaz
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gustavo Diaz 2015-09-07 17:40:08 UTC
Created attachment 118505 [details]
Error en imagen de fondo de Dialog

Este Codigo lo uso para colocar una imagen de fondo en un dialogo. Para no depender de una carpeta con imagenes.

Hasta la version 4.4 tanto sea en windows como en linux el codigo funciona, pero con desde la version 5 no.

Quiero saber si es un error o a partir de esta version hay otra forma de realizar lo mismo.

REM  *****  BASIC  *****

Private Dlg As object


sub main
   Dim oPaginaDibujo As Object
   

   DialogLibraries.LoadLibrary("Standard")
   Dlg = CreateUnoDialog(DialogLibraries.Standard.Dialog1)
   
   oPaginaDibujo = ThisComponent.getCurrentController.getActiveSheet.getDrawPage()
   
   i = 0
   do
     oForma = oPaginaDibujo.getByIndex(i)
     If oForma.Name = "Fondo" Then
      exit do
     End if
     i = i + 1
  loop While i < oPaginaDibujo.getCount()

   oDlgModele = Dlg.Model

   with oDlgModele
        .PositionX = 100
        .PositionY = 100
        .ImageURL = oForma.GraphicURL
        .Width = 190
        .Height = 145
        .Title = "Graficos"
   End with
   
   oDlgControle = createUnoService( "com.sun.star.awt.UnoControlDialog" )
   oDlgControle.setModel( oDlgModele )
   dlg.Execute()
end sub

sub Salir_
 dlg.endExecute()
end sub

A continuación adjunto el archivo de ejemplo con las imagenes de las distintas versiones.

Desde ya muchas gracias, y los felicito por la calidad y el nivel de la suite sigan asi que aunque sea un detalle estoy mas que conforme.
Comment 1 Jan Holesovsky 2015-09-15 08:10:41 UTC
Changing the product to LibreOffice, this is not related to LibreOffice Online.

Gustavo: Thank you for the report; but it would help a lot if you provided an English translation - can you do that, please?
Comment 2 raal 2015-09-15 11:51:14 UTC
I can confirm with LO  5.0.1.2, win7

Works correct with Version 4.0.0.3 (Build ID: 7545bee9c2a0782548772a21bc84a9dcc583b89), regression

Steps:
 - open attached file, enable macro
 - click button "Abrir Dialogo"

Actual result:
background of the dialog is without picture

Expected results:
background of the dialog is with picture

See printscreens in attachment.
Comment 3 raal 2015-10-21 10:23:25 UTC
This seems to have begun at the below commit.
Adding Cc: to tomaz.vajngerl@collabora.co.uk ; Could you possibly take a look at this one? Thanks
 7017ed3775ee1db2457c6e9c587a57473b00a7ae is the first bad commit
commit 7017ed3775ee1db2457c6e9c587a57473b00a7ae
Author: Norbert Thiebaud <nthiebaud@gmail.com>
Date:   Thu Jul 9 22:38:58 2015 -0700

    source 95ccc26ba71259be29fde8ba6b6f52ffbe5bd3c7

    source 95ccc26ba71259be29fde8ba6b6f52ffbe5bd3c7

	author	Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>	2015-05-22 09:07:45 (GMT)
committer	Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>	2015-05-23 09:55:39 (GMT)
commit 95ccc26ba71259be29fde8ba6b6f52ffbe5bd3c7 (patch)
call ApplySettings sooner when painting
Comment 4 Robinson Tryon (qubit) 2015-12-13 11:13:09 UTC Comment hidden (obsolete)
Comment 5 ThierryT 2016-07-31 09:29:30 UTC
Still available with this version :

Version: 5.2.0.3 (x64)
Build ID: 7dbd85f5a18cfeaf6801c594fc43a5edadc2df0c
Threads CPU : 4; Version de l'OS :Windows 6.29; UI Render : par défaut; 
Locale : fr-FR (fr_FR)
Comment 6 Xisco Faulí 2016-09-26 15:09:40 UTC
Adding Cc: to Tomaž Vajngerl
Comment 7 Xisco Faulí 2017-09-29 08:49:58 UTC Comment hidden (obsolete)
Comment 8 Miklos Vajna 2019-08-26 14:40:38 UTC
There are two problems here: the earlier problem is in the description, and as such, this bug would be a duplicate of bug 92079, I think.

The other problem is that I think the part of the macro that assigns a graphic shape to the background of a dialog is fair enough, but it was broken with core.git commit fb29e6eeeaad5255bb924ff59162a83ed80bfb0a (svx: removing GraphicURL and OWN_ATTR_GRAFURL, fix writerfilter, 2018-03-08).

I'll look at that second problem.
Comment 9 Commit Notification 2019-08-26 17:22:29 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":

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

tdf#93998 toolkit: restore support for setting dialog background from shape

It will be available in 6.4.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 10 Xisco Faulí 2019-09-02 07:28:51 UTC
Verified in

Version: 6.4.0.0.alpha0+
Build ID: 41cd3e8e817c8c33a13608e62eeb06ce2c6977e4
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); UI-Language: en-US
Calc: threaded

@Miklos, thanks for fixing this issue!
Comment 11 Commit Notification 2019-09-05 09:05:13 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "libreoffice-6-3":

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

tdf#93998 toolkit: restore support for setting dialog background from shape

It will be available in 6.3.2.

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.