summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorArmin Le Grand <Armin.Le.Grand@Sun.COM>2009-11-23 16:27:16 +0100
committerArmin Le Grand <Armin.Le.Grand@Sun.COM>2009-11-23 16:27:16 +0100
commit2546b368921c771c4336e6db18543497389eaab7 (patch)
tree3717733cdeddb6b41b65f66f4d9e158d560388cd /sd
parente117d716e1309bcd8efc20810575990af5c9ec02 (diff)
#i105146# fixed mainly by not setting a page to visualize at the SdrPageObj's for handout page
Diffstat (limited to 'sd')
-rw-r--r--sd/source/core/sdpage.cxx24
-rw-r--r--sd/source/ui/slidesorter/view/SlsPageObjectViewObjectContact.cxx14
-rw-r--r--sd/source/ui/view/drviews1.cxx18
3 files changed, 20 insertions, 36 deletions
diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx
index 7f80b5bd763a..998f34363f33 100644
--- a/sd/source/core/sdpage.cxx
+++ b/sd/source/core/sdpage.cxx
@@ -302,8 +302,9 @@ SdrObject* SdPage::CreatePresObj(PresObjKind eObjKind, BOOL bVertical, const Rec
case PRESOBJ_HANDOUT:
{
//Erste Standardseite am SdrPageObj vermerken
- SdrPage* pFirstPage = ( (SdDrawDocument*) pModel )->GetSdPage(0, PK_STANDARD);
- pSdrObj = new SdrPageObj( pFirstPage );
+ // #i105146# We want no content to be displayed for PK_HANDOUT,
+ // so just never set a page as content
+ pSdrObj = new SdrPageObj(0);
pSdrObj->SetResizeProtect(TRUE);
}
break;
@@ -745,28 +746,17 @@ void SdPage::CreateTitleAndLayout(BOOL bInit, BOOL bCreate )
CalculateHandoutAreas( *static_cast< SdDrawDocument* >(GetModel() ), pMasterPage->GetAutoLayout(), false, aAreas );
const bool bSkip = pMasterPage->GetAutoLayout() == AUTOLAYOUT_HANDOUT3;
-
- sal_uInt16 nPage = 0;
std::vector< Rectangle >::iterator iter( aAreas.begin() );
+
while( iter != aAreas.end() )
{
SdrPageObj* pPageObj = static_cast<SdrPageObj*>(pMasterPage->CreatePresObj(PRESOBJ_HANDOUT, FALSE, (*iter++), TRUE) );
-
- const sal_uInt16 nDestinationPageNum(2 * nPage + 1);
-
- if(nDestinationPageNum < pModel->GetPageCount())
- {
- pPageObj->SetReferencedPage(pModel->GetPage(nDestinationPageNum));
- }
- else
- {
- pPageObj->SetReferencedPage(0L);
- }
+ // #i105146# We want no content to be displayed for PK_HANDOUT,
+ // so just never set a page as content
+ pPageObj->SetReferencedPage(0L);
if( bSkip && iter != aAreas.end() )
iter++;
-
- nPage++;
}
}
diff --git a/sd/source/ui/slidesorter/view/SlsPageObjectViewObjectContact.cxx b/sd/source/ui/slidesorter/view/SlsPageObjectViewObjectContact.cxx
index 8a66523280fc..8c3fd4532c4f 100644
--- a/sd/source/ui/slidesorter/view/SlsPageObjectViewObjectContact.cxx
+++ b/sd/source/ui/slidesorter/view/SlsPageObjectViewObjectContact.cxx
@@ -1191,12 +1191,16 @@ void PageObjectViewObjectContact::ActionChanged (void)
// Even when we are called from destructor we still have to invalide
// the preview bitmap in the cache.
const SdrPage* pPage = GetPage();
- SdDrawDocument* pDocument = dynamic_cast<SdDrawDocument*>(pPage->GetModel());
- if (mpCache!=NULL && pPage!=NULL && pDocument!=NULL)
+
+ if(pPage)
{
- cache::PageCacheManager::Instance()->InvalidatePreviewBitmap(
- pDocument->getUnoModel(),
- GetPage());
+ SdDrawDocument* pDocument = dynamic_cast<SdDrawDocument*>(pPage->GetModel());
+ if (mpCache!=NULL && pPage!=NULL && pDocument!=NULL)
+ {
+ cache::PageCacheManager::Instance()->InvalidatePreviewBitmap(
+ pDocument->getUnoModel(),
+ pPage);
+ }
}
// call parent
diff --git a/sd/source/ui/view/drviews1.cxx b/sd/source/ui/view/drviews1.cxx
index 2077a852f960..3d7ec543943b 100644
--- a/sd/source/ui/view/drviews1.cxx
+++ b/sd/source/ui/view/drviews1.cxx
@@ -1196,25 +1196,15 @@ BOOL DrawViewShell::SwitchPage(USHORT nSelectedPage)
{
// set pages for all available handout presentation objects
sd::ShapeList& rShapeList = pMaster->GetPresentationShapeList();
-
- sal_uInt16 nPgNum = 0;
SdrObject* pObj = 0;
+
while( (pObj = rShapeList.getNextShape(pObj)) != 0 )
{
if( pMaster->GetPresObjKind(pObj) == PRESOBJ_HANDOUT )
{
- const sal_uInt16 nDestinationPageNum(2 * nPgNum + 1);
-
- if(nDestinationPageNum < GetDoc()->GetPageCount())
- {
- static_cast<SdrPageObj*>(pObj)->SetReferencedPage(GetDoc()->GetPage(nDestinationPageNum));
- }
- else
- {
- static_cast<SdrPageObj*>(pObj)->SetReferencedPage(0L);
- }
-
- nPgNum++;
+ // #i105146# We want no content to be displayed for PK_HANDOUT,
+ // so just never set a page as content
+ static_cast<SdrPageObj*>(pObj)->SetReferencedPage(0);
}
}
}