.: sw/source

Michael Stahl mstahl at redhat.com
Wed Apr 25 04:09:33 PDT 2012


On 25/04/12 10:52, Tor Lillqvist wrote:
>  sw/source/ui/dbui/mmaddressblockpage.cxx |    2 +-
>  sw/source/ui/dbui/mmaddressblockpage.hxx |    4 +---
>  2 files changed, 2 insertions(+), 4 deletions(-)
> 
> New commits:
> commit 192edc5e65685a3093d94457dca9db8d3b891486
> Author: Tor Lillqvist <tml at iki.fi>
> Date:   Wed Apr 25 11:42:49 2012 +0300
> 
>     WaE: hides overloaded virtual function

> --- a/sw/source/ui/dbui/mmaddressblockpage.hxx
> +++ b/sw/source/ui/dbui/mmaddressblockpage.hxx
> @@ -168,8 +168,6 @@ class AddressMultiLineEdit : public MultiLineEdit, public SfxListener
>      Link                            m_aSelectionLink;
>      SwCustomizeAddressBlockDialog*  m_pParentDialog;
>  
> -    using Window::Notify;
> -
>      using MultiLineEdit::SetText;
>  
>  protected:
> @@ -178,7 +176,7 @@ public:
>      AddressMultiLineEdit(SwCustomizeAddressBlockDialog* pParent, const ResId& rResId);
>      ~AddressMultiLineEdit();
>  
> -    virtual void    Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
> +    virtual void    NotifyOfHint( SfxBroadcaster& rBC, const SfxHint& rHint );

this is wrong: the method must be called Notify so the SfxBroadcaster
calls it.

if you get a warning "hides overloaded virtual function" here then i
don't understand it because there is an explicit "using Window::Notify"
that should result in that overload _not_ being hidden, so it looks like
a compiler bug to me; unless of course there is a third Notify method
somewhere.

(and let me lament that a language allowing an identifier used both with
overloading and virtual methods is a stupid idea and yields code that is
difficult to understand, no wonder that not even C++ compiler developers
can get it right...)



More information about the LibreOffice mailing list