summaryrefslogtreecommitdiff
path: root/svtools/source/contnr/fileview.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-11-22 11:26:08 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-11-22 11:54:12 +0100
commit1ae61b0ac4187b2938647f3ca0289a070a5dc7d2 (patch)
tree9461c0532919f4fe61f3e0e3fa8556e954244fbd /svtools/source/contnr/fileview.cxx
parent04bb9549e0a0ee567f3bd48a7707286c5abd631a (diff)
loplugin:flatten in svtools
almost completely automatically rewritten, only had to tweak the indentation on a couple of lines. Change-Id: Ieec92e5b602d180d7ec556e3421ce3c835c1f646 Reviewed-on: https://gerrit.libreoffice.org/45072 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svtools/source/contnr/fileview.cxx')
-rw-r--r--svtools/source/contnr/fileview.cxx24
1 files changed, 12 insertions, 12 deletions
diff --git a/svtools/source/contnr/fileview.cxx b/svtools/source/contnr/fileview.cxx
index 7d6eeecd440e..d0f628798eba 100644
--- a/svtools/source/contnr/fileview.cxx
+++ b/svtools/source/contnr/fileview.cxx
@@ -1289,19 +1289,19 @@ IMPL_LINK( SvtFileView, HeaderSelect_Impl, HeaderBar*, pBar, void )
IMPL_LINK( SvtFileView, HeaderEndDrag_Impl, HeaderBar*, pBar, void )
{
- if ( !pBar->IsItemMode() )
- {
- Size aSize;
- sal_uInt16 nTabs = pBar->GetItemCount();
- long nTmpSize = 0;
+ if ( pBar->IsItemMode() )
+ return;
- for ( sal_uInt16 i = 1; i <= nTabs; ++i )
- {
- long nWidth = pBar->GetItemSize(i);
- aSize.Width() = nWidth + nTmpSize;
- nTmpSize += nWidth;
- mpImpl->mpView->SetTab( i, aSize.Width(), MapUnit::MapPixel );
- }
+ Size aSize;
+ sal_uInt16 nTabs = pBar->GetItemCount();
+ long nTmpSize = 0;
+
+ for ( sal_uInt16 i = 1; i <= nTabs; ++i )
+ {
+ long nWidth = pBar->GetItemSize(i);
+ aSize.Width() = nWidth + nTmpSize;
+ nTmpSize += nWidth;
+ mpImpl->mpView->SetTab( i, aSize.Width(), MapUnit::MapPixel );
}
}