[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-08-24 19:37:54
Message-ID: 20100824193754.34EBDAC86A () svn ! kde ! org
[Download RAW message or body]
SVN commit 1167497 by lassin:
Corrected a crash happening when writing styles with wrong type.
M +11 -10 PptxXmlSlideReader.cpp
--- trunk/koffice/filters/kpresenter/pptx/PptxXmlSlideReader.cpp #1167496:1167497
@@ -557,11 +557,11 @@
// First check if we have properties from the slide, then from layout, then \
from master if (m_currentDrawStyle->isEmpty()) {
MSOOXML::Utils::copyPropertiesFromStyle(m_context->slideLayoutProperties->m_drawingPageProperties,
- *m_currentDrawStyle, \
KoGenStyle::DefaultType); + \
*m_currentDrawStyle, KoGenStyle::DrawingPageType);
// Only get properties from master page if they were not defined in the \
layout if (m_currentDrawStyle->isEmpty()) {
MSOOXML::Utils::copyPropertiesFromStyle(m_context->slideMasterPageProperties->m_drawingPageProperties,
- *m_currentDrawStyle, \
KoGenStyle::DefaultType); + \
*m_currentDrawStyle, KoGenStyle::DrawingPageType); }
} else {
m_currentDrawStyle->addProperty("presentation:visibility", "visible");
@@ -895,6 +895,7 @@
KoFilter::ConversionStatus PptxXmlSlideReader::read_cSld()
{
READ_PROLOGUE
+
while (!atEnd()) {
readNext();
kDebug() << *this;
@@ -971,17 +972,17 @@
BREAK_IF_END_OF(CURRENT_EL);
}
-#ifdef PPTXXMLSLIDEREADER_H
+ if (!m_currentDrawStyle->isEmpty()) {
if (m_context->type == SlideMaster) {
MSOOXML::Utils::copyPropertiesFromStyle(*m_currentDrawStyle,
\
m_context->slideMasterPageProperties->m_drawingPageProperties,
- KoGenStyle::DefaultType);
+ KoGenStyle::DrawingPageType);
} else if (m_context->type == SlideLayout) {
MSOOXML::Utils::copyPropertiesFromStyle(*m_currentDrawStyle,
\
m_context->slideLayoutProperties->m_drawingPageProperties,
- KoGenStyle::DefaultType);
+ KoGenStyle::DrawingPageType);
}
-#endif
+ }
READ_EPILOGUE
}
@@ -1044,17 +1045,17 @@
if (!fillImageName.isEmpty()) {
//! Setup slide's bitmap fill
- m_currentDrawStyle->addProperty("draw:fill", "bitmap");
- m_currentDrawStyle->addProperty("draw:fill-image-name", fillImageName);
+ m_currentDrawStyle->addProperty("draw:fill", "bitmap", \
KoGenStyle::DrawingPageType); + \
m_currentDrawStyle->addProperty("draw:fill-image-name", fillImageName, \
KoGenStyle::DrawingPageType); if (m_context->type != SlideMaster) {
if (!m_recentSourceName.isEmpty()) {
const QSize size(imageSize(m_recentSourceName));
kDebug() << "SIZE:" << size;
if (size.isValid()) {
m_currentDrawStyle->addProperty("draw:fill-image-width",
- MSOOXML::Utils::cmString(POINT_TO_CM(size.width())));
+ MSOOXML::Utils::cmString(POINT_TO_CM(size.width())), \
KoGenStyle::DrawingPageType);
m_currentDrawStyle->addProperty("draw:fill-image-height",
- MSOOXML::Utils::cmString(POINT_TO_CM(size.height())));
+ MSOOXML::Utils::cmString(POINT_TO_CM(size.height())), \
KoGenStyle::DrawingPageType); }
}
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic