[prev in list] [next in list] [prev in thread] [next in thread] 

List:       koffice-devel
Subject:    Re: Review Request: load table:table as part of a draw:frame in the
From:       "Thorsten Zachmann" <t.zachmann () zagge ! de>
Date:       2010-04-26 5:44:38
Message-ID: 20100426054438.9306.8235 () localhost
[Download RAW message or body]



> On 2010-04-25 09:44:54, Thomas Zander wrote:
> > Thanks for working on this :)
> > I'm just giving this a general overview, I don't know the odf loading all that \
> > well. The QPair looks very complicated to me so I gave it some thought how to \
> > make it simpler.  Hope it makes sense.

I don't think the QPair is in any way complicated but that might be a personal \
opinion. As a QPair can be used so a QHash can be used. However for the place where \
it is used a hash which provides a fast lookup is not needed. I would say the list \
should be faster here as the adding and iterating over the list are faster than for a \
hash and these are the only used operations.


> On 2010-04-25 09:44:54, Thomas Zander wrote:
> > trunk/koffice/plugins/textshape/TextShape.cpp, line 375
> > <http://reviewboard.kde.org/r/3805/diff/2/?file=24510#file24510line375>
> > 
> > I don't understand that '!' (not) there. That doesn't make sense to be there IMO.
> > Can you add a comment perhaps?

If the loadOdfFrame from the base class fails it uses the one below. Can you explain \
what is not understandable here so I can formulate a comment that makes it clear.


> On 2010-04-25 09:44:54, Thomas Zander wrote:
> > trunk/koffice/libs/flake/KoShapeFactoryBase.cpp, line 96
> > <http://reviewboard.kde.org/r/3805/diff/2/?file=24505#file24505line96>
> > 
> > Now we no longer return a odfNameSpace() as a QString I'd like to suggest that \
> > the namespace is kept as a const char *. The advantage there is that we can use \
> > the pointers from KoXmlNS and thus only do pointer comparison for namespaces.  \
> > Which means that we avoid converting to utf16 (QString native) on call to \
> > setOdfElementNames and avoid a string compare. That should make a significant \
> > impact in startup time too :) 
> > This, together with the previous suggestion, would make the elements stored like;
> > QHash<char*, QStringList>

There was always a QString used for the namespace

-QString KoShapeFactoryBase::odfNameSpace() const                                     \


so this patch doesn't change anything in this regard.

It is needed as a QString in the registry as there we have a QString we need to \
compare it too. So it makes sense to do the conversion only once.


- Thorsten


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.kde.org/r/3805/#review5215
-----------------------------------------------------------


On 2010-04-25 06:55:45, Thorsten Zachmann wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviewboard.kde.org/r/3805/
> -----------------------------------------------------------
> 
> (Updated 2010-04-25 06:55:45)
> 
> 
> Review request for KOffice.
> 
> 
> Summary
> -------
> 
> Make it possible to load a table:table inside a draw:frame. To make this possible \
> it is needed to extend KoShapeFactory and KoShapeRegistry that multiple namespaces \
> -> tag's can be supported by one shape. 
> 
> This addresses bug 231680.
> https://bugs.kde.org/show_bug.cgi?id=231680
> 
> 
> Diffs
> -----
> 
> trunk/koffice/libs/flake/KoShapeFactoryBase.h 1118236 
> trunk/koffice/libs/flake/KoShapeFactoryBase.cpp 1118236 
> trunk/koffice/libs/flake/KoShapeRegistry.cpp 1118236 
> trunk/koffice/libs/flake/tests/TestKoShapeFactory.cpp 1118236 
> trunk/koffice/libs/kotext/opendocument/KoTextLoader.cpp 1118236 
> trunk/koffice/plugins/textshape/TextShape.h 1118236 
> trunk/koffice/plugins/textshape/TextShape.cpp 1118236 
> trunk/koffice/plugins/textshape/TextShapeFactory.cpp 1118236 
> 
> Diff: http://reviewboard.kde.org/r/3805/diff
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Thorsten
> 
> 

_______________________________________________
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