summaryrefslogtreecommitdiff
path: root/sd/source/core/PageListWatcher.cxx
diff options
context:
space:
mode:
authorRĂ¼diger Timm <rt@openoffice.org>2004-07-13 12:45:01 +0000
committerRĂ¼diger Timm <rt@openoffice.org>2004-07-13 12:45:01 +0000
commit9a746775d45f8cc4f6355a38e7ea002fbf47d4a7 (patch)
tree80b2a5d4cb9e79dc6d645eb8d070cb157b745239 /sd/source/core/PageListWatcher.cxx
parent642d3579ee8345ab1f9d315efe57a8fbbc6b1ba9 (diff)
INTEGRATION: CWS impress2 (1.2.26); FILE MERGED
2004/07/06 08:28:59 af 1.2.26.5: #i22705# Extended debug messages when GetSdPage() is called with invalid page index. 2004/05/23 13:18:36 af 1.2.26.4: #i22705# Corrected error due to recent resync. 2004/05/19 18:19:27 af 1.2.26.3: RESYNC: (1.2-1.3); FILE MERGED 2004/03/05 09:34:22 af 1.2.26.2: #i22705# Added braces arround assertions to be compilable when not in DEBUG mode. 2004/03/03 17:19:09 af 1.2.26.1: #i22705# Moved assertions to avoid unnecessary comparisons and allow break points on them.
Diffstat (limited to 'sd/source/core/PageListWatcher.cxx')
-rw-r--r--sd/source/core/PageListWatcher.cxx25
1 files changed, 21 insertions, 4 deletions
diff --git a/sd/source/core/PageListWatcher.cxx b/sd/source/core/PageListWatcher.cxx
index 34e9777fabfa..9b412e2c49af 100644
--- a/sd/source/core/PageListWatcher.cxx
+++ b/sd/source/core/PageListWatcher.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: PageListWatcher.cxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: kz $ $Date: 2004-02-26 14:32:16 $
+ * last change: $Author: rt $ $Date: 2004-07-13 13:45:01 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -132,16 +132,28 @@ SdPage* ImpPageListWatcher::GetSdPage(PageKind ePgKind, sal_uInt32 nPgNum)
{
case PK_STANDARD:
{
- DBG_ASSERT(nPgNum <= maPageVectorStandard.size(), "ImpPageListWatcher::GetSdPage: access out of range (!)");
if (nPgNum>=0 && nPgNum<maPageVectorStandard.size())
pRetval = maPageVectorStandard[nPgNum];
+ else
+ {
+ DBG_ASSERT(nPgNum <= maPageVectorStandard.size(),
+ "ImpPageListWatcher::GetSdPage(PK_STANDARD): access out of range");
+ DBG_WARNING2 (" %d > %d",
+ nPgNum, nPgNum<maPageVectorStandard.size());
+ }
break;
}
case PK_NOTES:
{
- DBG_ASSERT(nPgNum <= maPageVectorNotes.size(), "ImpPageListWatcher::GetSdPage: access out of range (!)");
if (nPgNum>=0 && nPgNum<maPageVectorNotes.size())
pRetval = maPageVectorNotes[nPgNum];
+ else
+ {
+ DBG_ASSERT(nPgNum <= maPageVectorNotes.size(),
+ "ImpPageListWatcher::GetSdPage(PK_NOTES): access out of range");
+ DBG_WARNING2(" %d > %d",
+ nPgNum, nPgNum<maPageVectorNotes.size());
+ }
break;
}
case PK_HANDOUT:
@@ -152,6 +164,11 @@ SdPage* ImpPageListWatcher::GetSdPage(PageKind ePgKind, sal_uInt32 nPgNum)
DBG_ASSERT(nPgNum == 0L, "ImpPageListWatcher::GetSdPage: access to non existing handout page (!)");
if (nPgNum == 0)
pRetval = mpHandoutPage;
+ else
+ {
+ DBG_ASSERT(nPgNum == 0L,
+ "ImpPageListWatcher::GetSdPage: access to non existing handout page (!)");
+ }
break;
}
}