summaryrefslogtreecommitdiff
path: root/svtools/source/control/tabbar.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'svtools/source/control/tabbar.cxx')
-rw-r--r--svtools/source/control/tabbar.cxx7
1 files changed, 3 insertions, 4 deletions
diff --git a/svtools/source/control/tabbar.cxx b/svtools/source/control/tabbar.cxx
index 9183f7331388..c85c5a117a27 100644
--- a/svtools/source/control/tabbar.cxx
+++ b/svtools/source/control/tabbar.cxx
@@ -787,10 +787,11 @@ void TabBar::SetScrollAlwaysEnabled(bool bScrollAlwaysEnabled)
ImplEnableControls();
}
-
-
void TabBar::ImplShowPage( sal_uInt16 nPos )
{
+ if (nPos >= mpItemList->size())
+ return;
+
// calculate width
long nWidth = GetOutputSizePixel().Width();
if ( nWidth >= TABBAR_OFFSET_X )
@@ -811,8 +812,6 @@ void TabBar::ImplShowPage( sal_uInt16 nPos )
}
}
-
-
IMPL_LINK( TabBar, ImplClickHdl, ImplTabButton*, pBtn )
{
EndEditMode();