Liang Weike schrieb: > Hello Carsten, > > At present I've been investigating issue 76662. I've found out that the > program couldn't call the function "void > LayoutManager::implts_createNonContextSensitiveToolBars()" when my mouse > left the inserted CALC object and clicked.Actually it should.After > contrasting the call stack between the latest version and the former I > discovered the called functions were different after > "SwFEShell::FinishOLEObj()".And then I analysed the source code and saw > the function lacked " xObj->changeState( embed::EmbedStates::RUNNING > );SfxViewFrame::SetViewFrame( GetSfxViewShell()->GetViewFrame() );".I'm > not sure if it's where the problem exists.So I think I need your > instructions and suggestions. Hi Liang Weike,
I have debugged the issue and found the root cause. The OLE object activation and deactivation is a very complex use case. The library that controls the activation and deactivation is called "embeddedobj. The activation/deactivation works with two layout managers. One is a related to the container module (e.g Writer) and the other to the embedded object. The embeddedobj library controls both layout managers and associates them to the correct frame windows. In the activation phase the layout manager of the embedded object receives the frame window of the container module (LayoutManager::SetDockingAreaAcceptor()). The embedded object show its user interface using the container module window. The layout manager of the container module is set to invisible (LayoutManager::setVisible( false )), therefore it hides all user interface elements and stays passive. The deactivation works in the opposite way. The association between the container module frame and the embedded object layout manager is released (LayoutManager::SetDockingAreaAcceptor). The layout manager of the container module is set to visible (LayoutManager::setVisible( true )). Here is the root cause. The layout manager tries to open the non-context sensitive toolbars although its internal state is non-visible. After the embeddedobj library calls LayoutManager::setVisible( true ) it doesn't try to open the non-context sensitive again. I think the correct fix for the issue is that implts_createNonContextSensitiveToolbars() is also called when LayoutManager::setVisible( true ) is called. Please look over the source code of the LayoutManager class and try to fix this issue using my proposed solution. Regards, Carsten --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]