summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sc/source/ui/view/tabcont.cxx2
-rw-r--r--sc/source/ui/view/tabvwshf.cxx6
2 files changed, 8 insertions, 0 deletions
diff --git a/sc/source/ui/view/tabcont.cxx b/sc/source/ui/view/tabcont.cxx
index 2fffc87fc1b4..09507f258d69 100644
--- a/sc/source/ui/view/tabcont.cxx
+++ b/sc/source/ui/view/tabcont.cxx
@@ -240,6 +240,8 @@ void ScTabControl::AddTabClick()
rDoc.CreateValidTabName(aName);
SCTAB nTabCount = rDoc.GetTableCount();
pViewData->GetViewShell()->InsertTable(aName, nTabCount);
+ if (!pScMod->IsModalMode() && !pScMod->IsFormulaMode() && !IsInEditMode())
+ pViewData->GetViewShell()->SetActive();
}
void ScTabControl::Select()
diff --git a/sc/source/ui/view/tabvwshf.cxx b/sc/source/ui/view/tabvwshf.cxx
index dd0a12930870..8c0d4049ffc4 100644
--- a/sc/source/ui/view/tabvwshf.cxx
+++ b/sc/source/ui/view/tabvwshf.cxx
@@ -880,7 +880,10 @@ void ScTabViewShell::ExecuteInsertTable(SfxRequest& rReq)
}
if (bOk)
+ {
+ rViewData.GetViewShell()->SetActive();
rReq.Done( *pReqArgs );
+ }
//! else set error
}
else // dialog
@@ -996,6 +999,7 @@ void ScTabViewShell::DoInsertTableFromDialog(SfxRequest& rReq, const VclPtr<Abst
}
}
}
+ rViewData.GetViewShell()->SetActive();
}
void ScTabViewShell::DoMoveTableFromDialog( SfxRequest& rReq, const VclPtr<AbstractScMoveTableDlg>& pDlg )
@@ -1166,6 +1170,8 @@ bool ScTabViewShell::DoAppendOrRenameTableDialog(sal_Int32 nResult, const VclPtr
if ( bDone )
{
+ if (nSlot == FID_TAB_APPEND)
+ rViewData.GetViewShell()->SetActive();
xReq->AppendItem( SfxStringItem( nSlot, aName ) );
xReq->Done();
}