Issue 119994 - [From Symphony]Cannot modify the second document even if close range picker in first document
Summary: [From Symphony]Cannot modify the second document even if close range picker i...
Status: CLOSED FIXED
Alias: None
Product: Calc
Classification: Application
Component: editing (show other issues)
Version: 3.4.0
Hardware: PC All
: P3 Major (vote)
Target Milestone: 4.0.0
Assignee: mayongl
QA Contact:
URL:
Keywords: needmoreinfo
Depends on:
Blocks:
 
Reported: 2012-06-15 01:00 UTC by Yan Ji
Modified: 2012-11-08 05:41 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
Patch for Bug119994.patch (1.30 KB, patch)
2012-06-15 03:36 UTC, pengyunquan
yunquanp: review?
Details | Diff
Update fix patch (1.30 KB, patch)
2012-06-21 07:02 UTC, pengyunquan
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description Yan Ji 2012-06-15 01:00:45 UTC
Build: AOO 3.4
Steps:
1. New a calc document.
2. From menu "Insert->Chart", click "Next" button in guide dialog
3. Click "Select data range" button.
3. New a Impress doc.
4. Switch back to Calc doc, the Calc doc is locked
Comment 1 pengyunquan 2012-06-15 03:36:11 UTC
Created attachment 78334 [details]
Patch for Bug119994.patch

    Root Cause : On creation of SD, the Range picker dialog of the SC document is hidden, and it is in nonmodal state. When the new dialog for creation of SD is popped up, in its call of Dialog::SetModalInputMode, it changes its previous execute dialog( the Range picker dialog for SC ) to modal state without check whether the excuting dialog is in modal state. In the case of this bug, the Range picker dialog should not be changed to modal state becaused its range picker is running, and its user event should be handled by the SC document. If the Range picker dialog is incorrectly changed to modal state, it handle the user event and it is hidden, so the document can not respond to the user's mouse click on document, and the document is lock.

    Solution : In Dialog::SetModalInputMode, if prev-execute dialog is not in modal state, skip prev-execute dialog, and check the prev-prev-dialog, untill find a modal dialog.
Comment 2 mayongl 2012-06-21 02:58:21 UTC
I will take care of this.
Comment 3 pengyunquan 2012-06-21 07:02:51 UTC
Created attachment 78413 [details]
Update fix patch

Update solution
Comment 4 mayongl 2012-06-21 07:23:11 UTC
Root cause:
When current model dialog is changed to modeless, previous model dialog needs be "reactive" (change to modeless then change back). In current implementation, a modeless dialog can be changed to model dialog as stated in defect description.

Solution:
Track up to find a model dialog then "rective" it.
Comment 5 pengyunquan 2012-06-21 08:52:29 UTC
Comment on attachment 78413 [details]
Update fix patch

Enable input must paired with disable input above. And must be pre-execute dialog. This is because it must disable input of prev-execute dialog to avoid close of prev-execute dialog
Comment 6 mayongl 2012-07-10 03:29:16 UTC
Fixed in revision 1359466.
Comment 7 Shan Zhu 2012-08-20 06:48:24 UTC
Verified on r1374181.
1. New a calc document.
2. Open a Range Picker dialog. 
   e.g. From menu "Insert -> Names -> Define", input a name, click Shrink button.
3. New another calc document.

Can not move focus or input content in the secend calc file.

With the range picker in Chart Data Range dialog, the behavior will be different. 
1. New a calc document.
2. "Insert -> Chart", click Next button, click Shirink button. 
3. New another calc document, input some content, close it without save.
Then, click any where in the first calc file, to exit chart edit mode. 

Try to close the file, it can not be closed.
Double click to active the chart, right click -> Data Ranges, click the Shirnk button. 
You can not open Range Picker dialog. 

I think there is something wrong with the dialog and document state.
Pls double check the solution.
Comment 8 Shenfeng Liu 2012-11-07 08:44:49 UTC
set Target Milestone to AOO 3.5.0 for PM purpose.
Comment 9 Li Feng Wang 2012-11-08 05:41:18 UTC
Verify Steps:
1. New a calc document.
2. From menu "Insert->Chart", click "Next" button in guide dialog
3. Click "Select data range" button.
3. New a Impress doc.
4. Switch back to Calc doc

Verify pass on trunk r1404513