summaryrefslogtreecommitdiff
path: root/sc/source/ui/view/tabcont.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/ui/view/tabcont.cxx')
-rw-r--r--sc/source/ui/view/tabcont.cxx18
1 files changed, 14 insertions, 4 deletions
diff --git a/sc/source/ui/view/tabcont.cxx b/sc/source/ui/view/tabcont.cxx
index 948677b3c6ad..85f60d312fa8 100644
--- a/sc/source/ui/view/tabcont.cxx
+++ b/sc/source/ui/view/tabcont.cxx
@@ -72,11 +72,15 @@ ScTabControl::ScTabControl( Window* pParent, ScViewData* pData ) :
for (SCTAB i=0; i<nCount; i++)
{
if (pDoc->IsVisible(i))
+ {
if (pDoc->GetName(i,aString))
+ {
if ( pDoc->IsScenario(i) )
InsertPage( static_cast<sal_uInt16>(i)+1, aString, TPB_SPECIAL );
else
InsertPage( static_cast<sal_uInt16>(i)+1, aString );
+ }
+ }
}
SetCurPageId( static_cast<sal_uInt16>(pViewData->GetTabNo()) + 1 );
@@ -293,12 +297,18 @@ void ScTabControl::UpdateStatus()
{
Clear();
for (i=0; i<nCount; i++)
+ {
if (pDoc->IsVisible(i))
+ {
if (pDoc->GetName(i,aString))
- if ( pDoc->IsScenario(i) )
- InsertPage( static_cast<sal_uInt16>(i)+1, aString, TPB_SPECIAL );
- else
- InsertPage( static_cast<sal_uInt16>(i)+1, aString );
+ {
+ if ( pDoc->IsScenario(i) )
+ InsertPage( static_cast<sal_uInt16>(i)+1, aString, TPB_SPECIAL );
+ else
+ InsertPage( static_cast<sal_uInt16>(i)+1, aString );
+ }
+ }
+ }
}
SetCurPageId( static_cast<sal_uInt16>(pViewData->GetTabNo()) + 1 );