Hi dongquangang,

your question is a little bit unspecific. But, I will try to give the
first hints to step into the Writer layout algorithm:
- For debugging purposes you should have the complete folder
/sw/source/core/layout/ compiled with debug information
- In source file ../layout/layact.cxx you will find the main layout
routines. These are SwLayAction::InternalAction(..),
SwLayAction::FormatLayout(..) and SwLayAction::FormatCntnt(..). These
methods "travel" through the SwFrm hierarchy and call method
SwFrm::Calc() for each of the SwFrm instances.
- SwFrm::Calc() calls SwFrm::PrepareMake(), which calls SwFrm::MakeAll().
- SwFrm::Format() is in general called by SwFrm::MakeAll()
- To figured out how a certain SwFrm subclass, e.g. SwTabFrm or
SwCellFrm is formatted, I propose to use the debugger and step deep into
each called method.
- The main Writer layout algorithm is given by the methods at
SwLayAction class - these methods calls the SwFrm::Calc() in a specific
order. But, there are several cases, in which a certain SwFrm instance
calls "inside" its SwFrm::MakeAll() the SwFrm::Calc() of another SwFrm
instance. "inside" means here, that a certain SwFrm::MakeAll() is on the
program stack, when the SwFrm::Calc() call of another SwFrm instance is
initiated. These case are e.g. a SwTxtFrm instance calls "inside" its
MakeAll() the Calc() of its next SwFrm instance or a SwTabFrm instance
calls "inside" its MakeAll() the Calc() of all its lower SwFrm instances.

Regards, Oliver.

P.S.: Please have a look at
http://wiki.services.openoffice.org/wiki/Writer_Core_And_Layout - here
you find some of the stuff, we talked about in our chat last Wednesday

dongquangang wrote:
> hello,
> During I debuged the issue,I had a question about the method <foramt() and 
> <makeall()> .If a page had a SwPageFrm ,a SwTabFrm and so on,
> How did <SwPageFrm::foramt()> ,<SwTabFrm::format()>,<SwRowFrm::format() 
> >,<SwCellFrm::format()> and <SwTxtFrm::format()> work together? How did 
> <makeall()> and <format()> work together? Would you give me some suggestion?
> 
> Best Regards
> 
> 
> 
> 
> dongquangang
> 2007-07-09
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to