summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
Diffstat (limited to 'svx')
-rw-r--r--svx/source/fmcomp/fmgridif.cxx13
-rw-r--r--svx/source/fmcomp/gridctrl.cxx24
2 files changed, 17 insertions, 20 deletions
diff --git a/svx/source/fmcomp/fmgridif.cxx b/svx/source/fmcomp/fmgridif.cxx
index e966cecb9c45..af49b63e3ef0 100644
--- a/svx/source/fmcomp/fmgridif.cxx
+++ b/svx/source/fmcomp/fmgridif.cxx
@@ -2800,13 +2800,11 @@ void FmXGridPeer::DisConnectFromDispatcher()
}
-IMPL_LINK(FmXGridPeer, OnQueryGridSlotState, void*, pSlot)
+IMPL_LINK_TYPED(FmXGridPeer, OnQueryGridSlotState, sal_uInt16, nSlot, int)
{
if (!m_pStateCache)
return -1; // unspecified
- sal_uInt16 nSlot = (sal_uInt16)reinterpret_cast<sal_uIntPtr>(pSlot);
-
// search the given slot with our supported sequence
Sequence<sal_uInt16>& aSupported = getSupportedGridSlots();
const sal_uInt16* pSlots = aSupported.getConstArray();
@@ -2825,10 +2823,10 @@ IMPL_LINK(FmXGridPeer, OnQueryGridSlotState, void*, pSlot)
}
-IMPL_LINK(FmXGridPeer, OnExecuteGridSlot, void*, pSlot)
+IMPL_LINK_TYPED(FmXGridPeer, OnExecuteGridSlot, sal_uInt16, nSlot, bool)
{
if (!m_pDispatchers)
- return 0; // not handled
+ return false; // not handled
Sequence< ::com::sun::star::util::URL>& aUrls = getSupportedURLs();
const ::com::sun::star::util::URL* pUrls = aUrls.getConstArray();
@@ -2838,7 +2836,6 @@ IMPL_LINK(FmXGridPeer, OnExecuteGridSlot, void*, pSlot)
DBG_ASSERT(aSlots.getLength() == aUrls.getLength(), "FmXGridPeer::OnExecuteGridSlot : inconstent data returned by getSupportedURLs/getSupportedGridSlots !");
- sal_uInt16 nSlot = (sal_uInt16)reinterpret_cast<sal_uIntPtr>(pSlot);
for (sal_Int32 i=0; i<aSlots.getLength(); ++i, ++pUrls, ++pSlots)
{
if (*pSlots == nSlot)
@@ -2849,12 +2846,12 @@ IMPL_LINK(FmXGridPeer, OnExecuteGridSlot, void*, pSlot)
if ( pUrls->Complete == FMURL_RECORD_UNDO || commit() )
m_pDispatchers[i]->dispatch(*pUrls, Sequence< PropertyValue>());
- return 1; // handled
+ return true; // handled
}
}
}
- return 0; // not handled
+ return false; // not handled
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/fmcomp/gridctrl.cxx b/svx/source/fmcomp/gridctrl.cxx
index c00f25939451..9900c4205089 100644
--- a/svx/source/fmcomp/gridctrl.cxx
+++ b/svx/source/fmcomp/gridctrl.cxx
@@ -507,17 +507,17 @@ IMPL_LINK_TYPED(DbGridControl::NavigationBar, OnClick, Button *, pButton, void )
if (pParent->m_aMasterSlotExecutor.IsSet())
{
- long lResult = 0;
+ bool lResult = false;
if (pButton == m_aFirstBtn.get())
- lResult = pParent->m_aMasterSlotExecutor.Call(reinterpret_cast<void*>(RECORD_FIRST));
+ lResult = pParent->m_aMasterSlotExecutor.Call(RECORD_FIRST);
else if( pButton == m_aPrevBtn.get() )
- lResult = pParent->m_aMasterSlotExecutor.Call(reinterpret_cast<void*>(RECORD_PREV));
+ lResult = pParent->m_aMasterSlotExecutor.Call(RECORD_PREV);
else if( pButton == m_aNextBtn.get() )
- lResult = pParent->m_aMasterSlotExecutor.Call(reinterpret_cast<void*>(RECORD_NEXT));
+ lResult = pParent->m_aMasterSlotExecutor.Call(RECORD_NEXT);
else if( pButton == m_aLastBtn.get() )
- lResult = pParent->m_aMasterSlotExecutor.Call(reinterpret_cast<void*>(RECORD_LAST));
+ lResult = pParent->m_aMasterSlotExecutor.Call(RECORD_LAST);
else if( pButton == m_aNewBtn.get() )
- lResult = pParent->m_aMasterSlotExecutor.Call(reinterpret_cast<void*>(RECORD_NEW));
+ lResult = pParent->m_aMasterSlotExecutor.Call(RECORD_NEW);
if (lResult)
// the link already handled it
@@ -578,7 +578,7 @@ bool DbGridControl::NavigationBar::GetState(sal_uInt16 nWhich) const
// check if we have a master state provider
if (pParent->m_aMasterStateProvider.IsSet())
{
- long nState = pParent->m_aMasterStateProvider.Call(reinterpret_cast< void* >( nWhich ) );
+ long nState = pParent->m_aMasterStateProvider.Call( nWhich );
if (nState>=0)
return (nState>0);
}
@@ -2665,9 +2665,9 @@ void DbGridControl::PreExecuteRowContextMenu(sal_uInt16 /*nRow*/, PopupMenu& rMe
// the undo is more difficult
bool bCanUndo = IsModified();
- long nState = -1;
+ int nState = -1;
if (m_aMasterStateProvider.IsSet())
- nState = m_aMasterStateProvider.Call(reinterpret_cast<void*>(SID_FM_RECORD_UNDO));
+ nState = m_aMasterStateProvider.Call(SID_FM_RECORD_UNDO);
bCanUndo &= ( 0 != nState );
rMenu.EnableItem(SID_FM_RECORD_UNDO, bCanUndo);
@@ -2972,13 +2972,13 @@ void DbGridControl::Undo()
if (!IsFilterMode() && IsValid(m_xCurrentRow) && IsModified())
{
// check if we have somebody doin' the UNDO for us
- long nState = -1;
+ int nState = -1;
if (m_aMasterStateProvider.IsSet())
- nState = m_aMasterStateProvider.Call(reinterpret_cast<void*>(SID_FM_RECORD_UNDO));
+ nState = m_aMasterStateProvider.Call(SID_FM_RECORD_UNDO);
if (nState>0)
{ // yes, we have, and the slot is enabled
DBG_ASSERT(m_aMasterSlotExecutor.IsSet(), "DbGridControl::Undo : a state, but no execute link ?");
- long lResult = m_aMasterSlotExecutor.Call(reinterpret_cast<void*>(SID_FM_RECORD_UNDO));
+ bool lResult = m_aMasterSlotExecutor.Call(SID_FM_RECORD_UNDO);
if (lResult)
// handled
return;