Issue 65742

Summary: Mailmerge shows window, when hidden=true
Product: General Reporter: enom <webmaster>
Component: codeAssignee: andreas.schluens
Status: CLOSED IRREPRODUCIBLE QA Contact: issues@framework <issues>
Severity: Trivial    
Priority: P3 CC: issues, law
Version: 680m182Keywords: regression
Target Milestone: OOo 2.4   
Hardware: PC   
OS: Windows XP   
Issue Type: DEFECT Latest Confirmation in: ---
Developer Difficulty: ---
Attachments:
Description Flags
OOoIssue65742.java java class test case
none
basic test script none

Description enom 2006-05-24 14:27:27 UTC
My batch-file calls: 
"C:\Programme\OpenOffice.org 2.0\program\soffice.bin" -minimized 
"macro:///TestLibrary.Mailmerge.Main"

The Macro executes a mailmerge.

In version 2.0.1 no window appears, but in 2.0.2 and the current dev release
2.0.169 window appears while creating the documents.

I thought this bug was report in issue #63210, but the problem still exists.
Comment 1 michael.ruess 2006-05-24 14:36:37 UTC
Reassigned to HI.
Comment 2 lawlp 2006-07-03 12:38:09 UTC
I have the same problem.

i run openoffice 2.0.3 under windows xp with the following command line :
soffice -headless -invisible
-accept="socket,host=localhost,port=8100;urp;StarOffice.ServiceManager"

