Kaydet (Commit) 6fbbb850 authored tarafından Noel Grandin's avatar Noel Grandin

loplugin:mergeclasses

Change-Id: I45ccf880900f46a121c73152615ec3534a47d750
üst b9814736
...@@ -163,7 +163,6 @@ merge dbp::OModuleResourceClient with dbp::OUnoAutoPilot ...@@ -163,7 +163,6 @@ merge dbp::OModuleResourceClient with dbp::OUnoAutoPilot
merge dbtools::ISQLStatementHelper with connectivity::mysql::OTables merge dbtools::ISQLStatementHelper with connectivity::mysql::OTables
merge formula::ExternalReferenceHelper with ScExternalRefManager merge formula::ExternalReferenceHelper with ScExternalRefManager
merge formula::IStructHelper with formula::StructPage merge formula::IStructHelper with formula::StructPage
merge framework::ILayoutNotifications with framework::LayoutManager
merge framework::IListBoxListener with framework::DropdownToolbarController merge framework::IListBoxListener with framework::DropdownToolbarController
merge framework::ISpinfieldListener with framework::SpinfieldToolbarController merge framework::ISpinfieldListener with framework::SpinfieldToolbarController
merge framework::IStorageListener with framework::XMLBasedAcceleratorConfiguration merge framework::IStorageListener with framework::XMLBasedAcceleratorConfiguration
......
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#ifndef INCLUDED_FRAMEWORK_INC_HELPER_ILAYOUTNOTIFICATIONS_HXX
#define INCLUDED_FRAMEWORK_INC_HELPER_ILAYOUTNOTIFICATIONS_HXX
namespace framework
{
class ILayoutNotifications
{
public:
enum Hint
{
HINT_NOT_SPECIFIED,
HINT_TOOLBARSPACE_HAS_CHANGED,
HINT_COUNT
};
virtual void requestLayout( Hint eHint = HINT_NOT_SPECIFIED ) = 0;
protected:
~ILayoutNotifications() {}
};
}
#endif // INCLUDED_FRAMEWORK_INC_HELPER_ILAYOUTNOTIFICATIONS_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -27,7 +27,6 @@ ...@@ -27,7 +27,6 @@
#include <uielement/menubarmanager.hxx> #include <uielement/menubarmanager.hxx>
#include <framework/addonsoptions.hxx> #include <framework/addonsoptions.hxx>
#include <uielement/uielement.hxx> #include <uielement/uielement.hxx>
#include <helper/ilayoutnotifications.hxx>
#include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/lang/XTypeProvider.hpp> #include <com/sun/star/lang/XTypeProvider.hpp>
...@@ -61,6 +60,7 @@ ...@@ -61,6 +60,7 @@
class MenuBar; class MenuBar;
namespace framework namespace framework
{ {
class ToolbarLayoutManager; class ToolbarLayoutManager;
class GlobalSettings; class GlobalSettings;
namespace detail namespace detail
...@@ -75,10 +75,15 @@ namespace framework ...@@ -75,10 +75,15 @@ namespace framework
class LayoutManager : public LayoutManager_Base , class LayoutManager : public LayoutManager_Base ,
private cppu::BaseMutex, private cppu::BaseMutex,
public ::cppu::OBroadcastHelper , public ::cppu::OBroadcastHelper ,
public ILayoutNotifications ,
public LayoutManager_PBase public LayoutManager_PBase
{ {
public: public:
enum Hint
{
HINT_NOT_SPECIFIED,
HINT_TOOLBARSPACE_HAS_CHANGED,
HINT_COUNT
};
enum { DOCKINGAREAS_COUNT = 4 }; enum { DOCKINGAREAS_COUNT = 4 };
LayoutManager( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& xContext ); LayoutManager( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& xContext );
...@@ -171,9 +176,8 @@ namespace framework ...@@ -171,9 +176,8 @@ namespace framework
DECL_LINK_TYPED( MenuBarClose, void *, void); DECL_LINK_TYPED( MenuBarClose, void *, void);
DECL_LINK_TYPED( WindowEventListener, VclWindowEvent&, void ); DECL_LINK_TYPED( WindowEventListener, VclWindowEvent&, void );
// ILayoutNotifications // called from ToolbarLayoutManager
void requestLayout( Hint eHint = HINT_NOT_SPECIFIED );
virtual void requestLayout( Hint eHint ) SAL_OVERRIDE;
/// Reading of settings - shared with ToolbarLayoutManager. /// Reading of settings - shared with ToolbarLayoutManager.
static bool readWindowStateData( const OUString& rName, UIElement& rElementData, static bool readWindowStateData( const OUString& rName, UIElement& rElementData,
......
...@@ -53,7 +53,7 @@ namespace framework ...@@ -53,7 +53,7 @@ namespace framework
ToolbarLayoutManager::ToolbarLayoutManager( ToolbarLayoutManager::ToolbarLayoutManager(
const uno::Reference< uno::XComponentContext >& rxContext, const uno::Reference< uno::XComponentContext >& rxContext,
const uno::Reference< ui::XUIElementFactory >& xUIElementFactory, const uno::Reference< ui::XUIElementFactory >& xUIElementFactory,
ILayoutNotifications* pParentLayouter ): LayoutManager* pParentLayouter ):
m_xContext( rxContext), m_xContext( rxContext),
m_xUIElementFactoryManager( xUIElementFactory ), m_xUIElementFactoryManager( xUIElementFactory ),
m_pParentLayouter( pParentLayouter ), m_pParentLayouter( pParentLayouter ),
...@@ -980,7 +980,7 @@ long ToolbarLayoutManager::childWindowEvent( VclSimpleEvent* pEvent ) ...@@ -980,7 +980,7 @@ long ToolbarLayoutManager::childWindowEvent( VclSimpleEvent* pEvent )
if ( aToolbar.m_xUIElement.is() && !aToolbar.m_bFloating ) if ( aToolbar.m_xUIElement.is() && !aToolbar.m_bFloating )
{ {
implts_setLayoutDirty(); implts_setLayoutDirty();
m_pParentLayouter->requestLayout( ILayoutNotifications::HINT_TOOLBARSPACE_HAS_CHANGED ); m_pParentLayouter->requestLayout( LayoutManager::HINT_TOOLBARSPACE_HAS_CHANGED );
} }
} }
} }
...@@ -3231,7 +3231,7 @@ throw( uno::RuntimeException, std::exception ) ...@@ -3231,7 +3231,7 @@ throw( uno::RuntimeException, std::exception )
} }
if ( bNotify ) if ( bNotify )
m_pParentLayouter->requestLayout( ILayoutNotifications::HINT_TOOLBARSPACE_HAS_CHANGED ); m_pParentLayouter->requestLayout( LayoutManager::HINT_TOOLBARSPACE_HAS_CHANGED );
} }
} }
...@@ -3572,7 +3572,7 @@ throw (uno::RuntimeException, std::exception) ...@@ -3572,7 +3572,7 @@ throw (uno::RuntimeException, std::exception)
aWriteLock.clear(); aWriteLock.clear();
if ( bNotify ) if ( bNotify )
m_pParentLayouter->requestLayout( ILayoutNotifications::HINT_TOOLBARSPACE_HAS_CHANGED ); m_pParentLayouter->requestLayout( LayoutManager::HINT_TOOLBARSPACE_HAS_CHANGED );
} }
sal_Bool SAL_CALL ToolbarLayoutManager::prepareToggleFloatingMode( const lang::EventObject& e ) sal_Bool SAL_CALL ToolbarLayoutManager::prepareToggleFloatingMode( const lang::EventObject& e )
...@@ -3723,11 +3723,11 @@ throw (uno::RuntimeException, std::exception) ...@@ -3723,11 +3723,11 @@ throw (uno::RuntimeException, std::exception)
implts_setLayoutDirty(); implts_setLayoutDirty();
aReadLock.reset(); aReadLock.reset();
ILayoutNotifications* pParentLayouter( m_pParentLayouter ); LayoutManager* pParentLayouter( m_pParentLayouter );
aReadLock.clear(); aReadLock.clear();
if ( pParentLayouter ) if ( pParentLayouter )
pParentLayouter->requestLayout( ILayoutNotifications::HINT_TOOLBARSPACE_HAS_CHANGED ); pParentLayouter->requestLayout( LayoutManager::HINT_TOOLBARSPACE_HAS_CHANGED );
} }
} }
else else
...@@ -3787,11 +3787,11 @@ throw (uno::RuntimeException, std::exception) ...@@ -3787,11 +3787,11 @@ throw (uno::RuntimeException, std::exception)
SolarMutexClearableGuard aReadLock; SolarMutexClearableGuard aReadLock;
bool bLayoutDirty = m_bLayoutDirty; bool bLayoutDirty = m_bLayoutDirty;
ILayoutNotifications* pParentLayouter( m_pParentLayouter ); LayoutManager* pParentLayouter( m_pParentLayouter );
aWriteLock.clear(); aWriteLock.clear();
if ( bLayoutDirty && pParentLayouter ) if ( bLayoutDirty && pParentLayouter )
pParentLayouter->requestLayout( ILayoutNotifications::HINT_TOOLBARSPACE_HAS_CHANGED ); pParentLayouter->requestLayout( LayoutManager::HINT_TOOLBARSPACE_HAS_CHANGED );
} }
} }
...@@ -3940,11 +3940,11 @@ throw (uno::RuntimeException, std::exception) ...@@ -3940,11 +3940,11 @@ throw (uno::RuntimeException, std::exception)
SolarMutexClearableGuard aWriteLock; SolarMutexClearableGuard aWriteLock;
bool bNotify = !aUIElement.m_bFloating; bool bNotify = !aUIElement.m_bFloating;
m_bLayoutDirty = bNotify; m_bLayoutDirty = bNotify;
ILayoutNotifications* pParentLayouter( m_pParentLayouter ); LayoutManager* pParentLayouter( m_pParentLayouter );
aWriteLock.clear(); aWriteLock.clear();
if ( bNotify && pParentLayouter ) if ( bNotify && pParentLayouter )
pParentLayouter->requestLayout( ILayoutNotifications::HINT_TOOLBARSPACE_HAS_CHANGED ); pParentLayouter->requestLayout( LayoutManager::HINT_TOOLBARSPACE_HAS_CHANGED );
} }
} }
} }
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
#include <uiconfiguration/globalsettings.hxx> #include <uiconfiguration/globalsettings.hxx>
#include <framework/addonsoptions.hxx> #include <framework/addonsoptions.hxx>
#include <uielement/uielement.hxx> #include <uielement/uielement.hxx>
#include <helper/ilayoutnotifications.hxx> #include <services/layoutmanager.hxx>
#include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/lang/XTypeProvider.hpp> #include <com/sun/star/lang/XTypeProvider.hpp>
...@@ -74,7 +74,7 @@ class ToolbarLayoutManager : public ::cppu::WeakImplHelper< ::com::sun::star::aw ...@@ -74,7 +74,7 @@ class ToolbarLayoutManager : public ::cppu::WeakImplHelper< ::com::sun::star::aw
ToolbarLayoutManager( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext, ToolbarLayoutManager( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext,
const ::com::sun::star::uno::Reference< ::com::sun::star::ui::XUIElementFactory >& xUIElementFactory, const ::com::sun::star::uno::Reference< ::com::sun::star::ui::XUIElementFactory >& xUIElementFactory,
ILayoutNotifications* pParentLayouter ); LayoutManager* pParentLayouter );
virtual ~ToolbarLayoutManager(); virtual ~ToolbarLayoutManager();
void reset(); void reset();
...@@ -274,7 +274,7 @@ class ToolbarLayoutManager : public ::cppu::WeakImplHelper< ::com::sun::star::aw ...@@ -274,7 +274,7 @@ class ToolbarLayoutManager : public ::cppu::WeakImplHelper< ::com::sun::star::aw
css::uno::Reference< ::com::sun::star::ui::XUIConfigurationManager > m_xModuleCfgMgr; css::uno::Reference< ::com::sun::star::ui::XUIConfigurationManager > m_xModuleCfgMgr;
css::uno::Reference< ::com::sun::star::ui::XUIConfigurationManager > m_xDocCfgMgr; css::uno::Reference< ::com::sun::star::ui::XUIConfigurationManager > m_xDocCfgMgr;
css::uno::Reference< ::com::sun::star::container::XNameAccess > m_xPersistentWindowState; css::uno::Reference< ::com::sun::star::container::XNameAccess > m_xPersistentWindowState;
ILayoutNotifications* m_pParentLayouter; LayoutManager* m_pParentLayouter;
UIElementVector m_aUIElements; UIElementVector m_aUIElements;
UIElement m_aDockUIElement; UIElement m_aDockUIElement;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment