Kaydet (Commit) 2546b368 authored tarafından Armin Le Grand's avatar Armin Le Grand

#i105146# fixed mainly by not setting a page to visualize at the SdrPageObj's for handout page

üst e117d716
...@@ -302,8 +302,9 @@ SdrObject* SdPage::CreatePresObj(PresObjKind eObjKind, BOOL bVertical, const Rec ...@@ -302,8 +302,9 @@ SdrObject* SdPage::CreatePresObj(PresObjKind eObjKind, BOOL bVertical, const Rec
case PRESOBJ_HANDOUT: case PRESOBJ_HANDOUT:
{ {
//Erste Standardseite am SdrPageObj vermerken //Erste Standardseite am SdrPageObj vermerken
SdrPage* pFirstPage = ( (SdDrawDocument*) pModel )->GetSdPage(0, PK_STANDARD); // #i105146# We want no content to be displayed for PK_HANDOUT,
pSdrObj = new SdrPageObj( pFirstPage ); // so just never set a page as content
pSdrObj = new SdrPageObj(0);
pSdrObj->SetResizeProtect(TRUE); pSdrObj->SetResizeProtect(TRUE);
} }
break; break;
...@@ -745,28 +746,17 @@ void SdPage::CreateTitleAndLayout(BOOL bInit, BOOL bCreate ) ...@@ -745,28 +746,17 @@ void SdPage::CreateTitleAndLayout(BOOL bInit, BOOL bCreate )
CalculateHandoutAreas( *static_cast< SdDrawDocument* >(GetModel() ), pMasterPage->GetAutoLayout(), false, aAreas ); CalculateHandoutAreas( *static_cast< SdDrawDocument* >(GetModel() ), pMasterPage->GetAutoLayout(), false, aAreas );
const bool bSkip = pMasterPage->GetAutoLayout() == AUTOLAYOUT_HANDOUT3; const bool bSkip = pMasterPage->GetAutoLayout() == AUTOLAYOUT_HANDOUT3;
sal_uInt16 nPage = 0;
std::vector< Rectangle >::iterator iter( aAreas.begin() ); std::vector< Rectangle >::iterator iter( aAreas.begin() );
while( iter != aAreas.end() ) while( iter != aAreas.end() )
{ {
SdrPageObj* pPageObj = static_cast<SdrPageObj*>(pMasterPage->CreatePresObj(PRESOBJ_HANDOUT, FALSE, (*iter++), TRUE) ); SdrPageObj* pPageObj = static_cast<SdrPageObj*>(pMasterPage->CreatePresObj(PRESOBJ_HANDOUT, FALSE, (*iter++), TRUE) );
// #i105146# We want no content to be displayed for PK_HANDOUT,
const sal_uInt16 nDestinationPageNum(2 * nPage + 1); // so just never set a page as content
pPageObj->SetReferencedPage(0L);
if(nDestinationPageNum < pModel->GetPageCount())
{
pPageObj->SetReferencedPage(pModel->GetPage(nDestinationPageNum));
}
else
{
pPageObj->SetReferencedPage(0L);
}
if( bSkip && iter != aAreas.end() ) if( bSkip && iter != aAreas.end() )
iter++; iter++;
nPage++;
} }
} }
......
...@@ -1191,12 +1191,16 @@ void PageObjectViewObjectContact::ActionChanged (void) ...@@ -1191,12 +1191,16 @@ void PageObjectViewObjectContact::ActionChanged (void)
// Even when we are called from destructor we still have to invalide // Even when we are called from destructor we still have to invalide
// the preview bitmap in the cache. // the preview bitmap in the cache.
const SdrPage* pPage = GetPage(); const SdrPage* pPage = GetPage();
SdDrawDocument* pDocument = dynamic_cast<SdDrawDocument*>(pPage->GetModel());
if (mpCache!=NULL && pPage!=NULL && pDocument!=NULL) if(pPage)
{ {
cache::PageCacheManager::Instance()->InvalidatePreviewBitmap( SdDrawDocument* pDocument = dynamic_cast<SdDrawDocument*>(pPage->GetModel());
pDocument->getUnoModel(), if (mpCache!=NULL && pPage!=NULL && pDocument!=NULL)
GetPage()); {
cache::PageCacheManager::Instance()->InvalidatePreviewBitmap(
pDocument->getUnoModel(),
pPage);
}
} }
// call parent // call parent
......
...@@ -1196,25 +1196,15 @@ BOOL DrawViewShell::SwitchPage(USHORT nSelectedPage) ...@@ -1196,25 +1196,15 @@ BOOL DrawViewShell::SwitchPage(USHORT nSelectedPage)
{ {
// set pages for all available handout presentation objects // set pages for all available handout presentation objects
sd::ShapeList& rShapeList = pMaster->GetPresentationShapeList(); sd::ShapeList& rShapeList = pMaster->GetPresentationShapeList();
sal_uInt16 nPgNum = 0;
SdrObject* pObj = 0; SdrObject* pObj = 0;
while( (pObj = rShapeList.getNextShape(pObj)) != 0 ) while( (pObj = rShapeList.getNextShape(pObj)) != 0 )
{ {
if( pMaster->GetPresObjKind(pObj) == PRESOBJ_HANDOUT ) if( pMaster->GetPresObjKind(pObj) == PRESOBJ_HANDOUT )
{ {
const sal_uInt16 nDestinationPageNum(2 * nPgNum + 1); // #i105146# We want no content to be displayed for PK_HANDOUT,
// so just never set a page as content
if(nDestinationPageNum < GetDoc()->GetPageCount()) static_cast<SdrPageObj*>(pObj)->SetReferencedPage(0);
{
static_cast<SdrPageObj*>(pObj)->SetReferencedPage(GetDoc()->GetPage(nDestinationPageNum));
}
else
{
static_cast<SdrPageObj*>(pObj)->SetReferencedPage(0L);
}
nPgNum++;
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment