View | Details | Raw Unified | Return to issue 99010
Collapse All | Expand All

(-)a/toolkit/inc/toolkit/awt/vclxtopwindow.hxx (-1 / +7 lines)
Lines 43-58 Link Here
43
typedef ::cppu::ImplHelper1 <   ::com::sun::star::awt::XSystemDependentWindowPeer
43
typedef ::cppu::ImplHelper1 <   ::com::sun::star::awt::XSystemDependentWindowPeer
44
                            >   VCLXTopWindow_SBase;
44
                            >   VCLXTopWindow_SBase;
45
45
46
class TOOLKIT_DLLPUBLIC VCLXTopWindow_Base  :public VCLXTopWindow_XBase
46
class SAL_DLLPRIVATE VCLXTopWindow_Base  :public VCLXTopWindow_XBase
47
                                            ,public VCLXTopWindow_SBase
47
                                            ,public VCLXTopWindow_SBase
48
{
48
{
49
private:
49
private:
50
    const bool  m_bWHWND;
50
    const bool  m_bWHWND;
51
    ::sal_Bool  m_bHasAWTMenuBar;
51
52
52
protected:
53
protected:
53
  	::com::sun::star::uno::Reference< ::com::sun::star::awt::XMenuBar> mxMenuBar;
54
  	::com::sun::star::uno::Reference< ::com::sun::star::awt::XMenuBar> mxMenuBar;
54
55
55
    bool isSystemDependentWindowPeer() const { return m_bWHWND; }
56
    bool isSystemDependentWindowPeer() const { return m_bWHWND; }
57
    void cleanUpMenuBar();
56
58
57
	virtual ::vos::IMutex& GetMutexImpl() = 0;
59
	virtual ::vos::IMutex& GetMutexImpl() = 0;
58
    virtual Window* GetWindowImpl() = 0;
60
    virtual Window* GetWindowImpl() = 0;
Lines 112-117 Link Here
112
	::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >	SAL_CALL getTypes() throw(::com::sun::star::uno::RuntimeException);
114
	::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >	SAL_CALL getTypes() throw(::com::sun::star::uno::RuntimeException);
113
	::com::sun::star::uno::Sequence< sal_Int8 >						SAL_CALL getImplementationId() throw(::com::sun::star::uno::RuntimeException);
115
	::com::sun::star::uno::Sequence< sal_Int8 >						SAL_CALL getImplementationId() throw(::com::sun::star::uno::RuntimeException);
114
116
117
    // ::com::sun::star::lang::XComponent
118
    virtual void SAL_CALL dispose() throw(::com::sun::star::uno::RuntimeException);
119
120
115
    static void     ImplGetPropertyIds( std::list< sal_uInt16 > &aIds );
121
    static void     ImplGetPropertyIds( std::list< sal_uInt16 > &aIds );
116
    virtual void    GetPropertyIds( std::list< sal_uInt16 > &aIds ) { return ImplGetPropertyIds( aIds ); }
122
    virtual void    GetPropertyIds( std::list< sal_uInt16 > &aIds ) { return ImplGetPropertyIds( aIds ); }
117
};
123
};
(-)a/toolkit/source/awt/vclxtopwindow.cxx (-1 / +26 lines)
Lines 63-69 Link Here
63
using ::com::sun::star::lang::IndexOutOfBoundsException;
63
using ::com::sun::star::lang::IndexOutOfBoundsException;
64
64
65
VCLXTopWindow_Base::VCLXTopWindow_Base( const bool _bSupportSystemWindowPeer )
65
VCLXTopWindow_Base::VCLXTopWindow_Base( const bool _bSupportSystemWindowPeer )
66
    :m_bWHWND( _bSupportSystemWindowPeer )
66
    :m_bWHWND( _bSupportSystemWindowPeer ),
67
    m_bHasAWTMenuBar( sal_False )
67
{
68
{
68
}
69
}
69
70
Lines 180-191 Link Here
180
		{
181
		{
181
			VCLXMenu* pMenu = VCLXMenu::GetImplementation( rxMenu );
182
			VCLXMenu* pMenu = VCLXMenu::GetImplementation( rxMenu );
182
			if ( pMenu && !pMenu->IsPopupMenu() )
183
			if ( pMenu && !pMenu->IsPopupMenu() )
184
            {
183
				pWindow->SetMenuBar( (MenuBar*) pMenu->GetMenu() );
185
				pWindow->SetMenuBar( (MenuBar*) pMenu->GetMenu() );
186
                m_bHasAWTMenuBar = sal_True;
187
            }
184
		}
188
		}
185
	}
189
	}
186
	mxMenuBar = rxMenu;
190
	mxMenuBar = rxMenu;
187
}
191
}
188
192
193
void VCLXTopWindow_Base::cleanUpMenuBar()
194
{
195
    ::vos::OGuard aGuard( GetMutexImpl() );
196
197
    if ( m_bHasAWTMenuBar )
198
    {
199
        SystemWindow* pWindow = (SystemWindow*) GetWindowImpl();
200
        if ( pWindow )
201
        {
202
            pWindow->SetMenuBar( NULL );
203
            m_bHasAWTMenuBar = sal_False;
204
        }
205
    }
206
}
207
189
//--------------------------------------------------------------------
208
//--------------------------------------------------------------------
190
::sal_Bool SAL_CALL VCLXTopWindow_Base::getIsMaximized() throw (RuntimeException)
209
::sal_Bool SAL_CALL VCLXTopWindow_Base::getIsMaximized() throw (RuntimeException)
191
{
210
{
Lines 265-270 Link Here
265
//	class VCLXTopWindow
284
//	class VCLXTopWindow
266
//	----------------------------------------------------
285
//	----------------------------------------------------
267
286
287
void VCLXTopWindow::dispose() throw(::com::sun::star::uno::RuntimeException)
288
{
289
    VCLXTopWindow_Base::cleanUpMenuBar();
290
    VCLXContainer::dispose();
291
}
292
268
void VCLXTopWindow::ImplGetPropertyIds( std::list< sal_uInt16 > &rIds )
293
void VCLXTopWindow::ImplGetPropertyIds( std::list< sal_uInt16 > &rIds )
269
{
294
{
270
    VCLXContainer::ImplGetPropertyIds( rIds );
295
    VCLXContainer::ImplGetPropertyIds( rIds );

Return to issue 99010