summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrzej Hunt <andrzej@ahunt.org>2015-09-22 14:01:28 +0200
committerAndrzej Hunt <andrzej@ahunt.org>2015-10-21 10:23:49 +0200
commit215a189e5d35a0423bf26937405993499a8ed987 (patch)
tree8fda7a7719d2ce2bedf9dbd1b958b8b55d3a169a
parent2daa56a63baea4cb3f946e3bc2f662dbfa0a45cd (diff)
loplugin:vclwidgets
Change-Id: I8edbf71d961067ee565954cbb91ee9e503e3077d
-rw-r--r--sc/source/ui/view/viewfunc.cxx15
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();