Kaydet (Commit) 1e6ccc7f authored tarafından Thomas Arnhold's avatar Thomas Arnhold

cppcheck: Function parameter 'aFocusLocation' should be passed by reference

Change-Id: I2d2b9ae3ea81bd725be2af460f6c57bd0897883c
üst 058cd961
......@@ -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))
......
......@@ -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 (
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment