[Libreoffice-commits] core.git: formula/source

Eike Rathke erack at redhat.com
Fri Jul 14 17:51:37 UTC 2017


 formula/source/ui/dlg/formula.cxx |    9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

New commits:
commit d6a16aedca28ad5a907104c02174abd88fb03aed
Author: Eike Rathke <erack at redhat.com>
Date:   Fri Jul 14 19:43:02 2017 +0200

    Turn m_nEdFocus into local variable, it's not read elsewhere
    
    ... and not read after having been set in FillControls()
    
    Change-Id: I09ae5655b6187bcedc95232797bddb24b9064847

diff --git a/formula/source/ui/dlg/formula.cxx b/formula/source/ui/dlg/formula.cxx
index 0a75753c8551..8742cc2184c7 100644
--- a/formula/source/ui/dlg/formula.cxx
+++ b/formula/source/ui/dlg/formula.cxx
@@ -199,7 +199,6 @@ public:
 
     vcl::Font               m_aFntBold;
     vcl::Font               m_aFntLight;
-    sal_uInt16              m_nEdFocus;
     bool                    m_bEditFlag;
     const IFunctionDescription* m_pFuncDesc;
     sal_Int32               m_nArgs;
@@ -239,7 +238,6 @@ FormulaDlg_Impl::FormulaDlg_Impl(Dialog* pParent
     m_aFormulaHelper(_pFunctionMgr),
     m_bIsShutDown   (false),
     m_bMakingTree   (false),
-    m_nEdFocus      (0),
     m_pFuncDesc     (nullptr),
     m_nArgs         (0),
     m_nFuncExpStart (0)
@@ -926,7 +924,6 @@ void FormulaDlg_Impl::FillControls( bool &rbNext, bool &rbPrev)
 
         m_nArgs = m_pFuncDesc->getSuppressedArgumentCount();
         sal_uInt16 nOffset = pData->GetOffset();
-        m_nEdFocus = pData->GetEdFocus();
 
         //  Concatenate the Edit's for Focus-Control
 
@@ -1286,7 +1283,7 @@ IMPL_LINK( FormulaDlg_Impl, FxHdl, ParaWin&, rPtr, void )
             return;
 
         sal_uInt16 nArgNo = m_pParaWin->GetActiveLine();
-        m_nEdFocus = nArgNo;
+        sal_uInt16 nEdFocus = nArgNo;
 
         SaveArg(nArgNo);
         UpdateSelection();
@@ -1294,9 +1291,9 @@ IMPL_LINK( FormulaDlg_Impl, FxHdl, ParaWin&, rPtr, void )
         sal_Int32 nFormulaStrPos = pData->GetFStart();
 
         OUString aFormula = m_pHelper->getCurrentFormula();
-        sal_Int32 n1 = m_aFormulaHelper.GetArgStart( aFormula, nFormulaStrPos, m_nEdFocus+pData->GetOffset() );
+        sal_Int32 n1 = m_aFormulaHelper.GetArgStart( aFormula, nFormulaStrPos, nEdFocus + pData->GetOffset() );
 
-        pData->SetEdFocus( m_nEdFocus );
+        pData->SetEdFocus( nEdFocus );
         pData->SaveValues();
         pData->SetMode( (sal_uInt16) FORMULA_FORMDLG_FORMULA );
         pData->SetFStart( n1 );


More information about the Libreoffice-commits mailing list