diff options
author | Ivo Hinkelmann <ihi@openoffice.org> | 2009-06-17 10:58:14 +0000 |
---|---|---|
committer | Ivo Hinkelmann <ihi@openoffice.org> | 2009-06-17 10:58:14 +0000 |
commit | cbc736a38386b1c77c1905c00b4e37f21105d12b (patch) | |
tree | dd4eba999b8df8b85214f6b093b21d60e53b8319 /vcl | |
parent | 4f6f5673f005d7628c3809b0ad2a66953f2d8a2d (diff) |
CWS-TOOLING: integrate CWS impress171
2009-06-02 16:32:02 +0200 cl r272511 : fixed build error
2009-05-29 16:40:09 +0200 cl r272471 : CWS-TOOLING: rebase CWS impress171 to trunk@272291 (milestone: DEV300:m49)
2009-05-19 15:14:08 +0200 sj r272082 : #i101459# applied patch (writing out StyleTextProperties even if no chars given)
2009-05-19 15:09:31 +0200 sj r272081 : #i101459# applied patch (writing out StyleTextProperties even if no chars given)
2009-05-19 15:09:14 +0200 sj r272080 : #i101459# applied patch (writing out StyleTextProperties even if no chars given)
2009-05-18 13:34:05 +0200 sj r272015 : #i47689# fixed rectangles toolbar
2009-05-13 14:59:08 +0200 sj r271862 : #i101563# fixed crash when loading pptx document
2009-05-12 19:31:58 +0200 sj r271835 : #101684# fixed rotation of customshapes
2009-05-08 16:37:01 +0200 sj r271724 : #i101683,i101584,i48160# added shearing of customshapes, fixed rotation problem
2009-04-28 17:32:14 +0200 sj r271335 : #i48160# fixed gluepoint rotation of customshapes
2009-04-27 16:31:54 +0200 cl r271291 : #i100138# applied patch for japanese reconversion feature
2009-04-27 16:30:52 +0200 cl r271290 : #i100138# applied patch for japanese reconversion feature
2009-04-27 16:28:55 +0200 cl r271289 : #i100138# applied patch for japanese reconversion feature
2009-04-23 14:22:59 +0200 cl r271170 : #i95342# #i96820# #i97298# multiple table handling fixes
2009-04-23 14:18:54 +0200 sj r271169 : #i60368# ignoring gamma values for toolbar/menu icons
2009-04-23 11:54:28 +0200 cl r271146 : #i97298# set style to text even during text edit
2009-04-23 11:46:38 +0200 cl r271145 : fixed compiler error with debug
2009-04-22 19:09:37 +0200 sj r271135 : #i101051# applied patch (proper import of notes page object)
2009-04-22 11:07:54 +0200 cl r271082 : #i96820# modify doc after merging cells
2009-04-22 10:57:35 +0200 cl r271081 : #i100307# applied patch from jlcheng to correctly set modfiy state
2009-04-22 10:31:11 +0200 cl r271079 : #i96736# copy merge information on clone
2009-04-21 08:27:22 +0200 cl r271016 : #i89541# use SfxErrorContext to make the ErrorHandler dialog modal
2009-04-20 17:52:56 +0200 cl r271003 : #i98480# removed 'EndPosition' and 'StartPosition' from styles
2009-04-20 16:41:55 +0200 cl r270994 : #i98403# fixed state handling for selected motion path
2009-04-17 11:35:25 +0200 cl r270931 : #i61274# export to pdf should behave like printing considering layer visibility
2009-04-17 10:00:17 +0200 cl r270924 : #i98967# set default style on any new shape except a page obj
2009-04-16 16:28:20 +0200 cl r270893 : #i98859# use percentage type for relative font height
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/inc/vcl/pngread.hxx | 2 | ||||
-rw-r--r-- | vcl/source/gdi/impimagetree.cxx | 7 | ||||
-rw-r--r-- | vcl/source/gdi/pngread.cxx | 21 |
3 files changed, 23 insertions, 7 deletions
diff --git a/vcl/inc/vcl/pngread.hxx b/vcl/inc/vcl/pngread.hxx index 200b52eb6182..285af1407c1c 100644 --- a/vcl/inc/vcl/pngread.hxx +++ b/vcl/inc/vcl/pngread.hxx @@ -65,6 +65,8 @@ namespace vcl std::vector< sal_uInt8 > aData; }; const std::vector< ChunkData >& GetChunks() const; + + void SetIgnoreGammaChunk( sal_Bool b ); }; } diff --git a/vcl/source/gdi/impimagetree.cxx b/vcl/source/gdi/impimagetree.cxx index 64cddece1199..9e1378f22326 100644 --- a/vcl/source/gdi/impimagetree.cxx +++ b/vcl/source/gdi/impimagetree.cxx @@ -102,8 +102,11 @@ void loadFromStream( rtl::OUString const & path, BitmapEx & bitmap) { std::auto_ptr< SvStream > s(wrapStream(stream)); - if (path.endsWithAsciiL(RTL_CONSTASCII_STRINGPARAM(".png"))) { - bitmap = vcl::PNGReader(*s).Read(); + if (path.endsWithAsciiL(RTL_CONSTASCII_STRINGPARAM(".png"))) + { + vcl::PNGReader aPNGReader( *s ); + aPNGReader.SetIgnoreGammaChunk( sal_True ); + bitmap = aPNGReader.Read(); } else { *s >> bitmap; } diff --git a/vcl/source/gdi/pngread.cxx b/vcl/source/gdi/pngread.cxx index 56c9025018b9..834116a9ffe9 100644 --- a/vcl/source/gdi/pngread.cxx +++ b/vcl/source/gdi/pngread.cxx @@ -156,6 +156,7 @@ private: BOOL mbIDAT; // TRUE if finished with enough IDAT chunks BOOL mbGamma; // TRUE if Gamma Correction available BOOL mbpHYs; // TRUE if pysical size of pixel available + sal_Bool mbIgnoreGammaChunk; bool ReadNextChunk(); void ReadRemainingChunks(); @@ -186,6 +187,7 @@ public: BitmapEx GetBitmapEx( const Size& rPreviewSizeHint ); const std::vector< PNGReader::ChunkData >& GetAllChunks(); + void SetIgnoreGammaChunk( sal_Bool bIgnore ){ mbIgnoreGammaChunk = bIgnore; }; }; // ------------------------------------------------------------------------------ @@ -205,8 +207,9 @@ PNGReaderImpl::PNGReaderImpl( SvStream& rPNGStream ) mbzCodecInUse ( sal_False ), mbStatus( TRUE), mbIDAT( FALSE ), - mbGamma ( sal_False ), - mbpHYs ( sal_False ) + mbGamma ( sal_False ), + mbpHYs ( sal_False ), + mbIgnoreGammaChunk ( sal_False ) { // prepare the PNG data stream mnOrigStreamMode = mrPNGStream.GetNumberFormatInt(); @@ -382,9 +385,9 @@ BitmapEx PNGReaderImpl::GetBitmapEx( const Size& rPreviewSizeHint ) break; case PNGCHUNK_gAMA : // the gamma chunk must precede - { - if ( mbIDAT == FALSE ) // the 'IDAT' and also the - ImplGetGamma(); // 'PLTE'(if available ) + { // the 'IDAT' and also the 'PLTE'(if available ) + if ( !mbIgnoreGammaChunk && ( mbIDAT == FALSE ) ) + ImplGetGamma(); } break; @@ -1568,4 +1571,12 @@ const std::vector< vcl::PNGReader::ChunkData >& PNGReader::GetChunks() const return mpImpl->GetAllChunks(); } +// ------------------------------------------------------------------------ + +void PNGReader::SetIgnoreGammaChunk( sal_Bool b ) +{ + mpImpl->SetIgnoreGammaChunk( b ); +} + + } // namespace vcl |