diff options
author | Jan Holesovsky <kendy@collabora.com> | 2014-01-31 13:10:27 +0100 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2014-01-31 13:10:27 +0100 |
commit | 470b393fd593440f49f0c3c1e95ef7a41fac0bb5 (patch) | |
tree | 0f95289405009457b52e6359e2e41e8572ceb4b8 | |
parent | 5b1e68bd852cac4534c5ce2e548187dce1d4561a (diff) |
Kill one indentation level.
Change-Id: I5a5d98bb2f2d0749fb9113423f5663780ecf3520
-rw-r--r-- | sfx2/source/control/thumbnailview.cxx | 20 |
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. |