diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2015-03-29 17:50:40 +0900 |
---|---|---|
committer | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2015-03-29 18:26:31 +0900 |
commit | 2fb8cf7cdc48aa97eabf14a51c2a141823368de3 (patch) | |
tree | 570d3c90ca54494964dd910499f726880e450ed3 /include/vcl/pngread.hxx | |
parent | vcl: test for bitmap convert, use scoped read/write access (diff) | |
download | core-2fb8cf7cdc48aa97eabf14a51c2a141823368de3.tar.gz core-2fb8cf7cdc48aa97eabf14a51c2a141823368de3.zip |
vcl: cleanup pngreader, use unique_ptr for pImpl
Change-Id: I36fb35338d8635e4bf1ac7c60e0f09da401406db
Diffstat (limited to 'include/vcl/pngread.hxx')
-rw-r--r-- | include/vcl/pngread.hxx | 48 |
1 files changed, 23 insertions, 25 deletions
diff --git a/include/vcl/pngread.hxx b/include/vcl/pngread.hxx index 8513a1a6c446..3954f5cba0ab 100644 --- a/include/vcl/pngread.hxx +++ b/include/vcl/pngread.hxx @@ -24,40 +24,38 @@ #include <vcl/bitmapex.hxx> #include <vector> - -// - PNGReader - - - namespace vcl { - class PNGReaderImpl; - class VCL_DLLPUBLIC PNGReader - { - PNGReaderImpl* mpImpl; +class PNGReaderImpl; - public: +class VCL_DLLPUBLIC PNGReader +{ + std::unique_ptr<PNGReaderImpl> mpImpl; - /* the PNG chunks are read within the c'tor, so the stream will - be positioned at the end of the PNG */ - explicit PNGReader( SvStream& rStm ); - ~PNGReader(); +public: - /* an empty preview size hint (=default) will read the whole image - */ - BitmapEx Read( const Size& i_rPreviewHint = Size() ); + /* the PNG chunks are read within the c'tor, so the stream will + be positioned at the end of the PNG */ + explicit PNGReader(SvStream& rStream); + ~PNGReader(); - // retrieve every chunk that resides inside the PNG - struct ChunkData - { - sal_uInt32 nType; - std::vector< sal_uInt8 > aData; - }; - const std::vector< ChunkData >& GetChunks() const; + /* an empty preview size hint (=default) will read the whole image + */ + BitmapEx Read(const Size& i_rPreviewHint = Size()); - void SetIgnoreGammaChunk( bool b ); + // retrieve every chunk that resides inside the PNG + struct ChunkData + { + sal_uInt32 nType; + std::vector<sal_uInt8> aData; }; -} + const std::vector<ChunkData>& GetChunks() const; + + void SetIgnoreGammaChunk(bool bIgnoreGammaChunk); +}; + +} // end namespace vcl #endif // INCLUDED_VCL_PNGREAD_HXX |