Lines 2624-2634
SfxItemState SfxBindings::QueryState( sa
Link Here
|
2624 |
pDisp = (SfxOfficeDispatch*)(nImplementation); |
2624 |
pDisp = (SfxOfficeDispatch*)(nImplementation); |
2625 |
} |
2625 |
} |
2626 |
|
2626 |
|
2627 |
if ( !pDisp || pDisp->IsInterceptDispatch() ) |
2627 |
if ( !pDisp || pDisp->IsInterceptDispatch() && pCache) |
2628 |
{ |
2628 |
{ |
2629 |
SfxItemState eState = SFX_ITEM_SET; |
2629 |
SfxItemState eState = SFX_ITEM_SET; |
2630 |
SfxPoolItem *pItem=NULL; |
2630 |
SfxPoolItem *pItem=NULL; |
2631 |
BindDispatch_Impl *pBind = new BindDispatch_Impl( xDisp, aURL, NULL ); |
2631 |
SfxStateCache *pTmpCache = NULL; |
|
|
2632 |
if( !pCache ) { |
2633 |
pTmpCache = new SfxStateCache( nSlot ); |
2634 |
pCache = pTmpCache; |
2635 |
} |
2636 |
|
2637 |
BindDispatch_Impl *pBind = new BindDispatch_Impl( xDisp, aURL, pCache ); |
2632 |
pBind->acquire(); |
2638 |
pBind->acquire(); |
2633 |
xDisp->addStatusListener( pBind, aURL ); |
2639 |
xDisp->addStatusListener( pBind, aURL ); |
2634 |
if ( !pBind->GetStatus().IsEnabled ) |
2640 |
if ( !pBind->GetStatus().IsEnabled ) |
Lines 2668-2673
SfxItemState SfxBindings::QueryState( sa
Link Here
|
2668 |
|
2674 |
|
2669 |
pBind->Release(); |
2675 |
pBind->Release(); |
2670 |
rpState = pItem; |
2676 |
rpState = pItem; |
|
|
2677 |
if( pTmpCache ) |
2678 |
delete pTmpCache; |
2671 |
return eState; |
2679 |
return eState; |
2672 |
} |
2680 |
} |
2673 |
} |
2681 |
} |