diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-11-01 13:10:08 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-11-01 13:25:08 +0000 |
commit | 9bdec0831afc45af45ea6d9350ef3372188b45cb (patch) | |
tree | 9f761fe2589569a7cd0fbafd6e5fcc4d350d4d64 /sdext | |
parent | 49c7bc5af291dbf6b34bcea82c9c0513f65b308b (diff) |
loplugin:oncevar in sd..svgio
Change-Id: I58565460fcc3279c9771c6e1272d0af540b2c87c
Reviewed-on: https://gerrit.libreoffice.org/30459
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sdext')
-rw-r--r-- | sdext/source/pdfimport/wrapper/wrapper.cxx | 25 |
1 files changed, 8 insertions, 17 deletions
diff --git a/sdext/source/pdfimport/wrapper/wrapper.cxx b/sdext/source/pdfimport/wrapper/wrapper.cxx index b213e8eed7ca..90d471a23bb8 100644 --- a/sdext/source/pdfimport/wrapper/wrapper.cxx +++ b/sdext/source/pdfimport/wrapper/wrapper.cxx @@ -685,29 +685,20 @@ void Parser::readFont() uno::Sequence<beans::PropertyValue> Parser::readImageImpl() { - static const char aJpegMarker[] = "JPEG"; - static const char aPbmMarker[] = "PBM"; - static const char aPpmMarker[] = "PPM"; - static const char aPngMarker[] = "PNG"; - static const char aJpegFile[] = "DUMMY.JPEG"; - static const char aPbmFile[] = "DUMMY.PBM"; - static const char aPpmFile[] = "DUMMY.PPM"; - static const char aPngFile[] = "DUMMY.PNG"; - OString aToken = readNextToken(); const sal_Int32 nImageSize( readInt32() ); OUString aFileName; - if( aToken == aPngMarker ) - aFileName = aPngFile; - else if( aToken == aJpegMarker ) - aFileName = aJpegFile; - else if( aToken == aPbmMarker ) - aFileName = aPbmFile; + if( aToken == "PNG" ) + aFileName = "DUMMY.PNG"; + else if( aToken == "JPEG" ) + aFileName = "DUMMY.JPEG"; + else if( aToken == "PBM" ) + aFileName = "DUMMY.PBM"; else { - SAL_WARN_IF(aToken != aPpmMarker,"sdext.pdfimport","Invalid bitmap format"); - aFileName = aPpmFile; + SAL_WARN_IF(aToken != "PPM","sdext.pdfimport","Invalid bitmap format"); + aFileName = "DUMMY.PPM"; } uno::Sequence<sal_Int8> aDataSequence(nImageSize); |