diff options
author | Kohei Yoshida <kohei.yoshida@suse.com> | 2011-11-18 16:56:10 -0500 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@suse.com> | 2011-11-18 16:59:43 -0500 |
commit | 898c527481059017c8f75ba51bfc80b297f0480d (patch) | |
tree | e42cb7b792c9832e1848d963a512cb9f52e47a4d /sc/source/ui/inc/checklistmenu.hxx | |
parent | b352f5357c95cf37ffa1debb1ffe62b84c223509 (diff) |
Disable the OK button when no items are selected.
When filtering by equality, we need to have at least one value to
compare to, or else bad things may happen.
The pivot table OTOH can handle empty set. So over there, it's okay
to allow no items to be selected.
Diffstat (limited to 'sc/source/ui/inc/checklistmenu.hxx')
-rw-r--r-- | sc/source/ui/inc/checklistmenu.hxx | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/sc/source/ui/inc/checklistmenu.hxx b/sc/source/ui/inc/checklistmenu.hxx index 34b3be71cbef..4a1458aae95e 100644 --- a/sc/source/ui/inc/checklistmenu.hxx +++ b/sc/source/ui/inc/checklistmenu.hxx @@ -216,6 +216,15 @@ public: */ struct ExtendedData {}; + /** + * Configuration options for this popup window. + */ + struct Config + { + bool mbAllowEmptySet; + Config(); + }; + explicit ScCheckListMenuWindow(Window* pParent, ScDocument* pDoc); virtual ~ScCheckListMenuWindow(); @@ -228,6 +237,7 @@ public: void setMemberSize(size_t n); void addMember(const ::rtl::OUString& rName, bool bVisible); void initMembers(); + void setConfig(const Config& rConfig); const Size& getWindowSize() const; @@ -318,6 +328,7 @@ private: boost::scoped_ptr<Action> mpOKAction; boost::scoped_ptr<Action> mpPopupEndAction; + Config maConfig; Size maWndSize; /// whole window size. Size maMenuSize; /// size of all menu items combined. TriState mePrevToggleAllState; |