]> git.pld-linux.org Git - packages/libreoffice.git/blob - openoffice-crash-bindings.patch
- up
[packages/libreoffice.git] / openoffice-crash-bindings.patch
1 Index: sfx2/source/control/bindings.cxx
2 ===================================================================
3 RCS file: /cvs/framework/sfx2/source/control/bindings.cxx,v
4 retrieving revision 1.25
5 diff -u -p -u -r1.25 bindings.cxx
6 --- sfx2/source/control/bindings.cxx    28 May 2003 13:25:06 -0000      1.25
7 +++ sfx2/source/control/bindings.cxx    28 Aug 2003 13:04:31 -0000
8 @@ -2624,11 +2624,17 @@ SfxItemState SfxBindings::QueryState( sa
9                  pDisp = (SfxOfficeDispatch*)(nImplementation);
10              }
11  
12 -            if ( !pDisp || pDisp->IsInterceptDispatch() )
13 +            if ( !pDisp || pDisp->IsInterceptDispatch() && pCache)
14                         {
15                 SfxItemState eState = SFX_ITEM_SET;
16                 SfxPoolItem *pItem=NULL;
17 -               BindDispatch_Impl *pBind = new BindDispatch_Impl( xDisp, aURL, NULL );
18 +                               SfxStateCache *pTmpCache = NULL;
19 +                               if( !pCache ) {
20 +                                       pTmpCache = new SfxStateCache( nSlot );
21 +                                       pCache = pTmpCache;
22 +                               }
23 +
24 +               BindDispatch_Impl *pBind = new BindDispatch_Impl( xDisp, aURL, pCache );
25                 pBind->acquire();
26                 xDisp->addStatusListener( pBind, aURL );
27                 if ( !pBind->GetStatus().IsEnabled )
28 @@ -2668,6 +2674,8 @@ SfxItemState SfxBindings::QueryState( sa
29  
30                 pBind->Release();
31                 rpState = pItem;
32 +                               if( pTmpCache )
33 +                                       delete pTmpCache;
34                 return eState;
35                         }
36          }
This page took 0.027511 seconds and 3 git commands to generate.