Bug 45592 - Writer: mailmerge PrintOptions property has wrong type in map
Summary: Writer: mailmerge PrintOptions property has wrong type in map
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
3.3.4 release
Hardware: Other All
: medium normal
Assignee: Noel Power
URL:
Whiteboard: target:3.6.0 target:3.5.4
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-03 07:27 UTC by Christian
Modified: 2013-02-05 11:57 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
sample-basicmacro (1.59 KB, text/plain)
2012-02-03 07:27 UTC, Christian
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Christian 2012-02-03 07:27:39 UTC
Created attachment 56576 [details]
sample-basicmacro

Hi,

I'm using the attached macro for automaticly label-printing. The mailmerge-service works very good for this. But I can not set the print options.

at the following line it throws an exception!

oMailMerge.PrintOptions = printProp()

' Type com.sun.star.lang.IllegalArgumentException
' Message: Property Type mismatch or property not set: PrintOptions."

http://api.libreoffice.org/docs/common/ref/com/sun/star/view/PrintOptions.html
http://api.libreoffice.org/docs/common/ref/com/sun/star/text/MailMerge.html

What's the problem?
Sorry for my bad English
Comment 1 sasha.libreoffice 2012-05-14 08:23:35 UTC
Thanks for bugreport
reproduced in 3.5.3 on Fedora 64 bit
Comment 2 sasha.libreoffice 2012-05-14 08:24:40 UTC
@ Noel
What do You think about this bug?
Comment 3 Noel Power 2012-05-14 13:15:31 UTC
(In reply to comment #2)
> @ Noel
> What do You think about this bug?

well it's not a basic bug but it is afaict an api implementation bug. It seems the type of the uno property is incorrect. Since I've already investigated this I might as well fix it
Comment 4 Not Assigned 2012-05-15 05:14:31 UTC
Noel Power committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=db6dd09720c7e457bb46da4e80a786cae1ee0fc7

fix property type for printoptions fdo#45592
Comment 5 Noel Power 2012-05-15 05:53:15 UTC
fixed
Comment 6 Michael Stahl (CIB) 2012-05-15 06:50:18 UTC
ah yes, the type in the property map is wrong, while both the actual
implementation and the service IDL file use sequence<PropertyValue>,
thanks for fixing this.
Comment 7 sasha.libreoffice 2012-05-15 06:52:26 UTC
Thanks for fixing this bug
Comment 8 Not Assigned 2012-05-15 06:53:16 UTC
Noel Power committed a patch related to this issue.
It has been pushed to "libreoffice-3-5":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=91ef65e6e947e9f10efe8e410001aac9fb714cef&g=libreoffice-3-5

fix property type for printoptions fdo#45592


It will be available in LibreOffice 3.5.4.
Comment 9 Not Assigned 2012-05-15 07:30:39 UTC
Noel Power committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=3234c2a7864501243fdd9a1fdd5eb044bf317383

similar to fdo#45592 type for property UNO_NAME_SAVE_FILTER_DATA is wrong
Comment 10 Not Assigned 2012-05-15 07:47:36 UTC
Noel Power committed a patch related to this issue.
It has been pushed to "libreoffice-3-5":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=9d822f3573af23770d5e9d6894d9136feae991e4&g=libreoffice-3-5

similar to fdo#45592 type for property UNO_NAME_SAVE_FILTER_DATA is wrong


It will be available in LibreOffice 3.5.5.
Comment 11 Christian 2012-06-11 23:33:08 UTC
Many thanks for your efforts!

I tried to run the macro again with 3.5.4, no error-message anymore, but the printer keeps still.

The Windows-Spooler shows up a printjob (where printpages=N/A) for one second and then it disappears.

---

Dim printProp(0) as New com.sun.star.beans.PropertyValue
printProp(0).Name = "CopyCount" 'Anzahl zu druckende Exemplare
printProp(0).Value = iCopyPages
oMailMerge.PrintOptions = printProp()

Dim MyProps() as Object
oMailMerge.execute(MyProps())


---

When I don't set any printoptions, it works fine with standard-printsettings.
Comment 12 Noel Power 2013-02-05 11:57:48 UTC
somehow I missed the update here :-( closing this bug again, the reported bug was fixed ( the basic error ), it appears there like there is a subsequent bug with the handling of the 'fixed' parameter. please open a new bug for this if there is still a problem in recent versions