diff options
Diffstat (limited to 'extensions')
-rw-r--r-- | extensions/source/abpilot/typeselectionpage.cxx | 4 | ||||
-rw-r--r-- | extensions/source/bibliography/bibview.cxx | 8 | ||||
-rw-r--r-- | extensions/source/propctrlr/browserlistbox.cxx | 7 | ||||
-rw-r--r-- | extensions/source/propctrlr/commoncontrol.cxx | 6 | ||||
-rw-r--r-- | extensions/source/propctrlr/formcomponenthandler.cxx | 26 | ||||
-rw-r--r-- | extensions/source/propctrlr/xsdvalidationpropertyhandler.cxx | 10 | ||||
-rw-r--r-- | extensions/source/scanner/sanedlg.cxx | 26 | ||||
-rw-r--r-- | extensions/source/scanner/scanunx.cxx | 6 |
8 files changed, 46 insertions, 47 deletions
diff --git a/extensions/source/abpilot/typeselectionpage.cxx b/extensions/source/abpilot/typeselectionpage.cxx index 099ea23f2053..494c7b84df63 100644 --- a/extensions/source/abpilot/typeselectionpage.cxx +++ b/extensions/source/abpilot/typeselectionpage.cxx @@ -232,8 +232,8 @@ namespace abp if (AST_INVALID == getSelectedType( )) { - MessageDialog aError(this, ModuleRes(RID_STR_NEEDTYPESELECTION)); - aError.Execute(); + VclPtr<MessageDialog> aError(new MessageDialog(this, ModuleRes(RID_STR_NEEDTYPESELECTION))); + aError->Execute(); return false; } diff --git a/extensions/source/bibliography/bibview.cxx b/extensions/source/bibliography/bibview.cxx index 1df84033e093..c32e07723a09 100644 --- a/extensions/source/bibliography/bibview.cxx +++ b/extensions/source/bibliography/bibview.cxx @@ -139,11 +139,11 @@ namespace bib { sErrorString += "\n"; sErrorString += BIB_RESSTR(RID_MAP_QUESTION); - QueryBox aQuery( this, WB_YES_NO, sErrorString ); - aQuery.SetDefaultCheckBoxText(); - short nResult = aQuery.Execute(); + VclPtr<QueryBox> aQuery(new QueryBox(this, WB_YES_NO, sErrorString) ); + aQuery->SetDefaultCheckBoxText(); + short nResult = aQuery->Execute(); BibModul::GetConfig()->SetShowColumnAssignmentWarning( - !aQuery.GetCheckBoxState()); + !aQuery->GetCheckBoxState()); if( RET_YES != nResult ) { bExecute = false; diff --git a/extensions/source/propctrlr/browserlistbox.cxx b/extensions/source/propctrlr/browserlistbox.cxx index 6bb08b040b74..dba10a1e03da 100644 --- a/extensions/source/propctrlr/browserlistbox.cxx +++ b/extensions/source/propctrlr/browserlistbox.cxx @@ -357,10 +357,9 @@ namespace pcr ,m_bUpdate(true) ,m_pControlContextImpl( new PropertyControlContext_Impl( *this ) ) { - - ListBox aListBox(this,WB_DROPDOWN); - aListBox.SetPosSizePixel(Point(0,0),Size(100,100)); - m_nRowHeight = aListBox.GetSizePixel().Height()+2; + VclPtr<ListBox> aListBox(new ListBox(this,WB_DROPDOWN)); + aListBox->SetPosSizePixel(Point(0,0),Size(100,100)); + m_nRowHeight = aListBox->GetSizePixel().Height()+2; SetBackground( pParent->GetBackground() ); m_aLinesPlayground->SetBackground( GetBackground() ); diff --git a/extensions/source/propctrlr/commoncontrol.cxx b/extensions/source/propctrlr/commoncontrol.cxx index ac33ace00daa..096b717c8f4a 100644 --- a/extensions/source/propctrlr/commoncontrol.cxx +++ b/extensions/source/propctrlr/commoncontrol.cxx @@ -103,9 +103,9 @@ namespace pcr if ( !m_pControlWindow ) return; - ComboBox aComboBox(m_pControlWindow, WB_DROPDOWN); - aComboBox.SetPosSizePixel(Point(0,0), Size(100,100)); - m_pControlWindow->SetSizePixel(aComboBox.GetSizePixel()); + VclPtr<ComboBox> aComboBox(new ComboBox(m_pControlWindow, WB_DROPDOWN)); + aComboBox->SetPosSizePixel(Point(0,0), Size(100,100)); + m_pControlWindow->SetSizePixel(aComboBox->GetSizePixel()); // TODO/UNOize: why do the controls this themselves? Shouldn't this be the task // of the browser listbox/line? diff --git a/extensions/source/propctrlr/formcomponenthandler.cxx b/extensions/source/propctrlr/formcomponenthandler.cxx index 105941592695..a7006cba4f24 100644 --- a/extensions/source/propctrlr/formcomponenthandler.cxx +++ b/extensions/source/propctrlr/formcomponenthandler.cxx @@ -2608,9 +2608,9 @@ namespace pcr OSL_PRECOND( m_pInfoService.get(), "FormComponentPropertyHandler::impl_dialogListSelection_nothrow: no property meta data!" ); OUString sPropertyUIName( m_pInfoService->getPropertyTranslation( m_pInfoService->getPropertyId( _rProperty ) ) ); - ListSelectionDialog aDialog( impl_getDefaultDialogParent_nothrow(), m_xComponent, _rProperty, sPropertyUIName ); + VclPtr<ListSelectionDialog> aDialog(new ListSelectionDialog( impl_getDefaultDialogParent_nothrow(), m_xComponent, _rProperty, sPropertyUIName ) ); _rClearBeforeDialog.clear(); - return ( RET_OK == aDialog.Execute() ); + return ( RET_OK == aDialog->Execute() ); } @@ -2685,9 +2685,9 @@ namespace pcr return false; - FormLinkDialog aDialog( impl_getDefaultDialogParent_nothrow(), m_xComponent, xMasterProp, m_xContext ); + VclPtr<FormLinkDialog> aDialog(new FormLinkDialog( impl_getDefaultDialogParent_nothrow(), m_xComponent, xMasterProp, m_xContext ) ); _rClearBeforeDialog.clear(); - return ( RET_OK == aDialog.Execute() ); + return ( RET_OK == aDialog->Execute() ); } @@ -2871,11 +2871,11 @@ namespace pcr { // do this in an own block. The dialog needs to be destroyed before we call // destroyItemSet - ControlCharacterDialog aDlg( impl_getDefaultDialogParent_nothrow(), *pSet ); + VclPtr<ControlCharacterDialog> aDlg(new ControlCharacterDialog( impl_getDefaultDialogParent_nothrow(), *pSet ) ); _rClearBeforeDialog.clear(); - if ( RET_OK == aDlg.Execute() ) + if ( RET_OK == aDlg->Execute() ) { - const SfxItemSet* pOut = aDlg.GetOutputItemSet(); + const SfxItemSet* pOut = aDlg->GetOutputItemSet(); if ( pOut ) { Sequence< NamedValue > aFontPropertyValues; @@ -2942,11 +2942,11 @@ namespace pcr bool FormComponentPropertyHandler::impl_dialogChooseLabelControl_nothrow( Any& _out_rNewValue, ::osl::ClearableMutexGuard& _rClearBeforeDialog ) const { - OSelectLabelDialog dlgSelectLabel( impl_getDefaultDialogParent_nothrow(), m_xComponent ); + VclPtr<OSelectLabelDialog> dlgSelectLabel(new OSelectLabelDialog( impl_getDefaultDialogParent_nothrow(), m_xComponent ) ); _rClearBeforeDialog.clear(); - bool bSuccess = ( RET_OK == dlgSelectLabel.Execute() ); + bool bSuccess = ( RET_OK == dlgSelectLabel->Execute() ); if ( bSuccess ) - _out_rNewValue <<= dlgSelectLabel.GetSelected(); + _out_rNewValue <<= dlgSelectLabel->GetSelected(); return bSuccess; } @@ -2965,14 +2965,14 @@ namespace pcr OSL_PRECOND( impl_getContextControlContainer_nothrow().is(), "FormComponentPropertyHandler::impl_dialogChangeTabOrder_nothrow: invalid control context!" ); Reference< XTabControllerModel > xTabControllerModel( impl_getRowSet_nothrow(), UNO_QUERY ); - TabOrderDialog aDialog( + VclPtr<TabOrderDialog> aDialog(new TabOrderDialog( impl_getDefaultDialogParent_nothrow(), xTabControllerModel, impl_getContextControlContainer_nothrow(), m_xContext - ); + )); _rClearBeforeDialog.clear(); - return ( RET_OK == aDialog.Execute() ); + return ( RET_OK == aDialog->Execute() ); } diff --git a/extensions/source/propctrlr/xsdvalidationpropertyhandler.cxx b/extensions/source/propctrlr/xsdvalidationpropertyhandler.cxx index 99df0140e250..3a847ada9654 100644 --- a/extensions/source/propctrlr/xsdvalidationpropertyhandler.cxx +++ b/extensions/source/propctrlr/xsdvalidationpropertyhandler.cxx @@ -496,11 +496,11 @@ namespace pcr ::std::vector< OUString > aExistentNames; m_pHelper->getAvailableDataTypeNames( aExistentNames ); - NewDataTypeDialog aDialog( NULL, pType->getName(), aExistentNames ); // TODO/eForms: proper parent - if ( aDialog.Execute() != RET_OK ) + VclPtr<NewDataTypeDialog> aDialog(new NewDataTypeDialog( NULL, pType->getName(), aExistentNames ) ); // TODO/eForms: proper parent + if ( aDialog->Execute() != RET_OK ) return false; - _rNewName = aDialog.GetName(); + _rNewName = aDialog->GetName(); return true; } @@ -535,8 +535,8 @@ namespace pcr // confirmation message OUString sConfirmation( PcrRes( RID_STR_CONFIRM_DELETE_DATA_TYPE ).toString() ); sConfirmation = sConfirmation.replaceFirst( "#type#", pType->getName() ); - QueryBox aQuery( NULL, WB_YES_NO, sConfirmation ); // TODO/eForms: proper parent - if ( aQuery.Execute() != RET_YES ) + VclPtr<QueryBox> aQuery(new QueryBox( NULL, WB_YES_NO, sConfirmation ) ); // TODO/eForms: proper parent + if ( aQuery->Execute() != RET_YES ) return false; return true; diff --git a/extensions/source/scanner/sanedlg.cxx b/extensions/source/scanner/sanedlg.cxx index 2dc49da7b8b0..8c84962cf957 100644 --- a/extensions/source/scanner/sanedlg.cxx +++ b/extensions/source/scanner/sanedlg.cxx @@ -262,8 +262,8 @@ short SaneDlg::Execute() { if( ! Sane::IsSane() ) { - MessageDialog aErrorBox(NULL, SaneResId(STR_COULD_NOT_BE_INIT)); - aErrorBox.Execute(); + VclPtr<MessageDialog> aErrorBox(new MessageDialog(NULL, SaneResId(STR_COULD_NOT_BE_INIT))); + aErrorBox->Execute(); return sal_False; } LoadState(); @@ -545,8 +545,8 @@ IMPL_LINK( SaneDlg, ClickBtnHdl, Button*, pButton ) aString = aString.replaceFirst( "%s", Sane::GetVendor( mrSane.GetDeviceNumber() ) ); aString = aString.replaceFirst( "%s", Sane::GetModel( mrSane.GetDeviceNumber() ) ); aString = aString.replaceFirst( "%s", Sane::GetType( mrSane.GetDeviceNumber() ) ); - MessageDialog aInfoBox(this, aString, VCL_MESSAGE_INFO); - aInfoBox.Execute(); + VclPtr<MessageDialog> aInfoBox(new MessageDialog(this, aString, VCL_MESSAGE_INFO)); + aInfoBox->Execute(); } else if( pButton == mpPreviewButton ) AcquirePreview(); @@ -574,11 +574,11 @@ IMPL_LINK( SaneDlg, ClickBtnHdl, Button*, pButton ) x[ i ] = (double)i; mrSane.GetOptionValue( mnCurrentOption, y.get() ); - GridDialog aGrid( x.get(), y.get(), nElements, this ); - aGrid.SetText( mrSane.GetOptionName( mnCurrentOption ) ); - aGrid.setBoundings( 0, mfMin, nElements, mfMax ); - if( aGrid.Execute() && aGrid.getNewYValues() ) - mrSane.SetOptionValue( mnCurrentOption, aGrid.getNewYValues() ); + VclPtr<GridDialog> aGrid(new GridDialog( x.get(), y.get(), nElements, this ) ); + aGrid->SetText( mrSane.GetOptionName( mnCurrentOption ) ); + aGrid->setBoundings( 0, mfMin, nElements, mfMax ); + if( aGrid->Execute() && aGrid->getNewYValues() ) + mrSane.SetOptionValue( mnCurrentOption, aGrid->getNewYValues() ); } break; case SANE_TYPE_BOOL: @@ -826,8 +826,8 @@ void SaneDlg::AcquirePreview() if( nOption == -1 ) { OUString aString(SaneResId(STR_SLOW_PREVIEW)); - MessageDialog aBox(this, aString, VCL_MESSAGE_WARNING, VCL_BUTTONS_OK_CANCEL); - if (aBox.Execute() == RET_CANCEL) + VclPtr<MessageDialog> aBox(new MessageDialog(this, aString, VCL_MESSAGE_WARNING, VCL_BUTTONS_OK_CANCEL)); + if (aBox->Execute() == RET_CANCEL) return; } else @@ -836,8 +836,8 @@ void SaneDlg::AcquirePreview() BitmapTransporter aTransporter; if( ! mrSane.Start( aTransporter ) ) { - MessageDialog aErrorBox(this, SaneResId(STR_ERROR_SCAN)); - aErrorBox.Execute(); + VclPtr<MessageDialog> aErrorBox(new MessageDialog(this, SaneResId(STR_ERROR_SCAN))); + aErrorBox->Execute(); } else { diff --git a/extensions/source/scanner/scanunx.cxx b/extensions/source/scanner/scanunx.cxx index a66d797587dc..e93f623a4991 100644 --- a/extensions/source/scanner/scanunx.cxx +++ b/extensions/source/scanner/scanunx.cxx @@ -299,9 +299,9 @@ sal_Bool ScannerManager::configureScannerAndScan( ScannerContext& scanner_contex ); pHolder->m_bBusy = true; - SaneDlg aDlg( NULL, pHolder->m_aSane, listener.is() ); - bRet = aDlg.Execute(); - bScan = aDlg.getDoScan(); + VclPtr<SaneDlg> aDlg(new SaneDlg(NULL, pHolder->m_aSane, listener.is()) ); + bRet = aDlg->Execute(); + bScan = aDlg->getDoScan(); pHolder->m_bBusy = false; } if ( bScan ) |