[Libreoffice-commits] core.git: sc/source sc/uiconfig solenv/sanitizers

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Sat Apr 13 13:06:44 UTC 2019


 sc/source/ui/inc/reffact.hxx                     |    2 
 sc/source/ui/inc/tabopdlg.hxx                    |   55 ++---
 sc/source/ui/miscdlgs/tabopdlg.cxx               |  235 +++++++++++------------
 sc/source/ui/view/reffact.cxx                    |    4 
 sc/source/ui/view/tabvwshc.cxx                   |   21 --
 sc/uiconfig/scalc/ui/multipleoperationsdialog.ui |  143 +++++++------
 solenv/sanitizers/ui/modules/scalc.suppr         |    3 
 7 files changed, 236 insertions(+), 227 deletions(-)

New commits:
commit a1a8fda4205581046b021120cae4b7b7e46ef14a
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Fri Apr 12 20:09:27 2019 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Sat Apr 13 15:06:09 2019 +0200

    weld ScTabOpDlg
    
    Change-Id: I515c756451539527faff59b67e0a8d1ee64c1347
    Reviewed-on: https://gerrit.libreoffice.org/70686
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sc/source/ui/inc/reffact.hxx b/sc/source/ui/inc/reffact.hxx
index 8fa24b6f4fe2..c8ab3bc47651 100644
--- a/sc/source/ui/inc/reffact.hxx
+++ b/sc/source/ui/inc/reffact.hxx
@@ -50,7 +50,7 @@ DECL_WRAPPER_WITHID_CONTROLLER(ScSolverDlgWrapper)
 DECL_WRAPPER_WITHID(ScOptSolverDlgWrapper)
 DECL_WRAPPER_WITHID(ScXMLSourceDlgWrapper)
 DECL_WRAPPER_WITHID(ScPivotLayoutWrapper)
-DECL_WRAPPER_WITHID(ScTabOpDlgWrapper)
+DECL_WRAPPER_WITHID_CONTROLLER(ScTabOpDlgWrapper)
 DECL_WRAPPER_WITHID(ScFilterDlgWrapper)
 DECL_WRAPPER_WITHID(ScSpecialFilterDlgWrapper)
 DECL_WRAPPER_WITHID_CONTROLLER(ScDbNameDlgWrapper)
diff --git a/sc/source/ui/inc/tabopdlg.hxx b/sc/source/ui/inc/tabopdlg.hxx
index c02ef2881378..a9e6ebf41a99 100644
--- a/sc/source/ui/inc/tabopdlg.hxx
+++ b/sc/source/ui/inc/tabopdlg.hxx
@@ -20,7 +20,6 @@
 #ifndef INCLUDED_SC_SOURCE_UI_INC_TABOPDLG_HXX
 #define INCLUDED_SC_SOURCE_UI_INC_TABOPDLG_HXX
 
-#include <vcl/fixed.hxx>
 #include <address.hxx>
 #include "anyrefdg.hxx"
 
@@ -35,37 +34,21 @@ enum ScTabOpErr
     TABOPERR_NOROWFORMULA
 };
 
