diff options
author | Andrzej Hunt <andrzej@ahunt.org> | 2015-09-22 14:01:28 +0200 |
---|---|---|
committer | Andrzej Hunt <andrzej@ahunt.org> | 2015-10-21 10:23:49 +0200 |
commit | 215a189e5d35a0423bf26937405993499a8ed987 (patch) | |
tree | 8fda7a7719d2ce2bedf9dbd1b958b8b55d3a169a | |
parent | Implement undoing conversion of individual locally annotated cells (diff) | |
download | core-215a189e5d35a0423bf26937405993499a8ed987.tar.gz core-215a189e5d35a0423bf26937405993499a8ed987.zip |
loplugin:vclwidgets
Change-Id: I8edbf71d961067ee565954cbb91ee9e503e3077d
-rw-r--r-- | sc/source/ui/view/viewfunc.cxx | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/sc/source/ui/view/viewfunc.cxx b/sc/source/ui/view/viewfunc.cxx index f04655181e5f..f382f76af572 100644 --- a/sc/source/ui/view/viewfunc.cxx +++ b/sc/source/ui/view/viewfunc.cxx @@ -2892,7 +2892,7 @@ void ScViewFunc::NotifyUnitErrorInFormula( const ScAddress& rAddress, ScDocument SfxInfoBarWindow* pInfoBar = pViewFrame->AppendInfoBar( sCellAddress, sTitle ); assert( pInfoBar ); - PushButton* pButtonGotoCell = new PushButton( &pViewFrame->GetWindow(), ScResId(BT_UNITS_EDIT_CELL) ); + VclPtr<PushButton> pButtonGotoCell = VclPtr<PushButton>::Create( &pViewFrame->GetWindow(), ScResId(BT_UNITS_EDIT_CELL) ); pButtonGotoCell->SetClickHdl( LINK( this, ScViewFunc, EditUnitErrorFormulaHandler ) ); pInfoBar->addButton( pButtonGotoCell); } @@ -2979,12 +2979,13 @@ void ScViewFunc::NotifyUnitConversionRecommended( const ScAddress& rCellAddress, assert( pInfoBar ); - UnitConversionPushButton* pButtonConvertCell = new UnitConversionPushButton( &pViewFrame->GetWindow(), - ScResId(BT_UNITS_CONVERT_THIS_CELL), - rCellAddress, - pDoc, - rsHeaderUnit, - rsCellUnit ); + VclPtr<UnitConversionPushButton> pButtonConvertCell = + VclPtr<UnitConversionPushButton>::Create( &pViewFrame->GetWindow(), + ScResId(BT_UNITS_CONVERT_THIS_CELL), + rCellAddress, + pDoc, + rsHeaderUnit, + rsCellUnit ); pButtonConvertCell->SetClickHdl( LINK( this, ScViewFunc, UnitConversionRecommendedHandler ) ); OUString sConvertText = pButtonConvertCell->GetText(); |