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
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
{
// #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++;
}
}
......
......@@ -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();
if(pPage)
{
SdDrawDocument* pDocument = dynamic_cast<SdDrawDocument*>(pPage->GetModel());
if (mpCache!=NULL && pPage!=NULL && pDocument!=NULL)
{
cache::PageCacheManager::Instance()->InvalidatePreviewBitmap(
pDocument->getUnoModel(),
GetPage());
pPage);
}
}
// call parent
......
......@@ -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);
}
}
}
......
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