[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: koffice/filters
From: Matus Uzak <matus.uzak () ixonos ! com>
Date: 2010-11-23 12:56:14
Message-ID: 20101123125614.0B368AC8A2 () svn ! kde ! org
[Download RAW message or body]
SVN commit 1199989 by uzak:
libmso: Check the shape container in OfficeArtDgContainer, it may contain additional \
properties for the groupShape.
M +9 -3 kpresenter/powerpoint/PptToOdp.cpp
M +7 -0 kspread/excel/import/ODrawClient.cpp
M +1 -0 kspread/excel/import/ODrawClient.h
M +5 -1 libmso/ODrawToOdf.cpp
M +7 -0 libmso/ODrawToOdf.h
--- trunk/koffice/filters/kpresenter/powerpoint/PptToOdp.cpp #1199988:1199989
@@ -211,6 +211,8 @@
Writer& out, KoGenStyle& style);
const MSO::OfficeArtDggContainer* getOfficeArtDggContainer();
const MSO::OfficeArtSpContainer* getMasterShapeContainer(quint32 spid);
+ const MSO::OfficeArtSpContainer* defaultShapeContainer() { return \
dc_data->defaultShape; }; +
QColor toQColor(const MSO::OfficeArtCOLORREF& c);
QString formatPos(qreal v);
@@ -219,10 +221,11 @@
const MSO::SlideContainer* presSlide;
const MSO::NotesContainer* notesMasterSlide;
const MSO::NotesContainer* notesSlide;
+ const MSO::OfficeArtSpContainer* defaultShape;
const MSO::SlideListWithTextSubContainerOrAtom* slideTexts;
DrawClientData(): masterSlide(NULL), presSlide(NULL), \
notesMasterSlide(NULL),
- notesSlide(NULL), slideTexts (NULL) {};
+ notesSlide(NULL), defaultShape(NULL), slideTexts(NULL) {};
};
DrawClientData dc_data[1];
@@ -230,12 +233,14 @@
DrawClient(PptToOdp* p) :ppttoodp(p) {}
void setDrawClientData(const MasterOrSlideContainer* mc, const SlideContainer* \
sc,
const NotesContainer* nmc, const NotesContainer* nc,
+ const MSO::OfficeArtSpContainer* shape = NULL,
const MSO::SlideListWithTextSubContainerOrAtom* stc = \
NULL) {
dc_data->masterSlide = mc;
dc_data->presSlide = sc;
dc_data->notesMasterSlide = nmc;
dc_data->notesSlide = nc;
+ dc_data->defaultShape = shape;
dc_data->slideTexts = stc;
}
};
@@ -2380,7 +2385,8 @@
if (slide->drawing.OfficeArtDg.groupShape) {
const OfficeArtSpgrContainer& spgr = \
*(slide->drawing.OfficeArtDg.groupShape).data();
- drawclient.setDrawClientData(master, slide, 0, 0, currentSlideTexts);
+ const OfficeArtSpContainer* shape = \
(slide->drawing.OfficeArtDg.shape).data(); + \
drawclient.setDrawClientData(master, slide, 0, 0, shape, currentSlideTexts); \
odrawtoodf.processGroupShape(spgr, out); }
@@ -2402,7 +2408,7 @@
out.xml.addAttribute("draw:style-name", value);
}
const OfficeArtSpgrContainer& spgr = \
*(nc->drawing.OfficeArtDg.groupShape).data();
- drawclient.setDrawClientData(0, 0, p->notesMaster, nc, currentSlideTexts);
+ drawclient.setDrawClientData(0, 0, p->notesMaster, nc, NULL, \
currentSlideTexts); odrawtoodf.processGroupShape(spgr, out);
out.xml.endElement();
}
--- trunk/koffice/filters/kspread/excel/import/ODrawClient.cpp #1199988:1199989
@@ -195,6 +195,13 @@
return sp;
}
+const MSO::OfficeArtSpContainer* ODrawClient::defaultShapeContainer()
+{
+ //TODO: provide the OfficeArtDgContainer.shape container if required
+ MSO::OfficeArtSpContainer* sp = NULL;
+ return sp;
+}
+
QColor ODrawClient::toQColor(const MSO::OfficeArtCOLORREF &c)
{
if (c.fSchemeIndex) {
--- trunk/koffice/filters/kspread/excel/import/ODrawClient.h #1199988:1199989
@@ -40,6 +40,7 @@
virtual void addTextStyles(const MSO::OfficeArtClientTextBox *clientTextbox, \
const MSO::OfficeArtClientData *clientData, Writer &out, KoGenStyle &style); virtual \
const MSO::OfficeArtDggContainer* getOfficeArtDggContainer();
virtual const MSO::OfficeArtSpContainer* getMasterShapeContainer(quint32 spid);
+ virtual const MSO::OfficeArtSpContainer* defaultShapeContainer();
virtual QColor toQColor(const MSO::OfficeArtCOLORREF &c);
virtual QString formatPos(qreal v);
--- trunk/koffice/filters/libmso/ODrawToOdf.cpp #1199988:1199989
@@ -115,14 +115,18 @@
}
if (!drawingGroup) return;
+ if (client) {
//locate the OfficeArtSpContainer of the master shape
if (o.shapeProp.fHaveMaster) {
- if (client) {
const DrawStyle tmp(*drawingGroup, &o);
quint32 spid = tmp.hspMaster();
master = client->getMasterShapeContainer(spid);
}
+ else {
+ master = client->defaultShapeContainer();
}
+ }
+
const DrawStyle ds(*drawingGroup, master, &o);
defineGraphicProperties(style, ds, out.styles);
--- trunk/koffice/filters/libmso/ODrawToOdf.h #1199988:1199989
@@ -88,6 +88,13 @@
virtual const MSO::OfficeArtSpContainer* getMasterShapeContainer(quint32 \
spid) = 0;
/**
+ * Retrieve OfficeArtDgContainer.shape, which seems to contain
+ * additional properties to check before the default properties in the
+ * OfficeArtDggContainer are checked (MS Office 2003 specific).
+ **/
+ virtual const MSO::OfficeArtSpContainer* defaultShapeContainer() = 0;
+
+ /**
* Convert the OfficeArtCOLORREF to a QColor.
* This conversion requires color scheme information.
**/
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic