summaryrefslogtreecommitdiff
path: root/sd/source/ui/view/drviews1.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sd/source/ui/view/drviews1.cxx')
-rw-r--r--sd/source/ui/view/drviews1.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/sd/source/ui/view/drviews1.cxx b/sd/source/ui/view/drviews1.cxx
index 365a3b57b21e..ec8cdbb1e273 100644
--- a/sd/source/ui/view/drviews1.cxx
+++ b/sd/source/ui/view/drviews1.cxx
@@ -632,22 +632,22 @@ IMPL_LINK( DrawViewShell, TabSplitHdl, TabBar *, pTab, void )
/// inherited from sd::ViewShell
SdPage* DrawViewShell::getCurrentPage() const
{
- const sal_Int32 nPageCount = (meEditMode == EditMode::Page)?
+ const sal_uInt16 nPageCount = (meEditMode == EditMode::Page)?
GetDoc()->GetSdPageCount(mePageKind):
GetDoc()->GetMasterSdPageCount(mePageKind);
- sal_Int32 nCurrentPage = maTabControl->GetCurPagePos();
- DBG_ASSERT( (nPageCount>0) && (nCurrentPage<nPageCount), "sd::DrawViewShell::getCurrentPage(), illegal page index!" );
- if( (nPageCount < 0) || (nCurrentPage>=nPageCount) )
+ sal_uInt16 nCurrentPage = maTabControl->GetCurPagePos();
+ DBG_ASSERT((nCurrentPage<nPageCount), "sd::DrawViewShell::getCurrentPage(), illegal page index!");
+ if (nCurrentPage >= nPageCount)
nCurrentPage = 0; // play safe here
if (meEditMode == EditMode::Page)
{
- return GetDoc()->GetSdPage(static_cast<sal_uInt16>(nCurrentPage), mePageKind);
+ return GetDoc()->GetSdPage(nCurrentPage, mePageKind);
}
else // EditMode::MasterPage
{
- return GetDoc()->GetMasterSdPage(static_cast<sal_uInt16>(nCurrentPage), mePageKind);
+ return GetDoc()->GetMasterSdPage(nCurrentPage, mePageKind);
}
}