diff options
Diffstat (limited to 'sw/source/uibase/uiview/view2.cxx')
-rw-r--r-- | sw/source/uibase/uiview/view2.cxx | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/sw/source/uibase/uiview/view2.cxx b/sw/source/uibase/uiview/view2.cxx index f052dbe1e2ea..83586ec227f1 100644 --- a/sw/source/uibase/uiview/view2.cxx +++ b/sw/source/uibase/uiview/view2.cxx @@ -240,8 +240,8 @@ int SwView::InsertGraphic( const OUString &rPath, const OUString &rFilter, const sal_uInt16 aRotation = aMetadata.getRotation(); if (aRotation != 0) { - MessageDialog aQueryBox( GetWindow(),"QueryRotateIntoStandardOrientationDialog","modules/swriter/ui/queryrotateintostandarddialog.ui"); - if (aQueryBox.Execute() == RET_YES) + ScopedVclPtrInstance< MessageDialog > aQueryBox( GetWindow(),"QueryRotateIntoStandardOrientationDialog","modules/swriter/ui/queryrotateintostandarddialog.ui"); + if (aQueryBox->Execute() == RET_YES) { GraphicNativeTransform aTransform( aGraphic ); aTransform.rotate( aRotation ); @@ -439,8 +439,8 @@ bool SwView::InsertGraphicDlg( SfxRequest& rReq ) // really store as link only? if( bAsLink && SvtMiscOptions().ShowLinkWarningDialog() ) { - SvxLinkWarningDialog aWarnDlg(GetWindow(),pFileDlg->GetPath()); - if( aWarnDlg.Execute() != RET_OK ) + ScopedVclPtrInstance< SvxLinkWarningDialog > aWarnDlg(GetWindow(),pFileDlg->GetPath()); + if( aWarnDlg->Execute() != RET_OK ) bAsLink=false; // don't store as link } } @@ -504,8 +504,8 @@ bool SwView::InsertGraphicDlg( SfxRequest& rReq ) { if( bShowError ) { - MessageDialog aInfoBox( GetWindow(), SW_RESSTR( nResId ), VCL_MESSAGE_INFO); - aInfoBox.Execute(); + ScopedVclPtrInstance< MessageDialog > aInfoBox( GetWindow(), SW_RESSTR( nResId ), VCL_MESSAGE_INFO); + aInfoBox->Execute(); } rReq.Ignore(); } @@ -585,11 +585,11 @@ void SwView::Execute(SfxRequest &rReq) pParent = static_cast<const XWindowItem*>( pParentItem )->GetWindowPtr(); else pParent = &GetViewFrame()->GetWindow(); - SfxPasswordDialog aPasswdDlg( pParent ); - aPasswdDlg.SetMinLen( 1 ); + ScopedVclPtrInstance< SfxPasswordDialog > aPasswdDlg( pParent ); + aPasswdDlg->SetMinLen( 1 ); //#i69751# the result of Execute() can be ignored - (void)aPasswdDlg.Execute(); - OUString sNewPasswd( aPasswdDlg.GetPassword() ); + (void)aPasswdDlg->Execute(); + OUString sNewPasswd( aPasswdDlg->GetPassword() ); Sequence <sal_Int8> aNewPasswd = pIDRA->GetRedlinePassword(); SvPasswordHelper::GetHashPassword( aNewPasswd, sNewPasswd ); if(SvPasswordHelper::CompareHashPassword(aPasswd, sNewPasswd)) @@ -623,14 +623,14 @@ void SwView::Execute(SfxRequest &rReq) pParent = static_cast<const XWindowItem*>( pParentItem )->GetWindowPtr(); else pParent = &GetViewFrame()->GetWindow(); - SfxPasswordDialog aPasswdDlg( pParent ); - aPasswdDlg.SetMinLen( 1 ); + ScopedVclPtrInstance< SfxPasswordDialog > aPasswdDlg( pParent ); + aPasswdDlg->SetMinLen( 1 ); if(!aPasswd.getLength()) - aPasswdDlg.ShowExtras(SfxShowExtras::CONFIRM); - if (aPasswdDlg.Execute()) + aPasswdDlg->ShowExtras(SfxShowExtras::CONFIRM); + if (aPasswdDlg->Execute()) { sal_uInt16 nOn = nsRedlineMode_t::REDLINE_ON; - OUString sNewPasswd( aPasswdDlg.GetPassword() ); + OUString sNewPasswd( aPasswdDlg->GetPassword() ); Sequence <sal_Int8> aNewPasswd = pIDRA->GetRedlinePassword(); SvPasswordHelper::GetHashPassword( aNewPasswd, sNewPasswd ); @@ -2286,11 +2286,11 @@ void SwView::GenerateFormLetter(bool bUseCurrentDocument) if ( lcl_NeedAdditionalDataSource( xDBContext ) ) { // no data sources are available - create a new one - MessageDialog aQuery(&GetViewFrame()->GetWindow(), + ScopedVclPtrInstance<MessageDialog> aQuery(&GetViewFrame()->GetWindow(), "DataSourcesUnavailableDialog", "modules/swriter/ui/datasourcesunavailabledialog.ui"); // no cancel allowed - if (RET_OK != aQuery.Execute()) + if (RET_OK != aQuery->Execute()) return; bCallAddressPilot = true; } @@ -2335,12 +2335,12 @@ void SwView::GenerateFormLetter(bool bUseCurrentDocument) OUString sSource; if(!GetWrtShell().IsFieldDataSourceAvailable(sSource)) { - MessageDialog aWarning(&GetViewFrame()->GetWindow(), + ScopedVclPtrInstance<MessageDialog> aWarning(&GetViewFrame()->GetWindow(), "WarnDataSourceDialog", "modules/swriter/ui/warndatasourcedialog.ui"); - OUString sTmp(aWarning.get_primary_text()); - aWarning.set_primary_text(sTmp.replaceFirst("%1", sSource)); - if (RET_OK == aWarning.Execute()) + OUString sTmp(aWarning->get_primary_text()); + aWarning->set_primary_text(sTmp.replaceFirst("%1", sSource)); + if (RET_OK == aWarning->Execute()) { SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create(); if ( pFact ) @@ -2389,8 +2389,8 @@ void SwView::GenerateFormLetter(bool bUseCurrentDocument) SfxApplication* pSfxApp = SfxGetpApp(); vcl::Window* pTopWin = pSfxApp->GetTopWindow(); - SfxTemplateManagerDlg aDocTemplDlg; - int nRet = aDocTemplDlg.Execute(); + ScopedVclPtrInstance< SfxTemplateManagerDlg > aDocTemplDlg; + int nRet = aDocTemplDlg->Execute(); bool bNewWin = false; if ( nRet == RET_OK ) { |