diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-08-08 11:48:55 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-08-08 13:04:46 +0100 |
commit | 5298b1b32d90002be8d09fe82955550c18eae8bc (patch) | |
tree | 3af0cf62eed719894b77c99d1e0896c7ad260c25 /svx | |
parent | 3e6613964f10ff10b71188293a2e4d4d1b29944c (diff) |
callcatcher: ditch some more methods
Diffstat (limited to 'svx')
-rwxr-xr-x | svx/inc/svx/xoutbmp.hxx | 7 | ||||
-rw-r--r-- | svx/inc/svx/xsflclit.hxx | 1 | ||||
-rwxr-xr-x | svx/source/xoutdev/_xoutbmp.cxx | 180 | ||||
-rw-r--r-- | svx/source/xoutdev/xattr.cxx | 5 |
4 files changed, 0 insertions, 193 deletions
diff --git a/svx/inc/svx/xoutbmp.hxx b/svx/inc/svx/xoutbmp.hxx index 2dd14e8b6b7d..70828d39f5c4 100755 --- a/svx/inc/svx/xoutbmp.hxx +++ b/svx/inc/svx/xoutbmp.hxx @@ -66,18 +66,11 @@ public: static GraphicFilter* pGrfFilter; - static BitmapEx CreateQuickDrawBitmapEx( const Graphic& rGraphic, const OutputDevice& rCompDev, - const MapMode& rMapMode, const Size& rLogSize, - const Point& rPoint, const Size& rSize ); static Graphic MirrorGraphic( const Graphic& rGraphic, const sal_uIntPtr nMirrorFlags ); static Animation MirrorAnimation( const Animation& rAnimation, sal_Bool bHMirr, sal_Bool bVMirr ); static sal_uInt16 WriteGraphic( const Graphic& rGraphic, String& rFileName, const String& rFilterName, const sal_uIntPtr nFlags = 0L, const Size* pMtfSize_100TH_MM = NULL ); - static void DrawQuickDrawBitmapEx( OutputDevice* pOutDev, const Point& rPt, - const Size& rSize, const BitmapEx& rBmpEx ); - static void DrawTiledBitmapEx( OutputDevice* pOutDev, const Point& rStartPt, const Size& rGrfSize, - const Rectangle& rTileRect, const BitmapEx& rBmpEx ); static sal_uInt16 ExportGraphic( const Graphic& rGraphic, const INetURLObject& rURL, GraphicFilter& rFilter, const sal_uInt16 nFormat, diff --git a/svx/inc/svx/xsflclit.hxx b/svx/inc/svx/xsflclit.hxx index 8ac2b15249db..23c7dfd250dc 100644 --- a/svx/inc/svx/xsflclit.hxx +++ b/svx/inc/svx/xsflclit.hxx @@ -39,7 +39,6 @@ class SVX_DLLPUBLIC XSecondaryFillColorItem : public XColorItem public: TYPEINFO(); SVX_DLLPRIVATE XSecondaryFillColorItem() {} - SVX_DLLPRIVATE XSecondaryFillColorItem(sal_Int32 nIndex, const Color& rTheColor); XSecondaryFillColorItem(const String& rName, const Color& rTheColor); SVX_DLLPRIVATE XSecondaryFillColorItem(SvStream& rIn); diff --git a/svx/source/xoutdev/_xoutbmp.cxx b/svx/source/xoutdev/_xoutbmp.cxx index e88e5e4e6737..c1251765c276 100755 --- a/svx/source/xoutdev/_xoutbmp.cxx +++ b/svx/source/xoutdev/_xoutbmp.cxx @@ -58,186 +58,6 @@ GraphicFilter* XOutBitmap::pGrfFilter = NULL; -// ----------------------------------------------------------------------------- - -BitmapEx XOutBitmap::CreateQuickDrawBitmapEx( const Graphic& rGraphic, const OutputDevice& rCompDev, - const MapMode& rMapMode, const Size& rLogSize, - const Point& rPoint, const Size& rSize ) -{ - BitmapEx aRetBmp; - - if( rGraphic.IsAlpha() ) - aRetBmp = rGraphic.GetBitmapEx(); - else - { - VirtualDevice aVDev( rCompDev ); - MapMode aMap( rMapMode ); - - aMap.SetOrigin( Point() ); - aVDev.SetMapMode( aMap ); - - Point aPoint( aVDev.LogicToPixel( rPoint ) ); - Size aOldSize( aVDev.LogicToPixel( rSize ) ); - Size aAbsSize( aOldSize ); - Size aQSizePix( aVDev.LogicToPixel( rLogSize ) ); - - aVDev.SetMapMode( MapMode() ); - - if( aOldSize.Width() < 0 ) - aAbsSize.Width() = -aAbsSize.Width(); - - if( aOldSize.Height() < 0 ) - aAbsSize.Height() = -aAbsSize.Height(); - - if( aVDev.SetOutputSizePixel( aAbsSize ) ) - { - Point aNewOrg( -aPoint.X(), -aPoint.Y() ); - const Point aNullPoint; - - // horizontale Spiegelung ggf. beruecksichtigen - if( aOldSize.Width() < 0 ) - { - aNewOrg.X() -= aOldSize.Width(); - - // und jetzt noch einen abziehen - aNewOrg.X()--; - } - - // vertikale Spiegelung ggf. beruecksichtigen - if( rSize.Height() < 0 ) - { - aNewOrg.Y() -= aOldSize.Height(); - - // und jetzt noch einen abziehen - aNewOrg.Y()--; - } - - if( rGraphic.GetType() != GRAPHIC_BITMAP ) - { - rGraphic.Draw( &aVDev, aNewOrg, aQSizePix ); - - const Bitmap aBmp( aVDev.GetBitmap( aNullPoint, aAbsSize ) ); - Bitmap aMask; - - Graphic( rGraphic.GetGDIMetaFile().GetMonochromeMtf( COL_BLACK ) ).Draw( &aVDev, aNewOrg, aQSizePix ); - aMask = aVDev.GetBitmap( aNullPoint, aAbsSize ); - aRetBmp = BitmapEx( aBmp, aMask ); - } - else - { - Bitmap aBmp( rGraphic.GetBitmap() ); - -// UNX has got problems with 1x1 bitmaps which are transparent (KA 02.11.1998) -#ifdef UNX - const Size aBmpSize( aBmp.GetSizePixel() ); - sal_Bool bFullTrans = sal_False; - - if( aBmpSize.Width() == 1 && aBmpSize.Height() == 1 && rGraphic.IsTransparent() ) - { - Bitmap aTrans( rGraphic.GetBitmapEx().GetMask() ); - BitmapReadAccess* pMAcc = aBmp.AcquireReadAccess(); - - if( pMAcc ) - { - if( pMAcc->GetColor( 0, 0 ) == BitmapColor( Color( COL_WHITE ) ) ) - bFullTrans = sal_True; - - aTrans.ReleaseAccess( pMAcc ); - } - } - - if( !bFullTrans ) -#endif // UNX - - { - DitherBitmap( aBmp ); - aVDev.DrawBitmap( aNewOrg, aQSizePix, aBmp ); - aBmp = aVDev.GetBitmap( aNullPoint, aAbsSize ); - - if( !rGraphic.IsTransparent() ) - aRetBmp = BitmapEx( aBmp ); - else - { - Bitmap aTrans( rGraphic.GetBitmapEx().GetMask() ); - - if( !aTrans ) - aRetBmp = BitmapEx( aBmp, rGraphic.GetBitmapEx().GetTransparentColor() ); - else - { - aVDev.DrawBitmap( aNewOrg, aQSizePix, aTrans ); - aRetBmp = BitmapEx( aBmp, aVDev.GetBitmap( Point(), aAbsSize ) ); - } - } - } - } - } - } - - return aRetBmp; -} - -// ------------------------------------------------------------------------ - -void XOutBitmap::DrawQuickDrawBitmapEx( OutputDevice* pOutDev, const Point& rPt, - const Size& rSize, const BitmapEx& rBmpEx ) -{ - const Size aBmpSizePix( rBmpEx.GetSizePixel() ); - const Size aSizePix( pOutDev->LogicToPixel( rSize ) ); - - if ( ( aSizePix.Width() - aBmpSizePix.Width() ) || ( aSizePix.Height() - aBmpSizePix.Height() ) ) - rBmpEx.Draw( pOutDev, rPt, rSize ); - else - rBmpEx.Draw( pOutDev, rPt ); -} - -// ------------------------------------------------------------------------ - -void XOutBitmap::DrawTiledBitmapEx( OutputDevice* pOutDev, - const Point& rStartPt, const Size& rGrfSize, - const Rectangle& rTileRect, const BitmapEx& rBmpEx ) -{ - Rectangle aClipRect( pOutDev->LogicToPixel( pOutDev->GetClipRegion().GetBoundRect() ) ); - Rectangle aPixRect( pOutDev->LogicToPixel( rTileRect ) ); - const Size aPixSize( pOutDev->LogicToPixel( rGrfSize ) ); - const Point aPixPoint( pOutDev->LogicToPixel( rStartPt ) ); - Point aOrg; - const long nWidth = aPixSize.Width(); - const long nHeight = aPixSize.Height(); - long nXPos = aPixPoint.X() + ( ( aPixRect.Left() - aPixPoint.X() ) / nWidth ) * nWidth; - long nYPos = aPixPoint.Y() + ( ( aPixRect.Top() - aPixPoint.Y() ) / nHeight ) * nHeight; - const long nBottom = aPixRect.Bottom(); - const long nRight = aPixRect.Right(); - const long nLeft = nXPos; - const sal_Bool bNoSize = ( aPixSize == rBmpEx.GetSizePixel() ); - - pOutDev->Push(); - pOutDev->SetMapMode( MapMode() ); - - // ggf. neue ClipRegion berechnen und setzen - if ( pOutDev->IsClipRegion() ) - aPixRect.Intersection( aClipRect ); - - pOutDev->SetClipRegion( aPixRect ); - - while( nYPos <= nBottom ) - { - while( nXPos <= nRight ) - { - if ( bNoSize ) - rBmpEx.Draw( pOutDev, Point( nXPos, nYPos ) ); - else - rBmpEx.Draw( pOutDev, Point( nXPos, nYPos ), aPixSize ); - - nXPos += nWidth; - } - - nXPos = nLeft; - nYPos += nHeight; - } - - pOutDev->Pop(); -} - // ------------------------------------------------------------------------ Animation XOutBitmap::MirrorAnimation( const Animation& rAnimation, sal_Bool bHMirr, sal_Bool bVMirr ) diff --git a/svx/source/xoutdev/xattr.cxx b/svx/source/xoutdev/xattr.cxx index b37320beed96..8f4906985bbc 100644 --- a/svx/source/xoutdev/xattr.cxx +++ b/svx/source/xoutdev/xattr.cxx @@ -3069,11 +3069,6 @@ bool XFillColorItem::PutValue( const ::com::sun::star::uno::Any& rVal, sal_uInt8 // ----------------------------- TYPEINIT1_AUTOFACTORY(XSecondaryFillColorItem, XColorItem); -XSecondaryFillColorItem::XSecondaryFillColorItem(sal_Int32 nIndex, const Color& rTheColor) : - XColorItem(XATTR_SECONDARYFILLCOLOR, nIndex, rTheColor) -{ -} - XSecondaryFillColorItem::XSecondaryFillColorItem(const XubString& rName, const Color& rTheColor) : XColorItem(XATTR_SECONDARYFILLCOLOR, rName, rTheColor) { |