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)
m_pParent = pParentDialog;
m_pOptionsBtn = new PushButton( this, WB_TABSTOP );
m_pEnableBtn = new PushButton( this, WB_TABSTOP );
m_pRemoveBtn = new PushButton( this, WB_TABSTOP );
m_pOptionsBtn = VclPtr<PushButton>::Create( this, WB_TABSTOP );
m_pEnableBtn = VclPtr<PushButton>::Create( this, WB_TABSTOP );
m_pRemoveBtn = VclPtr<PushButton>::Create( this, WB_TABSTOP );
SetHelpId( HID_EXTENSION_MANAGER_LISTBOX );
m_pOptionsBtn->SetHelpId( HID_EXTENSION_MANAGER_LISTBOX_OPTIONS );
......
......@@ -814,7 +814,7 @@ void ExtensionCmdQueue::Thread::execute()
const SolarMutexGuard guard;
ScopedVclPtr<MessageDialog> box(
new MessageDialog(currentCmdEnv->activeDialog(), msg));
VclPtr<MessageDialog>::Create(currentCmdEnv->activeDialog(), msg));
if ( m_pDialogHelper )
box->SetText( m_pDialogHelper->getWindow()->GetText() );
box->Execute();
......@@ -923,12 +923,10 @@ void ExtensionCmdQueue::Thread::_removeExtension( ::rtl::Reference< ProgressCmdE
void ExtensionCmdQueue::Thread::_checkForUpdates(
const std::vector<uno::Reference<deployment::XPackage > > &vExtensionList )
{
ScopedVclPtr<UpdateDialog> pUpdateDialog;
std::vector< UpdateData > vData;
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
......
......@@ -201,7 +201,7 @@ void ExtensionBox_Impl::Init()
{
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->EnableDrag();
......@@ -544,7 +544,7 @@ void ExtensionBox_Impl::DrawRow( const Rectangle& rRect, const TEntry_Impl& rEnt
// Init publisher link here
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->SetPaintTransparent( true );
rEntry->m_pPublisher->SetURL( rEntry->m_sPublisherURL );
......
......@@ -223,9 +223,8 @@ void ServiceImpl::startExecuteModal(
catch (const Exception & exc) {
if (bAppUp) {
const SolarMutexGuard guard;
VclPtr<MessageDialog> box(
new MessageDialog(Application::GetActiveTopWindow(),
exc.Message));
ScopedVclPtrInstance<MessageDialog> box(
Application::GetActiveTopWindow(), exc.Message);
box->Execute();
}
throw;
......
......@@ -112,7 +112,7 @@ void TheExtensionManager::createDialog( const bool bCreateUpdDlg )
{
if ( !m_pUpdReqDialog )
{
m_pUpdReqDialog = new UpdateRequiredDialog( NULL, this );
m_pUpdReqDialog = VclPtr<UpdateRequiredDialog>::Create( nullptr, this );
delete m_pExecuteCmdQueue;
m_pExecuteCmdQueue = new ExtensionCmdQueue( (DialogHelper*) m_pUpdReqDialog, this, m_xContext );
createPackageList();
......@@ -120,7 +120,7 @@ void TheExtensionManager::createDialog( const bool bCreateUpdDlg )
}
else if ( !m_pExtMgrDialog )
{
m_pExtMgrDialog = new ExtMgrDialog( m_pParent, this );
m_pExtMgrDialog = VclPtr<ExtMgrDialog>::Create( m_pParent, this );
delete m_pExecuteCmdQueue;
m_pExecuteCmdQueue = new ExtensionCmdQueue( (DialogHelper*) m_pExtMgrDialog, this, m_xContext );
m_pExtMgrDialog->setGetExtensionsURL( m_sGetExtensionsURL );
......
......@@ -520,7 +520,7 @@ UpdateDialog::UpdateDialog(
get(m_pthrobber, "THROBBER");
get(m_pUpdate, "UPDATE_LABEL");
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));
m_pUpdates->set_width_request(aSize.Width());
m_pUpdates->set_height_request(aSize.Height());
......
......@@ -330,7 +330,8 @@ sal_Int16 LicenseDialog::execute() throw (RuntimeException, std::exception)
sal_Int16 LicenseDialog::solar_execute()
{
VclPtr<LicenseDialogImpl> dlg(
new LicenseDialogImpl(
VclPtr<LicenseDialogImpl>::Create(
VCLUnoHelper::GetWindow(m_parent),
m_xComponentContext, m_sExtensionName, m_sLicenseText));
......
......@@ -131,7 +131,7 @@ public:
SplashScreenWindow::SplashScreenWindow(SplashScreen *pSplash)
: IntroWindow()
, pSpl( pSplash )
, _vdev(new VirtualDevice(*this))
, _vdev(VclPtr<VirtualDevice>::Create(*this))
{
_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