[Libreoffice-commits] core.git: sd/source

Stephan Bergmann sbergman at redhat.com
Tue Oct 27 08:52:55 PDT 2015


 sd/source/core/sdpage2.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 20dd938d06ba96817f0cd58aad50b0bec952d077
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue Oct 27 16:51:23 2015 +0100

    Remove unncessary, wrong downcast
    
    ...which caused
    
    > sd/source/core/sdpage2.cxx:151:28: runtime error: downcast of address 0x611000ccf8c0 which does not point to an object of type 'SdrTextObj'
    > 0x611000ccf8c0: note: object is of type 'SdrPageObj'
    >  08 07 80 35  10 3e 04 ba 4f 7f 00 00  c0 1b 2c 00 b0 60 00 00  00 00 00 00 00 00 00 00  70 1c 2c 00
    >               ^~~~~~~~~~~~~~~~~~~~~~~
    >               vptr for 'SdrPageObj'
    >  SdPage::SetPresentationLayout(rtl::OUString const&, bool, bool, bool) sd/source/core/sdpage2.cxx:151:28
    >  SdDrawDocument::SetMasterPage(unsigned short, rtl::OUString const&, SdDrawDocument*, bool, bool) sd/source/core/drawdoc3.cxx:1746:13
    >  AssistentDlgImpl::UpdatePreview(bool) sd/source/ui/dlg/dlgass.cxx:1513:13
    >  [...]
    
    Change-Id: I07afc4cd7ef0a0a32768db59b72ca94edd4026df

diff --git a/sd/source/core/sdpage2.cxx b/sd/source/core/sdpage2.cxx
index e2e6304..79ccef9 100644
--- a/sd/source/core/sdpage2.cxx
+++ b/sd/source/core/sdpage2.cxx
@@ -148,7 +148,7 @@ void SdPage::SetPresentationLayout(const OUString& rLayoutName,
 
     for (size_t nObj = 0; nObj < nObjCount; ++nObj)
     {
-        SdrTextObj* pObj = static_cast<SdrTextObj*>( GetObj(nObj) );
+        auto pObj = GetObj(nObj);
 
         if (pObj->GetObjInventor() == SdrInventor &&
             pObj->GetObjIdentifier() == OBJ_OUTLINETEXT)


More information about the Libreoffice-commits mailing list