summaryrefslogtreecommitdiff
path: root/formula
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-07-04 10:20:13 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-07-04 11:05:28 +0200
commit8237a77245227e434ce8a988aa164a67850281e2 (patch)
tree426634c530dddda87c99ec2c07e0ab22cdcd54f9 /formula
parent2b24fba09c3eaf5d412aa3c3135dfa403b92c788 (diff)
loplugin:unusedfields in formula
Change-Id: I5d8fe8869087efda68d040448b2d9e0e7e5611f6 Reviewed-on: https://gerrit.libreoffice.org/39493 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'formula')
-rw-r--r--formula/source/ui/dlg/ControlHelper.hxx1
-rw-r--r--formula/source/ui/dlg/formula.cxx20
-rw-r--r--formula/source/ui/dlg/funcutl.cxx4
-rw-r--r--formula/source/ui/dlg/parawin.cxx3
-rw-r--r--formula/source/ui/dlg/parawin.hxx3
5 files changed, 3 insertions, 28 deletions
diff --git a/formula/source/ui/dlg/ControlHelper.hxx b/formula/source/ui/dlg/ControlHelper.hxx
index ccfac94a6bf9..d855d829c6f8 100644
--- a/formula/source/ui/dlg/ControlHelper.hxx
+++ b/formula/source/ui/dlg/ControlHelper.hxx
@@ -32,7 +32,6 @@ private:
VclPtr<MultiLineEdit> pMEdit;
Link<EditBox&,void> aSelChangedLink;
Selection aOldSel;
- bool bMouseFlag;
DECL_LINK(ChangedHdl, void *, void);
diff --git a/formula/source/ui/dlg/formula.cxx b/formula/source/ui/dlg/formula.cxx
index 176c233cfe51..d6b40124aa65 100644
--- a/formula/source/ui/dlg/formula.cxx
+++ b/formula/source/ui/dlg/formula.cxx
@@ -140,14 +140,11 @@ public:
::std::unique_ptr<FormulaTokenArray> m_pTokenArray;
::std::unique_ptr<FormulaTokenArrayPlainIterator> m_pTokenArrayIterator;
mutable uno::Sequence< sheet::FormulaOpCodeMapEntry > m_aSpecialOpCodes;
- mutable const sheet::FormulaOpCodeMapEntry* m_pSpecialOpCodesEnd;
mutable uno::Sequence< sheet::FormulaToken > m_aSeparatorsOpCodes;
mutable uno::Sequence< sheet::FormulaOpCodeMapEntry > m_aFunctionOpCodes;
mutable const sheet::FormulaOpCodeMapEntry* m_pFunctionOpCodesEnd;
mutable uno::Sequence< sheet::FormulaOpCodeMapEntry > m_aUnaryOpCodes;
- mutable const sheet::FormulaOpCodeMapEntry* m_pUnaryOpCodesEnd;
mutable uno::Sequence< sheet::FormulaOpCodeMapEntry > m_aBinaryOpCodes;
- mutable const sheet::FormulaOpCodeMapEntry* m_pBinaryOpCodesEnd;
::std::map<FormulaToken*,sheet::FormulaToken> m_aTokenMap;
IFormulaEditorHelper* m_pHelper;
VclPtr<Dialog> m_pParent;
@@ -230,10 +227,7 @@ FormulaDlg_Impl::FormulaDlg_Impl(Dialog* pParent
,const IFunctionManager* _pFunctionMgr
,IControlReferenceHandler* _pDlg)
:
- m_pSpecialOpCodesEnd(nullptr),
m_pFunctionOpCodesEnd(nullptr),
- m_pUnaryOpCodesEnd(nullptr),
- m_pBinaryOpCodesEnd(nullptr),
m_pHelper (_pHelper),
m_pParent (pParent),
pTheRefEdit (nullptr),
@@ -415,10 +409,8 @@ void FormulaDlg_Impl::InitFormulaOpCodeMapper()
m_pFunctionOpCodesEnd = m_aFunctionOpCodes.getConstArray() + m_aFunctionOpCodes.getLength();
m_aUnaryOpCodes = m_xOpCodeMapper->getAvailableMappings(sheet::FormulaLanguage::ODFF,sheet::FormulaMapGroup::UNARY_OPERATORS);
- m_pUnaryOpCodesEnd = m_aUnaryOpCodes.getConstArray() + m_aUnaryOpCodes.getLength();
m_aBinaryOpCodes = m_xOpCodeMapper->getAvailableMappings(sheet::FormulaLanguage::ODFF,sheet::FormulaMapGroup::BINARY_OPERATORS);
- m_pBinaryOpCodesEnd = m_aBinaryOpCodes.getConstArray() + m_aBinaryOpCodes.getLength();
uno::Sequence< OUString > aArgs(3);
aArgs[TOKEN_OPEN] = "(";
@@ -427,7 +419,6 @@ void FormulaDlg_Impl::InitFormulaOpCodeMapper()
m_aSeparatorsOpCodes = m_xOpCodeMapper->getMappings(aArgs,sheet::FormulaLanguage::ODFF);
m_aSpecialOpCodes = m_xOpCodeMapper->getAvailableMappings(sheet::FormulaLanguage::ODFF,sheet::FormulaMapGroup::SPECIAL);
- m_pSpecialOpCodesEnd = m_aSpecialOpCodes.getConstArray() + m_aSpecialOpCodes.getLength();
}
void FormulaDlg_Impl::DeleteArgs()
@@ -1642,13 +1633,10 @@ void FormulaDlg_Impl::UpdateParaWin(const Selection& _rSelection, const OUString
Edit* pEd = GetCurrRefEdit();
if( pEd != nullptr )
pEd->SetSelection( theSel );
-
- pParaWin->SetRefMode(false);
}
+
bool FormulaDlg_Impl::UpdateParaWin(Selection& _rSelection)
{
- pParaWin->SetRefMode(true);
-
OUString aStrEd;
Edit* pEd = GetCurrRefEdit();
if(pEd!=nullptr && pTheRefEdit==nullptr)
@@ -1889,15 +1877,11 @@ IMPL_LINK_NOARG(FormulaDlg, UpdateFocusHdl, Timer *, void)
void FormEditData::SaveValues()
{
- FormEditData* pTemp = new FormEditData(*this);
-
Reset();
- pParent = pTemp;
}
void FormEditData::Reset()
{
- pParent = nullptr;
nMode = 0;
nFStart = 0;
nOffset = 0;
@@ -1911,7 +1895,6 @@ void FormEditData::Reset()
FormEditData& FormEditData::operator=( const FormEditData& r )
{
- pParent = r.pParent;
nMode = r.nMode;
nFStart = r.nFStart;
nOffset = r.nOffset;
@@ -1930,7 +1913,6 @@ FormEditData::FormEditData()
FormEditData::~FormEditData()
{
- delete pParent;
}
FormEditData::FormEditData( const FormEditData& r )
diff --git a/formula/source/ui/dlg/funcutl.cxx b/formula/source/ui/dlg/funcutl.cxx
index 510af07d5597..e78b5df306f4 100644
--- a/formula/source/ui/dlg/funcutl.cxx
+++ b/formula/source/ui/dlg/funcutl.cxx
@@ -287,8 +287,7 @@ IMPL_LINK( ArgInput, EdModifyHdl, Edit&, rEdit, void )
// class EditBox
EditBox::EditBox( vcl::Window* pParent, WinBits nBits )
- :Control(pParent,nBits),
- bMouseFlag(false)
+ :Control(pParent,nBits)
{
WinBits nStyle=GetStyle();
SetStyle( nStyle| WB_DIALOGCONTROL);
@@ -368,7 +367,6 @@ bool EditBox::PreNotify( NotifyEvent& rNEvt )
if(nSwitch==MouseNotifyEvent::MOUSEBUTTONDOWN || nSwitch==MouseNotifyEvent::MOUSEBUTTONUP)
{
- bMouseFlag=true;
Application::PostUserEvent( LINK( this, EditBox, ChangedHdl ), nullptr, true );
}
}
diff --git a/formula/source/ui/dlg/parawin.cxx b/formula/source/ui/dlg/parawin.cxx
index c8e9b0ee9141..f10343a3a5d4 100644
--- a/formula/source/ui/dlg/parawin.cxx
+++ b/formula/source/ui/dlg/parawin.cxx
@@ -40,8 +40,7 @@ ParaWin::ParaWin(vcl::Window* pParent,IControlReferenceHandler* _pDlg):
pFuncDesc ( nullptr ),
pMyParent (_pDlg),
m_sOptional ( ModuleRes( STR_OPTIONAL ) ),
- m_sRequired ( ModuleRes( STR_REQUIRED ) ),
- bRefMode (false)
+ m_sRequired ( ModuleRes( STR_REQUIRED ) )
{
get(m_pFtEditDesc, "editdesc");
get(m_pFtArgName, "parname");
diff --git a/formula/source/ui/dlg/parawin.hxx b/formula/source/ui/dlg/parawin.hxx
index b9e02fabadf0..6884b93a08a3 100644
--- a/formula/source/ui/dlg/parawin.hxx
+++ b/formula/source/ui/dlg/parawin.hxx
@@ -82,7 +82,6 @@ private:
VclPtr<ScrollBar> m_pSlider;
OUString m_sOptional;
OUString m_sRequired;
- bool bRefMode;
sal_uInt16 nEdFocus;
sal_uInt16 nActiveLine;
@@ -127,8 +126,6 @@ public:
void UpdateParas();
void ClearAll();
- void SetRefMode(bool bFlag) {bRefMode=bFlag;}
-
sal_uInt16 GetActiveLine() { return nActiveLine;}
void SetActiveLine(sal_uInt16 no);
RefEdit* GetActiveEdit();