sd/source/ui/unoidl/unopage.cxx |   13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)

New commits:
commit 927da5e017c713fa1961863ffd11cb798f9ff48d
Author: Stephan Bergmann <sberg...@redhat.com>
Date:   Tue Aug 5 13:33:20 2014 +0200

    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

diff --git a/sd/source/ui/unoidl/unopage.cxx b/sd/source/ui/unoidl/unopage.cxx
index 0744855..821d049 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 
) );
         }
     }
 
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to