summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorAndrzej Hunt <andrzej.hunt@collabora.com>2014-07-29 17:00:56 +0200
committerAndrzej Hunt <andrzej.hunt@collabora.com>2014-07-30 12:44:04 +0200
commitb3375a273e8030fd576e8094fe0890fab23362ea (patch)
treeeef84aeb60edcdcd92a8023b80ec51f100b8a91d /sd
parent7f8eb6d501f962d2bdac9a581389289f8054daec (diff)
Impress/Tiled Rendering: implement setPartMode.
Change-Id: I831953ac3fa1d0a15b64aa008cc3bfb79e72575a
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/inc/unomodel.hxx1
-rw-r--r--sd/source/ui/unoidl/unomodel.cxx35
2 files changed, 35 insertions, 1 deletions
diff --git a/sd/source/ui/inc/unomodel.hxx b/sd/source/ui/inc/unomodel.hxx
index 8fa1904da7f1..e620ca5d96cb 100644
--- a/sd/source/ui/inc/unomodel.hxx
+++ b/sd/source/ui/inc/unomodel.hxx
@@ -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
diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx
index 7726de407768..6c1661be179f 100644
--- a/sd/source/ui/unoidl/unomodel.cxx
+++ b/sd/source/ui/unoidl/unomodel.cxx
@@ -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();