[Libreoffice-commits] core.git: 2 commits - svx/source vcl/source
Thorsten Behrens
tbehrens at suse.com
Thu Jun 20 09:31:31 PDT 2013
svx/source/sdr/primitive2d/sdrolecontentprimitive2d.cxx | 4 -
vcl/source/gdi/bitmapex.cxx | 34 ++--------------
2 files changed, 7 insertions(+), 31 deletions(-)
New commits:
commit 77b273ee3a2df87664262418c360d3a4a0ed48ea
Author: Thorsten Behrens <tbehrens at suse.com>
Date: Fri Jun 14 13:26:43 2013 +0200
Fixup alpha bitmap generation for Windows.
This improves upon d6f58fd25eeca84a94528409a05b80aa5172b8b8 by
using the BitmapEx ctor instead of manual initialisation. Several
EMF+ files would otherwise show up horribly mangled on Windows.
Change-Id: I1808cb45818f3f0118653164c83c49d6134b9324
(cherry picked from commit fefab3bb38f55471d9fa9316d1249ad00adefc37)
diff --git a/vcl/source/gdi/bitmapex.cxx b/vcl/source/gdi/bitmapex.cxx
index 227e630..e123ac2 100644
--- a/vcl/source/gdi/bitmapex.cxx
+++ b/vcl/source/gdi/bitmapex.cxx
@@ -787,9 +787,6 @@ bool BitmapEx::Create( const ::com::sun::star::uno::Reference<
::com::sun::star::rendering::XBitmapCanvas > &xBitmapCanvas,
const Size &rSize )
{
- SetEmpty();
- Size aSize( rSize );
-
uno::Reference< beans::XFastPropertySet > xFastPropertySet( xBitmapCanvas, uno::UNO_QUERY );
if( xFastPropertySet.get() )
{
@@ -809,38 +806,17 @@ bool BitmapEx::Create( const ::com::sun::star::uno::Reference<
pSalBmp = ImplGetSVData()->mpDefInst->CreateSalBitmap();
pSalMask = ImplGetSVData()->mpDefInst->CreateSalBitmap();
- if( pSalBmp->Create( xBitmapCanvas, aSize ) )
+ Size aLocalSize(rSize);
+ if( pSalBmp->Create( xBitmapCanvas, aLocalSize ) )
{
-#ifdef CLAMP_BITDEPTH_PARANOIA
- // did we get alpha mixed up in the bitmap itself
- // eg. Cairo Canvas ... yes performance of this is awful.
- if( pSalBmp->GetBitCount() > 24 )
- {
- // Format convert the pixels with generic code
- Bitmap aSrcPixels( pSalBmp );
- aBitmap = Bitmap( rSize, 24 );
- BitmapReadAccess aSrcRead( aSrcPixels );
- BitmapWriteAccess aDestWrite( aBitmap );
- aDestWrite.CopyBuffer( aSrcRead );
- }
- else
-#endif
- aBitmap = Bitmap( pSalBmp );
-
- aBitmapSize = rSize;
- if ( pSalMask->Create( xBitmapCanvas, aSize, true ) )
+ if ( pSalMask->Create( xBitmapCanvas, aLocalSize, true ) )
{
- aMask = Bitmap( pSalMask );
- bAlpha = sal_True;
- aBitmapSize = rSize;
- eTransparent = !aMask ? TRANSPARENT_NONE : TRANSPARENT_BITMAP;
-
+ *this = BitmapEx(Bitmap(pSalBmp), Bitmap(pSalMask) );
return true;
}
else
{
- bAlpha = sal_False;
- eTransparent = TRANSPARENT_NONE;
+ *this = BitmapEx(Bitmap(pSalBmp));
return true;
}
}
commit fbb7c74a2c5cd37d4ff27deb154656655f047bbc
Author: Tor Lillqvist <tml at iki.fi>
Date: Wed Jun 12 17:04:49 2013 +0300
Don't display the "broken OLE link" icon except on Windows
Change-Id: Iede3d98ab5e5f9cd1896465e2a8c61605601999f
diff --git a/svx/source/sdr/primitive2d/sdrolecontentprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrolecontentprimitive2d.cxx
index cea71d5..4e14184 100644
--- a/svx/source/sdr/primitive2d/sdrolecontentprimitive2d.cxx
+++ b/svx/source/sdr/primitive2d/sdrolecontentprimitive2d.cxx
@@ -51,14 +51,14 @@ namespace drawinglayer
bScaleContent = pSource->IsEmptyPresObj();
}
}
-
+#ifdef WNT // Little point in displaying the "broken OLE" graphic on OSes that don't have real OLE, maybe?
if(GRAPHIC_NONE == aGraphic.GetType())
{
// no source, use fallback resource emty OLE graphic
aGraphic = SdrOle2Obj::GetEmptyOLEReplacementGraphic();
bScaleContent = true;
}
-
+#endif
if(GRAPHIC_NONE != aGraphic.GetType())
{
const GraphicObject aGraphicObject(aGraphic);
More information about the Libreoffice-commits
mailing list