summaryrefslogtreecommitdiff
path: root/sd/source/ui/slidesorter/model
diff options
context:
space:
mode:
authorAndre Fischer <af@openoffice.org>2010-04-29 16:58:41 +0200
committerAndre Fischer <af@openoffice.org>2010-04-29 16:58:41 +0200
commit648716ed790e8f9c9e4bf515a0ec4f3a57dbd78c (patch)
tree193c5fb6b15afba7edd8ee71ba2dcd9c1171e0c0 /sd/source/ui/slidesorter/model
parent735c902c49ff973f7d44c12dc683d2e8c4ed1e90 (diff)
renaissance1: #i107215# Fixed paint problem on initialization. Removed some OSL_TRACEs.
Diffstat (limited to 'sd/source/ui/slidesorter/model')
-rw-r--r--sd/source/ui/slidesorter/model/SlideSorterModel.cxx36
1 files changed, 30 insertions, 6 deletions
diff --git a/sd/source/ui/slidesorter/model/SlideSorterModel.cxx b/sd/source/ui/slidesorter/model/SlideSorterModel.cxx
index e49d42368c8a..de5f044e898a 100644
--- a/sd/source/ui/slidesorter/model/SlideSorterModel.cxx
+++ b/sd/source/ui/slidesorter/model/SlideSorterModel.cxx
@@ -66,24 +66,48 @@ namespace {
Reference<drawing::XDrawPage> mxSlide;
};
+ bool PrintModel (const SlideSorterModel& rModel)
+ {
+ for (sal_Int32 nIndex=0,nCount=rModel.GetPageCount(); nIndex<nCount; ++nIndex)
+ {
+ SharedPageDescriptor pDescriptor (rModel.GetPageDescriptor(nIndex));
+ if (pDescriptor)
+ {
+ OSL_TRACE("%d %d %d %d %x",
+ nIndex,
+ pDescriptor->GetPageIndex(),
+ pDescriptor->GetVisualState().mnPageId,
+ FromCoreIndex(pDescriptor->GetPage()->GetPageNum()),
+ pDescriptor->GetPage());
+ }
+ else
+ {
+ OSL_TRACE("%d", nIndex);
+ }
+ }
+
+ return true;
+ }
bool CheckModel (const SlideSorterModel& rModel)
{
for (sal_Int32 nIndex=0,nCount=rModel.GetPageCount(); nIndex<nCount; ++nIndex)
{
SharedPageDescriptor pDescriptor (rModel.GetPageDescriptor(nIndex));
- OSL_TRACE("%d %d %d %d %x",
- nIndex,
- pDescriptor->GetPageIndex(),
- pDescriptor->GetVisualState().mnPageId,
- FromCoreIndex(pDescriptor->GetPage()->GetPageNum()),
- pDescriptor->GetPage());
+ if ( ! pDescriptor)
+ {
+ PrintModel(rModel);
+ OSL_ASSERT(pDescriptor);
+ return false;
+ }
if (nIndex != pDescriptor->GetPageIndex())
{
+ PrintModel(rModel);
OSL_ASSERT(nIndex == pDescriptor->GetPageIndex());
return false;
}
if (nIndex != pDescriptor->GetVisualState().mnPageId)
{
+ PrintModel(rModel);
OSL_ASSERT(nIndex == pDescriptor->GetVisualState().mnPageId);
return false;
}