diff options
author | Thomas Arnhold <thomas@arnhold.org> | 2014-05-22 12:07:55 +0200 |
---|---|---|
committer | Thomas Arnhold <thomas@arnhold.org> | 2014-05-22 12:50:50 +0200 |
commit | 1e6ccc7f7e5a4ae8f52b7500943d6b227f4d7e6a (patch) | |
tree | 2cb67705e0fe0d948e0e7a4d45dfa2de84352978 /sfx2 | |
parent | 058cd96131e38a8298bce201225b4415de048c2b (diff) |
cppcheck: Function parameter 'aFocusLocation' should be passed by reference
Change-Id: I2d2b9ae3ea81bd725be2af460f6c57bd0897883c
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/sidebar/FocusManager.cxx | 18 | ||||
-rw-r--r-- | sfx2/source/sidebar/FocusManager.hxx | 4 |
2 files changed, 11 insertions, 11 deletions
diff --git a/sfx2/source/sidebar/FocusManager.cxx b/sfx2/source/sidebar/FocusManager.cxx index fa8fdf615680..0b12d607ee40 100644 --- a/sfx2/source/sidebar/FocusManager.cxx +++ b/sfx2/source/sidebar/FocusManager.cxx @@ -370,25 +370,25 @@ void FocusManager::RemoveWindow (Window& rWindow) bool FocusManager::MoveFocusInsidePanel ( - const FocusLocation aFocusLocation, + const FocusLocation& rFocusLocation, const sal_Int32 nDirection) { const bool bHasToolBoxItem ( - maPanels[aFocusLocation.mnIndex]->GetTitleBar()->GetToolBox().GetItemCount() > 0); - switch (aFocusLocation.meComponent) + maPanels[rFocusLocation.mnIndex]->GetTitleBar()->GetToolBox().GetItemCount() > 0); + switch (rFocusLocation.meComponent) { case PC_PanelTitle: if (nDirection > 0 && bHasToolBoxItem) - maPanels[aFocusLocation.mnIndex]->GetTitleBar()->GetToolBox().GrabFocus(); + maPanels[rFocusLocation.mnIndex]->GetTitleBar()->GetToolBox().GrabFocus(); else - FocusPanelContent(aFocusLocation.mnIndex); + FocusPanelContent(rFocusLocation.mnIndex); return true; case PC_PanelToolBox: if (nDirection < 0 && bHasToolBoxItem) - maPanels[aFocusLocation.mnIndex]->GetTitleBar()->GrabFocus(); + maPanels[rFocusLocation.mnIndex]->GetTitleBar()->GrabFocus(); else - FocusPanelContent(aFocusLocation.mnIndex); + FocusPanelContent(rFocusLocation.mnIndex); return true; default: @@ -400,7 +400,7 @@ bool FocusManager::MoveFocusInsidePanel ( bool FocusManager::MoveFocusInsideDeckTitle ( - const FocusLocation aFocusLocation, + const FocusLocation& rFocusLocation, const sal_Int32 nDirection) { // Note that when the title bar of the first (and only) panel is @@ -409,7 +409,7 @@ bool FocusManager::MoveFocusInsideDeckTitle ( // of panel 0. const bool bHasToolBoxItem ( mpDeckTitleBar->GetToolBox().GetItemCount() > 0); - switch (aFocusLocation.meComponent) + switch (rFocusLocation.meComponent) { case PC_DeckTitle: if (nDirection<0 && ! IsPanelTitleVisible(0)) diff --git a/sfx2/source/sidebar/FocusManager.hxx b/sfx2/source/sidebar/FocusManager.hxx index 21b58eacc016..23f2f5280043 100644 --- a/sfx2/source/sidebar/FocusManager.hxx +++ b/sfx2/source/sidebar/FocusManager.hxx @@ -134,10 +134,10 @@ private: void FocusButton (const sal_Int32 nButtonIndex); void ClickButton (const sal_Int32 nButtonIndex); bool MoveFocusInsidePanel ( - const FocusLocation aLocation, + const FocusLocation& rLocation, const sal_Int32 nDirection); bool MoveFocusInsideDeckTitle ( - const FocusLocation aLocation, + const FocusLocation& rLocation, const sal_Int32 nDirection); void HandleKeyEvent ( |