diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-04-10 09:40:19 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-04-10 10:38:23 +0200 |
commit | e9586cf0b5fda0092fdca3ab4db470e8fd765adf (patch) | |
tree | e0340048f9eff52dd72ded1de84324fd6ae211b2 /cui | |
parent | 77e2d29bce92639498324814be56656f85a0f0fd (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 'cui')
-rw-r--r-- | cui/source/inc/cuitabarea.hxx | 4 | ||||
-rw-r--r-- | cui/source/tabpages/tpbitmap.cxx | 11 |
2 files changed, 1 insertions, 14 deletions
diff --git a/cui/source/inc/cuitabarea.hxx b/cui/source/inc/cuitabarea.hxx index ba2760d4fb26..6d6997e0df13 100644 --- a/cui/source/inc/cuitabarea.hxx +++ b/cui/source/inc/cuitabarea.hxx @@ -536,10 +536,6 @@ private: Size rBitmapSize; Size rFilledSize; Size rZoomedSize; - sal_Int64 nFilledWidthPercent; - sal_Int64 nFilledHeightPercent; - sal_Int64 nZoomedWidthPercent; - sal_Int64 nZoomedHeightPercent; DECL_LINK( ModifyBitmapHdl, ValueSet*, void ); DECL_LINK( ClickScaleHdl, Button*, void ); DECL_LINK( ModifyBitmapStyleHdl, ListBox&, void ); diff --git a/cui/source/tabpages/tpbitmap.cxx b/cui/source/tabpages/tpbitmap.cxx index 1b9312715ac5..69df65a60225 100644 --- a/cui/source/tabpages/tpbitmap.cxx +++ b/cui/source/tabpages/tpbitmap.cxx @@ -83,11 +83,7 @@ SvxBitmapTabPage::SvxBitmapTabPage( vcl::Window* pParent, const SfxItemSet& rInA m_bLogicalSize(false), m_aXFillAttr ( rInAttrs.GetPool() ), m_rXFSet ( m_aXFillAttr.GetItemSet() ), - mpView(nullptr), - nFilledWidthPercent(0), - nFilledHeightPercent(0), - nZoomedWidthPercent(0), - nZoomedHeightPercent(0) + mpView(nullptr) { get(m_pBitmapLB,"BITMAP"); get(m_pBitmapStyleLB, "bitmapstyle"); @@ -479,11 +475,6 @@ void SvxBitmapTabPage::CalculateBitmapPresetSize() rZoomedSize.setWidth( nObjectWidth ); rZoomedSize.setHeight( rBitmapSize.Height()*nObjectWidth/rBitmapSize.Width() ); } - - nFilledWidthPercent = static_cast<sal_Int64>(rFilledSize.Width()*100/rBitmapSize.Width()); - nFilledHeightPercent = static_cast<sal_Int64>(rFilledSize.Width()*100/rBitmapSize.Height()); - nZoomedWidthPercent = static_cast<sal_Int64>(rZoomedSize.Width()*100/rBitmapSize.Width()); - nZoomedHeightPercent = static_cast<sal_Int64>(rZoomedSize.Height()*100/rBitmapSize.Height()); } } |