diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-08-05 13:33:20 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-08-05 13:33:58 +0200 |
commit | 927da5e017c713fa1961863ffd11cb798f9ff48d (patch) | |
tree | f3ab9afcaae8267f6fa80edab86b3a2ac069adda /sd | |
parent | 45b0b47d114437198c9e0872d427576e6e7e6cc6 (diff) |
GetPage requires mpPage to be an SdPage
...which is apparently not always the case; at least observed that during
CppunitTest_sd_html_export_tests.
Change-Id: If3d73249845adfa6b489e783693768e755033f4a
Diffstat (limited to 'sd')
-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 ) ); } } |