summaryrefslogtreecommitdiff
path: root/sfx2/source/control
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-04-10 09:40:19 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-04-10 10:38:23 +0200
commite9586cf0b5fda0092fdca3ab4db470e8fd765adf (patch)
treee0340048f9eff52dd72ded1de84324fd6ae211b2 /sfx2/source/control
parent77e2d29bce92639498324814be56656f85a0f0fd (diff)
loplugin:unusedfield improvements
improve the read-only check to ignore reads from fields that are guarded by a boolean check, something like: if (field) field.foo(); this produces some false positives at the moment because I'm not correctly handling the else block, but also some useful new dead code. Change-Id: Id21fa1a56c171d09d979769b978b6eef14e8b695 Reviewed-on: https://gerrit.libreoffice.org/52664 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sfx2/source/control')
-rw-r--r--sfx2/source/control/charwin.cxx16
1 files changed, 0 insertions, 16 deletions
diff --git a/sfx2/source/control/charwin.cxx b/sfx2/source/control/charwin.cxx
index 174d6ec5e759..7724f2df3a2b 100644
--- a/sfx2/source/control/charwin.cxx
+++ b/sfx2/source/control/charwin.cxx
@@ -330,26 +330,10 @@ void SvxCharViewControl::createContextMenu()
ScopedVclPtrInstance<PopupMenu> pItemMenu;
pItemMenu->InsertItem(0,SfxResId(STR_CLEAR_CHAR));
pItemMenu->InsertItem(1,SfxResId(STR_CLEAR_ALL_CHAR));
- pItemMenu->SetSelectHdl(LINK(this, SvxCharViewControl, ContextMenuSelectHdl));
pItemMenu->Execute(this, tools::Rectangle(maPosition,Size(1,1)), PopupMenuFlags::ExecuteDown);
Invalidate();
}
-IMPL_LINK(SvxCharViewControl, ContextMenuSelectHdl, Menu*, pMenu, bool)
-{
- sal_uInt16 nMenuId = pMenu->GetCurItemId();
-
- switch(nMenuId)
- {
- case 0:
- maClearClickHdl.Call(this);
- break;
- default:
- break;
- }
- return false;
-}
-
void SvxCharViewControl::Paint(vcl::RenderContext& rRenderContext, const ::tools::Rectangle&)
{
rRenderContext.SetFont(maFont);