[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: koffice/filters/kspread/xlsx
From: Carlos Licea <carlos_licea () hotmail ! com>
Date: 2010-07-06 4:20:00
Message-ID: 20100706042000.CD971AC8EE () svn ! kde ! org
[Download RAW message or body]
SVN commit 1146476 by clicea:
Save the ole objects found. We still have to figure out the proper
geometry for the frame.
M +28 -3 XlsxXmlWorksheetReader.cpp
--- trunk/koffice/filters/kspread/xlsx/XlsxXmlWorksheetReader.cpp #1146475:1146476
@@ -50,6 +50,7 @@
#include <QBrush>
#include <QRegExp>
+#include <QString>
#include "NumberFormatParser.h"
@@ -554,10 +555,34 @@
// the embedded object file was written by the \
XlsxXmlChartReader already
\
//chart->m_chartExport->saveContent(m_context->import->outputStore(), manifest); }
+ }
-// foreach( XlsXmlOleObjectsReaderContext oleObject, \
drawing->oleObjects ) {
-//
-// }
+ QPair<QString,QString> oleObject;
+ foreach( oleObject, cell->oleObjects ) {
+ const QString olePath = oleObject.first;
+ const QString previewPath = oleObject.second;
+ body->startElement("draw:frame");
+ //TODO find out the proper values
+ body->addAttribute("svg:x", "1cm");
+ body->addAttribute("svg:y", "1cm");
+ body->addAttribute("svg:width", "5cm");
+ body->addAttribute("svg:height", "5cm");
+
+ body->startElement("draw:object-ole");
+ body->addAttribute("xlink:href", olePath);
+ body->addAttribute("xlink:type", "simple");
+ body->addAttribute("xlink:show", "embed");
+ body->addAttribute("xlink:actuate", "onLoad");
+ body->endElement(); // draw:object-ole
+
+ body->startElement("draw:image");
+ body->addAttribute("xlink:href", previewPath);
+ body->addAttribute("xlink:type", "simple");
+ body->addAttribute("xlink:show", "embed");
+ body->addAttribute("xlink:actuate", "onLoad");
+ body->endElement(); // draw:image
+
+ body->endElement(); // draw:frame
}
}
body->endElement(); // table:table-cell
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic