From 2b1c9f5c63f4d90db0137b1c8c91340bb2559115 Mon Sep 17 00:00:00 2001 From: Carsten Driesner Date: Tue, 22 Jun 2010 11:12:01 +0200 Subject: dockingwindows: #i112595# First refactoring version of the layout manager including skeleton classes for new docking windows --- framework/inc/services.h | 4 + framework/inc/services/layoutmanager.hxx | 140 +++------------------------ framework/inc/services/modelwinservice.hxx | 122 ++++++++++++++++++++++++ framework/inc/uielement/panelwindow.hxx | 81 ++++++++++++++++ framework/inc/uielement/panelwrapper.hxx | 70 ++++++++++++++ framework/inc/uielement/uielement.hxx | 146 +++++++++++++++++++++++++++++ 6 files changed, 438 insertions(+), 125 deletions(-) create mode 100755 framework/inc/services/modelwinservice.hxx create mode 100755 framework/inc/uielement/panelwindow.hxx create mode 100755 framework/inc/uielement/panelwrapper.hxx create mode 100755 framework/inc/uielement/uielement.hxx (limited to 'framework/inc') diff --git a/framework/inc/services.h b/framework/inc/services.h index 9c19f8b6251e..bdd6221eff9c 100644 --- a/framework/inc/services.h +++ b/framework/inc/services.h @@ -125,6 +125,8 @@ namespace framework{ #define SERVICENAME_TABWINDOWSERVICE DECLARE_ASCII("com.sun.star.ui.dialogs.TabContainerWindow" ) #define SERVICENAME_WINDOWCONTENTFACTORYMANAGER DECLARE_ASCII("com.sun.star.ui.WindowContentFactoryManager" ) #define SERVICENAME_DISPLAYACCESS DECLARE_ASCII("com.sun.star.awt.DisplayAccess" ) +#define SERVICENAME_PANELFACTORY DECLARE_ASCII("com.sun.star.ui.PanelFactory" ) +#define SERVICENAME_MODELWINSERVICE DECLARE_ASCII("com.sun.star.ui.ModelWinService" ) //_________________________________________________________________________________________________________________ // used implementationnames by framework @@ -211,6 +213,8 @@ namespace framework{ #define IMPLEMENTATIONNAME_IMAGEMANAGER DECLARE_ASCII("com.sun.star.comp.framework.ImageManager" ) #define IMPLEMENTATIONNAME_TABWINDOWSERVICE DECLARE_ASCII("com.sun.star.comp.framework.TabWindowService" ) #define IMPLEMENTATIONNAME_WINDOWCONTENTFACTORYMANAGER DECLARE_ASCII("com.sun.star.comp.framework.WindowContentFactoryManager" ) +#define IMPLEMENTATIONNAME_PANELFACTORY DECLARE_ASCII("com.sun.star.comp.framework.PanelFactory" ) +#define IMPLEMENTATIONNAME_MODELWINSERVICE DECLARE_ASCII("com.sun.star.comp.framework.ModelWinService" ) } // namespace framework diff --git a/framework/inc/services/layoutmanager.hxx b/framework/inc/services/layoutmanager.hxx index 2ccba9e7ffde..898d1c240b2b 100644 --- a/framework/inc/services/layoutmanager.hxx +++ b/framework/inc/services/layoutmanager.hxx @@ -6,6 +6,9 @@ * * OpenOffice.org - a multi-platform office productivity suite * + * $RCSfile: layoutmanager.hxx,v $ + * $Revision: 1.34 $ + * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -50,6 +53,8 @@ #include #include #include +#include +#include //_________________________________________________________________________________________________________________ // interface includes @@ -87,6 +92,8 @@ class MenuBar; namespace framework { + class ToolbarLayoutManager; + class PanelManager; class GlobalSettings; typedef ::cppu::WeakImplHelper9 < ::com::sun::star::lang::XServiceInfo , ::com::sun::star::frame::XLayoutManager @@ -233,101 +240,19 @@ namespace framework sal_Int16 m_nLines; sal_Bool m_bIsHorizontal; }; - struct SingleRowColumnWindowData - { - SingleRowColumnWindowData() : nVarSize( 0 ), nStaticSize( 0 ), nSpace( 0 ) {} - - std::vector< rtl::OUString > aUIElementNames; - std::vector< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > > aRowColumnWindows; - std::vector< ::com::sun::star::awt::Rectangle > aRowColumnWindowSizes; - std::vector< sal_Int32 > aRowColumnSpace; - ::com::sun::star::awt::Rectangle aRowColumnRect; - sal_Int32 nVarSize; - sal_Int32 nStaticSize; - sal_Int32 nSpace; - sal_Int32 nRowColumn; - }; protected: DECL_LINK( AsyncLayoutHdl, Timer * ); private: - enum DockingOperation - { - DOCKOP_BEFORE_COLROW, - DOCKOP_ON_COLROW, - DOCKOP_AFTER_COLROW - }; - struct UIElement - { - UIElement() : m_bFloating( sal_False ), - m_bVisible( sal_True ), - m_bUserActive( sal_False ), - m_bCreateNewRowCol0( sal_False ), - m_bDeactiveHide( sal_False ), - m_bMasterHide( sal_False ), - m_bContextSensitive( sal_False ), - m_bContextActive( sal_True ), - m_bNoClose( sal_False ), - m_bSoftClose( sal_False ), - m_bStateRead( sal_False ), - m_nStyle( BUTTON_SYMBOL ) - {} - - UIElement( const rtl::OUString& rName, - const rtl::OUString& rType, - const com::sun::star::uno::Reference< ::com::sun::star::ui::XUIElement >& rUIElement, - sal_Bool bFloating = sal_False - ) : m_aType( rType ), - m_aName( rName ), - m_xUIElement( rUIElement ), - m_bFloating( bFloating ), - m_bVisible( sal_True ), - m_bUserActive( sal_False ), - m_bCreateNewRowCol0( sal_False ), - m_bDeactiveHide( sal_False ), - m_bMasterHide( sal_False ), - m_bContextSensitive( sal_False ), - m_bContextActive( sal_True ), - m_bNoClose( sal_False ), - m_bSoftClose( sal_False ), - m_bStateRead( sal_False ), - m_nStyle( BUTTON_SYMBOL ) {} - - bool operator< ( const UIElement& aUIElement ) const; - UIElement& operator=( const UIElement& rUIElement ); - - rtl::OUString m_aType; - rtl::OUString m_aName; - rtl::OUString m_aUIName; - com::sun::star::uno::Reference< ::com::sun::star::ui::XUIElement > m_xUIElement; - sal_Bool m_bFloating, - m_bVisible, - m_bUserActive, - m_bCreateNewRowCol0, - m_bDeactiveHide, - m_bMasterHide, - m_bContextSensitive, - m_bContextActive; - sal_Bool m_bNoClose, - m_bSoftClose, - m_bStateRead; - sal_Int16 m_nStyle; - DockedData m_aDockedData; - FloatingData m_aFloatingData; - }; - typedef std::vector< UIElement > UIElementVector; - //--------------------------------------------------------------------------------------------------------- - // helper - //--------------------------------------------------------------------------------------------------------- - //--------------------------------------------------------------------------------------------------------- // helper //--------------------------------------------------------------------------------------------------------- void impl_clearUpMenuBar(); void implts_reset( sal_Bool bAttach ); + void implts_setMenuBarCloser(sal_Bool bCloserState); void implts_updateMenuBarClose(); sal_Bool implts_resetMenuBar(); @@ -347,60 +272,25 @@ namespace framework void implts_setElementData( UIElement& rUIElement, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XDockableWindow >& rDockWindow ); void implts_sortUIElements(); void implts_destroyElements(); - void implts_destroyDockingAreaWindows(); - void implts_createAddonsToolBars(); - void implts_createCustomToolBars(); - void implts_createNonContextSensitiveToolBars(); - void implts_createCustomToolBars( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > >& aCustomTbxSeq ); - void implts_createCustomToolBar( const rtl::OUString& aTbxResName, const rtl::OUString& aTitle ); void implts_toggleFloatingUIElementsVisibility( sal_Bool bActive ); void implts_reparentChildWindows(); + ::com::sun::star::uno::Reference< ::com::sun::star::ui::XUIElement > implts_createDockingWindow( const ::rtl::OUString& aElementName ); sal_Bool implts_isEmbeddedLayoutManager() const; sal_Int16 implts_getCurrentSymbolsSize(); sal_Int16 implts_getCurrentSymbolsStyle(); - ::com::sun::star::uno::Reference< com::sun::star::awt::XWindowPeer > implts_createToolkitWindow( const ::com::sun::star::uno::Reference< com::sun::star::awt::XWindowPeer >& rParent ); ::com::sun::star::uno::Reference< ::com::sun::star::ui::XUIElement > implts_createElement( const rtl::OUString& aName ); - rtl::OUString implts_generateGenericAddonToolbarTitle( sal_Int32 nNumber ) const; - - // docking methods - ::Rectangle implts_calcHotZoneRect( const ::Rectangle& rRect, sal_Int32 nHotZoneOffset ); - void implts_calcDockingPosSize( UIElement& aUIElement, DockingOperation& eDockOperation, ::Rectangle& rTrackingRect, const Point& rMousePos ); - DockingOperation implts_determineDockingOperation( ::com::sun::star::ui::DockingArea DockingArea, const ::Rectangle& rRowColRect, const Point& rMousePos ); - ::Rectangle implts_getWindowRectFromRowColumn( ::com::sun::star::ui::DockingArea DockingArea, const SingleRowColumnWindowData& rRowColumnWindowData, const ::Point& rMousePos, const rtl::OUString& rExcludeElementName ); - ::Rectangle implts_determineFrontDockingRect( ::com::sun::star::ui::DockingArea eDockingArea, - sal_Int32 nRowCol, - const ::Rectangle& rDockedElementRect, - const ::rtl::OUString& rMovedElementName, - const ::Rectangle& rMovedElementRect ); - void implts_calcWindowPosSizeOnSingleRowColumn( sal_Int32 nDockingArea, - sal_Int32 nOffset, - SingleRowColumnWindowData& rRowColumnWindowData, - const ::Size& rContainerSize ); - ::Rectangle implts_calcTrackingAndElementRect( ::com::sun::star::ui::DockingArea eDockingArea, - sal_Int32 nRowCol, - UIElement& rUIElement, - const ::Rectangle& rTrackingRect, - const ::Rectangle& rRowColumnRect, - const ::Size& rContainerWinSize ); - void implts_renumberRowColumnData( ::com::sun::star::ui::DockingArea eDockingArea, DockingOperation eDockingOperation, const UIElement& rUIElement ); // layouting methods sal_Bool implts_compareRectangles( const ::com::sun::star::awt::Rectangle& rRect1, const ::com::sun::star::awt::Rectangle& rRect2 ); sal_Bool implts_resizeContainerWindow( const ::com::sun::star::awt::Size& rContainerSize, const ::com::sun::star::awt::Point& rComponentPos ); ::Size implts_getTopBottomDockingAreaSizes(); ::Size implts_getContainerWindowOutputSize(); - ::com::sun::star::awt::Rectangle implts_getDockingAreaWindowSizes(); - void implts_getDockingAreaElementInfos( ::com::sun::star::ui::DockingArea DockingArea, std::vector< SingleRowColumnWindowData >& rRowColumnsWindowData ); - void implts_getDockingAreaElementInfoOnSingleRowCol( ::com::sun::star::ui::DockingArea, - sal_Int32 nRowCol, - SingleRowColumnWindowData& rRowColumnWindowData ); - ::Point implts_findNextCascadeFloatingPos(); - void implts_findNextDockingPos( ::com::sun::star::ui::DockingArea DockingArea, const ::Size& aUIElementSize, ::Point& rVirtualPos, ::Point& rPixelPos ); + + void implts_setDockingAreaWindowSizes( const css::awt::Rectangle& rBorderSpace ); ::com::sun::star::awt::Rectangle implts_calcDockingAreaSizes(); - void implts_setDockingAreaWindowSizes( const com::sun::star::awt::Rectangle& rBorderSpace ); sal_Bool implts_doLayout( sal_Bool bForceRequestBorderSpace, sal_Bool bOuterResize ); - void implts_doLayout_notify( sal_Bool bOuterResize ); + void implts_doLayout_notify( sal_Bool bOuterResize ); // internal methods to control status/progress bar ::Size implts_getStatusBarSize(); @@ -425,8 +315,6 @@ namespace framework void implts_setVisibleState( sal_Bool bShow ); void implts_updateUIElementsVisibleState( sal_Bool bShow ); void implts_setCurrentUIVisibility( sal_Bool bShow ); - sal_Bool impl_parseResourceURL( const rtl::OUString aResourceURL, rtl::OUString& aElementType, rtl::OUString& aElementName ); - void implts_notifyListeners( short nEvent, ::com::sun::star::uno::Any aInfoParam ); #ifdef DBG_UTIL void implts_checkElementContainer(); @@ -476,7 +364,6 @@ namespace framework bool m_bHideCurrentUI; bool m_bGlobalSettings; bool m_bPreserveContentSize; - DockingOperation m_eDockOperation; UIElement m_aDockUIElement; css::awt::Rectangle m_aDockingArea; css::uno::Reference< ::com::sun::star::ui::XDockingAreaAcceptor > m_xDockingAreaAcceptor; @@ -515,6 +402,9 @@ namespace framework sal_Int16 m_eSymbolsStyle; Timer m_aAsyncLayoutTimer; ::cppu::OMultiTypeInterfaceContainerHelper m_aListenerContainer; // container for ALL Listener + PanelManager* m_pPanelManager; + ToolbarLayoutManager* m_pToolbarManager; + css::uno::Reference< ::com::sun::star::awt::XDockableWindowListener > m_xToolbarManager; }; } // namespace framework diff --git a/framework/inc/services/modelwinservice.hxx b/framework/inc/services/modelwinservice.hxx new file mode 100755 index 000000000000..7e07fcb0cd37 --- /dev/null +++ b/framework/inc/services/modelwinservice.hxx @@ -0,0 +1,122 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: urltransformer.hxx,v $ + * $Revision: 1.8 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef __FRAMEWORK_SERVICES_MODELWINSERVICE_HXX_ +#define __FRAMEWORK_SERVICES_MODELWINSERVICE_HXX_ + +//_________________________________________________________________________________________________________________ +// my own includes +//_________________________________________________________________________________________________________________ + +#include +#include +#include +#include +#include +#include +#include +#include + +//_________________________________________________________________________________________________________________ +// interface includes +//_________________________________________________________________________________________________________________ + +#include +#include +#include +#include +#include + +//_________________________________________________________________________________________________________________ +// other includes +//_________________________________________________________________________________________________________________ + +#include +#include + +//_________________________________________________________________________________________________________________ +// namespace +//_________________________________________________________________________________________________________________ + +namespace framework{ + +class IModelWin +{ + public: + virtual void registerModelForXWindow( const css::uno::Reference< css::awt::XWindow >& rWindow, const css::uno::Reference< css::awt::XControlModel >& rModel ) = 0; + virtual void deregisterModelForXWindow( const css::uno::Reference< css::awt::XWindow >& rWindow ) = 0; +}; + +class ModelWinService : public css::lang::XTypeProvider + , public css::lang::XServiceInfo + , public css::container::XNameAccess + , public IModelWin + , public ::cppu::OWeakObject +{ + public: + ModelWinService(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& rServiceManager ); + virtual ~ModelWinService(); + + //--------------------------------------------------------------------------------------------------------- + // XInterface, XTypeProvider, XServiceInfo + //--------------------------------------------------------------------------------------------------------- + + FWK_DECLARE_XINTERFACE + FWK_DECLARE_XTYPEPROVIDER + DECLARE_XSERVICEINFO + + //--------------------------------------------------------------------------------------------------------- + // IModelWin + //--------------------------------------------------------------------------------------------------------- + virtual void registerModelForXWindow( const css::uno::Reference< css::awt::XWindow >& rWindow, const css::uno::Reference< css::awt::XControlModel >& rModel ); + virtual void deregisterModelForXWindow( const css::uno::Reference< css::awt::XWindow >& rWindow ); + + //--------------------------------------------------------------------------------------------------------- + // XNameAccess + //--------------------------------------------------------------------------------------------------------- + virtual css::uno::Any SAL_CALL getByName( const ::rtl::OUString& sName ) throw( css::container::NoSuchElementException , + css::lang::WrappedTargetException , + css::uno::RuntimeException ); + virtual css::uno::Sequence< ::rtl::OUString > SAL_CALL getElementNames() throw( css::uno::RuntimeException ); + virtual sal_Bool SAL_CALL hasByName( const ::rtl::OUString& sName ) throw( css::uno::RuntimeException ); + + //--------------------------------------------------------------------------------------------------------- + // XElementAccess + //--------------------------------------------------------------------------------------------------------- + virtual css::uno::Type SAL_CALL getElementType() throw( css::uno::RuntimeException ); + virtual sal_Bool SAL_CALL hasElements() throw( css::uno::RuntimeException ); + + private: + css::uno::Reference< css::lang::XMultiServiceFactory > m_xServiceManager; +}; + +} + +#endif // __FRAMEWORK_SERVICES_MODELWINSERVICE_HXX_ diff --git a/framework/inc/uielement/panelwindow.hxx b/framework/inc/uielement/panelwindow.hxx new file mode 100755 index 000000000000..e1b8ae2abcc7 --- /dev/null +++ b/framework/inc/uielement/panelwindow.hxx @@ -0,0 +1,81 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: layoutmanager.hxx,v $ + * $Revision: 1.34 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef __FRAMEWORK_LAYOUTMANAGER_PANELWINDOW_HXX_ +#define __FRAMEWORK_LAYOUTMANAGER_PANELWINDOW_HXX_ + +//_________________________________________________________________________________________________________________ +// my own includes +//_________________________________________________________________________________________________________________ + +#include + +//_________________________________________________________________________________________________________________ +// namespace +//_________________________________________________________________________________________________________________ + +namespace framework +{ + +class PanelWindow : public DockingWindow +{ + public: + PanelWindow( Window* pParent, WinBits nWinBits =0); + virtual ~PanelWindow(); + + const ::rtl::OUString& getResourceURL() const; + void setResourceURL(const ::rtl::OUString& rResourceURL); + Window* getContentWindow() const; + void setContentWindow( Window* pContentWindow ); + + virtual void Command ( const CommandEvent& rCEvt ); + virtual void StateChanged( StateChangedType nType ); + virtual void DataChanged( const DataChangedEvent& rDCEvt ); + virtual void Resize(); + + // Provide additional handlers to support external implementations + void SetCommandHdl( const Link& aLink ) { m_aCommandHandler = aLink; } + const Link& GetCommandHdl() const { return m_aCommandHandler; } + void SetStateChangedHdl( const Link& aLink ) { m_aStateChangedHandler = aLink; } + const Link& GetStateChangedHdl() const { return m_aStateChangedHandler; } + void SetDataChangedHdl( const Link& aLink ) { m_aDataChangedHandler = aLink; } + const Link& GetDataChangedHdl() { return m_aDataChangedHandler; } + + private: + ::rtl::OUString m_aResourceURL; + Link m_aCommandHandler; + Link m_aStateChangedHandler; + Link m_aDataChangedHandler; + Window* m_pContentWindow; +}; + +} + +#endif // __FRAMEWORK_UIELEMENT_PANELWINDOW_HXX_ diff --git a/framework/inc/uielement/panelwrapper.hxx b/framework/inc/uielement/panelwrapper.hxx new file mode 100755 index 000000000000..c3f72140ad59 --- /dev/null +++ b/framework/inc/uielement/panelwrapper.hxx @@ -0,0 +1,70 @@ + + +#ifndef __FRAMEWORK_UIELEMENT_PANELWRAPPER_HXX_ +#define __FRAMEWORK_UIELEMENT_PANELWRAPPER_HXX_ + +//_________________________________________________________________________________________________________________ +// my own includes +//_________________________________________________________________________________________________________________ + +#include + +//_________________________________________________________________________________________________________________ +// interface includes +//_________________________________________________________________________________________________________________ + +#include +#include +#include + +//_________________________________________________________________________________________________________________ +// other includes +//_________________________________________________________________________________________________________________ + +namespace framework +{ + +class PanelWrapper : public UIElementWrapperBase +{ + public: + PanelWrapper( const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& xServiceManager ); + virtual ~PanelWrapper(); + + // XInterface + virtual void SAL_CALL acquire() throw(); + virtual void SAL_CALL release() throw(); + virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw( ::com::sun::star::uno::RuntimeException ); + + // XComponent + virtual void SAL_CALL dispose() throw (::com::sun::star::uno::RuntimeException); + + // XInitialization + virtual void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments ) throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException); + + // XUIElement + virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL getRealInterface() throw (::com::sun::star::uno::RuntimeException); + + // XUpdatable + virtual void SAL_CALL update() throw (::com::sun::star::uno::RuntimeException); + + // XEventListener + using cppu::OPropertySetHelper::disposing; + virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& aEvent ) throw (::com::sun::star::uno::RuntimeException); + + ::rtl::OUString getResourceURL() { return m_aResourceURL; } + + //------------------------------------------------------------------------------------------------------------- + // protected methods + //------------------------------------------------------------------------------------------------------------- + protected: + virtual void SAL_CALL setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const com::sun::star::uno::Any& aValue ) throw( com::sun::star::uno::Exception ); + + private: + com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > m_xServiceManager; + com::sun::star::uno::Reference< com::sun::star::awt::XWindow > m_xPanelWindow; + bool m_bNoClose; +}; + +} + +#endif // __FRAMEWORK_UIELEMENT_PANELWRAPPER_HXX_ diff --git a/framework/inc/uielement/uielement.hxx b/framework/inc/uielement/uielement.hxx new file mode 100755 index 000000000000..98e65d5c5a93 --- /dev/null +++ b/framework/inc/uielement/uielement.hxx @@ -0,0 +1,146 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: layoutmanager.hxx,v $ + * $Revision: 1.34 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef __FRAMEWORK_LAYOUTMANAGER_UIELEMENT_HXX_ +#define __FRAMEWORK_LAYOUTMANAGER_UIELEMENT_HXX_ + +//_________________________________________________________________________________________________________________ +// my own includes +//_________________________________________________________________________________________________________________ + +//_________________________________________________________________________________________________________________ +// interface includes +//_________________________________________________________________________________________________________________ + +#include +#include + +//_________________________________________________________________________________________________________________ +// other includes +//_________________________________________________________________________________________________________________ + +#include +#include + +//_________________________________________________________________________________________________________________ +// namespace +//_________________________________________________________________________________________________________________ + +namespace framework +{ + +struct DockedData +{ + DockedData() : m_aPos( LONG_MAX, LONG_MAX ), + m_nDockedArea( ::com::sun::star::ui::DockingArea_DOCKINGAREA_TOP ), + m_bLocked( sal_False ) {} + + Point m_aPos; + Size m_aSize; + sal_Int16 m_nDockedArea; + sal_Bool m_bLocked; +}; + +struct FloatingData +{ + FloatingData() : m_aPos( LONG_MAX, LONG_MAX ), + m_nLines( 1 ), + m_bIsHorizontal( sal_True ) {} + + Point m_aPos; + Size m_aSize; + sal_Int16 m_nLines; + sal_Bool m_bIsHorizontal; +}; + +struct UIElement +{ + UIElement() : m_bFloating( sal_False ), + m_bVisible( sal_True ), + m_bUserActive( sal_False ), + m_bCreateNewRowCol0( sal_False ), + m_bDeactiveHide( sal_False ), + m_bMasterHide( sal_False ), + m_bContextSensitive( sal_False ), + m_bContextActive( sal_True ), + m_bNoClose( sal_False ), + m_bSoftClose( sal_False ), + m_bStateRead( sal_False ), + m_nStyle( BUTTON_SYMBOL ) + {} + + UIElement( const rtl::OUString& rName, + const rtl::OUString& rType, + const com::sun::star::uno::Reference< ::com::sun::star::ui::XUIElement >& rUIElement, + sal_Bool bFloating = sal_False + ) : m_aType( rType ), + m_aName( rName ), + m_xUIElement( rUIElement ), + m_bFloating( bFloating ), + m_bVisible( sal_True ), + m_bUserActive( sal_False ), + m_bCreateNewRowCol0( sal_False ), + m_bDeactiveHide( sal_False ), + m_bMasterHide( sal_False ), + m_bContextSensitive( sal_False ), + m_bContextActive( sal_True ), + m_bNoClose( sal_False ), + m_bSoftClose( sal_False ), + m_bStateRead( sal_False ), + m_nStyle( BUTTON_SYMBOL ) {} + + bool operator< ( const UIElement& aUIElement ) const; + UIElement& operator=( const UIElement& rUIElement ); + + rtl::OUString m_aType; + rtl::OUString m_aName; + rtl::OUString m_aUIName; + com::sun::star::uno::Reference< ::com::sun::star::ui::XUIElement > m_xUIElement; + sal_Bool m_bFloating, + m_bVisible, + m_bUserActive, + m_bCreateNewRowCol0, + m_bDeactiveHide, + m_bMasterHide, + m_bContextSensitive, + m_bContextActive; + sal_Bool m_bNoClose, + m_bSoftClose, + m_bStateRead; + sal_Int16 m_nStyle; + DockedData m_aDockedData; + FloatingData m_aFloatingData; +}; + +typedef std::vector< UIElement > UIElementVector; + +} // namespace framework + +#endif // __FRAMEWORK_LAYOUTMANAGER_UIELEMENT_HXX_ -- cgit From dfc90a5e05629e4ca182e8edee5948a4edcab54d Mon Sep 17 00:00:00 2001 From: Carsten Driesner Date: Mon, 28 Jun 2010 11:04:16 +0200 Subject: dockingwindows: #i122595# Remove getResourceURL call from PanelWrapper class --- framework/inc/uielement/panelwrapper.hxx | 2 -- 1 file changed, 2 deletions(-) (limited to 'framework/inc') diff --git a/framework/inc/uielement/panelwrapper.hxx b/framework/inc/uielement/panelwrapper.hxx index c3f72140ad59..348fd679db9f 100755 --- a/framework/inc/uielement/panelwrapper.hxx +++ b/framework/inc/uielement/panelwrapper.hxx @@ -51,8 +51,6 @@ class PanelWrapper : public UIElementWrapperBase using cppu::OPropertySetHelper::disposing; virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& aEvent ) throw (::com::sun::star::uno::RuntimeException); - ::rtl::OUString getResourceURL() { return m_aResourceURL; } - //------------------------------------------------------------------------------------------------------------- // protected methods //------------------------------------------------------------------------------------------------------------- -- cgit From 06513cd01e1db6ca7ab4f9b05aff22d5c0f1b048 Mon Sep 17 00:00:00 2001 From: Carsten Driesner Date: Fri, 24 Sep 2010 16:25:13 +0200 Subject: dockingwindows: Fixed many issues regarding the layout manager rework --- framework/inc/helper/ilayoutnotifications.hxx | 52 +++++++++++++++++++++++++++ framework/inc/services/layoutmanager.hxx | 8 ++++- 2 files changed, 59 insertions(+), 1 deletion(-) create mode 100755 framework/inc/helper/ilayoutnotifications.hxx (limited to 'framework/inc') diff --git a/framework/inc/helper/ilayoutnotifications.hxx b/framework/inc/helper/ilayoutnotifications.hxx new file mode 100755 index 000000000000..db63ea15c7b4 --- /dev/null +++ b/framework/inc/helper/ilayoutnotifications.hxx @@ -0,0 +1,52 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: layoutmanager.hxx,v $ + * $Revision: 1.34 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef __FRAMEWORK_LAYOUTMANAGER_ILAYOUTNOTIFICATIONS_HXX_ +#define __FRAMEWORK_LAYOUTMANAGER_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; +}; + +} + +#endif // __FRAMEWORK_LAYOUTMANAGER_ILAYOUTNOTIFICATIONS_HXX_ diff --git a/framework/inc/services/layoutmanager.hxx b/framework/inc/services/layoutmanager.hxx index 898d1c240b2b..6fcd1e18488c 100644 --- a/framework/inc/services/layoutmanager.hxx +++ b/framework/inc/services/layoutmanager.hxx @@ -55,6 +55,7 @@ #include #include #include +#include //_________________________________________________________________________________________________________________ // interface includes @@ -111,6 +112,7 @@ namespace framework // Order is neccessary for right initialization! private ThreadHelpBase , // Struct for right initalization of mutex member! Must be first of baseclasses. public ::cppu::OBroadcastHelper , + public ILayoutNotifications , public LayoutManager_PBase { public: @@ -218,6 +220,11 @@ namespace framework DECL_LINK( MenuBarClose, MenuBar * ); DECL_LINK( WindowEventListener, VclSimpleEvent* ); + //--------------------------------------------------------------------------------------------------------- + // ILayoutNotifications + //--------------------------------------------------------------------------------------------------------- + virtual void requestLayout( Hint eHint ); + struct DockedData { DockedData() : m_aPos( LONG_MAX, LONG_MAX ), @@ -282,7 +289,6 @@ namespace framework ::com::sun::star::uno::Reference< ::com::sun::star::ui::XUIElement > implts_createElement( const rtl::OUString& aName ); // layouting methods - sal_Bool implts_compareRectangles( const ::com::sun::star::awt::Rectangle& rRect1, const ::com::sun::star::awt::Rectangle& rRect2 ); sal_Bool implts_resizeContainerWindow( const ::com::sun::star::awt::Size& rContainerSize, const ::com::sun::star::awt::Point& rComponentPos ); ::Size implts_getTopBottomDockingAreaSizes(); ::Size implts_getContainerWindowOutputSize(); -- cgit From 97fbd5818c12faca18c9b28546e8a6b82ba76994 Mon Sep 17 00:00:00 2001 From: Carsten Driesner Date: Mon, 27 Sep 2010 18:52:02 +0200 Subject: dockingwindows: Fix further problems - moved more code from general layout manager to toolbar specific part --- framework/inc/services/layoutmanager.hxx | 1 + 1 file changed, 1 insertion(+) (limited to 'framework/inc') diff --git a/framework/inc/services/layoutmanager.hxx b/framework/inc/services/layoutmanager.hxx index 6fcd1e18488c..48bca97bdb71 100644 --- a/framework/inc/services/layoutmanager.hxx +++ b/framework/inc/services/layoutmanager.hxx @@ -311,6 +311,7 @@ namespace framework sal_Bool implts_showProgressBar(); sal_Bool implts_hideProgressBar(); void implts_backupProgressBarWrapper(); + void implts_setOffset( const sal_Int32 nBottomOffset ); void implts_setInplaceMenuBar( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess >& xMergedMenuBar ) -- cgit From 3dc5bef2459e2d8981a06cb9d69a4481bcd91dbd Mon Sep 17 00:00:00 2001 From: Carsten Driesner Date: Thu, 7 Oct 2010 16:33:21 +0200 Subject: dockingwindows: More code rework to prepare LayoutManager to control more ui element types. Move more code to other ui element type specific classes --- framework/inc/services/layoutmanager.hxx | 77 +++++++------------------------- 1 file changed, 17 insertions(+), 60 deletions(-) (limited to 'framework/inc') diff --git a/framework/inc/services/layoutmanager.hxx b/framework/inc/services/layoutmanager.hxx index 48bca97bdb71..ef827e7e85b9 100644 --- a/framework/inc/services/layoutmanager.hxx +++ b/framework/inc/services/layoutmanager.hxx @@ -82,7 +82,7 @@ // other includes //_________________________________________________________________________________________________________________ #include -#include +#include #include #include #include @@ -96,13 +96,12 @@ namespace framework class ToolbarLayoutManager; class PanelManager; class GlobalSettings; - typedef ::cppu::WeakImplHelper9 < ::com::sun::star::lang::XServiceInfo + typedef ::cppu::WeakImplHelper8 < ::com::sun::star::lang::XServiceInfo , ::com::sun::star::frame::XLayoutManager , ::com::sun::star::awt::XWindowListener , ::com::sun::star::frame::XFrameActionListener , ::com::sun::star::ui::XUIConfigurationListener , ::com::sun::star::frame::XInplaceLayout - , ::com::sun::star::awt::XDockableWindowListener , ::com::sun::star::frame::XMenuBarMergingAcceptor , ::com::sun::star::frame::XLayoutManagerEventBroadcaster > LayoutManager_Base; @@ -130,7 +129,7 @@ namespace framework // XLayoutManager //--------------------------------------------------------------------------------------------------------- virtual void SAL_CALL attachFrame( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& Frame ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL reset( ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL reset() throw (::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::awt::Rectangle SAL_CALL getCurrentDockingArea( ) throw (::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::uno::Reference< ::com::sun::star::ui::XDockingAreaAcceptor > SAL_CALL getDockingAreaAcceptor() throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL setDockingAreaAcceptor( const ::com::sun::star::uno::Reference< ::com::sun::star::ui::XDockingAreaAcceptor >& xDockingAreaAcceptor ) throw (::com::sun::star::uno::RuntimeException); @@ -200,17 +199,6 @@ namespace framework virtual void SAL_CALL elementRemoved( const ::com::sun::star::ui::ConfigurationEvent& Event ) throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL elementReplaced( const ::com::sun::star::ui::ConfigurationEvent& Event ) throw (::com::sun::star::uno::RuntimeException); - //--------------------------------------------------------------------------------------------------------- - // XDockableWindowListener - //--------------------------------------------------------------------------------------------------------- - virtual void SAL_CALL startDocking( const ::com::sun::star::awt::DockingEvent& e ) throw (::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::awt::DockingData SAL_CALL docking( const ::com::sun::star::awt::DockingEvent& e ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL endDocking( const ::com::sun::star::awt::EndDockingEvent& e ) throw (::com::sun::star::uno::RuntimeException); - virtual sal_Bool SAL_CALL prepareToggleFloatingMode( const ::com::sun::star::lang::EventObject& e ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL toggleFloatingMode( const ::com::sun::star::lang::EventObject& e ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL closed( const ::com::sun::star::lang::EventObject& e ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL endPopupMode( const ::com::sun::star::awt::EndPopupModeEvent& e ) throw (::com::sun::star::uno::RuntimeException); - //--------------------------------------------------------------------------------------------------------- // XLayoutManagerEventBroadcaster //--------------------------------------------------------------------------------------------------------- @@ -225,54 +213,35 @@ namespace framework //--------------------------------------------------------------------------------------------------------- virtual void requestLayout( Hint eHint ); - struct DockedData - { - DockedData() : m_aPos( LONG_MAX, LONG_MAX ), - m_nDockedArea( ::com::sun::star::ui::DockingArea_DOCKINGAREA_TOP ), - m_bLocked( sal_False ) {} - - Point m_aPos; - Size m_aSize; - sal_Int16 m_nDockedArea; - sal_Bool m_bLocked; - }; - struct FloatingData - { - FloatingData() : m_aPos( LONG_MAX, LONG_MAX ), - m_nLines( 1 ), - m_bIsHorizontal( sal_True ) {} - - Point m_aPos; - Size m_aSize; - sal_Int16 m_nLines; - sal_Bool m_bIsHorizontal; - }; - protected: DECL_LINK( AsyncLayoutHdl, Timer * ); private: - typedef std::vector< UIElement > UIElementVector; - //--------------------------------------------------------------------------------------------------------- // helper //--------------------------------------------------------------------------------------------------------- + + //--------------------------------------------------------------------------------------------------------- + // menu bar + //--------------------------------------------------------------------------------------------------------- void impl_clearUpMenuBar(); void implts_reset( sal_Bool bAttach ); void implts_setMenuBarCloser(sal_Bool bCloserState); void implts_updateMenuBarClose(); sal_Bool implts_resetMenuBar(); + //--------------------------------------------------------------------------------------------------------- + // locking + //--------------------------------------------------------------------------------------------------------- void implts_lock(); sal_Bool implts_unlock(); - sal_Bool implts_findElement( const rtl::OUString& aName, rtl::OUString& aElementType, rtl::OUString& aElementName, ::com::sun::star::uno::Reference< ::com::sun::star::ui::XUIElement >& xSettings ); - sal_Bool implts_findElement( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& xUIElement, UIElement& aElementData ); - sal_Bool implts_findElement( const rtl::OUString& aName, UIElement& aElementData ); + //--------------------------------------------------------------------------------------------------------- + // query + //--------------------------------------------------------------------------------------------------------- + ::com::sun::star::uno::Reference< ::com::sun::star::ui::XUIElement > implts_findElement( const rtl::OUString& aName ); UIElement& impl_findElement( const rtl::OUString& aName ); - sal_Bool implts_insertUIElement( const UIElement& rUIElement ); - void implts_refreshContextToolbarsVisibility(); void implts_writeNewStateData( const rtl::OUString aName, const ::com::sun::star::uno::Reference< com::sun::star::awt::XWindow >& xWindow ); sal_Bool implts_readWindowStateData( const rtl::OUString& rName, UIElement& rElementData ); void implts_writeWindowStateData( const rtl::OUString& rName, const UIElement& rElementData ); @@ -323,9 +292,6 @@ namespace framework void implts_updateUIElementsVisibleState( sal_Bool bShow ); void implts_setCurrentUIVisibility( sal_Bool bShow ); void implts_notifyListeners( short nEvent, ::com::sun::star::uno::Any aInfoParam ); -#ifdef DBG_UTIL - void implts_checkElementContainer(); -#endif DECL_LINK( OptionsChanged, void* ); DECL_LINK( SettingsChanged, void* ); @@ -354,9 +320,7 @@ namespace framework css::uno::WeakReference< css::frame::XModel > m_xModel; css::uno::Reference< css::awt::XWindow > m_xContainerWindow; css::uno::Reference< css::awt::XTopWindow2 > m_xContainerTopWindow; - css::uno::Reference< css::awt::XWindow > m_xDockAreaWindows[DOCKINGAREAS_COUNT]; sal_Int32 m_nLockCount; - UIElementVector m_aUIElements; bool m_bActive; bool m_bInplaceMenuSet; bool m_bDockingInProgress; @@ -371,10 +335,9 @@ namespace framework bool m_bHideCurrentUI; bool m_bGlobalSettings; bool m_bPreserveContentSize; - UIElement m_aDockUIElement; + bool m_bMenuBarCloser; css::awt::Rectangle m_aDockingArea; css::uno::Reference< ::com::sun::star::ui::XDockingAreaAcceptor > m_xDockingAreaAcceptor; - Point m_aStartDockMousePos; css::uno::Reference< ::com::sun::star::lang::XComponent > m_xInplaceMenuBar; MenuBarManager* m_pInplaceMenuBar; css::uno::Reference< ::com::sun::star::ui::XUIElement > m_xMenuBar; @@ -383,14 +346,10 @@ namespace framework com::sun::star::uno::Reference< ::com::sun::star::ui::XUIElement > m_xProgressBarBackup; css::uno::Reference< ::com::sun::star::frame::XModuleManager > m_xModuleManager; css::uno::Reference< ::com::sun::star::ui::XUIElementFactory > m_xUIElementFactoryManager; - bool m_bMenuBarCloser; css::uno::Reference< ::com::sun::star::container::XNameAccess > m_xPersistentWindowState; css::uno::Reference< ::com::sun::star::container::XNameAccess > m_xPersistentWindowStateSupplier; GlobalSettings* m_pGlobalSettings; rtl::OUString m_aModuleIdentifier; - rtl::OUString m_aCustomTbxPrefix; - rtl::OUString m_aFullCustomTbxPrefix; - rtl::OUString m_aFullAddonTbxPrefix; rtl::OUString m_aStatusBarAlias; rtl::OUString m_aProgressBarAlias; rtl::OUString m_aPropDocked; @@ -403,15 +362,13 @@ namespace framework rtl::OUString m_aPropStyle; rtl::OUString m_aPropLocked; rtl::OUString m_aCustomizeCmd; - AddonsOptions* m_pAddonOptions; - SvtMiscOptions* m_pMiscOptions; sal_Int16 m_eSymbolsSize; sal_Int16 m_eSymbolsStyle; - Timer m_aAsyncLayoutTimer; + Timer m_aAsyncLayoutTimer; ::cppu::OMultiTypeInterfaceContainerHelper m_aListenerContainer; // container for ALL Listener PanelManager* m_pPanelManager; ToolbarLayoutManager* m_pToolbarManager; - css::uno::Reference< ::com::sun::star::awt::XDockableWindowListener > m_xToolbarManager; + css::uno::Reference< ::com::sun::star::lang::XComponent > m_xToolbarManager; }; } // namespace framework -- cgit From bc5dc66313aa64c558c214955c3bc43e43f3d335 Mon Sep 17 00:00:00 2001 From: Carsten Driesner Date: Wed, 13 Oct 2010 17:31:05 +0200 Subject: dockingwindows: Fixed problems with changes done via UI configuration API not being sent to the ToolbarLayoutManager --- framework/inc/services/layoutmanager.hxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'framework/inc') diff --git a/framework/inc/services/layoutmanager.hxx b/framework/inc/services/layoutmanager.hxx index ef827e7e85b9..6b0135a39e10 100644 --- a/framework/inc/services/layoutmanager.hxx +++ b/framework/inc/services/layoutmanager.hxx @@ -368,7 +368,7 @@ namespace framework ::cppu::OMultiTypeInterfaceContainerHelper m_aListenerContainer; // container for ALL Listener PanelManager* m_pPanelManager; ToolbarLayoutManager* m_pToolbarManager; - css::uno::Reference< ::com::sun::star::lang::XComponent > m_xToolbarManager; + css::uno::Reference< ::com::sun::star::ui::XUIConfigurationListener > m_xToolbarManager; }; } // namespace framework -- cgit From 4160c3cea7de23b99dc0e51faf765b082dc325f0 Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Mon, 18 Oct 2010 17:00:27 +0200 Subject: ooo33gsl11: #i115088# add a nodoc string, workaround botched define in classes/resource.hrc --- framework/inc/framework.hrc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'framework/inc') diff --git a/framework/inc/framework.hrc b/framework/inc/framework.hrc index eea91edeaa07..1817b60d90e9 100644 --- a/framework/inc/framework.hrc +++ b/framework/inc/framework.hrc @@ -35,9 +35,9 @@ #define RID_GROUPS_OFFSET 32000 #define RID_GROUPS_END 32767 -#define RID_FWK_DIALOG_START (RID_FWK_START + 2048) +#define RID_FWK_DIALOG_START_CORRECT (RID_FWK_START + 2048) -#define DLG_FILTER_SELECT (RID_FWK_DIALOG_START + 0) +#define DLG_FILTER_SELECT (RID_FWK_DIALOG_START_CORRECT + 0) #define STR_FILTER_DOWNLOAD (RID_FWK_START+0) #define STR_FILTER_CHOOSER (RID_FWK_START+1) @@ -45,7 +45,7 @@ #define STR_FILTER_ZIPPED (RID_FWK_START+3) // ResIds for BackingWindow -#define DLG_BACKING (RID_FWK_DIALOG_START+100) +#define DLG_BACKING (RID_FWK_DIALOG_START_CORRECT+100) #define STR_BACKING_WELCOME 1 #define STR_BACKING_WELCOMEPRODUCT 2 #define STR_BACKING_CREATE 3 @@ -78,7 +78,7 @@ #define BMP_BACKING_OPENTEMPLATE 17 // Ids of TabWindow -#define WIN_TABWINDOW (RID_FWK_DIALOG_START+101) +#define WIN_TABWINDOW (RID_FWK_DIALOG_START_CORRECT+101) #define TC_TABCONTROL 1 #endif -- cgit From 3314bec88951b91c102fb26780cbb30d571b2a3f Mon Sep 17 00:00:00 2001 From: Carsten Driesner Date: Tue, 26 Oct 2010 14:59:02 +0200 Subject: #i112595# Transition from sal_Bool to bool --- framework/inc/uielement/uielement.hxx | 100 +++++++++++++++++----------------- 1 file changed, 50 insertions(+), 50 deletions(-) (limited to 'framework/inc') diff --git a/framework/inc/uielement/uielement.hxx b/framework/inc/uielement/uielement.hxx index 98e65d5c5a93..b4ad9e2cbb6d 100755 --- a/framework/inc/uielement/uielement.hxx +++ b/framework/inc/uielement/uielement.hxx @@ -60,83 +60,83 @@ struct DockedData { DockedData() : m_aPos( LONG_MAX, LONG_MAX ), m_nDockedArea( ::com::sun::star::ui::DockingArea_DOCKINGAREA_TOP ), - m_bLocked( sal_False ) {} + m_bLocked( false ) {} - Point m_aPos; - Size m_aSize; - sal_Int16 m_nDockedArea; - sal_Bool m_bLocked; + Point m_aPos; + Size m_aSize; + sal_Int16 m_nDockedArea; + bool m_bLocked; }; struct FloatingData { FloatingData() : m_aPos( LONG_MAX, LONG_MAX ), m_nLines( 1 ), - m_bIsHorizontal( sal_True ) {} + m_bIsHorizontal( true ) {} - Point m_aPos; - Size m_aSize; - sal_Int16 m_nLines; - sal_Bool m_bIsHorizontal; + Point m_aPos; + Size m_aSize; + sal_Int16 m_nLines; + bool m_bIsHorizontal; }; struct UIElement { - UIElement() : m_bFloating( sal_False ), - m_bVisible( sal_True ), - m_bUserActive( sal_False ), - m_bCreateNewRowCol0( sal_False ), - m_bDeactiveHide( sal_False ), - m_bMasterHide( sal_False ), - m_bContextSensitive( sal_False ), - m_bContextActive( sal_True ), - m_bNoClose( sal_False ), - m_bSoftClose( sal_False ), - m_bStateRead( sal_False ), + UIElement() : m_bFloating( false ), + m_bVisible( true ), + m_bUserActive( false ), + m_bCreateNewRowCol0( false ), + m_bDeactiveHide( false ), + m_bMasterHide( false ), + m_bContextSensitive( false ), + m_bContextActive( true ), + m_bNoClose( false ), + m_bSoftClose( false ), + m_bStateRead( false ), m_nStyle( BUTTON_SYMBOL ) {} UIElement( const rtl::OUString& rName, const rtl::OUString& rType, const com::sun::star::uno::Reference< ::com::sun::star::ui::XUIElement >& rUIElement, - sal_Bool bFloating = sal_False + bool bFloating = false ) : m_aType( rType ), m_aName( rName ), m_xUIElement( rUIElement ), m_bFloating( bFloating ), - m_bVisible( sal_True ), - m_bUserActive( sal_False ), - m_bCreateNewRowCol0( sal_False ), - m_bDeactiveHide( sal_False ), - m_bMasterHide( sal_False ), - m_bContextSensitive( sal_False ), - m_bContextActive( sal_True ), - m_bNoClose( sal_False ), - m_bSoftClose( sal_False ), - m_bStateRead( sal_False ), + m_bVisible( true ), + m_bUserActive( false ), + m_bCreateNewRowCol0( false ), + m_bDeactiveHide( false ), + m_bMasterHide( false ), + m_bContextSensitive( false ), + m_bContextActive( true ), + m_bNoClose( false ), + m_bSoftClose( false ), + m_bStateRead( false ), m_nStyle( BUTTON_SYMBOL ) {} bool operator< ( const UIElement& aUIElement ) const; UIElement& operator=( const UIElement& rUIElement ); - rtl::OUString m_aType; - rtl::OUString m_aName; - rtl::OUString m_aUIName; - com::sun::star::uno::Reference< ::com::sun::star::ui::XUIElement > m_xUIElement; - sal_Bool m_bFloating, - m_bVisible, - m_bUserActive, - m_bCreateNewRowCol0, - m_bDeactiveHide, - m_bMasterHide, - m_bContextSensitive, - m_bContextActive; - sal_Bool m_bNoClose, - m_bSoftClose, - m_bStateRead; - sal_Int16 m_nStyle; - DockedData m_aDockedData; - FloatingData m_aFloatingData; + rtl::OUString m_aType; + rtl::OUString m_aName; + rtl::OUString m_aUIName; + com::sun::star::uno::Reference< ::com::sun::star::ui::XUIElement > m_xUIElement; + bool m_bFloating, + m_bVisible, + m_bUserActive, + m_bCreateNewRowCol0, + m_bDeactiveHide, + m_bMasterHide, + m_bContextSensitive, + m_bContextActive; + bool m_bNoClose, + m_bSoftClose, + m_bStateRead; + sal_Int16 m_nStyle; + DockedData m_aDockedData; + FloatingData m_aFloatingData; }; typedef std::vector< UIElement > UIElementVector; -- cgit