-class ScTabOpDlg : public ScAnyRefDlg
+class ScTabOpDlg : public ScAnyRefDlgController
 {
 public:
-                    ScTabOpDlg( SfxBindings* pB, SfxChildWindow* pCW, vcl::Window* pParent,
-                                ScDocument*     pDocument,
-                                const ScRefAddress& rCursorPos );
-                    virtual ~ScTabOpDlg() override;
-    virtual void    dispose() override;
+    ScTabOpDlg(SfxBindings* pB, SfxChildWindow* pCW, weld::Window* pParent,
+               ScDocument*     pDocument,
+               const ScRefAddress& rCursorPos);
+    virtual ~ScTabOpDlg() override;
 
     virtual void    SetReference( const ScRange& rRef, ScDocument* pDoc ) override;
     virtual bool    IsRefInputMode() const override { return true; }
     virtual void    SetActive() override;
 
-    virtual bool    Close() override;
+    virtual void    Close() override;
 
 private:
-    VclPtr<FixedText> m_pFtFormulaRange;
-    VclPtr<formula::RefEdit> m_pEdFormulaRange;
-    VclPtr<formula::RefButton> m_pRBFormulaRange;
-
-    VclPtr<FixedText> m_pFtRowCell;
-    VclPtr<formula::RefEdit> m_pEdRowCell;
-    VclPtr<formula::RefButton> m_pRBRowCell;
-
-    VclPtr<FixedText> m_pFtColCell;
-    VclPtr<formula::RefEdit> m_pEdColCell;
-    VclPtr<formula::RefButton> m_pRBColCell;
-
-    VclPtr<OKButton>       m_pBtnOk;
-    VclPtr<CancelButton>   m_pBtnCancel;
-
     ScRefAddress    theFormulaCell;
     ScRefAddress    theFormulaEnd;
     ScRefAddress    theRowCell;
@@ -73,7 +56,6 @@ private:
 
     ScDocument* const         pDoc;
     const SCTAB         nCurTab;
-    VclPtr<formula::RefEdit>   pEdActive;
     bool                bDlgLostFocus;
     const OUString      errMsgNoFormula;
     const OUString      errMsgNoColRow;
@@ -82,12 +64,31 @@ private:
     const OUString      errMsgNoColFormula;
     const OUString      errMsgNoRowFormula;
 
+    formula::WeldRefEdit* m_pEdActive;
+    std::unique_ptr<weld::Label> m_xFtFormulaRange;
+    std::unique_ptr<formula::WeldRefEdit> m_xEdFormulaRange;
+    std::unique_ptr<formula::WeldRefButton> m_xRBFormulaRange;
+
+    std::unique_ptr<weld::Label> m_xFtRowCell;
+    std::unique_ptr<formula::WeldRefEdit> m_xEdRowCell;
+    std::unique_ptr<formula::WeldRefButton> m_xRBRowCell;
+
+    std::unique_ptr<weld::Label> m_xFtColCell;
+    std::unique_ptr<formula::WeldRefEdit> m_xEdColCell;
+    std::unique_ptr<formula::WeldRefButton> m_xRBColCell;
+
+    std::unique_ptr<weld::Button> m_xBtnOk;
+    std::unique_ptr<weld::Button> m_xBtnCancel;
+
     void    Init();
     void    RaiseError( ScTabOpErr eError );
 
-    DECL_LINK( BtnHdl, Button*, void );
-    DECL_LINK( GetFocusHdl, Control&, void );
-    DECL_LINK( LoseFocusHdl, Control&, void );
+    DECL_LINK( BtnHdl, weld::Button&, void );
+    DECL_LINK( GetEditFocusHdl, formula::WeldRefEdit&, void );
+    DECL_LINK( LoseEditFocusHdl, formula::WeldRefEdit&, void );
+    DECL_LINK( GetButtonFocusHdl, formula::WeldRefButton&, void );
+    DECL_LINK( LoseButtonFocusHdl, formula::WeldRefButton&, void );
+
 };
 
 #endif // INCLUDED_SC_SOURCE_UI_INC_TABOPDLG_HXX
diff --git a/sc/source/ui/miscdlgs/tabopdlg.cxx b/sc/source/ui/miscdlgs/tabopdlg.cxx
index 46e0d1803a5c..740ee4611718 100644
--- a/sc/source/ui/miscdlgs/tabopdlg.cxx
+++ b/sc/source/ui/miscdlgs/tabopdlg.cxx
@@ -32,16 +32,14 @@
 
 //  class ScTabOpDlg
 
-ScTabOpDlg::ScTabOpDlg( SfxBindings* pB, SfxChildWindow* pCW, vcl::Window* pParent,
-                        ScDocument*         pDocument,
-                        const ScRefAddress& rCursorPos )
-
-    : ScAnyRefDlg(pB, pCW, pParent, "MultipleOperationsDialog",
-        "modules/scalc/ui/multipleoperationsdialog.ui")
+ScTabOpDlg::ScTabOpDlg(SfxBindings* pB, SfxChildWindow* pCW, weld::Window* pParent,
+                       ScDocument* pDocument,
+                       const ScRefAddress& rCursorPos )
+    : ScAnyRefDlgController(pB, pCW, pParent, "modules/scalc/ui/multipleoperationsdialog.ui",
+                            "MultipleOperationsDialog")
     , theFormulaCell(rCursorPos)
     , pDoc(pDocument)
     , nCurTab(theFormulaCell.Tab())
-    , pEdActive(nullptr)
     , bDlgLostFocus(false)
     , errMsgNoFormula(ScResId(STR_NOFORMULASPECIFIED))
     , errMsgNoColRow(ScResId(STR_NOCOLROW))
