diff options
Diffstat (limited to 'svx/source/unodraw')
-rw-r--r-- | svx/source/unodraw/UnoGraphicExporter.cxx | 52 | ||||
-rw-r--r-- | svx/source/unodraw/recoveryui.cxx | 6 | ||||
-rw-r--r-- | svx/source/unodraw/unoshape.cxx | 6 | ||||
-rw-r--r-- | svx/source/unodraw/unoshtxt.cxx | 2 |
4 files changed, 33 insertions, 33 deletions
diff --git a/svx/source/unodraw/UnoGraphicExporter.cxx b/svx/source/unodraw/UnoGraphicExporter.cxx index cc58203958b8..afe0c725d8c5 100644 --- a/svx/source/unodraw/UnoGraphicExporter.cxx +++ b/svx/source/unodraw/UnoGraphicExporter.cxx @@ -160,7 +160,7 @@ namespace { virtual sal_Bool SAL_CALL supportsMimeType( const OUString& MimeTypeName ) throw (RuntimeException, std::exception) SAL_OVERRIDE; virtual Sequence< OUString > SAL_CALL getSupportedMimeTypeNames( ) throw (RuntimeException, std::exception) SAL_OVERRIDE; - VirtualDevice* CreatePageVDev( SdrPage* pPage, sal_uIntPtr nWidthPixel, sal_uIntPtr nHeightPixel ) const; + VclPtr<VirtualDevice> CreatePageVDev( SdrPage* pPage, sal_uIntPtr nWidthPixel, sal_uIntPtr nHeightPixel ) const; DECL_LINK( CalcFieldValueHdl, EditFieldInfo* ); @@ -395,9 +395,9 @@ IMPL_LINK(GraphicExporter, CalcFieldValueHdl, EditFieldInfo*, pInfo) @return the returned VirtualDevice is owned by the caller */ -VirtualDevice* GraphicExporter::CreatePageVDev( SdrPage* pPage, sal_uIntPtr nWidthPixel, sal_uIntPtr nHeightPixel ) const +VclPtr<VirtualDevice> GraphicExporter::CreatePageVDev( SdrPage* pPage, sal_uIntPtr nWidthPixel, sal_uIntPtr nHeightPixel ) const { - VirtualDevice* pVDev = new VirtualDevice(); + VclPtr<VirtualDevice> pVDev = VclPtr<VirtualDevice>::Create(); MapMode aMM( MAP_100TH_MM ); Point aPoint( 0, 0 ); @@ -624,7 +624,7 @@ bool GraphicExporter::GetGraphic( ExportSettings& rSettings, Graphic& aGraphic, if( !pPage ) return false; - VirtualDevice aVDev; + ScopedVclPtrInstance< VirtualDevice > aVDev; const MapMode aMap( mpDoc->GetScaleUnit(), Point(), rSettings.maScaleX, rSettings.maScaleY ); SdrOutliner& rOutl=mpDoc->GetDrawOutliner(NULL); @@ -704,15 +704,15 @@ bool GraphicExporter::GetGraphic( ExportSettings& rSettings, Graphic& aGraphic, boost::scoped_ptr< SdrView > pLocalView; if( PTR_CAST( FmFormModel, mpDoc ) ) { - pLocalView.reset( new FmFormView( PTR_CAST( FmFormModel, mpDoc ), &aVDev ) ); + pLocalView.reset( new FmFormView( PTR_CAST( FmFormModel, mpDoc ), aVDev ) ); } else { - pLocalView.reset( new SdrView( mpDoc, &aVDev ) ); + pLocalView.reset( new SdrView( mpDoc, aVDev ) ); } - boost::scoped_ptr<VirtualDevice> pVDev(CreatePageVDev( pPage, nWidthPix, nHeightPix )); + ScopedVclPtr<VirtualDevice> pVDev(CreatePageVDev( pPage, nWidthPix, nHeightPix )); if( pVDev ) { @@ -726,22 +726,22 @@ bool GraphicExporter::GetGraphic( ExportSettings& rSettings, Graphic& aGraphic, { GDIMetaFile aMtf; - aVDev.SetMapMode( aMap ); + aVDev->SetMapMode( aMap ); if( rSettings.mbUseHighContrast ) - aVDev.SetDrawMode( aVDev.GetDrawMode() | DRAWMODE_SETTINGSLINE | DRAWMODE_SETTINGSFILL | DRAWMODE_SETTINGSTEXT | DRAWMODE_SETTINGSGRADIENT ); - aVDev.EnableOutput( false ); - aMtf.Record( &aVDev ); + aVDev->SetDrawMode( aVDev->GetDrawMode() | DRAWMODE_SETTINGSLINE | DRAWMODE_SETTINGSFILL | DRAWMODE_SETTINGSTEXT | DRAWMODE_SETTINGSGRADIENT ); + aVDev->EnableOutput( false ); + aMtf.Record( aVDev ); Size aNewSize; // create a view boost::scoped_ptr< SdrView > pView; if( PTR_CAST( FmFormModel, mpDoc ) ) { - pView.reset(new FmFormView( PTR_CAST( FmFormModel, mpDoc ), &aVDev )); + pView.reset(new FmFormView( PTR_CAST( FmFormModel, mpDoc ), aVDev )); } else { - pView.reset(new SdrView( mpDoc, &aVDev )); + pView.reset(new SdrView( mpDoc, aVDev )); } pView->SetBordVisible( false ); @@ -754,17 +754,17 @@ bool GraphicExporter::GetGraphic( ExportSettings& rSettings, Graphic& aGraphic, const Rectangle aClipRect( aNewOrg, aNewSize ); MapMode aVMap( aMap ); - aVDev.Push(); + aVDev->Push(); aVMap.SetOrigin( Point( -aNewOrg.X(), -aNewOrg.Y() ) ); - aVDev.SetRelativeMapMode( aVMap ); - aVDev.IntersectClipRegion( aClipRect ); + aVDev->SetRelativeMapMode( aVMap ); + aVDev->IntersectClipRegion( aClipRect ); // Use new StandardCheckVisisbilityRedirector ImplExportCheckVisisbilityRedirector aRedirector( mpCurrentPage ); - pView->CompleteRedraw(&aVDev, vcl::Region(Rectangle(aNewOrg, aNewSize)), &aRedirector); + pView->CompleteRedraw(aVDev, vcl::Region(Rectangle(aNewOrg, aNewSize)), &aRedirector); - aVDev.Pop(); + aVDev->Pop(); aMtf.Stop(); aMtf.WindStart(); @@ -907,7 +907,7 @@ bool GraphicExporter::GetGraphic( ExportSettings& rSettings, Graphic& aGraphic, if( !bSingleGraphic ) { // create a metafile for all shapes - VirtualDevice aOut; + ScopedVclPtrInstance< VirtualDevice > aOut; // calculate bound rect for all shapes Rectangle aBound; @@ -927,18 +927,18 @@ bool GraphicExporter::GetGraphic( ExportSettings& rSettings, Graphic& aGraphic, } } - aOut.EnableOutput( false ); - aOut.SetMapMode( aMap ); + aOut->EnableOutput( false ); + aOut->SetMapMode( aMap ); if( rSettings.mbUseHighContrast ) - aOut.SetDrawMode( aOut.GetDrawMode() | DRAWMODE_SETTINGSLINE | DRAWMODE_SETTINGSFILL | DRAWMODE_SETTINGSTEXT | DRAWMODE_SETTINGSGRADIENT ); + aOut->SetDrawMode( aOut->GetDrawMode() | DRAWMODE_SETTINGSLINE | DRAWMODE_SETTINGSFILL | DRAWMODE_SETTINGSTEXT | DRAWMODE_SETTINGSGRADIENT ); GDIMetaFile aMtf; aMtf.Clear(); - aMtf.Record( &aOut ); + aMtf.Record( aOut ); MapMode aOutMap( aMap ); aOutMap.SetOrigin( Point( -aBound.TopLeft().X(), -aBound.TopLeft().Y() ) ); - aOut.SetRelativeMapMode( aOutMap ); + aOut->SetRelativeMapMode( aOutMap ); sdr::contact::DisplayInfo aDisplayInfo; @@ -956,7 +956,7 @@ bool GraphicExporter::GetGraphic( ExportSettings& rSettings, Graphic& aGraphic, { // more effective way to paint a vector of SdrObjects. Hand over the processed page // to have it in the - sdr::contact::ObjectContactOfObjListPainter aMultiObjectPainter(aOut, aShapes, mpCurrentPage); + sdr::contact::ObjectContactOfObjListPainter aMultiObjectPainter(*aOut.get(), aShapes, mpCurrentPage); ImplExportCheckVisisbilityRedirector aCheckVisibilityRedirector(mpCurrentPage); aMultiObjectPainter.SetViewObjectContactRedirector(&aCheckVisibilityRedirector); @@ -966,7 +966,7 @@ bool GraphicExporter::GetGraphic( ExportSettings& rSettings, Graphic& aGraphic, aMtf.Stop(); aMtf.WindStart(); - const Size aExtSize( aOut.PixelToLogic( Size( 0, 0 ) ) ); + const Size aExtSize( aOut->PixelToLogic( Size( 0, 0 ) ) ); Size aBoundSize( aBound.GetWidth() + ( aExtSize.Width() ), aBound.GetHeight() + ( aExtSize.Height() ) ); diff --git a/svx/source/unodraw/recoveryui.cxx b/svx/source/unodraw/recoveryui.cxx index 74515045415c..693cae055133 100644 --- a/svx/source/unodraw/recoveryui.cxx +++ b/svx/source/unodraw/recoveryui.cxx @@ -67,7 +67,7 @@ class RecoveryUI : public ::cppu::WeakImplHelper2< css::lang::XServiceInfo css::uno::Reference< css::uno::XComponentContext > m_xContext; /** @short TODO */ - vcl::Window* m_pParentWindow; + VclPtr<vcl::Window> m_pParentWindow; /** @short TODO */ RecoveryUI::EJob m_eJob; @@ -245,7 +245,7 @@ bool RecoveryUI::impl_doEmergencySave() css::uno::Reference< css::frame::XStatusListener > xCore(pCore); // create dialog for this operation and bind it to the used core service - boost::scoped_ptr<Dialog> xDialog(new svxdr::SaveDialog(m_pParentWindow, pCore)); + VclPtrInstance<svxdr::SaveDialog> xDialog(m_pParentWindow, pCore); // start the dialog short nRet = xDialog->Execute(); @@ -260,7 +260,7 @@ void RecoveryUI::impl_doRecovery() // create all needed dialogs for this operation // and bind it to the used core service - boost::scoped_ptr<Dialog> xDialog(new svxdr::RecoveryDialog(m_pParentWindow, pCore)); + VclPtrInstance<svxdr::RecoveryDialog> xDialog(m_pParentWindow, pCore); // start the dialog xDialog->Execute(); diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx index 6924b90d4343..1c37eabbb299 100644 --- a/svx/source/unodraw/unoshape.cxx +++ b/svx/source/unodraw/unoshape.cxx @@ -670,13 +670,13 @@ uno::Any SvxShape::GetBitmap( bool bMetaFile /* = false */ ) const if( !mpObj.is() || mpModel == NULL || !mpObj->IsInserted() || NULL == mpObj->GetPage() ) return aAny; - VirtualDevice aVDev; - aVDev.SetMapMode(MapMode(MAP_100TH_MM)); + ScopedVclPtrInstance< VirtualDevice > pVDev; + pVDev->SetMapMode(MapMode(MAP_100TH_MM)); SdrModel* pModel = mpObj->GetModel(); SdrPage* pPage = mpObj->GetPage(); - boost::scoped_ptr<E3dView> pView(new E3dView( pModel, &aVDev )); + boost::scoped_ptr<E3dView> pView(new E3dView( pModel, pVDev.get() )); pView->hideMarkHandles(); SdrPageView* pPageView = pView->ShowSdrPage(pPage); diff --git a/svx/source/unodraw/unoshtxt.cxx b/svx/source/unodraw/unoshtxt.cxx index c87bdc10d943..0cc0b43c5f9e 100644 --- a/svx/source/unodraw/unoshtxt.cxx +++ b/svx/source/unodraw/unoshtxt.cxx @@ -88,7 +88,7 @@ private: SdrObject* mpObject; SdrText* mpText; SdrView* mpView; - const vcl::Window* mpWindow; + VclPtr<const vcl::Window> mpWindow; SdrModel* mpModel; SdrOutliner* mpOutliner; SvxOutlinerForwarder* mpTextForwarder; |