From ea1839853fbdc49ead92a7cd465e427f4167cea2 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 4 Jul 2017 11:23:59 +0200 Subject: loplugin:unusedfields in editeng Change-Id: I9806d87028a11a8103c35004c87b5098ca591409 Reviewed-on: https://gerrit.libreoffice.org/39495 Tested-by: Jenkins Reviewed-by: Noel Grandin --- extensions/source/abpilot/datasourcehandling.cxx | 8 +------- extensions/source/propctrlr/usercontrol.cxx | 21 --------------------- extensions/source/propctrlr/usercontrol.hxx | 5 +---- 3 files changed, 2 insertions(+), 32 deletions(-) (limited to 'extensions/source') diff --git a/extensions/source/abpilot/datasourcehandling.cxx b/extensions/source/abpilot/datasourcehandling.cxx index e543b396fc60..2f95469d3054 100644 --- a/extensions/source/abpilot/datasourcehandling.cxx +++ b/extensions/source/abpilot/datasourcehandling.cxx @@ -298,12 +298,10 @@ namespace abp ::utl::SharedUNOComponent< XConnection > xConnection; StringBag aTables; // the cached table names - OUString sName; - bool bTablesUpToDate; // table name cache up-to-date? + OUString sName; explicit ODataSourceImpl(const Reference< XComponentContext >& _rxORB) : xORB(_rxORB) - , bTablesUpToDate(false) { } @@ -317,7 +315,6 @@ namespace abp ,xConnection( _rSource.xConnection ) ,aTables( _rSource.aTables ) ,sName( _rSource.sName ) - ,bTablesUpToDate( _rSource.bTablesUpToDate ) { } @@ -518,7 +515,6 @@ namespace abp } // now the table cache is up-to-date - m_pImpl->bTablesUpToDate = true; return m_pImpl->aTables; } @@ -607,7 +603,6 @@ namespace abp // success m_pImpl->xConnection.reset( xConnection ); m_pImpl->aTables.clear(); - m_pImpl->bTablesUpToDate = false; return true; } @@ -617,7 +612,6 @@ namespace abp { m_pImpl->xConnection.clear(); m_pImpl->aTables.clear(); - m_pImpl->bTablesUpToDate = false; } diff --git a/extensions/source/propctrlr/usercontrol.cxx b/extensions/source/propctrlr/usercontrol.cxx index b05f78860d58..81c7ba7c70c1 100644 --- a/extensions/source/propctrlr/usercontrol.cxx +++ b/extensions/source/propctrlr/usercontrol.cxx @@ -173,8 +173,6 @@ namespace pcr :OFormattedNumericControl_Base( PropertyControlType::Unknown, pParent, nWinStyle ) { getTypedControlWindow()->TreatAsNumber(true); - - m_nLastDecimalDigits = getTypedControlWindow()->GetDecimalDigits(); } @@ -225,24 +223,6 @@ namespace pcr DBG_ASSERT( pEntry, "OFormattedNumericControl::SetFormatDescription: invalid format key!" ); if ( pEntry ) { - switch (pEntry->GetType() & ~css::util::NumberFormat::DEFINED) - { - case css::util::NumberFormat::NUMBER: - case css::util::NumberFormat::CURRENCY: - case css::util::NumberFormat::SCIENTIFIC: - case css::util::NumberFormat::FRACTION: - case css::util::NumberFormat::PERCENT: - m_nLastDecimalDigits = getTypedControlWindow()->GetDecimalDigits(); - break; - case css::util::NumberFormat::DATETIME: - case css::util::NumberFormat::DATE: - case css::util::NumberFormat::TIME: - m_nLastDecimalDigits = 7; - break; - default: - m_nLastDecimalDigits = 0; - break; - } bFallback = false; } @@ -253,7 +233,6 @@ namespace pcr getTypedControlWindow()->TreatAsNumber(false); getTypedControlWindow()->SetFormatter(nullptr); getTypedControlWindow()->SetText(""); - m_nLastDecimalDigits = 0; } } diff --git a/extensions/source/propctrlr/usercontrol.hxx b/extensions/source/propctrlr/usercontrol.hxx index 2dde63d403ef..6fc75e2e007f 100644 --- a/extensions/source/propctrlr/usercontrol.hxx +++ b/extensions/source/propctrlr/usercontrol.hxx @@ -98,9 +98,6 @@ namespace pcr typedef CommonBehaviourControl< css::inspection::XPropertyControl, FormattedField > OFormattedNumericControl_Base; class OFormattedNumericControl : public OFormattedNumericControl_Base { - private: - sal_Int32 m_nLastDecimalDigits; - public: OFormattedNumericControl( vcl::Window* pParent, WinBits nWinStyle); @@ -112,7 +109,7 @@ namespace pcr void SetFormatDescription( const FormatDescription& rDesc ); // make some FormattedField methods available - void SetDecimalDigits(sal_uInt16 nPrecision) { getTypedControlWindow()->SetDecimalDigits(nPrecision); m_nLastDecimalDigits = nPrecision; } + void SetDecimalDigits(sal_uInt16 nPrecision) { getTypedControlWindow()->SetDecimalDigits(nPrecision); } void SetDefaultValue(double dDef) { getTypedControlWindow()->SetDefaultValue(dDef); } void EnableEmptyField(bool bEnable) { getTypedControlWindow()->EnableEmptyField(bEnable); } void SetThousandsSep(bool bEnable) { getTypedControlWindow()->SetThousandsSep(bEnable); } -- cgit