From fbe6619a34b617a04a5135e40c70a172a44eefef Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 13 Jan 2015 14:50:19 +0200 Subject: vcl: VclPtr conversion in sfx2 Change-Id: I78ea3f4304ace27c6db0e3d0651bd65043dcbc68 --- sfx2/source/appl/newhelp.cxx | 172 ++++++++++++++++++++++++++----------------- 1 file changed, 106 insertions(+), 66 deletions(-) (limited to 'sfx2/source/appl/newhelp.cxx') diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx index 3f90d2d381e4..eb800ba69e84 100644 --- a/sfx2/source/appl/newhelp.cxx +++ b/sfx2/source/appl/newhelp.cxx @@ -302,6 +302,11 @@ extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeContentListBox(vcl::Wi } ContentListBox_Impl::~ContentListBox_Impl() +{ + dispose(); +} + +void ContentListBox_Impl::dispose() { sal_uInt16 nPos = 0; SvTreeListEntry* pEntry = GetEntry( nPos++ ); @@ -311,6 +316,7 @@ ContentListBox_Impl::~ContentListBox_Impl() delete static_cast(pEntry->GetUserData()); pEntry = GetEntry( nPos++ ); } + SvTreeListBox::dispose(); } void ContentListBox_Impl::InitRoot() @@ -544,8 +550,14 @@ IndexTabPage_Impl::IndexTabPage_Impl(vcl::Window* pParent, SfxHelpIndexWindow_Im } IndexTabPage_Impl::~IndexTabPage_Impl() +{ + dispose(); +} + +void IndexTabPage_Impl::dispose() { ClearIndex(); + HelpTabPage_Impl::dispose(); } @@ -945,6 +957,11 @@ SearchTabPage_Impl::SearchTabPage_Impl(vcl::Window* pParent, SfxHelpIndexWindow_ } SearchTabPage_Impl::~SearchTabPage_Impl() +{ + dispose(); +} + +void SearchTabPage_Impl::dispose() { SvtViewOptions aViewOpt( E_TABPAGE, CONFIGNAME_SEARCHPAGE ); sal_Int32 nChecked = m_pFullWordsCB->IsChecked() ? 1 : 0; @@ -967,6 +984,7 @@ SearchTabPage_Impl::~SearchTabPage_Impl() aUserData = comphelper::string::stripEnd(aUserData, ';'); Any aUserItem = makeAny( OUString( aUserData ) ); aViewOpt.SetUserItem( USERITEM_NAME, aUserItem ); + HelpTabPage_Impl::dispose(); } @@ -1140,6 +1158,11 @@ extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeBookmarksBox(vcl::Wind } BookmarksBox_Impl::~BookmarksBox_Impl() +{ + dispose(); +} + +void BookmarksBox_Impl::dispose() { // save bookmarks to configuration SvtHistoryOptions aHistOpt; @@ -1153,6 +1176,7 @@ BookmarksBox_Impl::~BookmarksBox_Impl() aHistOpt.AppendItem(eHELPBOOKMARKS, *pURL, sEmpty, aTitle, sEmpty, sEmpty); delete pURL; } + ListBox::dispose(); } @@ -1415,6 +1439,11 @@ SfxHelpIndexWindow_Impl::SfxHelpIndexWindow_Impl(SfxHelpWindow_Impl* _pParent) SfxHelpIndexWindow_Impl::~SfxHelpIndexWindow_Impl() +{ + dispose(); +} + +void SfxHelpIndexWindow_Impl::dispose() { sfx2::RemoveFromTaskPaneList( this ); @@ -1428,6 +1457,7 @@ SfxHelpIndexWindow_Impl::~SfxHelpIndexWindow_Impl() SvtViewOptions aViewOpt( E_TABDIALOG, CONFIGNAME_INDEXWIN ); aViewOpt.SetPageID( (sal_Int32)m_pTabCtrl->GetCurPageId() ); + vcl::Window::dispose(); } @@ -1805,10 +1835,6 @@ TextWin_Impl::TextWin_Impl( vcl::Window* p ) : DockingWindow( p, 0 ) { } -TextWin_Impl::~TextWin_Impl() -{ -} - bool TextWin_Impl::Notify( NotifyEvent& rNEvt ) { if( ( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT ) && rNEvt.GetKeyEvent()->GetKeyCode().GetCode() == KEY_TAB ) @@ -1830,8 +1856,8 @@ SfxHelpTextWindow_Impl::SfxHelpTextWindow_Impl( SfxHelpWindow_Impl* pParent ) : Window( pParent, WB_CLIPCHILDREN | WB_TABSTOP | WB_DIALOGCONTROL ), - aToolBox ( this, 0 ), - aOnStartupCB ( this, SfxResId( RID_HELP_ONSTARTUP_BOX ) ), + aToolBox ( new ToolBox(this, 0) ), + aOnStartupCB ( new CheckBox(this, SfxResId( RID_HELP_ONSTARTUP_BOX )) ), aIndexOnImage ( SfxResId( IMG_HELP_TOOLBOX_INDEX_ON ) ), aIndexOffImage ( SfxResId( IMG_HELP_TOOLBOX_INDEX_OFF ) ), aIndexOnText ( SfxResId( STR_HELP_BUTTON_INDEX_ON ).toString() ), @@ -1847,36 +1873,36 @@ SfxHelpTextWindow_Impl::SfxHelpTextWindow_Impl( SfxHelpWindow_Impl* pParent ) : bIsFullWordSearch ( false ) { - sfx2::AddToTaskPaneList( &aToolBox ); + sfx2::AddToTaskPaneList( aToolBox.get() ); xFrame = Frame::create( ::comphelper::getProcessComponentContext() ); xFrame->initialize( VCLUnoHelper::GetInterface ( pTextWin ) ); xFrame->setName( "OFFICE_HELP" ); lcl_disableLayoutOfFrame(xFrame); - aToolBox.SetHelpId( HID_HELP_TOOLBOX ); - - aToolBox.InsertItem( TBI_INDEX, aIndexOffText ); - aToolBox.SetHelpId( TBI_INDEX, HID_HELP_TOOLBOXITEM_INDEX ); - aToolBox.InsertSeparator(); - aToolBox.InsertItem( TBI_BACKWARD, SfxResId( STR_HELP_BUTTON_PREV ).toString() ); - aToolBox.SetHelpId( TBI_BACKWARD, HID_HELP_TOOLBOXITEM_BACKWARD ); - aToolBox.InsertItem( TBI_FORWARD, SfxResId( STR_HELP_BUTTON_NEXT ).toString() ); - aToolBox.SetHelpId( TBI_FORWARD, HID_HELP_TOOLBOXITEM_FORWARD ); - aToolBox.InsertItem( TBI_START, SfxResId( STR_HELP_BUTTON_START ).toString() ); - aToolBox.SetHelpId( TBI_START, HID_HELP_TOOLBOXITEM_START ); - aToolBox.InsertSeparator(); - aToolBox.InsertItem( TBI_PRINT, SfxResId( STR_HELP_BUTTON_PRINT ).toString() ); - aToolBox.SetHelpId( TBI_PRINT, HID_HELP_TOOLBOXITEM_PRINT ); - aToolBox.InsertItem( TBI_BOOKMARKS, SfxResId( STR_HELP_BUTTON_ADDBOOKMARK ).toString() ); - aToolBox.SetHelpId( TBI_BOOKMARKS, HID_HELP_TOOLBOXITEM_BOOKMARKS ); - aToolBox.InsertItem( TBI_SEARCHDIALOG, SfxResId( STR_HELP_BUTTON_SEARCHDIALOG ).toString() ); - aToolBox.SetHelpId( TBI_SEARCHDIALOG, HID_HELP_TOOLBOXITEM_SEARCHDIALOG ); + aToolBox->SetHelpId( HID_HELP_TOOLBOX ); + + aToolBox->InsertItem( TBI_INDEX, aIndexOffText ); + aToolBox->SetHelpId( TBI_INDEX, HID_HELP_TOOLBOXITEM_INDEX ); + aToolBox->InsertSeparator(); + aToolBox->InsertItem( TBI_BACKWARD, SfxResId( STR_HELP_BUTTON_PREV ).toString() ); + aToolBox->SetHelpId( TBI_BACKWARD, HID_HELP_TOOLBOXITEM_BACKWARD ); + aToolBox->InsertItem( TBI_FORWARD, SfxResId( STR_HELP_BUTTON_NEXT ).toString() ); + aToolBox->SetHelpId( TBI_FORWARD, HID_HELP_TOOLBOXITEM_FORWARD ); + aToolBox->InsertItem( TBI_START, SfxResId( STR_HELP_BUTTON_START ).toString() ); + aToolBox->SetHelpId( TBI_START, HID_HELP_TOOLBOXITEM_START ); + aToolBox->InsertSeparator(); + aToolBox->InsertItem( TBI_PRINT, SfxResId( STR_HELP_BUTTON_PRINT ).toString() ); + aToolBox->SetHelpId( TBI_PRINT, HID_HELP_TOOLBOXITEM_PRINT ); + aToolBox->InsertItem( TBI_BOOKMARKS, SfxResId( STR_HELP_BUTTON_ADDBOOKMARK ).toString() ); + aToolBox->SetHelpId( TBI_BOOKMARKS, HID_HELP_TOOLBOXITEM_BOOKMARKS ); + aToolBox->InsertItem( TBI_SEARCHDIALOG, SfxResId( STR_HELP_BUTTON_SEARCHDIALOG ).toString() ); + aToolBox->SetHelpId( TBI_SEARCHDIALOG, HID_HELP_TOOLBOXITEM_SEARCHDIALOG ); InitToolBoxImages(); - aToolBox.Show(); + aToolBox->Show(); InitOnStartupBox( false ); - aOnStartupCB.SetClickHdl( LINK( this, SfxHelpTextWindow_Impl, CheckHdl ) ); + aOnStartupCB->SetClickHdl( LINK( this, SfxHelpTextWindow_Impl, CheckHdl ) ); aSelectIdle.SetIdleHdl( LINK( this, SfxHelpTextWindow_Impl, SelectHdl ) ); aSelectIdle.SetPriority( SchedulerPriority::LOWEST ); @@ -1887,19 +1913,27 @@ SfxHelpTextWindow_Impl::SfxHelpTextWindow_Impl( SfxHelpWindow_Impl* pParent ) : SvtMiscOptions().AddListenerLink( LINK( this, SfxHelpTextWindow_Impl, NotifyHdl ) ); - if ( !aOnStartupCB.GetHelpId().getLength() ) - aOnStartupCB.SetHelpId( HID_HELP_ONSTARTUP_BOX ); + if ( !aOnStartupCB->GetHelpId().getLength() ) + aOnStartupCB->SetHelpId( HID_HELP_ONSTARTUP_BOX ); } SfxHelpTextWindow_Impl::~SfxHelpTextWindow_Impl() { - sfx2::RemoveFromTaskPaneList( &aToolBox ); + dispose(); +} + +void SfxHelpTextWindow_Impl::dispose() +{ + sfx2::RemoveFromTaskPaneList( aToolBox.get() ); bIsInClose = true; SvtMiscOptions().RemoveListenerLink( LINK( this, SfxHelpTextWindow_Impl, NotifyHdl ) ); delete pSrchDlg; + aToolBox.disposeAndClear(); + aOnStartupCB.disposeAndClear(); + vcl::Window::dispose(); } @@ -1928,39 +1962,39 @@ void SfxHelpTextWindow_Impl::InitToolBoxImages() aIndexOnImage = Image( SfxResId( bLarge ? IMG_HELP_TOOLBOX_L_INDEX_ON : IMG_HELP_TOOLBOX_INDEX_ON ) ); aIndexOffImage = Image( SfxResId( bLarge ? IMG_HELP_TOOLBOX_L_INDEX_OFF : IMG_HELP_TOOLBOX_INDEX_OFF ) ); - aToolBox.SetItemImage( TBI_INDEX, bIsIndexOn ? aIndexOffImage : aIndexOnImage ); + aToolBox->SetItemImage( TBI_INDEX, bIsIndexOn ? aIndexOffImage : aIndexOnImage ); - aToolBox.SetItemImage( TBI_BACKWARD, + aToolBox->SetItemImage( TBI_BACKWARD, Image( SfxResId( bLarge ? IMG_HELP_TOOLBOX_L_PREV : IMG_HELP_TOOLBOX_PREV ) ) ); - aToolBox.SetItemImage( TBI_FORWARD, + aToolBox->SetItemImage( TBI_FORWARD, Image( SfxResId( bLarge ? IMG_HELP_TOOLBOX_L_NEXT : IMG_HELP_TOOLBOX_NEXT ) ) ); - aToolBox.SetItemImage( TBI_START, + aToolBox->SetItemImage( TBI_START, Image( SfxResId( bLarge ? IMG_HELP_TOOLBOX_L_START : IMG_HELP_TOOLBOX_START ) ) ); - aToolBox.SetItemImage( TBI_PRINT, + aToolBox->SetItemImage( TBI_PRINT, Image( SfxResId( bLarge ? IMG_HELP_TOOLBOX_L_PRINT : IMG_HELP_TOOLBOX_PRINT ) ) ); - aToolBox.SetItemImage( TBI_BOOKMARKS, + aToolBox->SetItemImage( TBI_BOOKMARKS, Image( SfxResId( bLarge ? IMG_HELP_TOOLBOX_L_BOOKMARKS : IMG_HELP_TOOLBOX_BOOKMARKS ) ) ); - aToolBox.SetItemImage( TBI_SEARCHDIALOG, + aToolBox->SetItemImage( TBI_SEARCHDIALOG, Image( SfxResId( bLarge ? IMG_HELP_TOOLBOX_L_SEARCHDIALOG : IMG_HELP_TOOLBOX_SEARCHDIALOG ) ) ); - Size aSize = aToolBox.CalcWindowSizePixel(); + Size aSize = aToolBox->CalcWindowSizePixel(); aSize.Height() += TOOLBOX_OFFSET; - aToolBox.SetPosSizePixel( Point( 0, TOOLBOX_OFFSET ), aSize ); + aToolBox->SetPosSizePixel( Point( 0, TOOLBOX_OFFSET ), aSize ); SvtMiscOptions aMiscOptions; - if ( aMiscOptions.GetToolboxStyle() != aToolBox.GetOutStyle() ) - aToolBox.SetOutStyle( aMiscOptions.GetToolboxStyle() ); + if ( aMiscOptions.GetToolboxStyle() != aToolBox->GetOutStyle() ) + aToolBox->SetOutStyle( aMiscOptions.GetToolboxStyle() ); } @@ -1998,7 +2032,7 @@ void SfxHelpTextWindow_Impl::InitOnStartupBox( bool bOnlyText ) } if ( bHideBox ) - aOnStartupCB.Hide(); + aOnStartupCB->Hide(); else { // detect module name @@ -2025,20 +2059,20 @@ void SfxHelpTextWindow_Impl::InitOnStartupBox( bool bOnlyText ) // set module name in checkbox text OUString sText( aOnStartupText ); sText = sText.replaceFirst( "%MODULENAME", sModuleName ); - aOnStartupCB.SetText( sText ); + aOnStartupCB->SetText( sText ); // and show it - aOnStartupCB.Show(); + aOnStartupCB->Show(); // set check state - aOnStartupCB.Check( bHelpAtStartup ); - aOnStartupCB.SaveValue(); + aOnStartupCB->Check( bHelpAtStartup ); + aOnStartupCB->SaveValue(); // calculate and set optimal width of the onstartup checkbox OUString sCBText( "XXX" ); - sCBText += aOnStartupCB.GetText(); - long nTextWidth = aOnStartupCB.GetTextWidth( sCBText ); - Size aSize = aOnStartupCB.GetSizePixel(); + sCBText += aOnStartupCB->GetText(); + long nTextWidth = aOnStartupCB->GetTextWidth( sCBText ); + Size aSize = aOnStartupCB->GetSizePixel(); aSize.Width() = nTextWidth; - aOnStartupCB.SetSizePixel( aSize ); + aOnStartupCB->SetSizePixel( aSize ); SetOnStartupBoxPosition(); } @@ -2046,12 +2080,12 @@ void SfxHelpTextWindow_Impl::InitOnStartupBox( bool bOnlyText ) { // set position of the checkbox Size a3Size = LogicToPixel( Size( 3, 3 ), MAP_APPFONT ); - Size aTBSize = aToolBox.GetSizePixel(); - Size aCBSize = aOnStartupCB.GetSizePixel(); - Point aPnt = aToolBox.GetPosPixel(); + Size aTBSize = aToolBox->GetSizePixel(); + Size aCBSize = aOnStartupCB->GetSizePixel(); + Point aPnt = aToolBox->GetPosPixel(); aPnt.X() += aTBSize.Width() + a3Size.Width(); aPnt.Y() += ( ( aTBSize.Height() - aCBSize.Height() ) / 2 ); - aOnStartupCB.SetPosPixel( aPnt ); + aOnStartupCB->SetPosPixel( aPnt ); nMinPos = aPnt.X(); } } @@ -2061,10 +2095,10 @@ void SfxHelpTextWindow_Impl::InitOnStartupBox( bool bOnlyText ) void SfxHelpTextWindow_Impl::SetOnStartupBoxPosition() { - long nX = std::max( GetOutputSizePixel().Width() - aOnStartupCB.GetSizePixel().Width(), nMinPos ); - Point aPos = aOnStartupCB.GetPosPixel(); + long nX = std::max( GetOutputSizePixel().Width() - aOnStartupCB->GetSizePixel().Width(), nMinPos ); + Point aPos = aOnStartupCB->GetPosPixel(); aPos.X() = nX; - aOnStartupCB.SetPosPixel( aPos ); + aOnStartupCB->SetPosPixel( aPos ); } @@ -2181,7 +2215,7 @@ IMPL_LINK( SfxHelpTextWindow_Impl, NotifyHdl, SvtMiscOptions*, pOptions ) (void)pOptions; // unused variable InitToolBoxImages(); Resize(); - aToolBox.Invalidate(); + aToolBox->Invalidate(); return 0; } @@ -2308,7 +2342,7 @@ IMPL_LINK( SfxHelpTextWindow_Impl, CheckHdl, CheckBox*, pBox ) void SfxHelpTextWindow_Impl::Resize() { Size aSize = GetOutputSizePixel(); - long nToolBoxHeight = aToolBox.GetSizePixel().Height() + TOOLBOX_OFFSET; + long nToolBoxHeight = aToolBox->GetSizePixel().Height() + TOOLBOX_OFFSET; aSize.Height() -= nToolBoxHeight; pTextWin->SetPosSizePixel( Point( 0, nToolBoxHeight ), aSize ); SetOnStartupBoxPosition(); @@ -2325,7 +2359,7 @@ bool SfxHelpTextWindow_Impl::PreNotify( NotifyEvent& rNEvt ) const CommandEvent* pCmdEvt = rNEvt.GetCommandEvent(); vcl::Window* pCmdWin = rNEvt.GetWindow(); - if ( pCmdEvt->GetCommand() == COMMAND_CONTEXTMENU && pCmdWin != this && pCmdWin != &aToolBox ) + if ( pCmdEvt->GetCommand() == COMMAND_CONTEXTMENU && pCmdWin != this && pCmdWin != aToolBox.get() ) { Point aPos; if ( pCmdEvt->IsMouseEvent() ) @@ -2430,9 +2464,9 @@ bool SfxHelpTextWindow_Impl::PreNotify( NotifyEvent& rNEvt ) pHelpWin->CloseWindow(); nDone = true; } - else if ( KEY_TAB == nKey && aOnStartupCB.HasChildPathFocus() ) + else if ( KEY_TAB == nKey && aOnStartupCB->HasChildPathFocus() ) { - aToolBox.GrabFocus(); + aToolBox->GrabFocus(); nDone = true; } } @@ -2484,13 +2518,13 @@ void SfxHelpTextWindow_Impl::ToggleIndex( bool bOn ) bIsIndexOn = bOn; if ( bIsIndexOn ) { - aToolBox.SetItemImage( TBI_INDEX, aIndexOffImage ); - aToolBox.SetItemText( TBI_INDEX, aIndexOffText ); + aToolBox->SetItemImage( TBI_INDEX, aIndexOffImage ); + aToolBox->SetItemText( TBI_INDEX, aIndexOffText ); } else { - aToolBox.SetItemImage( TBI_INDEX, aIndexOnImage ); - aToolBox.SetItemText( TBI_INDEX, aIndexOnText ); + aToolBox->SetItemImage( TBI_INDEX, aIndexOnImage ); + aToolBox->SetItemText( TBI_INDEX, aIndexOnText ); } } @@ -2992,6 +3026,11 @@ SfxHelpWindow_Impl::SfxHelpWindow_Impl( SfxHelpWindow_Impl::~SfxHelpWindow_Impl() +{ + dispose(); +} + +void SfxHelpWindow_Impl::dispose() { SaveConfig(); vcl::Window* pDel = pIndexWin; @@ -3000,6 +3039,7 @@ SfxHelpWindow_Impl::~SfxHelpWindow_Impl() pTextWin->CloseFrame(); delete pTextWin; + SplitWindow::dispose(); } bool SfxHelpWindow_Impl::PreNotify( NotifyEvent& rNEvt ) -- cgit v1.2.3 From 00f2787a4a68633206635743298926bf2e65a8fa Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 11 Feb 2015 14:42:23 +0200 Subject: vclwidgets: wrap all vcl::Window subclasses allocated on stack in VclPtr Change-Id: Ia8b0d84bbf69f9d8f85505d019acdded14e25133 Conflicts: sw/qa/tiledrendering/tiledrendering.cxx --- avmedia/source/viewer/mediawindow.cxx | 4 +- basctl/source/basicide/baside2.cxx | 10 +- basctl/source/basicide/baside2b.cxx | 10 +- basctl/source/basicide/baside3.cxx | 8 +- basctl/source/basicide/basides1.cxx | 8 +- basctl/source/basicide/basobj2.cxx | 8 +- basctl/source/basicide/basobj3.cxx | 8 +- basctl/source/basicide/bastypes.cxx | 18 +- basctl/source/basicide/moduldl2.cxx | 16 +- basctl/source/basicide/moduldlg.cxx | 18 +- basctl/source/dlged/managelang.cxx | 10 +- basic/source/runtime/iosys.cxx | 6 +- chart2/source/controller/dialogs/res_DataLabel.cxx | 8 +- chart2/source/controller/main/ChartController.cxx | 8 +- .../controller/main/ChartController_EditData.cxx | 7 +- .../controller/main/ChartController_Insert.cxx | 60 +++--- .../controller/main/ChartController_Properties.cxx | 16 +- compilerplugins/clang/vclwidgets.cxx | 34 +++- cui/source/customize/cfg.cxx | 24 +-- cui/source/dialogs/SpellDialog.cxx | 6 +- cui/source/dialogs/about.cxx | 6 +- cui/source/dialogs/colorpicker.cxx | 6 +- cui/source/dialogs/cuigaldlg.cxx | 4 +- cui/source/dialogs/hangulhanjadlg.cxx | 14 +- cui/source/dialogs/hldocntp.cxx | 8 +- cui/source/dialogs/hltpbase.cxx | 8 +- cui/source/dialogs/linkdlg.cxx | 8 +- cui/source/dialogs/passwdomdlg.cxx | 10 +- cui/source/dialogs/scriptdlg.cxx | 30 +-- cui/source/options/dbregister.cxx | 14 +- cui/source/options/doclinkdialog.cxx | 12 +- cui/source/options/optchart.cxx | 6 +- cui/source/options/optcolor.cxx | 24 +-- cui/source/options/optdict.cxx | 8 +- cui/source/options/optgdlg.cxx | 4 +- cui/source/options/optinet2.cxx | 12 +- cui/source/options/optjava.cxx | 16 +- cui/source/options/optlingu.cxx | 18 +- cui/source/options/optopencl.cxx | 6 +- cui/source/options/personalization.cxx | 6 +- cui/source/tabpages/autocdlg.cxx | 8 +- cui/source/tabpages/grfpage.cxx | 18 +- cui/source/tabpages/tpbitmap.cxx | 10 +- cui/source/tabpages/tpcolor.cxx | 20 +- cui/source/tabpages/tpgradnt.cxx | 10 +- cui/source/tabpages/tphatch.cxx | 10 +- cui/source/tabpages/tplnedef.cxx | 18 +- cui/source/tabpages/tplneend.cxx | 26 +-- .../ext/macromigration/macromigrationdialog.cxx | 4 +- dbaccess/source/ui/app/AppControllerDnD.cxx | 22 +-- dbaccess/source/ui/app/AppControllerGen.cxx | 14 +- dbaccess/source/ui/browser/brwctrlr.cxx | 22 +-- dbaccess/source/ui/browser/sbagrid.cxx | 12 +- dbaccess/source/ui/dlg/CollectionView.cxx | 4 +- dbaccess/source/ui/dlg/ConnectionHelper.cxx | 18 +- dbaccess/source/ui/dlg/ConnectionPage.cxx | 4 +- dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx | 8 +- dbaccess/source/ui/dlg/UserAdmin.cxx | 26 +-- dbaccess/source/ui/dlg/adminpages.cxx | 16 +- dbaccess/source/ui/dlg/detailpages.cxx | 8 +- dbaccess/source/ui/dlg/directsql.cxx | 4 +- dbaccess/source/ui/dlg/generalpage.cxx | 4 +- dbaccess/source/ui/dlg/indexdialog.cxx | 22 +-- dbaccess/source/ui/dlg/sqlmessage.cxx | 4 +- dbaccess/source/ui/dlg/tablespage.cxx | 4 +- dbaccess/source/ui/misc/DExport.cxx | 24 +-- dbaccess/source/ui/misc/RowSetDrop.cxx | 4 +- dbaccess/source/ui/misc/UITools.cxx | 30 +-- .../source/ui/misc/dbsubcomponentcontroller.cxx | 4 +- dbaccess/source/ui/querydesign/QueryDesignView.cxx | 4 +- dbaccess/source/ui/querydesign/QueryTableView.cxx | 14 +- dbaccess/source/ui/querydesign/querycontroller.cxx | 34 ++-- .../ui/relationdesign/RelationController.cxx | 10 +- .../source/ui/relationdesign/RelationTableView.cxx | 31 ++-- dbaccess/source/ui/tabledesign/TableController.cxx | 56 +++--- dbaccess/source/ui/uno/dbinteraction.cxx | 16 +- desktop/source/app/app.cxx | 10 +- desktop/source/app/lockfile2.cxx | 12 +- desktop/source/deployment/gui/dp_gui_dialog2.cxx | 42 ++--- .../deployment/gui/dp_gui_extensioncmdqueue.cxx | 14 +- desktop/source/pkgchk/unopkg/unopkg_misc.cxx | 8 +- editeng/source/misc/splwrap.cxx | 4 +- extensions/source/abpilot/typeselectionpage.cxx | 4 +- extensions/source/bibliography/bibview.cxx | 8 +- extensions/source/propctrlr/browserlistbox.cxx | 7 +- extensions/source/propctrlr/commoncontrol.cxx | 6 +- .../source/propctrlr/formcomponenthandler.cxx | 26 +-- .../propctrlr/xsdvalidationpropertyhandler.cxx | 10 +- extensions/source/scanner/sanedlg.cxx | 26 +-- extensions/source/scanner/scanunx.cxx | 6 +- filter/source/graphic/GraphicExportDialog.cxx | 6 +- filter/source/graphicfilter/eps/eps.cxx | 4 +- filter/source/pdf/impdialog.cxx | 24 +-- filter/source/pdf/pdfinteract.cxx | 4 +- .../source/xsltdialog/xmlfiltersettingsdialog.cxx | 28 +-- filter/source/xsltdialog/xmlfiltertabdialog.cxx | 4 +- forms/source/runtime/formoperations.cxx | 4 +- fpicker/source/office/PlacesListBox.cxx | 8 +- fpicker/source/office/iodlg.cxx | 26 +-- framework/source/services/autorecovery.cxx | 8 +- reportdesign/source/ui/misc/UITools.cxx | 16 +- reportdesign/source/ui/report/ReportController.cxx | 20 +- sc/source/core/data/documen8.cxx | 4 +- sc/source/core/data/dpobject.cxx | 6 +- sc/source/core/data/validat.cxx | 12 +- sc/source/filter/oox/workbookhelper.cxx | 10 +- sc/source/ui/condformat/colorformat.cxx | 4 +- sc/source/ui/dbgui/dbnamdlg.cxx | 4 +- sc/source/ui/docshell/arealink.cxx | 6 +- sc/source/ui/docshell/dbdocfun.cxx | 24 +-- sc/source/ui/docshell/dbdocimp.cxx | 4 +- sc/source/ui/docshell/docfunc.cxx | 8 +- sc/source/ui/docshell/docsh.cxx | 36 ++-- sc/source/ui/docshell/docsh3.cxx | 14 +- sc/source/ui/docshell/docsh4.cxx | 68 +++---- sc/source/ui/docshell/docsh5.cxx | 22 +-- sc/source/ui/docshell/docsh6.cxx | 4 +- sc/source/ui/docshell/documentlinkmgr.cxx | 4 +- sc/source/ui/docshell/externalrefmgr.cxx | 6 +- sc/source/ui/docshell/impex.cxx | 10 +- sc/source/ui/drawfunc/fuins1.cxx | 4 +- sc/source/ui/drawfunc/graphsh.cxx | 6 +- sc/source/ui/miscdlgs/optsolver.cxx | 22 +-- sc/source/ui/miscdlgs/retypepassdlg.cxx | 8 +- sc/source/ui/miscdlgs/solveroptions.cxx | 20 +- sc/source/ui/optdlg/tpformula.cxx | 6 +- sc/source/ui/view/cellsh1.cxx | 16 +- sc/source/ui/view/cellsh2.cxx | 8 +- sc/source/ui/view/cellsh3.cxx | 6 +- sc/source/ui/view/dbfunc.cxx | 6 +- sc/source/ui/view/spelleng.cxx | 6 +- sc/source/ui/view/tabview2.cxx | 4 +- sc/source/ui/view/viewfun2.cxx | 12 +- sc/source/ui/view/viewfun3.cxx | 10 +- sc/source/ui/view/viewfun4.cxx | 8 +- sd/source/core/drawdoc3.cxx | 4 +- sd/source/filter/grf/sdgrffilter.cxx | 4 +- sd/source/filter/html/htmlex.cxx | 6 +- sd/source/filter/html/pubdlg.cxx | 12 +- sd/source/ui/animations/CustomAnimationDialog.cxx | 6 +- sd/source/ui/animations/SlideTransitionPane.cxx | 6 +- sd/source/ui/annotations/annotationmanager.cxx | 7 +- sd/source/ui/dlg/LayerTabBar.cxx | 6 +- sd/source/ui/dlg/PhotoAlbumDialog.cxx | 8 +- sd/source/ui/dlg/animobjs.cxx | 4 +- sd/source/ui/dlg/brkdlg.cxx | 4 +- sd/source/ui/dlg/custsdlg.cxx | 12 +- sd/source/ui/dlg/sdtreelb.cxx | 4 +- sd/source/ui/dlg/tpoption.cxx | 5 +- sd/source/ui/func/fuinsert.cxx | 4 +- sd/source/ui/func/fuinsfil.cxx | 12 +- sd/source/ui/func/fulinend.cxx | 6 +- sd/source/ui/func/fupage.cxx | 8 +- .../ui/slidesorter/controller/SlsClipboard.cxx | 6 +- sd/source/ui/view/DocumentRenderer.cxx | 6 +- sd/source/ui/view/Outliner.cxx | 22 +-- sd/source/ui/view/ViewShellBase.cxx | 6 +- sd/source/ui/view/drviews2.cxx | 18 +- sd/source/ui/view/drviews6.cxx | 4 +- sd/source/ui/view/drviews9.cxx | 10 +- sd/source/ui/view/drviewsi.cxx | 6 +- sfx2/source/appl/appopen.cxx | 12 +- sfx2/source/appl/appserv.cxx | 12 +- sfx2/source/appl/impldde.cxx | 6 +- sfx2/source/appl/newhelp.cxx | 24 +-- sfx2/source/appl/opengrf.cxx | 4 +- sfx2/source/appl/openuriexternally.cxx | 8 +- sfx2/source/appl/sfxhelp.cxx | 4 +- sfx2/source/bastyp/fltfnc.cxx | 4 +- sfx2/source/dialog/mailmodel.cxx | 4 +- sfx2/source/dialog/mgetempl.cxx | 12 +- sfx2/source/dialog/passwd.cxx | 4 +- sfx2/source/dialog/recfloat.cxx | 6 +- sfx2/source/dialog/securitypage.cxx | 16 +- sfx2/source/dialog/templdlg.cxx | 10 +- sfx2/source/doc/QuerySaveDocument.cxx | 6 +- sfx2/source/doc/docinsert.cxx | 8 +- sfx2/source/doc/guisaveas.cxx | 10 +- sfx2/source/doc/objcont.cxx | 4 +- sfx2/source/doc/objserv.cxx | 16 +- sfx2/source/doc/objstor.cxx | 4 +- sfx2/source/doc/templatedlg.cxx | 62 +++---- sfx2/source/view/viewfrm.cxx | 18 +- sfx2/source/view/viewsh.cxx | 12 +- svtools/source/contnr/fileview.cxx | 10 +- svtools/source/java/javainteractionhandler.cxx | 28 +-- svx/source/dialog/_contdlg.cxx | 18 +- svx/source/dialog/docrecovery.cxx | 4 +- svx/source/dialog/imapdlg.cxx | 8 +- svx/source/form/databaselocationinput.cxx | 4 +- svx/source/form/datanavi.cxx | 192 ++++++++++---------- svx/source/form/fmshell.cxx | 6 +- svx/source/tbxctrls/grafctrl.cxx | 12 +- svx/source/toolbars/extrusionbar.cxx | 6 +- svx/source/toolbars/fontworkbar.cxx | 10 +- svx/workben/pixelctl.cxx | 6 +- sw/qa/tiledrendering/tiledrendering.cxx | 202 +++++++++++++++++++++ sw/source/core/doc/DocumentRedlineManager.cxx | 4 +- sw/source/ui/config/mailconfigpage.cxx | 4 +- sw/source/ui/config/optcomp.cxx | 6 +- sw/source/ui/dbui/mmoutputpage.cxx | 46 ++--- sw/source/ui/dialog/uiregionsw.cxx | 32 ++-- sw/source/ui/envelp/label1.cxx | 22 +-- sw/source/ui/envelp/labfmt.cxx | 10 +- sw/source/ui/fmtui/tmpdlg.cxx | 12 +- sw/source/ui/frmdlg/cption.cxx | 22 +-- sw/source/ui/index/cnttab.cxx | 4 +- sw/source/ui/index/swuiidxmrk.cxx | 14 +- sw/source/ui/misc/glosbib.cxx | 4 +- sw/source/ui/misc/glossary.cxx | 8 +- sw/source/ui/misc/num.cxx | 12 +- sw/source/uibase/app/docsh2.cxx | 6 +- sw/source/uibase/dochdl/swdtflvr.cxx | 4 +- sw/source/uibase/lingu/olmenu.cxx | 6 +- sw/source/uibase/shells/grfsh.cxx | 8 +- sw/source/uibase/shells/tabsh.cxx | 6 +- sw/source/uibase/shells/textsh1.cxx | 22 +-- sw/source/uibase/uiview/view2.cxx | 50 ++--- sw/source/uibase/uiview/viewdraw.cxx | 6 +- sw/source/uibase/uiview/viewling.cxx | 4 +- sw/source/uibase/uiview/viewprt.cxx | 12 +- sw/source/uibase/utlui/gloslst.cxx | 10 +- uui/source/iahndl.cxx | 24 +-- uui/source/masterpasscrtdlg.cxx | 4 +- uui/source/masterpassworddlg.cxx | 4 +- uui/source/nameclashdlg.cxx | 4 +- uui/source/passworddlg.cxx | 8 +- vcl/generic/print/genprnpsp.cxx | 4 +- vcl/generic/print/prtsetup.cxx | 6 +- vcl/source/app/dbggui.cxx | 14 +- vcl/source/app/stdtext.cxx | 4 +- vcl/source/app/svdata.cxx | 4 +- vcl/source/control/edit.cxx | 8 +- vcl/source/gdi/print3.cxx | 20 +- vcl/source/window/dialog.cxx | 16 +- vcl/source/window/menubarwindow.cxx | 10 +- vcl/unx/generic/printer/cupsmgr.cxx | 8 +- vcl/unx/x11/x11sys.cxx | 12 +- vcl/workben/outdevgrind.cxx | 4 +- vcl/workben/svdem.cxx | 6 +- vcl/workben/svpclient.cxx | 6 +- vcl/workben/svptest.cxx | 7 +- vcl/workben/vcldemo.cxx | 6 +- .../source/writer/WordPerfectImportFilter.cxx | 16 +- .../source/component/documentdigitalsignatures.cxx | 32 ++-- xmlsecurity/source/dialogs/certificatechooser.cxx | 4 +- xmlsecurity/source/dialogs/certificateviewer.cxx | 4 +- .../source/dialogs/digitalsignaturesdialog.cxx | 14 +- xmlsecurity/source/dialogs/macrosecurity.cxx | 4 +- 249 files changed, 1777 insertions(+), 1551 deletions(-) create mode 100644 sw/qa/tiledrendering/tiledrendering.cxx (limited to 'sfx2/source/appl/newhelp.cxx') diff --git a/avmedia/source/viewer/mediawindow.cxx b/avmedia/source/viewer/mediawindow.cxx index a40d8a384be2..644430352873 100644 --- a/avmedia/source/viewer/mediawindow.cxx +++ b/avmedia/source/viewer/mediawindow.cxx @@ -327,9 +327,9 @@ bool MediaWindow::executeMediaURLDialog(vcl::Window* /* pParent */, void MediaWindow::executeFormatErrorBox( vcl::Window* pParent ) { - MessageDialog aErrBox( pParent, AVMEDIA_RESID( AVMEDIA_STR_ERR_URL ) ); + VclPtr aErrBox(new MessageDialog( pParent, AVMEDIA_RESID( AVMEDIA_STR_ERR_URL ) ) ); - aErrBox.Execute(); + aErrBox->Execute(); } diff --git a/basctl/source/basicide/baside2.cxx b/basctl/source/basicide/baside2.cxx index a5d4af81b6c7..9b4837673dbe 100644 --- a/basctl/source/basicide/baside2.cxx +++ b/basctl/source/basicide/baside2.cxx @@ -619,8 +619,8 @@ void ModulWindow::BasicToggleBreakPointEnabled() void ModulWindow::ManageBreakPoints() { BreakPointWindow& rBrkWin = GetBreakPointWindow(); - BreakPointDialog aBrkDlg( &rBrkWin, GetBreakPoints() ); - aBrkDlg.Execute(); + VclPtr aBrkDlg(new BreakPointDialog( &rBrkWin, GetBreakPoints() )); + aBrkDlg->Execute(); rBrkWin.Invalidate(); } @@ -1043,9 +1043,9 @@ void ModulWindow::ExecuteCommand (SfxRequest& rReq) break; case SID_GOTOLINE: { - GotoLineDialog aGotoDlg(this); - if (aGotoDlg.Execute()) - if (sal_Int32 const nLine = aGotoDlg.GetLineNumber()) + VclPtr aGotoDlg(new GotoLineDialog(this)); + if (aGotoDlg->Execute()) + if (sal_Int32 const nLine = aGotoDlg->GetLineNumber()) { TextSelection const aSel(TextPaM(nLine - 1, 0), TextPaM(nLine - 1, 0)); GetEditView()->SetSelection(aSel); diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx index 605c1f4d6752..be6895cdfd42 100644 --- a/basctl/source/basicide/baside2b.cxx +++ b/basctl/source/basicide/baside2b.cxx @@ -1519,9 +1519,9 @@ void BreakPointWindow::Command( const CommandEvent& rCEvt ) break; case RID_BRKPROPS: { - BreakPointDialog aBrkDlg( this, GetBreakPoints() ); - aBrkDlg.SetCurrentBreakPoint( pBrk ); - aBrkDlg.Execute(); + VclPtr aBrkDlg(new BreakPointDialog( this, GetBreakPoints() )); + aBrkDlg->SetCurrentBreakPoint( pBrk ); + aBrkDlg->Execute(); Invalidate(); } break; @@ -1534,8 +1534,8 @@ void BreakPointWindow::Command( const CommandEvent& rCEvt ) { case RID_BRKDLG: { - BreakPointDialog aBrkDlg( this, GetBreakPoints() ); - aBrkDlg.Execute(); + VclPtr aBrkDlg(new BreakPointDialog( this, GetBreakPoints() )); + aBrkDlg->Execute(); Invalidate(); } break; diff --git a/basctl/source/basicide/baside3.cxx b/basctl/source/basicide/baside3.cxx index 7a6a04ee6708..642981f8e7cc 100644 --- a/basctl/source/basicide/baside3.cxx +++ b/basctl/source/basicide/baside3.cxx @@ -1024,8 +1024,8 @@ bool implImportDialog( vcl::Window* pWin, const OUString& rCurPath, const Script OUString aQueryBoxText(IDE_RESSTR(RID_STR_DLGIMP_CLASH_TEXT)); aQueryBoxText = aQueryBoxText.replaceAll("$(ARG1)", aXmlDlgName); - NameClashQueryBox aQueryBox( pWin, aQueryBoxTitle, aQueryBoxText ); - sal_uInt16 nRet = aQueryBox.Execute(); + VclPtr aQueryBox(new NameClashQueryBox( pWin, aQueryBoxTitle, aQueryBoxText )); + sal_uInt16 nRet = aQueryBox->Execute(); if( RET_YES == nRet ) { // RET_YES == Rename, see NameClashQueryBox::NameClashQueryBox @@ -1086,8 +1086,8 @@ bool implImportDialog( vcl::Window* pWin, const OUString& rCurPath, const Script { OUString aQueryBoxTitle(IDE_RESSTR(RID_STR_DLGIMP_MISMATCH_TITLE)); OUString aQueryBoxText(IDE_RESSTR(RID_STR_DLGIMP_MISMATCH_TEXT)); - LanguageMismatchQueryBox aQueryBox( pWin, aQueryBoxTitle, aQueryBoxText ); - sal_uInt16 nRet = aQueryBox.Execute(); + VclPtr aQueryBox(new LanguageMismatchQueryBox( pWin, aQueryBoxTitle, aQueryBoxText )); + sal_uInt16 nRet = aQueryBox->Execute(); if( RET_YES == nRet ) { // RET_YES == Add, see LanguageMismatchQueryBox::LanguageMismatchQueryBox diff --git a/basctl/source/basicide/basides1.cxx b/basctl/source/basicide/basides1.cxx index 2f1e8fdc7304..c6374bf8e43d 100644 --- a/basctl/source/basicide/basides1.cxx +++ b/basctl/source/basicide/basides1.cxx @@ -136,8 +136,8 @@ void Shell::ExecuteCurrent( SfxRequest& rReq ) SfxViewFrame* pViewFrame = GetViewFrame(); SfxChildWindow* pChildWin = pViewFrame ? pViewFrame->GetChildWindow( SID_SEARCH_DLG ) : NULL; vcl::Window* pParent = pChildWin ? pChildWin->GetWindow() : NULL; - QueryBox aQuery(pParent, WB_YES_NO|WB_DEF_YES, IDE_RESSTR(RID_STR_SEARCHFROMSTART)); - if ( aQuery.Execute() == RET_YES ) + VclPtr aQuery(new QueryBox(pParent, WB_YES_NO|WB_DEF_YES, IDE_RESSTR(RID_STR_SEARCHFROMSTART))); + if ( aQuery->Execute() == RET_YES ) { it = aWindowTable.begin(); if ( it != aWindowTable.end() ) @@ -676,8 +676,8 @@ void Shell::ExecuteGlobal( SfxRequest& rReq ) case SID_BASICIDE_MANAGE_LANG: { - ManageLanguageDialog aDlg(pCurWin, m_pCurLocalizationMgr); - aDlg.Execute(); + VclPtr aDlg(new ManageLanguageDialog(pCurWin, m_pCurLocalizationMgr)); + aDlg->Execute(); rReq.Done(); } break; diff --git a/basctl/source/basicide/basobj2.cxx b/basctl/source/basicide/basobj2.cxx index 2e41965b81c9..6fee19e737b5 100644 --- a/basctl/source/basicide/basobj2.cxx +++ b/basctl/source/basicide/basobj2.cxx @@ -149,16 +149,16 @@ bool RenameModule ( if ( rDocument.hasModule( rLibName, rNewName ) ) { - MessageDialog aError(pErrorParent, IDE_RESSTR(RID_STR_SBXNAMEALLREADYUSED2)); - aError.Execute(); + VclPtr aError(new MessageDialog(pErrorParent, IDE_RESSTR(RID_STR_SBXNAMEALLREADYUSED2))); + aError->Execute(); return false; } // #i74440 if ( rNewName.isEmpty() ) { - MessageDialog aError(pErrorParent, IDE_RESSTR(RID_STR_BADSBXNAME)); - aError.Execute(); + VclPtr aError(new MessageDialog(pErrorParent, IDE_RESSTR(RID_STR_BADSBXNAME))); + aError->Execute(); return false; } diff --git a/basctl/source/basicide/basobj3.cxx b/basctl/source/basicide/basobj3.cxx index 87f5790e2765..c280c3b7be0b 100644 --- a/basctl/source/basicide/basobj3.cxx +++ b/basctl/source/basicide/basobj3.cxx @@ -155,16 +155,16 @@ bool RenameDialog ( if ( rDocument.hasDialog( rLibName, rNewName ) ) { - MessageDialog aError(pErrorParent, IDE_RESSTR(RID_STR_SBXNAMEALLREADYUSED2)); - aError.Execute(); + VclPtr aError(new MessageDialog(pErrorParent, IDE_RESSTR(RID_STR_SBXNAMEALLREADYUSED2))); + aError->Execute(); return false; } // #i74440 if ( rNewName.isEmpty() ) { - MessageDialog aError(pErrorParent, IDE_RESSTR(RID_STR_BADSBXNAME)); - aError.Execute(); + VclPtr aError(new MessageDialog(pErrorParent, IDE_RESSTR(RID_STR_BADSBXNAME))); + aError->Execute(); return false; } diff --git a/basctl/source/basicide/bastypes.cxx b/basctl/source/basicide/bastypes.cxx index 0da73c2c1c90..3a6be366accc 100644 --- a/basctl/source/basicide/bastypes.cxx +++ b/basctl/source/basicide/bastypes.cxx @@ -790,8 +790,8 @@ bool QueryDel( const OUString& rName, const ResId& rId, vcl::Window* pParent ) aNameBuf.append('\''); aNameBuf.insert(0, '\''); aQuery = aQuery.replaceAll("XX", aNameBuf.makeStringAndClear()); - MessageDialog aQueryBox(pParent, aQuery, VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO); - return ( aQueryBox.Execute() == RET_YES ); + VclPtr aQueryBox(new MessageDialog(pParent, aQuery, VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO)); + return ( aQueryBox->Execute() == RET_YES ); } bool QueryDelMacro( const OUString& rName, vcl::Window* pParent ) @@ -827,19 +827,19 @@ bool QueryPassword( const Reference< script::XLibraryContainer >& xLibContainer, do { // password dialog - SfxPasswordDialog aDlg(Application::GetDefDialogParent()); - aDlg.SetMinLen( 1 ); + VclPtr aDlg(new SfxPasswordDialog(Application::GetDefDialogParent())); + aDlg->SetMinLen( 1 ); // set new title if ( bNewTitle ) { OUString aTitle(IDE_RESSTR(RID_STR_ENTERPASSWORD)); aTitle = aTitle.replaceAll("XX", rLibName); - aDlg.SetText( aTitle ); + aDlg->SetText( aTitle ); } // execute dialog - nRet = aDlg.Execute(); + nRet = aDlg->Execute(); // verify password if ( nRet == RET_OK ) @@ -849,14 +849,14 @@ bool QueryPassword( const Reference< script::XLibraryContainer >& xLibContainer, Reference< script::XLibraryContainerPassword > xPasswd( xLibContainer, UNO_QUERY ); if ( xPasswd.is() && xPasswd->isLibraryPasswordProtected( rLibName ) && !xPasswd->isLibraryPasswordVerified( rLibName ) ) { - rPassword = aDlg.GetPassword(); + rPassword = aDlg->GetPassword(); // OUString aOUPassword( rPassword ); bOK = xPasswd->verifyLibraryPassword( rLibName, rPassword ); if ( !bOK ) { - MessageDialog aErrorBox(Application::GetDefDialogParent(), IDE_RESSTR(RID_STR_WRONGPASSWORD)); - aErrorBox.Execute(); + VclPtr aErrorBox(new MessageDialog(Application::GetDefDialogParent(), IDE_RESSTR(RID_STR_WRONGPASSWORD))); + aErrorBox->Execute(); } } } diff --git a/basctl/source/basicide/moduldl2.cxx b/basctl/source/basicide/moduldl2.cxx index 9907076da27e..48cd1ed09b95 100644 --- a/basctl/source/basicide/moduldl2.cxx +++ b/basctl/source/basicide/moduldl2.cxx @@ -1078,12 +1078,12 @@ void LibPage::Export( void ) return; } - ExportDialog aNewDlg(this); - if (aNewDlg.Execute() == RET_OK) + VclPtr aNewDlg(new ExportDialog(this)); + if (aNewDlg->Execute() == RET_OK) { try { - if (aNewDlg.isExportAsPackage()) + if (aNewDlg->isExportAsPackage()) ExportAsPackage( aLibName ); else ExportAsBasic( aLibName ); @@ -1454,13 +1454,13 @@ void createLibImpl( vcl::Window* pWin, const ScriptDocument& rDocument, i++; } - NewObjectDialog aNewDlg(pWin, ObjectMode::Library); - aNewDlg.SetObjectName(aLibName); + VclPtr aNewDlg(new NewObjectDialog(pWin, ObjectMode::Library)); + aNewDlg->SetObjectName(aLibName); - if (aNewDlg.Execute()) + if (aNewDlg->Execute()) { - if (!aNewDlg.GetObjectName().isEmpty()) - aLibName = aNewDlg.GetObjectName(); + if (!aNewDlg->GetObjectName().isEmpty()) + aLibName = aNewDlg->GetObjectName(); if ( aLibName.getLength() > 30 ) { diff --git a/basctl/source/basicide/moduldlg.cxx b/basctl/source/basicide/moduldlg.cxx index fd15d17e8350..9d3185b37402 100644 --- a/basctl/source/basicide/moduldlg.cxx +++ b/basctl/source/basicide/moduldlg.cxx @@ -804,12 +804,12 @@ void ObjectPage::NewDialog() { aDocument.getOrCreateLibrary( E_DIALOGS, aLibName ); - NewObjectDialog aNewDlg(this, ObjectMode::Dialog, true); - aNewDlg.SetObjectName( aDocument.createObjectName( E_DIALOGS, aLibName ) ); + VclPtr aNewDlg(new NewObjectDialog(this, ObjectMode::Dialog, true)); + aNewDlg->SetObjectName( aDocument.createObjectName( E_DIALOGS, aLibName ) ); - if (aNewDlg.Execute() != 0) + if (aNewDlg->Execute() != 0) { - OUString aDlgName = aNewDlg.GetObjectName(); + OUString aDlgName = aNewDlg->GetObjectName(); if (aDlgName.isEmpty()) aDlgName = aDocument.createObjectName( E_DIALOGS, aLibName); @@ -947,13 +947,13 @@ SbModule* createModImpl( vcl::Window* pWin, const ScriptDocument& rDocument, if ( aModName.isEmpty() ) aModName = rDocument.createObjectName( E_SCRIPTS, aLibName ); - NewObjectDialog aNewDlg(pWin, ObjectMode::Module, true); - aNewDlg.SetObjectName( aModName ); + VclPtr aNewDlg(new NewObjectDialog(pWin, ObjectMode::Module, true)); + aNewDlg->SetObjectName( aModName ); - if (aNewDlg.Execute() != 0) + if (aNewDlg->Execute() != 0) { - if (!aNewDlg.GetObjectName().isEmpty() ) - aModName = aNewDlg.GetObjectName(); + if (!aNewDlg->GetObjectName().isEmpty() ) + aModName = aNewDlg->GetObjectName(); try { diff --git a/basctl/source/dlged/managelang.cxx b/basctl/source/dlged/managelang.cxx index ed304b218d5d..953f96b92316 100644 --- a/basctl/source/dlged/managelang.cxx +++ b/basctl/source/dlged/managelang.cxx @@ -142,11 +142,11 @@ void ManageLanguageDialog::ClearLanguageBox() IMPL_LINK_NOARG(ManageLanguageDialog, AddHdl) { - SetDefaultLanguageDialog aDlg( this, m_xLocalizationMgr ); - if ( RET_OK == aDlg.Execute() ) + VclPtr aDlg(new SetDefaultLanguageDialog( this, m_xLocalizationMgr )); + if ( RET_OK == aDlg->Execute() ) { // add new locales - Sequence< Locale > aLocaleSeq = aDlg.GetLocales(); + Sequence< Locale > aLocaleSeq = aDlg->GetLocales(); m_xLocalizationMgr->handleAddLocales( aLocaleSeq ); // update listbox ClearLanguageBox(); @@ -160,8 +160,8 @@ IMPL_LINK_NOARG(ManageLanguageDialog, AddHdl) IMPL_LINK_NOARG(ManageLanguageDialog, DeleteHdl) { - MessageDialog aQBox(this, "DeleteLangDialog", "modules/BasicIDE/ui/deletelang.ui"); - if ( aQBox.Execute() == RET_OK ) + VclPtr aQBox(new MessageDialog(this, "DeleteLangDialog", "modules/BasicIDE/ui/deletelang.ui")); + if ( aQBox->Execute() == RET_OK ) { sal_uInt16 i, nCount = m_pLanguageLB->GetSelectEntryCount(); sal_uInt16 nPos = m_pLanguageLB->GetSelectEntryPos(); diff --git a/basic/source/runtime/iosys.cxx b/basic/source/runtime/iosys.cxx index 01921dadd507..831dee358422 100644 --- a/basic/source/runtime/iosys.cxx +++ b/basic/source/runtime/iosys.cxx @@ -966,10 +966,10 @@ void SbiIoSystem::CloseAll(void) void SbiIoSystem::ReadCon(OString& rIn) { OUString aPromptStr(OStringToOUString(aPrompt, osl_getThreadTextEncoding())); - SbiInputDialog aDlg( NULL, aPromptStr ); - if( aDlg.Execute() ) + VclPtr aDlg(new SbiInputDialog(NULL, aPromptStr) ); + if( aDlg->Execute() ) { - rIn = OUStringToOString(aDlg.GetInput(), osl_getThreadTextEncoding()); + rIn = OUStringToOString(aDlg->GetInput(), osl_getThreadTextEncoding()); } else { diff --git a/chart2/source/controller/dialogs/res_DataLabel.cxx b/chart2/source/controller/dialogs/res_DataLabel.cxx index c0f2da11fccd..5bbe9f62bc8e 100644 --- a/chart2/source/controller/dialogs/res_DataLabel.cxx +++ b/chart2/source/controller/dialogs/res_DataLabel.cxx @@ -205,12 +205,12 @@ IMPL_LINK( DataLabelResources, NumberFormatDialogHdl, PushButton *, pButton ) aNumberSet.Put( SfxUInt32Item( SID_ATTR_NUMBERFORMAT_VALUE, rnFormatKey )); aNumberSet.Put( SfxBoolItem( SID_ATTR_NUMBERFORMAT_SOURCE, rUseSourceFormat )); - NumberFormatDialog aDlg(m_pWindow, aNumberSet); + VclPtr aDlg(new NumberFormatDialog(m_pWindow, aNumberSet)); if( bPercent ) - aDlg.SetText( m_pFT_NumberFormatForPercent->GetText()); - if( RET_OK == aDlg.Execute() ) + aDlg->SetText( m_pFT_NumberFormatForPercent->GetText()); + if( RET_OK == aDlg->Execute() ) { - const SfxItemSet* pResult = aDlg.GetOutputItemSet(); + const SfxItemSet* pResult = aDlg->GetOutputItemSet(); if( pResult ) { bool bOldSource = rUseSourceFormat; diff --git a/chart2/source/controller/main/ChartController.cxx b/chart2/source/controller/main/ChartController.cxx index 242fdf282915..6e6f3d177017 100644 --- a/chart2/source/controller/main/ChartController.cxx +++ b/chart2/source/controller/main/ChartController.cxx @@ -1271,8 +1271,8 @@ void ChartController::executeDispatch_ChartType() SolarMutexGuard aSolarGuard; //prepare and open dialog - ChartTypeDialog aDlg( m_pChartWindow, getModel(), m_xCC ); - if( aDlg.Execute() == RET_OK ) + VclPtr aDlg(new ChartTypeDialog( m_pChartWindow, getModel(), m_xCC )); + if( aDlg->Execute() == RET_OK ) { impl_adaptDataSeriesAutoResize(); aUndoGuard.commit(); @@ -1292,8 +1292,8 @@ void ChartController::executeDispatch_SourceData() if( xChartDoc.is()) { SolarMutexGuard aSolarGuard; - ::chart::DataSourceDialog aDlg( m_pChartWindow, xChartDoc, m_xCC ); - if( aDlg.Execute() == RET_OK ) + VclPtr<::chart::DataSourceDialog> aDlg(new ::chart::DataSourceDialog( m_pChartWindow, xChartDoc, m_xCC )); + if( aDlg->Execute() == RET_OK ) { impl_adaptDataSeriesAutoResize(); aUndoGuard.commit(); diff --git a/chart2/source/controller/main/ChartController_EditData.cxx b/chart2/source/controller/main/ChartController_EditData.cxx index 9cba950495b9..3f8079a6165e 100644 --- a/chart2/source/controller/main/ChartController_EditData.cxx +++ b/chart2/source/controller/main/ChartController_EditData.cxx @@ -54,10 +54,9 @@ void ChartController::executeDispatch_EditData() UndoLiveUpdateGuardWithData aUndoGuard = UndoLiveUpdateGuardWithData( SCH_RESSTR( STR_ACTION_EDIT_CHART_DATA ), m_xUndoManager ); - vcl::Window* pParent( NULL ); - DataEditor aDataEditorDialog( pParent, xChartDoc, m_xCC ); - if (aDataEditorDialog.Execute() == RET_OK) - aDataEditorDialog.ApplyChangesToModel(); + VclPtr aDataEditorDialog(new DataEditor( nullptr, xChartDoc, m_xCC )); + if (aDataEditorDialog->Execute() == RET_OK) + aDataEditorDialog->ApplyChangesToModel(); aUndoGuard.commit(); } } diff --git a/chart2/source/controller/main/ChartController_Insert.cxx b/chart2/source/controller/main/ChartController_Insert.cxx index 7c83ecc569fc..57a5d9df19b0 100644 --- a/chart2/source/controller/main/ChartController_Insert.cxx +++ b/chart2/source/controller/main/ChartController_Insert.cxx @@ -109,14 +109,14 @@ void ChartController::executeDispatch_InsertAxes() AxisHelper::getAxisOrGridPossibilities( aDialogInput.aPossibilityList, xDiagram, true ); SolarMutexGuard aGuard; - SchAxisDlg aDlg( m_pChartWindow, aDialogInput ); - if( aDlg.Execute() == RET_OK ) + VclPtr aDlg(new SchAxisDlg( m_pChartWindow, aDialogInput )); + if( aDlg->Execute() == RET_OK ) { // lock controllers till end of block ControllerLockGuardUNO aCLGuard( getModel() ); InsertAxisOrGridDialogData aDialogOutput; - aDlg.getResult( aDialogOutput ); + aDlg->getResult( aDialogOutput ); boost::scoped_ptr< ReferenceSizeProvider > mpRefSizeProvider( impl_createReferenceSizeProvider()); bool bChanged = AxisHelper::changeVisibilityOfAxes( xDiagram @@ -147,13 +147,13 @@ void ChartController::executeDispatch_InsertGrid() AxisHelper::getAxisOrGridPossibilities( aDialogInput.aPossibilityList, xDiagram, false ); SolarMutexGuard aGuard; - SchGridDlg aDlg( m_pChartWindow, aDialogInput );//aItemSet, b3D, bNet, bSecondaryX, bSecondaryY ); - if( aDlg.Execute() == RET_OK ) + VclPtr aDlg(new SchGridDlg( m_pChartWindow, aDialogInput ));//aItemSet, b3D, bNet, bSecondaryX, bSecondaryY ); + if( aDlg->Execute() == RET_OK ) { // lock controllers till end of block ControllerLockGuardUNO aCLGuard( getModel() ); InsertAxisOrGridDialogData aDialogOutput; - aDlg.getResult( aDialogOutput ); + aDlg->getResult( aDialogOutput ); bool bChanged = AxisHelper::changeVisibilityOfGrids( xDiagram , aDialogInput.aExistenceList, aDialogOutput.aExistenceList, m_xCC ); if( bChanged ) @@ -179,13 +179,13 @@ void ChartController::executeDispatch_InsertTitles() aDialogInput.readFromModel( getModel() ); SolarMutexGuard aGuard; - SchTitleDlg aDlg( m_pChartWindow, aDialogInput ); - if( aDlg.Execute() == RET_OK ) + VclPtr aDlg(new SchTitleDlg( m_pChartWindow, aDialogInput )); + if( aDlg->Execute() == RET_OK ) { // lock controllers till end of block ControllerLockGuardUNO aCLGuard( getModel() ); TitleDialogData aDialogOutput(impl_createReferenceSizeProvider()); - aDlg.getResult( aDialogOutput ); + aDlg->getResult( aDialogOutput ); bool bChanged = aDialogOutput.writeDifferenceToModel( getModel(), m_xCC, &aDialogInput ); if( bChanged ) aUndoGuard.commit(); @@ -232,13 +232,13 @@ void ChartController::executeDispatch_OpenLegendDialog() { //prepare and open dialog SolarMutexGuard aGuard; - SchLegendDlg aDlg( m_pChartWindow, m_xCC ); - aDlg.init( getModel() ); - if( aDlg.Execute() == RET_OK ) + VclPtr aDlg(new SchLegendDlg( m_pChartWindow, m_xCC )); + aDlg->init( getModel() ); + if( aDlg->Execute() == RET_OK ) { // lock controllers till end of block ControllerLockGuardUNO aCLGuard( getModel() ); - bool bChanged = aDlg.writeToModel( getModel() ); + bool bChanged = aDlg->writeToModel( getModel() ); if( bChanged ) aUndoGuard.commit(); } @@ -292,12 +292,12 @@ void ChartController::executeDispatch_InsertMenu_DataLabels() NumberFormatterWrapper aNumberFormatterWrapper( xNumberFormatsSupplier ); SvNumberFormatter* pNumberFormatter = aNumberFormatterWrapper.getSvNumberFormatter(); - DataLabelsDialog aDlg( m_pChartWindow, aItemSet, pNumberFormatter); + VclPtr aDlg(new DataLabelsDialog( m_pChartWindow, aItemSet, pNumberFormatter)); - if( aDlg.Execute() == RET_OK ) + if( aDlg->Execute() == RET_OK ) { SfxItemSet aOutItemSet = aItemConverter.CreateEmptyItemSet(); - aDlg.FillItemSet( aOutItemSet ); + aDlg->FillItemSet( aOutItemSet ); // lock controllers till end of block ControllerLockGuardUNO aCLGuard( getModel() ); bool bChanged = aItemConverter.ApplyItemSet( aOutItemSet );//model should be changed now @@ -397,14 +397,14 @@ void ChartController::executeDispatch_InsertTrendline() aDialogParameter.init( getModel() ); ViewElementListProvider aViewElementListProvider( m_pDrawModelWrapper.get()); SolarMutexGuard aGuard; - SchAttribTabDlg aDialog( m_pChartWindow, &aItemSet, &aDialogParameter, &aViewElementListProvider, - uno::Reference< util::XNumberFormatsSupplier >( getModel(), uno::UNO_QUERY )); + VclPtr aDialog(new SchAttribTabDlg( m_pChartWindow, &aItemSet, &aDialogParameter, &aViewElementListProvider, + uno::Reference< util::XNumberFormatsSupplier >( getModel(), uno::UNO_QUERY ))); // note: when a user pressed "OK" but didn't change any settings in the // dialog, the SfxTabDialog returns "Cancel" - if( aDialog.Execute() == RET_OK || aDialog.DialogWasClosedWithOK()) + if( aDialog->Execute() == RET_OK || aDialog->DialogWasClosedWithOK()) { - const SfxItemSet* pOutItemSet = aDialog.GetOutputItemSet(); + const SfxItemSet* pOutItemSet = aDialog->GetOutputItemSet(); if( pOutItemSet ) { ControllerLockGuardUNO aCLGuard( getModel() ); @@ -452,17 +452,17 @@ void ChartController::executeDispatch_InsertErrorBars( bool bYError ) aDialogParameter.init( getModel() ); ViewElementListProvider aViewElementListProvider( m_pDrawModelWrapper.get()); SolarMutexGuard aGuard; - SchAttribTabDlg aDlg( m_pChartWindow, &aItemSet, &aDialogParameter, &aViewElementListProvider, - uno::Reference< util::XNumberFormatsSupplier >( getModel(), uno::UNO_QUERY )); - aDlg.SetAxisMinorStepWidthForErrorBarDecimals( + VclPtr aDlg(new SchAttribTabDlg( m_pChartWindow, &aItemSet, &aDialogParameter, &aViewElementListProvider, + uno::Reference< util::XNumberFormatsSupplier >( getModel(), uno::UNO_QUERY ))); + aDlg->SetAxisMinorStepWidthForErrorBarDecimals( InsertErrorBarsDialog::getAxisMinorStepWidthForErrorBarDecimals( getModel(), m_xChartView, m_aSelection.getSelectedCID())); // note: when a user pressed "OK" but didn't change any settings in the // dialog, the SfxTabDialog returns "Cancel" - if( aDlg.Execute() == RET_OK || aDlg.DialogWasClosedWithOK()) + if( aDlg->Execute() == RET_OK || aDlg->DialogWasClosedWithOK()) { - const SfxItemSet* pOutItemSet = aDlg.GetOutputItemSet(); + const SfxItemSet* pOutItemSet = aDlg->GetOutputItemSet(); if( pOutItemSet ) { ControllerLockGuardUNO aCLGuard( getModel() ); @@ -489,18 +489,18 @@ void ChartController::executeDispatch_InsertErrorBars( bool bYError ) //prepare and open dialog SolarMutexGuard aGuard; - InsertErrorBarsDialog aDlg( + VclPtr aDlg(new InsertErrorBarsDialog( m_pChartWindow, aItemSet, uno::Reference< chart2::XChartDocument >( getModel(), uno::UNO_QUERY ), - bYError ? ErrorBarResources::ERROR_BAR_Y : ErrorBarResources::ERROR_BAR_X); + bYError ? ErrorBarResources::ERROR_BAR_Y : ErrorBarResources::ERROR_BAR_X)); - aDlg.SetAxisMinorStepWidthForErrorBarDecimals( + aDlg->SetAxisMinorStepWidthForErrorBarDecimals( InsertErrorBarsDialog::getAxisMinorStepWidthForErrorBarDecimals( getModel(), m_xChartView, OUString() ) ); - if( aDlg.Execute() == RET_OK ) + if( aDlg->Execute() == RET_OK ) { SfxItemSet aOutItemSet = aItemConverter.CreateEmptyItemSet(); - aDlg.FillItemSet( aOutItemSet ); + aDlg->FillItemSet( aOutItemSet ); // lock controllers till end of block ControllerLockGuardUNO aCLGuard( getModel() ); diff --git a/chart2/source/controller/main/ChartController_Properties.cxx b/chart2/source/controller/main/ChartController_Properties.cxx index ca3dfa1c1d3b..d0676cd182d1 100644 --- a/chart2/source/controller/main/ChartController_Properties.cxx +++ b/chart2/source/controller/main/ChartController_Properties.cxx @@ -761,8 +761,8 @@ bool ChartController::executeDlg_ObjectProperties_withoutUndoGuard( ViewElementListProvider aViewElementListProvider( m_pDrawModelWrapper.get() ); SolarMutexGuard aGuard; - SchAttribTabDlg aDlg( m_pChartWindow, &aItemSet, &aDialogParameter, &aViewElementListProvider - , uno::Reference< util::XNumberFormatsSupplier >( getModel(), uno::UNO_QUERY ) ); + VclPtr aDlg(new SchAttribTabDlg( m_pChartWindow, &aItemSet, &aDialogParameter, &aViewElementListProvider + , uno::Reference< util::XNumberFormatsSupplier >( getModel(), uno::UNO_QUERY ) )); if(aDialogParameter.HasSymbolProperties()) { @@ -782,18 +782,18 @@ bool ChartController::executeDlg_ObjectProperties_withoutUndoGuard( sal_Int32 nStandardSymbol=0;//@todo get from somewhere Graphic* pAutoSymbolGraphic = new Graphic( aViewElementListProvider.GetSymbolGraphic( nStandardSymbol, pSymbolShapeProperties ) ); // note: the dialog takes the ownership of pSymbolShapeProperties and pAutoSymbolGraphic - aDlg.setSymbolInformation( pSymbolShapeProperties, pAutoSymbolGraphic ); + aDlg->setSymbolInformation( pSymbolShapeProperties, pAutoSymbolGraphic ); } if( aDialogParameter.HasStatisticProperties() ) { - aDlg.SetAxisMinorStepWidthForErrorBarDecimals( + aDlg->SetAxisMinorStepWidthForErrorBarDecimals( InsertErrorBarsDialog::getAxisMinorStepWidthForErrorBarDecimals( getModel(), m_xChartView, rObjectCID ) ); } //open the dialog - if (aDlg.Execute() == RET_OK || (bSuccessOnUnchanged && aDlg.DialogWasClosedWithOK())) + if (aDlg->Execute() == RET_OK || (bSuccessOnUnchanged && aDlg->DialogWasClosedWithOK())) { - const SfxItemSet* pOutItemSet = aDlg.GetOutputItemSet(); + const SfxItemSet* pOutItemSet = aDlg->GetOutputItemSet(); if(pOutItemSet) { ControllerLockGuardUNO aCLGuard( getModel()); @@ -822,8 +822,8 @@ void ChartController::executeDispatch_View3D() //open dialog SolarMutexGuard aSolarGuard; - View3DDialog aDlg( m_pChartWindow, getModel(), m_pDrawModelWrapper->GetColorList() ); - if( aDlg.Execute() == RET_OK ) + VclPtr aDlg(new View3DDialog( m_pChartWindow, getModel(), m_pDrawModelWrapper->GetColorList() )); + if( aDlg->Execute() == RET_OK ) aUndoGuard.commit(); } catch(const uno::RuntimeException& e) diff --git a/compilerplugins/clang/vclwidgets.cxx b/compilerplugins/clang/vclwidgets.cxx index 38a47410ce30..bf1f86e441d9 100644 --- a/compilerplugins/clang/vclwidgets.cxx +++ b/compilerplugins/clang/vclwidgets.cxx @@ -31,13 +31,15 @@ public: virtual void run() override { TraverseDecl(compiler.getASTContext().getTranslationUnitDecl()); } - bool VisitFieldDecl(const FieldDecl * decl); + bool VisitVarDecl(const VarDecl *); - bool VisitParmVarDecl(ParmVarDecl const * decl); + bool VisitFieldDecl(const FieldDecl *); - bool VisitFunctionDecl( const FunctionDecl* var ); + bool VisitParmVarDecl(const ParmVarDecl *); - bool VisitCXXDestructorDecl(const CXXDestructorDecl* pCXXDestructorDecl); + bool VisitFunctionDecl(const FunctionDecl *); + + bool VisitCXXDestructorDecl(const CXXDestructorDecl *); private: bool isDisposeCallingSuperclassDispose(const CXXMethodDecl* pMethodDecl); @@ -150,6 +152,30 @@ bool VCLWidgets::VisitCXXDestructorDecl(const CXXDestructorDecl* pCXXDestructorD } +bool VCLWidgets::VisitVarDecl(const VarDecl * pVarDecl) { + if (ignoreLocation(pVarDecl)) { + return true; + } + const RecordType *recordType = pVarDecl->getType()->getAs(); + if (recordType == nullptr) { + return true; + } + const CXXRecordDecl *recordDecl = dyn_cast(recordType->getDecl()); + if (recordDecl == nullptr) { + return true; + } + + // check if this field is derived from Window + if (isDerivedFromWindow(recordDecl)) { + report( + DiagnosticsEngine::Warning, + "vcl::Window subclass allocated on stack, should be allocated via VclPtr or via *.", + pVarDecl->getLocation()) + << pVarDecl->getSourceRange(); + } + return true; +} + bool VCLWidgets::VisitFieldDecl(const FieldDecl * fieldDecl) { if (ignoreLocation(fieldDecl)) { return true; diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx index 05c7796e28d2..7c108a6e28eb 100644 --- a/cui/source/customize/cfg.cxx +++ b/cui/source/customize/cfg.cxx @@ -2355,9 +2355,9 @@ short SvxMenuConfigPage::QueryReset() OUString label = replaceSaveInName( msg, saveInName ); - QueryBox qbox( this, WB_YES_NO, label ); + VclPtr qbox(new QueryBox( this, WB_YES_NO, label )); - return qbox.Execute(); + return qbox->Execute(); } IMPL_LINK( SvxMenuConfigPage, SelectMenu, ListBox *, pBox ) @@ -2996,10 +2996,10 @@ bool SvxToolbarConfigPage::DeleteSelectedContent() if ( m_pContentsListBox->GetEntryCount() == 0 && GetTopLevelSelection()->IsDeletable() ) { - MessageDialog qbox(this, - CUI_RES(RID_SXVSTR_CONFIRM_DELETE_TOOLBAR), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO); + VclPtr qbox(new MessageDialog(this, + CUI_RES(RID_SXVSTR_CONFIRM_DELETE_TOOLBAR), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO)); - if ( qbox.Execute() == RET_YES ) + if ( qbox->Execute() == RET_YES ) { DeleteSelectedTopLevel(); } @@ -3076,10 +3076,10 @@ IMPL_LINK( SvxToolbarConfigPage, ToolbarSelectHdl, MenuButton *, pButton ) } case ID_DEFAULT_STYLE: { - MessageDialog qbox(this, - CUI_RES(RID_SVXSTR_CONFIRM_RESTORE_DEFAULT), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO); + VclPtr qbox(new MessageDialog(this, + CUI_RES(RID_SVXSTR_CONFIRM_RESTORE_DEFAULT), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO)); - if ( qbox.Execute() == RET_YES ) + if ( qbox->Execute() == RET_YES ) { ToolbarSaveInData* pSaveInData_ = static_cast(GetSaveInData()); @@ -4307,9 +4307,9 @@ short SvxToolbarConfigPage::QueryReset() OUString label = replaceSaveInName( msg, saveInName ); - QueryBox qbox( this, WB_YES_NO, label ); + VclPtr qbox(new QueryBox( this, WB_YES_NO, label )); - return qbox.Execute(); + return qbox->Execute(); } IMPL_LINK( SvxToolbarConfigPage, SelectToolbar, ListBox *, pBox ) @@ -5226,8 +5226,8 @@ void SvxIconSelectorDialog::ImportGraphics( message += newLine; } - SvxIconChangeDialog aDialog(this, message); - aDialog.Execute(); + VclPtr aDialog(new SvxIconChangeDialog(this, message)); + aDialog->Execute(); } } diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx index 9f091c195967..2d130a525741 100644 --- a/cui/source/dialogs/SpellDialog.cxx +++ b/cui/source/dialogs/SpellDialog.cxx @@ -2035,9 +2035,9 @@ IMPL_LINK( SpellDialog, HandleHyperlink, FixedHyperlink*, pHyperlink ) uno::Any exc( ::cppu::getCaughtException() ); OUString msg( ::comphelper::anyToString( exc ) ); const SolarMutexGuard guard; - MessageDialog aErrorBox(NULL, msg); - aErrorBox.SetText(sTitle); - aErrorBox.Execute(); + VclPtr aErrorBox(new MessageDialog(NULL, msg)); + aErrorBox->SetText(sTitle); + aErrorBox->Execute(); } return 1; diff --git a/cui/source/dialogs/about.cxx b/cui/source/dialogs/about.cxx index f5761d3093ff..867c8ce281e6 100644 --- a/cui/source/dialogs/about.cxx +++ b/cui/source/dialogs/about.cxx @@ -126,9 +126,9 @@ IMPL_LINK( AboutDialog, HandleClick, PushButton*, pButton ) Any exc( ::cppu::getCaughtException() ); OUString msg( ::comphelper::anyToString( exc ) ); const SolarMutexGuard guard; - MessageDialog aErrorBox(NULL, msg); - aErrorBox.SetText( GetText() ); - aErrorBox.Execute(); + VclPtr aErrorBox(new MessageDialog(NULL, msg)); + aErrorBox->SetText( GetText() ); + aErrorBox->Execute(); } return 1; diff --git a/cui/source/dialogs/colorpicker.cxx b/cui/source/dialogs/colorpicker.cxx index 4b8c9a3518a5..76619dab9fcd 100644 --- a/cui/source/dialogs/colorpicker.cxx +++ b/cui/source/dialogs/colorpicker.cxx @@ -1509,10 +1509,10 @@ void SAL_CALL ColorPicker::setTitle( const OUString& sTitle ) throw (RuntimeExce sal_Int16 SAL_CALL ColorPicker::execute( ) throw (RuntimeException, std::exception) { - ColorPickerDialog aDlg( VCLUnoHelper::GetWindow( mxParent ), mnColor, mnMode ); - sal_Int16 ret = aDlg.Execute(); + VclPtr aDlg(new ColorPickerDialog( VCLUnoHelper::GetWindow( mxParent ), mnColor, mnMode )); + sal_Int16 ret = aDlg->Execute(); if( ret ) - mnColor = aDlg.GetColor(); + mnColor = aDlg->GetColor(); return ret; } diff --git a/cui/source/dialogs/cuigaldlg.cxx b/cui/source/dialogs/cuigaldlg.cxx index d6487fb362ac..27337db42052 100644 --- a/cui/source/dialogs/cuigaldlg.cxx +++ b/cui/source/dialogs/cuigaldlg.cxx @@ -552,8 +552,8 @@ IMPL_LINK_NOARG(GalleryIdDialog, ClickOkHdl) aStr += pInfo->GetThemeName(); aStr += ")"; - InfoBox aBox( this, aStr ); - aBox.Execute(); + VclPtr aBox(new InfoBox( this, aStr )); + aBox->Execute(); m_pLbResName->GrabFocus(); bDifferentThemeExists = true; } diff --git a/cui/source/dialogs/hangulhanjadlg.cxx b/cui/source/dialogs/hangulhanjadlg.cxx index ff425f90c775..46136a9e66ec 100644 --- a/cui/source/dialogs/hangulhanjadlg.cxx +++ b/cui/source/dialogs/hangulhanjadlg.cxx @@ -732,8 +732,8 @@ namespace svx IMPL_LINK_NOARG( HangulHanjaConversionDialog, OnOption ) { - HangulHanjaOptionsDialog aOptDlg( this ); - aOptDlg.Execute(); + VclPtr aOptDlg( new HangulHanjaOptionsDialog(this) ); + aOptDlg->Execute(); m_aOptionsChangedLink.Call( this ); return 0L; } @@ -1012,9 +1012,9 @@ namespace svx IMPL_LINK_NOARG(HangulHanjaOptionsDialog, NewDictHdl) { OUString aName; - HangulHanjaNewDictDialog aNewDlg( this ); - aNewDlg.Execute(); - if( aNewDlg.GetName( aName ) ) + VclPtr aNewDlg( new HangulHanjaNewDictDialog(this) ); + aNewDlg->Execute(); + if( aNewDlg->GetName( aName ) ) { if( m_xConversionDictionaryList.is() ) { @@ -1048,8 +1048,8 @@ namespace svx DBG_ASSERT( pEntry, "+HangulHanjaEditDictDialog::EditDictHdl(): call of edit should not be possible with no selection!" ); if( pEntry ) { - HangulHanjaEditDictDialog aEdDlg( this, m_aDictList, m_pDictsLB->GetSelectEntryPos() ); - aEdDlg.Execute(); + VclPtr aEdDlg( new HangulHanjaEditDictDialog(this, m_aDictList, m_pDictsLB->GetSelectEntryPos()) ); + aEdDlg->Execute(); } return 0L; } diff --git a/cui/source/dialogs/hldocntp.cxx b/cui/source/dialogs/hldocntp.cxx index b415ae3374ab..f1c790045a1b 100644 --- a/cui/source/dialogs/hldocntp.cxx +++ b/cui/source/dialogs/hldocntp.cxx @@ -266,8 +266,8 @@ bool SvxHyperlinkNewDocTp::AskApply() bool bRet = ImplGetURLObject( m_pCbbPath->GetText(), m_pCbbPath->GetBaseURL(), aINetURLObject ); if ( !bRet ) { - WarningBox aWarning( this, WB_OK, CUI_RESSTR(RID_SVXSTR_HYPDLG_NOVALIDFILENAME) ); - aWarning.Execute(); + VclPtr aWarning(new WarningBox( this, WB_OK, CUI_RESSTR(RID_SVXSTR_HYPDLG_NOVALIDFILENAME) ) ); + aWarning->Execute(); } return bRet; } @@ -316,8 +316,8 @@ void SvxHyperlinkNewDocTp::DoApply () if( bOk ) { - WarningBox aWarning( this, WB_YES_NO, CUI_RESSTR(RID_SVXSTR_HYPERDLG_QUERYOVERWRITE) ); - bCreate = aWarning.Execute() == RET_YES; + VclPtr aWarning(new WarningBox( this, WB_YES_NO, CUI_RESSTR(RID_SVXSTR_HYPERDLG_QUERYOVERWRITE) )); + bCreate = aWarning->Execute() == RET_YES; } } diff --git a/cui/source/dialogs/hltpbase.cxx b/cui/source/dialogs/hltpbase.cxx index bec31329ed47..62fd0465fa5a 100644 --- a/cui/source/dialogs/hltpbase.cxx +++ b/cui/source/dialogs/hltpbase.cxx @@ -325,10 +325,10 @@ IMPL_LINK_NOARG(SvxHyperlinkTabPageBase, ClickScriptHdl_Impl) bool bIsInputEnabled = GetParent()->IsInputEnabled(); if ( bIsInputEnabled ) GetParent()->EnableInput( false ); - SfxMacroAssignDlg aDlg( this, mxDocumentFrame, *pItemSet ); + VclPtr aDlg(new SfxMacroAssignDlg( this, mxDocumentFrame, *pItemSet )); // add events - SfxMacroTabPage *pMacroPage = static_cast( aDlg.GetTabPage() ); + SfxMacroTabPage *pMacroPage = static_cast( aDlg->GetTabPage() ); if ( pHyperlinkItem->GetMacroEvents() & HYPERDLG_EVENT_MOUSEOVER_OBJECT ) pMacroPage->AddEvent( OUString( CUI_RESSTR(RID_SVXSTR_HYPDLG_MACROACT1) ), @@ -344,11 +344,11 @@ IMPL_LINK_NOARG(SvxHyperlinkTabPageBase, ClickScriptHdl_Impl) GetParent()->EnableInput( true ); // execute dlg DisableClose( true ); - short nRet = aDlg.Execute(); + short nRet = aDlg->Execute(); DisableClose( false ); if ( RET_OK == nRet ) { - const SfxItemSet* pOutSet = aDlg.GetOutputItemSet(); + const SfxItemSet* pOutSet = aDlg->GetOutputItemSet(); const SfxPoolItem* pItem; if( SfxItemState::SET == pOutSet->GetItemState( SID_ATTR_MACROITEM, false, &pItem )) { diff --git a/cui/source/dialogs/linkdlg.cxx b/cui/source/dialogs/linkdlg.cxx index 610ea4972c69..95c348d0a364 100644 --- a/cui/source/dialogs/linkdlg.cxx +++ b/cui/source/dialogs/linkdlg.cxx @@ -424,9 +424,9 @@ IMPL_LINK( SvBaseLinksDlg, BreakLinkClickHdl, PushButton *, pPushButton ) if( !xLink.Is() ) return 0; - QueryBox aBox( this, WB_YES_NO | WB_DEF_YES, Closelinkmsg() ); + VclPtr aBox(new QueryBox( this, WB_YES_NO | WB_DEF_YES, Closelinkmsg() )); - if( RET_YES == aBox.Execute() ) + if( RET_YES == aBox->Execute() ) { m_pTbLinks->GetModel()->Remove( m_pTbLinks->GetEntry( nPos ) ); @@ -455,9 +455,9 @@ IMPL_LINK( SvBaseLinksDlg, BreakLinkClickHdl, PushButton *, pPushButton ) } else { - QueryBox aBox( this, WB_YES_NO | WB_DEF_YES, CloselinkmsgMulti() ); + VclPtr aBox(new QueryBox( this, WB_YES_NO | WB_DEF_YES, CloselinkmsgMulti() )); - if( RET_YES == aBox.Execute() ) + if( RET_YES == aBox->Execute() ) { SvBaseLinkMemberList aLinkList; diff --git a/cui/source/dialogs/passwdomdlg.cxx b/cui/source/dialogs/passwdomdlg.cxx index 683d4e15633b..ccba00009552 100644 --- a/cui/source/dialogs/passwdomdlg.cxx +++ b/cui/source/dialogs/passwdomdlg.cxx @@ -101,9 +101,9 @@ IMPL_LINK( PasswordToOpenModifyDialog_Impl, OkBtnClickHdl, OKButton *, EMPTYARG m_pPasswdToModifyED->GetText().isEmpty(); if (bInvalidState) { - MessageDialog aErrorBox(m_pParent, - m_bIsPasswordToModify? m_aInvalidStateForOkButton : m_aInvalidStateForOkButton_v2); - aErrorBox.Execute(); + VclPtr aErrorBox(new MessageDialog(m_pParent, + m_bIsPasswordToModify? m_aInvalidStateForOkButton : m_aInvalidStateForOkButton_v2)); + aErrorBox->Execute(); } else // check for mismatched passwords... { @@ -112,8 +112,8 @@ IMPL_LINK( PasswordToOpenModifyDialog_Impl, OkBtnClickHdl, OKButton *, EMPTYARG const int nMismatch = (bToOpenMatch? 0 : 1) + (bToModifyMatch? 0 : 1); if (nMismatch > 0) { - MessageDialog aErrorBox(m_pParent, nMismatch == 1 ? m_aOneMismatch : m_aTwoMismatch); - aErrorBox.Execute(); + VclPtr aErrorBox(new MessageDialog(m_pParent, nMismatch == 1 ? m_aOneMismatch : m_aTwoMismatch)); + aErrorBox->Execute(); Edit* pEdit = !bToOpenMatch ? m_pPasswdToOpenED : m_pPasswdToModifyED; Edit* pRepeatEdit = !bToOpenMatch? m_pReenterPasswdToOpenED : m_pReenterPasswdToModifyED; diff --git a/cui/source/dialogs/scriptdlg.cxx b/cui/source/dialogs/scriptdlg.cxx index adde1bb65f3b..4013f71e6925 100644 --- a/cui/source/dialogs/scriptdlg.cxx +++ b/cui/source/dialogs/scriptdlg.cxx @@ -904,9 +904,9 @@ void SvxScriptOrgDialog::createEntry( SvTreeListEntry* pEntry ) bValid = false; OUString aError( m_createErrStr ); aError += m_createDupStr; - MessageDialog aErrorBox(static_cast(this), aError); - aErrorBox.SetText( m_createErrTitleStr ); - aErrorBox.Execute(); + VclPtr aErrorBox(new MessageDialog(static_cast(this), aError)); + aErrorBox->SetText( m_createErrTitleStr ); + aErrorBox->Execute(); xNewDlg->SetObjectName( aNewName ); break; } @@ -986,9 +986,9 @@ void SvxScriptOrgDialog::createEntry( SvTreeListEntry* pEntry ) { //ISSUE L10N & message from exception? OUString aError( m_createErrStr ); - MessageDialog aErrorBox(static_cast(this), aError); - aErrorBox.SetText( m_createErrTitleStr ); - aErrorBox.Execute(); + VclPtr aErrorBox(new MessageDialog(static_cast(this), aError)); + aErrorBox->SetText( m_createErrTitleStr ); + aErrorBox->Execute(); } } @@ -1062,9 +1062,9 @@ void SvxScriptOrgDialog::renameEntry( SvTreeListEntry* pEntry ) { //ISSUE L10N & message from exception? OUString aError( m_renameErrStr ); - MessageDialog aErrorBox(static_cast(this), aError); - aErrorBox.SetText( m_renameErrTitleStr ); - aErrorBox.Execute(); + VclPtr aErrorBox(new MessageDialog(static_cast(this), aError)); + aErrorBox->SetText( m_renameErrTitleStr ); + aErrorBox->Execute(); } } void SvxScriptOrgDialog::deleteEntry( SvTreeListEntry* pEntry ) @@ -1073,9 +1073,9 @@ void SvxScriptOrgDialog::deleteEntry( SvTreeListEntry* pEntry ) Reference< browse::XBrowseNode > node = getBrowseNode( pEntry ); // ISSUE L10N string & can we centre list? OUString aQuery = m_delQueryStr + getListOfChildren( node, 0 ); - MessageDialog aQueryBox(static_cast(this), aQuery, VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO); - aQueryBox.SetText( m_delQueryTitleStr ); - if ( aQueryBox.Execute() == RET_NO ) + VclPtr aQueryBox(new MessageDialog(static_cast(this), aQuery, VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO)); + aQueryBox->SetText( m_delQueryTitleStr ); + if ( aQueryBox->Execute() == RET_NO ) { return; } @@ -1108,9 +1108,9 @@ void SvxScriptOrgDialog::deleteEntry( SvTreeListEntry* pEntry ) else { //ISSUE L10N & message from exception? - MessageDialog aErrorBox(static_cast(this), m_delErrStr); - aErrorBox.SetText( m_delErrTitleStr ); - aErrorBox.Execute(); + VclPtr aErrorBox(new MessageDialog(static_cast(this), m_delErrStr)); + aErrorBox->SetText( m_delErrTitleStr ); + aErrorBox->Execute(); } } diff --git a/cui/source/options/dbregister.cxx b/cui/source/options/dbregister.cxx index 2a48aac686f0..eb2364e981e4 100644 --- a/cui/source/options/dbregister.cxx +++ b/cui/source/options/dbregister.cxx @@ -274,8 +274,8 @@ IMPL_LINK_NOARG(DbRegistrationOptionsPage, DeleteHdl) SvTreeListEntry* pEntry = pPathBox->FirstSelected(); if ( pEntry ) { - MessageDialog aQuery(this, CUI_RES(RID_SVXSTR_QUERY_DELETE_CONFIRM), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO); - if ( aQuery.Execute() == RET_YES ) + VclPtr aQuery(new MessageDialog(this, CUI_RES(RID_SVXSTR_QUERY_DELETE_CONFIRM), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO)); + if ( aQuery->Execute() == RET_YES ) pPathBox->GetModel()->Remove(pEntry); } return 0; @@ -410,15 +410,15 @@ void DbRegistrationOptionsPage::insertNewEntry( const OUString& _sName,const OUS void DbRegistrationOptionsPage::openLinkDialog(const OUString& _sOldName,const OUString& _sOldLocation,SvTreeListEntry* _pEntry) { - ODocumentLinkDialog aDlg(this,_pEntry == NULL); + VclPtr aDlg(new ODocumentLinkDialog(this,_pEntry == NULL)); - aDlg.setLink(_sOldName,_sOldLocation); - aDlg.setNameValidator(LINK( this, DbRegistrationOptionsPage, NameValidator ) ); + aDlg->setLink(_sOldName,_sOldLocation); + aDlg->setNameValidator(LINK( this, DbRegistrationOptionsPage, NameValidator ) ); - if ( aDlg.Execute() == RET_OK ) + if ( aDlg->Execute() == RET_OK ) { OUString sNewName,sNewLocation; - aDlg.getLink(sNewName,sNewLocation); + aDlg->getLink(sNewName,sNewLocation); if ( _pEntry == NULL || sNewName != _sOldName || sNewLocation != _sOldLocation ) { if ( _pEntry ) diff --git a/cui/source/options/doclinkdialog.cxx b/cui/source/options/doclinkdialog.cxx index ffeeb84e33a3..01482292caf4 100644 --- a/cui/source/options/doclinkdialog.cxx +++ b/cui/source/options/doclinkdialog.cxx @@ -116,8 +116,8 @@ namespace svx { OUString sMsg = CUI_RES(STR_LINKEDDOC_DOESNOTEXIST); sMsg = sMsg.replaceFirst("$file$", m_pURL->GetText()); - MessageDialog aError(this, sMsg); - aError.Execute(); + VclPtr aError(new MessageDialog(this, sMsg)); + aError->Execute(); return 0L; } // if (!bFileExists) INetURLObject aURL( sURL ); @@ -125,8 +125,8 @@ namespace svx { OUString sMsg = CUI_RES(STR_LINKEDDOC_NO_SYSTEM_FILE); sMsg = sMsg.replaceFirst("$file$", m_pURL->GetText()); - MessageDialog aError(this, sMsg); - aError.Execute(); + VclPtr aError(new MessageDialog(this, sMsg)); + aError->Execute(); return 0L; } @@ -137,8 +137,8 @@ namespace svx { OUString sMsg = CUI_RES(STR_NAME_CONFLICT); sMsg = sMsg.replaceFirst("$file$", sCurrentText); - MessageDialog aError(this, sMsg, VCL_MESSAGE_INFO); - aError.Execute(); + VclPtr aError(new MessageDialog(this, sMsg, VCL_MESSAGE_INFO)); + aError->Execute(); m_pName->SetSelection(Selection(0,sCurrentText.getLength())); m_pName->GrabFocus(); diff --git a/cui/source/options/optchart.cxx b/cui/source/options/optchart.cxx index d1aa2104e743..8f8fd9770bac 100644 --- a/cui/source/options/optchart.cxx +++ b/cui/source/options/optchart.cxx @@ -221,9 +221,9 @@ IMPL_LINK( SvxDefaultColorOptPage, RemoveChartColor, PushButton*, pButton ) { OSL_ENSURE(pColorConfig->GetColorList().size() > 1, "don't delete the last chart color"); - MessageDialog aQuery(pButton, "QueryDeleteChartColorDialog", - "cui/ui/querydeletechartcolordialog.ui"); - if (RET_YES == aQuery.Execute()) + VclPtr aQuery(new MessageDialog(pButton, "QueryDeleteChartColorDialog", + "cui/ui/querydeletechartcolordialog.ui")); + if (RET_YES == aQuery->Execute()) { pColorConfig->GetColorList().remove( nIndex ); diff --git a/cui/source/options/optcolor.cxx b/cui/source/options/optcolor.cxx index 2cb909fea88a..3eb0229d22da 100644 --- a/cui/source/options/optcolor.cxx +++ b/cui/source/options/optcolor.cxx @@ -545,12 +545,12 @@ void ColorConfigWindow_Impl::CreateEntries() long nCheckBoxLabelOffset = 0; { OUString sSampleText("X"); - CheckBox aCheckBox(this); - FixedText aFixedText(this); - aCheckBox.SetText(sSampleText); - aFixedText.SetText(sSampleText); - Size aCheckSize(aCheckBox.CalcMinimumSize(0x7fffffff)); - Size aFixedSize(aFixedText.CalcMinimumSize(0x7fffffff)); + VclPtr aCheckBox(new CheckBox(this)); + VclPtr aFixedText(new FixedText(this)); + aCheckBox->SetText(sSampleText); + aFixedText->SetText(sSampleText); + Size aCheckSize(aCheckBox->CalcMinimumSize(0x7fffffff)); + Size aFixedSize(aFixedText->CalcMinimumSize(0x7fffffff)); nCheckBoxLabelOffset = aCheckSize.Width() - aFixedSize.Width(); } @@ -620,13 +620,13 @@ void ColorConfigWindow_Impl::SetAppearance () OSL_ENSURE( vEntries.size() >= sizeof vEntryInfo / sizeof vEntryInfo[0], "wrong number of helpIDs for color listboxes" ); // creating a sample color listbox with the color entries - ColorListBox aSampleColorList(this); + VclPtr aSampleColorList(new ColorListBox(this)); { XColorListRef const xColorTable = XColorList::CreateStdColorList(); for (sal_Int32 i = 0; i != xColorTable->Count(); ++i) { XColorEntry& rEntry = *xColorTable->GetColor(i); - aSampleColorList.InsertEntry(rEntry.GetColor(), rEntry.GetName()); + aSampleColorList->InsertEntry(rEntry.GetColor(), rEntry.GetName()); } } @@ -634,7 +634,7 @@ void ColorConfigWindow_Impl::SetAppearance () for (size_t i = 0; i != vEntries.size(); ++i) { // appearance - vEntries[i]->SetAppearance(aTransparentWall, aSampleColorList); + vEntries[i]->SetAppearance(aTransparentWall, *aSampleColorList.get()); } } @@ -1187,9 +1187,9 @@ IMPL_LINK(SvxColorOptionsTabPage, SaveDeleteHdl_Impl, PushButton*, pButton ) else { DBG_ASSERT(m_pColorSchemeLB->GetEntryCount() > 1, "don't delete the last scheme"); - MessageDialog aQuery(pButton, CUI_RES(RID_SVXSTR_COLOR_CONFIG_DELETE), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO); - aQuery.SetText(CUI_RES(RID_SVXSTR_COLOR_CONFIG_DELETE_TITLE)); - if(RET_YES == aQuery.Execute()) + VclPtr aQuery(new MessageDialog(pButton, CUI_RES(RID_SVXSTR_COLOR_CONFIG_DELETE), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO)); + aQuery->SetText(CUI_RES(RID_SVXSTR_COLOR_CONFIG_DELETE_TITLE)); + if(RET_YES == aQuery->Execute()) { OUString sDeleteScheme(m_pColorSchemeLB->GetSelectEntry()); m_pColorSchemeLB->RemoveEntry(m_pColorSchemeLB->GetSelectEntryPos()); diff --git a/cui/source/options/optdict.cxx b/cui/source/options/optdict.cxx index daf0bbb259c2..fefbbd25ef39 100644 --- a/cui/source/options/optdict.cxx +++ b/cui/source/options/optdict.cxx @@ -446,12 +446,12 @@ IMPL_LINK_NOARG(SvxEditDictionaryDialog, SelectLangHdl_Impl) if ( nLang != nOldLang ) { - MessageDialog aBox(this, CUI_RES( RID_SVXSTR_CONFIRM_SET_LANGUAGE), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO); - OUString sTxt(aBox.get_primary_text()); + VclPtr aBox(new MessageDialog(this, CUI_RES( RID_SVXSTR_CONFIRM_SET_LANGUAGE), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO)); + OUString sTxt(aBox->get_primary_text()); sTxt = sTxt.replaceFirst( "%1", pAllDictsLB->GetSelectEntry() ); - aBox.set_primary_text(sTxt); + aBox->set_primary_text(sTxt); - if ( aBox.Execute() == RET_YES ) + if ( aBox->Execute() == RET_YES ) { xDic->setLocale( LanguageTag::convertToLocale( nLang ) ); bool bNegativ = xDic->getDictionaryType() == DictionaryType_NEGATIVE; diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx index 012d7905a4d4..09c74e5a7417 100644 --- a/cui/source/options/optgdlg.cxx +++ b/cui/source/options/optgdlg.cxx @@ -1298,8 +1298,8 @@ bool OfaLanguagesTabPage::FillItemSet( SfxItemSet* rSet ) xProp->setPropertyValue(sUserLocaleKey, makeAny(aLangString)); Reference< XChangesBatch >(xProp, UNO_QUERY_THROW)->commitChanges(); // display info - MessageDialog aBox(this, CUI_RES(RID_SVXSTR_LANGUAGE_RESTART), VCL_MESSAGE_INFO); - aBox.Execute(); + VclPtr aBox(new MessageDialog(this, CUI_RES(RID_SVXSTR_LANGUAGE_RESTART), VCL_MESSAGE_INFO)); + aBox->Execute(); // tell quickstarter to stop being a veto listener diff --git a/cui/source/options/optinet2.cxx b/cui/source/options/optinet2.cxx index 5d01c40e2d36..04333b7b8ef6 100644 --- a/cui/source/options/optinet2.cxx +++ b/cui/source/options/optinet2.cxx @@ -669,8 +669,8 @@ IMPL_LINK_NOARG(SvxSecurityTabPage, SavePasswordHdl) } else { - QueryBox aQuery( this, WB_YES_NO|WB_DEF_NO, m_sPasswordStoringDeactivateStr ); - sal_uInt16 nRet = aQuery.Execute(); + VclPtr aQuery(new QueryBox( this, WB_YES_NO|WB_DEF_NO, m_sPasswordStoringDeactivateStr )); + sal_uInt16 nRet = aQuery->Execute(); if( RET_YES == nRet ) { @@ -766,8 +766,8 @@ IMPL_LINK_NOARG(SvxSecurityTabPage, ShowPasswordsHdl) if ( xMasterPasswd->isPersistentStoringAllowed() && xMasterPasswd->authorizateWithMasterPassword( Reference< task::XInteractionHandler>() ) ) { - svx::WebConnectionInfoDialog aDlg( this ); - aDlg.Execute(); + VclPtr aDlg( new svx::WebConnectionInfoDialog(this) ); + aDlg->Execute(); } } catch (const Exception&) @@ -785,8 +785,8 @@ IMPL_LINK_NOARG(SvxSecurityTabPage, CertPathPBHdl) if (nRet == RET_OK && sOrig != mpCertPathDlg->getDirectory()) { - MessageDialog aWarnBox(this, CUI_RES(RID_SVXSTR_OPTIONS_RESTART), VCL_MESSAGE_INFO); - aWarnBox.Execute(); + VclPtr aWarnBox(new MessageDialog(this, CUI_RES(RID_SVXSTR_OPTIONS_RESTART), VCL_MESSAGE_INFO)); + aWarnBox->Execute(); } return 0; diff --git a/cui/source/options/optjava.cxx b/cui/source/options/optjava.cxx index e95c86cc90be..8843f10df485 100644 --- a/cui/source/options/optjava.cxx +++ b/cui/source/options/optjava.cxx @@ -326,8 +326,8 @@ IMPL_LINK_NOARG(SvxJavaOptionsPage, ParameterHdl_Impl) (void)eErr; if ( bRunning ) { - MessageDialog aWarnBox( this, CUI_RES( RID_SVXSTR_OPTIONS_RESTART ), VCL_MESSAGE_INFO ); - aWarnBox.Execute(); + VclPtr aWarnBox(new MessageDialog( this, CUI_RES( RID_SVXSTR_OPTIONS_RESTART ), VCL_MESSAGE_INFO )); + aWarnBox->Execute(); } } } @@ -371,8 +371,8 @@ IMPL_LINK_NOARG(SvxJavaOptionsPage, ClassPathHdl_Impl) (void)eErr; if ( bRunning ) { - MessageDialog aWarnBox( this, CUI_RES( RID_SVXSTR_OPTIONS_RESTART ), VCL_MESSAGE_INFO ); - aWarnBox.Execute(); + VclPtr aWarnBox(new MessageDialog( this, CUI_RES( RID_SVXSTR_OPTIONS_RESTART ), VCL_MESSAGE_INFO )); + aWarnBox->Execute(); } } } @@ -620,13 +620,13 @@ void SvxJavaOptionsPage::AddFolder( const OUString& _rFolder ) } else if ( JFW_E_NOT_RECOGNIZED == eErr ) { - MessageDialog aErrBox( this, CUI_RES( RID_SVXSTR_JRE_NOT_RECOGNIZED ) ); - aErrBox.Execute(); + VclPtr aErrBox(new MessageDialog( this, CUI_RES( RID_SVXSTR_JRE_NOT_RECOGNIZED ) )); + aErrBox->Execute(); } else if ( JFW_E_FAILED_VERSION == eErr ) { - MessageDialog aErrBox( this, CUI_RES( RID_SVXSTR_JRE_FAILED_VERSION ) ); - aErrBox.Execute(); + VclPtr aErrBox(new MessageDialog( this, CUI_RES( RID_SVXSTR_JRE_FAILED_VERSION ) )); + aErrBox->Execute(); } if ( bStartAgain ) diff --git a/cui/source/options/optlingu.cxx b/cui/source/options/optlingu.cxx index f91b782fa96f..393f6f7625ec 100644 --- a/cui/source/options/optlingu.cxx +++ b/cui/source/options/optlingu.cxx @@ -1576,8 +1576,8 @@ IMPL_LINK( SvxLinguTabPage, ClickHdl_Impl, PushButton *, pBtn ) pLinguData = new SvxLinguData_Impl; SvxLinguData_Impl aOldLinguData( *pLinguData ); - SvxEditModulesDlg aDlg( this, *pLinguData ); - if (aDlg.Execute() != RET_OK) + VclPtr aDlg(new SvxEditModulesDlg( this, *pLinguData )); + if (aDlg->Execute() != RET_OK) *pLinguData = aOldLinguData; // evaluate new status of 'bConfigured' flag @@ -1653,9 +1653,9 @@ IMPL_LINK( SvxLinguTabPage, ClickHdl_Impl, PushButton *, pBtn ) } else if (m_pLinguDicsDelPB == pBtn) { - MessageDialog aQuery(this, "QueryDeleteDictionaryDialog", - "cui/ui/querydeletedictionarydialog.ui"); - if (RET_NO == aQuery.Execute()) + VclPtr aQuery(new MessageDialog(this, "QueryDeleteDictionaryDialog", + "cui/ui/querydeletedictionarydialog.ui")); + if (RET_NO == aQuery->Execute()) return 0; SvTreeListEntry *pEntry = m_pLinguDicsCLB->GetCurEntry(); @@ -1725,11 +1725,11 @@ IMPL_LINK( SvxLinguTabPage, ClickHdl_Impl, PushButton *, pBtn ) if(aData.HasNumericValue()) { sal_uInt16 nRID = aData.GetEntryId(); - OptionsBreakSet aDlg( this, nRID ); - aDlg.GetNumericFld().SetValue( aData.GetNumericValue() ); - if (RET_OK == aDlg.Execute() ) + VclPtr aDlg( new OptionsBreakSet(this, nRID) ); + aDlg->GetNumericFld().SetValue( aData.GetNumericValue() ); + if (RET_OK == aDlg->Execute() ) { - long nVal = static_cast(aDlg.GetNumericFld().GetValue()); + long nVal = static_cast(aDlg->GetNumericFld().GetValue()); if (-1 != nVal && aData.GetNumericValue() != nVal) { aData.SetNumericValue( (sal_uInt8)nVal ); //! sets IsModified ! diff --git a/cui/source/options/optopencl.cxx b/cui/source/options/optopencl.cxx index 2323fc465b4e..b6faede94b5e 100644 --- a/cui/source/options/optopencl.cxx +++ b/cui/source/options/optopencl.cxx @@ -273,10 +273,10 @@ IMPL_LINK(ListEntryDialog, EditModifiedHdl, Edit*, pEdit) void openListDialog(SvxOpenCLTabPage* pTabPage, OpenCLConfig::ImplMatcher& rEntry, const OString& rTag) { - ListEntryDialog aDlg(pTabPage, rEntry, rTag); + VclPtr aDlg(new ListEntryDialog(pTabPage, rEntry, rTag)); - if (aDlg.Execute() == RET_OK) - rEntry = aDlg.maEntry; + if (aDlg->Execute() == RET_OK) + rEntry = aDlg->maEntry; } const OpenCLConfig::ImplMatcher& findCurrentEntry(OpenCLConfig::ImplMatcherSet& rSet, SvSimpleTable* pListBox) diff --git a/cui/source/options/personalization.cxx b/cui/source/options/personalization.cxx index d4591fe163ea..1bae7f526f79 100644 --- a/cui/source/options/personalization.cxx +++ b/cui/source/options/personalization.cxx @@ -437,11 +437,11 @@ void SvxPersonalizationTabPage::LoadExtensionThemes() IMPL_LINK( SvxPersonalizationTabPage, SelectPersona, PushButton*, /*pButton*/ ) { - SelectPersonaDialog aDialog( NULL ); + VclPtr aDialog( new SelectPersonaDialog(NULL) ); - if ( aDialog.Execute() == RET_OK ) + if ( aDialog->Execute() == RET_OK ) { - OUString aPersonaSetting( aDialog.GetAppliedPersonaSetting() ); + OUString aPersonaSetting( aDialog->GetAppliedPersonaSetting() ); if ( !aPersonaSetting.isEmpty() ) { SetPersonaSettings( aPersonaSetting ); diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx index f808ef4b45fe..a35fa19ad9c3 100644 --- a/cui/source/tabpages/autocdlg.cxx +++ b/cui/source/tabpages/autocdlg.cxx @@ -717,11 +717,11 @@ IMPL_LINK_NOARG(OfaSwAutoFmtOptionsPage, EditHdl) else if( MERGE_SINGLE_LINE_PARA == nSelEntryPos ) { // dialog for per cent settings - OfaAutoFmtPrcntSet aDlg(this); - aDlg.GetPrcntFld().SetValue(nPercent); - if(RET_OK == aDlg.Execute()) + VclPtr aDlg(new OfaAutoFmtPrcntSet(this)); + aDlg->GetPrcntFld().SetValue(nPercent); + if(RET_OK == aDlg->Execute()) { - nPercent = (sal_uInt16)aDlg.GetPrcntFld().GetValue(); + nPercent = (sal_uInt16)aDlg->GetPrcntFld().GetValue(); sMargin = " " + unicode::formatPercent(nPercent, Application::GetSettings().GetUILanguageTag()); } diff --git a/cui/source/tabpages/grfpage.cxx b/cui/source/tabpages/grfpage.cxx index fe48e241c93b..70c126dcf651 100644 --- a/cui/source/tabpages/grfpage.cxx +++ b/cui/source/tabpages/grfpage.cxx @@ -681,17 +681,17 @@ void SvxGrfCropPage::GraphicHasChanged( bool bFound ) // display original size const FieldUnit eMetric = GetModuleFieldUnit( GetItemSet() ); - MetricField aFld(this, WB_HIDE); - SetFieldUnit( aFld, eMetric ); - aFld.SetDecimalDigits( m_pWidthMF->GetDecimalDigits() ); - aFld.SetMax( LONG_MAX - 1 ); - - aFld.SetValue( aFld.Normalize( aOrigSize.Width() ), eUnit ); - OUString sTemp = aFld.GetText(); - aFld.SetValue( aFld.Normalize( aOrigSize.Height() ), eUnit ); + VclPtr aFld(new MetricField(this, WB_HIDE)); + SetFieldUnit( *aFld.get(), eMetric ); + aFld->SetDecimalDigits( m_pWidthMF->GetDecimalDigits() ); + aFld->SetMax( LONG_MAX - 1 ); + + aFld->SetValue( aFld->Normalize( aOrigSize.Width() ), eUnit ); + OUString sTemp = aFld->GetText(); + aFld->SetValue( aFld->Normalize( aOrigSize.Height() ), eUnit ); // multiplication sign (U+00D7) sTemp += OUString( sal_Unicode (0x00D7) ); - sTemp += aFld.GetText(); + sTemp += aFld->GetText(); if ( aOrigPixelSize.Width() && aOrigPixelSize.Height() ) { sal_Int32 ax = sal_Int32(floor((float)aOrigPixelSize.Width() / diff --git a/cui/source/tabpages/tpbitmap.cxx b/cui/source/tabpages/tpbitmap.cxx index cdde799b2529..3a81c3dfaa41 100644 --- a/cui/source/tabpages/tpbitmap.cxx +++ b/cui/source/tabpages/tpbitmap.cxx @@ -716,10 +716,10 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ClickModifyHdl_Impl) } else { - MessageDialog aBox( GetParentDialog() + VclPtr aBox( new MessageDialog(GetParentDialog() ,"DuplicateNameDialog" - ,"cui/ui/queryduplicatedialog.ui"); - aBox.Execute(); + ,"cui/ui/queryduplicatedialog.ui")); + aBox->Execute(); } } } @@ -734,9 +734,9 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ClickDeleteHdl_Impl) if( nPos != LISTBOX_ENTRY_NOTFOUND ) { - MessageDialog aQueryBox( GetParentDialog(),"AskDelBitmapDialog","cui/ui/querydeletebitmapdialog.ui"); + VclPtr aQueryBox(new MessageDialog( GetParentDialog(),"AskDelBitmapDialog","cui/ui/querydeletebitmapdialog.ui" )); - if( aQueryBox.Execute() == RET_YES ) + if( aQueryBox->Execute() == RET_YES ) { delete pBitmapList->Remove( nPos ); m_pLbBitmaps->RemoveEntry( nPos ); diff --git a/cui/source/tabpages/tpcolor.cxx b/cui/source/tabpages/tpcolor.cxx index 336a2422798b..a9dd01440549 100644 --- a/cui/source/tabpages/tpcolor.cxx +++ b/cui/source/tabpages/tpcolor.cxx @@ -682,10 +682,10 @@ IMPL_LINK_NOARG(SvxColorTabPage, ClickAddHdl_Impl) // if yes, it is repeated and a new name is demanded if ( !bDifferent ) { - MessageDialog aWarningBox( GetParentDialog() + VclPtr aWarningBox(new MessageDialog( GetParentDialog() ,"DuplicateNameDialog" - ,"cui/ui/queryduplicatedialog.ui"); - aWarningBox.Execute(); + ,"cui/ui/queryduplicatedialog.ui")); + aWarningBox->Execute(); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); boost::scoped_ptr pDlg(pFact->CreateSvxNameDialog( GetParentDialog(), aName, aDesc )); @@ -705,7 +705,7 @@ IMPL_LINK_NOARG(SvxColorTabPage, ClickAddHdl_Impl) if( bDifferent ) bLoop = false; else - aWarningBox.Execute(); + aWarningBox->Execute(); } } @@ -753,10 +753,10 @@ IMPL_LINK_NOARG(SvxColorTabPage, ClickModifyHdl_Impl) // if yes, it is repeated and a new name is demanded if ( !bDifferent ) { - MessageDialog aWarningBox( GetParentDialog() + VclPtr aWarningBox(new MessageDialog( GetParentDialog() ,"DuplicateNameDialog" - ,"cui/ui/queryduplicatedialog.ui"); - aWarningBox.Execute(); + ,"cui/ui/queryduplicatedialog.ui")); + aWarningBox->Execute(); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); boost::scoped_ptr pDlg(pFact->CreateSvxNameDialog( GetParentDialog(), aName, aDesc )); @@ -774,7 +774,7 @@ IMPL_LINK_NOARG(SvxColorTabPage, ClickModifyHdl_Impl) if( bDifferent ) bLoop = false; else - aWarningBox.Execute(); + aWarningBox->Execute(); } } @@ -849,9 +849,9 @@ IMPL_LINK_NOARG(SvxColorTabPage, ClickDeleteHdl_Impl) if( nPos != LISTBOX_ENTRY_NOTFOUND ) { - MessageDialog aQueryBox( GetParentDialog(),"AskDelColorDialog","cui/ui/querydeletecolordialog.ui"); + VclPtr aQueryBox(new MessageDialog( GetParentDialog(),"AskDelColorDialog","cui/ui/querydeletecolordialog.ui")); - if( aQueryBox.Execute() == RET_YES ) + if( aQueryBox->Execute() == RET_YES ) { XColorEntry* pEntry = pColorList->Remove( nPos ); DBG_ASSERT( pEntry, "ColorEntry not found !" ); diff --git a/cui/source/tabpages/tpgradnt.cxx b/cui/source/tabpages/tpgradnt.cxx index 9c554b7f1e1c..98caa11d0905 100644 --- a/cui/source/tabpages/tpgradnt.cxx +++ b/cui/source/tabpages/tpgradnt.cxx @@ -561,10 +561,10 @@ IMPL_LINK_NOARG(SvxGradientTabPage, ClickModifyHdl_Impl) } else { - MessageDialog aBox( GetParentDialog() + VclPtr aBox( new MessageDialog( GetParentDialog() ,"DuplicateNameDialog" - ,"cui/ui/queryduplicatedialog.ui"); - aBox.Execute(); + ,"cui/ui/queryduplicatedialog.ui") ); + aBox->Execute(); } } @@ -580,9 +580,9 @@ IMPL_LINK_NOARG(SvxGradientTabPage, ClickDeleteHdl_Impl) if( nPos != LISTBOX_ENTRY_NOTFOUND ) { - MessageDialog aQueryBox( GetParentDialog(),"AskDelGradientDialog","cui/ui/querydeletegradientdialog.ui"); + VclPtr aQueryBox(new MessageDialog( GetParentDialog(),"AskDelGradientDialog","cui/ui/querydeletegradientdialog.ui")); - if ( aQueryBox.Execute() == RET_YES ) + if ( aQueryBox->Execute() == RET_YES ) { delete pGradientList->Remove( nPos ); m_pLbGradients->RemoveEntry( nPos ); diff --git a/cui/source/tabpages/tphatch.cxx b/cui/source/tabpages/tphatch.cxx index c3afeafafd6e..782b98b66d72 100644 --- a/cui/source/tabpages/tphatch.cxx +++ b/cui/source/tabpages/tphatch.cxx @@ -606,10 +606,10 @@ IMPL_LINK_NOARG(SvxHatchTabPage, ClickModifyHdl_Impl) } else { - MessageDialog aBox( GetParentDialog() + VclPtr aBox(new MessageDialog( GetParentDialog() ,"DuplicateNameDialog" - ,"cui/ui/queryduplicatedialog.ui"); - aBox.Execute(); + ,"cui/ui/queryduplicatedialog.ui")); + aBox->Execute(); } } } @@ -624,9 +624,9 @@ IMPL_LINK_NOARG(SvxHatchTabPage, ClickDeleteHdl_Impl) if( nPos != LISTBOX_ENTRY_NOTFOUND ) { - MessageDialog aQueryBox( GetParentDialog(),"AskDelHatchDialog","cui/ui/querydeletehatchdialog.ui"); + VclPtr aQueryBox(new MessageDialog( GetParentDialog(),"AskDelHatchDialog","cui/ui/querydeletehatchdialog.ui")); - if( aQueryBox.Execute() == RET_YES ) + if( aQueryBox->Execute() == RET_YES ) { delete pHatchingList->Remove( nPos ); m_pLbHatchings->RemoveEntry( nPos ); diff --git a/cui/source/tabpages/tplnedef.cxx b/cui/source/tabpages/tplnedef.cxx index 66de7c9bffcf..04b7ff0905cc 100644 --- a/cui/source/tabpages/tplnedef.cxx +++ b/cui/source/tabpages/tplnedef.cxx @@ -594,10 +594,10 @@ IMPL_LINK_NOARG(SvxLineDefTabPage, ClickAddHdl_Impl) else { - MessageDialog aBox( GetParentDialog() + VclPtr aBox(new MessageDialog( GetParentDialog() ,"DuplicateNameDialog" - ,"cui/ui/queryduplicatedialog.ui"); - aBox.Execute(); + ,"cui/ui/queryduplicatedialog.ui")); + aBox->Execute(); } } pDlg.reset(); @@ -672,10 +672,10 @@ IMPL_LINK_NOARG(SvxLineDefTabPage, ClickModifyHdl_Impl) } else { - MessageDialog aBox( GetParentDialog() + VclPtr aBox(new MessageDialog( GetParentDialog() ,"DuplicateNameDialog" - ,"cui/ui/queryduplicatedialog.ui"); - aBox.Execute(); + ,"cui/ui/queryduplicatedialog.ui") ); + aBox->Execute(); } } } @@ -690,11 +690,11 @@ IMPL_LINK_NOARG(SvxLineDefTabPage, ClickDeleteHdl_Impl) if ( nPos != LISTBOX_ENTRY_NOTFOUND ) { - MessageDialog aQueryBox( GetParentDialog() + VclPtr aQueryBox(new MessageDialog( GetParentDialog() ,"AskDelLineStyleDialog" - ,"cui/ui/querydeletelinestyledialog.ui"); + ,"cui/ui/querydeletelinestyledialog.ui")); - if ( aQueryBox.Execute() == RET_YES ) + if ( aQueryBox->Execute() == RET_YES ) { delete pDashList->Remove( nPos ); m_pLbLineStyles->RemoveEntry( nPos ); diff --git a/cui/source/tabpages/tplneend.cxx b/cui/source/tabpages/tplneend.cxx index 3bbe56877361..5235d1dd7325 100644 --- a/cui/source/tabpages/tplneend.cxx +++ b/cui/source/tabpages/tplneend.cxx @@ -188,11 +188,11 @@ void SvxLineEndDefTabPage::CheckChanges_Impl() if( aString != m_pLbLineEnds->GetSelectEntry() ) { - MessageDialog aQueryBox( GetParentDialog() + VclPtr aQueryBox(new MessageDialog( GetParentDialog() ,"AskChangeLineEndDialog" - ,"cui/ui/querychangelineenddialog.ui"); + ,"cui/ui/querychangelineenddialog.ui")); - if ( aQueryBox.Execute() == RET_YES ) + if ( aQueryBox->Execute() == RET_YES ) ClickModifyHdl_Impl( this ); } } @@ -325,10 +325,10 @@ IMPL_LINK_NOARG(SvxLineEndDefTabPage, ClickModifyHdl_Impl) // if yes, repeat and demand a new name if ( !bDifferent ) { - MessageDialog aWarningBox( GetParentDialog() + VclPtr aWarningBox(new MessageDialog( GetParentDialog() ,"DuplicateNameDialog" - ,"cui/ui/queryduplicatedialog.ui"); - aWarningBox.Execute(); + ,"cui/ui/queryduplicatedialog.ui")); + aWarningBox->Execute(); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); DBG_ASSERT(pFact, "Dialog creation failed!"); @@ -350,7 +350,7 @@ IMPL_LINK_NOARG(SvxLineEndDefTabPage, ClickModifyHdl_Impl) if( bDifferent ) bLoop = false; else - aWarningBox.Execute(); + aWarningBox->Execute(); } } @@ -479,10 +479,10 @@ IMPL_LINK_NOARG(SvxLineEndDefTabPage, ClickAddHdl_Impl) } else { - MessageDialog aBox( GetParentDialog() + VclPtr aBox(new MessageDialog( GetParentDialog() ,"DuplicateNameDialog" - ,"cui/ui/queryduplicatedialog.ui"); - aBox.Execute(); + ,"cui/ui/queryduplicatedialog.ui")); + aBox->Execute(); } } } @@ -507,11 +507,11 @@ IMPL_LINK_NOARG(SvxLineEndDefTabPage, ClickDeleteHdl_Impl) if( nPos != LISTBOX_ENTRY_NOTFOUND ) { - MessageDialog aQueryBox( GetParentDialog() + VclPtr aQueryBox(new MessageDialog( GetParentDialog() ,"AskDelLineEndDialog" - ,"cui/ui/querydeletelineenddialog.ui"); + ,"cui/ui/querydeletelineenddialog.ui")); - if ( aQueryBox.Execute() == RET_YES ) + if ( aQueryBox->Execute() == RET_YES ) { delete pLineEndList->Remove( nPos ); m_pLbLineEnds->RemoveEntry( nPos ); diff --git a/dbaccess/source/ext/macromigration/macromigrationdialog.cxx b/dbaccess/source/ext/macromigration/macromigrationdialog.cxx index c643e8042942..dd1aa10eebb0 100644 --- a/dbaccess/source/ext/macromigration/macromigrationdialog.cxx +++ b/dbaccess/source/ext/macromigration/macromigrationdialog.cxx @@ -406,8 +406,8 @@ namespace dbmm // check that the backup location isn't the same as the document itself if ( lcl_equalURLs_nothrow( m_pData->aContext, sBackupLocation, m_pData->xDocumentModel->getURL() ) ) { - MessageDialog aErrorBox( const_cast< MacroMigrationDialog* >( this ), MacroMigrationResId( STR_INVALID_BACKUP_LOCATION ) ); - aErrorBox.Execute(); + VclPtr aErrorBox(new MessageDialog( const_cast< MacroMigrationDialog* >( this ), MacroMigrationResId( STR_INVALID_BACKUP_LOCATION ) )); + aErrorBox->Execute(); rBackupPage.grabLocationFocus(); return false; } diff --git a/dbaccess/source/ui/app/AppControllerDnD.cxx b/dbaccess/source/ui/app/AppControllerDnD.cxx index 39e4ecf1d85b..ec583e17860d 100644 --- a/dbaccess/source/ui/app/AppControllerDnD.cxx +++ b/dbaccess/source/ui/app/AppControllerDnD.cxx @@ -175,8 +175,8 @@ void OApplicationController::deleteTables(const ::std::vector< OUString>& _rList else { OUString sMessage(ModuleRes(STR_MISSING_TABLES_XDROP)); - MessageDialog aError(getView(), sMessage); - aError.Execute(); + VclPtr aError(new MessageDialog(getView(), sMessage)); + aError->Execute(); } } } @@ -210,19 +210,19 @@ void OApplicationController::deleteObjects( ElementType _eType, const ::std::vec if ( eResult != svtools::QUERYDELETE_ALL ) { - svtools::QueryDeleteDlg_Impl aDlg( getView(), *aThisRound ); + VclPtr aDlg( new svtools::QueryDeleteDlg_Impl(getView(), *aThisRound) ); if ( !sDialogPosition.isEmpty() ) - aDlg.SetWindowState( sDialogPosition ); + aDlg->SetWindowState( sDialogPosition ); if ( nObjectsLeft > 1 ) - aDlg.EnableAllButton(); + aDlg->EnableAllButton(); - eResult = aDlg.Execute(); + eResult = aDlg->Execute(); if (eResult == svtools::QUERYDELETE_CANCEL) return; - sDialogPosition = aDlg.GetWindowState( ); + sDialogPosition = aDlg->GetWindowState( ); } bool bSuccess = false; @@ -686,17 +686,17 @@ bool OApplicationController::paste( ElementType _eType, const ::svx::ODataAccess has a /table/ with that name) */ if ( bNeedAskForName ) { - OSaveAsDlg aAskForName( getView(), + VclPtr aAskForName(new OSaveAsDlg( getView(), CommandType::QUERY, getORB(), getConnection(), sTargetName, aNameChecker, - SAD_ADDITIONAL_DESCRIPTION | SAD_TITLE_PASTE_AS); - if ( RET_OK != aAskForName.Execute() ) + SAD_ADDITIONAL_DESCRIPTION | SAD_TITLE_PASTE_AS)); + if ( RET_OK != aAskForName->Execute() ) // cancelled by the user return false; - sTargetName = aAskForName.getName(); + sTargetName = aAskForName->getName(); } // create a new object diff --git a/dbaccess/source/ui/app/AppControllerGen.cxx b/dbaccess/source/ui/app/AppControllerGen.cxx index 3eda31592a78..df90c32fd9dc 100644 --- a/dbaccess/source/ui/app/AppControllerGen.cxx +++ b/dbaccess/source/ui/app/AppControllerGen.cxx @@ -111,12 +111,12 @@ void OApplicationController::convertToView(const OUString& _sName) OUString aDefaultName = ::dbaui::createDefaultName(xMeta,xTables,aName); DynamicTableOrQueryNameCheck aNameChecker( xConnection, CommandType::TABLE ); - OSaveAsDlg aDlg( getView(), CommandType::TABLE, getORB(), xConnection, aDefaultName, aNameChecker ); - if ( aDlg.Execute() == RET_OK ) + VclPtr aDlg(new OSaveAsDlg( getView(), CommandType::TABLE, getORB(), xConnection, aDefaultName, aNameChecker ) ); + if ( aDlg->Execute() == RET_OK ) { - OUString sName = aDlg.getName(); - OUString sCatalog = aDlg.getCatalog(); - OUString sSchema = aDlg.getSchema(); + OUString sName = aDlg->getName(); + OUString sCatalog = aDlg->getCatalog(); + OUString sSchema = aDlg->getSchema(); OUString sNewName( ::dbtools::composeTableName( xMeta, sCatalog, sSchema, sName, false, ::dbtools::eInTableDefinitions ) ); Reference xView = ::dbaui::createView(sNewName,xConnection,xSourceObject); @@ -534,8 +534,8 @@ void OApplicationController::askToReconnect() bool bClear = true; if ( !m_pSubComponentManager->empty() ) { - MessageDialog aQry(getView(), ModuleRes(STR_QUERY_CLOSEDOCUMENTS), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO); - switch (aQry.Execute()) + VclPtr aQry(new MessageDialog(getView(), ModuleRes(STR_QUERY_CLOSEDOCUMENTS), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO)); + switch (aQry->Execute()) { case RET_YES: closeSubComponents(); diff --git a/dbaccess/source/ui/browser/brwctrlr.cxx b/dbaccess/source/ui/browser/brwctrlr.cxx index e8cd789f223c..32a261f40d5e 100644 --- a/dbaccess/source/ui/browser/brwctrlr.cxx +++ b/dbaccess/source/ui/browser/brwctrlr.cxx @@ -1271,8 +1271,8 @@ IMPL_LINK( SbaXDataBrowserController, OnAsyncDisplayError, void*, /* _pNotIntere { if ( m_aCurrentError.isValid() ) { - OSQLMessageBox aDlg( getBrowserView(), m_aCurrentError ); - aDlg.Execute(); + VclPtr aDlg(new OSQLMessageBox( getBrowserView(), m_aCurrentError )); + aDlg->Execute(); } return 0L; } @@ -1764,19 +1764,19 @@ void SbaXDataBrowserController::ExecuteFilterSortCrit(bool bFilter) Reference< XConnection> xCon(xFormSet->getPropertyValue(PROPERTY_ACTIVE_CONNECTION),UNO_QUERY); if(bFilter) { - DlgFilterCrit aDlg( getBrowserView(), getORB(), xCon, xParser, xSup->getColumns() ); - if ( !aDlg.Execute() ) + VclPtr aDlg(new DlgFilterCrit( getBrowserView(), getORB(), xCon, xParser, xSup->getColumns() ) ); + if ( !aDlg->Execute() ) return; // if so we don't need to update the grid - aDlg.BuildWherePart(); + aDlg->BuildWherePart(); } else { - DlgOrderCrit aDlg( getBrowserView(),xCon,xParser,xSup->getColumns() ); - if(!aDlg.Execute()) + VclPtr aDlg(new DlgOrderCrit( getBrowserView(),xCon,xParser,xSup->getColumns() ) ); + if(!aDlg->Execute()) { return; // if so we don't need to actualize the grid } - aDlg.BuildOrderPart(); + aDlg->BuildOrderPart(); } } catch(const SQLException& ) @@ -2172,11 +2172,11 @@ bool SbaXDataBrowserController::SaveModified(bool bAskFor) { getBrowserView()->getVclControl()->GrabFocus(); - MessageDialog aQry(getBrowserView()->getVclControl(), + VclPtr aQry(new MessageDialog(getBrowserView()->getVclControl(), "SaveModifiedDialog", - "dbaccess/ui/savemodifieddialog.ui"); + "dbaccess/ui/savemodifieddialog.ui")); - switch (aQry.Execute()) + switch (aQry->Execute()) { case RET_NO: Execute(ID_BROWSER_UNDORECORD,Sequence()); diff --git a/dbaccess/source/ui/browser/sbagrid.cxx b/dbaccess/source/ui/browser/sbagrid.cxx index 3eb8ac6819ef..77492e6ee3f7 100644 --- a/dbaccess/source/ui/browser/sbagrid.cxx +++ b/dbaccess/source/ui/browser/sbagrid.cxx @@ -792,10 +792,10 @@ void SbaGridControl::SetColWidth(sal_uInt16 nColId) Any aWidth = xAffectedCol->getPropertyValue(PROPERTY_WIDTH); sal_Int32 nCurWidth = aWidth.hasValue() ? ::comphelper::getINT32(aWidth) : -1; - DlgSize aDlgColWidth(this, nCurWidth, false); - if (aDlgColWidth.Execute()) + VclPtr aDlgColWidth(new DlgSize(this, nCurWidth, false)); + if (aDlgColWidth->Execute()) { - sal_Int32 nValue = aDlgColWidth.GetValue(); + sal_Int32 nValue = aDlgColWidth->GetValue(); Any aNewWidth; if (-1 == nValue) { // set to default @@ -821,10 +821,10 @@ void SbaGridControl::SetRowHeight() Any aHeight = xCols->getPropertyValue(PROPERTY_ROW_HEIGHT); sal_Int32 nCurHeight = aHeight.hasValue() ? ::comphelper::getINT32(aHeight) : -1; - DlgSize aDlgRowHeight(this, nCurHeight, true); - if (aDlgRowHeight.Execute()) + VclPtr aDlgRowHeight(new DlgSize(this, nCurHeight, true)); + if (aDlgRowHeight->Execute()) { - sal_Int32 nValue = aDlgRowHeight.GetValue(); + sal_Int32 nValue = aDlgRowHeight->GetValue(); Any aNewHeight; if ((sal_Int16)-1 == nValue) { // set to default diff --git a/dbaccess/source/ui/dlg/CollectionView.cxx b/dbaccess/source/ui/dlg/CollectionView.cxx index 02410b96681f..c3ba08fd0ee1 100644 --- a/dbaccess/source/ui/dlg/CollectionView.cxx +++ b/dbaccess/source/ui/dlg/CollectionView.cxx @@ -164,8 +164,8 @@ IMPL_LINK_NOARG(OCollectionView, Save_Click) Reference< XContent> xContent; if ( xNameContainer->hasByName(sName) ) { - QueryBox aBox( this, WB_YES_NO, ModuleRes( STR_ALREADYEXISTOVERWRITE ) ); - if ( aBox.Execute() != RET_YES ) + VclPtr aBox(new QueryBox( this, WB_YES_NO, ModuleRes( STR_ALREADYEXISTOVERWRITE ) ) ); + if ( aBox->Execute() != RET_YES ) return 0; } m_pName->SetText(sName); diff --git a/dbaccess/source/ui/dlg/ConnectionHelper.cxx b/dbaccess/source/ui/dlg/ConnectionHelper.cxx index 96e158fde04f..d0d0043b0cac 100644 --- a/dbaccess/source/ui/dlg/ConnectionHelper.cxx +++ b/dbaccess/source/ui/dlg/ConnectionHelper.cxx @@ -312,16 +312,16 @@ namespace dbaui aProfiles.insert(pArray[index]); // execute the select dialog - ODatasourceSelectDialog aSelector(GetParent(), aProfiles); + VclPtr aSelector(new ODatasourceSelectDialog(GetParent(), aProfiles)); OUString sOldProfile=getURLNoPrefix(); if (!sOldProfile.isEmpty()) - aSelector.Select(sOldProfile); + aSelector->Select(sOldProfile); else - aSelector.Select(xMozillaBootstrap->getDefaultProfile(profileType)); + aSelector->Select(xMozillaBootstrap->getDefaultProfile(profileType)); - if ( RET_OK == aSelector.Execute() ) - setURLNoPrefix(aSelector.GetSelected()); + if ( RET_OK == aSelector->Execute() ) + setURLNoPrefix(aSelector->GetSelected()); break; } case ::dbaccess::DST_FIREBIRD: @@ -482,8 +482,8 @@ namespace dbaui sQuery = sQuery.replaceFirst("$path$", aTransformer.get(OFileNotation::N_SYSTEM)); m_bUserGrabFocus = false; - QueryBox aQuery(GetParent(), WB_YES_NO | WB_DEF_YES, sQuery); - sal_Int32 nQueryResult = aQuery.Execute(); + VclPtr aQuery(new QueryBox(GetParent(), WB_YES_NO | WB_DEF_YES, sQuery)); + sal_Int32 nQueryResult = aQuery->Execute(); m_bUserGrabFocus = true; switch (nQueryResult) @@ -499,8 +499,8 @@ namespace dbaui sQuery = sQuery.replaceFirst("$name$", aTransformer.get(OFileNotation::N_SYSTEM)); m_bUserGrabFocus = false; - QueryBox aWhatToDo(GetParent(), WB_RETRY_CANCEL | WB_DEF_RETRY, sQuery); - nQueryResult = aWhatToDo.Execute(); + VclPtr aWhatToDo(new QueryBox(GetParent(), WB_RETRY_CANCEL | WB_DEF_RETRY, sQuery)); + nQueryResult = aWhatToDo->Execute(); m_bUserGrabFocus = true; if (RET_RETRY == nQueryResult) diff --git a/dbaccess/source/ui/dlg/ConnectionPage.cxx b/dbaccess/source/ui/dlg/ConnectionPage.cxx index f33b1e44b4fe..a8884ac397f1 100644 --- a/dbaccess/source/ui/dlg/ConnectionPage.cxx +++ b/dbaccess/source/ui/dlg/ConnectionPage.cxx @@ -289,8 +289,8 @@ namespace dbaui const sal_uInt16 nMessage = bSuccess ? STR_JDBCDRIVER_SUCCESS : STR_JDBCDRIVER_NO_SUCCESS; const OSQLMessageBox::MessageType mt = bSuccess ? OSQLMessageBox::Info : OSQLMessageBox::Error; - OSQLMessageBox aMsg( this, OUString( ModuleRes( nMessage ) ), OUString(), WB_OK | WB_DEF_OK, mt ); - aMsg.Execute(); + VclPtr aMsg(new OSQLMessageBox( this, OUString( ModuleRes( nMessage ) ), OUString(), WB_OK | WB_DEF_OK, mt ) ); + aMsg->Execute(); return 0L; } bool OConnectionTabPage::checkTestConnection() diff --git a/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx b/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx index 394073e7472f..850a91ad4e52 100644 --- a/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx +++ b/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx @@ -508,8 +508,8 @@ using namespace ::com::sun::star; #endif const sal_uInt16 nMessage = bSuccess ? STR_JDBCDRIVER_SUCCESS : STR_JDBCDRIVER_NO_SUCCESS; const OSQLMessageBox::MessageType mt = bSuccess ? OSQLMessageBox::Info : OSQLMessageBox::Error; - OSQLMessageBox aMsg( this, OUString( ModuleRes( nMessage ) ), OUString(), WB_OK | WB_DEF_OK, mt ); - aMsg.Execute(); + VclPtr aMsg(new OSQLMessageBox( this, OUString( ModuleRes( nMessage ) ), OUString(), WB_OK | WB_DEF_OK, mt ) ); + aMsg->Execute(); return 0L; } @@ -617,8 +617,8 @@ using namespace ::com::sun::star; } #endif sal_uInt16 nMessage = bSuccess ? STR_JDBCDRIVER_SUCCESS : STR_JDBCDRIVER_NO_SUCCESS; - OSQLMessageBox aMsg( this, OUString( ModuleRes( nMessage ) ), OUString() ); - aMsg.Execute(); + VclPtr aMsg(new OSQLMessageBox( this, OUString( ModuleRes( nMessage ) ), OUString() ) ); + aMsg->Execute(); return 0L; } diff --git a/dbaccess/source/ui/dlg/UserAdmin.cxx b/dbaccess/source/ui/dlg/UserAdmin.cxx index f776e80e4040..219440b0d496 100644 --- a/dbaccess/source/ui/dlg/UserAdmin.cxx +++ b/dbaccess/source/ui/dlg/UserAdmin.cxx @@ -92,8 +92,8 @@ IMPL_LINK_NOARG(OPasswordDialog, OKHdl_Impl) else { OUString aErrorMsg( ModuleRes( STR_ERROR_PASSWORDS_NOT_IDENTICAL)); - MessageDialog aErrorBox(this, aErrorMsg); - aErrorBox.Execute(); + VclPtr aErrorBox(new MessageDialog(this, aErrorMsg)); + aErrorBox->Execute(); m_pEDPassword->SetText( OUString() ); m_pEDPasswordRepeat->SetText( OUString() ); m_pEDPassword->GrabFocus(); @@ -199,16 +199,16 @@ IMPL_LINK( OUserAdmin, UserHdl, PushButton *, pButton ) { if(pButton == m_pNEWUSER) { - SfxPasswordDialog aPwdDlg(this); - aPwdDlg.ShowExtras(SHOWEXTRAS_ALL); - if(aPwdDlg.Execute()) + VclPtr aPwdDlg(new SfxPasswordDialog(this)); + aPwdDlg->ShowExtras(SHOWEXTRAS_ALL); + if(aPwdDlg->Execute()) { Reference xUserFactory(m_xUsers,UNO_QUERY); Reference xNewUser = xUserFactory->createDataDescriptor(); if(xNewUser.is()) { - xNewUser->setPropertyValue(PROPERTY_NAME,makeAny(OUString(aPwdDlg.GetUser()))); - xNewUser->setPropertyValue(PROPERTY_PASSWORD,makeAny(OUString(aPwdDlg.GetPassword()))); + xNewUser->setPropertyValue(PROPERTY_NAME,makeAny(OUString(aPwdDlg->GetUser()))); + xNewUser->setPropertyValue(PROPERTY_PASSWORD,makeAny(OUString(aPwdDlg->GetPassword()))); Reference xAppend(m_xUsers,UNO_QUERY); if(xAppend.is()) xAppend->appendByDescriptor(xNewUser); @@ -226,11 +226,11 @@ IMPL_LINK( OUserAdmin, UserHdl, PushButton *, pButton ) if(xUser.is()) { OUString sNewPassword,sOldPassword; - OPasswordDialog aDlg(this,sName); - if(aDlg.Execute() == RET_OK) + VclPtr aDlg(new OPasswordDialog(this,sName)); + if(aDlg->Execute() == RET_OK) { - sNewPassword = aDlg.GetNewPassword(); - sOldPassword = aDlg.GetOldPassword(); + sNewPassword = aDlg->GetNewPassword(); + sOldPassword = aDlg->GetOldPassword(); if(!sNewPassword.isEmpty()) xUser->changePassword(sOldPassword,sNewPassword); @@ -245,8 +245,8 @@ IMPL_LINK( OUserAdmin, UserHdl, PushButton *, pButton ) Reference xDrop(m_xUsers,UNO_QUERY); if(xDrop.is()) { - MessageDialog aQry(this, ModuleRes(STR_QUERY_USERADMIN_DELETE_USER), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO); - if(aQry.Execute() == RET_YES) + VclPtr aQry(new MessageDialog(this, ModuleRes(STR_QUERY_USERADMIN_DELETE_USER), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO)); + if(aQry->Execute() == RET_YES) xDrop->dropByName(GetUser()); } } diff --git a/dbaccess/source/ui/dlg/adminpages.cxx b/dbaccess/source/ui/dlg/adminpages.cxx index 0d1510998831..61744a511719 100644 --- a/dbaccess/source/ui/dlg/adminpages.cxx +++ b/dbaccess/source/ui/dlg/adminpages.cxx @@ -117,19 +117,19 @@ namespace dbaui // show an error message OUString sError( ModuleRes( STR_COULD_NOT_LOAD_ODBC_LIB ) ); sError = sError.replaceFirst("#lib#", aEnumeration.getLibraryName()); - MessageDialog aDialog(this, sError); - aDialog.Execute(); + VclPtr aDialog(new MessageDialog(this, sError)); + aDialog->Execute(); return false; } else { aEnumeration.getDatasourceNames(aOdbcDatasources); // execute the select dialog - ODatasourceSelectDialog aSelector(GetParent(), aOdbcDatasources); + VclPtr aSelector(new ODatasourceSelectDialog(GetParent(), aOdbcDatasources)); if (!_sCurr.isEmpty()) - aSelector.Select(_sCurr); - if ( RET_OK == aSelector.Execute() ) - _sReturn = aSelector.GetSelected(); + aSelector->Select(_sCurr); + if ( RET_OK == aSelector->Execute() ) + _sReturn = aSelector->GetSelected(); } return true; } @@ -242,8 +242,8 @@ namespace dbaui eImage = OSQLMessageBox::Error; aMessage = ModuleRes(STR_CONNECTION_NO_SUCCESS); } - OSQLMessageBox aMsg( this, sTitle, aMessage, WB_OK, eImage ); - aMsg.Execute(); + VclPtr aMsg(new OSQLMessageBox( this, sTitle, aMessage, WB_OK, eImage ) ); + aMsg->Execute(); } if ( !bSuccess ) m_pAdminDialog->clearPassword(); diff --git a/dbaccess/source/ui/dlg/detailpages.cxx b/dbaccess/source/ui/dlg/detailpages.cxx index 21ecc09d73fe..a4e5d5c7b221 100644 --- a/dbaccess/source/ui/dlg/detailpages.cxx +++ b/dbaccess/source/ui/dlg/detailpages.cxx @@ -241,8 +241,8 @@ namespace dbaui { if (m_pIndexes == pButton) { - ODbaseIndexDialog aIndexDialog(this, m_sDsn); - aIndexDialog.Execute(); + VclPtr aIndexDialog(new ODbaseIndexDialog(this, m_sDsn)); + aIndexDialog->Execute(); } else { @@ -490,8 +490,8 @@ namespace dbaui #endif const sal_uInt16 nMessage = bSuccess ? STR_JDBCDRIVER_SUCCESS : STR_JDBCDRIVER_NO_SUCCESS; const OSQLMessageBox::MessageType mt = bSuccess ? OSQLMessageBox::Info : OSQLMessageBox::Error; - OSQLMessageBox aMsg( this, OUString( ModuleRes( nMessage ) ), OUString(), WB_OK | WB_DEF_OK, mt ); - aMsg.Execute(); + VclPtr aMsg(new OSQLMessageBox( this, OUString( ModuleRes( nMessage ) ), OUString(), WB_OK | WB_DEF_OK, mt ) ); + aMsg->Execute(); return 0L; } IMPL_LINK(OGeneralSpecialJDBCDetailsPage, OnEditModified, Edit*, _pEdit) diff --git a/dbaccess/source/ui/dlg/directsql.cxx b/dbaccess/source/ui/dlg/directsql.cxx index 139cd2441fd0..a4995a2af317 100644 --- a/dbaccess/source/ui/dlg/directsql.cxx +++ b/dbaccess/source/ui/dlg/directsql.cxx @@ -99,8 +99,8 @@ namespace dbaui { OUString sMessage(ModuleRes(STR_DIRECTSQL_CONNECTIONLOST)); - MessageDialog aError(this, sMessage); - aError.Execute(); + VclPtr aError(new MessageDialog(this, sMessage)); + aError->Execute(); } PostUserEvent(LINK(this, DirectSQLDialog, OnClose)); diff --git a/dbaccess/source/ui/dlg/generalpage.cxx b/dbaccess/source/ui/dlg/generalpage.cxx index 1e8bd033e50d..a11b42f956dd 100644 --- a/dbaccess/source/ui/dlg/generalpage.cxx +++ b/dbaccess/source/ui/dlg/generalpage.cxx @@ -708,8 +708,8 @@ namespace dbaui if ( aFileDlg.GetCurrentFilter() != pFilter->GetUIName() || !pFilter->GetWildcard().Matches(sPath) ) { OUString sMessage(ModuleRes(STR_ERR_USE_CONNECT_TO)); - InfoBox aError(this, sMessage); - aError.Execute(); + VclPtr aError(new InfoBox(this, sMessage)); + aError->Execute(); m_pRB_ConnectDatabase->Check(); OnSetupModeSelected( m_pRB_ConnectDatabase ); return 0L; diff --git a/dbaccess/source/ui/dlg/indexdialog.cxx b/dbaccess/source/ui/dlg/indexdialog.cxx index bdf95194ec94..7377ac692a2e 100644 --- a/dbaccess/source/ui/dlg/indexdialog.cxx +++ b/dbaccess/source/ui/dlg/indexdialog.cxx @@ -413,8 +413,8 @@ namespace dbaui { OUString sConfirm(ModuleRes(STR_CONFIRM_DROP_INDEX)); sConfirm = sConfirm.replaceFirst("$name$", m_pIndexList->GetEntryText(pSelected)); - MessageDialog aConfirm(this, sConfirm, VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO); - if (RET_YES != aConfirm.Execute()) + VclPtr aConfirm(new MessageDialog(this, sConfirm, VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO)); + if (RET_YES != aConfirm->Execute()) return; } @@ -577,9 +577,9 @@ namespace dbaui if (aSelected->isModified() || aSelected->isNew()) { - MessageDialog aQuestion(this, "SaveIndexDialog", - "dbaccess/ui/saveindexdialog.ui"); - nResponse = aQuestion.Execute(); + VclPtr aQuestion(new MessageDialog(this, "SaveIndexDialog", + "dbaccess/ui/saveindexdialog.ui")); + nResponse = aQuestion->Execute(); } } @@ -621,8 +621,8 @@ namespace dbaui { OUString sError(ModuleRes(STR_INDEX_NAME_ALREADY_USED)); sError = sError.replaceFirst("$name$", sNewName); - MessageDialog aError(this, sError); - aError.Execute(); + VclPtr aError(new MessageDialog(this, sError)); + aError->Execute(); updateToolbox(); m_bEditAgain = true; @@ -682,8 +682,8 @@ namespace dbaui // need at least one field if (0 == _rPos->aFields.size()) { - MessageDialog aError(this, ModuleRes(STR_NEED_INDEX_FIELDS)); - aError.Execute(); + VclPtr aError(new MessageDialog(this, ModuleRes(STR_NEED_INDEX_FIELDS))); + aError->Execute(); m_pFields->GrabFocus(); return false; } @@ -700,8 +700,8 @@ namespace dbaui // a column is specified twice ... won't work anyway, so prevent this here and now OUString sMessage(ModuleRes(STR_INDEXDESIGN_DOUBLE_COLUMN_NAME)); sMessage = sMessage.replaceFirst("$name$", aFieldCheck->sFieldName); - MessageDialog aError(this, sMessage); - aError.Execute(); + VclPtr aError(new MessageDialog(this, sMessage)); + aError->Execute(); m_pFields->GrabFocus(); return false; } diff --git a/dbaccess/source/ui/dlg/sqlmessage.cxx b/dbaccess/source/ui/dlg/sqlmessage.cxx index 771c20477d42..5bbd80b23bca 100644 --- a/dbaccess/source/ui/dlg/sqlmessage.cxx +++ b/dbaccess/source/ui/dlg/sqlmessage.cxx @@ -705,8 +705,8 @@ void OSQLMessageBox::dispose() IMPL_LINK( OSQLMessageBox, ButtonClickHdl, Button *, /*pButton*/ ) { - OExceptionChainDialog aDlg( this, m_pImpl->aDisplayInfo ); - aDlg.Execute(); + VclPtr aDlg(new OExceptionChainDialog( this, m_pImpl->aDisplayInfo ) ); + aDlg->Execute(); return 0; } diff --git a/dbaccess/source/ui/dlg/tablespage.cxx b/dbaccess/source/ui/dlg/tablespage.cxx index e6284d230b64..9b27593e09b4 100644 --- a/dbaccess/source/ui/dlg/tablespage.cxx +++ b/dbaccess/source/ui/dlg/tablespage.cxx @@ -324,8 +324,8 @@ namespace dbaui if (aErrorInfo.isValid()) { // establishing the connection failed. Show an error window and exit. - OSQLMessageBox aMessageBox( GetParentDialog(), aErrorInfo ); - aMessageBox.Execute(); + VclPtr aMessageBox(new OSQLMessageBox( GetParentDialog(), aErrorInfo )); + aMessageBox->Execute(); m_pTables->Enable(false); m_pTablesList->Clear(); diff --git a/dbaccess/source/ui/misc/DExport.cxx b/dbaccess/source/ui/misc/DExport.cxx index 0f16a402c1f1..088beb689cc1 100644 --- a/dbaccess/source/ui/misc/DExport.cxx +++ b/dbaccess/source/ui/misc/DExport.cxx @@ -687,7 +687,7 @@ bool ODatabaseExport::executeWizard(const OUString& _rTableName, const Any& _aTe { bool bHaveDefaultTable = !m_sDefaultTableName.isEmpty(); OUString sTableName( bHaveDefaultTable ? m_sDefaultTableName : _rTableName ); - OCopyTableWizard aWizard( + VclPtr aWizard(new OCopyTableWizard( NULL, sTableName, bHaveDefaultTable ? CopyTableOperation::AppendData : CopyTableOperation::CopyDefinitionAndData, @@ -698,19 +698,19 @@ bool ODatabaseExport::executeWizard(const OUString& _rTableName, const Any& _aTe getTypeSelectionPageFactory(), m_rInputStream, m_xContext - ); + )); bool bError = false; try { - if (aWizard.Execute()) + if (aWizard->Execute()) { - switch(aWizard.getOperation()) + switch(aWizard->getOperation()) { case CopyTableOperation::CopyDefinitionAndData: case CopyTableOperation::AppendData: { - m_xTable = aWizard.createTable(); + m_xTable = aWizard->createTable(); bError = !m_xTable.is(); if(m_xTable.is()) { @@ -718,10 +718,10 @@ bool ODatabaseExport::executeWizard(const OUString& _rTableName, const Any& _aTe if(_aTextColor.hasValue()) m_xTable->setPropertyValue(PROPERTY_TEXTCOLOR,_aTextColor); } - m_bIsAutoIncrement = aWizard.shouldCreatePrimaryKey(); - m_vColumns = aWizard.GetColumnPositions(); - m_vColumnTypes = aWizard.GetColumnTypes(); - m_bAppendFirstLine = !aWizard.UseHeaderLine(); + m_bIsAutoIncrement = aWizard->shouldCreatePrimaryKey(); + m_vColumns = aWizard->GetColumnPositions(); + m_vColumnTypes = aWizard->GetColumnTypes(); + m_bAppendFirstLine = !aWizard->UseHeaderLine(); } break; default: @@ -736,7 +736,7 @@ bool ODatabaseExport::executeWizard(const OUString& _rTableName, const Any& _aTe } catch( const SQLException&) { - ::dbaui::showError( ::dbtools::SQLExceptionInfo( ::cppu::getCaughtException() ), &aWizard, m_xContext ); + ::dbaui::showError( ::dbtools::SQLExceptionInfo( ::cppu::getCaughtException() ), aWizard.get(), m_xContext ); bError = true; } catch( const Exception& ) @@ -754,9 +754,9 @@ void ODatabaseExport::showErrorDialog(const ::com::sun::star::sdbc::SQLException OUString aMsg(e.Message); aMsg += "\n"; aMsg += ModuleRes( STR_QRY_CONTINUE ); - OSQLWarningBox aBox( NULL, aMsg, WB_YES_NO | WB_DEF_NO ); + VclPtr aBox(new OSQLWarningBox( NULL, aMsg, WB_YES_NO | WB_DEF_NO ) ); - if (aBox.Execute() == RET_YES) + if (aBox->Execute() == RET_YES) m_bDontAskAgain = true; else m_bError = true; diff --git a/dbaccess/source/ui/misc/RowSetDrop.cxx b/dbaccess/source/ui/misc/RowSetDrop.cxx index 5a061ea0c448..8a74d80ea268 100644 --- a/dbaccess/source/ui/misc/RowSetDrop.cxx +++ b/dbaccess/source/ui/misc/RowSetDrop.cxx @@ -241,8 +241,8 @@ bool ORowSetImportExport::insertNewRow() if(!m_bAlreadyAsked) { OUString sAskIfContinue = ModuleRes(STR_ERROR_OCCURRED_WHILE_COPYING); - OSQLWarningBox aDlg( m_pParent, sAskIfContinue, WB_YES_NO | WB_DEF_YES ); - if(aDlg.Execute() == RET_YES) + VclPtr aDlg(new OSQLWarningBox( m_pParent, sAskIfContinue, WB_YES_NO | WB_DEF_YES ) ); + if(aDlg->Execute() == RET_YES) m_bAlreadyAsked = true; else return false; diff --git a/dbaccess/source/ui/misc/UITools.cxx b/dbaccess/source/ui/misc/UITools.cxx index 5c661d5d8191..ef31134a06dd 100644 --- a/dbaccess/source/ui/misc/UITools.cxx +++ b/dbaccess/source/ui/misc/UITools.cxx @@ -852,12 +852,12 @@ bool callColumnFormatDialog(vcl::Window* _pParent, } { // want the dialog to be destroyed before our set - SbaSbAttrDlg aDlg(_pParent, pFormatDescriptor, _pFormatter, _bHasFormat); - if (RET_OK == aDlg.Execute()) + VclPtr aDlg(new SbaSbAttrDlg(_pParent, pFormatDescriptor, _pFormatter, _bHasFormat)); + if (RET_OK == aDlg->Execute()) { // ItemSet->UNO // UNO-properties - const SfxItemSet* pSet = aDlg.GetExampleSet(); + const SfxItemSet* pSet = aDlg->GetExampleSet(); // (of course we could put the modified items directly into the column, but then the UNO-model // won't reflect these changes, and why do we have a model, then ?) @@ -875,7 +875,7 @@ bool callColumnFormatDialog(vcl::Window* _pParent, bRet = true; } // deleted formats - const SfxItemSet* pResult = aDlg.GetOutputItemSet(); + const SfxItemSet* pResult = aDlg->GetOutputItemSet(); if (pResult) { const SfxPoolItem* pItem = pResult->GetItem( SID_ATTR_NUMBERFORMAT_INFO ); @@ -997,10 +997,10 @@ void adjustBrowseBoxColumnWidth( ::svt::EditBrowseBox* _pBox, sal_uInt16 _nColId Size aDefaultMM = _pBox->PixelToLogic( Size( nDefaultWidth, 0 ), MapMode( MAP_MM ) ); - DlgSize aColumnSizeDlg( _pBox, nColSize, false, aDefaultMM.Width() * 10 ); - if ( aColumnSizeDlg.Execute() ) + VclPtr aColumnSizeDlg(new DlgSize( _pBox, nColSize, false, aDefaultMM.Width() * 10 ) ); + if ( aColumnSizeDlg->Execute() ) { - sal_Int32 nValue = aColumnSizeDlg.GetValue(); + sal_Int32 nValue = aColumnSizeDlg->GetValue(); if ( -1 == nValue ) { // default width nValue = _pBox->GetDefaultColumnWidth( _pBox->GetColumnTitle( _nColId ) ); @@ -1286,13 +1286,13 @@ sal_Int32 askForUserAction(vcl::Window* _pParent,sal_uInt16 _nTitle,sal_uInt16 _ SolarMutexGuard aGuard; OUString aMsg = ModuleRes(_nText); aMsg = aMsg.replaceFirst("%1", _sName); - OSQLMessageBox aAsk(_pParent, ModuleRes(_nTitle ), aMsg,WB_YES_NO | WB_DEF_YES,OSQLMessageBox::Query); + VclPtr aAsk(new OSQLMessageBox(_pParent, ModuleRes(_nTitle ), aMsg,WB_YES_NO | WB_DEF_YES,OSQLMessageBox::Query)); if ( _bAll ) { - aAsk.AddButton(ModuleRes(STR_BUTTON_TEXT_ALL), RET_ALL, 0); - aAsk.GetPushButton(RET_ALL)->SetHelpId(HID_CONFIRM_DROP_BUTTON_ALL); + aAsk->AddButton(ModuleRes(STR_BUTTON_TEXT_ALL), RET_ALL, 0); + aAsk->GetPushButton(RET_ALL)->SetHelpId(HID_CONFIRM_DROP_BUTTON_ALL); } - return aAsk.Execute(); + return aAsk->Execute(); } namespace @@ -1431,17 +1431,17 @@ bool insertHierachyElement( vcl::Window* _pParent, const Reference< XComponentCo // here we have everything needed to create a new query object ... HierarchicalNameCheck aNameChecker( _xNames.get(), sName ); // ... ehm, except a new name - OSaveAsDlg aAskForName( _pParent, + VclPtr aAskForName(new OSaveAsDlg( _pParent, _rxContext, sTargetName, sLabel, aNameChecker, - SAD_ADDITIONAL_DESCRIPTION | SAD_TITLE_PASTE_AS); - if ( RET_OK != aAskForName.Execute() ) + SAD_ADDITIONAL_DESCRIPTION | SAD_TITLE_PASTE_AS)); + if ( RET_OK != aAskForName->Execute() ) // cancelled by the user return false; - sNewName = aAskForName.getName(); + sNewName = aAskForName->getName(); } } else if ( xNameAccess->hasByName(sNewName) ) diff --git a/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx b/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx index d9e44161f2e8..ce98528c4fc5 100644 --- a/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx +++ b/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx @@ -308,8 +308,8 @@ namespace dbaui bool bReConnect = true; if ( _bUI ) { - MessageDialog aQuery(getView(), ModuleRes(STR_QUERY_CONNECTION_LOST), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO); - bReConnect = ( RET_YES == aQuery.Execute() ); + VclPtr aQuery(new MessageDialog(getView(), ModuleRes(STR_QUERY_CONNECTION_LOST), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO)); + bReConnect = ( RET_YES == aQuery->Execute() ); } // now really reconnect ... diff --git a/dbaccess/source/ui/querydesign/QueryDesignView.cxx b/dbaccess/source/ui/querydesign/QueryDesignView.cxx index 2c6ddebf9037..e3c3ea24c014 100644 --- a/dbaccess/source/ui/querydesign/QueryDesignView.cxx +++ b/dbaccess/source/ui/querydesign/QueryDesignView.cxx @@ -158,10 +158,10 @@ namespace } } - OQueryTableConnection aInfo(pTableView, aInfoData); + VclPtr aInfo(new OQueryTableConnection(pTableView, aInfoData)); // Because OQueryTableConnection never takes ownership of the data passed to it, but only remembers the pointer, // this pointer to a local variable is not critical, as aInfoData and aInfo have the same lifetime - pTableView->NotifyTabConnection( aInfo ); + pTableView->NotifyTabConnection( *aInfo.get() ); } else { diff --git a/dbaccess/source/ui/querydesign/QueryTableView.cxx b/dbaccess/source/ui/querydesign/QueryTableView.cxx index b4b313be212c..573eba4608a4 100644 --- a/dbaccess/source/ui/querydesign/QueryTableView.cxx +++ b/dbaccess/source/ui/querydesign/QueryTableView.cxx @@ -118,11 +118,11 @@ namespace { OQueryTableConnectionData* pData = static_cast< OQueryTableConnectionData*>(_pConnectionData.get()); - DlgQryJoin aDlg(_pView,_pConnectionData,&_pView->GetTabWinMap(),_pView->getDesignView()->getController().getConnection(),_bSelectableTables); - bool bOk = aDlg.Execute() == RET_OK; + VclPtr aDlg(new DlgQryJoin(_pView,_pConnectionData,&_pView->GetTabWinMap(),_pView->getDesignView()->getController().getConnection(),_bSelectableTables)); + bool bOk = aDlg->Execute() == RET_OK; if( bOk ) { - pData->SetJoinType(aDlg.GetJoinType()); + pData->SetJoinType(aDlg->GetJoinType()); _pView->getDesignView()->getController().setModified(sal_True); } @@ -208,10 +208,10 @@ namespace pNewConnData->AppendConnLine(*pIter,sRelatedColumn); // now add the Conn itself - OQueryTableConnection aNewConn(_pView, aNewConnData); + VclPtr aNewConn(new OQueryTableConnection(_pView, aNewConnData)); // referring to the local variable is not important, as NotifyQueryTabConn creates a new copy // to add me (if not existent) - _pView->NotifyTabConnection(aNewConn, false); + _pView->NotifyTabConnection(*aNewConn.get(), false); // don't create an Undo-Action for the new connection : the connection is // covered by the Undo-Action for the tabwin, as the "Undo the insert" will // automatically remove all connections adjacent to the win. @@ -621,8 +621,8 @@ void OQueryTableView::AddConnection(const OJoinExchangeData& jxdSource, const OJ pNewConnectionData->AppendConnLine( aSourceFieldName,aDestFieldName ); - OQueryTableConnection aNewConnection(this, aNewConnectionData); - NotifyTabConnection(aNewConnection); + VclPtr aNewConnection(new OQueryTableConnection(this, aNewConnectionData)); + NotifyTabConnection(*aNewConnection.get()); // As usual with NotifyTabConnection, using a local variable is fine because a copy is made } else diff --git a/dbaccess/source/ui/querydesign/querycontroller.cxx b/dbaccess/source/ui/querydesign/querycontroller.cxx index 74aeeda682ea..67b478944a6a 100644 --- a/dbaccess/source/ui/querydesign/querycontroller.cxx +++ b/dbaccess/source/ui/querydesign/querycontroller.cxx @@ -987,8 +987,8 @@ void OQueryController::impl_initialize() OUString aTitle( ModuleRes( STR_QUERYDESIGN_NO_VIEW_SUPPORT ) ); OUString aMessage( ModuleRes( STR_QUERYDESIGN_NO_VIEW_ASK ) ); ODataView* pWindow = getView(); - OSQLMessageBox aDlg( pWindow, aTitle, aMessage, WB_YES_NO | WB_DEF_YES, OSQLMessageBox::Query ); - bClose = aDlg.Execute() == RET_NO; + VclPtr aDlg(new OSQLMessageBox( pWindow, aTitle, aMessage, WB_YES_NO | WB_DEF_YES, OSQLMessageBox::Query )); + bClose = aDlg->Execute() == RET_NO; } if ( bClose ) throw VetoException(); @@ -1238,13 +1238,13 @@ void OQueryController::loadViewSettings( const ::comphelper::NamedValueCollectio void OQueryController::execute_QueryPropDlg() { - QueryPropertiesDialog aQueryPropDlg( - getContainer(), m_bDistinct, m_nLimit ); + VclPtr aQueryPropDlg(new QueryPropertiesDialog( + getContainer(), m_bDistinct, m_nLimit )); - if( aQueryPropDlg.Execute() == RET_OK ) + if( aQueryPropDlg->Execute() == RET_OK ) { - m_bDistinct = aQueryPropDlg.getDistinct(); - m_nLimit = aQueryPropDlg.getLimit(); + m_bDistinct = aQueryPropDlg->getDistinct(); + m_nLimit = aQueryPropDlg->getLimit(); InvalidateFeature( SID_QUERY_DISTINCT_VALUES ); InvalidateFeature( SID_QUERY_LIMIT, 0, true ); } @@ -1398,23 +1398,23 @@ bool OQueryController::askForNewName(const Reference& _xElements, b } DynamicTableOrQueryNameCheck aNameChecker( getConnection(), CommandType::QUERY ); - OSaveAsDlg aDlg( + VclPtr aDlg(new OSaveAsDlg( getView(), m_nCommandType, getORB(), getConnection(), aDefaultName, aNameChecker, - SAD_DEFAULT ); + SAD_DEFAULT )); - bRet = ( aDlg.Execute() == RET_OK ); + bRet = ( aDlg->Execute() == RET_OK ); if ( bRet ) { - m_sName = aDlg.getName(); + m_sName = aDlg->getName(); if ( editingView() ) { - m_sUpdateCatalogName = aDlg.getCatalog(); - m_sUpdateSchemaName = aDlg.getSchema(); + m_sUpdateCatalogName = aDlg->getCatalog(); + m_sUpdateSchemaName = aDlg->getSchema(); } } } @@ -1802,9 +1802,9 @@ short OQueryController::saveModified() ) { OUString sMessageText( lcl_getObjectResourceString( STR_QUERY_SAVEMODIFIED, m_nCommandType ) ); - QueryBox aQry( getView(), WB_YES_NO_CANCEL | WB_DEF_YES, sMessageText ); + VclPtr aQry(new QueryBox( getView(), WB_YES_NO_CANCEL | WB_DEF_YES, sMessageText ) ); - nRet = aQry.Execute(); + nRet = aQry->Execute(); if ( ( nRet == RET_YES ) && !doSaveAsDoc( false ) ) @@ -1914,8 +1914,8 @@ void OQueryController::impl_reset( const bool i_bForceCurrentControllerSettings if ( !i_bForceCurrentControllerSettings && !editingView() ) { OUString aTitle(ModuleRes(STR_SVT_SQL_SYNTAX_ERROR)); - OSQLMessageBox aDlg(getView(),aTitle,aErrorMsg); - aDlg.Execute(); + VclPtr aDlg(new OSQLMessageBox(getView(),aTitle,aErrorMsg)); + aDlg->Execute(); } bError = true; } diff --git a/dbaccess/source/ui/relationdesign/RelationController.cxx b/dbaccess/source/ui/relationdesign/RelationController.cxx index 184a20e27f0e..6982b38a7888 100644 --- a/dbaccess/source/ui/relationdesign/RelationController.cxx +++ b/dbaccess/source/ui/relationdesign/RelationController.cxx @@ -205,8 +205,8 @@ void ORelationController::impl_initialize() { OUString sTitle(ModuleRes(STR_RELATIONDESIGN)); sTitle = sTitle.copy(3); - OSQLMessageBox aDlg(NULL,sTitle,ModuleRes(STR_RELATIONDESIGN_NOT_AVAILABLE)); - aDlg.Execute(); + VclPtr aDlg(new OSQLMessageBox(NULL,sTitle,ModuleRes(STR_RELATIONDESIGN_NOT_AVAILABLE))); + aDlg->Execute(); } disconnect(); throw SQLException(); @@ -255,9 +255,9 @@ short ORelationController::saveModified() short nSaved = RET_YES; if(haveDataSource() && isModified()) { - MessageDialog aQry(getView(), "DesignSaveModifiedDialog", - "dbaccess/ui/designsavemodifieddialog.ui"); - nSaved = aQry.Execute(); + VclPtr aQry(new MessageDialog(getView(), "DesignSaveModifiedDialog", + "dbaccess/ui/designsavemodifieddialog.ui")); + nSaved = aQry->Execute(); if(nSaved == RET_YES) Execute(ID_BROWSER_SAVEDOC,Sequence()); } diff --git a/dbaccess/source/ui/relationdesign/RelationTableView.cxx b/dbaccess/source/ui/relationdesign/RelationTableView.cxx index bf39293e01a2..8f1ed9ff6dcc 100644 --- a/dbaccess/source/ui/relationdesign/RelationTableView.cxx +++ b/dbaccess/source/ui/relationdesign/RelationTableView.cxx @@ -222,8 +222,8 @@ void ORelationTableView::AddConnection(const OJoinExchangeData& jxdSource, const void ORelationTableView::ConnDoubleClicked( OTableConnection* pConnection ) { - ORelationDialog aRelDlg( this, pConnection->GetData() ); - switch (aRelDlg.Execute()) + VclPtr aRelDlg(new ORelationDialog( this, pConnection->GetData() )); + switch (aRelDlg->Execute()) { case RET_OK: // successfully updated @@ -250,9 +250,9 @@ void ORelationTableView::AddNewRelation() { TTableConnectionData::value_type pNewConnData( new ORelationTableConnectionData() ); - ORelationDialog aRelDlg(this, pNewConnData, true); + VclPtr aRelDlg(new ORelationDialog(this, pNewConnData, true)); - bool bSuccess = (aRelDlg.Execute() == RET_OK); + bool bSuccess = (aRelDlg->Execute() == RET_OK); if (bSuccess) { // already updated by the dialog @@ -325,8 +325,8 @@ void ORelationTableView::AddTabWin(const OUString& _rComposedName, const OUStrin void ORelationTableView::RemoveTabWin( OTableWindow* pTabWin ) { - OSQLWarningBox aDlg( this, ModuleRes( STR_QUERY_REL_DELETE_WINDOW ), WB_YES_NO | WB_DEF_YES ); - if ( m_bInRemove || aDlg.Execute() == RET_YES ) + VclPtr aDlg(new OSQLWarningBox( this, ModuleRes( STR_QUERY_REL_DELETE_WINDOW ), WB_YES_NO | WB_DEF_YES )); + if ( m_bInRemove || aDlg->Execute() == RET_YES ) { m_pView->getController().ClearUndoManager(); OJoinTableView::RemoveTabWin( pTabWin ); @@ -343,13 +343,14 @@ void ORelationTableView::lookForUiActivities() { OUString sTitle(ModuleRes(STR_RELATIONDESIGN)); sTitle = sTitle.copy(3); - OSQLMessageBox aDlg(this,ModuleRes(STR_QUERY_REL_EDIT_RELATION),OUString(),0); - aDlg.SetText(sTitle); - aDlg.RemoveButton(aDlg.GetButtonId(0)); - aDlg.AddButton( ModuleRes(STR_QUERY_REL_EDIT), RET_OK, BUTTONDIALOG_DEFBUTTON | BUTTONDIALOG_FOCUSBUTTON); - aDlg.AddButton( ModuleRes(STR_QUERY_REL_CREATE), RET_YES, 0); - aDlg.AddButton( StandardButtonType::Cancel,RET_CANCEL,0); - sal_uInt16 nRet = aDlg.Execute(); + + VclPtr aDlg(new OSQLMessageBox(this,ModuleRes(STR_QUERY_REL_EDIT_RELATION),OUString(),0)); + aDlg->SetText(sTitle); + aDlg->RemoveButton(aDlg->GetButtonId(0)); + aDlg->AddButton( ModuleRes(STR_QUERY_REL_EDIT), RET_OK, BUTTONDIALOG_DEFBUTTON | BUTTONDIALOG_FOCUSBUTTON); + aDlg->AddButton( ModuleRes(STR_QUERY_REL_CREATE), RET_YES, 0); + aDlg->AddButton( StandardButtonType::Cancel,RET_CANCEL,0); + sal_uInt16 nRet = aDlg->Execute(); if( nRet == RET_CANCEL) { m_pCurrentlyTabConnData.reset(); @@ -363,8 +364,8 @@ void ORelationTableView::lookForUiActivities() } if(m_pCurrentlyTabConnData) { - ORelationDialog aRelDlg( this, m_pCurrentlyTabConnData ); - if (aRelDlg.Execute() == RET_OK) + VclPtr aRelDlg(new ORelationDialog( this, m_pCurrentlyTabConnData ) ); + if (aRelDlg->Execute() == RET_OK) { // already updated by the dialog addConnection( new ORelationTableConnection( this, m_pCurrentlyTabConnData ) ); diff --git a/dbaccess/source/ui/tabledesign/TableController.cxx b/dbaccess/source/ui/tabledesign/TableController.cxx index b21d9c88fe07..b9d21bf18c8b 100644 --- a/dbaccess/source/ui/tabledesign/TableController.cxx +++ b/dbaccess/source/ui/tabledesign/TableController.cxx @@ -285,7 +285,7 @@ bool OTableController::doSaveDoc(bool _bSaveAs) if (!xTablesSup.is()) { OUString aMessage(ModuleRes(STR_TABLEDESIGN_CONNECTION_MISSING)); - OSQLWarningBox( getView(), aMessage ).Execute(); + VclPtr(new OSQLWarningBox( getView(), aMessage ) )->Execute(); return false; } @@ -318,13 +318,13 @@ bool OTableController::doSaveDoc(bool _bSaveAs) } DynamicTableOrQueryNameCheck aNameChecker( getConnection(), CommandType::TABLE ); - OSaveAsDlg aDlg( getView(), CommandType::TABLE, getORB(), getConnection(), aDefaultName, aNameChecker ); - if ( aDlg.Execute() != RET_OK ) + VclPtr aDlg(new OSaveAsDlg( getView(), CommandType::TABLE, getORB(), getConnection(), aDefaultName, aNameChecker ) ); + if ( aDlg->Execute() != RET_OK ) return false; - m_sName = aDlg.getName(); - sCatalog = aDlg.getCatalog(); - sSchema = aDlg.getSchema(); + m_sName = aDlg->getName(); + sCatalog = aDlg->getCatalog(); + sSchema = aDlg->getSchema(); } // did we get a name @@ -415,9 +415,9 @@ bool OTableController::doSaveDoc(bool _bSaveAs) { OUString sText( ModuleRes( STR_NAME_ALREADY_EXISTS ) ); sText = sText.replaceFirst( "#" , m_sName); - OSQLMessageBox aDlg( getView(), OUString( ModuleRes( STR_ERROR_DURING_CREATION ) ), sText, WB_OK, OSQLMessageBox::Error ); + VclPtr aDlg(new OSQLMessageBox( getView(), OUString( ModuleRes( STR_ERROR_DURING_CREATION ) ), sText, WB_OK, OSQLMessageBox::Error ) ); - aDlg.Execute(); + aDlg->Execute(); bError = true; } catch( const Exception& ) @@ -447,8 +447,8 @@ void OTableController::doEditIndexes() // table needs to be saved before editing indexes if (m_bNew || isModified()) { - MessageDialog aAsk(getView(), ModuleRes(STR_QUERY_SAVE_TABLE_EDIT_INDEXES), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO); - if (RET_YES != aAsk.Execute()) + VclPtr aAsk(new MessageDialog(getView(), ModuleRes(STR_QUERY_SAVE_TABLE_EDIT_INDEXES), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO)); + if (RET_YES != aAsk->Execute()) return; if (!doSaveDoc(false)) @@ -490,8 +490,8 @@ void OTableController::doEditIndexes() if (!xIndexes.is()) return; - DbaIndexDialog aDialog(getView(), aFieldNames, xIndexes, getConnection(), getORB(), isConnected() && getConnection()->getMetaData().is() ? getConnection()->getMetaData()->getMaxColumnsInIndex() : 0); - if (RET_OK != aDialog.Execute()) + VclPtr aDialog(new DbaIndexDialog(getView(), aFieldNames, xIndexes, getConnection(), getORB(), isConnected() && getConnection()->getMetaData().is() ? getConnection()->getMetaData()->getMaxColumnsInIndex() : 0)); + if (RET_OK != aDialog->Execute()) return; } @@ -522,7 +522,7 @@ void OTableController::impl_initialize() } catch(const SQLException&) { - OSQLWarningBox( getView(), ModuleRes( STR_NO_TYPE_INFO_AVAILABLE ) ).Execute(); + VclPtr(new OSQLWarningBox( getView(), ModuleRes( STR_NO_TYPE_INFO_AVAILABLE ) ) )->Execute(); throw; } try @@ -563,9 +563,9 @@ sal_Bool SAL_CALL OTableController::suspend(sal_Bool /*_bSuspend*/) throw( Runti ::boost::mem_fn(&OTableRow::isValid)); if ( aIter != m_vRowList.end() ) { - MessageDialog aQry(getView(), "TableDesignSaveModifiedDialog", - "dbaccess/ui/tabledesignsavemodifieddialog.ui"); - switch (aQry.Execute()) + VclPtr aQry(new MessageDialog(getView(), "TableDesignSaveModifiedDialog", + "dbaccess/ui/tabledesignsavemodifieddialog.ui")); + switch (aQry->Execute()) { case RET_YES: Execute(ID_BROWSER_SAVEDOC,Sequence()); @@ -580,9 +580,9 @@ sal_Bool SAL_CALL OTableController::suspend(sal_Bool /*_bSuspend*/) throw( Runti } else if ( !m_bNew ) { - MessageDialog aQry(getView(), "DeleteAllRowsDialog", - "dbaccess/ui/deleteallrowsdialog.ui"); - switch (aQry.Execute()) + VclPtr aQry(new MessageDialog(getView(), "DeleteAllRowsDialog", + "dbaccess/ui/deleteallrowsdialog.ui")); + switch (aQry->Execute()) { case RET_YES: { @@ -936,7 +936,7 @@ bool OTableController::checkColumns(bool _bNew) { OUString strMessage = ModuleRes(STR_TABLEDESIGN_DUPLICATE_NAME); strMessage = strMessage.replaceFirst("$column$", pFieldDesc->GetName()); - OSQLWarningBox( getView(), strMessage ).Execute(); + VclPtr(new OSQLWarningBox( getView(), strMessage ) )->Execute(); return false; } } @@ -946,9 +946,9 @@ bool OTableController::checkColumns(bool _bNew) { OUString sTitle(ModuleRes(STR_TABLEDESIGN_NO_PRIM_KEY_HEAD)); OUString sMsg(ModuleRes(STR_TABLEDESIGN_NO_PRIM_KEY)); - OSQLMessageBox aBox(getView(), sTitle,sMsg, WB_YES_NO_CANCEL | WB_DEF_YES); + VclPtr aBox(new OSQLMessageBox(getView(), sTitle,sMsg, WB_YES_NO_CANCEL | WB_DEF_YES)); - switch ( aBox.Execute() ) + switch ( aBox->Execute() ) { case RET_YES: { @@ -1075,8 +1075,8 @@ void OTableController::alterColumns() aMessage = aMessage.replaceFirst( "$column$", pField->GetName() ); SQLExceptionInfo aError( ::cppu::getCaughtException() ); - OSQLWarningBox aMsg( getView(), aMessage, WB_YES_NO | WB_DEF_YES , &aError ); - bNotOk = aMsg.Execute() == RET_YES; + VclPtr aMsg(new OSQLWarningBox( getView(), aMessage, WB_YES_NO | WB_DEF_YES , &aError ) ); + bNotOk = aMsg->Execute() == RET_YES; } else throw; @@ -1131,8 +1131,8 @@ void OTableController::alterColumns() { OUString aMessage(ModuleRes(STR_TABLEDESIGN_ALTER_ERROR)); aMessage = aMessage.replaceFirst("$column$",pField->GetName()); - OSQLWarningBox aMsg( getView(), aMessage, WB_YES_NO | WB_DEF_YES ); - if ( aMsg.Execute() != RET_YES ) + VclPtr aMsg(new OSQLWarningBox( getView(), aMessage, WB_YES_NO | WB_DEF_YES ) ); + if ( aMsg->Execute() != RET_YES ) { Reference xNewColumn(xIdxColumns->getByIndex(nPos),UNO_QUERY_THROW); OUString sName; @@ -1198,8 +1198,8 @@ void OTableController::alterColumns() OUString aMsgT(ModuleRes(STR_TBL_COLUMN_IS_KEYCOLUMN)); aMsgT = aMsgT.replaceFirst("$column$",*pIter); OUString aTitle(ModuleRes(STR_TBL_COLUMN_IS_KEYCOLUMN_TITLE)); - OSQLMessageBox aMsg(getView(),aTitle,aMsgT,WB_YES_NO| WB_DEF_YES); - if(aMsg.Execute() == RET_YES) + VclPtr aMsg(new OSQLMessageBox(getView(),aTitle,aMsgT,WB_YES_NO| WB_DEF_YES)); + if(aMsg->Execute() == RET_YES) { xKeyColumns = NULL; dropPrimaryKey(); diff --git a/dbaccess/source/ui/uno/dbinteraction.cxx b/dbaccess/source/ui/uno/dbinteraction.cxx index 7087c3b04d13..d0f5a99a1041 100644 --- a/dbaccess/source/ui/uno/dbinteraction.cxx +++ b/dbaccess/source/ui/uno/dbinteraction.cxx @@ -127,8 +127,8 @@ namespace dbaui xParamCallback = Reference< XInteractionSupplyParameters >(_rContinuations[nParamPos], UNO_QUERY); OSL_ENSURE(xParamCallback.is(), "BasicInteractionHandler::implHandle(ParametersRequest): can't set the parameters without an appropriate interaction handler!s"); - OParameterDialog aDlg(NULL, _rParamRequest.Parameters, _rParamRequest.Connection, m_xContext); - sal_Int16 nResult = aDlg.Execute(); + VclPtr aDlg(new OParameterDialog(NULL, _rParamRequest.Parameters, _rParamRequest.Connection, m_xContext)); + sal_Int16 nResult = aDlg->Execute(); try { switch (nResult) @@ -136,7 +136,7 @@ namespace dbaui case RET_OK: if (xParamCallback.is()) { - xParamCallback->setParameters(aDlg.getValues()); + xParamCallback->setParameters(aDlg->getValues()); xParamCallback->select(); } break; @@ -182,9 +182,9 @@ namespace dbaui } // execute the dialog - OSQLMessageBox aDialog(NULL, _rSqlInfo, nDialogStyle); + VclPtr aDialog(new OSQLMessageBox(NULL, _rSqlInfo, nDialogStyle)); // TODO: need a way to specify the parent window - sal_Int16 nResult = aDialog.Execute(); + sal_Int16 nResult = aDialog->Execute(); try { switch (nResult) @@ -256,8 +256,8 @@ namespace dbaui Reference< XInteractionDocumentSave > xCallback(_rContinuations[nDocuPos], UNO_QUERY); OSL_ENSURE(xCallback.is(), "BasicInteractionHandler::implHandle(DocumentSaveRequest): can't save document without an appropriate interaction handler!s"); - OCollectionView aDlg(NULL, _rDocuRequest.Content, _rDocuRequest.Name, m_xContext); - sal_Int16 nResult = aDlg.Execute(); + VclPtr aDlg(new OCollectionView(NULL, _rDocuRequest.Content, _rDocuRequest.Name, m_xContext)); + sal_Int16 nResult = aDlg->Execute(); try { switch (nResult) @@ -265,7 +265,7 @@ namespace dbaui case RET_OK: if (xCallback.is()) { - xCallback->setName(aDlg.getName(),aDlg.getSelectedFolder()); + xCallback->setName(aDlg->getName(), aDlg->getSelectedFolder()); xCallback->select(); } break; diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx index d0e5324e0165..177d6241db1a 100644 --- a/desktop/source/app/app.cxx +++ b/desktop/source/app/app.cxx @@ -708,9 +708,9 @@ void Desktop::HandleBootstrapPathErrors( ::utl::Bootstrap::Status aBootstrapStat OUString const aMessage(aDiagnosticMessage + "\n"); - MessageDialog aBootstrapFailedBox(NULL, aMessage); - aBootstrapFailedBox.SetText( aProductKey ); - aBootstrapFailedBox.Execute(); + VclPtr aBootstrapFailedBox(new MessageDialog(NULL, aMessage)); + aBootstrapFailedBox->SetText( aProductKey ); + aBootstrapFailedBox->Execute(); } } @@ -2354,8 +2354,8 @@ void Desktop::OpenClients() ResMgr* pDtResMgr = GetDesktopResManager(); if( pDtResMgr ) { - MessageDialog aBox(NULL, ResId(STR_ERR_PRINTDISABLED, *pDtResMgr)); - aBox.Execute(); + VclPtr aBox(new MessageDialog(NULL, ResId(STR_ERR_PRINTDISABLED, *pDtResMgr))); + aBox->Execute(); } } diff --git a/desktop/source/app/lockfile2.cxx b/desktop/source/app/lockfile2.cxx index c590ab7cf799..7b9a2590b1fd 100644 --- a/desktop/source/app/lockfile2.cxx +++ b/desktop/source/app/lockfile2.cxx @@ -38,22 +38,22 @@ bool Lockfile_execWarning( Lockfile * that ) OString aTime = aConfig.ReadKey( LOCKFILE_TIMEKEY ); // display warning and return response - MessageDialog aBox(NULL, DesktopResId(STR_QUERY_USERDATALOCKED), - VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO); + VclPtr aBox(new MessageDialog(NULL, DesktopResId(STR_QUERY_USERDATALOCKED), + VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO)); // set box title OUString aTitle = OUString( DesktopResId( STR_TITLE_USERDATALOCKED )); - aBox.SetText( aTitle ); + aBox->SetText( aTitle ); // insert values... - OUString aMsgText = aBox.get_primary_text(); + OUString aMsgText = aBox->get_primary_text(); aMsgText = aMsgText.replaceFirst( "$u", OStringToOUString( aUser, RTL_TEXTENCODING_ASCII_US) ); aMsgText = aMsgText.replaceFirst( "$h", OStringToOUString( aHost, RTL_TEXTENCODING_ASCII_US) ); aMsgText = aMsgText.replaceFirst( "$t", OStringToOUString( aTime, RTL_TEXTENCODING_ASCII_US) ); - aBox.set_primary_text(aMsgText); + aBox->set_primary_text(aMsgText); // do it - return aBox.Execute( ) == RET_YES; + return aBox->Execute( ) == RET_YES; } } diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.cxx b/desktop/source/deployment/gui/dp_gui_dialog2.cxx index 75b7803ced88..b3a7195507da 100644 --- a/desktop/source/deployment/gui/dp_gui_dialog2.cxx +++ b/desktop/source/deployment/gui/dp_gui_dialog2.cxx @@ -407,8 +407,8 @@ void ExtBoxWithBtns_Impl::MouseButtonDown( const MouseEvent& rMEvt ) break; case CMD_SHOW_LICENSE: { - ShowLicenseDialog aLicenseDlg( m_pParent, GetEntryData( nPos )->m_xPackage ); - aLicenseDlg.Execute(); + VclPtr aLicenseDlg(new ShowLicenseDialog( m_pParent, GetEntryData( nPos )->m_xPackage )); + aLicenseDlg->Execute(); break; } } @@ -594,12 +594,12 @@ bool DialogHelper::continueOnSharedExtension( const uno::Reference< deployment:: if ( !bHadWarning && IsSharedPkgMgr( xPackage ) ) { const SolarMutexGuard guard; - MessageDialog aInfoBox(pParent, getResId(nResID), - VCL_MESSAGE_WARNING, VCL_BUTTONS_OK_CANCEL); + VclPtr aInfoBox(new MessageDialog(pParent, getResId(nResID), + VCL_MESSAGE_WARNING, VCL_BUTTONS_OK_CANCEL)); bHadWarning = true; - if ( RET_OK == aInfoBox.Execute() ) + if ( RET_OK == aInfoBox->Execute() ) return true; else return false; @@ -626,32 +626,32 @@ void DialogHelper::openWebBrowser( const OUString & sURL, const OUString &sTitle uno::Any exc( ::cppu::getCaughtException() ); OUString msg( ::comphelper::anyToString( exc ) ); const SolarMutexGuard guard; - MessageDialog aErrorBox(NULL, msg); - aErrorBox.SetText( sTitle ); - aErrorBox.Execute(); + VclPtr aErrorBox(new MessageDialog(NULL, msg)); + aErrorBox->SetText( sTitle ); + aErrorBox->Execute(); } } bool DialogHelper::installExtensionWarn( const OUString &rExtensionName ) const { const SolarMutexGuard guard; - MessageDialog aInfo(m_pVCLWindow, getResId(RID_STR_WARNING_INSTALL_EXTENSION), - VCL_MESSAGE_WARNING, VCL_BUTTONS_OK_CANCEL); + VclPtr aInfo(new MessageDialog(m_pVCLWindow, getResId(RID_STR_WARNING_INSTALL_EXTENSION), + VCL_MESSAGE_WARNING, VCL_BUTTONS_OK_CANCEL)); - OUString sText(aInfo.get_primary_text()); + OUString sText(aInfo->get_primary_text()); sText = sText.replaceAll("%NAME", rExtensionName); - aInfo.set_primary_text(sText); + aInfo->set_primary_text(sText); - return ( RET_OK == aInfo.Execute() ); + return ( RET_OK == aInfo->Execute() ); } bool DialogHelper::installForAllUsers( bool &bInstallForAll ) const { const SolarMutexGuard guard; - MessageDialog aQuery(m_pVCLWindow, "InstallForAllDialog", - "desktop/ui/installforalldialog.ui"); + VclPtr aQuery(new MessageDialog(m_pVCLWindow, "InstallForAllDialog", + "desktop/ui/installforalldialog.ui")); - short nRet = aQuery.Execute(); + short nRet = aQuery->Execute(); if (nRet == RET_CANCEL) return false; @@ -782,14 +782,14 @@ void ExtMgrDialog::checkEntries() bool ExtMgrDialog::removeExtensionWarn( const OUString &rExtensionName ) const { const SolarMutexGuard guard; - MessageDialog aInfo(const_cast(this), getResId(RID_STR_WARNING_REMOVE_EXTENSION), - VCL_MESSAGE_WARNING, VCL_BUTTONS_OK_CANCEL); + VclPtr aInfo(new MessageDialog(const_cast(this), getResId(RID_STR_WARNING_REMOVE_EXTENSION), + VCL_MESSAGE_WARNING, VCL_BUTTONS_OK_CANCEL)); - OUString sText(aInfo.get_primary_text()); + OUString sText(aInfo->get_primary_text()); sText = sText.replaceAll("%NAME", rExtensionName); - aInfo.set_primary_text(sText); + aInfo->set_primary_text(sText); - return ( RET_OK == aInfo.Execute() ); + return ( RET_OK == aInfo->Execute() ); } bool ExtMgrDialog::enablePackage( const uno::Reference< deployment::XPackage > &xPackage, diff --git a/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx b/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx index 203c061ff315..a0758913e469 100644 --- a/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx +++ b/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx @@ -451,12 +451,12 @@ void ProgressCmdEnv::handle( uno::Reference< task::XInteractionRequest > const & verExc.Deployed->getDisplayName()); { SolarMutexGuard guard; - MessageDialog box(m_pDialogHelper? m_pDialogHelper->getWindow() : NULL, - ResId(id, *DeploymentGuiResMgr::get()), VCL_MESSAGE_WARNING, VCL_BUTTONS_OK_CANCEL); + VclPtr box(new MessageDialog(m_pDialogHelper? m_pDialogHelper->getWindow() : NULL, + ResId(id, *DeploymentGuiResMgr::get()), VCL_MESSAGE_WARNING, VCL_BUTTONS_OK_CANCEL)); OUString s; if (bEqualNames) { - s = box.get_primary_text(); + s = box->get_primary_text(); } else if (id == RID_STR_WARNING_VERSION_EQUAL) { @@ -477,8 +477,8 @@ void ProgressCmdEnv::handle( uno::Reference< task::XInteractionRequest > const & s = s.replaceAll("$OLDNAME", verExc.Deployed->getDisplayName()); s = s.replaceAll("$NEW", getVersion(verExc.NewVersion)); s = s.replaceAll("$DEPLOYED", getVersion(verExc.Deployed)); - box.set_primary_text(s); - approve = box.Execute() == RET_OK; + box->set_primary_text(s); + approve = box->Execute() == RET_OK; abort = !approve; } } @@ -506,8 +506,8 @@ void ProgressCmdEnv::handle( uno::Reference< task::XInteractionRequest > const & SolarMutexGuard guard; OUString sMsg(ResId(RID_STR_UNSUPPORTED_PLATFORM, *DeploymentGuiResMgr::get()).toString()); sMsg = sMsg.replaceAll("%Name", platExc.package->getDisplayName()); - MessageDialog box(m_pDialogHelper? m_pDialogHelper->getWindow() : NULL, sMsg); - box.Execute(); + VclPtr box(new MessageDialog(m_pDialogHelper? m_pDialogHelper->getWindow() : NULL, sMsg)); + box->Execute(); approve = true; } diff --git a/desktop/source/pkgchk/unopkg/unopkg_misc.cxx b/desktop/source/pkgchk/unopkg/unopkg_misc.cxx index b4ab62a5a309..31a99d93b53a 100644 --- a/desktop/source/pkgchk/unopkg/unopkg_misc.cxx +++ b/desktop/source/pkgchk/unopkg/unopkg_misc.cxx @@ -472,10 +472,10 @@ Reference getUNO( if ( ! InitVCL() ) throw RuntimeException( "Cannot initialize VCL!" ); { - WarningBox warn(NULL, WB_OK | WB_DEF_OK, sMsg); - warn.SetText(utl::ConfigManager::getProductName()); - warn.SetIcon(0); - warn.Execute(); + VclPtr warn(new WarningBox(NULL, WB_OK | WB_DEF_OK, sMsg)); + warn->SetText(utl::ConfigManager::getProductName()); + warn->SetIcon(0); + warn->Execute(); } DeInitVCL(); } diff --git a/editeng/source/misc/splwrap.cxx b/editeng/source/misc/splwrap.cxx index 69b2baca1fc4..674f56363496 100644 --- a/editeng/source/misc/splwrap.cxx +++ b/editeng/source/misc/splwrap.cxx @@ -411,8 +411,8 @@ bool SvxSpellWrapper::SpellNext( ) WAIT_OFF(); sal_uInt16 nResId = bReverse ? RID_SVXSTR_QUERY_BW_CONTINUE : RID_SVXSTR_QUERY_CONTINUE; - MessageDialog aBox(pWin, EditResId(nResId), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO); - if ( aBox.Execute() != RET_YES ) + VclPtr aBox(new MessageDialog(pWin, EditResId(nResId), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO)); + if ( aBox->Execute() != RET_YES ) { // sacrifice the other area if necessary ask for special area WAIT_ON(); 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 aDlg(new SaneDlg(NULL, pHolder->m_aSane, listener.is()) ); + bRet = aDlg->Execute(); + bScan = aDlg->getDoScan(); pHolder->m_bBusy = false; } if ( bScan ) diff --git a/filter/source/graphic/GraphicExportDialog.cxx b/filter/source/graphic/GraphicExportDialog.cxx index ca98685e20ab..64f090a7fa66 100644 --- a/filter/source/graphic/GraphicExportDialog.cxx +++ b/filter/source/graphic/GraphicExportDialog.cxx @@ -107,10 +107,10 @@ void GraphicExportDialog::setTitle( const OUString& aTitle ) sal_Int16 GraphicExportDialog::execute() throw ( RuntimeException, std::exception ) { sal_Int16 nReturn = ui::dialogs::ExecutableDialogResults::CANCEL; - GraphicExportOptionsDialog graphicExportOptionsDialog( Application::GetDefDialogParent(), mxSourceDocument ); - if (graphicExportOptionsDialog.Execute() == RET_OK ) + VclPtr graphicExportOptionsDialog(new GraphicExportOptionsDialog( Application::GetDefDialogParent(), mxSourceDocument ) ); + if (graphicExportOptionsDialog->Execute() == RET_OK ) { - maFilterDataSequence = graphicExportOptionsDialog.getFilterData(); + maFilterDataSequence = graphicExportOptionsDialog->getFilterData(); nReturn = ui::dialogs::ExecutableDialogResults::OK; } return nReturn; diff --git a/filter/source/graphicfilter/eps/eps.cxx b/filter/source/graphicfilter/eps/eps.cxx index edd7061a13d0..4a5d8f28cd0e 100644 --- a/filter/source/graphicfilter/eps/eps.cxx +++ b/filter/source/graphicfilter/eps/eps.cxx @@ -486,8 +486,8 @@ bool PSWriter::WritePS( const Graphic& rGraphic, SvStream& rTargetStream, Filter pResMgr = ResMgr::CreateResMgr( "eps", Application::GetSettings().GetUILanguageTag() ); if( pResMgr ) { - InfoBox aInfoBox( NULL, ResId(KEY_VERSION_CHECK, *pResMgr).toString() ); - aInfoBox.Execute(); + VclPtr aInfoBox(new InfoBox( NULL, ResId(KEY_VERSION_CHECK, *pResMgr).toString() ) ); + aInfoBox->Execute(); delete pResMgr; } } diff --git a/filter/source/pdf/impdialog.cxx b/filter/source/pdf/impdialog.cxx index 4d08f140d2c4..073039dab505 100644 --- a/filter/source/pdf/impdialog.cxx +++ b/filter/source/pdf/impdialog.cxx @@ -812,8 +812,8 @@ IMPL_LINK_NOARG(ImpPDFTabGeneralPage, ToggleExportPDFAHdl) // if a password was set, inform the user that this will not be used in PDF/A case if( mpCbPDFA1b->IsChecked() && pSecPage && pSecPage->hasPassword() ) { - MessageDialog aBox(this, PDFFilterResId(STR_WARN_PASSWORD_PDFA), VCL_MESSAGE_WARNING); - aBox.Execute(); + VclPtr aBox(new MessageDialog(this, PDFFilterResId(STR_WARN_PASSWORD_PDFA), VCL_MESSAGE_WARNING)); + aBox->Execute(); } return 0; @@ -1197,17 +1197,17 @@ void ImpPDFTabSecurityPage::SetFilterConfigItem( const ImpPDFTabDialog* paParen IMPL_LINK_NOARG(ImpPDFTabSecurityPage, ClickmaPbSetPwdHdl) { - SfxPasswordDialog aPwdDialog( this, &msUserPwdTitle ); - aPwdDialog.SetMinLen( 0 ); - aPwdDialog.ShowMinLengthText(false); - aPwdDialog.ShowExtras( SHOWEXTRAS_CONFIRM | SHOWEXTRAS_PASSWORD2 | SHOWEXTRAS_CONFIRM2 ); - aPwdDialog.SetText(msStrSetPwd); - aPwdDialog.SetGroup2Text(msOwnerPwdTitle); - aPwdDialog.AllowAsciiOnly(); - if( aPwdDialog.Execute() == RET_OK ) //OK issued get password and set it + VclPtr aPwdDialog(new SfxPasswordDialog( this, &msUserPwdTitle ) ); + aPwdDialog->SetMinLen( 0 ); + aPwdDialog->ShowMinLengthText(false); + aPwdDialog->ShowExtras( SHOWEXTRAS_CONFIRM | SHOWEXTRAS_PASSWORD2 | SHOWEXTRAS_CONFIRM2 ); + aPwdDialog->SetText(msStrSetPwd); + aPwdDialog->SetGroup2Text(msOwnerPwdTitle); + aPwdDialog->AllowAsciiOnly(); + if( aPwdDialog->Execute() == RET_OK ) //OK issued get password and set it { - OUString aUserPW( aPwdDialog.GetPassword() ); - OUString aOwnerPW( aPwdDialog.GetPassword2() ); + OUString aUserPW( aPwdDialog->GetPassword() ); + OUString aOwnerPW( aPwdDialog->GetPassword2() ); mbHaveUserPassword = !aUserPW.isEmpty(); mbHaveOwnerPassword = !aOwnerPW.isEmpty(); diff --git a/filter/source/pdf/pdfinteract.cxx b/filter/source/pdf/pdfinteract.cxx index 579d9ef3fb40..ad7641ded77c 100644 --- a/filter/source/pdf/pdfinteract.cxx +++ b/filter/source/pdf/pdfinteract.cxx @@ -53,8 +53,8 @@ sal_Bool SAL_CALL PDFInteractionHandler::handleInteractionRequest( const Referen sal_Int32 nCodes = aExc.ErrorCodes.getLength(); for( sal_Int32 i = 0; i < nCodes; i++ ) aCodes.insert( (vcl::PDFWriter::ErrorCode)aExc.ErrorCodes.getConstArray()[i] ); - ImplErrorDialog aDlg( aCodes ); - aDlg.Execute(); + VclPtr aDlg(new ImplErrorDialog( aCodes ) ); + aDlg->Execute(); bHandled = true; } return bHandled; diff --git a/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx b/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx index 57d8a3d2f5d7..9186fc888e04 100644 --- a/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx +++ b/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx @@ -225,11 +225,11 @@ void XMLFilterSettingsDialog::onNew() aTempInfo.maDocumentService = "com.sun.star.text.TextDocument"; // execute XML Filter Dialog - XMLFilterTabDialog aDlg( this, *getXSLTDialogResMgr(), mxContext, &aTempInfo ); - if ( aDlg.Execute() == RET_OK ) + VclPtr aDlg(new XMLFilterTabDialog( this, *getXSLTDialogResMgr(), mxContext, &aTempInfo ) ); + if ( aDlg->Execute() == RET_OK ) { // insert the new filter - insertOrEdit( aDlg.getNewFilterInfo() ); + insertOrEdit( aDlg->getNewFilterInfo() ); } } @@ -246,10 +246,10 @@ void XMLFilterSettingsDialog::onEdit() filter_info_impl* pOldInfo = static_cast(pEntry->GetUserData()); // execute XML Filter Dialog - XMLFilterTabDialog aDlg( this, *getXSLTDialogResMgr(), mxContext, pOldInfo ); - if ( aDlg.Execute() == RET_OK ) + VclPtr aDlg(new XMLFilterTabDialog( this, *getXSLTDialogResMgr(), mxContext, pOldInfo ) ); + if ( aDlg->Execute() == RET_OK ) { - filter_info_impl* pNewInfo = aDlg.getNewFilterInfo(); + filter_info_impl* pNewInfo = aDlg->getNewFilterInfo(); if( !(*pOldInfo == *pNewInfo) ) { @@ -771,8 +771,8 @@ void XMLFilterSettingsDialog::onTest() { filter_info_impl* pInfo = static_cast(pEntry->GetUserData()); - XMLFilterTestDialog aDlg(this, mxContext); - aDlg.test( *pInfo ); + VclPtr aDlg(new XMLFilterTestDialog(this, mxContext)); + aDlg->test( *pInfo ); } } @@ -789,8 +789,8 @@ void XMLFilterSettingsDialog::onDelete() OUString aMessage(RESIDSTR(STR_WARN_DELETE)); aMessage = aMessage.replaceFirst( aPlaceHolder, pInfo->maFilterName ); - WarningBox aWarnBox(this, (WinBits)(WB_YES_NO | WB_DEF_YES), aMessage ); - if( aWarnBox.Execute() == RET_YES ) + VclPtr aWarnBox(new WarningBox(this, (WinBits)(WB_YES_NO | WB_DEF_YES), aMessage )); + if( aWarnBox->Execute() == RET_YES ) { try { @@ -919,8 +919,8 @@ void XMLFilterSettingsDialog::onSave() aMsg = aMsg.replaceFirst( sPlaceholder, aURL.GetName() ); } - InfoBox aBox(this, aMsg ); - aBox.Execute(); + VclPtr aBox(new InfoBox(this, aMsg )); + aBox->Execute(); } } @@ -985,8 +985,8 @@ void XMLFilterSettingsDialog::onOpen() aMsg = aMsg.replaceFirst( sPlaceholder, OUString::number( nFilters ) ); } - InfoBox aBox(this, aMsg ); - aBox.Execute(); + VclPtr aBox(new InfoBox(this, aMsg )); + aBox->Execute(); } } diff --git a/filter/source/xsltdialog/xmlfiltertabdialog.cxx b/filter/source/xsltdialog/xmlfiltertabdialog.cxx index b5e28d1053aa..3c286b649c12 100644 --- a/filter/source/xsltdialog/xmlfiltertabdialog.cxx +++ b/filter/source/xsltdialog/xmlfiltertabdialog.cxx @@ -263,8 +263,8 @@ bool XMLFilterTabDialog::onOk() aMessage = aMessage.replaceAll( "%s", aReplace1 ); } - MessageDialog aBox(this, aMessage); - aBox.Execute(); + VclPtr aBox(new MessageDialog(this, aMessage)); + aBox->Execute(); if( pFocusWindow ) pFocusWindow->GrabFocus(); diff --git a/forms/source/runtime/formoperations.cxx b/forms/source/runtime/formoperations.cxx index e6e831d27539..9e7b2e41563b 100644 --- a/forms/source/runtime/formoperations.cxx +++ b/forms/source/runtime/formoperations.cxx @@ -445,8 +445,8 @@ namespace frm if(needConfirmation) { // TODO: shouldn't this be done with an interaction handler? - QueryBox aQuery( NULL, WB_YES_NO_CANCEL | WB_DEF_YES, FRM_RES_STRING( RID_STR_QUERY_SAVE_MODIFIED_ROW ) ); - switch ( aQuery.Execute() ) + VclPtr aQuery(new QueryBox( NULL, WB_YES_NO_CANCEL | WB_DEF_YES, FRM_RES_STRING( RID_STR_QUERY_SAVE_MODIFIED_ROW ) ) ); + switch ( aQuery->Execute() ) { case RET_NO: shouldCommit = false; diff --git a/fpicker/source/office/PlacesListBox.cxx b/fpicker/source/office/PlacesListBox.cxx index bed0b1a4eda7..35d84aa57edd 100644 --- a/fpicker/source/office/PlacesListBox.cxx +++ b/fpicker/source/office/PlacesListBox.cxx @@ -193,13 +193,13 @@ IMPL_LINK ( PlacesListBox, DoubleClick, void*, EMPTYARG ) PlacePtr pPlace = maPlaces[nSelected]; if ( pPlace->IsEditable() == true && !pPlace->IsLocal( ) ) { - PlaceEditDialog aDlg( mpDlg, pPlace ); - short aRetCode = aDlg.Execute(); + VclPtr aDlg(new PlaceEditDialog(mpDlg, pPlace)); + short aRetCode = aDlg->Execute(); switch(aRetCode) { case RET_OK : { - pPlace->SetName ( aDlg.GetServerName() ); - pPlace->SetUrl( aDlg.GetServerUrl() ); + pPlace->SetName ( aDlg->GetServerName() ); + pPlace->SetUrl( aDlg->GetServerUrl() ); mbUpdated = true; break; } diff --git a/fpicker/source/office/iodlg.cxx b/fpicker/source/office/iodlg.cxx index 01d7e6cbfce2..2991262b781c 100644 --- a/fpicker/source/office/iodlg.cxx +++ b/fpicker/source/office/iodlg.cxx @@ -668,17 +668,17 @@ IMPL_STATIC_LINK( SvtFileDialog, NewFolderHdl_Impl, PushButton*, EMPTYARG ) SmartContent aContent( pThis->_pFileView->GetViewURL( ) ); OUString aTitle; aContent.getTitle( aTitle ); - QueryFolderNameDialog aDlg( pThis, aTitle, SVT_RESSTR(STR_SVT_NEW_FOLDER) ); + VclPtr aDlg(new QueryFolderNameDialog(pThis, aTitle, SVT_RESSTR(STR_SVT_NEW_FOLDER)) ); bool bHandled = false; while ( !bHandled ) { - if ( aDlg.Execute() == RET_OK ) + if ( aDlg->Execute() == RET_OK ) { - OUString aUrl = aContent.createFolder( aDlg.GetName( ) ); + OUString aUrl = aContent.createFolder( aDlg->GetName( ) ); if ( !aUrl.isEmpty( ) ) { - pThis->_pFileView->CreatedFolder( aUrl, aDlg.GetName() ); + pThis->_pFileView->CreatedFolder( aUrl, aDlg->GetName() ); bHandled = true; } } @@ -1052,8 +1052,8 @@ IMPL_STATIC_LINK( SvtFileDialog, OpenHdl_Impl, void*, pVoid ) "$filename$", aFileObj.getName(INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_WITH_CHARSET) ); - MessageDialog aBox(pThis, aMsg, VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO); - if ( aBox.Execute() != RET_YES ) + VclPtr aBox(new MessageDialog(pThis, aMsg, VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO)); + if ( aBox->Execute() != RET_YES ) return 0; } else @@ -1097,8 +1097,8 @@ IMPL_STATIC_LINK( SvtFileDialog, OpenHdl_Impl, void*, pVoid ) } sError = sError.replaceFirst( "$name$", sInvalidFile ); - MessageDialog aError(pThis, sError); - aError.Execute(); + VclPtr aError(new MessageDialog(pThis, sError)); + aError->Execute(); return 0; } } @@ -1250,13 +1250,13 @@ IMPL_STATIC_LINK ( SvtFileDialog, ConnectToServerPressed_Hdl, void*, EMPTYARG ) { pThis->_pFileView->EndInplaceEditing( false ); - PlaceEditDialog aDlg( pThis ); - short aRetCode = aDlg.Execute(); + VclPtr aDlg(new PlaceEditDialog(pThis)); + short aRetCode = aDlg->Execute(); switch (aRetCode) { case RET_OK : { - PlacePtr newPlace = aDlg.GetPlace(); + PlacePtr newPlace = aDlg->GetPlace(); pThis->_pImp->_pPlaces->AppendPlace(newPlace); break; @@ -1886,8 +1886,8 @@ short SvtFileDialog::PrepareExecute() if ( bEmpty ) { - MessageDialog aBox(this, SVT_RESSTR(STR_SVT_NOREMOVABLEDEVICE)); - aBox.Execute(); + VclPtr aBox(new MessageDialog(this, SVT_RESSTR(STR_SVT_NOREMOVABLEDEVICE))); + aBox->Execute(); return 0; } } diff --git a/framework/source/services/autorecovery.cxx b/framework/source/services/autorecovery.cxx index c2e899429fba..4238795ff9f9 100644 --- a/framework/source/services/autorecovery.cxx +++ b/framework/source/services/autorecovery.cxx @@ -4205,11 +4205,11 @@ void AutoRecovery::impl_showFullDiscError() if (sBackupPath.getLength() < 1) sBackupPath = sBackupURL; - ErrorBox dlgError( + VclPtr dlgError(new ErrorBox( 0, WB_OK, - sMsg.replaceAll("%PATH", sBackupPath)); - dlgError.SetButtonText(dlgError.GetButtonId(0), sBtn); - dlgError.Execute(); + sMsg.replaceAll("%PATH", sBackupPath))); + dlgError->SetButtonText(dlgError->GetButtonId(0), sBtn); + dlgError->Execute(); } void AutoRecovery::impl_establishProgress(const AutoRecovery::TDocumentInfo& rInfo , diff --git a/reportdesign/source/ui/misc/UITools.cxx b/reportdesign/source/ui/misc/UITools.cxx index 41cc15eaf948..2e9c96fe16a9 100644 --- a/reportdesign/source/ui/misc/UITools.cxx +++ b/reportdesign/source/ui/misc/UITools.cxx @@ -712,16 +712,16 @@ bool openCharDialog( const uno::Reference& _rxRep lcl_CharPropertiesToItems( _rxReportControlFormat, *pDescriptor ); { // want the dialog to be destroyed before our set - ORptPageDialog aDlg(pParent, pDescriptor.get(), "CharDialog"); + VclPtr aDlg(new ORptPageDialog(pParent, pDescriptor.get(), "CharDialog")); uno::Reference< report::XShape > xShape( _rxReportControlFormat, uno::UNO_QUERY ); if ( xShape.is() ) - aDlg.RemoveTabPage("background"); - bSuccess = ( RET_OK == aDlg.Execute() ); + aDlg->RemoveTabPage("background"); + bSuccess = ( RET_OK == aDlg->Execute() ); if ( bSuccess ) { lcl_itemsToCharProperties( lcl_getReportControlFont( _rxReportControlFormat,WESTERN ), lcl_getReportControlFont( _rxReportControlFormat,ASIAN ), - lcl_getReportControlFont( _rxReportControlFormat,COMPLEX ), *aDlg.GetOutputItemSet(), _out_rNewValues ); + lcl_getReportControlFont( _rxReportControlFormat,COMPLEX ), *aDlg->GetOutputItemSet(), _out_rNewValues ); } } } @@ -1027,13 +1027,13 @@ bool openDialogFormula_nothrow( OUString& _in_out_rFormula CharClass aCC(_xContext, aLangTag); svl::SharedStringPool aStringPool(&aCC); - FormulaDialog aDlg( - pParent, xServiceFactory, pFormulaManager, aFormula.getUndecoratedContent(), _xRowSet, aStringPool); + VclPtr aDlg(new FormulaDialog( + pParent, xServiceFactory, pFormulaManager, aFormula.getUndecoratedContent(), _xRowSet, aStringPool)); - bSuccess = aDlg.Execute() == RET_OK; + bSuccess = aDlg->Execute() == RET_OK; if ( bSuccess ) { - OUString sFormula = aDlg.getCurrentFormula(); + OUString sFormula = aDlg->getCurrentFormula(); if ( sFormula[0] == '=' ) _in_out_rFormula = "rpt:" + sFormula.copy(1); else diff --git a/reportdesign/source/ui/report/ReportController.cxx b/reportdesign/source/ui/report/ReportController.cxx index 549fa2f33c36..c0d7373d2d72 100644 --- a/reportdesign/source/ui/report/ReportController.cxx +++ b/reportdesign/source/ui/report/ReportController.cxx @@ -1568,8 +1568,8 @@ void OReportController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue > uno::Reference< report::XFormattedField> xFormattedField(getDesignView()->getCurrentControlModel(),uno::UNO_QUERY); if ( xFormattedField.is() ) { - ConditionalFormattingDialog aDlg( getView(), xFormattedField.get(), *this ); - aDlg.Execute(); + VclPtr aDlg(new ConditionalFormattingDialog( getView(), xFormattedField.get(), *this )); + aDlg->Execute(); } } break; @@ -1578,8 +1578,8 @@ void OReportController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue > { if ( !aArgs.getLength() ) { - ODateTimeDialog aDlg(getView(),getDesignView()->getCurrentSection(),this); - aDlg.Execute(); + VclPtr aDlg(new ODateTimeDialog(getView(),getDesignView()->getCurrentSection(),this)); + aDlg->Execute(); } else createDateTime(aArgs); @@ -1590,8 +1590,8 @@ void OReportController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue > { if ( !aArgs.getLength() ) { - OPageNumberDialog aDlg(getView(),m_xReportDefinition,this); - aDlg.Execute(); + VclPtr aDlg(new OPageNumberDialog(getView(),m_xReportDefinition,this)); + aDlg->Execute(); } else createPageNumber(aArgs); @@ -2481,15 +2481,15 @@ void OReportController::openPageDialog(const uno::Reference& _ } { // want the dialog to be destroyed before our set - ORptPageDialog aDlg(getView(), pDescriptor.get(),_xSection.is() + VclPtr aDlg(new ORptPageDialog(getView(), pDescriptor.get(),_xSection.is() ? OUString("BackgroundDialog") - : OUString("PageDialog")); - if (RET_OK == aDlg.Execute()) + : OUString("PageDialog"))); + if (RET_OK == aDlg->Execute()) { // ItemSet->UNO // UNO-properties - const SfxItemSet* pSet = aDlg.GetOutputItemSet(); + const SfxItemSet* pSet = aDlg->GetOutputItemSet(); if ( _xSection.is() ) { const SfxPoolItem* pItem; diff --git a/sc/source/core/data/documen8.cxx b/sc/source/core/data/documen8.cxx index 74756f598f79..74b233ef84cc 100644 --- a/sc/source/core/data/documen8.cxx +++ b/sc/source/core/data/documen8.cxx @@ -844,8 +844,8 @@ void ScDocument::UpdateExternalRefLinks(vcl::Window* pWin) aBuf.append(OUString(ScResId(SCSTR_EXTDOC_NOT_LOADED))); aBuf.appendAscii("\n\n"); aBuf.append(aFile); - MessageDialog aBox(pWin, aBuf.makeStringAndClear()); - aBox.Execute(); + VclPtr aBox(new MessageDialog(pWin, aBuf.makeStringAndClear())); + aBox->Execute(); } pExternalRefMgr->enableDocTimer(true); diff --git a/sc/source/core/data/dpobject.cxx b/sc/source/core/data/dpobject.cxx index 532090d238d1..3e8f153b97c3 100644 --- a/sc/source/core/data/dpobject.cxx +++ b/sc/source/core/data/dpobject.cxx @@ -3204,9 +3204,9 @@ uno::Reference ScDPCollection::DBCaches::createRowSet( } catch ( const sdbc::SQLException& rError ) { - //TODO: store error message - InfoBox aInfoBox( 0, OUString(rError.Message) ); - aInfoBox.Execute(); + //! store error message + VclPtr aInfoBox(new InfoBox( 0, OUString(rError.Message) ) ); + aInfoBox->Execute(); } catch ( uno::Exception& ) { diff --git a/sc/source/core/data/validat.cxx b/sc/source/core/data/validat.cxx index 1d95c3f4c529..397fa9097d6c 100644 --- a/sc/source/core/data/validat.cxx +++ b/sc/source/core/data/validat.cxx @@ -253,8 +253,8 @@ bool ScValidationData::DoScript( const ScAddress& rPos, const OUString& rInput, { //TODO: different error message, if found, but not bAllowed ?? - MessageDialog aBox( pParent, ScGlobal::GetRscString(STR_VALID_MACRONOTFOUND)); - aBox.Execute(); + VclPtr aBox(new MessageDialog( pParent, ScGlobal::GetRscString(STR_VALID_MACRONOTFOUND))); + aBox->Execute(); } return bScriptReturnedFalse; @@ -359,8 +359,8 @@ bool ScValidationData::DoMacro( const ScAddress& rPos, const OUString& rInput, { //TODO: different error message, if found, but not bAllowed ?? - MessageDialog aBox(pParent, ScGlobal::GetRscString(STR_VALID_MACRONOTFOUND)); - aBox.Execute(); + VclPtr aBox(new MessageDialog(pParent, ScGlobal::GetRscString(STR_VALID_MACRONOTFOUND))); + aBox->Execute(); } return bRet; @@ -410,8 +410,8 @@ bool ScValidationData::DoError( vcl::Window* pParent, const OUString& rInput, } } - MessBox aBox( pParent, WinBits(nStyle), aTitle, aMessage ); - sal_uInt16 nRet = aBox.Execute(); + VclPtr aBox(new MessBox( pParent, WinBits(nStyle), aTitle, aMessage ) ); + sal_uInt16 nRet = aBox->Execute(); return ( eErrorStyle == SC_VALERR_STOP || nRet == RET_CANCEL ); } diff --git a/sc/source/filter/oox/workbookhelper.cxx b/sc/source/filter/oox/workbookhelper.cxx index 05a409c4359c..190a72ad2421 100644 --- a/sc/source/filter/oox/workbookhelper.cxx +++ b/sc/source/filter/oox/workbookhelper.cxx @@ -662,15 +662,15 @@ void WorkbookGlobals::recalcFormulaCells() if (rDoc.IsUserInteractionEnabled()) { // Ask the user if full re-calculation is desired. - QueryBox aBox( + VclPtr aBox(new QueryBox( rDocSh.GetActiveDialogParent(), WinBits(WB_YES_NO | WB_DEF_YES), - ScGlobal::GetRscString(STR_QUERY_FORMULA_RECALC_ONLOAD_XLS)); - aBox.SetCheckBoxText(ScGlobal::GetRscString(STR_ALWAYS_PERFORM_SELECTED)); + ScGlobal::GetRscString(STR_QUERY_FORMULA_RECALC_ONLOAD_XLS))); + aBox->SetCheckBoxText(ScGlobal::GetRscString(STR_ALWAYS_PERFORM_SELECTED)); - sal_Int32 nRet = aBox.Execute(); + sal_Int32 nRet = aBox->Execute(); bHardRecalc = nRet == RET_YES; - if (aBox.GetCheckBoxState()) + if (aBox->GetCheckBoxState()) { // Always perform selected action in the future. std::shared_ptr batch(comphelper::ConfigurationChanges::create()); diff --git a/sc/source/ui/condformat/colorformat.cxx b/sc/source/ui/condformat/colorformat.cxx index 26c204030610..f3ee36aaa9e8 100644 --- a/sc/source/ui/condformat/colorformat.cxx +++ b/sc/source/ui/condformat/colorformat.cxx @@ -264,8 +264,8 @@ IMPL_LINK_NOARG( ScDataBarSettingsDlg, OkBtnHdl ) if(bWarn) { //show warning message and don't close - WarningBox aWarn(this, WB_OK, maStrWarnSameValue ); - aWarn.Execute(); + VclPtr aWarn(new WarningBox(this, WB_OK, maStrWarnSameValue )); + aWarn->Execute(); } else { diff --git a/sc/source/ui/dbgui/dbnamdlg.cxx b/sc/source/ui/dbgui/dbnamdlg.cxx index 8313dfaa2ac4..dca70c5c17f0 100644 --- a/sc/source/ui/dbgui/dbnamdlg.cxx +++ b/sc/source/ui/dbgui/dbnamdlg.cxx @@ -504,9 +504,9 @@ IMPL_LINK_NOARG(ScDbNameDlg, RemoveBtnHdl) aBuf.append(aStrDelMsg.getToken(0, '#')); aBuf.append(aStrEntry); aBuf.append(aStrDelMsg.getToken(1, '#')); - QueryBox aBox(this, WinBits(WB_YES_NO|WB_DEF_YES), aBuf.makeStringAndClear()); + VclPtr aBox(new QueryBox(this, WinBits(WB_YES_NO|WB_DEF_YES), aBuf.makeStringAndClear())); - if (RET_YES == aBox.Execute()) + if (RET_YES == aBox->Execute()) { SCTAB nTab; SCCOL nColStart, nColEnd; diff --git a/sc/source/ui/docshell/arealink.cxx b/sc/source/ui/docshell/arealink.cxx index d1d550078b8e..0cad636090e4 100644 --- a/sc/source/ui/docshell/arealink.cxx +++ b/sc/source/ui/docshell/arealink.cxx @@ -459,9 +459,9 @@ bool ScAreaLink::Refresh( const OUString& rNewFile, const OUString& rNewFilter, //! Link-Dialog muss Default-Parent setzen // "kann keine Zeilen einfuegen" - InfoBox aBox( Application::GetDefDialogParent(), - ScGlobal::GetRscString( STR_MSSG_DOSUBTOTALS_2 ) ); - aBox.Execute(); + VclPtr aBox(new InfoBox( Application::GetDefDialogParent(), + ScGlobal::GetRscString( STR_MSSG_DOSUBTOTALS_2 ) ) ); + aBox->Execute(); } // aufraeumen diff --git a/sc/source/ui/docshell/dbdocfun.cxx b/sc/source/ui/docshell/dbdocfun.cxx index bb974630a333..7de3f6ad5d9a 100644 --- a/sc/source/ui/docshell/dbdocfun.cxx +++ b/sc/source/ui/docshell/dbdocfun.cxx @@ -1269,9 +1269,9 @@ bool ScDBDocFunc::DataPilotUpdate( ScDPObject* pOldObj, const ScDPObject* pNewOb // OutRange of pOldObj (pDestObj) is still old area if (!lcl_EmptyExcept(&rDoc, aNewOut, pOldObj->GetOutRange())) { - QueryBox aBox( rDocShell.GetActiveDialogParent(), WinBits(WB_YES_NO | WB_DEF_YES), - ScGlobal::GetRscString(STR_PIVOT_NOTEMPTY) ); - if (aBox.Execute() == RET_NO) + VclPtr aBox(new QueryBox( rDocShell.GetActiveDialogParent(), WinBits(WB_YES_NO | WB_DEF_YES), + ScGlobal::GetRscString(STR_PIVOT_NOTEMPTY) ) ); + if (aBox->Execute() == RET_NO) { //! like above (not editable) *pOldObj = aUndoDPObj; @@ -1421,11 +1421,11 @@ bool ScDBDocFunc::CreatePivotTable(const ScDPObject& rDPObj, bool bRecord, bool if (!bEmpty) { - QueryBox aBox( + VclPtr aBox(new QueryBox( rDocShell.GetActiveDialogParent(), WinBits(WB_YES_NO | WB_DEF_YES), - ScGlobal::GetRscString(STR_PIVOT_NOTEMPTY)); + ScGlobal::GetRscString(STR_PIVOT_NOTEMPTY))); - if (aBox.Execute() == RET_NO) + if (aBox->Execute() == RET_NO) { //! like above (not editable) return false; @@ -1495,9 +1495,9 @@ bool ScDBDocFunc::UpdatePivotTable(ScDPObject& rDPObj, bool bRecord, bool bApi) { if (!lcl_EmptyExcept(&rDoc, aNewOut, rDPObj.GetOutRange())) { - QueryBox aBox( rDocShell.GetActiveDialogParent(), WinBits(WB_YES_NO | WB_DEF_YES), - ScGlobal::GetRscString(STR_PIVOT_NOTEMPTY) ); - if (aBox.Execute() == RET_NO) + VclPtr aBox(new QueryBox( rDocShell.GetActiveDialogParent(), WinBits(WB_YES_NO | WB_DEF_YES), + ScGlobal::GetRscString(STR_PIVOT_NOTEMPTY) ) ); + if (aBox->Execute() == RET_NO) { rDPObj = aUndoDPObj; return false; @@ -1593,9 +1593,9 @@ void ScDBDocFunc::UpdateImport( const OUString& rTarget, const svx::ODataAccessD const ScDBData* pData = rDBColl.getNamedDBs().findByUpperName(ScGlobal::pCharClass->uppercase(rTarget)); if (!pData) { - InfoBox aInfoBox(rDocShell.GetActiveDialogParent(), - ScGlobal::GetRscString( STR_TARGETNOTFOUND ) ); - aInfoBox.Execute(); + VclPtr aInfoBox(new InfoBox(rDocShell.GetActiveDialogParent(), + ScGlobal::GetRscString( STR_TARGETNOTFOUND ) )); + aInfoBox->Execute(); return; } diff --git a/sc/source/ui/docshell/dbdocimp.cxx b/sc/source/ui/docshell/dbdocimp.cxx index 6c0b23772d5a..ffd71397d509 100644 --- a/sc/source/ui/docshell/dbdocimp.cxx +++ b/sc/source/ui/docshell/dbdocimp.cxx @@ -635,8 +635,8 @@ bool ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam, nErrStringId = STR_MSSG_IMPORTDATA_0; aErrorMessage = ScGlobal::GetRscString( nErrStringId ); } - InfoBox aInfoBox( rDocShell.GetActiveDialogParent(), aErrorMessage ); - aInfoBox.Execute(); + VclPtr aInfoBox(new InfoBox( rDocShell.GetActiveDialogParent(), aErrorMessage ) ); + aInfoBox->Execute(); } delete pImportDoc; diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx index 753fd6de8735..f7b09073af4b 100644 --- a/sc/source/ui/docshell/docfunc.cxx +++ b/sc/source/ui/docshell/docfunc.cxx @@ -3757,8 +3757,8 @@ bool ScDocFunc::Unprotect( SCTAB nTab, const OUString& rPassword, bool bApi ) { if (!bApi) { - InfoBox aBox( rDocShell.GetActiveDialogParent(), OUString( ScResId( SCSTR_WRONGPASSWORD ) ) ); - aBox.Execute(); + VclPtr aBox(new InfoBox( rDocShell.GetActiveDialogParent(), OUString( ScResId( SCSTR_WRONGPASSWORD ) ) ) ); + aBox->Execute(); } return false; } @@ -3787,8 +3787,8 @@ bool ScDocFunc::Unprotect( SCTAB nTab, const OUString& rPassword, bool bApi ) { if (!bApi) { - InfoBox aBox( rDocShell.GetActiveDialogParent(), OUString( ScResId( SCSTR_WRONGPASSWORD ) ) ); - aBox.Execute(); + VclPtr aBox(new InfoBox( 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 959837b6dc76..f5a44e4ff6a6 100644 --- a/sc/source/ui/docshell/docsh.cxx +++ b/sc/source/ui/docshell/docsh.cxx @@ -472,14 +472,14 @@ bool ScDocShell::LoadXML( SfxMedium* pLoadMedium, const ::com::sun::star::uno::R { // Generator is not LibreOffice. Ask if the user wants to perform // full re-calculation. - QueryBox aBox( + VclPtr aBox(new QueryBox( GetActiveDialogParent(), WinBits(WB_YES_NO | WB_DEF_YES), - ScGlobal::GetRscString(STR_QUERY_FORMULA_RECALC_ONLOAD_ODS)); - aBox.SetCheckBoxText(ScGlobal::GetRscString(STR_ALWAYS_PERFORM_SELECTED)); + ScGlobal::GetRscString(STR_QUERY_FORMULA_RECALC_ONLOAD_ODS))); + aBox->SetCheckBoxText(ScGlobal::GetRscString(STR_ALWAYS_PERFORM_SELECTED)); - bHardRecalc = aBox.Execute() == RET_YES; + bHardRecalc = aBox->Execute() == RET_YES; - if (aBox.GetCheckBoxState()) + if (aBox->GetCheckBoxState()) { // Always perform selected action in the future. std::shared_ptr batch(comphelper::ConfigurationChanges::create()); @@ -689,11 +689,11 @@ void ScDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint ) ScAppOptions aAppOptions = SC_MOD()->GetAppOptions(); if ( aAppOptions.GetShowSharedDocumentWarning() ) { - WarningBox aBox( GetActiveDialogParent(), WinBits( WB_OK ), - ScGlobal::GetRscString( STR_SHARED_DOC_WARNING ) ); - aBox.SetDefaultCheckBoxText(); - aBox.Execute(); - bool bChecked = aBox.GetCheckBoxState(); + VclPtr aBox(new WarningBox( GetActiveDialogParent(), WinBits( WB_OK ), + ScGlobal::GetRscString( STR_SHARED_DOC_WARNING ) ) ); + aBox->SetDefaultCheckBoxText(); + aBox->Execute(); + bool bChecked = aBox->GetCheckBoxState(); if ( bChecked ) { aAppOptions.SetShowSharedDocumentWarning( !bChecked ); @@ -821,8 +821,8 @@ void ScDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint ) OUString aMessage( ScGlobal::GetRscString( STR_FILE_LOCKED_SAVE_LATER ) ); aMessage = aMessage.replaceFirst( "%1", aUserName ); - WarningBox aBox( GetActiveDialogParent(), WinBits( WB_RETRY_CANCEL | WB_DEF_RETRY ), aMessage ); - if ( aBox.Execute() == RET_RETRY ) + VclPtr aBox(new WarningBox( GetActiveDialogParent(), WinBits( WB_RETRY_CANCEL | WB_DEF_RETRY ), aMessage ) ); + if ( aBox->Execute() == RET_RETRY ) { bRetry = true; } @@ -896,9 +896,9 @@ void ScDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint ) } else { - WarningBox aBox( GetActiveDialogParent(), WinBits( WB_OK ), - ScGlobal::GetRscString( STR_DOC_NOLONGERSHARED ) ); - aBox.Execute(); + VclPtr aBox(new WarningBox( GetActiveDialogParent(), WinBits( WB_OK ), + ScGlobal::GetRscString( STR_DOC_NOLONGERSHARED ) ) ); + aBox->Execute(); SfxBindings* pBindings = GetViewBindings(); if ( pBindings ) @@ -937,10 +937,10 @@ void ScDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint ) { if ( GetDocument().GetExternalRefManager()->containsUnsavedReferences() ) { - WarningBox aBox( GetActiveDialogParent(), WinBits( WB_YES_NO ), - ScGlobal::GetRscString( STR_UNSAVED_EXT_REF ) ); + VclPtr aBox(new WarningBox( GetActiveDialogParent(), WinBits( WB_YES_NO ), + ScGlobal::GetRscString( STR_UNSAVED_EXT_REF ) ) ); - if( RET_NO == aBox.Execute()) + if( RET_NO == aBox->Execute()) { SetError( ERRCODE_IO_ABORT, OUString( OSL_LOG_PREFIX ) ); // this error code will produce no error message, but will break the further saving process } diff --git a/sc/source/ui/docshell/docsh3.cxx b/sc/source/ui/docshell/docsh3.cxx index 66c3a8608338..2ee72312c5dd 100644 --- a/sc/source/ui/docshell/docsh3.cxx +++ b/sc/source/ui/docshell/docsh3.cxx @@ -1202,12 +1202,12 @@ bool ScDocShell::MergeSharedDocument( ScDocShell* pSharedDocShell ) while ( bLoop ) { bLoop = false; - ScConflictsDlg aDlg( GetActiveDialogParent(), GetViewData(), &rSharedDoc, aConflictsList ); - if ( aDlg.Execute() == RET_CANCEL ) + VclPtr aDlg(new ScConflictsDlg( GetActiveDialogParent(), GetViewData(), &rSharedDoc, aConflictsList ) ); + if ( aDlg->Execute() == RET_CANCEL ) { - QueryBox aBox( GetActiveDialogParent(), WinBits( WB_YES_NO | WB_DEF_YES ), - ScGlobal::GetRscString( STR_DOC_WILLNOTBESAVED ) ); - if ( aBox.Execute() == RET_YES ) + VclPtr aBox(new QueryBox( GetActiveDialogParent(), WinBits( WB_YES_NO | WB_DEF_YES ), + ScGlobal::GetRscString( STR_DOC_WILLNOTBESAVED ) ) ); + if ( aBox->Execute() == RET_YES ) { return false; } @@ -1320,8 +1320,8 @@ bool ScDocShell::MergeSharedDocument( ScDocShell* pSharedDocShell ) PostPaintExtras(); PostPaintGridAll(); - InfoBox aInfoBox( GetActiveDialogParent(), ScGlobal::GetRscString( STR_DOC_UPDATED ) ); - aInfoBox.Execute(); + VclPtr aInfoBox(new InfoBox( GetActiveDialogParent(), ScGlobal::GetRscString( STR_DOC_UPDATED ) ) ); + aInfoBox->Execute(); } return ( pThisAction != NULL ); diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx index c2077f7eb6d1..8a4d958a3320 100644 --- a/sc/source/ui/docshell/docsh4.cxx +++ b/sc/source/ui/docshell/docsh4.cxx @@ -222,8 +222,8 @@ void ScDocShell::Execute( SfxRequest& rReq ) aMessage += sTarget; aMessage += aTemplate.getToken( 1, '#' ); - QueryBox aBox( 0, WinBits(WB_YES_NO | WB_DEF_YES), aMessage ); - bDo = ( aBox.Execute() == RET_YES ); + VclPtr aBox(new QueryBox( 0, WinBits(WB_YES_NO | WB_DEF_YES), aMessage )); + bDo = ( aBox->Execute() == RET_YES ); } if (bDo) @@ -427,10 +427,10 @@ void ScDocShell::Execute( SfxRequest& rReq ) if(nSet==LM_ON_DEMAND) { - QueryBox aBox( GetActiveDialogParent(), WinBits(WB_YES_NO | WB_DEF_YES), - ScGlobal::GetRscString(STR_RELOAD_TABLES) ); + VclPtr aBox(new QueryBox( GetActiveDialogParent(), WinBits(WB_YES_NO | WB_DEF_YES), + ScGlobal::GetRscString(STR_RELOAD_TABLES) ) ); - nDlgRet=aBox.Execute(); + nDlgRet=aBox->Execute(); } if (nDlgRet == RET_YES || nSet==LM_ALWAYS) @@ -476,9 +476,9 @@ void ScDocShell::Execute( SfxRequest& rReq ) OSL_ENSURE(pViewSh,"SID_REIMPORT_AFTER_LOAD: keine View"); if (pViewSh && pDBColl) { - QueryBox aBox( GetActiveDialogParent(), WinBits(WB_YES_NO | WB_DEF_YES), - ScGlobal::GetRscString(STR_REIMPORT_AFTER_LOAD) ); - if (aBox.Execute() == RET_YES) + VclPtr aBox(new QueryBox( GetActiveDialogParent(), WinBits(WB_YES_NO | WB_DEF_YES), + ScGlobal::GetRscString(STR_REIMPORT_AFTER_LOAD) ) ); + if (aBox->Execute() == RET_YES) { ScDBCollection::NamedDBs& rDBs = pDBColl->getNamedDBs(); ScDBCollection::NamedDBs::iterator itr = rDBs.begin(), itrEnd = rDBs.end(); @@ -575,10 +575,10 @@ void ScDocShell::Execute( SfxRequest& rReq ) if ( !pItem ) { // no dialog on playing the macro - WarningBox aBox( pParent ? pParent : GetActiveDialogParent(), + VclPtr aBox(new WarningBox( pParent ? pParent : GetActiveDialogParent(), WinBits(WB_YES_NO | WB_DEF_NO), - ScGlobal::GetRscString( STR_END_REDLINING ) ); - bDo = ( aBox.Execute() == RET_YES ); + ScGlobal::GetRscString( STR_END_REDLINING ) ) ); + bDo = ( aBox->Execute() == RET_YES ); } if ( bDo ) @@ -644,10 +644,10 @@ void ScDocShell::Execute( SfxRequest& rReq ) { if ( nSlot == SID_DOCUMENT_COMPARE ) { //! old changes trace will be lost - WarningBox aBox( GetActiveDialogParent(), + VclPtr aBox(new WarningBox( GetActiveDialogParent(), WinBits(WB_YES_NO | WB_DEF_NO), - ScGlobal::GetRscString( STR_END_REDLINING ) ); - if( aBox.Execute() == RET_YES ) + ScGlobal::GetRscString( STR_END_REDLINING ) ) ); + if( aBox->Execute() == RET_YES ) bDo = ExecuteChangeProtectionDialog( NULL, true ); else bDo = false; @@ -913,10 +913,10 @@ void ScDocShell::Execute( SfxRequest& rReq ) break; } - ScShareDocumentDlg aDlg( GetActiveDialogParent(), pViewData ); - if ( aDlg.Execute() == RET_OK ) + VclPtr aDlg(new ScShareDocumentDlg( GetActiveDialogParent(), pViewData ) ); + if ( aDlg->Execute() == RET_OK ) { - bool bSetShared = aDlg.IsShareDocumentChecked(); + bool bSetShared = aDlg->IsShareDocumentChecked(); if ( bSetShared != static_cast< bool >( IsDocShared() ) ) { if ( bSetShared ) @@ -924,9 +924,9 @@ void ScDocShell::Execute( SfxRequest& rReq ) bool bContinue = true; if ( HasName() ) { - QueryBox aBox( GetActiveDialogParent(), WinBits( WB_YES_NO | WB_DEF_YES ), - ScGlobal::GetRscString( STR_DOC_WILLBESAVED ) ); - if ( aBox.Execute() == RET_NO ) + VclPtr aBox(new QueryBox( GetActiveDialogParent(), WinBits( WB_YES_NO | WB_DEF_YES ), + ScGlobal::GetRscString( STR_DOC_WILLBESAVED ) ) ); + if ( aBox->Execute() == RET_NO ) { bContinue = false; } @@ -1016,14 +1016,14 @@ void ScDocShell::Execute( SfxRequest& rReq ) OUString aMessage( ScGlobal::GetRscString( STR_FILE_LOCKED_TRY_LATER ) ); aMessage = aMessage.replaceFirst( "%1", aUserName ); - WarningBox aBox( GetActiveDialogParent(), WinBits( WB_OK ), aMessage ); - aBox.Execute(); + VclPtr aBox(new WarningBox( GetActiveDialogParent(), WinBits( WB_OK ), aMessage ) ); + aBox->Execute(); } else { - WarningBox aBox( GetActiveDialogParent(), WinBits( WB_YES_NO | WB_DEF_YES ), - ScGlobal::GetRscString( STR_DOC_DISABLESHARED ) ); - if ( aBox.Execute() == RET_YES ) + VclPtr aBox(new WarningBox( GetActiveDialogParent(), WinBits( WB_YES_NO | WB_DEF_YES ), + ScGlobal::GetRscString( STR_DOC_DISABLESHARED ) ) ); + if ( aBox->Execute() == RET_YES ) { xCloseable->close( sal_True ); @@ -1055,9 +1055,9 @@ void ScDocShell::Execute( SfxRequest& rReq ) else { xCloseable->close( sal_True ); - WarningBox aBox( GetActiveDialogParent(), WinBits( WB_OK ), - ScGlobal::GetRscString( STR_DOC_NOLONGERSHARED ) ); - aBox.Execute(); + VclPtr aBox(new WarningBox( GetActiveDialogParent(), WinBits( WB_OK ), + ScGlobal::GetRscString( STR_DOC_NOLONGERSHARED ) ) ); + aBox->Execute(); } } catch ( uno::Exception& ) @@ -1156,9 +1156,9 @@ bool ScDocShell::ExecuteChangeProtectionDialog( vcl::Window* _pParent, bool bJus } else { - InfoBox aBox( GetActiveDialogParent(), - OUString( ScResId( SCSTR_WRONGPASSWORD ) ) ); - aBox.Execute(); + VclPtr aBox(new InfoBox( GetActiveDialogParent(), + OUString( ScResId( SCSTR_WRONGPASSWORD ) ) ) ); + aBox->Execute(); } } else @@ -1486,9 +1486,9 @@ void ScDocShell::PageStyleModified( const OUString& rStyleName, bool bApi ) if (bWarn && !bApi) { ScWaitCursorOff aWaitOff( GetActiveDialogParent() ); - InfoBox aInfoBox(GetActiveDialogParent(), - ScGlobal::GetRscString(STR_PRINT_INVALID_AREA)); - aInfoBox.Execute(); + VclPtr aInfoBox(new InfoBox(GetActiveDialogParent(), + ScGlobal::GetRscString(STR_PRINT_INVALID_AREA))); + aInfoBox->Execute(); } } diff --git a/sc/source/ui/docshell/docsh5.cxx b/sc/source/ui/docshell/docsh5.cxx index 79167bcaa71d..20aa6e4f1435 100644 --- a/sc/source/ui/docshell/docsh5.cxx +++ b/sc/source/ui/docshell/docsh5.cxx @@ -81,8 +81,8 @@ void ScDocShell::ErrorMessage( sal_uInt16 nGlobStrId ) } } - InfoBox aBox( pParent, ScGlobal::GetRscString( nGlobStrId ) ); - aBox.Execute(); + VclPtr aBox(new InfoBox( pParent, ScGlobal::GetRscString( nGlobStrId ) ) ); + aBox->Execute(); if (bFocus) pParent->GrabFocus(); } @@ -487,9 +487,9 @@ void ScDocShell::DoConsolidate( const ScConsolidateParam& rParam, bool bRecord ) if (bErr) { - InfoBox aBox( GetActiveDialogParent(), - ScGlobal::GetRscString( STR_CONSOLIDATE_ERR1 ) ); - aBox.Execute(); + VclPtr aBox(new InfoBox( GetActiveDialogParent(), + ScGlobal::GetRscString( STR_CONSOLIDATE_ERR1 ) ) ); + aBox->Execute(); return; } @@ -697,16 +697,16 @@ void ScDocShell::UseScenario( SCTAB nTab, const OUString& rName, bool bRecord ) } else { - InfoBox aBox(GetActiveDialogParent(), - ScGlobal::GetRscString( STR_PROTECTIONERR ) ); - aBox.Execute(); + VclPtr aBox(new InfoBox( GetActiveDialogParent(), + ScGlobal::GetRscString( STR_PROTECTIONERR ) ) ); + aBox->Execute(); } } else { - InfoBox aBox(GetActiveDialogParent(), - ScGlobal::GetRscString( STR_SCENARIO_NOTFOUND ) ); - aBox.Execute(); + VclPtr aBox(new InfoBox(GetActiveDialogParent(), + ScGlobal::GetRscString( STR_SCENARIO_NOTFOUND ) ) ); + aBox->Execute(); } } else diff --git a/sc/source/ui/docshell/docsh6.cxx b/sc/source/ui/docshell/docsh6.cxx index 92b6e2a5dc8e..b308e74d2491 100644 --- a/sc/source/ui/docshell/docsh6.cxx +++ b/sc/source/ui/docshell/docsh6.cxx @@ -531,8 +531,8 @@ void ScDocShell::CheckConfigOptions() if (pViewShell) { vcl::Window* pParent = pViewShell->GetFrameWin(); - InfoBox aBox(pParent, ScGlobal::GetRscString(STR_OPTIONS_WARN_SEPARATORS)); - aBox.Execute(); + VclPtr aBox(new InfoBox(pParent, ScGlobal::GetRscString(STR_OPTIONS_WARN_SEPARATORS))); + aBox->Execute(); } // For now, this is the only option setting that could launch info diff --git a/sc/source/ui/docshell/documentlinkmgr.cxx b/sc/source/ui/docshell/documentlinkmgr.cxx index 7da7c3855d8c..69b5f7950d22 100644 --- a/sc/source/ui/docshell/documentlinkmgr.cxx +++ b/sc/source/ui/docshell/documentlinkmgr.cxx @@ -165,8 +165,8 @@ bool DocumentLinkManager::updateDdeLinks( vcl::Window* pWin ) aBuf.append(aElem); aBuf.appendAscii("\nType : "); aBuf.append(aType); - MessageDialog aBox(pWin, aBuf.makeStringAndClear()); - aBox.Execute(); + VclPtr aBox(new MessageDialog(pWin, aBuf.makeStringAndClear())); + aBox->Execute(); } } diff --git a/sc/source/ui/docshell/externalrefmgr.cxx b/sc/source/ui/docshell/externalrefmgr.cxx index ff22d8d44b12..9c5bcc661066 100644 --- a/sc/source/ui/docshell/externalrefmgr.cxx +++ b/sc/source/ui/docshell/externalrefmgr.cxx @@ -3020,9 +3020,9 @@ void ScExternalRefManager::Notify( SfxBroadcaster&, const SfxHint& rHint ) { SfxObjectShell* pObjShell = static_cast( rHint ).GetObjShell(); ScDocShell* pDocShell = static_cast< ScDocShell* >( pObjShell ); - WarningBox aBox( pDocShell->GetActiveDialogParent(), WinBits( WB_OK ), - ScGlobal::GetRscString( STR_CLOSE_WITH_UNSAVED_REFS ) ); - aBox.Execute(); + VclPtr aBox(new WarningBox( pDocShell->GetActiveDialogParent(), WinBits( WB_OK ), + ScGlobal::GetRscString( STR_CLOSE_WITH_UNSAVED_REFS ) ) ); + aBox->Execute(); } break; case SFX_EVENT_SAVEDOCDONE: diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx index 806c1b4d7c01..dd830e25c66c 100644 --- a/sc/source/ui/docshell/impex.cxx +++ b/sc/source/ui/docshell/impex.cxx @@ -210,9 +210,9 @@ bool ScImportExport::StartPaste() ScEditableTester aTester( pDoc, aRange ); if ( !aTester.IsEditable() ) { - InfoBox aInfoBox(Application::GetDefDialogParent(), - ScGlobal::GetRscString( aTester.GetMessageId() ) ); - aInfoBox.Execute(); + VclPtr aInfoBox(new InfoBox(Application::GetDefDialogParent(), + ScGlobal::GetRscString( aTester.GetMessageId() ) ) ); + aInfoBox->Execute(); return false; } } @@ -1452,8 +1452,8 @@ bool ScImportExport::ExtText2Doc( SvStream& rStrm ) if ( !mbApi && nStartCol != nEndCol && !pDoc->IsBlockEmpty( nTab, nStartCol + 1, nStartRow, nEndCol, nRow ) ) { - ScReplaceWarnBox aBox( pDocSh->GetActiveDialogParent() ); - if ( aBox.Execute() != RET_YES ) + VclPtr aBox(new ScReplaceWarnBox( pDocSh->GetActiveDialogParent() )); + if ( aBox->Execute() != RET_YES ) { return false; } diff --git a/sc/source/ui/drawfunc/fuins1.cxx b/sc/source/ui/drawfunc/fuins1.cxx index d53741d617e9..ebdd0c991625 100644 --- a/sc/source/ui/drawfunc/fuins1.cxx +++ b/sc/source/ui/drawfunc/fuins1.cxx @@ -271,8 +271,8 @@ FuInsertGraphic::FuInsertGraphic( ScTabViewShell* pViewSh, // really store as link only? if( bAsLink && SvtMiscOptions().ShowLinkWarningDialog() ) { - SvxLinkWarningDialog aWarnDlg(pWin,aFileName); - if( aWarnDlg.Execute() != RET_OK ) + VclPtr aWarnDlg(new SvxLinkWarningDialog(pWin,aFileName)); + if( aWarnDlg->Execute() != RET_OK ) bAsLink = false; // don't store as link } diff --git a/sc/source/ui/drawfunc/graphsh.cxx b/sc/source/ui/drawfunc/graphsh.cxx index b98f92be1f57..85793b131008 100644 --- a/sc/source/ui/drawfunc/graphsh.cxx +++ b/sc/source/ui/drawfunc/graphsh.cxx @@ -200,10 +200,10 @@ void ScGraphicShell::ExecuteCompressGraphic( SfxRequest& ) if( pObj && pObj->ISA( SdrGrafObj ) && static_cast(pObj)->GetGraphicType() == GRAPHIC_BITMAP ) { SdrGrafObj* pGraphicObj = static_cast(pObj); - CompressGraphicsDialog dialog( GetViewData()->GetDialogParent(), pGraphicObj, GetViewData()->GetBindings() ); - if ( dialog.Execute() == RET_OK ) + VclPtr dialog(new CompressGraphicsDialog( GetViewData()->GetDialogParent(), pGraphicObj, GetViewData()->GetBindings() ) ); + if ( dialog->Execute() == RET_OK ) { - SdrGrafObj* pNewObject = dialog.GetCompressedSdrGrafObj(); + SdrGrafObj* pNewObject = dialog->GetCompressedSdrGrafObj(); SdrPageView* pPageView = pView->GetSdrPageView(); OUString aUndoString = pView->GetDescriptionOfMarkedObjects() + " Compress"; pView->BegUndo( aUndoString ); diff --git a/sc/source/ui/miscdlgs/optsolver.cxx b/sc/source/ui/miscdlgs/optsolver.cxx index e65e0cbae03b..f55c8674950b 100644 --- a/sc/source/ui/miscdlgs/optsolver.cxx +++ b/sc/source/ui/miscdlgs/optsolver.cxx @@ -768,15 +768,15 @@ bool ScOptSolverDlg::CallSolver() // return true -> close dialog after cal { // show progress dialog - ScSolverProgressDialog aProgress( this ); + VclPtr aProgress(new ScSolverProgressDialog( this ) ); sal_Int32 nTimeout = 0; if ( FindTimeout( nTimeout ) ) - aProgress.SetTimeLimit( nTimeout ); + aProgress->SetTimeLimit( nTimeout ); else - aProgress.HideTimeLimit(); - aProgress.Show(); - aProgress.Update(); - aProgress.Sync(); + aProgress->HideTimeLimit(); + aProgress->Show(); + aProgress->Update(); + aProgress->Sync(); // try to make sure the progress dialog is painted before continuing Application::Reschedule(true); @@ -967,7 +967,7 @@ bool ScOptSolverDlg::CallSolver() // return true -> close dialog after cal xSolver->solve(); bool bSuccess = xSolver->getSuccess(); - aProgress.Hide(); + aProgress->Hide(); bool bClose = false; bool bRestore = true; // restore old values unless a solution is accepted if ( bSuccess ) @@ -993,8 +993,8 @@ bool ScOptSolverDlg::CallSolver() // return true -> close dialog after cal static_cast(aObjective.Column), static_cast(aObjective.Row), static_cast(aObjective.Sheet)); - ScSolverSuccessDialog aDialog( this, aResultStr ); - if ( aDialog.Execute() == RET_OK ) + VclPtr aDialog(new ScSolverSuccessDialog( this, aResultStr ) ); + if ( aDialog->Execute() == RET_OK ) { // keep results and close dialog bRestore = false; @@ -1007,8 +1007,8 @@ bool ScOptSolverDlg::CallSolver() // return true -> close dialog after cal uno::Reference xDesc( xSolver, uno::UNO_QUERY ); if ( xDesc.is() ) aError = xDesc->getStatusDescription(); // error description from component - ScSolverNoSolutionDialog aDialog( this, aError ); - aDialog.Execute(); + VclPtr aDialog(new ScSolverNoSolutionDialog( this, aError ) ); + aDialog->Execute(); } if ( bRestore ) // restore old values diff --git a/sc/source/ui/miscdlgs/retypepassdlg.cxx b/sc/source/ui/miscdlgs/retypepassdlg.cxx index d804ea16a353..df764de6436c 100644 --- a/sc/source/ui/miscdlgs/retypepassdlg.cxx +++ b/sc/source/ui/miscdlgs/retypepassdlg.cxx @@ -283,11 +283,11 @@ IMPL_LINK( ScRetypePassDlg, RetypeBtnHdl, PushButton*, pBtn ) // What the ... !? return 0; - ScRetypePassInputDlg aDlg(this, pProtected); - if (aDlg.Execute() == RET_OK) + VclPtr aDlg(new ScRetypePassInputDlg(this, pProtected)); + if (aDlg->Execute() == RET_OK) { // OK is pressed. Update the protected item. - if (aDlg.IsRemovePassword()) + if (aDlg->IsRemovePassword()) { // Remove password from this item. pProtected->setPassword(OUString()); @@ -295,7 +295,7 @@ IMPL_LINK( ScRetypePassDlg, RetypeBtnHdl, PushButton*, pBtn ) else { // Set a new password. - OUString aNewPass = aDlg.GetNewPassword(); + OUString aNewPass = aDlg->GetNewPassword(); pProtected->setPassword(aNewPass); } diff --git a/sc/source/ui/miscdlgs/solveroptions.cxx b/sc/source/ui/miscdlgs/solveroptions.cxx index b23c275b7c81..6e5660c4c0f5 100644 --- a/sc/source/ui/miscdlgs/solveroptions.cxx +++ b/sc/source/ui/miscdlgs/solveroptions.cxx @@ -314,23 +314,23 @@ void ScSolverOptionsDialog::EditOption() { if ( pStringItem->IsDouble() ) { - ScSolverValueDialog aValDialog( this ); - aValDialog.SetOptionName( pStringItem->GetText() ); - aValDialog.SetValue( pStringItem->GetDoubleValue() ); - if ( aValDialog.Execute() == RET_OK ) + VclPtr aValDialog(new ScSolverValueDialog( this )); + aValDialog->SetOptionName( pStringItem->GetText() ); + aValDialog->SetValue( pStringItem->GetDoubleValue() ); + if ( aValDialog->Execute() == RET_OK ) { - pStringItem->SetDoubleValue( aValDialog.GetValue() ); + pStringItem->SetDoubleValue( aValDialog->GetValue() ); m_pLbSettings->InvalidateEntry( pEntry ); } } else { - ScSolverIntegerDialog aIntDialog( this ); - aIntDialog.SetOptionName( pStringItem->GetText() ); - aIntDialog.SetValue( pStringItem->GetIntValue() ); - if ( aIntDialog.Execute() == RET_OK ) + VclPtr aIntDialog(new ScSolverIntegerDialog( this )); + aIntDialog->SetOptionName( pStringItem->GetText() ); + aIntDialog->SetValue( pStringItem->GetIntValue() ); + if ( aIntDialog->Execute() == RET_OK ) { - pStringItem->SetIntValue( aIntDialog.GetValue() ); + pStringItem->SetIntValue( aIntDialog->GetValue() ); m_pLbSettings->InvalidateEntry( pEntry ); } } diff --git a/sc/source/ui/optdlg/tpformula.cxx b/sc/source/ui/optdlg/tpformula.cxx index a1c40ce1107f..325cad6b50a5 100644 --- a/sc/source/ui/optdlg/tpformula.cxx +++ b/sc/source/ui/optdlg/tpformula.cxx @@ -122,10 +122,10 @@ void ScTpFormulaOptions::UpdateCustomCalcRadioButtons(bool bDefault) void ScTpFormulaOptions::LaunchCustomCalcSettings() { - ScCalcOptionsDialog aDlg(this, maCurrentConfig); - if (aDlg.Execute() == RET_OK) + VclPtr aDlg(new ScCalcOptionsDialog(this, maCurrentConfig)); + if (aDlg->Execute() == RET_OK) { - maCurrentConfig = aDlg.GetConfig(); + maCurrentConfig = aDlg->GetConfig(); } } diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx index 2fb91e4df0d8..9f6486dded5e 100644 --- a/sc/source/ui/view/cellsh1.cxx +++ b/sc/source/ui/view/cellsh1.cxx @@ -1960,9 +1960,9 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) if(!pCondFormatDlg && bContainsExistingCondFormat) { - QueryBox aBox( pTabViewShell->GetDialogParent(), WinBits( WB_YES_NO | WB_DEF_YES ), - ScGlobal::GetRscString(STR_EDIT_EXISTING_COND_FORMATS) ); - bool bEditExisting = aBox.Execute() == RET_YES; + VclPtr aBox(new QueryBox( pTabViewShell->GetDialogParent(), WinBits( WB_YES_NO | WB_DEF_YES ), + ScGlobal::GetRscString(STR_EDIT_EXISTING_COND_FORMATS) ) ); + bool bEditExisting = aBox->Execute() == RET_YES; if(bEditExisting) { // differentiate between ranges where one conditional format is defined @@ -2652,10 +2652,10 @@ void ScCellShell::ExecuteDataPilotDialog() { // confirm selection if it contains SubTotal cells - QueryBox aBox( pTabViewShell->GetDialogParent(), + VclPtr aBox(new QueryBox( pTabViewShell->GetDialogParent(), WinBits(WB_YES_NO | WB_DEF_YES), - ScGlobal::GetRscString(STR_DATAPILOT_SUBTOTAL) ); - if (aBox.Execute() == RET_NO) + ScGlobal::GetRscString(STR_DATAPILOT_SUBTOTAL) ) ); + if (aBox->Execute() == RET_NO) bOK = false; } if (bOK) @@ -2682,8 +2682,8 @@ void ScCellShell::ExecuteDataPilotDialog() if (nSrcErrorId) { // Error occurred during data creation. Launch an error and bail out. - InfoBox aBox(pTabViewShell->GetDialogParent(), ScGlobal::GetRscString(nSrcErrorId)); - aBox.Execute(); + VclPtr aBox(new InfoBox(pTabViewShell->GetDialogParent(), ScGlobal::GetRscString(nSrcErrorId))); + aBox->Execute(); return; } diff --git a/sc/source/ui/view/cellsh2.cxx b/sc/source/ui/view/cellsh2.cxx index 6e5bf8889827..89a92c84ff18 100644 --- a/sc/source/ui/view/cellsh2.cxx +++ b/sc/source/ui/view/cellsh2.cxx @@ -740,15 +740,15 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq ) break; case SID_DATA_STREAMS: { - sc::DataStreamDlg aDialog( GetViewData()->GetDocShell(), pTabViewShell->GetDialogParent() ); + VclPtr aDialog(new sc::DataStreamDlg( GetViewData()->GetDocShell(), pTabViewShell->GetDialogParent() ) ); ScDocument *pDoc = GetViewData()->GetDocument(); sc::DocumentLinkManager& rMgr = pDoc->GetDocLinkManager(); sc::DataStream* pStrm = rMgr.getDataStream(); if (pStrm) - aDialog.Init(*pStrm); + aDialog->Init(*pStrm); - if (aDialog.Execute() == RET_OK) - aDialog.StartStream(); + if (aDialog->Execute() == RET_OK) + aDialog->StartStream(); } break; case SID_DATA_STREAMS_PLAY: diff --git a/sc/source/ui/view/cellsh3.cxx b/sc/source/ui/view/cellsh3.cxx index a30253474e15..30176f887f8d 100644 --- a/sc/source/ui/view/cellsh3.cxx +++ b/sc/source/ui/view/cellsh3.cxx @@ -422,9 +422,9 @@ void ScCellShell::Execute( SfxRequest& rReq ) } else if( ! rReq.IsAPI() ) { - MessageDialog aErrorBox(pTabViewShell->GetDialogParent(), - ScGlobal::GetRscString(STR_NOAREASELECTED)); - aErrorBox.Execute(); + VclPtr aErrorBox(new MessageDialog(pTabViewShell->GetDialogParent(), + ScGlobal::GetRscString(STR_NOAREASELECTED))); + aErrorBox->Execute(); } } else diff --git a/sc/source/ui/view/dbfunc.cxx b/sc/source/ui/view/dbfunc.cxx index b2099de5cb7b..bf5fd6495c8d 100644 --- a/sc/source/ui/view/dbfunc.cxx +++ b/sc/source/ui/view/dbfunc.cxx @@ -383,9 +383,9 @@ void ScDBFunc::ToggleAutoFilter() } else { - MessageDialog aErrorBox(GetViewData().GetDialogParent(), - ScGlobal::GetRscString(STR_ERR_AUTOFILTER)); - aErrorBox.Execute(); + VclPtr aErrorBox(new MessageDialog(GetViewData().GetDialogParent(), + ScGlobal::GetRscString(STR_ERR_AUTOFILTER))); + aErrorBox->Execute(); } } diff --git a/sc/source/ui/view/spelleng.cxx b/sc/source/ui/view/spelleng.cxx index ad7e6bc54b1e..2d39db2468b5 100644 --- a/sc/source/ui/view/spelleng.cxx +++ b/sc/source/ui/view/spelleng.cxx @@ -305,10 +305,10 @@ bool ScSpellingEngine::ShowTableWrapDialog() { vcl::Window* pParent = GetDialogParent(); ScWaitCursorOff aWaitOff( pParent ); - MessBox aMsgBox( pParent, WinBits( WB_YES_NO | WB_DEF_YES ), + VclPtr aMsgBox(new MessBox( pParent, WinBits( WB_YES_NO | WB_DEF_YES ), ScGlobal::GetRscString( STR_MSSG_DOSUBTOTALS_0 ), - ScGlobal::GetRscString( STR_SPELLING_BEGIN_TAB) ); - return aMsgBox.Execute() == RET_YES; + ScGlobal::GetRscString( STR_SPELLING_BEGIN_TAB) ) ); + return aMsgBox->Execute() == RET_YES; } void ScSpellingEngine::ShowFinishDialog() diff --git a/sc/source/ui/view/tabview2.cxx b/sc/source/ui/view/tabview2.cxx index fc9b1a892abd..9f10ad20c4d0 100644 --- a/sc/source/ui/view/tabview2.cxx +++ b/sc/source/ui/view/tabview2.cxx @@ -1422,8 +1422,8 @@ void ScTabView::ErrorMessage( sal_uInt16 nGlobStrId ) } } - InfoBox aBox( pParent, ScGlobal::GetRscString( nGlobStrId ) ); - aBox.Execute(); + VclPtr aBox(new InfoBox( pParent, ScGlobal::GetRscString( nGlobStrId ) ) ); + aBox->Execute(); if (bFocus) pParent->GrabFocus(); } diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx index 4b21f410f989..8b0ce278d5b9 100644 --- a/sc/source/ui/view/viewfun2.cxx +++ b/sc/source/ui/view/viewfun2.cxx @@ -1074,11 +1074,11 @@ bool ScViewFunc::MergeCells( bool bApi, bool& rDoContents, bool bRecord, bool bC { if (!bApi) { - MessBox aBox( GetViewData().GetDialogParent(), + VclPtr aBox(new MessBox( GetViewData().GetDialogParent(), WinBits(WB_YES_NO_CANCEL | WB_DEF_NO), ScGlobal::GetRscString( STR_MSSG_DOSUBTOTALS_0 ), - ScGlobal::GetRscString( STR_MERGE_NOTEMPTY ) ); - sal_uInt16 nRetVal = aBox.Execute(); + ScGlobal::GetRscString( STR_MERGE_NOTEMPTY ) ) ); + sal_uInt16 nRetVal = aBox->Execute(); if ( nRetVal == RET_YES ) rDoContents = true; @@ -1771,10 +1771,10 @@ void ScViewFunc::Solve( const ScSolveParam& rParam ) aMsgStr += ScGlobal::GetRscString( STR_MSSG_SOLVE_4 ); } - MessBox aBox( GetViewData().GetDialogParent(), + VclPtr aBox(new MessBox( GetViewData().GetDialogParent(), WinBits(WB_YES_NO | WB_DEF_NO), - ScGlobal::GetRscString( STR_MSSG_DOSUBTOTALS_0 ), aMsgStr ); - sal_uInt16 nRetVal = aBox.Execute(); + ScGlobal::GetRscString( STR_MSSG_DOSUBTOTALS_0 ), aMsgStr ) ); + sal_uInt16 nRetVal = aBox->Execute(); if ( RET_YES == nRetVal ) EnterValue( nDestCol, nDestRow, nDestTab, nSolveResult ); diff --git a/sc/source/ui/view/viewfun3.cxx b/sc/source/ui/view/viewfun3.cxx index 992e480dd22e..0fa755d073b2 100644 --- a/sc/source/ui/view/viewfun3.cxx +++ b/sc/source/ui/view/viewfun3.cxx @@ -832,8 +832,8 @@ bool checkDestRangeForOverwrite(const ScRangeList& rDestRanges, const ScDocument if (!bIsEmpty) { - ScReplaceWarnBox aBox(pParentWnd); - if (aBox.Execute() != RET_YES) + VclPtr aBox(new ScReplaceWarnBox(pParentWnd)); + if (aBox->Execute() != RET_YES) { // changing the configuration is within the ScReplaceWarnBox return false; @@ -1041,9 +1041,9 @@ bool ScViewFunc::PasteFromClip( InsertDeleteFlags nFlags, ScDocument* pClipDoc, { ScWaitCursorOff aWaitOff( GetFrameWin() ); OUString aMessage = ScGlobal::GetRscString( STR_PASTE_BIGGER ); - QueryBox aBox( GetViewData().GetDialogParent(), - WinBits(WB_YES_NO | WB_DEF_NO), aMessage ); - if ( aBox.Execute() != RET_YES ) + VclPtr aBox(new QueryBox( GetViewData().GetDialogParent(), + WinBits(WB_YES_NO | WB_DEF_NO), aMessage ) ); + if ( aBox->Execute() != RET_YES ) { return false; } diff --git a/sc/source/ui/view/viewfun4.cxx b/sc/source/ui/view/viewfun4.cxx index 0317fa4d7201..9d6660137206 100644 --- a/sc/source/ui/view/viewfun4.cxx +++ b/sc/source/ui/view/viewfun4.cxx @@ -99,8 +99,8 @@ void ScViewFunc::PasteRTF( SCCOL nStartCol, SCROW nStartRow, if (pActWin) { pEngine->SetPaperSize(Size(100000,100000)); - vcl::Window aWin( pActWin ); - EditView aEditView( pEngine.get(), &aWin ); + VclPtr aWin(new vcl::Window( pActWin )); + EditView aEditView( pEngine.get(), aWin.get() ); aEditView.SetOutputArea(Rectangle(0,0,100000,100000)); // same method now for clipboard or drag&drop @@ -387,8 +387,8 @@ void ScViewFunc::DoThesaurus( bool bRecord ) LanguageType eLnge = ScViewUtil::GetEffLanguage( &rDoc, ScAddress( nCol, nRow, nTab ) ); OUString aErr = SvtLanguageTable::GetLanguageString(eLnge); aErr += ScGlobal::GetRscString( STR_SPELLING_NO_LANG ); - InfoBox aBox( GetViewData().GetDialogParent(), aErr ); - aBox.Execute(); + VclPtr aBox(new InfoBox( GetViewData().GetDialogParent(), aErr ) ); + aBox->Execute(); } if (pThesaurusEngine->IsModified()) { diff --git a/sd/source/core/drawdoc3.cxx b/sd/source/core/drawdoc3.cxx index ee8739610b64..83e318db5ed8 100644 --- a/sd/source/core/drawdoc3.cxx +++ b/sd/source/core/drawdoc3.cxx @@ -242,8 +242,8 @@ SdDrawDocument* SdDrawDocument::OpenBookmarkDoc(SfxMedium& rMedium) if (!bOK) { - MessageDialog aErrorBox(NULL, SD_RESSTR(STR_READ_DATA_ERROR)); - aErrorBox.Execute(); + VclPtr aErrorBox(new MessageDialog(NULL, SD_RESSTR(STR_READ_DATA_ERROR))); + aErrorBox->Execute(); CloseBookmarkDoc(); pBookmarkDoc = NULL; diff --git a/sd/source/filter/grf/sdgrffilter.cxx b/sd/source/filter/grf/sdgrffilter.cxx index 727fba485427..4127f74feb6e 100644 --- a/sd/source/filter/grf/sdgrffilter.cxx +++ b/sd/source/filter/grf/sdgrffilter.cxx @@ -169,8 +169,8 @@ void SdGRFFilter::HandleGraphicFilterError( sal_uInt16 nFilterError, sal_uLong n ErrorHandler::HandleError( ERRCODE_IO_GENERAL ); else { - MessageDialog aErrorBox(NULL, SD_RESSTR(nId)); - aErrorBox.Execute(); + VclPtr aErrorBox(new MessageDialog(NULL, SD_RESSTR(nId))); + aErrorBox->Execute(); } } diff --git a/sd/source/filter/html/htmlex.cxx b/sd/source/filter/html/htmlex.cxx index bd2757718b39..c592a42d3ec0 100644 --- a/sd/source/filter/html/htmlex.cxx +++ b/sd/source/filter/html/htmlex.cxx @@ -3113,9 +3113,9 @@ bool HtmlExport::checkForExistingFiles() OUString aSystemPath; osl::FileBase::getSystemPathFromFileURL( maExportPath, aSystemPath ); aMsg = aMsg.replaceFirst( "%FILENAME", aSystemPath ); - WarningBox aWarning( 0, WB_YES_NO | WB_DEF_YES, aMsg ); - aWarning.SetImage( WarningBox::GetStandardImage() ); - bFound = ( RET_NO == aWarning.Execute() ); + VclPtr aWarning(new WarningBox( 0, WB_YES_NO | WB_DEF_YES, aMsg )); + aWarning->SetImage( WarningBox::GetStandardImage() ); + bFound = ( RET_NO == aWarning->Execute() ); delete pResMgr; } diff --git a/sd/source/filter/html/pubdlg.cxx b/sd/source/filter/html/pubdlg.cxx index 7edbf1200514..4a36503c83b2 100644 --- a/sd/source/filter/html/pubdlg.cxx +++ b/sd/source/filter/html/pubdlg.cxx @@ -1072,11 +1072,11 @@ IMPL_LINK_NOARG(SdPublishingDlg, FinishHdl) { bRetry = false; - SdDesignNameDlg aDlg(this, aName ); + VclPtr aDlg(new SdDesignNameDlg(this, aName )); - if ( aDlg.Execute() == RET_OK ) + if ( aDlg->Execute() == RET_OK ) { - pDesign->m_aDesignName = aDlg.GetDesignName(); + pDesign->m_aDesignName = aDlg->GetDesignName(); boost::ptr_vector::iterator iter; for (iter = m_aDesignList.begin(); iter != m_aDesignList.end(); ++iter) @@ -1087,9 +1087,9 @@ IMPL_LINK_NOARG(SdPublishingDlg, FinishHdl) if (iter != m_aDesignList.end()) { - MessageDialog aErrorBox(this, SD_RESSTR(STR_PUBDLG_SAMENAME), - VCL_MESSAGE_ERROR, VCL_BUTTONS_YES_NO); - bRetry = aErrorBox.Execute() == RET_NO; + VclPtr aErrorBox(new MessageDialog(this, SD_RESSTR(STR_PUBDLG_SAMENAME), + VCL_MESSAGE_ERROR, VCL_BUTTONS_YES_NO)); + bRetry = aErrorBox->Execute() == RET_NO; if(!bRetry) m_aDesignList.erase(iter); diff --git a/sd/source/ui/animations/CustomAnimationDialog.cxx b/sd/source/ui/animations/CustomAnimationDialog.cxx index fd21601d8665..c5e3a2e6b2c4 100644 --- a/sd/source/ui/animations/CustomAnimationDialog.cxx +++ b/sd/source/ui/animations/CustomAnimationDialog.cxx @@ -1524,9 +1524,9 @@ void CustomAnimationEffectTabPage::openSoundFileDialog() { OUString aStrWarning(SD_RESSTR(STR_WARNING_NOSOUNDFILE)); aStrWarning = aStrWarning.replaceFirst("%", aFile); - WarningBox aWarningBox( NULL, WB_3DLOOK | WB_RETRY_CANCEL, aStrWarning ); - aWarningBox.SetModalInputMode (true); - bQuitLoop = aWarningBox.Execute()==RET_RETRY ? sal_False : sal_True; + VclPtr aWarningBox(new WarningBox( NULL, WB_3DLOOK | WB_RETRY_CANCEL, aStrWarning )); + aWarningBox->SetModalInputMode (true); + bQuitLoop = aWarningBox->Execute() != RET_RETRY; bValidSoundFile=false; } diff --git a/sd/source/ui/animations/SlideTransitionPane.cxx b/sd/source/ui/animations/SlideTransitionPane.cxx index a58a444048e1..5d5682bb3363 100644 --- a/sd/source/ui/animations/SlideTransitionPane.cxx +++ b/sd/source/ui/animations/SlideTransitionPane.cxx @@ -730,9 +730,9 @@ void SlideTransitionPane::openSoundFileDialog() { OUString aStrWarning(SD_RESSTR(STR_WARNING_NOSOUNDFILE)); aStrWarning = aStrWarning.replaceFirst("%", aFile); - WarningBox aWarningBox( NULL, WB_3DLOOK | WB_RETRY_CANCEL, aStrWarning ); - aWarningBox.SetModalInputMode (true); - bQuitLoop = (aWarningBox.Execute() != RET_RETRY); + VclPtr aWarningBox(new WarningBox( NULL, WB_3DLOOK | WB_RETRY_CANCEL, aStrWarning )); + aWarningBox->SetModalInputMode (true); + bQuitLoop = (aWarningBox->Execute() != RET_RETRY); bValidSoundFile = false; } diff --git a/sd/source/ui/annotations/annotationmanager.cxx b/sd/source/ui/annotations/annotationmanager.cxx index cbbbc345c59b..09887ec32a94 100644 --- a/sd/source/ui/annotations/annotationmanager.cxx +++ b/sd/source/ui/annotations/annotationmanager.cxx @@ -694,10 +694,9 @@ void AnnotationManagerImpl::SelectNextAnnotation(bool bForeward) // Pop up question box that asks the user whether to wrap around. // The dialog is made modal with respect to the whole application. - QueryBox aQuestionBox ( NULL, (WB_YES_NO | WB_DEF_YES), SD_RESSTR(nStringId)); - aQuestionBox.SetImage (QueryBox::GetStandardImage()); - short nBoxResult = aQuestionBox.Execute(); - if (nBoxResult != RET_YES) + VclPtr aQuestionBox (new QueryBox( NULL, (WB_YES_NO | WB_DEF_YES), SD_RESSTR(nStringId))); + aQuestionBox->SetImage( QueryBox::GetStandardImage() ); + if (aQuestionBox->Execute() != RET_YES) break; } while( true ); diff --git a/sd/source/ui/dlg/LayerTabBar.cxx b/sd/source/ui/dlg/LayerTabBar.cxx index 98df417636ce..14b88f9ea422 100644 --- a/sd/source/ui/dlg/LayerTabBar.cxx +++ b/sd/source/ui/dlg/LayerTabBar.cxx @@ -203,9 +203,9 @@ TabBarAllowRenamingReturnCode LayerTabBar::AllowRenaming() (rLayerAdmin.GetLayer( aNewName, false ) && aLayerName != aNewName) ) { // Name already exists - WarningBox aWarningBox( &pDrViewSh->GetViewFrame()->GetWindow(), WinBits( WB_OK ), - SD_RESSTR( STR_WARN_NAME_DUPLICATE ) ); - aWarningBox.Execute(); + VclPtr aWarningBox(new WarningBox( &pDrViewSh->GetViewFrame()->GetWindow(), WinBits( WB_OK ), + SD_RESSTR( STR_WARN_NAME_DUPLICATE ) )); + aWarningBox->Execute(); bOK = false; } diff --git a/sd/source/ui/dlg/PhotoAlbumDialog.cxx b/sd/source/ui/dlg/PhotoAlbumDialog.cxx index a3da722b97e5..4d75e6c8142c 100644 --- a/sd/source/ui/dlg/PhotoAlbumDialog.cxx +++ b/sd/source/ui/dlg/PhotoAlbumDialog.cxx @@ -88,8 +88,8 @@ IMPL_LINK_NOARG(SdPhotoAlbumDialog, CreateHdl) { if (pImagesLst->GetEntryCount() == 0) { - WarningBox aWarning(this, WB_OK, SD_RESSTR(STR_PHOTO_ALBUM_EMPTY_WARNING)); - aWarning.Execute(); + VclPtr aWarning(new WarningBox(this, WB_OK, SD_RESSTR(STR_PHOTO_ALBUM_EMPTY_WARNING))); + aWarning->Execute(); } else { @@ -445,8 +445,8 @@ IMPL_LINK_NOARG(SdPhotoAlbumDialog, CreateHdl) } else { - InfoBox aInfo(this, OUString("Function is not implemented!")); - aInfo.Execute(); + VclPtr aInfo(new InfoBox(this, OUString("Function is not implemented!"))); + aInfo->Execute(); } EndDialog(); return 0; diff --git a/sd/source/ui/dlg/animobjs.cxx b/sd/source/ui/dlg/animobjs.cxx index 2be1601d3c67..a84cfd9d0ddd 100644 --- a/sd/source/ui/dlg/animobjs.cxx +++ b/sd/source/ui/dlg/animobjs.cxx @@ -437,8 +437,8 @@ IMPL_LINK( AnimationWindow, ClickRemoveBitmapHdl, void *, pBtn ) } else // delete everything { - WarningBox aWarnBox( this, WB_YES_NO, SD_RESSTR( STR_ASK_DELETE_ALL_PICTURES ) ); - short nReturn = aWarnBox.Execute(); + VclPtr aWarnBox(new WarningBox( this, WB_YES_NO, SD_RESSTR( STR_ASK_DELETE_ALL_PICTURES ) )); + short nReturn = aWarnBox->Execute(); if( nReturn == RET_YES ) { diff --git a/sd/source/ui/dlg/brkdlg.cxx b/sd/source/ui/dlg/brkdlg.cxx index e36c5648c987..92c83eac13c7 100644 --- a/sd/source/ui/dlg/brkdlg.cxx +++ b/sd/source/ui/dlg/brkdlg.cxx @@ -99,8 +99,8 @@ IMPL_LINK( BreakDlg, UpDate, void*, nInit ) // update status bar or show a error message? if(nInit == reinterpret_cast(1L)) { - MessageDialog aErrBox(this, SD_RESSTR(STR_BREAK_FAIL)); - aErrBox.Execute(); + VclPtr aErrBox(new MessageDialog(this, SD_RESSTR(STR_BREAK_FAIL))); + aErrBox->Execute(); } else { diff --git a/sd/source/ui/dlg/custsdlg.cxx b/sd/source/ui/dlg/custsdlg.cxx index d1c023e9b387..8cfd56d0a583 100644 --- a/sd/source/ui/dlg/custsdlg.cxx +++ b/sd/source/ui/dlg/custsdlg.cxx @@ -111,8 +111,8 @@ IMPL_LINK( SdCustomShowDlg, ClickButtonHdl, void *, p ) if( p == m_pBtnNew ) { pCustomShow = NULL; - SdDefineCustomShowDlg aDlg( this, rDoc, pCustomShow ); - if( aDlg.Execute() == RET_OK ) + VclPtr aDlg(new SdDefineCustomShowDlg( this, rDoc, pCustomShow )); + if( aDlg->Execute() == RET_OK ) { if( pCustomShow ) { @@ -125,7 +125,7 @@ IMPL_LINK( SdCustomShowDlg, ClickButtonHdl, void *, p ) m_pLbCustomShows->SelectEntry( pCustomShow->GetName() ); } - if( aDlg.IsModified() ) + if( aDlg->IsModified() ) bModified = true; } else if( pCustomShow ) @@ -139,9 +139,9 @@ IMPL_LINK( SdCustomShowDlg, ClickButtonHdl, void *, p ) { DBG_ASSERT( pCustomShowList, "pCustomShowList does not exist" ); pCustomShow = (*pCustomShowList)[ nPos ]; - SdDefineCustomShowDlg aDlg( this, rDoc, pCustomShow ); + VclPtr aDlg(new SdDefineCustomShowDlg( this, rDoc, pCustomShow )); - if( aDlg.Execute() == RET_OK ) + if( aDlg->Execute() == RET_OK ) { if( pCustomShow ) { @@ -151,7 +151,7 @@ IMPL_LINK( SdCustomShowDlg, ClickButtonHdl, void *, p ) m_pLbCustomShows->InsertEntry( pCustomShow->GetName(), nPos ); m_pLbCustomShows->SelectEntryPos( nPos ); } - if( aDlg.IsModified() ) + if( aDlg->IsModified() ) bModified = true; } } diff --git a/sd/source/ui/dlg/sdtreelb.cxx b/sd/source/ui/dlg/sdtreelb.cxx index 4b8d11f6728f..184cc15081d8 100644 --- a/sd/source/ui/dlg/sdtreelb.cxx +++ b/sd/source/ui/dlg/sdtreelb.cxx @@ -1010,8 +1010,8 @@ SdDrawDocument* SdPageObjsTLB::GetBookmarkDoc(SfxMedium* pMed) if ( !mpBookmarkDoc ) { - MessageDialog aErrorBox(this, SD_RESSTR(STR_READ_DATA_ERROR)); - aErrorBox.Execute(); + VclPtr aErrorBox(new MessageDialog(this, SD_RESSTR(STR_READ_DATA_ERROR))); + aErrorBox->Execute(); mpMedium = 0; //On failure the SfxMedium is invalid } } diff --git a/sd/source/ui/dlg/tpoption.cxx b/sd/source/ui/dlg/tpoption.cxx index 9065e1ebe922..6383700d0bb7 100644 --- a/sd/source/ui/dlg/tpoption.cxx +++ b/sd/source/ui/dlg/tpoption.cxx @@ -331,10 +331,9 @@ int SdTpOptionsMisc::DeactivatePage( SfxItemSet* pActiveSet ) FillItemSet( pActiveSet ); return LEAVE_PAGE; } - WarningBox aWarnBox( GetParent(), WB_YES_NO, SD_RESSTR( STR_WARN_SCALE_FAIL ) ); - short nReturn = aWarnBox.Execute(); + VclPtr aWarnBox(new WarningBox( GetParent(), WB_YES_NO, SD_RESSTR( STR_WARN_SCALE_FAIL ) )); - if( nReturn == RET_YES ) + if( aWarnBox->Execute() == RET_YES ) return KEEP_PAGE; if( pActiveSet ) diff --git a/sd/source/ui/func/fuinsert.cxx b/sd/source/ui/func/fuinsert.cxx index bd21323f0984..d47f025ff538 100644 --- a/sd/source/ui/func/fuinsert.cxx +++ b/sd/source/ui/func/fuinsert.cxx @@ -151,8 +151,8 @@ void FuInsertGraphic::DoExecute( SfxRequest& ) // really store as link only? if( SvtMiscOptions().ShowLinkWarningDialog() ) { - SvxLinkWarningDialog aWarnDlg(mpWindow,aDlg.GetPath()); - if( aWarnDlg.Execute() != RET_OK ) + VclPtr aWarnDlg(new SvxLinkWarningDialog(mpWindow,aDlg.GetPath())); + if( aWarnDlg->Execute() != RET_OK ) return; // don't store as link } diff --git a/sd/source/ui/func/fuinsfil.cxx b/sd/source/ui/func/fuinsfil.cxx index d368f96f4894..e47b22a797de 100644 --- a/sd/source/ui/func/fuinsfil.cxx +++ b/sd/source/ui/func/fuinsfil.cxx @@ -281,8 +281,8 @@ void FuInsertFile::DoExecute( SfxRequest& rReq ) if( !bInserted ) { - MessageDialog aErrorBox(mpWindow, SD_RESSTR( STR_READ_DATA_ERROR)); - aErrorBox.Execute(); + VclPtr aErrorBox(new MessageDialog(mpWindow, SD_RESSTR( STR_READ_DATA_ERROR))); + aErrorBox->Execute(); delete pMedium; } } @@ -431,8 +431,8 @@ void FuInsertFile::InsTextOrRTFinDrMode(SfxMedium* pMedium) if (nErr || pOutliner->GetEditEngine().GetText().isEmpty()) { - MessageDialog aErrorBox(mpWindow, SD_RESSTR(STR_READ_DATA_ERROR)); - aErrorBox.Execute(); + VclPtr aErrorBox(new MessageDialog(mpWindow, SD_RESSTR(STR_READ_DATA_ERROR))); + aErrorBox->Execute(); } else { @@ -575,8 +575,8 @@ void FuInsertFile::InsTextOrRTFinOlMode(SfxMedium* pMedium) if (nErr || pOutliner->GetEditEngine().GetText().isEmpty()) { - MessageDialog aErrorBox(mpWindow, SD_RESSTR(STR_READ_DATA_ERROR)); - aErrorBox.Execute(); + VclPtr aErrorBox(new MessageDialog(mpWindow, SD_RESSTR(STR_READ_DATA_ERROR))); + aErrorBox->Execute(); } else { diff --git a/sd/source/ui/func/fulinend.cxx b/sd/source/ui/func/fulinend.cxx index e8f441cc7398..cc94ac446bff 100644 --- a/sd/source/ui/func/fulinend.cxx +++ b/sd/source/ui/func/fulinend.cxx @@ -138,9 +138,9 @@ void FuLineEnd::DoExecute( SfxRequest& ) } else { - WarningBox aWarningBox( mpWindow, WinBits( WB_OK ), - SD_RESSTR( STR_WARN_NAME_DUPLICATE ) ); - aWarningBox.Execute(); + VclPtr aWarningBox(new WarningBox( mpWindow, WinBits( WB_OK ), + SD_RESSTR( STR_WARN_NAME_DUPLICATE ) ) ); + aWarningBox->Execute(); } } } diff --git a/sd/source/ui/func/fupage.cxx b/sd/source/ui/func/fupage.cxx index 8253ee54c6a8..670bbff5802b 100644 --- a/sd/source/ui/func/fupage.cxx +++ b/sd/source/ui/func/fupage.cxx @@ -351,13 +351,13 @@ const SfxItemSet* FuPage::ExecuteDialog( ::vcl::Window* pParent ) // notice-masterpage (at the moment) if( ePageKind != PK_NOTES ) { - MessBox aQuestionBox ( + VclPtr aQuestionBox (new MessBox( pParent, WB_YES_NO | WB_DEF_YES, SD_RESSTR(STR_PAGE_BACKGROUND_TITLE), - SD_RESSTR(STR_PAGE_BACKGROUND_TXT) ); - aQuestionBox.SetImage( QueryBox::GetStandardImage() ); - bSetToAllPages = ( RET_YES == aQuestionBox.Execute() ); + SD_RESSTR(STR_PAGE_BACKGROUND_TXT) ) ); + aQuestionBox->SetImage( QueryBox::GetStandardImage() ); + bSetToAllPages = ( RET_YES == aQuestionBox->Execute() ); } if( mbPageBckgrdDeleted ) diff --git a/sd/source/ui/slidesorter/controller/SlsClipboard.cxx b/sd/source/ui/slidesorter/controller/SlsClipboard.cxx index 1157b2973e3d..92a880853d19 100644 --- a/sd/source/ui/slidesorter/controller/SlsClipboard.cxx +++ b/sd/source/ui/slidesorter/controller/SlsClipboard.cxx @@ -287,11 +287,11 @@ sal_Int32 Clipboard::GetInsertionPosition (::vcl::Window* pWindow) else if (mrController.GetFocusManager().IsFocusShowing()) { // Use the focus to determine the insertion position. - SdInsertPasteDlg aDialog (pWindow); - if (aDialog.Execute() == RET_OK) + VclPtr aDialog (new SdInsertPasteDlg(pWindow)); + if (aDialog->Execute() == RET_OK) { nInsertPosition = mrController.GetFocusManager().GetFocusedPageIndex(); - if ( ! aDialog.IsInsertBefore()) + if ( ! aDialog->IsInsertBefore()) nInsertPosition ++; } } diff --git a/sd/source/ui/view/DocumentRenderer.cxx b/sd/source/ui/view/DocumentRenderer.cxx index b49fffc24a82..22a4e840be6c 100644 --- a/sd/source/ui/view/DocumentRenderer.cxx +++ b/sd/source/ui/view/DocumentRenderer.cxx @@ -1300,11 +1300,11 @@ public: // Show warning that the orientation could not be set. if (pViewShell) { - WarningBox aWarnBox( + VclPtr aWarnBox(new WarningBox( pViewShell->GetActiveWindow(), (WinBits)(WB_OK_CANCEL | WB_DEF_CANCEL), - SD_RESSTR(STR_WARN_PRINTFORMAT_FAILURE)); - if (aWarnBox.Execute() != RET_OK) + SD_RESSTR(STR_WARN_PRINTFORMAT_FAILURE))); + if (aWarnBox->Execute() != RET_OK) return; } } diff --git a/sd/source/ui/view/Outliner.cxx b/sd/source/ui/view/Outliner.cxx index 469d1f82905f..b46951154485 100644 --- a/sd/source/ui/view/Outliner.cxx +++ b/sd/source/ui/view/Outliner.cxx @@ -1068,9 +1068,9 @@ void Outliner::ShowEndOfSearchDialog (void) // Show the message in an info box that is modal with respect to the // whole application. - MessageDialog aInfoBox(NULL, aString, VCL_MESSAGE_INFO); + VclPtr aInfoBox(new MessageDialog(NULL, aString, VCL_MESSAGE_INFO)); - ShowModalMessageBox (aInfoBox); + ShowModalMessageBox (*aInfoBox.get()); mbWholeDocumentProcessed = true; } @@ -1109,12 +1109,12 @@ bool Outliner::ShowWrapArroundDialog (void) // Pop up question box that asks the user whether to wrap around. // The dialog is made modal with respect to the whole application. - QueryBox aQuestionBox ( + VclPtr aQuestionBox (new QueryBox( NULL, WB_YES_NO | WB_DEF_YES, - SD_RESSTR(nStringId)); - aQuestionBox.SetImage (QueryBox::GetStandardImage()); - sal_uInt16 nBoxResult = ShowModalMessageBox(aQuestionBox); + SD_RESSTR(nStringId))); + aQuestionBox->SetImage (QueryBox::GetStandardImage()); + sal_uInt16 nBoxResult = ShowModalMessageBox(*aQuestionBox.get()); bDoWrapArround = (nBoxResult == RET_YES); } @@ -1157,9 +1157,9 @@ void Outliner::PrepareSpellCheck (void) { mbError = true; mbEndOfSearch = true; - MessageDialog aErrorBox (NULL, - SD_RESSTR(STR_NOLANGUAGE)); - ShowModalMessageBox (aErrorBox); + VclPtr aErrorBox (new MessageDialog(NULL, + SD_RESSTR(STR_NOLANGUAGE))); + ShowModalMessageBox (*aErrorBox.get()); } else if (eState != EE_SPELL_OK) { @@ -1376,8 +1376,8 @@ bool Outliner::HandleFailedSearch (void) if (HasNoPreviousMatch ()) { // No match found in the whole presentation. Tell the user. - InfoBox aInfoBox (NULL, SD_RESSTR(STR_SAR_NOT_FOUND)); - ShowModalMessageBox (aInfoBox); + VclPtr aInfoBox (new InfoBox(NULL, SD_RESSTR(STR_SAR_NOT_FOUND))); + ShowModalMessageBox (*aInfoBox.get()); } else diff --git a/sd/source/ui/view/ViewShellBase.cxx b/sd/source/ui/view/ViewShellBase.cxx index c0ab66f3f210..3bd57dc51e99 100644 --- a/sd/source/ui/view/ViewShellBase.cxx +++ b/sd/source/ui/view/ViewShellBase.cxx @@ -533,11 +533,11 @@ sal_uInt16 ViewShellBase::SetPrinter ( bool bScaleAll = false; if ( bIsAPI ) { - WarningBox aWarnBox ( + VclPtr aWarnBox (new WarningBox( GetWindow(), (WinBits)(WB_YES_NO | WB_DEF_YES), - SD_RESSTR(STR_SCALE_OBJS_TO_PAGE)); - bScaleAll = (aWarnBox.Execute() == RET_YES); + SD_RESSTR(STR_SCALE_OBJS_TO_PAGE))); + bScaleAll = (aWarnBox->Execute() == RET_YES); } ::boost::shared_ptr pDrawViewShell ( diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx index c210857b6482..e442aeb9be15 100644 --- a/sd/source/ui/view/drviews2.cxx +++ b/sd/source/ui/view/drviews2.cxx @@ -993,10 +993,10 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) if( pObj && pObj->ISA( SdrGrafObj ) && static_cast(pObj)->GetGraphicType() == GRAPHIC_BITMAP ) { SdrGrafObj* pGraphicObj = static_cast(pObj); - CompressGraphicsDialog dialog( GetParentWindow(), pGraphicObj, GetViewFrame()->GetBindings() ); - if ( dialog.Execute() == RET_OK ) + VclPtr dialog(new CompressGraphicsDialog( GetParentWindow(), pGraphicObj, GetViewFrame()->GetBindings() ) ); + if ( dialog->Execute() == RET_OK ) { - SdrGrafObj* pNewObject = dialog.GetCompressedSdrGrafObj(); + SdrGrafObj* pNewObject = dialog->GetCompressedSdrGrafObj(); SdrPageView* pPageView = mpDrawView->GetSdrPageView(); OUString aUndoString = mpDrawView->GetDescriptionOfMarkedObjects(); aUndoString += " Compress"; @@ -1422,11 +1422,11 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) || aLayerName.isEmpty() ) { // name already exists - WarningBox aWarningBox ( + VclPtr aWarningBox (new WarningBox( GetParentWindow(), WinBits( WB_OK ), - SD_RESSTR(STR_WARN_NAME_DUPLICATE)); - aWarningBox.Execute(); + SD_RESSTR(STR_WARN_NAME_DUPLICATE))); + aWarningBox->Execute(); } else bLoop = false; @@ -1591,11 +1591,11 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) aLayerName != aOldLayerName) || aLayerName.isEmpty() ) { // name already exists - WarningBox aWarningBox ( + VclPtr aWarningBox (new WarningBox( GetParentWindow(), WinBits( WB_OK ), - SD_RESSTR(STR_WARN_NAME_DUPLICATE)); - aWarningBox.Execute(); + SD_RESSTR(STR_WARN_NAME_DUPLICATE))); + aWarningBox->Execute(); } else bLoop = false; diff --git a/sd/source/ui/view/drviews6.cxx b/sd/source/ui/view/drviews6.cxx index 31c9f08a6831..c76556e9a177 100644 --- a/sd/source/ui/view/drviews6.cxx +++ b/sd/source/ui/view/drviews6.cxx @@ -294,9 +294,9 @@ void DrawViewShell::ExecBmpMask( SfxRequest& rReq ) if( pNewObj->IsLinkedGraphic() ) { - MessageDialog aQueryBox( (vcl::Window*) GetActiveWindow(),"QueryUnlinkImageDialog","modules/sdraw/ui/queryunlinkimagedialog.ui"); + VclPtr aQueryBox(new MessageDialog( (vcl::Window*) GetActiveWindow(),"QueryUnlinkImageDialog","modules/sdraw/ui/queryunlinkimagedialog.ui") ); - if (RET_YES == aQueryBox.Execute()) + if (RET_YES == aQueryBox->Execute()) pNewObj->ReleaseGraphicLink(); else { diff --git a/sd/source/ui/view/drviews9.cxx b/sd/source/ui/view/drviews9.cxx index d224c328122f..66745078a240 100644 --- a/sd/source/ui/view/drviews9.cxx +++ b/sd/source/ui/view/drviews9.cxx @@ -87,11 +87,11 @@ void DrawViewShell::ExecGallery(SfxRequest& rReq) Graphic aGraphic( pGalleryItem->GetGraphic() ); // reduce size if necessary - Window aWindow (GetActiveWindow()); - aWindow.SetMapMode(aGraphic.GetPrefMapMode()); - Size aSizePix = aWindow.LogicToPixel(aGraphic.GetPrefSize()); - aWindow.SetMapMode( MapMode(MAP_100TH_MM) ); - Size aSize = aWindow.PixelToLogic(aSizePix); + VclPtr aWindow(GetActiveWindow()); + aWindow->SetMapMode(aGraphic.GetPrefMapMode()); + Size aSizePix = aWindow->LogicToPixel(aGraphic.GetPrefSize()); + aWindow->SetMapMode( MapMode(MAP_100TH_MM) ); + Size aSize = aWindow->PixelToLogic(aSizePix); // constrain size to page size if necessary SdrPage* pPage = mpDrawView->GetSdrPageView()->GetPage(); diff --git a/sd/source/ui/view/drviewsi.cxx b/sd/source/ui/view/drviewsi.cxx index e969c84a3a16..e15f19627216 100644 --- a/sd/source/ui/view/drviewsi.cxx +++ b/sd/source/ui/view/drviewsi.cxx @@ -164,10 +164,10 @@ void DrawViewShell::AssignFrom3DWindow() } else { - InfoBox aInfoBox ( + VclPtr aInfoBox (new InfoBox( GetActiveWindow(), - SD_RESSTR(STR_ACTION_NOTPOSSIBLE)); - aInfoBox.Execute(); + SD_RESSTR(STR_ACTION_NOTPOSSIBLE))); + aInfoBox->Execute(); } // get focus back diff --git a/sfx2/source/appl/appopen.cxx b/sfx2/source/appl/appopen.cxx index 582a4b8e935d..a307e81cfe37 100644 --- a/sfx2/source/appl/appopen.cxx +++ b/sfx2/source/appl/appopen.cxx @@ -462,8 +462,8 @@ void SfxApplication::NewDocExec_Impl( SfxRequest& rReq ) bool bNewWin = false; vcl::Window* pTopWin = GetTopWindow(); - SfxTemplateManagerDlg aTemplDlg; - int nRet = aTemplDlg.Execute(); + VclPtr aTemplDlg(new SfxTemplateManagerDlg); + int nRet = aTemplDlg->Execute(); if ( nRet == RET_OK ) { rReq.Done(); @@ -831,11 +831,11 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq ) SolarMutexGuard aGuard; vcl::Window *pWindow = SfxGetpApp()->GetTopWindow(); - MessageDialog aSecurityWarningBox(pWindow, + VclPtr aSecurityWarningBox(new MessageDialog(pWindow, SfxResId(STR_SECURITY_WARNING_NO_HYPERLINKS), - VCL_MESSAGE_WARNING); - aSecurityWarningBox.SetText( SfxResId(RID_SECURITY_WARNING_TITLE).toString() ); - aSecurityWarningBox.Execute(); + VCL_MESSAGE_WARNING)); + aSecurityWarningBox->SetText( SfxResId(RID_SECURITY_WARNING_TITLE).toString() ); + aSecurityWarningBox->Execute(); return; } diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx index e9b32c56697a..6fece61c4f78 100644 --- a/sfx2/source/appl/appserv.cxx +++ b/sfx2/source/appl/appserv.cxx @@ -451,8 +451,8 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq ) case SID_SHOW_LICENSE: { - LicenseDialog aDialog; - aDialog.Execute(); + VclPtr aDialog(new LicenseDialog); + aDialog->Execute(); break; } @@ -539,16 +539,16 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq ) case SID_TEMPLATE_MANAGER: { - SfxTemplateManagerDlg dlg; - dlg.Execute(); + VclPtr dlg(new SfxTemplateManagerDlg); + dlg->Execute(); bDone = true; break; } case SID_TEMPLATE_ADDRESSBOKSOURCE: { - svt::AddressBookSourceDialog aDialog(GetTopWindow(), ::comphelper::getProcessComponentContext()); - aDialog.Execute(); + VclPtr aDialog(new svt::AddressBookSourceDialog(GetTopWindow(), ::comphelper::getProcessComponentContext())); + aDialog->Execute(); bDone = true; break; } diff --git a/sfx2/source/appl/impldde.cxx b/sfx2/source/appl/impldde.cxx index 4a3c0be1e6b7..f66a2b0a3d6e 100644 --- a/sfx2/source/appl/impldde.cxx +++ b/sfx2/source/appl/impldde.cxx @@ -255,10 +255,10 @@ bool SvDDEObject::Connect( SvBaseLink * pSvLink ) void SvDDEObject::Edit( vcl::Window* pParent, sfx2::SvBaseLink* pBaseLink, const Link& rEndEditHdl ) { - SvDDELinkEditDialog aDlg( pParent, pBaseLink ); - if ( RET_OK == aDlg.Execute() && rEndEditHdl.IsSet() ) + VclPtr aDlg(new SvDDELinkEditDialog(pParent, pBaseLink) ); + if ( RET_OK == aDlg->Execute() && rEndEditHdl.IsSet() ) { - OUString sCommand = aDlg.GetCmd(); + OUString sCommand = aDlg->GetCmd(); rEndEditHdl.Call( &sCommand ); } } diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx index eb800ba69e84..9a80a2e0df55 100644 --- a/sfx2/source/appl/newhelp.cxx +++ b/sfx2/source/appl/newhelp.cxx @@ -1048,8 +1048,8 @@ IMPL_LINK_NOARG(SearchTabPage_Impl, SearchHdl) if ( aFactories.empty() ) { - MessageDialog aBox( this, SfxResId( STR_INFO_NOSEARCHRESULTS ), VCL_MESSAGE_INFO ); - aBox.Execute(); + VclPtr aBox(new MessageDialog(this, SfxResId( STR_INFO_NOSEARCHRESULTS ), VCL_MESSAGE_INFO) ); + aBox->Execute(); } } return 0; @@ -1194,15 +1194,15 @@ void BookmarksBox_Impl::DoAction( sal_uInt16 nAction ) sal_Int32 nPos = GetSelectEntryPos(); if ( nPos != LISTBOX_ENTRY_NOTFOUND ) { - SfxAddHelpBookmarkDialog_Impl aDlg( this, true ); - aDlg.SetTitle( GetEntry( nPos ) ); - if ( aDlg.Execute() == RET_OK ) + VclPtr aDlg(new SfxAddHelpBookmarkDialog_Impl(this, true)); + aDlg->SetTitle( GetEntry( nPos ) ); + if ( aDlg->Execute() == RET_OK ) { OUString* pURL = static_cast(GetEntryData( nPos )); RemoveEntry( nPos ); OUString aImageURL = IMAGE_URL; aImageURL += INetURLObject( *pURL ).GetHost(); - nPos = InsertEntry( aDlg.GetTitle(), SvFileInformationManager::GetImage( INetURLObject(aImageURL), false ) ); + nPos = InsertEntry( aDlg->GetTitle(), SvFileInformationManager::GetImage( INetURLObject(aImageURL), false ) ); SetEntryData( nPos, new OUString( *pURL ) ); SelectEntryPos( nPos ); delete pURL; @@ -2288,8 +2288,8 @@ IMPL_LINK( SfxHelpTextWindow_Impl, FindHdl, sfx2::SearchDialog*, pDlg ) else { DBG_ASSERT( pSrchDlg, "no search dialog" ); - MessageDialog aBox( pSrchDlg, SfxResId( STR_INFO_NOSEARCHTEXTFOUND ), VCL_MESSAGE_INFO ); - aBox.Execute(); + VclPtr aBox(new MessageDialog(pSrchDlg, SfxResId( STR_INFO_NOSEARCHTEXTFOUND ), VCL_MESSAGE_INFO) ); + aBox->Execute(); pSrchDlg->SetFocusOnEdit(); } } @@ -3167,11 +3167,11 @@ void SfxHelpWindow_Impl::DoAction( sal_uInt16 nActionId ) if ( aAny >>= aValue ) { OUString aTitle( aValue ); - SfxAddHelpBookmarkDialog_Impl aDlg( this, false ); - aDlg.SetTitle( aTitle ); - if ( aDlg.Execute() == RET_OK ) + VclPtr aDlg(new SfxAddHelpBookmarkDialog_Impl(this, false)); + aDlg->SetTitle( aTitle ); + if ( aDlg->Execute() == RET_OK ) { - aTitle = aDlg.GetTitle(); + aTitle = aDlg->GetTitle(); pIndexWin->AddBookmarks( aTitle, aURL ); } } diff --git a/sfx2/source/appl/opengrf.cxx b/sfx2/source/appl/opengrf.cxx index 2a533bb29ed8..10c4d705d734 100644 --- a/sfx2/source/appl/opengrf.cxx +++ b/sfx2/source/appl/opengrf.cxx @@ -158,8 +158,8 @@ short SvxOpenGraphicDialog::Execute() // could not load? if ( nFound == USHRT_MAX ) { - WarningBox aWarningBox( NULL, WB_3DLOOK | WB_RETRY_CANCEL, SfxResId( SvxOpenGrfErr2ResId(nImpRet) ).toString() ); - bQuitLoop = aWarningBox.Execute()==RET_RETRY ? sal_False : sal_True; + VclPtr aWarningBox(new WarningBox(NULL, WB_3DLOOK | WB_RETRY_CANCEL, SfxResId( SvxOpenGrfErr2ResId(nImpRet) ).toString()) ); + bQuitLoop = aWarningBox->Execute() != RET_RETRY; } else { diff --git a/sfx2/source/appl/openuriexternally.cxx b/sfx2/source/appl/openuriexternally.cxx index ecc347eddd27..7394b8fb8d72 100644 --- a/sfx2/source/appl/openuriexternally.cxx +++ b/sfx2/source/appl/openuriexternally.cxx @@ -44,10 +44,10 @@ bool sfx2::openUriExternally( "unexpected IllegalArgumentException: " + e.Message); } SolarMutexGuard g; - MessageDialog eb( - SfxGetpApp()->GetTopWindow(), SfxResId(STR_NO_ABS_URI_REF)); - eb.set_primary_text(eb.get_primary_text().replaceFirst("$(ARG1)", uri)); - eb.Execute(); + VclPtr eb(new MessageDialog( + SfxGetpApp()->GetTopWindow(), SfxResId(STR_NO_ABS_URI_REF))); + eb->set_primary_text(eb->get_primary_text().replaceFirst("$(ARG1)", uri)); + eb->Execute(); } catch (css::system::SystemShellExecuteException &) { if (!handleSystemShellExecuteException) { throw; diff --git a/sfx2/source/appl/sfxhelp.cxx b/sfx2/source/appl/sfxhelp.cxx index 247e80e140af..ac82b98815f1 100644 --- a/sfx2/source/appl/sfxhelp.cxx +++ b/sfx2/source/appl/sfxhelp.cxx @@ -605,8 +605,8 @@ bool SfxHelp::Start_Impl(const OUString& rURL, const vcl::Window* pWindow, const if ( impl_showOnlineHelp( aHelpURL ) ) return true; - NoHelpErrorBox aErrBox( const_cast< vcl::Window* >( pWindow ) ); - aErrBox.Execute(); + VclPtr aErrBox(new NoHelpErrorBox(const_cast< vcl::Window* >( pWindow )) ); + aErrBox->Execute(); return false; } diff --git a/sfx2/source/bastyp/fltfnc.cxx b/sfx2/source/bastyp/fltfnc.cxx index 9e0f8de67342..02da90cb125e 100644 --- a/sfx2/source/bastyp/fltfnc.cxx +++ b/sfx2/source/bastyp/fltfnc.cxx @@ -534,8 +534,8 @@ bool SfxFilterMatcher::IsFilterInstalled_Impl( const SfxFilter* pFilter ) // Here could a re-installation be offered OUString aText( SfxResId(STR_FILTER_NOT_INSTALLED).toString() ); aText = aText.replaceFirst( "$(FILTER)", pFilter->GetUIName() ); - QueryBox aQuery( NULL, WB_YES_NO | WB_DEF_YES, aText ); - short nRet = aQuery.Execute(); + VclPtr aQuery(new QueryBox(NULL, WB_YES_NO | WB_DEF_YES, aText) ); + short nRet = aQuery->Execute(); if ( nRet == RET_YES ) { #ifdef DBG_UTIL diff --git a/sfx2/source/dialog/mailmodel.cxx b/sfx2/source/dialog/mailmodel.cxx index ff9e9e56b862..4af32d2478e2 100644 --- a/sfx2/source/dialog/mailmodel.cxx +++ b/sfx2/source/dialog/mailmodel.cxx @@ -858,8 +858,8 @@ SfxMailModel::SendMailResult SfxMailModel::Send( const css::uno::Reference< css: SolarMutexGuard aGuard; vcl::Window* pParentWindow = VCLUnoHelper::GetWindow( xParentWindow ); - MessageDialog aBox(pParentWindow, "ErrorFindEmailDialog", "sfx/ui/errorfindemaildialog.ui"); - aBox.Execute(); + VclPtr aBox(new MessageDialog(pParentWindow, "ErrorFindEmailDialog", "sfx/ui/errorfindemaildialog.ui")); + aBox->Execute(); eResult = SEND_MAIL_CANCELLED; } else diff --git a/sfx2/source/dialog/mgetempl.cxx b/sfx2/source/dialog/mgetempl.cxx index 91dbe4096b0d..c1a713d4f651 100644 --- a/sfx2/source/dialog/mgetempl.cxx +++ b/sfx2/source/dialog/mgetempl.cxx @@ -633,8 +633,8 @@ int SfxManageStyleSheetPage::DeactivatePage( SfxItemSet* pItemSet ) if (!pStyle->SetName(comphelper::string::stripStart(m_pNameRw->GetText(), ' '))) { - MessageDialog aBox( this, SfxResId( STR_TABPAGE_INVALIDNAME ), VCL_MESSAGE_INFO ); - aBox.Execute(); + VclPtr aBox(new MessageDialog(this, SfxResId( STR_TABPAGE_INVALIDNAME ), VCL_MESSAGE_INFO)); + aBox->Execute(); m_pNameRw->GrabFocus(); m_pNameRw->SetSelection( Selection( SELECTION_MIN, SELECTION_MAX ) ); return SfxTabPage::KEEP_PAGE; @@ -650,8 +650,8 @@ int SfxManageStyleSheetPage::DeactivatePage( SfxItemSet* pItemSet ) { if ( !pStyle->SetFollow( aFollowEntry ) ) { - MessageDialog aBox( this, SfxResId( STR_TABPAGE_INVALIDSTYLE ), VCL_MESSAGE_INFO ); - aBox.Execute(); + VclPtr aBox(new MessageDialog(this, SfxResId( STR_TABPAGE_INVALIDSTYLE ), VCL_MESSAGE_INFO)); + aBox->Execute(); m_pFollowLb->GrabFocus(); return SfxTabPage::KEEP_PAGE; } @@ -670,8 +670,8 @@ int SfxManageStyleSheetPage::DeactivatePage( SfxItemSet* pItemSet ) { if ( !pStyle->SetParent( aParentEntry ) ) { - MessageDialog aBox( this, SfxResId( STR_TABPAGE_INVALIDPARENT ), VCL_MESSAGE_INFO ); - aBox.Execute(); + VclPtr aBox(new MessageDialog(this, SfxResId( STR_TABPAGE_INVALIDPARENT ), VCL_MESSAGE_INFO)); + aBox->Execute(); m_pBaseLb->GrabFocus(); return SfxTabPage::KEEP_PAGE; } diff --git a/sfx2/source/dialog/passwd.cxx b/sfx2/source/dialog/passwd.cxx index ca6764967282..56ba1282f617 100644 --- a/sfx2/source/dialog/passwd.cxx +++ b/sfx2/source/dialog/passwd.cxx @@ -71,8 +71,8 @@ IMPL_LINK_NOARG(SfxPasswordDialog, OKHdl) bConfirmFailed = true; if ( bConfirmFailed ) { - MessageDialog aBox(this, SfxResId(STR_ERROR_WRONG_CONFIRM)); - aBox.Execute(); + VclPtr aBox(new MessageDialog(this, SfxResId(STR_ERROR_WRONG_CONFIRM))); + aBox->Execute(); mpConfirm1ED->SetText( OUString() ); mpConfirm1ED->GrabFocus(); } diff --git a/sfx2/source/dialog/recfloat.cxx b/sfx2/source/dialog/recfloat.cxx index 8760a0863d94..d63d1df4eff4 100644 --- a/sfx2/source/dialog/recfloat.cxx +++ b/sfx2/source/dialog/recfloat.cxx @@ -152,9 +152,9 @@ bool SfxRecordingFloatWrapper_Impl::QueryClose() com::sun::star::uno::Reference< com::sun::star::frame::XDispatchRecorder > xRecorder = pBindings->GetRecorder(); if ( xRecorder.is() && !xRecorder->getRecordedMacro().isEmpty() ) { - QueryBox aBox( GetWindow(), WB_YES_NO | WB_DEF_NO , SfxResId(STR_MACRO_LOSS).toString() ); - aBox.SetText( SfxResId(STR_CANCEL_RECORDING).toString() ); - bRet = ( aBox.Execute() == RET_YES ); + VclPtr aBox(new QueryBox(GetWindow(), WB_YES_NO | WB_DEF_NO , SfxResId(STR_MACRO_LOSS).toString())); + aBox->SetText( SfxResId(STR_CANCEL_RECORDING).toString() ); + bRet = ( aBox->Execute() == RET_YES ); } return bRet; diff --git a/sfx2/source/dialog/securitypage.cxx b/sfx2/source/dialog/securitypage.cxx index 2ddf168ad892..b70ca3c4fab2 100644 --- a/sfx2/source/dialog/securitypage.cxx +++ b/sfx2/source/dialog/securitypage.cxx @@ -99,13 +99,13 @@ static bool lcl_GetPassword( /*out*/OUString &rPassword ) { bool bRes = false; - SfxPasswordDialog aPasswdDlg( pParent ); - aPasswdDlg.SetMinLen( 1 ); + VclPtr aPasswdDlg(new SfxPasswordDialog(pParent)); + aPasswdDlg->SetMinLen( 1 ); if (bProtect) - aPasswdDlg.ShowExtras( SHOWEXTRAS_CONFIRM ); - if (RET_OK == aPasswdDlg.Execute() && !aPasswdDlg.GetPassword().isEmpty()) + aPasswdDlg->ShowExtras( SHOWEXTRAS_CONFIRM ); + if (RET_OK == aPasswdDlg->Execute() && !aPasswdDlg->GetPassword().isEmpty()) { - rPassword = aPasswdDlg.GetPassword(); + rPassword = aPasswdDlg->GetPassword(); bRes = true; } return bRes; @@ -335,9 +335,9 @@ IMPL_LINK_NOARG(SfxSecurityPage_Impl, RecordChangesCBToggleHdl) bool bAlreadyDone = false; if (!m_bEndRedliningWarningDone) { - WarningBox aBox( m_rMyTabPage.GetParent(), WinBits(WB_YES_NO | WB_DEF_NO), - m_aEndRedliningWarning ); - if (aBox.Execute() != RET_YES) + VclPtr aBox(new WarningBox(m_rMyTabPage.GetParent(), WinBits(WB_YES_NO | WB_DEF_NO), + m_aEndRedliningWarning )); + if (aBox->Execute() != RET_YES) bAlreadyDone = true; else m_bEndRedliningWarningDone = true; diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx index c10a822af5e2..34097725d091 100644 --- a/sfx2/source/dialog/templdlg.cxx +++ b/sfx2/source/dialog/templdlg.cxx @@ -1818,13 +1818,13 @@ void SfxCommonTemplateDialog_Impl::DeleteHdl(void *) if ( bUsedStyle ) { #if defined UNX - MessageDialog aBox(SfxGetpApp()->GetTopWindow(), aMsg, - VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO); + VclPtr aBox(new MessageDialog(SfxGetpApp()->GetTopWindow(), aMsg, + VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO)); #else - MessageDialog aBox(GetWindow(), aMsg, - VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO); + VclPtr aBox(new MessageDialog(GetWindow(), aMsg, + VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO)); #endif - aApproved = aBox.Execute() == RET_YES; + aApproved = aBox->Execute() == RET_YES; } // if there are no used styles selected or the user approved the changes diff --git a/sfx2/source/doc/QuerySaveDocument.cxx b/sfx2/source/doc/QuerySaveDocument.cxx index 63d458f1c955..9ab89a78c374 100644 --- a/sfx2/source/doc/QuerySaveDocument.cxx +++ b/sfx2/source/doc/QuerySaveDocument.cxx @@ -29,9 +29,9 @@ short ExecuteQuerySaveDocument(vcl::Window* _pParent, const OUString& _rTitle) return RET_NO; } - MessageDialog aQBox(_pParent, "QuerySaveDialog", "sfx/ui/querysavedialog.ui"); - aQBox.set_primary_text(aQBox.get_primary_text().replaceFirst("$(DOC)", _rTitle)); - return aQBox.Execute(); + VclPtr aQBox(new MessageDialog(_pParent, "QuerySaveDialog", "sfx/ui/querysavedialog.ui")); + aQBox->set_primary_text(aQBox->get_primary_text().replaceFirst("$(DOC)", _rTitle)); + return aQBox->Execute(); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sfx2/source/doc/docinsert.cxx b/sfx2/source/doc/docinsert.cxx index e51854ebe18e..f336c22a39e7 100644 --- a/sfx2/source/doc/docinsert.cxx +++ b/sfx2/source/doc/docinsert.cxx @@ -190,12 +190,12 @@ IMPL_LINK_NOARG(DocumentInserter, DialogClosedHdl) if ( ( aValue >>= bPassWord ) && bPassWord ) { // ask for the password - SfxPasswordDialog aPasswordDlg( NULL ); - aPasswordDlg.ShowExtras( SHOWEXTRAS_CONFIRM ); - short nRet = aPasswordDlg.Execute(); + VclPtr aPasswordDlg( new SfxPasswordDialog(NULL) ); + aPasswordDlg->ShowExtras( SHOWEXTRAS_CONFIRM ); + short nRet = aPasswordDlg->Execute(); if ( RET_OK == nRet ) { - OUString aPasswd = aPasswordDlg.GetPassword(); + OUString aPasswd = aPasswordDlg->GetPassword(); m_pItemSet->Put( SfxStringItem( SID_PASSWORD, aPasswd ) ); } else diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx index c75786910d38..8e36955ad454 100644 --- a/sfx2/source/doc/guisaveas.cxx +++ b/sfx2/source/doc/guisaveas.cxx @@ -666,9 +666,9 @@ sal_Int8 ModelData_Impl::CheckSaveAcceptable( sal_Int8 nCurStatus ) { // notify the user that SaveAs is going to be done vcl::Window* pWin = SfxStoringHelper::GetModelWindow( m_xModel ); - MessageDialog aMessageBox(pWin, SfxResId(STR_NEW_FILENAME_SAVE), - VCL_MESSAGE_QUESTION, VCL_BUTTONS_OK_CANCEL); - if ( aMessageBox.Execute() == RET_OK ) + VclPtr aMessageBox(new MessageDialog(pWin, SfxResId(STR_NEW_FILENAME_SAVE), + VCL_MESSAGE_QUESTION, VCL_BUTTONS_OK_CANCEL)); + if ( aMessageBox->Execute() == RET_OK ) nResult = STATUS_SAVEAS; else nResult = STATUS_NO_ACTION; @@ -1856,9 +1856,9 @@ bool SfxStoringHelper::WarnUnacceptableFormat( const uno::Reference< frame::XMod return true; vcl::Window* pWin = SfxStoringHelper::GetModelWindow( xModel ); - SfxAlienWarningDialog aDlg( pWin, aOldUIName ); + VclPtr aDlg(new SfxAlienWarningDialog(pWin, aOldUIName)); - return aDlg.Execute() == RET_OK; + return aDlg->Execute() == RET_OK; } vcl::Window* SfxStoringHelper::GetModelWindow( const uno::Reference< frame::XModel >& xModel ) diff --git a/sfx2/source/doc/objcont.cxx b/sfx2/source/doc/objcont.cxx index 3f54b39f640f..2f5b220ab701 100644 --- a/sfx2/source/doc/objcont.cxx +++ b/sfx2/source/doc/objcont.cxx @@ -464,8 +464,8 @@ void SfxObjectShell::UpdateFromTemplate_Impl( ) { OUString sMessage( SfxResId(STR_QRYTEMPL_MESSAGE).toString() ); sMessage = sMessage.replaceAll( "$(ARG1)", aTemplName ); - sfx2::QueryTemplateBox aBox( GetDialogParent(), sMessage ); - if ( RET_YES == aBox.Execute() ) + VclPtr aBox(new sfx2::QueryTemplateBox(GetDialogParent(), sMessage) ); + if ( RET_YES == aBox->Execute() ) bLoad = true; } diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx index 03b4e3a10bc7..4ab26291c3b2 100644 --- a/sfx2/source/doc/objserv.cxx +++ b/sfx2/source/doc/objserv.cxx @@ -364,11 +364,11 @@ void SfxObjectShell::CheckIn( ) { uno::Reference< document::XCmisDocument > xCmisDoc( GetModel(), uno::UNO_QUERY_THROW ); // Pop up dialog to ask for comment and major - SfxCheckinDialog checkinDlg( &GetFrame( )->GetWindow( ) ); - if ( checkinDlg.Execute( ) == RET_OK ) + VclPtr checkinDlg(new SfxCheckinDialog(&GetFrame( )->GetWindow( ))); + if ( checkinDlg->Execute( ) == RET_OK ) { - OUString sComment = checkinDlg.GetComment( ); - bool bMajor = checkinDlg.IsMajor( ); + OUString sComment = checkinDlg->GetComment( ); + bool bMajor = checkinDlg->IsMajor( ); xCmisDoc->checkIn( bMajor, sComment ); uno::Reference< util::XModifiable > xModifiable( GetModel( ), uno::UNO_QUERY ); if ( xModifiable.is( ) ) @@ -857,10 +857,10 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq) case SID_DOCTEMPLATE: { // save as document templates - SfxTemplateManagerDlg aDlg; - aDlg.setDocumentModel(GetModel()); - aDlg.setSaveMode(); - aDlg.Execute(); + VclPtr aDlg(new SfxTemplateManagerDlg); + aDlg->setDocumentModel(GetModel()); + aDlg->setSaveMode(); + aDlg->Execute(); break; } diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx index 91c385548117..c68a4b94c034 100644 --- a/sfx2/source/doc/objstor.cxx +++ b/sfx2/source/doc/objstor.cxx @@ -3019,8 +3019,8 @@ sal_Int16 SfxObjectShell::QueryHiddenInformation( HiddenWarningFact eFact, vcl:: { sMessage += "\n"; sMessage += SfxResId(nResId).toString(); - WarningBox aWBox( pParent, WB_YES_NO | WB_DEF_NO, sMessage ); - nRet = aWBox.Execute(); + VclPtr aWBox(new WarningBox(pParent, WB_YES_NO | WB_DEF_NO, sMessage)); + nRet = aWBox->Execute(); } } diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx index 3d40de2c836b..b1c416c2a507 100644 --- a/sfx2/source/doc/templatedlg.cxx +++ b/sfx2/source/doc/templatedlg.cxx @@ -614,9 +614,9 @@ IMPL_LINK(SfxTemplateManagerDlg, RepositoryMenuSelectHdl, Menu*, pMenu) } else if (nMenuId == MNI_REPOSITORY_NEW) { - PlaceEditDialog dlg(this); + VclPtr dlg(new PlaceEditDialog(this)); - if (dlg.Execute()) + if (dlg->Execute()) { std::shared_ptr xPlace = dlg.GetPlace(); @@ -628,8 +628,8 @@ IMPL_LINK(SfxTemplateManagerDlg, RepositoryMenuSelectHdl, Menu*, pMenu) else { OUString aMsg(SfxResId(STR_MSG_ERROR_REPOSITORY_NAME).toString()); - aMsg = aMsg.replaceFirst("$1", xPlace->GetName()); - MessageDialog(this, aMsg).Execute(); + aMsg = aMsg.replaceFirst("$1",xPlace->GetName()); + VclPtr(new MessageDialog(this, aMsg))->Execute(); } } } @@ -1158,16 +1158,16 @@ void SfxTemplateManagerDlg::OnTemplateProperties () { const TemplateViewItem *pItem = static_cast(*maSelTemplates.begin()); - SfxTemplateInfoDlg aDlg; - aDlg.loadDocument(pItem->getPath()); - aDlg.Execute(); + VclPtr aDlg(new SfxTemplateInfoDlg); + aDlg->loadDocument(pItem->getPath()); + aDlg->Execute(); } void SfxTemplateManagerDlg::OnTemplateDelete () { - MessageDialog aQueryDlg(this, SfxResId(STR_QMSG_SEL_TEMPLATE_DELETE), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO); + VclPtr aQueryDlg(new MessageDialog(this, SfxResId(STR_QMSG_SEL_TEMPLATE_DELETE), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO)); - if ( aQueryDlg.Execute() != RET_YES ) + if ( aQueryDlg->Execute() != RET_YES ) return; OUString aTemplateList; @@ -1236,13 +1236,13 @@ void SfxTemplateManagerDlg::OnTemplateAsDefault () void SfxTemplateManagerDlg::OnFolderNew() { - InputDialog dlg(SfxResId(STR_INPUT_NEW).toString(),this); + VclPtr dlg(new InputDialog(SfxResId(STR_INPUT_NEW).toString(),this)); - int ret = dlg.Execute(); + int ret = dlg->Execute(); if (ret) { - OUString aName = dlg.getEntryText(); + OUString aName = dlg->getEntryText(); mpCurView->createRegion(aName); } @@ -1250,9 +1250,9 @@ void SfxTemplateManagerDlg::OnFolderNew() void SfxTemplateManagerDlg::OnFolderDelete() { - MessageDialog aQueryDlg(this, SfxResId(STR_QMSG_SEL_FOLDER_DELETE), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO); + VclPtr aQueryDlg(new MessageDialog(this, SfxResId(STR_QMSG_SEL_FOLDER_DELETE), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO)); - if ( aQueryDlg.Execute() != RET_YES ) + if ( aQueryDlg->Execute() != RET_YES ) return; OUString aFolderList; @@ -1303,17 +1303,17 @@ void SfxTemplateManagerDlg::OnTemplateSaveAs() return; } - InputDialog aDlg(SfxResId(STR_INPUT_TEMPLATE_NEW).toString(),this); + VclPtr aDlg(new InputDialog(SfxResId(STR_INPUT_TEMPLATE_NEW).toString(),this)); - if (aDlg.Execute()) + if (aDlg->Execute()) { - OUString aName = aDlg.getEntryText(); + OUString aName = aDlg->getEntryText(); if (!aName.isEmpty()) { OUString aFolderList; OUString aQMsg(SfxResId(STR_QMSG_TEMPLATE_OVERWRITE).toString()); - MessageDialog aQueryDlg(this, OUString(), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO); + VclPtr aQueryDlg(new MessageDialog(this, OUString(), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO)); if (mpLocalView->isNonRootRegionVisible()) { @@ -1322,9 +1322,9 @@ void SfxTemplateManagerDlg::OnTemplateSaveAs() if (!mpLocalView->isTemplateNameUnique(nRegionItemId,aName)) { aQMsg = aQMsg.replaceFirst("$1",aName); - aQueryDlg.set_primary_text(aQMsg.replaceFirst("$2",mpLocalView->getCurRegionName())); + aQueryDlg->set_primary_text(aQMsg.replaceFirst("$2",mpLocalView->getCurRegionName())); - if (aQueryDlg.Execute() == RET_NO) + if (aQueryDlg->Execute() == RET_NO) return; } @@ -1341,9 +1341,9 @@ void SfxTemplateManagerDlg::OnTemplateSaveAs() if (!mpLocalView->isTemplateNameUnique(pItem->mnId,aName)) { OUString aDQMsg = aQMsg.replaceFirst("$1",aName); - aQueryDlg.set_primary_text(aDQMsg.replaceFirst("$2",pItem->maTitle)); + aQueryDlg->set_primary_text(aDQMsg.replaceFirst("$2",pItem->maTitle)); - if (aQueryDlg.Execute() == RET_NO) + if (aQueryDlg->Execute() == RET_NO) continue; } @@ -1441,13 +1441,13 @@ void SfxTemplateManagerDlg::localMoveTo(sal_uInt16 nMenuId) if (nMenuId == MNI_MOVE_NEW) { - InputDialog dlg(SfxResId(STR_INPUT_NEW).toString(),this); + VclPtr dlg(new InputDialog(SfxResId(STR_INPUT_NEW).toString(),this)); - int ret = dlg.Execute(); + int ret = dlg->Execute(); if (ret) { - OUString aName = dlg.getEntryText(); + OUString aName = dlg->getEntryText(); if (!aName.isEmpty()) nItemId = mpLocalView->createRegion(aName); @@ -1489,13 +1489,13 @@ void SfxTemplateManagerDlg::remoteMoveTo(const sal_uInt16 nMenuId) if (nMenuId == MNI_MOVE_NEW) { - InputDialog dlg(SfxResId(STR_INPUT_NEW).toString(),this); + VclPtr dlg(new InputDialog(SfxResId(STR_INPUT_NEW).toString(),this)); - int ret = dlg.Execute(); + int ret = dlg->Execute(); if (ret) { - OUString aName = dlg.getEntryText(); + OUString aName = dlg->getEntryText(); if (!aName.isEmpty()) nItemId = mpLocalView->createRegion(aName); @@ -1543,13 +1543,13 @@ void SfxTemplateManagerDlg::localSearchMoveTo(sal_uInt16 nMenuId) if (nMenuId == MNI_MOVE_NEW) { - InputDialog dlg(SfxResId(STR_INPUT_NEW).toString(),this); + VclPtr dlg(new InputDialog(SfxResId(STR_INPUT_NEW).toString(),this)); - int ret = dlg.Execute(); + int ret = dlg->Execute(); if (ret) { - OUString aName = dlg.getEntryText(); + OUString aName = dlg->getEntryText(); if (!aName.isEmpty()) nItemId = mpLocalView->createRegion(aName); diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx index 434b387dc50e..5d7685af9fbb 100644 --- a/sfx2/source/view/viewfrm.cxx +++ b/sfx2/source/view/viewfrm.cxx @@ -495,9 +495,9 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq ) if ( nOpenMode == SFX_STREAM_READWRITE && !rReq.IsAPI() ) { // ::com::sun::star::sdbcx::User offering to open it as a template - MessageDialog aBox(&GetWindow(), SfxResId(STR_QUERY_OPENASTEMPLATE), - VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO); - if ( RET_YES == aBox.Execute() ) + VclPtr aBox(new MessageDialog(&GetWindow(), SfxResId(STR_QUERY_OPENASTEMPLATE), + VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO)); + if ( RET_YES == aBox->Execute() ) { SfxApplication* pApp = SfxGetpApp(); SfxAllItemSet aSet( pApp->GetPool() ); @@ -579,9 +579,9 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq ) if ( bDo && GetFrame().DocIsModified_Impl() && !rReq.IsAPI() && ( !pSilentItem || !pSilentItem->GetValue() ) ) { - MessageDialog aBox(&GetWindow(), SfxResId(STR_QUERY_LASTVERSION), - VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO); - bDo = ( RET_YES == aBox.Execute() ); + VclPtr aBox(new MessageDialog(&GetWindow(), SfxResId(STR_QUERY_LASTVERSION), + VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO)); + bDo = ( RET_YES == aBox->Execute() ); } if ( bDo ) @@ -756,9 +756,9 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq ) if ( bForEdit && SID_EDITDOC == rReq.GetSlot() ) { // ask user for opening as template - MessageDialog aBox(&GetWindow(), SfxResId(STR_QUERY_OPENASTEMPLATE), - VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO); - if ( RET_YES == aBox.Execute() ) + VclPtr aBox(new MessageDialog(&GetWindow(), SfxResId(STR_QUERY_OPENASTEMPLATE), + VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO)); + if ( RET_YES == aBox->Execute() ) { SfxAllItemSet aSet( pApp->GetPool() ); aSet.Put( SfxStringItem( SID_FILE_NAME, pMedium->GetName() ) ); diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx index abfbbbce1591..34b1690dc82b 100644 --- a/sfx2/source/view/viewsh.cxx +++ b/sfx2/source/view/viewsh.cxx @@ -595,8 +595,8 @@ void SfxViewShell::ExecMisc_Impl( SfxRequest &rReq ) if ( eResult == SfxMailModel::SEND_MAIL_ERROR ) { - MessageDialog aBox( SfxGetpApp()->GetTopWindow(), SfxResId( STR_ERROR_SEND_MAIL ), VCL_MESSAGE_INFO); - aBox.Execute(); + VclPtr aBox(new MessageDialog(SfxGetpApp()->GetTopWindow(), SfxResId( STR_ERROR_SEND_MAIL ), VCL_MESSAGE_INFO)); + aBox->Execute(); rReq.Ignore(); } else @@ -615,8 +615,8 @@ void SfxViewShell::ExecMisc_Impl( SfxRequest &rReq ) SfxMailModel::SendMailResult eResult = aModel.SaveAndSend( xFrame, OUString() ); if( eResult == SfxMailModel::SEND_MAIL_ERROR ) { - MessageDialog aBox( SfxGetpApp()->GetTopWindow(), SfxResId( STR_ERROR_SEND_MAIL ), VCL_MESSAGE_INFO); - aBox.Execute(); + VclPtr aBox(new MessageDialog(SfxGetpApp()->GetTopWindow(), SfxResId( STR_ERROR_SEND_MAIL ), VCL_MESSAGE_INFO)); + aBox->Execute(); rReq.Ignore(); } else @@ -1311,8 +1311,8 @@ bool SfxViewShell::PrepareClose { if ( bUI ) { - MessageDialog aInfoBox( &GetViewFrame()->GetWindow(), SfxResId( STR_CANT_CLOSE ), VCL_MESSAGE_INFO ); - aInfoBox.Execute(); + VclPtr aInfoBox(new MessageDialog(&GetViewFrame()->GetWindow(), SfxResId( STR_CANT_CLOSE ), VCL_MESSAGE_INFO )); + aInfoBox->Execute(); } return false; diff --git a/svtools/source/contnr/fileview.cxx b/svtools/source/contnr/fileview.cxx index e5ffac447d1b..e36c2f513041 100644 --- a/svtools/source/contnr/fileview.cxx +++ b/svtools/source/contnr/fileview.cxx @@ -879,16 +879,16 @@ void ViewTabListBox_Impl::DeleteEntries() if ( eResult != svtools::QUERYDELETE_ALL ) { INetURLObject aObj( aURL ); - svtools::QueryDeleteDlg_Impl aDlg( NULL, aObj.GetName( INetURLObject::DECODE_WITH_CHARSET ) ); + VclPtr aDlg(new svtools::QueryDeleteDlg_Impl(NULL, aObj.GetName( INetURLObject::DECODE_WITH_CHARSET ) )); if ( sDialogPosition.getLength() ) - aDlg.SetWindowState( sDialogPosition ); + aDlg->SetWindowState( sDialogPosition ); if ( GetSelectionCount() > 1 ) - aDlg.EnableAllButton(); + aDlg->EnableAllButton(); - eResult = aDlg.Execute(); + eResult = aDlg->Execute(); - sDialogPosition = aDlg.GetWindowState( ); + sDialogPosition = aDlg->GetWindowState( ); } if ( ( eResult == svtools::QUERYDELETE_ALL ) || diff --git a/svtools/source/java/javainteractionhandler.cxx b/svtools/source/java/javainteractionhandler.cxx index 15e797d18dfe..fc7111784389 100644 --- a/svtools/source/java/javainteractionhandler.cxx +++ b/svtools/source/java/javainteractionhandler.cxx @@ -122,9 +122,9 @@ void SAL_CALL JavaInteractionHandler::handle( const Reference< XInteractionReque // No suitable JRE found SolarMutexGuard aSolarGuard; m_bJavaNotFound_Handled = true; - MessageDialog aWarningBox(NULL, SvtResId(STR_WARNING_JAVANOTFOUND), VCL_MESSAGE_WARNING); - aWarningBox.SetText(SvtResId(STR_WARNING_JAVANOTFOUND_TITLE)); - nResult = aWarningBox.Execute(); + VclPtr aWarningBox(new MessageDialog(NULL, SvtResId(STR_WARNING_JAVANOTFOUND), VCL_MESSAGE_WARNING)); + aWarningBox->SetText(SvtResId(STR_WARNING_JAVANOTFOUND_TITLE)); + nResult = aWarningBox->Execute(); } else { @@ -139,12 +139,12 @@ void SAL_CALL JavaInteractionHandler::handle( const Reference< XInteractionReque SolarMutexGuard aSolarGuard; m_bInvalidSettings_Handled = true; #ifdef MACOSX - MessageDialog aWarningBox(NULL, SvtResId(STR_WARNING_INVALIDJAVASETTINGS_MAC), VCL_MESSAGE_WARNING); + VclPtr aWarningBox(new MessageDialog(NULL, SvtResId(STR_WARNING_INVALIDJAVASETTINGS_MAC), VCL_MESSAGE_WARNING)); #else - MessageDialog aWarningBox(NULL, SvtResId(STR_WARNING_INVALIDJAVASETTINGS), VCL_MESSAGE_WARNING); + VclPtr aWarningBox(new MessageDialog(NULL, SvtResId(STR_WARNING_INVALIDJAVASETTINGS), VCL_MESSAGE_WARNING)); #endif - aWarningBox.SetText(SvtResId(STR_WARNING_INVALIDJAVASETTINGS_TITLE)); - nResult = aWarningBox.Execute(); + aWarningBox->SetText(SvtResId(STR_WARNING_INVALIDJAVASETTINGS_TITLE)); + nResult = aWarningBox->Execute(); } else { @@ -158,9 +158,9 @@ void SAL_CALL JavaInteractionHandler::handle( const Reference< XInteractionReque SolarMutexGuard aSolarGuard; m_bJavaDisabled_Handled = true; // Java disabled. Give user a chance to enable Java inside Office. - MessageDialog aQueryBox(NULL, "JavaDisabledDialog", - "svt/ui/javadisableddialog.ui"); - nResult = aQueryBox.Execute(); + VclPtr aQueryBox(new MessageDialog(NULL, "JavaDisabledDialog", + "svt/ui/javadisableddialog.ui")); + nResult = aQueryBox->Execute(); if ( nResult == RET_YES ) { jfw_setEnabled(sal_True); @@ -182,12 +182,12 @@ void SAL_CALL JavaInteractionHandler::handle( const Reference< XInteractionReque SolarMutexGuard aSolarGuard; m_bVMCreationFailure_Handled = true; #ifdef MACOSX - MessageDialog aErrorBox(NULL, SvtResId(STR_ERROR_JVMCREATIONFAILED_MAC)); + VclPtr aErrorBox(new MessageDialog(NULL, SvtResId(STR_ERROR_JVMCREATIONFAILED_MAC))); #else - MessageDialog aErrorBox(NULL, SvtResId(STR_ERROR_JVMCREATIONFAILED)); + VclPtr aErrorBox(new MessageDialog(NULL, SvtResId(STR_ERROR_JVMCREATIONFAILED))); #endif - aErrorBox.SetText(SvtResId(STR_ERROR_JVMCREATIONFAILED_TITLE)); - nResult = aErrorBox.Execute(); + aErrorBox->SetText(SvtResId(STR_ERROR_JVMCREATIONFAILED_TITLE)); + nResult = aErrorBox->Execute(); } else { diff --git a/svx/source/dialog/_contdlg.cxx b/svx/source/dialog/_contdlg.cxx index 25016d30e241..ad604f2bc7c1 100644 --- a/svx/source/dialog/_contdlg.cxx +++ b/svx/source/dialog/_contdlg.cxx @@ -295,8 +295,8 @@ bool SvxSuperContourDlg::Close() if (m_pTbx1->IsItemEnabled(mnApplyId)) { - MessageDialog aQBox( this,"QuerySaveContourChangesDialog","svx/ui/querysavecontchangesdialog.ui"); - const long nRet = aQBox.Execute(); + VclPtr aQBox(new MessageDialog( this,"QuerySaveContourChangesDialog","svx/ui/querysavecontchangesdialog.ui") ); + const long nRet = aQBox->Execute(); if ( nRet == RET_YES ) { @@ -427,9 +427,9 @@ IMPL_LINK( SvxSuperContourDlg, Tbx1ClickHdl, ToolBox*, pTbx ) { if (m_pTbx1->IsItemChecked(mnWorkSpaceId)) { - MessageDialog aQBox( this,"QueryDeleteContourDialog","svx/ui/querydeletecontourdialog.ui"); + VclPtr aQBox(new MessageDialog( this,"QueryDeleteContourDialog","svx/ui/querydeletecontourdialog.ui" )); - if ( !m_pContourWnd->IsContourChanged() || ( aQBox.Execute() == RET_YES ) ) + if ( !m_pContourWnd->IsContourChanged() || ( aQBox->Execute() == RET_YES ) ) m_pContourWnd->SetWorkplaceMode( true ); else m_pTbx1->CheckItem(mnWorkSpaceId, false); @@ -501,10 +501,10 @@ IMPL_LINK( SvxSuperContourDlg, Tbx1ClickHdl, ToolBox*, pTbx ) m_pStbStatus->Invalidate(); else if ( bGraphicLinked ) { - MessageDialog aQBox(this, "QueryUnlinkGraphicsDialog", - "svx/ui/queryunlinkgraphicsdialog.ui"); + VclPtr aQBox(new MessageDialog(this, "QueryUnlinkGraphicsDialog", + "svx/ui/queryunlinkgraphicsdialog.ui")); - if (aQBox.Execute() != RET_YES) + if (aQBox->Execute() != RET_YES) { bPipette = false; m_pTbx1->CheckItem(mnPipetteId, bPipette); @@ -695,7 +695,7 @@ IMPL_LINK( SvxSuperContourDlg, PipetteClickHdl, ContourWindow*, pWnd ) if( !!aMask ) { - MessageDialog aQBox( this,"QueryNewContourDialog","svx/ui/querynewcontourdialog.ui"); + VclPtr aQBox(new MessageDialog( this,"QueryNewContourDialog","svx/ui/querynewcontourdialog.ui" )); bool bNewContour; aRedoGraphic = Graphic(); @@ -703,7 +703,7 @@ IMPL_LINK( SvxSuperContourDlg, PipetteClickHdl, ContourWindow*, pWnd ) aGraphic = Graphic( BitmapEx( aBmp, aMask ) ); nGrfChanged++; - bNewContour = ( aQBox.Execute() == RET_YES ); + bNewContour = ( aQBox->Execute() == RET_YES ); pWnd->SetGraphic( aGraphic, bNewContour ); if( bNewContour ) diff --git a/svx/source/dialog/docrecovery.cxx b/svx/source/dialog/docrecovery.cxx index 274bbaacd530..9542c99fcba4 100644 --- a/svx/source/dialog/docrecovery.cxx +++ b/svx/source/dialog/docrecovery.cxx @@ -831,8 +831,8 @@ void RecovDocList::InitEntry(SvTreeListEntry* pEntry, short impl_askUserForWizardCancel(vcl::Window* pParent, sal_Int16 nRes) { - MessageDialog aQuery(pParent, SVX_RES(nRes), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO); - if (aQuery.Execute() == RET_YES) + VclPtr aQuery(new MessageDialog(pParent, SVX_RES(nRes), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO)); + if (aQuery->Execute() == RET_YES) return DLG_RET_OK; else return DLG_RET_CANCEL; diff --git a/svx/source/dialog/imapdlg.cxx b/svx/source/dialog/imapdlg.cxx index d6c3e7e84b54..534b0168b3cd 100644 --- a/svx/source/dialog/imapdlg.cxx +++ b/svx/source/dialog/imapdlg.cxx @@ -234,8 +234,8 @@ bool SvxIMapDlg::Close() if ( m_pTbxIMapDlg1->IsItemEnabled( mnApplyId ) ) { - MessageDialog aQBox( this,"QueryModifyImageMapChangesDialog","svx/ui/querymodifyimagemapchangesdialog.ui"); - const long nRet = aQBox.Execute(); + VclPtr aQBox(new MessageDialog(this,"QueryModifyImageMapChangesDialog","svx/ui/querymodifyimagemapchangesdialog.ui")); + const long nRet = aQBox->Execute(); if( nRet == RET_YES ) { @@ -248,8 +248,8 @@ bool SvxIMapDlg::Close() } else if( pIMapWnd->IsChanged() ) { - MessageDialog aQBox( this,"QuerySaveImageMapChangesDialog","svx/ui/querysaveimagemapchangesdialog.ui"); - const long nRet = aQBox.Execute(); + VclPtr aQBox(new MessageDialog(this,"QuerySaveImageMapChangesDialog","svx/ui/querysaveimagemapchangesdialog.ui")); + const long nRet = aQBox->Execute(); if( nRet == RET_YES ) bRet = DoSave(); diff --git a/svx/source/form/databaselocationinput.cxx b/svx/source/form/databaselocationinput.cxx index 8e32e9ce7cb4..d59a5d7f51a5 100644 --- a/svx/source/form/databaselocationinput.cxx +++ b/svx/source/form/databaselocationinput.cxx @@ -128,8 +128,8 @@ namespace svx { if ( ::utl::UCBContentHelper::Exists( sURL ) ) { - QueryBox aBox( m_rLocationInput.GetSystemWindow(), WB_YES_NO, SVX_RESSTR(RID_STR_ALREADYEXISTOVERWRITE) ); - if ( aBox.Execute() != RET_YES ) + VclPtr aBox(new QueryBox( m_rLocationInput.GetSystemWindow(), WB_YES_NO, SVX_RESSTR(RID_STR_ALREADYEXISTOVERWRITE) ) ); + if ( aBox->Execute() != RET_YES ) return false; } } diff --git a/svx/source/form/datanavi.cxx b/svx/source/form/datanavi.cxx index 25545780fc62..148a747209de 100644 --- a/svx/source/form/datanavi.cxx +++ b/svx/source/form/datanavi.cxx @@ -469,12 +469,12 @@ namespace svxform DBG_ASSERT( xModel.is(), "XFormsPage::DoToolBoxAction(): Action without model" ); if ( DGTSubmission == m_eGroup ) { - AddSubmissionDialog aDlg( this, NULL, m_xUIHelper ); - if ( aDlg.Execute() == RET_OK && aDlg.GetNewSubmission().is() ) + VclPtr aDlg(new AddSubmissionDialog( this, NULL, m_xUIHelper )); + if ( aDlg->Execute() == RET_OK && aDlg->GetNewSubmission().is() ) { try { - Reference< css::xforms::XSubmission > xNewSubmission = aDlg.GetNewSubmission(); + Reference< css::xforms::XSubmission > xNewSubmission = aDlg->GetNewSubmission(); Reference< XSet > xSubmissions( xModel->getSubmissions(), UNO_QUERY ); xSubmissions->insert( makeAny( xNewSubmission ) ); Reference< XPropertySet > xNewPropSet( xNewSubmission, UNO_QUERY ); @@ -501,8 +501,8 @@ namespace svxform { if ( !m_sInstanceURL.isEmpty() ) { - LinkedInstanceWarningBox aMsgBox( this ); - if ( aMsgBox.Execute() != RET_OK ) + VclPtr aMsgBox(new LinkedInstanceWarningBox( this )); + if ( aMsgBox->Execute() != RET_OK ) return bHandled; } @@ -596,10 +596,10 @@ namespace svxform } } - AddDataItemDialog aDlg( this, pNode, m_xUIHelper ); - aDlg.SetText( SVX_RESSTR( nResId ) ); - aDlg.InitText( eType ); - short nReturn = aDlg.Execute(); + VclPtr aDlg(new AddDataItemDialog( this, pNode, m_xUIHelper )); + aDlg->SetText( SVX_RESSTR( nResId ) ); + aDlg->InitText( eType ); + short nReturn = aDlg->Execute(); if ( DGTInstance == m_eGroup ) { if ( RET_OK == nReturn ) @@ -664,12 +664,12 @@ namespace svxform { if ( DGTInstance == m_eGroup && !m_sInstanceURL.isEmpty() ) { - LinkedInstanceWarningBox aMsgBox( this ); - if ( aMsgBox.Execute() != RET_OK ) + VclPtr aMsgBox(new LinkedInstanceWarningBox( this )); + if ( aMsgBox->Execute() != RET_OK ) return bHandled; } - AddDataItemDialog aDlg( this, pNode, m_xUIHelper ); + VclPtr aDlg(new AddDataItemDialog( this, pNode, m_xUIHelper )); DataItemType eType = DITElement; sal_uInt16 nResId = RID_STR_DATANAV_EDIT_ELEMENT; if ( pNode && pNode->m_xNode.is() ) @@ -693,9 +693,9 @@ namespace svxform nResId = RID_STR_DATANAV_EDIT_BINDING; eType = DITBinding; } - aDlg.SetText( SVX_RESSTR( nResId ) ); - aDlg.InitText( eType ); - if ( aDlg.Execute() == RET_OK ) + aDlg->SetText( SVX_RESSTR( nResId ) ); + aDlg->InitText( eType ); + if ( aDlg->Execute() == RET_OK ) { // Set the new name OUString sNewName; @@ -735,9 +735,9 @@ namespace svxform } else { - AddSubmissionDialog aDlg( this, pNode, m_xUIHelper ); - aDlg.SetText( SVX_RESSTR( RID_STR_DATANAV_EDIT_SUBMISSION ) ); - if ( aDlg.Execute() == RET_OK ) + VclPtr aDlg(new AddSubmissionDialog( this, pNode, m_xUIHelper )); + aDlg->SetText( SVX_RESSTR( RID_STR_DATANAV_EDIT_SUBMISSION ) ); + if ( aDlg->Execute() == RET_OK ) { EditEntry( pNode->m_xPropSet ); bIsDocModified = true; @@ -750,8 +750,8 @@ namespace svxform bHandled = true; if ( DGTInstance == m_eGroup && !m_sInstanceURL.isEmpty() ) { - LinkedInstanceWarningBox aMsgBox( this ); - if ( aMsgBox.Execute() != RET_OK ) + VclPtr aMsgBox(new LinkedInstanceWarningBox( this )); + if ( aMsgBox->Execute() != RET_OK ) return bHandled; } bIsDocModified = RemoveEntry(); @@ -942,12 +942,12 @@ namespace svxform bool bIsElement = ( eChildType == css::xml::dom::NodeType_ELEMENT_NODE ); sal_uInt16 nResId = bIsElement ? RID_STR_QRY_REMOVE_ELEMENT : RID_STR_QRY_REMOVE_ATTRIBUTE; OUString sVar = bIsElement ? OUString(ELEMENTNAME) : OUString(ATTRIBUTENAME); - MessageDialog aQBox(this, SVX_RES(nResId), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO); - OUString sMessText = aQBox.get_primary_text(); + VclPtr aQBox(new MessageDialog(this, SVX_RES(nResId), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO)); + OUString sMessText = aQBox->get_primary_text(); sMessText = sMessText.replaceFirst( sVar, m_xUIHelper->getNodeDisplayName( pNode->m_xNode, sal_False ) ); - aQBox.set_primary_text(sMessText); - if ( aQBox.Execute() == RET_YES ) + aQBox->set_primary_text(sMessText); + if ( aQBox->Execute() == RET_YES ) { SvTreeListEntry* pParent = m_pItemList->GetParent( pEntry ); DBG_ASSERT( pParent, "XFormsPage::RemoveEntry(): no parent entry" ); @@ -984,12 +984,12 @@ namespace svxform { SAL_WARN( "svx.form", "XFormsPage::RemoveEntry(): exception caught" ); } - MessageDialog aQBox(this, SVX_RES(nResId), - VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO); - OUString sMessText = aQBox.get_primary_text(); + VclPtr aQBox(new MessageDialog(this, SVX_RES(nResId), + VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO)); + OUString sMessText = aQBox->get_primary_text(); sMessText = sMessText.replaceFirst( sSearch, sName); - aQBox.set_primary_text(sMessText); - if ( aQBox.Execute() == RET_YES ) + aQBox->set_primary_text(sMessText); + if ( aQBox->Execute() == RET_YES ) { try { @@ -1475,22 +1475,22 @@ namespace svxform OString sIdent(pBtn->GetCurItemIdent()); if (sIdent == "modelsadd") { - AddModelDialog aDlg( this, false ); + VclPtr aDlg(new AddModelDialog( this, false )); bool bShowDialog = true; while ( bShowDialog ) { bShowDialog = false; - if ( aDlg.Execute() == RET_OK ) + if ( aDlg->Execute() == RET_OK ) { - OUString sNewName = aDlg.GetName(); - bool bDocumentData = aDlg.GetModifyDoc(); + OUString sNewName = aDlg->GetName(); + bool bDocumentData = aDlg->GetModifyDoc(); if ( m_pModelsBox->GetEntryPos( sNewName ) != LISTBOX_ENTRY_NOTFOUND ) { // error: model name already exists - MessageDialog aErrBox( this, SVX_RES( RID_STR_DOUBLE_MODELNAME ) ); - aErrBox.set_primary_text(aErrBox.get_primary_text().replaceFirst(MSG_VARIABLE, sNewName)); - aErrBox.Execute(); + VclPtr aErrBox(new MessageDialog( this, SVX_RES( RID_STR_DOUBLE_MODELNAME ) )); + aErrBox->set_primary_text(aErrBox->get_primary_text().replaceFirst(MSG_VARIABLE, sNewName)); + aErrBox->Execute(); bShowDialog = true; } else @@ -1521,8 +1521,8 @@ namespace svxform } else if (sIdent == "modelsedit") { - AddModelDialog aDlg( this, true ); - aDlg.SetName( sSelectedModel ); + VclPtr aDlg(new AddModelDialog( this, true )); + aDlg->SetName( sSelectedModel ); bool bDocumentData( false ); try @@ -1539,13 +1539,13 @@ namespace svxform { DBG_UNHANDLED_EXCEPTION(); } - aDlg.SetModifyDoc( bDocumentData ); + aDlg->SetModifyDoc( bDocumentData ); - if ( aDlg.Execute() == RET_OK ) + if ( aDlg->Execute() == RET_OK ) { - if ( aDlg.GetModifyDoc() != bool( bDocumentData ) ) + if ( aDlg->GetModifyDoc() != bool( bDocumentData ) ) { - bDocumentData = aDlg.GetModifyDoc(); + bDocumentData = aDlg->GetModifyDoc(); try { Reference< css::xforms::XFormsSupplier > xFormsSupp( m_xFrameModel, UNO_QUERY_THROW ); @@ -1562,7 +1562,7 @@ namespace svxform } } - OUString sNewName = aDlg.GetName(); + OUString sNewName = aDlg->GetName(); if ( !sNewName.isEmpty() && ( sNewName != sSelectedModel ) ) { try @@ -1583,12 +1583,12 @@ namespace svxform } else if (sIdent == "modelsremove") { - MessageDialog aQBox(this, SVX_RES( RID_STR_QRY_REMOVE_MODEL), - VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO); - OUString sText = aQBox.get_primary_text(); + VclPtr aQBox(new MessageDialog(this, SVX_RES( RID_STR_QRY_REMOVE_MODEL), + VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO)); + OUString sText = aQBox->get_primary_text(); sText = sText.replaceFirst( MODELNAME, sSelectedModel ); - aQBox.set_primary_text(sText); - if ( aQBox.Execute() == RET_YES ) + aQBox->set_primary_text(sText); + if ( aQBox->Execute() == RET_YES ) { try { @@ -1616,13 +1616,13 @@ namespace svxform OString sIdent(pBtn->GetCurItemIdent()); if (sIdent == "instancesadd") { - AddInstanceDialog aDlg( this, false ); - if ( aDlg.Execute() == RET_OK ) + VclPtr aDlg(new AddInstanceDialog( this, false )); + if ( aDlg->Execute() == RET_OK ) { sal_uInt16 nInst = GetNewPageId(); - OUString sName = aDlg.GetName(); - OUString sURL = aDlg.GetURL(); - bool bLinkOnce = aDlg.IsLinkInstance(); + OUString sName = aDlg->GetName(); + OUString sURL = aDlg->GetURL(); + bool bLinkOnce = aDlg->IsLinkInstance(); try { Reference< css::xml::dom::XDocument > xNewInst = @@ -1648,16 +1648,16 @@ namespace svxform XFormsPage* pPage = GetCurrentPage( nId ); if ( pPage ) { - AddInstanceDialog aDlg( this, true ); - aDlg.SetName( pPage->GetInstanceName() ); - aDlg.SetURL( pPage->GetInstanceURL() ); - aDlg.SetLinkInstance( pPage->GetLinkOnce() ); - OUString sOldName = aDlg.GetName(); - if ( aDlg.Execute() == RET_OK ) + VclPtr aDlg(new AddInstanceDialog( this, true )); + aDlg->SetName( pPage->GetInstanceName() ); + aDlg->SetURL( pPage->GetInstanceURL() ); + aDlg->SetLinkInstance( pPage->GetLinkOnce() ); + OUString sOldName = aDlg->GetName(); + if ( aDlg->Execute() == RET_OK ) { - OUString sNewName = aDlg.GetName(); - OUString sURL = aDlg.GetURL(); - bool bLinkOnce = aDlg.IsLinkInstance(); + OUString sNewName = aDlg->GetName(); + OUString sURL = aDlg->GetURL(); + bool bLinkOnce = aDlg->IsLinkInstance(); try { xUIHelper->renameInstance( sOldName, @@ -1684,12 +1684,12 @@ namespace svxform if ( pPage ) { OUString sInstName = pPage->GetInstanceName(); - MessageDialog aQBox(this, SVX_RES(RID_STR_QRY_REMOVE_INSTANCE), - VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO); - OUString sMessText = aQBox.get_primary_text(); + VclPtr aQBox(new MessageDialog(this, SVX_RES(RID_STR_QRY_REMOVE_INSTANCE), + VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO)); + OUString sMessText = aQBox->get_primary_text(); sMessText = sMessText.replaceFirst( INSTANCENAME, sInstName ); - aQBox.set_primary_text(sMessText); - if ( aQBox.Execute() == RET_YES ) + aQBox->set_primary_text(sMessText); + if ( aQBox->Execute() == RET_YES ) { bool bDoRemove = false; if (IsAdditionalPage(nId)) @@ -2364,7 +2364,7 @@ namespace svxform sPropName = PN_READONLY_EXPR; else if (m_pCalculateBtn == pBtn) sPropName = PN_CALCULATE_EXPR; - AddConditionDialog aDlg( this, sPropName, m_xTempBinding ); + VclPtr aDlg(new AddConditionDialog(this, sPropName, m_xTempBinding)); bool bIsDefBtn = ( m_pDefaultBtn == pBtn ); OUString sCondition; if ( bIsDefBtn ) @@ -2376,11 +2376,11 @@ namespace svxform sTemp = TRUE_VALUE; sCondition = sTemp; } - aDlg.SetCondition( sCondition ); + aDlg->SetCondition( sCondition ); - if ( aDlg.Execute() == RET_OK ) + if ( aDlg->Execute() == RET_OK ) { - OUString sNewCondition = aDlg.GetCondition(); + OUString sNewCondition = aDlg->GetCondition(); if ( bIsDefBtn ) m_pDefaultED->SetText( sNewCondition ); else @@ -2438,9 +2438,9 @@ namespace svxform ( bIsHandleBinding && sNewName.isEmpty() ) ) { // Error and don't close the dialog - MessageDialog aErrBox( this, SVX_RES( RID_STR_INVALID_XMLNAME ) ); - aErrBox.set_primary_text(aErrBox.get_primary_text().replaceFirst(MSG_VARIABLE, sNewName)); - aErrBox.Execute(); + VclPtr aErrBox(new MessageDialog( this, SVX_RES( RID_STR_INVALID_XMLNAME ) ) ); + aErrBox->set_primary_text(aErrBox->get_primary_text().replaceFirst(MSG_VARIABLE, sNewName)); + aErrBox->Execute(); return 0; } @@ -2791,8 +2791,8 @@ namespace svxform { SAL_WARN( "svx.form", "AddDataItemDialog::EditHdl(): exception caught" ); } - NamespaceItemDialog aDlg( this, xNameContnr ); - aDlg.Execute(); + VclPtr aDlg(new NamespaceItemDialog( this, xNameContnr ) ); + aDlg->Execute(); try { m_xBinding->setPropertyValue( PN_BINDING_NAMESPACES, makeAny( xNameContnr ) ); @@ -2916,32 +2916,32 @@ namespace svxform { if ( m_pAddNamespaceBtn == pBtn ) { - ManageNamespaceDialog aDlg( this, m_pConditionDlg, false ); - if ( aDlg.Execute() == RET_OK ) + VclPtr aDlg( new ManageNamespaceDialog(this, m_pConditionDlg, false) ); + if ( aDlg->Execute() == RET_OK ) { - OUString sEntry = aDlg.GetPrefix(); + OUString sEntry = aDlg->GetPrefix(); sEntry += "\t"; - sEntry += aDlg.GetURL(); + sEntry += aDlg->GetURL(); m_pNamespacesList->InsertEntry( sEntry ); } } else if ( m_pEditNamespaceBtn == pBtn ) { - ManageNamespaceDialog aDlg( this, m_pConditionDlg, true ); + VclPtr aDlg(new ManageNamespaceDialog( this, m_pConditionDlg, true )); SvTreeListEntry* pEntry = m_pNamespacesList->FirstSelected(); DBG_ASSERT( pEntry, "NamespaceItemDialog::ClickHdl(): no entry" ); OUString sPrefix( SvTabListBox::GetEntryText( pEntry, 0 ) ); - aDlg.SetNamespace( + aDlg->SetNamespace( sPrefix, SvTabListBox::GetEntryText( pEntry, 1 ) ); - if ( aDlg.Execute() == RET_OK ) + if ( aDlg->Execute() == RET_OK ) { // if a prefix was changed, mark the old prefix as 'removed' - if( sPrefix != aDlg.GetPrefix() ) + if( sPrefix != aDlg->GetPrefix() ) m_aRemovedList.push_back( sPrefix ); - m_pNamespacesList->SetEntryText( aDlg.GetPrefix(), pEntry, 0 ); - m_pNamespacesList->SetEntryText( aDlg.GetURL(), pEntry, 1 ); + m_pNamespacesList->SetEntryText( aDlg->GetPrefix(), pEntry, 0 ); + m_pNamespacesList->SetEntryText( aDlg->GetURL(), pEntry, 1 ); } } else if ( m_pDeleteNamespaceBtn == pBtn ) @@ -3048,9 +3048,9 @@ namespace svxform { if ( !m_pConditionDlg->GetUIHelper()->isValidPrefixName( sPrefix ) ) { - MessageDialog aErrBox( this, SVX_RES( RID_STR_INVALID_XMLPREFIX ) ); - aErrBox.set_primary_text(aErrBox.get_primary_text().replaceFirst(MSG_VARIABLE, sPrefix)); - aErrBox.Execute(); + VclPtr aErrBox(new MessageDialog(this, SVX_RES( RID_STR_INVALID_XMLPREFIX ) ) ); + aErrBox->set_primary_text(aErrBox->get_primary_text().replaceFirst(MSG_VARIABLE, sPrefix)); + aErrBox->Execute(); return 0; } } @@ -3103,10 +3103,10 @@ namespace svxform IMPL_LINK_NOARG(AddSubmissionDialog, RefHdl) { - AddConditionDialog aDlg( this, PN_BINDING_EXPR, m_xTempBinding ); - aDlg.SetCondition( m_pRefED->GetText() ); - if ( aDlg.Execute() == RET_OK ) - m_pRefED->SetText( aDlg.GetCondition() ); + VclPtr aDlg(new AddConditionDialog(this, PN_BINDING_EXPR, m_xTempBinding )); + aDlg->SetCondition( m_pRefED->GetText() ); + if ( aDlg->Execute() == RET_OK ) + m_pRefED->SetText( aDlg->GetCondition() ); return 0; } @@ -3117,9 +3117,9 @@ namespace svxform OUString sName(m_pNameED->GetText()); if(sName.isEmpty()) { - MessageDialog aErrorBox(this,SVX_RES(RID_STR_EMPTY_SUBMISSIONNAME)); - aErrorBox.set_primary_text( Application::GetDisplayName() ); - aErrorBox.Execute(); + VclPtr aErrorBox(new MessageDialog(this,SVX_RES(RID_STR_EMPTY_SUBMISSIONNAME))); + aErrorBox->set_primary_text( Application::GetDisplayName() ); + aErrorBox->Execute(); return 0; } diff --git a/svx/source/form/fmshell.cxx b/svx/source/form/fmshell.cxx index fa95fc6e0061..e2e04b261870 100644 --- a/svx/source/form/fmshell.cxx +++ b/svx/source/form/fmshell.cxx @@ -269,9 +269,9 @@ bool FmFormShell::PrepareClose(bool bUI) if ( bModified && bUI ) { - MessageDialog aQry(NULL, "SaveModifiedDialog", - "svx/ui/savemodifieddialog.ui"); - switch (aQry.Execute()) + VclPtr aQry(new MessageDialog(NULL, "SaveModifiedDialog", + "svx/ui/savemodifieddialog.ui")); + switch (aQry->Execute()) { case RET_NO: bModified = false; diff --git a/svx/source/tbxctrls/grafctrl.cxx b/svx/source/tbxctrls/grafctrl.cxx index 9eb9e5b5cce3..e03c344a5c0f 100644 --- a/svx/source/tbxctrls/grafctrl.cxx +++ b/svx/source/tbxctrls/grafctrl.cxx @@ -732,23 +732,23 @@ void SvxGrafAttrHelper::ExecuteGrafAttr( SfxRequest& rReq, SdrView& rView ) aCropDlgAttr.Put( SdrGrafCropItem( aLTSize.Width(), aLTSize.Height(), aRBSize.Width(), aRBSize.Height() ) ); - SfxSingleTabDialog aCropDialog( + VclPtr aCropDialog(new SfxSingleTabDialog( SfxViewShell::Current() ? SfxViewShell::Current()->GetWindow() : NULL, - aCropDlgAttr); + aCropDlgAttr)); const OUString aCropStr(SVX_RESSTR(RID_SVXSTR_GRAFCROP)); SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create(); assert(pFact && "Dialog creation failed!"); ::CreateTabPage fnCreatePage = pFact->GetTabPageCreatorFunc( RID_SVXPAGE_GRFCROP ); assert(fnCreatePage && "Dialog creation failed!"); - SfxTabPage* pTabPage = (*fnCreatePage)( aCropDialog.get_content_area(), &aCropDlgAttr ); + SfxTabPage* pTabPage = (*fnCreatePage)( aCropDialog->get_content_area(), &aCropDlgAttr ); pTabPage->SetText( aCropStr ); - aCropDialog.SetTabPage( pTabPage ); + aCropDialog->SetTabPage( pTabPage ); - if( aCropDialog.Execute() == RET_OK ) + if( aCropDialog->Execute() == RET_OK ) { - const SfxItemSet* pOutAttr = aCropDialog.GetOutputItemSet(); + const SfxItemSet* pOutAttr = aCropDialog->GetOutputItemSet(); if( pOutAttr ) { diff --git a/svx/source/toolbars/extrusionbar.cxx b/svx/source/toolbars/extrusionbar.cxx index 70fbe737279d..91d16780b27c 100644 --- a/svx/source/toolbars/extrusionbar.cxx +++ b/svx/source/toolbars/extrusionbar.cxx @@ -583,11 +583,11 @@ void ExtrusionBar::execute( SdrView* pSdrView, SfxRequest& rReq, SfxBindings& rB double fDepth = static_cast(rReq.GetArgs()->GetItem(SID_EXTRUSION_DEPTH))->GetValue(); FieldUnit eUnit = (FieldUnit)static_cast(rReq.GetArgs()->GetItem(SID_ATTR_METRIC))->GetValue(); - ExtrusionDepthDialog aDlg( 0L, fDepth, eUnit ); - sal_uInt16 nRet = aDlg.Execute(); + VclPtr aDlg(new ExtrusionDepthDialog(0L, fDepth, eUnit)); + sal_uInt16 nRet = aDlg->Execute(); if( nRet != 0 ) { - fDepth = aDlg.getDepth(); + fDepth = aDlg->getDepth(); SvxDoubleItem aItem( fDepth, SID_EXTRUSION_DEPTH ); SfxPoolItem* aItems[] = { &aItem, 0 }; diff --git a/svx/source/toolbars/fontworkbar.cxx b/svx/source/toolbars/fontworkbar.cxx index 9177eb8db70a..0948dcbc1fbc 100644 --- a/svx/source/toolbars/fontworkbar.cxx +++ b/svx/source/toolbars/fontworkbar.cxx @@ -432,8 +432,8 @@ void FontworkBar::execute( SdrView* pSdrView, SfxRequest& rReq, SfxBindings& rBi { case SID_FONTWORK_GALLERY_FLOATER: { - FontWorkGalleryDialog aDlg( pSdrView, ImpGetViewWin(pSdrView), nSID ); - aDlg.Execute(); + VclPtr aDlg(new FontWorkGalleryDialog( pSdrView, ImpGetViewWin(pSdrView), nSID ) ); + aDlg->Execute(); } break; @@ -491,11 +491,11 @@ void FontworkBar::execute( SdrView* pSdrView, SfxRequest& rReq, SfxBindings& rBi if( rReq.GetArgs() && ( rReq.GetArgs()->GetItemState( SID_FONTWORK_CHARACTER_SPACING ) == SfxItemState::SET ) ) { sal_Int32 nCharSpacing = static_cast(rReq.GetArgs()->GetItem(SID_FONTWORK_CHARACTER_SPACING))->GetValue(); - FontworkCharacterSpacingDialog aDlg( 0L, nCharSpacing ); - sal_uInt16 nRet = aDlg.Execute(); + VclPtr aDlg(new FontworkCharacterSpacingDialog( 0L, nCharSpacing ) ); + sal_uInt16 nRet = aDlg->Execute(); if( nRet != 0 ) { - SfxInt32Item aItem( SID_FONTWORK_CHARACTER_SPACING, aDlg.getScale() ); + SfxInt32Item aItem( SID_FONTWORK_CHARACTER_SPACING, aDlg->getScale() ); SfxPoolItem* aItems[] = { &aItem, 0 }; rBindings.Execute( SID_FONTWORK_CHARACTER_SPACING, (const SfxPoolItem**)aItems ); } diff --git a/svx/workben/pixelctl.cxx b/svx/workben/pixelctl.cxx index 414448819e8b..731e6dc843a1 100644 --- a/svx/workben/pixelctl.cxx +++ b/svx/workben/pixelctl.cxx @@ -98,9 +98,9 @@ public: void Main() { - MyWin aMainWin( NULL, WB_STDWORK ); - aMainWin.SetText( OUString( "SvxPixelCtl" ) ); - aMainWin.Show(); + VclPtr aMainWin(new MyWin( NULL, WB_STDWORK )); + aMainWin->SetText( OUString( "SvxPixelCtl" ) ); + aMainWin->Show(); Application::Execute(); } diff --git a/sw/qa/tiledrendering/tiledrendering.cxx b/sw/qa/tiledrendering/tiledrendering.cxx new file mode 100644 index 000000000000..f3c245db2d0e --- /dev/null +++ b/sw/qa/tiledrendering/tiledrendering.cxx @@ -0,0 +1,202 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +using namespace ::com::sun::star; +using namespace ::com::sun::star::uno; +using namespace ::com::sun::star::ui::dialogs; +using namespace ::sfx2; + +class TiledRenderingApp : public Application +{ +private: + uno::Reference xContext; + uno::Reference xFactory; + uno::Reference xSFactory; + uno::Reference xDesktop; + uno::Reference xLoader; + uno::Reference xComponent; +public: + virtual void Init() SAL_OVERRIDE; + virtual int Main() SAL_OVERRIDE; + void Open(OUString & aFileUrl); +}; + +class TiledRenderingDialog: public ModalDialog +{ +private: + TiledRenderingApp *mpApp; + NumericField *mpContextWidth; + NumericField *mpContextHeight; + NumericField *mpTilePosX; + NumericField *mpTilePosY; + NumericField *mpTileWidth; + NumericField *mpTileHeight; + FixedImage *mpImage; + +public: + TiledRenderingDialog(TiledRenderingApp * app) : + ModalDialog(DIALOG_NO_PARENT, "TiledRendering", "qa/sw/ui/tiledrendering.ui"), + mpApp(app) + { + PushButton * renderButton; + get(renderButton, "buttonRenderTile"); + renderButton->SetClickHdl( LINK( this, TiledRenderingDialog, RenderHdl)); + + PushButton * chooseDocumentButton; + get(chooseDocumentButton, "buttonChooseDocument"); + chooseDocumentButton->SetClickHdl( LINK( this, TiledRenderingDialog, ChooseDocumentHdl)); + + SetStyle(GetStyle()|WB_CLOSEABLE); + + get(mpContextWidth, "spinContextWidth"); + get(mpContextHeight, "spinContextHeight"); + get(mpTilePosX, "spinTilePosX"); + get(mpTilePosY, "spinTilePosY"); + get(mpTileWidth, "spinTileWidth"); + get(mpTileHeight, "spinTileHeight"); + get(mpImage, "imageTile"); + } + + virtual ~TiledRenderingDialog() + { + } + + DECL_LINK ( RenderHdl, Button * ); + DECL_LINK ( ChooseDocumentHdl, Button * ); +}; + +IMPL_LINK ( TiledRenderingDialog, RenderHdl, Button *, EMPTYARG ) +{ + int contextWidth = mpContextWidth->GetValue(); + int contextHeight = mpContextHeight->GetValue(); + int tilePosX = mpTilePosX->GetValue(); + int tilePosY = mpTilePosY->GetValue(); + long tileWidth = mpTileWidth->GetValue(); + long tileHeight = mpTileHeight->GetValue(); + + // do the same thing we are doing in touch_lo_draw_tile() + SwWrtShell *pViewShell = GetActiveWrtShell(); + + if (pViewShell) + { + // TODO create a VirtualDevice based on SystemGraphicsData instead so + // that we get direct rendering; something like: + // + // SystemGraphicsData aData; + // [setup the aData] + // VirtualDevice aDevice(&aData, [color depth]); + VirtualDevice aDevice; + + // paint to it + pViewShell->PaintTile(aDevice, contextWidth, contextHeight, tilePosX, tilePosY, tileWidth, tileHeight); + + // copy the aDevice content to mpImage + Bitmap aBitmap(aDevice.GetBitmap(aDevice.PixelToLogic(Point(0,0)), aDevice.PixelToLogic(Size(contextWidth, contextHeight)))); + mpImage->SetImage(Image(aBitmap)); + + // update the dialog size + setOptimalLayoutSize(); + } + + return 1; +} + +IMPL_LINK ( TiledRenderingDialog, ChooseDocumentHdl, Button *, EMPTYARG ) +{ + FileDialogHelper aDlgHelper( TemplateDescription::FILEOPEN_SIMPLE, 0 ); + uno::Reference < XFilePicker > xFP = aDlgHelper.GetFilePicker(); + if( aDlgHelper.Execute() == ERRCODE_NONE ) + { + OUString aFileUrl =xFP->getFiles().getConstArray()[0]; + mpApp->Open(aFileUrl); + } + return 1; +} + +void TiledRenderingApp::Open(OUString & aFileUrl) +{ + static const char TARGET[] = "_default"; + static const Sequence PROPS (0); + if(xComponent.get()) + { + xComponent->dispose(); + xComponent.clear(); + } + xComponent.set(xLoader->loadComponentFromURL(aFileUrl, TARGET, 0, PROPS)); +} + +void TiledRenderingApp::Init() +{ + xContext.set(cppu::defaultBootstrap_InitialComponentContext()); + xFactory.set(xContext->getServiceManager()); + xSFactory.set(uno::Reference (xFactory, uno::UNO_QUERY_THROW)); + comphelper::setProcessServiceFactory(xSFactory); + + // Create UCB (for backwards compatibility, in case some code still uses + // plain createInstance w/o args directly to obtain an instance): + ::ucb::UniversalContentBroker::create(comphelper::getProcessComponentContext() ); + + xDesktop.set(xFactory->createInstanceWithContext(OUString("com.sun.star.frame.Desktop"), xContext)); + xLoader.set(frame::Desktop::create(xContext)); +} + +int TiledRenderingApp::Main() +{ + if(GetCommandLineParamCount()>0) + { + OUString aFileUrl; + osl::File::getFileURLFromSystemPath(GetCommandLineParam(0), aFileUrl); + Open(aFileUrl); + } + Help::EnableQuickHelp(); + try + { + VclPtr pDialog(new TiledRenderingDialog(this)); + pDialog->Execute(); + } + catch (const uno::Exception &e) + { + fprintf(stderr, "fatal error: %s\n", OUStringToOString(e.Message, osl_getThreadTextEncoding()).getStr()); + } + return EXIT_SUCCESS; +} + +void vclmain::createApplication() +{ + static TiledRenderingApp aApp; +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/core/doc/DocumentRedlineManager.cxx b/sw/source/core/doc/DocumentRedlineManager.cxx index ba5ddad31282..b5c28bad182a 100644 --- a/sw/source/core/doc/DocumentRedlineManager.cxx +++ b/sw/source/core/doc/DocumentRedlineManager.cxx @@ -2665,8 +2665,8 @@ void DocumentRedlineManager::checkRedlining(RedlineMode_t& _rReadlineMode) if ( pParent && !mbReadlineChecked && rRedlineTbl.size() > MAX_REDLINE_COUNT && !((_rReadlineMode & nsRedlineMode_t::REDLINE_SHOW_DELETE) == nsRedlineMode_t::REDLINE_SHOW_DELETE) ) { - MessageDialog aQuery(pParent, "QueryShowChangesDialog", "modules/swriter/ui/queryshowchangesdialog.ui"); - sal_uInt16 nResult = aQuery.Execute(); + VclPtr aQuery(new MessageDialog(pParent, "QueryShowChangesDialog", "modules/swriter/ui/queryshowchangesdialog.ui")); + sal_uInt16 nResult = aQuery->Execute(); mbReadlineChecked = true; if ( nResult == RET_YES ) { diff --git a/sw/source/ui/config/mailconfigpage.cxx b/sw/source/ui/config/mailconfigpage.cxx index 7a70e375a4c7..4b006c0a1381 100644 --- a/sw/source/ui/config/mailconfigpage.cxx +++ b/sw/source/ui/config/mailconfigpage.cxx @@ -204,8 +204,8 @@ IMPL_LINK(SwMailConfigPage, ReplyToHdl, CheckBox*, pBox) IMPL_LINK_NOARG(SwMailConfigPage, AuthenticationHdl) { - SwAuthenticationSettingsDialog aDlg(this, *m_pConfigItem); - aDlg.Execute(); + VclPtr aDlg(new SwAuthenticationSettingsDialog(this, *m_pConfigItem)); + aDlg->Execute(); return 0; } diff --git a/sw/source/ui/config/optcomp.cxx b/sw/source/ui/config/optcomp.cxx index a826fd02cb6d..a0deaa471e9a 100644 --- a/sw/source/ui/config/optcomp.cxx +++ b/sw/source/ui/config/optcomp.cxx @@ -315,9 +315,9 @@ IMPL_LINK_NOARG(SwCompatibilityOptPage, SelectHdl) IMPL_LINK_NOARG(SwCompatibilityOptPage, UseAsDefaultHdl) { - MessageDialog aQuery(this, "QueryDefaultCompatDialog", - "modules/swriter/ui/querydefaultcompatdialog.ui"); - if (aQuery.Execute() == RET_YES) + VclPtr aQuery(new MessageDialog(this, "QueryDefaultCompatDialog", + "modules/swriter/ui/querydefaultcompatdialog.ui")); + if (aQuery->Execute() == RET_YES) { for ( vector< CompatibilityItem >::iterator pItem = m_pImpl->m_aList.begin(); pItem != m_pImpl->m_aList.end(); ++pItem ) diff --git a/sw/source/ui/dbui/mmoutputpage.cxx b/sw/source/ui/dbui/mmoutputpage.cxx index a08e1033a36d..c75a8d6afce6 100644 --- a/sw/source/ui/dbui/mmoutputpage.cxx +++ b/sw/source/ui/dbui/mmoutputpage.cxx @@ -695,12 +695,12 @@ IMPL_LINK(SwMailMergeOutputPage, SaveOutputHdl_Impl, PushButton*, pButton) } SwView* pSourceView = rConfigItem.GetSourceView(); - PrintMonitor aSaveMonitor(this, false, PrintMonitor::MONITOR_TYPE_SAVE); - aSaveMonitor.m_pDocName->SetText(pSourceView->GetDocShell()->GetTitle(22)); - aSaveMonitor.SetCancelHdl(LINK(this, SwMailMergeOutputPage, SaveCancelHdl_Impl)); - aSaveMonitor.m_pPrinter->SetText( INetURLObject( sPath ).getFSysPath( INetURLObject::FSYS_DETECT ) ); + VclPtr aSaveMonitor(this, false, PrintMonitor::MONITOR_TYPE_SAVE); + aSaveMonitor->m_pDocName->SetText(pSourceView->GetDocShell()->GetTitle(22)); + aSaveMonitor->SetCancelHdl(LINK(this, SwMailMergeOutputPage, SaveCancelHdl_Impl)); + aSaveMonitor->m_pPrinter->SetText( INetURLObject( sPath ).getFSysPath( INetURLObject::FSYS_DETECT ) ); m_bCancelSaving = false; - aSaveMonitor.Show(); + aSaveMonitor->Show(); m_pWizard->enableButtons(WZB_CANCEL, false); for(sal_uInt32 nDoc = nBegin; nDoc < nEnd && !m_bCancelSaving; ++nDoc) @@ -713,7 +713,7 @@ IMPL_LINK(SwMailMergeOutputPage, SaveOutputHdl_Impl, PushButton*, pButton) sPath += "." + sExtension; } OUString sStat = OUString(SW_RES(STR_STATSTR_LETTER)) + " " + OUString::number( nDoc ); - aSaveMonitor.m_pPrintInfo->SetText(sStat); + aSaveMonitor->m_pPrintInfo->SetText(sStat); //now extract a document from the target document // the shell will be closed at the end, but it is more safe to use SfxObjectShellLock here @@ -761,9 +761,9 @@ IMPL_LINK(SwMailMergeOutputPage, SaveOutputHdl_Impl, PushButton*, pButton) if(bFailed) { - SwSaveWarningBox_Impl aWarning( pButton, sOutPath ); - if(RET_OK == aWarning.Execute()) - sOutPath = aWarning.GetFileName(); + VclPtr aWarning(new SwSaveWarningBox_Impl( pButton, sOutPath )); + if(RET_OK == aWarning->Execute()) + sOutPath = aWarning->GetFileName(); else { xTempDocShell->DoClose(); @@ -945,8 +945,8 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton) if(rConfigItem.GetMailServer().isEmpty() || !SwMailMergeHelper::CheckMailAddress(rConfigItem.GetMailAddress()) ) { - QueryBox aQuery(pButton, WB_YES_NO_CANCEL, m_sConfigureMail); - sal_uInt16 nRet = aQuery.Execute(); + VclPtr aQuery(new QueryBox(pButton, WB_YES_NO_CANCEL, m_sConfigureMail)); + sal_uInt16 nRet = aQuery->Execute(); if(RET_YES == nRet ) { SfxAllItemSet aSet(pTargetView->GetPool()); @@ -1039,26 +1039,26 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton) if(m_pSubjectED->GetText().isEmpty()) { - SwSendQueryBox_Impl aQuery(pButton, "SubjectDialog", - "modules/swriter/ui/subjectdialog.ui"); - aQuery.SetIsEmptyTextAllowed(true); - aQuery.SetValue(m_sNoSubjectST); - if(RET_OK == aQuery.Execute()) + VclPtr aQuery(new SwSendQueryBox_Impl(pButton, "SubjectDialog", + "modules/swriter/ui/subjectdialog.ui")); + aQuery->SetIsEmptyTextAllowed(true); + aQuery->SetValue(m_sNoSubjectST); + if(RET_OK == aQuery->Execute()) { - if(aQuery.GetValue() != m_sNoSubjectST) - m_pSubjectED->SetText(aQuery.GetValue()); + if(aQuery->GetValue() != m_sNoSubjectST) + m_pSubjectED->SetText(aQuery->GetValue()); } else return 0; } if(!bAsBody && m_pAttachmentED->GetText().isEmpty()) { - SwSendQueryBox_Impl aQuery(pButton, "AttachNameDialog", - "modules/swriter/ui/attachnamedialog.ui"); - aQuery.SetIsEmptyTextAllowed(false); - if(RET_OK == aQuery.Execute()) + VclPtr aQuery(new SwSendQueryBox_Impl(pButton, "AttachNameDialog", + "modules/swriter/ui/attachnamedialog.ui")); + aQuery->SetIsEmptyTextAllowed(false); + if(RET_OK == aQuery->Execute()) { - OUString sAttach(aQuery.GetValue()); + OUString sAttach(aQuery->GetValue()); sal_Int32 nTokenCount = comphelper::string::getTokenCount(sAttach, '.'); if (2 > nTokenCount) { diff --git a/sw/source/ui/dialog/uiregionsw.cxx b/sw/source/ui/dialog/uiregionsw.cxx index 68ece3831ec5..8d16c7aae2df 100644 --- a/sw/source/ui/dialog/uiregionsw.cxx +++ b/sw/source/ui/dialog/uiregionsw.cxx @@ -404,11 +404,11 @@ bool SwEditRegionDlg::CheckPasswd(CheckBox* pBox) if (!pRepr->GetTempPasswd().getLength() && pRepr->GetSectionData().GetPassword().getLength()) { - SfxPasswordDialog aPasswdDlg(this); + VclPtr aPasswdDlg(new SfxPasswordDialog(this)); bRet = false; - if (aPasswdDlg.Execute()) + if (aPasswdDlg->Execute()) { - const OUString sNewPasswd( aPasswdDlg.GetPassword() ); + const OUString sNewPasswd( aPasswdDlg->GetPassword() ); ::com::sun::star::uno::Sequence aNewPasswd; SvPasswordHelper::GetHashPassword( aNewPasswd, sNewPasswd ); if (SvPasswordHelper::CompareHashPassword( @@ -1059,10 +1059,10 @@ IMPL_LINK_NOARG(SwEditRegionDlg, OptionsHdl) aSet.Put(SwFmtFrmSize(ATT_VAR_SIZE, nWidth)); aSet.Put(SvxSizeItem(SID_ATTR_PAGE_SIZE, Size(nWidth, nWidth))); - SwSectionPropertyTabDialog aTabDlg(this, aSet, rSh); - if(RET_OK == aTabDlg.Execute()) + VclPtr aTabDlg(new SwSectionPropertyTabDialog(this, aSet, rSh)); + if(RET_OK == aTabDlg->Execute()) { - const SfxItemSet* pOutSet = aTabDlg.GetOutputItemSet(); + const SfxItemSet* pOutSet = aTabDlg->GetOutputItemSet(); if( pOutSet && pOutSet->Count() ) { const SfxPoolItem *pColItem, *pBrushItem, @@ -1238,12 +1238,12 @@ IMPL_LINK( SwEditRegionDlg, ChangePasswdHdl, Button *, pBox ) { if(!pRepr->GetTempPasswd().getLength() || bChange) { - SfxPasswordDialog aPasswdDlg(this); - aPasswdDlg.ShowExtras(SHOWEXTRAS_CONFIRM); - if(RET_OK == aPasswdDlg.Execute()) + VclPtr aPasswdDlg(new SfxPasswordDialog(this)); + aPasswdDlg->ShowExtras(SHOWEXTRAS_CONFIRM); + if(RET_OK == aPasswdDlg->Execute()) { - const OUString sNewPasswd( aPasswdDlg.GetPassword() ); - if( aPasswdDlg.GetConfirm() == sNewPasswd ) + const OUString sNewPasswd( aPasswdDlg->GetPassword() ); + if( aPasswdDlg->GetConfirm() == sNewPasswd ) { SvPasswordHelper::GetHashPassword( pRepr->GetTempPasswd(), sNewPasswd ); } @@ -1682,12 +1682,12 @@ IMPL_LINK( SwInsertSectionTabPage, ChangePasswdHdl, Button *, pButton ) { if(!m_aNewPasswd.getLength() || bChange) { - SfxPasswordDialog aPasswdDlg(this); - aPasswdDlg.ShowExtras(SHOWEXTRAS_CONFIRM); - if(RET_OK == aPasswdDlg.Execute()) + VclPtr aPasswdDlg(new SfxPasswordDialog(this)); + aPasswdDlg->ShowExtras(SHOWEXTRAS_CONFIRM); + if(RET_OK == aPasswdDlg->Execute()) { - const OUString sNewPasswd( aPasswdDlg.GetPassword() ); - if( aPasswdDlg.GetConfirm() == sNewPasswd ) + const OUString sNewPasswd( aPasswdDlg->GetPassword() ); + if( aPasswdDlg->GetConfirm() == sNewPasswd ) { SvPasswordHelper::GetHashPassword( m_aNewPasswd, sNewPasswd ); } diff --git a/sw/source/ui/envelp/label1.cxx b/sw/source/ui/envelp/label1.cxx index e5cc7dd7c72b..5f163c79f4ae 100644 --- a/sw/source/ui/envelp/label1.cxx +++ b/sw/source/ui/envelp/label1.cxx @@ -412,24 +412,24 @@ IMPL_LINK_NOARG_INLINE_END(SwLabPage, TypeHdl) void SwLabPage::DisplayFormat() { - MetricField aField(this, WinBits(0)); + VclPtr aField(new MetricField(this, WinBits(0))); FieldUnit aMetric = ::GetDfltMetric(false); - SetMetric(aField, aMetric); - aField.SetDecimalDigits(2); - aField.SetMin (0); - aField.SetMax (LONG_MAX); + SetMetric(*aField.get(), aMetric); + aField->SetDecimalDigits(2); + aField->SetMin (0); + aField->SetMax (LONG_MAX); SwLabRec* pRec = GetSelectedEntryPos(); aItem.aLstType = pRec->aType; - SETFLDVAL(aField, pRec->lWidth); - aField.Reformat(); - const OUString aWString = aField.GetText(); + SETFLDVAL(*aField.get(), pRec->lWidth); + aField->Reformat(); + const OUString aWString = aField->GetText(); - SETFLDVAL(aField, pRec->lHeight); - aField.Reformat(); + SETFLDVAL(*aField.get(), pRec->lHeight); + aField->Reformat(); OUString aText = pRec->aType + ": " + aWString + - " x " + aField.GetText() + + " x " + aField->GetText() + " (" + OUString::number( pRec->nCols ) + " x " + OUString::number( pRec->nRows ) + ")"; m_pFormatInfo->SetText(aText); diff --git a/sw/source/ui/envelp/labfmt.cxx b/sw/source/ui/envelp/labfmt.cxx index 4a83c7867f72..f0ce86273f93 100644 --- a/sw/source/ui/envelp/labfmt.cxx +++ b/sw/source/ui/envelp/labfmt.cxx @@ -614,15 +614,15 @@ IMPL_LINK_NOARG(SwSaveLabelDlg, OkHdl) return 0; } - MessageDialog aQuery(this, "QuerySaveLabelDialog", - "modules/swriter/ui/querysavelabeldialog.ui"); + VclPtr aQuery(new MessageDialog(this, "QuerySaveLabelDialog", + "modules/swriter/ui/querysavelabeldialog.ui")); - aQuery.set_primary_text(aQuery.get_primary_text(). + aQuery->set_primary_text(aQuery->get_primary_text(). replaceAll("%1", sMake).replaceAll("%2", sType)); - aQuery.set_secondary_text(aQuery.get_secondary_text(). + aQuery->set_secondary_text(aQuery->get_secondary_text(). replaceAll("%1", sMake).replaceAll("%2", sType)); - if (RET_YES != aQuery.Execute()) + if (RET_YES != aQuery->Execute()) return 0; } rLabRec.aType = sType; diff --git a/sw/source/ui/fmtui/tmpdlg.cxx b/sw/source/ui/fmtui/tmpdlg.cxx index 0fef7a5499cb..553dcf9ff5e8 100644 --- a/sw/source/ui/fmtui/tmpdlg.cxx +++ b/sw/source/ui/fmtui/tmpdlg.cxx @@ -540,15 +540,15 @@ void SwTemplateDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) aSet.Put (SfxStringItem(SID_NUM_CHAR_FMT,sNumCharFmt)); aSet.Put (SfxStringItem(SID_BULLET_CHAR_FMT,sBulletCharFmt)); // collect character styles - ListBox rCharFmtLB(this); - rCharFmtLB.Clear(); - rCharFmtLB.InsertEntry( SwViewShell::GetShellRes()->aStrNone ); + VclPtr rCharFmtLB(new ListBox(this)); + rCharFmtLB->Clear(); + rCharFmtLB->InsertEntry( SwViewShell::GetShellRes()->aStrNone ); SwDocShell* pDocShell = ::GetActiveWrtShell()->GetView().GetDocShell(); - ::FillCharStyleListBox(rCharFmtLB, pDocShell); + ::FillCharStyleListBox(*rCharFmtLB.get(), pDocShell); std::vector aList; - for(sal_Int32 j = 0; j < rCharFmtLB.GetEntryCount(); j++) - aList.push_back( rCharFmtLB.GetEntry(j) ); + for(sal_Int32 j = 0; j < rCharFmtLB->GetEntryCount(); j++) + aList.push_back( rCharFmtLB->GetEntry(j) ); aSet.Put( SfxStringListItem( SID_CHAR_FMT_LIST_BOX,&aList ) ) ; FieldUnit eMetric = ::GetDfltMetric(pDocShell->ISA(SwWebDocShell)); diff --git a/sw/source/ui/frmdlg/cption.cxx b/sw/source/ui/frmdlg/cption.cxx index b30f2be25e94..89b798c8d7b7 100644 --- a/sw/source/ui/frmdlg/cption.cxx +++ b/sw/source/ui/frmdlg/cption.cxx @@ -284,17 +284,17 @@ IMPL_LINK_INLINE_START( SwCaptionDialog, OptionHdl, Button*, pButton ) OUString sFldTypeName = m_pCategoryBox->GetText(); if(sFldTypeName == m_sNone) sFldTypeName = OUString(); - SwSequenceOptionDialog aDlg( pButton, rView, sFldTypeName ); - aDlg.SetApplyBorderAndShadow(bCopyAttributes); - aDlg.SetCharacterStyle( sCharacterStyle ); - aDlg.SetOrderNumberingFirst( bOrderNumberingFirst ); - aDlg.Execute(); - bCopyAttributes = aDlg.IsApplyBorderAndShadow(); - sCharacterStyle = aDlg.GetCharacterStyle(); + VclPtr aDlg( pButton, rView, sFldTypeName ); + aDlg->SetApplyBorderAndShadow(bCopyAttributes); + aDlg->SetCharacterStyle( sCharacterStyle ); + aDlg->SetOrderNumberingFirst( bOrderNumberingFirst ); + aDlg->Execute(); + bCopyAttributes = aDlg->IsApplyBorderAndShadow(); + sCharacterStyle = aDlg->GetCharacterStyle(); //#i61007# order of captions - if( bOrderNumberingFirst != aDlg.IsOrderNumberingFirst() ) + if( bOrderNumberingFirst != aDlg->IsOrderNumberingFirst() ) { - bOrderNumberingFirst = aDlg.IsOrderNumberingFirst(); + bOrderNumberingFirst = aDlg->IsOrderNumberingFirst(); SW_MOD()->GetModuleConfig()->SetCaptionOrderNumberingFirst(bOrderNumberingFirst); ApplyCaptionOrder(); } @@ -338,8 +338,8 @@ IMPL_LINK_NOARG(SwCaptionDialog, ModifyHdl) IMPL_LINK_NOARG(SwCaptionDialog, CaptionHdl) { SfxItemSet aSet( rView.GetDocShell()->GetDoc()->GetAttrPool() ); - SwCaptionOptDlg aDlg( this, aSet ); - aDlg.Execute(); + VclPtr aDlg(new SwCaptionOptDlg( this, aSet ) ); + aDlg->Execute(); return 0; } diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx index 89db59c34d24..9bcaa1f8e2bb 100644 --- a/sw/source/ui/index/cnttab.cxx +++ b/sw/source/ui/index/cnttab.cxx @@ -488,8 +488,8 @@ IMPL_LINK_NOARG( SwMultiTOXTabDialog, ShowPreviewHdl ) OUString sInfo(SW_RESSTR(STR_FILE_NOT_FOUND)); sInfo = sInfo.replaceFirst( "%1", sTemplate ); sInfo = sInfo.replaceFirst( "%2", aOpt.GetTemplatePath() ); - InfoBox aInfo(GetParent(), sInfo); - aInfo.Execute(); + VclPtr aInfo(new InfoBox(GetParent(), sInfo)); + aInfo->Execute(); } else { diff --git a/sw/source/ui/index/swuiidxmrk.cxx b/sw/source/ui/index/swuiidxmrk.cxx index 701c6aee6250..9a5f7985b783 100644 --- a/sw/source/ui/index/swuiidxmrk.cxx +++ b/sw/source/ui/index/swuiidxmrk.cxx @@ -1201,8 +1201,8 @@ IMPL_LINK_NOARG(SwAuthorMarkPane, InsertHdl) bDifferent |= m_sFields[i] != pEntry->GetAuthorField((ToxAuthorityField)i); if(bDifferent) { - MessageDialog aQuery(&m_rDialog, SW_RES(STR_QUERY_CHANGE_AUTH_ENTRY), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO); - if(RET_YES != aQuery.Execute()) + VclPtr aQuery(new MessageDialog(&m_rDialog, SW_RES(STR_QUERY_CHANGE_AUTH_ENTRY), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO)); + if(RET_YES != aQuery->Execute()) return 0; } } @@ -1241,14 +1241,14 @@ IMPL_LINK(SwAuthorMarkPane, CreateEntryHdl, PushButton*, pButton) OUString sOldId = m_sCreatedEntry[0]; for(int i = 0; i < AUTH_FIELD_END; i++) m_sCreatedEntry[i] = bCreate ? OUString() : m_sFields[i]; - SwCreateAuthEntryDlg_Impl aDlg(pButton, + VclPtr aDlg(new SwCreateAuthEntryDlg_Impl(pButton, bCreate ? m_sCreatedEntry : m_sFields, - *pSh, bNewEntry, bCreate); + *pSh, bNewEntry, bCreate)); if(bNewEntry) { - aDlg.SetCheckNameHdl(LINK(this, SwAuthorMarkPane, IsEntryAllowedHdl)); + aDlg->SetCheckNameHdl(LINK(this, SwAuthorMarkPane, IsEntryAllowedHdl)); } - if(RET_OK == aDlg.Execute()) + if(RET_OK == aDlg->Execute()) { if(bCreate && !sOldId.isEmpty()) { @@ -1256,7 +1256,7 @@ IMPL_LINK(SwAuthorMarkPane, CreateEntryHdl, PushButton*, pButton) } for(int i = 0; i < AUTH_FIELD_END; i++) { - m_sFields[i] = aDlg.GetEntryText((ToxAuthorityField)i); + m_sFields[i] = aDlg->GetEntryText((ToxAuthorityField)i); m_sCreatedEntry[i] = m_sFields[i]; } if(bNewEntry && !m_pFromDocContentRB->IsChecked()) diff --git a/sw/source/ui/misc/glosbib.cxx b/sw/source/ui/misc/glosbib.cxx index 11a3666236bb..fcdec5ab38bf 100644 --- a/sw/source/ui/misc/glosbib.cxx +++ b/sw/source/ui/misc/glosbib.cxx @@ -139,8 +139,8 @@ void SwGlossaryGroupDlg::Apply() const OUString sMsg(SW_RESSTR(STR_QUERY_DELETE_GROUP1) + sTitle + SW_RESSTR(STR_QUERY_DELETE_GROUP2)); - QueryBox aQuery(this->GetParent(), WB_YES_NO|WB_DEF_NO, sMsg ); - if(RET_YES == aQuery.Execute()) + VclPtr aQuery(new QueryBox(this->GetParent(), WB_YES_NO|WB_DEF_NO, sMsg )); + if(RET_YES == aQuery->Execute()) pGlosHdl->DelGroup( sDelGroup ); } diff --git a/sw/source/ui/misc/glossary.cxx b/sw/source/ui/misc/glossary.cxx index 75db8cd62a1e..47fb56870532 100644 --- a/sw/source/ui/misc/glossary.cxx +++ b/sw/source/ui/misc/glossary.cxx @@ -494,8 +494,8 @@ IMPL_LINK( SwGlossaryDlg, MenuHdl, Menu *, pMn ) } else if (sItemIdent == "delete") { - MessageDialog aQuery(this, SW_RES(STR_QUERY_DELETE), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO); - if (RET_YES == aQuery.Execute()) + VclPtr aQuery(new MessageDialog(this, SW_RES(STR_QUERY_DELETE), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO)); + if (RET_YES == aQuery->Execute()) { const OUString aShortName(m_pShortNameEdit->GetText()); const OUString aTitle(m_pNameED->GetText()); @@ -652,9 +652,9 @@ IMPL_LINK_NOARG(SwGlossaryDlg, BibHdl) } else { - MessageDialog aBox(this, sReadonlyPath, VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO); + VclPtr aBox(new MessageDialog(this, sReadonlyPath, VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO)); - if(RET_YES == aBox.Execute()) + if(RET_YES == aBox->Execute()) PathHdl(m_pPathBtn); } } diff --git a/sw/source/ui/misc/num.cxx b/sw/source/ui/misc/num.cxx index 87b535d482b5..65543804b845 100644 --- a/sw/source/ui/misc/num.cxx +++ b/sw/source/ui/misc/num.cxx @@ -966,15 +966,15 @@ void SwSvxNumBulletTabDialog::PageCreated(sal_uInt16 nPageId, SfxTabPage& rPage) aSet.Put (SfxStringItem(SID_NUM_CHAR_FMT,sNumCharFmt)); aSet.Put (SfxStringItem(SID_BULLET_CHAR_FMT,sBulletCharFmt)); // collect char styles - ListBox rCharFmtLB(this); - rCharFmtLB.Clear(); - rCharFmtLB.InsertEntry( SwViewShell::GetShellRes()->aStrNone ); + VclPtr rCharFmtLB(new ListBox(this)); + rCharFmtLB->Clear(); + rCharFmtLB->InsertEntry( SwViewShell::GetShellRes()->aStrNone ); SwDocShell* pDocShell = rWrtSh.GetView().GetDocShell(); - ::FillCharStyleListBox(rCharFmtLB, pDocShell); + ::FillCharStyleListBox(*rCharFmtLB.get(), pDocShell); std::vector aList; - for(sal_Int32 j = 0; j < rCharFmtLB.GetEntryCount(); j++) - aList.push_back( rCharFmtLB.GetEntry(j) ); + for(sal_Int32 j = 0; j < rCharFmtLB->GetEntryCount(); j++) + aList.push_back( rCharFmtLB->GetEntry(j) ); aSet.Put( SfxStringListItem( SID_CHAR_FMT_LIST_BOX,&aList ) ) ; diff --git a/sw/source/uibase/app/docsh2.cxx b/sw/source/uibase/app/docsh2.cxx index f9fba49adc50..cc2fe41bac06 100644 --- a/sw/source/uibase/app/docsh2.cxx +++ b/sw/source/uibase/app/docsh2.cxx @@ -608,10 +608,10 @@ void SwDocShell::Execute(SfxRequest& rReq) const SfxFilter* pFlt = GetMedium()->GetFilter(); if(!pFlt || pFlt->GetUserData() != pHtmlFlt->GetUserData()) { - MessageDialog aQuery(&pViewFrm->GetWindow(), - "SaveAsHTMLDialog", "modules/swriter/ui/saveashtmldialog.ui"); + VclPtr aQuery(new MessageDialog(&pViewFrm->GetWindow(), + "SaveAsHTMLDialog", "modules/swriter/ui/saveashtmldialog.ui")); - if(RET_YES == aQuery.Execute()) + if(RET_YES == aQuery->Execute()) bLocalHasName = false; else break; diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx b/sw/source/uibase/dochdl/swdtflvr.cxx index 1df19b765208..03545308ca2d 100644 --- a/sw/source/uibase/dochdl/swdtflvr.cxx +++ b/sw/source/uibase/dochdl/swdtflvr.cxx @@ -388,8 +388,8 @@ namespace sal_uInt16 aRotation = aMetadata.getRotation(); if (aRotation != 0) { - MessageDialog aQueryBox( 0,"QueryRotateIntoStandardOrientationDialog","modules/swriter/ui/queryrotateintostandarddialog.ui"); - if (aQueryBox.Execute() == RET_YES) + VclPtr aQueryBox(new MessageDialog( 0,"QueryRotateIntoStandardOrientationDialog","modules/swriter/ui/queryrotateintostandarddialog.ui") ); + if (aQueryBox->Execute() == RET_YES) { GraphicNativeTransform aTransform( aGraphic ); aTransform.rotate( aRotation ); diff --git a/sw/source/uibase/lingu/olmenu.cxx b/sw/source/uibase/lingu/olmenu.cxx index e4edd46a7112..a1cdc385a2e3 100644 --- a/sw/source/uibase/lingu/olmenu.cxx +++ b/sw/source/uibase/lingu/olmenu.cxx @@ -803,9 +803,9 @@ void SwSpellPopup::Execute( sal_uInt16 nId ) uno::Any exc( ::cppu::getCaughtException() ); OUString msg( ::comphelper::anyToString( exc ) ); const SolarMutexGuard guard; - MessageDialog aErrorBox(NULL, msg); - aErrorBox.SetText( "Explanations" ); - aErrorBox.Execute(); + VclPtr aErrorBox(new MessageDialog(NULL, msg)); + aErrorBox->SetText( "Explanations" ); + aErrorBox->Execute(); } } else if (nId == FN_REDLINE_ACCEPT_DIRECT || nId == FN_REDLINE_REJECT_DIRECT diff --git a/sw/source/uibase/shells/grfsh.cxx b/sw/source/uibase/shells/grfsh.cxx index effa9f4b31aa..be54e67b88ae 100644 --- a/sw/source/uibase/shells/grfsh.cxx +++ b/sw/source/uibase/shells/grfsh.cxx @@ -163,19 +163,19 @@ void SwGrfShell::Execute(SfxRequest &rReq) Graphic aGraphic = Graphic( *pGraphic ); - CompressGraphicsDialog aDialog( GetView().GetWindow(), aGraphic, aSize, aCropRectangle, GetView().GetViewFrame()->GetBindings() ); - if( aDialog.Execute() == RET_OK ) + VclPtr aDialog(new CompressGraphicsDialog( GetView().GetWindow(), aGraphic, aSize, aCropRectangle, GetView().GetViewFrame()->GetBindings() ) ); + if( aDialog->Execute() == RET_OK ) { rSh.StartAllAction(); rSh.StartUndo(UNDO_START); - Rectangle aScaledCropedRectangle = aDialog.GetScaledCropRectangle(); + Rectangle aScaledCropedRectangle = aDialog->GetScaledCropRectangle(); aCrop.SetLeft( convertMm100ToTwip( aScaledCropedRectangle.Left() )); aCrop.SetTop( convertMm100ToTwip( aScaledCropedRectangle.Top() )); aCrop.SetRight( convertMm100ToTwip( aScaledCropedRectangle.Right() )); aCrop.SetBottom( convertMm100ToTwip( aScaledCropedRectangle.Bottom() )); - Graphic aCompressedGraphic( aDialog.GetCompressedGraphic() ); + Graphic aCompressedGraphic( aDialog->GetCompressedGraphic() ); rSh.ReRead(OUString(), OUString(), (const Graphic*) &aCompressedGraphic); rSh.SetAttrItem(aCrop); diff --git a/sw/source/uibase/shells/tabsh.cxx b/sw/source/uibase/shells/tabsh.cxx index 888bf213cbfa..3a282dfa5258 100644 --- a/sw/source/uibase/shells/tabsh.cxx +++ b/sw/source/uibase/shells/tabsh.cxx @@ -735,9 +735,9 @@ void SwTableShell::Execute(SfxRequest &rReq) break; case TBLMERGE_TOOCOMPLEX: { - MessageDialog aInfoBox( GetView().GetWindow(), - SW_RES( STR_ERR_TABLE_MERGE ), VCL_MESSAGE_INFO ); - aInfoBox.Execute(); + VclPtr aInfoBox(new MessageDialog( GetView().GetWindow(), + SW_RES( STR_ERR_TABLE_MERGE ), VCL_MESSAGE_INFO ) ); + aInfoBox->Execute(); break; } default: diff --git a/sw/source/uibase/shells/textsh1.cxx b/sw/source/uibase/shells/textsh1.cxx index 8ad15cf406d7..cbaf14a9bc8c 100644 --- a/sw/source/uibase/shells/textsh1.cxx +++ b/sw/source/uibase/shells/textsh1.cxx @@ -257,23 +257,23 @@ void sw_CharDialog( SwWrtShell &rWrtSh, bool bUseDialog, sal_uInt16 nSlot,const static short lcl_AskRedlineMode(vcl::Window *pWin) { - MessBox aQBox( pWin, 0, + VclPtr aQBox(new MessBox( pWin, 0, OUString( SW_RES( STR_REDLINE_TITLE ) ), - OUString( SW_RES( STR_REDLINE_MSG ) ) ); - aQBox.SetImage( QueryBox::GetStandardImage() ); + OUString( SW_RES( STR_REDLINE_MSG ) ) ) ); + aQBox->SetImage( QueryBox::GetStandardImage() ); const sal_uInt16 nBtnFlags = BUTTONDIALOG_DEFBUTTON | BUTTONDIALOG_OKBUTTON | BUTTONDIALOG_FOCUSBUTTON; - aQBox.AddButton(OUString(SW_RES(STR_REDLINE_ACCEPT_ALL)), RET_OK, nBtnFlags); - aQBox.GetPushButton( RET_OK )->SetHelpId(HID_AUTOFORMAT_ACCEPT); - aQBox.AddButton(OUString(SW_RES(STR_REDLINE_REJECT_ALL)), RET_CANCEL, BUTTONDIALOG_CANCELBUTTON); - aQBox.GetPushButton( RET_CANCEL )->SetHelpId(HID_AUTOFORMAT_REJECT ); - aQBox.AddButton(OUString(SW_RES(STR_REDLINE_EDIT)), 2, 0); - aQBox.GetPushButton( 2 )->SetHelpId(HID_AUTOFORMAT_EDIT_CHG); - aQBox.SetButtonHelpText( RET_OK, OUString() ); + aQBox->AddButton(OUString(SW_RES(STR_REDLINE_ACCEPT_ALL)), RET_OK, nBtnFlags); + aQBox->GetPushButton( RET_OK )->SetHelpId(HID_AUTOFORMAT_ACCEPT); + aQBox->AddButton(OUString(SW_RES(STR_REDLINE_REJECT_ALL)), RET_CANCEL, BUTTONDIALOG_CANCELBUTTON); + aQBox->GetPushButton( RET_CANCEL )->SetHelpId(HID_AUTOFORMAT_REJECT ); + aQBox->AddButton(OUString(SW_RES(STR_REDLINE_EDIT)), 2, 0); + aQBox->GetPushButton( 2 )->SetHelpId(HID_AUTOFORMAT_EDIT_CHG); + aQBox->SetButtonHelpText( RET_OK, OUString() ); - return aQBox.Execute(); + return aQBox->Execute(); } void SwTextShell::Execute(SfxRequest &rReq) diff --git a/sw/source/uibase/uiview/view2.cxx b/sw/source/uibase/uiview/view2.cxx index 19530171d8fd..14698d8593c2 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) + VclPtr aQueryBox(new MessageDialog( 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 ) + VclPtr aWarnDlg(new SvxLinkWarningDialog(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(); + VclPtr aInfoBox(new MessageDialog( GetWindow(), SW_RESSTR( nResId ), VCL_MESSAGE_INFO) ); + aInfoBox->Execute(); } rReq.Ignore(); } @@ -585,11 +585,11 @@ void SwView::Execute(SfxRequest &rReq) pParent = static_cast( pParentItem )->GetWindowPtr(); else pParent = &GetViewFrame()->GetWindow(); - SfxPasswordDialog aPasswdDlg( pParent ); - aPasswdDlg.SetMinLen( 1 ); + VclPtr aPasswdDlg(new SfxPasswordDialog( 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 aNewPasswd = pIDRA->GetRedlinePassword(); SvPasswordHelper::GetHashPassword( aNewPasswd, sNewPasswd ); if(SvPasswordHelper::CompareHashPassword(aPasswd, sNewPasswd)) @@ -623,14 +623,14 @@ void SwView::Execute(SfxRequest &rReq) pParent = static_cast( pParentItem )->GetWindowPtr(); else pParent = &GetViewFrame()->GetWindow(); - SfxPasswordDialog aPasswdDlg( pParent ); - aPasswdDlg.SetMinLen( 1 ); + VclPtr aPasswdDlg(new SfxPasswordDialog( pParent )); + aPasswdDlg->SetMinLen( 1 ); if(!aPasswd.getLength()) - aPasswdDlg.ShowExtras(SHOWEXTRAS_CONFIRM); - if (aPasswdDlg.Execute()) + aPasswdDlg->ShowExtras(SHOWEXTRAS_CONFIRM); + if (aPasswdDlg->Execute()) { sal_uInt16 nOn = nsRedlineMode_t::REDLINE_ON; - OUString sNewPasswd( aPasswdDlg.GetPassword() ); + OUString sNewPasswd( aPasswdDlg->GetPassword() ); Sequence aNewPasswd = pIDRA->GetRedlinePassword(); SvPasswordHelper::GetHashPassword( aNewPasswd, sNewPasswd ); @@ -2287,11 +2287,11 @@ void SwView::GenerateFormLetter(bool bUseCurrentDocument) if ( lcl_NeedAdditionalDataSource( xDBContext ) ) { // no data sources are available - create a new one - MessageDialog aQuery(&GetViewFrame()->GetWindow(), + VclPtr aQuery(new MessageDialog(&GetViewFrame()->GetWindow(), "DataSourcesUnavailableDialog", - "modules/swriter/ui/datasourcesunavailabledialog.ui"); + "modules/swriter/ui/datasourcesunavailabledialog.ui")); // no cancel allowed - if (RET_OK != aQuery.Execute()) + if (RET_OK != aQuery->Execute()) return; bCallAddressPilot = true; } @@ -2336,12 +2336,12 @@ void SwView::GenerateFormLetter(bool bUseCurrentDocument) OUString sSource; if(!GetWrtShell().IsFieldDataSourceAvailable(sSource)) { - MessageDialog aWarning(&GetViewFrame()->GetWindow(), + VclPtr aWarning(new MessageDialog(&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()) + "modules/swriter/ui/warndatasourcedialog.ui")); + 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 ) @@ -2390,8 +2390,8 @@ void SwView::GenerateFormLetter(bool bUseCurrentDocument) SfxApplication* pSfxApp = SfxGetpApp(); vcl::Window* pTopWin = pSfxApp->GetTopWindow(); - SfxTemplateManagerDlg aDocTemplDlg; - int nRet = aDocTemplDlg.Execute(); + VclPtr aDocTemplDlg(new SfxTemplateManagerDlg); + int nRet = aDocTemplDlg->Execute(); bool bNewWin = false; if ( nRet == RET_OK ) { diff --git a/sw/source/uibase/uiview/viewdraw.cxx b/sw/source/uibase/uiview/viewdraw.cxx index ccc39a4aca63..1319bd75ee8a 100644 --- a/sw/source/uibase/uiview/viewdraw.cxx +++ b/sw/source/uibase/uiview/viewdraw.cxx @@ -177,9 +177,9 @@ void SwView::ExecDraw(SfxRequest& rReq) if ( pSdrView ) { SdrObject* pObj = NULL; - svx::FontWorkGalleryDialog aDlg( pSdrView, pWin, nSlotId ); - aDlg.SetSdrObjectRef( &pObj, pSdrView->GetModel() ); - aDlg.Execute(); + VclPtr aDlg(new svx::FontWorkGalleryDialog( pSdrView, pWin, nSlotId )); + aDlg->SetSdrObjectRef( &pObj, pSdrView->GetModel() ); + aDlg->Execute(); if ( pObj ) { Size aDocSize( m_pWrtShell->GetDocSize() ); diff --git a/sw/source/uibase/uiview/viewling.cxx b/sw/source/uibase/uiview/viewling.cxx index 7b3c95d25f2d..001f48dad3ce 100644 --- a/sw/source/uibase/uiview/viewling.cxx +++ b/sw/source/uibase/uiview/viewling.cxx @@ -459,8 +459,8 @@ void SwView::HyphenateDocument() // turned on no special area { // I want also in special areas hyphenation - MessageDialog aBox(&GetEditWin(), SW_RES(STR_QUERY_SPECIAL_FORCED), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO); - if( aBox.Execute() == RET_YES ) + VclPtr aBox(new MessageDialog(&GetEditWin(), SW_RES(STR_QUERY_SPECIAL_FORCED), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO)); + if( aBox->Execute() == RET_YES ) { bOther = true; if (xProp.is()) diff --git a/sw/source/uibase/uiview/viewprt.cxx b/sw/source/uibase/uiview/viewprt.cxx index a9e63c363856..0a3a4cf363e0 100644 --- a/sw/source/uibase/uiview/viewprt.cxx +++ b/sw/source/uibase/uiview/viewprt.cxx @@ -175,10 +175,10 @@ void SwView::ExecutePrint(SfxRequest& rReq) } else { - MessageDialog aInfoBox(&GetEditWin(), SW_RES(STR_ERR_NO_FAX), VCL_MESSAGE_INFO); + VclPtr aInfoBox(new MessageDialog(&GetEditWin(), SW_RES(STR_ERR_NO_FAX), VCL_MESSAGE_INFO)); sal_uInt16 nResNo = bWeb ? STR_WEBOPTIONS : STR_TEXTOPTIONS; - aInfoBox.set_primary_text(aInfoBox.get_primary_text().replaceFirst("%1", OUString(SW_RES(nResNo)))); - aInfoBox.Execute(); + aInfoBox->set_primary_text(aInfoBox->get_primary_text().replaceFirst("%1", OUString(SW_RES(nResNo)))); + aInfoBox->Execute(); SfxUInt16Item aDefPage(SID_SW_EDITOPTIONS, TP_OPTPRINT_PAGE); GetViewFrame()->GetDispatcher()->Execute(SID_SW_EDITOPTIONS, SfxCallMode::SYNCHRON|SfxCallMode::RECORD, @@ -201,9 +201,9 @@ void SwView::ExecutePrint(SfxRequest& rReq) if(!bSilent && !bFromMerge && SW_MOD()->GetModuleConfig()->IsAskForMailMerge() && pSh->IsAnyDatabaseFieldInDoc()) { - MessageDialog aBox(&GetEditWin(), "PrintMergeDialog", - "modules/swriter/ui/printmergedialog.ui"); - short nRet = aBox.Execute(); + VclPtr aBox(new MessageDialog(&GetEditWin(), "PrintMergeDialog", + "modules/swriter/ui/printmergedialog.ui")); + short nRet = aBox->Execute(); if(RET_YES == nRet) { SfxBoolItem aBool(FN_QRY_MERGE, true); diff --git a/sw/source/uibase/utlui/gloslst.cxx b/sw/source/uibase/utlui/gloslst.cxx index 7f18c24ab564..4951847ff958 100644 --- a/sw/source/uibase/utlui/gloslst.cxx +++ b/sw/source/uibase/utlui/gloslst.cxx @@ -143,16 +143,16 @@ bool SwGlossaryList::GetShortName(const OUString& rLongName, } else if(1 < nCount) { - SwGlossDecideDlg aDlg(0); - OUString sTitle = aDlg.GetText() + " " + aTripleStrings.front().sBlock; - aDlg.SetText(sTitle); + VclPtr aDlg(new SwGlossDecideDlg(0)); + OUString sTitle = aDlg->GetText() + " " + aTripleStrings.front().sBlock; + aDlg->SetText(sTitle); - ListBox& rLB = aDlg.GetListBox(); + ListBox& rLB = aDlg->GetListBox(); for(std::vector::const_iterator i = aTripleStrings.begin(); i != aTripleStrings.end(); ++i) rLB.InsertEntry(i->sGroup.getToken(0, GLOS_DELIM)); rLB.SelectEntryPos(0); - if(RET_OK == aDlg.Execute() && + if(RET_OK == aDlg->Execute() && LISTBOX_ENTRY_NOTFOUND != rLB.GetSelectEntryPos()) { const TripleString& pTriple(aTripleStrings[rLB.GetSelectEntryPos()]); diff --git a/uui/source/iahndl.cxx b/uui/source/iahndl.cxx index f265fe6370b4..64e18d87fd71 100644 --- a/uui/source/iahndl.cxx +++ b/uui/source/iahndl.cxx @@ -1024,9 +1024,9 @@ executeMessageBox( { SolarMutexGuard aGuard; - MessBox xBox( pParent, nButtonMask, rTitle, rMessage ); + VclPtr xBox(new MessBox(pParent, nButtonMask, rTitle, rMessage)); - sal_uInt16 aResult = xBox.Execute(); + sal_uInt16 aResult = xBox->Execute(); switch( aResult ) { case RET_OK: @@ -1059,11 +1059,11 @@ NameClashResolveDialogResult executeSimpleNameClashResolveDialog( vcl::Window *p if ( !xManager.get() ) return ABORT; - NameClashDialog aDialog( pParent, xManager.get(), rTargetFolderURL, - rClashingName, rProposedNewName, bAllowOverwrite ); + VclPtr aDialog(new NameClashDialog(pParent, xManager.get(), rTargetFolderURL, + rClashingName, rProposedNewName, bAllowOverwrite) ); - NameClashResolveDialogResult eResult = (NameClashResolveDialogResult) aDialog.Execute(); - rProposedNewName = aDialog.getNewName(); + NameClashResolveDialogResult eResult = (NameClashResolveDialogResult) aDialog->Execute(); + rProposedNewName = aDialog->getNewName(); return eResult; } @@ -1207,20 +1207,20 @@ UUIInteractionHelper::handleMacroConfirmRequest( if ( pResMgr.get() ) { bool bShowSignatures = aSignInfo.getLength() > 0; - MacroWarning aWarning( - getParentProperty(), bShowSignatures, *pResMgr.get() ); + VclPtr aWarning(new MacroWarning( + getParentProperty(), bShowSignatures, *pResMgr.get()) ); - aWarning.SetDocumentURL( aDocumentURL ); + aWarning->SetDocumentURL( aDocumentURL ); if ( aSignInfo.getLength() > 1 ) { - aWarning.SetStorage( xZipStorage, aDocumentVersion, aSignInfo ); + aWarning->SetStorage( xZipStorage, aDocumentVersion, aSignInfo ); } else if ( aSignInfo.getLength() == 1 ) { - aWarning.SetCertificate( aSignInfo[ 0 ].Signer ); + aWarning->SetCertificate( aSignInfo[ 0 ].Signer ); } - bApprove = aWarning.Execute() == RET_OK; + bApprove = aWarning->Execute() == RET_OK; } if ( bApprove && xApprove.is() ) diff --git a/uui/source/masterpasscrtdlg.cxx b/uui/source/masterpasscrtdlg.cxx index a7acc0189a26..f54078ad9435 100644 --- a/uui/source/masterpasscrtdlg.cxx +++ b/uui/source/masterpasscrtdlg.cxx @@ -41,8 +41,8 @@ IMPL_LINK_NOARG(MasterPasswordCreateDialog, OKHdl_Impl) else { OUString aErrorMsg( ResId( STR_ERROR_PASSWORDS_NOT_IDENTICAL, *pResourceMgr )); - MessageDialog aErrorBox(this, aErrorMsg); - aErrorBox.Execute(); + VclPtr aErrorBox(new MessageDialog(this, aErrorMsg)); + aErrorBox->Execute(); m_pEDMasterPasswordCrt->SetText( OUString() ); m_pEDMasterPasswordRepeat->SetText( OUString() ); m_pEDMasterPasswordCrt->GrabFocus(); diff --git a/uui/source/masterpassworddlg.cxx b/uui/source/masterpassworddlg.cxx index 3b6a071968a3..0b219a62b835 100644 --- a/uui/source/masterpassworddlg.cxx +++ b/uui/source/masterpassworddlg.cxx @@ -49,8 +49,8 @@ MasterPasswordDialog::MasterPasswordDialog if( nDialogMode == ::com::sun::star::task::PasswordRequestMode_PASSWORD_REENTER ) { OUString aErrorMsg( ResId( STR_ERROR_MASTERPASSWORD_WRONG, *pResourceMgr )); - MessageDialog aErrorBox(pParent, aErrorMsg); - aErrorBox.Execute(); + VclPtr aErrorBox(new MessageDialog(pParent, aErrorMsg)); + aErrorBox->Execute(); } m_pOKBtn->SetClickHdl( LINK( this, MasterPasswordDialog, OKHdl_Impl ) ); diff --git a/uui/source/nameclashdlg.cxx b/uui/source/nameclashdlg.cxx index 63ad0926dc02..105ba878a4fd 100644 --- a/uui/source/nameclashdlg.cxx +++ b/uui/source/nameclashdlg.cxx @@ -34,8 +34,8 @@ IMPL_LINK( NameClashDialog, ButtonHdl_Impl, PushButton *, pBtn ) OUString aNewName = m_pEDNewName->GetText(); if ( ( aNewName == maNewName ) || aNewName.isEmpty() ) { - MessageDialog aError(NULL, maSameName); - aError.Execute(); + VclPtr aError(new MessageDialog(NULL, maSameName)); + aError->Execute(); return 1; } maNewName = aNewName; diff --git a/uui/source/passworddlg.cxx b/uui/source/passworddlg.cxx index 2e5ed497b599..421b84681ad7 100644 --- a/uui/source/passworddlg.cxx +++ b/uui/source/passworddlg.cxx @@ -44,8 +44,8 @@ PasswordDialog::PasswordDialog(vcl::Window* _pParent, const sal_uInt16 nOpenToModifyErrStrId = bOpenToModify ? STR_ERROR_PASSWORD_TO_MODIFY_WRONG : STR_ERROR_PASSWORD_TO_OPEN_WRONG; const sal_uInt16 nErrStrId = bIsSimplePasswordRequest ? STR_ERROR_SIMPLE_PASSWORD_WRONG : nOpenToModifyErrStrId; OUString aErrorMsg(ResId(nErrStrId, *pResourceMgr).toString()); - MessageDialog aErrorBox(GetParent(), aErrorMsg); - aErrorBox.Execute(); + VclPtr aErrorBox(new MessageDialog(GetParent(), aErrorMsg)); + aErrorBox->Execute(); } // default settings for enter password or reenter passwd... @@ -91,8 +91,8 @@ IMPL_LINK_NOARG(PasswordDialog, OKHdl_Impl) if (m_pEDConfirmPassword->IsVisible() && bPasswdMismatch) { - MessageDialog aErrorBox(this, aPasswdMismatch); - aErrorBox.Execute(); + VclPtr aErrorBox(new MessageDialog(this, aPasswdMismatch)); + aErrorBox->Execute(); } else if (bValid) EndDialog( RET_OK ); diff --git a/vcl/generic/print/genprnpsp.cxx b/vcl/generic/print/genprnpsp.cxx index 7a0ab922eca8..a6f4822b07f5 100644 --- a/vcl/generic/print/genprnpsp.cxx +++ b/vcl/generic/print/genprnpsp.cxx @@ -136,8 +136,8 @@ namespace int QueryFaxNumber(OUString& rNumber) { OUString aTmpString(VclResId(SV_PRINT_QUERYFAXNUMBER_TXT)); - QueryString aQuery(NULL, aTmpString, rNumber); - return aQuery.Execute(); + VclPtr aQuery(new QueryString(NULL, aTmpString, rNumber)); + return aQuery->Execute(); } } diff --git a/vcl/generic/print/prtsetup.cxx b/vcl/generic/print/prtsetup.cxx index ed5cadcbb6ba..a22f912071e2 100644 --- a/vcl/generic/print/prtsetup.cxx +++ b/vcl/generic/print/prtsetup.cxx @@ -464,11 +464,11 @@ void RTSDevicePage::FillValueBox( const PPDKey* pKey ) int SetupPrinterDriver(::psp::PrinterInfo& rJobData) { int nRet = 0; - RTSDialog aDialog( rJobData, NULL ); + VclPtr aDialog(new RTSDialog( rJobData, NULL ) ); - if( aDialog.Execute() ) + if( aDialog->Execute() ) { - rJobData = aDialog.getSetup(); + rJobData = aDialog->getSetup(); nRet = 1; } diff --git a/vcl/source/app/dbggui.cxx b/vcl/source/app/dbggui.cxx index 6dfe9b063af2..65e2d1351c82 100644 --- a/vcl/source/app/dbggui.cxx +++ b/vcl/source/app/dbggui.cxx @@ -352,10 +352,10 @@ IMPL_LINK( DbgDialog, ClickHdl, Button*, pButton ) } if( (aData.nTestFlags & ~IMMEDIATE_FLAGS) != (pData->nTestFlags & ~IMMEDIATE_FLAGS) ) { - MessageDialog aBox(this, OUString( + VclPtr aBox(new MessageDialog(this, OUString( "Some of the changed settings will only be active after " - "restarting the process"), VCL_MESSAGE_INFO); - aBox.Execute(); + "restarting the process"), VCL_MESSAGE_INFO)); + aBox->Execute(); } EndDialog( RET_OK ); } @@ -367,7 +367,7 @@ void DbgDialog::RequestHelp( const HelpEvent& rHEvt ) { if ( rHEvt.GetMode() & HelpEventMode::CONTEXT ) { - DbgInfoDialog aInfoDialog( this, true ); + VclPtr aInfoDialog(new DbgInfoDialog( this, true ) ); OUString aHelpText; const sal_Char** pHelpStrs = pDbgHelpText; while ( *pHelpStrs ) @@ -375,9 +375,9 @@ void DbgDialog::RequestHelp( const HelpEvent& rHEvt ) aHelpText += OUString::createFromAscii(*pHelpStrs); pHelpStrs++; } - aInfoDialog.SetText( "Debug Hilfe" ); - aInfoDialog.SetInfoText( aHelpText ); - aInfoDialog.Execute(); + aInfoDialog->SetText( "Debug Hilfe" ); + aInfoDialog->SetInfoText( aHelpText ); + aInfoDialog->Execute(); } } diff --git a/vcl/source/app/stdtext.cxx b/vcl/source/app/stdtext.cxx index 8093a6fe6900..ca3ee6bbc566 100644 --- a/vcl/source/app/stdtext.cxx +++ b/vcl/source/app/stdtext.cxx @@ -39,8 +39,8 @@ void ShowServiceNotAvailableError(vcl::Window* pParent, { OUString aText = GetStandardText(STANDARD_TEXT_SERVICE_NOT_AVAILABLE). replaceAll("%s", rServiceName); - MessageDialog aBox(pParent, aText, bError ? VCL_MESSAGE_ERROR : VCL_MESSAGE_WARNING); - aBox.Execute(); + VclPtr aBox(new MessageDialog(pParent, aText, bError ? VCL_MESSAGE_ERROR : VCL_MESSAGE_WARNING)); + aBox->Execute(); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/source/app/svdata.cxx b/vcl/source/app/svdata.cxx index 155b5cc0ba3c..b30848cc20a8 100644 --- a/vcl/source/app/svdata.cxx +++ b/vcl/source/app/svdata.cxx @@ -160,8 +160,8 @@ ResMgr* ImplGetResMgr() "Missing vcl resource. This indicates that files vital to localization are missing. " "You might have a corrupt installation."; fprintf( stderr, "%s\n", pMsg ); - MessageDialog aBox(NULL, OUString(pMsg, strlen(pMsg), RTL_TEXTENCODING_ASCII_US)); - aBox.Execute(); + VclPtr aBox(new MessageDialog(NULL, OUString(pMsg, strlen(pMsg), RTL_TEXTENCODING_ASCII_US))); + aBox->Execute(); } } return pSVData->mpResMgr; diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx index f041d80bae5a..8fe828e415cd 100644 --- a/vcl/source/control/edit.cxx +++ b/vcl/source/control/edit.cxx @@ -805,8 +805,8 @@ void Edit::ShowTruncationWarning( vcl::Window* pParent ) ResMgr* pResMgr = ImplGetResMgr(); if( pResMgr ) { - MessageDialog aBox(pParent, ResId(SV_EDIT_WARNING_STR, *pResMgr), VCL_MESSAGE_WARNING); - aBox.Execute(); + VclPtr aBox(new MessageDialog(pParent, ResId(SV_EDIT_WARNING_STR, *pResMgr), VCL_MESSAGE_WARNING)); + aBox->Execute(); } } @@ -2784,8 +2784,8 @@ Size Edit::CalcMinimumSize() const Size Edit::GetMinimumEditSize() { vcl::Window* pDefWin = ImplGetDefaultWindow(); - Edit aEdit( pDefWin, WB_BORDER ); - Size aSize( aEdit.CalcMinimumSize() ); + VclPtr aEdit(new Edit( pDefWin, WB_BORDER ) ); + Size aSize( aEdit->CalcMinimumSize() ); return aSize; } diff --git a/vcl/source/gdi/print3.cxx b/vcl/source/gdi/print3.cxx index 543ab88ad245..52c097c293d0 100644 --- a/vcl/source/gdi/print3.cxx +++ b/vcl/source/gdi/print3.cxx @@ -305,9 +305,9 @@ void Printer::PreparePrintJob(std::shared_ptr xController, { if (xController->isShowDialogs()) { - MessageDialog aBox(NULL, "ErrorNoPrinterDialog", - "vcl/ui/errornoprinterdialog.ui"); - aBox.Execute(); + VclPtr aBox(new MessageDialog(NULL, "ErrorNoPrinterDialog", + "vcl/ui/errornoprinterdialog.ui")); + aBox->Execute(); } xController->setValue( OUString( "IsDirect" ), makeAny( false ) ); @@ -454,9 +454,9 @@ void Printer::PreparePrintJob(std::shared_ptr xController, { if( xController->getFilteredPageCount() == 0 ) { - MessageDialog aBox(NULL, "ErrorNoContentDialog", - "vcl/ui/errornocontentdialog.ui"); - aBox.Execute(); + VclPtr aBox(new MessageDialog(NULL, "ErrorNoContentDialog", + "vcl/ui/errornocontentdialog.ui")); + aBox->Execute(); return; } } @@ -470,13 +470,13 @@ void Printer::PreparePrintJob(std::shared_ptr xController, { try { - PrintDialog aDlg( NULL, xController ); - if( ! aDlg.Execute() ) + VclPtr aDlg(new PrintDialog( NULL, xController )); + if( ! aDlg->Execute() ) { xController->abortJob(); return; } - if( aDlg.isPrintToFile() ) + if( aDlg->isPrintToFile() ) { OUString aFile = queryFile( xController->getPrinter().get() ); if( aFile.isEmpty() ) @@ -487,7 +487,7 @@ void Printer::PreparePrintJob(std::shared_ptr xController, xController->setValue( OUString( "LocalFileName" ), makeAny( aFile ) ); } - else if( aDlg.isSingleJobs() ) + else if( aDlg->isSingleJobs() ) { xController->setValue( OUString( "PrintCollateAsSingleJobs" ), makeAny( true ) ); diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx index d79b5391a28e..8178788edc2e 100644 --- a/vcl/source/window/dialog.cxx +++ b/vcl/source/window/dialog.cxx @@ -1058,8 +1058,8 @@ void Dialog::GrabFocusToFirstControl() void Dialog::GetDrawWindowBorder( sal_Int32& rLeftBorder, sal_Int32& rTopBorder, sal_Int32& rRightBorder, sal_Int32& rBottomBorder ) const { - ImplBorderWindow aImplWin( (vcl::Window*)this, WB_BORDER|WB_STDWORK, BORDERWINDOW_STYLE_OVERLAP ); - aImplWin.GetBorder( rLeftBorder, rTopBorder, rRightBorder, rBottomBorder ); + VclPtr aImplWin( new ImplBorderWindow( (vcl::Window*)this, WB_BORDER|WB_STDWORK, BORDERWINDOW_STYLE_OVERLAP ) ); + aImplWin->GetBorder( rLeftBorder, rTopBorder, rRightBorder, rBottomBorder ); } void Dialog::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uLong ) @@ -1085,13 +1085,13 @@ void Dialog::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal if (!( GetStyle() & WB_NOBORDER )) { - ImplBorderWindow aImplWin( this, WB_BORDER|WB_STDWORK, BORDERWINDOW_STYLE_OVERLAP ); - aImplWin.SetText( GetText() ); - aImplWin.setPosSizePixel( aPos.X(), aPos.Y(), aSize.Width(), aSize.Height() ); - aImplWin.SetDisplayActive( true ); - aImplWin.InitView(); + VclPtr aImplWin( new ImplBorderWindow(this, WB_BORDER|WB_STDWORK, BORDERWINDOW_STYLE_OVERLAP) ); + aImplWin->SetText( GetText() ); + aImplWin->setPosSizePixel( aPos.X(), aPos.Y(), aSize.Width(), aSize.Height() ); + aImplWin->SetDisplayActive( true ); + aImplWin->InitView(); - aImplWin.Draw( Rectangle( aPos, aSize ), pDev, aPos ); + aImplWin->Draw( Rectangle( aPos, aSize ), pDev, aPos ); } pDev->Pop(); diff --git a/vcl/source/window/menubarwindow.cxx b/vcl/source/window/menubarwindow.cxx index 9e45c5d4cfb3..9ea6a12e764e 100644 --- a/vcl/source/window/menubarwindow.cxx +++ b/vcl/source/window/menubarwindow.cxx @@ -60,7 +60,7 @@ void DecoToolBox::DataChanged( const DataChangedEvent& rDCEvt ) void DecoToolBox::calcMinSize() { - ToolBox aTbx( GetParent() ); + VclPtr aTbx( new ToolBox(GetParent()) ); if( GetItemCount() == 0 ) { ResMgr* pResMgr = ImplGetResMgr(); @@ -68,7 +68,7 @@ void DecoToolBox::calcMinSize() Bitmap aBitmap; if( pResMgr ) aBitmap = Bitmap( ResId( SV_RESID_BITMAP_CLOSEDOC, *pResMgr ) ); - aTbx.InsertItem( IID_DOCUMENTCLOSE, Image( aBitmap ) ); + aTbx->InsertItem( IID_DOCUMENTCLOSE, Image( aBitmap ) ); } else { @@ -76,11 +76,11 @@ void DecoToolBox::calcMinSize() for( sal_uInt16 i = 0; i < nItems; i++ ) { sal_uInt16 nId = GetItemId( i ); - aTbx.InsertItem( nId, GetItemImage( nId ) ); + aTbx->InsertItem( nId, GetItemImage( nId ) ); } } - aTbx.SetOutStyle( TOOLBOX_STYLE_FLAT ); - maMinSize = aTbx.CalcWindowSizePixel(); + aTbx->SetOutStyle( TOOLBOX_STYLE_FLAT ); + maMinSize = aTbx->CalcWindowSizePixel(); } void DecoToolBox::SetImages( long nMaxHeight, bool bForce ) diff --git a/vcl/unx/generic/printer/cupsmgr.cxx b/vcl/unx/generic/printer/cupsmgr.cxx index 4611f377ac48..92abca9a634c 100644 --- a/vcl/unx/generic/printer/cupsmgr.cxx +++ b/vcl/unx/generic/printer/cupsmgr.cxx @@ -952,11 +952,11 @@ namespace { bool bRet = false; - RTSPWDialog aDialog(rServer, rUserName, NULL); - if (aDialog.Execute()) + VclPtr aDialog(new RTSPWDialog(rServer, rUserName, NULL)); + if (aDialog->Execute()) { - rUserName = aDialog.getUserName(); - rPassword = aDialog.getPassword(); + rUserName = aDialog->getUserName(); + rPassword = aDialog->getPassword(); bRet = true; } diff --git a/vcl/unx/x11/x11sys.cxx b/vcl/unx/x11/x11sys.cxx index 5882fdb0589d..1e6ebe55bd76 100644 --- a/vcl/unx/x11/x11sys.cxx +++ b/vcl/unx/x11/x11sys.cxx @@ -134,19 +134,19 @@ int X11SalSystem::ShowNativeDialog( const OUString& rTitle, const OUString& rMes if( pSVData->mpIntroWindow ) pSVData->mpIntroWindow->Hide(); - WarningBox aWarn( NULL, WB_STDWORK, rMessage ); - aWarn.SetText( rTitle ); - aWarn.Clear(); + VclPtr aWarn(new WarningBox(NULL, WB_STDWORK, rMessage) ); + aWarn->SetText( rTitle ); + aWarn->Clear(); sal_uInt16 nButton = 0; for( std::list< OUString >::const_iterator it = rButtons.begin(); it != rButtons.end(); ++it ) { - aWarn.AddButton( *it, nButton+1, nButton == (sal_uInt16)nDefButton ? BUTTONDIALOG_DEFBUTTON : 0 ); + aWarn->AddButton( *it, nButton+1, nButton == (sal_uInt16)nDefButton ? BUTTONDIALOG_DEFBUTTON : 0 ); nButton++; } - aWarn.SetFocusButton( (sal_uInt16)nDefButton+1 ); + aWarn->SetFocusButton( (sal_uInt16)nDefButton+1 ); - nRet = ((int)aWarn.Execute()) - 1; + nRet = ((int)aWarn->Execute()) - 1; // normalize behaviour, actually this should never happen if( nRet < -1 || nRet >= int(rButtons.size()) ) diff --git a/vcl/workben/outdevgrind.cxx b/vcl/workben/outdevgrind.cxx index 72869d1d507a..cf7a0d0ea8a2 100644 --- a/vcl/workben/outdevgrind.cxx +++ b/vcl/workben/outdevgrind.cxx @@ -898,8 +898,8 @@ sal_uInt16 GrindApp::Exception( sal_uInt16 nError ) int GrindApp::Main() { - TestWindow aWindow; - aWindow.Execute(); + VclPtr aWindow(new TestWindow); + aWindow->Execute(); return 0; } diff --git a/vcl/workben/svdem.cxx b/vcl/workben/svdem.cxx index a06bf5cc13d7..6b2e233f9c78 100644 --- a/vcl/workben/svdem.cxx +++ b/vcl/workben/svdem.cxx @@ -81,9 +81,9 @@ public: void Main() { - MyWin aMainWin( NULL, WB_APP | WB_STDWORK ); - aMainWin.SetText(OUString("VCL - Workbench")); - aMainWin.Show(); + VclPtr aMainWin(new MyWin(NULL, WB_APP | WB_STDWORK) ); + aMainWin->SetText(OUString("VCL - Workbench")); + aMainWin->Show(); Application::Execute(); } diff --git a/vcl/workben/svpclient.cxx b/vcl/workben/svpclient.cxx index 708efb9144d3..7bbcdf2144f0 100644 --- a/vcl/workben/svpclient.cxx +++ b/vcl/workben/svpclient.cxx @@ -120,9 +120,9 @@ public: void Main() { - MyWin aMainWin( NULL, WB_STDWORK ); - aMainWin.SetText( OUString( "SvpClient" ) ); - aMainWin.Show(); + VclPtr aMainWin(new MyWin(NULL, WB_STDWORK) ); + aMainWin->SetText( OUString( "SvpClient" ) ); + aMainWin->Show(); Application::Execute(); } diff --git a/vcl/workben/svptest.cxx b/vcl/workben/svptest.cxx index ebf716c3abd1..ea6988633d94 100644 --- a/vcl/workben/svptest.cxx +++ b/vcl/workben/svptest.cxx @@ -34,6 +34,7 @@ #include #include #include +#include #include @@ -90,9 +91,9 @@ public: void Main() { - MyWin aMainWin( NULL, WB_APP | WB_STDWORK ); - aMainWin.SetText( OUString( "VCL - Workbench" ) ); - aMainWin.Show(); + VclPtr aMainWin(new MyWin(NULL, WB_APP | WB_STDWORK) ); + aMainWin->SetText( OUString( "VCL - Workbench" ) ); + aMainWin->Show(); Application::Execute(); } diff --git a/vcl/workben/vcldemo.cxx b/vcl/workben/vcldemo.cxx index 9860d7d20c84..14a57805beae 100644 --- a/vcl/workben/vcldemo.cxx +++ b/vcl/workben/vcldemo.cxx @@ -1609,18 +1609,18 @@ public: } } - DemoWin aMainWin(aRenderer, bThreads); + VclPtr aMainWin(new DemoWin(aRenderer, bThreads)); std::unique_ptr xWidgets; std::unique_ptr xPopup; - aMainWin.SetText("Interactive VCL demo #1"); + aMainWin->SetText("Interactive VCL demo #1"); if (bWidgets) xWidgets.reset(new DemoWidgets()); else if (bPopup) xPopup.reset(new DemoPopup()); else - aMainWin.Show(); + aMainWin->Show(); Application::Execute(); } diff --git a/writerperfect/source/writer/WordPerfectImportFilter.cxx b/writerperfect/source/writer/WordPerfectImportFilter.cxx index 5294e2e030f3..a8e7c3e5bfc1 100644 --- a/writerperfect/source/writer/WordPerfectImportFilter.cxx +++ b/writerperfect/source/writer/WordPerfectImportFilter.cxx @@ -119,11 +119,11 @@ throw (RuntimeException, std::exception) int unsuccessfulAttempts = 0; while (true) { - SfxPasswordDialog aPasswdDlg(0); - aPasswdDlg.SetMinLen(0); - if (!aPasswdDlg.Execute()) + VclPtr aPasswdDlg(new SfxPasswordDialog(0)); + aPasswdDlg->SetMinLen(0); + if (!aPasswdDlg->Execute()) return false; - OUString aPasswd = aPasswdDlg.GetPassword(); + OUString aPasswd = aPasswdDlg->GetPassword(); aUtf8Passwd = OUStringToOString(aPasswd, RTL_TEXTENCODING_UTF8); if (libwpd::WPD_PASSWORD_MATCH_OK == libwpd::WPDocument::verifyPassword(&input, aUtf8Passwd.getStr())) break; @@ -303,11 +303,11 @@ throw (RuntimeException, std::exception) int unsuccessfulAttempts = 0; while (true) { - SfxPasswordDialog aPasswdDlg(0); - aPasswdDlg.SetMinLen(0); - if (!aPasswdDlg.Execute()) + VclPtr aPasswdDlg(new SfxPasswordDialog(0)); + aPasswdDlg->SetMinLen(0); + if (!aPasswdDlg->Execute()) return com::sun::star::ui::dialogs::ExecutableDialogResults::CANCEL; - msPassword = aPasswdDlg.GetPassword().getStr(); + msPassword = aPasswdDlg->GetPassword().getStr(); aUtf8Passwd = OUStringToOString(msPassword, RTL_TEXTENCODING_UTF8); if (libwpd::WPD_PASSWORD_MATCH_OK == libwpd::WPDocument::verifyPassword(&input, aUtf8Passwd.getStr())) break; diff --git a/xmlsecurity/source/component/documentdigitalsignatures.cxx b/xmlsecurity/source/component/documentdigitalsignatures.cxx index acaac53e3e43..16301d12d9c6 100644 --- a/xmlsecurity/source/component/documentdigitalsignatures.cxx +++ b/xmlsecurity/source/component/documentdigitalsignatures.cxx @@ -222,17 +222,17 @@ bool DocumentDigitalSignatures::ImplViewSignatures( DocumentSignatureMode eMode, bool bReadOnly ) throw (RuntimeException, std::exception) { bool bChanges = false; - DigitalSignaturesDialog aSignaturesDialog( - NULL, mxCtx, eMode, bReadOnly, m_sODFVersion, m_bHasDocumentSignature); - bool bInit = aSignaturesDialog.Init(); + VclPtr aSignaturesDialog(new DigitalSignaturesDialog( + NULL, mxCtx, eMode, bReadOnly, m_sODFVersion, m_bHasDocumentSignature)); + bool bInit = aSignaturesDialog->Init(); DBG_ASSERT( bInit, "Error initializing security context!" ); if ( bInit ) { - aSignaturesDialog.SetStorage( rxStorage ); - aSignaturesDialog.SetSignatureStream( xSignStream ); - if ( aSignaturesDialog.Execute() ) + aSignaturesDialog->SetStorage( rxStorage ); + aSignaturesDialog->SetSignatureStream( xSignStream ); + if ( aSignaturesDialog->Execute() ) { - if ( aSignaturesDialog.SignaturesChanged() ) + if ( aSignaturesDialog->SignaturesChanged() ) { bChanges = true; // If we have a storage and no stream, we are responsible for commit @@ -246,8 +246,8 @@ bool DocumentDigitalSignatures::ImplViewSignatures( } else { - MessageDialog aBox(NULL, XMLSEC_RES(RID_XMLSECWB_NO_MOZILLA_PROFILE), VCL_MESSAGE_WARNING); - aBox.Execute(); + VclPtr aBox(new MessageDialog(NULL, XMLSEC_RES(RID_XMLSECWB_NO_MOZILLA_PROFILE), VCL_MESSAGE_WARNING)); + aBox->Execute(); } return bChanges; @@ -386,8 +386,8 @@ void DocumentDigitalSignatures::manageTrustedSources( ) throw (RuntimeException if ( aSignatureHelper.Init() ) xSecEnv = aSignatureHelper.GetSecurityEnvironment(); - MacroSecurity aDlg( NULL, mxCtx, xSecEnv ); - aDlg.Execute(); + VclPtr aDlg(new MacroSecurity( NULL, mxCtx, xSecEnv ) ); + aDlg->Execute(); } void DocumentDigitalSignatures::showCertificate( @@ -401,8 +401,8 @@ void DocumentDigitalSignatures::showCertificate( if ( bInit ) { - CertificateViewer aViewer( NULL, aSignatureHelper.GetSecurityEnvironment(), _Certificate, false ); - aViewer.Execute(); + VclPtr aViewer(new CertificateViewer( NULL, aSignatureHelper.GetSecurityEnvironment(), _Certificate, false ) ); + aViewer->Execute(); } } @@ -441,12 +441,12 @@ Reference< css::security::XCertificate > DocumentDigitalSignatures::chooseCertif if ( aSignatureHelper.Init() ) xSecEnv = aSignatureHelper.GetSecurityEnvironment(); - CertificateChooser aChooser( NULL, mxCtx, xSecEnv, aSignatureHelper.GetSignatureInformations()); + VclPtr aChooser(new CertificateChooser( NULL, mxCtx, xSecEnv, aSignatureHelper.GetSignatureInformations()) ); - if (aChooser.Execute() != RET_OK) + if (aChooser->Execute() != RET_OK) return Reference< css::security::XCertificate >(0); - Reference< css::security::XCertificate > xCert = aChooser.GetSelectedCertificate(); + Reference< css::security::XCertificate > xCert = aChooser->GetSelectedCertificate(); if ( !xCert.is() ) return Reference< css::security::XCertificate >(0); diff --git a/xmlsecurity/source/dialogs/certificatechooser.cxx b/xmlsecurity/source/dialogs/certificatechooser.cxx index dfd3a549afd6..576013a9e06b 100644 --- a/xmlsecurity/source/dialogs/certificatechooser.cxx +++ b/xmlsecurity/source/dialogs/certificatechooser.cxx @@ -223,8 +223,8 @@ void CertificateChooser::ImplShowCertificateDetails() uno::Reference< css::security::XCertificate > xCert = GetSelectedCertificate(); if( xCert.is() ) { - CertificateViewer aViewer( this, mxSecurityEnvironment, xCert, true ); - aViewer.Execute(); + VclPtr aViewer(new CertificateViewer( this, mxSecurityEnvironment, xCert, true )); + aViewer->Execute(); } } diff --git a/xmlsecurity/source/dialogs/certificateviewer.cxx b/xmlsecurity/source/dialogs/certificateviewer.cxx index 4c67c84e6f9c..6de4d968b58b 100644 --- a/xmlsecurity/source/dialogs/certificateviewer.cxx +++ b/xmlsecurity/source/dialogs/certificateviewer.cxx @@ -382,8 +382,8 @@ IMPL_LINK_NOARG(CertificateViewerCertPathTP, ViewCertHdl) SvTreeListEntry* pEntry = mpCertPathLB->FirstSelected(); if( pEntry ) { - CertificateViewer aViewer( this, mpDlg->mxSecurityEnvironment, static_cast(pEntry->GetUserData())->mxCert, false ); - aViewer.Execute(); + ScopedVclPtr aViewer( this, mpDlg->mxSecurityEnvironment, static_cast(pEntry->GetUserData())->mxCert, false ); + aViewer->Execute(); } return 0; diff --git a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx index 948655c0da23..ab127deedc94 100644 --- a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx +++ b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx @@ -298,8 +298,8 @@ bool DigitalSignaturesDialog::canAddRemove() if ( (!bSave1_1 && bDoc1_1) || (bSave1_1 && bDoc1_1) ) { //#4 - MessageDialog err(NULL, XMLSEC_RES(STR_XMLSECDLG_OLD_ODF_FORMAT)); - err.Execute(); + VclPtr err(new MessageDialog(NULL, XMLSEC_RES(STR_XMLSECDLG_OLD_ODF_FORMAT))); + err->Execute(); ret = false; } @@ -417,10 +417,10 @@ IMPL_LINK_NOARG(DigitalSignaturesDialog, AddButtonHdl) uno::Reference xSerialNumberAdapter = ::com::sun::star::security::SerialNumberAdapter::create(mxCtx); - CertificateChooser aChooser( this, mxCtx, xSecEnv, maCurrentSignatureInformations ); - if ( aChooser.Execute() == RET_OK ) + VclPtr aChooser(new CertificateChooser( this, mxCtx, xSecEnv, maCurrentSignatureInformations )); + if ( aChooser->Execute() == RET_OK ) { - uno::Reference< ::com::sun::star::security::XCertificate > xCert = aChooser.GetSelectedCertificate(); + uno::Reference< ::com::sun::star::security::XCertificate > xCert = aChooser->GetSelectedCertificate(); if ( !xCert.is() ) { SAL_WARN( "xmlsecurity.dialogs", "no certificate selected" ); @@ -752,8 +752,8 @@ void DigitalSignaturesDialog::ImplShowSignaturesDetails() DBG_ASSERT( xCert.is(), "Error getting cCertificate!" ); if ( xCert.is() ) { - CertificateViewer aViewer( this, maSignatureHelper.GetSecurityEnvironment(), xCert, false ); - aViewer.Execute(); + VclPtr aViewer(new CertificateViewer( this, maSignatureHelper.GetSecurityEnvironment(), xCert, false )); + aViewer->Execute(); } } } diff --git a/xmlsecurity/source/dialogs/macrosecurity.cxx b/xmlsecurity/source/dialogs/macrosecurity.cxx index 3fc606537eac..e5bcabcddd40 100644 --- a/xmlsecurity/source/dialogs/macrosecurity.cxx +++ b/xmlsecurity/source/dialogs/macrosecurity.cxx @@ -208,8 +208,8 @@ IMPL_LINK_NOARG(MacroSecurityTrustedSourcesTP, ViewCertPBHdl) if ( xCert.is() ) { - CertificateViewer aViewer( this, mpDlg->mxSecurityEnvironment, xCert, false ); - aViewer.Execute(); + VclPtr aViewer(new CertificateViewer( this, mpDlg->mxSecurityEnvironment, xCert, false )); + aViewer->Execute(); } } return 0; -- cgit v1.2.3 From 562109b8357eb0690034844e097e0acafbdc39b6 Mon Sep 17 00:00:00 2001 From: Michael Meeks Date: Fri, 27 Feb 2015 16:29:46 +0000 Subject: vcl: ensure that VclBuilder is disposed before parent window. Move VclBuilder to use VclPtr, link to documentation, and fix more double dispose issues. Change-Id: I4900b69dbb381bd7d6fda97f2a5e623bb58e0a9f --- cui/source/options/optcolor.cxx | 13 +++++++++++++ include/vcl/builder.hxx | 11 ++++++++++- include/vcl/tabpage.hxx | 2 ++ include/vcl/vclptr.hxx | 18 ++++++++++++++++++ reportdesign/source/ui/dlg/Condition.cxx | 1 + sfx2/source/appl/newhelp.cxx | 3 +++ sfx2/source/dialog/backingwindow.cxx | 1 + sfx2/source/dialog/dockwin.cxx | 2 ++ svx/source/dialog/ctredlin.cxx | 4 ++++ svx/source/form/datanavi.cxx | 6 ++++++ svx/source/sidebar/PanelLayout.cxx | 1 + sw/source/ui/index/cnttab.cxx | 2 ++ sw/source/uibase/sidebar/PagePropertyPanel.cxx | 8 ++++++++ vcl/source/window/builder.cxx | 11 +++++++++-- vcl/source/window/dialog.cxx | 6 ++++++ vcl/source/window/dockwin.cxx | 3 +++ vcl/source/window/syswin.cxx | 1 + vcl/source/window/tabpage.cxx | 11 +++++++++++ 18 files changed, 101 insertions(+), 3 deletions(-) (limited to 'sfx2/source/appl/newhelp.cxx') diff --git a/cui/source/options/optcolor.cxx b/cui/source/options/optcolor.cxx index 3eb0229d22da..c96cb625fb4f 100644 --- a/cui/source/options/optcolor.cxx +++ b/cui/source/options/optcolor.cxx @@ -174,6 +174,8 @@ class ColorConfigWindow_Impl { public: ColorConfigWindow_Impl(vcl::Window* pParent); + ~ColorConfigWindow_Impl() { dispose(); } + virtual void dispose() SAL_OVERRIDE; public: void SetLinks (Link const&, Link const&, Link const&); @@ -508,6 +510,12 @@ ColorConfigWindow_Impl::ColorConfigWindow_Impl(vcl::Window* pParent) SetAppearance(); } +void ColorConfigWindow_Impl::dispose() +{ + disposeBuilder(); + VclContainer::dispose(); +} + Size ColorConfigWindow_Impl::calculateRequisition() const { return getLayoutRequisition(*m_pGrid); @@ -913,9 +921,14 @@ ColorConfigCtrl_Impl::~ColorConfigCtrl_Impl() void ColorConfigCtrl_Impl::dispose() { delete m_pVScroll; + m_pVScroll = NULL; delete m_pScrollWindow; + m_pScrollWindow = NULL; delete m_pBody; + m_pBody = NULL; delete m_pHeaderHB; + m_pHeaderHB = NULL; + VclVBox::dispose(); } diff --git a/include/vcl/builder.hxx b/include/vcl/builder.hxx index 179ca334bf52..aba3f0889e60 100644 --- a/include/vcl/builder.hxx +++ b/include/vcl/builder.hxx @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include @@ -55,6 +56,9 @@ public: const css::uno::Reference &rFrame = css::uno::Reference()); ~VclBuilder(); + ///releases references and disposes all children. + void disposeBuilder(); + //sID must exist and be of type T template T* get(T*& ret, const OString& sID); @@ -146,7 +150,7 @@ private: struct WinAndId { OString m_sID; - vcl::Window *m_pWindow; + VclPtr m_pWindow; short m_nResponseId; PackingData m_aPackingData; WinAndId(const OString &rId, vcl::Window *pWindow, bool bVertical) @@ -445,12 +449,17 @@ inline PopupMenu* VclBuilder::get_menu(PopupMenu*& ret, const OString& sID) // //i.e. class Dialog : public SystemWindow, public VclBuilderContainer //not class Dialog : public VclBuilderContainer, public SystemWindow +// +//With the new 'dispose' framework, it is necessary to force the builder +//dispose before the Window dispose; so a Dialog::dispose() method would +//finish: disposeBuilder(); SystemWindow::dispose() to capture this ordering. class VCL_DLLPUBLIC VclBuilderContainer { public: VclBuilderContainer(); virtual ~VclBuilderContainer(); + void disposeBuilder(); static OUString getUIRootDir(); bool hasBuilder() const { return m_pUIBuilder != NULL; } diff --git a/include/vcl/tabpage.hxx b/include/vcl/tabpage.hxx index c7361972ccb1..7294d4896748 100644 --- a/include/vcl/tabpage.hxx +++ b/include/vcl/tabpage.hxx @@ -41,6 +41,8 @@ private: public: explicit TabPage( vcl::Window* pParent, WinBits nStyle = 0 ); explicit TabPage( vcl::Window *pParent, const OString& rID, const OUString& rUIXMLDescription ); + ~TabPage(); + virtual void dispose() SAL_OVERRIDE; virtual void Paint( const Rectangle& rRect ) SAL_OVERRIDE; virtual void Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uLong nFlags ) SAL_OVERRIDE; diff --git a/include/vcl/vclptr.hxx b/include/vcl/vclptr.hxx index 37da714166dc..50a87ba247ef 100644 --- a/include/vcl/vclptr.hxx +++ b/include/vcl/vclptr.hxx @@ -70,6 +70,9 @@ public: /** * A thin wrapper around rtl::Reference to implement the acquire and dispose semantics we want for references to vcl::Window subclasses. + * + * For more details on the design please see vcl/README.lifecycle + * * @param reference_type must be a subclass of vcl::Window */ template @@ -136,6 +139,11 @@ public: m_rInnerRef.set(pBody); } + inline void SAL_CALL reset(reference_type *pBody) + { + m_rInnerRef.set(pBody); + } + inline VclPtr& SAL_CALL operator= (reference_type * pBody) { m_rInnerRef.set(pBody); @@ -152,6 +160,16 @@ public: return m_rInnerRef.get() != NULL; } + inline void SAL_CALL clear() + { + m_rInnerRef.clear(); + } + + inline void SAL_CALL reset() + { + m_rInnerRef.clear(); + } + inline void disposeAndClear() { // hold it alive for the lifetime of this method diff --git a/reportdesign/source/ui/dlg/Condition.cxx b/reportdesign/source/ui/dlg/Condition.cxx index c5e131a23314..fb86522b68c3 100644 --- a/reportdesign/source/ui/dlg/Condition.cxx +++ b/reportdesign/source/ui/dlg/Condition.cxx @@ -162,6 +162,7 @@ OColorPopup::~OColorPopup() void OColorPopup::dispose() { m_aColorSet.disposeAndClear(); + disposeBuilder(); FloatingWindow::dispose(); } diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx index 9a80a2e0df55..78c2df24484b 100644 --- a/sfx2/source/appl/newhelp.cxx +++ b/sfx2/source/appl/newhelp.cxx @@ -1457,6 +1457,9 @@ void SfxHelpIndexWindow_Impl::dispose() SvtViewOptions aViewOpt( E_TABDIALOG, CONFIGNAME_INDEXWIN ); aViewOpt.SetPageID( (sal_Int32)m_pTabCtrl->GetCurPageId() ); + + disposeBuilder(); + vcl::Window::dispose(); } diff --git a/sfx2/source/dialog/backingwindow.cxx b/sfx2/source/dialog/backingwindow.cxx index fa3f40338cbc..fcb9074ecfc2 100644 --- a/sfx2/source/dialog/backingwindow.cxx +++ b/sfx2/source/dialog/backingwindow.cxx @@ -217,6 +217,7 @@ void BackingWindow::dispose() } mxDropTargetListener = css::uno::Reference< css::datatransfer::dnd::XDropTargetListener >(); } + disposeBuilder(); vcl::Window::dispose(); } diff --git a/sfx2/source/dialog/dockwin.cxx b/sfx2/source/dialog/dockwin.cxx index c3e0e3dda02c..e17c3b26782a 100644 --- a/sfx2/source/dialog/dockwin.cxx +++ b/sfx2/source/dialog/dockwin.cxx @@ -259,6 +259,8 @@ SfxTitleDockingWindow::~SfxTitleDockingWindow() void SfxTitleDockingWindow::dispose() { delete m_pWrappedWindow; + m_pWrappedWindow = NULL; + SfxDockingWindow::dispose(); } diff --git a/svx/source/dialog/ctredlin.cxx b/svx/source/dialog/ctredlin.cxx index 48b50b005173..0d2e53039841 100644 --- a/svx/source/dialog/ctredlin.cxx +++ b/svx/source/dialog/ctredlin.cxx @@ -118,6 +118,7 @@ SvxRedlinTable::~SvxRedlinTable() void SvxRedlinTable::dispose() { delete pCommentSearcher; + pCommentSearcher = NULL; SvSimpleTable::dispose(); } @@ -1084,7 +1085,10 @@ SvxAcceptChgCtr::~SvxAcceptChgCtr() void SvxAcceptChgCtr::dispose() { delete pTPView; + pTPView = NULL; delete pTPFilter; + pTPFilter = NULL; + disposeBuilder(); TabControl::dispose(); } diff --git a/svx/source/form/datanavi.cxx b/svx/source/form/datanavi.cxx index 148a747209de..c09637e7e59d 100644 --- a/svx/source/form/datanavi.cxx +++ b/svx/source/form/datanavi.cxx @@ -1419,17 +1419,23 @@ namespace svxform aViewOpt.SetUserItem(CFGNAME_SHOWDETAILS,aAny); delete m_pInstPage; + m_pInstPage = NULL; delete m_pSubmissionPage; + m_pSubmissionPage = NULL; delete m_pBindingPage; + m_pBindingPage = NULL; sal_Int32 i, nCount = m_aPageList.size(); for ( i = 0; i < nCount; ++i ) delete m_aPageList[i]; + m_aPageList.clear(); + Reference< XFrameActionListener > xListener( static_cast< XFrameActionListener* >( m_xDataListener.get() ), UNO_QUERY ); m_xFrame->removeFrameActionListener( xListener ); RemoveBroadcaster(); m_xDataListener.clear(); + disposeBuilder(); vcl::Window::dispose(); } diff --git a/svx/source/sidebar/PanelLayout.cxx b/svx/source/sidebar/PanelLayout.cxx index 23934f6228f2..52247256a9b8 100644 --- a/svx/source/sidebar/PanelLayout.cxx +++ b/svx/source/sidebar/PanelLayout.cxx @@ -33,6 +33,7 @@ void PanelLayout::dispose() { m_bInClose = true; m_aPanelLayoutIdle.Stop(); + disposeBuilder(); Control::dispose(); } diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx index 9bcaa1f8e2bb..0005136836ed 100644 --- a/sw/source/ui/index/cnttab.cxx +++ b/sw/source/ui/index/cnttab.cxx @@ -2658,6 +2658,8 @@ void SwTokenWindow::dispose() pControl->SetLoseFocusHdl( Link() ); delete pControl; } + aControlList.clear(); + disposeBuilder(); VclHBox::dispose(); } diff --git a/sw/source/uibase/sidebar/PagePropertyPanel.cxx b/sw/source/uibase/sidebar/PagePropertyPanel.cxx index dd2fac9cd309..13db3215afb9 100644 --- a/sw/source/uibase/sidebar/PagePropertyPanel.cxx +++ b/sw/source/uibase/sidebar/PagePropertyPanel.cxx @@ -206,7 +206,15 @@ PagePropertyPanel::~PagePropertyPanel() void PagePropertyPanel::dispose() { delete[] maImgSize; + maImgSize = NULL; delete[] maImgSize_L; + maImgSize_L = NULL; + + mpPageItem.reset(); + mpPageLRMarginItem.reset(); + mpPageULMarginItem.reset(); + mpPageSizeItem.reset(); + PanelLayout::dispose(); } diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx index 3efccec1a396..278a3e5edbd6 100644 --- a/vcl/source/window/builder.cxx +++ b/vcl/source/window/builder.cxx @@ -524,18 +524,25 @@ VclBuilder::VclBuilder(vcl::Window *pParent, const OUString& sUIDir, const OUStr } VclBuilder::~VclBuilder() +{ + disposeBuilder(); +} + +void VclBuilder::disposeBuilder() { for (std::vector::reverse_iterator aI = m_aChildren.rbegin(), aEnd = m_aChildren.rend(); aI != aEnd; ++aI) { - delete aI->m_pWindow; + aI->m_pWindow.disposeAndClear(); } + m_aChildren.clear(); for (std::vector::reverse_iterator aI = m_aMenus.rbegin(), aEnd = m_aMenus.rend(); aI != aEnd; ++aI) { delete aI->m_pMenu; } + m_aMenus.clear(); } void VclBuilder::handleTranslations(xmlreader::XmlReader &reader) @@ -3213,7 +3220,7 @@ void VclBuilder::collectAccelerator(xmlreader::XmlReader &reader, stringmap &rMa vcl::Window *VclBuilder::get_widget_root() { - return m_aChildren.empty() ? NULL : m_aChildren[0].m_pWindow; + return m_aChildren.empty() ? NULL : m_aChildren[0].m_pWindow.get(); } vcl::Window *VclBuilder::get_by_name(const OString& sID) diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx index 8178788edc2e..9975c9710558 100644 --- a/vcl/source/window/dialog.cxx +++ b/vcl/source/window/dialog.cxx @@ -456,6 +456,12 @@ Dialog::Dialog( WindowType nType ) ImplInitDialogData(); } +void VclBuilderContainer::disposeBuilder() +{ + if (m_pUIBuilder) + m_pUIBuilder->disposeBuilder(); +} + OUString VclBuilderContainer::getUIRootDir() { /*to-do, check if user config has an override before using shared one, etc*/ diff --git a/vcl/source/window/dockwin.cxx b/vcl/source/window/dockwin.cxx index 549d8c445c24..bc1740ef6771 100644 --- a/vcl/source/window/dockwin.cxx +++ b/vcl/source/window/dockwin.cxx @@ -119,6 +119,9 @@ void ImplDockFloatWin::dispose() { if( mnLastUserEvent ) Application::RemoveUserEvent( mnLastUserEvent ); + + disposeBuilder(); + FloatingWindow::dispose(); } diff --git a/vcl/source/window/syswin.cxx b/vcl/source/window/syswin.cxx index 19768d771769..3bc802fc73e7 100644 --- a/vcl/source/window/syswin.cxx +++ b/vcl/source/window/syswin.cxx @@ -118,6 +118,7 @@ void SystemWindow::dispose() // Hack to make sure code called from base ~Window does not interpret this // as a SystemWindow (which it no longer is by then): mpWindowImpl->mbSysWin = false; + disposeBuilder(); Window::dispose(); } diff --git a/vcl/source/window/tabpage.cxx b/vcl/source/window/tabpage.cxx index d55496412e2b..995438ff86b4 100644 --- a/vcl/source/window/tabpage.cxx +++ b/vcl/source/window/tabpage.cxx @@ -85,6 +85,17 @@ TabPage::TabPage(vcl::Window *pParent, const OString& rID, const OUString& rUIXM set_expand(true); } +TabPage::~TabPage() +{ + dispose(); +} + +void TabPage::dispose() +{ + disposeBuilder(); + vcl::Window::dispose(); +} + void TabPage::StateChanged( StateChangedType nType ) { Window::StateChanged( nType ); -- cgit v1.2.3 From 1c4025babd7037a3292aa530c7d45ab8d6ef6dcb Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 9 Mar 2015 14:29:30 +0200 Subject: vclwidget: change all vcl::window fields to be wrapped in VclPtr and update the VclWidget clang plugin to - warn about unconverted fields - .clear() all VclPtr fields in dispose() methods Change-Id: I6e657c215bc6807efd992555399b3b1fc16c89b5 2 1 accessibility/inc/accessibility/extended/accessibleiconchoicectrlentry.hxx 2 1 accessibility/inc/accessibility/extended/accessibletabbarbase.hxx 1 1 accessibility/inc/accessibility/extended/accessibletablistbox.hxx 1 1 accessibility/inc/accessibility/extended/accessibletablistboxtable.hxx 3 2 accessibility/inc/accessibility/extended/listboxaccessible.hxx 1 1 accessibility/inc/accessibility/extended/textwindowaccessibility.hxx 2 1 accessibility/inc/accessibility/standard/vclxaccessiblemenubar.hxx 2 1 accessibility/inc/accessibility/standard/vclxaccessiblestatusbar.hxx 4 4 accessibility/inc/accessibility/standard/vclxaccessiblestatusbaritem.hxx 2 1 accessibility/inc/accessibility/standard/vclxaccessibletabcontrol.hxx 2 1 accessibility/inc/accessibility/standard/vclxaccessibletabpage.hxx 3 2 accessibility/inc/accessibility/standard/vclxaccessibletabpagewindow.hxx 7 6 accessibility/inc/accessibility/standard/vclxaccessibletoolboxitem.hxx 3 3 accessibility/source/extended/AccessibleToolPanelDeck.cxx 2 2 accessibility/source/extended/AccessibleToolPanelDeckTabBar.cxx 2 2 accessibility/source/extended/AccessibleToolPanelDeckTabBarItem.cxx 1 1 accessibility/source/extended/accessibleiconchoicectrlentry.cxx 3 3 accessibility/source/extended/textwindowaccessibility.cxx 3 3 accessibility/source/standard/vclxaccessibleradiobutton.cxx 1 1 accessibility/source/standard/vclxaccessibletabpagewindow.cxx 1 1 avmedia/inc/mediacontrol.hxx 1 2 avmedia/source/framework/mediacontrol.cxx 1 1 avmedia/source/framework/mediaplayer.cxx 7 7 avmedia/source/viewer/mediaevent_impl.cxx 2 1 avmedia/source/viewer/mediaevent_impl.hxx 1 2 avmedia/source/viewer/mediawindow_impl.cxx 1 1 avmedia/source/viewer/mediawindow_impl.hxx 1 1 basctl/source/basicide/basicrenderable.hxx 1 0 basctl/source/basicide/baside2.cxx 7 5 basctl/source/basicide/baside2.hxx 13 2 basctl/source/basicide/baside2b.cxx 3 3 basctl/source/basicide/baside3.cxx 14 14 basctl/source/basicide/basides1.cxx 4 4 basctl/source/basicide/basides2.cxx 2 2 basctl/source/basicide/basides3.cxx 6 6 basctl/source/basicide/basidesh.cxx 14 1 basctl/source/basicide/bastypes.cxx 15 0 basctl/source/basicide/brkdlg.cxx 8 6 basctl/source/basicide/brkdlg.hxx 11 0 basctl/source/basicide/layout.cxx 5 2 basctl/source/basicide/layout.hxx 11 0 basctl/source/basicide/linenumberwindow.cxx 3 1 basctl/source/basicide/linenumberwindow.hxx 14 0 basctl/source/basicide/macrodlg.cxx 15 15 basctl/source/basicide/macrodlg.hxx 45 1 basctl/source/basicide/moduldl2.cxx 32 1 basctl/source/basicide/moduldlg.cxx 36 26 basctl/source/basicide/moduldlg.hxx 20 0 basctl/source/dlged/managelang.cxx 2 1 basctl/source/inc/accessibledialogcontrolshape.hxx 2 1 basctl/source/inc/accessibledialogwindow.hxx 2 2 basctl/source/inc/baside3.hxx 4 4 basctl/source/inc/basidesh.hxx 5 4 basctl/source/inc/bastypes.hxx 3 2 basctl/source/inc/dlged.hxx 12 10 basctl/source/inc/managelang.hxx 1 1 chart2/inc/ChartModel.hxx 2 1 chart2/source/controller/accessibility/AccessibleViewForwarder.hxx 2 2 chart2/source/controller/dialogs/ChartTypeDialogController.hxx 1 2 chart2/source/controller/dialogs/dlg_ChartType.cxx 2 10 chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx 1 0 chart2/source/controller/dialogs/dlg_DataEditor.cxx 4 6 chart2/source/controller/dialogs/dlg_DataSource.cxx 17 0 chart2/source/controller/dialogs/dlg_InsertAxis_Grid.cxx 6 8 chart2/source/controller/dialogs/dlg_View3D.cxx 2 2 chart2/source/controller/dialogs/res_BarGeometry.hxx 19 19 chart2/source/controller/dialogs/res_DataLabel.hxx 23 23 chart2/source/controller/dialogs/res_Trendline.hxx 14 0 chart2/source/controller/dialogs/tp_3D_SceneAppearance.cxx 6 4 chart2/source/controller/dialogs/tp_3D_SceneAppearance.hxx 18 0 chart2/source/controller/dialogs/tp_3D_SceneGeometry.cxx 9 7 chart2/source/controller/dialogs/tp_3D_SceneGeometry.hxx 14 1 chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx 16 16 chart2/source/controller/dialogs/tp_3D_SceneIllumination.hxx 17 0 chart2/source/controller/dialogs/tp_AxisLabel.cxx 17 17 chart2/source/controller/dialogs/tp_AxisLabel.hxx 24 0 chart2/source/controller/dialogs/tp_AxisPositions.cxx 20 18 chart2/source/controller/dialogs/tp_AxisPositions.hxx 44 19 chart2/source/controller/dialogs/tp_ChartType.cxx 3 3 chart2/source/controller/dialogs/tp_ChartType.hxx 28 0 chart2/source/controller/dialogs/tp_DataSource.cxx 22 20 chart2/source/controller/dialogs/tp_DataSource.hxx 12 0 chart2/source/controller/dialogs/tp_LegendPosition.cxx 3 1 chart2/source/controller/dialogs/tp_LegendPosition.hxx 16 0 chart2/source/controller/dialogs/tp_PolarOptions.cxx 8 6 chart2/source/controller/dialogs/tp_PolarOptions.hxx 24 0 chart2/source/controller/dialogs/tp_RangeChooser.cxx 15 13 chart2/source/controller/dialogs/tp_RangeChooser.hxx 35 0 chart2/source/controller/dialogs/tp_Scale.cxx 34 32 chart2/source/controller/dialogs/tp_Scale.hxx 24 0 chart2/source/controller/dialogs/tp_SeriesToAxis.cxx 19 17 chart2/source/controller/dialogs/tp_SeriesToAxis.hxx 7 0 chart2/source/controller/dialogs/tp_TitleRotation.cxx 7 7 chart2/source/controller/dialogs/tp_TitleRotation.hxx 13 0 chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.cxx 5 3 chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.hxx 1 1 chart2/source/controller/inc/dlg_ChartType.hxx 1 1 chart2/source/controller/inc/dlg_CreationWizard_UNO.hxx 1 1 chart2/source/controller/inc/dlg_DataEditor.hxx 4 4 chart2/source/controller/inc/dlg_DataSource.hxx 8 6 chart2/source/controller/inc/dlg_InsertAxis_Grid.hxx 4 4 chart2/source/controller/inc/dlg_View3D.hxx 27 27 chart2/source/controller/inc/res_ErrorBar.hxx 5 5 chart2/source/controller/inc/res_LegendPosition.hxx 14 14 chart2/source/controller/inc/res_Titles.hxx 1 1 chart2/source/controller/main/ChartController.hxx 2 3 chart2/source/controller/main/ChartWindow.cxx 1 1 chart2/source/controller/main/ChartWindow.hxx 6 6 chart2/source/controller/main/ShapeController.cxx 1 1 chart2/source/view/charttypes/GL3DBarChart.cxx 1 1 chart2/source/view/inc/GL3DBarChart.hxx 1 1 chart2/source/view/main/ChartView.cxx 155 50 compilerplugins/clang/vclwidgets.cxx 23 0 cui/source/customize/acccfg.cxx 95 20 cui/source/customize/cfg.cxx 1 0 cui/source/customize/cfgutil.cxx 1 0 cui/source/customize/eventdlg.cxx 1 1 cui/source/customize/eventdlg.hxx 12 0 cui/source/customize/macropg.cxx 8 6 cui/source/customize/macropg_impl.hxx 17 0 cui/source/customize/selector.cxx 20 0 cui/source/dialogs/SpellDialog.cxx 17 0 cui/source/dialogs/about.cxx 56 26 cui/source/dialogs/colorpicker.cxx 19 0 cui/source/dialogs/cuicharmap.cxx 29 1 cui/source/dialogs/cuifmsearch.cxx 84 2 cui/source/dialogs/cuigaldlg.cxx 72 0 cui/source/dialogs/cuigrfflt.cxx 15 0 cui/source/dialogs/cuiimapwnd.cxx 11 0 cui/source/dialogs/cuitbxform.cxx 41 0 cui/source/dialogs/dlgname.cxx 79 5 cui/source/dialogs/hangulhanjadlg.cxx 5 0 cui/source/dialogs/hldocntp.cxx 15 0 cui/source/dialogs/hldoctp.cxx 20 1 cui/source/dialogs/hlinettp.cxx 14 0 cui/source/dialogs/hlmailtp.cxx 15 0 cui/source/dialogs/hlmarkwn.cxx 9 5 cui/source/dialogs/hltpbase.cxx 18 0 cui/source/dialogs/hyphen.cxx 18 2 cui/source/dialogs/iconcdlg.cxx 45 0 cui/source/dialogs/insdlg.cxx 13 0 cui/source/dialogs/insrc.cxx 20 0 cui/source/dialogs/linkdlg.cxx 13 8 cui/source/dialogs/multipat.cxx 12 0 cui/source/dialogs/newtabledlg.cxx 9 9 cui/source/dialogs/passwdomdlg.cxx 13 0 cui/source/dialogs/pastedlg.cxx 7 0 cui/source/dialogs/postdlg.cxx 18 0 cui/source/dialogs/scriptdlg.cxx 11 0 cui/source/dialogs/showcols.cxx 14 0 cui/source/dialogs/splitcelldlg.cxx 25 0 cui/source/dialogs/srchxtra.cxx 39 0 cui/source/dialogs/thesdlg.cxx 13 0 cui/source/dialogs/zoom.cxx 29 0 cui/source/factory/cuiexp.cxx 0 2 cui/source/factory/dlgfact.cxx 2 3 cui/source/factory/dlgfact.hxx 3 1 cui/source/inc/ControlFocusHelper.hxx 20 20 cui/source/inc/SpellDialog.hxx 9 7 cui/source/inc/about.hxx 14 12 cui/source/inc/acccfg.hxx 26 26 cui/source/inc/align.hxx 62 52 cui/source/inc/autocdlg.hxx 29 29 cui/source/inc/backgrnd.hxx 34 32 cui/source/inc/border.hxx 44 33 cui/source/inc/cfg.hxx 1 1 cui/source/inc/cfgutil.hxx 95 85 cui/source/inc/chardlg.hxx 14 12 cui/source/inc/connect.hxx 12 10 cui/source/inc/cuicharmap.hxx 27 27 cui/source/inc/cuifmsearch.hxx 41 29 cui/source/inc/cuigaldlg.hxx 24 10 cui/source/inc/cuigrfflt.hxx 1 1 cui/source/inc/cuihyperdlg.hxx 7 5 cui/source/inc/cuiimapwnd.hxx 3 1 cui/source/inc/cuioptgenrl.hxx 3 1 cui/source/inc/cuisrchdlg.hxx 145 135 cui/source/inc/cuitabarea.hxx 57 53 cui/source/inc/cuitabline.hxx 3 1 cui/source/inc/cuitbxform.hxx 5 5 cui/source/inc/dbregister.hxx 17 12 cui/source/inc/dlgname.hxx 15 11 cui/source/inc/dstribut.hxx 21 21 cui/source/inc/grfpage.hxx 49 43 cui/source/inc/hangulhanjadlg.hxx 5 5 cui/source/inc/hldocntp.hxx 7 5 cui/source/inc/hldoctp.hxx 11 9 cui/source/inc/hlinettp.hxx 6 4 cui/source/inc/hlmailtp.hxx 7 5 cui/source/inc/hlmarkwn.hxx 7 7 cui/source/inc/hltpbase.hxx 10 8 cui/source/inc/hyphen.hxx 14 12 cui/source/inc/iconcdlg.hxx 29 25 cui/source/inc/insdlg.hxx 5 3 cui/source/inc/insrc.hxx 12 10 cui/source/inc/labdlg.hxx 12 10 cui/source/inc/linkdlg.hxx 19 17 cui/source/inc/measure.hxx 6 6 cui/source/inc/multipat.hxx 4 2 cui/source/inc/newtabledlg.hxx 30 30 cui/source/inc/numfmt.hxx 64 64 cui/source/inc/numpages.hxx 13 13 cui/source/inc/optasian.hxx 17 13 cui/source/inc/optdict.hxx 18 18 cui/source/inc/optlingu.hxx 4 4 cui/source/inc/optpath.hxx 29 29 cui/source/inc/page.hxx 71 59 cui/source/inc/paragrph.hxx 6 4 cui/source/inc/pastedlg.hxx 7 7 cui/source/inc/postdlg.hxx 11 9 cui/source/inc/scriptdlg.hxx 9 7 cui/source/inc/selector.hxx 4 2 cui/source/inc/showcols.hxx 6 4 cui/source/inc/splitcelldlg.hxx 10 6 cui/source/inc/srchxtra.hxx 28 26 cui/source/inc/swpossizetabpage.hxx 29 27 cui/source/inc/tabstpge.hxx 20 17 cui/source/inc/textanim.hxx 19 16 cui/source/inc/textattr.hxx 15 8 cui/source/inc/thesdlg.hxx 34 28 cui/source/inc/transfrm.hxx 5 5 cui/source/inc/treeopt.hxx 13 13 cui/source/inc/zoom.hxx 4 2 cui/source/options/certpath.cxx 4 4 cui/source/options/certpath.hxx 17 0 cui/source/options/connpooloptions.cxx 10 8 cui/source/options/connpooloptions.hxx 11 0 cui/source/options/cuisrchdlg.cxx 5 2 cui/source/options/dbregister.cxx 14 0 cui/source/options/doclinkdialog.cxx 6 4 cui/source/options/doclinkdialog.hxx 10 2 cui/source/options/fontsubs.cxx 12 12 cui/source/options/fontsubs.hxx 26 0 cui/source/options/optaboutconfig.cxx 10 6 cui/source/options/optaboutconfig.hxx 9 0 cui/source/options/optaccessibility.cxx 9 9 cui/source/options/optaccessibility.hxx 13 0 cui/source/options/optasian.cxx 16 0 cui/source/options/optbasic.cxx 8 6 cui/source/options/optbasic.hxx 5 0 cui/source/options/optchart.cxx 5 5 cui/source/options/optchart.hxx 29 32 cui/source/options/optcolor.cxx 4 4 cui/source/options/optcolor.hxx 16 0 cui/source/options/optctl.cxx 8 6 cui/source/options/optctl.hxx 31 0 cui/source/options/optdict.cxx 21 2 cui/source/options/optfltr.cxx 12 10 cui/source/options/optfltr.hxx 54 0 cui/source/options/optgdlg.cxx 47 45 cui/source/options/optgdlg.hxx 12 2 cui/source/options/optgenrl.cxx 26 0 cui/source/options/opthtml.cxx 18 16 cui/source/options/opthtml.hxx 45 4 cui/source/options/optinet2.cxx 37 35 cui/source/options/optinet2.hxx 29 6 cui/source/options/optjava.cxx 23 21 cui/source/options/optjava.hxx 28 0 cui/source/options/optjsearch.cxx 22 20 cui/source/options/optjsearch.hxx 31 4 cui/source/options/optlingu.cxx 17 0 cui/source/options/optmemory.cxx 9 7 cui/source/options/optmemory.hxx 44 5 cui/source/options/optopencl.cxx 21 20 cui/source/options/optopencl.hxx 4 2 cui/source/options/optpath.cxx 17 0 cui/source/options/optsave.cxx 19 19 cui/source/options/optsave.hxx 19 0 cui/source/options/optupdt.cxx 12 10 cui/source/options/optupdt.hxx 39 0 cui/source/options/personalization.cxx 20 16 cui/source/options/personalization.hxx 18 0 cui/source/options/securityoptions.cxx 10 8 cui/source/options/securityoptions.hxx 11 10 cui/source/options/treeopt.cxx 4 2 cui/source/options/webconninfo.cxx 4 4 cui/source/options/webconninfo.hxx 24 0 cui/source/tabpages/align.cxx 106 7 cui/source/tabpages/autocdlg.cxx 27 0 cui/source/tabpages/backgrnd.cxx 34 0 cui/source/tabpages/border.cxx 115 1 cui/source/tabpages/chardlg.cxx 22 0 cui/source/tabpages/connect.cxx 32 0 cui/source/tabpages/dstribut.cxx 18 0 cui/source/tabpages/grfpage.cxx 20 0 cui/source/tabpages/labdlg.cxx 10 10 cui/source/tabpages/macroass.cxx 25 0 cui/source/tabpages/measure.cxx 25 1 cui/source/tabpages/numfmt.cxx 60 1 cui/source/tabpages/numpages.cxx 29 0 cui/source/tabpages/page.cxx 99 0 cui/source/tabpages/paragrph.cxx 37 0 cui/source/tabpages/swpossizetabpage.cxx 34 1 cui/source/tabpages/tabstpge.cxx 26 0 cui/source/tabpages/textanim.cxx 24 0 cui/source/tabpages/textattr.cxx 72 0 cui/source/tabpages/tparea.cxx 14 1 cui/source/tabpages/tpbitmap.cxx 28 4 cui/source/tabpages/tpcolor.cxx 28 0 cui/source/tabpages/tpgradnt.cxx 21 0 cui/source/tabpages/tphatch.cxx 29 0 cui/source/tabpages/tpline.cxx 25 0 cui/source/tabpages/tplnedef.cxx 18 0 cui/source/tabpages/tplneend.cxx 17 0 cui/source/tabpages/tpshadow.cxx 58 0 cui/source/tabpages/transfrm.cxx 42 0 dbaccess/source/ext/macromigration/macromigrationpages.cxx 20 14 dbaccess/source/ext/macromigration/macromigrationpages.hxx 1 1 dbaccess/source/ext/macromigration/rangeprogressbar.hxx 0 1 dbaccess/source/ui/app/AppDetailPageHelper.cxx 2 1 dbaccess/source/ui/app/AppDetailView.cxx 2 2 dbaccess/source/ui/app/AppDetailView.hxx 1 1 dbaccess/source/ui/app/AppTitleWindow.cxx 1 1 dbaccess/source/ui/app/AppTitleWindow.hxx 4 10 dbaccess/source/ui/app/AppView.cxx 4 4 dbaccess/source/ui/app/AppView.hxx 1 0 dbaccess/source/ui/app/subcomponentmanager.cxx 7 16 dbaccess/source/ui/browser/brwview.cxx 1 2 dbaccess/source/ui/browser/dbtreeview.cxx 1 1 dbaccess/source/ui/browser/dbtreeview.hxx 10 0 dbaccess/source/ui/browser/genericcontroller.cxx 68 41 dbaccess/source/ui/control/FieldDescControl.cxx 2 2 dbaccess/source/ui/control/TableGrantCtrl.cxx 3 1 dbaccess/source/ui/control/VertSplitView.cxx 3 3 dbaccess/source/ui/control/curledit.cxx 1 0 dbaccess/source/ui/control/sqledit.cxx 16 0 dbaccess/source/ui/dlg/CollectionView.cxx 4 8 dbaccess/source/ui/dlg/ConnectionHelper.cxx 4 5 dbaccess/source/ui/dlg/ConnectionHelper.hxx 19 0 dbaccess/source/ui/dlg/ConnectionPage.cxx 13 11 dbaccess/source/ui/dlg/ConnectionPage.hxx 12 0 dbaccess/source/ui/dlg/ConnectionPageSetup.cxx 4 2 dbaccess/source/ui/dlg/ConnectionPageSetup.hxx 113 1 dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx 61 48 dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx 2 1 dbaccess/source/ui/dlg/DbAdminImpl.hxx 13 0 dbaccess/source/ui/dlg/QueryPropertiesDialog.cxx 20 0 dbaccess/source/ui/dlg/RelationDlg.cxx 30 1 dbaccess/source/ui/dlg/TextConnectionHelper.cxx 21 19 dbaccess/source/ui/dlg/TextConnectionHelper.hxx 19 5 dbaccess/source/ui/dlg/UserAdmin.cxx 4 4 dbaccess/source/ui/dlg/UserAdmin.hxx 22 0 dbaccess/source/ui/dlg/admincontrols.cxx 14 13 dbaccess/source/ui/dlg/admincontrols.hxx 1 1 dbaccess/source/ui/dlg/adminpages.hxx 6 0 dbaccess/source/ui/dlg/adtabdlg.cxx 57 31 dbaccess/source/ui/dlg/advancedsettings.cxx 28 28 dbaccess/source/ui/dlg/advancedsettings.hxx 19 0 dbaccess/source/ui/dlg/dbfindex.cxx 11 9 dbaccess/source/ui/dlg/dbfindex.hxx 7 4 dbaccess/source/ui/dlg/dbwizsetup.cxx 86 16 dbaccess/source/ui/dlg/detailpages.cxx 45 35 dbaccess/source/ui/dlg/detailpages.hxx 7 0 dbaccess/source/ui/dlg/directsql.cxx 8 8 dbaccess/source/ui/dlg/dlgsave.cxx 13 0 dbaccess/source/ui/dlg/dlgsize.cxx 14 0 dbaccess/source/ui/dlg/dsselect.cxx 6 5 dbaccess/source/ui/dlg/dsselect.hxx 30 0 dbaccess/source/ui/dlg/generalpage.cxx 15 11 dbaccess/source/ui/dlg/generalpage.hxx 9 0 dbaccess/source/ui/dlg/indexdialog.cxx 2 2 dbaccess/source/ui/dlg/indexfieldscontrol.cxx 5 0 dbaccess/source/ui/dlg/paramdialog.cxx 21 0 dbaccess/source/ui/dlg/queryfilter.cxx 18 0 dbaccess/source/ui/dlg/queryorder.cxx 9 2 dbaccess/source/ui/dlg/sqlmessage.cxx 3 0 dbaccess/source/ui/dlg/tablespage.cxx 3 3 dbaccess/source/ui/dlg/tablespage.hxx 11 0 dbaccess/source/ui/dlg/textconnectionsettings.cxx 8 7 dbaccess/source/ui/inc/CollectionView.hxx 2 1 dbaccess/source/ui/inc/ConnectionLine.hxx 2 1 dbaccess/source/ui/inc/ConnectionLineAccess.hxx 35 35 dbaccess/source/ui/inc/FieldDescControl.hxx 2 1 dbaccess/source/ui/inc/JAccess.hxx 1 1 dbaccess/source/ui/inc/JoinController.hxx 2 2 dbaccess/source/ui/inc/JoinDesignView.hxx 13 13 dbaccess/source/ui/inc/JoinTableView.hxx 1 1 dbaccess/source/ui/inc/QueryDesignView.hxx 5 4 dbaccess/source/ui/inc/QueryPropertiesDialog.hxx 1 1 dbaccess/source/ui/inc/QueryTextView.hxx 2 2 dbaccess/source/ui/inc/QueryViewSwitch.hxx 3 3 dbaccess/source/ui/inc/RelationControl.hxx 11 9 dbaccess/source/ui/inc/RelationDlg.hxx 1 1 dbaccess/source/ui/inc/RelationTableView.hxx 1 1 dbaccess/source/ui/inc/TableConnection.hxx 1 1 dbaccess/source/ui/inc/TableDesignHelpBar.hxx 3 3 dbaccess/source/ui/inc/TableDesignView.hxx 2 1 dbaccess/source/ui/inc/TableFieldDescription.hxx 2 2 dbaccess/source/ui/inc/TableGrantCtrl.hxx 1 1 dbaccess/source/ui/inc/TableWindow.hxx 2 1 dbaccess/source/ui/inc/TableWindowAccess.hxx 2 2 dbaccess/source/ui/inc/TableWindowListBox.hxx 1 1 dbaccess/source/ui/inc/TableWindowTitle.hxx 1 1 dbaccess/source/ui/inc/TokenWriter.hxx 3 3 dbaccess/source/ui/inc/VertSplitView.hxx 13 11 dbaccess/source/ui/inc/WCPage.hxx 6 6 dbaccess/source/ui/inc/WColumnSelect.hxx 5 5 dbaccess/source/ui/inc/WCopyTable.hxx 12 11 dbaccess/source/ui/inc/WNameMatch.hxx 3 1 dbaccess/source/ui/inc/WTabPage.hxx 13 9 dbaccess/source/ui/inc/WTypeSelect.hxx 6 6 dbaccess/source/ui/inc/adtabdlg.hxx 5 5 dbaccess/source/ui/inc/brwview.hxx 1 1 dbaccess/source/ui/inc/curledit.hxx 4 3 dbaccess/source/ui/inc/datasourceconnector.hxx 3 3 dbaccess/source/ui/inc/dbwizsetup.hxx 7 7 dbaccess/source/ui/inc/directsql.hxx 4 2 dbaccess/source/ui/inc/dlgsize.hxx 9 9 dbaccess/source/ui/inc/indexdialog.hxx 2 2 dbaccess/source/ui/inc/indexfieldscontrol.hxx 2 1 dbaccess/source/ui/inc/linkeddocuments.hxx 5 5 dbaccess/source/ui/inc/paramdialog.hxx 2 2 dbaccess/source/ui/inc/querycontainerwindow.hxx 13 11 dbaccess/source/ui/inc/queryfilter.hxx 10 8 dbaccess/source/ui/inc/queryorder.hxx 1 1 dbaccess/source/ui/inc/sqledit.hxx 3 1 dbaccess/source/ui/inc/textconnectionsettings.hxx 2 1 dbaccess/source/ui/inc/undosqledit.hxx 5 5 dbaccess/source/ui/inc/unodatbr.hxx 1 1 dbaccess/source/ui/misc/ToolBoxHelper.cxx 23 0 dbaccess/source/ui/misc/WCPage.cxx 17 0 dbaccess/source/ui/misc/WColumnSelect.cxx 5 5 dbaccess/source/ui/misc/WCopyTable.cxx 20 0 dbaccess/source/ui/misc/WNameMatch.cxx 41 13 dbaccess/source/ui/misc/WTypeSelect.cxx 1 0 dbaccess/source/ui/misc/singledoccontroller.cxx 5 4 dbaccess/source/ui/querydesign/ConnectionLineAccess.cxx 1 1 dbaccess/source/ui/querydesign/JoinController.cxx 2 4 dbaccess/source/ui/querydesign/JoinDesignView.cxx 25 25 dbaccess/source/ui/querydesign/JoinTableView.cxx 1 1 dbaccess/source/ui/querydesign/QTableWindow.cxx 1 1 dbaccess/source/ui/querydesign/QueryDesignFieldUndoAct.hxx 2 1 dbaccess/source/ui/querydesign/QueryDesignUndoAction.hxx 29 30 dbaccess/source/ui/querydesign/QueryDesignView.cxx 1 1 dbaccess/source/ui/querydesign/QueryMoveTabWinUndoAct.hxx 1 1 dbaccess/source/ui/querydesign/QuerySizeTabWinUndoAct.hxx 9 9 dbaccess/source/ui/querydesign/QueryTabConnUndoAction.cxx 1 1 dbaccess/source/ui/querydesign/QueryTabConnUndoAction.hxx 3 5 dbaccess/source/ui/querydesign/QueryTabWinUndoAct.cxx 3 3 dbaccess/source/ui/querydesign/QueryTabWinUndoAct.hxx 24 30 dbaccess/source/ui/querydesign/QueryTableView.cxx 1 2 dbaccess/source/ui/querydesign/QueryTextView.cxx 12 10 dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx 6 6 dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx 1 1 dbaccess/source/ui/querydesign/TableConnection.cxx 1 0 dbaccess/source/ui/querydesign/TableFieldDescription.cxx 2 3 dbaccess/source/ui/querydesign/TableWindow.cxx 4 4 dbaccess/source/ui/querydesign/TableWindowAccess.cxx 1 1 dbaccess/source/ui/querydesign/TableWindowListBox.cxx 3 5 dbaccess/source/ui/querydesign/TableWindowTitle.cxx 1 2 dbaccess/source/ui/querydesign/limitboxcontroller.cxx 2 1 dbaccess/source/ui/querydesign/limitboxcontroller.hxx 2 3 dbaccess/source/ui/querydesign/querycontainerwindow.cxx 5 0 dbaccess/source/ui/querydesign/querydlg.cxx 5 5 dbaccess/source/ui/querydesign/querydlg.hxx 3 2 dbaccess/source/ui/relationdesign/RelationTableView.cxx 1 2 dbaccess/source/ui/tabledesign/FieldDescGenWin.cxx 1 1 dbaccess/source/ui/tabledesign/FieldDescGenWin.hxx 5 4 dbaccess/source/ui/tabledesign/TEditControl.cxx 6 6 dbaccess/source/ui/tabledesign/TEditControl.hxx 1 2 dbaccess/source/ui/tabledesign/TableDesignHelpBar.cxx 3 14 dbaccess/source/ui/tabledesign/TableDesignView.cxx 3 12 dbaccess/source/ui/tabledesign/TableFieldDescWin.cxx 3 3 dbaccess/source/ui/tabledesign/TableFieldDescWin.hxx 4 3 dbaccess/source/ui/tabledesign/TableUndo.hxx 1 1 dbaccess/source/ui/uno/DBTypeWizDlgSetup.cxx 3 3 dbaccess/source/ui/uno/composerdialogs.cxx 1 1 dbaccess/source/ui/uno/copytablewizard.cxx 4 4 desktop/source/app/cmdlinehelp.hxx 10 0 desktop/source/deployment/gui/dp_gui_dependencydialog.cxx 3 1 desktop/source/deployment/gui/dp_gui_dependencydialog.hxx 36 7 desktop/source/deployment/gui/dp_gui_dialog2.cxx 22 20 desktop/source/deployment/gui/dp_gui_dialog2.hxx 3 11 desktop/source/deployment/gui/dp_gui_extlistbox.cxx 3 3 desktop/source/deployment/gui/dp_gui_extlistbox.hxx 5 12 desktop/source/deployment/gui/dp_gui_theextmgr.cxx 3 3 desktop/source/deployment/gui/dp_gui_theextmgr.hxx 15 1 desktop/source/deployment/gui/dp_gui_updatedialog.cxx 15 15 desktop/source/deployment/gui/dp_gui_updatedialog.hxx 7 0 desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx 7 7 desktop/source/deployment/gui/dp_gui_updateinstalldialog.hxx 22 7 desktop/source/deployment/gui/license_dialog.cxx 2 1 editeng/source/editeng/impedit.hxx 2 1 editeng/source/editeng/textconv.hxx 1 1 editeng/source/misc/hangulhanja.cxx 2 2 editeng/source/misc/splwrap.cxx 6 0 extensions/source/abpilot/abpfinalpage.cxx 7 6 extensions/source/abpilot/abpfinalpage.hxx 2 1 extensions/source/abpilot/admininvokationimpl.hxx 10 1 extensions/source/abpilot/admininvokationpage.cxx 4 3 extensions/source/abpilot/admininvokationpage.hxx 12 0 extensions/source/abpilot/fieldmappingpage.cxx 5 3 extensions/source/abpilot/fieldmappingpage.hxx 10 0 extensions/source/abpilot/tableselectionpage.cxx 4 2 extensions/source/abpilot/tableselectionpage.hxx 11 0 extensions/source/abpilot/typeselectionpage.cxx 13 12 extensions/source/abpilot/typeselectionpage.hxx 1 1 extensions/source/abpilot/unodialogabp.cxx 4 3 extensions/source/bibliography/bibbeam.cxx 2 2 extensions/source/bibliography/bibbeam.hxx 5 2 extensions/source/bibliography/bibcont.cxx 2 2 extensions/source/bibliography/bibcont.hxx 1 0 extensions/source/bibliography/bibmod.cxx 1 1 extensions/source/bibliography/bibshortcuthandler.hxx 18 9 extensions/source/bibliography/bibview.cxx 23 11 extensions/source/bibliography/bibview.hxx 85 35 extensions/source/bibliography/datman.cxx 3 2 extensions/source/bibliography/datman.hxx 1 0 extensions/source/bibliography/framectr.cxx 55 7 extensions/source/bibliography/general.cxx 57 41 extensions/source/bibliography/general.hxx 1 0 extensions/source/bibliography/toolbar.cxx 2 2 extensions/source/bibliography/toolbar.hxx 39 0 extensions/source/dbpilots/commonpagesdbp.cxx 17 11 extensions/source/dbpilots/commonpagesdbp.hxx 12 0 extensions/source/dbpilots/controlwizard.cxx 7 6 extensions/source/dbpilots/controlwizard.hxx 15 0 extensions/source/dbpilots/gridwizard.cxx 8 6 extensions/source/dbpilots/gridwizard.hxx 48 2 extensions/source/dbpilots/groupboxwiz.cxx 18 10 extensions/source/dbpilots/groupboxwiz.hxx 33 0 extensions/source/dbpilots/listcombowizard.cxx 12 6 extensions/source/dbpilots/listcombowizard.hxx 7 6 extensions/source/plugin/inc/plugin/plctrl.hxx 3 4 extensions/source/propctrlr/browserline.cxx 4 4 extensions/source/propctrlr/browserline.hxx 2 2 extensions/source/propctrlr/browserview.cxx 1 1 extensions/source/propctrlr/browserview.hxx 2 7 extensions/source/propctrlr/commoncontrol.cxx 1 1 extensions/source/propctrlr/commoncontrol.hxx 1 1 extensions/source/propctrlr/controlfontdialog.cxx 25 2 extensions/source/propctrlr/formlinkdialog.cxx 6 5 extensions/source/propctrlr/formlinkdialog.hxx 11 0 extensions/source/propctrlr/listselectiondlg.cxx 3 1 extensions/source/propctrlr/listselectiondlg.hxx 11 0 extensions/source/propctrlr/newdatatype.cxx 4 2 extensions/source/propctrlr/newdatatype.hxx 1 0 extensions/source/propctrlr/propcontroller.cxx 2 2 extensions/source/propctrlr/propcontroller.hxx 1 5 extensions/source/propctrlr/propertyeditor.cxx 1 1 extensions/source/propctrlr/propertyeditor.hxx 3 0 extensions/source/propctrlr/selectlabeldialog.cxx 3 3 extensions/source/propctrlr/selectlabeldialog.hxx 5 11 extensions/source/propctrlr/standardcontrol.cxx 2 2 extensions/source/propctrlr/standardcontrol.hxx 5 0 extensions/source/propctrlr/taborder.cxx 5 5 extensions/source/propctrlr/taborder.hxx 14 0 extensions/source/scanner/grid.cxx 6 5 extensions/source/scanner/grid.hxx 31 1 extensions/source/scanner/sanedlg.cxx 24 24 extensions/source/scanner/sanedlg.hxx 13 0 filter/source/flash/impswfdialog.cxx 9 8 filter/source/flash/impswfdialog.hxx 1 1 filter/source/flash/swfdialog.cxx 122 2 filter/source/pdf/impdialog.cxx 99 93 filter/source/pdf/impdialog.hxx 1 1 filter/source/pdf/pdfdialog.cxx 2 2 filter/source/pdf/pdffilter.cxx 1 1 filter/source/svg/svgdialog.cxx 3 7 filter/source/xsltdialog/xmlfilterdialogcomponent.cxx 29 2 filter/source/xsltdialog/xmlfiltersettingsdialog.cxx 17 13 filter/source/xsltdialog/xmlfiltersettingsdialog.hxx 4 2 filter/source/xsltdialog/xmlfiltertabdialog.cxx 4 4 filter/source/xsltdialog/xmlfiltertabdialog.hxx 12 0 filter/source/xsltdialog/xmlfiltertabpagebasic.cxx 6 5 filter/source/xsltdialog/xmlfiltertabpagebasic.hxx 14 0 filter/source/xsltdialog/xmlfiltertabpagexslt.cxx 9 8 filter/source/xsltdialog/xmlfiltertabpagexslt.hxx 15 1 filter/source/xsltdialog/xmlfiltertestdialog.cxx 15 15 filter/source/xsltdialog/xmlfiltertestdialog.hxx 8 11 forms/source/richtext/richtextimplcontrol.cxx 7 7 forms/source/richtext/richtextimplcontrol.hxx 2 8 forms/source/solar/control/navtoolbar.cxx 2 2 forms/source/solar/inc/navtoolbar.hxx 10 8 formula/source/ui/dlg/ControlHelper.hxx 33 33 formula/source/ui/dlg/formula.cxx 12 0 formula/source/ui/dlg/funcpage.cxx 4 2 formula/source/ui/dlg/funcpage.hxx 39 16 formula/source/ui/dlg/funcutl.cxx 20 0 formula/source/ui/dlg/parawin.cxx 25 25 formula/source/ui/dlg/parawin.hxx 11 0 formula/source/ui/dlg/structpg.cxx 3 1 formula/source/ui/dlg/structpg.hxx 1 1 fpicker/source/office/OfficeControlAccess.hxx 6 8 fpicker/source/office/PlacesListBox.cxx 6 6 fpicker/source/office/PlacesListBox.hxx 5 3 fpicker/source/office/QueryFolderName.hxx 3 2 fpicker/source/office/asyncfilepicker.hxx 3 7 fpicker/source/office/commonpicker.cxx 2 1 fpicker/source/office/commonpicker.hxx 34 9 fpicker/source/office/iodlg.cxx 11 11 fpicker/source/office/iodlg.hxx 3 2 fpicker/source/office/iodlgimp.cxx 25 27 fpicker/source/office/iodlgimp.hxx 2 4 framework/inc/classes/fwktabwindow.hxx 2 1 framework/inc/dispatch/closedispatcher.hxx 1 1 framework/inc/helper/vclstatusindicator.hxx 4 3 framework/inc/uielement/buttontoolbarcontroller.hxx 1 1 framework/inc/uielement/comboboxtoolbarcontroller.hxx 3 2 framework/inc/uielement/complextoolbarcontroller.hxx 2 1 framework/inc/uielement/dropdownboxtoolbarcontroller.hxx 1 1 framework/inc/uielement/edittoolbarcontroller.hxx 6 5 framework/inc/uielement/generictoolbarcontroller.hxx 2 1 framework/inc/uielement/spinfieldtoolbarcontroller.hxx 2 1 framework/inc/uielement/statusbaritem.hxx 6 5 framework/inc/uielement/statusbarmanager.hxx 1 1 framework/inc/uielement/toolbarmanager.hxx 1 1 framework/inc/uielement/toolbarmerger.hxx 1 2 framework/source/helper/vclstatusindicator.cxx 4 4 framework/source/services/tabwindowservice.cxx 1 1 framework/source/uielement/buttontoolbarcontroller.cxx 1 3 framework/source/uielement/comboboxtoolbarcontroller.cxx 1 1 framework/source/uielement/complextoolbarcontroller.cxx 1 3 framework/source/uielement/dropdownboxtoolbarcontroller.cxx 1 3 framework/source/uielement/edittoolbarcontroller.cxx 1 1 framework/source/uielement/generictoolbarcontroller.cxx 1 3 framework/source/uielement/spinfieldtoolbarcontroller.cxx 25 26 framework/source/uielement/statusbarmanager.cxx 4 4 framework/source/uielement/toolbarmanager.cxx 2 1 include/dbaccess/ToolBoxHelper.hxx 4 3 include/dbaccess/genericcontroller.hxx 2 1 include/editeng/splwrap.hxx 4 2 include/formula/funcutl.hxx 6 10 include/sfx2/basedlgs.hxx 5 3 include/sfx2/checkin.hxx 4 4 include/sfx2/childwin.hxx 46 40 include/sfx2/dinfdlg.hxx 2 3 include/sfx2/fcontnr.hxx 2 1 include/sfx2/frame.hxx 8 9 include/sfx2/infobar.hxx 1 1 include/sfx2/ipclient.hxx 12 12 include/sfx2/mgetempl.hxx 2 2 include/sfx2/newstyle.hxx 16 14 include/sfx2/passwd.hxx 22 21 include/sfx2/printopt.hxx 1 1 include/sfx2/prnmon.hxx 2 1 include/sfx2/sidebar/SidebarPanelBase.hxx 3 3 include/sfx2/stbitem.hxx 10 10 include/sfx2/tabdlg.hxx 10 10 include/sfx2/templatedlg.hxx 4 4 include/sfx2/templateinfodlg.hxx 1 1 include/sfx2/thumbnailview.hxx 1 1 include/sfx2/thumbnailviewitem.hxx 2 1 include/sfx2/viewsh.hxx 5 4 include/svtools/GraphicExportOptionsDialog.hxx 7 6 include/svtools/PlaceEditDialog.hxx 13 13 include/svtools/ServerDetailsControls.hxx 2 1 include/svtools/accessibleruler.hxx 4 4 include/svtools/addresstemplate.hxx 8 8 include/svtools/brwbox.hxx 4 1 include/svtools/brwhead.hxx 4 4 include/svtools/calendar.hxx 4 4 include/svtools/colrdlg.hxx 5 5 include/svtools/editbrowsebox.hxx 3 1 include/svtools/fileview.hxx 2 2 include/svtools/generictoolboxcontroller.hxx 2 1 include/svtools/genericunodialog.hxx 7 7 include/svtools/prnsetup.hxx 3 1 include/svtools/simptabl.hxx 2 0 include/svtools/tabbar.hxx 2 2 include/svtools/treelistbox.hxx 6 7 include/svtools/wizardmachine.hxx 5 5 include/svtools/wizdlg.hxx 2 1 include/svx/AccessibleShapeTreeInfo.hxx 25 25 include/svx/bmpmask.hxx 18 16 include/svx/compressgraphicdialog.hxx 4 2 include/svx/contdlg.hxx 29 27 include/svx/ctredlin.hxx 1 1 include/svx/dialcontrol.hxx 5 5 include/svx/fillctrl.hxx 1 1 include/svx/fmshell.hxx 7 3 include/svx/fontworkgallery.hxx 16 16 include/svx/hdft.hxx 9 9 include/svx/imapdlg.hxx 1 1 include/svx/lboxctrl.hxx 1 1 include/svx/linkwarn.hxx 21 19 include/svx/optgrid.hxx 8 6 include/svx/passwd.hxx 24 22 include/svx/rubydialog.hxx 1 1 include/svx/ruler.hxx 2 1 include/svx/sidebar/Popup.hxx 50 50 include/svx/srchdlg.hxx 2 2 include/svx/svdedxv.hxx 2 2 include/svx/svdpntv.hxx 4 3 include/svx/tbxcolorupdate.hxx 3 2 include/tools/errinf.hxx 9 11 include/vcl/builder.hxx 2 2 include/vcl/button.hxx 3 3 include/vcl/combobox.hxx 2 2 include/vcl/controllayout.hxx 2 1 include/vcl/cursor.hxx 1 1 include/vcl/dialog.hxx 7 7 include/vcl/dockwin.hxx 2 1 include/vcl/event.hxx 1 1 include/vcl/field.hxx 1 1 include/vcl/fixed.hxx 2 2 include/vcl/floatwin.hxx 1 1 include/vcl/fltcall.hxx 17 13 include/vcl/layout.hxx 4 4 include/vcl/lstbox.hxx 1 1 include/vcl/menu.hxx 8 8 include/vcl/msgbox.hxx 4 4 include/vcl/opengl/OpenGLContext.hxx 1 1 include/vcl/seleng.hxx 1 1 include/vcl/split.hxx 1 1 include/vcl/syswin.hxx 2 2 include/vcl/tabdlg.hxx 1 1 include/vcl/tabpage.hxx 1 1 include/vcl/taskpanelist.hxx 2 2 include/vcl/toolbox.hxx 4 3 include/vcl/vclevent.hxx 39 1 include/vcl/vclptr.hxx 1 1 include/vcl/waitobj.hxx 2 2 include/vcl/window.hxx 8 1 reportdesign/source/ui/dlg/AddField.cxx 9 0 reportdesign/source/ui/dlg/CondFormat.cxx 14 3 reportdesign/source/ui/dlg/Condition.cxx 16 16 reportdesign/source/ui/dlg/Condition.hxx 13 0 reportdesign/source/ui/dlg/DateTime.cxx 2 0 reportdesign/source/ui/dlg/Formula.cxx 58 17 reportdesign/source/ui/dlg/GroupsSorting.cxx 1 1 reportdesign/source/ui/dlg/Navigator.cxx 12 0 reportdesign/source/ui/dlg/PageNumber.cxx 6 6 reportdesign/source/ui/inc/CondFormat.hxx 8 7 reportdesign/source/ui/inc/DateTime.hxx 4 4 reportdesign/source/ui/inc/DesignView.hxx 3 3 reportdesign/source/ui/inc/Formula.hxx 10 10 reportdesign/source/ui/inc/GroupsSorting.hxx 7 6 reportdesign/source/ui/inc/PageNumber.hxx 1 1 reportdesign/source/ui/inc/ReportController.hxx 1 1 reportdesign/source/ui/inc/ReportSection.hxx 4 4 reportdesign/source/ui/inc/ReportWindow.hxx 1 1 reportdesign/source/ui/inc/ScrollHelper.hxx 2 2 reportdesign/source/ui/inc/SectionView.hxx 1 1 reportdesign/source/ui/inc/SectionWindow.hxx 1 1 reportdesign/source/ui/inc/StartMarker.hxx 6 6 reportdesign/source/ui/inc/ViewsWindow.hxx 1 1 reportdesign/source/ui/inc/dlgedfunc.hxx 1 1 reportdesign/source/ui/inc/propbrw.hxx 9 3 reportdesign/source/ui/report/DesignView.cxx 1 0 reportdesign/source/ui/report/ReportSection.cxx 2 0 reportdesign/source/ui/report/ReportWindow.cxx 1 0 reportdesign/source/ui/report/ScrollHelper.cxx 1 0 reportdesign/source/ui/report/SectionWindow.cxx 1 0 reportdesign/source/ui/report/StartMarker.cxx 1 0 reportdesign/source/ui/report/ViewsWindow.cxx 1 0 reportdesign/source/ui/report/propbrw.cxx 2 1 sc/inc/AccessibleFilterMenu.hxx 2 1 sc/inc/AccessibleFilterMenuItem.hxx 2 2 sc/inc/scmod.hxx 2 1 sc/inc/scopetools.hxx 1 1 sc/inc/waitoff.hxx 12 12 sc/source/ui/Accessibility/AccessibleText.cxx 12 1 sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx 9 1 sc/source/ui/StatisticsDialogs/ExponentialSmoothingDialog.cxx 9 1 sc/source/ui/StatisticsDialogs/MovingAverageDialog.cxx 25 3 sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx 22 3 sc/source/ui/StatisticsDialogs/SamplingDialog.cxx 18 1 sc/source/ui/StatisticsDialogs/StatisticsInputOutputDialog.cxx 22 2 sc/source/ui/StatisticsDialogs/StatisticsTwoVariableDialog.cxx 5 0 sc/source/ui/app/inputhdl.cxx 7 7 sc/source/ui/app/scmod.cxx 2 4 sc/source/ui/attrdlg/scdlgfact.hxx 30 0 sc/source/ui/attrdlg/scuiexp.cxx 14 0 sc/source/ui/attrdlg/tabpages.cxx 18 0 sc/source/ui/cctrl/checklistmenu.cxx 23 0 sc/source/ui/condformat/colorformat.cxx 24 0 sc/source/ui/condformat/condformatdlg.cxx 4 1 sc/source/ui/condformat/condformatmgr.cxx 37 3 sc/source/ui/dbgui/PivotLayoutDialog.cxx 10 2 sc/source/ui/dbgui/PivotLayoutTreeListBase.cxx 1 1 sc/source/ui/dbgui/PivotLayoutTreeListLabel.cxx 17 0 sc/source/ui/dbgui/consdlg.cxx 13 0 sc/source/ui/dbgui/dapidata.cxx 23 0 sc/source/ui/dbgui/dapitype.cxx 15 0 sc/source/ui/dbgui/dbnamdlg.cxx 39 0 sc/source/ui/dbgui/dpgroupdlg.cxx 32 0 sc/source/ui/dbgui/filtdlg.cxx 18 0 sc/source/ui/dbgui/pfiltdlg.cxx 78 0 sc/source/ui/dbgui/pvfundlg.cxx 18 0 sc/source/ui/dbgui/scendlg.cxx 22 0 sc/source/ui/dbgui/scuiasciiopt.cxx 12 0 sc/source/ui/dbgui/scuiimoptdlg.cxx 19 0 sc/source/ui/dbgui/sfiltdlg.cxx 13 0 sc/source/ui/dbgui/sortdlg.cxx 11 0 sc/source/ui/dbgui/subtdlg.cxx 12 0 sc/source/ui/dbgui/textimportoptions.cxx 26 4 sc/source/ui/dbgui/tpsort.cxx 18 0 sc/source/ui/dbgui/tpsubt.cxx 59 0 sc/source/ui/dbgui/validate.cxx 1 1 sc/source/ui/dialogs/searchresults.cxx 3 3 sc/source/ui/docshell/tablink.cxx 10 0 sc/source/ui/docshell/tpstat.cxx 0 2 sc/source/ui/drawfunc/fupoor.cxx 1 0 sc/source/ui/formdlg/dwfunctr.cxx 2 1 sc/source/ui/inc/AccessibleCsvControl.hxx 1 1 sc/source/ui/inc/AccessibleEditObject.hxx 2 2 sc/source/ui/inc/AccessibleText.hxx 5 4 sc/source/ui/inc/AnalysisOfVarianceDialog.hxx 2 1 sc/source/ui/inc/ExponentialSmoothingDialog.hxx 2 1 sc/source/ui/inc/MovingAverageDialog.hxx 28 27 sc/source/ui/inc/PivotLayoutDialog.hxx 2 1 sc/source/ui/inc/PivotLayoutTreeListBase.hxx 16 15 sc/source/ui/inc/RandomNumberGeneratorDialog.hxx 15 14 sc/source/ui/inc/SamplingDialog.hxx 11 10 sc/source/ui/inc/StatisticsInputOutputDialog.hxx 14 13 sc/source/ui/inc/StatisticsTwoVariableDialog.hxx 4 4 sc/source/ui/inc/acredlin.hxx 9 9 sc/source/ui/inc/anyrefdg.hxx 12 12 sc/source/ui/inc/areasdlg.hxx 8 5 sc/source/ui/inc/checklistmenu.hxx 15 14 sc/source/ui/inc/colorformat.hxx 11 8 sc/source/ui/inc/condformatdlg.hxx 4 4 sc/source/ui/inc/condformatmgr.hxx 6 5 sc/source/ui/inc/conflictsdlg.hxx 17 17 sc/source/ui/inc/consdlg.hxx 2 1 sc/source/ui/inc/content.hxx 9 2 sc/source/ui/inc/corodlg.hxx 6 4 sc/source/ui/inc/crdlg.hxx 13 12 sc/source/ui/inc/crnrdlg.hxx 5 3 sc/source/ui/inc/dapidata.hxx 12 11 sc/source/ui/inc/dapitype.hxx 10 9 sc/source/ui/inc/datafdlg.hxx 19 17 sc/source/ui/inc/datastreamdlg.hxx 18 18 sc/source/ui/inc/dbnamdlg.hxx 6 4 sc/source/ui/inc/delcldlg.hxx 10 9 sc/source/ui/inc/delcodlg.hxx 28 27 sc/source/ui/inc/dpgroupdlg.hxx 1 1 sc/source/ui/inc/dwfunctr.hxx 21 20 sc/source/ui/inc/filldlg.hxx 60 60 sc/source/ui/inc/filtdlg.hxx 12 12 sc/source/ui/inc/foptmgr.hxx 2 2 sc/source/ui/inc/fupoor.hxx 2 2 sc/source/ui/inc/gridwin.hxx 3 3 sc/source/ui/inc/groupdlg.hxx 8 8 sc/source/ui/inc/highred.hxx 5 4 sc/source/ui/inc/inputhdl.hxx 5 4 sc/source/ui/inc/inscldlg.hxx 26 26 sc/source/ui/inc/inscodlg.hxx 13 13 sc/source/ui/inc/instbdlg.hxx 3 1 sc/source/ui/inc/lbseldlg.hxx 8 7 sc/source/ui/inc/linkarea.hxx 4 2 sc/source/ui/inc/mtrindlg.hxx 8 7 sc/source/ui/inc/mvtabdlg.hxx 6 5 sc/source/ui/inc/namecrea.hxx 13 12 sc/source/ui/inc/namedefdlg.hxx 14 14 sc/source/ui/inc/namedlg.hxx 4 4 sc/source/ui/inc/namepast.hxx 1 1 sc/source/ui/inc/navipi.hxx 4 4 sc/source/ui/inc/notemark.hxx 5 5 sc/source/ui/inc/opredlin.hxx 67 60 sc/source/ui/inc/optsolver.hxx 21 21 sc/source/ui/inc/pfiltdlg.hxx 5 5 sc/source/ui/inc/prevwsh.hxx 8 7 sc/source/ui/inc/protectiondlg.hxx 46 42 sc/source/ui/inc/pvfundlg.hxx 1 1 sc/source/ui/inc/reffact.hxx 14 12 sc/source/ui/inc/retypepassdlg.hxx 10 9 sc/source/ui/inc/scendlg.hxx 22 22 sc/source/ui/inc/scuiasciiopt.hxx 15 13 sc/source/ui/inc/scuiautofmt.hxx 12 12 sc/source/ui/inc/scuiimoptdlg.hxx 22 21 sc/source/ui/inc/scuitphfedit.hxx 1 1 sc/source/ui/inc/searchresults.hxx 3 3 sc/source/ui/inc/sharedocdlg.hxx 4 2 sc/source/ui/inc/shtabdlg.hxx 6 5 sc/source/ui/inc/simpref.hxx 11 7 sc/source/ui/inc/solveroptions.hxx 11 10 sc/source/ui/inc/solvrdlg.hxx 5 3 sc/source/ui/inc/sortdlg.hxx 6 6 sc/source/ui/inc/sortkeydlg.hxx 4 3 sc/source/ui/inc/strindlg.hxx 3 1 sc/source/ui/inc/subtdlg.hxx 8 3 sc/source/ui/inc/tabbgcolordlg.hxx 13 12 sc/source/ui/inc/tabopdlg.hxx 7 4 sc/source/ui/inc/tabpages.hxx 5 5 sc/source/ui/inc/tabview.hxx 6 6 sc/source/ui/inc/textimportoptions.hxx 16 16 sc/source/ui/inc/tpcalc.hxx 3 3 sc/source/ui/inc/tpcompatibility.hxx 3 2 sc/source/ui/inc/tpdefaults.hxx 12 12 sc/source/ui/inc/tpformula.hxx 7 6 sc/source/ui/inc/tphf.hxx 5 5 sc/source/ui/inc/tpprint.hxx 17 17 sc/source/ui/inc/tpsort.hxx 5 5 sc/source/ui/inc/tpstat.hxx 13 13 sc/source/ui/inc/tpsubt.hxx 24 24 sc/source/ui/inc/tptable.hxx 12 12 sc/source/ui/inc/tpusrlst.hxx 44 44 sc/source/ui/inc/tpview.hxx 34 28 sc/source/ui/inc/validate.hxx 11 9 sc/source/ui/inc/xmlsourcedlg.hxx 4 1 sc/source/ui/miscdlgs/acredlin.cxx 8 10 sc/source/ui/miscdlgs/anyrefdg.cxx 11 0 sc/source/ui/miscdlgs/conflictsdlg.cxx 15 0 sc/source/ui/miscdlgs/crdlg.cxx 19 1 sc/source/ui/miscdlgs/crnrdlg.cxx 14 0 sc/source/ui/miscdlgs/datafdlg.cxx 27 0 sc/source/ui/miscdlgs/datastreamdlg.cxx 15 0 sc/source/ui/miscdlgs/delcldlg.cxx 19 4 sc/source/ui/miscdlgs/delcodlg.cxx 26 0 sc/source/ui/miscdlgs/filldlg.cxx 11 3 sc/source/ui/miscdlgs/groupdlg.cxx 7 1 sc/source/ui/miscdlgs/highred.cxx 14 4 sc/source/ui/miscdlgs/inscldlg.cxx 22 0 sc/source/ui/miscdlgs/inscodlg.cxx 13 0 sc/source/ui/miscdlgs/instbdlg.cxx 12 0 sc/source/ui/miscdlgs/lbseldlg.cxx 13 0 sc/source/ui/miscdlgs/linkarea.cxx 12 0 sc/source/ui/miscdlgs/mtrindlg.cxx 13 0 sc/source/ui/miscdlgs/mvtabdlg.cxx 14 0 sc/source/ui/miscdlgs/namecrea.cxx 94 1 sc/source/ui/miscdlgs/optsolver.cxx 13 0 sc/source/ui/miscdlgs/protectiondlg.cxx 24 1 sc/source/ui/miscdlgs/retypepassdlg.cxx 23 0 sc/source/ui/miscdlgs/scuiautofmt.cxx 3 1 sc/source/ui/miscdlgs/sharedocdlg.cxx 12 0 sc/source/ui/miscdlgs/shtabdlg.cxx 11 0 sc/source/ui/miscdlgs/simpref.cxx 27 0 sc/source/ui/miscdlgs/solveroptions.cxx 17 1 sc/source/ui/miscdlgs/solvrdlg.cxx 12 0 sc/source/ui/miscdlgs/strindlg.cxx 23 0 sc/source/ui/miscdlgs/tabbgcolordlg.cxx 19 0 sc/source/ui/miscdlgs/tabopdlg.cxx 21 0 sc/source/ui/namedlg/namedefdlg.cxx 14 1 sc/source/ui/namedlg/namedlg.cxx 4 1 sc/source/ui/namedlg/namepast.cxx 7 0 sc/source/ui/navipi/content.cxx 21 1 sc/source/ui/optdlg/calcoptionsdlg.cxx 17 16 sc/source/ui/optdlg/calcoptionsdlg.hxx 10 0 sc/source/ui/optdlg/opredlin.cxx 16 0 sc/source/ui/optdlg/tpcalc.cxx 7 0 sc/source/ui/optdlg/tpcompatibility.cxx 8 0 sc/source/ui/optdlg/tpdefaults.cxx 17 0 sc/source/ui/optdlg/tpformula.cxx 9 0 sc/source/ui/optdlg/tpprint.cxx 12 0 sc/source/ui/optdlg/tpusrlst.cxx 43 0 sc/source/ui/optdlg/tpview.cxx 12 0 sc/source/ui/pagedlg/areasdlg.cxx 26 0 sc/source/ui/pagedlg/scuitphfedit.cxx 8 0 sc/source/ui/pagedlg/tphf.cxx 27 0 sc/source/ui/pagedlg/tptable.cxx 14 0 sc/source/ui/sidebar/AlignmentPropertyPanel.cxx 11 9 sc/source/ui/sidebar/AlignmentPropertyPanel.hxx 10 0 sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx 7 5 sc/source/ui/sidebar/CellAppearancePropertyPanel.hxx 12 0 sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx 8 7 sc/source/ui/sidebar/NumberFormatPropertyPanel.hxx 4 4 sc/source/ui/vba/vbaeventshelper.cxx 14 13 sc/source/ui/view/gridwin.cxx 1 1 sc/source/ui/view/gridwin2.cxx 4 4 sc/source/ui/view/prevwsh.cxx 15 15 sc/source/ui/view/reffact.cxx 1 1 sc/source/ui/view/tabview.cxx 3 4 sc/source/ui/view/tabview5.cxx 20 1 sc/source/ui/xmlsource/xmlsourcedlg.cxx 1 1 sd/inc/Outliner.hxx 105 3 sd/source/filter/html/pubdlg.cxx 8 8 sd/source/ui/accessibility/AccessibleSlideSorterView.cxx 19 5 sd/source/ui/animations/CustomAnimationCreateDialog.cxx 2 2 sd/source/ui/animations/CustomAnimationCreateDialog.hxx 120 58 sd/source/ui/animations/CustomAnimationDialog.cxx 4 4 sd/source/ui/animations/CustomAnimationDialog.hxx 1 1 sd/source/ui/animations/CustomAnimationList.cxx 20 3 sd/source/ui/animations/CustomAnimationPane.cxx 17 17 sd/source/ui/animations/CustomAnimationPane.hxx 14 1 sd/source/ui/animations/SlideTransitionPane.cxx 13 13 sd/source/ui/animations/SlideTransitionPane.hxx 1 1 sd/source/ui/annotations/annotationtag.hxx 10 3 sd/source/ui/annotations/annotationwindow.cxx 5 4 sd/source/ui/annotations/annotationwindow.hxx 11 2 sd/source/ui/controller/slidelayoutcontroller.cxx 2 2 sd/source/ui/dlg/PaneChildWindows.cxx 17 0 sd/source/ui/dlg/PhotoAlbumDialog.cxx 13 11 sd/source/ui/dlg/PhotoAlbumDialog.hxx 13 0 sd/source/ui/dlg/RemoteDialog.cxx 5 3 sd/source/ui/dlg/RemoteDialog.hxx 1 1 sd/source/ui/dlg/RemoteDialogClientBox.hxx 20 2 sd/source/ui/dlg/animobjs.cxx 4 2 sd/source/ui/dlg/brkdlg.cxx 11 25 sd/source/ui/dlg/copydlg.cxx 29 0 sd/source/ui/dlg/custsdlg.cxx 61 61 sd/source/ui/dlg/dlgass.cxx 15 0 sd/source/ui/dlg/dlgfield.cxx 19 0 sd/source/ui/dlg/dlgsnap.cxx 47 19 sd/source/ui/dlg/headerfooterdlg.cxx 12 0 sd/source/ui/dlg/ins_paste.cxx 9 0 sd/source/ui/dlg/inspagob.cxx 16 0 sd/source/ui/dlg/layeroptionsdlg.cxx 15 0 sd/source/ui/dlg/masterlayoutdlg.cxx 9 0 sd/source/ui/dlg/morphdlg.cxx 13 3 sd/source/ui/dlg/paragr.cxx 33 0 sd/source/ui/dlg/present.cxx 26 1 sd/source/ui/dlg/prntopts.cxx 7 7 sd/source/ui/dlg/sddlgfact.cxx 1 2 sd/source/ui/dlg/sddlgfact.hxx 10 0 sd/source/ui/dlg/sdpreslt.cxx 3 1 sd/source/ui/dlg/sdtreelb.cxx 15 0 sd/source/ui/dlg/sduiexp.cxx 19 0 sd/source/ui/dlg/tpaction.cxx 42 0 sd/source/ui/dlg/tpoption.cxx 16 0 sd/source/ui/dlg/vectdlg.cxx 1 1 sd/source/ui/framework/factories/ChildWindowPane.cxx 4 8 sd/source/ui/framework/factories/FullScreenPane.cxx 1 1 sd/source/ui/framework/factories/Pane.cxx 5 3 sd/source/ui/func/fupoor.cxx 1 1 sd/source/ui/inc/AccessibleDocumentViewBase.hxx 2 1 sd/source/ui/inc/AccessibleSlideSorterView.hxx 4 4 sd/source/ui/inc/BreakDlg.hxx 2 1 sd/source/ui/inc/FormShellManager.hxx 1 1 sd/source/ui/inc/Ruler.hxx 2 2 sd/source/ui/inc/ViewShell.hxx 1 1 sd/source/ui/inc/Window.hxx 2 1 sd/source/ui/inc/WindowUpdater.hxx 23 23 sd/source/ui/inc/animobjs.hxx 11 11 sd/source/ui/inc/copydlg.hxx 21 20 sd/source/ui/inc/custsdlg.hxx 6 5 sd/source/ui/inc/dlgfield.hxx 11 9 sd/source/ui/inc/dlgsnap.hxx 2 1 sd/source/ui/inc/framework/Pane.hxx 3 3 sd/source/ui/inc/fupoor.hxx 6 6 sd/source/ui/inc/headerfooterdlg.hxx 4 2 sd/source/ui/inc/ins_paste.hxx 4 3 sd/source/ui/inc/inspagob.hxx 9 6 sd/source/ui/inc/layeroptionsdlg.hxx 7 5 sd/source/ui/inc/masterlayoutdlg.hxx 5 4 sd/source/ui/inc/morphdlg.hxx 2 2 sd/source/ui/inc/navigatr.hxx 25 23 sd/source/ui/inc/present.hxx 20 19 sd/source/ui/inc/prntopts.hxx 85 84 sd/source/ui/inc/pubdlg.hxx 6 5 sd/source/ui/inc/sdpreslt.hxx 2 2 sd/source/ui/inc/sdtreelb.hxx 1 1 sd/source/ui/inc/taskpane/SlideSorterCacheDisplay.hxx 16 15 sd/source/ui/inc/tpaction.hxx 32 30 sd/source/ui/inc/tpoption.hxx 11 10 sd/source/ui/inc/vectdlg.hxx 1 1 sd/source/ui/slideshow/slideshow.cxx 6 8 sd/source/ui/slideshow/slideshowimpl.cxx 6 6 sd/source/ui/slideshow/slideshowimpl.hxx 2 2 sd/source/ui/table/TableDesignPane.hxx 2 2 sd/source/ui/view/FormShellManager.cxx 1 0 sd/source/ui/view/sdruler.cxx 1 1 sd/source/ui/view/sdview2.cxx 1 0 sd/source/ui/view/sdwindow.cxx 1 1 sd/source/ui/view/viewshe2.cxx 1 1 sd/source/ui/view/viewshel.cxx 6 6 sfx2/inc/srchdlg.hxx 8 10 sfx2/source/appl/childwin.cxx 1 1 sfx2/source/appl/fileobj.hxx 2 1 sfx2/source/appl/helpinterceptor.hxx 20 4 sfx2/source/appl/impldde.cxx 2 2 sfx2/source/appl/lnkbase2.cxx 65 14 sfx2/source/appl/newhelp.cxx 33 25 sfx2/source/appl/newhelp.hxx 8 8 sfx2/source/appl/workwin.cxx 1 1 sfx2/source/control/thumbnailview.cxx 1 1 sfx2/source/control/thumbnailviewacc.cxx 3 2 sfx2/source/control/thumbnailviewacc.hxx 2 3 sfx2/source/control/thumbnailviewitem.cxx 2 0 sfx2/source/dialog/alienwarn.cxx 23 4 sfx2/source/dialog/backingwindow.cxx 29 29 sfx2/source/dialog/backingwindow.hxx 10 3 sfx2/source/dialog/basedlgs.cxx 13 0 sfx2/source/dialog/checkin.cxx 88 14 sfx2/source/dialog/dinfdlg.cxx 4 6 sfx2/source/dialog/dockwin.cxx 11 0 sfx2/source/dialog/documentfontsdialog.cxx 1 1 sfx2/source/dialog/filedlgimpl.hxx 8 23 sfx2/source/dialog/infobar.cxx 14 0 sfx2/source/dialog/inputdlg.cxx 12 0 sfx2/source/dialog/mgetempl.cxx 1 1 sfx2/source/dialog/navigat.cxx 2 0 sfx2/source/dialog/newstyle.cxx 4 4 sfx2/source/dialog/partwnd.cxx 22 0 sfx2/source/dialog/passwd.cxx 30 0 sfx2/source/dialog/printopt.cxx 2 1 sfx2/source/dialog/recfloat.cxx 4 4 sfx2/source/dialog/securitypage.cxx 11 8 sfx2/source/dialog/splitwin.cxx 6 0 sfx2/source/dialog/srchdlg.cxx 22 22 sfx2/source/dialog/tabdlg.cxx 5 1 sfx2/source/dialog/templateinfodlg.cxx 4 5 sfx2/source/dialog/templdlg.cxx 29 2 sfx2/source/dialog/versdlg.cxx 11 11 sfx2/source/doc/new.cxx 12 2 sfx2/source/doc/templatedlg.cxx 2 2 sfx2/source/inc/alienwarn.hxx 3 1 sfx2/source/inc/documentfontsdialog.hxx 6 4 sfx2/source/inc/inputdlg.hxx 1 1 sfx2/source/inc/recfloat.hxx 5 5 sfx2/source/inc/splitwin.hxx 5 5 sfx2/source/inc/templdgi.hxx 21 19 sfx2/source/inc/versdlg.hxx 6 6 sfx2/source/inc/workwin.hxx 12 12 sfx2/source/sidebar/FocusManager.cxx 5 5 sfx2/source/sidebar/FocusManager.hxx 15 4 sfx2/source/sidebar/PanelTitleBar.cxx 3 1 sfx2/source/sidebar/PanelTitleBar.hxx 1 1 sfx2/source/sidebar/SidebarChildWindow.cxx 9 9 sfx2/source/sidebar/SidebarController.cxx 2 2 sfx2/source/sidebar/SidebarController.hxx 6 10 sfx2/source/sidebar/SidebarPanelBase.cxx 1 1 sfx2/source/statbar/stbitem.cxx 1 1 sfx2/source/toolbox/imgmgr.cxx 11 15 sfx2/source/toolbox/tbxitem.cxx 1 1 sfx2/source/view/frame.cxx 1 1 sfx2/source/view/frame2.cxx 7 7 sfx2/source/view/impframe.hxx 2 2 sfx2/source/view/impviewframe.hxx 1 1 sfx2/source/view/printer.cxx 1 1 sfx2/source/view/sfxbasecontroller.cxx 2 2 sfx2/source/view/viewfrm.cxx 2 2 sfx2/source/view/viewprn.cxx 2 2 starmath/inc/ElementsDockingWindow.hxx 85 71 starmath/inc/dialog.hxx 3 3 starmath/inc/edit.hxx 3 3 starmath/inc/toolbox.hxx 1 1 starmath/inc/view.hxx 2 1 starmath/source/ElementsDockingWindow.cxx 2 2 starmath/source/accessibility.hxx 141 0 starmath/source/dialog.cxx 4 6 starmath/source/edit.cxx 4 4 starmath/source/toolbox.cxx 1 1 starmath/source/view.cxx 1 1 svtools/inc/vclxaccessibleheaderbar.hxx 2 1 svtools/inc/vclxaccessibleheaderbaritem.hxx 14 14 svtools/source/brwbox/brwbox1.cxx 16 16 svtools/source/brwbox/brwbox2.cxx 12 0 svtools/source/brwbox/brwhead.cxx 12 0 svtools/source/brwbox/datwin.cxx 6 4 svtools/source/brwbox/datwin.hxx 1 1 svtools/source/brwbox/ebbcontrols.cxx 4 2 svtools/source/brwbox/editbrowsebox.cxx 15 4 svtools/source/contnr/fileview.cxx 2 2 svtools/source/contnr/imivctl.hxx 2 2 svtools/source/contnr/imivctl1.cxx 11 0 svtools/source/contnr/simptabl.cxx 1 1 svtools/source/contnr/svtabbx.cxx 1 1 svtools/source/contnr/treelistbox.cxx 15 27 svtools/source/control/calendar.cxx 4 4 svtools/source/control/inettbc.cxx 2 2 svtools/source/control/roadmap.cxx 21 15 svtools/source/control/tabbar.cxx 6 6 svtools/source/control/toolbarmenu.cxx 1 1 svtools/source/control/toolbarmenuimp.hxx 1 1 svtools/source/control/valueacc.cxx 2 2 svtools/source/control/valueimp.hxx 16 0 svtools/source/dialogs/PlaceEditDialog.cxx 4 0 svtools/source/dialogs/addresstemplate.cxx 1 0 svtools/source/dialogs/colrdlg.cxx 8 0 svtools/source/dialogs/prnsetup.cxx 11 4 svtools/source/dialogs/restartdialog.cxx 1 6 svtools/source/dialogs/roadmapwizard.cxx 5 5 svtools/source/dialogs/wizardmachine.cxx 6 2 svtools/source/dialogs/wizdlg.cxx 13 0 svtools/source/filter/GraphicExportOptionsDialog.cxx 33 0 svtools/source/filter/exportdialog.cxx 33 33 svtools/source/filter/exportdialog.hxx 1 1 svtools/source/hatchwindow/hatchwindow.cxx 1 1 svtools/source/inc/hatchwindow.hxx 2 2 svtools/source/inc/svimpbox.hxx 2 2 svtools/source/misc/dialogcontrolling.cxx 8 12 svtools/source/table/tablecontrol_impl.cxx 3 3 svtools/source/table/tablecontrol_impl.hxx 2 2 svtools/source/toolpanel/paneltabbarpeer.cxx 1 1 svtools/source/toolpanel/paneltabbarpeer.hxx 2 2 svtools/source/toolpanel/toolpaneldeckpeer.cxx 1 1 svtools/source/toolpanel/toolpaneldeckpeer.hxx 1 1 svtools/source/uno/addrtempuno.cxx 2 4 svtools/source/uno/generictoolboxcontroller.cxx 1 2 svtools/source/uno/genericunodialog.cxx 3 3 svtools/source/uno/popupwindowcontroller.cxx 1 1 svtools/source/uno/treecontrolpeer.hxx 10 10 svtools/source/uno/wizard/unowizard.cxx 1 1 svtools/source/uno/wizard/wizardshell.hxx 3 1 svx/inc/extrusiondepthdialog.hxx 3 3 svx/inc/galbrws2.hxx 1 1 svx/inc/svdibrow.hxx 2 2 svx/inc/tbunosearchcontrollers.hxx 1 0 svx/source/accessibility/AccessibleShapeTreeInfo.cxx 3 3 svx/source/accessibility/GraphCtlAccessibleContext.cxx 25 8 svx/source/dialog/_bmpmask.cxx 20 1 svx/source/dialog/_contdlg.cxx 25 0 svx/source/dialog/compressgraphicdialog.cxx 4 4 svx/source/dialog/contimp.hxx 42 10 svx/source/dialog/ctredlin.cxx 45 2 svx/source/dialog/docrecovery.cxx 6 326 svx/source/dialog/fontwork.cxx 16 0 svx/source/dialog/hdft.cxx 10 2 svx/source/dialog/imapdlg.cxx 1 0 svx/source/dialog/linkwarn.cxx 27 0 svx/source/dialog/optgrid.cxx 1 1 svx/source/dialog/orienthelper.cxx 15 0 svx/source/dialog/passwd.cxx 33 0 svx/source/dialog/rubydialog.cxx 43 1 svx/source/dialog/srchdlg.cxx 1 0 svx/source/dialog/svxruler.cxx 159 162 svx/source/fmcomp/gridcell.cxx 3 3 svx/source/fmcomp/gridctrl.cxx 109 12 svx/source/form/datanavi.cxx 2 2 svx/source/form/filtnav.cxx 1 2 svx/source/form/fmPropBrw.cxx 2 2 svx/source/form/fmexpl.cxx 13 2 svx/source/form/tabwin.cxx 1 1 svx/source/form/xfm_addcondition.cxx 1 2 svx/source/gallery2/galbrws1.cxx 1 1 svx/source/gallery2/galbrws1.hxx 8 8 svx/source/gallery2/galbrws2.cxx 2 1 svx/source/inc/AccessibleFrameSelector.hxx 1 1 svx/source/inc/GraphCtlAccessibleContext.hxx 1 1 svx/source/inc/charmapacc.hxx 2 1 svx/source/inc/datalistener.hxx 72 62 svx/source/inc/datanavi.hxx 22 16 svx/source/inc/docrecovery.hxx 1 1 svx/source/inc/filtnav.hxx 1 1 svx/source/inc/fmexch.hxx 1 1 svx/source/inc/fmexpl.hxx 2 1 svx/source/inc/fmvwimp.hxx 6 6 svx/source/inc/gridcell.hxx 2 1 svx/source/inc/svxrectctaccessiblecontext.hxx 4 2 svx/source/inc/tabwin.hxx 1 1 svx/source/inc/tbxform.hxx 17 0 svx/source/sidebar/area/AreaPropertyPanel.cxx 12 8 svx/source/sidebar/area/AreaPropertyPanel.hxx 17 0 svx/source/sidebar/graphic/GraphicPropertyPanel.cxx 11 8 svx/source/sidebar/graphic/GraphicPropertyPanel.hxx 4 2 svx/source/sidebar/insert/InsertPropertyPanel.cxx 2 2 svx/source/sidebar/insert/InsertPropertyPanel.hxx 23 0 svx/source/sidebar/line/LinePropertyPanel.cxx 16 13 svx/source/sidebar/line/LinePropertyPanel.hxx 24 5 svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx 11 9 svx/source/sidebar/paragraph/ParaLineSpacingControl.hxx 20 0 svx/source/sidebar/paragraph/ParaPropertyPanel.cxx 13 10 svx/source/sidebar/paragraph/ParaPropertyPanel.hxx 23 0 svx/source/sidebar/possize/PosSizePropertyPanel.cxx 17 14 svx/source/sidebar/possize/PosSizePropertyPanel.hxx 15 0 svx/source/sidebar/text/TextPropertyPanel.cxx 8 5 svx/source/sidebar/text/TextPropertyPanel.hxx 3 3 svx/source/sidebar/tools/Popup.cxx 5 7 svx/source/svdraw/sdrpaintwindow.cxx 11 11 svx/source/svdraw/svdedxv.cxx 8 9 svx/source/svdraw/svdibrow.cxx 1 1 svx/source/svdraw/svdmrkv.cxx 8 12 svx/source/svdraw/svdpntv.cxx 2 2 svx/source/svdraw/svdview.cxx 14 1 svx/source/tbxctrls/bulletsnumbering.cxx 8 6 svx/source/tbxctrls/colorwindow.hxx 33 0 svx/source/tbxctrls/extrusioncontrols.cxx 6 2 svx/source/tbxctrls/extrusioncontrols.hxx 2 2 svx/source/tbxctrls/fillctrl.cxx 22 0 svx/source/tbxctrls/fontworkgallery.cxx 17 6 svx/source/tbxctrls/lboxctrl.cxx 16 0 svx/source/tbxctrls/tbcontrl.cxx 2 3 svx/source/tbxctrls/tbunocontroller.cxx 2 4 svx/source/tbxctrls/tbunosearchcontrollers.cxx 29 2 svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx 21 19 svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.hxx 1 2 svx/source/unodialogs/textconversiondlgs/chinese_translation_unodialog.cxx 2 1 svx/source/unodialogs/textconversiondlgs/chinese_translation_unodialog.hxx 6 1 svx/source/unodialogs/textconversiondlgs/chinese_translationdialog.cxx 6 6 svx/source/unodialogs/textconversiondlgs/chinese_translationdialog.hxx 1 1 svx/source/unodraw/recoveryui.cxx 1 1 svx/source/unodraw/unoshtxt.cxx 3 2 sw/inc/PostItMgr.hxx 5 5 sw/inc/SidebarWin.hxx 4 2 sw/inc/colwd.hxx 1 1 sw/inc/hhcwrp.hxx 1 1 sw/inc/postithelper.hxx 1 1 sw/inc/viewsh.hxx 22 9 sw/qa/tiledrendering/tiledrendering.cxx 1 1 sw/source/core/access/accdoc.hxx 1 1 sw/source/core/access/accfrmobj.cxx 2 1 sw/source/core/access/accfrmobj.hxx 1 1 sw/source/core/view/viewsh.cxx 17 4 sw/source/ui/chrdlg/break.cxx 10 0 sw/source/ui/chrdlg/chardlg.cxx 21 1 sw/source/ui/chrdlg/drpcps.cxx 20 0 sw/source/ui/chrdlg/numpara.cxx 10 0 sw/source/ui/chrdlg/swuiccoll.cxx 93 34 sw/source/ui/config/mailconfigpage.cxx 4 0 sw/source/ui/config/optcomp.cxx 42 0 sw/source/ui/config/optload.cxx 165 0 sw/source/ui/config/optpage.cxx 9 1 sw/source/ui/dbui/addresslistdialog.cxx 9 9 sw/source/ui/dbui/addresslistdialog.hxx 39 23 sw/source/ui/dbui/createaddresslistdialog.cxx 20 18 sw/source/ui/dbui/createaddresslistdialog.hxx 28 5 sw/source/ui/dbui/customizeaddresslistdialog.cxx 12 8 sw/source/ui/dbui/customizeaddresslistdialog.hxx 29 4 sw/source/ui/dbui/dbinsdlg.cxx 2 0 sw/source/ui/dbui/dbtablepreviewdialog.cxx 2 2 sw/source/ui/dbui/dbtablepreviewdialog.hxx 111 33 sw/source/ui/dbui/mmaddressblockpage.cxx 53 46 sw/source/ui/dbui/mmaddressblockpage.hxx 15 0 sw/source/ui/dbui/mmdocselectpage.cxx 10 9 sw/source/ui/dbui/mmdocselectpage.hxx 21 0 sw/source/ui/dbui/mmgreetingspage.cxx 27 25 sw/source/ui/dbui/mmgreetingspage.hxx 11 0 sw/source/ui/dbui/mmlayoutpage.cxx 11 11 sw/source/ui/dbui/mmlayoutpage.hxx 19 0 sw/source/ui/dbui/mmmergepage.cxx 10 8 sw/source/ui/dbui/mmmergepage.hxx 41 3 sw/source/ui/dbui/mmoutputpage.cxx 42 42 sw/source/ui/dbui/mmoutputpage.hxx 33 3 sw/source/ui/dbui/mmoutputtypepage.cxx 7 5 sw/source/ui/dbui/mmoutputtypepage.hxx 18 0 sw/source/ui/dbui/mmpreparemergepage.cxx 10 8 sw/source/ui/dbui/mmpreparemergepage.hxx 2 1 sw/source/ui/dbui/selectdbtabledialog.cxx 2 2 sw/source/ui/dbui/selectdbtabledialog.hxx 12 0 sw/source/ui/dialog/abstract.cxx 15 0 sw/source/ui/dialog/ascfldlg.cxx 18 1 sw/source/ui/dialog/docstdlg.cxx 0 1 sw/source/ui/dialog/swdlgfact.cxx 2 3 sw/source/ui/dialog/swdlgfact.hxx 15 0 sw/source/ui/dialog/swmessdialog.cxx 25 0 sw/source/ui/dialog/swuiexp.cxx 74 0 sw/source/ui/dialog/uiregionsw.cxx 13 0 sw/source/ui/dialog/wordcountdialog.cxx 11 0 sw/source/ui/dochdl/selglos.cxx 21 0 sw/source/ui/envelp/envfmt.cxx 12 10 sw/source/ui/envelp/envfmt.hxx 14 0 sw/source/ui/envelp/envlop1.cxx 17 0 sw/source/ui/envelp/envprt.cxx 9 7 sw/source/ui/envelp/envprt.hxx 80 0 sw/source/ui/envelp/label1.cxx 35 0 sw/source/ui/envelp/labfmt.cxx 22 19 sw/source/ui/envelp/labfmt.hxx 9 0 sw/source/ui/envelp/labprt.cxx 11 11 sw/source/ui/envelp/labprt.hxx 54 0 sw/source/ui/envelp/mailmrge.cxx 58 52 sw/source/ui/envelp/swuilabimp.hxx 14 0 sw/source/ui/fldui/DropDownFieldDialog.cxx 5 0 sw/source/ui/fldui/changedb.cxx 18 0 sw/source/ui/fldui/flddb.cxx 13 12 sw/source/ui/fldui/flddb.hxx 12 0 sw/source/ui/fldui/flddinf.cxx 7 6 sw/source/ui/fldui/flddinf.hxx 21 0 sw/source/ui/fldui/flddok.cxx 15 14 sw/source/ui/fldui/flddok.hxx 3 0 sw/source/ui/fldui/fldedt.cxx 31 0 sw/source/ui/fldui/fldfunc.cxx 26 25 sw/source/ui/fldui/fldfunc.hxx 15 0 sw/source/ui/fldui/fldref.cxx 10 9 sw/source/ui/fldui/fldref.hxx 22 0 sw/source/ui/fldui/fldvar.cxx 17 16 sw/source/ui/fldui/fldvar.hxx 14 0 sw/source/ui/fldui/inpdlg.cxx 10 0 sw/source/ui/fldui/javaedit.cxx 25 1 sw/source/ui/frmdlg/column.cxx 32 5 sw/source/ui/frmdlg/cption.cxx 91 4 sw/source/ui/frmdlg/frmpage.cxx 20 0 sw/source/ui/frmdlg/wrap.cxx 148 26 sw/source/ui/index/cnttab.cxx 12 1 sw/source/ui/index/multmrk.cxx 19 11 sw/source/ui/index/swuiidxmrk.cxx 9 0 sw/source/ui/misc/bookmark.cxx 27 4 sw/source/ui/misc/docfnote.cxx 12 0 sw/source/ui/misc/glosbib.cxx 35 6 sw/source/ui/misc/glossary.cxx 18 17 sw/source/ui/misc/impfnote.hxx 10 0 sw/source/ui/misc/insfnote.cxx 22 0 sw/source/ui/misc/linenum.cxx 26 2 sw/source/ui/misc/num.cxx 36 3 sw/source/ui/misc/outline.cxx 17 0 sw/source/ui/misc/pgfnote.cxx 28 1 sw/source/ui/misc/pggrid.cxx 28 2 sw/source/ui/misc/srtdlg.cxx 12 0 sw/source/ui/misc/titlepage.cxx 12 0 sw/source/ui/table/colwd.cxx 14 0 sw/source/ui/table/convert.cxx 11 0 sw/source/ui/table/instable.cxx 12 0 sw/source/ui/table/mergetbl.cxx 12 0 sw/source/ui/table/rowht.cxx 14 0 sw/source/ui/table/splittbl.cxx 67 5 sw/source/ui/table/tabledlg.cxx 22 1 sw/source/ui/table/tautofmt.cxx 12 0 sw/source/ui/utlui/swrenamexnameddlg.cxx 33 0 sw/source/uibase/dbui/dbui.cxx 12 1 sw/source/uibase/dbui/mailmergechildwindow.cxx 1 1 sw/source/uibase/docvw/HeaderFooterWin.cxx 4 3 sw/source/uibase/docvw/PageBreakWin.cxx 3 8 sw/source/uibase/docvw/PostItMgr.cxx 6 11 sw/source/uibase/docvw/SidebarWin.cxx 3 4 sw/source/uibase/docvw/srcedtw.cxx 12 1 sw/source/uibase/envelp/syncbtn.cxx 6 4 sw/source/uibase/inc/DropDownFieldDialog.hxx 1 1 sw/source/uibase/inc/FrameControl.hxx 1 1 sw/source/uibase/inc/FrameControlsManager.hxx 2 2 sw/source/uibase/inc/HeaderFooterWin.hxx 1 1 sw/source/uibase/inc/PageBreakWin.hxx 4 4 sw/source/uibase/inc/abstract.hxx 9 8 sw/source/uibase/inc/ascfldlg.hxx 4 3 sw/source/uibase/inc/bookmark.hxx 8 7 sw/source/uibase/inc/break.hxx 5 5 sw/source/uibase/inc/changedb.hxx 11 11 sw/source/uibase/inc/chrdlg.hxx 28 28 sw/source/uibase/inc/column.hxx 3 3 sw/source/uibase/inc/conttree.hxx 14 14 sw/source/uibase/inc/convert.hxx 15 15 sw/source/uibase/inc/cption.hxx 25 25 sw/source/uibase/inc/dbinsdlg.hxx 13 7 sw/source/uibase/inc/dbui.hxx 12 11 sw/source/uibase/inc/docstdlg.hxx 1 1 sw/source/uibase/inc/drawbase.hxx 17 16 sw/source/uibase/inc/drpcps.hxx 10 9 sw/source/uibase/inc/envlop.hxx 3 3 sw/source/uibase/inc/fldedt.hxx 2 1 sw/source/uibase/inc/fldmgr.hxx 83 80 sw/source/uibase/inc/frmpage.hxx 7 6 sw/source/uibase/inc/glosbib.hxx 12 12 sw/source/uibase/inc/glossary.hxx 6 4 sw/source/uibase/inc/inpdlg.hxx 2 2 sw/source/uibase/inc/inputwin.hxx 10 10 sw/source/uibase/inc/insfnote.hxx 11 11 sw/source/uibase/inc/instable.hxx 10 10 sw/source/uibase/inc/javaedit.hxx 1 1 sw/source/uibase/inc/label.hxx 16 15 sw/source/uibase/inc/linenum.hxx 10 10 sw/source/uibase/inc/mailconfigpage.hxx 3 1 sw/source/uibase/inc/mailmergechildwindow.hxx 1 1 sw/source/uibase/inc/mailmergehelper.hxx 47 42 sw/source/uibase/inc/mailmrge.hxx 3 1 sw/source/uibase/inc/mergetbl.hxx 3 2 sw/source/uibase/inc/multmrk.hxx 2 2 sw/source/uibase/inc/navipi.hxx 24 24 sw/source/uibase/inc/num.hxx 15 14 sw/source/uibase/inc/numpara.hxx 4 4 sw/source/uibase/inc/optcomp.hxx 38 36 sw/source/uibase/inc/optload.hxx 138 130 sw/source/uibase/inc/optpage.hxx 12 11 sw/source/uibase/inc/outline.hxx 13 12 sw/source/uibase/inc/pgfnote.hxx 24 22 sw/source/uibase/inc/pggrid.hxx 1 1 sw/source/uibase/inc/prcntfld.hxx 6 6 sw/source/uibase/inc/pview.hxx 3 3 sw/source/uibase/inc/redlndlg.hxx 65 63 sw/source/uibase/inc/regionsw.hxx 4 2 sw/source/uibase/inc/rowht.hxx 4 1 sw/source/uibase/inc/selglos.hxx 1 1 sw/source/uibase/inc/shdwcrsr.hxx 6 4 sw/source/uibase/inc/splittbl.hxx 3 3 sw/source/uibase/inc/srcedtw.hxx 32 32 sw/source/uibase/inc/srtdlg.hxx 7 5 sw/source/uibase/inc/swmessdialog.hxx 4 2 sw/source/uibase/inc/swrenamexnameddlg.hxx 2 1 sw/source/uibase/inc/swruler.hxx 9 9 sw/source/uibase/inc/swuiccoll.hxx 109 105 sw/source/uibase/inc/swuicnttab.hxx 45 45 sw/source/uibase/inc/swuiidxmrk.hxx 3 1 sw/source/uibase/inc/syncbtn.hxx 13 13 sw/source/uibase/inc/tautofmt.hxx 12 12 sw/source/uibase/inc/titlepage.hxx 10 10 sw/source/uibase/inc/view.hxx 13 13 sw/source/uibase/inc/wordcountdialog.hxx 2 2 sw/source/uibase/inc/workctrl.hxx 15 14 sw/source/uibase/inc/wrap.hxx 1 1 sw/source/uibase/misc/redlndlg.cxx 7 0 sw/source/uibase/misc/swruler.cxx 1 1 sw/source/uibase/ribbar/inputwin.cxx 2 1 sw/source/uibase/ribbar/workctrl.cxx 1 0 sw/source/uibase/shells/txtattr.cxx 1 0 sw/source/uibase/shells/txtcrsr.cxx 1 1 sw/source/uibase/sidebar/PageColumnControl.cxx 1 1 sw/source/uibase/sidebar/PageColumnControl.hxx 1 1 sw/source/uibase/sidebar/PageMarginControl.cxx 1 1 sw/source/uibase/sidebar/PageMarginControl.hxx 1 1 sw/source/uibase/sidebar/PageOrientationControl.cxx 1 1 sw/source/uibase/sidebar/PageOrientationControl.hxx 4 0 sw/source/uibase/sidebar/PagePropertyPanel.cxx 4 4 sw/source/uibase/sidebar/PagePropertyPanel.hxx 1 1 sw/source/uibase/sidebar/PageSizeControl.cxx 1 1 sw/source/uibase/sidebar/PageSizeControl.hxx 12 0 sw/source/uibase/sidebar/WrapPropertyPanel.cxx 8 7 sw/source/uibase/sidebar/WrapPropertyPanel.hxx 45 42 sw/source/uibase/table/tablepg.hxx 23 14 sw/source/uibase/uiview/pview.cxx 7 7 sw/source/uibase/uiview/view.cxx 1 5 sw/source/uibase/uiview/viewling.cxx 8 8 sw/source/uibase/uiview/viewmdi.cxx 1 0 sw/source/uibase/utlui/content.cxx 1 0 sw/source/uibase/utlui/glbltree.cxx 19 4 sw/source/uibase/utlui/gloslst.cxx 2 3 sw/source/uibase/utlui/navipi.cxx 1 0 tools/source/ref/errinf.cxx 15 0 uui/source/authfallbackdlg.cxx 7 5 uui/source/authfallbackdlg.hxx 12 0 uui/source/fltdlg.cxx 4 2 uui/source/fltdlg.hxx 25 0 uui/source/logindlg.cxx 17 15 uui/source/logindlg.hxx 13 0 uui/source/masterpasscrtdlg.cxx 5 3 uui/source/masterpasscrtdlg.hxx 12 0 uui/source/masterpassworddlg.cxx 4 2 uui/source/masterpassworddlg.hxx 15 0 uui/source/nameclashdlg.cxx 7 5 uui/source/nameclashdlg.hxx 15 0 uui/source/passworddlg.cxx 7 5 uui/source/passworddlg.hxx 15 0 uui/source/secmacrowarnings.cxx 10 9 uui/source/secmacrowarnings.hxx 14 0 uui/source/unknownauthdlg.cxx 6 4 uui/source/unknownauthdlg.hxx 12 4 vcl/generic/print/genprnpsp.cxx 40 2 vcl/generic/print/prtsetup.cxx 24 20 vcl/generic/print/prtsetup.hxx 3 3 vcl/inc/brdwin.hxx 2 2 vcl/inc/dndevdis.hxx 7 6 vcl/inc/ilstbox.hxx 55 54 vcl/inc/printdlg.hxx 5 4 vcl/inc/salframe.hxx 18 23 vcl/inc/svdata.hxx 1 1 vcl/inc/toolbox.h 2 1 vcl/inc/unx/i18n_status.hxx 29 29 vcl/inc/window.h 9 0 vcl/source/app/salvtables.cxx 19 11 vcl/source/app/svapp.cxx 2 0 vcl/source/app/svdata.cxx 9 0 vcl/source/app/vclevent.cxx 14 14 vcl/source/control/button.cxx 3 5 vcl/source/control/combobox.cxx 4 0 vcl/source/control/ctrl.cxx 1 0 vcl/source/control/fixed.cxx 15 3 vcl/source/control/ilstbox.cxx 4 12 vcl/source/control/lstbox.cxx 12 16 vcl/source/control/tabctrl.cxx 1 1 vcl/source/edit/textview.cxx 8 15 vcl/source/edit/vclmedit.cxx 2 4 vcl/source/gdi/print3.cxx 1 0 vcl/source/window/accel.cxx 2 3 vcl/source/window/accessibility.cxx 1 1 vcl/source/window/brdwin.cxx 5 17 vcl/source/window/btndlg.cxx 15 12 vcl/source/window/builder.cxx 1 1 vcl/source/window/clipping.cxx 2 2 vcl/source/window/cursor.cxx 4 3 vcl/source/window/dialog.cxx 10 10 vcl/source/window/dlgctrl.cxx 3 3 vcl/source/window/dndevdis.cxx 8 9 vcl/source/window/dockmgr.cxx 10 6 vcl/source/window/dockwin.cxx 20 3 vcl/source/window/event.cxx 4 2 vcl/source/window/floatwin.cxx 4 2 vcl/source/window/introwin.cxx 20 15 vcl/source/window/layout.cxx 10 10 vcl/source/window/menu.cxx 3 3 vcl/source/window/menubarwindow.cxx 2 2 vcl/source/window/menufloatingwindow.cxx 11 11 vcl/source/window/mouse.cxx 6 17 vcl/source/window/msgbox.cxx 1 1 vcl/source/window/paint.cxx 45 18 vcl/source/window/printdlg.cxx 1 0 vcl/source/window/split.cxx 3 3 vcl/source/window/splitwin.cxx 18 19 vcl/source/window/stacking.cxx 1 0 vcl/source/window/syswin.cxx 2 1 vcl/source/window/tabdlg.cxx 7 12 vcl/source/window/taskpanelist.cxx 5 4 vcl/source/window/toolbox.cxx 21 22 vcl/source/window/window.cxx 16 18 vcl/source/window/window2.cxx 7 7 vcl/source/window/winproc.cxx 1 3 vcl/unx/generic/app/i18n_status.cxx 18 4 vcl/unx/generic/printer/cupsmgr.cxx 3 2 vcl/workben/icontest.cxx 1 1 vcl/workben/mtfdemo.cxx 13 6 vcl/workben/vcldemo.cxx 3 3 xmlsecurity/inc/xmlsecurity/certificatechooser.hxx 22 17 xmlsecurity/inc/xmlsecurity/certificateviewer.hxx 18 18 xmlsecurity/inc/xmlsecurity/digitalsignaturesdialog.hxx 22 18 xmlsecurity/inc/xmlsecurity/macrosecurity.hxx 3 1 xmlsecurity/source/dialogs/certificatechooser.cxx 44 1 xmlsecurity/source/dialogs/certificateviewer.cxx 16 1 xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx 38 1 xmlsecurity/source/dialogs/macrosecurity.cxx --- .../extended/accessibleiconchoicectrlentry.hxx | 3 +- .../extended/accessibletabbarbase.hxx | 3 +- .../extended/accessibletablistbox.hxx | 2 +- .../extended/accessibletablistboxtable.hxx | 2 +- .../accessibility/extended/listboxaccessible.hxx | 5 +- .../extended/textwindowaccessibility.hxx | 2 +- .../standard/vclxaccessiblemenubar.hxx | 3 +- .../standard/vclxaccessiblestatusbar.hxx | 3 +- .../standard/vclxaccessiblestatusbaritem.hxx | 8 +- .../standard/vclxaccessibletabcontrol.hxx | 3 +- .../standard/vclxaccessibletabpage.hxx | 3 +- .../standard/vclxaccessibletabpagewindow.hxx | 5 +- .../standard/vclxaccessibletoolboxitem.hxx | 13 +- .../source/extended/AccessibleToolPanelDeck.cxx | 6 +- .../extended/AccessibleToolPanelDeckTabBar.cxx | 4 +- .../extended/AccessibleToolPanelDeckTabBarItem.cxx | 4 +- .../extended/accessibleiconchoicectrlentry.cxx | 2 +- .../source/extended/textwindowaccessibility.cxx | 6 +- .../source/standard/vclxaccessibleradiobutton.cxx | 6 +- .../standard/vclxaccessibletabpagewindow.cxx | 2 +- avmedia/inc/mediacontrol.hxx | 2 +- avmedia/source/framework/mediacontrol.cxx | 3 +- avmedia/source/framework/mediaplayer.cxx | 2 +- avmedia/source/viewer/mediaevent_impl.cxx | 14 +- avmedia/source/viewer/mediaevent_impl.hxx | 3 +- avmedia/source/viewer/mediawindow_impl.cxx | 3 +- avmedia/source/viewer/mediawindow_impl.hxx | 2 +- basctl/source/basicide/basicrenderable.hxx | 2 +- basctl/source/basicide/baside2.cxx | 1 + basctl/source/basicide/baside2.hxx | 12 +- basctl/source/basicide/baside2b.cxx | 15 +- basctl/source/basicide/baside3.cxx | 6 +- basctl/source/basicide/basides1.cxx | 28 +- basctl/source/basicide/basides2.cxx | 8 +- basctl/source/basicide/basides3.cxx | 4 +- basctl/source/basicide/basidesh.cxx | 12 +- basctl/source/basicide/bastypes.cxx | 15 +- basctl/source/basicide/brkdlg.cxx | 15 + basctl/source/basicide/brkdlg.hxx | 14 +- basctl/source/basicide/layout.cxx | 11 + basctl/source/basicide/layout.hxx | 7 +- basctl/source/basicide/linenumberwindow.cxx | 11 + basctl/source/basicide/linenumberwindow.hxx | 4 +- basctl/source/basicide/macrodlg.cxx | 14 + basctl/source/basicide/macrodlg.hxx | 30 +- basctl/source/basicide/moduldl2.cxx | 46 ++- basctl/source/basicide/moduldlg.cxx | 33 +- basctl/source/basicide/moduldlg.hxx | 62 ++-- basctl/source/dlged/managelang.cxx | 20 ++ basctl/source/inc/accessibledialogcontrolshape.hxx | 3 +- basctl/source/inc/accessibledialogwindow.hxx | 3 +- basctl/source/inc/baside3.hxx | 4 +- basctl/source/inc/basidesh.hxx | 8 +- basctl/source/inc/bastypes.hxx | 9 +- basctl/source/inc/dlged.hxx | 5 +- basctl/source/inc/managelang.hxx | 22 +- chart2/inc/ChartModel.hxx | 2 +- .../accessibility/AccessibleViewForwarder.hxx | 3 +- .../dialogs/ChartTypeDialogController.hxx | 4 +- chart2/source/controller/dialogs/dlg_ChartType.cxx | 3 +- .../controller/dialogs/dlg_CreationWizard_UNO.cxx | 12 +- .../source/controller/dialogs/dlg_DataEditor.cxx | 1 + .../source/controller/dialogs/dlg_DataSource.cxx | 10 +- .../controller/dialogs/dlg_InsertAxis_Grid.cxx | 17 ++ chart2/source/controller/dialogs/dlg_View3D.cxx | 14 +- .../source/controller/dialogs/res_BarGeometry.hxx | 4 +- chart2/source/controller/dialogs/res_DataLabel.hxx | 38 +-- chart2/source/controller/dialogs/res_Trendline.hxx | 46 +-- .../controller/dialogs/tp_3D_SceneAppearance.cxx | 14 + .../controller/dialogs/tp_3D_SceneAppearance.hxx | 10 +- .../controller/dialogs/tp_3D_SceneGeometry.cxx | 18 ++ .../controller/dialogs/tp_3D_SceneGeometry.hxx | 16 +- .../controller/dialogs/tp_3D_SceneIllumination.cxx | 15 +- .../controller/dialogs/tp_3D_SceneIllumination.hxx | 32 +- chart2/source/controller/dialogs/tp_AxisLabel.cxx | 17 ++ chart2/source/controller/dialogs/tp_AxisLabel.hxx | 34 +-- .../source/controller/dialogs/tp_AxisPositions.cxx | 24 ++ .../source/controller/dialogs/tp_AxisPositions.hxx | 38 +-- chart2/source/controller/dialogs/tp_ChartType.cxx | 63 ++-- chart2/source/controller/dialogs/tp_ChartType.hxx | 6 +- chart2/source/controller/dialogs/tp_DataSource.cxx | 28 ++ chart2/source/controller/dialogs/tp_DataSource.hxx | 42 +-- .../controller/dialogs/tp_LegendPosition.cxx | 12 + .../controller/dialogs/tp_LegendPosition.hxx | 4 +- .../source/controller/dialogs/tp_PolarOptions.cxx | 16 + .../source/controller/dialogs/tp_PolarOptions.hxx | 14 +- .../source/controller/dialogs/tp_RangeChooser.cxx | 24 ++ .../source/controller/dialogs/tp_RangeChooser.hxx | 28 +- chart2/source/controller/dialogs/tp_Scale.cxx | 35 +++ chart2/source/controller/dialogs/tp_Scale.hxx | 66 ++-- .../source/controller/dialogs/tp_SeriesToAxis.cxx | 24 ++ .../source/controller/dialogs/tp_SeriesToAxis.hxx | 36 +-- .../source/controller/dialogs/tp_TitleRotation.cxx | 7 + .../source/controller/dialogs/tp_TitleRotation.hxx | 14 +- .../dialogs/tp_Wizard_TitlesAndObjects.cxx | 13 + .../dialogs/tp_Wizard_TitlesAndObjects.hxx | 8 +- chart2/source/controller/inc/dlg_ChartType.hxx | 2 +- .../controller/inc/dlg_CreationWizard_UNO.hxx | 2 +- chart2/source/controller/inc/dlg_DataEditor.hxx | 2 +- chart2/source/controller/inc/dlg_DataSource.hxx | 8 +- .../source/controller/inc/dlg_InsertAxis_Grid.hxx | 14 +- chart2/source/controller/inc/dlg_View3D.hxx | 8 +- chart2/source/controller/inc/res_ErrorBar.hxx | 54 ++-- .../source/controller/inc/res_LegendPosition.hxx | 10 +- chart2/source/controller/inc/res_Titles.hxx | 28 +- chart2/source/controller/main/ChartController.hxx | 2 +- chart2/source/controller/main/ChartWindow.cxx | 5 +- chart2/source/controller/main/ChartWindow.hxx | 2 +- chart2/source/controller/main/ShapeController.cxx | 12 +- chart2/source/view/charttypes/GL3DBarChart.cxx | 2 +- chart2/source/view/inc/GL3DBarChart.hxx | 2 +- chart2/source/view/main/ChartView.cxx | 2 +- compilerplugins/clang/vclwidgets.cxx | 205 +++++++++---- cui/source/customize/acccfg.cxx | 23 ++ cui/source/customize/cfg.cxx | 115 +++++-- cui/source/customize/cfgutil.cxx | 1 + cui/source/customize/eventdlg.cxx | 1 + cui/source/customize/eventdlg.hxx | 2 +- cui/source/customize/macropg.cxx | 12 + cui/source/customize/macropg_impl.hxx | 14 +- cui/source/customize/selector.cxx | 17 ++ cui/source/dialogs/SpellDialog.cxx | 20 ++ cui/source/dialogs/about.cxx | 17 ++ cui/source/dialogs/colorpicker.cxx | 82 +++-- cui/source/dialogs/cuicharmap.cxx | 19 ++ cui/source/dialogs/cuifmsearch.cxx | 30 +- cui/source/dialogs/cuigaldlg.cxx | 86 +++++- cui/source/dialogs/cuigrfflt.cxx | 72 +++++ cui/source/dialogs/cuiimapwnd.cxx | 15 + cui/source/dialogs/cuitbxform.cxx | 11 + cui/source/dialogs/dlgname.cxx | 41 +++ cui/source/dialogs/hangulhanjadlg.cxx | 84 +++++- cui/source/dialogs/hldocntp.cxx | 5 + cui/source/dialogs/hldoctp.cxx | 15 + cui/source/dialogs/hlinettp.cxx | 21 +- cui/source/dialogs/hlmailtp.cxx | 14 + cui/source/dialogs/hlmarkwn.cxx | 15 + cui/source/dialogs/hltpbase.cxx | 14 +- cui/source/dialogs/hyphen.cxx | 18 ++ cui/source/dialogs/iconcdlg.cxx | 20 +- cui/source/dialogs/insdlg.cxx | 45 +++ cui/source/dialogs/insrc.cxx | 13 + cui/source/dialogs/linkdlg.cxx | 20 ++ cui/source/dialogs/multipat.cxx | 21 +- cui/source/dialogs/newtabledlg.cxx | 12 + cui/source/dialogs/passwdomdlg.cxx | 18 +- cui/source/dialogs/pastedlg.cxx | 13 + cui/source/dialogs/postdlg.cxx | 7 + cui/source/dialogs/scriptdlg.cxx | 18 ++ cui/source/dialogs/showcols.cxx | 11 + cui/source/dialogs/splitcelldlg.cxx | 14 + cui/source/dialogs/srchxtra.cxx | 25 ++ cui/source/dialogs/thesdlg.cxx | 39 +++ cui/source/dialogs/zoom.cxx | 13 + cui/source/factory/cuiexp.cxx | 29 ++ cui/source/factory/dlgfact.cxx | 2 - cui/source/factory/dlgfact.hxx | 5 +- cui/source/inc/ControlFocusHelper.hxx | 4 +- cui/source/inc/SpellDialog.hxx | 40 +-- cui/source/inc/about.hxx | 16 +- cui/source/inc/acccfg.hxx | 26 +- cui/source/inc/align.hxx | 52 ++-- cui/source/inc/autocdlg.hxx | 114 +++---- cui/source/inc/backgrnd.hxx | 58 ++-- cui/source/inc/border.hxx | 66 ++-- cui/source/inc/cfg.hxx | 77 +++-- cui/source/inc/cfgutil.hxx | 2 +- cui/source/inc/chardlg.hxx | 180 +++++------ cui/source/inc/connect.hxx | 26 +- cui/source/inc/cuicharmap.hxx | 22 +- cui/source/inc/cuifmsearch.hxx | 54 ++-- cui/source/inc/cuigaldlg.hxx | 70 +++-- cui/source/inc/cuigrfflt.hxx | 34 ++- cui/source/inc/cuihyperdlg.hxx | 2 +- cui/source/inc/cuiimapwnd.hxx | 12 +- cui/source/inc/cuioptgenrl.hxx | 4 +- cui/source/inc/cuisrchdlg.hxx | 4 +- cui/source/inc/cuitabarea.hxx | 280 ++++++++--------- cui/source/inc/cuitabline.hxx | 110 +++---- cui/source/inc/cuitbxform.hxx | 4 +- cui/source/inc/dbregister.hxx | 10 +- cui/source/inc/dlgname.hxx | 29 +- cui/source/inc/dstribut.hxx | 26 +- cui/source/inc/grfpage.hxx | 42 +-- cui/source/inc/hangulhanjadlg.hxx | 92 +++--- cui/source/inc/hldocntp.hxx | 10 +- cui/source/inc/hldoctp.hxx | 12 +- cui/source/inc/hlinettp.hxx | 20 +- cui/source/inc/hlmailtp.hxx | 10 +- cui/source/inc/hlmarkwn.hxx | 12 +- cui/source/inc/hltpbase.hxx | 14 +- cui/source/inc/hyphen.hxx | 18 +- cui/source/inc/iconcdlg.hxx | 26 +- cui/source/inc/insdlg.hxx | 54 ++-- cui/source/inc/insrc.hxx | 8 +- cui/source/inc/labdlg.hxx | 22 +- cui/source/inc/linkdlg.hxx | 22 +- cui/source/inc/measure.hxx | 36 +-- cui/source/inc/multipat.hxx | 12 +- cui/source/inc/newtabledlg.hxx | 6 +- cui/source/inc/numfmt.hxx | 60 ++-- cui/source/inc/numpages.hxx | 128 ++++---- cui/source/inc/optasian.hxx | 26 +- cui/source/inc/optdict.hxx | 30 +- cui/source/inc/optlingu.hxx | 36 +-- cui/source/inc/optpath.hxx | 8 +- cui/source/inc/page.hxx | 58 ++-- cui/source/inc/paragrph.hxx | 130 ++++---- cui/source/inc/pastedlg.hxx | 10 +- cui/source/inc/postdlg.hxx | 14 +- cui/source/inc/scriptdlg.hxx | 20 +- cui/source/inc/selector.hxx | 16 +- cui/source/inc/showcols.hxx | 6 +- cui/source/inc/splitcelldlg.hxx | 10 +- cui/source/inc/srchxtra.hxx | 16 +- cui/source/inc/swpossizetabpage.hxx | 54 ++-- cui/source/inc/tabstpge.hxx | 56 ++-- cui/source/inc/textanim.hxx | 37 +-- cui/source/inc/textattr.hxx | 35 ++- cui/source/inc/thesdlg.hxx | 23 +- cui/source/inc/transfrm.hxx | 62 ++-- cui/source/inc/treeopt.hxx | 10 +- cui/source/inc/zoom.hxx | 26 +- cui/source/options/certpath.cxx | 6 +- cui/source/options/certpath.hxx | 8 +- cui/source/options/connpooloptions.cxx | 17 ++ cui/source/options/connpooloptions.hxx | 18 +- cui/source/options/cuisrchdlg.cxx | 11 + cui/source/options/dbregister.cxx | 7 +- cui/source/options/doclinkdialog.cxx | 14 + cui/source/options/doclinkdialog.hxx | 10 +- cui/source/options/fontsubs.cxx | 12 +- cui/source/options/fontsubs.hxx | 24 +- cui/source/options/optaboutconfig.cxx | 26 ++ cui/source/options/optaboutconfig.hxx | 16 +- cui/source/options/optaccessibility.cxx | 9 + cui/source/options/optaccessibility.hxx | 18 +- cui/source/options/optasian.cxx | 13 + cui/source/options/optbasic.cxx | 16 + cui/source/options/optbasic.hxx | 14 +- cui/source/options/optchart.cxx | 5 + cui/source/options/optchart.hxx | 10 +- cui/source/options/optcolor.cxx | 61 ++-- cui/source/options/optcolor.hxx | 8 +- cui/source/options/optctl.cxx | 16 + cui/source/options/optctl.hxx | 14 +- cui/source/options/optdict.cxx | 31 ++ cui/source/options/optfltr.cxx | 23 +- cui/source/options/optfltr.hxx | 22 +- cui/source/options/optgdlg.cxx | 54 ++++ cui/source/options/optgdlg.hxx | 92 +++--- cui/source/options/optgenrl.cxx | 14 +- cui/source/options/opthtml.cxx | 26 ++ cui/source/options/opthtml.hxx | 34 ++- cui/source/options/optinet2.cxx | 49 ++- cui/source/options/optinet2.hxx | 72 ++--- cui/source/options/optjava.cxx | 35 ++- cui/source/options/optjava.hxx | 44 +-- cui/source/options/optjsearch.cxx | 28 ++ cui/source/options/optjsearch.hxx | 42 +-- cui/source/options/optlingu.cxx | 35 ++- cui/source/options/optmemory.cxx | 17 ++ cui/source/options/optmemory.hxx | 16 +- cui/source/options/optopencl.cxx | 49 ++- cui/source/options/optopencl.hxx | 41 +-- cui/source/options/optpath.cxx | 6 +- cui/source/options/optsave.cxx | 17 ++ cui/source/options/optsave.hxx | 38 +-- cui/source/options/optupdt.cxx | 19 ++ cui/source/options/optupdt.hxx | 22 +- cui/source/options/personalization.cxx | 39 +++ cui/source/options/personalization.hxx | 36 ++- cui/source/options/securityoptions.cxx | 18 ++ cui/source/options/securityoptions.hxx | 18 +- cui/source/options/treeopt.cxx | 21 +- cui/source/options/webconninfo.cxx | 6 +- cui/source/options/webconninfo.hxx | 8 +- cui/source/tabpages/align.cxx | 24 ++ cui/source/tabpages/autocdlg.cxx | 113 ++++++- cui/source/tabpages/backgrnd.cxx | 27 ++ cui/source/tabpages/border.cxx | 34 +++ cui/source/tabpages/chardlg.cxx | 116 ++++++- cui/source/tabpages/connect.cxx | 22 ++ cui/source/tabpages/dstribut.cxx | 32 ++ cui/source/tabpages/grfpage.cxx | 18 ++ cui/source/tabpages/labdlg.cxx | 20 ++ cui/source/tabpages/macroass.cxx | 20 +- cui/source/tabpages/measure.cxx | 25 ++ cui/source/tabpages/numfmt.cxx | 26 +- cui/source/tabpages/numpages.cxx | 61 +++- cui/source/tabpages/page.cxx | 29 ++ cui/source/tabpages/paragrph.cxx | 99 ++++++ cui/source/tabpages/swpossizetabpage.cxx | 37 +++ cui/source/tabpages/tabstpge.cxx | 35 ++- cui/source/tabpages/textanim.cxx | 26 ++ cui/source/tabpages/textattr.cxx | 24 ++ cui/source/tabpages/tparea.cxx | 72 +++++ cui/source/tabpages/tpbitmap.cxx | 15 +- cui/source/tabpages/tpcolor.cxx | 32 +- cui/source/tabpages/tpgradnt.cxx | 28 ++ cui/source/tabpages/tphatch.cxx | 21 ++ cui/source/tabpages/tpline.cxx | 29 ++ cui/source/tabpages/tplnedef.cxx | 25 ++ cui/source/tabpages/tplneend.cxx | 18 ++ cui/source/tabpages/tpshadow.cxx | 17 ++ cui/source/tabpages/transfrm.cxx | 58 ++++ .../ext/macromigration/macromigrationpages.cxx | 42 +++ .../ext/macromigration/macromigrationpages.hxx | 34 ++- .../source/ext/macromigration/rangeprogressbar.hxx | 2 +- dbaccess/source/ui/app/AppDetailPageHelper.cxx | 1 - dbaccess/source/ui/app/AppDetailView.cxx | 3 +- dbaccess/source/ui/app/AppDetailView.hxx | 4 +- dbaccess/source/ui/app/AppTitleWindow.cxx | 2 +- dbaccess/source/ui/app/AppTitleWindow.hxx | 2 +- dbaccess/source/ui/app/AppView.cxx | 14 +- dbaccess/source/ui/app/AppView.hxx | 8 +- dbaccess/source/ui/app/subcomponentmanager.cxx | 1 + dbaccess/source/ui/browser/brwview.cxx | 23 +- dbaccess/source/ui/browser/dbtreeview.cxx | 3 +- dbaccess/source/ui/browser/dbtreeview.hxx | 2 +- dbaccess/source/ui/browser/genericcontroller.cxx | 10 + dbaccess/source/ui/control/FieldDescControl.cxx | 109 ++++--- dbaccess/source/ui/control/TableGrantCtrl.cxx | 4 +- dbaccess/source/ui/control/VertSplitView.cxx | 4 +- dbaccess/source/ui/control/curledit.cxx | 6 +- dbaccess/source/ui/control/sqledit.cxx | 1 + dbaccess/source/ui/dlg/CollectionView.cxx | 16 + dbaccess/source/ui/dlg/ConnectionHelper.cxx | 12 +- dbaccess/source/ui/dlg/ConnectionHelper.hxx | 9 +- dbaccess/source/ui/dlg/ConnectionPage.cxx | 19 ++ dbaccess/source/ui/dlg/ConnectionPage.hxx | 24 +- dbaccess/source/ui/dlg/ConnectionPageSetup.cxx | 12 + dbaccess/source/ui/dlg/ConnectionPageSetup.hxx | 6 +- dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx | 114 ++++++- dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx | 109 ++++--- dbaccess/source/ui/dlg/DbAdminImpl.hxx | 3 +- dbaccess/source/ui/dlg/QueryPropertiesDialog.cxx | 13 + dbaccess/source/ui/dlg/RelationDlg.cxx | 20 ++ dbaccess/source/ui/dlg/TextConnectionHelper.cxx | 31 +- dbaccess/source/ui/dlg/TextConnectionHelper.hxx | 40 +-- dbaccess/source/ui/dlg/UserAdmin.cxx | 24 +- dbaccess/source/ui/dlg/UserAdmin.hxx | 8 +- dbaccess/source/ui/dlg/admincontrols.cxx | 22 ++ dbaccess/source/ui/dlg/admincontrols.hxx | 27 +- dbaccess/source/ui/dlg/adminpages.hxx | 2 +- dbaccess/source/ui/dlg/adtabdlg.cxx | 6 + dbaccess/source/ui/dlg/advancedsettings.cxx | 88 ++++-- dbaccess/source/ui/dlg/advancedsettings.hxx | 56 ++-- dbaccess/source/ui/dlg/dbfindex.cxx | 19 ++ dbaccess/source/ui/dlg/dbfindex.hxx | 20 +- dbaccess/source/ui/dlg/dbwizsetup.cxx | 11 +- dbaccess/source/ui/dlg/detailpages.cxx | 102 ++++++- dbaccess/source/ui/dlg/detailpages.hxx | 80 ++--- dbaccess/source/ui/dlg/directsql.cxx | 7 + dbaccess/source/ui/dlg/dlgsave.cxx | 16 +- dbaccess/source/ui/dlg/dlgsize.cxx | 13 + dbaccess/source/ui/dlg/dsselect.cxx | 14 + dbaccess/source/ui/dlg/dsselect.hxx | 11 +- dbaccess/source/ui/dlg/generalpage.cxx | 30 ++ dbaccess/source/ui/dlg/generalpage.hxx | 26 +- dbaccess/source/ui/dlg/indexdialog.cxx | 9 + dbaccess/source/ui/dlg/indexfieldscontrol.cxx | 4 +- dbaccess/source/ui/dlg/paramdialog.cxx | 5 + dbaccess/source/ui/dlg/queryfilter.cxx | 21 ++ dbaccess/source/ui/dlg/queryorder.cxx | 18 ++ dbaccess/source/ui/dlg/sqlmessage.cxx | 11 +- dbaccess/source/ui/dlg/tablespage.cxx | 3 + dbaccess/source/ui/dlg/tablespage.hxx | 6 +- dbaccess/source/ui/dlg/textconnectionsettings.cxx | 11 + dbaccess/source/ui/inc/CollectionView.hxx | 15 +- dbaccess/source/ui/inc/ConnectionLine.hxx | 3 +- dbaccess/source/ui/inc/ConnectionLineAccess.hxx | 3 +- dbaccess/source/ui/inc/FieldDescControl.hxx | 70 ++--- dbaccess/source/ui/inc/JAccess.hxx | 3 +- dbaccess/source/ui/inc/JoinController.hxx | 2 +- dbaccess/source/ui/inc/JoinDesignView.hxx | 4 +- dbaccess/source/ui/inc/JoinTableView.hxx | 26 +- dbaccess/source/ui/inc/QueryDesignView.hxx | 2 +- dbaccess/source/ui/inc/QueryPropertiesDialog.hxx | 9 +- dbaccess/source/ui/inc/QueryTextView.hxx | 2 +- dbaccess/source/ui/inc/QueryViewSwitch.hxx | 4 +- dbaccess/source/ui/inc/RelationControl.hxx | 6 +- dbaccess/source/ui/inc/RelationDlg.hxx | 20 +- dbaccess/source/ui/inc/RelationTableView.hxx | 2 +- dbaccess/source/ui/inc/TableConnection.hxx | 2 +- dbaccess/source/ui/inc/TableDesignHelpBar.hxx | 2 +- dbaccess/source/ui/inc/TableDesignView.hxx | 6 +- dbaccess/source/ui/inc/TableFieldDescription.hxx | 3 +- dbaccess/source/ui/inc/TableGrantCtrl.hxx | 4 +- dbaccess/source/ui/inc/TableWindow.hxx | 2 +- dbaccess/source/ui/inc/TableWindowAccess.hxx | 3 +- dbaccess/source/ui/inc/TableWindowListBox.hxx | 4 +- dbaccess/source/ui/inc/TableWindowTitle.hxx | 2 +- dbaccess/source/ui/inc/TokenWriter.hxx | 2 +- dbaccess/source/ui/inc/VertSplitView.hxx | 6 +- dbaccess/source/ui/inc/WCPage.hxx | 24 +- dbaccess/source/ui/inc/WColumnSelect.hxx | 12 +- dbaccess/source/ui/inc/WCopyTable.hxx | 10 +- dbaccess/source/ui/inc/WNameMatch.hxx | 23 +- dbaccess/source/ui/inc/WTabPage.hxx | 4 +- dbaccess/source/ui/inc/WTypeSelect.hxx | 22 +- dbaccess/source/ui/inc/adtabdlg.hxx | 12 +- dbaccess/source/ui/inc/brwview.hxx | 10 +- dbaccess/source/ui/inc/curledit.hxx | 2 +- dbaccess/source/ui/inc/datasourceconnector.hxx | 7 +- dbaccess/source/ui/inc/dbwizsetup.hxx | 6 +- dbaccess/source/ui/inc/directsql.hxx | 14 +- dbaccess/source/ui/inc/dlgsize.hxx | 6 +- dbaccess/source/ui/inc/indexdialog.hxx | 18 +- dbaccess/source/ui/inc/indexfieldscontrol.hxx | 4 +- dbaccess/source/ui/inc/linkeddocuments.hxx | 3 +- dbaccess/source/ui/inc/paramdialog.hxx | 10 +- dbaccess/source/ui/inc/querycontainerwindow.hxx | 4 +- dbaccess/source/ui/inc/queryfilter.hxx | 24 +- dbaccess/source/ui/inc/queryorder.hxx | 18 +- dbaccess/source/ui/inc/sqledit.hxx | 2 +- dbaccess/source/ui/inc/textconnectionsettings.hxx | 4 +- dbaccess/source/ui/inc/undosqledit.hxx | 3 +- dbaccess/source/ui/inc/unodatbr.hxx | 10 +- dbaccess/source/ui/misc/ToolBoxHelper.cxx | 2 +- dbaccess/source/ui/misc/WCPage.cxx | 23 ++ dbaccess/source/ui/misc/WColumnSelect.cxx | 17 ++ dbaccess/source/ui/misc/WCopyTable.cxx | 10 +- dbaccess/source/ui/misc/WNameMatch.cxx | 20 ++ dbaccess/source/ui/misc/WTypeSelect.cxx | 54 +++- dbaccess/source/ui/misc/singledoccontroller.cxx | 1 + .../source/ui/querydesign/ConnectionLineAccess.cxx | 9 +- dbaccess/source/ui/querydesign/JoinController.cxx | 2 +- dbaccess/source/ui/querydesign/JoinDesignView.cxx | 6 +- dbaccess/source/ui/querydesign/JoinTableView.cxx | 50 ++-- dbaccess/source/ui/querydesign/QTableWindow.cxx | 2 +- .../ui/querydesign/QueryDesignFieldUndoAct.hxx | 2 +- .../ui/querydesign/QueryDesignUndoAction.hxx | 3 +- dbaccess/source/ui/querydesign/QueryDesignView.cxx | 59 ++-- .../ui/querydesign/QueryMoveTabWinUndoAct.hxx | 2 +- .../ui/querydesign/QuerySizeTabWinUndoAct.hxx | 2 +- .../ui/querydesign/QueryTabConnUndoAction.cxx | 18 +- .../ui/querydesign/QueryTabConnUndoAction.hxx | 2 +- .../source/ui/querydesign/QueryTabWinUndoAct.cxx | 8 +- .../source/ui/querydesign/QueryTabWinUndoAct.hxx | 6 +- dbaccess/source/ui/querydesign/QueryTableView.cxx | 54 ++-- dbaccess/source/ui/querydesign/QueryTextView.cxx | 3 +- .../source/ui/querydesign/SelectionBrowseBox.cxx | 22 +- .../source/ui/querydesign/SelectionBrowseBox.hxx | 12 +- dbaccess/source/ui/querydesign/TableConnection.cxx | 2 +- .../ui/querydesign/TableFieldDescription.cxx | 1 + dbaccess/source/ui/querydesign/TableWindow.cxx | 5 +- .../source/ui/querydesign/TableWindowAccess.cxx | 8 +- .../source/ui/querydesign/TableWindowListBox.cxx | 2 +- .../source/ui/querydesign/TableWindowTitle.cxx | 8 +- .../source/ui/querydesign/limitboxcontroller.cxx | 3 +- .../source/ui/querydesign/limitboxcontroller.hxx | 3 +- .../source/ui/querydesign/querycontainerwindow.cxx | 5 +- dbaccess/source/ui/querydesign/querydlg.cxx | 5 + dbaccess/source/ui/querydesign/querydlg.hxx | 10 +- .../source/ui/relationdesign/RelationTableView.cxx | 5 +- dbaccess/source/ui/tabledesign/FieldDescGenWin.cxx | 3 +- dbaccess/source/ui/tabledesign/FieldDescGenWin.hxx | 2 +- dbaccess/source/ui/tabledesign/TEditControl.cxx | 9 +- dbaccess/source/ui/tabledesign/TEditControl.hxx | 12 +- .../source/ui/tabledesign/TableDesignHelpBar.cxx | 3 +- dbaccess/source/ui/tabledesign/TableDesignView.cxx | 17 +- .../source/ui/tabledesign/TableFieldDescWin.cxx | 15 +- .../source/ui/tabledesign/TableFieldDescWin.hxx | 6 +- dbaccess/source/ui/tabledesign/TableUndo.hxx | 7 +- dbaccess/source/ui/uno/DBTypeWizDlgSetup.cxx | 2 +- dbaccess/source/ui/uno/composerdialogs.cxx | 6 +- dbaccess/source/ui/uno/copytablewizard.cxx | 2 +- desktop/source/app/cmdlinehelp.hxx | 8 +- .../deployment/gui/dp_gui_dependencydialog.cxx | 10 + .../deployment/gui/dp_gui_dependencydialog.hxx | 4 +- desktop/source/deployment/gui/dp_gui_dialog2.cxx | 43 ++- desktop/source/deployment/gui/dp_gui_dialog2.hxx | 42 +-- .../source/deployment/gui/dp_gui_extlistbox.cxx | 14 +- .../source/deployment/gui/dp_gui_extlistbox.hxx | 6 +- desktop/source/deployment/gui/dp_gui_theextmgr.cxx | 17 +- desktop/source/deployment/gui/dp_gui_theextmgr.hxx | 6 +- .../source/deployment/gui/dp_gui_updatedialog.cxx | 16 +- .../source/deployment/gui/dp_gui_updatedialog.hxx | 30 +- .../deployment/gui/dp_gui_updateinstalldialog.cxx | 7 + .../deployment/gui/dp_gui_updateinstalldialog.hxx | 14 +- desktop/source/deployment/gui/license_dialog.cxx | 29 +- editeng/source/editeng/impedit.hxx | 3 +- editeng/source/editeng/textconv.hxx | 3 +- editeng/source/misc/hangulhanja.cxx | 2 +- editeng/source/misc/splwrap.cxx | 4 +- extensions/source/abpilot/abpfinalpage.cxx | 6 + extensions/source/abpilot/abpfinalpage.hxx | 13 +- extensions/source/abpilot/admininvokationimpl.hxx | 3 +- extensions/source/abpilot/admininvokationpage.cxx | 11 +- extensions/source/abpilot/admininvokationpage.hxx | 7 +- extensions/source/abpilot/fieldmappingpage.cxx | 12 + extensions/source/abpilot/fieldmappingpage.hxx | 8 +- extensions/source/abpilot/tableselectionpage.cxx | 10 + extensions/source/abpilot/tableselectionpage.hxx | 6 +- extensions/source/abpilot/typeselectionpage.cxx | 11 + extensions/source/abpilot/typeselectionpage.hxx | 25 +- extensions/source/abpilot/unodialogabp.cxx | 2 +- extensions/source/bibliography/bibbeam.cxx | 7 +- extensions/source/bibliography/bibbeam.hxx | 4 +- extensions/source/bibliography/bibcont.cxx | 7 +- extensions/source/bibliography/bibcont.hxx | 4 +- extensions/source/bibliography/bibmod.cxx | 1 + .../source/bibliography/bibshortcuthandler.hxx | 2 +- extensions/source/bibliography/bibview.cxx | 27 +- extensions/source/bibliography/bibview.hxx | 34 ++- extensions/source/bibliography/datman.cxx | 120 +++++--- extensions/source/bibliography/datman.hxx | 5 +- extensions/source/bibliography/framectr.cxx | 1 + extensions/source/bibliography/general.cxx | 62 +++- extensions/source/bibliography/general.hxx | 98 +++--- extensions/source/bibliography/toolbar.cxx | 1 + extensions/source/bibliography/toolbar.hxx | 4 +- extensions/source/dbpilots/commonpagesdbp.cxx | 39 +++ extensions/source/dbpilots/commonpagesdbp.hxx | 28 +- extensions/source/dbpilots/controlwizard.cxx | 12 + extensions/source/dbpilots/controlwizard.hxx | 13 +- extensions/source/dbpilots/gridwizard.cxx | 15 + extensions/source/dbpilots/gridwizard.hxx | 14 +- extensions/source/dbpilots/groupboxwiz.cxx | 50 +++- extensions/source/dbpilots/groupboxwiz.hxx | 28 +- extensions/source/dbpilots/listcombowizard.cxx | 33 ++ extensions/source/dbpilots/listcombowizard.hxx | 18 +- extensions/source/plugin/inc/plugin/plctrl.hxx | 13 +- extensions/source/propctrlr/browserline.cxx | 7 +- extensions/source/propctrlr/browserline.hxx | 8 +- extensions/source/propctrlr/browserview.cxx | 4 +- extensions/source/propctrlr/browserview.hxx | 2 +- extensions/source/propctrlr/commoncontrol.cxx | 9 +- extensions/source/propctrlr/commoncontrol.hxx | 2 +- extensions/source/propctrlr/controlfontdialog.cxx | 2 +- extensions/source/propctrlr/formlinkdialog.cxx | 27 +- extensions/source/propctrlr/formlinkdialog.hxx | 11 +- extensions/source/propctrlr/listselectiondlg.cxx | 11 + extensions/source/propctrlr/listselectiondlg.hxx | 4 +- extensions/source/propctrlr/newdatatype.cxx | 11 + extensions/source/propctrlr/newdatatype.hxx | 6 +- extensions/source/propctrlr/propcontroller.cxx | 1 + extensions/source/propctrlr/propcontroller.hxx | 4 +- extensions/source/propctrlr/propertyeditor.cxx | 6 +- extensions/source/propctrlr/propertyeditor.hxx | 2 +- extensions/source/propctrlr/selectlabeldialog.cxx | 3 + extensions/source/propctrlr/selectlabeldialog.hxx | 6 +- extensions/source/propctrlr/standardcontrol.cxx | 16 +- extensions/source/propctrlr/standardcontrol.hxx | 4 +- extensions/source/propctrlr/taborder.cxx | 5 + extensions/source/propctrlr/taborder.hxx | 10 +- extensions/source/scanner/grid.cxx | 14 + extensions/source/scanner/grid.hxx | 11 +- extensions/source/scanner/sanedlg.cxx | 32 +- extensions/source/scanner/sanedlg.hxx | 48 +-- filter/source/flash/impswfdialog.cxx | 13 + filter/source/flash/impswfdialog.hxx | 17 +- filter/source/flash/swfdialog.cxx | 2 +- filter/source/pdf/impdialog.cxx | 124 +++++++- filter/source/pdf/impdialog.hxx | 192 ++++++------ filter/source/pdf/pdfdialog.cxx | 2 +- filter/source/pdf/pdffilter.cxx | 4 +- filter/source/svg/svgdialog.cxx | 2 +- .../source/xsltdialog/xmlfilterdialogcomponent.cxx | 10 +- .../source/xsltdialog/xmlfiltersettingsdialog.cxx | 31 +- .../source/xsltdialog/xmlfiltersettingsdialog.hxx | 30 +- filter/source/xsltdialog/xmlfiltertabdialog.cxx | 6 +- filter/source/xsltdialog/xmlfiltertabdialog.hxx | 8 +- filter/source/xsltdialog/xmlfiltertabpagebasic.cxx | 12 + filter/source/xsltdialog/xmlfiltertabpagebasic.hxx | 11 +- filter/source/xsltdialog/xmlfiltertabpagexslt.cxx | 14 + filter/source/xsltdialog/xmlfiltertabpagexslt.hxx | 17 +- filter/source/xsltdialog/xmlfiltertestdialog.cxx | 16 +- filter/source/xsltdialog/xmlfiltertestdialog.hxx | 30 +- forms/source/richtext/richtextimplcontrol.cxx | 19 +- forms/source/richtext/richtextimplcontrol.hxx | 14 +- forms/source/solar/control/navtoolbar.cxx | 10 +- forms/source/solar/inc/navtoolbar.hxx | 4 +- formula/source/ui/dlg/ControlHelper.hxx | 18 +- formula/source/ui/dlg/formula.cxx | 66 ++-- formula/source/ui/dlg/funcpage.cxx | 12 + formula/source/ui/dlg/funcpage.hxx | 6 +- formula/source/ui/dlg/funcutl.cxx | 55 +++- formula/source/ui/dlg/parawin.cxx | 20 ++ formula/source/ui/dlg/parawin.hxx | 50 ++-- formula/source/ui/dlg/structpg.cxx | 11 + formula/source/ui/dlg/structpg.hxx | 4 +- fpicker/source/office/OfficeControlAccess.hxx | 2 +- fpicker/source/office/PlacesListBox.cxx | 14 +- fpicker/source/office/PlacesListBox.hxx | 12 +- fpicker/source/office/QueryFolderName.hxx | 8 +- fpicker/source/office/asyncfilepicker.hxx | 5 +- fpicker/source/office/commonpicker.cxx | 10 +- fpicker/source/office/commonpicker.hxx | 3 +- fpicker/source/office/iodlg.cxx | 43 ++- fpicker/source/office/iodlg.hxx | 22 +- fpicker/source/office/iodlgimp.cxx | 5 +- fpicker/source/office/iodlgimp.hxx | 52 ++-- framework/inc/classes/fwktabwindow.hxx | 6 +- framework/inc/dispatch/closedispatcher.hxx | 3 +- framework/inc/helper/vclstatusindicator.hxx | 2 +- .../inc/uielement/buttontoolbarcontroller.hxx | 7 +- .../inc/uielement/comboboxtoolbarcontroller.hxx | 2 +- .../inc/uielement/complextoolbarcontroller.hxx | 5 +- .../inc/uielement/dropdownboxtoolbarcontroller.hxx | 3 +- framework/inc/uielement/edittoolbarcontroller.hxx | 2 +- .../inc/uielement/generictoolbarcontroller.hxx | 11 +- .../inc/uielement/spinfieldtoolbarcontroller.hxx | 3 +- framework/inc/uielement/statusbaritem.hxx | 3 +- framework/inc/uielement/statusbarmanager.hxx | 11 +- framework/inc/uielement/toolbarmanager.hxx | 2 +- framework/inc/uielement/toolbarmerger.hxx | 2 +- framework/source/helper/vclstatusindicator.cxx | 3 +- framework/source/services/tabwindowservice.cxx | 8 +- .../source/uielement/buttontoolbarcontroller.cxx | 2 +- .../source/uielement/comboboxtoolbarcontroller.cxx | 4 +- .../source/uielement/complextoolbarcontroller.cxx | 2 +- .../uielement/dropdownboxtoolbarcontroller.cxx | 4 +- .../source/uielement/edittoolbarcontroller.cxx | 4 +- .../source/uielement/generictoolbarcontroller.cxx | 2 +- .../uielement/spinfieldtoolbarcontroller.cxx | 4 +- framework/source/uielement/statusbarmanager.cxx | 51 ++-- framework/source/uielement/toolbarmanager.cxx | 8 +- include/dbaccess/ToolBoxHelper.hxx | 3 +- include/dbaccess/genericcontroller.hxx | 7 +- include/editeng/splwrap.hxx | 3 +- include/formula/funcutl.hxx | 6 +- include/sfx2/basedlgs.hxx | 16 +- include/sfx2/checkin.hxx | 8 +- include/sfx2/childwin.hxx | 8 +- include/sfx2/dinfdlg.hxx | 86 +++--- include/sfx2/fcontnr.hxx | 5 +- include/sfx2/frame.hxx | 3 +- include/sfx2/infobar.hxx | 17 +- include/sfx2/ipclient.hxx | 2 +- include/sfx2/mgetempl.hxx | 24 +- include/sfx2/newstyle.hxx | 4 +- include/sfx2/passwd.hxx | 30 +- include/sfx2/printopt.hxx | 43 +-- include/sfx2/prnmon.hxx | 2 +- include/sfx2/sidebar/SidebarPanelBase.hxx | 3 +- include/sfx2/stbitem.hxx | 6 +- include/sfx2/tabdlg.hxx | 20 +- include/sfx2/templatedlg.hxx | 20 +- include/sfx2/templateinfodlg.hxx | 8 +- include/sfx2/thumbnailview.hxx | 2 +- include/sfx2/thumbnailviewitem.hxx | 2 +- include/sfx2/viewsh.hxx | 3 +- include/svtools/GraphicExportOptionsDialog.hxx | 9 +- include/svtools/PlaceEditDialog.hxx | 13 +- include/svtools/ServerDetailsControls.hxx | 26 +- include/svtools/accessibleruler.hxx | 3 +- include/svtools/addresstemplate.hxx | 8 +- include/svtools/brwbox.hxx | 16 +- include/svtools/brwhead.hxx | 5 +- include/svtools/calendar.hxx | 8 +- include/svtools/colrdlg.hxx | 8 +- include/svtools/editbrowsebox.hxx | 10 +- include/svtools/fileview.hxx | 4 +- include/svtools/generictoolboxcontroller.hxx | 4 +- include/svtools/genericunodialog.hxx | 3 +- include/svtools/prnsetup.hxx | 14 +- include/svtools/simptabl.hxx | 4 +- include/svtools/tabbar.hxx | 2 + include/svtools/treelistbox.hxx | 4 +- include/svtools/wizardmachine.hxx | 13 +- include/svtools/wizdlg.hxx | 10 +- include/svx/AccessibleShapeTreeInfo.hxx | 3 +- include/svx/bmpmask.hxx | 50 ++-- include/svx/compressgraphicdialog.hxx | 34 ++- include/svx/contdlg.hxx | 6 +- include/svx/ctredlin.hxx | 56 ++-- include/svx/dialcontrol.hxx | 2 +- include/svx/fillctrl.hxx | 10 +- include/svx/fmshell.hxx | 2 +- include/svx/fontworkgallery.hxx | 10 +- include/svx/hdft.hxx | 32 +- include/svx/imapdlg.hxx | 18 +- include/svx/lboxctrl.hxx | 2 +- include/svx/linkwarn.hxx | 2 +- include/svx/optgrid.hxx | 40 +-- include/svx/passwd.hxx | 14 +- include/svx/rubydialog.hxx | 46 +-- include/svx/ruler.hxx | 2 +- include/svx/sidebar/Popup.hxx | 3 +- include/svx/srchdlg.hxx | 100 +++---- include/svx/svdedxv.hxx | 4 +- include/svx/svdpntv.hxx | 4 +- include/svx/tbxcolorupdate.hxx | 7 +- include/tools/errinf.hxx | 5 +- include/vcl/builder.hxx | 20 +- include/vcl/button.hxx | 4 +- include/vcl/combobox.hxx | 6 +- include/vcl/controllayout.hxx | 4 +- include/vcl/cursor.hxx | 3 +- include/vcl/dialog.hxx | 2 +- include/vcl/dockwin.hxx | 14 +- include/vcl/event.hxx | 3 +- include/vcl/field.hxx | 2 +- include/vcl/fixed.hxx | 2 +- include/vcl/floatwin.hxx | 4 +- include/vcl/fltcall.hxx | 2 +- include/vcl/layout.hxx | 30 +- include/vcl/lstbox.hxx | 8 +- include/vcl/menu.hxx | 2 +- include/vcl/msgbox.hxx | 16 +- include/vcl/opengl/OpenGLContext.hxx | 8 +- include/vcl/seleng.hxx | 2 +- include/vcl/split.hxx | 2 +- include/vcl/syswin.hxx | 2 +- include/vcl/tabdlg.hxx | 4 +- include/vcl/tabpage.hxx | 2 +- include/vcl/taskpanelist.hxx | 2 +- include/vcl/toolbox.hxx | 4 +- include/vcl/vclevent.hxx | 7 +- include/vcl/vclptr.hxx | 40 ++- include/vcl/waitobj.hxx | 2 +- include/vcl/window.hxx | 4 +- reportdesign/source/ui/dlg/AddField.cxx | 9 +- reportdesign/source/ui/dlg/CondFormat.cxx | 9 + reportdesign/source/ui/dlg/Condition.cxx | 17 +- reportdesign/source/ui/dlg/Condition.hxx | 32 +- reportdesign/source/ui/dlg/DateTime.cxx | 13 + reportdesign/source/ui/dlg/Formula.cxx | 2 + reportdesign/source/ui/dlg/GroupsSorting.cxx | 75 +++-- reportdesign/source/ui/dlg/Navigator.cxx | 2 +- reportdesign/source/ui/dlg/PageNumber.cxx | 12 + reportdesign/source/ui/inc/CondFormat.hxx | 12 +- reportdesign/source/ui/inc/DateTime.hxx | 15 +- reportdesign/source/ui/inc/DesignView.hxx | 8 +- reportdesign/source/ui/inc/Formula.hxx | 6 +- reportdesign/source/ui/inc/GroupsSorting.hxx | 20 +- reportdesign/source/ui/inc/PageNumber.hxx | 13 +- reportdesign/source/ui/inc/ReportController.hxx | 2 +- reportdesign/source/ui/inc/ReportSection.hxx | 2 +- reportdesign/source/ui/inc/ReportWindow.hxx | 8 +- reportdesign/source/ui/inc/ScrollHelper.hxx | 2 +- reportdesign/source/ui/inc/SectionView.hxx | 4 +- reportdesign/source/ui/inc/SectionWindow.hxx | 2 +- reportdesign/source/ui/inc/StartMarker.hxx | 2 +- reportdesign/source/ui/inc/ViewsWindow.hxx | 12 +- reportdesign/source/ui/inc/dlgedfunc.hxx | 2 +- reportdesign/source/ui/inc/propbrw.hxx | 2 +- reportdesign/source/ui/report/DesignView.cxx | 12 +- reportdesign/source/ui/report/ReportSection.cxx | 1 + reportdesign/source/ui/report/ReportWindow.cxx | 2 + reportdesign/source/ui/report/ScrollHelper.cxx | 1 + reportdesign/source/ui/report/SectionWindow.cxx | 1 + reportdesign/source/ui/report/StartMarker.cxx | 1 + reportdesign/source/ui/report/ViewsWindow.cxx | 1 + reportdesign/source/ui/report/propbrw.cxx | 1 + sc/inc/AccessibleFilterMenu.hxx | 3 +- sc/inc/AccessibleFilterMenuItem.hxx | 3 +- sc/inc/scmod.hxx | 4 +- sc/inc/scopetools.hxx | 3 +- sc/inc/waitoff.hxx | 2 +- sc/source/ui/Accessibility/AccessibleText.cxx | 24 +- .../StatisticsDialogs/AnalysisOfVarianceDialog.cxx | 13 +- .../ExponentialSmoothingDialog.cxx | 10 +- .../ui/StatisticsDialogs/MovingAverageDialog.cxx | 10 +- .../RandomNumberGeneratorDialog.cxx | 28 +- sc/source/ui/StatisticsDialogs/SamplingDialog.cxx | 25 +- .../StatisticsInputOutputDialog.cxx | 19 +- .../StatisticsTwoVariableDialog.cxx | 24 +- sc/source/ui/app/inputhdl.cxx | 5 + sc/source/ui/app/scmod.cxx | 14 +- sc/source/ui/attrdlg/scdlgfact.hxx | 6 +- sc/source/ui/attrdlg/scuiexp.cxx | 30 ++ sc/source/ui/attrdlg/tabpages.cxx | 14 + sc/source/ui/cctrl/checklistmenu.cxx | 18 ++ sc/source/ui/condformat/colorformat.cxx | 23 ++ sc/source/ui/condformat/condformatdlg.cxx | 24 ++ sc/source/ui/condformat/condformatmgr.cxx | 5 +- sc/source/ui/dbgui/PivotLayoutDialog.cxx | 40 ++- sc/source/ui/dbgui/PivotLayoutTreeListBase.cxx | 12 +- sc/source/ui/dbgui/PivotLayoutTreeListLabel.cxx | 2 +- sc/source/ui/dbgui/consdlg.cxx | 17 ++ sc/source/ui/dbgui/dapidata.cxx | 13 + sc/source/ui/dbgui/dapitype.cxx | 23 ++ sc/source/ui/dbgui/dbnamdlg.cxx | 15 + sc/source/ui/dbgui/dpgroupdlg.cxx | 39 +++ sc/source/ui/dbgui/filtdlg.cxx | 32 ++ sc/source/ui/dbgui/pfiltdlg.cxx | 18 ++ sc/source/ui/dbgui/pvfundlg.cxx | 78 +++++ sc/source/ui/dbgui/scendlg.cxx | 18 ++ sc/source/ui/dbgui/scuiasciiopt.cxx | 22 ++ sc/source/ui/dbgui/scuiimoptdlg.cxx | 12 + sc/source/ui/dbgui/sfiltdlg.cxx | 19 ++ sc/source/ui/dbgui/sortdlg.cxx | 13 + sc/source/ui/dbgui/subtdlg.cxx | 11 + sc/source/ui/dbgui/textimportoptions.cxx | 12 + sc/source/ui/dbgui/tpsort.cxx | 30 +- sc/source/ui/dbgui/tpsubt.cxx | 18 ++ sc/source/ui/dbgui/validate.cxx | 59 ++++ sc/source/ui/dialogs/searchresults.cxx | 2 +- sc/source/ui/docshell/tablink.cxx | 6 +- sc/source/ui/docshell/tpstat.cxx | 10 + sc/source/ui/drawfunc/fupoor.cxx | 2 - sc/source/ui/formdlg/dwfunctr.cxx | 1 + sc/source/ui/inc/AccessibleCsvControl.hxx | 3 +- sc/source/ui/inc/AccessibleEditObject.hxx | 2 +- sc/source/ui/inc/AccessibleText.hxx | 4 +- sc/source/ui/inc/AnalysisOfVarianceDialog.hxx | 9 +- sc/source/ui/inc/ExponentialSmoothingDialog.hxx | 3 +- sc/source/ui/inc/MovingAverageDialog.hxx | 3 +- sc/source/ui/inc/PivotLayoutDialog.hxx | 55 ++-- sc/source/ui/inc/PivotLayoutTreeListBase.hxx | 3 +- sc/source/ui/inc/RandomNumberGeneratorDialog.hxx | 31 +- sc/source/ui/inc/SamplingDialog.hxx | 29 +- sc/source/ui/inc/StatisticsInputOutputDialog.hxx | 21 +- sc/source/ui/inc/StatisticsTwoVariableDialog.hxx | 27 +- sc/source/ui/inc/acredlin.hxx | 8 +- sc/source/ui/inc/anyrefdg.hxx | 18 +- sc/source/ui/inc/areasdlg.hxx | 24 +- sc/source/ui/inc/checklistmenu.hxx | 13 +- sc/source/ui/inc/colorformat.hxx | 29 +- sc/source/ui/inc/condformatdlg.hxx | 19 +- sc/source/ui/inc/condformatmgr.hxx | 8 +- sc/source/ui/inc/conflictsdlg.hxx | 11 +- sc/source/ui/inc/consdlg.hxx | 34 +-- sc/source/ui/inc/content.hxx | 3 +- sc/source/ui/inc/corodlg.hxx | 11 +- sc/source/ui/inc/crdlg.hxx | 10 +- sc/source/ui/inc/crnrdlg.hxx | 25 +- sc/source/ui/inc/dapidata.hxx | 8 +- sc/source/ui/inc/dapitype.hxx | 23 +- sc/source/ui/inc/datafdlg.hxx | 19 +- sc/source/ui/inc/datastreamdlg.hxx | 36 +-- sc/source/ui/inc/dbnamdlg.hxx | 36 +-- sc/source/ui/inc/delcldlg.hxx | 10 +- sc/source/ui/inc/delcodlg.hxx | 19 +- sc/source/ui/inc/dpgroupdlg.hxx | 55 ++-- sc/source/ui/inc/dwfunctr.hxx | 2 +- sc/source/ui/inc/filldlg.hxx | 41 +-- sc/source/ui/inc/filtdlg.hxx | 120 ++++---- sc/source/ui/inc/foptmgr.hxx | 24 +- sc/source/ui/inc/fupoor.hxx | 4 +- sc/source/ui/inc/gridwin.hxx | 4 +- sc/source/ui/inc/groupdlg.hxx | 6 +- sc/source/ui/inc/highred.hxx | 16 +- sc/source/ui/inc/inputhdl.hxx | 9 +- sc/source/ui/inc/inscldlg.hxx | 9 +- sc/source/ui/inc/inscodlg.hxx | 52 ++-- sc/source/ui/inc/instbdlg.hxx | 26 +- sc/source/ui/inc/lbseldlg.hxx | 4 +- sc/source/ui/inc/linkarea.hxx | 15 +- sc/source/ui/inc/mtrindlg.hxx | 6 +- sc/source/ui/inc/mvtabdlg.hxx | 15 +- sc/source/ui/inc/namecrea.hxx | 11 +- sc/source/ui/inc/namedefdlg.hxx | 25 +- sc/source/ui/inc/namedlg.hxx | 28 +- sc/source/ui/inc/namepast.hxx | 8 +- sc/source/ui/inc/navipi.hxx | 2 +- sc/source/ui/inc/notemark.hxx | 8 +- sc/source/ui/inc/opredlin.hxx | 10 +- sc/source/ui/inc/optsolver.hxx | 127 ++++---- sc/source/ui/inc/pfiltdlg.hxx | 42 +-- sc/source/ui/inc/prevwsh.hxx | 10 +- sc/source/ui/inc/protectiondlg.hxx | 15 +- sc/source/ui/inc/pvfundlg.hxx | 88 +++--- sc/source/ui/inc/reffact.hxx | 2 +- sc/source/ui/inc/retypepassdlg.hxx | 26 +- sc/source/ui/inc/scendlg.hxx | 19 +- sc/source/ui/inc/scuiasciiopt.hxx | 44 +-- sc/source/ui/inc/scuiautofmt.hxx | 28 +- sc/source/ui/inc/scuiimoptdlg.hxx | 24 +- sc/source/ui/inc/scuitphfedit.hxx | 43 +-- sc/source/ui/inc/searchresults.hxx | 2 +- sc/source/ui/inc/sharedocdlg.hxx | 6 +- sc/source/ui/inc/shtabdlg.hxx | 6 +- sc/source/ui/inc/simpref.hxx | 11 +- sc/source/ui/inc/solveroptions.hxx | 18 +- sc/source/ui/inc/solvrdlg.hxx | 21 +- sc/source/ui/inc/sortdlg.hxx | 8 +- sc/source/ui/inc/sortkeydlg.hxx | 12 +- sc/source/ui/inc/strindlg.hxx | 7 +- sc/source/ui/inc/subtdlg.hxx | 4 +- sc/source/ui/inc/tabbgcolordlg.hxx | 11 +- sc/source/ui/inc/tabopdlg.hxx | 25 +- sc/source/ui/inc/tabpages.hxx | 11 +- sc/source/ui/inc/tabview.hxx | 10 +- sc/source/ui/inc/textimportoptions.hxx | 12 +- sc/source/ui/inc/tpcalc.hxx | 32 +- sc/source/ui/inc/tpcompatibility.hxx | 6 +- sc/source/ui/inc/tpdefaults.hxx | 5 +- sc/source/ui/inc/tpformula.hxx | 24 +- sc/source/ui/inc/tphf.hxx | 13 +- sc/source/ui/inc/tpprint.hxx | 10 +- sc/source/ui/inc/tpsort.hxx | 34 +-- sc/source/ui/inc/tpstat.hxx | 10 +- sc/source/ui/inc/tpsubt.hxx | 26 +- sc/source/ui/inc/tptable.hxx | 48 +-- sc/source/ui/inc/tpusrlst.hxx | 24 +- sc/source/ui/inc/tpview.hxx | 88 +++--- sc/source/ui/inc/validate.hxx | 62 ++-- sc/source/ui/inc/xmlsourcedlg.hxx | 20 +- sc/source/ui/miscdlgs/acredlin.cxx | 5 +- sc/source/ui/miscdlgs/anyrefdg.cxx | 18 +- sc/source/ui/miscdlgs/conflictsdlg.cxx | 11 + sc/source/ui/miscdlgs/crdlg.cxx | 15 + sc/source/ui/miscdlgs/crnrdlg.cxx | 20 +- sc/source/ui/miscdlgs/datafdlg.cxx | 14 + sc/source/ui/miscdlgs/datastreamdlg.cxx | 27 ++ sc/source/ui/miscdlgs/delcldlg.cxx | 15 + sc/source/ui/miscdlgs/delcodlg.cxx | 23 +- sc/source/ui/miscdlgs/filldlg.cxx | 26 ++ sc/source/ui/miscdlgs/groupdlg.cxx | 14 +- sc/source/ui/miscdlgs/highred.cxx | 8 +- sc/source/ui/miscdlgs/inscldlg.cxx | 18 +- sc/source/ui/miscdlgs/inscodlg.cxx | 22 ++ sc/source/ui/miscdlgs/instbdlg.cxx | 13 + sc/source/ui/miscdlgs/lbseldlg.cxx | 12 + sc/source/ui/miscdlgs/linkarea.cxx | 13 + sc/source/ui/miscdlgs/mtrindlg.cxx | 12 + sc/source/ui/miscdlgs/mvtabdlg.cxx | 13 + sc/source/ui/miscdlgs/namecrea.cxx | 14 + sc/source/ui/miscdlgs/optsolver.cxx | 95 +++++- sc/source/ui/miscdlgs/protectiondlg.cxx | 13 + sc/source/ui/miscdlgs/retypepassdlg.cxx | 25 +- sc/source/ui/miscdlgs/scuiautofmt.cxx | 23 ++ sc/source/ui/miscdlgs/sharedocdlg.cxx | 4 +- sc/source/ui/miscdlgs/shtabdlg.cxx | 12 + sc/source/ui/miscdlgs/simpref.cxx | 11 + sc/source/ui/miscdlgs/solveroptions.cxx | 27 ++ sc/source/ui/miscdlgs/solvrdlg.cxx | 18 +- sc/source/ui/miscdlgs/strindlg.cxx | 12 + sc/source/ui/miscdlgs/tabbgcolordlg.cxx | 23 ++ sc/source/ui/miscdlgs/tabopdlg.cxx | 19 ++ sc/source/ui/namedlg/namedefdlg.cxx | 21 ++ sc/source/ui/namedlg/namedlg.cxx | 15 +- sc/source/ui/namedlg/namepast.cxx | 5 +- sc/source/ui/navipi/content.cxx | 7 + sc/source/ui/optdlg/calcoptionsdlg.cxx | 22 +- sc/source/ui/optdlg/calcoptionsdlg.hxx | 33 +- sc/source/ui/optdlg/opredlin.cxx | 10 + sc/source/ui/optdlg/tpcalc.cxx | 16 + sc/source/ui/optdlg/tpcompatibility.cxx | 7 + sc/source/ui/optdlg/tpdefaults.cxx | 8 + sc/source/ui/optdlg/tpformula.cxx | 17 ++ sc/source/ui/optdlg/tpprint.cxx | 9 + sc/source/ui/optdlg/tpusrlst.cxx | 12 + sc/source/ui/optdlg/tpview.cxx | 43 +++ sc/source/ui/pagedlg/areasdlg.cxx | 12 + sc/source/ui/pagedlg/scuitphfedit.cxx | 26 ++ sc/source/ui/pagedlg/tphf.cxx | 8 + sc/source/ui/pagedlg/tptable.cxx | 27 ++ sc/source/ui/sidebar/AlignmentPropertyPanel.cxx | 14 + sc/source/ui/sidebar/AlignmentPropertyPanel.hxx | 20 +- .../ui/sidebar/CellAppearancePropertyPanel.cxx | 10 + .../ui/sidebar/CellAppearancePropertyPanel.hxx | 12 +- sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx | 12 + sc/source/ui/sidebar/NumberFormatPropertyPanel.hxx | 15 +- sc/source/ui/vba/vbaeventshelper.cxx | 8 +- sc/source/ui/view/gridwin.cxx | 27 +- sc/source/ui/view/gridwin2.cxx | 2 +- sc/source/ui/view/prevwsh.cxx | 8 +- sc/source/ui/view/reffact.cxx | 30 +- sc/source/ui/view/tabview.cxx | 2 +- sc/source/ui/view/tabview5.cxx | 7 +- sc/source/ui/xmlsource/xmlsourcedlg.cxx | 21 +- sd/inc/Outliner.hxx | 2 +- sd/source/filter/html/pubdlg.cxx | 108 ++++++- .../ui/accessibility/AccessibleSlideSorterView.cxx | 16 +- .../ui/animations/CustomAnimationCreateDialog.cxx | 24 +- .../ui/animations/CustomAnimationCreateDialog.hxx | 4 +- sd/source/ui/animations/CustomAnimationDialog.cxx | 178 +++++++---- sd/source/ui/animations/CustomAnimationDialog.hxx | 8 +- sd/source/ui/animations/CustomAnimationList.cxx | 2 +- sd/source/ui/animations/CustomAnimationPane.cxx | 23 +- sd/source/ui/animations/CustomAnimationPane.hxx | 34 +-- sd/source/ui/animations/SlideTransitionPane.cxx | 15 +- sd/source/ui/animations/SlideTransitionPane.hxx | 26 +- sd/source/ui/annotations/annotationtag.hxx | 2 +- sd/source/ui/annotations/annotationwindow.cxx | 13 +- sd/source/ui/annotations/annotationwindow.hxx | 9 +- sd/source/ui/controller/slidelayoutcontroller.cxx | 13 +- sd/source/ui/dlg/PaneChildWindows.cxx | 4 +- sd/source/ui/dlg/PhotoAlbumDialog.cxx | 17 ++ sd/source/ui/dlg/PhotoAlbumDialog.hxx | 24 +- sd/source/ui/dlg/RemoteDialog.cxx | 13 + sd/source/ui/dlg/RemoteDialog.hxx | 8 +- sd/source/ui/dlg/RemoteDialogClientBox.hxx | 2 +- sd/source/ui/dlg/animobjs.cxx | 22 +- sd/source/ui/dlg/brkdlg.cxx | 6 +- sd/source/ui/dlg/copydlg.cxx | 36 +-- sd/source/ui/dlg/custsdlg.cxx | 29 ++ sd/source/ui/dlg/dlgass.cxx | 122 ++++---- sd/source/ui/dlg/dlgfield.cxx | 15 + sd/source/ui/dlg/dlgsnap.cxx | 19 ++ sd/source/ui/dlg/headerfooterdlg.cxx | 66 ++-- sd/source/ui/dlg/ins_paste.cxx | 12 + sd/source/ui/dlg/inspagob.cxx | 9 + sd/source/ui/dlg/layeroptionsdlg.cxx | 16 + sd/source/ui/dlg/masterlayoutdlg.cxx | 15 + sd/source/ui/dlg/morphdlg.cxx | 9 + sd/source/ui/dlg/paragr.cxx | 16 +- sd/source/ui/dlg/present.cxx | 33 ++ sd/source/ui/dlg/prntopts.cxx | 27 +- sd/source/ui/dlg/sddlgfact.cxx | 14 +- sd/source/ui/dlg/sddlgfact.hxx | 3 +- sd/source/ui/dlg/sdpreslt.cxx | 10 + sd/source/ui/dlg/sdtreelb.cxx | 4 +- sd/source/ui/dlg/sduiexp.cxx | 15 + sd/source/ui/dlg/tpaction.cxx | 19 ++ sd/source/ui/dlg/tpoption.cxx | 42 +++ sd/source/ui/dlg/vectdlg.cxx | 16 + .../ui/framework/factories/ChildWindowPane.cxx | 2 +- .../ui/framework/factories/FullScreenPane.cxx | 12 +- sd/source/ui/framework/factories/Pane.cxx | 2 +- sd/source/ui/func/fupoor.cxx | 8 +- sd/source/ui/inc/AccessibleDocumentViewBase.hxx | 2 +- sd/source/ui/inc/AccessibleSlideSorterView.hxx | 3 +- sd/source/ui/inc/BreakDlg.hxx | 8 +- sd/source/ui/inc/FormShellManager.hxx | 3 +- sd/source/ui/inc/Ruler.hxx | 2 +- sd/source/ui/inc/ViewShell.hxx | 4 +- sd/source/ui/inc/Window.hxx | 2 +- sd/source/ui/inc/WindowUpdater.hxx | 3 +- sd/source/ui/inc/animobjs.hxx | 46 +-- sd/source/ui/inc/copydlg.hxx | 22 +- sd/source/ui/inc/custsdlg.hxx | 41 +-- sd/source/ui/inc/dlgfield.hxx | 11 +- sd/source/ui/inc/dlgsnap.hxx | 20 +- sd/source/ui/inc/framework/Pane.hxx | 3 +- sd/source/ui/inc/fupoor.hxx | 6 +- sd/source/ui/inc/headerfooterdlg.hxx | 12 +- sd/source/ui/inc/ins_paste.hxx | 6 +- sd/source/ui/inc/inspagob.hxx | 7 +- sd/source/ui/inc/layeroptionsdlg.hxx | 15 +- sd/source/ui/inc/masterlayoutdlg.hxx | 12 +- sd/source/ui/inc/morphdlg.hxx | 9 +- sd/source/ui/inc/navigatr.hxx | 4 +- sd/source/ui/inc/present.hxx | 48 +-- sd/source/ui/inc/prntopts.hxx | 39 +-- sd/source/ui/inc/pubdlg.hxx | 169 +++++------ sd/source/ui/inc/sdpreslt.hxx | 11 +- sd/source/ui/inc/sdtreelb.hxx | 4 +- .../ui/inc/taskpane/SlideSorterCacheDisplay.hxx | 2 +- sd/source/ui/inc/tpaction.hxx | 31 +- sd/source/ui/inc/tpoption.hxx | 62 ++-- sd/source/ui/inc/vectdlg.hxx | 21 +- sd/source/ui/slideshow/slideshow.cxx | 2 +- sd/source/ui/slideshow/slideshowimpl.cxx | 14 +- sd/source/ui/slideshow/slideshowimpl.hxx | 12 +- sd/source/ui/table/TableDesignPane.hxx | 4 +- sd/source/ui/view/FormShellManager.cxx | 4 +- sd/source/ui/view/sdruler.cxx | 1 + sd/source/ui/view/sdview2.cxx | 2 +- sd/source/ui/view/sdwindow.cxx | 1 + sd/source/ui/view/viewshe2.cxx | 2 +- sd/source/ui/view/viewshel.cxx | 2 +- sfx2/inc/srchdlg.hxx | 12 +- sfx2/source/appl/childwin.cxx | 18 +- sfx2/source/appl/fileobj.hxx | 2 +- sfx2/source/appl/helpinterceptor.hxx | 3 +- sfx2/source/appl/impldde.cxx | 24 +- sfx2/source/appl/lnkbase2.cxx | 4 +- sfx2/source/appl/newhelp.cxx | 79 ++++- sfx2/source/appl/newhelp.hxx | 58 ++-- sfx2/source/appl/workwin.cxx | 16 +- sfx2/source/control/thumbnailview.cxx | 2 +- sfx2/source/control/thumbnailviewacc.cxx | 2 +- sfx2/source/control/thumbnailviewacc.hxx | 5 +- sfx2/source/control/thumbnailviewitem.cxx | 5 +- sfx2/source/dialog/alienwarn.cxx | 2 + sfx2/source/dialog/backingwindow.cxx | 27 +- sfx2/source/dialog/backingwindow.hxx | 58 ++-- sfx2/source/dialog/basedlgs.cxx | 13 +- sfx2/source/dialog/checkin.cxx | 13 + sfx2/source/dialog/dinfdlg.cxx | 102 ++++++- sfx2/source/dialog/dockwin.cxx | 10 +- sfx2/source/dialog/documentfontsdialog.cxx | 11 + sfx2/source/dialog/filedlgimpl.hxx | 2 +- sfx2/source/dialog/infobar.cxx | 31 +- sfx2/source/dialog/inputdlg.cxx | 14 + sfx2/source/dialog/mgetempl.cxx | 12 + sfx2/source/dialog/navigat.cxx | 2 +- sfx2/source/dialog/newstyle.cxx | 2 + sfx2/source/dialog/partwnd.cxx | 8 +- sfx2/source/dialog/passwd.cxx | 22 ++ sfx2/source/dialog/printopt.cxx | 30 ++ sfx2/source/dialog/recfloat.cxx | 3 +- sfx2/source/dialog/securitypage.cxx | 8 +- sfx2/source/dialog/splitwin.cxx | 19 +- sfx2/source/dialog/srchdlg.cxx | 6 + sfx2/source/dialog/tabdlg.cxx | 44 +-- sfx2/source/dialog/templateinfodlg.cxx | 6 +- sfx2/source/dialog/templdlg.cxx | 9 +- sfx2/source/dialog/versdlg.cxx | 31 +- sfx2/source/doc/new.cxx | 22 +- sfx2/source/doc/templatedlg.cxx | 14 +- sfx2/source/inc/alienwarn.hxx | 4 +- sfx2/source/inc/documentfontsdialog.hxx | 4 +- sfx2/source/inc/inputdlg.hxx | 10 +- sfx2/source/inc/recfloat.hxx | 2 +- sfx2/source/inc/splitwin.hxx | 10 +- sfx2/source/inc/templdgi.hxx | 10 +- sfx2/source/inc/versdlg.hxx | 40 +-- sfx2/source/inc/workwin.hxx | 12 +- sfx2/source/sidebar/FocusManager.cxx | 24 +- sfx2/source/sidebar/FocusManager.hxx | 10 +- sfx2/source/sidebar/PanelTitleBar.cxx | 19 +- sfx2/source/sidebar/PanelTitleBar.hxx | 4 +- sfx2/source/sidebar/SidebarChildWindow.cxx | 2 +- sfx2/source/sidebar/SidebarController.cxx | 18 +- sfx2/source/sidebar/SidebarController.hxx | 4 +- sfx2/source/sidebar/SidebarPanelBase.cxx | 16 +- sfx2/source/statbar/stbitem.cxx | 2 +- sfx2/source/toolbox/imgmgr.cxx | 2 +- sfx2/source/toolbox/tbxitem.cxx | 26 +- sfx2/source/view/frame.cxx | 2 +- sfx2/source/view/frame2.cxx | 2 +- sfx2/source/view/impframe.hxx | 14 +- sfx2/source/view/impviewframe.hxx | 4 +- sfx2/source/view/printer.cxx | 2 +- sfx2/source/view/sfxbasecontroller.cxx | 2 +- sfx2/source/view/viewfrm.cxx | 4 +- sfx2/source/view/viewprn.cxx | 4 +- starmath/inc/ElementsDockingWindow.hxx | 4 +- starmath/inc/dialog.hxx | 156 +++++----- starmath/inc/edit.hxx | 6 +- starmath/inc/toolbox.hxx | 6 +- starmath/inc/view.hxx | 2 +- starmath/source/ElementsDockingWindow.cxx | 3 +- starmath/source/accessibility.hxx | 4 +- starmath/source/dialog.cxx | 141 +++++++++ starmath/source/edit.cxx | 10 +- starmath/source/toolbox.cxx | 8 +- starmath/source/view.cxx | 2 +- svtools/inc/vclxaccessibleheaderbar.hxx | 2 +- svtools/inc/vclxaccessibleheaderbaritem.hxx | 3 +- svtools/source/brwbox/brwbox1.cxx | 28 +- svtools/source/brwbox/brwbox2.cxx | 32 +- svtools/source/brwbox/brwhead.cxx | 12 + svtools/source/brwbox/datwin.cxx | 12 + svtools/source/brwbox/datwin.hxx | 10 +- svtools/source/brwbox/ebbcontrols.cxx | 2 +- svtools/source/brwbox/editbrowsebox.cxx | 6 +- svtools/source/contnr/fileview.cxx | 19 +- svtools/source/contnr/imivctl.hxx | 4 +- svtools/source/contnr/imivctl1.cxx | 4 +- svtools/source/contnr/simptabl.cxx | 11 + svtools/source/contnr/svtabbx.cxx | 2 +- svtools/source/contnr/treelistbox.cxx | 2 +- svtools/source/control/calendar.cxx | 42 +-- svtools/source/control/inettbc.cxx | 8 +- svtools/source/control/roadmap.cxx | 4 +- svtools/source/control/tabbar.cxx | 36 ++- svtools/source/control/toolbarmenu.cxx | 12 +- svtools/source/control/toolbarmenuimp.hxx | 2 +- svtools/source/control/valueacc.cxx | 2 +- svtools/source/control/valueimp.hxx | 4 +- svtools/source/dialogs/PlaceEditDialog.cxx | 16 + svtools/source/dialogs/addresstemplate.cxx | 4 + svtools/source/dialogs/colrdlg.cxx | 1 + svtools/source/dialogs/prnsetup.cxx | 8 + svtools/source/dialogs/restartdialog.cxx | 15 +- svtools/source/dialogs/roadmapwizard.cxx | 7 +- svtools/source/dialogs/wizardmachine.cxx | 10 +- svtools/source/dialogs/wizdlg.cxx | 8 +- .../source/filter/GraphicExportOptionsDialog.cxx | 13 + svtools/source/filter/exportdialog.cxx | 33 ++ svtools/source/filter/exportdialog.hxx | 66 ++-- svtools/source/hatchwindow/hatchwindow.cxx | 2 +- svtools/source/inc/hatchwindow.hxx | 2 +- svtools/source/inc/svimpbox.hxx | 4 +- svtools/source/misc/dialogcontrolling.cxx | 4 +- svtools/source/table/tablecontrol_impl.cxx | 20 +- svtools/source/table/tablecontrol_impl.hxx | 6 +- svtools/source/toolpanel/paneltabbarpeer.cxx | 4 +- svtools/source/toolpanel/paneltabbarpeer.hxx | 2 +- svtools/source/toolpanel/toolpaneldeckpeer.cxx | 4 +- svtools/source/toolpanel/toolpaneldeckpeer.hxx | 2 +- svtools/source/uno/addrtempuno.cxx | 2 +- svtools/source/uno/generictoolboxcontroller.cxx | 6 +- svtools/source/uno/genericunodialog.cxx | 3 +- svtools/source/uno/popupwindowcontroller.cxx | 6 +- svtools/source/uno/treecontrolpeer.hxx | 2 +- svtools/source/uno/wizard/unowizard.cxx | 20 +- svtools/source/uno/wizard/wizardshell.hxx | 2 +- svx/inc/extrusiondepthdialog.hxx | 4 +- svx/inc/galbrws2.hxx | 6 +- svx/inc/svdibrow.hxx | 2 +- svx/inc/tbunosearchcontrollers.hxx | 4 +- .../accessibility/AccessibleShapeTreeInfo.cxx | 1 + .../accessibility/GraphCtlAccessibleContext.cxx | 6 +- svx/source/dialog/_bmpmask.cxx | 33 +- svx/source/dialog/_contdlg.cxx | 21 +- svx/source/dialog/compressgraphicdialog.cxx | 25 ++ svx/source/dialog/contimp.hxx | 8 +- svx/source/dialog/ctredlin.cxx | 52 +++- svx/source/dialog/docrecovery.cxx | 47 ++- svx/source/dialog/fontwork.cxx | 332 +-------------------- svx/source/dialog/hdft.cxx | 16 + svx/source/dialog/imapdlg.cxx | 12 +- svx/source/dialog/linkwarn.cxx | 1 + svx/source/dialog/optgrid.cxx | 27 ++ svx/source/dialog/orienthelper.cxx | 2 +- svx/source/dialog/passwd.cxx | 15 + svx/source/dialog/rubydialog.cxx | 33 ++ svx/source/dialog/srchdlg.cxx | 44 ++- svx/source/dialog/svxruler.cxx | 1 + svx/source/fmcomp/gridcell.cxx | 321 ++++++++++---------- svx/source/fmcomp/gridctrl.cxx | 6 +- svx/source/form/datanavi.cxx | 121 +++++++- svx/source/form/filtnav.cxx | 4 +- svx/source/form/fmPropBrw.cxx | 3 +- svx/source/form/fmexpl.cxx | 4 +- svx/source/form/tabwin.cxx | 15 +- svx/source/form/xfm_addcondition.cxx | 2 +- svx/source/gallery2/galbrws1.cxx | 3 +- svx/source/gallery2/galbrws1.hxx | 2 +- svx/source/gallery2/galbrws2.cxx | 16 +- svx/source/inc/AccessibleFrameSelector.hxx | 3 +- svx/source/inc/GraphCtlAccessibleContext.hxx | 2 +- svx/source/inc/charmapacc.hxx | 2 +- svx/source/inc/datalistener.hxx | 3 +- svx/source/inc/datanavi.hxx | 134 +++++---- svx/source/inc/docrecovery.hxx | 38 ++- svx/source/inc/filtnav.hxx | 2 +- svx/source/inc/fmexch.hxx | 2 +- svx/source/inc/fmexpl.hxx | 2 +- svx/source/inc/fmvwimp.hxx | 3 +- svx/source/inc/gridcell.hxx | 12 +- svx/source/inc/svxrectctaccessiblecontext.hxx | 3 +- svx/source/inc/tabwin.hxx | 6 +- svx/source/inc/tbxform.hxx | 2 +- svx/source/sidebar/area/AreaPropertyPanel.cxx | 17 ++ svx/source/sidebar/area/AreaPropertyPanel.hxx | 20 +- .../sidebar/graphic/GraphicPropertyPanel.cxx | 17 ++ .../sidebar/graphic/GraphicPropertyPanel.hxx | 19 +- svx/source/sidebar/insert/InsertPropertyPanel.cxx | 6 +- svx/source/sidebar/insert/InsertPropertyPanel.hxx | 4 +- svx/source/sidebar/line/LinePropertyPanel.cxx | 23 ++ svx/source/sidebar/line/LinePropertyPanel.hxx | 29 +- .../sidebar/paragraph/ParaLineSpacingControl.cxx | 29 +- .../sidebar/paragraph/ParaLineSpacingControl.hxx | 20 +- svx/source/sidebar/paragraph/ParaPropertyPanel.cxx | 20 ++ svx/source/sidebar/paragraph/ParaPropertyPanel.hxx | 23 +- .../sidebar/possize/PosSizePropertyPanel.cxx | 23 ++ .../sidebar/possize/PosSizePropertyPanel.hxx | 31 +- svx/source/sidebar/text/TextPropertyPanel.cxx | 15 + svx/source/sidebar/text/TextPropertyPanel.hxx | 13 +- svx/source/sidebar/tools/Popup.cxx | 6 +- svx/source/svdraw/sdrpaintwindow.cxx | 12 +- svx/source/svdraw/svdedxv.cxx | 22 +- svx/source/svdraw/svdibrow.cxx | 17 +- svx/source/svdraw/svdmrkv.cxx | 2 +- svx/source/svdraw/svdpntv.cxx | 20 +- svx/source/svdraw/svdview.cxx | 4 +- svx/source/tbxctrls/bulletsnumbering.cxx | 15 +- svx/source/tbxctrls/colorwindow.hxx | 14 +- svx/source/tbxctrls/extrusioncontrols.cxx | 33 ++ svx/source/tbxctrls/extrusioncontrols.hxx | 8 +- svx/source/tbxctrls/fillctrl.cxx | 4 +- svx/source/tbxctrls/fontworkgallery.cxx | 22 ++ svx/source/tbxctrls/lboxctrl.cxx | 23 +- svx/source/tbxctrls/tbcontrl.cxx | 16 + svx/source/tbxctrls/tbunocontroller.cxx | 5 +- svx/source/tbxctrls/tbunosearchcontrollers.cxx | 6 +- .../chinese_dictionarydialog.cxx | 31 +- .../chinese_dictionarydialog.hxx | 40 +-- .../chinese_translation_unodialog.cxx | 3 +- .../chinese_translation_unodialog.hxx | 3 +- .../chinese_translationdialog.cxx | 7 +- .../chinese_translationdialog.hxx | 12 +- svx/source/unodraw/recoveryui.cxx | 2 +- svx/source/unodraw/unoshtxt.cxx | 2 +- sw/inc/PostItMgr.hxx | 5 +- sw/inc/SidebarWin.hxx | 10 +- sw/inc/colwd.hxx | 6 +- sw/inc/hhcwrp.hxx | 2 +- sw/inc/postithelper.hxx | 2 +- sw/inc/viewsh.hxx | 2 +- sw/qa/tiledrendering/tiledrendering.cxx | 31 +- sw/source/core/access/accdoc.hxx | 2 +- sw/source/core/access/accfrmobj.cxx | 2 +- sw/source/core/access/accfrmobj.hxx | 3 +- sw/source/core/view/viewsh.cxx | 2 +- sw/source/ui/chrdlg/break.cxx | 21 +- sw/source/ui/chrdlg/chardlg.cxx | 10 + sw/source/ui/chrdlg/drpcps.cxx | 22 +- sw/source/ui/chrdlg/numpara.cxx | 20 ++ sw/source/ui/chrdlg/swuiccoll.cxx | 10 + sw/source/ui/config/mailconfigpage.cxx | 127 +++++--- sw/source/ui/config/optcomp.cxx | 4 + sw/source/ui/config/optload.cxx | 42 +++ sw/source/ui/config/optpage.cxx | 165 ++++++++++ sw/source/ui/dbui/addresslistdialog.cxx | 10 +- sw/source/ui/dbui/addresslistdialog.hxx | 18 +- sw/source/ui/dbui/createaddresslistdialog.cxx | 62 ++-- sw/source/ui/dbui/createaddresslistdialog.hxx | 38 +-- sw/source/ui/dbui/customizeaddresslistdialog.cxx | 33 +- sw/source/ui/dbui/customizeaddresslistdialog.hxx | 20 +- sw/source/ui/dbui/dbinsdlg.cxx | 33 +- sw/source/ui/dbui/dbtablepreviewdialog.cxx | 2 + sw/source/ui/dbui/dbtablepreviewdialog.hxx | 4 +- sw/source/ui/dbui/mmaddressblockpage.cxx | 144 +++++++-- sw/source/ui/dbui/mmaddressblockpage.hxx | 99 +++--- sw/source/ui/dbui/mmdocselectpage.cxx | 15 + sw/source/ui/dbui/mmdocselectpage.hxx | 19 +- sw/source/ui/dbui/mmgreetingspage.cxx | 21 ++ sw/source/ui/dbui/mmgreetingspage.hxx | 52 ++-- sw/source/ui/dbui/mmlayoutpage.cxx | 11 + sw/source/ui/dbui/mmlayoutpage.hxx | 22 +- sw/source/ui/dbui/mmmergepage.cxx | 19 ++ sw/source/ui/dbui/mmmergepage.hxx | 18 +- sw/source/ui/dbui/mmoutputpage.cxx | 44 ++- sw/source/ui/dbui/mmoutputpage.hxx | 84 +++--- sw/source/ui/dbui/mmoutputtypepage.cxx | 36 ++- sw/source/ui/dbui/mmoutputtypepage.hxx | 12 +- sw/source/ui/dbui/mmpreparemergepage.cxx | 18 ++ sw/source/ui/dbui/mmpreparemergepage.hxx | 18 +- sw/source/ui/dbui/selectdbtabledialog.cxx | 3 +- sw/source/ui/dbui/selectdbtabledialog.hxx | 4 +- sw/source/ui/dialog/abstract.cxx | 12 + sw/source/ui/dialog/ascfldlg.cxx | 15 + sw/source/ui/dialog/docstdlg.cxx | 19 +- sw/source/ui/dialog/swdlgfact.cxx | 1 - sw/source/ui/dialog/swdlgfact.hxx | 5 +- sw/source/ui/dialog/swmessdialog.cxx | 15 + sw/source/ui/dialog/swuiexp.cxx | 25 ++ sw/source/ui/dialog/uiregionsw.cxx | 74 +++++ sw/source/ui/dialog/wordcountdialog.cxx | 13 + sw/source/ui/dochdl/selglos.cxx | 11 + sw/source/ui/envelp/envfmt.cxx | 21 ++ sw/source/ui/envelp/envfmt.hxx | 22 +- sw/source/ui/envelp/envlop1.cxx | 14 + sw/source/ui/envelp/envprt.cxx | 17 ++ sw/source/ui/envelp/envprt.hxx | 16 +- sw/source/ui/envelp/label1.cxx | 80 +++++ sw/source/ui/envelp/labfmt.cxx | 35 +++ sw/source/ui/envelp/labfmt.hxx | 41 +-- sw/source/ui/envelp/labprt.cxx | 9 + sw/source/ui/envelp/labprt.hxx | 22 +- sw/source/ui/envelp/mailmrge.cxx | 54 ++++ sw/source/ui/envelp/swuilabimp.hxx | 110 +++---- sw/source/ui/fldui/DropDownFieldDialog.cxx | 14 + sw/source/ui/fldui/changedb.cxx | 5 + sw/source/ui/fldui/flddb.cxx | 18 ++ sw/source/ui/fldui/flddb.hxx | 25 +- sw/source/ui/fldui/flddinf.cxx | 12 + sw/source/ui/fldui/flddinf.hxx | 13 +- sw/source/ui/fldui/flddok.cxx | 21 ++ sw/source/ui/fldui/flddok.hxx | 29 +- sw/source/ui/fldui/fldedt.cxx | 3 + sw/source/ui/fldui/fldfunc.cxx | 31 ++ sw/source/ui/fldui/fldfunc.hxx | 51 ++-- sw/source/ui/fldui/fldref.cxx | 15 + sw/source/ui/fldui/fldref.hxx | 19 +- sw/source/ui/fldui/fldvar.cxx | 22 ++ sw/source/ui/fldui/fldvar.hxx | 33 +- sw/source/ui/fldui/inpdlg.cxx | 14 + sw/source/ui/fldui/javaedit.cxx | 10 + sw/source/ui/frmdlg/column.cxx | 26 +- sw/source/ui/frmdlg/cption.cxx | 37 ++- sw/source/ui/frmdlg/frmpage.cxx | 95 +++++- sw/source/ui/frmdlg/wrap.cxx | 20 ++ sw/source/ui/index/cnttab.cxx | 174 +++++++++-- sw/source/ui/index/multmrk.cxx | 13 +- sw/source/ui/index/swuiidxmrk.cxx | 30 +- sw/source/ui/misc/bookmark.cxx | 9 + sw/source/ui/misc/docfnote.cxx | 31 +- sw/source/ui/misc/glosbib.cxx | 12 + sw/source/ui/misc/glossary.cxx | 41 ++- sw/source/ui/misc/impfnote.hxx | 35 +-- sw/source/ui/misc/insfnote.cxx | 10 + sw/source/ui/misc/linenum.cxx | 22 ++ sw/source/ui/misc/num.cxx | 28 +- sw/source/ui/misc/outline.cxx | 39 ++- sw/source/ui/misc/pgfnote.cxx | 17 ++ sw/source/ui/misc/pggrid.cxx | 29 +- sw/source/ui/misc/srtdlg.cxx | 30 +- sw/source/ui/misc/titlepage.cxx | 12 + sw/source/ui/table/colwd.cxx | 12 + sw/source/ui/table/convert.cxx | 14 + sw/source/ui/table/instable.cxx | 11 + sw/source/ui/table/mergetbl.cxx | 12 + sw/source/ui/table/rowht.cxx | 12 + sw/source/ui/table/splittbl.cxx | 14 + sw/source/ui/table/tabledlg.cxx | 72 ++++- sw/source/ui/table/tautofmt.cxx | 23 +- sw/source/ui/utlui/swrenamexnameddlg.cxx | 12 + sw/source/uibase/dbui/dbui.cxx | 33 ++ sw/source/uibase/dbui/mailmergechildwindow.cxx | 13 +- sw/source/uibase/docvw/HeaderFooterWin.cxx | 2 +- sw/source/uibase/docvw/PageBreakWin.cxx | 7 +- sw/source/uibase/docvw/PostItMgr.cxx | 11 +- sw/source/uibase/docvw/SidebarWin.cxx | 17 +- sw/source/uibase/docvw/srcedtw.cxx | 7 +- sw/source/uibase/envelp/syncbtn.cxx | 13 +- sw/source/uibase/inc/DropDownFieldDialog.hxx | 10 +- sw/source/uibase/inc/FrameControl.hxx | 2 +- sw/source/uibase/inc/FrameControlsManager.hxx | 2 +- sw/source/uibase/inc/HeaderFooterWin.hxx | 4 +- sw/source/uibase/inc/PageBreakWin.hxx | 2 +- sw/source/uibase/inc/abstract.hxx | 8 +- sw/source/uibase/inc/ascfldlg.hxx | 17 +- sw/source/uibase/inc/bookmark.hxx | 7 +- sw/source/uibase/inc/break.hxx | 15 +- sw/source/uibase/inc/changedb.hxx | 10 +- sw/source/uibase/inc/chrdlg.hxx | 22 +- sw/source/uibase/inc/column.hxx | 56 ++-- sw/source/uibase/inc/conttree.hxx | 6 +- sw/source/uibase/inc/convert.hxx | 28 +- sw/source/uibase/inc/cption.hxx | 30 +- sw/source/uibase/inc/dbinsdlg.hxx | 50 ++-- sw/source/uibase/inc/dbui.hxx | 20 +- sw/source/uibase/inc/docstdlg.hxx | 23 +- sw/source/uibase/inc/drawbase.hxx | 2 +- sw/source/uibase/inc/drpcps.hxx | 33 +- sw/source/uibase/inc/envlop.hxx | 19 +- sw/source/uibase/inc/fldedt.hxx | 6 +- sw/source/uibase/inc/fldmgr.hxx | 3 +- sw/source/uibase/inc/frmpage.hxx | 163 +++++----- sw/source/uibase/inc/glosbib.hxx | 13 +- sw/source/uibase/inc/glossary.hxx | 24 +- sw/source/uibase/inc/inpdlg.hxx | 10 +- sw/source/uibase/inc/inputwin.hxx | 4 +- sw/source/uibase/inc/insfnote.hxx | 20 +- sw/source/uibase/inc/instable.hxx | 22 +- sw/source/uibase/inc/javaedit.hxx | 20 +- sw/source/uibase/inc/label.hxx | 2 +- sw/source/uibase/inc/linenum.hxx | 31 +- sw/source/uibase/inc/mailconfigpage.hxx | 20 +- sw/source/uibase/inc/mailmergechildwindow.hxx | 4 +- sw/source/uibase/inc/mailmergehelper.hxx | 2 +- sw/source/uibase/inc/mailmrge.hxx | 89 +++--- sw/source/uibase/inc/mergetbl.hxx | 4 +- sw/source/uibase/inc/multmrk.hxx | 5 +- sw/source/uibase/inc/navipi.hxx | 4 +- sw/source/uibase/inc/num.hxx | 48 +-- sw/source/uibase/inc/numpara.hxx | 29 +- sw/source/uibase/inc/optcomp.hxx | 8 +- sw/source/uibase/inc/optload.hxx | 74 ++--- sw/source/uibase/inc/optpage.hxx | 268 +++++++++-------- sw/source/uibase/inc/outline.hxx | 23 +- sw/source/uibase/inc/pgfnote.hxx | 25 +- sw/source/uibase/inc/pggrid.hxx | 46 +-- sw/source/uibase/inc/prcntfld.hxx | 2 +- sw/source/uibase/inc/pview.hxx | 12 +- sw/source/uibase/inc/redlndlg.hxx | 6 +- sw/source/uibase/inc/regionsw.hxx | 128 ++++---- sw/source/uibase/inc/rowht.hxx | 6 +- sw/source/uibase/inc/selglos.hxx | 5 +- sw/source/uibase/inc/shdwcrsr.hxx | 2 +- sw/source/uibase/inc/splittbl.hxx | 10 +- sw/source/uibase/inc/srcedtw.hxx | 6 +- sw/source/uibase/inc/srtdlg.hxx | 64 ++-- sw/source/uibase/inc/swmessdialog.hxx | 12 +- sw/source/uibase/inc/swrenamexnameddlg.hxx | 6 +- sw/source/uibase/inc/swruler.hxx | 3 +- sw/source/uibase/inc/swuiccoll.hxx | 18 +- sw/source/uibase/inc/swuicnttab.hxx | 214 ++++++------- sw/source/uibase/inc/swuiidxmrk.hxx | 90 +++--- sw/source/uibase/inc/syncbtn.hxx | 4 +- sw/source/uibase/inc/tautofmt.hxx | 26 +- sw/source/uibase/inc/titlepage.hxx | 24 +- sw/source/uibase/inc/view.hxx | 20 +- sw/source/uibase/inc/wordcountdialog.hxx | 26 +- sw/source/uibase/inc/workctrl.hxx | 4 +- sw/source/uibase/inc/wrap.hxx | 29 +- sw/source/uibase/misc/redlndlg.cxx | 2 +- sw/source/uibase/misc/swruler.cxx | 7 + sw/source/uibase/ribbar/inputwin.cxx | 2 +- sw/source/uibase/ribbar/workctrl.cxx | 3 +- sw/source/uibase/shells/txtattr.cxx | 1 + sw/source/uibase/shells/txtcrsr.cxx | 1 + sw/source/uibase/sidebar/PageColumnControl.cxx | 2 +- sw/source/uibase/sidebar/PageColumnControl.hxx | 2 +- sw/source/uibase/sidebar/PageMarginControl.cxx | 2 +- sw/source/uibase/sidebar/PageMarginControl.hxx | 2 +- .../uibase/sidebar/PageOrientationControl.cxx | 2 +- .../uibase/sidebar/PageOrientationControl.hxx | 2 +- sw/source/uibase/sidebar/PagePropertyPanel.cxx | 4 + sw/source/uibase/sidebar/PagePropertyPanel.hxx | 8 +- sw/source/uibase/sidebar/PageSizeControl.cxx | 2 +- sw/source/uibase/sidebar/PageSizeControl.hxx | 2 +- sw/source/uibase/sidebar/WrapPropertyPanel.cxx | 12 + sw/source/uibase/sidebar/WrapPropertyPanel.hxx | 15 +- sw/source/uibase/table/tablepg.hxx | 87 +++--- sw/source/uibase/uiview/pview.cxx | 37 ++- sw/source/uibase/uiview/view.cxx | 14 +- sw/source/uibase/uiview/viewling.cxx | 6 +- sw/source/uibase/uiview/viewmdi.cxx | 16 +- sw/source/uibase/utlui/content.cxx | 1 + sw/source/uibase/utlui/glbltree.cxx | 1 + sw/source/uibase/utlui/gloslst.cxx | 23 +- sw/source/uibase/utlui/navipi.cxx | 5 +- tools/source/ref/errinf.cxx | 1 + uui/source/authfallbackdlg.cxx | 15 + uui/source/authfallbackdlg.hxx | 12 +- uui/source/fltdlg.cxx | 12 + uui/source/fltdlg.hxx | 6 +- uui/source/logindlg.cxx | 25 ++ uui/source/logindlg.hxx | 32 +- uui/source/masterpasscrtdlg.cxx | 13 + uui/source/masterpasscrtdlg.hxx | 8 +- uui/source/masterpassworddlg.cxx | 12 + uui/source/masterpassworddlg.hxx | 6 +- uui/source/nameclashdlg.cxx | 15 + uui/source/nameclashdlg.hxx | 12 +- uui/source/passworddlg.cxx | 15 + uui/source/passworddlg.hxx | 12 +- uui/source/secmacrowarnings.cxx | 15 + uui/source/secmacrowarnings.hxx | 19 +- uui/source/unknownauthdlg.cxx | 14 + uui/source/unknownauthdlg.hxx | 10 +- vcl/generic/print/genprnpsp.cxx | 16 +- vcl/generic/print/prtsetup.cxx | 42 ++- vcl/generic/print/prtsetup.hxx | 44 +-- vcl/inc/brdwin.hxx | 6 +- vcl/inc/dndevdis.hxx | 4 +- vcl/inc/ilstbox.hxx | 13 +- vcl/inc/printdlg.hxx | 109 +++---- vcl/inc/salframe.hxx | 9 +- vcl/inc/svdata.hxx | 41 ++- vcl/inc/toolbox.h | 2 +- vcl/inc/unx/i18n_status.hxx | 3 +- vcl/inc/window.h | 58 ++-- vcl/source/app/salvtables.cxx | 9 + vcl/source/app/svapp.cxx | 30 +- vcl/source/app/svdata.cxx | 2 + vcl/source/app/vclevent.cxx | 9 + vcl/source/control/button.cxx | 28 +- vcl/source/control/combobox.cxx | 8 +- vcl/source/control/ctrl.cxx | 4 + vcl/source/control/fixed.cxx | 1 + vcl/source/control/ilstbox.cxx | 18 +- vcl/source/control/lstbox.cxx | 16 +- vcl/source/control/tabctrl.cxx | 28 +- vcl/source/edit/textview.cxx | 2 +- vcl/source/edit/vclmedit.cxx | 23 +- vcl/source/gdi/print3.cxx | 6 +- vcl/source/window/accel.cxx | 1 + vcl/source/window/accessibility.cxx | 5 +- vcl/source/window/brdwin.cxx | 2 +- vcl/source/window/btndlg.cxx | 22 +- vcl/source/window/builder.cxx | 27 +- vcl/source/window/clipping.cxx | 2 +- vcl/source/window/cursor.cxx | 4 +- vcl/source/window/dialog.cxx | 3 +- vcl/source/window/dlgctrl.cxx | 20 +- vcl/source/window/dndevdis.cxx | 6 +- vcl/source/window/dockmgr.cxx | 17 +- vcl/source/window/dockwin.cxx | 16 +- vcl/source/window/event.cxx | 23 +- vcl/source/window/floatwin.cxx | 6 +- vcl/source/window/introwin.cxx | 6 +- vcl/source/window/layout.cxx | 35 ++- vcl/source/window/menu.cxx | 20 +- vcl/source/window/menubarwindow.cxx | 6 +- vcl/source/window/menufloatingwindow.cxx | 4 +- vcl/source/window/mouse.cxx | 22 +- vcl/source/window/msgbox.cxx | 23 +- vcl/source/window/paint.cxx | 2 +- vcl/source/window/printdlg.cxx | 63 ++-- vcl/source/window/split.cxx | 1 + vcl/source/window/splitwin.cxx | 6 +- vcl/source/window/stacking.cxx | 37 ++- vcl/source/window/syswin.cxx | 1 + vcl/source/window/tabdlg.cxx | 3 +- vcl/source/window/taskpanelist.cxx | 19 +- vcl/source/window/toolbox.cxx | 9 +- vcl/source/window/window.cxx | 43 ++- vcl/source/window/window2.cxx | 34 +-- vcl/source/window/winproc.cxx | 14 +- vcl/unx/generic/app/i18n_status.cxx | 4 +- vcl/unx/generic/printer/cupsmgr.cxx | 22 +- vcl/workben/icontest.cxx | 5 +- vcl/workben/mtfdemo.cxx | 2 +- vcl/workben/vcldemo.cxx | 19 +- xmlsecurity/inc/xmlsecurity/certificatechooser.hxx | 6 +- xmlsecurity/inc/xmlsecurity/certificateviewer.hxx | 39 +-- .../inc/xmlsecurity/digitalsignaturesdialog.hxx | 36 +-- xmlsecurity/inc/xmlsecurity/macrosecurity.hxx | 40 +-- xmlsecurity/source/dialogs/certificatechooser.cxx | 4 +- xmlsecurity/source/dialogs/certificateviewer.cxx | 45 ++- .../source/dialogs/digitalsignaturesdialog.cxx | 17 +- xmlsecurity/source/dialogs/macrosecurity.cxx | 39 ++- 1576 files changed, 20932 insertions(+), 10073 deletions(-) (limited to 'sfx2/source/appl/newhelp.cxx') diff --git a/accessibility/inc/accessibility/extended/accessibleiconchoicectrlentry.hxx b/accessibility/inc/accessibility/extended/accessibleiconchoicectrlentry.hxx index 098c8e5d0d43..363a54450e52 100644 --- a/accessibility/inc/accessibility/extended/accessibleiconchoicectrlentry.hxx +++ b/accessibility/inc/accessibility/extended/accessibleiconchoicectrlentry.hxx @@ -35,6 +35,7 @@ #include #include #include +#include // forward @@ -63,7 +64,7 @@ namespace accessibility { private: /** The treelistbox control */ - SvtIconChoiceCtrl* m_pIconCtrl; + VclPtr m_pIconCtrl; sal_Int32 m_nIndex; protected: diff --git a/accessibility/inc/accessibility/extended/accessibletabbarbase.hxx b/accessibility/inc/accessibility/extended/accessibletabbarbase.hxx index 81401f177564..ed920c89399d 100644 --- a/accessibility/inc/accessibility/extended/accessibletabbarbase.hxx +++ b/accessibility/inc/accessibility/extended/accessibletabbarbase.hxx @@ -22,6 +22,7 @@ #include #include +#include class TabBar; class VCLExternalSolarLock; @@ -57,7 +58,7 @@ private: protected: VCLExternalSolarLock* m_pExternalLock; - TabBar* m_pTabBar; + VclPtr m_pTabBar; }; diff --git a/accessibility/inc/accessibility/extended/accessibletablistbox.hxx b/accessibility/inc/accessibility/extended/accessibletablistbox.hxx index e5e16809b038..f6e1d416bf30 100644 --- a/accessibility/inc/accessibility/extended/accessibletablistbox.hxx +++ b/accessibility/inc/accessibility/extended/accessibletablistbox.hxx @@ -43,7 +43,7 @@ class AccessibleTabListBox ,public ::svt::IAccessibleTabListBox { private: - SvHeaderTabListBox* m_pTabListBox; + VclPtr m_pTabListBox; public: /** ctor() diff --git a/accessibility/inc/accessibility/extended/accessibletablistboxtable.hxx b/accessibility/inc/accessibility/extended/accessibletablistboxtable.hxx index 92e6fe996706..89bfd7ef437c 100644 --- a/accessibility/inc/accessibility/extended/accessibletablistboxtable.hxx +++ b/accessibility/inc/accessibility/extended/accessibletablistboxtable.hxx @@ -37,7 +37,7 @@ typedef ::cppu::ImplHelper1< ::com::sun::star::accessibility::XAccessibleSelecti class AccessibleTabListBoxTable : public AccessibleBrowseBoxTable, public AccessibleTabListBoxTableImplHelper { private: - SvHeaderTabListBox* m_pTabListBox; + VclPtr m_pTabListBox; ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > m_xCurChild; diff --git a/accessibility/inc/accessibility/extended/listboxaccessible.hxx b/accessibility/inc/accessibility/extended/listboxaccessible.hxx index fc3bb245b2c4..4ce38c5090b6 100644 --- a/accessibility/inc/accessibility/extended/listboxaccessible.hxx +++ b/accessibility/inc/accessibility/extended/listboxaccessible.hxx @@ -22,6 +22,7 @@ #include #include +#include class SvTreeListBox; class VclSimpleEvent; @@ -41,7 +42,7 @@ namespace accessibility class ListBoxAccessibleBase { private: - SvTreeListBox* m_pWindow; + VclPtr m_pWindow; protected: inline SvTreeListBox* getListBox() const @@ -49,7 +50,7 @@ namespace accessibility return const_cast< ListBoxAccessibleBase* >( this )->m_pWindow; } - inline bool isAlive() const { return NULL != m_pWindow; } + inline bool isAlive() const { return nullptr != m_pWindow; } public: ListBoxAccessibleBase( SvTreeListBox& _rWindow ); diff --git a/accessibility/inc/accessibility/extended/textwindowaccessibility.hxx b/accessibility/inc/accessibility/extended/textwindowaccessibility.hxx index a24e8c94af77..2846113057a2 100644 --- a/accessibility/inc/accessibility/extended/textwindowaccessibility.hxx +++ b/accessibility/inc/accessibility/extended/textwindowaccessibility.hxx @@ -99,7 +99,7 @@ public: private: ::Link m_aListener; - vcl::Window * m_pNotifier; + VclPtr m_pNotifier; }; class ParagraphInfo diff --git a/accessibility/inc/accessibility/standard/vclxaccessiblemenubar.hxx b/accessibility/inc/accessibility/standard/vclxaccessiblemenubar.hxx index 2ca6def7ba42..b6dc89864fec 100644 --- a/accessibility/inc/accessibility/standard/vclxaccessiblemenubar.hxx +++ b/accessibility/inc/accessibility/standard/vclxaccessiblemenubar.hxx @@ -21,6 +21,7 @@ #define INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_STANDARD_VCLXACCESSIBLEMENUBAR_HXX #include +#include class VclSimpleEvent; class VclWindowEvent; @@ -34,7 +35,7 @@ namespace vcl { class Window; } class VCLXAccessibleMenuBar : public OAccessibleMenuComponent { protected: - vcl::Window* m_pWindow; + VclPtr m_pWindow; virtual bool IsFocused() SAL_OVERRIDE; diff --git a/accessibility/inc/accessibility/standard/vclxaccessiblestatusbar.hxx b/accessibility/inc/accessibility/standard/vclxaccessiblestatusbar.hxx index a07e4502c111..249f5cafa6ec 100644 --- a/accessibility/inc/accessibility/standard/vclxaccessiblestatusbar.hxx +++ b/accessibility/inc/accessibility/standard/vclxaccessiblestatusbar.hxx @@ -21,6 +21,7 @@ #define INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_STANDARD_VCLXACCESSIBLESTATUSBAR_HXX #include +#include #include @@ -36,7 +37,7 @@ private: typedef ::std::vector< ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > > AccessibleChildren; AccessibleChildren m_aAccessibleChildren; - StatusBar* m_pStatusBar; + VclPtr m_pStatusBar; protected: void UpdateShowing( sal_Int32 i, bool bShowing ); diff --git a/accessibility/inc/accessibility/standard/vclxaccessiblestatusbaritem.hxx b/accessibility/inc/accessibility/standard/vclxaccessiblestatusbaritem.hxx index f720374f3af5..0432abc9db7a 100644 --- a/accessibility/inc/accessibility/standard/vclxaccessiblestatusbaritem.hxx +++ b/accessibility/inc/accessibility/standard/vclxaccessiblestatusbaritem.hxx @@ -24,7 +24,7 @@ #include #include #include - +#include class StatusBar; class VCLExternalSolarLock; @@ -51,14 +51,14 @@ class VCLXAccessibleStatusBarItem : public AccessibleTextHelper_BASE, private: VCLExternalSolarLock* m_pExternalLock; - StatusBar* m_pStatusBar; + VclPtr m_pStatusBar; sal_uInt16 m_nItemId; OUString m_sItemName; OUString m_sItemText; - bool m_bShowing; + bool m_bShowing; protected: - bool IsShowing(); + bool IsShowing(); void SetShowing( bool bShowing ); void SetItemName( const OUString& sItemName ); OUString GetItemName(); diff --git a/accessibility/inc/accessibility/standard/vclxaccessibletabcontrol.hxx b/accessibility/inc/accessibility/standard/vclxaccessibletabcontrol.hxx index b4e7b54fd197..358213855df2 100644 --- a/accessibility/inc/accessibility/standard/vclxaccessibletabcontrol.hxx +++ b/accessibility/inc/accessibility/standard/vclxaccessibletabcontrol.hxx @@ -22,6 +22,7 @@ #include #include +#include #include @@ -42,7 +43,7 @@ private: typedef ::std::vector< ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > > AccessibleChildren; AccessibleChildren m_aAccessibleChildren; - TabControl* m_pTabControl; + VclPtr m_pTabControl; protected: void UpdateFocused(); diff --git a/accessibility/inc/accessibility/standard/vclxaccessibletabpage.hxx b/accessibility/inc/accessibility/standard/vclxaccessibletabpage.hxx index 182235a0ad12..8c0aa5dcac5b 100644 --- a/accessibility/inc/accessibility/standard/vclxaccessibletabpage.hxx +++ b/accessibility/inc/accessibility/standard/vclxaccessibletabpage.hxx @@ -24,6 +24,7 @@ #include #include #include +#include class TabControl; @@ -51,7 +52,7 @@ class VCLXAccessibleTabPage : public AccessibleTextHelper_BASE, private: VCLExternalSolarLock* m_pExternalLock; - TabControl* m_pTabControl; + VclPtr m_pTabControl; sal_uInt16 m_nPageId; bool m_bFocused; bool m_bSelected; diff --git a/accessibility/inc/accessibility/standard/vclxaccessibletabpagewindow.hxx b/accessibility/inc/accessibility/standard/vclxaccessibletabpagewindow.hxx index 0fb8f614bd0c..9393579b6883 100644 --- a/accessibility/inc/accessibility/standard/vclxaccessibletabpagewindow.hxx +++ b/accessibility/inc/accessibility/standard/vclxaccessibletabpagewindow.hxx @@ -21,6 +21,7 @@ #define INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_STANDARD_VCLXACCESSIBLETABPAGEWINDOW_HXX #include +#include class TabControl; @@ -34,8 +35,8 @@ class TabPage; class VCLXAccessibleTabPageWindow : public VCLXAccessibleComponent { private: - TabControl* m_pTabControl; - TabPage* m_pTabPage; + VclPtr m_pTabControl; + VclPtr m_pTabPage; sal_uInt16 m_nPageId; protected: diff --git a/accessibility/inc/accessibility/standard/vclxaccessibletoolboxitem.hxx b/accessibility/inc/accessibility/standard/vclxaccessibletoolboxitem.hxx index b7d3c15fd3f8..a05f31b89d1f 100644 --- a/accessibility/inc/accessibility/standard/vclxaccessibletoolboxitem.hxx +++ b/accessibility/inc/accessibility/standard/vclxaccessibletoolboxitem.hxx @@ -30,6 +30,7 @@ #include #include #include +#include class ToolBox; @@ -46,13 +47,13 @@ class VCLXAccessibleToolBoxItem : public AccessibleTextHelper_BASE, { private: OUString m_sOldName; - ToolBox* m_pToolBox; + VclPtr m_pToolBox; VCLExternalSolarLock* m_pExternalLock; sal_Int32 m_nIndexInParent; sal_Int16 m_nRole; - sal_uInt16 m_nItemId; - bool m_bHasFocus; - bool m_bIsChecked; + sal_uInt16 m_nItemId; + bool m_bHasFocus; + bool m_bIsChecked; bool m_bIndeterminate; ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > m_xChild; @@ -80,9 +81,9 @@ public: VCLXAccessibleToolBoxItem( ToolBox* _pToolBox, sal_Int32 _nPos ); void SetFocus( bool _bFocus ); - inline bool HasFocus() const { return m_bHasFocus; } + inline bool HasFocus() const { return m_bHasFocus; } void SetChecked( bool _bCheck ); - inline bool IsChecked() const { return m_bIsChecked; } + inline bool IsChecked() const { return m_bIsChecked; } void SetIndeterminate( bool _bIndeterminate ); inline bool IsIndeterminate() const { return m_bIndeterminate; } inline void ReleaseToolBox() { m_pToolBox = NULL; } diff --git a/accessibility/source/extended/AccessibleToolPanelDeck.cxx b/accessibility/source/extended/AccessibleToolPanelDeck.cxx index dfb8ede26120..4f69764bcf29 100644 --- a/accessibility/source/extended/AccessibleToolPanelDeck.cxx +++ b/accessibility/source/extended/AccessibleToolPanelDeck.cxx @@ -76,7 +76,7 @@ namespace accessibility ); void checkDisposed(); - bool isDisposed() const { return m_pPanelDeck == NULL; } + bool isDisposed() const { return m_pPanelDeck == nullptr; } void dispose(); virtual ~AccessibleToolPanelDeck_Impl(); @@ -95,7 +95,7 @@ namespace accessibility public: AccessibleToolPanelDeck& m_rAntiImpl; Reference< XAccessible > m_xAccessibleParent; - ::svt::ToolPanelDeck* m_pPanelDeck; + VclPtr<::svt::ToolPanelDeck> m_pPanelDeck; Reference< XAccessible > m_xActivePanelAccessible; }; @@ -141,7 +141,7 @@ namespace accessibility { ENSURE_OR_RETURN_VOID( !isDisposed(), "disposed twice" ); m_pPanelDeck->RemoveListener( *this ); - m_pPanelDeck = NULL; + m_pPanelDeck.clear(); m_xAccessibleParent.clear(); } diff --git a/accessibility/source/extended/AccessibleToolPanelDeckTabBar.cxx b/accessibility/source/extended/AccessibleToolPanelDeckTabBar.cxx index 757c45257c6e..1700aed946b1 100644 --- a/accessibility/source/extended/AccessibleToolPanelDeckTabBar.cxx +++ b/accessibility/source/extended/AccessibleToolPanelDeckTabBar.cxx @@ -120,7 +120,7 @@ namespace accessibility AccessibleToolPanelTabBar& m_rAntiImpl; Reference< XAccessible > m_xAccessibleParent; ::svt::IToolPanelDeck* m_pPanelDeck; - ::svt::PanelTabBar* m_pTabBar; + VclPtr<::svt::PanelTabBar> m_pTabBar; ::std::vector< Reference< XAccessible > > m_aChildren; }; @@ -163,7 +163,7 @@ namespace accessibility m_pTabBar->GetScrollButton( true ).RemoveEventListener( LINK( this, AccessibleToolPanelTabBar_Impl, OnWindowEvent ) ); m_pTabBar->GetScrollButton( false ).RemoveEventListener( LINK( this, AccessibleToolPanelTabBar_Impl, OnWindowEvent ) ); - m_pTabBar = NULL; + m_pTabBar.clear(); m_xAccessibleParent.clear(); } diff --git a/accessibility/source/extended/AccessibleToolPanelDeckTabBarItem.cxx b/accessibility/source/extended/AccessibleToolPanelDeckTabBarItem.cxx index 33bca93ae759..f89cb3d7f807 100644 --- a/accessibility/source/extended/AccessibleToolPanelDeckTabBarItem.cxx +++ b/accessibility/source/extended/AccessibleToolPanelDeckTabBarItem.cxx @@ -105,7 +105,7 @@ namespace accessibility AccessibleToolPanelDeckTabBarItem& m_rAntiImpl; Reference< XAccessible > m_xAccessibleParent; ::svt::IToolPanelDeck* m_pPanelDeck; - ::svt::PanelTabBar* m_pTabBar; + VclPtr<::svt::PanelTabBar> m_pTabBar; size_t m_nItemPos; }; @@ -139,7 +139,7 @@ namespace accessibility m_xAccessibleParent.clear(); m_pPanelDeck->RemoveListener( *this ); m_pPanelDeck = NULL; - m_pTabBar = NULL; + m_pTabBar.clear(); } Reference< XAccessibleComponent > AccessibleToolPanelDeckTabBarItem_Impl::getParentAccessibleComponent() const diff --git a/accessibility/source/extended/accessibleiconchoicectrlentry.cxx b/accessibility/source/extended/accessibleiconchoicectrlentry.cxx index a24d05bc9135..794524017735 100644 --- a/accessibility/source/extended/accessibleiconchoicectrlentry.cxx +++ b/accessibility/source/extended/accessibleiconchoicectrlentry.cxx @@ -91,7 +91,7 @@ throw(RuntimeException, std::exception) if ( _rSource.Source == m_xParent ) { dispose(); - OSL_ENSURE( !m_xParent.is() && ( NULL == m_pIconCtrl ), "" ); + OSL_ENSURE( !m_xParent.is() && ( nullptr == m_pIconCtrl ), "" ); } } diff --git a/accessibility/source/extended/textwindowaccessibility.cxx b/accessibility/source/extended/textwindowaccessibility.cxx index 2dd16ace0380..fbe72a0e9d07 100644 --- a/accessibility/source/extended/textwindowaccessibility.cxx +++ b/accessibility/source/extended/textwindowaccessibility.cxx @@ -47,17 +47,17 @@ void SfxListenerGuard::endListening() void WindowListenerGuard::startListening(vcl::Window & rNotifier) { - OSL_ENSURE(m_pNotifier == 0, "called more than once"); + OSL_ENSURE(m_pNotifier == nullptr, "called more than once"); m_pNotifier = &rNotifier; m_pNotifier->AddEventListener(m_aListener); } void WindowListenerGuard::endListening() { - if (m_pNotifier != 0) + if (m_pNotifier) { m_pNotifier->RemoveEventListener(m_aListener); - m_pNotifier = 0; + m_pNotifier = nullptr; } } diff --git a/accessibility/source/standard/vclxaccessibleradiobutton.cxx b/accessibility/source/standard/vclxaccessibleradiobutton.cxx index baabdd5555f1..c76babf32697 100644 --- a/accessibility/source/standard/vclxaccessibleradiobutton.cxx +++ b/accessibility/source/standard/vclxaccessibleradiobutton.cxx @@ -93,13 +93,13 @@ void VCLXAccessibleRadioButton::FillAccessibleRelationSet( utl::AccessibleRelati RadioButton* pRadioButton = dynamic_cast< RadioButton* >( GetWindow() ); if ( pRadioButton ) { - ::std::vector< RadioButton* > aGroup(pRadioButton->GetRadioButtonGroup(true)); + ::std::vector< VclPtr > aGroup(pRadioButton->GetRadioButtonGroup(true)); if (!aGroup.empty()) { sal_Int32 i = 0; Sequence< Reference< XInterface > > aSequence( static_cast< sal_Int32 >( aGroup.size() ) ); - ::std::vector< RadioButton* >::const_iterator aEndItr = aGroup.end(); - for ( ::std::vector< RadioButton* >::const_iterator aItr = aGroup.begin(); aItr < aEndItr; ++aItr ) + auto aEndItr = aGroup.end(); + for ( auto aItr = aGroup.begin(); aItr < aEndItr; ++aItr ) { aSequence[i++] = (*aItr)->GetAccessible(); } diff --git a/accessibility/source/standard/vclxaccessibletabpagewindow.cxx b/accessibility/source/standard/vclxaccessibletabpagewindow.cxx index 6b43aa3d4b2c..d8d47320f9c9 100644 --- a/accessibility/source/standard/vclxaccessibletabpagewindow.cxx +++ b/accessibility/source/standard/vclxaccessibletabpagewindow.cxx @@ -50,7 +50,7 @@ VCLXAccessibleTabPageWindow::VCLXAccessibleTabPageWindow( VCLXWindow* pVCLXWindo for ( sal_uInt16 i = 0, nCount = m_pTabControl->GetPageCount(); i < nCount; ++i ) { sal_uInt16 nPageId = m_pTabControl->GetPageId( i ); - if ( m_pTabControl->GetTabPage( nPageId ) == m_pTabPage ) + if ( m_pTabControl->GetTabPage( nPageId ) == m_pTabPage.get() ) m_nPageId = nPageId; } } diff --git a/avmedia/inc/mediacontrol.hxx b/avmedia/inc/mediacontrol.hxx index 9a1933b7e0a8..b24e1a590ee7 100644 --- a/avmedia/inc/mediacontrol.hxx +++ b/avmedia/inc/mediacontrol.hxx @@ -95,7 +95,7 @@ private: VclPtr maMuteToolBox; VclPtr maVolumeSlider; VclPtr maZoomToolBox; - ListBox* mpZoomListBox; + VclPtr mpZoomListBox; VclPtr maTimeEdit; Size maMinSize; MediaControlStyle meControlStyle; diff --git a/avmedia/source/framework/mediacontrol.cxx b/avmedia/source/framework/mediacontrol.cxx index 617bbc340e08..24defd8d3141 100644 --- a/avmedia/source/framework/mediacontrol.cxx +++ b/avmedia/source/framework/mediacontrol.cxx @@ -202,8 +202,7 @@ MediaControl::~MediaControl() void MediaControl::dispose() { maZoomToolBox->SetItemWindow( AVMEDIA_TOOLBOXITEM_ZOOM, NULL ); - delete mpZoomListBox; - mpZoomListBox = NULL; + mpZoomListBox.clear(); maTimeEdit.disposeAndClear(); maZoomToolBox.disposeAndClear(); maVolumeSlider.disposeAndClear(); diff --git a/avmedia/source/framework/mediaplayer.cxx b/avmedia/source/framework/mediaplayer.cxx index f9dee9a3bf16..deccd8f17ea4 100644 --- a/avmedia/source/framework/mediaplayer.cxx +++ b/avmedia/source/framework/mediaplayer.cxx @@ -42,7 +42,7 @@ MediaPlayer::MediaPlayer( vcl::Window* _pParent, sal_uInt16 nId, SfxBindings* _p { pWindow = new MediaFloater( _pBindings, this, _pParent ); eChildAlignment = SfxChildAlignment::NOALIGNMENT; - static_cast< MediaFloater* >( pWindow )->Initialize( pInfo ); + static_cast< MediaFloater* >( pWindow.get() )->Initialize( pInfo ); }; diff --git a/avmedia/source/viewer/mediaevent_impl.cxx b/avmedia/source/viewer/mediaevent_impl.cxx index 86e18175101c..3e42ebb223b4 100644 --- a/avmedia/source/viewer/mediaevent_impl.cxx +++ b/avmedia/source/viewer/mediaevent_impl.cxx @@ -45,7 +45,7 @@ MediaEventListenersImpl::~MediaEventListenersImpl() void MediaEventListenersImpl::cleanUp() { - Application::RemoveMouseAndKeyEvents( reinterpret_cast< vcl::Window* >( mpNotifyWindow ) ); + Application::RemoveMouseAndKeyEvents( reinterpret_cast< vcl::Window* >( mpNotifyWindow.get() ) ); mpNotifyWindow = NULL; } @@ -72,7 +72,7 @@ void SAL_CALL MediaEventListenersImpl::keyPressed( const ::com::sun::star::awt:: ( ( e.Modifiers & 4 ) ? KEY_MOD2 : 0 ) ); KeyEvent aVCLKeyEvt( e.KeyChar, aVCLKeyCode ); - Application::PostKeyEvent( VCLEVENT_WINDOW_KEYINPUT, reinterpret_cast< vcl::Window* >( mpNotifyWindow ), &aVCLKeyEvt ); + Application::PostKeyEvent( VCLEVENT_WINDOW_KEYINPUT, reinterpret_cast< vcl::Window* >( mpNotifyWindow.get() ), &aVCLKeyEvt ); } } @@ -91,7 +91,7 @@ void SAL_CALL MediaEventListenersImpl::keyReleased( const ::com::sun::star::awt: ( ( e.Modifiers & 2 ) ? KEY_MOD1 : 0 ) | ( ( e.Modifiers & 4 ) ? KEY_MOD2 : 0 ) ); KeyEvent aVCLKeyEvt( e.KeyChar, aVCLKeyCode ); - Application::PostKeyEvent( VCLEVENT_WINDOW_KEYUP, reinterpret_cast< vcl::Window* >( mpNotifyWindow ), &aVCLKeyEvt ); + Application::PostKeyEvent( VCLEVENT_WINDOW_KEYUP, reinterpret_cast< vcl::Window* >( mpNotifyWindow.get() ), &aVCLKeyEvt ); } } @@ -112,7 +112,7 @@ void SAL_CALL MediaEventListenersImpl::mousePressed( const ::com::sun::star::awt ( ( e.Buttons & 2 ) ? MOUSE_RIGHT : 0 ) | ( ( e.Buttons & 4 ) ? MOUSE_MIDDLE : 0 ), e.Modifiers ); - Application::PostMouseEvent( VCLEVENT_WINDOW_MOUSEBUTTONDOWN, reinterpret_cast< vcl::Window* >( mpNotifyWindow ), &aVCLMouseEvt ); + Application::PostMouseEvent( VCLEVENT_WINDOW_MOUSEBUTTONDOWN, reinterpret_cast< vcl::Window* >( mpNotifyWindow.get() ), &aVCLMouseEvt ); } } @@ -133,7 +133,7 @@ void SAL_CALL MediaEventListenersImpl::mouseReleased( const ::com::sun::star::aw ( ( e.Buttons & 2 ) ? MOUSE_RIGHT : 0 ) | ( ( e.Buttons & 4 ) ? MOUSE_MIDDLE : 0 ), e.Modifiers ); - Application::PostMouseEvent( VCLEVENT_WINDOW_MOUSEBUTTONUP, reinterpret_cast< vcl::Window* >( mpNotifyWindow ), &aVCLMouseEvt ); + Application::PostMouseEvent( VCLEVENT_WINDOW_MOUSEBUTTONUP, reinterpret_cast< vcl::Window* >( mpNotifyWindow.get() ), &aVCLMouseEvt ); } } @@ -174,7 +174,7 @@ void SAL_CALL MediaEventListenersImpl::mouseDragged( const ::com::sun::star::awt if( mpNotifyWindow ) { MouseEvent aVCLMouseEvt( Point( e.X, e.Y ), 0, MouseEventModifiers::NONE, e.Buttons, e.Modifiers ); - Application::PostMouseEvent( VCLEVENT_WINDOW_MOUSEMOVE, reinterpret_cast< vcl::Window* >( mpNotifyWindow ), &aVCLMouseEvt ); + Application::PostMouseEvent( VCLEVENT_WINDOW_MOUSEMOVE, reinterpret_cast< vcl::Window* >( mpNotifyWindow.get() ), &aVCLMouseEvt ); } } @@ -189,7 +189,7 @@ void SAL_CALL MediaEventListenersImpl::mouseMoved( const ::com::sun::star::awt:: if( mpNotifyWindow ) { MouseEvent aVCLMouseEvt( Point( e.X, e.Y ), 0, MouseEventModifiers::NONE, e.Buttons, e.Modifiers ); - Application::PostMouseEvent( VCLEVENT_WINDOW_MOUSEMOVE, reinterpret_cast< vcl::Window* >( mpNotifyWindow ), &aVCLMouseEvt ); + Application::PostMouseEvent( VCLEVENT_WINDOW_MOUSEMOVE, reinterpret_cast< vcl::Window* >( mpNotifyWindow.get() ), &aVCLMouseEvt ); } } diff --git a/avmedia/source/viewer/mediaevent_impl.hxx b/avmedia/source/viewer/mediaevent_impl.hxx index 63e1a0d77ba2..27676c749d84 100644 --- a/avmedia/source/viewer/mediaevent_impl.hxx +++ b/avmedia/source/viewer/mediaevent_impl.hxx @@ -26,6 +26,7 @@ #include #include #include +#include namespace avmedia { @@ -69,7 +70,7 @@ namespace avmedia private: - vcl::Window* mpNotifyWindow; + VclPtr mpNotifyWindow; mutable ::osl::Mutex maMutex; }; } diff --git a/avmedia/source/viewer/mediawindow_impl.cxx b/avmedia/source/viewer/mediawindow_impl.cxx index b2716eebf5cc..c43f6829955d 100644 --- a/avmedia/source/viewer/mediawindow_impl.cxx +++ b/avmedia/source/viewer/mediawindow_impl.cxx @@ -204,8 +204,7 @@ void MediaWindowImpl::dispose() mpEmptyBmpEx = NULL; delete mpAudioBmpEx; mpAudioBmpEx = NULL; - delete mpMediaWindowControl; - mpMediaWindowControl = NULL; + mpMediaWindowControl.clear(); Control::dispose(); } diff --git a/avmedia/source/viewer/mediawindow_impl.hxx b/avmedia/source/viewer/mediawindow_impl.hxx index 1311a2b4855f..40131c3c6fe2 100644 --- a/avmedia/source/viewer/mediawindow_impl.hxx +++ b/avmedia/source/viewer/mediawindow_impl.hxx @@ -173,7 +173,7 @@ namespace avmedia MediaEventListenersImpl* mpEvents; bool mbEventTransparent; std::unique_ptr mpChildWindow; - MediaWindowControl* mpMediaWindowControl; + VclPtr mpMediaWindowControl; BitmapEx* mpEmptyBmpEx; BitmapEx* mpAudioBmpEx; }; diff --git a/basctl/source/basicide/basicrenderable.hxx b/basctl/source/basicide/basicrenderable.hxx index f91a5ef8a9d3..db96dfc66ea5 100644 --- a/basctl/source/basicide/basicrenderable.hxx +++ b/basctl/source/basicide/basicrenderable.hxx @@ -33,7 +33,7 @@ class Renderable : public cppu::WeakComponentImplHelper1< com::sun::star::view::XRenderable >, public vcl::PrinterOptionsHelper { - BaseWindow* mpWindow; + VclPtr mpWindow; osl::Mutex maMutex; Printer* getPrinter(); diff --git a/basctl/source/basicide/baside2.cxx b/basctl/source/basicide/baside2.cxx index 9b4837673dbe..33ddae459da9 100644 --- a/basctl/source/basicide/baside2.cxx +++ b/basctl/source/basicide/baside2.cxx @@ -1484,6 +1484,7 @@ void ModulWindowLayout::dispose() { aWatchWindow.disposeAndClear(); aStackWindow.disposeAndClear(); + pChild.clear(); Layout::dispose(); } diff --git a/basctl/source/basicide/baside2.hxx b/basctl/source/basicide/baside2.hxx index 48874b01c69b..addef49f60a9 100644 --- a/basctl/source/basicide/baside2.hxx +++ b/basctl/source/basicide/baside2.hxx @@ -445,7 +445,7 @@ protected: private: // main child window - ModulWindow* pChild; + VclPtr pChild; // dockable windows VclPtr aWatchWindow; VclPtr aStackWindow; @@ -475,7 +475,7 @@ private: // the configuration svtools::ColorConfig aConfig; // the active editor - EditorWindow* pEditor; + VclPtr pEditor; } aSyntaxColors; }; @@ -489,7 +489,7 @@ private: /* a buffer to build up function name when typing * a function name, used for showing/hiding listbox values * */ - CodeCompleteWindow* pCodeCompleteWindow; // parent window + VclPtr pCodeCompleteWindow; // parent window void SetMatchingEntries(); // sets the visible entries based on aFuncBuffer variable void HideAndRestoreFocus(); @@ -497,6 +497,8 @@ private: public: CodeCompleteListBox( CodeCompleteWindow* pPar ); + virtual ~CodeCompleteListBox(); + virtual void dispose() SAL_OVERRIDE; void InsertSelectedEntry(); //insert the selected entry DECL_LINK(ImplDoubleClickHdl, void*); @@ -510,9 +512,9 @@ class CodeCompleteWindow: public vcl::Window { friend class CodeCompleteListBox; private: - EditorWindow* pParent; // parent window + VclPtr pParent; // parent window TextSelection aTextSelection; - CodeCompleteListBox* pListBox; + VclPtr pListBox; void InitListBox(); // initialize the ListBox diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx index 4afce39c3dfc..f405491cce56 100644 --- a/basctl/source/basicide/baside2b.cxx +++ b/basctl/source/basicide/baside2b.cxx @@ -2685,6 +2685,17 @@ pCodeCompleteWindow( pPar ) SetSelectHdl(LINK(this, CodeCompleteListBox, ImplSelectHdl)); } +CodeCompleteListBox::~CodeCompleteListBox() +{ + dispose(); +} + +void CodeCompleteListBox::dispose() +{ + pCodeCompleteWindow.clear(); + ListBox::dispose(); +} + IMPL_LINK_NOARG(CodeCompleteListBox, ImplDoubleClickHdl) { InsertSelectedEntry(); @@ -2863,8 +2874,8 @@ CodeCompleteWindow::~CodeCompleteWindow() void CodeCompleteWindow::dispose() { - delete pListBox; - pListBox = NULL; + pListBox.clear(); + pParent.clear(); vcl::Window::dispose(); } diff --git a/basctl/source/basicide/baside3.cxx b/basctl/source/basicide/baside3.cxx index a85d0e0fd67f..4c08dcbb770e 100644 --- a/basctl/source/basicide/baside3.cxx +++ b/basctl/source/basicide/baside3.cxx @@ -1413,12 +1413,12 @@ DialogWindowLayout::~DialogWindowLayout() void DialogWindowLayout::dispose() { - if (pPropertyBrowser != 0) + if (pPropertyBrowser) { Remove(pPropertyBrowser); - delete pPropertyBrowser; - pPropertyBrowser = 0; } + pPropertyBrowser.clear(); + pChild.clear(); Layout::dispose(); } diff --git a/basctl/source/basicide/basides1.cxx b/basctl/source/basicide/basides1.cxx index c6374bf8e43d..c9aaa23447c7 100644 --- a/basctl/source/basicide/basides1.cxx +++ b/basctl/source/basicide/basides1.cxx @@ -126,7 +126,7 @@ void Shell::ExecuteCurrent( SfxRequest& rReq ) break; if (it != aWindowTable.end()) ++it; - BaseWindow* pWin = it != aWindowTable.end() ? it->second : 0; + BaseWindow* pWin = it != aWindowTable.end() ? it->second.get() : 0; bool bSearchedFromStart = false; while ( !nFound && !bCanceled && ( pWin || !bSearchedFromStart ) ) @@ -166,7 +166,7 @@ void Shell::ExecuteCurrent( SfxRequest& rReq ) { if ( it != aWindowTable.end() ) ++it; - pWin = it != aWindowTable.end() ? it->second : 0; + pWin = it != aWindowTable.end() ? it->second.get() : 0; } else pWin = 0; @@ -202,7 +202,7 @@ void Shell::ExecuteGlobal( SfxRequest& rReq ) case SID_BASICSTOP: { // maybe do not simply stop if on breakpoint! - if (ModulWindow* pMCurWin = dynamic_cast(pCurWin)) + if (ModulWindow* pMCurWin = dynamic_cast(pCurWin.get())) pMCurWin->BasicStop(); StopBasic(); } @@ -769,7 +769,7 @@ void Shell::GetState(SfxItemSet &rSet) case SID_BASICSAVEAS: case SID_BASICIDE_MATCHGROUP: { - if (!dynamic_cast(pCurWin)) + if (!dynamic_cast(pCurWin.get())) rSet.DisableItem( nWh ); else if ( ( nWh == SID_BASICLOAD ) && ( StarBASIC::IsRunning() || ( pCurWin && pCurWin->IsReadOnly() ) ) ) rSet.DisableItem( nWh ); @@ -782,7 +782,7 @@ void Shell::GetState(SfxItemSet &rSet) case SID_BASICIDE_TOGGLEBRKPNT: case SID_BASICIDE_MANAGEBRKPNTS: { - if (ModulWindow* pMCurWin = dynamic_cast(pCurWin)) + if (ModulWindow* pMCurWin = dynamic_cast(pCurWin.get())) { if (StarBASIC::IsRunning() && !pMCurWin->GetBasicStatus().bIsInReschedule) rSet.DisableItem(nWh); @@ -793,7 +793,7 @@ void Shell::GetState(SfxItemSet &rSet) break; case SID_BASICCOMPILE: { - if (StarBASIC::IsRunning() || !dynamic_cast(pCurWin)) + if (StarBASIC::IsRunning() || !dynamic_cast(pCurWin.get())) rSet.DisableItem( nWh ); } break; @@ -814,7 +814,7 @@ void Shell::GetState(SfxItemSet &rSet) case SID_INSERT_FORM_HSCROLL: case SID_INSERT_FORM_SPIN: { - if (!dynamic_cast(pCurWin)) + if (!dynamic_cast(pCurWin.get())) rSet.DisableItem( nWh ); } break; @@ -945,7 +945,7 @@ void Shell::GetState(SfxItemSet &rSet) // if this is not a module window hide the // setting, doesn't make sense for example if the // dialog editor is open - if (pCurWin && !dynamic_cast(pCurWin)) + if (pCurWin && !dynamic_cast(pCurWin.get())) { rSet.DisableItem( nWh ); rSet.Put(SfxVisibilityItem(nWh, false)); @@ -968,7 +968,7 @@ bool Shell::HasUIFeature( sal_uInt32 nFeature ) if ( (nFeature & BASICIDE_UI_FEATURE_SHOW_BROWSER) == BASICIDE_UI_FEATURE_SHOW_BROWSER ) { // fade out (in) property browser in module (dialog) windows - if (dynamic_cast(pCurWin) && !pCurWin->IsReadOnly()) + if (dynamic_cast(pCurWin.get()) && !pCurWin->IsReadOnly()) bResult = true; } @@ -1035,7 +1035,7 @@ void Shell::SetCurWindow( BaseWindow* pNewWin, bool bUpdateTabBar, bool bRemembe aObjectCatalog->SetCurrentEntry(pCurWin); SetUndoManager( pCurWin ? pCurWin->GetUndoManager() : 0 ); InvalidateBasicIDESlots(); - EnableScrollbars(pCurWin != 0); + EnableScrollbars(pCurWin != nullptr); if ( m_pCurLocalizationMgr ) m_pCurLocalizationMgr->handleTranslationbar(); @@ -1067,7 +1067,7 @@ void Shell::ManageToolbars() if ( xLayoutManager.is() ) { xLayoutManager->lock(); - if (dynamic_cast(pCurWin)) + if (dynamic_cast(pCurWin.get())) { xLayoutManager->destroyElement( aMacroBarResName ); @@ -1213,7 +1213,7 @@ void Shell::AdjustPosSizePixel( const Point &rPos, const Size &rSize ) } if (pLayout) - pLayout->SetPosSizePixel(rPos, dynamic_cast(pCurWin) ? aSz : aOutSz); + pLayout->SetPosSizePixel(rPos, dynamic_cast(pCurWin.get()) ? aSz : aOutSz); } Reference< XModel > Shell::GetCurrentDocument() const @@ -1230,7 +1230,7 @@ void Shell::Activate( bool bMDI ) if ( bMDI ) { - if (DialogWindow* pDCurWin = dynamic_cast(pCurWin)) + if (DialogWindow* pDCurWin = dynamic_cast(pCurWin.get())) pDCurWin->UpdateBrowser(); } } @@ -1241,7 +1241,7 @@ void Shell::Deactivate( bool bMDI ) // deactivate due to a MessageBox bMDI is false if ( bMDI ) { - if (DialogWindow* pXDlgWin = dynamic_cast(pCurWin)) + if (DialogWindow* pXDlgWin = dynamic_cast(pCurWin.get())) { pXDlgWin->DisableBrowser(); if( pXDlgWin->IsModified() ) diff --git a/basctl/source/basicide/basides2.cxx b/basctl/source/basicide/basides2.cxx index 70cda63abde1..3e88d55a9e98 100644 --- a/basctl/source/basicide/basides2.cxx +++ b/basctl/source/basicide/basides2.cxx @@ -44,7 +44,7 @@ Reference< view::XRenderable > Shell::GetRenderable() bool Shell::HasSelection( bool /* bText */ ) const { - if (ModulWindow* pMCurWin = dynamic_cast(pCurWin)) + if (ModulWindow* pMCurWin = dynamic_cast(pCurWin.get())) { TextView* pEditView = pMCurWin->GetEditView(); if ( pEditView && pEditView->HasSelection() ) @@ -56,7 +56,7 @@ bool Shell::HasSelection( bool /* bText */ ) const OUString Shell::GetSelectionText( bool bWholeWord ) { OUString aText; - if (ModulWindow* pMCurWin = dynamic_cast(pCurWin)) + if (ModulWindow* pMCurWin = dynamic_cast(pCurWin.get())) { if (TextView* pEditView = pMCurWin->GetEditView()) { @@ -220,14 +220,14 @@ void Shell::Move() void Shell::ShowCursor( bool bOn ) { - if (ModulWindow* pMCurWin = dynamic_cast(pCurWin)) + if (ModulWindow* pMCurWin = dynamic_cast(pCurWin.get())) pMCurWin->ShowCursor(bOn); } // only if basic window above: void Shell::ExecuteBasic( SfxRequest& rReq ) { - if (dynamic_cast(pCurWin)) + if (dynamic_cast(pCurWin.get())) { pCurWin->ExecuteCommand( rReq ); if (nShellCount) diff --git a/basctl/source/basicide/basides3.cxx b/basctl/source/basicide/basides3.cxx index 8112a1790d5c..5b2f93d3beca 100644 --- a/basctl/source/basicide/basides3.cxx +++ b/basctl/source/basicide/basides3.cxx @@ -128,7 +128,7 @@ sal_uInt16 Shell::GetWindowId(const BaseWindow* pWin) const SdrView* Shell::GetCurDlgView() const { - if (DialogWindow* pDCurWin = dynamic_cast(pCurWin)) + if (DialogWindow* pDCurWin = dynamic_cast(pCurWin.get())) return &pDCurWin->GetView(); else return 0; @@ -137,7 +137,7 @@ SdrView* Shell::GetCurDlgView() const // only if dialogue window above: void Shell::ExecuteDialog( SfxRequest& rReq ) { - if (pCurWin && (dynamic_cast(pCurWin) || rReq.GetSlot() == SID_IMPORT_DIALOG)) + if (pCurWin && (dynamic_cast(pCurWin.get()) || rReq.GetSlot() == SID_IMPORT_DIALOG)) pCurWin->ExecuteCommand(rReq); } diff --git a/basctl/source/basicide/basidesh.cxx b/basctl/source/basicide/basidesh.cxx index bf9af424fe6f..e1d92e1e88b2 100644 --- a/basctl/source/basicide/basidesh.cxx +++ b/basctl/source/basicide/basidesh.cxx @@ -232,11 +232,8 @@ Shell::~Shell() SetWindow( 0 ); SetCurWindow( 0 ); - for (WindowTableIt it = aWindowTable.begin(); it != aWindowTable.end(); ++it) - { - // no store; does already happen when the BasicManagers are destroyed - delete it->second; - } + // no store; does already happen when the BasicManagers are destroyed + aWindowTable.clear(); // Destroy all ContainerListeners for Basic Container. if (ContainerListenerImpl* pListener = static_cast(m_xLibListener.get())) @@ -255,7 +252,10 @@ void Shell::onDocumentCreated( const ScriptDocument& /*_rDocument*/ ) // for VBA documents, show a warning that we can save them only in ODF if (pCurWin->GetDocument().isInVBAMode()) - GetViewFrame()->AppendInfoBar("vba_save", IDE_RESSTR(RID_STR_CANNOTSAVEVBA)); + { + std::vector< VclPtr > aButtons; + GetViewFrame()->AppendInfoBar("vba_save", IDE_RESSTR(RID_STR_CANNOTSAVEVBA), aButtons); + } } UpdateWindows(); diff --git a/basctl/source/basicide/bastypes.cxx b/basctl/source/basicide/bastypes.cxx index 3a6be366accc..7e0bfeafe149 100644 --- a/basctl/source/basicide/bastypes.cxx +++ b/basctl/source/basicide/bastypes.cxx @@ -64,6 +64,8 @@ void BaseWindow::dispose() pShellVScrollBar->SetScrollHdl( Link() ); if ( pShellHScrollBar ) pShellHScrollBar->SetScrollHdl( Link() ); + pShellVScrollBar.clear(); + pShellHScrollBar.clear(); vcl::Window::dispose(); } @@ -279,6 +281,17 @@ DockingWindow::DockingWindow (Layout* pParent) : nShowCount(0) { } +DockingWindow::~DockingWindow() +{ + dispose(); +} + +void DockingWindow::dispose() +{ + pLayout.clear(); + ::DockingWindow::dispose(); +} + // Sets the position and the size of the docking window. This property is saved // when the window is floating. Called by Layout. void DockingWindow::ResizeIfDocking (Point const& rPos, Size const& rSize) @@ -526,7 +539,7 @@ void TabBar::Command( const CommandEvent& rCEvt ) { Shell::WindowTable& aWindowTable = pShell->GetWindowTable(); Shell::WindowTableIt it = aWindowTable.find( GetCurPageId() ); - if (it != aWindowTable.end() && dynamic_cast(it->second)) + if (it != aWindowTable.end() && dynamic_cast(it->second.get())) { SbModule* pActiveModule = pBasic->FindModule( it->second->GetName() ); if( pActiveModule && ( pActiveModule->GetModuleType() == script::ModuleType::DOCUMENT ) ) diff --git a/basctl/source/basicide/brkdlg.cxx b/basctl/source/basicide/brkdlg.cxx index b5b2ef17d9dc..321f68bd9a9d 100644 --- a/basctl/source/basicide/brkdlg.cxx +++ b/basctl/source/basicide/brkdlg.cxx @@ -106,6 +106,21 @@ BreakPointDialog::BreakPointDialog( vcl::Window* pParent, BreakPointList& rBrkPn CheckButtons(); } +BreakPointDialog::~BreakPointDialog() +{ + dispose(); +} + +void BreakPointDialog::dispose() +{ + m_pComboBox.clear(); + m_pOKButton.clear(); + m_pNewButton.clear(); + m_pDelButton.clear(); + m_pNumericField.clear(); + ModalDialog::dispose(); +} + void BreakPointDialog::SetCurrentBreakPoint( BreakPoint* pBrk ) { OUString aStr( "# " + OUString::number(pBrk->nLine) ); diff --git a/basctl/source/basicide/brkdlg.hxx b/basctl/source/basicide/brkdlg.hxx index 703744efd345..5c78e7ce6674 100644 --- a/basctl/source/basicide/brkdlg.hxx +++ b/basctl/source/basicide/brkdlg.hxx @@ -31,12 +31,12 @@ namespace basctl class BreakPointDialog : public ModalDialog { private: - ComboBox* m_pComboBox; - OKButton* m_pOKButton; - PushButton* m_pNewButton; - PushButton* m_pDelButton; - ::CheckBox* m_pCheckBox; - NumericField* m_pNumericField; + VclPtr m_pComboBox; + VclPtr m_pOKButton; + VclPtr m_pNewButton; + VclPtr m_pDelButton; + ::VclPtr m_pCheckBox; + VclPtr m_pNumericField; BreakPointList & m_rOriginalBreakPointList; BreakPointList m_aModifiedBreakPointList; @@ -53,6 +53,8 @@ protected: public: BreakPointDialog( vcl::Window* pParent, BreakPointList& rBrkList ); + virtual ~BreakPointDialog(); + virtual void dispose() SAL_OVERRIDE; void SetCurrentBreakPoint( BreakPoint* pBrk ); }; diff --git a/basctl/source/basicide/layout.cxx b/basctl/source/basicide/layout.cxx index 58db3a74dbb1..14a3b54af1a0 100644 --- a/basctl/source/basicide/layout.cxx +++ b/basctl/source/basicide/layout.cxx @@ -53,6 +53,17 @@ Layout::Layout (vcl::Window* pParent) : SetFont(aFont); } +Layout::~Layout() +{ + dispose(); +} + +void Layout::dispose() +{ + pChild.clear(); + Window::dispose(); +} + // removes a docking window void Layout::Remove (DockingWindow* pWin) { diff --git a/basctl/source/basicide/layout.hxx b/basctl/source/basicide/layout.hxx index 56e69a2f28f9..ad19ad93e5f1 100644 --- a/basctl/source/basicide/layout.hxx +++ b/basctl/source/basicide/layout.hxx @@ -50,6 +50,9 @@ public: virtual void GetState (SfxItemSet&, unsigned nWhich) = 0; virtual void UpdateDebug (bool bBasicStopped ) = 0; + virtual ~Layout(); + virtual void dispose() SAL_OVERRIDE; + protected: Layout (vcl::Window* pParent); @@ -67,7 +70,7 @@ protected: private: // the main child window (either ModulWindow or DialogWindow) - BaseWindow* pChild; + VclPtr pChild; // when this window has at first (nonempty) size bool bFirstSize; @@ -101,7 +104,7 @@ private: struct Item { // pointer to the dockable window - DockingWindow* pWin; + VclPtr pWin; // starting and ending position in the strip // They may be different from the actual window position, because // the window may fill the space of the adjacent currently diff --git a/basctl/source/basicide/linenumberwindow.cxx b/basctl/source/basicide/linenumberwindow.cxx index e3b49bf2dc39..97c1fd9e9b77 100644 --- a/basctl/source/basicide/linenumberwindow.cxx +++ b/basctl/source/basicide/linenumberwindow.cxx @@ -25,6 +25,17 @@ LineNumberWindow::LineNumberWindow (vcl::Window* pParent, ModulWindow* pModulWin m_nWidth = m_nBaseWidth * 3 + m_nBaseWidth / 2; } +LineNumberWindow::~LineNumberWindow() +{ + dispose(); +} + +void LineNumberWindow::dispose() +{ + m_pModulWindow.clear(); + Window::dispose(); +} + void LineNumberWindow::Paint( const Rectangle& ) { if(SyncYOffset()) diff --git a/basctl/source/basicide/linenumberwindow.hxx b/basctl/source/basicide/linenumberwindow.hxx index 6a6bcd201714..65498937eda8 100644 --- a/basctl/source/basicide/linenumberwindow.hxx +++ b/basctl/source/basicide/linenumberwindow.hxx @@ -19,7 +19,7 @@ class ModulWindow; class LineNumberWindow : public vcl::Window { private: - ModulWindow* m_pModulWindow; + VclPtr m_pModulWindow; int m_nWidth; long m_nCurYOffset; int m_nBaseWidth; @@ -30,6 +30,8 @@ protected: public: LineNumberWindow (vcl::Window* pParent, ModulWindow* pModulWin); + virtual ~LineNumberWindow(); + virtual void dispose() SAL_OVERRIDE; void DoScroll( long nHorzScroll, long nVertScroll ); diff --git a/basctl/source/basicide/macrodlg.cxx b/basctl/source/basicide/macrodlg.cxx index 31d8bccecd19..104d3650ac96 100644 --- a/basctl/source/basicide/macrodlg.cxx +++ b/basctl/source/basicide/macrodlg.cxx @@ -122,6 +122,20 @@ void MacroChooser::dispose() SfxGetpApp()->SaveBasicAndDialogContainer(); bForceStoreBasic = false; } + m_pMacroNameEdit.clear(); + m_pMacroFromTxT.clear(); + m_pMacrosSaveInTxt.clear(); + m_pBasicBox.clear(); + m_pMacrosInTxt.clear(); + m_pMacroBox.clear(); + m_pRunButton.clear(); + m_pCloseButton.clear(); + m_pAssignButton.clear(); + m_pEditButton.clear(); + m_pDelButton.clear(); + m_pOrganizeButton.clear(); + m_pNewLibButton.clear(); + m_pNewModButton.clear(); SfxModalDialog::dispose(); } diff --git a/basctl/source/basicide/macrodlg.hxx b/basctl/source/basicide/macrodlg.hxx index 71892b3ea1a8..d8388204904c 100644 --- a/basctl/source/basicide/macrodlg.hxx +++ b/basctl/source/basicide/macrodlg.hxx @@ -45,22 +45,22 @@ public: }; private: - Edit* m_pMacroNameEdit; - FixedText* m_pMacroFromTxT; - FixedText* m_pMacrosSaveInTxt; - TreeListBox* m_pBasicBox; - FixedText* m_pMacrosInTxt; + VclPtr m_pMacroNameEdit; + VclPtr m_pMacroFromTxT; + VclPtr m_pMacrosSaveInTxt; + VclPtr m_pBasicBox; + VclPtr m_pMacrosInTxt; OUString m_aMacrosInTxtBaseStr; - SvTreeListBox* m_pMacroBox; - - PushButton* m_pRunButton; - CloseButton* m_pCloseButton; - PushButton* m_pAssignButton; - PushButton* m_pEditButton; - PushButton* m_pDelButton; - PushButton* m_pOrganizeButton; - PushButton* m_pNewLibButton; - PushButton* m_pNewModButton; + VclPtr m_pMacroBox; + + VclPtr m_pRunButton; + VclPtr m_pCloseButton; + VclPtr m_pAssignButton; + VclPtr m_pEditButton; + VclPtr m_pDelButton; + VclPtr m_pOrganizeButton; + VclPtr m_pNewLibButton; + VclPtr m_pNewModButton; bool bNewDelIsDel; bool bForceStoreBasic; diff --git a/basctl/source/basicide/moduldl2.cxx b/basctl/source/basicide/moduldl2.cxx index f7cfbb5adfd2..9174328463cc 100644 --- a/basctl/source/basicide/moduldl2.cxx +++ b/basctl/source/basicide/moduldl2.cxx @@ -392,6 +392,18 @@ NewObjectDialog::NewObjectDialog(vcl::Window * pParent, ObjectMode::Mode eMode, m_pOKButton->SetClickHdl(LINK(this, NewObjectDialog, OkButtonHandler)); } +NewObjectDialog::~NewObjectDialog() +{ + dispose(); +} + +void NewObjectDialog::dispose() +{ + m_pEdit.clear(); + m_pOKButton.clear(); + ModalDialog::dispose(); +} + // GotoLineDialog GotoLineDialog::GotoLineDialog(vcl::Window * pParent ) : ModalDialog(pParent, "GotoLineDialog", @@ -403,6 +415,18 @@ GotoLineDialog::GotoLineDialog(vcl::Window * pParent ) m_pOKButton->SetClickHdl(LINK(this, GotoLineDialog, OkButtonHandler)); } +GotoLineDialog::~GotoLineDialog() +{ + dispose(); +} + +void GotoLineDialog::dispose() +{ + m_pEdit.clear(); + m_pOKButton.clear(); + ModalDialog::dispose(); +} + sal_Int32 GotoLineDialog::GetLineNumber() const { return m_pEdit->GetText().toInt32(); @@ -437,6 +461,18 @@ ExportDialog::ExportDialog(vcl::Window * pParent) m_pOKButton->SetClickHdl(LINK(this, ExportDialog, OkButtonHandler)); } +ExportDialog::~ExportDialog() +{ + dispose(); +} + +void ExportDialog::dispose() +{ + m_pExportAsPackageButton.clear(); + m_pOKButton.clear(); + ModalDialog::dispose(); +} + // LibPage LibPage::LibPage(vcl::Window * pParent) : TabPage(pParent, "LibPage", @@ -497,8 +533,16 @@ void LibPage::dispose() DocumentEntry* pEntry = static_cast(m_pBasicsBox->GetEntryData( i )); delete pEntry; } - m_pBasicsBox = NULL; } + m_pBasicsBox.clear(); + m_pLibBox.clear(); + m_pEditButton.clear(); + m_pPasswordButton.clear(); + m_pNewLibButton.clear(); + m_pInsertLibButton.clear(); + m_pExportButton.clear(); + m_pDelButton.clear(); + pTabDlg.clear(); TabPage::dispose(); } diff --git a/basctl/source/basicide/moduldlg.cxx b/basctl/source/basicide/moduldlg.cxx index 216fb1d3c92b..d80dbc18ba98 100644 --- a/basctl/source/basicide/moduldlg.cxx +++ b/basctl/source/basicide/moduldlg.cxx @@ -495,8 +495,8 @@ void OrganizeDialog::dispose() { for ( sal_uInt16 i = 0; i < m_pTabCtrl->GetPageCount(); i++ ) delete m_pTabCtrl->GetTabPage( m_pTabCtrl->GetPageId( i ) ); - m_pTabCtrl = NULL; } + m_pTabCtrl.clear(); TabDialog::dispose(); }; @@ -598,6 +598,22 @@ ObjectPage::ObjectPage(vcl::Window *pParent, const OString &rName, sal_uInt16 nM CheckButtons(); } +ObjectPage::~ObjectPage() +{ + dispose(); +} + +void ObjectPage::dispose() +{ + m_pBasicBox.clear(); + m_pEditButton.clear(); + m_pNewModButton.clear(); + m_pNewDlgButton.clear(); + m_pDelButton.clear(); + pTabDlg.clear(); + TabPage::dispose(); +} + void ObjectPage::SetCurrentEntry (EntryDescriptor& rDesc) { m_pBasicBox->SetCurrentEntry( rDesc ); @@ -927,6 +943,21 @@ LibDialog::LibDialog( vcl::Window* pParent ) m_pLibBox->set_width_request(m_pLibBox->approximate_char_width() * 32); } +LibDialog::~LibDialog() +{ + dispose(); +} + +void LibDialog::dispose() +{ + m_pStorageFrame.clear(); + m_pLibBox.clear(); + m_pReferenceBox.clear(); + m_pReplaceBox.clear(); + ModalDialog::dispose(); +} + + void LibDialog::SetStorageName( const OUString& rName ) { OUString aName( IDE_RESSTR(RID_STR_FILENAME) ); diff --git a/basctl/source/basicide/moduldlg.hxx b/basctl/source/basicide/moduldlg.hxx index 00abbe158ca9..12907c0c2342 100644 --- a/basctl/source/basicide/moduldlg.hxx +++ b/basctl/source/basicide/moduldlg.hxx @@ -48,12 +48,14 @@ namespace ObjectMode class NewObjectDialog : public ModalDialog { private: - Edit* m_pEdit; - OKButton* m_pOKButton; + VclPtr m_pEdit; + VclPtr m_pOKButton; DECL_LINK(OkButtonHandler, void *); public: NewObjectDialog (vcl::Window* pParent, ObjectMode::Mode, bool bCheckName = false); + virtual ~NewObjectDialog(); + virtual void dispose() SAL_OVERRIDE; OUString GetObjectName() const { return m_pEdit->GetText(); } void SetObjectName( const OUString& rName ) { @@ -64,19 +66,21 @@ public: class GotoLineDialog : public ModalDialog { - Edit* m_pEdit; - OKButton* m_pOKButton; + VclPtr m_pEdit; + VclPtr m_pOKButton; DECL_LINK(OkButtonHandler, void *); public: GotoLineDialog(vcl::Window * pParent); + virtual ~GotoLineDialog(); + virtual void dispose() SAL_OVERRIDE; sal_Int32 GetLineNumber() const; }; class ExportDialog : public ModalDialog { private: - RadioButton* m_pExportAsPackageButton; - OKButton* m_pOKButton; + VclPtr m_pExportAsPackageButton; + VclPtr m_pOKButton; bool mbExportAsPackage; @@ -84,6 +88,8 @@ private: public: ExportDialog( vcl::Window * pParent ); + virtual ~ExportDialog(); + virtual void dispose() SAL_OVERRIDE; bool isExportAsPackage () const { return mbExportAsPackage; } }; @@ -141,13 +147,15 @@ public: class LibDialog: public ModalDialog { private: - VclFrame* m_pStorageFrame; - CheckBox* m_pLibBox; - ::CheckBox* m_pReferenceBox; - ::CheckBox* m_pReplaceBox; + VclPtr m_pStorageFrame; + VclPtr m_pLibBox; + VclPtr<::CheckBox> m_pReferenceBox; + VclPtr<::CheckBox> m_pReplaceBox; public: LibDialog( vcl::Window* pParent ); + virtual ~LibDialog(); + virtual void dispose() SAL_OVERRIDE; void SetStorageName( const OUString& rName ); @@ -162,7 +170,7 @@ public: class OrganizeDialog : public TabDialog { private: - TabControl* m_pTabCtrl; + VclPtr m_pTabCtrl; EntryDescriptor m_aCurEntry; public: @@ -178,11 +186,11 @@ public: class ObjectPage: public TabPage { protected: - ExtTreeListBox* m_pBasicBox; - PushButton* m_pEditButton; - PushButton* m_pNewModButton; - PushButton* m_pNewDlgButton; - PushButton* m_pDelButton; + VclPtr m_pBasicBox; + VclPtr m_pEditButton; + VclPtr m_pNewModButton; + VclPtr m_pNewDlgButton; + VclPtr m_pDelButton; DECL_LINK( BasicBoxHighlightHdl, TreeListBox * ); DECL_LINK( ButtonHdl, Button * ); @@ -193,13 +201,15 @@ protected: void NewDialog(); void EndTabDialog( sal_uInt16 nRet ); - TabDialog* pTabDlg; + VclPtr pTabDlg; virtual void ActivatePage() SAL_OVERRIDE; virtual void DeactivatePage() SAL_OVERRIDE; public: ObjectPage(vcl::Window* pParent, const OString& rName, sal_uInt16 nMode); + virtual ~ObjectPage(); + virtual void dispose() SAL_OVERRIDE; void SetCurrentEntry( EntryDescriptor& rDesc ); void SetTabDlg( TabDialog* p ) { pTabDlg = p;} @@ -209,14 +219,14 @@ public: class LibPage: public TabPage { protected: - ListBox* m_pBasicsBox; - CheckBox* m_pLibBox; - PushButton* m_pEditButton; - PushButton* m_pPasswordButton; - PushButton* m_pNewLibButton; - PushButton* m_pInsertLibButton; - PushButton* m_pExportButton; - PushButton* m_pDelButton; + VclPtr m_pBasicsBox; + VclPtr m_pLibBox; + VclPtr m_pEditButton; + VclPtr m_pPasswordButton; + VclPtr m_pNewLibButton; + VclPtr m_pInsertLibButton; + VclPtr m_pExportButton; + VclPtr m_pDelButton; ScriptDocument m_aCurDocument; LibraryLocation m_eCurLocation; @@ -242,7 +252,7 @@ protected: virtual void ActivatePage() SAL_OVERRIDE; virtual void DeactivatePage() SAL_OVERRIDE; - TabDialog* pTabDlg; + VclPtr pTabDlg; public: LibPage( vcl::Window* pParent ); diff --git a/basctl/source/dlged/managelang.cxx b/basctl/source/dlged/managelang.cxx index 953f96b92316..cb0ec81910fd 100644 --- a/basctl/source/dlged/managelang.cxx +++ b/basctl/source/dlged/managelang.cxx @@ -81,6 +81,10 @@ ManageLanguageDialog::~ManageLanguageDialog() void ManageLanguageDialog::dispose() { ClearLanguageBox(); + m_pLanguageLB.clear(); + m_pAddPB.clear(); + m_pDeletePB.clear(); + m_pMakeDefPB.clear(); ModalDialog::dispose(); } @@ -253,6 +257,22 @@ SetDefaultLanguageDialog::SetDefaultLanguageDialog(vcl::Window* pParent, boost:: FillLanguageBox(); } +SetDefaultLanguageDialog::~SetDefaultLanguageDialog() +{ + dispose(); +} + +void SetDefaultLanguageDialog::dispose() +{ + m_pLanguageFT.clear(); + m_pLanguageLB.clear(); + m_pCheckLangFT.clear(); + m_pCheckLangLB.clear(); + m_pDefinedFT.clear(); + m_pAddedFT.clear(); + ModalDialog::dispose(); +} + void SetDefaultLanguageDialog::FillLanguageBox() { // fill list with all languages diff --git a/basctl/source/inc/accessibledialogcontrolshape.hxx b/basctl/source/inc/accessibledialogcontrolshape.hxx index 7192763c27dc..bc0d52b33eec 100644 --- a/basctl/source/inc/accessibledialogcontrolshape.hxx +++ b/basctl/source/inc/accessibledialogcontrolshape.hxx @@ -24,6 +24,7 @@ #include #include #include +#include namespace vcl { class Window; } class VCLExternalSolarLock; @@ -56,7 +57,7 @@ class AccessibleDialogControlShape : public AccessibleExtendedComponentHelper private: VCLExternalSolarLock* m_pExternalLock; - DialogWindow* m_pDialogWindow; + VclPtr m_pDialogWindow; DlgEdObj* m_pDlgEdObj; bool m_bFocused; bool m_bSelected; diff --git a/basctl/source/inc/accessibledialogwindow.hxx b/basctl/source/inc/accessibledialogwindow.hxx index c57b2590ae71..bd2739440160 100644 --- a/basctl/source/inc/accessibledialogwindow.hxx +++ b/basctl/source/inc/accessibledialogwindow.hxx @@ -26,6 +26,7 @@ #include #include #include +#include class VCLExternalSolarLock; class VclSimpleEvent; @@ -80,7 +81,7 @@ private: AccessibleChildren m_aAccessibleChildren; VCLExternalSolarLock* m_pExternalLock; - basctl::DialogWindow* m_pDialogWindow; + VclPtr m_pDialogWindow; DlgEditor* m_pDlgEditor; DlgEdModel* m_pDlgEdModel; diff --git a/basctl/source/inc/baside3.hxx b/basctl/source/inc/baside3.hxx index 644ccbad2721..de17eb08403c 100644 --- a/basctl/source/inc/baside3.hxx +++ b/basctl/source/inc/baside3.hxx @@ -146,12 +146,12 @@ protected: private: // child window - DialogWindow* pChild; + VclPtr pChild; // dockable windows: // object catalog (owned by Shell) ObjectCatalog& rObjectCatalog; // property browser (created by this, deleted by toolkit) - PropBrw* pPropertyBrowser; + VclPtr pPropertyBrowser; private: void AddPropertyBrowser (); diff --git a/basctl/source/inc/basidesh.hxx b/basctl/source/inc/basidesh.hxx index 216f06518316..0baeb579dda1 100644 --- a/basctl/source/inc/basidesh.hxx +++ b/basctl/source/inc/basidesh.hxx @@ -56,7 +56,7 @@ class Shell : public DocumentEventListener { public: - typedef std::map WindowTable; + typedef std::map > WindowTable; typedef WindowTable::const_iterator WindowTableIt; private: @@ -64,9 +64,9 @@ private: friend class LocalizationMgr; friend bool implImportDialog( vcl::Window* pWin, const OUString& rCurPath, const ScriptDocument& rDocument, const OUString& aLibName ); // defined in baside3.cxx - WindowTable aWindowTable; + WindowTable aWindowTable; sal_uInt16 nCurKey; - BaseWindow* pCurWin; + VclPtr pCurWin; ScriptDocument m_aCurDocument; OUString m_aCurLibName; boost::shared_ptr m_pCurLocalizationMgr; @@ -81,7 +81,7 @@ private: boost::scoped_ptr pModulLayout; boost::scoped_ptr pDialogLayout; // the active layout window - Layout* pLayout; + VclPtr pLayout; // common object catalog window VclPtr aObjectCatalog; diff --git a/basctl/source/inc/bastypes.hxx b/basctl/source/inc/bastypes.hxx index 37e11306111d..8423874c19a9 100644 --- a/basctl/source/inc/bastypes.hxx +++ b/basctl/source/inc/bastypes.hxx @@ -80,7 +80,8 @@ class DockingWindow : public ::DockingWindow public: DockingWindow (vcl::Window* pParent); DockingWindow (Layout* pParent); -public: + virtual ~DockingWindow(); + virtual void dispose() SAL_OVERRIDE; void ResizeIfDocking (Point const&, Size const&); void ResizeIfDocking (Size const&); Size GetDockingSize () const { return aDockingRect.GetSize(); } @@ -102,7 +103,7 @@ private: // the position and the size of the docking window Rectangle aDockingRect; // the parent layout window (only when docking) - Layout* pLayout; + VclPtr pLayout; // > 0: shown, <= 0: hidden, ++ by Show() and -- by Hide() int nShowCount; @@ -148,8 +149,8 @@ class EntryDescriptor; class BaseWindow : public vcl::Window { private: - ScrollBar* pShellHScrollBar; - ScrollBar* pShellVScrollBar; + VclPtr pShellHScrollBar; + VclPtr pShellVScrollBar; DECL_LINK( ScrollHdl, ScrollBar * ); int nStatus; diff --git a/basctl/source/inc/dlged.hxx b/basctl/source/inc/dlged.hxx index 6371ac67b72f..18883daa3854 100644 --- a/basctl/source/inc/dlged.hxx +++ b/basctl/source/inc/dlged.hxx @@ -30,6 +30,7 @@ #include #include #include +#include #include @@ -106,8 +107,8 @@ private: void Print( Printer* pPrinter, const OUString& rTitle ); private: - ScrollBar* pHScroll; - ScrollBar* pVScroll; + VclPtr pHScroll; + VclPtr pVScroll; boost::scoped_ptr pDlgEdModel; // never nullptr DlgEdPage* pDlgEdPage; // never nullptr boost::scoped_ptr pDlgEdView; // never nullptr diff --git a/basctl/source/inc/managelang.hxx b/basctl/source/inc/managelang.hxx index ab6fb62ceab9..f7b9335e5e24 100644 --- a/basctl/source/inc/managelang.hxx +++ b/basctl/source/inc/managelang.hxx @@ -52,10 +52,10 @@ extern bool localesAreEqual( const ::com::sun::star::lang::Locale& rLocaleLeft, class ManageLanguageDialog : public ModalDialog { private: - ListBox* m_pLanguageLB; - PushButton* m_pAddPB; - PushButton* m_pDeletePB; - PushButton* m_pMakeDefPB; + VclPtr m_pLanguageLB; + VclPtr m_pAddPB; + VclPtr m_pDeletePB; + VclPtr m_pMakeDefPB; boost::shared_ptr m_xLocalizationMgr; @@ -80,12 +80,12 @@ public: class SetDefaultLanguageDialog : public ModalDialog { private: - FixedText* m_pLanguageFT; - SvxLanguageBox* m_pLanguageLB; - FixedText* m_pCheckLangFT; - SvxCheckListBox* m_pCheckLangLB; - FixedText* m_pDefinedFT; - FixedText* m_pAddedFT; + VclPtr m_pLanguageFT; + VclPtr m_pLanguageLB; + VclPtr m_pCheckLangFT; + VclPtr m_pCheckLangLB; + VclPtr m_pDefinedFT; + VclPtr m_pAddedFT; boost::shared_ptr m_xLocalizationMgr; @@ -93,6 +93,8 @@ private: public: SetDefaultLanguageDialog(vcl::Window* pParent, boost::shared_ptr xLMgr); + virtual ~SetDefaultLanguageDialog(); + virtual void dispose() SAL_OVERRIDE; ::com::sun::star::uno::Sequence< ::com::sun::star::lang::Locale > GetLocales() const; }; diff --git a/chart2/inc/ChartModel.hxx b/chart2/inc/ChartModel.hxx index 1fe210fc2a43..529d9ed1769a 100644 --- a/chart2/inc/ChartModel.hxx +++ b/chart2/inc/ChartModel.hxx @@ -622,7 +622,7 @@ private: sal_Int32 mnStart; sal_Int32 mnEnd; bool bSet; - OpenGLWindow* mpOpenGLWindow; + VclPtr mpOpenGLWindow; }; } // namespace chart diff --git a/chart2/source/controller/accessibility/AccessibleViewForwarder.hxx b/chart2/source/controller/accessibility/AccessibleViewForwarder.hxx index e0b65406b31e..b2d55cb8784f 100644 --- a/chart2/source/controller/accessibility/AccessibleViewForwarder.hxx +++ b/chart2/source/controller/accessibility/AccessibleViewForwarder.hxx @@ -20,6 +20,7 @@ #define INCLUDED_CHART2_SOURCE_CONTROLLER_ACCESSIBILITY_ACCESSIBLEVIEWFORWARDER_HXX #include +#include #include namespace vcl { class Window; } @@ -48,7 +49,7 @@ private: AccessibleViewForwarder& operator=( AccessibleViewForwarder& ) SAL_DELETED_FUNCTION; AccessibleChartView* m_pAccChartView; - vcl::Window* m_pWindow; + VclPtr m_pWindow; MapMode m_aMapMode; }; diff --git a/chart2/source/controller/dialogs/ChartTypeDialogController.hxx b/chart2/source/controller/dialogs/ChartTypeDialogController.hxx index 14ce8e13b5da..7ea6c1c4b0c7 100644 --- a/chart2/source/controller/dialogs/ChartTypeDialogController.hxx +++ b/chart2/source/controller/dialogs/ChartTypeDialogController.hxx @@ -281,8 +281,8 @@ private: DECL_LINK( ChangeLineCountHdl, void* ); private: - FixedText* m_pFT_NumberOfLines; - NumericField* m_pMF_NumberOfLines; + VclPtr m_pFT_NumberOfLines; + VclPtr m_pMF_NumberOfLines; }; class BubbleChartDialogController : public ChartTypeDialogController diff --git a/chart2/source/controller/dialogs/dlg_ChartType.cxx b/chart2/source/controller/dialogs/dlg_ChartType.cxx index 33cf74763515..44436109dddd 100644 --- a/chart2/source/controller/dialogs/dlg_ChartType.cxx +++ b/chart2/source/controller/dialogs/dlg_ChartType.cxx @@ -60,8 +60,7 @@ ChartTypeDialog::~ChartTypeDialog() void ChartTypeDialog::dispose() { - delete m_pChartTypeTabPage; - m_pChartTypeTabPage = NULL; + m_pChartTypeTabPage.clear(); ModalDialog::dispose(); } diff --git a/chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx b/chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx index 5a777db94004..66af10a37ccb 100644 --- a/chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx +++ b/chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx @@ -54,11 +54,7 @@ CreationWizardUnoDlg::CreationWizardUnoDlg( const uno::Reference< uno::XComponen CreationWizardUnoDlg::~CreationWizardUnoDlg() { SolarMutexGuard aSolarGuard; - if( m_pDialog ) - { - delete m_pDialog; - m_pDialog = 0; - } + m_pDialog.clear(); } // lang::XServiceInfo OUString SAL_CALL CreationWizardUnoDlg::getImplementationName() @@ -272,11 +268,7 @@ void SAL_CALL CreationWizardUnoDlg::disposing() m_xParentWindow.clear(); SolarMutexGuard aSolarGuard; - if( m_pDialog ) - { - delete m_pDialog; - m_pDialog = 0; - } + m_pDialog.clear(); try { diff --git a/chart2/source/controller/dialogs/dlg_DataEditor.cxx b/chart2/source/controller/dialogs/dlg_DataEditor.cxx index 02a5578b99a0..5230792f51f2 100644 --- a/chart2/source/controller/dialogs/dlg_DataEditor.cxx +++ b/chart2/source/controller/dialogs/dlg_DataEditor.cxx @@ -106,6 +106,7 @@ void DataEditor::dispose() aMiscOptions.RemoveListenerLink( LINK( this, DataEditor, MiscHdl ) ); OSL_TRACE( "DataEditor: DTOR" ); + m_pTbxData.clear(); ModalDialog::dispose(); } diff --git a/chart2/source/controller/dialogs/dlg_DataSource.cxx b/chart2/source/controller/dialogs/dlg_DataSource.cxx index 88c1a41f64fd..09e55375e734 100644 --- a/chart2/source/controller/dialogs/dlg_DataSource.cxx +++ b/chart2/source/controller/dialogs/dlg_DataSource.cxx @@ -164,16 +164,14 @@ DataSourceDialog::~DataSourceDialog() void DataSourceDialog::dispose() { - delete m_pRangeChooserTabePage; - m_pRangeChooserTabePage = NULL; - delete m_pDataSourceTabPage; - m_pDataSourceTabPage = NULL; if (m_pTabControl) { m_nLastPageId = m_pTabControl->GetCurPageId(); - delete m_pTabControl; - m_pTabControl = NULL; } + m_pRangeChooserTabePage.clear(); + m_pDataSourceTabPage.clear(); + m_pTabControl.clear(); + m_pBtnOK.clear(); TabDialog::dispose(); } diff --git a/chart2/source/controller/dialogs/dlg_InsertAxis_Grid.cxx b/chart2/source/controller/dialogs/dlg_InsertAxis_Grid.cxx index 345a6d79f150..670979af96ee 100644 --- a/chart2/source/controller/dialogs/dlg_InsertAxis_Grid.cxx +++ b/chart2/source/controller/dialogs/dlg_InsertAxis_Grid.cxx @@ -81,6 +81,23 @@ SchAxisDlg::SchAxisDlg(vcl::Window* pWindow, m_pCbSecondaryZ->Enable( rInput.aPossibilityList[5] ); } +SchAxisDlg::~SchAxisDlg() +{ + dispose(); +} + +void SchAxisDlg::dispose() +{ + m_pCbPrimaryX.clear(); + m_pCbPrimaryY.clear(); + m_pCbPrimaryZ.clear(); + m_pCbSecondaryX.clear(); + m_pCbSecondaryY.clear(); + m_pCbSecondaryZ.clear(); + ModalDialog::dispose(); +} + + void SchAxisDlg::getResult( InsertAxisOrGridDialogData& rOutput ) { rOutput.aExistenceList[0]=m_pCbPrimaryX->IsChecked(); diff --git a/chart2/source/controller/dialogs/dlg_View3D.cxx b/chart2/source/controller/dialogs/dlg_View3D.cxx index 3769f2ef91c6..bb28a878bbb3 100644 --- a/chart2/source/controller/dialogs/dlg_View3D.cxx +++ b/chart2/source/controller/dialogs/dlg_View3D.cxx @@ -71,14 +71,12 @@ View3DDialog::~View3DDialog() void View3DDialog::dispose() { - delete m_pGeometry; - m_pGeometry = NULL; - delete m_pAppearance; - m_pAppearance = NULL; - delete m_pIllumination; - m_pIllumination = NULL; - - m_nLastPageId = m_pTabControl->GetCurPageId(); + if (m_pTabControl) + m_nLastPageId = m_pTabControl->GetCurPageId(); + m_pGeometry.clear(); + m_pAppearance.clear(); + m_pIllumination.clear(); + m_pTabControl.clear(); TabDialog::dispose(); } diff --git a/chart2/source/controller/dialogs/res_BarGeometry.hxx b/chart2/source/controller/dialogs/res_BarGeometry.hxx index 60af3af3ccd8..7a9eeb8c17f8 100644 --- a/chart2/source/controller/dialogs/res_BarGeometry.hxx +++ b/chart2/source/controller/dialogs/res_BarGeometry.hxx @@ -41,8 +41,8 @@ public: void SetSelectHdl( const Link& rLink ); private: - FixedText* m_pFT_Geometry; - ListBox* m_pLB_Geometry; + VclPtr m_pFT_Geometry; + VclPtr m_pLB_Geometry; }; } //namespace chart diff --git a/chart2/source/controller/dialogs/res_DataLabel.hxx b/chart2/source/controller/dialogs/res_DataLabel.hxx index 9d6d0e01cd90..cfb4758cc29b 100644 --- a/chart2/source/controller/dialogs/res_DataLabel.hxx +++ b/chart2/source/controller/dialogs/res_DataLabel.hxx @@ -45,28 +45,28 @@ public: void SetNumberFormatter( SvNumberFormatter* pFormatter ); private: - CheckBox* m_pCBNumber; - PushButton* m_pPB_NumberFormatForValue; - CheckBox* m_pCBPercent; - PushButton* m_pPB_NumberFormatForPercent; - FixedText* m_pFT_NumberFormatForPercent; - CheckBox* m_pCBCategory; - CheckBox* m_pCBSymbol; - - VclHBox* m_pSeparatorResources; - ListBox* m_pLB_Separator; + VclPtr m_pCBNumber; + VclPtr m_pPB_NumberFormatForValue; + VclPtr m_pCBPercent; + VclPtr m_pPB_NumberFormatForPercent; + VclPtr m_pFT_NumberFormatForPercent; + VclPtr m_pCBCategory; + VclPtr m_pCBSymbol; + + VclPtr m_pSeparatorResources; + VclPtr m_pLB_Separator; OUString m_aEntryMap[NUMBER_SEPARATORS]; - VclHBox* m_pBxLabelPlacement; - ListBox* m_pLB_LabelPlacement; + VclPtr m_pBxLabelPlacement; + VclPtr m_pLB_LabelPlacement; - VclHBox* m_pBxOrientation; - svx::DialControl* m_pDC_Dial; - FixedText* m_pFT_Dial; - NumericField* m_pNF_Degrees; + VclPtr m_pBxOrientation; + VclPtr m_pDC_Dial; + VclPtr m_pFT_Dial; + VclPtr m_pNF_Degrees; - VclHBox* m_pBxTextDirection; - TextDirectionListBox* m_pLB_TextDirection; + VclPtr m_pBxTextDirection; + VclPtr m_pLB_TextDirection; ::std::map< sal_Int32, sal_uInt16 > m_aPlacementToListBoxMap; ::std::map< sal_uInt16, sal_Int32 > m_aListBoxToPlacementMap; @@ -82,7 +82,7 @@ private: bool m_bSourceFormatForValue; bool m_bSourceFormatForPercent; - vcl::Window* m_pWindow; + VclPtr m_pWindow; SfxItemPool* m_pPool; DECL_LINK(NumberFormatDialogHdl, PushButton * ); diff --git a/chart2/source/controller/dialogs/res_Trendline.hxx b/chart2/source/controller/dialogs/res_Trendline.hxx index 0d4be04cdf4d..03c3ebe3bd87 100644 --- a/chart2/source/controller/dialogs/res_Trendline.hxx +++ b/chart2/source/controller/dialogs/res_Trendline.hxx @@ -46,29 +46,29 @@ public: void SetNbPoints( sal_Int32 nNbPoints ); private: - RadioButton* m_pRB_Linear; - RadioButton* m_pRB_Logarithmic; - RadioButton* m_pRB_Exponential; - RadioButton* m_pRB_Power; - RadioButton* m_pRB_Polynomial; - RadioButton* m_pRB_MovingAverage; - - FixedImage* m_pFI_Linear; - FixedImage* m_pFI_Logarithmic; - FixedImage* m_pFI_Exponential; - FixedImage* m_pFI_Power; - FixedImage* m_pFI_Polynomial; - FixedImage* m_pFI_MovingAverage; - - NumericField* m_pNF_Degree; - NumericField* m_pNF_Period; - Edit* m_pEE_Name; - FormattedField* m_pFmtFld_ExtrapolateForward; - FormattedField* m_pFmtFld_ExtrapolateBackward; - CheckBox* m_pCB_SetIntercept; - FormattedField* m_pFmtFld_InterceptValue; - CheckBox* m_pCB_ShowEquation; - CheckBox* m_pCB_ShowCorrelationCoeff; + VclPtr m_pRB_Linear; + VclPtr m_pRB_Logarithmic; + VclPtr m_pRB_Exponential; + VclPtr m_pRB_Power; + VclPtr m_pRB_Polynomial; + VclPtr m_pRB_MovingAverage; + + VclPtr m_pFI_Linear; + VclPtr m_pFI_Logarithmic; + VclPtr m_pFI_Exponential; + VclPtr m_pFI_Power; + VclPtr m_pFI_Polynomial; + VclPtr m_pFI_MovingAverage; + + VclPtr m_pNF_Degree; + VclPtr m_pNF_Period; + VclPtr m_pEE_Name; + VclPtr m_pFmtFld_ExtrapolateForward; + VclPtr m_pFmtFld_ExtrapolateBackward; + VclPtr m_pCB_SetIntercept; + VclPtr m_pFmtFld_InterceptValue; + VclPtr m_pCB_ShowEquation; + VclPtr m_pCB_ShowCorrelationCoeff; SvxChartRegress m_eTrendLineType; diff --git a/chart2/source/controller/dialogs/tp_3D_SceneAppearance.cxx b/chart2/source/controller/dialogs/tp_3D_SceneAppearance.cxx index ff20319c8eb9..d25e226fb19d 100644 --- a/chart2/source/controller/dialogs/tp_3D_SceneAppearance.cxx +++ b/chart2/source/controller/dialogs/tp_3D_SceneAppearance.cxx @@ -120,6 +120,20 @@ ThreeD_SceneAppearance_TabPage::ThreeD_SceneAppearance_TabPage( initControlsFromModel(); } +ThreeD_SceneAppearance_TabPage::~ThreeD_SceneAppearance_TabPage() +{ + dispose(); +} + +void ThreeD_SceneAppearance_TabPage::dispose() +{ + m_pLB_Scheme.clear(); + m_pCB_Shading.clear(); + m_pCB_ObjectLines.clear(); + m_pCB_RoundedEdge.clear(); + TabPage::dispose(); +} + void ThreeD_SceneAppearance_TabPage::ActivatePage() { updateScheme(); diff --git a/chart2/source/controller/dialogs/tp_3D_SceneAppearance.hxx b/chart2/source/controller/dialogs/tp_3D_SceneAppearance.hxx index 23749c9da5d3..80720d031e87 100644 --- a/chart2/source/controller/dialogs/tp_3D_SceneAppearance.hxx +++ b/chart2/source/controller/dialogs/tp_3D_SceneAppearance.hxx @@ -38,6 +38,8 @@ public: vcl::Window* pWindow, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > & xChartModel, ControllerLockHelper & rControllerLockHelper ); + virtual ~ThreeD_SceneAppearance_TabPage(); + virtual void dispose() SAL_OVERRIDE; virtual void ActivatePage() SAL_OVERRIDE; @@ -55,11 +57,11 @@ private: ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > m_xChartModel; - ListBox* m_pLB_Scheme; + VclPtr m_pLB_Scheme; - CheckBox* m_pCB_Shading; - CheckBox* m_pCB_ObjectLines; - CheckBox* m_pCB_RoundedEdge; + VclPtr m_pCB_Shading; + VclPtr m_pCB_ObjectLines; + VclPtr m_pCB_RoundedEdge; bool m_bUpdateOtherControls; bool m_bCommitToModel; diff --git a/chart2/source/controller/dialogs/tp_3D_SceneGeometry.cxx b/chart2/source/controller/dialogs/tp_3D_SceneGeometry.cxx index 0428b2d892be..b1f4dba975b1 100644 --- a/chart2/source/controller/dialogs/tp_3D_SceneGeometry.cxx +++ b/chart2/source/controller/dialogs/tp_3D_SceneGeometry.cxx @@ -147,6 +147,24 @@ ThreeD_SceneGeometry_TabPage::ThreeD_SceneGeometry_TabPage( vcl::Window* pWindow m_pMFPerspective->SetAccessibleRelationLabeledBy(m_pCbxPerspective); } +ThreeD_SceneGeometry_TabPage::~ThreeD_SceneGeometry_TabPage() +{ + dispose(); +} + +void ThreeD_SceneGeometry_TabPage::dispose() +{ + m_pCbxRightAngledAxes.clear(); + m_pMFXRotation.clear(); + m_pMFYRotation.clear(); + m_pFtZRotation.clear(); + m_pMFZRotation.clear(); + m_pCbxPerspective.clear(); + m_pMFPerspective.clear(); + TabPage::dispose(); +} + + void ThreeD_SceneGeometry_TabPage::commitPendingChanges() { ControllerLockHelperGuard aGuard( m_rControllerLockHelper ); diff --git a/chart2/source/controller/dialogs/tp_3D_SceneGeometry.hxx b/chart2/source/controller/dialogs/tp_3D_SceneGeometry.hxx index bc19444f6403..cfd16ff23bd6 100644 --- a/chart2/source/controller/dialogs/tp_3D_SceneGeometry.hxx +++ b/chart2/source/controller/dialogs/tp_3D_SceneGeometry.hxx @@ -39,6 +39,8 @@ public: const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > & xSceneProperties, ControllerLockHelper & rControllerLockHelper ); + virtual ~ThreeD_SceneGeometry_TabPage(); + virtual void dispose() SAL_OVERRIDE; // has to be called in case the dialog was closed with OK void commitPendingChanges(); @@ -63,17 +65,17 @@ private: ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > m_xSceneProperties; - CheckBox* m_pCbxRightAngledAxes; + VclPtr m_pCbxRightAngledAxes; - MetricField* m_pMFXRotation; + VclPtr m_pMFXRotation; - MetricField* m_pMFYRotation; + VclPtr m_pMFYRotation; - FixedText* m_pFtZRotation; - MetricField* m_pMFZRotation; + VclPtr m_pFtZRotation; + VclPtr m_pMFZRotation; - CheckBox* m_pCbxPerspective; - MetricField* m_pMFPerspective; + VclPtr m_pCbxPerspective; + VclPtr m_pMFPerspective; //to keep old values when switching to right angled axes sal_Int64 m_nXRotation; diff --git a/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx b/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx index 2c92a7521c1f..a4683a5b5cdb 100644 --- a/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx +++ b/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx @@ -78,7 +78,7 @@ struct LightSource struct LightSourceInfo { - LightButton* pButton; + VclPtr pButton; LightSource aLightSource; LightSourceInfo(); @@ -301,6 +301,19 @@ void ThreeD_SceneIllumination_TabPage::dispose() { delete[] m_pLightSourceInfoList; m_pLightSourceInfoList = NULL; + m_pBtn_Light1.clear(); + m_pBtn_Light2.clear(); + m_pBtn_Light3.clear(); + m_pBtn_Light4.clear(); + m_pBtn_Light5.clear(); + m_pBtn_Light6.clear(); + m_pBtn_Light7.clear(); + m_pBtn_Light8.clear(); + m_pLB_LightSource.clear(); + m_pBtn_LightSource_Color.clear(); + m_pLB_AmbientLight.clear(); + m_pBtn_AmbientLight_Color.clear(); + m_pCtl_Preview.clear(); TabPage::dispose(); } diff --git a/chart2/source/controller/dialogs/tp_3D_SceneIllumination.hxx b/chart2/source/controller/dialogs/tp_3D_SceneIllumination.hxx index 06e27ae02650..b7f46f26e964 100644 --- a/chart2/source/controller/dialogs/tp_3D_SceneIllumination.hxx +++ b/chart2/source/controller/dialogs/tp_3D_SceneIllumination.hxx @@ -74,22 +74,22 @@ private: void applyLightSourceToModel( sal_uInt32 nLightNumber ); void applyLightSourcesToModel(); - LightButton* m_pBtn_Light1; - LightButton* m_pBtn_Light2; - LightButton* m_pBtn_Light3; - LightButton* m_pBtn_Light4; - LightButton* m_pBtn_Light5; - LightButton* m_pBtn_Light6; - LightButton* m_pBtn_Light7; - LightButton* m_pBtn_Light8; - - ColorLB* m_pLB_LightSource; - PushButton* m_pBtn_LightSource_Color; - - ColorLB* m_pLB_AmbientLight; - PushButton* m_pBtn_AmbientLight_Color; - - SvxLightCtl3D* m_pCtl_Preview; + VclPtr m_pBtn_Light1; + VclPtr m_pBtn_Light2; + VclPtr m_pBtn_Light3; + VclPtr m_pBtn_Light4; + VclPtr m_pBtn_Light5; + VclPtr m_pBtn_Light6; + VclPtr m_pBtn_Light7; + VclPtr m_pBtn_Light8; + + VclPtr m_pLB_LightSource; + VclPtr m_pBtn_LightSource_Color; + + VclPtr m_pLB_AmbientLight; + VclPtr m_pBtn_AmbientLight_Color; + + VclPtr m_pCtl_Preview; LightSourceInfo* m_pLightSourceInfoList; diff --git a/chart2/source/controller/dialogs/tp_AxisLabel.cxx b/chart2/source/controller/dialogs/tp_AxisLabel.cxx index 0cded264a300..06d810b47815 100644 --- a/chart2/source/controller/dialogs/tp_AxisLabel.cxx +++ b/chart2/source/controller/dialogs/tp_AxisLabel.cxx @@ -79,6 +79,23 @@ void SchAxisLabelTabPage::dispose() { delete m_pOrientHlp; m_pOrientHlp = NULL; + m_pCbShowDescription.clear(); + m_pFlOrder.clear(); + m_pRbSideBySide.clear(); + m_pRbUpDown.clear(); + m_pRbDownUp.clear(); + m_pRbAuto.clear(); + m_pFlTextFlow.clear(); + m_pCbTextOverlap.clear(); + m_pCbTextBreak.clear(); + m_pFtABCD.clear(); + m_pFlOrient.clear(); + m_pCtrlDial.clear(); + m_pFtRotate.clear(); + m_pNfRotate.clear(); + m_pCbStacked.clear(); + m_pFtTextDirection.clear(); + m_pLbTextDirection.clear(); SfxTabPage::dispose(); } diff --git a/chart2/source/controller/dialogs/tp_AxisLabel.hxx b/chart2/source/controller/dialogs/tp_AxisLabel.hxx index 95474b805941..2f01f32e5ae8 100644 --- a/chart2/source/controller/dialogs/tp_AxisLabel.hxx +++ b/chart2/source/controller/dialogs/tp_AxisLabel.hxx @@ -35,27 +35,27 @@ namespace chart class SchAxisLabelTabPage : public SfxTabPage { private: - CheckBox* m_pCbShowDescription; + VclPtr m_pCbShowDescription; - FixedText* m_pFlOrder; - RadioButton* m_pRbSideBySide; - RadioButton* m_pRbUpDown; - RadioButton* m_pRbDownUp; - RadioButton* m_pRbAuto; + VclPtr m_pFlOrder; + VclPtr m_pRbSideBySide; + VclPtr m_pRbUpDown; + VclPtr m_pRbDownUp; + VclPtr m_pRbAuto; - FixedText* m_pFlTextFlow; - CheckBox* m_pCbTextOverlap; - CheckBox* m_pCbTextBreak; - FixedText* m_pFtABCD; - FixedText* m_pFlOrient; - svx::DialControl* m_pCtrlDial; - FixedText* m_pFtRotate; - NumericField* m_pNfRotate; - TriStateBox* m_pCbStacked; + VclPtr m_pFlTextFlow; + VclPtr m_pCbTextOverlap; + VclPtr m_pCbTextBreak; + VclPtr m_pFtABCD; + VclPtr m_pFlOrient; + VclPtr m_pCtrlDial; + VclPtr m_pFtRotate; + VclPtr m_pNfRotate; + VclPtr m_pCbStacked; svx::OrientationHelper* m_pOrientHlp; - FixedText* m_pFtTextDirection; - TextDirectionListBox* m_pLbTextDirection; + VclPtr m_pFtTextDirection; + VclPtr m_pLbTextDirection; bool m_bShowStaggeringControls; diff --git a/chart2/source/controller/dialogs/tp_AxisPositions.cxx b/chart2/source/controller/dialogs/tp_AxisPositions.cxx index 9bcb6e8e2938..0d33af228b69 100644 --- a/chart2/source/controller/dialogs/tp_AxisPositions.cxx +++ b/chart2/source/controller/dialogs/tp_AxisPositions.cxx @@ -84,6 +84,30 @@ AxisPositionsTabPage::AxisPositionsTabPage(vcl::Window* pWindow,const SfxItemSet m_pLB_PlaceTicks->SetDropDownLineCount( m_pLB_PlaceTicks->GetEntryCount() ); } +AxisPositionsTabPage::~AxisPositionsTabPage() +{ + dispose(); +} + +void AxisPositionsTabPage::dispose() +{ + m_pFL_AxisLine.clear(); + m_pLB_CrossesAt.clear(); + m_pED_CrossesAt.clear(); + m_pED_CrossesAtCategory.clear(); + m_pCB_AxisBetweenCategories.clear(); + m_pFL_Labels.clear(); + m_pLB_PlaceLabels.clear(); + m_pED_LabelDistance.clear(); + m_pCB_TicksInner.clear(); + m_pCB_TicksOuter.clear(); + m_pCB_MinorInner.clear(); + m_pCB_MinorOuter.clear(); + m_pBxPlaceTicks.clear(); + m_pLB_PlaceTicks.clear(); + SfxTabPage::dispose(); +} + SfxTabPage* AxisPositionsTabPage::Create(vcl::Window* pWindow,const SfxItemSet* rOutAttrs) { return new AxisPositionsTabPage(pWindow, *rOutAttrs); diff --git a/chart2/source/controller/dialogs/tp_AxisPositions.hxx b/chart2/source/controller/dialogs/tp_AxisPositions.hxx index 3dfeecd8f3ff..ee73d5240366 100644 --- a/chart2/source/controller/dialogs/tp_AxisPositions.hxx +++ b/chart2/source/controller/dialogs/tp_AxisPositions.hxx @@ -33,6 +33,8 @@ class AxisPositionsTabPage : public SfxTabPage { public: AxisPositionsTabPage( vcl::Window* pParent, const SfxItemSet& rInAttrs ); + virtual ~AxisPositionsTabPage(); + virtual void dispose() SAL_OVERRIDE; static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rInAttrs ); virtual bool FillItemSet( SfxItemSet* rOutAttrs ) SAL_OVERRIDE; @@ -52,30 +54,30 @@ private: //methods: DECL_LINK( PlaceLabelsSelectHdl, void* ); private: //member: - VclFrame* m_pFL_AxisLine; - ListBox* m_pLB_CrossesAt; - FormattedField* m_pED_CrossesAt; - ComboBox* m_pED_CrossesAtCategory; - CheckBox* m_pCB_AxisBetweenCategories; + VclPtr m_pFL_AxisLine; + VclPtr m_pLB_CrossesAt; + VclPtr m_pED_CrossesAt; + VclPtr m_pED_CrossesAtCategory; + VclPtr m_pCB_AxisBetweenCategories; - VclFrame* m_pFL_Labels; - ListBox* m_pLB_PlaceLabels; - FormattedField* m_pED_LabelDistance; + VclPtr m_pFL_Labels; + VclPtr m_pLB_PlaceLabels; + VclPtr m_pED_LabelDistance; - CheckBox* m_pCB_TicksInner; - CheckBox* m_pCB_TicksOuter; + VclPtr m_pCB_TicksInner; + VclPtr m_pCB_TicksOuter; - CheckBox* m_pCB_MinorInner; - CheckBox* m_pCB_MinorOuter; + VclPtr m_pCB_MinorInner; + VclPtr m_pCB_MinorOuter; - VclBox* m_pBxPlaceTicks; - ListBox* m_pLB_PlaceTicks; + VclPtr m_pBxPlaceTicks; + VclPtr m_pLB_PlaceTicks; // Not implemented -// CheckBox* m_pCB_MajorGrid; -// PushButton* m_pPB_MajorGrid; -// CheckBox* m_pCB_MinorGrid; -// PushButton* m_pPB_MinorGrid; +// VclPtr m_pCB_MajorGrid; +// VclPtr m_pPB_MajorGrid; +// VclPtr m_pCB_MinorGrid; +// VclPtr m_pPB_MinorGrid; SvNumberFormatter* m_pNumFormatter; diff --git a/chart2/source/controller/dialogs/tp_ChartType.cxx b/chart2/source/controller/dialogs/tp_ChartType.cxx index c7179039ae66..7618ef79adb0 100644 --- a/chart2/source/controller/dialogs/tp_ChartType.cxx +++ b/chart2/source/controller/dialogs/tp_ChartType.cxx @@ -56,8 +56,8 @@ private: DECL_LINK( SelectSchemeHdl, void* ); private: - CheckBox* m_pCB_3DLook; - ListBox* m_pLB_Scheme; + VclPtr m_pCB_3DLook; + VclPtr m_pLB_Scheme; }; Dim3DLookResourceGroup::Dim3DLookResourceGroup(VclBuilderContainer* pWindow) @@ -129,7 +129,7 @@ private: DECL_LINK( SortByXValuesCheckHdl, void* ); private: - CheckBox* m_pCB_XValueSorting; + VclPtr m_pCB_XValueSorting; }; SortByXValuesResourceGroup::SortByXValuesResourceGroup(VclBuilderContainer* pWindow ) @@ -176,10 +176,10 @@ private: DECL_LINK( StackingEnableHdl, void* ); private: - CheckBox* m_pCB_Stacked; - RadioButton* m_pRB_Stack_Y; - RadioButton* m_pRB_Stack_Y_Percent; - RadioButton* m_pRB_Stack_Z; + VclPtr m_pCB_Stacked; + VclPtr m_pRB_Stack_Y; + VclPtr m_pRB_Stack_Y_Percent; + VclPtr m_pRB_Stack_Z; bool m_bShowDeepStacking; }; @@ -278,7 +278,7 @@ public: private: DECL_LINK( SettingChangedHdl, void* ); private: - CheckBox* m_pCB_RoundedEdge; + VclPtr m_pCB_RoundedEdge; }; GL3DResourceGroup::GL3DResourceGroup( VclBuilderContainer* pWindow ) @@ -313,6 +313,8 @@ class SplinePropertiesDialog : public ModalDialog { public: SplinePropertiesDialog( vcl::Window* pParent ); + virtual ~SplinePropertiesDialog() { dispose(); } + virtual void dispose() SAL_OVERRIDE; void fillControls( const ChartTypeParameter& rParameter ); void fillParameter( ChartTypeParameter& rParameter, bool bSmoothLines ); @@ -323,11 +325,11 @@ private: DECL_LINK( SplineTypeListBoxHdl, void* ); private: - ListBox* m_pLB_Spline_Type; + VclPtr m_pLB_Spline_Type; - NumericField* m_pMF_SplineResolution; - FixedText* m_pFT_SplineOrder; - NumericField* m_pMF_SplineOrder; + VclPtr m_pMF_SplineResolution; + VclPtr m_pFT_SplineOrder; + VclPtr m_pMF_SplineOrder; }; const sal_uInt16 CUBIC_SPLINE_POS = 0; @@ -346,6 +348,15 @@ SplinePropertiesDialog::SplinePropertiesDialog( vcl::Window* pParent ) m_pLB_Spline_Type->SetSelectHdl( LINK (this, SplinePropertiesDialog, SplineTypeListBoxHdl ) ); } +void SplinePropertiesDialog::dispose() +{ + m_pLB_Spline_Type.clear(); + m_pMF_SplineResolution.clear(); + m_pFT_SplineOrder.clear(); + m_pMF_SplineOrder.clear(); + ModalDialog::dispose(); +} + void SplinePropertiesDialog::StateChanged( StateChangedType nType ) { Dialog::StateChanged( nType ); @@ -395,6 +406,8 @@ class SteppedPropertiesDialog : public ModalDialog { public: SteppedPropertiesDialog( vcl::Window* pParent ); + virtual ~SteppedPropertiesDialog() { dispose(); } + virtual void dispose() SAL_OVERRIDE; void fillControls( const ChartTypeParameter& rParameter ); void fillParameter( ChartTypeParameter& rParameter, bool bSteppedLines ); @@ -404,10 +417,10 @@ public: private: private: - RadioButton* m_pRB_Start; - RadioButton* m_pRB_End; - RadioButton* m_pRB_CenterX; - RadioButton* m_pRB_CenterY; + VclPtr m_pRB_Start; + VclPtr m_pRB_End; + VclPtr m_pRB_CenterX; + VclPtr m_pRB_CenterY; }; SteppedPropertiesDialog::SteppedPropertiesDialog( vcl::Window* pParent ) @@ -421,6 +434,15 @@ SteppedPropertiesDialog::SteppedPropertiesDialog( vcl::Window* pParent ) SetText(SCH_RESSTR(STR_DLG_STEPPED_LINE_PROPERTIES)); } +void SteppedPropertiesDialog::dispose() +{ + m_pRB_Start.clear(); + m_pRB_End.clear(); + m_pRB_CenterX.clear(); + m_pRB_CenterY.clear(); + ModalDialog::dispose(); +} + void SteppedPropertiesDialog::StateChanged( StateChangedType nType ) { Dialog::StateChanged( nType ); @@ -480,9 +502,9 @@ private: SteppedPropertiesDialog& getSteppedPropertiesDialog(); private: - FixedText* m_pFT_LineType; - ListBox* m_pLB_LineType; - PushButton* m_pPB_DetailsDialog; + VclPtr m_pFT_LineType; + VclPtr m_pLB_LineType; + VclPtr m_pPB_DetailsDialog; boost::scoped_ptr< SplinePropertiesDialog > m_pSplinePropertiesDialog; boost::scoped_ptr< SteppedPropertiesDialog > m_pSteppedPropertiesDialog; }; @@ -791,6 +813,9 @@ void ChartTypeTabPage::dispose() m_pSortByXValuesResourceGroup = NULL; delete m_pGL3DResourceGroup; m_pGL3DResourceGroup = NULL; + m_pFT_ChooseType.clear(); + m_pMainTypeList.clear(); + m_pSubTypeList.clear(); svt::OWizardPage::dispose(); } diff --git a/chart2/source/controller/dialogs/tp_ChartType.hxx b/chart2/source/controller/dialogs/tp_ChartType.hxx index a8cb43c97703..4ed830b10535 100644 --- a/chart2/source/controller/dialogs/tp_ChartType.hxx +++ b/chart2/source/controller/dialogs/tp_ChartType.hxx @@ -78,9 +78,9 @@ protected: DECL_LINK( SelectSubTypeHdl, void* ); protected: - FixedText* m_pFT_ChooseType; - ListBox* m_pMainTypeList; - ValueSet* m_pSubTypeList; + VclPtr m_pFT_ChooseType; + VclPtr m_pMainTypeList; + VclPtr m_pSubTypeList; Dim3DLookResourceGroup* m_pDim3DLookResourceGroup; StackingResourceGroup* m_pStackingResourceGroup; diff --git a/chart2/source/controller/dialogs/tp_DataSource.cxx b/chart2/source/controller/dialogs/tp_DataSource.cxx index 0aec36a88576..f59465a4460c 100644 --- a/chart2/source/controller/dialogs/tp_DataSource.cxx +++ b/chart2/source/controller/dialogs/tp_DataSource.cxx @@ -273,6 +273,34 @@ DataSourceTabPage::DataSourceTabPage( m_pBTN_DOWN->SetAccessibleName(SCH_RESSTR(STR_BUTTON_DOWN)); } +DataSourceTabPage::~DataSourceTabPage() +{ + dispose(); +} + +void DataSourceTabPage::dispose() +{ + m_pFT_CAPTION.clear(); + m_pFT_SERIES.clear(); + m_pLB_SERIES.clear(); + m_pBTN_ADD.clear(); + m_pBTN_REMOVE.clear(); + m_pBTN_UP.clear(); + m_pBTN_DOWN.clear(); + m_pFT_ROLE.clear(); + m_pLB_ROLE.clear(); + m_pFT_RANGE.clear(); + m_pEDT_RANGE.clear(); + m_pIMB_RANGE_MAIN.clear(); + m_pFT_CATEGORIES.clear(); + m_pFT_DATALABELS.clear(); + m_pEDT_CATEGORIES.clear(); + m_pIMB_RANGE_CAT.clear(); + m_pCurrentRangeChoosingField.clear(); + m_pParentDialog.clear(); + ::svt::OWizardPage::dispose(); +} + void DataSourceTabPage::ActivatePage() { OWizardPage::ActivatePage(); diff --git a/chart2/source/controller/dialogs/tp_DataSource.hxx b/chart2/source/controller/dialogs/tp_DataSource.hxx index b1ad81353d9e..59b92bf840c3 100644 --- a/chart2/source/controller/dialogs/tp_DataSource.hxx +++ b/chart2/source/controller/dialogs/tp_DataSource.hxx @@ -58,6 +58,8 @@ public: ChartTypeTemplateProvider* pTemplateProvider, Dialog * pParentDialog, bool bHideDescription = false ); + virtual ~DataSourceTabPage(); + virtual void dispose() SAL_OVERRIDE; void commitPage(); @@ -117,34 +119,34 @@ protected: void fillRoleListBox(); private: - FixedText* m_pFT_CAPTION; - FixedText* m_pFT_SERIES; - SvTreeListBox* m_pLB_SERIES; - PushButton* m_pBTN_ADD; - PushButton* m_pBTN_REMOVE; - PushButton* m_pBTN_UP; - PushButton* m_pBTN_DOWN; - - FixedText* m_pFT_ROLE; - SvTabListBox* m_pLB_ROLE; - FixedText* m_pFT_RANGE; - Edit* m_pEDT_RANGE; - PushButton* m_pIMB_RANGE_MAIN; - - FixedText* m_pFT_CATEGORIES; - FixedText* m_pFT_DATALABELS;//used for xy charts - Edit* m_pEDT_CATEGORIES; - PushButton* m_pIMB_RANGE_CAT; + VclPtr m_pFT_CAPTION; + VclPtr m_pFT_SERIES; + VclPtr m_pLB_SERIES; + VclPtr m_pBTN_ADD; + VclPtr m_pBTN_REMOVE; + VclPtr m_pBTN_UP; + VclPtr m_pBTN_DOWN; + + VclPtr m_pFT_ROLE; + VclPtr m_pLB_ROLE; + VclPtr m_pFT_RANGE; + VclPtr m_pEDT_RANGE; + VclPtr m_pIMB_RANGE_MAIN; + + VclPtr m_pFT_CATEGORIES; + VclPtr m_pFT_DATALABELS;//used for xy charts + VclPtr m_pEDT_CATEGORIES; + VclPtr m_pIMB_RANGE_CAT; OUString m_aFixedTextRange; ChartTypeTemplateProvider * m_pTemplateProvider; DialogModel & m_rDialogModel; - Edit * m_pCurrentRangeChoosingField; + VclPtr m_pCurrentRangeChoosingField; bool m_bIsDirty; sal_Int32 m_nLastChartTypeGroupIndex; - Dialog * m_pParentDialog; + VclPtr m_pParentDialog; TabPageNotifiable * m_pTabPageNotifiable; }; diff --git a/chart2/source/controller/dialogs/tp_LegendPosition.cxx b/chart2/source/controller/dialogs/tp_LegendPosition.cxx index 707324fb8610..31aef92a297f 100644 --- a/chart2/source/controller/dialogs/tp_LegendPosition.cxx +++ b/chart2/source/controller/dialogs/tp_LegendPosition.cxx @@ -41,6 +41,18 @@ SchLegendPosTabPage::SchLegendPosTabPage(vcl::Window* pWindow, const SfxItemSet& m_pLbTextDirection->SetDropDownLineCount(3); } +SchLegendPosTabPage::~SchLegendPosTabPage() +{ + dispose(); +} + +void SchLegendPosTabPage::dispose() +{ + m_pLbTextDirection.clear(); + SfxTabPage::dispose(); +} + + SfxTabPage* SchLegendPosTabPage::Create(vcl::Window* pWindow, const SfxItemSet* rOutAttrs) { return new SchLegendPosTabPage(pWindow, *rOutAttrs); diff --git a/chart2/source/controller/dialogs/tp_LegendPosition.hxx b/chart2/source/controller/dialogs/tp_LegendPosition.hxx index 0d4f4acf0d07..bbf8e1d54f2b 100644 --- a/chart2/source/controller/dialogs/tp_LegendPosition.hxx +++ b/chart2/source/controller/dialogs/tp_LegendPosition.hxx @@ -33,10 +33,12 @@ class SchLegendPosTabPage : public SfxTabPage private: LegendPositionResources m_aLegendPositionResources; - TextDirectionListBox* m_pLbTextDirection; + VclPtr m_pLbTextDirection; public: SchLegendPosTabPage(vcl::Window* pParent, const SfxItemSet& rInAttrs); + virtual ~SchLegendPosTabPage(); + virtual void dispose() SAL_OVERRIDE; static SfxTabPage* Create(vcl::Window* pParent, const SfxItemSet* rInAttrs); virtual bool FillItemSet(SfxItemSet* rOutAttrs) SAL_OVERRIDE; diff --git a/chart2/source/controller/dialogs/tp_PolarOptions.cxx b/chart2/source/controller/dialogs/tp_PolarOptions.cxx index ff9db6088675..00fc6fe96a62 100644 --- a/chart2/source/controller/dialogs/tp_PolarOptions.cxx +++ b/chart2/source/controller/dialogs/tp_PolarOptions.cxx @@ -44,6 +44,22 @@ PolarOptionsTabPage::PolarOptionsTabPage( vcl::Window* pWindow,const SfxItemSet& m_pAngleDial->SetLinkedField( m_pNF_StartingAngle ); } +PolarOptionsTabPage::~PolarOptionsTabPage() +{ + dispose(); +} + +void PolarOptionsTabPage::dispose() +{ + m_pCB_Clockwise.clear(); + m_pFL_StartingAngle.clear(); + m_pAngleDial.clear(); + m_pNF_StartingAngle.clear(); + m_pFL_PlotOptions.clear(); + m_pCB_IncludeHiddenCells.clear(); + SfxTabPage::dispose(); +} + SfxTabPage* PolarOptionsTabPage::Create( vcl::Window* pWindow,const SfxItemSet* rOutAttrs ) { return new PolarOptionsTabPage( pWindow, *rOutAttrs ); diff --git a/chart2/source/controller/dialogs/tp_PolarOptions.hxx b/chart2/source/controller/dialogs/tp_PolarOptions.hxx index 4ade72189cf4..29e672857bb1 100644 --- a/chart2/source/controller/dialogs/tp_PolarOptions.hxx +++ b/chart2/source/controller/dialogs/tp_PolarOptions.hxx @@ -33,18 +33,20 @@ class PolarOptionsTabPage : public SfxTabPage public: PolarOptionsTabPage(vcl::Window* pParent, const SfxItemSet& rInAttrs ); + virtual ~PolarOptionsTabPage(); + virtual void dispose() SAL_OVERRIDE; static SfxTabPage* Create(vcl::Window* pParent, const SfxItemSet* rInAttrs); virtual bool FillItemSet(SfxItemSet* rOutAttrs) SAL_OVERRIDE; virtual void Reset(const SfxItemSet* rInAttrs) SAL_OVERRIDE; private: - CheckBox* m_pCB_Clockwise; - VclFrame* m_pFL_StartingAngle; - svx::DialControl* m_pAngleDial; - NumericField* m_pNF_StartingAngle; - VclFrame* m_pFL_PlotOptions; - CheckBox* m_pCB_IncludeHiddenCells; + VclPtr m_pCB_Clockwise; + VclPtr m_pFL_StartingAngle; + VclPtr m_pAngleDial; + VclPtr m_pNF_StartingAngle; + VclPtr m_pFL_PlotOptions; + VclPtr m_pCB_IncludeHiddenCells; }; } //namespace chart diff --git a/chart2/source/controller/dialogs/tp_RangeChooser.cxx b/chart2/source/controller/dialogs/tp_RangeChooser.cxx index 108aac0c77a8..700c3e04556f 100644 --- a/chart2/source/controller/dialogs/tp_RangeChooser.cxx +++ b/chart2/source/controller/dialogs/tp_RangeChooser.cxx @@ -122,6 +122,30 @@ RangeChooserTabPage::RangeChooserTabPage( vcl::Window* pParent m_pEd_TimeEnd->SetModifyHdl( LINK( this, RangeChooserTabPage, ControlChangedHdl ) ); } +RangeChooserTabPage::~RangeChooserTabPage() +{ + dispose(); +} + +void RangeChooserTabPage::dispose() +{ + m_pFT_Caption.clear(); + m_pFT_Range.clear(); + m_pED_Range.clear(); + m_pIB_Range.clear(); + m_pRB_Rows.clear(); + m_pRB_Columns.clear(); + m_pCB_FirstRowAsLabel.clear(); + m_pCB_FirstColumnAsLabel.clear(); + m_pFTTitle.clear(); + m_pCB_TimeBased.clear(); + m_pEd_TimeStart.clear(); + m_pEd_TimeEnd.clear(); + m_pParentDialog.clear(); + OWizardPage::dispose(); +} + + void RangeChooserTabPage::ActivatePage() { OWizardPage::ActivatePage(); diff --git a/chart2/source/controller/dialogs/tp_RangeChooser.hxx b/chart2/source/controller/dialogs/tp_RangeChooser.hxx index f7a0791fd6ff..5bcda3593f8b 100644 --- a/chart2/source/controller/dialogs/tp_RangeChooser.hxx +++ b/chart2/source/controller/dialogs/tp_RangeChooser.hxx @@ -48,6 +48,8 @@ public: , ChartTypeTemplateProvider* pTemplateProvider , Dialog * pParentDialog , bool bHideDescription = false ); + virtual ~RangeChooserTabPage(); + virtual void dispose() SAL_OVERRIDE; //RangeSelectionListenerParent virtual void listeningFinished( const OUString & rNewRange ) SAL_OVERRIDE; @@ -75,21 +77,21 @@ protected: //methods protected: //member - FixedText* m_pFT_Caption; - FixedText* m_pFT_Range; - Edit* m_pED_Range; - PushButton* m_pIB_Range; + VclPtr m_pFT_Caption; + VclPtr m_pFT_Range; + VclPtr m_pED_Range; + VclPtr m_pIB_Range; - RadioButton* m_pRB_Rows; - RadioButton* m_pRB_Columns; + VclPtr m_pRB_Rows; + VclPtr m_pRB_Columns; - CheckBox* m_pCB_FirstRowAsLabel; - CheckBox* m_pCB_FirstColumnAsLabel; - FixedText* m_pFTTitle; + VclPtr m_pCB_FirstRowAsLabel; + VclPtr m_pCB_FirstColumnAsLabel; + VclPtr m_pFTTitle; - CheckBox* m_pCB_TimeBased; - Edit* m_pEd_TimeStart; - Edit* m_pEd_TimeEnd; + VclPtr m_pCB_TimeBased; + VclPtr m_pEd_TimeStart; + VclPtr m_pEd_TimeEnd; sal_Int32 m_nChangingControlCalls; bool m_bIsDirty; @@ -105,7 +107,7 @@ protected: //member ChartTypeTemplateProvider* m_pTemplateProvider; DialogModel & m_rDialogModel; - Dialog * m_pParentDialog; + VclPtr m_pParentDialog; TabPageNotifiable * m_pTabPageNotifiable; }; diff --git a/chart2/source/controller/dialogs/tp_Scale.cxx b/chart2/source/controller/dialogs/tp_Scale.cxx index bb92e78c095d..9db6bda24daf 100644 --- a/chart2/source/controller/dialogs/tp_Scale.cxx +++ b/chart2/source/controller/dialogs/tp_Scale.cxx @@ -122,6 +122,41 @@ ScaleTabPage::ScaleTabPage(vcl::Window* pWindow,const SfxItemSet& rInAttrs) : HideAllControls(); } +ScaleTabPage::~ScaleTabPage() +{ + dispose(); +} + +void ScaleTabPage::dispose() +{ + m_pCbxReverse.clear(); + m_pCbxLogarithm.clear(); + m_pBxType.clear(); + m_pLB_AxisType.clear(); + m_pBxMinMax.clear(); + m_pFmtFldMin.clear(); + m_pCbxAutoMin.clear(); + m_pFmtFldMax.clear(); + m_pCbxAutoMax.clear(); + m_pBxResolution.clear(); + m_pLB_TimeResolution.clear(); + m_pCbx_AutoTimeResolution.clear(); + m_pTxtMain.clear(); + m_pFmtFldStepMain.clear(); + m_pMt_MainDateStep.clear(); + m_pLB_MainTimeUnit.clear(); + m_pCbxAutoStepMain.clear(); + m_pTxtHelpCount.clear(); + m_pTxtHelp.clear(); + m_pMtStepHelp.clear(); + m_pLB_HelpTimeUnit.clear(); + m_pCbxAutoStepHelp.clear(); + m_pFmtFldOrigin.clear(); + m_pCbxAutoOrigin.clear(); + m_pBxOrigin.clear(); + SfxTabPage::dispose(); +} + IMPL_LINK( ScaleTabPage, FmtFieldModifiedHdl, FormattedField*, pFmtFied ) { if( pFmtFied ) diff --git a/chart2/source/controller/dialogs/tp_Scale.hxx b/chart2/source/controller/dialogs/tp_Scale.hxx index ff8bbe7e9d1b..529641da2a6e 100644 --- a/chart2/source/controller/dialogs/tp_Scale.hxx +++ b/chart2/source/controller/dialogs/tp_Scale.hxx @@ -33,6 +33,8 @@ class ScaleTabPage : public SfxTabPage { public: ScaleTabPage( vcl::Window* pParent, const SfxItemSet& rInAttrs ); + virtual ~ScaleTabPage(); + virtual void dispose() SAL_OVERRIDE; static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rInAttrs ); virtual bool FillItemSet( SfxItemSet* rOutAttrs ) SAL_OVERRIDE; @@ -48,38 +50,38 @@ public: virtual void StateChanged( StateChangedType nType ) SAL_OVERRIDE; private: - CheckBox* m_pCbxReverse; - CheckBox* m_pCbxLogarithm; - - VclBox* m_pBxType; - ListBox* m_pLB_AxisType; - - VclGrid* m_pBxMinMax; - FormattedField* m_pFmtFldMin; - CheckBox* m_pCbxAutoMin; - - FormattedField* m_pFmtFldMax; - CheckBox* m_pCbxAutoMax; - - VclBox* m_pBxResolution; - ListBox* m_pLB_TimeResolution; - CheckBox* m_pCbx_AutoTimeResolution; - - FixedText* m_pTxtMain; - FormattedField* m_pFmtFldStepMain; - MetricField* m_pMt_MainDateStep; - ListBox* m_pLB_MainTimeUnit; - CheckBox* m_pCbxAutoStepMain; - - FixedText* m_pTxtHelpCount; - FixedText* m_pTxtHelp; - MetricField* m_pMtStepHelp; - ListBox* m_pLB_HelpTimeUnit; - CheckBox* m_pCbxAutoStepHelp; - - FormattedField* m_pFmtFldOrigin; - CheckBox* m_pCbxAutoOrigin; - VclBox* m_pBxOrigin; + VclPtr m_pCbxReverse; + VclPtr m_pCbxLogarithm; + + VclPtr m_pBxType; + VclPtr m_pLB_AxisType; + + VclPtr m_pBxMinMax; + VclPtr m_pFmtFldMin; + VclPtr m_pCbxAutoMin; + + VclPtr m_pFmtFldMax; + VclPtr m_pCbxAutoMax; + + VclPtr m_pBxResolution; + VclPtr m_pLB_TimeResolution; + VclPtr m_pCbx_AutoTimeResolution; + + VclPtr m_pTxtMain; + VclPtr m_pFmtFldStepMain; + VclPtr m_pMt_MainDateStep; + VclPtr m_pLB_MainTimeUnit; + VclPtr m_pCbxAutoStepMain; + + VclPtr m_pTxtHelpCount; + VclPtr m_pTxtHelp; + VclPtr m_pMtStepHelp; + VclPtr m_pLB_HelpTimeUnit; + VclPtr m_pCbxAutoStepHelp; + + VclPtr m_pFmtFldOrigin; + VclPtr m_pCbxAutoOrigin; + VclPtr m_pBxOrigin; double fMin; double fMax; diff --git a/chart2/source/controller/dialogs/tp_SeriesToAxis.cxx b/chart2/source/controller/dialogs/tp_SeriesToAxis.cxx index 4f4a986df57a..0a5b50485d71 100644 --- a/chart2/source/controller/dialogs/tp_SeriesToAxis.cxx +++ b/chart2/source/controller/dialogs/tp_SeriesToAxis.cxx @@ -63,6 +63,30 @@ SchOptionTabPage::SchOptionTabPage(vcl::Window* pWindow,const SfxItemSet& rInAtt m_pRbtAxis2->SetClickHdl( LINK( this, SchOptionTabPage, EnableHdl )); } +SchOptionTabPage::~SchOptionTabPage() +{ + dispose(); +} + +void SchOptionTabPage::dispose() +{ + m_pGrpAxis.clear(); + m_pRbtAxis1.clear(); + m_pRbtAxis2.clear(); + m_pGrpBar.clear(); + m_pMTGap.clear(); + m_pMTOverlap.clear(); + m_pCBConnect.clear(); + m_pCBAxisSideBySide.clear(); + m_pGrpPlotOptions.clear(); + m_pGridPlotOptions.clear(); + m_pRB_DontPaint.clear(); + m_pRB_AssumeZero.clear(); + m_pRB_ContinueLine.clear(); + m_pCBIncludeHiddenCells.clear(); + SfxTabPage::dispose(); +} + IMPL_LINK_NOARG(SchOptionTabPage, EnableHdl) { if( m_nAllSeriesAxisIndex == 0 ) diff --git a/chart2/source/controller/dialogs/tp_SeriesToAxis.hxx b/chart2/source/controller/dialogs/tp_SeriesToAxis.hxx index f11c8e5ea24a..b50f90fff4fe 100644 --- a/chart2/source/controller/dialogs/tp_SeriesToAxis.hxx +++ b/chart2/source/controller/dialogs/tp_SeriesToAxis.hxx @@ -31,6 +31,8 @@ class SchOptionTabPage : public SfxTabPage { public: SchOptionTabPage(vcl::Window* pParent, const SfxItemSet& rInAttrs); + virtual ~SchOptionTabPage(); + virtual void dispose() SAL_OVERRIDE; static SfxTabPage* Create(vcl::Window* pParent, const SfxItemSet* rInAttrs); virtual bool FillItemSet(SfxItemSet* rOutAttrs) SAL_OVERRIDE; @@ -42,23 +44,23 @@ private: //methods void AdaptControlPositionsAndVisibility(); private: //member - VclFrame* m_pGrpAxis; - RadioButton* m_pRbtAxis1; - RadioButton* m_pRbtAxis2; - - VclFrame* m_pGrpBar; - MetricField* m_pMTGap; - MetricField* m_pMTOverlap; - CheckBox* m_pCBConnect; - CheckBox* m_pCBAxisSideBySide; - - VclFrame* m_pGrpPlotOptions; - VclGrid* m_pGridPlotOptions; - RadioButton* m_pRB_DontPaint; - RadioButton* m_pRB_AssumeZero; - RadioButton* m_pRB_ContinueLine; - - CheckBox* m_pCBIncludeHiddenCells; + VclPtr m_pGrpAxis; + VclPtr m_pRbtAxis1; + VclPtr m_pRbtAxis2; + + VclPtr m_pGrpBar; + VclPtr m_pMTGap; + VclPtr m_pMTOverlap; + VclPtr m_pCBConnect; + VclPtr m_pCBAxisSideBySide; + + VclPtr m_pGrpPlotOptions; + VclPtr m_pGridPlotOptions; + VclPtr m_pRB_DontPaint; + VclPtr m_pRB_AssumeZero; + VclPtr m_pRB_ContinueLine; + + VclPtr m_pCBIncludeHiddenCells; DECL_LINK(EnableHdl, void * ); diff --git a/chart2/source/controller/dialogs/tp_TitleRotation.cxx b/chart2/source/controller/dialogs/tp_TitleRotation.cxx index a83373dcbc8b..c69eb46a482b 100644 --- a/chart2/source/controller/dialogs/tp_TitleRotation.cxx +++ b/chart2/source/controller/dialogs/tp_TitleRotation.cxx @@ -64,6 +64,13 @@ void SchAlignmentTabPage::dispose() { delete m_pOrientHlp; m_pOrientHlp = NULL; + m_pCtrlDial.clear(); + m_pFtRotate.clear(); + m_pNfRotate.clear(); + m_pCbStacked.clear(); + m_pFtTextDirection.clear(); + m_pLbTextDirection.clear(); + m_pFtABCD.clear(); SfxTabPage::dispose(); } diff --git a/chart2/source/controller/dialogs/tp_TitleRotation.hxx b/chart2/source/controller/dialogs/tp_TitleRotation.hxx index e5d2e240a153..8450d6a4a202 100644 --- a/chart2/source/controller/dialogs/tp_TitleRotation.hxx +++ b/chart2/source/controller/dialogs/tp_TitleRotation.hxx @@ -31,14 +31,14 @@ namespace chart class SchAlignmentTabPage : public SfxTabPage { private: - svx::DialControl* m_pCtrlDial; - FixedText* m_pFtRotate; - NumericField* m_pNfRotate; - TriStateBox* m_pCbStacked; + VclPtr m_pCtrlDial; + VclPtr m_pFtRotate; + VclPtr m_pNfRotate; + VclPtr m_pCbStacked; svx::OrientationHelper* m_pOrientHlp; - FixedText* m_pFtTextDirection; - TextDirectionListBox* m_pLbTextDirection; - FixedText* m_pFtABCD; + VclPtr m_pFtTextDirection; + VclPtr m_pLbTextDirection; + VclPtr m_pFtABCD; public: SchAlignmentTabPage(vcl::Window* pParent, const SfxItemSet& rInAttrs, bool bWithRotation = true); diff --git a/chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.cxx b/chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.cxx index 90088b0b66ae..23986e1f2690 100644 --- a/chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.cxx +++ b/chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.cxx @@ -57,6 +57,19 @@ TitlesAndObjectsTabPage::TitlesAndObjectsTabPage( svt::OWizardMachine* pParent m_pCB_Grid_Z->SetToggleHdl( LINK( this, TitlesAndObjectsTabPage, ChangeHdl )); } +TitlesAndObjectsTabPage::~TitlesAndObjectsTabPage() +{ + dispose(); +} + +void TitlesAndObjectsTabPage::dispose() +{ + m_pCB_Grid_X.clear(); + m_pCB_Grid_Y.clear(); + m_pCB_Grid_Z.clear(); + OWizardPage::dispose(); +} + void TitlesAndObjectsTabPage::initializePage() { m_bCommitToModel = false; diff --git a/chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.hxx b/chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.hxx index 26e2cb2aebae..520453ce0452 100644 --- a/chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.hxx +++ b/chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.hxx @@ -44,6 +44,8 @@ public: ::com::sun::star::chart2::XChartDocument >& xChartModel , const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& xContext ); + virtual ~TitlesAndObjectsTabPage(); + virtual void dispose() SAL_OVERRIDE; virtual void initializePage() SAL_OVERRIDE; virtual bool commitPage( ::svt::WizardTypes::CommitPageReason eReason ) SAL_OVERRIDE; @@ -57,9 +59,9 @@ protected: boost::scoped_ptr< TitleResources > m_xTitleResources; boost::scoped_ptr< LegendPositionResources > m_xLegendPositionResources; - CheckBox* m_pCB_Grid_X; - CheckBox* m_pCB_Grid_Y; - CheckBox* m_pCB_Grid_Z; + VclPtr m_pCB_Grid_X; + VclPtr m_pCB_Grid_Y; + VclPtr m_pCB_Grid_Z; ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartDocument > m_xChartModel; diff --git a/chart2/source/controller/inc/dlg_ChartType.hxx b/chart2/source/controller/inc/dlg_ChartType.hxx index 008ba07b3310..d8fecf56782e 100644 --- a/chart2/source/controller/inc/dlg_ChartType.hxx +++ b/chart2/source/controller/inc/dlg_ChartType.hxx @@ -41,7 +41,7 @@ public: virtual void dispose() SAL_OVERRIDE; private: - ChartTypeTabPage* m_pChartTypeTabPage; + VclPtr m_pChartTypeTabPage; ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > m_xChartModel; diff --git a/chart2/source/controller/inc/dlg_CreationWizard_UNO.hxx b/chart2/source/controller/inc/dlg_CreationWizard_UNO.hxx index ce4f638dd442..a71d86aaf3ac 100644 --- a/chart2/source/controller/inc/dlg_CreationWizard_UNO.hxx +++ b/chart2/source/controller/inc/dlg_CreationWizard_UNO.hxx @@ -119,7 +119,7 @@ private: com::sun::star::uno::Reference< com::sun::star::awt::XWindow > m_xParentWindow; - CreationWizard* m_pDialog; + VclPtr m_pDialog; bool m_bUnlockControllersOnExecute; }; diff --git a/chart2/source/controller/inc/dlg_DataEditor.hxx b/chart2/source/controller/inc/dlg_DataEditor.hxx index 4432674fe6be..cff3f4fbbdc0 100644 --- a/chart2/source/controller/inc/dlg_DataEditor.hxx +++ b/chart2/source/controller/inc/dlg_DataEditor.hxx @@ -67,7 +67,7 @@ private: bool m_bReadOnly; boost::scoped_ptr m_xBrwData; - ToolBox* m_pTbxData; + VclPtr m_pTbxData; ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartDocument > m_xChartDoc; ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > diff --git a/chart2/source/controller/inc/dlg_DataSource.hxx b/chart2/source/controller/inc/dlg_DataSource.hxx index 5c6a60d72c36..bc3d22da9c8b 100644 --- a/chart2/source/controller/inc/dlg_DataSource.hxx +++ b/chart2/source/controller/inc/dlg_DataSource.hxx @@ -68,11 +68,11 @@ protected: ::std::unique_ptr< DialogModel > m_apDialogModel; private: - DataSourceTabControl* m_pTabControl; - OKButton* m_pBtnOK; + VclPtr m_pTabControl; + VclPtr m_pBtnOK; - RangeChooserTabPage * m_pRangeChooserTabePage; - DataSourceTabPage * m_pDataSourceTabPage; + VclPtr m_pRangeChooserTabePage; + VclPtr m_pDataSourceTabPage; bool m_bRangeChooserTabIsValid; bool m_bDataSourceTabIsValid; diff --git a/chart2/source/controller/inc/dlg_InsertAxis_Grid.hxx b/chart2/source/controller/inc/dlg_InsertAxis_Grid.hxx index 960edffe422d..1ec0829f4eac 100644 --- a/chart2/source/controller/inc/dlg_InsertAxis_Grid.hxx +++ b/chart2/source/controller/inc/dlg_InsertAxis_Grid.hxx @@ -43,15 +43,17 @@ struct InsertAxisOrGridDialogData class SchAxisDlg : public ModalDialog { protected: - CheckBox* m_pCbPrimaryX; - CheckBox* m_pCbPrimaryY; - CheckBox* m_pCbPrimaryZ; - CheckBox* m_pCbSecondaryX; - CheckBox* m_pCbSecondaryY; - CheckBox* m_pCbSecondaryZ; + VclPtr m_pCbPrimaryX; + VclPtr m_pCbPrimaryY; + VclPtr m_pCbPrimaryZ; + VclPtr m_pCbSecondaryX; + VclPtr m_pCbSecondaryY; + VclPtr m_pCbSecondaryZ; public: SchAxisDlg(vcl::Window* pParent, const InsertAxisOrGridDialogData& rInput, bool bAxisDlg=true); + virtual ~SchAxisDlg(); + virtual void dispose() SAL_OVERRIDE; void getResult( InsertAxisOrGridDialogData& rOutput ); }; diff --git a/chart2/source/controller/inc/dlg_View3D.hxx b/chart2/source/controller/inc/dlg_View3D.hxx index 64228fe8ea85..0ef93e8d1fea 100644 --- a/chart2/source/controller/inc/dlg_View3D.hxx +++ b/chart2/source/controller/inc/dlg_View3D.hxx @@ -47,11 +47,11 @@ public: virtual short Execute() SAL_OVERRIDE; private: - TabControl* m_pTabControl; + VclPtr m_pTabControl; - ThreeD_SceneGeometry_TabPage* m_pGeometry; - ThreeD_SceneAppearance_TabPage* m_pAppearance; - ThreeD_SceneIllumination_TabPage* m_pIllumination; + VclPtr m_pGeometry; + VclPtr m_pAppearance; + VclPtr m_pIllumination; ControllerLockHelper m_aControllerLocker; diff --git a/chart2/source/controller/inc/res_ErrorBar.hxx b/chart2/source/controller/inc/res_ErrorBar.hxx index 0ad485c39990..85917809db48 100644 --- a/chart2/source/controller/inc/res_ErrorBar.hxx +++ b/chart2/source/controller/inc/res_ErrorBar.hxx @@ -67,36 +67,36 @@ public: private: // category - RadioButton* m_pRbNone; - RadioButton* m_pRbConst; - RadioButton* m_pRbPercent; - RadioButton* m_pRbFunction; - RadioButton* m_pRbRange; - ListBox* m_pLbFunction; + VclPtr m_pRbNone; + VclPtr m_pRbConst; + VclPtr m_pRbPercent; + VclPtr m_pRbFunction; + VclPtr m_pRbRange; + VclPtr m_pLbFunction; // parameters - VclFrame* m_pFlParameters; - VclBox* m_pBxPositive; - MetricField* m_pMfPositive; - Edit* m_pEdRangePositive; - PushButton* m_pIbRangePositive; - VclBox* m_pBxNegative; - MetricField* m_pMfNegative; - Edit* m_pEdRangeNegative; - PushButton* m_pIbRangeNegative; - CheckBox* m_pCbSyncPosNeg; + VclPtr m_pFlParameters; + VclPtr m_pBxPositive; + VclPtr m_pMfPositive; + VclPtr m_pEdRangePositive; + VclPtr m_pIbRangePositive; + VclPtr m_pBxNegative; + VclPtr m_pMfNegative; + VclPtr m_pEdRangeNegative; + VclPtr m_pIbRangeNegative; + VclPtr m_pCbSyncPosNeg; // indicator - RadioButton* m_pRbBoth; - RadioButton* m_pRbPositive; - RadioButton* m_pRbNegative; - FixedImage* m_pFiBoth; - FixedImage* m_pFiPositive; - FixedImage* m_pFiNegative; + VclPtr m_pRbBoth; + VclPtr m_pRbPositive; + VclPtr m_pRbNegative; + VclPtr m_pFiBoth; + VclPtr m_pFiPositive; + VclPtr m_pFiNegative; - FixedText* m_pUIStringPos; - FixedText* m_pUIStringNeg; - FixedText* m_pUIStringRbRange; + VclPtr m_pUIStringPos; + VclPtr m_pUIStringNeg; + VclPtr m_pUIStringRbRange; SvxChartKindError m_eErrorKind; SvxChartIndicate m_eIndicate; @@ -116,9 +116,9 @@ private: double m_fPlusValue; double m_fMinusValue; - Dialog * m_pParentDialog; + VclPtr m_pParentDialog; boost::scoped_ptr< RangeSelectionHelper > m_apRangeSelectionHelper; - Edit * m_pCurrentRangeChoosingField; + VclPtr m_pCurrentRangeChoosingField; bool m_bHasInternalDataProvider; bool m_bEnableDataTableDialog; diff --git a/chart2/source/controller/inc/res_LegendPosition.hxx b/chart2/source/controller/inc/res_LegendPosition.hxx index c8292db200af..7801895a6308 100644 --- a/chart2/source/controller/inc/res_LegendPosition.hxx +++ b/chart2/source/controller/inc/res_LegendPosition.hxx @@ -60,12 +60,12 @@ private: ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext> m_xCC; - CheckBox* m_pCbxShow; + VclPtr m_pCbxShow; - RadioButton* m_pRbtLeft; - RadioButton* m_pRbtRight; - RadioButton* m_pRbtTop; - RadioButton* m_pRbtBottom; + VclPtr m_pRbtLeft; + VclPtr m_pRbtRight; + VclPtr m_pRbtTop; + VclPtr m_pRbtBottom; Link m_aChangeLink; }; diff --git a/chart2/source/controller/inc/res_Titles.hxx b/chart2/source/controller/inc/res_Titles.hxx index 1e4e8c67cd91..396c87af598f 100644 --- a/chart2/source/controller/inc/res_Titles.hxx +++ b/chart2/source/controller/inc/res_Titles.hxx @@ -40,22 +40,22 @@ public: void ClearModifyFlag(); private: - FixedText* m_pFT_Main; - FixedText* m_pFT_Sub; - Edit* m_pEd_Main; - Edit* m_pEd_Sub; + VclPtr m_pFT_Main; + VclPtr m_pFT_Sub; + VclPtr m_pEd_Main; + VclPtr m_pEd_Sub; - FixedText* m_pFT_XAxis; - FixedText* m_pFT_YAxis; - FixedText* m_pFT_ZAxis; - Edit* m_pEd_XAxis; - Edit* m_pEd_YAxis; - Edit* m_pEd_ZAxis; + VclPtr m_pFT_XAxis; + VclPtr m_pFT_YAxis; + VclPtr m_pFT_ZAxis; + VclPtr m_pEd_XAxis; + VclPtr m_pEd_YAxis; + VclPtr m_pEd_ZAxis; - FixedText* m_pFT_SecondaryXAxis; - FixedText* m_pFT_SecondaryYAxis; - Edit* m_pEd_SecondaryXAxis; - Edit* m_pEd_SecondaryYAxis; + VclPtr m_pFT_SecondaryXAxis; + VclPtr m_pFT_SecondaryYAxis; + VclPtr m_pEd_SecondaryXAxis; + VclPtr m_pEd_SecondaryYAxis; }; } //namespace chart diff --git a/chart2/source/controller/main/ChartController.hxx b/chart2/source/controller/main/ChartController.hxx index 81382eadaab1..827e549c8e6b 100644 --- a/chart2/source/controller/main/ChartController.hxx +++ b/chart2/source/controller/main/ChartController.hxx @@ -508,7 +508,7 @@ private: TheModelRef m_aModel; //view - ChartWindow* m_pChartWindow; + VclPtr m_pChartWindow; ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > m_xViewWindow; ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > m_xChartView; diff --git a/chart2/source/controller/main/ChartWindow.cxx b/chart2/source/controller/main/ChartWindow.cxx index 4a37ec38e583..d5275e1a0808 100644 --- a/chart2/source/controller/main/ChartWindow.cxx +++ b/chart2/source/controller/main/ChartWindow.cxx @@ -64,7 +64,7 @@ ChartWindow::ChartWindow( ChartController* pController, vcl::Window* pParent, Wi { m_pOpenGLWindow->Show(); uno::Reference< chart2::X3DChartWindowProvider > x3DWindowProvider(pController->getModel(), uno::UNO_QUERY_THROW); - sal_uInt64 nWindowPtr = reinterpret_cast(m_pOpenGLWindow); + sal_uInt64 nWindowPtr = reinterpret_cast(m_pOpenGLWindow.get()); x3DWindowProvider->setWindow(nWindowPtr); x3DWindowProvider->update(); } @@ -83,8 +83,7 @@ void ChartWindow::dispose() x3DWindowProvider->setWindow(0); x3DWindowProvider->update(); } - delete m_pOpenGLWindow; - m_pOpenGLWindow = NULL; + m_pOpenGLWindow.clear(); vcl::Window::dispose(); } diff --git a/chart2/source/controller/main/ChartWindow.hxx b/chart2/source/controller/main/ChartWindow.hxx index 73be579f6d6d..cd0afaa07d0a 100644 --- a/chart2/source/controller/main/ChartWindow.hxx +++ b/chart2/source/controller/main/ChartWindow.hxx @@ -68,7 +68,7 @@ public: private: ChartController* m_pWindowController; bool m_bInPaint; - OpenGLWindow* m_pOpenGLWindow; + VclPtr m_pOpenGLWindow; void adjustHighContrastMode(); }; diff --git a/chart2/source/controller/main/ShapeController.cxx b/chart2/source/controller/main/ShapeController.cxx index 52b5f1f6d4e4..afea41029282 100644 --- a/chart2/source/controller/main/ShapeController.cxx +++ b/chart2/source/controller/main/ShapeController.cxx @@ -252,7 +252,7 @@ void ShapeController::executeDispatch_FormatLine() SolarMutexGuard aGuard; if ( m_pChartController ) { - vcl::Window* pParent = dynamic_cast< vcl::Window* >( m_pChartController->m_pChartWindow ); + vcl::Window* pParent = dynamic_cast< vcl::Window* >( m_pChartController->m_pChartWindow.get() ); DrawModelWrapper* pDrawModelWrapper = m_pChartController->GetDrawModelWrapper(); DrawViewWrapper* pDrawViewWrapper = m_pChartController->GetDrawViewWrapper(); if ( pParent && pDrawModelWrapper && pDrawViewWrapper ) @@ -292,7 +292,7 @@ void ShapeController::executeDispatch_FormatArea() SolarMutexGuard aGuard; if ( m_pChartController ) { - vcl::Window* pParent = dynamic_cast< vcl::Window* >( m_pChartController->m_pChartWindow ); + vcl::Window* pParent = dynamic_cast< vcl::Window* >( m_pChartController->m_pChartWindow.get() ); DrawModelWrapper* pDrawModelWrapper = m_pChartController->GetDrawModelWrapper(); DrawViewWrapper* pDrawViewWrapper = m_pChartController->GetDrawViewWrapper(); if ( pParent && pDrawModelWrapper && pDrawViewWrapper ) @@ -335,7 +335,7 @@ void ShapeController::executeDispatch_TextAttributes() SolarMutexGuard aGuard; if ( m_pChartController ) { - vcl::Window* pParent = dynamic_cast< vcl::Window* >( m_pChartController->m_pChartWindow ); + vcl::Window* pParent = dynamic_cast< vcl::Window* >( m_pChartController->m_pChartWindow.get() ); DrawViewWrapper* pDrawViewWrapper = m_pChartController->GetDrawViewWrapper(); if ( pParent && pDrawViewWrapper ) { @@ -372,7 +372,7 @@ void ShapeController::executeDispatch_TransformDialog() SolarMutexGuard aGuard; if ( m_pChartController ) { - vcl::Window* pParent = dynamic_cast< vcl::Window* >( m_pChartController->m_pChartWindow ); + vcl::Window* pParent = dynamic_cast< vcl::Window* >( m_pChartController->m_pChartWindow.get() ); DrawViewWrapper* pDrawViewWrapper = m_pChartController->GetDrawViewWrapper(); if ( pParent && pDrawViewWrapper ) { @@ -541,7 +541,7 @@ void ShapeController::executeDispatch_FontDialog() SolarMutexGuard aGuard; if ( m_pChartController ) { - vcl::Window* pParent = dynamic_cast< vcl::Window* >( m_pChartController->m_pChartWindow ); + vcl::Window* pParent = dynamic_cast< vcl::Window* >( m_pChartController->m_pChartWindow.get() ); DrawModelWrapper* pDrawModelWrapper = m_pChartController->GetDrawModelWrapper(); DrawViewWrapper* pDrawViewWrapper = m_pChartController->GetDrawViewWrapper(); if ( pParent && pDrawModelWrapper && pDrawViewWrapper ) @@ -564,7 +564,7 @@ void ShapeController::executeDispatch_ParagraphDialog() SolarMutexGuard aGuard; if ( m_pChartController ) { - vcl::Window* pParent = dynamic_cast< vcl::Window* >( m_pChartController->m_pChartWindow ); + vcl::Window* pParent = dynamic_cast< vcl::Window* >( m_pChartController->m_pChartWindow.get() ); DrawViewWrapper* pDrawViewWrapper = m_pChartController->GetDrawViewWrapper(); if ( pParent && pDrawViewWrapper ) { diff --git a/chart2/source/view/charttypes/GL3DBarChart.cxx b/chart2/source/view/charttypes/GL3DBarChart.cxx index 6b778138309c..3fe29b0d7c0b 100644 --- a/chart2/source/view/charttypes/GL3DBarChart.cxx +++ b/chart2/source/view/charttypes/GL3DBarChart.cxx @@ -1487,7 +1487,7 @@ IMPL_LINK_NOARG(GL3DBarChart, UpdateTimerHdl) void GL3DBarChart::setOpenGLWindow(OpenGLWindow* pWindow) { - if (mpWindow != pWindow) + if (mpWindow.get() != pWindow) { mpWindow = pWindow; Size aSize = mpWindow->GetSizePixel(); diff --git a/chart2/source/view/inc/GL3DBarChart.hxx b/chart2/source/view/inc/GL3DBarChart.hxx index c68a38510d66..eaff13a4ed93 100644 --- a/chart2/source/view/inc/GL3DBarChart.hxx +++ b/chart2/source/view/inc/GL3DBarChart.hxx @@ -124,7 +124,7 @@ private: boost::ptr_vector maShapes; boost::scoped_ptr mpRenderer; - OpenGLWindow* mpWindow; + VclPtr mpWindow; opengl3D::Camera* mpCamera; bool mbValidContext; diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx index b9a1e37f348e..9ac3ad84d253 100644 --- a/chart2/source/view/main/ChartView.cxx +++ b/chart2/source/view/main/ChartView.cxx @@ -1090,7 +1090,7 @@ public: private: ChartView* mpView; bool mbContextDestroyed; - OpenGLWindow* mpWindow; + VclPtr mpWindow; }; GL2DRenderer::GL2DRenderer(ChartView* pView): diff --git a/compilerplugins/clang/vclwidgets.cxx b/compilerplugins/clang/vclwidgets.cxx index bf1f86e441d9..ba7da08dbc43 100644 --- a/compilerplugins/clang/vclwidgets.cxx +++ b/compilerplugins/clang/vclwidgets.cxx @@ -8,6 +8,7 @@ */ #include +#include #include "plugin.hxx" #include "compat.hxx" @@ -41,6 +42,8 @@ public: bool VisitCXXDestructorDecl(const CXXDestructorDecl *); + bool VisitCXXDeleteExpr(const CXXDeleteExpr *); + private: bool isDisposeCallingSuperclassDispose(const CXXMethodDecl* pMethodDecl); }; @@ -55,10 +58,11 @@ bool BaseCheckNotWindowSubclass(const CXXRecordDecl *BaseDefinition, void *) { } bool isDerivedFromWindow(const CXXRecordDecl *decl) { - if (!decl->hasDefinition()) - return false; if (decl->getQualifiedNameAsString().compare("vcl::Window") == 0) return true; + if (!decl->hasDefinition()) { + return false; + } if (// not sure what hasAnyDependentBases() does, // but it avoids classes we don't want, e.g. WeakAggComponentImplHelper1 !decl->hasAnyDependentBases() && @@ -68,9 +72,11 @@ bool isDerivedFromWindow(const CXXRecordDecl *decl) { return false; } -bool isPointerToWindowSubclass(const QualType& pType) { - if (!pType->isPointerType()) +bool isPointerToWindowSubclass(const Type* pType0) { + const Type* pType = pType0->getUnqualifiedDesugaredType(); + if (!pType->isPointerType()) { return false; + } QualType pointeeType = pType->getPointeeType(); const RecordType *recordType = pointeeType->getAs(); if (recordType == nullptr) { @@ -80,7 +86,27 @@ bool isPointerToWindowSubclass(const QualType& pType) { if (recordDecl == nullptr) { return false; } - return isDerivedFromWindow(recordDecl); + bool b = isDerivedFromWindow(recordDecl); + return b; +} + +bool containsPointerToWindowSubclass(const Type* pType0) { + const Type* pType = pType0->getUnqualifiedDesugaredType(); + const CXXRecordDecl* pRecordDecl = pType->getAsCXXRecordDecl(); + if (pRecordDecl) { + const ClassTemplateSpecializationDecl* pTemplate = dyn_cast(pRecordDecl); + if (pTemplate) { + for(unsigned i=0; igetTemplateArgs().size(); ++i) { + const TemplateArgument& rArg = pTemplate->getTemplateArgs()[i]; + if (rArg.getKind() == TemplateArgument::ArgKind::Type && + containsPointerToWindowSubclass(rArg.getAsType().getTypePtr())) + { + return true; + } + } + } + } + return isPointerToWindowSubclass(pType); } bool VCLWidgets::VisitCXXDestructorDecl(const CXXDestructorDecl* pCXXDestructorDecl) @@ -88,7 +114,7 @@ bool VCLWidgets::VisitCXXDestructorDecl(const CXXDestructorDecl* pCXXDestructorD if (ignoreLocation(pCXXDestructorDecl)) { return true; } - if (!pCXXDestructorDecl->hasBody()) { + if (!pCXXDestructorDecl->isThisDeclarationADefinition()) { return true; } const CXXRecordDecl * pRecordDecl = pCXXDestructorDecl->getParent(); @@ -120,20 +146,20 @@ bool VCLWidgets::VisitCXXDestructorDecl(const CXXDestructorDecl* pCXXDestructorD } const CompoundStmt *pCompoundStatement = dyn_cast(pCXXDestructorDecl->getBody()); // having an empty body and no dispose() method is fine - if (!foundVclPtrField && !foundDispose && pCompoundStatement->size() == 0) { + if (!foundVclPtrField && !foundDispose && pCompoundStatement && pCompoundStatement->size() == 0) { return true; } - if (foundVclPtrField && pCompoundStatement->size() == 0) { + if (foundVclPtrField && pCompoundStatement && pCompoundStatement->size() == 0) { report( DiagnosticsEngine::Warning, "vcl::Window subclass with VclPtr field must call dispose() from it's destructor.", - pCXXDestructorDecl->getBody()->getLocStart()) - << pCXXDestructorDecl->getBody()->getSourceRange(); + pCXXDestructorDecl->getLocStart()) + << pCXXDestructorDecl->getSourceRange(); return true; } // check that the destructor for a vcl::Window subclass does nothing except call into the dispose() method bool ok = false; - if (pCompoundStatement->size() == 1) { + if (pCompoundStatement && pCompoundStatement->size() == 1) { const CXXMemberCallExpr *pCallExpr = dyn_cast(*pCompoundStatement->body_begin()); if (pCallExpr) { ok = true; @@ -143,9 +169,8 @@ bool VCLWidgets::VisitCXXDestructorDecl(const CXXDestructorDecl* pCXXDestructorD report( DiagnosticsEngine::Warning, "vcl::Window subclass should have nothing in it's destructor but a call to dispose().", - pCXXDestructorDecl->getBody()->getLocStart()) - << pCXXDestructorDecl->getBody()->getSourceRange() - << pCXXDestructorDecl->getCanonicalDecl()->getSourceRange(); + pCXXDestructorDecl->getLocStart()) + << pCXXDestructorDecl->getSourceRange(); return true; } return true; @@ -183,13 +208,13 @@ bool VCLWidgets::VisitFieldDecl(const FieldDecl * fieldDecl) { if (fieldDecl->isBitField()) { return true; } - if (isPointerToWindowSubclass(fieldDecl->getType())) { -/* report( - DiagnosticsEngine::Remark, + if (containsPointerToWindowSubclass(fieldDecl->getType().getTypePtr())) { + report( + DiagnosticsEngine::Warning, "vcl::Window subclass declared as a pointer field, should be wrapped in VclPtr.", fieldDecl->getLocation()) << fieldDecl->getSourceRange(); - return true;*/ + return true; } const RecordType *recordType = fieldDecl->getType()->getAs(); @@ -245,7 +270,15 @@ bool VCLWidgets::VisitParmVarDecl(ParmVarDecl const * pvDecl) && pMethodDecl->getParent()->getQualifiedNameAsString().find("VclPtr") != std::string::npos) { return true; } - if (pvDecl->getType().getAsString().find("VclPtr") != std::string::npos) { + // we exclude this method in VclBuilder because it's so useful to have it like this + if (pMethodDecl + && pMethodDecl->getNameAsString() == "get" + && (pMethodDecl->getParent()->getQualifiedNameAsString() == "VclBuilder" + || pMethodDecl->getParent()->getQualifiedNameAsString() == "VclBuilderContainer")) + { + return true; + } + if (!pvDecl->getType()->isReferenceType() && pvDecl->getType().getAsString().find("VclPtr") != std::string::npos) { report( DiagnosticsEngine::Warning, "vcl::Window subclass passed as a VclPtr parameter, should be passed as a raw pointer.", @@ -255,6 +288,43 @@ bool VCLWidgets::VisitParmVarDecl(ParmVarDecl const * pvDecl) return true; } +static void findDisposeAndClearStatements2(std::vector& aVclPtrFields, const Stmt *pStmt); + +static void findDisposeAndClearStatements(std::vector& aVclPtrFields, const CompoundStmt *pCompoundStatement) +{ + for(const Stmt* pStmt : pCompoundStatement->body()) { + findDisposeAndClearStatements2(aVclPtrFields, pStmt); + } +} + +static void findDisposeAndClearStatements2(std::vector& aVclPtrFields, const Stmt *pStmt) +{ + if (isa(pStmt)) { + findDisposeAndClearStatements(aVclPtrFields, dyn_cast(pStmt)); + return; + } + if (!isa(pStmt)) return; + const CallExpr *pCallExpr = dyn_cast(pStmt); + + if (!pCallExpr->getDirectCallee()) return; + if (!isa(pCallExpr->getDirectCallee())) return; + const CXXMethodDecl *pCalleeMethodDecl = dyn_cast(pCallExpr->getDirectCallee()); + if (pCalleeMethodDecl->getNameAsString() != "disposeAndClear") return; + + if (!pCallExpr->getCallee()) return; + + if (!isa(pCallExpr->getCallee())) return; + const MemberExpr *pCalleeMemberExpr = dyn_cast(pCallExpr->getCallee()); + + if (!pCalleeMemberExpr->getBase()) return; + if (!isa(pCalleeMemberExpr->getBase())) return; + const MemberExpr *pCalleeMemberExprBase = dyn_cast(pCalleeMemberExpr->getBase()); + + std::string xxx = pCalleeMemberExprBase->getMemberDecl()->getNameAsString(); + aVclPtrFields.erase(std::remove(aVclPtrFields.begin(), aVclPtrFields.end(), xxx), aVclPtrFields.end()); +} + + bool VCLWidgets::VisitFunctionDecl( const FunctionDecl* functionDecl ) { if (ignoreLocation(functionDecl)) { @@ -263,16 +333,16 @@ bool VCLWidgets::VisitFunctionDecl( const FunctionDecl* functionDecl ) // ignore the stuff in the VclPtr template class const CXXMethodDecl *pMethodDecl = dyn_cast(functionDecl); if (pMethodDecl - && pMethodDecl->getParent()->getQualifiedNameAsString().find("VclPtr") != std::string::npos) { + && pMethodDecl->getParent()->getQualifiedNameAsString() == "VclPtr") { return true; } // ignore the vcl::Window::dispose() method if (pMethodDecl - && pMethodDecl->getParent()->getQualifiedNameAsString().compare("vcl::Window") == 0) { + && pMethodDecl->getParent()->getQualifiedNameAsString() == "vcl::Window") { return true; } QualType t1 { compat::getReturnType(*functionDecl) }; - if (t1.getAsString().find("VclPtr") != std::string::npos) { + if (t1.getAsString().find("VclPtr") == 0) { report( DiagnosticsEngine::Warning, "VclPtr declared as a return type from a method/function, should be passed as a raw pointer.", @@ -286,55 +356,89 @@ bool VCLWidgets::VisitFunctionDecl( const FunctionDecl* functionDecl ) report( DiagnosticsEngine::Warning, "vcl::Window subclass dispose() method MUST call it's superclass dispose() as the last thing it does", - functionDecl->getBody()->getLocStart()) - << functionDecl->getBody()->getSourceRange(); + functionDecl->getLocStart()) + << functionDecl->getSourceRange(); } } } // check dispose method to make sure we are actually disposing all of the VclPtr fields - if (pMethodDecl && pMethodDecl->isInstance() && pMethodDecl->getBody() && pMethodDecl->param_size()==0 - && pMethodDecl->getNameAsString() == "dispose") + if (pMethodDecl && pMethodDecl->isInstance() && pMethodDecl->getBody() + && pMethodDecl->param_size()==0 + && pMethodDecl->getNameAsString() == "dispose" + && isDerivedFromWindow(pMethodDecl->getParent()) ) { + // exclude a couple of methods with hard-to-parse code + if (pMethodDecl->getQualifiedNameAsString() == "SvxRubyDialog::dispose") + return true; + if (pMethodDecl->getQualifiedNameAsString() == "SvxPersonalizationTabPage::dispose") + return true; + if (pMethodDecl->getQualifiedNameAsString() == "SelectPersonaDialog::dispose") + return true; + if (pMethodDecl->getQualifiedNameAsString() == "MappingDialog_Impl::dispose") + return true; + if (pMethodDecl->getQualifiedNameAsString() == "BibGeneralPage::dispose") + return true; + if (pMethodDecl->getQualifiedNameAsString() == "SwCreateAuthEntryDlg_Impl::dispose") + return true; + if (pMethodDecl->getQualifiedNameAsString() == "SwTableColumnPage::dispose") + return true; + if (pMethodDecl->getQualifiedNameAsString() == "SwAssignFieldsControl::dispose") + return true; + if (pMethodDecl->getQualifiedNameAsString() == "ScOptSolverDlg::dispose") + return true; + if (pMethodDecl->getQualifiedNameAsString() == "ScPivotFilterDlg::dispose") + return true; + if (pMethodDecl->getQualifiedNameAsString() == "SmToolBoxWindow::dispose") + return true; + if (pMethodDecl->getQualifiedNameAsString() == "dbaui::DlgOrderCrit::dispose") + return true; + std::vector aVclPtrFields; for(auto fieldDecl : pMethodDecl->getParent()->fields()) { - const RecordType *pFieldRecordType = fieldDecl->getType()->getAs(); - if (pFieldRecordType) { - const CXXRecordDecl *pFieldRecordTypeDecl = dyn_cast(pFieldRecordType->getDecl()); - if (pFieldRecordTypeDecl->getQualifiedNameAsString().compare(0, strlen(sVclPtr), sVclPtr) == 0) { - aVclPtrFields.push_back(fieldDecl->getNameAsString()); - } - } + if (fieldDecl->getType().getAsString().compare(0, strlen(sVclPtr), sVclPtr) == 0) { + aVclPtrFields.push_back(fieldDecl->getNameAsString()); + } } if (!aVclPtrFields.empty()) { - const CompoundStmt *pCompoundStatement = dyn_cast(pMethodDecl->getBody()); - for(const Stmt* pStmt : pCompoundStatement->body()) { - const CallExpr *pCallExpr = dyn_cast(pStmt); - if (!pCallExpr) continue; - if (!pCallExpr->getDirectCallee()) continue; - const CXXMethodDecl *pCalleeMethodDecl = dyn_cast(pCallExpr->getDirectCallee()); - if (!pCalleeMethodDecl) continue; - if (pCalleeMethodDecl->getNameAsString() != "disposeAndClear") continue; - const MemberExpr *pCalleeMemberExpr = dyn_cast(pCallExpr->getCallee()); - if (!pCalleeMemberExpr) continue; - const MemberExpr *pCalleeMemberExprBase = dyn_cast(pCalleeMemberExpr->getBase()); - std::string xxx = pCalleeMemberExprBase->getMemberDecl()->getNameAsString(); - aVclPtrFields.erase(std::remove(aVclPtrFields.begin(), aVclPtrFields.end(), xxx), aVclPtrFields.end()); - } + if (pMethodDecl->getBody() && isa(pMethodDecl->getBody())) + findDisposeAndClearStatements( aVclPtrFields, dyn_cast(pMethodDecl->getBody()) ); if (!aVclPtrFields.empty()) { + //pMethodDecl->dump(); std::string aMessage = "vcl::Window subclass dispose() method does not call disposeAndClear() on the following field(s) "; for(auto s : aVclPtrFields) - aMessage += ", " + s; + aMessage += "\n " + s + ".clear();"; report( DiagnosticsEngine::Warning, aMessage, - functionDecl->getBody()->getLocStart()) - << functionDecl->getBody()->getSourceRange(); + functionDecl->getLocStart()) + << functionDecl->getSourceRange(); } } } return true; } +bool VCLWidgets::VisitCXXDeleteExpr(const CXXDeleteExpr *pCXXDeleteExpr) +{ + if (ignoreLocation(pCXXDeleteExpr)) { + return true; + } + const ImplicitCastExpr* pImplicitCastExpr = dyn_cast(pCXXDeleteExpr->getArgument()); + if (!pImplicitCastExpr) { + return true; + } + if (pImplicitCastExpr->getCastKind() != CK_UserDefinedConversion) { + return true; + } + report( + DiagnosticsEngine::Warning, + "calling delete on instance of VclPtr, must rather call disposeAndClear()", + pCXXDeleteExpr->getLocStart()) + << pCXXDeleteExpr->getSourceRange(); + return true; +} + + /** The AST looks like: `-CXXMemberCallExpr 0xb06d8b0 'void' @@ -347,6 +451,7 @@ bool VCLWidgets::isDisposeCallingSuperclassDispose(const CXXMethodDecl* pMethodD { const CompoundStmt *pCompoundStatement = dyn_cast(pMethodDecl->getBody()); if (!pCompoundStatement) return false; + if (pCompoundStatement->size() == 0) return false; // find the last statement const CXXMemberCallExpr *pCallExpr = dyn_cast(*pCompoundStatement->body_rbegin()); if (!pCallExpr) return false; diff --git a/cui/source/customize/acccfg.cxx b/cui/source/customize/acccfg.cxx index a65e56568cdb..82e314ed58bf 100644 --- a/cui/source/customize/acccfg.cxx +++ b/cui/source/customize/acccfg.cxx @@ -672,6 +672,17 @@ void SfxAccCfgTabListBox_Impl::InitEntry(SvTreeListEntry* pEntry, SvTabListBox::InitEntry(pEntry, rText, rImage1, rImage2, eButtonKind); } +SfxAccCfgTabListBox_Impl::~SfxAccCfgTabListBox_Impl() +{ + dispose(); +} + +void SfxAccCfgTabListBox_Impl::dispose() +{ + m_pAccelConfigPage.clear(); + SvTabListBox::dispose(); +} + /** select the entry, which match the current key input ... excepting keys, which are used for the dialog itself. */ @@ -830,6 +841,18 @@ void SfxAcceleratorConfigPage::dispose() delete m_pFileDlg; m_pFileDlg = NULL; + m_pEntriesBox.clear(); + m_pOfficeButton.clear(); + m_pModuleButton.clear(); + m_pChangeButton.clear(); + m_pRemoveButton.clear(); + m_pGroupLBox.clear(); + m_pFunctionBox.clear(); + m_pKeyBox.clear(); + m_pLoadButton.clear(); + m_pSaveButton.clear(); + m_pResetButton.clear(); + SfxTabPage::dispose(); } diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx index 8fc2b26db078..3d0462fb7300 100644 --- a/cui/source/customize/cfg.cxx +++ b/cui/source/customize/cfg.cxx @@ -1395,6 +1395,17 @@ SvxMenuEntriesListBox::SvxMenuEntriesListBox(vcl::Window* pParent, SvxConfigPage SV_DRAGDROP_APP_DROP); } +SvxMenuEntriesListBox::~SvxMenuEntriesListBox() +{ + dispose(); +} + +void SvxMenuEntriesListBox::dispose() +{ + pPage.clear(); + SvTreeListBox::dispose(); +} + // drag and drop support DragDropMode SvxMenuEntriesListBox::NotifyStartDrag( TransferDataContainer& aTransferDataContainer, SvTreeListEntry* pEntry ) @@ -1542,6 +1553,32 @@ SvxConfigPage::SvxConfigPage(vcl::Window *pParent, const SfxItemSet& rSet) m_pDescriptionField->EnableCursor( false ); } +SvxConfigPage::~SvxConfigPage() +{ + dispose(); +} + +void SvxConfigPage::dispose() +{ + m_pTopLevel.clear(); + m_pTopLevelLabel.clear(); + m_pTopLevelListBox.clear(); + m_pNewTopLevelButton.clear(); + m_pModifyTopLevelButton.clear(); + m_pContents.clear(); + m_pContentsLabel.clear(); + m_pEntries.clear(); + m_pContentsListBox.clear(); + m_pAddCommandsButton.clear(); + m_pModifyCommandButton.clear(); + m_pMoveUpButton.clear(); + m_pMoveDownButton.clear(); + m_pSaveInListBox.clear(); + m_pDescriptionField.clear(); + m_pSelectorDlg.clear(); + SfxTabPage::dispose(); +} + void SvxConfigPage::Reset( const SfxItemSet* ) { // If we haven't initialised our XMultiServiceFactory reference @@ -2206,6 +2243,11 @@ SvxMenuConfigPage::SvxMenuConfigPage(vcl::Window *pParent, const SfxItemSet& rSe LINK( this, SvxMenuConfigPage, EntrySelectHdl ) ); } +SvxMenuConfigPage::~SvxMenuConfigPage() +{ + dispose(); +} + // Populates the Menu combo box void SvxMenuConfigPage::Init() { @@ -2219,11 +2261,6 @@ void SvxMenuConfigPage::Init() m_pTopLevelListBox->GetSelectHdl().Call(this); } -SvxMenuConfigPage::~SvxMenuConfigPage() -{ - dispose(); -} - void SvxMenuConfigPage::dispose() { for ( sal_uInt16 i = 0 ; i < m_pSaveInListBox->GetEntryCount(); ++i ) @@ -2235,11 +2272,8 @@ void SvxMenuConfigPage::dispose() } m_pSaveInListBox->Clear(); - delete m_pSelectorDlg; - m_pSelectorDlg = NULL; - delete m_pContentsListBox; - m_pContentsListBox = NULL; - + m_pSelectorDlg.clear(); + m_pContentsListBox.clear(); SvxConfigPage::dispose(); } @@ -2547,7 +2581,7 @@ IMPL_LINK( SvxMenuConfigPage, AddCommandsHdl, Button *, pButton ) { (void)pButton; - if ( m_pSelectorDlg == NULL ) + if ( m_pSelectorDlg == nullptr ) { // Create Script Selector which also shows builtin commands m_pSelectorDlg = new SvxScriptSelectorDialog( this, true, m_xFrame ); @@ -2660,6 +2694,21 @@ SvxMainMenuOrganizerDialog::SvxMainMenuOrganizerDialog( LINK( this, SvxMainMenuOrganizerDialog, MoveHdl) ); } +SvxMainMenuOrganizerDialog::~SvxMainMenuOrganizerDialog() +{ + dispose(); +} + +void SvxMainMenuOrganizerDialog::dispose() +{ + m_pMenuBox.clear(); + m_pMenuNameEdit.clear(); + m_pMenuListBox.clear(); + m_pMoveUpButton.clear(); + m_pMoveDownButton.clear(); + ModalDialog::dispose(); +} + IMPL_LINK(SvxMainMenuOrganizerDialog, ModifyHdl, Edit*, pEdit) { (void)pEdit; @@ -2931,12 +2980,8 @@ void SvxToolbarConfigPage::dispose() } m_pSaveInListBox->Clear(); - delete m_pSelectorDlg; - m_pSelectorDlg = NULL; - - delete m_pContentsListBox; - m_pContentsListBox = NULL; - + m_pSelectorDlg.clear(); + m_pContentsListBox.clear(); SvxConfigPage::dispose(); } @@ -4457,7 +4502,7 @@ IMPL_LINK( SvxToolbarConfigPage, AddCommandsHdl, Button *, pButton ) { (void)pButton; - if ( m_pSelectorDlg == NULL ) + if ( m_pSelectorDlg == nullptr ) { // Create Script Selector which shows slot commands m_pSelectorDlg = new SvxScriptSelectorDialog( this, true, m_xFrame ); @@ -4537,6 +4582,7 @@ void SvxToolbarEntriesListBox::dispose() delete m_pButtonData; m_pButtonData = NULL; + pPage.clear(); SvxMenuEntriesListBox::dispose(); } @@ -4688,7 +4734,7 @@ TriState SvxToolbarEntriesListBox::NotifyCopying( if ( !m_bIsInternalDrag ) { // if the target is NULL then add function to the start of the list - static_cast(pPage)->AddFunction( pTarget, pTarget == NULL ); + static_cast(pPage.get())->AddFunction( pTarget, pTarget == NULL ); // Instant Apply changes to UI SvxConfigEntry* pToolbar = pPage->GetTopLevelSelection(); @@ -4720,6 +4766,20 @@ SvxNewToolbarDialog::SvxNewToolbarDialog(vcl::Window* pWindow, const OUString& r m_pEdtName->SetModifyHdl(LINK(this, SvxNewToolbarDialog, ModifyHdl)); } +SvxNewToolbarDialog::~SvxNewToolbarDialog() +{ + dispose(); +} + +void SvxNewToolbarDialog::dispose() +{ + m_pEdtName.clear(); + m_pBtnOK.clear(); + m_pSaveInListBox.clear(); + ModalDialog::dispose(); +} + + IMPL_LINK(SvxNewToolbarDialog, ModifyHdl, Edit*, pEdit) { (void)pEdit; @@ -4940,9 +5000,12 @@ void SvxIconSelectorDialog::dispose() if ( xi != NULL ) xi->release(); } - pTbSymbol = NULL; } + pTbSymbol.clear(); + pFtNote.clear(); + pBtnImport.clear(); + pBtnDelete.clear(); ModalDialog::dispose(); } @@ -5388,4 +5451,16 @@ SvxIconChangeDialog::SvxIconChangeDialog( pLineEditDescription->SetText(aMessage); } +SvxIconChangeDialog::~SvxIconChangeDialog() +{ + dispose(); +} + +void SvxIconChangeDialog::dispose() +{ + pFImageInfo.clear(); + pLineEditDescription.clear(); + ModalDialog::dispose(); +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cui/source/customize/cfgutil.cxx b/cui/source/customize/cfgutil.cxx index 373f3b924421..0f399fda43f5 100644 --- a/cui/source/customize/cfgutil.cxx +++ b/cui/source/customize/cfgutil.cxx @@ -435,6 +435,7 @@ SfxConfigGroupListBox::~SfxConfigGroupListBox() void SfxConfigGroupListBox::dispose() { ClearAll(); + pFunctionListBox.clear(); SvTreeListBox::dispose(); } diff --git a/cui/source/customize/eventdlg.cxx b/cui/source/customize/eventdlg.cxx index 79453fc1848d..3ab1816f37d5 100644 --- a/cui/source/customize/eventdlg.cxx +++ b/cui/source/customize/eventdlg.cxx @@ -118,6 +118,7 @@ void SvxEventConfigPage::dispose() pE->SetUserData((void*)0); pE = SvTreeListBox::NextSibling( pE ); } + m_pSaveInListBox.clear(); _SvxMacroTabPage::dispose(); } diff --git a/cui/source/customize/eventdlg.hxx b/cui/source/customize/eventdlg.hxx index 56ea3c41ddab..385df86d1bbb 100644 --- a/cui/source/customize/eventdlg.hxx +++ b/cui/source/customize/eventdlg.hxx @@ -29,7 +29,7 @@ class SvxEventConfigPage : public _SvxMacroTabPage { - ListBox* m_pSaveInListBox; + VclPtr m_pSaveInListBox; ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameReplace > m_xAppEvents; ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameReplace > m_xDocumentEvents; diff --git a/cui/source/customize/macropg.cxx b/cui/source/customize/macropg.cxx index 13ae5f461a00..656a2414ddd1 100644 --- a/cui/source/customize/macropg.cxx +++ b/cui/source/customize/macropg.cxx @@ -888,6 +888,18 @@ AssignComponentDialog::AssignComponentDialog( vcl::Window * pParent, const OUStr mpMethodEdit->SetText( aMethodName, Selection( 0, SELECTION_MAX ) ); } +AssignComponentDialog::~AssignComponentDialog() +{ + dispose(); +} + +void AssignComponentDialog::dispose() +{ + mpMethodEdit.clear(); + mpOKButton.clear(); + ModalDialog::dispose(); +} + IMPL_LINK( SvxMacroAssignSingleTabDialog, OKHdl_Impl, Button *, pButton ) { (void)pButton; //unused diff --git a/cui/source/customize/macropg_impl.hxx b/cui/source/customize/macropg_impl.hxx index 6ec8709a971e..d99a9712e1ff 100644 --- a/cui/source/customize/macropg_impl.hxx +++ b/cui/source/customize/macropg_impl.hxx @@ -25,14 +25,14 @@ class _SvxMacroTabPage_Impl public: _SvxMacroTabPage_Impl( const SfxItemSet& rAttrSet ); - PushButton* pAssignPB; - PushButton* pAssignComponentPB; - PushButton* pDeletePB; + VclPtr pAssignPB; + VclPtr pAssignComponentPB; + VclPtr pDeletePB; Image aMacroImg; Image aComponentImg; OUString sStrEvent; OUString sAssignedMacro; - MacroEventListBox* pEventLB; + VclPtr pEventLB; bool bReadOnly; bool bIDEDialogMode; }; @@ -40,8 +40,8 @@ public: class AssignComponentDialog : public ModalDialog { private: - Edit* mpMethodEdit; - OKButton* mpOKButton; + VclPtr mpMethodEdit; + VclPtr mpOKButton; OUString maURL; @@ -49,6 +49,8 @@ private: public: AssignComponentDialog( vcl::Window * pParent, const OUString& rURL ); + virtual ~AssignComponentDialog(); + virtual void dispose() SAL_OVERRIDE; OUString getURL( void ) const { return maURL; } diff --git a/cui/source/customize/selector.cxx b/cui/source/customize/selector.cxx index 5d0ffe6a9209..3aefef32d24b 100644 --- a/cui/source/customize/selector.cxx +++ b/cui/source/customize/selector.cxx @@ -239,6 +239,7 @@ SvxConfigGroupListBox::~SvxConfigGroupListBox() void SvxConfigGroupListBox::dispose() { ClearAll(); + pFunctionListBox.clear(); SvTreeListBox::dispose(); } @@ -918,6 +919,22 @@ SvxScriptSelectorDialog::SvxScriptSelectorDialog( UpdateUI(); } +SvxScriptSelectorDialog::~SvxScriptSelectorDialog() +{ + dispose(); +} + +void SvxScriptSelectorDialog::dispose() +{ + m_pDialogDescription.clear(); + m_pCategories.clear(); + m_pCommands.clear(); + m_pOKButton.clear(); + m_pCancelButton.clear(); + m_pDescriptionText.clear(); + ModelessDialog::dispose(); +} + IMPL_LINK( SvxScriptSelectorDialog, SelectHdl, Control*, pCtrl ) { if (pCtrl == m_pCategories) diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx index 5c81f1c02206..ac8aca049c02 100644 --- a/cui/source/dialogs/SpellDialog.cxx +++ b/cui/source/dialogs/SpellDialog.cxx @@ -261,6 +261,26 @@ void SpellDialog::dispose() delete pImpl; pImpl = NULL; } + m_pLanguageFT.clear(); + m_pLanguageLB.clear(); + m_pExplainFT.clear(); + m_pExplainLink.clear(); + m_pNotInDictFT.clear(); + m_pSentenceED.clear(); + m_pSuggestionFT.clear(); + m_pSuggestionLB.clear(); + m_pIgnorePB.clear(); + m_pIgnoreAllPB.clear(); + m_pIgnoreRulePB.clear(); + m_pAddToDictPB.clear(); + m_pAddToDictMB.clear(); + m_pChangePB.clear(); + m_pChangeAllPB.clear(); + m_pAutoCorrPB.clear(); + m_pCheckGrammarCB.clear(); + m_pOptionsPB.clear(); + m_pUndoPB.clear(); + m_pClosePB.clear(); SfxModelessDialog::dispose(); } diff --git a/cui/source/dialogs/about.cxx b/cui/source/dialogs/about.cxx index 867c8ce281e6..f146e698e49f 100644 --- a/cui/source/dialogs/about.cxx +++ b/cui/source/dialogs/about.cxx @@ -98,6 +98,23 @@ AboutDialog::AboutDialog(vcl::Window* pParent) get("close")->GrabFocus(); } +AboutDialog::~AboutDialog() +{ + dispose(); +} + +void AboutDialog::dispose() +{ + m_pVersion.clear(); + m_pDescriptionText.clear(); + m_pCopyrightText.clear(); + m_pLogoImage.clear(); + m_pLogoReplacement.clear(); + m_pCreditsButton.clear(); + m_pWebsiteButton.clear(); + SfxModalDialog::dispose(); +} + IMPL_LINK( AboutDialog, HandleClick, PushButton*, pButton ) { OUString sURL = ""; diff --git a/cui/source/dialogs/colorpicker.cxx b/cui/source/dialogs/colorpicker.cxx index 7edff10bf399..ad1f3e0d8f81 100644 --- a/cui/source/dialogs/colorpicker.cxx +++ b/cui/source/dialogs/colorpicker.cxx @@ -973,6 +973,8 @@ class ColorPickerDialog : public ModalDialog { public: ColorPickerDialog( vcl::Window* pParent, sal_Int32 nColor, sal_Int16 nMode ); + virtual ~ColorPickerDialog() { dispose(); } + virtual void dispose() SAL_OVERRIDE; void update_color( sal_uInt16 n = UPDATE_ALL ); @@ -992,35 +994,35 @@ private: double mdCyan, mdMagenta, mdYellow, mdKey; private: - ColorFieldControl* mpColorField; - ColorSliderControl* mpColorSlider; - ColorPreviewControl* mpColorPreview; - ColorPreviewControl* mpColorPrevious; + VclPtr mpColorField; + VclPtr mpColorSlider; + VclPtr mpColorPreview; + VclPtr mpColorPrevious; - FixedImage* mpFISliderLeft; - FixedImage* mpFISliderRight; + VclPtr mpFISliderLeft; + VclPtr mpFISliderRight; Image maSliderImage; - RadioButton* mpRBRed; - RadioButton* mpRBGreen; - RadioButton* mpRBBlue; - RadioButton* mpRBHue; - RadioButton* mpRBSaturation; - RadioButton* mpRBBrightness; - - MetricField* mpMFRed; - MetricField* mpMFGreen; - MetricField* mpMFBlue; - HexColorControl* mpEDHex; - - MetricField* mpMFHue; - MetricField* mpMFSaturation; - MetricField* mpMFBrightness; - - MetricField* mpMFCyan; - MetricField* mpMFMagenta; - MetricField* mpMFYellow; - MetricField* mpMFKey; + VclPtr mpRBRed; + VclPtr mpRBGreen; + VclPtr mpRBBlue; + VclPtr mpRBHue; + VclPtr mpRBSaturation; + VclPtr mpRBBrightness; + + VclPtr mpMFRed; + VclPtr mpMFGreen; + VclPtr mpMFBlue; + VclPtr mpEDHex; + + VclPtr mpMFHue; + VclPtr mpMFSaturation; + VclPtr mpMFBrightness; + + VclPtr mpMFCyan; + VclPtr mpMFMagenta; + VclPtr mpMFYellow; + VclPtr mpMFKey; }; ColorPickerDialog::ColorPickerDialog( vcl::Window* pParent, sal_Int32 nColor, sal_Int16 nMode ) @@ -1126,6 +1128,34 @@ ColorPickerDialog::ColorPickerDialog( vcl::Window* pParent, sal_Int32 nColor, sa update_color(); } +void ColorPickerDialog::dispose() +{ + mpColorField.clear(); + mpColorSlider.clear(); + mpColorPreview.clear(); + mpColorPrevious.clear(); + mpFISliderLeft.clear(); + mpFISliderRight.clear(); + mpRBRed.clear(); + mpRBGreen.clear(); + mpRBBlue.clear(); + mpRBHue.clear(); + mpRBSaturation.clear(); + mpRBBrightness.clear(); + mpMFRed.clear(); + mpMFGreen.clear(); + mpMFBlue.clear(); + mpEDHex.clear(); + mpMFHue.clear(); + mpMFSaturation.clear(); + mpMFBrightness.clear(); + mpMFCyan.clear(); + mpMFMagenta.clear(); + mpMFYellow.clear(); + mpMFKey.clear(); + ModalDialog::dispose(); +} + static int toInt( double dValue, double dRange ) { return static_cast< int >( std::floor((dValue * dRange) + 0.5 ) ); diff --git a/cui/source/dialogs/cuicharmap.cxx b/cui/source/dialogs/cuicharmap.cxx index e992ab28d064..44f03fed1481 100644 --- a/cui/source/dialogs/cuicharmap.cxx +++ b/cui/source/dialogs/cuicharmap.cxx @@ -100,6 +100,25 @@ SvxCharacterMap::SvxCharacterMap( vcl::Window* pParent, bool bOne_, const SfxIte CreateOutputItemSet( pSet ? *pSet->GetPool() : SfxGetpApp()->GetPool() ); } +SvxCharacterMap::~SvxCharacterMap() +{ + dispose(); +} + +void SvxCharacterMap::dispose() +{ + m_pShowSet.clear(); + m_pShowText.clear(); + m_pOKBtn.clear(); + m_pFontText.clear(); + m_pFontLB.clear(); + m_pSubsetText.clear(); + m_pSubsetLB.clear(); + m_pSymbolText.clear(); + m_pShowChar.clear(); + m_pCharCodeText.clear(); + SfxModalDialog::dispose(); +} void SvxCharacterMap::SetChar( sal_UCS4 c ) diff --git a/cui/source/dialogs/cuifmsearch.cxx b/cui/source/dialogs/cuifmsearch.cxx index c8bbf0abab69..7e3a767a3bdd 100644 --- a/cui/source/dialogs/cuifmsearch.cxx +++ b/cui/source/dialogs/cuifmsearch.cxx @@ -176,6 +176,34 @@ void FmSearchDialog::dispose() delete m_pSearchEngine; m_pSearchEngine = NULL; + m_prbSearchForText.clear(); + m_prbSearchForNull.clear(); + m_prbSearchForNotNull.clear(); + m_pcmbSearchText.clear(); + m_pftForm.clear(); + m_plbForm.clear(); + m_prbAllFields.clear(); + m_prbSingleField.clear(); + m_plbField.clear(); + m_pftPosition.clear(); + m_plbPosition.clear(); + m_pcbUseFormat.clear(); + m_pcbCase.clear(); + m_pcbBackwards.clear(); + m_pcbStartOver.clear(); + m_pcbWildCard.clear(); + m_pcbRegular.clear(); + m_pcbApprox.clear(); + m_ppbApproxSettings.clear(); + m_pHalfFullFormsCJK.clear(); + m_pSoundsLikeCJK.clear(); + m_pSoundsLikeCJKSettings.clear(); + m_pftRecord.clear(); + m_pftHint.clear(); + m_pbSearchAgain.clear(); + m_pbClose.clear(); + m_pPreSearchFocus.clear(); + ModalDialog::dispose(); } @@ -609,7 +637,7 @@ void FmSearchDialog::EnableSearchUI(bool bEnable) m_pPreSearchFocus->GrabFocus(); if ( WINDOW_EDIT == m_pPreSearchFocus->GetType() ) { - Edit* pEdit = static_cast< Edit* >( m_pPreSearchFocus ); + Edit* pEdit = static_cast< Edit* >( m_pPreSearchFocus.get() ); pEdit->SetSelection( Selection( 0, pEdit->GetText().getLength() ) ); } } diff --git a/cui/source/dialogs/cuigaldlg.cxx b/cui/source/dialogs/cuigaldlg.cxx index ac330ae95173..87e8a6ae6921 100644 --- a/cui/source/dialogs/cuigaldlg.cxx +++ b/cui/source/dialogs/cuigaldlg.cxx @@ -215,6 +215,19 @@ SearchProgress::SearchProgress( vcl::Window* pParent, const INetURLObject& rStar m_pBtnCancel->SetClickHdl( LINK( this, SearchProgress, ClickCancelBtn ) ); } +SearchProgress::~SearchProgress() +{ + dispose(); +} + +void SearchProgress::dispose() +{ + m_pFtSearchDir.clear(); + m_pFtSearchType.clear(); + m_pBtnCancel.clear(); + parent_.clear(); + ModalDialog::dispose(); +} void SearchProgress::Terminate() @@ -260,7 +273,7 @@ void SearchProgress::StartExecuteModal( const Link& rEndDialogHdl ) { assert(!maSearchThread.is()); maSearchThread = new SearchThread( - this, static_cast< TPGalleryThemeProperties * >(parent_), startUrl_); + this, static_cast< TPGalleryThemeProperties * >(parent_.get()), startUrl_); maSearchThread->launch(); ModalDialog::StartExecuteModal( rEndDialogHdl ); } @@ -345,6 +358,19 @@ TakeProgress::TakeProgress(vcl::Window* pWindow) m_pBtnCancel->SetClickHdl( LINK( this, TakeProgress, ClickCancelBtn ) ); } +TakeProgress::~TakeProgress() +{ + dispose(); +} + +void TakeProgress::dispose() +{ + m_pFtTakeFile.clear(); + m_pBtnCancel.clear(); + window_.clear(); + ModalDialog::dispose(); +} + void TakeProgress::Terminate() { if (maTakeThread.is()) @@ -425,7 +451,7 @@ void TakeProgress::StartExecuteModal( const Link& rEndDialogHdl ) { assert(!maTakeThread.is()); maTakeThread = new TakeThread( - this, static_cast< TPGalleryThemeProperties * >(window_), maTakenList); + this, static_cast< TPGalleryThemeProperties * >(window_.get()), maTakenList); maTakeThread->launch(); ModalDialog::StartExecuteModal( rEndDialogHdl ); } @@ -443,6 +469,18 @@ ActualizeProgress::ActualizeProgress(vcl::Window* pWindow, GalleryTheme* pThm) m_pBtnCancel->SetClickHdl( LINK( this, ActualizeProgress, ClickCancelBtn ) ); } +ActualizeProgress::~ActualizeProgress() +{ + dispose(); +} + +void ActualizeProgress::dispose() +{ + m_pFtActualizeFile.clear(); + m_pBtnCancel.clear(); + ModalDialog::dispose(); +} + short ActualizeProgress::Execute() { short nRet; @@ -511,6 +549,17 @@ TitleDialog::TitleDialog(vcl::Window* pParent, const OUString& rOldTitle) m_pEdit->GrabFocus(); } +TitleDialog::~TitleDialog() +{ + dispose(); +} + +void TitleDialog::dispose() +{ + m_pEdit.clear(); + ModalDialog::dispose(); +} + // - GalleryIdDialog - @@ -532,7 +581,17 @@ GalleryIdDialog::GalleryIdDialog( vcl::Window* pParent, GalleryTheme* _pThm ) m_pBtnOk->SetClickHdl( LINK( this, GalleryIdDialog, ClickOkHdl ) ); } +GalleryIdDialog::~GalleryIdDialog() +{ + dispose(); +} +void GalleryIdDialog::dispose() +{ + m_pBtnOk.clear(); + m_pLbResName.clear(); + ModalDialog::dispose(); +} IMPL_LINK_NOARG(GalleryIdDialog, ClickOkHdl) { @@ -616,6 +675,22 @@ TPGalleryThemeGeneral::TPGalleryThemeGeneral(vcl::Window* pParent, const SfxItem get(m_pFtMSShowChangeDate, "modified"); } +TPGalleryThemeGeneral::~TPGalleryThemeGeneral() +{ + dispose(); +} + +void TPGalleryThemeGeneral::dispose() +{ + m_pFiMSImage.clear(); + m_pEdtMSName.clear(); + m_pFtMSShowType.clear(); + m_pFtMSShowPath.clear(); + m_pFtMSShowContent.clear(); + m_pFtMSShowChangeDate.clear(); + SfxTabPage::dispose(); +} + void TPGalleryThemeGeneral::SetXChgData( ExchangeData* _pData ) { pData = _pData; @@ -769,6 +844,13 @@ void TPGalleryThemeProperties::dispose() } aFilterEntryList.clear(); + m_pCbbFileType.clear(); + m_pLbxFound.clear(); + m_pBtnSearch.clear(); + m_pBtnTake.clear(); + m_pBtnTakeAll.clear(); + m_pCbxPreview.clear(); + m_pWndPreview.clear(); SfxTabPage::dispose(); } diff --git a/cui/source/dialogs/cuigrfflt.cxx b/cui/source/dialogs/cuigrfflt.cxx index 9eb47497865e..6fd0cf74a4c7 100644 --- a/cui/source/dialogs/cuigrfflt.cxx +++ b/cui/source/dialogs/cuigrfflt.cxx @@ -153,6 +153,16 @@ GraphicFilterDialog::GraphicFilterDialog(vcl::Window* pParent, mpPreview->init(&rGraphic, maModifyHdl); } +GraphicFilterDialog::~GraphicFilterDialog() +{ + dispose(); +} + +void GraphicFilterDialog::dispose() +{ + mpPreview.clear(); + ModalDialog::dispose(); +} IMPL_LINK_NOARG(GraphicFilterDialog, ImplPreviewTimeoutHdl) @@ -204,7 +214,18 @@ GraphicFilterMosaic::GraphicFilterMosaic( vcl::Window* pParent, const Graphic& r mpMtrWidth->GrabFocus(); } +GraphicFilterMosaic::~GraphicFilterMosaic() +{ + dispose(); +} +void GraphicFilterMosaic::dispose() +{ + mpMtrWidth.clear(); + mpMtrHeight.clear(); + mpCbxEdges.clear(); + GraphicFilterDialog::dispose(); +} Graphic GraphicFilterMosaic::GetFilteredGraphic( const Graphic& rGraphic, double fScaleX, double fScaleY ) @@ -257,6 +278,16 @@ GraphicFilterSmooth::GraphicFilterSmooth( vcl::Window* pParent, const Graphic& r mpMtrRadius->GrabFocus(); } +GraphicFilterSmooth::~GraphicFilterSmooth() +{ + dispose(); +} + +void GraphicFilterSmooth::dispose() +{ + mpMtrRadius.clear(); + GraphicFilterDialog::dispose(); +} Graphic GraphicFilterSmooth::GetFilteredGraphic( const Graphic& rGraphic, double /*fScaleX*/, double /*fScaleY*/ ) @@ -305,6 +336,17 @@ GraphicFilterSolarize::GraphicFilterSolarize( vcl::Window* pParent, const Graphi mpCbxInvert->SetToggleHdl( GetModifyHdl() ); } +GraphicFilterSolarize::~GraphicFilterSolarize() +{ + dispose(); +} + +void GraphicFilterSolarize::dispose() +{ + mpMtrThreshold.clear(); + mpCbxInvert.clear(); + GraphicFilterDialog::dispose(); +} Graphic GraphicFilterSolarize::GetFilteredGraphic( const Graphic& rGraphic, @@ -356,6 +398,16 @@ GraphicFilterSepia::GraphicFilterSepia( vcl::Window* pParent, const Graphic& rGr mpMtrSepia->SetModifyHdl( GetModifyHdl() ); } +GraphicFilterSepia::~GraphicFilterSepia() +{ + dispose(); +} + +void GraphicFilterSepia::dispose() +{ + mpMtrSepia.clear(); + GraphicFilterDialog::dispose(); +} Graphic GraphicFilterSepia::GetFilteredGraphic( const Graphic& rGraphic, @@ -399,6 +451,16 @@ GraphicFilterPoster::GraphicFilterPoster(vcl::Window* pParent, const Graphic& rG mpNumPoster->SetModifyHdl( GetModifyHdl() ); } +GraphicFilterPoster::~GraphicFilterPoster() +{ + dispose(); +} + +void GraphicFilterPoster::dispose() +{ + mpNumPoster.clear(); + GraphicFilterDialog::dispose(); +} Graphic GraphicFilterPoster::GetFilteredGraphic( const Graphic& rGraphic, @@ -462,6 +524,16 @@ GraphicFilterEmboss::GraphicFilterEmboss(vcl::Window* pParent, mpCtlLight->GrabFocus(); } +GraphicFilterEmboss::~GraphicFilterEmboss() +{ + dispose(); +} + +void GraphicFilterEmboss::dispose() +{ + mpCtlLight.clear(); + GraphicFilterDialog::dispose(); +} Graphic GraphicFilterEmboss::GetFilteredGraphic( const Graphic& rGraphic, diff --git a/cui/source/dialogs/cuiimapwnd.cxx b/cui/source/dialogs/cuiimapwnd.cxx index 118da3fc5c50..d86558bccdba 100644 --- a/cui/source/dialogs/cuiimapwnd.cxx +++ b/cui/source/dialogs/cuiimapwnd.cxx @@ -73,4 +73,19 @@ URLDlg::URLDlg( vcl::Window* pWindow, const OUString& rURL, const OUString& rAlt m_pCbbTargets->SetText( rTarget ); } +URLDlg::~URLDlg() +{ + dispose(); +} + +void URLDlg::dispose() +{ + m_pEdtURL.clear(); + m_pCbbTargets.clear(); + m_pEdtName.clear(); + m_pEdtAlternativeText.clear(); + m_pEdtDescription.clear(); + ModalDialog::dispose(); +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cui/source/dialogs/cuitbxform.cxx b/cui/source/dialogs/cuitbxform.cxx index 46ae5b5e78d6..1670025e3195 100644 --- a/cui/source/dialogs/cuitbxform.cxx +++ b/cui/source/dialogs/cuitbxform.cxx @@ -41,4 +41,15 @@ FmInputRecordNoDialog::FmInputRecordNoDialog(vcl::Window * pParent) m_pRecordNo->SetDecimalDigits(0); } +FmInputRecordNoDialog::~FmInputRecordNoDialog() +{ + dispose(); +} + +void FmInputRecordNoDialog::dispose() +{ + m_pRecordNo.clear(); + ModalDialog::dispose(); +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cui/source/dialogs/dlgname.cxx b/cui/source/dialogs/dlgname.cxx index 4a49494243d1..3aa778fac86f 100644 --- a/cui/source/dialogs/dlgname.cxx +++ b/cui/source/dialogs/dlgname.cxx @@ -45,6 +45,19 @@ SvxNameDialog::SvxNameDialog( vcl::Window* pWindow, const OUString& rName, const pEdtName->SetModifyHdl(LINK(this, SvxNameDialog, ModifyHdl)); } +SvxNameDialog::~SvxNameDialog() +{ + dispose(); +} + +void SvxNameDialog::dispose() +{ + pFtDescription.clear(); + pEdtName.clear(); + pBtnOK.clear(); + ModalDialog::dispose(); +} + IMPL_LINK_NOARG(SvxNameDialog, ModifyHdl) { if(aCheckNameHdl.IsSet()) @@ -73,6 +86,19 @@ SvxObjectNameDialog::SvxObjectNameDialog( pEdtName->SetModifyHdl(LINK(this, SvxObjectNameDialog, ModifyHdl)); } +SvxObjectNameDialog::~SvxObjectNameDialog() +{ + dispose(); +} + +void SvxObjectNameDialog::dispose() +{ + pEdtName.clear(); + pBtnOK.clear(); + ModalDialog::dispose(); +} + + IMPL_LINK_NOARG(SvxObjectNameDialog, ModifyHdl) { if(aCheckNameHdl.IsSet()) @@ -105,6 +131,17 @@ SvxObjectTitleDescDialog::SvxObjectTitleDescDialog( pEdtTitle->SetSelection(Selection(SELECTION_MIN, SELECTION_MAX)); } +SvxObjectTitleDescDialog::~SvxObjectTitleDescDialog() +{ + dispose(); +} + +void SvxObjectTitleDescDialog::dispose() +{ + pEdtTitle.clear(); + pEdtDescription.clear(); + ModalDialog::dispose(); +} /************************************************************************* @@ -145,6 +182,10 @@ void SvxMessDialog::dispose() { delete pImage; pImage = NULL; + pFtDescription.clear(); + pBtn1.clear(); + pBtn2.clear(); + pFtImage.clear(); ModalDialog::dispose(); } diff --git a/cui/source/dialogs/hangulhanjadlg.cxx b/cui/source/dialogs/hangulhanjadlg.cxx index 6d8e10123d7f..273bffaa70f9 100644 --- a/cui/source/dialogs/hangulhanjadlg.cxx +++ b/cui/source/dialogs/hangulhanjadlg.cxx @@ -605,6 +605,35 @@ namespace svx m_pSuggestions->SetHelpIds(); } + HangulHanjaConversionDialog::~HangulHanjaConversionDialog() + { + dispose(); + } + + void HangulHanjaConversionDialog::dispose() + { + m_pFind.clear(); + m_pIgnore.clear(); + m_pIgnoreAll.clear(); + m_pReplace.clear(); + m_pReplaceAll.clear(); + m_pOptions.clear(); + m_pSuggestions.clear(); + m_pSimpleConversion.clear(); + m_pHangulBracketed.clear(); + m_pHanjaBracketed.clear(); + m_pWordInput.clear(); + m_pOriginalWord.clear(); + m_pHanjaAbove.clear(); + m_pHanjaBelow.clear(); + m_pHangulAbove.clear(); + m_pHangulBelow.clear(); + m_pHangulOnly.clear(); + m_pHanjaOnly.clear(); + m_pReplaceByChar.clear(); + m_pIgnoreNonPrimary.clear(); + ModalDialog::dispose(); + } void HangulHanjaConversionDialog::FillSuggestions( const ::com::sun::star::uno::Sequence< OUString >& _rSuggestions ) { @@ -1139,17 +1168,28 @@ namespace svx void HangulHanjaOptionsDialog::dispose() { - SvTreeListEntry* pEntry = m_pDictsLB->First(); - while( pEntry ) + if (m_pDictsLB) { - delete static_cast(pEntry->GetUserData()); - pEntry->SetUserData(NULL); - pEntry = m_pDictsLB->Next( pEntry ); + SvTreeListEntry* pEntry = m_pDictsLB->First(); + while( pEntry ) + { + delete static_cast(pEntry->GetUserData()); + pEntry->SetUserData( NULL ); + pEntry = m_pDictsLB->Next( pEntry ); + } } delete m_pCheckButtonData; m_pCheckButtonData = NULL; + m_pDictsLB.clear(); + m_pIgnorepostCB.clear(); + m_pShowrecentlyfirstCB.clear(); + m_pAutoreplaceuniqueCB.clear(); + m_pNewPB.clear(); + m_pEditPB.clear(); + m_pDeletePB.clear(); + m_pOkPB.clear(); ModalDialog::dispose(); } @@ -1197,6 +1237,18 @@ namespace svx m_pDictNameED->SetModifyHdl( LINK( this, HangulHanjaNewDictDialog, ModifyHdl ) ); } + HangulHanjaNewDictDialog::~HangulHanjaNewDictDialog() + { + dispose(); + } + + void HangulHanjaNewDictDialog::dispose() + { + m_pDictNameED.clear(); + m_pOkBtn.clear(); + ModalDialog::dispose(); + } + bool HangulHanjaNewDictDialog::GetName( OUString& _rRetName ) const { if( m_bEntered ) @@ -1372,6 +1424,19 @@ namespace svx { } + SuggestionEdit::~SuggestionEdit() + { + dispose(); + } + + void SuggestionEdit::dispose() + { + m_pPrev.clear(); + m_pNext.clear(); + m_pScrollBar.clear(); + Edit::dispose(); + } + bool SuggestionEdit::PreNotify( NotifyEvent& rNEvt ) { bool nHandled = false; @@ -1787,6 +1852,15 @@ namespace svx { delete m_pSuggestions; m_pSuggestions = NULL; + m_aBookLB.clear(); + m_aOriginalLB.clear(); + m_aEdit1.clear(); + m_aEdit2.clear(); + m_aEdit3.clear(); + m_aEdit4.clear(); + m_aScrollSB.clear(); + m_aNewPB.clear(); + m_aDeletePB.clear(); ModalDialog::dispose(); } diff --git a/cui/source/dialogs/hldocntp.cxx b/cui/source/dialogs/hldocntp.cxx index ad1e7fafc64b..a02ff7d2eccd 100644 --- a/cui/source/dialogs/hldocntp.cxx +++ b/cui/source/dialogs/hldocntp.cxx @@ -140,6 +140,11 @@ void SvxHyperlinkNewDocTp::dispose() delete static_cast(m_pLbDocTypes->GetEntryData ( n )); m_pLbDocTypes = NULL; } + m_pRbtEditNow.clear(); + m_pRbtEditLater.clear(); + m_pCbbPath.clear(); + m_pBtCreate.clear(); + m_pLbDocTypes.clear(); SvxHyperlinkTabPageBase::dispose(); } diff --git a/cui/source/dialogs/hldoctp.cxx b/cui/source/dialogs/hldoctp.cxx index 2e45746d7684..0a3f26922171 100644 --- a/cui/source/dialogs/hldoctp.cxx +++ b/cui/source/dialogs/hldoctp.cxx @@ -71,6 +71,21 @@ SvxHyperlinkDocTp::SvxHyperlinkDocTp ( vcl::Window *pParent, IconChoiceDialog* p maTimer.SetTimeoutHdl ( LINK ( this, SvxHyperlinkDocTp, TimeoutHdl_Impl ) ); } +SvxHyperlinkDocTp::~SvxHyperlinkDocTp() +{ + dispose(); +} + +void SvxHyperlinkDocTp::dispose() +{ + m_pCbbPath.clear(); + m_pBtFileopen.clear(); + m_pEdTarget.clear(); + m_pFtFullURL.clear(); + m_pBtBrowse.clear(); + SvxHyperlinkTabPageBase::dispose(); +} + /************************************************************************* |* |* Fill all dialog-controls except controls in groupbox "more..." diff --git a/cui/source/dialogs/hlinettp.cxx b/cui/source/dialogs/hlinettp.cxx index 73ea0ddc6220..61760d772156 100644 --- a/cui/source/dialogs/hlinettp.cxx +++ b/cui/source/dialogs/hlinettp.cxx @@ -81,6 +81,25 @@ SvxHyperlinkInternetTp::SvxHyperlinkInternetTp ( vcl::Window *pParent, maTimer.SetTimeoutHdl ( LINK ( this, SvxHyperlinkInternetTp, TimeoutHdl_Impl ) ); } +SvxHyperlinkInternetTp::~SvxHyperlinkInternetTp() +{ + dispose(); +} + +void SvxHyperlinkInternetTp::dispose() +{ + m_pRbtLinktypInternet.clear(); + m_pRbtLinktypFTP.clear(); + m_pCbbTarget.clear(); + m_pBtBrowse.clear(); + m_pFtLogin.clear(); + m_pEdLogin.clear(); + m_pFtPassword.clear(); + m_pEdPassword.clear(); + m_pCbAnonymous.clear(); + SvxHyperlinkTabPageBase::dispose(); +} + /************************************************************************* |* |* Fill the all dialog-controls except controls in groupbox "more..." @@ -397,7 +416,7 @@ IMPL_LINK_NOARG(SvxHyperlinkInternetTp, ClickBrowseHdl_Impl) SfxBoolItem aBrowse( SID_BROWSE, true ); const SfxPoolItem *ppItems[] = { &aName, &aNewView, &aSilent, &aReadOnly, &aRefererItem, &aBrowse, NULL }; - static_cast(mpDialog)->GetBindings()->Execute( SID_OPENDOC, ppItems, 0, SfxCallMode::ASYNCHRON | SfxCallMode::RECORD ); + static_cast(mpDialog.get())->GetBindings()->Execute( SID_OPENDOC, ppItems, 0, SfxCallMode::ASYNCHRON | SfxCallMode::RECORD ); return 0L; } diff --git a/cui/source/dialogs/hlmailtp.cxx b/cui/source/dialogs/hlmailtp.cxx index d110b292a73d..6e1da44b6fe4 100644 --- a/cui/source/dialogs/hlmailtp.cxx +++ b/cui/source/dialogs/hlmailtp.cxx @@ -66,6 +66,20 @@ SvxHyperlinkMailTp::SvxHyperlinkMailTp ( vcl::Window *pParent, IconChoiceDialog* m_pBtAdrBook->Hide(); } +SvxHyperlinkMailTp::~SvxHyperlinkMailTp() +{ + dispose(); +} + +void SvxHyperlinkMailTp::dispose() +{ + m_pCbbReceiver.clear(); + m_pBtAdrBook.clear(); + m_pFtSubject.clear(); + m_pEdSubject.clear(); + SvxHyperlinkTabPageBase::dispose(); +} + /************************************************************************* |* |* Fill the all dialog-controls except controls in groupbox "more..." diff --git a/cui/source/dialogs/hlmarkwn.cxx b/cui/source/dialogs/hlmarkwn.cxx index 02058c78c0ed..bfe9c67a1d60 100644 --- a/cui/source/dialogs/hlmarkwn.cxx +++ b/cui/source/dialogs/hlmarkwn.cxx @@ -72,6 +72,17 @@ SvxHlmarkTreeLBox::SvxHlmarkTreeLBox(vcl::Window* pParent, WinBits nStyle) SetNodeDefaultImages(); } +SvxHlmarkTreeLBox::~SvxHlmarkTreeLBox() +{ + dispose(); +} + +void SvxHlmarkTreeLBox::dispose() +{ + mpParentWnd.clear(); + SvTreeListBox::dispose(); +} + extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeSvxHlmarkTreeLBox(vcl::Window *pParent, VclBuilder::stringmap &rMap) { WinBits nWinStyle = WB_TABSTOP; @@ -156,6 +167,10 @@ SvxHlinkDlgMarkWnd::~SvxHlinkDlgMarkWnd() void SvxHlinkDlgMarkWnd::dispose() { ClearTree(); + mpBtApply.clear(); + mpBtClose.clear(); + mpLbTree.clear(); + mpParent.clear(); ModalDialog::dispose(); } diff --git a/cui/source/dialogs/hltpbase.cxx b/cui/source/dialogs/hltpbase.cxx index 804442321f1d..7bc162e4c3f8 100644 --- a/cui/source/dialogs/hltpbase.cxx +++ b/cui/source/dialogs/hltpbase.cxx @@ -114,9 +114,13 @@ void SvxHyperlinkTabPageBase::dispose() { maTimer.Stop(); - delete mpMarkWnd; - mpMarkWnd = NULL; - + mpCbbFrame.clear(); + mpLbForm.clear(); + mpEdIndication.clear(); + mpEdText.clear(); + mpBtScript.clear(); + mpDialog.clear(); + mpMarkWnd.clear(); IconChoicePage::dispose(); } @@ -291,13 +295,13 @@ void SvxHyperlinkTabPageBase::SetInitFocus() // Ask dialog whether the curretn doc is a HTML-doc bool SvxHyperlinkTabPageBase::IsHTMLDoc() const { - return static_cast(mpDialog)->IsHTMLDoc(); + return static_cast(mpDialog.get())->IsHTMLDoc(); } // retrieve dispatcher SfxDispatcher* SvxHyperlinkTabPageBase::GetDispatcher() const { - return static_cast(mpDialog)->GetDispatcher(); + return static_cast(mpDialog.get())->GetDispatcher(); } // Click on imagebutton : Script diff --git a/cui/source/dialogs/hyphen.cxx b/cui/source/dialogs/hyphen.cxx index af6d29876456..8c4ea99822f4 100644 --- a/cui/source/dialogs/hyphen.cxx +++ b/cui/source/dialogs/hyphen.cxx @@ -512,6 +512,24 @@ SvxHyphenWordDialog::SvxHyphenWordDialog( Enable( false ); } +SvxHyphenWordDialog::~SvxHyphenWordDialog() +{ + dispose(); +} + +void SvxHyphenWordDialog::dispose() +{ + m_pWordEdit.clear(); + m_pLeftBtn.clear(); + m_pRightBtn.clear(); + m_pOkBtn.clear(); + m_pContBtn.clear(); + m_pDelBtn.clear(); + m_pHyphAll.clear(); + m_pCloseBtn.clear(); + SfxModalDialog::dispose(); +} + void SvxHyphenWordDialog::SetWindowTitle( LanguageType nLang ) { diff --git a/cui/source/dialogs/iconcdlg.cxx b/cui/source/dialogs/iconcdlg.cxx index 0a1c70e7d70b..712d78fa969f 100644 --- a/cui/source/dialogs/iconcdlg.cxx +++ b/cui/source/dialogs/iconcdlg.cxx @@ -52,6 +52,16 @@ IconChoicePage::IconChoicePage( vcl::Window *pParent, const OString& rID, } +IconChoicePage::~IconChoicePage() +{ + dispose(); +} + +void IconChoicePage::dispose() +{ + pDialog.clear(); + TabPage::dispose(); +} /********************************************************************** | @@ -246,7 +256,6 @@ void IconChoiceDialog::dispose() SvxIconChoiceCtrlEntry* pEntry = m_pIconCtrl->GetEntry ( i ); delete static_cast(pEntry->GetUserData()); } - m_pIconCtrl = NULL; } delete pRanges; @@ -254,6 +263,13 @@ void IconChoiceDialog::dispose() delete pOutSet; pOutSet = NULL; + m_pIconCtrl.clear(); + m_pOKBtn.clear(); + m_pApplyBtn.clear(); + m_pCancelBtn.clear(); + m_pHelpBtn.clear(); + m_pResetBtn.clear(); + m_pTabContainer.clear(); ModalDialog::dispose(); } @@ -540,7 +556,7 @@ bool IconChoiceDialog::DeActivatePageImpl () for ( size_t i = 0, nCount = maPageList.size(); i < nCount; ++i ) { IconChoicePageData* pObj = maPageList[ i ]; - if ( pObj->pPage != pPage ) + if ( pObj->pPage.get() != pPage ) pObj->bRefresh = true; else pObj->bRefresh = false; diff --git a/cui/source/dialogs/insdlg.cxx b/cui/source/dialogs/insdlg.cxx index 4131c40c5c8a..db3bf1fef153 100644 --- a/cui/source/dialogs/insdlg.cxx +++ b/cui/source/dialogs/insdlg.cxx @@ -191,6 +191,24 @@ SvInsertOleDlg::SvInsertOleDlg RadioHdl( NULL ); } +SvInsertOleDlg::~SvInsertOleDlg() +{ + dispose(); +} + +void SvInsertOleDlg::dispose() +{ + m_pRbNewObject.clear(); + m_pRbObjectFromfile.clear(); + m_pObjectTypeFrame.clear(); + m_pLbObjecttype.clear(); + m_pFileFrame.clear(); + m_pEdFilepath.clear(); + m_pBtnFilepath.clear(); + m_pCbFilelink.clear(); + InsertObjectDialog_Impl::dispose(); +} + short SvInsertOleDlg::Execute() { short nRet = RET_OK; @@ -402,6 +420,9 @@ void SvInsertPlugInDialog::dispose() { delete m_pURL; m_pURL = NULL; + m_pEdFileurl.clear(); + m_pBtnFileurl.clear(); + m_pEdPluginsOptions.clear(); InsertObjectDialog_Impl::dispose(); } @@ -494,6 +515,30 @@ SfxInsertFloatingFrameDialog::SfxInsertFloatingFrameDialog( vcl::Window *pParent Init(); } +SfxInsertFloatingFrameDialog::~SfxInsertFloatingFrameDialog() +{ + dispose(); +} + +void SfxInsertFloatingFrameDialog::dispose() +{ + m_pEDName.clear(); + m_pEDURL.clear(); + m_pBTOpen.clear(); + m_pRBScrollingOn.clear(); + m_pRBScrollingOff.clear(); + m_pRBScrollingAuto.clear(); + m_pRBFrameBorderOn.clear(); + m_pRBFrameBorderOff.clear(); + m_pFTMarginWidth.clear(); + m_pNMMarginWidth.clear(); + m_pCBMarginWidthDefault.clear(); + m_pFTMarginHeight.clear(); + m_pNMMarginHeight.clear(); + m_pCBMarginHeightDefault.clear(); + InsertObjectDialog_Impl::dispose(); +} + void SfxInsertFloatingFrameDialog::Init() { get(m_pEDName, "edname"); diff --git a/cui/source/dialogs/insrc.cxx b/cui/source/dialogs/insrc.cxx index c3c167cca62d..75e85733940b 100644 --- a/cui/source/dialogs/insrc.cxx +++ b/cui/source/dialogs/insrc.cxx @@ -45,6 +45,19 @@ SvxInsRowColDlg::SvxInsRowColDlg(vcl::Window* pParent, bool bCol, const OString& SetHelpId( sHelpId ); } +SvxInsRowColDlg::~SvxInsRowColDlg() +{ + dispose(); +} + +void SvxInsRowColDlg::dispose() +{ + m_pCountEdit.clear(); + m_pBeforeBtn.clear(); + m_pAfterBtn.clear(); + ModalDialog::dispose(); +} + short SvxInsRowColDlg::Execute(void) { return ModalDialog::Execute(); diff --git a/cui/source/dialogs/linkdlg.cxx b/cui/source/dialogs/linkdlg.cxx index 95c348d0a364..68a9c19b375b 100644 --- a/cui/source/dialogs/linkdlg.cxx +++ b/cui/source/dialogs/linkdlg.cxx @@ -143,6 +143,26 @@ SvBaseLinksDlg::SvBaseLinksDlg( vcl::Window * pParent, LinkManager* pMgr, bool b SetManager( pMgr ); } +SvBaseLinksDlg::~SvBaseLinksDlg() +{ + dispose(); +} + +void SvBaseLinksDlg::dispose() +{ + m_pTbLinks.clear(); + m_pFtFullFileName.clear(); + m_pFtFullSourceName.clear(); + m_pFtFullTypeName.clear(); + m_pRbAutomatic.clear(); + m_pRbManual.clear(); + m_pPbUpdateNow.clear(); + m_pPbOpenSource.clear(); + m_pPbChangeSource.clear(); + m_pPbBreakLink.clear(); + ModalDialog::dispose(); +} + /************************************************************************* |* SvBaseLinksDlg::Handler() *************************************************************************/ diff --git a/cui/source/dialogs/multipat.cxx b/cui/source/dialogs/multipat.cxx index ebb8fcdca031..9cbbef5f2160 100644 --- a/cui/source/dialogs/multipat.cxx +++ b/cui/source/dialogs/multipat.cxx @@ -229,16 +229,19 @@ SvxMultiPathDialog::~SvxMultiPathDialog() void SvxMultiPathDialog::dispose() { - sal_uInt16 nPos = (sal_uInt16)m_pRadioLB->GetEntryCount(); - while ( nPos-- ) + if (m_pRadioLB) { - SvTreeListEntry* pEntry = m_pRadioLB->GetEntry( nPos ); - delete static_cast(pEntry->GetUserData()); + sal_uInt16 nPos = (sal_uInt16)m_pRadioLB->GetEntryCount(); + while ( nPos-- ) + { + SvTreeListEntry* pEntry = m_pRadioLB->GetEntry( nPos ); + delete static_cast(pEntry->GetUserData()); + } } - delete m_pRadioLB; - m_pRadioLB = NULL; - + m_pRadioLB.clear(); + m_pAddBtn.clear(); + m_pDelBtn.clear(); ModalDialog::dispose(); } @@ -254,8 +257,10 @@ void SvxPathSelectDialog::dispose() sal_uInt16 nPos = m_pPathLB->GetEntryCount(); while ( nPos-- ) delete static_cast(m_pPathLB->GetEntryData(nPos)); - m_pPathLB = NULL; } + m_pPathLB.clear(); + m_pAddBtn.clear(); + m_pDelBtn.clear(); ModalDialog::dispose(); } diff --git a/cui/source/dialogs/newtabledlg.cxx b/cui/source/dialogs/newtabledlg.cxx index ab9058c0c975..3c2cba513fef 100644 --- a/cui/source/dialogs/newtabledlg.cxx +++ b/cui/source/dialogs/newtabledlg.cxx @@ -28,6 +28,18 @@ SvxNewTableDialog::SvxNewTableDialog( vcl::Window* pParent ) get(mpNumColumns, "columns"); } +SvxNewTableDialog::~SvxNewTableDialog() +{ + dispose(); +} + +void SvxNewTableDialog::dispose() +{ + mpNumColumns.clear(); + mpNumRows.clear(); + ModalDialog::dispose(); +} + short SvxNewTableDialog::Execute(void) { return ModalDialog::Execute(); diff --git a/cui/source/dialogs/passwdomdlg.cxx b/cui/source/dialogs/passwdomdlg.cxx index ccba00009552..ad4e26bfc711 100644 --- a/cui/source/dialogs/passwdomdlg.cxx +++ b/cui/source/dialogs/passwdomdlg.cxx @@ -31,15 +31,15 @@ struct PasswordToOpenModifyDialog_Impl { - PasswordToOpenModifyDialog * m_pParent; - - Edit* m_pPasswdToOpenED; - Edit* m_pReenterPasswdToOpenED; - VclExpander* m_pOptionsExpander; - OKButton* m_pOk; - CheckBox* m_pOpenReadonlyCB; - Edit* m_pPasswdToModifyED; - Edit* m_pReenterPasswdToModifyED; + VclPtr m_pParent; + + VclPtr m_pPasswdToOpenED; + VclPtr m_pReenterPasswdToOpenED; + VclPtr m_pOptionsExpander; + VclPtr m_pOk; + VclPtr m_pOpenReadonlyCB; + VclPtr m_pPasswdToModifyED; + VclPtr m_pReenterPasswdToModifyED; OUString m_aOneMismatch; OUString m_aTwoMismatch; diff --git a/cui/source/dialogs/pastedlg.cxx b/cui/source/dialogs/pastedlg.cxx index 90610557f6fb..f7ae8397c63b 100644 --- a/cui/source/dialogs/pastedlg.cxx +++ b/cui/source/dialogs/pastedlg.cxx @@ -52,6 +52,19 @@ SvPasteObjectDialog::SvPasteObjectDialog( vcl::Window* pParent ) ObjectLB().SetDoubleClickHdl( LINK( this, SvPasteObjectDialog, DoubleClickHdl ) ); } +SvPasteObjectDialog::~SvPasteObjectDialog() +{ + dispose(); +} + +void SvPasteObjectDialog::dispose() +{ + m_pFtObjectSource.clear(); + m_pLbInsertList.clear(); + m_pOKButton.clear(); + ModalDialog::dispose(); +} + void SvPasteObjectDialog::SelectObject() { if (m_pLbInsertList->GetEntryCount()) diff --git a/cui/source/dialogs/postdlg.cxx b/cui/source/dialogs/postdlg.cxx index 86d0e5812f32..175d889a1e71 100644 --- a/cui/source/dialogs/postdlg.cxx +++ b/cui/source/dialogs/postdlg.cxx @@ -131,6 +131,13 @@ void SvxPostItDialog::dispose() { delete pOutSet; pOutSet = 0; + m_pLastEditFT.clear(); + m_pEditED.clear(); + m_pInsertAuthor.clear(); + m_pAuthorBtn.clear(); + m_pOKBtn.clear(); + m_pPrevBtn.clear(); + m_pNextBtn.clear(); SfxModalDialog::dispose(); } diff --git a/cui/source/dialogs/scriptdlg.cxx b/cui/source/dialogs/scriptdlg.cxx index 4013f71e6925..a5db7a283c0b 100644 --- a/cui/source/dialogs/scriptdlg.cxx +++ b/cui/source/dialogs/scriptdlg.cxx @@ -443,6 +443,17 @@ CuiInputDialog::CuiInputDialog(vcl::Window * pParent, sal_uInt16 nMode ) } } +CuiInputDialog::~CuiInputDialog() +{ + dispose(); +} + +void CuiInputDialog::dispose() +{ + m_pEdit.clear(); + ModalDialog::dispose(); +} + // ScriptOrgDialog ------------------------------------------------------------ @@ -500,6 +511,13 @@ void SvxScriptOrgDialog::dispose() { // clear the SelectHdl so that it isn't called during the dtor m_pScriptsBox->SetSelectHdl( Link() ); + m_pScriptsBox.clear(); + m_pRunButton.clear(); + m_pCloseButton.clear(); + m_pCreateButton.clear(); + m_pEditButton.clear(); + m_pRenameButton.clear(); + m_pDelButton.clear(); SfxModalDialog::dispose(); }; diff --git a/cui/source/dialogs/showcols.cxx b/cui/source/dialogs/showcols.cxx index 94e286ecd92d..a58c9417bffa 100644 --- a/cui/source/dialogs/showcols.cxx +++ b/cui/source/dialogs/showcols.cxx @@ -39,6 +39,17 @@ FmShowColsDialog::FmShowColsDialog(vcl::Window* pParent) m_pOK->SetClickHdl( LINK( this, FmShowColsDialog, OnClickedOk ) ); } +FmShowColsDialog::~FmShowColsDialog() +{ + dispose(); +} + +void FmShowColsDialog::dispose() +{ + m_pList.clear(); + m_pOK.clear(); + ModalDialog::dispose(); +} IMPL_LINK_NOARG(FmShowColsDialog, OnClickedOk) { diff --git a/cui/source/dialogs/splitcelldlg.cxx b/cui/source/dialogs/splitcelldlg.cxx index edce7998effe..171ea3a1bdc9 100644 --- a/cui/source/dialogs/splitcelldlg.cxx +++ b/cui/source/dialogs/splitcelldlg.cxx @@ -53,6 +53,20 @@ SvxSplitTableDlg::SvxSplitTableDlg( vcl::Window *pParent, bool bIsTableVertical, } } +SvxSplitTableDlg::~SvxSplitTableDlg() +{ + dispose(); +} + +void SvxSplitTableDlg::dispose() +{ + m_pCountEdit.clear(); + m_pHorzBox.clear(); + m_pVertBox.clear(); + m_pPropCB.clear(); + SvxStandardDialog::dispose(); +} + IMPL_LINK( SvxSplitTableDlg, ClickHdl, Button *, pButton ) { const bool bIsVert = pButton == m_pVertBox ; diff --git a/cui/source/dialogs/srchxtra.cxx b/cui/source/dialogs/srchxtra.cxx index bb797e3d4dd8..4d1541347c71 100644 --- a/cui/source/dialogs/srchxtra.cxx +++ b/cui/source/dialogs/srchxtra.cxx @@ -178,6 +178,17 @@ SvxSearchAttributeDialog::SvxSearchAttributeDialog(vcl::Window* pParent, m_pAttrLB->SelectEntryPos( 0 ); } +SvxSearchAttributeDialog::~SvxSearchAttributeDialog() +{ + dispose(); +} + +void SvxSearchAttributeDialog::dispose() +{ + m_pAttrLB.clear(); + m_pOKBtn.clear(); + ModalDialog::dispose(); +} IMPL_LINK_NOARG(SvxSearchAttributeDialog, OKHdl) @@ -248,4 +259,18 @@ SvxSearchSimilarityDialog::SvxSearchSimilarityDialog m_pRelaxBox->Check( bRelax ); } +SvxSearchSimilarityDialog::~SvxSearchSimilarityDialog() +{ + dispose(); +} + +void SvxSearchSimilarityDialog::dispose() +{ + m_pOtherFld.clear(); + m_pLongerFld.clear(); + m_pShorterFld.clear(); + m_pRelaxBox.clear(); + ModalDialog::dispose(); +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cui/source/dialogs/thesdlg.cxx b/cui/source/dialogs/thesdlg.cxx index c0afe2a2c430..8a47ac55a292 100644 --- a/cui/source/dialogs/thesdlg.cxx +++ b/cui/source/dialogs/thesdlg.cxx @@ -66,6 +66,17 @@ LookUpComboBox::LookUpComboBox(vcl::Window *pParent) EnableAutocomplete( false ); } +LookUpComboBox::~LookUpComboBox() +{ + dispose(); +} + +void LookUpComboBox::dispose() +{ + m_pDialog.clear(); + ComboBox::dispose(); +} + extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeLookUpComboBox(vcl::Window *pParent, VclBuilder::stringmap &) { return new LookUpComboBox(pParent); @@ -96,6 +107,18 @@ ReplaceEdit::ReplaceEdit(vcl::Window *pParent) { } +ReplaceEdit::~ReplaceEdit() +{ + dispose(); +} + +void ReplaceEdit::dispose() +{ + m_pBtn.clear(); + Edit::dispose(); +} + + extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeReplaceEdit(vcl::Window *pParent, VclBuilder::stringmap &) { return new ReplaceEdit(pParent); @@ -176,6 +199,7 @@ ThesaurusAlternativesCtrl::~ThesaurusAlternativesCtrl() void ThesaurusAlternativesCtrl::dispose() { ClearExtraData(); + m_pDialog.clear(); SvxCheckListBox::dispose(); } @@ -514,6 +538,21 @@ SvxThesaurusDialog::SvxThesaurusDialog( Enable( false ); } +SvxThesaurusDialog::~SvxThesaurusDialog() +{ + dispose(); +} + +void SvxThesaurusDialog::dispose() +{ + m_pLeftBtn.clear(); + m_pWordCB.clear(); + m_pAlternativesCT.clear(); + m_pReplaceEdit.clear(); + m_pLangLB.clear(); + SvxStandardDialog::dispose(); +} + IMPL_LINK( SvxThesaurusDialog, ReplaceBtnHdl_Impl, Button *, EMPTYARG /*pBtn*/ ) { EndDialog(RET_OK); diff --git a/cui/source/dialogs/zoom.cxx b/cui/source/dialogs/zoom.cxx index 190a0619b7d7..451de5506da4 100644 --- a/cui/source/dialogs/zoom.cxx +++ b/cui/source/dialogs/zoom.cxx @@ -297,6 +297,19 @@ void SvxZoomDialog::dispose() { delete pOutSet; pOutSet = 0; + m_pOptimalBtn.clear(); + m_pWholePageBtn.clear(); + m_pPageWidthBtn.clear(); + m_p100Btn.clear(); + m_pUserBtn.clear(); + m_pUserEdit.clear(); + m_pViewFrame.clear(); + m_pAutomaticBtn.clear(); + m_pSingleBtn.clear(); + m_pColumnsBtn.clear(); + m_pColumnsEdit.clear(); + m_pBookModeChk.clear(); + m_pOKBtn.clear(); SfxModalDialog::dispose(); } diff --git a/cui/source/factory/cuiexp.cxx b/cui/source/factory/cuiexp.cxx index 8bb9d51ef1f6..754d8b47a092 100644 --- a/cui/source/factory/cuiexp.cxx +++ b/cui/source/factory/cuiexp.cxx @@ -17,6 +17,35 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include "sfx2/basedlgs.hxx" +#include "cuigaldlg.hxx" +#include "hlmarkwn.hxx" +#include "srchxtra.hxx" +#include "cuisrchdlg.hxx" +#include "transfrm.hxx" +#include "labdlg.hxx" +#include "cuitbxform.hxx" +#include "optdict.hxx" +#include "dlgname.hxx" +#include "cuiimapwnd.hxx" +#include "multipat.hxx" +#include "cuifmsearch.hxx" +#include "cuigrfflt.hxx" +#include "cuitabarea.hxx" +#include "insdlg.hxx" +#include "pastedlg.hxx" +#include "linkdlg.hxx" +#include "postdlg.hxx" +#include "passwdomdlg.hxx" +#include "cuihyperdlg.hxx" +#include "selector.hxx" +#include "SpellDialog.hxx" +#include "zoom.hxx" +#include "showcols.hxx" +#include "hyphen.hxx" +#include "thesdlg.hxx" +#include "hangulhanjadlg.hxx" +#include "dstribut.hxx" #include "dlgfact.hxx" #include "sal/types.h" diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx index f2f368ad4dc1..4043f8c5f9ad 100644 --- a/cui/source/factory/dlgfact.cxx +++ b/cui/source/factory/dlgfact.cxx @@ -107,7 +107,6 @@ IMPL_ABSTDLG_BASE(AbstractThesaurusDialog_Impl) AbstractSvxZoomDialog_Impl::~AbstractSvxZoomDialog_Impl() \ { - delete pDlg; } short AbstractSvxZoomDialog_Impl::Execute() { @@ -154,7 +153,6 @@ IMPL_ABSTDLG_BASE(AbstractPasswordToOpenModifyDialog_Impl); // virtual VclAbstractDialog2_Impl::~VclAbstractDialog2_Impl() { - delete m_pDlg; } // virtual diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx index ffb15778c5e1..d356bbab2181 100644 --- a/cui/source/factory/dlgfact.hxx +++ b/cui/source/factory/dlgfact.hxx @@ -61,7 +61,7 @@ class HangulHanjaConversionDialog; using namespace svx; #define DECL_ABSTDLG_BASE(Class,DialogClass) \ - DialogClass* pDlg; \ + VclPtr pDlg; \ public: \ Class( DialogClass* p) \ : pDlg(p) \ @@ -72,7 +72,6 @@ public: \ #define IMPL_ABSTDLG_BASE(Class) \ Class::~Class() \ { \ - delete pDlg; \ } \ short Class::Execute() \ { \ @@ -81,7 +80,7 @@ short Class::Execute() \ class VclAbstractDialog2_Impl : public VclAbstractDialog2 { - Dialog* m_pDlg; + VclPtr m_pDlg; Link m_aEndDlgHdl; public: VclAbstractDialog2_Impl( Dialog* p ) : m_pDlg( p ) {} diff --git a/cui/source/inc/ControlFocusHelper.hxx b/cui/source/inc/ControlFocusHelper.hxx index b984838fa09c..6530f3cf6740 100644 --- a/cui/source/inc/ControlFocusHelper.hxx +++ b/cui/source/inc/ControlFocusHelper.hxx @@ -26,11 +26,13 @@ class SvxControlFocusHelper : public Control { private: - Control* m_pFocusCtrl; + VclPtr m_pFocusCtrl; public: SvxControlFocusHelper( vcl::Window* pParent, const ResId& rId ) : Control( pParent, rId ), m_pFocusCtrl( NULL ) {} + virtual ~SvxControlFocusHelper(); + virtual void dispose() SAL_OVERRIDE; void SetFocusControl( Control* pCtrl ) { m_pFocusCtrl = pCtrl; } diff --git a/cui/source/inc/SpellDialog.hxx b/cui/source/inc/SpellDialog.hxx index e24334bd14b6..411df36dd123 100644 --- a/cui/source/inc/SpellDialog.hxx +++ b/cui/source/inc/SpellDialog.hxx @@ -124,33 +124,33 @@ class SpellDialog : public SfxModelessDialog friend class SentenceEditWindow_Impl; private: - FixedText* m_pLanguageFT; - SvxLanguageBox* m_pLanguageLB; + VclPtr m_pLanguageFT; + VclPtr m_pLanguageLB; - FixedText* m_pExplainFT; - FixedHyperlink* m_pExplainLink; + VclPtr m_pExplainFT; + VclPtr m_pExplainLink; - FixedText* m_pNotInDictFT; - SentenceEditWindow_Impl* m_pSentenceED; + VclPtr m_pNotInDictFT; + VclPtr m_pSentenceED; - FixedText* m_pSuggestionFT; - ListBox* m_pSuggestionLB; + VclPtr m_pSuggestionFT; + VclPtr m_pSuggestionLB; - PushButton* m_pIgnorePB; - PushButton* m_pIgnoreAllPB; - PushButton* m_pIgnoreRulePB; - PushButton* m_pAddToDictPB; - MenuButton* m_pAddToDictMB; + VclPtr m_pIgnorePB; + VclPtr m_pIgnoreAllPB; + VclPtr m_pIgnoreRulePB; + VclPtr m_pAddToDictPB; + VclPtr m_pAddToDictMB; - PushButton* m_pChangePB; - PushButton* m_pChangeAllPB; - PushButton* m_pAutoCorrPB; + VclPtr m_pChangePB; + VclPtr m_pChangeAllPB; + VclPtr m_pAutoCorrPB; - CheckBox* m_pCheckGrammarCB; + VclPtr m_pCheckGrammarCB; - PushButton* m_pOptionsPB; - PushButton* m_pUndoPB; - CloseButton* m_pClosePB; + VclPtr m_pOptionsPB; + VclPtr m_pUndoPB; + VclPtr m_pClosePB; OUString m_sResumeST; OUString m_sIgnoreOnceST; diff --git a/cui/source/inc/about.hxx b/cui/source/inc/about.hxx index 132ab541702e..82cfac00ee18 100644 --- a/cui/source/inc/about.hxx +++ b/cui/source/inc/about.hxx @@ -34,13 +34,13 @@ private: BitmapEx aBackgroundBitmap; BitmapEx aLogoBitmap; - VclMultiLineEdit* m_pVersion; - FixedText* m_pDescriptionText; - FixedText* m_pCopyrightText; - FixedImage* m_pLogoImage; - FixedText* m_pLogoReplacement; - PushButton* m_pCreditsButton; - PushButton* m_pWebsiteButton; + VclPtr m_pVersion; + VclPtr m_pDescriptionText; + VclPtr m_pCopyrightText; + VclPtr m_pLogoImage; + VclPtr m_pLogoReplacement; + VclPtr m_pCreditsButton; + VclPtr m_pWebsiteButton; OUString m_aVersionTextStr; OUString m_aVendorTextStr; @@ -66,6 +66,8 @@ protected: public: AboutDialog(vcl::Window* pParent); + virtual ~AboutDialog(); + virtual void dispose() SAL_OVERRIDE; DECL_LINK( HandleClick, PushButton* ); }; diff --git a/cui/source/inc/acccfg.hxx b/cui/source/inc/acccfg.hxx index dc156cc914c6..6c487cabc80f 100644 --- a/cui/source/inc/acccfg.hxx +++ b/cui/source/inc/acccfg.hxx @@ -53,7 +53,7 @@ class SfxStringItem; class SfxAccCfgTabListBox_Impl : public SvTabListBox { - SfxAcceleratorConfigPage* m_pAccelConfigPage; + VclPtr m_pAccelConfigPage; void KeyInput( const KeyEvent &rKEvt ) SAL_OVERRIDE; @@ -67,6 +67,8 @@ public: , m_pAccelConfigPage(NULL) { } + virtual ~SfxAccCfgTabListBox_Impl(); + virtual void dispose() SAL_OVERRIDE; void SetAccelConfigPage(SfxAcceleratorConfigPage* pAccelConfigPage) { @@ -118,17 +120,17 @@ private: const SfxStringItem* m_pFontItem; sfx2::FileDialogHelper* m_pFileDlg; - SfxAccCfgTabListBox_Impl* m_pEntriesBox; - RadioButton* m_pOfficeButton; - RadioButton* m_pModuleButton; - PushButton* m_pChangeButton; - PushButton* m_pRemoveButton; - SfxConfigGroupListBox* m_pGroupLBox; - SfxConfigFunctionListBox* m_pFunctionBox; - SvTreeListBox* m_pKeyBox; - PushButton* m_pLoadButton; - PushButton* m_pSaveButton; - PushButton* m_pResetButton; + VclPtr m_pEntriesBox; + VclPtr m_pOfficeButton; + VclPtr m_pModuleButton; + VclPtr m_pChangeButton; + VclPtr m_pRemoveButton; + VclPtr m_pGroupLBox; + VclPtr m_pFunctionBox; + VclPtr m_pKeyBox; + VclPtr m_pLoadButton; + VclPtr m_pSaveButton; + VclPtr m_pResetButton; OUString aLoadAccelConfigStr; OUString aSaveAccelConfigStr; OUString aFilterAllStr; diff --git a/cui/source/inc/align.hxx b/cui/source/inc/align.hxx index 3f56d128e87b..0be6bc61d698 100644 --- a/cui/source/inc/align.hxx +++ b/cui/source/inc/align.hxx @@ -79,36 +79,36 @@ private: DECL_LINK( UpdateEnableHdl, void* ); private: - ListBox* m_pLbHorAlign; - FixedText* m_pFtIndent; - MetricField* m_pEdIndent; - FixedText* m_pFtVerAlign; - ListBox* m_pLbVerAlign; - - DialControl* m_pCtrlDial; - FixedText* m_pFtRotate; - NumericField* m_pNfRotate; - FixedText* m_pFtRefEdge; - ValueSet* m_pVsRefEdge; - TriStateBox* m_pCbStacked; - TriStateBox* m_pCbAsianMode; + VclPtr m_pLbHorAlign; + VclPtr m_pFtIndent; + VclPtr m_pEdIndent; + VclPtr m_pFtVerAlign; + VclPtr m_pLbVerAlign; + + VclPtr m_pCtrlDial; + VclPtr m_pFtRotate; + VclPtr m_pNfRotate; + VclPtr m_pFtRefEdge; + VclPtr m_pVsRefEdge; + VclPtr m_pCbStacked; + VclPtr m_pCbAsianMode; OrientationHelper* m_pOrientHlp; - VclHBox* m_pBoxDirection; - TriStateBox* m_pBtnWrap; - TriStateBox* m_pBtnHyphen; - TriStateBox* m_pBtnShrink; - FrameDirListBox* m_pLbFrameDir; + VclPtr m_pBoxDirection; + VclPtr m_pBtnWrap; + VclPtr m_pBtnHyphen; + VclPtr m_pBtnShrink; + VclPtr m_pLbFrameDir; // hidden labels/string - FixedText* m_pFtBotLock; - FixedText* m_pFtTopLock; - FixedText* m_pFtCelLock; - FixedText* m_pFtABCD; - - VclContainer* m_pAlignmentFrame; - VclContainer* m_pOrientFrame; - VclContainer* m_pPropertiesFrame; + VclPtr m_pFtBotLock; + VclPtr m_pFtTopLock; + VclPtr m_pFtCelLock; + VclPtr m_pFtABCD; + + VclPtr m_pAlignmentFrame; + VclPtr m_pOrientFrame; + VclPtr m_pPropertiesFrame; }; diff --git a/cui/source/inc/autocdlg.hxx b/cui/source/inc/autocdlg.hxx index 17e2bb64b66f..bed9ffc9b533 100644 --- a/cui/source/inc/autocdlg.hxx +++ b/cui/source/inc/autocdlg.hxx @@ -43,8 +43,8 @@ namespace editeng { class SortedAutoCompleteStrings; } class OfaAutoCorrDlg : public SfxTabDialog { - VclContainer* m_pLanguageBox; - SvxLanguageBox* m_pLanguageLB; + VclPtr m_pLanguageBox; + VclPtr m_pLanguageLB; sal_uInt16 m_nReplacePageId; sal_uInt16 m_nExceptionsPageId; @@ -53,6 +53,8 @@ class OfaAutoCorrDlg : public SfxTabDialog public: OfaAutoCorrDlg(vcl::Window* pParent, const SfxItemSet *pSet); + virtual ~OfaAutoCorrDlg(); + virtual void dispose() SAL_OVERRIDE; void EnableLanguage(bool bEnable); }; @@ -94,7 +96,7 @@ class OfaAutocorrOptionsPage : public SfxTabPage using TabPage::ActivatePage; private: - SvxCheckListBox *m_pCheckLB; + VclPtr m_pCheckLB; OUString m_sInput; OUString m_sDoubleCaps; @@ -107,6 +109,8 @@ private: public: OfaAutocorrOptionsPage(vcl::Window* pParent, const SfxItemSet& rSet); + virtual ~OfaAutocorrOptionsPage(); + virtual void dispose() SAL_OVERRIDE; static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rAttrSet); @@ -123,8 +127,8 @@ class OfaSwAutoFmtOptionsPage : public SfxTabPage { using TabPage::ActivatePage; - OfaACorrCheckListBox* m_pCheckLB; - PushButton* m_pEditPB; + VclPtr m_pCheckLB; + VclPtr m_pEditPB; OUString sDeleteEmptyPara; OUString sUseReplaceTbl; @@ -225,12 +229,12 @@ private: StringChangeTable aChangesTable; - CheckBox* m_pTextOnlyCB; - AutoCorrEdit* m_pShortED; - AutoCorrEdit* m_pReplaceED; - SvTabListBox* m_pReplaceTLB; - PushButton* m_pNewReplacePB; - PushButton* m_pDeleteReplacePB; + VclPtr m_pTextOnlyCB; + VclPtr m_pShortED; + VclPtr m_pReplaceED; + VclPtr m_pReplaceTLB; + VclPtr m_pNewReplacePB; + VclPtr m_pDeleteReplacePB; OUString sModify; OUString sNew; @@ -291,17 +295,17 @@ class OfaAutocorrExceptPage : public SfxTabPage using TabPage::DeactivatePage; private: - AutoCorrEdit* m_pAbbrevED; - ListBox* m_pAbbrevLB; - PushButton* m_pNewAbbrevPB; - PushButton* m_pDelAbbrevPB; - CheckBox* m_pAutoAbbrevCB; - - AutoCorrEdit* m_pDoubleCapsED; - ListBox* m_pDoubleCapsLB; - PushButton* m_pNewDoublePB; - PushButton* m_pDelDoublePB; - CheckBox* m_pAutoCapsCB; + VclPtr m_pAbbrevED; + VclPtr m_pAbbrevLB; + VclPtr m_pNewAbbrevPB; + VclPtr m_pDelAbbrevPB; + VclPtr m_pAutoAbbrevCB; + + VclPtr m_pDoubleCapsED; + VclPtr m_pDoubleCapsLB; + VclPtr m_pNewDoublePB; + VclPtr m_pDelDoublePB; + VclPtr m_pAutoCapsCB; StringsTable aStringsTable; CollatorWrapper* pCompareClass; @@ -338,29 +342,29 @@ class OfaQuoteTabPage : public SfxTabPage private: /// For anything but writer - SvxCheckListBox* m_pCheckLB; + VclPtr m_pCheckLB; /// Just for writer - OfaACorrCheckListBox* m_pSwCheckLB; + VclPtr m_pSwCheckLB; OUString sNonBrkSpace; OUString sOrdinal; SvLBoxButtonData* pCheckButtonData; - CheckBox* m_pSingleTypoCB; - PushButton* m_pSglStartQuotePB; - FixedText* m_pSglStartExFT; - PushButton* m_pSglEndQuotePB; - FixedText* m_pSglEndExFT; - PushButton* m_pSglStandardPB; + VclPtr m_pSingleTypoCB; + VclPtr m_pSglStartQuotePB; + VclPtr m_pSglStartExFT; + VclPtr m_pSglEndQuotePB; + VclPtr m_pSglEndExFT; + VclPtr m_pSglStandardPB; - CheckBox* m_pDoubleTypoCB; - PushButton* m_pDblStartQuotePB; - FixedText* m_pDblStartExFT; - PushButton* m_pDblEndQuotePB; - FixedText* m_pDblEndExFT; - PushButton* m_pDblStandardPB; + VclPtr m_pDoubleTypoCB; + VclPtr m_pDblStartQuotePB; + VclPtr m_pDblStartExFT; + VclPtr m_pDblEndQuotePB; + VclPtr m_pDblEndExFT; + VclPtr m_pDblStandardPB; OUString m_sStartQuoteDlg; OUString m_sEndQuoteDlg; @@ -401,31 +405,33 @@ class OfaAutoCompleteTabPage : public SfxTabPage public: class AutoCompleteMultiListBox : public MultiListBox { - OfaAutoCompleteTabPage* m_pPage; + VclPtr m_pPage; public: AutoCompleteMultiListBox(vcl::Window *pParent, WinBits nBits) : MultiListBox(pParent, nBits) , m_pPage(NULL) { } + virtual ~AutoCompleteMultiListBox(); + virtual void dispose() SAL_OVERRIDE; void SetPage(OfaAutoCompleteTabPage *pPage) { m_pPage = pPage; } virtual bool PreNotify( NotifyEvent& rNEvt ) SAL_OVERRIDE; }; private: using TabPage::ActivatePage; - CheckBox* m_pCBActiv; /// m_pCBActiv; /// m_pCBAppendSpace;/// m_pCBAsTip; /// m_pCBCollect;/// m_pCBRemoveList;///<...save the list for later use... + + VclPtr m_pDCBExpandKey; + VclPtr m_pNFMinWordlen; + VclPtr m_pNFMaxEntries; + VclPtr m_pLBEntries; + VclPtr m_pPBEntries; editeng::SortedAutoCompleteStrings* m_pAutoCompleteList; sal_uInt16 m_nAutoCmpltListCnt; @@ -434,6 +440,8 @@ private: OfaAutoCompleteTabPage( vcl::Window* pParent, const SfxItemSet& rSet ); public: + virtual ~OfaAutoCompleteTabPage(); + virtual void dispose() SAL_OVERRIDE; static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rAttrSet); @@ -458,9 +466,9 @@ class OfaSmartTagOptionsTabPage : public SfxTabPage private: // controls - CheckBox* m_pMainCB; - SvxCheckListBox* m_pSmartTagTypesLB; - PushButton* m_pPropertiesPB; + VclPtr m_pMainCB; + VclPtr m_pSmartTagTypesLB; + VclPtr m_pPropertiesPB; /// construction via Create() OfaSmartTagOptionsTabPage( vcl::Window* pParent, const SfxItemSet& rSet ); @@ -498,6 +506,8 @@ private: DECL_LINK(SelectHdl, void *); public: + virtual ~OfaSmartTagOptionsTabPage(); + virtual void dispose() SAL_OVERRIDE; static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rAttrSet); diff --git a/cui/source/inc/backgrnd.hxx b/cui/source/inc/backgrnd.hxx index 9a0b126e3d8c..57142af5ebf0 100644 --- a/cui/source/inc/backgrnd.hxx +++ b/cui/source/inc/backgrnd.hxx @@ -73,39 +73,39 @@ private: virtual ~SvxBackgroundTabPage(); virtual void dispose() SAL_OVERRIDE; - VclContainer* m_pAsGrid; - FixedText* m_pSelectTxt; - ListBox* m_pLbSelect; - FixedText* m_pTblDesc; - ListBox* m_pTblLBox; - ListBox* m_pParaLBox; + VclPtr m_pAsGrid; + VclPtr m_pSelectTxt; + VclPtr m_pLbSelect; + VclPtr m_pTblDesc; + VclPtr m_pTblLBox; + VclPtr m_pParaLBox; - VclFrame* m_pBackGroundColorFrame; - SvxColorValueSet* m_pBackgroundColorSet; - BackgroundPreviewImpl* m_pPreviewWin1; + VclPtr m_pBackGroundColorFrame; + VclPtr m_pBackgroundColorSet; + VclPtr m_pPreviewWin1; - FixedText* m_pColTransFT;/// m_pColTransFT;/// m_pColTransMF; + VclPtr m_pBtnPreview; // Background Bitmap ---------------------------------- - VclContainer* m_pBitmapContainer; - VclContainer* m_pFileFrame; - PushButton* m_pBtnBrowse; - CheckBox* m_pBtnLink; - FixedText* m_pFtUnlinked; - FixedText* m_pFtFile; - - VclContainer* m_pTypeFrame; - RadioButton* m_pBtnPosition; - RadioButton* m_pBtnArea; - RadioButton* m_pBtnTile; - SvxRectCtl* m_pWndPosition; - - VclContainer* m_pGraphTransFrame;/// m_pBitmapContainer; + VclPtr m_pFileFrame; + VclPtr m_pBtnBrowse; + VclPtr m_pBtnLink; + VclPtr m_pFtUnlinked; + VclPtr m_pFtFile; + + VclPtr m_pTypeFrame; + VclPtr m_pBtnPosition; + VclPtr m_pBtnArea; + VclPtr m_pBtnTile; + VclPtr m_pWndPosition; + + VclPtr m_pGraphTransFrame;/// m_pGraphTransMF; + + VclPtr m_pPreviewWin2; // DDListBox for Writer ------------------------------- diff --git a/cui/source/inc/border.hxx b/cui/source/inc/border.hxx index b05df65dd9f9..ff4b48ab3c7b 100644 --- a/cui/source/inc/border.hxx +++ b/cui/source/inc/border.hxx @@ -45,6 +45,8 @@ class SvxBorderTabPage : public SfxTabPage static const sal_uInt16 pRanges[]; public: + virtual ~SvxBorderTabPage(); + virtual void dispose() SAL_OVERRIDE; static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rAttrSet); static const sal_uInt16* GetRanges() { return pRanges; } @@ -63,37 +65,37 @@ private: SvxBorderTabPage( vcl::Window* pParent, const SfxItemSet& rCoreAttrs ); // Controls - ValueSet* m_pWndPresets; - FixedText* m_pUserDefFT; - svx::FrameSelector* m_pFrameSel; - - LineListBox* m_pLbLineStyle; - ColorListBox* m_pLbLineColor; - MetricField* m_pLineWidthMF; - - VclContainer* m_pSpacingFrame; - FixedText* m_pLeftFT; - MetricField* m_pLeftMF; - FixedText* m_pRightFT; - MetricField* m_pRightMF; - FixedText* m_pTopFT; - MetricField* m_pTopMF; - FixedText* m_pBottomFT; - MetricField* m_pBottomMF; - CheckBox* m_pSynchronizeCB; - - VclContainer* m_pShadowFrame; - ValueSet* m_pWndShadows; - FixedText* m_pFtShadowSize; - MetricField* m_pEdShadowSize; - FixedText* m_pFtShadowColor; - ColorListBox* m_pLbShadowColor; - - - VclContainer* m_pPropertiesFrame;///< properties - "Merge with next paragraph" in Writer - CheckBox* m_pMergeWithNextCB; + VclPtr m_pWndPresets; + VclPtr m_pUserDefFT; + VclPtr m_pFrameSel; + + VclPtr m_pLbLineStyle; + VclPtr m_pLbLineColor; + VclPtr m_pLineWidthMF; + + VclPtr m_pSpacingFrame; + VclPtr m_pLeftFT; + VclPtr m_pLeftMF; + VclPtr m_pRightFT; + VclPtr m_pRightMF; + VclPtr m_pTopFT; + VclPtr m_pTopMF; + VclPtr m_pBottomFT; + VclPtr m_pBottomMF; + VclPtr m_pSynchronizeCB; + + VclPtr m_pShadowFrame; + VclPtr m_pWndShadows; + VclPtr m_pFtShadowSize; + VclPtr m_pEdShadowSize; + VclPtr m_pFtShadowColor; + VclPtr m_pLbShadowColor; + + + VclPtr m_pPropertiesFrame;///< properties - "Merge with next paragraph" in Writer + VclPtr m_pMergeWithNextCB; // #i29550# - CheckBox* m_pMergeAdjacentBordersCB; + VclPtr m_pMergeAdjacentBordersCB; ImageList aShadowImgLstH; ImageList aShadowImgLst; @@ -113,8 +115,8 @@ private: std::set maUsedBorderStyles; // Handler - DECL_LINK( SelStyleHdl_Impl, ListBox* pLb ); - DECL_LINK( SelColHdl_Impl, ListBox* pLb ); + DECL_LINK( SelStyleHdl_Impl, ListBox* ); + DECL_LINK( SelColHdl_Impl, ListBox* ); DECL_LINK( SelPreHdl_Impl, void* ); DECL_LINK( SelSdwHdl_Impl, void* ); DECL_LINK( LinesChanged_Impl, void* ); diff --git a/cui/source/inc/cfg.hxx b/cui/source/inc/cfg.hxx index fd9ef1a858f1..759b1406d3e6 100644 --- a/cui/source/inc/cfg.hxx +++ b/cui/source/inc/cfg.hxx @@ -315,13 +315,15 @@ public: class SvxMenuEntriesListBox : public SvTreeListBox { private: - SvxConfigPage* pPage; + VclPtr pPage; protected: bool m_bIsInternalDrag; public: SvxMenuEntriesListBox(vcl::Window*, SvxConfigPage*); + virtual ~SvxMenuEntriesListBox(); + virtual void dispose() SAL_OVERRIDE; virtual sal_Int8 AcceptDrop( const AcceptDropEvent& rEvt ) SAL_OVERRIDE; @@ -358,30 +360,30 @@ protected: // the top section of the tab page where top level menus and toolbars // are displayed in a listbox - VclFrame* m_pTopLevel; - FixedText* m_pTopLevelLabel; - ListBox* m_pTopLevelListBox; - PushButton* m_pNewTopLevelButton; - MenuButton* m_pModifyTopLevelButton; + VclPtr m_pTopLevel; + VclPtr m_pTopLevelLabel; + VclPtr m_pTopLevelListBox; + VclPtr m_pNewTopLevelButton; + VclPtr m_pModifyTopLevelButton; // the contents section where the contents of the selected // menu or toolbar are displayed - VclFrame* m_pContents; - FixedText* m_pContentsLabel; - VclContainer* m_pEntries; - SvTreeListBox* m_pContentsListBox; + VclPtr m_pContents; + VclPtr m_pContentsLabel; + VclPtr m_pEntries; + VclPtr m_pContentsListBox; - PushButton* m_pAddCommandsButton; - MenuButton* m_pModifyCommandButton; + VclPtr m_pAddCommandsButton; + VclPtr m_pModifyCommandButton; - PushButton* m_pMoveUpButton; - PushButton* m_pMoveDownButton; + VclPtr m_pMoveUpButton; + VclPtr m_pMoveDownButton; - ListBox* m_pSaveInListBox; + VclPtr m_pSaveInListBox; - VclMultiLineEdit* m_pDescriptionField; + VclPtr m_pDescriptionField; - SvxScriptSelectorDialog* m_pSelectorDlg; + VclPtr m_pSelectorDlg; /// the ResourceURL to select when opening the dialog OUString m_aURLToSelect; @@ -409,7 +411,7 @@ protected: SvTreeListEntry* pTarget = NULL, bool bFront = false ); - void AddSubMenusToUI( const OUString& rBaseTitle, + void AddSubMenusToUI( const OUString& rBaseTitle, SvxConfigEntry* pParentData ); SvTreeListEntry* InsertEntryIntoUI ( SvxConfigEntry* pNewEntryData, @@ -422,6 +424,9 @@ protected: public: + virtual ~SvxConfigPage(); + virtual void dispose() SAL_OVERRIDE; + static bool CanConfig( const OUString& rModuleId ); SaveInData* GetSaveInData() { return pCurrentSaveInData; } @@ -495,11 +500,11 @@ public: class SvxMainMenuOrganizerDialog : public ModalDialog { - VclContainer* m_pMenuBox; - Edit* m_pMenuNameEdit; - SvTreeListBox* m_pMenuListBox; - PushButton* m_pMoveUpButton; - PushButton* m_pMoveDownButton; + VclPtr m_pMenuBox; + VclPtr m_pMenuNameEdit; + VclPtr m_pMenuListBox; + VclPtr m_pMoveUpButton; + VclPtr m_pMoveDownButton; SvxEntries* mpEntries; SvTreeListEntry* pNewMenuEntry; @@ -515,6 +520,8 @@ public: SvxMainMenuOrganizerDialog ( vcl::Window*, SvxEntries*, SvxConfigEntry*, bool bCreateMenu = false ); + virtual ~SvxMainMenuOrganizerDialog(); + virtual void dispose() SAL_OVERRIDE; SvxEntries* GetEntries() { return mpEntries;} void SetEntries( SvxEntries* ); @@ -526,7 +533,7 @@ class SvxToolbarEntriesListBox : public SvxMenuEntriesListBox Size m_aCheckBoxImageSizePixel; Link m_aChangedListener; SvLBoxButtonData* m_pButtonData; - SvxConfigPage* pPage; + VclPtr pPage; void ChangeVisibility( SvTreeListEntry* pEntry ); @@ -662,8 +669,8 @@ public: class SvxNewToolbarDialog : public ModalDialog { private: - Edit* m_pEdtName; - OKButton* m_pBtnOK; + VclPtr m_pEdtName; + VclPtr m_pBtnOK; Link aCheckNameHdl; @@ -671,8 +678,10 @@ private: public: SvxNewToolbarDialog(vcl::Window* pWindow, const OUString& rName); + virtual ~SvxNewToolbarDialog(); + virtual void dispose() SAL_OVERRIDE; - ListBox* m_pSaveInListBox; + VclPtr m_pSaveInListBox; OUString GetName() { @@ -702,10 +711,10 @@ struct SvxIconSelectorToolBoxItem class SvxIconSelectorDialog : public ModalDialog { private: - ToolBox* pTbSymbol; - FixedText* pFtNote; - PushButton* pBtnImport; - PushButton* pBtnDelete; + VclPtr pTbSymbol; + VclPtr pFtNote; + VclPtr pBtnImport; + VclPtr pBtnDelete; Size aTbSize; sal_uInt16 m_nNextId; @@ -770,10 +779,12 @@ public: class SvxIconChangeDialog : public ModalDialog { private: - FixedImage* pFImageInfo; - VclMultiLineEdit* pLineEditDescription; + VclPtr pFImageInfo; + VclPtr pLineEditDescription; public: SvxIconChangeDialog(vcl::Window *pWindow, const OUString& aMessage); + virtual ~SvxIconChangeDialog(); + virtual void dispose() SAL_OVERRIDE; }; #endif // INCLUDED_CUI_SOURCE_INC_CFG_HXX diff --git a/cui/source/inc/cfgutil.hxx b/cui/source/inc/cfgutil.hxx index e4e557d5912d..984e8e9e4c80 100644 --- a/cui/source/inc/cfgutil.hxx +++ b/cui/source/inc/cfgutil.hxx @@ -128,7 +128,7 @@ struct SvxConfigGroupBoxResource_Impl; class SfxConfigGroupListBox : public SvTreeListBox { SvxConfigGroupBoxResource_Impl* pImp; - SfxConfigFunctionListBox* pFunctionListBox; + VclPtr pFunctionListBox; SfxGroupInfoArr_Impl aArr; OUString m_sModuleLongName; diff --git a/cui/source/inc/chardlg.hxx b/cui/source/inc/chardlg.hxx index da60c36ab965..f1075a93dfd7 100644 --- a/cui/source/inc/chardlg.hxx +++ b/cui/source/inc/chardlg.hxx @@ -47,7 +47,7 @@ class FontList; class SvxCharBasePage : public SfxTabPage { protected: - SvxFontPrevWindow* m_pPreviewWin; + VclPtr m_pPreviewWin; bool m_bPreviewBackgroundToCharacter; @@ -61,6 +61,9 @@ protected: inline SvxFont& GetPreviewCTLFont(); public: + virtual ~SvxCharBasePage(); + virtual void dispose() SAL_OVERRIDE; + using SfxTabPage::ActivatePage; using SfxTabPage::DeactivatePage; @@ -77,38 +80,38 @@ class SvxCharNamePage : public SvxCharBasePage private: static const sal_uInt16 pNameRanges[]; - VclContainer* m_pWestFrame; - FixedText* m_pWestFontNameFT; - FontNameBox* m_pWestFontNameLB; - FixedText* m_pWestFontStyleFT; - FontStyleBox* m_pWestFontStyleLB; - FixedText* m_pWestFontSizeFT; - FontSizeBox* m_pWestFontSizeLB; - FixedText* m_pWestFontLanguageFT; - SvxLanguageComboBox* m_pWestFontLanguageLB; - FixedText* m_pWestFontTypeFT; - - VclContainer* m_pEastFrame; - FixedText* m_pEastFontNameFT; - FontNameBox* m_pEastFontNameLB; - FixedText* m_pEastFontStyleFT; - FontStyleBox* m_pEastFontStyleLB; - FixedText* m_pEastFontSizeFT; - FontSizeBox* m_pEastFontSizeLB; - FixedText* m_pEastFontLanguageFT; - SvxLanguageBox* m_pEastFontLanguageLB; - FixedText* m_pEastFontTypeFT; - - VclContainer* m_pCTLFrame; - FixedText* m_pCTLFontNameFT; - FontNameBox* m_pCTLFontNameLB; - FixedText* m_pCTLFontStyleFT; - FontStyleBox* m_pCTLFontStyleLB; - FixedText* m_pCTLFontSizeFT; - FontSizeBox* m_pCTLFontSizeLB; - FixedText* m_pCTLFontLanguageFT; - SvxLanguageBox* m_pCTLFontLanguageLB; - FixedText* m_pCTLFontTypeFT; + VclPtr m_pWestFrame; + VclPtr m_pWestFontNameFT; + VclPtr m_pWestFontNameLB; + VclPtr m_pWestFontStyleFT; + VclPtr m_pWestFontStyleLB; + VclPtr m_pWestFontSizeFT; + VclPtr m_pWestFontSizeLB; + VclPtr m_pWestFontLanguageFT; + VclPtr m_pWestFontLanguageLB; + VclPtr m_pWestFontTypeFT; + + VclPtr m_pEastFrame; + VclPtr m_pEastFontNameFT; + VclPtr m_pEastFontNameLB; + VclPtr m_pEastFontStyleFT; + VclPtr m_pEastFontStyleLB; + VclPtr m_pEastFontSizeFT; + VclPtr m_pEastFontSizeLB; + VclPtr m_pEastFontLanguageFT; + VclPtr m_pEastFontLanguageLB; + VclPtr m_pEastFontTypeFT; + + VclPtr m_pCTLFrame; + VclPtr m_pCTLFontNameFT; + VclPtr m_pCTLFontNameLB; + VclPtr m_pCTLFontStyleFT; + VclPtr m_pCTLFontStyleLB; + VclPtr m_pCTLFontSizeFT; + VclPtr m_pCTLFontSizeLB; + VclPtr m_pCTLFontLanguageFT; + VclPtr m_pCTLFontLanguageLB; + VclPtr m_pCTLFontTypeFT; SvxCharNamePage_Impl* m_pImpl; @@ -175,37 +178,37 @@ class SvxCharEffectsPage : public SvxCharBasePage private: static const sal_uInt16 pEffectsRanges[]; - FixedText* m_pFontColorFT; - ColorListBox* m_pFontColorLB; + VclPtr m_pFontColorFT; + VclPtr m_pFontColorLB; - FixedText* m_pEffectsFT; - ListBox* m_pEffectsLB; + VclPtr m_pEffectsFT; + VclPtr m_pEffectsLB; - FixedText* m_pReliefFT; - ListBox* m_pReliefLB; + VclPtr m_pReliefFT; + VclPtr m_pReliefLB; - TriStateBox* m_pOutlineBtn; - TriStateBox* m_pShadowBtn; - TriStateBox* m_pBlinkingBtn; - TriStateBox* m_pHiddenBtn; + VclPtr m_pOutlineBtn; + VclPtr m_pShadowBtn; + VclPtr m_pBlinkingBtn; + VclPtr m_pHiddenBtn; - ListBox* m_pOverlineLB; - FixedText* m_pOverlineColorFT; - ColorListBox* m_pOverlineColorLB; + VclPtr m_pOverlineLB; + VclPtr m_pOverlineColorFT; + VclPtr m_pOverlineColorLB; - ListBox* m_pStrikeoutLB; + VclPtr m_pStrikeoutLB; - ListBox* m_pUnderlineLB; - FixedText* m_pUnderlineColorFT; - ColorListBox* m_pUnderlineColorLB; + VclPtr m_pUnderlineLB; + VclPtr m_pUnderlineColorFT; + VclPtr m_pUnderlineColorLB; - CheckBox* m_pIndividualWordsBtn; + VclPtr m_pIndividualWordsBtn; - FixedText* m_pEmphasisFT; - ListBox* m_pEmphasisLB; + VclPtr m_pEmphasisFT; + VclPtr m_pEmphasisLB; - FixedText* m_pPositionFT; - ListBox* m_pPositionLB; + VclPtr m_pPositionFT; + VclPtr m_pPositionLB; sal_uInt16 m_nHtmlMode; @@ -226,8 +229,10 @@ private: DECL_LINK( ColorBoxSelectHdl_Impl, ColorListBox* ); public: - using SfxTabPage::DeactivatePage; + virtual ~SvxCharEffectsPage(); + virtual void dispose() SAL_OVERRIDE; + using SfxTabPage::DeactivatePage; virtual int DeactivatePage( SfxItemSet* pSet = 0 ) SAL_OVERRIDE; public: @@ -252,30 +257,30 @@ class SvxCharPositionPage : public SvxCharBasePage static const sal_uInt16 pPositionRanges[]; private: - RadioButton* m_pHighPosBtn; - RadioButton* m_pNormalPosBtn; - RadioButton* m_pLowPosBtn; - FixedText* m_pHighLowFT; - MetricField* m_pHighLowMF; - CheckBox* m_pHighLowRB; - FixedText* m_pFontSizeFT; - MetricField* m_pFontSizeMF; - - VclContainer* m_pRotationContainer; - - FixedText* m_pScalingFT; - FixedText* m_pScalingAndRotationFT; - RadioButton* m_p0degRB; - RadioButton* m_p90degRB; - RadioButton* m_p270degRB; - CheckBox* m_pFitToLineCB; - - MetricField* m_pScaleWidthMF; - - ListBox* m_pKerningLB; - FixedText* m_pKerningFT; - MetricField* m_pKerningMF; - CheckBox* m_pPairKerningBtn; + VclPtr m_pHighPosBtn; + VclPtr m_pNormalPosBtn; + VclPtr m_pLowPosBtn; + VclPtr m_pHighLowFT; + VclPtr m_pHighLowMF; + VclPtr m_pHighLowRB; + VclPtr m_pFontSizeFT; + VclPtr m_pFontSizeMF; + + VclPtr m_pRotationContainer; + + VclPtr m_pScalingFT; + VclPtr m_pScalingAndRotationFT; + VclPtr m_p0degRB; + VclPtr m_p90degRB; + VclPtr m_p270degRB; + VclPtr m_pFitToLineCB; + + VclPtr m_pScaleWidthMF; + + VclPtr m_pKerningLB; + VclPtr m_pKerningFT; + VclPtr m_pKerningMF; + VclPtr m_pPairKerningBtn; short m_nSuperEsc; short m_nSubEsc; @@ -304,6 +309,9 @@ private: DECL_LINK(ScaleWidthModifyHdl_Impl, void *); public: + virtual ~SvxCharPositionPage(); + virtual void dispose() SAL_OVERRIDE; + using SfxTabPage::ActivatePage; using SfxTabPage::DeactivatePage; @@ -328,10 +336,10 @@ class SvxCharTwoLinesPage : public SvxCharBasePage { private: static const sal_uInt16 pTwoLinesRanges[]; - CheckBox* m_pTwoLinesBtn; - VclContainer* m_pEnclosingFrame; - ListBox* m_pStartBracketLB; - ListBox* m_pEndBracketLB; + VclPtr m_pTwoLinesBtn; + VclPtr m_pEnclosingFrame; + VclPtr m_pStartBracketLB; + VclPtr m_pEndBracketLB; sal_uInt16 m_nStartBracketPosition; sal_uInt16 m_nEndBracketPosition; @@ -347,13 +355,15 @@ private: DECL_LINK( CharacterMapHdl_Impl, ListBox* ); public: + virtual ~SvxCharTwoLinesPage(); + virtual void dispose() SAL_OVERRIDE; + using SfxTabPage::ActivatePage; using SfxTabPage::DeactivatePage; virtual void ActivatePage( const SfxItemSet& rSet ) SAL_OVERRIDE; virtual int DeactivatePage( SfxItemSet* pSet = 0 ) SAL_OVERRIDE; -public: static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rSet ); static const sal_uInt16* GetRanges() { return pTwoLinesRanges; } diff --git a/cui/source/inc/connect.hxx b/cui/source/inc/connect.hxx index b079eef1c591..aae2744538ce 100644 --- a/cui/source/inc/connect.hxx +++ b/cui/source/inc/connect.hxx @@ -34,21 +34,21 @@ class SvxConnectionPage : public SfxTabPage { private: static const sal_uInt16 pRanges[]; - ListBox* m_pLbType; + VclPtr m_pLbType; - FixedText* m_pFtLine1; - MetricField* m_pMtrFldLine1; - FixedText* m_pFtLine2; - MetricField* m_pMtrFldLine2; - FixedText* m_pFtLine3; - MetricField* m_pMtrFldLine3; + VclPtr m_pFtLine1; + VclPtr m_pMtrFldLine1; + VclPtr m_pFtLine2; + VclPtr m_pMtrFldLine2; + VclPtr m_pFtLine3; + VclPtr m_pMtrFldLine3; - MetricField* m_pMtrFldHorz1; - MetricField* m_pMtrFldVert1; - MetricField* m_pMtrFldHorz2; - MetricField* m_pMtrFldVert2; + VclPtr m_pMtrFldHorz1; + VclPtr m_pMtrFldVert1; + VclPtr m_pMtrFldHorz2; + VclPtr m_pMtrFldVert2; - SvxXConnectionPreview* m_pCtlPreview; + VclPtr m_pCtlPreview; const SfxItemSet& rOutAttrs; SfxItemSet aAttrSet; @@ -62,6 +62,8 @@ private: public: SvxConnectionPage( vcl::Window* pWindow, const SfxItemSet& rInAttrs ); + virtual ~SvxConnectionPage(); + virtual void dispose() SAL_OVERRIDE; static SfxTabPage* Create( vcl::Window*, const SfxItemSet* ); static const sal_uInt16* GetRanges() { return pRanges; } diff --git a/cui/source/inc/cuicharmap.hxx b/cui/source/inc/cuicharmap.hxx index dfe0d989b3af..596d3231443e 100644 --- a/cui/source/inc/cuicharmap.hxx +++ b/cui/source/inc/cuicharmap.hxx @@ -67,16 +67,16 @@ private: void init(); - SvxShowCharSet* m_pShowSet; - Edit* m_pShowText; - PushButton* m_pOKBtn; - FixedText* m_pFontText; - ListBox* m_pFontLB; - FixedText* m_pSubsetText; - ListBox* m_pSubsetLB; - FixedText* m_pSymbolText; - SvxShowText* m_pShowChar; - FixedText* m_pCharCodeText; + VclPtr m_pShowSet; + VclPtr m_pShowText; + VclPtr m_pOKBtn; + VclPtr m_pFontText; + VclPtr m_pFontLB; + VclPtr m_pSubsetText; + VclPtr m_pSubsetLB; + VclPtr m_pSymbolText; + VclPtr m_pShowChar; + VclPtr m_pCharCodeText; vcl::Font aFont; bool bOne; const SubsetMap* pSubsetMap; @@ -93,6 +93,8 @@ private: public: SvxCharacterMap( vcl::Window* pParent, bool bOne=true, const SfxItemSet* pSet=0 ); + virtual ~SvxCharacterMap(); + virtual void dispose() SAL_OVERRIDE; void DisableFontSelection(); diff --git a/cui/source/inc/cuifmsearch.hxx b/cui/source/inc/cuifmsearch.hxx index 96dacaf1d5b4..d56c9d5ee2a4 100644 --- a/cui/source/inc/cuifmsearch.hxx +++ b/cui/source/inc/cuifmsearch.hxx @@ -47,36 +47,36 @@ class FmSearchDialog : public ModalDialog friend class FmSearchEngine; // my all Controls - RadioButton *m_prbSearchForText; - RadioButton *m_prbSearchForNull; - RadioButton *m_prbSearchForNotNull; - ComboBox *m_pcmbSearchText; - FixedText *m_pftForm; - ListBox *m_plbForm; - RadioButton *m_prbAllFields; - RadioButton *m_prbSingleField; - ListBox *m_plbField; - FixedText *m_pftPosition; - ListBox *m_plbPosition; - CheckBox *m_pcbUseFormat; - CheckBox *m_pcbCase; - CheckBox *m_pcbBackwards; - CheckBox *m_pcbStartOver; - CheckBox *m_pcbWildCard; - CheckBox *m_pcbRegular; - CheckBox *m_pcbApprox; - PushButton *m_ppbApproxSettings; - CheckBox *m_pHalfFullFormsCJK; - CheckBox *m_pSoundsLikeCJK; - PushButton *m_pSoundsLikeCJKSettings; - FixedText *m_pftRecord; - FixedText *m_pftHint; - PushButton *m_pbSearchAgain; - CancelButton *m_pbClose; + VclPtr m_prbSearchForText; + VclPtr m_prbSearchForNull; + VclPtr m_prbSearchForNotNull; + VclPtr m_pcmbSearchText; + VclPtr m_pftForm; + VclPtr m_plbForm; + VclPtr m_prbAllFields; + VclPtr m_prbSingleField; + VclPtr m_plbField; + VclPtr m_pftPosition; + VclPtr m_plbPosition; + VclPtr m_pcbUseFormat; + VclPtr m_pcbCase; + VclPtr m_pcbBackwards; + VclPtr m_pcbStartOver; + VclPtr m_pcbWildCard; + VclPtr m_pcbRegular; + VclPtr m_pcbApprox; + VclPtr m_ppbApproxSettings; + VclPtr m_pHalfFullFormsCJK; + VclPtr m_pSoundsLikeCJK; + VclPtr m_pSoundsLikeCJKSettings; + VclPtr m_pftRecord; + VclPtr m_pftHint; + VclPtr m_pbSearchAgain; + VclPtr m_pbClose; OUString m_sSearch; OUString m_sCancel; - vcl::Window* m_pPreSearchFocus; + VclPtr m_pPreSearchFocus; Link m_lnkFoundHandler; ///< Handler for "found" Link m_lnkCanceledNotFoundHdl; ///< Handler for Positioning the Cursors diff --git a/cui/source/inc/cuigaldlg.hxx b/cui/source/inc/cuigaldlg.hxx index 2c82170ea3a7..e02d6a1b5094 100644 --- a/cui/source/inc/cuigaldlg.hxx +++ b/cui/source/inc/cuigaldlg.hxx @@ -60,8 +60,8 @@ class SearchThread: public salhelper::Thread { private: - SearchProgress* mpProgress; - TPGalleryThemeProperties* mpBrowser; + VclPtr mpProgress; + VclPtr mpBrowser; INetURLObject maStartURL; void ImplSearch( const INetURLObject& rStartURL, @@ -81,10 +81,10 @@ public: class SearchProgress : public ModalDialog { private: - FixedText* m_pFtSearchDir; - FixedText* m_pFtSearchType; - CancelButton* m_pBtnCancel; - vcl::Window * parent_; + VclPtr m_pFtSearchDir; + VclPtr m_pFtSearchType; + VclPtr m_pBtnCancel; + VclPtr parent_; INetURLObject startUrl_; rtl::Reference< SearchThread > maSearchThread; @@ -93,6 +93,8 @@ private: public: SearchProgress( vcl::Window* pParent, const INetURLObject& rStartURL ); + virtual ~SearchProgress(); + virtual void dispose() SAL_OVERRIDE; DECL_LINK( CleanUpHdl, void* ); @@ -106,8 +108,8 @@ class TakeThread: public salhelper::Thread { private: - TakeProgress* mpProgress; - TPGalleryThemeProperties* mpBrowser; + VclPtr mpProgress; + VclPtr mpBrowser; TokenList_impl& mrTakenList; virtual ~TakeThread(); @@ -125,9 +127,9 @@ public: class TakeProgress : public ModalDialog { private: - FixedText* m_pFtTakeFile; - CancelButton* m_pBtnCancel; - vcl::Window * window_; + VclPtr m_pFtTakeFile; + VclPtr m_pBtnCancel; + VclPtr window_; rtl::Reference< TakeThread > maTakeThread; TokenList_impl maTakenList; @@ -137,6 +139,8 @@ private: public: TakeProgress( vcl::Window* pWindow ); + virtual ~TakeProgress(); + virtual void dispose() SAL_OVERRIDE; DECL_LINK( CleanUpHdl, void* ); @@ -148,8 +152,8 @@ public: class ActualizeProgress : public ModalDialog { private: - FixedText* m_pFtActualizeFile; - CancelButton* m_pBtnCancel; + VclPtr m_pFtActualizeFile; + VclPtr m_pBtnCancel; Idle* pIdle; GalleryTheme* pTheme; GalleryProgress aStatusProgress; @@ -160,6 +164,8 @@ private: public: ActualizeProgress( vcl::Window* pWindow, GalleryTheme* pThm ); + virtual ~ActualizeProgress(); + virtual void dispose() SAL_OVERRIDE; virtual short Execute() SAL_OVERRIDE; }; @@ -167,23 +173,27 @@ public: class TitleDialog : public ModalDialog { private: - Edit* m_pEdit; + VclPtr m_pEdit; public: TitleDialog(vcl::Window* pParent, const OUString& rOldText); + virtual ~TitleDialog(); + virtual void dispose() SAL_OVERRIDE; OUString GetTitle() const { return m_pEdit->GetText(); } }; class GalleryIdDialog : public ModalDialog { private: - OKButton* m_pBtnOk; - ListBox* m_pLbResName; + VclPtr m_pBtnOk; + VclPtr m_pLbResName; GalleryTheme* pThm; DECL_LINK( ClickOkHdl, void* ); DECL_LINK( ClickResNameHdl, void* ); public: GalleryIdDialog( vcl::Window* pParent, GalleryTheme* pThm ); + virtual ~GalleryIdDialog(); + virtual void dispose() SAL_OVERRIDE; sal_uLong GetId() const { return m_pLbResName->GetSelectEntryPos(); } }; @@ -204,12 +214,12 @@ class TPGalleryThemeGeneral : public SfxTabPage { private: - FixedImage* m_pFiMSImage; - Edit* m_pEdtMSName; - FixedText* m_pFtMSShowType; - FixedText* m_pFtMSShowPath; - FixedText* m_pFtMSShowContent; - FixedText* m_pFtMSShowChangeDate; + VclPtr m_pFiMSImage; + VclPtr m_pEdtMSName; + VclPtr m_pFtMSShowType; + VclPtr m_pFtMSShowPath; + VclPtr m_pFtMSShowContent; + VclPtr m_pFtMSShowChangeDate; ExchangeData* pData; virtual void Reset( const SfxItemSet* ) SAL_OVERRIDE {} @@ -219,6 +229,8 @@ private: public: TPGalleryThemeGeneral( vcl::Window* pParent, const SfxItemSet& rSet ); + virtual ~TPGalleryThemeGeneral(); + virtual void dispose() SAL_OVERRIDE; void SetXChgData( ExchangeData* pData ); const ExchangeData* GetXChgData() const { return pData; } @@ -234,13 +246,13 @@ class TPGalleryThemeProperties : public SfxTabPage friend class TakeProgress; friend class TakeThread; - ComboBox* m_pCbbFileType; - ListBox* m_pLbxFound; - PushButton* m_pBtnSearch; - PushButton* m_pBtnTake; - PushButton* m_pBtnTakeAll; - CheckBox* m_pCbxPreview; - GalleryPreview* m_pWndPreview; + VclPtr m_pCbbFileType; + VclPtr m_pLbxFound; + VclPtr m_pBtnSearch; + VclPtr m_pBtnTake; + VclPtr m_pBtnTakeAll; + VclPtr m_pCbxPreview; + VclPtr m_pWndPreview; ExchangeData* pData; StringList aFoundList; diff --git a/cui/source/inc/cuigrfflt.hxx b/cui/source/inc/cuigrfflt.hxx index 1fb139375fd7..f43685d65fd2 100644 --- a/cui/source/inc/cuigrfflt.hxx +++ b/cui/source/inc/cuigrfflt.hxx @@ -77,7 +77,7 @@ private: DECL_LINK( ImplModifyHdl, void* p ); protected: - GraphicPreviewWindow* mpPreview; + VclPtr mpPreview; const Link& GetModifyHdl() const { return maModifyHdl; } const Size& GetGraphicSizePixel() const { return maSizePixel; } @@ -85,6 +85,8 @@ protected: public: GraphicFilterDialog(vcl::Window* pParent, const OUString& rID, const OUString& rUIXMLDescription, const Graphic& rGraphic); + virtual ~GraphicFilterDialog(); + virtual void dispose() SAL_OVERRIDE; virtual Graphic GetFilteredGraphic( const Graphic& rGraphic, double fScaleX, double fScaleY ) = 0; }; @@ -97,11 +99,13 @@ public: class GraphicFilterSmooth : public GraphicFilterDialog { private: - NumericField* mpMtrRadius; + VclPtr mpMtrRadius; public: GraphicFilterSmooth( vcl::Window* pParent, const Graphic& rGraphic, double nRadius); + virtual ~GraphicFilterSmooth(); + virtual void dispose() SAL_OVERRIDE; virtual Graphic GetFilteredGraphic( const Graphic& rGraphic, double fScaleX, double fScaleY ) SAL_OVERRIDE; double GetRadius() const { return mpMtrRadius->GetValue() / 10.0; } @@ -114,14 +118,16 @@ public: class GraphicFilterMosaic : public GraphicFilterDialog { private: - MetricField* mpMtrWidth; - MetricField* mpMtrHeight; - CheckBox* mpCbxEdges; + VclPtr mpMtrWidth; + VclPtr mpMtrHeight; + VclPtr mpCbxEdges; public: GraphicFilterMosaic(vcl::Window* pParent, const Graphic& rGraphic, sal_uInt16 nTileWidth, sal_uInt16 nTileHeight, bool bEnhanceEdges); + virtual ~GraphicFilterMosaic(); + virtual void dispose() SAL_OVERRIDE; virtual Graphic GetFilteredGraphic( const Graphic& rGraphic, double fScaleX, double fScaleY ) SAL_OVERRIDE; long GetTileWidth() const { return static_cast(mpMtrWidth->GetValue()); } @@ -136,13 +142,15 @@ public: class GraphicFilterSolarize : public GraphicFilterDialog { private: - MetricField* mpMtrThreshold; - CheckBox* mpCbxInvert; + VclPtr mpMtrThreshold; + VclPtr mpCbxInvert; public: GraphicFilterSolarize( vcl::Window* pParent, const Graphic& rGraphic, sal_uInt8 nGreyThreshold, bool bInvert ); + virtual ~GraphicFilterSolarize(); + virtual void dispose() SAL_OVERRIDE; virtual Graphic GetFilteredGraphic( const Graphic& rGraphic, double fScaleX, double fScaleY ) SAL_OVERRIDE; sal_uInt8 GetGreyThreshold() const { return( (sal_uInt8) FRound( mpMtrThreshold->GetValue() * 2.55 ) ); } @@ -156,10 +164,12 @@ public: class GraphicFilterSepia : public GraphicFilterDialog { private: - MetricField* mpMtrSepia; + VclPtr mpMtrSepia; public: GraphicFilterSepia( vcl::Window* pParent, const Graphic& rGraphic, sal_uInt16 nSepiaPercent ); + virtual ~GraphicFilterSepia(); + virtual void dispose() SAL_OVERRIDE; virtual Graphic GetFilteredGraphic( const Graphic& rGraphic, double fScaleX, double fScaleY ) SAL_OVERRIDE; sal_uInt16 GetSepiaPercent() const { @@ -174,10 +184,12 @@ public: class GraphicFilterPoster : public GraphicFilterDialog { private: - NumericField* mpNumPoster; + VclPtr mpNumPoster; public: GraphicFilterPoster( vcl::Window* pParent, const Graphic& rGraphic, sal_uInt16 nPosterColorCount ); + virtual ~GraphicFilterPoster(); + virtual void dispose() SAL_OVERRIDE; virtual Graphic GetFilteredGraphic( const Graphic& rGraphic, double fScaleX, double fScaleY ) SAL_OVERRIDE; sal_uInt16 GetPosterColorCount() const { return( (sal_uInt16) mpNumPoster->GetValue() ); } @@ -203,10 +215,12 @@ public: class GraphicFilterEmboss : public GraphicFilterDialog { private: - EmbossControl* mpCtlLight; + VclPtr mpCtlLight; public: GraphicFilterEmboss( vcl::Window* pParent, const Graphic& rGraphic, RECT_POINT eLightSource ); + virtual ~GraphicFilterEmboss(); + virtual void dispose() SAL_OVERRIDE; virtual Graphic GetFilteredGraphic( const Graphic& rGraphic, double fScaleX, double fScaleY ) SAL_OVERRIDE; RECT_POINT GetLightSource() const { return mpCtlLight->GetActualRP(); } diff --git a/cui/source/inc/cuihyperdlg.hxx b/cui/source/inc/cuihyperdlg.hxx index 93de02f161cc..b85633738ddf 100644 --- a/cui/source/inc/cuihyperdlg.hxx +++ b/cui/source/inc/cuihyperdlg.hxx @@ -38,7 +38,7 @@ class SvxHpLinkDlg; class SvxHlinkCtrl : public SfxControllerItem { private : - SvxHpLinkDlg *pParent; + VclPtr pParent; SfxStatusForwarder aRdOnlyForwarder; diff --git a/cui/source/inc/cuiimapwnd.hxx b/cui/source/inc/cuiimapwnd.hxx index 3266a2a3449c..87c7e546cc6a 100644 --- a/cui/source/inc/cuiimapwnd.hxx +++ b/cui/source/inc/cuiimapwnd.hxx @@ -33,11 +33,11 @@ class URLDlg : public ModalDialog { - Edit* m_pEdtURL; - ComboBox* m_pCbbTargets; - Edit* m_pEdtName; - Edit* m_pEdtAlternativeText; - VclMultiLineEdit* m_pEdtDescription; + VclPtr m_pEdtURL; + VclPtr m_pCbbTargets; + VclPtr m_pEdtName; + VclPtr m_pEdtAlternativeText; + VclPtr m_pEdtDescription; public: @@ -45,6 +45,8 @@ public: const OUString& rURL, const OUString& rAlternativeText, const OUString& rDescription, const OUString& rTarget, const OUString& rName, TargetList& rTargetList ); + virtual ~URLDlg(); + virtual void dispose() SAL_OVERRIDE; OUString GetURL() const { return m_pEdtURL->GetText(); } OUString GetAltText() const { return m_pEdtAlternativeText->GetText(); } diff --git a/cui/source/inc/cuioptgenrl.hxx b/cui/source/inc/cuioptgenrl.hxx index 2febcb8d0976..2a4c295d60e4 100644 --- a/cui/source/inc/cuioptgenrl.hxx +++ b/cui/source/inc/cuioptgenrl.hxx @@ -40,7 +40,7 @@ class SvxGeneralTabPage : public SfxTabPage using TabPage::DeactivatePage; private: // the "Use data for document properties" checkbox - CheckBox* m_pUseDataCB; + VclPtr m_pUseDataCB; // rows struct Row; std::vector > vRows; @@ -64,6 +64,8 @@ protected: public: SvxGeneralTabPage( vcl::Window* pParent, const SfxItemSet& rSet ); + virtual ~SvxGeneralTabPage(); + virtual void dispose() SAL_OVERRIDE; static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rAttrSet ); diff --git a/cui/source/inc/cuisrchdlg.hxx b/cui/source/inc/cuisrchdlg.hxx index 3dc19f0a1c97..376f9196a2d1 100644 --- a/cui/source/inc/cuisrchdlg.hxx +++ b/cui/source/inc/cuisrchdlg.hxx @@ -37,7 +37,7 @@ class SvxJSearchOptionsPage; class SvxJSearchOptionsDialog : public SfxSingleTabDialog { sal_Int32 nInitialTlFlags; - SvxJSearchOptionsPage *pPage; + VclPtr pPage; SvxJSearchOptionsDialog( const SvxJSearchOptionsDialog & ) SAL_DELETED_FUNCTION; SvxJSearchOptionsDialog & operator == ( const SvxJSearchOptionsDialog & ) SAL_DELETED_FUNCTION; @@ -45,6 +45,8 @@ class SvxJSearchOptionsDialog : public SfxSingleTabDialog public: SvxJSearchOptionsDialog(vcl::Window *pParent, const SfxItemSet& rOptionsSet, sal_Int32 nInitialFlags); + virtual ~SvxJSearchOptionsDialog(); + virtual void dispose() SAL_OVERRIDE; // Window virtual void Activate() SAL_OVERRIDE; diff --git a/cui/source/inc/cuitabarea.hxx b/cui/source/inc/cuitabarea.hxx index c3ebd3048dc3..42e668c31563 100644 --- a/cui/source/inc/cuitabarea.hxx +++ b/cui/source/inc/cuitabarea.hxx @@ -115,29 +115,29 @@ class SvxTransparenceTabPage : public SvxTabPage sal_uInt16 nDlgType; // main selection - RadioButton* m_pRbtTransOff; - RadioButton* m_pRbtTransLinear; - RadioButton* m_pRbtTransGradient; + VclPtr m_pRbtTransOff; + VclPtr m_pRbtTransLinear; + VclPtr m_pRbtTransGradient; /// linear transparency - MetricField* m_pMtrTransparent; + VclPtr m_pMtrTransparent; // gradient transparency - VclGrid* m_pGridGradient; - ListBox* m_pLbTrgrGradientType; - FixedText* m_pFtTrgrCenterX; - MetricField* m_pMtrTrgrCenterX; - FixedText* m_pFtTrgrCenterY; - MetricField* m_pMtrTrgrCenterY; - FixedText* m_pFtTrgrAngle; - MetricField* m_pMtrTrgrAngle; - MetricField* m_pMtrTrgrBorder; - MetricField* m_pMtrTrgrStartValue; - MetricField* m_pMtrTrgrEndValue; + VclPtr m_pGridGradient; + VclPtr m_pLbTrgrGradientType; + VclPtr m_pFtTrgrCenterX; + VclPtr m_pMtrTrgrCenterX; + VclPtr m_pFtTrgrCenterY; + VclPtr m_pMtrTrgrCenterY; + VclPtr m_pFtTrgrAngle; + VclPtr m_pMtrTrgrAngle; + VclPtr m_pMtrTrgrBorder; + VclPtr m_pMtrTrgrStartValue; + VclPtr m_pMtrTrgrEndValue; // preview - SvxXRectPreview* m_pCtlBitmapPreview; - SvxXRectPreview* m_pCtlXRectPreview; + VclPtr m_pCtlBitmapPreview; + VclPtr m_pCtlXRectPreview; bool bBitmap; XOutdevItemPool* pXPool; @@ -160,6 +160,8 @@ class SvxTransparenceTabPage : public SvxTabPage public: SvxTransparenceTabPage(vcl::Window* pParent, const SfxItemSet& rInAttrs); + virtual ~SvxTransparenceTabPage(); + virtual void dispose() SAL_OVERRIDE; static SfxTabPage* Create(vcl::Window*, const SfxItemSet*); static const sal_uInt16* GetRanges() { return pTransparenceRanges; } @@ -183,48 +185,48 @@ class SvxAreaTabPage : public SvxTabPage using TabPage::DeactivatePage; static const sal_uInt16 pAreaRanges[]; private: - ListBox* m_pTypeLB; - - VclBox* m_pFillLB; - ColorLB* m_pLbColor; - GradientLB* m_pLbGradient; - HatchingLB* m_pLbHatching; - BitmapLB* m_pLbBitmap; - SvxXRectPreview* m_pCtlBitmapPreview; - - TriStateBox* m_pTsbStepCount; - VclFrame* m_pFlStepCount; - NumericField* m_pNumFldStepCount; - - VclFrame* m_pFlHatchBckgrd; - CheckBox* m_pCbxHatchBckgrd; - ColorLB* m_pLbHatchBckgrdColor; - - VclBox* m_pBxBitmap; - - VclFrame* m_pFlSize; - TriStateBox* m_pTsbOriginal; - TriStateBox* m_pTsbScale; - VclGrid* m_pGridX_Y; - FixedText* m_pFtXSize; - MetricField* m_pMtrFldXSize; - FixedText* m_pFtYSize; - MetricField* m_pMtrFldYSize; - - VclFrame* m_pFlPosition; - SvxRectCtl* m_pCtlPosition; - VclGrid* m_pGridOffset; - MetricField* m_pMtrFldXOffset; - MetricField* m_pMtrFldYOffset; - VclBox* m_pBxTile; - TriStateBox* m_pTsbTile; - TriStateBox* m_pTsbStretch; - VclFrame* m_pFlOffset; - RadioButton* m_pRbtRow; - RadioButton* m_pRbtColumn; - MetricField* m_pMtrFldOffset; - - SvxXRectPreview* m_pCtlXRectPreview; + VclPtr m_pTypeLB; + + VclPtr m_pFillLB; + VclPtr m_pLbColor; + VclPtr m_pLbGradient; + VclPtr m_pLbHatching; + VclPtr m_pLbBitmap; + VclPtr m_pCtlBitmapPreview; + + VclPtr m_pTsbStepCount; + VclPtr m_pFlStepCount; + VclPtr m_pNumFldStepCount; + + VclPtr m_pFlHatchBckgrd; + VclPtr m_pCbxHatchBckgrd; + VclPtr m_pLbHatchBckgrdColor; + + VclPtr m_pBxBitmap; + + VclPtr m_pFlSize; + VclPtr m_pTsbOriginal; + VclPtr m_pTsbScale; + VclPtr m_pGridX_Y; + VclPtr m_pFtXSize; + VclPtr m_pMtrFldXSize; + VclPtr m_pFtYSize; + VclPtr m_pMtrFldYSize; + + VclPtr m_pFlPosition; + VclPtr m_pCtlPosition; + VclPtr m_pGridOffset; + VclPtr m_pMtrFldXOffset; + VclPtr m_pMtrFldYOffset; + VclPtr m_pBxTile; + VclPtr m_pTsbTile; + VclPtr m_pTsbStretch; + VclPtr m_pFlOffset; + VclPtr m_pRbtRow; + VclPtr m_pRbtColumn; + VclPtr m_pMtrFldOffset; + + VclPtr m_pCtlXRectPreview; const SfxItemSet& rOutAttrs; RECT_POINT eRP; @@ -264,7 +266,7 @@ private: bool mbDirectGraphicSet; Graphic maDirectGraphic; OUString maDirectName; - PushButton* m_pBtnImport; + VclPtr m_pBtnImport; DECL_LINK(SelectDialogTypeHdl_Impl, void *); DECL_LINK( ModifyColorHdl_Impl, void * ); @@ -288,6 +290,8 @@ private: public: SvxAreaTabPage( vcl::Window* pParent, const SfxItemSet& rInAttrs ); + virtual ~SvxAreaTabPage(); + virtual void dispose() SAL_OVERRIDE; void Construct(); @@ -326,13 +330,13 @@ class SvxShadowTabPage : public SvxTabPage static const sal_uInt16 pShadowRanges[]; private: - TriStateBox* m_pTsbShowShadow; - VclGrid* m_pGridShadow; - SvxRectCtl* m_pCtlPosition; - MetricField* m_pMtrDistance; - ColorLB* m_pLbShadowColor; - MetricField* m_pMtrTransparent; - SvxXShadowPreview* m_pCtlXRectPreview; + VclPtr m_pTsbShowShadow; + VclPtr m_pGridShadow; + VclPtr m_pCtlPosition; + VclPtr m_pMtrDistance; + VclPtr m_pLbShadowColor; + VclPtr m_pMtrTransparent; + VclPtr m_pCtlXRectPreview; const SfxItemSet& rOutAttrs; RECT_POINT eRP; @@ -355,6 +359,8 @@ private: public: SvxShadowTabPage( vcl::Window* pParent, const SfxItemSet& rInAttrs ); + virtual ~SvxShadowTabPage(); + virtual void dispose() SAL_OVERRIDE; void Construct(); static SfxTabPage* Create( vcl::Window*, const SfxItemSet* ); @@ -383,25 +389,25 @@ class SvxGradientTabPage : public SfxTabPage using TabPage::DeactivatePage; private: - ListBox* m_pLbGradientType; - FixedText* m_pFtCenterX; - MetricField* m_pMtrCenterX; - FixedText* m_pFtCenterY; - MetricField* m_pMtrCenterY; - FixedText* m_pFtAngle; - MetricField* m_pMtrAngle; - MetricField* m_pMtrBorder; - ColorLB* m_pLbColorFrom; - MetricField* m_pMtrColorFrom; - ColorLB* m_pLbColorTo; - MetricField* m_pMtrColorTo; - GradientLB* m_pLbGradients; - SvxXRectPreview* m_pCtlPreview; - PushButton* m_pBtnAdd; - PushButton* m_pBtnModify; - PushButton* m_pBtnDelete; - PushButton* m_pBtnLoad; - PushButton* m_pBtnSave; + VclPtr m_pLbGradientType; + VclPtr m_pFtCenterX; + VclPtr m_pMtrCenterX; + VclPtr m_pFtCenterY; + VclPtr m_pMtrCenterY; + VclPtr m_pFtAngle; + VclPtr m_pMtrAngle; + VclPtr m_pMtrBorder; + VclPtr m_pLbColorFrom; + VclPtr m_pMtrColorFrom; + VclPtr m_pLbColorTo; + VclPtr m_pMtrColorTo; + VclPtr m_pLbGradients; + VclPtr m_pCtlPreview; + VclPtr m_pBtnAdd; + VclPtr m_pBtnModify; + VclPtr m_pBtnDelete; + VclPtr m_pBtnLoad; + VclPtr m_pBtnSave; const SfxItemSet& rOutAttrs; @@ -434,6 +440,8 @@ private: public: SvxGradientTabPage( vcl::Window* pParent, const SfxItemSet& rInAttrs ); + virtual ~SvxGradientTabPage(); + virtual void dispose() SAL_OVERRIDE; void Construct(); @@ -465,18 +473,18 @@ class SvxHatchTabPage : public SvxTabPage using TabPage::DeactivatePage; private: - MetricField* m_pMtrDistance; - MetricField* m_pMtrAngle; - SvxRectCtl* m_pCtlAngle; - ListBox* m_pLbLineType; - ColorLB* m_pLbLineColor; - HatchingLB* m_pLbHatchings; - SvxXRectPreview* m_pCtlPreview; - PushButton* m_pBtnAdd; - PushButton* m_pBtnModify; - PushButton* m_pBtnDelete; - PushButton* m_pBtnLoad; - PushButton* m_pBtnSave; + VclPtr m_pMtrDistance; + VclPtr m_pMtrAngle; + VclPtr m_pCtlAngle; + VclPtr m_pLbLineType; + VclPtr m_pLbLineColor; + VclPtr m_pLbHatchings; + VclPtr m_pCtlPreview; + VclPtr m_pBtnAdd; + VclPtr m_pBtnModify; + VclPtr m_pBtnDelete; + VclPtr m_pBtnLoad; + VclPtr m_pBtnSave; const SfxItemSet& rOutAttrs; @@ -510,6 +518,8 @@ private: public: SvxHatchTabPage( vcl::Window* pParent, const SfxItemSet& rInAttrs ); + virtual ~SvxHatchTabPage(); + virtual void dispose() SAL_OVERRIDE; void Construct(); @@ -545,19 +555,19 @@ class SvxBitmapTabPage : public SvxTabPage using TabPage::DeactivatePage; private: - VclBox* m_pBxPixelEditor; - SvxPixelCtl* m_pCtlPixel; - ColorLB* m_pLbColor; - ColorLB* m_pLbBackgroundColor; - FixedText* m_pLbBitmapsHidden; - BitmapLB* m_pLbBitmaps; - SvxXRectPreview* m_pCtlPreview; - PushButton* m_pBtnAdd; - PushButton* m_pBtnModify; - PushButton* m_pBtnImport; - PushButton* m_pBtnDelete; - PushButton* m_pBtnLoad; - PushButton* m_pBtnSave; + VclPtr m_pBxPixelEditor; + VclPtr m_pCtlPixel; + VclPtr m_pLbColor; + VclPtr m_pLbBackgroundColor; + VclPtr m_pLbBitmapsHidden; + VclPtr m_pLbBitmaps; + VclPtr m_pCtlPreview; + VclPtr m_pBtnAdd; + VclPtr m_pBtnModify; + VclPtr m_pBtnImport; + VclPtr m_pBtnDelete; + VclPtr m_pBtnLoad; + VclPtr m_pBtnSave; SvxBitmapCtl* m_pBitmapCtl; @@ -642,11 +652,11 @@ class SvxColorTabPage : public SfxTabPage private: XPropertyListType meType; - Window *mpTopDlg; - CheckBox *m_pBoxEmbed; - PushButton *m_pBtnLoad; - PushButton *m_pBtnSave; - FixedText *m_pTableName; + VclPtr mpTopDlg; + VclPtr m_pBoxEmbed; + VclPtr m_pBtnLoad; + VclPtr m_pBtnSave; + VclPtr m_pTableName; DECL_LINK( EmbedToggleHdl_Impl, void * ); DECL_LINK( ClickLoadHdl_Impl, void * ); @@ -660,31 +670,31 @@ private: void EnableSave( bool bCanSave ); SvxColorTabPageShadow *pShadow; - Edit* m_pEdtName; - ColorLB* m_pLbColor; + VclPtr m_pEdtName; + VclPtr m_pLbColor; - SvxColorValueSet* m_pValSetColorList; + VclPtr m_pValSetColorList; - SvxXRectPreview* m_pCtlPreviewOld; - SvxXRectPreview* m_pCtlPreviewNew; + VclPtr m_pCtlPreviewOld; + VclPtr m_pCtlPreviewNew; - ListBox* m_pLbColorModel; + VclPtr m_pLbColorModel; - VclContainer* m_pRGB; - NumericField* m_pR; - NumericField* m_pG; - NumericField* m_pB; + VclPtr m_pRGB; + VclPtr m_pR; + VclPtr m_pG; + VclPtr m_pB; - VclContainer* m_pCMYK; - MetricField* m_pC; - MetricField* m_pY; - MetricField* m_pM; - MetricField* m_pK; + VclPtr m_pCMYK; + VclPtr m_pC; + VclPtr m_pY; + VclPtr m_pM; + VclPtr m_pK; - PushButton* m_pBtnAdd; - PushButton* m_pBtnModify; - PushButton* m_pBtnWorkOn; - PushButton* m_pBtnDelete; + VclPtr m_pBtnAdd; + VclPtr m_pBtnModify; + VclPtr m_pBtnWorkOn; + VclPtr m_pBtnDelete; const SfxItemSet& rOutAttrs; diff --git a/cui/source/inc/cuitabline.hxx b/cui/source/inc/cuitabline.hxx index ca9f7b718d1a..6f19fb7eed04 100644 --- a/cui/source/inc/cuitabline.hxx +++ b/cui/source/inc/cuitabline.hxx @@ -91,34 +91,34 @@ class SvxLineTabPage : public SvxTabPage using TabPage::DeactivatePage; static const sal_uInt16 pLineRanges[]; private: - VclBox* m_pBoxColor; - LineLB* m_pLbLineStyle; - ColorLB* m_pLbColor; - VclBox* m_pBoxWidth; - MetricField* m_pMtrLineWidth; - VclBox* m_pBoxTransparency; - MetricField* m_pMtrTransparent; - - VclFrame* m_pFlLineEnds; - VclBox* m_pBoxArrowStyles; - LineEndLB* m_pLbStartStyle; - VclBox* m_pBoxStart; - MetricField* m_pMtrStartWidth; - TriStateBox* m_pTsbCenterStart; - VclBox* m_pBoxEnd; - LineEndLB* m_pLbEndStyle; - MetricField* m_pMtrEndWidth; - TriStateBox* m_pTsbCenterEnd; - CheckBox* m_pCbxSynchronize; - SvxXLinePreview* m_pCtlPreview; + VclPtr m_pBoxColor; + VclPtr m_pLbLineStyle; + VclPtr m_pLbColor; + VclPtr m_pBoxWidth; + VclPtr m_pMtrLineWidth; + VclPtr m_pBoxTransparency; + VclPtr m_pMtrTransparent; + + VclPtr m_pFlLineEnds; + VclPtr m_pBoxArrowStyles; + VclPtr m_pLbStartStyle; + VclPtr m_pBoxStart; + VclPtr m_pMtrStartWidth; + VclPtr m_pTsbCenterStart; + VclPtr m_pBoxEnd; + VclPtr m_pLbEndStyle; + VclPtr m_pMtrEndWidth; + VclPtr m_pTsbCenterEnd; + VclPtr m_pCbxSynchronize; + VclPtr m_pCtlPreview; // #116827# - VclFrame* m_pFLEdgeStyle; - VclGrid* m_pGridEdgeCaps; - ListBox* m_pLBEdgeStyle; + VclPtr m_pFLEdgeStyle; + VclPtr m_pGridEdgeCaps; + VclPtr m_pLBEdgeStyle; // LineCaps - ListBox* m_pLBCapStyle; + VclPtr m_pLBCapStyle; //#58425# symbols on a line (e. g. StarChart) -> /** a list of symbols to be shown in menu. Symbol at position SID_ATTR_SYMBOLTYPE is to be shown in preview. @@ -131,12 +131,12 @@ private: long nSymbolType; /// attributes for the shown symbols; only necessary if not equal to line properties SfxItemSet* pSymbolAttr; - VclFrame* m_pFlSymbol; - VclGrid* m_pGridIconSize; - MenuButton* m_pSymbolMB; - MetricField* m_pSymbolWidthMF; - MetricField* m_pSymbolHeightMF; - CheckBox* m_pSymbolRatioCB; + VclPtr m_pFlSymbol; + VclPtr m_pGridIconSize; + VclPtr m_pSymbolMB; + VclPtr m_pSymbolWidthMF; + VclPtr m_pSymbolHeightMF; + VclPtr m_pSymbolRatioCB; std::vector aGrfNames; SvxBmpItemInfoList aGrfBrushItems; bool bLastWidthModified; @@ -246,21 +246,21 @@ class SvxLineDefTabPage : public SfxTabPage using TabPage::ActivatePage; using TabPage::DeactivatePage; private: - LineLB* m_pLbLineStyles; - ListBox* m_pLbType1; - ListBox* m_pLbType2; - NumericField* m_pNumFldNumber1; - NumericField* m_pNumFldNumber2; - MetricField* m_pMtrLength1; - MetricField* m_pMtrLength2; - MetricField* m_pMtrDistance; - CheckBox* m_pCbxSynchronize; - PushButton* m_pBtnAdd; - PushButton* m_pBtnModify; - PushButton* m_pBtnDelete; - PushButton* m_pBtnLoad; - PushButton* m_pBtnSave; - SvxXLinePreview* m_pCtlPreview; + VclPtr m_pLbLineStyles; + VclPtr m_pLbType1; + VclPtr m_pLbType2; + VclPtr m_pNumFldNumber1; + VclPtr m_pNumFldNumber2; + VclPtr m_pMtrLength1; + VclPtr m_pMtrLength2; + VclPtr m_pMtrDistance; + VclPtr m_pCbxSynchronize; + VclPtr m_pBtnAdd; + VclPtr m_pBtnModify; + VclPtr m_pBtnDelete; + VclPtr m_pBtnLoad; + VclPtr m_pBtnSave; + VclPtr m_pCtlPreview; const SfxItemSet& rOutAttrs; XDash aDash; @@ -303,6 +303,8 @@ private: public: SvxLineDefTabPage( vcl::Window* pParent, const SfxItemSet& rInAttrs ); + virtual ~SvxLineDefTabPage(); + virtual void dispose() SAL_OVERRIDE; void Construct(); @@ -333,14 +335,14 @@ class SvxLineEndDefTabPage : public SfxTabPage using TabPage::DeactivatePage; private: - Edit* m_pEdtName; - LineEndLB* m_pLbLineEnds; - PushButton* m_pBtnAdd; - PushButton* m_pBtnModify; - PushButton* m_pBtnDelete; - PushButton* m_pBtnLoad; - PushButton* m_pBtnSave; - SvxXLinePreview* m_pCtlPreview; + VclPtr m_pEdtName; + VclPtr m_pLbLineEnds; + VclPtr m_pBtnAdd; + VclPtr m_pBtnModify; + VclPtr m_pBtnDelete; + VclPtr m_pBtnLoad; + VclPtr m_pBtnSave; + VclPtr m_pCtlPreview; const SfxItemSet& rOutAttrs; const SdrObject* pPolyObj; @@ -372,6 +374,8 @@ private: public: SvxLineEndDefTabPage( vcl::Window* pParent, const SfxItemSet& rInAttrs ); + virtual ~SvxLineEndDefTabPage(); + virtual void dispose() SAL_OVERRIDE; void Construct(); diff --git a/cui/source/inc/cuitbxform.hxx b/cui/source/inc/cuitbxform.hxx index 1f2b34d616db..4ee17070a5f5 100644 --- a/cui/source/inc/cuitbxform.hxx +++ b/cui/source/inc/cuitbxform.hxx @@ -29,10 +29,12 @@ class FmInputRecordNoDialog : public ModalDialog { public: - NumericField* m_pRecordNo; + VclPtr m_pRecordNo; public: FmInputRecordNoDialog(vcl::Window * pParent); + virtual ~FmInputRecordNoDialog(); + virtual void dispose() SAL_OVERRIDE; void SetValue(long dNew) { m_pRecordNo->SetValue(dNew); } long GetValue() const { return static_cast(m_pRecordNo->GetValue()); } diff --git a/cui/source/inc/dbregister.hxx b/cui/source/inc/dbregister.hxx index a665aabbf636..fa714753bd14 100644 --- a/cui/source/inc/dbregister.hxx +++ b/cui/source/inc/dbregister.hxx @@ -46,12 +46,12 @@ namespace svx OUString aTypeText; OUString aPathText; - SvSimpleTableContainer* m_pPathCtrl; - PushButton* m_pNew; - PushButton* m_pEdit; - PushButton* m_pDelete; + VclPtr m_pPathCtrl; + VclPtr m_pNew; + VclPtr m_pEdit; + VclPtr m_pDelete; - ::svx::OptHeaderTabListBox* pPathBox; + VclPtr<::svx::OptHeaderTabListBox> pPathBox; SvTreeListEntry* m_pCurEntry; sal_uLong m_nOldCount; bool m_bModified; diff --git a/cui/source/inc/dlgname.hxx b/cui/source/inc/dlgname.hxx index 46c971499c67..8615477f6618 100644 --- a/cui/source/inc/dlgname.hxx +++ b/cui/source/inc/dlgname.hxx @@ -30,9 +30,9 @@ class SvxNameDialog : public ModalDialog { private: - FixedText* pFtDescription; - Edit* pEdtName; - OKButton* pBtnOK; + VclPtr pFtDescription; + VclPtr pEdtName; + VclPtr pBtnOK; Link aCheckNameHdl; @@ -40,6 +40,8 @@ private: public: SvxNameDialog( vcl::Window* pWindow, const OUString& rName, const OUString& rDesc ); + virtual ~SvxNameDialog(); + virtual void dispose() SAL_OVERRIDE; void GetName( OUString& rName ){rName = pEdtName->GetText();} @@ -75,10 +77,10 @@ class SvxObjectNameDialog : public ModalDialog { private: // name - Edit* pEdtName; + VclPtr pEdtName; // buttons - OKButton* pBtnOK; + VclPtr pBtnOK; // callback link for name uniqueness Link aCheckNameHdl; @@ -88,6 +90,8 @@ private: public: // constructor SvxObjectNameDialog(vcl::Window* pWindow, const OUString& rName); + virtual ~SvxObjectNameDialog(); + virtual void dispose() SAL_OVERRIDE; // data access void GetName(OUString& rName) {rName = pEdtName->GetText(); } @@ -110,15 +114,16 @@ class SvxObjectTitleDescDialog : public ModalDialog { private: // title - Edit* pEdtTitle; + VclPtr pEdtTitle; // description - VclMultiLineEdit* pEdtDescription; + VclPtr pEdtDescription; public: // constructor SvxObjectTitleDescDialog(vcl::Window* pWindow, const OUString& rTitle, const OUString& rDesc); - + virtual ~SvxObjectTitleDescDialog(); + virtual void dispose() SAL_OVERRIDE; // data access void GetTitle(OUString& rTitle) {rTitle = pEdtTitle->GetText(); } void GetDescription(OUString& rDescription) {rDescription = pEdtDescription->GetText(); } @@ -128,10 +133,10 @@ public: class SvxMessDialog : public ModalDialog { private: - FixedText* pFtDescription; - PushButton* pBtn1; - PushButton* pBtn2; - FixedImage* pFtImage; + VclPtr pFtDescription; + VclPtr pBtn1; + VclPtr pBtn2; + VclPtr pFtImage; Image* pImage; DECL_LINK(Button1Hdl, void *); diff --git a/cui/source/inc/dstribut.hxx b/cui/source/inc/dstribut.hxx index e0be5f3dd87e..0d07317c98ec 100644 --- a/cui/source/inc/dstribut.hxx +++ b/cui/source/inc/dstribut.hxx @@ -29,21 +29,23 @@ class SvxDistributePage : public SvxTabPage SvxDistributeHorizontal m_eDistributeHor; SvxDistributeVertical m_eDistributeVer; - RadioButton* m_pBtnHorNone; - RadioButton* m_pBtnHorLeft; - RadioButton* m_pBtnHorCenter; - RadioButton* m_pBtnHorDistance; - RadioButton* m_pBtnHorRight; - RadioButton* m_pBtnVerNone; - RadioButton* m_pBtnVerTop; - RadioButton* m_pBtnVerCenter; - RadioButton* m_pBtnVerDistance; - RadioButton* m_pBtnVerBottom; + VclPtr m_pBtnHorNone; + VclPtr m_pBtnHorLeft; + VclPtr m_pBtnHorCenter; + VclPtr m_pBtnHorDistance; + VclPtr m_pBtnHorRight; + VclPtr m_pBtnVerNone; + VclPtr m_pBtnVerTop; + VclPtr m_pBtnVerCenter; + VclPtr m_pBtnVerDistance; + VclPtr m_pBtnVerBottom; public: SvxDistributePage(vcl::Window* pWindow, const SfxItemSet& rInAttrs, SvxDistributeHorizontal eHor = SvxDistributeHorizontalNone, SvxDistributeVertical eVer = SvxDistributeVerticalNone); + virtual ~SvxDistributePage(); + virtual void dispose() SAL_OVERRIDE; static SfxTabPage* Create(vcl::Window*, const SfxItemSet&, SvxDistributeHorizontal eHor, SvxDistributeVertical eVer); @@ -57,12 +59,14 @@ public: class SvxDistributeDialog : public SfxSingleTabDialog { - SvxDistributePage* mpPage; + VclPtr mpPage; public: SvxDistributeDialog(vcl::Window* pParent, const SfxItemSet& rAttr, SvxDistributeHorizontal eHor = SvxDistributeHorizontalNone, SvxDistributeVertical eVer = SvxDistributeVerticalNone); + virtual ~SvxDistributeDialog(); + virtual void dispose() SAL_OVERRIDE; SvxDistributeHorizontal GetDistributeHor() const { return mpPage->GetDistributeHor(); } SvxDistributeVertical GetDistributeVer() const { return mpPage->GetDistributeVer(); } diff --git a/cui/source/inc/grfpage.hxx b/cui/source/inc/grfpage.hxx index 39cd21b26538..e52d39c92a01 100644 --- a/cui/source/inc/grfpage.hxx +++ b/cui/source/inc/grfpage.hxx @@ -56,28 +56,28 @@ class SvxGrfCropPage : public SfxTabPage using TabPage::ActivatePage; using TabPage::DeactivatePage; - VclContainer* m_pCropFrame; - RadioButton* m_pZoomConstRB; - RadioButton* m_pSizeConstRB; - MetricField* m_pLeftMF; - MetricField* m_pRightMF; - MetricField* m_pTopMF; - MetricField* m_pBottomMF; - - VclContainer* m_pScaleFrame; - MetricField* m_pWidthZoomMF; - MetricField* m_pHeightZoomMF; - - VclContainer* m_pSizeFrame; - MetricField* m_pWidthMF; - MetricField* m_pHeightMF; - - VclContainer* m_pOrigSizeGrid; - FixedText* m_pOrigSizeFT; - PushButton* m_pOrigSizePB; + VclPtr m_pCropFrame; + VclPtr m_pZoomConstRB; + VclPtr m_pSizeConstRB; + VclPtr m_pLeftMF; + VclPtr m_pRightMF; + VclPtr m_pTopMF; + VclPtr m_pBottomMF; + + VclPtr m_pScaleFrame; + VclPtr m_pWidthZoomMF; + VclPtr m_pHeightZoomMF; + + VclPtr m_pSizeFrame; + VclPtr m_pWidthMF; + VclPtr m_pHeightMF; + + VclPtr m_pOrigSizeGrid; + VclPtr m_pOrigSizeFT; + VclPtr m_pOrigSizePB; // Example - SvxCropExample* m_pExampleWN; + VclPtr m_pExampleWN; Timer aTimer; @@ -85,7 +85,7 @@ class SvxGrfCropPage : public SfxTabPage Size aOrigSize; Size aOrigPixelSize; Size aPageSize; - const MetricField* pLastCropField; + VclPtr pLastCropField; long nOldWidth; long nOldHeight; bool bReset; diff --git a/cui/source/inc/hangulhanjadlg.hxx b/cui/source/inc/hangulhanjadlg.hxx index 2cfd24d24b60..6018b0fa161a 100644 --- a/cui/source/inc/hangulhanjadlg.hxx +++ b/cui/source/inc/hangulhanjadlg.hxx @@ -104,27 +104,27 @@ namespace svx { private: - PushButton* m_pFind; - PushButton* m_pIgnore; - PushButton* m_pIgnoreAll; - PushButton* m_pReplace; - PushButton* m_pReplaceAll; - PushButton* m_pOptions; - SuggestionDisplay* m_pSuggestions; - RadioButton* m_pSimpleConversion; - RadioButton* m_pHangulBracketed; - RadioButton* m_pHanjaBracketed; - Edit* m_pWordInput; - FixedText* m_pOriginalWord; - RubyRadioButton* m_pHanjaAbove; - RubyRadioButton* m_pHanjaBelow; - RubyRadioButton* m_pHangulAbove; - RubyRadioButton* m_pHangulBelow; - CheckBox* m_pHangulOnly; - CheckBox* m_pHanjaOnly; - CheckBox* m_pReplaceByChar; - - CheckBox* m_pIgnoreNonPrimary; + VclPtr m_pFind; + VclPtr m_pIgnore; + VclPtr m_pIgnoreAll; + VclPtr m_pReplace; + VclPtr m_pReplaceAll; + VclPtr m_pOptions; + VclPtr m_pSuggestions; + VclPtr m_pSimpleConversion; + VclPtr m_pHangulBracketed; + VclPtr m_pHanjaBracketed; + VclPtr m_pWordInput; + VclPtr m_pOriginalWord; + VclPtr m_pHanjaAbove; + VclPtr m_pHanjaBelow; + VclPtr m_pHangulAbove; + VclPtr m_pHangulBelow; + VclPtr m_pHangulOnly; + VclPtr m_pHanjaOnly; + VclPtr m_pReplaceByChar; + + VclPtr m_pIgnoreNonPrimary; /** are we working for a document? This is normally true, but in case the user uses the "find" functionality, we switch to working with what the user entered, which then does not have any relation to @@ -138,6 +138,8 @@ namespace svx HangulHanjaConversionDialog( vcl::Window* _pParent, editeng::HangulHanjaConversion::ConversionDirection _ePrimaryDirection ); + virtual ~HangulHanjaConversionDialog(); + virtual void dispose() SAL_OVERRIDE; public: void SetOptionsChangedHdl( const Link& _rHdl ); @@ -196,14 +198,14 @@ namespace svx class HangulHanjaOptionsDialog : public ModalDialog { private: - SvxCheckListBox* m_pDictsLB; - CheckBox* m_pIgnorepostCB; - CheckBox* m_pShowrecentlyfirstCB; - CheckBox* m_pAutoreplaceuniqueCB; - PushButton* m_pNewPB; - PushButton* m_pEditPB; - PushButton* m_pDeletePB; - OKButton* m_pOkPB; + VclPtr m_pDictsLB; + VclPtr m_pIgnorepostCB; + VclPtr m_pShowrecentlyfirstCB; + VclPtr m_pAutoreplaceuniqueCB; + VclPtr m_pNewPB; + VclPtr m_pEditPB; + VclPtr m_pDeletePB; + VclPtr m_pOkPB; SvLBoxButtonData* m_pCheckButtonData; @@ -232,8 +234,8 @@ namespace svx class HangulHanjaNewDictDialog : public ModalDialog { private: - Edit* m_pDictNameED; - OKButton* m_pOkBtn; + VclPtr m_pDictNameED; + VclPtr m_pOkBtn; bool m_bEntered; @@ -241,6 +243,8 @@ namespace svx DECL_LINK( ModifyHdl, void* ); public: HangulHanjaNewDictDialog( vcl::Window* _pParent ); + virtual ~HangulHanjaNewDictDialog(); + virtual void dispose() SAL_OVERRIDE; bool GetName( OUString& _rRetName ) const; }; @@ -251,14 +255,16 @@ namespace svx class SuggestionEdit : public Edit { private: - SuggestionEdit* m_pPrev; - SuggestionEdit* m_pNext; - ScrollBar* m_pScrollBar; + VclPtr m_pPrev; + VclPtr m_pNext; + VclPtr m_pScrollBar; bool ShouldScroll( bool _bUp ) const; void DoJump( bool _bUp ); public: SuggestionEdit( vcl::Window* pParent, WinBits nBits ); + virtual ~SuggestionEdit(); + virtual void dispose() SAL_OVERRIDE; virtual bool PreNotify( NotifyEvent& rNEvt ) SAL_OVERRIDE; void init( ScrollBar* pScrollBar, SuggestionEdit* pPrev, SuggestionEdit* pNext); }; @@ -274,15 +280,15 @@ namespace svx OUString m_aOriginal; SuggestionList* m_pSuggestions; - ListBox* m_aBookLB; - ComboBox* m_aOriginalLB; - SuggestionEdit* m_aEdit1; - SuggestionEdit* m_aEdit2; - SuggestionEdit* m_aEdit3; - SuggestionEdit* m_aEdit4; - ScrollBar* m_aScrollSB; - PushButton* m_aNewPB; - PushButton* m_aDeletePB; + VclPtr m_aBookLB; + VclPtr m_aOriginalLB; + VclPtr m_aEdit1; + VclPtr m_aEdit2; + VclPtr m_aEdit3; + VclPtr m_aEdit4; + VclPtr m_aScrollSB; + VclPtr m_aNewPB; + VclPtr m_aDeletePB; sal_uInt16 m_nTopPos; bool m_bModifiedSuggestions; diff --git a/cui/source/inc/hldocntp.hxx b/cui/source/inc/hldocntp.hxx index 186ce6a6fe9a..494b7a28d33a 100644 --- a/cui/source/inc/hldocntp.hxx +++ b/cui/source/inc/hldocntp.hxx @@ -30,11 +30,11 @@ class SvxHyperlinkNewDocTp : public SvxHyperlinkTabPageBase { private: - RadioButton *m_pRbtEditNow; - RadioButton *m_pRbtEditLater; - SvxHyperURLBox *m_pCbbPath; - PushButton *m_pBtCreate; - ListBox *m_pLbDocTypes; + VclPtr m_pRbtEditNow; + VclPtr m_pRbtEditLater; + VclPtr m_pCbbPath; + VclPtr m_pBtCreate; + VclPtr m_pLbDocTypes; bool ImplGetURLObject( const OUString& rPath, const OUString& rBase, INetURLObject& aURLObject ) const; void FillDocumentList (); diff --git a/cui/source/inc/hldoctp.hxx b/cui/source/inc/hldoctp.hxx index 108df078dfa6..76dda781969a 100644 --- a/cui/source/inc/hldoctp.hxx +++ b/cui/source/inc/hldoctp.hxx @@ -30,12 +30,12 @@ class SvxHyperlinkDocTp : public SvxHyperlinkTabPageBase { private: - SvxHyperURLBox *m_pCbbPath; - PushButton *m_pBtFileopen; + VclPtr m_pCbbPath; + VclPtr m_pBtFileopen; - Edit *m_pEdTarget; - FixedText *m_pFtFullURL; - PushButton *m_pBtBrowse; + VclPtr m_pEdTarget; + VclPtr m_pFtFullURL; + VclPtr m_pBtBrowse; OUString maStrURL; @@ -67,6 +67,8 @@ protected: public: SvxHyperlinkDocTp ( vcl::Window *pParent, IconChoiceDialog* pDlg, const SfxItemSet& rItemSet); + virtual ~SvxHyperlinkDocTp(); + virtual void dispose() SAL_OVERRIDE; static IconChoicePage* Create( vcl::Window* pWindow, IconChoiceDialog* pDlg, const SfxItemSet& rItemSet ); diff --git a/cui/source/inc/hlinettp.hxx b/cui/source/inc/hlinettp.hxx index bc76625641e4..03b0132c1263 100644 --- a/cui/source/inc/hlinettp.hxx +++ b/cui/source/inc/hlinettp.hxx @@ -32,15 +32,15 @@ class SvxHyperlinkInternetTp : public SvxHyperlinkTabPageBase { private: - RadioButton *m_pRbtLinktypInternet; - RadioButton *m_pRbtLinktypFTP; - SvxHyperURLBox *m_pCbbTarget; - PushButton *m_pBtBrowse; - FixedText *m_pFtLogin; - Edit *m_pEdLogin; - FixedText *m_pFtPassword; - Edit *m_pEdPassword; - CheckBox *m_pCbAnonymous; + VclPtr m_pRbtLinktypInternet; + VclPtr m_pRbtLinktypFTP; + VclPtr m_pCbbTarget; + VclPtr m_pBtBrowse; + VclPtr m_pFtLogin; + VclPtr m_pEdLogin; + VclPtr m_pFtPassword; + VclPtr m_pEdPassword; + VclPtr m_pCbAnonymous; OUString maStrOldUser; OUString maStrOldPassword; @@ -78,6 +78,8 @@ protected: public: SvxHyperlinkInternetTp ( vcl::Window *pParent, IconChoiceDialog* pDlg, const SfxItemSet& rItemSet); + virtual ~SvxHyperlinkInternetTp(); + virtual void dispose() SAL_OVERRIDE; static IconChoicePage* Create( vcl::Window* pWindow, IconChoiceDialog* pDlg, const SfxItemSet& rItemSet ); diff --git a/cui/source/inc/hlmailtp.hxx b/cui/source/inc/hlmailtp.hxx index 1687e848156c..5eae01b5851a 100644 --- a/cui/source/inc/hlmailtp.hxx +++ b/cui/source/inc/hlmailtp.hxx @@ -30,10 +30,10 @@ class SvxHyperlinkMailTp : public SvxHyperlinkTabPageBase { private: - SvxHyperURLBox *m_pCbbReceiver; - PushButton *m_pBtAdrBook; - FixedText *m_pFtSubject; - Edit *m_pEdSubject; + VclPtr m_pCbbReceiver; + VclPtr m_pBtAdrBook; + VclPtr m_pFtSubject; + VclPtr m_pEdSubject; DECL_LINK (ClickAdrBookHdl_Impl , void * ); ///< Button : Address book DECL_LINK (ModifiedReceiverHdl_Impl, void * ); ///< Combobox "receiver" modified @@ -51,6 +51,8 @@ protected: public: SvxHyperlinkMailTp ( vcl::Window *pParent, IconChoiceDialog* pDlg, const SfxItemSet& rItemSet); + virtual ~SvxHyperlinkMailTp(); + virtual void dispose() SAL_OVERRIDE; static IconChoicePage* Create( vcl::Window* pWindow, IconChoiceDialog* pDlg, const SfxItemSet& rItemSet ); diff --git a/cui/source/inc/hlmarkwn.hxx b/cui/source/inc/hlmarkwn.hxx index e9d8c32dac9c..9591a2a0f640 100644 --- a/cui/source/inc/hlmarkwn.hxx +++ b/cui/source/inc/hlmarkwn.hxx @@ -39,10 +39,12 @@ class SvxHlinkDlgMarkWnd; class SvxHlmarkTreeLBox : public SvTreeListBox { private: - SvxHlinkDlgMarkWnd* mpParentWnd; + VclPtr mpParentWnd; public: SvxHlmarkTreeLBox(vcl::Window* pParent, WinBits nStyle); + virtual ~SvxHlmarkTreeLBox(); + virtual void dispose() SAL_OVERRIDE; void SetParentWnd(SvxHlinkDlgMarkWnd* pParent) { @@ -62,13 +64,13 @@ class SvxHlinkDlgMarkWnd : public ModalDialog //FloatingWindow private: friend class SvxHlmarkTreeLBox; - PushButton* mpBtApply; - PushButton* mpBtClose; - SvxHlmarkTreeLBox* mpLbTree; + VclPtr mpBtApply; + VclPtr mpBtClose; + VclPtr mpLbTree; bool mbUserMoved; - SvxHyperlinkTabPageBase* mpParent; + VclPtr mpParent; OUString maStrLastURL; diff --git a/cui/source/inc/hltpbase.hxx b/cui/source/inc/hltpbase.hxx index 275d28b7afed..d155d6e42de7 100644 --- a/cui/source/inc/hltpbase.hxx +++ b/cui/source/inc/hltpbase.hxx @@ -67,11 +67,11 @@ public: class SvxHyperlinkTabPageBase : public IconChoicePage { private: - ComboBox *mpCbbFrame; - ListBox *mpLbForm; - Edit *mpEdIndication; - Edit *mpEdText; - PushButton *mpBtScript; + VclPtr mpCbbFrame; + VclPtr mpLbForm; + VclPtr mpEdIndication; + VclPtr mpEdText; + VclPtr mpBtScript; bool mbIsCloseDisabled; @@ -79,7 +79,7 @@ private: mxDocumentFrame; protected: - vcl::Window* mpDialog; + VclPtr mpDialog; bool mbStdControlsInit; @@ -87,7 +87,7 @@ protected: Timer maTimer; - SvxHlinkDlgMarkWnd* mpMarkWnd; + VclPtr mpMarkWnd; void InitStdControls (); void FillStandardDlgFields ( const SvxHyperlinkItem* pHyperlinkItem ); diff --git a/cui/source/inc/hyphen.hxx b/cui/source/inc/hyphen.hxx index 16821011e500..3bf97672b99b 100644 --- a/cui/source/inc/hyphen.hxx +++ b/cui/source/inc/hyphen.hxx @@ -42,14 +42,14 @@ protected: class SvxHyphenWordDialog : public SfxModalDialog { - HyphenEdit* m_pWordEdit; - PushButton* m_pLeftBtn; - PushButton* m_pRightBtn; - PushButton* m_pOkBtn; - PushButton* m_pContBtn; - PushButton* m_pDelBtn; - PushButton* m_pHyphAll; - CloseButton* m_pCloseBtn; + VclPtr m_pWordEdit; + VclPtr m_pLeftBtn; + VclPtr m_pRightBtn; + VclPtr m_pOkBtn; + VclPtr m_pContBtn; + VclPtr m_pDelBtn; + VclPtr m_pHyphAll; + VclPtr m_pCloseBtn; OUString aLabel; SvxSpellWrapper* pHyphWrapper; css::uno::Reference< css::linguistic2::XHyphenator > xHyphenator; @@ -85,6 +85,8 @@ public: vcl::Window* pParent, css::uno::Reference< css::linguistic2::XHyphenator > &xHyphen, SvxSpellWrapper* pWrapper ); + virtual ~SvxHyphenWordDialog(); + virtual void dispose() SAL_OVERRIDE; void SetWindowTitle( LanguageType nLang ); void SelLeft(); diff --git a/cui/source/inc/iconcdlg.hxx b/cui/source/inc/iconcdlg.hxx index 21a8d5b1025a..62260e2e9dd2 100644 --- a/cui/source/inc/iconcdlg.hxx +++ b/cui/source/inc/iconcdlg.hxx @@ -49,7 +49,7 @@ struct IconChoicePageData sal_uInt16 nId; CreatePage fnCreatePage; ///< pointer to the factory GetPageRanges fnGetRanges; ///< pointer to the ranges-function - IconChoicePage* pPage; ///< the TabPage itself + VclPtr pPage; ///< the TabPage itself bool bOnDemand; ///< Flag: ItemSet onDemand bool bRefresh; ///< Flag: page has to be newly initialized @@ -73,7 +73,7 @@ private : const SfxItemSet* pSet; OUString aUserString; bool bHasExchangeSupport; - IconChoiceDialog* pDialog; + VclPtr pDialog; void SetDialog( IconChoiceDialog* pNew ) { pDialog = pNew; } IconChoiceDialog* GetDialog() const { return pDialog; } @@ -85,10 +85,12 @@ private : protected : IconChoicePage( vcl::Window *pParent, const OString& rID, const OUString& rUIXMLDescription, const SfxItemSet &rAttrSet ); - sal_uInt16 GetSlot( sal_uInt16 nWhich ) const { return pSet->GetPool()->GetSlotId( nWhich ); } - sal_uInt16 GetWhich( sal_uInt16 nSlot ) const { return pSet->GetPool()->GetWhich( nSlot ); } + sal_uInt16 GetSlot( sal_uInt16 nWhich ) const { return pSet->GetPool()->GetSlotId( nWhich ); } + sal_uInt16 GetWhich( sal_uInt16 nSlot ) const { return pSet->GetPool()->GetWhich( nSlot ); } public : + virtual ~IconChoicePage(); + virtual void dispose() SAL_OVERRIDE; const SfxItemSet& GetItemSet() const { return *pSet; } @@ -124,18 +126,18 @@ private : ::std::vector< IconChoicePageData* > maPageList; - SvtIconChoiceCtrl *m_pIconCtrl; + VclPtr m_pIconCtrl; sal_uInt16 mnCurrentPageId; // Buttons - OKButton *m_pOKBtn; - PushButton *m_pApplyBtn; - CancelButton *m_pCancelBtn; - HelpButton *m_pHelpBtn; - PushButton *m_pResetBtn; + VclPtr m_pOKBtn; + VclPtr m_pApplyBtn; + VclPtr m_pCancelBtn; + VclPtr m_pHelpBtn; + VclPtr m_pResetBtn; - VclVBox *m_pTabContainer; + VclPtr m_pTabContainer; const SfxItemSet* pSet; SfxItemSet* pOutSet; SfxItemSet* pExampleSet; @@ -166,7 +168,7 @@ protected : SfxItemSet* CreateInputItemSet( sal_uInt16 nId ); inline SfxItemSet* GetInputSetImpl() { return const_cast(pSet); } inline IconChoicePage* GetTabPage( sal_uInt16 nPageId ) - { return ( GetPageData (nPageId)->pPage?GetPageData (nPageId)->pPage:NULL); } + { return ( GetPageData (nPageId)->pPage?GetPageData (nPageId)->pPage.get():NULL); } void RefreshInputSet(); void ActivatePageImpl (); diff --git a/cui/source/inc/insdlg.hxx b/cui/source/inc/insdlg.hxx index 009174bbffcc..eda64bad3349 100644 --- a/cui/source/inc/insdlg.hxx +++ b/cui/source/inc/insdlg.hxx @@ -56,14 +56,14 @@ public: class SvInsertOleDlg : public InsertObjectDialog_Impl { - RadioButton* m_pRbNewObject; - RadioButton* m_pRbObjectFromfile; - VclFrame* m_pObjectTypeFrame; - ListBox* m_pLbObjecttype; - VclFrame* m_pFileFrame; - Edit* m_pEdFilepath; - PushButton* m_pBtnFilepath; - CheckBox* m_pCbFilelink; + VclPtr m_pRbNewObject; + VclPtr m_pRbObjectFromfile; + VclPtr m_pObjectTypeFrame; + VclPtr m_pLbObjecttype; + VclPtr m_pFileFrame; + VclPtr m_pEdFilepath; + VclPtr m_pBtnFilepath; + VclPtr m_pCbFilelink; const SvObjectServerList* m_pServers; ::com::sun::star::uno::Sequence< sal_Int8 > m_aIconMetaFile; @@ -86,6 +86,8 @@ public: SvInsertOleDlg( vcl::Window* pParent, const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >& xStorage, const SvObjectServerList* pServers = NULL ); + virtual ~SvInsertOleDlg(); + virtual void dispose() SAL_OVERRIDE; virtual short Execute() SAL_OVERRIDE; /// get replacement for the iconified embedded object and the mediatype of the replacement @@ -95,9 +97,9 @@ public: class SvInsertPlugInDialog : public InsertObjectDialog_Impl { private: - Edit* m_pEdFileurl; - PushButton* m_pBtnFileurl; - VclMultiLineEdit* m_pEdPluginsOptions; + VclPtr m_pEdFileurl; + VclPtr m_pBtnFileurl; + VclPtr m_pEdPluginsOptions; INetURLObject* m_pURL; OUString m_aCommands; @@ -116,23 +118,23 @@ public: class SfxInsertFloatingFrameDialog : public InsertObjectDialog_Impl { private: - Edit* m_pEDName; - Edit* m_pEDURL; - PushButton* m_pBTOpen; + VclPtr m_pEDName; + VclPtr m_pEDURL; + VclPtr m_pBTOpen; - RadioButton* m_pRBScrollingOn; - RadioButton* m_pRBScrollingOff; - RadioButton* m_pRBScrollingAuto; + VclPtr m_pRBScrollingOn; + VclPtr m_pRBScrollingOff; + VclPtr m_pRBScrollingAuto; - RadioButton* m_pRBFrameBorderOn; - RadioButton* m_pRBFrameBorderOff; + VclPtr m_pRBFrameBorderOn; + VclPtr m_pRBFrameBorderOff; - FixedText* m_pFTMarginWidth; - NumericField* m_pNMMarginWidth; - CheckBox* m_pCBMarginWidthDefault; - FixedText* m_pFTMarginHeight; - NumericField* m_pNMMarginHeight; - CheckBox* m_pCBMarginHeightDefault; + VclPtr m_pFTMarginWidth; + VclPtr m_pNMMarginWidth; + VclPtr m_pCBMarginWidthDefault; + VclPtr m_pFTMarginHeight; + VclPtr m_pNMMarginHeight; + VclPtr m_pCBMarginHeightDefault; DECL_STATIC_LINK(SfxInsertFloatingFrameDialog, OpenHdl, PushButton* ); DECL_STATIC_LINK(SfxInsertFloatingFrameDialog, CheckHdl, CheckBox* ); @@ -144,6 +146,8 @@ public: const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >& xStorage ); SfxInsertFloatingFrameDialog( vcl::Window* pParent, const com::sun::star::uno::Reference < com::sun::star::embed::XEmbeddedObject >& xObj ); + virtual ~SfxInsertFloatingFrameDialog(); + virtual void dispose() SAL_OVERRIDE; virtual short Execute() SAL_OVERRIDE; }; diff --git a/cui/source/inc/insrc.hxx b/cui/source/inc/insrc.hxx index 012916b89423..f24467db07cd 100644 --- a/cui/source/inc/insrc.hxx +++ b/cui/source/inc/insrc.hxx @@ -31,10 +31,10 @@ class SvxInsRowColDlg : public SvxAbstractInsRowColDlg, public ModalDialog { - NumericField* m_pCountEdit; + VclPtr m_pCountEdit; - RadioButton* m_pBeforeBtn; - RadioButton* m_pAfterBtn; + VclPtr m_pBeforeBtn; + VclPtr m_pAfterBtn; OUString aRow; OUString aCol; @@ -43,6 +43,8 @@ class SvxInsRowColDlg : public SvxAbstractInsRowColDlg, public ModalDialog public: SvxInsRowColDlg( vcl::Window* pParent, bool bCol, const OString& sHelpId ); + virtual ~SvxInsRowColDlg(); + virtual void dispose() SAL_OVERRIDE; virtual short Execute(void) SAL_OVERRIDE; diff --git a/cui/source/inc/labdlg.hxx b/cui/source/inc/labdlg.hxx index 446499f28887..7b20283f2ebc 100644 --- a/cui/source/inc/labdlg.hxx +++ b/cui/source/inc/labdlg.hxx @@ -34,16 +34,16 @@ class SvxCaptionTabPage : public SfxTabPage { private: static const sal_uInt16 pCaptionRanges[]; - ValueSet* m_pCT_CAPTTYPE; - MetricField* m_pMF_ABSTAND; - ListBox* m_pLB_ANSATZ; - FixedText* m_pFT_UM; - MetricField* m_pMF_ANSATZ; - FixedText* m_pFT_ANSATZ_REL; - ListBox* m_pLB_ANSATZ_REL; - FixedText* m_pFT_LAENGE; - MetricField* m_pMF_LAENGE; - CheckBox* m_pCB_LAENGE; + VclPtr m_pCT_CAPTTYPE; + VclPtr m_pMF_ABSTAND; + VclPtr m_pLB_ANSATZ; + VclPtr m_pFT_UM; + VclPtr m_pMF_ANSATZ; + VclPtr m_pFT_ANSATZ_REL; + VclPtr m_pLB_ANSATZ_REL; + VclPtr m_pFT_LAENGE; + VclPtr m_pMF_LAENGE; + VclPtr m_pCB_LAENGE; Image m_aBmpCapTypes[CAPTYPE_BITMAPS_COUNT]; @@ -75,6 +75,8 @@ private: public: SvxCaptionTabPage( vcl::Window* pParent, const SfxItemSet& rInAttrs ); + virtual ~SvxCaptionTabPage(); + virtual void dispose() SAL_OVERRIDE; static SfxTabPage* Create( vcl::Window*, const SfxItemSet* ); static const sal_uInt16* GetRanges() { return pCaptionRanges; } diff --git a/cui/source/inc/linkdlg.hxx b/cui/source/inc/linkdlg.hxx index 62afb0c54b80..7e953fcd747e 100644 --- a/cui/source/inc/linkdlg.hxx +++ b/cui/source/inc/linkdlg.hxx @@ -44,16 +44,16 @@ class SvBaseLinksDlg : public ModalDialog { using Window::SetType; - SvTabListBox *m_pTbLinks; - FixedText *m_pFtFullFileName; - FixedText *m_pFtFullSourceName; - FixedText *m_pFtFullTypeName; - RadioButton *m_pRbAutomatic; - RadioButton *m_pRbManual; - PushButton *m_pPbUpdateNow; - PushButton *m_pPbOpenSource; - PushButton *m_pPbChangeSource; - PushButton *m_pPbBreakLink; + VclPtr m_pTbLinks; + VclPtr m_pFtFullFileName; + VclPtr m_pFtFullSourceName; + VclPtr m_pFtFullTypeName; + VclPtr m_pRbAutomatic; + VclPtr m_pRbManual; + VclPtr m_pPbUpdateNow; + VclPtr m_pPbOpenSource; + VclPtr m_pPbChangeSource; + VclPtr m_pPbBreakLink; OUString aStrAutolink; OUString aStrManuallink; OUString aStrBrokenlink; @@ -95,6 +95,8 @@ class SvBaseLinksDlg : public ModalDialog public: SvBaseLinksDlg( vcl::Window * pParent, sfx2::LinkManager*, bool bHtml = false ); + virtual ~SvBaseLinksDlg(); + virtual void dispose() SAL_OVERRIDE; void SetActLink( sfx2::SvBaseLink * pLink ); }; diff --git a/cui/source/inc/measure.hxx b/cui/source/inc/measure.hxx index 7e7bc034cbbe..18b0fc6ce20d 100644 --- a/cui/source/inc/measure.hxx +++ b/cui/source/inc/measure.hxx @@ -33,23 +33,23 @@ class SvxMeasurePage : public SvxTabPage private: static const sal_uInt16 pRanges[]; - MetricField* m_pMtrFldLineDist; - MetricField* m_pMtrFldHelplineOverhang; - MetricField* m_pMtrFldHelplineDist; - MetricField* m_pMtrFldHelpline1Len; - MetricField* m_pMtrFldHelpline2Len; - TriStateBox* m_pTsbBelowRefEdge; - MetricField* m_pMtrFldDecimalPlaces; - - SvxRectCtl* m_pCtlPosition; - TriStateBox* m_pTsbAutoPosV; - TriStateBox* m_pTsbAutoPosH; - TriStateBox* m_pTsbShowUnit; - ListBox* m_pLbUnit; - TriStateBox* m_pTsbParallel; - FixedText* m_pFtAutomatic; - - SvxXMeasurePreview* m_pCtlPreview; + VclPtr m_pMtrFldLineDist; + VclPtr m_pMtrFldHelplineOverhang; + VclPtr m_pMtrFldHelplineDist; + VclPtr m_pMtrFldHelpline1Len; + VclPtr m_pMtrFldHelpline2Len; + VclPtr m_pTsbBelowRefEdge; + VclPtr m_pMtrFldDecimalPlaces; + + VclPtr m_pCtlPosition; + VclPtr m_pTsbAutoPosV; + VclPtr m_pTsbAutoPosH; + VclPtr m_pTsbShowUnit; + VclPtr m_pLbUnit; + VclPtr m_pTsbParallel; + VclPtr m_pFtAutomatic; + + VclPtr m_pCtlPreview; const SfxItemSet& rOutAttrs; SfxItemSet aAttrSet; @@ -66,6 +66,8 @@ private: public: SvxMeasurePage( vcl::Window* pWindow, const SfxItemSet& rInAttrs ); + virtual ~SvxMeasurePage(); + virtual void dispose() SAL_OVERRIDE; static SfxTabPage* Create( vcl::Window*, const SfxItemSet* ); static const sal_uInt16* GetRanges() { return pRanges; } diff --git a/cui/source/inc/multipat.hxx b/cui/source/inc/multipat.hxx index 685bbc32d96d..ecc1395f6cad 100644 --- a/cui/source/inc/multipat.hxx +++ b/cui/source/inc/multipat.hxx @@ -39,9 +39,9 @@ class SvxMultiPathDialog : public ModalDialog { private: - svx::SvxRadioButtonListBox* m_pRadioLB; - PushButton* m_pAddBtn; - PushButton* m_pDelBtn; + VclPtr m_pRadioLB; + VclPtr m_pAddBtn; + VclPtr m_pDelBtn; DECL_LINK(AddHdl_Impl, void *); DECL_LINK(DelHdl_Impl, void *); @@ -60,9 +60,9 @@ public: class SvxPathSelectDialog : public ModalDialog { private: - ListBox* m_pPathLB; - PushButton* m_pAddBtn; - PushButton* m_pDelBtn; + VclPtr m_pPathLB; + VclPtr m_pAddBtn; + VclPtr m_pDelBtn; DECL_LINK(AddHdl_Impl, void *); DECL_LINK(DelHdl_Impl, void *); diff --git a/cui/source/inc/newtabledlg.hxx b/cui/source/inc/newtabledlg.hxx index 778457aec69e..f6be298f88d2 100644 --- a/cui/source/inc/newtabledlg.hxx +++ b/cui/source/inc/newtabledlg.hxx @@ -29,11 +29,13 @@ class SvxNewTableDialog : public SvxAbstractNewTableDialog, public ModalDialog { private: - NumericField* mpNumColumns; - NumericField* mpNumRows; + VclPtr mpNumColumns; + VclPtr mpNumRows; public: SvxNewTableDialog( vcl::Window* pWindow ); + virtual ~SvxNewTableDialog(); + virtual void dispose() SAL_OVERRIDE; virtual short Execute(void) SAL_OVERRIDE; diff --git a/cui/source/inc/numfmt.hxx b/cui/source/inc/numfmt.hxx index 7a633e325872..552f59249a3e 100644 --- a/cui/source/inc/numfmt.hxx +++ b/cui/source/inc/numfmt.hxx @@ -92,31 +92,31 @@ public: private: SvxNumberFormatTabPage( vcl::Window* pParent, const SfxItemSet& rCoreAttrs ); - FixedText* m_pFtCategory; - ListBox* m_pLbCategory; - FixedText* m_pFtFormat; - ListBox* m_pLbCurrency; - SvxFontListBox* m_pLbFormat; - FixedText* m_pFtLanguage; - SvxLanguageBox* m_pLbLanguage; - CheckBox* m_pCbSourceFormat; - SvxNumberPreview* m_pWndPreview; - FixedText* m_pFtOptions; - FixedText* m_pFtDecimals; - NumericField* m_pEdDecimals; - CheckBox* m_pBtnNegRed; - FixedText* m_pFtLeadZeroes; - NumericField* m_pEdLeadZeroes; - CheckBox* m_pBtnThousand; - - VclContainer* m_pFormatCodeFrame; - Edit* m_pEdFormat; - PushButton* m_pIbAdd; - PushButton* m_pIbInfo; - PushButton* m_pIbRemove; - - FixedText* m_pFtComment; - Edit* m_pEdComment; + VclPtr m_pFtCategory; + VclPtr m_pLbCategory; + VclPtr m_pFtFormat; + VclPtr m_pLbCurrency; + VclPtr m_pLbFormat; + VclPtr m_pFtLanguage; + VclPtr m_pLbLanguage; + VclPtr m_pCbSourceFormat; + VclPtr m_pWndPreview; + VclPtr m_pFtOptions; + VclPtr m_pFtDecimals; + VclPtr m_pEdDecimals; + VclPtr m_pBtnNegRed; + VclPtr m_pFtLeadZeroes; + VclPtr m_pEdLeadZeroes; + VclPtr m_pBtnThousand; + + VclPtr m_pFormatCodeFrame; + VclPtr m_pEdFormat; + VclPtr m_pIbAdd; + VclPtr m_pIbInfo; + VclPtr m_pIbRemove; + + VclPtr m_pFtComment; + VclPtr m_pEdComment; Timer aResetWinTimer; @@ -131,7 +131,7 @@ private: OUString sAutomaticEntry; - vcl::Window* pLastActivWindow; + VclPtr pLastActivWindow; void Init_Impl(); void FillCurrencyBox(); @@ -146,11 +146,11 @@ private: void ChangePreviewText( sal_uInt16 nPos ); void AddAutomaticLanguage_Impl(LanguageType eAutoLang, bool bSelect); // Handler - DECL_LINK( LostFocusHdl_Impl, Edit* pEd ); - DECL_LINK( DoubleClickHdl_Impl, SvxFontListBox* pLb ); + DECL_LINK( LostFocusHdl_Impl, Edit* ); + DECL_LINK( DoubleClickHdl_Impl, SvxFontListBox* ); DECL_LINK( SelFormatHdl_Impl, void * ); - DECL_LINK( ClickHdl_Impl, PushButton* pIB ); - DECL_LINK( EditHdl_Impl, Edit* pEdFormat ); + DECL_LINK( ClickHdl_Impl, PushButton* ); + DECL_LINK( EditHdl_Impl, Edit* ); DECL_LINK( OptHdl_Impl, void * ); DECL_LINK(TimeHdl_Impl, void *); }; diff --git a/cui/source/inc/numpages.hxx b/cui/source/inc/numpages.hxx index 9f9cca7bd9df..f2cb95c9c112 100644 --- a/cui/source/inc/numpages.hxx +++ b/cui/source/inc/numpages.hxx @@ -90,7 +90,7 @@ class SvxSingleNumPickTabPage : public SfxTabPage using TabPage::ActivatePage; using TabPage::DeactivatePage; - SvxNumValueSet* m_pExamplesVS; + VclPtr m_pExamplesVS; SvxNumSettingsArr_Impl aNumSettingsArr; SvxNumRule* pActNum; SvxNumRule* pSaveNum; @@ -130,7 +130,7 @@ class SvxBulletPickTabPage : public SfxTabPage using TabPage::ActivatePage; using TabPage::DeactivatePage; - SvxNumValueSet* m_pExamplesVS; + VclPtr m_pExamplesVS; SvxNumRule* pActNum; SvxNumRule* pSaveNum; sal_uInt16 nActNumLvl; @@ -168,7 +168,7 @@ class SvxNumPickTabPage : public SfxTabPage using TabPage::ActivatePage; using TabPage::DeactivatePage; - SvxNumValueSet* m_pExamplesVS; + VclPtr m_pExamplesVS; OUString sNumCharFmtName; OUString sBulletCharFmtName; @@ -213,8 +213,8 @@ class SvxBitmapPickTabPage : public SfxTabPage using TabPage::ActivatePage; using TabPage::DeactivatePage; - FixedText* m_pErrorText; - SvxBmpNumValueSet* m_pExamplesVS; + VclPtr m_pErrorText; + VclPtr m_pExamplesVS; std::vector aGrfNames; OUString sNumCharFmtName; @@ -255,44 +255,44 @@ class SvxNumOptionsTabPage : public SfxTabPage using TabPage::ActivatePage; using TabPage::DeactivatePage; - ListBox* m_pLevelLB; - - ListBox* m_pFmtLB; - - FixedText* m_pSeparatorFT; - FixedText* m_pPrefixFT; - Edit* m_pPrefixED; - FixedText* m_pSuffixFT; - Edit* m_pSuffixED; - FixedText* m_pCharFmtFT; - ListBox* m_pCharFmtLB; - FixedText* m_pBulColorFT; - ColorListBox* m_pBulColLB; - FixedText* m_pBulRelSizeFT; - MetricField* m_pBulRelSizeMF; - FixedText* m_pAllLevelFT; - NumericField* m_pAllLevelNF; - FixedText* m_pStartFT; - NumericField* m_pStartED; - FixedText* m_pBulletFT; - PushButton* m_pBulletPB; - FixedText* m_pAlignFT; - ListBox* m_pAlignLB; - FixedText* m_pBitmapFT; - MenuButton* m_pBitmapMB; + VclPtr m_pLevelLB; + + VclPtr m_pFmtLB; + + VclPtr m_pSeparatorFT; + VclPtr m_pPrefixFT; + VclPtr m_pPrefixED; + VclPtr m_pSuffixFT; + VclPtr m_pSuffixED; + VclPtr m_pCharFmtFT; + VclPtr m_pCharFmtLB; + VclPtr m_pBulColorFT; + VclPtr m_pBulColLB; + VclPtr m_pBulRelSizeFT; + VclPtr m_pBulRelSizeMF; + VclPtr m_pAllLevelFT; + VclPtr m_pAllLevelNF; + VclPtr m_pStartFT; + VclPtr m_pStartED; + VclPtr m_pBulletFT; + VclPtr m_pBulletPB; + VclPtr m_pAlignFT; + VclPtr m_pAlignLB; + VclPtr m_pBitmapFT; + VclPtr m_pBitmapMB; sal_uInt16 m_nGalleryId; - FixedText* m_pWidthFT; - MetricField* m_pWidthMF; - FixedText* m_pHeightFT; - MetricField* m_pHeightMF; - CheckBox* m_pRatioCB; - FixedText* m_pOrientFT; - ListBox* m_pOrientLB; + VclPtr m_pWidthFT; + VclPtr m_pWidthMF; + VclPtr m_pHeightFT; + VclPtr m_pHeightMF; + VclPtr m_pRatioCB; + VclPtr m_pOrientFT; + VclPtr m_pOrientLB; - VclContainer* m_pAllLevelsFrame; - CheckBox* m_pSameLevelCB; + VclPtr m_pAllLevelsFrame; + VclPtr m_pSameLevelCB; - SvxNumberingPreview* m_pPreviewWIN; + VclPtr m_pPreviewWIN; OUString m_sNumCharFmtName; OUString m_sBulletCharFmtName; @@ -390,36 +390,36 @@ class SvxNumPositionTabPage : public SfxTabPage using TabPage::ActivatePage; using TabPage::DeactivatePage; - ListBox* m_pLevelLB; + VclPtr m_pLevelLB; // former set of controls shown for numbering rules containing list level // attributes in SvxNumberFormat::SvxNumPositionAndSpaceMode == LABEL_WIDTH_AND_POSITION - FixedText* m_pDistBorderFT; - MetricField* m_pDistBorderMF; - CheckBox* m_pRelativeCB; - FixedText* m_pIndentFT; - MetricField* m_pIndentMF; - FixedText* m_pDistNumFT; - MetricField* m_pDistNumMF; - FixedText* m_pAlignFT; - ListBox* m_pAlignLB; + VclPtr m_pDistBorderFT; + VclPtr m_pDistBorderMF; + VclPtr m_pRelativeCB; + VclPtr m_pIndentFT; + VclPtr m_pIndentMF; + VclPtr m_pDistNumFT; + VclPtr m_pDistNumMF; + VclPtr m_pAlignFT; + VclPtr m_pAlignLB; // new set of controls shown for numbering rules containing list level // attributes in SvxNumberFormat::SvxNumPositionAndSpaceMode == LABEL_ALIGNMENT - FixedText* m_pLabelFollowedByFT; - ListBox* m_pLabelFollowedByLB; - FixedText* m_pListtabFT; - MetricField* m_pListtabMF; - FixedText* m_pAlign2FT; - ListBox* m_pAlign2LB; - FixedText* m_pAlignedAtFT; - MetricField* m_pAlignedAtMF; - FixedText* m_pIndentAtFT; - MetricField* m_pIndentAtMF; - - PushButton* m_pStandardPB; - - SvxNumberingPreview* m_pPreviewWIN; + VclPtr m_pLabelFollowedByFT; + VclPtr m_pLabelFollowedByLB; + VclPtr m_pListtabFT; + VclPtr m_pListtabMF; + VclPtr m_pAlign2FT; + VclPtr m_pAlign2LB; + VclPtr m_pAlignedAtFT; + VclPtr m_pAlignedAtMF; + VclPtr m_pIndentAtFT; + VclPtr m_pIndentAtMF; + + VclPtr m_pStandardPB; + + VclPtr m_pPreviewWIN; SvxNumRule* pActNum; SvxNumRule* pSaveNum; diff --git a/cui/source/inc/optasian.hxx b/cui/source/inc/optasian.hxx index 5dc19787d471..5be6d8034a51 100644 --- a/cui/source/inc/optasian.hxx +++ b/cui/source/inc/optasian.hxx @@ -29,22 +29,22 @@ struct SvxAsianLayoutPage_Impl; class SvxAsianLayoutPage : public SfxTabPage { - RadioButton* m_pCharKerningRB; - RadioButton* m_pCharPunctKerningRB; + VclPtr m_pCharKerningRB; + VclPtr m_pCharPunctKerningRB; - RadioButton* m_pNoCompressionRB; - RadioButton* m_pPunctCompressionRB; - RadioButton* m_pPunctKanaCompressionRB; + VclPtr m_pNoCompressionRB; + VclPtr m_pPunctCompressionRB; + VclPtr m_pPunctKanaCompressionRB; - FixedText* m_pLanguageFT; - SvxLanguageBox* m_pLanguageLB; - CheckBox* m_pStandardCB; + VclPtr m_pLanguageFT; + VclPtr m_pLanguageLB; + VclPtr m_pStandardCB; - FixedText* m_pStartFT; - Edit* m_pStartED; - FixedText* m_pEndFT; - Edit* m_pEndED; - FixedText* m_pHintFT; + VclPtr m_pStartFT; + VclPtr m_pStartED; + VclPtr m_pEndFT; + VclPtr m_pEndED; + VclPtr m_pHintFT; SvxAsianLayoutPage_Impl* pImpl; diff --git a/cui/source/inc/optdict.hxx b/cui/source/inc/optdict.hxx index 9ed48ed6f1f8..3bdffc3f0edd 100644 --- a/cui/source/inc/optdict.hxx +++ b/cui/source/inc/optdict.hxx @@ -50,10 +50,10 @@ namespace linguistic2{ class SvxNewDictionaryDialog : public ModalDialog { private: - Edit* pNameEdit; - SvxLanguageBox* pLanguageLB; - CheckBox* pExceptBtn; - OKButton* pOKBtn; + VclPtr pNameEdit; + VclPtr pLanguageLB; + VclPtr pExceptBtn; + VclPtr pOKBtn; ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XSpellChecker1 > xSpell; ::com::sun::star::uno::Reference< @@ -66,6 +66,8 @@ public: SvxNewDictionaryDialog( vcl::Window* pParent, ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XSpellChecker1 > &xSpl ); + virtual ~SvxNewDictionaryDialog(); + virtual void dispose() SAL_OVERRIDE; ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XDictionary > @@ -100,16 +102,16 @@ class SvxEditDictionaryDialog : public ModalDialog { private: - ListBox* pAllDictsLB; - FixedText* pLangFT; - SvxLanguageBox* pLangLB; + VclPtr pAllDictsLB; + VclPtr pLangFT; + VclPtr pLangLB; - SvxDictEdit* pWordED; - FixedText* pReplaceFT; - SvxDictEdit* pReplaceED; - SvTabListBox* pWordsLB; - PushButton* pNewReplacePB; - PushButton* pDeletePB; + VclPtr pWordED; + VclPtr pReplaceFT; + VclPtr pReplaceED; + VclPtr pWordsLB; + VclPtr pNewReplacePB; + VclPtr pDeletePB; OUString sModify; OUString sNew; @@ -152,6 +154,8 @@ public: const OUString& rName, ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XSpellChecker1> &xSpl ); + virtual ~SvxEditDictionaryDialog(); + virtual void dispose() SAL_OVERRIDE; sal_uInt16 GetSelectedDict() {return pAllDictsLB->GetSelectEntryPos();} }; diff --git a/cui/source/inc/optlingu.hxx b/cui/source/inc/optlingu.hxx index cb49363bafe6..0dea8bc01149 100644 --- a/cui/source/inc/optlingu.hxx +++ b/cui/source/inc/optlingu.hxx @@ -52,15 +52,15 @@ class SvxLinguData_Impl; class SvxEditModulesDlg : public ModalDialog { - SvxLanguageBox* m_pLanguageLB; + VclPtr m_pLanguageLB; - SvxCheckListBox* m_pModulesCLB; - PushButton* m_pPrioUpPB; - PushButton* m_pPrioDownPB; - PushButton* m_pBackPB; - FixedHyperlink* m_pMoreDictsLink; + VclPtr m_pModulesCLB; + VclPtr m_pPrioUpPB; + VclPtr m_pPrioDownPB; + VclPtr m_pBackPB; + VclPtr m_pMoreDictsLink; - CloseButton* m_pClosePB; + VclPtr m_pClosePB; OUString sSpell; OUString sHyph; @@ -94,17 +94,17 @@ public: class SvxLinguTabPage : public SfxTabPage { private: - FixedText* m_pLinguModulesFT; - SvxCheckListBox* m_pLinguModulesCLB; - PushButton* m_pLinguModulesEditPB; - FixedText* m_pLinguDicsFT; - SvxCheckListBox* m_pLinguDicsCLB; - PushButton* m_pLinguDicsNewPB; - PushButton* m_pLinguDicsEditPB; - PushButton* m_pLinguDicsDelPB; - SvxCheckListBox* m_pLinguOptionsCLB; - PushButton* m_pLinguOptionsEditPB; - FixedHyperlink* m_pMoreDictsLink; + VclPtr m_pLinguModulesFT; + VclPtr m_pLinguModulesCLB; + VclPtr m_pLinguModulesEditPB; + VclPtr m_pLinguDicsFT; + VclPtr m_pLinguDicsCLB; + VclPtr m_pLinguDicsNewPB; + VclPtr m_pLinguDicsEditPB; + VclPtr m_pLinguDicsDelPB; + VclPtr m_pLinguOptionsCLB; + VclPtr m_pLinguOptionsEditPB; + VclPtr m_pMoreDictsLink; OUString sCapitalWords; OUString sWordsWithDigits; diff --git a/cui/source/inc/optpath.hxx b/cui/source/inc/optpath.hxx index 89cf4857371a..3e0ff7e7dc71 100644 --- a/cui/source/inc/optpath.hxx +++ b/cui/source/inc/optpath.hxx @@ -42,11 +42,11 @@ class SvxPathTabPage; class SvxPathTabPage : public SfxTabPage { private: - SvSimpleTableContainer* m_pPathCtrl; - PushButton* m_pStandardBtn; - PushButton* m_pPathBtn; + VclPtr m_pPathCtrl; + VclPtr m_pStandardBtn; + VclPtr m_pPathBtn; - ::svx::OptHeaderTabListBox* pPathBox; + VclPtr<::svx::OptHeaderTabListBox> pPathBox; OptPath_Impl* pImpl; ::com::sun::star::uno::Reference< ::svt::DialogClosedListener > xDialogListener; diff --git a/cui/source/inc/page.hxx b/cui/source/inc/page.hxx index fae515c87d41..f34239c850f2 100644 --- a/cui/source/inc/page.hxx +++ b/cui/source/inc/page.hxx @@ -75,53 +75,53 @@ class SvxPageDescPage : public SfxTabPage static const sal_uInt16 pRanges[]; private: // paper format - ListBox* m_pPaperSizeBox; + VclPtr m_pPaperSizeBox; - MetricField* m_pPaperWidthEdit; - MetricField* m_pPaperHeightEdit; + VclPtr m_pPaperWidthEdit; + VclPtr m_pPaperHeightEdit; - FixedText* m_pOrientationFT; - RadioButton* m_pPortraitBtn; - RadioButton* m_pLandscapeBtn; + VclPtr m_pOrientationFT; + VclPtr m_pPortraitBtn; + VclPtr m_pLandscapeBtn; - SvxPageWindow* m_pBspWin; + VclPtr m_pBspWin; - FixedText* m_pTextFlowLbl; - svx::FrameDirectionListBox* m_pTextFlowBox; + VclPtr m_pTextFlowLbl; + VclPtr m_pTextFlowBox; - ListBox* m_pPaperTrayBox; + VclPtr m_pPaperTrayBox; // Margins - FixedText* m_pLeftMarginLbl; - MetricField* m_pLeftMarginEdit; - FixedText* m_pRightMarginLbl; - MetricField* m_pRightMarginEdit; - MetricField* m_pTopMarginEdit; - MetricField* m_pBottomMarginEdit; + VclPtr m_pLeftMarginLbl; + VclPtr m_pLeftMarginEdit; + VclPtr m_pRightMarginLbl; + VclPtr m_pRightMarginEdit; + VclPtr m_pTopMarginEdit; + VclPtr m_pBottomMarginEdit; // layout settings - FixedText* m_pPageText; - ListBox* m_pLayoutBox; - ListBox* m_pNumberFormatBox; + VclPtr m_pPageText; + VclPtr m_pLayoutBox; + VclPtr m_pNumberFormatBox; //Extras Calc - FixedText* m_pTblAlignFT; - CheckBox* m_pHorzBox; - CheckBox* m_pVertBox; + VclPtr m_pTblAlignFT; + VclPtr m_pHorzBox; + VclPtr m_pVertBox; // Impress and Draw - CheckBox* m_pAdaptBox; + VclPtr m_pAdaptBox; //Register Writer - CheckBox* m_pRegisterCB; - FixedText* m_pRegisterFT; - ListBox* m_pRegisterLB; + VclPtr m_pRegisterCB; + VclPtr m_pRegisterFT; + VclPtr m_pRegisterLB; OUString sStandardRegister; - FixedText* m_pInsideLbl; - FixedText* m_pOutsideLbl; - FixedText* m_pPrintRangeQueryText; + VclPtr m_pInsideLbl; + VclPtr m_pOutsideLbl; + VclPtr m_pPrintRangeQueryText; long nFirstLeftMargin; long nFirstRightMargin; diff --git a/cui/source/inc/paragrph.hxx b/cui/source/inc/paragrph.hxx index 26a9bc78d9cf..401158ead1da 100644 --- a/cui/source/inc/paragrph.hxx +++ b/cui/source/inc/paragrph.hxx @@ -52,32 +52,32 @@ private: SvxStdParagraphTabPage( vcl::Window* pParent, const SfxItemSet& rSet ); // indention - SvxRelativeField* m_pLeftIndent; + VclPtr m_pLeftIndent; - FixedText* m_pRightLabel; - SvxRelativeField* m_pRightIndent; + VclPtr m_pRightLabel; + VclPtr m_pRightIndent; - FixedText* m_pFLineLabel; - SvxRelativeField* m_pFLineIndent; - CheckBox* m_pAutoCB; + VclPtr m_pFLineLabel; + VclPtr m_pFLineIndent; + VclPtr m_pAutoCB; // distance - SvxRelativeField* m_pTopDist; - SvxRelativeField* m_pBottomDist; - CheckBox* m_pContextualCB; + VclPtr m_pTopDist; + VclPtr m_pBottomDist; + VclPtr m_pContextualCB; // line spacing - ListBox* m_pLineDist; - FixedText* m_pLineDistAtLabel; - MetricField* m_pLineDistAtPercentBox; - MetricField* m_pLineDistAtMetricBox; - FixedText* m_pAbsDist; + VclPtr m_pLineDist; + VclPtr m_pLineDistAtLabel; + VclPtr m_pLineDistAtPercentBox; + VclPtr m_pLineDistAtMetricBox; + VclPtr m_pAbsDist; OUString sAbsDist; - SvxParaPrevWindow* m_pExampleWin; + VclPtr m_pExampleWin; // only writer - VclFrame* m_pRegisterFL; - CheckBox* m_pRegisterCB; + VclPtr m_pRegisterFL; + VclPtr m_pRegisterCB; long nAbst; long nWidth; @@ -98,6 +98,9 @@ protected: public: + virtual ~SvxStdParagraphTabPage(); + virtual void dispose() SAL_OVERRIDE; + DECL_LINK(ELRLoseFocusHdl, void *); static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rSet ); @@ -125,27 +128,27 @@ class SvxParaAlignTabPage : public SfxTabPage static const sal_uInt16 pAlignRanges[]; // alignment - RadioButton* m_pLeft; - RadioButton* m_pRight; - RadioButton* m_pCenter; - RadioButton* m_pJustify; - FixedText* m_pLeftBottom; - FixedText* m_pRightTop; + VclPtr m_pLeft; + VclPtr m_pRight; + VclPtr m_pCenter; + VclPtr m_pJustify; + VclPtr m_pLeftBottom; + VclPtr m_pRightTop; - FixedText* m_pLastLineFT; - ListBox* m_pLastLineLB; - CheckBox* m_pExpandCB; + VclPtr m_pLastLineFT; + VclPtr m_pLastLineLB; + VclPtr m_pExpandCB; - CheckBox* m_pSnapToGridCB; + VclPtr m_pSnapToGridCB; //preview - SvxParaPrevWindow* m_pExampleWin; + VclPtr m_pExampleWin; //vertical alignment - VclFrame* m_pVertAlignFL; - ListBox* m_pVertAlignLB; + VclPtr m_pVertAlignFL; + VclPtr m_pVertAlignLB; - VclFrame* m_pPropertiesFL; - svx::FrameDirectionListBox* m_pTextDirectionLB; + VclPtr m_pPropertiesFL; + VclPtr m_pTextDirectionLB; DECL_LINK(AlignHdl_Impl, void *); DECL_LINK(LastLineHdl_Impl, void *); @@ -159,6 +162,9 @@ protected: virtual int DeactivatePage( SfxItemSet* pSet = 0 ) SAL_OVERRIDE; public: + virtual ~SvxParaAlignTabPage(); + virtual void dispose() SAL_OVERRIDE; + static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rSet ); static const sal_uInt16* GetRanges() { return pAlignRanges; } @@ -189,6 +195,9 @@ class SvxExtParagraphTabPage: public SfxTabPage static const sal_uInt16 pExtRanges[]; public: + virtual ~SvxExtParagraphTabPage(); + virtual void dispose() SAL_OVERRIDE; + static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rSet ); static const sal_uInt16* GetRanges() { return pExtRanges; } @@ -205,37 +214,37 @@ private: SvxExtParagraphTabPage( vcl::Window* pParent, const SfxItemSet& rSet ); // hyphenation - TriStateBox* m_pHyphenBox; - FixedText* m_pBeforeText; - NumericField* m_pExtHyphenBeforeBox; - FixedText* m_pAfterText; - NumericField* m_pExtHyphenAfterBox; - FixedText* m_pMaxHyphenLabel; - NumericField* m_pMaxHyphenEdit; + VclPtr m_pHyphenBox; + VclPtr m_pBeforeText; + VclPtr m_pExtHyphenBeforeBox; + VclPtr m_pAfterText; + VclPtr m_pExtHyphenAfterBox; + VclPtr m_pMaxHyphenLabel; + VclPtr m_pMaxHyphenEdit; // pagebreak - TriStateBox* m_pPageBreakBox; - FixedText* m_pBreakTypeFT; - ListBox* m_pBreakTypeLB; - FixedText* m_pBreakPositionFT; - ListBox* m_pBreakPositionLB; - TriStateBox* m_pApplyCollBtn; - ListBox* m_pApplyCollBox; - FixedText* m_pPagenumText; - NumericField* m_pPagenumEdit; + VclPtr m_pPageBreakBox; + VclPtr m_pBreakTypeFT; + VclPtr m_pBreakTypeLB; + VclPtr m_pBreakPositionFT; + VclPtr m_pBreakPositionLB; + VclPtr m_pApplyCollBtn; + VclPtr m_pApplyCollBox; + VclPtr m_pPagenumText; + VclPtr m_pPagenumEdit; // paragraph division - TriStateBox* m_pKeepTogetherBox; - TriStateBox* m_pKeepParaBox; + VclPtr m_pKeepTogetherBox; + VclPtr m_pKeepParaBox; // orphan/widow - TriStateBox* m_pOrphanBox; - NumericField* m_pOrphanRowNo; - FixedText* m_pOrphanRowLabel; + VclPtr m_pOrphanBox; + VclPtr m_pOrphanRowNo; + VclPtr m_pOrphanRowLabel; - TriStateBox* m_pWidowBox; - NumericField* m_pWidowRowNo; - FixedText* m_pWidowRowLabel; + VclPtr m_pWidowBox; + VclPtr m_pWidowRowNo; + VclPtr m_pWidowRowLabel; bool bPageBreak; bool bHtmlMode; @@ -257,15 +266,18 @@ private: class SvxAsianTabPage : public SfxTabPage { - CheckBox* m_pForbiddenRulesCB; - CheckBox* m_pHangingPunctCB; - CheckBox* m_pScriptSpaceCB; + VclPtr m_pForbiddenRulesCB; + VclPtr m_pHangingPunctCB; + VclPtr m_pScriptSpaceCB; SvxAsianTabPage( vcl::Window* pParent, const SfxItemSet& rSet ); DECL_LINK( ClickHdl_Impl, CheckBox* ); public: + virtual ~SvxAsianTabPage(); + virtual void dispose() SAL_OVERRIDE; + static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rSet ); static const sal_uInt16* GetRanges(); diff --git a/cui/source/inc/pastedlg.hxx b/cui/source/inc/pastedlg.hxx index a4ac2415f9f5..ef4779dddd72 100644 --- a/cui/source/inc/pastedlg.hxx +++ b/cui/source/inc/pastedlg.hxx @@ -39,10 +39,10 @@ class TransferableDataHelper; class SvPasteObjectDialog : public ModalDialog { - FixedText* m_pFtObjectSource; - ListBox* m_pLbInsertList; - OKButton* m_pOKButton; - ::std::map< SotClipboardFormatId, OUString > aSupplementMap; + VclPtr m_pFtObjectSource; + VclPtr m_pLbInsertList; + VclPtr m_pOKButton; + ::std::map< SotFormatStringId, OUString > aSupplementMap; SvGlobalName aObjClassName; OUString aObjName; @@ -55,6 +55,8 @@ class SvPasteObjectDialog : public ModalDialog public: SvPasteObjectDialog( vcl::Window* pParent ); + virtual ~SvPasteObjectDialog(); + virtual void dispose() SAL_OVERRIDE; void Insert( SotClipboardFormatId nFormat, const OUString & rFormatName ); void SetObjName( const SvGlobalName & rClass, const OUString & rObjName ); diff --git a/cui/source/inc/postdlg.hxx b/cui/source/inc/postdlg.hxx index fa3124359e7c..170e00692379 100644 --- a/cui/source/inc/postdlg.hxx +++ b/cui/source/inc/postdlg.hxx @@ -88,17 +88,17 @@ public: } private: - FixedText* m_pLastEditFT; + VclPtr m_pLastEditFT; - VclMultiLineEdit* m_pEditED; + VclPtr m_pEditED; - VclContainer* m_pInsertAuthor; - PushButton* m_pAuthorBtn; + VclPtr m_pInsertAuthor; + VclPtr m_pAuthorBtn; - OKButton* m_pOKBtn; + VclPtr m_pOKBtn; - PushButton* m_pPrevBtn; - PushButton* m_pNextBtn; + VclPtr m_pPrevBtn; + VclPtr m_pNextBtn; const SfxItemSet& rSet; SfxItemSet* pOutSet; diff --git a/cui/source/inc/scriptdlg.hxx b/cui/source/inc/scriptdlg.hxx index 0936ff2faabe..d3847dc6de62 100644 --- a/cui/source/inc/scriptdlg.hxx +++ b/cui/source/inc/scriptdlg.hxx @@ -95,9 +95,11 @@ public: class CuiInputDialog : public ModalDialog { private: - Edit* m_pEdit; + VclPtr m_pEdit; public: CuiInputDialog(vcl::Window * pParent, sal_uInt16 nMode); + virtual ~CuiInputDialog(); + virtual void dispose() SAL_OVERRIDE; OUString GetObjectName() const { return m_pEdit->GetText(); } void SetObjectName(const OUString& rName) @@ -132,14 +134,14 @@ public: class SvxScriptOrgDialog : public SfxModalDialog { protected: - SFTreeListBox* m_pScriptsBox; - - PushButton* m_pRunButton; - CloseButton* m_pCloseButton; - PushButton* m_pCreateButton; - PushButton* m_pEditButton; - PushButton* m_pRenameButton; - PushButton* m_pDelButton; + VclPtr m_pScriptsBox; + + VclPtr m_pRunButton; + VclPtr m_pCloseButton; + VclPtr m_pCreateButton; + VclPtr m_pEditButton; + VclPtr m_pRenameButton; + VclPtr m_pDelButton; OUString m_sLanguage; static Selection_hash m_lastSelection; diff --git a/cui/source/inc/selector.hxx b/cui/source/inc/selector.hxx index de029f891868..c1ac1e3f6b62 100644 --- a/cui/source/inc/selector.hxx +++ b/cui/source/inc/selector.hxx @@ -123,7 +123,7 @@ class SvxConfigGroupListBox : public SvTreeListBox SvxGroupInfoArr_Impl aArr; bool m_bShowSlots; - SvxConfigFunctionListBox* pFunctionListBox; + VclPtr pFunctionListBox; ImageProvider* m_pImageProvider; ::com::sun::star::uno::Reference @@ -181,12 +181,12 @@ public: class SvxScriptSelectorDialog : public ModelessDialog { - FixedText* m_pDialogDescription; - SvxConfigGroupListBox* m_pCategories; - SvxConfigFunctionListBox* m_pCommands; - PushButton* m_pOKButton; - PushButton* m_pCancelButton; - VclMultiLineEdit* m_pDescriptionText; + VclPtr m_pDialogDescription; + VclPtr m_pCategories; + VclPtr m_pCommands; + VclPtr m_pOKButton; + VclPtr m_pCancelButton; + VclPtr m_pDescriptionText; OUString m_sDefaultDesc; bool m_bShowSlots; Link m_aAddHdl; @@ -205,6 +205,8 @@ public: const ::com::sun::star::uno::Reference < ::com::sun::star::frame::XFrame >& xFrame = 0 ); + virtual ~SvxScriptSelectorDialog(); + virtual void dispose() SAL_OVERRIDE; void SetAddHdl( const Link& rLink ) { m_aAddHdl = rLink; } const Link& GetAddHdl() const { return m_aAddHdl; } diff --git a/cui/source/inc/showcols.hxx b/cui/source/inc/showcols.hxx index dceddb7e3a00..d7494d72896b 100644 --- a/cui/source/inc/showcols.hxx +++ b/cui/source/inc/showcols.hxx @@ -35,13 +35,15 @@ class FmShowColsDialog : public ModalDialog { - ListBox* m_pList; - OKButton* m_pOK; + VclPtr m_pList; + VclPtr m_pOK; ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > m_xColumns; public: FmShowColsDialog(vcl::Window* pParent); + virtual ~FmShowColsDialog(); + virtual void dispose() SAL_OVERRIDE; void SetColumns(const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer>& xCols); diff --git a/cui/source/inc/splitcelldlg.hxx b/cui/source/inc/splitcelldlg.hxx index bc5fc701e449..e9142e24005f 100644 --- a/cui/source/inc/splitcelldlg.hxx +++ b/cui/source/inc/splitcelldlg.hxx @@ -28,10 +28,10 @@ class SvxSplitTableDlg : public SvxAbstractSplittTableDialog, public SvxStandardDialog { - NumericField* m_pCountEdit; - RadioButton* m_pHorzBox; - RadioButton* m_pVertBox; - CheckBox* m_pPropCB; + VclPtr m_pCountEdit; + VclPtr m_pHorzBox; + VclPtr m_pVertBox; + VclPtr m_pPropCB; long mnMaxVertical; long mnMaxHorizontal; @@ -40,6 +40,8 @@ protected: public: SvxSplitTableDlg(vcl::Window *pParent, bool bIsTableVertical, long nMaxVertical, long nMaxHorizontal ); + virtual ~SvxSplitTableDlg(); + virtual void dispose() SAL_OVERRIDE; DECL_LINK( ClickHdl, Button * ); diff --git a/cui/source/inc/srchxtra.hxx b/cui/source/inc/srchxtra.hxx index 705c4d2a96fc..f1c6aefde1a9 100644 --- a/cui/source/inc/srchxtra.hxx +++ b/cui/source/inc/srchxtra.hxx @@ -51,10 +51,12 @@ class SvxSearchAttributeDialog : public ModalDialog public: SvxSearchAttributeDialog( vcl::Window* pParent, SearchAttrItemList& rLst, const sal_uInt16* pWhRanges ); + virtual ~SvxSearchAttributeDialog(); + virtual void dispose() SAL_OVERRIDE; private: - SvxCheckListBox* m_pAttrLB; - OKButton* m_pOKBtn; + VclPtr m_pAttrLB; + VclPtr m_pOKBtn; SearchAttrItemList& rList; @@ -66,10 +68,10 @@ private: class SvxSearchSimilarityDialog : public ModalDialog { private: - NumericField* m_pOtherFld; - NumericField* m_pLongerFld; - NumericField* m_pShorterFld; - CheckBox* m_pRelaxBox; + VclPtr m_pOtherFld; + VclPtr m_pLongerFld; + VclPtr m_pShorterFld; + VclPtr m_pRelaxBox; public: SvxSearchSimilarityDialog( vcl::Window* pParent, @@ -77,6 +79,8 @@ public: sal_uInt16 nOther, sal_uInt16 nShorter, sal_uInt16 nLonger ); + virtual ~SvxSearchSimilarityDialog(); + virtual void dispose() SAL_OVERRIDE; sal_uInt16 GetOther() { return (sal_uInt16)m_pOtherFld->GetValue(); } sal_uInt16 GetShorter() { return (sal_uInt16)m_pShorterFld->GetValue(); } diff --git a/cui/source/inc/swpossizetabpage.hxx b/cui/source/inc/swpossizetabpage.hxx index 3c3d3e622f41..5ed3ad77df18 100644 --- a/cui/source/inc/swpossizetabpage.hxx +++ b/cui/source/inc/swpossizetabpage.hxx @@ -34,39 +34,39 @@ class SvxSwPosSizeTabPage : public SfxTabPage { using TabPage::DeactivatePage; - MetricField* m_pWidthMF; - MetricField* m_pHeightMF; - CheckBox* m_pKeepRatioCB; + VclPtr m_pWidthMF; + VclPtr m_pHeightMF; + VclPtr m_pKeepRatioCB; - RadioButton* m_pToPageRB; - RadioButton* m_pToParaRB; - RadioButton* m_pToCharRB; - RadioButton* m_pAsCharRB; - RadioButton* m_pToFrameRB; + VclPtr m_pToPageRB; + VclPtr m_pToParaRB; + VclPtr m_pToCharRB; + VclPtr m_pAsCharRB; + VclPtr m_pToFrameRB; - TriStateBox* m_pPositionCB; - TriStateBox* m_pSizeCB; + VclPtr m_pPositionCB; + VclPtr m_pSizeCB; - VclContainer* m_pPosFrame; - FixedText* m_pHoriFT; - ListBox* m_pHoriLB; - FixedText* m_pHoriByFT; - MetricField* m_pHoriByMF; - FixedText* m_pHoriToFT; - ListBox* m_pHoriToLB; + VclPtr m_pPosFrame; + VclPtr m_pHoriFT; + VclPtr m_pHoriLB; + VclPtr m_pHoriByFT; + VclPtr m_pHoriByMF; + VclPtr m_pHoriToFT; + VclPtr m_pHoriToLB; - CheckBox* m_pHoriMirrorCB; + VclPtr m_pHoriMirrorCB; - FixedText* m_pVertFT; - ListBox* m_pVertLB; - FixedText* m_pVertByFT; - MetricField* m_pVertByMF; - FixedText* m_pVertToFT; - ListBox* m_pVertToLB; + VclPtr m_pVertFT; + VclPtr m_pVertLB; + VclPtr m_pVertByFT; + VclPtr m_pVertByMF; + VclPtr m_pVertToFT; + VclPtr m_pVertToLB; - CheckBox* m_pFollowCB; + VclPtr m_pFollowCB; - SvxSwFrameExample* m_pExampleWN; + VclPtr m_pExampleWN; Link m_aValidateLink; @@ -123,6 +123,8 @@ class SvxSwPosSizeTabPage : public SfxTabPage public: SvxSwPosSizeTabPage( vcl::Window* pParent, const SfxItemSet& rInAttrs ); + virtual ~SvxSwPosSizeTabPage(); + virtual void dispose() SAL_OVERRIDE; static SfxTabPage* Create( vcl::Window*, const SfxItemSet* ); static const sal_uInt16* GetRanges(); diff --git a/cui/source/inc/tabstpge.hxx b/cui/source/inc/tabstpge.hxx index 2fd0d3aa8f18..4a67cd9cd008 100644 --- a/cui/source/inc/tabstpge.hxx +++ b/cui/source/inc/tabstpge.hxx @@ -49,6 +49,8 @@ class SvxTabulatorTabPage : public SfxTabPage static const sal_uInt16 pRanges[]; public: + virtual ~SvxTabulatorTabPage(); + virtual void dispose() SAL_OVERRIDE; static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rSet ); static const sal_uInt16* GetRanges() { return pRanges; } @@ -64,34 +66,34 @@ private: SvxTabulatorTabPage( vcl::Window* pParent, const SfxItemSet& rSet ); // tabulators and positions - MetricBox* m_pTabBox; + VclPtr m_pTabBox; // TabType - RadioButton* m_pLeftTab; - RadioButton* m_pRightTab; - RadioButton* m_pCenterTab; - RadioButton* m_pDezTab; - - TabWin_Impl* m_pLeftWin; - TabWin_Impl* m_pRightWin; - TabWin_Impl* m_pCenterWin; - TabWin_Impl* m_pDezWin; - - FixedText* m_pDezCharLabel; - Edit* m_pDezChar; - - RadioButton* m_pNoFillChar; - RadioButton* m_pFillPoints; - RadioButton* m_pFillDashLine ; - RadioButton* m_pFillSolidLine; - RadioButton* m_pFillSpecial; - Edit* m_pFillChar; - - PushButton* m_pNewBtn; - PushButton* m_pDelAllBtn; - PushButton* m_pDelBtn; - - VclContainer* m_pTypeFrame; - VclContainer* m_pFillFrame; + VclPtr m_pLeftTab; + VclPtr m_pRightTab; + VclPtr m_pCenterTab; + VclPtr m_pDezTab; + + VclPtr m_pLeftWin; + VclPtr m_pRightWin; + VclPtr m_pCenterWin; + VclPtr m_pDezWin; + + VclPtr m_pDezCharLabel; + VclPtr m_pDezChar; + + VclPtr m_pNoFillChar; + VclPtr m_pFillPoints; + VclPtr m_pFillDashLine ; + VclPtr m_pFillSolidLine; + VclPtr m_pFillSpecial; + VclPtr m_pFillChar; + + VclPtr m_pNewBtn; + VclPtr m_pDelAllBtn; + VclPtr m_pDelBtn; + + VclPtr m_pTypeFrame; + VclPtr m_pFillFrame; // local variables, internal functions SvxTabStop aAktTab; diff --git a/cui/source/inc/textanim.hxx b/cui/source/inc/textanim.hxx index 31a705d488b3..8ba2ad2ff956 100644 --- a/cui/source/inc/textanim.hxx +++ b/cui/source/inc/textanim.hxx @@ -37,27 +37,28 @@ class SdrView; class SvxTextAnimationPage : public SfxTabPage { private: - static const sal_uInt16 pRanges[]; - ListBox* m_pLbEffect; - VclBox* m_pBoxDirection; - PushButton* m_pBtnUp; - PushButton* m_pBtnLeft; - PushButton* m_pBtnRight; - PushButton* m_pBtnDown; + static const sal_uInt16 pRanges[]; - VclFrame* m_pFlProperties; - TriStateBox* m_pTsbStartInside; - TriStateBox* m_pTsbStopInside; + VclPtr m_pLbEffect; + VclPtr m_pBoxDirection; + VclPtr m_pBtnUp; + VclPtr m_pBtnLeft; + VclPtr m_pBtnRight; + VclPtr m_pBtnDown; - VclBox* m_pBoxCount; - TriStateBox* m_pTsbEndless; - NumericField* m_pNumFldCount; + VclPtr m_pFlProperties; + VclPtr m_pTsbStartInside; + VclPtr m_pTsbStopInside; - TriStateBox* m_pTsbPixel; - MetricField* m_pMtrFldAmount; + VclPtr m_pBoxCount; + VclPtr m_pTsbEndless; + VclPtr m_pNumFldCount; - TriStateBox* m_pTsbAuto; - MetricField* m_pMtrFldDelay; + VclPtr m_pTsbPixel; + VclPtr m_pMtrFldAmount; + + VclPtr m_pTsbAuto; + VclPtr m_pMtrFldDelay; const SfxItemSet& rOutAttrs; SdrTextAniKind eAniKind; @@ -75,6 +76,8 @@ private: public: SvxTextAnimationPage( vcl::Window* pWindow, const SfxItemSet& rInAttrs ); + virtual ~SvxTextAnimationPage(); + virtual void dispose() SAL_OVERRIDE; static SfxTabPage* Create( vcl::Window*, const SfxItemSet* ); static const sal_uInt16* GetRanges() { return pRanges; } diff --git a/cui/source/inc/textattr.hxx b/cui/source/inc/textattr.hxx index 439eb82ba2d3..eacc8265d4ab 100644 --- a/cui/source/inc/textattr.hxx +++ b/cui/source/inc/textattr.hxx @@ -38,22 +38,23 @@ class SvxTextAttrPage : public SvxTabPage { private: static const sal_uInt16 pRanges[]; - TriStateBox* m_pTsbAutoGrowWidth; - TriStateBox* m_pTsbAutoGrowHeight; - TriStateBox* m_pTsbFitToSize; - TriStateBox* m_pTsbContour; - TriStateBox* m_pTsbWordWrapText; - TriStateBox* m_pTsbAutoGrowSize; - - VclFrame* m_pFlDistance; - MetricField* m_pMtrFldLeft; - MetricField* m_pMtrFldRight; - MetricField* m_pMtrFldTop; - MetricField* m_pMtrFldBottom; - - VclFrame* m_pFlPosition; - SvxRectCtl* m_pCtlPosition; - TriStateBox* m_pTsbFullWidth; + + VclPtr m_pTsbAutoGrowWidth; + VclPtr m_pTsbAutoGrowHeight; + VclPtr m_pTsbFitToSize; + VclPtr m_pTsbContour; + VclPtr m_pTsbWordWrapText; + VclPtr m_pTsbAutoGrowSize; + + VclPtr m_pFlDistance; + VclPtr m_pMtrFldLeft; + VclPtr m_pMtrFldRight; + VclPtr m_pMtrFldTop; + VclPtr m_pMtrFldBottom; + + VclPtr m_pFlPosition; + VclPtr m_pCtlPosition; + VclPtr m_pTsbFullWidth; const SfxItemSet& rOutAttrs; const SdrView* pView; @@ -76,6 +77,8 @@ private: public: SvxTextAttrPage( vcl::Window* pWindow, const SfxItemSet& rInAttrs ); + virtual ~SvxTextAttrPage(); + virtual void dispose() SAL_OVERRIDE; static SfxTabPage* Create( vcl::Window*, const SfxItemSet* ); static const sal_uInt16* GetRanges() { return pRanges; } diff --git a/cui/source/inc/thesdlg.hxx b/cui/source/inc/thesdlg.hxx index 9b035f14d03f..661788124c3f 100644 --- a/cui/source/inc/thesdlg.hxx +++ b/cui/source/inc/thesdlg.hxx @@ -35,13 +35,15 @@ class SvxThesaurusDialog; class LookUpComboBox : public ComboBox { Idle m_aModifyIdle; - SvxThesaurusDialog* m_pDialog; + VclPtr m_pDialog; LookUpComboBox( const LookUpComboBox & ) SAL_DELETED_FUNCTION; LookUpComboBox& operator = ( const LookUpComboBox & ) SAL_DELETED_FUNCTION; public: LookUpComboBox(vcl::Window *pParent); + virtual ~LookUpComboBox(); + virtual void dispose() SAL_OVERRIDE; DECL_LINK( ModifyTimer_Hdl, Timer * ); @@ -71,7 +73,7 @@ public: class ThesaurusAlternativesCtrl : public SvxCheckListBox { - SvxThesaurusDialog* m_pDialog; + VclPtr m_pDialog; typedef std::map< const SvTreeListEntry *, AlternativesExtraData > UserDataMap_t; UserDataMap_t m_aUserData; @@ -98,13 +100,15 @@ public: class ReplaceEdit : public Edit { - Button * m_pBtn; + VclPtr