[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    koffice/filters/kpresenter/pptx
From:       Lassi Taneli Nieminen <lassniem () gmail ! com>
Date:       2010-11-16 11:57:58
Message-ID: 20101116115758.73899AC8A0 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1197749 by lassin:

Fix a crash when trying to open pptx files created by ooimpress. (As it doesn't create defaultStyles)


 M  +4 -0      PptxXmlSlideReader.cpp  


--- trunk/koffice/filters/kpresenter/pptx/PptxXmlSlideReader.cpp #1197748:1197749
@@ -1778,9 +1778,11 @@
 {
     const int copyLevel = qMax(1, m_currentListLevel); // if m_currentListLevel==0 then use level1
 
+    if (m_context->defaultParagraphStyles.size() >= copyLevel) {
     MSOOXML::Utils::copyPropertiesFromStyle(m_context->defaultParagraphStyles[copyLevel-1],
                                             targetStyle, KoGenStyle::ParagraphType);
 }
+}
 
 void PptxXmlSlideReader::inheritParagraphStyle(KoGenStyle& targetStyle)
 {
@@ -1923,9 +1925,11 @@
 void PptxXmlSlideReader::inheritDefaultTextStyle(KoGenStyle& targetStyle)
 {
     const int listLevel = qMax(1, m_currentListLevel);
+    if (m_context->defaultTextStyles.size() >= listLevel) {
     MSOOXML::Utils::copyPropertiesFromStyle(m_context->defaultTextStyles[listLevel-1],
                                             targetStyle, KoGenStyle::TextType);
 }
+}
 
 void PptxXmlSlideReader::inheritShapePosition()
 {
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic