diff options
author | Noel Grandin <noel@peralex.com> | 2016-03-08 17:04:25 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2016-03-09 10:07:47 +0200 |
commit | 1b1080fe8a2368410982c5b11575de183fb1bfa9 (patch) | |
tree | b36be6e160d6c647a9769bae5058e291822f4b33 /dbaccess/source/ui/app | |
parent | ed4375c6d834e68a3f7c7dfb39a6ae0755da4785 (diff) |
loplugin:constantparam in dbaccess
Change-Id: I44b5a586a1b0da47e032dff097ebf545f5fe76fc
Diffstat (limited to 'dbaccess/source/ui/app')
-rw-r--r-- | dbaccess/source/ui/app/AppDetailPageHelper.cxx | 50 | ||||
-rw-r--r-- | dbaccess/source/ui/app/AppDetailPageHelper.hxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/app/AppDetailView.cxx | 60 | ||||
-rw-r--r-- | dbaccess/source/ui/app/AppDetailView.hxx | 4 | ||||
-rw-r--r-- | dbaccess/source/ui/app/AppSwapWindow.cxx | 24 | ||||
-rw-r--r-- | dbaccess/source/ui/app/AppSwapWindow.hxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/app/AppTitleWindow.cxx | 24 | ||||
-rw-r--r-- | dbaccess/source/ui/app/AppTitleWindow.hxx | 4 |
8 files changed, 67 insertions, 103 deletions
diff --git a/dbaccess/source/ui/app/AppDetailPageHelper.cxx b/dbaccess/source/ui/app/AppDetailPageHelper.cxx index 3abd1f85fdee..2f2e240d4e8c 100644 --- a/dbaccess/source/ui/app/AppDetailPageHelper.cxx +++ b/dbaccess/source/ui/app/AppDetailPageHelper.cxx @@ -128,7 +128,7 @@ namespace class OTablePreviewWindow : public vcl::Window { DECL_LINK_TYPED(OnDisableInput, void*, void); - void ImplInitSettings( bool bFont, bool bForeground, bool bBackground ); + void ImplInitSettings( bool bBackground ); protected: virtual void DataChanged(const DataChangedEvent& rDCEvt) override; public: @@ -137,7 +137,7 @@ namespace }; OTablePreviewWindow::OTablePreviewWindow(vcl::Window* pParent, WinBits nStyle) : Window( pParent, nStyle) { - ImplInitSettings( true, true, true ); + ImplInitSettings( true ); } bool OTablePreviewWindow::Notify( NotifyEvent& rNEvt ) { @@ -157,27 +157,21 @@ namespace if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & AllSettingsFlags::STYLE) ) { - ImplInitSettings( true, true, true ); + ImplInitSettings( true ); Invalidate(); } } - void OTablePreviewWindow::ImplInitSettings( bool bFont, bool bForeground, bool bBackground ) + void OTablePreviewWindow::ImplInitSettings( bool bBackground ) { //FIXME RenderContext const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); - if( bFont ) - { - vcl::Font aFont; - aFont = rStyleSettings.GetFieldFont(); - aFont.SetColor( rStyleSettings.GetWindowTextColor() ); - SetPointFont(*this, aFont); - } + vcl::Font aFont; + aFont = rStyleSettings.GetFieldFont(); + aFont.SetColor( rStyleSettings.GetWindowTextColor() ); + SetPointFont(*this, aFont); - if( bForeground || bFont ) - { - SetTextColor( rStyleSettings.GetFieldTextColor() ); - SetTextFillColor(); - } + SetTextColor( rStyleSettings.GetFieldTextColor() ); + SetTextFillColor(); if( bBackground ) SetBackground( rStyleSettings.GetFieldColor() ); @@ -1251,7 +1245,7 @@ void OAppDetailPageHelper::ImplInitSettings() OPreviewWindow::OPreviewWindow(vcl::Window* _pParent) : Window(_pParent) { - ImplInitSettings( true, true, true ); + ImplInitSettings( true ); } bool OPreviewWindow::ImplGetGraphicCenterRect( const Graphic& rGraphic, Rectangle& rResultRect ) const @@ -1310,28 +1304,22 @@ void OPreviewWindow::DataChanged( const DataChangedEvent& rDCEvt ) if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & AllSettingsFlags::STYLE) ) { - ImplInitSettings( true, true, true ); + ImplInitSettings( true ); Invalidate(); } } -void OPreviewWindow::ImplInitSettings( bool bFont, bool bForeground, bool bBackground ) +void OPreviewWindow::ImplInitSettings( bool bBackground ) { // FIXME RenderContext const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); - if( bFont ) - { - vcl::Font aFont; - aFont = rStyleSettings.GetFieldFont(); - aFont.SetColor( rStyleSettings.GetWindowTextColor() ); - SetPointFont(*this, aFont); - } + vcl::Font aFont; + aFont = rStyleSettings.GetFieldFont(); + aFont.SetColor( rStyleSettings.GetWindowTextColor() ); + SetPointFont(*this, aFont); - if( bForeground || bFont ) - { - SetTextColor( rStyleSettings.GetFieldTextColor() ); - SetTextFillColor(); - } + SetTextColor( rStyleSettings.GetFieldTextColor() ); + SetTextFillColor(); if( bBackground ) SetBackground( rStyleSettings.GetFieldColor() ); diff --git a/dbaccess/source/ui/app/AppDetailPageHelper.hxx b/dbaccess/source/ui/app/AppDetailPageHelper.hxx index 24bf5e8d47b9..96c8423969b0 100644 --- a/dbaccess/source/ui/app/AppDetailPageHelper.hxx +++ b/dbaccess/source/ui/app/AppDetailPageHelper.hxx @@ -62,7 +62,7 @@ namespace dbaui <TRUE/> when successful */ bool ImplGetGraphicCenterRect( const Graphic& rGraphic, Rectangle& rResultRect ) const; - void ImplInitSettings( bool bFont, bool bForeground, bool bBackground ); + void ImplInitSettings( bool bBackground ); protected: virtual void DataChanged(const DataChangedEvent& rDCEvt) override; public: diff --git a/dbaccess/source/ui/app/AppDetailView.cxx b/dbaccess/source/ui/app/AppDetailView.cxx index 99470b0af965..e42d80587382 100644 --- a/dbaccess/source/ui/app/AppDetailView.cxx +++ b/dbaccess/source/ui/app/AppDetailView.cxx @@ -360,7 +360,7 @@ OTasksWindow::OTasksWindow(vcl::Window* _pParent,OApplicationDetailView* _pDetai m_aCreation->SetDefaultCollapsedEntryBmp( aFolderImage ); m_aCreation->SetDefaultExpandedEntryBmp( aFolderImage ); - ImplInitSettings(true,true,true); + ImplInitSettings(true); } OTasksWindow::~OTasksWindow() @@ -386,32 +386,26 @@ void OTasksWindow::DataChanged( const DataChangedEvent& rDCEvt ) if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & AllSettingsFlags::STYLE) ) { - ImplInitSettings( true, true, true ); + ImplInitSettings( true ); Invalidate(); } } -void OTasksWindow::ImplInitSettings( bool bFont, bool bForeground, bool bBackground ) +void OTasksWindow::ImplInitSettings( bool bBackground ) { // FIXME RenderContext const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); - if( bFont ) - { - vcl::Font aFont; - aFont = rStyleSettings.GetFieldFont(); - aFont.SetColor( rStyleSettings.GetWindowTextColor() ); - SetPointFont(*this, aFont); - } - - if( bForeground || bFont ) - { - SetTextColor( rStyleSettings.GetFieldTextColor() ); - SetTextFillColor(); - m_aHelpText->SetTextColor( rStyleSettings.GetFieldTextColor() ); - m_aHelpText->SetTextFillColor(); - m_aDescription->SetTextColor( rStyleSettings.GetFieldTextColor() ); - m_aDescription->SetTextFillColor(); - } + vcl::Font aFont; + aFont = rStyleSettings.GetFieldFont(); + aFont.SetColor( rStyleSettings.GetWindowTextColor() ); + SetPointFont(*this, aFont); + + SetTextColor( rStyleSettings.GetFieldTextColor() ); + SetTextFillColor(); + m_aHelpText->SetTextColor( rStyleSettings.GetFieldTextColor() ); + m_aHelpText->SetTextFillColor(); + m_aDescription->SetTextColor( rStyleSettings.GetFieldTextColor() ); + m_aDescription->SetTextFillColor(); if( bBackground ) { @@ -421,7 +415,7 @@ void OTasksWindow::ImplInitSettings( bool bFont, bool bForeground, bool bBackgro m_aFL->SetBackground( rStyleSettings.GetFieldColor() ); } - vcl::Font aFont = m_aDescription->GetControlFont(); + aFont = m_aDescription->GetControlFont(); aFont.SetWeight(WEIGHT_BOLD); m_aDescription->SetControlFont(aFont); } @@ -539,7 +533,7 @@ OApplicationDetailView::OApplicationDetailView(OAppBorderWindow& _rParent,Previe ,m_rBorderWin(_rParent) { SetUniqueId(UID_APP_DETAIL_VIEW); - ImplInitSettings( true, true, true ); + ImplInitSettings( true ); m_pControlHelper = VclPtr<OAppDetailPageHelper>::Create(m_aContainer.get(),m_rBorderWin,_ePreviewMode); m_pControlHelper->Show(); @@ -581,23 +575,17 @@ void OApplicationDetailView::dispose() OSplitterView::dispose(); } -void OApplicationDetailView::ImplInitSettings( bool bFont, bool bForeground, bool bBackground ) +void OApplicationDetailView::ImplInitSettings( bool bBackground ) { // FIXME RenderContext const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); - if( bFont ) - { - vcl::Font aFont; - aFont = rStyleSettings.GetFieldFont(); - aFont.SetColor( rStyleSettings.GetWindowTextColor() ); - SetPointFont(*this, aFont); - } + vcl::Font aFont; + aFont = rStyleSettings.GetFieldFont(); + aFont.SetColor( rStyleSettings.GetWindowTextColor() ); + SetPointFont(*this, aFont); - if( bForeground || bFont ) - { - SetTextColor( rStyleSettings.GetFieldTextColor() ); - SetTextFillColor(); - } + SetTextColor( rStyleSettings.GetFieldTextColor() ); + SetTextFillColor(); if( bBackground ) SetBackground( rStyleSettings.GetFieldColor() ); @@ -617,7 +605,7 @@ void OApplicationDetailView::DataChanged( const DataChangedEvent& rDCEvt ) ((rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & AllSettingsFlags::STYLE)) ) { - ImplInitSettings( true, true, true ); + ImplInitSettings( true ); Invalidate(); } } diff --git a/dbaccess/source/ui/app/AppDetailView.hxx b/dbaccess/source/ui/app/AppDetailView.hxx index 7ccccb81df79..7ae2f3ab25af 100644 --- a/dbaccess/source/ui/app/AppDetailView.hxx +++ b/dbaccess/source/ui/app/AppDetailView.hxx @@ -118,7 +118,7 @@ namespace dbaui VclPtr<OApplicationDetailView> m_pDetailView; DECL_LINK_TYPED( OnEntrySelectHdl, SvTreeListBox*, void ); - void ImplInitSettings( bool bFont, bool bForeground, bool bBackground ); + void ImplInitSettings( bool bBackground ); protected: virtual void DataChanged(const DataChangedEvent& rDCEvt) override; public: @@ -153,7 +153,7 @@ namespace dbaui ::std::vector< TaskPaneData > m_aTaskPaneData; MnemonicGenerator m_aExternalMnemonics; - void ImplInitSettings( bool bFont, bool bForeground, bool bBackground ); + void ImplInitSettings( bool bBackground ); protected: virtual void DataChanged(const DataChangedEvent& rDCEvt) override; diff --git a/dbaccess/source/ui/app/AppSwapWindow.cxx b/dbaccess/source/ui/app/AppSwapWindow.cxx index 5e6db07d5fda..2b89d8481fb7 100644 --- a/dbaccess/source/ui/app/AppSwapWindow.cxx +++ b/dbaccess/source/ui/app/AppSwapWindow.cxx @@ -43,7 +43,7 @@ OApplicationSwapWindow::OApplicationSwapWindow( vcl::Window* _pParent, OAppBorde ,m_rBorderWin( _rBorderWindow ) { - ImplInitSettings( true, true, true ); + ImplInitSettings( true ); m_aIconControl->SetClickHdl(LINK(this, OApplicationSwapWindow, OnContainerSelectHdl)); m_aIconControl->setControlActionListener( &m_rBorderWin.getView()->getAppController() ); @@ -75,23 +75,17 @@ void OApplicationSwapWindow::Resize() m_aIconControl->ArrangeIcons(); } -void OApplicationSwapWindow::ImplInitSettings( bool bFont, bool bForeground, bool bBackground ) +void OApplicationSwapWindow::ImplInitSettings( bool bBackground ) { // FIXME RenderContext const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); - if( bFont ) - { - vcl::Font aFont; - aFont = rStyleSettings.GetFieldFont(); - aFont.SetColor( rStyleSettings.GetWindowTextColor() ); - SetPointFont(*this, aFont); - } + vcl::Font aFont; + aFont = rStyleSettings.GetFieldFont(); + aFont.SetColor( rStyleSettings.GetWindowTextColor() ); + SetPointFont(*this, aFont); - if( bForeground || bFont ) - { - SetTextColor( rStyleSettings.GetFieldTextColor() ); - SetTextFillColor(); - } + SetTextColor( rStyleSettings.GetFieldTextColor() ); + SetTextFillColor(); if( bBackground ) SetBackground( rStyleSettings.GetFieldColor() ); @@ -106,7 +100,7 @@ void OApplicationSwapWindow::DataChanged( const DataChangedEvent& rDCEvt ) ((rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & AllSettingsFlags::STYLE)) ) { - ImplInitSettings( true, true, true ); + ImplInitSettings( true ); Invalidate(); } } diff --git a/dbaccess/source/ui/app/AppSwapWindow.hxx b/dbaccess/source/ui/app/AppSwapWindow.hxx index aa6108fe2fc0..c77877b6c792 100644 --- a/dbaccess/source/ui/app/AppSwapWindow.hxx +++ b/dbaccess/source/ui/app/AppSwapWindow.hxx @@ -35,7 +35,7 @@ namespace dbaui ElementType m_eLastType; OAppBorderWindow& m_rBorderWin; - void ImplInitSettings( bool bFont, bool bForeground, bool bBackground ); + void ImplInitSettings( bool bBackground ); DECL_LINK_TYPED( OnContainerSelectHdl, SvtIconChoiceCtrl*, void ); DECL_LINK_TYPED( ChangeToLastSelected, void*, void ); diff --git a/dbaccess/source/ui/app/AppTitleWindow.cxx b/dbaccess/source/ui/app/AppTitleWindow.cxx index c05151a15fdc..ede0411301f4 100644 --- a/dbaccess/source/ui/app/AppTitleWindow.cxx +++ b/dbaccess/source/ui/app/AppTitleWindow.cxx @@ -37,7 +37,7 @@ OTitleWindow::OTitleWindow(vcl::Window* _pParent,sal_uInt16 _nTitleId,WinBits _n setTitle(_nTitleId); SetBorderStyle(WindowBorderStyle::MONO); - ImplInitSettings( true, true, true ); + ImplInitSettings( true ); const StyleSettings& rStyle = Application::GetSettings().GetStyleSettings(); vcl::Window* pWindows[] = { m_aSpace1.get(), m_aSpace2.get(), m_aTitle.get() }; @@ -134,12 +134,12 @@ void OTitleWindow::DataChanged( const DataChangedEvent& rDCEvt ) ((rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & AllSettingsFlags::STYLE)) ) { - ImplInitSettings( true, true, true ); + ImplInitSettings( true ); Invalidate(); } } -void OTitleWindow::ImplInitSettings( bool bFont, bool bForeground, bool bBackground ) +void OTitleWindow::ImplInitSettings( bool bBackground ) { // FIXME RenderContext AllSettings aAllSettings = GetSettings(); @@ -149,19 +149,13 @@ void OTitleWindow::ImplInitSettings( bool bFont, bool bForeground, bool bBackgro SetSettings(aAllSettings); const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); - if( bFont ) - { - vcl::Font aFont; - aFont = rStyleSettings.GetFieldFont(); - aFont.SetColor( rStyleSettings.GetWindowTextColor() ); - SetPointFont(*this, aFont); - } + vcl::Font aFont; + aFont = rStyleSettings.GetFieldFont(); + aFont.SetColor( rStyleSettings.GetWindowTextColor() ); + SetPointFont(*this, aFont); - if( bForeground || bFont ) - { - SetTextColor( rStyleSettings.GetFieldTextColor() ); - SetTextFillColor(); - } + SetTextColor( rStyleSettings.GetFieldTextColor() ); + SetTextFillColor(); if( bBackground ) SetBackground( rStyleSettings.GetFieldColor() ); diff --git a/dbaccess/source/ui/app/AppTitleWindow.hxx b/dbaccess/source/ui/app/AppTitleWindow.hxx index d22938df00ee..3bd1c6088418 100644 --- a/dbaccess/source/ui/app/AppTitleWindow.hxx +++ b/dbaccess/source/ui/app/AppTitleWindow.hxx @@ -29,8 +29,8 @@ namespace dbaui VclPtr<FixedText> m_aSpace2; VclPtr<FixedText> m_aTitle; VclPtr<vcl::Window> m_pChild; - bool m_bShift; - void ImplInitSettings( bool bFont, bool bForeground, bool bBackground ); + bool m_bShift; + void ImplInitSettings( bool bBackground ); protected: virtual void DataChanged(const DataChangedEvent& rDCEvt) override; public: |