In my java code, i connect successfully to my openoffice server and i try to do
a mailmerge.
My problem is that openoffice is invisible (ok that's what i want ) but when i
create my MailMerge service instance, openoffice's window appears. With
openoffice 2.0.1 i didn't have the problem.

Here is the line that make openoffice's window to show.

Object mmservice = mxMCF.createInstanceWithContext(
"com.sun.star.text.MailMerge", mxComponentContext ); 

Comment 3 lawlp 2006-08-29 09:14:51 UTC
this bug is still unconfirmed.
if i provide a minimal java code to reproduce this bug, will i help to change
its status to 'NEW' ?
Comment 4 kicki 2006-09-06 13:12:51 UTC
I experience the same problem using version 2.0.3 under Windows XP. This problem
does not show using version 2.0.1. Creating a Mailmerge instance causes a window
be shown for short time and also for each record a window pops up and disappears
again.
Comment 5 h.ilter 2006-09-13 13:54:18 UTC
os->mba: In cws sfxcleanup the code to create SfxViewFrames has been changed.
Maybe this is the reason for it.
Comment 6 Mathias_Bauer 2006-10-18 16:58:45 UTC
changing target
Comment 7 kicki 2006-10-27 11:09:19 UTC
OO 2.0.4 works fine. No windows displayed anymore. Thank you very much hi and
mba. Great job you are doing!
Comment 8 Mathias_Bauer 2006-10-30 12:29:42 UTC
I'm a little bit confused. :-)

"-minimized" does not have an impact on the visibility of document windows and
the same is true for "-headless". 
"-invisible" only works for the first window you opened when soffice is started.
So all parameters used on the command line should be completely irrelevant for
the problems you have experienced with mail merge.

We couldn't reproduce this issue until now and we also have no idea why it
apparently only happened in 2.0.2 and 2.0.3, but not in 2.0.1 and 2.0.4.

If anyone could send me or attach a macro or a Java application that shows the
wrong behavior in 2.0.2/2.0.3 we could see what the reason was and then we can
also see if any existing problem is fixed in 2.0.4 or if it just works "by luck".
Comment 9 kicki 2006-10-30 22:14:35 UTC
Hello mba
I much would like to assist you, but I'm not into macros and java programming. I
can prepare a tiny Delphi program, that allows to reproduce the problem. If you
are interested, please contact me and I will send you the sources and the
executable. 
Comment 10 Mathias_Bauer 2006-10-31 10:37:37 UTC
That would be great. If you have a Delphi application that is able to trigger
the bug in 2.0.3 I would be glad to use it. Please send it to me by mail or
attach it to this issue (as you prefer). I can't use the source only as I don't
have or use Delphi.
Comment 11 lawlp 2006-10-31 18:58:26 UTC
Hello,

i just made some tests with openoffice 2.0.1, 2.0.2, 2.0.3 and 2.0.4.
i did them under linux but i experienced the same bug with an windows xp box.
For information, the size of the archive i use :
109237237 OOo_2.0.1_LinuxIntel_install.tar.gz
122488813 OOo_2.0.2_LinuxIntel_install.tar.gz
126023668 OOo_2.0.3_LinuxIntel_install.tar.gz
127627554 OOo_2.0.4_LinuxIntel_install_fr.tar.gz

I build the attached java class (OOoIssue65742.java) with :

--- build.sh
#!/bin/sh
BDOO2CL=/home/loic/Dev/javaOO/OOo2_classes
CLASSPATH="$BDOO2CL/jurt.jar:$BDOO2CL/unoil.jar:$BDOO2CL/ridl.jar:$BDOO2CL/juh.jar"
export CLASSPATH
javac OOoIssue65742.java


for each test, i launch openoffice with
/opt/openoffice.org2.0/program/soffice -headless -invisible
-accept="socket,host=localhost,port=8100;urp;StarOffice.Service
Manager"

and i run my class with

--- run.sh
#!/bin/sh
BDOO2CL=/home/loic/Dev/javaOO/OOo2_classes
CLASSPATH="$BDOO2CL/jurt.jar:$BDOO2CL/unoil.jar:$BDOO2CL/ridl.jar:$BDOO2CL/juh.jar:."
export CLASSPATH
java OOoIssue65742

My test program will raise an exception because the arguments that i pass to the
merge command are invalid.
But the behaviour is the same with valid arguments : 

openoffice.org-writer-2.0.1-1 : the exception is raised but openoffice's window
stay invisible.
openoffice.org-writer-2.0.2-5 : the exception is raised and openoffice's window
appears and stay visible
openoffice.org-writer-2.0.3-7 : the exception is raised and openoffice's window
appears and stay visible
openoffice.org-writer-2.0.4-5 : the exception is raised but openoffice's window
stay invisible.
Comment 12 lawlp 2006-10-31 18:59:29 UTC
Created attachment 40200 [details]
OOoIssue65742.java java class test case
Comment 13 Mathias_Bauer 2007-01-22 14:19:36 UTC
missed the code freeze deadline -> 2.3
Comment 14 Mathias_Bauer 2007-07-16 13:46:37 UTC
As my vacation starts next week :-)
-> 2.4
Comment 15 Mathias_Bauer 2007-11-01 16:44:59 UTC
assigning to as
Comment 16 andreas.schluens 2007-11-27 13:22:01 UTC
a) The parameter "Hidden=true" seams not to be related to this issue. Because
it's not passed to the used mail merge service ... its passed to a piece of code
not used within this example (see loadComponentFromURL()).

b) The code you show me does not use valid parameters. So e.g. the database
source property will be empty. Mail Merge cant work so. Further you describe
that an exception will be thrown (IllegalArgumentException). How do you see this
exception ... as a message box shown by the office or as string on the command
line or as a stack trace of your java program ? Might be the office crashed with
an error and shows you a message box. In such case might be VCL uses the
currently opened (but invisible document window) as parent for these message
box. Then those parent window will be made visible hardly. But that will be a
side effect only. It's up to you to pass a right parameter set to the service
and further to handle all errors right (e.g. by catching exceptions, using goto
error in basic etcpp).

c) Last but not least ... I've tried your example (rewritten in basic) for an
SRC680 m237 version ... and it worked without any problems.

Sorry - but current state of this issue will be "works for me". Please feel free
to reopne this task in case you can provide more and usefully informations on it.

Regards
as
Comment 17 andreas.schluens 2007-11-27 13:23:15 UTC
Created attachment 49936 [details]
basic test script
Comment 18 andreas.schluens 2007-11-27 13:23:50 UTC
.