diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-06-22 14:50:10 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-06-23 09:01:24 +0200 |
commit | 7b5fac67fd2441778cb9a6d2f529adc270998144 (patch) | |
tree | 93031caf680ccfe0b7a34d89822811ff172c55fa /chart2 | |
parent | 75ddf3a22aa83d1b067085bd7132acab5a088856 (diff) |
loplugin:unusedfields in accessibility..comphelper
Change-Id: Ifb68d65fc3e48dd80e3ff2b7a4124468fdda1695
Reviewed-on: https://gerrit.libreoffice.org/39137
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'chart2')
14 files changed, 17 insertions, 97 deletions
diff --git a/chart2/source/controller/dialogs/DataBrowser.cxx b/chart2/source/controller/dialogs/DataBrowser.cxx index 2e83401aa76d..3c659927f8e0 100644 --- a/chart2/source/controller/dialogs/DataBrowser.cxx +++ b/chart2/source/controller/dialogs/DataBrowser.cxx @@ -439,7 +439,6 @@ DataBrowser::DataBrowser( vcl::Window* pParent, WinBits nStyle, bool bLiveUpdate ::svt::EditBrowseBox( pParent, EditBrowseBoxFlags::SMART_TAB_TRAVEL | EditBrowseBoxFlags::HANDLE_COLUMN_TEXT, nStyle, BrowserStdFlags ), m_nSeekRow( 0 ), m_bIsReadOnly( false ), - m_bIsDirty( false ), m_bLiveUpdate( bLiveUpdate ), m_bDataValid( true ), m_aNumberEditField( VclPtr<FormattedField>::Create( & EditBrowseBox::GetDataWindow(), WB_NOBORDER ) ), @@ -452,7 +451,6 @@ DataBrowser::DataBrowser( vcl::Window* pParent, WinBits nStyle, bool bLiveUpdate m_aNumberEditField->SetDefaultValue( fNan ); m_aNumberEditField->TreatAsNumber( true ); RenewTable(); - SetClean(); } DataBrowser::~DataBrowser() @@ -628,7 +626,6 @@ void DataBrowser::RenewTable() } ImplAdjustHeaderControls(); - SetDirty(); SetUpdateMode( bLastUpdateMode ); ActivateCell(); Invalidate(); @@ -737,17 +734,6 @@ void DataBrowser::SetReadOnly( bool bNewState ) } } -void DataBrowser::SetClean() -{ - m_bIsDirty = false; -} - -void DataBrowser::SetDirty() -{ - if( !m_bLiveUpdate ) - m_bIsDirty = true; -} - void DataBrowser::CursorMoved() { EditBrowseBox::CursorMoved(); @@ -804,7 +790,6 @@ bool DataBrowser::IsDataValid() void DataBrowser::CellModified() { m_bDataValid = IsDataValid(); - SetDirty(); m_aCursorMovedHdlLink.Call( this ); } @@ -840,7 +825,6 @@ void DataBrowser::SetDataFromModel( GoToRow( 0 ); GoToColumnId( 1 ); } - SetClean(); } void DataBrowser::InsertColumn() @@ -1213,7 +1197,6 @@ bool DataBrowser::SaveModified() ::svt::CellController* pCtrl = GetController( GetCurRow(), GetCurColumnId()); if( pCtrl ) pCtrl->ClearModified(); - SetDirty(); } return bChangeValid; diff --git a/chart2/source/controller/dialogs/DataBrowser.hxx b/chart2/source/controller/dialogs/DataBrowser.hxx index a3edc8cde4b2..ddc583049166 100644 --- a/chart2/source/controller/dialogs/DataBrowser.hxx +++ b/chart2/source/controller/dialogs/DataBrowser.hxx @@ -63,8 +63,6 @@ protected: virtual void EndScroll() override; virtual void MouseButtonDown( const BrowserMouseEvent& rEvt ) override; - void SetDirty(); - public: DataBrowser( vcl::Window* pParent, WinBits nStyle, bool bLiveUpdate ); virtual ~DataBrowser() override; @@ -93,9 +91,6 @@ public: void SetReadOnly( bool bNewState ); bool IsReadOnly() const { return m_bIsReadOnly;} - /// reset the dirty status, if changes have been saved - void SetClean(); - void SetDataFromModel( const css::uno::Reference< css::chart2::XChartDocument > & xChartDoc, const css::uno::Reference< css::uno::XComponentContext > & xContext ); @@ -155,7 +150,6 @@ private: /// the row that is currently painted long m_nSeekRow; bool m_bIsReadOnly; - bool m_bIsDirty; bool m_bLiveUpdate; bool m_bDataValid; diff --git a/chart2/source/controller/dialogs/res_ErrorBar.cxx b/chart2/source/controller/dialogs/res_ErrorBar.cxx index 998d57862f3c..4e73d7c0ff9f 100644 --- a/chart2/source/controller/dialogs/res_ErrorBar.cxx +++ b/chart2/source/controller/dialogs/res_ErrorBar.cxx @@ -86,8 +86,6 @@ ErrorBarResources::ErrorBarResources( VclBuilderContainer* pParent, Dialog * pPa m_eIndicate( SvxChartIndicate::Both ), m_bErrorKindUnique( true ), m_bIndicatorUnique( true ), - m_bPlusUnique( true ), - m_bMinusUnique( true ), m_bRangePosUnique( true ), m_bRangeNegUnique( true ), m_bNoneAvailable( bNoneAvailable ), @@ -535,14 +533,12 @@ void ErrorBarResources::Reset(const SfxItemSet& rInAttrs) // parameters aState = rInAttrs.GetItemState( SCHATTR_STAT_CONSTPLUS, true, &pPoolItem ); - m_bPlusUnique = ( aState != SfxItemState::DONTCARE ); if( aState == SfxItemState::SET ) { m_fPlusValue = static_cast<const SvxDoubleItem*>(pPoolItem)->GetValue(); } aState = rInAttrs.GetItemState( SCHATTR_STAT_CONSTMINUS, true, &pPoolItem ); - m_bMinusUnique = ( aState != SfxItemState::DONTCARE ); if( aState == SfxItemState::SET ) { m_fMinusValue = static_cast<const SvxDoubleItem*>(pPoolItem)->GetValue(); diff --git a/chart2/source/controller/dialogs/tp_ChartType.cxx b/chart2/source/controller/dialogs/tp_ChartType.cxx index eca76e57e280..d2f979596417 100644 --- a/chart2/source/controller/dialogs/tp_ChartType.cxx +++ b/chart2/source/controller/dialogs/tp_ChartType.cxx @@ -180,13 +180,10 @@ private: VclPtr<RadioButton> m_pRB_Stack_Y; VclPtr<RadioButton> m_pRB_Stack_Y_Percent; VclPtr<RadioButton> m_pRB_Stack_Z; - - bool m_bShowDeepStacking; }; StackingResourceGroup::StackingResourceGroup(VclBuilderContainer* pWindow) : ChangingResource() - , m_bShowDeepStacking(true) { pWindow->get(m_pCB_Stacked, "stack"); pWindow->get(m_pRB_Stack_Y, "ontop"); @@ -201,7 +198,6 @@ StackingResourceGroup::StackingResourceGroup(VclBuilderContainer* pWindow) void StackingResourceGroup::showControls( bool bShow, bool bShowDeepStacking ) { - m_bShowDeepStacking = bShowDeepStacking; m_pCB_Stacked->Show(bShow); m_pRB_Stack_Y->Show(bShow); m_pRB_Stack_Y_Percent->Show(bShow); diff --git a/chart2/source/controller/inc/CommandDispatchContainer.hxx b/chart2/source/controller/inc/CommandDispatchContainer.hxx index dfae2e41018a..9cfed008dfb5 100644 --- a/chart2/source/controller/inc/CommandDispatchContainer.hxx +++ b/chart2/source/controller/inc/CommandDispatchContainer.hxx @@ -70,8 +70,7 @@ public: // handled by other dispatchers. (Chart is currently the controller // itself) explicit CommandDispatchContainer( - const css::uno::Reference< css::uno::XComponentContext > & xContext, - ChartController* pController ); + const css::uno::Reference< css::uno::XComponentContext > & xContext ); void setModel( const css::uno::Reference< css::frame::XModel > & xModel ); @@ -126,7 +125,6 @@ private: css::uno::Reference< css::frame::XDispatch > m_xChartDispatcher; std::set< OUString > m_aChartCommands; - ChartController* m_pChartController; DrawCommandDispatch* m_pDrawCommandDispatch; ShapeController* m_pShapeController; }; diff --git a/chart2/source/controller/inc/ItemConverter.hxx b/chart2/source/controller/inc/ItemConverter.hxx index 7e791de8eac4..9c2609897230 100644 --- a/chart2/source/controller/inc/ItemConverter.hxx +++ b/chart2/source/controller/inc/ItemConverter.hxx @@ -186,7 +186,6 @@ private: css::uno::Reference< css::beans::XPropertySetInfo > m_xPropertySetInfo; SfxItemPool& m_rItemPool; - bool m_bIsValid; }; }} diff --git a/chart2/source/controller/inc/SeriesOptionsItemConverter.hxx b/chart2/source/controller/inc/SeriesOptionsItemConverter.hxx index dd313a08de55..c04b626a026f 100644 --- a/chart2/source/controller/inc/SeriesOptionsItemConverter.hxx +++ b/chart2/source/controller/inc/SeriesOptionsItemConverter.hxx @@ -61,7 +61,6 @@ private: bool m_bSupportingAxisSideBySide; bool m_bGroupBarsPerAxis; - bool m_bAllSeriesAttachedToSameAxis; sal_Int32 m_nAllSeriesAxisIndex; bool m_bSupportingStartingAngle; diff --git a/chart2/source/controller/inc/res_ErrorBar.hxx b/chart2/source/controller/inc/res_ErrorBar.hxx index 2b1b5f12894d..c7987d2fbdbb 100644 --- a/chart2/source/controller/inc/res_ErrorBar.hxx +++ b/chart2/source/controller/inc/res_ErrorBar.hxx @@ -103,8 +103,6 @@ private: bool m_bErrorKindUnique; bool m_bIndicatorUnique; - bool m_bPlusUnique; - bool m_bMinusUnique; bool m_bRangePosUnique; bool m_bRangeNegUnique; diff --git a/chart2/source/controller/itemsetwrapper/ItemConverter.cxx b/chart2/source/controller/itemsetwrapper/ItemConverter.cxx index db43d225b73a..fe339e917399 100644 --- a/chart2/source/controller/itemsetwrapper/ItemConverter.cxx +++ b/chart2/source/controller/itemsetwrapper/ItemConverter.cxx @@ -36,8 +36,7 @@ ItemConverter::ItemConverter( SfxItemPool& rItemPool ) : m_xPropertySet( rPropertySet ), m_xPropertySetInfo( nullptr ), - m_rItemPool( rItemPool ), - m_bIsValid( true ) + m_rItemPool( rItemPool ) { resetPropertySet( m_xPropertySet ); } @@ -70,12 +69,8 @@ SfxItemSet ItemConverter::CreateEmptyItemSet() const return SfxItemSet( GetItemPool(), GetWhichPairs() ); } -void ItemConverter::_disposing( const lang::EventObject& rSource ) +void ItemConverter::_disposing( const lang::EventObject& ) { - if( rSource.Source == m_xPropertySet ) - { - m_bIsValid = false; - } } void ItemConverter::FillItemSet( SfxItemSet & rOutItemSet ) const diff --git a/chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx b/chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx index c09349484b9b..89204580b11e 100644 --- a/chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx +++ b/chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx @@ -65,7 +65,6 @@ SeriesOptionsItemConverter::SeriesOptionsItemConverter( , m_bConnectBars(false) , m_bSupportingAxisSideBySide(false) , m_bGroupBarsPerAxis(true) - , m_bAllSeriesAttachedToSameAxis(true) , m_nAllSeriesAxisIndex(-1) , m_bSupportingStartingAngle(false) , m_nStartingAngle(90) @@ -128,7 +127,6 @@ SeriesOptionsItemConverter::SeriesOptionsItemConverter( if( m_bSupportingAxisSideBySide && xDiagramProperties.is() ) { xDiagramProperties->getPropertyValue( "GroupBarsPerAxis" ) >>= m_bGroupBarsPerAxis; - m_bAllSeriesAttachedToSameAxis = DataSeriesHelper::areAllSeriesAttachedToSameAxis( xChartType, m_nAllSeriesAxisIndex ); } m_bSupportingStartingAngle = ChartTypeHelper::isSupportingStartingAngle( xChartType ); diff --git a/chart2/source/controller/main/ChartController.cxx b/chart2/source/controller/main/ChartController.cxx index c1a91ee6a389..5e278b9bf362 100644 --- a/chart2/source/controller/main/ChartController.cxx +++ b/chart2/source/controller/main/ChartController.cxx @@ -117,7 +117,7 @@ ChartController::ChartController(uno::Reference<uno::XComponentContext> const & m_bConnectingToView(false), m_bDisposed(false), m_xUndoManager( nullptr ), - m_aDispatchContainer( m_xCC, this ), + m_aDispatchContainer( m_xCC ), m_eDrawMode( CHARTDRAW_SELECT ), mpSelectionChangeHandler(new svx::sidebar::SelectionChangeHandler( [this]() { return this->GetContextName(); }, diff --git a/chart2/source/controller/main/CommandDispatchContainer.cxx b/chart2/source/controller/main/CommandDispatchContainer.cxx index a03083a31342..5ad221ea876d 100644 --- a/chart2/source/controller/main/CommandDispatchContainer.cxx +++ b/chart2/source/controller/main/CommandDispatchContainer.cxx @@ -37,9 +37,8 @@ namespace chart { CommandDispatchContainer::CommandDispatchContainer( - const Reference< uno::XComponentContext > & xContext, ChartController* pController ) + const Reference< uno::XComponentContext > & xContext ) :m_xContext( xContext ) - ,m_pChartController( pController ) ,m_pDrawCommandDispatch( nullptr ) ,m_pShapeController( nullptr ) { @@ -155,7 +154,6 @@ void CommandDispatchContainer::DisposeAndClear() m_aToBeDisposedDispatches.clear(); m_xChartDispatcher.clear(); m_aChartCommands.clear(); - m_pChartController = nullptr; m_pDrawCommandDispatch = nullptr; m_pShapeController = nullptr; } diff --git a/chart2/source/inc/MediaDescriptorHelper.hxx b/chart2/source/inc/MediaDescriptorHelper.hxx index 488a31851b25..fd20e1f441a7 100644 --- a/chart2/source/inc/MediaDescriptorHelper.hxx +++ b/chart2/source/inc/MediaDescriptorHelper.hxx @@ -70,21 +70,16 @@ public: //@todo define this for debug only, except URL bool AsTemplate; //document is a template. - bool ISSET_AsTemplate; css::uno::Any ComponentData; - bool ISSET_ComponentData; css::uno::Any FilterData; - bool ISSET_FilterData; OUString FilterName; //internal filter name. bool ISSET_FilterName; bool Hidden; //load document, invisible. - bool ISSET_Hidden; OUString HierarchicalDocumentName; - bool ISSET_HierarchicalDocumentName; css::uno::Reference< css::io::XOutputStream > OutputStream; //a stream to receive the document data for saving @@ -94,30 +89,21 @@ public: bool ISSET_InputStream; bool OpenNewView; //opens a new view for an already loaded document. - bool ISSET_OpenNewView; bool Overwrite; //opens a new view for an already loaded document. - bool ISSET_Overwrite; bool Preview; //show preview. - bool ISSET_Preview; bool ReadOnly; //open document readonly. - bool ISSET_ReadOnly; //not documented ... @todo remove? bool Silent; //prevents dialogs to query for more information. - bool ISSET_Silent; bool Unpacked; - bool ISSET_Unpacked; OUString URL;// FileName, URL of the document. bool ISSET_URL; sal_Int16 Version; //storage version. - bool ISSET_Version; css::uno::Any ViewData; - bool ISSET_ViewData; sal_Int16 ViewId; //id of the initial view. - bool ISSET_ViewId; // new framework objects css::uno::Reference< css::embed::XStorage > @@ -128,7 +114,6 @@ public: bool ISSET_Stream; bool SetEmbedded; - bool ISSET_SetEmbedded; protected: SAL_DLLPRIVATE void impl_init(); diff --git a/chart2/source/tools/MediaDescriptorHelper.cxx b/chart2/source/tools/MediaDescriptorHelper.cxx index fda1f0d442f6..a96dddf731b7 100644 --- a/chart2/source/tools/MediaDescriptorHelper.cxx +++ b/chart2/source/tools/MediaDescriptorHelper.cxx @@ -61,7 +61,7 @@ MediaDescriptorHelper::MediaDescriptorHelper( const uno::Sequence< if (rProp.Name == "AsTemplate") { - ISSET_AsTemplate = rProp.Value >>= AsTemplate; + rProp.Value >>= AsTemplate; addModelProp(rProp); } else if (rProp.Name == "Author") @@ -79,7 +79,6 @@ MediaDescriptorHelper::MediaDescriptorHelper( const uno::Sequence< else if (rProp.Name == "ComponentData") { ComponentData = rProp.Value; - ISSET_ComponentData = ComponentData.hasValue(); addModelProp(rProp); } else if (rProp.Name == "FileName") @@ -89,7 +88,6 @@ MediaDescriptorHelper::MediaDescriptorHelper( const uno::Sequence< else if (rProp.Name == "FilterData") { FilterData = rProp.Value; - ISSET_FilterData = FilterData.hasValue(); addModelProp(rProp); } else if (rProp.Name == "FilterName") @@ -111,12 +109,12 @@ MediaDescriptorHelper::MediaDescriptorHelper( const uno::Sequence< } else if (rProp.Name == "Hidden") { - ISSET_Hidden = rProp.Value >>= Hidden; + rProp.Value >>= Hidden; addModelProp(rProp); } else if (rProp.Name == "HierarchicalDocumentName") { - ISSET_HierarchicalDocumentName = rProp.Value >>= HierarchicalDocumentName; + rProp.Value >>= HierarchicalDocumentName; addModelProp(rProp); } else if (rProp.Name == "OutputStream") @@ -147,12 +145,12 @@ MediaDescriptorHelper::MediaDescriptorHelper( const uno::Sequence< } else if (rProp.Name == "OpenNewView") { - ISSET_OpenNewView = rProp.Value >>= OpenNewView; + rProp.Value >>= OpenNewView; addRegularProp(rProp); } else if (rProp.Name == "Overwrite") { - ISSET_Overwrite = rProp.Value >>= Overwrite; + rProp.Value >>= Overwrite; addModelProp(rProp); } else if (rProp.Name == "Password") @@ -173,12 +171,12 @@ MediaDescriptorHelper::MediaDescriptorHelper( const uno::Sequence< } else if (rProp.Name == "Preview") { - ISSET_Preview = rProp.Value >>= Preview; + rProp.Value >>= Preview; addModelProp(rProp); } else if (rProp.Name == "ReadOnly") { - ISSET_ReadOnly = rProp.Value >>= ReadOnly; + rProp.Value >>= ReadOnly; addRegularProp(rProp); } else if (rProp.Name == "Referer") @@ -187,12 +185,12 @@ MediaDescriptorHelper::MediaDescriptorHelper( const uno::Sequence< } else if (rProp.Name == "SetEmbedded") { - ISSET_SetEmbedded = rProp.Value >>= SetEmbedded; + rProp.Value >>= SetEmbedded; addRegularProp(rProp); } else if (rProp.Name == "Silent") { - ISSET_Silent = rProp.Value >>= Silent; + rProp.Value >>= Silent; addRegularProp(rProp); } else if (rProp.Name == "StatusIndicator") @@ -219,7 +217,7 @@ MediaDescriptorHelper::MediaDescriptorHelper( const uno::Sequence< } else if (rProp.Name == "Unpacked") { - ISSET_Unpacked = rProp.Value >>= Unpacked; + rProp.Value >>= Unpacked; addModelProp(rProp); } else if (rProp.Name == "URL") @@ -229,18 +227,17 @@ MediaDescriptorHelper::MediaDescriptorHelper( const uno::Sequence< } else if (rProp.Name == "Version") { - ISSET_Version = rProp.Value >>= Version; + rProp.Value >>= Version; addModelProp(rProp); } else if (rProp.Name == "ViewData") { ViewData = rProp.Value; - ISSET_ViewData = ViewData.hasValue(); addModelProp(rProp); } else if (rProp.Name == "ViewId") { - ISSET_ViewId = rProp.Value >>= ViewId; + rProp.Value >>= ViewId; addModelProp(rProp); } else if (rProp.Name == "WinExtent") @@ -263,41 +260,25 @@ MediaDescriptorHelper::MediaDescriptorHelper( const uno::Sequence< void MediaDescriptorHelper::impl_init() { AsTemplate = false; - ISSET_AsTemplate = false; - ISSET_ComponentData = false; - - ISSET_FilterData = false; ISSET_FilterName = false; Hidden = false; - ISSET_Hidden = false; - ISSET_HierarchicalDocumentName = false; ISSET_OutputStream = false; ISSET_InputStream = false; OpenNewView = false; - ISSET_OpenNewView = false; Overwrite = false; - ISSET_Overwrite = false; Preview = false; - ISSET_Preview = false; ReadOnly = false; - ISSET_ReadOnly = false; Silent = false; - ISSET_Silent = false; Unpacked = false; - ISSET_Unpacked = false; ISSET_URL = false; Version = 0; - ISSET_Version = false; - ISSET_ViewData = false; ViewId = 0; - ISSET_ViewId = false; SetEmbedded = false; - ISSET_SetEmbedded = false; ISSET_Storage = false; ISSET_Stream = false; |