summaryrefslogtreecommitdiff
path: root/sc/source
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source')
-rw-r--r--sc/source/ui/app/scmod.cxx87
-rw-r--r--sc/source/ui/condformat/condformatmgr.cxx7
-rw-r--r--sc/source/ui/inc/anyrefdg.hxx7
-rw-r--r--sc/source/ui/inc/condformatmgr.hxx1
-rw-r--r--sc/source/ui/miscdlgs/anyrefdg.cxx6
5 files changed, 3 insertions, 105 deletions
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: */