certainly I could, but this solution is much complex and hardly to
maintain.It would be a terrible dream if XWindow interface have
dozens of methods.
Best Wishes, Rainman.
On Mon, Aug 4, 2008 at 3:17 PM, Mathias Bauer <[EMAIL PROTECTED]> wrote:
> Rainman Lee wrote:
>
>> oh, I see...
>> Separating XButton from XWindow and reusing the window implementation
>> can be done in a old-style service.
>> But in a new-style service, only one interface a service can inherit.
>> so if I try to separate XButton, there must be a XSomeInterface that
>> inherits XButton and XWindow.
>> The result is my Button that inherits XSomeInterface cant reuse Window
>> implementation.
>
> No, you can reuse it, but you must reimplement all methods from XWindow
> and let them call the methods of your window class. If you have a
> "MyButtonClass" that derives from "MyWindowClass" (implementing XWindow)
> and implements XButton (derived from XWindow), and if your XWindow
> interface has a method "setvisible", the code would look like e.g.
>
> MyButtonClass::setVisible( sal_Bool bSet )
> {
> MyWindowClass::setVisible( bSet );
> }
>
> I assume that with "XButton" and "XWindow" you are not referring to the
> interfaces in the namespace com::sun::star::awt, as here XButton is not
> derived from XWindow anyway.
>
> 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]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]