diff options
author | Noel Grandin <noel@peralex.com> | 2016-06-27 15:08:50 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-06-28 11:21:17 +0000 |
commit | 48a8d6d8434908690bc2a51d27f1051bd550c9b0 (patch) | |
tree | 066f8fc9753bdba62f87f205baface6e729857bf /svtools | |
parent | f7d6f3e4e3fda3cd4936880918e2831246634a3e (diff) |
loplugin:singlevalfields in various
Change-Id: Ia0d8f463a4dba9ec63aa0159441e3e607dd3bf5e
Reviewed-on: https://gerrit.libreoffice.org/26738
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/source/control/tabbar.cxx | 5 | ||||
-rw-r--r-- | svtools/source/graphic/descriptor.cxx | 6 | ||||
-rw-r--r-- | svtools/source/graphic/descriptor.hxx | 1 |
3 files changed, 3 insertions, 9 deletions
diff --git a/svtools/source/control/tabbar.cxx b/svtools/source/control/tabbar.cxx index 64abad5c61d9..0662e0693d95 100644 --- a/svtools/source/control/tabbar.cxx +++ b/svtools/source/control/tabbar.cxx @@ -559,7 +559,6 @@ void TabBar::ImplInit( WinBits nWinStyle ) mbFormat = true; mbFirstFormat = true; mbSizeFormat = true; - mbAutoMaxWidth = true; mbInSwitching = false; mbAutoEditMode = false; mbEditCanceled = false; @@ -688,14 +687,12 @@ bool TabBar::ImplCalcWidth() if (mnMaxPageWidth) mnCurMaxWidth = mnMaxPageWidth; - else if (mbAutoMaxWidth) + else { mnCurMaxWidth = mnLastOffX - mnOffX; if (mnCurMaxWidth < 1) mnCurMaxWidth = 1; } - else - mnCurMaxWidth = 0; bool bChanged = false; for (ImplTabBarItem* pItem : mpImpl->mpItemList) diff --git a/svtools/source/graphic/descriptor.cxx b/svtools/source/graphic/descriptor.cxx index f4d268c6117e..1cec88463da3 100644 --- a/svtools/source/graphic/descriptor.cxx +++ b/svtools/source/graphic/descriptor.cxx @@ -59,8 +59,7 @@ GraphicDescriptor::GraphicDescriptor() : mpGraphic( nullptr ), meType( GraphicType::NONE ), mnBitsPerPixel ( 0 ), - mbTransparent ( false ), - mbAlpha( false ) + mbTransparent ( false ) { } @@ -149,7 +148,6 @@ void GraphicDescriptor::implCreate( SvStream& rIStm, const OUString* pURL ) maSize100thMM = aDescriptor.GetSize_100TH_MM(); mnBitsPerPixel = aDescriptor.GetBitsPerPixel(); mbTransparent = ( graphic::GraphicType::VECTOR == cType ); - mbAlpha = false; } } } @@ -418,7 +416,7 @@ void GraphicDescriptor::_getPropertyValues( const comphelper::PropertyMapEntry** case UnoGraphicProperty::Alpha: { - *pValues <<= mpGraphic ? mpGraphic->IsAlpha() : mbAlpha; + *pValues <<= mpGraphic && mpGraphic->IsAlpha(); } break; diff --git a/svtools/source/graphic/descriptor.hxx b/svtools/source/graphic/descriptor.hxx index 026bd4a30918..998d0260e636 100644 --- a/svtools/source/graphic/descriptor.hxx +++ b/svtools/source/graphic/descriptor.hxx @@ -109,7 +109,6 @@ private: Size maSize100thMM; sal_uInt16 mnBitsPerPixel; bool mbTransparent; - bool mbAlpha; GraphicDescriptor( const GraphicDescriptor& rDescriptor ) = delete; |