Not sure if MSVC would accept also the simpler thing, but anyway, the
dynamic_cast works for it, too.
Change-Id: I2dfa1e70b75bc17d38b5e95be0a0f1dd66767bf1
The nullcanvas was removed in 1cd9b5d859a6468164b043b0fcaaf49c1907500c
Change-Id: I2d718d1a18bb405e72b198ced548fc7cb885c6d7
Reviewed-on: https://gerrit.libreoffice.org/3992
Reviewed-by: Tor Lillqvist <tml@iki.fi>
Tested-by: Tor Lillqvist <tml@iki.fi>
* Remove EMFP_DEBUG with OSL_DEBUG conditional defines and SAL_INFO
* While we are about it, to help with troubleshooting metafile
issues, add another vcl.emf area to log-areas.dox
* Improve error handling when processing an EMF header:
+ replace variable name nsal_uInt32 (!!) with sane variables
to make the code more readable
+ check to ensure that type field is 0x1, which is all it can be
for metafiles
+ check that signature field is set to ASCII-encoded value "FME"
+ loose check of version field to see if it is 0x00010000
+ warn if record count is zero - that really shouldn't be possible
+ check bytes field in header to make sure it correlates to the
actual size of the metafile
+ additional check - [MS-EMF] states that reserved field should be
zero, and ignored... but we can use this to check for file
corruption - not 0, not correct!
* Quite a few more comments in the code to clarify the intended
structure of a metafile, per [MS-EMF] documentation
Change-Id: Id4ed486b2dd0c6e7bdee67cb344aaaf8e8d98f84
Reviewed-on: https://gerrit.libreoffice.org/3839
Reviewed-by: David Tardon <dtardon@redhat.com>
Tested-by: David Tardon <dtardon@redhat.com>
* Change to SAL_INFO instead of EMFP_DEBUG in implrenderer.cxx
* Add new log area cppcanvas.emf
* Update comment in log.hxx to reference the new location of log-areas.dox
Change-Id: I5d710725339f58a111a2f3494c3a72f685624322
Reviewed-on: https://gerrit.libreoffice.org/3726
Reviewed-by: Tor Lillqvist <tml@iki.fi>
Tested-by: Tor Lillqvist <tml@iki.fi>