Andreas...
Andreas Martens wrote:
Hi Malte,
Malte Timmermann wrote:
IMHO there should be some notification, so the Layouts are simply
listeners and we don't need the parameter.
That's what I meant. My question was: why do we need this parameter in
SwDoc::DeleteSection(..)?
But I am not sure - you are the expert ;)
So if a broadcast is used, no Layout access is needed.
But if the layouts have to be notified directly, you are right and we
might need a list of layouts.
I do not understand this. Broadcasting will work with lists (of
layouts), too. So there where is the difference?
It was meant: "If there is no broadcasting, then we might need the list"...
So seams we don't need that.
Right now we don't have that, and normally we didn't want that,
because we are just moving away the layout from the SwDoc to the
ViewShell...
Yes, so again, why do we need this layout parameter for
DeleteSection(..)?
Right now, the SwDoc has the Layout, but this will move to the
ViewShell. Seems the Layout is used in DeleteSection for some reason, or
in an other methods called from there.
By quickly looking in the code, I can't see why it's needed - LiuTao,
can you clarify?
Malte.
Any comments/ideas?
No, only questions ;-)
Regards
Andreas
Malte.
Andreas Martens wrote:
Hi LiuTao,
liutao wrote:
Hello all,
I am absorbed in modularization of ODFToolkit project about 2 months.
But now I face a question as follows:
SwRedline::~SwRedline()
{
......
if( !GetDoc()->IsInDtor() )
GetDoc()->DeleteSection( &pCntntSect->GetNode(),rLayout );
......
}
The parameter "rLayout" in function DeleteSection is added by me
and this parameter is passed from a view class(ViewShell).
Why does DeleteSection(..) needs a dedicated layout? This function
removes some nodes from the Writer model. If these functions needs
access to a layout, I assume this is e.g. for notification. But then
I think _all_ layouts need to be notified. So you don't need a
parameter, you need the access to all layouts?!
What do you think?
That means the destructor don't know this patameter.but the
modularization work require I to add this parameter.how to deal
with it and make the destructor can disposal this function.
Best Regards,
LiuTao
Kindly regards
Andreas
---
Andreas Martens (ama) - OpenOffice.org Writer
OpenOffice.org Engineering at Sun: http://blogs.sun.com/GullFOSS
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]