Le 3 mai 12 à 04:23, shzh zhao a écrit :
Hi All,
Hi,
I posted a wiki about copy/paste in calc in OpenOffice,
http://wiki.services.openoffice.org/wiki/Calc/Implementation/
Calc_copy_paste<http://wiki.services.openoffice.org/wiki/
How_to_support_a_VBA_API_in_OpenOffice>
Thank you very much : every documentation needs always a lot of time
to be written, and a lot of energy to maintain it.
=> bookmarked and marked as " precious " :-)
Any feedback will be appreciated, thanks.
About the code documentation : nothing, thanks again ! About the code
itself .. looks like there is something strange. Indeed, when we read
the description, we see a forest of if / else if .. in the algo.
If I understand correctly, every time a case is tested, we do
aDataHelper.HasFormat( aFormat) and if the current case is the 10th
in the "if" list, we'll have to execute 10 times the same method ?
Wouldn't a switch( aFormat) be more efficient and probably faster
there ? Other point : PasteDataFormat (sc/source/ui/view/
viewfun5.cxx) is around 500 lines (!!), and this is probably a lot
for a simple method (I probably read too fast ...)
FYI when I documented the math equation editor (see http://
wiki.ooo4kids.org/index.php/ImproveMathEquationEditor/
SourcesDescription ), there was another pattern used. Say more
"graphical", and using "operators" (see starmath/inc/rect.hxx). Could
this pattern be used there instead ? (if adapted)
More precisely, I see some similarities between all the possible
cases of formats ( if DataHelper.HasFormat() ), how they are treated,
and the possible nodes when creating a "graphical" equation.
Do you think we could use such a method in Calc (operators), and
optimize, or am I completely wrong ? (could be ;-) )
Thanks,
Eric
--
qɔᴉɹə
Projet OOo4Kids : http://wiki.ooo4kids.org/index.php/Main_Page
L'association EducOOo : http://www.educoo.org
Blog : http://eric.bachard.org/news