Issue 95209 - Various bugs fixed in canvasbitmap/unittest/unx salbmp
Summary: Various bugs fixed in canvasbitmap/unittest/unx salbmp
Status: CLOSED FIXED
Alias: None
Product: gsl
Classification: Code
Component: code (show other issues)
Version: current
Hardware: All All
: P3 Trivial (vote)
Target Milestone: OOo 3.1
Assignee: philipp.lohmann
QA Contact: issues@gsl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-10-20 13:40 UTC by thb
Modified: 2009-01-30 12:29 UTC (History)
2 users (show)

See Also:
Issue Type: PATCH
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
The patch (24.50 KB, patch)
2008-10-20 13:43 UTC, thb
no flags Details | Diff
fix warning / overflow (1.08 KB, patch)
2008-11-13 16:28 UTC, philipp.lohmann
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description thb 2008-10-20 13:40:34 UTC
Made canvasbitmap unit test compile & run again; fixed the various bugs that
turned up.
Comment 1 thb 2008-10-20 13:42:00 UTC
Will put that into CWS thb11, @pl - care to have a quick look at the salbmp
change, not sure why this was missing in the first place?
Comment 2 thb 2008-10-20 13:43:05 UTC
Created attachment 57313 [details]
The patch
Comment 3 thb 2008-11-12 20:29:20 UTC
Fixed in CWS canvas06
Comment 4 thb 2008-11-12 20:31:28 UTC
@pl: please verify - build in vcl/test & run canvasbitmaptest; if that does not
turn up any errors, all is well (ok, all that's tested there is well...)
Comment 5 thb 2008-11-12 20:32:11 UTC
grmblfx
Comment 6 thb 2008-11-12 20:32:45 UTC
.
Comment 7 thb 2008-11-12 20:33:24 UTC
@pl: sorry for the noise. see above.
Comment 8 philipp.lohmann 2008-11-13 16:27:07 UTC
cleaned up dndtest.cxx so it compiles without warnings (wow that is old stuff !)

more seriously I got these warnings on Linux:

vcl/test/canvasbitmaptest.cxx: In member function `virtual
com::sun::star::uno::Sequence<com::sun::star::rendering::ARGBColor>
<unnamed>::TestBitmap::convertIntegerToPARGB(const
com::sun::star::uno::Sequence<sal_Int8>&)':
vcl/test/canvasbitmaptest.cxx:801: warning: passing `const double' for
converting 1 of `double vcl::unotools::toDoubleColor(sal_uInt8)'
vcl/test/canvasbitmaptest.cxx:802: warning: passing `double' for converting 1 of
`double vcl::unotools::toDoubleColor(sal_uInt8)'
vcl/test/canvasbitmaptest.cxx:803: warning: passing `double' for converting 1 of
`double vcl::unotools::toDoubleColor(sal_uInt8)'
vcl/test/canvasbitmaptest.cxx:804: warning: passing `double' for converting 1 of
`double vcl::unotools::toDoubleColor(sal_uInt8)'

These indeed seem to indicate problems since fAlpha is a cast sal_uInt8 itself,
so in the range from 0 to 255 -> overflow.

attaching a patch to solve that.

With that patch it passes, but only if I compile it with debug, else it crashes
somewhere in vcl while trying to access a service.
Comment 9 philipp.lohmann 2008-11-13 16:28:36 UTC
Created attachment 57976 [details]
fix warning / overflow
Comment 10 philipp.lohmann 2008-11-13 16:29:01 UTC
reopen
Comment 11 thb 2008-11-13 19:51:50 UTC
ah, good catch. sadly, gcc 4.2 is everything but -Werr clean on x64, so this one
escaped me. Will go for the crash now.
Comment 12 thb 2008-11-13 20:39:27 UTC
Hm. Fixed the warning (a bit differently) - but no crash here. From where do you
run the binary, I had to copy it into an installed office (openoffice3/program
dir), and run it with an LD_LIBRARY_PATH containing both ure & basis layer
(yeah, lame. but really no ambition to find a different way through the 3layer
OOo maze)?
Comment 13 thb 2008-11-13 20:40:20 UTC
@pl: could you try again, please?
Comment 14 philipp.lohmann 2008-11-14 09:43:04 UTC
verified in CWS canvas06

and no, I don't want to find my way through those layers either :-)
Comment 15 philipp.lohmann 2009-01-30 12:29:38 UTC
integrated, closing