Kaydet (Commit) 0703fc22 authored tarafından Michael Meeks's avatar Michael Meeks

desktop: convert new to ::Create.

Change-Id: I114ab23302970ce0abe551ffd693e92b0f4ae8c5
üst e0686cb7
...@@ -166,9 +166,9 @@ void ExtBoxWithBtns_Impl::InitFromDialog(ExtMgrDialog *pParentDialog) ...@@ -166,9 +166,9 @@ void ExtBoxWithBtns_Impl::InitFromDialog(ExtMgrDialog *pParentDialog)
m_pParent = pParentDialog; m_pParent = pParentDialog;
m_pOptionsBtn = new PushButton( this, WB_TABSTOP ); m_pOptionsBtn = VclPtr<PushButton>::Create( this, WB_TABSTOP );
m_pEnableBtn = new PushButton( this, WB_TABSTOP ); m_pEnableBtn = VclPtr<PushButton>::Create( this, WB_TABSTOP );
m_pRemoveBtn = new PushButton( this, WB_TABSTOP ); m_pRemoveBtn = VclPtr<PushButton>::Create( this, WB_TABSTOP );
SetHelpId( HID_EXTENSION_MANAGER_LISTBOX ); SetHelpId( HID_EXTENSION_MANAGER_LISTBOX );
m_pOptionsBtn->SetHelpId( HID_EXTENSION_MANAGER_LISTBOX_OPTIONS ); m_pOptionsBtn->SetHelpId( HID_EXTENSION_MANAGER_LISTBOX_OPTIONS );
......
...@@ -814,7 +814,7 @@ void ExtensionCmdQueue::Thread::execute() ...@@ -814,7 +814,7 @@ void ExtensionCmdQueue::Thread::execute()
const SolarMutexGuard guard; const SolarMutexGuard guard;
ScopedVclPtr<MessageDialog> box( ScopedVclPtr<MessageDialog> box(
new MessageDialog(currentCmdEnv->activeDialog(), msg)); VclPtr<MessageDialog>::Create(currentCmdEnv->activeDialog(), msg));
if ( m_pDialogHelper ) if ( m_pDialogHelper )
box->SetText( m_pDialogHelper->getWindow()->GetText() ); box->SetText( m_pDialogHelper->getWindow()->GetText() );
box->Execute(); box->Execute();
...@@ -923,12 +923,10 @@ void ExtensionCmdQueue::Thread::_removeExtension( ::rtl::Reference< ProgressCmdE ...@@ -923,12 +923,10 @@ void ExtensionCmdQueue::Thread::_removeExtension( ::rtl::Reference< ProgressCmdE
void ExtensionCmdQueue::Thread::_checkForUpdates( void ExtensionCmdQueue::Thread::_checkForUpdates(
const std::vector<uno::Reference<deployment::XPackage > > &vExtensionList ) const std::vector<uno::Reference<deployment::XPackage > > &vExtensionList )
{ {
ScopedVclPtr<UpdateDialog> pUpdateDialog;
std::vector< UpdateData > vData;
const SolarMutexGuard guard; const SolarMutexGuard guard;
pUpdateDialog = new UpdateDialog( m_xContext, m_pDialogHelper? m_pDialogHelper->getWindow() : NULL, vExtensionList, &vData ); std::vector< UpdateData > vData;
ScopedVclPtrInstance<UpdateDialog> pUpdateDialog( m_xContext, m_pDialogHelper? m_pDialogHelper->getWindow() : nullptr, vExtensionList, &vData );
pUpdateDialog->notifyMenubar( true, false ); // prepare the checking, if there updates to be notified via menu bar icon pUpdateDialog->notifyMenubar( true, false ); // prepare the checking, if there updates to be notified via menu bar icon
......
...@@ -201,7 +201,7 @@ void ExtensionBox_Impl::Init() ...@@ -201,7 +201,7 @@ void ExtensionBox_Impl::Init()
{ {
SetHelpId( HID_EXTENSION_MANAGER_LISTBOX ); SetHelpId( HID_EXTENSION_MANAGER_LISTBOX );
m_pScrollBar = new ScrollBar( this, WB_VERT ); m_pScrollBar = VclPtr<ScrollBar>::Create( this, WB_VERT );
m_pScrollBar->SetScrollHdl( LINK( this, ExtensionBox_Impl, ScrollHdl ) ); m_pScrollBar->SetScrollHdl( LINK( this, ExtensionBox_Impl, ScrollHdl ) );
m_pScrollBar->EnableDrag(); m_pScrollBar->EnableDrag();
...@@ -544,7 +544,7 @@ void ExtensionBox_Impl::DrawRow( const Rectangle& rRect, const TEntry_Impl& rEnt ...@@ -544,7 +544,7 @@ void ExtensionBox_Impl::DrawRow( const Rectangle& rRect, const TEntry_Impl& rEnt
// Init publisher link here // Init publisher link here
if ( !rEntry->m_pPublisher && !rEntry->m_sPublisher.isEmpty() ) if ( !rEntry->m_pPublisher && !rEntry->m_sPublisher.isEmpty() )
{ {
rEntry->m_pPublisher = new FixedHyperlink( this ); rEntry->m_pPublisher = VclPtr<FixedHyperlink>::Create( this );
rEntry->m_pPublisher->SetBackground(); rEntry->m_pPublisher->SetBackground();
rEntry->m_pPublisher->SetPaintTransparent( true ); rEntry->m_pPublisher->SetPaintTransparent( true );
rEntry->m_pPublisher->SetURL( rEntry->m_sPublisherURL ); rEntry->m_pPublisher->SetURL( rEntry->m_sPublisherURL );
......
...@@ -223,9 +223,8 @@ void ServiceImpl::startExecuteModal( ...@@ -223,9 +223,8 @@ void ServiceImpl::startExecuteModal(
catch (const Exception & exc) { catch (const Exception & exc) {
if (bAppUp) { if (bAppUp) {
const SolarMutexGuard guard; const SolarMutexGuard guard;
VclPtr<MessageDialog> box( ScopedVclPtrInstance<MessageDialog> box(
new MessageDialog(Application::GetActiveTopWindow(), Application::GetActiveTopWindow(), exc.Message);
exc.Message));
box->Execute(); box->Execute();
} }
throw; throw;
......
...@@ -112,7 +112,7 @@ void TheExtensionManager::createDialog( const bool bCreateUpdDlg ) ...@@ -112,7 +112,7 @@ void TheExtensionManager::createDialog( const bool bCreateUpdDlg )
{ {
if ( !m_pUpdReqDialog ) if ( !m_pUpdReqDialog )
{ {
m_pUpdReqDialog = new UpdateRequiredDialog( NULL, this ); m_pUpdReqDialog = VclPtr<UpdateRequiredDialog>::Create( nullptr, this );
delete m_pExecuteCmdQueue; delete m_pExecuteCmdQueue;
m_pExecuteCmdQueue = new ExtensionCmdQueue( (DialogHelper*) m_pUpdReqDialog, this, m_xContext ); m_pExecuteCmdQueue = new ExtensionCmdQueue( (DialogHelper*) m_pUpdReqDialog, this, m_xContext );
createPackageList(); createPackageList();
...@@ -120,7 +120,7 @@ void TheExtensionManager::createDialog( const bool bCreateUpdDlg ) ...@@ -120,7 +120,7 @@ void TheExtensionManager::createDialog( const bool bCreateUpdDlg )
} }
else if ( !m_pExtMgrDialog ) else if ( !m_pExtMgrDialog )
{ {
m_pExtMgrDialog = new ExtMgrDialog( m_pParent, this ); m_pExtMgrDialog = VclPtr<ExtMgrDialog>::Create( m_pParent, this );
delete m_pExecuteCmdQueue; delete m_pExecuteCmdQueue;
m_pExecuteCmdQueue = new ExtensionCmdQueue( (DialogHelper*) m_pExtMgrDialog, this, m_xContext ); m_pExecuteCmdQueue = new ExtensionCmdQueue( (DialogHelper*) m_pExtMgrDialog, this, m_xContext );
m_pExtMgrDialog->setGetExtensionsURL( m_sGetExtensionsURL ); m_pExtMgrDialog->setGetExtensionsURL( m_sGetExtensionsURL );
......
...@@ -520,7 +520,7 @@ UpdateDialog::UpdateDialog( ...@@ -520,7 +520,7 @@ UpdateDialog::UpdateDialog(
get(m_pthrobber, "THROBBER"); get(m_pthrobber, "THROBBER");
get(m_pUpdate, "UPDATE_LABEL"); get(m_pUpdate, "UPDATE_LABEL");
get(m_pContainer, "UPDATES_CONTAINER"); get(m_pContainer, "UPDATES_CONTAINER");
m_pUpdates = new UpdateDialog::CheckListBox(m_pContainer, *this); m_pUpdates = VclPtr<UpdateDialog::CheckListBox>::Create(m_pContainer, *this);
Size aSize(LogicToPixel(Size(240, 51), MAP_APPFONT)); Size aSize(LogicToPixel(Size(240, 51), MAP_APPFONT));
m_pUpdates->set_width_request(aSize.Width()); m_pUpdates->set_width_request(aSize.Width());
m_pUpdates->set_height_request(aSize.Height()); m_pUpdates->set_height_request(aSize.Height());
......
...@@ -330,7 +330,8 @@ sal_Int16 LicenseDialog::execute() throw (RuntimeException, std::exception) ...@@ -330,7 +330,8 @@ sal_Int16 LicenseDialog::execute() throw (RuntimeException, std::exception)
sal_Int16 LicenseDialog::solar_execute() sal_Int16 LicenseDialog::solar_execute()
{ {
VclPtr<LicenseDialogImpl> dlg( VclPtr<LicenseDialogImpl> dlg(
new LicenseDialogImpl( VclPtr<LicenseDialogImpl>::Create(
VCLUnoHelper::GetWindow(m_parent), VCLUnoHelper::GetWindow(m_parent),
m_xComponentContext, m_sExtensionName, m_sLicenseText)); m_xComponentContext, m_sExtensionName, m_sLicenseText));
......
...@@ -131,7 +131,7 @@ public: ...@@ -131,7 +131,7 @@ public:
SplashScreenWindow::SplashScreenWindow(SplashScreen *pSplash) SplashScreenWindow::SplashScreenWindow(SplashScreen *pSplash)
: IntroWindow() : IntroWindow()
, pSpl( pSplash ) , pSpl( pSplash )
, _vdev(new VirtualDevice(*this)) , _vdev(VclPtr<VirtualDevice>::Create(*this))
{ {
_vdev->EnableRTL(IsRTLEnabled()); _vdev->EnableRTL(IsRTLEnabled());
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment