diff options
-rw-r--r-- | sc/inc/funcdesc.hxx | 1 | ||||
-rw-r--r-- | sc/source/core/data/funcdesc.cxx | 29 | ||||
-rw-r--r-- | sc/source/filter/excel/xepivotxml.cxx | 24 | ||||
-rw-r--r-- | sc/source/filter/inc/xepivotxml.hxx | 3 | ||||
-rw-r--r-- | sc/source/ui/drawfunc/fupoor.cxx | 11 | ||||
-rw-r--r-- | sc/source/ui/inc/anyrefdg.hxx | 4 | ||||
-rw-r--r-- | sc/source/ui/inc/fupoor.hxx | 1 | ||||
-rw-r--r-- | sc/source/ui/inc/inscodlg.hxx | 1 | ||||
-rw-r--r-- | sc/source/ui/miscdlgs/anyrefdg.cxx | 13 | ||||
-rw-r--r-- | sc/source/ui/miscdlgs/inscodlg.cxx | 6 |
10 files changed, 17 insertions, 76 deletions
diff --git a/sc/inc/funcdesc.hxx b/sc/inc/funcdesc.hxx index c03917d76d0d..b98321a80303 100644 --- a/sc/inc/funcdesc.hxx +++ b/sc/inc/funcdesc.hxx @@ -218,7 +218,6 @@ public: sal_uInt16 nVarArgsStart; /**< Start of variable arguments, for numbering */ OString sHelpId; /**< HelpId of function */ bool bIncomplete :1; /**< Incomplete argument info (set for add-in info from configuration) */ - bool bHasSuppressedArgs :1; /**< Whether there is any suppressed parameter. */ bool mbHidden :1; /**< Whether function is hidden */ }; diff --git a/sc/source/core/data/funcdesc.cxx b/sc/source/core/data/funcdesc.cxx index 6edd7fe23576..2ca4d572bdf0 100644 --- a/sc/source/core/data/funcdesc.cxx +++ b/sc/source/core/data/funcdesc.cxx @@ -101,7 +101,6 @@ ScFuncDesc::ScFuncDesc() : nArgCount (0), nVarArgsStart (0), bIncomplete (false), - bHasSuppressedArgs(false), mbHidden (false) {} @@ -134,7 +133,6 @@ void ScFuncDesc::Clear() nCategory = 0; sHelpId.clear(); bIncomplete = false; - bHasSuppressedArgs = false; mbHidden = false; } @@ -272,20 +270,7 @@ OUString ScFuncDesc::getFormula( const ::std::vector< OUString >& _aArguments ) sal_uInt16 ScFuncDesc::GetSuppressedArgCount() const { - if (!bHasSuppressedArgs || !pDefArgFlags) - return nArgCount; - - sal_uInt16 nArgs = nArgCount; - if (nArgs >= PAIRED_VAR_ARGS) - nArgs -= PAIRED_VAR_ARGS - 2; - else if (nArgs >= VAR_ARGS) - nArgs -= VAR_ARGS - 1; - sal_uInt16 nCount = nArgs; - if (nArgCount >= PAIRED_VAR_ARGS) - nCount += PAIRED_VAR_ARGS - 2; - else if (nArgCount >= VAR_ARGS) - nCount += VAR_ARGS - 1; - return nCount; + return nArgCount; } OUString ScFuncDesc::getFunctionName() const @@ -316,15 +301,11 @@ sal_Int32 ScFuncDesc::getSuppressedArgumentCount() const void ScFuncDesc::fillVisibleArgumentMapping(::std::vector<sal_uInt16>& _rArguments) const { - if (!bHasSuppressedArgs || !pDefArgFlags) - { - _rArguments.resize( nArgCount); - sal_uInt16 value = 0; - for (auto & argument : _rArguments) - argument = value++; - } + _rArguments.resize( nArgCount); + sal_uInt16 value = 0; + for (auto & argument : _rArguments) + argument = value++; - _rArguments.reserve( nArgCount); sal_uInt16 nArgs = nArgCount; if (nArgs >= PAIRED_VAR_ARGS) nArgs -= PAIRED_VAR_ARGS - 2; diff --git a/sc/source/filter/excel/xepivotxml.cxx b/sc/source/filter/excel/xepivotxml.cxx index 753746bb8f74..9a3953ae0ab3 100644 --- a/sc/source/filter/excel/xepivotxml.cxx +++ b/sc/source/filter/excel/xepivotxml.cxx @@ -228,21 +228,18 @@ void XclExpXmlPivotCaches::SavePivotCacheXml( XclExpXmlStream& rStrm, const Entr XML_createdVersion, "3", // MS Excel 2007, tdf#112936: setting version number makes MSO to handle the pivot table differently FSEND); - if (rEntry.meType == Worksheet) - { - pDefStrm->startElement(XML_cacheSource, - XML_type, "worksheet", - FSEND); + pDefStrm->startElement(XML_cacheSource, + XML_type, "worksheet", + FSEND); - OUString aSheetName; - GetDoc().GetName(rEntry.maSrcRange.aStart.Tab(), aSheetName); - pDefStrm->singleElement(XML_worksheetSource, - XML_ref, XclXmlUtils::ToOString(rEntry.maSrcRange).getStr(), - XML_sheet, XclXmlUtils::ToOString(aSheetName).getStr(), - FSEND); + OUString aSheetName; + GetDoc().GetName(rEntry.maSrcRange.aStart.Tab(), aSheetName); + pDefStrm->singleElement(XML_worksheetSource, + XML_ref, XclXmlUtils::ToOString(rEntry.maSrcRange).getStr(), + XML_sheet, XclXmlUtils::ToOString(aSheetName).getStr(), + FSEND); - pDefStrm->endElement(XML_cacheSource); - } + pDefStrm->endElement(XML_cacheSource); size_t nCount = rCache.GetFieldCount(); pDefStrm->startElement(XML_cacheFields, @@ -449,7 +446,6 @@ void XclExpXmlPivotTableManager::Initialize() maCacheIdMap.emplace(*it, aCaches.size()+1); XclExpXmlPivotCaches::Entry aEntry; - aEntry.meType = XclExpXmlPivotCaches::Worksheet; aEntry.mpCache = pCache; aEntry.maSrcRange = rRange; aCaches.push_back(aEntry); // Cache ID equals position + 1. diff --git a/sc/source/filter/inc/xepivotxml.hxx b/sc/source/filter/inc/xepivotxml.hxx index c1eede23e886..e068a7773866 100644 --- a/sc/source/filter/inc/xepivotxml.hxx +++ b/sc/source/filter/inc/xepivotxml.hxx @@ -23,12 +23,9 @@ class ScDPObject; class XclExpXmlPivotCaches : public XclExpRecordBase, protected XclExpRoot { public: - enum EntryType { Worksheet, Name, Database }; - struct Entry { const ScDPCache* mpCache; - EntryType meType; ScRange maSrcRange; }; diff --git a/sc/source/ui/drawfunc/fupoor.cxx b/sc/source/ui/drawfunc/fupoor.cxx index 37c4d5f48678..75b450240f1c 100644 --- a/sc/source/ui/drawfunc/fupoor.cxx +++ b/sc/source/ui/drawfunc/fupoor.cxx @@ -37,7 +37,6 @@ FuPoor::FuPoor(ScTabViewShell& rViewSh, vcl::Window* pWin, ScDrawView* pViewP, pWindow(pWin), pDrDoc(pDoc), aSfxRequest(rReq), - pDialog(nullptr), bIsInDragMode(false), // remember MouseButton state mnCode(0) @@ -53,26 +52,16 @@ FuPoor::~FuPoor() { aDragTimer.Stop(); aScrollTimer.Stop(); - pDialog.disposeAndClear(); } void FuPoor::Activate() { - if (pDialog) - { - pDialog->Show(); - } } void FuPoor::Deactivate() { aDragTimer.Stop(); aScrollTimer.Stop(); - - if (pDialog) - { - pDialog->Hide(); - } } // Scroll when reached the window border; is called from MouseMove diff --git a/sc/source/ui/inc/anyrefdg.hxx b/sc/source/ui/inc/anyrefdg.hxx index c63867ac1d86..33fd056cc4ae 100644 --- a/sc/source/ui/inc/anyrefdg.hxx +++ b/sc/source/ui/inc/anyrefdg.hxx @@ -108,12 +108,8 @@ private: m_aHelper; SfxBindings* const m_pMyBindings; - VclPtr<vcl::Window> m_pActiveWin; - Idle m_aIdle; OUString m_aDocName; // document on which the dialog was opened - DECL_LINK( UpdateFocusHdl, Timer*, void ); - protected: void disposeRefHandler(); bool DoClose( sal_uInt16 nId ); diff --git a/sc/source/ui/inc/fupoor.hxx b/sc/source/ui/inc/fupoor.hxx index 4fb21013596b..4d758497b506 100644 --- a/sc/source/ui/inc/fupoor.hxx +++ b/sc/source/ui/inc/fupoor.hxx @@ -47,7 +47,6 @@ protected: SdrModel* pDrDoc; SfxRequest const aSfxRequest; - VclPtr<Dialog> pDialog; Timer aScrollTimer; // for Autoscrolling DECL_LINK( ScrollHdl, Timer *, void ); diff --git a/sc/source/ui/inc/inscodlg.hxx b/sc/source/ui/inc/inscodlg.hxx index 23d21812f459..6b056d55a779 100644 --- a/sc/source/ui/inc/inscodlg.hxx +++ b/sc/source/ui/inc/inscodlg.hxx @@ -54,7 +54,6 @@ private: InsertDeleteFlags nShortCutInsContentsCmdBits; bool bShortCutTranspose; - InsCellCmd nShortCutMoveMode; std::unique_ptr<weld::CheckButton> mxBtnInsAll; diff --git a/sc/source/ui/miscdlgs/anyrefdg.cxx b/sc/source/ui/miscdlgs/anyrefdg.cxx index 56efb1cac9d7..54a0be8869b8 100644 --- a/sc/source/ui/miscdlgs/anyrefdg.cxx +++ b/sc/source/ui/miscdlgs/anyrefdg.cxx @@ -754,11 +754,9 @@ ScRefHandler::ScRefHandler( vcl::Window &rWindow, SfxBindings* pB, bool bBindRef m_rWindow( &rWindow ), m_bInRefMode( false ), m_aHelper(this,pB), - m_pMyBindings( pB ), - m_pActiveWin(nullptr) + m_pMyBindings( pB ) { m_aHelper.SetWindow(m_rWindow.get()); - m_aIdle.SetInvokeHandler(LINK( this, ScRefHandler, UpdateFocusHdl)); if( bBindRef ) EnterRefMode(); } @@ -821,7 +819,6 @@ ScRefHandler::~ScRefHandler() void ScRefHandler::disposeRefHandler() { m_rWindow.clear(); - m_pActiveWin.clear(); LeaveRefMode(); m_aHelper.dispose(); } @@ -932,14 +929,6 @@ void ScRefHandler::ToggleCollapsed( formula::RefEdit* pEdit, formula::RefButton* m_aHelper.ToggleCollapsed( pEdit, pButton ); } -IMPL_LINK_NOARG(ScRefHandler, UpdateFocusHdl, Timer *, void) -{ - if (m_pActiveWin) - { - m_pActiveWin->GrabFocus(); - } -} - bool ScRefHandler::ParseWithNames( ScRangeList& rRanges, const OUString& rStr, const ScDocument* pDoc ) { return m_aHelper.ParseWithNames( rRanges, rStr, pDoc ); diff --git a/sc/source/ui/miscdlgs/inscodlg.cxx b/sc/source/ui/miscdlgs/inscodlg.cxx index 400b4bccc9a6..5f3343c7e716 100644 --- a/sc/source/ui/miscdlgs/inscodlg.cxx +++ b/sc/source/ui/miscdlgs/inscodlg.cxx @@ -38,7 +38,6 @@ ScInsertContentsDlg::ScInsertContentsDlg(weld::Window* pParent, , bUsedShortCut(false) , nShortCutInsContentsCmdBits(InsertDeleteFlags::NONE ) , bShortCutTranspose(false) - , nShortCutMoveMode(INS_NONE) , mxBtnInsAll(m_xBuilder->weld_check_button("paste_all")) , mxBtnInsStrings(m_xBuilder->weld_check_button("text")) , mxBtnInsNumbers(m_xBuilder->weld_check_button("numbers")) @@ -136,7 +135,7 @@ InsertDeleteFlags ScInsertContentsDlg::GetInsContentsCmdBits() const InsCellCmd ScInsertContentsDlg::GetMoveMode() { if (bUsedShortCut) - return nShortCutMoveMode; + return INS_NONE; if ( mxRbMoveDown->get_active() ) return INS_CELLSDOWN; if ( mxRbMoveRight->get_active() ) @@ -291,7 +290,6 @@ IMPL_LINK(ScInsertContentsDlg, ShortCutHdl, weld::Button&, rBtn, void) bUsedShortCut = true; nShortCutInsContentsCmdBits = InsertDeleteFlags::STRING | InsertDeleteFlags::VALUE | InsertDeleteFlags::DATETIME; bShortCutTranspose = false; - nShortCutMoveMode = INS_NONE; m_xDialog->response(RET_OK); } else if (&rBtn == mxBtnShortCutPasteValuesFormats.get()) @@ -299,7 +297,6 @@ IMPL_LINK(ScInsertContentsDlg, ShortCutHdl, weld::Button&, rBtn, void) bUsedShortCut = true; nShortCutInsContentsCmdBits = InsertDeleteFlags::STRING | InsertDeleteFlags::VALUE | InsertDeleteFlags::DATETIME | InsertDeleteFlags::ATTRIB; bShortCutTranspose = false; - nShortCutMoveMode = INS_NONE; m_xDialog->response(RET_OK); } else if (&rBtn == mxBtnShortCutPasteTranspose.get()) @@ -307,7 +304,6 @@ IMPL_LINK(ScInsertContentsDlg, ShortCutHdl, weld::Button&, rBtn, void) bUsedShortCut = true; nShortCutInsContentsCmdBits = InsertDeleteFlags::ALL; bShortCutTranspose = true; - nShortCutMoveMode = INS_NONE; m_xDialog->response(RET_OK); } } |