summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndre Fischer <af@apache.org>2013-05-07 11:33:50 +0000
committerMichael Meeks <michael.meeks@suse.com>2013-05-20 11:33:29 +0100
commitd35884ef7d57de649e524a10397bf0d912101c25 (patch)
tree69b646b3928ef8fc500d101eda1613f6e77c27a6
parentd0d5b97d286d20e3573c5ddd6366d3da1889dd85 (diff)
Resolves: #i122230# Fixes for sidebar focus traveling
(cherry picked from commit 2b1bd27c95821000241b6f038b62b009ab94bda7) Change-Id: Id54bb7367d736629a43869c58d6d840fc8fd7da8
-rw-r--r--sfx2/source/sidebar/FocusManager.cxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/sfx2/source/sidebar/FocusManager.cxx b/sfx2/source/sidebar/FocusManager.cxx
index b3c83d381f09..081fa25621d7 100644
--- a/sfx2/source/sidebar/FocusManager.cxx
+++ b/sfx2/source/sidebar/FocusManager.cxx
@@ -98,8 +98,9 @@ void FocusManager::ClearPanels (void)
void FocusManager::ClearButtons (void)
{
- ::std::vector<Window*> aButtons;
- for (::std::vector<Window*>::iterator iButton(aButtons.begin()),iEnd(aButtons.end());
+ ::std::vector<Button*> aButtons;
+ aButtons.swap(maButtons);
+ for (::std::vector<Button*>::iterator iButton(aButtons.begin()),iEnd(aButtons.end());
iButton!=iEnd;
++iButton)
{
@@ -278,6 +279,8 @@ bool FocusManager::IsDeckTitleVisible (void) const
void FocusManager::FocusPanel (const sal_Int32 nPanelIndex)
{
+ if (nPanelIndex<0 || nPanelIndex>=static_cast<sal_Int32>(maPanels.size()))
+ return;
Panel& rPanel (*maPanels[nPanelIndex]);
TitleBar* pTitleBar = rPanel.GetTitleBar();
if (pTitleBar!=NULL && pTitleBar->IsVisible())