Re: [dev] A question about the destructor
Andreas Martens wrote: I see, SwDoc::GetEditShell(..) is the problem. Sometimes the Writer model (SwDoc) needs to broadcast an event to all controllers (ViewShell), e.g. if a part of the model is deleted. The controller could have cursor pointing into this deleted area and these cursors needs to be adjusted. At the moment SwDoc gets the controllers from the layout. If you remove the layout from the SwDoc, you need a new possibility to notify all ViewShells. I meant you should not add a parameter Layout to the method SwDoc::GetEditShell(..), we need a new mechanism to get the ViewShells from SwDoc _without_ using the layout. For the moment you should remove this parameter Layout from GetEditShell(..). How did this go on? Has the Layout parameter been removed? As Andreas said, notifying all ViewShells should be possible differently. Best regards, Mathias -- Mathias Bauer (mba) - Project Lead OpenOffice.org Writer OpenOffice.org Engineering at Sun: http://blogs.sun.com/GullFOSS Please don't reply to [EMAIL PROTECTED]. I use it for the OOo lists and only rarely read other mails sent to it. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [dev] A question about the destructor
Andreas Martens Malte will discuss it, after the discuss Andreas Malte will tell me how to solve it. Malte told me to go on my work just to assure which files should be modified. Best Regards, LiuTao Andreas Martens wrote: I see, SwDoc::GetEditShell(..) is the problem. Sometimes the Writer model (SwDoc) needs to broadcast an event to all controllers (ViewShell), e.g. if a part of the model is deleted. The controller could have cursor pointing into this deleted area and these cursors needs to be adjusted. At the moment SwDoc gets the controllers from the layout. If you remove the layout from the SwDoc, you need a new possibility to notify all ViewShells. I meant you should not add a parameter Layout to the method SwDoc::GetEditShell(..), we need a new mechanism to get the ViewShells from SwDoc _without_ using the layout. For the moment you should remove this parameter Layout from GetEditShell(..). How did this go on? Has the Layout parameter been removed? As Andreas said, notifying all ViewShells should be possible differently. Best regards, Mathias -- Mathias Bauer (mba) - Project Lead OpenOffice.org Writer OpenOffice.org Engineering at Sun: http://blogs.sun.com/GullFOSS Please don't reply to [EMAIL PROTECTED]. I use it for the OOo lists and only rarely read other mails sent to it.
Re: [dev] A question about the destructor
Hi, liutao wrote: Hi Malte,Andreas Andreas Martens wrote: That's what I meant. My question was: why do we need this parameter in SwDoc::DeleteSection(..)? because the function GetEditShell() need this parameter and it is called by the function PaMCorrAbs() then CorrAbs() then DeleteSection() There are also some ways to know the parameter is needed by the function DeleteSection. Regards, LiuTao I see, SwDoc::GetEditShell(..) is the problem. Sometimes the Writer model (SwDoc) needs to broadcast an event to all controllers (ViewShell), e.g. if a part of the model is deleted. The controller could have cursor pointing into this deleted area and these cursors needs to be adjusted. At the moment SwDoc gets the controllers from the layout. If you remove the layout from the SwDoc, you need a new possibility to notify all ViewShells. I meant you should not add a parameter Layout to the method SwDoc::GetEditShell(..), we need a new mechanism to get the ViewShells from SwDoc _without_ using the layout. For the moment you should remove this parameter Layout from GetEditShell(..). Regards Andreas 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). -- 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]
Re: [dev] A question about the destructor
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? 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(..)? 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] -- Sun Microsystems GmbH Andreas Martens Nagelsweg 55StarOffice/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]
Re: [dev] A question about the destructor
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]
Re: [dev] A question about the destructor
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 55StarOffice/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]
Re: [dev] A question about the destructor
IMHO there should be some notification, so the Layouts are simply listeners and we don't need the parameter. 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. 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... Any comments/ideas? 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]
[dev] A question about the destructor
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). 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 @Malte I eager to know the solution very much and I know you will come to our company in two days.so I ask the question in Mailing list.Wish you have a good time in BeiJing. 公司:北京红旗中文贰仟软件技术有限公司 地 址:北京经济技术开发区(亦庄)西环南路18号汇龙森A座二层 邮编:(100176) 电 话:51570010-6178 邮[EMAIL PROTECTED] 部门:开源技术部 联 系 人:刘涛
Re: [dev] A question about the destructor
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]