[Libreoffice-commits] core.git: Branch 'libreoffice-6-3' - cui/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Wed Aug 7 08:45:01 UTC 2019
cui/source/options/optfltr.cxx | 22 +++++++++++++---------
1 file changed, 13 insertions(+), 9 deletions(-)
New commits:
commit 19741593b2f53b35354732808ebd09fbeb335efc
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Tue Jul 30 16:43:44 2019 +0100
Commit: Michael Stahl <Michael.Stahl at cib.de>
CommitDate: Wed Aug 7 10:44:27 2019 +0200
bFirst means 1st vs 2nd column, and needs to alternate on each loop
this went wrong at...
commit f423ac2d3bdba4263f1f41e31e7e2b7715afdd6e
Date: Tue Mar 5 15:16:16 2019 +0200
remove sal_IntPtr in OfaMSFilterTabPage2
and just use a scoped enum
Change-Id: I74bcca9ffee9faf4600da64b3c409dbf19a1290e
Reviewed-on: https://gerrit.libreoffice.org/76620
Tested-by: Jenkins
Reviewed-by: Michael Stahl <Michael.Stahl at cib.de>
diff --git a/cui/source/options/optfltr.cxx b/cui/source/options/optfltr.cxx
index 764614a6030e..d4abe42070ed 100644
--- a/cui/source/options/optfltr.cxx
+++ b/cui/source/options/optfltr.cxx
@@ -226,12 +226,14 @@ bool OfaMSFilterTabPage2::FillItemSet( SfxItemSet* )
&SvtFilterOptions::SetSmartArt2Shape },
};
- bool bCheck, bFirst = true;
+ bool bFirstCol = true;
for( const ChkCBoxEntries & rEntry : aChkArr )
{
- sal_uInt16 nCol = bFirst ? 1 : 2;
- if (bFirst)
- bFirst = false;
+ // we loop through the list, alternating reading the first/second column,
+ // each row appears twice in the list (except for smartart, which is import
+ // only
+ sal_uInt16 nCol = bFirstCol ? 1 : 2;
+ bFirstCol = !bFirstCol;
SvTreeListEntry* pEntry = GetEntry4Type( rEntry.eType );
if( pEntry )
{
@@ -239,7 +241,7 @@ bool OfaMSFilterTabPage2::FillItemSet( SfxItemSet* )
if (rItem.GetType() == SvLBoxItemType::Button)
{
SvItemStateFlags nButtonFlags = rItem.GetButtonFlags();
- bCheck = SvButtonState::Checked ==
+ bool bCheck = SvButtonState::Checked ==
SvLBoxButtonData::ConvertToButtonState( nButtonFlags );
if( bCheck != (rOpt.*rEntry.FnIs)() )
@@ -299,12 +301,14 @@ void OfaMSFilterTabPage2::Reset( const SfxItemSet* )
{ MSFltrPg2_CheckBoxEntries::SmartArt, &SvtFilterOptions::IsSmartArt2Shape },
};
- bool bFirst = true;
+ bool bFirstCol = true;
for( const ChkCBoxEntries & rArr : aChkArr )
{
- sal_uInt16 nCol = bFirst ? 1 : 2;
- if (bFirst)
- bFirst = false;
+ // we loop through the list, alternating reading the first/second column,
+ // each row appears twice in the list (except for smartart, which is import
+ // only
+ sal_uInt16 nCol = bFirstCol ? 1 : 2;
+ bFirstCol = !bFirstCol;
SvTreeListEntry* pEntry = GetEntry4Type( rArr.eType );
if( pEntry )
{
More information about the Libreoffice-commits
mailing list