summaryrefslogtreecommitdiff
path: root/sc/source/ui/drawfunc
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@suse.com>2012-02-06 14:29:55 -0500
committerKohei Yoshida <kohei.yoshida@suse.com>2012-02-06 14:29:55 -0500
commite64c291c5fd1d3ff625dc118ad7e0460df03eb78 (patch)
tree2dd628d1ecbecd11a5b5b87c860410d3611cb482 /sc/source/ui/drawfunc
parent28ff7a37e66c8746a0b176b4ea25e20c1cd135c5 (diff)
I think it's time we had a real method for this...
This helps eliminate dozens of IS_AVAILABLE macros scattered across Calc code. I'm sure we have other similar macros like this elsewhere.
Diffstat (limited to 'sc/source/ui/drawfunc')
-rw-r--r--sc/source/ui/drawfunc/fuins2.cxx9
1 files changed, 2 insertions, 7 deletions
diff --git a/sc/source/ui/drawfunc/fuins2.cxx b/sc/source/ui/drawfunc/fuins2.cxx
index ba7f2df9e54b..4cbf06235faa 100644
--- a/sc/source/ui/drawfunc/fuins2.cxx
+++ b/sc/source/ui/drawfunc/fuins2.cxx
@@ -95,11 +95,6 @@ using namespace ::com::sun::star;
extern SdrObject* pSkipPaintObj; // output.cxx - dieses Objekt nicht zeichnen
-//------------------------------------------------------------------------
-
-#define IS_AVAILABLE(WhichId,ppItem) \
- (pReqArgs->GetItemState((WhichId), sal_True, ppItem ) == SFX_ITEM_SET)
-
namespace {
void lcl_ChartInit( const uno::Reference < embed::XEmbeddedObject >& xObj, ScViewData* pViewData,
@@ -507,7 +502,7 @@ FuInsertChart::FuInsertChart(ScTabViewShell* pViewSh, Window* pWin, ScDrawView*
if( pReqArgs )
{
const SfxPoolItem* pItem;
- if( IS_AVAILABLE( FN_PARAM_5, &pItem ) )
+ if( pReqArgs->HasItem( FN_PARAM_5, pItem ) )
aRangeString = ::rtl::OUString( ((const SfxStringItem*)pItem)->GetValue());
aPositionRange = pViewSh->GetViewData()->GetCurPos();
@@ -607,7 +602,7 @@ FuInsertChart::FuInsertChart(ScTabViewShell* pViewSh, Window* pWin, ScDrawView*
const SfxPoolItem* pItem;
sal_uInt16 nToTable = 0;
- if( IS_AVAILABLE( FN_PARAM_4, &pItem ) )
+ if( pReqArgs->HasItem( FN_PARAM_4, pItem ) )
{
if ( pItem->ISA( SfxUInt16Item ) )
nToTable = ((const SfxUInt16Item*)pItem)->GetValue();