[Libreoffice-commits] core.git: compilerplugins/clang formula/source include/formula sc/source
Noel Grandin
noel.grandin at collabora.co.uk
Tue Jul 4 09:05:55 UTC 2017
compilerplugins/clang/unusedfields.writeonly.results | 12 -----------
formula/source/ui/dlg/ControlHelper.hxx | 1
formula/source/ui/dlg/formula.cxx | 20 -------------------
formula/source/ui/dlg/funcutl.cxx | 4 ---
formula/source/ui/dlg/parawin.cxx | 3 --
formula/source/ui/dlg/parawin.hxx | 3 --
include/formula/formdata.hxx | 1
sc/source/ui/formdlg/formdata.cxx | 3 --
8 files changed, 3 insertions(+), 44 deletions(-)
New commits:
commit 8237a77245227e434ce8a988aa164a67850281e2
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date: Tue Jul 4 10:20:13 2017 +0200
loplugin:unusedfields in formula
Change-Id: I5d8fe8869087efda68d040448b2d9e0e7e5611f6
Reviewed-on: https://gerrit.libreoffice.org/39493
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/compilerplugins/clang/unusedfields.writeonly.results b/compilerplugins/clang/unusedfields.writeonly.results
index 4f8918808a3c..3ed17c51fcec 100644
--- a/compilerplugins/clang/unusedfields.writeonly.results
+++ b/compilerplugins/clang/unusedfields.writeonly.results
@@ -712,16 +712,6 @@ filter/source/xsltdialog/xmlfiltersettingsdialog.hxx:71
XMLFilterListBox m_aEnsureResMgr class EnsureResMgr
filter/source/xsltdialog/xmlfiltersettingsdialog.hxx:130
XMLFilterSettingsDialog maEnsureResMgr class EnsureResMgr
-formula/source/ui/dlg/ControlHelper.hxx:35
- formula::EditBox bMouseFlag _Bool
-formula/source/ui/dlg/formula.cxx:143
- formula::FormulaDlg_Impl m_pSpecialOpCodesEnd const sheet::FormulaOpCodeMapEntry *
-formula/source/ui/dlg/formula.cxx:148
- formula::FormulaDlg_Impl m_pUnaryOpCodesEnd const sheet::FormulaOpCodeMapEntry *
-formula/source/ui/dlg/formula.cxx:150
- formula::FormulaDlg_Impl m_pBinaryOpCodesEnd const sheet::FormulaOpCodeMapEntry *
-formula/source/ui/dlg/parawin.hxx:85
- formula::ParaWin bRefMode _Bool
framework/inc/dispatch/oxt_handler.hxx:92
framework::Oxt_Handler m_xSelfHold css::uno::Reference<css::uno::XInterface>
framework/inc/services/layoutmanager.hxx:262
@@ -1126,8 +1116,6 @@ include/filter/msfilter/svdfppt.hxx:1183
ImplPPTTextObj mnShapeId sal_uInt32
include/filter/msfilter/svdfppt.hxx:1184
ImplPPTTextObj mnShapeMaster sal_uInt32
-include/formula/formdata.hxx:62
- formula::FormEditData pParent class formula::FormEditData *
include/LibreOfficeKit/LibreOfficeKit.h:98
_LibreOfficeKitDocumentClass nSize size_t
include/LibreOfficeKit/LibreOfficeKitGtk.h:33
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();
diff --git a/include/formula/formdata.hxx b/include/formula/formdata.hxx
index 8bd274c8827b..39b7aecdb8dc 100644
--- a/include/formula/formdata.hxx
+++ b/include/formula/formdata.hxx
@@ -59,7 +59,6 @@ protected:
FormEditData( const FormEditData& );
FormEditData& operator=( const FormEditData& r );
- FormEditData* pParent; // for nesting
private:
sal_uInt16 nMode; // enum ScFormulaDlgMode
sal_Int32 nFStart;
diff --git a/sc/source/ui/formdlg/formdata.cxx b/sc/source/ui/formdlg/formdata.cxx
index cea864d1330a..39a1646db199 100644
--- a/sc/source/ui/formdlg/formdata.cxx
+++ b/sc/source/ui/formdlg/formdata.cxx
@@ -38,10 +38,7 @@ ScFormEditData::ScFormEditData( const ScFormEditData& r ) : formula::FormEditDa
void ScFormEditData::SaveValues()
{
- ScFormEditData* pTemp = new ScFormEditData(*this);
-
Reset();
- pParent = pTemp;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
More information about the Libreoffice-commits
mailing list