[prev in list] [next in list] [prev in thread] [next in thread]
List: koffice-devel
Subject: Re: Review Request: Addition of classes for the centralization of
From: "Carlos Licea" <carlos_licea () hotmail ! com>
Date: 2010-10-29 19:20:30
Message-ID: 20101029192030.2980.53042 () vidsolbach ! de
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
> On 2010-10-29 08:21:01, Johannes Simon wrote:
> > Generally I like the idea of having a central class to save an ODF tabl=
e. KChart would need one, too, btw, it is currently done in ChartShape.cpp,=
which is obviously the wrong place. I have two remarks regarding your appr=
oach:
> > =
> > 1) Why not also make it load a table? It is, after all, a very related =
task.
> > 2) Interesting for the chart shape would be an interface (or adapter) t=
o use your classes to purely save/load an existing QAbstractTableModel. Not=
e that there's no style information attached to its internal table. Maybe i=
nstead it would also be possible to use QAbstractTableModel as the handler =
for actual data, and have an API around it to add styles to rows, columns a=
nd cells.
1) I think that the main porpuse of the ODF library we try to provide at KO=
ffice is for writing ODFs rather than load them. This could be added in the=
future, though.
2) Do note that you don't have to add a style, if you don't it'll write a m=
ere table to the file. A KoAbstractTableModelWriter could be developed for =
your use case. That way the responsibilities are also very well separated.
- Carlos
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://svn.reviewboard.kde.org/r/5726/#review8421
-----------------------------------------------------------
On 2010-10-29 03:09:40, Carlos Licea wrote:
> =
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://svn.reviewboard.kde.org/r/5726/
> -----------------------------------------------------------
> =
> (Updated 2010-10-29 03:09:40)
> =
> =
> Review request for KOffice and Casper Boemann.
> =
> =
> Summary
> -------
> =
> Warning: Mildly-Long description ahead.
> =
> >Rationale
> Currently we need to save a table in at less 3 different parts:
> * The TableShape (TODO as of now)
> * The PPTX filter
> * The DOCX filter
> (We could include The KSpread table but I don't know if KSpread would lik=
e to outsource the saving of its file format.)
> =
> So far we have had different implementations, everyone with slightly diff=
erent behavior and different quirks and bugs. For this reason I've decided =
to create a "centralized" way to save a table.
> Originally I started this work in the MSOOXML filters, then moved it to a=
new library but then I realized that the best place was libs/odf.
> =
> >Work done
> The patch introduces several classes that map to the ODF concepts. So far=
I'm mildly satisfied with the results, I think the API promises but it's s=
till a long way from complete.
> =
> >Remarks
> >> General
> There are a few remarks I'd like to point out:
> * Give a through review to the API, I want it to be as stable as possible=
so that I can continue building on it.
> * There's going to be a naming clash between KWord's KoTableStyle and the=
one proposed here. I propose renaming KWord's as this class is more generi=
c, plus it is meant to be be a public API for our ODF library. A namespace =
could also be added (Ko)ODF.
> * I added a KoStyle class. As I said, I intended this to be a new library=
before realizing that it should go to the ODF library. I did, however left=
it as it allows less look-ups of the name in the KoGenStyles.
> * Somebody might ask why I added a KoTableProperties, I didn't want to cl=
utter the KoTable API with so many properties when its behavior is much mor=
e important.
> * I still haven't added the export macro to the classes as it's on anothe=
r one of my branches.
> * Tests are coming.
> * Documentation is also coming, I have some of it in a branch but I haven=
't heavily invested in it as I still consider this a work in progress.
> * Adaptation in the MsooXml filters is also comming, not released again b=
ecause of unstable API.
> =
> >>Implementation specific
> * KoTable is the owner of all the KoCell's, KoRow's and KoColumn's. There=
's no way to create one of those outside the Table.
> * KoCellValue maps to office:value and its linked attributes.
> * KoCellChild on the other hand represents all the different children of =
a Cell in the table:table-cell. I intend it to be expanded over time to cov=
er many more children so that they also can be created using a nice API.
> =
> =
> Diffs
> -----
> =
> branches/work/koffice-essen/libs/odf/CMakeLists.txt 1186909 =
> branches/work/koffice-essen/libs/odf/KoCell.h PRE-CREATION =
> branches/work/koffice-essen/libs/odf/KoCell.cpp PRE-CREATION =
> branches/work/koffice-essen/libs/odf/KoCellChild.h PRE-CREATION =
> branches/work/koffice-essen/libs/odf/KoCellChild.cpp PRE-CREATION =
> branches/work/koffice-essen/libs/odf/KoCellStyle.h PRE-CREATION =
> branches/work/koffice-essen/libs/odf/KoCellStyle.cpp PRE-CREATION =
> branches/work/koffice-essen/libs/odf/KoCellValue.h PRE-CREATION =
> branches/work/koffice-essen/libs/odf/KoCellValue.cpp PRE-CREATION =
> branches/work/koffice-essen/libs/odf/KoColumn.h PRE-CREATION =
> branches/work/koffice-essen/libs/odf/KoColumn.cpp PRE-CREATION =
> branches/work/koffice-essen/libs/odf/KoColumnStyle.h PRE-CREATION =
> branches/work/koffice-essen/libs/odf/KoDummyCellValue.h PRE-CREATION =
> branches/work/koffice-essen/libs/odf/KoDummyCellValue.cpp PRE-CREATION =
> branches/work/koffice-essen/libs/odf/KoRawCellChild.h PRE-CREATION =
> branches/work/koffice-essen/libs/odf/KoRawCellChild.cpp PRE-CREATION =
> branches/work/koffice-essen/libs/odf/KoRow.h PRE-CREATION =
> branches/work/koffice-essen/libs/odf/KoRow.cpp PRE-CREATION =
> branches/work/koffice-essen/libs/odf/KoRowStyle.h PRE-CREATION =
> branches/work/koffice-essen/libs/odf/KoStyle.h PRE-CREATION =
> branches/work/koffice-essen/libs/odf/KoStyle.cpp PRE-CREATION =
> branches/work/koffice-essen/libs/odf/KoTable.h PRE-CREATION =
> branches/work/koffice-essen/libs/odf/KoTable.cpp PRE-CREATION =
> branches/work/koffice-essen/libs/odf/KoTableProperties.h PRE-CREATION =
> branches/work/koffice-essen/libs/odf/KoTableStyle.h PRE-CREATION =
> branches/work/koffice-essen/libs/odf/KoTableTemplate.h PRE-CREATION =
> =
> Diff: http://svn.reviewboard.kde.org/r/5726/diff
> =
> =
> Testing
> -------
> =
> As I said tests are coming too.
> =
> =
> Thanks,
> =
> Carlos
> =
>
[Attachment #5 (text/html)]
<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px \
#c9c399 solid;"> <tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="http://svn.reviewboard.kde.org/r/5726/">http://svn.reviewboard.kde.org/r/5726/</a>
</td>
</tr>
</table>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; \
padding-left: 10px;"> <p style="margin-top: 0;">On October 29th, 2010, \
8:21 a.m., <b>Johannes Simon</b> wrote:</p> <blockquote \
style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;"> <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; \
white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">Generally I like the idea of having a central class to save an \
ODF table. KChart would need one, too, btw, it is currently done in \
ChartShape.cpp, which is obviously the wrong place. I have two remarks \
regarding your approach:
1) Why not also make it load a table? It is, after all, a very related \
task. 2) Interesting for the chart shape would be an interface (or adapter) \
to use your classes to purely save/load an existing QAbstractTableModel. \
Note that there's no style information attached to its internal table. \
Maybe instead it would also be possible to use QAbstractTableModel as the \
handler for actual data, and have an API around it to add styles to rows, \
columns and cells.</pre> </blockquote>
</blockquote>
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">1) I think \
that the main porpuse of the ODF library we try to provide at KOffice is \
for writing ODFs rather than load them. This could be added in the future, \
though. 2) Do note that you don't have to add a style, if you don't \
it'll write a mere table to the file. A KoAbstractTableModelWriter \
could be developed for your use case. That way the responsibilities are \
also very well separated.</pre> <br />
<p>- Carlos</p>
<br />
<p>On October 29th, 2010, 3:09 a.m., Carlos Licea wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" \
style="background-image: \
url('http://svn.reviewboard.kde.orgrb/images/review_request_box_top_bg.png'); \
background-position: left top; background-repeat: repeat-x; border: 1px \
black solid;"> <tr>
<td>
<div>Review request for KOffice and Casper Boemann.</div>
<div>By Carlos Licea.</div>
<p style="color: grey;"><i>Updated 2010-10-29 03:09:40</i></p>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description \
</h1> <table width="100%" bgcolor="#ffffff" cellspacing="0" \
cellpadding="10" style="border: 1px solid #b8b5a0"> <tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">Warning: Mildly-Long description ahead.
>Rationale
Currently we need to save a table in at less 3 different parts:
* The TableShape (TODO as of now)
* The PPTX filter
* The DOCX filter
(We could include The KSpread table but I don't know if KSpread would \
like to outsource the saving of its file format.)
So far we have had different implementations, everyone with slightly \
different behavior and different quirks and bugs. For this reason I've \
decided to create a "centralized" way to save a table. Originally \
I started this work in the MSOOXML filters, then moved it to a new library \
but then I realized that the best place was libs/odf.
>Work done
The patch introduces several classes that map to the ODF concepts. So far \
I'm mildly satisfied with the results, I think the API promises but \
it's still a long way from complete.
>Remarks
>> General
There are a few remarks I'd like to point out:
* Give a through review to the API, I want it to be as stable as possible \
so that I can continue building on it.
* There's going to be a naming clash between KWord's KoTableStyle \
and the one proposed here. I propose renaming KWord's as this class is \
more generic, plus it is meant to be be a public API for our ODF library. A \
namespace could also be added (Ko)ODF.
* I added a KoStyle class. As I said, I intended this to be a new library \
before realizing that it should go to the ODF library. I did, however left \
it as it allows less look-ups of the name in the \
KoGenStyles.
* Somebody might ask why I added a KoTableProperties, I didn't want to \
clutter the KoTable API with so many properties when its behavior is much \
more important.
* I still haven't added the export macro to the classes as it's on \
another one of my branches.
* Tests are coming.
* Documentation is also coming, I have some of it in a branch but I \
haven't heavily invested in it as I still consider this a work in \
progress.
* Adaptation in the MsooXml filters is also comming, not released again \
because of unstable API.
>>Implementation specific
* KoTable is the owner of all the KoCell's, KoRow's and \
KoColumn's. There's no way to create one of those outside the \
Table.
* KoCellValue maps to office:value and its linked attributes.
* KoCellChild on the other hand represents all the different children of a \
Cell in the table:table-cell. I intend it to be expanded over time to cover \
many more children so that they also can be created using a nice API.</pre> \
</td> </tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing \
</h1> <table width="100%" bgcolor="#ffffff" cellspacing="0" \
cellpadding="10" style="border: 1px solid #b8b5a0"> <tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">As I said tests are coming too.</pre> </td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> \
</h1> <ul style="margin-left: 3em; padding-left: 0;">
<li>branches/work/koffice-essen/libs/odf/CMakeLists.txt <span \
style="color: grey">(1186909)</span></li>
<li>branches/work/koffice-essen/libs/odf/KoCell.h <span style="color: \
grey">(PRE-CREATION)</span></li>
<li>branches/work/koffice-essen/libs/odf/KoCell.cpp <span style="color: \
grey">(PRE-CREATION)</span></li>
<li>branches/work/koffice-essen/libs/odf/KoCellChild.h <span style="color: \
grey">(PRE-CREATION)</span></li>
<li>branches/work/koffice-essen/libs/odf/KoCellChild.cpp <span \
style="color: grey">(PRE-CREATION)</span></li>
<li>branches/work/koffice-essen/libs/odf/KoCellStyle.h <span style="color: \
grey">(PRE-CREATION)</span></li>
<li>branches/work/koffice-essen/libs/odf/KoCellStyle.cpp <span \
style="color: grey">(PRE-CREATION)</span></li>
<li>branches/work/koffice-essen/libs/odf/KoCellValue.h <span style="color: \
grey">(PRE-CREATION)</span></li>
<li>branches/work/koffice-essen/libs/odf/KoCellValue.cpp <span \
style="color: grey">(PRE-CREATION)</span></li>
<li>branches/work/koffice-essen/libs/odf/KoColumn.h <span style="color: \
grey">(PRE-CREATION)</span></li>
<li>branches/work/koffice-essen/libs/odf/KoColumn.cpp <span style="color: \
grey">(PRE-CREATION)</span></li>
<li>branches/work/koffice-essen/libs/odf/KoColumnStyle.h <span \
style="color: grey">(PRE-CREATION)</span></li>
<li>branches/work/koffice-essen/libs/odf/KoDummyCellValue.h <span \
style="color: grey">(PRE-CREATION)</span></li>
<li>branches/work/koffice-essen/libs/odf/KoDummyCellValue.cpp <span \
style="color: grey">(PRE-CREATION)</span></li>
<li>branches/work/koffice-essen/libs/odf/KoRawCellChild.h <span \
style="color: grey">(PRE-CREATION)</span></li>
<li>branches/work/koffice-essen/libs/odf/KoRawCellChild.cpp <span \
style="color: grey">(PRE-CREATION)</span></li>
<li>branches/work/koffice-essen/libs/odf/KoRow.h <span style="color: \
grey">(PRE-CREATION)</span></li>
<li>branches/work/koffice-essen/libs/odf/KoRow.cpp <span style="color: \
grey">(PRE-CREATION)</span></li>
<li>branches/work/koffice-essen/libs/odf/KoRowStyle.h <span style="color: \
grey">(PRE-CREATION)</span></li>
<li>branches/work/koffice-essen/libs/odf/KoStyle.h <span style="color: \
grey">(PRE-CREATION)</span></li>
<li>branches/work/koffice-essen/libs/odf/KoStyle.cpp <span style="color: \
grey">(PRE-CREATION)</span></li>
<li>branches/work/koffice-essen/libs/odf/KoTable.h <span style="color: \
grey">(PRE-CREATION)</span></li>
<li>branches/work/koffice-essen/libs/odf/KoTable.cpp <span style="color: \
grey">(PRE-CREATION)</span></li>
<li>branches/work/koffice-essen/libs/odf/KoTableProperties.h <span \
style="color: grey">(PRE-CREATION)</span></li>
<li>branches/work/koffice-essen/libs/odf/KoTableStyle.h <span \
style="color: grey">(PRE-CREATION)</span></li>
<li>branches/work/koffice-essen/libs/odf/KoTableTemplate.h <span \
style="color: grey">(PRE-CREATION)</span></li>
</ul>
<p><a href="http://svn.reviewboard.kde.org/r/5726/diff/" \
style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>
_______________________________________________
koffice-devel mailing list
koffice-devel@kde.org
https://mail.kde.org/mailman/listinfo/koffice-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic