diff options
Diffstat (limited to 'sc/source/ui/docshell')
-rw-r--r-- | sc/source/ui/docshell/dbdocimp.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/docshell/docfunc.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/docshell/docsh.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/docshell/docsh3.cxx | 6 | ||||
-rw-r--r-- | sc/source/ui/docshell/docsh4.cxx | 6 | ||||
-rw-r--r-- | sc/source/ui/docshell/docsh5.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/docshell/docsh6.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/docshell/documentlinkmgr.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/docshell/impex.cxx | 2 |
9 files changed, 15 insertions, 15 deletions
diff --git a/sc/source/ui/docshell/dbdocimp.cxx b/sc/source/ui/docshell/dbdocimp.cxx index a236448b5cbc..df197e37db44 100644 --- a/sc/source/ui/docshell/dbdocimp.cxx +++ b/sc/source/ui/docshell/dbdocimp.cxx @@ -635,7 +635,7 @@ bool ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam, nErrStringId = STR_MSSG_IMPORTDATA_0; aErrorMessage = ScGlobal::GetRscString( nErrStringId ); } - ScopedVclPtr<InfoBox> aInfoBox(new InfoBox( rDocShell.GetActiveDialogParent(), aErrorMessage ) ); + ScopedVclPtrInstance< InfoBox > aInfoBox( rDocShell.GetActiveDialogParent(), aErrorMessage ); aInfoBox->Execute(); } diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx index 22c7986b6114..305ab149d229 100644 --- a/sc/source/ui/docshell/docfunc.cxx +++ b/sc/source/ui/docshell/docfunc.cxx @@ -3756,7 +3756,7 @@ bool ScDocFunc::Unprotect( SCTAB nTab, const OUString& rPassword, bool bApi ) { if (!bApi) { - ScopedVclPtr<InfoBox> aBox(new InfoBox( rDocShell.GetActiveDialogParent(), OUString( ScResId( SCSTR_WRONGPASSWORD ) ) ) ); + ScopedVclPtrInstance< InfoBox > aBox( rDocShell.GetActiveDialogParent(), OUString( ScResId( SCSTR_WRONGPASSWORD ) ) ); aBox->Execute(); } return false; @@ -3786,7 +3786,7 @@ bool ScDocFunc::Unprotect( SCTAB nTab, const OUString& rPassword, bool bApi ) { if (!bApi) { - ScopedVclPtr<InfoBox> aBox(new InfoBox( rDocShell.GetActiveDialogParent(), OUString( ScResId( SCSTR_WRONGPASSWORD ) ) ) ); + ScopedVclPtrInstance< InfoBox > aBox( rDocShell.GetActiveDialogParent(), OUString( ScResId( SCSTR_WRONGPASSWORD ) ) ); aBox->Execute(); } return false; diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx index b8fd016fb433..191a284b0e16 100644 --- a/sc/source/ui/docshell/docsh.cxx +++ b/sc/source/ui/docshell/docsh.cxx @@ -821,7 +821,7 @@ void ScDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint ) OUString aMessage( ScGlobal::GetRscString( STR_FILE_LOCKED_SAVE_LATER ) ); aMessage = aMessage.replaceFirst( "%1", aUserName ); - ScopedVclPtr<WarningBox> aBox(new WarningBox( GetActiveDialogParent(), WinBits( WB_RETRY_CANCEL | WB_DEF_RETRY ), aMessage ) ); + ScopedVclPtrInstance< WarningBox > aBox( GetActiveDialogParent(), WinBits( WB_RETRY_CANCEL | WB_DEF_RETRY ), aMessage ); if ( aBox->Execute() == RET_RETRY ) { bRetry = true; @@ -1457,7 +1457,7 @@ bool ScDocShell::ConvertFrom( SfxMedium& rMedium ) Fraction aZoom( 1, 1 ); double nPPTX = ScGlobal::nScreenPPTX * (double) aZoom / GetOutputFactor(); // Factor is printer display ratio double nPPTY = ScGlobal::nScreenPPTY * (double) aZoom; - ScopedVclPtr<VirtualDevice> pVirtDev( new VirtualDevice() ); + ScopedVclPtrInstance< VirtualDevice > pVirtDev; // all sheets (for Excel import) SCTAB nTabCount = aDocument.GetTableCount(); for (SCTAB nTab=0; nTab<nTabCount; nTab++) diff --git a/sc/source/ui/docshell/docsh3.cxx b/sc/source/ui/docshell/docsh3.cxx index 66269ec2ebbb..b97bf8675e89 100644 --- a/sc/source/ui/docshell/docsh3.cxx +++ b/sc/source/ui/docshell/docsh3.cxx @@ -368,7 +368,7 @@ void ScDocShell::CalcOutputFactor() pRefDev->SetFont(aOldFont); pRefDev->SetMapMode(aOldMode); - ScopedVclPtr<VirtualDevice> pVirtWindow( new VirtualDevice( *Application::GetDefaultDevice() ) ); + ScopedVclPtrInstance< VirtualDevice > pVirtWindow( *Application::GetDefaultDevice() ); pVirtWindow->SetMapMode(MAP_PIXEL); pPattern->GetFont(aDefFont, SC_AUTOCOL_BLACK, pVirtWindow); // font color doesn't matter here pVirtWindow->SetFont(aDefFont); @@ -1202,7 +1202,7 @@ bool ScDocShell::MergeSharedDocument( ScDocShell* pSharedDocShell ) while ( bLoop ) { bLoop = false; - ScopedVclPtr<ScConflictsDlg> aDlg(new ScConflictsDlg( GetActiveDialogParent(), GetViewData(), &rSharedDoc, aConflictsList ) ); + ScopedVclPtrInstance< ScConflictsDlg > aDlg( GetActiveDialogParent(), GetViewData(), &rSharedDoc, aConflictsList ); if ( aDlg->Execute() == RET_CANCEL ) { ScopedVclPtrInstance<QueryBox> aBox( GetActiveDialogParent(), WinBits( WB_YES_NO | WB_DEF_YES ), @@ -1320,7 +1320,7 @@ bool ScDocShell::MergeSharedDocument( ScDocShell* pSharedDocShell ) PostPaintExtras(); PostPaintGridAll(); - ScopedVclPtr<InfoBox> aInfoBox(new InfoBox( GetActiveDialogParent(), ScGlobal::GetRscString( STR_DOC_UPDATED ) ) ); + ScopedVclPtrInstance< InfoBox > aInfoBox( GetActiveDialogParent(), ScGlobal::GetRscString( STR_DOC_UPDATED ) ); aInfoBox->Execute(); } diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx index 9fd3dee3ef76..714919b71c97 100644 --- a/sc/source/ui/docshell/docsh4.cxx +++ b/sc/source/ui/docshell/docsh4.cxx @@ -222,7 +222,7 @@ void ScDocShell::Execute( SfxRequest& rReq ) aMessage += sTarget; aMessage += aTemplate.getToken( 1, '#' ); - ScopedVclPtr<QueryBox> aBox(new QueryBox( 0, WinBits(WB_YES_NO | WB_DEF_YES), aMessage )); + ScopedVclPtrInstance< QueryBox > aBox( nullptr, WinBits(WB_YES_NO | WB_DEF_YES), aMessage ); bDo = ( aBox->Execute() == RET_YES ); } @@ -913,7 +913,7 @@ void ScDocShell::Execute( SfxRequest& rReq ) break; } - ScopedVclPtr<ScShareDocumentDlg> aDlg(new ScShareDocumentDlg( GetActiveDialogParent(), pViewData ) ); + ScopedVclPtrInstance< ScShareDocumentDlg > aDlg( GetActiveDialogParent(), pViewData ); if ( aDlg->Execute() == RET_OK ) { bool bSetShared = aDlg->IsShareDocumentChecked(); @@ -1016,7 +1016,7 @@ void ScDocShell::Execute( SfxRequest& rReq ) OUString aMessage( ScGlobal::GetRscString( STR_FILE_LOCKED_TRY_LATER ) ); aMessage = aMessage.replaceFirst( "%1", aUserName ); - ScopedVclPtr<WarningBox> aBox(new WarningBox( GetActiveDialogParent(), WinBits( WB_OK ), aMessage ) ); + ScopedVclPtrInstance< WarningBox > aBox( GetActiveDialogParent(), WinBits( WB_OK ), aMessage ); aBox->Execute(); } else diff --git a/sc/source/ui/docshell/docsh5.cxx b/sc/source/ui/docshell/docsh5.cxx index db1b60b32f82..f95815389e66 100644 --- a/sc/source/ui/docshell/docsh5.cxx +++ b/sc/source/ui/docshell/docsh5.cxx @@ -81,7 +81,7 @@ void ScDocShell::ErrorMessage( sal_uInt16 nGlobStrId ) } } - ScopedVclPtr<InfoBox> aBox(new InfoBox( pParent, ScGlobal::GetRscString( nGlobStrId ) ) ); + ScopedVclPtrInstance< InfoBox > aBox( pParent, ScGlobal::GetRscString( nGlobStrId ) ); aBox->Execute(); if (bFocus) pParent->GrabFocus(); diff --git a/sc/source/ui/docshell/docsh6.cxx b/sc/source/ui/docshell/docsh6.cxx index 039f1dc9d289..4cd55805c1e0 100644 --- a/sc/source/ui/docshell/docsh6.cxx +++ b/sc/source/ui/docshell/docsh6.cxx @@ -531,7 +531,7 @@ void ScDocShell::CheckConfigOptions() if (pViewShell) { vcl::Window* pParent = pViewShell->GetFrameWin(); - ScopedVclPtr<InfoBox> aBox(new InfoBox(pParent, ScGlobal::GetRscString(STR_OPTIONS_WARN_SEPARATORS))); + ScopedVclPtrInstance< InfoBox > aBox(pParent, ScGlobal::GetRscString(STR_OPTIONS_WARN_SEPARATORS)); aBox->Execute(); } diff --git a/sc/source/ui/docshell/documentlinkmgr.cxx b/sc/source/ui/docshell/documentlinkmgr.cxx index 3fb31fc3bbc4..42745eb3f344 100644 --- a/sc/source/ui/docshell/documentlinkmgr.cxx +++ b/sc/source/ui/docshell/documentlinkmgr.cxx @@ -165,7 +165,7 @@ bool DocumentLinkManager::updateDdeLinks( vcl::Window* pWin ) aBuf.append(aElem); aBuf.appendAscii("\nType : "); aBuf.append(aType); - ScopedVclPtr<MessageDialog> aBox(new MessageDialog(pWin, aBuf.makeStringAndClear())); + ScopedVclPtrInstance< MessageDialog > aBox(pWin, aBuf.makeStringAndClear()); aBox->Execute(); } } diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx index b68471cb76b1..e11b6be89f79 100644 --- a/sc/source/ui/docshell/impex.cxx +++ b/sc/source/ui/docshell/impex.cxx @@ -1452,7 +1452,7 @@ bool ScImportExport::ExtText2Doc( SvStream& rStrm ) if ( !mbApi && nStartCol != nEndCol && !pDoc->IsBlockEmpty( nTab, nStartCol + 1, nStartRow, nEndCol, nRow ) ) { - ScopedVclPtr<ScReplaceWarnBox> aBox(new ScReplaceWarnBox( pDocSh->GetActiveDialogParent() )); + ScopedVclPtrInstance< ScReplaceWarnBox > aBox( pDocSh->GetActiveDialogParent() ); if ( aBox->Execute() != RET_YES ) { return false; |