diff options
Diffstat (limited to 'sc/source/ui/view/cellsh.cxx')
-rw-r--r-- | sc/source/ui/view/cellsh.cxx | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/sc/source/ui/view/cellsh.cxx b/sc/source/ui/view/cellsh.cxx index 6d3f10e2ec5e..a461c54f255e 100644 --- a/sc/source/ui/view/cellsh.cxx +++ b/sc/source/ui/view/cellsh.cxx @@ -42,6 +42,7 @@ #include <svx/hlnkitem.hxx> #include <sfx2/app.hxx> #include <sfx2/bindings.hxx> +#include <sfx2/childwin.hxx> #include <sfx2/objface.hxx> #include <sfx2/request.hxx> #include <sfx2/viewfrm.hxx> @@ -970,6 +971,29 @@ void ScCellShell::GetState(SfxItemSet &rSet) } break; + case SID_SPELL_DIALOG: + { + if ( pDoc && pData && pDoc->IsTabProtected( pData->GetTabNo() ) ) + { + bool bVisible = false; + SfxViewFrame* pViewFrame = ( pTabViewShell ? pTabViewShell->GetViewFrame() : NULL ); + if ( pViewFrame && pViewFrame->HasChildWindow( nWhich ) ) + { + SfxChildWindow* pChild = pViewFrame->GetChildWindow( nWhich ); + Window* pWin = ( pChild ? pChild->GetWindow() : NULL ); + if ( pWin && pWin->IsVisible() ) + { + bVisible = true; + } + } + if ( !bVisible ) + { + rSet.DisableItem( nWhich ); + } + } + } + break; + } // switch ( nWitch ) nWhich = aIter.NextWhich(); } // while ( nWitch ) |