diff options
-rw-r--r-- | compilerplugins/clang/unusedenumconstants.untouched.results | 2 | ||||
-rw-r--r-- | compilerplugins/clang/unusedenumconstants.writeonly.results | 2 | ||||
-rw-r--r-- | formula/source/ui/dlg/formula.cxx | 14 | ||||
-rw-r--r-- | include/formula/formdata.hxx | 8 | ||||
-rw-r--r-- | include/formula/formula.hxx | 2 | ||||
-rw-r--r-- | sc/source/ui/formdlg/formula.cxx | 4 |
6 files changed, 16 insertions, 16 deletions
diff --git a/compilerplugins/clang/unusedenumconstants.untouched.results b/compilerplugins/clang/unusedenumconstants.untouched.results index 76fb5a7d19e2..5504738812fe 100644 --- a/compilerplugins/clang/unusedenumconstants.untouched.results +++ b/compilerplugins/clang/unusedenumconstants.untouched.results @@ -150,8 +150,6 @@ include/editeng/borderline.hxx:128 enum SvxBorderLineStyle BORDER_LINE_STYLE_MAX include/editeng/editdata.hxx:41 enum EESpellState LanguageNotInstalled -include/formula/formula.hxx:52 - enum formula::FormulaDlgMode FORMULA_FORMDLG_ARGS include/i18nutil/transliteration.hxx:45 enum TransliterationFlags NumToTextLower_zh_CN include/i18nutil/transliteration.hxx:47 diff --git a/compilerplugins/clang/unusedenumconstants.writeonly.results b/compilerplugins/clang/unusedenumconstants.writeonly.results index 77ba253369ff..a117857554ae 100644 --- a/compilerplugins/clang/unusedenumconstants.writeonly.results +++ b/compilerplugins/clang/unusedenumconstants.writeonly.results @@ -1535,7 +1535,7 @@ include/editeng/svxrtf.hxx:223 include/filter/msfilter/msdffimp.hxx:377 enum DffSeekToContentMode SEEK_FROM_CURRENT include/formula/formula.hxx:52 - enum formula::FormulaDlgMode FORMULA_FORMDLG_EDIT + enum formula::FormulaDlgMode FormulaDlgMode::Edit include/formula/tokenarray.hxx:60 enum ScRecalcMode ONLOAD_MUST include/formula/tokenarray.hxx:62 diff --git a/formula/source/ui/dlg/formula.cxx b/formula/source/ui/dlg/formula.cxx index 55135ebc11cf..b5469edc0081 100644 --- a/formula/source/ui/dlg/formula.cxx +++ b/formula/source/ui/dlg/formula.cxx @@ -368,9 +368,9 @@ void FormulaDlg_Impl::StoreFormEditData(FormEditData* pData) pData->SetSelection(m_pMEdit->GetSelection()); if (m_pTabCtrl->GetCurPageId() == TP_FUNCTION) - pData->SetMode( sal_uInt16(FORMULA_FORMDLG_FORMULA) ); + pData->SetMode( FormulaDlgMode::Formula ); else - pData->SetMode( sal_uInt16(FORMULA_FORMDLG_EDIT) ); + pData->SetMode( FormulaDlgMode::Edit ); pData->SetUndoStr(m_pMEdit->GetText()); pData->SetMatrixFlag(m_pBtnMatrix->IsChecked()); } @@ -1309,7 +1309,7 @@ IMPL_LINK( FormulaDlg_Impl, FxHdl, ParaWin&, rPtr, void ) sal_Int32 n1 = m_aFormulaHelper.GetArgStart( aFormula, nFormulaStrPos, nEdFocus + pData->GetOffset() ); pData->SaveValues(); - pData->SetMode( sal_uInt16(FORMULA_FORMDLG_FORMULA) ); + pData->SetMode( FormulaDlgMode::Formula ); pData->SetFStart( n1 ); pData->SetUndoStr( aUndoStr ); ClearAllParas(); @@ -1582,7 +1582,7 @@ void FormulaDlg_Impl::Update() UpdateTokenArray(sExpression); FormulaCursorHdl(*m_pMEFormula); CalcStruct(sExpression); - if (pData->GetMode() == FORMULA_FORMDLG_FORMULA) + if (pData->GetMode() == FormulaDlgMode::Formula) m_pTabCtrl->SetCurPageId(TP_FUNCTION); else m_pTabCtrl->SetCurPageId(TP_STRUCT); @@ -1606,7 +1606,7 @@ void FormulaDlg_Impl::SetMeText(const OUString& _sText) FormulaDlgMode FormulaDlg_Impl::SetMeText( const OUString& _sText, sal_Int32 PrivStart, sal_Int32 PrivEnd, bool bMatrix, bool _bSelect, bool _bUpdate) { - FormulaDlgMode eMode = FORMULA_FORMDLG_FORMULA; + FormulaDlgMode eMode = FormulaDlgMode::Formula; if (!m_bEditFlag) m_pMEdit->SetText(_sText); @@ -1617,7 +1617,7 @@ FormulaDlgMode FormulaDlg_Impl::SetMeText( const OUString& _sText, sal_Int32 Pri m_pMEFormula->UpdateOldSel(); m_pMEdit->Invalidate(); m_pHelper->showReference(m_pMEdit->GetSelected()); - eMode = FORMULA_FORMDLG_EDIT; + eMode = FormulaDlgMode::Edit; m_pBtnMatrix->Check( bMatrix ); } // if ( _bUpdate ) @@ -1951,7 +1951,7 @@ void FormEditData::SaveValues() void FormEditData::Reset() { - nMode = 0; + nMode = FormulaDlgMode::Formula; nFStart = 0; nOffset = 0; bMatrix = false; diff --git a/include/formula/formdata.hxx b/include/formula/formdata.hxx index 1188ab884461..6a1889b3c1ba 100644 --- a/include/formula/formdata.hxx +++ b/include/formula/formdata.hxx @@ -29,6 +29,8 @@ namespace formula { +enum class FormulaDlgMode; + class FORMULA_DLLPUBLIC FormEditData { public: @@ -37,7 +39,7 @@ public: virtual void SaveValues(); - sal_uInt16 GetMode() const { return nMode; } + FormulaDlgMode GetMode() const { return nMode; } sal_Int32 GetFStart() const { return nFStart; } sal_uInt16 GetOffset() const { return nOffset; } const OUString& GetUndoStr() const { return aUndoStr; } @@ -45,7 +47,7 @@ public: const VclPtr<vcl::Window>& GetFocusWindow()const { return xFocusWin; } const Selection& GetSelection()const { return aSelection;} - void SetMode( sal_uInt16 nNew ) { nMode = nNew; } + void SetMode( FormulaDlgMode nNew ) { nMode = nNew; } void SetFStart( sal_Int32 nNew ) { nFStart = nNew; } void SetOffset( sal_uInt16 nNew ) { nOffset = nNew; } void SetUndoStr( const OUString& rNew ) { aUndoStr = rNew; } @@ -58,7 +60,7 @@ protected: FormEditData& operator=( const FormEditData& r ); private: - sal_uInt16 nMode; // enum ScFormulaDlgMode + FormulaDlgMode nMode; sal_Int32 nFStart; sal_uInt16 nOffset; OUString aUndoStr; diff --git a/include/formula/formula.hxx b/include/formula/formula.hxx index 4c9d37e807b0..201a598891e4 100644 --- a/include/formula/formula.hxx +++ b/include/formula/formula.hxx @@ -49,7 +49,7 @@ namespace formula #define STRUCT_FOLDER 2 #define STRUCT_ERROR 3 -enum FormulaDlgMode { FORMULA_FORMDLG_FORMULA, FORMULA_FORMDLG_ARGS, FORMULA_FORMDLG_EDIT }; +enum class FormulaDlgMode { Formula, Edit }; class FormulaDlg_Impl; diff --git a/sc/source/ui/formdlg/formula.cxx b/sc/source/ui/formdlg/formula.cxx index df788d2101d1..23f4479722ee 100644 --- a/sc/source/ui/formdlg/formula.cxx +++ b/sc/source/ui/formdlg/formula.cxx @@ -130,7 +130,7 @@ ScFormulaDlg::ScFormulaDlg( SfxBindings* pB, SfxChildWindow* pCW, OSL_ENSURE(pData,"FormEditData not available"); - formula::FormulaDlgMode eMode = FORMULA_FORMDLG_FORMULA; // default... + formula::FormulaDlgMode eMode = FormulaDlgMode::Formula; // default... // edit if formula exists @@ -173,7 +173,7 @@ ScFormulaDlg::ScFormulaDlg( SfxBindings* pB, SfxChildWindow* pCW, pData->SetFStart( 1 ); // after "=" } - pData->SetMode( static_cast<sal_uInt16>(eMode) ); + pData->SetMode( eMode ); OUString rStrExp = GetMeText(); Update(rStrExp); |