Issue 120065 - Enabled property should be work on grid control model
Summary: Enabled property should be work on grid control model
Status: CLOSED FIXED
Alias: None
Product: General
Classification: Code
Component: code (show other issues)
Version: 3.4.0
Hardware: All All
: P3 Normal (vote)
Target Milestone: 4.1.0
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-23 14:28 UTC by hanya
Modified: 2017-05-20 10:35 UTC (History)
2 users (show)

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


Attachments
To verify this problem (13.28 KB, application/vnd.oasis.opendocument.text)
2013-06-17 15:46 UTC, hanya
no flags Details
Patch to fix problems described in Comment 2 (8.46 KB, patch)
2013-06-20 13:06 UTC, hanya
no flags Details | Diff
Test document 120065_GridEnabled.odt for verification (13.23 KB, application/vnd.oasis.opendocument.text)
2013-12-19 15:21 UTC, jsc
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description hanya 2012-06-23 14:28:54 UTC
Some control model supports Enabled property to switch enabled/disabled state of the control. 
It has Enabled property but it does not work and not listed in its IDL.
Comment 1 hanya 2013-06-17 15:46:22 UTC
Created attachment 80875 [details]
To verify this problem

The attached odt file contains dialog with grid control.
- Open the document and click "Grid" button placed on text body.
- dialog shown with the grid control, "Enable", "Disable" buttons and two more controls.
-> Enabled property of the grid model has been set before the dialog is shown, 
   so it should be disabled. But you can click to choose a row in the grid.
- Push "Disable" button to set Enabled property to False.
-> Click on the grid, you can not select any rows in the grid. It is disabled.
- Push "Enable" button to set Enabled property to True.
- > You can select a row in the grid.

Now the problems are:
- text and graphic in the grid are not drawn in disabled color in disabled state.
- changing Enabled property before the showing the grid control not working well.
Comment 2 hanya 2013-06-20 13:06:58 UTC
Created attachment 80889 [details]
Patch to fix problems described in Comment 2

The patch introduces the way for GridTableRenderer to check the current state enable/disabled.
Text and images are drawn with disabled style.
To make Enabled property work before dialog execution, 
setEnable method is overridden in SVTXGridControl class. 
Second parameter of Window::Enable method should be true for the grid, it seems.
Comment 3 jsc 2013-12-19 15:21:08 UTC
Created attachment 82140 [details]
Test document 120065_GridEnabled.odt for verification

Replace test document with a new one, toggle state of the buttons ...
Comment 4 jsc 2013-12-19 15:22:47 UTC
patch reviewed and checked locally, as soon as svn is back I will commit it.

Thanks for the patch
Comment 5 SVN Robot 2013-12-20 05:47:13 UTC
"jsc" committed SVN revision 1552497 into trunk:
#120065# apply patch for Enabled property in grid model
Comment 6 jsc 2013-12-20 06:15:02 UTC
patch applied on trunk
Comment 7 zhaoshzh 2014-04-09 02:46:46 UTC
Open the document and click "Grid" button placed on text body.
no dialog shown with the grid control

AOO410m15(Build:9761)  -  Rev. 1585021
Rev.1585021
Comment 8 zhaoshzh 2014-04-09 03:13:03 UTC
should change the option of security setting.
so it is verified on AOO410m15(Build:9761)  -  Rev. 1585021
Rev.1585021
Comment 9 zhaoshzh 2014-04-09 07:16:16 UTC
verified on AOO410m14(Build:9760)  -  Rev. 1585624