Kaydet (Commit) 953f3278 authored tarafından Noel Grandin's avatar Noel Grandin

convert COPYAREA constant to bool flag

since there is only value in this flags thing

Change-Id: I86d7a3a358c467a9748b00e1ba8c09106f282947
üst 25a47c5c
...@@ -186,9 +186,6 @@ namespace o3tl ...@@ -186,9 +186,6 @@ namespace o3tl
template<> struct typed_flags<DrawTextFlags> : is_typed_flags<DrawTextFlags, 0xffff> {}; template<> struct typed_flags<DrawTextFlags> : is_typed_flags<DrawTextFlags, 0xffff> {};
} }
// Flags for CopyArea()
#define COPYAREA_WINDOWINVALIDATE ((sal_uInt16)0x0001)
// Flags for DrawImage() // Flags for DrawImage()
#define IMAGE_DRAW_DISABLE ((sal_uInt16)0x0001) #define IMAGE_DRAW_DISABLE ((sal_uInt16)0x0001)
#define IMAGE_DRAW_HIGHLIGHT ((sal_uInt16)0x0002) #define IMAGE_DRAW_HIGHLIGHT ((sal_uInt16)0x0002)
...@@ -555,7 +552,7 @@ public: ...@@ -555,7 +552,7 @@ public:
virtual void CopyArea( virtual void CopyArea(
const Point& rDestPt, const Point& rDestPt,
const Point& rSrcPt, const Size& rSrcSize, const Point& rSrcPt, const Size& rSrcSize,
sal_uInt16 nFlags = 0 ); bool bWindowInvalidate = false );
// Call before and after a paint operation to reduce flushing // Call before and after a paint operation to reduce flushing
void BeginPaint(); void BeginPaint();
...@@ -563,7 +560,7 @@ public: ...@@ -563,7 +560,7 @@ public:
protected: protected:
virtual void CopyDeviceArea( SalTwoRect& aPosAry, sal_uInt32 nFlags); virtual void CopyDeviceArea( SalTwoRect& aPosAry, bool bWindowInvalidate = false);
SAL_DLLPRIVATE void drawOutDevDirect ( const OutputDevice* pSrcDev, SalTwoRect& rPosAry ); SAL_DLLPRIVATE void drawOutDevDirect ( const OutputDevice* pSrcDev, SalTwoRect& rPosAry );
......
...@@ -399,7 +399,7 @@ public: ...@@ -399,7 +399,7 @@ public:
const OutputDevice& rOutDev ) SAL_OVERRIDE; const OutputDevice& rOutDev ) SAL_OVERRIDE;
virtual void CopyArea( const Point& rDestPt, virtual void CopyArea( const Point& rDestPt,
const Point& rSrcPt, const Size& rSrcSize, const Point& rSrcPt, const Size& rSrcSize,
sal_uInt16 nFlags = 0 ) SAL_OVERRIDE; bool bWindowInvalidate = false ) SAL_OVERRIDE;
virtual void DrawImage( const Point&, const Image&, sal_uInt16 ) SAL_OVERRIDE; virtual void DrawImage( const Point&, const Image&, sal_uInt16 ) SAL_OVERRIDE;
virtual void DrawImage( const Point&, const Size&, virtual void DrawImage( const Point&, const Size&,
......
...@@ -699,7 +699,7 @@ protected: ...@@ -699,7 +699,7 @@ protected:
// FIXME: this is a hack to workaround missing layout functionality // FIXME: this is a hack to workaround missing layout functionality
SAL_DLLPRIVATE void ImplAdjustNWFSizes(); SAL_DLLPRIVATE void ImplAdjustNWFSizes();
virtual void CopyDeviceArea( SalTwoRect& aPosAry, sal_uInt32 nFlags) SAL_OVERRIDE; virtual void CopyDeviceArea( SalTwoRect& aPosAry, bool bWindowInvalidate = false) SAL_OVERRIDE;
virtual void ClipToPaintRegion( Rectangle& rDstRect ) SAL_OVERRIDE; virtual void ClipToPaintRegion( Rectangle& rDstRect ) SAL_OVERRIDE;
virtual bool UsePolyPolygonForComplexGradient() SAL_OVERRIDE; virtual bool UsePolyPolygonForComplexGradient() SAL_OVERRIDE;
......
...@@ -339,7 +339,7 @@ void Printer::DrawOutDev( const Point& /*rDestPt*/, const Size& /*rDestSize*/, ...@@ -339,7 +339,7 @@ void Printer::DrawOutDev( const Point& /*rDestPt*/, const Size& /*rDestSize*/,
void Printer::CopyArea( const Point& /*rDestPt*/, void Printer::CopyArea( const Point& /*rDestPt*/,
const Point& /*rSrcPt*/, const Size& /*rSrcSize*/, const Point& /*rSrcPt*/, const Size& /*rSrcSize*/,
sal_uInt16 /*nFlags*/ ) bool /*bWindowInvalidate*/ )
{ {
DBG_ASSERT( false, "Don't use OutputDevice::CopyArea(...) with printer devices!" ); DBG_ASSERT( false, "Don't use OutputDevice::CopyArea(...) with printer devices!" );
} }
......
...@@ -611,7 +611,7 @@ void OutputDevice::DrawOutDev( const Point& rDestPt, const Size& rDestSize, ...@@ -611,7 +611,7 @@ void OutputDevice::DrawOutDev( const Point& rDestPt, const Size& rDestSize,
void OutputDevice::CopyArea( const Point& rDestPt, void OutputDevice::CopyArea( const Point& rDestPt,
const Point& rSrcPt, const Size& rSrcSize, const Point& rSrcPt, const Size& rSrcSize,
sal_uInt16 nFlags ) bool bWindowInvalidate )
{ {
if ( ImplIsRecordLayout() ) if ( ImplIsRecordLayout() )
return; return;
...@@ -646,18 +646,18 @@ void OutputDevice::CopyArea( const Point& rDestPt, ...@@ -646,18 +646,18 @@ void OutputDevice::CopyArea( const Point& rDestPt,
AdjustTwoRect( aPosAry, aSrcOutRect ); AdjustTwoRect( aPosAry, aSrcOutRect );
CopyDeviceArea ( aPosAry, nFlags ); CopyDeviceArea( aPosAry, bWindowInvalidate );
} }
SetRasterOp( eOldRop ); SetRasterOp( eOldRop );
if( mpAlphaVDev ) if( mpAlphaVDev )
mpAlphaVDev->CopyArea( rDestPt, rSrcPt, rSrcSize, nFlags ); mpAlphaVDev->CopyArea( rDestPt, rSrcPt, rSrcSize, bWindowInvalidate );
} }
// Direct OutputDevice drawing protected function // Direct OutputDevice drawing protected function
void OutputDevice::CopyDeviceArea( SalTwoRect& aPosAry, sal_uInt32 /*nFlags*/) void OutputDevice::CopyDeviceArea( SalTwoRect& aPosAry, bool /*bWindowInvalidate*/)
{ {
if (aPosAry.mnSrcWidth == 0 || aPosAry.mnSrcHeight == 0 || aPosAry.mnDestWidth == 0 || aPosAry.mnDestHeight == 0) if (aPosAry.mnSrcWidth == 0 || aPosAry.mnSrcHeight == 0 || aPosAry.mnDestWidth == 0 || aPosAry.mnDestHeight == 0)
return; return;
......
...@@ -1292,12 +1292,12 @@ ImplWinData* Window::ImplGetWinData() const ...@@ -1292,12 +1292,12 @@ ImplWinData* Window::ImplGetWinData() const
} }
void Window::CopyDeviceArea( SalTwoRect& aPosAry, sal_uInt32 nFlags ) void Window::CopyDeviceArea( SalTwoRect& aPosAry, bool bWindowInvalidate )
{ {
if (aPosAry.mnSrcWidth == 0 || aPosAry.mnSrcHeight == 0 || aPosAry.mnDestWidth == 0 || aPosAry.mnDestHeight == 0) if (aPosAry.mnSrcWidth == 0 || aPosAry.mnSrcHeight == 0 || aPosAry.mnDestWidth == 0 || aPosAry.mnDestHeight == 0)
return; return;
if (nFlags & COPYAREA_WINDOWINVALIDATE) if (bWindowInvalidate)
{ {
const Rectangle aSrcRect(Point(aPosAry.mnSrcX, aPosAry.mnSrcY), const Rectangle aSrcRect(Point(aPosAry.mnSrcX, aPosAry.mnSrcY),
Size(aPosAry.mnSrcWidth, aPosAry.mnSrcHeight)); Size(aPosAry.mnSrcWidth, aPosAry.mnSrcHeight));
...@@ -1315,7 +1315,7 @@ void Window::CopyDeviceArea( SalTwoRect& aPosAry, sal_uInt32 nFlags ) ...@@ -1315,7 +1315,7 @@ void Window::CopyDeviceArea( SalTwoRect& aPosAry, sal_uInt32 nFlags )
return; return;
} }
OutputDevice::CopyDeviceArea(aPosAry, nFlags); OutputDevice::CopyDeviceArea(aPosAry, bWindowInvalidate);
} }
SalGraphics* Window::ImplGetFrameGraphics() const SalGraphics* Window::ImplGetFrameGraphics() const
......
...@@ -341,7 +341,7 @@ void setupMethodStubs( functor_vector_type& res ) ...@@ -341,7 +341,7 @@ void setupMethodStubs( functor_vector_type& res )
boost::bind( boost::bind(
&OutputDevice::CopyArea, &OutputDevice::CopyArea,
_1, _1,
aPt1,aPt3,aRect2.GetSize(),(sal_uInt16)0 )); aPt1, aPt3, aRect2.GetSize(), false ));
#ifdef NEEDS_QUALIY_PARAMTER #ifdef NEEDS_QUALIY_PARAMTER
/* void DrawBitmap( const Point& rDestPt, /* void DrawBitmap( const Point& rDestPt,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment