[Libreoffice-commits] core.git: compilerplugins/clang vcl/inc vcl/source

Noel Grandin (via logerrit) logerrit at kemper.freedesktop.org
Thu Aug 20 14:06:04 UTC 2020


 compilerplugins/clang/singlevalfields.results |   31 +++---
 vcl/inc/svimpbox.hxx                          |    1 
 vcl/source/treelist/svimpbox.cxx              |  118 --------------------------
 3 files changed, 18 insertions(+), 132 deletions(-)

New commits:
commit 1e701a9d1cf67532026014d627ab96d28e8b8476
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Thu Aug 20 13:19:58 2020 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Thu Aug 20 16:05:19 2020 +0200

    loplugin:singlevalfields
    
    Change-Id: I4cd20d1a449196b68c7dbe153c60e68b9563bea9
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101049
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/compilerplugins/clang/singlevalfields.results b/compilerplugins/clang/singlevalfields.results
index 545d50c5d753..dc00798c88b6 100644
--- a/compilerplugins/clang/singlevalfields.results
+++ b/compilerplugins/clang/singlevalfields.results
@@ -130,12 +130,9 @@ cui/source/options/optgdlg.cxx:1127
 cui/source/options/optjava.hxx:59
     SvxJavaOptionsPage m_aResetIdle
     cui options SvxJavaOptionsPage Reset
-dbaccess/source/ui/inc/directsql.hxx:68
-    dbaui::DirectSQLDialog m_aHighlighter
+dbaccess/source/ui/inc/sqledit.hxx:43
+    dbaui::SQLEditView m_aHighlighter
     1
-dbaccess/source/ui/inc/JoinExchange.hxx:38
-    dbaui::OJoinExchObj m_pDragListener
-    0
 desktop/source/app/app.cxx:480
     desktop::Desktop::Init bTryHardOfficeconfigBroken
     0
@@ -151,16 +148,16 @@ drawinglayer/source/primitive2d/sceneprimitive2d.cxx:481
 drawinglayer/source/processor2d/vclhelperbufferdevice.cxx:340
     drawinglayer::impBufferDevice::paint bDoSaveForVisualControl
     0
-drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx:953
+drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx:954
     drawinglayer::processor2d::VclMetafileProcessor2D::processGraphicPrimitive2D bSuppressPDFExtOutDevDataSupport
     0
-drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx:1307
+drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx:1308
     drawinglayer::processor2d::VclMetafileProcessor2D::processTextHierarchyParagraphPrimitive2D bSuppressPDFExtOutDevDataSupport
     0
-drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx:2069
+drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx:2070
     drawinglayer::processor2d::VclMetafileProcessor2D::processUnifiedTransparencePrimitive2D bForceToMetafile
     0
-drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx:2170
+drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx:2171
     drawinglayer::processor2d::VclMetafileProcessor2D::processTransparencePrimitive2D bForceToBigTransparentVDev
     0
 drawinglayer/source/tools/converters.cxx:91
@@ -349,9 +346,6 @@ include/vcl/settings.hxx:146
 include/vcl/settings.hxx:147
     DialogStyle action_area_border
     5
-include/vcl/toolkit/longcurr.hxx:62
-    LongCurrencyFormatter mbThousandSep
-    1
 include/vcl/toolkit/treelistbox.hxx:213
     SvTreeListBox nIndent
     20
@@ -559,10 +553,10 @@ sd/source/ui/inc/DrawController.hxx:292
 sd/source/ui/inc/pubdlg.hxx:151
     SdPublishingDlg aAssistentFunc
     6
-sd/source/ui/inc/View.hxx:237
+sd/source/ui/inc/View.hxx:240
     sd::View maDropErrorIdle
     sd View DropError
-sd/source/ui/inc/View.hxx:238
+sd/source/ui/inc/View.hxx:241
     sd::View maDropInsertFileIdle
     sd View DropInsertFile
 sd/source/ui/inc/ViewTabBar.hxx:146
@@ -985,6 +979,9 @@ vcl/inc/salwtype.hxx:162
 vcl/inc/svdata.hxx:315
     ImplSVNWFData mbMenuBarDockingAreaCommonBG
     0
+vcl/inc/svimpbox.hxx:128
+    SvImpLBox m_bContextMenuHandling
+    0
 vcl/source/bitmap/bitmap.cxx:140
     Bitmap::~Bitmap save
     0
@@ -1084,10 +1081,10 @@ vcl/source/outdev/bitmap.cxx:1243
 vcl/unx/gtk3/a11y/gtk3atkutil.cxx:694
     ooo_atk_util_ensure_event_listener bInited
     1
-vcl/unx/gtk3/gtk3gtkinst.cxx:15444
+vcl/unx/gtk3/gtk3gtkinst.cxx:15466
     (anonymous namespace)::ensure_intercept_drawing_area_accessibility bDone
     1
-vcl/unx/gtk3/gtk3gtkinst.cxx:15472
+vcl/unx/gtk3/gtk3gtkinst.cxx:15494
     (anonymous namespace)::ensure_disable_ctrl_page_up_down_bindings bDone
     1
 workdir/LexTarget/l10ntools/source/xrmlex.cxx:706
@@ -1096,7 +1093,7 @@ workdir/LexTarget/l10ntools/source/xrmlex.cxx:706
 writerfilter/source/dmapper/DomainMapper_Impl.hxx:148
     writerfilter::dmapper::FieldParagraph m_bRemove
     0
-writerfilter/source/dmapper/SettingsTable.cxx:269
+writerfilter/source/dmapper/SettingsTable.cxx:271
     writerfilter::dmapper::SettingsTable_Impl m_pThemeFontLangProps
     3
 writerfilter/source/rtftok/rtfdocumentimpl.hxx:873
diff --git a/vcl/inc/svimpbox.hxx b/vcl/inc/svimpbox.hxx
index 34f2500b5ea2..3def46700396 100644
--- a/vcl/inc/svimpbox.hxx
+++ b/vcl/inc/svimpbox.hxx
@@ -125,7 +125,6 @@ private:
 
     bool                m_bUpdateMode : 1;
     bool                m_bSubLstOpLR : 1;    // open/close sublist with cursor left/right, defaulted with false
-    bool                m_bContextMenuHandling : 1;
     bool                mbForceMakeVisible;
 
     Point               m_aEditClickPos;
diff --git a/vcl/source/treelist/svimpbox.cxx b/vcl/source/treelist/svimpbox.cxx
index a00b4fba94a6..eb69c9d5d295 100644
--- a/vcl/source/treelist/svimpbox.cxx
+++ b/vcl/source/treelist/svimpbox.cxx
@@ -106,7 +106,7 @@ SvImpLBox::SvImpLBox( SvTreeListBox* pLBView, SvTreeList* pLBTree, WinBits nWinS
     m_bInVScrollHdl = false;
     m_nFlags |= LBoxFlags::Filling;
 
-    m_bSubLstOpLR = m_bContextMenuHandling = false;
+    m_bSubLstOpLR = false;
 }
 
 SvImpLBox::~SvImpLBox()
@@ -2856,119 +2856,9 @@ void SvImpLBox::Command( const CommandEvent& rCEvt )
             return;
     }
 
-    if( m_bContextMenuHandling && nCommand == CommandEventId::ContextMenu )
-    {
-        Point   aPopupPos;
-        bool    bClickedIsFreePlace = false;
-        std::stack<SvTreeListEntry*> aSelRestore;
-
-        if( rCEvt.IsMouseEvent() )
-        {   // change selection, if mouse position doesn't fit to selection
-
-            aPopupPos = rCEvt.GetMousePosPixel();
-
-            SvTreeListEntry*    pClickedEntry = GetEntry( aPopupPos );
-            if( pClickedEntry )
-            {   // mouse in non empty area
-                bool                bClickedIsSelected = false;
-
-                // collect the currently selected entries
-                SvTreeListEntry*        pSelected = m_pView->FirstSelected();
-                while( pSelected )
-                {
-                    bClickedIsSelected |= ( pClickedEntry == pSelected );
-                    pSelected = m_pView->NextSelected( pSelected );
-                }
-
-                // if the entry which the user clicked at is not selected
-                if( !bClickedIsSelected )
-                {   // deselect all other and select the clicked one
-                    m_pView->SelectAll( false );
-                    m_pView->SetCursor( pClickedEntry );
-                }
-            }
-            else if( m_aSelEng.GetSelectionMode() == SelectionMode::Single )
-            {
-                bClickedIsFreePlace = true;
-                sal_Int32               nSelectedEntries = m_pView->GetSelectionCount();
-                SvTreeListEntry*        pSelected = m_pView->FirstSelected();
-                for(sal_Int32 nSel = 0; nSel < nSelectedEntries; nSel++ )
-                {
-                    aSelRestore.push(pSelected);
-                    pSelected = m_pView->NextSelected( pSelected );
-                }
-                m_pView->SelectAll( false );
-            }
-            else
-            {   // deselect all
-                m_pView->SelectAll( false );
-            }
-
-
-        }
-        else
-        {   // key event (or at least no mouse event)
-            sal_Int32   nSelectionCount = m_pView->GetSelectionCount();
-
-            if( nSelectionCount )
-            {   // now always take first visible as base for positioning the menu
-                SvTreeListEntry*    pSelected = m_pView->FirstSelected();
-                while( pSelected )
-                {
-                    if( IsEntryInView( pSelected ) )
-                        break;
-
-                    pSelected = m_pView->NextSelected( pSelected );
-                }
-
-                if( !pSelected )
-                {
-                    // no one was visible
-                    pSelected = m_pView->FirstSelected();
-                    m_pView->MakeVisible( pSelected );
-                }
-
-                aPopupPos = m_pView->GetFocusRect( pSelected, m_pView->GetEntryPosition( pSelected ).Y() ).Center();
-            }
-            else
-                aPopupPos = Point( 0, 0 );
-        }
-
-        {
-            VclPtr<PopupMenu> pPopup = SvTreeListBox::CreateContextMenu();
-            if (pPopup)
-            {
-                // do action for selected entry in popup menu
-                pPopup->Execute( m_pView, aPopupPos );
-                pPopup.disposeAndClear();
-            }
-        }
-
-        if( bClickedIsFreePlace )
-        {
-            while(!aSelRestore.empty())
-            {
-                SvTreeListEntry* pEntry = aSelRestore.top();
-                //#i19717# the entry is maybe already deleted
-                bool bFound = false;
-                for(sal_uLong nEntry = 0; nEntry < m_pView->GetEntryCount(); nEntry++)
-                    if(pEntry == m_pView->GetEntry(nEntry))
-                    {
-                        bFound = true;
-                        break;
-                    }
-                if(bFound)
-                    SetCurEntry( pEntry );
-                aSelRestore.pop();
-            }
-        }
-    }
-    else
-    {
-        const Point& rPos = rCEvt.GetMousePosPixel();
-        if( rPos.X() < m_aOutputSize.Width() && rPos.Y() < m_aOutputSize.Height() )
-            m_aSelEng.Command( rCEvt );
-    }
+    const Point& rPos = rCEvt.GetMousePosPixel();
+    if( rPos.X() < m_aOutputSize.Width() && rPos.Y() < m_aOutputSize.Height() )
+        m_aSelEng.Command( rCEvt );
 }
 
 tools::Rectangle SvImpLBox::GetVisibleArea() const


More information about the Libreoffice-commits mailing list