openoffice-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a.@apache.org
Subject svn commit: r1479864 - /openoffice/trunk/main/sfx2/source/sidebar/FocusManager.cxx
Date Tue, 07 May 2013 11:33:50 GMT
Author: af
Date: Tue May  7 11:33:50 2013
New Revision: 1479864

URL: http://svn.apache.org/r1479864
Log:
122230: Fixes for sidebar focus traveling.

Modified:
    openoffice/trunk/main/sfx2/source/sidebar/FocusManager.cxx

Modified: openoffice/trunk/main/sfx2/source/sidebar/FocusManager.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sfx2/source/sidebar/FocusManager.cxx?rev=1479864&r1=1479863&r2=1479864&view=diff
==============================================================================
--- openoffice/trunk/main/sfx2/source/sidebar/FocusManager.cxx (original)
+++ openoffice/trunk/main/sfx2/source/sidebar/FocusManager.cxx Tue May  7 11:33:50 2013
@@ -103,8 +103,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)
     {
@@ -281,6 +282,8 @@ bool FocusManager::IsDeckTitleVisible (v
 
 void FocusManager::FocusPanel (const sal_Int32 nPanelIndex)
 {
+    if (nPanelIndex<0 || nPanelIndex>=maPanels.size())
+        return;
     Panel& rPanel (*maPanels[nPanelIndex]);
     TitleBar* pTitleBar = rPanel.GetTitleBar();
     if (pTitleBar!=NULL && pTitleBar->IsVisible())



Mime
View raw message