Kaydet (Commit) b3375a27 authored tarafından Andrzej Hunt's avatar Andrzej Hunt

Impress/Tiled Rendering: implement setPartMode.

Change-Id: I831953ac3fa1d0a15b64aa008cc3bfb79e72575a
üst 7f8eb6d5
......@@ -234,6 +234,7 @@ public:
virtual int getPart() SAL_OVERRIDE;
virtual int getParts() SAL_OVERRIDE;
virtual OUString getPartName( int nPart ) SAL_OVERRIDE;
virtual void setPartMode( LibreOfficeKitPartMode ePartMode ) SAL_OVERRIDE;
// XComponent
......
......@@ -2239,7 +2239,6 @@ void SdXImpressDocument::setPart( int nPart )
// only possible to select page 0 in this mode, I have no idea how you
// then actually select what is on the handout page, which defaults to
// a 4x4 grid of empty pages).
pViewSh->SetPageKind( PK_STANDARD );
pViewSh->SwitchPage( nPart );
}
}
......@@ -2269,6 +2268,40 @@ OUString SdXImpressDocument::getPartName( int nPart )
return pPage->GetName();
}
void SdXImpressDocument::setPartMode( LibreOfficeKitPartMode ePartMode )
{
DrawViewShell* pViewSh = dynamic_cast< DrawViewShell* >( mpDoc->GetDocSh()->GetViewShell() );
if (!pViewSh)
{
return;
}
PageKind aPageKind;
switch ( ePartMode )
{
case LOK_PARTMODE_EMBEDDEDOBJ:
// This will probably be handled higher up, i.e.
// we probably shouldn't be handling this here.
// (However we don't offer embedded object-only
// rendering anywhere yet, so this may be a
// completely incorrect comment.)
assert( false );
// And let's fall through in a normal build.
case LOK_PARTMODE_DEFAULT:
case LOK_PARTMODE_SLIDE:
aPageKind = PK_STANDARD;
break;
case LOK_PARTMODE_SLIDENOTES:
aPageKind = PK_NOTES;
break;
case LOK_PARTMODE_NOTES:
// TODO: this shows combined slides + notes
aPageKind = PK_NOTES;
break;
}
pViewSh->SetPageKind( aPageKind );
}
Size SdXImpressDocument::getDocumentSize()
{
SdrPageView* pCurPageView = mpDoc->GetDocSh()->GetViewShell()->GetView()->GetSdrPageView();
......
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