diff options
author | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-01-22 14:37:14 -0500 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-01-22 19:20:41 -0500 |
commit | dabf147d1d7e892ce07202fbe89a584f0d592a62 (patch) | |
tree | f5ed979b52294adfaae4e03b89739f47c9c4f867 /sc/source/ui/view/tabvwsh5.cxx | |
parent | b2f9d1b43e4b14cc48327cdce14a03c826096579 (diff) |
Use scoped_ptr for these.
Change-Id: I9452950ad6a101c2b9299dca5ff6e1713cac774c
Diffstat (limited to 'sc/source/ui/view/tabvwsh5.cxx')
-rw-r--r-- | sc/source/ui/view/tabvwsh5.cxx | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/sc/source/ui/view/tabvwsh5.cxx b/sc/source/ui/view/tabvwsh5.cxx index c6fcaceeb56b..52a2262ffbed 100644 --- a/sc/source/ui/view/tabvwsh5.cxx +++ b/sc/source/ui/view/tabvwsh5.cxx @@ -308,9 +308,7 @@ void ScTabViewShell::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) //------------------------------------------------------------------ -void ScTabViewShell::MakeNumberInfoItem( ScDocument* pDoc, - ScViewData* pViewData, - SvxNumberInfoItem** ppItem ) +SvxNumberInfoItem* ScTabViewShell::MakeNumberInfoItem( ScDocument* pDoc, ScViewData* pViewData ) { //------------------------------ // NumberInfo-Item konstruieren: @@ -361,26 +359,24 @@ void ScTabViewShell::MakeNumberInfoItem( ScDocument* pDoc, switch ( eValType ) { case SVX_VALUE_TYPE_STRING: - *ppItem = new SvxNumberInfoItem( + return new SvxNumberInfoItem( pDoc->GetFormatTable(), aCellString, SID_ATTR_NUMBERFORMAT_INFO ); - break; case SVX_VALUE_TYPE_NUMBER: - *ppItem = new SvxNumberInfoItem( + return new SvxNumberInfoItem( pDoc->GetFormatTable(), nCellValue, SID_ATTR_NUMBERFORMAT_INFO ); - break; case SVX_VALUE_TYPE_UNDEFINED: default: - *ppItem = new SvxNumberInfoItem( - pDoc->GetFormatTable(), - (const sal_uInt16) - SID_ATTR_NUMBERFORMAT_INFO ); + ; } + + return new SvxNumberInfoItem( + pDoc->GetFormatTable(), static_cast<const sal_uInt16>(SID_ATTR_NUMBERFORMAT_INFO)); } //------------------------------------------------------------------ |