Bo Peng wrote:
In my institution, because few people are willing to review others'
grant, there is a submit one, review one policy. If we adopt this rule
here, you should go ahead and review my Embedding patch. :-)
Sure...though I can't promise competence with minizip, etc.
First, could you disclose a little bit how to use this feature? Is
there a GUI to add modules?
There's no feature yet. I'm trying to follow the "divide your patch into
logical bits" rule. This one just reworks the infrastructure to prepare
for modules, which will come next.
cap::pasteParagraphList(cursor_, buf.paragraphs(),
- buf.params().textclass, el);
+ buf.params().getTextClass_sptr(),
el);
BO: sptr means smart pointer? I prefer getTextClassPtr.
If people really want me to change all of these, I'll do so. But this
was modeled on the existing Layout_ptr.
#include <vector>
-
namespace lyx {
BO: I see a number of such deletions. Are they really needed?
Necessary, surely not. I was just trying to make the style consistent as
I was working.
+ ///Get the LyX TextClass---layout file---this document is using.
BO: kind of confusing: what does this xxx --xxx--xx mean?
Changed a bit.
+textclass_type defaultTextclass()
+{
+ // Initialize textclass to point to article. if `first' is
BO: Just to be picky. I see a lot of Textclass, and more TextClass...
This was copied from old code and should have been changed. And some of
them, like textclass_type, are not changed from old code, and shouldn't
be in this kind of patch. Or so I've been told.
+ /// the base TextClass associated with the document
+ textclass_type baseClass;
+ /// the possibly modular TextClass actually in use
+ TextClass_sptr textClass;
BO: I think we either use baseClass_ and getBaseClass(), or use
baseClass directly. In your patch, I do not see an advantage of using
getBaseClass() over baseClass.
Changed to baseClass_.
Index: src/TextClass_sptr.h
===================================================================
--- src/TextClass_sptr.h (revision 0)
+++ src/TextClass_sptr.h (revision 0)
BO: I can not quite follow. Why cannot this definition be put to
TextClass.h? I mean, why a separate file?
Two reasons: (i) A lot of header files only need to typedef, so we can
use this rather than including the whole of TextClass.h; (ii) somewhere
along the way, I had problems with circular includes when I tried to put
this into the main header.
The rest looks fine, but I will have to wait for your part 2 for their
uses. I can confirm that your patch compiles, but I do not know how to
test.
This should lead to no behavioral change. If LyX still works, then
that's good.
Richard
--
==================================================================
Richard G Heck, Jr
Professor of Philosophy
Brown University
http://frege.brown.edu/heck/
==================================================================
Get my public key from http://sks.keyserver.penguin.de
Hash: 0x1DE91F1E66FFBDEC
Learn how to sign your email using Thunderbird and GnuPG at:
http://dudu.dyn.2-h.org/nist/gpg-enigmail-howto