[Libreoffice-commits] core.git: sfx2/source
Jan Holesovsky
kendy at collabora.com
Fri Jan 31 04:16:00 PST 2014
sfx2/source/control/thumbnailview.cxx | 20 +++++++++-----------
1 file changed, 9 insertions(+), 11 deletions(-)
New commits:
commit 470b393fd593440f49f0c3c1e95ef7a41fac0bb5
Author: Jan Holesovsky <kendy at collabora.com>
Date: Fri Jan 31 13:10:27 2014 +0100
Kill one indentation level.
Change-Id: I5a5d98bb2f2d0749fb9113423f5663780ecf3520
diff --git a/sfx2/source/control/thumbnailview.cxx b/sfx2/source/control/thumbnailview.cxx
index d55e4a1..dbe2f46 100644
--- a/sfx2/source/control/thumbnailview.cxx
+++ b/sfx2/source/control/thumbnailview.cxx
@@ -891,19 +891,17 @@ void ThumbnailView::Paint( const Rectangle &aRect)
void ThumbnailView::GetFocus()
{
+ // Select the first item if nothing selected
+ int nSelected = -1;
+ for (size_t i = 0, n = mItemList.size(); i < n && nSelected == -1; ++i)
{
- // Select the first item if nothing selected
- int nSelected = -1;
- for (size_t i = 0, n = mItemList.size(); i < n && nSelected == -1; ++i)
- {
- if (mItemList[i]->isSelected())
- nSelected = i;
- }
+ if (mItemList[i]->isSelected())
+ nSelected = i;
+ }
- if ( nSelected == -1 && mItemList.size( ) > 0 )
- {
- SelectItem( 1 );
- }
+ if (nSelected == -1 && mItemList.size() > 0)
+ {
+ SelectItem(1);
}
// Tell the accessible object that we got the focus.
More information about the Libreoffice-commits
mailing list