summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2017-12-16 21:21:37 +0200
committerMike Kaganski <mike.kaganski@collabora.com>2017-12-17 04:54:02 +0100
commitccb6a1c6d59859467f9d9a6d954501e9329ee202 (patch)
tree72993930ae98e20c3c836ed2ad40f9adac9fa908
parent77adb770164fd703a31d8e828d777a4f827a5407 (diff)
loplugin:unusedindex Remove useless outer loop
Change-Id: I6e5e7162b1e0ea2b9f33866ea76e2614acdffb06 Reviewed-on: https://gerrit.libreoffice.org/46606 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
-rw-r--r--cui/source/tabpages/numpages.cxx17
1 files changed, 7 insertions, 10 deletions
diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx
index a6e69c4d023b..c8cded8ce25d 100644
--- a/cui/source/tabpages/numpages.cxx
+++ b/cui/source/tabpages/numpages.cxx
@@ -1718,19 +1718,16 @@ IMPL_LINK_NOARG(SvxNumOptionsTabPage, PreviewInvalidateHdl_Impl, Timer *, void)
IMPL_LINK( SvxNumOptionsTabPage, AllLevelHdl_Impl, Edit&, rBox, void )
{
- for(sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++)
+ sal_uInt16 nMask = 1;
+ for(sal_uInt16 e = 0; e < pActNum->GetLevelCount(); e++)
{
- sal_uInt16 nMask = 1;
- for(sal_uInt16 e = 0; e < pActNum->GetLevelCount(); e++)
+ if(nActNumLvl & nMask)
{
- if(nActNumLvl & nMask)
- {
- SvxNumberFormat aNumFmt(pActNum->GetLevel(e));
- aNumFmt.SetIncludeUpperLevels((sal_uInt8) std::min(static_cast<NumericField&>(rBox).GetValue(), sal_Int64(e + 1)) );
- pActNum->SetLevel(e, aNumFmt);
- }
- nMask <<= 1;
+ SvxNumberFormat aNumFmt(pActNum->GetLevel(e));
+ aNumFmt.SetIncludeUpperLevels((sal_uInt8) std::min(static_cast<NumericField&>(rBox).GetValue(), sal_Int64(e + 1)) );
+ pActNum->SetLevel(e, aNumFmt);
}
+ nMask <<= 1;
}
SetModified();
}