[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-09-15 12:52:24
Message-ID: 20100915125224.903AFAC871 () svn ! kde ! org
[Download RAW message or body]
SVN commit 1175623 by lassin:
Fixed Pptx to use styles from correct masterslide in multi masterslide case, still \
todo: use theme defined by the masterslide instead of the latest masterslide theme.
M +10 -7 PptxXmlDocumentReader.cpp
M +1 -2 PptxXmlDocumentReader.h
U PptxXmlSlideReader.cpp
M +3 -0 PptxXmlSlideReader.h
--- trunk/koffice/filters/kpresenter/pptx/PptxXmlDocumentReader.cpp #1175622:1175623
@@ -71,7 +71,7 @@
QVector<KoGenStyle> masterPageStyles;
QVector<QString> masterPageFrames;
- PptxSlideMasterPageProperties slideMasterPageProperties;
+ QMap<QString, PptxSlideMasterPageProperties> slideMasterPageProperties;
QMap<int,QString> commentAuthors;
MSOOXML::TableStyleList* tableStyleList;
private:
@@ -189,6 +189,7 @@
d->masterSlidePropertiesMap.contains(slideMasterPathAndFile) ? \
d->masterSlidePropertiesMap[slideMasterPathAndFile] : 0;
result = new PptxSlideLayoutProperties();
+ result->m_slideMasterName = slideMasterPathAndFile;
MSOOXML::Utils::AutoPtrSetter<PptxSlideLayoutProperties> \
slideLayoutPropertiesSetter(result); PptxXmlSlideReaderContext context(
@@ -198,11 +199,12 @@
PptxXmlSlideReader::SlideLayout,
masterSlideProperties, //PptxSlideProperties
result,
- &d->slideMasterPageProperties, //PptxSlideMasterPageProperties
+ &d->slideMasterPageProperties[slideMasterPathAndFile], \
//PptxSlideMasterPageProperties
*m_context->relationships,
d->commentAuthors,
d->tableStyleList
);
+
PptxXmlSlideReader slideLayoutReader(this);
KoFilter::ConversionStatus status = m_context->import->loadAndParseDocument(
&slideLayoutReader, slideLayoutPath + "/" + slideLayoutFile, &context);
@@ -259,7 +261,7 @@
PptxXmlSlideReader::Slide,
masterSlideProperties,
slideLayoutProperties,
- &d->slideMasterPageProperties,
+ &d->slideMasterPageProperties[slideLayoutProperties->m_slideMasterName],
*m_context->relationships,
d->commentAuthors,
d->tableStyleList
@@ -305,6 +307,8 @@
// Reading the slidemaster theme
+ PptxSlideMasterPageProperties masterPageProperties;
+
const QString slideThemePathAndFile(m_context->relationships->targetForType(
slideMasterPath, slideMasterFile,
QLatin1String(MSOOXML::Schemas::officeDocument::relationships) + "/theme"));
@@ -348,7 +352,7 @@
PptxXmlSlideReader::SlideMaster,
masterSlideProperties,
0,
- &d->slideMasterPageProperties,
+ &masterPageProperties,
*m_context->relationships,
d->commentAuthors,
d->tableStyleList
@@ -370,6 +374,7 @@
return status;
}
+ d->slideMasterPageProperties.insert(slideMasterPathAndFile, \
masterPageProperties);
d->masterSlidePropertiesMap.insert(slideMasterPathAndFile, \
masterSlideProperties); masterSlidePropertiesSetter.release();
d->masterPageDrawStyleNames.push_back(context.pageDrawStyleName);
@@ -541,9 +546,7 @@
}
d->masterPageStyles[index].addChildElement(QString("frame-2-%1").arg(index), \
d->masterPageFrames.at((1+index)*2-1)); const QString masterPageStyleName(
- mainStyles->insert(d->masterPageStyles.at(index), "Default"));
- kDebug() << "masterPageStyleName:" << masterPageStyleName;
-
+ mainStyles->insert(d->masterPageStyles.at(index), "slideMaster"));
++index;
}
--- trunk/koffice/filters/kpresenter/pptx/PptxXmlDocumentReader.h #1175622:1175623
@@ -38,8 +38,7 @@
class PptxXmlDocumentReaderContext : public MSOOXML::MsooXmlReaderContext
{
public:
- PptxXmlDocumentReaderContext(PptxImport& _import,
- const QString& _path, const QString& _file,
+ PptxXmlDocumentReaderContext(PptxImport& _import, const QString& _path, const \
QString& _file,
MSOOXML::MsooXmlRelationships& _relationships);
PptxImport *import;
MSOOXML::DrawingMLTheme theme;
--- trunk/koffice/filters/kpresenter/pptx/PptxXmlSlideReader.h #1175622:1175623
@@ -119,6 +119,9 @@
QVector<QString> layoutFrames;
KoGenStyle m_drawingPageProperties;
+
+ // Name of the slidemaster to be used with this layout
+ QString m_slideMasterName;
private:
Q_DISABLE_COPY(PptxSlideLayoutProperties)
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic