diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2015-04-28 11:41:31 +0100 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2015-04-28 15:08:48 +0100 |
commit | e8b97a52c96df9c8e8055407b1e40ed7cb9cfc67 (patch) | |
tree | b322529f4a54a6427862cb20cb4cf87fb6a5d065 /basic | |
parent | 2b0be6c0e9d23f1b8535ba7033732ae2e3bfb5c9 (diff) | |
parent | 0cde74f788a054fa2b65107a030dd463b8d11c7a (diff) |
Merge remote-tracking branch 'origin/feature/vclptr'
Resolve several thousand lines of conflicts.
Conflicts:
accessibility/source/extended/accessiblelistbox.cxx
accessibility/source/standard/vclxaccessiblecombobox.cxx
accessibility/source/standard/vclxaccessibledropdowncombobox.cxx
accessibility/source/standard/vclxaccessibledropdownlistbox.cxx
accessibility/source/standard/vclxaccessiblelistbox.cxx
accessibility/source/standard/vclxaccessibletextfield.cxx
basctl/source/basicide/basidesh.cxx
cui/source/inc/chardlg.hxx
cui/source/tabpages/tpbitmap.cxx
dbaccess/source/ui/dlg/UserAdmin.cxx
dbaccess/source/ui/querydesign/ConnectionLineAccess.cxx
extensions/source/propctrlr/propertyeditor.hxx
extensions/source/scanner/sanedlg.cxx
filter/source/pdf/impdialog.cxx
include/sfx2/mgetempl.hxx
include/sfx2/sidebar/SidebarToolBox.hxx
include/sfx2/viewsh.hxx
include/svtools/brwbox.hxx
include/svtools/filectrl.hxx
include/svtools/scrwin.hxx
include/svx/dlgctrl.hxx
include/svx/sidebar/Popup.hxx
include/svx/sidebar/PopupContainer.hxx
include/svx/sidebar/PopupControl.hxx
include/svx/sidebar/SidebarDialControl.hxx
include/svx/sidebar/ValueSetWithTextControl.hxx
sc/source/ui/condformat/condformatdlgentry.cxx
sc/source/ui/navipi/navipi.cxx
sc/source/ui/sidebar/CellBorderStyleControl.hxx
sd/source/ui/animations/CustomAnimationDialog.cxx
sd/source/ui/inc/DrawViewShell.hxx
sd/source/ui/inc/Ruler.hxx
sd/source/ui/inc/SlideSorter.hxx
sd/source/ui/inc/ViewTabBar.hxx
sd/source/ui/inc/Window.hxx
sd/source/ui/inc/morphdlg.hxx
sd/source/ui/inc/sdpreslt.hxx
sd/source/ui/sidebar/CurrentMasterPagesSelector.hxx
sd/source/ui/sidebar/LayoutMenu.hxx
sd/source/ui/sidebar/MasterPagesSelector.hxx
sd/source/ui/sidebar/NavigatorWrapper.hxx
sd/source/ui/sidebar/PanelBase.hxx
sd/source/ui/sidebar/RecentMasterPagesSelector.cxx
sd/source/ui/sidebar/RecentMasterPagesSelector.hxx
sd/source/ui/slideshow/showwindow.hxx
sd/source/ui/slidesorter/view/SlsInsertAnimator.cxx
sd/source/ui/slidesorter/view/SlsLayeredDevice.hxx
sd/source/ui/view/ViewShellBase.cxx
sd/source/ui/view/drviewsa.cxx
sfx2/source/appl/fileobj.hxx
sfx2/source/appl/opengrf.cxx
sfx2/source/control/thumbnailviewacc.hxx
sfx2/source/dialog/securitypage.cxx
sfx2/source/dialog/templdlg.cxx
sfx2/source/doc/docinsert.cxx
sfx2/source/doc/guisaveas.cxx
sfx2/source/inc/alienwarn.hxx
sfx2/source/sidebar/Deck.cxx
sfx2/source/sidebar/Deck.hxx
sfx2/source/sidebar/DeckTitleBar.cxx
sfx2/source/sidebar/DeckTitleBar.hxx
sfx2/source/sidebar/MenuButton.cxx
sfx2/source/sidebar/MenuButton.hxx
sfx2/source/sidebar/Panel.cxx
sfx2/source/sidebar/Panel.hxx
sfx2/source/sidebar/PanelTitleBar.hxx
sfx2/source/sidebar/SidebarDockingWindow.hxx
sfx2/source/sidebar/SidebarToolBox.cxx
sfx2/source/sidebar/TabBar.hxx
sfx2/source/sidebar/TabItem.cxx
sfx2/source/sidebar/TabItem.hxx
sfx2/source/sidebar/TitleBar.hxx
sfx2/source/toolbox/imgmgr.cxx
starmath/inc/edit.hxx
starmath/inc/smmod.hxx
starmath/qa/cppunit/test_starmath.cxx
starmath/source/edit.cxx
starmath/source/smmod.cxx
svtools/source/brwbox/brwbox1.cxx
svtools/source/brwbox/datwin.hxx
svtools/source/contnr/fileview.cxx
svtools/source/contnr/simptabl.cxx
svtools/source/control/filectrl.cxx
svtools/source/control/valueimp.hxx
svx/inc/GalleryControl.hxx
svx/source/dialog/dlgctrl.cxx
svx/source/dialog/swframeexample.cxx
svx/source/fmcomp/fmgridif.cxx
svx/source/gallery2/GalleryControl.cxx
svx/source/sidebar/EmptyPanel.hxx
svx/source/sidebar/area/AreaPropertyPanel.hxx
svx/source/sidebar/area/AreaTransparencyGradientControl.hxx
svx/source/sidebar/graphic/GraphicPropertyPanel.hxx
svx/source/sidebar/insert/InsertPropertyPanel.cxx
svx/source/sidebar/insert/InsertPropertyPanel.hxx
svx/source/sidebar/line/LinePropertyPanel.hxx
svx/source/sidebar/line/LineWidthControl.cxx
svx/source/sidebar/line/LineWidthControl.hxx
svx/source/sidebar/line/LineWidthValueSet.hxx
svx/source/sidebar/paragraph/ParaPropertyPanel.hxx
svx/source/sidebar/possize/SidebarDialControl.cxx
svx/source/sidebar/text/TextCharacterSpacingPopup.hxx
svx/source/sidebar/text/TextPropertyPanel.hxx
svx/source/sidebar/tools/PopupContainer.cxx
svx/source/sidebar/tools/PopupControl.cxx
svx/source/sidebar/tools/ValueSetWithTextControl.cxx
svx/source/svdraw/svdfmtf.hxx
svx/source/svdraw/svdibrow.cxx
svx/source/tbxctrls/colrctrl.cxx
svx/source/tbxctrls/tbcontrl.cxx
sw/source/ui/dbui/mmaddressblockpage.cxx
sw/source/ui/dialog/uiregionsw.cxx
sw/source/ui/index/cnttab.cxx
sw/source/uibase/inc/drpcps.hxx
sw/source/uibase/sidebar/PageColumnControl.hxx
sw/source/uibase/sidebar/PageMarginControl.hxx
sw/source/uibase/sidebar/PageOrientationControl.hxx
sw/source/uibase/sidebar/PagePropertyPanel.hxx
sw/source/uibase/sidebar/PageSizeControl.hxx
sw/source/uibase/uiview/view2.cxx
sw/source/uibase/utlui/navipi.cxx
vcl/inc/svdata.hxx
vcl/source/control/combobox.cxx
vcl/source/control/lstbox.cxx
vcl/source/window/dockwin.cxx
vcl/source/window/winproc.cxx
Change-Id: I056cf3026ff17d65cca0b6e6588bda4a88fa8d95
Diffstat (limited to 'basic')
-rw-r--r-- | basic/source/runtime/inputbox.cxx | 65 | ||||
-rw-r--r-- | basic/source/runtime/iosys.cxx | 44 | ||||
-rw-r--r-- | basic/source/runtime/methods.cxx | 12 |
3 files changed, 71 insertions, 50 deletions
diff --git a/basic/source/runtime/inputbox.cxx b/basic/source/runtime/inputbox.cxx index c15127d45146..97208770c0a1 100644 --- a/basic/source/runtime/inputbox.cxx +++ b/basic/source/runtime/inputbox.cxx @@ -30,10 +30,10 @@ class SvRTLInputBox : public ModalDialog { - Edit aEdit; - OKButton aOk; - CancelButton aCancel; - FixedText aPromptText; + VclPtr<Edit> aEdit; + VclPtr<OKButton> aOk; + VclPtr<CancelButton> aCancel; + VclPtr<FixedText> aPromptText; OUString aText; void PositionDialog( long nXTwips, long nYTwips, const Size& rDlgSize ); @@ -46,6 +46,8 @@ class SvRTLInputBox : public ModalDialog public: SvRTLInputBox( vcl::Window* pParent, const OUString& rPrompt, const OUString& rTitle, const OUString& rDefault, long nXTwips = -1, long nYTwips = -1 ); + virtual ~SvRTLInputBox() { disposeOnce(); } + virtual void dispose() SAL_OVERRIDE; OUString GetText() const SAL_OVERRIDE { return aText; } }; @@ -53,8 +55,8 @@ SvRTLInputBox::SvRTLInputBox( vcl::Window* pParent, const OUString& rPrompt, const OUString& rTitle, const OUString& rDefault, long nXTwips, long nYTwips ) : ModalDialog( pParent,WB_3DLOOK | WB_MOVEABLE | WB_CLOSEABLE ), - aEdit( this, WB_LEFT | WB_BORDER ), - aOk( this ), aCancel( this ), aPromptText( this, WB_WORDBREAK ) + aEdit( VclPtr<Edit>::Create(this, WB_LEFT | WB_BORDER) ), + aOk( new OKButton(this) ), aCancel( new CancelButton(this) ), aPromptText( VclPtr<FixedText>::Create(this, WB_WORDBREAK) ) { SetMapMode( MapMode( MAP_APPFONT ) ); Size aDlgSizeApp( 280, 80 ); @@ -62,29 +64,38 @@ SvRTLInputBox::SvRTLInputBox( vcl::Window* pParent, const OUString& rPrompt, InitButtons( aDlgSizeApp ); PositionEdit( aDlgSizeApp ); PositionPrompt( rPrompt, aDlgSizeApp ); - aOk.Show(); - aCancel.Show(); - aEdit.Show(); - aPromptText.Show(); + aOk->Show(); + aCancel->Show(); + aEdit->Show(); + aPromptText->Show(); SetText( rTitle ); vcl::Font aFont( GetFont()); Color aColor( GetBackground().GetColor() ); aFont.SetFillColor( aColor ); - aEdit.SetFont( aFont ); - aEdit.SetText( rDefault ); - aEdit.SetSelection( Selection( SELECTION_MIN, SELECTION_MAX ) ); + aEdit->SetFont( aFont ); + aEdit->SetText( rDefault ); + aEdit->SetSelection( Selection( SELECTION_MIN, SELECTION_MAX ) ); +} + +void SvRTLInputBox::dispose() +{ + aEdit.disposeAndClear(); + aOk.disposeAndClear(); + aCancel.disposeAndClear(); + aPromptText.disposeAndClear(); + ModalDialog::dispose(); } void SvRTLInputBox::InitButtons( const Size& rDlgSize ) { - aOk.SetSizePixel( LogicToPixel( Size( 45, 15) )); - aCancel.SetSizePixel( LogicToPixel( Size( 45, 15) )); + aOk->SetSizePixel( LogicToPixel( Size( 45, 15) )); + aCancel->SetSizePixel( LogicToPixel( Size( 45, 15) )); Point aPos( rDlgSize.Width()-45-10, 5 ); - aOk.SetPosPixel( LogicToPixel( Point(aPos) )); + aOk->SetPosPixel( LogicToPixel( Point(aPos) )); aPos.Y() += 16; - aCancel.SetPosPixel( LogicToPixel( Point(aPos) )); - aOk.SetClickHdl(LINK(this,SvRTLInputBox, OkHdl)); - aCancel.SetClickHdl(LINK(this,SvRTLInputBox,CancelHdl)); + aCancel->SetPosPixel( LogicToPixel( Point(aPos) )); + aOk->SetClickHdl(LINK(this,SvRTLInputBox, OkHdl)); + aCancel->SetClickHdl(LINK(this,SvRTLInputBox,CancelHdl)); } void SvRTLInputBox::PositionDialog(long nXTwips, long nYTwips, const Size& rDlgSize) @@ -99,8 +110,8 @@ void SvRTLInputBox::PositionDialog(long nXTwips, long nYTwips, const Size& rDlgS void SvRTLInputBox::PositionEdit( const Size& rDlgSize ) { - aEdit.SetPosPixel( LogicToPixel( Point( 5,rDlgSize.Height()-35))); - aEdit.SetSizePixel( LogicToPixel( Size(rDlgSize.Width()-15,12))); + aEdit->SetPosPixel( LogicToPixel( Point( 5,rDlgSize.Height()-35))); + aEdit->SetSizePixel( LogicToPixel( Size(rDlgSize.Width()-15,12))); } @@ -109,12 +120,12 @@ void SvRTLInputBox::PositionPrompt(const OUString& rPrompt,const Size& rDlgSize) if ( rPrompt.isEmpty() ) return; OUString aText_(convertLineEnd(rPrompt, LINEEND_CR)); - aPromptText.SetPosPixel( LogicToPixel(Point(5,5))); - aPromptText.SetText( aText_ ); + aPromptText->SetPosPixel( LogicToPixel(Point(5,5))); + aPromptText->SetText( aText_ ); Size aSize( rDlgSize ); aSize.Width() -= 70; aSize.Height() -= 50; - aPromptText.SetSizePixel( LogicToPixel(aSize)); + aPromptText->SetSizePixel( LogicToPixel(aSize)); } @@ -122,7 +133,7 @@ IMPL_LINK_INLINE_START( SvRTLInputBox, OkHdl, Button *, pButton ) { (void)pButton; - aText = aEdit.GetText(); + aText = aEdit->GetText(); EndDialog( 1 ); return 0; } @@ -172,8 +183,8 @@ RTLFUNC(InputBox) nX = rPar.Get(4)->GetLong(); nY = rPar.Get(5)->GetLong(); } - boost::scoped_ptr<SvRTLInputBox> pDlg(new SvRTLInputBox(Application::GetDefDialogParent(), - rPrompt,aTitle,aDefault,nX,nY)); + VclPtrInstance<SvRTLInputBox> pDlg(Application::GetDefDialogParent(), + rPrompt,aTitle,aDefault,nX,nY); pDlg->Execute(); rPar.Get(0)->PutString( pDlg->GetText() ); } diff --git a/basic/source/runtime/iosys.cxx b/basic/source/runtime/iosys.cxx index ae6d03e256fc..f4092002d4aa 100644 --- a/basic/source/runtime/iosys.cxx +++ b/basic/source/runtime/iosys.cxx @@ -66,25 +66,27 @@ using namespace com::sun::star::bridge; class SbiInputDialog : public ModalDialog { - Edit aInput; - OKButton aOk; - CancelButton aCancel; + VclPtr<Edit> aInput; + VclPtr<OKButton> aOk; + VclPtr<CancelButton> aCancel; OUString aText; DECL_LINK( Ok, vcl::Window * ); DECL_LINK( Cancel, vcl::Window * ); public: SbiInputDialog( vcl::Window*, const OUString& ); + virtual ~SbiInputDialog() { disposeOnce(); } + virtual void dispose() SAL_OVERRIDE; const OUString& GetInput() { return aText; } }; SbiInputDialog::SbiInputDialog( vcl::Window* pParent, const OUString& rPrompt ) :ModalDialog( pParent, WB_3DLOOK | WB_MOVEABLE | WB_CLOSEABLE ), - aInput( this, WB_3DLOOK | WB_LEFT | WB_BORDER ), - aOk( this ), aCancel( this ) + aInput( VclPtr<Edit>::Create(this, WB_3DLOOK | WB_LEFT | WB_BORDER) ), + aOk( new OKButton(this) ), aCancel( VclPtr<CancelButton>::Create(this) ) { SetText( rPrompt ); - aOk.SetClickHdl( LINK( this, SbiInputDialog, Ok ) ); - aCancel.SetClickHdl( LINK( this, SbiInputDialog, Cancel ) ); + aOk->SetClickHdl( LINK( this, SbiInputDialog, Ok ) ); + aCancel->SetClickHdl( LINK( this, SbiInputDialog, Cancel ) ); SetMapMode( MapMode( MAP_APPFONT ) ); Point aPt = LogicToPixel( Point( 50, 50 ) ); @@ -92,24 +94,32 @@ SbiInputDialog::SbiInputDialog( vcl::Window* pParent, const OUString& rPrompt ) SetPosSizePixel( aPt, aSz ); aPt = LogicToPixel( Point( 10, 10 ) ); aSz = LogicToPixel( Size( 120, 12 ) ); - aInput.SetPosSizePixel( aPt, aSz ); + aInput->SetPosSizePixel( aPt, aSz ); aPt = LogicToPixel( Point( 15, 30 ) ); aSz = LogicToPixel( Size( 45, 15) ); - aOk.SetPosSizePixel( aPt, aSz ); + aOk->SetPosSizePixel( aPt, aSz ); aPt = LogicToPixel( Point( 80, 30 ) ); aSz = LogicToPixel( Size( 45, 15) ); - aCancel.SetPosSizePixel( aPt, aSz ); + aCancel->SetPosSizePixel( aPt, aSz ); - aInput.Show(); - aOk.Show(); - aCancel.Show(); + aInput->Show(); + aOk->Show(); + aCancel->Show(); +} + +void SbiInputDialog::dispose() +{ + aInput.disposeAndClear(); + aOk.disposeAndClear(); + aCancel.disposeAndClear(); + ModalDialog::dispose(); } IMPL_LINK_INLINE_START( SbiInputDialog, Ok, vcl::Window *, pWindow ) { (void)pWindow; - aText = aInput.GetText(); + aText = aInput->GetText(); EndDialog( 1 ); return 0; } @@ -956,10 +966,10 @@ void SbiIoSystem::CloseAll() void SbiIoSystem::ReadCon(OString& rIn) { OUString aPromptStr(OStringToOUString(aPrompt, osl_getThreadTextEncoding())); - SbiInputDialog aDlg( NULL, aPromptStr ); - if( aDlg.Execute() ) + ScopedVclPtrInstance< SbiInputDialog > aDlg(nullptr, aPromptStr); + if( aDlg->Execute() ) { - rIn = OUStringToOString(aDlg.GetInput(), osl_getThreadTextEncoding()); + rIn = OUStringToOString(aDlg->GetInput(), osl_getThreadTextEncoding()); } else { diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx index 2cc26f78ea98..8b40e3643ef9 100644 --- a/basic/source/runtime/methods.cxx +++ b/basic/source/runtime/methods.cxx @@ -4611,7 +4611,7 @@ RTLFUNC(MsgBox) } nType &= (16+32+64); - boost::scoped_ptr<MessBox> pBox; + VclPtr<MessBox> pBox; SolarMutexGuard aSolarGuard; @@ -4619,19 +4619,19 @@ RTLFUNC(MsgBox) switch( nType ) { case 16: - pBox.reset(new ErrorBox( pParent, nWinBits, aMsg )); + pBox.reset(VclPtr<ErrorBox>::Create( pParent, nWinBits, aMsg )); break; case 32: - pBox.reset(new QueryBox( pParent, nWinBits, aMsg )); + pBox.reset(VclPtr<QueryBox>::Create( pParent, nWinBits, aMsg )); break; case 48: - pBox.reset(new WarningBox( pParent, nWinBits, aMsg )); + pBox.reset(VclPtr<WarningBox>::Create( pParent, nWinBits, aMsg )); break; case 64: - pBox.reset(new InfoBox( pParent, nWinBits, aMsg )); + pBox.reset(VclPtr<InfoBox>::Create( pParent, nWinBits, aMsg )); break; default: - pBox.reset(new MessBox( pParent, nWinBits, aTitle, aMsg )); + pBox.reset(VclPtr<MessBox>::Create( pParent, nWinBits, aTitle, aMsg )); } pBox->SetText( aTitle ); short nRet = pBox->Execute(); |