summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2014-01-31 13:10:27 +0100
committerJan Holesovsky <kendy@collabora.com>2014-01-31 13:10:27 +0100
commit470b393fd593440f49f0c3c1e95ef7a41fac0bb5 (patch)
tree0f95289405009457b52e6359e2e41e8572ceb4b8
parent5b1e68bd852cac4534c5ce2e548187dce1d4561a (diff)
Kill one indentation level.
Change-Id: I5a5d98bb2f2d0749fb9113423f5663780ecf3520
-rw-r--r--sfx2/source/control/thumbnailview.cxx20
1 files changed, 9 insertions, 11 deletions
diff --git a/sfx2/source/control/thumbnailview.cxx b/sfx2/source/control/thumbnailview.cxx
index d55e4a153651..dbe2f462dd04 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.