diff options
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/inc/impgraph.hxx | 20 | ||||
-rw-r--r-- | vcl/qa/cppunit/svm/svmtest.cxx | 2 | ||||
-rw-r--r-- | vcl/source/animate/Animation.cxx | 28 | ||||
-rw-r--r-- | vcl/source/filter/graphicfilter.cxx | 2 | ||||
-rw-r--r-- | vcl/source/gdi/gdimtf.cxx | 69 | ||||
-rw-r--r-- | vcl/source/gdi/graph.cxx | 72 | ||||
-rw-r--r-- | vcl/source/gdi/impgraph.cxx | 28 | ||||
-rw-r--r-- | vcl/source/gdi/oldprintadaptor.cxx | 2 | ||||
-rw-r--r-- | vcl/source/gdi/pdfwriter_impl2.cxx | 4 | ||||
-rw-r--r-- | vcl/source/gdi/print3.cxx | 2 | ||||
-rw-r--r-- | vcl/source/graphic/GraphicObject.cxx | 68 | ||||
-rw-r--r-- | vcl/source/graphic/GraphicObject2.cxx | 46 | ||||
-rw-r--r-- | vcl/source/outdev/outdev.cxx | 2 | ||||
-rw-r--r-- | vcl/source/outdev/transparent.cxx | 6 | ||||
-rw-r--r-- | vcl/source/window/paint.cxx | 2 | ||||
-rw-r--r-- | vcl/source/window/printdlg.cxx | 2 | ||||
-rw-r--r-- | vcl/workben/mtfdemo.cxx | 2 |
17 files changed, 177 insertions, 180 deletions
diff --git a/vcl/inc/impgraph.hxx b/vcl/inc/impgraph.hxx index acd7abf9bb2e..142627df780d 100644 --- a/vcl/inc/impgraph.hxx +++ b/vcl/inc/impgraph.hxx @@ -158,17 +158,15 @@ private: sal_uLong getSizeBytes() const; - void draw( OutputDevice* pOutDev, - const Point& rDestPt ) const; - void draw( OutputDevice* pOutDev, - const Point& rDestPt, - const Size& rDestSize ) const; - - void startAnimation( OutputDevice* pOutDev, - const Point& rDestPt, - const Size& rDestSize, - tools::Long nExtraData, - OutputDevice* pFirstFrameOutDev ); + void draw(OutputDevice& rOutDev, const Point& rDestPt) const; + void draw(OutputDevice& rOutDev, const Point& rDestPt, + const Size& rDestSize) const; + + void startAnimation(OutputDevice& rOutDev, + const Point& rDestPt, + const Size& rDestSize, + tools::Long nExtraData, + OutputDevice* pFirstFrameOutDev); void stopAnimation( const OutputDevice* pOutputDevice, tools::Long nExtraData ); diff --git a/vcl/qa/cppunit/svm/svmtest.cxx b/vcl/qa/cppunit/svm/svmtest.cxx index d9687cb135f1..06ec5841f8f6 100644 --- a/vcl/qa/cppunit/svm/svmtest.cxx +++ b/vcl/qa/cppunit/svm/svmtest.cxx @@ -262,7 +262,7 @@ void SvmTest::checkRendering(ScopedVclPtrInstance<VirtualDevice> const & pVirtua BitmapEx aSourceBitmapEx = pVirtualDev->GetBitmapEx(Point(), Size(10, 10)); ScopedVclPtrInstance<VirtualDevice> pVirtualDevResult; pVirtualDevResult->SetOutputSizePixel(Size(10, 10)); - const_cast<GDIMetaFile&>(rMetaFile).Play(pVirtualDevResult.get()); + const_cast<GDIMetaFile&>(rMetaFile).Play(*pVirtualDevResult); BitmapEx aResultBitmapEx = pVirtualDevResult->GetBitmapEx(Point(), Size(10, 10)); const bool bWriteCompareBitmap = false; diff --git a/vcl/source/animate/Animation.cxx b/vcl/source/animate/Animation.cxx index f4faea88a47d..06de392f584b 100644 --- a/vcl/source/animate/Animation.cxx +++ b/vcl/source/animate/Animation.cxx @@ -159,28 +159,28 @@ BitmapChecksum Animation::GetChecksum() const return nCrc; } -bool Animation::Start(OutputDevice* pOut, const Point& rDestPt, const Size& rDestSz, +bool Animation::Start(OutputDevice& rOut, const Point& rDestPt, const Size& rDestSz, tools::Long nExtraData, OutputDevice* pFirstFrameOutDev) { bool bRet = false; if (!maList.empty()) { - if ((pOut->GetOutDevType() == OUTDEV_WINDOW) && !mbLoopTerminated + if ((rOut.GetOutDevType() == OUTDEV_WINDOW) && !mbLoopTerminated && (ANIMATION_TIMEOUT_ON_CLICK != maList[mnPos]->mnWait)) { bool differs = true; auto itAnimView = std::find_if( maViewList.begin(), maViewList.end(), - [pOut, nExtraData](const std::unique_ptr<ImplAnimView>& pAnimView) -> bool { - return pAnimView->matches(pOut, nExtraData); + [&rOut, nExtraData](const std::unique_ptr<ImplAnimView>& pAnimView) -> bool { + return pAnimView->matches(&rOut, nExtraData); }); if (itAnimView != maViewList.end()) { if ((*itAnimView)->getOutPos() == rDestPt - && (*itAnimView)->getOutSizePix() == pOut->LogicToPixel(rDestSz)) + && (*itAnimView)->getOutSizePix() == rOut.LogicToPixel(rDestSz)) { (*itAnimView)->repaint(); differs = false; @@ -198,7 +198,7 @@ bool Animation::Start(OutputDevice* pOut, const Point& rDestPt, const Size& rDes if (differs) maViewList.emplace_back( - new ImplAnimView(this, pOut, rDestPt, rDestSz, nExtraData, pFirstFrameOutDev)); + new ImplAnimView(this, &rOut, rDestPt, rDestSz, nExtraData, pFirstFrameOutDev)); if (!mbIsInAnimation) { @@ -207,7 +207,7 @@ bool Animation::Start(OutputDevice* pOut, const Point& rDestPt, const Size& rDes } } else - Draw(pOut, rDestPt, rDestSz); + Draw(rOut, rDestPt, rDestSz); bRet = true; } @@ -230,12 +230,12 @@ void Animation::Stop(const OutputDevice* pOut, tools::Long nExtraData) } } -void Animation::Draw(OutputDevice* pOut, const Point& rDestPt) const +void Animation::Draw(OutputDevice& rOut, const Point& rDestPt) const { - Draw(pOut, rDestPt, pOut->PixelToLogic(maGlobalSize)); + Draw(rOut, rDestPt, rOut.PixelToLogic(maGlobalSize)); } -void Animation::Draw(OutputDevice* pOut, const Point& rDestPt, const Size& rDestSz) const +void Animation::Draw(OutputDevice& rOut, const Point& rDestPt, const Size& rDestSz) const { const size_t nCount = maList.size(); @@ -244,10 +244,10 @@ void Animation::Draw(OutputDevice* pOut, const Point& rDestPt, const Size& rDest AnimationBitmap* pObj = maList[std::min(mnPos, nCount - 1)].get(); - if (pOut->GetConnectMetaFile() || (pOut->GetOutDevType() == OUTDEV_PRINTER)) - maList[0]->maBitmapEx.Draw(pOut, rDestPt, rDestSz); + if (rOut.GetConnectMetaFile() || (rOut.GetOutDevType() == OUTDEV_PRINTER)) + maList[0]->maBitmapEx.Draw(&rOut, rDestPt, rDestSz); else if (ANIMATION_TIMEOUT_ON_CLICK == pObj->mnWait) - pObj->maBitmapEx.Draw(pOut, rDestPt, rDestSz); + pObj->maBitmapEx.Draw(&rOut, rDestPt, rDestSz); else { const size_t nOldPos = mnPos; @@ -255,7 +255,7 @@ void Animation::Draw(OutputDevice* pOut, const Point& rDestPt, const Size& rDest const_cast<Animation*>(this)->mnPos = nCount - 1; { - ImplAnimView{ const_cast<Animation*>(this), pOut, rDestPt, rDestSz, 0 }; + ImplAnimView{ const_cast<Animation*>(this), &rOut, rDestPt, rDestSz, 0 }; } const_cast<Animation*>(this)->mnPos = nOldPos; diff --git a/vcl/source/filter/graphicfilter.cxx b/vcl/source/filter/graphicfilter.cxx index b6ebf1d4aace..18e8757adfa7 100644 --- a/vcl/source/filter/graphicfilter.cxx +++ b/vcl/source/filter/graphicfilter.cxx @@ -1591,7 +1591,7 @@ ErrCode GraphicFilter::ExportGraphic( const Graphic& rGraphic, const OUString& r aVirDev->SetMapMode(MapMode(MapUnit::MapPixel)); aVirDev->SetOutputSizePixel(aSizePixel); Graphic aGraphic2=aGraphic; - aGraphic2.Draw(aVirDev.get(),Point(0,0),aSizePixel); // this changes the MapMode + aGraphic2.Draw(*aVirDev, Point(0, 0), aSizePixel); // this changes the MapMode aVirDev->SetMapMode(MapMode(MapUnit::MapPixel)); aGraphic=Graphic(aVirDev->GetBitmapEx(Point(0,0),aSizePixel)); } diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx index 0aea5f0513bd..cceaef8b9afd 100644 --- a/vcl/source/gdi/gdimtf.cxx +++ b/vcl/source/gdi/gdimtf.cxx @@ -341,14 +341,14 @@ void GDIMetaFile::Play( GDIMetaFile& rMtf ) } } -void GDIMetaFile::Play( OutputDevice* pOut, size_t nPos ) +void GDIMetaFile::Play(OutputDevice& rOut, size_t nPos) { if( m_bRecord ) return; MetaAction* pAction = GetCurAction(); const size_t nObjCount = m_aList.size(); - size_t nSyncCount = pOut->GetSyncCount(); + size_t nSyncCount = rOut.GetSyncCount(); if( nPos > nObjCount ) nPos = nObjCount; @@ -357,24 +357,24 @@ void GDIMetaFile::Play( OutputDevice* pOut, size_t nPos ) // This is necessary, since old metafiles don't even know of these // recent add-ons. Newer metafiles must of course explicitly set // those states. - pOut->Push( PushFlags::TEXTLAYOUTMODE|PushFlags::TEXTLANGUAGE ); - pOut->SetLayoutMode( ComplexTextLayoutFlags::Default ); - pOut->SetDigitLanguage( LANGUAGE_SYSTEM ); + rOut.Push(PushFlags::TEXTLAYOUTMODE|PushFlags::TEXTLANGUAGE); + rOut.SetLayoutMode(ComplexTextLayoutFlags::Default); + rOut.SetDigitLanguage(LANGUAGE_SYSTEM); - SAL_INFO( "vcl.gdi", "GDIMetaFile::Play on device of size: " << pOut->GetOutputSizePixel().Width() << " " << pOut->GetOutputSizePixel().Height()); + SAL_INFO( "vcl.gdi", "GDIMetaFile::Play on device of size: " << rOut.GetOutputSizePixel().Width() << " " << rOut.GetOutputSizePixel().Height()); - if( !ImplPlayWithRenderer( pOut, Point(0,0), pOut->GetOutputSize() ) ) { + if (!ImplPlayWithRenderer(rOut, Point(0,0), rOut.GetOutputSize())) { size_t i = 0; for( size_t nCurPos = m_nCurrentActionElement; nCurPos < nPos; nCurPos++ ) { if( pAction ) { - pAction->Execute( pOut ); + pAction->Execute(&rOut); // flush output from time to time if( i++ > nSyncCount ) { - pOut->Flush(); + rOut.Flush(); i = 0; } } @@ -382,17 +382,17 @@ void GDIMetaFile::Play( OutputDevice* pOut, size_t nPos ) pAction = NextAction(); } } - pOut->Pop(); + rOut.Pop(); } -bool GDIMetaFile::ImplPlayWithRenderer( OutputDevice* pOut, const Point& rPos, Size rLogicDestSize ) +bool GDIMetaFile::ImplPlayWithRenderer(OutputDevice& rOut, const Point& rPos, Size rLogicDestSize) { if (!m_bUseCanvas) return false; - Size rDestSize( pOut->LogicToPixel( rLogicDestSize ) ); + Size rDestSize(rOut.LogicToPixel(rLogicDestSize)); - const vcl::Window* win = pOut->GetOwnerWindow(); + const vcl::Window* win = rOut.GetOwnerWindow(); if (!win) win = Application::GetActiveTopWindow(); @@ -432,10 +432,10 @@ bool GDIMetaFile::ImplPlayWithRenderer( OutputDevice* pOut, const Point& rPos, S BitmapEx aBitmapEx; if( aBitmapEx.Create( xBitmapCanvas, aSize ) ) { - if (pOut->GetMapMode().GetMapUnit() == MapUnit::MapPixel) - pOut->DrawBitmapEx( rPos, aBitmapEx ); + if (rOut.GetMapMode().GetMapUnit() == MapUnit::MapPixel) + rOut.DrawBitmapEx( rPos, aBitmapEx ); else - pOut->DrawBitmapEx( rPos, rLogicDestSize, aBitmapEx ); + rOut.DrawBitmapEx( rPos, rLogicDestSize, aBitmapEx ); return true; } } @@ -454,21 +454,21 @@ bool GDIMetaFile::ImplPlayWithRenderer( OutputDevice* pOut, const Point& rPos, S return false; } -void GDIMetaFile::Play( OutputDevice* pOut, const Point& rPos, - const Size& rSize ) +void GDIMetaFile::Play(OutputDevice& rOut, const Point& rPos, + const Size& rSize) { MapMode aDrawMap( GetPrefMapMode() ); - Size aDestSize( pOut->LogicToPixel( rSize ) ); + Size aDestSize(rOut.LogicToPixel(rSize)); if( !aDestSize.Width() || !aDestSize.Height() ) return; - GDIMetaFile* pMtf = pOut->GetConnectMetaFile(); + GDIMetaFile* pMtf = rOut.GetConnectMetaFile(); - if( ImplPlayWithRenderer( pOut, rPos, rSize ) ) + if (ImplPlayWithRenderer(rOut, rPos, rSize)) return; - Size aTmpPrefSize( pOut->LogicToPixel( GetPrefSize(), aDrawMap ) ); + Size aTmpPrefSize(rOut.LogicToPixel(GetPrefSize(), aDrawMap)); if( !aTmpPrefSize.Width() ) aTmpPrefSize.setWidth( aDestSize.Width() ); @@ -485,35 +485,34 @@ void GDIMetaFile::Play( OutputDevice* pOut, const Point& rPos, // #i47260# Convert logical output position to offset within // the metafile's mapmode. Therefore, disable pixel offset on // outdev, it's inverse mnOutOffLogicX/Y is calculated for a - // different mapmode (the one currently set on pOut, that is) + // different mapmode (the one currently set on rOut, that is) // - thus, aDrawMap's origin would generally be wrong. And // even _if_ aDrawMap is similar to pOutDev's current mapmode, // it's _still_ undesirable to have pixel offset unequal zero, // because one would still get round-off errors (the // round-trip error for LogicToPixel( PixelToLogic() ) was the // reason for having pixel offset in the first place). - const Size& rOldOffset( pOut->GetPixelOffset() ); + const Size& rOldOffset(rOut.GetPixelOffset()); const Size aEmptySize; - pOut->SetPixelOffset( aEmptySize ); - aDrawMap.SetOrigin( pOut->PixelToLogic( pOut->LogicToPixel( rPos ), aDrawMap ) ); - pOut->SetPixelOffset( rOldOffset ); + rOut.SetPixelOffset(aEmptySize); + aDrawMap.SetOrigin(rOut.PixelToLogic(rOut.LogicToPixel(rPos), aDrawMap)); + rOut.SetPixelOffset(rOldOffset); - pOut->Push(); + rOut.Push(); bool bIsRecord = (pMtf && pMtf->IsRecord()); - pOut->SetMetafileMapMode(aDrawMap, bIsRecord); + rOut.SetMetafileMapMode(aDrawMap, bIsRecord); // #i23407# Set backwards-compatible text language and layout mode // This is necessary, since old metafiles don't even know of these // recent add-ons. Newer metafiles must of course explicitly set // those states. - pOut->SetLayoutMode( ComplexTextLayoutFlags::Default ); - pOut->SetDigitLanguage( LANGUAGE_SYSTEM ); + rOut.SetLayoutMode(ComplexTextLayoutFlags::Default); + rOut.SetDigitLanguage(LANGUAGE_SYSTEM); - Play( pOut ); - - pOut->Pop(); + Play(rOut); + rOut.Pop(); } void GDIMetaFile::Pause( bool _bPause ) @@ -2826,7 +2825,7 @@ bool GDIMetaFile::CreateThumbnail(BitmapEx& rBitmapEx, BmpConversion eColorConve // draw metafile into VDev const_cast<GDIMetaFile *>(this)->WindStart(); - const_cast<GDIMetaFile *>(this)->Play(aVDev.get(), Point(), aAntialias); + const_cast<GDIMetaFile *>(this)->Play(*aVDev, Point(), aAntialias); // get paint bitmap BitmapEx aBitmap( aVDev->GetBitmapEx( aNullPt, aVDev->GetOutputSizePixel() ) ); diff --git a/vcl/source/gdi/graph.cxx b/vcl/source/gdi/graph.cxx index df961fba47f2..5e71e5d1a0d4 100644 --- a/vcl/source/gdi/graph.cxx +++ b/vcl/source/gdi/graph.cxx @@ -34,23 +34,23 @@ using namespace ::com::sun::star; namespace { -void ImplDrawDefault( OutputDevice* pOutDev, const OUString* pText, - vcl::Font* pFont, const BitmapEx* pBitmapEx, - const Point& rDestPt, const Size& rDestSize ) +void ImplDrawDefault(OutputDevice& rOutDev, const OUString* pText, + vcl::Font* pFont, const BitmapEx* pBitmapEx, + const Point& rDestPt, const Size& rDestSize) { - sal_uInt16 nPixel = static_cast<sal_uInt16>(pOutDev->PixelToLogic( Size( 1, 1 ) ).Width()); + sal_uInt16 nPixel = static_cast<sal_uInt16>(rOutDev.PixelToLogic( Size( 1, 1 ) ).Width()); sal_uInt16 nPixelWidth = nPixel; Point aPoint( rDestPt.X() + nPixelWidth, rDestPt.Y() + nPixelWidth ); Size aSize( rDestSize.Width() - ( nPixelWidth << 1 ), rDestSize.Height() - ( nPixelWidth << 1 ) ); bool bFilled = ( pBitmapEx != nullptr || pFont != nullptr ); tools::Rectangle aBorderRect( aPoint, aSize ); - pOutDev->Push(); + rOutDev.Push(); - pOutDev->SetFillColor(); + rOutDev.SetFillColor(); // On the printer a black rectangle and on the screen one with 3D effect - pOutDev->DrawBorder(aBorderRect); + rOutDev.DrawBorder(aBorderRect); aPoint.AdjustX(nPixelWidth + 2*nPixel ); aPoint.AdjustY(nPixelWidth + 2*nPixel ); @@ -59,20 +59,20 @@ void ImplDrawDefault( OutputDevice* pOutDev, const OUString* pText, if( !aSize.IsEmpty() && pBitmapEx && !pBitmapEx->IsEmpty() ) { - Size aBitmapSize( pOutDev->PixelToLogic( pBitmapEx->GetSizePixel() ) ); + Size aBitmapSize( rOutDev.PixelToLogic( pBitmapEx->GetSizePixel() ) ); if( aSize.Height() > aBitmapSize.Height() && aSize.Width() > aBitmapSize.Width() ) { - pOutDev->DrawBitmapEx( aPoint, *pBitmapEx ); + rOutDev.DrawBitmapEx( aPoint, *pBitmapEx ); aPoint.AdjustX(aBitmapSize.Width() + 2*nPixel ); aSize.AdjustWidth( -(aBitmapSize.Width() + 2*nPixel) ); } } - if ( !aSize.IsEmpty() && pFont && pText && pText->getLength() && pOutDev->IsOutputEnabled() ) + if ( !aSize.IsEmpty() && pFont && pText && pText->getLength() && rOutDev.IsOutputEnabled() ) { MapMode aMapMode( MapUnit::MapPoint ); - Size aSz = pOutDev->LogicToLogic( Size( 0, 12 ), &aMapMode, nullptr ); + Size aSz = rOutDev.LogicToLogic( Size( 0, 12 ), &aMapMode, nullptr ); tools::Long nThreshold = aSz.Height() / 2; tools::Long nStep = nThreshold / 3; @@ -82,10 +82,10 @@ void ImplDrawDefault( OutputDevice* pOutDev, const OUString* pText, for(;; aSz.AdjustHeight( -nStep ) ) { pFont->SetFontSize( aSz ); - pOutDev->SetFont( *pFont ); + rOutDev.SetFont( *pFont ); - tools::Long nTextHeight = pOutDev->GetTextHeight(); - tools::Long nTextWidth = pOutDev->GetTextWidth( *pText ); + tools::Long nTextHeight = rOutDev.GetTextHeight(); + tools::Long nTextWidth = rOutDev.GetTextWidth( *pText ); if ( nTextHeight ) { // The approximation does not respect imprecisions caused @@ -111,7 +111,7 @@ void ImplDrawDefault( OutputDevice* pOutDev, const OUString* pText, nNext++; while ( nStart+nNext < pText->getLength() && (*pText)[nStart+nNext] != ' ' ) nNext++; - nTextWidth = pOutDev->GetTextWidth( *pText, nStart, nNext ); + nTextWidth = rOutDev.GetTextWidth( *pText, nStart, nNext ); if ( nTextWidth > aSize.Width() ) break; nLen = nNext; @@ -119,10 +119,10 @@ void ImplDrawDefault( OutputDevice* pOutDev, const OUString* pText, while ( nStart+nNext < pText->getLength() ); sal_Int32 n = nLen; - nTextWidth = pOutDev->GetTextWidth( *pText, nStart, n ); + nTextWidth = rOutDev.GetTextWidth( *pText, nStart, n ); while( nTextWidth > aSize.Width() ) - nTextWidth = pOutDev->GetTextWidth( *pText, nStart, --n ); - pOutDev->DrawText( aPoint, *pText, nStart, n ); + nTextWidth = rOutDev.GetTextWidth( *pText, nStart, --n ); + rOutDev.DrawText( aPoint, *pText, nStart, n ); aPoint.AdjustY(nTextHeight ); nStart = sal::static_int_cast<sal_uInt16>(nStart + nLen); @@ -149,12 +149,12 @@ void ImplDrawDefault( OutputDevice* pOutDev, const OUString* pText, aBorderRect.AdjustRight( -1 ); aBorderRect.AdjustBottom( -1 ); - pOutDev->SetLineColor( COL_LIGHTRED ); - pOutDev->DrawLine( aBorderRect.TopLeft(), aBorderRect.BottomRight() ); - pOutDev->DrawLine( aBorderRect.TopRight(), aBorderRect.BottomLeft() ); + rOutDev.SetLineColor( COL_LIGHTRED ); + rOutDev.DrawLine( aBorderRect.TopLeft(), aBorderRect.BottomRight() ); + rOutDev.DrawLine( aBorderRect.TopRight(), aBorderRect.BottomLeft() ); } - pOutDev->Pop(); + rOutDev.Pop(); } } // end anonymous namespace @@ -424,33 +424,33 @@ sal_uLong Graphic::GetSizeBytes() const return mxImpGraphic->getSizeBytes(); } -void Graphic::Draw( OutputDevice* pOutDev, const Point& rDestPt ) const +void Graphic::Draw(OutputDevice& rOutDev, const Point& rDestPt) const { - mxImpGraphic->draw( pOutDev, rDestPt ); + mxImpGraphic->draw(rOutDev, rDestPt); } -void Graphic::Draw( OutputDevice* pOutDev, - const Point& rDestPt, const Size& rDestSz ) const +void Graphic::Draw(OutputDevice& rOutDev, const Point& rDestPt, + const Size& rDestSz) const { if( GraphicType::Default == mxImpGraphic->getType() ) - ImplDrawDefault( pOutDev, nullptr, nullptr, nullptr, rDestPt, rDestSz ); + ImplDrawDefault(rOutDev, nullptr, nullptr, nullptr, rDestPt, rDestSz); else - mxImpGraphic->draw( pOutDev, rDestPt, rDestSz ); + mxImpGraphic->draw(rOutDev, rDestPt, rDestSz); } -void Graphic::DrawEx( OutputDevice* pOutDev, const OUString& rText, - vcl::Font& rFont, const BitmapEx& rBitmap, - const Point& rDestPt, const Size& rDestSz ) +void Graphic::DrawEx(OutputDevice& rOutDev, const OUString& rText, + vcl::Font& rFont, const BitmapEx& rBitmap, + const Point& rDestPt, const Size& rDestSz) { - ImplDrawDefault( pOutDev, &rText, &rFont, &rBitmap, rDestPt, rDestSz ); + ImplDrawDefault(rOutDev, &rText, &rFont, &rBitmap, rDestPt, rDestSz); } -void Graphic::StartAnimation( OutputDevice* pOutDev, const Point& rDestPt, - const Size& rDestSz, tools::Long nExtraData, - OutputDevice* pFirstFrameOutDev ) +void Graphic::StartAnimation(OutputDevice& rOutDev, const Point& rDestPt, + const Size& rDestSz, tools::Long nExtraData, + OutputDevice* pFirstFrameOutDev) { ImplTestRefCount(); - mxImpGraphic->startAnimation( pOutDev, rDestPt, rDestSz, nExtraData, pFirstFrameOutDev ); + mxImpGraphic->startAnimation(rOutDev, rDestPt, rDestSz, nExtraData, pFirstFrameOutDev); } void Graphic::StopAnimation( const OutputDevice* pOutDev, tools::Long nExtraData ) diff --git a/vcl/source/gdi/impgraph.cxx b/vcl/source/gdi/impgraph.cxx index 6035771877dd..9d04ab7bde12 100644 --- a/vcl/source/gdi/impgraph.cxx +++ b/vcl/source/gdi/impgraph.cxx @@ -619,7 +619,7 @@ Bitmap ImpGraphic::getBitmap(const GraphicConversionParameters& rParameters) con aVDev->SetAntialiasing(aVDev->GetAntialiasing() | AntialiasingFlags::PixelSnapHairline); } - draw( aVDev.get(), Point(), aDrawSize ); + draw(*aVDev, Point(), aDrawSize); // use maBitmapEx as local buffer for rendered metafile const_cast< ImpGraphic* >(this)->maBitmapEx = aVDev->GetBitmapEx( Point(), aVDev->GetOutputSizePixel() ); @@ -1001,7 +1001,7 @@ sal_uLong ImpGraphic::getSizeBytes() const return mnSizeBytes; } -void ImpGraphic::draw(OutputDevice* pOutDev, const Point& rDestPt) const +void ImpGraphic::draw(OutputDevice& rOutDev, const Point& rDestPt) const { ensureAvailable(); @@ -1020,18 +1020,18 @@ void ImpGraphic::draw(OutputDevice* pOutDev, const Point& rDestPt) const if (mpAnimation) { - mpAnimation->Draw(pOutDev, rDestPt); + mpAnimation->Draw(rOutDev, rDestPt); } else { - maBitmapEx.Draw(pOutDev, rDestPt); + maBitmapEx.Draw(&rOutDev, rDestPt); } } break; case GraphicType::GdiMetafile: { - draw(pOutDev, rDestPt, maMetaFile.GetPrefSize()); + draw(rOutDev, rDestPt, maMetaFile.GetPrefSize()); } break; @@ -1041,8 +1041,8 @@ void ImpGraphic::draw(OutputDevice* pOutDev, const Point& rDestPt) const } } -void ImpGraphic::draw(OutputDevice* pOutDev, - const Point& rDestPt, const Size& rDestSize) const +void ImpGraphic::draw(OutputDevice& rOutDev, + const Point& rDestPt, const Size& rDestSize) const { ensureAvailable(); @@ -1061,11 +1061,11 @@ void ImpGraphic::draw(OutputDevice* pOutDev, if (mpAnimation) { - mpAnimation->Draw(pOutDev, rDestPt, rDestSize); + mpAnimation->Draw(rOutDev, rDestPt, rDestSize); } else { - maBitmapEx.Draw(pOutDev, rDestPt, rDestSize); + maBitmapEx.Draw(&rOutDev, rDestPt, rDestSize); } } break; @@ -1073,7 +1073,7 @@ void ImpGraphic::draw(OutputDevice* pOutDev, case GraphicType::GdiMetafile: { const_cast<ImpGraphic*>(this)->maMetaFile.WindStart(); - const_cast<ImpGraphic*>(this)->maMetaFile.Play(pOutDev, rDestPt, rDestSize); + const_cast<ImpGraphic*>(this)->maMetaFile.Play(rOutDev, rDestPt, rDestSize); const_cast<ImpGraphic*>(this)->maMetaFile.WindStart(); } break; @@ -1084,14 +1084,14 @@ void ImpGraphic::draw(OutputDevice* pOutDev, } } -void ImpGraphic::startAnimation( OutputDevice* pOutDev, const Point& rDestPt, - const Size& rDestSize, tools::Long nExtraData, - OutputDevice* pFirstFrameOutDev ) +void ImpGraphic::startAnimation(OutputDevice& rOutDev, const Point& rDestPt, + const Size& rDestSize, tools::Long nExtraData, + OutputDevice* pFirstFrameOutDev ) { ensureAvailable(); if( isSupportedGraphic() && !isSwappedOut() && mpAnimation ) - mpAnimation->Start( pOutDev, rDestPt, rDestSize, nExtraData, pFirstFrameOutDev ); + mpAnimation->Start(rOutDev, rDestPt, rDestSize, nExtraData, pFirstFrameOutDev); } void ImpGraphic::stopAnimation( const OutputDevice* pOutDev, tools::Long nExtraData ) diff --git a/vcl/source/gdi/oldprintadaptor.cxx b/vcl/source/gdi/oldprintadaptor.cxx index 05a6f9bbee2e..8423bbb1e37f 100644 --- a/vcl/source/gdi/oldprintadaptor.cxx +++ b/vcl/source/gdi/oldprintadaptor.cxx @@ -105,7 +105,7 @@ void OldStylePrintAdaptor::printPage( int i_nPage ) const if( i_nPage < int(mpData->maPages.size()) ) { mpData->maPages[ i_nPage ].maPage.WindStart(); - mpData->maPages[ i_nPage ].maPage.Play( getPrinter().get() ); + mpData->maPages[ i_nPage ].maPage.Play(*getPrinter()); } } diff --git a/vcl/source/gdi/pdfwriter_impl2.cxx b/vcl/source/gdi/pdfwriter_impl2.cxx index 878915e650c7..9d486e1aaa4f 100644 --- a/vcl/source/gdi/pdfwriter_impl2.cxx +++ b/vcl/source/gdi/pdfwriter_impl2.cxx @@ -485,7 +485,7 @@ void PDFWriterImpl::playMetafile( const GDIMetaFile& i_rMtf, vcl::PDFExtOutDevDa // create paint bitmap aTmpMtf.WindStart(); - aTmpMtf.Play( xVDev.get(), aPoint, aDstSize ); + aTmpMtf.Play(*xVDev, aPoint, aDstSize); aTmpMtf.WindStart(); xVDev->EnableMapMode( false ); @@ -499,7 +499,7 @@ void PDFWriterImpl::playMetafile( const GDIMetaFile& i_rMtf, vcl::PDFExtOutDevDa xVDev->SetDrawMode( DrawModeFlags::WhiteLine | DrawModeFlags::WhiteFill | DrawModeFlags::WhiteText | DrawModeFlags::WhiteBitmap | DrawModeFlags::WhiteGradient ); aTmpMtf.WindStart(); - aTmpMtf.Play( xVDev.get(), aPoint, aDstSize ); + aTmpMtf.Play(*xVDev, aPoint, aDstSize); aTmpMtf.WindStart(); xVDev->EnableMapMode( false ); aMask = xVDev->GetBitmap( aPoint, aDstSizePixel ); diff --git a/vcl/source/gdi/print3.cxx b/vcl/source/gdi/print3.cxx index 1cc0ce8c1c93..fbbde7b5d770 100644 --- a/vcl/source/gdi/print3.cxx +++ b/vcl/source/gdi/print3.cxx @@ -1345,7 +1345,7 @@ void PrinterController::printFilteredPage( int i_nPage ) mpImplData->mxPrinter->Push(); aCleanedFile.WindStart(); - aCleanedFile.Play( mpImplData->mxPrinter.get() ); + aCleanedFile.Play(*mpImplData->mxPrinter); mpImplData->mxPrinter->Pop(); mpImplData->mxPrinter->ImplEndPage(); diff --git a/vcl/source/graphic/GraphicObject.cxx b/vcl/source/graphic/GraphicObject.cxx index b127b2d03c3d..c8230fd02555 100644 --- a/vcl/source/graphic/GraphicObject.cxx +++ b/vcl/source/graphic/GraphicObject.cxx @@ -96,8 +96,8 @@ void SearchForGraphics(uno::Reference<uno::XInterface> const & xInterface, namespace { -bool lclDrawObj( OutputDevice* pOut, const Point& rPt, const Size& rSz, - GraphicObject const & rObj, const GraphicAttr& rAttr) +bool lclDrawObj(OutputDevice& rOut, const Point& rPt, const Size& rSz, + GraphicObject const & rObj, const GraphicAttr& rAttr) { Point aPt( rPt ); Size aSz( rSz ); @@ -122,7 +122,7 @@ bool lclDrawObj( OutputDevice* pOut, const Point& rPt, const Size& rSz, aSz = aRotBoundRect.GetSize(); } - aGraphic.Draw( pOut, aPt, aSz ); + aGraphic.Draw(rOut, aPt, aSz); } bRet = true; @@ -345,8 +345,8 @@ bool GraphicObject::IsEPS() const return maGraphic.IsEPS(); } -bool GraphicObject::ImplGetCropParams( OutputDevice const * pOut, Point& rPt, Size& rSz, const GraphicAttr* pAttr, - tools::PolyPolygon& rClipPolyPoly, bool& bRectClipRegion ) const +bool GraphicObject::ImplGetCropParams(const OutputDevice& rOut, Point& rPt, Size& rSz, const GraphicAttr* pAttr, + tools::PolyPolygon& rClipPolyPoly, bool& bRectClipRegion) const { bool bRet = false; @@ -374,7 +374,7 @@ bool GraphicObject::ImplGetCropParams( OutputDevice const * pOut, Point& rPt, Si else { MapMode m(maGraphic.GetPrefMapMode()); - aSize100 = pOut->LogicToLogic( maGraphic.GetPrefSize(), &m, &aMap100 ); + aSize100 = rOut.LogicToLogic( maGraphic.GetPrefSize(), &m, &aMap100 ); } nTotalWidth = aSize100.Width() - pAttr->GetLeftCrop() - pAttr->GetRightCrop(); @@ -456,17 +456,17 @@ void GraphicObject::SetUserData( const OUString& rUserData ) maUserData = rUserData; } -bool GraphicObject::Draw( OutputDevice* pOut, const Point& rPt, const Size& rSz, - const GraphicAttr* pAttr ) +bool GraphicObject::Draw(OutputDevice& rOut, const Point& rPt, const Size& rSz, + const GraphicAttr* pAttr) { GraphicAttr aAttr( pAttr ? *pAttr : GetAttr() ); Point aPt( rPt ); Size aSz( rSz ); - const DrawModeFlags nOldDrawMode = pOut->GetDrawMode(); + const DrawModeFlags nOldDrawMode = rOut.GetDrawMode(); bool bCropped = aAttr.IsCropped(); bool bRet; - pOut->SetDrawMode( nOldDrawMode & ~DrawModeFlags( DrawModeFlags::SettingsLine | DrawModeFlags::SettingsFill | DrawModeFlags::SettingsText | DrawModeFlags::SettingsGradient ) ); + rOut.SetDrawMode(nOldDrawMode & ~DrawModeFlags( DrawModeFlags::SettingsLine | DrawModeFlags::SettingsFill | DrawModeFlags::SettingsText | DrawModeFlags::SettingsGradient )); // mirrored horizontally if( aSz.Width() < 0 ) @@ -488,9 +488,9 @@ bool GraphicObject::Draw( OutputDevice* pOut, const Point& rPt, const Size& rSz, { tools::PolyPolygon aClipPolyPoly; bool bRectClip; - const bool bCrop = ImplGetCropParams( pOut, aPt, aSz, &aAttr, aClipPolyPoly, bRectClip ); + const bool bCrop = ImplGetCropParams(rOut, aPt, aSz, &aAttr, aClipPolyPoly, bRectClip); - pOut->Push( PushFlags::CLIPREGION ); + rOut.Push(PushFlags::CLIPREGION); if( bCrop ) { @@ -499,36 +499,36 @@ bool GraphicObject::Draw( OutputDevice* pOut, const Point& rPt, const Size& rSz, // #i29534# Store crop rect for later forwarding to // PDF writer tools::Rectangle aCropRect = aClipPolyPoly.GetBoundRect(); - pOut->IntersectClipRegion( aCropRect ); + rOut.IntersectClipRegion(aCropRect); } else { - pOut->IntersectClipRegion(vcl::Region(aClipPolyPoly)); + rOut.IntersectClipRegion(vcl::Region(aClipPolyPoly)); } } } - bRet = lclDrawObj(pOut, aPt, aSz, *this, aAttr); + bRet = lclDrawObj(rOut, aPt, aSz, *this, aAttr); if( bCropped ) - pOut->Pop(); + rOut.Pop(); - pOut->SetDrawMode( nOldDrawMode ); + rOut.SetDrawMode( nOldDrawMode ); return bRet; } -void GraphicObject::DrawTiled( OutputDevice* pOut, const tools::Rectangle& rArea, const Size& rSize, - const Size& rOffset, int nTileCacheSize1D ) +void GraphicObject::DrawTiled(OutputDevice& rOut, const tools::Rectangle& rArea, const Size& rSize, + const Size& rOffset, int nTileCacheSize1D) { - if( pOut == nullptr || rSize.IsEmpty() ) + if (rSize.IsEmpty()) return; - const MapMode aOutMapMode( pOut->GetMapMode() ); + const MapMode aOutMapMode(rOut.GetMapMode()); // #106258# Clamp size to 1 for zero values. This is okay, since // logical size of zero is handled above already - const Size aOutTileSize( ::std::max( tools::Long(1), pOut->LogicToPixel( rSize, aOutMapMode ).Width() ), - ::std::max( tools::Long(1), pOut->LogicToPixel( rSize, aOutMapMode ).Height() ) ); + const Size aOutTileSize( ::std::max( tools::Long(1), rOut.LogicToPixel( rSize, aOutMapMode ).Width() ), + ::std::max( tools::Long(1), rOut.LogicToPixel( rSize, aOutMapMode ).Height() ) ); //#i69780 clip final tile size to a sane max size while ((static_cast<sal_Int64>(rSize.Width()) * nTileCacheSize1D) > SAL_MAX_UINT16) @@ -536,12 +536,12 @@ void GraphicObject::DrawTiled( OutputDevice* pOut, const tools::Rectangle& rArea while ((static_cast<sal_Int64>(rSize.Height()) * nTileCacheSize1D) > SAL_MAX_UINT16) nTileCacheSize1D /= 2; - ImplDrawTiled( pOut, rArea, aOutTileSize, rOffset, nullptr, nTileCacheSize1D ); + ImplDrawTiled(rOut, rArea, aOutTileSize, rOffset, nullptr, nTileCacheSize1D); } -bool GraphicObject::StartAnimation( OutputDevice* pOut, const Point& rPt, const Size& rSz, - tools::Long nExtraData, - OutputDevice* pFirstFrameOutDev ) +bool GraphicObject::StartAnimation(OutputDevice& rOut, const Point& rPt, const Size& rSz, + tools::Long nExtraData, + OutputDevice* pFirstFrameOutDev) { bool bRet = false; @@ -559,16 +559,16 @@ bool GraphicObject::StartAnimation( OutputDevice* pOut, const Point& rPt, const { tools::PolyPolygon aClipPolyPoly; bool bRectClip; - const bool bCrop = ImplGetCropParams( pOut, aPt, aSz, &aAttr, aClipPolyPoly, bRectClip ); + const bool bCrop = ImplGetCropParams(rOut, aPt, aSz, &aAttr, aClipPolyPoly, bRectClip); - pOut->Push( PushFlags::CLIPREGION ); + rOut.Push(PushFlags::CLIPREGION); if( bCrop ) { if( bRectClip ) - pOut->IntersectClipRegion( aClipPolyPoly.GetBoundRect() ); + rOut.IntersectClipRegion(aClipPolyPoly.GetBoundRect()); else - pOut->IntersectClipRegion(vcl::Region(aClipPolyPoly)); + rOut.IntersectClipRegion(vcl::Region(aClipPolyPoly)); } } @@ -578,15 +578,15 @@ bool GraphicObject::StartAnimation( OutputDevice* pOut, const Point& rPt, const mxSimpleCache->maGraphic.SetAnimationNotifyHdl(GetGraphic().GetAnimationNotifyHdl()); } - mxSimpleCache->maGraphic.StartAnimation(pOut, aPt, aSz, nExtraData, pFirstFrameOutDev); + mxSimpleCache->maGraphic.StartAnimation(rOut, aPt, aSz, nExtraData, pFirstFrameOutDev); if( bCropped ) - pOut->Pop(); + rOut.Pop(); bRet = true; } else - bRet = Draw( pOut, rPt, rSz, &aAttr ); + bRet = Draw(rOut, rPt, rSz, &aAttr); return bRet; } diff --git a/vcl/source/graphic/GraphicObject2.cxx b/vcl/source/graphic/GraphicObject2.cxx index e5b994f72b83..b19fc5e10f02 100644 --- a/vcl/source/graphic/GraphicObject2.cxx +++ b/vcl/source/graphic/GraphicObject2.cxx @@ -169,7 +169,7 @@ bool GraphicObject::ImplRenderTileRecursive( VirtualDevice& rVDev, int nExponent Point aCurrPos(aTileInfo.aNextTileTopLeft.X(), aTileInfo.aTileTopLeft.Y()); for (int nX=0; nX < aTileInfo.nTilesEmptyX; nX += nMSBFactor) { - if (!pTileGraphic->Draw(&rVDev, aCurrPos, aTileInfo.aTileSizePixel, pAttr)) + if (!pTileGraphic->Draw(rVDev, aCurrPos, aTileInfo.aTileSizePixel, pAttr)) return false; aCurrPos.AdjustX(aTileInfo.aTileSizePixel.Width() ); @@ -190,7 +190,7 @@ bool GraphicObject::ImplRenderTileRecursive( VirtualDevice& rVDev, int nExponent aCurrPos.setY( aTileInfo.aNextTileTopLeft.Y() ); for (int nY=0; nY < aTileInfo.nTilesEmptyY; nY += nMSBFactor) { - if (!pTileGraphic->Draw(&rVDev, aCurrPos, aTileInfo.aTileSizePixel, pAttr)) + if (!pTileGraphic->Draw(rVDev, aCurrPos, aTileInfo.aTileSizePixel, pAttr)) return false; aCurrPos.AdjustY(aTileInfo.aTileSizePixel.Height() ); @@ -250,7 +250,7 @@ bool GraphicObject::ImplRenderTileRecursive( VirtualDevice& rVDev, int nExponent { if( bNoFirstTileDraw ) bNoFirstTileDraw = false; // don't draw first tile position - else if (!pTileGraphic->Draw(&rVDev, aCurrPos, aTileInfo.aTileSizePixel, pAttr)) + else if (!pTileGraphic->Draw(rVDev, aCurrPos, aTileInfo.aTileSizePixel, pAttr)) return false; aCurrPos.AdjustX(aTileInfo.aTileSizePixel.Width() ); @@ -272,10 +272,10 @@ bool GraphicObject::ImplRenderTileRecursive( VirtualDevice& rVDev, int nExponent return true; } -bool GraphicObject::ImplDrawTiled( OutputDevice* pOut, const tools::Rectangle& rArea, const Size& rSizePixel, - const Size& rOffset, const GraphicAttr* pAttr, int nTileCacheSize1D ) +bool GraphicObject::ImplDrawTiled(OutputDevice& rOut, const tools::Rectangle& rArea, const Size& rSizePixel, + const Size& rOffset, const GraphicAttr* pAttr, int nTileCacheSize1D) { - const MapMode aOutMapMode( pOut->GetMapMode() ); + const MapMode aOutMapMode(rOut.GetMapMode()); const MapMode aMapMode( aOutMapMode.GetMapUnit(), Point(), aOutMapMode.GetScaleX(), aOutMapMode.GetScaleY() ); bool bRet( false ); @@ -327,15 +327,15 @@ bool GraphicObject::ImplDrawTiled( OutputDevice* pOut, const tools::Rectangle& r // paint generated tile GraphicObject aTmpGraphic( aTileBitmap ); - bRet = aTmpGraphic.ImplDrawTiled( pOut, rArea, - aTileBitmap.GetSizePixel(), - rOffset, pAttr, nTileCacheSize1D ); + bRet = aTmpGraphic.ImplDrawTiled(rOut, rArea, + aTileBitmap.GetSizePixel(), + rOffset, pAttr, nTileCacheSize1D); } } else { - const Size aOutOffset( pOut->LogicToPixel( rOffset, aOutMapMode ) ); - const tools::Rectangle aOutArea( pOut->LogicToPixel( rArea, aOutMapMode ) ); + const Size aOutOffset( rOut.LogicToPixel( rOffset, aOutMapMode ) ); + const tools::Rectangle aOutArea( rOut.LogicToPixel( rArea, aOutMapMode ) ); // number of invisible (because out-of-area) tiles int nInvisibleTilesX; @@ -354,24 +354,24 @@ bool GraphicObject::ImplDrawTiled( OutputDevice* pOut, const tools::Rectangle& r nInvisibleTilesY = aOutOffset.Height() / rSizePixel.Height(); // origin from where to 'virtually' start drawing in pixel - const Point aOutOrigin( pOut->LogicToPixel( Point( rArea.Left() - rOffset.Width(), + const Point aOutOrigin( rOut.LogicToPixel( Point( rArea.Left() - rOffset.Width(), rArea.Top() - rOffset.Height() ) ) ); // position in pixel from where to really start output const Point aOutStart( aOutOrigin.X() + nInvisibleTilesX*rSizePixel.Width(), aOutOrigin.Y() + nInvisibleTilesY*rSizePixel.Height() ); - pOut->Push( PushFlags::CLIPREGION ); - pOut->IntersectClipRegion( rArea ); + rOut.Push( PushFlags::CLIPREGION ); + rOut.IntersectClipRegion( rArea ); // Paint all tiles - bRet = ImplDrawTiled( *pOut, aOutStart, - (aOutArea.GetWidth() + aOutArea.Left() - aOutStart.X() + rSizePixel.Width() - 1) / rSizePixel.Width(), - (aOutArea.GetHeight() + aOutArea.Top() - aOutStart.Y() + rSizePixel.Height() - 1) / rSizePixel.Height(), - rSizePixel, pAttr ); + bRet = ImplDrawTiled(rOut, aOutStart, + (aOutArea.GetWidth() + aOutArea.Left() - aOutStart.X() + rSizePixel.Width() - 1) / rSizePixel.Width(), + (aOutArea.GetHeight() + aOutArea.Top() - aOutStart.Y() + rSizePixel.Height() - 1) / rSizePixel.Height(), + rSizePixel, pAttr); - pOut->Pop(); + rOut.Pop(); } return bRet; @@ -408,10 +408,10 @@ bool GraphicObject::ImplDrawTiled( OutputDevice& rOut, const Point& rPosPixel, // update return value. This method should return true, if // at least one of the looped Draws succeeded. - bRet |= Draw( &rOut, - bDrawInPixel ? aCurrPos : rOut.PixelToLogic( aCurrPos ), - bDrawInPixel ? rTileSizePixel : aTileSizeLogic, - pAttr ); + bRet |= Draw(rOut, + bDrawInPixel ? aCurrPos : rOut.PixelToLogic(aCurrPos), + bDrawInPixel ? rTileSizePixel : aTileSizeLogic, + pAttr); aCurrPos.AdjustX(rTileSizePixel.Width() ); } diff --git a/vcl/source/outdev/outdev.cxx b/vcl/source/outdev/outdev.cxx index 70ec9616ace7..71ec101f4dd1 100644 --- a/vcl/source/outdev/outdev.cxx +++ b/vcl/source/outdev/outdev.cxx @@ -704,7 +704,7 @@ bool OutputDevice::DrawEPS( const Point& rPoint, const Size& rSize, GDIMetaFile* pOldMetaFile = mpMetaFile; mpMetaFile = nullptr; - Graphic( *pSubst ).Draw( this, rPoint, rSize ); + Graphic(*pSubst).Draw(*this, rPoint, rSize); mpMetaFile = pOldMetaFile; } } diff --git a/vcl/source/outdev/transparent.cxx b/vcl/source/outdev/transparent.cxx index 10bfa5592f51..28e70a6f0f49 100644 --- a/vcl/source/outdev/transparent.cxx +++ b/vcl/source/outdev/transparent.cxx @@ -623,7 +623,7 @@ void OutputDevice::DrawTransparent( const GDIMetaFile& rMtf, const Point& rPos, ( mnDrawMode & DrawModeFlags::NoTransparency ) ) { const_cast<GDIMetaFile&>(rMtf).WindStart(); - const_cast<GDIMetaFile&>(rMtf).Play( this, rPos, rSize ); + const_cast<GDIMetaFile&>(rMtf).Play(*this, rPos, rSize); const_cast<GDIMetaFile&>(rMtf).WindStart(); } else @@ -679,7 +679,7 @@ void OutputDevice::DrawTransparent( const GDIMetaFile& rMtf, const Point& rPos, // draw MetaFile to buffer xVDev->EnableMapMode(bBufferMapModeEnabled); const_cast<GDIMetaFile&>(rMtf).WindStart(); - const_cast<GDIMetaFile&>(rMtf).Play(xVDev.get(), rPos, rSize); + const_cast<GDIMetaFile&>(rMtf).Play(*xVDev, rPos, rSize); const_cast<GDIMetaFile&>(rMtf).WindStart(); // get content bitmap from buffer @@ -714,7 +714,7 @@ void OutputDevice::DrawTransparent( const GDIMetaFile& rMtf, const Point& rPos, // create paint bitmap const_cast<GDIMetaFile&>(rMtf).WindStart(); - const_cast<GDIMetaFile&>(rMtf).Play( xVDev.get(), rPos, rSize ); + const_cast<GDIMetaFile&>(rMtf).Play(*xVDev, rPos, rSize); const_cast<GDIMetaFile&>(rMtf).WindStart(); xVDev->EnableMapMode( false ); BitmapEx aPaint = xVDev->GetBitmapEx(Point(), xVDev->GetOutputSizePixel()); diff --git a/vcl/source/window/paint.cxx b/vcl/source/window/paint.cxx index d132b034dfe5..b18dba870e93 100644 --- a/vcl/source/window/paint.cxx +++ b/vcl/source/window/paint.cxx @@ -1511,7 +1511,7 @@ void Window::ImplPaintToDevice( OutputDevice* i_pTargetOutDev, const Point& i_rP pMaskedDevice->SetOutputSizePixel( GetOutputSizePixel() ); pMaskedDevice->EnableRTL( IsRTLEnabled() ); aMtf.WindStart(); - aMtf.Play( pMaskedDevice ); + aMtf.Play(*pMaskedDevice); BitmapEx aBmpEx( pMaskedDevice->GetBitmapEx( Point( 0, 0 ), aPaintRect.GetSize() ) ); i_pTargetOutDev->DrawBitmapEx( i_rPos, aBmpEx ); // get rid of virtual device now so they don't pile up during recursive calls diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx index f908bbc5f81e..a9b2a03ab627 100644 --- a/vcl/source/window/printdlg.cxx +++ b/vcl/source/window/printdlg.cxx @@ -428,7 +428,7 @@ void PrintDialog::PrintPreviewWindow::preparePreviewBitmap() aMtf.WindStart(); aMtf.Scale( fScale, fScale ); aMtf.WindStart(); - aMtf.Play( pPrerenderVDev.get(), Point( 0, 0 ), aLogicSize ); + aMtf.Play(*pPrerenderVDev, Point(0, 0), aLogicSize); pPrerenderVDev->SetMapMode(MapMode(MapUnit::MapPixel)); maPreviewBitmap = pPrerenderVDev->GetBitmapEx(Point(0, 0), pPrerenderVDev->GetOutputSizePixel()); diff --git a/vcl/workben/mtfdemo.cxx b/vcl/workben/mtfdemo.cxx index ef5db6a8e5c7..afdb0192f16f 100644 --- a/vcl/workben/mtfdemo.cxx +++ b/vcl/workben/mtfdemo.cxx @@ -61,7 +61,7 @@ public: void DemoMtfWin::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) { - maMtf.Play(GetOutDev(), maMtf.GetActionSize()); + maMtf.Play(*GetOutDev(), maMtf.GetActionSize()); WorkWindow::Paint(rRenderContext, rRect); } |