@@ -49,86 +47,67 @@ ScTabOpDlg::ScTabOpDlg( SfxBindings* pB, SfxChildWindow* pCW, vcl::Window* pPare
     , errMsgWrongRowCol(ScResId(STR_WRONGROWCOL))
     , errMsgNoColFormula(ScResId(STR_NOCOLFORMULA))
     , errMsgNoRowFormula(ScResId(STR_NOROWFORMULA))
+    , m_pEdActive(nullptr)
+    , m_xFtFormulaRange(m_xBuilder->weld_label("formulasft"))
+    , m_xEdFormulaRange(new formula::WeldRefEdit(m_xBuilder->weld_entry("formulas")))
+    , m_xRBFormulaRange(new formula::WeldRefButton(m_xBuilder->weld_button("formulasref")))
+    , m_xFtRowCell(m_xBuilder->weld_label("rowft"))
+    , m_xEdRowCell(new formula::WeldRefEdit(m_xBuilder->weld_entry("row")))
+    , m_xRBRowCell(new formula::WeldRefButton(m_xBuilder->weld_button("rowref")))
+    , m_xFtColCell(m_xBuilder->weld_label("colft"))
+    , m_xEdColCell(new formula::WeldRefEdit(m_xBuilder->weld_entry("col")))
+    , m_xRBColCell(new formula::WeldRefButton(m_xBuilder->weld_button("colref")))
+    , m_xBtnOk(m_xBuilder->weld_button("ok"))
+    , m_xBtnCancel(m_xBuilder->weld_button("cancel"))
 {
-    get(m_pFtFormulaRange, "formulasft");
-    get(m_pEdFormulaRange, "formulas");
-    m_pEdFormulaRange->SetReferences(this, m_pFtFormulaRange);
-    get(m_pRBFormulaRange, "formulasref");
-    m_pRBFormulaRange->SetReferences(this, m_pEdFormulaRange);
-
-    get(m_pFtRowCell, "rowft");
-    get(m_pEdRowCell, "row");
-    m_pEdRowCell->SetReferences(this, m_pFtRowCell);
-    get(m_pRBRowCell, "rowref");
-    m_pRBRowCell->SetReferences(this, m_pEdRowCell);
-
-    get(m_pFtColCell, "colft");
-    get(m_pEdColCell, "col");
-    m_pEdColCell->SetReferences(this, m_pFtColCell);
-    get(m_pRBColCell, "colref");
-    m_pRBColCell->SetReferences(this, m_pEdColCell);
-
-    get(m_pBtnOk, "ok");
-    get(m_pBtnCancel, "cancel");
+    m_xEdFormulaRange->SetReferences(this, m_xFtFormulaRange.get());
+    m_xRBFormulaRange->SetReferences(this, m_xEdFormulaRange.get());
+
+    m_xEdRowCell->SetReferences(this, m_xFtRowCell.get());
+    m_xRBRowCell->SetReferences(this, m_xEdRowCell.get());
+
+    m_xEdColCell->SetReferences(this, m_xFtColCell.get());
+    m_xRBColCell->SetReferences(this, m_xEdColCell.get());
 
     Init();
 }
 
 ScTabOpDlg::~ScTabOpDlg()
 {
-    disposeOnce();
-}
-
-void ScTabOpDlg::dispose()
-{
-    Hide();
-    m_pFtFormulaRange.clear();
-    m_pEdFormulaRange.clear();
-    m_pRBFormulaRange.clear();
-    m_pFtRowCell.clear();
-    m_pEdRowCell.clear();
-    m_pRBRowCell.clear();
-    m_pFtColCell.clear();
-    m_pEdColCell.clear();
-    m_pRBColCell.clear();
-    m_pBtnOk.clear();
-    m_pBtnCancel.clear();
-    pEdActive.clear();
-    ScAnyRefDlg::dispose();
 }
 
-
 void ScTabOpDlg::Init()
 {
-    m_pBtnOk->SetClickHdl     ( LINK( this, ScTabOpDlg, BtnHdl ) );
-    m_pBtnCancel->SetClickHdl     ( LINK( this, ScTabOpDlg, BtnHdl ) );
-
-    Link<Control&,void> aLink = LINK( this, ScTabOpDlg, GetFocusHdl );
-    m_pEdFormulaRange->SetGetFocusHdl( aLink );
-    m_pRBFormulaRange->SetGetFocusHdl( aLink );
-    m_pEdRowCell->SetGetFocusHdl( aLink );
-    m_pRBRowCell->SetGetFocusHdl( aLink );
-    m_pEdColCell->SetGetFocusHdl( aLink );
-    m_pRBColCell->SetGetFocusHdl( aLink );
-
-    aLink = LINK( this, ScTabOpDlg, LoseFocusHdl );
-    m_pEdFormulaRange->SetLoseFocusHdl( aLink );
-    m_pRBFormulaRange->SetLoseFocusHdl( aLink );
-    m_pEdRowCell->SetLoseFocusHdl( aLink );
-    m_pRBRowCell->SetLoseFocusHdl( aLink );
-    m_pEdColCell->SetLoseFocusHdl( aLink );
-    m_pRBColCell->SetLoseFocusHdl( aLink );
-
-    m_pEdFormulaRange->GrabFocus();
-    pEdActive = m_pEdFormulaRange;
-
-    //@BugID 54702 Enable/Disable only in the base class
-    //SFX_APPWINDOW->Enable();
+    m_xBtnOk->connect_clicked( LINK( this, ScTabOpDlg, BtnHdl ) );
+    m_xBtnCancel->connect_clicked( LINK( this, ScTabOpDlg, BtnHdl ) );
+
+    Link<formula::WeldRefEdit&,void> aEditLink = LINK( this, ScTabOpDlg, GetEditFocusHdl );
+    m_xEdFormulaRange->SetGetFocusHdl( aEditLink );
+    m_xEdRowCell->SetGetFocusHdl( aEditLink );
+    m_xEdColCell->SetGetFocusHdl( aEditLink );
+
+    Link<formula::WeldRefButton&,void> aButtonLink = LINK( this, ScTabOpDlg, GetButtonFocusHdl );
+    m_xRBFormulaRange->SetGetFocusHdl( aButtonLink );
+    m_xRBRowCell->SetGetFocusHdl( aButtonLink );
+    m_xRBColCell->SetGetFocusHdl( aButtonLink );
+
+    aEditLink = LINK( this, ScTabOpDlg, LoseEditFocusHdl );
+    m_xEdFormulaRange->SetLoseFocusHdl( aEditLink );
+    m_xEdRowCell->SetLoseFocusHdl( aEditLink );
+    m_xEdColCell->SetLoseFocusHdl( aEditLink );
+
+    aButtonLink = LINK( this, ScTabOpDlg, LoseButtonFocusHdl );
+    m_xRBFormulaRange->SetLoseFocusHdl( aButtonLink );
+    m_xRBRowCell->SetLoseFocusHdl( aButtonLink );
+    m_xRBColCell->SetLoseFocusHdl( aButtonLink );
+
+    m_xEdFormulaRange->GrabFocus();
+    m_pEdActive = m_xEdFormulaRange.get();
 }
 
-bool ScTabOpDlg::Close()
+void ScTabOpDlg::Close()
 {
-    return DoClose( ScTabOpDlgWrapper::GetChildWindowId() );
+    DoClose( ScTabOpDlgWrapper::GetChildWindowId() );
 }
 
 void ScTabOpDlg::SetActive()
@@ -136,94 +115,94 @@ void ScTabOpDlg::SetActive()
     if ( bDlgLostFocus )
     {
         bDlgLostFocus = false;
-        if( pEdActive )
-            pEdActive->GrabFocus();
+        if (m_pEdActive)
+            m_pEdActive->GrabFocus();
     }
     else
-        GrabFocus();
+        m_xDialog->grab_focus();
 
     RefInputDone();
 }
 
 void ScTabOpDlg::SetReference( const ScRange& rRef, ScDocument* pDocP )
 {
-    if ( pEdActive )
+    if (m_pEdActive)
     {
         ScAddress::Details aDetails(pDocP->GetAddressConvention(), 0, 0);
 
         if ( rRef.aStart != rRef.aEnd )
-            RefInputStart(pEdActive);
+            RefInputStart(m_pEdActive);
 
         OUString      aStr;
         ScRefFlags      nFmt = ( rRef.aStart.Tab() == nCurTab )
                                 ? ScRefFlags::RANGE_ABS
                                 : ScRefFlags::RANGE_ABS_3D;
 
-        if (pEdActive == m_pEdFormulaRange)
+        if (m_pEdActive == m_xEdFormulaRange.get())
         {
             theFormulaCell.Set( rRef.aStart, false, false, false);
             theFormulaEnd.Set( rRef.aEnd, false, false, false);
             aStr = rRef.Format(nFmt, pDocP, aDetails);
         }
-        else if ( pEdActive == m_pEdRowCell )
+        else if (m_pEdActive == m_xEdRowCell.get())
         {
             theRowCell.Set( rRef.aStart, false, false, false);
             aStr = rRef.aStart.Format(nFmt, pDocP, aDetails);
         }
-        else if ( pEdActive == m_pEdColCell )
+        else if (m_pEdActive == m_xEdColCell.get())
         {
             theColCell.Set( rRef.aStart, false, false, false);
             aStr = rRef.aStart.Format(nFmt, pDocP, aDetails);
         }
 
-        pEdActive->SetRefString( aStr );
+        m_pEdActive->SetRefString( aStr );
     }
 }
 
 void ScTabOpDlg::RaiseError( ScTabOpErr eError )
 {
     const OUString* pMsg = &errMsgNoFormula;
-    Edit*           pEd  = m_pEdFormulaRange;
+    formula::WeldRefEdit* pEd  = m_xEdFormulaRange.get();
 
     switch ( eError )
     {
         case TABOPERR_NOFORMULA:
             pMsg = &errMsgNoFormula;
-            pEd  = m_pEdFormulaRange;
+            pEd  = m_xEdFormulaRange.get();
             break;
 
         case TABOPERR_NOCOLROW:
             pMsg = &errMsgNoColRow;
-            pEd  = m_pEdRowCell;
+            pEd  = m_xEdRowCell.get();
             break;
 
         case TABOPERR_WRONGFORMULA:
             pMsg = &errMsgWrongFormula;
-            pEd  = m_pEdFormulaRange;
+            pEd  = m_xEdFormulaRange.get();
             break;
 
         case TABOPERR_WRONGROW:
             pMsg = &errMsgWrongRowCol;
-            pEd  = m_pEdRowCell;
+            pEd  = m_xEdRowCell.get();
             break;
 
         case TABOPERR_NOCOLFORMULA:
             pMsg = &errMsgNoColFormula;
-            pEd  = m_pEdFormulaRange;
+            pEd  = m_xEdFormulaRange.get();
             break;
 
         case TABOPERR_WRONGCOL:
             pMsg = &errMsgWrongRowCol;
-            pEd  = m_pEdColCell;
+            pEd  = m_xEdColCell.get();
             break;
 
         case TABOPERR_NOROWFORMULA:
             pMsg = &errMsgNoRowFormula;
-            pEd  = m_pEdFormulaRange;
+            pEd  = m_xEdFormulaRange.get();
             break;
     }
 
-    std::unique_ptr<weld::MessageDialog> xBox(Application::CreateMessageDialog(GetFrameWeld(),
+    std::unique_ptr<weld::MessageDialog> xBox(Application::CreateMessageDialog(m_xDialog.get(),
                                               VclMessageType::Error, VclButtonsType::OkCancel, *pMsg));
     xBox->run();
     pEd->GrabFocus();
@@ -246,9 +225,9 @@ static bool lcl_Parse( const OUString& rString, const ScDocument* pDoc, SCTAB nC
 
 // Handler:
 
-IMPL_LINK( ScTabOpDlg, BtnHdl, Button*, pBtn, void )
+IMPL_LINK(ScTabOpDlg, BtnHdl, weld::Button&, rBtn, void)
 {
-    if (pBtn == m_pBtnOk)
+    if (&rBtn == m_xBtnOk.get())
     {
         ScTabOpParam::Mode eMode = ScTabOpParam::Column;
         sal_uInt16 nError = 0;
@@ -259,34 +238,34 @@ IMPL_LINK( ScTabOpDlg, BtnHdl, Button*, pBtn, void )
         //    or single reference if both?
         // 3. is at least one of row or column non-empty?
 
-        if (m_pEdFormulaRange->GetText().isEmpty())
+        if (m_xEdFormulaRange->GetText().isEmpty())
             nError = TABOPERR_NOFORMULA;
-        else if (m_pEdRowCell->GetText().isEmpty() &&
-                 m_pEdColCell->GetText().isEmpty())
+        else if (m_xEdRowCell->GetText().isEmpty() &&
+                 m_xEdColCell->GetText().isEmpty())
             nError = TABOPERR_NOCOLROW;
-        else if ( !lcl_Parse( m_pEdFormulaRange->GetText(), pDoc, nCurTab,
+        else if ( !lcl_Parse( m_xEdFormulaRange->GetText(), pDoc, nCurTab,
                                 theFormulaCell, theFormulaEnd ) )
             nError = TABOPERR_WRONGFORMULA;
         else
         {
             const formula::FormulaGrammar::AddressConvention eConv = pDoc->GetAddressConvention();
-            if (!m_pEdRowCell->GetText().isEmpty())
+            if (!m_xEdRowCell->GetText().isEmpty())
             {
-                if (!ConvertSingleRef( pDoc, m_pEdRowCell->GetText(), nCurTab,
+                if (!ConvertSingleRef( pDoc, m_xEdRowCell->GetText(), nCurTab,
                                        theRowCell, eConv ))
                     nError = TABOPERR_WRONGROW;
                 else
                 {
-                    if (m_pEdColCell->GetText().isEmpty() &&
+                    if (m_xEdColCell->GetText().isEmpty() &&
                         theFormulaCell.Col() != theFormulaEnd.Col())
                         nError = TABOPERR_NOCOLFORMULA;
                     else
                         eMode = ScTabOpParam::Row;
                 }
             }
-            if (!m_pEdColCell->GetText().isEmpty())
+            if (!m_xEdColCell->GetText().isEmpty())
             {
-                if (!ConvertSingleRef( pDoc, m_pEdColCell->GetText(), nCurTab,
+                if (!ConvertSingleRef( pDoc, m_xEdColCell->GetText(), nCurTab,
                                        theColCell, eConv ))
                     nError = TABOPERR_WRONGCOL;
                 else
@@ -294,7 +273,7 @@ IMPL_LINK( ScTabOpDlg, BtnHdl, Button*, pBtn, void )
                     if (eMode == ScTabOpParam::Row)                         // both
                     {
                         eMode = ScTabOpParam::Both;
-                        ConvertSingleRef( pDoc, m_pEdFormulaRange->GetText(), nCurTab,
+                        ConvertSingleRef( pDoc, m_xEdFormulaRange->GetText(), nCurTab,
                                           theFormulaCell, eConv );
                     }
                     else if (theFormulaCell.Row() != theFormulaEnd.Row())
@@ -317,31 +296,51 @@ IMPL_LINK( ScTabOpDlg, BtnHdl, Button*, pBtn, void )
             GetBindings().GetDispatcher()->ExecuteList(SID_TABOP,
                                       SfxCallMode::SLOT | SfxCallMode::RECORD,
                                       { &aOutItem });
-            Close();
+            response(RET_OK);
         }
     }
-    else if (pBtn == m_pBtnCancel)
-        Close();
+    else if (&rBtn == m_xBtnCancel.get())
+        response(RET_CANCEL);
 }
 
-IMPL_LINK( ScTabOpDlg, GetFocusHdl, Control&, rCtrl, void )
+IMPL_LINK( ScTabOpDlg, GetEditFocusHdl, formula::WeldRefEdit&, rCtrl, void )
 {
-    if( (&rCtrl == static_cast<Control*>(m_pEdFormulaRange)) || (&rCtrl == static_cast<Control*>(m_pRBFormulaRange)) )
-        pEdActive = m_pEdFormulaRange;
-    else if( (&rCtrl == static_cast<Control*>(m_pEdRowCell)) || (&rCtrl == static_cast<Control*>(m_pRBRowCell)) )
-        pEdActive = m_pEdRowCell;
-    else if( (&rCtrl == static_cast<Control*>(m_pEdColCell)) || (&rCtrl == static_cast<Control*>(m_pRBColCell)) )
-        pEdActive = m_pEdColCell;
+    if (&rCtrl == m_xEdFormulaRange.get())
+        m_pEdActive = m_xEdFormulaRange.get();
+    else if (&rCtrl == m_xEdRowCell.get())
+        m_pEdActive = m_xEdRowCell.get();
+    else if (&rCtrl == m_xEdColCell.get())
+        m_pEdActive = m_xEdColCell.get();
     else
-        pEdActive = nullptr;
+        m_pEdActive = nullptr;
 
-    if( pEdActive )
-        pEdActive->SetSelection( Selection( 0, SELECTION_MAX ) );
+    if( m_pEdActive )
+        m_pEdActive->SelectAll();
+}
+
+IMPL_LINK( ScTabOpDlg, GetButtonFocusHdl, formula::WeldRefButton&, rCtrl, void )
+{
+    if (&rCtrl == m_xRBFormulaRange.get())
+        m_pEdActive = m_xEdFormulaRange.get();
+    else if (&rCtrl == m_xRBRowCell.get())
+        m_pEdActive = m_xEdRowCell.get();
+    else if (&rCtrl == m_xRBColCell.get())
+        m_pEdActive = m_xEdColCell.get();
+    else
+        m_pEdActive = nullptr;
+
+    if( m_pEdActive )
+        m_pEdActive->SelectAll();
+}
+
+IMPL_LINK_NOARG(ScTabOpDlg, LoseEditFocusHdl, formula::WeldRefEdit&, void)
+{
+    bDlgLostFocus = !m_xDialog->has_toplevel_focus();
 }
 
-IMPL_LINK_NOARG(ScTabOpDlg, LoseFocusHdl, Control&, void)
+IMPL_LINK_NOARG(ScTabOpDlg, LoseButtonFocusHdl, formula::WeldRefButton&, void)
 {
-    bDlgLostFocus = !IsActive();
+    bDlgLostFocus = !m_xDialog->has_toplevel_focus();
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/view/reffact.cxx b/sc/source/ui/view/reffact.cxx
index 24461740e766..b480dc079ce9 100644
--- a/sc/source/ui/view/reffact.cxx
+++ b/sc/source/ui/view/reffact.cxx
@@ -38,7 +38,7 @@ SFX_IMPL_CHILDWINDOW_WITHID(ScSolverDlgWrapper, SID_OPENDLG_SOLVE )
 SFX_IMPL_MODELESSDIALOG_WITHID(ScOptSolverDlgWrapper, SID_OPENDLG_OPTSOLVER )
 SFX_IMPL_MODELESSDIALOG_WITHID(ScXMLSourceDlgWrapper, SID_MANAGE_XML_SOURCE)
 SFX_IMPL_MODELESSDIALOG_WITHID(ScPivotLayoutWrapper, SID_OPENDLG_PIVOTTABLE )
-SFX_IMPL_MODELESSDIALOG_WITHID(ScTabOpDlgWrapper, SID_OPENDLG_TABOP )
+SFX_IMPL_CHILDWINDOW_WITHID(ScTabOpDlgWrapper, SID_OPENDLG_TABOP )
 SFX_IMPL_MODELESSDIALOG_WITHID(ScFilterDlgWrapper, SID_FILTER )
 SFX_IMPL_MODELESSDIALOG_WITHID(ScSpecialFilterDlgWrapper, SID_SPECIAL_FILTER )
 SFX_IMPL_CHILDWINDOW_WITHID(ScDbNameDlgWrapper, SID_DEFINE_DBNAME )
@@ -133,7 +133,7 @@ IMPL_CHILD_CTOR( ScXMLSourceDlgWrapper, SID_MANAGE_XML_SOURCE)
 
 IMPL_CHILD_CTOR( ScPivotLayoutWrapper, SID_OPENDLG_PIVOTTABLE )
 
-IMPL_CHILD_CTOR( ScTabOpDlgWrapper, SID_OPENDLG_TABOP )
+IMPL_CONTROLLER_CHILD_CTOR( ScTabOpDlgWrapper, SID_OPENDLG_TABOP )
 
 IMPL_CHILD_CTOR( ScFilterDlgWrapper, SID_FILTER )
 
diff --git a/sc/source/ui/view/tabvwshc.cxx b/sc/source/ui/view/tabvwshc.cxx
index 147794aed117..1452a319b577 100644
--- a/sc/source/ui/view/tabvwshc.cxx
+++ b/sc/source/ui/view/tabvwshc.cxx
@@ -238,17 +238,6 @@ VclPtr<SfxModelessDialog> ScTabViewShell::CreateRefDialog(
         }
         break;
 
-        case SID_OPENDLG_TABOP:
-        {
-            ScViewData&   rViewData  = GetViewData();
-            ScRefAddress  aCurPos   ( rViewData.GetCurX(),
-                                      rViewData.GetCurY(),
-                                      rViewData.GetTabNo());
-
-            pResult = VclPtr<ScTabOpDlg>::Create( pB, pCW, pParent, rViewData.GetDocument(), aCurPos );
-        }
-        break;
-
         case SID_OPENDLG_OPTSOLVER:
         {
             ScViewData& rViewData = GetViewData();
@@ -488,6 +477,16 @@ std::unique_ptr<SfxModelessDialogController> ScTabViewShell::CreateRefDialogCont
             xResult.reset(new ScSolverDlg(pB, pCW, pParent, rViewData.GetDocument(), aCurPos));
             break;
         }
+        case SID_OPENDLG_TABOP:
+        {
+            ScViewData&   rViewData  = GetViewData();
+            ScRefAddress  aCurPos   ( rViewData.GetCurX(),
+                                      rViewData.GetCurY(),
+                                      rViewData.GetTabNo());
+
+            xResult.reset(new ScTabOpDlg(pB, pCW, pParent, rViewData.GetDocument(), aCurPos));
+            break;
+        }
     }
 
     if (xResult)
diff --git a/sc/uiconfig/scalc/ui/multipleoperationsdialog.ui b/sc/uiconfig/scalc/ui/multipleoperationsdialog.ui
index dada897493f9..7f4af1d72001 100644
--- a/sc/uiconfig/scalc/ui/multipleoperationsdialog.ui
+++ b/sc/uiconfig/scalc/ui/multipleoperationsdialog.ui
@@ -1,19 +1,80 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.18.3 -->
+<!-- Generated with glade 3.22.1 -->
 <interface domain="sc">
   <requires lib="gtk+" version="3.18"/>
-  <requires lib="LibreOffice" version="1.0"/>
   <object class="GtkDialog" id="MultipleOperationsDialog">
     <property name="can_focus">False</property>
     <property name="border_width">6</property>
     <property name="title" translatable="yes" context="multipleoperationsdialog|MultipleOperationsDialog">Multiple operations</property>
     <property name="resizable">False</property>
+    <property name="default_width">0</property>
+    <property name="default_height">0</property>
     <property name="type_hint">dialog</property>
+    <child>
+      <placeholder/>
+    </child>
     <child internal-child="vbox">
       <object class="GtkBox" id="dialog-vbox1">
         <property name="can_focus">False</property>
         <property name="orientation">vertical</property>
         <property name="spacing">12</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="dialog-action_area1">
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</property>
+            <child>
+              <object class="GtkButton" id="ok">
+                <property name="label">gtk-ok</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="has_default">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="cancel">
+                <property name="label">gtk-cancel</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="help">
+                <property name="label">gtk-help</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">2</property>
+                <property name="secondary">True</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="pack_type">end</property>
+            <property name="position">2</property>
+          </packing>
+        </child>
         <child>
           <object class="GtkFrame" id="itemframe">
             <property name="visible">True</property>
@@ -38,10 +99,10 @@
                       <object class="GtkLabel" id="formulasft">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
-                        <property name="xalign">0</property>
                         <property name="label" translatable="yes" context="multipleoperationsdialog|formulasft">_Formulas:</property>
                         <property name="use_underline">True</property>
                         <property name="mnemonic_widget">formulas</property>
+                        <property name="xalign">0</property>
                       </object>
                       <packing>
                         <property name="left_attach">0</property>
@@ -52,10 +113,10 @@
                       <object class="GtkLabel" id="rowft">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
-                        <property name="xalign">0</property>
                         <property name="label" translatable="yes" context="multipleoperationsdialog|rowft">_Row input cell:</property>
                         <property name="use_underline">True</property>
                         <property name="mnemonic_widget">row</property>
+                        <property name="xalign">0</property>
                       </object>
                       <packing>
                         <property name="left_attach">0</property>
@@ -66,10 +127,10 @@
                       <object class="GtkLabel" id="colft">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
-                        <property name="xalign">0</property>
                         <property name="label" translatable="yes" context="multipleoperationsdialog|colft">_Column input cell:</property>
                         <property name="use_underline">True</property>
                         <property name="mnemonic_widget">col</property>
+                        <property name="xalign">0</property>
                       </object>
                       <packing>
                         <property name="left_attach">0</property>
@@ -77,10 +138,11 @@
                       </packing>
                     </child>
                     <child>
-                      <object class="foruilo-RefEdit" id="formulas">
+                      <object class="GtkEntry" id="formulas">
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="hexpand">True</property>
+                        <property name="activates_default">True</property>
                         <property name="width_chars">35</property>
                       </object>
                       <packing>
@@ -89,10 +151,11 @@
                       </packing>
                     </child>
                     <child>
-                      <object class="foruilo-RefEdit" id="row">
+                      <object class="GtkEntry" id="row">
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="hexpand">True</property>
+                        <property name="activates_default">True</property>
                         <property name="width_chars">35</property>
                       </object>
                       <packing>
@@ -101,10 +164,11 @@
                       </packing>
                     </child>
                     <child>
-                      <object class="foruilo-RefEdit" id="col">
+                      <object class="GtkEntry" id="col">
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="hexpand">True</property>
+                        <property name="activates_default">True</property>
                         <property name="width_chars">35</property>
                       </object>
                       <packing>
@@ -113,7 +177,7 @@
                       </packing>
                     </child>
                     <child>
-                      <object class="foruilo-RefButton" id="formulasref">
+                      <object class="GtkButton" id="formulasref">
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="receives_default">True</property>
@@ -124,7 +188,7 @@
                       </packing>
                     </child>
                     <child>
-                      <object class="foruilo-RefButton" id="rowref">
+                      <object class="GtkButton" id="rowref">
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="receives_default">True</property>
@@ -135,7 +199,7 @@
                       </packing>
                     </child>
                     <child>
-                      <object class="foruilo-RefButton" id="colref">
+                      <object class="GtkButton" id="colref">
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="receives_default">True</property>
@@ -166,63 +230,6 @@
             <property name="position">0</property>
           </packing>
         </child>
-        <child internal-child="action_area">
-          <object class="GtkButtonBox" id="dialog-action_area1">
-            <property name="can_focus">False</property>
-            <property name="layout_style">end</property>
-            <child>
-              <object class="GtkButton" id="ok">
-                <property name="label">gtk-ok</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="has_default">True</property>
-                <property name="receives_default">True</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">True</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="cancel">
-                <property name="label">gtk-cancel</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">True</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="help">
-                <property name="label">gtk-help</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">True</property>
-                <property name="position">2</property>
-                <property name="secondary">True</property>
-              </packing>
-            </child>
-          </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">True</property>
-            <property name="pack_type">end</property>
-            <property name="position">2</property>
-          </packing>
-        </child>
       </object>
     </child>
     <action-widgets>
diff --git a/solenv/sanitizers/ui/modules/scalc.suppr b/solenv/sanitizers/ui/modules/scalc.suppr
index 501da89c964c..c5728a93a1b9 100644
--- a/solenv/sanitizers/ui/modules/scalc.suppr
+++ b/solenv/sanitizers/ui/modules/scalc.suppr
@@ -147,6 +147,9 @@ sc/uiconfig/scalc/ui/movingaveragedialog.ui://GtkLabel[@id='interval-label'] orp
 sc/uiconfig/scalc/ui/movingaveragedialog.ui://GtkSpinButton[@id='interval-spin'] no-labelled-by
 sc/uiconfig/scalc/ui/movingaveragedialog.ui://GtkButton[@id='input-range-button'] button-no-label
 sc/uiconfig/scalc/ui/movingaveragedialog.ui://GtkButton[@id='output-range-button'] button-no-label
+sc/uiconfig/scalc/ui/multipleoperationsdialog.ui://GtkButton[@id='formulasref'] button-no-label
+sc/uiconfig/scalc/ui/multipleoperationsdialog.ui://GtkButton[@id='rowref'] button-no-label
+sc/uiconfig/scalc/ui/multipleoperationsdialog.ui://GtkButton[@id='colref'] button-no-label
 sc/uiconfig/scalc/ui/nosolutiondialog.ui://GtkLabel[@id='label1'] orphan-label
 sc/uiconfig/scalc/ui/nosolutiondialog.ui://GtkLabel[@id='error'] orphan-label
 sc/uiconfig/scalc/ui/numbertransformationentry.ui:GtkGrid[@id='grid']/GtkBox/GtkLabel orphan-label


More information about the Libreoffice-commits mailing list