diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-05-18 11:15:10 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-05-18 15:50:02 +0100 |
commit | 0c0228c4887ac3534cfb6679886f459850a65777 (patch) | |
tree | 6d60069fdbd55c36d67d30f4df95dbdd65732e7e /sc | |
parent | 07355d267013ad2ea31479d4d745fbc8f88e232e (diff) |
callcatcher: update unused code
Change-Id: I43dd399368953c629916dad8104a296f837a6344
Diffstat (limited to 'sc')
-rw-r--r-- | sc/inc/scmod.hxx | 6 | ||||
-rw-r--r-- | sc/source/ui/app/scmod.cxx | 87 | ||||
-rw-r--r-- | sc/source/ui/condformat/condformatmgr.cxx | 7 | ||||
-rw-r--r-- | sc/source/ui/inc/anyrefdg.hxx | 7 | ||||
-rw-r--r-- | sc/source/ui/inc/condformatmgr.hxx | 1 | ||||
-rw-r--r-- | sc/source/ui/miscdlgs/anyrefdg.cxx | 6 |
6 files changed, 3 insertions, 111 deletions
diff --git a/sc/inc/scmod.hxx b/sc/inc/scmod.hxx index d51d100a4e8b..936fb436abb8 100644 --- a/sc/inc/scmod.hxx +++ b/sc/inc/scmod.hxx @@ -73,7 +73,6 @@ class ScFormEditData; class ScMarkData; struct ScDragData; struct ScClipData; -class ScAnyRefModalDlg; // for internal Drag&Drop: @@ -113,7 +112,6 @@ class ScModule: public SfxModule, public SfxListener, utl::ConfigurationListener bool mbIsInSharedDocSaving:1; std::map<sal_uInt16, std::list<VclPtr<vcl::Window> > > m_mapRefWindow; - std::stack<VclPtr<ScAnyRefModalDlg> > maAnyRefDlgStack; public: SFX_DECL_INTERFACE(SCID_APP) @@ -257,10 +255,6 @@ SC_DLLPUBLIC void SetAppOptions ( const ScAppOptions& rO SC_DLLPUBLIC bool RegisterRefWindow( sal_uInt16 nSlotId, vcl::Window *pWnd ); SC_DLLPUBLIC bool UnregisterRefWindow( sal_uInt16 nSlotId, vcl::Window *pWnd ); SC_DLLPUBLIC vcl::Window * Find1RefWindow( sal_uInt16 nSlotId, vcl::Window *pWndAncestor ); - - ScAnyRefModalDlg* GetCurrentAnyRefDlg(); - void PushNewAnyRefDlg( ScAnyRefModalDlg* pDlg ); - void PopAnyRefDlg(); }; #define SC_MOD() ( *reinterpret_cast<ScModule**>(GetAppData(SHL_CALC)) ) diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx index 48a3ad1c3574..f2b7b1bbffbb 100644 --- a/sc/source/ui/app/scmod.cxx +++ b/sc/source/ui/app/scmod.cxx @@ -1604,7 +1604,6 @@ bool ScModule::IsModalMode(SfxObjectShell* pDocSh) if ( nCurRefDlgId ) { SfxChildWindow* pChildWnd = lcl_GetChildWinFromAnyView( nCurRefDlgId ); - ScAnyRefModalDlg* pModalDlg = GetCurrentAnyRefDlg(); if ( pChildWnd ) { IAnyRefDialog* pRefDlg = dynamic_cast<IAnyRefDialog*>(pChildWnd->GetWindow()); @@ -1612,10 +1611,6 @@ bool ScModule::IsModalMode(SfxObjectShell* pDocSh) bIsModal = pChildWnd->IsVisible() && pRefDlg && !( pRefDlg->IsRefInputMode() && pRefDlg->IsDocAllowed(pDocSh) ); } - else if(pModalDlg) - { - bIsModal = pModalDlg->IsVisible() && !(pModalDlg->IsRefInputMode() && pModalDlg->IsDocAllowed(pDocSh) ); - } else { // in 592 and above, the dialog isn't visible in other views @@ -1646,7 +1641,6 @@ bool ScModule::IsTableLocked() if ( nCurRefDlgId ) { SfxChildWindow* pChildWnd = lcl_GetChildWinFromAnyView( nCurRefDlgId ); - ScAnyRefModalDlg* pModalDlg = GetCurrentAnyRefDlg(); if ( pChildWnd ) { IAnyRefDialog* pRefDlg(dynamic_cast<IAnyRefDialog*>(pChildWnd->GetWindow())); @@ -1656,8 +1650,6 @@ bool ScModule::IsTableLocked() bLocked = pRefDlg->IsTableLocked(); } } - else if( pModalDlg ) - bLocked = pModalDlg->IsTableLocked(); else bLocked = true; // for other views, see IsModalMode } @@ -1674,11 +1666,8 @@ bool ScModule::IsRefDialogOpen() if ( nCurRefDlgId ) { SfxChildWindow* pChildWnd = lcl_GetChildWinFromAnyView( nCurRefDlgId ); - ScAnyRefModalDlg* pModalDlg = GetCurrentAnyRefDlg(); if ( pChildWnd ) bIsOpen = pChildWnd->IsVisible(); - else if(pModalDlg) - bIsOpen = pModalDlg->IsVisible(); else bIsOpen = true; // for other views, see IsModalMode } @@ -1695,17 +1684,12 @@ bool ScModule::IsFormulaMode() if ( nCurRefDlgId ) { SfxChildWindow* pChildWnd = lcl_GetChildWinFromAnyView( nCurRefDlgId ); - ScAnyRefModalDlg* pModalDlg = GetCurrentAnyRefDlg(); if ( pChildWnd ) { IAnyRefDialog* pRefDlg = dynamic_cast<IAnyRefDialog*>(pChildWnd->GetWindow()); assert(pRefDlg); bIsFormula = pChildWnd->IsVisible() && pRefDlg && pRefDlg->IsRefInputMode(); } - else if(pModalDlg) - { - bIsFormula = pModalDlg->IsVisible() && pModalDlg->IsRefInputMode(); - } else bIsFormula = true; } @@ -1744,8 +1728,7 @@ void ScModule::SetReference( const ScRange& rRef, ScDocument* pDoc, if( nCurRefDlgId ) { SfxChildWindow* pChildWnd = lcl_GetChildWinFromAnyView( nCurRefDlgId ); - ScAnyRefModalDlg* pModalDlg = GetCurrentAnyRefDlg(); - OSL_ENSURE( pChildWnd || pModalDlg, "NoChildWin" ); + OSL_ENSURE( pChildWnd, "NoChildWin" ); if ( pChildWnd ) { if ( nCurRefDlgId == SID_OPENDLG_CONSOLIDATE && pMarkData ) @@ -1767,13 +1750,6 @@ void ScModule::SetReference( const ScRange& rRef, ScDocument* pDoc, pRefDlg->SetReference( aNew, pDoc ); } } - else if(pModalDlg) - { - // hide the (color) selection now instead of later from LoseFocus, - // don't abort the ref input that causes this call (bDoneRefMode = sal_False) - pModalDlg->HideReference( false ); - pModalDlg->SetReference( aNew, pDoc ); - } } else { @@ -1797,8 +1773,7 @@ void ScModule::AddRefEntry() if ( nCurRefDlgId ) { SfxChildWindow* pChildWnd = lcl_GetChildWinFromAnyView( nCurRefDlgId ); - ScAnyRefModalDlg* pModalDlg = GetCurrentAnyRefDlg(); - OSL_ENSURE( pChildWnd || pModalDlg, "NoChildWin" ); + OSL_ENSURE( pChildWnd, "NoChildWin" ); if ( pChildWnd ) { IAnyRefDialog* pRefDlg = dynamic_cast<IAnyRefDialog*>(pChildWnd->GetWindow()); @@ -1808,8 +1783,6 @@ void ScModule::AddRefEntry() pRefDlg->AddRefEntry(); } } - else if(pModalDlg) - pModalDlg->AddRefEntry(); } else { @@ -1830,8 +1803,7 @@ void ScModule::EndReference() if ( nCurRefDlgId ) { SfxChildWindow* pChildWnd = lcl_GetChildWinFromAnyView( nCurRefDlgId ); - ScAnyRefModalDlg* pModalDlg = GetCurrentAnyRefDlg(); - OSL_ENSURE( pChildWnd || pModalDlg, "NoChildWin" ); + OSL_ENSURE( pChildWnd, "NoChildWin" ); if ( pChildWnd ) { IAnyRefDialog* pRefDlg = dynamic_cast<IAnyRefDialog*>(pChildWnd->GetWindow()); @@ -1841,8 +1813,6 @@ void ScModule::EndReference() pRefDlg->SetActive(); } } - else if (pModalDlg) - pModalDlg->SetActive(); } } @@ -2270,57 +2240,6 @@ vcl::Window * ScModule::Find1RefWindow( sal_uInt16 nSlotId, vcl::Window *pWndAn return NULL; } -ScAnyRefModalDlg* ScModule::GetCurrentAnyRefDlg() -{ - if(!maAnyRefDlgStack.empty()) - return maAnyRefDlgStack.top(); - - return NULL; -} - -void ScModule::PushNewAnyRefDlg( ScAnyRefModalDlg* pNewDlg ) -{ - maAnyRefDlgStack.push( pNewDlg ); - - // prevent mismatch between calls to - // SetInRefMode(true) and SetInRefMode(false) - if(maAnyRefDlgStack.size() != 1) - return; - - SfxViewShell* pViewShell = SfxViewShell::GetFirst(); - while(pViewShell) - { - if ( pViewShell->ISA(ScTabViewShell) ) - { - ScTabViewShell* pViewSh = static_cast<ScTabViewShell*>(pViewShell); - pViewSh->SetInRefMode( true ); - } - pViewShell = SfxViewShell::GetNext( *pViewShell ); - } -} - -void ScModule::PopAnyRefDlg() -{ - maAnyRefDlgStack.pop(); - - if(maAnyRefDlgStack.empty()) - { - // no modal ref dlg any more - // disable the flag in ScGridWindow - SfxViewShell* pViewShell = SfxViewShell::GetFirst(); - while(pViewShell) - { - if ( pViewShell->ISA(ScTabViewShell) ) - { - ScTabViewShell* pViewSh = static_cast<ScTabViewShell*>(pViewShell); - pViewSh->SetInRefMode( false ); - } - pViewShell = SfxViewShell::GetNext( *pViewShell ); - } - - } -} - using namespace com::sun::star; #define LINGUPROP_AUTOSPELL "IsSpellAuto" diff --git a/sc/source/ui/condformat/condformatmgr.cxx b/sc/source/ui/condformat/condformatmgr.cxx index b7f3dce512a2..05ad63aa6ec9 100644 --- a/sc/source/ui/condformat/condformatmgr.cxx +++ b/sc/source/ui/condformat/condformatmgr.cxx @@ -92,13 +92,6 @@ ScConditionalFormat* ScCondFormatManagerWindow::GetSelection() return mpFormatList->GetFormat(nIndex); } -void ScCondFormatManagerWindow::Update() -{ - Clear(); - maMapLBoxEntryToCondIndex.clear(); - Init(); -} - void ScCondFormatManagerWindow::setColSizes() { HeaderBar &rBar = GetTheHeaderBar(); diff --git a/sc/source/ui/inc/anyrefdg.hxx b/sc/source/ui/inc/anyrefdg.hxx index eef11c9b442c..5bcc688a96d4 100644 --- a/sc/source/ui/inc/anyrefdg.hxx +++ b/sc/source/ui/inc/anyrefdg.hxx @@ -261,13 +261,6 @@ void ScRefHdlrImplBase<TWindow, bBindRef>::StateChanged( StateChangedType nState ScRefHandler::stateChanged( nStateChange, bBindRef ); } -class ScAnyRefModalDlg : public ScRefHdlModalImpl -{ -public: - ScAnyRefModalDlg(vcl::Window* pParent, const OUString& rID, - const OUString& rUIXMLDescription); -}; - template<class TDerived, class TBase, bool bBindRef = true> struct ScRefHdlrImpl: ScRefHdlrImplBase< TBase, bBindRef > { diff --git a/sc/source/ui/inc/condformatmgr.hxx b/sc/source/ui/inc/condformatmgr.hxx index 76e26fd34202..d713383a6ece 100644 --- a/sc/source/ui/inc/condformatmgr.hxx +++ b/sc/source/ui/inc/condformatmgr.hxx @@ -41,7 +41,6 @@ public: void DeleteSelection(); ScConditionalFormat* GetSelection(); - void Update(); virtual void Resize() SAL_OVERRIDE; }; diff --git a/sc/source/ui/miscdlgs/anyrefdg.cxx b/sc/source/ui/miscdlgs/anyrefdg.cxx index 116e0e3498c2..99d4f585fd45 100644 --- a/sc/source/ui/miscdlgs/anyrefdg.cxx +++ b/sc/source/ui/miscdlgs/anyrefdg.cxx @@ -1016,10 +1016,4 @@ void ScRefHdlModalImpl::StateChanged( StateChangedType nStateChange ) ScRefHandler::stateChanged( nStateChange, true ); } -ScAnyRefModalDlg::ScAnyRefModalDlg(vcl::Window* pParent, const OUString& rID, - const OUString& rUIXMLDescription) - : ScRefHdlModalImpl(pParent, rID, rUIXMLDescription) -{ -} - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |