diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2015-04-28 11:41:31 +0100 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2015-04-28 15:08:48 +0100 |
commit | e8b97a52c96df9c8e8055407b1e40ed7cb9cfc67 (patch) | |
tree | b322529f4a54a6427862cb20cb4cf87fb6a5d065 /drawinglayer | |
parent | 2b0be6c0e9d23f1b8535ba7033732ae2e3bfb5c9 (diff) | |
parent | 0cde74f788a054fa2b65107a030dd463b8d11c7a (diff) |
Merge remote-tracking branch 'origin/feature/vclptr'
Resolve several thousand lines of conflicts.
Conflicts:
accessibility/source/extended/accessiblelistbox.cxx
accessibility/source/standard/vclxaccessiblecombobox.cxx
accessibility/source/standard/vclxaccessibledropdowncombobox.cxx
accessibility/source/standard/vclxaccessibledropdownlistbox.cxx
accessibility/source/standard/vclxaccessiblelistbox.cxx
accessibility/source/standard/vclxaccessibletextfield.cxx
basctl/source/basicide/basidesh.cxx
cui/source/inc/chardlg.hxx
cui/source/tabpages/tpbitmap.cxx
dbaccess/source/ui/dlg/UserAdmin.cxx
dbaccess/source/ui/querydesign/ConnectionLineAccess.cxx
extensions/source/propctrlr/propertyeditor.hxx
extensions/source/scanner/sanedlg.cxx
filter/source/pdf/impdialog.cxx
include/sfx2/mgetempl.hxx
include/sfx2/sidebar/SidebarToolBox.hxx
include/sfx2/viewsh.hxx
include/svtools/brwbox.hxx
include/svtools/filectrl.hxx
include/svtools/scrwin.hxx
include/svx/dlgctrl.hxx
include/svx/sidebar/Popup.hxx
include/svx/sidebar/PopupContainer.hxx
include/svx/sidebar/PopupControl.hxx
include/svx/sidebar/SidebarDialControl.hxx
include/svx/sidebar/ValueSetWithTextControl.hxx
sc/source/ui/condformat/condformatdlgentry.cxx
sc/source/ui/navipi/navipi.cxx
sc/source/ui/sidebar/CellBorderStyleControl.hxx
sd/source/ui/animations/CustomAnimationDialog.cxx
sd/source/ui/inc/DrawViewShell.hxx
sd/source/ui/inc/Ruler.hxx
sd/source/ui/inc/SlideSorter.hxx
sd/source/ui/inc/ViewTabBar.hxx
sd/source/ui/inc/Window.hxx
sd/source/ui/inc/morphdlg.hxx
sd/source/ui/inc/sdpreslt.hxx
sd/source/ui/sidebar/CurrentMasterPagesSelector.hxx
sd/source/ui/sidebar/LayoutMenu.hxx
sd/source/ui/sidebar/MasterPagesSelector.hxx
sd/source/ui/sidebar/NavigatorWrapper.hxx
sd/source/ui/sidebar/PanelBase.hxx
sd/source/ui/sidebar/RecentMasterPagesSelector.cxx
sd/source/ui/sidebar/RecentMasterPagesSelector.hxx
sd/source/ui/slideshow/showwindow.hxx
sd/source/ui/slidesorter/view/SlsInsertAnimator.cxx
sd/source/ui/slidesorter/view/SlsLayeredDevice.hxx
sd/source/ui/view/ViewShellBase.cxx
sd/source/ui/view/drviewsa.cxx
sfx2/source/appl/fileobj.hxx
sfx2/source/appl/opengrf.cxx
sfx2/source/control/thumbnailviewacc.hxx
sfx2/source/dialog/securitypage.cxx
sfx2/source/dialog/templdlg.cxx
sfx2/source/doc/docinsert.cxx
sfx2/source/doc/guisaveas.cxx
sfx2/source/inc/alienwarn.hxx
sfx2/source/sidebar/Deck.cxx
sfx2/source/sidebar/Deck.hxx
sfx2/source/sidebar/DeckTitleBar.cxx
sfx2/source/sidebar/DeckTitleBar.hxx
sfx2/source/sidebar/MenuButton.cxx
sfx2/source/sidebar/MenuButton.hxx
sfx2/source/sidebar/Panel.cxx
sfx2/source/sidebar/Panel.hxx
sfx2/source/sidebar/PanelTitleBar.hxx
sfx2/source/sidebar/SidebarDockingWindow.hxx
sfx2/source/sidebar/SidebarToolBox.cxx
sfx2/source/sidebar/TabBar.hxx
sfx2/source/sidebar/TabItem.cxx
sfx2/source/sidebar/TabItem.hxx
sfx2/source/sidebar/TitleBar.hxx
sfx2/source/toolbox/imgmgr.cxx
starmath/inc/edit.hxx
starmath/inc/smmod.hxx
starmath/qa/cppunit/test_starmath.cxx
starmath/source/edit.cxx
starmath/source/smmod.cxx
svtools/source/brwbox/brwbox1.cxx
svtools/source/brwbox/datwin.hxx
svtools/source/contnr/fileview.cxx
svtools/source/contnr/simptabl.cxx
svtools/source/control/filectrl.cxx
svtools/source/control/valueimp.hxx
svx/inc/GalleryControl.hxx
svx/source/dialog/dlgctrl.cxx
svx/source/dialog/swframeexample.cxx
svx/source/fmcomp/fmgridif.cxx
svx/source/gallery2/GalleryControl.cxx
svx/source/sidebar/EmptyPanel.hxx
svx/source/sidebar/area/AreaPropertyPanel.hxx
svx/source/sidebar/area/AreaTransparencyGradientControl.hxx
svx/source/sidebar/graphic/GraphicPropertyPanel.hxx
svx/source/sidebar/insert/InsertPropertyPanel.cxx
svx/source/sidebar/insert/InsertPropertyPanel.hxx
svx/source/sidebar/line/LinePropertyPanel.hxx
svx/source/sidebar/line/LineWidthControl.cxx
svx/source/sidebar/line/LineWidthControl.hxx
svx/source/sidebar/line/LineWidthValueSet.hxx
svx/source/sidebar/paragraph/ParaPropertyPanel.hxx
svx/source/sidebar/possize/SidebarDialControl.cxx
svx/source/sidebar/text/TextCharacterSpacingPopup.hxx
svx/source/sidebar/text/TextPropertyPanel.hxx
svx/source/sidebar/tools/PopupContainer.cxx
svx/source/sidebar/tools/PopupControl.cxx
svx/source/sidebar/tools/ValueSetWithTextControl.cxx
svx/source/svdraw/svdfmtf.hxx
svx/source/svdraw/svdibrow.cxx
svx/source/tbxctrls/colrctrl.cxx
svx/source/tbxctrls/tbcontrl.cxx
sw/source/ui/dbui/mmaddressblockpage.cxx
sw/source/ui/dialog/uiregionsw.cxx
sw/source/ui/index/cnttab.cxx
sw/source/uibase/inc/drpcps.hxx
sw/source/uibase/sidebar/PageColumnControl.hxx
sw/source/uibase/sidebar/PageMarginControl.hxx
sw/source/uibase/sidebar/PageOrientationControl.hxx
sw/source/uibase/sidebar/PagePropertyPanel.hxx
sw/source/uibase/sidebar/PageSizeControl.hxx
sw/source/uibase/uiview/view2.cxx
sw/source/uibase/utlui/navipi.cxx
vcl/inc/svdata.hxx
vcl/source/control/combobox.cxx
vcl/source/control/lstbox.cxx
vcl/source/window/dockwin.cxx
vcl/source/window/winproc.cxx
Change-Id: I056cf3026ff17d65cca0b6e6588bda4a88fa8d95
Diffstat (limited to 'drawinglayer')
8 files changed, 73 insertions, 72 deletions
diff --git a/drawinglayer/source/primitive2d/controlprimitive2d.cxx b/drawinglayer/source/primitive2d/controlprimitive2d.cxx index b764e02c21d1..d782962fa11d 100644 --- a/drawinglayer/source/primitive2d/controlprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/controlprimitive2d.cxx @@ -116,15 +116,15 @@ namespace drawinglayer if(nSizeX > 0 && nSizeY > 0) { // prepare VirtualDevice - VirtualDevice aVirtualDevice(*Application::GetDefaultDevice()); + ScopedVclPtrInstance< VirtualDevice > aVirtualDevice(*Application::GetDefaultDevice()); const Size aSizePixel(nSizeX, nSizeY); - aVirtualDevice.SetOutputSizePixel(aSizePixel); + aVirtualDevice->SetOutputSizePixel(aSizePixel); // set size at control xControlWindow->setPosSize(0, 0, nSizeX, nSizeY, awt::PosSize::POSSIZE); // get graphics and view - uno::Reference< awt::XGraphics > xGraphics(aVirtualDevice.CreateUnoGraphics()); + uno::Reference< awt::XGraphics > xGraphics(aVirtualDevice->CreateUnoGraphics()); uno::Reference< awt::XView > xControlView(rXControl, uno::UNO_QUERY); if(xGraphics.is() && xControlView.is()) @@ -190,7 +190,7 @@ namespace drawinglayer xControlView->draw(0, 0); // get bitmap - const Bitmap aContent(aVirtualDevice.GetBitmap(Point(), aSizePixel)); + const Bitmap aContent(aVirtualDevice->GetBitmap(Point(), aSizePixel)); // to avoid scaling, use the Bitmap pixel size as primitive size const Size aBitmapSize(aContent.GetSizePixel()); diff --git a/drawinglayer/source/primitive2d/graphicprimitivehelper2d.cxx b/drawinglayer/source/primitive2d/graphicprimitivehelper2d.cxx index ecf3bb257ce0..7ed0045f778a 100644 --- a/drawinglayer/source/primitive2d/graphicprimitivehelper2d.cxx +++ b/drawinglayer/source/primitive2d/graphicprimitivehelper2d.cxx @@ -96,16 +96,16 @@ namespace // with a step count of zero if(maAnimation.Count()) { - VirtualDevice aVirtualDevice(*Application::GetDefaultDevice()); - VirtualDevice aVirtualDeviceMask(*Application::GetDefaultDevice(), 1L); + ScopedVclPtrInstance< VirtualDevice > aVirtualDevice(*Application::GetDefaultDevice()); + ScopedVclPtrInstance< VirtualDevice > aVirtualDeviceMask(*Application::GetDefaultDevice(), 1L); // Prepare VirtualDevices and their states - aVirtualDevice.EnableMapMode(false); - aVirtualDeviceMask.EnableMapMode(false); - aVirtualDevice.SetOutputSizePixel(maAnimation.GetDisplaySizePixel()); - aVirtualDeviceMask.SetOutputSizePixel(maAnimation.GetDisplaySizePixel()); - aVirtualDevice.Erase(); - aVirtualDeviceMask.Erase(); + aVirtualDevice->EnableMapMode(false); + aVirtualDeviceMask->EnableMapMode(false); + aVirtualDevice->SetOutputSizePixel(maAnimation.GetDisplaySizePixel()); + aVirtualDeviceMask->SetOutputSizePixel(maAnimation.GetDisplaySizePixel()); + aVirtualDevice->Erase(); + aVirtualDeviceMask->Erase(); for(sal_uInt16 a(0L); a < maAnimation.Count(); a++) { @@ -119,20 +119,20 @@ namespace { case DISPOSE_NOT: { - aVirtualDevice.DrawBitmapEx(rAnimBitmap.aPosPix, rAnimBitmap.aBmpEx); + aVirtualDevice->DrawBitmapEx(rAnimBitmap.aPosPix, rAnimBitmap.aBmpEx); Bitmap aMask = rAnimBitmap.aBmpEx.GetMask(); if(aMask.IsEmpty()) { const Point aEmpty; - const Rectangle aRect(aEmpty, aVirtualDeviceMask.GetOutputSizePixel()); + const Rectangle aRect(aEmpty, aVirtualDeviceMask->GetOutputSizePixel()); const Wallpaper aWallpaper(COL_BLACK); - aVirtualDeviceMask.DrawWallpaper(aRect, aWallpaper); + aVirtualDeviceMask->DrawWallpaper(aRect, aWallpaper); } else { BitmapEx aExpandVisibilityMask = BitmapEx(aMask, aMask); - aVirtualDeviceMask.DrawBitmapEx(rAnimBitmap.aPosPix, aExpandVisibilityMask); + aVirtualDeviceMask->DrawBitmapEx(rAnimBitmap.aPosPix, aExpandVisibilityMask); } break; @@ -143,42 +143,42 @@ namespace const Bitmap aMask(rAnimBitmap.aBmpEx.GetMask()); const Bitmap aContent(rAnimBitmap.aBmpEx.GetBitmap()); - aVirtualDeviceMask.Erase(); - aVirtualDevice.DrawBitmap(rAnimBitmap.aPosPix, aContent); + aVirtualDeviceMask->Erase(); + aVirtualDevice->DrawBitmap(rAnimBitmap.aPosPix, aContent); if(aMask.IsEmpty()) { const Rectangle aRect(rAnimBitmap.aPosPix, aContent.GetSizePixel()); - aVirtualDeviceMask.SetFillColor(COL_BLACK); - aVirtualDeviceMask.SetLineColor(); - aVirtualDeviceMask.DrawRect(aRect); + aVirtualDeviceMask->SetFillColor(COL_BLACK); + aVirtualDeviceMask->SetLineColor(); + aVirtualDeviceMask->DrawRect(aRect); } else { - aVirtualDeviceMask.DrawBitmap(rAnimBitmap.aPosPix, aMask); + aVirtualDeviceMask->DrawBitmap(rAnimBitmap.aPosPix, aMask); } break; } case DISPOSE_FULL: { - aVirtualDevice.DrawBitmapEx(rAnimBitmap.aPosPix, rAnimBitmap.aBmpEx); + aVirtualDevice->DrawBitmapEx(rAnimBitmap.aPosPix, rAnimBitmap.aBmpEx); break; } case DISPOSE_PREVIOUS : { - aVirtualDevice.DrawBitmapEx(rAnimBitmap.aPosPix, rAnimBitmap.aBmpEx); - aVirtualDeviceMask.DrawBitmap(rAnimBitmap.aPosPix, rAnimBitmap.aBmpEx.GetMask()); + aVirtualDevice->DrawBitmapEx(rAnimBitmap.aPosPix, rAnimBitmap.aBmpEx); + aVirtualDeviceMask->DrawBitmap(rAnimBitmap.aPosPix, rAnimBitmap.aBmpEx.GetMask()); break; } } // create BitmapEx - Bitmap aMainBitmap = aVirtualDevice.GetBitmap(Point(), aVirtualDevice.GetOutputSizePixel()); + Bitmap aMainBitmap = aVirtualDevice->GetBitmap(Point(), aVirtualDevice->GetOutputSizePixel()); #if defined(MACOSX) || defined(IOS) - AlphaMask aMaskBitmap( aVirtualDeviceMask.GetBitmap( Point(), aVirtualDeviceMask.GetOutputSizePixel())); + AlphaMask aMaskBitmap( aVirtualDeviceMask->GetBitmap( Point(), aVirtualDeviceMask->GetOutputSizePixel())); #else - Bitmap aMaskBitmap = aVirtualDeviceMask.GetBitmap( Point(), aVirtualDeviceMask.GetOutputSizePixel()); + Bitmap aMaskBitmap = aVirtualDeviceMask->GetBitmap( Point(), aVirtualDeviceMask->GetOutputSizePixel()); #endif aNextStep.maBitmapEx = BitmapEx(aMainBitmap, aMaskBitmap); diff --git a/drawinglayer/source/primitive2d/textlayoutdevice.cxx b/drawinglayer/source/primitive2d/textlayoutdevice.cxx index 93dfc867d3e5..a9dfdb6a75bc 100644 --- a/drawinglayer/source/primitive2d/textlayoutdevice.cxx +++ b/drawinglayer/source/primitive2d/textlayoutdevice.cxx @@ -59,7 +59,7 @@ namespace class ImpTimedRefDev : public Timer { scoped_timed_RefDev& mrOwnerOfMe; - VirtualDevice* mpVirDev; + VclPtr<VirtualDevice> mpVirDev; sal_uInt32 mnUseCount; public: @@ -84,7 +84,7 @@ namespace { OSL_ENSURE(0L == mnUseCount, "destruction of a still used ImpTimedRefDev (!)"); const SolarMutexGuard aGuard; - delete mpVirDev; + mpVirDev.disposeAndClear(); } void ImpTimedRefDev::Invoke() @@ -97,7 +97,7 @@ namespace { if(!mpVirDev) { - mpVirDev = new VirtualDevice(); + mpVirDev = VclPtr<VirtualDevice>::Create(); mpVirDev->SetReferenceDevice( VirtualDevice::REFDEV_MODE_MSO1 ); } diff --git a/drawinglayer/source/processor2d/vclhelperbufferdevice.cxx b/drawinglayer/source/processor2d/vclhelperbufferdevice.cxx index efa41c8565bc..93919c0019a2 100644 --- a/drawinglayer/source/processor2d/vclhelperbufferdevice.cxx +++ b/drawinglayer/source/processor2d/vclhelperbufferdevice.cxx @@ -32,7 +32,7 @@ namespace { - typedef ::std::vector< VirtualDevice* > aBuffers; + typedef ::std::vector< VclPtr<VirtualDevice> > aBuffers; class VDevBuffer : public Timer, protected comphelper::OBaseMutex { @@ -69,13 +69,13 @@ namespace while(!maFreeBuffers.empty()) { - delete *(maFreeBuffers.end() - 1); + (*(maFreeBuffers.end() - 1)).disposeAndClear(); maFreeBuffers.pop_back(); } while(!maUsedBuffers.empty()) { - delete *(maUsedBuffers.end() - 1); + (*(maUsedBuffers.end() - 1)).disposeAndClear(); maUsedBuffers.pop_back(); } } @@ -163,7 +163,7 @@ namespace // no success yet, create new buffer if(!pRetval) { - pRetval = new VirtualDevice(rOutDev, nBits); + pRetval = VclPtr<VirtualDevice>::Create(rOutDev, nBits); pRetval->SetOutputSizePixel(rSizePixel, bClear); } else @@ -197,7 +197,7 @@ namespace while(!maFreeBuffers.empty()) { - delete *(maFreeBuffers.end() - 1); + (*(maFreeBuffers.end() - 1)).disposeAndClear(); maFreeBuffers.pop_back(); } } diff --git a/drawinglayer/source/processor2d/vclhelperbufferdevice.hxx b/drawinglayer/source/processor2d/vclhelperbufferdevice.hxx index 02aa3c0024ab..0ba73114dc4f 100644 --- a/drawinglayer/source/processor2d/vclhelperbufferdevice.hxx +++ b/drawinglayer/source/processor2d/vclhelperbufferdevice.hxx @@ -35,9 +35,9 @@ namespace drawinglayer class impBufferDevice { OutputDevice& mrOutDev; - VirtualDevice* mpContent; - VirtualDevice* mpMask; - VirtualDevice* mpAlpha; + VclPtr<VirtualDevice> mpContent; + VclPtr<VirtualDevice> mpMask; + VclPtr<VirtualDevice> mpAlpha; Rectangle maDestPixel; public: diff --git a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx index 2b2c0b86d220..4c8df82cf393 100644 --- a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx +++ b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx @@ -252,20 +252,20 @@ namespace drawinglayer const Rectangle aPrimitiveRectangle( basegfx::fround(aPrimitiveRange.getMinX()), basegfx::fround(aPrimitiveRange.getMinY()), basegfx::fround(aPrimitiveRange.getMaxX()), basegfx::fround(aPrimitiveRange.getMaxY())); - VirtualDevice aContentVDev; + ScopedVclPtrInstance< VirtualDevice > aContentVDev; MapMode aNewMapMode(pLastOutputDevice->GetMapMode()); - mpOutputDevice = &aContentVDev; + mpOutputDevice = aContentVDev.get(); mpMetaFile = &o_rContentMetafile; - aContentVDev.EnableOutput(false); - aContentVDev.SetMapMode(pLastOutputDevice->GetMapMode()); - o_rContentMetafile.Record(&aContentVDev); - aContentVDev.SetLineColor(pLastOutputDevice->GetLineColor()); - aContentVDev.SetFillColor(pLastOutputDevice->GetFillColor()); - aContentVDev.SetFont(pLastOutputDevice->GetFont()); - aContentVDev.SetDrawMode(pLastOutputDevice->GetDrawMode()); - aContentVDev.SetSettings(pLastOutputDevice->GetSettings()); - aContentVDev.SetRefPoint(pLastOutputDevice->GetRefPoint()); + aContentVDev->EnableOutput(false); + aContentVDev->SetMapMode(pLastOutputDevice->GetMapMode()); + o_rContentMetafile.Record(aContentVDev.get()); + aContentVDev->SetLineColor(pLastOutputDevice->GetLineColor()); + aContentVDev->SetFillColor(pLastOutputDevice->GetFillColor()); + aContentVDev->SetFont(pLastOutputDevice->GetFont()); + aContentVDev->SetDrawMode(pLastOutputDevice->GetDrawMode()); + aContentVDev->SetSettings(pLastOutputDevice->GetSettings()); + aContentVDev->SetRefPoint(pLastOutputDevice->GetRefPoint()); // dump to MetaFile process(rContent); @@ -2016,7 +2016,7 @@ namespace drawinglayer const Rectangle aRectPixel(mpOutputDevice->LogicToPixel(aRectLogic)); Size aSizePixel(aRectPixel.GetSize()); const Point aEmptyPoint; - VirtualDevice aBufferDevice; + ScopedVclPtrInstance< VirtualDevice > aBufferDevice; const sal_uInt32 nMaxQuadratPixels(500000); const sal_uInt32 nViewVisibleArea(aSizePixel.getWidth() * aSizePixel.getHeight()); double fReduceFactor(1.0); @@ -2029,20 +2029,20 @@ namespace drawinglayer basegfx::fround((double)aSizePixel.getHeight() * fReduceFactor)); } - if(aBufferDevice.SetOutputSizePixel(aSizePixel)) + if(aBufferDevice->SetOutputSizePixel(aSizePixel)) { // create and set MapModes for target devices MapMode aNewMapMode(mpOutputDevice->GetMapMode()); aNewMapMode.SetOrigin(Point(-aRectLogic.Left(), -aRectLogic.Top())); - aBufferDevice.SetMapMode(aNewMapMode); + aBufferDevice->SetMapMode(aNewMapMode); // prepare view transformation for target renderers // ATTENTION! Need to apply another scaling because of the potential DPI differences // between Printer and VDev (mpOutputDevice and aBufferDevice here). // To get the DPI, LogicToPixel from (1,1) from MAP_INCH needs to be used. - basegfx::B2DHomMatrix aViewTransform(aBufferDevice.GetViewTransformation()); + basegfx::B2DHomMatrix aViewTransform(aBufferDevice->GetViewTransformation()); const Size aDPIOld(mpOutputDevice->LogicToPixel(Size(1, 1), MAP_INCH)); - const Size aDPINew(aBufferDevice.LogicToPixel(Size(1, 1), MAP_INCH)); + const Size aDPINew(aBufferDevice->LogicToPixel(Size(1, 1), MAP_INCH)); const double fDPIXChange((double)aDPIOld.getWidth() / (double)aDPINew.getWidth()); const double fDPIYChange((double)aDPIOld.getHeight() / (double)aDPINew.getHeight()); @@ -2067,16 +2067,16 @@ namespace drawinglayer getViewInformation2D().getViewTime(), getViewInformation2D().getExtendedInformationSequence()); - VclPixelProcessor2D aBufferProcessor(aViewInfo, aBufferDevice); + VclPixelProcessor2D aBufferProcessor(aViewInfo, *aBufferDevice.get()); // draw content using pixel renderer aBufferProcessor.process(rContent); - const Bitmap aBmContent(aBufferDevice.GetBitmap(aEmptyPoint, aSizePixel)); + const Bitmap aBmContent(aBufferDevice->GetBitmap(aEmptyPoint, aSizePixel)); // draw transparence using pixel renderer - aBufferDevice.Erase(); + aBufferDevice->Erase(); aBufferProcessor.process(rTransparence); - const AlphaMask aBmAlpha(aBufferDevice.GetBitmap(aEmptyPoint, aSizePixel)); + const AlphaMask aBmAlpha(aBufferDevice->GetBitmap(aEmptyPoint, aSizePixel)); // paint mpOutputDevice->DrawBitmapEx( diff --git a/drawinglayer/source/processor2d/vclprocessor2d.hxx b/drawinglayer/source/processor2d/vclprocessor2d.hxx index 70de6a19aca1..a527bb27c5e3 100644 --- a/drawinglayer/source/processor2d/vclprocessor2d.hxx +++ b/drawinglayer/source/processor2d/vclprocessor2d.hxx @@ -26,6 +26,7 @@ #include <basegfx/matrix/b2dhommatrix.hxx> #include <basegfx/color/bcolormodifier.hxx> #include <svtools/optionsdrawinglayer.hxx> +#include <vcl/vclptr.hxx> // predefines @@ -70,7 +71,7 @@ namespace drawinglayer { protected: // the destination OutDev - OutputDevice* mpOutputDevice; + VclPtr<OutputDevice> mpOutputDevice; // the modifiedColorPrimitive stack basegfx::BColorModifierStack maBColorModifierStack; diff --git a/drawinglayer/source/tools/converters.cxx b/drawinglayer/source/tools/converters.cxx index 188bfa9f5327..2dd3d9d8d2ee 100644 --- a/drawinglayer/source/tools/converters.cxx +++ b/drawinglayer/source/tools/converters.cxx @@ -73,21 +73,21 @@ namespace drawinglayer const Point aEmptyPoint; const Size aSizePixel(nDiscreteWidth, nDiscreteHeight); geometry::ViewInformation2D aViewInformation2D(rViewInformation2D); - VirtualDevice maContent; + ScopedVclPtrInstance< VirtualDevice > maContent; // prepare vdev - maContent.SetOutputSizePixel(aSizePixel, false); - maContent.SetMapMode(aMapModePixel); + maContent->SetOutputSizePixel(aSizePixel, false); + maContent->SetMapMode(aMapModePixel); // set to all white - maContent.SetBackground(Wallpaper(Color(COL_WHITE))); - maContent.Erase(); + maContent->SetBackground(Wallpaper(Color(COL_WHITE))); + maContent->Erase(); // create pixel processor, also already takes care of AAing and // checking the getOptionsDrawinglayer().IsAntiAliasing() switch. If // not wanted, change after this call as needed processor2d::BaseProcessor2D* pContentProcessor = processor2d::createPixelProcessor2DFromOutputDevice( - maContent, + *maContent.get(), aViewInformation2D); if(pContentProcessor) @@ -96,8 +96,8 @@ namespace drawinglayer pContentProcessor->process(aSequence); // get content - maContent.EnableMapMode(false); - const Bitmap aContent(maContent.GetBitmap(aEmptyPoint, aSizePixel)); + maContent->EnableMapMode(false); + const Bitmap aContent(maContent->GetBitmap(aEmptyPoint, aSizePixel)); #ifdef DBG_UTIL if(bDoSaveForVisualControl) @@ -108,10 +108,10 @@ namespace drawinglayer } #endif // prepare for mask creation - maContent.SetMapMode(aMapModePixel); + maContent->SetMapMode(aMapModePixel); // set alpha to all white (fully transparent) - maContent.Erase(); + maContent->Erase(); // embed primitives to paint them black const primitive2d::Primitive2DReference xRef( @@ -127,8 +127,8 @@ namespace drawinglayer delete pContentProcessor; // get alpha cahannel from vdev - maContent.EnableMapMode(false); - const Bitmap aAlpha(maContent.GetBitmap(aEmptyPoint, aSizePixel)); + maContent->EnableMapMode(false); + const Bitmap aAlpha(maContent->GetBitmap(aEmptyPoint, aSizePixel)); #ifdef DBG_UTIL if(bDoSaveForVisualControl) { |