Hi Malte,

Malte Timmermann wrote:
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.
It depends.
We have already some broadcasting for parts of the layout, e.g. a SwTxtFrm is a listener of a SwTxtNode. When a SwTxtNode is changed, it notifies its listeners in the layout. But the layout itself is not a listener, until now it was sufficient that the SwDoc knows the one and only layout. With your move of the layout from SwDoc to ViewShell I could imagine that we need more broadcasting.
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?
Same with me, I had looking into DeleteSection(..) and could not identify ATM which functions needs the layout.
Regards
   Andreas

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]



--
Sun Microsystems GmbH       Andreas Martens
Nagelsweg 55                StarOffice/OpenOffice.org
20097 Hamburg               Phone: +49 (0)40 23646-500
Germany
http://www.sun.de           Fax: +49 (0)40 23646-550
mailto:[EMAIL PROTECTED]
Sitz der Gesellschaft: Sun Microsystems GmbH, Sonnenallee 1, D-85551 Kirchheim-Heimstetten
Amtsgericht Muenchen: HRB 161028
Geschaeftsfuehrer: Wolfgang Engels, Dr. Roland Boemer
Vorsitzender des Aufsichtsrates: Martin Haering

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

Reply via email to