diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2012-12-03 00:43:04 +0100 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2012-12-03 03:56:11 +0100 |
commit | 204e3eb3813524bf21aae58a76f54f29b969e9ed (patch) | |
tree | bab75cc120a7237e71f5d6cb4ea9c3de09f506a7 /sc/source/ui/app | |
parent | 06842a8583d3d77de74964cdce4fba811818bf90 (diff) |
ugly hack to avoid virtual method in Window
Change-Id: I7ffc13167f5ecbfe3afab6451e1ef52e81130d48
Diffstat (limited to 'sc/source/ui/app')
-rw-r--r-- | sc/source/ui/app/scmod.cxx | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx index d8d350c5af2e..5c97ed39fe25 100644 --- a/sc/source/ui/app/scmod.cxx +++ b/sc/source/ui/app/scmod.cxx @@ -2325,11 +2325,40 @@ ScAnyRefModalDlg* ScModule::GetCurrentAnyRefDlg() void ScModule::PushNewAnyRefDlg( ScAnyRefModalDlg* pNewDlg ) { maAnyRefDlgStack.push( pNewDlg ); + + SfxViewShell* pViewShell = SfxViewShell::GetFirst(); + while(pViewShell) + { + if ( pViewShell->ISA(ScTabViewShell) ) + { + ScTabViewShell* pViewSh = (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 = (ScTabViewShell*)pViewShell; + pViewSh->SetInRefMode( false ); + } + pViewShell = SfxViewShell::GetNext( *pViewShell ); + } + + } } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |