incubator-ooo-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [Bug 118882] [From Symphony] Cannot do nothing if two select data range dialog is shrunk
Date Wed, 01 Aug 2012 04:20:12 GMT

pengyunquan <> changed:

           What    |Removed                     |Added
  Attachment #78794|                            |review?
              Flags|                            |

--- Comment #1 from pengyunquan <> ---
Created attachment 78794
Fix patch for Bug 118882

Root case : On creation of the 2nd Spreadsheet document, a
ScSimpleRefDlgWrapper object will be constructed. In its constructor, there are
several lines of code cause this problem:
    if(bAutoReOpen && pViewShell)
        pWindow = pViewShell->CreateRefDialog( p, this, pInfo, pParentP,

    if (!pWindow)
        SC_MOD()->SetRefDialog( nId, sal_False );
 The 2nd document does not have a reference picker dialog, so
"SC_MOD()->SetRefDialog( nId, sal_False );" is executed, which clears
ScModule's reference status.  This is an incorrect action, because the 1st
document still has a reference dialog open, and ScModule should keep reference
status while there are one document is in reference picking status.  On the 2nd
document's creation, only its own reference status should be cleared, so we
should call "pViewFrm->SetChildWindow( nId, sal_False );" instead of
"SC_MOD()->SetRefDialog( nId, sal_False );". 
    Let's see other child dialog wrappers' constructor. In
"ScAcceptChgDlgWrapper::ScAcceptChgDlgWrapper(...)", it is
"pViewShell->GetViewFrame()->SetChildWindow( nId, sal_False );" not
"SC_MOD()->SetRefDialog( nId, sal_False );". As a result, it does not cause
this problem.
    Why "SC_MOD()->SetRefDialog( nId, sal_False );" cause frozen problem?
Because once ScModule's reference picking status is cleared, when mouse is
clicked on one cell in the 1st document, the ScModule does not think this is a
reference picking action, and the ScModule thinks it is a normal mouse click on
cell which will cause ScCellShell be activated and ScChartShell will be
deactivated. As a result, reference picker dialog will be destroyed, and its
parent dialog( Chart Range dialog ) will be set as foreground dialog. The
original parent dialog of the Chart Range dialog is the CharWindow, but now the
ChartWindow is destroyed when ScChartShell is deactivated, the ChartRange
dialog will be reparented to ScGridWindow. in VCL, reparent a frame window will
destroy the system window handle( HWND ), and recreated a new HWND. But the
window position is not inherited from the original HWND, so when show the new
window, system API "GetWindowRect" get rectangle as "Rectangle(0,0,0,0)". As a
result, we can not see the new foreground ChartRange dialog, but it is a modal
dialog whick locks the document, and the ScGridWindow can not respond to the
user events. The document looks like frozen. By the way, we can not close the
invisible foreground dialog (Chart Range dialog ) by pressing "Esc" key,
because when this dialog is reparented to ScGridWindow VCL calls "ShowWindow(
.., SW_NOACTVATE)", which means the foreground dialog does not get focus. It is
a invisible modal dialog without focus, which locks the docuemt and can not be
closed via "Esc" key.

You are receiving this mail because:
You are the assignee for the bug.

View raw message