diff options
author | Noel Grandin <noel@peralex.com> | 2015-10-15 12:28:31 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-10-15 12:29:01 +0200 |
commit | 0e8a40e8b8c883611b6d34e47dc6e33ba60e0f91 (patch) | |
tree | 92e49014bb9b368309c98d85dcfbd2f673e23d54 /dbaccess/source/ui/control | |
parent | cfc7307a23eed561152c1b016cd0ec22bc7af145 (diff) |
calling IsSet() before Call() on Link<> is unnecessary
the Call() already does a check
Found with:
git grep -A 1 -w 'IsSet()'
| grep -B 1 '.Call('
| grep ':'
| cut -d ':' -f 1
Change-Id: Ia7248f5d62640b75f705e539c3d1183e39c0d847
Diffstat (limited to 'dbaccess/source/ui/control')
-rw-r--r-- | dbaccess/source/ui/control/dbtreelistbox.cxx | 16 | ||||
-rw-r--r-- | dbaccess/source/ui/control/marktree.cxx | 3 |
2 files changed, 7 insertions, 12 deletions
diff --git a/dbaccess/source/ui/control/dbtreelistbox.cxx b/dbaccess/source/ui/control/dbtreelistbox.cxx index 5c0075d0fe27..1db0893962b8 100644 --- a/dbaccess/source/ui/control/dbtreelistbox.cxx +++ b/dbaccess/source/ui/control/dbtreelistbox.cxx @@ -126,15 +126,12 @@ void DBTreeListBox::EnableExpandHandler(SvTreeListEntry* _pEntry) void DBTreeListBox::RequestingChildren( SvTreeListEntry* pParent ) { - if (m_aPreExpandHandler.IsSet()) + if (m_aPreExpandHandler.IsSet() && !m_aPreExpandHandler.Call(pParent)) { - if (!m_aPreExpandHandler.Call(pParent)) - { - // an error occurred. The method calling us will reset the entry flags, so it can't be expanded again. - // But we want that the user may do a second try (i.e. because he misstypes a password in this try), so - // we have to reset these flags controlling the expand ability - PostUserEvent(LINK(this, DBTreeListBox, OnResetEntry), pParent, true); - } + // an error occurred. The method calling us will reset the entry flags, so it can't be expanded again. + // But we want that the user may do a second try (i.e. because he misstypes a password in this try), so + // we have to reset these flags controlling the expand ability + PostUserEvent(LINK(this, DBTreeListBox, OnResetEntry), pParent, true); } } @@ -349,8 +346,7 @@ void DBTreeListBox::KeyInput( const KeyEvent& rKEvt ) if ( KEY_RETURN == nCode ) { bHandled = m_bHandleEnterKey; - if ( m_aEnterKeyHdl.IsSet() ) - m_aEnterKeyHdl.Call(this); + m_aEnterKeyHdl.Call(this); // this is a HACK. If the data source browser is opened in the "beamer", while the main frame // // contains a writer document, then pressing enter in the DSB would be rerouted to the writer diff --git a/dbaccess/source/ui/control/marktree.cxx b/dbaccess/source/ui/control/marktree.cxx index 0291f06e9c25..60804e129908 100644 --- a/dbaccess/source/ui/control/marktree.cxx +++ b/dbaccess/source/ui/control/marktree.cxx @@ -165,8 +165,7 @@ void OMarkableTreeListBox::CheckButtons() void OMarkableTreeListBox::CheckButtonHdl() { checkedButton_noBroadcast(GetHdlEntry()); - if (m_aCheckButtonHandler.IsSet()) - m_aCheckButtonHandler.Call(this); + m_aCheckButtonHandler.Call(this); } void OMarkableTreeListBox::checkedButton_noBroadcast(SvTreeListEntry* _pEntry) |