diff options
author | Christian Lippka <cl@openoffice.org> | 2010-04-01 11:00:20 +0200 |
---|---|---|
committer | Christian Lippka <cl@openoffice.org> | 2010-04-01 11:00:20 +0200 |
commit | 646895d3ee78647feb51582e3cdea75d01960cd5 (patch) | |
tree | d67590818dbd11b1f4727dc7ab8cef0f719338b0 /sd/source/ui/unoidl/SdUnoDrawView.cxx | |
parent | 851fa3b48ac78b8b50e2ecc110d30ed2a3e8dfbd (diff) |
enalbe assign slide layout dropdown for notes and handout view
Diffstat (limited to 'sd/source/ui/unoidl/SdUnoDrawView.cxx')
-rw-r--r-- | sd/source/ui/unoidl/SdUnoDrawView.cxx | 41 |
1 files changed, 40 insertions, 1 deletions
diff --git a/sd/source/ui/unoidl/SdUnoDrawView.cxx b/sd/source/ui/unoidl/SdUnoDrawView.cxx index 5a497231158d..8594d4e0ebf9 100644 --- a/sd/source/ui/unoidl/SdUnoDrawView.cxx +++ b/sd/source/ui/unoidl/SdUnoDrawView.cxx @@ -38,21 +38,27 @@ #include "unomodel.hxx" #include "unopage.hxx" #include "Window.hxx" +#include "pres.hxx" #include <cppuhelper/proptypehlp.hxx> +#include <comphelper/serviceinfohelper.hxx> #include <sfx2/dispatch.hxx> #include <sfx2/viewfrm.hxx> #include <svx/svdpagv.hxx> #include <svx/unoshape.hxx> #include <svx/unoshcol.hxx> #include <svx/zoomitem.hxx> +#include <com/sun/star/drawing/DrawViewMode.hpp> #include <com/sun/star/drawing/XLayerManager.hpp> #include <com/sun/star/view/DocumentZoomType.hpp> #include <vector> +using rtl::OUString; + using namespace ::com::sun::star; using namespace ::com::sun::star::uno; +using namespace ::com::sun::star::drawing; namespace sd { @@ -416,7 +422,6 @@ void SdUnoDrawView::setFastPropertyValue ( SetViewOffset( aOffset ); } break; - default: throw beans::UnknownPropertyException(); } @@ -460,6 +465,10 @@ Any SAL_CALL SdUnoDrawView::getFastPropertyValue ( aValue <<= GetViewOffset(); break; + case DrawController::PROPERTY_DRAWVIEWMODE: + aValue = getDrawViewMode(); + break; + default: throw beans::UnknownPropertyException(); } @@ -601,5 +610,35 @@ SdXImpressDocument* SdUnoDrawView::GetModel (void) const throw() return NULL; } +Any SdUnoDrawView::getDrawViewMode() const +{ + Any aRet; + switch( mrDrawViewShell.GetPageKind() ) + { + case PK_NOTES: aRet <<= DrawViewMode_NOTES; break; + case PK_HANDOUT: aRet <<= DrawViewMode_HANDOUT; break; + case PK_STANDARD: aRet <<= DrawViewMode_DRAW; break; + } + return aRet; +} + +// XServiceInfo +OUString SAL_CALL SdUnoDrawView::getImplementationName( ) throw (RuntimeException) +{ + return OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.sd.SdUnoDrawView") ); +} + +sal_Bool SAL_CALL SdUnoDrawView::supportsService( const OUString& ServiceName ) throw (RuntimeException) +{ + return comphelper::ServiceInfoHelper::supportsService( ServiceName, getSupportedServiceNames() ); +} + +Sequence< OUString > SAL_CALL SdUnoDrawView::getSupportedServiceNames( ) throw (RuntimeException) +{ + OUString aSN( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.DrawingDocumentDrawView") ); + uno::Sequence< OUString > aSeq( &aSN, 1 ); + return aSeq; +} } // end of namespace sd + |