diff options
-rw-r--r-- | sd/source/ui/unoidl/unopage.cxx | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/sd/source/ui/unoidl/unopage.cxx b/sd/source/ui/unoidl/unopage.cxx index 074485519c34..821d0497a6b8 100644 --- a/sd/source/ui/unoidl/unopage.cxx +++ b/sd/source/ui/unoidl/unopage.cxx @@ -2038,16 +2038,13 @@ Any SAL_CALL SdDrawPage::queryInterface( const uno::Type & rType ) { return makeAny( Reference< drawing::XMasterPageTarget >( this ) ); } - else + else if( mbIsImpressDocument + && rType == cppu::UnoType<presentation::XPresentationPage>::get() ) { - if( mbIsImpressDocument ) + SdPage * p = dynamic_cast<SdPage *>(SvxDrawPage::mpPage); + if( p == 0 || p->GetPageKind() != PK_HANDOUT ) { - const PageKind ePageKind = GetPage() ? GetPage()->GetPageKind() : PK_STANDARD; - - if( ePageKind != PK_HANDOUT && rType == cppu::UnoType<presentation::XPresentationPage>::get() ) - { - return makeAny( Reference< presentation::XPresentationPage >( this ) ); - } + return makeAny( Reference< presentation::XPresentationPage >( this ) ); } } |