compilerplugins/clang/constantparam.booleans.results |    8 
 compilerplugins/clang/overrideparam.cxx              |    4 
 cui/source/options/optfltr.cxx                       |   22 +-
 include/svx/checklbx.hxx                             |   68 --------
 solenv/clang-format/blacklist                        |    4 
 svx/Library_svxcore.mk                               |    1 
 svx/source/dialog/checklbx.cxx                       |  161 -------------------
 sw/source/uibase/inc/optcomp.hxx                     |    1 
 sw/source/uibase/inc/optload.hxx                     |    1 
 9 files changed, 13 insertions(+), 257 deletions(-)

New commits:
commit ee0613bd9ed3a9539f1ebb58b51962c9ccd13376
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Tue Jul 30 16:43:44 2019 +0100
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Tue Jul 30 21:14:29 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/76619
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caol...@redhat.com>
    Tested-by: Caolán McNamara <caol...@redhat.com>

diff --git a/cui/source/options/optfltr.cxx b/cui/source/options/optfltr.cxx
index d11c655a472f..54d7e5817fe2 100644
--- a/cui/source/options/optfltr.cxx
+++ b/cui/source/options/optfltr.cxx
@@ -210,12 +210,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 )
         {
@@ -223,7 +225,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)() )
@@ -283,12 +285,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 )
         {
commit 588f50ac41666e73a7c73c13e677a9927bad991f
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Tue Jul 30 16:05:55 2019 +0100
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Tue Jul 30 21:14:11 2019 +0200

    remove newly unused SvxCheckListBox
    
    Change-Id: I6a5f4dfea9fbb34f02c1752140e04d1d0a8a67a7
    Reviewed-on: https://gerrit.libreoffice.org/76617
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caol...@redhat.com>
    Tested-by: Caolán McNamara <caol...@redhat.com>

diff --git a/compilerplugins/clang/constantparam.booleans.results 
b/compilerplugins/clang/constantparam.booleans.results
index 39637cd6b887..a39ccbc292a8 100644
--- a/compilerplugins/clang/constantparam.booleans.results
+++ b/compilerplugins/clang/constantparam.booleans.results
@@ -254,10 +254,6 @@ cui/source/inc/hangulhanjadlg.hxx:60
     class rtl::OUString svx::SuggestionDisplay::GetEntry(unsigned short) const
     unsigned short nPos
     0
-cui/source/inc/radiobtnbox.hxx:40
-    void svx::SvxRadioButtonListBox::SvxRadioButtonListBox(class 
SvSimpleTableContainer &,long)
-    long nBits
-    0
 cui/source/inc/scriptdlg.hxx:122
     void SvxScriptOrgDialog::insertEntry(const class rtl::OUString &,const 
class rtl::OUString &,const class weld::TreeIter *,_Bool,class 
std::unique_ptr<class SFEntry, struct std::default_delete<class SFEntry> > 
&&,const class rtl::OUString &,_Bool)
     _Bool bChildrenOnDemand
@@ -1114,10 +1110,6 @@ include/svx/algitem.hxx:39
     void SvxOrientationItem::SvxOrientationItem(int,_Bool,const unsigned short)
     const unsigned short nId
     0
-include/svx/checklbx.hxx:55
-    void SvxCheckListBox::SelectEntryPos(unsigned long)
-    unsigned long nPos
-    0
 include/svx/colorwindow.hxx:147
     void ColorWindow::ColorWindow(const class std::shared_ptr<class 
PaletteManager> &,class ColorStatus &,unsigned short,const class 
com::sun::star::uno::Reference<class com::sun::star::frame::XFrame> &,class 
weld::Window *,class weld::MenuButton *,_Bool,const class std::function<void 
(const class rtl::OUString &, const struct std::pair<class Color, class 
rtl::OUString> &)> &)
     _Bool bInterimBuilder
diff --git a/compilerplugins/clang/overrideparam.cxx 
b/compilerplugins/clang/overrideparam.cxx
index 27aecb82615f..61efe15b1eb0 100644
--- a/compilerplugins/clang/overrideparam.cxx
+++ b/compilerplugins/clang/overrideparam.cxx
@@ -54,10 +54,6 @@ bool OverrideParam::VisitCXXMethodDecl(const CXXMethodDecl * 
methodDecl) {
         return true;
     }
     loplugin::DeclCheck dc(methodDecl);
-    // there is an InsertEntry override here which causes trouble if I modify 
it
-    if (dc.Function("InsertEntry").Class("SvxCheckListBox").GlobalNamespace()) 
{
-        return true;
-    }
     // This class is overriding ShowCursor(bool) AND declaring a ShowCursor() 
method.
     // Adding a default param causes 'ambiguous override'.
     if (dc.Function("ShowCursor").Class("ScTabViewShell").GlobalNamespace()) {
diff --git a/include/svx/checklbx.hxx b/include/svx/checklbx.hxx
deleted file mode 100644
index 44eeb3631143..000000000000
--- a/include/svx/checklbx.hxx
+++ /dev/null
@@ -1,68 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#ifndef INCLUDED_SVX_CHECKLBX_HXX
-#define INCLUDED_SVX_CHECKLBX_HXX
-
-#include <rtl/ustring.hxx>
-#include <vcl/treelistbox.hxx>
-#include <svx/svxdllapi.h>
-#include <tools/solar.h>
-#include <tools/wintypes.hxx>
-#include <vcl/window.hxx>
-#include <memory>
-
-class SvLBoxButtonData;
-class SvTreeListEntry;
-
-class SVX_DLLPUBLIC SvxCheckListBox : public SvTreeListBox
-{
-    using Window::GetText;
-
-private:
-    std::unique_ptr<SvLBoxButtonData> pCheckButton;
-
-    SVX_DLLPRIVATE void             Init_Impl();
-
-    using SvTreeListBox::InsertEntry;
-    // Avoid ambiguity with new InsertEntry:
-    virtual SvTreeListEntry*    InsertEntry( const OUString& rText, 
SvTreeListEntry* pParent,
-                                         bool bChildrenOnDemand,
-                                         sal_uLong nPos, void* pUserData,
-                                         SvLBoxButtonKind eButtonKind ) 
override;
-
-public:
-    SvxCheckListBox( vcl::Window* pParent, WinBits nWinStyle = 0 );
-    virtual ~SvxCheckListBox() override;
-    virtual void dispose() override;
-
-    void            SelectEntryPos      ( sal_uLong  nPos );
-    sal_uLong       GetSelectedEntryPos   () const;
-
-    void            CheckEntryPos       ( sal_uLong  nPos, bool bCheck = true 
);
-    bool            IsChecked           ( sal_uLong  nPos ) const;
-    void            ToggleCheckButton   ( SvTreeListEntry* pEntry );
-
-    virtual void    MouseButtonDown     ( const MouseEvent& rMEvt ) override;
-    virtual void    KeyInput            ( const KeyEvent& rKEvt ) override;
-};
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/solenv/clang-format/blacklist b/solenv/clang-format/blacklist
index 0978262baf92..925add79640c 100644
--- a/solenv/clang-format/blacklist
+++ b/solenv/clang-format/blacklist
@@ -2810,7 +2810,6 @@ cui/source/inc/paragrph.hxx
 cui/source/inc/passwdomdlg.hxx
 cui/source/inc/pastedlg.hxx
 cui/source/inc/postdlg.hxx
-cui/source/inc/radiobtnbox.hxx
 cui/source/inc/screenshotannotationdlg.hxx
 cui/source/inc/scriptdlg.hxx
 cui/source/inc/sdrcelldlg.hxx
@@ -2882,7 +2881,6 @@ cui/source/options/optsave.cxx
 cui/source/options/optsave.hxx
 cui/source/options/optupdt.cxx
 cui/source/options/optupdt.hxx
-cui/source/options/radiobtnbox.cxx
 cui/source/options/sdbcdriverenum.cxx
 cui/source/options/sdbcdriverenum.hxx
 cui/source/options/securityoptions.cxx
@@ -7075,7 +7073,6 @@ include/svx/bmpmask.hxx
 include/svx/camera3d.hxx
 include/svx/charmap.hxx
 include/svx/charthelper.hxx
-include/svx/checklbx.hxx
 include/svx/chrtitem.hxx
 include/svx/clipboardctl.hxx
 include/svx/clipfmtitem.hxx
@@ -14005,7 +14002,6 @@ svx/source/dialog/SvxNumOptionsTabPageHelper.cxx
 svx/source/dialog/_bmpmask.cxx
 svx/source/dialog/_contdlg.cxx
 svx/source/dialog/charmap.cxx
-svx/source/dialog/checklbx.cxx
 svx/source/dialog/compressgraphicdialog.cxx
 svx/source/dialog/connctrl.cxx
 svx/source/dialog/contimp.hxx
diff --git a/svx/Library_svxcore.mk b/svx/Library_svxcore.mk
index fc9449fede66..c36e0f6ae09a 100644
--- a/svx/Library_svxcore.mk
+++ b/svx/Library_svxcore.mk
@@ -111,7 +111,6 @@ $(eval $(call gb_Library_add_exception_objects,svxcore,\
     svx/source/customshapes/EnhancedCustomShapeFunctionParser \
     svx/source/customshapes/EnhancedCustomShapeGeometry \
     svx/source/customshapes/EnhancedCustomShapeTypeNames \
-    svx/source/dialog/checklbx \
     svx/source/dialog/dialmgr \
     svx/source/dialog/dlgutil \
     svx/source/dialog/hexcolorcontrol \
diff --git a/svx/source/dialog/checklbx.cxx b/svx/source/dialog/checklbx.cxx
deleted file mode 100644
index 1a9c63ad1134..000000000000
--- a/svx/source/dialog/checklbx.cxx
+++ /dev/null
@@ -1,161 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#include <vcl/event.hxx>
-#include <vcl/svlbitm.hxx>
-#include <vcl/treelistentry.hxx>
-#include <svx/checklbx.hxx>
-#include <vcl/builderfactory.hxx>
-
-SvxCheckListBox::SvxCheckListBox( vcl::Window* pParent, WinBits nWinStyle ) :
-
-    SvTreeListBox( pParent, nWinStyle )
-
-{
-    Init_Impl();
-}
-
-SvxCheckListBox::~SvxCheckListBox()
-{
-    disposeOnce();
-}
-
-void SvxCheckListBox::dispose()
-{
-    pCheckButton.reset();
-    SvTreeListBox::dispose();
-}
-
-void SvxCheckListBox::Init_Impl()
-{
-    pCheckButton.reset(new SvLBoxButtonData( this ));
-    EnableCheckButton( pCheckButton.get() );
-}
-
-void SvxCheckListBox::SelectEntryPos( sal_uLong nPos )
-{
-    if ( nPos < GetEntryCount() )
-        Select( GetEntry( nPos ) );
-}
-
-
-sal_uLong SvxCheckListBox::GetSelectedEntryPos() const
-{
-    SvTreeListEntry* pEntry = GetCurEntry();
-
-    if ( pEntry )
-        return GetModel()->GetAbsPos( pEntry );
-    return TREELIST_ENTRY_NOTFOUND;
-}
-
-
-void SvxCheckListBox::CheckEntryPos( sal_uLong nPos, bool bCheck )
-{
-    if ( nPos < GetEntryCount() )
-        SetCheckButtonState( GetEntry( nPos ), bCheck ? SvButtonState::Checked 
: SvButtonState::Unchecked );
-}
-
-
-bool SvxCheckListBox::IsChecked( sal_uLong nPos ) const
-{
-    if ( nPos < GetEntryCount() )
-        return GetCheckButtonState( GetEntry( nPos ) ) == 
SvButtonState::Checked;
-    else
-        return false;
-}
-
-
-void SvxCheckListBox::ToggleCheckButton( SvTreeListEntry* pEntry )
-{
-    if ( pEntry )
-    {
-        if ( !IsSelected( pEntry ) )
-            Select( pEntry );
-        else
-            CheckEntryPos( GetSelectedEntryPos(), !IsChecked( 
GetSelectedEntryPos() ) );
-    }
-}
-
-
-void SvxCheckListBox::MouseButtonDown( const MouseEvent& rMEvt )
-{
-    if ( rMEvt.IsLeft() )
-    {
-        const Point aPnt = rMEvt.GetPosPixel();
-        SvTreeListEntry* pEntry = GetEntry( aPnt );
-
-        if ( pEntry )
-        {
-            bool bCheck = GetCheckButtonState( pEntry ) == 
SvButtonState::Checked;
-            SvLBoxItem* pItem = GetItem( pEntry, aPnt.X() );
-
-            if (pItem && pItem->GetType() == SvLBoxItemType::Button)
-            {
-                SvTreeListBox::MouseButtonDown( rMEvt );
-                Select( pEntry );
-                return;
-            }
-            else
-            {
-                ToggleCheckButton( pEntry );
-                SvTreeListBox::MouseButtonDown( rMEvt );
-
-                // check if the entry below the mouse changed during the base 
method call. This is possible if,
-                // for instance, a handler invoked by the base class tampers 
with the list entries.
-                const SvTreeListEntry* pNewEntry = GetEntry( aPnt );
-                if ( pNewEntry != pEntry )
-                    return;
-
-                if ( bCheck != ( GetCheckButtonState( pEntry ) == 
SvButtonState::Checked ) )
-                    CheckButtonHdl();
-                return;
-            }
-        }
-    }
-    SvTreeListBox::MouseButtonDown( rMEvt );
-}
-
-
-void SvxCheckListBox::KeyInput( const KeyEvent& rKEvt )
-{
-    const vcl::KeyCode& rKey = rKEvt.GetKeyCode();
-
-    if ( rKey.GetCode() == KEY_RETURN || rKey.GetCode() == KEY_SPACE )
-    {
-        SvTreeListEntry* pEntry = GetCurEntry();
-
-        if ( pEntry )
-        {
-            bool bCheck = GetCheckButtonState( pEntry ) == 
SvButtonState::Checked;
-            ToggleCheckButton( pEntry );
-            if ( bCheck != ( GetCheckButtonState( pEntry ) == 
SvButtonState::Checked ) )
-                CheckButtonHdl();
-        }
-    }
-    else if ( GetEntryCount() )
-        SvTreeListBox::KeyInput( rKEvt );
-}
-
-
-SvTreeListEntry* SvxCheckListBox::InsertEntry( const OUString& rText, 
SvTreeListEntry* pParent, bool bChildrenOnDemand, sal_uLong nPos, void* 
pUserData, SvLBoxButtonKind eButtonKind )
-{
-    return SvTreeListBox::InsertEntry( rText, pParent, bChildrenOnDemand, 
nPos, pUserData, eButtonKind );
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/uibase/inc/optcomp.hxx b/sw/source/uibase/inc/optcomp.hxx
index ca12a02e4fde..2337893b5ed5 100644
--- a/sw/source/uibase/inc/optcomp.hxx
+++ b/sw/source/uibase/inc/optcomp.hxx
@@ -26,7 +26,6 @@
 #include <vcl/lstbox.hxx>
 #include <unotools/compatibility.hxx>
 #include <unotools/compatibilityviewoptions.hxx>
-#include <svx/checklbx.hxx>
 #include <rtl/ustring.hxx>
 
 class SwWrtShell;
diff --git a/sw/source/uibase/inc/optload.hxx b/sw/source/uibase/inc/optload.hxx
index 8d00320c2035..7b0193acf652 100644
--- a/sw/source/uibase/inc/optload.hxx
+++ b/sw/source/uibase/inc/optload.hxx
@@ -29,7 +29,6 @@
 #include <vcl/weld.hxx>
 #include <svx/strarray.hxx>
 #include <sfx2/basedlgs.hxx>
-#include <svx/checklbx.hxx>
 #include "caption.hxx"
 
 class SwFieldMgr;
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to