Bug 73140 - Macro not executing
Summary: Macro not executing
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
Version:
(earliest affected)
4.1.3.2 release
Hardware: Other All
: medium major
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2013-12-30 09:31 UTC by Marco Masè Dari
Modified: 2016-04-24 17:02 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Compose letters for my study (90.41 KB, application/zip)
2013-12-30 09:31 UTC, Marco Masè Dari
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marco Masè Dari 2013-12-30 09:31:51 UTC
Created attachment 91323 [details]
Compose letters for my study

The macro I send works fine in LIBO 4.0.5.2 and do not work in LIBO 4.1.4.2.
All files must be in the same directory.
It hungs at line 40 of Avvia Dialog1.
Why? The variabile in LIBO 4.0.5.2 is defined and in LIBO 4.1.4.2 is nor defined.
It seems abnormal.
Cordial greetings to you.
Marco
Comment 1 Julien Nabet 2013-12-30 19:54:40 UTC
Ok I can reproduce this with 4.1.3.2 Debian package + 4.2 sources updated some days ago. (I must change "\" by "/" of course since I'm on Linux)
Indeed fogli is NULL, so the line with quanti can't work.
However, I don't reproduce this with master sources (future 4.3.0) updated today.

It can't be a blocker since it's not a crash or a very basic feature.

Stephan/Noel: Basic/Uno related, one for you?
Comment 2 Stephan Bergmann 2014-01-06 12:02:14 UTC
No idea what to test there.  On Linux, unzipping the attached zip into a fresh directory, loading Lettere.ott into soffice and saving as bad.odt into the same directory, then fixing the AvviaDialog1 Basic code contained in bad.odt as follows:

* "\" to "/" in Lines 30 and 33

* "file:///" to "file://" in Line 38

Then clicking the "Indirizzari" toolbar button in bad.odt opens a dialog, and clicking "Finito" in that dialog closes it again.  Tested it on various LO 4.0, 4.1, 4.2, and master towards 4.3 versions, and it worked the same in all cases.
Comment 3 Julien Nabet 2014-01-22 20:52:22 UTC
Thank you Stephan for your feedback.

Marco: following Stephan's comment, could you give a new try and keep us informed?
Comment 4 Marco Masè Dari 2014-01-26 10:03:26 UTC
Il 22/01/2014 21:52, bugzilla-daemon@freedesktop.org ha scritto:
> Julien Nabet <mailto:serval2412@yahoo.fr> changed bug 73140 
> <https://bugs.freedesktop.org/show_bug.cgi?id=73140>
> What 	Removed 	Added
> Status 	NEW 	NEEDINFO
>
> *Comment # 3 <https://bugs.freedesktop.org/show_bug.cgi?id=73140#c3> 
> on bug 73140 <https://bugs.freedesktop.org/show_bug.cgi?id=73140> from 
> Julien Nabet <mailto:serval2412@yahoo.fr> *
> Thank you Stephan for your feedback.
>
> Marco: following Stephan's comment, could you give a new try and keep us
> informed?
> ------------------------------------------------------------------------
> You are receiving this mail because:
>
>   * You reported the bug.
>
OK it seems to work:
BEFORE
*************
Sub LeggiIndirizzari
Dim aMediaDesc(0) as New com.sun.star.beans.PropertyValue
  aMediaDesc(0).Name  = "Hidden" 'carica l'elenco senza mostrarlo
  aMediaDesc(0).Value = TRUE
     percorso = thisComponent.StringValue 'individua il percorso 
completo del modello con

caratteri spuri
     percorso = ConvertFromUrl(percorso) 'lo converte in forma leggibile
     dove = 1
     inizio = InStr(dove, percorso, "\")
do while inizio < Len(percorso)-4
     dove = inizio+1
     inizio = InStr(dove, percorso, "\")'preleva l'ultima parte della 
stringa
loop
     modello = mid(percorso, dove,  Len(percorso)-dove- 6 ) ' a questo 
punto abbiamo

estratto il nome
     percorso = Left(percorso,Len(percorso) - Len(modello)- 7)'estraiamo 
il percorso in

chiaro
     desktop = createUnoService("com.sun.star.frame.Desktop")
     url =  "file:///" & Percorso & "Indirizzi.ods" 'abbiamo la url del 
file

(complicatissimo)
     fogli = desktop.LoadComponentFromURL(url, "_Blank", 0, aMediaDesc) 
'apriamo il file
     quanti = fogli.Sheets.Count 'vediamo quanti fogli ci sono
     Dim Indirizzari(quanti-1)

For n = 0 to quanti -1
     Indirizzari(n) = fogli.Sheets.ElementNames(n)'estrae i nomi degli 
indirizzari
oDialogo1.GetControl("IndirizzariList").AddItem(Indirizzari(n),n)'e li 
aggiunge

nella listobox
Next
     Dati = 1
     LeggiIndirizzi()
End sub


AFTER
**************
Sub LeggiIndirizzari
Dim aMediaDesc(0) as New com.sun.star.beans.PropertyValue
  aMediaDesc(0).Name  = "Hidden" 'carica l'elenco senza mostrarlo
  aMediaDesc(0).Value = TRUE
     percorso = thisComponent.StringValue 'THE RESULT IS 
"file:///C:/Users/Marco/Desktop/OPENOFFICE/LETTERE/Lettere.ott/"
'    percorso = ConvertFromUrl(percorso) 'REMOVED THE RESULT WAS 
"C:\Users\Marco\Desktop\OPENOFFICE\LETTERE\Lettere.ott\"
     dove = 1
     inizio = InStr(dove, percorso, "/") 'CHANGED \ TO /
do while inizio < Len(percorso)-4
     dove = inizio+1
     inizio = InStr(dove, percorso, "/")'CHANGED \ TO /
loop
     modello = mid(percorso, dove,  Len(percorso)-dove- 6 ) ' a questo 
punto abbiamo

estratto il nome
     percorso = Left(percorso,Len(percorso) - Len(modello)- 7)'estraiamo 
il percorso in

chiaro
     desktop = createUnoService("com.sun.star.frame.Desktop")
     url =  Percorso & "Indirizzi.ods" 'abbiamo la url del file 
(complicatissimo)
     fogli = desktop.LoadComponentFromURL(url, "_Default", 0, 
aMediaDesc) 'apriamo il

file
     quanti = fogli.Sheets.Count 'vediamo quanti fogli ci sono
     Dim Indirizzari(quanti-1)

For n = 0 to quanti -1
     Indirizzari(n) = fogli.Sheets.ElementNames(n)'estrae i nomi degli 
indirizzari
oDialogo1.GetControl("IndirizzariList").AddItem(Indirizzari(n),n)'e li 
aggiunge

nella listobox
Next
     Dati = 1
     LeggiIndirizzi()
End sub

Now I try in LIBO 4.0.5
Best regards
Marco

 
 
 --
 Caselle da 1GB, trasmetti allegati fino a 3GB e in piu' IMAP, POP3 e SMTP autenticato? GRATIS solo con Email.it http://www.email.it/f
 
 Sponsor:
 Posta elettronica professionale con: condivisione di calendari, agenda e rubrica, sincronizzazione con tutti smartphone e tablet, backup e molto altro ancora a soli 24 euro l'anno
 Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=13176&d=26-1
Comment 5 QA Administrators 2014-08-04 16:17:44 UTC
Dear Bug Submitter,

This bug has been in NEEDINFO status with no change for at least 6 months. Please provide the requested information as soon as possible and mark the bug as UNCONFIRMED. Due to regular bug tracker maintenance, if the bug is still in NEEDINFO status with no change in 30 days the QA team will close the bug as INVALID due to lack of needed information.

For more information about our NEEDINFO policy please read the wiki located here: 
https://wiki.documentfoundation.org/QA/FDO/NEEDINFO

If you have already provided the requested information, please mark the bug as UNCONFIRMED so that the QA team knows that the bug is ready to be confirmed.


Thank you for helping us make LibreOffice even better for everyone!


Warm Regards,
QA Team
Comment 6 QA Administrators 2014-09-03 12:05:25 UTC
Dear Bug Submitter,

Please read this message in its entirety before proceeding.

Your bug report is being closed as INVALID due to inactivity and a lack of information which is needed in order to accurately reproduce and confirm the problem. We encourage you to retest your bug against the latest release. If the issue is still present in the latest stable release, we need the following information (please ignore any that you've already provided):

a) Provide details of your system including your operating system and the latest version of LibreOffice that you have confirmed the bug to be present

b) Provide easy to reproduce steps – the simpler the better

c) Provide any test case(s) which will help us confirm the problem

d) Provide screenshots of the problem if you think it might help

e) Read all comments and provide any requested information

Once all of this is done, please set the bug back to UNCONFIRMED and we will attempt to reproduce the issue. 
Please do not:
a) respond via email 
b) update the version field in the bug or any of the other details on the top section of FDO
Comment 7 Jean-Baptiste Faure 2016-04-24 17:02:36 UTC
Version set from comment #1.

Comment #4 --> question answered, correct status is WorksForMe.

Best regards. JBF